summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2018-03-31 20:38:19 +0200
committerDidier Raboud <odyx@debian.org>2018-03-31 20:38:19 +0200
commitf05798f0619384fdb055f634ca4233378f2779dd (patch)
treeb1f9b212f77580c824cc765ac3778fc6c8f4d4d8
parent59c41c0897494001ced424157660d4ee59bb5426 (diff)
Import Upstream version 2.32
-rwxr-xr-xCOPYING288
-rwxr-xr-xChangeLog38032
-rwxr-xr-xContrib/AdvSplash/Example.nsi68
-rwxr-xr-xContrib/AdvSplash/SConscript48
-rwxr-xr-xContrib/AdvSplash/advsplash.c676
-rwxr-xr-xContrib/AdvSplash/advsplash.txt104
-rwxr-xr-xContrib/Banner/Banner.c368
-rwxr-xr-xContrib/Banner/Example.nsi74
-rwxr-xr-xContrib/Banner/Readme.txt92
-rwxr-xr-xContrib/Banner/SConscript44
-rwxr-xr-xContrib/BgImage/BgImage.cpp1302
-rwxr-xr-xContrib/BgImage/BgImage.txt190
-rwxr-xr-xContrib/BgImage/Example.nsi202
-rwxr-xr-xContrib/BgImage/SConscript48
-rwxr-xr-xContrib/Dialer/Dialer.txt240
-rwxr-xr-xContrib/Dialer/SConscript36
-rwxr-xr-xContrib/Dialer/dialer.c252
-rwxr-xr-xContrib/ExDLL/SConscript50
-rwxr-xr-xContrib/ExDLL/exdll.c76
-rwxr-xr-xContrib/ExDLL/exdll.dpr236
-rwxr-xr-xContrib/ExDLL/exdll.dsp222
-rwxr-xr-xContrib/ExDLL/exdll.dsw58
-rwxr-xr-xContrib/ExDLL/exdll.h256
-rwxr-xr-xContrib/ExDLL/exdll_with_unit.dpr62
-rwxr-xr-xContrib/ExDLL/extdll.inc290
-rwxr-xr-xContrib/ExDLL/nsis.pas252
-rwxr-xr-xContrib/Graphics/SConscript172
-rwxr-xr-xContrib/InstallOptions/Changelog.txt288
-rwxr-xr-xContrib/InstallOptions/InstallOptions.nsh480
-rwxr-xr-xContrib/InstallOptions/InstallerOptions.cpp3256
-rwxr-xr-xContrib/InstallOptions/Readme.html1814
-rwxr-xr-xContrib/InstallOptions/SConscript86
-rwxr-xr-xContrib/InstallOptions/ioptdll.rc188
-rwxr-xr-xContrib/InstallOptions/resource.h32
-rwxr-xr-xContrib/InstallOptions/test.ini150
-rwxr-xr-xContrib/InstallOptions/test.nsi168
-rwxr-xr-xContrib/InstallOptions/testimgs.ini130
-rwxr-xr-xContrib/InstallOptions/testimgs.nsi118
-rwxr-xr-xContrib/InstallOptions/testlink.ini88
-rwxr-xr-xContrib/InstallOptions/testlink.nsi116
-rwxr-xr-xContrib/InstallOptions/testnotify.ini210
-rwxr-xr-xContrib/InstallOptions/testnotify.nsi266
-rwxr-xr-xContrib/LangDLL/LangDLL.c460
-rwxr-xr-xContrib/LangDLL/SConscript38
-rwxr-xr-xContrib/LangDLL/resource.h38
-rwxr-xr-xContrib/LangDLL/resource.rc226
-rwxr-xr-xContrib/Language files/Afrikaans.nlf380
-rwxr-xr-xContrib/Language files/Afrikaans.nsh242
-rwxr-xr-xContrib/Language files/Albanian.nlf382
-rwxr-xr-xContrib/Language files/Albanian.nsh242
-rwxr-xr-xContrib/Language files/Arabic.nlf378
-rwxr-xr-xContrib/Language files/Arabic.nsh244
-rwxr-xr-xContrib/Language files/Basque.nlf378
-rwxr-xr-xContrib/Language files/Basque.nsh242
-rwxr-xr-xContrib/Language files/Belarusian.nlf378
-rwxr-xr-xContrib/Language files/Belarusian.nsh242
-rwxr-xr-xContrib/Language files/Bosnian.nlf382
-rwxr-xr-xContrib/Language files/Bosnian.nsh242
-rwxr-xr-xContrib/Language files/Breton.nlf382
-rwxr-xr-xContrib/Language files/Breton.nsh242
-rwxr-xr-xContrib/Language files/Bulgarian.nlf388
-rwxr-xr-xContrib/Language files/Bulgarian.nsh248
-rwxr-xr-xContrib/Language files/Catalan.nlf382
-rwxr-xr-xContrib/Language files/Catalan.nsh242
-rwxr-xr-xContrib/Language files/Croatian.nlf378
-rwxr-xr-xContrib/Language files/Croatian.nsh242
-rwxr-xr-xContrib/Language files/Czech.nlf378
-rwxr-xr-xContrib/Language files/Czech.nsh244
-rwxr-xr-xContrib/Language files/Danish.nlf378
-rwxr-xr-xContrib/Language files/Danish.nsh242
-rwxr-xr-xContrib/Language files/Dutch.nlf382
-rwxr-xr-xContrib/Language files/Dutch.nsh242
-rwxr-xr-xContrib/Language files/English.nlf380
-rwxr-xr-xContrib/Language files/English.nsh242
-rwxr-xr-xContrib/Language files/Estonian.nlf380
-rwxr-xr-xContrib/Language files/Estonian.nsh242
-rwxr-xr-xContrib/Language files/Farsi.nlf382
-rwxr-xr-xContrib/Language files/Farsi.nsh242
-rwxr-xr-xContrib/Language files/Finnish.nlf384
-rwxr-xr-xContrib/Language files/Finnish.nsh246
-rwxr-xr-xContrib/Language files/French.nlf382
-rwxr-xr-xContrib/Language files/French.nsh242
-rwxr-xr-xContrib/Language files/Galician.nlf382
-rwxr-xr-xContrib/Language files/Galician.nsh242
-rwxr-xr-xContrib/Language files/German.nlf378
-rwxr-xr-xContrib/Language files/German.nsh242
-rwxr-xr-xContrib/Language files/Greek.nlf378
-rwxr-xr-xContrib/Language files/Greek.nsh242
-rwxr-xr-xContrib/Language files/Hebrew.nlf378
-rwxr-xr-xContrib/Language files/Hebrew.nsh242
-rwxr-xr-xContrib/Language files/Hungarian.nlf380
-rwxr-xr-xContrib/Language files/Hungarian.nsh244
-rwxr-xr-xContrib/Language files/Icelandic.nlf380
-rwxr-xr-xContrib/Language files/Icelandic.nsh242
-rwxr-xr-xContrib/Language files/Indonesian.nlf378
-rwxr-xr-xContrib/Language files/Indonesian.nsh242
-rwxr-xr-xContrib/Language files/Irish.nlf382
-rwxr-xr-xContrib/Language files/Irish.nsh242
-rwxr-xr-xContrib/Language files/Italian.nlf382
-rwxr-xr-xContrib/Language files/Italian.nsh246
-rwxr-xr-xContrib/Language files/Japanese.nlf378
-rwxr-xr-xContrib/Language files/Japanese.nsh244
-rwxr-xr-xContrib/Language files/Korean.nlf380
-rwxr-xr-xContrib/Language files/Korean.nsh242
-rwxr-xr-xContrib/Language files/Kurdish.nlf378
-rwxr-xr-xContrib/Language files/Kurdish.nsh244
-rwxr-xr-xContrib/Language files/Latvian.nlf380
-rwxr-xr-xContrib/Language files/Latvian.nsh244
-rwxr-xr-xContrib/Language files/Lithuanian.nlf380
-rwxr-xr-xContrib/Language files/Lithuanian.nsh242
-rwxr-xr-xContrib/Language files/Luxembourgish.nlf378
-rwxr-xr-xContrib/Language files/Luxembourgish.nsh242
-rwxr-xr-xContrib/Language files/Macedonian.nlf380
-rwxr-xr-xContrib/Language files/Macedonian.nsh242
-rwxr-xr-xContrib/Language files/Malay.nlf378
-rwxr-xr-xContrib/Language files/Malay.nsh242
-rwxr-xr-xContrib/Language files/Mongolian.nlf378
-rwxr-xr-xContrib/Language files/Mongolian.nsh242
-rwxr-xr-xContrib/Language files/Norwegian.nlf378
-rwxr-xr-xContrib/Language files/Norwegian.nsh242
-rwxr-xr-xContrib/Language files/NorwegianNynorsk.nlf382
-rwxr-xr-xContrib/Language files/NorwegianNynorsk.nsh242
-rwxr-xr-xContrib/Language files/Polish.nlf382
-rwxr-xr-xContrib/Language files/Polish.nsh244
-rwxr-xr-xContrib/Language files/Portuguese.nlf380
-rwxr-xr-xContrib/Language files/Portuguese.nsh242
-rwxr-xr-xContrib/Language files/PortugueseBR.nlf380
-rwxr-xr-xContrib/Language files/PortugueseBR.nsh242
-rwxr-xr-xContrib/Language files/Romanian.nlf402
-rwxr-xr-xContrib/Language files/Romanian.nsh260
-rwxr-xr-xContrib/Language files/Russian.nlf380
-rwxr-xr-xContrib/Language files/Russian.nsh242
-rwxr-xr-xContrib/Language files/SConscript240
-rwxr-xr-xContrib/Language files/Serbian.nlf378
-rwxr-xr-xContrib/Language files/Serbian.nsh242
-rwxr-xr-xContrib/Language files/SerbianLatin.nlf378
-rwxr-xr-xContrib/Language files/SerbianLatin.nsh242
-rwxr-xr-xContrib/Language files/SimpChinese.nlf380
-rwxr-xr-xContrib/Language files/SimpChinese.nsh246
-rwxr-xr-xContrib/Language files/Slovak.nlf378
-rwxr-xr-xContrib/Language files/Slovak.nsh242
-rwxr-xr-xContrib/Language files/Slovenian.nlf378
-rwxr-xr-xContrib/Language files/Slovenian.nsh242
-rwxr-xr-xContrib/Language files/Spanish.nlf380
-rwxr-xr-xContrib/Language files/Spanish.nsh244
-rwxr-xr-xContrib/Language files/SpanishInternational.nlf380
-rwxr-xr-xContrib/Language files/SpanishInternational.nsh244
-rwxr-xr-xContrib/Language files/Swedish.nlf378
-rwxr-xr-xContrib/Language files/Swedish.nsh244
-rwxr-xr-xContrib/Language files/Thai.nlf380
-rwxr-xr-xContrib/Language files/Thai.nsh242
-rwxr-xr-xContrib/Language files/TradChinese.nlf378
-rwxr-xr-xContrib/Language files/TradChinese.nsh244
-rwxr-xr-xContrib/Language files/Turkish.nlf382
-rwxr-xr-xContrib/Language files/Turkish.nsh244
-rwxr-xr-xContrib/Language files/Ukrainian.nlf384
-rwxr-xr-xContrib/Language files/Ukrainian.nsh244
-rwxr-xr-xContrib/Language files/Uzbek.nlf378
-rwxr-xr-xContrib/Language files/Uzbek.nsh242
-rwxr-xr-xContrib/Language files/Welsh.nlf382
-rwxr-xr-xContrib/Language files/Welsh.nsh242
-rwxr-xr-xContrib/Library/LibraryLocal/LibraryLocal.cpp318
-rwxr-xr-xContrib/Library/LibraryLocal/SConscript66
-rwxr-xr-xContrib/Library/RegTool/RegTool.c628
-rwxr-xr-xContrib/Library/RegTool/SConscript34
-rwxr-xr-xContrib/Library/TypeLib/SConscript32
-rwxr-xr-xContrib/Library/TypeLib/TypeLib.cpp270
-rwxr-xr-xContrib/MakeLangId/MakeLangId.cpp488
-rwxr-xr-xContrib/MakeLangId/MakeLangId.xml34
-rwxr-xr-xContrib/MakeLangId/SConscript48
-rwxr-xr-xContrib/MakeLangId/resource.h40
-rwxr-xr-xContrib/MakeLangId/resource.rc240
-rwxr-xr-xContrib/Makensisw/License.txt34
-rwxr-xr-xContrib/Makensisw/Readme.txt428
-rwxr-xr-xContrib/Makensisw/SConscript118
-rwxr-xr-xContrib/Makensisw/afxres.h12
-rwxr-xr-xContrib/Makensisw/jnetlib/asyncdns.cpp156
-rwxr-xr-xContrib/Makensisw/jnetlib/asyncdns.h76
-rwxr-xr-xContrib/Makensisw/jnetlib/connection.cpp894
-rwxr-xr-xContrib/Makensisw/jnetlib/connection.h270
-rwxr-xr-xContrib/Makensisw/jnetlib/httpget.cpp948
-rwxr-xr-xContrib/Makensisw/jnetlib/httpget.h220
-rwxr-xr-xContrib/Makensisw/jnetlib/netinc.h164
-rwxr-xr-xContrib/Makensisw/jnetlib/util.cpp128
-rwxr-xr-xContrib/Makensisw/jnetlib/util.h82
-rwxr-xr-xContrib/Makensisw/logo.psp2
-rwxr-xr-xContrib/Makensisw/makensisw.cpp2594
-rwxr-xr-xContrib/Makensisw/makensisw.h438
-rwxr-xr-xContrib/Makensisw/makensisw.xml34
-rwxr-xr-xContrib/Makensisw/noclib.cpp144
-rwxr-xr-xContrib/Makensisw/noclib.h66
-rwxr-xr-xContrib/Makensisw/resource.h228
-rwxr-xr-xContrib/Makensisw/resource.rc718
-rwxr-xr-xContrib/Makensisw/toolbar.cpp450
-rwxr-xr-xContrib/Makensisw/toolbar.h160
-rwxr-xr-xContrib/Makensisw/update.cpp280
-rwxr-xr-xContrib/Makensisw/update.h16
-rwxr-xr-xContrib/Makensisw/utils.cpp1942
-rwxr-xr-xContrib/Makensisw/utils.h132
-rwxr-xr-xContrib/Makensisw/version.cpp58
-rwxr-xr-xContrib/Math/Math.txt396
-rwxr-xr-xContrib/Math/SConscript52
-rwxr-xr-xContrib/Math/Source/Math.c3096
-rwxr-xr-xContrib/Math/Source/Math.h174
-rwxr-xr-xContrib/Math/Source/MyMath.c486
-rwxr-xr-xContrib/Math/Source/MyMath.h332
-rwxr-xr-xContrib/Math/Source/plugin.c272
-rwxr-xr-xContrib/Math/math.nsi78
-rwxr-xr-xContrib/Math/mathtest.ini202
-rwxr-xr-xContrib/Math/mathtest.nsi342
-rwxr-xr-xContrib/Math/mathtest.txt14
-rwxr-xr-xContrib/Modern UI 2/Interface.nsh612
-rwxr-xr-xContrib/Modern UI 2/License.txt18
-rwxr-xr-xContrib/Modern UI 2/Localization.nsh375
-rwxr-xr-xContrib/Modern UI 2/MUI2.nsh246
-rwxr-xr-xContrib/Modern UI 2/Pages.nsh320
-rwxr-xr-xContrib/Modern UI 2/Pages/Components.nsh430
-rwxr-xr-xContrib/Modern UI 2/Pages/Directory.nsh250
-rwxr-xr-xContrib/Modern UI 2/Pages/Finish.nsh9
-rwxr-xr-xContrib/Modern UI 2/Pages/InstallFiles.nsh298
-rwxr-xr-xContrib/Modern UI 2/Pages/License.nsh290
-rwxr-xr-xContrib/Modern UI 2/Pages/StartMenu.nsh468
-rwxr-xr-xContrib/Modern UI 2/Pages/UninstallConfirm.nsh192
-rwxr-xr-xContrib/Modern UI 2/Pages/Welcome.nsh44
-rwxr-xr-xContrib/Modern UI 2/Readme.html2316
-rwxr-xr-xContrib/Modern UI 2/SConscript86
-rwxr-xr-xContrib/Modern UI/Changelog.txt524
-rwxr-xr-xContrib/Modern UI/License.txt18
-rwxr-xr-xContrib/Modern UI/Readme.html2300
-rwxr-xr-xContrib/Modern UI/SConscript62
-rwxr-xr-xContrib/Modern UI/System.nsh4406
-rwxr-xr-xContrib/Modern UI/ioSpecial.ini36
-rwxr-xr-xContrib/NSIS Menu/SConscript208
-rwxr-xr-xContrib/NSIS Menu/nsismenu/nsismenu.cpp350
-rwxr-xr-xContrib/NSIS Menu/nsismenu/nsismenu.rc2
-rwxr-xr-xContrib/NSIS Menu/nsismenu/nslinks.cpp218
-rwxr-xr-xContrib/NSIS Menu/nsismenu/resource.h30
-rwxr-xr-xContrib/NSIS Menu/wx/build.txt8
-rwxr-xr-xContrib/NSIS Menu/wx/setup.h2696
-rwxr-xr-xContrib/NSIS Menu/wx/wxbuild.bat36
-rwxr-xr-xContrib/NSISdl/License.txt34
-rwxr-xr-xContrib/NSISdl/ReadMe.txt182
-rwxr-xr-xContrib/NSISdl/SConscript60
-rwxr-xr-xContrib/NSISdl/asyncdns.cpp164
-rwxr-xr-xContrib/NSISdl/asyncdns.h78
-rwxr-xr-xContrib/NSISdl/connection.cpp890
-rwxr-xr-xContrib/NSISdl/connection.h270
-rwxr-xr-xContrib/NSISdl/httpget.cpp998
-rwxr-xr-xContrib/NSISdl/httpget.h218
-rwxr-xr-xContrib/NSISdl/netinc.h84
-rwxr-xr-xContrib/NSISdl/nsisdl.cpp1192
-rwxr-xr-xContrib/NSISdl/util.cpp170
-rwxr-xr-xContrib/NSISdl/util.h72
-rwxr-xr-xContrib/Splash/Example.nsi40
-rwxr-xr-xContrib/Splash/SConscript48
-rwxr-xr-xContrib/Splash/splash.c238
-rwxr-xr-xContrib/Splash/splash.txt82
-rwxr-xr-xContrib/StartMenu/Example.nsi98
-rwxr-xr-xContrib/StartMenu/Readme.txt92
-rwxr-xr-xContrib/StartMenu/SConscript58
-rwxr-xr-xContrib/StartMenu/StartMenu.c894
-rwxr-xr-xContrib/StartMenu/StartMenu.rc204
-rwxr-xr-xContrib/StartMenu/resource.h42
-rwxr-xr-xContrib/System/SConscript76
-rwxr-xr-xContrib/System/Source/Buffers.c224
-rwxr-xr-xContrib/System/Source/Buffers.h4
-rwxr-xr-xContrib/System/Source/Plugin.c346
-rwxr-xr-xContrib/System/Source/Plugin.h138
-rwxr-xr-xContrib/System/Source/System.c2822
-rwxr-xr-xContrib/System/Source/System.h218
-rwxr-xr-xContrib/System/Source/stdafx.c16
-rwxr-xr-xContrib/System/Source/stdafx.h26
-rwxr-xr-xContrib/System/SysFunc.nsh794
-rwxr-xr-xContrib/System/System.html1574
-rwxr-xr-xContrib/System/System.nsh942
-rwxr-xr-xContrib/System/System.nsi284
-rwxr-xr-xContrib/System/WhatsNew.txt90
-rwxr-xr-xContrib/UIs/SConscript52
-rwxr-xr-xContrib/UIs/default.rc240
-rwxr-xr-xContrib/UIs/modern.rc262
-rwxr-xr-xContrib/UIs/modern_headerbmp.rc56
-rwxr-xr-xContrib/UIs/modern_headerbmpr.rc56
-rwxr-xr-xContrib/UIs/modern_nodesc.rc36
-rwxr-xr-xContrib/UIs/modern_smalldesc.rc40
-rwxr-xr-xContrib/UIs/resource.h90
-rwxr-xr-xContrib/UIs/sdbarker_tiny.rc238
-rwxr-xr-xContrib/UIs/ui.c204
-rwxr-xr-xContrib/UserInfo/SConscript36
-rwxr-xr-xContrib/UserInfo/UserInfo.c290
-rwxr-xr-xContrib/UserInfo/UserInfo.nsi88
-rwxr-xr-xContrib/VPatch/Readme.html682
-rwxr-xr-xContrib/VPatch/SConscript44
-rwxr-xr-xContrib/VPatch/Source/GUI/AboutForm.pas62
-rwxr-xr-xContrib/VPatch/Source/GUI/DLLWrapper.pas102
-rwxr-xr-xContrib/VPatch/Source/GUI/MainForm.dfm1984
-rwxr-xr-xContrib/VPatch/Source/GUI/MainForm.pas1078
-rwxr-xr-xContrib/VPatch/Source/GUI/OSUtil.pas228
-rwxr-xr-xContrib/VPatch/Source/GUI/PatchClasses.pas1094
-rwxr-xr-xContrib/VPatch/Source/GUI/ProgressForm.dfm204
-rwxr-xr-xContrib/VPatch/Source/GUI/ProgressForm.pas148
-rwxr-xr-xContrib/VPatch/Source/GUI/VPatchGUI.bdsproj326
-rwxr-xr-xContrib/VPatch/Source/GUI/VPatchGUI.cfg78
-rwxr-xr-xContrib/VPatch/Source/GUI/VPatchGUI.dpr38
-rwxr-xr-xContrib/VPatch/Source/GUI/clean.bat8
-rwxr-xr-xContrib/VPatch/Source/GUI/vdsp_crc.pas230
-rwxr-xr-xContrib/VPatch/Source/GenPat/Checksums.cpp240
-rwxr-xr-xContrib/VPatch/Source/GenPat/Checksums.h100
-rwxr-xr-xContrib/VPatch/Source/GenPat/ChunkedFile.cpp190
-rwxr-xr-xContrib/VPatch/Source/GenPat/ChunkedFile.h154
-rwxr-xr-xContrib/VPatch/Source/GenPat/FileFormat1.cpp486
-rwxr-xr-xContrib/VPatch/Source/GenPat/FileFormat1.h82
-rwxr-xr-xContrib/VPatch/Source/GenPat/GlobalTypes.cpp56
-rwxr-xr-xContrib/VPatch/Source/GenPat/GlobalTypes.h108
-rwxr-xr-xContrib/VPatch/Source/GenPat/POSIXUtil.cpp260
-rwxr-xr-xContrib/VPatch/Source/GenPat/POSIXUtil.h88
-rwxr-xr-xContrib/VPatch/Source/GenPat/PatchGenerator.cpp494
-rwxr-xr-xContrib/VPatch/Source/GenPat/PatchGenerator.h144
-rwxr-xr-xContrib/VPatch/Source/GenPat/SConscript40
-rwxr-xr-xContrib/VPatch/Source/GenPat/adler32.cpp184
-rwxr-xr-xContrib/VPatch/Source/GenPat/adler32.h36
-rwxr-xr-xContrib/VPatch/Source/GenPat/main.cpp600
-rwxr-xr-xContrib/VPatch/Source/GenPat/md5.c778
-rwxr-xr-xContrib/VPatch/Source/GenPat/md5.h182
-rwxr-xr-xContrib/VPatch/Source/Plugin/SConscript32
-rwxr-xr-xContrib/VPatch/Source/Plugin/apply_patch.c478
-rwxr-xr-xContrib/VPatch/Source/Plugin/apply_patch.h90
-rwxr-xr-xContrib/VPatch/Source/Plugin/checksum.c258
-rwxr-xr-xContrib/VPatch/Source/Plugin/checksum.h84
-rwxr-xr-xContrib/VPatch/Source/Plugin/md5.c778
-rwxr-xr-xContrib/VPatch/Source/Plugin/md5.h182
-rwxr-xr-xContrib/VPatch/Source/Plugin/vpatchdll.c356
-rwxr-xr-xContrib/VPatch/VPatchLib.nsh44
-rwxr-xr-xContrib/VPatch/example.nsi122
-rwxr-xr-xContrib/nsDialogs/InstallOptions.nsi94
-rwxr-xr-xContrib/nsDialogs/Readme.html988
-rwxr-xr-xContrib/nsDialogs/SConscript82
-rwxr-xr-xContrib/nsDialogs/browse.c304
-rwxr-xr-xContrib/nsDialogs/defs.h134
-rwxr-xr-xContrib/nsDialogs/dialog.rc182
-rwxr-xr-xContrib/nsDialogs/example.nsi152
-rwxr-xr-xContrib/nsDialogs/input.c160
-rwxr-xr-xContrib/nsDialogs/input.h16
-rwxr-xr-xContrib/nsDialogs/nsDialogs.c892
-rwxr-xr-xContrib/nsDialogs/nsDialogs.nsh1004
-rwxr-xr-xContrib/nsDialogs/nsis.c190
-rwxr-xr-xContrib/nsDialogs/nsis.h110
-rwxr-xr-xContrib/nsDialogs/rtl.c190
-rwxr-xr-xContrib/nsDialogs/rtl.h18
-rwxr-xr-xContrib/nsDialogs/welcome.nsi640
-rwxr-xr-xContrib/nsExec/SConscript48
-rwxr-xr-xContrib/nsExec/nsExec.txt96
-rwxr-xr-xContrib/nsExec/nsexec.c906
-rwxr-xr-xContrib/nsExec/test.nsi60
-rwxr-xr-xContrib/zip2exe/Base.nsh172
-rwxr-xr-xContrib/zip2exe/Classic.nsh6
-rwxr-xr-xContrib/zip2exe/Modern.nsh14
-rwxr-xr-xContrib/zip2exe/SConscript82
-rwxr-xr-xContrib/zip2exe/main.cpp1568
-rwxr-xr-xContrib/zip2exe/res.rc300
-rwxr-xr-xContrib/zip2exe/resource.h90
-rwxr-xr-xContrib/zip2exe/zip2exe.xml34
-rwxr-xr-xContrib/zip2exe/zlib/adler32.c298
-rwxr-xr-xContrib/zip2exe/zlib/crc32.c846
-rwxr-xr-xContrib/zip2exe/zlib/crc32.h882
-rwxr-xr-xContrib/zip2exe/zlib/crypt.h264
-rwxr-xr-xContrib/zip2exe/zlib/inffast.c636
-rwxr-xr-xContrib/zip2exe/zlib/inffast.h22
-rwxr-xr-xContrib/zip2exe/zlib/inffixed.h188
-rwxr-xr-xContrib/zip2exe/zlib/inflate.c2736
-rwxr-xr-xContrib/zip2exe/zlib/inflate.h230
-rwxr-xr-xContrib/zip2exe/zlib/inftrees.c658
-rwxr-xr-xContrib/zip2exe/zlib/inftrees.h110
-rwxr-xr-xContrib/zip2exe/zlib/ioapi.c354
-rwxr-xr-xContrib/zip2exe/zlib/ioapi.h150
-rwxr-xr-xContrib/zip2exe/zlib/unzip.c3196
-rwxr-xr-xContrib/zip2exe/zlib/unzip.h708
-rwxr-xr-xContrib/zip2exe/zlib/zconf.h664
-rwxr-xr-xContrib/zip2exe/zlib/zlib.h2714
-rwxr-xr-xContrib/zip2exe/zlib/zutil.c636
-rwxr-xr-xContrib/zip2exe/zlib/zutil.h538
-rwxr-xr-xDocs/src/SConscript244
-rwxr-xr-xDocs/src/attributes.but864
-rwxr-xr-xDocs/src/basic.but298
-rwxr-xr-xDocs/src/bin/halibut/LICENSE46
-rwxr-xr-xDocs/src/bin/halibut/SConscript52
-rwxr-xr-xDocs/src/bin/halibut/biblio.c244
-rwxr-xr-xDocs/src/bin/halibut/bk_xhtml.c3924
-rwxr-xr-xDocs/src/bin/halibut/contents.c492
-rwxr-xr-xDocs/src/bin/halibut/error.c450
-rwxr-xr-xDocs/src/bin/halibut/halibut.h816
-rwxr-xr-xDocs/src/bin/halibut/help.c46
-rwxr-xr-xDocs/src/bin/halibut/index.c526
-rwxr-xr-xDocs/src/bin/halibut/input.c2976
-rwxr-xr-xDocs/src/bin/halibut/keywords.c342
-rwxr-xr-xDocs/src/bin/halibut/licence.c34
-rwxr-xr-xDocs/src/bin/halibut/main.c642
-rwxr-xr-xDocs/src/bin/halibut/malloc.c326
-rwxr-xr-xDocs/src/bin/halibut/misc.c714
-rwxr-xr-xDocs/src/bin/halibut/style.c14
-rwxr-xr-xDocs/src/bin/halibut/tree234.c4920
-rwxr-xr-xDocs/src/bin/halibut/tree234.h404
-rwxr-xr-xDocs/src/bin/halibut/ustring.c402
-rwxr-xr-xDocs/src/bin/halibut/version.c26
-rwxr-xr-xDocs/src/build.but194
-rwxr-xr-xDocs/src/callback.but414
-rwxr-xr-xDocs/src/chm_config.but48
-rwxr-xr-xDocs/src/chmlink.js228
-rwxr-xr-xDocs/src/compiler.but650
-rwxr-xr-xDocs/src/compilerflags.but290
-rwxr-xr-xDocs/src/config.but36
-rwxr-xr-xDocs/src/credits.but442
-rwxr-xr-xDocs/src/defines.but266
-rwxr-xr-xDocs/src/file.but224
-rwxr-xr-xDocs/src/flowcontrol.but620
-rwxr-xr-xDocs/src/functions.but48
-rwxr-xr-xDocs/src/generalpurpose.but312
-rwxr-xr-xDocs/src/headers.but5210
-rwxr-xr-xDocs/src/history.but4826
-rwxr-xr-xDocs/src/int.but100
-rwxr-xr-xDocs/src/intro.but298
-rwxr-xr-xDocs/src/jumps.but56
-rwxr-xr-xDocs/src/labels.but14
-rwxr-xr-xDocs/src/langs.but170
-rwxr-xr-xDocs/src/library.but604
-rwxr-xr-xDocs/src/license.but274
-rwxr-xr-xDocs/src/log.but32
-rwxr-xr-xDocs/src/misc.but226
-rwxr-xr-xDocs/src/modernui.but12
-rwxr-xr-xDocs/src/nsis.hhp42
-rwxr-xr-xDocs/src/pages.but340
-rwxr-xr-xDocs/src/plugin.but54
-rwxr-xr-xDocs/src/reboot.but36
-rwxr-xr-xDocs/src/registry.but374
-rwxr-xr-xDocs/src/script.but194
-rwxr-xr-xDocs/src/sec.but368
-rwxr-xr-xDocs/src/sections.but212
-rwxr-xr-xDocs/src/silent.but132
-rwxr-xr-xDocs/src/stack.but80
-rwxr-xr-xDocs/src/string.but44
-rwxr-xr-xDocs/src/tutorial.but562
-rwxr-xr-xDocs/src/ui.but316
-rwxr-xr-xDocs/src/uninstall.but18
-rwxr-xr-xDocs/src/usage.but210
-rwxr-xr-xDocs/src/usection.but28
-rwxr-xr-xDocs/src/usefulfunc.but832
-rwxr-xr-xDocs/src/usefulinfos.but798
-rwxr-xr-xDocs/src/var.but524
-rwxr-xr-xDocs/style.css88
-rwxr-xr-xExamples/FileFunc.ini182
-rwxr-xr-xExamples/FileFunc.nsi1502
-rwxr-xr-xExamples/FileFuncTest.nsi1122
-rwxr-xr-xExamples/Library.nsi230
-rwxr-xr-xExamples/LogicLib.nsi1192
-rwxr-xr-xExamples/Memento.nsi154
-rwxr-xr-xExamples/Modern UI/Basic.nsi168
-rwxr-xr-xExamples/Modern UI/HeaderBitmap.nsi172
-rwxr-xr-xExamples/Modern UI/InstallOptions.nsi296
-rwxr-xr-xExamples/Modern UI/MultiLanguage.nsi346
-rwxr-xr-xExamples/Modern UI/StartMenu.nsi252
-rwxr-xr-xExamples/Modern UI/WelcomeFinish.nsi178
-rwxr-xr-xExamples/Modern UI/ioA.ini36
-rwxr-xr-xExamples/Modern UI/ioB.ini18
-rwxr-xr-xExamples/Modern UI/ioC.ini36
-rwxr-xr-xExamples/SConscript94
-rwxr-xr-xExamples/StrFunc.nsi1268
-rwxr-xr-xExamples/TextFunc.ini260
-rwxr-xr-xExamples/TextFunc.nsi1684
-rwxr-xr-xExamples/TextFuncTest.nsi886
-rwxr-xr-xExamples/UserVars.nsi134
-rwxr-xr-xExamples/VersionInfo.nsi58
-rwxr-xr-xExamples/WordFunc.ini214
-rwxr-xr-xExamples/WordFunc.nsi1086
-rwxr-xr-xExamples/WordFuncTest.nsi1290
-rwxr-xr-xExamples/bigtest.nsi612
-rwxr-xr-xExamples/example1.nsi74
-rwxr-xr-xExamples/example2.nsi178
-rwxr-xr-xExamples/gfx.nsi240
-rwxr-xr-xExamples/languages.nsi352
-rwxr-xr-xExamples/makensis.ini40
-rwxr-xr-xExamples/makensis.nsi2228
-rwxr-xr-xExamples/one-section.nsi154
-rwxr-xr-xExamples/primes.nsi136
-rwxr-xr-xExamples/rtest.nsi180
-rwxr-xr-xExamples/silent.nsi122
-rwxr-xr-xExamples/viewhtml.nsi98
-rwxr-xr-xExamples/waplugin.nsi402
-rwxr-xr-xINSTALL148
-rwxr-xr-xInclude/Colors.nsh148
-rwxr-xr-xInclude/FileFunc.nsh4870
-rwxr-xr-xInclude/LangFile.nsh172
-rwxr-xr-xInclude/Library.nsh1702
-rwxr-xr-xInclude/LogicLib.nsh1550
-rwxr-xr-xInclude/Memento.nsh1048
-rwxr-xr-xInclude/SConscript46
-rwxr-xr-xInclude/Sections.nsh544
-rwxr-xr-xInclude/StrFunc.nsh3564
-rwxr-xr-xInclude/StrFunc.txt1412
-rwxr-xr-xInclude/TextFunc.nsh3008
-rwxr-xr-xInclude/UpgradeDLL.nsh406
-rwxr-xr-xInclude/WinMessages.nsh1162
-rwxr-xr-xInclude/WinVer.nsh302
-rwxr-xr-xInclude/WordFunc.nsh4410
-rwxr-xr-xInclude/x64.nsh108
-rwxr-xr-xMenu/compiler.html58
-rwxr-xr-xMenu/docs.html66
-rwxr-xr-xMenu/images/header.gifbin12190 -> 12220 bytes
-rwxr-xr-xMenu/index.html91
-rwxr-xr-xMenu/intro.html66
-rwxr-xr-xMenu/notinstalled.html52
-rwxr-xr-xMenu/update.html64
-rwxr-xr-xMenu/websites.html64
-rwxr-xr-xSCons/Config/default86
-rwxr-xr-xSCons/Config/gnu576
-rwxr-xr-xSCons/Config/hpc++230
-rwxr-xr-xSCons/Config/linker_script420
-rwxr-xr-xSCons/Config/memcpy.c22
-rwxr-xr-xSCons/Config/memset.c20
-rwxr-xr-xSCons/Config/ms424
-rwxr-xr-xSCons/Tools/crossmingw.py354
-rwxr-xr-xSCons/Tools/mstoolkit.py690
-rwxr-xr-xSCons/config.py1018
-rwxr-xr-xSCons/utils.py148
-rwxr-xr-xSConstruct1458
-rwxr-xr-xScripts/RegRestore.nsi15
-rwxr-xr-xScripts/release.py810
-rwxr-xr-xSource/7zip/7zGuids.cpp62
-rwxr-xr-xSource/7zip/7zip/Common/InBuffer.cpp190
-rwxr-xr-xSource/7zip/7zip/Common/InBuffer.h182
-rwxr-xr-xSource/7zip/7zip/Common/OutBuffer.cpp262
-rwxr-xr-xSource/7zip/7zip/Common/OutBuffer.h158
-rwxr-xr-xSource/7zip/7zip/Common/StdAfx.h16
-rwxr-xr-xSource/7zip/7zip/Common/StreamUtils.cpp118
-rwxr-xr-xSource/7zip/7zip/Common/StreamUtils.h52
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree.h138
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree2.h54
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree3.h62
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h62
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h62
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree4.h66
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h78
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h238
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h196
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h1092
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/IMatchFinder.h94
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/LZInWindow.cpp240
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/LZInWindow.h204
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/LZOutWindow.cpp64
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/LZOutWindow.h142
-rwxr-xr-xSource/7zip/7zip/Compress/LZ/StdAfx.h12
-rwxr-xr-xSource/7zip/7zip/Compress/LZMA/LZMA.h194
-rwxr-xr-xSource/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp3160
-rwxr-xr-xSource/7zip/7zip/Compress/LZMA/LZMAEncoder.h852
-rwxr-xr-xSource/7zip/7zip/Compress/LZMA/StdAfx.h16
-rwxr-xr-xSource/7zip/7zip/Compress/RangeCoder/RangeCoder.h440
-rwxr-xr-xSource/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp190
-rwxr-xr-xSource/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h270
-rwxr-xr-xSource/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h352
-rwxr-xr-xSource/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h92
-rwxr-xr-xSource/7zip/7zip/Compress/RangeCoder/StdAfx.h12
-rwxr-xr-xSource/7zip/7zip/ICoder.h356
-rwxr-xr-xSource/7zip/7zip/IStream.h154
-rwxr-xr-xSource/7zip/Common/Alloc.cpp266
-rwxr-xr-xSource/7zip/Common/Alloc.h88
-rwxr-xr-xSource/7zip/Common/CRC.cpp152
-rwxr-xr-xSource/7zip/Common/CRC.h102
-rwxr-xr-xSource/7zip/Common/Defs.h70
-rwxr-xr-xSource/7zip/Common/MyCom.h436
-rwxr-xr-xSource/7zip/Common/MyGuidDef.h138
-rwxr-xr-xSource/7zip/Common/MyUnknown.h78
-rwxr-xr-xSource/7zip/Common/MyWindows.h440
-rwxr-xr-xSource/7zip/Common/StdAfx.h46
-rwxr-xr-xSource/7zip/Common/Types.h144
-rwxr-xr-xSource/7zip/LZMADecode.c1092
-rwxr-xr-xSource/7zip/LZMADecode.h276
-rwxr-xr-xSource/7zip/sdk.diff334
-rwxr-xr-xSource/DialogTemplate.cpp1308
-rwxr-xr-xSource/DialogTemplate.h330
-rwxr-xr-xSource/Platform.h1750
-rwxr-xr-xSource/Plugins.cpp414
-rwxr-xr-xSource/Plugins.h86
-rwxr-xr-xSource/ResourceEditor.cpp2092
-rwxr-xr-xSource/ResourceEditor.h482
-rwxr-xr-xSource/ResourceVersionInfo.cpp636
-rwxr-xr-xSource/ResourceVersionInfo.h134
-rwxr-xr-xSource/SConscript187
-rwxr-xr-xSource/ShConstants.cpp170
-rwxr-xr-xSource/ShConstants.h94
-rwxr-xr-xSource/Tests/DialogTemplate.cpp94
-rwxr-xr-xSource/Tests/ResourceEditor.cpp1664
-rwxr-xr-xSource/Tests/SConscript322
-rwxr-xr-xSource/Tests/compression.cpp308
-rwxr-xr-xSource/Tests/decompress.cpp124
-rwxr-xr-xSource/Tests/decompress.h132
-rwxr-xr-xSource/Tests/endian.cpp112
-rwxr-xr-xSource/Tests/memcpy.c22
-rwxr-xr-xSource/Tests/mmap.cpp148
-rwxr-xr-xSource/Tests/preprocessor.nsi448
-rwxr-xr-xSource/Tests/root.txt12
-rwxr-xr-xSource/Tests/specmatch.cpp90
-rwxr-xr-xSource/Tests/textrunner.cpp44
-rwxr-xr-xSource/Tests/winchar.cpp258
-rwxr-xr-xSource/afxres.h42
-rwxr-xr-xSource/boost/checked_delete.hpp142
-rwxr-xr-xSource/boost/detail/workaround.hpp148
-rwxr-xr-xSource/boost/scoped_array.hpp244
-rwxr-xr-xSource/boost/scoped_ptr.hpp274
-rwxr-xr-xSource/build.cpp6962
-rwxr-xr-xSource/build.h833
-rwxr-xr-xSource/bzip2/blocksort.c2218
-rwxr-xr-xSource/bzip2/bzlib.c1242
-rwxr-xr-xSource/bzip2/bzlib.h888
-rwxr-xr-xSource/bzip2/compress.c1338
-rwxr-xr-xSource/bzip2/decompress.c1068
-rwxr-xr-xSource/bzip2/huffman.c488
-rwxr-xr-xSource/cbzip2.h198
-rwxr-xr-xSource/clzma.cpp928
-rwxr-xr-xSource/clzma.h206
-rwxr-xr-xSource/compressor.h92
-rwxr-xr-xSource/crc32.c94
-rwxr-xr-xSource/crc32.h58
-rwxr-xr-xSource/czlib.h182
-rwxr-xr-xSource/dirreader.cpp488
-rwxr-xr-xSource/dirreader.h112
-rwxr-xr-xSource/exehead/Main.c696
-rwxr-xr-xSource/exehead/SConscript202
-rwxr-xr-xSource/exehead/Ui.c3384
-rwxr-xr-xSource/exehead/afxres.h42
-rwxr-xr-xSource/exehead/bgbg.c198
-rwxr-xr-xSource/exehead/components.c328
-rwxr-xr-xSource/exehead/components.h56
-rwxr-xr-xSource/exehead/config.h322
-rwxr-xr-xSource/exehead/exec.c3252
-rwxr-xr-xSource/exehead/exec.h52
-rwxr-xr-xSource/exehead/fileform.c1140
-rwxr-xr-xSource/exehead/fileform.h1106
-rwxr-xr-xSource/exehead/lang.h170
-rwxr-xr-xSource/exehead/resource.h112
-rwxr-xr-xSource/exehead/resource.rc564
-rwxr-xr-xSource/exehead/state.h84
-rwxr-xr-xSource/exehead/ui.h120
-rwxr-xr-xSource/exehead/util.c1920
-rwxr-xr-xSource/exehead/util.h244
-rwxr-xr-xSource/fileform.cpp388
-rwxr-xr-xSource/fileform.h126
-rwxr-xr-xSource/growbuf.cpp176
-rwxr-xr-xSource/growbuf.h124
-rwxr-xr-xSource/icon.cpp379
-rwxr-xr-xSource/icon.h76
-rwxr-xr-xSource/lang.cpp2216
-rwxr-xr-xSource/lang.h398
-rwxr-xr-xSource/lineparse.cpp472
-rwxr-xr-xSource/lineparse.h94
-rwxr-xr-xSource/makenssi.cpp1108
-rwxr-xr-xSource/manifest.cpp134
-rwxr-xr-xSource/manifest.h82
-rwxr-xr-xSource/mmap.cpp1024
-rwxr-xr-xSource/mmap.h288
-rwxr-xr-xSource/script.cpp12347
-rwxr-xr-xSource/strlist.cpp408
-rwxr-xr-xSource/strlist.h516
-rwxr-xr-xSource/tokens.cpp794
-rwxr-xr-xSource/tokens.h548
-rwxr-xr-xSource/uservars.h206
-rwxr-xr-xSource/util.cpp1927
-rwxr-xr-xSource/util.h302
-rwxr-xr-xSource/winchar.cpp252
-rwxr-xr-xSource/winchar.h52
-rwxr-xr-xSource/writer.cpp178
-rwxr-xr-xSource/writer.h174
-rwxr-xr-xSource/zlib/DEFLATE.H502
-rwxr-xr-xSource/zlib/INFBLOCK.C1420
-rwxr-xr-xSource/zlib/ZCONF.H142
-rwxr-xr-xSource/zlib/ZLIB.H594
-rwxr-xr-xSource/zlib/ZUTIL.H170
-rwxr-xr-xSource/zlib/deflate.c1714
-rwxr-xr-xSource/zlib/trees.c1788
-rwxr-xr-xTODO.txt40
-rwxr-xr-xnsisconf.nsh122
678 files changed, 178487 insertions, 174452 deletions
diff --git a/COPYING b/COPYING
index 39aed63..fe45c9b 100755
--- a/COPYING
+++ b/COPYING
@@ -1,144 +1,144 @@
-COPYRIGHT
----------
-
-Copyright (C) 1995-2007 Contributors
-
-More detailed copyright information can be found in the individual source code files.
-
-APPLICABLE LICENSES
--------------------
-
-* All NSIS source code, plug-ins, documentation, examples, header files and graphics, with the exception of the compression modules and where otherwise noted, are licensed under the zlib/libpng license.
-
-* The zlib compression module for NSIS is licensed under the zlib/libpng license.
-
-* The bzip2 compression module for NSIS is licensed under the bzip2 license.
-
-* The LZMA compression module for NSIS is licensed under the Common Public License version 1.0.
-
-ZLIB/LIBPNG LICENSE
--------------------
-
-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.
-
-BZIP2 LICENSE
--------------
-
-This program, "bzip2" and associated library "libbzip2", are copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Julian Seward, Cambridge, UK.
-
-jseward@acm.org
-
-COMMON PUBLIC LICENSE VERSION 1.0
----------------------------------
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-
- iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
-
-SPECIAL EXCEPTION FOR LZMA COMPRESSION MODULE
----------------------------------------------
-
-Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for NSIS, expressly permit you to statically or dynamically link your code (or bind by name) to the files from the LZMA compression module for NSIS without subjecting your linked code to the terms of the Common Public license version 1.0. Any modifications or additions to files from the LZMA compression module for NSIS, however, are subject to the terms of the Common Public License version 1.0.
+COPYRIGHT
+---------
+
+Copyright (C) 1995-2007 Contributors
+
+More detailed copyright information can be found in the individual source code files.
+
+APPLICABLE LICENSES
+-------------------
+
+* All NSIS source code, plug-ins, documentation, examples, header files and graphics, with the exception of the compression modules and where otherwise noted, are licensed under the zlib/libpng license.
+
+* The zlib compression module for NSIS is licensed under the zlib/libpng license.
+
+* The bzip2 compression module for NSIS is licensed under the bzip2 license.
+
+* The LZMA compression module for NSIS is licensed under the Common Public License version 1.0.
+
+ZLIB/LIBPNG LICENSE
+-------------------
+
+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.
+
+BZIP2 LICENSE
+-------------
+
+This program, "bzip2" and associated library "libbzip2", are copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Julian Seward, Cambridge, UK.
+
+jseward@acm.org
+
+COMMON PUBLIC LICENSE VERSION 1.0
+---------------------------------
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+ b) in the case of each subsequent Contributor:
+
+ i) changes to the Program, and
+
+ ii) additions to the Program;
+
+ where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+ a) it complies with the terms and conditions of this Agreement; and
+
+ b) its license agreement:
+
+ i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+ iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+ iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+ a) it must be made available under this Agreement; and
+
+ b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+SPECIAL EXCEPTION FOR LZMA COMPRESSION MODULE
+---------------------------------------------
+
+Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for NSIS, expressly permit you to statically or dynamically link your code (or bind by name) to the files from the LZMA compression module for NSIS without subjecting your linked code to the terms of the Common Public license version 1.0. Any modifications or additions to files from the LZMA compression module for NSIS, however, are subject to the terms of the Common Public License version 1.0.
diff --git a/ChangeLog b/ChangeLog
index 853e563..aae7f0f 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,26251 +1,29839 @@
-2007-09-29 kichik
+2007-11-09 16:04 kichik
- * Menu/images/header.gif: 2.31
+ * /NSIS/tags/v232: Tagging for release 2.32
-2007-09-29 kichik
+2007-11-09 15:57 kichik
- * Docs/src/history.but: 2.31
+ * /NSIS/trunk/Menu/images/header.gif: 2.32
-2007-09-29 kichik
+2007-11-09 15:49 kichik
- * SCons/Config/gnu: fixed bug #1800834 - CVS FTBFS with new mingw32
+ * /NSIS/trunk/Docs/src/history.but: sort
-2007-09-28 kichik
+2007-11-09 15:30 kichik
- * Contrib/Modern UI 2/Pages/Finish.nsh: unload nsDialogs after it's
- done
+ * /NSIS/trunk/Source/exehead/fileform.c: declare real
+ calc_percent()'s code just once
-2007-09-28 kichik
+2007-11-09 15:22 kichik
- * Contrib/Modern UI 2/Pages/Finish.nsh: display reboot text
+ * /NSIS/trunk/Docs/src/history.but: 2.32
-2007-09-28 kichik
+2007-10-27 10:27 kichik
- * Contrib/Modern UI 2/Pages/Finish.nsh: - use BM_GETCHECK instead
- of BM_SETCHECK to get reboot now's state - compare check state as a
- number (rebooting should work now)
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Finish.nsh: use just link
+ control
-2007-09-28 kichik
+2007-10-27 10:24 kichik
- * Include/WinMessages.nsh: convert BST_* to numbers without prefix
- for easier comparison
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.c: handle link drawing
+ hand cursor and enter key handling still missing - require
+ subclassing (maybe just create a new link class and have
+ nsDialogs.nsh use that?)
-2007-09-28 kichik
+2007-10-27 10:09 kichik
- * Contrib/Modern UI 2/Localization.nsh: fixed
- mui.LangDLL.RegistryLanguage variable warning when
- MUI_LANGDLL_REGISTRY_ROOT and friends weren't used
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: added function
+ prefixes where missing
-2007-09-28 kichik
+2007-10-27 09:57 kichik
- * Contrib/Modern UI 2/Interface.nsh: removed stray Goto
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: use NSD_GetText
-2007-09-28 kichik
+2007-10-27 09:56 kichik
- * Contrib/Modern UI/System.nsh: tabs to spaces
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: tabs to spaces
-2007-09-28 kichik
+2007-10-27 09:54 kichik
- * Contrib/Modern UI/System.nsh: add Nsis2Io only when it's really
- needed to avoid unused function warnings
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: link support
-2007-09-28 kichik
+2007-10-26 19:31 joostverburg
- * Contrib/InstallOptions/InstallOptions.nsh: allow multiple
- inclusions
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Finish.nsh,
+ /NSIS/trunk/Contrib/Modern UI 2/Pages/Welcome.nsh: fix 3-line
+ title on welcome/finish page
-2007-09-28 kichik
+2007-10-25 18:03 kichik
- * Contrib/InstallOptions/InstallOptions.nsh: fixed bug #1786899 -
- MUI_PAGE_WELCOME error when use SimpChinese Lang
+ * /NSIS/trunk/Menu/index.html: fixed bug #1819946 - NSIS Menu item
+ "Modern UI Language Files"
-2007-09-27 kichik
+2007-10-22 23:46 kichik
- * Docs/src/credits.but: credits for romanian and persian
+ * /NSIS/trunk/Contrib/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nsh: fixed
+ bug #1817289 - MUI Language File "\r\n\r\n"
-2007-09-27 kichik
+2007-10-21 01:46 pabs3
- * Contrib/Language files/Farsi.nlf: applied patch #1776386 -
- Persian translation updated
+ * /NSIS/trunk/Scripts/release.py, /NSIS/trunk/Scripts/svn2cl.xsl:
+ Remove svn2cl.xsl from SVN and grab it from the Subversion SVN
+ repository when it is not available.
-2007-09-25 kichik
+2007-10-20 20:48 kichik
- * Contrib/Language files/Romanian.nlf, Contrib/Language
- files/Romanian.nsh: applied patch #1783853 - Improved Romanian
- translation
+ * /NSIS/trunk/Scripts/svn2cl.xsl: restore original version
-2007-09-21 kichik
+2007-10-20 20:48 kichik
- * Source/build.cpp, Source/script.cpp, Source/exehead/Ui.c: size
- optimization - better values for status_update
+ * /NSIS/trunk/Scripts/release.py: set strip-prefix from script
-2007-09-20 joostverburg
+2007-10-14 23:02 kichik
- * Contrib/Modern UI 2/Interface.nsh: fix NOSTRETCH option for
- header image
+ * /NSIS/trunk/Docs/src/ui.but: fixed bug #1811876 - broken
+ ShowWindow link to MSDN
-2007-09-20 joostverburg
+2007-10-14 21:25 kichik
- * Contrib/Modern UI 2/Pages/InstallFiles.nsh, Contrib/Modern UI
- 2/Pages/UninstallConfirm.nsh: fix control handles
+ * /NSIS/trunk/SCons/Config/gnu: check compiler flag `-m32' before
+ linker flag as some gcc versions crash when linking non 32-bit
+ objects with this flag
-2007-09-19 kichik
+2007-10-07 22:51 kichik
- * Source/build.cpp, Source/script.cpp, Source/exehead/Ui.c,
- Source/exehead/exec.h: fixed plug-in system's SetDetailsPrint usage
+ * /NSIS/trunk/Scripts/release.py, /NSIS/trunk/Scripts/svn2cl.xsl:
+ better ChangeLog with some MSXML fun (thanks orip!)
-2007-09-18 kichik
+2007-10-06 09:05 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/utils.cpp:
- fixed bug #1796053 - makensisw command-line parsing error due to
- GlobalAlloc/GlobalFree mismatch
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: cvs is now svn
-2007-09-14 kichik
+2007-10-06 09:05 kichik
- * Contrib/nsDialogs/nsDialogs.nsh: BST_* moved to WinMessages.nsh
+ * /NSIS/trunk/Contrib/Makensisw/update.cpp: removed reference to
+ cvs
-2007-09-11 joostverburg
+2007-10-06 09:03 kichik
- * Contrib/Language files/Afrikaans.nsh, Contrib/Language
- files/Albanian.nsh, Contrib/Language files/Arabic.nsh,
- Contrib/Language files/Basque.nsh, Contrib/Language
- files/Belarusian.nsh, Contrib/Language files/Bosnian.nsh,
- Contrib/Language files/Breton.nsh, Contrib/Language
- files/Bulgarian.nsh, Contrib/Language files/Catalan.nsh,
- Contrib/Language files/Croatian.nsh, Contrib/Language
- files/Czech.nsh, Contrib/Language files/Danish.nsh,
- Contrib/Language files/Dutch.nsh, Contrib/Language
- files/English.nsh, Contrib/Language files/Estonian.nsh,
- Contrib/Language files/Farsi.nsh, Contrib/Language
- files/Finnish.nsh, Contrib/Language files/French.nsh,
- Contrib/Language files/Galician.nsh, Contrib/Language
- files/German.nsh, Contrib/Language files/Greek.nsh,
- Contrib/Language files/Hebrew.nsh, Contrib/Language
- files/Hungarian.nsh, Contrib/Language files/Icelandic.nsh,
- Contrib/Language files/Indonesian.nsh, Contrib/Language
- files/Irish.nsh, Contrib/Language files/Italian.nsh,
- Contrib/Language files/Japanese.nsh, Contrib/Language
- files/Korean.nsh, Contrib/Language files/Kurdish.nsh,
- Contrib/Language files/Latvian.nsh, Contrib/Language
- files/Lithuanian.nsh, Contrib/Language files/Luxembourgish.nsh,
- Contrib/Language files/Macedonian.nsh, Contrib/Language
- files/Malay.nsh, Contrib/Language files/Mongolian.nsh,
- Contrib/Language files/Norwegian.nsh, Contrib/Language
- files/NorwegianNynorsk.nsh, Contrib/Language files/Polish.nsh,
- Contrib/Language files/Portuguese.nsh, Contrib/Language
- files/PortugueseBR.nsh, Contrib/Language files/Romanian.nsh,
- Contrib/Language files/Russian.nsh, Contrib/Language
- files/Serbian.nsh, Contrib/Language files/SerbianLatin.nsh,
- Contrib/Language files/SimpChinese.nsh, Contrib/Language
- files/Slovak.nsh, Contrib/Language files/Slovenian.nsh,
- Contrib/Language files/Spanish.nsh, Contrib/Language
- files/SpanishInternational.nsh, Contrib/Language files/Swedish.nsh,
- Contrib/Language files/Thai.nsh, Contrib/Language
- files/TradChinese.nsh, Contrib/Language files/Turkish.nsh,
- Contrib/Language files/Ukrainian.nsh, Contrib/Language
- files/Uzbek.nsh, Contrib/Language files/Welsh.nsh: fix texts for
- uninstaller components page
+ * /NSIS/trunk/Docs/src/build.but: use viewvc link
-2007-09-11 kichik
+2007-10-06 08:59 kichik
- * Include/WinMessages.nsh: added BST_* for bug #1792422
+ * /NSIS/trunk/Docs/src/build.but: cvs is now svn
-2007-09-09 joostverburg
+2007-10-05 18:42 kichik
- * Contrib/Language files/Afrikaans.nsh, Contrib/Language
- files/Albanian.nsh, Contrib/Language files/Arabic.nsh,
- Contrib/Language files/Basque.nsh, Contrib/Language
- files/Belarusian.nsh, Contrib/Language files/Bosnian.nsh,
- Contrib/Language files/Breton.nsh, Contrib/Language
- files/Bulgarian.nsh, Contrib/Language files/Catalan.nsh,
- Contrib/Language files/Croatian.nsh, Contrib/Language
- files/Czech.nsh, Contrib/Language files/Danish.nsh,
- Contrib/Language files/Dutch.nsh, Contrib/Language
- files/English.nsh, Contrib/Language files/Estonian.nsh,
- Contrib/Language files/Farsi.nsh, Contrib/Language
- files/Finnish.nsh, Contrib/Language files/French.nsh,
- Contrib/Language files/Galician.nsh, Contrib/Language
- files/German.nsh, Contrib/Language files/Greek.nsh,
- Contrib/Language files/Hebrew.nsh, Contrib/Language
- files/Hungarian.nsh, Contrib/Language files/Icelandic.nsh,
- Contrib/Language files/Indonesian.nsh, Contrib/Language
- files/Irish.nsh, Contrib/Language files/Italian.nsh,
- Contrib/Language files/Japanese.nsh, Contrib/Language
- files/Korean.nsh, Contrib/Language files/Kurdish.nsh,
- Contrib/Language files/Latvian.nsh, Contrib/Language
- files/Lithuanian.nsh, Contrib/Language files/Luxembourgish.nsh,
- Contrib/Language files/Macedonian.nsh, Contrib/Language
- files/Malay.nsh, Contrib/Language files/Mongolian.nsh,
- Contrib/Language files/Norwegian.nsh, Contrib/Language
- files/NorwegianNynorsk.nsh, Contrib/Language files/Polish.nsh,
- Contrib/Language files/Portuguese.nsh, Contrib/Language
- files/PortugueseBR.nsh, Contrib/Language files/Romanian.nsh,
- Contrib/Language files/Russian.nsh, Contrib/Language
- files/Serbian.nsh, Contrib/Language files/SerbianLatin.nsh,
- Contrib/Language files/SimpChinese.nsh, Contrib/Language
- files/Slovak.nsh, Contrib/Language files/Slovenian.nsh,
- Contrib/Language files/Spanish.nsh, Contrib/Language
- files/SpanishInternational.nsh, Contrib/Language files/Swedish.nsh,
- Contrib/Language files/Thai.nsh, Contrib/Language
- files/TradChinese.nsh, Contrib/Language files/Turkish.nsh,
- Contrib/Language files/Ukrainian.nsh, Contrib/Language
- files/Uzbek.nsh, Contrib/Language files/Welsh.nsh: move finish
- button text to right category
+ * /NSIS/trunk/Scripts/release.py: release from svn
+ no svn2cl yet, just the normal svn log which seems good enough
-2007-09-09 kichik
+2007-10-05 17:44 kichik
- * Source/script.cpp: missing null terminator
+ * /NSIS/trunk/Scripts/RegRestore.nsi: useful after release.py
-2007-09-08 kichik
+2007-10-05 09:01 kichik
- * Docs/src/library.but, Include/Library.nsh: use SetRegView
- lastused to avoid resetting the user's setting
+ * /NSIS/trunk/Source/script.cpp: only accept two parameters to Var
+ if the first one is /GLOBAL
-2007-09-08 kichik
+2007-10-04 19:44 joostverburg
- * Docs/src/misc.but, Source/script.cpp, Source/tokens.cpp: added
- SetRegView lastused
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: use macros
+ from InstallOptions.nsh
-2007-09-08 kichik
+2007-10-03 22:08 kichik
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/ui.h, Source/script.cpp: move SetDetailsPrint flag
- to g_exec_flag and added a lastused capability to EW_SETFLAG
+ * /NSIS/trunk/Contrib/UIs/default.rc,
+ /NSIS/trunk/Contrib/UIs/modern.rc,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: verification dialog is
+ now never used hidden, so it can show itself using WS_VISIBLE
-2007-09-07 kichik
+2007-10-03 22:07 kichik
- * Contrib/Language files/Korean.nsh: fixed line breaks (thanks
- koder)
+ * /NSIS/trunk/Source/exehead/fileform.c: fixed a bug that where
+ __ensuredata processed window messages using MessageLoop.
+ this could cause synchronization issues when data is decompressed
+ in a page's leave function and the user clicks the next button
+ twice really fast or on a slow computer.
+ WM_COMMAND would be sent twice and so DialogProc could execute
+ the leave function while the installation thread is running
+ causing interpreter havoc.
+
+ for more details:
+ http://forums.winamp.com/showthread.php?s=&threadid=274333
+
+ as always, a few size optimizations were thrown in the loop and
+ the fix actually makes the code smaller
-2007-09-07 kichik
+2007-10-03 18:30 kichik
- * Docs/src/callback.but: added un.onSelChange
+ * /NSIS/trunk/Docs/src/attributes.but: no more limits on Icon and
+ UninstallIcon
-2007-09-01 joostverburg
+2007-10-03 18:27 kichik
- * Contrib/Modern UI 2/Localization.nsh, Contrib/Modern UI
- 2/Pages/StartMenu.nsh: don't declare variables for registry values
- if they won't be used
+ * /NSIS/trunk/Source/icon.cpp: more error handling and endianity
+ fixes
-2007-08-27 joostverburg
+2007-10-03 18:25 kichik
- * Contrib/Modern UI 2/Localization.nsh: fixed language selection
- dialog
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/icon.cpp,
+ /NSIS/trunk/Source/icon.h: load default icon from the stub if the
+ user didn't specify a different icon
-2007-08-27 joostverburg
+2007-10-03 18:03 kichik
- * Contrib/Modern UI 2/Interface.nsh: initialize header image
+ * /NSIS/trunk/Source/icon.cpp: added newline at end of file
-2007-08-25 kichik
+2007-10-03 17:52 kichik
- * Docs/src/history.but: oops... forgot release date
+ * /NSIS/trunk/Source/icon.cpp: fixed some obvious big-endian
+ failures, but there might be more
-2007-08-25 kichik
+2007-10-03 17:37 kichik
- * Menu/images/header.gif: 2.30
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/icon.cpp, /NSIS/trunk/Source/icon.h,
+ /NSIS/trunk/Source/script.cpp: added support for mismatching
+ installer and uninstaller icons
-2007-08-25 kichik
+2007-10-03 17:04 kichik
- * Docs/src/history.but: 2.30
+ * /NSIS/trunk/Source/ResourceEditor.cpp: fixed GetResourceOffsetA's
+ return type
-2007-08-25 kichik
+2007-10-03 17:01 kichik
- * Examples/makensis.nsi: - install MUI2 - install nsDialogs readme
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: added GetResourceOffsetA/W()
-2007-08-25 kichik
+2007-10-03 13:31 kichik
- * Contrib/Modern UI 2/SConscript: distribute missing images
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/icon.cpp,
+ /NSIS/trunk/Source/icon.h, /NSIS/trunk/Source/SConscript,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: moved icon related functions to
+ icon.cpp
-2007-08-25 kichik
+2007-10-03 00:57 kichik
- * Contrib/nsDialogs/Readme.html, Contrib/nsDialogs/SConscript:
- added initial documentation
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: typo (thanks Anders)
-2007-08-25 kichik
+2007-10-02 17:19 kichik
- * Contrib/nsDialogs/nsDialogs.c: push "error" if
- nsDialogs::CreateControl fails
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nsh: updates by
+ dumper
-2007-08-25 kichik
+2007-10-02 17:08 kichik
- * Contrib/nsDialogs/nsDialogs.nsh: added ${NSD_GetText}
+ * /NSIS/trunk/Contrib/Modern UI 2/Localization.nsh: fixed
+ MUI_UNGETLANGUAGE which didn't test the right variable and didn't
+ declare it in the first place causing an error in case
+ MUI_LANGDLL_DISPLAY isn't used
-2007-08-25 kichik
+2007-09-29 20:15 kichik
- * Contrib/nsDialogs/nsDialogs.c: push "error" if nsDialogs::Create
- fails
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Components.nsh: pretty
-2007-08-25 kichik
+2007-09-29 20:12 kichik
- * Contrib/System/System.html: add a link to search all System
- examples
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Directory.nsh: fixed
+ MUI_DIRECTORYPAGE_BGCOLOR
-2007-08-25 kichik
+2007-09-29 20:12 kichik
- * Include/WinMessages.nsh: fixed bug #1771644 - LB_ERR missing in
- WinMessages added CB_ERR too
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Components.nsh: fixed
+ description and locking of tree view
-2007-08-24 kichik
+2007-09-29 11:17
- * Contrib/nsDialogs/nsDialogs.nsh: added LBS_NOTIFY for list boxes
- to enable notification
+ * /NSIS/tags/v231, /NSIS/tags/v231/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v231/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v231/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v231'.
-2007-08-23 joostverburg
+2007-09-29 11:17 kichik
- * Include/SConscript, Include/MUI2.nsh, SConstruct, Contrib/Modern
- UI 2/Readme.html, Contrib/Modern UI 2/SConscript: * Distribute MUI2
- beta * Preliminary MUI2 documentation
+ * /NSIS/trunk/Menu/images/header.gif: 2.31
-2007-08-21 joostverburg
+2007-09-29 10:48 kichik
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/Dutch.nsh: style improvements and corrections by Ton
+ * /NSIS/trunk/Docs/src/history.but: 2.31
-2007-08-18 kichik
+2007-09-29 10:13 kichik
- * Source/exehead/util.c: tabs to spaces and some other minor
- clean-ups
+ * /NSIS/trunk/SCons/Config/gnu: fixed bug #1800834 - CVS FTBFS with
+ new mingw32
-2007-08-18 joostverburg
+2007-09-28 18:47 kichik
- * Contrib/Modern UI/System.nsh: move check whether the
- MUI_INTERFACE macro is already included to the macro itself
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Finish.nsh: unload
+ nsDialogs after it's done
-2007-08-18 joostverburg
+2007-09-28 18:38 kichik
- * Source/exehead/util.c: * Use shfolder.dll for
- CSIDL_COMMON_DOCUMENTS on 95/98 if possible * Information about API
- calls for special folders
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Finish.nsh: display reboot
+ text
-2007-08-18 joostverburg
+2007-09-28 18:35 kichik
- * Contrib/Modern UI 2/Pages/Finish.nsh: use a label and a link on
- the same location to be able to display a text and get click events
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Finish.nsh: - use
+ BM_GETCHECK instead of BM_SETCHECK to get reboot now's state
+ - compare check state as a number (rebooting should work now)
-2007-08-17 kichik
+2007-09-28 18:30 kichik
- * Contrib/Modern UI/Changelog.txt: mention
- MUI_CUSTOMFUNCTION_MOUSEOVERSECTION in 1.8's log
+ * /NSIS/trunk/Include/WinMessages.nsh: convert BST_* to numbers
+ without prefix for easier comparison
-2007-08-17 kichik
+2007-09-28 18:21 kichik
- * Contrib/Language files/Valencian.nlf, Contrib/Language
- files/Valencian.nsh: no more headache
+ * /NSIS/trunk/Contrib/Modern UI 2/Localization.nsh: fixed
+ mui.LangDLL.RegistryLanguage variable warning when
+ MUI_LANGDLL_REGISTRY_ROOT and friends weren't used
-2007-08-17 kichik
+2007-09-28 18:17 kichik
- * Contrib/Language files/SConscript, Examples/Modern
- UI/MultiLanguage.nsi: Catalan returns
+ * /NSIS/trunk/Contrib/Modern UI 2/Interface.nsh: removed stray Goto
-2007-08-17 kichik
+2007-09-28 18:09 kichik
- * Contrib/nsDialogs/InstallOptions.nsi: use NSD_FUNCTION_INIFILE
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: tabs to spaces
-2007-08-17 kichik
+2007-09-28 18:05 kichik
- * Contrib/nsDialogs/nsDialogs.c, Contrib/nsDialogs/nsDialogs.nsh,
- Contrib/nsDialogs/welcome.nsi: CreateItem -> CreateControl
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: add Nsis2Io only when
+ it's really needed to avoid unused function warnings
-2007-08-17 kichik
+2007-09-28 17:39 kichik
- * Source/exehead/util.c: better solution - don't old functions and
- not shfolder but still try to get all user's version from the os
- (though tests show it will return current user's version anyway)
+ * /NSIS/trunk/Contrib/InstallOptions/InstallOptions.nsh: allow
+ multiple inclusions
-2007-08-17 kichik
+2007-09-28 17:38 kichik
- * Source/exehead/util.c: fixed bug #1766268 - $SMPROGRAMS incorrect
- on Windows 98 use shfolder.dll only on ME and for all users's
- $APPDATA for which it was introduced
+ * /NSIS/trunk/Contrib/InstallOptions/InstallOptions.nsh: fixed bug
+ #1786899 - MUI_PAGE_WELCOME error when use SimpChinese Lang
-2007-08-14 pabs3
+2007-09-27 10:41 kichik
- * SConstruct: Ignore some failing tests by default on platforms
- without msvc/mstoolkit
+ * /NSIS/trunk/Docs/src/credits.but: credits for romanian and
+ persian
-2007-08-12 joostverburg
+2007-09-27 10:39 kichik
- * Contrib/Modern UI 2/Interface.nsh, Contrib/Modern UI
- 2/License.txt, Contrib/Modern UI 2/Localization.nsh, Contrib/Modern
- UI 2/MUI2.nsh, Contrib/Modern UI 2/Pages.nsh, Contrib/Modern UI
- 2/Pages/Components.nsh, Contrib/Modern UI 2/Pages/Directory.nsh,
- Contrib/Modern UI 2/Pages/Finish.nsh, Contrib/Modern UI
- 2/Pages/InstallFiles.nsh, Contrib/Modern UI 2/Pages/License.nsh,
- Contrib/Modern UI 2/Pages/StartMenu.nsh, Contrib/Modern UI
- 2/Pages/UninstallConfirm.nsh, Contrib/Modern UI
- 2/Pages/Welcome.nsh: Modern UI 2.0 beta
-
-2007-08-11 kichik
-
- * Source/exehead/exec.c: buf1, not buf (patch #1768584)
-
-2007-08-10 joostverburg
-
- * Contrib/Language files/Afrikaans.nsh, Contrib/Language
- files/Albanian.nsh, Contrib/Language files/Arabic.nsh,
- Contrib/Language files/Basque.nsh, Contrib/Language
- files/Belarusian.nsh, Contrib/Language files/Bosnian.nsh,
- Contrib/Language files/Breton.nsh, Contrib/Language
- files/Bulgarian.nsh, Contrib/Language files/Catalan.nsh,
- Contrib/Language files/Croatian.nsh, Contrib/Language
- files/Czech.nsh, Contrib/Language files/Danish.nsh,
- Contrib/Language files/Dutch.nsh, Contrib/Language
- files/English.nsh, Contrib/Language files/Estonian.nsh,
- Contrib/Language files/Farsi.nsh, Contrib/Language
- files/Finnish.nsh, Contrib/Language files/French.nsh,
- Contrib/Language files/Galician.nsh, Contrib/Language
- files/German.nsh, Contrib/Language files/Greek.nsh,
- Contrib/Language files/Hebrew.nsh, Contrib/Language
- files/Hungarian.nsh, Contrib/Language files/Icelandic.nsh,
- Contrib/Language files/Indonesian.nsh, Contrib/Language
- files/Irish.nsh, Contrib/Language files/Italian.nsh,
- Contrib/Language files/Japanese.nsh, Contrib/Language
- files/Korean.nsh, Contrib/Language files/Kurdish.nsh,
- Contrib/Language files/Latvian.nsh, Contrib/Language
- files/Luxembourgish.nsh, Contrib/Language files/Macedonian.nsh,
- Contrib/Language files/Malay.nsh, Contrib/Language
- files/Mongolian.nsh, Contrib/Language files/Norwegian.nsh,
- Contrib/Language files/NorwegianNynorsk.nsh, Contrib/Language
- files/Polish.nsh, Contrib/Language files/Portuguese.nsh,
- Contrib/Language files/PortugueseBR.nsh, Contrib/Language
- files/Romanian.nsh, Contrib/Language files/Russian.nsh,
- Contrib/Language files/Serbian.nsh, Contrib/Language
- files/SerbianLatin.nsh, Contrib/Language files/SimpChinese.nsh,
- Contrib/Language files/Slovak.nsh, Contrib/Language
- files/Slovenian.nsh, Contrib/Language files/Spanish.nsh,
- Contrib/Language files/SpanishInternational.nsh, Contrib/Language
- files/Swedish.nsh, Contrib/Language files/Thai.nsh,
- Contrib/Language files/TradChinese.nsh, Contrib/Language
- files/Turkish.nsh, Contrib/Language files/Ukrainian.nsh,
- Contrib/Language files/Uzbek.nsh, Contrib/Language files/Welsh.nsh:
- added missing $_CLICK for texts like "Click Next to continue."
-
-2007-08-10 joostverburg
-
- * Contrib/Language files/Valencian.nsh: New language files for
- localization of user interfaces and plug-ins. These files
- currently contain translations of the MUI and will be shared
- between different MUI versions.
-
-2007-08-09 joostverburg
-
- * Contrib/nsDialogs/nsDialogs.nsh: fixed macro for INI files
-
-2007-08-09 joostverburg
-
- * Contrib/nsDialogs/nsDialogs.nsh: * Put functions for
- InstallOptions INI files in macros. The functions can be included
- in the installer or uninstaller by includng a macro. * Added
- button state flags
-
-2007-08-09 joostverburg
-
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/SConscript, Contrib/Modern UI/System.nsh,
- Contrib/Modern UI/Language files/Afrikaans.nsh, Contrib/Modern
- UI/Language files/Albanian.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Basque.nsh,
- Contrib/Modern UI/Language files/Belarusian.nsh, Contrib/Modern
- UI/Language files/Bosnian.nsh, Contrib/Modern UI/Language
- files/Breton.nsh, Contrib/Modern UI/Language files/Bulgarian.nsh,
- Contrib/Modern UI/Language files/Catalan.nsh, Contrib/Modern
- UI/Language files/Croatian.nsh, Contrib/Modern UI/Language
- files/Czech.nsh, Contrib/Modern UI/Language files/Danish.nsh,
- Contrib/Modern UI/Language files/Default.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/Language files/Estonian.nsh,
- Contrib/Modern UI/Language files/Farsi.nsh, Contrib/Modern
- UI/Language files/Finnish.nsh, Contrib/Modern UI/Language
- files/French.nsh, Contrib/Modern UI/Language files/Galician.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Hebrew.nsh, Contrib/Modern UI/Language files/Hungarian.nsh,
- Contrib/Modern UI/Language files/Icelandic.nsh, Contrib/Modern
- UI/Language files/Indonesian.nsh, Contrib/Modern UI/Language
- files/Irish.nsh, Contrib/Modern UI/Language files/Italian.nsh,
- Contrib/Modern UI/Language files/Japanese.nsh, Contrib/Modern
- UI/Language files/Korean.nsh, Contrib/Modern UI/Language
- files/Kurdish.nsh, Contrib/Modern UI/Language files/Latvian.nsh,
- Contrib/Modern UI/Language files/Lithuanian.nsh, Contrib/Modern
- UI/Language files/Luxembourgish.nsh, Contrib/Modern UI/Language
- files/Macedonian.nsh, Contrib/Modern UI/Language files/Malay.nsh,
- Contrib/Modern UI/Language files/Mongolian.nsh, Contrib/Modern
- UI/Language files/Norwegian.nsh, Contrib/Modern UI/Language
- files/NorwegianNynorsk.nsh, Contrib/Modern UI/Language
- files/Polish.nsh, Contrib/Modern UI/Language files/Portuguese.nsh,
- Contrib/Modern UI/Language files/PortugueseBR.nsh, Contrib/Modern
- UI/Language files/Romanian.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language files/Serbian.nsh,
- Contrib/Modern UI/Language files/SerbianLatin.nsh, Contrib/Modern
- UI/Language files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Slovak.nsh, Contrib/Modern UI/Language files/Slovenian.nsh,
- Contrib/Modern UI/Language files/Spanish.nsh, Contrib/Modern
- UI/Language files/SpanishInternational.nsh, Contrib/Modern
- UI/Language files/Swedish.nsh, Contrib/Modern UI/Language
- files/Thai.nsh, Contrib/Modern UI/Language files/TradChinese.nsh,
- Contrib/Modern UI/Language files/Turkish.nsh, Contrib/Modern
- UI/Language files/Ukrainian.nsh, Contrib/Modern UI/Language
- files/Uzbek.nsh, Contrib/Modern UI/Language files/Valencian.nsh,
- Contrib/Modern UI/Language files/Welsh.nsh: Modern UI 1.8 * Uses
- the new language files * Updated documentation * Although
- MUI_DIRECTORYPAGE_BGCOLOR and MUI_STARTMENUPAGE_BGCOLOR are
- documented as interface setttings that apply to every directory
- page or Start Menu folder page, they were actually implemented as
- page specific settings. They have been changed to interface
- settings. * MUI_LANGDLL_DISPLAY now also reads a previously saved
- language from the registry if the installation is silent. *
- InstallOptions macros have been moved to a separate header file
- (InstallOptions.nsh). The MUI_INSTALLOPTIONS_* macros are still
- provided for backwards compatibility and insert the equalivent
- INSTALLOPTIONS_* macros.
-
-2007-08-09 joostverburg
-
- * Contrib/Language files/Afrikaans.nsh, Contrib/Language
- files/Albanian.nsh, Contrib/Language files/Arabic.nsh,
- Contrib/Language files/Basque.nsh, Contrib/Language
- files/Belarusian.nsh, Contrib/Language files/Bosnian.nsh,
- Contrib/Language files/Breton.nsh, Contrib/Language
- files/Bulgarian.nsh, Contrib/Language files/SConscript,
- Contrib/Language files/Catalan.nsh, Contrib/Language
- files/Croatian.nsh, Contrib/Language files/Czech.nsh,
- Contrib/Language files/Danish.nsh, Contrib/Language
- files/Dutch.nsh, Contrib/Language files/English.nsh,
- Contrib/Language files/Estonian.nsh, Contrib/Language
- files/Farsi.nsh, Contrib/Language files/Finnish.nsh,
- Contrib/Language files/French.nsh, Contrib/Language
- files/Galician.nsh, Contrib/Language files/German.nsh,
- Contrib/Language files/Greek.nsh, Contrib/Language
- files/Hebrew.nsh, Contrib/Language files/Hungarian.nsh,
- Contrib/Language files/Icelandic.nsh, Contrib/Language
- files/Indonesian.nsh, Contrib/Language files/Irish.nsh,
- Contrib/Language files/Italian.nsh, Contrib/Language
- files/Japanese.nsh, Contrib/Language files/Korean.nsh,
- Contrib/Language files/Kurdish.nsh, Contrib/Language
- files/Latvian.nsh, Contrib/Language files/Lithuanian.nsh,
- Contrib/Language files/Luxembourgish.nsh, Contrib/Language
- files/Macedonian.nsh, Contrib/Language files/Malay.nsh,
- Contrib/Language files/Mongolian.nsh, Contrib/Language
- files/Norwegian.nsh, Contrib/Language files/NorwegianNynorsk.nsh,
- Contrib/Language files/Polish.nsh, Contrib/Language
- files/Portuguese.nsh, Contrib/Language files/PortugueseBR.nsh,
- Contrib/Language files/Romanian.nsh, Contrib/Language
- files/Russian.nsh, Contrib/Language files/Serbian.nsh,
- Contrib/Language files/SerbianLatin.nsh, Contrib/Language
- files/SimpChinese.nsh, Contrib/Language files/Slovak.nsh,
- Contrib/Language files/Slovenian.nsh, Contrib/Language
- files/Spanish.nsh, Contrib/Language files/SpanishInternational.nsh,
- Contrib/Language files/Swedish.nsh, Contrib/Language
- files/Thai.nsh, Contrib/Language files/TradChinese.nsh,
- Contrib/Language files/Turkish.nsh, Contrib/Language
- files/Ukrainian.nsh, Contrib/Language files/Uzbek.nsh,
- Contrib/Language files/Valencian.nsh, Contrib/Language
- files/Welsh.nsh: New language files for localization of user
- interfaces and plug-ins. These files currently contain
- translations of the MUI and will be shared between different MUI
- versions.
-
-2007-08-09 joostverburg
-
- * Include/LangFile.nsh, Include/SConscript: Header file to create
- langauge file that can be included with a single command. When
- LANGFILE_DEFAULT is set, missing strings will automatically be
- loaded from a default file.
-
-2007-08-09 joostverburg
-
- * Contrib/InstallOptions/InstallOptions.nsh,
- Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/SConscript: * New header file with macros
- and conversion functions for use with InstallOptions * Updated
- InstallOptions documentation
-
-2007-08-09 joostverburg
-
- * Source/script.cpp: fixed escaped quotes in macro parameters
-
-2007-07-31 kichik
-
- * Contrib/Language files/Danish.nlf, Contrib/Modern UI/Language
- files/Danish.nsh: updates by birk
+ * /NSIS/trunk/Contrib/Language files/Farsi.nlf: applied patch
+ #1776386 - Persian translation updated
-2007-07-31 kichik
+2007-09-25 19:33 kichik
- * Docs/src/credits.but: credits for Slovak
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Romanian.nsh: applied patch
+ #1783853 - Improved Romanian translation
-2007-07-28 kichik
+2007-09-21 18:20 kichik
- * Contrib/Language files/Slovak.nlf, Contrib/Modern UI/Language
- files/Slovak.nsh: applied patch #1762627 - Updated version of
- Slovak language files for NSIS
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/script.cpp: size optimization - better values
+ for status_update
-2007-07-27 kichik
+2007-09-20 19:16 joostverburg
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- applied patch #1762003 - Modern UI
- MUI_CUSTOMFUNCTION_MOUSEOVERSECTION
+ * /NSIS/trunk/Contrib/Modern UI 2/Interface.nsh: fix NOSTRETCH
+ option for header image
-2007-07-27 pabs3
+2007-09-20 19:09 joostverburg
- * Source/exehead/exec.c: Prevent FTBFS due to using log_printf3
- instead of log_printf2
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/InstallFiles.nsh,
+ /NSIS/trunk/Contrib/Modern UI 2/Pages/UninstallConfirm.nsh: fix
+ control handles
-2007-07-24 kichik
+2007-09-18 22:02 kichik
- * Source/exehead/exec.c: a bit more logging
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp:
+ fixed plug-in system's SetDetailsPrint usage
+
+2007-09-18 20:14 kichik
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: fixed bug #1796053 -
+ makensisw command-line parsing error due to
+ GlobalAlloc/GlobalFree mismatch
+
+2007-09-14 17:14 kichik
+
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: BST_* moved to
+ WinMessages.nsh
+
+2007-09-11 20:23 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Afrikaans.nsh,
+ /NSIS/trunk/Contrib/Language files/Albanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Language files/Basque.nsh,
+ /NSIS/trunk/Contrib/Language files/Belarusian.nsh,
+ /NSIS/trunk/Contrib/Language files/Bosnian.nsh,
+ /NSIS/trunk/Contrib/Language files/Breton.nsh,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Language files/Galician.nsh,
+ /NSIS/trunk/Contrib/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Icelandic.nsh,
+ /NSIS/trunk/Contrib/Language files/Indonesian.nsh,
+ /NSIS/trunk/Contrib/Language files/Irish.nsh,
+ /NSIS/trunk/Contrib/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Language files/Kurdish.nsh,
+ /NSIS/trunk/Contrib/Language files/Latvian.nsh,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Luxembourgish.nsh,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Malay.nsh,
+ /NSIS/trunk/Contrib/Language files/Mongolian.nsh,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nsh,
+ /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nsh,
+ /NSIS/trunk/Contrib/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nsh,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Language files/SpanishInternational.nsh,
+ /NSIS/trunk/Contrib/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Language files/Uzbek.nsh,
+ /NSIS/trunk/Contrib/Language files/Welsh.nsh: fix texts for
+ uninstaller components page
+
+2007-09-11 18:00 kichik
+
+ * /NSIS/trunk/Include/WinMessages.nsh: added BST_* for bug #1792422
+
+2007-09-09 15:55 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Afrikaans.nsh,
+ /NSIS/trunk/Contrib/Language files/Albanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Language files/Basque.nsh,
+ /NSIS/trunk/Contrib/Language files/Belarusian.nsh,
+ /NSIS/trunk/Contrib/Language files/Bosnian.nsh,
+ /NSIS/trunk/Contrib/Language files/Breton.nsh,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Language files/Galician.nsh,
+ /NSIS/trunk/Contrib/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Icelandic.nsh,
+ /NSIS/trunk/Contrib/Language files/Indonesian.nsh,
+ /NSIS/trunk/Contrib/Language files/Irish.nsh,
+ /NSIS/trunk/Contrib/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Language files/Kurdish.nsh,
+ /NSIS/trunk/Contrib/Language files/Latvian.nsh,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Luxembourgish.nsh,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Malay.nsh,
+ /NSIS/trunk/Contrib/Language files/Mongolian.nsh,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nsh,
+ /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nsh,
+ /NSIS/trunk/Contrib/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nsh,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Language files/SpanishInternational.nsh,
+ /NSIS/trunk/Contrib/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Language files/Uzbek.nsh,
+ /NSIS/trunk/Contrib/Language files/Welsh.nsh: move finish button
+ text to right category
+
+2007-09-08 21:01 kichik
+
+ * /NSIS/trunk/Source/script.cpp: missing null terminator
+
+2007-09-08 17:28 kichik
+
+ * /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Include/Library.nsh: use SetRegView lastused to avoid
+ resetting the user's setting
+
+2007-09-08 17:27 kichik
+
+ * /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: added SetRegView lastused
+
+2007-09-08 17:20 kichik
-2007-07-23 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/script.cpp: move SetDetailsPrint flag to
+ g_exec_flag and added a lastused capability to EW_SETFLAG
- * Source/SConscript: fixed bug #1758873 - do not link to stdc++
- when using aCC
+2007-09-07 17:45 kichik
-2007-07-23 kichik
+ * /NSIS/trunk/Contrib/Language files/Korean.nsh: fixed line breaks
+ (thanks koder)
- * SCons/Config/gnu, SCons/Config/hpc++, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/build.cpp, Source/makenssi.cpp,
- Source/script.cpp, Source/strlist.cpp, Source/strlist.h,
- Source/util.cpp: applied patch #1758863 - Patch for building on GCC
- and aCC
+2007-09-07 16:09 kichik
-2007-07-23 kichik
+ * /NSIS/trunk/Docs/src/callback.but: added un.onSelChange
- * Contrib/nsDialogs/rtl.c: fixed bug #1758653 - CVS build failure
- on Linux i386 - TVS_RTLREADING undeclared
+2007-09-01 10:58 joostverburg
-2007-07-21 kichik
+ * /NSIS/trunk/Contrib/Modern UI 2/Localization.nsh,
+ /NSIS/trunk/Contrib/Modern UI 2/Pages/StartMenu.nsh: don't
+ declare variables for registry values if they won't be used
- * Contrib/nsDialogs/nsDialogs.nsh: added ${NSD_OnBack}
+2007-08-27 17:21 joostverburg
-2007-07-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI 2/Localization.nsh: fixed language
+ selection dialog
- * Contrib/nsDialogs/rtl.c, Contrib/nsDialogs/rtl.h: added rtl
- support
+2007-08-27 17:15 joostverburg
-2007-07-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI 2/Interface.nsh: initialize header
+ image
- * Contrib/nsDialogs/InstallOptions.nsi,
- Contrib/nsDialogs/nsDialogs.nsh: update state field
+2007-08-25 16:53 kichik
-2007-07-18 kichik
+ * /NSIS/trunk/Docs/src/history.but: oops... forgot release date
- * Contrib/nsDialogs/InstallOptions.nsi,
- Contrib/nsDialogs/SConscript, Contrib/nsDialogs/defs.h,
- Contrib/nsDialogs/input.c, Contrib/nsDialogs/nsDialogs.c,
- Contrib/nsDialogs/nsDialogs.nsh: added rtl support
+2007-08-25 14:01
-2007-07-18 kichik
+ * /NSIS/tags/v230, /NSIS/tags/v230/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v230/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v230/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v230'.
- * Source/lang.cpp, Source/util.cpp, Source/util.h: real
- implementation for IsValidCodePage
+2007-08-25 14:00 kichik
-2007-07-18 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.30
- * Source/build.cpp, Source/build.h: get rid of some #ifdef _WIN32
+2007-08-25 13:49 kichik
-2007-07-18 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.30
- * Source/Platform.h: added HWND
+2007-08-25 13:13 kichik
-2007-07-18 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: - install MUI2
+ - install nsDialogs readme
- * Source/build.cpp, Source/util.cpp, Source/util.h: moved non-win32
- CharNextExA implementation to util.cpp
+2007-08-25 12:58 kichik
-2007-07-18 kichik
+ * /NSIS/trunk/Contrib/Modern UI 2/SConscript: distribute missing
+ images
- * Contrib/nsDialogs/nsDialogs.nsh: added ${NSD_OnClick},
- ${NSD_OnChange} and ${NSD_OnNotify}
+2007-08-25 12:52 kichik
-2007-07-17 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/Readme.html,
+ /NSIS/trunk/Contrib/nsDialogs/SConscript: added initial
+ documentation
- * Source/makenssi.cpp: fixed bug #1755148 - hpux build linkage
- specification in main
+2007-08-25 12:29 kichik
-2007-07-16 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.c: push "error" if
+ nsDialogs::CreateControl fails
- * Source/Tests/winchar.cpp: fixed bug #1753063 - CVS test failure
- on hppa
+2007-08-25 12:28 kichik
-2007-07-14 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: added ${NSD_GetText}
- * Scripts/release.py: added Download page to TODO list, maybe
- that'd solve the cache problems
+2007-08-25 11:44 kichik
-2007-07-14 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.c: push "error" if
+ nsDialogs::Create fails
- * Menu/images/header.gif: 2.29
+2007-08-25 08:53 kichik
-2007-07-14 kichik
+ * /NSIS/trunk/Contrib/System/System.html: add a link to search all
+ System examples
- * Docs/src/history.but: 2.29
+2007-08-25 08:39 kichik
-2007-07-14 kichik
+ * /NSIS/trunk/Include/WinMessages.nsh: fixed bug #1771644 - LB_ERR
+ missing in WinMessages
+ added CB_ERR too
- * Source/exehead/exec.c: let GetStringFromParm call
- validate_filename
+2007-08-24 16:32 kichik
-2007-07-14 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: added LBS_NOTIFY for
+ list boxes to enable notification
- * Contrib/NSISdl/util.cpp: simplified myatoi64()
+2007-08-22 21:57 joostverburg
-2007-07-14 kichik
+ * /NSIS/trunk/Contrib/Modern UI 2/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI 2/SConscript,
+ /NSIS/trunk/Include/MUI2.nsh, /NSIS/trunk/Include/SConscript,
+ /NSIS/trunk/SConstruct: * Distribute MUI2 beta
+ * Preliminary MUI2 documentation
- * Examples/makensis.nsi, SConstruct,
- Contrib/nsDialogs/InstallOptions.nsi, Contrib/nsDialogs/SConscript,
- Contrib/nsDialogs/browse.c, Contrib/nsDialogs/defs.h,
- Contrib/nsDialogs/dialog.rc, Contrib/nsDialogs/example.nsi,
- Contrib/nsDialogs/input.c, Contrib/nsDialogs/input.h,
- Contrib/nsDialogs/nsDialogs.c, Contrib/nsDialogs/nsDialogs.nsh,
- Contrib/nsDialogs/nsis.c, Contrib/nsDialogs/nsis.h,
- Contrib/nsDialogs/welcome.nsi: nsDialogs: the next InstallOptions
+2007-08-20 22:32 joostverburg
-2007-07-12 kichik
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/Dutch.nsh: style improvements
+ and corrections by Ton
- * Source/exehead/Main.c, Source/exehead/util.c: load shfolder.dll
- before the script is executed to avoid any usage effects
+2007-08-18 17:15 kichik
-2007-07-12 kichik
+ * /NSIS/trunk/Source/exehead/util.c: tabs to spaces and some other
+ minor clean-ups
- * Source/Platform.h, Source/exehead/util.c: fixed bug #1752328 -
- PFNSHGETFOLDERPATHA is stub only and very Windows, move from
- Platform.h to util.c
+2007-08-18 12:56 joostverburg
-2007-07-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: move check whether the
+ MUI_INTERFACE macro is already included to the macro itself
- * Source/Platform.h, Source/exehead/util.c: moved definition to
- Platform.h and removed useless function calls
+2007-08-18 12:44 joostverburg
-2007-07-11 joostverburg
+ * /NSIS/trunk/Source/exehead/util.c: * Use shfolder.dll for
+ CSIDL_COMMON_DOCUMENTS on 95/98 if possible
+ * Information about API calls for special folders
- * Source/exehead/util.c, Source/exehead/util.h: When available, use
- shfolder.dll to get special folder locations. This allows folders
- like the application data folder for all users to be used on
- Windows 95/98 when Internet Explorer 5 is installed.
+2007-08-18 12:41 joostverburg
-2007-07-07 kichik
+ * /NSIS/trunk/Contrib/Modern UI 2/Pages/Finish.nsh: use a label and
+ a link on the same location to be able to display a text and get
+ click events
- * Source/Tests/mmap.cpp: test content as well
+2007-08-17 18:43 kichik
-2007-07-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt: mention
+ MUI_CUSTOMFUNCTION_MOUSEOVERSECTION in 1.8's log
- * Source/exehead/exec.c: and if IPeristFile::Save isn't called,
- fail
+2007-08-17 17:35 kichik
-2007-07-06 kichik
+ * /NSIS/trunk/Contrib/Language files/Valencian.nlf,
+ /NSIS/trunk/Contrib/Language files/Valencian.nsh: no more
+ headache
- * Source/exehead/exec.c: don't call IPeristFile::Save if
- MultiByteToWideChar fails
+2007-08-17 16:51 kichik
-2007-07-06 kichik
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Catalan returns
- * Source/script.cpp, Source/exehead/exec.c: size optimization - use
- GetStringFromParm instead of wsprintf
+2007-08-17 16:38 kichik
-2007-07-06 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/InstallOptions.nsi: use
+ NSD_FUNCTION_INIFILE
- * Source/exehead/exec.c: the more common case for SendMessage is
- ints, so get that first
+2007-08-17 16:37 kichik
-2007-07-06 kichik
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.c,
+ /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh,
+ /NSIS/trunk/Contrib/nsDialogs/welcome.nsi: CreateItem ->
+ CreateControl
+
+2007-08-17 16:20 kichik
+
+ * /NSIS/trunk/Source/exehead/util.c: better solution - don't old
+ functions and not shfolder but still try to get all user's
+ version from the os (though tests show it will return current
+ user's version anyway)
+
+2007-08-17 16:16 kichik
+
+ * /NSIS/trunk/Source/exehead/util.c: fixed bug #1766268 -
+ $SMPROGRAMS incorrect on Windows 98
+ use shfolder.dll only on ME and for all users's $APPDATA for
+ which it was introduced
+
+2007-08-14 01:11 pabs3
+
+ * /NSIS/trunk/SConstruct: Ignore some failing tests by default on
+ platforms without msvc/mstoolkit
+
+2007-08-11 23:21 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI 2, /NSIS/trunk/Contrib/Modern UI
+ 2/Interface.nsh, /NSIS/trunk/Contrib/Modern UI 2/License.txt,
+ /NSIS/trunk/Contrib/Modern UI 2/Localization.nsh,
+ /NSIS/trunk/Contrib/Modern UI 2/MUI2.nsh,
+ /NSIS/trunk/Contrib/Modern UI 2/Pages, /NSIS/trunk/Contrib/Modern
+ UI 2/Pages.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/Components.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/Directory.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/Finish.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/InstallFiles.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/License.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/StartMenu.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/UninstallConfirm.nsh, /NSIS/trunk/Contrib/Modern UI
+ 2/Pages/Welcome.nsh: Modern UI 2.0 beta
+
+2007-08-11 17:03 kichik
+
+ * /NSIS/trunk/Source/exehead/exec.c: buf1, not buf (patch #1768584)
+
+2007-08-09 23:54 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Afrikaans.nsh,
+ /NSIS/trunk/Contrib/Language files/Albanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Language files/Basque.nsh,
+ /NSIS/trunk/Contrib/Language files/Belarusian.nsh,
+ /NSIS/trunk/Contrib/Language files/Bosnian.nsh,
+ /NSIS/trunk/Contrib/Language files/Breton.nsh,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Language files/Galician.nsh,
+ /NSIS/trunk/Contrib/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Icelandic.nsh,
+ /NSIS/trunk/Contrib/Language files/Indonesian.nsh,
+ /NSIS/trunk/Contrib/Language files/Irish.nsh,
+ /NSIS/trunk/Contrib/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Language files/Kurdish.nsh,
+ /NSIS/trunk/Contrib/Language files/Latvian.nsh,
+ /NSIS/trunk/Contrib/Language files/Luxembourgish.nsh,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Malay.nsh,
+ /NSIS/trunk/Contrib/Language files/Mongolian.nsh,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nsh,
+ /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nsh,
+ /NSIS/trunk/Contrib/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nsh,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Language files/SpanishInternational.nsh,
+ /NSIS/trunk/Contrib/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Language files/Uzbek.nsh,
+ /NSIS/trunk/Contrib/Language files/Welsh.nsh: added missing
+ $_CLICK for texts like "Click Next to continue."
+
+2007-08-09 23:47 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Valencian.nsh: New language
+ files for localization of user interfaces and plug-ins.
+ These files currently contain translations of the MUI and will be
+ shared between different MUI versions.
+
+2007-08-09 18:30 joostverburg
+
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: fixed macro for INI
+ files
+
+2007-08-09 02:59 joostverburg
+
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: * Put functions for
+ InstallOptions INI files in macros. The functions can be included
+ in the installer or uninstaller by includng a macro.
+ * Added button state flags
+
+2007-08-09 02:52 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Modern UI 1.8
+ * Uses the new language files
+ * Updated documentation
+ * Although MUI_DIRECTORYPAGE_BGCOLOR and
+ MUI_STARTMENUPAGE_BGCOLOR are documented as interface
+ setttings that apply to every directory page or Start Menu folder
+ page, they were actually
+ implemented as page specific settings. They have been changed to
+ interface settings.
+ * MUI_LANGDLL_DISPLAY now also reads a previously saved language
+ from the registry if the
+ installation is silent.
+ * InstallOptions macros have been moved to a separate header file
+ (InstallOptions.nsh).
+ The MUI_INSTALLOPTIONS_* macros are still provided for backwards
+ compatibility and insert the
+ equalivent INSTALLOPTIONS_* macros.
+
+2007-08-09 01:12 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Afrikaans.nsh,
+ /NSIS/trunk/Contrib/Language files/Albanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Language files/Basque.nsh,
+ /NSIS/trunk/Contrib/Language files/Belarusian.nsh,
+ /NSIS/trunk/Contrib/Language files/Bosnian.nsh,
+ /NSIS/trunk/Contrib/Language files/Breton.nsh,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Language files/Galician.nsh,
+ /NSIS/trunk/Contrib/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Language files/Icelandic.nsh,
+ /NSIS/trunk/Contrib/Language files/Indonesian.nsh,
+ /NSIS/trunk/Contrib/Language files/Irish.nsh,
+ /NSIS/trunk/Contrib/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Language files/Kurdish.nsh,
+ /NSIS/trunk/Contrib/Language files/Latvian.nsh,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Luxembourgish.nsh,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Language files/Malay.nsh,
+ /NSIS/trunk/Contrib/Language files/Mongolian.nsh,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nsh,
+ /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nsh,
+ /NSIS/trunk/Contrib/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nsh,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Language files/SpanishInternational.nsh,
+ /NSIS/trunk/Contrib/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Language files/Uzbek.nsh,
+ /NSIS/trunk/Contrib/Language files/Valencian.nsh,
+ /NSIS/trunk/Contrib/Language files/Welsh.nsh: New language files
+ for localization of user interfaces and plug-ins.
+ These files currently contain translations of the MUI and will be
+ shared between different MUI versions.
+
+2007-08-09 01:08 joostverburg
+
+ * /NSIS/trunk/Include/LangFile.nsh, /NSIS/trunk/Include/SConscript:
+ Header file to create langauge file that can be included with a
+ single command.
+ When LANGFILE_DEFAULT is set, missing strings will automatically
+ be loaded from a default file.
+
+2007-08-09 00:53 joostverburg
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallOptions.nsh,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/SConscript: * New header file
+ with macros and conversion functions for use with InstallOptions
+ * Updated InstallOptions documentation
+
+2007-08-09 00:19 joostverburg
+
+ * /NSIS/trunk/Source/script.cpp: fixed escaped quotes in macro
+ parameters
+
+2007-07-31 17:32 kichik
+
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: updates
+ by birk
+
+2007-07-31 17:31 kichik
+
+ * /NSIS/trunk/Docs/src/credits.but: credits for Slovak
+
+2007-07-28 15:50 kichik
+
+ * /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh: applied
+ patch #1762627 - Updated version of Slovak language files for
+ NSIS
+
+2007-07-27 16:46 kichik
- * Docs/src/usefulinfos.but: way simpler REG_MULTI_SZ reader with
- pointers
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: applied patch #1762003
+ - Modern UI MUI_CUSTOMFUNCTION_MOUSEOVERSECTION
-2007-07-05 kichik
+2007-07-27 00:55 pabs3
- * Source/script.cpp, Source/exehead/exec.c: size optimization - use
- GetNSISString and GetStringFromParm instead of mystrcat
+ * /NSIS/trunk/Source/exehead/exec.c: Prevent FTBFS due to using
+ log_printf3 instead of log_printf2
-2007-07-05 kichik
+2007-07-24 19:06 kichik
- * Contrib/Language files/SConscript, Contrib/Language
- files/Spanish.nlf, Contrib/Language files/SpanishInternational.nlf,
- Contrib/Modern UI/SConscript, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/SpanishInternational.nsh, Docs/src/credits.but,
- Examples/Modern UI/MultiLanguage.nsi: International Spanish and a
- few Spanish fixes by niwrad
+ * /NSIS/trunk/Source/exehead/exec.c: a bit more logging
-2007-07-04 kichik
+2007-07-23 18:59 kichik
- * Docs/src/compilerflags.but: better explain what compiler flags
- mean and how flow control instructions should be used around them
+ * /NSIS/trunk/Source/SConscript: fixed bug #1758873 - do not link
+ to stdc++ when using aCC
-2007-06-28 kichik
+2007-07-23 18:43 kichik
- * Examples/Modern UI/MultiLanguage.nsi: Catalan isn't distributed
- with the installer anymore
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/hpc++,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.cpp,
+ /NSIS/trunk/Source/strlist.h, /NSIS/trunk/Source/util.cpp:
+ applied patch #1758863 - Patch for building on GCC and aCC
-2007-06-27 kichik
+2007-07-23 05:08 kichik
- * Source/exehead/Ui.c: some more information on the EN_MSGFILTER
- hack
+ * /NSIS/trunk/Contrib/nsDialogs/rtl.c: fixed bug #1758653 - CVS
+ build failure on Linux i386 - TVS_RTLREADING undeclared
-2007-06-27 joostverburg
+2007-07-21 16:22 kichik
- * Docs/src/tutorial.but: corrected LogicLib example
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: added ${NSD_OnBack}
-2007-06-27 kichik
+2007-07-19 04:55 kichik
- * SCons/Config/gnu, SCons/Config/hpc++, Source/makenssi.cpp:
- changed __ALLOW_UNALIGNED_DATA_ACCESS__ to
- NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS
+ * /NSIS/trunk/Contrib/nsDialogs/rtl.c,
+ /NSIS/trunk/Contrib/nsDialogs/rtl.h: added rtl support
-2007-06-27 kichik
+2007-07-18 21:21 kichik
- * SCons/Config/gnu, SConstruct, SCons/Config/hpc++,
- Source/Plugins.cpp, Source/ResourceEditor.cpp, Source/makenssi.cpp:
- applied patch #1714416 - patch to build on hpux
+ * /NSIS/trunk/Contrib/nsDialogs/InstallOptions.nsi,
+ /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: update state field
-2007-06-27 kichik
+2007-07-18 20:47 kichik
- * Contrib/NSISdl/httpget.cpp: cl still complained about about not
- all control paths returning a value
+ * /NSIS/trunk/Contrib/nsDialogs/defs.h,
+ /NSIS/trunk/Contrib/nsDialogs/input.c,
+ /NSIS/trunk/Contrib/nsDialogs/InstallOptions.nsi,
+ /NSIS/trunk/Contrib/nsDialogs/nsDialogs.c,
+ /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh,
+ /NSIS/trunk/Contrib/nsDialogs/SConscript: added rtl support
-2007-06-27 kichik
+2007-07-18 19:26 kichik
- * Contrib/NSISdl/httpget.cpp: mingw doesn't like __int64 left alone
- (probably #define'd instead typedef'ed)
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: real implementation for
+ IsValidCodePage
-2007-06-27 kichik
+2007-07-18 19:21 kichik
- * Contrib/NSISdl/httpget.cpp: nothing was returned for cl=0
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h: get rid
+ of some #ifdef _WIN32
-2007-06-27 kichik
+2007-07-18 19:21 kichik
- * Contrib/NSISdl/nsisdl.cpp: missing division to show kb
+ * /NSIS/trunk/Source/Platform.h: added HWND
-2007-06-27 kichik
+2007-07-18 19:18 kichik
- * Contrib/NSISdl/httpget.cpp, Contrib/NSISdl/httpget.h: fixed bug
- #1744091 - NSISdl shows negative values with buggy apache
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: moved non-win32 CharNextExA
+ implementation to util.cpp
-2007-06-27 kichik
+2007-07-18 16:54 kichik
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/SConscript,
- Contrib/NSISdl/httpget.h, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/util.cpp, Contrib/NSISdl/util.h: applied patch
- #1723131 - NSISdl doesn't handle files over 2GB and patch #1656076
- - make NSISdl more "translator-friendly"
+ * /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh: added
+ ${NSD_OnClick}, ${NSD_OnChange} and ${NSD_OnNotify}
-2007-06-27 kichik
+2007-07-17 16:45 kichik
- * Contrib/NSISdl/ReadMe.txt: there should be a space in the
- remaining translation string
+ * /NSIS/trunk/Source/makenssi.cpp: fixed bug #1755148 - hpux build
+ linkage specification in main
-2007-06-26 kichik
+2007-07-16 18:28 kichik
- * Contrib/Banner/Banner.c: fixed bug #1743801 - Banner can hang
- when called form custom page
+ * /NSIS/trunk/Source/Tests/winchar.cpp: fixed bug #1753063 - CVS
+ test failure on hppa
-2007-06-26 kichik
+2007-07-14 19:21 kichik
- * Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/util.c: fixed bug #1741061 - use SetErrorMode to
- disable error messages for the entire installer and not for
- specific points as it always knows best what messages to display
+ * /NSIS/trunk/Scripts/release.py: added Download page to TODO list,
+ maybe that'd solve the cache problems
-2007-06-26 kichik
+2007-07-14 11:32
- * Include/FileFunc.nsh: applied patch #1742562 to fix bug #1742255
- - GetFileVersion shows incorrect version for .NET Framework 2
+ * /NSIS/tags/v229, /NSIS/tags/v229/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v229/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v229/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v229'.
-2007-06-26 kichik
+2007-07-14 11:32 kichik
- * Include/Sections.nsh: fixed bug #1742793 - ReverseSection macro
- in Sections.nsh doesn't work
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Menu/images/header.gif: 2.29
-2007-06-13 kichik
+2007-07-14 10:53 kichik
- * Contrib/ExDLL/exdll.h: use A functions intead of T
+ * /NSIS/trunk/Source/exehead/exec.c: let GetStringFromParm call
+ validate_filename
-2007-06-10 pabs3
+2007-07-14 10:29 kichik
- * Contrib/System/Source/Buffers.c, Contrib/System/Source/Plugin.c,
- Contrib/System/Source/stdafx.h: Stop some compiler warnings due to
- lack of trailing newlines.
+ * /NSIS/trunk/Contrib/NSISdl/util.cpp: simplified myatoi64()
-2007-06-08 kichik
+2007-07-14 09:40 kichik
- * Menu/images/header.gif: 2.28
+ * /NSIS/trunk/Contrib/nsDialogs,
+ /NSIS/trunk/Contrib/nsDialogs/browse.c,
+ /NSIS/trunk/Contrib/nsDialogs/defs.h,
+ /NSIS/trunk/Contrib/nsDialogs/dialog.rc,
+ /NSIS/trunk/Contrib/nsDialogs/example.nsi,
+ /NSIS/trunk/Contrib/nsDialogs/input.c,
+ /NSIS/trunk/Contrib/nsDialogs/input.h,
+ /NSIS/trunk/Contrib/nsDialogs/InstallOptions.nsi,
+ /NSIS/trunk/Contrib/nsDialogs/nsDialogs.c,
+ /NSIS/trunk/Contrib/nsDialogs/nsDialogs.nsh,
+ /NSIS/trunk/Contrib/nsDialogs/nsis.c,
+ /NSIS/trunk/Contrib/nsDialogs/nsis.h,
+ /NSIS/trunk/Contrib/nsDialogs/SConscript,
+ /NSIS/trunk/Contrib/nsDialogs/welcome.nsi,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/SConstruct:
+ nsDialogs: the next InstallOptions
-2007-06-08 kichik
+2007-07-12 19:15 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: bump to 1.78
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c: load shfolder.dll before the
+ script is executed to avoid any usage effects
-2007-06-08 kichik
+2007-07-12 16:35 kichik
- * Docs/src/history.but: 2.28
+ * /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/Platform.h:
+ fixed bug #1752328 - PFNSHGETFOLDERPATHA is stub only and very
+ Windows, move from Platform.h to util.c
-2007-06-08 kichik
+2007-07-10 21:57 joostverburg
- * Contrib/Language files/SConscript, Contrib/Modern UI/SConscript:
- don't install Valencian and Catalan see patch #1558822 for details
- and
- http://forums.winamp.com/showthread.php?s=&threadid=270401&highlight=Valencian
+ * /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/Platform.h:
+ moved definition to Platform.h and removed useless function calls
-2007-06-08 kichik
+2007-07-10 21:33 joostverburg
- * Source/exehead/Ui.c: another focused invisible control problem
- when hitting the Show Details button that also hides that button
+ * /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: When available, use
+ shfolder.dll to get special folder locations. This allows folders
+ like the application data folder for all users to be used on
+ Windows 95/98 when Internet Explorer 5 is installed.
-2007-06-08 kichik
+2007-07-07 09:30 kichik
- * Source/exehead/Ui.c: fixed bug #1733692 - Hitting any key in the
- instfiles page freezes under W2K
+ * /NSIS/trunk/Source/Tests/mmap.cpp: test content as well
-2007-06-05 kichik
+2007-07-06 10:21 kichik
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- renamed MUI_LANGDLL_SHOW_ALL_LANGUAGES to MUI_LANGDLL_ALLLANGUAGES
- to match the style of other defines
+ * /NSIS/trunk/Source/exehead/exec.c: and if IPeristFile::Save isn't
+ called, fail
-2007-06-05 kichik
+2007-07-06 10:11 kichik
- * Contrib/Modern UI/System.nsh: applied patch #1724876 - Language
- selection dialog doesn't display all languages
+ * /NSIS/trunk/Source/exehead/exec.c: don't call IPeristFile::Save
+ if MultiByteToWideChar fails
-2007-06-05 kichik
+2007-07-06 09:55 kichik
- * Contrib/Modern UI/Readme.html: documentation for patch #1724876
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ size optimization - use GetStringFromParm instead of wsprintf
-2007-05-25 kichik
+2007-07-06 09:31 kichik
- * Contrib/System/SConscript: objs are unused for a long time
+ * /NSIS/trunk/Source/exehead/exec.c: the more common case for
+ SendMessage is ints, so get that first
-2007-05-25 kichik
+2007-07-06 09:20 kichik
- * Contrib/System/Source/System.sln,
- Contrib/System/Source/System.vcproj,
- Contrib/System/Source/chkstk.obj,
- Contrib/System/Source/vc7ldvrm.obj,
- Contrib/System/Source/vc7lmul.obj,
- Contrib/System/Source/vc7lshl.obj,
- Contrib/System/Source/vc7lshr.obj: unused
+ * /NSIS/trunk/Docs/src/usefulinfos.but: way simpler REG_MULTI_SZ
+ reader with pointers
-2007-05-24 kichik
+2007-07-05 17:43 kichik
- * Contrib/NSIS Menu/wx/wxbuild.bat: check for setup.h
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ size optimization - use GetNSISString and GetStringFromParm
+ instead of mystrcat
-2007-05-23 kichik
+2007-07-05 15:59 kichik
- * Contrib/NSISdl/nsisdl.cpp: fixed bug #1713562 - NSISdl doesn't
- finish download after content-length bytes
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/SpanishInternational.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language
+ files/SpanishInternational.nsh, /NSIS/trunk/Contrib/Modern
+ UI/SConscript, /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: International
+ Spanish and a few Spanish fixes by niwrad
-2007-05-23 kichik
+2007-07-04 17:52 kichik
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- applied patch #1706187 - MUI_STARTMENUPAGE_BGCOLOR and
- MUI_DIRECTORYPAGE_BGCOLOR
+ * /NSIS/trunk/Docs/src/compilerflags.but: better explain what
+ compiler flags mean and how flow control instructions should be
+ used around them
-2007-05-23 kichik
+2007-06-28 19:06 kichik
- * Docs/src/build.but: LibraryLocal must be compiled for POSIX now
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Catalan isn't
+ distributed with the installer anymore
-2007-05-23 kichik
+2007-06-27 18:54 kichik
- * Source/build.cpp: applied patch #1722147 - equalized compiler
- errors
+ * /NSIS/trunk/Source/exehead/Ui.c: some more information on the
+ EN_MSGFILTER hack
-2007-05-21 pabs3
+2007-06-27 17:02 joostverburg
- * SConstruct: allow ignoring tests with IGNORETESTS
+ * /NSIS/trunk/Docs/src/tutorial.but: corrected LogicLib example
-2007-05-15 pabs3
+2007-06-27 14:16 kichik
- * Contrib/System/System.html, Contrib/System/Source/System.c,
- Docs/src/build.but, Docs/src/usefulinfos.but: applied patch
- #1711089 - disable System::Call and System::Get when building with
- GCC
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/hpc++,
+ /NSIS/trunk/Source/makenssi.cpp: changed
+ __ALLOW_UNALIGNED_DATA_ACCESS__ to
+ NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS
-2007-05-13 kichik
+2007-06-27 14:15 kichik
- * Contrib/InstallOptions/Readme.html: fixed bug #1716614 -
- InstallOptions TxtColor
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/hpc++,
+ /NSIS/trunk/SConstruct, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp: applied patch #1714416 -
+ patch to build on hpux
-2007-05-05 kichik
+2007-06-27 13:03 kichik
- * Docs/src/build.but: added missing new-line
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp: cl still complained about
+ about not all control paths returning a value
-2007-05-05 kichik
+2007-06-27 11:32 kichik
- * Contrib/NSISdl/nsisdl.cpp: fixed bug #1713560 - NSISdl 100% CPU
- usage during DNS resolution
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp: mingw doesn't like
+ __int64 left alone (probably #define'd instead typedef'ed)
-2007-05-05 kichik
+2007-06-27 11:27 kichik
- * Docs/src/build.but, INSTALL: building NSIS Menu
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp: nothing was returned for
+ cl=0
-2007-05-05 kichik
+2007-06-27 11:19 kichik
- * Menu/images/header.gif: 2.27
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: missing division to show
+ kb
-2007-05-05 kichik
+2007-06-27 11:14 kichik
- * Docs/src/history.but: 2.27
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp,
+ /NSIS/trunk/Contrib/NSISdl/httpget.h: fixed bug #1744091 - NSISdl
+ shows negative values with buggy apache
-2007-05-05 kichik
+2007-06-27 11:09 kichik
- * SConstruct: missing "of" in description
+ * /NSIS/trunk/Contrib/NSISdl/httpget.h,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Contrib/NSISdl/SConscript,
+ /NSIS/trunk/Contrib/NSISdl/util.cpp,
+ /NSIS/trunk/Contrib/NSISdl/util.h: applied patch #1723131 -
+ NSISdl doesn't handle files over 2GB and patch #1656076 - make
+ NSISdl more "translator-friendly"
-2007-05-01 kichik
+2007-06-27 11:00 kichik
- * Source/build.cpp: make $PROGRAMFILES and $COMMONFILES available
- in the uninstaller as well
+ * /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: there should be a space in
+ the remaining translation string
-2007-04-30 kichik
+2007-06-26 19:00 kichik
- * SConstruct: added TOOLSET
+ * /NSIS/trunk/Contrib/Banner/Banner.c: fixed bug #1743801 - Banner
+ can hang when called form custom page
-2007-04-30 kichik
+2007-06-26 18:08 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: disable the X button
- for InstallOptions pages as well when CancelEnabled is used
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c: fixed bug #1741061 - use
+ SetErrorMode to disable error messages for the entire installer
+ and not for specific points as it always knows best what messages
+ to display
-2007-04-30 kichik
+2007-06-26 17:37 kichik
- * Source/tokens.cpp: fixed bug #1709460 - Command line help for
- MessageBox is incomplete
+ * /NSIS/trunk/Include/FileFunc.nsh: applied patch #1742562 to fix
+ bug #1742255 - GetFileVersion shows incorrect version for .NET
+ Framework 2
-2007-04-27 kichik
+2007-06-26 17:27 kichik
- * Docs/src/history.but: oops
+ * /NSIS/trunk/Include/Sections.nsh: fixed bug #1742793 -
+ ReverseSection macro in Sections.nsh doesn't work
-2007-04-27 kichik
+2007-06-13 18:55 kichik
- * Menu/images/header.gif: 2.26
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h: use A functions intead of T
-2007-04-27 kichik
+2007-06-10 16:45 pabs3
- * Source/Tests/SConscript: util.cpp requires version.lib
+ * /NSIS/trunk/Contrib/System/Source/Buffers.c,
+ /NSIS/trunk/Contrib/System/Source/Plugin.c,
+ /NSIS/trunk/Contrib/System/Source/stdafx.h: Stop some compiler
+ warnings due to lack of trailing newlines.
-2007-04-27 kichik
+2007-06-08 18:16
- * Docs/src/history.but: 2.26
+ * /NSIS/tags/v228, /NSIS/tags/v228/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v228/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v228/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v228/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v228'.
-2007-04-27 kichik
+2007-06-08 18:16 kichik
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html, Contrib/Makensisw/Readme.txt,
- Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: version bump
+ * /NSIS/trunk/Menu/images/header.gif: 2.28
-2007-04-27 kichik
+2007-06-08 18:07 kichik
- * Include/Library.nsh: better wording
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: bump to 1.78
-2007-04-27 kichik
+2007-06-08 18:07 kichik
- * Include/LogicLib.nsh: using __LINE__ for special labels can
- result in duplicate labels across files (two includes in the same
- function)
+ * /NSIS/trunk/Docs/src/history.but: 2.28
-2007-04-27 kichik
+2007-06-08 17:55 kichik
- * Contrib/LangDLL/LangDLL.c: font should come after the empty
- string that marks the end of the language list, no need to decrease
- lang_num
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: don't install Valencian
+ and Catalan
+ see patch #1558822 for details and
+ http://forums.winamp.com/showthread.php?s=&threadid=270401&highlight=Valencian
-2007-04-26 kichik
+2007-06-08 17:15 kichik
- * Source/build.h, Source/lang.cpp: removed code duplication for
- installer/uninstaller in GenerateLangTables
+ * /NSIS/trunk/Source/exehead/Ui.c: another focused invisible
+ control problem when hitting the Show Details button that also
+ hides that button
-2007-04-26 kichik
+2007-06-08 17:11 kichik
- * Source/exehead/exec.c, Source/exehead/util.c, Source/script.cpp:
- size optimization
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1733692 - Hitting any
+ key in the instfiles page freezes under W2K
-2007-04-26 kichik
+2007-06-05 18:37 kichik
- * SConstruct: allow skipping tests with SKIPTESTS
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: renamed
+ MUI_LANGDLL_SHOW_ALL_LANGUAGES to MUI_LANGDLL_ALLLANGUAGES to
+ match the style of other defines
-2007-04-26 kichik
+2007-06-05 18:36 kichik
- * Scripts/release.py: don't use --show-tag, show entire history
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: applied patch #1724876
+ - Language selection dialog doesn't display all languages
-2007-04-26 kichik
+2007-06-05 18:34 kichik
- * Source/Platform.h, Source/ResourceVersionInfo.h: fixed bug
- #1707823 - VS_FIXEDFILEINFO undefind in util.cpp
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: documentation for
+ patch #1724876
-2007-04-25 kichik
+2007-05-25 11:54 kichik
- * Contrib/Modern UI/Language files/German.nsh: added comma
+ * /NSIS/trunk/Contrib/System/SConscript: objs are unused for a long
+ time
-2007-04-25 kichik
+2007-05-25 11:52 kichik
- * Source/DialogTemplate.cpp: use current codepage to convert font
- name to unicode
+ * /NSIS/trunk/Contrib/System/Source/chkstk.obj,
+ /NSIS/trunk/Contrib/System/Source/System.sln,
+ /NSIS/trunk/Contrib/System/Source/System.vcproj,
+ /NSIS/trunk/Contrib/System/Source/vc7ldvrm.obj,
+ /NSIS/trunk/Contrib/System/Source/vc7lmul.obj,
+ /NSIS/trunk/Contrib/System/Source/vc7lshl.obj,
+ /NSIS/trunk/Contrib/System/Source/vc7lshr.obj: unused
-2007-04-24 kichik
+2007-05-23 23:32 kichik
- * Source/exehead/Main.c: remove temp uninstaller directory only
- once
+ * /NSIS/trunk/Contrib/NSIS Menu/wx/wxbuild.bat: check for setup.h
-2007-04-24 kichik
+2007-05-23 15:59 kichik
- * Docs/src/var.but, Source/build.cpp, Source/exehead/fileform.c,
- Source/exehead/state.h, Source/exehead/util.c,
- Source/exehead/util.h: added $EXEFILE
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: fixed bug #1713562 -
+ NSISdl doesn't finish download after content-length bytes
-2007-04-24 kichik
+2007-05-23 15:15 kichik
- * Contrib/Library/RegTool/RegTool.c: restore fs redirection only if
- it was set in the first place
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: applied patch #1706187
+ - MUI_STARTMENUPAGE_BGCOLOR and MUI_DIRECTORYPAGE_BGCOLOR
-2007-04-24 kichik
+2007-05-23 14:52 kichik
- * Source/util.cpp: applied patch #1706624 - GetDLLVersionLocal VXD
- support on NT
+ * /NSIS/trunk/Docs/src/build.but: LibraryLocal must be compiled for
+ POSIX now
-2007-04-24 kichik
+2007-05-23 14:14 kichik
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp,
- Contrib/Library/LibraryLocal/SConscript, Source/script.cpp: use
- GetDLLVersion
+ * /NSIS/trunk/Source/build.cpp: applied patch #1722147 - equalized
+ compiler errors
-2007-04-24 kichik
+2007-05-21 09:23 pabs3
- * Source/util.cpp, Source/util.h: added GetDLLVersion
+ * /NSIS/trunk/SConstruct: allow ignoring tests with IGNORETESTS
-2007-04-24 kichik
+2007-05-14 23:50 pabs3
- * Contrib/Language files/Valencian.nlf: added codepage
+ * /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/System.html,
+ /NSIS/trunk/Docs/src/build.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but: applied patch #1711089 -
+ disable System::Call and System::Get when building with GCC
-2007-04-21 kichik
+2007-05-13 18:57 kichik
- * Source/script.cpp: fixed plug-in calls
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: fixed bug
+ #1716614 - InstallOptions TxtColor
-2007-04-21 kichik
+2007-05-05 20:22 kichik
- * Source/script.cpp: plug-in runs on windows, path is with
- backslashes
+ * /NSIS/trunk/Docs/src/build.but: added missing new-line
-2007-04-21 kichik
+2007-05-05 20:20 kichik
- * Source/script.cpp: use GetFullPathName instead of manually adding
- the working directory
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: fixed bug #1713560 -
+ NSISdl 100% CPU usage during DNS resolution
-2007-04-21 kichik
+2007-05-05 13:05 kichik
- * Source/exehead/exec.c, Source/script.cpp: size optimization
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/INSTALL: building
+ NSIS Menu
-2007-04-20 kichik
+2007-05-05 11:07
- * Source/exehead/exec.c: sections always end with EW_RET which will
- cause ExecuteCodeSegment to return before MulDiv is called with
- progress_bar_len=0 and even if it is 0, MulDiv will just return -1
+ * /NSIS/tags/v227, /NSIS/tags/v227/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v227/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v227/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v227/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v227'.
-2007-04-20 kichik
+2007-05-05 11:07 kichik
- * Source/build.cpp, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: size optimization
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Menu/images/header.gif: 2.27
-2007-04-20 kichik
+2007-05-05 10:56 kichik
- * SConstruct, Contrib/Library/LibraryLocal/SConscript: build
- #Source files into LibraryLocal's build dir instead of into #Source
+ * /NSIS/trunk/SConstruct: missing "of" in description
-2007-04-20 kichik
+2007-05-01 20:53 kichik
- * Source/build.cpp, Source/exehead/state.h, Source/exehead/util.c:
- validate $EXEPATH as well
+ * /NSIS/trunk/Source/build.cpp: make $PROGRAMFILES and $COMMONFILES
+ available in the uninstaller as well
-2007-04-20 kichik
+2007-04-30 18:02 kichik
- * Source/exehead/Main.c: better uninstaller recursion test using
- the new state_exe_path
+ * /NSIS/trunk/SConstruct: added TOOLSET
-2007-04-20 kichik
+2007-04-30 17:18 kichik
- * Docs/src/var.but, Source/build.cpp, Source/exehead/fileform.c,
- Source/exehead/state.h: added $EXEPATH
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: disable
+ the X button for InstallOptions pages as well when CancelEnabled
+ is used
-2007-04-20 kichik
+2007-04-29 21:02 kichik
- * Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/util.c, Source/exehead/util.h: size optimization -
- SetOutPath already sets the working directory so there's no need to
- pass $OUTDIR to myCreateProcess
+ * /NSIS/trunk/Source/tokens.cpp: fixed bug #1709460 - Command line
+ help for MessageBox is incomplete
-2007-04-19 kichik
+2007-04-27 18:48
- * Source/build.cpp: don't pre-process "ProgramFilesDir" and
- "CommonFilesDir" as they are not processed in GetNSISString
+ * /NSIS/tags/v226, /NSIS/tags/v226/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v226/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v226/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v226/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v226'.
-2007-04-19 kichik
+2007-04-27 18:48 kichik
- * Source/build.cpp, Source/exehead/util.c: use $PROGRAMFILES for
- the root of the default $COMMONFILES instead of hard-coding
- "C:\Program Files"
+ * /NSIS/trunk/Docs/src/history.but: oops
-2007-04-19 kichik
+2007-04-27 18:45 kichik
- * Include/Library.nsh: don't fail when filename starts with a
- number
+ * /NSIS/trunk/Menu/images/header.gif: 2.26
-2007-04-18 kichik
+2007-04-27 18:40 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp: allocate g_sdata.script_cmd_args as
- GMEM_MOVEABLE
+ * /NSIS/trunk/Source/Tests/SConscript: util.cpp requires
+ version.lib
-2007-04-17 kichik
+2007-04-27 18:36 kichik
- * Contrib/Makensisw/makensisw.cpp: free riched32.dll outside of the
- wndproc
+ * /NSIS/trunk/Docs/src/history.but: 2.26
-2007-04-17 kichik
+2007-04-27 16:57 kichik
- * Contrib/Makensisw/makensisw.cpp: - properly allocate size in
- AddScriptCmdArgs - do clean-up in WM_DESTROY, not only WM_CLOSE
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: version bump
-2007-04-17 kichik
+2007-04-27 15:56 kichik
- * Contrib/Makensisw/makensisw.h, Contrib/zip2exe/main.cpp: some
- more warnings of bug #1676243
+ * /NSIS/trunk/Include/Library.nsh: better wording
-2007-04-17 kichik
+2007-04-27 15:15 kichik
- * Source/exehead/Ui.c: don't start showing pages if quit was called
- in the show function
+ * /NSIS/trunk/Include/LogicLib.nsh: using __LINE__ for special
+ labels can result in duplicate labels across files (two includes
+ in the same function)
-2007-04-17 kichik
+2007-04-27 15:14 kichik
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp,
- Contrib/Library/LibraryLocal/SConscript: fixed bug #1701879 - linux
- LibraryLocal FTBFS
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: font should come after the
+ empty string that marks the end of the language list, no need to
+ decrease lang_num
-2007-04-17 kichik
+2007-04-26 20:49 kichik
- * Source/Platform.h: CResourceEditor was broken on big endian
- platforms since 2.24 because IMAGE_NT_OPTIONAL_HDR32_MAGIC had
- improper definition
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/lang.cpp: removed
+ code duplication for installer/uninstaller in GenerateLangTables
-2007-04-17 kichik
+2007-04-26 20:26 kichik
- * Source/ResourceEditor.cpp: tabs to spaces
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ size optimization
-2007-04-17 kichik
+2007-04-26 20:04 kichik
- * Docs/src/generalpurpose.but: more details for RFE #971467
+ * /NSIS/trunk/SConstruct: allow skipping tests with SKIPTESTS
-2007-04-17 kichik
+2007-04-26 19:02 kichik
- * Contrib/Makensisw/makensisw.cpp: removed double initialization
+ * /NSIS/trunk/Scripts/release.py: don't use --show-tag, show entire
+ history
-2007-04-17 kichik
+2007-04-26 18:24 kichik
- * Contrib/Makensisw/makensisw.cpp: fully intialize g_sdata and
- delete g_sdata.script_cmd_args
+ * /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.h: fixed bug #1707823 -
+ VS_FIXEDFILEINFO undefind in util.cpp
-2007-04-16 kichik
+2007-04-25 19:26 kichik
- * Contrib/Library/LibraryLocal/SConscript: spaces to tabs
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: added
+ comma
-2007-04-16 kichik
+2007-04-25 19:20 kichik
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp, Source/Platform.h:
- fixed bug #1701290 - linux FTBFS: stubs and librarylocal
+ * /NSIS/trunk/Source/DialogTemplate.cpp: use current codepage to
+ convert font name to unicode
-2007-04-16 pabs3
+2007-04-24 19:14 kichik
- * Contrib/UserInfo/UserInfo.c: Fix warning about uninitialised
- variable
+ * /NSIS/trunk/Source/exehead/Main.c: remove temp uninstaller
+ directory only once
-2007-04-16 kichik
+2007-04-24 19:09 kichik
- * Include/Library.nsh: use LibraryLocal on POSIX as well
+ * /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: added $EXEFILE
-2007-04-16 kichik
+2007-04-24 16:16 kichik
- * Contrib/Library/LibraryLocal/SConscript: build as cross platform
+ * /NSIS/trunk/Contrib/Library/RegTool/RegTool.c: restore fs
+ redirection only if it was set in the first place
-2007-04-16 kichik
+2007-04-24 14:24 kichik
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp,
- Contrib/Library/LibraryLocal/SConscript: added support for POSIX
- platforms
+ * /NSIS/trunk/Source/util.cpp: applied patch #1706624 -
+ GetDLLVersionLocal VXD support on NT
-2007-04-16 kichik
+2007-04-24 14:11 kichik
- * Contrib/LangDLL/LangDLL.c: return "no languages available" when
- combo box is empty of any reason, like no language with matching
- codepage
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript,
+ /NSIS/trunk/Source/script.cpp: use GetDLLVersion
-2007-04-16 kichik
+2007-04-24 14:06 kichik
- * Contrib/Language files/Afrikaans.nlf, Contrib/Language
- files/Albanian.nlf, Contrib/Language files/Arabic.nlf,
- Contrib/Language files/Basque.nlf, Contrib/Language
- files/Belarusian.nlf, Contrib/Language files/Breton.nlf,
- Contrib/Language files/Bulgarian.nlf, Contrib/Language
- files/Catalan.nlf, Contrib/Language files/Croatian.nlf,
- Contrib/Language files/Czech.nlf, Contrib/Language
- files/Danish.nlf, Contrib/Language files/Dutch.nlf,
- Contrib/Language files/Estonian.nlf, Contrib/Language
- files/Farsi.nlf, Contrib/Language files/Finnish.nlf,
- Contrib/Language files/French.nlf, Contrib/Language
- files/German.nlf, Contrib/Language files/Greek.nlf,
- Contrib/Language files/Hungarian.nlf, Contrib/Language
- files/Icelandic.nlf, Contrib/Language files/Irish.nlf,
- Contrib/Language files/Italian.nlf, Contrib/Language
- files/Latvian.nlf, Contrib/Language files/Lithuanian.nlf,
- Contrib/Language files/Luxembourgish.nlf, Contrib/Language
- files/Macedonian.nlf, Contrib/Language files/Mongolian.nlf,
- Contrib/Language files/Norwegian.nlf, Contrib/Language
- files/NorwegianNynorsk.nlf, Contrib/Language
- files/PortugueseBR.nlf, Contrib/Language files/Slovak.nlf,
- Contrib/Language files/Slovenian.nlf, Contrib/Language
- files/Spanish.nlf, Contrib/Language files/Swedish.nlf,
- Contrib/Language files/Thai.nlf, Contrib/Language
- files/Turkish.nlf, Contrib/Language files/Ukrainian.nlf,
- Contrib/Language files/Uzbek.nlf: added codepage
+ * /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: added
+ GetDLLVersion
-2007-04-15 kichik
+2007-04-24 11:20 kichik
- * Source/build.cpp: fixed bug #1701050 - Senseless variable warning
- better warning - variable never set
+ * /NSIS/trunk/Contrib/Language files/Valencian.nlf: added codepage
-2007-04-15 kichik
+2007-04-21 09:37 kichik
- * Contrib/LangDLL/LangDLL.c, Contrib/Modern UI/System.nsh,
- Source/script.cpp: implemented RFE #1564986 - block unsupported
- language
+ * /NSIS/trunk/Source/script.cpp: fixed plug-in calls
-2007-04-15 kichik
+2007-04-21 09:02 kichik
- * Source/lang.cpp, Source/lang.h: implemented RFE #1235616 -
- Variable to get language *name* added $(^Language)
+ * /NSIS/trunk/Source/script.cpp: plug-in runs on windows, path is
+ with backslashes
-2007-04-14 kichik
+2007-04-20 23:46 kichik
- * Docs/src/library.but: nicer options
+ * /NSIS/trunk/Source/script.cpp: use GetFullPathName instead of
+ manually adding the working directory
-2007-04-14 kichik
+2007-04-20 23:40 kichik
- * Contrib/Library/RegTool/RegTool.c, Docs/src/library.but,
- Include/Library.nsh: added x64 support for library macros
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ size optimization
-2007-04-14 kichik
+2007-04-20 20:50 kichik
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/util.c: don't pass ".dll" to
- myGetProcAddress as GetModuleHandle and LoadLibrary add that
- automatically
+ * /NSIS/trunk/Source/exehead/exec.c: sections always end with
+ EW_RET which will cause ExecuteCodeSegment to return before
+ MulDiv is called with progress_bar_len=0 and even if it is 0,
+ MulDiv will just return -1
-2007-04-14 kichik
+2007-04-20 20:32 kichik
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp: tabs to spaces
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: size optimization
-2007-04-14 kichik
+2007-04-20 11:35 kichik
- * Source/exehead/exec.c: RegDeleteKeyExA typedef missing return
- value
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript,
+ /NSIS/trunk/SConstruct: build #Source files into LibraryLocal's
+ build dir instead of into #Source
-2007-04-14 kichik
+2007-04-19 21:47 kichik
- * Docs/src/var.but: some formatting
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c: validate $EXEPATH as well
-2007-04-14 kichik
+2007-04-19 21:38 kichik
- * Docs/src/var.but, Source/build.cpp, Source/exehead/Ui.c,
- Source/exehead/util.c, Source/exehead/util.h: added
- $PROGRAMFILES32, $PROGRAMFILES64, $COMMONFILES32 and $COMMONFILES64
+ * /NSIS/trunk/Source/exehead/Main.c: better uninstaller recursion
+ test using the new state_exe_path
-2007-04-14 kichik
+2007-04-19 21:38 kichik
- * Source/exehead/exec.c: don't try deleting from the 32-bit view
- when RegDeleteKeyExA isn't found but g_exec_flags.alter_reg_view is
- set
+ * /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/state.h: added $EXEPATH
-2007-04-14 kichik
+2007-04-19 21:20 kichik
- * Contrib/ExDLL/exdll.h, Docs/src/misc.but, Source/script.cpp,
- Source/tokens.cpp, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/tokens.h: added SetRegView to
- allows access to the x64 registry view this method was chosen over
- a new switch for all regsitry commands to allow easy transition of
- existing scripts
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: size optimization - SetOutPath
+ already sets the working directory so there's no need to pass
+ $OUTDIR to myCreateProcess
-2007-04-13 kichik
+2007-04-19 20:40 kichik
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- implemented RFE #1143843 - Ability to change default reboot
- behavior added MUI_FINISHPAGE_REBOOTLATER_DEFAULT
+ * /NSIS/trunk/Source/build.cpp: don't pre-process "ProgramFilesDir"
+ and "CommonFilesDir" as they are not processed in GetNSISString
-2007-04-13 kichik
+2007-04-19 20:02 kichik
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- fixed bug #1267491 - MUI finish page has unnecessary cancel button
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/util.c:
+ use $PROGRAMFILES for the root of the default $COMMONFILES
+ instead of hard-coding "C:\Program Files"
-2007-04-13 kichik
+2007-04-19 18:24 kichik
- * Source/exehead/Ui.c: instead of forwarding the X button to the
- Next button when the Cancel button is disabled on the last page,
- simply disable the X button when the Cancel button is disabled
- (part of bug #1267491)
+ * /NSIS/trunk/Include/Library.nsh: don't fail when filename starts
+ with a number
-2007-04-13 kichik
+2007-04-18 18:19 kichik
- * SCons/Config/default, SCons/Config/gnu, SCons/Config/ms,
- Source/SConscript: more of bug #1676243 - compiler warnings on
- Linux
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: allocate
+ g_sdata.script_cmd_args as GMEM_MOVEABLE
-2007-04-13 kichik
+2007-04-17 20:49 kichik
- * Source/util.cpp: fixed bug #1699609 - linux CVS FTBFS
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: free riched32.dll
+ outside of the wndproc
-2007-04-13 kichik
+2007-04-17 20:41 kichik
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Modern UI/Language
- files/Afrikaans.nsh: applied patch #1699558 - Afrikaans translation
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: - properly allocate
+ size in AddScriptCmdArgs
+ - do clean-up in WM_DESTROY, not only WM_CLOSE
-2007-04-13 kichik
+2007-04-17 20:05 kichik
- * Contrib/Language files/Afrikaans.nlf, Contrib/Language
- files/SConscript, Contrib/Modern UI/SConscript,
- Docs/src/credits.but: applied patch #1699558 - Afrikaans
- translation
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp: some more warnings of bug
+ #1676243
-2007-04-12 kichik
+2007-04-17 19:12 kichik
- * Source/exehead/exec.c: fixed bug #774966 - CopyFiles return value
- not working on NT4 Sp6
+ * /NSIS/trunk/Source/exehead/Ui.c: don't start showing pages if
+ quit was called in the show function
-2007-04-12 kichik
+2007-04-17 18:30 kichik
- * Source/script.cpp: fixed bug #1699474 - file /a does not preserve
- folder attributes
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript: fixed bug
+ #1701879 - linux LibraryLocal FTBFS
-2007-04-12 kichik
+2007-04-16 22:14 kichik
- * Docs/src/library.but, Include/Library.nsh: applied patch #1699435
- - LIBRARY_IGNORE_VERSION
+ * /NSIS/trunk/Source/Platform.h: CResourceEditor was broken on big
+ endian platforms since 2.24 because IMAGE_NT_OPTIONAL_HDR32_MAGIC
+ had improper definition
-2007-04-12 kichik
+2007-04-16 22:12 kichik
- * Contrib/StartMenu/StartMenu.c: signed/unsigned mismatch warning
+ * /NSIS/trunk/Source/ResourceEditor.cpp: tabs to spaces
-2007-04-12 kichik
+2007-04-16 21:17 kichik
- * Contrib/Makensisw/utils.cpp: fixed some warnings
+ * /NSIS/trunk/Docs/src/generalpurpose.but: more details for RFE
+ #971467
-2007-04-12 kichik
+2007-04-16 21:03 kichik
- * Source/ResourceVersionInfo.cpp, Contrib/Makensisw/makensisw.cpp:
- fixed some warnings
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: removed double
+ initialization
-2007-04-12 kichik
+2007-04-16 21:00 kichik
- * Source/script.cpp, Source/util.cpp: replaced WCStrLen with
- winchar_strlen
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: fully intialize
+ g_sdata and delete g_sdata.script_cmd_args
-2007-04-12 kichik
+2007-04-16 20:28 kichik
- * Source/winchar.cpp, Source/winchar.h: winchar_strlen and
- winchar_strdup can use const WCHAR
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript: spaces to
+ tabs
-2007-04-12 kichik
+2007-04-16 20:15 kichik
- * Source/ResourceVersionInfo.cpp, Source/util.cpp, Source/util.h:
- replaced WCStrLen with winchar_strlen
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp,
+ /NSIS/trunk/Source/Platform.h: fixed bug #1701290 - linux FTBFS:
+ stubs and librarylocal
-2007-04-12 kichik
+2007-04-16 07:34 pabs3
- * Source/lang.cpp: fixed some warnings
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.c: Fix warning about
+ uninitialised variable
-2007-04-12 kichik
+2007-04-15 21:34 kichik
- * Source/build.cpp: cast warning
+ * /NSIS/trunk/Include/Library.nsh: use LibraryLocal on POSIX as
+ well
-2007-04-12 kichik
+2007-04-15 21:29 kichik
- * Contrib/Library/RegTool/RegTool.c: cast warning
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript: build as
+ cross platform
-2007-04-11 kichik
+2007-04-15 21:27 kichik
- * Contrib/LangDLL/LangDLL.c: signed/unsigned mismatch warning
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript: added
+ support for POSIX platforms
-2007-04-11 kichik
+2007-04-15 21:12 kichik
- * SCons/Config/default, SCons/Config/gnu, SCons/Config/ms,
- Source/SConscript: added -Wno-non-virtual-dtor for 7zip files on
- gnu configuration for bug #1676243
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: return "no languages
+ available" when combo box is empty of any reason, like no
+ language with matching codepage
-2007-04-11 kichik
+2007-04-15 21:07 kichik
- * Contrib/AdvSplash/advsplash.c: avoid cast warning
+ * /NSIS/trunk/Contrib/Language files/Afrikaans.nlf,
+ /NSIS/trunk/Contrib/Language files/Albanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Language files/Basque.nlf,
+ /NSIS/trunk/Contrib/Language files/Belarusian.nlf,
+ /NSIS/trunk/Contrib/Language files/Breton.nlf,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/Czech.nlf,
+ /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/Estonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Farsi.nlf,
+ /NSIS/trunk/Contrib/Language files/Finnish.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Icelandic.nlf,
+ /NSIS/trunk/Contrib/Language files/Irish.nlf,
+ /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Language files/Latvian.nlf,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Luxembourgish.nlf,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Mongolian.nlf,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nlf,
+ /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/Swedish.nlf,
+ /NSIS/trunk/Contrib/Language files/Thai.nlf,
+ /NSIS/trunk/Contrib/Language files/Turkish.nlf,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/trunk/Contrib/Language files/Uzbek.nlf: added codepage
-2007-04-11 kichik
+2007-04-15 20:39 kichik
- * Contrib/MakeLangId/MakeLangId.cpp: fix signed/unsigned comparison
- warnings
+ * /NSIS/trunk/Source/build.cpp: fixed bug #1701050 - Senseless
+ variable warning
+ better warning - variable never set
-2007-04-11 kichik
+2007-04-14 23:03 kichik
- * Contrib/Makensisw/makensisw.cpp: allow only one script in the
- command line and don't process any arguments after it
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c, /NSIS/trunk/Contrib/Modern
+ UI/System.nsh, /NSIS/trunk/Source/script.cpp: implemented RFE
+ #1564986 - block unsupported language
-2007-04-11 kichik
+2007-04-14 22:30 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp: more clean-up: * removed
- ResetInputScript() * don't edit g_sdata.script for CreateProcess
- * use SetScript in LoadMRUFile * proper and clear allocation of
- g_sdata.compile_command in CompileNSISScript()
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h:
+ implemented RFE #1235616 - Variable to get language *name*
+ added $(^Language)
-2007-04-10 kichik
+2007-04-14 17:04 kichik
- * Contrib/Makensisw/makensisw.cpp: properly initialize
- script_cmd_args for each SetScript
+ * /NSIS/trunk/Docs/src/library.but: nicer options
-2007-04-10 kichik
+2007-04-14 16:58 kichik
- * Contrib/Makensisw/makensisw.cpp: g_sdata.script is expected not
- to be NULL
+ * /NSIS/trunk/Contrib/Library/RegTool/RegTool.c,
+ /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Include/Library.nsh: added x64 support for library
+ macros
-2007-04-10 kichik
+2007-04-14 16:05 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: fixed bug
- #1696534 - Broken Parameter Handling for Makensisw.exe v.2.3 the
- entire command line processing and handling of g_sdata.script is
- overly complex and apparently a bit malfunctioning... for example,
- g_sdata.script, while expected to contain just the file name,
- contains every command line argument passed to makensisw and also
- quotes
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: don't pass ".dll" to
+ myGetProcAddress as GetModuleHandle and LoadLibrary add that
+ automatically
-2007-04-10 kichik
+2007-04-14 15:05 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h:
- added COMPRESSOR_NONE_SELECTED instead of (NCOMPRESSOR)-1
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp: tabs
+ to spaces
-2007-04-09 kichik
+2007-04-14 14:12 kichik
- * Source/exehead/Ui.c: no more need for char* cast
+ * /NSIS/trunk/Source/exehead/exec.c: RegDeleteKeyExA typedef
+ missing return value
-2007-04-09 kichik
+2007-04-14 13:59 kichik
- * Source/exehead/util.c, Source/exehead/util.h: use const char for
- myGetProcAddress
+ * /NSIS/trunk/Docs/src/var.but: some formatting
-2007-04-09 kichik
+2007-04-14 13:54 kichik
- * SConstruct: added a warning to sconf.h, defines.h and version.h
- about automatic generation
+ * /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: added $PROGRAMFILES32,
+ $PROGRAMFILES64, $COMMONFILES32 and $COMMONFILES64
-2007-04-09 kichik
+2007-04-14 12:55 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: applied patch #1683189 -
- [InstallOptions] new control type: "line" added VLine and HLine
+ * /NSIS/trunk/Source/exehead/exec.c: don't try deleting from the
+ 32-bit view when RegDeleteKeyExA isn't found but
+ g_exec_flags.alter_reg_view is set
-2007-04-09 kichik
+2007-04-14 12:50 kichik
- * Contrib/Modern UI/System.nsh: applied patch #1696610 - Reduce
- flicker when using MUI_HEADER_TRANSPARENT_TEXT
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: added SetRegView to allows access to
+ the x64 registry view
+ this method was chosen over a new switch for all regsitry
+ commands to allow easy transition of existing scripts
-2007-04-04 pabs3
+2007-04-13 20:30 kichik
- * Source/Platform.h: Fix FTBFS on Linux due to missing definition
- of MB_USERICON
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: implemented RFE
+ #1143843 - Ability to change default reboot behavior
+ added MUI_FINISHPAGE_REBOOTLATER_DEFAULT
-2007-04-03 kichik
+2007-04-13 20:10 kichik
- * Docs/src/flowcontrol.but, Source/script.cpp,
- Source/exehead/util.c: applied patch #1682748 - installer icon for
- message box
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed bug #1267491 -
+ MUI finish page has unnecessary cancel button
-2007-04-03 kichik
+2007-04-13 19:59 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: applied patch
- #1683186 - [InstallOptions] support for linebreaks in link control
+ * /NSIS/trunk/Source/exehead/Ui.c: instead of forwarding the X
+ button to the Next button when the Cancel button is disabled on
+ the last page, simply disable the X button when the Cancel button
+ is disabled (part of bug #1267491)
-2007-04-03 kichik
+2007-04-13 10:29 kichik
- * Include/Library.nsh: fixed bug #1692761 - Library.nsh warning
- when not using macro UnInstallLib
+ * /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/Source/SConscript: more
+ of bug #1676243 - compiler warnings on Linux
-2007-04-03 kichik
+2007-04-13 09:54 kichik
- * Contrib/UserInfo/UserInfo.c, Contrib/UserInfo/UserInfo.nsi:
- applied patch #1687456 - [UserInfo plugin] Fix for #1684777,
- GetAccountType and Vista
+ * /NSIS/trunk/Source/util.cpp: fixed bug #1699609 - linux CVS FTBFS
-2007-04-02 kichik
+2007-04-12 21:56 kichik
- * Docs/src/bin/halibut/input.c: it's c, not c++
+ * /NSIS/trunk/Contrib/Language files/Afrikaans.nlf,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Afrikaans.nsh,
+ /NSIS/trunk/Contrib/Modern UI/SConscript,
+ /NSIS/trunk/Docs/src/credits.but, /NSIS/trunk/Examples/Modern
+ UI/MultiLanguage.nsi: applied patch #1699558 - Afrikaans
+ translation
-2007-04-02 pabs3
+2007-04-12 20:24 kichik
- * Contrib/ExDLL/exdll.h,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/Makensisw/utils.cpp, Contrib/UserInfo/UserInfo.c,
- Docs/src/bin/halibut/input.c, Source/Platform.h,
- Source/exehead/exec.c: Kill some more compiler warnings under Linux
- and mingw32
+ * /NSIS/trunk/Source/exehead/exec.c: fixed bug #774966 - CopyFiles
+ return value not working on NT4 Sp6
-2007-04-02 kichik
+2007-04-12 19:24 kichik
- * Contrib/Modern UI/Language files/French.nsh: applied patch
- #1676101 - Suggested corrections to MUI French prompts
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1699474 - file /a does
+ not preserve folder attributes
-2007-04-01 kichik
+2007-04-12 17:44 kichik
- * Contrib/NSIS Menu/SConscript: detect wx-config before trying to
- run it (part of bug #1672315)
+ * /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Include/Library.nsh: applied patch #1699435 -
+ LIBRARY_IGNORE_VERSION
-2007-04-01 kichik
+2007-04-11 21:46 kichik
- * Source/Tests/compression.cpp, Source/Tests/mmap.cpp:
- signed/unsigned comparison
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c: signed/unsigned
+ mismatch warning
-2007-03-31 kichik
+2007-04-11 21:42 kichik
- * Scripts/release.py: avoid ".." in ChangeLog
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp: fixed some warnings
-2007-03-31 kichik
+2007-04-11 21:37 kichik
- * Scripts/release.py: log the correct directory
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: replaced WCStrLen with winchar_strlen
-2007-03-31 kichik
+2007-04-11 21:33 kichik
- * Examples/makensis.nsi: Examples\Plugin, not Contrib\ExDLL or
- Contrib\Plugin
+ * /NSIS/trunk/Source/winchar.cpp, /NSIS/trunk/Source/winchar.h:
+ winchar_strlen and winchar_strdup can use const WCHAR
-2007-03-31 kichik
+2007-04-11 21:32 kichik
- * Examples/makensis.nsi: added missing example files
+ * /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/util.cpp: replaced WCStrLen with
+ winchar_strlen
-2007-03-31 kichik
+2007-04-11 21:27 kichik
- * Menu/images/header.gif: 2.25
+ * /NSIS/trunk/Source/lang.cpp: fixed some warnings
-2007-03-31 kichik
+2007-04-11 21:15 kichik
- * Source/DialogTemplate.cpp: don't delete if it wasn't allocated
+ * /NSIS/trunk/Source/build.cpp: cast warning
-2007-03-31 kichik
+2007-04-11 21:00 kichik
- * Docs/src/history.but: 2.25
+ * /NSIS/trunk/Contrib/Library/RegTool/RegTool.c: cast warning
-2007-03-31 kichik
+2007-04-11 20:58 kichik
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/SConscript:
- version bump
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: signed/unsigned mismatch
+ warning
-2007-03-31 kichik
+2007-04-11 20:54 kichik
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: version bump
+ * /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/Source/SConscript: added
+ -Wno-non-virtual-dtor for 7zip files on gnu configuration for bug
+ #1676243
-2007-03-31 pabs3
+2007-04-11 20:49 kichik
- * Contrib/VPatch/oldfile.txt, Contrib/VPatch/newfile.txt: Convert
- LF linefeeds to CRLF
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c: avoid cast warning
-2007-03-31 kichik
+2007-04-11 20:36 kichik
- * Scripts/release.py: use compression for cvs
+ * /NSIS/trunk/Contrib/MakeLangId/MakeLangId.cpp: fix
+ signed/unsigned comparison warnings
-2007-03-31 kichik
+2007-04-11 20:03 kichik
- * Source/DialogTemplate.cpp: fixed access violation in case
- m_vItems[i]->szClass is an int resource
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: allow only one
+ script in the command line and don't process any arguments after
+ it
-2007-03-31 kichik
+2007-04-10 21:07 kichik
- * Docs/src/library.but: unshared dll example
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: more clean-up:
+ * removed ResetInputScript()
+ * don't edit g_sdata.script for CreateProcess
+ * use SetScript in LoadMRUFile
+ * proper and clear allocation of g_sdata.compile_command in
+ CompileNSISScript()
-2007-03-30 kichik
+2007-04-10 20:41 kichik
- * Contrib/Math/SConscript, Contrib/Math/Source/Math.c: use default
- crt entry point
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: properly initialize
+ script_cmd_args for each SetScript
-2007-03-30 kichik
+2007-04-10 20:34 kichik
- * Contrib/Math/Source/MyMath.c: formatting without _floatp10
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: g_sdata.script is
+ expected not to be NULL
-2007-03-30 kichik
+2007-04-10 20:31 kichik
- * Contrib/NSIS Menu/SConscript, Examples/makensis.nsi: distribute
- nsis.exe.manifest for the nsis menu as it's dynamically linked
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: fixed bug #1696534 -
+ Broken Parameter Handling for Makensisw.exe v.2.3
+ the entire command line processing and handling of g_sdata.script
+ is overly complex and apparently a bit malfunctioning... for
+ example, g_sdata.script, while expected to contain just the file
+ name, contains every command line argument passed to makensisw
+ and also quotes
-2007-03-27 kichik
+2007-04-10 19:48 kichik
- * Contrib/NSIS Menu/wx/wxbuild.bat: cd /D so WXWIN on other drives
- will work
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h: added
+ COMPRESSOR_NONE_SELECTED instead of (NCOMPRESSOR)-1
-2007-03-24 kichik
+2007-04-09 19:44 kichik
- * Contrib/Makensisw/jnetlib/asyncdns.cpp,
- Contrib/Makensisw/jnetlib/asyncdns.h, Contrib/zip2exe/main.cpp:
- applied patch #1680556 - fixes to allow zip2exe & Makensisw to
- build in winelib
+ * /NSIS/trunk/Source/exehead/Ui.c: no more need for char* cast
-2007-03-21 kichik
+2007-04-09 18:01 kichik
- * Contrib/StartMenu/StartMenu.c: don't enter message loop when
- window failed creation (because of input error or anything else)
+ * /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: use const char for
+ myGetProcAddress
-2007-03-20 kichik
+2007-04-09 15:40 kichik
- * Contrib/StartMenu/StartMenu.c: fixed bug #1684751 - StartMenu
- accepts empty paths
+ * /NSIS/trunk/SConstruct: added a warning to sconf.h, defines.h and
+ version.h about automatic generation
-2007-03-20 kichik
+2007-04-09 10:52 kichik
- * Contrib/StartMenu/Example.nsi: better error handling
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: applied patch
+ #1683189 - [InstallOptions] new control type: "line"
+ added VLine and HLine
-2007-03-20 kichik
+2007-04-09 10:03 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/SConscript, Contrib/StartMenu/SConscript,
- Contrib/StartMenu/StartMenu.c: size optimization it's official.
- even msdn now says SHGetMalloc returns the same allocator
- CoTaskMemFree uses and a little debugging backs this even on
- Windows 95
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: applied patch #1696610
+ - Reduce flicker when using MUI_HEADER_TRANSPARENT_TEXT
-2007-03-20 kichik
+2007-04-04 08:15 pabs3
- * Include/LogicLib.nsh: not using System.dll for case-sensitive
- comparison anymore
+ * /NSIS/trunk/Source/Platform.h: Fix FTBFS on Linux due to missing
+ definition of MB_USERICON
-2007-03-18 kichik
+2007-04-03 11:19 kichik
- * Scripts/release.py: work around perl's weirdness with executing
- cvs.exe after changing STDOUT for cvs2cl.pl
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ applied patch #1682748 - installer icon for message box
-2007-03-18 kichik
+2007-04-03 10:57 kichik
- * Scripts/release.py: couple of fixes to make cvs2cl.pl run (but
- not work yet(
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: applied
+ patch #1683186 - [InstallOptions] support for linebreaks in link
+ control
-2007-03-18 kichik
+2007-04-03 10:47 kichik
- * SCons/Config/gnu: more of bug #1635841 - gcc strict-aliasing and
- build system
+ * /NSIS/trunk/Include/Library.nsh: fixed bug #1692761 - Library.nsh
+ warning when not using macro UnInstallLib
-2007-03-18 kichik
+2007-04-03 10:02 kichik
- * Docs/src/compiler.but, Source/build.cpp,
- Source/Tests/preprocessor.nsi: more of patch #1644712 - new
- compiler predefines
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.nsi: applied patch #1687456
+ - [UserInfo plugin] Fix for #1684777, GetAccountType and Vista
-2007-03-15 pabs3
+2007-04-02 10:54 kichik
- * Scripts/release.py: applied patch #1680508 - generate a ChangeLog
- at release time
+ * /NSIS/trunk/Docs/src/bin/halibut/input.c: it's c, not c++
-2007-03-15 pabs3
+2007-04-02 10:29 pabs3
- * Contrib/ExDLL/SConscript: fixed bug #1680944: Woooops, add the
- SConscript for ExDLL
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Docs/src/bin/halibut/input.c,
+ /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/Platform.h:
+ Kill some more compiler warnings under Linux and mingw32
-2007-03-12 pabs3
+2007-04-01 21:27 kichik
- * INSTALL, SConstruct, Docs/src/generalpurpose.but,
- Docs/src/tutorial.but: Install the example plugin and C header by
- default
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: applied
+ patch #1676101 - Suggested corrections to MUI French prompts
-2007-03-11 pabs3
+2007-04-01 18:00 kichik
- * Source/lang.cpp: Missed a warning
+ * /NSIS/trunk/Contrib/NSIS Menu/SConscript: detect wx-config before
+ trying to run it (part of bug #1672315)
-2007-03-11 pabs3
+2007-04-01 17:38 kichik
- * Contrib/BgImage/BgImage.cpp,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/MakeLangId/MakeLangId.cpp, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/noclib.h,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- Contrib/Makensisw/version.cpp, Contrib/Makensisw/jnetlib/util.cpp,
- Contrib/Math/Source/MyMath.c, Contrib/Math/Source/MyMath.h,
- Contrib/Math/Source/plugin.c, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/util.cpp, Contrib/StartMenu/StartMenu.c,
- Contrib/UserInfo/UserInfo.c, Contrib/VPatch/Source/GenPat/main.cpp,
- Contrib/VPatch/Source/Plugin/checksum.h, Contrib/nsExec/nsexec.c,
- Contrib/zip2exe/main.cpp, Source/Tests/endian.cpp,
- Source/Tests/textrunner.cpp: Kill some compiler warnings under
- Linux and mingw32
+ * /NSIS/trunk/Source/Tests/compression.cpp,
+ /NSIS/trunk/Source/Tests/mmap.cpp: signed/unsigned comparison
-2007-03-10 kichik
+2007-03-31 16:11 kichik
- * Include/Memento.nsh: don't Return from macro, use Goto
+ * /NSIS/trunk/Scripts/release.py: avoid ".." in ChangeLog
-2007-03-10 kichik
+2007-03-31 14:47
- * Examples/Memento.nsi: use HKCU
+ * /NSIS/tags/v225, /NSIS/tags/v225/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v225/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v225/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v225/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v225'.
-2007-03-10 kichik
+2007-03-31 14:47 kichik
- * Include/Memento.nsh: typo
+ * /NSIS/trunk/Scripts/release.py: log the correct directory
-2007-03-10 kichik
+2007-03-31 13:51 kichik
- * Examples/SConscript, Examples/makensis.nsi, Examples/Memento.nsi,
- Include/Memento.nsh, Include/SConscript: remember previously
- selected sections
+ * /NSIS/trunk/Examples/makensis.nsi: Examples\Plugin, not
+ Contrib\ExDLL or Contrib\Plugin
-2007-03-10 kichik
+2007-03-31 13:48 kichik
- * Source/tokens.cpp: it's /o not /0
+ * /NSIS/trunk/Examples/makensis.nsi: added missing example files
-2007-03-10 kichik
+2007-03-31 13:42 kichik
- * Include/LogicLib.nsh: LOGICLIB_SECTIONCMP is no longer required
+ * /NSIS/trunk/Menu/images/header.gif: 2.25
-2007-03-09 kichik
+2007-03-31 13:36 kichik
- * Contrib/NSIS Menu/wx/wxbuild.bat: cd to the right directory
+ * /NSIS/trunk/Source/DialogTemplate.cpp: don't delete if it wasn't
+ allocated
-2007-03-09 kichik
+2007-03-31 12:38 kichik
- * Contrib/NSIS Menu/wx/wxbuild.bat: removed /Q from rd - ask to be
- sure
+ * /NSIS/trunk/Docs/src/history.but: 2.25
-2007-03-09 kichik
+2007-03-31 11:47 kichik
- * Contrib/NSIS Menu/wx/wxbuild.bat: applied patch #1677482 -
- wxbuild.bat for paths with spaces
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/SConscript: version bump
-2007-03-09 kichik
+2007-03-31 11:29 kichik
- * Contrib/NSIS Menu/nsismenu/nsismenu.cpp: fixed bug #1667976 - new
- nsis menu is larger
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: version bump
-2007-03-08 pabs3
+2007-03-31 11:24 pabs3
- * Contrib/NSIS Menu/SConscript, Contrib/NSIS
- Menu/nsismenu/nsismenu.cpp, Contrib/NSIS Menu/nsismenu/nslinks.cpp:
- partially fixed bug #1672315: NSIS Menu not portable to Linux wxGTK
+ * /NSIS/trunk/Contrib/VPatch/newfile.txt,
+ /NSIS/trunk/Contrib/VPatch/oldfile.txt: Convert LF linefeeds to
+ CRLF
-2007-03-07 kichik
+2007-03-31 10:47 kichik
- * Docs/src/headers.but: typo
+ * /NSIS/trunk/Scripts/release.py: use compression for cvs
-2007-03-07 pabs3
+2007-03-31 09:21 kichik
- * Source/exehead/exec.c: FTBFS due to using the wrong log_printf
- function
+ * /NSIS/trunk/Source/DialogTemplate.cpp: fixed access violation in
+ case m_vItems[i]->szClass is an int resource
-2007-03-06 kichik
+2007-03-30 21:49 kichik
- * Source/exehead/exec.c: report error in log for WriteReg* when
- RegSetValueEx itself fails and not only RegCreateKeyEx
+ * /NSIS/trunk/Docs/src/library.but: unshared dll example
-2007-03-06 kichik
+2007-03-30 19:44 kichik
- * SCons/Config/ms: listing file is fun
+ * /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Contrib/Math/Source/Math.c: use default crt entry
+ point
-2007-03-06 kichik
+2007-03-30 19:40 kichik
- * Source/exehead/Ui.c, Source/exehead/util.c,
- Source/exehead/util.h: size optimization it's official. even msdn
- now says SHGetMalloc returns the same allocator CoTaskMemFree uses
- and a little debugging backs this even on Windows 95
+ * /NSIS/trunk/Contrib/Math/Source/MyMath.c: formatting without
+ _floatp10
-2007-03-04 kichik
+2007-03-30 16:30 kichik
- * Source/exehead/fileform.c: size optimization - GlobalFree isn't
- called in any other case, no need here as well
+ * /NSIS/trunk/Contrib/NSIS Menu/SConscript,
+ /NSIS/trunk/Examples/makensis.nsi: distribute nsis.exe.manifest
+ for the nsis menu as it's dynamically linked
-2007-03-04 kichik
+2007-03-27 19:14 kichik
- * Docs/src/build.but: fixed cross-reference
+ * /NSIS/trunk/Contrib/NSIS Menu/wx/wxbuild.bat: cd /D so WXWIN on
+ other drives will work
-2007-03-04 kichik
+2007-03-24 13:55 kichik
- * Docs/src/history.but: it's MSTOOLKIT not MSVCTOOLKIT
+ * /NSIS/trunk/Contrib/Makensisw/jnetlib/asyncdns.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/asyncdns.h,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp: applied patch #1680556 -
+ fixes to allow zip2exe & Makensisw to build in winelib
-2007-03-03 kichik
+2007-03-20 22:28 kichik
- * INSTALL, Docs/src/build.but: missing comma
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c: don't enter message
+ loop when window failed creation (because of input error or
+ anything else)
-2007-03-03 kichik
+2007-03-20 21:44 kichik
- * Source/exehead/Main.c: oops... comment line continuation
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c: fixed bug #1684751 -
+ StartMenu accepts empty paths
-2007-03-03 kichik
+2007-03-20 21:42 kichik
- * Source/exehead/Ui.c: size optimization - use don't add "Locale"
- twice to data section
+ * /NSIS/trunk/Contrib/StartMenu/Example.nsi: better error handling
-2007-03-03 kichik
+2007-03-20 21:33 kichik
- * Source/build.cpp, Source/build.h, Source/fileform.cpp,
- Source/exehead/Main.c, Source/exehead/fileform.h,
- Source/exehead/util.c: size optimization - use GetNSISString to do
- complicated stirng processing
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/SConscript,
+ /NSIS/trunk/Contrib/StartMenu/SConscript,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c: size optimization
+ it's official. even msdn now says SHGetMalloc returns the same
+ allocator CoTaskMemFree uses and a little debugging backs this
+ even on Windows 95
-2007-03-03 kichik
+2007-03-20 19:38 kichik
- * Source/exehead/exec.c, Source/script.cpp: size optimization - no
- need for both GetEnvironmentVariable and ExpandEnvironmentStrings
+ * /NSIS/trunk/Include/LogicLib.nsh: not using System.dll for
+ case-sensitive comparison anymore
-2007-03-03 kichik
+2007-03-18 20:03 kichik
- * Docs/src/build.but, INSTALL: more on building and installing
- without cross-compiler on posix
+ * /NSIS/trunk/Scripts/release.py: work around perl's weirdness with
+ executing cvs.exe after changing STDOUT for cvs2cl.pl
-2007-03-03 kichik
+2007-03-18 19:23 kichik
- * Docs/src/intro.but: match language number on site
+ * /NSIS/trunk/Scripts/release.py: couple of fixes to make cvs2cl.pl
+ run (but not work yet(
-2007-03-03 kichik
+2007-03-18 18:34 kichik
- * Source/exehead/Main.c: fixed uninstallers processing of /D=
- realcmds might point exactly to cmdline, so zeroing cmdline-2 may
- not affect it instead, zero cmdline-2, cmdline-1, cmdline and
- cmdline+1 (entire " /D=")
+ * /NSIS/trunk/SCons/Config/gnu: more of bug #1635841 - gcc
+ strict-aliasing and build system
-2007-03-03 kichik
+2007-03-18 18:33 kichik
- * Docs/src/langs.but: default UI language
+ * /NSIS/trunk/Docs/src/compiler.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/Tests/preprocessor.nsi: more of patch #1644712
+ - new compiler predefines
-2007-03-02 kichik
+2007-03-15 02:49 pabs3
- * SConstruct: actually working LIBPATH and CPPPATH options (renamed
- to APPEND_*)
+ * /NSIS/trunk/Scripts/release.py: applied patch #1680508 - generate
+ a ChangeLog at release time
-2007-03-02 kichik
+2007-03-15 00:43 pabs3
- * Contrib/NSIS Menu/SConscript, SConstruct: append nsis menu
- include/lib paths in the sconscript
+ * /NSIS/trunk/Contrib/ExDLL/SConscript: fixed bug #1680944:
+ Woooops, add the SConscript for ExDLL
-2007-03-02 kichik
+2007-03-12 10:07 pabs3
- * Contrib/NSIS Menu/SConscript, SCons/Config/default,
- SCons/Config/gnu, SCons/Config/ms: added MSVCRT_FLAG
+ * /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/INSTALL,
+ /NSIS/trunk/SConstruct: Install the example plugin and C header
+ by default
-2007-03-02 kichik
+2007-03-11 16:49 pabs3
- * Contrib/Makensisw/utils.cpp: allocate memory for "--" as well
+ * /NSIS/trunk/Source/lang.cpp: Missed a warning
-2007-03-02 pabs3
+2007-03-11 15:58 pabs3
- * Contrib/Makensisw/utils.cpp, Source/Platform.h,
- Source/makenssi.cpp: fixed bug #1661503: inconsistency between
- Win32/Linux makensis command line options
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/MakeLangId/MakeLangId.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/util.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.c,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.h,
+ /NSIS/trunk/Contrib/Math/Source/plugin.c,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/util.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/main.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/checksum.h,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Source/Tests/endian.cpp,
+ /NSIS/trunk/Source/Tests/textrunner.cpp: Kill some compiler
+ warnings under Linux and mingw32
-2007-03-01 kichik
+2007-03-10 17:49 kichik
- * Contrib/StartMenu/SConscript, SConstruct: fixed bug #1670741 -
- NSIS Menu can't be built on linux due to .rc & .cpp -> .o added
- automatic code that changes the target name of resource files to
- something slightly unique
+ * /NSIS/trunk/Include/Memento.nsh: don't Return from macro, use
+ Goto
-2007-02-27 kichik
+2007-03-10 17:49 kichik
- * Source/script.cpp, Source/tokens.cpp, Docs/src/defines.but:
- implemented RFE #1669513 - bitwise operators for !define /math
+ * /NSIS/trunk/Examples/Memento.nsi: use HKCU
-2007-02-24 kichik
+2007-03-10 16:24 kichik
- * NSIS.exe, SConstruct, Contrib/NSIS Menu/Info.txt, Contrib/NSIS
- Menu/SConscript, Contrib/NSIS Menu/nsismenu/nsismenu.cpp,
- Contrib/NSIS Menu/nsismenu/nsismenu.sln, Contrib/NSIS
- Menu/nsismenu/nsismenu.vcproj, Contrib/NSIS
- Menu/nsismenu/nslinks.cpp, Contrib/NSIS Menu/wx/build.txt,
- Contrib/NSIS Menu/wx/setup.h, Contrib/NSIS Menu/wx/wxbuild.bat,
- Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/intro.html, Menu/notinstalled.html, Menu/update.html,
- Menu/websites.html: build NSIS Menu from source (requires
- wxWidgets)
+ * /NSIS/trunk/Include/Memento.nsh: typo
-2007-02-24 kichik
+2007-03-10 14:41 kichik
- * SCons/Config/ms: applied patch #1667950 - Silence spurious
- warnings when compiling with VC8
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/Memento.nsi,
+ /NSIS/trunk/Examples/SConscript, /NSIS/trunk/Include/Memento.nsh,
+ /NSIS/trunk/Include/SConscript: remember previously selected
+ sections
-2007-02-24 kichik
+2007-03-10 14:16 kichik
- * Contrib/Math/Source/Math.c, Source/Tests/decompress.cpp: fixed
- bug #1667637 - build, test failures in nsis CVS on Debian GNU/Linux
+ * /NSIS/trunk/Source/tokens.cpp: it's /o not /0
-2007-02-24 kichik
+2007-03-10 12:55 kichik
- * Contrib/Math/Source/Math.c: fixed vc7 build errors
+ * /NSIS/trunk/Include/LogicLib.nsh: LOGICLIB_SECTIONCMP is no
+ longer required
-2007-02-23 kichik
+2007-03-09 18:50 kichik
- * Contrib/Makensisw/SConscript: it's WIN32_LEAN_AND_MEAN, not
- WIN32_MEAN_AND_LEAN and it makes build fail anyway
+ * /NSIS/trunk/Contrib/NSIS Menu/wx/wxbuild.bat: cd to the right
+ directory
-2007-02-23 kichik
+2007-03-09 18:13 kichik
- * Contrib/Math/SConscript, Contrib/Math/Source/Math.c,
- Contrib/Math/Source/MyMath.c, Contrib/Math/Source/MyMath.h,
- Contrib/Math/Source/Math.sln, Contrib/Math/Source/Math.vcproj,
- Contrib/Math/Source/mathcrt.h, Contrib/Math/Source/mathcrt.lib,
- Contrib/Math/Source/mathcrtmt.lib: removed vauge mathcrt.lib
+ * /NSIS/trunk/Contrib/NSIS Menu/wx/wxbuild.bat: removed /Q from rd
+ - ask to be sure
-2007-02-23 kichik
+2007-03-09 18:11 kichik
- * Examples/Modern UI/StartMenu.nsi: fixed bug #1664957 - Vista
- Start Menu
+ * /NSIS/trunk/Contrib/NSIS Menu/wx/wxbuild.bat: applied patch
+ #1677482 - wxbuild.bat for paths with spaces
-2007-02-23 kichik
+2007-03-09 15:56 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp:
- implemeneted RFE #1666501 - MakeNSISw: esc -> close
+ * /NSIS/trunk/Contrib/NSIS Menu/nsismenu/nsismenu.cpp: fixed bug
+ #1667976 - new nsis menu is larger
-2007-02-23 kichik
+2007-03-08 01:47 pabs3
- * Source/Tests/decompress.cpp: fixed bug #1666873 - LZMA test
- segfault on Debian GNU/Linux
+ * /NSIS/trunk/Contrib/NSIS Menu/nsismenu/nsismenu.cpp,
+ /NSIS/trunk/Contrib/NSIS Menu/nsismenu/nslinks.cpp,
+ /NSIS/trunk/Contrib/NSIS Menu/SConscript: partially fixed bug
+ #1672315: NSIS Menu not portable to Linux wxGTK
-2007-02-23 ballison
+2007-03-07 18:55 kichik
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/lang.h,
- Source/exehead/state.h, Source/exehead/ui.h, Source/exehead/util.c,
- Source/exehead/util.h: * TCHAR implementation. A few TODO's (grep
- for <benski>) * a few fixups to get ready for 64bit compilation
- (lots to do still) * don't even think about using this yet. Still
- have to fixup makensis! * TODO: find bugs where it was assumed that
- sizeof(somestr) == strlen(somestr), especially with registry
- functions
+ * /NSIS/trunk/Docs/src/headers.but: typo
-2007-02-23 ballison
+2007-03-07 09:26 pabs3
- * Source/Platform.h, Source/exehead/fileform.h,
- Source/exehead/util.c, Source/exehead/util.h: 64bit fixups
+ * /NSIS/trunk/Source/exehead/exec.c: FTBFS due to using the wrong
+ log_printf function
-2007-02-20 kichik
+2007-03-06 21:22 kichik
- * Include/Sections.nsh: fixed bug #1664648 - Sections.nsh doesn't
- like $0
+ * /NSIS/trunk/Source/exehead/exec.c: report error in log for
+ WriteReg* when RegSetValueEx itself fails and not only
+ RegCreateKeyEx
-2007-02-20 kichik
+2007-03-06 21:14 kichik
- * Source/exehead/Ui.c: fixed bug #1664428 - LicenseForceSelection
- validation check can be easily skipped rollback 1.269 as lParam can
- be NULL, as in this case
+ * /NSIS/trunk/SCons/Config/ms: listing file is fun
-2007-02-20 kichik
+2007-03-06 20:35 kichik
- * Contrib/Modern UI/Language files/Galician.nsh: fixed bug #1663795
- - Galician language is broken in MUI installers
+ * /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: size optimization
+ it's official. even msdn now says SHGetMalloc returns the same
+ allocator CoTaskMemFree uses and a little debugging backs this
+ even on Windows 95
-2007-02-20 kichik
+2007-03-04 19:53 kichik
- * Examples/Modern UI/MultiLanguage.nsi: added Galician for the
- compliation tests
+ * /NSIS/trunk/Source/exehead/fileform.c: size optimization -
+ GlobalFree isn't called in any other case, no need here as well
-2007-02-17 kichik
+2007-03-04 18:49 kichik
- * Docs/src/attributes.but, Docs/src/tutorial.but: applied patch
- #1662419 - Documentation typo fixes
+ * /NSIS/trunk/Docs/src/build.but: fixed cross-reference
-2007-02-17 kichik
+2007-03-04 17:00 kichik
- * Source/winchar.cpp, Source/winchar.h: copyright notice
+ * /NSIS/trunk/Docs/src/history.but: it's MSTOOLKIT not MSVCTOOLKIT
-2007-02-17 kichik
+2007-03-03 15:19 kichik
- * Source/exehead/Main.c: applied patch #1660626 - Delete
- "$TEMP\~nsu.tmp" directory on reboot
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/INSTALL: missing
+ comma
-2007-02-17 kichik
+2007-03-03 14:23 kichik
- * Source/exehead/Main.c: fail CopyFile of uninstaller in case it
- already exists this prevents a race condition where Au_.exe is
- deleted by the current uninstaller and created by another
- uninstaller before CopyFile is called
+ * /NSIS/trunk/Source/exehead/Main.c: oops... comment line
+ continuation
-2007-02-17 kichik
+2007-03-03 14:19 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed bug #1661677 -
- InstallOptions MessageBox
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization - use don't
+ add "Locale" twice to data section
-2007-02-17 kichik
+2007-03-03 14:18 kichik
- * Source/ResourceEditor.cpp: use winchar_strdup
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/fileform.cpp: size optimization - use
+ GetNSISString to do complicated stirng processing
-2007-02-17 kichik
+2007-03-03 14:18 kichik
- * Source/DialogTemplate.cpp, Source/script.cpp,
- Source/DialogTemplate.h: fixed bug #1662190 - dialog template
- unicode conversion is lossy
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ size optimization - no need for both GetEnvironmentVariable and
+ ExpandEnvironmentStrings
-2007-02-17 kichik
+2007-03-03 13:21 kichik
- * Source/Tests/winchar.cpp, Source/winchar.cpp, Source/winchar.h:
- added winchar_strdup
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/INSTALL: more on
+ building and installing without cross-compiler on posix
-2007-02-17 kichik
+2007-03-03 13:05 kichik
- * Menu/images/header.gif: 2.24
+ * /NSIS/trunk/Docs/src/intro.but: match language number on site
-2007-02-17 kichik
+2007-03-03 12:49 kichik
- * Docs/src/history.but: 2.24
+ * /NSIS/trunk/Source/exehead/Main.c: fixed uninstallers processing
+ of /D=
+ realcmds might point exactly to cmdline, so zeroing cmdline-2 may
+ not affect it
+ instead, zero cmdline-2, cmdline-1, cmdline and cmdline+1 (entire
+ " /D=")
-2007-02-17 kichik
+2007-03-03 10:31 kichik
- * Include/TextFunc.nsh: clear error flag in
- _TextFunc_TempFileForFile
+ * /NSIS/trunk/Docs/src/langs.but: default UI language
-2007-02-17 kichik
+2007-03-02 20:33 kichik
- * Docs/src/compiler.but: named scope predefines label
-
-2007-02-17 kichik
-
- * Source/ResourceEditor.cpp: align strings on 4 byte boundary and
- don't write NULL termination twice
-
-2007-02-17 kichik
-
- * Source/exehead/util.c: size optimization
-
-2007-02-17 kichik
-
- * Contrib/InstallOptions/InstallerOptions.cpp: always terminate
- lpFilteredData with NULL, even if no numbers are found in lpData
-
-2007-02-16 kichik
-
- * Source/DialogTemplate.cpp: more typos
-
-2007-02-16 kichik
-
- * Source/7zip/7zGuids.cpp, Source/7zip/LZMADecode.c,
- Source/7zip/LZMADecode.h, Source/7zip/copying.txt,
- Source/7zip/readme.txt, Source/7zip/sdk.diff,
- Source/7zip/7zip/Common/InBuffer.cpp,
- Source/7zip/7zip/Common/InBuffer.h,
- Source/7zip/7zip/Common/OutBuffer.cpp,
- Source/7zip/7zip/Common/OutBuffer.h,
- Source/7zip/7zip/Common/StdAfx.h,
- Source/7zip/7zip/Common/StreamUtils.cpp,
- Source/7zip/7zip/Common/StreamUtils.h,
- Source/7zip/7zip/Compress/LZMA/LZMA.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/7zip/7zip/Compress/LZMA/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
- Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZInWindow.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/7zip/ICoder.h, Source/7zip/7zip/IStream.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
- Source/7zip/7zip/Compress/LZ/StdAfx.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
- Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
- Source/7zip/Common/Alloc.cpp, Source/7zip/Common/Alloc.h,
- Source/7zip/Common/CRC.cpp, Source/7zip/Common/CRC.h,
- Source/7zip/Common/Defs.h, Source/7zip/Common/MyCom.h,
- Source/7zip/Common/MyGuidDef.h, Source/7zip/Common/MyUnknown.h,
- Source/7zip/Common/MyWindows.h, Source/7zip/Common/StdAfx.h,
- Source/7zip/Common/Types.h, Source/Tests/SConscript,
- Source/Tests/endian.cpp, Source/Tests/DialogTemplate.cpp,
- Source/Tests/ResourceEditor.cpp, Source/Tests/compression.cpp,
- Source/Tests/decompress.cpp, Source/Tests/decompress.h,
- Source/Tests/memcpy.c, Source/Tests/mmap.cpp,
- Source/Tests/preprocessor.nsi, Source/Tests/root.txt,
- Source/Tests/winchar.cpp, Source/bzip2/blocksort.c,
- Source/bzip2/Readme.txt, Source/bzip2/bzlib.c,
- Source/bzip2/bzlib.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/huffman.c,
- Source/exehead/Main.c, Source/exehead/SConscript,
- Source/exehead/Ui.c, Source/exehead/afxres.h,
- Source/exehead/bgbg.c, Source/exehead/components.c,
- Source/exehead/components.h, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/exec.h,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/lang.h, Source/exehead/state.h, Source/exehead/ui.h,
- Source/exehead/util.c, Source/exehead/util.h,
- Source/zlib/DEFLATE.H, Source/zlib/INFBLOCK.C, Source/zlib/ZCONF.H,
- Source/zlib/ZLIB.H, Source/zlib/ZUTIL.H, Source/zlib/deflate.c,
- Source/zlib/trees.c: sync with HEAD
-
-2007-02-16 kichik
-
- * Examples/FileFunc.nsi, Examples/FileFuncTest.nsi,
- Examples/Library.nsi, Examples/SConscript, Examples/TextFunc.nsi,
- Examples/TextFuncTest.nsi, Examples/WordFuncTest.nsi,
- Examples/bigtest.nsi, Examples/makensis.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/WelcomeFinish.nsi, Include/FileFunc.nsh,
- Include/Library.nsh, Include/LogicLib.nsh, Include/SConscript,
- Include/TextFunc.nsh, Include/WinVer.nsh, Include/WordFunc.nsh,
- Include/x64.nsh, Menu/docs.html, Menu/index.html, Menu/intro.html,
- Menu/update.html, Menu/websites.html, SCons/config.py,
- SCons/utils.py, Scripts/release.py, Source/DialogTemplate.cpp,
- Source/DialogTemplate.h, Source/Platform.h, Source/Plugins.cpp,
- Source/Plugins.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/ResourceVersionInfo.cpp,
- Source/ResourceVersionInfo.h, Source/SConscript,
- Source/ShConstants.cpp, Source/ShConstants.h, Source/afxres.h,
- Source/build.cpp, Source/build.h, Source/cbzip2.h,
- Source/clzma.cpp, Source/clzma.h, Source/compressor.h,
- Source/crc32.c, Source/czlib.h, Source/dirreader.cpp,
- Source/dirreader.h, Source/growbuf.cpp, Source/growbuf.h,
- Source/lang.cpp, Source/lang.h, Source/lineparse.cpp,
- Source/lineparse.h, Source/makenssi.cpp, Source/mmap.cpp,
- Source/mmap.h, Source/script.cpp, Source/strlist.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/tokens.h,
- Source/uservars.h, Source/util.cpp, Source/util.h, Source/crc32.h,
- Source/fileform.cpp, Source/fileform.h, Source/manifest.cpp,
- Source/manifest.h, Source/winchar.cpp, Source/winchar.h,
- Source/writer.cpp, Source/writer.h, Menu/images/header-notext.gif,
- Menu/images/header.gif, SCons/Config/default, SCons/Config/gnu,
- SCons/Config/ms, SCons/Tools/crossmingw.py,
- SCons/Tools/mstoolkit.py: sync with HEAD
-
-2007-02-16 kichik
-
- * Contrib/System/Source/Buffers.c, Contrib/System/Source/System.c,
- Contrib/VPatch/Source/GenPat/POSIXUtil.cpp,
- Contrib/VPatch/Source/GenPat/PatchGenerator.h,
- Contrib/VPatch/Source/GenPat/SConscript,
- Contrib/VPatch/Source/GenPat/main.cpp, Docs/src/SConscript,
- Docs/src/attributes.but, Docs/src/basic.but, Docs/src/build.but,
- Docs/src/callback.but, Docs/src/chm_config.but,
- Docs/src/chmlink.js, Docs/src/compiler.but,
- Docs/src/compilerflags.but, Docs/src/config.but,
- Docs/src/credits.but, Docs/src/defines.but, Docs/src/file.but,
- Docs/src/flowcontrol.but, Docs/src/generalpurpose.but,
- Docs/src/headers.but, Docs/src/history.but, Docs/src/int.but,
- Docs/src/intro.but, Docs/src/jumps.but, Docs/src/library.but,
- Docs/src/license.but, Docs/src/log.but, Docs/src/misc.but,
- Docs/src/script.but, Docs/src/sec.but, Docs/src/sections.but,
- Docs/src/silent.but, Docs/src/tutorial.but, Docs/src/ui.but,
- Docs/src/usage.but, Docs/src/usefulfunc.but, Docs/src/var.but: sync
- with HEAD
-
-2007-02-16 kichik
-
- * Contrib/Library/LibraryLocal/SConscript,
- Contrib/Library/RegTool/SConscript,
- Contrib/Library/TypeLib/TypeLib.cpp,
- Contrib/Makensisw/jnetlib/connection.cpp,
- Contrib/Math/Source/Math.c, Contrib/Math/Source/MyMath.c,
- Contrib/Math/Source/mathcrtmt.lib, Contrib/Math/Source/plugin.c,
- Contrib/Modern UI/Language files/Breton.nsh, Contrib/Modern
- UI/Language files/Bulgarian.nsh, Contrib/Modern UI/Language
- files/Catalan.nsh, Contrib/Modern UI/Language files/Czech.nsh,
- Contrib/Modern UI/Language files/Danish.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/Icelandic.nsh, Contrib/Modern UI/Language files/Italian.nsh,
- Contrib/Modern UI/Language files/Mongolian.nsh, Contrib/Modern
- UI/Language files/Basque.nsh, Contrib/Modern UI/Language
- files/Galician.nsh, Contrib/Modern UI/Language files/Irish.nsh,
- Contrib/Modern UI/Language files/NorwegianNynorsk.nsh,
- Contrib/Modern UI/Language files/Serbian.nsh, Contrib/Modern
- UI/Language files/SerbianLatin.nsh, Contrib/Modern UI/Language
- files/Slovenian.nsh, Contrib/Modern UI/Language files/Spanish.nsh,
- Contrib/Modern UI/Language files/Swedish.nsh, Contrib/Modern
- UI/Language files/Ukrainian.nsh, Contrib/Modern UI/Language
- files/Uzbek.nsh, Contrib/Modern UI/Language files/Valencian.nsh:
- sync with HEAD
-
-2007-02-16 kichik
-
- * Contrib/ExDLL/exdll.h, Contrib/Graphics/SConscript,
- Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html, Contrib/LangDLL/LangDLL.c,
- Contrib/LangDLL/resource.rc, Contrib/Language files/Breton.nlf,
- Contrib/Language files/Bulgarian.nlf, Contrib/Language
- files/Catalan.nlf, Contrib/Language files/Danish.nlf,
- Contrib/Language files/Dutch.nlf, Contrib/Language
- files/Basque.nlf, Contrib/Language files/Finnish.nlf,
- Contrib/Language files/French.nlf, Contrib/Language
- files/Galician.nlf, Contrib/Language files/Hebrew.nlf,
- Contrib/Language files/Icelandic.nlf, Contrib/Language
- files/Italian.nlf, Contrib/Language files/Lithuanian.nlf,
- Contrib/Language files/Mongolian.nlf, Contrib/Language
- files/Polish.nlf, Contrib/Language files/PortugueseBR.nlf,
- Contrib/Language files/Romanian.nlf, Contrib/Language
- files/SConscript, Contrib/Language files/Serbian.nlf,
- Contrib/Language files/SerbianLatin.nlf, Contrib/Language
- files/Slovenian.nlf, Contrib/Language files/Spanish.nlf,
- Contrib/Language files/Swedish.nlf, Contrib/Language
- files/Thai.nlf, Contrib/Language files/Turkish.nlf,
- Contrib/Language files/Ukrainian.nlf, Contrib/Language
- files/Irish.nlf, Contrib/Language files/NorwegianNynorsk.nlf,
- Contrib/Language files/Uzbek.nlf, Contrib/Language
- files/Valencian.nlf, Contrib/MakeLangId/MakeLangId.cpp,
- Contrib/MakeLangId/MakeLangId.xml, Contrib/MakeLangId/SConscript,
- Contrib/MakeLangId/resource.rc, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/SConscript, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/makensisw.xml,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/update.cpp,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- Contrib/Math/SConscript, Contrib/Math/mathtest.nsi, Contrib/Modern
- UI/Changelog.txt, Contrib/Modern UI/License.txt, Contrib/Modern
- UI/Readme.html, Contrib/Modern UI/SConscript, Contrib/Modern
- UI/System.nsh, Contrib/NSIS Menu/SConscript,
- Contrib/NSISdl/asyncdns.cpp, Contrib/NSISdl/asyncdns.h,
- Contrib/NSISdl/httpget.cpp, Contrib/NSISdl/nsisdl.cpp,
- Contrib/StartMenu/StartMenu.c, Contrib/System/System.html,
- Contrib/UIs/SConscript, Contrib/UIs/sdbarker_tiny.rc,
- Contrib/VPatch/Readme.html, Contrib/VPatch/SConscript,
- Contrib/nsExec/nsExec.txt, Contrib/nsExec/nsexec.c,
- Contrib/nsExec/test.nsi, Contrib/zip2exe/SConscript,
- Contrib/zip2exe/main.cpp, Contrib/zip2exe/res.rc, COPYING, INSTALL,
- SConstruct, TODO.txt, license.txt, Contrib/zip2exe/zip2exe.xml,
- Contrib/Graphics/Checks/red.bmp: sync with HEAD
-
-2007-02-15 kichik
-
- * Source/DialogTemplate.cpp: typo (thanks kk)
-
-2007-02-10 kichik
-
- * Source/exehead/exec.c: skip_root returns NULL, if buf1 is NULL,
- so there's no need to check again
-
-2007-02-08 kichik
-
- * Docs/src/callback.but: clarification for patch #1649187 -
- OnInstTypeChange callback
+ * /NSIS/trunk/SConstruct: actually working LIBPATH and CPPPATH
+ options (renamed to APPEND_*)
-2007-02-06 kichik
+2007-03-02 11:36 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: czi's patch for bug
- #1651312
+ * /NSIS/trunk/Contrib/NSIS Menu/SConscript, /NSIS/trunk/SConstruct:
+ append nsis menu include/lib paths in the sconscript
-2007-02-06 kichik
+2007-03-02 11:17 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed bug #1652075 -
- ONLY_NUMBERS Flag (Install Options Plugin) bug
+ * /NSIS/trunk/Contrib/NSIS Menu/SConscript,
+ /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms: added MSVCRT_FLAG
-2007-02-03 kichik
+2007-03-02 09:49 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed bug #1651312 -
- InstallOptions browse button not working
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: allocate memory for "--"
+ as well
-2007-02-03 kichik
+2007-03-02 04:35 pabs3
- * SCons/Config/gnu: fixed bug #1646170 - nsis-2.23 can be built on
- x86_64 hosts
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/Platform.h:
+ fixed bug #1661503: inconsistency between Win32/Linux makensis
+ command line options
-2007-02-02 kichik
+2007-03-01 21:05 kichik
- * COPYING, Docs/src/license.but: add "except where otherwise noted"
- to zlib license general application on the entire package halibut
- is an example of this exception, it's under bsd
+ * /NSIS/trunk/Contrib/StartMenu/SConscript, /NSIS/trunk/SConstruct:
+ fixed bug #1670741 - NSIS Menu can't be built on linux due to .rc
+ & .cpp -> .o
+ added automatic code that changes the target name of resource
+ files to something slightly unique
-2007-02-02 kichik
+2007-02-27 21:04 kichik
- * COPYING: file COPYING was added on branch UNICODE on 2007-02-15
- 22:36:24 +0000
+ * /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: implemented RFE #1669513 - bitwise
+ operators for !define /math
-2007-02-02 kichik
+2007-02-24 18:57 kichik
- * Include/TextFunc.nsh: fixed bug #1631773 - file permission
- problem with ${LineFind}
+ * /NSIS/trunk/Contrib/NSIS Menu/include, /NSIS/trunk/Contrib/NSIS
+ Menu/Info.txt, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.sln, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.vcproj, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nslinks.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/SConscript, /NSIS/trunk/Contrib/NSIS Menu/src,
+ /NSIS/trunk/Contrib/NSIS Menu/wx, /NSIS/trunk/Contrib/NSIS
+ Menu/wx/build.txt, /NSIS/trunk/Contrib/NSIS Menu/wx/setup.h,
+ /NSIS/trunk/Contrib/NSIS Menu/wx/wxbuild.bat,
+ /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/intro.html,
+ /NSIS/trunk/Menu/notinstalled.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html, /NSIS/trunk/SConstruct: build
+ NSIS Menu from source (requires wxWidgets)
-2007-02-02 kichik
+2007-02-24 18:23 kichik
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/SConscript:
- version bump
+ * /NSIS/trunk/SCons/Config/ms: applied patch #1667950 - Silence
+ spurious warnings when compiling with VC8
-2007-02-02 kichik
+2007-02-24 12:16 kichik
- * Contrib/Makensisw/utils.cpp: add menu accelerators to MRU
+ * /NSIS/trunk/Contrib/Math/Source/Math.c,
+ /NSIS/trunk/Source/Tests/decompress.cpp: fixed bug #1667637 -
+ build, test failures in nsis CVS on Debian GNU/Linux
-2007-01-31 kichik
+2007-02-24 11:35 kichik
- * Contrib/ExDLL/exdll.h: include windows.h for HWND, GPTR and
- friends
+ * /NSIS/trunk/Contrib/Math/Source/Math.c: fixed vc7 build errors
-2007-01-30 kichik
+2007-02-23 17:01 kichik
- * Source/DialogTemplate.cpp: winchar_toansi requires WCHAR* not
- WORD*
+ * /NSIS/trunk/Contrib/Makensisw/SConscript: it's
+ WIN32_LEAN_AND_MEAN, not WIN32_MEAN_AND_LEAN and it makes build
+ fail anyway
-2007-01-27 kichik
+2007-02-23 15:10 kichik
- * Docs/src/usage.but, Source/makenssi.cpp: applied patch #1638974 -
- option to set process priority of makensis
+ * /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Contrib/Math/Source/Math.c,
+ /NSIS/trunk/Contrib/Math/Source/Math.sln,
+ /NSIS/trunk/Contrib/Math/Source/Math.vcproj,
+ /NSIS/trunk/Contrib/Math/Source/mathcrt.h,
+ /NSIS/trunk/Contrib/Math/Source/mathcrt.lib,
+ /NSIS/trunk/Contrib/Math/Source/mathcrtmt.lib,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.c,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.h: removed vauge
+ mathcrt.lib
-2007-01-27 kichik
+2007-02-23 12:45 kichik
- * Include/Library.nsh: fixed UnInstallLib for installers
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: fixed bug #1664957
+ - Vista Start Menu
-2007-01-27 kichik
+2007-02-23 12:42 kichik
- * Docs/src/compiler.but: documentation for new predefines
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: implemeneted RFE
+ #1666501 - MakeNSISw: esc -> close
-2007-01-27 kichik
+2007-02-23 12:34 kichik
- * Source/Tests/preprocessor.nsi: !if${global} killed the block
- ignore code
+ * /NSIS/trunk/Source/Tests/decompress.cpp: fixed bug #1666873 -
+ LZMA test segfault on Debian GNU/Linux
- !ifdef a !if${something} !endif # this will close the first !if,
- because ${something} is invalid !endif
+2007-02-23 06:20 ballison
-2007-01-27 kichik
+ * /NSIS/branches/UNICODE/Source/exehead/exec.c,
+ /NSIS/branches/UNICODE/Source/exehead/fileform.c,
+ /NSIS/branches/UNICODE/Source/exehead/fileform.h,
+ /NSIS/branches/UNICODE/Source/exehead/lang.h,
+ /NSIS/branches/UNICODE/Source/exehead/Main.c,
+ /NSIS/branches/UNICODE/Source/exehead/state.h,
+ /NSIS/branches/UNICODE/Source/exehead/Ui.c,
+ /NSIS/branches/UNICODE/Source/exehead/ui.h,
+ /NSIS/branches/UNICODE/Source/exehead/util.c,
+ /NSIS/branches/UNICODE/Source/exehead/util.h: * TCHAR
+ implementation. A few TODO's (grep for <benski>)
+ * a few fixups to get ready for 64bit compilation (lots to do
+ still)
+ * don't even think about using this yet. Still have to fixup
+ makensis!
+ * TODO: find bugs where it was assumed that sizeof(somestr) ==
+ strlen(somestr), especially with registry functions
- * Source/Tests/preprocessor.nsi: file preprocessor.nsi was added on
- branch UNICODE on 2007-02-15 22:50:35 +0000
+2007-02-23 05:02 ballison
-2007-01-27 kichik
+ * /NSIS/branches/UNICODE/Source/exehead/fileform.h,
+ /NSIS/branches/UNICODE/Source/exehead/util.c,
+ /NSIS/branches/UNICODE/Source/exehead/util.h,
+ /NSIS/branches/UNICODE/Source/Platform.h: 64bit fixups
- * Source/Tests/preprocessor.nsi, Source/build.h, Source/script.cpp,
- Source/tokens.cpp: ignored invalid preprocessor commands in ignored
- blocks
+2007-02-20 21:42 kichik
-2007-01-27 kichik
+ * /NSIS/trunk/Include/Sections.nsh: fixed bug #1664648 -
+ Sections.nsh doesn't like $0
- * Source/build.cpp: set __UNINSTALL__ in set_uninstall_mode, as in
- original patch #1644712 PageEx and PageExEnd set uninstall_mode in
- script.cpp, so setting this in set_code_type_predefines doesn't
- work it's probably better to set it in set_uninstall_mode as other
- commands probably use it as well
+2007-02-20 21:34 kichik
-2007-01-27 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1664428 -
+ LicenseForceSelection validation check can be easily skipped
+ rollback 1.269 as lParam can be NULL, as in this case
- * Source/Tests/preprocessor.nsi: tests for patch #1644712 (new
- predefines)
+2007-02-20 20:34 kichik
-2007-01-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Galician.nsh: fixed
+ bug #1663795 - Galician language is broken in MUI installers
- * Source/build.cpp, Source/build.h, Source/tokens.cpp: applied
- patch #1644712 - new compiler predefines
+2007-02-20 20:21 kichik
-2007-01-26 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added Galician
+ for the compliation tests
- * Source/exehead/Main.c: use a different temporary variable now
- that state_command_line is already in use
+2007-02-17 17:36 kichik
-2007-01-26 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/tutorial.but: applied patch #1662419 -
+ Documentation typo fixes
- * Source/exehead/Main.c, Source/exehead/fileform.c: according to
- MSDN, passing NULL as hModule to GetModuleFileName will get the
- path for the executable of the process so there's no need for
- g_hInstance
+2007-02-17 16:34 kichik
-2007-01-26 kichik
+ * /NSIS/trunk/Source/winchar.cpp, /NSIS/trunk/Source/winchar.h:
+ copyright notice
- * Source/exehead/Main.c: process command line before setting
- temporary directory to give the user a chance to use /S
+2007-02-17 15:58 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: applied patch #1660626 -
+ Delete "$TEMP\~nsu.tmp" directory on reboot
- * Source/exehead/fileform.c: set silent flag as early as possible,
- so most crc errors won't appear
+2007-02-17 15:40 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: fail CopyFile of uninstaller
+ in case it already exists
+ this prevents a race condition where Au_.exe is deleted by the
+ current uninstaller and created by another uninstaller before
+ CopyFile is called
- * Source/zlib/INFBLOCK.C, Source/zlib/ZUTIL.H: clean-up for posix
- tests compatibility
+2007-02-17 15:24 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: fixed
+ bug #1661677 - InstallOptions MessageBox
- * Source/Tests/SConscript: lzma needs pthread on posix
+2007-02-17 15:11 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: use winchar_strdup
- * Source/Tests/SConscript: force c, as gcc thinks upper case .C
- extension is c++
+2007-02-17 15:11 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/script.cpp: fixed bug #1662190 - dialog
+ template unicode conversion is lossy
+
+2007-02-17 15:06 kichik
+
+ * /NSIS/trunk/Source/Tests/winchar.cpp,
+ /NSIS/trunk/Source/winchar.cpp, /NSIS/trunk/Source/winchar.h:
+ added winchar_strdup
+
+2007-02-17 11:53
+
+ * /NSIS/tags/v224, /NSIS/tags/v224/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v224/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v224/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v224/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v224'.
+
+2007-02-17 11:53 kichik
+
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Menu/images/header.gif: 2.24
+
+2007-02-17 11:31 kichik
+
+ * /NSIS/trunk/Include/TextFunc.nsh: clear error flag in
+ _TextFunc_TempFileForFile
+
+2007-02-17 11:22 kichik
+
+ * /NSIS/trunk/Docs/src/compiler.but: named scope predefines label
+
+2007-02-17 10:49 kichik
+
+ * /NSIS/trunk/Source/ResourceEditor.cpp: align strings on 4 byte
+ boundary and don't write NULL termination twice
+
+2007-02-17 09:56 kichik
+
+ * /NSIS/trunk/Source/exehead/util.c: size optimization
+
+2007-02-17 09:12 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: always
+ terminate lpFilteredData with NULL, even if no numbers are found
+ in lpData
+
+2007-02-16 18:30 kichik
+
+ * /NSIS/trunk/Source/DialogTemplate.cpp: more typos
+
+2007-02-15 22:50 kichik
+
+ * /NSIS/branches/UNICODE/Contrib/ExDLL/exdll.h,
+ /NSIS/branches/UNICODE/Contrib/Graphics/Checks/red.bmp,
+ /NSIS/branches/UNICODE/Contrib/Graphics/SConscript,
+ /NSIS/branches/UNICODE/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/branches/UNICODE/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/branches/UNICODE/Contrib/InstallOptions/Readme.html,
+ /NSIS/branches/UNICODE/Contrib/LangDLL/LangDLL.c,
+ /NSIS/branches/UNICODE/Contrib/LangDLL/resource.rc,
+ /NSIS/branches/UNICODE/Contrib/Language files/Basque.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Breton.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Catalan.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Danish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Dutch.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Finnish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/French.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Galician.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Hebrew.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Icelandic.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Irish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Italian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Mongolian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language
+ files/NorwegianNynorsk.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Polish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Romanian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/SConscript,
+ /NSIS/branches/UNICODE/Contrib/Language files/Serbian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/SerbianLatin.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Slovenian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Spanish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Swedish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Thai.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Turkish.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Uzbek.nlf,
+ /NSIS/branches/UNICODE/Contrib/Language files/Valencian.nlf,
+ /NSIS/branches/UNICODE/Contrib/Library/LibraryLocal/SConscript,
+ /NSIS/branches/UNICODE/Contrib/Library/RegTool/SConscript,
+ /NSIS/branches/UNICODE/Contrib/Library/TypeLib/TypeLib.cpp,
+ /NSIS/branches/UNICODE/Contrib/MakeLangId/MakeLangId.cpp,
+ /NSIS/branches/UNICODE/Contrib/MakeLangId/MakeLangId.xml,
+ /NSIS/branches/UNICODE/Contrib/MakeLangId/resource.rc,
+ /NSIS/branches/UNICODE/Contrib/MakeLangId/SConscript,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/jnetlib/connection.cpp,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/makensisw.h,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/makensisw.xml,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/Readme.txt,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/resource.h,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/resource.rc,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/SConscript,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/update.cpp,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/utils.cpp,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/utils.h,
+ /NSIS/branches/UNICODE/Contrib/Math/mathtest.nsi,
+ /NSIS/branches/UNICODE/Contrib/Math/SConscript,
+ /NSIS/branches/UNICODE/Contrib/Math/Source/Math.c,
+ /NSIS/branches/UNICODE/Contrib/Math/Source/mathcrtmt.lib,
+ /NSIS/branches/UNICODE/Contrib/Math/Source/MyMath.c,
+ /NSIS/branches/UNICODE/Contrib/Math/Source/plugin.c,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Changelog.txt,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Basque.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Breton.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Bulgarian.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Catalan.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Czech.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Danish.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/French.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Galician.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Icelandic.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Irish.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Italian.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Mongolian.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/NorwegianNynorsk.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Serbian.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/SerbianLatin.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Slovenian.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Spanish.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Swedish.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Ukrainian.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Language files/Uzbek.nsh,
+ /NSIS/branches/UNICODE/Contrib/Modern UI/Language
+ files/Valencian.nsh, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/License.txt, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/Readme.html, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/SConscript, /NSIS/branches/UNICODE/Contrib/Modern
+ UI/System.nsh, /NSIS/branches/UNICODE/Contrib/nsExec/nsexec.c,
+ /NSIS/branches/UNICODE/Contrib/nsExec/nsExec.txt,
+ /NSIS/branches/UNICODE/Contrib/nsExec/test.nsi,
+ /NSIS/branches/UNICODE/Contrib/NSIS Menu/SConscript,
+ /NSIS/branches/UNICODE/Contrib/NSISdl/asyncdns.cpp,
+ /NSIS/branches/UNICODE/Contrib/NSISdl/asyncdns.h,
+ /NSIS/branches/UNICODE/Contrib/NSISdl/httpget.cpp,
+ /NSIS/branches/UNICODE/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/branches/UNICODE/Contrib/StartMenu/StartMenu.c,
+ /NSIS/branches/UNICODE/Contrib/System/Source/Buffers.c,
+ /NSIS/branches/UNICODE/Contrib/System/Source/System.c,
+ /NSIS/branches/UNICODE/Contrib/System/System.html,
+ /NSIS/branches/UNICODE/Contrib/UIs/SConscript,
+ /NSIS/branches/UNICODE/Contrib/UIs/sdbarker_tiny.rc,
+ /NSIS/branches/UNICODE/Contrib/VPatch/Readme.html,
+ /NSIS/branches/UNICODE/Contrib/VPatch/SConscript,
+ /NSIS/branches/UNICODE/Contrib/VPatch/Source/GenPat/main.cpp,
+ /NSIS/branches/UNICODE/Contrib/VPatch/Source/GenPat/PatchGenerator.h,
+ /NSIS/branches/UNICODE/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp,
+ /NSIS/branches/UNICODE/Contrib/VPatch/Source/GenPat/SConscript,
+ /NSIS/branches/UNICODE/Contrib/zip2exe/main.cpp,
+ /NSIS/branches/UNICODE/Contrib/zip2exe/res.rc,
+ /NSIS/branches/UNICODE/Contrib/zip2exe/SConscript,
+ /NSIS/branches/UNICODE/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/branches/UNICODE/COPYING,
+ /NSIS/branches/UNICODE/Docs/src/attributes.but,
+ /NSIS/branches/UNICODE/Docs/src/basic.but,
+ /NSIS/branches/UNICODE/Docs/src/build.but,
+ /NSIS/branches/UNICODE/Docs/src/callback.but,
+ /NSIS/branches/UNICODE/Docs/src/chm_config.but,
+ /NSIS/branches/UNICODE/Docs/src/chmlink.js,
+ /NSIS/branches/UNICODE/Docs/src/compiler.but,
+ /NSIS/branches/UNICODE/Docs/src/compilerflags.but,
+ /NSIS/branches/UNICODE/Docs/src/config.but,
+ /NSIS/branches/UNICODE/Docs/src/credits.but,
+ /NSIS/branches/UNICODE/Docs/src/defines.but,
+ /NSIS/branches/UNICODE/Docs/src/file.but,
+ /NSIS/branches/UNICODE/Docs/src/flowcontrol.but,
+ /NSIS/branches/UNICODE/Docs/src/generalpurpose.but,
+ /NSIS/branches/UNICODE/Docs/src/headers.but,
+ /NSIS/branches/UNICODE/Docs/src/history.but,
+ /NSIS/branches/UNICODE/Docs/src/int.but,
+ /NSIS/branches/UNICODE/Docs/src/intro.but,
+ /NSIS/branches/UNICODE/Docs/src/jumps.but,
+ /NSIS/branches/UNICODE/Docs/src/library.but,
+ /NSIS/branches/UNICODE/Docs/src/license.but,
+ /NSIS/branches/UNICODE/Docs/src/log.but,
+ /NSIS/branches/UNICODE/Docs/src/misc.but,
+ /NSIS/branches/UNICODE/Docs/src/SConscript,
+ /NSIS/branches/UNICODE/Docs/src/script.but,
+ /NSIS/branches/UNICODE/Docs/src/sec.but,
+ /NSIS/branches/UNICODE/Docs/src/sections.but,
+ /NSIS/branches/UNICODE/Docs/src/silent.but,
+ /NSIS/branches/UNICODE/Docs/src/tutorial.but,
+ /NSIS/branches/UNICODE/Docs/src/ui.but,
+ /NSIS/branches/UNICODE/Docs/src/usage.but,
+ /NSIS/branches/UNICODE/Docs/src/usefulfunc.but,
+ /NSIS/branches/UNICODE/Docs/src/var.but,
+ /NSIS/branches/UNICODE/Examples/bigtest.nsi,
+ /NSIS/branches/UNICODE/Examples/FileFunc.nsi,
+ /NSIS/branches/UNICODE/Examples/FileFuncTest.nsi,
+ /NSIS/branches/UNICODE/Examples/Library.nsi,
+ /NSIS/branches/UNICODE/Examples/makensis.nsi,
+ /NSIS/branches/UNICODE/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/branches/UNICODE/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/branches/UNICODE/Examples/Modern UI/WelcomeFinish.nsi,
+ /NSIS/branches/UNICODE/Examples/SConscript,
+ /NSIS/branches/UNICODE/Examples/TextFunc.nsi,
+ /NSIS/branches/UNICODE/Examples/TextFuncTest.nsi,
+ /NSIS/branches/UNICODE/Examples/WordFuncTest.nsi,
+ /NSIS/branches/UNICODE/Include/FileFunc.nsh,
+ /NSIS/branches/UNICODE/Include/Library.nsh,
+ /NSIS/branches/UNICODE/Include/LogicLib.nsh,
+ /NSIS/branches/UNICODE/Include/SConscript,
+ /NSIS/branches/UNICODE/Include/TextFunc.nsh,
+ /NSIS/branches/UNICODE/Include/WinVer.nsh,
+ /NSIS/branches/UNICODE/Include/WordFunc.nsh,
+ /NSIS/branches/UNICODE/Include/x64.nsh,
+ /NSIS/branches/UNICODE/INSTALL,
+ /NSIS/branches/UNICODE/Menu/docs.html,
+ /NSIS/branches/UNICODE/Menu/images/header.gif,
+ /NSIS/branches/UNICODE/Menu/images/header-notext.gif,
+ /NSIS/branches/UNICODE/Menu/index.html,
+ /NSIS/branches/UNICODE/Menu/intro.html,
+ /NSIS/branches/UNICODE/Menu/update.html,
+ /NSIS/branches/UNICODE/Menu/websites.html,
+ /NSIS/branches/UNICODE/SCons/config.py,
+ /NSIS/branches/UNICODE/SCons/Config/default,
+ /NSIS/branches/UNICODE/SCons/Config/gnu,
+ /NSIS/branches/UNICODE/SCons/Config/ms,
+ /NSIS/branches/UNICODE/SCons/Tools/crossmingw.py,
+ /NSIS/branches/UNICODE/SCons/Tools/mstoolkit.py,
+ /NSIS/branches/UNICODE/SCons/utils.py,
+ /NSIS/branches/UNICODE/SConstruct,
+ /NSIS/branches/UNICODE/Scripts/release.py,
+ /NSIS/branches/UNICODE/Source/7zip/7zGuids.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/InBuffer.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/InBuffer.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/OutBuffer.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/OutBuffer.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/StdAfx.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/StreamUtils.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Common/StreamUtils.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/LZInWindow.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZ/StdAfx.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZMA/LZMA.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/LZMA/StdAfx.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/ICoder.h,
+ /NSIS/branches/UNICODE/Source/7zip/7zip/IStream.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/Alloc.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/Common/Alloc.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/CRC.cpp,
+ /NSIS/branches/UNICODE/Source/7zip/Common/CRC.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/Defs.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/MyCom.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/MyGuidDef.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/MyUnknown.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/MyWindows.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/StdAfx.h,
+ /NSIS/branches/UNICODE/Source/7zip/Common/Types.h,
+ /NSIS/branches/UNICODE/Source/7zip/copying.txt,
+ /NSIS/branches/UNICODE/Source/7zip/LZMADecode.c,
+ /NSIS/branches/UNICODE/Source/7zip/LZMADecode.h,
+ /NSIS/branches/UNICODE/Source/7zip/readme.txt,
+ /NSIS/branches/UNICODE/Source/7zip/sdk.diff,
+ /NSIS/branches/UNICODE/Source/afxres.h,
+ /NSIS/branches/UNICODE/Source/build.cpp,
+ /NSIS/branches/UNICODE/Source/build.h,
+ /NSIS/branches/UNICODE/Source/bzip2/blocksort.c,
+ /NSIS/branches/UNICODE/Source/bzip2/bzlib.c,
+ /NSIS/branches/UNICODE/Source/bzip2/bzlib.h,
+ /NSIS/branches/UNICODE/Source/bzip2/compress.c,
+ /NSIS/branches/UNICODE/Source/bzip2/decompress.c,
+ /NSIS/branches/UNICODE/Source/bzip2/huffman.c,
+ /NSIS/branches/UNICODE/Source/bzip2/Readme.txt,
+ /NSIS/branches/UNICODE/Source/cbzip2.h,
+ /NSIS/branches/UNICODE/Source/clzma.cpp,
+ /NSIS/branches/UNICODE/Source/clzma.h,
+ /NSIS/branches/UNICODE/Source/compressor.h,
+ /NSIS/branches/UNICODE/Source/crc32.c,
+ /NSIS/branches/UNICODE/Source/crc32.h,
+ /NSIS/branches/UNICODE/Source/czlib.h,
+ /NSIS/branches/UNICODE/Source/DialogTemplate.cpp,
+ /NSIS/branches/UNICODE/Source/DialogTemplate.h,
+ /NSIS/branches/UNICODE/Source/dirreader.cpp,
+ /NSIS/branches/UNICODE/Source/dirreader.h,
+ /NSIS/branches/UNICODE/Source/exehead/afxres.h,
+ /NSIS/branches/UNICODE/Source/exehead/bgbg.c,
+ /NSIS/branches/UNICODE/Source/exehead/components.c,
+ /NSIS/branches/UNICODE/Source/exehead/components.h,
+ /NSIS/branches/UNICODE/Source/exehead/config.h,
+ /NSIS/branches/UNICODE/Source/exehead/exec.c,
+ /NSIS/branches/UNICODE/Source/exehead/exec.h,
+ /NSIS/branches/UNICODE/Source/exehead/fileform.c,
+ /NSIS/branches/UNICODE/Source/exehead/fileform.h,
+ /NSIS/branches/UNICODE/Source/exehead/lang.h,
+ /NSIS/branches/UNICODE/Source/exehead/Main.c,
+ /NSIS/branches/UNICODE/Source/exehead/SConscript,
+ /NSIS/branches/UNICODE/Source/exehead/state.h,
+ /NSIS/branches/UNICODE/Source/exehead/Ui.c,
+ /NSIS/branches/UNICODE/Source/exehead/ui.h,
+ /NSIS/branches/UNICODE/Source/exehead/util.c,
+ /NSIS/branches/UNICODE/Source/exehead/util.h,
+ /NSIS/branches/UNICODE/Source/fileform.cpp,
+ /NSIS/branches/UNICODE/Source/fileform.h,
+ /NSIS/branches/UNICODE/Source/growbuf.cpp,
+ /NSIS/branches/UNICODE/Source/growbuf.h,
+ /NSIS/branches/UNICODE/Source/lang.cpp,
+ /NSIS/branches/UNICODE/Source/lang.h,
+ /NSIS/branches/UNICODE/Source/lineparse.cpp,
+ /NSIS/branches/UNICODE/Source/lineparse.h,
+ /NSIS/branches/UNICODE/Source/makenssi.cpp,
+ /NSIS/branches/UNICODE/Source/manifest.cpp,
+ /NSIS/branches/UNICODE/Source/manifest.h,
+ /NSIS/branches/UNICODE/Source/mmap.cpp,
+ /NSIS/branches/UNICODE/Source/mmap.h,
+ /NSIS/branches/UNICODE/Source/Platform.h,
+ /NSIS/branches/UNICODE/Source/Plugins.cpp,
+ /NSIS/branches/UNICODE/Source/Plugins.h,
+ /NSIS/branches/UNICODE/Source/ResourceEditor.cpp,
+ /NSIS/branches/UNICODE/Source/ResourceEditor.h,
+ /NSIS/branches/UNICODE/Source/ResourceVersionInfo.cpp,
+ /NSIS/branches/UNICODE/Source/ResourceVersionInfo.h,
+ /NSIS/branches/UNICODE/Source/SConscript,
+ /NSIS/branches/UNICODE/Source/script.cpp,
+ /NSIS/branches/UNICODE/Source/ShConstants.cpp,
+ /NSIS/branches/UNICODE/Source/ShConstants.h,
+ /NSIS/branches/UNICODE/Source/strlist.cpp,
+ /NSIS/branches/UNICODE/Source/strlist.h,
+ /NSIS/branches/UNICODE/Source/Tests/compression.cpp,
+ /NSIS/branches/UNICODE/Source/Tests/decompress.cpp,
+ /NSIS/branches/UNICODE/Source/Tests/decompress.h,
+ /NSIS/branches/UNICODE/Source/Tests/DialogTemplate.cpp,
+ /NSIS/branches/UNICODE/Source/Tests/endian.cpp,
+ /NSIS/branches/UNICODE/Source/Tests/memcpy.c,
+ /NSIS/branches/UNICODE/Source/Tests/mmap.cpp,
+ /NSIS/branches/UNICODE/Source/Tests/preprocessor.nsi,
+ /NSIS/branches/UNICODE/Source/Tests/ResourceEditor.cpp,
+ /NSIS/branches/UNICODE/Source/Tests/root.txt,
+ /NSIS/branches/UNICODE/Source/Tests/SConscript,
+ /NSIS/branches/UNICODE/Source/Tests/winchar.cpp,
+ /NSIS/branches/UNICODE/Source/tokens.cpp,
+ /NSIS/branches/UNICODE/Source/tokens.h,
+ /NSIS/branches/UNICODE/Source/uservars.h,
+ /NSIS/branches/UNICODE/Source/util.cpp,
+ /NSIS/branches/UNICODE/Source/util.h,
+ /NSIS/branches/UNICODE/Source/winchar.cpp,
+ /NSIS/branches/UNICODE/Source/winchar.h,
+ /NSIS/branches/UNICODE/Source/writer.cpp,
+ /NSIS/branches/UNICODE/Source/writer.h,
+ /NSIS/branches/UNICODE/Source/zlib/deflate.c,
+ /NSIS/branches/UNICODE/Source/zlib/DEFLATE.H,
+ /NSIS/branches/UNICODE/Source/zlib/INFBLOCK.C,
+ /NSIS/branches/UNICODE/Source/zlib/trees.c,
+ /NSIS/branches/UNICODE/Source/zlib/ZCONF.H,
+ /NSIS/branches/UNICODE/Source/zlib/ZLIB.H,
+ /NSIS/branches/UNICODE/Source/zlib/ZUTIL.H,
+ /NSIS/branches/UNICODE/TODO.txt: sync with HEAD
+
+2007-02-15 20:01 kichik
+
+ * /NSIS/trunk/Source/DialogTemplate.cpp: typo (thanks kk)
+
+2007-02-10 14:23 kichik
+
+ * /NSIS/trunk/Source/exehead/exec.c: skip_root returns NULL, if
+ buf1 is NULL, so there's no need to check again
+
+2007-02-08 19:48 kichik
+
+ * /NSIS/trunk/Docs/src/callback.but: clarification for patch
+ #1649187 - OnInstTypeChange callback
+
+2007-02-06 20:58 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: czi's
+ patch for bug #1651312
+
+2007-02-06 20:54 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: fixed
+ bug #1652075 - ONLY_NUMBERS Flag (Install Options Plugin) bug
+
+2007-02-03 18:30 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: fixed
+ bug #1651312 - InstallOptions browse button not working
+
+2007-02-02 22:53 kichik
+
+ * /NSIS/trunk/SCons/Config/gnu: fixed bug #1646170 - nsis-2.23 can
+ be built on x86_64 hosts
+
+2007-02-02 21:56 kichik
+
+ * /NSIS/trunk/COPYING, /NSIS/trunk/Docs/src/license.but: add
+ "except where otherwise noted" to zlib license general
+ application on the entire package
+ halibut is an example of this exception, it's under bsd
- * Source/Tests/memcpy.c: file memcpy.c was added on branch UNICODE
- on 2007-02-15 22:50:35 +0000
+2007-02-02 19:51 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Include/TextFunc.nsh: fixed bug #1631773 - file
+ permission problem with ${LineFind}
- * Source/Tests/memcpy.c: util.h isn't really needed and only causes
- problems when compiling the tests
+2007-02-02 16:37 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/SConscript: version bump
- * Source/Tests/decompress.cpp: file decompress.cpp was added on
- branch UNICODE on 2007-02-15 22:50:35 +0000
+2007-02-02 16:34 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: add menu accelerators to
+ MRU
- * Source/Tests/decompress.cpp: gcc doesn't like deleting void*
+2007-01-30 23:11 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h: include windows.h for HWND,
+ GPTR and friends
- * Source/bzip2/bzlib.h, Source/7zip/LZMADecode.h: util.h isn't
- really needed and only causes problems when compiling the tests
+2007-01-30 18:50 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: winchar_toansi requires
+ WCHAR* not WORD*
- * Contrib/nsExec/test.nsi: nsExec::Exec example
+2007-01-27 16:53 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Docs/src/usage.but, /NSIS/trunk/Source/makenssi.cpp:
+ applied patch #1638974 - option to set process priority of
+ makensis
- * Source/Tests/SConscript, Source/Tests/winchar.cpp: added winchar
- tests
+2007-01-27 16:31 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed UnInstallLib for
+ installers
- * Source/Tests/winchar.cpp: file winchar.cpp was added on branch
- UNICODE on 2007-02-15 22:50:35 +0000
+2007-01-27 16:26 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Docs/src/compiler.but: documentation for new
+ predefines
- * Source/winchar.cpp: file winchar.cpp was added on branch UNICODE
- on 2007-02-15 22:46:41 +0000
+2007-01-27 16:01 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/Tests/preprocessor.nsi: !if${global} killed
+ the block ignore code
+
+ !ifdef a
+ !if${something}
+ !endif # this will close the first !if, because ${something} is
+ invalid
+ !endif
- * Source/winchar.cpp: fixed winchar_strcmp
+2007-01-27 15:54 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/Tests/preprocessor.nsi,
+ /NSIS/trunk/Source/tokens.cpp: ignored invalid preprocessor
+ commands in ignored blocks
- * Source/ResourceVersionInfo.cpp: convert all StrToWstrAlloc
+2007-01-27 15:39 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/build.cpp: set __UNINSTALL__ in
+ set_uninstall_mode, as in original patch #1644712
+ PageEx and PageExEnd set uninstall_mode in script.cpp, so setting
+ this in set_code_type_predefines doesn't work
+ it's probably better to set it in set_uninstall_mode as other
+ commands probably use it as well
- * Source/ResourceEditor.cpp: fixed gcc conversion warning/error
+2007-01-27 15:32 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/Tests/preprocessor.nsi: tests for patch
+ #1644712 (new predefines)
- * Source/Platform.h: use same conversion for IS_INTRESOURCE and
- MAKEINTRESOURCE
+2007-01-27 15:32 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/tokens.cpp: applied patch #1644712 - new
+ compiler predefines
- * Source/ResourceVersionInfo.cpp: StrToWstrAlloc ->
- winchar_fromansi
+2007-01-25 22:37 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: use a different temporary
+ variable now that state_command_line is already in use
- * Source/ResourceEditor.cpp: CreateUnicodeString ->
- winchar_fromansi
+2007-01-25 22:24 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c: according to MSDN, passing
+ NULL as hModule to GetModuleFileName will get the path for the
+ executable of the process so there's no need for g_hInstance
- * Source/DialogTemplate.cpp: use winchar
+2007-01-25 22:08 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: process command line before
+ setting temporary directory to give the user a chance to use /S
- * Source/winchar.cpp, Source/winchar.h: add support for codepage
- selection in winchar_*ansi
+2007-01-25 21:29 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c: set silent flag as early
+ as possible, so most crc errors won't appear
- * Source/winchar.h: file winchar.h was added on branch UNICODE on
- 2007-02-15 22:46:41 +0000
+2007-01-25 18:07 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/ZUTIL.H: clean-up for posix tests
+ compatibility
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/script.cpp: GetResourceSize ->
- GetResourceSizeA/GetResourceSizeW
+2007-01-25 17:57 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/Tests/SConscript: lzma needs pthread on posix
- * Source/util.cpp: UpdateResource->UpdateResourceA
+2007-01-25 17:56 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/Tests/SConscript: force c, as gcc thinks upper
+ case .C extension is c++
- * Source/ResourceEditor.cpp, Source/SConscript, Source/winchar.cpp,
- Source/winchar.h: wcs* use wchar_t on POSIX, which is not the same
- as WCHAR so, winchar_* is introduced which uses WCHAR
+2007-01-25 17:50 kichik
-2007-01-25 kichik
+ * /NSIS/trunk/Source/Tests/memcpy.c: util.h isn't really needed and
+ only causes problems when compiling the tests
- * Source/Platform.h: more of patch #1643633
+2007-01-25 17:49 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/Tests/decompress.cpp: gcc doesn't like
+ deleting void*
- * Include/Library.nsh: UnInstallLib is usually used in
- uninstallers, so use un.GetParent instead of GetParent
+2007-01-25 17:44 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/bzip2/bzlib.h: util.h isn't really needed and
+ only causes problems when compiling the tests
- * Source/Platform.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h: applied patch #1643633 - 64bit PE support
- for CResourceEditor
+2007-01-25 15:23 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Contrib/nsExec/test.nsi: nsExec::Exec example
- * Include/Library.nsh: typos
+2007-01-25 14:08 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/Tests/SConscript,
+ /NSIS/trunk/Source/Tests/winchar.cpp: added winchar tests
- * Source/Platform.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/build.cpp, Source/lang.cpp,
- Source/script.cpp: fixed bug #1083492 - resource editor unicode
- conversion is lossy
+2007-01-25 14:07 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/winchar.cpp: fixed winchar_strcmp
- * Source/lineparse.cpp, Source/lineparse.h, Source/script.cpp:
- slight name changes to better fit the "standard"
+2007-01-25 13:27 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/ResourceVersionInfo.cpp: convert all
+ StrToWstrAlloc
- * Source/lineparse.cpp, Source/lineparse.h, Source/script.cpp:
- fixed bug #1554178 - Compiler ignores next line after comment line
- ends with \
+2007-01-25 13:22 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: fixed gcc conversion
+ warning/error
- * Source/exehead/Ui.c: fixed bug #1174184 - end of InstallDir
- appended after browse with custom dir var
+2007-01-25 13:15 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/Platform.h: use same conversion for
+ IS_INTRESOURCE and MAKEINTRESOURCE
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: fixed bug
- #1411970 - Settings in HKLM instead of HKCU?
+2007-01-25 13:09 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/ResourceVersionInfo.cpp: StrToWstrAlloc ->
+ winchar_fromansi
- * Source/ResourceEditor.cpp: make sure the PE is 32-bit and not
- 64-bit (PE32+)
+2007-01-25 13:08 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: CreateUnicodeString ->
+ winchar_fromansi
- * Source/Platform.h: add optional header magic definitions
+2007-01-25 13:07 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: use winchar
- * Include/Library.nsh: use !verbose
+2007-01-25 13:04 kichik
-2007-01-24 kichik
+ * /NSIS/trunk/Source/winchar.cpp, /NSIS/trunk/Source/winchar.h: add
+ support for codepage selection in winchar_*ansi
- * Include/Library.nsh: fixed bug #1097642 - Uninstaller deletes
- components on reboot after reinstall
+2007-01-25 13:02 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp: GetResourceSize ->
+ GetResourceSizeA/GetResourceSizeW
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/script.cpp: fixed bug #1626504 - VIAddVersionKey causes
- problems with localized installers
+2007-01-25 12:58 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/util.cpp: UpdateResource->UpdateResourceA
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: more patch #1634704 updates
+2007-01-25 12:57 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/SConscript, /NSIS/trunk/Source/winchar.cpp,
+ /NSIS/trunk/Source/winchar.h: wcs* use wchar_t on POSIX, which is
+ not the same as WCHAR
+ so, winchar_* is introduced which uses WCHAR
- * Source/build.cpp, Source/exehead/util.c: try CSIDL before
- resorting to registry or API for paths
+2007-01-25 11:22 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/Platform.h: more of patch #1643633
- * Include/x64.nsh: file x64.nsh was added on branch UNICODE on
- 2007-02-15 22:46:34 +0000
+2007-01-24 16:14 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Include/Library.nsh: UnInstallLib is usually used in
+ uninstallers, so use un.GetParent instead of GetParent
- * Include/x64.nsh: proper comment, $SYSDIR doesn't change
+2007-01-24 15:55 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: applied patch #1643633 -
+ 64bit PE support for CResourceEditor
- * Source/exehead/exec.c: fixed bug #1638191 - have RegDLL use
- LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
+2007-01-24 15:25 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Include/Library.nsh: typos
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: applied patch #1634704 - FOCUS
- flag for InstallOptions Plugin
+2007-01-24 15:19 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp: fixed bug #1083492 - resource
+ editor unicode conversion is lossy
- * SConstruct, SCons/Config/gnu: fixed bug #1635841 - gcc
- strict-aliasing and build system - added STRIP, APPEND_CCFLAGS and
- APPEND_LINKFLAGS command line options - added -fno-strict-aliasing
- to stubs and plug-ins
+2007-01-24 13:25 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/lineparse.cpp, /NSIS/trunk/Source/lineparse.h,
+ /NSIS/trunk/Source/script.cpp: slight name changes to better fit
+ the "standard"
- * Source/Tests/SConscript, Source/Tests/compression.cpp,
- Source/Tests/decompress.cpp, Source/Tests/decompress.h,
- Source/Tests/memcpy.c: compression tests
+2007-01-24 13:24 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/lineparse.cpp, /NSIS/trunk/Source/lineparse.h,
+ /NSIS/trunk/Source/script.cpp: fixed bug #1554178 - Compiler
+ ignores next line after comment line ends with \
- * Source/Tests/compression.cpp: file compression.cpp was added on
- branch UNICODE on 2007-02-15 22:50:35 +0000
+2007-01-24 13:08 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1174184 - end of
+ InstallDir appended after browse with custom dir var
- * Source/Tests/decompress.h: file decompress.h was added on branch
- UNICODE on 2007-02-15 22:50:35 +0000
+2007-01-24 12:51 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: fixed bug #1411970 -
+ Settings in HKLM instead of HKCU?
- * Source/cbzip2.h: return >0 only when really finished
+2007-01-24 11:37 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: make sure the PE is 32-bit
+ and not 64-bit (PE32+)
- * Source/bzip2/blocksort.c: no need for #ifdef anymore with the new
- build system
+2007-01-24 11:36 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Source/Platform.h: add optional header magic
+ definitions
- * Source/bzip2/bzlib.c, Source/bzip2/decompress.c,
- Source/bzip2/huffman.c: no need for #ifdef anymore with the new
- build system
+2007-01-24 11:23 kichik
-2007-01-23 kichik
+ * /NSIS/trunk/Include/Library.nsh: use !verbose
- * Menu/websites.html: fixed bug #1642107 - Simple Typo: "an"
- instead of "and"
+2007-01-24 11:19 kichik
-2007-01-22 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed bug #1097642 - Uninstaller
+ deletes components on reboot after reinstall
- * Source/clzma.cpp, Source/compressor.h: don't return 0 from
- CLZMA::Comrpess when finished, return 1
+2007-01-23 21:21 kichik
-2007-01-19 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/script.cpp: fixed
+ bug #1626504 - VIAddVersionKey causes problems with localized
+ installers
- * Contrib/Modern UI/Language files/Galician.nsh: file Galician.nsh
- was added on branch UNICODE on 2007-02-15 22:41:49 +0000
+2007-01-23 20:47 kichik
-2007-01-19 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: more patch
+ #1634704 updates
- * Contrib/Language files/Galician.nlf: file Galician.nlf was added
- on branch UNICODE on 2007-02-15 22:36:17 +0000
+2007-01-23 19:41 kichik
-2007-01-19 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/util.c:
+ try CSIDL before resorting to registry or API for paths
- * Contrib/Language files/Galician.nlf, Contrib/Language
- files/SConscript, Contrib/Modern UI/SConscript,
- Docs/src/credits.but, Contrib/Modern UI/Language
- files/Galician.nsh: patch #1631765 - New Galician translation
- available
+2007-01-23 19:35 kichik
-2007-01-19 kichik
+ * /NSIS/trunk/Include/x64.nsh: proper comment, $SYSDIR doesn't
+ change
- * Source/build.cpp: fixed bug #1631889 - NSIS compiler issues
- erroneous warning on uninstall sections
+2007-01-23 18:16 kichik
-2007-01-19 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: fixed bug #1638191 - have
+ RegDLL use LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed bug #1606716 -
- InstallOptions might send irrelevant NOTIFY for radiobuttons
+2007-01-23 17:33 kichik
-2007-01-19 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: applied patch
+ #1634704 - FOCUS flag for InstallOptions Plugin
- * Source/exehead/Ui.c: size optimization - no need for GetDlgItem,
- WM_COMMAND comes with the lParam = HWND
+2007-01-23 17:01 kichik
-2007-01-16 kichik
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SConstruct: fixed bug
+ #1635841 - gcc strict-aliasing and build system
+ - added STRIP, APPEND_CCFLAGS and APPEND_LINKFLAGS command line
+ options
+ - added -fno-strict-aliasing to stubs and plug-ins
- * SConstruct, Docs/src/SConscript: fixed scons 0.96.94
- compatibility
+2007-01-23 16:05 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/Tests/compression.cpp,
+ /NSIS/trunk/Source/Tests/decompress.cpp,
+ /NSIS/trunk/Source/Tests/decompress.h,
+ /NSIS/trunk/Source/Tests/memcpy.c,
+ /NSIS/trunk/Source/Tests/SConscript: compression tests
- * Menu/images/header.gif: 2.23
+2007-01-23 16:03 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/cbzip2.h: return >0 only when really finished
- * Docs/src/history.but: 2.23
+2007-01-23 14:12 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/bzip2/blocksort.c: no need for #ifdef anymore
+ with the new build system
- * Contrib/VPatch/Readme.html: tabs to spaces
+2007-01-23 13:57 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c: no need for #ifdef anymore
+ with the new build system
- * Source/writer.h: file writer.h was added on branch UNICODE on
- 2007-02-15 22:46:41 +0000
+2007-01-23 09:21 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Menu/websites.html: fixed bug #1642107 - Simple Typo:
+ "an" instead of "and"
- * Source/writer.cpp: file writer.cpp was added on branch UNICODE on
- 2007-02-15 22:46:41 +0000
+2007-01-22 20:01 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/clzma.cpp, /NSIS/trunk/Source/compressor.h:
+ don't return 0 from CLZMA::Comrpess when finished, return 1
- * Source/manifest.cpp: file manifest.cpp was added on branch
- UNICODE on 2007-02-15 22:46:41 +0000
+2007-01-19 20:09 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Contrib/Language files/Galician.nlf,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Galician.nsh,
+ /NSIS/trunk/Contrib/Modern UI/SConscript,
+ /NSIS/trunk/Docs/src/credits.but: patch #1631765 - New Galician
+ translation available
- * Source/manifest.h: file manifest.h was added on branch UNICODE on
- 2007-02-15 22:46:41 +0000
+2007-01-19 19:33 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed bug #1631889 - NSIS compiler
+ issues erroneous warning on uninstall sections
- * Source/crc32.h: file crc32.h was added on branch UNICODE on
- 2007-02-15 22:46:40 +0000
+2007-01-19 19:26 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: fixed
+ bug #1606716 - InstallOptions might send irrelevant NOTIFY for
+ radiobuttons
- * Source/fileform.cpp: file fileform.cpp was added on branch
- UNICODE on 2007-02-15 22:46:41 +0000
+2007-01-19 18:30 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization - no need for
+ GetDlgItem, WM_COMMAND comes with the lParam = HWND
- * Source/fileform.h: file fileform.h was added on branch UNICODE on
- 2007-02-15 22:46:41 +0000
+2007-01-16 21:34 kichik
-2007-01-13 kichik
+ * /NSIS/trunk/Docs/src/SConscript, /NSIS/trunk/SConstruct: fixed
+ scons 0.96.94 compatibility
- * COPYING, Contrib/InstallOptions/Readme.html, Contrib/Modern
- UI/License.txt, Contrib/Modern UI/Readme.html, Contrib/Modern
- UI/System.nsh, Docs/src/chm_config.but, Docs/src/config.but,
- Docs/src/license.but, Source/7zip/LZMADecode.c,
- Source/7zip/LZMADecode.h, Source/Platform.h, Source/Plugins.cpp,
- Source/Plugins.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/ResourceVersionInfo.cpp,
- Source/ResourceVersionInfo.h, Source/ShConstants.cpp,
- Source/afxres.h, Source/build.cpp, Source/build.h, Source/cbzip2.h,
- Source/clzma.cpp, Source/clzma.h, Source/compressor.h,
- Source/crc32.c, Source/crc32.h, Source/czlib.h,
- Source/dirreader.cpp, Source/dirreader.h, Source/fileform.cpp,
- Source/fileform.h, Source/growbuf.cpp, Source/growbuf.h,
- Source/lang.cpp, Source/lang.h, Source/lineparse.cpp,
- Source/lineparse.h, Source/makenssi.cpp, Source/manifest.cpp,
- Source/manifest.h, Source/mmap.cpp, Source/mmap.h,
- Source/script.cpp, Source/strlist.cpp, Source/strlist.h,
- Source/tokens.cpp, Source/tokens.h, Source/util.cpp, Source/util.h,
- Source/writer.cpp, Source/writer.h, Source/bzip2/blocksort.c,
- Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/compress.c, Source/bzip2/decompress.c,
- Source/bzip2/huffman.c, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/afxres.h, Source/exehead/bgbg.c,
- Source/exehead/components.c, Source/exehead/components.h,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/lang.h,
- Source/exehead/state.h, Source/exehead/ui.h, Source/exehead/util.c,
- Source/exehead/util.h, Source/zlib/DEFLATE.H,
- Source/zlib/INFBLOCK.C, Source/zlib/ZCONF.H, Source/zlib/ZLIB.H,
- Source/zlib/ZUTIL.H, Source/zlib/deflate.c, Source/zlib/trees.c:
- 2006 -> 2007
+2007-01-13 18:08
-2006-12-29 kichik
+ * /NSIS/tags/v223, /NSIS/tags/v223/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v223/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v223/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v223/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v223'.
- * Contrib/VPatch/Readme.html: little clear up based on patch
- #1624292 - VPatch docs
+2007-01-13 18:08 kichik
-2006-12-22 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.23
- * Contrib/System/Source/Buffers.c: fixed bug #1620178 -
- System::Store l crash installer when private stack is empty
+2007-01-13 17:50 kichik
-2006-12-15 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.23
- * Contrib/System/Source/System.c: fixed bug #1616267 - System
- plugin crash with parenthesis in filename
+2007-01-13 17:40 kichik
-2006-12-09 kichik
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: tabs to spaces
- * Source/build.cpp, Source/mmap.cpp, Source/mmap.h,
- Source/Tests/mmap.cpp: applied patch #1611866 - Fix
- MMapFile::release(void *pView, int size)
+2007-01-13 17:28 kichik
-2006-12-09 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/License.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh, /NSIS/trunk/COPYING,
+ /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/license.but,
+ /NSIS/trunk/Source/7zip/LZMADecode.c,
+ /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/afxres.h, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.cpp, /NSIS/trunk/Source/clzma.h,
+ /NSIS/trunk/Source/compressor.h, /NSIS/trunk/Source/crc32.c,
+ /NSIS/trunk/Source/crc32.h, /NSIS/trunk/Source/czlib.h,
+ /NSIS/trunk/Source/dirreader.cpp, /NSIS/trunk/Source/dirreader.h,
+ /NSIS/trunk/Source/exehead/afxres.h,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/components.c,
+ /NSIS/trunk/Source/exehead/components.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h,
+ /NSIS/trunk/Source/fileform.cpp, /NSIS/trunk/Source/fileform.h,
+ /NSIS/trunk/Source/growbuf.cpp, /NSIS/trunk/Source/growbuf.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/lineparse.cpp, /NSIS/trunk/Source/lineparse.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/manifest.cpp,
+ /NSIS/trunk/Source/manifest.h, /NSIS/trunk/Source/mmap.cpp,
+ /NSIS/trunk/Source/mmap.h, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/ShConstants.cpp,
+ /NSIS/trunk/Source/strlist.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h,
+ /NSIS/trunk/Source/writer.cpp, /NSIS/trunk/Source/writer.h,
+ /NSIS/trunk/Source/zlib/deflate.c,
+ /NSIS/trunk/Source/zlib/DEFLATE.H,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/trees.c, /NSIS/trunk/Source/zlib/ZCONF.H,
+ /NSIS/trunk/Source/zlib/ZLIB.H, /NSIS/trunk/Source/zlib/ZUTIL.H:
+ 2006 -> 2007
- * Source/script.cpp: some CEXEBuild::doParse cleanup - removed
- last_line_had_slash which was always set to zero - moved
- m_linebuild.resize(0) so it won't free the memory the next
- condition uses, though the line needs to be 64kb for that to happen
- - took care of a coupple of comments
+2006-12-29 12:48 kichik
-2006-12-09 kichik
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: little clear up based on
+ patch #1624292 - VPatch docs
- * Source/Tests/preprocessor.nsi: test block comments in !if blocks
+2006-12-22 12:47 kichik
-2006-12-08 kichik
+ * /NSIS/trunk/Contrib/System/Source/Buffers.c: fixed bug #1620178 -
+ System::Store l crash installer when private stack is empty
- * Contrib/Math/SConscript: fixed bug #1610773 - nsis-2.22 fails to
- install on Linux (mingw32)
+2006-12-15 11:52 kichik
-2006-12-08 kichik
+ * /NSIS/trunk/Contrib/System/Source/System.c: fixed bug #1616267 -
+ System plugin crash with parenthesis in filename
- * Contrib/VPatch/Source/GenPat/POSIXUtil.cpp,
- Contrib/VPatch/Source/GenPat/main.cpp: use the safer mkstemp
- instead of tmpnam
+2006-12-09 15:17 kichik
-2006-12-08 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/mmap.cpp,
+ /NSIS/trunk/Source/mmap.h, /NSIS/trunk/Source/Tests/mmap.cpp:
+ applied patch #1611866 - Fix MMapFile::release(void *pView, int
+ size)
- * Examples/makensis.nsi: fixed bug #1611251 - Uninstalling NSIS
- 2.22 leaves Start menu icons
+2006-12-09 13:08 kichik
-2006-12-06 kichik
+ * /NSIS/trunk/Source/script.cpp: some CEXEBuild::doParse cleanup
+ - removed last_line_had_slash which was always set to zero
+ - moved m_linebuild.resize(0) so it won't free the memory the
+ next condition uses, though the line needs to be 64kb for that to
+ happen
+ - took care of a coupple of comments
- * SCons/Tools/mstoolkit.py: spaces to tabs
+2006-12-09 13:03 kichik
-2006-12-05 kichik
+ * /NSIS/trunk/Source/Tests/preprocessor.nsi: test block comments in
+ !if blocks
- * SCons/Tools/mstoolkit.py: set MSVS_VERSION
+2006-12-08 12:22 kichik
-2006-12-01 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript: fixed bug #1610773 -
+ nsis-2.22 fails to install on Linux (mingw32)
- * Contrib/nsExec/nsexec.c: fixed bug #1605581 - nsExec:ExecToLog is
- unstable in silent mode
+2006-12-08 12:20 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/Contrib/VPatch/Source/GenPat/main.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp: use the
+ safer mkstemp instead of tmpnam
- * Scripts/release.py: properly print todo list
+2006-12-08 11:21 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: fixed bug #1611251 -
+ Uninstalling NSIS 2.22 leaves Start menu icons
- * Scripts/release.py: globalize scons_line
+2006-12-06 06:15 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/SCons/Tools/mstoolkit.py: spaces to tabs
- * Docs/src/history.but: sort 2.22 changes
+2006-12-05 20:59 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/SCons/Tools/mstoolkit.py: set MSVS_VERSION
- * Menu/images/header.gif: 2.22
+2006-12-01 16:29 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: fixed bug #1605581 -
+ nsExec:ExecToLog is unstable in silent mode
- * Include/Library.nsh: $__INSTALLLLIB_SESSIONGUID might as well be
- {000...}, it's no different than 'session' in functionality
+2006-11-27 17:50 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/Scripts/release.py: properly print todo list
- * Docs/src/compilerflags.but: links in SetPluginUnload
+2006-11-27 17:49 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/Scripts/release.py: globalize scons_line
- * Docs/src/generalpurpose.but: minor CallInstDLL description
- improvement
+2006-11-27 16:50
-2006-11-27 kichik
+ * /NSIS/tags/v222, /NSIS/tags/v222/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v222/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v222/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v222/Source/exehead/uninst.ico: This commit was
+ manufactured by cvs2svn to create tag 'v222'.
- * Docs/src/history.but: 2.22
+2006-11-27 16:50 kichik
-2006-11-27 kichik
+ * /NSIS/trunk/Docs/src/history.but: sort 2.22 changes
- * Contrib/Math/SConscript, SCons/Config/ms: MSVC_VERSION has `Exp`
- prefix for express versions
+2006-11-27 16:48 kichik
-2006-11-25 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.22
- * Contrib/Language files/Lithuanian.nlf: fixed bug #1602673 - error
- in Lithuanian language file
+2006-11-27 16:27 kichik
-2006-11-25 kichik
+ * /NSIS/trunk/Include/Library.nsh: $__INSTALLLLIB_SESSIONGUID might
+ as well be {000...}, it's no different than 'session' in
+ functionality
- * Source/exehead/util.c: size optimization
+2006-11-27 16:10 kichik
-2006-11-25 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: links in SetPluginUnload
- * Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: fixed bug #1542530 - WriteUninstaller fails
- to overwrite read-only uninstallers
+2006-11-27 15:38 kichik
-2006-11-25 kichik
+ * /NSIS/trunk/Docs/src/generalpurpose.but: minor CallInstDLL
+ description improvement
- * Source/exehead/Ui.c: size optimization
+2006-11-27 15:22 kichik
-2006-11-25 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.22
- * Source/exehead/Ui.c: size optimization
+2006-11-27 14:38 kichik
-2006-11-25 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript, /NSIS/trunk/SCons/Config/ms:
+ MSVC_VERSION has `Exp` prefix for express versions
- * Source/exehead/Ui.c: fixed bug #1115825 - install pg/Show
- details/rt clk popup not destroyed on finish
+2006-11-25 12:13 kichik
-2006-11-18 kichik
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf: fixed bug
+ #1602673 - error in Lithuanian language file
- * Docs/src/attributes.but: compatibility mode without
- RequestExecutionLevel
+2006-11-25 11:37 kichik
-2006-11-17 kichik
+ * /NSIS/trunk/Source/exehead/util.c: size optimization
- * Contrib/Math/SConscript, SCons/Config/ms: proper MSVS_VERSION
- check
+2006-11-25 11:32 kichik
-2006-11-14 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: fixed bug #1542530 -
+ WriteUninstaller fails to overwrite read-only uninstallers
- * INSTALL, SConstruct, Contrib/Math/SConscript, Docs/src/build.but,
- SCons/Config/ms: automatic MSVC 2005 detection
+2006-11-25 10:51 kichik
-2006-11-13 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization
- * Contrib/Modern UI/Readme.html, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi:
- updated info about reserving files
+2006-11-25 10:28 kichik
-2006-11-13 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization
- * INSTALL, SCons/Config/ms: * SCons 0.96.93 automatically detects
- MSVC 2005, using environment variables is no longer needed * Use
- new exception flag for MSVC 2005
+2006-11-25 10:17 kichik
-2006-11-11 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1115825 - install
+ pg/Show details/rt clk popup not destroyed on finish
- * Docs/src/build.but, INSTALL, SConstruct, SCons/Config/default,
- SCons/Config/gnu, SCons/Config/ms, Source/SConscript: Copy is
- deprecated by Clone in scons 0.96.93
+2006-11-18 09:40 kichik
-2006-11-10 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: compatibility mode without
+ RequestExecutionLevel
- * Docs/src/attributes.but, Source/manifest.cpp, Source/manifest.h,
- Source/script.cpp, Source/tokens.cpp: added `highest` option for
- RequestExecutionLevel
+2006-11-17 11:38 kichik
-2006-11-09 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript, /NSIS/trunk/SCons/Config/ms:
+ proper MSVS_VERSION check
- * Include/Library.nsh: fixed __InstallLib_Helper_InitSession
+2006-11-14 19:14 joostverburg
-2006-11-06 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/INSTALL,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/SConstruct: automatic
+ MSVC 2005 detection
- * Include/Library.nsh: the system plug-in can take care of the
- guid/string conversion
+2006-11-13 14:25 joostverburg
-2006-11-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: updated info
+ about reserving files
- * Source/makenssi.cpp: cosmetics
+2006-11-13 14:10 joostverburg
-2006-11-06 joostverburg
+ * /NSIS/trunk/INSTALL, /NSIS/trunk/SCons/Config/ms: * SCons 0.96.93
+ automatically detects MSVC 2005, using environment variables is
+ no longer needed
+ * Use new exception flag for MSVC 2005
- * Source/makenssi.cpp: line breaks in license text
+2006-11-11 13:04 kichik
-2006-11-03 kichik
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/INSTALL,
+ /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/SConstruct,
+ /NSIS/trunk/Source/SConscript: Copy is deprecated by Clone in
+ scons 0.96.93
- * Contrib/Language files/Slovenian.nlf, Contrib/Modern UI/Language
- files/Slovenian.nsh: patch #1590108 - Another update for Slovenian
- localization
+2006-11-10 14:54 kichik
-2006-11-03 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Source/manifest.cpp, /NSIS/trunk/Source/manifest.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ added `highest` option for RequestExecutionLevel
- * Docs/src/headers.but: fixed bug #1589877 - Typos in Appendix E
+2006-11-09 19:56 kichik
-2006-11-03 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed
+ __InstallLib_Helper_InitSession
- * Include/WinVer.nsh: !verbose 3
+2006-11-06 21:18 kichik
-2006-11-03 kichik
+ * /NSIS/trunk/Include/Library.nsh: the system plug-in can take care
+ of the guid/string conversion
- * Include/WinVer.nsh: file WinVer.nsh was added on branch UNICODE
- on 2007-02-15 22:46:34 +0000
+2006-11-06 07:04 kichik
-2006-11-02 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: cosmetics
- * Contrib/nsExec/nsExec.txt: typo
+2006-11-05 23:24 joostverburg
-2006-11-02 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: line breaks in license text
- * Contrib/Language files/Breton.nlf, Contrib/Modern UI/Language
- files/Breton.nsh: minor fixes by solenn
+2006-11-03 18:50 kichik
-2006-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh: patch
+ #1590108 - Another update for Slovenian localization
- * COPYING, Docs/src/license.but: Special exception for LZMA
- compression module. Thanks Igor!
+2006-11-03 12:21 kichik
-2006-11-01 joostverburg
+ * /NSIS/trunk/Docs/src/headers.but: fixed bug #1589877 - Typos in
+ Appendix E
- * Include/WinVer.nsh: corrected Windows 98 and Windows Me version
- number
+2006-11-03 11:13 kichik
-2006-10-30 kichik
+ * /NSIS/trunk/Include/WinVer.nsh: !verbose 3
- * SCons/Config/ms: proper memset test
+2006-11-02 20:24 kichik
-2006-10-30 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsExec.txt: typo
- * Contrib/Math/SConscript: fixed TEMP_MSVC2005 test
+2006-11-02 12:59 kichik
-2006-10-30 kichik
+ * /NSIS/trunk/Contrib/Language files/Breton.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Breton.nsh: minor
+ fixes by solenn
- * Docs/src/attributes.but: RequestExecutionLevel affects the
- uninstaller as well
+2006-10-31 23:55 joostverburg
-2006-10-29 joostverburg
+ * /NSIS/trunk/COPYING, /NSIS/trunk/Docs/src/license.but: Special
+ exception for LZMA compression module. Thanks Igor!
- * SCons/Config/ms: Disabled libcp check for MSVC 2005. This lib is
- not used anymore.
+2006-10-31 22:29 joostverburg
-2006-10-29 kichik
+ * /NSIS/trunk/Include/WinVer.nsh: corrected Windows 98 and Windows
+ Me version number
- * Contrib/Math/Source/mathcrtmt.lib: file mathcrtmt.lib was added
- on branch UNICODE on 2007-02-15 22:41:00 +0000
+2006-10-30 20:50 kichik
-2006-10-29 joostverburg
+ * /NSIS/trunk/SCons/Config/ms: proper memset test
- * Contrib/Math/SConscript, INSTALL, SConstruct, Docs/src/build.but,
- Contrib/Math/Source/mathcrtmt.lib, SCons/Config/ms: MSVC 2005
- support. Add TEMP_MSVC2005=yes to the build command line.
+2006-10-30 19:45 kichik
-2006-10-29 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript: fixed TEMP_MSVC2005 test
- * Docs/src/license.but: cosmetics
+2006-10-30 19:08 kichik
-2006-10-29 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: RequestExecutionLevel
+ affects the uninstaller as well
- * Docs/src/license.but: zlib-license keyword used twice
+2006-10-29 14:52 joostverburg
-2006-10-29 kichik
+ * /NSIS/trunk/SCons/Config/ms: Disabled libcp check for MSVC 2005.
+ This lib is not used anymore.
- * Docs/src/credits.but: added missing translators - Uzbek and
- Valencian
+2006-10-29 11:50 joostverburg
-2006-10-29 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Contrib/Math/Source/mathcrtmt.lib,
+ /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/INSTALL,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/SConstruct: MSVC 2005
+ support. Add TEMP_MSVC2005=yes to the build command line.
- * Source/makenssi.cpp: added missing NSIS_VERSION to fprintf
+2006-10-29 00:22 kichik
-2006-10-29 kichik
+ * /NSIS/trunk/Docs/src/license.but: cosmetics
- * Source/makenssi.cpp: fixed syntax error
+2006-10-29 00:17 kichik
-2006-10-29 kichik
+ * /NSIS/trunk/Docs/src/license.but: zlib-license keyword used twice
- * SConstruct, Examples/makensis.nsi: license.txt -> COPYING
+2006-10-29 00:16 kichik
-2006-10-29 kichik
+ * /NSIS/trunk/Docs/src/credits.but: added missing translators -
+ Uzbek and Valencian
- * Contrib/Language files/SConscript, Contrib/Modern UI/SConscript:
- added Uzbek
+2006-10-29 00:05 kichik
-2006-10-28 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: added missing NSIS_VERSION to
+ fprintf
- * Contrib/Language files/Uzbek.nlf, Contrib/Modern UI/Language
- files/Uzbek.nsh, Examples/Modern UI/MultiLanguage.nsi: Uzbek
- language files by Emil Garipov
+2006-10-28 23:58 kichik
-2006-10-28 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: fixed syntax error
+
+2006-10-28 23:58 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/SConstruct:
+ license.txt -> COPYING
+
+2006-10-28 23:55 kichik
+
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: added Uzbek
+
+2006-10-28 20:07 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Uzbek.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Uzbek.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Uzbek language
+ files by Emil Garipov
+
+2006-10-28 19:45 joostverburg
+
+ * /NSIS/trunk/COPYING, /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/license.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/7zip/7zGuids.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/StreamUtils.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/StreamUtils.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
+ /NSIS/trunk/Source/7zip/7zip/ICoder.h,
+ /NSIS/trunk/Source/7zip/7zip/IStream.h,
+ /NSIS/trunk/Source/7zip/Common/Alloc.cpp,
+ /NSIS/trunk/Source/7zip/Common/Alloc.h,
+ /NSIS/trunk/Source/7zip/Common/CRC.cpp,
+ /NSIS/trunk/Source/7zip/Common/CRC.h,
+ /NSIS/trunk/Source/7zip/Common/Defs.h,
+ /NSIS/trunk/Source/7zip/Common/MyCom.h,
+ /NSIS/trunk/Source/7zip/Common/MyGuidDef.h,
+ /NSIS/trunk/Source/7zip/Common/MyUnknown.h,
+ /NSIS/trunk/Source/7zip/Common/MyWindows.h,
+ /NSIS/trunk/Source/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/Common/Types.h,
+ /NSIS/trunk/Source/7zip/copying.txt,
+ /NSIS/trunk/Source/7zip/LZMADecode.c,
+ /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/7zip/readme.txt, /NSIS/trunk/Source/afxres.h,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c,
+ /NSIS/trunk/Source/bzip2/Readme.txt, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.cpp, /NSIS/trunk/Source/clzma.h,
+ /NSIS/trunk/Source/compressor.h, /NSIS/trunk/Source/crc32.c,
+ /NSIS/trunk/Source/crc32.h, /NSIS/trunk/Source/czlib.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/dirreader.cpp, /NSIS/trunk/Source/dirreader.h,
+ /NSIS/trunk/Source/exehead/afxres.h,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/components.c,
+ /NSIS/trunk/Source/exehead/components.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h,
+ /NSIS/trunk/Source/fileform.cpp, /NSIS/trunk/Source/fileform.h,
+ /NSIS/trunk/Source/growbuf.cpp, /NSIS/trunk/Source/growbuf.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/lineparse.cpp, /NSIS/trunk/Source/lineparse.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/manifest.cpp,
+ /NSIS/trunk/Source/manifest.h, /NSIS/trunk/Source/mmap.cpp,
+ /NSIS/trunk/Source/mmap.h, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/ShConstants.cpp,
+ /NSIS/trunk/Source/ShConstants.h, /NSIS/trunk/Source/strlist.cpp,
+ /NSIS/trunk/Source/strlist.h, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h, /NSIS/trunk/Source/uservars.h,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h,
+ /NSIS/trunk/Source/writer.cpp, /NSIS/trunk/Source/writer.h,
+ /NSIS/trunk/Source/zlib/deflate.c,
+ /NSIS/trunk/Source/zlib/DEFLATE.H,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/trees.c, /NSIS/trunk/Source/zlib/ZCONF.H,
+ /NSIS/trunk/Source/zlib/ZLIB.H, /NSIS/trunk/Source/zlib/ZUTIL.H:
+ * The LZMA compression module for NSIS is now licensed under the
+ Common Public License version 1.0
+ * Added license and copyright notice to every source file
+ * The new COPYING file and license section in the Users Manual
+ list the terms of all relevant licenses
+
+2006-10-28 15:28 kichik
+
+ * /NSIS/trunk/Docs/src/sections.but: emphasize that section_idx is
+ a !define
+
+2006-10-28 15:22 kichik
+
+ * /NSIS/trunk/Docs/src/sec.but: added code examples
+
+2006-10-25 21:14 kichik
+
+ * /NSIS/trunk/Docs/src/generalpurpose.but: fixed bug #1584618 - No
+ Contrib\ExDLL directory
+
+2006-10-20 14:18 kichik
+
+ * /NSIS/trunk/Scripts/release.py: converted steps to functions for
+ easier step selection
+
+2006-10-20 13:40 kichik
+
+ * /NSIS/trunk/Docs/src/history.but: typo
+
+2006-10-20 12:53
+
+ * /NSIS/tags/v221, /NSIS/tags/v221/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v221/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v221/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v221/Source/exehead/uninst.ico,
+ /NSIS/tags/v221/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v221'.
+
+2006-10-20 12:53 kichik
+
+ * /NSIS/trunk/Docs/src/SConscript: seems to have a problem with
+ long current directory paths now...
+ so go to the root until i find out what's up here
+
+2006-10-20 11:47 kichik
+
+ * /NSIS/trunk/Menu/images/header.gif: 2.21
+
+2006-10-20 11:38 kichik
+
+ * /NSIS/trunk/Docs/src/history.but: 2.21
+
+2006-10-20 11:36 kichik
+
+ * /NSIS/trunk/Docs/src/SConscript: hhc.exe suddenly crashes if the
+ directory is changed before calling it...
+ it works fine without changing the directory - css and js are
+ embedded and the files come out identical
+ removed the directory change
+
+2006-10-17 16:59 kichik
+
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SConstruct: scons
+ 0.96.92
+
+2006-10-17 16:51 kichik
+
+ * /NSIS/trunk/SConstruct: added a workaround to BuildUtil to avoid
+ the suffix problems that appeared with scons 0.96.92
- * Contrib/Language files/Uzbek.nlf: file Uzbek.nlf was added on
- branch UNICODE on 2007-02-15 22:36:18 +0000
+2006-10-16 13:52 kichik
-2006-10-28 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: RC2 also identifies
+ installers so it's probably safe to assume this will stay
- * Contrib/Modern UI/Language files/Uzbek.nsh: file Uzbek.nsh was
- added on branch UNICODE on 2007-02-15 22:41:50 +0000
+2006-10-16 11:23 kichik
-2006-10-28 kichik
+ * /NSIS/trunk/Contrib/MakeLangId/MakeLangId.cpp,
+ /NSIS/trunk/Contrib/MakeLangId/SConscript: call
+ InitCommonControls
- * Source/7zip/Common/MyGuidDef.h: file MyGuidDef.h was added on
- branch UNICODE on 2007-02-15 22:50:33 +0000
+2006-10-16 08:46 kichik
-2006-10-28 joostverburg
+ * /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/StreamUtils.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/StreamUtils.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/ICoder.h,
+ /NSIS/trunk/Source/7zip/7zip/IStream.h,
+ /NSIS/trunk/Source/7zip/Common/Alloc.cpp,
+ /NSIS/trunk/Source/7zip/Common/Alloc.h,
+ /NSIS/trunk/Source/7zip/Common/CRC.cpp,
+ /NSIS/trunk/Source/7zip/Common/CRC.h,
+ /NSIS/trunk/Source/7zip/Common/MyCom.h,
+ /NSIS/trunk/Source/7zip/Common/MyGuidDef.h,
+ /NSIS/trunk/Source/7zip/Common/MyUnknown.h,
+ /NSIS/trunk/Source/7zip/Common/MyWindows.h,
+ /NSIS/trunk/Source/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/Common/Types.h,
+ /NSIS/trunk/Source/7zip/sdk.diff, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/SConscript: upgraded to lzma sdk 4.43 for
+ faster compression
- * Docs/src/credits.but, Docs/src/license.but,
- Examples/makensis.nsi, Source/7zip/7zGuids.cpp,
- Source/7zip/LZMADecode.c, Source/7zip/LZMADecode.h,
- Source/7zip/copying.txt, Source/7zip/readme.txt,
- Source/7zip/7zip/Common/InBuffer.cpp,
- Source/7zip/7zip/Common/InBuffer.h,
- Source/7zip/7zip/Common/OutBuffer.cpp,
- Source/7zip/7zip/Common/OutBuffer.h,
- Source/7zip/7zip/Common/StreamUtils.cpp,
- Source/7zip/7zip/Common/StreamUtils.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/7zip/Compress/LZMA/LZMA.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/Platform.h, Source/Plugins.cpp, Source/Plugins.h,
- Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/ResourceVersionInfo.cpp, Source/ResourceVersionInfo.h,
- Source/ShConstants.cpp, Source/ShConstants.h, Source/afxres.h,
- Source/build.cpp, Source/build.h, Source/cbzip2.h,
- Source/clzma.cpp, Source/clzma.h, Source/compressor.h,
- Source/crc32.c, Source/crc32.h, Source/czlib.h,
- Source/dirreader.cpp, Source/dirreader.h, Source/fileform.cpp,
- Source/fileform.h, Source/growbuf.cpp, Source/growbuf.h,
- Source/lang.cpp, Source/lang.h, Source/lineparse.cpp,
- Source/lineparse.h, Source/7zip/7zip/ICoder.h,
- Source/7zip/7zip/IStream.h,
- Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
- Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZInWindow.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
- Source/7zip/Common/Alloc.cpp, Source/7zip/Common/Alloc.h,
- Source/7zip/Common/CRC.cpp, Source/7zip/Common/CRC.h,
- Source/7zip/Common/Defs.h, Source/7zip/Common/MyCom.h,
- Source/7zip/Common/MyGuidDef.h, Source/7zip/Common/MyUnknown.h,
- Source/7zip/Common/MyWindows.h, Source/7zip/Common/StdAfx.h,
- Source/7zip/Common/Types.h, Source/makenssi.cpp,
- Source/manifest.cpp, Source/manifest.h, Source/mmap.cpp,
- Source/mmap.h, Source/script.cpp, Source/strlist.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/tokens.h,
- Source/uservars.h, Source/util.cpp, Source/util.h,
- Source/writer.cpp, Source/writer.h, Source/bzip2/Readme.txt,
- Source/bzip2/blocksort.c, Source/bzip2/bzlib.c,
- Source/bzip2/bzlib.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/huffman.c,
- Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/afxres.h, Source/exehead/bgbg.c,
- Source/exehead/components.c, Source/exehead/components.h,
- Source/exehead/config.h, COPYING, license.txt,
- Source/exehead/exec.c, Source/exehead/exec.h,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/lang.h, Source/exehead/state.h, Source/exehead/ui.h,
- Source/exehead/util.c, Source/exehead/util.h,
- Source/zlib/DEFLATE.H, Source/zlib/INFBLOCK.C, Source/zlib/ZCONF.H,
- Source/zlib/ZLIB.H, Source/zlib/ZUTIL.H, Source/zlib/deflate.c,
- Source/zlib/trees.c: * The LZMA compression module for NSIS is now
- licensed under the Common Public License version 1.0 * Added
- license and copyright notice to every source file * The new COPYING
- file and license section in the Users Manual list the terms of all
- relevant licenses
-
-2006-10-28 kichik
-
- * Source/7zip/7zip/Common/StreamUtils.cpp: file StreamUtils.cpp was
- added on branch UNICODE on 2007-02-15 22:50:27 +0000
-
-2006-10-28 kichik
-
- * Source/7zip/7zip/Common/StreamUtils.h: file StreamUtils.h was
- added on branch UNICODE on 2007-02-15 22:50:27 +0000
-
-2006-10-28 kichik
-
- * Docs/src/sections.but: emphasize that section_idx is a !define
-
-2006-10-28 kichik
-
- * Docs/src/sec.but: added code examples
-
-2006-10-25 kichik
-
- * Docs/src/generalpurpose.but: fixed bug #1584618 - No
- Contrib\ExDLL directory
-
-2006-10-20 kichik
-
- * Scripts/release.py: converted steps to functions for easier step
- selection
-
-2006-10-20 kichik
-
- * Docs/src/history.but: typo
-
-2006-10-20 kichik
-
- * Docs/src/SConscript: seems to have a problem with long current
- directory paths now... so go to the root until i find out what's
- up here
-
-2006-10-20 kichik
-
- * Menu/images/header.gif: 2.21
-
-2006-10-20 kichik
-
- * Docs/src/history.but: 2.21
+2006-10-16 08:05 kichik
-2006-10-20 kichik
+ * /NSIS/trunk/Source/manifest.cpp: avoid gcc warning about switch
- * Docs/src/SConscript: hhc.exe suddenly crashes if the directory is
- changed before calling it... it works fine without changing the
- directory - css and js are embedded and the files come out
- identical removed the directory change
+2006-10-16 07:53 kichik
-2006-10-17 kichik
+ * /NSIS/trunk/Source/SConscript: cosmetics
- * SCons/Config/gnu, SConstruct: scons 0.96.92
+2006-10-06 16:49 kichik
-2006-10-17 kichik
+ * /NSIS/trunk/Include/FileFunc.nsh: Instructor fixed handle leak in
+ Locate
- * SConstruct: added a workaround to BuildUtil to avoid the suffix
- problems that appeared with scons 0.96.92
+2006-10-06 16:25 kichik
-2006-10-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh: small
+ fixes for better view by Dumperbg
- * Docs/src/attributes.but: RC2 also identifies installers so it's
- probably safe to assume this will stay
+2006-10-02 11:12 joostverburg
-2006-10-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: language
+ name
- * Contrib/MakeLangId/MakeLangId.cpp, Contrib/MakeLangId/SConscript:
- call InitCommonControls
+2006-09-30 15:41 kichik
-2006-10-16 kichik
+ * /NSIS/trunk/Include/x64.nsh: fix comment
- * Source/7zip/sdk.diff: file sdk.diff was added on branch UNICODE
- on 2007-02-15 22:50:26 +0000
+2006-09-30 12:35 kichik
-2006-10-16 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: install WinVer.nsh and x64.nsh
- * Source/7zip/7zip/Common/InBuffer.cpp,
- Source/7zip/7zip/Common/InBuffer.h,
- Source/7zip/7zip/Common/OutBuffer.cpp,
- Source/7zip/7zip/Common/OutBuffer.h,
- Source/7zip/7zip/Common/StdAfx.h,
- Source/7zip/7zip/Common/StreamUtils.cpp,
- Source/7zip/7zip/Common/StreamUtils.h,
- Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
- Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZInWindow.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMA.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/7zip/7zip/Compress/LZMA/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
- Source/7zip/7zip/Compress/LZ/StdAfx.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
- Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/7zip/ICoder.h, Source/7zip/7zip/IStream.h,
- Source/7zip/Common/Alloc.cpp, Source/7zip/Common/Alloc.h,
- Source/7zip/Common/CRC.cpp, Source/7zip/Common/CRC.h,
- Source/7zip/Common/MyCom.h, Source/7zip/Common/MyGuidDef.h,
- Source/7zip/Common/MyUnknown.h, Source/7zip/Common/MyWindows.h,
- Source/7zip/Common/StdAfx.h, Source/7zip/Common/Types.h,
- Source/Platform.h, Source/SConscript, Source/7zip/sdk.diff:
- upgraded to lzma sdk 4.43 for faster compression
+2006-09-29 17:41 kichik
-2006-10-16 kichik
+ * /NSIS/trunk/Include/SConscript, /NSIS/trunk/Include/WinVer.nsh:
+ added WinVer.nsh - LogicLib extensions for handling Windows
+ versions
- * Source/manifest.cpp: avoid gcc warning about switch
+2006-09-29 17:18 kichik
-2006-10-16 kichik
+ * /NSIS/trunk/Include/x64.nsh: typo
- * Source/SConscript: cosmetics
+2006-09-29 16:15 kichik
-2006-10-06 kichik
+ * /NSIS/trunk/Include/x64.nsh: skip popping the value and directly
+ use LogicLib for IsRunningX64
+ the very first LogicLib extension - cool!
- * Include/FileFunc.nsh: Instructor fixed handle leak in Locate
+2006-09-29 15:41 kichik
-2006-10-06 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: oops, forgot to remove
+ lbl_error
- * Contrib/Language files/Bulgarian.nlf, Contrib/Modern UI/Language
- files/Bulgarian.nsh: small fixes for better view by Dumperbg
+2006-09-29 15:39 kichik
-2006-10-02 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: added vista
+ this should be replaced with a call to GetVersion and IntCmp with
+ defines
+ the way it is now, users are tempted to use StrCmp and get
+ installers not working with newer versions of windows
- * Contrib/Modern UI/Language files/Danish.nsh: language name
+2006-09-29 15:26 kichik
-2006-09-30 kichik
+ * /NSIS/trunk/Docs/src/intro.but: added vista
- * Include/x64.nsh: fix comment
+2006-09-23 22:02 kichik
-2006-09-30 kichik
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Language files/Valencian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Valencian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: patch #1558822 -
+ Valencian translation
- * Examples/makensis.nsi: install WinVer.nsh and x64.nsh
+2006-09-23 08:28 kichik
-2006-09-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: implemented RFE
+ #1547844 - default button of the abort warning
- * Include/SConscript, Include/WinVer.nsh: added WinVer.nsh -
- LogicLib extensions for handling Windows versions
+2006-09-23 08:16 kichik
-2006-09-29 kichik
+ * /NSIS/trunk/Include/SConscript, /NSIS/trunk/Include/x64.nsh:
+ macros for x64 installations handling
- * Include/x64.nsh: typo
+2006-09-22 10:42 kichik
-2006-09-29 kichik
+ * /NSIS/trunk/Contrib/MakeLangId/MakeLangId.xml,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.xml,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.xml: specifically request for
+ no execution level change on vista
+ this is a workaround for vista's incorrect flagging of all
+ manifested nsis applications as installers
- * Include/x64.nsh: skip popping the value and directly use LogicLib
- for IsRunningX64 the very first LogicLib extension - cool!
+2006-09-22 09:14 kichik
-2006-09-29 kichik
+ * /NSIS/trunk/Docs/src/headers.but: typo
- * Docs/src/usefulfunc.but: oops, forgot to remove lbl_error
+2006-09-16 14:06 kichik
-2006-09-29 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: added RequestExecutionLevel
- * Docs/src/usefulfunc.but: added vista this should be replaced with
- a call to GetVersion and IntCmp with defines the way it is now,
- users are tempted to use StrCmp and get installers not working with
- newer versions of windows
+2006-09-16 13:41 kichik
-2006-09-29 kichik
+ * /NSIS/trunk/Source/script.cpp: cosmetics
- * Docs/src/intro.but: added vista
+2006-09-16 13:38 kichik
-2006-09-24 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/manifest.cpp, /NSIS/trunk/Source/manifest.h,
+ /NSIS/trunk/Source/SConscript, /NSIS/trunk/Source/script.cpp:
+ moved manifest generation to a seprate file and added made it
+ support vista's access level extensions
- * Contrib/Modern UI/Language files/Valencian.nsh: file
- Valencian.nsh was added on branch UNICODE on 2007-02-15 22:41:50
- +0000
+2006-09-16 11:35 kichik
-2006-09-24 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h:
+ extracted SetVarsSection
- * Contrib/Language files/Valencian.nlf: file Valencian.nlf was
- added on branch UNICODE on 2007-02-15 22:36:18 +0000
+2006-09-15 08:58 kichik
-2006-09-24 kichik
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/Docs/src/log.but,
+ /NSIS/trunk/Docs/src/var.but: build settings passed from config.h
+ to scons
- * Contrib/Language files/SConscript, Contrib/Language
- files/Valencian.nlf, Contrib/Modern UI/SConscript, Contrib/Modern
- UI/Language files/Valencian.nsh: patch #1558822 - Valencian
- translation
+2006-09-13 10:46 joostverburg
-2006-09-23 kichik
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh:
+ updated by Martin Srebotnjak
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: implemented RFE #1547844 - default
- button of the abort warning
+2006-09-09 13:26
-2006-09-23 kichik
+ * /NSIS/tags/v220, /NSIS/tags/v220/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v220/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v220/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v220/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v220/Source/exehead/uninst.ico,
+ /NSIS/tags/v220/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v220'.
- * Include/SConscript, Include/x64.nsh: macros for x64 installations
- handling
+2006-09-09 13:26 kichik
-2006-09-22 kichik
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Menu/images/header.gif: 2.20
- * Contrib/MakeLangId/MakeLangId.xml: file MakeLangId.xml was added
- on branch UNICODE on 2007-02-15 22:36:18 +0000
+2006-09-09 08:57 kichik
-2006-09-22 kichik
+ * /NSIS/trunk/Docs/src/script.but: explain about comments being
+ extended
- * Contrib/MakeLangId/MakeLangId.xml,
- Contrib/Makensisw/makensisw.xml, Contrib/zip2exe/zip2exe.xml:
- specifically request for no execution level change on vista this is
- a workaround for vista's incorrect flagging of all manifested nsis
- applications as installers
+2006-09-08 16:35 kichik
-2006-09-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: better
+ MUI_UNTEXT_WELCOME_INFO_TEXT translation (SuperPat)
- * Docs/src/headers.but: typo
+2006-09-01 09:32 kichik
-2006-09-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ corrections by Osidach Vitaly
- * Docs/src/attributes.but, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: added RequestExecutionLevel
+2006-08-28 23:01 kichik
-2006-09-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf: fixed bug #1548190
+ - Danish "Browse" words not translated
- * Source/script.cpp: cosmetics
+2006-08-28 12:41 kichik
-2006-09-16 kichik
+ * /NSIS/trunk/TODO.txt: DirShow is no longer desired, as discussed
+ in patch #1539701
- * Source/SConscript, Source/build.cpp, Source/build.h,
- Source/manifest.cpp, Source/manifest.h, Source/script.cpp: moved
- manifest generation to a seprate file and added made it support
- vista's access level extensions
+2006-08-25 11:36 kichik
-2006-09-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: fixed bug
+ #1546183 - Italian language file has duplicate access key
- * Source/build.cpp, Source/build.h: extracted SetVarsSection
+2006-08-25 11:32 kichik
-2006-09-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: typo
+ fixes by SuperPat
- * Docs/src/build.but, Docs/src/log.but, Docs/src/var.but: build
- settings passed from config.h to scons
+2006-08-19 12:47 kichik
-2006-09-13 joostverburg
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1536377 - incorrect
+ timestamps on big-endian platforms
+ instead of messing with structs, use simple arithmetic ops to
+ split the time to low & high words
- * Contrib/Language files/Slovenian.nlf, Contrib/Modern UI/Language
- files/Slovenian.nsh: updated by Martin Srebotnjak
+2006-08-19 10:59 kichik
-2006-09-09 kichik
+ * /NSIS/trunk/Contrib/Language files/Swedish.nlf: fixed bug
+ #1542680 - Untranslated entry in Swedish.nlf
- * Docs/src/history.but, Menu/images/header.gif: 2.20
+2006-08-19 10:56 kichik
-2006-09-09 kichik
+ * /NSIS/trunk/Include/LogicLib.nsh: partial fix for bug #1537976 -
+ vague LogicLib syntax error messages
- * Docs/src/script.but: explain about comments being extended
+2006-08-18 18:53 kichik
-2006-09-08 kichik
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf: fixed bug
+ #1542765 - Turkish.nlf is encoded using UTF-8
- * Contrib/Modern UI/Language files/French.nsh: better
- MUI_UNTEXT_WELCOME_INFO_TEXT translation (SuperPat)
+2006-08-18 11:15 kichik
-2006-09-01 kichik
+ * /NSIS/trunk/SConstruct: updated comment
- * Contrib/Language files/Ukrainian.nlf, Contrib/Modern UI/Language
- files/Ukrainian.nsh: corrections by Osidach Vitaly
+2006-08-18 11:03 kichik
-2006-08-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: added
+ missing $_CLICK
- * Contrib/Language files/Danish.nlf: fixed bug #1548190 - Danish
- "Browse" words not translated
+2006-08-09 06:11 pabs3
-2006-08-28 kichik
+ * /NSIS/trunk/Examples/Library.nsi: TypeLib.dll doesn't have a
+ resource section, use LangDLL.dll instead
- * TODO.txt: DirShow is no longer desired, as discussed in patch
- #1539701
+2006-08-08 15:44 kichik
-2006-08-25 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: use InstallOptions'
+ new HWND field, not 1200 + field number - 1
- * Contrib/Language files/Italian.nlf: fixed bug #1546183 - Italian
- language file has duplicate access key
+2006-08-08 15:38 kichik
-2006-08-25 kichik
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: (Joel)
+ Retranslate some text strings to fit some static controls
- * Contrib/Modern UI/Language files/French.nsh: typo fixes by
- SuperPat
+2006-08-07 14:01 kichik
-2006-08-19 kichik
+ * /NSIS/trunk/Source/script.cpp: NLF_ERR_REG_DLL isn't used
+ anywhere, no need to add it to the language table
- * Source/script.cpp: fixed bug #1536377 - incorrect timestamps on
- big-endian platforms instead of messing with structs, use simple
- arithmetic ops to split the time to low & high words
+2006-08-07 13:57 kichik
-2006-08-19 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1535995 - failed
+ plug-in calls output incomplete messages
- * Contrib/Language files/Swedish.nlf: fixed bug #1542680 -
- Untranslated entry in Swedish.nlf
+2006-08-07 07:37 pabs3
-2006-08-19 kichik
+ * /NSIS/trunk/SConstruct: fixed bug #1515592 -
+ NSIS_CONFIG_CONST_DATA_PATH wasn't honoured on Linux
- * Include/LogicLib.nsh: partial fix for bug #1537976 - vague
- LogicLib syntax error messages
+2006-08-06 18:56
-2006-08-18 kichik
+ * /NSIS/tags/v219, /NSIS/tags/v219/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v219/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v219/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v219/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v219/Source/exehead/uninst.ico,
+ /NSIS/tags/v219/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v219'.
- * Contrib/Language files/Turkish.nlf: fixed bug #1542765 -
- Turkish.nlf is encoded using UTF-8
+2006-08-06 18:56 kichik
-2006-08-18 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.19
- * SConstruct: updated comment
+2006-08-06 18:41 kichik
-2006-08-18 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.19
- * Contrib/Modern UI/Language files/French.nsh: added missing
- $_CLICK
+2006-08-06 18:13 kichik
-2006-08-09 pabs3
+ * /NSIS/trunk/Docs/src/usefulfunc.but: better version of
+ IsDotNETInstalled
- * Examples/Library.nsi: TypeLib.dll doesn't have a resource
- section, use LangDLL.dll instead
+2006-08-06 16:22 kichik
-2006-08-08 kichik
+ * /NSIS/trunk/Contrib/System/Source/System.c: fixed bug #1535005 -
+ System.dll corrupts the stack with 0 arguments functions
- * Contrib/Modern UI/Readme.html: use InstallOptions' new HWND
- field, not 1200 + field number - 1
+2006-08-05 11:01 kichik
-2006-08-08 kichik
+ * /NSIS/trunk/Contrib/System/Source/System.c: fixed bug #1535007 -
+ System.dll returns bad values, if function returns short
- * Contrib/Language files/Spanish.nlf, Contrib/Modern UI/Language
- files/Spanish.nsh: (Joel) Retranslate some text strings to fit some
- static controls
+2006-08-04 15:35 kichik
-2006-08-07 kichik
+ * /NSIS/trunk/Docs/src/file.but, /NSIS/trunk/Docs/src/int.but:
+ improvements by Joe Siebenmann
- * Source/script.cpp: NLF_ERR_REG_DLL isn't used anywhere, no need
- to add it to the language table
+2006-08-03 18:49 kichik
-2006-08-07 kichik
+ * /NSIS/trunk/Source/script.cpp: like StrCmp and !ifdef, !if is now
+ case insensitive
- * Source/script.cpp: fixed bug #1535995 - failed plug-in calls
- output incomplete messages
+2006-08-02 11:12 kichik
-2006-08-07 pabs3
+ * /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: fixed
+ bug #1531874 - Typos in french translation
- * SConstruct: fixed bug #1515592 - NSIS_CONFIG_CONST_DATA_PATH
- wasn't honoured on Linux
+2006-07-30 14:27 kichik
-2006-08-06 kichik
+ * /NSIS/trunk/Contrib/NSISdl/asyncdns.cpp,
+ /NSIS/trunk/Contrib/NSISdl/asyncdns.h: max_cache_entries isn't
+ used anywhere
- * Menu/images/header.gif: 2.19
+2006-07-30 14:26 kichik
-2006-08-06 kichik
+ * /NSIS/trunk/Contrib/NSISdl/asyncdns.cpp,
+ /NSIS/trunk/Contrib/NSISdl/asyncdns.h: fixed random dns errors
+ caused by synchronization issues with m_thread_kill
+ for more details:
+ http://forums.winamp.com/showthread.php?s=&threadid=247723
- * Docs/src/history.but: 2.19
+2006-07-30 13:02 kichik
-2006-08-06 kichik
+ * /NSIS/trunk/Contrib/Language files/NorwegianNynorsk.nlf,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/Language
+ files/NorwegianNynorsk.nsh, /NSIS/trunk/Contrib/Modern
+ UI/SConscript, /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: patch #1503208
+ - Norwegian nynorsk language file
- * Docs/src/usefulfunc.but: better version of IsDotNETInstalled
+2006-07-30 11:58 kichik
-2006-08-06 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed bug #1468852 - Wrong "Total
+ size" reported if greater than 2GB
- * Contrib/System/Source/System.c: fixed bug #1535005 - System.dll
- corrupts the stack with 0 arguments functions
+2006-07-30 11:52 kichik
-2006-08-05 kichik
+ * /NSIS/trunk/Source/build.cpp: partial fix for bug #1470826 -
+ unaligned memory access
- * Contrib/System/Source/System.c: fixed bug #1535007 - System.dll
- returns bad values, if function returns short
+2006-07-30 11:48 kichik
-2006-08-04 kichik
+ * /NSIS/trunk/Source/Platform.h: fixed bug #1504772 -
+ Sources/Platform.h type definitions are not 64bit-safe
- * Docs/src/file.but, Docs/src/int.but: improvements by Joe
- Siebenmann
+2006-07-30 10:29 kichik
-2006-08-03 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: fixed bug
+ #1509909 - !system & !packhdr fail with quotes
- * Source/script.cpp: like StrCmp and !ifdef, !if is now case
- insensitive
+2006-07-30 10:11 kichik
-2006-08-02 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: added release notes check box
+ to the finish page
- * Contrib/Language files/French.nlf, Contrib/Modern UI/Language
- files/French.nsh: fixed bug #1531874 - Typos in french translation
+2006-07-24 20:09 kichik
-2006-07-30 kichik
+ * /NSIS/trunk/Contrib/System/System.html: typo
- * Contrib/NSISdl/asyncdns.cpp, Contrib/NSISdl/asyncdns.h:
- max_cache_entries isn't used anywhere
+2006-07-01 17:37 kichik
-2006-07-30 kichik
+ * /NSIS/trunk/Scripts/release.py: failing wiki update is not
+ critical
- * Contrib/NSISdl/asyncdns.cpp, Contrib/NSISdl/asyncdns.h: fixed
- random dns errors caused by synchronization issues with
- m_thread_kill for more details:
- http://forums.winamp.com/showthread.php?s=&threadid=247723
+2006-07-01 16:52
-2006-07-30 kichik
+ * /NSIS/tags/v218, /NSIS/tags/v218/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v218/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v218/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v218/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v218/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v218/Source/exehead/uninst.ico,
+ /NSIS/tags/v218/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v218'.
- * Contrib/Modern UI/Language files/NorwegianNynorsk.nsh: file
- NorwegianNynorsk.nsh was added on branch UNICODE on 2007-02-15
- 22:41:49 +0000
+2006-07-01 16:52 kichik
-2006-07-30 kichik
+ * /NSIS/trunk/Docs/src/history.but: sort
- * Contrib/Language files/NorwegianNynorsk.nlf: file
- NorwegianNynorsk.nlf was added on branch UNICODE on 2007-02-15
- 22:36:18 +0000
+2006-07-01 16:52 kichik
-2006-07-30 kichik
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Menu/images/header.gif: 2.18
- * Contrib/Language files/NorwegianNynorsk.nlf, Contrib/Language
- files/SConscript, Contrib/Modern UI/SConscript, Contrib/Modern
- UI/Language files/NorwegianNynorsk.nsh, Docs/src/credits.but,
- Examples/Modern UI/MultiLanguage.nsi: patch #1503208 - Norwegian
- nynorsk language file
+2006-06-30 17:12 kichik
-2006-07-30 kichik
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SerbianLatin.nsh:
+ updates by Obucinac:
+ - Fixed unclear semantics
+ - Fixed grammar
+ - Fixed typos
+ - Tuned to match serbian translation of Windows XP interface
- * Source/build.cpp: fixed bug #1468852 - Wrong "Total size"
- reported if greater than 2GB
+2006-06-30 09:21 kichik
-2006-07-30 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: typos
- * Source/build.cpp: partial fix for bug #1470826 - unaligned memory
- access
+2006-06-17 07:34 joostverburg
-2006-07-30 kichik
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: corrections
+ by Jeferson Hultmann, from Mozilla bug #340885
- * Source/Platform.h: fixed bug #1504772 - Sources/Platform.h type
- definitions are not 64bit-safe
+2006-06-17 07:31 joostverburg
-2006-07-30 kichik
+ * /NSIS/trunk/Contrib/Language files/Irish.nlf: corrections by
+ Kevin P. Scannell, from Mozilla bug #340979
- * Source/build.cpp, Source/script.cpp, Source/util.cpp,
- Source/util.h: fixed bug #1509909 - !system & !packhdr fail with
- quotes
+2006-06-16 20:34 joostverburg
-2006-07-30 kichik
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf: corrections by
+ Mozilla Turkey, from Mozilla bug #340511
- * Examples/makensis.nsi: added release notes check box to the
- finish page
+2006-06-16 20:30 joostverburg
-2006-07-24 kichik
+ * /NSIS/trunk/Contrib/Language files/Finnish.nlf: corrections by
+ the Mozilla.fi crew, from Mozilla bug #341643
- * Contrib/System/System.html: typo
+2006-06-16 14:53 kichik
-2006-07-01 kichik
+ * /NSIS/trunk/Source/Platform.h: avoid "statement with no effect"
+ warnings with gcc
- * Scripts/release.py: failing wiki update is not critical
+2006-06-16 14:12 kichik
-2006-07-01 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/crc32.c, /NSIS/trunk/Source/crc32.h,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/writer.cpp, /NSIS/trunk/Source/writer.h: fixed
+ bug #1504758 - CRC32 implementation use potentially non-32bit
+ types
- * Menu/images/header.gif: 2.18
+2006-06-16 13:26 kichik
-2006-07-01 kichik
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: install Irish
- * Docs/src/history.but: sort
+2006-06-16 13:18 kichik
-2006-07-01 kichik
+ * /NSIS/trunk/Docs/src/basic.but: no wildcards for RMDir
- * Docs/src/history.but: 2.18
+2006-06-16 13:15 kichik
-2006-06-30 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1504297 -
+ .onVerifyInstDir changes browsing text
+ script executed in .onVerifyInstDir changes ps_tmpbuf which is
+ returned by GetNSISStringTT and is used for the browsing text
- * Contrib/Language files/Serbian.nlf, Contrib/Language
- files/SerbianLatin.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh, Contrib/Modern UI/Language
- files/SerbianLatin.nsh: updates by Obucinac: - Fixed unclear
- semantics - Fixed grammar - Fixed typos - Tuned to match serbian
- translation of Windows XP interface
+2006-06-16 09:28 joostverburg
-2006-06-30 kichik
+ * /NSIS/trunk/Contrib/Language files/Irish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Irish.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Irish language
+ files by by Kevin Scannell (NSIS patch #1503639, Mozilla bug
+ #340979)
- * Docs/src/attributes.but: typos
+2006-06-16 09:16 joostverburg
-2006-06-17 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Italian.nlf: standard Windows
+ binary prefix for kilo
- * Contrib/Language files/PortugueseBR.nlf: corrections by Jeferson
- Hultmann, from Mozilla bug #340885
+2006-06-16 09:10 joostverburg
-2006-06-17 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf: corrections by
+ Iulian Ursache-Dogariu, from Mozilla bug #340645
- * Contrib/Language files/Irish.nlf: corrections by Kevin P.
- Scannell, from Mozilla bug #340979
+2006-06-16 09:02 joostverburg
-2006-06-17 kichik
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh:
+ Corrections by Toni Hermoso Pulido (NSIS bug #1504104, Mozilla
+ bug #341094)
- * Contrib/Language files/Irish.nlf: file Irish.nlf was added on
- branch UNICODE on 2007-02-15 22:36:18 +0000
+2006-06-16 08:42 joostverburg
-2006-06-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: corrections by
+ Marek Stepien, from Mozilla bug #224532
- * Contrib/Language files/Turkish.nlf: corrections by Mozilla
- Turkey, from Mozilla bug #340511
+2006-06-16 08:39 joostverburg
-2006-06-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: corrections by
+ Michele Dal Corso, from Mozilla bug #340450
- * Contrib/Language files/Finnish.nlf: corrections by the Mozilla.fi
- crew, from Mozilla bug #341643
+2006-06-16 07:50 kichik
-2006-06-16 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed
+ __InstallLib_Helper_GetVersion for POSIX
- * Source/Platform.h: avoid "statement with no effect" warnings with
- gcc
+2006-06-02 19:24 kichik
-2006-06-16 kichik
+ * /NSIS/trunk/Docs/src/build.but: better wording
- * Source/build.cpp, Source/build.h, Source/crc32.c, Source/crc32.h,
- Source/writer.cpp, Source/writer.h, Source/exehead/fileform.c:
- fixed bug #1504758 - CRC32 implementation use potentially non-32bit
- types
+2006-06-01 10:43 kichik
-2006-06-16 kichik
+ * /NSIS/trunk/Include/FileFunc.nsh,
+ /NSIS/trunk/Include/TextFunc.nsh,
+ /NSIS/trunk/Include/WordFunc.nsh: updates by Instructor:
+ * GetFileAttributes corrections
+ * Prevent error in case of multiple header inclusion
- * Contrib/Language files/SConscript, Contrib/Modern UI/SConscript:
- install Irish
+2006-05-21 13:23 pabs3
-2006-06-16 kichik
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: Correct path to the
+ example in the VPatch README.
- * Docs/src/basic.but: no wildcards for RMDir
+2006-05-21 13:02 joostverburg
-2006-06-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: text & layout fixes
- * Source/exehead/Ui.c: fixed bug #1504297 - .onVerifyInstDir
- changes browsing text script executed in .onVerifyInstDir changes
- ps_tmpbuf which is returned by GetNSISStringTT and is used for the
- browsing text
+2006-05-21 13:01 pabs3
-2006-06-16 joostverburg
+ * /NSIS/trunk/Docs/src/build.but: Update Sourceforge ViewCVS
+ location.
- * Contrib/Language files/Irish.nlf, Contrib/Modern UI/Language
- files/Irish.nsh, Examples/Modern UI/MultiLanguage.nsi: Irish
- language files by by Kevin Scannell (NSIS patch #1503639, Mozilla
- bug #340979)
+2006-05-21 12:49 joostverburg
-2006-06-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: version number
- * Contrib/Modern UI/Language files/Irish.nsh: file Irish.nsh was
- added on branch UNICODE on 2007-02-15 22:41:49 +0000
+2006-05-20 09:14 kichik
-2006-06-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Thai.nlf: corrections
- * Contrib/Language files/Catalan.nlf, Contrib/Language
- files/Italian.nlf: standard Windows binary prefix for kilo
+2006-05-19 20:00 joostverburg
-2006-06-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: fixes by Milan Bast
- * Contrib/Language files/Romanian.nlf: corrections by Iulian
- Ursache-Dogariu, from Mozilla bug #340645
+2006-05-19 17:50 kichik
-2006-06-16 joostverburg
+ * /NSIS/trunk/Scripts/release.py: no need to purge after template
+ changes in mediawiki 1.6
- * Contrib/Language files/Catalan.nlf, Contrib/Modern UI/Language
- files/Catalan.nsh: Corrections by Toni Hermoso Pulido (NSIS bug
- #1504104, Mozilla bug #341094)
+2006-05-19 17:01
-2006-06-16 joostverburg
+ * /NSIS/tags/v217, /NSIS/tags/v217/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v217/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v217/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v217/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v217/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v217/Source/exehead/uninst.ico,
+ /NSIS/tags/v217/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v217'.
- * Contrib/Language files/Polish.nlf: corrections by Marek Stepien,
- from Mozilla bug #224532
+2006-05-19 17:01 kichik
-2006-06-16 joostverburg
+ * /NSIS/trunk/Menu/images/header.gif: 2.17
- * Contrib/Language files/Italian.nlf: corrections by Michele Dal
- Corso, from Mozilla bug #340450
+2006-05-19 17:00 kichik
-2006-06-16 kichik
+ * /NSIS/trunk/Docs/src/history.but: another fix
- * Include/Library.nsh: fixed __InstallLib_Helper_GetVersion for
- POSIX
+2006-05-19 16:56 kichik
-2006-06-02 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.17
- * Docs/src/build.but: better wording
+2006-05-19 16:27 kichik
-2006-06-01 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: typo
- * Include/FileFunc.nsh, Include/TextFunc.nsh, Include/WordFunc.nsh:
- updates by Instructor: * GetFileAttributes corrections * Prevent
- error in case of multiple header inclusion
+2006-05-19 16:04 kichik
-2006-05-21 pabs3
+ * /NSIS/trunk/Source/util.h: my_glob no longer needed
- * Contrib/VPatch/Readme.html: Correct path to the example in the
- VPatch README.
+2006-05-19 15:32 kichik
-2006-05-21 joostverburg
+ * /NSIS/trunk/Docs/src/sec.but: fixed bug #1491616 - missing
+ explanation of SF_SELECTED
- * Contrib/Modern UI/Readme.html: text & layout fixes
+2006-05-19 15:30 kichik
-2006-05-21 pabs3
+ * /NSIS/trunk/Docs/src/attributes.but: typo
- * Docs/src/build.but: Update Sourceforge ViewCVS location.
+2006-05-19 10:51 kichik
-2006-05-21 joostverburg
+ * /NSIS/trunk/Scripts/release.py: new cvs server name
- * Contrib/Modern UI/System.nsh: version number
+2006-05-19 10:25 kichik
-2006-05-20 kichik
+ * /NSIS/trunk/Contrib/Language files/Icelandic.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Icelandic.nsh:
+ updates by grelli
- * Contrib/Language files/Thai.nlf: corrections
+2006-05-19 07:49 kichik
-2006-05-19 joostverburg
+ * /NSIS/trunk/Source/exehead/util.c: fixed bug #1481664 - RMDir
+ can't delete read-only folders
- * Contrib/Language files/Dutch.nlf: fixes by Milan Bast
+2006-05-06 13:28 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh: fixes
+ by dumper
- * Scripts/release.py: no need to purge after template changes in
- mediawiki 1.6
+2006-05-03 15:43 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Source/Platform.h: fixed bug #1481044 - Segfault with
+ nsis 2.16 on MacOS 10.3 (ppc)
- * Menu/images/header.gif: 2.17
+2006-04-28 15:54 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/utils.py,
+ /NSIS/trunk/Source/ResourceEditor.h, /NSIS/trunk/Source/util.cpp:
+ fixed bug #1474597 - Mac OS X 10.4 build failures
- * Docs/src/history.but: another fix
+2006-04-28 13:33 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Source/strlist.h: avoid gcc uninitialized warning
- * Docs/src/history.but: 2.17
+2006-04-28 13:25 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Source/Platform.h: better HANDLE definition - pointer
+ can be more than 32-bit
- * Examples/makensis.nsi: typo
+2006-04-28 13:23 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Source/cbzip2.h, /NSIS/trunk/Source/compressor.h,
+ /NSIS/trunk/Source/czlib.h: virtual destructor to avoid gcc
+ warnings
- * Source/util.h: my_glob no longer needed
+2006-04-28 10:21 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf: fixed bug #1474587
+ - Hebrew typo
- * Docs/src/sec.but: fixed bug #1491616 - missing explanation of
- SF_SELECTED
+2006-04-18 10:40 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp: always push
+ something in TypeLib::GetLibVersion to avoid stack corruption
- * Docs/src/attributes.but: typo
+2006-04-18 10:38 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed bug #1471341 - InstallLib
+ misinterprets TLB version number
- * Scripts/release.py: new cvs server name
+2006-04-15 12:51 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: glob is
+ no longer needed
- * Contrib/Language files/Icelandic.nlf, Contrib/Modern UI/Language
- files/Icelandic.nsh: updates by grelli
+2006-04-15 12:41 kichik
-2006-05-19 kichik
+ * /NSIS/trunk/Source/util.cpp: initialize path
- * Source/exehead/util.c: fixed bug #1481664 - RMDir can't delete
- read-only folders
+2006-04-14 10:05 kichik
-2006-05-06 kichik
+ * /NSIS/trunk/Source/build.cpp: typo
- * Contrib/Language files/Bulgarian.nlf, Contrib/Modern UI/Language
- files/Bulgarian.nsh: fixes by dumper
+2006-04-14 09:22 kichik
-2006-05-03 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: fixed bug #1469306 - Typo in
+ 2.3.2
- * Source/Platform.h: fixed bug #1481044 - Segfault with nsis 2.16
- on MacOS 10.3 (ppc)
+2006-04-14 09:19 kichik
-2006-04-28 kichik
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: fixed bug #146947 -
+ Missing Basque and Welsh language files
- * SCons/Config/gnu, SCons/utils.py, Source/ResourceEditor.h,
- Source/util.cpp: fixed bug #1474597 - Mac OS X 10.4 build failures
+2006-04-08 11:21 joostverburg
-2006-04-28 kichik
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: updated by
+ Tiago Claus
- * Source/strlist.h: avoid gcc uninitialized warning
+2006-04-07 18:49 kichik
-2006-04-28 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/update.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: fixed bug #1466486 - typo
+ and menu problems in MakeNSISw
- * Source/Platform.h: better HANDLE definition - pointer can be more
- than 32-bit
+2006-04-07 16:21
-2006-04-28 kichik
+ * /NSIS/tags/v216, /NSIS/tags/v216/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v216/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v216/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v216/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v216/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v216/Source/exehead/uninst.ico,
+ /NSIS/tags/v216/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v216'.
- * Source/cbzip2.h, Source/compressor.h, Source/czlib.h: virtual
- destructor to avoid gcc warnings
+2006-04-07 16:21 kichik
-2006-04-28 kichik
+ * /NSIS/trunk/Source/exehead/util.h: match log_text in util.c
- * Contrib/Language files/Hebrew.nlf: fixed bug #1474587 - Hebrew
- typo
+2006-04-07 15:33 kichik
-2006-04-18 kichik
+ * /NSIS/trunk/SConstruct: properly quote build settings, even if
+ they come from the command line
- * Contrib/Library/TypeLib/TypeLib.cpp: always push something in
- TypeLib::GetLibVersion to avoid stack corruption
+2006-04-07 13:54 kichik
-2006-04-18 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.16
- * Include/Library.nsh: fixed bug #1471341 - InstallLib
- misinterprets TLB version number
+2006-04-07 13:51 kichik
-2006-04-15 kichik
+ * /NSIS/trunk/Docs/src/build.but: now supports big-endian
- * Source/util.cpp, Source/util.h: glob is no longer needed
+2006-04-07 12:37 kichik
-2006-04-15 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.16
- * Source/util.cpp: initialize path
+2006-04-07 11:00 kichik
-2006-04-14 kichik
+ * /NSIS/trunk/Docs/src/basic.but: implemented RFE #1464446 - Big
+ warning about RmDir /r "$INSTDIR" please
- * Source/build.cpp: typo
+2006-04-07 10:38 kichik
-2006-04-14 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: applied patch #1465378 -
+ Speed up NSISdl downloads
- * Docs/src/tutorial.but: fixed bug #1469306 - Typo in 2.3.2
+2006-04-05 18:54 kichik
-2006-04-14 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: fixed
+ nResult warning
- * Contrib/Language files/SConscript, Contrib/Modern UI/SConscript:
- fixed bug #146947 - Missing Basque and Welsh language files
+2006-04-05 18:52 kichik
-2006-04-08 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/SConscript: bump version
- * Contrib/Language files/PortugueseBR.nlf: updated by Tiago Claus
+2006-04-05 18:51 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Include/Library.nsh: typelibs are supported
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/update.cpp,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: fixed bug
- #1466486 - typo and menu problems in MakeNSISw
+2006-04-05 18:48 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Contrib/System/System.html: documented shift left and
+ right
- * Source/exehead/util.h: match log_text in util.c
+2006-04-05 18:47 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: bump version
- * SConstruct: properly quote build settings, even if they come from
- the command line
+2006-04-05 18:46 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Source/Tests/DialogTemplate.cpp: oops, that shouldn't
+ be there
- * Menu/images/header.gif: 2.16
+2006-04-05 18:46 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Source/Tests/SConscript: need util.cpp for unicode
+ conversion on non-win32
- * Docs/src/build.but: now supports big-endian
+2006-04-05 18:45 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/SCons/config.py, /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/util.c: implemented RFE #1460586 - Put
+ time stamps in the install log
- * Docs/src/history.but: 2.16
+2006-04-05 18:45 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: link to File
- * Docs/src/basic.but: implemented RFE #1464446 - Big warning about
- RmDir /r "$INSTDIR" please
+2006-04-05 18:44 kichik
-2006-04-07 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: size optimization
- * Contrib/NSISdl/nsisdl.cpp: applied patch #1465378 - Speed up
- NSISdl downloads
+2006-04-05 18:42 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/SConstruct, /NSIS/trunk/Source/build.cpp:
+ automatically pass makensis build settings to script
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed nResult
- warning
+2006-04-05 18:42 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/Plugins.cpp: use CResourceEditor helper
+ methods
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/SConscript: bump
- version
+2006-04-05 18:40 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: another sanity check
- * Include/Library.nsh: typelibs are supported
+2006-04-05 18:39 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: fixed a crash while adding
+ resources when there are named resources
- * Contrib/System/System.html: documented shift left and right
+2006-04-05 18:35 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Contrib/Language files/Basque.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Basque.nsh,
+ /NSIS/trunk/Docs/src/credits.but: Basque language files
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- bump version
+2006-04-05 18:34 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Docs/src/basic.but: fixed bug #1448374 - Nonsensical
+ behavior from File /r
- * Source/Tests/DialogTemplate.cpp: file DialogTemplate.cpp was
- added on branch UNICODE on 2007-02-15 22:50:35 +0000
+2006-04-05 18:32 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Docs/src/silent.but: fixed bug #1077439 - nonstandatd
+ behavior of example for command line parameters
- * Source/Tests/DialogTemplate.cpp: oops, that shouldn't be there
+2006-04-05 18:31 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Docs/src/chmlink.js: fixed bug #1449879 - NSIS User
+ Manual script error
- * Source/Tests/SConscript: need util.cpp for unicode conversion on
- non-win32
+2006-04-05 15:22 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/fileform.cpp: properly calculate number of
+ language strings
- * SCons/config.py, Source/exehead/config.h, Source/exehead/util.c:
- implemented RFE #1460586 - Put time stamps in the install log
+2006-03-28 18:22 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/script.cpp: make !define /date prints act like
+ !define /math
- * Docs/src/compilerflags.but: link to File
+2006-03-28 18:20 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: implemented RFE #1459210 - !define
+ /date should use UTC
+ added /utcdate flag
- * Source/exehead/exec.c: size optimization
+2006-03-28 17:02 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1459789 - Incorrect
+ FileOpen input validation
- * SConstruct, Source/build.cpp: automatically pass makensis build
- settings to script
+2006-03-25 19:43 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/build.cpp: big-endian compatibility for
+ uninstall_generate
- * Source/Plugins.cpp: use CResourceEditor helper methods
+2006-03-25 19:31 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/build.cpp: use new generate_unicons_offsets
- * Source/ResourceEditor.cpp: another sanity check
+2006-03-25 19:30 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h:
+ big-endian compatibility for generate_unicons_offsets
+ also a bit refactored using methods from CResourceEditor
- * Source/ResourceEditor.cpp: fixed a crash while adding resources
- when there are named resources
+2006-03-25 18:50 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: extracted
+ GetResourceDirectory and made it and GetNTHeaders public
- * Contrib/Language files/Basque.nlf, Contrib/Modern UI/Language
- files/Basque.nsh, Docs/src/credits.but: Basque language files
+2006-03-25 17:44 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: fixed virtual address
+ adjustment calculation
- * Contrib/Language files/Basque.nlf: file Basque.nlf was added on
- branch UNICODE on 2007-02-15 22:36:17 +0000
+2006-03-25 17:31 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/Tests/ResourceEditor.cpp: original data of
+ MakeLangID.exe, without aligned virtual section size
- * Contrib/Modern UI/Language files/Basque.nsh: file Basque.nsh was
- added on branch UNICODE on 2007-02-15 22:41:49 +0000
+2006-03-25 17:30 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: set resource section's
+ virtual size to its unaligned size
- * Docs/src/basic.but: fixed bug #1448374 - Nonsensical behavior
- from File /r
+2006-03-25 17:24 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: big-endian compatibility
+ could have been better, but due to lack of time, original code
+ base and the fact that it works, i'm happy with it
- * Docs/src/silent.but: fixed bug #1077439 - nonstandatd behavior of
- example for command line parameters
+2006-03-25 16:29 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Source/util.cpp: write little-endian values in
+ replace_icon
- * Docs/src/chmlink.js: fixed bug #1449879 - NSIS User Manual script
- error
+2006-03-25 11:46 kichik
-2006-04-05 kichik
+ * /NSIS/trunk/Docs/src/SConscript: CHM depends on style.css,
+ chmlink.js and nsis.hhp
- * Source/fileform.cpp: properly calculate number of language
- strings
+2006-03-25 11:35 kichik
-2006-03-28 kichik
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh: minor
+ fixes by Martin Srebotnjak
- * Source/script.cpp: make !define /date prints act like !define
- /math
+2006-03-24 21:32 kichik
-2006-03-28 kichik
+ * /NSIS/trunk/Source/Tests/DialogTemplate.cpp,
+ /NSIS/trunk/Source/Tests/ResourceEditor.cpp,
+ /NSIS/trunk/Source/Tests/SConscript: tests for CResourceEditor
+ and CDialogTemplate
- * Docs/src/defines.but, Source/script.cpp, Source/tokens.cpp:
- implemented RFE #1459210 - !define /date should use UTC added
- /utcdate flag
+2006-03-24 18:36 kichik
-2006-03-28 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h: big-endian compatibility
- * Source/script.cpp: fixed bug #1459789 - Incorrect FileOpen input
- validation
+2006-03-24 18:15 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Source/util.cpp: fixed compile errors and warnings in
+ get_executable_path
- * Source/build.cpp: big-endian compatibility for uninstall_generate
+2006-03-24 16:26 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: fixed test for resource
+ section existence
- * Source/build.cpp: use new generate_unicons_offsets
+2006-03-23 17:36 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Contrib/VPatch/Source/GenPat/PatchGenerator.h:
+ applied patch #1456861 - PatchGenerator syntax error
- * Source/util.cpp, Source/util.h: big-endian compatibility for
- generate_unicons_offsets also a bit refactored using methods from
- CResourceEditor
+2006-03-17 21:23 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Docs/src/library.but: type libraries *are* supported
+ as long as they have a version resource
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h: extracted
- GetResourceDirectory and made it and GetNTHeaders public
+2006-03-17 21:21 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Include/Library.nsh: a more accurate error message
- * Source/ResourceEditor.cpp: fixed virtual address adjustment
- calculation
+2006-03-17 20:55 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp: tabs to spaces
- * Source/Tests/ResourceEditor.cpp: file ResourceEditor.cpp was
- added on branch UNICODE on 2007-02-15 22:50:35 +0000
+2006-03-17 20:55 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp: release typelib
+ attribute structure when exiting GetLibVersion
- * Source/Tests/ResourceEditor.cpp: original data of MakeLangID.exe,
- without aligned virtual section size
+2006-03-17 20:33 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Include/Library.nsh: added ClearErrors so an error
+ will truly come from File as expected
- * Source/ResourceEditor.cpp: set resource section's virtual size to
- its unaligned size
+2006-03-17 20:07 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Include/Library.nsh: added SetFileAttribute back to
+ remove read-only flag
+ File only removes the read-only flag when SetOverwrite mode is
+ set to "on", not "try" as with InstallLib
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h: big-endian
- compatibility could have been better, but due to lack of time,
- original code base and the fact that it works, i'm happy with it
+2006-03-17 12:20 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Docs/src/library.but: a bit more support for
+ non-Windows platforms
- * Source/util.cpp: write little-endian values in replace_icon
+2006-03-17 12:15 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Include/Library.nsh: added a minimal implementation
+ of __InstallLib_Helper_GetVersion for non-win32 platforms, using
+ GetDLLVersionLocal
- * Docs/src/SConscript: CHM depends on style.css, chmlink.js and
- nsis.hhp
+2006-03-17 12:14 kichik
-2006-03-25 kichik
+ * /NSIS/trunk/Source/build.cpp: define NSIS_WIN32_MAKENSIS, if
+ makensis is compiled for win32
- * Contrib/Language files/Slovenian.nlf, Contrib/Modern UI/Language
- files/Slovenian.nsh: minor fixes by Martin Srebotnjak
+2006-03-17 12:01 kichik
-2006-03-24 kichik
+ * /NSIS/trunk/SCons/Config/ms,
+ /NSIS/trunk/Source/exehead/SConscript: moved _NSIS_NO_INT64_SHR
+ test to SCons/Config/ms so it'll only be called once and not for
+ each stub and because it's a better location being a vc specific
+ problem
- * Source/Tests/DialogTemplate.cpp, Source/Tests/ResourceEditor.cpp,
- Source/Tests/SConscript: tests for CResourceEditor and
- CDialogTemplate
+2006-03-16 17:31 kichik
-2006-03-24 kichik
+ * /NSIS/trunk/Docs/src/build.but: oops, should be
+ NSIS_CONFIG_CONST_DATA_PATH=no, as it should be relocatable and
+ should for the files in the same directory
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h: big-endian
- compatibility
+2006-03-16 17:23 kichik
-2006-03-24 kichik
+ * /NSIS/trunk/Docs/src/build.but: when building makensis that'd be
+ dropped in a zipped release, use NSIS_CONFIG_CONST_DATA_PATH
- * Source/util.cpp: fixed compile errors and warnings in
- get_executable_path
+2006-03-15 06:51 pabs3
-2006-03-24 kichik
+ * /NSIS/trunk/Source/util.cpp: Make get_executable_path more
+ portable and correct.
- * Source/ResourceEditor.cpp: fixed test for resource section
- existence
+2006-03-14 19:53 kichik
-2006-03-23 kichik
+ * /NSIS/trunk/Docs/src/basic.but: typo
- * Contrib/VPatch/Source/GenPat/PatchGenerator.h: applied patch
- #1456861 - PatchGenerator syntax error
+2006-03-14 18:22 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/SCons/Config/gnu: make sure -Wl,-Map is supported by
+ the linker
+ mingw supports it, so only check for non-cross envs
- * Docs/src/library.but: type libraries *are* supported as long as
- they have a version resource
+2006-03-14 18:21 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/SCons/utils.py: should be main, not __main
- * Include/Library.nsh: a more accurate error message
+2006-03-14 18:03 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/SCons/utils.py: return true if the flag is valid, not
+ the other way around
- * Contrib/Library/TypeLib/TypeLib.cpp: tabs to spaces
+2006-03-14 17:53 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/SCons/Config/gnu: use FlagsConfigure for -pthread
- * Contrib/Library/TypeLib/TypeLib.cpp: release typelib attribute
- structure when exiting GetLibVersion
+2006-03-14 17:52 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/SCons/utils.py: added FlagsConfigure for compiler and
+ linker flags configuration
- * Include/Library.nsh: added ClearErrors so an error will truly
- come from File as expected
+2006-03-14 17:07 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: implemented feature
+ request #1447766 - MUI setting for transparent header labels
+ added MUI_HEADER_TRANSPARENT_TEXT
- * Include/Library.nsh: added SetFileAttribute back to remove
- read-only flag File only removes the read-only flag when
- SetOverwrite mode is set to "on", not "try" as with InstallLib
+2006-03-14 16:34 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: tabs to spaces
- * Docs/src/library.but: a bit more support for non-Windows
- platforms
+2006-03-14 16:04 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/Docs/src/basic.but: added a detailed explanation
+ about File /r that can't be interpreted in more than one way
- * Include/Library.nsh: added a minimal implementation of
- __InstallLib_Helper_GetVersion for non-win32 platforms, using
- GetDLLVersionLocal
+2006-03-14 14:09 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: implemented feature
+ request #1448176 - show function support for start menu page
- * Source/build.cpp: define NSIS_WIN32_MAKENSIS, if makensis is
- compiled for win32
+2006-03-14 12:29 kichik
-2006-03-17 kichik
+ * /NSIS/trunk/Docs/src/build.but: links to pre-compiled versions
- * SCons/Config/ms, Source/exehead/SConscript: moved
- _NSIS_NO_INT64_SHR test to SCons/Config/ms so it'll only be called
- once and not for each stub and because it's a better location being
- a vc specific problem
+2006-03-11 18:31 kichik
-2006-03-16 kichik
+ * /NSIS/trunk/Examples/Library.nsi: smaller test dll for faster
+ tests
- * Docs/src/build.but: oops, should be
- NSIS_CONFIG_CONST_DATA_PATH=no, as it should be relocatable and
- should for the files in the same directory
+2006-03-11 18:19 kichik
-2006-03-16 kichik
+ * /NSIS/trunk/Source/build.cpp: added missing try catch block for
+ init_res_editor calls
- * Docs/src/build.but: when building makensis that'd be dropped in a
- zipped release, use NSIS_CONFIG_CONST_DATA_PATH
+2006-03-11 18:14 kichik
-2006-03-15 pabs3
+ * /NSIS/trunk/Source/util.cpp: updated update_bitmap, replace_icon
+ and generate_uninstall_icon_data so they'll work on big-endian
+ platforms
+ still need to update generate_unicons_offsets
- * Source/util.cpp: Make get_executable_path more portable and
- correct.
+2006-03-11 18:13 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/Plugins.cpp: made GetExports work on
+ big-endian platforms as well
- * Docs/src/basic.but: typo
+2006-03-11 18:12 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/Platform.h: made some resource macros work
+ with big-endian as well
- * SCons/Config/gnu: make sure -Wl,-Map is supported by the linker
- mingw supports it, so only check for non-cross envs
+2006-03-11 18:11 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/Tests/endian.cpp, /NSIS/trunk/Source/util.h:
+ moved endianity macros to Platform.h
- * SCons/utils.py: should be main, not __main
+2006-03-11 17:34 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/clzma.cpp: fix for WaitForSingleObject POSIX
+ implementation by codesquid
- * SCons/utils.py: return true if the flag is valid, not the other
- way around
+2006-03-11 11:37 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/util.cpp: no need for iNewIconSize in
+ replace_icon
- * SCons/Config/gnu: use FlagsConfigure for -pthread
+2006-03-11 11:22 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/build.cpp: endianity fixes
- * SCons/utils.py: added FlagsConfigure for compiler and linker
- flags configuration
+2006-03-11 11:21 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/build.cpp: use new writers
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- implemented feature request #1447766 - MUI setting for transparent
- header labels added MUI_HEADER_TRANSPARENT_TEXT
+2006-03-11 11:16 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/Tests/endian.cpp: tests for 16-bit endian
+ conversion
- * Contrib/Modern UI/System.nsh: tabs to spaces
+2006-03-11 11:15 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/util.h: added 16-bit endian conversion macros
- * Docs/src/basic.but: added a detailed explanation about File /r
- that can't be interpreted in more than one way
+2006-03-11 11:15 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/SConscript: added fileform.cpp and writer.cpp
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- implemented feature request #1448176 - show function support for
- start menu page
+2006-03-11 11:13 kichik
-2006-03-14 kichik
+ * /NSIS/trunk/Source/fileform.cpp, /NSIS/trunk/Source/fileform.h:
+ writers for header structures
- * Docs/src/build.but: links to pre-compiled versions
+2006-03-11 11:13 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/writer.cpp, /NSIS/trunk/Source/writer.h:
+ centralized classes for writing data
+ this allows global changes to how data is written with one change
+ currently, it only converts from big-endian to little-endian
+ in the future, this will allow an easy transition to writing
+ 64-bit data
- * Examples/Library.nsi: smaller test dll for faster tests
+2006-03-11 10:47 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/clzma.cpp: synchronize ResetEvent as well
- * Source/build.cpp: added missing try catch block for
- init_res_editor calls
+2006-03-11 10:42 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Docs/src/ui.but: link to GetDlgItem
- * Source/util.cpp: updated update_bitmap, replace_icon and
- generate_uninstall_icon_data so they'll work on big-endian
- platforms still need to update generate_unicons_offsets
+2006-03-10 21:42 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/util.cpp: the conditions on both wIsIcon and
+ wReserved must be met, not just on one of them
- * Source/Plugins.cpp: made GetExports work on big-endian platforms
- as well
+2006-03-10 15:17 pabs3
-2006-03-11 kichik
+ * /NSIS/trunk/SConstruct: Fix for POSIX regression due to sconf.h
+ change.
- * Source/Platform.h: made some resource macros work with big-endian
- as well
+2006-03-10 14:55 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/clzma.cpp: return if the passed event handle
+ is NULL and not when it's valid
- * Source/util.h, Source/Tests/endian.cpp, Source/Platform.h: moved
- endianity macros to Platform.h
+2006-03-08 20:36 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: only report a successful
+ download, if the downloading actually got past the headers
- * Source/clzma.cpp: fix for WaitForSingleObject POSIX
- implementation by codesquid
+2006-03-08 20:25 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp: fixed bug #1445735 -
+ WinProxy headers not read by NSISdl
- * Source/util.cpp: no need for iNewIconSize in replace_icon
+2006-03-08 16:44 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/SConstruct: add new line to version.h to avoid gcc
+ warning
- * Source/build.cpp: endianity fixes
+2006-03-08 16:14 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/clzma.cpp: * never delete self on Release(),
+ CLZMA is not a real COM class
+ * safer destructor
- * Source/build.cpp: use new writers
+2006-03-07 14:14 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Source/exehead/exec.c: export validate_filename for
+ plug-ins
- * Source/Tests/endian.cpp: tests for 16-bit endian conversion
+2006-03-07 14:12 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c: fixed bug #1440636 -
+ invalid folder names returned by StartMenu plug-in
- * Source/util.h: added 16-bit endian conversion macros
+2006-03-07 14:11 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/exehead/util.c: size optimization
- * Source/SConscript: added fileform.cpp and writer.cpp
+2006-03-07 14:02 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c: simpler prefixing code
- * Source/fileform.cpp, Source/fileform.h: writers for header
- structures
+2006-03-06 15:15 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: added "Cancel
+ compilation" menu item to abort current compilation by sending
+ ctrl+c signal
- * Source/writer.cpp, Source/writer.h: centralized classes for
- writing data this allows global changes to how data is written with
- one change currently, it only converts from big-endian to
- little-endian in the future, this will allow an easy transition to
- writing 64-bit data
+2006-03-06 15:12 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: accept event as ctrl+c as well,
+ because GenerateConsoleCtrlEvent doesn't work form a
+ non-parent-console process
- * Source/clzma.cpp: synchronize ResetEvent as well
+2006-03-06 15:04 kichik
-2006-03-11 kichik
+ * /NSIS/trunk/SConstruct: added back "v" prefix to NSIS_VERSION
- * Docs/src/ui.but: link to GetDlgItem
+2006-03-04 16:18
-2006-03-10 kichik
+ * /NSIS/tags/v215, /NSIS/tags/v215/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v215/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v215/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v215/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v215/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v215/Source/exehead/uninst.ico,
+ /NSIS/tags/v215/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v215'.
- * Source/util.cpp: the conditions on both wIsIcon and wReserved
- must be met, not just on one of them
+2006-03-04 16:18 kichik
-2006-03-10 pabs3
+ * /NSIS/trunk/Menu/images/header.gif: 2.15
- * SConstruct: Fix for POSIX regression due to sconf.h change.
+2006-03-04 16:12 kichik
-2006-03-10 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.15
- * Source/clzma.cpp: return if the passed event handle is NULL and
- not when it's valid
+2006-03-04 13:48 kichik
-2006-03-08 kichik
+ * /NSIS/trunk/Source/lang.cpp: directory edit box should not be rtl
+ as it contains mostly english
- * Contrib/NSISdl/nsisdl.cpp: only report a successful download, if
- the downloading actually got past the headers
+2006-03-03 09:27 kichik
-2006-03-08 kichik
+ * /NSIS/trunk/Docs/src/build.but: note about building System with a
+ cross compiler
- * Contrib/NSISdl/httpget.cpp: fixed bug #1445735 - WinProxy headers
- not read by NSISdl
+2006-03-02 17:21 kichik
-2006-03-08 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: link to SetBrandingImage
- * SConstruct: add new line to version.h to avoid gcc warning
+2006-03-02 17:18 kichik
-2006-03-08 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: link AddBrandingImage to
+ SetBrandingImage
- * Source/clzma.cpp: * never delete self on Release(), CLZMA is not
- a real COM class * safer destructor
+2006-03-02 17:12 kichik
-2006-03-07 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1441877 - !include
+ keeps searching include dirs even after match
- * Contrib/ExDLL/exdll.h: export validate_filename for plug-ins
+2006-02-24 19:28 kichik
-2006-03-07 kichik
+ * /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/state.h: moved NSIS_STRING from
+ config.h to fileform.h
- * Contrib/StartMenu/StartMenu.c: fixed bug #1440636 - invalid
- folder names returned by StartMenu plug-in
+2006-02-24 19:21 kichik
-2006-03-07 kichik
+ * /NSIS/trunk/Source/util.h: no more need for this evil
- * Source/exehead/util.c: size optimization
+2006-02-24 19:19 kichik
-2006-03-07 kichik
+ * /NSIS/trunk/SConstruct, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/makenssi.cpp: fixed bug #1434215 - #define
+ local leaks into path settings
- * Source/exehead/exec.c: export validate_filename for plug-ins
+2006-02-24 19:17 kichik
-2006-03-07 kichik
+ * /NSIS/trunk/SConstruct: write all defines to sconf.h which is
+ included by config.h instead of passing them on the command line
+ write the freaquently changing NSIS_VERSION to a separate file
+ named version.h so only files that really need it will include it
- * Contrib/StartMenu/StartMenu.c: simpler prefixing code
+2006-02-24 19:14 kichik
-2006-03-06 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ use NSIS_VERSION from the new automatically genereated version.h
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp: added "Cancel compilation" menu item
- to abort current compilation by sending ctrl+c signal
+2006-02-24 19:12 kichik
-2006-03-06 kichik
+ * /NSIS/trunk/SCons/config.py, /NSIS/trunk/Source/exehead/config.h:
+ move NSIS_VARS_SECTION to sconf.h
- * Source/makenssi.cpp: accept event as ctrl+c as well, because
- GenerateConsoleCtrlEvent doesn't work form a non-parent-console
- process
+2006-02-24 19:10 kichik
-2006-03-06 kichik
+ * /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/SConscript,
+ /NSIS/trunk/Source/SConscript: write all defines to sconf.h which
+ is included by config.h instead of passing them on the command
+ line
+ write the freaquently changing NSIS_VERSION to a separate file
+ named version.h so only files that really need it will include it
- * SConstruct: added back "v" prefix to NSIS_VERSION
+2006-02-24 18:15 kichik
-2006-03-04 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1400995 - MB_TOPMOST
+ doesn't work as first sections' instruction
- * Menu/images/header.gif: 2.15
+2006-02-24 16:19 kichik
-2006-03-04 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/SCons/Tools/crossmingw.py,
+ /NSIS/trunk/Source/7zip/LZMADecode.c: applied patch #1434174 -
+ GCC 4.2 patches
- * Docs/src/history.but: 2.15
+2006-02-24 16:10 kichik
-2006-03-04 kichik
+ * /NSIS/trunk/Source/script.cpp: wrong strcmp for !define /math
+ division
- * Source/lang.cpp: directory edit box should not be rtl as it
- contains mostly english
+2006-02-24 16:08 kichik
-2006-03-03 kichik
+ * /NSIS/trunk/Source/Tests/preprocessor.nsi: fixed error messages
+ and removed useless !undef's
- * Docs/src/build.but: note about building System with a cross
- compiler
+2006-02-24 16:00 kichik
-2006-03-02 kichik
+ * /NSIS/trunk/Source/script.cpp: sprintf into a buffer, not a
+ random address
- * Docs/src/attributes.but: link to SetBrandingImage
+2006-02-24 15:55 kichik
-2006-03-02 kichik
+ * /NSIS/trunk/Source/script.cpp: removed stray parenthesis
- * Docs/src/attributes.but: link AddBrandingImage to
- SetBrandingImage
+2006-02-24 15:52 kichik
-2006-03-02 kichik
+ * /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/Tests/preprocessor.nsi,
+ /NSIS/trunk/Source/tokens.cpp: applied patch #1372561 - !define
+ /math compile time enhancement
- * Source/script.cpp: fixed bug #1441877 - !include keeps searching
- include dirs even after match
+2006-02-24 15:09 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Docs/src/credits.but: more credit
- * Source/exehead/config.h, Source/exehead/fileform.h,
- Source/exehead/state.h: moved NSIS_STRING from config.h to
- fileform.h
+2006-02-24 15:06 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/Tests/preprocessor.nsi,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ applied patch #1412982 - "!if" - enhanced compile time flow
+ control
- * Source/util.h: no more need for this evil
+2006-02-24 11:49 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: applied
+ patch #1416988 - small italian translation bug
- * SConstruct, Source/build.cpp, Source/makenssi.cpp: fixed bug
- #1434215 - #define local leaks into path settings
+2006-02-24 11:48 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh: applied
+ patch #1427189 - Czech grammar mistakes
- * SConstruct: write all defines to sconf.h which is included by
- config.h instead of passing them on the command line write the
- freaquently changing NSIS_VERSION to a separate file named
- version.h so only files that really need it will include it
+2006-02-24 11:44 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Docs/src/ui.but: fixed bug #1432423 - section
+ 4.9.14.8 IsWindow example incorrect
- * Source/build.cpp, Source/lang.cpp, Source/makenssi.cpp,
- Source/script.cpp: use NSIS_VERSION from the new automatically
- genereated version.h
+2006-02-24 11:41 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: fixed bug #1431593 -
+ dir_reader::matches uses iterator that is at end
- * SCons/config.py, Source/exehead/config.h: move NSIS_VARS_SECTION
- to sconf.h
+2006-02-23 17:54 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: example moved to
+ Examples directory
- * Source/SConscript, Source/exehead/SConscript,
- Source/exehead/config.h: write all defines to sconf.h which is
- included by config.h instead of passing them on the command line
- write the freaquently changing NSIS_VERSION to a separate file
- named version.h so only files that really need it will include it
+2006-02-23 11:27 pabs3
-2006-02-24 kichik
+ * /NSIS/trunk/Source/script.cpp: Fix 1431958: Properly convert
+ !addincludedir paths on POSIX platforms.
- * Source/exehead/Ui.c: fixed bug #1400995 - MB_TOPMOST doesn't work
- as first sections' instruction
+2006-02-11 18:54 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Docs/src/misc.but: added Nop
- * Contrib/StartMenu/StartMenu.c, SCons/Tools/crossmingw.py,
- Source/7zip/LZMADecode.c: applied patch #1434174 - GCC 4.2 patches
+2006-02-10 10:51 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Examples/WordFuncTest.nsi,
+ /NSIS/trunk/Include/FileFunc.nsh,
+ /NSIS/trunk/Include/TextFunc.nsh: Updates by Instructor:
+ - Added /NOUNLOAD flag for the system plugin calls. Functions
+ that uses system plugin calls several times, now 25-75% faster.
+ - Added tests for new WordReplace options "{", "}", "{*", "}*"
- * Source/script.cpp: wrong strcmp for !define /math division
+2006-02-10 10:46 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Docs/src/headers.but,
+ /NSIS/trunk/Examples/FileFunc.nsi,
+ /NSIS/trunk/Examples/FileFuncTest.nsi,
+ /NSIS/trunk/Examples/TextFunc.nsi,
+ /NSIS/trunk/Examples/TextFuncTest.nsi,
+ /NSIS/trunk/Examples/WordFuncTest.nsi,
+ /NSIS/trunk/Include/FileFunc.nsh,
+ /NSIS/trunk/Include/TextFunc.nsh,
+ /NSIS/trunk/Include/WordFunc.nsh: Updates by Instructor
+
+ 1. "WordReplace"
+ -Added options "{", "}", "{*", "}*"
+
+ 2. "GetOptions"
+ -Now sets error flag if option does not found
+
+ 3. "ConfigRead"
+ -Now sets error flag if entry does not found
+
+ 4. New case sensitive functions:
+ "WordFindS", "WordFind2XS", "WordFind3XS", "WordReplaceS",
+ "WordAddS", "WordInsertS", "StrFilterS", "TextCompareS",
+ "ConfigReadS", "ConfigWriteS", "GetOptionsS"
- * Source/Tests/preprocessor.nsi: fixed error messages and removed
- useless !undef's
+2006-02-04 15:01 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Source/util.cpp: throw runtime_error as it's more
+ appropriate and has the required constructor on libstdc++ as well
- * Source/script.cpp: sprintf into a buffer, not a random address
+2006-02-01 16:55 joostverburg
-2006-02-24 kichik
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh:
+ updated by Plamen Penkov
- * Source/script.cpp: removed stray parenthesis
+2006-02-01 06:01 pabs3
-2006-02-24 kichik
+ * /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/SConstruct: Remember to
+ define __BIG_ENDIAN__ for the tests as well as makensis.
- * Docs/src/defines.but, Source/script.cpp,
- Source/Tests/preprocessor.nsi, Source/tokens.cpp: applied patch
- #1372561 - !define /math compile time enhancement
+2006-01-31 19:52 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Docs/src/ui.but: fixed bug #1420352 - check box
+ transparent background
- * Docs/src/credits.but: more credit
+2006-01-31 18:27 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Source/exehead/util.c: fixed bug #1420657 - RMDIR
+ doesn't delete file with double dots prefix
- * Docs/src/defines.but, Source/script.cpp, Source/tokens.cpp,
- Source/Tests/preprocessor.nsi, Source/tokens.h: applied patch
- #1412982 - "!if" - enhanced compile time flow control
+2006-01-27 18:06 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Source/exehead/util.c: check if log_dolog is set for
+ NSIS_CONFIG_LOG_STDOUT as well
- * Contrib/Modern UI/Language files/Italian.nsh: applied patch
- #1416988 - small italian translation bug
+2006-01-27 17:53 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/SCons/config.py, /NSIS/trunk/SCons/Config/default,
+ /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/ms,
+ /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/SConscript,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: added NSIS_CONFIG_LOG_STDOUT
- * Contrib/Modern UI/Language files/Czech.nsh: applied patch
- #1427189 - Czech grammar mistakes
+2006-01-27 17:51 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Source/build.cpp: pass NSIS_CONFIG_LOG_ODS to script
- * Docs/src/ui.but: fixed bug #1432423 - section 4.9.14.8 IsWindow
- example incorrect
+2006-01-27 15:57 kichik
-2006-02-24 kichik
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: fixed bug #1174742 - Icon error
+ message is uninformative
- * Source/dirreader.cpp: fixed bug #1431593 - dir_reader::matches
- uses iterator that is at end
+2006-01-27 15:44 kichik
-2006-02-23 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: richedit controls automatically
+ set the hand cursor for links, no need to do it manually
- * Contrib/InstallOptions/Readme.html: example moved to Examples
- directory
+2006-01-27 15:26 kichik
-2006-02-23 pabs3
+ * /NSIS/trunk/Contrib/Language files/Breton.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Breton.nsh: -
+ Windows Vista has a LANGID for Breton (1150)
+ - some updates
- * Source/script.cpp: Fix 1431958: Properly convert !addincludedir
- paths on POSIX platforms.
+2006-01-27 13:45 pabs3
-2006-02-11 kichik
+ * /NSIS/trunk/SCons/Config/gnu: Fix Debian bug #350112: Use
+ CPPDEFINES instead of broken CPPFLAGS to define __BIG_ENDIAN__ on
+ big endian POSIX platforms.
- * Docs/src/misc.but: added Nop
+2006-01-26 18:02 kichik
-2006-02-10 kichik
+ * /NSIS/trunk/Docs/src/history.but: typo
- * Examples/WordFuncTest.nsi, Include/FileFunc.nsh,
- Include/TextFunc.nsh: Updates by Instructor: - Added /NOUNLOAD
- flag for the system plugin calls. Functions that uses system plugin
- calls several times, now 25-75% faster. - Added tests for new
- WordReplace options "{", "}", "{*", "}*"
+2006-01-26 17:24 kichik
-2006-02-10 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Mongolian.nsh: -
+ added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ - more updates
- * Docs/src/headers.but, Examples/FileFunc.nsi,
- Examples/FileFuncTest.nsi, Examples/TextFunc.nsi,
- Examples/TextFuncTest.nsi, Examples/WordFuncTest.nsi,
- Include/FileFunc.nsh, Include/TextFunc.nsh, Include/WordFunc.nsh:
- Updates by Instructor
+2006-01-24 18:08
- 1. "WordReplace" -Added options "{", "}", "{*", "}*"
+ * /NSIS/tags/v214, /NSIS/tags/v214/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v214/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v214/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v214/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v214/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v214/Source/exehead/uninst.ico,
+ /NSIS/tags/v214/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v214'.
- 2. "GetOptions" -Now sets error flag if option does not found
+2006-01-24 18:08 kichik
- 3. "ConfigRead" -Now sets error flag if entry does not found
+ * /NSIS/trunk/Menu/images/header.gif: 2.14
- 4. New case sensitive functions: "WordFindS", "WordFind2XS",
- "WordFind3XS", "WordReplaceS", "WordAddS", "WordInsertS",
- "StrFilterS", "TextCompareS", "ConfigReadS", "ConfigWriteS",
- "GetOptionsS"
+2006-01-24 17:57 kichik
-2006-02-04 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: check g_tmp[0] not
+ state_language[2]
- * Source/util.cpp: throw runtime_error as it's more appropriate and
- has the required constructor on libstdc++ as well
+2006-01-24 17:54 kichik
-2006-02-01 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: 2.14
- * Contrib/Language files/Bulgarian.nlf, Contrib/Modern UI/Language
- files/Bulgarian.nsh: updated by Plamen Penkov
+2006-01-24 17:54 kichik
-2006-02-01 pabs3
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1412159 - NSIS 2.13
+ doesn't work on Win 95/98/NT
- * SConstruct, SCons/Config/default, SCons/Config/gnu,
- SCons/Config/ms: Remember to define __BIG_ENDIAN__ for the tests as
- well as makensis.
+2006-01-24 17:31 kichik
-2006-01-31 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: g_tmp should be at least twice
+ NSIS_MAX_STRLEN, no matter what NSIS_MAX_STRLEN is
- * Docs/src/ui.but: fixed bug #1420352 - check box transparent
- background
+2006-01-21 15:59 kichik
-2006-01-31 kichik
+ * /NSIS/trunk/SCons/config.py, /NSIS/trunk/Source/exehead/config.h:
+ oops, quoting problems, back to config.h
- * Source/exehead/util.c: fixed bug #1420657 - RMDIR doesn't delete
- file with double dots prefix
+2006-01-21 15:17 kichik
-2006-01-27 kichik
+ * /NSIS/trunk/SCons/config.py, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/util.c: moved VARS_SECTION_NAME from
+ config.h to config.py and renamed it to NSIS_VARS_SECTION
- * Source/exehead/util.c: check if log_dolog is set for
- NSIS_CONFIG_LOG_STDOUT as well
+2006-01-21 12:29
-2006-01-27 kichik
+ * /NSIS/tags/v213, /NSIS/tags/v213/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v213/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v213/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v213/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v213/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v213/Source/exehead/uninst.ico,
+ /NSIS/tags/v213/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v213'.
- * SCons/config.py, SCons/Config/default, SCons/Config/gnu,
- SCons/Config/ms, Source/build.cpp, Source/exehead/Main.c,
- Source/exehead/SConscript, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/util.c: added NSIS_CONFIG_LOG_STDOUT
+2006-01-21 12:29 kichik
-2006-01-27 kichik
+ * /NSIS/trunk/SConstruct: don't install TODO.txt
- * Source/build.cpp: pass NSIS_CONFIG_LOG_ODS to script
+2006-01-21 12:16 kichik
-2006-01-27 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.13
- * Source/script.cpp, Source/util.cpp, Source/util.h: fixed bug
- #1174742 - Icon error message is uninformative
+2006-01-21 12:02 kichik
-2006-01-27 kichik
+ * /NSIS/trunk/Docs/src/history.but: clearer description
- * Source/exehead/Ui.c: richedit controls automatically set the hand
- cursor for links, no need to do it manually
+2006-01-21 11:59 kichik
-2006-01-27 kichik
+ * /NSIS/trunk/Docs/src/credits.but: more credit
- * Contrib/Language files/Breton.nlf, Contrib/Modern UI/Language
- files/Breton.nsh: - Windows Vista has a LANGID for Breton (1150) -
- some updates
+2006-01-21 11:51 kichik
-2006-01-27 pabs3
+ * /NSIS/trunk/Docs/src/history.but: 2.13
- * SCons/Config/gnu: Fix Debian bug #350112: Use CPPDEFINES instead
- of broken CPPFLAGS to define __BIG_ENDIAN__ on big endian POSIX
- platforms.
+2006-01-21 11:48 kichik
-2006-01-26 kichik
+ * /NSIS/trunk/Contrib/System/System.html: it's $LANGUAGE, not $LANG
- * Docs/src/history.but: typo
+2006-01-21 10:18 kichik
-2006-01-26 kichik
+ * /NSIS/trunk/Docs/src/SConscript: only fix htmls when not on win32
- * Contrib/Modern UI/Language files/Mongolian.nsh: - added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE - more updates
+2006-01-21 09:54 pabs3
-2006-01-24 kichik
+ * /NSIS/trunk/Contrib/Graphics/SConscript,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript,
+ /NSIS/trunk/Contrib/Library/RegTool/SConscript,
+ /NSIS/trunk/Contrib/MakeLangId/SConscript,
+ /NSIS/trunk/Contrib/Makensisw/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/SConscript,
+ /NSIS/trunk/Contrib/NSIS Menu/SConscript,
+ /NSIS/trunk/Contrib/UIs/SConscript,
+ /NSIS/trunk/Contrib/VPatch/SConscript,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/SConscript,
+ /NSIS/trunk/Contrib/zip2exe/SConscript,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/SConscript, /NSIS/trunk/Docs/src/script.but,
+ /NSIS/trunk/Docs/src/usage.but, /NSIS/trunk/Docs/src/var.but,
+ /NSIS/trunk/Examples/SConscript, /NSIS/trunk/Include/SConscript,
+ /NSIS/trunk/INSTALL, /NSIS/trunk/SCons/config.py,
+ /NSIS/trunk/SConstruct, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/makenssi.cpp: Merge patch for better installs
+ on POSIX platforms.
- * Menu/images/header.gif: 2.14
+2006-01-20 12:36 kichik
-2006-01-24 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/License.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/license.but,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: 2006
- * Source/exehead/Ui.c: check g_tmp[0] not state_language[2]
+2006-01-19 18:40 kichik
-2006-01-24 kichik
+ * /NSIS/trunk/Contrib/Language files/Mongolian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Mongolian.nsh: ***
+ empty log message ***
- * Docs/src/history.but: 2.14
+2006-01-14 16:03 kichik
-2006-01-24 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization
- * Source/exehead/Ui.c: fixed bug #1412159 - NSIS 2.13 doesn't work
- on Win 95/98/NT
+2006-01-14 15:55 kichik
-2006-01-24 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization
- * Source/exehead/Ui.c: g_tmp should be at least twice
- NSIS_MAX_STRLEN, no matter what NSIS_MAX_STRLEN is
+2006-01-14 15:42 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization
- * SCons/config.py, Source/exehead/config.h: oops, quoting problems,
- back to config.h
+2006-01-14 15:32 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: added a comment explaining the
+ workaround
- * SCons/config.py, Source/build.cpp, Source/exehead/config.h,
- Source/exehead/util.c: moved VARS_SECTION_NAME from config.h to
- config.py and renamed it to NSIS_VARS_SECTION
+2006-01-14 15:22 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1397031 - masked
+ checkboxes don't redraw on Windows 95
- * SConstruct: don't install TODO.txt
+2006-01-14 13:35 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: TreeView doesn't automatically
+ scroll to newly added items, there's no need to manually scroll
+ back to the top.
+ I'd keep it just to be on the safe side, but on Windows 95, it
+ crashes when there are no items in the TreeView.
- * Menu/images/header.gif: 2.13
+2006-01-13 20:44 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimization (zlib is back
+ to 34)
- * Docs/src/history.but: clearer description
+2006-01-13 19:56 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1209843 - $INSTDIR is
+ empty in directory page show callback function
- * Docs/src/credits.but: more credit
+2006-01-13 18:45 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Source/exehead/util.c: fixed bug #1378785 - RMDir /r
+ does not remove files with Unicode names
- * Docs/src/history.but: 2.13
+2006-01-13 15:24 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Contrib/System/System.html: fixed bug #1403608 -
+ Callback function called when host function already returned
+ explain in documentation that the callback destination variable
+ must be cleared
- * Contrib/System/System.html: it's $LANGUAGE, not $LANG
+2006-01-13 14:31 kichik
-2006-01-21 kichik
+ * /NSIS/trunk/Contrib/System/Source/System.c: fixed bug #1403601 -
+ System plug-in heap corruption
- * Docs/src/SConscript: only fix htmls when not on win32
+2006-01-13 14:08 kichik
-2006-01-21 pabs3
+ * /NSIS/trunk/Scripts/release.py: update change log start time
- * INSTALL, SConstruct, Contrib/Graphics/SConscript,
- Contrib/Language files/SConscript,
- Contrib/Library/LibraryLocal/SConscript,
- Contrib/Library/RegTool/SConscript, Contrib/MakeLangId/SConscript,
- Contrib/Makensisw/SConscript, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/SConscript, Contrib/NSIS Menu/SConscript,
- Contrib/UIs/SConscript, Contrib/VPatch/SConscript,
- Contrib/VPatch/Source/GenPat/SConscript,
- Contrib/zip2exe/SConscript, Docs/src/SConscript,
- Docs/src/callback.but, Docs/src/script.but, Docs/src/usage.but,
- Docs/src/var.but, Examples/SConscript, Include/SConscript,
- SCons/config.py, Source/build.cpp, Source/makenssi.cpp: Merge patch
- for better installs on POSIX platforms.
+2006-01-13 09:52 kichik
-2006-01-20 kichik
+ * /NSIS/trunk/Scripts/release.py: comments update
- * license.txt, Contrib/InstallOptions/Readme.html, Contrib/Modern
- UI/License.txt, Contrib/Modern UI/Readme.html, Contrib/Modern
- UI/System.nsh, Docs/src/chm_config.but, Docs/src/config.but,
- Docs/src/license.but, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/makenssi.cpp,
- Source/exehead/Main.c, Source/exehead/Ui.c: 2006
+2006-01-06 17:28 kichik
-2006-01-19 kichik
+ * /NSIS/trunk/Include/LogicLib.nsh: no more need for _StrCmp
- * Contrib/Language files/Mongolian.nlf, Contrib/Modern UI/Language
- files/Mongolian.nsh: [no log message]
+2006-01-06 16:05 kichik
-2006-01-14 kichik
+ * /NSIS/trunk/Include/LogicLib.nsh: use StrCmpS instead of System
+ plug-in
- * Source/exehead/Ui.c: size optimization
+2006-01-06 16:00 kichik
-2006-01-14 kichik
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: applied patch #1381929 - StrCmpS -
+ case-sensitive string comparison
- * Source/exehead/Ui.c: size optimization
+2006-01-05 17:57 kichik
-2006-01-14 kichik
+ * /NSIS/trunk/Docs/src/headers.but: better wording
- * Source/exehead/Ui.c: size optimization
+2006-01-03 23:41 ballison
-2006-01-14 kichik
+ * /NSIS/branches/UNICODE/Source/strlist.cpp,
+ /NSIS/branches/UNICODE/Source/strlist.h: converted to using
+ <tchar.h>, strlen -> _tcslen, char becomes TCHAR. also used
+ sizeof()
+ better, for unicode compilation ability
- * Source/exehead/Ui.c: added a comment explaining the workaround
+2005-12-31 14:23 kichik
-2006-01-14 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1299100 - File
+ /nonfatal line not seen by relative jumps
- * Source/exehead/Ui.c: fixed bug #1397031 - masked checkboxes don't
- redraw on Windows 95
+2005-12-31 14:13 kichik
-2006-01-14 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1362443 - BrandingText
+ /TRIM* expands label
+ a warning is displayed if the label is actually expanded
- * Source/exehead/Ui.c: TreeView doesn't automatically scroll to
- newly added items, there's no need to manually scroll back to the
- top. I'd keep it just to be on the safe side, but on Windows 95,
- it crashes when there are no items in the TreeView.
+2005-12-30 15:47 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1324734 - $LANGUAGE
+ based on locale rather than UI language
- * Source/exehead/Ui.c: size optimization (zlib is back to 34)
+2005-12-30 13:51 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Source/exehead/util.c: use normal file functions for
+ wininit.ini modification
+ - according to msdn, mmap operations can raise an exception which
+ wasn't handled
+ - free up a lot of bytes from .data section (no mmap API
+ functions)
+ - mmap size is, like allocation of a buffer, limited by available
+ memory
- * Source/exehead/Ui.c: fixed bug #1209843 - $INSTDIR is empty in
- directory page show callback function
+2005-12-27 19:24 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Docs/src/file.but: FileRead is limited to 1024 only
+ on the normal builds
- * Source/exehead/util.c: fixed bug #1378785 - RMDir /r does not
- remove files with Unicode names
+2005-12-27 19:22 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Source/script.cpp: use NSIS_MAX_STRLEN-1 instead of
+ 1023 for FileRead limit
- * Contrib/System/System.html: fixed bug #1403608 - Callback
- function called when host function already returned explain in
- documentation that the callback destination variable must be
- cleared
+2005-12-24 16:39 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c: size optimization (zlib is
+ back to 34/35)
- * Contrib/System/Source/System.c: fixed bug #1403601 - System
- plug-in heap corruption
+2005-12-24 16:28 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Source/exehead/util.c: size optimizations
- * Scripts/release.py: update change log start time
+2005-12-24 15:47 kichik
-2006-01-13 kichik
+ * /NSIS/trunk/Examples/FileFunc.nsi: no need for SendMessage
+ (Instructor)
- * Scripts/release.py: comments update
+2005-12-24 15:47 kichik
-2006-01-06 kichik
+ * /NSIS/trunk/Docs/src/headers.but,
+ /NSIS/trunk/Include/FileFunc.nsh: GetTime updates by Instructor
+ - Added support for system time (UTC)
+ - Added example how to convert time to 12-hour format AM/PM
- * Include/LogicLib.nsh: no more need for _StrCmp
+2005-12-23 15:04 kichik
-2006-01-06 kichik
+ * /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: removed extra
+ spaces
- * Include/LogicLib.nsh: use StrCmpS instead of System plug-in
+2005-12-23 10:56 kichik
-2006-01-06 kichik
+ * /NSIS/trunk/Docs/src/jumps.but: added information about relative
+ jumps and macros
- * Docs/src/flowcontrol.but, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: applied patch #1381929 - StrCmpS - case-sensitive
- string comparison
+2005-12-22 16:24 kichik
-2006-01-05 kichik
+ * /NSIS/trunk/Menu/intro.html: fixed bug #1387748 - typo in nsis
+ menu
- * Docs/src/headers.but: better wording
+2005-12-17 16:51 kichik
-2006-01-04 ballison
+ * /NSIS/trunk/Scripts/release.py: purge pages that use the
+ templates to make sure they're updated
- * Source/strlist.cpp, Source/strlist.h: converted to using
- <tchar.h>, strlen -> _tcslen, char becomes TCHAR. also used
- sizeof() better, for unicode compilation ability
+2005-12-17 15:05
-2005-12-31 kichik
+ * /NSIS/tags/v212, /NSIS/tags/v212/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v212/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v212/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v212/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v212/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v212/Source/exehead/uninst.ico,
+ /NSIS/tags/v212/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v212'.
- * Source/script.cpp: fixed bug #1299100 - File /nonfatal line not
- seen by relative jumps
+2005-12-17 15:05 kichik
-2005-12-31 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.12
- * Source/script.cpp: fixed bug #1362443 - BrandingText /TRIM*
- expands label a warning is displayed if the label is actually
- expanded
+2005-12-17 15:02 kichik
-2005-12-30 kichik
+ * /NSIS/trunk/Scripts/release.py: don't quote the version, it
+ drives the command line processor crazy
- * Source/exehead/Ui.c: fixed bug #1324734 - $LANGUAGE based on
- locale rather than UI language
+2005-12-17 14:43 kichik
-2005-12-30 kichik
+ * /NSIS/trunk/Docs/src/history.but: added a missing 2.10 fix
+ (negative values in directory page sizes)
- * Source/exehead/util.c: use normal file functions for wininit.ini
- modification - according to msdn, mmap operations can raise an
- exception which wasn't handled - free up a lot of bytes from .data
- section (no mmap API functions) - mmap size is, like allocation of
- a buffer, limited by available memory
+2005-12-17 14:38 kichik
-2005-12-27 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.12
- * Docs/src/file.but: FileRead is limited to 1024 only on the normal
- builds
+2005-12-17 14:07 kichik
-2005-12-27 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: corrected LogicLib.nsi link
- * Source/script.cpp: use NSIS_MAX_STRLEN-1 instead of 1023 for
- FileRead limit
+2005-12-17 13:54 kichik
-2005-12-24 kichik
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/SConstruct,
+ /NSIS/trunk/Scripts/release.py: added "-setup" suffix to
+ installer output file name
- * Source/exehead/Main.c, Source/exehead/util.c: size optimization
- (zlib is back to 34/35)
+2005-12-15 18:53 kichik
-2005-12-24 kichik
+ * /NSIS/trunk/SCons/Config/gnu: fixed bug #1370179 - endianness
+ problem with FIX_ENDIAN_INT32_INPLACE
- * Source/exehead/util.c: size optimizations
+2005-12-15 18:47 kichik
-2005-12-24 kichik
+ * /NSIS/trunk/Source/mmap.cpp: fixed bug #1380447 - Abnormal
+ program termination while writing the uninstaller
- * Examples/FileFunc.nsi: no need for SendMessage (Instructor)
+2005-12-15 17:11 kichik
-2005-12-24 kichik
+ * /NSIS/trunk/Contrib/Language files/Breton.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Breton.nsh: typos
- * Docs/src/headers.but, Include/FileFunc.nsh: GetTime updates by
- Instructor - Added support for system time (UTC) - Added example
- how to convert time to 12-hour format AM/PM
+2005-12-10 22:14 joostverburg
-2005-12-23 kichik
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf: translated Browse
+ button (by Ole Stanstrup)
- * Examples/Modern UI/WelcomeFinish.nsi: removed extra spaces
+2005-12-10 12:01 kichik
-2005-12-23 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: wrong
+ finish button translation in finish page text
- * Docs/src/jumps.but: added information about relative jumps and
- macros
+2005-12-09 13:15 kichik
-2005-12-22 kichik
+ * /NSIS/trunk/Source/build.cpp: applied patch #1374675 - made error
+ message for already defined label clearer
- * Menu/intro.html: fixed bug #1387748 - typo in nsis menu
+2005-12-06 21:02 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Docs/src/ui.but: typo
- * Scripts/release.py: purge pages that use the templates to make
- sure they're updated
+2005-12-03 09:45 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Docs/src/compiler.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/Tests/preprocessor.nsi,
+ /NSIS/trunk/Source/tokens.cpp: applied patch #1372048 - added
+ /NONFATAL switch to !include statement
- * Menu/images/header.gif: 2.12
+2005-12-02 15:59 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: added a section about logical
+ code structures, with LogicLib examples
- * Scripts/release.py: don't quote the version, it drives the
- command line processor crazy
+2005-12-02 13:37 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: fixed bug #1366431 - Better
+ explanation of the general concept
- * Docs/src/history.but: added a missing 2.10 fix (negative values
- in directory page sizes)
+2005-12-02 12:05 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Docs/src/sec.but: better wording
- * Docs/src/history.but: 2.12
+2005-12-02 12:04 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: typo
- * Docs/src/tutorial.but: corrected LogicLib.nsi link
+2005-11-26 13:06 kichik
-2005-12-17 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1331292 - browsed
+ network root directory isn't accepted
- * SConstruct, Examples/makensis.nsi, Scripts/release.py: added
- "-setup" suffix to installer output file name
+2005-11-26 12:44 kichik
-2005-12-15 kichik
+ * /NSIS/trunk/Source/Tests/root.txt: root instdir related bugs that
+ cannot be automatically tested
- * SCons/Config/gnu: fixed bug #1370179 - endianness problem with
- FIX_ENDIAN_INT32_INPLACE
+2005-11-26 12:14 kichik
-2005-12-15 kichik
+ * /NSIS/trunk/Source/Tests/SConscript: test scripts
- * Source/mmap.cpp: fixed bug #1380447 - Abnormal program
- termination while writing the uninstaller
+2005-11-26 12:14 kichik
-2005-12-15 kichik
+ * /NSIS/trunk/SConstruct: added TestScript for scripts which are
+ only used for testing, and not as examples
- * Contrib/Language files/Breton.nlf, Contrib/Modern UI/Language
- files/Breton.nsh: typos
+2005-11-25 17:57 kichik
-2005-12-11 joostverburg
+ * /NSIS/trunk/Scripts/release.py: qrs link
- * Contrib/Language files/Danish.nlf: translated Browse button (by
- Ole Stanstrup)
+2005-11-25 11:54 kichik
-2005-12-10 kichik
+ * /NSIS/trunk/Source/script.cpp: don't ignore multiple line
+ comments inside ifdef'ed blocks
- * Contrib/Modern UI/Language files/Swedish.nsh: wrong finish button
- translation in finish page text
+2005-11-25 11:50 kichik
-2005-12-09 kichik
+ * /NSIS/trunk/Source/Tests/preprocessor.nsi: more
- * Source/build.cpp: applied patch #1374675 - made error message for
- already defined label clearer
+2005-11-25 11:33 kichik
-2005-12-06 kichik
+ * /NSIS/trunk/Source/Tests/preprocessor.nsi: some basic
+ preprocessor tests
- * Docs/src/ui.but: typo
+2005-11-24 21:40 kichik
-2005-12-03 kichik
+ * /NSIS/trunk/Contrib/UIs/sdbarker_tiny.rc: added missing checkbox
+ for logging
- * Docs/src/compiler.but, Source/script.cpp, Source/tokens.cpp,
- Source/Tests/preprocessor.nsi: applied patch #1372048 - added
- /NONFATAL switch to !include statement
+2005-11-24 21:17 kichik
-2005-12-02 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: added 0x prefix to dword reg
+ values
- * Docs/src/tutorial.but: added a section about logical code
- structures, with LogicLib examples
+2005-11-24 19:51 kichik
-2005-12-02 kichik
+ * /NSIS/trunk/Contrib/Math/Source/Math.c: stop search for function
+ body at the end of the string
- * Docs/src/tutorial.but: fixed bug #1366431 - Better explanation of
- the general concept
+2005-11-24 19:38 kichik
-2005-12-02 kichik
+ * /NSIS/trunk/Contrib/Math/Source/Math.c,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.c,
+ /NSIS/trunk/Contrib/Math/Source/plugin.c: removed extra spaces at
+ end of line
- * Docs/src/sec.but: better wording
+2005-11-24 19:27 kichik
-2005-12-02 kichik
+ * /NSIS/trunk/Contrib/Math/mathtest.nsi: there's no such function
+ as len(), only l()
- * Contrib/Modern UI/Readme.html: typo
+2005-11-24 19:25 kichik
-2005-11-26 kichik
+ * /NSIS/trunk/Contrib/Math/Source/Math.c: fixed bug #1235875
+ - only increment initial array length when actually adding items
+ - if array index equals array count, the count should also be
+ raised
- * Source/exehead/Ui.c: fixed bug #1331292 - browsed network root
- directory isn't accepted
+2005-11-24 18:16 kichik
-2005-11-26 kichik
+ * /NSIS/trunk/Scripts/release.py: automatically update wiki pages
- * Source/Tests/root.txt: file root.txt was added on branch UNICODE
- on 2007-02-15 22:50:35 +0000
+2005-11-24 16:58 kichik
-2005-11-26 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: typo
- * Source/Tests/root.txt: root instdir related bugs that cannot be
- automatically tested
+2005-11-24 16:50 kichik
-2005-11-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: ifdef to get rid of binbuf
+ unused variable warning
- * Source/Tests/SConscript: test scripts
+2005-11-24 16:45 kichik
-2005-11-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: applied patch #1340255 - nicer
+ registry commands log
- * SConstruct: added TestScript for scripts which are only used for
- testing, and not as examples
+2005-11-24 12:18 kichik
-2005-11-25 kichik
+ * /NSIS/trunk/Docs/src/misc.but: add information about using
+ SetShellVarContext in both installer and uninstaller (bug
+ #1349810)
- * Scripts/release.py: qrs link
+2005-11-14 20:25 kichik
-2005-11-25 kichik
+ * /NSIS/trunk/Source/tokens.cpp: completed text should only accept
+ one parameter (bug #1349810)
- * Source/script.cpp: don't ignore multiple line comments inside
- ifdef'ed blocks
+2005-11-14 20:06 kichik
-2005-11-25 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsExec.txt: applied patch #1355653 -
+ /OEM switch
- * Source/Tests/preprocessor.nsi: more
+2005-11-12 17:29 kichik
-2005-11-25 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp: call DragFinish to free
+ memory
- * Source/Tests/preprocessor.nsi: some basic preprocessor tests
+2005-11-12 17:24 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Contrib/Makensisw/jnetlib/connection.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/update.cpp: tabs to spaces
- * Contrib/UIs/sdbarker_tiny.rc: added missing checkbox for logging
+2005-11-12 17:23 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h: don't fail silently if
+ more than one script is dropped
- * Source/exehead/exec.c: added 0x prefix to dword reg values
+2005-11-12 17:20 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Contrib/zip2exe/res.rc: version bump
- * Contrib/Math/Source/Math.c: stop search for function body at the
- end of the string
+2005-11-12 17:19 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: drag & drop support
- * Contrib/Math/Source/Math.c, Contrib/Math/Source/MyMath.c,
- Contrib/Math/Source/plugin.c: removed extra spaces at end of line
+2005-11-12 15:22
-2005-11-24 kichik
+ * /NSIS/tags/v211, /NSIS/tags/v211/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v211/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v211/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v211/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v211/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v211/Source/exehead/uninst.ico,
+ /NSIS/tags/v211/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v211'.
- * Contrib/Math/mathtest.nsi: there's no such function as len(),
- only l()
+2005-11-12 15:22 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Scripts/release.py: workaround for release.log
+ permission denied IOError
- * Contrib/Math/Source/Math.c: fixed bug #1235875 - only increment
- initial array length when actually adding items - if array index
- equals array count, the count should also be raised
+2005-11-12 15:04 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Scripts/release.py: add an empty line in another
+ place (for some weird reason, the old log line failed after cvs
+ tagging)
- * Scripts/release.py: automatically update wiki pages
+2005-11-12 14:50 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: include only needed gifs for
+ nsis menu
- * Docs/src/attributes.but: typo
+2005-11-12 14:50 kichik
-2005-11-24 kichik
+ * /NSIS/trunk/Scripts/release.py: generate the new header.gif image
- * Source/exehead/exec.c: ifdef to get rid of binbuf unused variable
- warning
+2005-11-12 14:25 joostverburg
-2005-11-24 kichik
+ * /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/images/header-notext.gif: for auto generation
- * Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: applied patch #1340255 - nicer registry
- commands log
+2005-11-12 14:15 joostverburg
-2005-11-24 kichik
+ * /NSIS/trunk/Menu/docs.html, /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: updated for new NSIS site
- * Docs/src/misc.but: add information about using SetShellVarContext
- in both installer and uninstaller (bug #1349810)
+2005-11-12 13:46 kichik
-2005-11-14 kichik
+ * /NSIS/trunk/Scripts/release.py: better palette for header.gif
- * Source/tokens.cpp: completed text should only accept one
- parameter (bug #1349810)
+2005-11-12 12:54 kichik
-2005-11-14 kichik
+ * /NSIS/trunk/Docs/src/history.but: removed double parenthesis
- * Contrib/nsExec/nsExec.txt: applied patch #1355653 - /OEM switch
+2005-11-12 12:42 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/history.but: better wording
- * Contrib/Makensisw/makensisw.cpp, Contrib/zip2exe/main.cpp: call
- DragFinish to free memory
+2005-11-12 12:34 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Scripts/release.py: updated to-update links list
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/update.cpp,
- Contrib/Makensisw/jnetlib/connection.cpp: tabs to spaces
+2005-11-12 12:31 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Scripts/release.py: no more need for get.gif
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h:
- don't fail silently if more than one script is dropped
+2005-11-12 12:30 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Scripts/release.py: add version to release log file
+ name
- * Contrib/zip2exe/res.rc: version bump
+2005-11-12 10:46 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/SCons/Config/gnu: use a cross-compile environment to
+ test for memcpy and memset
- * Contrib/zip2exe/main.cpp: drag & drop support
+2005-11-11 21:47 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/history.but: changelog for 2.11
- * Scripts/release.py: workaround for release.log permission denied
- IOError
+2005-11-11 21:39 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Source/tokens.cpp: missing SW_HIDE for ExecShell
- * Scripts/release.py: add an empty line in another place (for some
- weird reason, the old log line failed after cvs tagging)
+2005-11-11 21:37 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/int.but: wrong result for bitwise not (part
+ of bug #1349810)
- * Examples/makensis.nsi: include only needed gifs for nsis menu
+2005-11-11 21:31 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Source/util.cpp: UCS-2LE is not the default on all
+ platforms, so this needs to be explicit
- * Scripts/release.py: generate the new header.gif image
+2005-11-11 21:29 kichik
-2005-11-12 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: check for CB_ERR return
+ value from CB_GETITEMDATA
- * Menu/images/header-notext.gif, Menu/images/header.gif: for auto
- generation
+2005-11-11 21:27 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: when $LANGUAGE doesn't
+ match any passed language, select the first language, not some
+ random garbage from the stack
- * Menu/images/header-notext.gif: file header-notext.gif was added
- on branch UNICODE on 2007-02-15 22:47:44 +0000
+2005-11-09 08:41 kichik
-2005-11-12 joostverburg
+ * /NSIS/trunk/INSTALL: support links
- * Menu/docs.html, Menu/index.html, Menu/update.html,
- Menu/websites.html, Menu/images/header.gif: updated for new NSIS
- site
+2005-11-08 21:49 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: fixed bug #1349853 -
+ zip2exe ignores zip timestamps
- * Scripts/release.py: better palette for header.gif
+2005-11-08 20:20 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: support url (rfe #1349867)
- * Docs/src/history.but: removed double parenthesis
+2005-11-08 19:52 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/library.but: missing comma
- * Docs/src/history.but: better wording
+2005-11-08 19:51 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/defines.but: clarity
- * Scripts/release.py: updated to-update links list
+2005-11-08 19:50 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: typo
- * Scripts/release.py: no more need for get.gif
+2005-11-08 19:46 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/Docs/src/sections.but: SectionGroup syntax correction
- * Scripts/release.py: add version to release log file name
+2005-11-08 19:30 kichik
-2005-11-12 kichik
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/Source/mmap.cpp,
+ /NSIS/trunk/Source/SConscript: freebsd portability
- * SCons/Config/gnu: use a cross-compile environment to test for
- memcpy and memset
+2005-11-06 17:04 joostverburg
-2005-11-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh:
+ improvements by Martin Srebotnjak
- * Docs/src/history.but: changelog for 2.11
+2005-11-06 14:21 joostverburg
-2005-11-11 kichik
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf: improvements by
+ Martin Srebotnjak
- * Source/tokens.cpp: missing SW_HIDE for ExecShell
+2005-11-05 23:58 joostverburg
-2005-11-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: solid compression no
+ longer the default
- * Docs/src/int.but: wrong result for bitwise not (part of bug
- #1349810)
+2005-11-05 16:57 joostverburg
-2005-11-11 kichik
+ * /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Include/Library.nsh: * no need to call ClearErrors
+ after IfErrors
+ * documented error flag for Library macros
- * Source/util.cpp: UCS-2LE is not the default on all platforms, so
- this needs to be explicit
+2005-11-05 16:08 joostverburg
-2005-11-11 kichik
+ * /NSIS/trunk/Include/Library.nsh: clear errors after checking
+ whether file is in use
- * Contrib/LangDLL/LangDLL.c: check for CB_ERR return value from
- CB_GETITEMDATA
+2005-11-05 14:07 kichik
-2005-11-11 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1338423 - SetOverwrite
+ ifdiff fails with FAT
- * Contrib/LangDLL/LangDLL.c: when $LANGUAGE doesn't match any
- passed language, select the first language, not some random garbage
- from the stack
+2005-11-05 13:51 kichik
-2005-11-09 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: proper clean-up in case of
+ path detection failure
- * INSTALL: support links
+2005-11-05 13:50 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: proper clean-up in case of
+ bad input
- * Contrib/zip2exe/main.cpp: fixed bug #1349853 - zip2exe ignores
- zip timestamps
+2005-11-05 13:41 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: fixed bad input test
- * Examples/makensis.nsi: support url (rfe #1349867)
+2005-11-05 13:39 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: search for /TIMEOUT= only at
+ the beginning of the input string
- * Docs/src/library.but: missing comma
+2005-11-05 13:22 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: applied patch #1346737 - OEM
+ nsExec
- * Docs/src/defines.but: clarity
+2005-11-05 12:19 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Source/tokens.cpp: applied patch #1348473 - ChangeUI
+ discrepancy
- * Docs/src/compilerflags.but: typo
+2005-11-04 11:20 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Include/FileFunc.nsh: VersionCompare is not part of
+ FileFunc.nsh it's part of WordFunc.nsh
- * Docs/src/sections.but: SectionGroup syntax correction
+2005-10-27 20:41 kichik
-2005-11-08 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1314004 - Copy
+ details to clipboard can crash
- * SCons/Config/gnu, Source/SConscript, Source/mmap.cpp: freebsd
- portability
+2005-10-27 19:31 kichik
-2005-11-06 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi:
+ LicenseLangString example
- * Contrib/Modern UI/Language files/Slovenian.nsh: improvements by
- Martin Srebotnjak
+2005-10-26 19:01 joostverburg
-2005-11-06 joostverburg
+ * /NSIS/trunk/Docs/src/script.but,
+ /NSIS/trunk/Examples/bigtest.nsi: language improvements
- * Contrib/Language files/Slovenian.nlf: improvements by Martin
- Srebotnjak
+2005-10-25 14:32 kichik
-2005-11-06 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: use TreeView_* instead of TVM_*,
+ it looks nicer
- * Contrib/Modern UI/Readme.html: solid compression no longer the
- default
+2005-10-25 13:09 kichik
-2005-11-05 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Checks/red.bmp: width should be 96,
+ not 95
- * Docs/src/library.but, Include/Library.nsh: * no need to call
- ClearErrors after IfErrors * documented error flag for Library
- macros
+2005-10-22 16:52 kichik
-2005-11-05 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but: added InstallDirRegKey
+ examples
- * Include/Library.nsh: clear errors after checking whether file is
- in use
+2005-10-22 15:53 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Source/Plugins.cpp: - extracted reading an entire
+ file to function read_file
+ - using vector<uchar> for file contents
- * Source/script.cpp: fixed bug #1338423 - SetOverwrite ifdiff fails
- with FAT
+2005-10-22 14:46 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/script.cpp:
+ cosmetics
- * Contrib/nsExec/nsexec.c: proper clean-up in case of path
- detection failure
+2005-10-22 13:40 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/script.cpp:
+ dir_readers' memory now freed by boost::scoped_ptr
- * Contrib/nsExec/nsexec.c: proper clean-up in case of bad input
+2005-10-22 13:25 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: it's
+ SHGetSpecialFolderLocation not SHGetSpecialFolderPath
- * Contrib/nsExec/nsexec.c: fixed bad input test
+2005-10-22 12:06 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: toolbar24h.bmp is
+ english as well
- * Contrib/nsExec/nsexec.c: search for /TIMEOUT= only at the
- beginning of the input string
+2005-10-22 12:05 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Contrib/MakeLangId/MakeLangId.xml,
+ /NSIS/trunk/Contrib/MakeLangId/resource.rc,
+ /NSIS/trunk/Contrib/MakeLangId/SConscript: added manifest for xp
+ style
- * Contrib/nsExec/nsexec.c: applied patch #1346737 - OEM nsExec
+2005-10-22 11:55 kichik
-2005-11-05 kichik
+ * /NSIS/trunk/Contrib/LangDLL/resource.rc: sort the combo box
- * Source/tokens.cpp: applied patch #1348473 - ChangeUI discrepancy
+2005-10-22 11:54 kichik
-2005-11-04 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: don't relay on the order
+ in the combo box
- * Include/FileFunc.nsh: VersionCompare is not part of FileFunc.nsh
- it's part of WordFunc.nsh
+2005-10-22 11:38 kichik
-2005-10-27 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: use same style for all
+ blocks
- * Source/exehead/Ui.c: fixed bug #1314004 - Copy details to
- clipboard can crash
+2005-10-22 11:37 kichik
-2005-10-27 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: free the allocated memory
- * Examples/Modern UI/MultiLanguage.nsi: LicenseLangString example
+2005-10-22 11:31 kichik
-2005-10-26 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: clean-up on ok and cancel
+ as well, not only close
- * Docs/src/script.but, Examples/bigtest.nsi: language improvements
+2005-10-22 11:26 kichik
-2005-10-25 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c: added comments
- * Source/exehead/Ui.c: use TreeView_* instead of TVM_*, it looks
- nicer
+2005-10-21 21:54 kichik
-2005-10-25 kichik
+ * /NSIS/trunk/Docs/src/headers.but: no GetLongPathName on 95
- * Contrib/Graphics/Checks/red.bmp: width should be 96, not 95
+2005-10-21 20:54
-2005-10-22 kichik
+ * /NSIS/branches/UNICODE,
+ /NSIS/branches/UNICODE/Contrib/ExDLL/exdll.dsw,
+ /NSIS/branches/UNICODE/Contrib/InstallOptions/resource.h,
+ /NSIS/branches/UNICODE/Contrib/Makensisw/makensisw.xml,
+ /NSIS/branches/UNICODE/Contrib/NSISdl/asyncdns.h,
+ /NSIS/branches/UNICODE/Contrib/NSISdl/httpget.h,
+ /NSIS/branches/UNICODE/Source/exehead/uninst.ico,
+ /NSIS/branches/UNICODE/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create branch 'UNICODE'.
- * Docs/src/attributes.but: added InstallDirRegKey examples
+2005-10-21 20:54 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: fixed bug #1008632 - some
+ special folders don't always work in Windows 9x
- * Source/Plugins.cpp: - extracted reading an entire file to
- function read_file - using vector<uchar> for file contents
+2005-10-21 16:07 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Docs/src/sec.but: missing backslash
- * Source/Plugins.cpp, Source/script.cpp: cosmetics
+2005-10-21 15:47 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Include/Sections.nsh: added flag descriptions
- * Source/Plugins.cpp, Source/script.cpp: dir_readers' memory now
- freed by boost::scoped_ptr
+2005-10-21 15:45 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Docs/src/sec.but: added a note about sections.nsh
- * Source/exehead/Main.c: it's SHGetSpecialFolderLocation not
- SHGetSpecialFolderPath
+2005-10-21 14:24 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: handle /NOIEPROXY, even if
+ /PROXY is used
- * Contrib/Makensisw/resource.rc: toolbar24h.bmp is english as well
+2005-10-21 14:16 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: added information about
+ /PROXY
- * Contrib/MakeLangId/MakeLangId.xml, Contrib/MakeLangId/SConscript,
- Contrib/MakeLangId/resource.rc: added manifest for xp style
+2005-10-21 14:06 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/zip2exe/res.rc: tabs to spaces
- * Contrib/LangDLL/resource.rc: sort the combo box
+2005-10-21 14:05 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: applied patch #1334166 -
+ nsisdl: /PROXY switch
- * Contrib/LangDLL/LangDLL.c: don't relay on the order in the combo
- box
+2005-10-21 13:55 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: updated history
- * Contrib/LangDLL/LangDLL.c: use same style for all blocks
+2005-10-21 13:53 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/zip2exe/Base.nsh,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/res.rc,
+ /NSIS/trunk/Contrib/zip2exe/resource.h: applied patch #1334155 -
+ zip2exe: checkbox for solid compression
- * Contrib/LangDLL/LangDLL.c: free the allocated memory
+2005-10-20 19:36 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: provide stdin to
+ keep xcopy happy
- * Contrib/LangDLL/LangDLL.c: clean-up on ok and cancel as well, not
- only close
+2005-10-18 13:12 kichik
-2005-10-22 kichik
+ * /NSIS/trunk/Source/lang.cpp: use NLF_STRINGS_NO_SPECIAL instead
+ of NLF_STRINGS - 3, as the number three can easily change
- * Contrib/LangDLL/LangDLL.c: added comments
+2005-10-18 13:12 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/Source/lang.h: added NLF_STRINGS_NO_SPECIAL, number
+ of real NLF strings, not including special strings not defined in
+ the NLF
- * Docs/src/headers.but: no GetLongPathName on 95
+2005-10-18 12:04 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/Docs/src/script.but: added inline comment example
- * Source/exehead/Main.c: fixed bug #1008632 - some special folders
- don't always work in Windows 9x
+2005-10-17 13:39 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1328629 - Explicitly
+ setting $LANGUAGE does not operate as expected
- * Docs/src/sec.but: missing backslash
+2005-10-16 12:52 icemank
-2005-10-21 kichik
+ * /NSIS/trunk/Source/lineparse.cpp: Fixed #ifdef blocks.
- * Include/Sections.nsh: added flag descriptions
+2005-10-16 12:50 icemank
-2005-10-21 kichik
+ * /NSIS/trunk/SCons/config.py: Fixed indentations.
- * Docs/src/sec.but: added a note about sections.nsh
+2005-10-16 05:37 icemank
-2005-10-21 kichik
+ * /NSIS/trunk/SCons/config.py, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/lineparse.cpp: Fixed comment handling.
- * Contrib/NSISdl/nsisdl.cpp: handle /NOIEPROXY, even if /PROXY is
- used
+2005-10-13 14:49 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/SCons/Config/ms: original LIB is used, no need to
+ remove #/.sconf_temp
- * Contrib/NSISdl/ReadMe.txt: added information about /PROXY
+2005-10-13 13:33 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/SCons/Config/ms: don't add /GX to defenv
- * Contrib/zip2exe/res.rc: tabs to spaces
+2005-10-13 13:16 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/SCons/Config/ms: added workaround for Platform SDK's
+ libcp.lib
- * Contrib/NSISdl/nsisdl.cpp: applied patch #1334166 - nsisdl:
- /PROXY switch
+2005-10-12 14:40 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/Source/script.cpp: use my_convert in !delfile
- * Contrib/zip2exe/main.cpp: updated history
+2005-10-12 14:26 kichik
-2005-10-21 kichik
+ * /NSIS/trunk/Include/LogicLib.nsh: fixed bug #1320297 -
+ LogicLib.nsh portability issues
- * Contrib/zip2exe/Base.nsh, Contrib/zip2exe/main.cpp,
- Contrib/zip2exe/res.rc, Contrib/zip2exe/resource.h: applied patch
- #1334155 - zip2exe: checkbox for solid compression
+2005-10-12 14:24 kichik
-2005-10-20 kichik
+ * /NSIS/trunk/Docs/src/compiler.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: added
+ !appendfile
- * Contrib/Makensisw/makensisw.cpp: provide stdin to keep xcopy
- happy
+2005-10-12 13:50 kichik
-2005-10-18 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: no language strings and
+ variables with InstallDirRegKey
- * Source/lang.cpp: use NLF_STRINGS_NO_SPECIAL instead of
- NLF_STRINGS - 3, as the number three can easily change
+2005-10-12 13:32 kichik
-2005-10-18 kichik
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C: possible .data optimization
- * Source/lang.h: added NLF_STRINGS_NO_SPECIAL, number of real NLF
- strings, not including special strings not defined in the NLF
+2005-10-12 11:10 kichik
-2005-10-18 kichik
+ * /NSIS/trunk/Include/Library.nsh,
+ /NSIS/trunk/Include/UpgradeDLL.nsh: extract RegTool with the
+ random data as well
- * Docs/src/script.but: added inline comment example
+2005-10-11 20:04 kichik
-2005-10-17 kichik
+ * /NSIS/trunk/Source/exehead/util.c: typo
- * Source/exehead/Ui.c: fixed bug #1328629 - Explicitly setting
- $LANGUAGE does not operate as expected
+2005-10-11 16:47 kichik
-2005-10-16 icemank
+ * /NSIS/trunk/Include/Library.nsh,
+ /NSIS/trunk/Include/UpgradeDLL.nsh: * strip quotes and /S from
+ RegTool's RunOnce key before checking if it exists
+ * added random data to the extraction name of RegTool to avoid
+ problems with install->reboot->install->reboot
- * Source/lineparse.cpp: Fixed #ifdef blocks.
+2005-10-11 16:31 kichik
-2005-10-16 icemank
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: updated change
+ log
- * SCons/config.py: Fixed indentations.
+2005-10-11 16:27 kichik
-2005-10-16 icemank
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/testnotify.nsi: write HWND and
+ HWND2 entries to the INI with the control's HWND
+ no more weird calculations when there's a browse button
- * Source/build.cpp, SCons/config.py, Source/lineparse.cpp: Fixed
- comment handling.
+2005-10-10 11:45 kichik
-2005-10-13 kichik
+ * /NSIS/trunk/SCons/Tools/mstoolkit.py: Platfrom SDK's headers and
+ libraries are newer than VC Toolkit's
- * SCons/Config/ms: original LIB is used, no need to remove
- #/.sconf_temp
+2005-10-08 21:13 kichik
-2005-10-13 kichik
+ * /NSIS/trunk/SConstruct: output an error message for SCons 0.96.90
+ or older, instead of a TypeError exception
- * SCons/Config/ms: don't add /GX to defenv
+2005-10-08 10:27 joostverburg
-2005-10-13 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.rc: larger browse button,
+ localized texts will fit in better
- * SCons/Config/ms: added workaround for Platform SDK's libcp.lib
+2005-10-07 15:45 kichik
-2005-10-12 kichik
+ * /NSIS/trunk/Source/script.cpp: no need for 'SectionIn RO' to be
+ case sensitive
- * Source/script.cpp: use my_convert in !delfile
+2005-10-07 13:41 kichik
-2005-10-12 kichik
+ * /NSIS/trunk/Source/script.cpp: proper umask
- * Include/LogicLib.nsh: fixed bug #1320297 - LogicLib.nsh
- portability issues
+2005-10-07 13:23 kichik
-2005-10-12 kichik
+ * /NSIS/trunk/Include/Library.nsh: write temporary nsh to temp dir
+ to avoid permission problems with unprivileged users
- * Docs/src/compiler.but, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: added !appendfile
+2005-10-07 13:21 kichik
-2005-10-12 kichik
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp: get
+ output file from command line
- * Docs/src/attributes.but: no language strings and variables with
- InstallDirRegKey
+2005-10-07 13:08 kichik
-2005-10-12 kichik
+ * /NSIS/trunk/Docs/src/compiler.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: added
+ !tempfile and !delfile
- * Source/zlib/INFBLOCK.C: possible .data optimization
+2005-10-05 13:47 kichik
-2005-10-12 kichik
+ * /NSIS/trunk/SCons/Config/gnu: workaround for scons bug - use
+ CPPDEFINES in RCCOM
- * Include/Library.nsh, Include/UpgradeDLL.nsh: extract RegTool with
- the random data as well
+2005-10-05 13:42 kichik
-2005-10-11 kichik
+ * /NSIS/trunk/SCons/Tools/crossmingw.py: use CPPDEFINES in RCCOM
- * Source/exehead/util.c: typo
+2005-10-04 14:14 kichik
-2005-10-11 kichik
+ * /NSIS/trunk/Scripts/release.py: wrong package name
- * Include/Library.nsh, Include/UpgradeDLL.nsh: * strip quotes and
- /S from RegTool's RunOnce key before checking if it exists * added
- random data to the extraction name of RegTool to avoid problems
- with install->reboot->install->reboot
+2005-10-04 14:06 kichik
-2005-10-11 kichik
+ * /NSIS/trunk/Scripts/release.py: upload files to /incoming
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: updated change log
+2005-10-04 13:46 kichik
-2005-10-11 kichik
+ * /NSIS/trunk/Scripts/release.py: * create_special_build takes 2
+ arguments, not 3
+ * use log_dir in log()
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/testnotify.nsi: write HWND and HWND2 entries
- to the INI with the control's HWND no more weird calculations when
- there's a browse button
+2005-10-04 13:25 kichik
-2005-10-10 kichik
+ * /NSIS/trunk/Scripts/release.py: no need for log_dir='..' for
+ scons call of special build
- * SCons/Tools/mstoolkit.py: Platfrom SDK's headers and libraries
- are newer than VC Toolkit's
+2005-10-04 13:12 kichik
-2005-10-08 kichik
+ * /NSIS/trunk/Scripts/release.py: missing comma
- * SConstruct: output an error message for SCons 0.96.90 or older,
- instead of a TypeError exception
+2005-10-04 12:58
-2005-10-08 joostverburg
+ * /NSIS/tags/v210, /NSIS/tags/v210/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v210/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v210/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v210/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v210/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v210/Source/exehead/uninst.ico,
+ /NSIS/tags/v210/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v210'.
- * Contrib/UIs/modern.rc: larger browse button, localized texts will
- fit in better
+2005-10-04 12:58 kichik
-2005-10-07 kichik
+ * /NSIS/trunk/Scripts/release.py: fixed installation diff test
- * Source/script.cpp: no need for 'SectionIn RO' to be case
- sensitive
+2005-10-04 12:46 kichik
-2005-10-07 kichik
+ * /NSIS/trunk/Scripts/release.py: missing comma
- * Source/script.cpp: proper umask
+2005-10-04 12:22 kichik
-2005-10-07 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.10
- * Include/Library.nsh: write temporary nsh to temp dir to avoid
- permission problems with unprivileged users
+2005-10-04 12:16 kichik
-2005-10-07 kichik
+ * /NSIS/trunk/Scripts/release.py: exit on failure
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp: get output file
- from command line
+2005-10-04 12:05 kichik
-2005-10-07 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.10
- * Docs/src/compiler.but, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: added !tempfile and !delfile
+2005-10-04 11:18 kichik
-2005-10-05 kichik
+ * /NSIS/trunk/Source/exehead/util.c: validate_filename was called
+ before skip_root in is_valid_instpath and so no root directory
+ was ever valid, even with AllowRootDirInstall
- * SCons/Config/gnu: workaround for scons bug - use CPPDEFINES in
- RCCOM
+2005-10-03 10:06 joostverburg
-2005-10-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh:
+ updates by QFox
- * SCons/Tools/crossmingw.py: use CPPDEFINES in RCCOM
+2005-09-24 15:50 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Source/Tests/mmap.cpp,
+ /NSIS/trunk/Source/Tests/SConscript: POSIX portability
- * Scripts/release.py: wrong package name
+2005-09-24 15:49 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/SConstruct, /NSIS/trunk/Source/SConscript: use
+ AddAvailableLibs
- * Scripts/release.py: upload files to /incoming
+2005-09-24 15:48 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/SCons/utils.py: useful function, for now only
+ AddAvailableLibs
- * Scripts/release.py: * create_special_build takes 2 arguments, not
- 3 * use log_dir in log()
+2005-09-24 11:41 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/SCons/Config/gnu: no optimizations and symbol
+ stripping in debug mode
- * Scripts/release.py: no need for log_dir='..' for scons call of
- special build
+2005-09-24 11:38 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Source/Plugins.cpp: don't use NormalizedCommand in
+ IsPluginCommand, it asserts on non-existing plug-in commands
- * Scripts/release.py: missing comma
+2005-09-24 11:20 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Source/Tests/mmap.cpp: size2 is changed on POSIX
- * Scripts/release.py: fixed installation diff test
+2005-09-23 15:06 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/INSTALL: added links to optional tools
- * Scripts/release.py: missing comma
+2005-09-23 10:17 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Source/tokens.cpp:
+ documented /ENABLECANCEL
- * Menu/images/header.gif: 2.10
+2005-09-23 10:08 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Source/script.cpp: missing \0 in enum
- * Scripts/release.py: exit on failure
+2005-09-22 20:20 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: fixed compile warning
- * Docs/src/history.but: 2.10
+2005-09-22 20:20 kichik
-2005-10-04 kichik
+ * /NSIS/trunk/Source/clzma.cpp: fixed memory leaks in POSIX
+ implementation
- * Source/exehead/util.c: validate_filename was called before
- skip_root in is_valid_instpath and so no root directory was ever
- valid, even with AllowRootDirInstall
+2005-09-20 17:42 kichik
-2005-10-03 joostverburg
+ * /NSIS/trunk/Contrib/VPatch/Source/Plugin/checksum.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/md5.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c: fixed
+ portability
- * Contrib/Modern UI/Language files/SimpChinese.nsh: updates by QFox
+2005-09-20 17:35 kichik
-2005-09-24 kichik
+ * /NSIS/trunk/Source/Platform.h: WS_EX_LEFTSCROLLBAR needed by
+ MinGW
- * Source/Tests/SConscript, Source/Tests/mmap.cpp: POSIX portability
+2005-09-20 17:32 kichik
-2005-09-24 kichik
+ * /NSIS/trunk/SCons/Config/gnu: only mingw supports
+ --file-alignment
- * SConstruct, Source/SConscript: use AddAvailableLibs
+2005-09-20 17:15 kichik
-2005-09-24 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: Chapter4.html no
+ longer exists
- * SCons/utils.py: useful function, for now only AddAvailableLibs
+2005-09-17 17:41 kichik
-2005-09-24 kichik
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: typos
- * SCons/Config/gnu: no optimizations and symbol stripping in debug
- mode
+2005-09-17 17:38 kichik
-2005-09-24 kichik
+ * /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/main.cpp: VPatch 3.1
- * Source/Plugins.cpp: don't use NormalizedCommand in
- IsPluginCommand, it asserts on non-existing plug-in commands
+2005-09-17 09:55 kichik
-2005-09-24 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Source/DialogTemplate.cpp: fixed bug #1283528 -
+ WS_EX_LEFTSCROLLBAR missing in RTL mode
- * Source/Tests/mmap.cpp: size2 is changed on POSIX
+2005-09-17 09:43 kichik
-2005-09-23 kichik
+ * /NSIS/trunk/Contrib/VPatch/Source/GenPat/SConscript: compile
+ GenPat natively
- * INSTALL: added links to optional tools
+2005-09-17 09:43 kichik
-2005-09-23 kichik
+ * /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms, /NSIS/trunk/SConstruct: added
+ support for compilation of cross platform utilities
- * Docs/src/pages.but, Source/tokens.cpp: documented /ENABLECANCEL
+2005-09-17 09:25 kichik
-2005-09-23 kichik
+ * /NSIS/trunk/Contrib/VPatch/example.nsi,
+ /NSIS/trunk/Contrib/VPatch/GenPat.exe,
+ /NSIS/trunk/Contrib/VPatch/patch.pat,
+ /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/SConscript,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/adler32.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/adler32.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/Checksums.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/Checksums.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/ChunkedFile.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/ChunkedFile.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/FileFormat1.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/FileFormat1.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/GenPat2.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/GlobalTypes.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/GlobalTypes.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/main.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/md5.c,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/md5.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/PatchGenerator.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/PatchGenerator.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/PatchGenerator.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/POSIXUtil.h,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/SConscript,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/TreeCode.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/VAppend.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/vdsp_crc.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/AboutForm.dfm,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/clean.bat,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/DLLWrapper.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/MainForm.dfm,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/MainForm.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/OSUtil.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/PatchClasses.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/vdsp_crc.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatch.ico,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.cfg,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.dof,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.res,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/apply_patch.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/apply_patch.h,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/checksum.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/checksum.h,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/md5.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/md5.h,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/SConscript,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c,
+ /NSIS/trunk/Contrib/VPatch/Source/VPatch2.bpg,
+ /NSIS/trunk/Contrib/VPatch/VPatchLib.nsh,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/SConstruct: VPatch
+ 3.0
+
+2005-09-17 08:50 kichik
+
+ * /NSIS/trunk/Contrib/Library/RegTool/SConscript,
+ /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Contrib/NSISdl/SConscript,
+ /NSIS/trunk/Contrib/System/SConscript, /NSIS/trunk/SConstruct:
+ use True/False instead of 1/0
+
+2005-09-17 08:33 kichik
+
+ * /NSIS/trunk/Source/exehead/SConscript,
+ /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/SConscript:
+ moved _WIN32_IE definition to SConscript to avoid #include order
+ problems
+
+2005-09-16 16:27 kichik
+
+ * /NSIS/trunk/Source/exehead/SConscript,
+ /NSIS/trunk/Source/exehead/Ui.c: use Int64ShrlMod32 on compiles
+ that generate a call to __aullshr from 64-bit shift
+
+2005-09-16 16:19 kichik
+
+ * /NSIS/trunk/Source/SConscript: libiconv is iconv
+
+2005-09-16 16:05 kichik
+
+ * /NSIS/trunk/Source/exehead/Ui.c: better and uniform rounding of
+ required/available size display
+
+2005-09-16 16:02 kichik
+
+ * /NSIS/trunk/SCons/Tools/crossmingw.py: updated for scons 0.96.91
+
+2005-09-16 11:27 kichik
+
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.txt,
+ /NSIS/trunk/Contrib/AdvSplash/Example.nsi,
+ /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/connection.h,
+ /NSIS/trunk/Contrib/Math/Math.txt, /NSIS/trunk/Contrib/Modern
+ UI/Changelog.txt, /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/NSIS Menu/src/msw/app.cpp,
+ /NSIS/trunk/Contrib/NSISdl/connection.h,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Contrib/Splash/Example.nsi,
+ /NSIS/trunk/Contrib/Splash/splash.txt,
+ /NSIS/trunk/Contrib/System/WhatsNew.txt,
+ /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c,
+ /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/headers.but, /NSIS/trunk/Docs/src/langs.but,
+ /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/silent.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.txt, /NSIS/trunk/Scripts/release.py,
+ /NSIS/trunk/Source/mmap.cpp: typos (thanks Jamyn!)
- * Source/script.cpp: missing \0 in enum
+2005-09-15 18:37 kichik
-2005-09-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: typo
- * Source/DialogTemplate.cpp: fixed compile warning
+2005-09-15 18:36 kichik
-2005-09-22 kichik
+ * /NSIS/trunk/INSTALL: appendix number is subject to change, use
+ name
- * Source/clzma.cpp: fixed memory leaks in POSIX implementation
+2005-09-13 19:24 kichik
-2005-09-20 kichik
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: fixed bug #1288159 -
+ Bad mnemonic key in makensisw menu
- * Contrib/VPatch/Source/Plugin/checksum.c,
- Contrib/VPatch/Source/Plugin/md5.c,
- Contrib/VPatch/Source/Plugin/vpatchdll.c: fixed portability
+2005-09-13 19:19 kichik
-2005-09-20 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: fixed
+ bug #1287731 - FileRequest alters working directory
- * Source/Platform.h: WS_EX_LEFTSCROLLBAR needed by MinGW
+2005-09-09 19:12 kichik
-2005-09-20 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: - avoid overflow when
+ calculating the digit after the decimal dot
+ - use BOOL isntead of int in SetSizeText
- * SCons/Config/gnu: only mingw supports --file-alignment
+2005-09-09 17:26 kichik
-2005-09-20 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: moved "shlwapi.dll" and
+ "SHAutoComplete" to .rdata from .data (constified them)
- * Contrib/InstallOptions/Readme.html: Chapter4.html no longer
- exists
+2005-09-09 16:45 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: break glass in case of emergency
+ (e.g. .rdata overflows)
- * Contrib/VPatch/Readme.html: typos
+2005-09-09 16:32 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/exehead/util.h: my_GlobalAlloc no longer
+ reduces the size
- * Contrib/VPatch/Readme.html,
- Contrib/VPatch/Source/GenPat/main.cpp: VPatch 3.1
+2005-09-09 16:08 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: my_GlobalAlloc no longer
+ reduces the size
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Source/DialogTemplate.cpp: fixed bug #1283528 - WS_EX_LEFTSCROLLBAR
- missing in RTL mode
+2005-09-09 15:21 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: size optimization
- * Contrib/VPatch/Source/GenPat/SConscript: compile GenPat natively
+2005-09-09 14:29 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/exehead/components.c,
+ /NSIS/trunk/Source/exehead/components.h: size optimization
- * SConstruct, SCons/Config/default, SCons/Config/gnu,
- SCons/Config/ms: added support for compilation of cross platform
- utilities
+2005-09-09 12:13 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: round required space up instead
+ of down (thanks Ippi)
- * SConstruct, Contrib/VPatch/GenPat.exe,
- Contrib/VPatch/Readme.html, Contrib/VPatch/SConscript,
- Contrib/VPatch/VPatchLib.nsh, Contrib/VPatch/example.nsi,
- Contrib/VPatch/patch.pat, Contrib/VPatch/Source/VPatch2.bpg,
- Contrib/VPatch/Source/GUI/AboutForm.dfm,
- Contrib/VPatch/Source/GUI/DLLWrapper.pas,
- Contrib/VPatch/Source/GUI/MainForm.dfm,
- Contrib/VPatch/Source/GUI/MainForm.pas,
- Contrib/VPatch/Source/GUI/OSUtil.pas,
- Contrib/VPatch/Source/GUI/PatchClasses.pas,
- Contrib/VPatch/Source/GUI/VPatch.ico,
- Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj,
- Contrib/VPatch/Source/GUI/VPatchGUI.cfg,
- Contrib/VPatch/Source/GUI/VPatchGUI.dof,
- Contrib/VPatch/Source/GUI/VPatchGUI.dpr,
- Contrib/VPatch/Source/GUI/VPatchGUI.res,
- Contrib/VPatch/Source/GUI/clean.bat,
- Contrib/VPatch/Source/GUI/vdsp_crc.pas,
- Contrib/VPatch/Source/GenPat/Checksums.cpp,
- Contrib/VPatch/Source/GenPat/Checksums.h,
- Contrib/VPatch/Source/GenPat/ChunkedFile.cpp,
- Contrib/VPatch/Source/GenPat/ChunkedFile.h,
- Contrib/VPatch/Source/GenPat/FileFormat1.cpp,
- Contrib/VPatch/Source/GenPat/FileFormat1.h,
- Contrib/VPatch/Source/GenPat/GenPat2.dpr,
- Contrib/VPatch/Source/GenPat/GlobalTypes.cpp,
- Contrib/VPatch/Source/GenPat/GlobalTypes.h,
- Contrib/VPatch/Source/GenPat/POSIXUtil.cpp,
- Contrib/VPatch/Source/GenPat/POSIXUtil.h,
- Contrib/VPatch/Source/GenPat/PatchGenerator.cpp,
- Contrib/VPatch/Source/GenPat/PatchGenerator.h,
- Contrib/VPatch/Source/GenPat/PatchGenerator.pas,
- Contrib/VPatch/Source/GenPat/SConscript,
- Contrib/VPatch/Source/GenPat/TreeCode.pas,
- Contrib/VPatch/Source/GenPat/VAppend.dpr,
- Contrib/VPatch/Source/GenPat/adler32.cpp,
- Contrib/VPatch/Source/GenPat/adler32.h,
- Contrib/VPatch/Source/GenPat/main.cpp,
- Contrib/VPatch/Source/GenPat/md5.c,
- Contrib/VPatch/Source/GenPat/md5.h,
- Contrib/VPatch/Source/GenPat/vdsp_crc.pas,
- Contrib/VPatch/Source/Plugin/SConscript,
- Contrib/VPatch/Source/Plugin/apply_patch.c,
- Contrib/VPatch/Source/Plugin/apply_patch.h,
- Contrib/VPatch/Source/Plugin/checksum.c,
- Contrib/VPatch/Source/Plugin/checksum.h,
- Contrib/VPatch/Source/Plugin/md5.c,
- Contrib/VPatch/Source/Plugin/md5.h,
- Contrib/VPatch/Source/Plugin/vpatchdll.c, Examples/makensis.nsi:
- VPatch 3.0
+2005-09-09 09:18 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Contrib/System/Source/Buffers.c,
+ /NSIS/trunk/Contrib/System/Source/System.c: fixed build warnings
- * SConstruct, Contrib/Library/RegTool/SConscript,
- Contrib/Math/SConscript, Contrib/NSISdl/SConscript,
- Contrib/System/SConscript: use True/False instead of 1/0
+2005-09-09 08:42 kichik
-2005-09-17 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed SHACF_FILESYSTEM
+ redefinition warning
- * Source/Platform.h, Source/SConscript, Source/exehead/SConscript:
- moved _WIN32_IE definition to SConscript to avoid #include order
- problems
+2005-09-09 08:20 kichik
-2005-09-16 kichik
+ * /NSIS/trunk/INSTALL: updated required version numbers
- * Source/exehead/SConscript, Source/exehead/Ui.c: use
- Int64ShrlMod32 on compiles that generate a call to __aullshr from
- 64-bit shift
+2005-09-08 19:19 kichik
-2005-09-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf: $($^Name) is a
+ typo, it should be $(^Name)
- * Source/SConscript: libiconv is iconv
+2005-09-08 19:17 kichik
-2005-09-16 kichik
+ * /NSIS/trunk/Scripts/release.py: use log_dir for log() and exit()
+ as well
- * Source/exehead/Ui.c: better and uniform rounding of
- required/available size display
+2005-09-08 19:15 kichik
-2005-09-16 kichik
+ * /NSIS/trunk/Scripts/release.py: write zip logs to correct folder
- * SCons/Tools/crossmingw.py: updated for scons 0.96.91
+2005-09-08 18:36 kichik
-2005-09-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Thai.nlf: fixed typos
+ (SoKoOLz)
- * Contrib/AdvSplash/Example.nsi, Contrib/AdvSplash/advsplash.txt,
- Contrib/InstallOptions/Changelog.txt,
- Contrib/Makensisw/jnetlib/connection.h, Contrib/Math/Math.txt,
- Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/connection.h,
- Contrib/Splash/Example.nsi, Contrib/Splash/splash.txt,
- Contrib/System/WhatsNew.txt, Contrib/VPatch/Readme.html,
- Contrib/VPatch/Source/Plugin/vpatchdll.c, Docs/src/attributes.but,
- Docs/src/compiler.but, Docs/src/flowcontrol.but,
- Docs/src/headers.but, Docs/src/langs.but, Docs/src/pages.but,
- Docs/src/sections.but, Docs/src/silent.but, Docs/src/tutorial.but,
- Docs/src/ui.but, Docs/src/var.but, Examples/StrFunc.nsi,
- Include/StrFunc.txt, Scripts/release.py, Source/mmap.cpp: typos
- (thanks Jamyn!)
+2005-09-08 17:52 kichik
-2005-09-15 kichik
+ * /NSIS/trunk/SCons/Config/gnu: fixed in scons 0.96.91
- * Contrib/Modern UI/Readme.html: typo
+2005-09-08 16:48 kichik
-2005-09-15 kichik
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/SConstruct: scons
+ 0.96.91 is required
- * INSTALL: appendix number is subject to change, use name
+2005-09-06 16:57 kichik
-2005-09-13 kichik
+ * /NSIS/trunk/Source/Platform.h: fixed mingw compile errors
+ (missing SHACF_FILESYSTEM)
- * Contrib/Makensisw/resource.rc: fixed bug #1288159 - Bad mnemonic
- key in makensisw menu
+2005-09-04 21:24 joostverburg
-2005-09-13 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Modern UI 1.74: Fixed
+ compile error when checkboxes are used on multiple finish page
+ pages
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed bug #1287731 -
- FileRequest alters working directory
+2005-09-03 13:30 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/Scripts/release.py: fixed small errors
- * Source/exehead/Ui.c: - avoid overflow when calculating the digit
- after the decimal dot - use BOOL isntead of int in SetSizeText
+2005-09-03 13:29 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/Scripts, /NSIS/trunk/Scripts/release.py: a script to
+ automatically release new versions
- * Source/exehead/Ui.c: moved "shlwapi.dll" and "SHAutoComplete" to
- .rdata from .data (constified them)
+2005-09-02 17:08 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/SCons/config.py: moved most of config.h into
+ SConstruct
- * Source/exehead/Ui.c: break glass in case of emergency (e.g.
- .rdata overflows)
+2005-09-02 16:15 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/SConstruct, /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/SConscript,
+ /NSIS/trunk/Source/SConscript: moved most of config.h into
+ SConstruct
- * Source/7zip/LZMADecode.h, Source/exehead/util.h: my_GlobalAlloc
- no longer reduces the size
+2005-09-02 11:35 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/Platform.h:
+ added auto completion to the directory page
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/util.c: my_GlobalAlloc no
- longer reduces the size
+2005-09-01 17:56 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nlf: typo
- * Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/util.c, Source/exehead/util.h: size optimization
+2005-09-01 17:56 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SerbianLatin.nsh:
+ added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Source/exehead/components.c, Source/exehead/components.h: size
- optimization
+2005-08-30 16:30 kichik
-2005-09-09 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/clzma.cpp,
+ /NSIS/trunk/Source/growbuf.cpp, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/util.cpp: fixed build errors and warnings
+ caused by latest merge
- * Source/exehead/Ui.c: round required space up instead of down
- (thanks Ippi)
+2005-08-27 19:56 oripel
-2005-09-09 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/clzma.cpp,
+ /NSIS/trunk/Source/growbuf.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: merged from PIEPIEPIE branch:
+ - min/max macros removed
+ - Plugins refactored
+ - more functions in util.{h,cpp}
- * Contrib/System/Source/Buffers.c, Contrib/System/Source/System.c:
- fixed build warnings
+2005-08-27 19:48 oripel
-2005-09-09 kichik
+ * /NSIS/branches/PIEPIEPIE/Source/build.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/clzma.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/growbuf.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/lang.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/Platform.h,
+ /NSIS/branches/PIEPIEPIE/Source/Plugins.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/Plugins.h,
+ /NSIS/branches/PIEPIEPIE/Source/ResourceEditor.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/ResourceEditor.h,
+ /NSIS/branches/PIEPIEPIE/Source/script.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/util.cpp,
+ /NSIS/branches/PIEPIEPIE/Source/util.h: - refactored class
+ Plugins
+ - fixed 'min' and 'max' macro evilness
+ - added some useful functions to util.{h,cpp}
- * Source/exehead/Ui.c: fixed SHACF_FILESYSTEM redefinition warning
+2005-08-26 16:45
-2005-09-09 kichik
+ * /NSIS/tags/v209: This commit was manufactured by cvs2svn to
+ create tag 'v209'.
- * INSTALL: updated required version numbers
+2005-08-26 16:45
-2005-09-08 kichik
+ * /NSIS/branches/PIEPIEPIE,
+ /NSIS/branches/PIEPIEPIE/Contrib/ExDLL/exdll.dsw,
+ /NSIS/branches/PIEPIEPIE/Contrib/InstallOptions/resource.h,
+ /NSIS/branches/PIEPIEPIE/Contrib/Makensisw/makensisw.xml,
+ /NSIS/branches/PIEPIEPIE/Contrib/NSISdl/asyncdns.h,
+ /NSIS/branches/PIEPIEPIE/Contrib/NSISdl/connection.h,
+ /NSIS/branches/PIEPIEPIE/Contrib/NSISdl/httpget.h,
+ /NSIS/branches/PIEPIEPIE/Source/exehead/uninst.ico,
+ /NSIS/branches/PIEPIEPIE/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create branch 'PIEPIEPIE'.
- * Contrib/Language files/Slovenian.nlf: $($^Name) is a typo, it
- should be $(^Name)
+2005-08-26 16:45 kichik
-2005-09-08 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.09 changelog
- * Scripts/release.py: use log_dir for log() and exit() as well
+2005-08-26 10:10 kichik
-2005-09-08 kichik
+ * /NSIS/trunk/SConstruct: Library.nsi example requires %WINDIR%
+ environment variable
- * Scripts/release.py: write zip logs to correct folder
+2005-08-26 09:45 kichik
-2005-09-08 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.09
- * Contrib/Language files/Thai.nlf: fixed typos (SoKoOLz)
+2005-08-23 17:45 kichik
-2005-09-08 kichik
+ * /NSIS/trunk/Examples/WordFuncTest.nsi,
+ /NSIS/trunk/Include/WordFunc.nsh: (Instructor) WordReplace
+ - Fixed: Incorrect rule for return errorlevel 1 in situation when
+ string beginning with word to replace and its only one word in
+ string and when uses option - deletes all found words
- * SCons/Config/gnu: fixed in scons 0.96.91
+2005-08-19 12:02 kichik
-2005-09-08 kichik
+ * /NSIS/trunk/SConstruct: added -signed suffix to signed
+ distribution files
- * SConstruct, Docs/src/build.but: scons 0.96.91 is required
+2005-08-17 12:36 joostverburg
-2005-09-06 kichik
+ * /NSIS/trunk/Contrib/Graphics/Wizard/arrow.bmp: removed rounded
+ edges
- * Source/Platform.h: fixed mingw compile errors (missing
- SHACF_FILESYSTEM)
+2005-08-14 11:17 kichik
-2005-09-05 joostverburg
+ * /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/example1.nsi,
+ /NSIS/trunk/Examples/example2.nsi: applied part of patch #1248335
+ for greater portability
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: Modern UI 1.74: Fixed compile error
- when checkboxes are used on multiple finish page pages
+2005-08-14 10:44 kichik
-2005-09-03 kichik
+ * /NSIS/trunk/SConstruct: added CODESIGNER option to enable
+ executable digital signing
- * Scripts/release.py: fixed small errors
+2005-08-11 20:29 kichik
-2005-09-03 kichik
+ * /NSIS/trunk/SConstruct: no support for Python 1.5.2
- * Scripts/release.py: a script to automatically release new
- versions
+2005-08-11 15:58 kichik
-2005-09-02 kichik
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: Malaysian -> Malay
- * SCons/config.py: moved most of config.h into SConstruct
+2005-08-11 15:56 kichik
-2005-09-02 kichik
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: added extern "C" to
+ DllMain so gcc will find it (patch #1255671)
- * SConstruct, Source/SConscript, Source/exehead/SConscript,
- Source/exehead/config.h: moved most of config.h into SConstruct
+2005-08-09 15:30 joostverburg
-2005-09-02 kichik
+ * /NSIS/trunk/Contrib/Language files/Malay.nlf,
+ /NSIS/trunk/Contrib/Language files/Malaysian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Malay.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Malaysian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: updated Malay
+ language files
- * Source/Platform.h, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/util.c, Source/exehead/util.h: added auto completion
- to the directory page
+2005-08-06 17:14 joostverburg
-2005-09-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: Modern UI 1.73
+ changelog
- * Contrib/Language files/Serbian.nlf, Contrib/Language
- files/SerbianLatin.nlf: typo
+2005-08-06 16:48 joostverburg
-2005-09-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed checkboxes on
+ uninstaller finish page or multiple finish pages
+ use Var /GLOBAL
- * Contrib/Modern UI/Language files/Serbian.nsh, Contrib/Modern
- UI/Language files/SerbianLatin.nsh: added another version of
- MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2005-08-06 16:23 kichik
-2005-08-30 kichik
+ * /NSIS/trunk/Examples/LogicLib.nsi: no more need for these defines
- * Source/build.cpp, Source/clzma.cpp, Source/growbuf.cpp,
- Source/script.cpp, Source/util.cpp: fixed build errors and warnings
- caused by latest merge
+2005-08-06 16:22 kichik
-2005-08-27 oripel
+ * /NSIS/trunk/Include/LogicLib.nsh: use Var /GLOBAL to avoid
+ annoying warning
- * Source/Platform.h, Source/Plugins.cpp, Source/Plugins.h,
- Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/build.cpp, Source/clzma.cpp, Source/growbuf.cpp,
- Source/lang.cpp, Source/script.cpp, Source/util.cpp, Source/util.h:
- merged from PIEPIEPIE branch: - min/max macros removed - Plugins
- refactored - more functions in util.{h,cpp}
+2005-08-06 16:12 kichik
-2005-08-27 oripel
+ * /NSIS/trunk/Include/Library.nsh: use Var /GLOBAL to avoid
+ annoying warning
- * Source/Platform.h, Source/Plugins.cpp, Source/Plugins.h,
- Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/build.cpp, Source/clzma.cpp, Source/growbuf.cpp,
- Source/lang.cpp, Source/script.cpp, Source/util.cpp, Source/util.h:
- - refactored class Plugins - fixed 'min' and 'max' macro evilness -
- added some useful functions to util.{h,cpp}
+2005-08-06 16:04 kichik
-2005-08-26 kichik
+ * /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Examples/UserVars.nsi,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: Var
+ can now be used in sections and functions, but only with the
+ /GLOBAL flag
- * Docs/src/history.but: 2.09 changelog
+2005-08-06 12:47 kichik
-2005-08-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: size optimization: added
+ __stdcall wrapper for lstrcat
- * SConstruct: Library.nsi example requires %WINDIR% environment
- variable
+2005-08-06 12:43 kichik
-2005-08-26 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: set initial working directory
+ of the uninstaller to its temporary directory so RMDir will be
+ able to delete $INSTDIR
- * Menu/images/header.gif: 2.09
+2005-08-05 15:27 kichik
-2005-08-23 kichik
+ * /NSIS/trunk/SCons/Config/linker_script: replaced with a complete
+ linker script taken from ld --verbose
- * Examples/WordFuncTest.nsi, Include/WordFunc.nsh: (Instructor)
- WordReplace - Fixed: Incorrect rule for return errorlevel 1 in
- situation when string beginning with word to replace and its only
- one word in string and when uses option - deletes all found words
+2005-08-05 15:27 kichik
-2005-08-19 kichik
+ * /NSIS/trunk/SCons/Config/gnu: linker script is defined using -T,
+ not -Wl
- * SConstruct: added -signed suffix to signed distribution files
+2005-08-05 13:14 kichik
-2005-08-17 joostverburg
+ * /NSIS/trunk/SCons/Config/gnu: DllMain's name is _DllMain@12, not
+ _DllMain@16
- * Contrib/Graphics/Wizard/arrow.bmp: removed rounded edges
+2005-08-05 12:52 kichik
-2005-08-14 kichik
+ * /NSIS/trunk/SCons/Config/gnu: added -mwindows to plug-ins linkage
- * Examples/bigtest.nsi, Examples/example1.nsi,
- Examples/example2.nsi: applied part of patch #1248335 for greater
- portability
+2005-08-04 21:04 kichik
-2005-08-14 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Luxembourgish.nsh:
+ proper case
- * SConstruct: added CODESIGNER option to enable executable digital
- signing
+2005-07-30 12:33 kichik
-2005-08-11 kichik
+ * /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: get rid of extra spaces in
+ is_valid_instpath so "C:\ " will not be valid
- * SConstruct: no support for Python 1.5.2
+2005-07-29 15:08 kichik
-2005-08-11 kichik
+ * /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/plugin.but,
+ /NSIS/trunk/Docs/src/script.but,
+ /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Docs/src/var.but: plugin -> plug-in
- * Contrib/Language files/SConscript, Contrib/Modern UI/SConscript:
- Malaysian -> Malay
+2005-07-28 17:58 kichik
-2005-08-11 kichik
+ * /NSIS/trunk/Examples/Library.nsi,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/SConscript: added Library macros test which
+ makes a good syntax example too
- * Contrib/BgImage/BgImage.cpp, Contrib/Library/TypeLib/TypeLib.cpp,
- Contrib/NSISdl/nsisdl.cpp: added extern "C" to DllMain so gcc will
- find it (patch #1255671)
+2005-07-28 17:56 kichik
-2005-08-09 joostverburg
+ * /NSIS/trunk/Include/Library.nsh: fixed check for DONE label
+ requirement
- * Contrib/Language files/Malay.nlf, Examples/Modern
- UI/MultiLanguage.nsi, Contrib/Language files/Malaysian.nlf,
- Contrib/Modern UI/Language files/Malay.nsh, Contrib/Modern
- UI/Language files/Malaysian.nsh: updated Malay language files
+2005-07-28 17:30 kichik
-2005-08-06 joostverburg
+ * /NSIS/trunk/Include/Library.nsh: define uninstalllib.done label
+ only when really needed
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- Modern UI 1.73 changelog
+2005-07-28 17:25 kichik
-2005-08-06 joostverburg
+ * /NSIS/trunk/Include/Library.nsh,
+ /NSIS/trunk/Include/UpgradeDLL.nsh: fixed bug #1243865 - *_UNIQUE
+ should use ${__FILE__}
- * Contrib/Modern UI/System.nsh: fixed checkboxes on uninstaller
- finish page or multiple finish pages use Var /GLOBAL
+2005-07-28 16:56 kichik
-2005-08-06 kichik
+ * /NSIS/trunk/Include/FileFunc.nsh: workaround for GetLongPathName
- * Examples/LogicLib.nsi: no more need for these defines
+2005-07-27 20:44 joostverburg
-2005-08-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Kurdish.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Include/LogicLib.nsh: use Var /GLOBAL to avoid annoying warning
+2005-07-26 17:41 joostverburg
-2005-08-06 kichik
+ * /NSIS/trunk/Contrib/Language files/Thai.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Docs/src/credits.but: updated Thai language files by
+ SoKoOLz
- * Include/Library.nsh: use Var /GLOBAL to avoid annoying warning
+2005-07-23 13:51
-2005-08-06 kichik
+ * /NSIS/tags/v208, /NSIS/tags/v208/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v208/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v208/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v208/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v208/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v208/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v208/Source/exehead/uninst.ico,
+ /NSIS/tags/v208/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v208'.
- * Docs/src/var.but, Examples/UserVars.nsi, Source/script.cpp,
- Source/tokens.cpp: Var can now be used in sections and functions,
- but only with the /GLOBAL flag
+2005-07-23 13:51 kichik
-2005-08-06 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: install new header files and
+ examples
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: size optimization: added __stdcall wrapper
- for lstrcat
+2005-07-23 13:49 kichik
-2005-08-06 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.08
- * Source/exehead/Main.c: set initial working directory of the
- uninstaller to its temporary directory so RMDir will be able to
- delete $INSTDIR
+2005-07-23 13:07 kichik
-2005-08-05 kichik
+ * /NSIS/trunk/Source/script.cpp: when looking for branding image
+ place holder, look for "Static" class too (windres...)
- * SCons/Config/linker_script: replaced with a complete linker
- script taken from ld --verbose
+2005-07-23 12:33 kichik
-2005-08-05 kichik
+ * /NSIS/trunk/Include/FileFunc.nsh: GetLongPathName is not
+ available on Windows 95
- * SCons/Config/gnu: linker script is defined using -T, not -Wl
+2005-07-23 12:31 kichik
-2005-08-05 kichik
+ * /NSIS/trunk/Docs/src/history.but: history for 2.08
- * SCons/Config/gnu: DllMain's name is _DllMain@12, not _DllMain@16
+2005-07-23 11:23 kichik
-2005-08-05 kichik
+ * /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/SConscript: distribute Kurdish
+ language files
- * SCons/Config/gnu: added -mwindows to plug-ins linkage
+2005-07-23 10:29 kichik
-2005-08-05 kichik
+ * /NSIS/trunk/Docs/src/usage.but: implemented RFE #1240601 -
+ documentation of command line switches
- * Contrib/Modern UI/Language files/Luxembourgish.nsh: proper case
+2005-07-23 10:06 kichik
-2005-07-30 kichik
+ * /NSIS/trunk/Docs/src/credits.but: added Kurdish
- * Source/exehead/util.c, Source/exehead/util.h: get rid of extra
- spaces in is_valid_instpath so "C:\ " will not be valid
+2005-07-22 21:10 kichik
-2005-07-29 kichik
+ * /NSIS/trunk/Contrib/System/System.html: callbacks are created
+ using System::Get, not System::Call
- * Docs/src/compiler.but, Docs/src/compilerflags.but,
- Docs/src/misc.but, Docs/src/plugin.but, Docs/src/script.but,
- Docs/src/tutorial.but, Docs/src/usefulfunc.but,
- Docs/src/usefulinfos.but, Docs/src/var.but: plugin -> plug-in
+2005-07-22 18:47 kichik
-2005-07-28 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: wParam
+ should be of type WPARAM, not LPARAM
- * Examples/SConscript, Examples/makensis.nsi, Examples/Library.nsi:
- added Library macros test which makes a good syntax example too
+2005-07-22 17:42 kichik
-2005-07-28 kichik
+ * /NSIS/trunk/Contrib/zip2exe/zlib/adler32.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/crc32.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/crypt.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inffast.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inflate.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inflate.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inftrees.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inftrees.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ioapi.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ioapi.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/unzip.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/unzip.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zconf.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zlib.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zutil.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zutil.h: zlib 1.2.3
- * Include/Library.nsh: fixed check for DONE label requirement
+2005-07-22 17:37 kichik
-2005-07-28 kichik
+ * /NSIS/trunk/Source/lang.cpp: use language name in missing
+ LangString warning, if possible
- * Include/Library.nsh: define uninstalllib.done label only when
- really needed
+2005-07-21 17:01 kichik
-2005-07-28 kichik
+ * /NSIS/trunk/Docs/src/headers.but,
+ /NSIS/trunk/Examples/FileFunc.nsi,
+ /NSIS/trunk/Examples/FileFuncTest.nsi,
+ /NSIS/trunk/Include/FileFunc.nsh: updates
- * Include/Library.nsh, Include/UpgradeDLL.nsh: fixed bug #1243865 -
- *_UNIQUE should use ${__FILE__}
+2005-07-21 16:36 joostverburg
-2005-07-28 kichik
+ * /NSIS/trunk/Contrib/Language files/Luxembourgish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Luxembourgish.nsh:
+ corrections by Philo
- * Include/FileFunc.nsh: workaround for GetLongPathName
+2005-07-21 16:31 joostverburg
-2005-07-27 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Kurdish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Kurdish.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Kurdish
+ language files by Erdal Ronahi
- * Contrib/Modern UI/Language files/Kurdish.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2005-07-21 16:02 joostverburg
-2005-07-26 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Default.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Contrib/Language files/Thai.nlf, Contrib/Modern UI/Language
- files/Thai.nsh, Docs/src/credits.but: updated Thai language files
- by SoKoOLz
+2005-07-21 15:54 joostverburg
-2005-07-23 kichik
+ * /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh:
+ corrections by SuperPat
- * Examples/makensis.nsi: install new header files and examples
+2005-07-21 15:50 joostverburg
-2005-07-23 kichik
+ * /NSIS/trunk/Contrib/Language files/Ukrainian.nlf: corrections by
+ Dmitriy Kononchuk
- * Menu/images/header.gif: 2.08
+2005-07-19 19:14 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/SConstruct: pass res_target to AppendRES
- * Source/script.cpp: when looking for branding image place holder,
- look for "Static" class too (windres...)
+2005-07-16 15:29 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: added InstallOptions readme to
+ start menu group
- * Include/FileFunc.nsh: GetLongPathName is not available on Windows
- 95
+2005-07-16 10:14 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/SConstruct: cleaned up a bit
- * Docs/src/history.but: history for 2.08
+2005-07-16 10:09 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/ms: add
+ $MAP_FLAG to all envs
- * Contrib/Language files/SConscript, Contrib/Modern UI/SConscript:
- distribute Kurdish language files
+2005-07-16 10:03 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/Contrib/UIs/SConscript: pass a new list of source for
+ every built ui
- * Docs/src/usage.but: implemented RFE #1240601 - documentation of
- command line switches
+2005-07-15 14:55 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/Examples/FileFuncTest.nsi,
+ /NSIS/trunk/Include/FileFunc.nsh,
+ /NSIS/trunk/Include/TextFunc.nsh: updates
- * Docs/src/credits.but: added Kurdish
+2005-07-15 10:45 kichik
-2005-07-23 kichik
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/ui.but: fixed bug #1238686 - DetailPrint
+ misspelled
- * Contrib/System/System.html: callbacks are created using
- System::Get, not System::Call
+2005-07-09 15:56 kichik
-2005-07-22 kichik
+ * /NSIS/trunk/Examples/waplugin.nsi: don't fail compiling, if
+ winamp is not installed
- * Contrib/InstallOptions/InstallerOptions.cpp: wParam should be of
- type WPARAM, not LPARAM
+2005-07-09 15:56 kichik
-2005-07-22 kichik
+ * /NSIS/trunk/SConstruct: use $PROGSUFFIX instead of '.exe'
- * Contrib/zip2exe/zlib/adler32.c, Contrib/zip2exe/zlib/crc32.c,
- Contrib/zip2exe/zlib/crypt.h, Contrib/zip2exe/zlib/inffast.c,
- Contrib/zip2exe/zlib/inflate.c, Contrib/zip2exe/zlib/inflate.h,
- Contrib/zip2exe/zlib/inftrees.c, Contrib/zip2exe/zlib/inftrees.h,
- Contrib/zip2exe/zlib/ioapi.c, Contrib/zip2exe/zlib/ioapi.h,
- Contrib/zip2exe/zlib/unzip.c, Contrib/zip2exe/zlib/unzip.h,
- Contrib/zip2exe/zlib/zconf.h, Contrib/zip2exe/zlib/zlib.h,
- Contrib/zip2exe/zlib/zutil.c, Contrib/zip2exe/zlib/zutil.h: zlib
- 1.2.3
+2005-07-09 10:45 kichik
-2005-07-22 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.rc,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.rc,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.rc,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.rc,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.rc,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.rc: passed rc files through
+ msvc to fix compatibility with mingw
- * Source/lang.cpp: use language name in missing LangString warning,
- if possible
+2005-07-09 10:11 kichik
-2005-07-21 kichik
+ * /NSIS/trunk/Contrib/UIs/SConscript, /NSIS/trunk/SConstruct: alias
+ `UIs` target to UIs
- * Docs/src/headers.but, Examples/FileFunc.nsi,
- Examples/FileFuncTest.nsi, Include/FileFunc.nsh: updates
+2005-07-08 09:49 kichik
-2005-07-21 joostverburg
+ * /NSIS/trunk/SCons/Config/gnu: if emitter is a list of emitters,
+ take the first and only emitter
- * Contrib/Language files/Luxembourgish.nlf, Contrib/Modern
- UI/Language files/Luxembourgish.nsh: corrections by Philo
+2005-07-07 20:13 kichik
-2005-07-21 joostverburg
+ * /NSIS/trunk/SConstruct: don't build tests by default to avoid an
+ error about CppUnit missing
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Language
- files/Kurdish.nlf, Contrib/Modern UI/Language files/Kurdish.nsh:
- Kurdish language files by Erdal Ronahi
+2005-07-07 17:56 kichik
-2005-07-21 joostverburg
+ * /NSIS/trunk/Include/Library.nsh: fixed bug #1234283 - InstallLib
+ fails on paths with spaces
- * Contrib/Modern UI/Language files/Default.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2005-07-03 11:22 joostverburg
-2005-07-21 joostverburg
+ * /NSIS/trunk/Menu/docs.html: fixed link to Modern UI Readme
- * Contrib/Language files/French.nlf, Contrib/Modern UI/Language
- files/French.nsh: corrections by SuperPat
+2005-07-02 17:53 kichik
-2005-07-21 joostverburg
+ * /NSIS/trunk/SCons/Config/linker_script,
+ /NSIS/trunk/SCons/Config/memcpy.c,
+ /NSIS/trunk/SCons/Config/memset.c: files needed by gnu
+ configuration
- * Contrib/Language files/Ukrainian.nlf: corrections by Dmitriy
- Kononchuk
+2005-07-02 17:53 kichik
-2005-07-19 kichik
+ * /NSIS/trunk/SCons/Config/gnu: * use a nicer method to replace the
+ emitter
+ * don't write required files on runtime, added them to cvs
- * SConstruct: pass res_target to AppendRES
+2005-07-02 16:49 kichik
-2005-07-16 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: gcc doesn't like sending a
+ temporary string object by reference
- * Examples/makensis.nsi: added InstallOptions readme to start menu
- group
+2005-07-02 16:40 kichik
-2005-07-16 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: include util.h for Unicode
+ conversion functions
- * SConstruct: cleaned up a bit
+2005-07-02 13:15 kichik
-2005-07-16 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: extracted some functions from
+ main()
- * SCons/Config/gnu, SCons/Config/ms: add $MAP_FLAG to all envs
+2005-07-02 13:07 kichik
-2005-07-16 kichik
+ * /NSIS/trunk/Docs/src/var.but: more information about Var
+ limitations
- * Contrib/UIs/SConscript: pass a new list of source for every built
- ui
+2005-07-02 12:53 kichik
-2005-07-15 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: applied patch #1223041 - add a
+ per-user config file
- * Examples/FileFuncTest.nsi, Include/FileFunc.nsh,
- Include/TextFunc.nsh: updates
+2005-07-01 21:24 kichik
-2005-07-15 kichik
+ * /NSIS/trunk/Source/Plugins.cpp: use dir_reader for
+ Plugins::FindCommands
- * Docs/src/flowcontrol.but, Docs/src/ui.but: fixed bug #1238686 -
- DetailPrint misspelled
+2005-07-01 21:08 kichik
-2005-07-09 kichik
+ * /NSIS/trunk/Source/script.cpp: use dir_reader for !include
- * Examples/waplugin.nsi: don't fail compiling, if winamp is not
- installed
+2005-07-01 20:40 kichik
-2005-07-09 kichik
+ * /NSIS/trunk/Docs/src/compiler.but: added link from !include to
+ !addincludedir
- * SConstruct: use $PROGSUFFIX instead of '.exe'
+2005-06-30 20:47 kichik
-2005-07-09 kichik
+ * /NSIS/trunk/Source/exehead/util.c: set error flag for invalid
+ directories passed to myDelete (fixes bug #1227553)
- * Contrib/UIs/modern.rc, Contrib/UIs/modern_headerbmp.rc,
- Contrib/UIs/modern_headerbmpr.rc, Contrib/UIs/modern_nodesc.rc,
- Contrib/UIs/modern_smalldesc.rc, Contrib/UIs/sdbarker_tiny.rc:
- passed rc files through msvc to fix compatibility with mingw
+2005-06-30 19:51 kichik
-2005-07-09 kichik
+ * /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/var.but:
+ variable names are no longer case sensitive
- * SConstruct, Contrib/UIs/SConscript: alias `UIs` target to UIs
+2005-06-30 19:23 kichik
-2005-07-08 kichik
+ * /NSIS/trunk/Contrib/Language files/Bosnian.nlf,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bosnian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/SConscript,
+ /NSIS/trunk/Docs/src/credits.but, /NSIS/trunk/Examples/Modern
+ UI/MultiLanguage.nsi: Bosnian translation by Salih CAVKIC
- * SCons/Config/gnu: if emitter is a list of emitters, take the
- first and only emitter
+2005-06-30 19:11 kichik
-2005-07-07 kichik
+ * /NSIS/trunk/Include/UpgradeDLL.nsh: use new RegTool (also fixes
+ bug #1230336)
- * SConstruct: don't build tests by default to avoid an error about
- CppUnit missing
+2005-06-30 19:01 kichik
-2005-07-07 kichik
+ * /NSIS/trunk/Include/Library.nsh: added missing Pop $R3
- * Include/Library.nsh: fixed bug #1234283 - InstallLib fails on
- paths with spaces
+2005-06-30 18:52 kichik
-2005-07-03 joostverburg
+ * /NSIS/trunk/Include/Library.nsh: moved installlib.end label after
+ __InstallLib_Helper_AddRegToolEntry macro insertion
- * Menu/docs.html: fixed link to Modern UI Readme
+2005-06-30 18:16 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Docs/src/callback.but: fixed .onMouseOverSection
+ example
- * SCons/Config/linker_script, SCons/Config/memcpy.c,
- SCons/Config/memset.c: files needed by gnu configuration
+2005-06-30 17:43 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Docs/src/build.but: added a note about big-endian
+ platforms
- * SCons/Config/gnu: * use a nicer method to replace the emitter *
- don't write required files on runtime, added them to cvs
+2005-06-30 17:18 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Docs/src/ui.but: typos
- * Source/makenssi.cpp: gcc doesn't like sending a temporary string
- object by reference
+2005-06-28 19:57 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Docs/src/compiler.but: fixed bug #1227610 - !packhdr
+ example missing dollar sign
- * Source/DialogTemplate.cpp: include util.h for Unicode conversion
- functions
+2005-06-28 19:18 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: misplaed 'is'
- * Source/makenssi.cpp: extracted some functions from main()
+2005-06-25 16:22 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: fix for patch #1214319 -
+ Uninstaller fails due to DLLs in temp folder
- * Docs/src/var.but: more information about Var limitations
+2005-06-24 17:26 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.rc,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.rc,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.rc,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.rc,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.rc,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.rc: WS_VISIBLE is the
+ default, NOT WS_VISIBLE must be specified
- * Source/makenssi.cpp: applied patch #1223041 - add a per-user
- config file
+2005-06-24 15:49 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h: no `using namespace` in
+ header file
- * Source/Plugins.cpp: use dir_reader for Plugins::FindCommands
+2005-06-24 15:44 kichik
-2005-07-02 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: no need for #include
+ "util.h"
- * Source/script.cpp: use dir_reader for !include
+2005-06-24 13:12 kichik
-2005-07-01 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: limit MultiByteToWideChar
+ to the real size available, not the total
- * Docs/src/compiler.but: added link from !include to !addincludedir
+2005-06-24 10:52 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/SConstruct: added `test-scripts` target
- * Source/exehead/util.c: set error flag for invalid directories
- passed to myDelete (fixes bug #1227553)
+2005-06-24 10:51 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/Source/Tests/SConscript: renamed target to
+ `test-code` and made conf test alias the target to an error
- * Docs/src/script.but, Docs/src/var.but: variable names are no
- longer case sensitive
+2005-06-23 22:34 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: look for _?= in the entire
+ command line in case realcmds skipped the first and only space
+ as a question mark is an invalid character in file names, this
+ method shouldn't have false positives
- * Contrib/Language files/Bosnian.nlf, Contrib/Language
- files/SConscript, Contrib/Modern UI/SConscript, Contrib/Modern
- UI/Language files/Bosnian.nsh, Docs/src/credits.but,
- Examples/Modern UI/MultiLanguage.nsi: Bosnian translation by Salih
- CAVKIC
+2005-06-23 20:48 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/Contrib/System/System.html,
+ /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/config.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Include/Sections.nsh: converted archive links to wiki
+ links
- * Include/UpgradeDLL.nsh: use new RegTool (also fixes bug #1230336)
+2005-06-23 20:10 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/Contrib/zip2exe/res.rc: fixed bug #1226381 - zip2exe
+ restricts extraction path length
- * Include/Library.nsh: added missing Pop $R3
+2005-06-23 19:06 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/SConstruct: one less TODO
- * Include/Library.nsh: moved installlib.end label after
- __InstallLib_Helper_AddRegToolEntry macro insertion
+2005-06-23 11:37 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/Source/Tests/Tests.dsp: replaced by scons
- * Docs/src/callback.but: fixed .onMouseOverSection example
+2005-06-23 11:24 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/Contrib/Library/RegTool/RegTool.bin,
+ /NSIS/trunk/Contrib/Library/RegTool/RegTool.c,
+ /NSIS/trunk/Contrib/Library/RegTool/RegTool.nsi,
+ /NSIS/trunk/Contrib/Library/RegTool/SConscript,
+ /NSIS/trunk/Include/Library.nsh: Library improvements with lots
+ of help from stb:
+ - InstallLib will register DLLs after reboot in the order they
+ were specified in the script
+ - InstallLib will register every DLL on reboot if the reboot flag
+ is already set
+ - rewrote RegTool in C
+ - RegTool compiles from source code
+ - RegTool will not run when double clicked
+ - RegTool will register each DLL on a separate process to avoid
+ conflicts
- * Docs/src/build.but: added a note about big-endian platforms
+2005-06-22 21:45 kichik
-2005-06-30 kichik
+ * /NSIS/trunk/SConstruct: fixed indention
- * Docs/src/ui.but: typos
+2005-06-22 21:37 kichik
-2005-06-28 kichik
+ * /NSIS/trunk/SConstruct, /NSIS/trunk/Source/Tests/SConscript:
+ added 'test' target
- * Docs/src/compiler.but: fixed bug #1227610 - !packhdr example
- missing dollar sign
+2005-06-22 15:55 kichik
-2005-06-28 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/default.rc,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern.rc,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.rc,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.rc,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.rc,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.rc,
+ /NSIS/trunk/Contrib/UIs/resource.h,
+ /NSIS/trunk/Contrib/UIs/SConscript,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.rc,
+ /NSIS/trunk/Contrib/UIs/UI Holder, /NSIS/trunk/Contrib/UIs/ui.c,
+ /NSIS/trunk/SConstruct: build UIs from source
- * Docs/src/attributes.but: misplaed 'is'
+2005-06-22 15:47 kichik
-2005-06-25 kichik
+ * /NSIS/trunk/Source/exehead/resource.rc: caption is not needed for
+ license dialogs
- * Source/exehead/Main.c: fix for patch #1214319 - Uninstaller fails
- due to DLLs in temp folder
+2005-06-22 14:49 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/SCons/Config/gnu: added linker script to assure
+ correct order of sections
- * Contrib/UIs/modern.rc, Contrib/UIs/modern_headerbmp.rc,
- Contrib/UIs/modern_headerbmpr.rc, Contrib/UIs/modern_nodesc.rc,
- Contrib/UIs/modern_smalldesc.rc, Contrib/UIs/sdbarker_tiny.rc:
- WS_VISIBLE is the default, NOT WS_VISIBLE must be specified
+2005-06-21 22:18 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/input.c: applied patch #1225167
+ - halibut fails on macro usage at beginning of line
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h: no `using
- namespace` in header file
+2005-06-21 21:46 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/Docs/src/library.but: fixed bug #1202495 - Incorrect
+ DLL name in appendix B.4 Visual Basic Runtimes
- * Source/DialogTemplate.cpp: no need for #include "util.h"
+2005-06-21 21:38 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: added comma
- * Source/DialogTemplate.cpp: limit MultiByteToWideChar to the real
- size available, not the total
+2005-06-21 21:35 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: fixed System readme path
+ and added link
- * SConstruct: added `test-scripts` target
+2005-06-21 21:22 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: added comma
- * Source/Tests/SConscript: renamed target to `test-code` and made
- conf test alias the target to an error
+2005-06-21 21:13 kichik
-2005-06-24 kichik
+ * /NSIS/trunk/Docs/src/build.but: typo
- * Source/exehead/Main.c: look for _?= in the entire command line in
- case realcmds skipped the first and only space as a question mark
- is an invalid character in file names, this method shouldn't have
- false positives
+2005-06-21 20:52 kichik
-2005-06-23 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: MSDN says RegQueryValueEx
+ might not always return null terminated strings
- * Contrib/System/System.html, Docs/src/chm_config.but,
- Docs/src/config.but, Docs/src/intro.but, Docs/src/tutorial.but,
- Docs/src/usefulfunc.but, Include/Sections.nsh: converted archive
- links to wiki links
+2005-06-21 17:43 kichik
-2005-06-23 kichik
+ * /NSIS/trunk/Examples/SConscript, /NSIS/trunk/Include/SConscript:
+ header files of useful functions (Instructor)
- * Contrib/zip2exe/res.rc: fixed bug #1226381 - zip2exe restricts
- extraction path length
+2005-06-21 15:00 kichik
-2005-06-23 kichik
+ * /NSIS/trunk/Docs/src/build.but: added information on building CHM
+ docs
- * SConstruct: one less TODO
+2005-06-21 12:37 kichik
-2005-06-23 kichik
+ * /NSIS/trunk/Docs/src/headers.but,
+ /NSIS/trunk/Docs/src/SConscript,
+ /NSIS/trunk/Examples/FileFunc.ini,
+ /NSIS/trunk/Examples/FileFunc.nsi,
+ /NSIS/trunk/Examples/FileFuncTest.nsi,
+ /NSIS/trunk/Examples/TextFunc.ini,
+ /NSIS/trunk/Examples/TextFunc.nsi,
+ /NSIS/trunk/Examples/TextFuncTest.nsi,
+ /NSIS/trunk/Examples/WordFunc.ini,
+ /NSIS/trunk/Examples/WordFunc.nsi,
+ /NSIS/trunk/Examples/WordFuncTest.nsi,
+ /NSIS/trunk/Include/FileFunc.nsh,
+ /NSIS/trunk/Include/TextFunc.nsh,
+ /NSIS/trunk/Include/WordFunc.nsh: header files of useful
+ functions (Instructor)
- * Source/Tests/Tests.dsp: replaced by scons
+2005-06-20 20:13
-2005-06-23 kichik
+ * /NSIS/tags/v207, /NSIS/tags/v207/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v207/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v207/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v207/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v207/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v207/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v207/Source/exehead/uninst.ico,
+ /NSIS/tags/v207/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v207'.
- * Contrib/Library/RegTool/RegTool.bin,
- Contrib/Library/RegTool/RegTool.c,
- Contrib/Library/RegTool/RegTool.nsi,
- Contrib/Library/RegTool/SConscript, Include/Library.nsh: Library
- improvements with lots of help from stb: - InstallLib will
- register DLLs after reboot in the order they were specified in the
- script - InstallLib will register every DLL on reboot if the
- reboot flag is already set - rewrote RegTool in C - RegTool
- compiles from source code - RegTool will not run when double
- clicked - RegTool will register each DLL on a separate process to
- avoid conflicts
+2005-06-20 20:13 kichik
-2005-06-23 kichik
+ * /NSIS/trunk/Include/LogicLib.nsh: del /q doesn't work on Windows
+ 98 and on XP it only means not to ask on global wildcard
+ deletion, which LogicLib doesn't do anyway
- * SConstruct: fixed indention
+2005-06-20 19:54 kichik
-2005-06-23 kichik
+ * /NSIS/trunk/Include/Library.nsh: RegTool.bin is in Bin
- * SConstruct, Source/Tests/SConscript: added 'test' target
+2005-06-20 19:48 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Docs/src/history.but: updated history
- * Contrib/UIs/SConscript, Contrib/UIs/default.exe,
- Contrib/UIs/default.rc, Contrib/UIs/modern.exe,
- Contrib/UIs/modern.rc, Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmp.rc, Contrib/UIs/modern_headerbmpr.rc,
- Contrib/UIs/modern_nodesc.rc, Contrib/UIs/modern_smalldesc.rc,
- Contrib/UIs/resource.h, Contrib/UIs/sdbarker_tiny.rc,
- Contrib/UIs/ui.c, Contrib/UIs/modern_headerbmpr.exe,
- Contrib/UIs/modern_nodesc.exe, Contrib/UIs/modern_smalldesc.exe,
- Contrib/UIs/sdbarker_tiny.exe, SConstruct: build UIs from source
+2005-06-20 16:03 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/modernui.but,
+ /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/var.but:
+ updated links for new directory structure
- * Source/exehead/resource.rc: caption is not needed for license
- dialogs
+2005-06-20 14:07 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Menu/index.html: align folders and websites sections
- * SCons/Config/gnu: added linker script to assure correct order of
- sections
+2005-06-20 12:46 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Contrib/Makensisw/jnetlib/httpget.cpp: back-ported
+ fixes from nsisdl
- * Docs/src/bin/halibut/input.c: applied patch #1225167 - halibut
- fails on macro usage at beginning of line
+2005-06-20 10:16 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Docs/src/build.but: added information about dist
+ targets
- * Docs/src/library.but: fixed bug #1202495 - Incorrect DLL name in
- appendix B.4 Visual Basic Runtimes
+2005-06-20 08:56 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Contrib/Makensisw/update.cpp,
+ /NSIS/trunk/Contrib/Makensisw/update.h: update source code
- * Docs/src/usefulinfos.but: added comma
+2005-06-19 21:45 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: applied
+ patch #1220277 with the help of veekee
- * Docs/src/usefulinfos.but: fixed System readme path and added link
+2005-06-19 21:39 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/Example.nsi,
+ /NSIS/trunk/Contrib/InstallOptions/testimgs.nsi,
+ /NSIS/trunk/Contrib/Splash/Example.nsi,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi,
+ /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/languages.nsi, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: fixed for new
+ paths
- * Docs/src/usefulinfos.but: added comma
+2005-06-19 21:04 kichik
-2005-06-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed bug #1221772 -
+ Welcome Page icon overlap
- * Docs/src/build.but: typo
+2005-06-19 20:35 kichik
-2005-06-21 kichik
+ * /NSIS/trunk/SConstruct: fixed exception when VER_* is not passed
- * Source/exehead/exec.c: MSDN says RegQueryValueEx might not always
- return null terminated strings
+2005-06-19 17:01 kichik
-2005-06-21 kichik
+ * /NSIS/trunk/SConstruct: added `dist-zip` (same as old `dist`) and
+ `dist-installer` targets
- * Examples/SConscript, Include/SConscript: header files of useful
- functions (Instructor)
+2005-06-19 17:00 kichik
-2005-06-21 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: updated for new build system
- * Docs/src/build.but: added information on building CHM docs
+2005-06-19 13:55 kichik
-2005-06-21 kichik
+ * /NSIS/trunk/Menu/update.html: replaced NSIS Update with MakeNSISw
+ and added a mention about the nightly build
- * Docs/src/SConscript, Docs/src/headers.but, Examples/FileFunc.ini,
- Examples/FileFunc.nsi, Examples/FileFuncTest.nsi,
- Examples/TextFunc.ini, Examples/TextFunc.nsi,
- Examples/TextFuncTest.nsi, Examples/WordFunc.ini,
- Examples/WordFunc.nsi, Examples/WordFuncTest.nsi,
- Include/FileFunc.nsh, Include/TextFunc.nsh, Include/WordFunc.nsh:
- header files of useful functions (Instructor)
+2005-06-19 13:47 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/websites.html:
+ updated links
- * Include/LogicLib.nsh: del /q doesn't work on Windows 98 and on XP
- it only means not to ask on global wildcard deletion, which
- LogicLib doesn't do anyway
+2005-06-19 13:46 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Menu/docs.html: install documentation and examples
- * Include/Library.nsh: RegTool.bin is in Bin
+2005-06-19 12:32 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Contrib/VPatch/Source/Plugin/SConscript: install
+ documentation and examples
- * Docs/src/history.but: updated history
+2005-06-19 12:31 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/SConstruct: fixed build of `dist` target when PREFIX
+ is not empty
- * Contrib/VPatch/Readme.html, Docs/src/history.but,
- Docs/src/modernui.but, Docs/src/pages.but, Docs/src/tutorial.but,
- Docs/src/var.but: updated links for new directory structure
+2005-06-19 11:43 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Contrib/System/SConscript: distribute Resource.dll
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/AppendixC.html,
- Docs/AppendixD.html, Docs/AppendixE.html, Docs/AppendixF.html,
- Docs/AppendixG.html, Docs/Chapter1.html, Docs/Chapter2.html,
- Docs/Chapter3.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html: no more
- compiled files in cvs
+2005-06-19 11:42 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Contrib/NSISdl/SConscript: distribute License.txt
- * Menu/index.html: align folders and websites sections
+2005-06-19 11:41 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/SConscript: distribute
+ Changelog.txt
- * Contrib/Makensisw/jnetlib/httpget.cpp: back-ported fixes from
- nsisdl
+2005-06-19 11:26 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/SConstruct: use RegTool's new SConscript
- * Docs/src/build.but: added information about dist targets
+2005-06-19 11:26 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Contrib/Library/RegTool/SConscript: basic SConscript
+ that just copies RegTool.bin
- * Contrib/Makensisw/update.cpp, Contrib/Makensisw/update.h: update
- source code
+2005-06-19 11:20 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/Contrib/Makensisw/SConscript: distribute documents
- * Contrib/Modern UI/Language files/French.nsh: applied patch
- #1220277 with the help of veekee
+2005-06-19 11:19 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/SConstruct: added docs and examples support for
+ BuildUtil
- * Contrib/AdvSplash/Example.nsi,
- Contrib/InstallOptions/testimgs.nsi, Contrib/Splash/Example.nsi,
- Contrib/System/SysFunc.nsh, Contrib/System/System.nsi,
- Examples/bigtest.nsi, Examples/languages.nsi, Examples/Modern
- UI/Basic.nsi, Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: fixed for new paths
+2005-06-19 11:15 kichik
-2005-06-20 kichik
+ * /NSIS/trunk/SConstruct: distribute nsisconf.nsh
- * Contrib/Modern UI/System.nsh: fixed bug #1221772 - Welcome Page
- icon overlap
+2005-06-19 11:13 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Examples/SConscript: distribute makensis.ini
- * SConstruct: fixed exception when VER_* is not passed
+2005-06-19 11:12 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: distribute license
- * !InstallNSIS.bat, SetCVSShellCommands.exe,
- SetCVSShellCommands.nsi: no longer needed as there are no binaries
- in CVS
+2005-06-19 11:02 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Examples/SConscript: removed cvsdata.nsi
- * SConstruct: added `dist-zip` (same as old `dist`) and
- `dist-installer` targets
+2005-06-19 11:02 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Examples/cvsdata.nsi: no longer needed as cvs
+ contains no binaries
- * Examples/makensis.nsi: updated for new build system
+2005-06-19 11:00 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: removed NSIS Update
- * Menu/update.html: replaced NSIS Update with MakeNSISw and added a
- mention about the nightly build
+2005-06-19 10:59 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Contrib/NSIS Update: moved update back to makensisw
+ as there's no point in having an entire application just to check
+ for a new version (downloading from cvs is no longer possible
+ because it contains no binaries)
- * Menu/docs.html: install documentation and examples
+2005-06-19 10:56 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Contrib/Makensisw/jnetlib,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/asyncdns.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/asyncdns.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/connection.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/connection.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/httpget.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/httpget.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/netinc.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/util.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/util.h,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/SConscript: moved update back to
+ makensisw
- * Menu/index.html, Menu/websites.html: updated links
+2005-06-19 09:35 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: fixed bug #1220940 -
+ grammatical error
- * Contrib/VPatch/Source/Plugin/SConscript: install documentation
- and examples
+2005-06-19 09:26 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Docs/src/credits.but: applied patch #1223362 -
+ Updated credits (obucina)
- * SConstruct: fixed build of `dist` target when PREFIX is not empty
+2005-06-18 19:45 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Docs/src/SConscript: get style.css from build dir
- * Contrib/System/SConscript: distribute Resource.dll
+2005-06-18 11:37 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Estonian.nlf: Changed details
+ button to begin with capital letter like other buttons.
- * Contrib/NSISdl/SConscript: distribute License.txt
+2005-06-17 18:39 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: reverted DISTDIR to nsis-$VERSION as it's
+ the name of the folder in the zip file
- * Contrib/InstallOptions/SConscript: distribute Changelog.txt
+2005-06-17 18:38 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: NSIS Menu now has a SConscript
- * SConstruct: use RegTool's new SConscript
+2005-06-17 18:38 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Contrib/NSIS Menu/SConscript: install NSIS Menu, no
+ building for now
- * Contrib/Library/RegTool/SConscript: basic SConscript that just
- copies RegTool.bin
+2005-06-17 18:27 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: always delete .dist folder
- * Contrib/Makensisw/SConscript: distribute documents
+2005-06-17 18:20 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: better name for dist temporary directory
+ ($VERSION wasn't replaced)
- * SConstruct: added docs and examples support for BuildUtil
+2005-06-17 14:03 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Source/SConscript: only pass -DNSIS_VERSION to files
+ that actually use it
- * SConstruct: distribute nsisconf.nsh
+2005-06-17 14:02 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/SConstruct: get version from command line and default
+ to "date.cvs" to avoid creation of "official" releases
- * Examples/SConscript: distribute makensis.ini
+2005-06-13 19:39 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Contrib/NSISdl/netinc.h: delete [] x is more correct,
+ although it doesn't really matter with our implementation of new
+ and delete
- * SConstruct: distribute license
+2005-06-07 19:07 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: typo
- * Examples/SConscript: removed cvsdata.nsi
+2005-06-03 18:45 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Source/script.cpp: bail on output name that starts
+ with a quote
- * Examples/cvsdata.nsi: no longer needed as cvs contains no
- binaries
+2005-06-02 16:32 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Docs/src/basic.but: explain about /oname with spaces
- * SConstruct: removed NSIS Update
+2005-05-28 18:52
-2005-06-19 kichik
+ * /NSIS/tags/v207b0, /NSIS/tags/v207b0/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v207b0/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v207b0/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v207b0/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v207b0/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v207b0/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v207b0/Docs/src/build.bat,
+ /NSIS/tags/v207b0/Source/exehead/uninst.ico,
+ /NSIS/tags/v207b0/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v207b0'.
- * Contrib/Makensisw/SConscript, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/jnetlib/asyncdns.cpp,
- Contrib/Makensisw/jnetlib/asyncdns.h,
- Contrib/Makensisw/jnetlib/connection.cpp,
- Contrib/Makensisw/jnetlib/connection.h,
- Contrib/Makensisw/jnetlib/httpget.cpp,
- Contrib/Makensisw/jnetlib/httpget.h,
- Contrib/Makensisw/jnetlib/netinc.h,
- Contrib/Makensisw/jnetlib/util.cpp,
- Contrib/Makensisw/jnetlib/util.h: moved update back to makensisw
+2005-05-28 18:52 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/INSTALL: short source build and installation help
+ file
- * Docs/src/tutorial.but: fixed bug #1220940 - grammatical error
+2005-05-28 18:48 kichik
-2005-06-19 kichik
+ * /NSIS/trunk/Docs/src/build.but: double build
- * Docs/src/credits.but: applied patch #1223362 - Updated credits
- (obucina)
+2005-05-28 18:37 kichik
-2005-06-18 kichik
+ * /NSIS/trunk/SConstruct: read version from external file
- * Docs/src/SConscript: get style.css from build dir
+2005-05-28 18:34 kichik
-2005-06-18 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.07
- * Contrib/Language files/Estonian.nlf: Changed details button to
- begin with capital letter like other buttons.
+2005-05-28 17:59 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Docs/src/build.bat: replaced by scons
- * SConstruct: reverted DISTDIR to nsis-$VERSION as it's the name of
- the folder in the zip file
+2005-05-28 17:56 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/log.but,
+ /NSIS/trunk/Docs/src/tutorial.but: updated links to point to the
+ new Building NSIS appendix
- * SConstruct: NSIS Menu now has a SConscript
+2005-05-28 17:55 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: removed Compiling NSIS
+ Sources section
- * Contrib/NSIS Menu/SConscript: install NSIS Menu, no building for
- now
+2005-05-28 17:55 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Docs/src/build.but, /NSIS/trunk/Docs/src/SConscript:
+ added Building NSIS appendix
- * SConstruct: always delete .dist folder
+2005-05-28 14:37 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Include/WinMessages.nsh: L shouldn't be there
- * SConstruct: better name for dist temporary directory ($VERSION
- wasn't replaced)
+2005-05-28 13:45 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/SConstruct: clean DISTDIR after zipping for a clean
+ release
- * VERSION: no longer needed
+2005-05-27 10:18 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Include/WinMessages.nsh: a more complete list by
+ Shengalts Aleksander
- * Source/SConscript: only pass -DNSIS_VERSION to files that
- actually use it
+2005-05-24 20:43 kichik
-2005-06-17 kichik
+ * /NSIS/trunk/Docs/src/silent.but: typo
- * SConstruct: get version from command line and default to
- "date.cvs" to avoid creation of "official" releases
+2005-05-24 19:09 kichik
-2005-06-13 kichik
+ * /NSIS/trunk/Docs/src/SConscript: style.css wasn't copied to the
+ build directory
- * Contrib/NSISdl/netinc.h: delete [] x is more correct, although it
- doesn't really matter with our implementation of new and delete
+2005-05-21 16:21 kichik
-2005-06-07 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.dsp,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.dsw,
+ /NSIS/trunk/Contrib/Banner/Banner.dsp,
+ /NSIS/trunk/Contrib/Banner/Banner.dsw,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsw,
+ /NSIS/trunk/Contrib/Dialer/dialer.dsp,
+ /NSIS/trunk/Contrib/Dialer/dialer.dsw,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsw,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.dsp,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.dsw,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.dsp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.dsw,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.dsp,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.dsw,
+ /NSIS/trunk/Contrib/MakeLangId/MakeLangId.dsp,
+ /NSIS/trunk/Contrib/MakeLangId/MakeLangId.dsw,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsp,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsw,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/trunk/Contrib/Splash/splash.dsp,
+ /NSIS/trunk/Contrib/Splash/splash.dsw,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsw,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.dsp,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.dsw,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.dsp,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.dsw,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.dsw,
+ /NSIS/trunk/Docs/src/bin/halibut/makefile,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-lzma.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/exehead/Makefile, /NSIS/trunk/Source/Makefile,
+ /NSIS/trunk/Source/makenssi.dsp, /NSIS/trunk/Source/makenssi.dsw:
+ replaced by scons
- * Contrib/Modern UI/Readme.html: typo
+2005-05-21 15:37 kichik
-2005-06-03 kichik
+ * /NSIS/trunk/SConstruct: set default value of CHMDOCS to 'yes' if
+ hhc.exe is found in PATH
- * Source/script.cpp: bail on output name that starts with a quote
+2005-05-21 14:07 kichik
-2005-06-02 kichik
+ * /NSIS/trunk/SConstruct: added CHMDOCS option
- * Docs/src/basic.but: explain about /oname with spaces
+2005-05-21 14:05 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/Docs/src/SConscript: added an option to build html
+ documentation
- * INSTALL: short source build and installation help file
+2005-05-21 13:27 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SConstruct: added SKIPSTUBS, SKIPPLUGINS, SKIPUTILS
+ and SKIPMISC to allow skipping certain parts of the build process
- * Docs/src/build.but: double build
+2005-05-21 13:14 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SConstruct: MAP_FLAG no longer requires target name
+ as a parameter
- * VERSION: [no log message]
+2005-05-21 13:13 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms: MAP_FLAG no longer needs to be a
+ function
- * SConstruct: read version from external file
+2005-05-21 13:11 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SCons/Config/gnu: automatically generate map file
+ name with proper path
- * Menu/images/header.gif: 2.07
+2005-05-21 13:05 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/Contrib/NSISdl/SConscript: cppused = 1 so stdlib is
+ included when needed
- * Docs/src/build.bat: replaced by scons
+2005-05-21 13:04 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SConstruct: added cppused argument for BuildPlugin
- * Docs/src/history.but, Docs/src/log.but, Docs/src/tutorial.but:
- updated links to point to the new Building NSIS appendix
+2005-05-21 13:03 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SCons/Config/default, /NSIS/trunk/SCons/Config/gnu,
+ /NSIS/trunk/SCons/Config/ms: added CPP_REQUIRES_STDLIB flag
- * Docs/src/usefulinfos.but: removed Compiling NSIS Sources section
+2005-05-21 10:59 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SCons/Config/gnu: missing colon
- * Docs/src/SConscript, Docs/src/build.but: added Building NSIS
- appendix
+2005-05-20 12:00 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/Docs/src/credits.but: credits for Welsh translation
- * Include/WinMessages.nsh: L shouldn't be there
+2005-05-20 11:59 kichik
-2005-05-28 kichik
+ * /NSIS/trunk/SConstruct: no more need for MINGWPREFIX
- * SConstruct: clean DISTDIR after zipping for a clean release
+2005-05-20 11:23 kichik
-2005-05-27 kichik
+ * /NSIS/trunk/SCons/Config/gnu: use cross compiler tool definition
- * Include/WinMessages.nsh: a more complete list by Shengalts
- Aleksander
+2005-05-20 11:23 kichik
-2005-05-24 kichik
+ * /NSIS/trunk/SCons/Tools/crossmingw.py: tool for cross-compiling
+ mingw
- * Docs/src/silent.but: typo
+2005-05-20 11:11 kichik
-2005-05-24 kichik
+ * /NSIS/trunk/Contrib/Language files/Welsh.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Welsh.nsh: Welsh
+ translation by Rhoslyn Prys
- * Docs/src/SConscript: style.css wasn't copied to the build
- directory
+2005-05-19 16:35 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Source/util.h: stringify the define itself, not its
+ name
- * Contrib/AdvSplash/advsplash.dsp, Contrib/AdvSplash/advsplash.dsw,
- Contrib/Banner/Banner.dsp, Contrib/Banner/Banner.dsw,
- Contrib/BgImage/BgImage.dsp, Contrib/BgImage/BgImage.dsw,
- Contrib/Dialer/dialer.dsp, Contrib/Dialer/dialer.dsw,
- Contrib/InstallOptions/io.dsp, Contrib/InstallOptions/io.dsw,
- Contrib/LangDLL/LangDLL.dsp, Contrib/LangDLL/LangDLL.dsw,
- Contrib/Library/LibraryLocal/LibraryLocal.dsp,
- Contrib/Library/LibraryLocal/LibraryLocal.dsw,
- Contrib/Library/TypeLib/TypeLib.dsp,
- Contrib/Library/TypeLib/TypeLib.dsw,
- Contrib/MakeLangId/MakeLangId.dsp,
- Contrib/MakeLangId/MakeLangId.dsw, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.dsw, Contrib/NSISdl/nsisdl.dsp,
- Contrib/NSISdl/nsisdl.dsw, Contrib/Splash/splash.dsp,
- Contrib/Splash/splash.dsw, Contrib/StartMenu/StartMenu.dsp,
- install.sh, Contrib/StartMenu/StartMenu.dsw,
- Contrib/UserInfo/UserInfo.dsp, Contrib/UserInfo/UserInfo.dsw,
- Contrib/VPatch/Source/Plugin/vpatchdll.dsp,
- Contrib/VPatch/Source/Plugin/vpatchdll.dsw,
- Contrib/nsExec/nsExec.dsp, Contrib/nsExec/nsExec.dsw,
- Contrib/zip2exe/zip2exe.dsp, Contrib/zip2exe/zip2exe.dsw,
- Docs/src/bin/halibut/makefile, Source/Makefile,
- Source/makenssi.dsp, Source/makenssi.dsw, Source/exehead/Makefile,
- Source/exehead/exehead-bzip2.dsp, Source/exehead/exehead-lzma.dsp,
- Source/exehead/exehead-zlib.dsp: replaced by scons
+2005-05-17 19:52 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: reset $INSTDIR if user clicked
+ cancel in the browse dialog
- * SConstruct: set default value of CHMDOCS to 'yes' if hhc.exe is
- found in PATH
+2005-05-14 17:52 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/SCons/Tools/mstoolkit.py: search harder for the
+ platform sdk
- * SConstruct: added CHMDOCS option
+2005-05-14 15:57 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Contrib/Makensisw/icon.ico,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/SConscript: icon for makensisw
+ copied from Contrib\Graphics\Icons
- * Docs/src/SConscript: added an option to build html documentation
+2005-05-12 16:49 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Contrib/Makensisw/afxres.h,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: _WIN32_IE 0x0400 where
+ needed
- * SConstruct: added SKIPSTUBS, SKIPPLUGINS, SKIPUTILS and SKIPMISC
- to allow skipping certain parts of the build process
+2005-05-12 16:49 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: proper case for icon
+ path
- * SConstruct: MAP_FLAG no longer requires target name as a
- parameter
+2005-05-12 16:27 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/SConstruct, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/SConscript, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/util.h: made NSIS_VERSION a define set by the
+ scons script
- * SCons/Config/default, SCons/Config/gnu, SCons/Config/ms: MAP_FLAG
- no longer needs to be a function
+2005-05-11 17:20 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: use DEFAULT_CHARSET for
+ dialog fonts by default
- * SCons/Config/gnu: automatically generate map file name with
- proper path
+2005-05-11 16:50 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: fixed string skip in
+ ReadVarLenArr
- * Contrib/NSISdl/SConscript: cppused = 1 so stdlib is included when
- needed
+2005-05-11 16:20 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/script.cpp: free
+ return value of CDialogTemplate::Save() using delete[]
- * SConstruct: added cppused argument for BuildPlugin
+2005-05-11 14:51 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Contrib/Language files/Breton.nlf: commented credits
- * SCons/Config/default, SCons/Config/gnu, SCons/Config/ms: added
- CPP_REQUIRES_STDLIB flag
+2005-05-10 20:30 kichik
-2005-05-21 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: set chm_toc and
+ chm_ind to NULL after closing them
- * SCons/Config/gnu: missing colon
+2005-05-10 19:15 kichik
-2005-05-20 kichik
+ * /NSIS/trunk/Source/script.cpp: Call :label is valid in uninstall
+ sections too
- * Docs/src/credits.but: credits for Welsh translation
+2005-05-07 13:44 kichik
-2005-05-20 kichik
+ * /NSIS/trunk/SCons/Config/gnu: --file-alignment is MinGW specific
- * SConstruct: no more need for MINGWPREFIX
+2005-05-07 13:32 kichik
-2005-05-20 kichik
+ * /NSIS/trunk/SCons/Config/gnu: restore LINKFLAGS after test is
+ done
- * SCons/Config/gnu: use cross compiler tool definition
+2005-05-07 05:33 kichik
-2005-05-20 kichik
+ * /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/Platform.h: implemented RFE #1172123 -
+ $LOCALAPPDATA
- * SCons/Tools/crossmingw.py: tool for cross-compiling mingw
+2005-05-06 10:23 kichik
-2005-05-20 kichik
+ * /NSIS/trunk/Contrib/System/Source/Buffers.c,
+ /NSIS/trunk/Contrib/System/Source/System.h: don't typedef struct
+ twice
- * Contrib/Language files/Welsh.nlf, Contrib/Modern UI/Language
- files/Welsh.nsh: Welsh translation by Rhoslyn Prys
+2005-05-06 10:19 kichik
-2005-05-19 kichik
+ * /NSIS/trunk/Contrib/Math/Source/MyMath.c: fixed inclusion of
+ mathcrt.h on case sensitive platforms
- * Source/util.h: stringify the define itself, not its name
+2005-05-06 10:15 kichik
-2005-05-17 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: define _WIN32_IE for
+ TBN_DROPDOWN, TBDDRET_DEFAULT and TBDDRET_NODEFAULT
- * Source/exehead/Ui.c: reset $INSTDIR if user clicked cancel in the
- browse dialog
+2005-05-06 09:57 kichik
-2005-05-14 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: don't use _MAX_PATH,
+ it's not defined on POSIX
- * SCons/Tools/mstoolkit.py: search harder for the platform sdk
+2005-05-06 09:51 kichik
-2005-05-14 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: first check if the
+ the file was successfully opened, then try opening the other
+ files
- * Contrib/Makensisw/icon.ico, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/SConscript: icon for makensisw copied from
- Contrib\Graphics\Icons
+2005-05-05 21:09 kichik
-2005-05-12 kichik
+ * /NSIS/trunk/SCons/Config/gnu: add funcs.c only when
+ NODEFLIBS_FLAG is used
- * Contrib/Makensisw/afxres.h, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/toolbar.cpp,
- Contrib/Makensisw/utils.cpp: _WIN32_IE 0x0400 where needed
+2005-05-05 20:25 kichik
-2005-05-12 kichik
+ * /NSIS/trunk/Source/exehead/util.c: SCons/Config/gnu now takes
+ care of adding memcpy if it's needed
- * Contrib/Makensisw/resource.rc: proper case for icon path
+2005-05-05 20:25 kichik
-2005-05-12 kichik
+ * /NSIS/trunk/SCons/Config/gnu: check if gcc requires memcpy or
+ memset and add them to crt-less builds
- * SConstruct, Source/SConscript, Source/build.cpp, Source/lang.cpp,
- Source/makenssi.cpp, Source/script.cpp, Source/util.h: made
- NSIS_VERSION a define set by the scons script
+2005-05-03 17:31 kichik
-2005-05-11 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/SConscript,
+ /NSIS/trunk/Contrib/ExDLL/exdll.h: applied parts of patch
+ #1193692 - fixes to scons Contrib stuff
- * Source/DialogTemplate.cpp: use DEFAULT_CHARSET for dialog fonts
- by default
+2005-04-30 18:04 kichik
-2005-05-11 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/SConscript,
+ /NSIS/trunk/Contrib/Banner/SConscript,
+ /NSIS/trunk/Contrib/BgImage/SConscript,
+ /NSIS/trunk/Contrib/Dialer/SConscript,
+ /NSIS/trunk/Contrib/Graphics/SConscript,
+ /NSIS/trunk/Contrib/InstallOptions/SConscript,
+ /NSIS/trunk/Contrib/Language files/SConscript,
+ /NSIS/trunk/Contrib/Math/SConscript, /NSIS/trunk/Contrib/Modern
+ UI/SConscript, /NSIS/trunk/Contrib/nsExec/SConscript,
+ /NSIS/trunk/Contrib/NSISdl/SConscript,
+ /NSIS/trunk/Contrib/Splash/SConscript,
+ /NSIS/trunk/Contrib/StartMenu/SConscript,
+ /NSIS/trunk/Contrib/System/SConscript,
+ /NSIS/trunk/Contrib/UIs/SConscript,
+ /NSIS/trunk/Contrib/UserInfo/SConscript,
+ /NSIS/trunk/Contrib/zip2exe/SConscript,
+ /NSIS/trunk/Docs/src/SConscript, /NSIS/trunk/Examples/SConscript,
+ /NSIS/trunk/Include/SConscript, /NSIS/trunk/SConstruct: install
+ and distribute examples, contribs and documentation
- * Source/DialogTemplate.cpp: fixed string skip in ReadVarLenArr
+2005-04-29 09:16 kichik
-2005-05-11 kichik
+ * /NSIS/trunk/SCons/Config/gnu: use g++ for linking on mingw, not
+ ld
- * Source/lang.cpp, Source/script.cpp: free return value of
- CDialogTemplate::Save() using delete[]
+2005-04-28 17:37 kichik
-2005-05-11 kichik
+ * /NSIS/trunk/Examples/SConscript, /NSIS/trunk/SConstruct: install
+ examples
- * Contrib/Language files/Breton.nlf: commented credits
+2005-04-26 20:40 kichik
-2005-05-10 kichik
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: update
+ by Dmitry
- * Docs/src/bin/halibut/bk_xhtml.c: set chm_toc and chm_ind to NULL
- after closing them
+2005-04-24 20:02 kichik
-2005-05-10 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.rc: no need for afxres.h,
+ windows.h is enough
- * Source/script.cpp: Call :label is valid in uninstall sections too
+2005-04-24 17:23 kichik
-2005-05-07 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/SConscript,
+ /NSIS/trunk/SConstruct: use our default environment for building
+ halibut
- * SCons/Config/gnu: --file-alignment is MinGW specific
+2005-04-24 16:34 kichik
-2005-05-07 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/SConscript,
+ /NSIS/trunk/Docs/src/bin/halibut/version.c: don't pass version as
+ define
- * SCons/Config/gnu: restore LINKFLAGS after test is done
+2005-04-24 16:04 kichik
-2005-05-07 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/SConscript: let scons handle
+ quotes
- * Docs/src/var.but, Source/Platform.h, Source/build.cpp:
- implemented RFE #1172123 - $LOCALAPPDATA
+2005-04-24 15:27 kichik
-2005-05-06 kichik
+ * /NSIS/trunk/Contrib/Dialer/SConscript: delayimp is no longer
+ needed
- * Contrib/System/Source/Buffers.c, Contrib/System/Source/System.h:
- don't typedef struct twice
+2005-04-24 15:20 kichik
-2005-05-06 kichik
+ * /NSIS/trunk/Contrib/MakeLangId/resource.rc: no need for afxres.h,
+ windows.h is enough
- * Contrib/Math/Source/MyMath.c: fixed inclusion of mathcrt.h on
- case sensitive platforms
+2005-04-23 20:26 kichik
-2005-05-06 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp: added support for
+ solid compression selection
- * Contrib/Makensisw/makensisw.cpp: define _WIN32_IE for
- TBN_DROPDOWN, TBDDRET_DEFAULT and TBDDRET_NODEFAULT
+2005-04-23 20:21 kichik
-2005-05-06 kichik
+ * /NSIS/trunk/Contrib/Makensisw/toolbar.cpp: don't call FreeLibrary
+ on a module "loaded" with GetModuleHandle
- * Docs/src/bin/halibut/bk_xhtml.c: don't use _MAX_PATH, it's not
- defined on POSIX
+2005-04-23 20:18 kichik
-2005-05-06 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed SetCompressor handling
- * Docs/src/bin/halibut/bk_xhtml.c: first check if the the file was
- successfully opened, then try opening the other files
+2005-04-23 20:08 kichik
-2005-05-06 kichik
+ * /NSIS/trunk/Contrib/Makensisw/toolbar.cpp: tabs to spaces
- * SCons/Config/gnu: add funcs.c only when NODEFLIBS_FLAG is used
+2005-04-23 19:22 kichik
-2005-05-05 kichik
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: simpler OEM conversion
- * Source/exehead/util.c: SCons/Config/gnu now takes care of adding
- memcpy if it's needed
+2005-04-23 19:15 kichik
-2005-05-05 kichik
+ * /NSIS/trunk/Contrib/zip2exe/SConscript: use new zlib files
- * SCons/Config/gnu: check if gcc requires memcpy or memset and add
- them to crt-less builds
+2005-04-23 19:14 kichik
-2005-05-03 kichik
+ * /NSIS/trunk/Contrib/zip2exe/zlib,
+ /NSIS/trunk/Contrib/zip2exe/zlib/adler32.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/crc32.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/crc32.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/crypt.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inffast.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inffast.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inffixed.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inflate.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inflate.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inftrees.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/inftrees.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ioapi.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ioapi.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/unzip.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/unzip.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zconf.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zlib.h,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zutil.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/zutil.h: new zlib version
+ (1.2.2) with lower case file names
- * Contrib/AdvSplash/SConscript, Contrib/ExDLL/exdll.h: applied
- parts of patch #1193692 - fixes to scons Contrib stuff
+2005-04-23 19:13 kichik
-2005-04-30 kichik
+ * /NSIS/trunk/Contrib/zip2exe/zlib: removed old version with upper
+ case names
- * Contrib/AdvSplash/SConscript, Contrib/Banner/SConscript,
- Contrib/BgImage/SConscript, Contrib/Dialer/SConscript,
- Contrib/InstallOptions/SConscript, Contrib/Math/SConscript,
- Contrib/NSISdl/SConscript, Contrib/Splash/SConscript,
- Contrib/StartMenu/SConscript, Contrib/System/SConscript,
- Contrib/UserInfo/SConscript, Contrib/nsExec/SConscript,
- Contrib/zip2exe/SConscript, SConstruct,
- Contrib/Graphics/SConscript, Contrib/Language files/SConscript,
- Contrib/Modern UI/SConscript, Contrib/UIs/SConscript,
- Docs/src/SConscript, Examples/SConscript, Include/SConscript:
- install and distribute examples, contribs and documentation
+2005-04-22 17:29 kichik
-2005-04-29 kichik
+ * /NSIS/trunk/SConstruct: more useful aliases
- * SCons/Config/gnu: use g++ for linking on mingw, not ld
+2005-04-22 16:51 kichik
-2005-04-28 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/SConscript,
+ /NSIS/trunk/Contrib/Banner/SConscript,
+ /NSIS/trunk/Contrib/BgImage/SConscript,
+ /NSIS/trunk/Contrib/Dialer/SConscript,
+ /NSIS/trunk/Contrib/InstallOptions/SConscript,
+ /NSIS/trunk/Contrib/LangDLL/SConscript,
+ /NSIS/trunk/Contrib/Library/TypeLib/SConscript,
+ /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Contrib/nsExec/SConscript, /NSIS/trunk/Contrib/NSIS
+ Update/SConscript, /NSIS/trunk/Contrib/NSISdl/SConscript,
+ /NSIS/trunk/Contrib/Splash/SConscript,
+ /NSIS/trunk/Contrib/StartMenu/SConscript,
+ /NSIS/trunk/Contrib/System/SConscript,
+ /NSIS/trunk/Contrib/UserInfo/SConscript,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/SConscript,
+ /NSIS/trunk/SConstruct: less code in SConscripts, more shared
+ code in SConstruct
- * SConstruct, Examples/SConscript: install examples
+2005-04-22 16:12 kichik
-2005-04-26 kichik
+ * /NSIS/trunk/SConstruct: alias util name to building it, not
+ installing it
- * Contrib/Language files/Russian.nlf, Contrib/Modern UI/Language
- files/Russian.nsh: update by Dmitry
+2005-04-21 19:52 kichik
-2005-04-24 kichik
+ * /NSIS/trunk/SConstruct: added CPPPATH and LIBPATH options
- * Contrib/StartMenu/StartMenu.rc: no need for afxres.h, windows.h
- is enough
+2005-04-21 17:46 kichik
-2005-04-24 kichik
+ * /NSIS/trunk/SConstruct: - build debug and release in different
+ directories
+ - added 'install' alias
+ - converted build_prefix and prefix to environment variables
- * SConstruct, Docs/src/bin/halibut/SConscript: use our default
- environment for building halibut
+2005-04-21 17:44 kichik
-2005-04-24 kichik
+ * /NSIS/trunk/Docs/src/SConscript: use $PREFIX instead of prefix
- * Docs/src/bin/halibut/SConscript, Docs/src/bin/halibut/version.c:
- don't pass version as define
+2005-04-21 17:40 kichik
-2005-04-24 kichik
+ * /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/ms: added
+ debug configuration
- * Docs/src/bin/halibut/SConscript: let scons handle quotes
+2005-04-21 14:25 kichik
-2005-04-24 kichik
+ * /NSIS/trunk/Examples/bigtest.nsi: bin2h was removed
- * Contrib/Dialer/SConscript: delayimp is no longer needed
+2005-04-21 14:22 kichik
-2005-04-24 kichik
+ * /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/languages.nsi,
+ /NSIS/trunk/Examples/VersionInfo.nsi: applied patch #1184571 -
+ Some fixes to the examples (case sensitive filenames)
- * Contrib/MakeLangId/resource.rc: no need for afxres.h, windows.h
- is enough
+2005-04-19 21:03 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/SConstruct: added prefix option
- * Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/toolbar.cpp: added
- support for solid compression selection
+2005-04-19 20:02 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/Plugins: no more compiled binaries in CVS
- * Contrib/Makensisw/toolbar.cpp: don't call FreeLibrary on a module
- "loaded" with GetModuleHandle
+2005-04-19 20:00 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/Contrib/Math/SConscript, /NSIS/trunk/SConstruct: Math
+ compiles
- * Source/script.cpp: fixed SetCompressor handling
+2005-04-19 19:58 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/Contrib/Math/Source/plugin.c: fixed mingw compile
+ errors
- * Contrib/Makensisw/toolbar.cpp: tabs to spaces
+2005-04-19 19:58 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/Contrib/Math/Source/Math.c,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.h: fixed vc6 compile
+ errors
- * Contrib/zip2exe/main.cpp: simpler OEM conversion
+2005-04-19 19:58 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/SConstruct: set default empty value for MINGWPREFIX
- * Contrib/zip2exe/SConscript: use new zlib files
+2005-04-19 19:40 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/Contrib/Math/Source/Math.c: bug fixes by brainsucker
- * Contrib/zip2exe/zlib/adler32.c, Contrib/zip2exe/zlib/crc32.c,
- Contrib/zip2exe/zlib/crc32.h, Contrib/zip2exe/zlib/crypt.h,
- Contrib/zip2exe/zlib/inffast.c, Contrib/zip2exe/zlib/inffast.h,
- Contrib/zip2exe/zlib/inffixed.h, Contrib/zip2exe/zlib/inflate.c,
- Contrib/zip2exe/zlib/inflate.h, Contrib/zip2exe/zlib/inftrees.c,
- Contrib/zip2exe/zlib/inftrees.h, Contrib/zip2exe/zlib/ioapi.c,
- Contrib/zip2exe/zlib/ioapi.h, Contrib/zip2exe/zlib/unzip.c,
- Contrib/zip2exe/zlib/unzip.h, Contrib/zip2exe/zlib/zconf.h,
- Contrib/zip2exe/zlib/zlib.h, Contrib/zip2exe/zlib/zutil.c,
- Contrib/zip2exe/zlib/zutil.h: new zlib version (1.2.2) with lower
- case file names
+2005-04-19 18:10 kichik
-2005-04-23 kichik
+ * /NSIS/trunk/Source/exehead/components.c,
+ /NSIS/trunk/Source/exehead/components.h: fixed compile error
+ without NSIS_CONFIG_COMPONENTPAGE
- * Contrib/zip2exe/zlib/ADLER32.C, Contrib/zip2exe/zlib/CRC32.C,
- Contrib/zip2exe/zlib/INFBLOCK.C, Contrib/zip2exe/zlib/INFBLOCK.H,
- Contrib/zip2exe/zlib/INFCODES.C, Contrib/zip2exe/zlib/INFCODES.H,
- Contrib/zip2exe/zlib/INFFAST.C, Contrib/zip2exe/zlib/INFFAST.H,
- Contrib/zip2exe/zlib/INFFIXED.H, Contrib/zip2exe/zlib/INFLATE.C,
- Contrib/zip2exe/zlib/INFTREES.C, Contrib/zip2exe/zlib/INFTREES.H,
- Contrib/zip2exe/zlib/INFUTIL.C, Contrib/zip2exe/zlib/INFUTIL.H,
- Contrib/zip2exe/zlib/UNZIP.H, Contrib/zip2exe/zlib/Unzip.c,
- Contrib/zip2exe/zlib/ZCONF.H, Contrib/zip2exe/zlib/ZLIB.H,
- Contrib/zip2exe/zlib/ZUTIL.H, Contrib/zip2exe/zlib/Zutil.c: removed
- old version with upper case names
+2005-04-16 18:58 kichik
-2005-04-22 kichik
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.exe,
+ /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Plugins/advsplash.dll,
+ /NSIS/trunk/Plugins/Banner.dll, /NSIS/trunk/Plugins/BgImage.dll,
+ /NSIS/trunk/Plugins/Dialer.dll,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/LangDLL.dll, /NSIS/trunk/Plugins/nsExec.dll,
+ /NSIS/trunk/Plugins/nsisdl.dll, /NSIS/trunk/Plugins/splash.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Plugins/System.dll, /NSIS/trunk/Plugins/TypeLib.dll,
+ /NSIS/trunk/Plugins/UserInfo.dll, /NSIS/trunk/Plugins/VPatch.dll:
+ no more compiled binaries in CVS
- * SConstruct: more useful aliases
+2005-04-16 18:48 kichik
-2005-04-22 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/SConscript,
+ /NSIS/trunk/Contrib/Banner/SConscript,
+ /NSIS/trunk/Contrib/BgImage/SConscript,
+ /NSIS/trunk/Contrib/Dialer/SConscript,
+ /NSIS/trunk/Contrib/InstallOptions/SConscript,
+ /NSIS/trunk/Contrib/LangDLL/SConscript,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/SConscript,
+ /NSIS/trunk/Contrib/Library/TypeLib/SConscript,
+ /NSIS/trunk/Contrib/MakeLangId/SConscript,
+ /NSIS/trunk/Contrib/Makensisw/SConscript,
+ /NSIS/trunk/Contrib/Math/SConscript,
+ /NSIS/trunk/Contrib/nsExec/SConscript, /NSIS/trunk/Contrib/NSIS
+ Update/SConscript, /NSIS/trunk/Contrib/NSISdl/SConscript,
+ /NSIS/trunk/Contrib/Splash/SConscript,
+ /NSIS/trunk/Contrib/StartMenu/SConscript,
+ /NSIS/trunk/Contrib/System/SConscript,
+ /NSIS/trunk/Contrib/UserInfo/SConscript,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/SConscript,
+ /NSIS/trunk/Contrib/zip2exe/SConscript,
+ /NSIS/trunk/Docs/src/bin/halibut/SConscript,
+ /NSIS/trunk/Docs/src/SConscript, /NSIS/trunk/SCons,
+ /NSIS/trunk/SCons/Config, /NSIS/trunk/SCons/Config/default,
+ /NSIS/trunk/SCons/Config/gnu, /NSIS/trunk/SCons/Config/ms,
+ /NSIS/trunk/SCons/Tools, /NSIS/trunk/SCons/Tools/mstoolkit.py,
+ /NSIS/trunk/SConstruct, /NSIS/trunk/Source/exehead/SConscript,
+ /NSIS/trunk/Source/SConscript: new build system using SCons
- * Contrib/AdvSplash/SConscript, Contrib/Banner/SConscript,
- Contrib/BgImage/SConscript, Contrib/Dialer/SConscript,
- Contrib/InstallOptions/SConscript, Contrib/LangDLL/SConscript,
- Contrib/Library/TypeLib/SConscript, Contrib/Math/SConscript,
- SConstruct, Contrib/NSISdl/SConscript, Contrib/Splash/SConscript,
- Contrib/StartMenu/SConscript, Contrib/System/SConscript,
- Contrib/UserInfo/SConscript,
- Contrib/VPatch/Source/Plugin/SConscript, Contrib/nsExec/SConscript:
- less code in SConscripts, more shared code in SConstruct
+2005-04-16 18:26 kichik
-2005-04-22 kichik
+ * /NSIS/trunk/Include/Library.nsh: use LibraryLocal.exe from Bin
+ directory
- * SConstruct: alias util name to building it, not installing it
+2005-04-16 18:24 kichik
-2005-04-21 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed bug #1181951 - InstallLib
+ error for new shared libraries
- * SConstruct: added CPPPATH and LIBPATH options
+2005-04-16 17:09 kichik
-2005-04-21 kichik
+ * /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c: no inline
+ in c
- * SConstruct: - build debug and release in different directories -
- added 'install' alias - converted build_prefix and prefix to
- environment variables
+2005-04-16 17:09 kichik
-2005-04-21 kichik
+ * /NSIS/trunk/Contrib/System/Source/Plugin.h,
+ /NSIS/trunk/Contrib/System/Source/System.h: use #ifdef instead of
+ #pragma once
- * Docs/src/SConscript: use $PREFIX instead of prefix
+2005-04-16 17:08 kichik
-2005-04-21 kichik
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp:
+ replaced WinMain with main
- * SCons/Config/gnu, SCons/Config/ms: added debug configuration
+2005-04-16 17:07 kichik
-2005-04-21 kichik
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: include ctype.h for tolower
- * Examples/bigtest.nsi: bin2h was removed
+2005-04-16 16:37 kichik
-2005-04-21 kichik
+ * /NSIS/trunk/Contrib/Dialer/dialer.c: manually use LoadLibrary and
+ GetProcAddress instead of /DELAYLOAD
- * Examples/VersionInfo.nsi, Examples/bigtest.nsi,
- Examples/languages.nsi: applied patch #1184571 - Some fixes to the
- examples (case sensitive filenames)
+2005-04-16 10:53 kichik
-2005-04-20 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: better sentence
- * SConstruct: added prefix option
+2005-04-15 22:11 kichik
-2005-04-19 kichik
+ * /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp: use wsprintf
+ instead of itoa for smaller code size
- * SConstruct, Contrib/Math/SConscript: Math compiles
+2005-04-12 17:27 kichik
-2005-04-19 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/contents.c: applied patch
+ #1180886 - fix halibut segfaults on powerpc (and maybe other
+ platforms)
- * Contrib/Math/Source/plugin.c: fixed mingw compile errors
+2005-04-08 17:41 kichik
-2005-04-19 kichik
+ * /NSIS/trunk/Source/exehead/util.c: fixed bug #1073792 - RMDir
+ /REBOOTOK sets reboot flag when folder doesn't exist
- * Contrib/Math/Source/Math.c, Contrib/Math/Source/MyMath.h: fixed
- vc6 compile errors
+2005-04-08 16:57 kichik
-2005-04-19 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed bug #1123353 - `WindowIcon
+ off` crashes makensis
- * SConstruct: set default empty value for MINGWPREFIX
+2005-04-08 15:29 kichik
-2005-04-19 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: fixed bug #1119442 -
+ CreateDirectory sets error flag with paths containing "\\"
- * Contrib/Math/Source/Math.c: bug fixes by brainsucker
+2005-04-08 14:45 kichik
-2005-04-19 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/util.cpp: applied patch #1179116 - debian
+ amd64/gcc-4.0 build fixes
- * Source/exehead/components.c, Source/exehead/components.h: fixed
- compile error without NSIS_CONFIG_COMPONENTPAGE
+2005-04-08 14:36 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1168711 - when
+ leaving the directory page, only set log_dolog if the check box
+ was created
- * makensisw.exe: no more compiled binaries in CVS
+2005-04-08 14:27 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: made ExpandEnvStrings set the
+ error flag as the documentation says it should
- * Contrib/Library/LibraryLocal/LibraryLocal.exe,
- Docs/src/bin/halibut.exe, NSIS.chm, makensis.exe: no more compiled
- binaries in CVS
+2005-04-08 14:26 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Docs/src/registry.but: added information about
+ non-existing environment variables used in ExpandEnvStrings
- * Contrib/AdvSplash/SConscript, Contrib/Banner/SConscript,
- Contrib/BgImage/SConscript, Contrib/Dialer/SConscript,
- Contrib/InstallOptions/SConscript, Contrib/LangDLL/SConscript,
- SConstruct, Contrib/Library/LibraryLocal/SConscript,
- Contrib/Library/TypeLib/SConscript, Contrib/MakeLangId/SConscript,
- Contrib/Makensisw/SConscript, Contrib/Math/SConscript,
- Contrib/NSISdl/SConscript, Contrib/Splash/SConscript,
- Contrib/StartMenu/SConscript, Contrib/System/SConscript,
- Contrib/UserInfo/SConscript,
- Contrib/VPatch/Source/Plugin/SConscript, Contrib/nsExec/SConscript,
- Contrib/zip2exe/SConscript, Docs/src/SConscript,
- Docs/src/bin/halibut/SConscript, SCons/Config/default,
- SCons/Config/gnu, SCons/Config/ms, SCons/Tools/mstoolkit.py,
- Source/SConscript, Source/exehead/SConscript: new build system
- using SCons
+2005-04-08 14:04 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Docs/src/registry.but,
+ /NSIS/trunk/Source/exehead/exec.c: fixed bug #1178756 -
+ EnumRegValue now sets the error flag if the enumeration index is
+ out of range
- * Include/Library.nsh: use LibraryLocal.exe from Bin directory
+2005-04-08 10:30 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Include/Colors.nsh: some more useful macros
- * Include/Library.nsh: fixed bug #1181951 - InstallLib error for
- new shared libraries
+2005-04-08 09:21 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Malaysian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Malaysian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new Malaysian
+ translation
- * Contrib/VPatch/Source/Plugin/vpatchdll.c: no inline in c
+2005-04-02 12:32 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Source/exehead/bin2h.c,
+ /NSIS/trunk/Source/exehead/bin2h.exe: no longer needed
- * Contrib/System/Source/Plugin.h, Contrib/System/Source/System.h:
- use #ifdef instead of #pragma once
+2005-04-02 12:14 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: added information about
+ SetCompressor /SOLID
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp: replaced WinMain
- with main
+2005-04-02 12:04 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: use solid compression
- * Contrib/zip2exe/main.cpp: include ctype.h for tolower
+2005-04-02 12:04 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exedata.cpp, /NSIS/trunk/Source/exedata.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: - stubs are no longer included in
+ makensis but read from the Stubs directory
+ - new /SOLID switch for SetCompressor allows setting solid
+ compression without recompiling makensis
- * Contrib/Dialer/dialer.c: manually use LoadLibrary and
- GetProcAddress instead of /DELAYLOAD
+2005-04-02 11:23 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c: added NSISCALL to functions
+ used in the stub (EXEHEAD)
- * Docs/src/tutorial.but: better sentence
+2005-03-31 20:13 kichik
-2005-04-16 kichik
+ * /NSIS/trunk/Include/Library.nsh: reverted latest change as File
+ already removes the read-only flag
- * Contrib/Library/TypeLib/TypeLib.cpp: use wsprintf instead of itoa
- for smaller code size
+2005-03-29 21:32 kichik
-2005-04-12 kichik
+ * /NSIS/trunk/Contrib/Language files/French.nlf: fixed bug #1168652
+ - French: Install Location 2 shortcuts on P
- * Docs/src/bin/halibut/contents.c: applied patch #1180886 - fix
- halibut segfaults on powerpc (and maybe other platforms)
+2005-03-29 20:57 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/intro.but, /NSIS/trunk/Docs/src/script.but,
+ /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usage.but, /NSIS/trunk/Docs/src/var.but:
+ typos
- * Source/exehead/util.c: fixed bug #1073792 - RMDir /REBOOTOK sets
- reboot flag when folder doesn't exist
+2005-03-29 19:14 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: clarified usage of
+ SetCompressor
- * Source/build.cpp: fixed bug #1123353 - `WindowIcon off` crashes
- makensis
+2005-03-29 19:09 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: - added AddBrandingImage
+ examples
+ - added information about usage of variables
- * Source/exehead/exec.c: fixed bug #1119442 - CreateDirectory sets
- error flag with paths containing "\\"
+2005-03-29 18:09 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/plugin.but: typo
- * Source/DialogTemplate.cpp, Source/util.cpp: applied patch
- #1179116 - debian amd64/gcc-4.0 build fixes
+2005-03-27 17:40 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Include/Library.nsh: remove read only file attribute
+ before using Rename /REBOOTOK
- * Source/exehead/Ui.c: fixed bug #1168711 - when leaving the
- directory page, only set log_dolog if the check box was created
+2005-03-24 15:21 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/generalpurpose.but: typo
- * Source/exehead/exec.c: made ExpandEnvStrings set the error flag
- as the documentation says it should
+2005-03-22 18:54 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/sections.but: replaced spaces with
+ underscores in index output parameter names
- * Docs/src/registry.but: added information about non-existing
- environment variables used in ExpandEnvStrings
+2005-03-22 18:30 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Docs/src/ui.but: added LockWindow description
- * Docs/src/registry.but, Source/exehead/exec.c: fixed bug #1178756
- - EnumRegValue now sets the error flag if the enumeration index is
- out of range
+2005-03-19 17:07 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: fixed two problematic
+ string length measurements
- * Include/Colors.nsh: some more useful macros
+2005-03-19 17:06 kichik
-2005-04-08 kichik
+ * /NSIS/trunk/Source/script.cpp: use correct freeing method
- * Contrib/Language files/Malaysian.nlf, Contrib/Modern UI/Language
- files/Malaysian.nsh, Examples/Modern UI/MultiLanguage.nsi: new
- Malaysian translation
+2005-03-19 16:18 kichik
-2005-04-02 kichik
+ * /NSIS/trunk/Docs/src/history.but: added missing parenthesis
- * Source/exehead/bin2h.c, Source/exehead/bin2h.exe: no longer
- needed
+2005-03-19 14:18
-2005-04-02 kichik
+ * /NSIS/tags/v206, /NSIS/tags/v206/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v206/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v206/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v206/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v206/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v206/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v206/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v206/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v206/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v206/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v206/Contrib/zip2exe,
+ /NSIS/tags/v206/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v206/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v206/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v206/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v206/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v206/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v206/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v206/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v206/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v206/Source/exehead/bin2h.exe,
+ /NSIS/tags/v206/Source/exehead/uninst.ico,
+ /NSIS/tags/v206/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v206'.
- * Docs/src/compilerflags.but: added information about SetCompressor
- /SOLID
+2005-03-19 14:18 kichik
-2005-04-02 kichik
+ * /NSIS/trunk/Source/Platform.h: added missing MB_RTLREADING
- * Examples/makensis.nsi: use solid compression
+2005-03-19 13:53 kichik
-2005-04-02 kichik
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ 2.05 -> 2.06
- * Source/build.cpp, Source/build.h, Source/exedata.cpp,
- Source/exedata.h, Source/makenssi.cpp, Source/script.cpp,
- Source/tokens.cpp, Source/util.cpp, Source/util.h,
- Source/exehead/config.h: - stubs are no longer included in makensis
- but read from the Stubs directory - new /SOLID switch for
- SetCompressor allows setting solid compression without recompiling
- makensis
+2005-03-19 13:44 kichik
-2005-04-02 kichik
+ * /NSIS/trunk/Docs/src/history.but: updated history
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/decompress.c, Source/bzip2/huffman.c: added NSISCALL
- to functions used in the stub (EXEHEAD)
+2005-03-19 12:49 kichik
-2005-03-31 kichik
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh:
+ improvements
- * Include/Library.nsh: reverted latest change as File already
- removes the read-only flag
+2005-03-19 11:56 kichik
-2005-03-30 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h:
+ fixed bug #1155060 - Install type drop down box not showing
+ default InstType
- * Contrib/Language files/French.nlf: fixed bug #1168652 - French:
- Install Location 2 shortcuts on P
+2005-03-18 15:56 kichik
-2005-03-29 kichik
+ * /NSIS/trunk/Contrib/System/Source/System.c: added missing include
- * Docs/src/intro.but, Docs/src/script.but, Docs/src/tutorial.but,
- Docs/src/usage.but, Docs/src/var.but: typos
+2005-03-17 21:26 kichik
-2005-03-29 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/Dialer/dialer.c,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/UIs/UI Holder/ui.cpp,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c: applied
+ patch #1164307 - Fixes to allow building Contrib/ on debian
+ (minus Makefiles)
- * Docs/src/compilerflags.but: clarified usage of SetCompressor
+2005-03-17 20:44 kichik
-2005-03-29 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ implemented feature request #1159701 - "RTLREADING" flag support
+ in the "MessageBox"
- * Docs/src/attributes.but: - added AddBrandingImage examples -
- added information about usage of variables
+2005-03-15 17:48 kichik
-2005-03-29 kichik
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Source/script.cpp: implemented feature request
+ #1159701 - "RTLREADING" flag support in the "MessageBox"
- * Docs/src/plugin.but: typo
+2005-03-11 11:28 kichik
-2005-03-27 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Plugins/advsplash.dll: fixed GlobalFree call with a
+ bad pointer (thanks Takhir)
- * Include/Library.nsh: remove read only file attribute before using
- Rename /REBOOTOK
+2005-03-10 18:53 kichik
-2005-03-24 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: fixed bug #1159700 -
+ SetFont doesn't work well with RTL on Windows 9x
- * Docs/src/generalpurpose.but: typo
+2005-03-05 16:56 kichik
-2005-03-22 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed compile error without
+ NSIS_CONFIG_CRC_SUPPORT
- * Docs/src/sections.but: replaced spaces with underscores in index
- output parameter names
+2005-03-05 12:07 kichik
-2005-03-22 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed bug #1144763 - more than 3
+ files in uninstall, cannot compile
+ data was added to udata after setro(TRUE) was used
- * Docs/src/ui.but: added LockWindow description
+2005-03-04 13:04 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: implemented feature request
+ #711900 - StartMenu SetCtlColors support
- * Source/DialogTemplate.cpp: fixed two problematic string length
- measurements
+2005-03-03 20:46 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Docs/src/sec.but: SetCurInstType works without the
+ components page too
- * Source/script.cpp: use correct freeing method
+2005-03-03 20:15 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Source/exehead/components.c: fixed bug #1155836 -
+ Incorrect section group state
+ section flags weren't read again after a recursive call for
+ _RefreshSectionGroups returned
- * Docs/src/history.but: added missing parenthesis
+2005-03-03 17:42 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: fixed bug #1155588 - missing
+ ClearErrors in GetWindowsVersion
- * Source/Platform.h: added missing MB_RTLREADING
+2005-02-25 15:28 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimizations
- * Docs/AppendixC.html, Docs/AppendixE.html, Docs/Chapter4.html,
- NSIS.chm, Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- makensis.exe: compiled latest changes
+2005-02-25 14:19 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: `available` variable in
+ DirProc's WM_IN_UPDATEMSG handler wasn't properly initialized
- * !InstallNSIS.bat, Examples/makensis.nsi, Menu/images/header.gif,
- Source/makenssi.cpp, Source/script.cpp: 2.05 -> 2.06
+2005-02-25 13:29 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Source/exehead/Makefile: applied patch #1123154 -
+ nsis 2.05 makefile missing components.c
- * Docs/src/history.but: updated history
+2005-02-18 13:39 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c: fixed plug-ins directory
+ initialization for extremely restricted guest users with no
+ directory listing access to the temporary directory
- * Contrib/Language files/Slovenian.nlf, Contrib/Modern UI/Language
- files/Slovenian.nsh: improvements
+2005-02-18 09:12 kichik
-2005-03-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Icelandic.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Icelandic.nsh: fixes
- * Source/exehead/Ui.c, Source/exehead/ui.h: fixed bug #1155060 -
- Install type drop down box not showing default InstType
+2005-02-17 21:20 kichik
-2005-03-18 kichik
+ * /NSIS/trunk/Docs/src/registry.but,
+ /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: implemented feature request
+ #1124901 - Registry functions and ShellVarContext
+ all registry instructions now accept SHCTX which is replaced with
+ HKLM or HKCU on runtime according to SetShellVarContext
- * Contrib/System/Source/System.c: added missing include
+2005-02-17 20:38 kichik
-2005-03-17 kichik
+ * /NSIS/trunk/Contrib/Language files/Icelandic.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Icelandic.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Icelandic by
+ Gretar Orri Kristinsson
- * Contrib/AdvSplash/advsplash.c, Contrib/Banner/Banner.c,
- Contrib/BgImage/BgImage.cpp, Contrib/Dialer/dialer.c,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/LangDLL/LangDLL.c, Contrib/Library/TypeLib/TypeLib.cpp,
- Contrib/Makensisw/makensisw.cpp, Contrib/NSISdl/nsisdl.cpp,
- Contrib/Splash/splash.c, Contrib/StartMenu/StartMenu.c,
- Contrib/UserInfo/UserInfo.c,
- Contrib/VPatch/Source/Plugin/vpatchdll.c, Contrib/nsExec/nsexec.c:
- applied patch #1164307 - Fixes to allow building Contrib/ on debian
- (minus Makefiles)
+2005-02-17 19:31 kichik
-2005-03-17 kichik
+ * /NSIS/trunk/Contrib/Language files/Belarusian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Belarusian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Byelorussian by
+ glory_man
- * Source/build.cpp, Source/script.cpp, Source/exehead/Main.c,
- Source/exehead/exec.c, Source/exehead/util.c: implemented feature
- request #1159701 - "RTLREADING" flag support in the "MessageBox"
+2005-02-11 14:08 kichik
-2005-03-15 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added Breton
- * Docs/src/flowcontrol.but, Source/script.cpp: implemented feature
- request #1159701 - "RTLREADING" flag support in the "MessageBox"
+2005-02-11 14:06 kichik
-2005-03-11 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added a note
+ about the first used language being the default language
- * Contrib/AdvSplash/advsplash.c: fixed GlobalFree call with a bad
- pointer (thanks Takhir)
+2005-02-11 14:02 kichik
-2005-03-10 kichik
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SerbianLatin.nsh:
+ terminology has changed and typos are fixed
- * Source/DialogTemplate.cpp: fixed bug #1159700 - SetFont doesn't
- work well with RTL on Windows 9x
+2005-02-04 20:49 kichik
-2005-03-05 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: added FORCE_INLINE to
+ RefreshComponents
- * Source/build.cpp: fixed compile error without
- NSIS_CONFIG_CRC_SUPPORT
+2005-02-04 20:45 kichik
-2005-03-05 kichik
+ * /NSIS/trunk/Source/exehead/components.c,
+ /NSIS/trunk/Source/exehead/components.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c: if the first section was a
+ section group, following section groups didn't behave correctly
- * Source/build.cpp: fixed bug #1144763 - more than 3 files in
- uninstall, cannot compile data was added to udata after setro(TRUE)
- was used
+2005-02-04 17:34 kichik
-2005-03-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh:
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO was defined twice
- * Contrib/StartMenu/Readme.txt, Contrib/StartMenu/StartMenu.c:
- implemented feature request #711900 - StartMenu SetCtlColors
- support
+2005-02-04 16:39 kichik
-2005-03-03 kichik
+ * /NSIS/trunk/Docs/src/generalpurpose.but: added a note about
+ relative paths and CopyFiles
- * Docs/src/sec.but: SetCurInstType works without the components
- page too
+2005-02-04 16:31 kichik
-2005-03-03 kichik
+ * /NSIS/trunk/Docs/src/history.but: typos
- * Source/exehead/components.c: fixed bug #1155836 - Incorrect
- section group state section flags weren't read again after a
- recursive call for _RefreshSectionGroups returned
+2005-02-04 15:31 kichik
-2005-03-03 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed compile error with logging
+ enabled
- * Docs/src/usefulfunc.but: fixed bug #1155588 - missing ClearErrors
- in GetWindowsVersion
+2005-02-04 14:45
-2005-02-25 kichik
+ * /NSIS/tags/v205, /NSIS/tags/v205/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v205/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v205/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v205/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v205/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v205/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v205/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v205/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v205/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v205/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v205/Contrib/zip2exe,
+ /NSIS/tags/v205/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v205/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v205/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v205/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v205/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v205/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v205/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v205/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v205/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v205/Source/exehead/bin2h.exe,
+ /NSIS/tags/v205/Source/exehead/uninst.ico,
+ /NSIS/tags/v205/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v205'.
- * Source/exehead/Ui.c: size optimizations
+2005-02-04 14:45 kichik
-2005-02-25 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: added InstallOptions images
+ example
- * Source/exehead/Ui.c: `available` variable in DirProc's
- WM_IN_UPDATEMSG handler wasn't properly initialized
+2005-02-04 14:17 kichik
-2005-02-25 kichik
+ * /NSIS/trunk/Source/exehead/components.c: a section group can't be
+ both selected and toggled
- * Source/exehead/Makefile: applied patch #1123154 - nsis 2.05
- makefile missing components.c
+2005-02-04 13:55 kichik
-2005-02-25 kichik
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ 2.04->2.05
- * install.sh: applied parts of patch #1120399 - install under
- /usr/share and don't use $(tempfile)
+2005-02-04 13:46 kichik
-2005-02-18 kichik
+ * /NSIS/trunk/Docs/src/history.but: changelog for 2.05
- * Source/build.cpp, Source/exehead/fileform.h,
- Source/exehead/util.c: fixed plug-ins directory initialization for
- extremely restricted guest users with no directory listing access
- to the temporary directory
+2005-02-03 20:26 kichik
-2005-02-18 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: added missing break
- * Contrib/Language files/Icelandic.nlf, Contrib/Modern UI/Language
- files/Icelandic.nsh: fixes
+2005-02-03 19:02 kichik
-2005-02-17 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: typo
- * Docs/src/registry.but, Source/script.cpp, Source/exehead/exec.c,
- Source/tokens.cpp: implemented feature request #1124901 - Registry
- functions and ShellVarContext all registry instructions now accept
- SHCTX which is replaced with HKLM or HKCU on runtime according to
- SetShellVarContext
+2005-02-03 18:24 kichik
-2005-02-17 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1114876 - "Space
+ Available" shows bad value "258.-2GB"
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Language
- files/Icelandic.nlf, Contrib/Modern UI/Language
- files/Icelandic.nsh: Icelandic by Gretar Orri Kristinsson
+2005-01-29 15:31 kichik
-2005-02-17 kichik
+ * /NSIS/trunk/Source/util.cpp: better error message for icon number
+ mismatch
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Language
- files/Belarusian.nlf, Contrib/Modern UI/Language
- files/Belarusian.nsh: Byelorussian by glory_man
+2005-01-27 16:28 kichik
-2005-02-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: - added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ - other updates and fixes
- * Examples/Modern UI/MultiLanguage.nsi: added Breton
+2005-01-22 17:14 kichik
-2005-02-11 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: update
- * Examples/Modern UI/MultiLanguage.nsi: added a note about the
- first used language being the default language
+2005-01-21 21:49 kichik
-2005-02-11 kichik
+ * /NSIS/trunk/Contrib/System/SysFunc.nsh: fixed bug #1102255 -
+ system.nsi example crash
- * Contrib/Language files/Serbian.nlf, Contrib/Language
- files/SerbianLatin.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh, Contrib/Modern UI/Language
- files/SerbianLatin.nsh: terminology has changed and typos are fixed
+2005-01-21 19:17 kichik
-2005-02-10 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: updated change
+ log
- * install.sh: no Menu directory on POSIX
+2005-01-21 19:14 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/testimgs.ini,
+ /NSIS/trunk/Contrib/InstallOptions/testimgs.nsi: example of
+ displaying images and icons
- * Source/exehead/Ui.c: added FORCE_INLINE to RefreshComponents
+2005-01-21 19:12 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Plugins/InstallOptions.dll: added TRANSPARENT flag
+ for BITMAP fields
- * Source/exehead/Ui.c, Source/exehead/components.c,
- Source/exehead/components.h, Source/exehead/exec.c: if the first
- section was a section group, following section groups didn't behave
- correctly
+2005-01-21 15:32 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi: added
+ MUI_HEADERIMAGE_BITMAP example
- * Contrib/Modern UI/Language files/Russian.nsh:
- MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO was defined twice
+2005-01-18 18:06 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Source/clzma.cpp: LZMA_IO_ERROR was returned instead
+ of LZMA_THREAD_ERROR
- * Docs/src/generalpurpose.but: added a note about relative paths
- and CopyFiles
+2005-01-18 17:56 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Source/build.cpp: string first in output for
+ compression errors
- * Docs/src/history.but: typos
+2005-01-14 18:35 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: use case insensitive string
+ comparison
- * Source/exehead/Ui.c: fixed compile error with logging enabled
+2005-01-14 17:07 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Docs/src/credits.but: Breton credits
- * Examples/makensis.nsi: added InstallOptions images example
+2005-01-14 16:54 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c: don't rely on WM_DESTROY
+ to update extraction status to 100%
- * Docs/AppendixE.html, Docs/AppendixF.html, Docs/Chapter4.html,
- NSIS.chm, Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- makensis.exe: compiled latest changes
+2005-01-14 16:39 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Contrib/Language files/Breton.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Breton.nsh: Breton
+ translation
- * Source/exehead/components.c: a section group can't be both
- selected and toggled
+2005-01-14 15:59 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/TODO.txt: done
- * !InstallNSIS.bat, Examples/makensis.nsi, Menu/images/header.gif,
- Source/makenssi.cpp, Source/script.cpp: 2.04->2.05
+2005-01-14 15:46 kichik
-2005-02-04 kichik
+ * /NSIS/trunk/Source/exehead/components.c: removed unneeded test
- * Docs/src/history.but: changelog for 2.05
+2005-01-14 15:24 kichik
-2005-02-03 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: made SectionGetText work in
+ .onInit too
- * Source/exehead/exec.c: added missing break
+2005-01-14 15:18 kichik
-2005-02-03 kichik
+ * /NSIS/trunk/Docs/src/sec.but: added information about 9th bit of
+ the section flags
- * Contrib/Modern UI/Readme.html: typo
+2005-01-14 15:15 kichik
-2005-02-03 kichik
+ * /NSIS/trunk/Include/Sections.nsh: added SF_NAMECHG
- * Source/exehead/Ui.c: fixed bug #1114876 - "Space Available" shows
- bad value "258.-2GB"
+2005-01-14 15:13 kichik
-2005-01-29 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp:
+ use new section name space
- * Source/util.cpp: better error message for icon number mismatch
+2005-01-14 15:11 kichik
-2005-01-27 kichik
+ * /NSIS/trunk/Source/build.cpp: initialize section name with zeros
- * Contrib/Modern UI/Language files/Russian.nsh: - added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE - other updates and fixes
+2005-01-14 15:11 kichik
-2005-01-22 kichik
+ * /NSIS/trunk/Source/exehead/fileform.h: added space for section
+ name to make it possible to parse it immediately when setting it
+ and not only when the components page is present
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: update
+2005-01-14 12:21 kichik
-2005-01-21 kichik
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: fixed branding
- * Contrib/System/SysFunc.nsh: fixed bug #1102255 - system.nsi
- example crash
+2005-01-14 10:41 joostverburg
-2005-01-21 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: updated change log
+2005-01-14 10:40 joostverburg
-2005-01-21 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: typo
- * Contrib/InstallOptions/testimgs.ini,
- Contrib/InstallOptions/testimgs.nsi: example of displaying images
- and icons
+2005-01-11 17:16 kichik
-2005-01-21 kichik
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/ui.but: applied patch #1098454 with some
+ changes
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: added TRANSPARENT flag for
- BITMAP fields
+2005-01-11 16:54 kichik
-2005-01-21 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: update the inner page if the
+ leave function aborted, something might have changed
- * Examples/Modern UI/HeaderBitmap.nsi: added MUI_HEADERIMAGE_BITMAP
- example
+2005-01-11 16:41 kichik
-2005-01-18 kichik
+ * /NSIS/trunk/Docs/src/sec.but: added information about 7th and 8th
+ bits of the section flags
- * Source/clzma.cpp: LZMA_IO_ERROR was returned instead of
- LZMA_THREAD_ERROR
+2005-01-11 16:39 kichik
-2005-01-18 kichik
+ * /NSIS/trunk/Include/Sections.nsh: added SF_TOGGLED section flag
- * Source/build.cpp: string first in output for compression errors
+2005-01-11 16:39 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h: deprecated cur_insttype and
+ insttype_changed
- * Source/dirreader.cpp: use case insensitive string comparison
+2005-01-11 16:38 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: use new component functions to
+ enable toggling of partially selected sections and fix bug
+ #1045722
- * Docs/src/credits.but: Breton credits
+2005-01-11 16:33 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ use new components functions so SetCurInstType will take affect
+ immediately and so setting a section group's flags will affect
+ its children too
- * Source/exehead/fileform.c: don't rely on WM_DESTROY to update
- extraction status to 100%
+2005-01-11 16:29 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Source/exehead/fileform.h: - deprecated cur_insttype
+ and insttype_changed
+ - added SF_TOGGLED section flag
- * Contrib/Language files/Breton.nlf, Contrib/Modern UI/Language
- files/Breton.nsh: Breton translation
+2005-01-11 16:28 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Source/exehead/components.c,
+ /NSIS/trunk/Source/exehead/components.h,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-lzma.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp: components functions
+ that don't rely on the TreeView
- * TODO.txt: done
+2005-01-11 12:26 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Docs/src/sections.but: missing "of"
- * Source/exehead/components.c: removed unneeded test
+2005-01-10 12:43 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/jumps.but,
+ /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh,
+ /NSIS/trunk/Include/Sections.nsh, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ renamed SubSection to SectionGroup
- * Source/exehead/Ui.c: made SectionGetText work in .onInit too
+2005-01-10 11:55 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed "done" and "register"
+ label warnings
- * Docs/src/sec.but: added information about 9th bit of the section
- flags
+2005-01-10 11:40 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Source/script.cpp: removed debug message
- * Include/Sections.nsh: added SF_NAMECHG
+2005-01-09 12:56 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Source/7zip/readme.txt: Igor requested the paragraph
+ to be removed
- * Source/exehead/Ui.c, Source/script.cpp, Source/exehead/exec.c:
- use new section name space
+2005-01-08 14:04 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Plugins/advsplash.dll: fixed doubled delay for !nt50
+ mode
- * Source/build.cpp: initialize section name with zeros
+2005-01-08 13:30 kichik
-2005-01-14 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c: indent -nut -kr -bli0
+ -i2
- * Source/exehead/fileform.h: added space for section name to make
- it possible to parse it immediately when setting it and not only
- when the components page is present
+2005-01-07 16:31
-2005-01-14 kichik
+ * /NSIS/tags/v204, /NSIS/tags/v204/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v204/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v204/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v204/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v204/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v204/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v204/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v204/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v204/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v204/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v204/Contrib/zip2exe,
+ /NSIS/tags/v204/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v204/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v204/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v204/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v204/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v204/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v204/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v204/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v204/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v204/Source/exehead/bin2h.exe,
+ /NSIS/tags/v204/Source/exehead/uninst.ico,
+ /NSIS/tags/v204/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v204'.
- * Contrib/Language files/Russian.nlf: fixed branding
+2005-01-07 16:31 kichik
-2005-01-14 joostverburg
+ * /NSIS/trunk/Docs/src/basic.but: - updated File /r documentation
+ - minor improvements
- * Contrib/Modern UI/Language files/German.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2005-01-07 14:52 kichik
-2005-01-14 joostverburg
+ * /NSIS/trunk/Menu/images/header.gif: 2.03->2.04
- * Contrib/Modern UI/Language files/Dutch.nsh: typo
+2005-01-07 11:32 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: RegQueryValueEx only takes
+ 6 parameters
- * Docs/src/flowcontrol.but, Docs/src/ui.but: applied patch #1098454
- with some changes
+2005-01-05 17:11 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ 2.03->2.04
- * Source/exehead/Ui.c: update the inner page if the leave function
- aborted, something might have changed
+2005-01-05 17:02 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Docs/src/history.but: 2.04 changelog
- * Docs/src/sec.but: added information about 7th and 8th bits of the
- section flags
+2005-01-05 16:36 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Source/script.cpp: better fix for bug #1096104
- * Include/Sections.nsh: added SF_TOGGLED section flag
+2005-01-05 13:40 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp:
+ fixed 1095761 - File /r changes $0
- * Contrib/ExDLL/exdll.h: deprecated cur_insttype and
- insttype_changed
+2005-01-05 13:01 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Source/script.cpp: descending message wasn't being
+ displayed when the directory itself matched
- * Source/exehead/Ui.c: use new component functions to enable
- toggling of partially selected sections and fix bug #1045722
+2005-01-05 12:44 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Docs/src/registry.but: note about not using full path
+ with INI instructions
- * Source/exehead/exec.c, Source/script.cpp: use new components
- functions so SetCurInstType will take affect immediately and so
- setting a section group's flags will affect its children too
+2005-01-05 12:37 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1096104 - File /r under
+ unix creates incorrect dirs
- * Source/exehead/fileform.h: - deprecated cur_insttype and
- insttype_changed - added SF_TOGGLED section flag
+2005-01-05 12:02 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: compare to string::npos, not 0
- * Source/exehead/components.c, Source/exehead/components.h,
- Source/exehead/exehead-bzip2.dsp, Source/exehead/exehead-lzma.dsp,
- Source/exehead/exehead-zlib.dsp: components functions that don't
- rely on the TreeView
+2005-01-04 16:35 kichik
-2005-01-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Estonian.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Docs/src/sections.but: missing "of"
+2005-01-04 16:18 kichik
-2005-01-10 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Farsi.nsh: - fixes
+ - added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Docs/src/history.but, Docs/src/jumps.but, Docs/src/sec.but,
- Docs/src/sections.but, Examples/bigtest.nsi, Examples/makensis.nsi,
- Include/LogicLib.nsh, Include/Sections.nsh, Source/build.cpp,
- Source/build.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/Ui.c, Source/exehead/fileform.h:
- renamed SubSection to SectionGroup
+2005-01-04 16:17 kichik
-2005-01-10 kichik
+ * /NSIS/trunk/Contrib/Language files/Farsi.nlf: fixes
- * Include/Library.nsh: fixed "done" and "register" label warnings
+2005-01-04 14:54 kichik
-2005-01-10 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/License.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/license.but,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: 2005
- * Source/script.cpp: removed debug message
+2005-01-03 20:36 kichik
-2005-01-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Source/7zip/readme.txt: Igor requested the paragraph to be
- removed
+2004-12-16 18:45 kichik
-2005-01-08 kichik
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh:
+ updates
- * Contrib/AdvSplash/advsplash.c: fixed doubled delay for !nt50 mode
+2004-12-16 18:43 kichik
-2005-01-08 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Contrib/AdvSplash/advsplash.c: indent -nut -kr -bli0 -i2
+2004-12-14 18:13 kichik
-2005-01-07 kichik
+ * /NSIS/trunk/Contrib/Language files/TradChinese.nlf: fixes
- * Docs/AppendixD.html, Docs/AppendixE.html, Docs/AppendixG.html,
- Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, NSIS.chm, makensis.exe: compiled latest changes
+2004-12-14 18:11 kichik
-2005-01-07 kichik
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf: address update
- * Docs/src/basic.but: - updated File /r documentation - minor
- improvements
+2004-12-14 18:11 kichik
-2005-01-07 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Menu/images/header.gif: 2.03->2.04
+2004-12-11 16:10 kichik
-2005-01-07 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp: use new
+ MultiByteToWideChar and WideCharToMultiByte implementation
- * Docs/src/usefulinfos.but: RegQueryValueEx only takes 6 parameters
+2004-12-11 16:09 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.h: updated copyright year
- * !InstallNSIS.bat, Examples/makensis.nsi, Source/makenssi.cpp,
- Source/script.cpp: 2.03->2.04
+2004-12-11 16:09 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: use new, correct,
+ MultiByteToWideChar and WideCharToMultiByte implementation on
+ POSIX
- * Docs/src/history.but: 2.04 changelog
+2004-12-11 16:06 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: added implementation of Unicode
+ conversion functions for POSIX, based on iconv
- * Source/script.cpp: better fix for bug #1096104
+2004-12-11 14:52 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf: added codepage
- * Source/build.cpp, Source/script.cpp: fixed 1095761 - File /r
- changes $0
+2004-12-10 11:09 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: fixed
+ bug #1082017 - Problem with empty dir in File /r
- * Source/script.cpp: descending message wasn't being displayed when
- the directory itself matched
+2004-12-10 10:54 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.exe:
+ applied patch #1081497 - Fix for LibraryLocal to allow DLL's with
+ a UNC path
- * Docs/src/registry.but: note about not using full path with INI
- instructions
+2004-12-10 10:35 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Source/Tests/specmatch.cpp,
+ /NSIS/trunk/Source/Tests/Tests.dsp: added a test for
+ dir_reader::matches
- * Source/script.cpp: fixed bug #1096104 - File /r under unix
- creates incorrect dirs
+2004-12-10 10:21 kichik
-2005-01-05 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: fixed bug #1080810 -
+ const_iterators cannot be null in g++ (3.4.2)
- * Source/dirreader.cpp: compare to string::npos, not 0
+2004-12-06 17:15 kichik
-2005-01-04 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: fixed vc7.1 compile error
- * Contrib/Modern UI/Language files/Estonian.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-12-03 16:46
-2005-01-04 kichik
+ * /NSIS/tags/v203, /NSIS/tags/v203/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v203/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v203/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v203/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v203/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v203/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v203/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v203/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v203/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v203/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v203/Contrib/zip2exe,
+ /NSIS/tags/v203/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v203/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v203/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v203/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v203/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v203/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v203/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v203/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v203/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v203/Source/exehead/bin2h.exe,
+ /NSIS/tags/v203/Source/exehead/uninst.ico,
+ /NSIS/tags/v203/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v203'.
- * Contrib/Modern UI/Language files/Farsi.nsh: - fixes - added
- another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-12-03 16:46 kichik
-2005-01-04 kichik
+ * /NSIS/trunk/Docs/src/history.but: added MUI 1.72
- * Contrib/Language files/Farsi.nlf: fixes
+2004-12-03 16:42 kichik
-2005-01-04 kichik
+ * /NSIS/trunk/Docs/src/history.but: wrong version
- * Contrib/InstallOptions/Readme.html, Contrib/Modern
- UI/License.txt, Contrib/Modern UI/Readme.html, Contrib/Modern
- UI/System.nsh, Docs/src/chm_config.but, Docs/src/config.but,
- Docs/src/license.but, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/makenssi.cpp,
- Source/exehead/Main.c, license.txt, Source/exehead/Ui.c: 2005
+2004-12-03 16:37 kichik
-2005-01-03 kichik
+ * /NSIS/trunk/Docs/src/history.but: added a note about improved
+ File /r behavior
- * Contrib/Modern UI/Language files/Croatian.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-12-03 09:40 kichik
-2004-12-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh: updated
+ by Puuhis
- * Contrib/Language files/SimpChinese.nlf, Contrib/Modern
- UI/Language files/SimpChinese.nsh: updates
+2004-12-02 18:34 kichik
-2004-12-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: added codepage
- * Contrib/Modern UI/Language files/TradChinese.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-12-02 18:33 kichik
-2004-12-14 kichik
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf: fixes
- * Contrib/Language files/TradChinese.nlf: fixes
+2004-12-02 18:33 kichik
-2004-12-14 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh:
+ e-mail change
- * Contrib/Language files/Korean.nlf: address update
+2004-12-02 18:31 kichik
-2004-12-14 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh:
+ added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Contrib/Modern UI/Language files/Korean.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-12-02 18:24 kichik
-2004-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE (patch #1077370)
- * Source/DialogTemplate.cpp, Source/ResourceVersionInfo.cpp: use
- new MultiByteToWideChar and WideCharToMultiByte implementation
+2004-11-30 18:45 kichik
-2004-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Source/ResourceEditor.h: updated copyright year
+2004-11-30 18:25 kichik
-2004-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Source/ResourceEditor.cpp: use new, correct, MultiByteToWideChar
- and WideCharToMultiByte implementation on POSIX
+2004-11-30 18:22 kichik
-2004-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE (patch #1075188)
- * Source/Platform.h, Source/util.cpp, Source/util.h: added
- implementation of Unicode conversion functions for POSIX, based on
- iconv
+2004-11-30 18:19 kichik
-2004-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh: *
+ added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ * translation improvements
- * Contrib/Language files/Hebrew.nlf: added codepage
+2004-11-30 18:13 kichik
-2004-12-10 kichik
+ * /NSIS/trunk/Docs/src/history.but: update
- * Source/build.h, Source/script.cpp: fixed bug #1082017 - Problem
- with empty dir in File /r
+2004-11-30 18:11 kichik
-2004-12-10 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h: some consts
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp,
- Contrib/Library/LibraryLocal/LibraryLocal.exe: applied patch
- #1081497 - Fix for LibraryLocal to allow DLL's with a UNC path
+2004-11-30 18:00 kichik
-2004-12-10 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: fixed bug
+ #1075363 - nsisconf.nsh not included when using makensisw
- * Source/Tests/Tests.dsp, Source/Tests/specmatch.cpp: added a test
- for dir_reader::matches
+2004-11-29 20:58 ramon18
-2004-12-10 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ updated Portuguese.nsh
- * Source/dirreader.cpp: fixed bug #1080810 - const_iterators cannot
- be null in g++ (3.4.2)
+2004-11-27 21:00 kichik
-2004-12-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ added another version of
+ MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Source/dirreader.cpp: fixed vc7.1 compile error
+2004-11-27 14:50 joostverburg
-2004-12-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.72
+ * Fixed state of Finish page Cancel button when both an installer
+ and uninstaller page is included
- * NSIS.chm, Docs/AppendixB.html, Docs/AppendixE.html,
- Docs/Chapter3.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- makensis.exe: latest changes
+2004-11-27 13:58 joostverburg
-2004-12-03 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.02->2.03
- * Docs/src/history.but: added MUI 1.72
+2004-11-27 13:24 joostverburg
-2004-12-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Docs/src/history.but: wrong version
+2004-11-27 11:08 kichik
-2004-12-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh: added
+ another version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Docs/src/history.but: added a note about improved File /r
- behavior
+2004-11-26 22:53 kichik
-2004-12-03 kichik
+ * /NSIS/trunk/Source/build.cpp: added
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE to the script define list
- * Contrib/Modern UI/Language files/Finnish.nsh: updated by Puuhis
+2004-11-26 20:28 kichik
-2004-12-02 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: use stat to find out if the
+ file is a directory or not since it's more portable
- * Contrib/Language files/Russian.nlf: added codepage
+2004-11-26 20:07 kichik
-2004-12-02 kichik
+ * /NSIS/trunk/Source/dirreader.cpp: * diropen, dirread -> opendir,
+ readdir
+ * fixed warnings
- * Contrib/Language files/Macedonian.nlf: fixes
+2004-11-26 20:02 kichik
-2004-12-02 kichik
+ * /NSIS/trunk/Source/Makefile: added dirreader.cpp and updated
+ dependencies
- * Contrib/Modern UI/Language files/Macedonian.nsh: e-mail change
+2004-11-26 19:49 kichik
-2004-12-02 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: fixed
+ compile error under gcc-2.95
- * Contrib/Modern UI/Language files/Lithuanian.nsh, Contrib/Modern
- UI/Language files/Macedonian.nsh: added another version of
- MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-11-26 19:30 kichik
-2004-12-02 kichik
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ 2.02->2.03
- * Contrib/Modern UI/Language files/Japanese.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE (patch #1077370)
+2004-11-26 18:49 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: added /date switch to !define for
+ definition of date and time constants
- * Contrib/Modern UI/Language files/French.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-11-26 18:05 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Include/Library.nsh: applied patch #1044212 with some
+ changes to make it optional
- * Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Swedish.nsh: added another version of
- MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-11-26 17:18 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ added /x switch for File and ReserveFile to exclude files and
+ directories
- * Contrib/Modern UI/Language files/Greek.nsh: added another version
- of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE (patch #1075188)
+2004-11-26 15:44 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: * use
+ new dir_reader
+ * only warn once about /a on POSIX
+ * made /R search for matches inside subdirectories even wildcards
+ were not used
- * Contrib/Modern UI/Language files/SimpChinese.nsh: * added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE * translation improvements
+2004-11-26 15:37 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Source/dirreader.cpp, /NSIS/trunk/Source/dirreader.h,
+ /NSIS/trunk/Source/makenssi.dsp: new interface for reading
+ directories which helps getting some preprocessor clutter outside
+ of script.cpp
- * Docs/src/history.but: update
+2004-11-26 15:26 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: added
+ get_file_name which extracts the file name from a path
- * Contrib/ExDLL/exdll.h: some consts
+2004-11-26 10:17 kichik
-2004-11-30 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: better description for Icon
+ and UninstallIcon
- * Source/build.cpp, Source/makenssi.cpp, Source/util.cpp,
- Source/util.h: fixed bug #1075363 - nsisconf.nsh not included when
- using makensisw
+2004-11-25 22:31 kichik
-2004-11-29 ramon18
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed bug #1073363 - keyboard
+ navigation in MUI_PAGE_INSTFILES
+ keyboard navigation doesn't work while the focus is set on a
+ disabled control
- * Contrib/Modern UI/Language files/Portuguese.nsh: updated
- Portuguese.nsh
+2004-11-23 20:10 kichik
-2004-11-27 kichik
+ * /NSIS/trunk/Docs/src/usection.but, /NSIS/trunk/Docs/src/var.but:
+ added information about $INSTDIR not having the same value in
+ installer and uninstaller
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: added another
- version of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-11-20 20:11 joostverburg
-2004-11-27 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: button text
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/StartMenu.nsi,
- Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.72 * Fixed state
- of Finish page Cancel button when both an installer and uninstaller
- page is included
+2004-11-20 15:23 kichik
-2004-11-27 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: made the gradient background
+ window not pretend to be the installer dialog so the "unpacking"
+ window will show even if it is used
- * Menu/images/header.gif: 2.02->2.03
+2004-11-19 20:21 kichik
-2004-11-27 joostverburg
+ * /NSIS/trunk/Source/build.cpp: added NSIS_LZMA_COMPRESS_WHOLE to
+ the script define list
- * Contrib/Modern UI/Language files/Dutch.nsh: added another version
- of MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-11-19 15:11 kichik
-2004-11-27 kichik
+ * /NSIS/trunk/Docs/src/compiler.but: fixed description of
+ ${__TIME__}, ${__DATE__} and ${__TIMESTAMP__}
- * Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/Hebrew.nsh: added another version of
- MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO for
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-11-19 15:02 kichik
-2004-11-27 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed an access violation in case
+ of a script jump beyond the last entry
- * Source/build.cpp: added NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE to
- the script define list
+2004-11-19 14:38 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Docs/src/usage.but, /NSIS/trunk/Source/makenssi.cpp:
+ better description of command line usage (bug report #1065322)
- * Source/dirreader.cpp: use stat to find out if the file is a
- directory or not since it's more portable
+2004-11-19 13:45 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: more of patch #1055553 -
+ Absolute path of *.nsi not accepted on posix (-- separator
+ between options and files for posix)
- * Source/dirreader.cpp: * diropen, dirread -> opendir, readdir *
- fixed warnings
+2004-11-19 12:09 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Docs/src/basic.but: added information about
+ SetOutPath and RMDir
- * Source/Makefile: added dirreader.cpp and updated dependencies
+2004-11-19 11:48 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Docs/src/basic.but: better description for
+ ReserveFile
- * Source/build.h, Source/script.cpp: fixed compile error under
- gcc-2.95
+2004-11-13 19:33 joostverburg
-2004-11-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh:
+ corrected uninstaller finish page text
- * !InstallNSIS.bat, Docs/src/history.but, Examples/makensis.nsi,
- Source/makenssi.cpp, Source/script.cpp: 2.02->2.03
+2004-11-12 22:08 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Docs/src/library.but: added a warning about deploying
+ DLLs from the system directory
- * Docs/src/defines.but, Source/script.cpp, Source/tokens.cpp: added
- /date switch to !define for definition of date and time constants
+2004-11-12 13:58 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Source/Platform.h: applied patch #1055553 (with some
+ changes) - Absolute path of *.nsi not accepted on posix
- * Docs/src/library.but, Include/Library.nsh: applied patch #1044212
- with some changes to make it optional
+2004-11-12 13:58 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: * applied patch #1055553 (with
+ some changes) - Absolute path of *.nsi not accepted on posix
+ * updated license line breaking to fit better
+ * added /VERSION to the usage information text
- * Docs/src/basic.but, Source/build.h, Source/script.cpp,
- Source/tokens.cpp: added /x switch for File and ReserveFile to
- exclude files and directories
+2004-11-11 21:28 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ Only use the GetModuleHandle trick for plug-ins, otherwise just
+ load and unload. If RegDLL uses /NOUNLOAD, unloading will be
+ skipped, but GetModuleHandle won't be used.
- * Source/build.h, Source/script.cpp: * use new dir_reader * only
- warn once about /a on POSIX * made /R search for matches inside
- subdirectories even wildcards were not used
+2004-11-11 20:34 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Always increase the load count
+ of registered dlls if /NOUNLOAD is not specified. This should fix
+ some problems with registering many COM dlls in a row.
- * Source/makenssi.dsp, Source/dirreader.cpp, Source/dirreader.h:
- new interface for reading directories which helps getting some
- preprocessor clutter outside of script.cpp
+2004-11-11 19:10 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed bug #1064540 - warning
+ 'label "installlib.remove_..." not used'
- * Source/util.cpp, Source/util.h: added get_file_name which
- extracts the file name from a path
+2004-11-09 20:21 kichik
-2004-11-26 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: added /FINAL to
+ SetCompressor
- * Docs/src/attributes.but: better description for Icon and
- UninstallIcon
+2004-10-26 14:57 joostverburg
-2004-11-26 kichik
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: removed trailing
+ space after string
- * Source/exehead/Ui.c: fixed bug #1073363 - keyboard navigation in
- MUI_PAGE_INSTFILES keyboard navigation doesn't work while the focus
- is set on a disabled control
+2004-10-25 23:34 kichik
-2004-11-23 kichik
+ * /NSIS/trunk/Source/script.cpp: include unistd.h for chdir()
- * Docs/src/usection.but, Docs/src/var.but: added information about
- $INSTDIR not having the same value in installer and uninstaller
+2004-10-25 21:34 kichik
-2004-11-20 joostverburg
+ * /NSIS/trunk/Examples/cvsdata.nsi: use File /r instead of a macro
+ for each directory so no updating will be required each time a
+ directory is added
- * Contrib/Language files/Italian.nlf: button text
+2004-10-25 17:51 kichik
-2004-11-20 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: include unistd.h for chdir()
- * Source/exehead/Ui.c: made the gradient background window not
- pretend to be the installer dialog so the "unpacking" window will
- show even if it is used
+2004-10-24 13:10 joostverburg
-2004-11-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: fixes
- * Source/build.cpp: added NSIS_LZMA_COMPRESS_WHOLE to the script
- define list
+2004-10-24 11:04 joostverburg
-2004-11-19 kichik
+ * /NSIS/trunk/Examples/cvsdata.nsi: added new folders
- * Docs/src/compiler.but: fixed description of ${__TIME__},
- ${__DATE__} and ${__TIMESTAMP__}
+2004-10-23 19:24
-2004-11-19 kichik
+ * /NSIS/tags/v202, /NSIS/tags/v202/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v202/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v202/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v202/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v202/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v202/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v202/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v202/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v202/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v202/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v202/Contrib/zip2exe,
+ /NSIS/tags/v202/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v202/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v202/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v202/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v202/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v202/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v202/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v202/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v202/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v202/Menu, /NSIS/tags/v202/Source/exehead/bin2h.exe,
+ /NSIS/tags/v202/Source/exehead/uninst.ico,
+ /NSIS/tags/v202/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v202'.
- * Source/build.cpp: fixed an access violation in case of a script
- jump beyond the last entry
+2004-10-23 19:24 joostverburg
-2004-11-19 kichik
+ * /NSIS/trunk/Menu/images/header.gif: 2.02
- * Docs/src/usage.but, Source/makenssi.cpp: better description of
- command line usage (bug report #1065322)
+2004-10-23 17:43 kichik
-2004-11-19 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.c,
+ /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h, /NSIS/trunk/TODO.txt:
+ Added another parameter to plug-in functions. This parameter is a
+ structure with pointers to exec_flags and ExecuteCodeSegment.
+ This is backward compatible with older plug-ins because plug-in
+ functions use the __cdecl calling convention which means NSIS
+ clears the stack.
- * Source/makenssi.cpp: more of patch #1055553 - Absolute path of
- *.nsi not accepted on posix (-- separator between options and files
- for posix)
+2004-10-23 09:50 kichik
-2004-11-19 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: added Source\boost
- * Docs/src/basic.but: added information about SetOutPath and RMDir
+2004-10-23 09:31 kichik
-2004-11-19 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: added Source\Tests
- * Docs/src/basic.but: better description for ReserveFile
+2004-10-23 09:21 kichik
-2004-11-13 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: updated release date
- * Contrib/Modern UI/Language files/German.nsh: corrected
- uninstaller finish page text
+2004-10-23 09:09 kichik
-2004-11-13 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: removed double parenthesis
- * Docs/src/library.but: added a warning about deploying DLLs from
- the system directory
+2004-10-22 23:52 kichik
-2004-11-12 kichik
+ * /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ StrFunc 1.09 by deguix:
+ - Fixed stack problems involving: StrCase, StrRep, StrSort,
+ StrTok.
+ - Fixed StrClb: When "Action" = "<>", handle was wrongly outputed
+ as text.
+ - Fixed StrSort, StrStrAdv documentation examples.
+ - Fixed StrIOToNSIS, StrLoc, StrNSISToIO, StrRep, StrStr:
+ sometimes didn't find "StrToSearch" at all.
- * Source/Platform.h: applied patch #1055553 (with some changes) -
- Absolute path of *.nsi not accepted on posix
+2004-10-22 11:36 kichik
-2004-11-12 kichik
+ * /NSIS/trunk/Docs/src/tutorial.but: dollar should come before the
+ backslash when escaping quotes
- * Source/makenssi.cpp: * applied patch #1055553 (with some changes)
- - Absolute path of *.nsi not accepted on posix * updated license
- line breaking to fit better * added /VERSION to the usage
- information text
+2004-10-21 21:32 kichik
-2004-11-11 kichik
+ * /NSIS/trunk/Docs/src/int.but: updated changelog
- * Source/script.cpp, Source/exehead/exec.c: Only use the
- GetModuleHandle trick for plug-ins, otherwise just load and unload.
- If RegDLL uses /NOUNLOAD, unloading will be skipped, but
- GetModuleHandle won't be used.
+2004-10-21 21:31 kichik
-2004-11-11 kichik
+ * /NSIS/trunk/Docs/src/history.but: added changelog for 2.02
- * Source/exehead/exec.c: Always increase the load count of
- registered dlls if /NOUNLOAD is not specified. This should fix some
- problems with registering many COM dlls in a row.
+2004-10-21 19:08 kichik
-2004-11-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: updated changelog
- * Include/Library.nsh: fixed bug #1064540 - warning 'label
- "installlib.remove_..." not used'
+2004-10-21 16:39 joostverburg
-2004-11-09 kichik
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh:
+ fixes
- * Docs/src/compilerflags.but: added /FINAL to SetCompressor
+2004-10-21 16:30 kichik
-2004-10-26 joostverburg
+ * /NSIS/trunk/Docs/src/intro.but: double and
- * Contrib/Language files/Italian.nlf: removed trailing space after
- string
+2004-10-19 17:51 flizebogen
-2004-10-26 kichik
+ * /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but: Fixed some typos
- * Source/script.cpp: include unistd.h for chdir()
+2004-10-18 23:05 kichik
-2004-10-25 kichik
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ 2.01->2.02
- * Examples/cvsdata.nsi: use File /r instead of a macro for each
- directory so no updating will be required each time a directory is
- added
+2004-10-15 20:52 kichik
-2004-10-25 kichik
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: added ClearErrors
+ so errors that occurred before RMDir won't be caught
- * Source/makenssi.cpp: include unistd.h for chdir()
+2004-10-15 03:59 oripel
-2004-10-24 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Using new resource management
+ syntax, e.g. MANAGE_WITH(buffer, free)
- * Contrib/Language files/Polish.nlf, Contrib/Modern UI/Language
- files/Polish.nsh: fixes
+2004-10-15 03:58 oripel
-2004-10-24 joostverburg
+ * /NSIS/trunk/Source/util.h: Reworked the ResourceManager concepts
- * Examples/cvsdata.nsi: added new folders
+2004-10-15 03:40 oripel
-2004-10-23 joostverburg
+ * /NSIS/trunk/Source/boost,
+ /NSIS/trunk/Source/boost/checked_delete.hpp,
+ /NSIS/trunk/Source/boost/detail,
+ /NSIS/trunk/Source/boost/detail/workaround.hpp,
+ /NSIS/trunk/Source/boost/scoped_array.hpp,
+ /NSIS/trunk/Source/boost/scoped_ptr.hpp: Imported and modified
+ some sources from Boost (http://www.boost.org)
- * Menu/images/header.gif: 2.02
+2004-10-15 03:23 oripel
-2004-10-23 kichik
+ * /NSIS/trunk/Source/lineparse.cpp: Added missing #include
+ "Platform.h"
- * TODO.txt, Contrib/ExDLL/exdll.c, Contrib/ExDLL/exdll.h,
- Source/exehead/exec.c, Source/exehead/fileform.h: Added another
- parameter to plug-in functions. This parameter is a structure with
- pointers to exec_flags and ExecuteCodeSegment. This is backward
- compatible with older plug-ins because plug-in functions use the
- __cdecl calling convention which means NSIS clears the stack.
+2004-10-14 21:34 kichik
-2004-10-23 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: added a comment
- * Examples/makensis.nsi: added Source\boost
+2004-10-14 21:33 kichik
-2004-10-23 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: size optimizations
- * Examples/makensis.nsi: added Source\Tests
+2004-10-14 15:43 joostverburg
-2004-10-23 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: The selected language
+ is only stored in the registry when installation was succesful
- * !InstallNSIS.bat: 2.02
+2004-10-14 13:56 kichik
-2004-10-23 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/uninstall.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp:
+ made the Reboot command first quit and then reboot
+ - fixed bug #989690
+ - the installer now denies reboots while running
+ - the Reboot instruction no longer returns or sets the error flag
+ - added .onRebootFailed which is called when Reboot fails
+ - installer should now always clean-up when rebooting
- * Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- NSIS.chm, Docs/AppendixE.html, Docs/Chapter1.html,
- Docs/Chapter2.html, Docs/Chapter3.html, Docs/Chapter4.html,
- Docs/Chapter5.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, makensis.exe: compiled latest changes
+2004-10-13 18:39 kichik
-2004-10-23 kichik
+ * /NSIS/trunk/Docs/src/var.but: link to .onInit
- * Docs/src/history.but: updated release date
+2004-10-13 16:58 kichik
-2004-10-23 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exedata.cpp,
+ /NSIS/trunk/Source/exedata.h: renamed exeheader_size to
+ exehead_original_size
- * Docs/src/attributes.but: removed double parenthesis
+2004-10-12 22:59 kichik
-2004-10-23 kichik
+ * /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ StrFunc 1.08 by deguix:
+ - Converted all the functions to LogicLib.
+ - StrSort: Totally remade and it can break old scripts. See
+ documentation for details.
+ - Added defines: StrFunc_List, *_List and *_TypeList.
+ - Fixed StrStrAdv: Variables $R0-$R3 couldn't be used on scripts
+ before calling.
+ - StrRep: Cut down some variables.
+ - Arranged correctly the order of StrSort on the documentation.
- * Examples/StrFunc.nsi, Include/StrFunc.nsh, Include/StrFunc.txt:
- StrFunc 1.09 by deguix: - Fixed stack problems involving: StrCase,
- StrRep, StrSort, StrTok. - Fixed StrClb: When "Action" = "<>",
- handle was wrongly outputed as text. - Fixed StrSort, StrStrAdv
- documentation examples. - Fixed StrIOToNSIS, StrLoc, StrNSISToIO,
- StrRep, StrStr: sometimes didn't find "StrToSearch" at all.
+2004-10-12 22:44 kichik
-2004-10-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: case
+ change for language name
- * Docs/src/tutorial.but: dollar should come before the backslash
- when escaping quotes
+2004-10-12 22:40 kichik
-2004-10-21 kichik
+ * /NSIS/trunk/Source/exehead/Makefile: some more cross compiler
+ prefixes
- * Docs/src/int.but: updated changelog
+2004-10-12 21:27 kichik
-2004-10-21 kichik
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h:
+ moved implementation of PluginsList into Plugins.cpp
- * Docs/src/history.but: added changelog for 2.02
+2004-10-12 21:22 kichik
-2004-10-21 kichik
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h: moved
+ implementation of LangStringList and StringsArray into lang.cpp
- * Contrib/Modern UI/Readme.html: updated changelog
+2004-10-12 21:05 kichik
-2004-10-21 joostverburg
+ * /NSIS/trunk/Source/Makefile, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/ShConstants.cpp,
+ /NSIS/trunk/Source/ShConstants.h: moved implementation of
+ ConstantsStringList into ShConstants.cpp
- * Contrib/Language files/SimpChinese.nlf, Contrib/Modern
- UI/Language files/SimpChinese.nsh: fixes
+2004-10-12 21:01 kichik
-2004-10-21 kichik
+ * /NSIS/trunk/Source/lang.h: missing includes
- * Docs/src/intro.but: double and
+2004-10-12 20:56 kichik
-2004-10-19 flizebogen
+ * /NSIS/trunk/TODO.txt: smart relative jumps is done
- * Docs/src/intro.but, Docs/src/tutorial.but,
- Docs/src/usefulfunc.but: Fixed some typos
+2004-10-12 20:26 kichik
-2004-10-19 kichik
+ * /NSIS/trunk/Source/strlist.h: int to size_t
- * Examples/makensis.nsi, Source/makenssi.cpp, Source/script.cpp,
- makensis.exe: 2.01->2.02
+2004-10-12 20:09 kichik
-2004-10-15 kichik
+ * /NSIS/trunk/Source/script.cpp: silly typo fixed
- * Examples/Modern UI/StartMenu.nsi: added ClearErrors so errors
- that occurred before RMDir won't be caught
+2004-10-12 19:57 kichik
-2004-10-15 oripel
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.h: tabs to
+ spaces
- * Source/script.cpp: Using new resource management syntax, e.g.
- MANAGE_WITH(buffer, free)
+2004-10-11 21:26 oripel
-2004-10-15 oripel
+ * /NSIS/trunk/Source/exehead/Makefile: Added support for different
+ prefixes for gcc on non-Windows platforms
- * Source/util.h: Reworked the ResourceManager concepts
+2004-10-11 21:25 oripel
-2004-10-15 oripel
+ * /NSIS/trunk/Source/util.h: Added template class ResourceManager
+ and friends
- * Source/boost/checked_delete.hpp, Source/boost/scoped_array.hpp,
- Source/boost/scoped_ptr.hpp, Source/boost/detail/workaround.hpp:
- Imported and modified some sources from Boost
- (http://www.boost.org)
+2004-10-11 21:24 oripel
-2004-10-15 oripel
+ * /NSIS/trunk/Source/util.cpp: Added missing #include statements
+ for Linux
- * Source/lineparse.cpp: Added missing #include "Platform.h"
+2004-10-11 21:24 oripel
-2004-10-14 kichik
+ * /NSIS/trunk/Source/script.cpp: Liberal use of ResourceManager
- * Source/exehead/exec.c: added a comment
+2004-10-11 21:21 oripel
-2004-10-14 kichik
+ * /NSIS/trunk/Source/mmap.h: added missing #include statement for
+ Linux
- * Source/exehead/Ui.c: size optimizations
+2004-10-11 21:20 oripel
-2004-10-14 joostverburg
+ * /NSIS/trunk/Source/Makefile: - added target 'depend' using
+ makedepend
+ - object files are placed in $(BUILDDIR)
+ - OBJS is calculated from SRCS
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/System.nsh:
- The selected language is only stored in the registry when
- installation was succesful
+2004-10-11 14:54 joostverburg
-2004-10-14 kichik
+ * /NSIS/trunk/Contrib/Language files/Albanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Albanian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Albanian
+ language files by Besnik Bleta
- * Docs/src/attributes.but, Docs/src/callback.but,
- Docs/src/reboot.but, Docs/src/uninstall.but, Source/build.cpp,
- Source/script.cpp, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.h: made the Reboot
- command first quit and then reboot - fixed bug #989690 - the
- installer now denies reboots while running - the Reboot
- instruction no longer returns or sets the error flag - added
- .onRebootFailed which is called when Reboot fails - installer
- should now always clean-up when rebooting
+2004-10-11 14:26 kichik
-2004-10-13 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.cpp, /NSIS/trunk/Source/clzma.h,
+ /NSIS/trunk/Source/compressor.h, /NSIS/trunk/Source/czlib.h:
+ added dict_size parameter to Compressor::Init() so a cast to
+ CLZMA won't be required to pass a dictionary size
- * Docs/src/var.but: link to .onInit
+2004-10-11 14:23 kichik
-2004-10-13 kichik
+ * /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h: moved implementation of
+ CVersionStrigList into ResourceVersionInfo.cpp
- * Source/build.cpp, Source/exedata.cpp, Source/exedata.h: renamed
- exeheader_size to exehead_original_size
+2004-10-11 11:45 kichik
-2004-10-13 kichik
+ * /NSIS/trunk/Source/lineparse.cpp, /NSIS/trunk/Source/lineparse.h,
+ /NSIS/trunk/Source/Makefile, /NSIS/trunk/Source/makenssi.dsp:
+ moved implementation of LineParser into lineparse.cpp
- * Examples/StrFunc.nsi, Include/StrFunc.nsh, Include/StrFunc.txt:
- StrFunc 1.08 by deguix: - Converted all the functions to LogicLib.
- - StrSort: Totally remade and it can break old scripts. See
- documentation for details. - Added defines: StrFunc_List, *_List
- and *_TypeList. - Fixed StrStrAdv: Variables $R0-$R3 couldn't be
- used on scripts before calling. - StrRep: Cut down some
- variables. - Arranged correctly the order of StrSort on the
- documentation.
+2004-10-11 10:32 kichik
-2004-10-13 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: call SHChangeNotify after
+ changing file associations
- * Contrib/Modern UI/Language files/Russian.nsh: case change for
- language name
+2004-10-10 20:58 kichik
-2004-10-13 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.cpp, /NSIS/trunk/Source/clzma.h,
+ /NSIS/trunk/Source/compressor.h, /NSIS/trunk/Source/czlib.h,
+ /NSIS/trunk/Source/Makefile, /NSIS/trunk/Source/makenssi.dsp:
+ moved implementation of CLZMA into clzma.cpp
- * Source/exehead/Makefile: some more cross compiler prefixes
+2004-10-10 18:41 kichik
-2004-10-12 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/int.but, /NSIS/trunk/Docs/src/labels.but,
+ /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Docs/src/log.but, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/registry.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/stack.but, /NSIS/trunk/Docs/src/string.but,
+ /NSIS/trunk/Docs/src/ui.but, /NSIS/trunk/Docs/src/uninstall.but,
+ /NSIS/trunk/Docs/src/usage.but: added small usage examples
- * Source/Plugins.cpp, Source/Plugins.h: moved implementation of
- PluginsList into Plugins.cpp
+2004-10-10 18:17 kichik
-2004-10-12 kichik
+ * /NSIS/trunk/Source/script.cpp: removed extra %s from
+ TOK_GETCURRENTADDR
- * Source/lang.cpp, Source/lang.h: moved implementation of
- LangStringList and StringsArray into lang.cpp
+2004-10-10 17:51 joostverburg
-2004-10-12 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed type library
+ uninstallation
- * Source/Makefile, Source/ShConstants.cpp, Source/ShConstants.h,
- Source/makenssi.dsp: moved implementation of ConstantsStringList
- into ShConstants.cpp
+2004-10-10 16:57 joostverburg
-2004-10-12 kichik
+ * /NSIS/trunk/Include/Library.nsh: fixed parameter name
- * Source/lang.h: missing includes
+2004-10-10 16:32 joostverburg
-2004-10-12 kichik
+ * /NSIS/trunk/Docs/src/library.but: fixed parameter name
- * TODO.txt: smart relative jumps is done
+2004-10-10 14:50 kichik
-2004-10-12 kichik
+ * /NSIS/trunk/Contrib/Banner/Banner.c: - tabs to spaces
+ - removed obsolete commented code
- * Source/strlist.h: int to size_t
+2004-10-10 00:53 ramon18
-2004-10-12 kichik
+ * /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Plugins/Banner.dll: #1042367 - Banner fixed for bug
+ 1022399 now hangs, code simplified on banner destroy
- * Source/script.cpp: silly typo fixed
+2004-10-02 18:26 kichik
-2004-10-12 kichik
+ * /NSIS/trunk/Source/Tests/mmap.cpp,
+ /NSIS/trunk/Source/Tests/Tests.dsp: use mmap.cpp instead of
+ strlist.h
- * Source/script.cpp, Source/util.h: tabs to spaces
+2004-10-02 18:04 kichik
-2004-10-11 oripel
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exedata.cpp, /NSIS/trunk/Source/exedata.h,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-lzma.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/exehead/Makefile,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.h:
+ refactoring:
+ - added CEXEBuild::update_exehead() and made everyone use it
+ - renamed some variables (of the *exeheader* variety)
+ bug fix:
+ - uninstaller CRC-check failed if !packhdr created a
+ non-512-bytes-aligned exehead
- * Source/exehead/Makefile: Added support for different prefixes for
- gcc on non-Windows platforms
+2004-10-02 15:17 kichik
-2004-10-11 oripel
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/growbuf.cpp, /NSIS/trunk/Source/growbuf.h,
+ /NSIS/trunk/Source/Makefile, /NSIS/trunk/Source/mmap.cpp,
+ /NSIS/trunk/Source/mmap.h, /NSIS/trunk/Source/strlist.cpp,
+ /NSIS/trunk/Source/strlist.h, /NSIS/trunk/Source/util.cpp:
+ refactoring: split strlist.h classes into separate {h,cpp} files
- * Source/util.h: Added template class ResourceManager and friends
+2004-10-02 13:07 kichik
-2004-10-11 oripel
+ * /NSIS/trunk/Source/Tests/mmap.cpp,
+ /NSIS/trunk/Source/Tests/Tests.dsp: MMapFile test
- * Source/util.cpp: Added missing #include statements for Linux
+2004-10-01 21:15 kichik
-2004-10-11 oripel
+ * /NSIS/trunk/Source/exehead/Main.c: both _=? and /D= now require a
+ space before them so they can safely remove the space from
+ $CMDLINE
- * Source/script.cpp: Liberal use of ResourceManager
+2004-10-01 19:52 kichik
-2004-10-11 oripel
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: - converted ctime_r to ctime for
+ better portability
+ - more refactoring
- * Source/mmap.h: added missing #include statement for Linux
+2004-10-01 13:14 kichik
-2004-10-11 oripel
+ * /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Plugins/Banner.dll: - fixed bug #1022399 - Only
+ initial banner is in foreground
+ - added a few more checks
- * Source/Makefile: - added target 'depend' using makedepend -
- object files are placed in $(BUILDDIR) - OBJS is calculated from
- SRCS
+2004-10-01 11:18 kichik
-2004-10-11 joostverburg
+ * /NSIS/trunk/Source/clzma.h: #include <pthread.h>
- * Contrib/Language files/Albanian.nlf, Contrib/Modern UI/Language
- files/Albanian.nsh, Examples/Modern UI/MultiLanguage.nsi: Albanian
- language files by Besnik Bleta
+2004-10-01 09:57 kichik
-2004-10-11 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed bug #1038255 - CopyFiles
+ usage checking problem
- * Source/build.cpp, Source/cbzip2.h, Source/clzma.cpp,
- Source/clzma.h, Source/compressor.h, Source/czlib.h: added
- dict_size parameter to Compressor::Init() so a cast to CLZMA won't
- be required to pass a dictionary size
+2004-10-01 09:45 kichik
-2004-10-11 kichik
+ * /NSIS/trunk/Source/Platform.h: define DS_SHELLFONT for win32 too
- * Source/ResourceVersionInfo.cpp, Source/ResourceVersionInfo.h:
- moved implementation of CVersionStrigList into
- ResourceVersionInfo.cpp
+2004-09-30 22:47 kichik
-2004-10-11 kichik
+ * /NSIS/trunk/Source/strlist.h: only close file handle once in
+ MMapFile::clear()
- * Source/lineparse.h, Source/lineparse.cpp, Source/makenssi.dsp,
- Source/Makefile: moved implementation of LineParser into
- lineparse.cpp
+2004-09-30 22:46 kichik
-2004-10-11 kichik
+ * /NSIS/trunk/Source/script.cpp: dir in do_add_files can be "." on
+ windows too
- * Examples/makensis.nsi: call SHChangeNotify after changing file
- associations
+2004-09-30 22:07 kichik
-2004-10-10 kichik
+ * /NSIS/trunk/Source/Tests/Tests.dsp: updated
- * Source/Makefile, Source/build.cpp, Source/cbzip2.h,
- Source/clzma.cpp, Source/clzma.h, Source/compressor.h,
- Source/czlib.h, Source/makenssi.dsp: moved implementation of CLZMA
- into clzma.cpp
+2004-09-30 20:25 kichik
-2004-10-10 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: more
+ refactoring
- * Docs/src/attributes.but, Docs/src/basic.but,
- Docs/src/compiler.but, Docs/src/compilerflags.but,
- Docs/src/defines.but, Docs/src/file.but, Docs/src/flowcontrol.but,
- Docs/src/functions.but, Docs/src/generalpurpose.but,
- Docs/src/int.but, Docs/src/labels.but, Docs/src/langs.but,
- Docs/src/library.but, Docs/src/log.but, Docs/src/misc.but,
- Docs/src/pages.but, Docs/src/reboot.but, Docs/src/registry.but,
- Docs/src/sections.but, Docs/src/stack.but, Docs/src/string.but,
- Docs/src/ui.but, Docs/src/uninstall.but, Docs/src/usage.but: added
- small usage examples
+2004-09-30 18:50 kichik
-2004-10-10 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: updated some comments
- * Source/script.cpp: removed extra %s from TOK_GETCURRENTADDR
+2004-09-30 18:49 kichik
-2004-10-10 joostverburg
+ * /NSIS/trunk/Source/util.h: added endian macros
- * Include/Library.nsh: fixed type library uninstallation
+2004-09-30 18:48 kichik
-2004-10-10 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/strlist.h: refactoring
- * Include/Library.nsh: fixed parameter name
+2004-09-30 18:36 kichik
-2004-10-10 joostverburg
+ * /NSIS/trunk/Source/makenssi.dsw, /NSIS/trunk/Source/Tests,
+ /NSIS/trunk/Source/Tests/endian.cpp,
+ /NSIS/trunk/Source/Tests/Tests.dsp,
+ /NSIS/trunk/Source/Tests/textrunner.cpp: first-ever CppUnit unit
+ tests
- * Docs/src/library.but: fixed parameter name
+2004-09-30 13:15 kichik
-2004-10-10 kichik
+ * /NSIS/trunk/Source/Makefile: added DEBUG and PROFILING flags
- * Contrib/Banner/Banner.c: - tabs to spaces - removed obsolete
- commented code
+2004-09-30 11:20 kichik
-2004-10-10 ramon18
+ * /NSIS/trunk/Source/build.cpp: fixed unsigned/signed comparison
+ warning
- * Contrib/Banner/Banner.c: #1042367 - Banner fixed for bug 1022399
- now hangs, code simplified on banner destroy
+2004-09-30 10:37 kichik
-2004-10-02 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: case
+ change for language name
- * Source/Tests/Tests.dsp, Source/Tests/mmap.cpp: use mmap.cpp
- instead of strlist.h
+2004-09-29 16:36 kichik
-2004-10-02 kichik
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: fixes
- * Source/build.cpp, Source/build.h, Source/exedata.cpp,
- Source/exedata.h, Source/makenssi.cpp, Source/makenssi.dsp,
- Source/script.cpp, Source/util.h, Source/exehead/Makefile,
- Source/exehead/exehead-bzip2.dsp, Source/exehead/exehead-lzma.dsp,
- Source/exehead/exehead-zlib.dsp: refactoring: - added
- CEXEBuild::update_exehead() and made everyone use it - renamed
- some variables (of the *exeheader* variety) bug fix: - uninstaller
- CRC-check failed if !packhdr created a non-512-bytes-aligned
- exehead
+2004-09-28 21:25 kichik
-2004-10-02 kichik
+ * /NSIS/trunk/Docs/src/int.but: added shl and shr to IntOp
- * Source/Makefile, Source/build.cpp, Source/build.h,
- Source/growbuf.cpp, Source/growbuf.h, Source/mmap.cpp,
- Source/mmap.h, Source/strlist.cpp, Source/strlist.h,
- Source/util.cpp: refactoring: split strlist.h classes into separate
- {h,cpp} files
+2004-09-25 18:05 kichik
-2004-10-02 kichik
+ * /NSIS/trunk/Source/exehead/util.c: fixed gcc 3.4 compile errors
- * Source/Tests/mmap.cpp, Source/Tests/Tests.dsp: MMapFile test
+2004-09-25 14:56 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: added information about
+ uninstallers and error levels
- * Source/exehead/Main.c: both _=? and /D= now require a space
- before them so they can safely remove the space from $CMDLINE
+2004-09-25 14:56 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: return 0 if the uninstaller
+ was successfully copied and executed, not -1
- * Source/build.cpp, Source/makenssi.cpp, Source/script.cpp,
- Source/util.cpp, Source/util.h: - converted ctime_r to ctime for
- better portability - more refactoring
+2004-09-25 13:35 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Docs/src/jumps.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp:
+ relative jumps now work with instructions that add multiple
+ entries (including plug-in calls)
- * Contrib/Banner/Banner.c: - fixed bug #1022399 - Only initial
- banner is in foreground - added a few more checks
+2004-09-25 11:22 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/Ui.c: added
+ NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- * Source/clzma.h: #include <pthread.h>
+2004-09-25 10:49 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: -
+ added GetErrorLevel and SetErrorLevl
+ - fixed some inconsistencies in the error levels the
+ installer/uninstaller set
- * Source/script.cpp: fixed bug #1038255 - CopyFiles usage checking
- problem
+2004-09-25 10:09 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h: added a
+ cache to the datablock optimizer so it wouldn't need to read the
+ entire datablock to find its optimizations
- * Source/Platform.h: define DS_SHELLFONT for win32 too
+2004-09-24 14:32
-2004-10-01 kichik
+ * /NSIS/tags/v201, /NSIS/tags/v201/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v201/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v201/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v201/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v201/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v201/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v201/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v201/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v201/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v201/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v201/Contrib/zip2exe,
+ /NSIS/tags/v201/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v201/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v201/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v201/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v201/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v201/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v201/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v201/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v201/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v201/Source/exehead/bin2h.exe,
+ /NSIS/tags/v201/Source/exehead/uninst.ico,
+ /NSIS/tags/v201/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v201'.
- * Source/strlist.h: only close file handle once in
- MMapFile::clear()
+2004-09-24 14:32 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/script.cpp:
+ fixed compile error on POSIX
- * Source/script.cpp: dir in do_add_files can be "." on windows too
+2004-09-24 14:05 kichik
-2004-10-01 kichik
+ * /NSIS/trunk/Docs/src/history.but: updated history
- * Source/Tests/Tests.dsp: updated
+2004-09-24 13:59 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ String Functions 1.07
+ - StrStrAdv and StrCase have their functions remodeled with
+ LogicLib. Functions have a lesser chance to have bugs.
+ - Added case-sensitive comparation option for StrStrAdv.
+ - StrCase now uses System.dll which makes case convertions
+ effective with all latin letters (i.e. ?).
+ - StrClbSet and StrClbGet removed, added StrClb.
+ - Made compact the most usual operations inside the header file.
+ File size reduced.
+ - Added "!verbose" to header file -> faster compilation and
+ header file output organized (code borrowed from LogicLib.nsh).
- * Source/build.cpp, Source/build.h, Source/util.cpp, Source/util.h:
- more refactoring
+2004-09-24 13:27 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Source/exehead/Makefile: added an optional flag
+ called USE_PRECOMPILED_EXEHEADS
+ set it to 1 to force the makefile to use the precompiled exehead
+ .h files that come with NSIS releases
- * Source/exehead/Ui.c: updated some comments
+2004-09-24 12:58 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: use RegCreateKeyEx instead of
+ RegCreateKey to hopefully solve the 64-bit Windows 2003 Server
+ problem with WriteRegStr
- * Source/util.h: added endian macros
+2004-09-24 12:38 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Contrib/Library/RegTool/RegTool.bin,
+ /NSIS/trunk/Contrib/Library/RegTool/RegTool.nsi,
+ /NSIS/trunk/Include/Library.nsh: Library fixes and improvements:
+ - always register DLL/TLB, even if the installer didn't copy it
+ there
+ - only copy one RegTool and use it to register all of the DLLs
+ and TLBs
+ - extract the RegTool as an .exe so explorer won't complain it
+ doesn't know how to open the file
+ - fixed REGDLLTLB registering just as a TLB
- * Source/build.cpp, Source/build.h, Source/strlist.h: refactoring
+2004-09-24 11:26 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Source/exehead/util.c: don't try to delete a
+ directory after reboot if it's not even valid
- * Source/makenssi.dsw: first-ever CppUnit unit tests
+2004-09-22 16:23 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: fixed a bug in the
+ handling of wCreateDataSize in CDialogTemplate::Save (thanks Sven
+ Ritter)
- * Source/Tests/Tests.dsp, Source/Tests/endian.cpp,
- Source/Tests/textrunner.cpp: first-ever CppUnit unit tests
+2004-09-17 22:53 ramon18
-2004-09-30 kichik
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp: #1008509 - Fixed
+ compilation of plugin NSISdl under VS.NET
- * Source/Makefile: added DEBUG and PROFILING flags
+2004-09-17 16:48 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Source/script.cpp: SetCtlColors /BRANDING wasn't
+ working right, if just one of the background or text color were
+ specified
- * Source/build.cpp: fixed unsigned/signed comparison warning
+2004-09-14 19:26 kichik
-2004-09-30 kichik
+ * /NSIS/trunk/Source/script.cpp: applied patch #1028028 -
+ POSIX-built installers install files w incorrect timestamps.
- * Contrib/Modern UI/Language files/Polish.nsh: case change for
- language name
+2004-09-11 15:44 kichik
-2004-09-29 kichik
+ * /NSIS/trunk/Include/Library.nsh: - fixed "already defined" error
+ - fixed unused label warning
- * Contrib/Language files/Russian.nlf, Contrib/Modern UI/Language
- files/Russian.nsh: fixes
+2004-09-11 11:25 kichik
-2004-09-28 kichik
+ * /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp: implemented GetDLLVersionLocal for
+ non Win32 platforms
- * Docs/src/int.but: added shl and shr to IntOp
+2004-09-10 21:09 joostverburg
-2004-09-25 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ corrected spelling of "Welcome" (patch 1026048)
- * Source/exehead/util.c: fixed gcc 3.4 compile errors
+2004-09-10 13:54 kichik
-2004-09-25 kichik
+ * /NSIS/trunk/Docs/src/compiler.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but: typos
- * Docs/src/usefulinfos.but: added information about uninstallers
- and error levels
+2004-09-09 17:19 kichik
-2004-09-25 kichik
+ * /NSIS/trunk/Docs/src/langs.but: typo
- * Source/exehead/Main.c: return 0 if the uninstaller was
- successfully copied and executed, not -1
+2004-09-07 19:50 kichik
-2004-09-25 kichik
+ * /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c,
+ /NSIS/trunk/Plugins/VPatch.dll: close all open file handles when
+ one of them fail to open
- * Docs/src/jumps.but, Source/build.cpp, Source/build.h,
- Source/script.cpp: relative jumps now work with instructions that
- add multiple entries (including plug-in calls)
+2004-09-05 12:21 joostverburg
-2004-09-25 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: filename corrections
- * Source/exehead/Ui.c, Source/exehead/config.h: added
- NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+2004-09-04 14:26 joostverburg
-2004-09-25 kichik
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: fixes
- * Docs/src/misc.but, Docs/src/usefulinfos.but,
- Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/fileform.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: - added GetErrorLevel and SetErrorLevl - fixed
- some inconsistencies in the error levels the installer/uninstaller
- set
+2004-09-03 13:14 kichik
-2004-09-25 kichik
+ * /NSIS/trunk/Contrib/Banner/Example.nsi: 1*2000 is not 1000
- * Source/build.cpp, Source/build.h: added a cache to the datablock
- optimizer so it wouldn't need to read the entire datablock to find
- its optimizations
+2004-09-03 13:13 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Contrib/Banner/Readme.txt: three functions, not two
- * Source/Platform.h, Source/script.cpp: fixed compile error on
- POSIX
+2004-09-03 12:52 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: don't forward WM_COMMAND if it
+ was handled
- * Docs/AppendixB.html, Docs/AppendixD.html, Docs/AppendixE.html,
- Docs/Chapter4.html, NSIS.chm, Docs/Chapter5.html, makensis.exe:
- latest changes
+2004-09-02 21:07 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Plugins/nsisdl.dll: added /NOIEPROXY (based on
+ memph's code)
- * Docs/src/history.but: updated history
+2004-08-27 08:29 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Source/strlist.h: fixed MMapFile on POSIX, again
- * Examples/StrFunc.nsi, Include/StrFunc.nsh, Include/StrFunc.txt:
- String Functions 1.07 - StrStrAdv and StrCase have their functions
- remodeled with LogicLib. Functions have a lesser chance to have
- bugs. - Added case-sensitive comparation option for StrStrAdv.
- - StrCase now uses System.dll which makes case convertions
- effective with all latin letters (i.e. ?). - StrClbSet and
- StrClbGet removed, added StrClb. - Made compact the most usual
- operations inside the header file. File size reduced. - Added
- "!verbose" to header file -> faster compilation and header file
- output organized (code borrowed from LogicLib.nsh).
+2004-08-23 13:35 eccles
-2004-09-24 kichik
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: LogicLib 2.5
+ - AndIf, AndUnless, OrIf, OrUnless added.
+ - Avoids unused variable warnings by requiring !defines before
+ using certain features.
- * Docs/src/usefulinfos.but, Source/exehead/Makefile: added an
- optional flag called USE_PRECOMPILED_EXEHEADS set it to 1 to force
- the makefile to use the precompiled exehead .h files that come with
- NSIS releases
+2004-08-21 11:04 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Docs/src/history.but: added the bgbg bug to the
+ history
- * Source/exehead/exec.c: use RegCreateKeyEx instead of RegCreateKey
- to hopefully solve the 64-bit Windows 2003 Server problem with
- WriteRegStr
+2004-08-21 10:58 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: link to cross compiling
+ howto
- * Contrib/Library/RegTool/RegTool.bin,
- Contrib/Library/RegTool/RegTool.nsi, Include/Library.nsh: Library
- fixes and improvements: - always register DLL/TLB, even if the
- installer didn't copy it there - only copy one RegTool and use it
- to register all of the DLLs and TLBs - extract the RegTool as an
- .exe so explorer won't complain it doesn't know how to open the
- file - fixed REGDLLTLB registering just as a TLB
+2004-08-21 10:50 kichik
-2004-09-24 kichik
+ * /NSIS/trunk/Source/7zip/Common/Alloc.cpp,
+ /NSIS/trunk/Source/7zip/Common/Alloc.h,
+ /NSIS/trunk/Source/7zip/Common/MyUnknown.h,
+ /NSIS/trunk/Source/7zip/Common/MyWindows.h: fixed bug #1005296 -
+ NSIS build error on Linux with g++ 3.4.0
+ - upgraded to the latest LZMA SDK
- * Source/exehead/util.c: don't try to delete a directory after
- reboot if it's not even valid
+2004-08-20 19:17 kichik
-2004-09-22 kichik
+ * /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMADecoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMADecoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALen.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALen.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALiteral.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALiteral.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/ICoder.h,
+ /NSIS/trunk/Source/7zip/7zip/IMyUnknown.h,
+ /NSIS/trunk/Source/7zip/7zip/IStream.h,
+ /NSIS/trunk/Source/7zip/Common/ComTry.h,
+ /NSIS/trunk/Source/7zip/Common/CRC.cpp,
+ /NSIS/trunk/Source/7zip/Common/CRC.h,
+ /NSIS/trunk/Source/7zip/Common/Defs.h,
+ /NSIS/trunk/Source/7zip/Common/MyCom.h,
+ /NSIS/trunk/Source/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/Common/Types.h,
+ /NSIS/trunk/Source/clzma.h, /NSIS/trunk/Source/Makefile,
+ /NSIS/trunk/Source/makenssi.dsp, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp: fixed bug #1005296 -
+ NSIS build error on Linux with g++ 3.4.0
+ - upgraded to the latest LZMA SDK
- * Source/DialogTemplate.cpp: fixed a bug in the handling of
- wCreateDataSize in CDialogTemplate::Save (thanks Sven Ritter)
+2004-08-20 15:40 kichik
-2004-09-18 ramon18
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: - auto
+ conversion of paths on POSIX platforms - based on patch #1005673
+ - LoadLanguageFile error message improvement
+
+2004-08-20 15:17 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi: case changes for case
+ sensitive platforms
+
+2004-08-20 14:16 kichik
+
+ * /NSIS/trunk/Source/exehead/fileform.c: initialize g_db_hFile with
+ INVALID_HANDLE_VALUE so the handle 0 will not be closed in
+ CleanUp() if loadHeaders() is never called
+
+2004-08-20 14:14 kichik
+
+ * /NSIS/trunk/Source/exehead/Main.c: set NSIS Error title for
+ invalid temporary directory error message
+
+2004-08-19 22:05 eccles
+
+ * /NSIS/trunk/Source/exehead/bgbg.c: request #990249 - Speedup
+ BGGradient painting (was actually a bug)
+
+2004-08-19 21:07 kichik
+
+ * /NSIS/trunk/Source/strlist.h: fixed MMapFile on POSIX
+
+2004-08-18 16:14 kichik
+
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: bug report #1005303 - NSIS build
+ warnings
+
+2004-08-18 15:56 kichik
+
+ * /NSIS/trunk/Contrib/MakeLangId,
+ /NSIS/trunk/Contrib/MakeLangId/MakeLangId.cpp,
+ /NSIS/trunk/Contrib/MakeLangId/MakeLangId.dsp,
+ /NSIS/trunk/Contrib/MakeLangId/MakeLangId.dsw,
+ /NSIS/trunk/Contrib/MakeLangId/resource.h,
+ /NSIS/trunk/Contrib/MakeLangId/resource.rc: Bin\\MakeLangId.exe
+ source code
+
+2004-08-14 17:35 kichik
+
+ * /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C: fixed build warnings
+ (including bug report #1005303 )
+
+2004-08-14 13:45 kichik
+
+ * /NSIS/trunk/Source/DialogTemplate.cpp: throw exception instead of
+ failing silently when iconv fails
+
+2004-08-14 12:28 kichik
+
+ * /NSIS/trunk/Contrib/System/System.html: typo
+
+2004-08-13 23:29 joostverburg
+
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new languages
+
+2004-08-13 21:32 kichik
+
+ * /NSIS/trunk/Docs/src/attributes.but, /NSIS/trunk/Docs/src/ui.but:
+ - SetFont /LANG=
+ - ^Font and ^FontSize
+
+2004-08-13 21:14 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: DirRequest's
+ title is set by Text
+
+2004-08-13 20:01 kichik
- * Contrib/NSISdl/httpget.cpp: #1008509 - Fixed compilation of
- plugin NSISdl under VS.NET
+ * /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.h: tabs to spaces
-2004-09-17 kichik
+2004-08-13 19:28 kichik
- * Source/script.cpp: SetCtlColors /BRANDING wasn't working right,
- if just one of the background or text color were specified
+ * /NSIS/trunk/Source/exehead/bin2h.c: patch #1005845 - Warning fix
+ for bin2h.c
-2004-09-14 kichik
+2004-08-13 19:26 kichik
- * Source/script.cpp: applied patch #1028028 - POSIX-built
- installers install files w incorrect timestamps.
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Indonesian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Latvian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Luxembourgish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Mongolian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SerbianLatin.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: -
+ patch #1005664 - nlf inclusion problems on case sensitive
+ platforms
+ - fixed Mongolian.nsh
-2004-09-11 kichik
+2004-08-13 19:07 kichik
- * Include/Library.nsh: - fixed "already defined" error - fixed
- unused label warning
+ * /NSIS/trunk/Source/exehead/Makefile: patch #1005305 -
+ Source/exehead/Makefile for cross compiling on POSIX systems
-2004-09-11 kichik
+2004-08-13 18:59 kichik
- * Source/Platform.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/script.cpp: implemented
- GetDLLVersionLocal for non Win32 platforms
+ * /NSIS/trunk/Source/Makefile: patch #1005299 - Source/Makefile for
+ building on POSIX systems
-2004-09-11 joostverburg
+2004-08-12 22:25 joostverburg
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: corrected
- spelling of "Welcome" (patch 1026048)
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf: fixes
-2004-09-10 kichik
+2004-08-12 22:23 joostverburg
- * Docs/src/compiler.but, Docs/src/file.but,
- Docs/src/flowcontrol.but: typos
+ * /NSIS/trunk/Contrib/Language files/Mongolian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Mongolian.nsh:
+ Mongolian language files by Bayarsaikhan Enkhtaivan
-2004-09-09 kichik
+2004-08-11 20:34 joostverburg
- * Docs/src/langs.but: typo
+ * /NSIS/trunk/Include/Library.nsh: typos
-2004-09-07 kichik
+2004-08-11 20:29 joostverburg
- * Contrib/VPatch/Source/Plugin/vpatchdll.c: close all open file
- handles when one of them fail to open
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: fixes
-2004-09-05 joostverburg
+2004-08-07 15:47 kichik
- * Contrib/Modern UI/Readme.html: filename corrections
+ * /NSIS/trunk/Source/exehead/fileform.c: Fixed the cause of bug
+ #1004496 - Install with /NCRC hangs
+ The hanging disappeared along with the removal of the threaded
+ lzma decoder, but the cause stayed. When the user specified /NCRC
+ on the command line, loadHeaders reported the compressed data
+ size to be 4 bytes larger than it really is. Instead of checking
+ the header flags, it checked the combined flags (command line and
+ header), concluded CRC checksum is disabled and therefore didn't
+ subtract the 4 bytes of the CRC checksum from the compressed data
+ size.
-2004-09-04 joostverburg
+2004-08-07 14:17 kichik
- * Contrib/Language files/Polish.nlf: fixes
+ * /NSIS/trunk/Docs/src/library.but: typos
-2004-09-04 joostverburg
+2004-08-07 11:54 kichik
+
+ * /NSIS/trunk/Docs/src/history.but: Window->Windows
+
+2004-08-07 11:25 kichik
+
+ * /NSIS/trunk/Docs/src/history.but: history updates
+
+2004-08-07 11:00 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi: Library files should go into
+ Contrib\Library not Contrib
+
+2004-08-07 10:52 kichik
- * Contrib/Modern UI/Language files/Polish.nsh: fixes
+ * /NSIS/trunk/Contrib/Language files/Luxembourgish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Luxembourgish.nsh:
+ moved Luxembourgish.nsh to the right folder
-2004-09-03 kichik
+2004-08-07 10:14 kichik
- * Contrib/Banner/Example.nsi: 1*2000 is not 1000
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/sections.but:
+ cleared up some InstType indexing confusion
-2004-09-03 kichik
+2004-08-07 07:55 joostverburg
- * Contrib/Banner/Readme.txt: three functions, not two
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: files for new library system
-2004-09-03 kichik
+2004-08-07 07:55 joostverburg
- * Source/exehead/Ui.c: don't forward WM_COMMAND if it was handled
+ * /NSIS/trunk/Menu/images/header.gif: 2.0->2.01
-2004-09-03 kichik
+2004-08-06 23:21 joostverburg
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/nsisdl.cpp: added
- /NOIEPROXY (based on memph's code)
+ * /NSIS/trunk/Examples/makensis.nsi: 2.01 version for update page
-2004-08-27 kichik
+2004-08-06 22:06 joostverburg
- * Source/strlist.h: fixed MMapFile on POSIX, again
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: DLL version 2.41
-2004-08-23 eccles
+2004-08-06 22:06 joostverburg
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: LogicLib 2.5 -
- AndIf, AndUnless, OrIf, OrUnless added. - Avoids unused variable
- warnings by requiring !defines before using certain features.
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/library.but,
+ /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Docs/src/var.but: updated documentation: new system
+ for DLL/TLB library setup, useful script code, history, credits,
+ intro, tutorial
-2004-08-21 kichik
+2004-08-06 22:04 joostverburg
- * Docs/src/history.but: added the bgbg bug to the history
+ * /NSIS/trunk/Contrib/Library,
+ /NSIS/trunk/Contrib/Library/LibraryLocal,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.cpp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.dsp,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.dsw,
+ /NSIS/trunk/Contrib/Library/LibraryLocal/LibraryLocal.exe,
+ /NSIS/trunk/Contrib/Library/RegTool,
+ /NSIS/trunk/Contrib/Library/RegTool/RegTool.bin,
+ /NSIS/trunk/Contrib/Library/RegTool/RegTool.nsi,
+ /NSIS/trunk/Contrib/Library/TypeLib,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.cpp,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.dsp,
+ /NSIS/trunk/Contrib/Library/TypeLib/TypeLib.dsw,
+ /NSIS/trunk/Include/Library.nsh,
+ /NSIS/trunk/Include/UpgradeDLL.nsh,
+ /NSIS/trunk/Plugins/TypeLib.dll: new system for DLL/TLB library
+ setup
-2004-08-21 kichik
+2004-08-06 21:47 joostverburg
- * Docs/src/usefulinfos.but: link to cross compiling howto
+ * /NSIS/trunk/Source/exehead/exec.c: compiles with
+ NSIS_SUPPORT_CODECALLBACKS disabled
-2004-08-21 kichik
+2004-08-06 21:29 kichik
- * Source/7zip/Common/Alloc.cpp, Source/7zip/Common/Alloc.h,
- Source/7zip/Common/MyUnknown.h, Source/7zip/Common/MyWindows.h:
- fixed bug #1005296 - NSIS build error on Linux with g++ 3.4.0 -
- upgraded to the latest LZMA SDK
+ * /NSIS/trunk/Examples/makensis.nsi: 2.0->2.01
-2004-08-20 kichik
+2004-08-06 21:29 kichik
- * Source/7zip/7zip/Common/InBuffer.cpp,
- Source/7zip/7zip/Common/InBuffer.h,
- Source/7zip/7zip/Common/OutBuffer.cpp,
- Source/7zip/7zip/Common/OutBuffer.h,
- Source/7zip/7zip/Common/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
- Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZInWindow.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
- Source/7zip/7zip/Compress/LZ/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/7zip/Compress/LZMA/LZMA.h,
- Source/7zip/7zip/Compress/LZMA/LZMADecoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMADecoder.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/7zip/7zip/Compress/LZMA/LZMALen.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMALen.h,
- Source/7zip/7zip/Compress/LZMA/LZMALiteral.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMALiteral.h,
- Source/7zip/7zip/Compress/LZMA/StdAfx.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
- Source/7zip/7zip/ICoder.h, Source/7zip/7zip/IStream.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
- Source/7zip/7zip/Compress/RangeCoder/StdAfx.h, Source/Makefile,
- Source/Platform.h, Source/ResourceVersionInfo.cpp, Source/clzma.h,
- Source/makenssi.dsp, Source/7zip/7zip/IMyUnknown.h,
- Source/7zip/Common/CRC.cpp, Source/7zip/Common/CRC.h,
- Source/7zip/Common/ComTry.h, Source/7zip/Common/Defs.h,
- Source/7zip/Common/MyCom.h, Source/7zip/Common/StdAfx.h,
- Source/7zip/Common/Types.h: fixed bug #1005296 - NSIS build error
- on Linux with g++ 3.4.0 - upgraded to the latest LZMA SDK
+ * /NSIS/trunk/Source/script.cpp: fixed handling of relative paths
+ such as \file.ext in do_add_file
-2004-08-20 kichik
+2004-08-06 17:03 kichik
- * Source/Platform.h, Source/Plugins.cpp, Source/build.cpp,
- Source/lang.cpp, Source/makenssi.cpp, Source/script.cpp,
- Source/util.cpp, Source/util.h: - auto conversion of paths on POSIX
- platforms - based on patch #1005673 - LoadLanguageFile error
- message improvement
+ * /NSIS/trunk/Docs/src/basic.but,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: converted RMDir back from
+ SHFileOperation to the good old manual method
+ - RMDir can now be used with both /r and /REBOOTOK
+ - RMDir /r no longer leaves lots of files behind if one file
+ removal failed
+ - The plug-ins directory is now always deleted, if not
+ immediately, then after reboot
+ - RMDir /r prints a detailed log of its actions
-2004-08-20 kichik
+2004-08-06 16:47 kichik
- * Examples/makensis.nsi: case changes for case sensitive platforms
+ * /NSIS/trunk/Source/exehead/Ui.c: close installer on
+ WM_QUERYENDSESSION instead of trying to clean up on WM_ENDSESSION
+ which doesn't work if there's an active plug-in (for example,
+ when the finish page is showing)
-2004-08-20 kichik
+2004-08-06 12:39 joostverburg
- * Source/exehead/fileform.c: initialize g_db_hFile with
- INVALID_HANDLE_VALUE so the handle 0 will not be closed in
- CleanUp() if loadHeaders() is never called
+ * /NSIS/trunk/Contrib/Language files/Luxembourgish.nlf,
+ /NSIS/trunk/Contrib/Language files/Luxembourgish.nsh:
+ Luxembourgish language files by Jo Hoeser
-2004-08-20 kichik
+2004-08-06 11:29 kichik
- * Source/exehead/Main.c: set NSIS Error title for invalid temporary
- directory error message
-
-2004-08-20 eccles
-
- * Source/exehead/bgbg.c, makensis.exe: request #990249 - Speedup
- BGGradient painting (was actually a bug)
-
-2004-08-20 kichik
-
- * Source/strlist.h: fixed MMapFile on POSIX
-
-2004-08-18 kichik
-
- * Source/script.cpp, Source/util.cpp, Source/util.h: bug report
- #1005303 - NSIS build warnings
-
-2004-08-18 kichik
-
- * Contrib/MakeLangId/MakeLangId.cpp,
- Contrib/MakeLangId/MakeLangId.dsp,
- Contrib/MakeLangId/MakeLangId.dsw, Contrib/MakeLangId/resource.h,
- Contrib/MakeLangId/resource.rc: Bin\\MakeLangId.exe source code
-
-2004-08-14 kichik
-
- * Source/7zip/7zip/Compress/LZ/LZInWindow.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/exehead/util.c, Source/zlib/INFBLOCK.C: fixed build warnings
- (including bug report #1005303 )
-
-2004-08-14 kichik
-
- * Source/DialogTemplate.cpp: throw exception instead of failing
- silently when iconv fails
+ * /NSIS/trunk/Docs/src/compiler.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: added
+ !execute
-2004-08-14 kichik
+2004-08-06 11:05 kichik
- * Contrib/System/System.html: typo
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c: size optimization - lzma exehead
+ is now 33.5kb
-2004-08-14 joostverburg
+2004-08-01 14:45 joostverburg
- * Examples/Modern UI/MultiLanguage.nsi: new languages
+ * /NSIS/trunk/Contrib/Language files/Latvian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Latvian.nsh: fixes
-2004-08-14 kichik
+2004-07-24 12:34 kichik
- * Docs/src/attributes.but, Docs/src/ui.but: - SetFont /LANG= -
- ^Font and ^FontSize
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Include/Colors.nsh: updated colors.nsh
-2004-08-14 kichik
+2004-07-23 17:23 kichik
- * Contrib/InstallOptions/Readme.html: DirRequest's title is set by
- Text
+ * /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/System.html,
+ /NSIS/trunk/Contrib/System/WhatsNew.txt,
+ /NSIS/trunk/Plugins/System.dll: - fixes by brainsucker:
+ * Bug with proc call parts redefinition, # for example
+ * Bug with memory protection during callback processing (XP SP2)
+ - updated documentation:
+ * all examples now work, thanks to brainsucker's fixes
+ * visual improvements
+ * pointer information
-2004-08-13 kichik
+2004-07-15 17:54 kichik
- * install.sh: patch #1006009 - Installer script for Linux
+ * /NSIS/trunk/Include/Colors.nsh: some basic color defines by Rob
+ Segal
-2004-08-13 kichik
+2004-07-15 17:37 kichik
- * Source/ResourceEditor.h, Source/ResourceVersionInfo.h: tabs to
- spaces
+ * /NSIS/trunk/Source/exehead/exec.c: fixed internet shortcuts
+ creation with CreateShortcut (thanks rex123)
-2004-08-13 kichik
+2004-07-08 21:06 kichik
- * Source/exehead/bin2h.c: patch #1005845 - Warning fix for bin2h.c
+ * /NSIS/trunk/Source/exehead/exec.c: DeleteRegKey fix
-2004-08-13 kichik
+2004-07-08 18:39 kichik
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Bulgarian.nsh, Contrib/Modern UI/Language
- files/Catalan.nsh, Contrib/Modern UI/Language files/Croatian.nsh,
- Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/Language files/Danish.nsh, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh,
- Contrib/Modern UI/Language files/Estonian.nsh, Contrib/Modern
- UI/Language files/Farsi.nsh, Contrib/Modern UI/Language
- files/Finnish.nsh, Contrib/Modern UI/Language files/French.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Hebrew.nsh, Contrib/Modern UI/Language files/Hungarian.nsh,
- Contrib/Modern UI/Language files/Indonesian.nsh, Contrib/Modern
- UI/Language files/Italian.nsh, Contrib/Modern UI/Language
- files/Japanese.nsh, Contrib/Modern UI/Language files/Korean.nsh,
- Contrib/Modern UI/Language files/Latvian.nsh, Contrib/Modern
- UI/Language files/Lithuanian.nsh, Contrib/Modern UI/Language
- files/Luxembourgish.nsh, Contrib/Modern UI/Language
- files/Macedonian.nsh, Contrib/Modern UI/Language
- files/Mongolian.nsh, Contrib/Modern UI/Language
- files/Norwegian.nsh, Contrib/Modern UI/Language files/Polish.nsh,
- Contrib/Modern UI/Language files/Portuguese.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Romanian.nsh, Contrib/Modern UI/Language files/Russian.nsh,
- Contrib/Modern UI/Language files/Serbian.nsh, Contrib/Modern
- UI/Language files/SerbianLatin.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language files/Slovak.nsh,
- Contrib/Modern UI/Language files/Slovenian.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh, Contrib/Modern UI/Language
- files/Swedish.nsh, Contrib/Modern UI/Language files/Thai.nsh,
- Contrib/Modern UI/Language files/TradChinese.nsh, Contrib/Modern
- UI/Language files/Turkish.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: - patch #1005664 - nlf inclusion problems on
- case sensitive platforms - fixed Mongolian.nsh
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: variables
+ confusion (Comm@nder21)
-2004-08-13 kichik
+2004-07-08 18:32 kichik
- * Source/exehead/Makefile: patch #1005305 - Source/exehead/Makefile
- for cross compiling on POSIX systems
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp: fixed unicode conversion
+ with iconv
-2004-08-13 kichik
+2004-07-07 17:06 kichik
- * Source/Makefile: patch #1005299 - Source/Makefile for building on
- POSIX systems
+ * /NSIS/trunk/Docs/src/usefulinfos.but: 'bla'->'${VALUE}'
-2004-08-13 joostverburg
+2004-07-06 23:43 joostverburg
- * Contrib/Language files/SimpChinese.nlf: fixes
+ * /NSIS/trunk/Source/exehead/config.h: more things
+ NSIS_CONFIG_PLUGIN_SUPPORT relies on
-2004-08-13 joostverburg
+2004-07-02 17:27 joostverburg
- * Contrib/Language files/Mongolian.nlf, Contrib/Modern UI/Language
- files/Mongolian.nsh: Mongolian language files by Bayarsaikhan
- Enkhtaivan
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: fixes
-2004-08-11 joostverburg
+2004-07-01 20:22 kichik
- * Include/Library.nsh: typos
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: made the agree radio
+ button come before the disagree radio button in the license
+ page's tab order so pressing the up key will move the selection
+ up and not down
-2004-08-11 joostverburg
+2004-07-01 19:53 kichik
- * Contrib/Language files/Spanish.nlf, Contrib/Modern UI/Language
- files/Spanish.nsh: fixes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: applied
+ patch #983523 - Spelling errors on spanish language file
-2004-08-07 kichik
+2004-06-25 21:54 kichik
- * Source/exehead/fileform.c: Fixed the cause of bug #1004496 -
- Install with /NCRC hangs The hanging disappeared along with the
- removal of the threaded lzma decoder, but the cause stayed. When
- the user specified /NCRC on the command line, loadHeaders reported
- the compressed data size to be 4 bytes larger than it really is.
- Instead of checking the header flags, it checked the combined flags
- (command line and header), concluded CRC checksum is disabled and
- therefore didn't subtract the 4 bytes of the CRC checksum from the
- compressed data size.
+ * /NSIS/trunk/Docs/src/pages.but: added DirVerify to the list of
+ the directory's page supported options
-2004-08-07 kichik
+2004-06-25 20:00 kichik
- * Docs/src/library.but: typos
+ * /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.txt: latest StrFunc example and
+ readme
-2004-08-07 kichik
+2004-06-25 19:53 kichik
- * Docs/src/history.but: Window->Windows
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/script.cpp: - extended maximum binary data for
+ WriteRegBin to 3 * NSIS_MAX_STRLEN
+ - fixed FileRead setting the error flag when a null character is
+ the first character it reads
+ - made File /nonfatal always produce a warning if the file can't
+ be found
+ - some size optimizations
-2004-08-07 kichik
+2004-06-25 15:24 kichik
- * NSIS.chm, Docs/AppendixE.html, Docs/src/history.but: history
- updates
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: patch #977897 by Anders - IntOp
+ shr & shl
-2004-08-07 kichik
+2004-06-25 11:19 kichik
- * Examples/makensis.nsi: Library files should go into
- Contrib\Library not Contrib
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ 2.0->2.01
-2004-08-07 kichik
+2004-06-25 10:48 kichik
- * Contrib/Modern UI/Language files/Luxembourgish.nsh,
- Contrib/Language files/Luxembourgish.nsh: moved Luxembourgish.nsh
- to the right folder
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/res.rc: bump zip2exe version to 0.32
-2004-08-07 kichik
+2004-06-25 10:16 kichik
- * Docs/Chapter4.html, NSIS.chm, Docs/src/attributes.but,
- Docs/src/sec.but, Docs/src/sections.but: cleared up some InstType
- indexing confusion
+ * /NSIS/trunk/Source/script.cpp: fixed a crash caused by defining a
+ macro in a file included by another macro
-2004-08-07 joostverburg
+2004-06-19 20:06 kichik
- * Examples/cvsdata.nsi, Examples/makensis.nsi: files for new
- library system
+ * /NSIS/trunk/Docs/src/usefulinfos.but: added msys/cygwin
+ requirement for rm and echo commands
-2004-08-07 joostverburg
+2004-06-19 15:51 kichik
- * Menu/images/header.gif: 2.0->2.01
+ * /NSIS/trunk/Source/exehead/Makefile: always make target dirs
-2004-08-07 joostverburg
+2004-06-19 12:42 kichik
- * Examples/makensis.nsi: 2.01 version for update page
+ * /NSIS/trunk/Source/exehead/Makefile,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/Makefile:
+ fixed compatibility with gcc 3.3 and improved makefiles
-2004-08-07 kichik
+2004-06-19 11:44 kichik
- * makensis.exe: latest changes
+ * /NSIS/trunk/Source/strlist.h: fixed MMapBuf on POSIX
-2004-08-07 joostverburg
+2004-06-19 09:36 kichik
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: DLL version 2.41
+ * /NSIS/trunk/Docs/src/generalpurpose.but: bug #961027 -
+ clarification that CreateShortCut requires the path of link
+ exists
-2004-08-07 joostverburg
+2004-06-18 18:58 kichik
- * Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- Docs/AppendixE.html, Docs/AppendixF.html, Docs/Chapter1.html,
- Docs/Chapter2.html, Docs/Chapter4.html, NSIS.chm,
- Docs/AppendixG.html, Docs/Chapter5.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/build.bat,
- Docs/src/credits.but, Docs/src/history.but, Docs/src/intro.but,
- Docs/src/library.but, Docs/src/tutorial.but,
- Docs/src/usefulfunc.but, Docs/src/usefulinfos.but,
- Docs/src/var.but: updated documentation: new system for DLL/TLB
- library setup, useful script code, history, credits, intro,
- tutorial
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: zip files created on
+ Windows use the OEM code page - conversion to ANSI code page
+ added
-2004-08-07 joostverburg
+2004-06-18 17:59 kichik
- * Contrib/Library/LibraryLocal/LibraryLocal.cpp,
- Contrib/Library/LibraryLocal/LibraryLocal.dsp,
- Contrib/Library/LibraryLocal/LibraryLocal.dsw,
- Contrib/Library/LibraryLocal/LibraryLocal.exe,
- Contrib/Library/RegTool/RegTool.bin,
- Contrib/Library/RegTool/RegTool.nsi,
- Contrib/Library/TypeLib/TypeLib.cpp,
- Contrib/Library/TypeLib/TypeLib.dsp,
- Contrib/Library/TypeLib/TypeLib.dsw, Include/Library.nsh,
- Include/UpgradeDLL.nsh: new system for DLL/TLB library setup
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: fixed problems with quotes and
+ spaces
-2004-08-07 joostverburg
+2004-06-18 17:39 kichik
- * Source/exehead/exec.c: compiles with NSIS_SUPPORT_CODECALLBACKS
- disabled
+ * /NSIS/trunk/Docs/src/basic.but: missing "there" added
-2004-08-07 kichik
+2004-06-17 17:54 kichik
- * !InstallNSIS.bat, Examples/makensis.nsi: 2.0->2.01
+ * /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Contrib/Banner/Example.nsi,
+ /NSIS/trunk/Contrib/Banner/Readme.txt,
+ /NSIS/trunk/Plugins/Banner.dll: added getWindow
-2004-08-07 kichik
+2004-06-12 15:34 joostverburg
- * Source/script.cpp: fixed handling of relative paths such as
- \file.ext in do_add_file
+ * /NSIS/trunk/Source/build.cpp: fixed compilation without
+ background gradient support
-2004-08-06 kichik
+2004-06-12 14:01 kichik
- * Docs/src/basic.but, Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/util.c,
- Source/exehead/util.h, Source/script.cpp, Source/tokens.cpp:
- converted RMDir back from SHFileOperation to the good old manual
- method - RMDir can now be used with both /r and /REBOOTOK - RMDir
- /r no longer leaves lots of files behind if one file removal failed
- - The plug-ins directory is now always deleted, if not immediately,
- then after reboot - RMDir /r prints a detailed log of its actions
+ * /NSIS/trunk/Docs/src/usefulinfos.but: updated compilation
+ information
-2004-08-06 kichik
+2004-06-11 16:13 kichik
- * Source/exehead/Ui.c: close installer on WM_QUERYENDSESSION
- instead of trying to clean up on WM_ENDSESSION which doesn't work
- if there's an active plug-in (for example, when the finish page is
- showing)
+ * /NSIS/trunk/Docs/src/history.but: updated history for 2.01
-2004-08-06 joostverburg
+2004-06-11 15:33 kichik
- * Contrib/Language files/Luxembourgish.nlf, Contrib/Language
- files/Luxembourgish.nsh: Luxembourgish language files by Jo Hoeser
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: -
+ added BGFont that allows setting the background text font
+ - made Times New Roman default font for the background text
+ because it should always have support for the locale's language
-2004-08-06 kichik
+2004-06-11 13:25 kichik
- * Docs/src/compiler.but, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: added !execute
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh: updated
+ by Yaron Shahrabani
-2004-08-06 kichik
+2004-06-11 11:24 kichik
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/fileform.h: size optimization
- - lzma exehead is now 33.5kb
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C: case changes for #include
+ lines for cross compiling (Michiel Ephraim)
-2004-08-01 joostverburg
+2004-06-04 16:33 kichik
- * Contrib/Language files/Latvian.nlf, Contrib/Modern UI/Language
- files/Latvian.nsh: fixes
+ * /NSIS/trunk/Contrib/System/System.html: html fixes
-2004-07-24 kichik
+2004-06-04 16:31 kichik
- * Examples/makensis.nsi, Include/Colors.nsh: updated colors.nsh
+ * /NSIS/trunk/Contrib/System/System.html,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Examples/makensis.nsi: new, hopefully more
+ informative, System plug-in documentation
-2004-07-23 kichik
+2004-06-04 15:32 kichik
- * Contrib/System/System.html, Contrib/System/WhatsNew.txt,
- Contrib/System/Source/System.c: - fixes by brainsucker: * Bug with
- proc call parts redefinition, # for example * Bug with memory
- protection during callback processing (XP SP2) - updated
- documentation: * all examples now work, thanks to brainsucker's
- fixes * visual improvements * pointer information
+ * /NSIS/trunk/Contrib/System/Source/Buffers.c,
+ /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/Source/System.vcproj,
+ /NSIS/trunk/Contrib/System/WhatsNew.txt,
+ /NSIS/trunk/Plugins/System.dll: (brainsucker) bug-fix-release,
+ 4.06.2004
+ 1. System::Copy /SIZE fixed (Kichik).
+ 2. System::Copy with destination auto-allocation now pushes
+ destination
+ address on stack.
+ 3. Callbacks fixed (Kichik's kick is awesome).
-2004-07-15 kichik
+2004-06-04 11:52 kichik
- * Include/Colors.nsh: some basic color defines by Rob Segal
+ * /NSIS/trunk/Source/clzma.h: hCompressionThread is not an handle
+ on POSIX, casting added
-2004-07-15 kichik
+2004-06-04 11:49 kichik
- * Source/exehead/exec.c: fixed internet shortcuts creation with
- CreateShortcut (thanks rex123)
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: test both cases
-2004-07-09 kichik
+2004-06-04 11:05 kichik
- * Source/exehead/exec.c: DeleteRegKey fix
+ * /NSIS/trunk/Source/script.cpp: SetOutPath "-" works again
-2004-07-08 kichik
+2004-06-01 12:29 joostverburg
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/ResourceEditor.cpp: fixed unicode conversion with iconv
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: fixed cvs root
+ patching
-2004-07-07 kichik
+2004-05-28 14:03 kichik
- * Docs/src/usefulinfos.but: 'bla'->'${VALUE}'
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: should be $R0,
+ not $0
-2004-07-07 joostverburg
+2004-05-20 19:44 kichik
- * Source/exehead/config.h: more things NSIS_CONFIG_PLUGIN_SUPPORT
- relies on
+ * /NSIS/trunk/Contrib/System/Source/Buffers.c: a character in the
+ destination buffer address was skipped if size wasn't specified
-2004-07-02 joostverburg
+2004-05-15 11:22 kichik
- * Contrib/Modern UI/Language files/Dutch.nsh: fixes
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed the next/back buttons bug
+ caused by the last fix
-2004-07-01 kichik
+2004-05-12 09:44 joostverburg
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/sdbarker_tiny.exe, Source/exehead/resource.rc: made the
- agree radio button come before the disagree radio button in the
- license page's tab order so pressing the up key will move the
- selection up and not down
+ * /NSIS/trunk/Menu/update.html: releases / development files
-2004-07-01 kichik
+2004-05-09 11:54 joostverburg
- * Contrib/Modern UI/Language files/Spanish.nsh: applied patch
- #983523 - Spelling errors on spanish language file
+ * /NSIS/trunk/Contrib/UIs/modern.exe: description text position
-2004-06-26 kichik
+2004-05-08 17:40 kichik
- * Docs/src/pages.but: added DirVerify to the list of the
- directory's page supported options
+ * /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/trunk/Source/7zip/Common/Defs.h,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.h, /NSIS/trunk/Source/compressor.h,
+ /NSIS/trunk/Source/czlib.h: show meaningful error strings and not
+ just numbers for compression errors
-2004-06-25 kichik
+2004-05-08 16:07 kichik
- * Examples/StrFunc.nsi, Include/StrFunc.txt: latest StrFunc example
- and readme
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: fixed a bug which prevented
+ enabling the next button from the leave function of
+ InstallOptions pages
-2004-06-25 kichik
+2004-05-08 14:39 kichik
- * Source/build.cpp, Source/script.cpp, Source/exehead/exec.c: -
- extended maximum binary data for WriteRegBin to 3 * NSIS_MAX_STRLEN
- - fixed FileRead setting the error flag when a null character is
- the first character it reads - made File /nonfatal always produce a
- warning if the file can't be found - some size optimizations
+ * /NSIS/trunk/Source/build.cpp: print output file path on win32 too
-2004-06-25 kichik
+2004-05-08 13:05 kichik
- * Source/script.cpp, Source/tokens.cpp, Source/exehead/exec.c:
- patch #977897 by Anders - IntOp shr & shl
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: fixed ${NSISDIR} on POSIX when
+ makensis is called with an absolute path
-2004-06-25 kichik
+2004-05-08 11:35 kichik
- * Docs/src/history.but, Examples/makensis.nsi, Source/makenssi.cpp,
- Source/script.cpp: 2.0->2.01
+ * /NSIS/trunk/Source/script.cpp: fixed local include on POSIX
-2004-06-25 kichik
+2004-05-08 11:34 kichik
- * Contrib/zip2exe/main.cpp, Contrib/zip2exe/res.rc: bump zip2exe
- version to 0.32
+ * /NSIS/trunk/Source/util.cpp: always go forward in the POSIX
+ implmentation of CharNext
-2004-06-25 kichik
+2004-05-07 11:16 kichik
- * Source/script.cpp: fixed a crash caused by defining a macro in a
- file included by another macro
+ * /NSIS/trunk/Source/build.cpp: use NSIS_MAX_STRLEN, not an
+ arbitrary number
-2004-06-19 kichik
+2004-05-07 11:16 kichik
- * Docs/src/usefulinfos.but: added msys/cygwin requirement for rm
- and echo commands
+ * /NSIS/trunk/Source/script.cpp: bigger MAX_LINELENGTH
-2004-06-19 kichik
+2004-05-03 18:40 joostverburg
- * Source/exehead/Makefile: always make target dirs
+ * /NSIS/trunk/Include/WinMessages.nsh: added WM_SETTINGCHANGE
-2004-06-19 kichik
+2004-05-02 12:02 joostverburg
- * Source/Makefile, Source/exehead/Makefile, Source/exehead/util.c:
- fixed compatibility with gcc 3.3 and improved makefiles
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: window caption
-2004-06-19 kichik
+2004-05-01 19:44 kichik
- * Source/strlist.h: fixed MMapBuf on POSIX
+ * /NSIS/trunk/Source/clzma.h: LZMA compression should again work on
+ Windows 95
-2004-06-19 kichik
+2004-05-01 12:57 kichik
- * Docs/src/generalpurpose.but: bug #961027 - clarification that
- CreateShortCut requires the path of link exists
+ * /NSIS/trunk/Source/7zip/LZMADecode.c,
+ /NSIS/trunk/Source/7zip/LZMADecode.h: - comment update for bug
+ report #945607
+ - compile error fix for MinGW
-2004-06-18 kichik
+2004-05-01 12:41 kichik
- * Contrib/zip2exe/main.cpp: zip files created on Windows use the
- OEM code page - conversion to ANSI code page added
+ * /NSIS/trunk/Source/build.cpp: - fixed bug report #945832
+ - fixed a crash under some POSIX platforms in the code that gets
+ the fully qualified path to the output file
-2004-06-18 kichik
+2004-04-24 19:16 kichik
- * Contrib/nsExec/nsexec.c: fixed problems with quotes and spaces
+ * /NSIS/trunk/Source/exehead/Ui.c: GetDiskFreeSpaceEx on NT4
+ doesn't seem to like NULLs, even though MSDN says it should
-2004-06-18 kichik
+2004-04-24 12:49 joostverburg
- * Docs/src/basic.but: missing "there" added
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fix
-2004-06-17 kichik
+2004-04-21 20:30 joostverburg
- * Contrib/Banner/Banner.c, Contrib/Banner/Example.nsi,
- Contrib/Banner/Readme.txt: added getWindow
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: fix
-2004-06-12 joostverburg
+2004-04-21 17:44 joostverburg
- * Source/build.cpp: fixed compilation without background gradient
- support
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: typo
-2004-06-12 kichik
+2004-04-17 09:29 kichik
- * Docs/src/usefulinfos.but: updated compilation information
+ * /NSIS/trunk/Source/script.cpp: fixed File /r
-2004-06-11 kichik
+2004-04-16 22:44 kichik
- * Docs/src/history.but: updated history for 2.01
+ * /NSIS/trunk/Source/7zip/LZMADecode.c,
+ /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/exehead/fileform.c: Converted the LZMA decoder
+ to a state machine like zlib and bzip2. The new method is smaller
+ and safer because there is no need for hideous thread
+ synchronization. The new method also works on Windows 95, unlike
+ the previous one which was using InterlockedCompareExchange.
-2004-06-11 kichik
+2004-04-16 22:36 kichik
- * Docs/src/attributes.but, Source/Platform.h, Source/build.cpp,
- Source/build.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/bgbg.c, Source/exehead/fileform.h:
- - added BGFont that allows setting the background text font - made
- Times New Roman default font for the background text because it
- should always have support for the locale's language
+ * /NSIS/trunk/Source/exehead/exec.c: back to 34kb for good old zlib
+ exehead
-2004-06-11 kichik
+2004-04-16 15:23 joostverburg
- * Contrib/Language files/Hebrew.nlf, Contrib/Modern UI/Language
- files/Hebrew.nsh: updated by Yaron Shahrabani
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh: fix
-2004-06-11 kichik
+2004-04-15 16:12 joostverburg
- * Source/Platform.h, Source/exehead/Ui.c,
- Source/exehead/fileform.c, Source/zlib/INFBLOCK.C: case changes for
- #include lines for cross compiling (Michiel Ephraim)
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf: v6
-2004-06-04 kichik
+2004-04-15 16:11 joostverburg
- * Contrib/System/System.html: html fixes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh: 1.68
-2004-06-04 kichik
+2004-04-09 13:17 kichik
- * Contrib/System/System.html, Contrib/System/System.txt,
- Docs/src/history.but, Docs/src/usefulinfos.but,
- Examples/makensis.nsi: new, hopefully more informative, System
- plug-in documentation
+ * /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ 1.06
-2004-06-04 kichik
+2004-04-09 12:47 kichik
- * Contrib/System/WhatsNew.txt, Contrib/System/Source/Buffers.c,
- Contrib/System/Source/System.c,
- Contrib/System/Source/System.vcproj: (brainsucker) bug-fix-release,
- 4.06.2004 1. System::Copy /SIZE fixed (Kichik). 2. System::Copy
- with destination auto-allocation now pushes destination address on
- stack. 3. Callbacks fixed (Kichik's kick is awesome).
+ * /NSIS/trunk/Source/exehead/util.c: is_valid_instpath: don't check
+ the current directory, check the root directory
-2004-06-04 kichik
+2004-04-05 13:24 joostverburg
- * Source/clzma.h: hCompressionThread is not an handle on POSIX,
- casting added
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: removed
+ a slash
-2004-06-04 kichik
+2004-04-02 15:18 kichik
- * Source/script.cpp: SetOutPath "-" works again
+ * /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/credits.but:
+ - updated list of translators
+ - added SW_HIDE to ShellExec's documentation
-2004-05-28 kichik
+2004-03-29 20:21 kichik
- * Contrib/InstallOptions/Readme.html: should be $R0, not $0
+ * /NSIS/trunk/Source/7zip/7zGuids.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/IMyUnknown.h,
+ /NSIS/trunk/Source/7zip/Common/MyCom.h,
+ /NSIS/trunk/Source/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/Common/Types.h,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/bzip2/bzlib.h, /NSIS/trunk/Source/clzma.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Makefile,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/Makefile, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/ShConstants.h,
+ /NSIS/trunk/Source/strlist.h, /NSIS/trunk/Source/uservars.h,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h,
+ /NSIS/trunk/Source/zlib/deflate.c,
+ /NSIS/trunk/Source/zlib/DEFLATE.H,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/trees.c, /NSIS/trunk/Source/zlib/ZLIB.H,
+ /NSIS/trunk/Source/zlib/ZUTIL.H: - makensis should now compile on
+ any POSIX compliment platform (Linux, *BSD, Mac OS X, etc.)
+ - improved makefiles so nothing is compiled when it's already
+ up-to-date
+ - Added SW_HIDE to ExecShell's accepted show modes
+
+2004-03-24 21:14 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf: fixes
+
+2004-03-17 14:32 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf: fixes
+
+2004-03-14 12:00 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Source/lang.cpp: updated error messagebox text
+
+2004-03-12 21:01 kichik
+
+ * /NSIS/trunk/Source/exehead/exehead-lzma.dsp: use __fastcall for
+ LZMA instead of __stdcall because it's smaller and should be
+ faster
+
+2004-03-12 20:43 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/7zip/LZMADecode.c,
+ /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.h, /NSIS/trunk/Source/compressor.h,
+ /NSIS/trunk/Source/crc32.c, /NSIS/trunk/Source/czlib.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/exedata.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Makefile,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/lineparse.h,
+ /NSIS/trunk/Source/Makefile, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/Platform.h, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/ShConstants.h,
+ /NSIS/trunk/Source/strlist.h, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/uservars.h, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h: - updated the makefiles and code to
+ allow compliation with MinGW once again (some of patch #875485 by
+ perditionc)
+ - fixed errors and warnings given by gcc
+
+2004-03-12 10:28 kichik
+
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: always create a valid standard
+ input handle
+
+2004-03-11 19:29 kichik
+
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/script.cpp:
+ made search for .dll in plug-in names case insensitive
+
+2004-03-11 17:13 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: fixes
+
+2004-03-07 10:46 joostverburg
+
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: new LZMA source files
+
+2004-03-06 18:37 kichik
+
+ * /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL,
+ /NSIS/trunk/Source/7zip/LZMADecode.c,
+ /NSIS/trunk/Source/7zip/LZMADecode.h,
+ /NSIS/trunk/Source/7zip/lzmaNSIS.cpp,
+ /NSIS/trunk/Source/7zip/lzmaNSIS.h,
+ /NSIS/trunk/Source/exehead/exehead-lzma.dsp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/Platform.h,
+ /NSIS/trunk/Source/strlist.h: - lzma exehead is now 34kb instead
+ of 34.5kb thanks to the new LZMA C SDK and should be much faster
+ due to removal of critical section usage (not tested too much,
+ test before usage)
+ - applied some parts of patch #875485
-2004-05-20 kichik
+2004-03-06 12:31 eccles
- * Contrib/System/Source/Buffers.c: a character in the destination
- buffer address was skipped if size wasn't specified
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C: Windows 95 (OSR2)/98/ME no
+ longer see drive free space capped to 2GB.
+
+2004-03-04 21:37 joostverburg
+
+ * /NSIS/trunk/Docs/src/tutorial.but: updated outdated info about
+ shell extensions and compression methods
+
+2004-02-29 15:44 joostverburg
+
+ * /NSIS/trunk/Contrib/Graphics/Header/orange.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-r.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-r-nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-uninstall.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-uninstall-nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-uninstall-r.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-uninstall-r-nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Icons/orange-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/orange-install-nsis.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/orange-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/orange-uninstall-nsis.ico,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange-nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange-uninstall.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange-uninstall-nsis.bmp:
+ new Orange theme graphics
-2004-05-15 kichik
+2004-02-27 14:13 kichik
- * makensis.exe, Source/exehead/Ui.c: fixed the next/back buttons
- bug caused by the last fix
+ * /NSIS/trunk/Source/script.cpp: only append the last part of the
+ path specified using InstallDir if it is not also the first
-2004-05-12 joostverburg
+2004-02-26 17:03 joostverburg
- * Menu/update.html: releases / development files
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: return value info
-2004-05-09 joostverburg
+2004-02-25 23:31 joostverburg
- * Contrib/UIs/modern.exe: description text position
+ * /NSIS/trunk/Menu/update.html: link to development page
-2004-05-08 kichik
+2004-02-23 18:39 joostverburg
- * Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/Common/Defs.h, Source/build.cpp, Source/cbzip2.h,
- Source/clzma.h, Source/compressor.h, Source/czlib.h: show
- meaningful error strings and not just numbers for compression
- errors
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/makenssi.cpp: license notes
-2004-05-08 kichik
+2004-02-23 17:46 joostverburg
- * makensis.exe: latest changes
+ * /NSIS/trunk/Examples/makensis.nsi: link text not cut off when
+ high dpi setting is used
-2004-05-08 kichik
+2004-02-23 17:22 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: fixed a bug which prevented enabling the
- next button from the leave function of InstallOptions pages
+ * /NSIS/trunk/Contrib/Graphics/Wizard/orange.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange-uninstall.bmp: wrong
+ filenames
-2004-05-08 kichik
+2004-02-21 15:42 eccles
- * Source/build.cpp: print output file path on win32 too
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: Note about
+ BITMAPs being centered.
-2004-05-08 kichik
+2004-02-21 15:28 eccles
- * Source/build.cpp, Source/util.cpp, Source/util.h: fixed
- ${NSISDIR} on POSIX when makensis is called with an absolute path
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Now, IO bitmaps never
+ have any surrounding background.
-2004-05-08 kichik
+2004-02-21 15:18 eccles
- * Source/script.cpp: fixed local include on POSIX
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: We now centre bitmaps
+ manually, to avoid differences in behaviour between XP and
+ everything else.
-2004-05-08 kichik
+2004-02-20 17:29 joostverburg
- * Source/util.cpp: always go forward in the POSIX implmentation of
- CharNext
+ * /NSIS/trunk/Docs/src/usefulinfos.but: typo
-2004-05-07 kichik
+2004-02-20 15:13 kichik
- * Source/build.cpp: use NSIS_MAX_STRLEN, not an arbitrary number
+ * /NSIS/trunk/Source/exehead/Ui.c: AllowRootDirInstall should now
+ work along with InstallDirRegKey when the specified registry
+ value contains a root directory without a trailing backslash.
+ When writing $INSTDIR as is, this will always be the case.
-2004-05-07 kichik
+2004-02-17 13:38 joostverburg
- * Source/script.cpp: bigger MAX_LINELENGTH
+ * /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ 1.03
+ - Added commands support for uninstall sections and functions
+ - Fixed variables switch in "StrLoc" and "StrTok" after using
+ these
-2004-05-03 joostverburg
+2004-02-16 19:11 joostverburg
- * Include/WinMessages.nsh: added WM_SETTINGCHANGE
+ * /NSIS/trunk/Contrib/Graphics/Header/orange.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-r.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-uninstall.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/orange-uninstall-r.bmp,
+ /NSIS/trunk/Contrib/Graphics/Icons/orange-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/orange-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/orange-uninstall.bmp: Orange
+ theme by MoNKi
-2004-05-02 joostverburg
+2004-02-15 13:03 joostverburg
- * Contrib/Makensisw/resource.rc: window caption
+ * /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Include/UpgradeDLL.nsh: UpgradeDLL: rundll32l not
+ always in $SYSDIR
-2004-05-01 kichik
+2004-02-14 19:41 joostverburg
- * Source/clzma.h: LZMA compression should again work on Windows 95
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: background color for
+ welcome/finish page bitmap not set when image is stretched
-2004-05-01 kichik
+2004-02-11 22:00 joostverburg
- * Source/7zip/LZMADecode.c, Source/7zip/LZMADecode.h: - comment
- update for bug report #945607 - compile error fix for MinGW
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh: fixes
-2004-05-01 kichik
+2004-02-10 23:29 anoncvs_ezcontents
- * Source/build.cpp: - fixed bug report #945832 - fixed a crash
- under some POSIX platforms in the code that gets the fully
- qualified path to the output file
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Calling show after a
+ failed initDialog caused a freeze.
-2004-04-24 kichik
+2004-02-08 13:53 joostverburg
- * Source/exehead/Ui.c: GetDiskFreeSpaceEx on NT4 doesn't seem to
- like NULLs, even though MSDN says it should
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: option text
-2004-04-24 joostverburg
+2004-02-08 13:40 joostverburg
- * Contrib/Modern UI/Language files/German.nsh: fix
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: Expand all / Hide all
+ options
-2004-04-21 joostverburg
+2004-02-08 13:05 kichik
- * Contrib/Modern UI/Language files/English.nsh: fix
+ * /NSIS/trunk/Docs/src/history.but: fixed typo - MUI 1.70, not 1.79
-2004-04-21 joostverburg
+2004-02-07 21:13
- * Contrib/Modern UI/System.nsh: typo
+ * /NSIS/tags/v20, /NSIS/tags/v20/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20/Contrib/zip2exe,
+ /NSIS/tags/v20/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v20/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v20/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v20/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20/Source/exehead/bin2h.c,
+ /NSIS/tags/v20/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20/Source/exehead/Makefile,
+ /NSIS/tags/v20/Source/exehead/uninst.ico,
+ /NSIS/tags/v20/Source/Makefile,
+ /NSIS/tags/v20/Source/zlib/ZCONF.H: This commit was manufactured
+ by cvs2svn to create tag 'v20'.
-2004-04-17 kichik
+2004-02-07 21:13 kichik
- * Source/script.cpp: fixed File /r
+ * /NSIS/trunk/Examples/cvsdata.nsi: added Contrib\\Modern
+ UI\\images
-2004-04-17 kichik
+2004-02-07 15:47 kichik
- * Source/7zip/LZMADecode.c, Source/7zip/LZMADecode.h,
- Source/exehead/fileform.c: Converted the LZMA decoder to a state
- machine like zlib and bzip2. The new method is smaller and safer
- because there is no need for hideous thread synchronization. The
- new method also works on Windows 95, unlike the previous one which
- was using InterlockedCompareExchange.
+ * /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ (deguix) replaced StrSort and updated documentation some more
-2004-04-17 kichik
+2004-02-07 14:24 kichik
- * Source/exehead/exec.c: back to 34kb for good old zlib exehead
+ * /NSIS/trunk/Source/exehead/util.c: check if smaller than 31
+ (=control char) as unsigned
-2004-04-16 joostverburg
+2004-02-07 00:42 kichik
- * Contrib/Modern UI/Language files/Norwegian.nsh: fix
+ * /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ rc4->final
-2004-04-15 joostverburg
+2004-02-07 00:39 kichik
- * Contrib/Language files/Bulgarian.nlf: v6
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/StrFunc.nsi,
+ /NSIS/trunk/Include/StrFunc.nsh, /NSIS/trunk/Include/StrFunc.txt:
+ added deguix's collection of string functions
-2004-04-15 joostverburg
+2004-02-06 23:55 kichik
- * Contrib/Modern UI/Language files/Bulgarian.nsh: 1.68
+ * /NSIS/trunk/Docs/src/history.but: updates
-2004-04-09 kichik
+2004-02-06 23:27 joostverburg
- * Include/StrFunc.nsh, Include/StrFunc.txt: 1.06
+ * /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/intro.html,
+ /NSIS/trunk/Menu/notinstalled.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: bottom text link
-2004-04-09 kichik
+2004-02-06 23:17 joostverburg
- * Source/exehead/util.c: is_valid_instpath: don't check the current
- directory, check the root directory
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/images/arrow.gif,
+ /NSIS/trunk/Menu/images/arrowd.gif,
+ /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/images/menu.gif,
+ /NSIS/trunk/Menu/images/menud.gif,
+ /NSIS/trunk/Menu/images/site.gif,
+ /NSIS/trunk/Menu/images/version.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/intro.html, /NSIS/trunk/Menu/notinstalled.html,
+ /NSIS/trunk/Menu/update.html, /NSIS/trunk/Menu/websites.html:
+ NSIS 2.0
-2004-04-05 joostverburg
+2004-02-06 23:14 joostverburg
- * Contrib/Modern UI/Language files/German.nsh: removed a slash
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: fix
-2004-04-02 kichik
+2004-02-06 23:03 joostverburg
- * Docs/src/basic.but, Docs/src/credits.but: - updated list of
- translators - added SW_HIDE to ShellExec's documentation
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/Readme.html: design
-2004-03-29 kichik
+2004-02-06 23:01 joostverburg
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/Makefile, Source/Platform.h, Source/Plugins.cpp,
- Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/ResourceVersionInfo.cpp, Source/ResourceVersionInfo.h,
- Source/ShConstants.h, Source/build.cpp, Source/build.h,
- Source/clzma.h, Source/lang.cpp, Source/7zip/7zGuids.cpp,
- Source/7zip/7zip/IMyUnknown.h, Source/7zip/7zip/Common/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/7zip/7zip/Compress/LZMA/StdAfx.h,
- Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
- Source/7zip/Common/MyCom.h, Source/7zip/Common/StdAfx.h,
- Source/7zip/Common/Types.h, Source/makenssi.cpp, Source/script.cpp,
- Source/strlist.h, Source/uservars.h, Source/util.cpp,
- Source/util.h, Source/bzip2/bzlib.h, Source/exehead/Main.c,
- Source/exehead/Makefile, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/exec.h,
- Source/exehead/fileform.h, Source/exehead/util.c,
- Source/zlib/DEFLATE.H, Source/zlib/INFBLOCK.C, Source/zlib/ZLIB.H,
- Source/zlib/ZUTIL.H, Source/zlib/deflate.c, Source/zlib/trees.c: -
- makensis should now compile on any POSIX compliment platform
- (Linux, *BSD, Mac OS X, etc.) - improved makefiles so nothing is
- compiled when it's already up-to-date - Added SW_HIDE to
- ExecShell's accepted show modes
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/images, /NSIS/trunk/Contrib/Modern
+ UI/images/closed.gif, /NSIS/trunk/Contrib/Modern
+ UI/images/header.gif, /NSIS/trunk/Contrib/Modern
+ UI/images/open.gif, /NSIS/trunk/Contrib/Modern
+ UI/images/screen1.png, /NSIS/trunk/Contrib/Modern
+ UI/images/screen2.png, /NSIS/trunk/Contrib/Modern UI/Readme.gif,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot.png,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot2.png,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.70
+ * Improved documentation
+ * New Init custom function for Welcome and Finish page
-2004-03-24 joostverburg
+2004-02-06 22:37 kichik
- * Contrib/Language files/Lithuanian.nlf: fixes
+ * /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: only free the PIDL in DirProc,
+ don't parse it too so g_tmp gets overwritten with the entire path
+ instaed of just the display name
-2004-03-17 joostverburg
+2004-02-06 18:19 kichik
- * Contrib/Language files/Turkish.nlf: fixes
+ * /NSIS/trunk/Examples/silent.nsi: typo
-2004-03-14 joostverburg
+2004-02-06 17:36 kichik
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf, Source/lang.cpp: updated error messagebox text
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp: replaced tabs with spaces
-2004-03-12 kichik
+2004-02-06 16:56 kichik
- * Source/exehead/exehead-lzma.dsp: use __fastcall for LZMA instead
- of __stdcall because it's smaller and should be faster
+ * /NSIS/trunk/Contrib/AdvSplash/Example.nsi: llama.bmp doesn't have
+ the color 0x00005B in it
-2004-03-12 kichik
+2004-02-06 16:31 kichik
- * Examples/makensis.nsi, Source/DialogTemplate.cpp,
- Source/Makefile, Source/Platform.h, Source/Plugins.cpp,
- Source/Plugins.h, Source/ResourceEditor.cpp,
- Source/ResourceVersionInfo.cpp, Source/ShConstants.h,
- Source/build.cpp, Source/cbzip2.h, Source/clzma.h,
- Source/compressor.h, Source/crc32.c, Source/czlib.h,
- Source/exedata.h, Source/lang.cpp, Source/lang.h,
- Source/lineparse.h, Source/makenssi.cpp, Source/script.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/uservars.h,
- Source/util.cpp, Source/util.h, Source/7zip/LZMADecode.c,
- Source/7zip/LZMADecode.h, Source/7zip/7zip/Compress/LZMA/LZMA.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/bzip2/blocksort.c, Source/bzip2/compress.c,
- Source/bzip2/huffman.c, Source/exehead/Main.c,
- Source/exehead/Makefile, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/state.h,
- Source/exehead/util.c, Source/exehead/util.h: - updated the
- makefiles and code to allow compliation with MinGW once again (some
- of patch #875485 by perditionc) - fixed errors and warnings given
- by gcc
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c: made the command line parser cut
+ right on /D= and _?= and not one char before. this way foo.exe
+ "bla"/D=..., which appears to be valid in other applications,
+ will not get the last quote cut off.
-2004-03-12 kichik
+2004-02-05 21:47 kichik
- * Contrib/nsExec/nsexec.c: always create a valid standard input
- handle
+ * /NSIS/trunk/nsisconf.nsh: UninstallIcon, not UnIcon
-2004-03-11 kichik
+2004-02-05 14:06 eccles
- * Source/Plugins.cpp, Source/script.cpp: made search for .dll in
- plug-in names case insensitive
+ * /NSIS/trunk/Source/exehead/Main.c: cmdline and realcmds might not
+ be pointing to the same string.
-2004-03-11 joostverburg
+2004-02-05 12:19 kichik
- * Contrib/Language files/Arabic.nlf, Contrib/Modern UI/Language
- files/Arabic.nsh: fixes
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp: fixed some mismatched new and
+ delete operators
-2004-03-07 joostverburg
+2004-02-04 23:12 kichik
- * Examples/cvsdata.nsi, Examples/makensis.nsi: new LZMA source
- files
+ * /NSIS/trunk/Source/exehead/Main.c: fixed uninstallers (thanks
+ again eccles ;)
-2004-03-06 kichik
+2004-02-04 22:40 kichik
- * Source/Platform.h, Source/strlist.h, Source/7zip/LZMADecode.c,
- Source/7zip/LZMADecode.h, Source/7zip/lzmaNSIS.cpp,
- Source/7zip/lzmaNSIS.h, Source/exehead/Ui.c,
- Source/exehead/exehead-lzma.dsp, Source/exehead/fileform.c: - lzma
- exehead is now 34kb instead of 34.5kb thanks to the new LZMA C SDK
- and should be much faster due to removal of critical section usage
- (not tested too much, test before usage) - applied some parts of
- patch #875485
+ * /NSIS/trunk/Source/exehead/Main.c: fixed $CMDLINE corruption
+ (thanks eccles)
-2004-03-06 eccles
+2004-02-04 21:13 kichik
- * makensis.exe, Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/lang.h, Source/exehead/util.c,
- Source/zlib/INFBLOCK.C: Windows 95 (OSR2)/98/ME no longer see drive
- free space capped to 2GB.
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/silent.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but: - updated history
+ - added information about silent installers/uninstallers
-2004-03-04 joostverburg
+2004-02-04 20:03 kichik
- * Docs/src/tutorial.but: updated outdated info about shell
- extensions and compression methods
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: made the command line parser
+ not ignore any switch just before it didn't have a switch before
+ it
-2004-02-29 joostverburg
+2004-02-04 14:46 kichik
- * Contrib/Graphics/Header/orange-nsis.bmp,
- Contrib/Graphics/Header/orange-r-nsis.bmp,
- Contrib/Graphics/Header/orange-r.bmp,
- Contrib/Graphics/Header/orange-uninstall-nsis.bmp,
- Contrib/Graphics/Header/orange-uninstall-r-nsis.bmp,
- Contrib/Graphics/Header/orange-uninstall-r.bmp,
- Contrib/Graphics/Header/orange-uninstall.bmp,
- Contrib/Graphics/Header/orange.bmp,
- Contrib/Graphics/Icons/orange-install-nsis.ico,
- Contrib/Graphics/Icons/orange-install.ico,
- Contrib/Graphics/Icons/orange-uninstall-nsis.ico,
- Contrib/Graphics/Icons/orange-uninstall.ico,
- Contrib/Graphics/Wizard/orange-nsis.bmp,
- Contrib/Graphics/Wizard/orange-uninstall-nsis.bmp,
- Contrib/Graphics/Wizard/orange-uninstall.bmp,
- Contrib/Graphics/Wizard/orange.bmp: new Orange theme graphics
+ * /NSIS/trunk/Docs/src/var.but: added information about constants'
+ availability
-2004-02-27 kichik
+2004-02-04 11:53 joostverburg
- * Source/script.cpp: only append the last part of the path
- specified using InstallDir if it is not also the first
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: fix
-2004-02-26 joostverburg
+2004-02-03 22:18 joostverburg
- * Contrib/InstallOptions/Readme.html: return value info
+ * /NSIS/trunk/Docs/src/generalpurpose.but: more fixing
-2004-02-26 joostverburg
+2004-02-03 13:51 kichik
- * Menu/update.html: link to development page
+ * /NSIS/trunk/Source/makenssi.cpp: updated /hdrinfo to include
+ information about lzma too
-2004-02-23 joostverburg
+2004-02-03 13:44 kichik
- * Source/makenssi.cpp, Source/exehead/Main.c: license notes
+ * /NSIS/trunk/Source/build.cpp: Some system I tested on didn't
+ quite get the END part and seeked beyond the end of the file
+ which caused the CRC checksum to be written in a place where the
+ exehead didn't expect it. Because of this, all solid installers
+ compiled on that system failed CRC.
-2004-02-23 joostverburg
+2004-02-02 20:16 joostverburg
- * Examples/makensis.nsi: link text not cut off when high dpi
- setting is used
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fix
-2004-02-23 joostverburg
+2004-02-02 18:59 joostverburg
- * Contrib/Graphics/Wizard/orange-uninstall.bmp,
- Contrib/Graphics/Wizard/orange.bmp: wrong filenames
+ * /NSIS/trunk/Docs/src/generalpurpose.but: another fix
-2004-02-21 eccles
+2004-02-02 16:59 joostverburg
- * Contrib/InstallOptions/Readme.html: Note about BITMAPs being
- centered.
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fix
-2004-02-21 eccles
+2004-02-02 16:00 joostverburg
- * Contrib/Modern UI/System.nsh: Now, IO bitmaps never have any
- surrounding background.
+ * /NSIS/trunk/Docs/src/history.but: NSIS 1.x history
-2004-02-21 eccles
+2004-02-02 15:14
- * Contrib/InstallOptions/InstallerOptions.cpp: We now centre
- bitmaps manually, to avoid differences in behaviour between XP and
- everything else.
+ * /NSIS/tags/v20rc4, /NSIS/tags/v20rc4/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20rc4/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20rc4/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20rc4/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20rc4/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20rc4/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20rc4/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20rc4/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20rc4/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20rc4/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20rc4/Contrib/zip2exe,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20rc4/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20rc4/Source/exehead/bin2h.c,
+ /NSIS/tags/v20rc4/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20rc4/Source/exehead/Makefile,
+ /NSIS/tags/v20rc4/Source/exehead/uninst.ico,
+ /NSIS/tags/v20rc4/Source/Makefile,
+ /NSIS/tags/v20rc4/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20rc4'.
-2004-02-20 joostverburg
+2004-02-02 15:14 kichik
- * Docs/src/usefulinfos.but: typo
+ * /NSIS/trunk/Examples/makensis.nsi: no more *.rc for nsisdl
-2004-02-20 kichik
+2004-02-02 15:09 kichik
- * Source/exehead/Ui.c: AllowRootDirInstall should now work along
- with InstallDirRegKey when the specified registry value contains a
- root directory without a trailing backslash. When writing $INSTDIR
- as is, this will always be the case.
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ rc3->rc4
-2004-02-17 joostverburg
+2004-02-02 14:13 kichik
- * Include/StrFunc.nsh, Include/StrFunc.txt: 1.03 - Added commands
- support for uninstall sections and functions - Fixed variables
- switch in "StrLoc" and "StrTok" after using these
+ * /NSIS/trunk/Docs/src/generalpurpose.but: missing "if"
-2004-02-16 joostverburg
+2004-02-02 14:06 kichik
- * Contrib/Graphics/Header/orange-r.bmp,
- Contrib/Graphics/Header/orange-uninstall-r.bmp,
- Contrib/Graphics/Header/orange-uninstall.bmp,
- Contrib/Graphics/Header/orange.bmp,
- Contrib/Graphics/Icons/orange-install.ico,
- Contrib/Graphics/Icons/orange-uninstall.ico,
- Contrib/Graphics/Wizard/orange-uninstall.bmp,
- Contrib/Graphics/Wizard/orange.bmp: Orange theme by MoNKi
+ * /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: notes about proxies
-2004-02-15 joostverburg
+2004-02-01 23:55 eccles
- * Docs/src/usefulfunc.but, Include/UpgradeDLL.nsh: UpgradeDLL:
- rundll32l not always in $SYSDIR
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: - "Restores focus to its previous
+ state when exiting" was broken.
-2004-02-14 joostverburg
+2004-02-01 22:11 kichik
- * Contrib/Modern UI/System.nsh: background color for welcome/finish
- page bitmap not set when image is stretched
+ * /NSIS/trunk/Contrib/NSISdl/resource.h,
+ /NSIS/trunk/Contrib/NSISdl/Script1.rc: no longer needed
-2004-02-12 joostverburg
+2004-02-01 18:52 kichik
- * Contrib/Language files/Romanian.nlf, Contrib/Modern UI/Language
- files/Romanian.nsh: fixes
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Plugins/nsisdl.dll: All windows are now created in
+ the main thread where the main dialog is created. This should fix
+ any weird user32.dll crashes caused by different types of
+ messages sent to the main dialog during destruction of the NSISdl
+ dialog. This also reduces the size of the DLL by 0.5KB :)
-2004-02-11 anoncvs_ezcontents
+2004-02-01 15:50 eccles
- * Contrib/InstallOptions/InstallerOptions.cpp: Calling show after a
- failed initDialog caused a freeze.
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/Script1.rc,
+ /NSIS/trunk/Plugins/nsisdl.dll: - Fixed potential crash caused by
+ WinSock being shutdown while the connection is still open.
+ - Cleaned up dialog creation a little (some details, such as
+ font, were being changed after the dialog was already visible).
+ - Restores focus to its previous state when exiting.
+ - Fixed another one of those "holding down Cancel at the wrong
+ moment can cause the installer to suddenly exit" problems.
-2004-02-08 joostverburg
+2004-02-01 11:18 joostverburg
- * Contrib/Modern UI/Readme.html: option text
+ * /NSIS/trunk/Menu/images/version.gif: rc4
-2004-02-08 joostverburg
+2004-01-31 19:54 kichik
- * Contrib/Modern UI/Readme.html: Expand all / Hide all options
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/nsExec.dll: fixed mishandling of MBCS chars
-2004-02-08 kichik
+2004-01-31 13:35 joostverburg
- * NSIS.chm, Docs/AppendixD.html, Docs/src/history.but: fixed typo -
- MUI 1.70, not 1.79
+ * /NSIS/trunk/Contrib/Language files/Farsi.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Farsi.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: updated Farsi /
+ Persian langauge files
-2004-02-07 kichik
+2004-01-30 23:51 kichik
- * Examples/cvsdata.nsi: added Contrib\\Modern UI\\images
+ * /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: - fixed two bugs which caused
+ MBCS chars to be treated wrongly in validate_filename and
+ therefore trim too much when validating a path
+ - converted minus ones to INVALID_FILE_ATTRIBUTES
-2004-02-07 kichik
+2004-01-30 22:31 kichik
- * NSIS.chm, makensis.exe, Docs/AppendixD.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html: compiled latest changes
+ * /NSIS/trunk/Source/makenssi.dsp: - compiles without PSDK again
+ - moved all defines that are missing without PSDK to Platform.h
-2004-02-07 kichik
+2004-01-30 22:25 kichik
- * Examples/StrFunc.nsi, Include/StrFunc.nsh, Include/StrFunc.txt:
- (deguix) replaced StrSort and updated documentation some more
+ * /NSIS/trunk/Source/Platform.h: - compiles without PSDK again
+ - moved all defines that are missing without PSDK to Platform.h
-2004-02-07 kichik
+2004-01-30 22:04 kichik
- * Source/exehead/util.c: check if smaller than 31 (=control char)
- as unsigned
+ * /NSIS/trunk/Source/7zip/7zGuids.cpp, /NSIS/trunk/Source/afxres.h,
+ /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/exehead/afxres.h,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/util.cpp: -
+ compiles without PSDK again
+ - moved all defines that are missing without PSDK to Platform.h
-2004-02-07 kichik
+2004-01-30 20:37 kichik
- * !InstallNSIS.bat: rc4->final
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: fixed a bug that was
+ present since at least 1.3, which caused IO to read heap memory
+ beyond pszListItems and possibly to crash
-2004-02-07 kichik
+2004-01-29 23:18 kichik
- * Source/makenssi.cpp, Source/script.cpp: rc4->final
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c: forced a clean-up of the plugins
+ dir and solid installer's temp file on reboot since the regular
+ one wasn't called on windows 9x
-2004-02-07 kichik
+2004-01-29 19:34 joostverburg
- * Examples/StrFunc.nsi, Examples/makensis.nsi, Include/StrFunc.nsh,
- Include/StrFunc.txt: added deguix's collection of string functions
+ * /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Docs/src/pages.but:
+ fixes
-2004-02-07 kichik
+2004-01-29 13:58 joostverburg
- * Docs/src/history.but: updates
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf: no need for a
+ codepage
-2004-02-07 joostverburg
+2004-01-29 13:57 joostverburg
- * Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/intro.html, Menu/notinstalled.html, Menu/update.html,
- Menu/websites.html: bottom text link
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Language files/SerbianLatin.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SerbianLatin.nsh:
+ Latin/Cyrillic version
-2004-02-07 joostverburg
+2004-01-29 12:50 joostverburg
- * Examples/makensis.nsi, Menu/compiler.html, Menu/docs.html,
- Menu/index.html, Menu/intro.html, Menu/notinstalled.html,
- Menu/update.html, Menu/websites.html, Menu/images/arrow.gif,
- Menu/images/arrowd.gif, Menu/images/header.gif,
- Menu/images/menu.gif, Menu/images/menud.gif, Menu/images/site.gif,
- Menu/images/version.gif: NSIS 2.0
+ * /NSIS/trunk/Docs/src/credits.but: Nike
-2004-02-07 joostverburg
+2004-01-29 01:23 kichik
- * Contrib/VPatch/Readme.html: fix
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ fixed some compile errors caused by removing some config.h
+ options
-2004-02-07 joostverburg
+2004-01-28 21:22 joostverburg
- * Contrib/InstallOptions/Readme.html, Contrib/VPatch/Readme.html:
- design
+ * /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/config.but: new URLs
-2004-02-07 joostverburg
+2004-01-28 20:23 joostverburg
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Readme.gif,
- Contrib/Modern UI/Screenshot.png, Contrib/Modern
- UI/Screenshot2.png, Contrib/Modern UI/images/closed.gif,
- Contrib/Modern UI/images/header.gif, Contrib/Modern
- UI/images/open.gif, Contrib/Modern UI/images/screen1.png,
- Contrib/Modern UI/images/screen2.png, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Modern UI 1.70 * Improved documentation *
- New Init custom function for Welcome and Finish page
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: page settings info
-2004-02-07 kichik
+2004-01-28 19:03 joostverburg
- * Source/exehead/Ui.c, Source/exehead/util.c,
- Source/exehead/util.h: only free the PIDL in DirProc, don't parse
- it too so g_tmp gets overwritten with the entire path instaed of
- just the display name
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh:
+ Cyrillic, updated
-2004-02-06 kichik
+2004-01-27 21:47 joostverburg
- * Examples/silent.nsi: typo
+ * /NSIS/trunk/Menu/index.html: new URLs
-2004-02-06 kichik
+2004-01-27 18:44 kichik
- * Contrib/zip2exe/main.cpp: replaced tabs with spaces
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.h: fixed logging
-2004-02-06 kichik
+2004-01-27 16:58 kichik
- * Contrib/AdvSplash/Example.nsi: llama.bmp doesn't have the color
- 0x00005B in it
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh:
+ ASCII only display names
-2004-02-06 kichik
+2004-01-27 15:23 kichik
- * Source/exehead/Main.c, Source/exehead/Ui.c: made the command line
- parser cut right on /D= and _?= and not one char before. this way
- foo.exe "bla"/D=..., which appears to be valid in other
- applications, will not get the last quote cut off.
+ * /NSIS/trunk/Contrib/InstallOptions/testnotify.nsi: Add the
+ disabled flag too so when we return to this page it's disabled
+ again
-2004-02-05 kichik
+2004-01-26 16:33 joostverburg
- * nsisconf.nsh: UninstallIcon, not UnIcon
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/update.html: new
+ URLs
-2004-02-05 kichik
+2004-01-26 16:27 joostverburg
- * makensis.exe: latest changes
+ * /NSIS/trunk/Contrib/Language files/Indonesian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Indonesian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Indonesian
+ language files
-2004-02-05 eccles
+2004-01-26 03:38
- * Source/exehead/Main.c: cmdline and realcmds might not be pointing
- to the same string.
+ * /NSIS/tags/v20rc3, /NSIS/tags/v20rc3/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20rc3/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20rc3/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20rc3/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20rc3/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20rc3/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20rc3/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20rc3/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20rc3/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20rc3/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20rc3/Contrib/zip2exe,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20rc3/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20rc3/Source/afxres.h,
+ /NSIS/tags/v20rc3/Source/exehead/afxres.h,
+ /NSIS/tags/v20rc3/Source/exehead/bin2h.c,
+ /NSIS/tags/v20rc3/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20rc3/Source/exehead/Makefile,
+ /NSIS/tags/v20rc3/Source/exehead/uninst.ico,
+ /NSIS/tags/v20rc3/Source/Makefile,
+ /NSIS/tags/v20rc3/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20rc3'.
-2004-02-05 kichik
+2004-01-26 03:38 kichik
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/build.cpp, Source/lang.cpp, Source/script.cpp: fixed some
- mismatched new and delete operators
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ rc2->rc3
-2004-02-05 kichik
+2004-01-26 03:29 kichik
- * Source/exehead/Main.c: fixed uninstallers (thanks again eccles ;)
+ * /NSIS/trunk/Contrib/nsExec/test.nsi: no need for this return
+ instruction
-2004-02-05 kichik
+2004-01-26 03:29 kichik
- * Source/exehead/Main.c: fixed $CMDLINE corruption (thanks eccles)
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Added some missing
+ enabling and disabling of buttons to the settings window
-2004-02-04 kichik
+2004-01-25 21:57 joostverburg
- * Docs/AppendixB.html, Docs/AppendixD.html, Docs/Chapter4.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html, NSIS.chm,
- Docs/src/attributes.but, Docs/src/build.bat,
- Docs/src/flowcontrol.but, Docs/src/history.but, Docs/src/sec.but,
- Docs/src/silent.but, Docs/src/usefulfunc.but: - updated history -
- added information about silent installers/uninstallers
+ * /NSIS/trunk/Menu/images/version.gif: rc3
-2004-02-04 kichik
+2004-01-25 17:34 joostverburg
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: made the command line parser not ignore any
- switch just before it didn't have a switch before it
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: 1.68
-2004-02-04 kichik
+2004-01-25 17:34 joostverburg
- * Docs/src/var.but: added information about constants' availability
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf: v6
-2004-02-04 joostverburg
+2004-01-24 22:54 joostverburg
- * Contrib/Language files/Italian.nlf: fix
+ * /NSIS/trunk/Contrib/Language files/Latvian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Latvian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Latvian
+ language files
-2004-02-04 joostverburg
+2004-01-24 19:24 kichik
- * Docs/src/generalpurpose.but: more fixing
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Docs/src/history.but: implemented feature request
+ #883741 - added double click support for MakeNSISW's settings
+ dialog
-2004-02-03 kichik
+2004-01-24 16:35 kichik
- * Source/makenssi.cpp: updated /hdrinfo to include information
- about lzma too
+ * /NSIS/trunk/Docs/src/history.but: updated history
-2004-02-03 kichik
+2004-01-24 16:35 kichik
- * Source/build.cpp: Some system I tested on didn't quite get the
- END part and seeked beyond the end of the file which caused the CRC
- checksum to be written in a place where the exehead didn't expect
- it. Because of this, all solid installers compiled on that system
- failed CRC.
+ * /NSIS/trunk/Docs/src/script.but: added escaping to prevent a
+ warning from halibut
-2004-02-02 joostverburg
+2004-01-24 16:32 kichik
- * Contrib/Modern UI/Language files/German.nsh: fix
+ * /NSIS/trunk/Source/script.cpp: fixed a bug that caused escaping
+ not to be ignored on extended !define lines
-2004-02-02 joostverburg
+2004-01-23 10:50 joostverburg
- * Docs/src/generalpurpose.but: another fix
+ * /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/var.but:
+ script format
-2004-02-02 joostverburg
+2004-01-21 19:38 joostverburg
- * Contrib/Modern UI/Language files/German.nsh: fix
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Estonian.nsh: 1.68
-2004-02-02 joostverburg
+2004-01-21 19:38 joostverburg
- * Docs/src/history.but: NSIS 1.x history
+ * /NSIS/trunk/Contrib/Language files/Estonian.nlf: v6
-2004-02-02 kichik
+2004-01-20 23:20 eccles
- * Examples/makensis.nsi: no more *.rc for nsisdl
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/strlist.h: Installer would crash with certain
+ combinations of language files when certain language strings were
+ not referenced in all languages.
-2004-02-02 kichik
+2004-01-20 22:22 kichik
- * !InstallNSIS.bat, NSIS.chm, makensis.exe, Docs/AppendixD.html,
- Docs/AppendixE.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/history.but, Examples/makensis.nsi, Source/makenssi.cpp,
- Source/script.cpp: rc3->rc4
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf: ^Name ->
+ ^NameDA where needed
-2004-02-02 kichik
+2004-01-20 19:45 joostverburg
- * Docs/src/generalpurpose.but: missing "if"
+ * /NSIS/trunk/Contrib/Language files/Norwegian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh: fixes
-2004-02-02 kichik
+2004-01-20 18:10 icemank
- * Contrib/NSISdl/ReadMe.txt: notes about proxies
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed resize bug.
-2004-02-02 eccles
+2004-01-20 17:00 icemank
- * Contrib/NSISdl/nsisdl.cpp: - "Restores focus to its previous
- state when exiting" was broken.
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed resize bug.
-2004-02-02 kichik
+2004-01-20 15:03 icemank
- * Contrib/NSISdl/Script1.rc, Contrib/NSISdl/resource.h: no longer
- needed
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed window positioning
+ in case of change in screen resolution or workarea size.
-2004-02-01 kichik
+2004-01-20 13:01 joostverburg
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/nsisdl.dsp: All windows are now created in the main
- thread where the main dialog is created. This should fix any weird
- user32.dll crashes caused by different types of messages sent to
- the main dialog during destruction of the NSISdl dialog. This also
- reduces the size of the DLL by 0.5KB :)
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Contrib/NSIS Update/UI.exe: UI fix, log message
-2004-02-01 eccles
+2004-01-20 09:11 joostverburg
- * Contrib/NSISdl/Script1.rc, Contrib/NSISdl/nsisdl.cpp: - Fixed
- potential crash caused by WinSock being shutdown while the
- connection is still open. - Cleaned up dialog creation a little
- (some details, such as font, were being changed after the dialog
- was already visible). - Restores focus to its previous state when
- exiting. - Fixed another one of those "holding down Cancel at the
- wrong moment can cause the installer to suddenly exit" problems.
+ * /NSIS/trunk/Contrib/Language files/Norwegian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh: fixes
-2004-02-01 joostverburg
+2004-01-19 18:07 joostverburg
- * Menu/images/version.gif: rc4
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: 1.68
-2004-01-31 kichik
+2004-01-19 18:07 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/nsExec/nsexec.c: fixed mishandling of MBCS chars
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: fixes
-2004-01-31 joostverburg
+2004-01-17 22:36 joostverburg
- * Contrib/Language files/Farsi.nlf, Contrib/Modern UI/Language
- files/Farsi.nsh, Examples/Modern UI/MultiLanguage.nsi: updated
- Farsi / Persian langauge files
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf: fixes
-2004-01-31 kichik
+2004-01-17 18:41 joostverburg
- * makensis.exe: latest changes
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: fixes
-2004-01-31 kichik
+2004-01-17 18:39 joostverburg
- * Source/exehead/Ui.c, Source/exehead/util.c: - fixed two bugs
- which caused MBCS chars to be treated wrongly in validate_filename
- and therefore trim too much when validating a path - converted
- minus ones to INVALID_FILE_ATTRIBUTES
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh: use
+ $(^NameDA) where needed
-2004-01-31 kichik
+2004-01-17 13:00 joostverburg
- * Source/makenssi.dsp: - compiles without PSDK again - moved all
- defines that are missing without PSDK to Platform.h
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: fixes
-2004-01-31 kichik
+2004-01-16 16:36 joostverburg
- * Source/Platform.h: - compiles without PSDK again - moved all
- defines that are missing without PSDK to Platform.h
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh: fixes
-2004-01-31 kichik
+2004-01-15 14:31 joostverburg
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/Plugins.cpp, Source/Plugins.h, Source/ResourceEditor.h,
- Source/ResourceVersionInfo.cpp, Source/afxres.h, Source/build.cpp,
- Source/lang.cpp, Source/makenssi.cpp, Source/script.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/util.cpp,
- Source/7zip/7zGuids.cpp, Source/exehead/Main.c,
- Source/exehead/Ui.c, Source/exehead/afxres.h,
- Source/exehead/bgbg.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/util.c: - compiles without PSDK again - moved all
- defines that are missing without PSDK to Platform.h
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: incorrect setting name
-2004-01-30 kichik
+2004-01-12 23:23 eccles
- * Contrib/InstallOptions/InstallerOptions.cpp: fixed a bug that was
- present since at least 1.3, which caused IO to read heap memory
- beyond pszListItems and possibly to crash
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Now ignores WM_COMMAND
+ messages received while the dialog is in the process of being
+ created.
-2004-01-30 kichik
+2004-01-12 20:02 joostverburg
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/state.h: forced a clean-up of the plugins dir and
- solid installer's temp file on reboot since the regular one wasn't
- called on windows 9x
+ * /NSIS/trunk/Contrib/Graphics/Checks/colorful.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/modern.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/simple.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/simple-round.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/simple-round2.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/arrow.bmp: new, updated
+ graphics
-2004-01-29 joostverburg
+2004-01-12 18:06 joostverburg
- * Docs/src/defines.but, Docs/src/pages.but: fixes
+ * /NSIS/trunk/Source/script.cpp: case insensitive shortcut key
+ names should work now
-2004-01-29 joostverburg
+2004-01-12 16:47 joostverburg
- * Contrib/Language files/Macedonian.nlf: no need for a codepage
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf: code page
-2004-01-29 joostverburg
+2004-01-11 20:50 joostverburg
- * Contrib/Language files/Serbian.nlf, Contrib/Language
- files/SerbianLatin.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh, Contrib/Modern UI/Language
- files/SerbianLatin.nsh: Latin/Cyrillic version
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh: many
+ updates
-2004-01-29 joostverburg
+2004-01-11 15:49 joostverburg
- * Docs/src/credits.but: Nike
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf: many updates
-2004-01-29 kichik
+2004-01-11 15:49 joostverburg
- * Source/build.cpp, Source/script.cpp, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/util.c: fixed some compile errors caused by removing
- some config.h options
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: 1.68
-2004-01-28 joostverburg
+2004-01-11 12:01 joostverburg
- * Docs/src/chm_config.but, Docs/src/config.but: new URLs
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh: 1.68
-2004-01-28 joostverburg
+2004-01-09 23:08 joostverburg
- * Contrib/Modern UI/Readme.html: page settings info
+ * /NSIS/trunk/Source/script.cpp: CreateShortcut shortcut key names
+ case insensitive
-2004-01-28 joostverburg
+2004-01-09 20:24 joostverburg
- * Contrib/Language files/Serbian.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh: Cyrillic, updated
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh:
+ fixes
-2004-01-27 joostverburg
+2004-01-09 20:17 joostverburg
- * Menu/index.html: new URLs
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: 1.68
-2004-01-27 kichik
+2004-01-09 20:17 joostverburg
- * Source/exehead/exec.c, Source/exehead/util.h: fixed logging
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: info
-2004-01-27 kichik
+2004-01-08 22:42 joostverburg
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Farsi.nsh, Contrib/Modern UI/Language
- files/Macedonian.nsh: ASCII only display names
+ * /NSIS/trunk/Contrib/NSIS Update/Method.ini: text
-2004-01-27 kichik
+2004-01-08 22:29 joostverburg
- * Contrib/InstallOptions/testnotify.nsi: Add the disabled flag too
- so when we return to this page it's disabled again
+ * /NSIS/trunk/Docs/src/sec.but: SetCurInstType
-2004-01-26 joostverburg
+2004-01-08 21:26 joostverburg
- * Menu/index.html, Menu/update.html: new URLs
+ * /NSIS/trunk/Contrib/NSIS Update/ExtractDLL.dll,
+ /NSIS/trunk/Contrib/NSIS Update/Method.ini,
+ /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Contrib/NSIS Update/Resources,
+ /NSIS/trunk/Contrib/NSIS Update/UI.exe: improved user interface
-2004-01-26 joostverburg
+2004-01-08 16:45 joostverburg
- * Contrib/Language files/Indonesian.nlf, Contrib/Modern UI/Language
- files/Indonesian.nsh, Examples/Modern UI/MultiLanguage.nsi:
- Indonesian language files
+ * /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/ui.but:
+ language strings, BringToFront
-2004-01-26 kichik
+2004-01-08 15:13 joostverburg
- * !InstallNSIS.bat, NSIS.chm, makensis.exe, Docs/AppendixD.html,
- Docs/AppendixF.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/history.but,
- Examples/makensis.nsi, Source/makenssi.cpp, Source/script.cpp:
- rc2->rc3
+ * /NSIS/trunk/Contrib/Graphics/Icons/arrow2-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/arrow2-uninstall.ico: new
+ icons
-2004-01-26 kichik
+2004-01-08 15:10 joostverburg
- * Contrib/nsExec/test.nsi: no need for this return instruction
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: fixes
-2004-01-26 kichik
+2004-01-07 20:49 joostverburg
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.rc: Added some missing enabling and
- disabling of buttons to the settings window
+ * /NSIS/trunk/Docs/src/compilerflags.but: compression info
-2004-01-25 joostverburg
+2004-01-07 19:22 joostverburg
- * Menu/images/version.gif: rc3
+ * /NSIS/trunk/Contrib/Modern UI/License.txt: copyright year
-2004-01-25 joostverburg
+2004-01-07 19:21 joostverburg
- * Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/Language files/Danish.nsh: 1.68
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.69
+ * All uninstaller pages work without installer pages
+ * Fixed top text on uninstaller license page
-2004-01-25 joostverburg
+2004-01-07 16:45 joostverburg
- * Contrib/Language files/Danish.nlf: v6
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf: fix
-2004-01-25 joostverburg
+2004-01-07 16:45 joostverburg
- * Contrib/Language files/Latvian.nlf, Contrib/Modern UI/Language
- files/Latvian.nsh, Examples/Modern UI/MultiLanguage.nsi: Latvian
- language files
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh: 1.68
-2004-01-24 kichik
+2004-01-07 13:43 joostverburg
- * Contrib/Makensisw/makensisw.cpp, Docs/src/history.but,
- makensisw.exe: implemented feature request #883741 - added double
- click support for MakeNSISW's settings dialog
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: typo
-2004-01-24 kichik
+2004-01-06 21:28 kichik
- * Docs/src/history.but: updated history
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/makenssi.cpp:
+ more copyrights 2004
-2004-01-24 kichik
+2004-01-06 17:07 joostverburg
- * Docs/src/script.but: added escaping to prevent a warning from
- halibut
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/license.but: copyrights
-2004-01-24 kichik
+2004-01-06 00:53 kichik
- * Source/script.cpp: fixed a bug that caused escaping not to be
- ignored on extended !define lines
+ * /NSIS/trunk/Source/7zip/lzmaNSIS.cpp,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/cbzip2.h, /NSIS/trunk/Source/clzma.h,
+ /NSIS/trunk/Source/exehead/fileform.c: fixed a bunch of bugs that
+ caused lzma and bzip2 not to function without solid compression
-2004-01-23 joostverburg
+2004-01-05 21:53 eccles
- * Docs/src/script.but, Docs/src/var.but: script format
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Links and Buttons no
+ longer receive the initial keyboard focus as they take over the
+ Enter key.
-2004-01-21 joostverburg
+2004-01-05 15:36 kichik
- * Contrib/Modern UI/Language files/Estonian.nsh: 1.68
+ * /NSIS/trunk/Source/clzma.h: finish flag was not set when passed
+ on the first call to Compress
-2004-01-21 joostverburg
+2004-01-05 14:22 kichik
- * Contrib/Language files/Estonian.nlf: v6
+ * /NSIS/trunk/Source/cbzip2.h, /NSIS/trunk/Source/clzma.h: fixed
+ non solid compression using bzip2 or lzma
-2004-01-21 eccles
+2004-01-04 22:56
- * Source/lang.cpp, makensis.exe, Source/lang.h, Source/strlist.h:
- Installer would crash with certain combinations of language files
- when certain language strings were not referenced in all languages.
+ * /NSIS/tags/v20rc2, /NSIS/tags/v20rc2/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20rc2/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20rc2/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20rc2/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20rc2/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20rc2/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20rc2/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20rc2/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20rc2/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20rc2/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20rc2/Contrib/zip2exe,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20rc2/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20rc2/Source/afxres.h,
+ /NSIS/tags/v20rc2/Source/exehead/afxres.h,
+ /NSIS/tags/v20rc2/Source/exehead/bin2h.c,
+ /NSIS/tags/v20rc2/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20rc2/Source/exehead/Makefile,
+ /NSIS/tags/v20rc2/Source/exehead/uninst.ico,
+ /NSIS/tags/v20rc2/Source/Makefile,
+ /NSIS/tags/v20rc2/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20rc2'.
+
+2004-01-04 22:56 joostverburg
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: texts
+
+2004-01-04 22:12 joostverburg
+
+ * /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/images/version.gif: rc2
+
+2004-01-04 21:05 kichik
+
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ rc1->rc2
+
+2004-01-04 19:45 eccles
+
+ * /NSIS/trunk/Source/exehead/Ui.c: Fixed a bug which caused beeping
+ when the space key is hit on the components tree (kichik missed a
+ bit...)
+
+2004-01-04 18:14 eccles
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Focus is now set when
+ control initialisation is complete (e.g. after Link control
+ HWNDPROC has been changed)
+
+2004-01-04 17:25 kichik
+
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp:
+ fixed compile errors without NSIS_CONFIG_COMPONENTPAGE,
+ NSIS_CONFIG_PLUGIN_SUPPORT or NSIS_SUPPORT_HWNDS
+
+2004-01-04 17:05 kichik
+
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/nsisdl.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp: - fixed limit on LangStrings and
+ user variables number which was lower than designed. limit is now
+ 16383 for both.
+ - made log window respond to the context menu key and not just
+ right click
+ - set back the default style for the next after it's re-enabled
+ - set focus on main controls for every page (can still hit enter
+ for next)
+ - added code to prevent weird usage of WM_COMMAND which can cause
+ weird behavior such as disabled next button on the components
+ page
+ - eccles fixed a bug which caused beeping when the space key is
+ hit on the components tree
+
+2004-01-04 14:06 eccles
+
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/testlink.ini,
+ /NSIS/trunk/Contrib/InstallOptions/testnotify.ini,
+ /NSIS/trunk/Contrib/InstallOptions/testnotify.nsi,
+ /NSIS/trunk/Plugins/InstallOptions.dll: DLL version 2.4
+ (1/4/2004)
+ * Initial focus is set in "initDialog" making it possible to
+ override it from NSIS prior to calling "show"
+ - When initial focus is to a Text field InstallOptions now
+ follows standard Windows behaviour by having the text selected
+ - Label and other static fields no longer have State= written to
+ the INI file when leaving the dialog
+ - NOTIFY flag can now be used with Link fields (State should be
+ omitted in this case)
+ - Likewise, State can now be used with Button fields (behaves the
+ same as with Link fields)
+ - NOTIFY flag can also now be used with ListBox and DropList
+ fields to have NSIS notified when the selection changes
+ - Meaning of RIGHT flag is now reversed in right-to-left language
+ mode
+ - HSCROLL and VSCROLL flags are no longer restricted to Text
+ fields
+ - Various Link field fixes
+ - Text box colour bug fix
+
+2004-01-04 13:15 kichik
+
+ * /NSIS/trunk/Examples/UserVars.nsi: commit?!
+
+2004-01-04 13:14 kichik
+
+ * /NSIS/trunk/Examples/UserVars.nsi: removed useless colon and
+ spaces (last one didn't work)
-2004-01-21 kichik
+2004-01-04 13:13 kichik
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf: ^Name -> ^NameDA where needed
+ * /NSIS/trunk/Examples/UserVars.nsi: removed useless colon and
+ spaces
-2004-01-20 joostverburg
+2004-01-03 11:53 kichik
- * Contrib/Language files/Norwegian.nlf, Contrib/Modern UI/Language
- files/Norwegian.nsh: fixes
+ * /NSIS/trunk/Docs/src/chmlink.js: no need for the alerts
-2004-01-20 icemank
+2004-01-02 13:40 joostverburg
- * makensisw.exe, Contrib/Makensisw/utils.cpp: Fixed resize bug.
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/toolbar24d.bmp: more diabled
+ images, free image lists
-2004-01-20 icemank
+2004-01-01 23:02 joostverburg
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/toolbar24.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar24d.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar24h.bmp: modern 24-bit
+ toolbar for comctl32 => 4.70
+
+2004-01-01 17:39 joostverburg
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp: improved user
+ interface
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/utils.cpp: Fixed resize bug.
+2004-01-01 16:30 kichik
-2004-01-20 icemank
+ * /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/chmlink.js: this should solve any JScript
+ errors by adding exception handling or drop to the simplest and
+ ugliest solution if exception handling is not available
- * makensisw.exe, Contrib/Makensisw/utils.cpp: Fixed window
- positioning in case of change in screen resolution or workarea
- size.
+2004-01-01 16:28 kichik
-2004-01-20 joostverburg
+ * /NSIS/trunk/Docs/src/langs.but: LangString affects the last used
+ language too
- * Contrib/Language files/Norwegian.nlf, Contrib/Modern UI/Language
- files/Norwegian.nsh: fixes
+2003-12-31 11:56 joostverburg
-2004-01-19 joostverburg
+ * /NSIS/trunk/Docs/src/langs.but: multiple languages
- * Contrib/Modern UI/Language files/Swedish.nsh: 1.68
+2003-12-31 11:39 joostverburg
-2004-01-19 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: added some missing
+ commas
- * Contrib/Language files/Dutch.nlf, Contrib/Modern UI/Language
- files/Dutch.nsh: fixes
+2003-12-31 11:38 joostverburg
-2004-01-18 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: fixes
- * Contrib/Language files/Romanian.nlf: fixes
+2003-12-31 03:09 icemank
-2004-01-17 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h: Minor fix.
- * Contrib/Language files/Russian.nlf: fixes
+2003-12-30 19:43 icemank
-2004-01-17 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Added support for named
+ Symbols sets.
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: use $(^NameDA) where needed
+2003-12-30 16:14 joostverburg
-2004-01-17 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh: 1.68
- * Contrib/Modern UI/Language files/Dutch.nsh: fixes
+2003-12-30 16:14 joostverburg
-2004-01-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: fixes
- * Contrib/Modern UI/Language files/Norwegian.nsh: fixes
+2003-12-30 15:49 joostverburg
-2004-01-15 joostverburg
+ * /NSIS/trunk/Docs/src/defines.but: fixes
- * Contrib/Modern UI/Readme.html: incorrect setting name
+2003-12-29 16:18 joostverburg
-2004-01-13 eccles
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: fix
- * Contrib/InstallOptions/InstallerOptions.cpp: Now ignores
- WM_COMMAND messages received while the dialog is in the process of
- being created.
+2003-12-29 15:52 kichik
-2004-01-12 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: - best compressor
+ wasn't choosing the best compressed file
+ - pressing cancel on the compressor dialog now cancels the
+ compilation
- * Contrib/Graphics/Checks/colorful.bmp,
- Contrib/Graphics/Checks/modern.bmp,
- Contrib/Graphics/Checks/simple-round.bmp,
- Contrib/Graphics/Checks/simple-round2.bmp,
- Contrib/Graphics/Checks/simple.bmp,
- Contrib/Graphics/Wizard/arrow.bmp: new, updated graphics
+2003-12-29 15:12 kichik
-2004-01-12 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/nsisdl.dll, /NSIS/trunk/Source/exehead/Ui.c:
+ - made NSIS ignore WM_COMMAND from disabled controls
+ - made NSISdl set the cancel button as the default button
- * Source/script.cpp: case insensitive shortcut key names should
- work now
+2003-12-29 14:27 kichik
-2004-01-12 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/script.cpp:
+ fixed branding text background color not updating when the
+ system's color change
- * Contrib/Language files/Macedonian.nlf: code page
+2003-12-28 23:50 joostverburg
-2004-01-11 joostverburg
+ * /NSIS/trunk/Docs/src/intro.but: features list
- * Contrib/Language files/Romanian.nlf, Contrib/Modern UI/Language
- files/Romanian.nsh: many updates
+2003-12-28 22:28 joostverburg
-2004-01-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: 1.68
- * Contrib/Language files/Arabic.nlf: many updates
+2003-12-28 16:15 joostverburg
-2004-01-11 joostverburg
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ updates
- * Contrib/Modern UI/Language files/Arabic.nsh: 1.68
+2003-12-28 12:46 kichik
-2004-01-11 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: forgot about RTL improvements
+ in rc1
- * Contrib/Modern UI/Language files/Macedonian.nsh: 1.68
+2003-12-27 22:35
-2004-01-10 joostverburg
+ * /NSIS/tags/v20rc1, /NSIS/tags/v20rc1/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20rc1/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20rc1/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20rc1/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20rc1/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20rc1/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20rc1/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20rc1/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20rc1/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20rc1/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20rc1/Contrib/zip2exe,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20rc1/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20rc1/Source/afxres.h,
+ /NSIS/tags/v20rc1/Source/exehead/afxres.h,
+ /NSIS/tags/v20rc1/Source/exehead/bin2h.c,
+ /NSIS/tags/v20rc1/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20rc1/Source/exehead/Makefile,
+ /NSIS/tags/v20rc1/Source/exehead/uninst.ico,
+ /NSIS/tags/v20rc1/Source/Makefile,
+ /NSIS/tags/v20rc1/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20rc1'.
- * Source/script.cpp: CreateShortcut shortcut key names case
- insensitive
+2003-12-27 22:35 joostverburg
-2004-01-09 joostverburg
+ * /NSIS/trunk/Menu/images/version.gif: typo
- * Contrib/Language files/Lithuanian.nlf, Contrib/Modern UI/Language
- files/Lithuanian.nsh: fixes
+2003-12-27 20:35 kichik
-2004-01-09 joostverburg
+ * /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/images/version.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/intro.html, /NSIS/trunk/Menu/notinstalled.html,
+ /NSIS/trunk/Menu/update.html, /NSIS/trunk/Menu/websites.html: b4
+ -> rc1
- * Contrib/Modern UI/Language files/Polish.nsh: 1.68
+2003-12-27 19:10 kichik
-2004-01-09 joostverburg
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: - added missing 7zip source
+ and CVS files
+ - b5 -> rc1
- * Contrib/Language files/Polish.nlf: info
+2003-12-27 19:09 kichik
-2004-01-09 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ b5 -> rc1
- * Docs/src/sec.but: SetCurInstType
+2003-12-27 18:43 kichik
-2004-01-08 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: - added information about
+ updated VPatch
+ - b5 -> rc1
- * Docs/src/langs.but, Docs/src/ui.but: language strings,
- BringToFront
+2003-12-27 18:36 kichik
-2004-01-08 joostverburg
+ * /NSIS/trunk/Contrib/VPatch/GenPat.exe,
+ /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/GenPat2.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/PatchGenerator.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/TreeCode.pas: VPatch
+ 2.1:
+ * Added argument checking and error handling to GenPat. Now
+ returns exit codes as well to indicate success/failure (and the
+ reason for failure). Only GenPat has changed in this version
+ compared to 2.0 final.
+ * Bug Fix: GenPat no longer gives an Access Violation when
+ attempting to patch a file smaller than 64 bytes into a file
+ larger than 64 bytes.
- * Contrib/Graphics/Icons/arrow2-install.ico,
- Contrib/Graphics/Icons/arrow2-uninstall.ico: new icons
+2003-12-26 19:54 kichik
-2004-01-08 joostverburg
+ * /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/var.but:
+ added documentation for the new shell folders
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/Russian.nlf, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/Russian.nsh: fixes
+2003-12-26 19:48 kichik
-2004-01-07 joostverburg
+ * /NSIS/trunk/Docs/src/chmlink.js: fixed .nsi examples not starting
- * Docs/src/compilerflags.but: compression info
+2003-12-25 13:31 kichik
-2004-01-07 joostverburg
+ * /NSIS/trunk/Examples/languages.nsi: added multilingual license
+ example
- * Contrib/Modern UI/License.txt: copyright year
+2003-12-25 12:26 kichik
-2004-01-07 joostverburg
+ * /NSIS/trunk/Docs/src/generalpurpose.but: added a note about
+ SetOutPath to RegDLL's section
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Modern UI 1.69 * All uninstaller pages work
- without installer pages * Fixed top text on uninstaller license
- page
+2003-12-24 22:50 kichik
-2004-01-07 joostverburg
+ * /NSIS/trunk/Examples/one-section.nsi: typo fixed
- * Contrib/Language files/Catalan.nlf: fix
+2003-12-24 18:38 joostverburg
-2004-01-07 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Include/UpgradeDLL.nsh: UpgradeDLL now supports paths
+ that contain variables
- * Contrib/Modern UI/Language files/Catalan.nsh: 1.68
+2003-12-24 18:10 joostverburg
-2004-01-07 joostverburg
+ * /NSIS/trunk/TODO.txt: things to do for NSIS 2.1 or later
- * Contrib/Language files/Dutch.nlf: typo
+2003-12-24 18:06 joostverburg
-2004-01-06 kichik
+ * /NSIS/trunk/Include/Sections.nsh: cleanup
- * Source/exehead/Main.c, Source/exehead/Ui.c, Source/makenssi.cpp:
- more copyrights 2004
+2003-12-24 17:51 joostverburg
-2004-01-06 joostverburg
+ * /NSIS/trunk/Examples/one-section.nsi: new example
- * license.txt, Contrib/InstallOptions/Readme.html,
- Docs/src/chm_config.but, Docs/src/config.but, Docs/src/license.but:
- copyrights
+2003-12-24 16:30 kichik
-2004-01-06 kichik
+ * /NSIS/trunk/Examples/one-section.nsi,
+ /NSIS/trunk/Include/Sections.nsh: Made StartRadioButtons not
+ depend on $1 and added an option to work with multiple "radio
+ buttons" blocks
- * Source/build.cpp, Source/cbzip2.h, Source/clzma.h,
- Source/7zip/lzmaNSIS.cpp, Source/bzip2/bzlib.h,
- Source/exehead/fileform.c: fixed a bunch of bugs that caused lzma
- and bzip2 not to function without solid compression
+2003-12-24 16:03 kichik
-2004-01-05 eccles
+ * /NSIS/trunk/Docs/src/history.but: - a4 was released in 2002, not
+ 2003
+ - fixed a grammer mistake (at->on)
- * Contrib/InstallOptions/InstallerOptions.cpp: Links and Buttons no
- longer receive the initial keyboard focus as they take over the
- Enter key.
+2003-12-24 16:00 joostverburg
-2004-01-05 kichik
+ * /NSIS/trunk/Source/exehead/lang.h: error message
- * Source/clzma.h: finish flag was not set when passed on the first
- call to Compress
+2003-12-24 15:54 kichik
-2004-01-05 kichik
+ * /NSIS/trunk/Examples/waplugin.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: - Disabled DirShow as it hasn't
+ been working since b0 which was released more than a year ago.
+ - Rewrote token placement checks to prevent a crash with:
+ "Section uninstall
+ InstallDir something"
+ and to make it a bit more comfortable.
- * Source/cbzip2.h, Source/clzma.h: fixed non solid compression
- using bzip2 or lzma
+2003-12-24 13:12 joostverburg
-2004-01-05 joostverburg
+ * /NSIS/trunk/TODO.txt: updates
- * makensisw.exe, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.rc: texts
+2003-12-23 17:42 kichik
-2004-01-05 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: Added release dates
- * Menu/images/header.gif, Menu/images/version.gif: rc2
+2003-12-23 16:29 kichik
-2004-01-04 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Returned WM_COMMAND forwarding
+ as NSISdl is now fixed
- * !InstallNSIS.bat, NSIS.chm, makensis.exe, Docs/AppendixD.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/history.but, Examples/makensis.nsi, Source/makenssi.cpp,
- Source/script.cpp: rc1->rc2
+2003-12-23 16:29 kichik
-2004-01-04 eccles
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: - Escape now works when
+ focused on a link control
+ - Fixed a link control bug that allowed the user to activate the
+ link by clicking outside of the text
- * Source/exehead/Ui.c: Fixed a bug which caused beeping when the
- space key is hit on the components tree (kichik missed a bit...)
+2003-12-23 14:24 kichik
-2004-01-04 eccles
+ * /NSIS/trunk/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/trunk/Contrib/LangDLL/resource.rc,
+ /NSIS/trunk/Contrib/NSISdl/Script1.rc,
+ /NSIS/trunk/Contrib/zip2exe/res.rc: include winresrc.h instead of
+ afxresh which is not available on non Microsoft compilers (part
+ of MFC it seems)
- * Contrib/InstallOptions/InstallerOptions.cpp: Focus is now set
- when control initialisation is complete (e.g. after Link control
- HWNDPROC has been changed)
+2003-12-22 18:50 kichik
-2004-01-04 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Back to former exehead
+ overheads (zlib, bzip2 - 34, lzma - 34.5)
- * Source/build.cpp, Source/script.cpp: fixed compile errors without
- NSIS_CONFIG_COMPONENTPAGE, NSIS_CONFIG_PLUGIN_SUPPORT or
- NSIS_SUPPORT_HWNDS
+2003-12-22 14:34 ramon18
-2004-01-04 kichik
+ * /NSIS/trunk/Source/exehead/util.c: Shell Folders code now use
+ "current user" if cannot retrieve nothing for "all users"
- * makensis.exe, Contrib/NSISdl/nsisdl.cpp,
- Contrib/StartMenu/StartMenu.c, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/script.cpp, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/fileform.h,
- Source/exehead/state.h, Source/exehead/ui.h, Source/exehead/util.c,
- Source/exehead/util.h: - fixed limit on LangStrings and user
- variables number which was lower than designed. limit is now 16383
- for both. - made log window respond to the context menu key and
- not just right click - set back the default style for the next
- after it's re-enabled - set focus on main controls for every page
- (can still hit enter for next) - added code to prevent weird usage
- of WM_COMMAND which can cause weird behavior such as disabled next
- button on the components page - eccles fixed a bug which caused
- beeping when the space key is hit on the components tree
+2003-12-22 14:02 ramon18
-2004-01-04 eccles
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h,
+ /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/ShConstants.h: Added ShConstants.h to makenssi
+ project
+ Size optimization on ui.c
+ Some fixes in Shell Folders code
+
+2003-12-22 00:28 ramon18
+
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/uservars.h: Code clean up, removed
+ NSIS_SUPPORT_NAMED_USERVARS and NSIS_SUPPORT_LANG_IN_STRINGS
+ Added support for many new constants which get shell folders path
+ without using the registry
+
+2003-12-21 21:00 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Source/7zip/7zGuids.cpp: patches by PerditionC for
+ compatibly with PSDK-less VC6
+
+2003-12-21 20:33 eccles
+
+ * /NSIS/trunk/Include/LogicLib.nsh: Command.com does not like
+ command lines beginning with an '@' symbol.
+
+2003-12-20 15:01 eccles
+
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: ${Unless} ${Cmd} ... was not
+ working.
+
+2003-12-19 15:52 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ 1.68
+
+2003-12-18 19:19 kichik
+
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c: only add entries to
+ wininit.ini if short names were retrieved successfully
+
+2003-12-18 14:00 kichik
+
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi: Oops, that was a test
+ file
+
+2003-12-17 23:57 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/silent.nsi: Added an example that
+ demonstrates commands related to silent installers
+
+2003-12-17 23:22 kichik
+
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/Czech.nlf,
+ /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/Farsi.nlf,
+ /NSIS/trunk/Contrib/Language files/Finnish.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Language files/Japanese.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nlf,
+ /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/Swedish.nlf,
+ /NSIS/trunk/Contrib/Language files/Thai.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Turkish.nlf,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Default.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Farsi.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Docs/src/attributes.but, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: -
+ Added SS_NOPREFIX for the static control above the install log so
+ both will show the same when an ampersand is present in the
+ string
+ - Added another parameter for Name. It will be used in places
+ where doubled ampersands are required for text to render as
+ expected. Use it if you have an ampersand in your name. See the
+ updated documentation about the Name command for more information
+ about usage.
+
+2003-12-17 16:13 kichik
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: - Fixed bug #858010 -
+ defines were read wrongly into the settings dialog (`i' wasn't
+ reset to 0)
+ - Made Compile and Run execute the installer even if there were
+ warnings
+
+2003-12-17 13:07 kichik
+
+ * /NSIS/trunk/Docs/src/compilerflags.but: SetCompressorDictSize
+ didn't show
+
+2003-12-16 16:32 kichik
+
+ * /NSIS/trunk/Source/script.cpp: signed/unsigned mismatch
+
+2003-12-15 15:36 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh: 1.68
+
+2003-12-14 22:09 kichik
+
+ * /NSIS/trunk/Source/build.cpp: there is no pre function for custom
+ pages, only create function
+
+2003-12-14 17:59 joostverburg
+
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/defines.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/style.css: documented new features, font size
+
+2003-12-14 01:15 eccles
+
+ * /NSIS/trunk/Examples/makensis.nsi: LogicLib added to
+ distribution.
+
+2003-12-14 01:13 eccles
+
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: Some tidying and documentation.
+
+2003-12-14 00:31 eccles
+
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: 2.4:
+ - Added Switch..Case*/Default..EndSwitch: similar to Select but
+ behaves just like the C version (thanks to kichik).
+ - Added unsigned integer comparisons.
+ - Added 64-bit integer comparisons.
+ - Added case-sensitive string tests.
+ - Added other string relational comparisons.
+ - Added section flag tests.
+
+2003-12-14 00:29 eccles
+
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: 2.3:
+ - Much reworking and refactoring.
+ - Added built-in support for the rest of NSIS's conditional
+ tests.
+ - Added ability to use any NSIS conditional command in a normal
+ If type statement.
+ - Optimised the code produced by If (fewer Goto's).
+ - Added statement similar to If that works in reverse: "Unless".
+ - Fixed bug where using Continue in a Do..LoopUntil loop went to
+ the top of the loop and not the loop condition.
+ - Added DoWhile..Loop and Do..LoopWhile loop varieties.
+ - Optimised the code prodiced by Select (fewer Goto's).
+ - Renamed Case_Else to CaseElse.
+ - CaseElse can also be called Default (for the C-minded).
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/testlink.ini,
- Contrib/InstallOptions/testnotify.ini,
- Contrib/InstallOptions/testnotify.nsi: DLL version 2.4 (1/4/2004) *
- Initial focus is set in "initDialog" making it possible to override
- it from NSIS prior to calling "show" - When initial focus is to a
- Text field InstallOptions now follows standard Windows behaviour by
- having the text selected - Label and other static fields no longer
- have State= written to the INI file when leaving the dialog -
- NOTIFY flag can now be used with Link fields (State should be
- omitted in this case) - Likewise, State can now be used with Button
- fields (behaves the same as with Link fields) - NOTIFY flag can
- also now be used with ListBox and DropList fields to have NSIS
- notified when the selection changes - Meaning of RIGHT flag is now
- reversed in right-to-left language mode - HSCROLL and VSCROLL flags
- are no longer restricted to Text fields - Various Link field fixes
- - Text box colour bug fix
+2003-12-14 00:26 eccles
-2004-01-04 kichik
+ * /NSIS/trunk/Include/LogicLib.nsh: 2.2:
+ - Simplified IfThen by utilising If and EndIf.
+ - Simplified For by utilising ForEach.
+ - Fixed ForEach missing the final iteration.
+ - Fixed a couple of Break/Continue bugs.
- * Examples/UserVars.nsi: commit?!
+2003-12-14 00:25 eccles
-2004-01-04 kichik
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: 2.1:
+ - Added continue and break labels to repeat type statements.
- * Examples/UserVars.nsi: removed useless colon and spaces (last one
- didn't work)
+2003-12-14 00:23 eccles
-2004-01-04 kichik
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: NSIS Logic Library - dselkirk's
+ logiclib 2.0:
+ - Complete rewrite using new push/pop system.
- * Examples/UserVars.nsi: removed useless colon and spaces
+2003-12-14 00:22 eccles
-2004-01-03 kichik
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: NSIS Logic Library - dselkirk's
+ logiclib 1.3 (1.2 seems to have gone walkabout):
+ - Changed library name to Lib.
+ - Allow for 5 statements deep without use of name variable.
+ - Added If..ElseIf..Else..Endif statements.
+ - Fixed maximum allow statements.
+ - Now allows 10 statement depth.
+ - Condensed code.
- * Docs/src/chmlink.js: no need for the alerts
+2003-12-14 00:19 eccles
-2004-01-02 joostverburg
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: NSIS Logic Library - dselkirk's
+ selectlib 1.1:
+ - Added simplified macros and removed NAME requirement
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- Contrib/Makensisw/toolbar24d.bmp: more diabled images, free image
- lists
+2003-12-14 00:18 eccles
-2004-01-02 joostverburg
+ * /NSIS/trunk/Examples/LogicLib.nsi,
+ /NSIS/trunk/Include/LogicLib.nsh: NSIS Logic Library - dselkirk's
+ original selectlib 1.0
- * makensisw.exe, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/toolbar.bmp, Contrib/Makensisw/toolbar.cpp,
- Contrib/Makensisw/toolbar.h, Contrib/Makensisw/toolbar24.bmp,
- Contrib/Makensisw/toolbar24d.bmp, Contrib/Makensisw/toolbar24h.bmp:
- modern 24-bit toolbar for comctl32 => 4.70
+2003-12-13 17:17 eccles
-2004-01-01 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/testnotify.ini,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Only validate if pressing
+ the Next button.
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/toolbar.bmp,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/version.cpp:
- improved user interface
+2003-12-12 22:00 kichik
-2004-01-01 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Translation buffers were too
+ small
- * NSIS.chm, Docs/AppendixD.html, Docs/Chapter1.html,
- Docs/Chapter4.html, Docs/Chapter5.html: compiled changes
+2003-12-12 21:26 joostverburg
-2004-01-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed finish page link
+ positioning, color (standard RRGGBB hex format)
- * Docs/src/chm_config.but, Docs/src/chmlink.js: this should solve
- any JScript errors by adding exception handling or drop to the
- simplest and ugliest solution if exception handling is not
- available
+2003-12-11 21:05 joostverburg
-2004-01-01 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: file association fix
- * Docs/src/langs.but: LangString affects the last used language too
+2003-12-10 12:54 joostverburg
-2003-12-31 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: added MUI_SYSVERSION
+ define
- * Docs/src/langs.but: multiple languages
+2003-12-09 19:43 joostverburg
-2003-12-31 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: updated
+ reserve file info
- * Contrib/Language files/German.nlf: added some missing commas
+2003-12-09 19:33 joostverburg
-2003-12-31 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/Readme.html: updated reserve file
+ info, fixes, html structure
- * Contrib/Language files/Korean.nlf, Contrib/Modern UI/Language
- files/Korean.nsh: fixes
+2003-12-09 16:45 joostverburg
-2003-12-31 icemank
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh: 1.68
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h: Minor fix.
+2003-12-08 22:30 kichik
-2003-12-30 icemank
+ * /NSIS/trunk/Source/exehead/Ui.c: Around 20 bytes down
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: Added
- support for named Symbols sets.
+2003-12-08 14:06 kichik
-2003-12-30 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: First verify fields and
+ then, only if all are valid, call the leave function
- * Contrib/Modern UI/Language files/French.nsh, Contrib/Modern
- UI/Language files/Norwegian.nsh: 1.68
+2003-12-08 12:53 kichik
-2003-12-30 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: - fixed bug #848868 -
+ StartMenu trims 3 lines of text
+ - made StartMenu treat different fonts better, it will not resize
+ according to the selected font
- * Contrib/Language files/Polish.nlf: fixes
+2003-12-08 09:32 kichik
-2003-12-30 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/util.cpp: accept
+ different order in install and uninstall icon files, as long as
+ all of the sizes and color depths match
- * Docs/src/defines.but: fixes
+2003-12-06 20:45 kichik
-2003-12-29 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp: -
+ Better RTL support:
+ * use RTL reading wherever possible (shows the dots, commas, etc.
+ in the correct order)
+ * Message boxes are now RTL too
+ * Fixed RTL for links in InstallOptions
+ - Fixed tab order in StartMenu
+ - Made StartMenu use SHGetSpecialFolderLocation (soon to be in
+ NSIS core too)
- * Contrib/Modern UI/Language files/Italian.nsh: fix
+2003-12-05 16:41 joostverburg
-2003-12-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh: 1.68
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp: - best compressor
- wasn't choosing the best compressed file - pressing cancel on the
- compressor dialog now cancels the compilation
+2003-12-05 16:21 joostverburg
-2003-12-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finish/abort header
+ subtext can be set without setting the text
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/NSISdl/nsisdl.cpp, Source/exehead/Ui.c: - made NSIS ignore
- WM_COMMAND from disabled controls - made NSISdl set the cancel
- button as the default button
+2003-12-05 16:03 joostverburg
-2003-12-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh: 1.68
- * Contrib/InstallOptions/InstallerOptions.cpp, Source/script.cpp,
- Source/exehead/Ui.c, Source/exehead/bgbg.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/util.c,
- Source/exehead/util.h: fixed branding text background color not
- updating when the system's color change
+2003-12-05 12:27 kichik
-2003-12-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Fixed bug #854678 -
+ sub-header showing success on abort
- * Docs/src/intro.but: features list
+2003-12-04 22:12 eccles
-2003-12-29 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/testnotify.ini,
+ /NSIS/trunk/Contrib/InstallOptions/testnotify.nsi,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Plugins/InstallOptions.dll: - Added new control type
+ "Button"
+ - Added new flag "NOTIFY"
+ - Added new flag "NOWORDWRAP" for multi-line text boxes
+ - Reduced size down to 12K
- * Contrib/Modern UI/Language files/Italian.nsh: 1.68
+2003-12-04 16:36 joostverburg
-2003-12-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh: 1.68
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh: updates
+2003-12-04 16:36 joostverburg
-2003-12-28 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ removed old font setting
- * Docs/src/history.but: forgot about RTL improvements in rc1
+2003-12-04 16:28 joostverburg
-2003-12-28 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: file association, section
+ macros, fixes
- * Menu/images/version.gif: typo
+2003-12-04 12:09 kichik
-2003-12-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ 1.68
- * Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/intro.html, Menu/notinstalled.html, Menu/update.html,
- Menu/websites.html, Menu/images/version.gif: b4 -> rc1
+2003-12-03 15:43 joostverburg
-2003-12-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: typo
- * NSIS.chm, makensis.exe, Docs/AppendixB.html, Docs/AppendixD.html,
- Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html: compiled latest changes
+2003-12-03 12:30 kichik
-2003-12-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: another spelling mistake
+ (recommAnded)
- * Examples/cvsdata.nsi, Examples/makensis.nsi, !InstallNSIS.bat: -
- added missing 7zip source and CVS files - b5 -> rc1
+2003-12-02 22:43 zarg
-2003-12-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Speeling mishtake =)
- * Source/makenssi.cpp, Source/script.cpp: b5 -> rc1
+2003-12-02 20:56 joostverburg
-2003-12-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: 1.68
- * Docs/src/history.but: - added information about updated VPatch -
- b5 -> rc1
+2003-12-02 12:10 kichik
-2003-12-27 kichik
+ * /NSIS/trunk/Examples/example2.nsi: missed Install_Dir
- * Contrib/VPatch/GenPat.exe, Contrib/VPatch/Readme.html,
- Contrib/VPatch/Source/GenPat/GenPat2.dpr,
- Contrib/VPatch/Source/GenPat/PatchGenerator.pas,
- Contrib/VPatch/Source/GenPat/TreeCode.pas: VPatch 2.1: * Added
- argument checking and error handling to GenPat. Now returns exit
- codes as well to indicate success/failure (and the reason for
- failure). Only GenPat has changed in this version compared to 2.0
- final. * Bug Fix: GenPat no longer gives an Access Violation when
- attempting to patch a file smaller than 64 bytes into a file larger
- than 64 bytes.
+2003-12-02 01:22 ramon18
-2003-12-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ Portuguese language files update (nsh->1.68)
- * Docs/src/history.but, Docs/src/var.but: added documentation for
- the new shell folders
+2003-12-02 01:13 ramon18
-2003-12-26 kichik
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/Script1.rc,
+ /NSIS/trunk/Plugins/nsisdl.dll: Crash fixes, including firewall
+ problems, many Optimizations
- * Docs/src/chmlink.js: fixed .nsi examples not starting
+2003-12-01 22:48 kichik
-2003-12-25 kichik
+ * /NSIS/trunk/Source/tokens.cpp: Added LZMA to SetCompressor's list
- * Examples/languages.nsi: added multilingual license example
+2003-12-01 22:47 joostverburg
-2003-12-25 kichik
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: update/uninstall CVS data
- * Docs/src/generalpurpose.but: added a note about SetOutPath to
- RegDLL's section
+2003-12-01 14:36 kichik
-2003-12-25 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: MUI
+ 1.68 updates
- * Examples/one-section.nsi: typo fixed
+2003-12-01 11:36 kichik
-2003-12-24 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: fixed typo and added lzma
+ source code
- * Docs/src/usefulfunc.but, Include/UpgradeDLL.nsh: UpgradeDLL now
- supports paths that contain variables
+2003-12-01 11:33 kichik
-2003-12-24 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: obey /V for line breaks too
- * TODO.txt: things to do for NSIS 2.1 or later
+2003-12-01 00:16 kichik
-2003-12-24 joostverburg
+ * /NSIS/trunk/Source/script.cpp: no need for that variable
- * Include/Sections.nsh: cleanup
+2003-11-30 18:00 kichik
-2003-12-24 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ build plug-in table only when needed. this also fixes warnings
+ when using something like makensis.exe /X"OutFile bla.exe"
+ /XSection /XSectionEnd
- * Examples/one-section.nsi: new example
+2003-11-30 16:44 kichik
-2003-12-24 kichik
+ * /NSIS/trunk/Source/script.cpp: !ifmacro[n]def based now works
+ with !else
- * Examples/one-section.nsi, Include/Sections.nsh: Made
- StartRadioButtons not depend on $1 and added an option to work with
- multiple "radio buttons" blocks
+2003-11-30 16:31 kichik
-2003-12-24 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ !ifmacro[n]def based on Anders Kjersem's code
- * Docs/src/history.but: - a4 was released in 2002, not 2003 - fixed
- a grammer mistake (at->on)
+2003-11-30 16:02 kichik
-2003-12-24 joostverburg
+ * /NSIS/trunk/Source/7zip/lzmaNSIS.cpp, /NSIS/trunk/Source/clzma.h:
+ - Fixed a race condition that happened when LZMA compression
+ finished and occasionally deadlocked the next call (solid
+ installers weren't affected, just the compiler)
+ - Added try and catch for LZMA just in case one of the rare
+ exceptions will be thrown (just compiler)
- * Source/exehead/lang.h: error message
+2003-11-29 16:10 kichik
-2003-12-24 kichik
+ * /NSIS/trunk/Source/script.cpp: fixed !include not failing when it
+ can't find the requested file
- * Examples/waplugin.nsi, Source/build.cpp, Source/build.h,
- Source/script.cpp, Source/tokens.cpp: - Disabled DirShow as it
- hasn't been working since b0 which was released more than a year
- ago. - Rewrote token placement checks to prevent a crash with:
- "Section uninstall InstallDir something" and to make it a bit more
- comfortable.
+2003-11-28 19:41 joostverburg
-2003-12-24 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed finish page
+ reboot option buttons
- * TODO.txt: updates
+2003-11-28 19:34 joostverburg
-2003-12-23 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh: 1.68
- * Docs/src/history.but: Added release dates
+2003-11-28 19:04 kichik
-2003-12-23 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: Removed extra back-slash in
+ uninstaller execution path
- * Source/exehead/Ui.c: Returned WM_COMMAND forwarding as NSISdl is
- now fixed
+2003-11-28 18:59 kichik
-2003-12-23 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: bug #848173 - add trailing
+ backslash to the temporary directory so root directories will be
+ recognized as directories and not just the drive path.
- * Contrib/InstallOptions/InstallerOptions.cpp: - Escape now works
- when focused on a link control - Fixed a link control bug that
- allowed the user to activate the link by clicking outside of the
- text
+2003-11-28 18:52 kichik
-2003-12-23 kichik
+ * /NSIS/trunk/Source/exehead/Main.c: Made temporary folder
+ validator make sure the temporary directory variable contains a
+ fully qualified path. If it doesn't it'll full back to
+ %WINDIR%\Temp. If that doesn't either, it'll fail. This shoulf
+ fix bug #848173 where it would fail with the wrong message on
+ WINE.
- * Contrib/InstallOptions/ioptdll.rc, Contrib/LangDLL/resource.rc,
- Contrib/NSISdl/Script1.rc, Contrib/zip2exe/res.rc: include
- winresrc.h instead of afxresh which is not available on non
- Microsoft compilers (part of MFC it seems)
+2003-11-28 18:50 kichik
-2003-12-22 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Another little optimization
- * makensis.exe, Source/build.cpp, Source/build.h,
- Source/exehead/Ui.c, Source/exehead/config.h,
- Source/exehead/state.h, Source/exehead/util.c,
- Source/exehead/util.h: Back to former exehead overheads (zlib,
- bzip2 - 34, lzma - 34.5)
+2003-11-28 17:57 kichik
-2003-12-22 ramon18
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: - Made CRC checking from
+ CD-ROM or a network drive faster
+ - Some more optimizations
- * makensis.exe, Source/exehead/util.c: Shell Folders code now use
- "current user" if cannot retrieve nothing for "all users"
+2003-11-28 05:16 icemank
-2003-12-22 ramon18
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Minor fixes
- * makensis.exe: Some fixes in Shell Folders code
+2003-11-27 23:21 kichik
-2003-12-22 ramon18
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp:
+ Some more optimizations
- * Source/ShConstants.h, Source/build.h, Source/makenssi.dsp,
- Source/exehead/Ui.c, Source/exehead/util.c, Source/exehead/util.h:
- Added ShConstants.h to makenssi project Size optimization on ui.c
- Some fixes in Shell Folders code
+2003-11-27 21:29 joostverburg
-2003-12-22 ramon18
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Menu/compiler.html: section structure, file
+ associations, shell extensions
- * makensis.exe, Source/build.cpp, Source/build.h,
- Source/script.cpp, Source/uservars.h, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/fileform.h,
- Source/exehead/state.h, Source/exehead/util.c,
- Source/exehead/util.h: Code clean up, removed
- NSIS_SUPPORT_NAMED_USERVARS and NSIS_SUPPORT_LANG_IN_STRINGS Added
- support for many new constants which get shell folders path without
- using the registry
+2003-11-27 20:19 kichik
-2003-12-21 kichik
+ * /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMADecoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoderOpt.h,
+ /NSIS/trunk/Source/7zip/lzmaNSIS.cpp,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c, /NSIS/trunk/Source/script.cpp:
+ - All message boxes in code now have a default for silent
+ installers
+ - Some size optimizations
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Source/7zip/7zGuids.cpp: patches by PerditionC for compatibly with
- PSDK-less VC6
+2003-11-27 18:47 kichik
-2003-12-21 eccles
+ * /NSIS/trunk/Source/script.cpp: clean offsets for
+ EW_SETFILEATTRIBUTES that comes after EW_EXTRACTFILE
- * Include/LogicLib.nsh: Command.com does not like command lines
- beginning with an '@' symbol.
-
-2003-12-20 eccles
-
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: ${Unless} ${Cmd} ...
- was not working.
-
-2003-12-19 joostverburg
-
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: 1.68
+2003-11-27 14:27 joostverburg
-2003-12-18 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: 1.68,
+ fixes
- * Source/exehead/exec.c, Source/exehead/util.c: only add entries to
- wininit.ini if short names were retrieved successfully
+2003-11-26 20:27 kichik
-2003-12-18 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/clzma.h: Smaller
+ memory requirements on compile time (dict * 2 + 5MB)
- * Examples/Modern UI/Basic.nsi: Oops, that was a test file
+2003-11-26 17:20 joostverburg
-2003-12-18 kichik
-
- * Examples/makensis.nsi, Examples/silent.nsi: Added an example that
- demonstrates commands related to silent installers
-
-2003-12-18 kichik
-
- * Contrib/Language files/Bulgarian.nlf, Contrib/Language
- files/Catalan.nlf, Contrib/Language files/Croatian.nlf,
- Contrib/Language files/Czech.nlf, Contrib/Language
- files/Danish.nlf, Contrib/Language files/Dutch.nlf,
- Contrib/Language files/English.nlf, Contrib/Language
- files/Farsi.nlf, Contrib/Language files/Finnish.nlf,
- Contrib/Language files/French.nlf, Contrib/Language
- files/German.nlf, Contrib/Language files/Greek.nlf,
- Contrib/Language files/Hebrew.nlf, Contrib/Language
- files/Hungarian.nlf, Contrib/Language files/Italian.nlf,
- Contrib/Language files/Japanese.nlf, Contrib/Language
- files/Korean.nlf, Contrib/Language files/Lithuanian.nlf,
- Contrib/Language files/Macedonian.nlf, Contrib/Language
- files/Norwegian.nlf, Contrib/Language files/Polish.nlf,
- Contrib/Language files/Portuguese.nlf, Contrib/Language
- files/PortugueseBR.nlf, Contrib/Language files/Romanian.nlf,
- Contrib/Language files/Russian.nlf, Contrib/Language
- files/Serbian.nlf, Contrib/Language files/SimpChinese.nlf,
- Contrib/Language files/Slovak.nlf, Contrib/Language
- files/Slovenian.nlf, Contrib/Language files/Spanish.nlf,
- Contrib/Language files/Swedish.nlf, Contrib/Language
- files/Thai.nlf, Contrib/Language files/TradChinese.nlf,
- Contrib/Language files/Turkish.nlf, Contrib/Language
- files/Ukrainian.nlf, Contrib/Modern UI/Language files/Arabic.nsh,
- Contrib/Modern UI/Language files/Bulgarian.nsh, Contrib/Modern
- UI/Language files/Catalan.nsh, NSIS.chm, Contrib/Modern UI/Language
- files/Croatian.nsh, Contrib/Modern UI/Language files/Czech.nsh,
- Contrib/Modern UI/Language files/Danish.nsh, Contrib/Modern
- UI/Language files/Default.nsh, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh,
- Contrib/Modern UI/Language files/Estonian.nsh, Contrib/Modern
- UI/Language files/Farsi.nsh, Contrib/Modern UI/Language
- files/Finnish.nsh, Contrib/Modern UI/Language files/French.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Hebrew.nsh, Contrib/Modern UI/Language files/Hungarian.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Japanese.nsh, Contrib/Modern UI/Language
- files/Korean.nsh, Contrib/Modern UI/Language files/Lithuanian.nsh,
- Contrib/Modern UI/Language files/Macedonian.nsh, Contrib/Modern
- UI/Language files/Norwegian.nsh, Contrib/Modern UI/Language
- files/Polish.nsh, Contrib/Modern UI/Language files/Portuguese.nsh,
- Contrib/Modern UI/Language files/PortugueseBR.nsh, Contrib/Modern
- UI/Language files/Romanian.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language files/Serbian.nsh,
- Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/Slovak.nsh, Contrib/Modern UI/Language
- files/Slovenian.nsh, Contrib/Modern UI/Language files/Spanish.nsh,
- Contrib/Modern UI/Language files/Swedish.nsh, Contrib/Modern
- UI/Language files/Thai.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Turkish.nsh, Contrib/Modern UI/Language files/Ukrainian.nsh,
- Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/sdbarker_tiny.exe, Docs/Chapter4.html,
- Docs/src/attributes.but, Examples/Modern UI/Basic.nsi,
- makensis.exe, Source/lang.cpp, Source/lang.h, Source/script.cpp,
- Source/tokens.cpp, Source/exehead/resource.rc: - Added SS_NOPREFIX
- for the static control above the install log so both will show the
- same when an ampersand is present in the string - Added another
- parameter for Name. It will be used in places where doubled
- ampersands are required for text to render as expected. Use it if
- you have an ampersand in your name. See the updated documentation
- about the Name command for more information about usage.
-
-2003-12-17 kichik
-
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/utils.cpp: - Fixed bug #858010 - defines were
- read wrongly into the settings dialog (`i' wasn't reset to 0) -
- Made Compile and Run execute the installer even if there were
- warnings
-
-2003-12-17 kichik
-
- * NSIS.chm, Docs/Chapter4.html, Docs/src/compilerflags.but:
- SetCompressorDictSize didn't show
-
-2003-12-16 kichik
-
- * Source/script.cpp: signed/unsigned mismatch
-
-2003-12-15 joostverburg
-
- * Contrib/Modern UI/Language files/Slovenian.nsh: 1.68
-
-2003-12-15 kichik
-
- * Source/build.cpp: there is no pre function for custom pages, only
- create function
-
-2003-12-14 joostverburg
-
- * Docs/AppendixD.html, Docs/Chapter2.html, Docs/Chapter4.html,
- Docs/Chapter5.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/style.css, NSIS.chm, Docs/src/attributes.but,
- Docs/src/compiler.but, Docs/src/compilerflags.but,
- Docs/src/defines.but, Docs/src/flowcontrol.but,
- Docs/src/history.but, Docs/src/misc.but: documented new features,
- font size
-
-2003-12-14 eccles
-
- * Examples/makensis.nsi: LogicLib added to distribution.
-
-2003-12-14 eccles
-
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: Some tidying and
- documentation.
-
-2003-12-14 eccles
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial3.ini: no separate INI
+ file anymore
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: 2.4: - Added
- Switch..Case*/Default..EndSwitch: similar to Select but behaves
- just like the C version (thanks to kichik). - Added unsigned
- integer comparisons. - Added 64-bit integer comparisons. - Added
- case-sensitive string tests. - Added other string relational
- comparisons. - Added section flag tests.
+2003-11-26 17:20 joostverburg
-2003-12-14 eccles
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh: 1.68
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: 2.3: - Much
- reworking and refactoring. - Added built-in support for the rest
- of NSIS's conditional tests. - Added ability to use any NSIS
- conditional command in a normal If type statement. - Optimised the
- code produced by If (fewer Goto's). - Added statement similar to
- If that works in reverse: "Unless". - Fixed bug where using
- Continue in a Do..LoopUntil loop went to the top of the loop and
- not the loop condition. - Added DoWhile..Loop and Do..LoopWhile
- loop varieties. - Optimised the code prodiced by Select (fewer
- Goto's). - Renamed Case_Else to CaseElse. - CaseElse can also be
- called Default (for the C-minded).
+2003-11-26 13:58 kichik
-2003-12-14 eccles
+ * /NSIS/trunk/Docs/src/bin/halibut/LICENCE: Misspelled
- * Include/LogicLib.nsh: 2.2: - Simplified IfThen by utilising If
- and EndIf. - Simplified For by utilising ForEach. - Fixed ForEach
- missing the final iteration. - Fixed a couple of Break/Continue
- bugs.
+2003-11-26 13:57 kichik
-2003-12-14 eccles
+ * /NSIS/trunk/Docs/src/bin/halibut/LICENSE: Added modification
+ notice
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: 2.1: - Added
- continue and break labels to repeat type statements.
+2003-11-26 13:33 icemank
-2003-12-14 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h: Changed display name
+ for LZMA compressor
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: NSIS Logic Library -
- dselkirk's logiclib 2.0: - Complete rewrite using new push/pop
- system.
+2003-11-25 21:07 icemank
-2003-12-14 eccles
+ * /NSIS/trunk/Examples/makensis.nsi: Added context menu method for
+ choosing compressor.
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: NSIS Logic Library -
- dselkirk's logiclib 1.3 (1.2 seems to have gone walkabout): -
- Changed library name to Lib. - Allow for 5 statements deep without
- use of name variable. - Added If..ElseIf..Else..Endif statements.
- - Fixed maximum allow statements. - Now allows 10 statement depth.
- - Condensed code.
+2003-11-25 21:06 icemank
-2003-12-14 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed compressor
+ selection.
+ Added context menu method for choosing compressor.
+ Changed Defines dialog to Settings dialog
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: NSIS Logic Library -
- dselkirk's selectlib 1.1: - Added simplified macros and removed
- NAME requirement
+2003-11-25 18:11 joostverburg
-2003-12-14 eccles
+ * /NSIS/trunk/Contrib/zip2exe/Base.nsh,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/res.rc,
+ /NSIS/trunk/Contrib/zip2exe/resource.h: version 0.31
+ * LZMA compression support
+ * Fixed compression setting
- * Examples/LogicLib.nsi, Include/LogicLib.nsh: NSIS Logic Library -
- dselkirk's original selectlib 1.0
+2003-11-25 17:18 kichik
-2003-12-13 eccles
+ * /NSIS/trunk/Examples/one-section.nsi,
+ /NSIS/trunk/Include/Sections.nsh: Applied patch #849000 - New
+ sections macros for mutually exclusive section selection by Tim
+ Gallagher
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/testnotify.ini: Only validate if pressing
- the Next button.
+2003-11-25 17:07 kichik
-2003-12-13 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: - More path validation (drive id
+ is an english letter, no chars under 32 in a path)
+ - Fixed bug #839214 - message box shown in silent mode if a file
+ can't be opened for writing. Now it will skip the file if
+ AllowSkipFiles is on and abort if it's not.
+ - Added /SD parameter for MessageBox. Allows to set default for
+ silent installers (MessageBox MB_OKCANCEL "OK? Cancel?" /SD IDOK
+ IDOK doOK IDCANCEL doCancel)
- * Contrib/NSISdl/nsisdl.cpp: Translation buffers were too small
+2003-11-25 10:51 kichik
-2003-12-12 joostverburg
+ * /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMADecoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMADecoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMALenCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMALiteralCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZOutWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoderBit.h,
+ /NSIS/trunk/Source/7zip/lzmaNSIS.cpp: shaved 148 bytes, 236 more
+ to go
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- fixed finish page link positioning, color (standard RRGGBB hex
- format)
+2003-11-25 07:09 kichik
-2003-12-11 joostverburg
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: Allow
+ wildcards in !include
- * Examples/makensis.nsi: file association fix
+2003-11-25 06:25 kichik
-2003-12-10 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Added support for reading
+ environmental variables on compile time - $%envVarName%.
- * Contrib/Modern UI/System.nsh: added MUI_SYSVERSION define
+2003-11-25 05:55 kichik
-2003-12-09 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/lang.cpp: Parse LangString using the codepage
+ specified in NLF of the language. This helps avoid warnings about
+ unknown variables with LangStrings that contain dollar signs but
+ are not encoded with the system's current codepage.
- * Examples/Modern UI/InstallOptions.nsi: updated reserve file info
+2003-11-24 22:13 kichik
-2003-12-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh: No
+ such thing as MUI_UNINNERTEXT_LICENSE_TOP
- * Contrib/InstallOptions/Readme.html, Contrib/Modern
- UI/Readme.html, Contrib/VPatch/Readme.html: updated reserve file
- info, fixes, html structure
+2003-11-24 21:09 kichik
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh: Updated
+ to 1.68
+
+2003-11-24 19:50 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Default.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.68
+
+ * New settings for extra space for title and text on Welcome page
+ and Finish page.
+ * Improved handling of verbose settings. Define MUI_VERBOSE the
+ set the Modern UI verbose level (1-4).
+ * Language file string for uninstaller reboot information
+ * Setting for folder validation in leave function
+ * Fixed finish page text settings for multiple pages
+
+2003-11-24 19:36 kichik
+
+ * /NSIS/trunk/Source/build.cpp: Backwards compatibilty - sections
+ that use SectionIn RO and no other SectionIn should be in all
+ installation types
+
+2003-11-24 19:02 kichik
+
+ * /NSIS/trunk/Source/7zip/readme.txt,
+ /NSIS/trunk/Source/bzip2/Readme.txt: Note about different
+ licenses
+
+2003-11-24 18:54 kichik
+
+ * /NSIS/trunk/Source/7zip/readme.txt: Note about code modification
+
+2003-11-24 17:36 kichik
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Enabled LZMA selection
+
+2003-11-24 17:05 kichik
+
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ DirVerify (works in PageEx directory) and GetInstDirError. If
+ `DirVerify leave' is used, the next button will not be disabled
+ if the installation directory is not valid or there is not enough
+ space and a flag will be set instead. You can read that flag
+ using GetInstDirError in the leave function of the directory
+ page. A value of 0 means no error, 1 means invalid installation
+ directory and 2 means not enough space. This allows you to handle
+ those errors on your own.
+
+2003-11-24 16:51 icemank
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Added support for LZMA
+ compressor + fixed command line compressor support
+
+2003-11-24 14:22 kichik
+
+ * /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Added NSIS_CONFIG_LOG_ODS that
+ makes the log use OutputDebugString instead of install.log.
+
+2003-11-24 13:29 kichik
+
+ * /NSIS/trunk/Source/exehead/exec.c: Fixed bug #846723 - SetOutPath
+ doesn't work with root directories
+
+2003-11-24 13:11 kichik
+
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp: Uninstaller data offset is saved
+ as EW_WRITEUNINSTALLER's parameters. A step forward to multiple
+ uninstallers and smaller exehead.
+
+2003-11-24 00:12 kichik
+
+ * /NSIS/trunk/Source/exehead/exehead-lzma.dsp: removed a file
+
+2003-11-24 00:08 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Source/7zip,
+ /NSIS/trunk/Source/7zip/7zGuids.cpp,
+ /NSIS/trunk/Source/7zip/7zip,
+ /NSIS/trunk/Source/7zip/7zip/Common,
+ /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/InBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Common/OutBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZInWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZ/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMADecoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMADecoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALen.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALen.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALiteral.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/LZMALiteral.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/InBuffer.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMA.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMAConf.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMADecoder.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMADecoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMALenCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMALiteralCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZMAState.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/LZOutWindow.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoderBit.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoderBitTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/RangeCoderOpt.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/LZMA_SMALL/Types.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
+ /NSIS/trunk/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
+ /NSIS/trunk/Source/7zip/7zip/ICoder.h,
+ /NSIS/trunk/Source/7zip/7zip/IMyUnknown.h,
+ /NSIS/trunk/Source/7zip/7zip/IStream.h,
+ /NSIS/trunk/Source/7zip/Common,
+ /NSIS/trunk/Source/7zip/Common/ComTry.h,
+ /NSIS/trunk/Source/7zip/Common/CRC.cpp,
+ /NSIS/trunk/Source/7zip/Common/CRC.h,
+ /NSIS/trunk/Source/7zip/Common/Defs.h,
+ /NSIS/trunk/Source/7zip/Common/MyCom.h,
+ /NSIS/trunk/Source/7zip/Common/StdAfx.h,
+ /NSIS/trunk/Source/7zip/Common/Types.h,
+ /NSIS/trunk/Source/7zip/copying.txt,
+ /NSIS/trunk/Source/7zip/lzmaNSIS.cpp,
+ /NSIS/trunk/Source/7zip/lzmaNSIS.h,
+ /NSIS/trunk/Source/7zip/readme.txt, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/cbzip2.h,
+ /NSIS/trunk/Source/clzma.h, /NSIS/trunk/Source/compressor.h,
+ /NSIS/trunk/Source/czlib.h, /NSIS/trunk/Source/exedata.cpp,
+ /NSIS/trunk/Source/exedata.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exehead-lzma.dsp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/makenssi.dsw, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: -
+ First LZMA enhanced NSIS version - experimental
+ - Added SetCompressorDictSize (only works for LZMA)
+ - Added SetCompressionLevel (only "works" for zlib and bzip2) -
+ doesn't work for now
+ - Section is only supposed to get 4 parameters if /o is specified
+ - Updated version numbers
+
+2003-11-21 21:57 icemank
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Fixed handling of command
+ line SetCompressor option.
+
+2003-11-21 21:47 kichik
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh: 1.67
+ update
+
+2003-11-21 19:31 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: keep original verbose
+ setting, added MUI_VERBOSE setting
+
+2003-11-20 17:48 icemank
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h: Fixed compressor
+ initialization
+
+2003-11-20 10:37 kichik
+
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh: Serbian
+ language files update
+
+2003-11-20 10:36 kichik
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh: Version
+ number was wrong
+
+2003-11-19 22:19
+
+ * /NSIS/tags/v20b4, /NSIS/tags/v20b4/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20b4/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20b4/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/tags/v20b4/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20b4/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20b4/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20b4/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20b4/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20b4/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20b4/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20b4/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20b4/Contrib/zip2exe,
+ /NSIS/tags/v20b4/Contrib/zip2exe/Base.nsh,
+ /NSIS/tags/v20b4/Contrib/zip2exe/Classic.nsh,
+ /NSIS/tags/v20b4/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20b4/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20b4/Contrib/zip2exe/Modern.nsh,
+ /NSIS/tags/v20b4/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20b4/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20b4/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20b4/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20b4/Source/afxres.h,
+ /NSIS/tags/v20b4/Source/exedata.h,
+ /NSIS/tags/v20b4/Source/exehead/afxres.h,
+ /NSIS/tags/v20b4/Source/exehead/bin2h.c,
+ /NSIS/tags/v20b4/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20b4/Source/exehead/Makefile,
+ /NSIS/tags/v20b4/Source/exehead/uninst.ico,
+ /NSIS/tags/v20b4/Source/Makefile,
+ /NSIS/tags/v20b4/Source/makenssi.dsw,
+ /NSIS/tags/v20b4/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20b4'.
-2003-12-09 joostverburg
+2003-11-19 22:19 joostverburg
- * Contrib/Modern UI/Language files/Japanese.nsh, Contrib/Modern
- UI/Language files/German.nsh: 1.68
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: corrections
-2003-12-09 kichik
+2003-11-19 21:45 joostverburg
- * Source/exehead/Ui.c: Around 20 bytes down
+ * /NSIS/trunk/Examples/rtest.nsi: test GetFunctionAddress too
-2003-12-08 kichik
+2003-11-19 21:27 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: First verify fields
- and then, only if all are valid, call the leave function
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: Empty password
+ for anonymous CVS
-2003-12-08 kichik
+2003-11-19 21:24 joostverburg
- * Contrib/StartMenu/StartMenu.c: - fixed bug #848868 - StartMenu
- trims 3 lines of text - made StartMenu treat different fonts
- better, it will not resize according to the selected font
+ * /NSIS/trunk/Examples/cvsdata.nsi: missing dir, function update
-2003-12-08 kichik
+2003-11-19 17:40 joostverburg
- * Source/build.cpp, Source/util.cpp: accept different order in
- install and uninstall icon files, as long as all of the sizes and
- color depths match
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: functions, texts,
+ link
-2003-12-06 kichik
+2003-11-19 16:52 kichik
- * makensis.exe: Latest changes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: fixed
+ accents
-2003-12-06 kichik
+2003-11-19 16:28 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp, Contrib/Language
- files/Hebrew.nlf, Contrib/Modern UI/Language files/Hebrew.nsh,
- Contrib/StartMenu/StartMenu.c, Source/DialogTemplate.cpp,
- Source/lang.cpp, Source/exehead/Ui.c, Source/exehead/fileform.h,
- Source/exehead/util.c: - Better RTL support: * use RTL reading
- wherever possible (shows the dots, commas, etc. in the correct
- order) * Message boxes are now RTL too * Fixed RTL for links in
- InstallOptions - Fixed tab order in StartMenu - Made StartMenu use
- SHGetSpecialFolderLocation (soon to be in NSIS core too)
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/intro.but: default strings, current folder
-2003-12-05 joostverburg
+2003-11-19 15:51 joostverburg
- * Contrib/Modern UI/Language files/Croatian.nsh: 1.68
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf: v6
-2003-12-05 joostverburg
+2003-11-19 15:51 joostverburg
- * Contrib/Modern UI/System.nsh: finish/abort header subtext can be
- set without setting the text
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh: 1.67
-2003-12-05 joostverburg
+2003-11-19 14:18 joostverburg
- * Contrib/Modern UI/Language files/Turkish.nsh: 1.68
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh: 1.67
-2003-12-05 kichik
+2003-11-19 14:08 kichik
- * Contrib/Modern UI/System.nsh: Fixed bug #854678 - sub-header
- showing success on abort
+ * /NSIS/trunk/Examples/viewhtml.nsi: Chapter1.html no longer comes
+ with the default package
-2003-12-05 eccles
+2003-11-19 13:51 kichik
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/testnotify.ini,
- Contrib/InstallOptions/testnotify.nsi, Examples/makensis.nsi: -
- Added new control type "Button" - Added new flag "NOTIFY" - Added
- new flag "NOWORDWRAP" for multi-line text boxes - Reduced size down
- to 12K
+ * /NSIS/trunk/Examples/bigtest.nsi: graphics path changed
-2003-12-04 joostverburg
+2003-11-19 13:51 joostverburg
- * Contrib/Modern UI/Language files/Slovak.nsh: 1.68
+ * /NSIS/trunk/Contrib/Graphics/Icons/nsis1-install.ico: added 16x16
+ icon
-2003-12-04 joostverburg
+2003-11-19 13:21 kichik
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: removed old font setting
+ * /NSIS/trunk/Examples/makensis.nsi: Removed "(CVS)" from version
-2003-12-04 joostverburg
+2003-11-19 13:11 kichik
- * Examples/makensis.nsi: file association, section macros, fixes
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: -
+ Fixed bug #844989 - multiple uninstaller subsections problems
+ - Removed "(CVS)" from version number
-2003-12-04 kichik
+2003-11-19 04:38 icemank
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: 1.68
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Added compressor setting
+ option
-2003-12-03 joostverburg
+2003-11-18 23:40 zarg
- * Examples/makensis.nsi: typo
+ * /NSIS/trunk/Docs/src/attributes.but: LicenseText, ComponentText
+ and DirText updated as they are no longer needed to show certain
+ pages. These are now used to change the default text instead -
+ which have been moved to the NLF files.
-2003-12-03 kichik
+2003-11-18 22:35 kichik
- * Examples/makensis.nsi: another spelling mistake (recommAnded)
+ * /NSIS/trunk/Source/lang.cpp: Font goes in $(^Font), font size
+ goes in $(^FontSize)...
-2003-12-03 zarg
+2003-11-18 21:31 joostverburg
- * Examples/makensis.nsi: Speeling mishtake =)
+ * /NSIS/trunk/Contrib/Graphics/Header/nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/nsis-r.bmp,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: header image RTL
+ support, fixed NOSTRETCH settings
-2003-12-02 joostverburg
+2003-11-18 17:05 kichik
- * Contrib/Modern UI/Language files/Korean.nsh, Contrib/Modern
- UI/Language files/Ukrainian.nsh: 1.68
+ * /NSIS/trunk/Docs/src/credits.but: Farsi language files credits
-2003-12-02 kichik
+2003-11-18 17:04 kichik
- * Examples/example2.nsi: missed Install_Dir
+ * /NSIS/trunk/Source/exehead/Ui.c: Only map X button to Next if
+ we're on the last page
-2003-12-02 ramon18
+2003-11-18 17:01 joostverburg
- * Contrib/Modern UI/Language files/Portuguese.nsh: Portuguese
- language files update (nsh->1.68)
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: html structure
-2003-12-02 ramon18
+2003-11-18 15:14 kichik
- * Contrib/NSISdl/Script1.rc, Contrib/NSISdl/httpget.cpp,
- Contrib/NSISdl/nsisdl.cpp: Crash fixes, including firewall
- problems, many Optimizations
+ * /NSIS/trunk/Contrib/Language files/Farsi.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Farsi.nsh: Farsi
+ language files by FzerorubigD
-2003-12-02 kichik
+2003-11-18 14:30 kichik
- * Source/tokens.cpp: Added LZMA to SetCompressor's list
+ * /NSIS/trunk/Contrib/BgImage/BgImage.txt: Do not call SetBg from a
+ section
-2003-12-02 joostverburg
+2003-11-18 11:46 kichik
- * Examples/cvsdata.nsi, Examples/makensis.nsi: update/uninstall CVS
- data
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh:
+ Updated to 1.67 - thanks F. Heidenreich!
-2003-12-01 kichik
+2003-11-18 11:39 kichik
- * Contrib/Modern UI/Language files/Romanian.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh: MUI 1.68 updates
+ * /NSIS/trunk/Examples/makensis.nsi: INI file missing
-2003-12-01 kichik
+2003-11-17 23:16 kichik
- * Examples/makensis.nsi: fixed typo and added lzma source code
+ * /NSIS/trunk/Docs/src/tutorial.but: Fixed CHM link to MUI readme
-2003-12-01 kichik
+2003-11-17 13:49 kichik
- * Source/makenssi.cpp: obey /V for line breaks too
+ * /NSIS/trunk/Docs/src/registry.but: WriteRegExpandStr should have
+ a section of its own
-2003-12-01 icemank
+2003-11-16 22:53 ramon18
- * makensisw.exe: Minor fixes
+ * /NSIS/trunk/Docs/src/credits.but: Little update
-2003-12-01 kichik
+2003-11-16 22:45 kichik
- * Source/script.cpp: no need for that variable
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/tutorial.but: Added information about
+ uninstaller sections (bug #841421)
-2003-11-30 kichik
+2003-11-16 22:38 kichik
- * Source/build.cpp, Source/build.h, Source/makenssi.cpp,
- Source/script.cpp: build plug-in table only when needed. this also
- fixes warnings when using something like makensis.exe /X"OutFile
- bla.exe" /XSection /XSectionEnd
+ * /NSIS/trunk/Contrib/ExDLL/exdll.dpr,
+ /NSIS/trunk/Contrib/ExDLL/exdll_with_unit.dpr,
+ /NSIS/trunk/Contrib/ExDLL/nsis.pas: Applied patch #838864 - some
+ more optimizations
-2003-11-30 kichik
+2003-11-16 20:13 joostverburg
- * Source/script.cpp: !ifmacro[n]def based now works with !else
+ * /NSIS/trunk/Docs/src/attributes.but, /NSIS/trunk/Docs/style.css:
+ defaults bold and underlined
-2003-11-30 kichik
+2003-11-16 19:57 joostverburg
- * Source/build.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: !ifmacro[n]def based on Anders Kjersem's code
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/plugin.but, /NSIS/trunk/Docs/style.css:
+ updated outdated stuff, pages / plug-in calls / multiple
+ languages improved, red defaults, fixes
-2003-11-30 kichik
+2003-11-16 19:37 kichik
- * Source/7zip/lzmaNSIS.cpp, makensis.exe, Source/clzma.h: - Fixed a
- race condition that happened when LZMA compression finished and
- occasionally deadlocked the next call (solid installers weren't
- affected, just the compiler) - Added try and catch for LZMA just in
- case one of the rare exceptions will be thrown (just compiler)
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/test.ini: - PROMPT_CREATE
+ doesn't work with REQ_SAVE
+ - Example INI file had old flag names
-2003-11-29 kichik
+2003-11-16 18:55 kichik
- * Source/script.cpp: fixed !include not failing when it can't find
- the requested file
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf: Arabic is RTL
-2003-11-28 joostverburg
+2003-11-16 15:16 kichik
- * Contrib/Modern UI/System.nsh: fixed finish page reboot option
- buttons
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed a harmless typo
+ and made MUI_LANGUAGE only warn once if a language file is out of
+ date
-2003-11-28 joostverburg
+2003-11-16 14:52 kichik
- * Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/Lithuanian.nsh: 1.68
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.txt: dll not exe
-2003-11-28 kichik
+2003-11-15 17:48 kichik
- * makensis.exe, Source/exehead/Main.c: Removed extra back-slash in
- uninstaller execution path
+ * /NSIS/trunk/Docs/src/history.but: separated a bit
-2003-11-28 kichik
+2003-11-15 17:26 kichik
- * makensis.exe, Source/exehead/Main.c: bug #848173 - add trailing
- backslash to the temporary directory so root directories will be
- recognized as directories and not just the drive path.
+ * /NSIS/trunk/Docs/src/history.but: Updated changelog and release
+ notes
-2003-11-28 kichik
+2003-11-15 15:54 kichik
- * makensis.exe: Latest changes
+ * /NSIS/trunk/Docs/src/credits.but: added Ramon and Hebrew
+ translator
-2003-11-28 kichik
+2003-11-14 21:08 kichik
- * Source/exehead/Main.c: Made temporary folder validator make sure
- the temporary directory variable contains a fully qualified path.
- If it doesn't it'll full back to %WINDIR%\Temp. If that doesn't
- either, it'll fail. This shoulf fix bug #848173 where it would fail
- with the wrong message on WINE.
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: Files are not valid
+ installation folders
-2003-11-28 kichik
+2003-11-14 17:09 joostverburg
- * Source/exehead/Ui.c: Another little optimization
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh: fix
-2003-11-28 kichik
+2003-11-14 16:47 joostverburg
- * Source/exehead/Ui.c, Source/exehead/fileform.c,
- Source/exehead/util.c: - Made CRC checking from CD-ROM or a network
- drive faster - Some more optimizations
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: fix
-2003-11-28 icemank
+2003-11-14 16:46 joostverburg
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.rc: Minor fixes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh: 1.67
-2003-11-28 kichik
+2003-11-14 13:44 kichik
- * Source/script.cpp, Source/exehead/Ui.c, Source/exehead/exec.c:
- Some more optimizations
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Plugins/BgImage.dll: Better error handling
-2003-11-27 joostverburg
+2003-11-13 20:00 joostverburg
- * SetCVSShellCommands.exe, SetCVSShellCommands.nsi,
- Examples/makensis.nsi, Menu/compiler.html: section structure, file
- associations, shell extensions
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf: fix
-2003-11-27 kichik
+2003-11-13 13:04 kichik
- * Source/script.cpp, Source/7zip/lzmaNSIS.cpp,
- Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/fileform.h: - All message boxes in code now have a
- default for silent installers - Some size optimizations
+ * /NSIS/trunk/Contrib/ExDLL/exdll.dpr,
+ /NSIS/trunk/Contrib/ExDLL/exdll_with_unit.dpr,
+ /NSIS/trunk/Contrib/ExDLL/nsis.pas: Applied patch #838864 -
+ String-friendly Delphi ExDLL
-2003-11-27 kichik
+2003-11-13 11:43 joostverburg
- * Source/script.cpp: clean offsets for EW_SETFILEATTRIBUTES that
- comes after EW_EXTRACTFILE
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed abort subheader,
+ font langstrings
-2003-11-27 joostverburg
+2003-11-12 22:38 kichik
- * Contrib/Modern UI/Language files/Russian.nsh: 1.68, fixes
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h: ^Font and
+ ^FontSize
-2003-11-26 kichik
+2003-11-12 20:24 kichik
- * Source/build.cpp, Source/clzma.h: Smaller memory requirements on
- compile time (dict * 2 + 5MB)
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.dsp,
+ /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Contrib/Banner/Banner.dsp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsp,
+ /NSIS/trunk/Contrib/Dialer/dialer.c,
+ /NSIS/trunk/Contrib/Dialer/dialer.dsp,
+ /NSIS/trunk/Contrib/ExDLL/exdll.c,
+ /NSIS/trunk/Contrib/ExDLL/exdll.dsp,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.dsp,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsp,
+ /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Contrib/Splash/splash.dsp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsp,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.dsp,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.dsp: Call the
+ same DllMain for debug and release builds
-2003-11-26 joostverburg
+2003-11-12 18:45 kichik
- * Contrib/Modern UI/ioSpecial3.ini: no separate INI file anymore
+ * /NSIS/trunk/Docs/src/usefulinfos.but: typo
-2003-11-26 joostverburg
+2003-11-12 17:35 joostverburg
- * Contrib/Modern UI/Language files/Hungarian.nsh: 1.68
+ * /NSIS/trunk/Examples/makensis.nsi: UpgradeDLL include file,
+ removed old check
-2003-11-26 kichik
+2003-11-12 12:55 joostverburg
- * Docs/src/bin/halibut/LICENCE: Misspelled
+ * /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Include/UpgradeDLL.nsh: UpgradeDLL include file, VB6
+ runtime installation
-2003-11-26 kichik
+2003-11-11 23:54 kichik
- * Docs/src/bin/halibut/LICENSE: Added modification notice
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h: Link to CHM docs from
+ MakeNSISw
-2003-11-26 icemank
+2003-11-11 19:41 joostverburg
- * makensisw.exe, Contrib/Makensisw/makensisw.h: Changed display
- name for LZMA compressor
+ * /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but: updated UpgradeDLL, tutorial
-2003-11-25 icemank
+2003-11-11 16:56 joostverburg
- * Examples/makensis.nsi: Added context menu method for choosing
- compressor.
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed license page text
-2003-11-25 icemank
+2003-11-11 16:29 joostverburg
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/toolbar.bmp, Contrib/Makensisw/toolbar.cpp,
- Contrib/Makensisw/toolbar.h, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Fixed compressor selection. Added context menu
- method for choosing compressor. Changed Defines dialog to Settings
- dialog
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed finish page text
+ space when using 3 lines title, welcome page after installation
-2003-11-25 joostverburg
+2003-11-11 13:43 kichik
- * Contrib/zip2exe/Base.nsh, Contrib/zip2exe/main.cpp,
- Contrib/zip2exe/res.rc, Contrib/zip2exe/resource.h: version 0.31 *
- LZMA compression support * Fixed compression setting
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: - Recompile and Run (DrO)
+ - Fix for the context menu (DrO)
-2003-11-25 kichik
+2003-11-10 22:31 joostverburg
- * Examples/one-section.nsi, Include/Sections.nsh: Applied patch
- #849000 - New sections macros for mutually exclusive section
- selection by Tim Gallagher
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed custom header
+ text
-2003-11-25 kichik
+2003-11-10 22:27 joostverburg
- * Source/build.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/exehead/exec.c, Source/exehead/util.c: - More path
- validation (drive id is an english letter, no chars under 32 in a
- path) - Fixed bug #839214 - message box shown in silent mode if a
- file can't be opened for writing. Now it will skip the file if
- AllowSkipFiles is on and abort if it's not. - Added /SD parameter
- for MessageBox. Allows to set default for silent installers
- (MessageBox MB_OKCANCEL "OK? Cancel?" /SD IDOK IDOK doOK IDCANCEL
- doCancel)
+ * /NSIS/trunk/Contrib/NSIS Menu/src/html/m_links.cpp,
+ /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/images/arrow.gif,
+ /NSIS/trunk/Menu/images/arrowd.gif,
+ /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/images/version.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/intro.html, /NSIS/trunk/Menu/notinstalled.html,
+ /NSIS/trunk/Menu/update.html, /NSIS/trunk/Menu/websites.html: new
+ style
-2003-11-25 kichik
+2003-11-10 18:51 joostverburg
- * Source/7zip/lzmaNSIS.cpp: shaved 148 bytes, 236 more to go
+ * /NSIS/trunk/Examples/makensis.nsi: no need for makensis.htm
+ anymore
-2003-11-25 kichik
+2003-11-10 18:48 joostverburg
- * Source/build.h, Source/script.cpp: Allow wildcards in !include
+ * /NSIS/trunk/Examples/makensis.nsi: remove docs
-2003-11-25 kichik
+2003-11-10 18:44 joostverburg
- * Source/script.cpp: Added support for reading environmental
- variables on compile time - $%envVarName%.
+ * /NSIS/trunk/Menu/compiler.html: fix
-2003-11-25 kichik
+2003-11-10 18:43 joostverburg
- * Source/build.cpp, Source/build.h, Source/lang.cpp: Parse
- LangString using the codepage specified in NLF of the language.
- This helps avoid warnings about unknown variables with LangStrings
- that contain dollar signs but are not encoded with the system's
- current codepage.
+ * /NSIS/trunk/Examples/makensis.nsi: MUI Readme image
-2003-11-25 kichik
+2003-11-10 13:21 joostverburg
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: No such thing
- as MUI_UNINNERTEXT_LICENSE_TOP
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: start menu variable
+ > page macro parameter
-2003-11-24 kichik
+2003-11-09 23:10 ramon18
- * Contrib/Modern UI/Language files/Hebrew.nsh: Updated to 1.68
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/exehead/Ui.c: Reverted "Examples\Modern
+ UI\StartMenu.nsi" and "Plugins\StartMenu.dll" to previous
+ version, little size optimization
-2003-11-24 joostverburg
+2003-11-09 23:03 joostverburg
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini,
- Contrib/Modern UI/Language files/Default.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Examples/makensis.nsi, Examples/Modern
- UI/Basic.nsi, Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Modern UI 1.68
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: removed debug stuff
- * New settings for extra space for title and text on Welcome page
- and Finish page. * Improved handling of verbose settings. Define
- MUI_VERBOSE the set the Modern UI verbose level (1-4). * Language
- file string for uninstaller reboot information * Setting for folder
- validation in leave function * Fixed finish page text settings for
- multiple pages
+2003-11-09 22:45 ramon18
-2003-11-24 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Added new function LockWindow for
+ flickering problems workaround, fixed crash on NSISdl, fixed
+ focus button redraw
- * Source/build.cpp: Backwards compatibilty - sections that use
- SectionIn RO and no other SectionIn should be in all installation
- types
+2003-11-09 22:12 joostverburg
-2003-11-24 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: - Improved and
+ changed text settings
+ - ID for Start Menu Folder pages, easier to use multiple pages
+ - Language not written to registry after running uninstaller
+ - Fixed uninstaller auto close
+ - Documentation fixes
+ - Cleanup
- * license.txt, Source/7zip/readme.txt, Source/bzip2/Readme.txt:
- Note about different licenses
-
-2003-11-24 kichik
-
- * Source/7zip/readme.txt: Note about code modification
-
-2003-11-24 kichik
-
- * makensisw.exe, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc:
- Enabled LZMA selection
-
-2003-11-24 kichik
-
- * makensis.exe: Latest changes
-
-2003-11-24 kichik
-
- * Source/exehead/Ui.c, Source/script.cpp, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/tokens.cpp, Source/tokens.h:
- Added DirVerify (works in PageEx directory) and GetInstDirError. If
- `DirVerify leave' is used, the next button will not be disabled if
- the installation directory is not valid or there is not enough
- space and a flag will be set instead. You can read that flag using
- GetInstDirError in the leave function of the directory page. A
- value of 0 means no error, 1 means invalid installation directory
- and 2 means not enough space. This allows you to handle those
- errors on your own.
-
-2003-11-24 icemank
-
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/toolbar.bmp,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- Contrib/Makensisw/utils.h, makensisw.exe: Added support for LZMA
- compressor + fixed command line compressor support
-
-2003-11-24 kichik
-
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/util.c, Source/exehead/util.h: Added
- NSIS_CONFIG_LOG_ODS that makes the log use OutputDebugString
- instead of install.log.
-
-2003-11-24 kichik
-
- * Source/exehead/exec.c: Fixed bug #846723 - SetOutPath doesn't
- work with root directories
-
-2003-11-24 kichik
-
- * Source/build.cpp, Source/script.cpp, Source/exehead/exec.c,
- Source/exehead/fileform.h: Uninstaller data offset is saved as
- EW_WRITEUNINSTALLER's parameters. A step forward to multiple
- uninstallers and smaller exehead.
-
-2003-11-24 kichik
-
- * Source/exehead/exehead-lzma.dsp: removed a file
-
-2003-11-24 kichik
-
- * !InstallNSIS.bat, makensis.exe, Examples/makensis.nsi,
- Source/build.cpp, Source/build.h, Source/cbzip2.h, Source/clzma.h,
- Source/compressor.h, Source/czlib.h, Source/exedata.cpp,
- Source/exedata.h, Source/makenssi.cpp, Source/makenssi.dsp,
- Source/makenssi.dsw, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/7zip/7zGuids.cpp, Source/7zip/copying.txt,
- Source/7zip/lzmaNSIS.cpp, Source/7zip/lzmaNSIS.h,
- Source/7zip/readme.txt, Source/7zip/7zip/Common/InBuffer.cpp,
- Source/7zip/7zip/Common/InBuffer.h,
- Source/7zip/7zip/Common/OutBuffer.cpp,
- Source/7zip/7zip/Common/OutBuffer.h,
- Source/7zip/7zip/Common/StdAfx.h,
- Source/7zip/7zip/Compress/LZMA/LZMA.h,
- Source/7zip/7zip/Compress/LZMA/LZMADecoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMADecoder.h,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h,
- Source/7zip/7zip/Compress/LZMA/LZMALen.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMALen.h,
- Source/7zip/7zip/Compress/LZMA/LZMALiteral.cpp,
- Source/7zip/7zip/Compress/LZMA/LZMALiteral.h,
- Source/7zip/7zip/Compress/LZMA/StdAfx.h, Source/exehead/config.h,
- Source/exehead/exehead-lzma.dsp, Source/exehead/fileform.c,
- Source/7zip/7zip/ICoder.h, Source/7zip/7zip/IMyUnknown.h,
- Source/7zip/7zip/IStream.h,
- Source/7zip/7zip/Compress/LZ/IMatchFinder.h,
- Source/7zip/7zip/Compress/LZ/LZInWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZInWindow.h,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp,
- Source/7zip/7zip/Compress/LZ/LZOutWindow.h,
- Source/7zip/7zip/Compress/LZ/StdAfx.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h,
- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h,
- Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h,
- Source/7zip/7zip/Compress/RangeCoder/StdAfx.h,
- Source/7zip/Common/CRC.cpp, Source/7zip/Common/CRC.h,
- Source/7zip/Common/ComTry.h, Source/7zip/Common/Defs.h,
- Source/7zip/Common/MyCom.h, Source/7zip/Common/StdAfx.h,
- Source/7zip/Common/Types.h: - First LZMA enhanced NSIS version -
- experimental - Added SetCompressorDictSize (only works for LZMA) -
- Added SetCompressionLevel (only "works" for zlib and bzip2) -
- doesn't work for now - Section is only supposed to get 4 parameters
- if /o is specified - Updated version numbers
+2003-11-07 21:35 joostverburg
-2003-11-21 icemank
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.gif,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Readme.jpg,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: different uninstaller
+ header bitmap, fixes, cleanup
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/noclib.cpp, Contrib/Makensisw/noclib.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: Fixed
- handling of command line SetCompressor option.
+2003-11-07 17:59 joostverburg
-2003-11-21 kichik
+ * /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fixes,
+ easier to read
- * Contrib/Modern UI/Language files/Czech.nsh: 1.67 update
+2003-11-07 17:53 joostverburg
-2003-11-21 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: fixes
- * Contrib/Modern UI/System.nsh: keep original verbose setting,
- added MUI_VERBOSE setting
+2003-11-07 17:53 joostverburg
-2003-11-20 icemank
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: 1.67
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- makensisw.exe: Fixed compressor initialization
+2003-11-07 15:44 kichik
-2003-11-20 kichik
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh: updated
+ Hebrew language files
- * Contrib/Language files/Serbian.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh: Serbian language files update
+2003-11-07 13:49 joostverburg
-2003-11-20 kichik
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fix
- * Contrib/Modern UI/Language files/Hebrew.nsh: Version number was
- wrong
+2003-11-06 15:05 joostverburg
-2003-11-20 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/index.html: HTML Help documentation
- * Contrib/Modern UI/Readme.html: corrections
+2003-11-06 14:06 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fix
- * Examples/rtest.nsi: test GetFunctionAddress too
+2003-11-06 13:15 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/AdvSplash/Example.nsi,
+ /NSIS/trunk/Contrib/BgImage/Example.nsi: new Graphics folder
- * Examples/cvsdata.nsi: missing dir, function update
+2003-11-06 00:58 kichik
-2003-11-19 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: fixed 1%...35%...80%...100% bug
+ with details set to textonly
- * Contrib/Modern UI/Language files/Italian.nsh: fixed accents
+2003-11-05 16:05 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Header/nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/win.bmp: 256 colors
- * NSIS.chm, Docs/Chapter1.html, Docs/Chapter4.html,
- Docs/src/attributes.but, Docs/src/basic.but, Docs/src/file.but,
- Docs/src/generalpurpose.but, Docs/src/intro.but: default strings,
- current folder
+2003-11-05 16:02 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: added
+ MUI_(UN)WELCOMEFINISHPAGE_INI_3LINES, welcome page after
+ installation works, doc fixes
- * Contrib/Language files/Slovenian.nlf: v6
+2003-11-05 14:33 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finish page actions in
+ leave function, check for NSIS_CONFIG_SILENT_SUPPORT
- * Contrib/Modern UI/Language files/Slovenian.nsh: 1.67
+2003-11-05 14:20 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Wizard/llama.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/nullsoft.bmp: 16 colors
- * Contrib/Modern UI/Language files/Norwegian.nsh: 1.67
+2003-11-05 11:28 joostverburg
-2003-11-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: no language selection
+ dialog when installation is silent
- * Examples/viewhtml.nsi: Chapter1.html no longer comes with the
- default package
+2003-11-04 21:41 joostverburg
-2003-11-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/ioSpecial3.ini,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: only enable cancel on
+ finish page when there are checkboxes, no compiler warning
+ anymore
- * Examples/bigtest.nsi: graphics path changed
+2003-11-04 21:24 joostverburg
-2003-11-19 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fix
- * Contrib/Graphics/Icons/nsis1-install.ico: added 16x16 icon
+2003-11-04 16:59 kichik
-2003-11-19 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.dpr,
+ /NSIS/trunk/Contrib/ExDLL/nsis.pas: patch #835443 - simpler
+ SetUserVariable
- * Examples/makensis.nsi: Removed "(CVS)" from version
+2003-11-04 16:35 joostverburg
-2003-11-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/ioSpecial3.ini,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Cancel enabled on
+ Finish page, showreadme/run not executed when clicking cancel
- * makensis.exe: Latest changes
+2003-11-04 11:24 joostverburg
-2003-11-19 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: fix
- * Source/build.cpp, Source/makenssi.cpp, Source/script.cpp,
- Source/tokens.cpp: - Fixed bug #844989 - multiple uninstaller
- subsections problems - Removed "(CVS)" from version number
+2003-11-03 17:14 kichik
-2003-11-19 icemank
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/chm_config.but: - Updated preamble of CHM
+ - Fixed build.bat - now updates CHM
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/noclib.cpp,
- Contrib/Makensisw/noclib.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/toolbar.bmp,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- Contrib/Makensisw/Readme.txt, makensisw.exe: Added compressor
- setting option
+2003-11-03 12:09 kichik
-2003-11-19 zarg
+ * /NSIS/trunk/Docs/src/build.bat: Only copy CHM if it's different
- * NSIS.chm, Docs/AppendixE.html, Docs/Chapter4.html,
- Docs/src/attributes.but: LicenseText, ComponentText and DirText
- updated as they are no longer needed to show certain pages. These
- are now used to change the default text instead - which have been
- moved to the NLF files.
+2003-11-03 10:55 kichik
-2003-11-19 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: Updated "Calling an
+ external DLL using the System.dll plugin" to be more precise
+ about System parameters
- * Source/lang.cpp: Font goes in $(^Font), font size goes in
- $(^FontSize)...
+2003-11-03 09:10 kichik
-2003-11-18 joostverburg
+ * /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/src/bin/halibut/contents.c,
+ /NSIS/trunk/Docs/src/bin/halibut/error.c,
+ /NSIS/trunk/Docs/src/bin/halibut/halibut.h,
+ /NSIS/trunk/Docs/src/bin/halibut/input.c,
+ /NSIS/trunk/Docs/src/bin/halibut/main.c,
+ /NSIS/trunk/Docs/src/bin/halibut/makefile,
+ /NSIS/trunk/Docs/src/bin/halibut/malloc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/misc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.c,
+ /NSIS/trunk/Docs/src/bin/halibut/ustring.c,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/chm_config.but,
+ /NSIS/trunk/Docs/src/chmlink.js,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/langs.but,
+ /NSIS/trunk/Docs/src/modernui.but, /NSIS/trunk/Docs/src/nsis.hhp,
+ /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Docs/src/var.but: CHM documentation generates using
+ Halibut. Thanks Nike!
- * Contrib/Graphics/Header/nsis-r.bmp,
- Contrib/Graphics/Header/nsis.bmp, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: header image RTL support, fixed
- NOSTRETCH settings
+2003-11-03 09:01 kichik
-2003-11-18 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.dpr,
+ /NSIS/trunk/Contrib/ExDLL/nsis.pas: SetUserVariable for Delphi
+ ExDLL too - thanks spidervenom
- * Docs/src/credits.but: Farsi language files credits
+2003-11-02 23:37 zarg
-2003-11-18 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but: Updated or made clearer
+ cetarin commands and parameters, thanks to virtlink for the info.
- * Source/exehead/Ui.c: Only map X button to Next if we're on the
- last page
+2003-11-01 21:46 kichik
-2003-11-18 joostverburg
+ * /NSIS/trunk/Docs/src/registry.but: DeleteINIStr and DeleteINISec
+ do set the error flag if there was an error, but not if the key
+ or string were not there before.
- * Contrib/InstallOptions/Readme.html: html structure
+2003-11-01 21:41 kichik
-2003-11-18 kichik
+ * /NSIS/trunk/Docs/src/registry.but: DeleteINIStr and DeleteINISec
+ do not set the error flag
- * Contrib/Language files/Farsi.nlf, Contrib/Modern UI/Language
- files/Farsi.nsh: Farsi language files by FzerorubigD
+2003-11-01 19:56 eccles
-2003-11-18 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: More info about
+ escaping special characters.
- * Contrib/BgImage/BgImage.txt: Do not call SetBg from a section
+2003-11-01 18:42 kichik
-2003-11-18 kichik
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: No need for output from
+ cvsdata.nsi unless it's an error (working this time)
- * Contrib/Modern UI/Language files/Polish.nsh, Contrib/Modern
- UI/Language files/Romanian.nsh: Updated to 1.67 - thanks F.
- Heidenreich!
+2003-11-01 18:37 kichik
-2003-11-18 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: No need for output from
+ cvsdata.nsi unless it's an error
- * Examples/makensis.nsi: INI file missing
+2003-11-01 00:17 eccles
-2003-11-18 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: A backslash typed into a
+ Text field with MULTILINE flag was not being escaped when saved
+ back to State.
- * NSIS.chm, Docs/Chapter2.html, Docs/src/tutorial.but: Fixed CHM
- link to MUI readme
+2003-10-31 18:05 joostverburg
-2003-11-17 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: abort custom function
+ also work when not using abort warning
- * NSIS.chm, Docs/Chapter4.html, Docs/src/registry.but:
- WriteRegExpandStr should have a section of its own
+2003-10-31 15:23 joostverburg
-2003-11-17 kichik
+ * /NSIS/trunk/Docs/style.css: invalid pseudo-class
- * Docs/AppendixE.html, NSIS.chm: Compiled changes
+2003-10-31 13:06 joostverburg
-2003-11-17 ramon18
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf: fixed
+ codepage number
- * Docs/src/credits.but: Little update
+2003-10-30 23:51 eccles
-2003-11-17 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: - Icon and bitmap
+ controls were being passed the file name string on creation which
+ the control would interpret as the name of a resource, and fail.
+ - Now passes hInstance to LoadImage call which seems to solve a
+ bizarre sporadic possible Windows bug where the LR_LOADFROMFILE
+ parameter seems to be ignored.
- * NSIS.chm, Docs/AppendixD.html, Docs/AppendixE.html,
- Docs/Chapter2.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/attributes.but,
- Docs/src/sections.but, Docs/src/tutorial.but: Added information
- about uninstaller sections (bug #841421)
+2003-10-30 23:12 kichik
-2003-11-17 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: That shouldn't have gotten in
+ there...
- * Contrib/ExDLL/exdll.dpr, Contrib/ExDLL/exdll_with_unit.dpr,
- Contrib/ExDLL/nsis.pas: Applied patch #838864 - some more
- optimizations
+2003-10-30 00:08 kichik
-2003-11-16 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Minimal TreeView item hieght is
+ 16, the height of the checbox
- * Docs/style.css, Docs/src/attributes.but: defaults bold and
- underlined
+2003-10-28 22:59 kichik
-2003-11-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/Czech.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Norwegian.nlf: No need to
+ escape quotes, the slashes will show in the output
- * Docs/style.css, Docs/src/attributes.but,
- Docs/src/generalpurpose.but, Docs/src/langs.but,
- Docs/src/pages.but, Docs/src/plugin.but: updated outdated stuff,
- pages / plug-in calls / multiple languages improved, red defaults,
- fixes
+2003-10-28 18:30 joostverburg
-2003-11-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh: 1.67
- * Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/test.ini: - PROMPT_CREATE doesn't work with
- REQ_SAVE - Example INI file had old flag names
+2003-10-28 18:19 joostverburg
-2003-11-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: 1.67
- * Contrib/Language files/Arabic.nlf: Arabic is RTL
+2003-10-28 16:59 joostverburg
-2003-11-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: 1.67
- * Contrib/Modern UI/System.nsh: fixed a harmless typo and made
- MUI_LANGUAGE only warn once if a language file is out of date
+2003-10-28 16:58 joostverburg
-2003-11-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Swedish.nlf: v6
- * Contrib/AdvSplash/advsplash.txt: dll not exe
+2003-10-27 17:05 joostverburg
-2003-11-15 kichik
+ * /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: fixes
- * Docs/src/history.but: separated a bit
+2003-10-27 15:46 kichik
-2003-11-15 kichik
+ * /NSIS/trunk/Source/script.cpp: Fixed bug #830913 - if /nonfatal
+ is used a warning should be displayed, not an error
- * Docs/src/history.but: Updated changelog and release notes
+2003-10-27 13:55 joostverburg
-2003-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fixes
- * Docs/src/credits.but: added Ramon and Hebrew translator
+2003-10-27 12:54 joostverburg
-2003-11-15 kichik
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf: UninstallingText
- * makensis.exe: latest changes
+2003-10-27 12:53 joostverburg
-2003-11-14 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh: 1.67
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/util.c: Files are not valid installation folders
+2003-10-26 16:27 joostverburg
-2003-11-14 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: UninstallingText
- * Contrib/Modern UI/Language files/Macedonian.nsh: fix
+2003-10-26 16:27 joostverburg
-2003-11-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: 1.67
- * Contrib/Modern UI/Language files/Turkish.nsh: 1.67
+2003-10-26 13:33 joostverburg
-2003-11-14 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fixes
- * Contrib/Modern UI/Language files/Korean.nsh, Contrib/Language
- files/Turkish.nlf: fix
+2003-10-25 20:50 joostverburg
-2003-11-14 kichik
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf: lang ID
- * Contrib/BgImage/BgImage.cpp, Contrib/ExDLL/exdll.h: Better error
- handling
+2003-10-24 17:49 joostverburg
-2003-11-13 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: category fix
- * Contrib/Language files/Macedonian.nlf: fix
+2003-10-24 17:06 joostverburg
-2003-11-13 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: renamed MUI_CHECKBITMAP
+ to MUI_COMPONENTSPAGE_CHECKBITMAP
- * Contrib/ExDLL/exdll.dpr, Contrib/ExDLL/exdll_with_unit.dpr,
- Contrib/ExDLL/nsis.pas: Applied patch #838864 - String-friendly
- Delphi ExDLL
+2003-10-24 15:56 joostverburg
-2003-11-13 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fixes
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Japanese.nsh, Contrib/Modern UI/Language files/Korean.nsh,
- Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: fixed abort subheader, font
- langstrings
+2003-10-24 14:07 kichik
-2003-11-13 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: tab stop for license data
+ - thanks Nick Allan
- * makensis.exe, Source/lang.cpp, Source/lang.h: ^Font and ^FontSize
+2003-10-24 11:48 joostverburg
-2003-11-12 kichik
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf:
+ UninstallingText
- * Contrib/AdvSplash/advsplash.c, Contrib/AdvSplash/advsplash.dsp,
- Contrib/Banner/Banner.c, Contrib/Banner/Banner.dsp,
- Contrib/BgImage/BgImage.cpp, Contrib/BgImage/BgImage.dsp,
- Contrib/Dialer/dialer.c, Contrib/Dialer/dialer.dsp,
- Contrib/ExDLL/exdll.c, Contrib/ExDLL/exdll.dsp,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/io.dsp, Contrib/LangDLL/LangDLL.c,
- Contrib/LangDLL/LangDLL.dsp, Contrib/Splash/splash.c,
- Contrib/Splash/splash.dsp, Contrib/StartMenu/StartMenu.c,
- Contrib/StartMenu/StartMenu.dsp, Contrib/UserInfo/UserInfo.c,
- Contrib/UserInfo/UserInfo.dsp,
- Contrib/VPatch/Source/Plugin/vpatchdll.c,
- Contrib/VPatch/Source/Plugin/vpatchdll.dsp,
- Contrib/nsExec/nsExec.dsp, Contrib/nsExec/nsexec.c: Call the same
- DllMain for debug and release builds
+2003-10-24 11:47 joostverburg
-2003-11-12 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh: 1.67
- * NSIS.chm, Docs/AppendixC.html, Docs/src/usefulinfos.but: typo
+2003-10-23 22:19 ramon18
-2003-11-12 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh: FIX
+ - Portuguese language (upsss)
- * Examples/makensis.nsi: UpgradeDLL include file, removed old check
+2003-10-23 22:17 ramon18
-2003-11-12 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ Portuguese language files update (nsh->1.67) (UninstallingText
+ changed)
- * NSIS.chm, Docs/AppendixB.html, Docs/AppendixC.html,
- Docs/src/usefulfunc.but, Docs/src/usefulinfos.but,
- Include/UpgradeDLL.nsh: UpgradeDLL include file, VB6 runtime
- installation
+2003-10-23 20:34 joostverburg
-2003-11-12 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ 1.67
- * Contrib/Makensisw/makensisw.h, makensisw.exe: Link to CHM docs
- from MakeNSISw
+2003-10-23 20:34 joostverburg
-2003-11-11 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf:
+ UninstallingText
- * Docs/AppendixB.html, Docs/Chapter2.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, NSIS.chm,
- Docs/src/tutorial.but, Docs/src/usefulfunc.but: updated UpgradeDLL,
- tutorial
+2003-10-23 16:21 joostverburg
-2003-11-11 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: UninstallingText
- * Contrib/Modern UI/System.nsh: fixed license page text
+2003-10-23 16:21 joostverburg
-2003-11-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: 1.67
- * Contrib/Modern UI/System.nsh: fixed finish page text space when
- using 3 lines title, welcome page after installation
+2003-10-23 14:34 joostverburg
-2003-11-11 kichik
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf:
+ UninstallingText
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/toolbar.bmp,
- Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: - Recompile
- and Run (DrO) - Fix for the context menu (DrO)
+2003-10-23 14:33 joostverburg
-2003-11-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ 1.67
- * Contrib/Modern UI/System.nsh: fixed custom header text
+2003-10-23 14:32 joostverburg
-2003-11-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: version
- * Menu/compiler.html, NSIS.exe, Menu/docs.html, Menu/index.html,
- Menu/intro.html, Menu/notinstalled.html, Menu/update.html,
- Menu/websites.html, Menu/images/arrow.gif, Menu/images/arrowd.gif,
- Menu/images/header.gif, Menu/images/version.gif: new style
+2003-10-23 13:01 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/history.but: credits, history, links, fix
- * makensis.htm, Examples/makensis.nsi: no need for makensis.htm
- anymore
+2003-10-23 12:53 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf: UninstallingText
- * Examples/makensis.nsi: remove docs
+2003-10-23 12:51 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: 1.67
- * Menu/compiler.html: fix
+2003-10-23 12:43 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial3.ini,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixes: header text, 3
+ lines welcome/finish title, alternative comp page, docs
- * Examples/makensis.nsi: MUI Readme image
+2003-10-22 19:23 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Default.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.67
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Examples/Modern UI/StartMenu.nsi: start menu variable > page macro
- parameter
+2003-10-22 12:42 joostverburg
-2003-11-10 ramon18
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh: fixes
- * Examples/Modern UI/StartMenu.nsi, Source/exehead/Ui.c,
- makensis.exe: Reverted "Examples\Modern UI\StartMenu.nsi" and
- "Plugins\StartMenu.dll" to previous version, little size
- optimization
+2003-10-21 20:06 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh: new
+ format
- * Examples/Modern UI/StartMenu.nsi: removed debug stuff
+2003-10-20 12:22 joostverburg
-2003-11-10 ramon18
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ fixes
- * makensis.exe, Contrib/Modern UI/System.nsh, Examples/Modern
- UI/StartMenu.nsi, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/Ui.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/exehead/ui.h: Added new function LockWindow for flickering
- problems workaround, fixed crash on NSISdl, fixed focus button
- redraw
+2003-10-20 12:15 joostverburg
-2003-11-10 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh: 1.66
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/StartMenu.nsi: -
- Improved and changed text settings - ID for Start Menu Folder
- pages, easier to use multiple pages - Language not written to
- registry after running uninstaller - Fixed uninstaller auto close -
- Documentation fixes - Cleanup
+2003-10-20 12:14 joostverburg
-2003-11-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf: v6
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.gif,
- Contrib/Modern UI/Readme.html, Contrib/Modern UI/Readme.jpg,
- Contrib/Modern UI/System.nsh: different uninstaller header bitmap,
- fixes, cleanup
+2003-10-19 14:32 joostverburg
-2003-11-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: v6
- * Contrib/Language files/German.nlf, Contrib/Modern UI/Language
- files/German.nsh: fixes, easier to read
+2003-10-18 21:28 joostverburg
-2003-11-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: support
+ for uninst license, directory pages
- * Contrib/Language files/Russian.nlf: fixes
+2003-10-18 21:28 joostverburg
-2003-11-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf: v6
- * Contrib/Modern UI/Language files/Russian.nsh: 1.67
+2003-10-18 21:27 joostverburg
-2003-11-07 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh: 1.66
- * Contrib/Language files/Hebrew.nlf, Contrib/Modern UI/Language
- files/Hebrew.nsh: updated Hebrew language files
+2003-10-17 20:59 joostverburg
-2003-11-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ support for uninst license, directory pages
- * Contrib/Language files/German.nlf: fix
+2003-10-17 20:07 joostverburg
-2003-11-06 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Norwegian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Norwegian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Norwegian
+ langauge files
- * Examples/makensis.nsi, Menu/docs.html, Menu/index.html: HTML Help
- documentation
+2003-10-17 19:55 ramon18
-2003-11-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Fixed hidden controls
+ in header if welcome page is skipped
- * Contrib/Language files/German.nlf: fix
+2003-10-17 12:16 joostverburg
-2003-11-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh:
+ support for uninst license, directory pages
- * Contrib/AdvSplash/Example.nsi, Contrib/BgImage/Example.nsi: new
- Graphics folder
+2003-10-17 11:10 joostverburg
-2003-11-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh: support
+ for uninst license, directory pages
- * Source/exehead/Ui.c: fixed 1%...35%...80%...100% bug with details
- set to textonly
+2003-10-16 22:11 joostverburg
-2003-11-05 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new languages
- * Contrib/Graphics/Header/nsis.bmp,
- Contrib/Graphics/Header/win.bmp: 256 colors
+2003-10-16 21:39 joostverburg
-2003-11-05 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Czech.nlf: v6
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- added MUI_(UN)WELCOMEFINISHPAGE_INI_3LINES, welcome page after
- installation works, doc fixes
+2003-10-16 21:38 joostverburg
-2003-11-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh: 1.66
- * Contrib/Modern UI/System.nsh: finish page actions in leave
- function, check for NSIS_CONFIG_SILENT_SUPPORT
+2003-10-16 19:43 joostverburg
-2003-11-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Default.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Estonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Modern UI language
+ files backwards compatible
- * Contrib/Graphics/Wizard/llama.bmp,
- Contrib/Graphics/Wizard/nsis.bmp,
- Contrib/Graphics/Wizard/nullsoft.bmp: 16 colors
+2003-10-16 19:34 joostverburg
-2003-11-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: removed old macro
- * Contrib/Modern UI/System.nsh: no language selection dialog when
- installation is silent
+2003-10-16 19:24 joostverburg
-2003-11-04 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf: fix
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini,
- Contrib/Modern UI/ioSpecial3.ini: only enable cancel on finish page
- when there are checkboxes, no compiler warning anymore
+2003-10-16 15:21 joostverburg
-2003-11-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: 1.66
- * Contrib/Language files/German.nlf: fix
+2003-10-15 22:53 kichik
-2003-11-04 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Fixed bug #821933 -
+ InstallDirRegKey .exe comparation is case-sensitive
- * Contrib/ExDLL/exdll.dpr, Contrib/ExDLL/nsis.pas: patch #835443 -
- simpler SetUserVariable
+2003-10-14 19:41 joostverburg
-2003-11-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh: fix
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini,
- Contrib/Modern UI/ioSpecial3.ini: Cancel enabled on Finish page,
- showreadme/run not executed when clicking cancel
+2003-10-14 19:39 joostverburg
-2003-11-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: AutoCloseWindow
+ setting, uninst components page fixes
- * Contrib/Modern UI/Language files/Italian.nsh: fix
+2003-10-14 12:50 joostverburg
-2003-11-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: langauge fonts
- * NSIS.chm, Docs/src/build.bat, Docs/src/chm_config.but: - Updated
- preamble of CHM - Fixed build.bat - now updates CHM
+2003-10-14 12:31 joostverburg
-2003-11-03 kichik
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh: fixes
- * Docs/src/build.bat: Only copy CHM if it's different
+2003-10-12 22:48 zarg
-2003-11-03 kichik
+ * /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/usection.but: Changed some spelling mistakes
+ and gramma.
- * NSIS.chm, Docs/AppendixC.html, Docs/src/usefulinfos.but: Updated
- "Calling an external DLL using the System.dll plugin" to be more
- precise about System parameters
+2003-10-12 16:47 joostverburg
-2003-11-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe: page style
- * Docs/src/build.bat, Docs/src/history.but, Docs/src/langs.but,
- Docs/src/modernui.but, Docs/src/pages.but,
- Docs/src/bin/halibut.exe, Docs/src/bin/halibut/bk_xhtml.c,
- Docs/src/bin/halibut/contents.c, Docs/src/bin/halibut/error.c,
- Docs/src/bin/halibut/halibut.h, Docs/src/bin/halibut/input.c,
- Docs/src/bin/halibut/main.c, Docs/src/bin/halibut/makefile,
- Docs/src/bin/halibut/malloc.c, Docs/src/bin/halibut/misc.c,
- Docs/src/bin/halibut/tree234.c, Docs/src/bin/halibut/ustring.c,
- NSIS.chm, Docs/src/chm_config.but, Docs/src/chmlink.js,
- Docs/src/nsis.hhp, Docs/src/sec.but, Docs/src/tutorial.but,
- Docs/src/ui.but, Docs/src/var.but: CHM documentation generates
- using Halibut. Thanks Nike!
+2003-10-12 14:54 kichik
-2003-11-03 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/LICENSE: Halibut's license
- * Contrib/ExDLL/exdll.dpr, Contrib/ExDLL/nsis.pas: SetUserVariable
- for Delphi ExDLL too - thanks spidervenom
+2003-10-12 12:52 joostverburg
-2003-11-03 zarg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: improved GetParent,
+ GetParameters
- * Docs/Chapter4.html, Docs/src/attributes.but,
- Docs/src/flowcontrol.but: Updated or made clearer cetarin commands
- and parameters, thanks to virtlink for the info.
+2003-10-11 15:25 joostverburg
-2003-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed custom header
+ text
- * Docs/Chapter4.html, Docs/src/registry.but: DeleteINIStr and
- DeleteINISec do set the error flag if there was an error, but not
- if the key or string were not there before.
+2003-10-11 12:17 joostverburg
-2003-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed interface
+ problems when there are only custom pages
- * Docs/Chapter4.html, Docs/src/registry.but: DeleteINIStr and
- DeleteINISec do not set the error flag
+2003-10-09 22:19 kichik
-2003-11-01 eccles
+ * /NSIS/trunk/Docs/src/usefulinfos.but: grammer fix
- * makensis.exe: Latest changes
+2003-10-09 22:16 kichik
-2003-11-01 eccles
+ * /NSIS/trunk/Examples/makensis.nsi: always quote paths in
+ UninstallString
- * Contrib/InstallOptions/Readme.html: More info about escaping
- special characters.
+2003-10-09 14:41 joostverburg
-2003-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: header subtext can be
+ changed without changing text
- * Examples/cvsdata.nsi, Examples/makensis.nsi: No need for output
- from cvsdata.nsi unless it's an error (working this time)
+2003-10-08 18:06 kichik
-2003-11-01 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/pages.but: SubCaption for PageEx
- * Examples/makensis.nsi: No need for output from cvsdata.nsi unless
- it's an error
+2003-10-08 18:00 joostverburg
-2003-11-01 eccles
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: location of
+ LangDLL registry settings
- * Contrib/InstallOptions/InstallerOptions.cpp: A backslash typed
- into a Text field with MULTILINE flag was not being escaped when
- saved back to State.
+2003-10-08 17:44 joostverburg
-2003-10-31 joostverburg
+ * /NSIS/trunk/Examples/makensis.ini,
+ /NSIS/trunk/Examples/makensis.nsi: check for already installed
+ versions
- * Contrib/Modern UI/System.nsh: abort custom function also work
- when not using abort warning
+2003-10-08 15:28 joostverburg
-2003-10-31 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: updated reserve
+ file macros
- * Docs/style.css: invalid pseudo-class
+2003-10-08 11:20 joostverburg
-2003-10-31 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: updated info about
+ customized dialogs
- * Contrib/Language files/SimpChinese.nlf: fixed codepage number
+2003-10-08 11:19 joostverburg
-2003-10-31 eccles
+ * /NSIS/trunk/Examples/makensis.nsi: new position for interface
+ settings
- * Contrib/InstallOptions/InstallerOptions.cpp: - Icon and bitmap
- controls were being passed the file name string on creation which
- the control would interpret as the name of a resource, and fail. -
- Now passes hInstance to LoadImage call which seems to solve a
- bizarre sporadic possible Windows bug where the LR_LOADFROMFILE
- parameter seems to be ignored.
+2003-10-07 19:38 joostverburg
-2003-10-31 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: removed invalid undef
- * Source/exehead/Ui.c: That shouldn't have gotten in there...
+2003-10-07 18:13 joostverburg
-2003-10-30 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: typo
- * Source/exehead/Ui.c: Minimal TreeView item hieght is 16, the
- height of the checbox
+2003-10-07 18:01 joostverburg
-2003-10-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: new position for
+ interface settings, changed setting names, updated documentation
- * Contrib/Language files/Croatian.nlf, Contrib/Language
- files/Czech.nlf, Contrib/Language files/English.nlf,
- Contrib/Language files/French.nlf, Contrib/Language
- files/Hebrew.nlf, Contrib/Language files/Hungarian.nlf,
- Contrib/Language files/Macedonian.nlf, Contrib/Language
- files/Norwegian.nlf: No need to escape quotes, the slashes will
- show in the output
+2003-10-07 14:39 joostverburg
-2003-10-28 joostverburg
+ * /NSIS/trunk/Docs/src/config.but: web links
- * Contrib/Modern UI/Language files/Macedonian.nsh: 1.67
+2003-10-05 15:35 joostverburg
-2003-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh: new
+ language system
- * Contrib/Modern UI/Language files/Swedish.nsh: 1.67
+2003-10-05 15:33 joostverburg
-2003-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: 1.66
- * Contrib/Modern UI/Language files/Swedish.nsh: 1.67
+2003-10-05 15:32 joostverburg
-2003-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Ukrainian.nlf: v6
- * Contrib/Language files/Swedish.nlf: v6
+2003-10-05 15:29 joostverburg
-2003-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh: fixes
- * Contrib/Language files/French.nlf, Contrib/Modern UI/Language
- files/French.nsh: fixes
+2003-10-05 11:00 eccles
-2003-10-27 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/langs.but,
+ /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/registry.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Docs/src/var.but: Typos and spelling mistakes etc.
- * Source/script.cpp: Fixed bug #830913 - if /nonfatal is used a
- warning should be displayed, not an error
+2003-10-02 17:08 joostverburg
-2003-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Icons/classic-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/win-install.ico: improved
+ 16x16 icons
- * Contrib/Modern UI/Language files/German.nsh: fixes
+2003-10-02 12:20 kichik
-2003-10-27 joostverburg
+ * /NSIS/trunk/Source/exehead/ui.h: some parentheses just to be sure
- * Contrib/Language files/Slovak.nlf, Contrib/Language
- files/Croatian.nlf: UninstallingText
+2003-10-02 12:03 kichik
-2003-10-27 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: validate shortcut target, if
+ it turns up as a valid path spec (URLs should still work)
- * Contrib/Modern UI/Language files/French.nsh, Contrib/Modern
- UI/Language files/Slovak.nsh, Contrib/Modern UI/Language
- files/Croatian.nsh: 1.67
+2003-10-02 11:46 kichik
-2003-10-26 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: make sure the notify HWND is
+ valid
- * Contrib/Language files/Italian.nlf: UninstallingText
+2003-10-01 17:55 joostverburg
-2003-10-26 joostverburg
+ * /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/images/clear.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/intro.html, /NSIS/trunk/Menu/notinstalled.html,
+ /NSIS/trunk/Menu/update.html, /NSIS/trunk/Menu/websites.html:
+ Quick Launch page
- * Contrib/Modern UI/Language files/Italian.nsh: 1.67
+2003-09-30 15:56 joostverburg
-2003-10-26 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Icons/win-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/win-uninstall.ico: 16 colors,
+ added 16x16 icons
- * Contrib/Language files/German.nlf: fixes
+2003-09-30 15:13 joostverburg
-2003-10-25 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Icons/win-uninstall.ico: classic win
+ style uninstall icon
- * Contrib/Language files/SimpChinese.nlf: lang ID
+2003-09-30 11:44 kichik
-2003-10-24 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Bug in UpgradeDLL, thanks
+ TonyDS
- * Contrib/Modern UI/Readme.html: category fix
+2003-09-29 12:43 kichik
-2003-10-24 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Better context menu
+ handling by DrO
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- renamed MUI_CHECKBITMAP to MUI_COMPONENTSPAGE_CHECKBITMAP
+2003-09-29 10:59 joostverburg
-2003-10-24 joostverburg
+ * /NSIS/trunk/Contrib/Graphics/Icons/classic-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/nsis1-uninstall.ico:
+ classic/nsis1 uninstall icons
- * Contrib/Language files/German.nlf, Contrib/Modern UI/Language
- files/German.nsh: fixes
+2003-09-28 16:35 joostverburg
-2003-10-24 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/nsisconf.nsh: mui nsisconf macro backwards compatible
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/sdbarker_tiny.exe, Source/exehead/resource.rc: tab stop
- for license data - thanks Nick Allan
+2003-09-28 15:48 joostverburg
-2003-10-24 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/nsisconf.nsh: nsisconf header: more info, Modern UI
+ support, updated paths
- * Contrib/Language files/Hungarian.nlf: UninstallingText
+2003-09-28 15:24 eccles
-2003-10-24 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: - Initial keyboard focus
+ set to first (tab-able) field.
+ - Multi-line text boxes now wrap long lines unless horizontal
+ scroll bar is enabled.
- * Contrib/Modern UI/Language files/Hungarian.nsh: 1.67
+2003-09-28 12:46 joostverburg
-2003-10-24 ramon18
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: setting name typo
- * Contrib/Modern UI/Language files/Portuguese.nsh: FIX - Portuguese
- language (upsss)
+2003-09-28 12:42 joostverburg
-2003-10-24 ramon18
+ * /NSIS/trunk/Contrib/zip2exe/Base.nsh,
+ /NSIS/trunk/Contrib/zip2exe/Classic.nsh,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/Modern.nsh,
+ /NSIS/trunk/Contrib/zip2exe/res.rc,
+ /NSIS/trunk/Contrib/zip2exe/resource.h,
+ /NSIS/trunk/Examples/makensis.nsi: Zip2Exe 0.3: based on header
+ files, improved interface, Modern UI support, new script code,
+ improved folder detection
- * Contrib/Language files/Portuguese.nlf, Contrib/Modern UI/Language
- files/Portuguese.nsh: Portuguese language files update (nsh->1.67)
- (UninstallingText changed)
+2003-09-28 12:14 eccles
-2003-10-23 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c: No more Windows error message
+ when using IfFileExists on a removable drive with no media
+ inserted - now applies to all internal file_exists calls.
- * Contrib/Modern UI/Language files/Catalan.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh: 1.67
+2003-09-28 11:33 eccles
-2003-10-23 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: No more Windows error message
+ when using IfFileExists on a removable drive with no media
+ inserted.
- * Contrib/Language files/Catalan.nlf, Contrib/Language
- files/PortugueseBR.nlf: UninstallingText
+2003-09-27 22:41 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: no error when unused
+ uninst license/directory page strings do not exist
- * Contrib/Language files/German.nlf: UninstallingText
+2003-09-27 22:40 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh: fix
- * Contrib/Modern UI/Language files/German.nsh: 1.67
+2003-09-27 22:24 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Docs/src/usefulinfos.but: vb6 runtime: asycfilt.dll
+ should not be registered
- * Contrib/Language files/Greek.nlf, Contrib/Language
- files/SimpChinese.nlf, Contrib/Language files/TradChinese.nlf:
- UninstallingText
+2003-09-26 21:12 kichik
-2003-10-23 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Add a back-slash to $INSTDIR
+ when loading dir page only when it's a root directory
- * Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh: 1.67
+2003-09-26 19:02 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed abort warning
+ custom text
- * Contrib/Modern UI/Language files/English.nsh: version
+2003-09-26 17:01 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed issues with
+ multiple languages
- * Docs/AppendixD.html, Docs/AppendixE.html, Docs/Chapter4.html,
- Docs/src/attributes.but, Docs/src/callback.but,
- Docs/src/credits.but, Docs/src/history.but: credits, history,
- links, fix
+2003-09-26 14:43 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed issues with
+ multiple languages
- * Contrib/Language files/Japanese.nlf, Contrib/Language
- files/Korean.nlf, Contrib/Language files/Lithuanian.nlf,
- Contrib/Language files/Spanish.nlf: UninstallingText
+2003-09-26 14:17 kichik
-2003-10-23 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Accept root $INSTDIR on the
+ directory page too
- * Contrib/Modern UI/Language files/Japanese.nsh, Contrib/Modern
- UI/Language files/Korean.nsh, Contrib/Modern UI/Language
- files/Lithuanian.nsh, Contrib/Modern UI/Language files/Spanish.nsh,
- Contrib/Modern UI/Language files/Ukrainian.nsh: 1.67
+2003-09-26 12:34 joostverburg
-2003-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: uninstall confirm page
+ texts can be customized
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Contrib/Modern UI/ioSpecial3.ini: fixes: header text, 3 lines
- welcome/finish title, alternative comp page, docs
+2003-09-26 11:29 joostverburg
-2003-10-22 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed components page
+ custom leave function
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf, Contrib/Modern UI/Changelog.txt, Contrib/Modern
- UI/Readme.html, Contrib/Modern UI/System.nsh, Contrib/Modern
- UI/Language files/Default.nsh, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh,
- Examples/Modern UI/Basic.nsi, Examples/Modern UI/HeaderBitmap.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/StartMenu.nsi,
- Examples/makensis.nsi, Examples/Modern UI/WelcomeFinish.nsi: Modern
- UI 1.67
+2003-09-26 11:10 joostverburg
-2003-10-22 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: welcome text, finish link,
+ uninstall info
- * Contrib/Modern UI/Language files/Romanian.nsh: fixes
+2003-09-26 11:09 joostverburg
-2003-10-21 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi: new Graphics
+ folder
- * Contrib/Modern UI/Language files/Macedonian.nsh, Contrib/Modern
- UI/Language files/Serbian.nsh: new format
+2003-09-25 21:07 joostverburg
-2003-10-20 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: finished new
+ language system, fixed reservefile, fixed langdll text settings
+
+2003-09-25 11:45 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf: fix
+
+2003-09-25 11:45 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: support
+ for uninst license, directory pages
+
+2003-09-23 19:57 joostverburg
+
+ * /NSIS/trunk/Examples/makensis.nsi: forgot a SetOutPath, improved
+ desktop shortcut creation
+
+2003-09-23 19:56 kichik
+
+ * /NSIS/trunk/Source/build.cpp: Close the compressor before
+ starting to optimize to lower memory usage
+
+2003-09-23 19:01 kichik
+
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: - Fixed ComponentText without
+ InstTypes
+ - Made it impossible to install to non-existing drives/removable
+ drives with no media
+ - Fixed a crash caused by using a LangString in InstallDir
+ - No more Windows error message when a registered DLL dependency
+ can't be found
+
+2003-09-23 18:50 joostverburg
+
+ * /NSIS/trunk/Examples/makensis.nsi: new Graphics folder
+
+2003-09-23 18:50 joostverburg
+
+ * /NSIS/trunk/Examples/cvsdata.nsi: directories
+
+2003-09-23 18:34 joostverburg
+
+ * /NSIS/trunk/Contrib/Graphics,
+ /NSIS/trunk/Contrib/Graphics/Checks,
+ /NSIS/trunk/Contrib/Graphics/Checks/big.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/classic.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/classic-cross.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/colorful.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/grey.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/grey-cross.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/modern.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/red.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/red-round.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/simple.bmp,
+ /NSIS/trunk/Contrib/Graphics/Checks/simple-round.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header,
+ /NSIS/trunk/Contrib/Graphics/Header/nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Header/win.bmp,
+ /NSIS/trunk/Contrib/Graphics/Icons,
+ /NSIS/trunk/Contrib/Graphics/Icons/arrow-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/arrow-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/box-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/box-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/classic-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/classic-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/llama-blue.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/llama-grey.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-install-blue.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-install-blue-full.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-install-colorful.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-install-full.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-uninstall-blue.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-uninstall-blue-full.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-uninstall-colorful.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/modern-uninstall-full.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/nsis1-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/pixel-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/pixel-uninstall.ico,
+ /NSIS/trunk/Contrib/Graphics/Icons/win-install.ico,
+ /NSIS/trunk/Contrib/Graphics/Wizard,
+ /NSIS/trunk/Contrib/Graphics/Wizard/llama.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/nsis.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/nullsoft.bmp,
+ /NSIS/trunk/Contrib/Graphics/Wizard/win.bmp,
+ /NSIS/trunk/Contrib/Icons,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/shell.ico,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/NSIS Menu/nsismenu/nsisicon.ico,
+ /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Examples/gfx.nsi, /NSIS/trunk/Examples/makensis.nsi:
+ new Graphics folder with a good structure, updated icons
+
+2003-09-23 15:00 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh: 1.66
+
+2003-09-23 15:00 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf: v6
+
+2003-09-22 23:20 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi: Add Math to the start menu
+ group too
+
+2003-09-22 22:56 kichik
+
+ * /NSIS/trunk/Contrib/Math/Math.txt,
+ /NSIS/trunk/Contrib/Math/mathtest.ini,
+ /NSIS/trunk/Contrib/Math/mathtest.nsi,
+ /NSIS/trunk/Contrib/Math/Source/Math.c,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.h,
+ /NSIS/trunk/Contrib/Math/Source/plugin.c,
+ /NSIS/trunk/Plugins/Math.dll: 1. Unary-Pre operators detection
+ fixed.
+ 2. Unary Minus operator added (now legal, worked before?).
+ 3. GetReference operator (&). For example (a=&b; *a=3;) will set
+ b=3.
+ 4. Operators precedence added (C-like), much more intellectual
+ expressions parsing.
+ 5. Functions redefenition added, use "#name", like "func()(1);
+ #func()(2);".
+
+2003-09-22 22:18 kichik
+
+ * /NSIS/trunk/Menu/images/arrow.gif,
+ /NSIS/trunk/Menu/images/arrowd.gif, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: Added missing pictures and fixed
+ multiple arrowd.gif in one page
+
+2003-09-22 19:28 joostverburg
+
+ * /NSIS/trunk/Contrib/NSIS Menu/Info.txt, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsisicon.ico, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.sln, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.vcproj, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/helpctrl.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/helpdata.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/helpfrm.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlcell.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlfilt.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlpars.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmltag.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlwin.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmprint.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_dflist.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_fonts.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_hline.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_image.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_layout.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_links.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_list.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_pre.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_style.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_tables.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/winpars.cpp, /NSIS/trunk/Menu/compiler.html,
+ /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/images/btn-compiler.gif,
+ /NSIS/trunk/Menu/images/btn-docs.gif,
+ /NSIS/trunk/Menu/images/btn-update.gif,
+ /NSIS/trunk/Menu/images/btn-websites.gif,
+ /NSIS/trunk/Menu/images/btn-welcome.gif,
+ /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/images/line.gif,
+ /NSIS/trunk/Menu/images/silver.gif,
+ /NSIS/trunk/Menu/images/version.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/notinstalled.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: NSIS Menu updates: new design,
+ source fixes, use wxWindows 2.4.2
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh: fixes
+2003-09-22 16:06 kichik
-2003-10-20 joostverburg
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c: - .onVerifyInstDir is now used
+ in the browse dialog too
+ - Fixed problems with SHFileOperation, OleUninitialize and
+ ICopyHook (and possibly XPlay)
- * Contrib/Modern UI/Language files/Serbian.nsh: 1.66
+2003-09-22 10:09 kichik
-2003-10-20 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Ignore all commands but those who
+ start with an exclamation mark in nested ignored if blocks too
- * Contrib/Language files/Serbian.nlf: v6
+2003-09-21 16:22 kichik
-2003-10-19 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: a bit more testing
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Language
- files/Arabic.nlf: v6
+2003-09-21 16:18 kichik
-2003-10-18 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: added new/missing files
- * Contrib/Modern UI/Language files/Italian.nsh: support for uninst
- license, directory pages
+2003-09-21 12:09 joostverburg
-2003-10-18 joostverburg
+ * /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/modernui.but,
+ /NSIS/trunk/Docs/src/tutorial.but: changelog, tutorial, credits,
+ mui info
- * Contrib/Language files/Macedonian.nlf: v6
+2003-09-21 11:03 joostverburg
-2003-10-18 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: fixes
- * Contrib/Modern UI/Language files/Macedonian.nsh: 1.66
+2003-09-21 11:02 joostverburg
-2003-10-17 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: support
+ for uninst license, directory pages
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: support for
- uninst license, directory pages
+2003-09-21 11:00 joostverburg
-2003-10-17 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
- * Contrib/Language files/Norwegian.nlf, Contrib/Modern UI/Language
- files/Norwegian.nsh, Examples/Modern UI/MultiLanguage.nsi:
- Norwegian langauge files
+2003-09-20 16:38 joostverburg
-2003-10-17 ramon18
+ * /NSIS/trunk/Docs/src/usefulinfos.but: more info about compilation
+ (.NET SDK etc.)
- * Contrib/Modern UI/System.nsh: Fixed hidden controls in header if
- welcome page is skipped
+2003-09-20 10:03 kichik
-2003-10-17 joostverburg
+ * /NSIS/trunk/Source/build.cpp: NLF_[U]CAPTION is always required,
+ not only with a UI
- * Contrib/Modern UI/Language files/Romanian.nsh: support for uninst
- license, directory pages
+2003-09-20 09:40 kichik
-2003-10-17 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Finnish.nlf: Spacing fixes -
+ thanks pengyou
- * Contrib/Modern UI/Language files/Slovak.nsh: support for uninst
- license, directory pages
+2003-09-19 19:52 joostverburg
-2003-10-17 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fixes
- * Examples/Modern UI/MultiLanguage.nsi: new languages
+2003-09-19 19:51 joostverburg
-2003-10-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: support
+ for uninst license, directory pages
- * Contrib/Language files/Czech.nlf: v6
+2003-09-19 18:05 joostverburg
-2003-10-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: support
+ for uninst license, directory pages
- * Contrib/Modern UI/Language files/Czech.nsh: 1.66
+2003-09-19 18:04 joostverburg
-2003-10-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: fixes
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Bulgarian.nsh,
- Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/Language files/Danish.nsh, Contrib/Modern UI/Language
- files/Default.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/Estonian.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Hebrew.nsh, Contrib/Modern UI/Language files/Japanese.nsh,
- Contrib/Modern UI/Language files/Lithuanian.nsh, Contrib/Modern
- UI/Language files/Macedonian.nsh, Contrib/Modern UI/Language
- files/Serbian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Slovenian.nsh, Contrib/Modern UI/Language files/Swedish.nsh,
- Contrib/Modern UI/Language files/Thai.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: Modern UI language files
- backwards compatible
+2003-09-19 17:30 ramon18
-2003-10-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ Portuguese languages updates
- * Contrib/Modern UI/Readme.html: removed old macro
+2003-09-19 15:25 joostverburg
-2003-10-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh: fix
- * Contrib/Language files/Lithuanian.nlf: fix
+2003-09-19 15:24 joostverburg
-2003-10-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: removed invalid
+ comment
- * Contrib/Modern UI/Language files/Bulgarian.nsh, Contrib/Modern
- UI/Language files/Serbian.nsh, Contrib/Modern UI/Language
- files/Swedish.nsh: 1.66
+2003-09-19 15:24 joostverburg
-2003-10-16 kichik
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf: v6
- * Source/exehead/Ui.c: Fixed bug #821933 - InstallDirRegKey .exe
- comparation is case-sensitive
+2003-09-19 12:08 kichik
-2003-10-14 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.txt: that made sense...
- * Contrib/Modern UI/Language files/Portuguese.nsh: fix
+2003-09-19 11:57 kichik
-2003-10-14 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Fixed CRC error on bzip2
+ uninstallers - thanks psyke
- * Contrib/Modern UI/System.nsh: AutoCloseWindow setting, uninst
- components page fixes
+2003-09-18 12:49 joostverburg
-2003-10-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh: 1.66
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Contrib/Modern UI/Language files/Japanese.nsh, Contrib/Modern
- UI/Language files/Korean.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh: langauge fonts
+2003-09-17 11:32 kichik
-2003-10-14 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fix by lking
- * Contrib/Modern UI/Language files/Croatian.nsh, Contrib/Language
- files/Croatian.nlf: fixes
+2003-09-16 19:07 kichik
-2003-10-13 zarg
+ * /NSIS/trunk/Source/build.cpp: Fixed a dumb bug with the data
+ block optimizer that caused the compiler to crash if something
+ was actually optimized
- * Docs/Chapter4.html, Docs/src/sections.but, Docs/src/usection.but:
- Changed some spelling mistakes and gramma.
+2003-09-16 16:44 kichik
-2003-10-12 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsExec.txt: /CMD no longer exists
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini,
- Contrib/UIs/modern.exe, Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmpr.exe: page style
+2003-09-16 09:36 kichik
-2003-10-12 kichik
+ * /NSIS/trunk/Source/strlist.h: Removed debug message
- * Docs/src/bin/halibut/LICENSE: Halibut's license
+2003-09-16 09:19 kichik
-2003-10-12 joostverburg
+ * /NSIS/trunk/Source/build.cpp: fixed add_db_data crashing on empty
+ inputs
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: improved GetParent,
- GetParameters
+2003-09-15 23:20 kichik
-2003-10-11 joostverburg
+ * /NSIS/trunk/Contrib/Math, /NSIS/trunk/Contrib/Math/math.nsi,
+ /NSIS/trunk/Contrib/Math/Math.txt,
+ /NSIS/trunk/Contrib/Math/mathtest.ini,
+ /NSIS/trunk/Contrib/Math/mathtest.nsi,
+ /NSIS/trunk/Contrib/Math/mathtest.txt,
+ /NSIS/trunk/Contrib/Math/Source,
+ /NSIS/trunk/Contrib/Math/Source/Math.c,
+ /NSIS/trunk/Contrib/Math/Source/Math.h,
+ /NSIS/trunk/Contrib/Math/Source/Math.sln,
+ /NSIS/trunk/Contrib/Math/Source/Math.vcproj,
+ /NSIS/trunk/Contrib/Math/Source/mathcrt.h,
+ /NSIS/trunk/Contrib/Math/Source/mathcrt.lib,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.c,
+ /NSIS/trunk/Contrib/Math/Source/MyMath.h,
+ /NSIS/trunk/Contrib/Math/Source/plugin.c,
+ /NSIS/trunk/Plugins/Math.dll: Another cool plug-in by
+ brainsucker, a calculator :)
- * Contrib/Modern UI/System.nsh: fixed custom header text
+2003-09-15 22:05 kichik
-2003-10-11 joostverburg
+ * /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h,
+ /NSIS/trunk/TODO.txt: - Improved file mapping so you can now
+ esaily compile installers up to 2GB with a minimum requirment of
+ memory (changable by FileBufSize)
+ - Fixed DirText
+ - Fixed new browse dialog style problems (thanks LIGHTNING UK!)
- * Contrib/Modern UI/System.nsh: fixed interface problems when there
- are only custom pages
+2003-09-15 19:18 joostverburg
-2003-10-10 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: improved GetParant,
+ GetParameters
- * Docs/AppendixC.html, Docs/src/usefulinfos.but: grammer fix
+2003-09-14 11:37 joostverburg
-2003-10-10 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe: solved description box border
+ problems with custom fonts
- * Docs/AppendixC.html, Examples/makensis.nsi: always quote paths in
- UninstallString
+2003-09-14 10:17 joostverburg
-2003-10-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh: 1.66
- * Contrib/Modern UI/System.nsh: header subtext can be changed
- without changing text
+2003-09-14 10:16 joostverburg
-2003-10-08 kichik
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf: v6
- * Docs/Chapter4.html, Docs/src/attributes.but, Docs/src/pages.but:
- SubCaption for PageEx
+2003-09-13 21:29 joostverburg
-2003-10-08 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh: 1.66
- * Contrib/Modern UI/Readme.html, Examples/Modern
- UI/MultiLanguage.nsi: location of LangDLL registry settings
+2003-09-13 21:27 joostverburg
-2003-10-08 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: v6
- * Examples/makensis.nsi, Examples/makensis.ini: check for already
- installed versions
+2003-09-13 21:24 joostverburg
-2003-10-08 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed license page
+ radio buttons
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Examples/makensis.nsi, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: updated reserve file macros
+2003-09-13 10:12 kichik
-2003-10-08 joostverburg
+ * /NSIS/trunk/Docs/src/usefulinfos.but: backslashes instead of
+ slashes
- * Contrib/Modern UI/Readme.html: updated info about customized
- dialogs
+2003-09-12 21:40 kichik
-2003-10-08 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp: - Fixed SpaceText none
+ - Fixed a crash that occured if LicenseData was not used and Page
+ license was
- * Examples/makensis.nsi: new position for interface settings
+2003-09-12 16:45 kichik
-2003-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Contrib/Banner/Banner.dsp,
+ /NSIS/trunk/Contrib/Banner/Readme.txt,
+ /NSIS/trunk/Plugins/Banner.dll: New and improved banner:
+ - No more crashes
+ - Responds to messages (and thus redraws itself)
+ - Doesn't put the main window on the background
+ - Some new /set tricks by brainsucker
- * Contrib/Modern UI/System.nsh: removed invalid undef
+2003-09-12 16:05 joostverburg
-2003-10-07 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: removed MUI_PRODUCT,
+ MUI_VERSION
- * Contrib/Modern UI/System.nsh: typo
+2003-09-12 15:13 joostverburg
-2003-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf: comments
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: new position for interface settings,
- changed setting names, updated documentation
+2003-09-12 14:07 joostverburg
-2003-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf: v6
- * Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/config.but: web links
+2003-09-12 14:07 joostverburg
-2003-10-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: 1.66
- * Contrib/Modern UI/Language files/Catalan.nsh: new language system
+2003-09-12 14:02 joostverburg
-2003-10-05 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: v6
- * Contrib/Modern UI/Language files/Ukrainian.nsh: 1.66
+2003-09-12 14:01 joostverburg
-2003-10-05 joostverburg
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.txt,
+ /NSIS/trunk/Contrib/AdvSplash/Example.nsi,
+ /NSIS/trunk/Plugins/advsplash.dll: 1. Supports any bpp for
+ transparent images
+ 2. Windows XP at bpp < 32 possible bug fixed
+ 3. Removed transparency by pallete color index (always use RGB
+ value)
+ 4. shrinked a bit (0.5 kb)
- * Contrib/Language files/Ukrainian.nlf: v6
+2003-09-12 13:58 kichik
-2003-10-05 joostverburg
+ * /NSIS/trunk/Plugins/System.dll: release 5 by brainsucker:
+ 1. u flag - unload dll after procedure call.
+ 2. some changes to asm to turn on Whole Program Optimization.
+ 3. Dll shrinked for 1 kb.
- * Contrib/Modern UI/Language files/Catalan.nsh: fixes
+2003-09-12 11:16 kichik
-2003-10-05 eccles
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/util.cpp: More memory clean-ups
- * Docs/AppendixC.html, Docs/AppendixD.html, Docs/Chapter2.html,
- Docs/Chapter4.html, Docs/src/attributes.but, Docs/src/build.bat,
- Docs/src/generalpurpose.but, Docs/src/history.but,
- Docs/src/langs.but, Docs/src/pages.but, Docs/src/registry.but,
- Docs/src/sec.but, Docs/src/tutorial.but, Docs/src/ui.but,
- Docs/src/usefulinfos.but, Docs/src/var.but: Typos and spelling
- mistakes etc.
+2003-09-11 20:46 kichik
-2003-10-02 joostverburg
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp: -
+ Fixed a crash caused by clicking cancel on a directory page
+ (thanks pengyou)
+ - Fixed some extraction progress issues
- * Contrib/Graphics/Icons/classic-install.ico,
- Contrib/Graphics/Icons/win-install.ico: improved 16x16 icons
+2003-09-11 20:31 kichik
-2003-10-02 kichik
+ * /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/Source/System.h,
+ /NSIS/trunk/Contrib/System/Source/System.vcproj,
+ /NSIS/trunk/Contrib/System/System.nsi,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Contrib/System/WhatsNew.txt: release 5 by
+ brainsucker:
+ 1. u flag - unload dll after procedure call.
+ 2. some changes to asm to turn on Whole Program Optimization.
+ 3. Dll shrinked for 1 kb.
+
+2003-09-11 16:34 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: support
+ for uninst license, directory pages
+
+2003-09-10 21:58 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ welcome page: "Click Next to continue" is back
+
+2003-09-10 16:39 kichik
+
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: - Fixed uninstaller refusal to
+ start when on the root directory (note that AllowRootDirInstall
+ true is still required)
+ - Some touch ups regarding NSIS_CONFIG_VISIBLE_SUPPORT
- * Source/exehead/ui.h: some parentheses just to be sure
+2003-09-10 13:44 kichik
-2003-10-02 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/util.cpp: -
+ Fixed SetOutPath not setting current directory if the directory
+ didn't exist before
+ - Fixed a memory leak
+
+2003-09-09 21:02 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: removed old stuff
+
+2003-09-09 20:59 joostverburg
+
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf: v6
+
+2003-09-09 20:59 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ 1.66
+
+2003-09-09 19:21 ramon18
+
+ * /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ Portuguese languages updates
- * Source/exehead/exec.c: validate shortcut target, if it turns up
- as a valid path spec (URLs should still work)
+2003-09-09 16:06 joostverburg
-2003-10-02 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: removed
+ MUI_PRODUCT, MUI_VERSION
- * Source/makenssi.cpp: make sure the notify HWND is valid
+2003-09-09 14:25 kichik
-2003-10-01 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Fixed overwrite failure on
+ Windows 2000/XP/2003 when the existing file was hidden
- * Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/intro.html, Menu/notinstalled.html, Menu/update.html,
- Menu/websites.html, Menu/images/clear.gif: Quick Launch page
+2003-09-08 17:02 joostverburg
-2003-09-30 joostverburg
+ * /NSIS/trunk/Docs/src/compiler.but: double word
- * Contrib/Graphics/Icons/win-install.ico,
- Contrib/Graphics/Icons/win-uninstall.ico: 16 colors, added 16x16
- icons
+2003-09-08 15:28 kichik
-2003-09-30 joostverburg
+ * /NSIS/trunk/Source/ResourceEditor.cpp: signed/unsigned mismatch
- * Contrib/Graphics/Icons/win-uninstall.ico: classic win style
- uninstall icon
+2003-09-08 14:41 joostverburg
-2003-09-30 kichik
+ * /NSIS/trunk/Contrib/Language files/Slovak.nlf: v6
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: Bug in UpgradeDLL,
- thanks TonyDS
+2003-09-08 14:39 joostverburg
-2003-09-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh: 1.66
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp: Better context
- menu handling by DrO
+2003-09-08 14:37 joostverburg
-2003-09-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh: support
+ for uninst license, directory pages
- * Contrib/Graphics/Icons/classic-uninstall.ico,
- Contrib/Graphics/Icons/nsis1-uninstall.ico: classic/nsis1 uninstall
- icons
+2003-09-08 14:32 joostverburg
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: setting multiple texts
- * nsisconf.nsh, Contrib/Modern UI/System.nsh: mui nsisconf macro
- backwards compatible
+2003-09-08 13:54 kichik
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: - Fixed uninstaller not
+ showing anything when installer is silent
+ - Improved CResourceEditor - should be more tolerant now
+ - Removed legacy code from InstallOptions and StartMenu
- * nsisconf.nsh, Contrib/Modern UI/System.nsh: nsisconf header: more
- info, Modern UI support, updated paths
+2003-09-08 10:38 kichik
-2003-09-28 eccles
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp: Fixed VIAddVersionKey
+ failing on empty inputs
- * Contrib/InstallOptions/InstallerOptions.cpp: - Initial keyboard
- focus set to first (tab-able) field. - Multi-line text boxes now
- wrap long lines unless horizontal scroll bar is enabled.
+2003-09-08 10:12 kichik
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Typo in
+ MUI_DIRECTORYPAGE_VARIABLE - thanks Zarik
- * Contrib/Modern UI/Readme.html: setting name typo
+2003-09-07 20:19 joostverburg
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: wrong
+ string names
- * Contrib/zip2exe/Base.nsh, Contrib/zip2exe/Classic.nsh,
- Contrib/zip2exe/Modern.nsh, Contrib/zip2exe/main.cpp,
- Contrib/zip2exe/res.rc, Contrib/zip2exe/resource.h,
- Examples/makensis.nsi: Zip2Exe 0.3: based on header files, improved
- interface, Modern UI support, new script code, improved folder
- detection
+2003-09-07 20:18 joostverburg
-2003-09-28 eccles
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: support
+ for uninst license, directory pages
- * Source/exehead/exec.c, Source/exehead/util.c: No more Windows
- error message when using IfFileExists on a removable drive with no
- media inserted - now applies to all internal file_exists calls.
+2003-09-07 20:18 joostverburg
-2003-09-28 eccles
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf: typo in
+ langstring name
- * Source/exehead/exec.c: No more Windows error message when using
- IfFileExists on a removable drive with no media inserted.
+2003-09-07 16:46 kichik
-2003-09-28 joostverburg
+ * /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/ui.but, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ fixed SetOverwrite and added ifdiff option
- * NSIS.exe: solved init problems, optimized
+2003-09-07 16:36 joostverburg
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finish page works
+ without welcome page; uninst dir page strings not included when
+ there is only an inst dir page
- * Contrib/Modern UI/System.nsh: no error when unused uninst
- license/directory page strings do not exist
+2003-09-07 14:36 kichik
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Temporary workaround to
+ FindControlIdx returning -1
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: fix
+2003-09-07 13:33 joostverburg
-2003-09-28 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf: v6
- * Docs/AppendixC.html, Docs/src/usefulinfos.but: vb6 runtime:
- asycfilt.dll should not be registered
+2003-09-07 13:31 joostverburg
-2003-09-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: 1.66
- * Source/exehead/Ui.c: Add a back-slash to $INSTDIR when loading
- dir page only when it's a root directory
+2003-09-07 13:27 joostverburg
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed page text
+ settings; support for uninst license, directory pages; renamed
+ language file string; updated startmenu text; removed old
+ language file strings
- * Contrib/Modern UI/System.nsh: fixed abort warning custom text
+2003-09-07 08:53 kichik
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Finnish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: -
+ fixed a typo in inner langstrings name - [un]LicenseTextRB
+ - Finnish language files updated
+ - made SetStlColors able to set background color with /BRANDING
+ - some optimizations
+ - fixed progress showing for WriteUninstaller
- * Contrib/Modern UI/System.nsh: fixed issues with multiple
- languages
+2003-09-07 04:56 icemank
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/toolbar.h: Fixed button count and
+ index numbers for toolbar
- * Contrib/Modern UI/System.nsh: fixed issues with multiple
- languages
+2003-09-06 22:24 joostverburg
-2003-09-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: missing word
- * Source/exehead/Ui.c: Accept root $INSTDIR on the directory page
- too
+2003-09-06 21:44 joostverburg
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: typo in
+ langstring name
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- uninstall confirm page texts can be customized
+2003-09-06 21:39 joostverburg
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ 1.66
- * Contrib/Modern UI/System.nsh: fixed components page custom leave
- function
+2003-09-06 20:52 joostverburg
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: always undef
+ MUI_FINISHPAGE_CURFIELD_NO
- * Examples/makensis.nsi: welcome text, finish link, uninstall info
+2003-09-06 20:41 kichik
-2003-09-26 joostverburg
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: v6
- * Examples/Modern UI/HeaderBitmap.nsi: new Graphics folder
+2003-09-06 20:25 joostverburg
-2003-09-25 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf: typo in langstring
+ name
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Catalan.nsh, Contrib/Modern UI/Language files/Croatian.nsh,
- Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh, Contrib/Modern UI/Language
- files/Finnish.nsh, Contrib/Modern UI/Language files/French.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Hungarian.nsh, Contrib/Modern UI/Language files/Italian.nsh,
- Contrib/Modern UI/Language files/Japanese.nsh, Contrib/Modern
- UI/Language files/Korean.nsh, Contrib/Modern UI/Language
- files/Lithuanian.nsh, Contrib/Modern UI/Language files/Polish.nsh,
- Contrib/Modern UI/Language files/Portuguese.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Romanian.nsh, Contrib/Modern UI/Language files/Russian.nsh,
- Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/Slovak.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Turkish.nsh, Examples/Modern UI/WelcomeFinish.nsi: finished
- new language system, fixed reservefile, fixed langdll text settings
+2003-09-06 19:52 joostverburg
-2003-09-25 joostverburg
+ * /NSIS/trunk/Contrib/Language files/French.nlf: v6
- * NSIS.exe: class name, optimization
+2003-09-06 19:48 kichik
-2003-09-25 joostverburg
+ * /NSIS/trunk/Source/script.cpp: !ifdef, again...
- * Contrib/Language files/Korean.nlf: fix
+2003-09-06 14:33 joostverburg
-2003-09-25 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: window caption
- * Contrib/Modern UI/Language files/Korean.nsh: support for uninst
- license, directory pages
+2003-09-06 12:45 joostverburg
-2003-09-23 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: v6
- * Examples/makensis.nsi: forgot a SetOutPath, improved desktop
- shortcut creation
+2003-09-06 12:44 joostverburg
-2003-09-23 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: 1.66
- * Source/build.cpp: Close the compressor before starting to
- optimize to lower memory usage
+2003-09-06 12:38 joostverburg
-2003-09-23 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: removed old info,
+ changelog
- * Source/build.cpp, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, makensis.exe, Source/exehead/util.c,
- Source/exehead/util.h: - Fixed ComponentText without InstTypes -
- Made it impossible to install to non-existing drives/removable
- drives with no media - Fixed a crash caused by using a LangString
- in InstallDir - No more Windows error message when a registered DLL
- dependency can't be found
+2003-09-06 12:31 joostverburg
-2003-09-23 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: quotes
- * Examples/makensis.nsi: new Graphics folder
+2003-09-06 11:57 joostverburg
-2003-09-23 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: v6
- * Examples/cvsdata.nsi: directories
+2003-09-06 11:57 joostverburg
-2003-09-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: 1.66
- * NSIS.exe, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/shell.ico, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/NSIS
- Menu/nsismenu/nsisicon.ico, Examples/gfx.nsi,
- Examples/makensis.nsi, makensisw.exe,
- Contrib/Graphics/Checks/big.bmp,
- Contrib/Graphics/Checks/classic-cross.bmp,
- Contrib/Graphics/Checks/classic.bmp,
- Contrib/Graphics/Checks/colorful.bmp,
- Contrib/Graphics/Checks/grey-cross.bmp,
- Contrib/Graphics/Checks/grey.bmp,
- Contrib/Graphics/Checks/modern.bmp,
- Contrib/Graphics/Checks/red-round.bmp,
- Contrib/Graphics/Checks/red.bmp,
- Contrib/Graphics/Checks/simple-round.bmp,
- Contrib/Graphics/Checks/simple.bmp,
- Contrib/Graphics/Header/nsis.bmp, Contrib/Graphics/Header/win.bmp,
- Contrib/Graphics/Icons/arrow-install.ico,
- Contrib/Graphics/Icons/arrow-uninstall.ico,
- Contrib/Graphics/Icons/box-install.ico,
- Contrib/Graphics/Icons/box-uninstall.ico,
- Contrib/Graphics/Icons/classic-install.ico,
- Contrib/Graphics/Icons/classic-uninstall.ico,
- Contrib/Graphics/Icons/llama-blue.ico,
- Contrib/Graphics/Icons/llama-grey.ico,
- Contrib/Graphics/Icons/modern-install-blue-full.ico,
- Contrib/Graphics/Icons/modern-install-blue.ico,
- Contrib/Graphics/Icons/modern-install-colorful.ico,
- Contrib/Graphics/Icons/modern-install-full.ico,
- Contrib/Graphics/Icons/modern-install.ico,
- Contrib/Graphics/Icons/modern-uninstall-blue-full.ico,
- Contrib/Graphics/Icons/modern-uninstall-blue.ico,
- Contrib/Graphics/Icons/modern-uninstall-colorful.ico,
- Contrib/Graphics/Icons/modern-uninstall-full.ico,
- Contrib/Graphics/Icons/modern-uninstall.ico,
- Contrib/Graphics/Icons/nsis1-install.ico,
- Contrib/Graphics/Icons/pixel-install.ico,
- Contrib/Graphics/Icons/pixel-uninstall.ico,
- Contrib/Graphics/Icons/win-install.ico,
- Contrib/Graphics/Wizard/llama.bmp,
- Contrib/Graphics/Wizard/nsis.bmp,
- Contrib/Graphics/Wizard/nullsoft.bmp,
- Contrib/Graphics/Wizard/win.bmp: new Graphics folder with a good
- structure, updated icons
+2003-09-06 10:01 kichik
-2003-09-23 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: Language
+ updates
- * Contrib/Modern UI/Language files/Turkish.nsh: 1.66
+2003-09-06 09:59 kichik
-2003-09-23 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: -
+ Fixed and improved SetFont
+ - Fixed WindowIcon
- * Contrib/Language files/Turkish.nlf: v6
+2003-09-05 22:22 kichik
-2003-09-23 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/script.cpp: Get progress bar to the end even
+ with subsections
- * Examples/makensis.nsi: Add Math to the start menu group too
+2003-09-05 22:05 kichik
-2003-09-23 kichik
+ * /NSIS/trunk/Source/build.cpp: Initialize build_include_depth
- * Contrib/Math/Math.txt, Contrib/Math/mathtest.ini,
- Contrib/Math/mathtest.nsi, Contrib/Math/Source/Math.c,
- Contrib/Math/Source/MyMath.h, Contrib/Math/Source/plugin.c: 1.
- Unary-Pre operators detection fixed. 2. Unary Minus operator added
- (now legal, worked before?). 3. GetReference operator (&). For
- example (a=&b; *a=3;) will set b=3. 4. Operators precedence added
- (C-like), much more intellectual expressions parsing. 5. Functions
- redefenition added, use "#name", like "func()(1); #func()(2);".
+2003-09-05 21:16 kichik
-2003-09-23 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/TODO.txt: No more static variables in CEXEBuild
+ member functions
- * Menu/update.html, Menu/websites.html, Menu/images/arrow.gif,
- Menu/images/arrowd.gif: Added missing pictures and fixed multiple
- arrowd.gif in one page
+2003-09-05 20:41 joostverburg
-2003-09-22 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: uninstaller close
+ button not set to finish button text
- * NSIS.exe, Contrib/NSIS Menu/Info.txt, Contrib/NSIS
- Menu/nsismenu/nsisicon.ico, Contrib/NSIS
- Menu/nsismenu/nsismenu.cpp, Contrib/NSIS
- Menu/nsismenu/nsismenu.sln, Contrib/NSIS
- Menu/nsismenu/nsismenu.vcproj, Menu/compiler.html, Menu/docs.html,
- Menu/index.html, Menu/notinstalled.html, Menu/update.html,
- Menu/websites.html, Menu/images/btn-compiler.gif,
- Menu/images/btn-docs.gif, Menu/images/btn-update.gif,
- Menu/images/btn-websites.gif, Menu/images/btn-welcome.gif,
- Menu/images/header.gif, Menu/images/line.gif,
- Menu/images/silver.gif, Menu/images/version.gif: NSIS Menu updates:
- new design, source fixes, use wxWindows 2.4.2
+2003-09-05 20:16 kichik
-2003-09-22 kichik
+ * /NSIS/trunk/Examples/languages.nsi: Updated to work with the
+ latest CVS version
- * makensis.exe, Source/exehead/Main.c, Source/exehead/Ui.c: -
- .onVerifyInstDir is now used in the browse dialog too - Fixed
- problems with SHFileOperation, OleUninitialize and ICopyHook (and
- possibly XPlay)
+2003-09-05 19:50 kichik
-2003-09-22 kichik
+ * /NSIS/trunk/Source/lang.cpp: Removed debug message
- * Source/script.cpp: Ignore all commands but those who start with
- an exclamation mark in nested ignored if blocks too
+2003-09-05 19:26 kichik
-2003-09-21 kichik
+ * /NSIS/trunk/Contrib/Banner/Banner.c: Reverting to old source code
+ for now
- * Contrib/InstallOptions/InstallerOptions.cpp: a bit more testing
+2003-09-05 19:26 kichik
-2003-09-21 kichik
+ * /NSIS/trunk/Plugins/Banner.dll: Adjusted to latest CVS version -
+ added ShowWindow(hwndDlg,SW_SHOW);
- * Examples/makensis.nsi: added new/missing files
+2003-09-05 19:20 kichik
-2003-09-21 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: Spanish
+ language files updated
- * Docs/AppendixA.html, Docs/AppendixD.html, Docs/AppendixE.html,
- Docs/Chapter2.html, Docs/src/credits.but, Docs/src/history.but,
- Docs/src/modernui.but, Docs/src/tutorial.but: changelog, tutorial,
- credits, mui info
+2003-09-05 15:16 joostverburg
-2003-09-21 joostverburg
+ * /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/example1.nsi,
+ /NSIS/trunk/Examples/example2.nsi, /NSIS/trunk/Examples/gfx.nsi,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/one-section.nsi,
+ /NSIS/trunk/Examples/primes.nsi, /NSIS/trunk/Examples/rtest.nsi,
+ /NSIS/trunk/Examples/UserVars.nsi,
+ /NSIS/trunk/Examples/waplugin.nsi: page commands
- * Contrib/Language files/Russian.nlf: fixes
+2003-09-05 14:56 joostverburg
-2003-09-21 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: UpgradeDLL: set overwrite
+ flag back
- * Contrib/Modern UI/Language files/Russian.nsh: support for uninst
- license, directory pages
+2003-09-05 14:55 kichik
-2003-09-21 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp:
+ Fixed LicesneData and language strings
- * Docs/AppendixD.html, Docs/src/history.but: updated changelog
+2003-09-05 14:14 kichik
-2003-09-20 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Only check for open if[n]def if
+ the compilation was successful
- * Docs/AppendixC.html, Docs/src/usefulinfos.but: more info about
- compilation (.NET SDK etc.)
+2003-09-05 14:10 joostverburg
-2003-09-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed page custom
+ functions
- * Source/build.cpp, makensis.exe: NLF_[U]CAPTION is always
- required, not only with a UI
+2003-09-05 14:10 joostverburg
-2003-09-20 kichik
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: version number
+ (1.66)
- * Contrib/Language files/Finnish.nlf: Spacing fixes - thanks
- pengyou
+2003-09-05 12:45 kichik
-2003-09-19 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Fixed SetDetailsPrint
- * Contrib/Language files/German.nlf: fixes
+2003-09-05 11:46 kichik
-2003-09-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/TODO.txt: - SetCompressor: added /FINAL switch
+ - SetOverwrite: added lastusd option
+ - Greek MUI translation v1.66
- * Contrib/Modern UI/Language files/German.nsh: support for uninst
- license, directory pages
+2003-09-05 11:17 kichik
-2003-09-19 joostverburg
+ * /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh: NLF
+ v6, MUI v.166
- * Contrib/Modern UI/Language files/Polish.nsh: support for uninst
- license, directory pages
+2003-09-05 10:40 kichik
-2003-09-19 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Main.c:
+ Missed some strings that should be processed - thanks mikem4600
- * Contrib/Language files/Polish.nlf: fixes
+2003-09-04 21:48 joostverburg
-2003-09-19 ramon18
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: settings: syntax,
+ removed old ones
- * Contrib/Modern UI/Language files/Portuguese.nsh: Portuguese
- languages updates
+2003-09-04 21:29 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed IO extract
+
+2003-09-04 21:20 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixed IO RTL setting
+
+2003-09-04 20:50 kichik
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: RTL welcome and finish
+ page
+
+2003-09-04 20:45 kichik
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Space after branding
+ text (in uninstaller too)
+
+2003-09-04 20:27 kichik
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Space after branding
+ text
+
+2003-09-04 20:25 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi: Compile with latest CVS
+ version
+
+2003-09-04 19:08 kichik
+
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h:
+ signed/unsigned mismatch
+
+2003-09-04 18:42 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern.exe, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.66:
+ support for uninst comp page, multiple pages, new language & page
+ system
+
+2003-09-04 18:25 kichik
+
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/Czech.nlf,
+ /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/Estonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Finnish.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Language files/Japanese.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovenian.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/Swedish.nlf,
+ /NSIS/trunk/Contrib/Language files/Thai.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Turkish.nlf,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsp,
+ /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/Source/System.h,
+ /NSIS/trunk/Contrib/System/Source/System.sln,
+ /NSIS/trunk/Contrib/System/Source/System.vcproj,
+ /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.h,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/langs.but,
+ /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Plugins/System.dll, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/exedata.cpp,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/resource.h,
+ /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h,
+ /NSIS/trunk/TODO.txt: * PageEx - every page can be used
+ everywhere and as many times as needed
+ * DirVar - easy way to add another dir page
+ * default strings in the language file (Page directory is enough,
+ no need for DirText)
+ * strings from the language file are now LangStrings that can be
+ used in the script
+ * no more /LANG - one string for all languages
+ * any lang strings can be used everywhere, installer or
+ uninstaller (no un.)
+ * no more unprocessed strings - variables can be used almost
+ everywhere (except in licenseData and InstallDirRegKey)
+ * DirText parm for browse dialog text
+ * SetBkColor -> SetCtlColors - can now set text color too
+ * fixed SetOutPath and File /r bug
+ * fixed File /a /oname bug
+ * added $_CLICK for pages
+ * added quotes support in lang files (patch #752620)
+ * extraction progress
+ * separate RTL dialogs for RTL langs (improved RTL too)
+ * InstallOptions RTL
+ * StartMenu RTL
+ * fixed RegDLL?
+ * added IfSilent and SetSilent (SetSilent only works from
+ .onInit)
+ * fixed verify window (it never showed) (bug #792494)
+ * fixed ifnewer readonly file problem (patch #783782)
+ * fixed wininit.ini manipulation when there is another section
+ after [rename]
+ * fixed some ClearType issues
+ * fixed a minor bug in the resource editor
+ * fixed !ifdef/!endif stuff, rewritten
+ * lots of code and comments clean ups
+ * got rid of some useless exceptions handling and STL classes
+ (still much more to go)
+ * lots of optimizations, of course ;)
+ * updated system.dll with support for GUID, WCHAR, and fast
+ VTable calling (i.e. COM ready)
+ * minor bug fixes
+
+2003-09-04 13:02 joostverburg
+
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: patch result
+
+2003-08-27 13:10 kichik
+
+ * /NSIS/trunk/Examples/one-section.nsi: No need with just two
+ sections
+
+2003-08-23 04:34 icemank
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Fixed MRU for Windows 9x
+
+2003-08-22 22:01 icemank
+
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: no message
+
+2003-08-22 21:34 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: fixed invalid link to
+ HeaderBitmap.nsi example
+
+2003-08-22 17:43 joostverburg
+
+ * /NSIS/trunk/Docs/src/pages.but: fixed InstallOptions link on site
+
+2003-08-22 11:55 joostverburg
-2003-09-19 joostverburg
+ * /NSIS/trunk/Menu/update.html: text update
- * Contrib/Modern UI/Language files/Lithuanian.nsh: fix
+2003-08-22 11:24 joostverburg
-2003-09-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: localize MUI_PRODUCT
- * Contrib/Language files/Dutch.nlf: removed invalid comment
+2003-08-19 19:44 joostverburg
-2003-09-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh: 1.65
- * Contrib/Language files/Lithuanian.nlf: v6
+2003-08-15 19:01 kichik
-2003-09-19 kichik
+ * /NSIS/trunk/Source/build.cpp: Fixed problem with LangString as
+ section name
- * Contrib/BgImage/BgImage.txt: that made sense...
+2003-08-15 16:36 flizebogen
-2003-09-19 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: Added very basic
+ informations about the new version commands (VIProductVersion,
+ VIAddVersionKey)
- * makensis.exe, Source/build.cpp: Fixed CRC error on bzip2
- uninstallers - thanks psyke
+2003-08-15 15:56 joostverburg
-2003-09-18 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf: v5
- * Contrib/Modern UI/Language files/Lithuanian.nsh: 1.66
+2003-08-13 16:24 icemank
-2003-09-17 kichik
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed bugs in MRU list
- * Contrib/Language files/German.nlf: fix by lking
+2003-08-13 16:18 icemank
-2003-09-16 kichik
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed bugs in MRU list
- * makensis.exe, Source/build.cpp: Fixed a dumb bug with the data
- block optimizer that caused the compiler to crash if something was
- actually optimized
+2003-08-13 16:02 icemank
-2003-09-16 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Fixed bugs in MRU list
- * Contrib/nsExec/nsExec.txt: /CMD no longer exists
+2003-08-13 12:30 sunjammerx
-2003-09-16 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: Fixed broken processor pack
+ link.
- * Source/strlist.h: Removed debug message
+2003-08-12 17:57 icemank
-2003-09-16 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Added MRU file list
- * Source/build.cpp, makensis.exe: fixed add_db_data crashing on
- empty inputs
+2003-08-12 15:11 joostverburg
-2003-09-16 kichik
+ * /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: updated texts, links
- * Contrib/Math/Math.txt, Contrib/Math/math.nsi,
- Contrib/Math/mathtest.ini, Contrib/Math/mathtest.nsi,
- Contrib/Math/mathtest.txt, Contrib/Math/Source/Math.c,
- Contrib/Math/Source/Math.h, Contrib/Math/Source/Math.sln,
- Contrib/Math/Source/Math.vcproj, Contrib/Math/Source/MyMath.c,
- Contrib/Math/Source/MyMath.h, Contrib/Math/Source/mathcrt.h,
- Contrib/Math/Source/mathcrt.lib, Contrib/Math/Source/plugin.c:
- Another cool plug-in by brainsucker, a calculator :)
+2003-08-12 14:37 kichik
-2003-09-16 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h: Direct link to new
+ website
- * Docs/AppendixD.html, Docs/Chapter2.html, Docs/Chapter4.html,
- Docs/src/compilerflags.but, Docs/src/history.but, Source/build.cpp,
- Source/build.h, Source/script.cpp, Source/strlist.h,
- Source/tokens.cpp, Source/tokens.h, TODO.txt, makensis.exe,
- Source/exehead/Ui.c: - Improved file mapping so you can now esaily
- compile installers up to 2GB with a minimum requirment of memory
- (changable by FileBufSize) - Fixed DirText - Fixed new browse
- dialog style problems (thanks LIGHTNING UK!)
+2003-08-12 14:26 joostverburg
-2003-09-15 joostverburg
+ * /NSIS/trunk/Contrib/VPatch/Readme.html: UI compilation
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: improved GetParant,
- GetParameters
+2003-08-12 14:25 joostverburg
-2003-09-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/makensis.nsi: reserve files
- * Contrib/UIs/modern.exe: solved description box border problems
- with custom fonts
+2003-08-12 13:08 joostverburg
-2003-09-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: added
+ MUI_FINISHPAGE_LINK_COLOR
- * Contrib/Modern UI/Language files/Japanese.nsh: 1.66
+2003-08-12 12:09 joostverburg
-2003-09-14 joostverburg
+ * /NSIS/trunk/Contrib/VPatch/Source/GenPat/VPatch2.bpg,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/VPatch2.bpg,
+ /NSIS/trunk/Examples/makensis.nsi: folder settings
- * Contrib/Language files/Japanese.nlf: v6
+2003-08-11 17:33 joostverburg
-2003-09-14 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: include new VPatch files
- * Contrib/Modern UI/Language files/Hungarian.nsh: 1.66
+2003-08-11 16:42 joostverburg
-2003-09-14 joostverburg
+ * /NSIS/trunk/Contrib/VPatch/GenPat.exe,
+ /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/Source,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/GenPat2.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/PatchGenerator.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/TreeCode.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/VAppend.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/vdsp_crc.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GenPat/VPatch2.bpg,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/AboutForm.dfm,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/AboutForm.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/DLLWrapper.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/MainForm.dfm,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/MainForm.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/PatchClasses.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/ProgressForm.dfm,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/ProgressForm.pas,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.dof,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.dpr,
+ /NSIS/trunk/Contrib/VPatch/Source/GUI/VPatchGUI.res,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.c,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.dsp,
+ /NSIS/trunk/Contrib/VPatch/Source/Plugin/vpatchdll.dsw,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.c,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.dsp,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.dsw: VPatch 2.0 final
- * Contrib/Language files/Hungarian.nlf: v6
+2003-08-09 23:23 kichik
-2003-09-14 joostverburg
+ * /NSIS/trunk/Docs/src/basic.but: Rename /REBOOTOK doesn't care if
+ the destination exists
- * Contrib/Modern UI/System.nsh: fixed license page radio buttons
+2003-08-09 15:21 kichik
-2003-09-13 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Finish page - reshow
+ controls for all cases, not just when the next button was clicked
- * Docs/AppendixC.html, Docs/src/usefulinfos.but: backslashes
- instead of slashes
+2003-08-08 22:03 kichik
-2003-09-13 kichik
+ * /NSIS/trunk/Docs/src/basic.but: Rename can't overwrite
- * makensis.exe, Source/build.cpp, Source/lang.cpp,
- Source/script.cpp: - Fixed SpaceText none - Fixed a crash that
- occured if LicenseData was not used and Page license was
+2003-08-08 13:56 kichik
-2003-09-12 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: Empty lines were not printed
+ (this time it's really fixed)
- * Contrib/Banner/Banner.c, Contrib/Banner/Banner.dsp,
- Contrib/Banner/Readme.txt: New and improved banner: - No more
- crashes - Responds to messages (and thus redraws itself) - Doesn't
- put the main window on the background - Some new /set tricks by
- brainsucker
+2003-08-08 13:39 kichik
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: - Empty lines were not printed
+ - CR or LF alone were not handled
+ - Tab conversion removed the next char
- * Examples/makensis.nsi: removed MUI_PRODUCT, MUI_VERSION
+2003-08-07 15:25 ramon18
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/ExDLL/extdll.inc: New MASM32 header for NSIS
+ plug-ins
- * Contrib/Language files/Croatian.nlf: comments
+2003-08-06 16:53 kichik
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/ExDLL/exdll_with_unit.dpr,
+ /NSIS/trunk/Contrib/ExDLL/nsis.pas: New Delphi unit for NSIS
+ plug-ins by Bernhard Mayer
- * Contrib/Language files/Croatian.nlf: v6
+2003-08-05 15:50 kichik
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: Reverted Ramon's addition
+ of SS_NOPREFIX. It causes trouble with ClearType, compatibility
+ and doesn't allow the user to use accelerators for edit boxes
+ anywhere.
- * Contrib/Modern UI/Language files/Croatian.nsh: 1.66
+2003-08-05 15:30 kichik
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: No need
+ to read STATE twice
- * Contrib/Modern UI/Language files/Polish.nsh: 1.66
+2003-08-05 15:05 kichik
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: - Removed SS_NOPREFIX
+ - Made IO return error instead of crashing if there are no fields
+ in the INI
- * Contrib/Language files/Polish.nlf: v6
+2003-08-04 22:57 kichik
-2003-09-12 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: SS_NOPREFIX made the
+ header texts redraw when ALT was pressed, allowing the text to be
+ shown on the finish page
- * Contrib/AdvSplash/Example.nsi, Contrib/AdvSplash/advsplash.c,
- Contrib/AdvSplash/advsplash.txt: 1. Supports any bpp for
- transparent images 2. Windows XP at bpp < 32 possible bug fixed 3.
- Removed transparency by pallete color index (always use RGB value)
- 4. shrinked a bit (0.5 kb)
+2003-08-04 14:41 kichik
-2003-09-12 kichik
+ * /NSIS/trunk/Source/exehead/resource.rc: DIALOGEX not DIALOG
- * Source/DialogTemplate.cpp, Source/ResourceVersionInfo.h,
- Source/build.cpp, Source/lang.cpp, Source/script.cpp,
- Source/strlist.h, Source/util.cpp: More memory clean-ups
+2003-08-04 12:16 kichik
-2003-09-11 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: /S is case sensitive
- * makensis.exe, Source/lang.cpp, Source/exehead/Ui.c,
- Source/exehead/fileform.c: - Fixed a crash caused by clicking
- cancel on a directory page (thanks pengyou) - Fixed some extraction
- progress issues
+2003-08-03 23:47 ramon18
-2003-09-11 kichik
+ * /NSIS/trunk/Plugins/nsExec.dll: Removed debug msgbox
- * Contrib/System/Source/System.c, Contrib/System/System.nsi,
- Contrib/System/System.txt, Contrib/System/WhatsNew.txt,
- Contrib/System/Source/System.h,
- Contrib/System/Source/System.vcproj: release 5 by brainsucker: 1. u
- flag - unload dll after procedure call. 2. some changes to asm to
- turn on Whole Program Optimization. 3. Dll shrinked for 1 kb.
+2003-08-03 23:32 kichik
-2003-09-11 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: It seems Windows 98 doesn't check
+ ranges...
- * Contrib/Modern UI/Language files/French.nsh: support for uninst
- license, directory pages
+2003-08-03 22:04 kichik
-2003-09-11 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: pszState can't be null
+ (thanks Case for the patch)
- * Contrib/Modern UI/Language files/Catalan.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/Language files/Finnish.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Italian.nsh, Contrib/Modern UI/Language files/Korean.nsh,
- Contrib/Modern UI/Language files/Portuguese.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Romanian.nsh, Contrib/Modern UI/Language files/Russian.nsh,
- Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/Slovak.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh: welcome page: "Click Next to continue" is
- back
+2003-08-03 21:06 joostverburg
-2003-09-10 kichik
+ * /NSIS/trunk/Docs/src/usefulinfos.but: new UpgradeDLL syntax
- * makensis.exe, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/state.h,
- Source/exehead/util.c: - Fixed uninstaller refusal to start when on
- the root directory (note that AllowRootDirInstall true is still
- required) - Some touch ups regarding NSIS_CONFIG_VISIBLE_SUPPORT
+2003-08-03 13:07 kichik
-2003-09-10 kichik
+ * /NSIS/trunk/Contrib/NSISdl/httpget.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Patch #781254 applied - thanks
+ Andrey Cherezov
- * Source/util.cpp, Source/exehead/exec.c, makensis.exe: - Fixed
- SetOutPath not setting current directory if the directory didn't
- exist before - Fixed a memory leak
+2003-08-03 12:59 kichik
-2003-09-10 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C: Fixed bug #777590 - inflate
+ left too early causing NSIS to think more data is needed thus
+ discarding unused data
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Catalan.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/Finnish.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Korean.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Romanian.nsh, Contrib/Modern UI/Language files/Russian.nsh,
- Contrib/Modern UI/Language files/Slovak.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh: removed old stuff
+2003-08-03 10:51 kichik
-2003-09-09 joostverburg
+ * /NSIS/trunk/Examples/one-section.nsi: Way simpler
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf: v6
+2003-07-29 20:28 ramon18
-2003-09-09 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh:
+ Croatian language files updates (thanks to RIV@NVX and iostriz)
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: 1.66
+2003-07-29 20:25 ramon18
-2003-09-09 ramon18
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/exehead/resource.rc: SS_NOPREFIX for all
+ STATIC controls, now is possible to name the installer as "My
+ company & CO" for example
- * Contrib/Language files/Portuguese.nlf, Contrib/Modern UI/Language
- files/Portuguese.nsh: Portuguese languages updates
+2003-07-26 12:54 joostverburg
-2003-09-09 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: typo
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Catalan.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/Finnish.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Korean.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Romanian.nsh, Contrib/Modern UI/Language files/Russian.nsh,
- Contrib/Modern UI/Language files/Slovak.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: removed MUI_PRODUCT, MUI_VERSION
+2003-07-26 12:45 joostverburg
-2003-09-09 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: UpgradeDLL: temp base dir
+ support (to solve Win9x issues)
- * makensis.exe, Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: Fixed overwrite failure on Windows
- 2000/XP/2003 when the existing file was hidden
+2003-07-26 12:15 joostverburg
-2003-09-08 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: hexadecimal
- * Docs/Chapter5.html, Docs/src/compiler.but: double word
+2003-07-26 12:15 joostverburg
-2003-09-08 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: Link control
+ TxtColor
- * Source/ResourceEditor.cpp: signed/unsigned mismatch
+2003-07-26 12:10 joostverburg
-2003-09-08 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Finish page: link color
+ (dark blue)
- * Contrib/Language files/Slovak.nlf: v6
+2003-07-26 11:58 joostverburg
-2003-09-08 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: spelling / grammar
+ fixes
- * Contrib/Modern UI/Language files/Slovak.nsh: 1.66
+2003-07-25 17:25 ramon18
-2003-09-08 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: Fix
- * Contrib/Modern UI/Language files/Catalan.nsh: support for uninst
- license, directory pages
+2003-07-24 13:25 kichik
-2003-09-08 joostverburg
+ * /NSIS/trunk/Source/exehead/fileform.c: Fix invalid CRC messages
+ for data < 512
- * Contrib/Modern UI/Readme.html: setting multiple texts
+2003-07-24 00:34 ramon18
-2003-09-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: removed
+ IMAGE_FILE_RELOCS_STRIPPED
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/StartMenu/StartMenu.c, makensis.exe,
- Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/build.cpp: - Fixed uninstaller not showing anything when
- installer is silent - Improved CResourceEditor - should be more
- tolerant now - Removed legacy code from InstallOptions and
- StartMenu
+2003-07-23 18:19 ramon18
-2003-09-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: temp console app now returns
+ correct exitcode from spawned process, temp file is deleted on
+ end
- * makensis.exe, Source/ResourceVersionInfo.cpp,
- Source/exehead/exec.c: Fixed VIAddVersionKey failing on empty
- inputs
+2003-07-23 09:38 ramon18
-2003-09-08 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: nsExec create a temp console app
+ to spawn commands, can run applications with user interface and
+ also 16bit DOS
- * Contrib/Modern UI/System.nsh: Typo in MUI_DIRECTORYPAGE_VARIABLE
- - thanks Zarik
+2003-07-23 09:34 ramon18
-2003-09-07 joostverburg
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c: NSIS_SUPPORT_LANG_IN_STRINGS
+ works without NSIS_SUPPORT_NAMED_USERVARS
- * Contrib/Modern UI/Language files/Dutch.nsh: wrong string names
+2003-07-22 08:33 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Source/exehead/fileform.c: Fixed CRC off and whole
+ compression
- * Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh: support for uninst license,
- directory pages
+2003-07-21 19:48 ramon18
-2003-09-07 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.txt,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/nsExec.dll: Fixed problem in IO
+ dirreq/filereq, optimized code, nsExec with /CMD param to allow
+ execute 16Bits DOS applications
- * Contrib/Language files/Spanish.nlf: typo in langstring name
+2003-07-21 11:30 kichik
-2003-09-07 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Fixed error flag when creating
+ directories with UNC paths
- * makensis.exe, Docs/Chapter4.html, Docs/src/compilerflags.but,
- Docs/src/ui.but, Source/script.cpp, Source/tokens.cpp,
- Source/exehead/exec.c: fixed SetOverwrite and added ifdiff option
+2003-07-21 11:11 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Don't show installation type
+ combo box when there are no InstTypes defined
- * Contrib/Modern UI/System.nsh: finish page works without welcome
- page; uninst dir page strings not included when there is only an
- inst dir page
+2003-07-20 11:14 kichik
-2003-09-07 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: UserVars.nsi added
- * Contrib/InstallOptions/InstallerOptions.cpp: Temporary workaround
- to FindControlIdx returning -1
+2003-07-20 10:54 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: Updates
- * Contrib/Language files/Italian.nlf: v6
+2003-07-19 13:24 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: clean up
- * Contrib/Modern UI/Language files/Italian.nsh: 1.66
+2003-07-19 12:43 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: StartMenu page should
+ work again
- * Contrib/Language files/Russian.nlf: v6
+2003-07-19 12:29 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Source/exehead/Main.c: Back to 33.5
- * Contrib/Modern UI/Language files/Russian.nsh: 1.66
+2003-07-19 12:15 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c: - Fixed uninstaller
+ - Fixed summary calculations
+ - Secret instruction
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Contrib/Modern UI/Language files/Catalan.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/Language files/Finnish.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Romanian.nsh, Contrib/Modern UI/Language files/Spanish.nsh:
- fixed page text settings; support for uninst license, directory
- pages; renamed language file string; updated startmenu text;
- removed old language file strings
+2003-07-19 12:06 ramon18
-2003-09-07 kichik
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h: Simplified searching for
+ escape charaters in strings when uservars enabled
- * Contrib/Language files/Finnish.nlf, Contrib/Modern UI/System.nsh,
- Contrib/Modern UI/Language files/Finnish.nsh, Source/lang.cpp,
- Source/script.cpp, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/bgbg.c, Source/exehead/fileform.c, makensis.exe,
- Source/tokens.cpp: - fixed a typo in inner langstrings name -
- [un]LicenseTextRB - Finnish language files updated - made
- SetStlColors able to set background color with /BRANDING - some
- optimizations - fixed progress showing for WriteUninstaller
+2003-07-19 00:42 ramon18
-2003-09-07 icemank
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: IO support for LINK
+ control text color (TxtColor). Fixed problem with ClearType fonts
+ in XP
- * makensisw.exe: Fixed version number in "About" dialog.
+2003-07-19 00:39 ramon18
-2003-09-07 icemank
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/strlist.h:
+ Uservars names not found in strings when names are very similar.
- * Contrib/Makensisw/toolbar.h: Fixed button count and index numbers
- for toolbar
+2003-07-18 21:33 kichik
-2003-09-07 joostverburg
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/lang.h: Back to normal messages
- * Contrib/Modern UI/Readme.html: missing word
+2003-07-18 21:32 joostverburg
-2003-09-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: set background color of
+ link control
- * Contrib/Language files/PortugueseBR.nlf: typo in langstring name
+2003-07-18 21:25 joostverburg
-2003-09-07 joostverburg
+ * /NSIS/trunk/Docs/src/var.but: typo
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: 1.66
+2003-07-18 19:46 joostverburg
-2003-09-06 joostverburg
+ * /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/src/modernui.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Docs/src/var.but: lots of updates: user variables,
+ new instructions, text updates, changelog etc.
- * Contrib/Modern UI/System.nsh: always undef
- MUI_FINISHPAGE_CURFIELD_NO
+2003-07-18 17:39 kichik
-2003-09-06 kichik
+ * /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp:
+ Fixed bug #769598 - problems with InstType
+ /COMPONENTSONLYONCUSTOM
- * Contrib/Language files/PortugueseBR.nlf: v6
+2003-07-18 16:43 kichik
-2003-09-06 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Avoid buffer overrun on huge inputs
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf, Contrib/Language files/Greek.nlf: typo in
- langstring name
+2003-07-18 16:39 joostverburg
-2003-09-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finish page reboot
+ option buttons: background color fixed
- * Contrib/Language files/French.nlf: v6
+2003-07-18 16:01 kichik
-2003-09-06 kichik
+ * /NSIS/trunk/Source/build.cpp: User vars inside strings should
+ work now
- * Source/script.cpp, makensis.exe: !ifdef, again...
+2003-07-18 15:27 joostverburg
-2003-09-06 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Estonian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Estonian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Estonian
+ language files
- * Contrib/Modern UI/System.nsh: window caption
+2003-07-18 15:22 joostverburg
-2003-09-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: fix
- * Contrib/Language files/Dutch.nlf: v6
+2003-07-18 15:22 joostverburg
-2003-09-06 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: use
+ MUI_STARTMENUPAGE_VARIABLE define, temp var fix
- * Contrib/Modern UI/Language files/Dutch.nsh: 1.66
+2003-07-18 14:22 kichik
-2003-09-06 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/TODO.txt: - Fixed all
+ known problems with temporary files and directoroes
+ - Command line switches work again (/NCRC and /S)
+ - GetTempFileName now takes another argument as base directory
+ (default is $TEMP)
+ - Message boxes work from .onGUIEnd
+ - Some more optimizations
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- removed old info, changelog
+2003-07-18 13:05 kichik
-2003-09-06 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: No need
+ for ATL
- * Contrib/Language files/German.nlf: quotes
+2003-07-18 12:28 kichik
-2003-09-06 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/io.dsp: No default libraries
+ needed
- * Contrib/Language files/German.nlf: v6
+2003-07-18 02:43 icemank
-2003-09-06 joostverburg
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/script.cpp: Moved __DATE__ and __TIME__
+ predefines into CEXEBuild::process_script
- * Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/German.nsh: 1.66
+2003-07-17 22:26 joostverburg
-2003-09-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: text updates, fixes
- * Contrib/Language files/Catalan.nlf, Contrib/Language
- files/Korean.nlf, Contrib/Modern UI/Language files/Catalan.nsh,
- Contrib/Modern UI/Language files/Korean.nsh: Language updates
+2003-07-17 17:42 joostverburg
-2003-09-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: declare standard temp
+ variables when inserting
- * makensis.exe, Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/script.cpp, Source/tokens.cpp: - Fixed and improved SetFont
- - Fixed WindowIcon
+2003-07-17 15:35 kichik
-2003-09-06 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Tabs to spaces
- * makensis.exe, Source/build.cpp, Source/build.h,
- Source/script.cpp: Get progress bar to the end even with
- subsections
+2003-07-17 12:36 joostverburg
-2003-09-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finish page options
+ fixed
- * Source/build.cpp: Initialize build_include_depth
+2003-07-17 12:17 kichik
-2003-09-06 kichik
+ * /NSIS/trunk/TODO.txt: stop using static
- * TODO.txt, Source/build.h, Source/script.cpp: No more static
- variables in CEXEBuild member functions
+2003-07-17 02:00 ramon18
-2003-09-05 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: "Space required" updated after
+ every .OnSelChange
- * Contrib/Modern UI/System.nsh: uninstaller close button not set to
- finish button text
+2003-07-16 23:03 kichik
-2003-09-05 kichik
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: TEMP is already
+ taken
- * Examples/languages.nsi: Updated to work with the latest CVS
- version
+2003-07-16 22:44 joostverburg
-2003-09-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: user variables, new
+ macro to get startmenu folder, comp page desc box info text
+ changes, welcome/finish page leave functions
- * Source/lang.cpp: Removed debug message
+2003-07-16 22:36 kichik
-2003-09-05 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ EnableWindow
- * Contrib/Banner/Banner.c: Reverting to old source code for now
+2003-07-16 21:13 kichik
-2003-09-05 kichik
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/config.h: Defines cleared up and added
+ to NSIS define list
- * Contrib/Language files/Spanish.nlf, Contrib/Modern UI/Language
- files/Spanish.nsh: Spanish language files updated
+2003-07-16 20:37 kichik
-2003-09-05 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp: No need for that
+ ObjType, was just a test
- * Examples/UserVars.nsi, Examples/bigtest.nsi,
- Examples/example1.nsi, Examples/example2.nsi, Examples/gfx.nsi,
- Examples/makensis.nsi, Examples/one-section.nsi,
- Examples/primes.nsi, Examples/rtest.nsi, Examples/waplugin.nsi:
- page commands
+2003-07-16 20:31 kichik
-2003-09-05 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Plugins/BgImage.dll: Fixed stuck up windows on
+ Windows 98
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: UpgradeDLL: set
- overwrite flag back
+2003-07-16 18:03 kichik
-2003-09-05 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/TODO.txt: fixed
+ CreateDirectory error flag
- * Source/build.cpp, makensis.exe, Source/script.cpp: Fixed
- LicesneData and language strings
+2003-07-16 12:28 kichik
-2003-09-05 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/ZLIB.H: shaved more than 500 bytes from
+ zlib, zlib exehead now 33.5k
- * Source/script.cpp: Only check for open if[n]def if the
- compilation was successful
+2003-07-16 09:15 kichik
-2003-09-05 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: Compiles with log enabled
- * Contrib/Modern UI/System.nsh: fixed page custom functions
+2003-07-15 23:40 ramon18
-2003-09-05 joostverburg
+ * /NSIS/trunk/Examples/UserVars.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: Fix
+ problem on Script.cpp that allowed VAR declarations inside
+ Functions and Sections, no more differences between installer
+ uservars and unistaller user vars (even if name start with un. ),
+ changed example too
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/HeaderBitmap.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/StartMenu.nsi, Examples/Modern UI/WelcomeFinish.nsi: version
- number (1.66)
+2003-07-15 21:26 joostverburg
-2003-09-05 kichik
+ * /NSIS/trunk/Examples/UserVars.nsi: clean up
- * Source/script.cpp, makensis.exe: Fixed SetDetailsPrint
+2003-07-15 17:17 kichik
-2003-09-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh:
+ "Description" translated (thanks emiste7)
- * Contrib/Modern UI/Language files/Greek.nsh, TODO.txt,
- makensis.exe, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/src/compiler.but, Docs/src/compilerflags.but,
- Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp: - SetCompressor: added /FINAL switch -
- SetOverwrite: added lastusd option - Greek MUI translation v1.66
+2003-07-14 14:40 icemank
-2003-09-05 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Fixed the resize
+ bug.
- * Contrib/Language files/English.nlf, Contrib/Language
- files/Greek.nlf, Contrib/Language files/Romanian.nlf,
- Contrib/Modern UI/Language files/Romanian.nsh: NLF v6, MUI v.166
+2003-07-13 22:31 ramon18
-2003-09-05 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: #769770 fix
- * makensis.exe, Source/build.cpp, Source/exehead/Main.c: Missed
- some strings that should be processed - thanks mikem4600
+2003-07-13 14:19 kichik
-2003-09-05 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hebrew.nsh: Hebrew
+ language files by Yaron Shahrabani
- * Contrib/Modern UI/Readme.html: settings: syntax, removed old ones
+2003-07-13 11:19 kichik
-2003-09-05 joostverburg
+ * /NSIS/trunk/Docs/src/var.but: SetShellVarContext doesn't work for
+ $QUICKLAUNCH
- * Contrib/Modern UI/System.nsh: fixed IO extract
+2003-07-12 15:19 kichik
-2003-09-05 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lineparse.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/zlib/deflate.c,
+ /NSIS/trunk/Source/zlib/DEFLATE.H,
+ /NSIS/trunk/Source/zlib/trees.c: tabs to spaces
- * Contrib/Modern UI/System.nsh: fixed IO RTL setting
+2003-07-12 14:45 kichik
-2003-09-04 kichik
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: Delete parent
+ folders too as deguix suggested
- * Contrib/Modern UI/System.nsh: RTL welcome and finish page
+2003-07-12 14:44 kichik
-2003-09-04 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Patch #754995 - more
+ information when installing, thanks deguix
- * Contrib/Modern UI/System.nsh: Space after branding text (in
- uninstaller too)
+2003-07-12 12:19 kichik
-2003-09-04 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: typo
- * Contrib/Modern UI/System.nsh: Space after branding text
+2003-07-12 12:04 kichik
-2003-09-04 kichik
+ * /NSIS/trunk/TODO.txt: empty subsections
- * Examples/makensis.nsi: Compile with latest CVS version
+2003-07-11 14:36 kichik
-2003-09-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: MUI_COMPONENTS ->
+ MUI_PAGE_COMPONENTS (thanks RIV@NVX)
- * Source/lang.cpp, Source/lang.h: signed/unsigned mismatch
+2003-07-10 00:28 ramon18
-2003-09-04 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/exehead/Ui.c: LINK, dirreq, filereq and browse
+ button in dirpage can be opened using ENTER KEY (WM_COMMAND
+ events forward to inner dialogs), fixed problem with focus on
+ Close/Finish button which was generating wierd beeps if user
+ attempted to finish the installer with ENTER key.
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/UIs/modern.exe, Examples/Modern
- UI/Basic.nsi, Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Modern UI 1.66: support for uninst comp page,
- multiple pages, new language & page system
-
-2003-09-04 kichik
+2003-07-09 19:17 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html, Contrib/Language
- files/Arabic.nlf, Contrib/Language files/Bulgarian.nlf,
- Contrib/Language files/Catalan.nlf, Contrib/Language
- files/Croatian.nlf, Contrib/Language files/Czech.nlf,
- Contrib/Language files/Danish.nlf, Contrib/Language
- files/Dutch.nlf, Contrib/Language files/English.nlf,
- Contrib/Language files/Estonian.nlf, Contrib/Language
- files/Finnish.nlf, Contrib/Language files/French.nlf,
- Contrib/Language files/German.nlf, Contrib/Language
- files/Greek.nlf, Contrib/Language files/Hebrew.nlf,
- Contrib/Language files/Hungarian.nlf, Contrib/Language
- files/Italian.nlf, Contrib/Language files/Japanese.nlf,
- Contrib/Language files/Korean.nlf, Contrib/Language
- files/Lithuanian.nlf, Contrib/Language files/Macedonian.nlf,
- Contrib/Language files/Polish.nlf, Contrib/Language
- files/Portuguese.nlf, Contrib/Language files/PortugueseBR.nlf,
- Contrib/Language files/Romanian.nlf, Contrib/Language
- files/Russian.nlf, Contrib/Language files/Serbian.nlf,
- Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/Slovak.nlf, Contrib/Language files/Slovenian.nlf,
- Contrib/Language files/Spanish.nlf, Contrib/Language
- files/Swedish.nlf, Contrib/Language files/Thai.nlf,
- Contrib/Language files/TradChinese.nlf, Contrib/Language
- files/Turkish.nlf, Contrib/Language files/Ukrainian.nlf,
- Contrib/StartMenu/Readme.txt, Contrib/StartMenu/StartMenu.c,
- Contrib/StartMenu/StartMenu.dsp, Contrib/System/System.nsh,
- Contrib/System/System.txt, Contrib/System/Source/System.c,
- Contrib/System/Source/System.h, Contrib/System/Source/System.sln,
- Contrib/System/Source/System.vcproj, Contrib/UIs/default.exe,
- Contrib/UIs/sdbarker_tiny.exe, Docs/AppendixD.html,
- Docs/Chapter2.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/attributes.but,
- Docs/src/callback.but, Docs/src/flowcontrol.but,
- Docs/src/history.but, Docs/src/langs.but, Docs/src/pages.but,
- Docs/src/tutorial.but, Docs/src/ui.but, TODO.txt,
- Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/ResourceEditor.cpp, Source/build.cpp, Source/build.h,
- Source/exedata.cpp, Source/lang.cpp, Source/lang.h,
- Source/makenssi.cpp, Source/makenssi.dsp, Source/script.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/tokens.h,
- Source/exehead/Main.c, Source/exehead/Ui.c, Source/exehead/bgbg.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/lang.h,
- Source/exehead/resource.h, Source/exehead/resource.rc,
- Source/exehead/state.h, Source/exehead/ui.h, Source/exehead/util.c,
- Source/exehead/util.h, makensis.exe: * PageEx - every page can be
- used everywhere and as many times as needed * DirVar - easy way to
- add another dir page * default strings in the language file (Page
- directory is enough, no need for DirText) * strings from the
- language file are now LangStrings that can be used in the script *
- no more /LANG - one string for all languages * any lang strings can
- be used everywhere, installer or uninstaller (no un.) * no more
- unprocessed strings - variables can be used almost everywhere
- (except in licenseData and InstallDirRegKey) * DirText parm for
- browse dialog text * SetBkColor -> SetCtlColors - can now set text
- color too * fixed SetOutPath and File /r bug * fixed File /a /oname
- bug * added $_CLICK for pages * added quotes support in lang files
- (patch #752620) * extraction progress * separate RTL dialogs for
- RTL langs (improved RTL too) * InstallOptions RTL * StartMenu RTL *
- fixed RegDLL? * added IfSilent and SetSilent (SetSilent only works
- from .onInit) * fixed verify window (it never showed) (bug #792494)
- * fixed ifnewer readonly file problem (patch #783782) * fixed
- wininit.ini manipulation when there is another section after
- [rename] * fixed some ClearType issues * fixed a minor bug in the
- resource editor * fixed !ifdef/!endif stuff, rewritten * lots of
- code and comments clean ups * got rid of some useless exceptions
- handling and STL classes (still much more to go) * lots of
- optimizations, of course ;) * updated system.dll with support for
- GUID, WCHAR, and fast VTable calling (i.e. COM ready) * minor bug
- fixes
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Source/exehead/resource.rc: more space for "Space
+ required" label
-2003-09-04 joostverburg
+2003-07-09 12:59 joostverburg
- * Contrib/VPatch/Readme.html: patch result
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe: more space for
+ "Space required" label
-2003-08-27 kichik
+2003-07-08 23:18 ramon18
- * Examples/one-section.nsi: No need with just two sections
+ * /NSIS/trunk/Examples/UserVars.nsi,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/tokens.cpp:
+ Fixed QUIT problem inside custom pages, user-variables activated
+ and command "Dim" changed to "Var", language strings inside other
+ strings are replaced
-2003-08-23 icemank
+2003-07-07 21:08 ramon18
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h: Fixed MRU for Windows 9x
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/testlink.ini,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Fixed LINK control
+ problem on Win9X and improved tabstop handling
-2003-08-23 icemank
+2003-07-07 16:22 joostverburg
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp: no message
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe: more space for
+ "Space required" label
-2003-08-23 joostverburg
+2003-07-07 16:10 joostverburg
- * Contrib/Modern UI/Readme.html: fixed invalid link to
- HeaderBitmap.nsi example
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf: fixes
-2003-08-22 joostverburg
+2003-07-07 14:08 joostverburg
- * Docs/Chapter4.html, Docs/src/pages.but: fixed InstallOptions link
- on site
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Serbian
+ language
-2003-08-22 joostverburg
+2003-07-07 14:06 joostverburg
- * Menu/update.html: text update
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: MUI_UNGETLANGUAGE
+ changes, abort header fixes
-2003-08-22 joostverburg
+2003-07-07 13:35 joostverburg
- * Contrib/Modern UI/Readme.html: localize MUI_PRODUCT
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh:
+ Language ID
-2003-08-19 joostverburg
+2003-07-07 13:01 joostverburg
- * Contrib/Modern UI/Language files/Turkish.nsh: 1.65
+ * /NSIS/trunk/Contrib/Language files/Serbian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Serbian.nsh: Serbian
+ language files
-2003-08-15 kichik
+2003-07-07 10:50 joostverburg
- * Source/build.cpp, makensis.exe: Fixed problem with LangString as
- section name
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf: fixes
-2003-08-15 flizebogen
+2003-07-07 10:44 joostverburg
- * Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/compilerflags.but: Added very basic
- informations about the new version commands (VIProductVersion,
- VIAddVersionKey)
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ version numbers
-2003-08-15 joostverburg
+2003-07-06 21:39 joostverburg
- * Contrib/Language files/Turkish.nlf: v5
+ * /NSIS/trunk/Docs/src/usefulinfos.but: compiler compatibility
-2003-08-13 joostverburg
+2003-07-06 20:24 joostverburg
- * Docs/AppendixC.html: Fixed broken processor pack link
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh: fix
-2003-08-13 icemank
+2003-07-05 16:55 kichik
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Fixed bugs in MRU
- list
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: LINK disabled until
+ crashes under Windows 98 are resolved
-2003-08-13 icemank
+2003-07-04 17:20 kichik
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Fixed bugs in MRU
- list
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh:
+ Macedonian update
-2003-08-13 icemank
+2003-07-04 12:48 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h, makensisw.exe: Fixed bugs in MRU list
+ * /NSIS/trunk/Source/lang.cpp: LicenseForceSelection strings now
+ default to English too if string is missing from the NLF
-2003-08-13 sunjammerx
+2003-07-03 21:53 ramon18
- * Docs/src/usefulinfos.but: Fixed broken processor pack link.
+ * /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Plugins/System.dll: Small bug with structures fixed
+ (thanks brainsucker)
-2003-08-12 icemank
+2003-06-28 12:31 kichik
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h: Added MRU file list
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp: tsk tsk tsk... Memory
+ problems fixed
-2003-08-12 joostverburg
+2003-06-28 11:32 kichik
- * Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/update.html, Menu/websites.html: updated texts, links
+ * /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.h: Clean-up
-2003-08-12 kichik
+2003-06-27 20:40 joostverburg
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/toolbar.cpp,
- Contrib/Makensisw/toolbar.h: Direct link to new website
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fix
-2003-08-12 joostverburg
+2003-06-27 20:37 joostverburg
- * Contrib/VPatch/Readme.html: UI compilation
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Options to disable
+ bitmap stretching
-2003-08-12 joostverburg
+2003-06-27 12:48 kichik
- * Contrib/Modern UI/Readme.html, Examples/makensis.nsi: reserve
- files
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: ResizeToFit flag should
+ now work for bitmap controls too
-2003-08-12 joostverburg
+2003-06-27 11:25 joostverburg
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- added MUI_FINISHPAGE_LINK_COLOR
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: fix
-2003-08-12 joostverburg
+2003-06-27 11:09 o_owd
- * Contrib/VPatch/Source/GUI/VPatchGUI.dpr,
- Contrib/VPatch/Source/VPatch2.bpg,
- Contrib/VPatch/Source/GenPat/VPatch2.bpg, Examples/makensis.nsi:
- folder settings
+ * /NSIS/trunk/Docs/src/script.but,
+ /NSIS/trunk/Docs/src/tutorial.but: internal links update.
+ replaced \k with \R.
-2003-08-11 joostverburg
+2003-06-26 19:37 kichik
- * Examples/makensis.nsi: include new VPatch files
+ * /NSIS/trunk/Source/build.cpp: No ${LANG_ENGLISH} by default
-2003-08-11 joostverburg
+2003-06-25 14:16 joostverburg
- * Contrib/VPatch/GenPat.exe, Contrib/VPatch/Readme.html,
- Contrib/VPatch/vpatchdll.c, Contrib/VPatch/vpatchdll.dsp,
- Contrib/VPatch/vpatchdll.dsw,
- Contrib/VPatch/Source/GUI/AboutForm.dfm,
- Contrib/VPatch/Source/GUI/AboutForm.pas,
- Contrib/VPatch/Source/GUI/DLLWrapper.pas,
- Contrib/VPatch/Source/GUI/MainForm.dfm,
- Contrib/VPatch/Source/GUI/MainForm.pas,
- Contrib/VPatch/Source/GUI/PatchClasses.pas,
- Contrib/VPatch/Source/GUI/ProgressForm.dfm,
- Contrib/VPatch/Source/GUI/ProgressForm.pas,
- Contrib/VPatch/Source/GUI/VPatchGUI.dof,
- Contrib/VPatch/Source/GUI/VPatchGUI.dpr,
- Contrib/VPatch/Source/GUI/VPatchGUI.res,
- Contrib/VPatch/Source/GenPat/GenPat2.dpr,
- Contrib/VPatch/Source/GenPat/PatchGenerator.pas,
- Contrib/VPatch/Source/GenPat/TreeCode.pas,
- Contrib/VPatch/Source/GenPat/VAppend.dpr,
- Contrib/VPatch/Source/GenPat/VPatch2.bpg,
- Contrib/VPatch/Source/GenPat/vdsp_crc.pas,
- Contrib/VPatch/Source/Plugin/vpatchdll.c,
- Contrib/VPatch/Source/Plugin/vpatchdll.dsp,
- Contrib/VPatch/Source/Plugin/vpatchdll.dsw: VPatch 2.0 final
+ * /NSIS/trunk/Contrib/Icons/modern-install-blue.ico,
+ /NSIS/trunk/Contrib/Icons/modern-uninstall-blue.ico: Blue Modern
+ UI Icons (based on adni18-B)
-2003-08-10 kichik
+2003-06-25 12:08 joostverburg
- * Docs/Chapter4.html, Docs/src/basic.but: Rename /REBOOTOK doesn't
- care if the destination exists
+ * /NSIS/trunk/Source/lang.cpp: latest translation
-2003-08-09 kichik
+2003-06-25 11:17 kichik
- * Contrib/Modern UI/System.nsh: Finish page - reshow controls for
- all cases, not just when the next button was clicked
+ * /NSIS/trunk/Source/util.cpp: Refer to the docs
-2003-08-09 kichik
+2003-06-25 01:16 ramon18
- * Docs/Chapter4.html, Docs/src/basic.but: Rename can't overwrite
+ * /NSIS/trunk/Examples/VersionInfo.nsi: Missing LoadLanguageFile
-2003-08-08 kichik
+2003-06-24 19:54 joostverburg
- * Contrib/nsExec/nsexec.c: Empty lines were not printed (this time
- it's really fixed)
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh:
+ MUI_CUSTOMFUNCTION_STARTMENU_LEAVE: use Leave function
-2003-08-08 kichik
+2003-06-24 19:17 kichik
- * Contrib/nsExec/nsexec.c: - Empty lines were not printed - CR or
- LF alone were not handled - Tab conversion removed the next char
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: Standard tabing
-2003-08-07 ramon18
+2003-06-24 10:00 o_owd
- * Contrib/ExDLL/extdll.inc: New MASM32 header for NSIS plug-ins
+ * /NSIS/trunk/Docs/src/attributes.but: updated LicenseBkColor help
-2003-08-06 kichik
+2003-06-23 22:40 ramon18
- * Contrib/ExDLL/exdll_with_unit.dpr, Contrib/ExDLL/nsis.pas: New
- Delphi unit for NSIS plug-ins by Bernhard Mayer
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/uservars.h: Special section of data for user
+ vars, whitch allow compiler to assign the right size and no code
+ needed in exehead for mem allocs. Warnings for unreferenced user
+ vars. (758773) Error, if temp file not available, now directory
+ is created if not exist.
-2003-08-05 kichik
+2003-06-23 21:56 ramon18
- * makensis.exe, Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmpr.exe, Contrib/UIs/modern_nodesc.exe,
- Contrib/UIs/modern_smalldesc.exe, Contrib/UIs/sdbarker_tiny.exe,
- Source/exehead/resource.rc: Reverted Ramon's addition of
- SS_NOPREFIX. It causes trouble with ClearType, compatibility and
- doesn't allow the user to use accelerators for edit boxes anywhere.
+ * /NSIS/trunk/Examples/VersionInfo.nsi: (757431) VersionInfo.nsi
+ compiles with errors after /LANG changes
-2003-08-05 kichik
+2003-06-23 21:48 ramon18
- * Contrib/InstallOptions/InstallerOptions.cpp: No need to read
- STATE twice
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Fixes problems with LINK
-2003-08-05 kichik
+2003-06-23 16:25 icemank
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/io.dsp: - Removed SS_NOPREFIX - Made IO
- return error instead of crashing if there are no fields in the INI
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/makenssi.cpp:
+ Moved setting of __DATE__ and __TIME__ predefines.
-2003-08-05 kichik
+2003-06-23 15:12 icemank
- * Contrib/Modern UI/System.nsh: SS_NOPREFIX made the header texts
- redraw when ALT was pressed, allowing the text to be shown on the
- finish page
+ * /NSIS/trunk/Source/script.cpp: Modified set_timestamp_define to
+ use FileTimeToLocalFileTime instead of
+ SystemTimeToTzSpecificLocalTime, since the latter is unsupported
+ in Win 9x.
-2003-08-04 kichik
+2003-06-23 12:51 joostverburg
- * makensis.exe, Source/exehead/resource.rc: DIALOGEX not DIALOG
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: format
-2003-08-04 kichik
+2003-06-23 12:04 o_owd
- * Docs/Chapter4.html, Docs/src/attributes.but: /S is case sensitive
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: corrected link on
+ "NSIS documentation" that goes to Chapter
+ "Chapter3.html#3.5" instead of "Chapter4.html#4.5"
-2003-08-04 kichik
+2003-06-22 13:44 kichik
- * Contrib/nsExec/nsexec.c: It seems Windows 98 doesn't check
- ranges...
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: Find all directories and make
+ sure found entries are directories
-2003-08-04 kichik
+2003-06-22 11:22 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp: pszState can't be
- null (thanks Case for the patch)
+ * /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but: changelog, info, doc
-2003-08-04 joostverburg
+2003-06-22 11:02 joostverburg
- * Docs/AppendixC.html, Docs/src/usefulinfos.but: new UpgradeDLL
- syntax
+ * /NSIS/trunk/Examples/makensis.nsi: InstallOptions: testlink
-2003-08-03 kichik
+2003-06-20 18:04 o_owd
- * Contrib/NSISdl/httpget.cpp: Patch #781254 applied - thanks Andrey
- Cherezov
+ * /NSIS/trunk/Docs/src/compilerflags.but: adeed AllowSkipFiles
-2003-08-03 kichik
+2003-06-20 17:44 kichik
- * Source/zlib/INFBLOCK.C, makensis.exe: Fixed bug #777590 - inflate
- left too early causing NSIS to think more data is needed thus
- discarding unused data
+ * /NSIS/trunk/Docs/src/build.bat: Should work on Windows 98 now
-2003-08-03 kichik
+2003-06-19 12:44 joostverburg
- * Examples/one-section.nsi: Way simpler
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: v5
-2003-07-29 ramon18
+2003-06-19 12:44 joostverburg
- * Contrib/Language files/Croatian.nlf, Contrib/Modern UI/Language
- files/Croatian.nsh: Croatian language files updates (thanks to
- RIV@NVX and iostriz)
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: version
+ number
-2003-07-29 ramon18
+2003-06-19 12:43 joostverburg
- * makensis.exe, Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmpr.exe, Contrib/UIs/modern_nodesc.exe,
- Contrib/UIs/modern_smalldesc.exe, Contrib/UIs/sdbarker_tiny.exe,
- Source/exehead/resource.rc: SS_NOPREFIX for all STATIC controls,
- now is possible to name the installer as "My company & CO" for
- example
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh:
+ compatible with Modern UI 1.64/5
-2003-07-26 joostverburg
+2003-06-18 16:27 kichik
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: typo
+ * /NSIS/trunk/Source/exehead/Main.c: The path is validate when the
+ real uninstaller starts. There is no need to validate twice.
-2003-07-26 joostverburg
+2003-06-18 16:26 kichik
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: UpgradeDLL: temp
- base dir support (to solve Win9x issues)
+ * /NSIS/trunk/Source/exehead/util.c: No longer 8, there is a flag
+ with a name now
-2003-07-26 joostverburg
+2003-06-17 23:59 ramon18
- * Contrib/Modern UI/Readme.html: hexadecimal
+ * /NSIS/trunk/Examples/UserVars.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ Dynamic allocation of needed user variables (exehead grew 512
+ bytes).
+ Independed user vars in uninstaller and installer
-2003-07-26 joostverburg
+2003-06-17 19:06 ramon18
- * Contrib/InstallOptions/Readme.html: Link control TxtColor
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: Completing
+ documentations for installoptions
-2003-07-26 joostverburg
+2003-06-17 18:55 ramon18
- * Contrib/Modern UI/System.nsh: Finish page: link color (dark blue)
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: Documentation of
+ link control and new options for text control
-2003-07-26 joostverburg
+2003-06-17 12:52 joostverburg
- * Contrib/Modern UI/Readme.html: spelling / grammar fixes
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Support for a link on
+ the Finish page
-2003-07-25 ramon18
+2003-06-16 19:58 ramon18
- * Examples/Modern UI/StartMenu.nsi: Fix
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ Language strings inside any other strings, $$ defines fix, both
+ currently disabled by defines, support for /LANG in command
+ VIAddVersionKey
-2003-07-24 kichik
+2003-06-16 19:02 ramon18
- * Source/exehead/fileform.c: Fix invalid CRC messages for data <
- 512
+ * /NSIS/trunk/Plugins/InstallOptions.dll: Control "LINK" example
-2003-07-24 ramon18
+2003-06-16 18:49 ramon18
- * Contrib/nsExec/nsexec.c: removed IMAGE_FILE_RELOCS_STRIPPED
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/testlink.ini,
+ /NSIS/trunk/Contrib/InstallOptions/testlink.nsi: Added new
+ control "LINK" and example
-2003-07-23 ramon18
+2003-06-16 12:40 kichik
- * Contrib/nsExec/nsexec.c: temp console app now returns correct
- exitcode from spawned process, temp file is deleted on end
+ * /NSIS/trunk/Source/exehead/util.c: validate_filename was b0rked
-2003-07-23 ramon18
+2003-06-15 17:29 kichik
- * Contrib/nsExec/nsexec.c: nsExec create a temp console app to
- spawn commands, can run applications with user interface and also
- 16bit DOS
+ * /NSIS/trunk/Contrib/System/System.nsi: StrCmp not IntCmp (thanks
+ deguix)
-2003-07-23 ramon18
+2003-06-15 11:42 joostverburg
- * makensis.exe, Source/build.cpp, Source/exehead/fileform.h,
- Source/exehead/util.c: NSIS_SUPPORT_LANG_IN_STRINGS works without
- NSIS_SUPPORT_NAMED_USERVARS
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf: v5
-2003-07-22 kichik
+2003-06-14 12:49 joostverburg
- * makensis.exe, Source/exehead/fileform.c: Fixed CRC off and whole
- compression
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Improved
+ registry storage for Start Menu folder; ReserveFile macro for
+ StartMenu plug-in; Added MUI_LANGDLL_ALWAYSSHOW option;
+ Checkboxes on Finish page can be used to call a function; example
+ fixes
-2003-07-21 ramon18
+2003-06-13 21:38 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/nsExec/nsExec.txt, Contrib/nsExec/nsexec.c: Fixed problem
- in IO dirreq/filereq, optimized code, nsExec with /CMD param to
- allow execute 16Bits DOS applications
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: start menu folder
+ selection: works in silent mode; handles empty input
-2003-07-21 kichik
+2003-06-13 18:04 joostverburg
- * makensis.exe, Source/exehead/exec.c: Fixed error flag when
- creating directories with UNC paths
+ * /NSIS/trunk/Contrib/Icons/modern-install.ico,
+ /NSIS/trunk/Contrib/Icons/modern-uninstall.ico: new 16 color
+ icons
-2003-07-21 kichik
+2003-06-13 15:59 icemank
- * makensis.exe, Source/exehead/Ui.c: Don't show installation type
- combo box when there are no InstTypes defined
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: Added
+ dotted notation for macro ${__LINE__} predefine
-2003-07-20 kichik
+2003-06-13 15:38 joostverburg
- * Examples/makensis.nsi: UserVars.nsi added
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: bitmap size
-2003-07-20 kichik
+2003-06-13 14:04 kichik
- * Contrib/Language files/Russian.nlf, Contrib/Modern UI/Language
- files/Russian.nsh: Updates
+ * /NSIS/trunk/Source/script.cpp: Compiles with
+ NSIS_SUPPORT_VERSION_INFO
-2003-07-19 kichik
+2003-06-13 12:52 kichik
- * Contrib/nsExec/nsexec.c: clean up
+ * /NSIS/trunk/Source/script.cpp: second free goes boom
-2003-07-19 kichik
+2003-06-13 03:48 icemank
- * Contrib/Modern UI/System.nsh: StartMenu page should work again
+ * /NSIS/trunk/Source/script.cpp: Reorganized code
-2003-07-19 kichik
+2003-06-12 22:44 kichik
- * makensis.exe, Source/exehead/Main.c: Back to 33.5
+ * /NSIS/trunk/Source/makenssi.dsp, /NSIS/trunk/Source/script.cpp:
+ Safer __TIMESTAMP__, __FILE__, and friends
-2003-07-19 kichik
+2003-06-12 21:50 icemank
- * Source/build.cpp, makensis.exe, Source/exehead/Main.c,
- Source/exehead/Ui.c: - Fixed uninstaller - Fixed summary
- calculations - Secret instruction
+ * /NSIS/trunk/Source/script.cpp: Better handling of macros and one
+ line commands for standard predefines.
-2003-07-19 ramon18
+2003-06-12 16:33 kichik
- * Source/build.cpp, Source/exehead/fileform.h: Simplified searching
- for escape charaters in strings when uservars enabled
+ * /NSIS/trunk/TODO.txt: updates
-2003-07-19 ramon18
+2003-06-12 16:14 icemank
- * Contrib/InstallOptions/InstallerOptions.cpp: IO support for LINK
- control text color (TxtColor). Fixed problem with ClearType fonts
- in XP
+ * /NSIS/trunk/Source/script.cpp: Fixed handling of macros and
+ command line /X option for standard predefines.
-2003-07-19 ramon18
+2003-06-12 15:09 icemank
- * makensis.exe, Source/build.cpp, Source/strlist.h: Uservars names
- not found in strings when names are very similar.
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/script.cpp: Added support for standard
+ predefines ala C++, i.e., __DATE__, __TIME__, __TIMESTAMP__,
+ __FILE__, __LINE__
-2003-07-19 kichik
+2003-06-12 00:06 ramon18
- * Source/exehead/fileform.c, Source/exehead/lang.h: Back to normal
- messages
+ * /NSIS/trunk/Examples/UserVars.nsi,
+ /NSIS/trunk/Examples/VersionInfo.nsi,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h,
+ /NSIS/trunk/Source/uservars.h: Version Information now rely on
+ languages, some more updates on named uservars, maybe last one
+ before official release :) (preview UserVars.nsi - doesn't
+ compile yet)
-2003-07-19 joostverburg
+2003-06-12 00:01 ramon18
- * Contrib/Modern UI/System.nsh: set background color of link
- control
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nlf: Updated
+ codepages
-2003-07-19 joostverburg
+2003-06-11 23:57 ramon18
- * Docs/Chapter4.html, Docs/src/var.but: typo
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Examples/Modern UI/ioA.ini,
+ /NSIS/trunk/Plugins/InstallOptions.dll: READONLY in text box
-2003-07-18 joostverburg
+2003-06-11 16:32 joostverburg
- * Docs/AppendixA.html, Docs/AppendixD.html, Docs/AppendixE.html,
- Docs/Chapter1.html, Docs/Chapter2.html, Docs/Chapter4.html,
- Docs/Chapter5.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/compiler.but, Docs/src/config.but,
- Docs/src/credits.but, Docs/src/generalpurpose.but,
- Docs/src/history.but, Docs/src/intro.but, Docs/src/langs.but,
- Docs/src/misc.but, Docs/src/modernui.but, Docs/src/tutorial.but,
- Docs/src/ui.but, Docs/src/var.but: lots of updates: user variables,
- new instructions, text updates, changelog etc.
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: font size setting for
+ older browsers
-2003-07-18 kichik
+2003-06-10 19:34 joostverburg
- * Source/exehead/Ui.c, Source/exehead/fileform.h, Source/lang.cpp:
- Fixed bug #769598 - problems with InstType /COMPONENTSONLYONCUSTOM
+ * /NSIS/trunk/Examples/makensis.nsi: VersionInfo example
-2003-07-18 kichik
+2003-06-10 19:32 joostverburg
- * Source/build.cpp: Avoid buffer overrun on huge inputs
+ * /NSIS/trunk/Examples/VersionInfo.nsi: simple script
-2003-07-18 joostverburg
+2003-06-10 19:32 joostverburg
- * Contrib/Modern UI/System.nsh: finish page reboot option buttons:
- background color fixed
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: dummy section
-2003-07-18 kichik
+2003-06-10 13:18 ramon18
- * Source/build.cpp: User vars inside strings should work now
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/test.ini,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Added MULTILINE support
+ for edit box, better tab order between ReqFile, DirReq and it's
+ browse button
-2003-07-18 joostverburg
+2003-06-10 04:35 ramon18
- * Contrib/Language files/Estonian.nlf, Contrib/Modern UI/Language
- files/Estonian.nsh, Examples/Modern UI/MultiLanguage.nsi: Estonian
- language files
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h, /NSIS/trunk/TODO.txt: Updated
+ TODO.txt; New methods to change VersionInformation, this time is
+ completed customizable by the script, default code page and
+ language retrieved from OS, but can be changed by script too;
+ fixed problem with some chars like ֲ©
-2003-07-18 joostverburg
+2003-06-10 04:33 ramon18
- * Contrib/Modern UI/Language files/Italian.nsh: fix
+ * /NSIS/trunk/Examples/VersionInfo.nsi: Updated to new versioninfo
+ format
-2003-07-18 joostverburg
+2003-06-09 18:59 ramon18
- * Examples/Modern UI/StartMenu.nsi: use MUI_STARTMENUPAGE_VARIABLE
- define, temp var fix
+ * /NSIS/trunk/Examples/VersionInfo.nsi,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/lineparse.h, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/ResourceVersionInfo.cpp,
+ /NSIS/trunk/Source/ResourceVersionInfo.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Comments like C/C++; Added commands
+ to support VersionInformation (VIProductVersion, VIProductName,
+ VICompanyName, VIComments, VILegalTrademarks, VILegalCopyrights,
+ VIDescription); Support to named user variables (up to 500) but
+ disabled by define
-2003-07-18 kichik
+2003-06-08 18:23 kichik
- * Source/build.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/exehead/Main.c, TODO.txt, makensis.exe, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/util.c,
- Source/exehead/util.h: - Fixed all known problems with temporary
- files and directoroes - Command line switches work again (/NCRC and
- /S) - GetTempFileName now takes another argument as base directory
- (default is $TEMP) - Message boxes work from .onGUIEnd - Some more
- optimizations
+ * /NSIS/trunk/Docs/src/registry.but, /NSIS/trunk/Docs/src/sec.but:
+ default value for reg keys
-2003-07-18 kichik
+2003-06-08 14:45 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: No need for ATL
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/script.cpp: Language detection works for
+ primary only again. It was broken since 1.14, heh
-2003-07-18 kichik
+2003-06-08 13:41 kichik
- * Contrib/InstallOptions/io.dsp: No default libraries needed
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: 750338 again
-2003-07-18 icemank
+2003-06-08 13:32 kichik
- * makensis.exe, Source/build.h, Source/makenssi.cpp,
- Source/script.cpp: Moved __DATE__ and __TIME__ predefines into
- CEXEBuild::process_script
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: v5
-2003-07-18 joostverburg
+2003-06-07 10:59 kichik
- * Contrib/Modern UI/Readme.html: text updates, fixes
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: Safer "bug" report 750338
-2003-07-17 joostverburg
+2003-06-06 11:02 kichik
- * Contrib/Modern UI/System.nsh: declare standard temp variables
- when inserting
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf: fixes
-2003-07-17 kichik
+2003-06-06 10:52 kichik
- * Source/exehead/Ui.c: Tabs to spaces
+ * /NSIS/trunk/Contrib/Language files/Czech.nlf: v5
-2003-07-17 joostverburg
+2003-06-05 21:55 kichik
- * Contrib/Modern UI/System.nsh: finish page options fixed
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp:
+ initialize and destroy
-2003-07-17 kichik
+2003-06-05 21:53 kichik
- * TODO.txt: stop using static
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/script.cpp: All acceptable warnings now
+ contain a file name and a line number
-2003-07-17 ramon18
+2003-06-05 20:33 kichik
- * Source/exehead/Ui.c: "Space required" updated after every
- .OnSelChange
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp:
+ Process the auto-appeneded part of InstallDir at compile-time
-2003-07-17 kichik
+2003-06-05 13:15 kichik
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/StartMenu.nsi: TEMP is already taken
+ * /NSIS/trunk/Source/exehead/config.h: don't edit fixes
-2003-07-17 joostverburg
+2003-06-04 21:02 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/StartMenu.nsi: user
- variables, new macro to get startmenu folder, comp page desc box
- info text changes, welcome/finish page leave functions
+ * /NSIS/trunk/Include/Sections.nsh: more macros by derekrprice
-2003-07-17 kichik
+2003-06-03 11:51 kichik
- * Source/exehead/exec.c, makensis.exe, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h: Added EnableWindow
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: No more cvs1
+ errors
-2003-07-17 kichik
+2003-06-03 11:08 kichik
- * Source/build.cpp, Source/exehead/config.h: Defines cleared up and
- added to NSIS define list
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Slovenian.nsh:
+ Slovenian for MUI 1.64/5
-2003-07-16 kichik
+2003-06-03 11:08 kichik
- * Contrib/BgImage/BgImage.cpp: No need for that ObjType, was just a
- test
+ * /NSIS/trunk/Contrib/Language files/Slovenian.nlf: Slovenian v5
-2003-07-16 kichik
+2003-06-02 16:58 icemank
- * Contrib/BgImage/BgImage.cpp: Fixed stuck up windows on Windows 98
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp: Updated to v2.0
-2003-07-16 kichik
+2003-06-02 14:58 kichik
- * Source/exehead/exec.c, TODO.txt: fixed CreateDirectory error flag
+ * /NSIS/trunk/Source/lang.cpp: kilo, mega, giga and byte are not
+ processed
-2003-07-16 kichik
+2003-06-02 14:48 joostverburg
- * Source/exehead/fileform.c, Source/zlib/INFBLOCK.C,
- Source/zlib/ZLIB.H: shaved more than 500 bytes from zlib, zlib
- exehead now 33.5k
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: fixes
-2003-07-16 kichik
+2003-06-02 14:26 kichik
- * Source/exehead/exec.c: Compiles with log enabled
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Bug #747445 fixed -
+ FileRequest "..." button does nothing on some State values
-2003-07-16 ramon18
+2003-06-02 13:02 kichik
- * makensis.exe, Examples/UserVars.nsi, Source/build.cpp,
- Source/build.h, Source/script.cpp: Fix problem on Script.cpp that
- allowed VAR declarations inside Functions and Sections, no more
- differences between installer uservars and unistaller user vars
- (even if name start with un. ), changed example too
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: v5
-2003-07-16 joostverburg
+2003-06-01 21:19 joostverburg
- * Examples/UserVars.nsi: clean up
+ * /NSIS/trunk/Contrib/Language files/French.nlf: v5
-2003-07-15 kichik
+2003-06-01 20:21 kichik
- * Contrib/Modern UI/Language files/Italian.nsh: "Description"
- translated (thanks emiste7)
+ * /NSIS/trunk/Contrib/Language files/German.nlf: v5
-2003-07-14 icemank
+2003-06-01 18:47 joostverburg
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Fixed the resize
- bug.
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf: v5
-2003-07-14 ramon18
+2003-05-30 23:35 icemank
- * makensis.exe, Source/exehead/Ui.c: #769770 fix
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h: Hid the Compressor
+ toolbar button
-2003-07-13 kichik
+2003-05-30 15:18 kichik
- * Contrib/Language files/Hebrew.nlf, Contrib/Modern UI/Language
- files/Hebrew.nsh: Hebrew language files by Yaron Shahrabani
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ Spelling
-2003-07-13 kichik
+2003-05-30 13:35 kichik
- * Docs/Chapter4.html, Docs/src/var.but: SetShellVarContext doesn't
- work for $QUICKLAUNCH
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Fixed flags collisions
+ (thanks Ramon) and added the ONLY_NUMBERS flag
-2003-07-12 kichik
+2003-05-30 11:44 joostverburg
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/lineparse.h, Source/script.cpp, Source/util.cpp,
- Source/bzip2/blocksort.c, Source/bzip2/bzlib.c,
- Source/bzip2/compress.c, Source/exehead/bgbg.c,
- Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/exehead/util.c, Source/exehead/util.h,
- Source/zlib/DEFLATE.H, Source/zlib/deflate.c, Source/zlib/trees.c:
- tabs to spaces
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf: v5
-2003-07-12 kichik
+2003-05-30 11:42 kichik
- * Examples/Modern UI/StartMenu.nsi: Delete parent folders too as
- deguix suggested
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/sections.but: Latest documentation by
+ flizebogen
-2003-07-12 kichik
+2003-05-30 01:38 icemank
- * Examples/makensis.nsi: Patch #754995 - more information when
- installing, thanks deguix
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp: Made the Toolbar style
+ flat
-2003-07-12 kichik
+2003-05-29 16:54 kichik
- * Examples/makensis.nsi: typo
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: v5
-2003-07-12 kichik
+2003-05-29 12:59 kichik
- * TODO.txt: empty subsections
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp: Indention
-2003-07-11 kichik
+2003-05-29 12:55 kichik
- * Contrib/Modern UI/Readme.html: MUI_COMPONENTS ->
- MUI_PAGE_COMPONENTS (thanks RIV@NVX)
+ * /NSIS/trunk/Plugins/Banner.dll: Back to the old version
-2003-07-10 ramon18
+2003-05-29 08:55 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/StartMenu/StartMenu.c, makensis.exe, Source/exehead/Ui.c:
- LINK, dirreq, filereq and browse button in dirpage can be opened
- using ENTER KEY (WM_COMMAND events forward to inner dialogs), fixed
- problem with focus on Close/Finish button which was generating
- wierd beeps if user attempted to finish the installer with ENTER
- key.
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: No more
+ MUI_WELCOMEPAGE
-2003-07-09 joostverburg
+2003-05-29 08:46 kichik
- * Contrib/UIs/default.exe, Source/exehead/resource.rc: more space
- for "Space required" label
+ * /NSIS/trunk/Source/script.cpp: SectionIn RO should not override
+ /o
-2003-07-09 joostverburg
+2003-05-28 04:51 icemank
- * Contrib/UIs/modern.exe, Contrib/UIs/modern_nodesc.exe,
- Contrib/UIs/modern_smalldesc.exe: more space for "Space required"
- label
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Added Toolbar + more
-2003-07-09 ramon18
+2003-05-28 04:46 icemank
- * makensis.exe, Examples/UserVars.nsi, Source/tokens.cpp,
- Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/util.c, Source/exehead/util.h: Fixed QUIT problem
- inside custom pages, user-variables activated and command "Dim"
- changed to "Var", language strings inside other strings are
- replaced
+ * /NSIS/trunk/Contrib/Makensisw/toolbar.bmp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.cpp,
+ /NSIS/trunk/Contrib/Makensisw/toolbar.h: Added Toolbar
-2003-07-08 ramon18
+2003-05-27 18:47 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/testlink.ini: Fixed LINK control problem on
- Win9X and improved tabstop handling
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: - Errors from JNetLib now show
+ again
+ - Shows a dialog with ShowInstDetails hide too
-2003-07-07 joostverburg
+2003-05-27 15:23 joostverburg
- * Contrib/UIs/modern.exe, Contrib/UIs/modern_nodesc.exe,
- Contrib/UIs/modern_smalldesc.exe: more space for "Space required"
- label
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: double pages possible
-2003-07-07 joostverburg
+2003-05-27 14:51 kichik
- * Contrib/Language files/Japanese.nlf: fixes
+ * /NSIS/trunk/Source/util.cpp: VC7 - unsigned/signed
-2003-07-07 joostverburg
+2003-05-27 11:04 kichik
- * Examples/Modern UI/MultiLanguage.nsi: Serbian language
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf: v5
-2003-07-07 joostverburg
+2003-05-27 10:52 kichik
- * Contrib/Modern UI/System.nsh: MUI_UNGETLANGUAGE changes, abort
- header fixes
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/Swedish.nlf: v5
-2003-07-07 joostverburg
+2003-05-26 19:45 joostverburg
- * Contrib/Language files/Serbian.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh: Language ID
+ * /NSIS/trunk/Docs/src/usefulfunc.but: UpgradeDLL - register DLL on
+ reboot fixed
-2003-07-07 joostverburg
+2003-05-26 19:40 kichik
- * Contrib/Language files/Serbian.nlf, Contrib/Modern UI/Language
- files/Serbian.nsh: Serbian language files
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: v5
-2003-07-07 joostverburg
+2003-05-26 18:28 kichik
- * Contrib/Language files/Macedonian.nlf: fixes
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp: tabs -> spaces
-2003-07-07 joostverburg
+2003-05-26 18:14 joostverburg
- * Contrib/Modern UI/Language files/Catalan.nsh, Contrib/Modern
- UI/Language files/Croatian.nsh, Contrib/Modern UI/Language
- files/Czech.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/Finnish.nsh, Contrib/Modern UI/Language
- files/French.nsh, Contrib/Modern UI/Language files/German.nsh,
- Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/Hungarian.nsh, Contrib/Modern UI/Language
- files/Italian.nsh, Contrib/Modern UI/Language files/Japanese.nsh,
- Contrib/Modern UI/Language files/Korean.nsh, Contrib/Modern
- UI/Language files/Lithuanian.nsh, Contrib/Modern UI/Language
- files/Polish.nsh, Contrib/Modern UI/Language files/Portuguese.nsh,
- Contrib/Modern UI/Language files/PortugueseBR.nsh, Contrib/Modern
- UI/Language files/Romanian.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language files/Slovak.nsh,
- Contrib/Modern UI/Language files/Slovenian.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh, Contrib/Modern UI/Language
- files/Swedish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: version numbers
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: v5
-2003-07-07 joostverburg
+2003-05-26 18:12 kichik
- * Docs/AppendixC.html, Docs/src/usefulinfos.but: compiler
- compatibility
+ * /NSIS/trunk/Contrib/Language files/Finnish.nlf: v5 and fixes
-2003-07-06 joostverburg
+2003-05-26 17:55 kichik
- * Contrib/Modern UI/Language files/Finnish.nsh: fix
+ * /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ AllowSkipFiles - thanks Ramon!
-2003-07-05 kichik
+2003-05-26 17:53 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp: LINK disabled until
- crashes under Windows 98 are resolved
+ * /NSIS/trunk/Contrib/NSIS Menu, /NSIS/trunk/Contrib/NSIS
+ Menu/include, /NSIS/trunk/Contrib/NSIS Menu/include/wx,
+ /NSIS/trunk/Contrib/NSIS Menu/include/wx/msw,
+ /NSIS/trunk/Contrib/NSIS Menu/include/wx/msw/setup.h,
+ /NSIS/trunk/Contrib/NSIS Menu/Info.txt, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsisicon.ico, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.rc, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.sln, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/nsismenu.vcproj, /NSIS/trunk/Contrib/NSIS
+ Menu/nsismenu/resource.h, /NSIS/trunk/Contrib/NSIS Menu/src,
+ /NSIS/trunk/Contrib/NSIS Menu/src/html, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/helpctrl.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/helpdata.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/helpfrm.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlcell.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlfilt.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlpars.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmltag.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmlwin.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/htmprint.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_dflist.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_fonts.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_hline.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_image.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_layout.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_links.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_list.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_pre.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_style.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/m_tables.cpp, /NSIS/trunk/Contrib/NSIS
+ Menu/src/html/winpars.cpp, /NSIS/trunk/Contrib/NSIS Menu/src/msw,
+ /NSIS/trunk/Contrib/NSIS Menu/src/msw/app.cpp: NSIS Menu source
-2003-07-04 kichik
+2003-05-26 17:05 kichik
- * Contrib/Language files/Macedonian.nlf, Contrib/Modern UI/Language
- files/Macedonian.nsh: Macedonian update
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Plugins/BgImage.dll: Threads safer
-2003-07-04 kichik
+2003-05-25 20:31 kichik
- * Source/lang.cpp: LicenseForceSelection strings now default to
- English too if string is missing from the NLF
+ * /NSIS/trunk/Examples/one-section.nsi: Simpler script using the
+ new /o switch
-2003-07-04 ramon18
+2003-05-25 20:26 joostverburg
- * Contrib/System/Source/System.c: Small bug with structures fixed
- (thanks brainsucker)
+ * /NSIS/trunk/Examples/makensis.nsi: compatible with Modern UI 1.65
-2003-06-28 kichik
+2003-05-25 20:21 joostverburg
- * makensis.exe, Source/DialogTemplate.cpp,
- Source/ResourceEditor.cpp, Source/ResourceVersionInfo.cpp: tsk tsk
- tsk... Memory problems fixed
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.65
-2003-06-28 kichik
+2003-05-25 17:51 kichik
- * Source/ResourceVersionInfo.h, Source/build.h: Clean-up
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/script.cpp: LicenseBkColor now supports
+ /windows (default = white) and /grey (default = grey)
-2003-06-27 joostverburg
+2003-05-25 17:10 kichik
- * Contrib/Modern UI/Language files/German.nsh: fix
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/resource.h,
+ /NSIS/trunk/Contrib/NSISdl/Script1.rc,
+ /NSIS/trunk/Plugins/nsisdl.dll, /NSIS/trunk/Source/script.cpp: -
+ NSISdl will now take the installer's style
+ - Little typo in script.cpp
+
+2003-05-25 15:33 kichik
+
+ * /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Plugins/Banner.dll, /NSIS/trunk/TODO.txt: Refresh
+ banner's text when erased and minize along with the installer
+ window
+
+2003-05-25 13:12 kichik
+
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/util.c:
+ $SMPROGRAMS, $SMSTARTUP, $DESKTOP, $STARTMENU and $QUICKLAUNCH
+ working again
+
+2003-05-25 13:02 kichik
+
+ * /NSIS/trunk/Source/script.cpp: Section -name working again
+
+2003-05-24 19:39 kichik
+
+ * /NSIS/trunk/Source/build.cpp: Plugins code fixed
-2003-06-27 joostverburg
+2003-05-24 14:07 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: Options to disable bitmap stretching
+ * /NSIS/trunk/TODO.txt: Done - /o
-2003-06-27 kichik
+2003-05-24 13:50 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: ResizeToFit flag
- should now work for bitmap controls too
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: - Improved installation types
+ behaviour
+ - .onSelChange no longer called when the components page is
+ created
+ - First section is selected at compile time - changes in .onInit
+ stick
+ - Added SectionSetSize / SectionGetSize
+ - Added SetCurInstType / GetCurInstType
+ - Added InstTypeSetText / InstTypeGetText - ability to change
+ (and add and remove) installation types on runtime
+ - NSIS_MAX_INST_TYPES is now 32 by default
+ - InstType texts are now processed ($0, $1, etc. can be used)
+ - Added /o switch for Section - unselected by default
-2003-06-27 joostverburg
+2003-05-24 10:17 kichik
- * Contrib/Modern UI/Language files/Russian.nsh: fix
+ * /NSIS/trunk/TODO.txt: More
-2003-06-27 o_owd
+2003-05-22 18:58 joostverburg
- * Docs/Chapter2.html, Docs/Chapter4.html, Docs/src/script.but,
- Docs/src/tutorial.but: internal links update. replaced \k with \R.
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf: capital
-2003-06-26 kichik
+2003-05-22 18:42 joostverburg
- * Source/build.cpp: No ${LANG_ENGLISH} by default
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: fixes
-2003-06-25 joostverburg
+2003-05-21 21:24 joostverburg
- * Source/lang.cpp: latest translation
+ * /NSIS/trunk/Contrib/VPatch/vpatchdll.c,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.dsp: file locations
-2003-06-25 kichik
+2003-05-21 13:04 joostverburg
- * Source/util.cpp: Refer to the docs
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh:
+ wrong variable name
-2003-06-25 ramon18
+2003-05-21 13:02 joostverburg
- * Examples/VersionInfo.nsi: Missing LoadLanguageFile
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Portuguese.nsh:
+ Portuguese Modern UI language file
-2003-06-24 joostverburg
+2003-05-21 12:24 joostverburg
- * Contrib/Modern UI/System.nsh: MUI_CUSTOMFUNCTION_STARTMENU_LEAVE:
- use Leave function
+ * /NSIS/trunk/Contrib/VPatch,
+ /NSIS/trunk/Contrib/VPatch/example.nsi,
+ /NSIS/trunk/Contrib/VPatch/GenPat.exe,
+ /NSIS/trunk/Contrib/VPatch/newfile.txt,
+ /NSIS/trunk/Contrib/VPatch/oldfile.txt,
+ /NSIS/trunk/Contrib/VPatch/patch.pat,
+ /NSIS/trunk/Contrib/VPatch/Readme.html,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.c,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.dsp,
+ /NSIS/trunk/Contrib/VPatch/vpatchdll.dsw,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Plugins/VPatch.dll: VPatch
-2003-06-24 kichik
+2003-05-18 15:56 kichik
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/ResourceEditor.cpp, Source/ResourceEditor.h: Standard tabing
+ * /NSIS/trunk/Source/exehead/exec.c: Sleep back to normal
-2003-06-24 o_owd
+2003-05-16 10:05 kichik
- * Docs/AppendixD.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/attributes.but:
- updated LicenseBkColor help
+ * /NSIS/trunk/Docs/src/callback.but: Bug 738682 fixed - .onGUIEnd
+ => un.onGUIEnd
-2003-06-24 ramon18
+2003-05-16 09:59 kichik
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/build.cpp, makensis.exe, Source/build.h, Source/uservars.h,
- Source/exehead/Main.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/state.h,
- Source/exehead/util.c: Special section of data for user vars,
- whitch allow compiler to assign the right size and no code needed
- in exehead for mem allocs. Warnings for unreferenced user vars.
- (758773) Error, if temp file not available, now directory is
- created if not exist.
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Finnish.nsh: Finnish
+ MUI language file
-2003-06-24 ramon18
+2003-05-14 12:45 kichik
- * Examples/VersionInfo.nsi: (757431) VersionInfo.nsi compiles with
- errors after /LANG changes
+ * /NSIS/trunk/Contrib/BgImage/BgImage.txt: Forgot to mention
+ negative coords
-2003-06-24 ramon18
+2003-05-14 09:59 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: Fixes problems with
- LINK
+ * /NSIS/trunk/Docs/src/log.but: Compile NSIS for NSIS_CONFIG_LOG
-2003-06-23 icemank
+2003-05-14 09:54 kichik
- * makensis.exe, Source/build.cpp, Source/makenssi.cpp: Moved
- setting of __DATE__ and __TIME__ predefines.
+ * /NSIS/trunk/Docs/src/callback.but: .onGUIEnd
-2003-06-23 kichik
+2003-05-12 16:12 kichik
- * makensis.exe: Compiled version of iceman's change (__TIMESTAEMP__
- under Windows 98)
+ * /NSIS/trunk/Source/util.cpp: Wrong boundary
-2003-06-23 icemank
+2003-05-12 15:34 kichik
- * Source/script.cpp: Modified set_timestamp_define to use
- FileTimeToLocalFileTime instead of SystemTimeToTzSpecificLocalTime,
- since the latter is unsupported in Win 9x.
+ * /NSIS/trunk/Source/util.cpp: Some more checks when finding icon
+ resources offsets - no more crashes when UPX compresses the icons
-2003-06-23 joostverburg
+2003-05-11 18:30 kichik
- * Contrib/InstallOptions/Readme.html: format
+ * /NSIS/trunk/Source/script.cpp: A bit more clearer code
-2003-06-23 o_owd
+2003-05-11 16:57 kichik
- * Contrib/InstallOptions/Readme.html: corrected link on "NSIS
- documentation" that goes to Chapter "Chapter3.html#3.5" instead of
- "Chapter4.html#4.5"
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Flicker reduction by A. Schiffler
-2003-06-22 kichik
+2003-05-11 16:43 kichik
- * Contrib/StartMenu/StartMenu.c: Find all directories and make sure
- found entries are directories
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh:
+ Macedonian update - NLFv4 and MUI 1.64
-2003-06-22 joostverburg
+2003-05-10 21:45 kichik
- * Docs/AppendixC.html, Docs/Chapter4.html,
- Docs/src/compilerflags.but, Docs/src/history.but,
- Docs/src/usefulinfos.but: changelog, info, doc
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.txt,
+ /NSIS/trunk/Plugins/BgImage.dll: Sound loops
-2003-06-22 joostverburg
+2003-05-09 22:45 kichik
- * Examples/makensis.nsi: InstallOptions: testlink
+ * /NSIS/trunk/Contrib/BgImage/BgImage.txt: Yey for the spell
+ checker :)
-2003-06-21 o_owd
+2003-05-09 21:11 kichik
- * Docs/Chapter2.html: adeed AllowSkipFiles
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.txt,
+ /NSIS/trunk/Contrib/BgImage/Example.nsi,
+ /NSIS/trunk/Plugins/BgImage.dll, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/util.h,
+ /NSIS/trunk/TODO.txt: - BgImage improved a lot
+ - Added .onGUIEnd
+ - Some optimizations
-2003-06-20 o_owd
+2003-05-09 19:50 kichik
- * Docs/Chapter4.html, Docs/src/compilerflags.but: adeed
- AllowSkipFiles
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/util.cpp: Check
+ for 8bpp
-2003-06-20 kichik
+2003-05-09 19:19 kichik
- * Docs/src/build.bat: Should work on Windows 98 now
+ * /NSIS/trunk/Docs/src/attributes.but: 8bpp max for CheckBitmap
-2003-06-19 joostverburg
+2003-05-09 18:33 kichik
- * Contrib/Language files/Russian.nlf: v5
+ * /NSIS/trunk/Source/lang.cpp: ADD_FONT not SET_FONT
-2003-06-19 joostverburg
+2003-05-09 12:25 kichik
- * Contrib/Modern UI/Language files/Dutch.nsh: version number
+ * /NSIS/trunk/Source/exehead/util.c: "Bug" 733817
-2003-06-19 joostverburg
+2003-05-08 17:13 kichik
- * Contrib/Modern UI/Language files/Russian.nsh: compatible with
- Modern UI 1.64/5
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: Some credits too
-2003-06-18 kichik
+2003-05-08 16:41 kichik
- * Source/exehead/Main.c: The path is validate when the real
- uninstaller starts. There is no need to validate twice.
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: iceman_k's define list
+ for MakeNSISw
-2003-06-18 kichik
+2003-05-07 14:56 joostverburg
- * Source/exehead/util.c: No longer 8, there is a flag with a name
- now
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: wrong variable
-2003-06-18 ramon18
+2003-05-07 11:34 joostverburg
- * makensis.exe, Examples/UserVars.nsi, Source/build.cpp,
- Source/build.h, Source/script.cpp, Source/exehead/Main.c,
- Source/exehead/config.h, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/state.h,
- Source/exehead/util.c: Dynamic allocation of needed user variables
- (exehead grew 512 bytes). Independed user vars in uninstaller and
- installer
+ * /NSIS/trunk/Include/Sections.nsh: SetSectionInInstType /
+ ClearSectionInInstType
-2003-06-17 ramon18
+2003-05-06 11:48 joostverburg
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html: Completing documentations for
- installoptions
+ * /NSIS/trunk/Contrib/Language files/Finnish.nlf: Finnish language
+ file
-2003-06-17 ramon18
+2003-05-06 11:40 joostverburg
- * Contrib/InstallOptions/Readme.html: Documentation of link control
- and new options for text control
+ * /NSIS/trunk/Contrib/Language files/Swedish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh: fix
-2003-06-17 joostverburg
+2003-05-05 13:29 joostverburg
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: Support for a link on the Finish page
+ * /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: quiet download
-2003-06-16 ramon18
+2003-05-03 21:22 joostverburg
- * Source/ResourceVersionInfo.cpp, Source/ResourceVersionInfo.h,
- Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp, Source/exehead/config.h, makensis.exe,
- Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/exehead/util.c, Source/exehead/util.h: Language strings
- inside any other strings, $$ defines fix, both currently disabled
- by defines, support for /LANG in command VIAddVersionKey
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: fix
-2003-06-16 ramon18
+2003-05-03 15:51 joostverburg
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/testlink.ini,
- Contrib/InstallOptions/testlink.nsi: Added new control "LINK" and
- example
+ * /NSIS/trunk/Contrib/Language files/Portuguese.nlf: v4
-2003-06-16 kichik
+2003-05-02 19:31 kichik
- * makensis.exe, Source/exehead/util.c: validate_filename was b0rked
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Plugins/UserInfo.dll: Guests comes after users
+ http://forums.winamp.com/showthread.php?s=&threadid=112655
-2003-06-15 kichik
+2003-05-02 17:11 kichik
- * Contrib/System/System.nsi: StrCmp not IntCmp (thanks deguix)
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.nsi: Done after error
-2003-06-15 joostverburg
+2003-05-02 10:49 joostverburg
- * Contrib/Language files/Japanese.nlf: v5
+ * /NSIS/trunk/Contrib/Banner/Readme.txt: more info
-2003-06-14 joostverburg
+2003-05-01 19:28 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/StartMenu.nsi,
- Examples/Modern UI/WelcomeFinish.nsi: Improved registry storage for
- Start Menu folder; ReserveFile macro for StartMenu plug-in; Added
- MUI_LANGDLL_ALWAYSSHOW option; Checkboxes on Finish page can be
- used to call a function; example fixes
+ * /NSIS/trunk/Docs/src/var.but: Tab
-2003-06-14 joostverburg
+2003-05-01 18:13 joostverburg
- * Contrib/Modern UI/System.nsh: start menu folder selection: works
- in silent mode; handles empty input
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ fonts
-2003-06-13 icemank
+2003-05-01 15:58 joostverburg
- * Source/build.h, Source/script.cpp: Added dotted notation for
- macro ${__LINE__} predefine
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh: fix
-2003-06-13 joostverburg
+2003-05-01 12:12 joostverburg
- * Contrib/Modern UI/Readme.html: bitmap size
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf: v4
-2003-06-13 kichik
+2003-05-01 12:11 joostverburg
- * Source/script.cpp: Compiles with NSIS_SUPPORT_VERSION_INFO
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh: fix
-2003-06-13 kichik
+2003-04-30 21:44 joostverburg
- * Source/script.cpp: second free goes boom
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Get instead of
+ remember
-2003-06-13 icemank
+2003-04-30 18:35 kichik
- * Source/script.cpp: Reorganized code
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Get instead of
+ remember
-2003-06-13 kichik
+2003-04-30 14:12 joostverburg
- * Source/makenssi.dsp, Source/script.cpp, makensis.exe: Safer
- __TIMESTAMP__, __FILE__, and friends
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: no space before "click
+ next to continue" text on welcome page
-2003-06-13 icemank
+2003-04-30 13:24 joostverburg
- * Source/script.cpp: Better handling of macros and one line
- commands for standard predefines.
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh: fix
-2003-06-12 kichik
+2003-04-30 13:21 joostverburg
- * makensis.exe: No CopyFiles crash, again...
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf: v4
-2003-06-12 kichik
+2003-04-30 12:48 kichik
- * TODO.txt: updates
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Unable to open file error was
+ still set in $0 instead of on the stack
-2003-06-12 icemank
+2003-04-30 12:40 kichik
- * makensis.exe: Fixed handling of macros and command line /X option
- for standard predefines.
+ * /NSIS/trunk/Source/script.cpp: Bug #730056 fixed - empty license
+ file error added
-2003-06-12 icemank
+2003-04-30 12:20 kichik
- * Source/script.cpp: Fixed handling of macros and command line /X
- option for standard predefines.
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: Two
+ File /r commands should work again
-2003-06-12 kichik
+2003-04-29 21:32 joostverburg
- * makensis.exe: No debug code
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf: v4
-2003-06-12 kichik
+2003-04-29 21:30 joostverburg
- * makensis.exe: No CopyFiles crash
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh: new
+ strings
-2003-06-12 icemank
+2003-04-29 21:29 joostverburg
- * Source/exehead/config.h, Source/build.cpp, Source/build.h,
- Source/script.cpp, makensis.exe: Added support for standard
- predefines ala C++, i.e., __DATE__, __TIME__, __TIMESTAMP__,
- __FILE__, __LINE__
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: fix
-2003-06-12 ramon18
+2003-04-29 16:51 joostverburg
- * Examples/UserVars.nsi, Examples/VersionInfo.nsi,
- Source/ResourceVersionInfo.cpp, Source/ResourceVersionInfo.h,
- Source/build.cpp, Source/build.h, Source/makenssi.dsp,
- Source/script.cpp, Source/strlist.h, Source/tokens.cpp,
- Source/tokens.h, makensis.exe, Source/uservars.h,
- Source/exehead/fileform.h, Source/exehead/util.c: Version
- Information now rely on languages, some more updates on named
- uservars, maybe last one before official release :) (preview
- UserVars.nsi - doesn't compile yet)
+ * /NSIS/trunk/TODO.txt: langfiles & fonts done
-2003-06-12 ramon18
+2003-04-29 16:28 kichik
- * Contrib/Language files/Polish.nlf, Contrib/Language
- files/Portuguese.nlf: Updated codepages
+ * /NSIS/trunk/Source/script.cpp: "Bug" #685834 fixed - implemented
+ a more natural recursion that descends into every directory and
+ not only into those caught by the given spec
-2003-06-12 ramon18
+2003-04-29 13:42 kichik
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp, Examples/Modern
- UI/ioA.ini: READONLY in text box
+ * /NSIS/trunk/Examples/viewhtml.nsi: Shows the HTML file and both
+ possible ways
-2003-06-11 joostverburg
+2003-04-28 23:15 joostverburg
- * Contrib/InstallOptions/Readme.html, Contrib/Modern
- UI/Readme.html: font size setting for older browsers
+ * /NSIS/trunk/Contrib/Language files/Swedish.nlf: v4
-2003-06-10 joostverburg
+2003-04-28 21:06 joostverburg
- * Examples/makensis.nsi: VersionInfo example
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Swedish.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Swedish
+ translation
-2003-06-10 joostverburg
+2003-04-28 20:26 joostverburg
- * Examples/VersionInfo.nsi: simple script
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: wrong define name
-2003-06-10 joostverburg
+2003-04-28 16:39 kichik
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/HeaderBitmap.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/StartMenu.nsi, Examples/Modern UI/WelcomeFinish.nsi: dummy
- section
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc: Bug #728281 fixed
+ - system menu has everything enabled (including maximize) on
+ Windows 9x
-2003-06-10 ramon18
+2003-04-28 16:30 kichik
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html, Contrib/InstallOptions/io.dsp,
- Contrib/InstallOptions/test.ini, Contrib/InstallOptions/test.nsi:
- Added MULTILINE support for edit box, better tab order between
- ReqFile, DirReq and it's browse button
+ * /NSIS/trunk/Source/exehead/resource.rc: Bug #728281 fixed -
+ system menu has everything enabled (including maximize) on
+ Windows 9x
-2003-06-10 ramon18
+2003-04-28 10:31 joostverburg
- * TODO.txt, makensis.exe, Source/ResourceVersionInfo.cpp,
- Source/ResourceVersionInfo.h, Source/build.cpp, Source/build.h,
- Source/script.cpp, Source/tokens.cpp, Source/tokens.h: Updated
- TODO.txt; New methods to change VersionInformation, this time is
- completed customizable by the script, default code page and
- language retrieved from OS, but can be changed by script too; fixed
- problem with some chars like ©
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: v4
-2003-06-10 ramon18
+2003-04-27 21:35 joostverburg
- * Examples/VersionInfo.nsi: Updated to new versioninfo format
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: examples
-2003-06-09 ramon18
+2003-04-27 18:36 joostverburg
- * Source/build.cpp, Source/build.h, Source/lineparse.h,
- makensis.exe, Source/ResourceVersionInfo.cpp,
- Source/ResourceVersionInfo.h, Source/makenssi.dsp,
- Source/script.cpp, Source/tokens.cpp, Source/tokens.h,
- Source/exehead/config.h, Source/exehead/fileform.h,
- Source/exehead/state.h, Source/exehead/util.c,
- Examples/VersionInfo.nsi: Comments like C/C++; Added commands to
- support VersionInformation (VIProductVersion, VIProductName,
- VICompanyName, VIComments, VILegalTrademarks, VILegalCopyrights,
- VIDescription); Support to named user variables (up to 500) but
- disabled by define
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh: fix
-2003-06-08 kichik
+2003-04-27 18:31 joostverburg
- * Docs/Chapter4.html, Docs/src/registry.but, Docs/src/sec.but:
- default value for reg keys
+ * /NSIS/trunk/Contrib/Language files/Czech.nlf: v4
-2003-06-08 kichik
+2003-04-26 22:30 joostverburg
- * makensis.exe, Source/build.cpp, Source/script.cpp,
- Source/exehead/Ui.c: Language detection works for primary only
- again. It was broken since 1.14, heh
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: more texts can be
+ customized
-2003-06-08 kichik
+2003-04-26 12:57 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp: 750338 again
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh: new
+ strings
-2003-06-08 kichik
+2003-04-26 12:57 joostverburg
- * Contrib/Language files/PortugueseBR.nlf: v5
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf: v4
-2003-06-07 kichik
+2003-04-25 15:27 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp, Source/exehead/Ui.c,
- Source/exehead/util.c: Safer "bug" report 750338
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: write to INI file in
+ Welcome/Finish page pre functions
-2003-06-06 kichik
+2003-04-25 15:19 joostverburg
- * Contrib/Language files/Romanian.nlf: fixes
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf: v4
-2003-06-06 kichik
+2003-04-23 20:33 kichik
- * Contrib/Language files/Czech.nlf: v5
+ * /NSIS/trunk/Source/lang.cpp: Padding, padding, padding...
-2003-06-06 kichik
+2003-04-23 18:57 joostverburg
- * Source/build.cpp, Source/script.cpp: initialize and destroy
+ * /NSIS/trunk/Examples/rtest.nsi: format
-2003-06-06 kichik
+2003-04-23 15:50 joostverburg
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/makenssi.cpp, Source/script.cpp: All acceptable warnings now
- contain a file name and a line number
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nlf: v4
-2003-06-05 kichik
+2003-04-23 15:44 joostverburg
- * Source/build.cpp, Source/script.cpp, Source/exehead/Ui.c,
- Source/exehead/fileform.h: Process the auto-appeneded part of
- InstallDir at compile-time
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Japanese.nlf: v4
-2003-06-05 kichik
+2003-04-23 15:42 joostverburg
- * Source/exehead/config.h: don't edit fixes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh: header
+ text for aborted installer
-2003-06-05 kichik
+2003-04-23 15:40 kichik
- * Include/Sections.nsh: more macros by derekrprice
+ * /NSIS/trunk/Source/exehead/Ui.c: Compiles without
+ NSIS_SUPPORT_CODECALLBACKS again
-2003-06-03 kichik
+2003-04-22 13:33 joostverburg
- * Contrib/Modern UI/Language files/Slovenian.nsh: Slovenian for MUI
- 1.64/5
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf: Japanese fonts
-2003-06-03 kichik
+2003-04-22 13:28 joostverburg
- * Contrib/Language files/Slovenian.nlf: Slovenian v5
+ * /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf: v4
-2003-06-02 icemank
+2003-04-22 13:27 joostverburg
- * makensisw.exe, Contrib/Makensisw/makensisw.dsp: Updated to v2.0
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: fix
-2003-06-02 kichik
+2003-04-21 22:24 kichik
- * makensis.exe, Source/lang.cpp: kilo, mega, giga and byte are not
- processed
+ * /NSIS/trunk/Source/exehead/Ui.c: Bug report 725319 - sort of
-2003-06-02 joostverburg
+2003-04-21 20:56 joostverburg
- * Contrib/Modern UI/Language files/Dutch.nsh: fixes
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf: v4
-2003-06-02 kichik
+2003-04-21 20:05 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp: Bug #747445 fixed -
- FileRequest "..." button does nothing on some State values
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: forgot some items
-2003-06-02 kichik
+2003-04-21 20:05 joostverburg
- * Contrib/Language files/Polish.nlf: v5
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: spaces
-2003-06-02 joostverburg
+2003-04-21 20:05 joostverburg
- * Contrib/Language files/French.nlf: v5
+ * /NSIS/trunk/Contrib/Language files/English.nlf: fix
-2003-06-01 kichik
+2003-04-21 19:52 joostverburg
- * Contrib/Language files/German.nlf: v5
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf: v4
-2003-06-01 joostverburg
+2003-04-21 18:52 flizebogen
- * Contrib/Language files/Croatian.nlf: v5
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but: Added description for
+ Ifabort, modified SectionSetText, added Errorlevel description
-2003-05-31 icemank
+2003-04-21 15:23 joostverburg
- * Contrib/Makensisw/Readme.txt: Hid the Compressor toolbar button
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fix
-2003-05-31 icemank
+2003-04-21 13:32 kichik
- * Contrib/Makensisw/toolbar.cpp, Contrib/Makensisw/toolbar.h,
- makensisw.exe: Hid the Compressor toolbar button
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/Czech.nlf,
+ /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Language files/Japanese.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/Swedish.nlf,
+ /NSIS/trunk/Contrib/Language files/Thai.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Turkish.nlf,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/TODO.txt: - More strings translatable (K/M/G Byte,
+ registering, unregistering)
+ - Language specific fonts
+ - $\t now works too
+ - More to do
-2003-05-30 kichik
+2003-04-21 12:41 joostverburg
- * Contrib/Modern UI/Language files/Portuguese.nsh: Spelling
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: language specific fonts
-2003-05-30 kichik
+2003-04-20 17:41 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: Fixed flags collisions (thanks
- Ramon) and added the ONLY_NUMBERS flag
+ * /NSIS/trunk/Source/strlist.h: Should compile on VC7 again
-2003-05-30 joostverburg
+2003-04-20 16:15 joostverburg
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf: v5
+ * /NSIS/trunk/Source/exehead/Ui.c: no more weird descriptions when
+ sections are hidden
-2003-05-30 kichik
+2003-04-19 19:57 kichik
- * Docs/AppendixD.html, Docs/Chapter4.html, Docs/src/attributes.but,
- Docs/src/history.but, Docs/src/sec.but, Docs/src/sections.but:
- Latest documentation by flizebogen
+ * /NSIS/trunk/Examples/one-section.nsi: Missing quotes
-2003-05-30 icemank
+2003-04-19 16:29 flizebogen
- * Contrib/Makensisw/Readme.txt: Made the Toolbar style flat
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but: Updated Changelog and added
+ "compiling NSIS Sources" notes
-2003-05-30 icemank
+2003-04-18 21:46 kichik
- * Contrib/Makensisw/toolbar.cpp, makensisw.exe: Made the Toolbar
- style flat
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: ...
-2003-05-29 kichik
+2003-04-18 21:42 kichik
- * Contrib/Language files/Italian.nlf: v5
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Oops :)
-2003-05-29 kichik
+2003-04-18 20:01 kichik
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/toolbar.cpp:
- Indention
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Fixed bug [ 720332 ]
+ ">301 Characters in State of List Box Bug - Install Options 2"
-2003-05-29 kichik
+2003-04-18 13:54 kichik
- * Contrib/Modern UI/Readme.html: No more MUI_WELCOMEPAGE
+ * /NSIS/trunk/TODO.txt: Clean up
-2003-05-29 kichik
+2003-04-18 11:21 kichik
- * Source/script.cpp: SectionIn RO should not override /o
+ * /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/Source/System.h,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Plugins/System.dll: (brainsucker) fixed a bug with
+ calling proc(void) and added e switch to get GetLastError return
+ value.
-2003-05-28 icemank
+2003-04-17 15:27 kichik
- * makensisw.exe: Added Toolbar + more
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/strlist.h: Faster compilation
-2003-05-28 icemank
+2003-04-16 12:32 kichik
- * Contrib/Makensisw/makensisw.dsw: Added Toolbar + more
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Transparency bug in IO
+ too
-2003-05-28 icemank
+2003-04-15 18:46 joostverburg
- * Contrib/Makensisw/toolbar.bmp, Contrib/Makensisw/toolbar.cpp,
- Contrib/Makensisw/toolbar.h: Added Toolbar
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: info about position of
+ custom function defines
-2003-05-28 icemank
+2003-04-15 14:06 joostverburg
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h: Added
- Toolbar + more
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: header
+ text for aborted installer
-2003-05-27 kichik
+2003-04-15 08:30 kichik
- * Contrib/NSISdl/nsisdl.cpp: - Errors from JNetLib now show again -
- Shows a dialog with ShowInstDetails hide too
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Plugins/BgImage.dll, /NSIS/trunk/TODO.txt: No more
+ weird border
-2003-05-27 joostverburg
+2003-04-14 14:43 joostverburg
- * Contrib/Modern UI/System.nsh: double pages possible
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi: leave function
-2003-05-27 kichik
+2003-04-13 21:20 joostverburg
- * Source/util.cpp: VC7 - unsigned/signed
+ * /NSIS/trunk/Menu/compiler.html: typo
-2003-05-27 kichik
+2003-04-12 23:17 joostverburg
- * Contrib/Language files/Hebrew.nlf: v5
+ * /NSIS/trunk/Source/build.cpp: fixed pluginsdir init function
+ generation
-2003-05-27 kichik
+2003-04-12 10:37 kichik
- * Contrib/Language files/Catalan.nlf, Contrib/Language
- files/Greek.nlf, Contrib/Language files/Korean.nlf,
- Contrib/Language files/Portuguese.nlf, Contrib/Language
- files/Romanian.nlf, Contrib/Language files/Spanish.nlf,
- Contrib/Language files/Swedish.nlf: v5
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ Traditional and Simplified Chinese updates
-2003-05-26 joostverburg
+2003-04-10 17:44 flizebogen
- * Docs/src/usefulfunc.but: UpgradeDLL - register DLL on reboot
- fixed
+ * /NSIS/trunk/Docs/src/usefulinfos.but: Added "How to Read
+ REG_MULTI_SZ Values" to Useful Infos
-2003-05-26 kichik
+2003-04-08 09:11 kichik
- * Contrib/Language files/Hungarian.nlf: v5
+ * /NSIS/trunk/Source/exehead/Ui.c: Fixed bug #717022, overlapping
+ chars in dir input
-2003-05-26 kichik
+2003-04-07 18:45 joostverburg
- * Contrib/BgImage/BgImage.cpp: tabs -> spaces
+ * /NSIS/trunk/Docs/src/build.bat: that was test stuff
-2003-05-26 joostverburg
+2003-04-07 18:05 joostverburg
- * Contrib/Language files/Dutch.nlf: v5
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: new macro's: get
+ uninstaller language, delete shortcuts, new languages
-2003-05-26 kichik
+2003-04-07 17:59 joostverburg
- * Contrib/Language files/Finnish.nlf: v5 and fixes
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fixes
-2003-05-26 kichik
+2003-04-07 17:55 joostverburg
- * makensis.exe, Contrib/Language files/English.nlf,
- Source/build.cpp, Source/build.h, Source/lang.cpp, Source/lang.h,
- Source/script.cpp, Source/tokens.cpp, Source/tokens.h,
- Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/exehead/lang.h: Added AllowSkipFiles - thanks Ramon!
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/usefulfunc.but: updated GetWindowsVersion
-2003-05-26 joostverburg
+2003-04-07 15:00 joostverburg
- * Contrib/NSIS Menu/Info.txt, Contrib/NSIS
- Menu/nsismenu/nsisicon.ico, Contrib/NSIS
- Menu/nsismenu/nsismenu.cpp, Contrib/NSIS Menu/nsismenu/nsismenu.rc,
- Contrib/NSIS Menu/nsismenu/nsismenu.sln, Contrib/NSIS
- Menu/nsismenu/nsismenu.vcproj, Contrib/NSIS
- Menu/nsismenu/resource.h: NSIS Menu source
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh: header
+ text for aborted installer
-2003-05-26 kichik
+2003-04-07 15:00 joostverburg
- * Contrib/BgImage/BgImage.cpp: Threads safer
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf: fixes
-2003-05-25 kichik
+2003-04-07 14:58 joostverburg
- * Examples/one-section.nsi: Simpler script using the new /o switch
+ * /NSIS/trunk/Contrib/Language files/Catalan.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Catalan.nsh:
+ translation by falanko
-2003-05-25 joostverburg
+2003-04-07 14:55 joostverburg
- * Examples/makensis.nsi: compatible with Modern UI 1.65
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: header
+ text for aborted installer
-2003-05-25 joostverburg
+2003-04-06 20:41 joostverburg
- * makensis.exe: latest stuff
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh: wrong
+ string names
-2003-05-25 joostverburg
+2003-04-06 17:17 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Modern UI 1.65
+ * /NSIS/trunk/TODO.txt: Heh, I wonder what I was thinking about
+ when I wrote this...
-2003-05-25 joostverburg
+2003-04-06 16:11 kichik
- * Docs/AppendixB.html: UpgradeDLL - register DLL on reboot fixed
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh:
+ Updates
-2003-05-25 kichik
+2003-04-06 16:06 joostverburg
- * Source/build.cpp, Source/script.cpp, Source/exehead/Ui.c:
- LicenseBkColor now supports /windows (default = white) and /grey
- (default = grey)
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ LicenseForceSelection support - header text for aborted installer
-2003-05-25 kichik
+2003-04-06 16:02 joostverburg
- * Contrib/NSISdl/Script1.rc, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/resource.h, Source/script.cpp: - NSISdl will now
- take the installer's style - Little typo in script.cpp
+ * /NSIS/trunk/Contrib/Language files/Ukrainian.nlf:
+ LicenseForceSelection support
-2003-05-25 kichik
+2003-04-06 15:54 kichik
- * Contrib/Banner/Banner.c, TODO.txt: Refresh banner's text when
- erased and minize along with the installer window
+ * /NSIS/trunk/Contrib/Language files/Lithuanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Lithuanian.nsh:
+ Lithuanian language by NorCis
-2003-05-25 kichik
+2003-04-06 15:45 kichik
- * Source/build.cpp, makensis.exe, Source/exehead/util.c:
- $SMPROGRAMS, $SMSTARTUP, $DESKTOP, $STARTMENU and $QUICKLAUNCH
- working again
+ * /NSIS/trunk/Docs/src/basic.but: Capital F - typo
-2003-05-25 kichik
+2003-04-05 14:50 flizebogen
- * makensis.exe, Source/script.cpp: Section -name working again
+ * /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/pages.but:
+ Updated Changelog
-2003-05-24 kichik
+2003-04-05 13:34 kichik
- * Source/build.cpp, makensis.exe: Plugins code fixed
+ * /NSIS/trunk/TODO.txt: Compiler speed optimization
-2003-05-24 kichik
+2003-04-05 12:56 kichik
- * TODO.txt: Done - /o
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Include/Sections.nsh,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c: Rewrote a lot of the components
+ tree code:
+ - Added SF_PSELECTED for partially selected sub-sections
+ - SF_EXPAND now refreshes the components tree
+ - Fixed problems with sub-sections with RO sections as children
+ - (-1) sent to .onMouseOverSection when mouse over nothing
+ - RO sections can now be in InstTypes too (default to old
+ behavior)
+ - Optimized code
-2003-05-24 kichik
+2003-04-05 12:08 joostverburg
- * makensis.exe: Latest changes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ header text for aborted installer
-2003-05-24 kichik
+2003-04-04 22:19 kichik
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern_nodesc.exe, Contrib/UIs/modern_smalldesc.exe,
- Contrib/UIs/sdbarker_tiny.exe, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/fileform.h, makensis.exe,
- Source/exehead/resource.rc, Source/exehead/state.h,
- Source/exehead/ui.h, Source/exehead/util.c: - Improved installation
- types behaviour - .onSelChange no longer called when the components
- page is created - First section is selected at compile time -
- changes in .onInit stick - Added SectionSetSize / SectionGetSize -
- Added SetCurInstType / GetCurInstType - Added InstTypeSetText /
- InstTypeGetText - ability to change (and add and remove)
- installation types on runtime - NSIS_MAX_INST_TYPES is now 32 by
- default - InstType texts are now processed ($0, $1, etc. can be
- used) - Added /o switch for Section - unselected by default
+ * /NSIS/trunk/TODO.txt: IO todo done
-2003-05-24 kichik
+2003-04-04 22:02 joostverburg
- * TODO.txt: More
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: header
+ text for aborted installer
-2003-05-22 joostverburg
+2003-04-04 20:45 joostverburg
- * Contrib/Language files/Danish.nlf: capital
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh:
+ header text for aborted installer
-2003-05-22 joostverburg
+2003-04-04 20:45 joostverburg
- * Contrib/Language files/Danish.nlf, Contrib/Modern UI/Language
- files/Danish.nsh: fixes
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf: fixes
-2003-05-22 joostverburg
+2003-04-04 19:39 joostverburg
- * Contrib/VPatch/vpatchdll.c, Contrib/VPatch/vpatchdll.dsp: file
- locations
+ * /NSIS/trunk/Menu/images/version.gif: beta 4
-2003-05-21 joostverburg
+2003-04-04 19:26 flizebogen
- * Contrib/Modern UI/Language files/Macedonian.nsh: wrong variable
- name
+ * /NSIS/trunk/Docs/src/defines.but: Changed Conditional Compilation
+ docs to default style
-2003-05-21 joostverburg
+2003-04-04 17:24 joostverburg
- * Contrib/Modern UI/Language files/Portuguese.nsh: Portuguese
- Modern UI language file
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ renamed string names
-2003-05-21 joostverburg
+2003-04-04 17:23 joostverburg
- * Contrib/VPatch/GenPat.exe, Contrib/VPatch/Readme.html,
- Contrib/VPatch/example.nsi, Contrib/VPatch/newfile.txt,
- Contrib/VPatch/oldfile.txt, Contrib/VPatch/patch.pat,
- Contrib/VPatch/vpatchdll.c, Contrib/VPatch/vpatchdll.dsp,
- Contrib/VPatch/vpatchdll.dsw, Examples/makensis.nsi: VPatch
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf:
+ LicenseForceSelection support
-2003-05-18 kichik
+2003-04-04 17:23 joostverburg
- * Source/exehead/exec.c: Sleep back to normal
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh:
+ LicenseForceSelection support - renamed string names
-2003-05-16 kichik
+2003-04-04 17:22 joostverburg
- * Docs/Chapter4.html, Docs/src/callback.but: Bug 738682 fixed -
- .onGUIEnd => un.onGUIEnd
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: header
+ text for aborted installer - renamed string names
-2003-05-16 kichik
+2003-04-04 17:21 joostverburg
- * Contrib/Modern UI/Language files/Finnish.nsh: Finnish MUI
- language file
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: header text for aborted
+ installer
-2003-05-14 kichik
+2003-04-04 14:43 kichik
- * Contrib/BgImage/BgImage.txt: Forgot to mention negative coords
+ * /NSIS/trunk/Docs/src/bin/halibut/biblio.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/src/bin/halibut/contents.c,
+ /NSIS/trunk/Docs/src/bin/halibut/error.c,
+ /NSIS/trunk/Docs/src/bin/halibut/halibut.h,
+ /NSIS/trunk/Docs/src/bin/halibut/help.c,
+ /NSIS/trunk/Docs/src/bin/halibut/index.c,
+ /NSIS/trunk/Docs/src/bin/halibut/input.c,
+ /NSIS/trunk/Docs/src/bin/halibut/keywords.c,
+ /NSIS/trunk/Docs/src/bin/halibut/licence.c,
+ /NSIS/trunk/Docs/src/bin/halibut/main.c,
+ /NSIS/trunk/Docs/src/bin/halibut/malloc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/misc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.h,
+ /NSIS/trunk/Docs/src/bin/halibut/ustring.c: Hopefully readable
+ now: indent -nut -kr -bl -bli0 -i2 *
-2003-05-14 kichik
+2003-04-04 12:27 kichik
- * Docs/Chapter4.html, Docs/src/log.but: Compile NSIS for
- NSIS_CONFIG_LOG
+ * /NSIS/trunk/Source/exehead/Ui.c: - Leave function of instfiles
+ will be called if installation aborted too so the MUI will be
+ able to set the title
+ - Cancel button now set default if installation canceled
-2003-05-14 kichik
+2003-04-04 11:34 kichik
- * Docs/AppendixD.html, Docs/Chapter4.html, Docs/src/callback.but:
- .onGUIEnd
+ * /NSIS/trunk/Source/script.cpp: Missed a return, IfErrors works
+ again
-2003-05-12 kichik
+2003-04-04 09:30 joostverburg
- * Source/util.cpp: Wrong boundary
+ * /NSIS/trunk/Docs/src/plugin.but: typo
-2003-05-12 kichik
+2003-04-04 08:23 joostverburg
- * Source/util.cpp: Some more checks when finding icon resources
- offsets - no more crashes when UPX compresses the icons
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh:
+ LicenseForceSelection support
-2003-05-11 kichik
+2003-04-03 19:07 joostverburg
- * Source/script.cpp: A bit more clearer code
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: fixes
-2003-05-11 kichik
+2003-04-03 15:38 joostverburg
- * Contrib/NSISdl/nsisdl.cpp: Flicker reduction by A. Schiffler
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: typo
-2003-05-11 kichik
+2003-04-03 14:27 kichik
- * Contrib/Language files/Macedonian.nlf, Contrib/Modern UI/Language
- files/Macedonian.nsh: Macedonian update - NLFv4 and MUI 1.64
+ * /NSIS/trunk/Docs/src/compiler.but: S1 not S2 for !addincludedir
-2003-05-11 kichik
+2003-04-03 13:17 kichik
- * Contrib/BgImage/BgImage.cpp, Contrib/BgImage/BgImage.txt: Sound
- loops
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Added EXTENDEDSELCT flag
+ for list boxes which replaces MULTISELECT that now acts exactly
+ as the real style flag ([double] click turns on or off selection)
-2003-05-10 kichik
+2003-04-03 12:26 kichik
- * Contrib/BgImage/BgImage.txt: Yey for the spell checker :)
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Plugins/UserInfo.dll: Will always return Admin on 9x
+ systems with advapi32.dll that contains functions it shouldn't
+ (all of them?)
-2003-05-10 kichik
+2003-04-02 20:29 joostverburg
- * Contrib/BgImage/BgImage.cpp, Contrib/BgImage/BgImage.dsp,
- Contrib/BgImage/BgImage.txt, Contrib/BgImage/Example.nsi, TODO.txt,
- Source/build.cpp, Source/util.h, Source/exehead/Ui.c,
- Source/exehead/bgbg.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, makensis.exe: - BgImage improved a lot -
- Added .onGUIEnd - Some optimizations
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/BIN/bzip2.exe,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/BIN/ExtractDLL.dll:
+ NSIS Update - use ExtractDLL
-2003-05-09 kichik
+2003-04-02 19:54 kichik
- * Source/script.cpp, Source/util.cpp: Check for 8bpp
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ IfAbort
-2003-05-09 kichik
+2003-04-02 18:46 kichik
- * Docs/Chapter4.html, Docs/src/attributes.but: 8bpp max for
- CheckBitmap
+ * /NSIS/trunk/TODO.txt: IO improvement
-2003-05-09 kichik
+2003-04-02 18:09 kichik
- * Source/lang.cpp: ADD_FONT not SET_FONT
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: NSISdl will now take the font
+ from the NSIS installer
-2003-05-09 kichik
+2003-04-02 16:56 joostverburg
- * Source/exehead/util.c: "Bug" 733817
+ * /NSIS/trunk/Contrib/LangDLL/resource.rc: compiles without
+ Platform SDK
-2003-05-08 kichik
+2003-04-02 15:49 kichik
- * Contrib/Makensisw/Readme.txt: Some credits too
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h:
+ InitPluginsDir fixes
-2003-05-08 kichik
+2003-04-02 12:21 joostverburg
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/noclib.cpp,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, makensisw.exe: iceman_k's define list
- for MakeNSISw
+ * /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh:
+ LicenseForceSelection support
-2003-05-07 joostverburg
+2003-04-01 18:07 kichik
- * Contrib/InstallOptions/Readme.html: wrong variable
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp: -
+ GetTempFile will now try 100 times before failing
+ - InitPluginsDir will give an error if unable to initialize
-2003-05-07 joostverburg
+2003-04-01 16:20 joostverburg
- * Include/Sections.nsh: SetSectionInInstType /
- ClearSectionInInstType
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh:
+ LicenseForceSelection support
-2003-05-06 joostverburg
+2003-04-01 14:24 joostverburg
- * Contrib/Language files/Finnish.nlf: Finnish language file
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finish header inserted
+ when MUI_FINISHPAGE_NOAUTOCLOSE is defined - removed double
+ bcheck
-2003-05-06 joostverburg
+2003-03-31 14:28 joostverburg
- * Contrib/Language files/Swedish.nlf, Contrib/Modern UI/Language
- files/Swedish.nsh: fix
+ * /NSIS/trunk/Docs/src/defines.but: macro's can contain !ifdef etc.
-2003-05-05 joostverburg
+2003-03-30 17:12 flizebogen
- * Contrib/NSISdl/ReadMe.txt: quiet download
+ * /NSIS/trunk/Docs/src/sections.but: Changed section syntax again
+ (added req flag)
-2003-05-04 joostverburg
+2003-03-30 16:49 flizebogen
- * Contrib/Language files/Hungarian.nlf: fix
+ * /NSIS/trunk/Docs/src/sections.but: Section Syntax (! for bold
+ sections)
-2003-05-03 joostverburg
+2003-03-30 15:08 kichik
- * Contrib/Language files/Portuguese.nlf: v4
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: IfErrors clears the error flag
+ again
-2003-05-02 kichik
+2003-03-30 12:45 joostverburg
- * Contrib/UserInfo/UserInfo.c: Guests comes after users
- http://forums.winamp.com/showthread.php?s=&threadid=112655
+ * /NSIS/trunk/Docs/src/ui.but: typo
-2003-05-02 kichik
+2003-03-30 12:21 joostverburg
- * Contrib/UserInfo/UserInfo.nsi: Done after error
+ * /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/style.css:
+ updated changelog, blue links
-2003-05-02 joostverburg
+2003-03-30 11:42 joostverburg
- * Contrib/Banner/Readme.txt: more info
+ * /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ finish page accelerator keys
-2003-05-01 kichik
+2003-03-29 20:32 joostverburg
- * Docs/Chapter4.html, Docs/src/var.but: Tab
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: finish
+ page accelerator keys
-2003-05-01 joostverburg
+2003-03-29 20:31 joostverburg
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: fonts
+ * /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ LicenseForceSelection support
-2003-05-01 joostverburg
+2003-03-29 18:32 joostverburg
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh: fix
+ * /NSIS/trunk/TODO.txt: RMDir /REBOOTOK
-2003-05-01 joostverburg
+2003-03-29 17:33 flizebogen
- * Contrib/Language files/Korean.nlf: v4
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/jumps.but,
+ /NSIS/trunk/Docs/src/labels.but, /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/usection.but, /NSIS/trunk/Docs/src/var.but,
+ /NSIS/trunk/Docs/style.css: Updated RMDIR command Syntax, added
+ internal Referencies, rearanged order of some commands (by
+ letter), new css file (no underlines for links)
-2003-05-01 joostverburg
+2003-03-29 17:16 kichik
- * Contrib/Language files/SimpChinese.nlf, Contrib/Modern
- UI/Language files/SimpChinese.nsh: fix
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ Back to 33.5/34
-2003-05-01 joostverburg
+2003-03-29 13:39 kichik
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/HeaderBitmap.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Get instead of remember
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c: Buttons from focused license
+ text fixed (return will not work if next button not enabled and
+ escape will work as cancel)
-2003-04-30 kichik
+2003-03-29 11:45 kichik
- * Examples/Modern UI/MultiLanguage.nsi: Get instead of remember
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: RMDir /REBOOTOK
-2003-04-30 joostverburg
+2003-03-29 11:05 kichik
- * Contrib/Modern UI/System.nsh: no space before "click next to
- continue" text on welcome page
+ * /NSIS/trunk/Include/Sections.nsh: or not and
-2003-04-30 joostverburg
+2003-03-28 20:45 flizebogen
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: fix
+ * /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/ui.but:
+ Updated SetBKColor and Changelog
-2003-04-30 joostverburg
+2003-03-28 18:41 kichik
- * Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/TradChinese.nlf: v4
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ Transparent controls. Use SetBkColor (hwnd) transparent
-2003-04-30 kichik
+2003-03-28 18:32 kichik
- * Contrib/NSISdl/nsisdl.cpp: Unable to open file error was still
- set in $0 instead of on the stack
+ * /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/biblio.c: Now shows line number
+ for unresolved \R cross-references
-2003-04-30 kichik
+2003-03-28 16:04 joostverburg
- * Source/script.cpp: Bug #730056 fixed - empty license file error
- added
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: langdll text parameter
-2003-04-30 kichik
+2003-03-28 13:24 kichik
- * Source/build.h, Source/script.cpp: Two File /r commands should
- work again
+ * /NSIS/trunk/Docs/src/attributes.but: No need for two
+ LoadLangugeFile sections
-2003-04-30 joostverburg
+2003-03-27 19:45 flizebogen
- * Contrib/Language files/Croatian.nlf: v4
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Docs/src/var.but: Updated Tutorial, typos and a few
+ links
-2003-04-30 joostverburg
+2003-03-27 14:50 joostverburg
- * Contrib/Modern UI/Language files/Croatian.nsh: new strings
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh:
+ LicenseForceSelection support
-2003-04-30 joostverburg
+2003-03-27 14:27 joostverburg
- * Contrib/Language files/Hungarian.nlf: fix
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh:
+ LicenseForceSelection support
-2003-04-29 joostverburg
+2003-03-27 14:16 joostverburg
- * TODO.txt: langfiles & fonts done
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: fixes
-2003-04-29 kichik
+2003-03-27 13:11 kichik
- * Source/script.cpp: "Bug" #685834 fixed - implemented a more
- natural recursion that descends into every directory and not only
- into those caught by the given spec
+ * /NSIS/trunk/Examples/waplugin.nsi: No license page
-2003-04-29 kichik
+2003-03-27 12:52 kichik
- * Examples/viewhtml.nsi: Shows the HTML file and both possible ways
+ * /NSIS/trunk/Contrib/System/Source/stdafx.h,
+ /NSIS/trunk/Contrib/System/Source/System.c: Source code for
+ latest fixes (brainsucker)
-2003-04-29 joostverburg
+2003-03-26 23:00 kichik
- * Contrib/Language files/Swedish.nlf: v4
+ * /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi,
+ /NSIS/trunk/Plugins/System.dll: (brainsucker) new system build.
+ now work's at the kichik's computer too :)
-2003-04-29 joostverburg
+2003-03-26 22:40 joostverburg
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Modern UI/Language
- files/Swedish.nsh: Swedish translation
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: message text
-2003-04-28 joostverburg
+2003-03-26 22:29 joostverburg
- * Contrib/Modern UI/Readme.html: wrong define name
+ * /NSIS/trunk/Examples/makensis.nsi: updated for Modern UI 1.64
-2003-04-28 joostverburg
+2003-03-26 22:03 joostverburg
- * makensis.exe: Bug #728281 fixed - system menu has everything
- enabled (including maximize) on Windows 9x
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: better
+ translation
-2003-04-28 kichik
+2003-03-26 21:54 joostverburg
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmpr.exe, Contrib/UIs/sdbarker_tiny.exe:
- Bug #728281 fixed - system menu has everything enabled (including
- maximize) on Windows 9x
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: no finish
+ header macro's anymore - language preference stored when
+ installation has completed
-2003-04-28 kichik
+2003-03-26 21:11 joostverburg
- * Source/exehead/resource.rc: Bug #728281 fixed - system menu has
- everything enabled (including maximize) on Windows 9x
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh:
+ LicenseForceSelection support
-2003-04-28 joostverburg
+2003-03-26 20:51 kichik
- * Contrib/Language files/Polish.nlf: v4
+ * /NSIS/trunk/Source/exehead/Ui.c: Bug with new force and license
+ page not being first
-2003-04-28 joostverburg
+2003-03-26 20:15 joostverburg
- * Contrib/Modern UI/Readme.html: examples
+ * /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh:
+ LicenseForceSelection support
-2003-04-27 joostverburg
+2003-03-26 19:58 flizebogen
- * Contrib/Modern UI/Language files/Czech.nsh: fix
+ * /NSIS/trunk/Docs/src/attributes.but: Update on
+ LicenseForceSelection
-2003-04-27 joostverburg
+2003-03-26 19:27 joostverburg
- * Contrib/Language files/Czech.nlf: v4
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh:
+ LicenseForceSelection support
-2003-04-27 joostverburg
+2003-03-26 19:20 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: more texts can be customized
+ * /NSIS/trunk/Source/tokens.cpp: Better syntax
-2003-04-26 joostverburg
+2003-03-26 19:16 joostverburg
- * Contrib/Modern UI/Language files/Czech.nsh: new strings
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.64
+ - LicenseForceSelection support
-2003-04-26 joostverburg
+2003-03-26 19:16 flizebogen
- * Contrib/Language files/Romanian.nlf: v4
+ * /NSIS/trunk/Docs/src/attributes.but: Added
+ "LicenseForceSelection"
-2003-04-25 joostverburg
+2003-03-26 18:18 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: write to INI file in Welcome/Finish
- page pre functions
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/tokens.cpp: Old
+ language files will work too...
-2003-04-25 joostverburg
+2003-03-26 18:04 kichik
- * Contrib/Language files/Spanish.nlf: v4
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: An
+ option to change the text in the script
-2003-04-23 kichik
+2003-03-26 17:47 kichik
- * Source/lang.cpp, makensis.exe: Padding, padding, padding...
+ * /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/Hebrew.nlf,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/resource.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ LicenseForceSelection radiobuttons|checkbox
-2003-04-23 joostverburg
+2003-03-26 16:01 joostverburg
- * Examples/rtest.nsi: format
+ * /NSIS/trunk/TODO.txt: update
-2003-04-23 joostverburg
+2003-03-26 14:37 kichik
- * Contrib/Language files/Ukrainian.nlf, Contrib/Language
- files/Catalan.nlf: v4
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Icon with path works
+ again
-2003-04-23 joostverburg
+2003-03-26 13:22 joostverburg
- * Contrib/Language files/Greek.nlf: v4
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: typo
-2003-04-23 joostverburg
+2003-03-25 16:47 joostverburg
- * Contrib/Modern UI/Language files/Japanese.nsh: header text for
- aborted installer
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: ioSpecial
-2003-04-23 joostverburg
+2003-03-25 15:15 kichik
- * Contrib/Language files/Japanese.nlf: v4
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Indentation
-2003-04-23 kichik
+2003-03-24 15:35 kichik
- * Source/exehead/Ui.c: Compiles without NSIS_SUPPORT_CODECALLBACKS
- again
+ * /NSIS/trunk/Source/build.cpp: Disable last cancel button only if
+ instfiles used
-2003-04-22 joostverburg
+2003-03-24 14:50 kichik
- * Contrib/Language files/Japanese.nlf: Japanese fonts
+ * /NSIS/trunk/Source/build.cpp: Leave function not show function in
+ error
-2003-04-22 joostverburg
+2003-03-23 17:14 kichik
- * Contrib/Language files/French.nlf, Contrib/Language
- files/German.nlf: v4
+ * /NSIS/trunk/TODO.txt: more to do
-2003-04-22 joostverburg
+2003-03-23 17:12 kichik
- * Contrib/Language files/PortugueseBR.nlf: fix
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Now frees the memory of
+ loaded bitmaps when exiting
-2003-04-22 kichik
+2003-03-22 15:31 kichik
- * Source/exehead/Ui.c, makensis.exe: Bug report 725319 - sort of
+ * /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi: Updates
-2003-04-21 joostverburg
+2003-03-22 12:38 kichik
- * Contrib/Language files/PortugueseBR.nlf: v4
+ * /NSIS/trunk/Source/script.cpp: Missing parameter, thanks
+ willowufgood
-2003-04-21 joostverburg
+2003-03-22 11:15 joostverburg
- * Contrib/Language files/Dutch.nlf: forgot some items
+ * /NSIS/trunk/Contrib/System/Source/chkstk.obj,
+ /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/Source/System.h,
+ /NSIS/trunk/Contrib/System/Source/System.vcproj,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Plugins/System.dll: Updated System plugin - Win9x
+ fixes and more
-2003-04-21 joostverburg
+2003-03-21 19:29 joostverburg
- * Contrib/Language files/Hungarian.nlf: spaces
+ * /NSIS/trunk/Docs/src/usefulfunc.but: typo
-2003-04-21 joostverburg
+2003-03-21 12:38 kichik
- * Contrib/Language files/English.nlf: fix
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Fixed TrimNewLines (thanks
+ pengyou)
-2003-04-21 joostverburg
+2003-03-20 20:49 kichik
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/Hungarian.nlf: v4
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h,
+ /NSIS/trunk/TODO.txt: SetStaticBkColor -> SetBkColor, now works
+ for dialogs, buttons, edit boxes and list boxes (only in IO)
-2003-04-21 flizebogen
+2003-03-20 19:37 flizebogen
- * Docs/AppendixC.html, Docs/Chapter2.html, Docs/Chapter4.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/flowcontrol.but, Docs/src/sec.but,
- Docs/src/usefulinfos.but: Added description for Ifabort, modified
- SectionSetText, added Errorlevel description
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but, /NSIS/trunk/TODO.txt: Added
+ Info "Dump Content of Log Window to File", fixed Typos
-2003-04-21 joostverburg
+2003-03-20 13:13 kichik
- * Contrib/Modern UI/Language files/German.nsh: fix
+ * /NSIS/trunk/Source/build.cpp: Random flags for uninstaller fixed
-2003-04-21 kichik
+2003-03-20 11:39 kichik
- * Contrib/Language files/Arabic.nlf, Contrib/Language
- files/Bulgarian.nlf, Contrib/Language files/Catalan.nlf,
- Contrib/Language files/Croatian.nlf, Contrib/Language
- files/Czech.nlf, Contrib/Language files/Danish.nlf,
- Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf, Contrib/Language files/French.nlf,
- Contrib/Language files/German.nlf, Contrib/Language
- files/Greek.nlf, Contrib/Language files/Hebrew.nlf,
- Contrib/Language files/Hungarian.nlf, Contrib/Language
- files/Italian.nlf, Contrib/Language files/Japanese.nlf,
- Contrib/Language files/Korean.nlf, Contrib/Language
- files/Lithuanian.nlf, Contrib/Language files/Macedonian.nlf,
- Contrib/Language files/Polish.nlf, Contrib/Language
- files/Portuguese.nlf, Contrib/Language files/PortugueseBR.nlf,
- Contrib/Language files/Romanian.nlf, Contrib/Language
- files/Russian.nlf, Contrib/Language files/SimpChinese.nlf,
- Contrib/Language files/Slovak.nlf, Contrib/Language
- files/Spanish.nlf, Contrib/Language files/Swedish.nlf,
- Contrib/Language files/Thai.nlf, Contrib/Language
- files/TradChinese.nlf, Contrib/Language files/Turkish.nlf,
- Contrib/Language files/Ukrainian.nlf, Source/DialogTemplate.cpp,
- Source/DialogTemplate.h, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/lang.h, Source/script.cpp, TODO.txt,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/lang.h, makensis.exe: -
- More strings translatable (K/M/G Byte, registering, unregistering)
- - Language specific fonts - $\t now works too - More to do
+ * /NSIS/trunk/Contrib/System/SysFunc.nsh: GetFullPathName ->
+ SearchPath
-2003-04-21 joostverburg
+2003-03-20 11:33 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: language specific fonts
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ b4 (CVS) label
-2003-04-20 kichik
+2003-03-19 17:04 joostverburg
- * makensis.exe: With comrpession this time...
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh: fixed
+ Welcome page string names
-2003-04-20 kichik
+2003-03-19 13:59 joostverburg
- * Source/strlist.h: Should compile on VC7 again
+ * /NSIS/trunk/Docs/src/usefulfunc.but: updated GetWindowsVersion
-2003-04-20 joostverburg
+2003-03-19 11:54 joostverburg
- * makensis.exe: no more weird descriptions when sections are hidden
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf: updated
+ translation
-2003-04-20 joostverburg
+2003-03-18 20:43 kichik
- * Source/exehead/Ui.c: no more weird descriptions when sections are
- hidden
+ * /NSIS/trunk/Source/script.cpp: HEX number for text color in
+ BGGradient
-2003-04-19 kichik
+2003-03-18 20:36 kichik
- * Examples/one-section.nsi: Missing quotes
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.h,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/resource.h,
+ /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/TODO.txt: Some space
+ saving changes, /NOCUSTOM and /COMPONENTSONLYONCUSTOM work
+ together and infastructures for future changes
-2003-04-19 flizebogen
+2003-03-18 16:12 rainwater
- * Docs/AppendixC.html, Docs/AppendixD.html, Docs/Chapter2.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/history.but, Docs/src/usefulinfos.but: Updated Changelog
- and added "compiling NSIS Sources" notes
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Downloading text in nsisdl page
+ cut off first char of path name if it wasn't a full path.
-2003-04-19 kichik
+2003-03-18 15:51 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: ...
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Contrib/StartMenu/Example.nsi,
+ /NSIS/trunk/Docs/src/pages.but: Custom leave function updates
-2003-04-19 kichik
+2003-03-18 15:45 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: Oops :)
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Leave function for custom pages
+ too
+
+2003-03-18 13:53 kichik
+
+ * /NSIS/trunk/Docs/src/attributes.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ AddBrandingImage doesn't depend on the UI now. Can now set the
+ branding image on the bottom and on the right too, and set a
+ custom padding value
-2003-04-18 kichik
+2003-03-18 13:49 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp: Fixed bug [ 720332 ]
- ">301 Characters in State of List Box Bug - Install Options 2"
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: another small
+ html fix
-2003-04-18 kichik
+2003-03-18 13:44 joostverburg
- * TODO.txt: Clean up
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: html errors
-2003-04-18 kichik
+2003-03-18 13:33 joostverburg
- * Contrib/System/Source/System.c, Contrib/System/System.txt,
- Contrib/System/Source/System.h: (brainsucker) fixed a bug with
- calling proc(void) and added e switch to get GetLastError return
- value.
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: syntax format
-2003-04-17 kichik
+2003-03-18 12:39 joostverburg
- * Source/Plugins.cpp, Source/Plugins.h, Source/build.cpp,
- Source/build.h, Source/lang.cpp, Source/lang.h,
- Source/makenssi.cpp, Source/script.cpp, Source/strlist.h: Faster
- compilation
+ * /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Source/tokens.cpp:
+ Page command syntax
-2003-04-16 kichik
+2003-03-18 12:39 joostverburg
- * makensis.exe: No CopyFiles crash (just recompiled)
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: define syntax, fixes
-2003-04-16 kichik
+2003-03-18 10:11 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp: Transparency bug in
- IO too
+ * /NSIS/trunk/Contrib/Dialer/Dialer.txt, /NSIS/trunk/Contrib/NSIS
+ Update/NSISUpdate.nsi, /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Examples/waplugin.nsi: ConnectInternet function
-2003-04-15 joostverburg
+2003-03-18 09:57 joostverburg
- * Contrib/Modern UI/Readme.html: info about position of custom
- function defines
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: new setup name:
+ Modern UI Test
-2003-04-15 joostverburg
+2003-03-18 09:55 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: removed 1.61 language
+ file compatibility
+
+2003-03-18 09:42 joostverburg
+
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh:
+ compatible with Modern UI 1.63
+
+2003-03-17 16:05 kichik
+
+ * /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe: Windows 9x combo
+ box size
+
+2003-03-17 14:20
+
+ * /NSIS/tags/v20b3, /NSIS/tags/v20b3/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20b3/Contrib/Icons/normal-install.ico,
+ /NSIS/tags/v20b3/Contrib/Icons/normal-uninstall.ico,
+ /NSIS/tags/v20b3/Contrib/Icons/setup.ico,
+ /NSIS/tags/v20b3/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20b3/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/tags/v20b3/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20b3/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20b3/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/tags/v20b3/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20b3/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20b3/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20b3/Contrib/NSISdl/httpget.cpp,
+ /NSIS/tags/v20b3/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20b3/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20b3/Contrib/NSISdl/resource.h,
+ /NSIS/tags/v20b3/Contrib/NSISdl/Script1.rc,
+ /NSIS/tags/v20b3/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20b3/Contrib/zip2exe,
+ /NSIS/tags/v20b3/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20b3/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20b3/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20b3/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20b3/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20b3/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20b3/Examples/rtest.nsi,
+ /NSIS/tags/v20b3/Source/afxres.h,
+ /NSIS/tags/v20b3/Source/exedata.cpp,
+ /NSIS/tags/v20b3/Source/exedata.h,
+ /NSIS/tags/v20b3/Source/exehead/afxres.h,
+ /NSIS/tags/v20b3/Source/exehead/bin2h.c,
+ /NSIS/tags/v20b3/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20b3/Source/exehead/Makefile,
+ /NSIS/tags/v20b3/Source/exehead/uninst.ico,
+ /NSIS/tags/v20b3/Source/Makefile,
+ /NSIS/tags/v20b3/Source/makenssi.dsw,
+ /NSIS/tags/v20b3/Source/zlib/DEFLATE.H,
+ /NSIS/tags/v20b3/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20b3'.
- * Contrib/Modern UI/Language files/Korean.nsh: header text for
- aborted installer
+2003-03-17 14:20 joostverburg
-2003-04-15 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: startmenu shortcuts
- * Contrib/BgImage/BgImage.cpp, TODO.txt: No more weird border
+2003-03-17 14:12 joostverburg
-2003-04-14 joostverburg
+ * /NSIS/trunk/Menu/docs.html: tutorial
- * Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/test.nsi: leave function
+2003-03-17 13:46 kichik
-2003-04-14 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Escaping notes in the
+ readme and a check for ConvertNewLines
- * Menu/compiler.html: typo
+2003-03-17 13:23 kichik
-2003-04-13 joostverburg
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/registry.but, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ FlushINI
- * makensis.exe, Source/build.cpp: fixed pluginsdir init function
- generation
+2003-03-16 22:13 joostverburg
-2003-04-12 kichik
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: caption
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: Traditional and Simplified
- Chinese updates
+2003-03-16 21:19 joostverburg
-2003-04-10 flizebogen
+ * /NSIS/trunk/Contrib/NSIS Update/Resources/GUI/NSISUpdate.exe:
+ updated ui
- * Docs/AppendixC.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/usefulinfos.but:
- Added "How to Read REG_MULTI_SZ Values" to Useful Infos
+2003-03-16 21:10 joostverburg
-2003-04-08 kichik
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/GUI/io.ini: NSIS
+ Update: no mui, gui changes, text changes
- * makensis.exe: Fixed bug #717022, overlapping chars in dir input
+2003-03-16 20:37 kichik
-2003-04-08 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but,
+ /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/src/bin/halibut/halibut.h,
+ /NSIS/trunk/Docs/src/bin/halibut/input.c,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Docs/src/plugin.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/tutorial.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but,
+ /NSIS/trunk/Docs/src/var.but: Added \R{ref}{name} for named
+ references
- * Source/exehead/Ui.c: Fixed bug #717022, overlapping chars in dir
- input
+2003-03-16 19:49 joostverburg
-2003-04-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: uninstaller: don't show
+ page tile in titlebar
- * Docs/src/build.bat: that was test stuff
+2003-03-16 19:46 joostverburg
-2003-04-07 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: delete old UI's
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi: new macro's: get uninstaller
- language, delete shortcuts, new languages
+2003-03-16 17:40 kichik
-2003-04-07 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/tutorial.but, /NSIS/trunk/Source/tokens.cpp:
+ - Docs fixes
+ - Command help for InstType fix
- * Contrib/Language files/German.nlf: fixes
+2003-03-16 11:20 flizebogen
-2003-04-07 joostverburg
+ * /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Docs/src/usefulinfos.but: added "how to install vb6
+ runtimes and Call an external dll using system.dll
- * Docs/AppendixB.html, Docs/src/build.bat, Docs/src/usefulfunc.but:
- updated GetWindowsVersion
+2003-03-16 10:11 joostverburg
-2003-04-07 joostverburg
+ * /NSIS/trunk/Docs/style.css: fonts
- * Contrib/Modern UI/Language files/Romanian.nsh: header text for
- aborted installer
+2003-03-16 09:56 joostverburg
-2003-04-07 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Warning icon for
+ 'validation error' MessageBox
- * Contrib/Language files/Romanian.nlf: fixes
+2003-03-16 06:20 flizebogen
-2003-04-07 joostverburg
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/usefulinfos.but: Added infos about "Add
+ uninstall information to Add/Remove Program" in a new appendix
- * Contrib/Language files/Catalan.nlf, Contrib/Modern UI/Language
- files/Catalan.nsh: translation by falanko
+2003-03-15 20:22 joostverburg
-2003-04-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: echo Modern UI version
- * Contrib/Modern UI/Language files/Polish.nsh: header text for
- aborted installer
+2003-03-15 18:35 flizebogen
-2003-04-06 joostverburg
+ * /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/tutorial.but:
+ added SectionSetInstTypes and SectionGetInstTypes, fixed typos in
+ the tutorial
- * Contrib/Modern UI/Language files/Hungarian.nsh: wrong string
- names
+2003-03-15 18:05 kichik
-2003-04-06 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/tutorial.but: Tons of updates
- * TODO.txt: Heh, I wonder what I was thinking about when I wrote
- this...
+2003-03-15 17:16 kichik
-2003-04-06 kichik
+ * /NSIS/trunk/Source/tokens.cpp: - PluginDir -> !AddPluginDir
+ - Fixed parms list of Section(Get/Set)InstTypes
- * Contrib/Language files/Lithuanian.nlf, Contrib/Modern UI/Language
- files/Lithuanian.nsh: Updates
+2003-03-15 15:54 kichik
-2003-04-06 joostverburg
+ * /NSIS/trunk/Source/tokens.cpp: inst_types not flags
- * Contrib/Modern UI/Language files/Ukrainian.nsh:
- LicenseForceSelection support - header text for aborted installer
+2003-03-15 14:27 kichik
-2003-04-06 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: History updates
- * Contrib/Language files/Ukrainian.nlf: LicenseForceSelection
- support
+2003-03-15 14:16 kichik
-2003-04-06 kichik
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Plugins/BgImage.dll: now compatible with the minimize
+ button
- * Contrib/Language files/Lithuanian.nlf, Contrib/Modern UI/Language
- files/Lithuanian.nsh: Lithuanian language by NorCis
+2003-03-15 13:54 kichik
-2003-04-06 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ WriteINIStr now works with an empty value ("")
- * Docs/src/basic.but: Capital F - typo
+2003-03-15 13:24 kichik
-2003-04-05 flizebogen
+ * /NSIS/trunk/TODO.txt: Fonts
- * Docs/AppendixD.html, Docs/Chapter4.html, Docs/src/history.but,
- Docs/src/pages.but: Updated Changelog
+2003-03-15 12:55 joostverburg
-2003-04-05 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Plugins/InstallOptions.dll: InstallOptions 2.1,
+ always \r\n for newline
- * TODO.txt: Compiler speed optimization
+2003-03-15 11:26 kichik
-2003-04-05 kichik
+ * /NSIS/trunk/Contrib/Icons/yi-simple_check.bmp,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_check.bmp: No shadow
- * makensis.exe, Contrib/Modern UI/System.nsh, Include/Sections.nsh,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h: Rewrote a lot of the components tree
- code: - Added SF_PSELECTED for partially selected sub-sections -
- SF_EXPAND now refreshes the components tree - Fixed problems with
- sub-sections with RO sections as children - (-1) sent to
- .onMouseOverSection when mouse over nothing - RO sections can now
- be in InstTypes too (default to old behavior) - Optimized code
+2003-03-14 22:06 joostverburg
-2003-04-05 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: only IO stuff
- * Contrib/Modern UI/Language files/French.nsh, Contrib/Modern
- UI/Language files/German.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh: header text for aborted installer
+2003-03-14 22:04 joostverburg
-2003-04-05 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: removed old
+ recommended values
- * TODO.txt: IO todo done
+2003-03-14 19:29 joostverburg
-2003-04-05 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: bzip2 info in comments
- * Contrib/Modern UI/Language files/Spanish.nsh: header text for
- aborted installer
+2003-03-14 11:17 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: updated
+ translation
- * Contrib/Language files/Greek.nlf: fixes
+2003-03-14 10:27 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Docs/src/callback.but: no escape in \c
- * Contrib/Modern UI/Language files/Hungarian.nsh, Contrib/Modern
- UI/Language files/Greek.nsh: header text for aborted installer
+2003-03-14 10:15 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Examples/example1.nsi: comment
- * Menu/images/version.gif: beta 4
+2003-03-14 09:23 joostverburg
-2003-04-04 flizebogen
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: corrected
+ typo's in registry key
- * Docs/Chapter5.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/defines.but: Changed Conditional
- Compilation docs to default style
+2003-03-13 16:15 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh:
+ updated translation
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Bulgarian.nsh, Contrib/Modern UI/Language
- files/Croatian.nsh, Contrib/Modern UI/Language files/Czech.nsh,
- Contrib/Modern UI/Language files/Danish.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Hungarian.nsh, Contrib/Modern
- UI/Language files/Italian.nsh, Contrib/Modern UI/Language
- files/Japanese.nsh, Contrib/Modern UI/Language files/Korean.nsh,
- Contrib/Modern UI/Language files/Macedonian.nsh, Contrib/Modern
- UI/Language files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language files/Slovak.nsh,
- Contrib/Modern UI/Language files/Spanish.nsh, Contrib/Modern
- UI/Language files/Thai.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Turkish.nsh, Contrib/Modern UI/Language files/Ukrainian.nsh:
- renamed string names
+2003-03-12 21:42 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: updated documentation
- * Contrib/Language files/Romanian.nlf: LicenseForceSelection
- support
+2003-03-12 18:59 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Include/Sections.nsh: removed HWND_BROADCAST
- * Contrib/Modern UI/Language files/Romanian.nsh:
- LicenseForceSelection support - renamed string names
+2003-03-12 15:20 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: UpgradeDLL - Set overwrite
+ to ON after inserting
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh: header text for aborted installer -
- renamed string names
+2003-03-12 12:55 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi: ReserveFile
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: header text for aborted installer
+2003-03-12 12:45 joostverburg
-2003-04-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: updated
+ translation
- * makensis.exe: latest stuff
+2003-03-11 21:35 joostverburg
-2003-04-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: removed custom
+ page caption
- * Docs/src/bin/halibut/biblio.c, Docs/src/bin/halibut/bk_xhtml.c,
- Docs/src/bin/halibut/contents.c, Docs/src/bin/halibut/error.c,
- Docs/src/bin/halibut/halibut.h, Docs/src/bin/halibut/help.c,
- Docs/src/bin/halibut/index.c, Docs/src/bin/halibut/input.c,
- Docs/src/bin/halibut/keywords.c, Docs/src/bin/halibut/licence.c,
- Docs/src/bin/halibut/main.c, Docs/src/bin/halibut/malloc.c,
- Docs/src/bin/halibut/misc.c, Docs/src/bin/halibut/tree234.c,
- Docs/src/bin/halibut/tree234.h, Docs/src/bin/halibut/ustring.c:
- Hopefully readable now: indent -nut -kr -bl -bli0 -i2 *
+2003-03-11 20:44 joostverburg
-2003-04-04 kichik
+ * /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/example1.nsi,
+ /NSIS/trunk/Examples/example2.nsi, /NSIS/trunk/Examples/gfx.nsi,
+ /NSIS/trunk/Examples/languages.nsi,
+ /NSIS/trunk/Examples/primes.nsi,
+ /NSIS/trunk/Examples/viewhtml.nsi,
+ /NSIS/trunk/Examples/waplugin.nsi: updated format, small changes
- * Source/exehead/Ui.c: - Leave function of instfiles will be called
- if installation aborted too so the MUI will be able to set the
- title - Cancel button now set default if installation canceled
+2003-03-11 19:26 joostverburg
-2003-04-04 kichik
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/tutorial.but: updated docs, tutorial,
+ changelog
- * makensis.exe, Source/script.cpp: Missed a return, IfErrors works
- again
+2003-03-11 18:15 flizebogen
-2003-04-04 joostverburg
+ * /NSIS/trunk/Docs/src/tutorial.but: fixed typos in tutorial,
+ forgot to add 2 files
- * Docs/Chapter4.html, Docs/src/plugin.but: typo
+2003-03-11 16:35 kichik
-2003-04-04 joostverburg
+ * /NSIS/trunk/Docs/src/stack.but: A bit informative I hope... More
+ information about Exch and order of items in the stack
- * Contrib/Language files/Polish.nlf, Contrib/Modern UI/Language
- files/Polish.nsh: LicenseForceSelection support
+2003-03-11 15:23 joostverburg
-2003-04-03 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: copyright years
- * Contrib/Language files/Spanish.nlf, Contrib/Modern UI/Language
- files/Spanish.nsh: fixes
+2003-03-11 13:29 joostverburg
-2003-04-03 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: comments
- * Contrib/Modern UI/Readme.html: typo
+2003-03-11 12:54 joostverburg
-2003-04-03 kichik
+ * /NSIS/trunk/Menu/docs.html: removed spaces
- * Docs/Chapter2.html, Docs/Chapter5.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/compiler.but: S1 not
- S2 for !addincludedir
+2003-03-11 12:43 joostverburg
-2003-04-03 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe: 2 lines for description
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: Added EXTENDEDSELCT flag for
- list boxes which replaces MULTISELECT that now acts exactly as the
- real style flag ([double] click turns on or off selection)
+2003-03-11 11:25 joostverburg
-2003-04-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh:
+ Compatible with Modern UI 1.63
- * Contrib/UserInfo/UserInfo.c: Will always return Admin on 9x
- systems with advapi32.dll that contains functions it shouldn't (all
- of them?)
+2003-03-10 22:16 joostverburg
-2003-04-02 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Screenshot.png,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot2.png: new screenshots
- * Source/build.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/fileform.h, makensis.exe:
- Added IfAbort
+2003-03-10 22:04 joostverburg
-2003-04-02 kichik
+ * /NSIS/trunk/Contrib/Icons/modern-header 2.bmp: new header bitmap
- * TODO.txt: IO improvement
+2003-03-10 21:29 joostverburg
-2003-04-02 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: 'MS Shell Dlg' font for
+ header title and language selection dialog
- * Contrib/NSISdl/nsisdl.cpp: NSISdl will now take the font from the
- NSIS installer
+2003-03-10 21:20 flizebogen
-2003-04-02 joostverburg
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/credits.but:
+ Tutorial - initial Version
- * Contrib/LangDLL/resource.rc: compiles without Platform SDK
+2003-03-10 21:17 joostverburg
-2003-04-02 kichik
+ * /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe: 2 lines for
+ description
- * Source/build.cpp, makensis.exe, Source/build.h: InitPluginsDir
- fixes
+2003-03-10 21:13 kichik
-2003-04-02 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Contrib/LangDLL/resource.rc,
+ /NSIS/trunk/Plugins/LangDLL.dll: LangDLL defaults to MS Shell Dlg
- * Contrib/Language files/Slovak.nlf, Contrib/Modern UI/Language
- files/Slovak.nsh: LicenseForceSelection support
+2003-03-10 19:20 joostverburg
-2003-04-01 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: 3 lines title on
+ Welcome page
- * makensis.exe: Reboot command: delete pluginsdir - workaround for
- GetTempFileName API bug
+2003-03-10 18:48 joostverburg
-2003-04-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/License.txt: 2003
- * Source/build.cpp, Source/script.cpp, Source/exehead/Ui.c,
- Source/exehead/exec.c: - GetTempFile will now try 100 times before
- failing - InitPluginsDir will give an error if unable to initialize
+2003-03-10 15:42 joostverburg
-2003-04-01 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: defines
- * Contrib/Modern UI/Language files/Italian.nsh:
- LicenseForceSelection support
+2003-03-09 22:38 joostverburg
-2003-04-01 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: new langdll
+ macro / registry system, startmenu registry system, write instdir
+ to registry
- * Contrib/Modern UI/System.nsh: finish header inserted when
- MUI_FINISHPAGE_NOAUTOCLOSE is defined - removed double bcheck
+2003-03-09 22:10 joostverburg
-2003-03-31 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: moved defines to
+ configuration
- * Docs/Chapter5.html, Docs/src/defines.but: macro's can contain
- !ifdef etc.
+2003-03-09 21:24 kichik
-2003-03-30 flizebogen
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Forgot one pop
- * Docs/Chapter4.html, Docs/src/sections.but: Changed section syntax
- again (added req flag)
+2003-03-09 20:23 joostverburg
-2003-03-30 flizebogen
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: defines for custom
+ extension UI's
- * Docs/Chapter4.html, Docs/src/sections.but: Section Syntax (! for
- bold sections)
+2003-03-09 20:17 kichik
-2003-03-30 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Examples/languages.nsi,
+ /NSIS/trunk/Plugins/LangDLL.dll: LangDLL now accepts A too. A for
+ auto count, it looks for the first empty string ("") pushed.
- * Source/exehead/Ui.c, makensis.exe, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/util.c: IfErrors clears
- the error flag again
+2003-03-09 20:05 joostverburg
-2003-03-30 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: Modern UI 1.63 -
+ Removed page description in window title
- * Docs/Chapter4.html, Docs/src/ui.but: typo
+2003-03-09 19:49 kichik
-2003-03-30 joostverburg
+ * /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c: BGGradient & minize solution
- * Docs/AppendixD.html, Docs/style.css, Docs/src/history.but:
- updated changelog, blue links
+2003-03-09 19:07 joostverburg
-2003-03-30 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new languages
- * Contrib/Modern UI/Language files/PortugueseBR.nsh: finish page
- accelerator keys
+2003-03-09 19:07 joostverburg
-2003-03-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: fixes
- * Contrib/Modern UI/Language files/English.nsh: finish page
- accelerator keys
+2003-03-09 19:00 joostverburg
-2003-03-29 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: new mui files
- * Contrib/Language files/German.nlf, Contrib/Language
- files/SimpChinese.nlf, Contrib/Language files/TradChinese.nlf,
- Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: LicenseForceSelection support
+2003-03-09 18:58 joostverburg
-2003-03-29 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern_topbmp.exe: that was an old one
- * TODO.txt: RMDir /REBOOTOK
+2003-03-09 18:55 joostverburg
-2003-03-29 flizebogen
+ * /NSIS/trunk/Contrib/Icons/modern-header.bmp,
+ /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern_headerbmpr.exe,
+ /NSIS/trunk/Contrib/UIs/modern_nodesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_smalldesc.exe,
+ /NSIS/trunk/Contrib/UIs/modern_topbmp.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modern3.exe,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/HeaderBitmap.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.63
- * Docs/AppendixD.html, Docs/Chapter2.html, Docs/Chapter4.html,
- Docs/style.css, Docs/src/attributes.but, Docs/src/basic.but,
- Docs/src/callback.but, Docs/src/history.but, Docs/src/jumps.but,
- Docs/src/labels.but, Docs/src/pages.but, Docs/src/sections.but,
- Docs/src/usection.but, Docs/src/var.but: Updated RMDIR command
- Syntax, added internal Referencies, rearanged order of some
- commands (by letter), new css file (no underlines for links)
+2003-03-09 00:33 joostverburg
-2003-03-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: forgot a $
- * Source/build.cpp, Source/script.cpp, Source/exehead/Main.c,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/util.c: Back to 33.5/34
+2003-03-08 20:13 kichik
-2003-03-29 kichik
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h:
+ Bah... m_funcsCount = 0... Thanks Ippi
- * makensis.exe, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.c: Buttons from
- focused license text fixed (return will not work if next button not
- enabled and escape will work as cancel)
+2003-03-07 22:07 kichik
-2003-03-29 kichik
+ * /NSIS/trunk/TODO.txt: leave callback for custom pages
- * Source/exehead/exec.c, Source/exehead/util.c, Source/script.cpp,
- Source/tokens.cpp: RMDir /REBOOTOK
+2003-03-07 21:10 kichik
-2003-03-29 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Added SectionSetInstTypes and
+ SectionGetInstTypes, about 70 bytes saved
- * Include/Sections.nsh: or not and
+2003-03-07 19:37 flizebogen
-2003-03-28 flizebogen
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/log.but, /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/uninstall.but: clearified optional and
+ required parameters at some commands with multiple [optional]
+ parameters
- * Docs/AppendixD.html, Docs/Chapter4.html, Docs/src/history.but,
- Docs/src/ui.but: Updated SetBKColor and Changelog
+2003-03-06 21:26 joostverburg
-2003-03-28 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: cancel button on finish
+ page with checkboxes
- * Source/exehead/exec.c, Source/exehead/util.c, Source/script.cpp,
- makensis.exe: Transparent controls. Use SetBkColor (hwnd)
- transparent
+2003-03-06 21:24 kichik
-2003-03-28 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Cancel button available on all
+ pages after the instfiles page but the last page unless
+ /ENABLECANCEL was used in its Page command
- * Docs/src/bin/halibut.exe, Docs/src/bin/halibut/biblio.c: Now
- shows line number for unresolved \R cross-references
+2003-03-06 20:06 joostverburg
-2003-03-28 joostverburg
+ * /NSIS/trunk/Menu/websites.html: link to bug tracker
- * Contrib/Modern UI/Readme.html: langdll text parameter
+2003-03-06 19:35 joostverburg
-2003-03-28 kichik
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Docs/src/credits.but: updated translation
- * Docs/Chapter2.html, Docs/Chapter4.html, Docs/src/attributes.but:
- No need for two LoadLangugeFile sections
+2003-03-06 17:47 joostverburg
-2003-03-27 flizebogen
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: custom pages before
+ finish page, io macro's with return value
- * Docs/Chapter2.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/attributes.but,
- Docs/src/functions.but, Docs/src/tutorial.but, Docs/src/ui.but,
- Docs/src/var.but: Updated Tutorial, typos and a few links
+2003-03-06 17:34 joostverburg
-2003-03-27 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Docs/src/credits.but: updated translation
- * Contrib/Language files/Greek.nlf, Contrib/Modern UI/Language
- files/Greek.nsh: LicenseForceSelection support
+2003-03-06 16:46 kichik
-2003-03-27 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Page and UninstPage should not be
+ used inside sesctions/functions
- * Contrib/Language files/Korean.nlf, Contrib/Language
- files/PortugueseBR.nlf, Contrib/Language files/Russian.nlf,
- Contrib/Modern UI/Language files/Korean.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh: LicenseForceSelection support
+2003-03-06 11:48 joostverburg
-2003-03-27 joostverburg
+ * /NSIS/trunk/TODO.txt: big license works
- * Contrib/Modern UI/Language files/Dutch.nsh: fixes
+2003-03-05 14:04 joostverburg
-2003-03-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: more welcome / finish
+ page info
- * Examples/waplugin.nsi: No license page
+2003-03-04 20:35 kichik
-2003-03-27 kichik
+ * /NSIS/trunk/Docs/src/ui.but: Shortened !include of
+ WinMessages.nsh
- * Contrib/System/Source/System.c, Contrib/System/Source/stdafx.h:
- Source code for latest fixes (brainsucker)
+2003-03-04 20:33 kichik
-2003-03-27 kichik
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ - Fixed more problems with !if[n]def/!else
+ - Saved another 10 bytes :)
- * Contrib/System/SysFunc.nsh, Contrib/System/System.nsi:
- (brainsucker) new system build. now work's at the kichik's computer
- too :)
+2003-03-04 20:29 kichik
-2003-03-27 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: No more limit on RTF size
- * Contrib/Modern UI/System.nsh: message text
+2003-03-04 20:25 kichik
-2003-03-27 joostverburg
+ * /NSIS/trunk/Examples/waplugin.nsi: NSISdl calls update
- * Examples/makensis.nsi: updated for Modern UI 1.64
+2003-03-04 17:23 kichik
-2003-03-27 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: No need for force reboot,
+ "Therefore, you should only use this flag in an emergency."
- * Contrib/Language files/Spanish.nlf, Contrib/Modern UI/Language
- files/Spanish.nsh: better translation
+2003-03-04 17:22 kichik
-2003-03-26 joostverburg
+ * /NSIS/trunk/TODO.txt: More
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: no finish header macro's anymore - language
- preference stored when installation has completed
+2003-03-04 16:31 kichik
-2003-03-26 joostverburg
+ * /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi: $CMDLINE may contain
+ quotes fix by brainsucker
- * Contrib/Language files/Hungarian.nlf, Contrib/Modern UI/Language
- files/Hungarian.nsh: LicenseForceSelection support
+2003-03-03 18:58 joostverburg
-2003-03-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: documentation updates
- * Source/exehead/Ui.c, makensis.exe: Bug with new force and license
- page not being first
+2003-03-03 18:52 joostverburg
-2003-03-26 joostverburg
+ * /NSIS/trunk/Menu/images/version.gif: beta 3 label
- * Contrib/Language files/French.nlf, Contrib/Modern UI/Language
- files/French.nsh: LicenseForceSelection support
+2003-03-03 18:14 joostverburg
-2003-03-26 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: beta 3 changelog
- * Contrib/Language files/Spanish.nlf, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Language files/German.nlf,
- Contrib/Modern UI/Language files/German.nsh: LicenseForceSelection
- support
+2003-03-03 15:29 joostverburg
-2003-03-26 flizebogen
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: ihrem >
+ Ihrem
- * Docs/Chapter4.html, Docs/src/attributes.but: Update on
- LicenseForceSelection
+2003-03-03 13:51 kichik
-2003-03-26 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp: -
+ b3 version numbers
+ - last page before instfiles define now works as really planned.
+ it will only be defined if really the last one before instfiles.
- * Contrib/Language files/Dutch.nlf, Contrib/Modern UI/Language
- files/Dutch.nsh: LicenseForceSelection support
+2003-03-02 19:51 joostverburg
-2003-03-26 kichik
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: right position
+ for page commands
- * Source/tokens.cpp: Better syntax
+2003-03-02 17:36 joostverburg
-2003-03-26 flizebogen
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: 1.62b
- * Docs/AppendixB.html, Docs/Chapter2.html, Docs/Chapter4.html,
- Docs/src/attributes.but: Added "LicenseForceSelection"
+2003-03-01 14:05 flizebogen
-2003-03-26 joostverburg
+ * /NSIS/trunk/Docs/src/generalpurpose.but: CreateDirectory can now
+ set errorflag
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/English.nsh, Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/HeaderBitmap.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/StartMenu.nsi, Examples/Modern UI/WelcomeFinish.nsi: Modern UI
- 1.64 - LicenseForceSelection support
+2003-03-01 12:44 kichik
-2003-03-26 kichik
+ * /NSIS/trunk/Source/script.cpp: EnumRegKey/Value output_var check
+ fixed
- * Source/lang.cpp, makensis.exe, Source/tokens.cpp: Old language
- files will work too...
+2003-02-27 22:20 joostverburg
-2003-03-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: startmenu: changed
+ define names, pre/leave custom functions, checkbox can be
+ disabled, documentation updates
- * Source/script.cpp, Source/tokens.cpp, makensis.exe: An option to
- change the text in the script
+2003-02-27 14:23 kichik
-2003-03-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: LogSet on should now work
- * Contrib/Language files/English.nlf, Contrib/Language
- files/Hebrew.nlf, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/lang.h, Source/script.cpp,
- Source/tokens.cpp, makensis.exe, Source/tokens.h,
- Source/exehead/Ui.c, Source/exehead/fileform.h,
- Source/exehead/lang.h, Source/exehead/resource.h: Added
- LicenseForceSelection radiobuttons|checkbox
+2003-02-27 13:56
-2003-03-26 joostverburg
+ * /NSIS/tags/v20b2, /NSIS/tags/v20b2/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20b2/Contrib/Icons/normal-install.ico,
+ /NSIS/tags/v20b2/Contrib/Icons/normal-uninstall.ico,
+ /NSIS/tags/v20b2/Contrib/Icons/setup.ico,
+ /NSIS/tags/v20b2/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20b2/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/tags/v20b2/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20b2/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20b2/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/tags/v20b2/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20b2/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20b2/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20b2/Contrib/NSISdl/httpget.cpp,
+ /NSIS/tags/v20b2/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20b2/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20b2/Contrib/NSISdl/resource.h,
+ /NSIS/tags/v20b2/Contrib/NSISdl/Script1.rc,
+ /NSIS/tags/v20b2/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20b2/Contrib/zip2exe,
+ /NSIS/tags/v20b2/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20b2/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20b2/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20b2/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20b2/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20b2/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20b2/Examples/primes.nsi,
+ /NSIS/tags/v20b2/Examples/rtest.nsi,
+ /NSIS/tags/v20b2/Source/afxres.h,
+ /NSIS/tags/v20b2/Source/exedata.cpp,
+ /NSIS/tags/v20b2/Source/exedata.h,
+ /NSIS/tags/v20b2/Source/exehead/afxres.h,
+ /NSIS/tags/v20b2/Source/exehead/bin2h.c,
+ /NSIS/tags/v20b2/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20b2/Source/exehead/Makefile,
+ /NSIS/tags/v20b2/Source/exehead/uninst.ico,
+ /NSIS/tags/v20b2/Source/Makefile,
+ /NSIS/tags/v20b2/Source/makenssi.dsw,
+ /NSIS/tags/v20b2/Source/zlib/DEFLATE.H,
+ /NSIS/tags/v20b2/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20b2'.
- * TODO.txt: update
+2003-02-27 13:56 joostverburg
-2003-03-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: custom function name:
+ MUI_CUSTOMFUNCTION_START > MUI_CUSTOMFUNCTION_STARTMENU
- * Contrib/InstallOptions/InstallerOptions.cpp: Icon with path works
- again
+2003-02-26 15:31 kichik
-2003-03-26 joostverburg
+ * /NSIS/trunk/TODO.txt: b3 todo, and one thing done
- * Contrib/Modern UI/Language files/English.nsh: typo
+2003-02-26 15:30 kichik
-2003-03-25 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: - b2 version number
+ - website URL fixed
- * Contrib/Modern UI/Readme.html: ioSpecial
+2003-02-26 15:28 kichik
-2003-03-25 kichik
+ * /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp: -
+ b2 version number
+ - bug with commands starting with ! and ending with \ in if
+ blocks fixed
- * Docs/src/usefulfunc.but: Indentation
+2003-02-26 15:27 kichik
-2003-03-24 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c: Optimizations
- * Source/build.cpp: Disable last cancel button only if instfiles
- used
+2003-02-26 15:24 kichik
-2003-03-24 kichik
+ * /NSIS/trunk/Contrib/Icons/new_nsis.ico: New icon with 16x16
+ version too
- * Source/build.cpp: Leave function not show function in error
+2003-02-26 14:52 kichik
-2003-03-23 kichik
+ * /NSIS/trunk/TODO.txt: Weird bug
- * TODO.txt: more to do
+2003-02-26 10:44 kichik
-2003-03-23 kichik
+ * /NSIS/trunk/TODO.txt: RMDir /REBOOTOK
- * Contrib/InstallOptions/InstallerOptions.cpp: Now frees the memory
- of loaded bitmaps when exiting
+2003-02-23 19:26 joostverburg
-2003-03-22 kichik
+ * /NSIS/trunk/Menu/images/btn-compiler.gif,
+ /NSIS/trunk/Menu/images/btn-docs.gif,
+ /NSIS/trunk/Menu/images/btn-update.gif,
+ /NSIS/trunk/Menu/images/btn-websites.gif,
+ /NSIS/trunk/Menu/images/btn-welcome.gif: button design
- * Contrib/System/System.nsh, Contrib/System/System.nsi: Updates
+2003-02-22 10:59 kichik
-2003-03-22 kichik
+ * /NSIS/trunk/Contrib/Language files/Turkish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Turkish.nsh,
+ /NSIS/trunk/Docs/src/credits.but, /NSIS/trunk/Examples/Modern
+ UI/MultiLanguage.nsi: Turkish
- * Source/script.cpp: Missing parameter, thanks willowufgood
+2003-02-21 22:22 kichik
-2003-03-22 joostverburg
+ * /NSIS/trunk/Menu/index.html: Compiler link in welcome page
- * Contrib/System/SysFunc.nsh, Contrib/System/System.nsh,
- Contrib/System/Source/System.c, Contrib/System/Source/System.h,
- Contrib/System/Source/System.vcproj,
- Contrib/System/Source/chkstk.obj: Updated System plugin - Win9x
- fixes and more
+2003-02-21 22:20 kichik
-2003-03-21 joostverburg
+ * /NSIS/trunk/Examples/example2.nsi: Wrong shortcut
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: typo
+2003-02-21 21:38 joostverburg
-2003-03-21 kichik
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: directory probs
+ solved
- * Docs/AppendixB.html, Docs/Chapter4.html, Docs/src/usefulfunc.but:
- Fixed TrimNewLines (thanks pengyou)
+2003-02-21 19:29 joostverburg
-2003-03-20 kichik
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: nsis update
+ closes nsis menu
- * Contrib/InstallOptions/InstallerOptions.cpp, Contrib/Modern
- UI/System.nsh, Docs/Chapter4.html, Docs/src/callback.but,
- Docs/src/pages.but, Docs/src/ui.but, Source/build.cpp,
- Source/script.cpp, Source/tokens.cpp, Source/tokens.h,
- Source/exehead/Ui.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.h, TODO.txt,
- makensis.exe: SetStaticBkColor -> SetBkColor, now works for
- dialogs, buttons, edit boxes and list boxes (only in IO)
+2003-02-21 19:27 joostverburg
-2003-03-20 flizebogen
+ * /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/index.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: # for menu link to current page
- * Docs/AppendixC.html, Docs/AppendixD.html, TODO.txt,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/history.but, Docs/src/usefulinfos.but: Added Info "Dump
- Content of Log Window to File", fixed Typos
+2003-02-21 15:57 joostverburg
-2003-03-20 kichik
+ * /NSIS/trunk/Docs/src/history.but: beta 2 changelog
- * makensis.exe, Source/build.cpp: Random flags for uninstaller
- fixed
+2003-02-21 15:29 joostverburg
-2003-03-20 kichik
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: install cvs data when
+ compiling makensis.nsi, removed makensisw jnetlib
- * Contrib/System/SysFunc.nsh: GetFullPathName -> SearchPath
+2003-02-20 21:14 kichik
-2003-03-20 kichik
+ * /NSIS/trunk/Contrib/Makensisw/shell.ico: Modern icon for scripts
- * !InstallNSIS.bat, makensis.exe, Examples/makensis.nsi,
- Source/makenssi.cpp, Source/script.cpp: b4 (CVS) label
+2003-02-20 21:04 kichik
-2003-03-19 joostverburg
+ * /NSIS/trunk/TODO.txt: Old stuff removed
- * Contrib/Modern UI/Language files/Bulgarian.nsh: fixed Welcome
- page string names
+2003-02-20 20:31 kichik
-2003-03-19 joostverburg
+ * /NSIS/trunk/TODO.txt: Halibut links
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: updated
- GetWindowsVersion
+2003-02-20 19:33 kichik
-2003-03-19 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Examples/makensis.nsi: No need for JNetLib
- * Contrib/Language files/Korean.nlf: updated translation
+2003-02-20 19:30 kichik
-2003-03-18 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: - Update moved to NSIS
+ Update
+ - New icon, different from NSIS Menu's
- * Source/script.cpp: HEX number for text color in BGGradient
+2003-02-20 19:29 kichik
-2003-03-18 kichik
+ * /NSIS/trunk/Contrib/Makensisw/jnetlib: Update moved to NSIS
+ update
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/sdbarker_tiny.exe, Docs/Chapter4.html,
- Docs/src/attributes.but, Source/build.cpp, Source/lang.cpp,
- Source/script.cpp, Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/resource.h, Source/exehead/resource.rc,
- Source/exehead/state.h, Source/exehead/util.c, TODO.txt,
- makensis.exe: Some space saving changes, /NOCUSTOM and
- /COMPONENTSONLYONCUSTOM work together and infastructures for future
- changes
+2003-02-20 19:09 joostverburg
-2003-03-18 rainwater
+ * /NSIS/trunk/Contrib/Dialer/dialer.dsp,
+ /NSIS/trunk/Plugins/Dialer.dll: dynamically load
- * Contrib/NSISdl/nsisdl.cpp: Downloading text in nsisdl page cut
- off first char of path name if it wasn't a full path.
+2003-02-20 18:47 kichik
-2003-03-18 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: CreateDireectory now sets the
+ error flag only when really needed instead of almost always
- * Contrib/Modern UI/System.nsh, Contrib/StartMenu/Example.nsi,
- Docs/Chapter4.html, Docs/src/pages.but: Custom leave function
- updates
+2003-02-20 18:43 joostverburg
-2003-03-18 kichik
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: temp file in temp
+ dir
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/test.nsi, Contrib/StartMenu/StartMenu.c,
- Docs/Chapter4.html, Docs/src/pages.but, Source/build.cpp,
- Source/script.cpp, Source/tokens.cpp, Source/exehead/Ui.c,
- makensis.exe: Leave function for custom pages too
+2003-02-20 17:33 kichik
-2003-03-18 kichik
+ * /NSIS/trunk/Contrib/Dialer/dialer.c: Removed old stuff
- * Docs/Chapter4.html, Docs/src/attributes.but, Docs/src/ui.but,
- Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/script.cpp, Source/tokens.cpp: AddBrandingImage doesn't
- depend on the UI now. Can now set the branding image on the bottom
- and on the right too, and set a custom padding value
+2003-02-20 09:57 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: cvsdata.nsi
- * Contrib/InstallOptions/Readme.html: another small html fix
+2003-02-20 09:49 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: descriptions, titles, NSISdl
+ license, mui graphics
- * Contrib/InstallOptions/Readme.html, Contrib/Modern
- UI/Readme.html: html errors
+2003-02-19 22:36 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: overwrite, description
- * Contrib/Modern UI/Readme.html: syntax format
+2003-02-19 21:46 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Contrib/Dialer/Dialer.txt,
+ /NSIS/trunk/Contrib/NSISdl/License.txt,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: updated readme
- * Docs/Chapter4.html, Docs/src/pages.but, Source/tokens.cpp: Page
- command syntax
+2003-02-19 21:29 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Examples/cvsdata.nsi,
+ /NSIS/trunk/Examples/makensis.nsi: Dialer plugin
- * Contrib/Modern UI/Readme.html: define syntax, fixes
+2003-02-19 21:24 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Contrib/Dialer/dialer.c: linked to ExDLL
- * Contrib/Dialer/Dialer.txt, Docs/AppendixB.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/usefulfunc.but, Examples/waplugin.nsi: ConnectInternet
- function
+2003-02-19 21:12 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: automatically
+ connect to the internet
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/HeaderBitmap.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/StartMenu.nsi, Examples/Modern UI/WelcomeFinish.nsi: new setup
- name: Modern UI Test
+2003-02-19 21:09 joostverburg
-2003-03-18 joostverburg
+ * /NSIS/trunk/Contrib/Dialer, /NSIS/trunk/Contrib/Dialer/dialer.c,
+ /NSIS/trunk/Contrib/Dialer/dialer.dsp,
+ /NSIS/trunk/Contrib/Dialer/dialer.dsw,
+ /NSIS/trunk/Contrib/Dialer/Dialer.txt,
+ /NSIS/trunk/Plugins/Dialer.dll: Dialer plugin
- * Contrib/Modern UI/System.nsh: removed 1.61 language file
- compatibility
+2003-02-19 20:36 kichik
-2003-03-18 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/util.c: MBCS support for
+ validate_filename and error flag for CreateDirectory/SetOutPath
- * Contrib/Modern UI/Language files/Korean.nsh: compatible with
- Modern UI 1.63
+2003-02-19 20:03 kichik
-2003-03-17 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Jumps fixes
- * Contrib/UIs/modern_nodesc.exe, Contrib/UIs/modern_smalldesc.exe:
- Windows 9x combo box size
+2003-02-19 15:05 joostverburg
-2003-03-17 joostverburg
+ * /NSIS/trunk/Menu/compiler.html, /NSIS/trunk/Menu/docs.html,
+ /NSIS/trunk/Menu/images/version.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/notinstalled.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: custom dpi / skin compatible
- * Examples/makensis.nsi: startmenu shortcuts
+2003-02-18 21:20 joostverburg
-2003-03-17 joostverburg
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi: better name for
+ the temp file
- * Menu/docs.html: tutorial
+2003-02-18 21:11 joostverburg
-2003-03-17 kichik
+ * /NSIS/trunk/Contrib/NSIS Update/NSISUpdate.nsi,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/GUI/io.ini: NSIS Update
+ can update itself
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: Escaping notes in the readme
- and a check for ConvertNewLines
+2003-02-18 20:20 joostverburg
-2003-03-17 kichik
+ * /NSIS/trunk/Contrib/NSIS Update, /NSIS/trunk/Contrib/NSIS
+ Update/NSISUpdate.nsi, /NSIS/trunk/Contrib/NSIS Update/Resources,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/BIN,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/BIN/bzip2.exe,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/GUI,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/GUI/io.ini,
+ /NSIS/trunk/Contrib/NSIS Update/Resources/GUI/NSISUpdate.exe,
+ /NSIS/trunk/Examples/cvsdata.nsi: NSIS Update source
- * Docs/AppendixD.html, Docs/Chapter4.html, Docs/src/history.but,
- Docs/src/registry.but, Source/script.cpp, Source/tokens.cpp,
- makensis.exe, Source/tokens.h: Added FlushINI
+2003-02-18 20:13 kichik
-2003-03-16 kichik
+ * /NSIS/trunk/Docs/src/credits.but: aka Techkid
- * Docs/AppendixC.html, Docs/AppendixD.html, Docs/Chapter1.html,
- Docs/Chapter2.html, Docs/Chapter4.html, Docs/src/attributes.but,
- Docs/src/basic.but, Docs/src/callback.but,
- Docs/src/flowcontrol.but, Docs/src/generalpurpose.but,
- Docs/src/history.but, Docs/src/intro.but, Docs/src/langs.but,
- Docs/src/misc.but, Docs/src/pages.but, Docs/src/plugin.but,
- Docs/src/sections.but, Docs/src/tutorial.but,
- Docs/src/usefulinfos.but, Docs/src/var.but,
- Docs/src/bin/halibut.exe, Docs/src/bin/halibut/bk_xhtml.c,
- Docs/src/bin/halibut/halibut.h, Docs/src/bin/halibut/input.c: Added
- \R{ref}{name} for named references
+2003-02-18 20:06 joostverburg
-2003-03-16 joostverburg
+ * /NSIS/trunk/Menu/images/header.gif: nicer text
- * Contrib/Modern UI/System.nsh: uninstaller: don't show page tile
- in titlebar
+2003-02-18 20:00 kichik
-2003-03-16 joostverburg
+ * /NSIS/trunk/Docs/src/credits.but: NSIS Update
- * Examples/makensis.nsi: delete old UI's
+2003-02-18 19:58 kichik
-2003-03-16 kichik
+ * /NSIS/trunk/Source/exehead/util.c: Path validation improvments.
+ Now works with VC7 too.
- * Docs/Chapter2.html, Docs/Chapter4.html, Docs/src/attributes.but,
- Docs/src/sec.but, Docs/src/sections.but, Docs/src/tutorial.but,
- Source/tokens.cpp: - Docs fixes - Command help for InstType fix
+2003-02-18 19:54 joostverburg
-2003-03-16 flizebogen
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ translation
- * Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/history.but, Docs/src/usefulfunc.but,
- Docs/src/usefulinfos.but: added "how to install vb6 runtimes and
- Call an external dll using system.dll
+2003-02-18 18:59 kichik
-2003-03-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: Added
+ colon for start menu dialog title (thanks bl4st3r)
- * Docs/style.css: fonts
+2003-02-18 18:32 joostverburg
-2003-03-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ translation
- * Contrib/InstallOptions/InstallerOptions.cpp: Warning icon for
- 'validation error' MessageBox
+2003-02-18 18:24 joostverburg
-2003-03-16 flizebogen
+ * /NSIS/trunk/Docs/src/credits.but: credits
- * Docs/AppendixC.html, Docs/AppendixD.html, Docs/AppendixE.html,
- Docs/Chapter1.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/AppendixF.html, Docs/index.html, Docs/src/build.bat,
- Docs/src/usefulinfos.but: Added infos about "Add uninstall
- information to Add/Remove Program" in a new appendix
+2003-02-17 21:49 joostverburg
-2003-03-15 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: added new files to uninstall
+ section
- * Contrib/Modern UI/System.nsh: echo Modern UI version
+2003-02-17 21:11 joostverburg
-2003-03-15 flizebogen
+ * /NSIS/trunk/Examples/cvsdata.nsi: entries.log, Source\exehead
- * Docs/Chapter2.html, Docs/Chapter4.html, Docs/src/sec.but,
- Docs/src/tutorial.but: added SectionSetInstTypes and
- SectionGetInstTypes, fixed typos in the tutorial
+2003-02-17 20:38 joostverburg
-2003-03-15 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: new files, improvements
- * Docs/Chapter2.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/attributes.but, Docs/src/compiler.but,
- Docs/src/tutorial.but: Tons of updates
+2003-02-17 20:14 joostverburg
-2003-03-15 kichik
+ * /NSIS/trunk/Examples/cvsdata.nsi: nsis update - check for new
+ releases, download cvs files
- * Source/tokens.cpp: - PluginDir -> !AddPluginDir - Fixed parms
- list of Section(Get/Set)InstTypes
+2003-02-17 19:58 joostverburg
-2003-03-15 kichik
+ * /NSIS/trunk/Menu, /NSIS/trunk/Menu/compiler.html,
+ /NSIS/trunk/Menu/docs.html, /NSIS/trunk/Menu/images,
+ /NSIS/trunk/Menu/images/btn-compiler.gif,
+ /NSIS/trunk/Menu/images/btn-docs.gif,
+ /NSIS/trunk/Menu/images/btn-update.gif,
+ /NSIS/trunk/Menu/images/btn-websites.gif,
+ /NSIS/trunk/Menu/images/btn-welcome.gif,
+ /NSIS/trunk/Menu/images/header.gif,
+ /NSIS/trunk/Menu/images/silver.gif,
+ /NSIS/trunk/Menu/images/version.gif, /NSIS/trunk/Menu/index.html,
+ /NSIS/trunk/Menu/notinstalled.html, /NSIS/trunk/Menu/update.html,
+ /NSIS/trunk/Menu/websites.html: nsis menu - launch nsis
+ information, utilities, websites
- * Source/tokens.cpp: inst_types not flags
+2003-02-17 18:57 kichik
-2003-03-15 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Sections.nsh too
- * Docs/AppendixC.html, Docs/src/history.but: History updates
+2003-02-16 21:49 kichik
-2003-03-15 kichik
+ * /NSIS/trunk/Examples/one-section.nsi: Added code for subsections
+ too
- * Contrib/BgImage/BgImage.cpp: now compatible with the minimize
- button
+2003-02-15 11:30 kichik
-2003-03-15 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Wrong SAM
- * makensis.exe, Source/script.cpp, Source/exehead/exec.c:
- WriteINIStr now works with an empty value ("")
+2003-02-15 11:07 kichik
-2003-03-15 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Minimal required security
+ clearance so we'll get by for sure
- * TODO.txt: Fonts
+2003-02-15 00:25 joostverburg
-2003-03-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: removed old guiinit
+ stuff
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: InstallOptions 2.1, always \r\n
- for newline
+2003-02-14 22:33 kichik
-2003-03-15 kichik
+ * /NSIS/trunk/Examples/one-section.nsi,
+ /NSIS/trunk/Include/Sections.nsh: New Sections.nsh
- * makensis.exe: Latest stuff
+2003-02-14 22:24 kichik
-2003-03-15 joostverburg
+ * /NSIS/trunk/Include/WinMessages.nsh: No need for
+ ${NSISDIR}\Include
- * Contrib/InstallOptions/test.nsi: only IO stuff
+2003-02-14 20:20 joostverburg
-2003-03-15 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Plugins/nsisdl.dll: Push instead of writing to $0
- * Contrib/InstallOptions/Readme.html: removed old recommended
- values
+2003-02-14 18:51 kichik
-2003-03-14 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: STATE should work again
- * Source/makenssi.cpp: bzip2 info in comments
+2003-02-14 17:44 kichik
-2003-03-14 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: Shift by one, we
+ have a group box now
- * Contrib/Language files/Polish.nlf: updated translation
+2003-02-14 13:07 kichik
-2003-03-14 joostverburg
+ * /NSIS/trunk/Docs/src/callback.but: Missing colon
- * Docs/Chapter4.html, Docs/src/callback.but: no escape in \c
+2003-02-14 10:19 kichik
-2003-03-14 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: initDialog should pop out
+ the INI location, not show
- * Examples/example1.nsi: comment
+2003-02-13 14:53 kichik
-2003-03-14 joostverburg
+ * /NSIS/trunk/Docs/src/langs.but: Clarified LangStringUP a bit more
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/HeaderBitmap.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/StartMenu.nsi, Examples/Modern UI/WelcomeFinish.nsi: corrected
- typo's in registry key
+2003-02-13 13:28 kichik
-2003-03-13 joostverburg
+ * /NSIS/trunk/Docs/src/var.but: A clearer sentence
- * Contrib/Language files/Romanian.nlf, Contrib/Modern UI/Language
- files/Romanian.nsh: updated translation
+2003-02-13 11:28 kichik
-2003-03-12 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Jump to skipNSHAssoc not
+ skipNSIAssoc
- * Contrib/Modern UI/Readme.html: updated documentation
+2003-02-12 18:04 flizebogen
-2003-03-12 joostverburg
+ * /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/usage.but, /NSIS/trunk/Docs/src/var.but:
+ changes to SetFileAttributes and {$QUICKLAUNCH}
- * Include/Sections.nsh: removed HWND_BROADCAST
+2003-02-11 17:58 kichik
-2003-03-12 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp: -
+ b2 (CVS) version
+ - NSIS Installer will no longer override .nsi and .nsh
+ association
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: UpgradeDLL - Set
- overwrite to ON after inserting
+2003-02-11 13:34 joostverburg
-2003-03-12 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: updated
+ translation
- * Examples/Modern UI/HeaderBitmap.nsi: ReserveFile
+2003-02-10 18:43
-2003-03-12 joostverburg
+ * /NSIS/tags/v20b1, /NSIS/tags/v20b1/Contrib/ExDLL/exdll.dsw,
+ /NSIS/tags/v20b1/Contrib/Icons/normal-install.ico,
+ /NSIS/tags/v20b1/Contrib/Icons/normal-uninstall.ico,
+ /NSIS/tags/v20b1/Contrib/Icons/setup.ico,
+ /NSIS/tags/v20b1/Contrib/InstallOptions/io.dsw,
+ /NSIS/tags/v20b1/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/tags/v20b1/Contrib/InstallOptions/resource.h,
+ /NSIS/tags/v20b1/Contrib/Makensisw/afxres.h,
+ /NSIS/tags/v20b1/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/tags/v20b1/Contrib/Makensisw/makensisw.xml,
+ /NSIS/tags/v20b1/Contrib/NSISdl/asyncdns.h,
+ /NSIS/tags/v20b1/Contrib/NSISdl/connection.h,
+ /NSIS/tags/v20b1/Contrib/NSISdl/httpget.cpp,
+ /NSIS/tags/v20b1/Contrib/NSISdl/httpget.h,
+ /NSIS/tags/v20b1/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/tags/v20b1/Contrib/NSISdl/resource.h,
+ /NSIS/tags/v20b1/Contrib/NSISdl/Script1.rc,
+ /NSIS/tags/v20b1/Contrib/Splash/splash.dsw,
+ /NSIS/tags/v20b1/Contrib/zip2exe,
+ /NSIS/tags/v20b1/Contrib/zip2exe/icon.ico,
+ /NSIS/tags/v20b1/Contrib/zip2exe/main.cpp,
+ /NSIS/tags/v20b1/Contrib/zip2exe/res.rc,
+ /NSIS/tags/v20b1/Contrib/zip2exe/resource.h,
+ /NSIS/tags/v20b1/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/tags/v20b1/Contrib/zip2exe/zip2exe.xml,
+ /NSIS/tags/v20b1/Examples/example2.nsi,
+ /NSIS/tags/v20b1/Examples/primes.nsi,
+ /NSIS/tags/v20b1/Examples/rtest.nsi,
+ /NSIS/tags/v20b1/Source/afxres.h,
+ /NSIS/tags/v20b1/Source/exedata.cpp,
+ /NSIS/tags/v20b1/Source/exedata.h,
+ /NSIS/tags/v20b1/Source/exehead/afxres.h,
+ /NSIS/tags/v20b1/Source/exehead/bin2h.c,
+ /NSIS/tags/v20b1/Source/exehead/bin2h.exe,
+ /NSIS/tags/v20b1/Source/exehead/Makefile,
+ /NSIS/tags/v20b1/Source/exehead/uninst.ico,
+ /NSIS/tags/v20b1/Source/Makefile,
+ /NSIS/tags/v20b1/Source/makenssi.dsw,
+ /NSIS/tags/v20b1/Source/zlib/DEFLATE.H,
+ /NSIS/tags/v20b1/Source/zlib/ZCONF.H: This commit was
+ manufactured by cvs2svn to create tag 'v20b1'.
- * Contrib/Modern UI/Language files/Spanish.nsh: updated translation
+2003-02-10 18:43 kichik
-2003-03-11 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c:
+ - Disabled file validation for ExecShell too (can exec URLs)
+ - Compiles without support for compression too
+ - Latest compiled version
- * Contrib/Modern UI/Readme.html, Examples/Modern
- UI/InstallOptions.nsi: removed custom page caption
+2003-02-10 18:38 kichik
-2003-03-11 joostverburg
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/jumps.but:
+ Little rearranging and new section above relative jumps
- * Examples/bigtest.nsi, Examples/example1.nsi,
- Examples/example2.nsi, Examples/gfx.nsi, Examples/languages.nsi,
- Examples/primes.nsi, Examples/viewhtml.nsi, Examples/waplugin.nsi:
- updated format, small changes
+2003-02-10 18:34 kichik
-2003-03-11 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: /NOUNLOAD must be
+ here
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/AppendixC.html,
- Docs/AppendixD.html, Docs/AppendixE.html, Docs/Chapter1.html,
- Docs/Chapter2.html, Docs/Chapter3.html, Docs/Chapter4.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/AppendixF.html, Docs/Chapter5.html, Docs/src/build.bat,
- Docs/src/functions.but, Docs/src/history.but,
- Docs/src/sections.but, Docs/src/tutorial.but: updated docs,
- tutorial, changelog
+2003-02-10 17:54 kichik
-2003-03-11 flizebogen
+ * /NSIS/trunk/TODO.txt: Goto + expanding instructions
- * Docs/AppendixB.html, Docs/Chapter3.html, Docs/AppendixF.html,
- Docs/src/tutorial.but: fixed typos in tutorial, forgot to add 2
- files
+2003-02-10 17:49 joostverburg
-2003-03-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Screenshot.png,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot2.png: 1.62 screenshots
- * Docs/src/stack.but: A bit informative I hope... More information
- about Exch and order of items in the stack
+2003-02-10 14:02 kichik
-2003-03-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh, /NSIS/trunk/TODO.txt:
+ RTL
- * Contrib/InstallOptions/Readme.html: copyright years
+2003-02-09 19:40 flizebogen
-2003-03-11 joostverburg
+ * /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/langs.but,
+ /NSIS/trunk/Docs/src/sections.but, /NSIS/trunk/Docs/src/var.but:
+ fixed little typos and updated variables section
- * Contrib/InstallOptions/InstallerOptions.cpp: comments
+2003-02-09 16:15 joostverburg
-2003-03-11 joostverburg
+ * /NSIS/trunk/Docs/src/config.but, /NSIS/trunk/TODO.txt: links
- * Menu/docs.html: removed spaces
+2003-02-09 16:02 joostverburg
-2003-03-11 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: welcome page text, contrib
+ desc
- * Contrib/UIs/modern.exe: 2 lines for description
+2003-02-09 15:56 joostverburg
-2003-03-11 joostverburg
+ * /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/license.but,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/makenssi.cpp:
+ 2003
- * Contrib/Modern UI/Language files/Bulgarian.nsh: Compatible with
- Modern UI 1.63
+2003-02-09 14:11 kichik
-2003-03-11 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/var.but: Some
+ fixes, typos, and additions
- * Contrib/Modern UI/Screenshot.png, Contrib/Modern
- UI/Screenshot2.png: new screenshots
+2003-02-09 13:22 kichik
-2003-03-10 joostverburg
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.nsi: Updated information
+ about errors
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: 'MS Shell Dlg' font for header title
- and language selection dialog
+2003-02-09 10:35 flizebogen
-2003-03-10 flizebogen
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/var.but:
+ basic addtions to the docs
- * Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- Docs/AppendixE.html, Docs/Chapter1.html, Docs/Chapter3.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/build.bat, Docs/src/credits.but: Tutorial - initial
- Version
+2003-02-09 04:35 kichik
-2003-03-10 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: A little type (thanks deguix)
- * Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmpr.exe: 2 lines for description
+2003-02-08 23:33 kichik
-2003-03-10 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Forgot MUI.nsh
- * Contrib/LangDLL/LangDLL.c, Contrib/LangDLL/resource.rc: LangDLL
- defaults to MS Shell Dlg
+2003-02-08 23:03 kichik
-2003-03-10 joostverburg
+ * /NSIS/trunk/TODO.txt: BgImage bug
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini: 3
- lines title on Welcome page
+2003-02-08 22:57 kichik
-2003-03-10 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp: -
+ b1 version numbers
+ - CreateShortcut works with URLs again, no file name validating
+ though
- * Contrib/Modern UI/License.txt: 2003
+2003-02-08 22:42 kichik
-2003-03-10 joostverburg
+ * /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/pages.but: -
+ Lots of small fixes
+ - b1 history complete
- * Contrib/Modern UI/System.nsh: defines
+2003-02-08 21:40 joostverburg
-2003-03-10 joostverburg
+ * /NSIS/trunk/Docs/src/credits.but: translators
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/HeaderBitmap.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: new langdll macro / registry system,
- startmenu registry system, write instdir to registry
+2003-02-08 20:49 sunjammerx
-2003-03-10 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.txt,
+ /NSIS/trunk/Plugins/BgImage.dll: Removed the annoying window
+ title bar
- * Examples/Modern UI/StartMenu.nsi: moved defines to configuration
+2003-02-08 16:24 kichik
-2003-03-09 kichik
+ * /NSIS/trunk/TODO.txt: IO LBS_MULTIPLESEL
- * Contrib/LangDLL/LangDLL.c: Forgot one pop
+2003-02-08 14:35 kichik
-2003-03-09 joostverburg
+ * /NSIS/trunk/TODO.txt: Done, done and done.
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- defines for custom extension UI's
+2003-02-08 14:30 kichik
-2003-03-09 kichik
+ * /NSIS/trunk/Source/exehead/util.c: $QUICKLAUNCH will now fall
+ back to current user too
- * Contrib/LangDLL/LangDLL.c, Examples/languages.nsi: LangDLL now
- accepts A too. A for auto count, it looks for the first empty
- string ("") pushed.
+2003-02-08 14:24 kichik
-2003-03-09 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Available space now shown even
+ if remote directory can't be found
+ (\\remote\drive\dir_that_doesnt_exist will now give the avaible
+ space)
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Croatian.nsh,
- Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/Language files/Danish.nsh, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh,
- Contrib/Modern UI/Language files/French.nsh, Contrib/Modern
- UI/Language files/German.nsh, Contrib/Modern UI/Language
- files/Greek.nsh, Contrib/Modern UI/Language files/Hungarian.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Japanese.nsh, Contrib/Modern UI/Language
- files/Macedonian.nsh, Contrib/Modern UI/Language files/Polish.nsh,
- Contrib/Modern UI/Language files/PortugueseBR.nsh, Contrib/Modern
- UI/Language files/Romanian.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language files/Slovak.nsh,
- Contrib/Modern UI/Language files/Spanish.nsh, Contrib/Modern
- UI/Language files/Thai.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Turkish.nsh, Contrib/Modern UI/Language files/Ukrainian.nsh:
- Modern UI 1.63 - Removed page description in window title
+2003-02-08 12:28 kichik
-2003-03-09 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: You ain't never seen this bug.
+ That '_' was never there!
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/bgbg.c, Source/exehead/fileform.c: BGGradient &
- minize solution
+2003-02-07 23:04 kichik
-2003-03-09 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/cbzip2.h, /NSIS/trunk/Source/compressor.h,
+ /NSIS/trunk/Source/czlib.h, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/TODO.txt: - Compressor type listed in summary
+ - SetOutPath now sets the current directory (RegDLL no longer
+ does)
+ - File names are now validated for commands that need normal
+ files, the directory selection dialog, and every variable that
+ contains a file/dir name
+ - Fixed a distortion of the MUI's branding text with ClearType
+ - $INSTDIR is now right in the custom page after the directory
+ selection dialog
+ - No more squares in the automatically appended directory name in
+ the directory selection dialog
+ - Size optimizations
- * Examples/Modern UI/MultiLanguage.nsi: new languages
+2003-02-07 21:17 kichik
-2003-03-09 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but: A little clarification on
+ InstProgressFlags & XPStyle
- * Contrib/Modern UI/Language files/Korean.nsh: fixes
+2003-02-07 20:13 joostverburg
-2003-03-09 joostverburg
+ * /NSIS/trunk/Docs/src/config.but: link to the archive
- * Examples/makensis.nsi: new mui files
+2003-02-07 19:27 joostverburg
-2003-03-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: MUI.nsh
- * Contrib/UIs/modern_topbmp.exe: that was an old one
+2003-02-07 17:47 joostverburg
-2003-03-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: io hwnd in
+ welcome/finish page function
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/makensis.nsi, Examples/Modern UI/HeaderBitmap.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/StartMenu.nsi,
- Examples/Modern UI/WelcomeFinish.nsi, Contrib/UIs/modern2.exe,
- Contrib/UIs/modern3.exe, Contrib/UIs/modern_headerbmp.exe,
- Contrib/UIs/modern_headerbmpr.exe, Contrib/UIs/modern_nodesc.exe,
- Contrib/UIs/modern_smalldesc.exe, Contrib/UIs/modern_topbmp.exe:
- Modern UI 1.63
+2003-02-07 17:45 joostverburg
-2003-03-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ translation
- * Contrib/Modern UI/System.nsh: forgot a $
+2003-02-07 14:15 kichik
-2003-03-08 kichik
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi,
+ /NSIS/trunk/Include/MUI.nsh: If we already have include
+ directories, why not use them?
- * Source/Plugins.cpp, Source/Plugins.h: Bah... m_funcsCount = 0...
- Thanks Ippi
+2003-02-07 12:48 kichik
-2003-03-08 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: No more random compression
+ ratios. Don't you just love Microsoft standards?
- * TODO.txt: leave callback for custom pages
+2003-02-07 12:17 kichik
-2003-03-07 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Added DONTSHOWSHORTCUTS define
+ to prevent popping the shortcuts window at the end of the
+ installation
- * Source/exehead/Ui.c, Source/exehead/exec.c, Source/exehead/ui.h,
- Source/script.cpp, Source/tokens.cpp, Source/tokens.h: Added
- SectionSetInstTypes and SectionGetInstTypes, about 70 bytes saved
+2003-02-07 11:58 kichik
-2003-03-07 flizebogen
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: No more STATE for labels,
+ useless and buggy with line breaks
- * Docs/Chapter3.html, Docs/src/attributes.but, Docs/src/log.but,
- Docs/src/pages.but, Docs/src/uninstall.but: clearified optional and
- required parameters at some commands with multiple [optional]
- parameters
+2003-02-07 10:50 joostverburg
-2003-03-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: typo, removed old
+ stuff, MUI_LANGDLL_PUSH
- * Contrib/Modern UI/System.nsh: cancel button on finish page with
- checkboxes
+2003-02-07 10:38 joostverburg
-2003-03-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: unterminated string
- * Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp, Source/exehead/Ui.c, Source/exehead/fileform.h,
- makensis.exe: Cancel button available on all pages after the
- instfiles page but the last page unless /ENABLECANCEL was used in
- its Page command
+2003-02-06 17:59 kichik
-2003-03-06 joostverburg
+ * /NSIS/trunk/Docs/src/generalpurpose.but: A little typo with
+ CallInstDLL
- * Menu/websites.html: link to bug tracker
+2003-02-06 13:07 kichik
-2003-03-06 joostverburg
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modern3.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: Smooth progress bar
+ problems fixed
- * Contrib/Language files/Korean.nlf, Docs/AppendixD.html,
- Docs/src/credits.but: updated translation
+2003-02-04 15:22 joostverburg
-2003-03-06 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh:
+ updated translation
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: custom pages before finish page, io
- macro's with return value
+2003-02-04 11:52 joostverburg
-2003-03-06 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: missing startmenu
+ defines
- * Contrib/Modern UI/Language files/Korean.nsh,
- Docs/src/credits.but: updated translation
+2003-02-02 21:07 joostverburg
-2003-03-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: abort function can call
+ custom function
- * Source/script.cpp: Page and UninstPage should not be used inside
- sesctions/functions
+2003-02-02 19:09 joostverburg
-2003-03-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: more welcome/finish
+ page functions
- * TODO.txt: big license works
+2003-02-02 18:03 joostverburg
-2003-03-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: startmenu fix
- * Contrib/Modern UI/Readme.html: more welcome / finish page info
+2003-02-02 17:49 joostverburg
-2003-03-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: modern ui functions can
+ call custom functions
- * Docs/Chapter3.html, Docs/src/ui.but: Shortened !include of
- WinMessages.nsh
+2003-02-02 16:49 kichik
-2003-03-04 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: .NET Framework detection
+ function added
- * Source/exehead/exec.c, makensis.exe, Source/script.cpp: - Fixed
- more problems with !if[n]def/!else - Saved another 10 bytes :)
+2003-02-02 15:30 joostverburg
-2003-03-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh: fix
- * Source/exehead/Ui.c: No more limit on RTF size
+2003-02-02 15:07 joostverburg
-2003-03-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: fix
- * Examples/waplugin.nsi: NSISdl calls update
+2003-02-02 15:01 joostverburg
-2003-03-04 kichik
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: updated
+ translation
- * Source/exehead/exec.c: No need for force reboot, "Therefore, you
- should only use this flag in an emergency."
+2003-01-30 18:52 rainwater
-2003-03-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: Russian
+ updates
- * TODO.txt: More
+2003-01-30 18:42 kichik
-2003-03-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/StartMenu/Example.nsi,
+ /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: No more problems for
+ directories with a name starting with "error"
- * Contrib/System/SysFunc.nsh, Contrib/System/System.nsi: $CMDLINE
- may contain quotes fix by brainsucker
+2003-01-30 00:59 rainwater
-2003-03-03 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: Danish
+ updates
- * Contrib/Modern UI/Readme.html: documentation updates
+2003-01-29 19:51 joostverburg
-2003-03-03 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: removed
+ old text
- * Menu/images/version.gif: beta 3 label
+2003-01-29 12:44 joostverburg
-2003-03-03 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: 1.62
- * Docs/AppendixC.html, Docs/src/history.but: beta 3 changelog
+2003-01-28 21:44 joostverburg
-2003-03-03 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
- * makensis.exe: latest stuff
+2003-01-28 17:55 kichik
-2003-03-03 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Line cut on finish page
+ fixed
- * Contrib/Modern UI/Language files/German.nsh: ihrem > Ihrem
+2003-01-28 16:48 kichik
-2003-03-03 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Transparent branding
+ text for the uninstaller too
- * !InstallNSIS.bat, Examples/makensis.nsi, Source/makenssi.cpp,
- Source/script.cpp: - b3 version numbers - last page before
- instfiles define now works as really planned. it will only be
- defined if really the last one before instfiles.
+2003-01-28 15:10 joostverburg
-2003-03-02 joostverburg
+ * /NSIS/trunk/TODO.txt: drive space color
- * Examples/Modern UI/InstallOptions.nsi: right position for page
- commands
+2003-01-28 15:07 joostverburg
-2003-03-02 joostverburg
+ * /NSIS/trunk/TODO.txt: update
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- 1.62b
+2003-01-28 14:28 kichik
-2003-03-01 flizebogen
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c: ClearType + transparent branding
+ text fix
- * Docs/Chapter3.html, Docs/src/generalpurpose.but: CreateDirectory
- can now set errorflag
+2003-01-28 14:02 kichik
-2003-03-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: No branding text in
+ welcome/finish page
- * Source/script.cpp: EnumRegKey/Value output_var check fixed
+2003-01-27 17:03 kichik
-2003-02-28 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: Installers can now contain
+ more than one branding image
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Examples/Modern UI/StartMenu.nsi: startmenu: changed define names,
- pre/leave custom functions, checkbox can be disabled, documentation
- updates
+2003-01-27 16:15 kichik
-2003-02-27 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Plugins/InstallOptions.dll: + New browse dialog style
+ (modern)
+ + Word wrapping for check boxes and radio buttons
+ + No ugly border for edit fields under XP
+ + Scroll bar for list boxes
+ + Only labels can have \r\n - fixed in docs
- * Source/exehead/exec.c: LogSet on should now work
+2003-01-27 15:44 kichik
-2003-02-27 joostverburg
+ * /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Contrib/Banner/Banner.dsp,
+ /NSIS/trunk/Contrib/Banner/Example.nsi,
+ /NSIS/trunk/Contrib/Banner/Readme.txt,
+ /NSIS/trunk/Plugins/Banner.dll: Banner now "works" with the MUI
+ too
- * Contrib/Modern UI/System.nsh: custom function name:
- MUI_CUSTOMFUNCTION_START > MUI_CUSTOMFUNCTION_STARTMENU
+2003-01-27 15:05 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modern3.exe,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ BrandingText now automatically resizes for all languages in the
+ MUI
- * makensis.exe: Latest stuff
+2003-01-25 08:43 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Setting the background
+ color for label controls in IO fixed
- * TODO.txt: b3 todo, and one thing done
+2003-01-24 19:40 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp: +
+ Leave function for pages
+ + Components page text always shown if Page components used
- * Examples/makensis.nsi: - b2 version number - website URL fixed
+2003-01-23 19:17 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: Typos
- * Source/makenssi.cpp, Source/script.cpp: - b2 version number - bug
- with commands starting with ! and ending with \ in if blocks fixed
+2003-01-21 20:37 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Fixed a bug with non ASCII
+ characters in InstallDir and auto completion of browse selection
+ (squares were added before non ASCII characters)
- * Source/exehead/Ui.c, Source/exehead/exec.c: Optimizations
+2003-01-21 19:37 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/TODO.txt: IO manual validation
- * TODO.txt: Weird bug
+2003-01-21 19:35 kichik
-2003-02-26 kichik
+ * /NSIS/trunk/Docs/src/langs.but: Braces difference and a little
+ typo
- * TODO.txt: RMDir /REBOOTOK
+2003-01-21 19:24 kichik
-2003-02-23 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Added NO_STARTMENUSHORTCUTS
+ define
- * Menu/images/btn-compiler.gif, Menu/images/btn-docs.gif,
- Menu/images/btn-update.gif, Menu/images/btn-websites.gif,
- Menu/images/btn-welcome.gif: button design
+2003-01-20 13:57 kichik
-2003-02-22 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Fixed bug #671161:
+ DISABLED dir and file request fields now disable the browse
+ button too.
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Language
- files/Turkish.nlf, Contrib/Modern UI/Language files/Turkish.nsh,
- Docs/AppendixD.html, Docs/src/credits.but: Turkish
+2003-01-20 13:02 kichik
-2003-02-22 kichik
+ * /NSIS/trunk/Docs/src/sections.but: SubSection defined index
+ (thanks VirtLink)
- * Menu/index.html: Compiler link in welcome page
+2003-01-19 16:56 kichik
-2003-02-22 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: ListBox and state now
+ play along
- * Examples/example2.nsi: Wrong shortcut
+2003-01-18 11:14 kichik
-2003-02-21 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: State information
+ for list boxes and their relatives
- * NSIS.exe: nsis update closes nsis menu
+2003-01-17 14:11 kichik
-2003-02-21 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed bug #660082 -
+ Focus problems in MakeNSISw, menu shortcuts didn't work when
+ focus was on the test button and it was disabled due to an error
+ in the script.
- * Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/update.html, Menu/websites.html: # for menu link to current
- page
+2003-01-16 22:31 joostverburg
-2003-02-21 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: accelerator keys
- * Docs/AppendixC.html, Docs/src/history.but: beta 2 changelog
+2003-01-16 12:23 joostverburg
-2003-02-21 joostverburg
+ * /NSIS/trunk/Examples/gfx.nsi: not the second page
- * Examples/cvsdata.nsi, Examples/makensis.nsi: install cvs data
- when compiling makensis.nsi, removed makensisw jnetlib
+2003-01-16 12:23 joostverburg
-2003-02-20 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: more languages
- * Contrib/Makensisw/shell.ico, makensisw.exe: Modern icon for
- scripts
+2003-01-16 12:16 joostverburg
-2003-02-20 kichik
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: updated
+ translation
- * TODO.txt: Old stuff removed
+2003-01-15 12:39 joostverburg
-2003-02-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: startmenu registry
- * TODO.txt: Halibut links
+2003-01-15 12:15 joostverburg
-2003-02-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Slovak.nsh:
+ updated/new translations
- * Contrib/Makensisw/makensisw.dsp, Examples/makensis.nsi: No need
- for JNetLib
+2003-01-14 14:24 kichik
-2003-02-20 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: Missing i
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- makensisw.exe: - Update moved to NSIS Update - New icon, different
- from NSIS Menu's
+2003-01-13 21:04 joostverburg
-2003-02-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: outdated
- * Contrib/Makensisw/jnetlib/asyncdns.cpp,
- Contrib/Makensisw/jnetlib/asyncdns.h,
- Contrib/Makensisw/jnetlib/connection.cpp,
- Contrib/Makensisw/jnetlib/connection.h,
- Contrib/Makensisw/jnetlib/httpget.cpp,
- Contrib/Makensisw/jnetlib/httpget.h,
- Contrib/Makensisw/jnetlib/netinc.h,
- Contrib/Makensisw/jnetlib/util.cpp,
- Contrib/Makensisw/jnetlib/util.h: Update moved to NSIS update
+2003-01-13 21:01 joostverburg
-2003-02-20 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: fixes - polish
+ temporary removed (very outdated)
- * Contrib/Dialer/dialer.dsp: dynamically load
+2003-01-11 21:31 kichik
-2003-02-20 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Use the new wizard bitmap
- * Source/exehead/exec.c, makensis.exe, Source/exehead/util.c,
- Source/exehead/util.h: CreateDireectory now sets the error flag
- only when really needed instead of almost always
+2003-01-11 21:29 kichik
-2003-02-20 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Delete the old brush if
+ setting the brush twice
- * Contrib/Dialer/dialer.c: Removed old stuff
+2003-01-11 20:24 kichik
-2003-02-20 joostverburg
+ * /NSIS/trunk/TODO.txt: CWD
- * Examples/makensis.nsi: cvsdata.nsi
+2003-01-11 19:23 kichik
-2003-02-20 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Fixed problems with
+ wsprintf limit of 1024 chars
- * Examples/makensis.nsi: descriptions, titles, NSISdl license, mui
- graphics
+2003-01-11 18:05 kichik
-2003-02-20 joostverburg
+ * /NSIS/trunk/Contrib/Icons/modern-wizard llama.bmp,
+ /NSIS/trunk/Contrib/Icons/modern-wizard nsis llama.bmp,
+ /NSIS/trunk/Contrib/Icons/modern-wizard nsis.bmp: New MUI wizard
+ pictures by VirtLink
- * Examples/makensis.nsi: overwrite, description
+2003-01-10 15:05 kichik
-2003-02-19 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/strlist.h: + IO
+ works with new SetStaticBkColor
+ + IO doesn't crash when a label has empty text
+ + LangStrings now really start as "" when not defined
- * Contrib/Dialer/Dialer.txt, Contrib/NSISdl/ReadMe.txt,
- Contrib/NSISdl/License.txt: updated readme
+2003-01-09 21:43 kichik
-2003-02-19 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp:
+ Don't create more than one brush per SetStaticBkColor - saved
+ about 50 bytes. Still problems with BrandingText width, working
+ on it
- * Examples/cvsdata.nsi, Examples/makensis.nsi: Dialer plugin
+2003-01-09 20:13 kichik
-2003-02-19 joostverburg
+ * /NSIS/trunk/Examples/one-section.nsi: Nicer word wrapping
- * Contrib/Dialer/dialer.c: linked to ExDLL
+2003-01-09 20:09 kichik
-2003-02-19 joostverburg
+ * /NSIS/trunk/Examples/one-section.nsi: Some blurb
- * Contrib/Dialer/Dialer.txt, Contrib/Dialer/dialer.c,
- Contrib/Dialer/dialer.dsp, Contrib/Dialer/dialer.dsw: Dialer plugin
+2003-01-09 16:49 joostverburg
-2003-02-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ language file updates & fixes
- * Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/util.c: MBCS support for validate_filename and error
- flag for CreateDirectory/SetOutPath
+2003-01-09 16:49 joostverburg
-2003-02-19 kichik
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: filename fixes
- * Examples/makensis.nsi: Jumps fixes
+2003-01-09 16:49 joostverburg
-2003-02-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: removed 1.4 language
+ file compatibility
- * Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/notinstalled.html, Menu/update.html, Menu/websites.html,
- Menu/images/version.gif, NSIS.exe: custom dpi / skin compatible
+2003-01-09 14:33 kichik
-2003-02-18 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: 4096 chars in Text field,
+ that should be enough
- * .cvsignore: ignore cvs data setup, nsis update temp file, cvs
- client files
+2003-01-09 13:00 kichik
-2003-02-18 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Corrected GetWindowsVersion
+ function
- * .cvsignore: ignore cvs data setup, nsis update temp file, cvs
- client files
+2003-01-09 12:49 kichik
-2003-02-18 joostverburg
+ * /NSIS/trunk/Docs/src/langs.but, /NSIS/trunk/Docs/src/var.but:
+ LangStrings update and other stuff that didn't get uploaded
- * .cvsignore: Updated by TortoiseCVS
+2003-01-08 20:06 kichik
-2003-02-18 joostverburg
+ * /NSIS/trunk/Source/exehead/Main.c: Delete the space that comes
+ before _?= in the uninstaller $CMDLINE
- * Examples/cvsdata.nsi: NSIS Update source
+2003-01-08 19:19 joostverburg
-2003-02-18 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ updated
- * Docs/AppendixD.html, Docs/src/credits.but: aka Techkid
+2003-01-08 15:24 joostverburg
-2003-02-18 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: extract_as macro
- * Menu/images/header.gif: nicer text
+2003-01-08 15:06 joostverburg
-2003-02-18 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: renamed io extract
+ macro
- * Docs/AppendixD.html, Docs/src/credits.but: NSIS Update
+2003-01-06 16:21 joostverburg
-2003-02-18 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: updated
+ FileRequest/DirRequest size
- * makensis.exe, Source/exehead/util.c: Path validation improvments.
- Now works with VC7 too.
+2003-01-06 15:10 kichik
-2003-02-18 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: If writting into
+ ${TEMP} better read from there too...
- * Contrib/Modern UI/Language files/German.nsh: updated translation
+2003-01-06 12:58 joostverburg
-2003-02-18 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: dialog units
- * Contrib/Modern UI/Language files/Spanish.nsh: Added colon for
- start menu dialog title (thanks bl4st3r)
+2003-01-06 11:37 joostverburg
-2003-02-18 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Macedonian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Macedonian.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: macedonian
+ language files
- * Contrib/Modern UI/Language files/German.nsh: updated translation
+2003-01-05 17:47 kichik
-2003-02-18 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Already inited, no need to do it
+ again
- * Docs/AppendixD.html, Docs/src/credits.but: credits
+2003-01-05 15:05 sunjammerx
-2003-02-17 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp:
+ Inverted test of offset[3] for EW_DELREG meant that RegDeleteKey
+ and RegDeleteValue were being swapped.
- * Examples/makensis.nsi: added new files to uninstall section
+2003-01-04 16:25 joostverburg
-2003-02-17 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: fixes, format changes
- * makensis.exe: latest stuff
+2003-01-04 15:44 joostverburg
-2003-02-17 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
- * Examples/cvsdata.nsi: entries.log, Source\exehead
+2003-01-04 14:52 joostverburg
-2003-02-17 joostverburg
+ * /NSIS/trunk/TODO.txt: button selection bug fixed
- * Examples/makensis.nsi: new files, improvements
+2003-01-04 14:45 kichik
-2003-02-17 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: No more two buttons with thick
+ border
- * Examples/cvsdata.nsi: nsis update - check for new releases,
- download cvs files
+2003-01-04 14:05 joostverburg
-2003-02-17 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.ini: flag fixed
- * NSIS.exe, Menu/compiler.html, Menu/docs.html, Menu/index.html,
- Menu/notinstalled.html, Menu/update.html, Menu/websites.html,
- Menu/images/btn-compiler.gif, Menu/images/btn-docs.gif,
- Menu/images/btn-update.gif, Menu/images/btn-websites.gif,
- Menu/images/btn-welcome.gif, Menu/images/header.gif,
- Menu/images/silver.gif, Menu/images/version.gif: nsis menu - launch
- nsis information, utilities, websites
+2003-01-04 13:59 joostverburg
-2003-02-17 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/InstallOptions/test.ini: new flags
- * Examples/makensis.nsi: Sections.nsh too
+2003-01-04 13:09 joostverburg
-2003-02-16 kichik
+ * /NSIS/trunk/TODO.txt: todo for beta 1
- * Examples/one-section.nsi: Added code for subsections too
+2003-01-04 13:02 kichik
-2003-02-15 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: - No more group by
+ default
+ - Added NoTabStop flag
- * Source/exehead/exec.c: Wrong SAM
+2003-01-03 23:15 rainwater
-2003-02-15 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: Added DISABLED
+ flag to docs
- * Source/exehead/exec.c: Minimal required security clearance so
- we'll get by for sure
+2003-01-03 22:40 kichik
-2003-02-15 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Changed URL of the archive
- * Contrib/Modern UI/Readme.html: removed old guiinit stuff
+2003-01-03 22:34 kichik
-2003-02-15 kichik
+ * /NSIS/trunk/Plugins/InstallOptions.dll: DISABLED flag
- * Examples/one-section.nsi, Include/Sections.nsh: New Sections.nsh
+2003-01-03 22:33 kichik
-2003-02-15 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: Little
+ typo
- * Include/WinMessages.nsh: No need for ${NSISDIR}\Include
+2003-01-03 22:26 kichik
-2003-02-14 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: DISABLED
+ flag
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/nsisdl.cpp: Push
- instead of writing to $0
+2003-01-02 17:14 rainwater
-2003-02-14 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: nsExec didn't free allocated
+ memory
- * Contrib/InstallOptions/InstallerOptions.cpp: STATE should work
- again
+2003-01-02 13:08 joostverburg
-2003-02-14 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: typos
- * Contrib/InstallOptions/test.nsi: Shift by one, we have a group
- box now
+2002-12-30 15:33 kichik
-2003-02-14 kichik
+ * /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/resource.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Update !system, cleaned
+ resource.h, DeleteRegKey works on default value
- * Docs/Chapter3.html, Docs/src/callback.but: Missing colon
+2002-12-30 12:56 joostverburg
-2003-02-14 kichik
+ * /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc: removed nsis stuff
- * Contrib/InstallOptions/InstallerOptions.cpp: initDialog should
- pop out the INI location, not show
+2002-12-29 22:04 joostverburg
-2003-02-13 kichik
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh:
+ updated translation
- * Docs/Chapter3.html, Docs/src/langs.but: Clarified LangStringUP a
- bit more
+2002-12-29 21:41 joostverburg
-2003-02-13 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modern3.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: better grouping
- * Docs/Chapter3.html, Docs/src/var.but: A clearer sentence
+2002-12-29 20:30 joostverburg
-2003-02-13 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: group radio
+ buttons
- * Examples/makensis.nsi: Jump to skipNSHAssoc not skipNSIAssoc
+2002-12-29 20:16 kichik
-2003-02-12 flizebogen
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Group flag added for
+ radio buttons only
- * Docs/Chapter2.html, Docs/Chapter3.html,
- Docs/src/generalpurpose.but, Docs/src/usage.but, Docs/src/var.but:
- changes to SetFileAttributes and {$QUICKLAUNCH}
+2002-12-29 20:01 joostverburg
-2003-02-11 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/test.ini: nicer dialog
- * !InstallNSIS.bat, Examples/makensis.nsi, Source/exehead/exec.c,
- Source/makenssi.cpp, Source/script.cpp: - b2 (CVS) version - NSIS
- Installer will no longer override .nsi and .nsh association
+2002-12-29 20:01 joostverburg
-2003-02-11 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: groupbox / return
+ value info
- * Contrib/Language files/Italian.nlf: updated translation
+2002-12-29 19:46 kichik
-2003-02-10 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h, /NSIS/trunk/Source/util.cpp:
+ Last icon used counts, all others deleted
- * Source/build.cpp, Source/exehead/exec.c, makensis.exe: - Disabled
- file validation for ExecShell too (can exec URLs) - Compiles
- without support for compression too - Latest compiled version
+2002-12-29 19:33 joostverburg
-2003-02-10 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: UninstallIcon not used
+ when MUI_UNINSTALLER is not defined
- * Docs/Contents.html, Docs/IndexPage.html, Docs/index.html:
- Contents too
+2002-12-29 17:48 kichik
-2003-02-10 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modern3.exe: Second string in 111 now has
+ an id too (76)
- * Docs/Chapter3.html, Docs/src/build.bat, Docs/src/jumps.but:
- Little rearranging and new section above relative jumps
+2002-12-28 13:05 kichik
-2003-02-10 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: Fixed
+ bug #659359
- * Contrib/InstallOptions/Readme.html: /NOUNLOAD must be here
+2002-12-27 21:24 kichik
-2003-02-10 kichik
+ * /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/ui.but: SendMessage and Return got mixed up
- * TODO.txt: Goto + expanding instructions
+2002-12-27 16:31 kichik
-2003-02-10 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Source/exehead/exec.c: Fixed bug #659045
- * Contrib/Modern UI/Screenshot.png, Contrib/Modern
- UI/Screenshot2.png: 1.62 screenshots
+2002-12-27 15:20 kichik
-2003-02-10 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: nsh now has its own name
- * Contrib/Modern UI/Readme.html, TODO.txt, Contrib/Modern
- UI/System.nsh: RTL
+2002-12-27 11:54 kichik
-2003-02-09 flizebogen
+ * /NSIS/trunk/Source/ResourceEditor.cpp: Now works with EXEs that
+ have data tacked after the PE sections (like NSIS installation
+ data)
- * Docs/Chapter3.html, Docs/src/generalpurpose.but,
- Docs/src/langs.but, Docs/src/sections.but, Docs/src/var.but: fixed
- little typos and updated variables section
+2002-12-26 22:04 kichik
-2003-02-09 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Shortcuts can now have
+ comments/descriptions without icon index and start options (leave
+ blank - empty string - "")
- * Docs/Contents.html, TODO.txt, Docs/IndexPage.html,
- Docs/index.html, Docs/src/config.but: links
+2002-12-26 21:52 kichik
-2003-02-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: Fixes
- * Examples/makensis.nsi: welcome page text, contrib desc
+2002-12-26 16:21 kichik
-2003-02-09 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: Calling nsExec from an installer
+ that was executing using CreateProcess from another process now
+ doesn't give an error about an invalid handle
- * Docs/AppendixE.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/config.but, Docs/src/license.but,
- Source/makenssi.cpp, Source/exehead/Main.c, Source/exehead/Ui.c,
- license.txt: 2003
+2002-12-26 14:37 kichik
-2003-02-09 kichik
+ * /NSIS/trunk/Docs/src/defines.but: !ifndef and !endif docs
+ replaced
- * Docs/Chapter3.html, Docs/src/attributes.but, Docs/src/file.but,
- Docs/src/flowcontrol.but, Docs/src/generalpurpose.but,
- Docs/src/misc.but, Docs/src/var.but: Some fixes, typos, and
- additions
+2002-12-24 22:38 joostverburg
-2003-02-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: cleanup
- * Contrib/UserInfo/UserInfo.nsi: Updated information about errors
+2002-12-24 22:38 joostverburg
-2003-02-09 flizebogen
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: better format,
+ cleanup, right order of elements
- * Docs/Chapter3.html, Docs/src/attributes.but, Docs/src/file.but,
- Docs/src/flowcontrol.but, Docs/src/generalpurpose.but,
- Docs/src/misc.but, Docs/src/var.but: basic addtions to the docs
+2002-12-24 20:57 joostverburg
-2003-02-09 kichik
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
- * Docs/AppendixC.html, Docs/src/history.but: A little type (thanks
- deguix)
+2002-12-24 20:45 joostverburg
-2003-02-09 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: (kichik) MakeNSIS now sends
+ output directly to MakeNSISw, faster, and no
+ more problems with foreign languages in the output.
- * Examples/makensis.nsi: Forgot MUI.nsh
+2002-12-24 20:35 joostverburg
-2003-02-09 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h:
+ (kichik) MakeNSIS now sends output directly to MakeNSISw, faster,
+ and no
+ more problems with foreign languages in the output.
- * TODO.txt: BgImage bug
+2002-12-23 12:25 joostverburg
-2003-02-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh:
+ e-mail
- * Examples/makensis.nsi, makensis.exe, Source/makenssi.cpp,
- Source/script.cpp, Source/exehead/exec.c: - b1 version numbers -
- CreateShortcut works with URLs again, no file name validating
- though
+2002-12-22 20:53 kichik
-2003-02-09 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp: Tabs
- * Docs/AppendixD.html, Docs/Chapter1.html, Docs/Chapter3.html,
- Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/compiler.but, Docs/src/config.but,
- Docs/src/credits.but, Docs/src/history.but, Docs/src/intro.but,
- Docs/src/langs.but, Docs/src/pages.but: - Lots of small fixes - b1
- history complete
+2002-12-21 23:31 kichik
-2003-02-08 joostverburg
+ * /NSIS/trunk/Source/Plugins.cpp: idx not dataHandle
- * Docs/AppendixD.html, Docs/src/credits.but: translators
+2002-12-21 23:13 kichik
-2003-02-08 sunjammerx
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/script.cpp:
+ Unsigned/signed warnings
- * Contrib/BgImage/BgImage.cpp, Contrib/BgImage/BgImage.txt: Removed
- the annoying window title bar
+2002-12-21 23:04 kichik
-2003-02-08 kichik
+ * /NSIS/trunk/Source/script.cpp: Removed debug message
- * Docs/AppendixC.html, Docs/AppendixD.html: - Lots of small fixes -
- b1 history complete
+2002-12-21 16:16 joostverburg
-2003-02-08 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: removed debug stuff
- * TODO.txt: IO LBS_MULTIPLESEL
+2002-12-21 11:24 kichik
-2003-02-08 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/test.ini,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Added group box, and made
+ dir request not crash and use Text field
- * makensis.exe: Latest changes
+2002-12-21 09:14 kichik
-2003-02-08 kichik
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/script.cpp: Case insensitive plug-in function
+ names
- * TODO.txt: Done, done and done.
+2002-12-20 23:57 kichik
-2003-02-08 kichik
+ * /NSIS/trunk/TODO.txt: Include dirs done
- * Source/exehead/util.c: $QUICKLAUNCH will now fall back to current
- user too
+2002-12-20 23:23 kichik
-2003-02-08 kichik
+ * /NSIS/trunk/Source/lang.cpp: A warning if a LangString is not
+ present in all language tables
- * Source/exehead/Ui.c: Available space now shown even if remote
- directory can't be found (\\remote\drive\dir_that_doesnt_exist will
- now give the avaible space)
+2002-12-20 20:18 joostverburg
-2003-02-08 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: langstring changes
- * makensis.exe, Source/exehead/exec.c: You ain't never seen this
- bug. That '_' was never there!
+2002-12-20 19:14 kichik
-2003-02-08 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/lang.cpp: OK, LangStrings can now really be
+ defined after they are used
- * Source/build.cpp, Source/build.h, Source/cbzip2.h,
- Source/compressor.h, Source/czlib.h, Source/script.cpp,
- Source/exehead/Ui.c, TODO.txt, makensis.exe, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/fileform.h,
- Source/exehead/ui.h, Source/exehead/util.c, Source/exehead/util.h:
- - Compressor type listed in summary - SetOutPath now sets the
- current directory (RegDLL no longer does) - File names are now
- validated for commands that need normal files, the directory
- selection dialog, and every variable that contains a file/dir name
- - Fixed a distortion of the MUI's branding text with ClearType -
- $INSTDIR is now right in the custom page after the directory
- selection dialog - No more squares in the automatically appended
- directory name in the directory selection dialog - Size
- optimizations
+2002-12-20 15:26 joostverburg
-2003-02-07 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: typo
- * Docs/Chapter3.html, Docs/src/attributes.but: A little
- clarification on InstProgressFlags & XPStyle
+2002-12-20 15:12 kichik
-2003-02-07 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h:
+ LangStrings now act as functions, they don't need to be defined
+ before used. Uninstaller LangStrings must now be refernced with
+ un.
- * Docs/src/config.but: link to the archive
+2002-12-20 13:29 joostverburg
-2003-02-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ updated translations & version numbers
- * Docs/Contents.html, Docs/IndexPage.html, Docs/index.html: link to
- the archive
+2002-12-20 11:58 kichik
-2003-02-07 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Fixed bug item #656371
- * Contrib/Modern UI/Readme.html: MUI.nsh
+2002-12-20 11:12 kichik
-2003-02-07 joostverburg
+ * /NSIS/trunk/Docs/src/ui.but: SendMessage STR:
- * Contrib/Modern UI/Readme.html: io hwnd in welcome/finish page
- function
+2002-12-19 19:44 rainwater
-2003-02-07 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Added link the forum
+ in help menu
- * Contrib/Modern UI/Language files/German.nsh: updated translation
+2002-12-19 17:34 joostverburg
-2003-02-07 kichik
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: updated
+ translation
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi, Include/MUI.nsh: If we already have include
- directories, why not use them?
+2002-12-18 21:08 joostverburg
-2003-02-07 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: xhtml
- * Source/ResourceEditor.cpp: No more random compression ratios.
- Don't you just love Microsoft standards?
+2002-12-18 20:22 kichik
-2003-02-07 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Only RegDLL and UnRegDLL will
+ change the current directory so plug-ins will now work as before
- * Examples/makensis.nsi: Added DONTSHOWSHORTCUTS define to prevent
- popping the shortcuts window at the end of the installation
+2002-12-18 16:41 kichik
-2003-02-07 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Updating works with b1,
+ and MakeNSISw compiles without PSDK
- * Contrib/InstallOptions/InstallerOptions.cpp: No more STATE for
- labels, useless and buggy with line breaks
+2002-12-18 16:05 kichik
-2003-02-07 joostverburg
+ * /NSIS/trunk/Source/ResourceEditor.cpp: Fixed bug item #655607
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- typo, removed old stuff, MUI_LANGDLL_PUSH
+2002-12-18 13:44 joostverburg
-2003-02-07 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: updated
+ translation
- * Contrib/Modern UI/System.nsh: unterminated string
+2002-12-17 13:47 joostverburg
-2003-02-06 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: fix
- * Docs/Chapter3.html, Docs/src/generalpurpose.but: A little typo
- with CallInstDLL
+2002-12-17 13:47 joostverburg
-2003-02-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: updated
+ translation
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern2.exe, Contrib/UIs/modern3.exe,
- Contrib/UIs/sdbarker_tiny.exe: Smooth progress bar problems fixed
+2002-12-17 13:46 joostverburg
-2003-02-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: ui settings before
+ lang files, xhtml
- * Contrib/Language files/Japanese.nlf, Contrib/Modern UI/Language
- files/Japanese.nsh: updated translation
+2002-12-16 17:50 joostverburg
-2003-02-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: brandingtext trim fixed
- * Examples/Modern UI/StartMenu.nsi: missing startmenu defines
+2002-12-16 17:24 joostverburg
-2003-02-02 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: fixes
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- abort function can call custom function
+2002-12-16 16:53 kichik
-2003-02-02 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: Debug
+ compiles too
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh: more
- welcome/finish page functions
+2002-12-16 16:41 joostverburg
-2003-02-02 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Romanian
- * Contrib/Modern UI/System.nsh: startmenu fix
+2002-12-16 14:40 joostverburg
-2003-02-02 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: header
+ subtitle during installation too long
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: modern ui functions can call custom
- functions
+2002-12-16 14:14 joostverburg
-2003-02-02 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: color format
- * Docs/AppendixB.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/usefulfunc.but: .NET Framework detection
- function added
+2002-12-16 14:04 joostverburg
-2003-02-02 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Romanian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Romanian.nsh:
+ Romanian language files
- * Contrib/Modern UI/Language files/Bulgarian.nsh: fix
+2002-12-16 14:03 joostverburg
-2003-02-02 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: small fixes
- * Contrib/Modern UI/Language files/Korean.nsh: fix
+2002-12-15 21:43 joostverburg
-2003-02-02 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: fixes,
+ multilingual brandingtext, reservefile, bgcolor
- * Contrib/Language files/PortugueseBR.nlf, Contrib/Modern
- UI/Language files/Spanish.nsh: updated translation
+2002-12-15 20:56 joostverburg
-2003-01-30 rainwater
+ * /NSIS/trunk/Contrib/InstallOptions/Readme.html: ReserveFile
- * Contrib/Modern UI/Language files/Russian.nsh: Russian updates
+2002-12-15 20:54 kichik
-2003-01-30 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Include dirs (${NSISDIR}\Inclue is
+ automatically one of them, use !AddIncludeDir to add more). Fixed
+ a bug with SetStaticBkColor (-1)
- * Contrib/Modern UI/System.nsh, Contrib/StartMenu/Example.nsi,
- Contrib/StartMenu/Readme.txt, Contrib/StartMenu/StartMenu.c: No
- more problems for directories with a name starting with "error"
+2002-12-15 20:29 joostverburg
-2003-01-30 rainwater
+ * /NSIS/trunk/Contrib/InstallOptions/Changelog.txt,
+ /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/Readme.html: new documentation
- * Contrib/Modern UI/Language files/Danish.nsh: Danish updates
+2002-12-15 19:03 joostverburg
-2003-01-29 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: stack fix
- * Contrib/Modern UI/Language files/Italian.nsh: removed old text
+2002-12-15 14:44 joostverburg
-2003-01-29 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: removed some useles
+ stuff
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Croatian.nsh, Contrib/Modern UI/Language
- files/French.nsh, Contrib/Modern UI/Language files/German.nsh,
- Contrib/Modern UI/Language files/Ukrainian.nsh: 1.62
+2002-12-14 21:19 joostverburg
-2003-01-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: updated
+ translation
- * Docs/AppendixC.html, Docs/src/history.but: updated changelog
+2002-12-14 13:18 joostverburg
-2003-01-28 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: updated
+ translation
- * Contrib/Modern UI/System.nsh: Line cut on finish page fixed
+2002-12-14 13:11 joostverburg
-2003-01-28 kichik
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini: high dpi fix
- * Contrib/Modern UI/System.nsh: Transparent branding text for the
- uninstaller too
+2002-12-14 00:50 joostverburg
-2003-01-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: position of Page
+ commands
- * TODO.txt: drive space color
+2002-12-14 00:20 joostverburg
-2003-01-28 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
- * TODO.txt: update
+2002-12-14 00:15 joostverburg
-2003-01-28 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ioA.ini,
+ /NSIS/trunk/Examples/Modern UI/ioB.ini,
+ /NSIS/trunk/Examples/Modern UI/ioC.ini,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.62
- * Source/exehead/Ui.c, makensis.exe, Source/exehead/exec.c:
- ClearType + transparent branding text fix
+2002-12-14 00:10 joostverburg
-2003-01-28 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/test.ini,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Install Options DLL 2.0
- * Contrib/Modern UI/System.nsh: No branding text in welcome/finish
- page
+2002-12-13 23:56 joostverburg
-2003-01-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh: updated
+ langname
- * makensis.exe, Source/exehead/exec.c: Installers can now contain
- more than one branding image
+2002-12-12 20:36 kichik
-2003-01-27 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp:
+ RESIZETOFIT flag for Image
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/Readme.html: + New browse dialog style
- (modern) + Word wrapping for check boxes and radio buttons + No
- ugly border for edit fields under XP + Scroll bar for list boxes +
- Only labels can have \r\n - fixed in docs
+2002-12-12 19:26 kichik
-2003-01-27 kichik
+ * /NSIS/trunk/Source/script.cpp: BrandingText that starts with /
+ doesn't give errors any more
- * Contrib/Banner/Banner.c, Contrib/Banner/Banner.dsp,
- Contrib/Banner/Example.nsi, Contrib/Banner/Readme.txt: Banner now
- "works" with the MUI too
+2002-12-12 19:01 kichik
-2003-01-27 kichik
+ * /NSIS/trunk/Source/script.cpp: Oops... No debuging code needed
+ there :)
- * Contrib/Modern UI/System.nsh, Contrib/UIs/modern.exe,
- Contrib/UIs/modern2.exe, Contrib/UIs/modern3.exe,
- Source/exehead/Ui.c, Source/script.cpp, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/tokens.cpp, makensis.exe,
- Source/tokens.h: BrandingText now automatically resizes for all
- languages in the MUI
+2002-12-12 19:00 kichik
-2003-01-25 kichik
+ * /NSIS/trunk/Source/script.cpp: !if/!else/!endif problems should
+ be solved now
- * Contrib/InstallOptions/InstallerOptions.cpp: Setting the
- background color for label controls in IO fixed
+2002-12-12 16:54 kichik
-2003-01-24 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Abort now works from .onGUIInit
- * makensis.exe: Whoops. Forgot to compile to the end
+2002-12-12 15:51 kichik
-2003-01-24 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: SetFont "MS Shell Dlg"
+ adds the DS_SHELLFONT style
- * Contrib/Modern UI/System.nsh, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/exehead/Ui.c, makensis.exe, Source/exehead/fileform.h: +
- Leave function for pages + Components page text always shown if
- Page components used
+2002-12-11 20:03 joostverburg
-2003-01-23 kichik
+ * /NSIS/trunk/Docs/src/history.but: start of beta 1 changelog
- * Contrib/Modern UI/Readme.html: Typos
+2002-12-11 19:49 joostverburg
-2003-01-21 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: string
+ name fixed
- * Source/exehead/Ui.c, makensis.exe: Fixed a bug with non ASCII
- characters in InstallDir and auto completion of browse selection
- (squares were added before non ASCII characters)
+2002-12-11 19:33 kichik
-2003-01-21 kichik
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ b1 (CVS) label
- * TODO.txt: IO manual validation
+2002-12-11 18:51 kichik
-2003-01-21 kichik
+ * /NSIS/trunk/Contrib/UIs/UI Holder/ui.dsp: No readme.txt here...
- * Docs/Chapter3.html, Docs/src/langs.but: Braces difference and a
- little typo
+2002-12-11 16:24 joostverburg
-2003-01-21 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modern3.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: added minimize box
- * Examples/makensis.nsi: Added NO_STARTMENUSHORTCUTS define
+2002-12-11 16:01 kichik
-2003-01-20 kichik
+ * /NSIS/trunk/Source/exehead/resource.rc: Minimize box
- * Contrib/InstallOptions/InstallerOptions.cpp: Fixed bug #671161:
- DISABLED dir and file request fields now disable the browse button
- too.
+2002-12-11 14:31 joostverburg
-2003-01-20 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Source/exehead/resource.rc: increased size of
+ component-page textarea
- * Docs/Chapter3.html, Docs/src/sections.but: SubSection defined
- index (thanks VirtLink)
+2002-12-11 14:29 kichik
-2003-01-19 kichik
+ * /NSIS/trunk/Source/build.cpp: Second string missing (thanks
+ veekee)
- * Contrib/InstallOptions/InstallerOptions.cpp: ListBox and state
- now play along
+2002-12-10 20:31 joostverburg
-2003-01-18 kichik
+ * /NSIS/trunk/Contrib/Language files/Thai.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Thai.nsh: Thai
+ translation
- * Contrib/InstallOptions/Readme.html: State information for list
- boxes and their relatives
+2002-12-10 17:19 kichik
-2003-01-17 kichik
+ * /NSIS/trunk/Source/exehead/util.c: Fixed a year and a half old
+ bug with renaming on Windows 9x to a file name that does not
+ exist.
- * Contrib/Makensisw/makensisw.h, makensisw.exe,
- Contrib/Makensisw/utils.cpp: Fixed bug #660082 - Focus problems in
- MakeNSISw, menu shortcuts didn't work when focus was on the test
- button and it was disabled due to an error in the script.
+2002-12-08 20:53 kichik
-2003-01-17 joostverburg
+ * /NSIS/trunk/Docs/src/credits.but: Croatian credits
- * Contrib/Language files/Polish.nlf: accelerator keys
+2002-12-08 20:08 joostverburg
-2003-01-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: updated
+ translation
- * Examples/gfx.nsi: not the second page
+2002-12-08 19:53 kichik
-2003-01-16 joostverburg
+ * /NSIS/trunk/Docs/src/credits.but: Updated credits
- * Examples/Modern UI/MultiLanguage.nsi: more languages
+2002-12-08 16:30 joostverburg
-2003-01-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Croatian.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Croatian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: updated &
+ new translations
- * Contrib/Language files/Polish.nlf, Contrib/Modern UI/Language
- files/Polish.nsh: updated translation
+2002-12-07 13:59 kichik
-2003-01-15 joostverburg
+ * /NSIS/trunk/Source/exehead/config.h: NSIS_CONFIG_PLUGIN_SUPPORT
+ depends on NSIS_SUPPORT_FNUTIL
- * Contrib/Modern UI/Readme.html, Examples/Modern UI/StartMenu.nsi:
- startmenu registry
+2002-12-07 12:49 joostverburg
-2003-01-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: updated
+ translation
- * Contrib/Modern UI/System.nsh: startmenu registry
+2002-12-07 09:57 kichik
-2003-01-15 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Fixed stupid bug with !else ifdef
- * Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/Language files/Polish.nsh, Contrib/Modern UI/Language
- files/Slovak.nsh: updated/new translations
+2002-12-06 23:17 kichik
-2003-01-14 kichik
+ * /NSIS/trunk/TODO.txt: More for next version
- * Contrib/InstallOptions/Readme.html: Missing i
+2002-12-06 22:53 joostverburg
-2003-01-13 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: verbose fixed
- * Contrib/Modern UI/Language files/Polish.nsh: outdated
+2002-12-06 22:25 joostverburg
-2003-01-13 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixes
- * Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/System.nsh, Examples/Modern UI/MultiLanguage.nsi: fixes - polish
- temporary removed (very outdated)
+2002-12-06 22:02 kichik
-2003-01-11 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Unistall confirm page
- * Examples/makensis.nsi: Use the new wizard bitmap
+2002-12-06 21:57 joostverburg
-2003-01-11 kichik
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf: updated
+ translation
- * Source/exehead/exec.c: Delete the old brush if setting the brush
- twice
+2002-12-06 21:57 joostverburg
-2003-01-11 kichik
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf: good translation
+ back
- * TODO.txt: CWD
+2002-12-06 21:56 joostverburg
-2003-01-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: added define
+ for uninstall confirm page, continue texts for uninstaller,
+ bugfixes
- * Contrib/InstallOptions/InstallerOptions.cpp: Fixed problems with
- wsprintf limit of 1024 chars
+2002-12-06 20:51 kichik
-2003-01-10 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: No annoying message box
- * makensis.exe: + IO works with new SetStaticBkColor + IO doesn't
- crash when a label has empty text + LangStrings now really start as
- \\ when not defined
+2002-12-06 20:24 kichik
-2003-01-10 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Delete include dir
- * Contrib/InstallOptions/InstallerOptions.cpp, Source/lang.cpp,
- Source/strlist.h: + IO works with new SetStaticBkColor + IO doesn't
- crash when a label has empty text + LangStrings now really start as
- "" when not defined
+2002-12-06 19:34 kichik
-2003-01-09 kichik
+ * /NSIS/trunk/Docs/src/credits.but: New languages credits
- * Source/script.cpp, Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h: Don't create more than one brush per
- SetStaticBkColor - saved about 50 bytes. Still problems with
- BrandingText width, working on it
+2002-12-06 19:22 joostverburg
-2003-01-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: more improvements
- * Examples/one-section.nsi: Nicer word wrapping
+2002-12-06 19:08 joostverburg
-2003-01-09 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: links directly to new docs
- * Examples/one-section.nsi: Some blurb
+2002-12-06 17:34 joostverburg
-2003-01-09 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: updated
+ translation
- * Contrib/Language files/Danish.nlf, Contrib/Language
- files/PortugueseBR.nlf, Contrib/Modern UI/Language
- files/PortugueseBR.nsh: language file updates & fixes
+2002-12-06 17:25 kichik
-2003-01-09 joostverburg
+ * /NSIS/trunk/Docs/src/intro.but: Crotian coming
- * Contrib/Modern UI/System.nsh: removed 1.4 language file
- compatibility
+2002-12-06 17:20 joostverburg
-2003-01-09 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/ui.but, /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/WinMessages.NSH, /NSIS/trunk/Include,
+ /NSIS/trunk/Include/WinMessages.nsh: new location for
+ WinMessages.nsh
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/StartMenu.nsi,
- Examples/Modern UI/WelcomeFinish.nsi: filename fixes
+2002-12-06 16:56 joostverburg
-2003-01-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: updated
+ translation
- * Contrib/InstallOptions/InstallerOptions.cpp: 4096 chars in Text
- field, that should be enough
+2002-12-06 16:45 joostverburg
-2003-01-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: fixes
- * Docs/AppendixB.html, Docs/src/usefulfunc.but: Corrected
- GetWindowsVersion function
+2002-12-06 16:13 joostverburg
-2003-01-09 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: added
+ mui_finishpage_run_parameters, updated documentation
- * Docs/AppendixB.html, Docs/Chapter3.html, Docs/Chapter4.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/langs.but, Docs/src/var.but: LangStrings update and other
- stuff that didn't get uploaded
+2002-12-06 15:43 kichik
-2003-01-08 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/exehead/Ui.c: No more flickering, cross your
+ fingers for no bugs...
- * Source/exehead/Main.c: Delete the space that comes before _?= in
- the uninstaller $CMDLINE
+2002-12-06 14:55 joostverburg
-2003-01-08 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern3.exe: oops...wrong file
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: updated
+2002-12-06 14:18 kichik
-2003-01-08 joostverburg
+ * /NSIS/trunk/Source/lineparse.h, /NSIS/trunk/Source/script.cpp:
+ !define lines will keep escaping as they are
- * Contrib/Modern UI/Readme.html: extract_as macro
+2002-12-06 13:21 kichik
-2003-01-08 joostverburg
+ * /NSIS/trunk/Docs/src/log.but: LogSet
- * Contrib/Modern UI/System.nsh: renamed io extract macro
+2002-12-06 12:07 joostverburg
-2003-01-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: changelog updated
- * Contrib/InstallOptions/Readme.html: updated
- FileRequest/DirRequest size
+2002-12-05 23:07 kichik
-2003-01-06 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Locking that actually works...
- * Contrib/InstallOptions/test.nsi: If writting into ${TEMP} better
- read from there too...
+2002-12-05 19:44 kichik
-2003-01-06 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: Page size in /HDRINFO
- * Contrib/InstallOptions/Readme.html: dialog units
+2002-12-05 19:42 kichik
-2003-01-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh:
+ NSIS_CONFIG_ENHANCEDUI_SUPPORT is a must for MUI
- * Examples/Modern UI/MultiLanguage.nsi, Contrib/Language
- files/Macedonian.nlf, Contrib/Modern UI/Language
- files/Macedonian.nsh: macedonian language files
+2002-12-05 19:28 kichik
-2003-01-05 kichik
+ * /NSIS/trunk/Source/build.cpp: Define list fixed
- * makensis.exe: RegDeleteKey/Value fix (by Sunjammer) - compiled
- version
+2002-12-05 19:17 kichik
-2003-01-05 kichik
+ * /NSIS/trunk/TODO.txt: Language files updater
- * Source/script.cpp: Already inited, no need to do it again
+2002-12-05 19:14 kichik
-2003-01-05 sunjammerx
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Doesn't enable the
+ check for update menu entry right away but only after the check
+ is finished
- * Source/script.cpp, Source/exehead/exec.c: Inverted test of
- offset[3] for EW_DELREG meant that RegDeleteKey and RegDeleteValue
- were being swapped.
+2002-12-05 19:00 kichik
-2003-01-04 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: modern3.exe forgotten
- * Examples/makensis.nsi: fixes, format changes
+2002-12-05 18:30 kichik
-2003-01-04 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/script.cpp: More VC7 compatibility fixes
- * Docs/AppendixC.html, Docs/src/history.but: updated changelog
+2002-12-05 17:52 joostverburg
-2003-01-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: info about modern3.exe
- * makensis.exe: Buttons stuff fixed
+2002-12-05 17:41 joostverburg
-2003-01-04 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern3.exe: Modern UI without
+ description area
- * TODO.txt: button selection bug fixed
+2002-12-05 17:20 kichik
-2003-01-04 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Indenting fixes
- * Source/exehead/Ui.c: No more two buttons with thick border
+2002-12-05 16:52 kichik
-2003-01-04 joostverburg
+ * /NSIS/trunk/Contrib/Banner/Example.nsi: Some "useful" output
- * Contrib/InstallOptions/test.ini: flag fixed
+2002-12-05 16:29 joostverburg
-2003-01-04 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.61
+ - final version for beta 0
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Readme.html,
- Contrib/InstallOptions/test.ini: new flags
+2002-12-05 16:28 joostverburg
-2003-01-04 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: added tiny ui
- * TODO.txt: todo for beta 1
+2002-12-05 16:20 joostverburg
-2003-01-04 kichik
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf: updated
+ translation
- * Contrib/InstallOptions/InstallerOptions.cpp: - No more group by
- default - Added NoTabStop flag
+2002-12-05 14:56 kichik
-2003-01-04 rainwater
+ * /NSIS/trunk/Source/ResourceEditor.h: Unsigned here too...
- * Contrib/InstallOptions/Readme.html: Added DISABLED flag to docs
+2002-12-05 14:49 kichik
-2003-01-04 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp: Type mismatches
- * Docs/src/usefulfunc.but: Changed URL of the archive
+2002-12-05 13:05 kichik
-2003-01-04 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Plugins/nsisdl.dll: Translatable NSISdl
- * Contrib/InstallOptions/InstallerOptions.cpp: Little typo
+2002-12-05 11:31 joostverburg
-2003-01-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ fixes
- * Contrib/InstallOptions/InstallerOptions.cpp: DISABLED flag
+2002-12-04 22:14 joostverburg
-2003-01-03 sunjammerx
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: updated
+ translation
- * Docs/Chapter3.html: Variables used Strings => Variables used in
- Strings
+2002-12-04 21:11 kichik
-2003-01-02 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c: Set the current directory back
+ to the exe dir
- * Contrib/nsExec/nsexec.c: nsExec didn't free allocated memory
+2002-12-04 20:05 kichik
-2003-01-02 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/asyncdns.cpp,
+ /NSIS/trunk/Contrib/NSISdl/connection.cpp,
+ /NSIS/trunk/Contrib/NSISdl/netinc.h,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/util.cpp,
+ /NSIS/trunk/Contrib/NSISdl/util.h,
+ /NSIS/trunk/Plugins/nsisdl.dll: Smaller
- * Contrib/Modern UI/Language files/Dutch.nsh: typos
+2002-12-04 20:01 kichik
-2002-12-30 kichik
+ * /NSIS/trunk/Docs/src/history.but: History update
- * Docs/src/compiler.but, Source/script.cpp, Source/tokens.cpp,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/resource.h: Update !system, cleaned resource.h,
- DeleteRegKey works on default value
+2002-12-04 19:22 kichik
-2002-12-30 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: Delete File: should have a space
+ after it
- * Contrib/Language files/PortugueseBR.nlf, Contrib/Modern
- UI/Language files/PortugueseBR.nsh: updated translation
+2002-12-04 18:02 kichik
-2002-12-29 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Some strings made case insensitive
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern2.exe, Contrib/UIs/modern3.exe,
- Contrib/UIs/sdbarker_tiny.exe, Source/exehead/resource.rc: better
- grouping
+2002-12-04 14:56 joostverburg
-2002-12-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Korean.nsh: Korean
+ translation
- * Contrib/InstallOptions/Readme.html: group radio buttons
+2002-12-04 14:56 joostverburg
-2002-12-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ updated translation
- * Contrib/InstallOptions/InstallerOptions.cpp: Group flag added for
- radio buttons only
+2002-12-04 13:58 joostverburg
-2002-12-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: updated
+ finishpage translation
- * Contrib/InstallOptions/test.ini: nicer dialog
+2002-12-03 20:33 kichik
-2002-12-29 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c: RegDLL now sets the current
+ directory to the DLL directory (Patch #646306 )
- * Contrib/InstallOptions/Readme.html: groupbox / return value info
+2002-12-03 20:16 joostverburg
-2002-12-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: language file macro fix
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/util.cpp: Last icon used counts, all others deleted
+2002-12-03 19:57 joostverburg
-2002-12-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/License.txt,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: resursive
+ defines, langdll macro
- * Contrib/Modern UI/System.nsh: UninstallIcon not used when
- MUI_UNINSTALLER is not defined
+2002-12-02 23:08 eccles
-2002-12-29 kichik
+ * /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Freed 104 bytes for more dll
+ imports, at the cost of 78 bytes of code
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe,
- Contrib/UIs/modern3.exe: Second string in 111 now has an id too
- (76)
+2002-12-02 17:48 kichik
-2002-12-28 kichik
+ * /NSIS/trunk/Source/script.cpp: define inside define name should
+ work now (${bla${blo}})
- * Contrib/InstallOptions/Readme.html, Contrib/Modern UI/Language
- files/Russian.nsh: Fixed bug #659359
+2002-12-02 16:02 kichik
-2002-12-28 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Some more improvments
- * makensis.exe: Updated
+2002-12-02 15:51 kichik
-2002-12-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/exehead/Ui.c: Install script fixes.
+ .onSelChange is now called after installation type change too
- * Docs/src/flowcontrol.but, Docs/src/ui.but: SendMessage and Return
- got mixed up
+2002-12-02 15:42 joostverburg
-2002-12-27 rainwater
+ * /NSIS/trunk/Contrib/Modern UI/License.txt: line breaks
- * SetCVSShellCommands.exe: updated
+2002-12-02 14:25 joostverburg
-2002-12-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ finishpage translation
- * Docs/Chapter3.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/attributes.but, Docs/src/build.bat,
- Source/exehead/exec.c: Fixed bug #659045
+2002-12-01 22:22 joostverburg
-2002-12-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Modern UI Screenshot2.png
+ added
- * Examples/makensis.nsi, SetCVSShellCommands.nsi: nsh now has its
- own name
+2002-12-01 18:55 joostverburg
-2002-12-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: updated
+ translation
- * Source/ResourceEditor.cpp: Now works with EXEs that have data
- tacked after the PE sections (like NSIS installation data)
+2002-12-01 18:42 kichik
-2002-12-27 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Desktop flickering with first
+ page a custom page
- * Source/script.cpp: Shortcuts can now have comments/descriptions
- without icon index and start options (leave blank - empty string -
- "")
+2002-12-01 13:44 joostverburg
-2002-12-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: !else now always works
- * Contrib/Modern UI/Language files/Greek.nsh: Fixes
+2002-12-01 13:19 kichik
-2002-12-26 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp: Fixed
+ a bug with !if and friends and fixed an ancient bug with line
+ counting going wrong with macros
- * Contrib/nsExec/nsexec.c: Calling nsExec from an installer that
- was executing using CreateProcess from another process now doesn't
- give an error about an invalid handle
+2002-12-01 12:39 joostverburg
-2002-12-26 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ finishpage translation
- * Docs/Chapter4.html, Docs/src/defines.but: !ifndef and !endif docs
- replaced
+2002-12-01 11:43 kichik
-2002-12-25 joostverburg
+ * /NSIS/trunk/TODO.txt: Links
- * Contrib/Modern UI/System.nsh: cleanup
+2002-11-30 20:07 joostverburg
-2002-12-25 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh:
+ updated for Modern UI 1.6
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: better format, cleanup, right order of
- elements
+2002-11-30 13:38 kichik
-2002-12-24 joostverburg
+ * /NSIS/trunk/Docs/src/intro.but: More languages
- * Docs/AppendixC.html, Docs/src/history.but: updated changelog
+2002-11-30 13:35 kichik
-2002-12-24 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: Sections in silent installer
- * Source/makenssi.cpp: (kichik) MakeNSIS now sends output directly
- to MakeNSISw, faster, and no more problems with foreign languages
- in the output.
+2002-11-30 13:15 kichik
-2002-12-24 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C: + Sections can be unselected
+ in silent mode too
+ + Some documentation fixes
+ + Transition between a normal page and a custom page no longer
+ causes a flicker (between two custom pages it still does)
+ + The completed sub-caption shows again
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp, Source/build.cpp, Source/build.h,
- makensis.exe, makensisw.exe: (kichik) MakeNSIS now sends output
- directly to MakeNSISw, faster, and no more problems with foreign
- languages in the output.
+2002-11-29 19:44 joostverburg
-2002-12-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: different string for
+ finishpage title possible, some translation updates
- * Contrib/Modern UI/Language files/Hungarian.nsh: e-mail
+2002-11-29 15:46 kichik
-2002-12-22 kichik
+ * /NSIS/trunk/Contrib/Language files/Bulgarian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Bulgarian.nsh:
+ Bulgarian
- * Source/ResourceEditor.cpp: Tabs
+2002-11-29 11:04 kichik
-2002-12-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: MUI_INSTALLCOLORS and
+ MUI_PROGRESSBAR fix
- * Source/Plugins.cpp: idx not dataHandle
+2002-11-28 16:00 joostverburg
-2002-12-22 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: finishpage
+ run/showreadme fixes
- * Source/lang.cpp, Source/script.cpp: Unsigned/signed warnings
+2002-11-28 15:57 kichik
-2002-12-22 kichik
+ * /NSIS/trunk/Source/lineparse.h: Fixed bug with escaping quotes
- * Source/script.cpp: Removed debug message
+2002-11-28 15:36 joostverburg
-2002-12-21 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Danish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Danish.nsh: Danish
+ translation
- * Contrib/InstallOptions/test.nsi: removed debug stuff
+2002-11-28 13:54 kichik
-2002-12-21 kichik
+ * /NSIS/trunk/Docs/src/ui.but: Another link fixed
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/test.ini, Contrib/InstallOptions/test.nsi:
- Added group box, and made dir request not crash and use Text field
+2002-11-28 13:50 kichik
-2002-12-21 kichik
+ * /NSIS/trunk/Docs/src/langs.but: Fixed link to lang files dir
- * Source/Plugins.cpp, Source/Plugins.h, Source/script.cpp: Case
- insensitive plug-in function names
+2002-11-28 13:43 kichik
-2002-12-21 kichik
+ * /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/ui.but:
+ Section flags updated
- * TODO.txt: Include dirs done
+2002-11-28 13:13 kichik
-2002-12-21 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: DS_SHELLFONT fixes
- * Source/lang.cpp: A warning if a LangString is not present in all
- language tables
+2002-11-28 13:08 kichik
-2002-12-20 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html:
+ /NOUNLOAD added
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: langstring changes
+2002-11-28 09:59 joostverburg
-2002-12-20 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ translation
- * makensis.exe: latest stuff
+2002-11-27 19:09 joostverburg
-2002-12-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Hungarian.nsh:
+ Hungarian Language File for Modern UI 1.6
- * Source/build.cpp, Source/build.h, Source/lang.cpp: OK,
- LangStrings can now really be defined after they are used
+2002-11-27 18:44 kichik
-2002-12-20 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but: Fixed Icon and UninstallIcon
+ documentation
- * Contrib/Modern UI/Language files/English.nsh: typo
+2002-11-27 16:04 kichik
-2002-12-20 kichik
+ * /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/util.cpp: Moved new and delete away from
+ ResourceEditor into util.cpp
- * Source/build.cpp, Source/lang.cpp, Source/script.cpp,
- Source/strlist.h: LangStrings now act as functions, they don't need
- to be defined before used. Uninstaller LangStrings must now be
- refernced with un.
+2002-11-27 15:23 kichik
-2002-12-20 joostverburg
+ * /NSIS/trunk/Source/exehead/resource.h: #define DS_SHELLFONT
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh, Contrib/Modern UI/Language
- files/Greek.nsh, Contrib/Modern UI/Language files/Hungarian.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Romanian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language files/Thai.nsh,
- Contrib/Modern UI/Language files/TradChinese.nsh: updated
- translations & version numbers
+2002-11-26 18:48 joostverburg
-2002-12-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: fixed macro name
- * Contrib/NSISdl/nsisdl.cpp: Fixed bug item #656371
+2002-11-25 20:16 kichik
-2002-12-20 kichik
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: InitPluginsDir now causes to
+ Init___PluginsDir to always get added
- * Docs/Chapter3.html, Docs/src/ui.but: SendMessage STR:
+2002-11-25 18:28 joostverburg
-2002-12-19 rainwater
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: : added
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- makensisw.exe: Added link the forum in help menu
+2002-11-25 18:09 kichik
-2002-12-19 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: 1.6
- * Contrib/Language files/Italian.nlf: updated translation
+2002-11-25 16:50 kichik
-2002-12-18 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp:
+ Next button text is now always added when needed, instfiles
+ dialog is destroyed when needed.
- * Contrib/InstallOptions/Readme.html: xhtml
+2002-11-24 21:12 rainwater
-2002-12-18 kichik
+ * /NSIS/trunk/Plugins/Banner.dll: Added banner.dll to plugins dir
- * Source/exehead/exec.c: Only RegDLL and UnRegDLL will change the
- current directory so plug-ins will now work as before
+2002-11-24 18:50 kichik
-2002-12-18 kichik
+ * /NSIS/trunk/Contrib/Banner, /NSIS/trunk/Contrib/Banner/Banner.c,
+ /NSIS/trunk/Contrib/Banner/Banner.dsp,
+ /NSIS/trunk/Contrib/Banner/Banner.dsw,
+ /NSIS/trunk/Contrib/Banner/Example.nsi,
+ /NSIS/trunk/Contrib/Banner/Readme.txt,
+ /NSIS/trunk/Examples/makensis.nsi: Banner - shows some text
+ before installation starts
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp:
- Updating works with b1, and MakeNSISw compiles without PSDK
+2002-11-24 18:20 kichik
-2002-12-18 kichik
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Plugins/BgImage.dll, /NSIS/trunk/Plugins/splash.dll:
+ UnregisterClass added
- * Source/ResourceEditor.cpp: Fixed bug item #655607
+2002-11-24 17:50 kichik
-2002-12-18 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c: No warning when
+ compiling
- * Contrib/Language files/German.nlf, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh: updated translation
+2002-11-24 15:30 joostverburg
-2002-12-17 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: ReserveFile info
- * Examples/makensis.nsi: fix
+2002-11-23 19:51 joostverburg
-2002-12-17 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ for Modern UI 1.6
- * Contrib/Modern UI/Language files/Greek.nsh: updated translation
+2002-11-22 23:41 kichik
-2002-12-17 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Finish page run command
+ with spaces now works
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- ui settings before lang files, xhtml
+2002-11-22 22:16 joostverburg
-2002-12-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: verbose stuff
- * Contrib/Modern UI/System.nsh: brandingtext trim fixed
+2002-11-22 21:24 joostverburg
-2002-12-16 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf: updated translation
- * Examples/makensis.nsi: fixes
+2002-11-22 17:10 sunjammerx
-2002-12-16 kichik
+ * /NSIS/trunk/Examples/example1.nsi: Typo correction, and slight
+ re-wording.
- * Contrib/InstallOptions/InstallerOptions.cpp: Debug compiles too
+2002-11-22 15:46 kichik
-2002-12-16 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c: Exec will now always work
- * Examples/Modern UI/MultiLanguage.nsi: Romanian
+2002-11-22 12:58 kichik
-2002-12-16 joostverburg
+ * /NSIS/trunk/Source/Plugins.cpp: Another line... =/
- * Contrib/Modern UI/Language files/French.nsh: header subtitle
- during installation too long
+2002-11-22 12:56 kichik
-2002-12-16 joostverburg
+ * /NSIS/trunk/Source/Plugins.cpp: Forgot a line
- * Contrib/Modern UI/Readme.html: color format
+2002-11-22 12:50 joostverburg
-2002-12-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: fixes
- * Contrib/Language files/Romanian.nlf, Contrib/Modern UI/Language
- files/Romanian.nsh: Romanian language files
+2002-11-22 12:45 kichik
-2002-12-16 joostverburg
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/script.cpp: Plugins used both in uninstaller
+ and installer problems should be fixed now
- * Contrib/Modern UI/Readme.html,
- Contrib/InstallOptions/Readme.html: small fixes
+2002-11-22 12:32 kichik
-2002-12-15 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Defines returned to normal after
+ !insertmacro
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/WelcomeFinish.nsi: fixes,
- multilingual brandingtext, reservefile, bgcolor
+2002-11-22 11:54 kichik
-2002-12-15 joostverburg
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Plugins/UserInfo.dll: Fixed memory leaks
- * Contrib/InstallOptions/Readme.html: ReserveFile
+2002-11-22 11:02 kichik
-2002-12-15 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsp,
+ /NSIS/trunk/Contrib/nsExec/nsExec.txt,
+ /NSIS/trunk/Contrib/nsExec/test.nsi,
+ /NSIS/trunk/Plugins/nsExec.dll: Added ExecToStack
- * Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h: Include dirs (${NSISDIR}\Inclue
- is automatically one of them, use !AddIncludeDir to add more).
- Fixed a bug with SetStaticBkColor (-1)
+2002-11-22 10:07 kichik
-2002-12-15 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/Example.nsi: Something a bit more
+ useful
- * Contrib/InstallOptions/Changelog.txt,
- Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/Readme.html: new documentation
+2002-11-22 09:51 kichik
-2002-12-15 joostverburg
+ * /NSIS/trunk/Examples/gfx.nsi: Some more explanations
- * Contrib/InstallOptions/test.nsi: stack fix
+2002-11-21 23:32 kichik
-2002-12-15 joostverburg
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h: Temporary solution to make
+ SetFont work again
- * Contrib/InstallOptions/test.nsi: removed some useles stuff
+2002-11-21 22:59 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/script.cpp: Fixes with uninstall plugins and
+ custom pages
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh: updated translation
+2002-11-21 22:51 joostverburg
-2002-12-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: smaller margins on
+ welcome/finish page
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh: updated translation
+2002-11-21 22:36 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/Examples/gfx.nsi: Custom uninstaller page
- * Contrib/Modern UI/ioSpecial.ini: high dpi fix
+2002-11-21 21:54 joostverburg
-2002-12-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: &quot;
- * !InstallNSIS.bat: beta 1
+2002-11-21 21:51 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/Docs/src/script.but: Single back-slash
- * Contrib/Modern UI/Readme.html: position of Page commands
+2002-11-21 21:41 joostverburg
-2002-12-14 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: escape ", brandingtext
- * Docs/AppendixC.html, Docs/src/history.but: updated changelog
+2002-11-21 19:15 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/Docs/src/script.but: Escaping quotes
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini,
- Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi, Examples/Modern UI/ioA.ini, Examples/Modern
- UI/ioB.ini, Examples/Modern UI/ioC.ini: Modern UI 1.62
+2002-11-21 19:10 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/TODO.txt: Arrg... I hate it when people touch my
+ computer
- * makensis.exe: latest stuff
+2002-11-21 19:09 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/Source/lineparse.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/TODO.txt: Support for escaping quotes using $"
+ Source\lineparse.h Source\script.cpp
- * Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/test.ini: Install Options DLL 2.0
+2002-11-21 18:43 kichik
-2002-12-14 joostverburg
+ * /NSIS/trunk/Docs/src/basic.but: Quotes
- * Contrib/Modern UI/Language files/Thai.nsh: updated langname
+2002-11-21 18:34 kichik
-2002-12-13 joostverburg
+ * /NSIS/trunk/nsisconf.nsh: Quote
- * makensis.htm: forgot a ;
+2002-11-21 17:29 kichik
-2002-12-12 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll: Now works with latest changes
- * Contrib/InstallOptions/InstallerOptions.cpp: RESIZETOFIT flag for
- Image
+2002-11-21 16:46 kichik
-2002-12-12 kichik
+ * /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: Fixed bug item 641776 and
+ returned zlib header to 34KB
- * Source/script.cpp: BrandingText that starts with / doesn't give
- errors any more
+2002-11-20 23:58 justin1014
-2002-12-12 kichik
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C: fixed bug in zlib support
+ (oops, my bad)
- * Source/script.cpp: Oops... No debuging code needed there :)
+2002-11-20 18:27 kichik
-2002-12-12 kichik
+ * /NSIS/trunk/Docs/src/history.but: InitPluginsDir
- * Source/script.cpp: !if/!else/!endif problems should be solved now
+2002-11-20 17:41 kichik
-2002-12-12 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: nsisconf.nsh works again
- * Source/exehead/Ui.c: Abort now works from .onGUIInit
+2002-11-20 14:18 joostverburg
-2002-12-12 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: InitPluginsDir fixes
- * Source/DialogTemplate.cpp: SetFont "MS Shell Dlg" adds the
- DS_SHELLFONT style
+2002-11-20 02:06 rainwater
-2002-12-11 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: Alt+T should open
+ Tools window
- * Docs/AppendixC.html, Docs/src/history.but: start of beta 1
- changelog
+2002-11-19 21:32 joostverburg
-2002-12-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: updated
+ for Modern UI 1.6
- * Contrib/Modern UI/Language files/Dutch.nsh: string name fixed
+2002-11-19 19:06 joostverburg
-2002-12-11 kichik
+ * /NSIS/trunk/Contrib/Language files/Czech.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Czech.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: updated/new
+ translations
- * Examples/makensis.nsi, Source/makenssi.cpp, Source/script.cpp: b1
- (CVS) label
+2002-11-19 17:41 joostverburg
-2002-12-11 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: updated
+ for Modern UI 1.6
- * Contrib/UIs/default.exe, Contrib/UIs/modern.exe,
- Contrib/UIs/modern2.exe, Contrib/UIs/modern3.exe,
- Contrib/UIs/sdbarker_tiny.exe: added minimize box
+2002-11-19 15:54 joostverburg
-2002-12-11 kichik
+ * /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.dsp,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.dsw,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.txt,
+ /NSIS/trunk/Contrib/AdvSplash/Example.nsi,
+ /NSIS/trunk/Plugins/advsplash.dll: fixes
- * Source/exehead/resource.rc: Minimize box
+2002-11-18 20:48 joostverburg
-2002-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot.png,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot2.png: new screenshots
- * makensis.exe: Compiled version with the rename on reboot bug
- fixed
+2002-11-18 17:57 joostverburg
-2002-12-11 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: modern ui updates
- * Contrib/UIs/default.exe, Source/exehead/resource.rc: increased
- size of component-page textarea
+2002-11-18 16:14 joostverburg
-2002-12-11 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: font / ui changes
- * Source/build.cpp: Second string missing (thanks veekee)
+2002-11-18 15:53 joostverburg
-2002-12-10 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe,
+ /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: shell font
- * Contrib/Language files/Thai.nlf, Contrib/Modern UI/Language
- files/Thai.nsh: Thai translation
+2002-11-18 15:44 joostverburg
-2002-12-10 kichik
+ * /NSIS/trunk/Contrib/Modern UI/ioSpecial.ini,
+ /NSIS/trunk/Contrib/Modern UI/ioWizard.ini: renamed
- * Source/exehead/util.c: Fixed a year and a half old bug with
- renaming on Windows 9x to a file name that does not exist.
+2002-11-18 15:43 joostverburg
-2002-12-08 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe, /NSIS/trunk/Examples/Modern
+ UI/WelcomeFinish.nsi: font / ui changes
- * Docs/AppendixD.html, Docs/src/credits.but: Croatian credits
+2002-11-18 15:11 kichik
-2002-12-08 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: StartMenu.nsi and
+ WelcomeFinish.nsi
- * Contrib/Modern UI/Language files/French.nsh: updated translation
+2002-11-18 14:19 kichik
-2002-12-08 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/script.cpp: Now works with DIALOGEX (not
+ thanks to MS docs)
- * Docs/AppendixD.html, Docs/src/credits.but: Updated credits
+2002-11-18 13:58 joostverburg
-2002-12-08 joostverburg
+ * /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc: language
- * Contrib/Language files/French.nlf, Contrib/Language
- files/Croatian.nlf, Contrib/Modern UI/Language files/Arabic.nsh,
- Contrib/Modern UI/Language files/Croatian.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/Language files/French.nsh,
- Contrib/Modern UI/Language files/Greek.nsh: updated & new
- translations
+2002-11-18 13:48 joostverburg
-2002-12-07 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi: fixes
- * Source/exehead/config.h: NSIS_CONFIG_PLUGIN_SUPPORT depends on
- NSIS_SUPPORT_FNUTIL
+2002-11-17 17:54 joostverburg
-2002-12-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: startmenu dll return >,
+ not ^
- * Contrib/Modern UI/Language files/Spanish.nsh: updated translation
+2002-11-17 17:54 joostverburg
-2002-12-07 kichik
+ * /NSIS/trunk/Contrib/StartMenu/Readme.txt: typo
- * Source/script.cpp, makensis.exe: Fixed stupid bug with !else
- ifdef
+2002-11-17 17:46 joostverburg
-2002-12-07 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: shell font, language
- * TODO.txt: More for next version
+2002-11-17 17:42 joostverburg
-2002-12-07 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern2.exe: shell font
- * Contrib/Modern UI/System.nsh: verbose fixed
+2002-11-17 16:45 joostverburg
-2002-12-07 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern.exe: shell font
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- fixes
+2002-11-17 16:44 joostverburg
-2002-12-07 kichik
+ * /NSIS/trunk/Source/exehead/resource.rc: removed useles constant
- * Examples/makensis.nsi: Unistall confirm page
+2002-11-17 16:37 joostverburg
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: shell font
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf: updated translation
+2002-11-17 16:12 joostverburg
-2002-12-06 joostverburg
+ * /NSIS/trunk/Source/exehead/resource.rc: shell font
- * Contrib/Language files/Danish.nlf: good translation back
+2002-11-17 12:44 joostverburg
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/System/System.nsh: show window constants now
+ in WinMessages.nsh
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Danish.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Examples/Modern
- UI/Basic.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/StartMenu.nsi, Examples/Modern UI/WelcomeFinish.nsi: added
- define for uninstall confirm page, continue texts for uninstaller,
- bugfixes
+2002-11-17 12:41 joostverburg
-2002-12-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ updated for Modern UI 1.6
- * Examples/makensis.nsi: No annoying message box
+2002-11-16 22:05 joostverburg
-2002-12-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: welcome/finish init
+ called by modern ui, guiinit changes
- * Examples/makensis.nsi: Delete include dir
+2002-11-16 21:56 joostverburg
-2002-12-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: welcome/finish
+ page multilanguage fixes
- * Docs/AppendixD.html, Docs/Chapter3.html, Docs/src/credits.but:
- New languages credits
+2002-11-16 19:58 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Docs/src/credits.but: Some cosmetic changes
- * Contrib/Modern UI/Readme.html: more improvements
+2002-11-16 19:56 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh: 1.6
+ update
- * Examples/makensis.nsi: links directly to new docs
+2002-11-16 16:54 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: Updated.
- * makensis.htm: better html, link added
+2002-11-16 15:40 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Error when including
+ same language file twice
- * Contrib/Language files/Danish.nlf, Contrib/Modern UI/Language
- files/Danish.nsh: updated translation
+2002-11-16 15:29 kichik
-2002-12-06 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Branding.nsh removed
- * Docs/Chapter1.html, Docs/src/intro.but: Crotian coming
+2002-11-16 15:25 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Examples/branding.nsh: No need any longer
- * Contrib/Modern UI/System.nsh, Contrib/System/SysFunc.nsh,
- Docs/Chapter3.html, Docs/src/callback.but,
- Docs/src/flowcontrol.but, Docs/src/ui.but, Examples/makensis.nsi,
- Examples/WinMessages.NSH, Include/WinMessages.nsh: new location for
- WinMessages.nsh
+2002-11-16 12:48 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Added forgotten files
- * Contrib/Modern UI/Language files/Arabic.nsh: updated translation
+2002-11-15 22:17 joostverburg
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: updated
+ for Modern UI 1.6
- * Contrib/Modern UI/Readme.html: fixes
+2002-11-15 22:16 joostverburg
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/ioWizard.ini,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: larger textarea on
+ welcome page
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh: added mui_finishpage_run_parameters,
- updated documentation
+2002-11-15 22:14 joostverburg
-2002-12-06 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: typo
- * makensis.exe, Contrib/ExDLL/exdll.h,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/StartMenu/StartMenu.c, Source/exehead/Ui.c: No more
- flickering, cross your fingers for no bugs...
+2002-11-15 21:38 joostverburg
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: updated
+ for Modern UI 1.6
- * Contrib/UIs/modern3.exe: oops...wrong file
+2002-11-15 21:24 kichik
-2002-12-06 kichik
+ * /NSIS/trunk/Docs/src/history.but: Still flickers, and welcome and
+ finish screen
- * Source/lineparse.h, Source/script.cpp: !define lines will keep
- escaping as they are
+2002-11-15 21:11 kichik
-2002-12-06 kichik
+ * /NSIS/trunk/TODO.txt: New commands done
- * Docs/Chapter3.html, Docs/src/log.but: LogSet
+2002-11-15 21:11 kichik
-2002-12-06 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: Rect
+ added
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- changelog updated
+2002-11-15 21:08 kichik
-2002-12-06 kichik
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/ui.but:
+ Ordering and some new functions documented
- * Source/exehead/Ui.c, makensis.exe: Locking that actually works...
+2002-11-15 20:29 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Docs/src/plugin.but: Moved around
- * makensis.exe: Latest stuff
+2002-11-15 20:28 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Docs/src/plugin.but: SetPluginUnload and warning
+ about last plugin call with /NOUNLOAD
- * Source/makenssi.cpp: Page size in /HDRINFO
+2002-11-15 20:22 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Docs/src/langs.but: LoadLanguageFile and
+ LangString[UP] are now in the instructions section too
- * Contrib/Modern UI/System.nsh: NSIS_CONFIG_ENHANCEDUI_SUPPORT is a
- must for MUI
+2002-11-15 20:21 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/var.but:
+ InitPluginsDir and $PLUGINSDIR
- * Source/build.cpp: Define list fixed
+2002-11-15 19:55 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Docs/src/compilerflags.but: SetPluginUnload
- * TODO.txt: Language files updater
+2002-11-15 19:45 joostverburg
-2002-12-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ updated string names. work for basic installers now, but need to
+ be updated
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Doesn't enable
- the check for update menu entry right away but only after the check
- is finished
+2002-11-15 19:34 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/langs.but: Credits and multiple languages
+ added
- * Examples/makensis.nsi: modern3.exe forgotten
+2002-11-15 19:26 joostverburg
-2002-12-05 kichik
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: typo
- * Source/ResourceEditor.cpp, Source/build.cpp, Source/lang.cpp,
- Source/script.cpp: More VC7 compatibility fixes
+2002-11-15 19:24 joostverburg
-2002-12-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: added
+ return
- * Contrib/Modern UI/Readme.html: info about modern3.exe
+2002-11-15 19:17 rainwater
-2002-12-05 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp: minor changes
- * Contrib/UIs/modern3.exe: Modern UI without description area
+2002-11-15 18:46 joostverburg
-2002-12-05 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: new modern ui
- * Examples/makensis.nsi: Indenting fixes
+2002-11-15 18:46 joostverburg
-2002-12-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: show readme, disable
+ reboot support
- * Contrib/Banner/Example.nsi: Some "useful" output
+2002-11-15 18:45 rainwater
-2002-12-05 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/int.but, /NSIS/trunk/Docs/src/labels.but,
+ /NSIS/trunk/Docs/src/log.but, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/src/plugin.but, /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/registry.but,
+ /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/stack.but, /NSIS/trunk/Docs/src/string.but,
+ /NSIS/trunk/Docs/src/ui.but, /NSIS/trunk/Docs/src/uninstall.but,
+ /NSIS/trunk/Docs/src/usection.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but,
+ /NSIS/trunk/Docs/src/var.but: Updated docs
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Bulgarian.nsh,
- Contrib/Modern UI/Language files/Czech.nsh, Contrib/Modern
- UI/Language files/Danish.nsh, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh,
- Contrib/Modern UI/Language files/French.nsh, Contrib/Modern
- UI/Language files/German.nsh, Contrib/Modern UI/Language
- files/Greek.nsh, Contrib/Modern UI/Language files/Hungarian.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Japanese.nsh, Contrib/Modern UI/Language
- files/Korean.nsh, Contrib/Modern UI/Language files/Polish.nsh,
- Contrib/Modern UI/Language files/PortugueseBR.nsh, Contrib/Modern
- UI/Language files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh, Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/StartMenu.nsi, Examples/Modern
- UI/WelcomeFinish.nsi: Modern UI 1.61 - final version for beta 0
+2002-11-15 17:27 joostverburg
-2002-12-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fix
- * Examples/makensis.nsi: added tiny ui
+2002-11-15 17:10 joostverburg
-2002-12-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: updated
+ translation
- * Contrib/Language files/Bulgarian.nlf: updated translation
+2002-11-15 16:48 joostverburg
-2002-12-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: updated
+ translation
- * Source/ResourceEditor.h: Unsigned here too...
+2002-11-15 16:37 joostverburg
-2002-12-05 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: Modern UI 1.6
- * Source/DialogTemplate.cpp, Source/ResourceEditor.cpp,
- Source/lang.cpp: Type mismatches
+2002-11-15 16:28 kichik
-2002-12-05 kichik
+ * /NSIS/trunk/Examples/Modern UI/ioA.ini,
+ /NSIS/trunk/Examples/Modern UI/ioB.ini,
+ /NSIS/trunk/Examples/Modern UI/ioC.ini: No more cancel confirm in
+ IO
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/nsisdl.dsp: Translatable NSISdl
+2002-11-15 16:20 joostverburg
-2002-12-05 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: removed
+ finishheader macro
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: fixes
+2002-11-15 16:17 joostverburg
-2002-12-05 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: custom guiinit
- * Contrib/Modern UI/Language files/Greek.nsh: updated translation
+2002-11-15 16:17 kichik
-2002-12-04 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Forgot two lines...
- * Source/exehead/exec.c: Set the current directory back to the exe
- dir
+2002-11-15 16:13 kichik
-2002-12-04 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Leave the cancel alone
+ evil IO!
- * Contrib/NSISdl/asyncdns.cpp, Contrib/NSISdl/connection.cpp,
- Contrib/NSISdl/netinc.h, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/util.cpp, Contrib/NSISdl/util.h: Smaller
+2002-11-15 16:05 kichik
-2002-12-04 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: \t works again, and stil
+ 11kb
- * Docs/AppendixC.html, Docs/src/history.but: History update
+2002-11-15 16:00 joostverburg
-2002-12-04 kichik
+ * /NSIS/trunk/Contrib/Modern UI/ioWizard.ini,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe, /NSIS/trunk/Examples/Modern
+ UI/Basic.nsi, /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/StartMenu.nsi,
+ /NSIS/trunk/Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.6
- * Source/lang.cpp: Delete File: should have a space after it
+2002-11-15 15:54 joostverburg
-2002-12-04 kichik
+ * /NSIS/trunk/Contrib/Icons/modern-wizard.bmp: bitmap for new pages
- * Source/script.cpp: Some strings made case insensitive
+2002-11-15 15:15 kichik
-2002-12-04 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Back to 11KB
- * Contrib/Modern UI/Language files/Korean.nsh: Korean translation
+2002-11-15 15:07 kichik
-2002-12-04 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: New lines in labels,
+ different rect and dialog background
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: updated translation
+2002-11-15 13:50 joostverburg
-2002-12-04 joostverburg
+ * /NSIS/trunk/TODO.txt: examples checked
- * Contrib/Modern UI/Language files/Spanish.nsh: updated finishpage
- translation
+2002-11-15 13:49 kichik
-2002-12-03 kichik
+ * /NSIS/trunk/TODO.txt: IO defaults disabling done
- * Source/exehead/exec.c, Source/exehead/util.c: RegDLL now sets the
- current directory to the DLL directory (Patch #646306 )
+2002-11-15 13:45 kichik
-2002-12-03 joostverburg
+ * /NSIS/trunk/Examples/WinMessages.NSH,
+ /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ Enabled SetWindowLong
- * Contrib/Modern UI/System.nsh: language file macro fix
+2002-11-15 13:34 joostverburg
-2002-12-03 joostverburg
+ * /NSIS/trunk/Examples/viewhtml.nsi: temp file, new html file
- * Contrib/Modern UI/License.txt, Contrib/Modern UI/System.nsh,
- Examples/Modern UI/MultiLanguage.nsi: resursive defines, langdll
- macro
+2002-11-15 13:26 joostverburg
-2002-12-03 eccles
+ * /NSIS/trunk/Examples/makensis.nsi: new examples
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/bgbg.c, Source/exehead/util.c,
- Source/exehead/util.h: Freed 104 bytes for more dll imports, at the
- cost of 78 bytes of code
+2002-11-15 13:15 kichik
-2002-12-02 kichik
+ * /NSIS/trunk/Examples/WinMessages.NSH,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: ShowWindow added
- * Source/script.cpp, makensis.exe: define inside define name should
- work now (${bla${blo}})
+2002-11-15 13:08 kichik
-2002-12-02 kichik
+ * /NSIS/trunk/Examples/gfx.nsi: Some fixes
- * Source/exehead/Ui.c: Some more improvments
+2002-11-15 12:53 kichik
-2002-12-02 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Enabled/show stuff now
+ doesn't do a thing unless specified in the INI file, no more IO
+ defaults, only NSIS defaults.
- * Examples/makensis.nsi, Source/exehead/Ui.c: Install script fixes.
- .onSelChange is now called after installation type change too
+2002-11-15 12:24 kichik
-2002-12-02 joostverburg
+ * /NSIS/trunk/TODO.txt: Examples for plugins - DONE
- * Contrib/Modern UI/License.txt: line breaks
+2002-11-15 12:22 kichik
-2002-12-02 joostverburg
+ * /NSIS/trunk/Contrib/AdvSplash/Example.nsi: MakeNSISW has no
+ sounds
- * Contrib/Modern UI/Language files/German.nsh: updated finishpage
- translation
+2002-11-15 12:22 kichik
-2002-12-02 joostverburg
+ * /NSIS/trunk/Contrib/Splash/Example.nsi: Splash.dll example
- * Examples/makensis.nsi: Modern UI Screenshot2.png added
+2002-11-15 12:21 kichik
-2002-12-01 joostverburg
+ * /NSIS/trunk/Contrib/AdvSplash/Example.nsi: AdvSplash example
- * Contrib/Modern UI/Language files/English.nsh: updated translation
+2002-11-15 12:07 kichik
-2002-12-01 kichik
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Plugins/BgImage.dll: /WAIT works again
- * makensis.exe, Source/exehead/Ui.c: Desktop flickering with first
- page a custom page
+2002-11-15 12:06 kichik
-2002-12-01 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.txt: Pushing order changed
- * Contrib/Modern UI/System.nsh: !else now always works
+2002-11-15 12:06 kichik
-2002-12-01 kichik
+ * /NSIS/trunk/Contrib/BgImage/Example.nsi: Better example
- * makensis.exe, Source/build.h, Source/script.cpp: Fixed a bug with
- !if and friends and fixed an ancient bug with line counting going
- wrong with macros
+2002-11-15 11:59 kichik
-2002-12-01 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Plugins/BgImage.dll: Compiles with the new ExDLL.h
+ and updates the image faster
- * Contrib/Modern UI/Language files/German.nsh: updated finishpage
- translation
+2002-11-15 11:58 kichik
-2002-12-01 kichik
+ * /NSIS/trunk/Contrib/BgImage/Example.nsi: An example for
+ BgImage.dll
- * TODO.txt: Links
+2002-11-15 11:31 kichik
-2002-11-30 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/Example.nsi: No need for
+ WinMessages.nsh
- * Contrib/Modern UI/Language files/Japanese.nsh: updated for Modern
- UI 1.6
+2002-11-14 22:02 kichik
-2002-11-30 kichik
+ * /NSIS/trunk/TODO.txt: IO
- * Docs/Chapter1.html, Docs/src/intro.but: More languages
+2002-11-14 21:21 kichik
-2002-11-30 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: Easier
+ to read
- * Docs/AppendixC.html, Docs/src/history.but: Sections in silent
- installer
+2002-11-14 20:03 kichik
-2002-11-30 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Docs/src/usage.but,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp: /NOCD instead of /CD
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/StartMenu/StartMenu.c, makensis.exe, Docs/AppendixC.html,
- Docs/Chapter3.html, Docs/src/attributes.but, Docs/src/history.but,
- Docs/src/sec.but, Source/lang.cpp, Source/exehead/Main.c,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/state.h,
- Source/exehead/util.c, Source/zlib/INFBLOCK.C: + Sections can be
- unselected in silent mode too + Some documentation fixes +
- Transition between a normal page and a custom page no longer causes
- a flicker (between two custom pages it still does) + The completed
- sub-caption shows again
+2002-11-14 19:43 kichik
-2002-11-29 joostverburg
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/strlist.h: Plugin size only counted once now,
+ no more huge "optimizations" when using one plugin a lot of
+ times.
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Czech.nsh, Contrib/Modern UI/Language
- files/Danish.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Hungarian.nsh, Contrib/Modern
- UI/Language files/Italian.nsh, Contrib/Modern UI/System.nsh,
- Contrib/Modern UI/Language files/Japanese.nsh, Contrib/Modern
- UI/Language files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: different string for finishpage title
- possible, some translation updates
+2002-11-14 19:20 kichik
-2002-11-29 kichik
+ * /NSIS/trunk/Contrib/System/System.nsi: Unload on last call
- * Contrib/Language files/Bulgarian.nlf, Contrib/Modern UI/Language
- files/Bulgarian.nsh: Bulgarian
+2002-11-14 16:29 joostverburg
-2002-11-29 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ updated translation
- * Contrib/Modern UI/System.nsh: MUI_INSTALLCOLORS and
- MUI_PROGRESSBAR fix
+2002-11-14 14:01 kichik
-2002-11-28 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Compiles again
- * Contrib/Modern UI/System.nsh: finishpage run/showreadme fixes
+2002-11-14 12:20 kichik
-2002-11-28 kichik
+ * /NSIS/trunk/Contrib/UIs/default.exe, /NSIS/trunk/Contrib/UIs/UI
+ Holder/resource.rc: Use MS Shell Dlg
- * Source/lineparse.h: Fixed bug with escaping quotes
+2002-11-14 12:12 kichik
-2002-11-28 joostverburg
+ * /NSIS/trunk/Source/makenssi.dsp, /NSIS/trunk/Source/resource.h,
+ /NSIS/trunk/Source/Script1.rc: No resources in makensis...
- * Contrib/Language files/Danish.nlf, Contrib/Modern UI/Language
- files/Danish.nsh: Danish translation
+2002-11-14 12:09 kichik
-2002-11-28 kichik
+ * /NSIS/trunk/Source/exehead/resource.rc: Use MS Shell Dlg
- * Docs/Chapter3.html, Docs/src/ui.but: Another link fixed
+2002-11-14 11:57 kichik
-2002-11-28 kichik
+ * /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp: Resource Files
+ folder cleaned
- * Docs/Chapter3.html, Docs/src/langs.but: Fixed link to lang files
- dir
+2002-11-13 19:53 kichik
-2002-11-28 kichik
+ * /NSIS/trunk/TODO.txt: MORE! MORE!!!
- * Docs/Chapter3.html, Docs/src/sec.but, Docs/src/ui.but: Section
- flags updated
+2002-11-13 19:47 kichik
-2002-11-28 kichik
+ * /NSIS/trunk/TODO.txt: More...
- * Source/DialogTemplate.cpp: DS_SHELLFONT fixes
+2002-11-13 19:47 kichik
-2002-11-28 kichik
+ * /NSIS/trunk/Contrib/System/System.nsi: Compiles again
- * Contrib/InstallOptions/Install Options.html: /NOUNLOAD added
+2002-11-13 02:31 rainwater
-2002-11-28 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Disable update menu
+ item during an update
- * Contrib/Modern UI/Language files/German.nsh: updated translation
+2002-11-12 22:01 joostverburg
-2002-11-27 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: fix
- * Contrib/Modern UI/Language files/Hungarian.nsh: Hungarian
- Language File for Modern UI 1.6
+2002-11-12 21:50 joostverburg
-2002-11-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: updated
+ translation
- * Docs/Chapter3.html, Docs/src/attributes.but: Fixed Icon and
- UninstallIcon documentation
+2002-11-12 19:20 kichik
-2002-11-27 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: First page a skipped custom page
+ with now works again and doesn't enter a infinite loop.
- * Source/ResourceEditor.cpp, Source/util.cpp: Moved new and delete
- away from ResourceEditor into util.cpp
+2002-11-12 18:33 kichik
-2002-11-27 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.rc,
+ /NSIS/trunk/Plugins/StartMenu.dll: Tab order
- * Source/exehead/resource.h: #define DS_SHELLFONT
+2002-11-12 18:19 kichik
-2002-11-26 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: No more Reboot crash when
+ recompiling under VC7
- * Contrib/Modern UI/Readme.html: fixed macro name
+2002-11-12 17:59 kichik
-2002-11-25 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: Graying out when checkbox is
+ checked
- * Source/script.cpp, Source/tokens.cpp, Source/tokens.h,
- makensis.exe: InitPluginsDir now causes to Init___PluginsDir to
- always get added
+2002-11-12 16:18 joostverburg
-2002-11-25 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: updated
+ translation
- * Contrib/Modern UI/Language files/German.nsh: : added
+2002-11-11 21:14 joostverburg
-2002-11-25 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: Dialog
+ Item 1200 instead of 12000
- * Contrib/Modern UI/Language files/Italian.nsh: 1.6
+2002-11-11 20:49 kichik
-2002-11-25 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: No more locking
- * Source/build.cpp, makensis.exe, Source/build.h, Source/lang.cpp,
- Source/exehead/Ui.c: Next button text is now always added when
- needed, instfiles dialog is destroyed when needed.
+2002-11-11 20:30 kichik
-2002-11-24 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: First page a custom page now
+ works
- * Contrib/Banner/Banner.c, Contrib/Banner/Banner.dsp,
- Contrib/Banner/Banner.dsw, Contrib/Banner/Example.nsi,
- Contrib/Banner/Readme.txt, Examples/makensis.nsi: Banner - shows
- some text before installation starts
+2002-11-11 20:24 kichik
-2002-11-24 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Unlock right after pre func
- * Contrib/BgImage/BgImage.cpp, Contrib/Splash/splash.c:
- UnregisterClass added
+2002-11-11 19:19 kichik
-2002-11-24 kichik
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/script.cpp: Some
+ bytes off, zlib is still 34.5 =/
- * Contrib/StartMenu/StartMenu.c: No warning when compiling
+2002-11-11 18:54 joostverburg
-2002-11-24 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: few HTML errors fixed
- * Contrib/InstallOptions/test.nsi: ReserveFile info
+2002-11-11 18:52 joostverburg
-2002-11-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ WINDOWTITLE removed
- * Contrib/Modern UI/Language files/German.nsh: updated for Modern
- UI 1.6
+2002-11-11 18:39 joostverburg
-2002-11-23 kichik
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: better
+ translation
- * Contrib/Modern UI/System.nsh: Finish page run command with spaces
- now works
+2002-11-11 18:37 joostverburg
-2002-11-23 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html: updated documentation
- * Contrib/Modern UI/System.nsh: verbose stuff
+2002-11-11 18:28 kichik
-2002-11-22 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: IO flickering
- * Contrib/Language files/Greek.nlf: updated translation
+2002-11-11 18:02 joostverburg
-2002-11-22 sunjammerx
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: page sytem, io
+ updates
- * Examples/example1.nsi: Typo correction, and slight re-wording.
+2002-11-11 17:51 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Source/script.cpp: Display the right number of
+ expected parameters
- * Source/exehead/exec.c, Source/exehead/util.c: Exec will now
- always work
+2002-11-11 17:37 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Source/script.cpp: Page ignores "" as a function
- * makensis.exe: Some problems fixed
+2002-11-11 17:30 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Auto define of last page
- * Source/Plugins.cpp: Another line... =/
+2002-11-11 17:18 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Docs/src/credits.but: H not h
- * Source/Plugins.cpp: Forgot a line
+2002-11-11 17:17 kichik
-2002-11-22 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/Example.nsi,
+ /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/resource.h,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.rc,
+ /NSIS/trunk/Plugins/StartMenu.dll: Added /checknoshortcuts
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh:
- fixes
+2002-11-11 17:10 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf: Even better
- * Source/Plugins.cpp, Source/Plugins.h, Source/script.cpp: Plugins
- used both in uninstaller and installer problems should be fixed now
+2002-11-11 16:45 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Now always unlocks the dialog
- * Source/script.cpp: Defines returned to normal after !insertmacro
+2002-11-11 16:06 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll,
+ /NSIS/trunk/Source/exehead/Ui.c: No more flickering
- * Contrib/UserInfo/UserInfo.c: Fixed memory leaks
+2002-11-11 15:20 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/test.ini,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi: Caption for custom
+ pages
- * Contrib/ExDLL/exdll.h, Contrib/nsExec/nsExec.dsp,
- Contrib/nsExec/nsExec.txt, Contrib/nsExec/nsexec.c,
- Contrib/nsExec/test.nsi: Added ExecToStack
+2002-11-11 15:14 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Docs/src/pages.but: Caption
- * Contrib/StartMenu/Example.nsi: Something a bit more useful
+2002-11-11 15:12 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Contrib/StartMenu/Example.nsi: No need for
+ SendMessage, Page custom now does it
- * Examples/gfx.nsi: Some more explanations
+2002-11-11 15:11 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Caption parameter for custom pages
- * makensis.exe, Source/DialogTemplate.cpp, Source/DialogTemplate.h:
- Temporary solution to make SetFont work again
+2002-11-11 14:34 kichik
-2002-11-22 kichik
+ * /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: More space for q's
- * makensis.exe, Source/build.cpp, Source/script.cpp,
- Source/exehead/Ui.c: Fixes with uninstall plugins and custom pages
+2002-11-11 13:37 joostverburg
-2002-11-22 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: updated
+ translation
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioSpecial.ini:
- smaller margins on welcome/finish page
+2002-11-10 21:43 eccles
-2002-11-22 kichik
+ * /NSIS/trunk/Docs/src/build.bat: Oops, that shouldn't have been
+ left in...
- * Examples/gfx.nsi: Custom uninstaller page
+2002-11-10 21:41 eccles
-2002-11-21 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/credits.but,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/labels.but, /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/plugin.but, /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/stack.but, /NSIS/trunk/Docs/src/ui.but,
+ /NSIS/trunk/Docs/src/usefulfunc.but: Spelling mistakes/typos
- * Contrib/Modern UI/Readme.html: &quot;
+2002-11-10 18:13 kichik
-2002-11-21 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Back button no longer
+ enabled by default
- * Docs/Chapter3.html, Docs/src/script.but: Single back-slash
+2002-11-10 17:57 joostverburg
-2002-11-21 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: updated
+ translation
- * Contrib/Modern UI/Readme.html: escape ", brandingtext
+2002-11-10 16:32 joostverburg
-2002-11-21 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: InitPluginsDir
- * Docs/Chapter3.html, Docs/src/script.but: Escaping quotes
+2002-11-10 14:58 joostverburg
-2002-11-21 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: language file
+ updates
- * TODO.txt: Arrg... I hate it when people touch my computer
+2002-11-09 21:07 joostverburg
-2002-11-21 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: Start
+ Menu selection
- * TODO.txt, makensis.exe, Docs/AppendixC.html, Source/lineparse.h,
- Source/script.cpp: Support for escaping quotes using $"
- Source\lineparse.h Source\script.cpp
+2002-11-09 20:25 kichik
-2002-11-21 kichik
+ * /NSIS/trunk/TODO.txt: Examples
- * Docs/src/basic.but, Docs/Chapter3.html: Quotes
+2002-11-09 20:19 kichik
-2002-11-21 kichik
+ * /NSIS/trunk/Source/build.cpp: Back button disabled for pages
+ after instfiles
- * nsisconf.nsh: Quote
+2002-11-09 19:34 kichik
-2002-11-21 kichik
+ * /NSIS/trunk/Docs/src/credits.but: Icons
- * makensis.exe: Latest stuff
+2002-11-09 19:29 kichik
-2002-11-21 kichik
+ * /NSIS/trunk/Docs/src/credits.but: Credits
- * Contrib/ExDLL/exdll.h,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/StartMenu/StartMenu.c: Now works with latest changes
+2002-11-09 18:57 kichik
-2002-11-21 kichik
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: Uninstall shortcut
+ too
- * Source/exehead/Ui.c, Source/exehead/bgbg.c,
- Source/exehead/util.c: Fixed bug item 641776 and returned zlib
- header to 34KB
+2002-11-09 18:52 kichik
-2002-11-21 rainwater
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf: Feature request
+ 635981
- * makensis.exe: update to latest
+2002-11-09 18:39 joostverburg
-2002-11-21 justin1014
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: deletes the reg
+ value
- * Source/zlib/INFBLOCK.C: fixed bug in zlib support (oops, my bad)
+2002-11-09 17:58 joostverburg
-2002-11-20 kichik
+ * /NSIS/trunk/Examples/Modern UI/StartMenu.nsi: new example: start
+ menu folder selection
- * Docs/src/history.but: InitPluginsDir
+2002-11-09 17:58 joostverburg
-2002-11-20 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: initplugins,
+ start menu folder selection, new paging system, fixes
- * Source/makenssi.cpp, makensis.exe: nsisconf.nsh works again
+2002-11-09 17:06 kichik
-2002-11-20 joostverburg
+ * /NSIS/trunk/TODO.txt: More stuff to do
- * Contrib/Modern UI/System.nsh: InitPluginsDir fixes
+2002-11-09 15:18 kichik
-2002-11-20 rainwater
+ * /NSIS/trunk/Docs/src/history.but: ShowWin gone
- * Contrib/Makensisw/resource.rc, makensisw.exe: Alt+T should open
- Tools window
+2002-11-09 15:17 kichik
-2002-11-19 joostverburg
+ * /NSIS/trunk/Docs/src/intro.but: Features updated
- * Contrib/Modern UI/Language files/Russian.nsh: updated for Modern
- UI 1.6
+2002-11-09 13:53 kichik
-2002-11-19 joostverburg
+ * /NSIS/trunk/Source/tokens.cpp: InitPlugin*S*Dir
- * Contrib/Language files/Czech.nlf, Contrib/Modern UI/Language
- files/Czech.nsh, Examples/Modern UI/MultiLanguage.nsi: updated/new
- translations
+2002-11-09 13:51 kichik
-2002-11-19 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Made it so only one resource editor
+ will be created instead of every time a resource editor is
+ needed, and added InitPluginDir
- * license.txt: better format for installer
+2002-11-09 13:08 kichik
-2002-11-19 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Pretty summary
- * Contrib/Modern UI/Language files/Arabic.nsh: updated for Modern
- UI 1.6
+2002-11-09 13:00 kichik
-2002-11-19 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Compiles again
- * Contrib/AdvSplash/Example.nsi, Contrib/AdvSplash/advsplash.c,
- Contrib/AdvSplash/advsplash.dsp, Contrib/AdvSplash/advsplash.dsw,
- Contrib/AdvSplash/advsplash.txt: fixes
+2002-11-09 12:50 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsp,
+ /NSIS/trunk/Contrib/BgImage/exdll.h,
+ /NSIS/trunk/Contrib/ExDLL/exdll.h,
+ /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi,
+ /NSIS/trunk/Contrib/StartMenu/Example.nsi,
+ /NSIS/trunk/Contrib/StartMenu/exdll.h,
+ /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsp,
+ /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/StartMenu.dll, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/Ui.c: Even easier paging system, no
+ more Abort and Quit from custom pages creator functions, NSIS
+ does it all!
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/Screenshot.png,
- Contrib/Modern UI/Screenshot2.png: new screenshots
+2002-11-08 23:43 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Plugins/StartMenu.dll: now with /cancelconfirm
- * makensis.exe, makensisw.exe: latest stuff
+2002-11-08 23:25 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu/Example.nsi: Better back support
- * Examples/makensis.nsi: modern ui updates
+2002-11-08 22:05 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/TODO.txt: Lang docs done
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- font / ui changes
+2002-11-08 21:14 joostverburg
-2002-11-18 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: new modern ui
- * Contrib/Makensisw/resource.rc: shell font
+2002-11-08 21:08 joostverburg
-2002-11-18 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Modern UI 1.5
- * Contrib/UIs/default.exe, Contrib/UIs/sdbarker_tiny.exe,
- Source/exehead/resource.rc: shell font
+2002-11-08 21:06 joostverburg
-2002-11-18 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: better translation
- * Contrib/Modern UI/ioSpecial.ini, Contrib/Modern UI/ioWizard.ini:
- renamed
+2002-11-08 21:05 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Plugins added, plugins
+ removed, descriptions changed
- * Contrib/Modern UI/System.nsh, Contrib/UIs/modern.exe,
- Examples/Modern UI/WelcomeFinish.nsi, Contrib/UIs/modern2.exe: font
- / ui changes
+2002-11-08 20:42 kichik
-2002-11-18 kichik
+ * /NSIS/trunk/Contrib/BgImage/BgImage.dsp: Output to ../../plugins
- * Examples/makensis.nsi: StartMenu.nsi and WelcomeFinish.nsi
+2002-11-08 20:41 kichik
-2002-11-18 kichik
+ * /NSIS/trunk/Contrib/BgImage,
+ /NSIS/trunk/Contrib/BgImage/BgImage.cpp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsp,
+ /NSIS/trunk/Contrib/BgImage/BgImage.dsw,
+ /NSIS/trunk/Contrib/BgImage/BgImage.txt,
+ /NSIS/trunk/Contrib/BgImage/exdll.h,
+ /NSIS/trunk/Plugins/BgImage.dll: Persistent background image
+ plugin
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/script.cpp: Now works with DIALOGEX (not thanks to MS docs)
+2002-11-08 20:21 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Contrib/ShowWin, /NSIS/trunk/Plugins/ShowWin.dll:
+ System.dll does all that ShowWin.dll does and more
- * Contrib/System/SysFunc.nsh, Contrib/System/System.nsh,
- Contrib/System/System.nsi: fixes
+2002-11-08 19:29 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: Plugins added
- * Contrib/Modern UI/Language files/TradChinese.nsh: fixes
+2002-11-08 19:24 kichik
-2002-11-18 joostverburg
+ * /NSIS/trunk/Docs/src/langs.but: NSIS multiple languages
+ capabilities documentation
- * makensis.exe: ChangeUI fixes
+2002-11-08 18:32 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Resize according to NSIS dialog
- * Contrib/Modern UI/System.nsh: startmenu dll return >, not ^
+2002-11-08 18:05 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: dl not dll
- * Contrib/StartMenu/Readme.txt: typo
+2002-11-08 17:30 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Contrib/StartMenu,
+ /NSIS/trunk/Contrib/StartMenu/Example.nsi,
+ /NSIS/trunk/Contrib/StartMenu/exdll.h,
+ /NSIS/trunk/Contrib/StartMenu/Readme.txt,
+ /NSIS/trunk/Contrib/StartMenu/resource.h,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.c,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsp,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.dsw,
+ /NSIS/trunk/Contrib/StartMenu/StartMenu.rc,
+ /NSIS/trunk/Plugins/StartMenu.dll: StartMenu.dll, lets the user
+ select the start menu folder
- * Contrib/UIs/default.exe, Contrib/UIs/sdbarker_tiny.exe: shell
- font, language
+2002-11-08 17:16 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Contrib/Splash/splash.txt: DLL not EXE
- * Contrib/UIs/modern2.exe: shell font
+2002-11-08 16:58 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Warning about misused /NOUNLOAD
- * Contrib/Modern UI/System.nsh, Contrib/UIs/modern.exe: shell font
+2002-11-08 16:51 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Doesn't crash if
+ initDialog is called without /NOUNLOAD.
- * Source/exehead/resource.rc: removed useles constant
+2002-11-08 11:15 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: Oops... WriteIniStr now writes
+ again
- * Contrib/Makensisw/resource.rc, makensisw.exe: shell font
+2002-11-08 11:06 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Forgotten D re-added
- * Source/exehead/resource.rc: shell font
+2002-11-07 23:40 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Docs/src/compilerflags.but: Some more bold defaults
- * Contrib/System/System.nsh: show window constants now in
- WinMessages.nsh
+2002-11-07 21:54 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/test.nsi: Reading output to a variable
+ example
- * Contrib/Modern UI/Language files/Ukrainian.nsh: updated for
- Modern UI 1.6
+2002-11-07 20:12 kichik
-2002-11-17 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: WriteIniStr flushing enabled
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- welcome/finish init called by modern ui, guiinit changes
+2002-11-07 15:50 kichik
-2002-11-16 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/script.cpp:
+ Install and next button texts should always be added when needed
+ now.
- * Contrib/Modern UI/System.nsh, Examples/Modern
- UI/WelcomeFinish.nsi: welcome/finish page multilanguage fixes
+2002-11-07 15:18 kichik
-2002-11-16 kichik
+ * /NSIS/trunk/Source/build.cpp: Shows the license button even when
+ no page are between the license page and the install log page.
- * Docs/AppendixD.html, Docs/src/credits.but: Some cosmetic changes
+2002-11-06 22:31 joostverburg
-2002-11-16 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: upgradedll: new command on
+ two lines
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: 1.6 update
+2002-11-06 21:20 rainwater
-2002-11-16 kichik
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but,
+ /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/config.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/int.but, /NSIS/trunk/Docs/src/log.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/pages.but,
+ /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/registry.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/stack.but, /NSIS/trunk/Docs/src/string.but,
+ /NSIS/trunk/Docs/src/ui.but, /NSIS/trunk/Docs/src/uninstall.but:
+ Updated docs
- * Contrib/Modern UI/Language files/French.nsh, Contrib/Modern
- UI/Language files/Greek.nsh: Updated.
+2002-11-06 21:12 joostverburg
-2002-11-16 kichik
+ * /NSIS/trunk/Docs/src/usefulfunc.but: upgradedll: better dll
+ registration on reboot
- * Contrib/Modern UI/System.nsh: Error when including same language
- file twice
+2002-11-06 16:22 kichik
-2002-11-16 kichik
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.nsi: Better example
- * Examples/makensis.nsi: Branding.nsh removed
+2002-11-06 12:13 joostverburg
-2002-11-16 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh: fixed
+ Uninstaller caption (other language files will be fixed later)
- * Examples/branding.nsh: No need any longer
+2002-11-06 12:12 joostverburg
-2002-11-16 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: new Modern UI
- * Examples/makensis.nsi: Added forgotten files
+2002-11-05 21:42 kichik
-2002-11-16 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Bug #623117 fixed
- * Contrib/Modern UI/Language files/Greek.nsh: updated for Modern UI
- 1.6
+2002-11-05 20:50 joostverburg
-2002-11-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: MUI_UNINSTALLER
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/ioWizard.ini:
- larger textarea on welcome page
+2002-11-05 19:36 joostverburg
-2002-11-16 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: moved !ifdef
- * Contrib/Modern UI/Language files/English.nsh: typo
+2002-11-05 18:47 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: Hope this one won't be
+ corrupted
- * Contrib/Modern UI/Language files/Spanish.nsh: updated for Modern
- UI 1.6
+2002-11-05 18:41 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: Corrupted
- * Docs/src/history.but, Docs/AppendixC.html: Still flickers, and
- welcome and finish screen
+2002-11-05 18:37 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: Lets hope it is not
+ corrupted this time
- * TODO.txt: New commands done
+2002-11-05 17:24 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Source/script.cpp: Can't use !macro inside !macro
- * Contrib/InstallOptions/Install Options.html: Rect added
+2002-11-05 16:31 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: No need for uninstaller
+ macros if we have no uninstaller
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/AppendixC.html,
- Docs/Chapter3.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/build.bat, Docs/src/ui.but: Ordering and
- some new functions documented
+2002-11-05 16:23 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Icons/checks4.bmp,
+ /NSIS/trunk/Contrib/Icons/checks4-aa.bmp,
+ /NSIS/trunk/Contrib/Icons/checks-sdbarker.bmp,
+ /NSIS/trunk/Contrib/Icons/checks-sdbarker-aa.bmp: Gotta give the
+ man some credit :)
- * Docs/src/plugin.but: Moved around
+2002-11-05 16:18 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/callback.but: Typos
- * Docs/src/plugin.but: SetPluginUnload and warning about last
- plugin call with /NOUNLOAD
+2002-11-05 16:18 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/pages.but: Same page, many times
- * Docs/src/langs.but: LoadLanguageFile and LangString[UP] are now
- in the instructions section too
+2002-11-05 16:14 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: WORD->LANGID
- * Docs/src/misc.but, Docs/src/var.but: InitPluginsDir and
- $PLUGINSDIR
+2002-11-05 16:11 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/UIs/sdbarker_tiny.exe: *** empty log message
+ ***
- * Docs/src/compilerflags.but: SetPluginUnload
+2002-11-04 19:19 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Using ChangeUI twice, where the
+ first UI has a branding image and the second doesn't, still made
+ SetBrandingImage think there is really a branding image. Fixed.
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Japanese.nsh, Contrib/Modern UI/Language
- files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: updated string names. work for basic
- installers now, but need to be updated
+2002-11-04 16:40 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: language macro
- * Docs/AppendixE.html: Credits
+2002-11-04 16:35 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Source/tokens.cpp:
+ Page, UninstPage usage line improvement
- * Docs/AppendixD.html, Docs/Chapter1.html, Docs/Chapter3.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/build.bat, Docs/src/credits.but, Docs/src/langs.but:
- Credits and multiple languages added
+2002-11-04 16:28 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: Dates
+ fixed
- * Examples/Modern UI/StartMenu.nsi: typo
+2002-11-04 16:27 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: Updated
+ docs
- * Contrib/Modern UI/Language files/English.nsh: added return
+2002-11-04 15:44 kichik
-2002-11-15 rainwater
+ * /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.nsi,
+ /NSIS/trunk/Plugins/UserInfo.dll: GetAccountType instead of
+ GetGroup
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/version.cpp,
- makensisw.exe: minor changes
+2002-11-04 15:40 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/UserInfo,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.c,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.dsp,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.dsw,
+ /NSIS/trunk/Contrib/UserInfo/UserInfo.nsi,
+ /NSIS/trunk/Plugins/UserInfo.dll: UserInfo DLL to get user group
+ and name
- * Examples/makensis.nsi: new modern ui
+2002-11-04 14:13 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: right position
+ for .onInit
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Readme.html, Contrib/Modern UI/System.nsh, Contrib/Modern
- UI/Language files/English.nsh: show readme, disable reboot support
+2002-11-04 13:35 rainwater
-2002-11-15 rainwater
+ * /NSIS/trunk/Docs/src/sections.but: section typo (bug #633265)
- * Docs/AppendixA.html, Docs/AppendixC.html, Docs/Chapter2.html,
- Docs/Chapter10.html, Docs/Chapter3.html, Docs/Chapter4.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/Chapter11.html, Docs/Chapter12.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/src/attributes.but, Docs/src/basic.but,
- Docs/src/build.bat, Docs/src/callback.but, Docs/src/compiler.but,
- Docs/src/compilerflags.but, Docs/src/config.but,
- Docs/src/defines.but, Docs/src/file.but, Docs/src/flowcontrol.but,
- Docs/src/functions.but, Docs/src/generalpurpose.but,
- Docs/src/int.but, Docs/src/labels.but, Docs/src/log.but,
- Docs/src/misc.but, Docs/src/plugin.but, Docs/src/reboot.but,
- Docs/src/registry.but, Docs/src/script.but, Docs/src/sec.but,
- Docs/src/sections.but, Docs/src/stack.but, Docs/src/string.but,
- Docs/src/ui.but, Docs/src/uninstall.but, Docs/src/usection.but,
- Docs/src/usefulfunc.but, Docs/src/var.but: Updated docs
+2002-11-04 12:51 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: update
- * Contrib/Modern UI/System.nsh: fix
+2002-11-04 12:16 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: width fixed
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh: updated translation
+2002-11-04 11:47 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: more info
- * Contrib/Modern UI/Language files/Dutch.nsh: updated translation
+2002-11-04 11:25 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: comment
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- Modern UI 1.6
+2002-11-04 11:19 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: macro system
+ updates
- * Examples/Modern UI/ioA.ini, Examples/Modern UI/ioB.ini,
- Examples/Modern UI/ioC.ini: No more cancel confirm in IO
+2002-11-03 23:24 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: more info
- * Examples/Modern UI/WelcomeFinish.nsi: removed finishheader macro
+2002-11-03 18:17 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh:
+ 'Browse for Folder' text fixed
- * Contrib/Modern UI/System.nsh: custom guiinit
+2002-11-03 16:55 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt: date
- * Contrib/InstallOptions/InstallerOptions.cpp: Forgot two lines...
+2002-11-03 16:30 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: update
- * Contrib/InstallOptions/InstallerOptions.cpp: Leave the cancel
- alone evil IO!
+2002-11-03 13:33 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: fixes
- * Contrib/InstallOptions/InstallerOptions.cpp: \t works again, and
- stil 11kb
+2002-11-03 13:23 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: new modern ui
- * makensis.exe: latest stuff
+2002-11-03 13:21 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: macro system
+ updates
- * Contrib/UIs/modern2.exe: Modern UI 1.6
+2002-11-03 12:50 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: macro system
+ updates
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/ioWizard.ini,
- Contrib/UIs/modern.exe, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/StartMenu.nsi,
- Examples/Modern UI/WelcomeFinish.nsi: Modern UI 1.6
+2002-11-03 00:01 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: macro system
+ updates
- * Contrib/InstallOptions/InstallerOptions.cpp: Back to 11KB
+2002-11-02 23:35 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: abortwarning in
+ basic macro
- * Contrib/InstallOptions/InstallerOptions.cpp: New lines in labels,
- different rect and dialog background
+2002-11-02 23:06 joostverburg
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: macro system
+ updates
- * TODO.txt: examples checked
+2002-11-02 18:57 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/history.but: Fixed version history of v2.0a2
- * TODO.txt: IO defaults disabling done
+2002-11-02 15:28 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: no currentpage var
+ anymore
- * Examples/WinMessages.NSH, Source/script.cpp,
- Source/exehead/exec.c, Source/tokens.cpp, Source/tokens.h: Enabled
- SetWindowLong
+2002-11-02 15:14 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: r
- * Examples/viewhtml.nsi: temp file, new html file
+2002-11-02 15:06 kichik
-2002-11-15 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: Combo box now shows on
+ Windows 9x
- * Examples/makensis.nsi: new examples
+2002-11-02 13:45 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Language files/German.nlf: better translation
- * Examples/WinMessages.NSH, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/exec.c, Source/exehead/fileform.h:
- ShowWindow added
+2002-11-02 13:41 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: System plugin directory
- * Examples/gfx.nsi: Some fixes
+2002-11-02 13:34 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: no currentpage
+ var anymore
- * Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/InstallerOptions.cpp: Enabled/show stuff now
- doesn't do a thing unless specified in the INI file, no more IO
- defaults, only NSIS defaults.
+2002-11-02 12:37 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: Polski
- * TODO.txt: Examples for plugins - DONE
+2002-11-02 12:28 joostverburg
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: fixes, comments,
+ ReserveFile
- * Contrib/AdvSplash/Example.nsi: MakeNSISW has no sounds
+2002-11-02 11:01 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: !macro
+ MUI_INTERFACE_ALLRES
- * Contrib/Splash/Example.nsi: Splash.dll example
+2002-11-02 10:54 kichik
-2002-11-15 kichik
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: Some !ifdefs
- * Contrib/AdvSplash/Example.nsi: AdvSplash example
+2002-11-02 02:14 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/makefile: let's not remove the
+ old exe
- * Contrib/BgImage/BgImage.cpp: /WAIT works again
+2002-11-02 01:51 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: added checkbitmap parameter
- * Contrib/BgImage/BgImage.txt: Pushing order changed
+2002-11-02 01:46 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/style.css: updated style. probably ugly as hell.
- * Contrib/BgImage/Example.nsi: Better example
+2002-11-01 23:01 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/style.css: last update
- * Contrib/BgImage/BgImage.cpp: Compiles with the new ExDLL.h and
- updates the image faster
+2002-11-01 22:55 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: updateeeeeeeeeeeeee
- * Contrib/BgImage/Example.nsi: An example for BgImage.dll
+2002-11-01 22:52 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: another update
- * Contrib/StartMenu/Example.nsi: No need for WinMessages.nsh
+2002-11-01 22:48 rainwater
-2002-11-15 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: Updated docs again
- * TODO.txt: IO
+2002-11-01 22:37 kichik
-2002-11-14 kichik
+ * /NSIS/trunk/Source/script.cpp: GetDLLVersionLocal now always
+ first looks in the current directory
- * Contrib/InstallOptions/InstallerOptions.cpp: Easier to read
+2002-11-01 22:29 rainwater
-2002-11-14 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: updated
- * !InstallNSIS.bat, SetCVSShellCommands.nsi,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp, Docs/src/usage.but,
- Examples/makensis.nsi, Source/makenssi.cpp,
- SetCVSShellCommands.exe, makensis.exe, makensisw.exe: /NOCD instead
- of /CD
+2002-11-01 22:28 rainwater
-2002-11-14 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c: Different linkage on
+ the index page
- * Source/Plugins.cpp, Source/Plugins.h, Source/build.h,
- Source/script.cpp, Source/strlist.h: Plugin size only counted once
- now, no more huge "optimizations" when using one plugin a lot of
- times.
+2002-11-01 22:04 rainwater
-2002-11-14 kichik
+ * /NSIS/trunk/Docs/src/build.bat: no need to delete help files and
+ text files anymore
- * Contrib/System/System.nsi: Unload on last call
+2002-11-01 21:56 rainwater
-2002-11-14 joostverburg
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: updated
- * Contrib/Modern UI/Language files/SimpChinese.nsh, Contrib/Modern
- UI/Language files/TradChinese.nsh: updated translation
+2002-11-01 21:56 rainwater
-2002-11-14 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut/makefile,
+ /NSIS/trunk/Docs/src/bin/halibut/winhelp.c,
+ /NSIS/trunk/Docs/src/bin/halibut/winhelp.h: Remove winhelp module
- * Examples/makensis.nsi: Compiles again
+2002-11-01 21:52 rainwater
-2002-11-14 kichik
+ * /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/bin/halibut/biblio.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_text.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_whlp.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/src/bin/halibut/contents.c,
+ /NSIS/trunk/Docs/src/bin/halibut/error.c,
+ /NSIS/trunk/Docs/src/bin/halibut/halibut.h,
+ /NSIS/trunk/Docs/src/bin/halibut/help.c,
+ /NSIS/trunk/Docs/src/bin/halibut/index.c,
+ /NSIS/trunk/Docs/src/bin/halibut/input.c,
+ /NSIS/trunk/Docs/src/bin/halibut/keywords.c,
+ /NSIS/trunk/Docs/src/bin/halibut/LICENCE,
+ /NSIS/trunk/Docs/src/bin/halibut/licence.c,
+ /NSIS/trunk/Docs/src/bin/halibut/main.c,
+ /NSIS/trunk/Docs/src/bin/halibut/makefile,
+ /NSIS/trunk/Docs/src/bin/halibut/malloc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/misc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.h,
+ /NSIS/trunk/Docs/src/bin/halibut/ustring.c,
+ /NSIS/trunk/Docs/src/bin/halibut/winhelp.c,
+ /NSIS/trunk/Docs/src/bin/halibut/winhelp.h: removed text and help
+ file backends; added some usage crap and removed the help command
+ line optin(who needs that)
+
+2002-11-01 21:00 joostverburg
+
+ * /NSIS/trunk/TODO.txt: bold defaults: done
+
+2002-11-01 20:51 joostverburg
+
+ * /NSIS/trunk/Examples/makensis.nsi: new Modern UI version
+
+2002-11-01 20:46 joostverburg
+
+ * /NSIS/trunk/Contrib/InstallOptions/test.ini,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi: new Page system
+
+2002-11-01 20:45 joostverburg
- * Contrib/UIs/default.exe: Use MS Shell Dlg
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Japanese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ioA.ini,
+ /NSIS/trunk/Examples/Modern UI/ioB.ini,
+ /NSIS/trunk/Examples/Modern UI/ioC.ini,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Modern UI 1.4
-2002-11-14 kichik
+2002-11-01 20:42 joostverburg
- * Source/makenssi.dsp, Source/Script1.rc, Source/resource.h: No
- resources in makensis...
+ * /NSIS/trunk/Contrib/Language files/Japanese.nlf: By Dnanako
-2002-11-14 kichik
+2002-11-01 20:34 kichik
- * Source/exehead/resource.rc: Use MS Shell Dlg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/misc.but,
+ /NSIS/trunk/Docs/src/pages.but, /NSIS/trunk/Examples/gfx.nsi,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: New paging system. All scripts must
+ be updated, but it sure is worth it. InstallOptions has two new
+ functions initDialog and show. Docs massively updated.
-2002-11-14 kichik
+2002-11-01 18:39 rainwater
- * Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp: Resource Files folder cleaned
+ * /NSIS/trunk/Docs/src/attributes.but: typo
-2002-11-13 kichik
+2002-11-01 18:22 kichik
- * TODO.txt: MORE! MORE!!!
+ * /NSIS/trunk/Docs/src/bin/halibut,
+ /NSIS/trunk/Docs/src/bin/halibut/biblio.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_text.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_whlp.c,
+ /NSIS/trunk/Docs/src/bin/halibut/bk_xhtml.c,
+ /NSIS/trunk/Docs/src/bin/halibut/contents.c,
+ /NSIS/trunk/Docs/src/bin/halibut/error.c,
+ /NSIS/trunk/Docs/src/bin/halibut/halibut.h,
+ /NSIS/trunk/Docs/src/bin/halibut/help.c,
+ /NSIS/trunk/Docs/src/bin/halibut/index.c,
+ /NSIS/trunk/Docs/src/bin/halibut/input.c,
+ /NSIS/trunk/Docs/src/bin/halibut/keywords.c,
+ /NSIS/trunk/Docs/src/bin/halibut/LICENCE,
+ /NSIS/trunk/Docs/src/bin/halibut/licence.c,
+ /NSIS/trunk/Docs/src/bin/halibut/main.c,
+ /NSIS/trunk/Docs/src/bin/halibut/makefile,
+ /NSIS/trunk/Docs/src/bin/halibut/malloc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/misc.c,
+ /NSIS/trunk/Docs/src/bin/halibut/style.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.c,
+ /NSIS/trunk/Docs/src/bin/halibut/tree234.h,
+ /NSIS/trunk/Docs/src/bin/halibut/ustring.c,
+ /NSIS/trunk/Docs/src/bin/halibut/version.c,
+ /NSIS/trunk/Docs/src/bin/halibut/winhelp.c,
+ /NSIS/trunk/Docs/src/bin/halibut/winhelp.h: Hacked up halibut
+ source code
-2002-11-13 kichik
+2002-11-01 16:57 joostverburg
- * TODO.txt: More...
+ * /NSIS/trunk/Docs/src/attributes.but: updates
-2002-11-13 kichik
+2002-11-01 16:55 joostverburg
- * Contrib/System/System.nsi: Compiles again
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
-2002-11-13 kichik
+2002-11-01 16:51 joostverburg
- * license.txt: Word wrapping
+ * /NSIS/trunk/Docs/src/intro.but: listitems fixed
-2002-11-13 rainwater
+2002-11-01 16:51 kichik
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Disable update
- menu item during an update
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: HTML now really works in \c
-2002-11-13 joostverburg
+2002-11-01 16:51 joostverburg
- * Contrib/Modern UI/Language files/German.nsh: fix
+ * /NSIS/trunk/Docs/src/log.but, /NSIS/trunk/Docs/src/modernui.but:
+ fixes
-2002-11-12 joostverburg
+2002-11-01 16:36 kichik
- * Contrib/Modern UI/Language files/German.nsh: updated translation
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: doesn't crash
-2002-11-12 kichik
+2002-11-01 16:33 kichik
- * Source/exehead/Ui.c: First page a skipped custom page with now
- works again and doesn't enter a infinite loop.
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: \\ works again
-2002-11-12 kichik
+2002-11-01 16:30 kichik
- * Contrib/StartMenu/StartMenu.rc: Tab order
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: HTML in \c
-2002-11-12 kichik
+2002-11-01 16:02 joostverburg
- * Source/exehead/exec.c, makensis.exe: No more Reboot crash when
- recompiling under VC7
+ * /NSIS/trunk/Docs/src/usefulfunc.but: UpgradeDLL fixes
-2002-11-12 kichik
+2002-11-01 15:59 kichik
- * Contrib/StartMenu/StartMenu.c: Graying out when checkbox is
- checked
+ * /NSIS/trunk/Docs/src/config.but: More depth
-2002-11-12 joostverburg
+2002-11-01 15:58 kichik
- * Contrib/Modern UI/Language files/Greek.nsh: updated translation
+ * /NSIS/trunk/Docs/src/intro.but: Same as teh html
-2002-11-11 joostverburg
+2002-11-01 15:40 kichik
- * makensis.exe: window locks gone, hope we can fix this later
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: \\ for esacping &, ", < and
+ >
-2002-11-11 joostverburg
+2002-11-01 13:54 joostverburg
- * Contrib/InstallOptions/Install Options.html: Dialog Item 1200
- instead of 12000
+ * /NSIS/trunk/Examples/functions.htm: removed (in the docs now)
-2002-11-11 kichik
+2002-11-01 13:10 kichik
- * Source/exehead/Ui.c: No more locking
+ * /NSIS/trunk/Docs/src/history.but: Escaped
-2002-11-11 kichik
+2002-11-01 13:09 rainwater
- * Source/exehead/Ui.c: First page a custom page now works
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: New modified halibut by
+ kichik
-2002-11-11 kichik
+2002-11-01 11:22 kichik
- * Source/exehead/Ui.c: Unlock right after pre func
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Plugins/nsisdl.dll: Fixed a bug with HTTP proxy
+ detection - Joost can finally use NSIS-dl :D
-2002-11-11 kichik
+2002-11-01 09:59 joostverburg
- * Source/build.cpp, Source/lang.cpp, Source/lang.h,
- Source/script.cpp, Source/exehead/Ui.c, Source/exehead/fileform.h:
- Some bytes off, zlib is still 34.5 =/
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: fixes
-2002-11-11 joostverburg
+2002-11-01 09:50 joostverburg
- * Contrib/Modern UI/Readme.html: few HTML errors fixed
+ * /NSIS/trunk/Docs/src/usefulfunc.but: fixes for filenames with
+ spaces
-2002-11-11 joostverburg
+2002-11-01 09:39 joostverburg
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/Language files/French.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Italian.nsh, Contrib/Modern UI/Language files/Japanese.nsh,
- Contrib/Modern UI/Language files/Polish.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: WINDOWTITLE removed
+ * /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi: directory fixes
-2002-11-11 joostverburg
+2002-10-31 17:21 kichik
- * Contrib/Language files/Hungarian.nlf: better translation
+ * /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/TODO.txt: History completed! FINALLY!!! :D
-2002-11-11 joostverburg
+2002-10-31 15:55 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html:
- updated documentation
+ * /NSIS/trunk/Contrib/System/Buffers.c,
+ /NSIS/trunk/Contrib/System/Buffers.h,
+ /NSIS/trunk/Contrib/System/Plugin.c,
+ /NSIS/trunk/Contrib/System/Plugin.h,
+ /NSIS/trunk/Contrib/System/Source,
+ /NSIS/trunk/Contrib/System/Source/Buffers.c,
+ /NSIS/trunk/Contrib/System/Source/Buffers.h,
+ /NSIS/trunk/Contrib/System/Source/Plugin.c,
+ /NSIS/trunk/Contrib/System/Source/Plugin.h,
+ /NSIS/trunk/Contrib/System/Source/stdafx.c,
+ /NSIS/trunk/Contrib/System/Source/stdafx.h,
+ /NSIS/trunk/Contrib/System/Source/System.c,
+ /NSIS/trunk/Contrib/System/Source/System.h,
+ /NSIS/trunk/Contrib/System/Source/System.sln,
+ /NSIS/trunk/Contrib/System/Source/System.vcproj,
+ /NSIS/trunk/Contrib/System/Source/vc7ldvrm.obj,
+ /NSIS/trunk/Contrib/System/Source/vc7lmul.obj,
+ /NSIS/trunk/Contrib/System/Source/vc7lshl.obj,
+ /NSIS/trunk/Contrib/System/Source/vc7lshr.obj,
+ /NSIS/trunk/Contrib/System/stdafx.c,
+ /NSIS/trunk/Contrib/System/stdafx.h,
+ /NSIS/trunk/Contrib/System/System.c,
+ /NSIS/trunk/Contrib/System/System.h,
+ /NSIS/trunk/Contrib/System/System.sln,
+ /NSIS/trunk/Contrib/System/System.vcproj,
+ /NSIS/trunk/Contrib/System/vc7ldvrm.obj,
+ /NSIS/trunk/Contrib/System/vc7lmul.obj,
+ /NSIS/trunk/Contrib/System/vc7lshl.obj,
+ /NSIS/trunk/Contrib/System/vc7lshr.obj: Source files to Source
+ directory
-2002-11-11 kichik
+2002-10-31 14:43 joostverburg
- * Docs/src/history.but: IO flickering
+ * /NSIS/trunk/Contrib/System/Resource.dll,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Contrib/System/System.nsi,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Contrib/System/WhatsNew.txt: version 2 final
-2002-11-11 joostverburg
+2002-10-31 14:41 joostverburg
- * Contrib/Modern UI/System.nsh, Examples/Modern
- UI/InstallOptions.nsi: page sytem, io updates
+ * /NSIS/trunk/Contrib/System/Buffers.c,
+ /NSIS/trunk/Contrib/System/Buffers.h,
+ /NSIS/trunk/Contrib/System/Example.nsi,
+ /NSIS/trunk/Contrib/System/New System.txt,
+ /NSIS/trunk/Contrib/System/Plugin.c,
+ /NSIS/trunk/Contrib/System/Plugin.h,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.c,
+ /NSIS/trunk/Contrib/System/System.h,
+ /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Contrib/System/System.vcproj,
+ /NSIS/trunk/Plugins/System.dll: version 2 final
-2002-11-11 kichik
+2002-10-31 14:12 kichik
- * Source/script.cpp: Display the right number of expected
- parameters
+ * /NSIS/trunk/Docs/src/basic.but: Err... Bullet not number =/
-2002-11-11 kichik
+2002-10-31 14:11 kichik
- * Source/script.cpp, makensis.exe: Page ignores "" as a function
+ * /NSIS/trunk/Docs/src/basic.but: /a goes in both
-2002-11-11 kichik
+2002-10-31 14:00 kichik
- * Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp, Source/exehead/Ui.c, makensis.exe: Auto define
- of last page
+ * /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/build.bat:
+ ReserveFile and /nonfatal added.
+ License is the last appendix again.
-2002-11-11 kichik
+2002-10-30 18:17 kichik
- * Docs/src/credits.but: H not h
+ * /NSIS/trunk/Docs/src/usefulfunc.but: Some more useful functions
-2002-11-11 kichik
+2002-10-30 16:24 joostverburg
- * Contrib/StartMenu/Example.nsi, Contrib/StartMenu/Readme.txt,
- Contrib/StartMenu/StartMenu.c, Contrib/StartMenu/StartMenu.rc,
- Contrib/StartMenu/resource.h: Added /checknoshortcuts
+ * /NSIS/trunk/Contrib/Language files/French.nlf: ...
-2002-11-11 kichik
+2002-10-30 15:21 joostverburg
- * Contrib/Language files/Hebrew.nlf: Even better
+ * /NSIS/trunk/Docs/src/usefulfunc.but: spelling mistake
-2002-11-11 kichik
+2002-10-30 15:19 joostverburg
- * Source/exehead/Ui.c, makensis.exe: Now always unlocks the dialog
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/usefulfunc.but: functions
-2002-11-11 kichik
+2002-10-29 19:51 joostverburg
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/StartMenu/StartMenu.c, Source/exehead/Ui.c, makensis.exe:
- No more flickering
+ * /NSIS/trunk/Docs/src/basic.but: better RMDir documentation
-2002-11-11 kichik
+2002-10-29 18:55 joostverburg
- * Contrib/InstallOptions/test.ini, Contrib/InstallOptions/test.nsi:
- Caption for custom pages
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf: fixes
-2002-11-11 kichik
+2002-10-28 20:41 kichik
- * Docs/src/pages.but: Caption
+ * /NSIS/trunk/TODO.txt: History
-2002-11-11 kichik
+2002-10-28 18:24 joostverburg
- * Contrib/StartMenu/Example.nsi: No need for SendMessage, Page
- custom now does it
+ * /NSIS/trunk/TODO.txt: things to do
-2002-11-11 kichik
+2002-10-28 17:01 joostverburg
- * Source/build.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/exehead/Ui.c, Source/exehead/fileform.h: Caption parameter
- for custom pages
+ * /NSIS/trunk/Docs/src/attributes.but: CheckBitmap
-2002-11-11 kichik
+2002-10-28 16:40 joostverburg
- * Contrib/StartMenu/StartMenu.c: More space for q's
+ * /NSIS/trunk/Docs/src/script.but: plugins
-2002-11-11 joostverburg
+2002-10-28 16:32 joostverburg
- * Contrib/Modern UI/Language files/Spanish.nsh: updated translation
+ * /NSIS/trunk/Docs/src/usage.but: better info about using MakeNSIS
+ in explorer
-2002-11-10 eccles
+2002-10-27 22:05 joostverburg
- * Docs/src/build.bat: Oops, that shouldn't have been left in...
+ * /NSIS/trunk/Docs/src/flowcontrol.but: info about inner dialog
-2002-11-10 eccles
+2002-10-27 21:27 kichik
- * Docs/AppendixA.html, Docs/AppendixC.html, Docs/Chapter1.html,
- Docs/Chapter10.html, Docs/Chapter12.html, Docs/Chapter4.html,
- Docs/Chapter6.html, Docs/Chapter9.html, Docs/src/attributes.but,
- Docs/src/basic.but, Docs/src/build.bat, Docs/src/callback.but,
- Docs/src/compiler.but, Docs/src/compilerflags.but,
- Docs/src/credits.but, Docs/src/history.but, Docs/src/labels.but,
- Docs/src/pages.but, Docs/src/plugin.but, Docs/src/reboot.but,
- Docs/src/sections.but, Docs/src/stack.but, Docs/src/ui.but,
- Docs/src/usefulfunc.but: Spelling mistakes/typos
+ * /NSIS/trunk/Examples/makensis.nsi: ZIP2EXE description updated
-2002-11-10 kichik
+2002-10-27 21:20 kichik
- * Contrib/InstallOptions/InstallerOptions.cpp: Back button no
- longer enabled by default
+ * /NSIS/trunk/Examples/makensis.nsi: Fixed nsExec description
-2002-11-10 joostverburg
+2002-10-27 20:54 joostverburg
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/French.nsh: updated translation
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: fixes
-2002-11-10 joostverburg
+2002-10-27 20:52 joostverburg
- * Contrib/InstallOptions/test.nsi: InitPluginsDir
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/modernui.but: Modern UI appendix
-2002-11-10 joostverburg
+2002-10-27 20:48 kichik
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh,
- Contrib/Modern UI/Language files/Greek.nsh, Examples/Modern
- UI/InstallOptions.nsi: language file updates
+ * /NSIS/trunk/Docs/src/attributes.but: Made it clear that OutFile
+ can use a fully qualified path and not just an EXE name
-2002-11-09 joostverburg
+2002-10-27 19:48 joostverburg
- * Contrib/Modern UI/Language files/French.nsh: Start Menu selection
+ * /NSIS/trunk/Contrib/Modern UI/Changelog.txt: complete changelog
-2002-11-09 kichik
+2002-10-27 19:47 joostverburg
- * TODO.txt: Examples
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: fixes, full changelog
+ in Changelog.txt
-2002-11-09 kichik
+2002-10-27 19:15 joostverburg
- * makensis.exe: Little fix with the back button
+ * /NSIS/trunk/Docs/src/attributes.but: fixed ChangeUI info
-2002-11-09 kichik
+2002-10-27 17:48 kichik
- * Source/build.cpp: Back button disabled for pages after instfiles
+ * /NSIS/trunk/Docs/src/attributes.but: Added information about RTF
+ and fixed a glitch in UninstallText section
-2002-11-09 kichik
+2002-10-27 17:17 joostverburg
- * Docs/src/credits.but: Icons
+ * /NSIS/trunk/Examples/makensis.nsi: cleanup
-2002-11-09 kichik
+2002-10-27 17:10 joostverburg
- * Docs/src/credits.but: Credits
+ * /NSIS/trunk/Examples/makensis.nsi: compatible with new Modern UI
-2002-11-09 kichik
+2002-10-27 16:57 joostverburg
- * Examples/Modern UI/StartMenu.nsi: Uninstall shortcut too
+ * /NSIS/trunk/Docs/src/compilerflags.but: bzip2 is not larger
+ anymore
-2002-11-09 kichik
+2002-10-27 11:56 joostverburg
- * Contrib/Language files/Hebrew.nlf: Feature request 635981
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: !verbose 3 for cleaner
+ logs
-2002-11-09 joostverburg
+2002-10-27 11:28 joostverburg
- * Examples/Modern UI/StartMenu.nsi: deletes the reg value
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Language files/Hungarian.nlf,
+ /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Language files/Portuguese.nlf,
+ /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/Swedish.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Ukrainian.nlf: cleaned up
+ format, added spaces
-2002-11-09 joostverburg
+2002-10-26 22:12 joostverburg
- * Examples/Modern UI/StartMenu.nsi: new example: start menu folder
- selection
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: updated changelog
-2002-11-09 joostverburg
+2002-10-26 22:09 joostverburg
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/English.nsh, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi: initplugins, start menu
- folder selection, new paging system, fixes
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ioA.ini,
+ /NSIS/trunk/Examples/Modern UI/ioB.ini,
+ /NSIS/trunk/Examples/Modern UI/ioC.ini: new Install Options
+ read/write ini macro's
-2002-11-09 kichik
+2002-10-26 21:51 joostverburg
- * TODO.txt: More stuff to do
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: !verbose stuff
+ in System.nsh
-2002-11-09 kichik
+2002-10-26 21:50 joostverburg
- * Docs/src/history.but: ShowWin gone
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: some fixes
-2002-11-09 kichik
+2002-10-26 19:50 kichik
- * Docs/src/intro.but: Features updated
+ * /NSIS/trunk/Docs/src/license.but: Better looking license
-2002-11-09 kichik
+2002-10-26 19:23 kichik
- * makensis.exe: Latest stuff
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/int.but,
+ /NSIS/trunk/Docs/src/intro.but, /NSIS/trunk/Docs/src/log.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/registry.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/stack.but, /NSIS/trunk/Docs/src/string.but,
+ /NSIS/trunk/Docs/src/uninstall.but,
+ /NSIS/trunk/Docs/src/usection.but, /NSIS/trunk/Docs/src/var.but:
+ Features list updated, some links added and command parameters
+ are now shown alone with a light background behind them.
-2002-11-09 kichik
+2002-10-26 17:49 joostverburg
- * Source/tokens.cpp: InitPlugin*S*Dir
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added Italian
-2002-11-09 kichik
+2002-10-26 17:39 joostverburg
- * Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h: Made it so only one resource
- editor will be created instead of every time a resource editor is
- needed, and added InitPluginDir
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: macro system
+ updates
-2002-11-09 kichik
+2002-10-26 17:39 joostverburg
- * Source/build.cpp: Pretty summary
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: more info
-2002-11-09 kichik
+2002-10-26 17:06 joostverburg
- * Examples/makensis.nsi: Compiles again
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: bugs
+ corrected
-2002-11-09 kichik
+2002-10-26 16:11 kichik
- * Contrib/BgImage/BgImage.cpp, Contrib/BgImage/BgImage.dsp,
- Contrib/BgImage/exdll.h, Contrib/ExDLL/exdll.h,
- Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/test.nsi, Contrib/StartMenu/Example.nsi,
- Contrib/StartMenu/Readme.txt, Contrib/StartMenu/StartMenu.c,
- Contrib/StartMenu/StartMenu.dsp, Contrib/StartMenu/exdll.h,
- Docs/src/pages.but, Source/build.cpp, Source/exehead/Ui.c,
- makensis.exe: Even easier paging system, no more Abort and Quit
- from custom pages creator functions, NSIS does it all!
+ * /NSIS/trunk/Source/script.cpp: BrandingText /TRIM* "" will now
+ use the default string too
-2002-11-09 kichik
+2002-10-26 13:08 joostverburg
- * Contrib/StartMenu/Readme.txt, Contrib/StartMenu/StartMenu.c: now
- with /cancelconfirm
+ * /NSIS/trunk/Contrib/Language files/Ukrainian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Ukrainian.nsh: By
+ Yuri Holubow
-2002-11-09 kichik
+2002-10-26 13:06 joostverburg
- * Contrib/StartMenu/Example.nsi: Better back support
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added Ukrainian
-2002-11-09 kichik
+2002-10-26 12:30 joostverburg
- * TODO.txt: Lang docs done
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: some
+ fixes by sanface
-2002-11-08 joostverburg
+2002-10-26 12:25 joostverburg
- * Examples/makensis.nsi: new modern ui
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: macro system
+ updates
-2002-11-08 joostverburg
+2002-10-26 12:20 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Japanese.nsh, Contrib/Modern UI/Language
- files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh, Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi: Modern
- UI 1.5
+ * /NSIS/trunk/Docs/src/license.but: Spelling mistake
-2002-11-08 joostverburg
+2002-10-25 18:10 joostverburg
- * Contrib/Language files/Dutch.nlf: better translation
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: Fixed
+ by Scam
-2002-11-08 kichik
+2002-10-25 17:45 kichik
- * Examples/makensis.nsi: Plugins added, plugins removed,
- descriptions changed
+ * /NSIS/trunk/Contrib/System/Example.nsi,
+ /NSIS/trunk/Contrib/System/Example.txt: txt->nsi
-2002-11-08 kichik
+2002-10-24 21:32 joostverburg
- * Contrib/BgImage/BgImage.dsp: Output to ../../plugins
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: removed arabic
+ (combination of rtl and non-rtl not possible)
-2002-11-08 kichik
+2002-10-24 21:02 kichik
- * Contrib/BgImage/BgImage.cpp, Contrib/BgImage/BgImage.dsp,
- Contrib/BgImage/BgImage.dsw, Contrib/BgImage/BgImage.txt,
- Contrib/BgImage/exdll.h: Persistent background image plugin
+ * /NSIS/trunk/Source/lang.cpp: English is no longer always created
-2002-11-08 kichik
+2002-10-24 11:56 joostverburg
- * Docs/src/history.but: Plugins added
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf: fixed accelerator
+ key
-2002-11-08 kichik
+2002-10-23 18:00 joostverburg
- * Docs/src/langs.but: NSIS multiple languages capabilities
- documentation
+ * /NSIS/trunk/Examples/makensis.nsi: new system plugin
-2002-11-08 kichik
+2002-10-23 17:53 joostverburg
- * Contrib/NSISdl/nsisdl.cpp: Resize according to NSIS dialog
+ * /NSIS/trunk/Contrib/System/Buffers.c,
+ /NSIS/trunk/Contrib/System/Buffers.h,
+ /NSIS/trunk/Contrib/System/Example.txt,
+ /NSIS/trunk/Contrib/System/New System.txt,
+ /NSIS/trunk/Contrib/System/Plugin.c,
+ /NSIS/trunk/Contrib/System/Plugin.h,
+ /NSIS/trunk/Contrib/System/SysFunc.nsh,
+ /NSIS/trunk/Contrib/System/System.c,
+ /NSIS/trunk/Contrib/System/System.h,
+ /NSIS/trunk/Contrib/System/System.ncb,
+ /NSIS/trunk/Contrib/System/System.nsh,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Contrib/System/System.vcproj,
+ /NSIS/trunk/Contrib/System/vc7ldvrm.obj,
+ /NSIS/trunk/Contrib/System/vc7lmul.obj,
+ /NSIS/trunk/Contrib/System/vc7lshl.obj,
+ /NSIS/trunk/Contrib/System/vc7lshr.obj,
+ /NSIS/trunk/Contrib/System/WhatsNew.txt,
+ /NSIS/trunk/Plugins/System.dll: new system plugin
-2002-11-08 kichik
+2002-10-23 17:38 joostverburg
- * Contrib/NSISdl/ReadMe.txt: dl not dll
+ * /NSIS/trunk/Contrib/Language files/PortugueseBR.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/PortugueseBR.nsh: By
+ Layout do Brasil
-2002-11-08 kichik
+2002-10-23 17:32 joostverburg
- * Contrib/StartMenu/Example.nsi, Contrib/StartMenu/Readme.txt,
- Contrib/StartMenu/exdll.h, Contrib/StartMenu/StartMenu.c,
- Contrib/StartMenu/StartMenu.dsp, Contrib/StartMenu/StartMenu.dsw,
- Contrib/StartMenu/resource.h, Contrib/StartMenu/StartMenu.rc:
- StartMenu.dll, lets the user select the start menu folder
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: updated
+ LANGNAME
-2002-11-08 kichik
+2002-10-23 17:32 joostverburg
- * Contrib/Splash/splash.txt: DLL not EXE
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: some new
+ languages
-2002-11-08 kichik
+2002-10-23 15:42 joostverburg
- * makensis.exe: Latest stuff
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: accelerator keys
-2002-11-08 kichik
+2002-10-23 15:39 joostverburg
- * Source/script.cpp: Warning about misused /NOUNLOAD
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Italian.nsh: By
+ sanface
-2002-11-08 kichik
+2002-10-23 15:37 joostverburg
- * Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/InstallerOptions.cpp: Doesn't crash if
- initDialog is called without /NOUNLOAD.
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh: By
+ Makidis N. Mike
-2002-11-08 kichik
+2002-10-23 15:35 joostverburg
- * Source/exehead/exec.c: Oops... WriteIniStr now writes again
+ * /NSIS/trunk/Contrib/Language files/Arabic.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Arabic.nsh: By
+ asdfuae
-2002-11-08 kichik
+2002-10-23 15:30 joostverburg
- * Docs/src/usefulfunc.but: Forgotten D re-added
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Russian.nsh: By Nik
+ Medved
-2002-11-08 kichik
+2002-10-20 17:27 kichik
- * Docs/src/compilerflags.but: Some more bold defaults
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ File /nonfatal option added
-2002-11-07 kichik
+2002-10-19 12:02 kichik
- * Contrib/nsExec/test.nsi: Reading output to a variable example
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/Ui.c:
+ Hidden sections can now have SectionIn too. Old behaviour
+ retained (hidden sections without SectionIn are in all install
+ types).
-2002-11-07 kichik
+2002-10-19 11:42 kichik
- * Source/exehead/exec.c: WriteIniStr flushing enabled
+ * /NSIS/trunk/Source/script.cpp: Plugin calls no longer adds size
+ to the section containing them. They are temporary files and
+ shouldn't add size.
-2002-11-07 kichik
+2002-10-18 21:54 joostverburg
- * makensis.exe: Button texts fixes
+ * /NSIS/trunk/Contrib/Modern UI/Readme.html: updated changelog
-2002-11-07 kichik
+2002-10-17 21:53 joostverburg
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/script.cpp: Install and next button texts should always be
- added when needed now.
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new system
-2002-11-07 kichik
+2002-10-17 21:41 joostverburg
- * Source/build.cpp: Shows the license button even when no page are
- between the license page and the install log page.
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: forgot to remove some
+ old stuff
-2002-11-07 joostverburg
+2002-10-17 21:22 joostverburg
- * Docs/AppendixC.html, Docs/src/usefulfunc.but: upgradedll: new
- command on two lines
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi: easier to use for basic
+ scripts
-2002-11-06 rainwater
+2002-10-17 19:58 kichik
- * Docs/AppendixA.html, Docs/Chapter10.html, Docs/Chapter11.html,
- Docs/Chapter12.html, Docs/Chapter3.html, Docs/Chapter4.html,
- Docs/Chapter5.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/Chapter13.html, Docs/index.html, Docs/Chapter14.html,
- Docs/Chapter15.html, Docs/Chapter16.html, Docs/Chapter17.html,
- Docs/Chapter18.html, Docs/Chapter19.html, Docs/Chapter20.html,
- Docs/Chapter21.html, Docs/Chapter22.html, Docs/Chapter23.html,
- Docs/Chapter24.html, Docs/Chapter25.html, Docs/Chapter26.html,
- Docs/Chapter27.html, Docs/Chapter28.html, Docs/src/attributes.but,
- Docs/src/basic.but, Docs/src/build.bat, Docs/src/compilerflags.but,
- Docs/src/config.but, Docs/src/file.but, Docs/src/flowcontrol.but,
- Docs/src/generalpurpose.but, Docs/src/int.but, Docs/src/log.but,
- Docs/src/misc.but, Docs/src/pages.but, Docs/src/reboot.but,
- Docs/src/registry.but, Docs/src/sec.but, Docs/src/sections.but,
- Docs/src/stack.but, Docs/src/string.but, Docs/src/uninstall.but,
- Docs/src/bin/halibut/bk_xhtml.c, Docs/src/bin/halibut.exe,
- Docs/Chapter6.html, Docs/src/ui.but: Updated docs
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp:
+ !ifdef/!ifndef can now be used in macros too
-2002-11-06 joostverburg
+2002-10-17 17:45 kichik
- * Docs/AppendixC.html, Docs/src/usefulfunc.but: upgradedll: better
- dll registration on reboot
+ * /NSIS/trunk/Source/script.cpp: XPStyle off now reomves the XP
+ manifest instead of assuming it wasn't added before and doing
+ nothing
-2002-11-06 kichik
+2002-10-17 16:37 kichik
- * Contrib/UserInfo/UserInfo.nsi: Better example
+ * /NSIS/trunk/Examples/makensis.nsi: Indenting
-2002-11-06 joostverburg
+2002-10-17 16:22 rainwater
- * Contrib/Modern UI/Language files/English.nsh: fixed Uninstaller
- caption (other language files will be fixed later)
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: dns changes
-2002-11-06 joostverburg
+2002-10-17 01:42 rainwater
- * Examples/makensis.nsi: new Modern UI
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: memory sucks
-2002-11-05 kichik
+2002-10-17 01:40 rainwater
- * Source/exehead/Ui.c: Bug #623117 fixed
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Different user
+ message if update check failed.
-2002-11-05 joostverburg
+2002-10-17 01:26 rainwater
- * Contrib/Modern UI/Readme.html: MUI_UNINSTALLER
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h: Update check now uses
+ its own thread. The messagebox is now modal. Also checks for
+ alphas/betas. Adds new version string to messagebox.
-2002-11-05 joostverburg
+2002-10-16 18:21 joostverburg
- * Contrib/Modern UI/System.nsh: moved !ifdef
+ * /NSIS/trunk/Examples/makensis.nsi: compatible with new modern ui
-2002-11-05 kichik
+2002-10-16 17:42 rainwater
- * Contrib/UIs/sdbarker_tiny.exe: Hope this one won't be corrupted
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Update check uses IE's
+ proxy settings
-2002-11-05 kichik
+2002-10-16 17:31 rainwater
- * Contrib/UIs/sdbarker_tiny.exe: Corrupted
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Now clear log window
+ really clears the log window
-2002-11-05 kichik
+2002-10-16 17:21 rainwater
- * Contrib/UIs/sdbarker_tiny.exe: Lets hope it is not corrupted this
- time
+ * /NSIS/trunk/Contrib/Makensisw/jnetlib,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/asyncdns.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/asyncdns.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/connection.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/connection.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/httpget.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/httpget.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/netinc.h,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/util.cpp,
+ /NSIS/trunk/Contrib/Makensisw/jnetlib/util.h,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: New makensisw update
+ system
-2002-11-05 kichik
+2002-10-16 16:57 kichik
- * Source/script.cpp: Can't use !macro inside !macro
+ * /NSIS/trunk/Docs/src/generalpurpose.but: Now sets the error flag
+ if DllRegisterServer fails (Bugs item #624176)
-2002-11-05 kichik
+2002-10-16 16:51 kichik
- * Contrib/Modern UI/System.nsh: No need for uninstaller macros if
- we have no uninstaller
+ * /NSIS/trunk/Source/exehead/exec.c: Now sets the error flag if
+ DllRegisterServer fails (Bugs item #624176)
-2002-11-05 kichik
+2002-10-16 13:20 joostverburg
- * Docs/src/callback.but: Typos
+ * /NSIS/trunk/Contrib/Language files/German.nlf: better translation
-2002-11-05 kichik
+2002-10-15 20:55 joostverburg
- * Docs/src/pages.but: Same page, many times
+ * /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh:
+ accelerator keys
-2002-11-05 kichik
+2002-10-15 20:09 joostverburg
- * Source/ResourceEditor.cpp, Source/ResourceEditor.h,
- Source/build.h, Source/lang.cpp, Source/lang.h: WORD->LANGID
+ * /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh:
+ accelerator keys
-2002-11-05 kichik
+2002-10-15 19:37 joostverburg
- * Contrib/UIs/sdbarker_tiny.exe: [no log message]
+ * /NSIS/trunk/Contrib/Language files/English.nlf: typo
-2002-11-04 kichik
+2002-10-15 19:05 joostverburg
- * Source/script.cpp: Using ChangeUI twice, where the first UI has a
- branding image and the second doesn't, still made SetBrandingImage
- think there is really a branding image. Fixed.
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh:
+ accelerator keys
-2002-11-04 joostverburg
+2002-10-15 19:02 joostverburg
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi:
- language macro
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: uses more
+ LANGNAME's
-2002-11-04 kichik
+2002-10-15 18:54 joostverburg
- * Docs/Chapter6.html, Docs/src/pages.but, Source/tokens.cpp: Page,
- UninstPage usage line improvement
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh: added
+ LANGNAME
-2002-11-04 kichik
+2002-10-15 18:44 joostverburg
- * Contrib/InstallOptions/Install Options.html: Dates fixed
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Source/lang.cpp: accelerator keys
-2002-11-04 kichik
+2002-10-15 18:43 joostverburg
- * Contrib/InstallOptions/Install Options.html: Updated docs
+ * /NSIS/trunk/Docs/src/history.but: changelog updates
-2002-11-04 kichik
+2002-10-15 18:37 joostverburg
- * Contrib/UserInfo/UserInfo.c, Contrib/UserInfo/UserInfo.nsi:
- GetAccountType instead of GetGroup
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh:
+ accelerator keys
-2002-11-04 kichik
+2002-10-15 18:28 joostverburg
- * Contrib/UserInfo/UserInfo.c, Contrib/UserInfo/UserInfo.dsp,
- Contrib/UserInfo/UserInfo.dsw, Contrib/UserInfo/UserInfo.nsi:
- UserInfo DLL to get user group and name
+ * /NSIS/trunk/Contrib/Language files/English.nlf: fixed browse
+ accelerator key
-2002-11-04 joostverburg
+2002-10-15 18:04 kichik
- * Examples/Modern UI/InstallOptions.nsi: right position for .onInit
+ * /NSIS/trunk/Docs/src/attributes.but: Some fixes
-2002-11-04 rainwater
+2002-10-15 17:52 rainwater
- * Docs/Chapter7.html, Docs/src/sections.but: section typo (bug
- #633265)
+ * /NSIS/trunk/Docs/src/attributes.but: /LANG goes first in
+ LicenseText
-2002-11-04 joostverburg
+2002-10-15 17:49 joostverburg
- * Contrib/Modern UI/Readme.html: update
+ * /NSIS/trunk/Contrib/Language files/English.nlf: some more hotkeys
-2002-11-04 joostverburg
+2002-10-15 17:48 joostverburg
- * Contrib/Modern UI/Readme.html: width fixed
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: FONT parameter for
+ MUI_INTERFACE_ABSOLUTEPATH macro
-2002-11-04 joostverburg
+2002-10-15 17:45 joostverburg
- * Contrib/Modern UI/Readme.html: more info
+ * /NSIS/trunk/Contrib/Language files/English.nlf: hotkeys
-2002-11-04 joostverburg
+2002-10-15 14:48 joostverburg
- * Examples/Modern UI/InstallOptions.nsi: comment
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh:
+ better translation
-2002-11-04 joostverburg
+2002-10-14 19:07 kichik
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Japanese.nsh, Contrib/Modern UI/Language
- files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh, Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi: macro
- system updates
+ * /NSIS/trunk/Contrib/Language files/Hebrew.nlf: Hebrew NLF. RTL
+ isn't perfect yet, so it's not really usable :)
-2002-11-04 joostverburg
+2002-10-14 15:52 joostverburg
- * Contrib/Modern UI/Readme.html: more info
+ * /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.rc: larger buttons
-2002-11-03 joostverburg
+2002-10-14 15:44 joostverburg
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Modern
- UI/Language files/Dutch.nsh, Contrib/Modern UI/Language
- files/English.nsh, Contrib/Modern UI/Language files/French.nsh,
- Contrib/Modern UI/Language files/German.nsh, Contrib/Modern
- UI/Language files/Greek.nsh, Contrib/Modern UI/Language
- files/Italian.nsh, Contrib/Modern UI/Language files/Japanese.nsh,
- Contrib/Modern UI/Language files/Polish.nsh, Contrib/Modern
- UI/Language files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: 'Browse for Folder' text fixed
+ * /NSIS/trunk/Contrib/UIs/default.exe: larger 'browse' and 'show
+ details' buttons
-2002-11-03 joostverburg
+2002-10-14 13:37 joostverburg
- * Contrib/Modern UI/Changelog.txt: date
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: 'show details' button a bit
+ larger
-2002-11-03 joostverburg
+2002-10-14 12:47 joostverburg
- * Contrib/Modern UI/Readme.html, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi: update
+ * /NSIS/trunk/Contrib/Language files/German.nlf: better translation
-2002-11-03 joostverburg
+2002-10-13 20:40 joostverburg
- * Contrib/Modern UI/System.nsh: fixes
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh: new
+ format
-2002-11-03 joostverburg
+2002-10-13 20:30 joostverburg
- * Examples/makensis.nsi: new modern ui
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh: new
+ format
-2002-11-03 joostverburg
+2002-10-13 19:33 joostverburg
- * Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi: macro system updates
+ * /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh: new
+ format
-2002-11-03 joostverburg
+2002-10-13 19:17 joostverburg
- * Contrib/Modern UI/System.nsh, Examples/Modern
- UI/InstallOptions.nsi: macro system updates
+ * /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh: new
+ format
-2002-11-03 joostverburg
+2002-10-13 18:48 joostverburg
- * Contrib/Modern UI/System.nsh, Examples/Modern
- UI/InstallOptions.nsi: macro system updates
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh: new
+ format
-2002-11-03 joostverburg
+2002-10-13 18:28 joostverburg
- * Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/MultiLanguage.nsi: abortwarning in basic macro
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: ABORTWARNING
+ uses a define too
-2002-11-03 joostverburg
+2002-10-13 18:25 joostverburg
- * Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi: macro system updates
+ * /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: better usage
+ of defines, no more wasted space for unused LangStrings
-2002-11-02 kichik
+2002-10-13 18:18 kichik
- * Docs/AppendixA.html, Docs/src/history.but: Fixed version history
- of v2.0a2
+ * /NSIS/trunk/Contrib/Modern UI/Language files/System.nsh:
+ Shouldn't be here
-2002-11-02 joostverburg
+2002-10-12 19:26 kichik
- * Contrib/Modern UI/System.nsh: no currentpage var anymore
+ * /NSIS/trunk/Examples/makensis.nsi: Language files now go to the
+ right directory
-2002-11-02 kichik
+2002-10-12 18:53 joostverburg
- * Contrib/Modern UI/Language files/Ukrainian.nsh: r
+ * /NSIS/trunk/Docs/src/history.but: updated changelog
-2002-11-02 kichik
+2002-10-12 18:46 joostverburg
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: Combo box now
- shows on Windows 9x
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: new modern ui icon
+ name
-2002-11-02 joostverburg
+2002-10-12 18:37 joostverburg
- * Contrib/Language files/German.nlf: better translation
+ * /NSIS/trunk/Contrib/Icons/adni18-installer-C-no48xp.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-uninstall-C-no48xp.ico: new name
+ for modern ui icons
-2002-11-02 joostverburg
+2002-10-12 18:34 joostverburg
- * Examples/makensis.nsi: System plugin directory
+ * /NSIS/trunk/Contrib/Icons/modern-install.ico,
+ /NSIS/trunk/Contrib/Icons/modern-uninstall.ico: shorter name for
+ modern icons
-2002-11-02 joostverburg
+2002-10-12 18:33 joostverburg
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/MultiLanguage.nsi: no currentpage var anymore
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new icon name,
+ font in MUI_INTERFACE macro
-2002-11-02 joostverburg
+2002-10-12 18:30 joostverburg
- * Contrib/Modern UI/Language files/Polish.nsh: Polski
+ * /NSIS/trunk/Contrib/Modern UI/System.nsh: font can be set using
+ MUI_INTERFACE macro
-2002-11-02 joostverburg
+2002-10-12 18:30 joostverburg
- * Contrib/InstallOptions/test.nsi: fixes, comments, ReserveFile
+ * /NSIS/trunk/Examples/makensis.nsi: ui updates
-2002-11-02 kichik
+2002-10-12 17:08 kichik
- * Contrib/Modern UI/System.nsh: !macro MUI_INTERFACE_ALLRES
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h: 32 bytes down
-2002-11-02 kichik
+2002-10-12 16:16 kichik
- * Contrib/Modern UI/System.nsh: Some !ifdefs
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: License.txt
+ path changed
-2002-11-02 rainwater
+2002-10-12 16:02 joostverburg
- * Docs/src/bin/halibut/makefile: let's not remove the old exe
+ * /NSIS/trunk/Examples/makensis.nsi: new location of Modern UI
+ files
-2002-11-02 rainwater
+2002-10-12 15:57 joostverburg
- * Docs/Chapter4.html, Docs/src/attributes.but: added checkbitmap
- parameter
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: new location
+ of language files
-2002-11-02 rainwater
+2002-10-12 15:47 joostverburg
- * Docs/style.css: updated style. probably ugly as hell.
+ * /NSIS/trunk/Contrib/Modern UI/License.txt,
+ /NSIS/trunk/Contrib/Modern UI/Readme.html,
+ /NSIS/trunk/Contrib/Modern UI/Readme.jpg,
+ /NSIS/trunk/Contrib/Modern UI/Screenshot.png,
+ /NSIS/trunk/Examples/Modern UI/License.txt,
+ /NSIS/trunk/Examples/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/Readme.jpg,
+ /NSIS/trunk/Examples/Modern UI/Screenshot.png: moved Modern UI
+ docs to Contrib\Modern UI
-2002-11-02 rainwater
+2002-10-12 15:36 joostverburg
- * Docs/AppendixC.html, Docs/Chapter10.html, Docs/Chapter11.html,
- Docs/Chapter12.html, Docs/Chapter13.html, Docs/Chapter14.html,
- Docs/Chapter15.html, Docs/Chapter16.html, Docs/Chapter17.html,
- Docs/Chapter18.html, Docs/Chapter19.html, Docs/Chapter20.html,
- Docs/Chapter23.html, Docs/Chapter25.html, Docs/Chapter26.html,
- Docs/Chapter28.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/style.css, Docs/src/bin/halibut/bk_xhtml.c,
- Docs/src/bin/halibut.exe: last update
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: new location of
+ language files
-2002-11-02 rainwater
+2002-10-12 15:33 joostverburg
- * Docs/AppendixC.html, Docs/Chapter10.html, Docs/Chapter11.html,
- Docs/Chapter12.html, Docs/Chapter13.html, Docs/Chapter14.html,
- Docs/Chapter15.html, Docs/Chapter16.html, Docs/Chapter17.html,
- Docs/Chapter18.html, Docs/Chapter19.html, Docs/Chapter20.html,
- Docs/Chapter23.html, Docs/Chapter25.html, Docs/Chapter26.html,
- Docs/Chapter28.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/bin/halibut/bk_xhtml.c,
- Docs/src/bin/halibut.exe: updateeeeeeeeeeeeee
+ * /NSIS/trunk/Contrib/Modern UI/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/System.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Language files/TradChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Polish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Spanish.nsh,
+ /NSIS/trunk/Contrib/Modern UI/TradChinese.nsh: Modern UI Language
+ Files moved to Contrib\Modern UI\Language files
-2002-11-02 joostverburg
+2002-10-12 15:20 joostverburg
- * makensis.exe: GetDLLVersionLocal fixed
+ * /NSIS/trunk/Examples/Modern UI/Screenshot.png: white bg
-2002-11-02 rainwater
+2002-10-12 15:14 joostverburg
- * Docs/AppendixC.html, Docs/Chapter25.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html,
- Docs/src/bin/halibut/bk_xhtml.c, Docs/src/bin/halibut.exe: another
- update
+ * /NSIS/trunk/Examples/Modern UI/Screenshot.png: nicer screenshot
-2002-11-02 rainwater
+2002-10-11 18:31 joostverburg
- * Docs/AppendixC.html, Docs/Chapter10.html, Docs/Chapter11.html,
- Docs/Chapter12.html, Docs/Chapter13.html, Docs/Chapter14.html,
- Docs/Chapter15.html, Docs/Chapter16.html, Docs/Chapter17.html,
- Docs/Chapter18.html, Docs/Chapter19.html, Docs/Chapter20.html,
- Docs/Chapter23.html, Docs/Chapter25.html, Docs/Chapter26.html,
- Docs/Chapter28.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/bin/halibut/bk_xhtml.c: Updated docs
- again
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: LANGNAME for
+ Greek
-2002-11-02 kichik
+2002-10-11 18:28 joostverburg
- * Source/script.cpp: GetDLLVersionLocal now always first looks in
- the current directory
+ * /NSIS/trunk/Contrib/Modern UI/Greek.nsh: added LANGNAME
-2002-11-02 rainwater
+2002-10-11 17:47 joostverburg
- * Docs/src/bin/halibut.exe: updated
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: uses LANGNAME's
+ (some language files have not been updated yet)
-2002-11-02 rainwater
+2002-10-11 17:41 joostverburg
- * Docs/Chapter28.html: update
+ * /NSIS/trunk/Contrib/Modern UI/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Spanish.nsh: added LANGNAME
-2002-11-02 rainwater
+2002-10-11 13:43 rainwater
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/AppendixC.html,
- Docs/AppendixD.html, Docs/Chapter1.html, Docs/Chapter10.html,
- Docs/Chapter11.html, Docs/Chapter12.html, Docs/Chapter13.html,
- Docs/Chapter14.html, Docs/Chapter15.html, Docs/Chapter16.html,
- Docs/Chapter17.html, Docs/Chapter18.html, Docs/Chapter19.html,
- Docs/Chapter2.html, Docs/Chapter20.html, Docs/Chapter21.html,
- Docs/Chapter22.html, Docs/Chapter23.html, Docs/Chapter24.html,
- Docs/Chapter25.html, Docs/Chapter26.html, Docs/Chapter27.html,
- Docs/Chapter3.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/bin/halibut/bk_xhtml.c: Different linkage
- on the index page
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: typo
-2002-11-02 rainwater
+2002-10-11 13:38 rainwater
- * Docs/src/build.bat: no need to delete help files and text files
- anymore
-
-2002-11-01 rainwater
-
- * Docs/src/bin/halibut.exe: updated
-
-2002-11-01 rainwater
-
- * Docs/src/bin/halibut/makefile, Docs/src/bin/halibut/winhelp.c,
- Docs/src/bin/halibut/winhelp.h: Remove winhelp module
-
-2002-11-01 rainwater
-
- * Docs/src/bin/halibut/LICENCE, Docs/src/bin/halibut/biblio.c,
- Docs/src/bin/halibut/bk_xhtml.c, Docs/src/bin/halibut/contents.c,
- Docs/src/bin/halibut/error.c, Docs/src/bin/halibut/halibut.h,
- Docs/src/bin/halibut/help.c, Docs/src/bin/halibut/index.c,
- Docs/src/bin/halibut/input.c, Docs/src/bin/halibut/keywords.c,
- Docs/src/bin/halibut/licence.c, Docs/src/bin/halibut/main.c,
- Docs/src/bin/halibut/makefile, Docs/src/bin/halibut/malloc.c,
- Docs/src/bin/halibut/misc.c, Docs/src/bin/halibut/tree234.c,
- Docs/src/bin/halibut/bk_text.c, Docs/src/bin/halibut/bk_whlp.c,
- Docs/src/bin/halibut/tree234.h, Docs/src/bin/halibut/ustring.c,
- Docs/src/bin/halibut/winhelp.c, Docs/src/bin/halibut/winhelp.h,
- Docs/src/bin/halibut.exe: removed text and help file backends;
- added some usage crap and removed the help command line optin(who
- needs that)
-
-2002-11-01 joostverburg
-
- * TODO.txt: bold defaults: done
-
-2002-11-01 joostverburg
-
- * Examples/makensis.nsi: new Modern UI version
-
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Added a Check for Update
+ command
- * Contrib/InstallOptions/test.ini, Contrib/InstallOptions/test.nsi:
- new Page system
+2002-10-11 13:20 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added polish,
+ languages shown in orginal language
- * Contrib/Modern UI/Changelog.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh, Contrib/Modern UI/Language files/Japanese.nsh,
- Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/ioA.ini, Examples/Modern UI/ioB.ini,
- Examples/Modern UI/ioC.ini: Modern UI 1.4
+2002-10-11 13:17 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf: added spaces
- * Contrib/Language files/Japanese.nlf: By Dnanako
+2002-10-11 13:12 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Language files/Polish.nlf,
+ /NSIS/trunk/Contrib/Modern UI/Polish.nsh: By Piotr Murawski &
+ Rafaֲ³ Lampe
- * makensis.exe: New paging system. All scripts must be updated, but
- it sure is worth it.
+2002-10-11 12:31 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Spanish.nsh: By MoNKi
- * Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/io.dsp, Docs/AppendixA.html,
- Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- Docs/Chapter1.html, Docs/Chapter10.html, Docs/Chapter11.html,
- Docs/Chapter12.html, Docs/Chapter13.html, Docs/Chapter14.html,
- Docs/Chapter15.html, Docs/Chapter16.html, Docs/Chapter17.html,
- Docs/Chapter18.html, Docs/Chapter19.html, Docs/Chapter2.html,
- Docs/Chapter20.html, Docs/Chapter21.html, Docs/Chapter22.html,
- Docs/Chapter23.html, Docs/Chapter24.html, Docs/Chapter25.html,
- Docs/Chapter26.html, Docs/Chapter27.html, Docs/Chapter28.html,
- Docs/Chapter3.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/attributes.but, Docs/src/build.bat,
- Docs/src/callback.but, Docs/src/flowcontrol.but,
- Docs/src/history.but, Docs/src/misc.but, Docs/src/pages.but,
- Examples/gfx.nsi, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/lang.h, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/lang.h,
- Source/exehead/ui.h: New paging system. All scripts must be
- updated, but it sure is worth it. InstallOptions has two new
- functions initDialog and show. Docs massively updated.
+2002-10-11 11:39 kichik
-2002-11-01 rainwater
+ * /NSIS/trunk/Contrib/LangDLL/resource.rc,
+ /NSIS/trunk/Plugins/LangDLL.dll: Made room for 3 lines of text
+ (bug report #621273)
- * Docs/src/attributes.but: typo
+2002-10-10 21:19 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: changed size of 'available
+ space' text box
- * Docs/src/bin/halibut/biblio.c, Docs/src/bin/halibut/bk_text.c,
- Docs/src/bin/halibut/bk_whlp.c, Docs/src/bin/halibut/bk_xhtml.c,
- Docs/src/bin/halibut/contents.c, Docs/src/bin/halibut/error.c,
- Docs/src/bin/halibut/halibut.h, Docs/src/bin/halibut/help.c,
- Docs/src/bin/halibut/index.c, Docs/src/bin/halibut/input.c,
- Docs/src/bin/halibut/LICENCE, Docs/src/bin/halibut/keywords.c,
- Docs/src/bin/halibut/licence.c, Docs/src/bin/halibut/main.c,
- Docs/src/bin/halibut/makefile, Docs/src/bin/halibut/malloc.c,
- Docs/src/bin/halibut/misc.c, Docs/src/bin/halibut/style.c,
- Docs/src/bin/halibut/tree234.c, Docs/src/bin/halibut/tree234.h,
- Docs/src/bin/halibut/ustring.c, Docs/src/bin/halibut/version.c,
- Docs/src/bin/halibut/winhelp.c, Docs/src/bin/halibut/winhelp.h:
- Hacked up halibut source code
+2002-10-10 21:15 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: InstType text
- * Docs/src/attributes.but: updates
+2002-10-10 20:31 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/German.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/SimpChinese.nsh,
+ /NSIS/trunk/Contrib/Modern UI/TradChinese.nsh: ComponentText
+ fixed
- * Docs/src/history.but: updated changelog
+2002-10-10 20:26 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: updated langdll
+ calling
- * Docs/src/intro.but: listitems fixed
+2002-10-10 20:17 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added trad/simp
+ chinese
- * Docs/src/bin/halibut.exe: HTML now really works in \c
+2002-10-10 20:08 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: text area on folder
+ selection dialog bigger
- * Docs/src/modernui.but, Docs/src/log.but: fixes
+2002-10-10 19:47 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/SimpChinese.nsh: By Hotice
- * Docs/src/bin/halibut.exe: doesn't crash
+2002-10-10 19:44 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/TradChinese.nsh: update
- * Docs/src/bin/halibut.exe: \\ works again
+2002-10-10 00:20 rainwater
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Makensisw/logo.bmp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt: Minor logo.bmp update;
+ Small docs updates
- * Docs/src/bin/halibut.exe: HTML in \c
+2002-10-09 21:32 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Greek.nsh: name back in license
+ page info-text
- * Docs/src/usefulfunc.but: UpgradeDLL fixes
+2002-10-09 20:48 rainwater
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Forgot to add g_dwLength
+ to NSCRIPTDATA
- * Docs/src/config.but: More depth
+2002-10-09 20:41 rainwater
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Makensisw/logo.bmp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Alternate doc path
+ points to docs on nsis.sf.net not cvs; Use smaller logo.bmp;
+ Removed background color code from about dialog; Stupid typo in
+ about box (thanks joost); Created some structs for globals
- * Docs/src/intro.but: Same as teh html
+2002-10-09 20:29 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/Greek.nsh,
+ /NSIS/trunk/Contrib/Modern UI/TradChinese.nsh: info-text on
+ license page updated
- * Docs/Chapter1.html: Trade mark and nested lists
+2002-10-09 17:38 rainwater
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Makensisw/logo.bmp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Added link to
+ developer site
- * Docs/src/bin/halibut.exe: \\ for esacping &, ", < and >
+2002-10-09 17:11 rainwater
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/logo.bmp,
+ /NSIS/trunk/Contrib/Makensisw/logo.psp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp,
+ /NSIS/trunk/Examples/makensis.nsi: Added new About dialog
- * Examples/functions.htm: removed (in the docs now)
+2002-10-09 15:34 rainwater
-2002-11-01 kichik
+ * /NSIS/trunk/Docs/src/string.but: String Functions is a chapter
- * Docs/src/history.but: Escaped
+2002-10-09 14:30 joostverburg
-2002-11-01 rainwater
+ * /NSIS/trunk/Contrib/Modern UI/English.nsh: changed component page
+ subtitle
- * Docs/src/bin/halibut.exe: New modified halibut by kichik
+2002-10-09 14:22 joostverburg
-2002-11-01 kichik
+ * /NSIS/trunk/Contrib/Modern UI/TradChinese.nsh: translation by
+ Yi-Ting Cheng
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/NSISdl/nsisdl.cpp: Fixed a bug with HTTP proxy detection -
- Joost can finally use NSIS-dl :D
+2002-10-09 14:19 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/German.nsh: updated license-info
+ texts
- * Contrib/Modern UI/Language files/Russian.nsh: fixes
+2002-10-09 14:19 joostverburg
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: changed 'I Agree'
+ button text again
- * Docs/AppendixC.html, Docs/src/usefulfunc.but: fixes for filenames
- with spaces
+2002-10-09 14:09 rainwater
-2002-11-01 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Added Browse Script
+ (Ctrl+B)
- * Contrib/System/SysFunc.nsh, Contrib/System/System.nsi: directory
- fixes
+2002-10-09 13:21 rainwater
-2002-10-31 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Removed "About NSIS"
+ dialog
- * Docs/AppendixC.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html: more useful functions
+2002-10-09 12:51 rainwater
-2002-10-31 kichik
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: No more GetMenu calls.
- * Docs/AppendixA.html, Docs/Chapter7.html, TODO.txt,
- Docs/src/basic.but, Docs/src/history.but: History completed!
- FINALLY!!! :D
+2002-10-09 12:43 rainwater
-2002-10-31 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Copy menu item is
+ now disabled if no text is selected. Also, the context menu is
+ now using the same instance of the Edit menu not just a copy.
- * Contrib/System/Source/Buffers.c, Contrib/System/Source/Buffers.h,
- Contrib/System/Source/Plugin.c, Contrib/System/Source/Plugin.h,
- Contrib/System/Source/System.c, Contrib/System/Source/System.h,
- Contrib/System/Source/System.sln,
- Contrib/System/Source/System.vcproj,
- Contrib/System/Source/stdafx.c, Contrib/System/Source/stdafx.h,
- Contrib/System/Source/vc7ldvrm.obj,
- Contrib/System/Source/vc7lmul.obj,
- Contrib/System/Source/vc7lshl.obj,
- Contrib/System/Source/vc7lshr.obj, Contrib/System/Buffers.c,
- Contrib/System/Buffers.h, Contrib/System/Plugin.c,
- Contrib/System/Plugin.h, Contrib/System/System.c,
- Contrib/System/System.h, Contrib/System/System.sln,
- Contrib/System/System.vcproj, Contrib/System/stdafx.c,
- Contrib/System/stdafx.h, Contrib/System/vc7ldvrm.obj,
- Contrib/System/vc7lmul.obj, Contrib/System/vc7lshl.obj,
- Contrib/System/vc7lshr.obj: Source files to Source directory
+2002-10-09 06:31 joostverburg
-2002-10-31 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/German.nsh: no quotes around button
+ names (like other modern ui translations)
- * Contrib/System/Buffers.c, Contrib/System/Buffers.h,
- Contrib/System/Plugin.c, Contrib/System/Plugin.h,
- Contrib/System/System.c, Contrib/System/System.h,
- Contrib/System/System.vcproj, Contrib/System/Example.nsi,
- Contrib/System/New System.txt, Contrib/System/SysFunc.nsh,
- Contrib/System/System.nsh, Contrib/System/WhatsNew.txt,
- Contrib/System/Resource.dll, Contrib/System/System.nsi,
- Contrib/System/System.txt: version 2 final
+2002-10-09 06:25 joostverburg
-2002-10-31 kichik
+ * /NSIS/trunk/Contrib/Language files/German.nlf: updated 'I Agree'
+ button text
- * Docs/Chapter7.html, Docs/src/basic.but: Err... Bullet not number
- =/
+2002-10-09 06:25 joostverburg
-2002-10-31 kichik
+ * /NSIS/trunk/Contrib/Modern UI/German.nsh: translation by L.King
- * Docs/Chapter7.html, Docs/src/basic.but: /a goes in both
+2002-10-08 21:00 joostverburg
-2002-10-31 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: larger browse button
- * Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- Docs/Chapter1.html, Docs/Chapter7.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/basic.but,
- Docs/src/build.bat: ReserveFile and /nonfatal added. License is
- the last appendix again.
+2002-10-08 20:53 joostverburg
-2002-10-30 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: added german
- * Docs/AppendixB.html, Docs/AppendixC.html, Docs/AppendixD.html,
- Docs/Chapter7.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/usefulfunc.but: Some more useful
- functions
+2002-10-08 20:52 joostverburg
-2002-10-30 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: 'I agree' text
+ updated
- * Contrib/Language files/French.nlf: ...
+2002-10-08 20:10 rainwater
-2002-10-30 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/German.nsh: Jann Rֳ¶der's German
+ language file for Modern UI
- * Docs/src/usefulfunc.but, Docs/AppendixD.html, Docs/Contents.html,
- Docs/index.html: spelling mistake
+2002-10-08 20:08 joostverburg
-2002-10-30 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: fixed
+ uninstaller error, compile error
- * Docs/Contents.html, Docs/index.html, Docs/src/build.bat,
- Docs/src/usefulfunc.but, Docs/AppendixD.html: functions
+2002-10-08 20:07 joostverburg
-2002-10-29 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: fixed
+ uninstaller error
- * Docs/src/basic.but, Docs/Chapter7.html: better RMDir
- documentation
+2002-10-08 19:46 joostverburg
-2002-10-29 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/French.nsh,
+ /NSIS/trunk/Contrib/Modern UI/Greek.nsh: fixed uninstall button
+ text
- * Contrib/Language files/Greek.nlf: fixes
+2002-10-08 19:45 joostverburg
-2002-10-29 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: fixed 'uninstall'
+ text
- * Docs/AppendixC.html: modern ui
+2002-10-08 18:06 joostverburg
-2002-10-28 kichik
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: some newlines
- * TODO.txt: History
+2002-10-08 18:06 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: greek language,
+ language in registry, some newlines
- * TODO.txt: things to do
+2002-10-08 18:02 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: changed size of space text
+ areas
- * Docs/Contents.html: update
+2002-10-08 17:33 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Slovak.nlf: corrected some
+ spelling & grammar errors
- * Docs/Chapter2.html: MakeNSIS in Explorer
+2002-10-08 14:53 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf: looks better with
+ Modern UI
- * Docs/Chapter3.html: Plugins
+2002-10-08 14:52 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Greek.nsh: Greek Language file for
+ Modern UI
- * Docs/Chapter4.html: CheckBitmap
+2002-10-08 09:44 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: made license page info-text
+ area a bit larger
- * Docs/src/attributes.but: CheckBitmap
+2002-10-08 09:29 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/Dutch.nsh,
+ /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/French.nsh,
+ /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ioB.ini,
+ /NSIS/trunk/Examples/Modern UI/ioC.ini,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: multilanguage
+ system easier to use (using defines)
- * Docs/src/script.but: plugins
+2002-10-08 08:26 joostverburg
-2002-10-28 joostverburg
+ * /NSIS/trunk/Contrib/Language files/French.nlf: some corrections
- * Docs/src/usage.but: better info about using MakeNSIS in explorer
+2002-10-07 22:01 kichik
-2002-10-28 joostverburg
+ * /NSIS/trunk/Examples/waplugin.nsi: 2.77 is old news :)
- * Docs/src/flowcontrol.but, Docs/Chapter10.html: info about inner
- dialog
+2002-10-07 21:35 joostverburg
-2002-10-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/French.nsh: credits updated
- * Examples/makensis.nsi: ZIP2EXE description updated
+2002-10-07 21:31 joostverburg
-2002-10-27 kichik
+ * /NSIS/trunk/Contrib/Modern UI/English.nsh: back fixed
- * Examples/makensis.nsi: Fixed nsExec description
+2002-10-07 21:29 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/French.nsh: French translation by
+ Netsabes
- * Contrib/Modern UI/Readme.html: fixes
+2002-10-07 21:28 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI/English.nsh: removed some spaces
- * Docs/src/build.bat, Docs/src/modernui.but: Modern UI appendix
+2002-10-07 21:16 joostverburg
-2002-10-27 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: updated modern ui
- * Docs/Chapter4.html, Docs/src/attributes.but: Made it clear that
- OutFile can use a fully qualified path and not just an EXE name
+2002-10-07 20:44 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: example.nsi >
+ basic.nsi
- * Contrib/Modern UI/Changelog.txt: complete changelog
+2002-10-07 20:27 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Language files/German.nlf: A bit better
- * Contrib/Modern UI/Readme.html: fixes, full changelog in
- Changelog.txt
+2002-10-07 20:08 kichik
-2002-10-27 joostverburg
+ * /NSIS/trunk/Source/build.cpp: More consistent summary
- * Docs/src/attributes.but, Docs/Chapter4.html: fixed ChangeUI info
+2002-10-07 20:07 kichik
-2002-10-27 kichik
+ * /NSIS/trunk/Source/lang.cpp: Some more safety measures with
+ LangString
- * Docs/Chapter4.html, Docs/src/attributes.but: Added information
- about RTF and fixed a glitch in UninstallText section
+2002-10-07 19:59 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/iniA.ini,
+ /NSIS/trunk/Examples/Modern UI/iniB.ini,
+ /NSIS/trunk/Examples/Modern UI/iniC.ini,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: removed - updated
+ modern ui directory structure
- * Examples/makensis.nsi: cleanup
+2002-10-07 19:59 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Basic.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ioA.ini,
+ /NSIS/trunk/Examples/Modern UI/ioB.ini,
+ /NSIS/trunk/Examples/Modern UI/ioC.ini,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: modern ui 1.3 - new
+ multilanguage system
- * Examples/makensis.nsi: compatible with new Modern UI
+2002-10-07 19:58 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Modern UI, /NSIS/trunk/Contrib/Modern
+ UI/Dutch.nsh, /NSIS/trunk/Contrib/Modern UI/English.nsh,
+ /NSIS/trunk/Contrib/Modern UI/System.nsh: version 1.3 - new
+ multilanguage system
- * Docs/src/compilerflags.but, Docs/Chapter5.html: bzip2 is not
- larger anymore
+2002-10-07 19:54 joostverburg
-2002-10-27 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Portuguese.nlf: Portuguese
+ language file
- * Contrib/Modern UI/System.nsh, Contrib/Modern UI/Language
- files/Arabic.nsh, Contrib/Modern UI/Language files/Dutch.nsh,
- Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/French.nsh, Contrib/Modern UI/Language
- files/German.nsh, Contrib/Modern UI/Language files/Greek.nsh,
- Contrib/Modern UI/Language files/Italian.nsh, Contrib/Modern
- UI/Language files/Polish.nsh, Contrib/Modern UI/Language
- files/PortugueseBR.nsh, Contrib/Modern UI/Language
- files/Russian.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Modern UI/Language
- files/Ukrainian.nsh: !verbose 3 for cleaner logs
+2002-10-07 19:49 justin1014
-2002-10-27 joostverburg
+ * /NSIS/trunk/Source/makenssi.dsp: removed inf* dependencies
- * Contrib/Language files/Arabic.nlf, Contrib/Language
- files/Dutch.nlf, Contrib/Language files/English.nlf,
- Contrib/Language files/French.nlf, Contrib/Language
- files/German.nlf, Contrib/Language files/Greek.nlf,
- Contrib/Language files/Hungarian.nlf, Contrib/Language
- files/Italian.nlf, Contrib/Language files/Korean.nlf,
- Contrib/Language files/Polish.nlf, Contrib/Language
- files/Portuguese.nlf, Contrib/Language files/PortugueseBR.nlf,
- Contrib/Language files/Russian.nlf, Contrib/Language
- files/SimpChinese.nlf, Contrib/Language files/Slovak.nlf,
- Contrib/Language files/Spanish.nlf, Contrib/Language
- files/Swedish.nlf, Contrib/Language files/TradChinese.nlf,
- Contrib/Language files/Ukrainian.nlf: cleaned up format, added
- spaces
+2002-10-07 19:48 justin1014
-2002-10-27 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C: *** empty log message ***
- * Contrib/Modern UI/Readme.html: updated changelog
+2002-10-07 19:44 justin1014
-2002-10-27 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C: some more size reduction
- * Contrib/Modern UI/System.nsh, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/ioA.ini, Examples/Modern
- UI/ioB.ini, Examples/Modern UI/ioC.ini: new Install Options
- read/write ini macro's
+2002-10-07 19:24 justin1014
-2002-10-26 joostverburg
+ * /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFBLOCK.H,
+ /NSIS/trunk/Source/zlib/INFCODES.C,
+ /NSIS/trunk/Source/zlib/INFCODES.H,
+ /NSIS/trunk/Source/zlib/INFTREES.C,
+ /NSIS/trunk/Source/zlib/INFTREES.H,
+ /NSIS/trunk/Source/zlib/INFUTIL.C,
+ /NSIS/trunk/Source/zlib/INFUTIL.H: kichik's inlining rec, also
+ put all of inflate into one big infblock.c so we can optimize
+ more =)
- * Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi: !verbose stuff in System.nsh
+2002-10-06 19:05 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Source/exehead/lang.h: Better looking code
- * Contrib/Modern UI/Readme.html: some fixes
+2002-10-06 18:33 justin1014
-2002-10-26 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: made inttosizestr only display
+ the + on GB shown on win9x. (sorry kichik, kinda undid some of
+ your optimizaton -- I made this one slightly smaller though than
+ the old one)
- * Docs/AppendixB.html, Docs/src/license.but: Better looking license
+2002-10-05 16:20 kichik
-2002-10-26 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c: 28 bytes down
- * Docs/Chapter1.html, Docs/Chapter10.html, Docs/Chapter11.html,
- Docs/Chapter12.html, Docs/Chapter13.html, Docs/Chapter14.html,
- Docs/Chapter15.html, Docs/Chapter16.html, Docs/Chapter17.html,
- Docs/Chapter18.html, Docs/Chapter19.html, Docs/Chapter24.html,
- Docs/Chapter25.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/src/attributes.but, Docs/src/basic.but,
- Docs/src/callback.but, Docs/src/compiler.but,
- Docs/src/compilerflags.but, Docs/src/defines.but,
- Docs/src/file.but, Docs/src/flowcontrol.but,
- Docs/src/functions.but, Docs/src/generalpurpose.but,
- Docs/src/history.but, Docs/src/int.but, Docs/src/intro.but,
- Docs/src/log.but, Docs/src/misc.but, Docs/src/reboot.but,
- Docs/src/registry.but, Docs/src/sec.but, Docs/src/sections.but,
- Docs/src/stack.but, Docs/src/string.but, Docs/src/uninstall.but,
- Docs/src/usection.but, Docs/src/var.but: Features list updated,
- some links added and command parameters are now shown alone with a
- light background behind them.
+2002-10-04 22:54 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Arrg... some more uninitiated
+ variables! Bad bad habit :(
- * Examples/Modern UI/MultiLanguage.nsi: added Italian
+2002-10-04 20:41 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp:
+ Fixed weird LangString behavior and made SectionSetFlags
+ "understand" SF_BOLD
- * Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi: macro system updates
+2002-10-04 18:52 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Examples/languages.nsi: New section flags structure
- * Contrib/Modern UI/Readme.html: more info
+2002-10-04 18:34 rainwater
-2002-10-26 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsExec.txt: Updated nsExec readme
+ information on the timeout param
- * makensis.exe: BrandingText changes
+2002-10-04 18:12 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/test.nsi: Timeout was just a test :)
- * Contrib/Modern UI/Language files/Italian.nsh: bugs corrected
+2002-10-04 18:11 kichik
-2002-10-26 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: Timeout now works
- * Source/script.cpp: BrandingText /TRIM* "" will now use the
- default string too
+2002-10-04 17:46 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/test.nsi: nsExec test
- * Contrib/Language files/Ukrainian.nlf, Contrib/Modern UI/Language
- files/Ukrainian.nsh: By Yuri Holubow
+2002-10-04 16:05 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed a bug that caused
+ the test button to show up even if no output file string was
+ found in the log.
- * Examples/Modern UI/MultiLanguage.nsi: added Ukrainian
+2002-10-04 14:45 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp:
+ Compiles without NSIS_CONFIG_ENHANCEDUI_SUPPORT
- * Contrib/Language files/Italian.nlf, Contrib/Modern UI/Language
- files/Italian.nsh: some fixes by sanface
+2002-10-04 10:27 kichik
-2002-10-26 joostverburg
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Added an option for unprocessed user
+ multilingual strings (LangStringUP). Use it if you see weird
+ squares before and special character in your LangString.
- * Contrib/Modern UI/Readme.html, Contrib/Modern UI/System.nsh,
- Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi: macro
- system updates
+2002-10-03 22:16 justin1014
-2002-10-26 kichik
+ * /NSIS/trunk/Source/zlib/deflate.c: optimized zlib compression
+ parameters a bit
- * Docs/src/license.but, Docs/AppendixB.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html: Spelling mistake
+2002-10-03 07:27 justin1014
-2002-10-25 joostverburg
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/res.rc,
+ /NSIS/trunk/Contrib/zip2exe/resource.h: updated zip2exe to 2.0b0
+ standards
- * Contrib/Modern UI/Language files/Russian.nsh: Fixed by Scam
+2002-10-03 07:07 justin1014
-2002-10-25 kichik
+ * /NSIS/trunk/Source/exehead/config.h: updated smallmode comment
- * Contrib/System/Example.nsi, Contrib/System/Example.txt: txt->nsi
+2002-10-03 07:06 justin1014
-2002-10-24 joostverburg
+ * /NSIS/trunk/Source/zlib/deflate.c: *** empty log message ***
- * Examples/Modern UI/MultiLanguage.nsi: removed arabic (combination
- of rtl and non-rtl not possible)
+2002-10-03 06:48 justin1014
-2002-10-24 joostverburg
+ * /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c: bzip2 code cleanup
- * makensis.exe: latest stuff
+2002-10-03 06:22 justin1014
-2002-10-24 kichik
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h: more size savings, and fixed
+ bzip2 small mode
- * Source/lang.cpp: English is no longer always created
+2002-10-03 06:11 justin1014
-2002-10-24 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/decompress.c: 20 bytes removed from
+ bzip2 and some cleanup =)
- * Contrib/Language files/Spanish.nlf: fixed accelerator key
+2002-10-03 01:54 justin1014
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/zlib/INFCODES.C: some more byte savings
- * Examples/makensis.nsi: new system plugin
+2002-10-03 01:44 rainwater
-2002-10-23 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Wrong language
- * Contrib/System/Example.txt: new system plugin
+2002-10-02 22:47 eccles
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/makenssi.dsp: Added a Debug configuration
- * Contrib/System/Buffers.c, Contrib/System/Buffers.h,
- Contrib/System/New System.txt, Contrib/System/Plugin.c,
- Contrib/System/Plugin.h, Contrib/System/SysFunc.nsh,
- Contrib/System/System.c, Contrib/System/System.h,
- Contrib/System/System.ncb, Contrib/System/System.nsh,
- Contrib/System/System.txt, Contrib/System/System.vcproj,
- Contrib/System/WhatsNew.txt, Contrib/System/vc7ldvrm.obj,
- Contrib/System/vc7lmul.obj, Contrib/System/vc7lshl.obj,
- Contrib/System/vc7lshr.obj: new system plugin
+2002-10-02 22:45 eccles
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/script.cpp: !macroend was only being
+ recognised at the beginning of a line
- * Contrib/Modern UI/Language files/PortugueseBR.nsh,
- Contrib/Language files/PortugueseBR.nlf: By Layout do Brasil
+2002-10-02 21:57 joostverburg
-2002-10-23 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: Added
+ MUI_INTERFACE_ABSOLUTEPATH
- * Contrib/Modern UI/Language files/Arabic.nsh: updated LANGNAME
+2002-10-02 21:31 kichik
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Compiles again, and bold sections
+ work again
- * Examples/Modern UI/MultiLanguage.nsi: some new languages
+2002-10-02 21:06 kichik
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Bugs item #617703 fixed
- * Contrib/Language files/Italian.nlf: accelerator keys
+2002-10-02 19:54 rainwater
-2002-10-23 joostverburg
+ * /NSIS/trunk/Contrib/AdvSplash,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.c,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.dsp,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.dsw,
+ /NSIS/trunk/Contrib/AdvSplash/advsplash.txt,
+ /NSIS/trunk/Contrib/UberSplash,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Plugins/advsplash.dll: Added AdvSplash plugin and
+ remove UberSplash. NSIS installer updated.
- * Contrib/Modern UI/Language files/Italian.nsh: By sanface
+2002-10-02 19:18 kichik
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ SetPluginUnload manual|alwaysoff
- * Contrib/Modern UI/Language files/Greek.nsh, Contrib/Language
- files/Greek.nlf: By Makidis N. Mike
+2002-10-02 18:22 justin1014
-2002-10-23 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C: another bunch of data
+ removed, zlib is now 34.5k
- * Contrib/Modern UI/Language files/Arabic.nsh, Contrib/Language
- files/Arabic.nlf: By asdfuae
+2002-10-02 18:16 kichik
-2002-10-23 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: No more stray chars for
+ Justin :)
- * Contrib/Modern UI/Language files/Russian.nsh: By Nik Medved
+2002-10-02 17:54 justin1014
-2002-10-20 kichik
+ * /NSIS/trunk/Source/zlib/INFTREES.C: 12 bytes saved, bunch to go
- * Source/script.cpp, Source/tokens.cpp: File /nonfatal option added
+2002-10-02 17:51 rainwater
-2002-10-19 kichik
+ * /NSIS/trunk/Examples/one-section.nsi: changed outfile to
+ one-section.exe
- * Source/build.cpp, Source/exehead/Ui.c: Hidden sections can now
- have SectionIn too. Old behaviour retained (hidden sections without
- SectionIn are in all install types).
+2002-10-02 17:24 justin1014
-2002-10-19 kichik
+ * /NSIS/trunk/Source/exehead/exehead-zlib.dsp: inflateReset and
+ inflateInit are now the same thing, removed inflate.c dependency
- * Source/script.cpp: Plugin calls no longer adds size to the
- section containing them. They are temporary files and shouldn't add
- size.
+2002-10-02 17:23 justin1014
-2002-10-18 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/ZLIB.H: inflateReset and inflateInit are
+ now the same thing,
- * Contrib/Modern UI/Readme.html: updated changelog
+2002-10-02 17:19 justin1014
-2002-10-17 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFCODES.C,
+ /NSIS/trunk/Source/zlib/INFCODES.H,
+ /NSIS/trunk/Source/zlib/ZLIB.H: some big size savings (removed
+ zalloc requirement from runtime yay)
- * Examples/Modern UI/MultiLanguage.nsi: new system
+2002-10-02 16:59 kichik
-2002-10-17 joostverburg
+ * /NSIS/trunk/Examples/one-section.nsi: Now with the new flag
+ values
- * Contrib/Modern UI/System.nsh: forgot to remove some old stuff
+2002-10-02 16:49 kichik
-2002-10-17 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf: Space added after
+ Delete file:
- * Contrib/Modern UI/System.nsh, Examples/Modern UI/Basic.nsi:
- easier to use for basic scripts
+2002-10-02 16:46 joostverburg
-2002-10-17 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Greek.nlf: Greek language file
- * makensis.exe: oops, that was the debug build :P
+2002-10-02 16:00 kichik
-2002-10-17 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.txt,
+ /NSIS/trunk/Plugins/nsExec.dll: Now doesn't crash when using Exec
+ and not ExecToLog. ExecToLog timeout is not yet implemented.
- * makensis.exe: latest stuff
+2002-10-02 15:01 kichik
-2002-10-17 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp: 94 bytes saved. LangString should
+ now work with sub-sections too.
- * Source/build.h, Source/script.cpp: !ifdef/!ifndef can now be used
- in macros too
+2002-10-02 13:29 joostverburg
-2002-10-17 kichik
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: Details back when
+ using IO
- * Source/script.cpp: XPStyle off now reomves the XP manifest
- instead of assuming it wasn't added before and doing nothing
+2002-10-02 12:02 rainwater
-2002-10-17 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Fixed running from
+ context menu
- * Examples/makensis.nsi: Indenting
+2002-10-02 11:48 kichik
-2002-10-17 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c: FindWindow $0 works again
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: dns changes
+2002-10-02 10:14 joostverburg
-2002-10-17 rainwater
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Default
+ description text: dialog control ID should be 1043 instead of
+ ${LANG_DUTCH}
- * Contrib/Makensisw/makensisw.cpp: memory sucks
+2002-10-02 04:32 justin1014
-2002-10-17 rainwater
+ * /NSIS/trunk/Source/build.cpp: made some output info slightly
+ prettier
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Different user
- message if update check failed.
+2002-10-02 04:26 justin1014
-2002-10-17 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: fixed another makensisw
+ bug (two stray chars after text for me) -- hopefully this didn't
+ break anything
- * makensisw.exe: wrong url for alpha/beta releases. makensisw
- wasnt up-to-date with the source.
+2002-10-02 04:12 justin1014
-2002-10-17 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: fixed a bug when
+ running makensisw from the command line
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- makensisw.exe: Update check now uses its own thread. The
- messagebox is now modal. Also checks for alphas/betas. Adds new
- version string to messagebox.
+2002-10-02 03:17 rainwater
-2002-10-16 joostverburg
+ * /NSIS/trunk/nsisconf.nsh: Cleaned up format a little
- * Examples/makensis.nsi: compatible with new modern ui
+2002-10-02 00:24 rainwater
-2002-10-16 rainwater
+ * /NSIS/trunk/Docs/src/history.but: I can't read.
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/noclib.cpp,
- Contrib/Makensisw/noclib.h, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h, makensisw.exe: Update check uses IE's
- proxy settings
+2002-10-02 00:23 rainwater
-2002-10-16 rainwater
+ * /NSIS/trunk/Docs/src/history.but: Updated History
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Now clear log
- window really clears the log window
+2002-10-01 23:03 rainwater
-2002-10-16 rainwater
+ * /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/usage.but,
+ /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/nsisconf.nsh,
+ /NSIS/trunk/Source/makenssi.cpp: Renamed nsisconf.nsi to
+ nsisconf.nsh since it is really a include file. The NSIS
+ installer will rename the nsisconf.nsi file to nsh if present to
+ prevent upgrade issues.
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/jnetlib/asyncdns.cpp,
- Contrib/Makensisw/jnetlib/asyncdns.h,
- Contrib/Makensisw/jnetlib/connection.cpp,
- Contrib/Makensisw/jnetlib/connection.h,
- Contrib/Makensisw/jnetlib/httpget.cpp,
- Contrib/Makensisw/jnetlib/httpget.h,
- Contrib/Makensisw/jnetlib/netinc.h,
- Contrib/Makensisw/jnetlib/util.cpp,
- Contrib/Makensisw/jnetlib/util.h, makensisw.exe: New makensisw
- update system
+2002-10-01 22:09 rainwater
-2002-10-16 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.txt,
+ /NSIS/trunk/Plugins/nsExec.dll: Changed default timeout to 15
+ seconds (from 100 seconds). Returns now if CreateProcess fails.
+ Now closes handles if unable to allocate memory.
- * Docs/Chapter9.html, Docs/src/generalpurpose.but: Now sets the
- error flag if DllRegisterServer fails (Bugs item #624176)
+2002-10-01 19:35 kichik
-2002-10-16 kichik
+ * /NSIS/trunk/Plugins/nsExec.dll: Now logs properly
- * Source/exehead/exec.c: Now sets the error flag if
- DllRegisterServer fails (Bugs item #624176)
+2002-10-01 18:59 kichik
-2002-10-16 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: Logging should work well now
- * Contrib/Language files/German.nlf: better translation
+2002-10-01 18:42 eccles
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib.h: lol, get my name right will ya
+ justin :)
- * Contrib/Modern UI/Language files/German.nsh, Contrib/Language
- files/German.nlf: accelerator keys
+2002-10-01 17:36 justin1014
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/trees.c: 30 bytes or so gone from zlib,
+ also made stored blocks use 2 bytes less each
- * Contrib/Modern UI/Language files/French.nsh, Contrib/Language
- files/French.nlf: accelerator keys
+2002-10-01 17:16 kichik
-2002-10-15 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/script.cpp: Unprocessed strings (such as
+ InstType) can now use LangString/$(name) too. No more "skipped"
+ messages before plugins.
- * Docs/AppendixA.html, Docs/Chapter4.html: Latest changes
+2002-10-01 17:06 joostverburg
-2002-10-15 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Italian.nlf: Italian language
+ file
- * Contrib/Language files/English.nlf: typo
+2002-10-01 17:00 joostverburg
-2002-10-15 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Hungarian.nlf: Hungarian
+ language file
- * Contrib/Modern UI/Language files/Spanish.nsh, Contrib/Language
- files/Spanish.nlf: accelerator keys
+2002-10-01 16:37 rainwater
-2002-10-15 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: Added return value to
+ nsExex. Logging still broke.
- * Examples/Modern UI/MultiLanguage.nsi: uses more LANGNAME's
+2002-10-01 14:13 kichik
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp: bzip2 header down to 34KB, 54
+ bytes away from 34.5KB zlib. Fixed a bug with ReadRegStr and $0.
- * Contrib/Modern UI/Language files/Polish.nsh: added LANGNAME
+2002-10-01 13:53 rainwater
-2002-10-15 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Docs/src/file.but,
+ /NSIS/trunk/Docs/src/flowcontrol.but,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/generalpurpose.but,
+ /NSIS/trunk/Docs/src/int.but, /NSIS/trunk/Docs/src/labels.but,
+ /NSIS/trunk/Docs/src/log.but, /NSIS/trunk/Docs/src/makefile,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/plugin.but,
+ /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/registry.but, /NSIS/trunk/Docs/src/sec.but,
+ /NSIS/trunk/Docs/src/sections.but,
+ /NSIS/trunk/Docs/src/stack.but,
+ /NSIS/trunk/Docs/src/uninstall.but, /NSIS/trunk/Docs/src/var.but:
+ Updated docs
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf: accelerator keys
+2002-10-01 09:34 joostverburg
-2002-10-15 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp:
+ CancelConfirmIcon > CancelConfirmFlags in changelog
- * Docs/src/history.but: changelog updates
+2002-10-01 06:36 justin1014
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/ZLIB.H: 2 bytes removed from zlib hehe
+ long way to go to catch up to bzip2
- * Source/lang.cpp: accelerator keys
+2002-10-01 06:30 justin1014
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/exehead/fileform.c: made bzip2 mode slightly
+ smaller by making reinit stuff not necessary
- * Contrib/Language files/Dutch.nlf, Contrib/Modern UI/Language
- files/Dutch.nsh, Contrib/Modern UI/Language files/English.nsh:
- accelerator keys
+2002-10-01 02:27 justin1014
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/exehead/fileform.c: even smaller bzip2 code
- * Contrib/Language files/English.nlf: fixed browse accelerator key
+2002-10-01 02:16 justin1014
-2002-10-15 kichik
+ * /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/makenssi.dsp: removed bzlib_private.h
+ dependency
- * Docs/src/attributes.but: Some fixes
+2002-10-01 02:15 justin1014
-2002-10-15 rainwater
+ * /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c: updated bzip2 for
+ cleanliness, still some good reorganizations yet
- * Docs/Chapter4.html, Docs/src/attributes.but: /LANG goes first in
- LicenseText
+2002-10-01 01:57 justin1014
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/randtable.c,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/fileform.c: made bzip2 smaller than
+ zlib mode !!!
- * Contrib/Language files/English.nlf: some more hotkeys
+2002-09-30 22:28 eccles
-2002-10-15 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi:
+ CancelConfirmIcon becomes CancelConfirmFlags with extra options
- * Contrib/Modern UI/System.nsh: FONT parameter for
- MUI_INTERFACE_ABSOLUTEPATH macro
+2002-09-30 22:22 eccles
-2002-10-15 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: CancelConfirmIcon becomes
+ CancelConfirmFlags with extra options
- * Contrib/Language files/English.nlf: hotkeys
+2002-09-30 21:42 eccles
-2002-10-15 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: CreateShortcut comment memory
+ corruption
- * Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/TradChinese.nsh, Contrib/Language files/SimpChinese.nlf,
- Contrib/Language files/TradChinese.nlf: better translation
+2002-09-30 20:52 eccles
-2002-10-14 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Minor code savings
- * Contrib/Language files/Hebrew.nlf: Hebrew NLF. RTL isn't perfect
- yet, so it's not really usable :)
+2002-09-30 19:31 joostverburg
-2002-10-14 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Source/lang.cpp: Folder instead of Directory
- * Source/exehead/resource.rc: larger buttons
+2002-09-30 19:01 kichik
-2002-10-14 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: Removed debug messages
- * Contrib/UIs/default.exe: larger 'browse' and 'show details'
- buttons
+2002-09-30 18:38 kichik
-2002-10-14 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: Counts sections right again
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: 'show details'
- button a bit larger
+2002-09-30 17:57 justin1014
-2002-10-14 joostverburg
+ * /NSIS/trunk/Source/zlib/INFTREES.C,
+ /NSIS/trunk/Source/zlib/INFTREES.H: another 20--30 or so
- * Contrib/Language files/German.nlf: better translation
+2002-09-30 17:39 justin1014
-2002-10-13 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFBLOCK.H,
+ /NSIS/trunk/Source/zlib/INFCODES.C,
+ /NSIS/trunk/Source/zlib/INFCODES.H,
+ /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/INFTREES.C,
+ /NSIS/trunk/Source/zlib/INFTREES.H,
+ /NSIS/trunk/Source/zlib/INFUTIL.C,
+ /NSIS/trunk/Source/zlib/INFUTIL.H,
+ /NSIS/trunk/Source/zlib/ZLIB.H: big ass size savings in zlib mode
+ :)
- * Contrib/Modern UI/Language files/TradChinese.nsh: new format
+2002-09-30 17:27 joostverburg
-2002-10-13 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.21
- * Contrib/Modern UI/Language files/Polish.nsh, Contrib/Modern
- UI/Language files/SimpChinese.nsh: new format
+2002-09-30 17:22 kichik
-2002-10-13 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: Prevent possible crash
- * Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/Spanish.nsh: new format
+2002-09-30 17:13 kichik
-2002-10-13 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: Now considers the first section too
+ when deciding if the components page should be shown. Also
+ doesn't show the components page if all sections are RO.
- * Contrib/Modern UI/Language files/Dutch.nsh: new format
+2002-09-30 17:08 rainwater
-2002-10-13 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: Updated history
- * Contrib/Modern UI/Language files/French.nsh: new format
+2002-09-30 16:59 justin1014
-2002-10-13 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFLATE.C: 52 bytes off of zlib
- * Contrib/Modern UI/Language files/English.nsh, Contrib/Modern
- UI/Language files/German.nsh: new format
+2002-09-30 16:49 justin1014
-2002-10-13 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/INFUTIL.C,
+ /NSIS/trunk/Source/zlib/INFUTIL.H,
+ /NSIS/trunk/Source/zlib/ZLIB.H: cut around 30 bytes of code off
+ of zlib mode (room for more tho)
- * Contrib/Modern UI/Language files/English.nsh, Examples/Modern
- UI/Basic.nsi, Examples/Modern UI/InstallOptions.nsi,
- Examples/Modern UI/MultiLanguage.nsi: ABORTWARNING uses a define
- too
+2002-09-30 16:49 justin1014
-2002-10-13 joostverburg
+ * /NSIS/trunk/Source/exehead/fileform.c: cut a few bytes of bzip2
+ mode
- * Contrib/Modern UI/Language files/English.nsh, Examples/Modern
- UI/InstallOptions.nsi: better usage of defines, no more wasted
- space for unused LangStrings
+2002-09-30 15:22 joostverburg
-2002-10-13 kichik
+ * /NSIS/trunk/Examples/languages.nsi: comment update
- * Contrib/Modern UI/Language files/System.nsh: Shouldn't be here
+2002-09-30 13:49 kichik
-2002-10-12 kichik
+ * /NSIS/trunk/Source/lang.cpp: Err... now works :)
- * Examples/makensis.nsi: Language files now go to the right
- directory
+2002-09-30 02:25 justin1014
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/bzip2/decompress.c: heh few more bytes saved
- * Docs/AppendixA.html, Docs/src/history.but: updated changelog
+2002-09-30 02:23 justin1014
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/bzip2/decompress.c: woohoo big savings, bzip2
+ is now 36.0k for me at least
- * Contrib/Makensisw/resource.rc: new modern ui icon name
+2002-09-30 02:08 justin1014
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/build.cpp: fixed so it would compile :)
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/MultiLanguage.nsi: new
- icon name, font in MUI_INTERFACE macro
+2002-09-29 21:33 kichik
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Now really doesn't crash :)
- * Contrib/Modern UI/System.nsh: font can be set using MUI_INTERFACE
- macro
+2002-09-29 21:32 kichik
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Now doesn't crash if the closing
+ bracket ')' couldn't be found
- * Examples/makensis.nsi: ui updates
+2002-09-29 20:57 kichik
-2002-10-12 kichik
+ * /NSIS/trunk/Source/build.cpp: Now shows the number of language
+ tables in the summary.
- * Source/exehead/fileform.c, Source/exehead/fileform.h: 32 bytes
- down
+2002-09-29 20:51 kichik
-2002-10-12 kichik
+ * /NSIS/trunk/Source/tokens.cpp: LangString usage string updated
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/Basic.nsi, Examples/Modern UI/MultiLanguage.nsi: License.txt
- path changed
+2002-09-29 20:50 kichik
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h:
+ cur_userlangstrings removed, no need.
- * Examples/makensis.nsi: new location of Modern UI files
+2002-09-29 20:25 kichik
-2002-10-12 joostverburg
+ * /NSIS/trunk/Examples/languages.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/strlist.h,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ user defined multilingual strings. Define using LangString
+ [un.]name lang_id string, use with $(name). Can't be used inside
+ other strings.
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi: new location of language files
+2002-09-29 10:04 kichik
-2002-10-12 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf,
+ /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Contrib/Language files/Korean.nlf,
+ /NSIS/trunk/Contrib/Language files/Russian.nlf,
+ /NSIS/trunk/Contrib/Language files/SimpChinese.nlf,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf,
+ /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf: Delete file:
+ now has a space after it
- * Contrib/Modern UI/License.txt, Contrib/Modern UI/Readme.html,
- Contrib/Modern UI/Readme.jpg, Contrib/Modern UI/Screenshot.png,
- Examples/Modern UI/License.txt, Examples/Modern UI/Readme.html,
- Examples/Modern UI/Readme.jpg, Examples/Modern UI/Screenshot.png:
- moved Modern UI docs to Contrib\Modern UI
+2002-09-28 14:01 eccles
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/randtable.c: Saved another 48 bytes of
+ data for bzip2 (at the expense of 6 extra code bytes).
+ bzip2 'randtable' not being initialised in makensis.
- * Examples/Modern UI/MultiLanguage.nsi: new location of language
- files
+2002-09-28 13:00 kichik
-2002-10-12 joostverburg
+ * /NSIS/trunk/Docs/src/generalpurpose.but: CreateShortCut
+ description added
- * Contrib/Modern UI/Language files/Dutch.nsh, Contrib/Modern
- UI/Language files/English.nsh, Contrib/Modern UI/Language
- files/French.nsh, Contrib/Modern UI/Language files/German.nsh,
- Contrib/Modern UI/Language files/Greek.nsh, Contrib/Modern
- UI/Language files/Polish.nsh, Contrib/Modern UI/Language
- files/SimpChinese.nsh, Contrib/Modern UI/Language
- files/Spanish.nsh, Contrib/Modern UI/Language files/System.nsh,
- Contrib/Modern UI/Language files/TradChinese.nsh, Contrib/Modern
- UI/Dutch.nsh, Contrib/Modern UI/English.nsh, Contrib/Modern
- UI/French.nsh, Contrib/Modern UI/German.nsh, Contrib/Modern
- UI/Greek.nsh, Contrib/Modern UI/Polish.nsh, Contrib/Modern
- UI/SimpChinese.nsh, Contrib/Modern UI/Spanish.nsh, Contrib/Modern
- UI/TradChinese.nsh: Modern UI Language Files moved to
- Contrib\Modern UI\Language files
+2002-09-27 23:27 eccles
-2002-10-12 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/decompress.c: 338 bytes (code) saved
+ from bzip2
- * Examples/Modern UI/Screenshot.png: white bg
+2002-09-27 12:28 rainwater
-2002-10-12 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Showwina and System source
+ were all mixed up
- * Examples/Modern UI/Screenshot.png: nicer screenshot
+2002-09-27 05:17 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/INFUTIL.H: reduced zlib size by 16 or so
- * Examples/Modern UI/MultiLanguage.nsi: LANGNAME for Greek
+2002-09-27 05:00 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib_private.h: more bzip size savings
+ (made it so our bzip2 can only decompress one thing at a time,
+ though, which is fine cause thats what we use anyway)
- * Contrib/Modern UI/Greek.nsh: added LANGNAME
+2002-09-27 04:11 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Docs/src/sec.but: fixed typo of file type vs install
+ type
- * Examples/Modern UI/MultiLanguage.nsi: uses LANGNAME's (some
- language files have not been updated yet)
+2002-09-27 04:05 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/randtable.c,
+ /NSIS/trunk/Source/exehead/fileform.c: bzip2 mode reduced down to
+ 36.5kb. yay.
- * Contrib/Modern UI/Dutch.nsh, Contrib/Modern UI/English.nsh,
- Contrib/Modern UI/French.nsh, Contrib/Modern UI/German.nsh,
- Contrib/Modern UI/Spanish.nsh: added LANGNAME
+2002-09-27 03:38 justin1014
-2002-10-11 rainwater
+ * /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/randtable.c,
+ /NSIS/trunk/Source/exehead/fileform.c: more bzip2 code reduction,
+ disabled data reduction for now so we can hit targets
- * Contrib/Makensisw/resource.rc, makensisw.exe: typo
+2002-09-27 03:35 justin1014
-2002-10-11 rainwater
+ * /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/decompress.c: 50ish bytes of bzip2 code
+ removed
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Added a Check for Update command
+2002-09-27 03:30 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib_private.h: 6 bytes or so saved in
+ bzip2
- * Examples/Modern UI/MultiLanguage.nsi: added polish, languages
- shown in orginal language
+2002-09-27 03:16 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/randtable.c,
+ /NSIS/trunk/Source/exehead/fileform.c: made bzip2 mode have 336
+ bytes less data, but about 60 bytes more code.
- * Contrib/Language files/Polish.nlf: added spaces
+2002-09-27 02:25 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Docs/src/compilerflags.but: updated setcompress
+ option
- * Contrib/Modern UI/Polish.nsh, Contrib/Language files/Polish.nlf:
- By Piotr Murawski & Rafa³ Lampe
+2002-09-27 02:22 justin1014
-2002-10-11 joostverburg
+ * /NSIS/trunk/Docs/src/compilerflags.but: updated
+ setdatablockoptimize docs
- * Contrib/Modern UI/Spanish.nsh: By MoNKi
+2002-09-26 22:53 eccles
-2002-10-11 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: Clicking
+ [x] behaves the same as Cancel (thank's brainsucker).
+ Saved 224 bytes.
- * Contrib/LangDLL/resource.rc: Made room for 3 lines of text (bug
- report #621273)
+2002-09-26 22:47 eccles
-2002-10-10 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Plugins/InstallOptions.dll: Clicking [x] behaves the
+ same as Cancel (thank's brainsucker).
+ Saved 224 bytes.
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: changed size of
- 'available space' text box
+2002-09-26 19:42 kichik
-2002-10-10 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Another 12 bytes
- * Contrib/Language files/German.nlf: InstType text
+2002-09-26 18:41 kichik
-2002-10-10 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Section check marks are now
+ changeable in .onNextPage/.onPrevPage after/before the components
+ page. Code size is down by 12 bytes because of this :)
- * Contrib/Modern UI/Dutch.nsh, Contrib/Modern UI/English.nsh,
- Contrib/Modern UI/French.nsh, Contrib/Modern UI/German.nsh,
- Contrib/Modern UI/Greek.nsh, Contrib/Modern UI/SimpChinese.nsh,
- Contrib/Modern UI/TradChinese.nsh: ComponentText fixed
+2002-09-26 18:00 joostverburg
-2002-10-10 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: fixed temp var
+ bug, uses LANG vars
- * Examples/Modern UI/MultiLanguage.nsi: updated langdll calling
+2002-09-26 17:29 joostverburg
-2002-10-10 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: fixed showwin source
- * Examples/Modern UI/MultiLanguage.nsi: added trad/simp chinese
+2002-09-26 16:58 joostverburg
-2002-10-10 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: showwin.txt at the correct
+ location :)
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: text area on
- folder selection dialog bigger
+2002-09-26 14:52 joostverburg
-2002-10-10 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: added plugins
- * Contrib/Modern UI/SimpChinese.nsh: By Hotice
+2002-09-25 22:59 rainwater
-2002-10-10 joostverburg
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: brainsucker's
+ russian language update
- * Contrib/Modern UI/TradChinese.nsh: update
+2002-09-25 19:47 joostverburg
-2002-10-10 rainwater
+ * /NSIS/trunk/Contrib/System/Last Comments.txt,
+ /NSIS/trunk/Contrib/System/SystemEx.nsi: removed (need to be
+ updated)
- * Docs/Chapter27.html: missing chapter
+2002-09-25 19:13 rainwater
-2002-10-10 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: Updated to use new ModernUI
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/logo.bmp,
- makensisw.exe: Minor logo.bmp update; Small docs updates
+2002-09-25 18:49 joostverburg
-2002-10-09 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: better names for
+ temp vars
- * Contrib/Modern UI/Greek.nsh: name back in license page info-text
+2002-09-25 18:46 joostverburg
-2002-10-09 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: temp vars
+ defined by header file, currentpage & io vars should be set using
+ macro parameters
- * Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Forgot to add g_dwLength to NSCRIPTDATA
+2002-09-25 18:44 joostverburg
-2002-10-09 rainwater
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: *** empty log
+ message ***
- * Contrib/Makensisw/logo.bmp, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Alternate doc path points to docs on nsis.sf.net not
- cvs; Use smaller logo.bmp; Removed background color code from about
- dialog; Stupid typo in about box (thanks joost); Created some
- structs for globals
+2002-09-25 18:40 rainwater
-2002-10-09 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: Updated readme. Path to
+ makensis.exe is no longer used in the command-line.
- * Contrib/Modern UI/Greek.nsh: info-text on license page updated
+2002-09-25 13:10 kichik
-2002-10-09 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: 6 more bytes down
- * Contrib/Modern UI/TradChinese.nsh: info-text on license page
- updated
+2002-09-25 13:08 rainwater
-2002-10-09 rainwater
+ * /NSIS/trunk/Examples/WinMessages.NSH: Prevent multiple inclusion
+ of !defines
- * Contrib/Makensisw/logo.bmp, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, makensisw.exe: Added link to
- developer site
+2002-09-25 12:54 kichik
-2002-10-09 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Shortcut comment option added, 44
+ bytes saved.
- * Contrib/Makensisw/logo.bmp, Contrib/Makensisw/logo.psp,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.dsp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/version.cpp,
- Examples/makensis.nsi, makensisw.exe: Added new About dialog
+2002-09-25 03:44 justin1014
-2002-10-09 rainwater
+ * /NSIS/trunk/Source/exehead/fileform.c: made bzip2 extraction
+ slightly more pedantic
- * Docs/AppendixA.html, Docs/Chapter12.html, Docs/Chapter13.html,
- Docs/Chapter14.html, Docs/Chapter15.html, Docs/Chapter16.html,
- Docs/Chapter17.html, Docs/Chapter18.html, Docs/Chapter19.html,
- Docs/Chapter20.html, Docs/Chapter21.html, Docs/Chapter22.html,
- Docs/Chapter23.html, Docs/Chapter24.html, Docs/Chapter25.html,
- Docs/Chapter26.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/string.but: String Functions is a chapter
+2002-09-25 03:34 justin1014
-2002-10-09 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c: another 30 or so bytes saved,
+ by modifying readSelfFile to do all length checking. Not sure if
+ I broke anything though =)
- * Contrib/Modern UI/English.nsh: changed component page subtitle
+2002-09-25 03:14 justin1014
-2002-10-09 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: another 8 bytes saved
- * Contrib/Modern UI/TradChinese.nsh: translation by Yi-Ting Cheng
+2002-09-25 03:06 justin1014
-2002-10-09 joostverburg
+ * /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c: more byte saveage
- * Contrib/Modern UI/Dutch.nsh, Contrib/Modern UI/English.nsh,
- Contrib/Modern UI/French.nsh, Contrib/Modern UI/German.nsh: updated
- license-info texts
+2002-09-25 02:55 justin1014
-2002-10-09 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: a handful of bytes saved again
- * Contrib/Language files/German.nlf: changed 'I Agree' button text
- again
+2002-09-25 02:36 justin1014
-2002-10-09 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: cut another 30 bytes or so
+ off. also made atoi take negative octal/hex numbers.
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, makensisw.exe: Added Browse Script
- (Ctrl+B)
+2002-09-25 02:13 justin1014
-2002-10-09 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: 6 bytes saved (made
+ addtrailingslash return char *)
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Removed "About NSIS" dialog
+2002-09-24 23:40 rainwater
-2002-10-09 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: Moved "Recompile" and
+ "Test Installer" to "Tools" menu.
- * Contrib/Makensisw/utils.cpp, makensisw.exe: No more GetMenu
- calls.
+2002-09-24 23:26 eccles
-2002-10-09 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c: 60 bytes saved.
+ zlib exehead is now 35.5K.
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Copy menu item is
- now disabled if no text is selected. Also, the context menu is now
- using the same instance of the Edit menu not just a copy.
+2002-09-24 22:52 rainwater
-2002-10-09 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Added "Clear Log"
+ command. "Clear Log" and "Edit Script" are now under a new
+ "Tools" menu. Removed some unused resources.
- * Contrib/Modern UI/German.nsh: no quotes around button names (like
- other modern ui translations)
+2002-09-24 20:05 joostverburg
-2002-10-09 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: writes language
+ to registry for uninstaller
- * Contrib/Language files/German.nlf: updated 'I Agree' button text
+2002-09-24 18:49 eccles
-2002-10-09 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: 200 bytes saved!
+ Drum-roll... bzip2 exehead is now 37K.
+ Next target - 50 bytes to get zlib exehead down to 35.5K.
- * Contrib/Modern UI/German.nsh: translation by L.King
+2002-09-24 13:59 rainwater
-2002-10-08 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Removed /CD from shortcut
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: larger browse
- button
+2002-09-24 13:49 rainwater
-2002-10-08 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: Updated shortcuts
- * Examples/Modern UI/MultiLanguage.nsi: added german
+2002-09-24 13:41 rainwater
-2002-10-08 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Removed int
+ declarations
- * Contrib/Language files/German.nlf: 'I agree' text updated
+2002-09-24 13:39 rainwater
-2002-10-08 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h: Context Menu object
+ reference is re-used each time.
- * Contrib/Modern UI/German.nsh: Jann Röder's German language file
- for Modern UI
+2002-09-24 13:28 kichik
-2002-10-08 joostverburg
+ * /NSIS/trunk/Contrib/ShowWin/ShowWin.nsi: Hides the I agree button
+ not cancel :)
- * Examples/Modern UI/MultiLanguage.nsi: fixed uninstaller error,
- compile error
+2002-09-24 10:38 kichik
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/build.cpp: rtest.nsi crash bug fixed
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi: fixed uninstaller error
+2002-09-23 23:29 kichik
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Now actually compiles :)
- * Contrib/Modern UI/Dutch.nsh, Contrib/Modern UI/English.nsh,
- Contrib/Modern UI/French.nsh, Contrib/Modern UI/Greek.nsh: fixed
- uninstall button text
+2002-09-23 23:23 kichik
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/build.cpp: Icon sizes mismatch bug fixed
- * Contrib/Language files/German.nlf: fixed 'uninstall' text
+2002-09-23 20:56 eccles
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: 40 bytes saved
- * Examples/Modern UI/Basic.nsi, Examples/Modern
- UI/InstallOptions.nsi: some newlines
+2002-09-23 19:27 eccles
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Tidied - removed some legacy
+ language stuff. No change to compiled output.
- * Examples/Modern UI/MultiLanguage.nsi: greek language, language in
- registry, some newlines
+2002-09-23 14:07 kichik
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/util.cpp: 18 bytes down
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: changed size of
- space text areas
+2002-09-23 13:08 joostverburg
-2002-10-08 joostverburg
+ * /NSIS/trunk/Contrib/Icons/yi-box_check.bmp,
+ /NSIS/trunk/Contrib/Language files/Slovak.nlf: *** empty log
+ message ***
- * Contrib/Language files/Slovak.nlf: corrected some spelling &
- grammar errors
+2002-09-22 20:04 kichik
-2002-10-08 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Plugins now have their own sub
+ section inside the contrib subsection
- * Contrib/Language files/Greek.nlf: looks better with Modern UI
+2002-09-22 20:02 eccles
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/zlib/ZUTIL.H: Use exehead's my_GlobalAlloc
- * Contrib/Modern UI/Greek.nsh: Greek Language file for Modern UI
+2002-09-22 19:06 justin1014
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: made NLF_ERR_WRITING etc in silent
+ installers too
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: made license
- page info-text area a bit larger
+2002-09-22 19:05 eccles
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: 80 bytes saved
- * Contrib/Modern UI/Dutch.nsh, Contrib/Modern UI/English.nsh,
- Contrib/Modern UI/French.nsh, Examples/Modern UI/Basic.nsi,
- Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/ioB.ini, Examples/Modern
- UI/ioC.ini: multilanguage system easier to use (using defines)
+2002-09-22 18:50 justin1014
-2002-10-08 joostverburg
+ * /NSIS/trunk/Source/lang.cpp: updated language string adding to
+ check more for NSIS_VISIBLE_SUPPORT or whatnot. Check to make
+ sure this is OK. Thanks, Justin.
- * Contrib/Language files/French.nlf: some corrections
+2002-09-22 18:48 justin1014
-2002-10-08 kichik
+ * /NSIS/trunk/Source/build.cpp: fixed no-compression but
+ uninstaller mode
- * Examples/waplugin.nsi: 2.77 is old news :)
+2002-09-22 14:22 eccles
-2002-10-07 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: 4 byte saving. woooo.
- * Contrib/Modern UI/French.nsh: credits updated
+2002-09-22 14:22 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: links to the new
+ nsis.sourceforge.net page
- * Contrib/Modern UI/English.nsh: back fixed
+2002-09-22 14:07 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Icons/yi-box_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-box_uninstall.ico: added 16 color
+ icons
- * Contrib/Modern UI/French.nsh: French translation by Netsabes
+2002-09-22 13:59 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Updated for Modern UI 1.20 -
+ No .h files in Contrib\nsExec
- * Contrib/Modern UI/English.nsh: removed some spaces
+2002-09-22 13:38 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Icons/yi-box_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-box_uninstall.ico: *** empty log
+ message ***
- * Examples/makensis.nsi: updated modern ui
+2002-09-22 13:37 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Icons/yi-simple_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple_uninstall.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_uninstall.ico: new 16 color
+ icons
- * makensis.exe: latest stuff
+2002-09-22 13:33 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.20
- * Examples/Modern UI/Readme.html: example.nsi > basic.nsi
+2002-09-22 12:53 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: Updated macro system
- * Contrib/Language files/German.nlf: A bit better
+2002-09-22 12:52 joostverburg
-2002-10-07 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: Updated macro
+ system & LangDLL usage
- * Source/build.cpp: More consistent summary
+2002-09-22 12:00 joostverburg
-2002-10-07 kichik
+ * /NSIS/trunk/Examples/Modern UI/iniC.ini: text=iniC
- * Source/lang.cpp: Some more safety measures with LangString
+2002-09-22 11:58 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: added io
+ nextpage/prevpage macro's
- * Examples/Modern UI/Example.nsi, Examples/Modern UI/ModernUI.nsh,
- Examples/Modern UI/iniA.ini, Examples/Modern UI/iniB.ini,
- Examples/Modern UI/iniC.ini: removed - updated modern ui directory
- structure
+2002-09-22 11:52 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Icons/yi-pixel.ico,
+ /NSIS/trunk/Contrib/Icons/yi-pixel-uninstall.ico: converted to
+ 256 colors
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/Readme.html,
- Examples/Modern UI/Basic.nsi, Examples/Modern UI/ioA.ini,
- Examples/Modern UI/ioB.ini, Examples/Modern UI/ioC.ini: modern ui
- 1.3 - new multilanguage system
+2002-09-22 11:46 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Contrib/Icons/yi-simple_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple_uninstall.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_uninstall.ico: converted to
+ 256 colors
- * Contrib/Modern UI/Dutch.nsh, Contrib/Modern UI/English.nsh,
- Contrib/Modern UI/System.nsh: version 1.3 - new multilanguage
- system
+2002-09-22 11:35 joostverburg
-2002-10-07 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/iniB.ini,
+ /NSIS/trunk/Examples/Modern UI/iniC.ini,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: Support for multiple
+ IO pages in a row
- * Contrib/Language files/Portuguese.nlf: Portuguese language file
+2002-09-22 11:34 kichik
-2002-10-07 justin1014
+ * /NSIS/trunk/Docs/src/plugin.but: Plugin docs fixes (/NOUNLOAD
+ flag stuff)
- * Source/makenssi.dsp: removed inf* dependencies
+2002-09-22 11:22 joostverburg
-2002-10-07 justin1014
+ * /NSIS/trunk/Contrib/Icons/yi-simple_check.bmp,
+ /NSIS/trunk/Contrib/Icons/yi-simple_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple_uninstall.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_check.bmp,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_install.ico,
+ /NSIS/trunk/Contrib/Icons/yi-simple2_uninstall.ico: *** empty log
+ message ***
- * Source/zlib/INFBLOCK.C: [no log message]
+2002-09-22 11:09 kichik
-2002-10-07 justin1014
+ * /NSIS/trunk/Contrib/ShowWin/ShowWin.dpr: This isn't a Delphi
+ project the last time I checked :)
- * Source/zlib/INFBLOCK.C: some more size reduction
+2002-09-22 10:28 kichik
-2002-10-07 justin1014
+ * /NSIS/trunk/Examples/languages.nsi: New plugin calling convention
- * Source/zlib/INFBLOCK.C, Source/zlib/INFBLOCK.H,
- Source/zlib/INFCODES.C, Source/zlib/INFCODES.H,
- Source/zlib/INFTREES.C, Source/zlib/INFTREES.H,
- Source/zlib/INFUTIL.C, Source/zlib/INFUTIL.H,
- Source/exehead/exehead-zlib.dsp: kichik's inlining rec, also put
- all of inflate into one big infblock.c so we can optimize more =)
+2002-09-22 10:01 joostverburg
-2002-10-06 kichik
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: test - added info
+ about MUI_INSTALLOPTIONS_INIT
- * Source/exehead/lang.h: Better looking code
+2002-09-21 21:05 joostverburg
-2002-10-06 justin1014
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: *** empty log message
+ ***
- * Source/exehead/Ui.c: made inttosizestr only display the + on GB
- shown on win9x. (sorry kichik, kinda undid some of your optimizaton
- -- I made this one slightly smaller though than the old one)
+2002-09-21 20:59 joostverburg
-2002-10-05 kichik
+ * /NSIS/trunk/Contrib/System, /NSIS/trunk/Contrib/System/Buffers.c,
+ /NSIS/trunk/Contrib/System/Buffers.h,
+ /NSIS/trunk/Contrib/System/Last Comments.txt,
+ /NSIS/trunk/Contrib/System/Plugin.c,
+ /NSIS/trunk/Contrib/System/Plugin.h,
+ /NSIS/trunk/Contrib/System/stdafx.c,
+ /NSIS/trunk/Contrib/System/stdafx.h,
+ /NSIS/trunk/Contrib/System/System.c,
+ /NSIS/trunk/Contrib/System/System.h,
+ /NSIS/trunk/Contrib/System/System.ncb,
+ /NSIS/trunk/Contrib/System/System.sln,
+ /NSIS/trunk/Contrib/System/System.txt,
+ /NSIS/trunk/Contrib/System/System.vcproj,
+ /NSIS/trunk/Contrib/System/SystemEx.nsi,
+ /NSIS/trunk/Plugins/System.dll: System plugin
- * Source/exehead/Ui.c, Source/exehead/exec.c: 28 bytes down
+2002-09-21 19:10 justin1014
-2002-10-05 kichik
+ * /NSIS/trunk/Plugins/ShowWin.dll, /NSIS/trunk/Plugins/splash.dll:
+ updated (I am using way too many commits I know)
- * Source/build.cpp: Arrg... some more uninitiated variables! Bad
- bad habit :(
+2002-09-21 19:10 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h: cleanup
- * Source/lang.cpp, Source/exehead/Ui.c: Fixed weird LangString
- behavior and made SectionSetFlags "understand" SF_BOLD
+2002-09-21 19:09 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Contrib/Splash/splash.dsp,
+ /NSIS/trunk/Contrib/Splash/splash.txt: updated splash to new
+ exdll. made it so that it always pushes status to the stack even
+ if error occured
- * Examples/languages.nsi: New section flags structure
+2002-09-21 19:05 justin1014
-2002-10-04 rainwater
+ * /NSIS/trunk/Contrib/ShowWin/ShowWin.c,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.dsp: updated ShowWin for new
+ exdll and to make smaller :)
- * Contrib/nsExec/nsExec.txt: Updated nsExec readme information on
- the timeout param
+2002-09-21 18:57 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Plugins/nsisdl.dll: updated to new syntax/exdll
- * Contrib/nsExec/test.nsi: Timeout was just a test :)
+2002-09-21 18:57 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt: updated to new format /
+ exdll
- * Contrib/nsExec/nsexec.c: Timeout now works
+2002-09-21 18:50 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Plugins/nsExec.dll: updated to new exdll interface.
+ /TIMEOUT now should come before any command.
- * Contrib/nsExec/test.nsi: nsExec test
+2002-09-21 18:49 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsp,
+ /NSIS/trunk/Contrib/nsExec/nsexec.h,
+ /NSIS/trunk/Contrib/nsExec/nsExec.txt,
+ /NSIS/trunk/Contrib/nsExec/nsis.c,
+ /NSIS/trunk/Contrib/nsExec/nsis.h: updated to new exdll
+ interface. note that /TIMEOUT must come before command now.
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Fixed a bug that
- caused the test button to show up even if no output file string was
- found in the log.
+2002-09-21 18:46 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/LangDLL.dll: updated to new exdll use and
+ changed LangDLL's parameter format (look in langdll.cpp to see)
- * Source/build.cpp, Source/script.cpp: Compiles without
- NSIS_CONFIG_ENHANCEDUI_SUPPORT
+2002-09-21 18:45 justin1014
-2002-10-04 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.dsp: updated parameter use to
+ new exdll
- * Source/build.h, Source/lang.cpp, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h: Added an option for unprocessed
- user multilingual strings (LangStringUP). Use it if you see weird
- squares before and special character in your LangString.
+2002-09-21 18:37 justin1014
-2002-10-04 justin1014
+ * /NSIS/trunk/Source/script.cpp: changed parameters on dlls to be
+ pushed rtl instead of ltr (updating plugins now)
- * Source/zlib/deflate.c: optimized zlib compression parameters a
- bit
+2002-09-21 18:31 justin1014
-2002-10-03 justin1014
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp: updated with new
+ exdll.h interface
- * Contrib/zip2exe/main.cpp, Contrib/zip2exe/res.rc,
- Contrib/zip2exe/resource.h: updated zip2exe to 2.0b0 standards
+2002-09-21 18:28 justin1014
-2002-10-03 justin1014
+ * /NSIS/trunk/Contrib/ExDLL/exdll.h: added exdll.h that other
+ plugins should use, for better version compatibility
- * Source/exehead/config.h: updated smallmode comment
+2002-09-21 18:27 justin1014
-2002-10-03 justin1014
+ * /NSIS/trunk/Contrib/ExDLL/exdll.c,
+ /NSIS/trunk/Contrib/ExDLL/exdll.dsp: updated exdll source
- * Source/zlib/deflate.c: [no log message]
+2002-09-21 17:17 eccles
-2002-10-03 justin1014
+ * /NSIS/trunk/Source/exehead/fileform.c: Now *really* only shows
+ the unpacking dialog if the NSIS window hasn't been created yet
- * Source/bzip2/blocksort.c, Source/bzip2/bzlib.c,
- Source/bzip2/bzlib.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/huffman.c: bzip2 code
- cleanup
+2002-09-21 15:47 kichik
-2002-10-03 justin1014
+ * /NSIS/trunk/Source/script.cpp: Macros don't crash makensis if
+ they have bad syntax
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib.h: more size savings,
- and fixed bzip2 small mode
+2002-09-21 15:17 kichik
-2002-10-03 justin1014
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c: Now only shows the unpacking
+ dialog if the NSIS window hasn't been created yet
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/decompress.c: 20 bytes removed from bzip2 and some
- cleanup =)
+2002-09-21 13:11 kichik
-2002-10-03 justin1014
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/script.cpp:
+ Installers with plugins now load faster too
- * Source/zlib/INFCODES.C: some more byte savings
+2002-09-21 11:27 joostverburg
-2002-10-03 rainwater
+ * /NSIS/trunk/Examples/Modern UI/iniA.ini,
+ /NSIS/trunk/Examples/Modern UI/iniB.ini,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: test - io
+ example update
- * Examples/Modern UI/MultiLanguage.nsi: Wrong language
+2002-09-21 11:10 joostverburg
-2002-10-03 eccles
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: test - added uninst
+ io macro
- * Source/makenssi.dsp: Added a Debug configuration
+2002-09-21 07:05 justin1014
-2002-10-03 eccles
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c: more updates yay
- * Source/script.cpp: !macroend was only being recognised at the
- beginning of a line
+2002-09-21 06:54 justin1014
-2002-10-02 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: ok done for the night. smaller
+ code yay. 248 bytes left to remove from code to bring bzip2 mode
+ down tho :(
- * Examples/Modern UI/ModernUI.nsh: Added MUI_INTERFACE_ABSOLUTEPATH
+2002-09-21 06:42 justin1014
-2002-10-02 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: bunch more size opts
- * Source/build.cpp: Compiles again, and bold sections work again
+2002-09-21 06:13 justin1014
-2002-10-02 kichik
+ * /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c: woohoo 36.0kb for zlib header
- * Source/build.cpp: Bugs item #617703 fixed
+2002-09-21 05:55 justin1014
-2002-10-02 rainwater
+ * /NSIS/trunk/Source/exehead/bgbg.c: 10 bytes off yay
- * Examples/makensis.nsi, Contrib/AdvSplash/advsplash.c,
- Contrib/AdvSplash/advsplash.dsp, Contrib/AdvSplash/advsplash.dsw,
- Contrib/AdvSplash/advsplash.txt: Added AdvSplash plugin and remove
- UberSplash. NSIS installer updated.
+2002-09-21 03:21 justin1014
-2002-10-02 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: renamed notify() to
+ outernotify() and made static
- * Source/build.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: Added SetPluginUnload manual|alwaysoff
+2002-09-21 03:21 justin1014
-2002-10-02 rainwater
+ * /NSIS/trunk/Source/exehead/bgbg.c: 2 byte reduction yay
- * SetCVSShellCommands.exe, SetCVSShellCommands.nsi: [no log
- message]
+2002-09-21 02:44 justin1014
-2002-10-02 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c: another 4 byte save
- * !InstallNSIS.bat: Compile/Run the NSIS installer
+2002-09-21 02:34 justin1014
-2002-10-02 justin1014
+ * /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: 2 bytes saved on exehead by
+ using my_SetDlgItemText. heh.
- * Source/zlib/INFBLOCK.C: another bunch of data removed, zlib is
- now 34.5k
+2002-09-21 02:12 justin1014
-2002-10-02 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c: made "unpacking dialog"
+ dialog only come up when the main installer window hasnt' been
+ created yet.
- * makensisw.exe, Contrib/Makensisw/utils.cpp: No more stray chars
- for Justin :)
+2002-09-21 02:10 justin1014
-2002-10-02 justin1014
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ ReserveFile command (usable anywhere) that allows you to put a
+ file in the datablock so that it is preloaded for use later.
+ Useful for when you use plugins in .onInit, and bz2 mode. Need to
+ document this stuff. Anyone? :)
- * Source/zlib/INFTREES.C: 12 bytes saved, bunch to go
+2002-09-20 23:45 kichik
-2002-10-02 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: splash: exe -> dll
- * Examples/one-section.nsi: changed outfile to one-section.exe
+2002-09-20 23:32 joostverburg
-2002-10-02 justin1014
+ * /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: test - better io
+ macro system
- * Source/exehead/exehead-zlib.dsp: inflateReset and inflateInit are
- now the same thing, removed inflate.c dependency
+2002-09-20 23:22 kichik
-2002-10-02 justin1014
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp:
+ bzip2 installers should now start a lot faster
- * Source/zlib/INFBLOCK.C, Source/zlib/INFLATE.C,
- Source/zlib/ZLIB.H: inflateReset and inflateInit are now the same
- thing,
+2002-09-20 23:13 joostverburg
-2002-10-02 justin1014
+ * /NSIS/trunk/Examples/makensis.nsi: *** empty log message ***
- * Source/zlib/INFBLOCK.C, Source/zlib/INFCODES.C,
- Source/zlib/INFCODES.H, Source/zlib/ZLIB.H: some big size savings
- (removed zalloc requirement from runtime yay)
+2002-09-20 23:05 kichik
-2002-10-02 kichik
+ * /NSIS/trunk/Plugins/splash.dll: Now really doesn't freeze (just
+ recompiled... odd)
- * Examples/one-section.nsi: Now with the new flag values
+2002-09-20 23:02 joostverburg
-2002-10-02 kichik
+ * /NSIS/trunk/Examples/Modern UI/iniA.ini,
+ /NSIS/trunk/Examples/Modern UI/iniB.ini,
+ /NSIS/trunk/Examples/Modern UI/InstallOptions.nsi: test - working
+ on io integration
- * Contrib/Language files/Greek.nlf: Space added after Delete file:
+2002-09-20 22:57 joostverburg
-2002-10-02 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: working on io
+ integration
- * Contrib/Language files/Greek.nlf: Greek language file
+2002-09-20 21:36 justin1014
-2002-10-02 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c: removed unpacking
+ installer msg since it shouldnt be needed if all is working right
- * Contrib/nsExec/nsExec.txt, Contrib/nsExec/nsexec.c: Now doesn't
- crash when using Exec and not ExecToLog. ExecToLog timeout is not
- yet implemented.
+2002-09-20 21:03 kichik
-2002-10-02 kichik
+ * /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Plugins/splash.dll: Now actually exits from the
+ message loop
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/script.cpp, Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h: 94 bytes saved. LangString should now
- work with sub-sections too.
+2002-09-20 20:54 kichik
-2002-10-02 joostverburg
+ * /NSIS/trunk/Contrib/Splash/splash.dsp: Less linkage
- * Examples/Modern UI/ModernUI.nsh: Details back when using IO
+2002-09-20 20:53 justin1014
-2002-10-02 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: updated mouseover text etc
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Fixed running
- from context menu
+2002-09-20 20:51 kichik
-2002-10-02 kichik
+ * /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Plugins/splash.dll: Doesn't kill NSIS :)
- * Source/exehead/exec.c: FindWindow $0 works again
+2002-09-20 20:49 joostverburg
-2002-10-02 joostverburg
+ * /NSIS/trunk/Contrib/ShowWin,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.c,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.dpr,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.dsp,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.dsw,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.nsi,
+ /NSIS/trunk/Contrib/ShowWin/ShowWin.txt,
+ /NSIS/trunk/Plugins/ShowWin.dll: *** empty log message ***
- * Examples/Modern UI/MultiLanguage.nsi: Default description text:
- dialog control ID should be 1043 instead of ${LANG_DUTCH}
+2002-09-20 20:44 eccles
-2002-10-02 justin1014
+ * /NSIS/trunk/Plugins/InstallOptions.dll: dll updated from earlier
+ source changes -
+ Down to 11K.
+ Negative positions were not being adjusted by the dialog size
+ correctly.
+ Fixed problem with negative positions and 'large fonts'.
+ File/DirRequests now the correct size (size of browse button was
+ not being taken into account correctly).
+ Removed tabstops from statics.
- * Source/build.cpp: made some output info slightly prettier
+2002-09-20 20:41 justin1014
-2002-10-02 justin1014
+ * /NSIS/trunk/Examples/makensis.nsi: Made contrib/source more
+ organized.. needs modernui mouseovers updated
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/utils.cpp: fixed another makensisw bug (two stray
- chars after text for me) -- hopefully this didn't break anything
+2002-09-20 20:40 kichik
-2002-10-02 justin1014
+ * /NSIS/trunk/Contrib/Splash/splash.txt: Converted to plugin DLL
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp: fixed a bug when
- running makensisw from the command line
+2002-09-20 20:34 kichik
-2002-10-02 rainwater
+ * /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Contrib/Splash/splash.dsp: Converted to plugin DLL
- * nsisconf.nsh: Cleaned up format a little
+2002-09-20 20:33 kichik
-2002-10-02 rainwater
+ * /NSIS/trunk/Plugins/splash.dll: Splash converted to plugin DLL
- * Docs/AppendixA.html, Docs/src/history.but: I can't read.
+2002-09-20 20:21 joostverburg
-2002-10-02 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: *** empty log
+ message ***
- * Docs/AppendixA.html, Docs/src/history.but: Updated History
+2002-09-20 20:11 joostverburg
-2002-10-02 rainwater
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: Bugfixes, no
+ hard-coded names, io support
- * nsisconf.nsh, nsisconf.nsi, Docs/Chapter2.html,
- Docs/Chapter3.html, Docs/src/script.but, Docs/src/usage.but,
- Examples/makensis.nsi, Source/makenssi.cpp: Renamed nsisconf.nsi to
- nsisconf.nsh since it is really a include file. The NSIS installer
- will rename the nsisconf.nsi file to nsh if present to prevent
- upgrade issues.
+2002-09-20 19:23 rainwater
-2002-10-02 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Smaller about box
- * Contrib/nsExec/nsExec.txt, Contrib/nsExec/nsexec.c: Changed
- default timeout to 15 seconds (from 100 seconds). Returns now if
- CreateProcess fails. Now closes handles if unable to allocate
- memory.
+2002-09-20 19:20 justin1014
-2002-10-01 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: partway through my cleanup of
+ start menu shit
- * Contrib/nsExec/nsexec.c: Logging should work well now
+2002-09-20 19:16 rainwater
-2002-10-01 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Ctrl+L loads a script
- * Source/bzip2/bzlib.h: lol, get my name right will ya justin :)
+2002-09-20 17:43 justin1014
-2002-10-01 justin1014
+ * /NSIS/trunk/Source/makenssi.cpp: updated /HDRINFO text =)
- * Source/zlib/INFBLOCK.C, Source/zlib/trees.c: 30 bytes or so gone
- from zlib, also made stored blocks use 2 bytes less each
+2002-09-20 17:31 justin1014
-2002-10-01 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: made an optional define
+ CLASSIC_UI for disabling modern ui completely =)
- * Source/build.cpp, Source/script.cpp, Source/exehead/exec.c:
- Unprocessed strings (such as InstType) can now use
- LangString/$(name) too. No more "skipped" messages before plugins.
+2002-09-20 17:22 justin1014
-2002-10-01 joostverburg
+ * /NSIS/trunk/Contrib/Icons/modern.bmp: fixed color table not
+ having magenta (doh!)
- * Contrib/Language files/Italian.nlf: Italian language file
+2002-09-20 17:16 justin1014
-2002-10-01 joostverburg
+ * /NSIS/trunk/Contrib/Icons/checks1.bmp,
+ /NSIS/trunk/Contrib/Icons/checks2.bmp,
+ /NSIS/trunk/Contrib/Icons/checks4.bmp,
+ /NSIS/trunk/Contrib/Icons/checks4-aa.bmp,
+ /NSIS/trunk/Contrib/Icons/checksX.bmp,
+ /NSIS/trunk/Contrib/Icons/checksX2.bmp,
+ /NSIS/trunk/Contrib/Icons/jarsonic-checks.bmp,
+ /NSIS/trunk/Contrib/Icons/lucas-checks.bmp,
+ /NSIS/trunk/Contrib/Icons/modern.bmp: updated to work with new
+ mask code
- * Contrib/Language files/Hungarian.nlf: Hungarian language file
+2002-09-20 17:11 justin1014
-2002-10-01 rainwater
+ * /NSIS/trunk/Source/exehead/bitmap1.bmp: updated with
+ magentagaynessbg[tm]
- * Contrib/nsExec/nsexec.c: Added return value to nsExex. Logging
- still broke.
+2002-09-20 17:08 justin1014
-2002-10-01 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: using ImageList_AddMasked for
+ checkbitmaps.. need to update all the checkbitmaps accordingy
- * Source/build.cpp, Source/lang.cpp, Source/script.cpp,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/lang.h, Source/exehead/ui.h, Source/exehead/util.c,
- Source/exehead/util.h: bzip2 header down to 34KB, 54 bytes away
- from 34.5KB zlib. Fixed a bug with ReadRegStr and $0.
+2002-09-20 16:22 kichik
-2002-10-01 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Log window width now back to
+ normal (no horizontal scroll bar)
- * Docs/AppendixA.html, Docs/Chapter10.html, Docs/Chapter4.html,
- Docs/Chapter11.html, Docs/Chapter12.html, Docs/Chapter13.html,
- Docs/Chapter14.html, Docs/Chapter15.html, Docs/Chapter16.html,
- Docs/Chapter17.html, Docs/Chapter18.html, Docs/Chapter19.html,
- Docs/Chapter20.html, Docs/Chapter21.html, Docs/Chapter22.html,
- Docs/Chapter23.html, Docs/Chapter24.html, Docs/Chapter25.html,
- Docs/Chapter26.html, Docs/Chapter5.html, Docs/Chapter6.html,
- Docs/Chapter7.html, Docs/Chapter8.html, Docs/Chapter9.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/attributes.but, Docs/src/basic.but, Docs/src/build.bat,
- Docs/src/callback.but, Docs/src/compiler.but,
- Docs/src/compilerflags.but, Docs/src/defines.but,
- Docs/src/file.but, Docs/src/flowcontrol.but,
- Docs/src/functions.but, Docs/src/generalpurpose.but,
- Docs/src/int.but, Docs/src/labels.but, Docs/src/log.but,
- Docs/src/makefile, Docs/src/misc.but, Docs/src/plugin.but,
- Docs/src/reboot.but, Docs/src/registry.but, Docs/src/sec.but,
- Docs/src/sections.but, Docs/src/stack.but, Docs/src/uninstall.but,
- Docs/src/var.but: Updated docs
+2002-09-20 14:52 rainwater
-2002-10-01 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: F1 shows docs
- * Contrib/InstallOptions/InstallerOptions.cpp: CancelConfirmIcon >
- CancelConfirmFlags in changelog
+2002-09-20 14:37 rainwater
-2002-10-01 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: New About Boxes
- * Source/zlib/INFLATE.C, Source/zlib/ZLIB.H: 2 bytes removed from
- zlib hehe long way to go to catch up to bzip2
+2002-09-20 12:11 rainwater
-2002-10-01 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: flicker-free
- * Source/exehead/fileform.c: made bzip2 mode slightly smaller by
- making reinit stuff not necessary
+2002-09-20 12:01 rainwater
-2002-10-01 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp: forgot to update
+ project
- * Source/exehead/fileform.c, Source/bzip2/bzlib.c,
- Source/bzip2/bzlib.h, Source/bzip2/decompress.c: even smaller bzip2
- code
+2002-09-20 11:53 rainwater
-2002-10-01 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/shell.ico,
+ /NSIS/trunk/Examples/makensis.nsi: added .nsi shell icon
- * Source/exehead/exehead-bzip2.dsp, Source/makenssi.dsp: removed
- bzlib_private.h dependency
+2002-09-20 05:12 rainwater
-2002-10-01 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: Test->Test Installer
+ (less confusion)
- * Source/bzip2/blocksort.c, Source/bzip2/bzlib.c,
- Source/bzip2/bzlib.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/bzlib_private.h,
- Source/bzip2/huffman.c: updated bzip2 for cleanliness, still some
- good reorganizations yet
+2002-09-20 05:11 rainwater
-2002-10-01 justin1014
+ * /NSIS/trunk/Examples/makensis.nsi: Readme.png->Readme.jpg (Modern
+ UI change in installer)
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/bzlib_private.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/randtable.c,
- Source/exehead/config.h, Source/exehead/exehead-bzip2.dsp,
- Source/exehead/fileform.c: made bzip2 smaller than zlib mode !!!
+2002-09-20 02:57 rainwater
-2002-10-01 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Smoother resizing
- * Examples/Modern UI/InstallOptions.nsi: CancelConfirmIcon becomes
- CancelConfirmFlags with extra options
+2002-09-20 02:43 rainwater
-2002-10-01 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Added resize
+ gripper....finally.
- * Contrib/InstallOptions/Install Options.html,
- Contrib/InstallOptions/InstallerOptions.cpp: CancelConfirmIcon
- becomes CancelConfirmFlags with extra options
+2002-09-20 00:53 rainwater
-2002-09-30 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Added Context Menu in
+ log window
- * Source/exehead/exec.c, makensis.exe: CreateShortcut comment
- memory corruption
+2002-09-19 22:38 rainwater
-2002-09-30 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp: Code cleanup
- * Source/exehead/Ui.c: Minor code savings
+2002-09-19 22:25 eccles
-2002-09-30 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/Ui.c: Shaved off another 104 bytes of
+ code.
+ exehead_bzip2 is now 37.5K.
- * makensis.exe: Folder instead of Directory
+2002-09-19 21:53 eccles
-2002-09-30 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Shaved off 208 bytes of code
- * Source/lang.cpp: Folder instead of Directory
+2002-09-19 21:10 joostverburg
-2002-09-30 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: Better support for
+ code between macro's
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf: Folder instead of Directory
+2002-09-19 18:41 joostverburg
-2002-09-30 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: Typo :)
- * Source/lang.cpp: Removed debug messages
+2002-09-19 17:57 joostverburg
-2002-09-30 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Readme.png: *** empty log message
+ ***
- * makensis.exe: comp page back :)
+2002-09-19 17:55 joostverburg
-2002-09-30 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/Readme.jpg: Updated Readme
- * Source/lang.cpp: Counts sections right again
+2002-09-19 16:42 kichik
-2002-09-30 justin1014
+ * /NSIS/trunk/Source/makenssi.cpp: Shows the right name when can't
+ open script (doesn't show the .nsi appended)
- * Source/zlib/INFTREES.C, Source/zlib/INFTREES.H: another 20--30 or
- so
+2002-09-19 16:31 rainwater
-2002-09-30 justin1014
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/defines.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/registry.but,
+ /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/string.but,
+ /NSIS/trunk/Docs/src/var.but, /NSIS/trunk/Docs/style.css: Docs
+ updates. More to come.
- * Source/zlib/INFBLOCK.C, Source/zlib/INFBLOCK.H,
- Source/zlib/INFCODES.C, Source/zlib/INFCODES.H,
- Source/zlib/INFLATE.C, Source/zlib/INFTREES.C,
- Source/zlib/INFTREES.H, Source/zlib/INFUTIL.C,
- Source/zlib/INFUTIL.H, Source/zlib/ZLIB.H: big ass size savings in
- zlib mode :)
+2002-09-19 16:27 rainwater
-2002-09-30 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: don't add icon.ico, remove
+ license.txt
- * makensis.exe: lang.cpp fix
+2002-09-19 16:14 kichik
-2002-09-30 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: h not k :)
- * makensis.exe: Language strings etc.
+2002-09-19 15:57 kichik
-2002-09-30 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Plugins/nsisdl.dll: Added /TIMEOUT= option
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/ModernUI.nsh,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/Readme.html: version 1.21
+2002-09-19 15:57 joostverburg
-2002-09-30 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Works with Modern UI 1.19
- * Source/lang.cpp: Prevent possible crash
+2002-09-19 15:56 rainwater
-2002-09-30 kichik
+ * /NSIS/trunk/Source/icon.ico: removed
- * Source/lang.cpp: Now considers the first section too when
- deciding if the components page should be shown. Also doesn't show
- the components page if all sections are RO.
+2002-09-19 15:56 rainwater
-2002-09-30 rainwater
+ * /NSIS/trunk/Source/makenssi.dsp, /NSIS/trunk/Source/resource.h,
+ /NSIS/trunk/Source/Script1.rc: removed icon to distinguish
+ makensis and makensisw
- * Docs/AppendixA.html, Docs/src/history.but: Updated history
+2002-09-19 15:50 joostverburg
-2002-09-30 justin1014
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.19 - macro
+ system changes
- * Source/zlib/INFBLOCK.C, Source/zlib/INFLATE.C: 52 bytes off of
- zlib
+2002-09-19 15:29 rainwater
-2002-09-30 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Makensisw now uses nsis
+ version as branding. Added tooltips, updated icon.
- * Source/zlib/INFBLOCK.C, Source/zlib/INFLATE.C,
- Source/zlib/INFUTIL.C, Source/zlib/INFUTIL.H, Source/zlib/ZLIB.H:
- cut around 30 bytes of code off of zlib mode (room for more tho)
+2002-09-19 15:27 joostverburg
-2002-09-30 justin1014
+ * /NSIS/trunk/Plugins/ShowWin.dll: Show/Hide dialog items
- * Source/exehead/fileform.c: cut a few bytes of bzip2 mode
+2002-09-18 23:28 justin1014
-2002-09-30 joostverburg
+ * /NSIS/trunk/Source/exehead/util.c: used my opt instead of eccles,
+ actually smaller (and made both bzip2 and zlib drop by 0.5k yay!)
- * Examples/languages.nsi: comment update
+2002-09-18 23:19 justin1014
-2002-09-30 kichik
+ * /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c: updated with a lot of .data
+ size optimizations.. used eccles' optimization for certain
+ registry settings too (thanks dave).. code size may have gone
+ slightly up,but it let me take a lot of data size off (had to
+ change some of the default error msgs too)
- * Source/lang.cpp: Err... now works :)
+2002-09-18 22:30 justin1014
-2002-09-30 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: tiny size decrease yay
- * Source/bzip2/decompress.c: heh few more bytes saved
+2002-09-18 21:49 justin1014
-2002-09-30 justin1014
+ * /NSIS/trunk/Plugins/nsisdl.dll: oops forgot to commit this
- * Source/bzip2/decompress.c: woohoo big savings, bzip2 is now 36.0k
- for me at least
+2002-09-18 21:21 justin1014
-2002-09-30 justin1014
+ * /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/fileform.c: better no-compression mode
- * Source/build.cpp: fixed so it would compile :)
+2002-09-18 21:20 justin1014
-2002-09-29 kichik
+ * /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c,
+ /NSIS/trunk/Source/bzip2/randtable.c: made bzip2 not get compiled
+ when compression is disabled
- * Source/build.cpp: Now really doesn't crash :)
+2002-09-18 19:08 justin1014
-2002-09-29 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp: Fuxing things up making things
+ compile/smaller when lots of options are disabled.
- * Source/build.cpp: Now doesn't crash if the closing bracket ')'
- couldn't be found
+2002-09-18 18:44 rainwater
-2002-09-29 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Added docs to installer
- * Source/build.cpp: Now shows the number of language tables in the
- summary.
+2002-09-18 18:42 justin1014
-2002-09-29 kichik
+ * /NSIS/trunk/Source/exehead/config.h: added
+ NSIS_CONFIG_ENHANCEDUI_SUPPORT
- * Source/tokens.cpp: LangString usage string updated
+2002-09-18 18:39 justin1014
-2002-09-29 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/script.cpp:
+ Added NSIS_CONFIG_ENHANCEDUI_SUPPORT to config.h
- * Source/build.cpp, Source/build.h: cur_userlangstrings removed, no
- need.
+2002-09-18 18:16 justin1014
-2002-09-29 kichik
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp: updated to 1.2, added
+ timeout
- * Examples/languages.nsi, Source/build.cpp, Source/build.h,
- Source/lang.cpp, Source/lang.h, Source/script.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/tokens.h,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/ui.h: Added user defined multilingual strings.
- Define using LangString [un.]name lang_id string, use with $(name).
- Can't be used inside other strings.
+2002-09-18 17:29 rainwater
-2002-09-29 joostverburg
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/callback.but,
+ /NSIS/trunk/Docs/src/compiler.but,
+ /NSIS/trunk/Docs/src/defines.but,
+ /NSIS/trunk/Docs/src/plugin.but,
+ /NSIS/trunk/Docs/src/usection.but: Finished doc port
- * Docs/Chapter4.html: CreateShortcut comment
+2002-09-18 16:59 rainwater
-2002-09-29 kichik
+ * /NSIS/trunk/Docs/src/build.bat: added plugin
- * Contrib/Language files/Dutch.nlf, Contrib/Language
- files/English.nlf, Contrib/Language files/French.nlf,
- Contrib/Language files/German.nlf, Contrib/Language
- files/Korean.nlf, Contrib/Language files/Russian.nlf,
- Contrib/Language files/SimpChinese.nlf, Contrib/Language
- files/Slovak.nlf, Contrib/Language files/Spanish.nlf,
- Contrib/Language files/TradChinese.nlf: Delete file: now has a
- space after it
+2002-09-18 16:34 rainwater
-2002-09-28 joostverburg
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/int.but, /NSIS/trunk/Docs/src/log.but,
+ /NSIS/trunk/Docs/src/misc.but, /NSIS/trunk/Docs/src/reboot.but,
+ /NSIS/trunk/Docs/src/sec.but, /NSIS/trunk/Docs/src/stack.but,
+ /NSIS/trunk/Docs/src/string.but,
+ /NSIS/trunk/Docs/src/uninstall.but, /NSIS/trunk/Docs/src/var.but:
+ Finished instructions for docs
- * makensis.exe: CreateShortcut comment etc.
+2002-09-18 15:39 rainwater
-2002-09-28 eccles
+ * /NSIS/trunk/Docs/src/build.bat, /NSIS/trunk/Docs/src/file.but:
+ Added file instructions
- * Source/bzip2/bzlib_private.h, Source/bzip2/randtable.c: Saved
- another 48 bytes of data for bzip2 (at the expense of 6 extra code
- bytes). bzip2 'randtable' not being initialised in makensis.
+2002-09-18 15:27 rainwater
-2002-09-28 kichik
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/flowcontrol.but: Add flow control
+ instructions
- * Docs/src/generalpurpose.but: CreateShortCut description added
+2002-09-18 14:47 kichik
-2002-09-28 eccles
+ * /NSIS/trunk/Source/exehead/Ui.c: Removed debug message box
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib_private.h,
- Source/bzip2/decompress.c: 338 bytes (code) saved from bzip2
+2002-09-18 14:46 kichik
-2002-09-27 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Threading issues should now be
+ solved
- * Docs/Chapter4.html, Docs/Chapter8.html, Docs/Chapter9.html:
- Latest build of the docs
+2002-09-18 14:21 kichik
-2002-09-27 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Nasty threading bug should now
+ be fixed
- * Examples/makensis.nsi: Showwina and System source were all mixed
- up
+2002-09-18 14:03 rainwater
-2002-09-27 justin1014
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/generalpurpose.but: Added general purpose
+ instructions
- * Source/zlib/INFBLOCK.C, Source/zlib/INFLATE.C,
- Source/zlib/INFUTIL.H: reduced zlib size by 16 or so
+2002-09-18 13:53 rainwater
-2002-09-27 justin1014
+ * /NSIS/trunk/Docs/src/registry.but: added registry instructions
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib_private.h: more bzip
- size savings (made it so our bzip2 can only decompress one thing at
- a time, though, which is fine cause thats what we use anyway)
+2002-09-18 13:42 kichik
-2002-09-27 justin1014
+ * /NSIS/trunk/Source/script.cpp: Wasn't a typo after all
- * Docs/src/sec.but: fixed typo of file type vs install type
+2002-09-17 19:49 kichik
-2002-09-27 justin1014
+ * /NSIS/trunk/Source/script.cpp: Another typo (what's a mmap?)
- * Source/bzip2/bzlib_private.h, Source/bzip2/decompress.c,
- Source/bzip2/randtable.c, Source/exehead/fileform.c: bzip2 mode
- reduced down to 36.5kb. yay.
+2002-09-17 19:45 kichik
-2002-09-27 justin1014
+ * /NSIS/trunk/Source/script.cpp: Typo fixed
- * Source/exehead/fileform.c, Source/bzip2/bzlib_private.h,
- Source/bzip2/randtable.c: more bzip2 code reduction, disabled data
- reduction for now so we can hit targets
+2002-09-17 14:39 rainwater
-2002-09-27 justin1014
+ * /NSIS/trunk/Docs/src/basic.but, /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/registry.but: Some updated docs. More to
+ come in a minute.
- * Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/decompress.c: 50ish bytes of bzip2 code removed
+2002-09-17 14:24 rainwater
-2002-09-27 justin1014
+ * /NSIS/trunk/Docs/src/bin/halibut.exe: Updated halibut
- * Source/bzip2/bzlib_private.h: 6 bytes or so saved in bzip2
+2002-09-16 12:48 kichik
-2002-09-27 justin1014
+ * /NSIS/trunk/Source/exehead/fileform.c: Now compiles without
+ NSIS_CONFIG_SILENT_SUPPORT too
- * Source/bzip2/bzlib_private.h, Source/bzip2/randtable.c,
- Source/exehead/fileform.c: made bzip2 mode have 336 bytes less
- data, but about 60 bytes more code.
+2002-09-14 09:47 kichik
-2002-09-27 justin1014
+ * /NSIS/trunk/Examples/WinMessages.NSH: Added HWND_BROADCAST
- * Docs/src/compilerflags.but, Docs/Chapter4.html: updated
- setcompress option
+2002-09-14 09:43 kichik
-2002-09-27 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: Sets the log window width before
+ logging starts, faster, and works when calling a DLL that logs
+ something before any other command
- * Docs/src/compilerflags.but, Docs/Chapter4.html: updated
- setdatablockoptimize docs
+2002-09-14 00:43 rainwater
-2002-09-27 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h: Updated usage info.
+ Last one was really stupid. This one is a tad better.
- * nsisconf.nsi: removed setdatablockoptimize reference, cause you
- should always use it these days
+2002-09-13 23:09 justin1014
-2002-09-27 eccles
+ * /NSIS/trunk/Source/script.cpp: made SendMessage command logic
+ more sensitive
- * Contrib/InstallOptions/Install Options.html: Clicking [x] behaves
- the same as Cancel (thank's brainsucker). Saved 224 bytes.
+2002-09-13 22:07 kichik
-2002-09-27 eccles
+ * /NSIS/trunk/Source/exehead/exec.c: Back to 37KB
- * Contrib/InstallOptions/InstallerOptions.cpp: Clicking [x] behaves
- the same as Cancel (thank's brainsucker). Saved 224 bytes.
+2002-09-13 21:25 justin1014
-2002-09-26 kichik
+ * /NSIS/trunk/Source/script.cpp: forgot to have it skip the STR: :)
- * Source/exehead/Ui.c: Another 12 bytes
+2002-09-13 21:23 joostverburg
-2002-09-26 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.18
- * Source/exehead/Ui.c: Section check marks are now changeable in
- .onNextPage/.onPrevPage after/before the components page. Code size
- is down by 12 bytes because of this :)
+2002-09-13 21:23 justin1014
-2002-09-26 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ increased instruction parameter count to 6, made SendMessage
+ support strings differently and made it support timeouts
- * Examples/Modern UI/MultiLanguage.nsi: fixed temp var bug, uses
- LANG vars
+2002-09-13 21:17 joostverburg
-2002-09-26 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: version 1.18
- * Examples/makensis.nsi: fixed showwin source
+2002-09-13 21:17 joostverburg
-2002-09-26 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: version 1.18: Uses
+ the new SendMessage string option
- * Examples/makensis.nsi: showwin.txt at the correct location :)
+2002-09-13 20:59 justin1014
-2002-09-26 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c: Changed SendMessage:
+ WM_SETTEXT no longer implies string (hack), and lParam and wParam
+ can pass strings if they begin with STR:
- * Examples/makensis.nsi: added plugins
+2002-09-13 19:48 kichik
-2002-09-26 rainwater
+ * /NSIS/trunk/Source/makenssi.cpp: Added /version command line
+ option
- * Contrib/Language files/Russian.nlf: brainsucker's russian
- language update
+2002-09-13 19:22 rainwater
-2002-09-25 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h: Updated usage
- * Contrib/System/Last Comments.txt, Contrib/System/SystemEx.nsi:
- removed (need to be updated)
+2002-09-13 18:12 justin1014
-2002-09-25 rainwater
+ * /NSIS/trunk/Source/exehead/Main.c: cleanups to command lien parm
+ shit, smaller now
- * Examples/makensis.nsi: Updated to use new ModernUI
+2002-09-13 18:00 justin1014
-2002-09-25 joostverburg
+ * /NSIS/trunk/Source/exehead/Main.c: made uninstall pass generic
+ parms back (other than ones beginning with /)
- * Examples/Modern UI/ModernUI.nsh: better names for temp vars
+2002-09-13 15:53 kichik
-2002-09-25 joostverburg
+ * /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp: Script1.rc moved to
+ resources
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/ModernUI.nsh,
- Examples/Modern UI/MultiLanguage.nsi: temp vars defined by header
- file, currentpage & io vars should be set using macro parameters
+2002-09-13 15:04 kichik
-2002-09-25 joostverburg
+ * /NSIS/trunk/Source/script.cpp: Macros output back to normal
- * Contrib/Language files/Dutch.nlf: [no log message]
+2002-09-13 14:58 kichik
-2002-09-25 rainwater
+ * /NSIS/trunk/Examples/languages.nsi: Uses the new ${LANG_LangName}
+ feature
- * Contrib/Makensisw/Readme.txt: Updated readme. Path to
- makensis.exe is no longer used in the command-line.
+2002-09-13 14:20 kichik
-2002-09-25 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Second try
- * Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: 6 more bytes down
+2002-09-13 14:10 kichik
-2002-09-25 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Bug fixed
- * Examples/WinMessages.NSH: Prevent multiple inclusion of !defines
+2002-09-13 09:59 kichik
-2002-09-25 kichik
+ * /NSIS/trunk/Source/script.cpp: Now defines ${LANG_LangName} as
+ the id of the language when loading a NLF. For example:
+ ${LANG_ENGLISH}=1033
- * Source/script.cpp, Source/tokens.cpp, Source/exehead/exec.c,
- Source/exehead/util.c: Shortcut comment option added, 44 bytes
- saved.
+2002-09-12 19:34 kichik
-2002-09-25 justin1014
+ * /NSIS/trunk/Examples/makensis.nsi: Desktop shortcut to
+ makensisw.exe without makensis.exe
- * Source/exehead/fileform.c: made bzip2 extraction slightly more
- pedantic
+2002-09-12 16:21 kichik
-2002-09-25 justin1014
+ * /NSIS/trunk/Source/tokens.cpp: Typo fixed
- * Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/fileform.h: another 30 or
- so bytes saved, by modifying readSelfFile to do all length
- checking. Not sure if I broke anything though =)
+2002-09-12 16:16 kichik
-2002-09-25 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Now logs as should even
+ if text is selected/cart positions changes
- * Source/exehead/exec.c: another 8 bytes saved
+2002-09-12 11:47 kichik
-2002-09-25 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: Back to 37KB
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/bgbg.c, Source/exehead/state.h: more byte saveage
+2002-09-12 11:21 kichik
-2002-09-25 justin1014
+ * /NSIS/trunk/Contrib/Language files/TradChinese.nlf: small change
- * Source/exehead/Ui.c: a handful of bytes saved again
+2002-09-11 15:39 rainwater
-2002-09-25 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/resource.rc: always show scrollbar
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/util.c, Source/exehead/util.h: cut another 30 bytes
- or so off. also made atoi take negative octal/hex numbers.
+2002-09-11 15:07 rainwater
-2002-09-25 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Clipboard changes
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/util.c, Source/exehead/util.h: 6 bytes saved (made
- addtrailingslash return char *)
+2002-09-11 12:04 rainwater
-2002-09-25 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: don't free memory
- * Contrib/Makensisw/resource.rc, makensisw.exe: Moved "Recompile"
- and "Test Installer" to "Tools" menu.
+2002-09-11 02:15 rainwater
-2002-09-25 eccles
+ * /NSIS/trunk/Source/exehead/nsis.ico: Updated NSIS icon
- * Source/exehead/Main.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/fileform.h: 60 bytes
- saved. zlib exehead is now 35.5K.
+2002-09-11 02:14 rainwater
-2002-09-25 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: Register .nsh files with
+ notepad like .nsi files except no compile options.
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, makensisw.exe: Added "Clear Log"
- command. "Clear Log" and "Edit Script" are now under a new "Tools"
- menu. Removed some unused resources.
+2002-09-11 00:26 rainwater
-2002-09-24 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Added ctrl+c support at
+ the window level. Exit is now Alt+X. Free clipboard memory.
- * Examples/Modern UI/MultiLanguage.nsi: writes language to registry
- for uninstaller
+2002-09-10 20:04 eccles
-2002-09-24 eccles
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: Down to
+ 11K.
+ Negative positions were not being adjusted by the dialog size
+ correctly.
+ Fixed problem with negative positions and 'large fonts'.
+ File/DirRequests now the correct size (size of browse button was
+ not being taken into account correctly).
+ Removed tabstops from statics.
- * Source/exehead/exec.c: 200 bytes saved! Drum-roll... bzip2
- exehead is now 37K. Next target - 50 bytes to get zlib exehead
- down to 35.5K.
+2002-09-10 19:25 joostverburg
-2002-09-24 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.17
- * Examples/makensis.nsi: Removed /CD from shortcut
+2002-09-10 19:20 joostverburg
-2002-09-24 rainwater
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh: version 1.17 - Win9x
+ font weight bug fixed (font of title in white rect)
- * Contrib/Makensisw/Readme.txt: Updated shortcuts
+2002-09-10 19:19 joostverburg
-2002-09-24 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: version 1.17
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp: Removed int
- declarations
+2002-09-10 19:11 rainwater
-2002-09-24 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Added Select All
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h: Context Menu object reference is
- re-used each time.
+2002-09-10 16:36 kichik
-2002-09-24 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Find dialog added
- * cvs - changelog.txt: gone (on website now)
+2002-09-10 15:49 rainwater
-2002-09-24 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: NSIS 2 is no longer a
+ mod
- * makensis.exe: rtest.nsi crash bug fixed
+2002-09-10 15:09 kichik
-2002-09-24 kichik
+ * /NSIS/trunk/Examples/languages.nsi: Simplified Chinese added
- * Source/build.cpp: rtest.nsi crash bug fixed
+2002-09-10 15:04 kichik
-2002-09-24 rainwater
+ * /NSIS/trunk/Examples/languages.nsi: Type fixed, now compiles
- * cvs - changelog.txt: Update
+2002-09-10 15:01 kichik
-2002-09-24 kichik
+ * /NSIS/trunk/Contrib/Language files/German.nlf: Header changed to
+ v2
- * Source/build.cpp: Now actually compiles :)
+2002-09-10 13:50 kichik
-2002-09-24 kichik
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Now scrolls on Windows
+ 9x as it should
- * Source/build.cpp: Icon sizes mismatch bug fixed
+2002-09-10 12:05 rainwater
-2002-09-23 eccles
+ * /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/functions.but,
+ /NSIS/trunk/Docs/src/history.but,
+ /NSIS/trunk/Docs/src/labels.but,
+ /NSIS/trunk/Docs/src/sections.but: Added sections, functions, and
+ labels. Now only instructions is left
- * Source/exehead/Ui.c: 40 bytes saved
+2002-09-10 03:44 rainwater
-2002-09-23 eccles
+ * /NSIS/trunk/Contrib/zip2exe/icon.ico,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/res.rc,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.xml: Updated Zip2Exe's GUI
- * Source/exehead/Ui.c: Tidied - removed some legacy language stuff.
- No change to compiled output.
+2002-09-09 23:33 rainwater
-2002-09-23 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Examples/makensis.nsi: Updated urls to point to new
+ home page (nsis != nsis2k)
- * Source/build.cpp, Source/util.cpp, Source/exehead/exec.c: 18
- bytes down
+2002-09-09 23:02 rainwater
-2002-09-23 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Added Load Script option
+ on File menu and fixed save output string filter
- * Contrib/Language files/Slovak.nlf: [no log message]
+2002-09-09 19:59 uid27073
-2002-09-23 rainwater
+ * /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.dsp: makensis.exe path is not
+ in the 'bin' directory
- * cvs - changelog.txt: Update
+2002-09-09 19:20 rainwater
-2002-09-22 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: no crash
- * Examples/makensis.nsi: Plugins now have their own sub section
- inside the contrib subsection
+2002-09-09 18:19 rainwater
-2002-09-22 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Free up memory
- * Source/bzip2/bzlib_private.h, Source/zlib/ZUTIL.H: Use exehead's
- my_GlobalAlloc
+2002-09-09 17:56 rainwater
-2002-09-22 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: no icon
- * Source/lang.cpp: made NLF_ERR_WRITING etc in silent installers
- too
+2002-09-09 17:51 rainwater
-2002-09-22 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Can't drag while
+ compiling
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/util.c, Source/exehead/util.h: 80 bytes saved
+2002-09-09 17:25 rainwater
-2002-09-22 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc: Updated icon
- * Source/lang.cpp: updated language string adding to check more for
- NSIS_VISIBLE_SUPPORT or whatnot. Check to make sure this is OK.
- Thanks, Justin.
+2002-09-09 16:43 rainwater
-2002-09-22 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h: Drag and Drop Support into
+ the Makensisw window
- * Source/build.cpp: fixed no-compression but uninstaller mode
+2002-09-09 16:33 joostverburg
-2002-09-22 joostverburg
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: updated version
+ number
- * makensis.exe: latest stuff
+2002-09-08 14:22 kichik
-2002-09-22 eccles
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.cpp: Version change
- * Source/exehead/exec.c: 4 byte saving. woooo.
+2002-09-08 13:43 kichik
-2002-09-22 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Test button is now only
+ enabled if there were no errors during compilation
- * Examples/Modern UI/Readme.html: links to the new
- nsis.sourceforge.net page
+2002-09-08 11:02 sunjammerx
-2002-09-22 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Return key detection in richedit
+ control now implemented correctly.
- * Examples/makensis.nsi: Updated for Modern UI 1.20 - No .h files
- in Contrib\nsExec
+2002-09-07 21:33 sunjammerx
-2002-09-22 joostverburg
+ * /NSIS/trunk/Source/exehead/Ui.c: Return key now works on licence
+ page at the same time as the "give initial focus to licence text"
+ patch :)
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/ModernUI.nsh,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/Readme.html: version 1.20
+2002-09-07 20:49 kichik
-2002-09-22 joostverburg
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Renamed my_alloc to
+ my_GlobalAlloc
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/InstallOptions.nsi, Examples/Modern UI/ModernUI.nsh: Updated
- macro system
+2002-09-07 12:57 kichik
-2002-09-22 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Now tries to unselect
+ before logging
- * Examples/Modern UI/MultiLanguage.nsi: Updated macro system &
- LangDLL usage
+2002-09-07 12:04 kichik
-2002-09-22 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Another buffer overflow
+ bug fixed
- * Examples/Modern UI/iniC.ini: text=iniC
+2002-09-07 10:23 kichik
-2002-09-22 joostverburg
+ * /NSIS/trunk/Docs/src/history.but: Link to complete version
+ history added
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/ModernUI.nsh: added io nextpage/prevpage macro's
+2002-09-06 22:18 kichik
-2002-09-22 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Recompiling caussed
+ memory leaks - fixed
- * Docs/Chapter10.html, Docs/src/plugin.but: Plugin docs fixes
- (/NOUNLOAD flag stuff)
+2002-09-06 21:54 kichik
-2002-09-22 joostverburg
+ * /NSIS/trunk/Plugins/InstallOptions.dll: Smaller DLL by eccles
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/ModernUI.nsh, Examples/Modern UI/iniB.ini, Examples/Modern
- UI/iniC.ini, Examples/Modern UI/Readme.html: Support for multiple
- IO pages in a row
+2002-09-06 21:38 kichik
-2002-09-22 kichik
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Copy now uses
+ GMEM_MOVEABLE
- * Examples/languages.nsi: New plugin calling convention
+2002-09-06 21:02 justin1014
-2002-09-22 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: made SetCurrentDirectory check
+ for error for /CD
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/ModernUI.nsh: test - added info about MUI_INSTALLOPTIONS_INIT
+2002-09-06 20:59 kichik
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Long lines bug fixed.
+ Now gets the whole path of the script and the output exe.
- * Examples/Modern UI/Readme.html: [no log message]
+2002-09-06 20:19 kichik
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Buffer bugs fixed,
+ should work better. Hopefully it won't crash anymore.
- * Contrib/System/Buffers.c, Contrib/System/Buffers.h,
- Contrib/System/Last Comments.txt, Contrib/System/Plugin.c,
- Contrib/System/Plugin.h, Contrib/System/System.c,
- Contrib/System/System.h, Contrib/System/System.ncb,
- Contrib/System/System.sln, Contrib/System/System.txt,
- Contrib/System/System.vcproj, Contrib/System/SystemEx.nsi,
- Contrib/System/stdafx.c, Contrib/System/stdafx.h: System plugin
+2002-09-06 20:16 rainwater
-2002-09-21 justin1014
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/sections.but: added part of the sections
+ docs
- * makensis.exe: updated with new plugin calling convention
+2002-09-06 19:58 joostverburg
-2002-09-21 justin1014
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.16: changed
+ text on license page
- * Contrib/ExDLL/exdll.h: cleanup
+2002-09-06 19:55 joostverburg
-2002-09-21 justin1014
+ * /NSIS/trunk/Examples/Modern UI/Example.nsi,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: changed text on
+ license page: 'scroll down' > 'press page down' because richedit
+ has focus on startup now
- * Contrib/Splash/splash.c, Contrib/Splash/splash.dsp,
- Contrib/Splash/splash.txt: updated splash to new exdll. made it so
- that it always pushes status to the stack even if error occured
+2002-09-06 19:38 sunjammerx
-2002-09-21 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: Much cleaner license focus
+ implementation
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/nsisdl.cpp,
- Contrib/NSISdl/nsisdl.dsp: updated to new format / exdll
+2002-09-06 18:49 sunjammerx
-2002-09-21 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: Alternate means of trapping the
+ SetFocus that blows up setting focus to the license page...
+ suggested by KiCHiK
- * Contrib/nsExec/nsExec.dsp, Contrib/nsExec/nsExec.txt,
- Contrib/nsExec/nsexec.c, Contrib/nsExec/nsexec.h,
- Contrib/nsExec/nsis.c, Contrib/nsExec/nsis.h: updated to new exdll
- interface. note that /TIMEOUT must come before command now.
+2002-09-06 17:29 sunjammerx
-2002-09-21 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: License control gets focus first
+ -- please can someone test this :D.. the Ui.c code gets a bit
+ hairy
- * Contrib/LangDLL/LangDLL.c, Contrib/LangDLL/LangDLL.dsp: updated
- parameter use to new exdll
+2002-09-06 10:57 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Now beeps when there
+ are errors too
- * Source/script.cpp: changed parameters on dlls to be pushed rtl
- instead of ltr (updating plugins now)
+2002-09-06 09:27 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/nsExec/nsExec.dsp: Compiles faster, results
+ are smaller
- * Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/io.dsp: updated with new exdll.h interface
+2002-09-06 09:27 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Plugins/nsExec.dll: Smaller
- * Contrib/ExDLL/exdll.h: added exdll.h that other plugins should
- use, for better version compatibility
+2002-09-05 22:22 eccles
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp:
+ Optimisations phase 1
+ 1.5K saved in total
- * Contrib/ExDLL/exdll.c, Contrib/ExDLL/exdll.dsp: updated exdll
- source
+2002-09-05 21:34 eccles
-2002-09-21 eccles
+ * /NSIS/trunk/Contrib/InstallOptions/io.dsp: Changed optimisation
+ from maximise speed to minimise size
- * Source/exehead/fileform.c: Now *really* only shows the unpacking
- dialog if the NSIS window hasn't been created yet
+2002-09-05 21:09 sunjammerx
-2002-09-21 kichik
+ * /NSIS/trunk/Docs/src/attributes.but: Added PluginDir attribute
- * Source/script.cpp: Macros don't crash makensis if they have bad
- syntax
+2002-09-05 19:39 rainwater
-2002-09-21 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: Check for newline
- * Source/exehead/Ui.c, Source/exehead/fileform.c, makensis.exe: Now
- only shows the unpacking dialog if the NSIS window hasn't been
- created yet
+2002-09-05 18:35 rainwater
-2002-09-21 kichik
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: Stream contents of output (avoid
+ pipe being full)
- * makensis.exe, Source/Plugins.cpp, Source/build.cpp,
- Source/build.h, Source/script.cpp: Installers with plugins now load
- faster too
+2002-09-05 18:00 rainwater
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Plugins/nsExec.dll: Some broken code, but fixes pipe
+ issue
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/iniA.ini, Examples/Modern UI/iniB.ini: test - io example update
+2002-09-05 16:41 rainwater
-2002-09-21 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: add nsExec.dll to installer
- * Examples/Modern UI/ModernUI.nsh: test - added uninst io macro
+2002-09-05 16:31 rainwater
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/nsExec/nsExec.txt,
+ /NSIS/trunk/Plugins/nsExec.dll: Added nsExec.dll and readme file
- * Source/exehead/Main.c, Source/exehead/fileform.c,
- Source/exehead/fileform.h, Source/exehead/lang.h: more updates yay
+2002-09-05 16:24 rainwater
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt: Updated makensisw with
+ new my_strstr by Kickik
- * Source/exehead/Ui.c: ok done for the night. smaller code yay. 248
- bytes left to remove from code to bring bzip2 mode down tho :(
+2002-09-05 16:14 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/nsExec/nsexec.c: Fixed a bug with my_strstr
- * Source/exehead/Ui.c: bunch more size opts
+2002-09-05 13:18 sunjammerx
-2002-09-21 justin1014
+ * /NSIS/trunk/Source/makenssi.cpp: *** empty log message ***
- * Source/exehead/Ui.c, Source/exehead/bgbg.c,
- Source/exehead/exec.c: woohoo 36.0kb for zlib header
+2002-09-05 12:23 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: Memory now unlocks and can
+ now be freed
- * Source/exehead/bgbg.c: 10 bytes off yay
+2002-09-05 12:13 kichik
-2002-09-21 rainwater
+ * /NSIS/trunk/Contrib/Language files/Swedish.nlf: v2
- * cvs - changelog.txt: Update
+2002-09-04 20:47 rainwater
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: added terminate process
- * Source/exehead/Ui.c: renamed notify() to outernotify() and made
- static
+2002-09-04 20:40 rainwater
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/nsExec/nsexec.c: Added ExecToLog
- * Source/exehead/bgbg.c: 2 byte reduction yay
+2002-09-04 19:46 rainwater
-2002-09-21 justin1014
+ * /NSIS/trunk/Contrib/nsExec, /NSIS/trunk/Contrib/nsExec/nsexec.c,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsp,
+ /NSIS/trunk/Contrib/nsExec/nsExec.dsw,
+ /NSIS/trunk/Contrib/nsExec/nsexec.h,
+ /NSIS/trunk/Contrib/nsExec/nsis.c,
+ /NSIS/trunk/Contrib/nsExec/nsis.h: New exec plugin (broke)
- * Source/exehead/exec.c: another 4 byte save
+2002-09-04 18:50 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Examples/languages.nsi: Uses the new plugin call
+ method
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/util.c, Source/exehead/util.h: 2 bytes saved on
- exehead by using my_SetDlgItemText. heh.
+2002-09-04 18:27 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Source/DialogTemplate.cpp: Better RTL, not perfect
+ yet
- * Source/exehead/fileform.c: made "unpacking dialog" dialog only
- come up when the main installer window hasnt' been created yet.
+2002-09-04 18:25 kichik
-2002-09-21 justin1014
+ * /NSIS/trunk/Plugins/InstallOptions.dll: Added Icon and Bitmap
+ controls
- * Source/build.h, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h: Added ReserveFile command (usable anywhere) that
- allows you to put a file in the datablock so that it is preloaded
- for use later. Useful for when you use plugins in .onInit, and bz2
- mode. Need to document this stuff. Anyone? :)
+2002-09-04 18:23 joostverburg
-2002-09-21 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.15.
+ Multilanguage example: changed LangDialog to LangDLL::LangDialog
+ (using the DLL name is now required)
- * Examples/makensis.nsi: splash: exe -> dll
+2002-09-04 18:23 kichik
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: History
+ updated
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/ModernUI.nsh: test - better io macro system
+2002-09-04 18:23 kichik
-2002-09-21 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: Updated
+ info for Icon and Bitmap
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/exehead/Ui.c, Source/exehead/fileform.c,
- Source/exehead/fileform.h: bzip2 installers should now start a lot
- faster
+2002-09-04 18:16 joostverburg
-2002-09-21 kichik
+ * /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: changed
+ LangDialog to LangDLL::LangDialog (dll name is now required)
- * makensis.exe: bzip2 installers should now start a lot faster
+2002-09-04 18:14 kichik
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: Two new
+ control types: Icon and Bitmap
- * Examples/makensis.nsi: [no log message]
+2002-09-04 17:39 kichik
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/Language files/French.nlf: New translation by
+ Veekee
- * Examples/Modern UI/InstallOptions.nsi, Examples/Modern
- UI/iniA.ini, Examples/Modern UI/iniB.ini: test - working on io
- integration
+2002-09-04 17:15 rainwater
-2002-09-21 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: forgot recompile crap
- * Examples/Modern UI/ModernUI.nsh: working on io integration
+2002-09-04 17:12 rainwater
-2002-09-20 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h: Forgot to update usage
+ instructions
- * Source/exehead/fileform.c: removed unpacking installer msg since
- it shouldnt be needed if all is working right
+2002-09-04 17:09 rainwater
-2002-09-20 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Update for new makensisw
- * Contrib/Splash/splash.c: Now actually exits from the message loop
+2002-09-04 17:08 rainwater
-2002-09-20 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: makensisw now takes same
+ paramters as makensis (path to makensis.exe is no longer passed)
- * Contrib/Splash/splash.dsp: Less linkage
+2002-09-04 16:00 kichik
-2002-09-20 justin1014
+ * /NSIS/trunk/Source/Plugins.cpp: Plugin command changed to
+ plugin::command without .dll
- * Examples/makensis.nsi: updated mouseover text etc
+2002-09-04 14:35 kichik
-2002-09-20 kichik
+ * /NSIS/trunk/Contrib/UberSplash/UberSplash.txt: Copmile note added
- * Contrib/Splash/splash.c: Doesn't kill NSIS :)
+2002-09-04 14:28 kichik
-2002-09-20 justin1014
+ * /NSIS/trunk/Source/Plugins.cpp: Now only accepts plug-in calls in
+ the form of dllname[.dll]::FunctionName
+ Prevents clashes with future commands
- * Examples/makensis.nsi: Made contrib/source more organized.. needs
- modernui mouseovers updated
+2002-09-04 13:15 kichik
-2002-09-20 kichik
+ * /NSIS/trunk/Source/makenssi.cpp: Now processes plug-in DLLs only
+ if a script is compiled
- * Contrib/Splash/splash.txt: Converted to plugin DLL
+2002-09-04 13:10 rainwater
-2002-09-20 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Added UberSplash to the
+ installer
- * Contrib/Splash/splash.c, Contrib/Splash/splash.dsp: Converted to
- plugin DLL
+2002-09-04 12:56 kichik
-2002-09-20 joostverburg
+ * /NSIS/trunk/Contrib/UberSplash,
+ /NSIS/trunk/Contrib/UberSplash/splash.cfg,
+ /NSIS/trunk/Contrib/UberSplash/splash.dcu,
+ /NSIS/trunk/Contrib/UberSplash/splash.dof,
+ /NSIS/trunk/Contrib/UberSplash/splash.dpr,
+ /NSIS/trunk/Contrib/UberSplash/UberSplash.txt: New UberSplash by
+ Vince
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/MultiLanguage.nsi: [no log message]
+2002-09-04 05:40 justin1014
-2002-09-20 joostverburg
+ * /NSIS/trunk/Source/exehead/util.c: made win9x move/delete on
+ reboot support proper and function like on win2k (in that shit is
+ deleted in order). Also should be slightly smaller (though < 512
+ bytes difference)
- * Examples/Modern UI/ModernUI.nsh: Bugfixes, no hard-coded names,
- io support
+2002-09-04 01:59 rainwater
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fix crash
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.rc,
- makensisw.exe: Smaller about box
+2002-09-04 00:49 rainwater
-2002-09-20 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp: updated link to docs
+ and buffer overrun prob
- * Examples/makensis.nsi: partway through my cleanup of start menu
- shit
+2002-09-03 23:23 sunjammerx
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Fixed a buffer overrun
+ that was causing makensisw.exe to crash - I *think* this is the
+ cause of the elusive crash that's been around for about a week
+ now.
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.rc, makensisw.exe: Ctrl+L loads a script
+2002-09-03 20:12 rainwater
-2002-09-20 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp: minor update
- * Source/makenssi.cpp: updated /HDRINFO text =)
+2002-09-03 20:09 rainwater
-2002-09-20 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: Testing new
+ notification
- * Examples/makensis.nsi: made an optional define CLASSIC_UI for
- disabling modern ui completely =)
+2002-09-03 19:30 joostverburg
-2002-09-20 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.14 - small
+ grammar fix & updated UI files
- * cvs - changelog.txt: Update
+2002-09-03 19:13 joostverburg
-2002-09-20 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.14 - small
+ grammar fix
- * makensis.exe: Transparent checks support added
+2002-09-03 18:49 justin1014
-2002-09-20 justin1014
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe, /NSIS/trunk/Contrib/UIs/UI
+ Holder/resource.rc, /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/Ui.c: Updated RichEdit usage to
+ hopefully be better (still somewhat untested)
- * Source/exehead/bitmap1.bmp: updated with magentagaynessbg[tm]
+2002-09-03 17:27 kichik
-2002-09-20 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c: RichEdit loading handled in
+ WM_INITDIALOG
- * Source/exehead/Ui.c: using ImageList_AddMasked for checkbitmaps..
- need to update all the checkbitmaps accordingy
+2002-09-03 16:52 justin1014
-2002-09-20 kichik
+ * /NSIS/trunk/Source/script.cpp: made it so SetCompress off when in
+ whole compression mode throws warning
- * Source/exehead/Ui.c, makensis.exe: Log window width now back to
- normal (no horizontal scroll bar)
+2002-09-03 16:38 justin1014
-2002-09-20 rainwater
+ * /NSIS/trunk/Source/script.cpp: made SetCompressor handle
+ switching back from bzip2 to zlib
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- makensisw.exe: F1 shows docs
+2002-09-03 16:29 justin1014
-2002-09-20 rainwater
+ * /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp: removed excess
+ compression dependencies since they were never used
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- makensisw.exe: New About Boxes
+2002-09-03 16:27 justin1014
-2002-09-20 rainwater
+ * /NSIS/trunk/Source/build.cpp: fixed 'zlip' to 'zlib' typo in
+ defines :)
- * Contrib/Makensisw/resource.rc, makensisw.exe: flicker-free
+2002-09-03 16:22 kichik
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf: v2
- * Contrib/Makensisw/makensisw.dsp: forgot to update project
+2002-09-03 11:33 kichik
-2002-09-20 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Fixed a bug that prevented the
+ last letter from getting copied
- * Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/shell.ico, makensisw.exe, Examples/makensis.nsi:
- added .nsi shell icon
+2002-09-03 11:25 kichik
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe, /NSIS/trunk/Contrib/UIs/UI
+ Holder/resource.h, /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Source/exehead/resource.h,
+ /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/Ui.c: Now always loads RichEdit2 if
+ present
- * Contrib/Makensisw/resource.rc, makensisw.exe: Test->Test
- Installer (less confusion)
+2002-09-03 11:21 kichik
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/UIs/UI Holder/ui.dsp: Outputs to
+ ../default.exe
- * Examples/makensis.nsi: Readme.png->Readme.jpg (Modern UI change
- in installer)
+2002-09-03 11:03 kichik
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: v2
- * cvs - changelog.txt: Update
+2002-09-03 10:14 kichik
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/UIs/UI Holder, /NSIS/trunk/Contrib/UIs/UI
+ Holder/resource.h, /NSIS/trunk/Contrib/UIs/UI Holder/resource.rc,
+ /NSIS/trunk/Contrib/UIs/UI Holder/ui.cpp,
+ /NSIS/trunk/Contrib/UIs/UI Holder/ui.dsp,
+ /NSIS/trunk/Contrib/UIs/UI Holder/ui.dsw: UI holder source code
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.rc,
- makensisw.exe: Smoother resizing
+2002-09-03 09:43 joostverburg
-2002-09-20 rainwater
+ * /NSIS/trunk/Contrib/Language files/SimpChinese.nlf: Simplified
+ Chinese Language file
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.rc, makensisw.exe: Added resize
- gripper....finally.
+2002-09-02 23:50 rainwater
-2002-09-20 rainwater
+ * /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/usage.but:
+ fixed some warnings
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- makensisw.exe: Added Context Menu in log window
+2002-09-02 23:00 eccles
-2002-09-20 rainwater
+ * /NSIS/trunk/Source/script.cpp: DeleteRegKey now complains if
+ given a third parameter
+ (other than /ifempty)
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/noclib.cpp, Contrib/Makensisw/noclib.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- Contrib/Makensisw/version.cpp: Code cleanup
+2002-09-02 20:05 eccles
-2002-09-20 eccles
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/exehead/exehead.xml,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp: exehead.xml no
+ longer required
+ (added dynamically by makensis)
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/exec.h: Shaved off another 104 bytes of code.
- exehead_bzip2 is now 37.5K.
+2002-09-02 19:50 eccles
-2002-09-19 eccles
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Examples/Modern
+ UI/Example.nsi, /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi:
+ Small grammar fix
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/util.c, Source/exehead/util.h: Shaved off 208 bytes
- of code
+2002-09-02 19:02 rainwater
-2002-09-19 joostverburg
+ * /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/usage.but:
+ more doc updates
- * Examples/Modern UI/ModernUI.nsh: Better support for code between
- macro's
+2002-09-02 18:53 rainwater
-2002-09-19 joostverburg
+ * /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/intro.but, /NSIS/trunk/Docs/src/script.but,
+ /NSIS/trunk/Docs/src/usage.but: format updates
- * Examples/Modern UI/Readme.html: Typo :)
+2002-09-02 18:05 rainwater
-2002-09-19 joostverburg
+ * /NSIS/trunk/Docs/src, /NSIS/trunk/Docs/src/attributes.but,
+ /NSIS/trunk/Docs/src/bin, /NSIS/trunk/Docs/src/bin/halibut.exe,
+ /NSIS/trunk/Docs/src/build.bat,
+ /NSIS/trunk/Docs/src/compilerflags.but,
+ /NSIS/trunk/Docs/src/config.but,
+ /NSIS/trunk/Docs/src/history.but, /NSIS/trunk/Docs/src/intro.but,
+ /NSIS/trunk/Docs/src/license.but, /NSIS/trunk/Docs/src/makefile,
+ /NSIS/trunk/Docs/src/script.but, /NSIS/trunk/Docs/src/usage.but:
+ new doc format (incomplete)
- * Examples/Modern UI/Readme.png: [no log message]
+2002-09-02 18:04 rainwater
-2002-09-19 joostverburg
+ * /NSIS/trunk/Docs, /NSIS/trunk/Docs/style.css: New doc format
+ (incomplete)
- * Examples/Modern UI/Readme.html, Examples/Modern UI/Readme.jpg:
- Updated Readme
+2002-09-02 17:49 kichik
-2002-09-19 kichik
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf: Credits fixed
- * Source/makenssi.cpp: Shows the right name when can't open script
- (doesn't show the .nsi appended)
+2002-09-02 17:42 kichik
-2002-09-19 rainwater
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Contrib/Language files/TradChinese.nlf: NLF v2
- * Docs/Chapter1.html, Docs/Chapter4.html, Docs/Chapter5.html,
- Docs/style.css, Docs/src/attributes.but, Docs/src/compiler.but,
- Docs/src/compilerflags.but, Docs/src/defines.but,
- Docs/src/intro.but, Docs/src/misc.but, Docs/src/registry.but,
- Docs/src/sec.but, Docs/src/string.but, Docs/src/var.but: Docs
- updates. More to come.
+2002-09-02 17:39 kichik
-2002-09-19 rainwater
+ * /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c: Typo fixed
- * Examples/makensis.nsi: don't add icon.ico, remove license.txt
+2002-09-02 17:31 joostverburg
-2002-09-19 kichik
+ * /NSIS/trunk/Contrib/Language files/French.nlf: v2
- * Contrib/Makensisw/Readme.txt: h not k :)
+2002-09-02 17:30 joostverburg
-2002-09-19 kichik
+ * /NSIS/trunk/Contrib/UIs/mlbl.exe,
+ /NSIS/trunk/Contrib/UIs/mlbl2.exe: *** empty log message ***
- * Contrib/NSISdl/ReadMe.txt, Contrib/NSISdl/nsisdl.cpp: Added
- /TIMEOUT= option
+2002-09-02 17:21 joostverburg
-2002-09-19 joostverburg
+ * /NSIS/trunk/Contrib/Language files/French.nlf: v2
- * Examples/makensis.nsi: Works with Modern UI 1.19
+2002-09-02 17:14 joostverburg
-2002-09-19 rainwater
+ * /NSIS/trunk/Contrib/Language files/German.nlf: v2
- * Source/icon.ico: removed
+2002-09-02 17:01 joostverburg
-2002-09-19 rainwater
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: v2
- * Source/Script1.rc, Source/makenssi.dsp, Source/resource.h:
- removed icon to distinguish makensis and makensisw
+2002-09-02 15:16 joostverburg
-2002-09-19 joostverburg
+ * /NSIS/trunk/Contrib/Icons/new_lama.ico,
+ /NSIS/trunk/Contrib/Icons/new_nsis_2.ico,
+ /NSIS/trunk/Contrib/Icons/new_nsis_3.ico,
+ /NSIS/trunk/Contrib/Icons/nsis_cd.ico: *** empty log message ***
- * Examples/Modern UI/Example.nsi, Examples/Modern UI/ModernUI.nsh,
- Examples/Modern UI/MultiLanguage.nsi, Examples/Modern
- UI/Readme.html: version 1.19 - macro system changes
+2002-09-02 15:13 joostverburg
-2002-09-19 rainwater
+ * /NSIS/trunk/Contrib/Icons/lama.ico,
+ /NSIS/trunk/Contrib/Icons/lama2.ico,
+ /NSIS/trunk/Contrib/Icons/lama3.ico,
+ /NSIS/trunk/Contrib/Icons/lama4.ico,
+ /NSIS/trunk/Contrib/Icons/lama5.ico: Mike The Llama going modern!
- * makensisw.exe: Updated
+2002-09-02 11:28 kichik
-2002-09-19 rainwater
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ Right-to-left UIs support added
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h: Makensisw now uses nsis version as
- branding. Added tooltips, updated icon.
+2002-09-02 10:58 joostverburg
-2002-09-19 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: version 1.13 - added
+ 16 color icons
- * cvs - changelog.txt: Update
+2002-09-02 10:52 joostverburg
-2002-09-19 justin1014
+ * /NSIS/trunk/Contrib/Icons/adni18-installer-C-no48xp.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-uninstall-C-no48xp.ico: added 16
+ color icon
- * Source/exehead/util.c: used my opt instead of eccles, actually
- smaller (and made both bzip2 and zlib drop by 0.5k yay!)
+2002-09-02 10:15 kichik
-2002-09-19 justin1014
+ * /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h: Copy
+ details to clipboard added
- * Source/exehead/Ui.c, Source/exehead/fileform.c,
- Source/exehead/lang.h, Source/exehead/util.c: updated with a lot of
- .data size optimizations.. used eccles' optimization for certain
- registry settings too (thanks dave).. code size may have gone
- slightly up,but it let me take a lot of data size off (had to
- change some of the default error msgs too)
+2002-09-02 10:15 kichik
-2002-09-19 justin1014
+ * /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c: Copy details to clipboard added
+ into NLF
- * Source/exehead/Ui.c: tiny size decrease yay
+2002-09-01 21:20 kichik
-2002-09-18 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp: Faster build times
+ (WIN32_LEAN_AND_MEAN)
- * Source/exehead/config.h, Source/exehead/fileform.c: better
- no-compression mode
+2002-09-01 21:20 kichik
-2002-09-18 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/utils.cpp: Now always scrolls to
+ the bottom
- * Source/bzip2/blocksort.c, Source/bzip2/bzlib.c,
- Source/bzip2/compress.c, Source/bzip2/decompress.c,
- Source/bzip2/huffman.c, Source/bzip2/randtable.c: made bzip2 not
- get compiled when compression is disabled
+2002-09-01 19:35 kichik
-2002-09-18 justin1014
+ * /NSIS/trunk/Contrib/Icons/new_lama.ico,
+ /NSIS/trunk/Contrib/Icons/new_nsis.ico: Mike The Llama going
+ modern!
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/script.cpp, Source/exehead/Ui.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.h: Fuxing things up
- making things compile/smaller when lots of options are disabled.
+2002-09-01 19:31 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/bgbg.c: Added DT_NOPREFIX
+ (http://forums.winamp.com/showthread.php?s=&postid=609487#post609487)
- * cvs - changelog.txt: Update
+2002-09-01 04:16 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/script.cpp: Removed 0xbadf00d thingy
- * Examples/makensis.nsi: Added docs to installer
+2002-08-31 23:44 eccles
-2002-09-18 justin1014
+ * /NSIS/trunk/Source/build.cpp: Buffer overrun
- * Source/exehead/config.h: added NSIS_CONFIG_ENHANCEDUI_SUPPORT
+2002-08-31 23:39 sunjammerx
-2002-09-18 justin1014
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: Fixed a teeny weeny
+ typo ;)
- * Source/build.cpp, Source/script.cpp: Added
- NSIS_CONFIG_ENHANCEDUI_SUPPORT to config.h
+2002-08-31 19:54 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Contrib/ExDLL/exdll.dpr: Defined $LANGUAGE too
- * cvs - changelog.txt: Update
+2002-08-31 14:30 rainwater
-2002-09-18 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: small makensisw fixes
+ for possible crash
- * makensis.htm: Docs now point to docs/index.html
+2002-08-31 13:27 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Faster
- * cvs - changelog.txt: Update
+2002-08-31 10:27 kichik
-2002-09-18 justin1014
+ * /NSIS/trunk/Source/exehead/fileform.h: EW_REBOOT works with out
+ 0xbadf00d
- * Contrib/NSISdl/nsisdl.cpp: updated to 1.2, added timeout
+2002-08-31 10:27 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c: Uses my_alloc
- * Docs/AppendixA.html, Docs/Chapter5.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/Chapter10.html,
- Docs/Chapter6.html, Docs/Chapter7.html, Docs/Chapter8.html,
- Docs/Chapter9.html, Docs/src/build.bat, Docs/src/callback.but,
- Docs/src/compiler.but, Docs/src/defines.but, Docs/src/plugin.but,
- Docs/src/usection.but: Finished doc port
+2002-08-31 10:26 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: my_alloc
- * Docs/src/build.bat: added plugin
+2002-08-31 10:25 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Back to pop-up menu, multiple
+ languages soon.
- * cvs - changelog.txt: Update
+2002-08-30 23:31 sunjammerx
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Minor improvement to CTRL-C key
+ test code but it's still shite.
- * Docs/Chapter5.html: Forgot chapter 5 :)
+2002-08-30 23:06 sunjammerx
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Copy detail view contents on
+ CTRL-C (removed the popup context menu approach since it wasn't
+ language independent). This code sucks, please improve it :)
- * Docs/AppendixA.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/build.bat,
- Docs/src/history.but, Docs/src/int.but, Docs/src/log.but,
- Docs/src/misc.but, Docs/src/reboot.but, Docs/src/sec.but,
- Docs/src/stack.but, Docs/src/string.but, Docs/src/uninstall.but,
- Docs/src/var.but: Finished instructions for docs
+2002-08-30 21:41 sunjammerx
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Changed GetCursorPos to
+ GetMessagePos & removed TCHAR crap. Still needs either language
+ support for the popup menu text, or conversion to work off CTRL-C
+ instead.
- * Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/build.bat, Docs/src/file.but: Added file
- instructions
+2002-08-30 19:51 sunjammerx
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Adds "copy to clipboard" feature
+ for DetailView (feature 590012)
- * Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/build.bat, Docs/src/flowcontrol.but: Add
- flow control instructions
+2002-08-30 11:40 kichik
-2002-09-18 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Start menu link to modern UI
+ readme
- * makensis.exe: Threading issues should now be solved for real
+2002-08-30 11:02 kichik
-2002-09-18 kichik
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: *** empty log message
+ ***
- * Source/exehead/Ui.c: Removed debug message box
+2002-08-30 11:01 kichik
-2002-09-18 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe: No more caption in the
+ loading setup dialogs
- * Source/exehead/Ui.c: Threading issues should now be solved
+2002-08-29 19:48 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Examples/Modern
+ UI/Example.nsi, /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: Uninstall text in the
+ UI macros
- * cvs - changelog.txt: Update
+2002-08-29 16:44 kichik
-2002-09-18 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/test.nsi: Now points to the
+ right DLL
- * Source/exehead/Ui.c, makensis.exe: Nasty threading bug should now
- be fixed
+2002-08-29 16:44 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Source/script.cpp: CallInstDLL without /NOUNLOAD now
+ works
- * Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html: Updated docs
+2002-08-29 15:40 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Examples/Modern UI/Readme.html: *** empty log message
+ ***
- * Docs/src/build.bat, Docs/src/generalpurpose.but: Added general
- purpose instructions
+2002-08-29 15:04 kichik
-2002-09-18 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: Install types descriptions
+ back
- * Docs/src/registry.but: added registry instructions
+2002-08-29 15:02 kichik
-2002-09-18 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Section on/off problems solved
- * Source/script.cpp: Wasn't a typo after all
+2002-08-29 14:17 rainwater
-2002-09-18 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: New changes
- * cvs - changelog.txt: Update
+2002-08-29 14:16 rainwater
-2002-09-17 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Examples/makensis.nsi: Updated urls to point to
+ sourceforge project home
- * Source/script.cpp: Another typo (what's a mmap?)
+2002-08-29 13:59 kichik
-2002-09-17 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Description for NSIS source
+ code
- * Source/script.cpp: Typo fixed
+2002-08-29 13:53 kichik
-2002-09-17 rainwater
+ * /NSIS/trunk/Contrib/UIs/modern.exe,
+ /NSIS/trunk/Contrib/UIs/modern2.exe,
+ /NSIS/trunk/Contrib/UIs/modernsimple.exe,
+ /NSIS/trunk/Examples/makensis.nsi: *** empty log message ***
- * cvs - changelog.txt: Update
+2002-08-29 13:36 kichik
-2002-09-17 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: *** empty log message ***
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/Chapter1.html,
- Docs/Chapter2.html, Docs/Chapter3.html, Docs/Chapter4.html,
- Docs/Contents.html, Docs/IndexPage.html, Docs/index.html,
- Docs/src/basic.but, Docs/src/build.bat, Docs/src/registry.but: Some
- updated docs. More to come in a minute.
+2002-08-29 13:19 kichik
-2002-09-17 rainwater
+ * /NSIS/trunk/Contrib/UIs/modernsimple.exe: Optimized (no text)
- * cvs - changelog.txt: Update
+2002-08-29 13:13 kichik
-2002-09-17 rainwater
+ * /NSIS/trunk/Contrib/UIs/modern.exe, /NSIS/trunk/Examples/Modern
+ UI/Example.nsi, /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi: *** empty log
+ message ***
- * Docs/src/bin/halibut.exe: Updated halibut
+2002-08-29 12:41 kichik
-2002-09-16 rainwater
+ * /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: Font stuff fixed
- * cvs - changelog.txt: Update
+2002-08-29 12:25 kichik
-2002-09-16 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Still 36.5KB :D
- * Source/exehead/fileform.c: Now compiles without
- NSIS_CONFIG_SILENT_SUPPORT too
+2002-08-29 12:24 kichik
-2002-09-14 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c: CreateFont gives the right
+ size now
- * cvs - changelog.txt: Update
+2002-08-29 12:13 kichik
-2002-09-14 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Font size is not calculated
+ correctly
- * makensis.htm: Updated changelog
+2002-08-29 11:36 kichik
-2002-09-14 rainwater
+ * /NSIS/trunk/Contrib/Icons/yi-pixel-uninstall.ico: *** empty log
+ message ***
- * cvs - changelog.txt: Update
+2002-08-29 11:34 kichik
-2002-09-14 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Back to 36.5KB again
- * Examples/WinMessages.NSH: Added HWND_BROADCAST
+2002-08-29 11:27 kichik
-2002-09-14 kichik
+ * /NSIS/trunk/Source/script.cpp: Plugin calls can now use /NOUNLOAD
+ too
- * Source/exehead/Ui.c: Sets the log window width before logging
- starts, faster, and works when calling a DLL that logs something
- before any other command
+2002-08-29 10:48 kichik
-2002-09-14 rainwater
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Font can be pushed
- * cvs - changelog.txt: Update
+2002-08-29 10:31 kichik
-2002-09-14 rainwater
+ * /NSIS/trunk/Contrib/UIs/modern.exe, /NSIS/trunk/Examples/Modern
+ UI/Example.nsi, /NSIS/trunk/Examples/Modern UI/ModernUI.nsh,
+ /NSIS/trunk/Examples/Modern UI/MultiLanguage.nsi,
+ /NSIS/trunk/Examples/Modern UI/Readme.html: *** empty log message
+ ***
- * Contrib/Makensisw/makensisw.h: Updated usage info. Last one was
- really stupid. This one is a tad better.
+2002-08-29 10:25 kichik
-2002-09-14 rainwater
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ CallInstDLL /NOUNLOAD added
- * cvs - changelog.txt: Update
+2002-08-29 02:44 rainwater
-2002-09-14 justin1014
+ * /NSIS/trunk/Contrib/UIs/modernsimple.exe,
+ /NSIS/trunk/Examples/makensis.nsi: more install gui changes
- * Source/script.cpp: made SendMessage command logic more sensitive
+2002-08-29 02:32 rainwater
-2002-09-14 justin1014
+ * /NSIS/trunk/Examples/makensis.nsi: bg color of license is white
- * makensis.htm: fixed SendMessage doc (/TIMEOUT goes AFTER output),
- and editted whatsnew list
+2002-08-29 02:18 rainwater
-2002-09-14 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Minor install change
- * makensis.htm: Moved /TIMEOUT to the right position
+2002-08-29 02:08 rainwater
-2002-09-14 rainwater
+ * /NSIS/trunk/Contrib/UIs/modernsimple.exe: branding location
+ change
- * cvs - changelog.txt: Update
+2002-08-29 01:59 rainwater
-2002-09-14 joostverburg
+ * /NSIS/trunk/Contrib/UIs/modernsimple.exe,
+ /NSIS/trunk/Examples/makensis.nsi: Installer changes
- * makensis.htm: SendMessage /TIMEOUT
+2002-08-28 22:53 kichik
-2002-09-14 kichik
+ * /NSIS/trunk/Contrib/LangDLL/resource.rc,
+ /NSIS/trunk/Plugins/LangDLL.dll: Pretty :D
- * makensis.exe: SendMessage /TIMEOUT= added, and STR: for parmaters
+2002-08-28 22:49 kichik
-2002-09-14 kichik
+ * /NSIS/trunk/Examples/languages.nsi: Typo fixed
- * makensisw.exe: No more crashes on WM_NULL
+2002-08-28 22:47 kichik
-2002-09-14 kichik
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Outputs the right language
- * Source/exehead/exec.c: Back to 37KB
+2002-08-28 22:45 kichik
-2002-09-14 joostverburg
+ * /NSIS/trunk/Examples/languages.nsi: Using the new DLL
- * makensis.htm: Updated changelog
+2002-08-28 22:44 kichik
-2002-09-14 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Now really gives the right
+ default language
- * makensis.htm: New SendMessage string option
+2002-08-28 22:43 kichik
-2002-09-14 justin1014
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Gives the right default language
+ now
- * Source/script.cpp: forgot to have it skip the STR: :)
+2002-08-28 22:38 kichik
-2002-09-14 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Plugins/LangDLL.dll: Languages are inserted backward
+ Language in language is selected automatically
+ Dialog caption is no longer dialog :)
- * Examples/Modern UI/Readme.html: version 1.18
+2002-08-28 22:35 kichik
-2002-09-14 justin1014
+ * /NSIS/trunk/Contrib/ExDLL/exdll.c: $LANGUAGE too
- * Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/script.cpp, Source/tokens.cpp: increased instruction
- parameter count to 6, made SendMessage support strings differently
- and made it support timeouts
+2002-08-28 22:21 kichik
-2002-09-14 joostverburg
+ * /NSIS/trunk/Contrib/LangDLL,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.c,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.dsp,
+ /NSIS/trunk/Contrib/LangDLL/LangDLL.dsw,
+ /NSIS/trunk/Contrib/LangDLL/resource.h,
+ /NSIS/trunk/Contrib/LangDLL/resource.rc,
+ /NSIS/trunk/Plugins/LangDLL.dll: *** empty log message ***
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/MultiLanguage.nsi: version 1.18
+2002-08-28 21:28 kichik
-2002-09-14 joostverburg
+ * /NSIS/trunk/Examples/languages.nsi: No more SetLanguage
- * Examples/Modern UI/ModernUI.nsh: version 1.18: Uses the new
- SendMessage string option
+2002-08-28 21:27 kichik
-2002-09-13 justin1014
+ * /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h:
+ $LANGUAGE problems fixed again
- * Source/exehead/exec.c: Changed SendMessage: WM_SETTEXT no longer
- implies string (hack), and lParam and wParam can pass strings if
- they begin with STR:
+2002-08-28 21:13 kichik
-2002-09-13 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: $LANGUAGE not set bug fixed
- * Source/makenssi.cpp: Added /version command line option
+2002-08-28 20:45 kichik
-2002-09-13 rainwater
+ * /NSIS/trunk/Contrib/ExDLL/exdll.dsp: Now compiles into plugins
- * Contrib/Makensisw/makensisw.h: Updated usage
+2002-08-28 20:35 kichik
-2002-09-13 rainwater
+ * /NSIS/trunk/Contrib/Language files/French.nlf: *** empty log
+ message ***
- * cvs - changelog.txt: Update
+2002-08-28 20:34 kichik
-2002-09-13 justin1014
+ * /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp: Compiles into plugins now
- * Source/exehead/Main.c: cleanups to command lien parm shit,
- smaller now
+2002-08-28 20:17 kichik
-2002-09-13 justin1014
+ * /NSIS/trunk/Source/script.cpp: Normal margins for branding text
- * Source/exehead/Main.c: made uninstall pass generic parms back
- (other than ones beginning with /)
+2002-08-28 20:16 kichik
-2002-09-13 rainwater
+ * /NSIS/trunk/Source/DialogTemplate.h: Trim now works as it should
- * cvs - changelog.txt: Update
+2002-08-28 20:15 kichik
-2002-09-13 kichik
+ * /NSIS/trunk/Source/DialogTemplate.cpp: Trim now works like it
+ should
- * Contrib/NSISdl/nsisdl.dsp: Script1.rc moved to resources
+2002-08-28 20:10 rainwater
-2002-09-13 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: trimright fix
- * cvs - changelog.txt: Update
+2002-08-28 20:00 rainwater
-2002-09-13 kichik
+ * /NSIS/trunk/Contrib/Icons/modern.bmp: wrong bitmap order
- * Source/script.cpp, makensis.exe: Macros output back to normal
+2002-08-28 19:55 rainwater
-2002-09-13 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: dirtext fix
- * Examples/languages.nsi: Uses the new ${LANG_LangName} feature
+2002-08-28 19:45 rainwater
-2002-09-13 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: new makensis installer
- * cvs - changelog.txt: Update
+2002-08-28 19:42 rainwater
-2002-09-13 kichik
+ * /NSIS/trunk/Contrib/UIs/modernsimple.exe: based of of joost'
+ modern ui
- * Contrib/Makensisw/makensisw.cpp: Second try
+2002-08-28 18:57 rainwater
-2002-09-13 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: plugins=bin
- * Contrib/Makensisw/makensisw.cpp: Bug fixed
+2002-08-28 18:39 rainwater
-2002-09-13 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt: Updated makensisw
- * makensisw.exe: Updated
+2002-08-28 18:35 kichik
-2002-09-13 rainwater
+ * /NSIS/trunk/Source/script.cpp: SetBrandingImage script message
+ fixed
- * cvs - changelog.txt: Update
+2002-08-28 18:28 rainwater
-2002-09-13 kichik
+ * /NSIS/trunk/Examples/makensis.nsi: Plugins changes
- * makensis.htm: History updated
+2002-08-28 18:26 rainwater
-2002-09-13 kichik
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp, /NSIS/trunk/Plugins,
+ /NSIS/trunk/Plugins/InstallOptions.dll,
+ /NSIS/trunk/Plugins/nsisdl.dll, /NSIS/trunk/Source/build.cpp:
+ Moved plugins to Plugins\ directory
- * Source/script.cpp, makensis.exe: Now defines ${LANG_LangName} as
- the id of the language when loading a NLF. For example:
- ${LANG_ENGLISH}=1033
+2002-08-28 17:44 rainwater
-2002-09-12 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp: Added warnings to
+ titlebar
- * cvs - changelog.txt: Update
+2002-08-28 16:59 kichik
-2002-09-12 kichik
+ * /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h: Removed SetLanguage (back to
+ $LANGUAGE)
- * Examples/makensis.nsi: Desktop shortcut to makensisw.exe without
- makensis.exe
+2002-08-28 16:57 kichik
-2002-09-12 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ Removed SetLanguage (back to $LANGUAGE)
- * cvs - changelog.txt: Update
+2002-08-28 16:02 kichik
-2002-09-12 kichik
+ * /NSIS/trunk/Contrib/UIs/modern.exe: *** empty log message ***
- * Source/tokens.cpp: Typo fixed
+2002-08-28 15:41 kichik
-2002-09-12 kichik
+ * /NSIS/trunk/Source/script.cpp: Can now trim the branding text
+ with no text given (will use the default English branding text to
+ determine the text size)
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Now logs as should
- even if text is selected/cart positions changes
+2002-08-28 14:59 kichik
-2002-09-12 rainwater
+ * /NSIS/trunk/Source/script.cpp: Sub-sections can have a defined
+ name now too
+ Fixed a bug with macros at the end of the file
- * cvs - changelog.txt: Update
+2002-08-28 14:58 kichik
-2002-09-12 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/tokens.cpp:
+ Sub-sections can have a defined name now too
- * Source/exehead/Ui.c: Back to 37KB
+2002-08-28 14:58 kichik
-2002-09-12 kichik
+ * /NSIS/trunk/Source/exehead/util.c: Space saving
- * Contrib/Language files/TradChinese.nlf: small change
+2002-08-28 13:54 kichik
-2002-09-12 rainwater
+ * /NSIS/trunk/Contrib/Icons/yi-pixel.txt: *** empty log message ***
- * cvs - changelog.txt: Update
+2002-08-28 13:54 kichik
-2002-09-12 sunjammerx
+ * /NSIS/trunk/Contrib/Icons/yi-pixel.ico: Smaller?\127
- * makensis.htm: WriteRegStr, WriteRegExpandStr, WriteRegDWORD,
- WriteRegBin - Added "If the registry key doesn't exist it will be
- created."
+2002-08-28 13:38 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Contrib/Icons/yi-pixel.ico,
+ /NSIS/trunk/Contrib/Icons/yi-pixel.txt: *** empty log message ***
- * cvs - changelog.txt: Update
+2002-08-28 11:55 rainwater
-2002-09-11 rainwater
+ * /NSIS/trunk/Contrib/Icons/modern.bmp: increased to 8 bit
- * Contrib/Makensisw/resource.rc: always show scrollbar
+2002-08-28 10:15 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf: *** empty log
+ message ***
- * cvs - changelog.txt: Update
+2002-08-28 10:09 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: SetLanguage problems fixed
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Clipboard changes
+2002-08-28 10:08 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c: 0.5KB saving
- * makensisw.exe: Latest makensisw
+2002-08-28 10:07 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Source/DialogTemplate.cpp: Trimming added
- * cvs - changelog.txt: Update
+2002-08-28 10:07 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ BrandingText control trimming option added
- * Contrib/Makensisw/utils.cpp: don't free memory
+2002-08-28 10:06 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Source/DialogTemplate.h: Trimming functions added
- * cvs - changelog.txt: Update
+2002-08-28 02:31 rainwater
-2002-09-11 rainwater
+ * /NSIS/trunk/Contrib/Icons/modern.bmp: added xp style checkboxes
- * Source/exehead/nsis.ico: Updated NSIS icon
+2002-08-27 18:34 rainwater
-2002-09-11 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: turn xp style on in makensis
+ install
- * Examples/makensis.nsi: Register .nsh files with notepad like .nsi
- files except no compile options.
+2002-08-26 18:24 rainwater
-2002-09-11 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Beep changes
- * cvs - changelog.txt: Update
+2002-08-26 18:20 kichik
-2002-09-11 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/Readme.txt: h :)
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Added ctrl+c support at the window level. Exit is
- now Alt+X. Free clipboard memory.
+2002-08-26 18:16 rainwater
-2002-09-10 rainwater
+ * /NSIS/trunk/Contrib/Makensisw/License.txt: license update
- * cvs - changelog.txt: Update
+2002-08-26 18:08 rainwater
-2002-09-10 eccles
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: System Beep addition
- * Contrib/InstallOptions/InstallerOptions.cpp: Down to 11K.
- Negative positions were not being adjusted by the dialog size
- correctly. Fixed problem with negative positions and 'large
- fonts'. File/DirRequests now the correct size (size of browse
- button was not being taken into account correctly). Removed
- tabstops from statics.
+2002-08-26 18:07 kichik
-2002-09-10 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: MagicLime new version and docs
- * makensis.htm: Another typo correction
+2002-08-26 17:52 rainwater
-2002-09-10 joostverburg
+ * /NSIS/trunk/Contrib/Makensisw/makensisw.cpp: Added System Beep
- * Examples/Modern UI/Readme.html: version 1.17
+2002-08-26 17:48 kichik
-2002-09-10 joostverburg
+ * /NSIS/trunk/Contrib/MagicLime: *** empty log message ***
- * Examples/Modern UI/ModernUI.nsh: version 1.17 - Win9x font weight
- bug fixed (font of title in white rect)
+2002-08-26 16:56 kichik
-2002-09-10 joostverburg
+ * /NSIS/trunk/Examples/makensis.nsi: Alpha 7
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/MultiLanguage.nsi: version 1.17
+2002-08-26 16:52 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Examples/Modern UI, /NSIS/trunk/Examples/Modern
+ UI/Example.nsi, /NSIS/trunk/Examples/Modern UI/License.txt,
+ /NSIS/trunk/Examples/Modern UI/Readme.html,
+ /NSIS/trunk/Examples/Modern UI/Readme.png,
+ /NSIS/trunk/Examples/Modern UI/Screenshot.png: *** empty log
+ message ***
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc: Added Select All
+2002-08-26 16:09 kichik
-2002-09-10 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: InstallColors /windows problems
+ fixed
- * makensis.exe: New compiled version with all of the newest goods
- in it
+2002-08-26 16:06 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Contrib/UIs/modern.exe: Show details button problems
+ fixed
- * cvs - changelog.txt: Update
+2002-08-26 15:38 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Contrib/UIs/modern.exe: A few pixels here and there
- * cvs - changelog.txt: Update
+2002-08-26 15:07 kichik
-2002-09-10 kichik
+ * /NSIS/trunk/Examples/languages.nsi: *** empty log message ***
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, makensisw.exe: Find dialog added
+2002-08-26 14:05 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/script.cpp: ChangeUI prints nicer error
+ messages
- * cvs - changelog.txt: Update
+2002-08-26 13:33 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ Disabled UseOuterUIItem
- * Examples/Modern UI/Readme.html: NSIS 2 is no longer a mod
+2002-08-26 13:27 kichik
-2002-09-10 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp: Added
+ CancelShow (by ORTIM: 13-August 2002)
+ Added pixel transformation for widgets (by ORTIM: 14-August-2002)
- * Examples/languages.nsi: Simplified Chinese added
+2002-08-26 13:27 kichik
-2002-09-10 kichik
+ * /NSIS/trunk/Contrib/InstallOptions/Install Options.html: 1.3 docs
- * Examples/languages.nsi: Type fixed, now compiles
+2002-08-26 11:23 kichik
-2002-09-10 kichik
+ * /NSIS/trunk/Contrib/Icons/adni18-uninstall-C-no48xp.ico,
+ /NSIS/trunk/Contrib/UIs/InstallShield.exe,
+ /NSIS/trunk/Contrib/UIs/modern.exe: *** empty log message ***
- * Contrib/Language files/German.nlf: Header changed to v2
+2002-08-26 11:22 kichik
-2002-09-10 kichik
+ * /NSIS/trunk/Contrib/Icons/adni18-installer-A.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-installer-B.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-installer-C.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-installer-C-no48xp.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-uninstall-A.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-uninstall-B.ico,
+ /NSIS/trunk/Contrib/Icons/adni18-uninstall-C.ico,
+ /NSIS/trunk/Contrib/Icons/adni-installer-A.ico,
+ /NSIS/trunk/Contrib/Icons/adni-installer-B.ico,
+ /NSIS/trunk/Contrib/Icons/adni-installer-C.ico,
+ /NSIS/trunk/Contrib/Icons/adni-uninstall-A.ico,
+ /NSIS/trunk/Contrib/Icons/adni-uninstall-B.ico,
+ /NSIS/trunk/Contrib/Icons/adni-uninstall-C.ico,
+ /NSIS/trunk/Contrib/Icons/andi-installer-A.ico,
+ /NSIS/trunk/Contrib/Icons/andi-installer-B.ico,
+ /NSIS/trunk/Contrib/Icons/andi-installer-C.ico,
+ /NSIS/trunk/Contrib/Icons/andi-uninstall-A.ico,
+ /NSIS/trunk/Contrib/Icons/andi-uninstall-B.ico,
+ /NSIS/trunk/Contrib/Icons/andi-uninstall-C.ico,
+ /NSIS/trunk/Contrib/UIs/InstallShield.exe: *** empty log message
+ ***
- * makensisw.exe, Contrib/Makensisw/utils.cpp: Now scrolls on
- Windows 9x as it should
+2002-08-26 11:07 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Contrib/Icons/checks4-aa.bmp: Anti-aliased version of
+ checks4.bmp
- * cvs - changelog.txt: Update
+2002-08-26 11:02 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Contrib/Icons/adni-installer-A.ico,
+ /NSIS/trunk/Contrib/Icons/adni-installer-B.ico,
+ /NSIS/trunk/Contrib/Icons/adni-installer-C.ico,
+ /NSIS/trunk/Contrib/Icons/adni-uninstall-A.ico,
+ /NSIS/trunk/Contrib/Icons/adni-uninstall-B.ico,
+ /NSIS/trunk/Contrib/Icons/adni-uninstall-C.ico: *** empty log
+ message ***
- * Docs/AppendixA.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/index.html, Docs/src/build.bat,
- Docs/src/history.but, Docs/src/functions.but, Docs/src/labels.but,
- Docs/src/sections.but: Added sections, functions, and labels. Now
- only instructions is left
+2002-08-25 16:09 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ Added SetLanguage ($LANGUAGE is no longer a variable)
- * cvs - changelog.txt: Update
+2002-08-25 16:09 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h:
+ Added SetLanguage ($LANGUAGE is no longer a variable)
+ Language can be set not only from .onInit
+ Added .onMouseOverSection
- * Contrib/zip2exe/icon.ico, Contrib/zip2exe/main.cpp,
- Contrib/zip2exe/res.rc, Contrib/zip2exe/zip2exe.dsp,
- Contrib/zip2exe/zip2exe.xml: Updated Zip2Exe's GUI
+2002-08-25 16:08 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/exehead/fileform.h: Added SetLanguage
+ ($LANGUAGE is no longer a variable)
+ Added .onMouseOverSection
- * cvs - changelog.txt: Update
+2002-08-25 16:06 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/build.cpp: Added .onMouseOverSection
- * Contrib/Makensisw/makensisw.h, Examples/makensis.nsi: Updated
- urls to point to new home page (nsis != nsis2k)
+2002-08-25 16:05 kichik
-2002-09-10 rainwater
+ * /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ SetLanguage
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/resource.h, Contrib/Makensisw/resource.rc,
- Contrib/Makensisw/utils.cpp, makensisw.exe: Added Load Script
- option on File menu and fixed save output string filter
+2002-08-25 14:31 kichik
-2002-09-09 uid27073
+ * /NSIS/trunk/Contrib/Icons/andi-installer-A.ico,
+ /NSIS/trunk/Contrib/Icons/andi-installer-B.ico,
+ /NSIS/trunk/Contrib/Icons/andi-installer-C.ico,
+ /NSIS/trunk/Contrib/Icons/andi-uninstall-A.ico,
+ /NSIS/trunk/Contrib/Icons/andi-uninstall-B.ico,
+ /NSIS/trunk/Contrib/Icons/andi-uninstall-C.ico: New icons by
+ adni18
+ http://www.wincustomize.com/skins.asp?AuthorID=2663
- * cvs - changelog.txt: Update
+2002-08-25 11:26 kichik
-2002-09-09 uid27073
+ * /NSIS/trunk/Source/exehead/Ui.c: update_status_text bug fixed
- * Contrib/zip2exe/main.cpp, Contrib/zip2exe/zip2exe.dsp:
- makensis.exe path is not in the 'bin' directory
+2002-08-25 10:53 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: Added
+ SetStaticBkColor
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: no crash
+2002-08-25 10:52 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Replaced .onStaticBkColor with
+ .onInitDialog
+ No more threads conflicts
- * cvs - changelog.txt: Update
+2002-08-25 10:49 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/exehead/fileform.h: Replaced .onStaticBkColor
+ with .onInitDialog
+ Added SetStaticBkColor
- * Contrib/Makensisw/makensisw.cpp: Free up memory
+2002-08-25 10:48 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/build.cpp: Replaced .onStaticBkColor with
+ .onInitDialog
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: no icon
+2002-08-24 14:44 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Fixed some problems with the new
+ background callback function
+ Silent is working again
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Can't drag while compiling
+2002-08-24 14:42 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/script.cpp: CopyFiles script message fixed (no
+ longer always silent)
- * cvs - changelog.txt: Update
+2002-08-23 08:20 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp: Custom install type text can now
+ be changed
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, makensisw.exe: Updated icon
+2002-08-22 22:47 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/exehead/state.h: Better backward compatibility
+ ($LANGUAGE is now last in the user variables array)
- * cvs - changelog.txt: Update
+2002-08-22 22:46 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/makenssi.cpp: alpha 7
- * Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h, makensisw.exe: Drag and Drop Support
- into the Makensisw window
+2002-08-22 22:11 kichik
-2002-09-09 joostverburg
+ * /NSIS/trunk/Contrib/UIs/default.exe: ChangeUI can now change
+ IDD_VERIFY
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/MultiLanguage.nsi: updated version number
+2002-08-22 22:09 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/script.cpp: Better backward compatibility
+ ($LANGUAGE is now last in the user variables array)
- * cvs - changelog.txt: Update
+2002-08-22 21:53 kichik
-2002-09-09 sunjammerx
+ * /NSIS/trunk/Source/script.cpp: ChangeUI can now change IDD_VERIFY
- * makensis.htm: Typo correction
+2002-08-22 21:06 kichik
-2002-09-09 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Default license color now fits
+ the user system
- * cvs - changelog.txt: Update
+2002-08-22 21:06 kichik
-2002-09-09 sunjammerx
+ * /NSIS/trunk/Source/build.cpp: Default license color now fits the
+ user system
+ Now reports the right number of required sections
- * makensis.htm: Fixed broken link to SectionIn in InstType
+2002-08-22 15:55 kichik
-2002-09-08 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Language can now really be
+ selected from .onInit
- * cvs - changelog.txt: Update
+2002-08-22 09:37 kichik
-2002-09-08 kichik
+ * /NSIS/trunk/Source/exehead/util.c: Fixed a bug that gave
+ SMPROGRAMS, SMSTARTUP, DESKTOP and STARTMENU to have wrong
+ values.
- * Examples/makensis.nsi, Source/makenssi.cpp: Version change
+2002-08-21 21:23 kichik
-2002-09-08 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Clearing background problem with
+ custom background color (.onStaticCtlBkColor)
- * Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Test button is now only enabled if there were no
- errors during compilation
+2002-08-21 20:41 kichik
-2002-09-08 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Now uses the default language in
+ .onInit
- * cvs - changelog.txt: Update
+2002-08-21 19:45 kichik
-2002-09-08 sunjammerx
+ * /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c: Fixed a bug that gave EXEDIR,
+ CMDLINE and others wrong values
- * Source/exehead/Ui.c: Return key detection in richedit control now
- implemented correctly.
+2002-08-21 19:44 kichik
-2002-09-08 rainwater
+ * /NSIS/trunk/Contrib/Language files/TradChinese.nlf: no message
- * cvs - changelog.txt: Update
+2002-08-21 19:16 kichik
-2002-09-08 kichik
+ * /NSIS/trunk/Source/exehead/util.c: Language can be choosen from
+ .onInit
- * makensis.htm: History updated
+2002-08-21 19:15 kichik
-2002-09-08 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Language can be choosen from
+ .onInit
+ Added .onStaticCtlBkColor and un.onStaticCtlBkColor
+ Fixed a bug that caused RTF not to show on Windows 9x
- * cvs - changelog.txt: Update
+2002-08-21 19:11 kichik
-2002-09-08 sunjammerx
+ * /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ Replaced SetDlgItemText by GetDlgItem
+ Added CreateFont
- * makensis.htm: [no log message]
+2002-08-21 19:10 kichik
-2002-09-08 sunjammerx
+ * /NSIS/trunk/Source/exehead/state.h: Language can be choosen from
+ .onInit
- * Source/exehead/Ui.c: Return key now works on licence page at the
- same time as the "give initial focus to licence text" patch :)
+2002-08-21 19:09 kichik
-2002-09-08 rainwater
+ * /NSIS/trunk/Source/script.cpp: Language can be choosen from
+ .onInit
+ Replaced SetDlgItemText by GetDlgItem
+ Added CreateFont
+ Checkbox is only required in IDD_DIR if logging is enabled
+ Not specifying any language now really causes the script compiler
+ to use the last used language
+ Fixed a bug with MBCS and the uninstaller text
- * cvs - changelog.txt: Update
+2002-08-21 19:05 kichik
-2002-09-07 kichik
+ * /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c: Added a dialog that shows up
+ if compress whole is used and initial uncompressing lasts longer
+ than a second.
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/util.c,
- Source/exehead/util.h: Renamed my_alloc to my_GlobalAlloc
+2002-08-21 19:03 kichik
-2002-09-07 rainwater
+ * /NSIS/trunk/Source/lang.cpp: Not specifying any language now
+ really causes the script compiler to use the last used language
- * cvs - changelog.txt: Update
+2002-08-21 19:02 kichik
-2002-09-07 kichik
+ * /NSIS/trunk/Source/exehead/fileform.h: Replaced SetDlgItemText by
+ GetDlgItem
+ Added .onStaticCtlBkColor and un.onStaticCtlBkColor
+ Added CreateFont
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Now tries to unselect
- before logging
+2002-08-21 17:23 kichik
-2002-09-07 rainwater
+ * /NSIS/trunk/Source/exehead/fileform.c: Added a dialog that shows
+ up if compress whole is used and initial uncompressing lasts
+ longer than a second.
- * cvs - changelog.txt: Update
+2002-08-21 16:36 kichik
-2002-09-07 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: Replaced SetDlgItemText by
+ GetDlgItem
+ SendMessage WM_SETTEXT treats lParam as a string
+ Added CreateFont
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Another buffer
- overflow bug fixed
+2002-08-21 16:33 kichik
-2002-09-07 rainwater
+ * /NSIS/trunk/Contrib/Language files/English.nlf: Added a comment
+ saying you should put your name in the translation
- * cvs - changelog.txt: Update
+2002-08-21 16:32 kichik
-2002-09-07 kichik
+ * /NSIS/trunk/Source/exehead/config.h: Added a dialog that shows up
+ if compress whole is used and initial uncompressing lasts longer
+ than a second.
- * Docs/src/history.but, Docs/AppendixA.html: Link to complete
- version history added
+2002-08-21 16:31 kichik
-2002-09-07 rainwater
+ * /NSIS/trunk/Source/build.h: Typo fixed
- * cvs - changelog.txt: Update
+2002-08-21 16:23 kichik
-2002-09-07 justin1014
+ * /NSIS/trunk/Source/build.cpp: Language can be choosen from
+ .onInit
+ Added .onStaticCtlBkColor and un.onStaticCtlBkColor
+ Type fixed
- * makensisw.exe: updated at kichik's request
+2002-08-21 16:21 kichik
-2002-09-07 kichik
+ * /NSIS/trunk/Source/exehead/bgbg.c: Language can be choosen from
+ .onInit
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/utils.cpp:
- Recompiling caussed memory leaks - fixed
+2002-08-20 12:03 kichik
-2002-09-07 kichik
+ * /NSIS/trunk/Contrib/Language files/Russian.nlf: no message
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Copy now uses
- GMEM_MOVEABLE
+2002-08-19 23:39 eccles
-2002-09-07 rainwater
+ * /NSIS/trunk/Source/exehead/util.c: SetShellVarContext all - was
+ failing to fall back to current user
+ Optimised this a little too
- * cvs - changelog.txt: Update
+2002-08-19 23:18 eccles
-2002-09-07 justin1014
+ * /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/crc32.c,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h,
+ /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/ZLIB.H: Instant saving of 0.5K - use of
+ stdcall calling convention to
+ reduce code overhead associated with managing the stack
- * Source/makenssi.cpp: made SetCurrentDirectory check for error for
- /CD
+2002-08-19 21:24 eccles
-2002-09-06 kichik
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Small space-saving
+ optimisations
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Long lines bug fixed.
- Now gets the whole path of the script and the output exe.
+2002-08-17 00:15 eccles
-2002-09-06 rainwater
+ * /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp: Problem with
+ previous version, investigating an alternative.
- * cvs - changelog.txt: Update
+2002-08-16 21:00 eccles
-2002-09-06 kichik
+ * /NSIS/trunk/Source/zlib/INFLATE.C: no message
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/noclib.cpp,
- Contrib/Makensisw/noclib.h, Contrib/Makensisw/utils.cpp: Buffer
- bugs fixed, should work better. Hopefully it won't crash anymore.
+2002-08-16 20:50 eccles
-2002-09-06 rainwater
+ * /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp: instant saving of
+ almost 0.5K!
+ (calling convention 'cdecl' => 'stdcall')
- * Docs/Chapter4.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/src/attributes.but, Docs/src/build.bat,
- Docs/src/sections.but: added part of the sections docs
+2002-08-16 09:36 kichik
-2002-09-06 joostverburg
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp: Unicode to MBCS conversion
+ bugs fixed
- * Examples/Modern UI/Readme.html: version 1.16: changed text on
- license page
+2002-08-16 09:06 kichik
-2002-09-06 joostverburg
+ * /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/ResourceEditor.cpp: MBCS to Unicode conversion
+ bugs fixed
- * Examples/Modern UI/Example.nsi, Examples/Modern
- UI/MultiLanguage.nsi: changed text on license page: 'scroll down' >
- 'press page down' because richedit has focus on startup now
+2002-08-11 18:58 eccles
-2002-09-06 sunjammerx
+ * /NSIS/trunk/Source/crc32.c, /NSIS/trunk/Source/exehead/bgbg.c:
+ Small space-saving optimisation
- * Source/exehead/Ui.c: Much cleaner license focus implementation
+2002-08-11 18:57 eccles
-2002-09-06 rainwater
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/script.cpp: Changes to format of strings
+ tables
- * cvs - changelog.txt: Update
+2002-08-11 18:56 eccles
-2002-09-06 sunjammerx
+ * /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Implemented a method where
+ LANG_* strings can be referenced
+ by constant id's - reducing code overhead associated with
+ looking up the global strings variables. Kind of. Just compare
+ the assembly output...
- * Source/exehead/Ui.c: Alternate means of trapping the SetFocus
- that blows up setting focus to the license page... suggested by
- KiCHiK
+2002-08-11 10:41 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Contrib/Language files/Swedish.nlf: no message
- * cvs - changelog.txt: Update
+2002-08-10 16:31 kichik
-2002-09-06 sunjammerx
+ * /NSIS/trunk/Contrib/Language files/Korean.nlf: Korean translation
+ by dTomoyo
- * Source/exehead/Ui.c: License control gets focus first -- please
- can someone test this :D.. the Ui.c code gets a bit hairy
+2002-08-10 09:49 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Contrib/Language files/Dutch.nlf: no message
- * cvs - changelog.txt: Update
+2002-08-10 09:40 kichik
-2002-09-06 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/util.c:
+ No more compile errors without NSIS_CONFIG_PLUGIN_SUPPORT
- * Contrib/Makensisw/makensisw.cpp, makensisw.exe: Now beeps when
- there are errors too
+2002-08-10 09:39 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c: No more compile errors without
+ NSIS_CONFIG_PLUGIN_SUPPORT
- * cvs - changelog.txt: Update
+2002-08-10 09:32 kichik
-2002-09-06 kichik
+ * /NSIS/trunk/Examples/one-section.nsi: Updated version. Windows
+ line breaks and fixed a small bug.
- * Contrib/nsExec/nsExec.dsp: Compiles faster, results are smaller
+2002-08-09 22:12 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h, /NSIS/trunk/Source/script.cpp: -
+ Plug-in command can now come in any order in the script
+ - Second plug-in DLL doesn't produce errors anymore
+ - Infinite loop bug fixed (again)
- * cvs - changelog.txt: Update
+2002-08-09 18:59 kichik
-2002-09-06 sunjammerx
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/script.cpp:
+ Fixed a bug that caused the second plug-in DLL not to get
+ extracted
- * Docs/Chapter4.html: Added PluginDir attribute
+2002-08-09 15:34 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: Contrib is on its own now
- * cvs - changelog.txt: Automated Update
+2002-08-09 15:26 kichik
-2002-09-06 eccles
+ * /NSIS/trunk/Source/exehead/exec.c: Fixed a bug with the
+ uninstaller creation
- * Contrib/InstallOptions/InstallerOptions.cpp: Optimisations phase
- 1 1.5K saved in total
+2002-08-09 14:31 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Source/makenssi.dsp: no more warnings
- * cvs - changelog.txt: Update
+2002-08-09 14:21 kichik
-2002-09-06 eccles
+ * /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h: Back to 37KB
- * Contrib/InstallOptions/io.dsp: Changed optimisation from maximise
- speed to minimise size
+2002-08-09 13:00 kichik
-2002-09-06 rainwater
+ * /NSIS/trunk/Examples/one-section.nsi: Now works when you select a
+ selected section
- * cvs - changelog.txt: Automated Update
+2002-08-08 21:14 kichik
-2002-09-06 sunjammerx
+ * /NSIS/trunk/Source/DialogTemplate.h: Compiles without Platform
+ SDK
- * Docs/src/attributes.but: Added PluginDir attribute
+2002-08-08 19:41 kichik
-2002-09-05 sunjammerx
+ * /NSIS/trunk/Source/exehead/Ui.c: Transparent static controls
- * makensis.htm: + Updated Plugin docs + Reclassified PluginDir as
- an attribute (not an instruction)
+2002-08-08 17:02 rainwater
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/exehead/Main.c: removed delete messagebox
- * cvs - changelog.txt: Automated Update
+2002-08-08 16:35 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/Plugins.h,
+ /NSIS/trunk/Source/script.cpp: Sunjammer's code is now fully
+ optimized
- * Contrib/nsExec/nsexec.c: Check for newline
+2002-08-08 15:05 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/exehead/dllpaths.c,
+ /NSIS/trunk/Source/exehead/dllpaths.h: no need
- * cvs - changelog.txt: Automated Update
+2002-08-08 15:04 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/script.cpp:
+ Improved Sunjammer's code
- * Contrib/nsExec/nsexec.c: Stream contents of output (avoid pipe
- being full)
+2002-08-08 10:21 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: Added one-section.nsi example
+ file
- * cvs - changelog.txt: Automated Update
+2002-08-08 10:20 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Examples/one-section.nsi: no message
- * Contrib/nsExec/nsexec.c: Some broken code, but fixes pipe issue
+2002-08-08 09:53 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: Infinite loop bug fixed
- * cvs - changelog.txt: Automated Update
+2002-08-08 09:52 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/ResourceEditor.h: Compiles without Platform
+ SDK
- * Examples/makensis.nsi: add nsExec.dll to installer
+2002-08-07 21:55 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/Plugins.cpp: Sunjammer's plug-in feature
+ optimized a bit. Still some work is done in the installer it
+ self, but I am currently working on it
- * Contrib/nsExec/nsExec.txt: Added nsExec.dll and readme file
+2002-08-07 18:12 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/exehead/exec.c: no message
- * cvs - changelog.txt: Automated Update
+2002-08-07 17:14 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Contrib/UIs/default.exe: Supports new ChangeUI
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.cpp: Updated makensisw with new
- my_strstr by Kickik
+2002-08-07 17:13 kichik
-2002-09-05 kichik
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf: grammer fixed
- * Contrib/Makensisw/noclib.cpp, Contrib/nsExec/nsexec.c: Fixed a
- bug with my_strstr
+2002-08-07 15:36 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/exehead/Ui.c: If default user language does
+ fit exactly, will try to find primary language match.
- * cvs - changelog.txt: Automated Update
+2002-08-07 15:14 kichik
-2002-09-05 sunjammerx
+ * /NSIS/trunk/Contrib/Language files/Spanish.nlf,
+ /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h:
+ ChangeUI can change any dialog. Added UseOuterUIItem
- * Source/makenssi.cpp: [no log message]
+2002-08-06 11:24 kichik
-2002-09-05 rainwater
+ * /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Contrib/Language files/French.nlf,
+ /NSIS/trunk/Contrib/Language files/German.nlf,
+ /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/lang.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/util.cpp, /NSIS/trunk/Source/util.h: Fixed
+ some string replacements and that FileErrorText bug.
+ ChangeUI now supports changing dialogs other than IDD_INST.
- * cvs - changelog.txt: Automated Update
+2002-08-05 22:29 kichik
-2002-09-05 kichik
+ * /NSIS/trunk/Contrib/MagicLime,
+ /NSIS/trunk/Contrib/MagicLime/splash.c: no message
- * Contrib/nsExec/nsexec.c: Memory now unlocks and can now be freed
+2002-08-05 21:09 kichik
-2002-09-05 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Can now add lines to install log
+ window from an external DLL without problems.
- * makensis.htm: Typo fixed
+2002-08-05 20:40 sunjammerx
-2002-09-05 kichik
+ * /NSIS/trunk/Source/Plugins.cpp, /NSIS/trunk/Source/script.cpp:
+ Implemented :: syntax to specify which dll contains the comamd to
+ run (in cases where more than one dll has the same command, OR
+ the command is the same name as a built-in command)
- * Contrib/Language files/Swedish.nlf: v2
+2002-08-05 19:38 sunjammerx
-2002-09-05 rainwater
+ * /NSIS/trunk/Source/makenssi.dsp: - Renamed ExternalCommands.cpp &
+ h to Plugin.cpp & h
- * cvs - changelog.txt: Automated Update
+2002-08-05 19:13 sunjammerx
-2002-09-04 rainwater
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/ExternalCommands.cpp,
+ /NSIS/trunk/Source/ExternalCommands.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/Plugins.cpp,
+ /NSIS/trunk/Source/Plugins.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: -
+ Fixed a bug in the dll export scanner (spotted and cured by
+ CodeSquid)
+ - Fixed a bug in the installer runtime (spotted by CodeSquid)
+ - Renamed all usage of ExternalCommand to Plugin
+ - Added a compile time PluginDir command
- * Contrib/nsExec/nsexec.c: added terminate process
+2002-08-05 14:31 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/makenssi.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h: Compiles without Platform
+ SDK
- * Contrib/nsExec/nsexec.c: Added ExecToLog
+2002-08-05 14:11 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Contrib/Language files/German.nlf: by SmartyMan
- * cvs - changelog.txt: Automated Update
+2002-08-05 13:55 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Examples/makensis.nsi: no message
- * Contrib/nsExec/nsExec.dsp, Contrib/nsExec/nsExec.dsw,
- Contrib/nsExec/nsexec.c, Contrib/nsExec/nsexec.h,
- Contrib/nsExec/nsis.c, Contrib/nsExec/nsis.h: New exec plugin
- (broke)
+2002-08-05 13:52 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Source/lang.cpp, /NSIS/trunk/Source/script.cpp: small
+ bug fixes
- * cvs - changelog.txt: Automated Update
+2002-08-05 02:05 sunjammerx
-2002-09-04 kichik
+ * /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/dllpaths.c,
+ /NSIS/trunk/Source/exehead/dllpaths.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/ExternalCommands.cpp,
+ /NSIS/trunk/Source/ExternalCommands.h,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.h: Added
+ automatic use of dll commands (see config.h for more details)
- * Examples/languages.nsi: Uses the new plugin call method
+2002-08-04 21:24 kichik
-2002-09-04 kichik
+ * /NSIS/trunk/Source/exehead/exec.c: nothing new, cvs just assumes
+ so...
- * Source/DialogTemplate.cpp: Better RTL, not perfect yet
+2002-08-04 21:22 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Source/makenssi.cpp: version updated
- * cvs - changelog.txt: Automated Update
+2002-08-04 21:22 kichik
-2002-09-04 joostverburg
+ * /NSIS/trunk/Source/exehead/util.c: damn p...
- * Examples/Modern UI/Readme.html: version 1.15. Multilanguage
- example: changed LangDialog to LangDLL::LangDialog (using the DLL
- name is now required)
+2002-08-04 20:29 kichik
-2002-09-04 kichik
+ * /NSIS/trunk/Contrib/Language files/French.nlf: no message
- * Contrib/InstallOptions/InstallerOptions.cpp: History updated
+2002-08-04 20:25 kichik
-2002-09-04 kichik
+ * /NSIS/trunk/Examples/makensis.nsi, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/util.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/tokens.cpp:
+ Full multilingual support!
- * Contrib/InstallOptions/Install Options.html: Updated info for
- Icon and Bitmap
+2002-08-04 19:49 sunjammerx
-2002-09-04 joostverburg
+ * /NSIS/trunk/Source/makenssi.cpp: Added KiCHiK (Amir Szekely) to
+ the list of contributors output when makensis.exe runs.
- * Examples/Modern UI/MultiLanguage.nsi: changed LangDialog to
- LangDLL::LangDialog (dll name is now required)
+2002-08-03 23:06 kichik
-2002-09-04 kichik
+ * /NSIS/trunk/Contrib/Language files/English.nlf,
+ /NSIS/trunk/Source/build.cpp, /NSIS/trunk/Source/build.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/lang.cpp,
+ /NSIS/trunk/Source/lang.h, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/script.cpp: no message
- * Contrib/InstallOptions/InstallerOptions.cpp: Two new control
- types: Icon and Bitmap
+2002-08-03 17:47 kichik
-2002-09-04 kichik
+ * /NSIS/trunk/Source/exehead/Ui.c: Now compiles on Windows older
+ than Win2000 too
- * Contrib/Language files/French.nlf: New translation by Veekee
+2002-08-03 17:47 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Source/nlf.cpp, /NSIS/trunk/Source/nlf.h: no message
- * cvs - changelog.txt: Automated Update
+2002-08-03 12:14 kichik
-2002-09-04 rainwater
+ * /NSIS/trunk/Source/nlf.cpp: no message
- * makensisw.exe, Contrib/Makensisw/utils.cpp: forgot recompile crap
+2002-08-02 20:11 kichik
-2002-09-04 rainwater
-
- * Contrib/Makensisw/makensisw.h, makensisw.exe: Forgot to update
- usage instructions
-
-2002-09-04 rainwater
-
- * Examples/makensis.nsi: Update for new makensisw
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 rainwater
-
- * SetCVSShellCommands.exe, SetCVSShellCommands.nsi, makensisw.exe,
- Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp: makensisw now takes same paramters as
- makensis (path to makensis.exe is no longer passed)
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 kichik
-
- * Source/Plugins.cpp, makensis.exe: Plugin command changed to
- plugin::command without .dll
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 kichik
-
- * Source/Plugins.cpp, makensis.exe: Now only accepts plug-in calls
- in the form of dllname[.dll]::FunctionName Prevents clashes with
- future commands
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 kichik
-
- * Source/makenssi.cpp, makensis.exe: Now processes plug-in DLLs
- only if a script is compiled
-
-2002-09-04 rainwater
-
- * Examples/makensis.nsi: Added UberSplash to the installer
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 justin1014
-
- * Source/exehead/util.c, makensis.exe: made win9x move/delete on
- reboot support proper and function like on win2k (in that shit is
- deleted in order). Also should be slightly smaller (though < 512
- bytes difference)
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 rainwater
-
- * Contrib/Makensisw/utils.cpp, makensisw.exe: Fix crash
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 rainwater
-
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/utils.cpp, Contrib/Makensisw/utils.h,
- Contrib/Makensisw/version.cpp: updated link to docs and buffer
- overrun prob
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-04 sunjammerx
-
- * Contrib/Makensisw/utils.cpp: Fixed a buffer overrun that was
- causing makensisw.exe to crash - I *think* this is the cause of the
- elusive crash that's been around for about a week now.
-
-2002-09-04 rainwater
-
- * cvs - changelog.txt: Automated Update
-
-2002-09-03 rainwater
-
- * Contrib/Makensisw/makensisw.dsp: minor update
-
-2002-09-03 rainwater
-
- * Contrib/Makensisw/Readme.txt: Testing new notification
-
-2002-09-03 joostverburg
-
- * Examples/Modern UI/Readme.html: version 1.14 - small grammar fix
- & updated UI files
-
-2002-09-03 joostverburg
-
- * cvs - changelog.txt: Modern UI 1.14
-
-2002-09-03 joostverburg
-
- * Examples/Modern UI/Readme.html: version 1.14 - small grammar fix
-
-2002-09-03 justin1014
-
- * Source/exehead/Ui.c, Source/exehead/resource.rc: Updated RichEdit
- usage to hopefully be better (still somewhat untested)
-
-2002-09-03 justin1014
-
- * cvs - changelog.txt, makensis.exe, Contrib/UIs/default.exe,
- Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: Updated RichEdit
- usage to hopefully be better (still somewhat untested)
-
-2002-09-03 kichik
-
- * cvs - changelog.txt: [no log message]
-
-2002-09-03 kichik
-
- * Source/exehead/Ui.c, makensis.exe: RichEdit loading handled in
- WM_INITDIALOG
-
-2002-09-03 justin1014
-
- * Source/script.cpp: made it so SetCompress off when in whole
- compression mode throws warning
-
-2002-09-03 justin1014
-
- * Source/script.cpp: made SetCompressor handle switching back from
- bzip2 to zlib
-
-2002-09-03 justin1014
-
- * Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp: removed excess compression
- dependencies since they were never used
-
-2002-09-03 justin1014
-
- * Source/build.cpp: fixed 'zlip' to 'zlib' typo in defines :)
-
-2002-09-03 kichik
-
- * Contrib/Language files/Korean.nlf: v2
-
-2002-09-03 kichik
-
- * makensis.exe: Fixed a bug that prevented the last letter from
- getting copied (with the new copy details to clipboard feature)
-
-2002-09-03 kichik
-
- * Source/exehead/Ui.c: Fixed a bug that prevented the last letter
- from getting copied
-
-2002-09-03 kichik
-
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: Now always loads
- RichEdit2 if present
-
-2002-09-03 kichik
-
- * Source/exehead/Ui.c, Source/exehead/resource.h,
- Source/exehead/resource.rc, makensis.exe, Contrib/UIs/default.exe:
- Now always loads RichEdit2 if present
-
-2002-09-03 kichik
-
- * Contrib/Language files/Russian.nlf: v2
-
-2002-09-03 kichik
-
- * makensis.exe: DeleteRegKey 3 now only accepts two parameters as
- it should (and possibly /ifempty)
-
-2002-09-03 joostverburg
-
- * Contrib/Language files/SimpChinese.nlf: Simplified Chinese
- Language file
-
-2002-09-03 rainwater
-
- * Docs/AppendixC.html, Docs/AppendixD.html: removed
-
-2002-09-03 rainwater
-
- * Docs/src/script.but, Docs/src/usage.but: fixed some warnings
-
-2002-09-03 eccles
-
- * Source/script.cpp: DeleteRegKey now complains if given a third
- parameter (other than /ifempty)
-
-2002-09-02 eccles
-
- * Source/exehead/exehead.xml: exehead.xml no longer required (added
- dynamically by makensis)
-
-2002-09-02 eccles
-
- * Examples/makensis.nsi, Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp: exehead.xml no longer required
- (added dynamically by makensis)
-
-2002-09-02 eccles
-
- * Examples/makensis.nsi, Examples/Modern UI/MultiLanguage.nsi,
- Examples/Modern UI/Example.nsi: Small grammar fix
-
-2002-09-02 rainwater
-
- * Docs/AppendixA.html, Docs/Chapter1.html, Docs/Chapter2.html,
- Docs/Chapter3.html, Docs/Chapter4.html, Docs/Contents.html,
- Docs/IndexPage.html, Docs/MakeNSISUsage.html, Docs/index.html,
- Docs/src/script.but, Docs/src/usage.but: more doc updates
-
-2002-09-02 rainwater
-
- * Docs/ScriptFileFormat.html: removed
-
-2002-09-02 rainwater
-
- * Docs/src/attributes.but, Docs/src/compilerflags.but,
- Docs/src/intro.but, Docs/src/script.but, Docs/src/usage.but: format
- updates
-
-2002-09-02 rainwater
-
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/Chapter1.html,
- Docs/Chapter2.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/MakeNSISUsage.html, Docs/ScriptFileFormat.html,
- Docs/index.html: Updates
-
-2002-09-02 rainwater
-
- * Docs/src/attributes.but, Docs/src/build.bat,
- Docs/src/compilerflags.but, Docs/src/config.but,
- Docs/src/history.but, Docs/src/intro.but, Docs/src/license.but,
- Docs/src/makefile, Docs/src/script.but, Docs/src/usage.but,
- Docs/src/bin/halibut.exe: new doc format (incomplete)
-
-2002-09-02 rainwater
-
- * Docs/AppendixA.html, Docs/AppendixB.html, Docs/AppendixC.html,
- Docs/AppendixD.html, Docs/Chapter1.html, Docs/Chapter2.html,
- Docs/Chapter3.html, Docs/Contents.html, Docs/IndexPage.html,
- Docs/index.html, Docs/style.css: New doc format (incomplete)
-
-2002-09-02 kichik
-
- * Contrib/Language files/Spanish.nlf: Credits fixed
-
-2002-09-02 kichik
-
- * Contrib/Language files/Spanish.nlf: NLF v2
-
-2002-09-02 kichik
-
- * Source/exehead/Ui.c, Source/exehead/lang.h: Typo fixed
-
-2002-09-02 kichik
-
- * Contrib/Language files/TradChinese.nlf: NLF v2
-
-2002-09-02 joostverburg
-
- * Contrib/Language files/French.nlf: v2
-
-2002-09-02 joostverburg
-
- * Contrib/UIs/mlbl.exe, Contrib/UIs/mlbl2.exe: [no log message]
-
-2002-09-02 joostverburg
-
- * Contrib/Language files/French.nlf: v2
-
-2002-09-02 joostverburg
-
- * Contrib/Language files/German.nlf: v2
-
-2002-09-02 joostverburg
-
- * Contrib/Language files/Dutch.nlf: v2
-
-2002-09-02 kichik
-
- * Source/DialogTemplate.cpp, Source/DialogTemplate.h,
- Source/script.cpp, Source/tokens.cpp: Right-to-left UIs support
- added
-
-2002-09-02 kichik
-
- * makensis.exe: ChangeUI /RTL added
-
-2002-09-02 joostverburg
-
- * Examples/Modern UI/Readme.html: version 1.13 - added 16 color
- icons
-
-2002-09-02 kichik
-
- * Source/exehead/Ui.c, Source/exehead/fileform.h,
- Source/exehead/lang.h: Copy details to clipboard added into NLF
-
-2002-09-02 kichik
-
- * makensis.exe: Copy details to clipboard now in the NLF
-
-2002-09-02 kichik
-
- * Source/lang.cpp, Source/lang.h, Contrib/Language
- files/English.nlf: Copy details to clipboard added
-
-2002-09-02 kichik
-
- * Contrib/Makensisw/makensisw.dsp: Faster build times
- (WIN32_LEAN_AND_MEAN)
-
-2002-09-02 kichik
-
- * makensisw.exe, Contrib/Makensisw/utils.cpp: Now always scrolls to
- the bottom
-
-2002-09-01 kichik
-
- * Source/exehead/bgbg.c, makensis.exe: Added DT_NOPREFIX
- (http://forums.winamp.com/showthread.php?s=&postid=609487#post609487)
-
-2002-09-01 kichik
-
- * makensis.exe: Buffer overrun fixed
-
-2002-09-01 kichik
-
- * Source/script.cpp: Removed 0xbadf00d thingy
-
-2002-09-01 eccles
-
- * Source/build.cpp: Buffer overrun
-
-2002-09-01 sunjammerx
-
- * Contrib/Makensisw/Readme.txt: Fixed a teeny weeny typo ;)
-
-2002-08-31 kichik
-
- * Contrib/ExDLL/exdll.dpr: Defined $LANGUAGE too
-
-2002-08-31 rainwater
-
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/utils.cpp: small
- makensisw fixes for possible crash
-
-2002-08-31 kichik
-
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp: Faster
-
-2002-08-31 kichik
-
- * Source/exehead/fileform.h: EW_REBOOT works with out 0xbadf00d
-
-2002-08-31 kichik
-
- * Source/exehead/exec.c, Source/exehead/fileform.c: Uses my_alloc
-
-2002-08-31 kichik
-
- * Source/exehead/util.c, Source/exehead/util.h: my_alloc
-
-2002-08-31 kichik
-
- * Source/exehead/Ui.c: Back to pop-up menu, multiple languages
- soon.
-
-2002-08-31 sunjammerx
-
- * Source/exehead/Ui.c: Minor improvement to CTRL-C key test code
- but it's still shite.
-
-2002-08-31 sunjammerx
-
- * makensis.htm: Added "CTRL-C in Detail View" feature to version
- history for future 2.0a8.
-
-2002-08-31 sunjammerx
-
- * Source/exehead/Ui.c: Copy detail view contents on CTRL-C (removed
- the popup context menu approach since it wasn't language
- independent). This code sucks, please improve it :)
-
-2002-08-31 sunjammerx
-
- * Source/exehead/Ui.c: Changed GetCursorPos to GetMessagePos &
- removed TCHAR crap. Still needs either language support for the
- popup menu text, or conversion to work off CTRL-C instead.
-
-2002-08-30 sunjammerx
-
- * Source/exehead/Ui.c: Adds "copy to clipboard" feature for
- DetailView (feature 590012)
-
-2002-08-30 rainwater
-
- * SetCVSShellCommands.exe, SetCVSShellCommands.nsi: added uninstall
- option
-
-2002-08-30 rainwater
-
- * makensis.htm: Fixed links to functions.htm
-
-2002-08-30 kichik
-
- * Examples/makensis.nsi: Start menu link to modern UI readme
-
-2002-08-30 kichik
-
- * Examples/Modern UI/Readme.html: [no log message]
-
-2002-08-30 kichik
-
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe: No more caption
- in the loading setup dialogs
-
-2002-08-30 sunjammerx
-
- * SetCVSShellCommands.exe, SetCVSShellCommands.nsi: Adds two shell
- commands for cvs users. Do not release.
-
-2002-08-29 kichik
-
- * Examples/makensis.nsi, Examples/Modern UI/Example.nsi,
- Examples/Modern UI/ModernUI.nsh, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/Readme.html: Uninstall
- text in the UI macros
-
-2002-08-29 kichik
-
- * makensis.htm: killahbite -> Jan T. Sott
-
-2002-08-29 kichik
-
- * Contrib/InstallOptions/test.nsi: Now points to the right DLL
-
-2002-08-29 kichik
-
- * Source/script.cpp, makensis.exe: CallInstDLL without /NOUNLOAD
- now works
-
-2002-08-29 kichik
-
- * Examples/Modern UI/Readme.html: [no log message]
-
-2002-08-29 kichik
-
- * makensis.htm: IO is 1.3 not 1.4 (thanks Ximon)
-
-2002-08-29 kichik
-
- * makensis.htm: $LANGUAGE documented
-
-2002-08-29 kichik
-
- * makensis.exe: Sections on/off problems solved
-
-2002-08-29 kichik
-
- * Examples/makensis.nsi: Install types descriptions back
-
-2002-08-29 kichik
-
- * Source/exehead/Ui.c: Section on/off problems solved
-
-2002-08-29 rainwater
-
- * Contrib/Makensisw/Readme.txt: New changes
-
-2002-08-29 rainwater
-
- * Contrib/Makensisw/makensisw.h, Contrib/Makensisw/utils.cpp,
- Examples/makensis.nsi: Updated urls to point to sourceforge project
- home
-
-2002-08-29 rainwater
-
- * makensisw.exe: updated makensisw with new links
-
-2002-08-29 kichik
-
- * Examples/makensis.nsi: Description for NSIS source code
-
-2002-08-29 kichik
-
- * Contrib/UIs/modern.exe, Contrib/UIs/modern2.exe,
- Contrib/UIs/modernsimple.exe, Examples/makensis.nsi: [no log
- message]
-
-2002-08-29 kichik
-
- * Examples/makensis.nsi: [no log message]
-
-2002-08-29 kichik
-
- * Contrib/UIs/modernsimple.exe: Optimized (no text)
-
-2002-08-29 kichik
-
- * Contrib/UIs/modern.exe, Examples/Modern UI/Example.nsi,
- Examples/Modern UI/ModernUI.nsh, Examples/Modern
- UI/MultiLanguage.nsi: [no log message]
-
-2002-08-29 kichik
-
- * Examples/Modern UI/ModernUI.nsh, Examples/Modern
- UI/MultiLanguage.nsi, Examples/Modern UI/Readme.html: Font stuff
- fixed
-
-2002-08-29 kichik
-
- * makensis.htm: Minor updates
-
-2002-08-29 kichik
-
- * Source/exehead/Ui.c: Still 36.5KB :D
-
-2002-08-29 kichik
-
- * Source/exehead/exec.c, makensis.exe: CreateFont gives the right
- size now
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c: Font size is not calculated correctly
-
-2002-08-29 kichik
-
- * makensis.htm: /NOUNLOAD for plugins documented
-
-2002-08-29 kichik
-
- * Source/exehead/Ui.c, makensis.exe: Back to 36.5KB again
-
-2002-08-29 kichik
-
- * Source/script.cpp, makensis.exe: Plugin calls can now use
- /NOUNLOAD too
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c: Font can be pushed
-
-2002-08-29 kichik
-
- * makensis.exe: CallInstDLL /NOUNLOAD added
-
-2002-08-29 kichik
-
- * Contrib/UIs/modern.exe, Examples/Modern UI/Example.nsi,
- Examples/Modern UI/Readme.html, Examples/Modern UI/ModernUI.nsh,
- Examples/Modern UI/MultiLanguage.nsi: [no log message]
-
-2002-08-29 kichik
-
- * Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/build.cpp, Source/build.h, Source/script.cpp,
- Source/tokens.cpp, makensis.htm: CallInstDLL /NOUNLOAD added
-
-2002-08-29 rainwater
-
- * Contrib/UIs/modernsimple.exe, Examples/makensis.nsi: more install
- gui changes
-
-2002-08-29 rainwater
-
- * makensis.exe, Examples/makensis.nsi: bg color of license is white
-
-2002-08-29 rainwater
-
- * Examples/makensis.nsi: Minor install change
-
-2002-08-29 rainwater
-
- * Contrib/UIs/modernsimple.exe: branding location change
-
-2002-08-29 rainwater
-
- * Contrib/UIs/modernsimple.exe, Examples/makensis.nsi: Installer
- changes
-
-2002-08-29 kichik
-
- * makensis.htm: [no log message]
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/resource.rc: Pretty :D
-
-2002-08-29 kichik
-
- * Examples/languages.nsi: Typo fixed
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c: Outputs the right language
-
-2002-08-29 kichik
-
- * Examples/languages.nsi: Using the new DLL
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c: Now really gives the right default
- language
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c: Gives the right default language now
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c: Languages are inserted backward
- Language in language is selected automatically Dialog caption is no
- longer dialog :)
-
-2002-08-29 kichik
-
- * Contrib/ExDLL/exdll.c: $LANGUAGE too
-
-2002-08-29 kichik
-
- * Contrib/LangDLL/LangDLL.c, Contrib/LangDLL/LangDLL.dsp,
- Contrib/LangDLL/LangDLL.dsw, Contrib/LangDLL/resource.h,
- Contrib/LangDLL/resource.rc, makensis.htm: [no log message]
-
-2002-08-29 kichik
-
- * Examples/languages.nsi: No more SetLanguage
-
-2002-08-29 kichik
-
- * makensis.exe: $LANGAUGE problems fixed again
-
-2002-08-29 kichik
-
- * Source/exehead/Ui.c, Source/exehead/ui.h: $LANGUAGE problems
- fixed again
-
-2002-08-29 kichik
-
- * Source/exehead/Ui.c, makensis.exe: $LANGUAGE not set bug fixed
-
-2002-08-28 kichik
-
- * Contrib/ExDLL/exdll.dsp: Now compiles into plugins
-
-2002-08-28 kichik
-
- * Contrib/Language files/French.nlf: [no log message]
-
-2002-08-28 kichik
-
- * Contrib/InstallOptions/io.dsp, Contrib/NSISdl/nsisdl.dsp:
- Compiles into plugins now
-
-2002-08-28 kichik
-
- * Source/script.cpp: Normal margins for branding text
-
-2002-08-28 kichik
-
- * Source/DialogTemplate.h, makensis.exe: Trim now works as it
- should
-
-2002-08-28 kichik
-
- * Source/DialogTemplate.cpp: Trim now works like it should
-
-2002-08-28 rainwater
-
- * Examples/makensis.nsi: trimright fix
-
-2002-08-28 rainwater
-
- * Examples/makensis.nsi: dirtext fix
-
-2002-08-28 rainwater
-
- * Examples/makensis.nsi: new makensis installer
-
-2002-08-28 rainwater
-
- * Contrib/UIs/modernsimple.exe: based of of joost' modern ui
-
-2002-08-28 rainwater
-
- * Examples/makensis.nsi: plugins=bin
-
-2002-08-28 kichik
-
- * makensis.htm: Makensisw 1.7
-
-2002-08-28 rainwater
-
- * makensisw.exe, Contrib/Makensisw/Readme.txt,
- Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/makensisw.dsp:
- Updated makensisw
-
-2002-08-28 kichik
-
- * Source/script.cpp: SetBrandingImage script message fixed
-
-2002-08-28 rainwater
-
- * Examples/makensis.nsi: Plugins changes
-
-2002-08-28 rainwater
-
- * Contrib/Makensisw/makensisw.cpp, Source/build.cpp: Moved plugins
- to Plugins\ directory
-
-2002-08-28 rainwater
-
- * Contrib/Makensisw/makensisw.cpp, Contrib/Makensisw/utils.cpp,
- makensisw.exe: Added warnings to titlebar
-
-2002-08-28 kichik
-
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/state.h, Source/exehead/util.c, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h, Source/exehead/fileform.h,
- makensis.exe: Removed SetLanguage (back to $LANGUAGE)
-
-2002-08-28 kichik
-
- * Contrib/UIs/modern.exe: [no log message]
-
-2002-08-28 kichik
-
- * makensis.exe, Source/script.cpp: Can now trim the branding text
- with no text given (will use the default English branding text to
- determine the text size)
-
-2002-08-28 kichik
-
- * makensis.htm: Trimming documented
-
-2002-08-28 kichik
-
- * Source/script.cpp, makensis.exe: Sub-sections can have a defined
- name now too Fixed a bug with macros at the end of the file
-
-2002-08-28 kichik
-
- * Source/exehead/util.c: Space saving
-
-2002-08-28 kichik
-
- * Source/exehead/Ui.c, Source/tokens.cpp: Sub-sections can have a
- defined name now too
-
-2002-08-28 kichik
-
- * makensis.htm: Spanish update
-
-2002-08-28 kichik
-
- * makensis.htm: History changes
-
-2002-08-28 kichik
-
- * Contrib/Language files/Spanish.nlf: [no log message]
-
-2002-08-28 kichik
-
- * makensis.exe: EXE header size down to 36.5KB SetLanguage problems
- fixed BrandingText trimming options added
-
-2002-08-28 kichik
-
- * Source/exehead/Ui.c: SetLanguage problems fixed
-
-2002-08-28 kichik
-
- * Source/exehead/exec.c, Source/exehead/state.h,
- Source/exehead/util.c: 0.5KB saving
-
-2002-08-28 kichik
-
- * Source/DialogTemplate.cpp: Trimming added
-
-2002-08-28 kichik
-
- * Source/script.cpp, Source/tokens.cpp: BrandingText control
- trimming option added
-
-2002-08-28 kichik
-
- * Source/DialogTemplate.h: Trimming functions added
-
-2002-08-27 rainwater
-
- * Examples/makensis.nsi: turn xp style on in makensis install
-
-2002-08-26 rainwater
-
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp: Beep changes
-
-2002-08-26 kichik
-
- * Contrib/Makensisw/Readme.txt: h :)
-
-2002-08-26 rainwater
-
- * Contrib/Makensisw/License.txt: license update
-
-2002-08-26 rainwater
-
- * makensisw.exe, Contrib/Makensisw/makensisw.cpp: System Beep
- addition
-
-2002-08-26 kichik
-
- * Examples/makensis.nsi: MagicLime new version and docs
-
-2002-08-26 rainwater
-
- * makensisw.exe: Updated makensisw with beep
-
-2002-08-26 rainwater
-
- * Contrib/Makensisw/makensisw.cpp: Added System Beep
-
-2002-08-26 kichik
-
- * Examples/makensis.nsi: Alpha 7
-
-2002-08-26 kichik
-
- * Examples/Modern UI/Example.nsi, Examples/Modern UI/License.txt,
- Examples/Modern UI/Readme.html, Examples/Modern UI/Readme.png,
- Examples/Modern UI/Screenshot.png: [no log message]
-
-2002-08-26 kichik
-
- * makensis.htm: alpha 7 docs
-
-2002-08-26 kichik
-
- * Source/exehead/Ui.c, makensis.exe: InstallColors /windows
- problems fixed
-
-2002-08-26 kichik
-
- * Contrib/UIs/modern.exe: Show details button problems fixed
-
-2002-08-26 kichik
-
- * Contrib/UIs/modern.exe: A few pixels here and there
-
-2002-08-26 kichik
-
- * Examples/languages.nsi: [no log message]
-
-2002-08-26 kichik
-
- * Source/script.cpp, makensis.exe: ChangeUI prints nicer error
- messages
-
-2002-08-26 kichik
-
- * makensis.exe: Disabled UseOuterUIItem
-
-2002-08-26 kichik
-
- * Source/script.cpp, Source/tokens.cpp, Source/tokens.h,
- Source/exehead/fileform.h, Source/build.cpp, Source/exehead/Ui.c:
- Disabled UseOuterUIItem
-
-2002-08-26 kichik
-
- * Contrib/InstallOptions/InstallerOptions.cpp: Added CancelShow (by
- ORTIM: 13-August 2002) Added pixel transformation for widgets (by
- ORTIM: 14-August-2002)
-
-2002-08-26 kichik
-
- * Contrib/InstallOptions/Install Options.html: 1.3 docs
-
-2002-08-26 kichik
-
- * Contrib/UIs/InstallShield.exe, Contrib/UIs/modern.exe: [no log
- message]
-
-2002-08-25 kichik
-
- * Source/exehead/Ui.c, Source/exehead/ui.h, makensis.exe: Added
- SetLanguage ($LANGUAGE is no longer a variable) Language can be set
- not only from .onInit Added .onMouseOverSection
-
-2002-08-25 kichik
-
- * Source/exehead/fileform.h: Added SetLanguage ($LANGUAGE is no
- longer a variable) Added .onMouseOverSection
-
-2002-08-25 kichik
-
- * Source/script.cpp, Source/exehead/exec.c, Source/exehead/state.h,
- Source/exehead/util.c: Added SetLanguage ($LANGUAGE is no longer a
- variable)
-
-2002-08-25 kichik
-
- * Source/build.cpp: Added .onMouseOverSection
-
-2002-08-25 kichik
-
- * Source/tokens.cpp, Source/tokens.h: Added SetLanguage
-
-2002-08-25 kichik
-
- * Source/exehead/Ui.c, makensis.exe: update_status_text bug fixed
-
-2002-08-25 kichik
-
- * makensis.exe: CopyFiles bug solved (link to newest libs) Replaced
- .onStaticBkColor with .onInitDialog Added SetStaticBkColor Solved
- threading issues
-
-2002-08-25 kichik
-
- * Source/exehead/exec.c: Added SetStaticBkColor
-
-2002-08-25 kichik
-
- * Source/exehead/Ui.c: Replaced .onStaticBkColor with .onInitDialog
- No more threads conflicts
-
-2002-08-25 kichik
-
- * Source/exehead/fileform.h: Replaced .onStaticBkColor with
- .onInitDialog Added SetStaticBkColor
-
-2002-08-25 kichik
-
- * Source/build.cpp: Replaced .onStaticBkColor with .onInitDialog
-
-2002-08-25 kichik
-
- * Source/script.cpp, Source/tokens.cpp, Source/tokens.h: Added
- SetStaticBkColor
-
-2002-08-24 kichik
-
- * makensis.exe: CopyFiles script message no longer always prints
- (silent) Fixed some problems with the new background callback
- function Silent is working again
-
-2002-08-24 kichik
-
- * Source/exehead/Ui.c: Fixed some problems with the new background
- callback function Silent is working again
-
-2002-08-24 kichik
-
- * Source/script.cpp: CopyFiles script message fixed (no longer
- always silent)
-
-2002-08-23 kichik
-
- * makensis.exe, Source/lang.cpp, Source/script.cpp,
- Source/tokens.cpp: Custom install type text can now be changed
-
-2002-08-23 kichik
-
- * Source/exehead/state.h: Better backward compatibility ($LANGUAGE
- is now last in the user variables array)
-
-2002-08-23 kichik
-
- * Source/makenssi.cpp: alpha 7
-
-2002-08-23 kichik
-
- * uninst-nsis.exe: [no log message]
-
-2002-08-23 kichik
-
- * Contrib/UIs/default.exe: ChangeUI can now change IDD_VERIFY
-
-2002-08-23 kichik
-
- * Source/build.cpp, Source/script.cpp, Source/exehead/util.c,
- makensis.exe: Better backward compatibility ($LANGUAGE is now last
- in the user variables array)
-
-2002-08-23 kichik
-
- * Source/script.cpp, makensis.exe: ChangeUI can now change
- IDD_VERIFY
-
-2002-08-23 kichik
-
- * Source/exehead/Ui.c: Default license color now fits the user
- system
-
-2002-08-23 kichik
-
- * Source/build.cpp, makensis.exe: Default license color now fits
- the user system Now reports the right number of required sections
-
-2002-08-22 kichik
-
- * Source/exehead/Ui.c, makensis.exe: Language can now really be
- selected from .onInit
-
-2002-08-22 kichik
-
- * Source/exehead/util.c, makensis.exe: Fixed a bug that gave
- SMPROGRAMS, SMSTARTUP, DESKTOP and STARTMENU to have wrong values.
-
-2002-08-22 kichik
-
- * Source/exehead/Ui.c, makensis.exe: Clearing background problem
- with custom background color (.onStaticCtlBkColor)
-
-2002-08-21 kichik
-
- * Source/exehead/Ui.c, makensis.exe: Now uses the default language
- in .onInit
-
-2002-08-21 kichik
-
- * Source/exehead/Ui.c, Source/exehead/state.h, makensis.exe: Fixed
- a bug that gave EXEDIR, CMDLINE and others wrong values
-
-2002-08-21 kichik
-
- * Contrib/Language files/TradChinese.nlf: no message
-
-2002-08-21 kichik
-
- * makensis.exe: Language can be choosen from .onInit Replaced
- SetDlgItemText by GetDlgItem Added CreateFont Checkbox is only
- required in IDD_DIR if logging is enabled Not specifying any
- language now really causes the script compiler to use the last used
- language Fixed a bug with MBCS and the uninstaller text Fixed a bug
- that caused RTF not to show on Windows 9x Added a dialog that shows
- up if compress whole is used and initial uncompressing lasts longer
- than a second.
-
-2002-08-21 kichik
-
- * Source/exehead/util.c: Language can be choosen from .onInit
-
-2002-08-21 kichik
-
- * Source/exehead/Ui.c: Language can be choosen from .onInit Added
- .onStaticCtlBkColor and un.onStaticCtlBkColor Fixed a bug that
- caused RTF not to show on Windows 9x
-
-2002-08-21 kichik
-
- * Source/tokens.cpp, Source/tokens.h: Replaced SetDlgItemText by
- GetDlgItem Added CreateFont
-
-2002-08-21 kichik
-
- * Source/exehead/state.h: Language can be choosen from .onInit
-
-2002-08-21 kichik
-
- * Source/script.cpp: Language can be choosen from .onInit Replaced
- SetDlgItemText by GetDlgItem Added CreateFont Checkbox is only
- required in IDD_DIR if logging is enabled Not specifying any
- language now really causes the script compiler to use the last used
- language Fixed a bug with MBCS and the uninstaller text
-
-2002-08-21 kichik
-
- * Source/exehead/lang.h, Source/exehead/Main.c: Added a dialog that
- shows up if compress whole is used and initial uncompressing lasts
- longer than a second.
-
-2002-08-21 kichik
-
- * Source/lang.cpp: Not specifying any language now really causes
- the script compiler to use the last used language
-
-2002-08-21 kichik
-
- * Source/exehead/fileform.h: Replaced SetDlgItemText by GetDlgItem
- Added .onStaticCtlBkColor and un.onStaticCtlBkColor Added
- CreateFont
-
-2002-08-21 kichik
-
- * Source/exehead/fileform.c: Added a dialog that shows up if
- compress whole is used and initial uncompressing lasts longer than
- a second.
-
-2002-08-21 kichik
-
- * Source/exehead/exec.c: Replaced SetDlgItemText by GetDlgItem
- SendMessage WM_SETTEXT treats lParam as a string Added CreateFont
-
-2002-08-21 kichik
-
- * Contrib/Language files/English.nlf: Added a comment saying you
- should put your name in the translation
-
-2002-08-21 kichik
-
- * Source/exehead/config.h: Added a dialog that shows up if compress
- whole is used and initial uncompressing lasts longer than a second.
-
-2002-08-21 kichik
-
- * Source/build.h: Typo fixed
-
-2002-08-21 kichik
-
- * Source/build.cpp: Language can be choosen from .onInit Added
- .onStaticCtlBkColor and un.onStaticCtlBkColor Type fixed
-
-2002-08-21 kichik
-
- * Source/exehead/bgbg.c: Language can be choosen from .onInit
-
-2002-08-20 kichik
-
- * Contrib/Language files/Russian.nlf: no message
-
-2002-08-20 eccles
-
- * Source/exehead/util.c: SetShellVarContext all - was failing to
- fall back to current user Optimised this a little too
-
-2002-08-20 eccles
-
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/bgbg.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/exec.h,
- Source/exehead/exehead-bzip2.dsp, Source/exehead/exehead-zlib.dsp,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/ui.h, Source/exehead/util.c, Source/exehead/util.h,
- Source/zlib/INFLATE.C, Source/zlib/ZLIB.H, Source/build.h,
- Source/crc32.c: Instant saving of 0.5K - use of stdcall calling
- convention to reduce code overhead associated with managing the
- stack
-
-2002-08-20 eccles
-
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/util.c,
- Source/exehead/util.h: Small space-saving optimisations
-
-2002-08-17 eccles
-
- * Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp: Problem with previous version,
- investigating an alternative.
-
-2002-08-17 eccles
-
- * Source/zlib/INFLATE.C: no message
-
-2002-08-16 eccles
-
- * Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp: instant saving of almost 0.5K!
- (calling convention 'cdecl' => 'stdcall')
-
-2002-08-16 kichik
-
- * Source/DialogTemplate.cpp, Source/ResourceEditor.cpp: Unicode to
- MBCS conversion bugs fixed
-
-2002-08-16 kichik
-
- * Source/DialogTemplate.cpp, Source/ResourceEditor.cpp: MBCS to
- Unicode conversion bugs fixed
-
-2002-08-11 eccles
-
- * Source/crc32.c, Source/exehead/bgbg.c: Small space-saving
- optimisation
-
-2002-08-11 eccles
-
- * Source/lang.cpp, Source/lang.h, Source/script.cpp: Changes to
- format of strings tables
-
-2002-08-11 eccles
-
- * Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/lang.h,
- Source/exehead/ui.h, Source/exehead/util.c, Source/exehead/util.h:
- Implemented a method where LANG_* strings can be referenced by
- constant id's - reducing code overhead associated with looking up
- the global strings variables. Kind of. Just compare the assembly
- output...
-
-2002-08-11 kichik
-
- * Contrib/Language files/Swedish.nlf: no message
-
-2002-08-10 kichik
-
- * Contrib/Language files/Korean.nlf: Korean translation by dTomoyo
-
-2002-08-10 kichik
-
- * Contrib/Language files/Dutch.nlf: no message
-
-2002-08-10 kichik
-
- * Source/exehead/fileform.h, Source/exehead/util.c,
- Source/build.cpp: No more compile errors without
- NSIS_CONFIG_PLUGIN_SUPPORT
-
-2002-08-10 kichik
-
- * Source/exehead/util.c: No more compile errors without
- NSIS_CONFIG_PLUGIN_SUPPORT
-
-2002-08-10 kichik
-
- * Examples/one-section.nsi: Updated version. Windows line breaks
- and fixed a small bug.
-
-2002-08-10 kichik
-
- * makensis.htm: Fixed typos
-
-2002-08-10 kichik
-
- * makensis.htm, Examples/makensis.nsi, Source/Plugins.cpp,
- Source/Plugins.h, Source/build.cpp, Source/build.h,
- Source/makenssi.cpp, Source/script.cpp, Source/exehead/Ui.c,
- makensis.exe: - Plug-in command can now come in any order in the
- script - Second plug-in DLL doesn't produce errors anymore -
- Infinite loop bug fixed (again)
-
-2002-08-09 kichik
-
- * Source/script.cpp, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/util.c, makensis.exe,
- Source/build.cpp: Fixed a bug that caused the second plug-in DLL
- not to get extracted
-
-2002-08-09 kichik
-
- * Examples/makensis.nsi: Contrib is on its own now
-
-2002-08-09 kichik
-
- * Source/exehead/exec.c, makensis.exe: Fixed a bug with the
- uninstaller creation
-
-2002-08-09 kichik
-
- * makensis.htm: Alpha 5
-
-2002-08-09 kichik
-
- * Source/makenssi.dsp: no more warnings
-
-2002-08-09 kichik
-
- * makensis.exe: Back to 37KB & no more delete message box at the
- end
-
-2002-08-09 kichik
-
- * Source/exehead/Main.c, Source/exehead/Ui.c,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/fileform.c, Source/exehead/util.c,
- Source/exehead/util.h: Back to 37KB
-
-2002-08-09 kichik
-
- * Examples/one-section.nsi: Now works when you select a selected
- section
-
-2002-08-09 kichik
-
- * Source/DialogTemplate.h: Compiles without Platform SDK
-
-2002-08-08 kichik
-
- * Source/exehead/Ui.c: Transparent static controls
-
-2002-08-08 rainwater
-
- * Source/exehead/Main.c: removed delete messagebox
-
-2002-08-08 kichik
-
- * Source/Plugins.cpp, Source/Plugins.h, Source/script.cpp,
- makensis.exe: Sunjammer's code is now fully optimized
-
-2002-08-08 kichik
-
- * Source/exehead/dllpaths.c, Source/exehead/dllpaths.h: no need
-
-2002-08-08 kichik
-
- * Source/build.cpp, makensis.exe, makensis.htm,
- Examples/makensis.nsi, Source/build.h, Source/lang.cpp,
- Source/makenssi.cpp, Source/script.cpp, Source/exehead/Main.c,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/exehead-bzip2.dsp, Source/exehead/exehead-zlib.dsp,
- Source/exehead/fileform.h, Source/exehead/ui.h,
- Source/exehead/util.c, Source/exehead/util.h: Improved Sunjammer's
- code
-
-2002-08-08 kichik
-
- * makensis.exe: Infinite loop bug fixed
-
-2002-08-08 kichik
-
- * Examples/makensis.nsi: Added one-section.nsi example file
-
-2002-08-08 kichik
-
- * Examples/one-section.nsi: no message
-
-2002-08-08 kichik
-
- * makensis.htm: links problem (thanks to Smile2Me)
-
-2002-08-08 kichik
-
- * Source/exehead/Ui.c: Infinite loop bug fixed
-
-2002-08-08 kichik
-
- * Source/ResourceEditor.h: Compiles without Platform SDK
-
-2002-08-08 kichik
-
- * makensis.exe, Source/Plugins.cpp, Source/build.cpp,
- Source/exehead/config.h: Sunjammer's plug-in feature optimized a
- bit. Still some work is done in the installer it self, but I am
- currently working on it
-
-2002-08-07 kichik
-
- * Source/exehead/exec.c: no message
-
-2002-08-07 kichik
-
- * Contrib/UIs/default.exe: Supports new ChangeUI
-
-2002-08-07 kichik
-
- * Contrib/Language files/Spanish.nlf: grammer fixed
-
-2002-08-07 kichik
-
- * Source/exehead/Ui.c, makensis.exe: If default user language does
- fit exactly, will try to find primary language match.
-
-2002-08-07 kichik
-
- * makensis.exe, Contrib/Language files/Spanish.nlf,
- Source/build.cpp, Source/script.cpp, Source/tokens.cpp,
- Source/tokens.h, Source/exehead/Ui.c, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/exehead/lang.h, Source/exehead/resource.rc: ChangeUI can
- change any dialog. Added UseOuterUIItem
-
-2002-08-07 kichik
-
- * nsis20a2.exe, nsis20a3.exe: no message
-
-2002-08-06 kichik
-
- * Contrib/Language files/English.nlf, Contrib/Language
- files/French.nlf, Contrib/Language files/German.nlf,
- Source/lang.cpp, Source/lang.h, Source/script.cpp,
- Source/tokens.cpp, Source/util.cpp, Source/util.h, makensis.exe:
- Fixed some string replacements and that FileErrorText bug.
- ChangeUI now supports changing dialogs other than IDD_INST.
-
-2002-08-06 sunjammerx
-
- * makensis.htm: Added plugin related information.
-
-2002-08-06 kichik
-
- * Source/exehead/Ui.c: Can now add lines to install log window from
- an external DLL without problems.
-
-2002-08-05 sunjammerx
-
- * Source/Plugins.cpp, Source/script.cpp: Implemented :: syntax to
- specify which dll contains the comamd to run (in cases where more
- than one dll has the same command, OR the command is the same name
- as a built-in command)
-
-2002-08-05 sunjammerx
-
- * Source/makenssi.dsp: - Renamed ExternalCommands.cpp & h to
- Plugin.cpp & h
-
-2002-08-05 sunjammerx
-
- * Source/ExternalCommands.cpp, Source/ExternalCommands.h,
- Source/Plugins.cpp, Source/Plugins.h, Source/build.cpp,
- Source/build.h, Source/makenssi.cpp, Source/script.cpp,
- Source/tokens.cpp, Source/tokens.h, Source/exehead/config.h,
- Source/exehead/exec.c, Source/exehead/fileform.h: - Fixed a bug in
- the dll export scanner (spotted and cured by CodeSquid) - Fixed a
- bug in the installer runtime (spotted by CodeSquid) - Renamed all
- usage of ExternalCommand to Plugin - Added a compile time PluginDir
- command
-
-2002-08-05 kichik
-
- * Examples/makensis.nsi, Source/DialogTemplate.h,
- Source/ResourceEditor.h, Source/makenssi.cpp: Compiles without
- Platform SDK
-
-2002-08-05 kichik
-
- * Contrib/Language files/German.nlf: by SmartyMan
-
-2002-08-05 kichik
-
- * Examples/makensis.nsi: no message
-
-2002-08-05 kichik
-
- * Source/lang.cpp, Source/script.cpp: small bug fixes
-
-2002-08-05 sunjammerx
-
- * Source/ExternalCommands.cpp, Source/ExternalCommands.h,
- Source/build.cpp, Source/build.h, Source/makenssi.cpp,
- Source/makenssi.dsp, Source/script.cpp, Source/tokens.h,
- Source/exehead/Main.c, Source/exehead/config.h,
- Source/exehead/dllpaths.c, Source/exehead/dllpaths.h,
- Source/exehead/exec.c, Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp, Source/exehead/fileform.h: Added
- automatic use of dll commands (see config.h for more details)
-
-2002-08-05 kichik
-
- * Source/exehead/exec.c: nothing new, cvs just assumes so...
-
-2002-08-05 kichik
-
- * makensis.exe: new version string and stupid p bug fixed
-
-2002-08-05 kichik
-
- * Source/makenssi.cpp: version updated
-
-2002-08-05 kichik
-
- * Source/exehead/util.c: damn p...
-
-2002-08-04 kichik
-
- * Contrib/Language files/French.nlf: no message
-
-2002-08-04 kichik
-
- * Source/build.cpp, Source/build.h, Source/lang.cpp,
- Source/script.cpp, Source/tokens.cpp, Source/exehead/Main.c,
- Source/exehead/Ui.c, Source/exehead/exec.c,
- Source/exehead/fileform.h, Source/exehead/lang.h, makensis.exe,
- makensis.htm, Examples/makensis.nsi, Source/exehead/ui.h,
- Source/exehead/util.c, nsis20a3.exe: Full multilingual support!
-
-2002-08-04 sunjammerx
-
- * Source/makenssi.cpp: Added KiCHiK (Amir Szekely) to the list of
- contributors output when makensis.exe runs.
-
-2002-08-04 kichik
-
- * Source/build.cpp, makensis.exe, Contrib/Language
- files/English.nlf, Source/build.h, Source/lang.cpp, Source/lang.h,
- Source/makenssi.dsp, Source/script.cpp, Source/exehead/Ui.c,
- Source/exehead/exec.c, Source/exehead/fileform.h,
- Source/exehead/lang.h: no message
-
-2002-08-03 kichik
-
- * Source/exehead/Ui.c: Now compiles on Windows older than Win2000
- too
-
-2002-08-03 kichik
-
- * Source/nlf.cpp, Source/nlf.h: no message
-
-2002-08-03 kichik
-
- * Source/nlf.cpp: no message
-
-2002-08-02 kichik
-
- * Source/nlf.h, Source/nlf.cpp, Source/script.cpp: no message
-
-2002-08-02 kichik
-
- * Source/script.cpp, Source/tokens.cpp, Source/tokens.h,
- Source/nlf.h: no message
-
-2002-08-02 rainwater
-
- * Examples/bigtest.nsi: Added the XPStyle on option for the
- "bigtest".
-
-2002-08-02 kichik
-
- * Source/exehead/resource.rc: Saved 8 bytes
-
-2002-08-02 kichik
-
- * Contrib/Language files/English.nlf, Source/build.cpp: no message
-
-2002-08-02 kichik
-
- * nsis20a2.exe: Fixed a bug with ChangeUI and no branding image
-
-2002-08-02 kichik
-
- * Source/DialogTemplate.cpp, makensis.exe: Fixed a bug with
- ChangeUI and no branding image
-
-2002-08-02 rainwater
-
- * Source/makenssi.ncb, Source/makenssi.opt, Source/makenssi.plg:
- Removed temp files
-
-2002-08-02 kichik
-
- * makensis.exe, Examples/makensis.nsi, Source/makenssi.dsp,
- Source/makenssi.opt, Source/makenssi.plg: no message
-
-2002-08-02 kichik
-
- * nsisconf.nsi: no message
-
-2002-08-02 kichik
-
- * Source/zlib/deflate.c, Source/zlib/DEFLATE.H,
- Source/zlib/INFBLOCK.C, Source/zlib/INFBLOCK.H,
- Source/zlib/INFCODES.C, Source/zlib/INFCODES.H,
- Source/zlib/INFLATE.C, Source/zlib/INFTREES.C,
- Source/zlib/INFTREES.H, Source/zlib/INFUTIL.C,
- Source/zlib/INFUTIL.H, Source/zlib/ZCONF.H, Source/zlib/ZLIB.H,
- Source/zlib/ZUTIL.H, Source/zlib/trees.c: Initial revision
-
-2002-08-02 kichik
-
- * Source/zlib/deflate.c, Source/zlib/DEFLATE.H,
- Source/zlib/INFBLOCK.C, Source/zlib/INFBLOCK.H,
- Source/zlib/INFCODES.C, Source/zlib/INFCODES.H,
- Source/zlib/INFLATE.C, Source/zlib/INFTREES.C,
- Source/zlib/INFTREES.H, Source/zlib/INFUTIL.C,
- Source/zlib/INFUTIL.H, Source/zlib/ZCONF.H, Source/zlib/ZLIB.H,
- Source/zlib/ZUTIL.H, Source/zlib/trees.c: no message
-
-2002-08-02 kichik
-
- * license.txt, makensis.exe, makensis.htm, makensisw.exe,
- nsisconf.nsi, uninst-nsis.exe, Contrib/ExDLL/exdll.c,
- Contrib/ExDLL/exdll.dpr, Contrib/ExDLL/exdll.dsp,
- Contrib/ExDLL/exdll.dsw, Contrib/InstallOptions/Install
- Options.html, Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/io.dsp, Contrib/InstallOptions/io.dsw,
- Contrib/InstallOptions/ioptdll.rc,
- Contrib/InstallOptions/resource.h, Contrib/InstallOptions/test.ini,
- Contrib/InstallOptions/test.nsi, Contrib/Makensisw/License.txt,
- Contrib/Makensisw/afxres.h, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/makensisw.dsw,
- Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/makensisw.xml, Contrib/Makensisw/noclib.cpp,
- Contrib/Makensisw/noclib.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h, Contrib/Makensisw/version.cpp,
- Contrib/NSISdl/asyncdns.cpp, Contrib/NSISdl/asyncdns.h,
- Contrib/NSISdl/connection.cpp, Contrib/NSISdl/connection.h,
- Contrib/NSISdl/httpget.cpp, Contrib/NSISdl/httpget.h,
- Contrib/NSISdl/netinc.h, Contrib/NSISdl/ReadMe.txt,
- Contrib/NSISdl/nsisdl.cpp, Contrib/NSISdl/nsisdl.dsp,
- Contrib/NSISdl/nsisdl.dsw, Contrib/NSISdl/Script1.rc,
- Contrib/NSISdl/resource.h, Contrib/NSISdl/util.cpp,
- Contrib/NSISdl/util.h, Contrib/Splash/splash.c,
- Contrib/Splash/splash.dsp, Contrib/Splash/splash.dsw,
- Contrib/Splash/splash.txt, Contrib/UIs/default.exe,
- Contrib/UIs/mlbl.exe, Contrib/UIs/mlbl2.exe,
- Contrib/zip2exe/icon.ico, Contrib/zip2exe/main.cpp,
- Contrib/zip2exe/res.rc, Contrib/zip2exe/resource.h,
- Contrib/zip2exe/zip2exe.dsp, Contrib/zip2exe/zip2exe.dsw,
- Contrib/zip2exe/zlib/ADLER32.C, Contrib/zip2exe/zlib/CRC32.C,
- Contrib/zip2exe/zlib/INFBLOCK.C, Contrib/zip2exe/zlib/INFBLOCK.H,
- Contrib/zip2exe/zlib/INFCODES.C, Contrib/zip2exe/zlib/INFCODES.H,
- Contrib/zip2exe/zlib/INFFAST.C, Contrib/zip2exe/zlib/INFFAST.H,
- Contrib/zip2exe/zlib/INFFIXED.H, Contrib/zip2exe/zlib/INFLATE.C,
- Contrib/zip2exe/zlib/INFTREES.C, Contrib/zip2exe/zlib/INFTREES.H,
- Contrib/zip2exe/zlib/INFUTIL.C, Contrib/zip2exe/zlib/INFUTIL.H,
- Contrib/zip2exe/zlib/Unzip.c, Contrib/zip2exe/zlib/UNZIP.H,
- Contrib/zip2exe/zlib/ZCONF.H, Contrib/zip2exe/zlib/ZLIB.H,
- Contrib/zip2exe/zlib/Zutil.c, Contrib/zip2exe/zlib/ZUTIL.H,
- Examples/bigtest.nsi, Examples/branding.nsh, Examples/example1.nsi,
- Examples/example2.nsi, Examples/functions.htm, Examples/gfx.nsi,
- Examples/makensis.nsi, Examples/primes.nsi, Examples/rtest.nsi,
- Examples/viewhtml.nsi, Examples/waplugin.nsi,
- Examples/WinMessages.NSH, Source/afxres.h, Source/build.cpp,
- Source/build.h, Source/cbzip2.h, Source/compressor.h,
- Source/crc32.c, Source/czlib.h, Source/DialogTemplate.cpp,
- Source/DialogTemplate.h, Source/Makefile, Source/exedata.cpp,
- Source/exedata.h, Source/icon.ico, Source/lineparse.h,
- Source/makenssi.cpp, Source/makenssi.dsp, Source/makenssi.dsw,
- Source/makenssi.ncb, Source/makenssi.opt, Source/makenssi.plg,
- Source/resource.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/Script1.rc, Source/script.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/tokens.h,
- Source/util.cpp, Source/util.h, Source/bzip2/blocksort.c,
- Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/bzlib_private.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/huffman.c,
- Source/bzip2/randtable.c, Source/exehead/afxres.h,
- Source/exehead/bgbg.c, Source/exehead/bin2h.c,
- Source/exehead/bin2h.exe, Source/exehead/bitmap1.bmp,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp, Source/exehead/exehead.xml,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/Main.c, Source/exehead/lang.h,
- Source/exehead/Makefile, Source/exehead/nsis.ico,
- Source/exehead/resource.h, Source/exehead/resource.rc,
- Source/exehead/state.h, Source/exehead/Ui.c, Source/exehead/ui.h,
- Source/exehead/uninst.ico, Source/exehead/util.c,
- Source/exehead/util.h: Initial revision
-
-2002-08-02 kichik
-
- * license.txt, makensis.exe, makensis.htm, makensisw.exe,
- nsisconf.nsi, uninst-nsis.exe, Contrib/ExDLL/exdll.c,
- Contrib/ExDLL/exdll.dpr, Contrib/ExDLL/exdll.dsp,
- Contrib/ExDLL/exdll.dsw, Contrib/InstallOptions/Install
- Options.html, Contrib/InstallOptions/InstallerOptions.cpp,
- Contrib/InstallOptions/io.dsp, Contrib/InstallOptions/io.dsw,
- Contrib/InstallOptions/ioptdll.rc,
- Contrib/InstallOptions/resource.h, Contrib/InstallOptions/test.ini,
- Contrib/InstallOptions/test.nsi, Contrib/Makensisw/License.txt,
- Contrib/Makensisw/afxres.h, Contrib/Makensisw/makensisw.cpp,
- Contrib/Makensisw/makensisw.dsp, Contrib/Makensisw/makensisw.dsw,
- Contrib/Makensisw/Readme.txt, Contrib/Makensisw/makensisw.h,
- Contrib/Makensisw/makensisw.xml, Contrib/Makensisw/noclib.cpp,
- Contrib/Makensisw/noclib.h, Contrib/Makensisw/resource.h,
- Contrib/Makensisw/resource.rc, Contrib/Makensisw/utils.cpp,
- Contrib/Makensisw/utils.h, Contrib/Makensisw/version.cpp,
- Contrib/NSISdl/asyncdns.cpp, Contrib/NSISdl/asyncdns.h,
- Contrib/NSISdl/connection.cpp, Contrib/NSISdl/connection.h,
- Contrib/NSISdl/httpget.cpp, Contrib/NSISdl/httpget.h,
- Contrib/NSISdl/netinc.h, Contrib/NSISdl/ReadMe.txt,
- Contrib/NSISdl/nsisdl.cpp, Contrib/NSISdl/nsisdl.dsp,
- Contrib/NSISdl/nsisdl.dsw, Contrib/NSISdl/Script1.rc,
- Contrib/NSISdl/resource.h, Contrib/NSISdl/util.cpp,
- Contrib/NSISdl/util.h, Contrib/Splash/splash.c,
- Contrib/Splash/splash.dsp, Contrib/Splash/splash.dsw,
- Contrib/Splash/splash.txt, Contrib/UIs/default.exe,
- Contrib/UIs/mlbl.exe, Contrib/UIs/mlbl2.exe,
- Contrib/zip2exe/icon.ico, Contrib/zip2exe/main.cpp,
- Contrib/zip2exe/res.rc, Contrib/zip2exe/resource.h,
- Contrib/zip2exe/zip2exe.dsp, Contrib/zip2exe/zip2exe.dsw,
- Contrib/zip2exe/zlib/ADLER32.C, Contrib/zip2exe/zlib/CRC32.C,
- Contrib/zip2exe/zlib/INFBLOCK.C, Contrib/zip2exe/zlib/INFBLOCK.H,
- Contrib/zip2exe/zlib/INFCODES.C, Contrib/zip2exe/zlib/INFCODES.H,
- Contrib/zip2exe/zlib/INFFAST.C, Contrib/zip2exe/zlib/INFFAST.H,
- Contrib/zip2exe/zlib/INFFIXED.H, Contrib/zip2exe/zlib/INFLATE.C,
- Contrib/zip2exe/zlib/INFTREES.C, Contrib/zip2exe/zlib/INFTREES.H,
- Contrib/zip2exe/zlib/INFUTIL.C, Contrib/zip2exe/zlib/INFUTIL.H,
- Contrib/zip2exe/zlib/Unzip.c, Contrib/zip2exe/zlib/UNZIP.H,
- Contrib/zip2exe/zlib/ZCONF.H, Contrib/zip2exe/zlib/ZLIB.H,
- Contrib/zip2exe/zlib/Zutil.c, Contrib/zip2exe/zlib/ZUTIL.H,
- Examples/bigtest.nsi, Examples/branding.nsh, Examples/example1.nsi,
- Examples/example2.nsi, Examples/functions.htm, Examples/gfx.nsi,
- Examples/makensis.nsi, Examples/primes.nsi, Examples/rtest.nsi,
- Examples/viewhtml.nsi, Examples/waplugin.nsi,
- Examples/WinMessages.NSH, Source/afxres.h, Source/build.cpp,
- Source/build.h, Source/cbzip2.h, Source/compressor.h,
- Source/crc32.c, Source/czlib.h, Source/DialogTemplate.cpp,
- Source/DialogTemplate.h, Source/Makefile, Source/exedata.cpp,
- Source/exedata.h, Source/icon.ico, Source/lineparse.h,
- Source/makenssi.cpp, Source/makenssi.dsp, Source/makenssi.dsw,
- Source/makenssi.ncb, Source/makenssi.opt, Source/makenssi.plg,
- Source/resource.h, Source/ResourceEditor.cpp,
- Source/ResourceEditor.h, Source/Script1.rc, Source/script.cpp,
- Source/strlist.h, Source/tokens.cpp, Source/tokens.h,
- Source/util.cpp, Source/util.h, Source/bzip2/blocksort.c,
- Source/bzip2/bzlib.c, Source/bzip2/bzlib.h,
- Source/bzip2/bzlib_private.h, Source/bzip2/compress.c,
- Source/bzip2/decompress.c, Source/bzip2/huffman.c,
- Source/bzip2/randtable.c, Source/exehead/afxres.h,
- Source/exehead/bgbg.c, Source/exehead/bin2h.c,
- Source/exehead/bin2h.exe, Source/exehead/bitmap1.bmp,
- Source/exehead/config.h, Source/exehead/exec.c,
- Source/exehead/exec.h, Source/exehead/exehead-bzip2.dsp,
- Source/exehead/exehead-zlib.dsp, Source/exehead/exehead.xml,
- Source/exehead/fileform.c, Source/exehead/fileform.h,
- Source/exehead/Main.c, Source/exehead/lang.h,
- Source/exehead/Makefile, Source/exehead/nsis.ico,
- Source/exehead/resource.h, Source/exehead/resource.rc,
- Source/exehead/state.h, Source/exehead/Ui.c, Source/exehead/ui.h,
- Source/exehead/uninst.ico, Source/exehead/util.c,
- Source/exehead/util.h: no message
+ * /NSIS/trunk/Source/nlf.cpp, /NSIS/trunk/Source/nlf.h,
+ /NSIS/trunk/Source/script.cpp: no message
+
+2002-08-02 18:37 kichik
+
+ * /NSIS/trunk/Source/nlf.h, /NSIS/trunk/Source/script.cpp,
+ /NSIS/trunk/Source/tokens.cpp, /NSIS/trunk/Source/tokens.h: no
+ message
+
+2002-08-02 17:56 rainwater
+
+ * /NSIS/trunk/Examples/bigtest.nsi: Added the XPStyle on option for
+ the "bigtest".
+
+2002-08-02 16:52 kichik
+
+ * /NSIS/trunk/Source/exehead/resource.rc: Saved 8 bytes
+
+2002-08-02 16:51 kichik
+
+ * /NSIS/trunk/Contrib/Language files, /NSIS/trunk/Contrib/Language
+ files/English.nlf, /NSIS/trunk/Source/build.cpp: no message
+
+2002-08-02 15:29 kichik
+
+ * /NSIS/trunk/Source/DialogTemplate.cpp: Fixed a bug with ChangeUI
+ and no branding image
+
+2002-08-02 13:31 rainwater
+
+ * /NSIS/trunk/Source/makenssi.ncb, /NSIS/trunk/Source/makenssi.opt,
+ /NSIS/trunk/Source/makenssi.plg, /NSIS/trunk/Source/Release:
+ Removed temp files
+
+2002-08-02 12:45 kichik
+
+ * /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Source/makenssi.dsp, /NSIS/trunk/Source/makenssi.opt,
+ /NSIS/trunk/Source/makenssi.plg: no message
+
+2002-08-02 10:01
+
+ * /NSIS/tags/alpha2, /NSIS/tags/alpha2/Source/makenssi.cpp: This
+ commit was manufactured by cvs2svn to create tag 'alpha2'.
+
+2002-08-02 10:01 kichik
+
+ * /NSIS/trunk/Contrib, /NSIS/trunk/Contrib/ExDLL,
+ /NSIS/trunk/Contrib/ExDLL/exdll.c,
+ /NSIS/trunk/Contrib/ExDLL/exdll.dpr,
+ /NSIS/trunk/Contrib/ExDLL/exdll.dsp,
+ /NSIS/trunk/Contrib/ExDLL/exdll.dsw, /NSIS/trunk/Contrib/Icons,
+ /NSIS/trunk/Contrib/Icons/checks1.bmp,
+ /NSIS/trunk/Contrib/Icons/checks2.bmp,
+ /NSIS/trunk/Contrib/Icons/checks4.bmp,
+ /NSIS/trunk/Contrib/Icons/checksX.bmp,
+ /NSIS/trunk/Contrib/Icons/checksX2.bmp,
+ /NSIS/trunk/Contrib/Icons/jarsonic-checks.bmp,
+ /NSIS/trunk/Contrib/Icons/lucas-checks.bmp,
+ /NSIS/trunk/Contrib/Icons/normal-install.ico,
+ /NSIS/trunk/Contrib/Icons/normal-uninstall.ico,
+ /NSIS/trunk/Contrib/Icons/setup.ico,
+ /NSIS/trunk/Contrib/InstallOptions,
+ /NSIS/trunk/Contrib/InstallOptions/Install Options.html,
+ /NSIS/trunk/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsp,
+ /NSIS/trunk/Contrib/InstallOptions/io.dsw,
+ /NSIS/trunk/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/trunk/Contrib/InstallOptions/resource.h,
+ /NSIS/trunk/Contrib/InstallOptions/test.ini,
+ /NSIS/trunk/Contrib/InstallOptions/test.nsi,
+ /NSIS/trunk/Contrib/Makensisw,
+ /NSIS/trunk/Contrib/Makensisw/afxres.h,
+ /NSIS/trunk/Contrib/Makensisw/License.txt,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.h,
+ /NSIS/trunk/Contrib/Makensisw/makensisw.xml,
+ /NSIS/trunk/Contrib/Makensisw/noclib.cpp,
+ /NSIS/trunk/Contrib/Makensisw/noclib.h,
+ /NSIS/trunk/Contrib/Makensisw/Readme.txt,
+ /NSIS/trunk/Contrib/Makensisw/resource.h,
+ /NSIS/trunk/Contrib/Makensisw/resource.rc,
+ /NSIS/trunk/Contrib/Makensisw/utils.cpp,
+ /NSIS/trunk/Contrib/Makensisw/utils.h,
+ /NSIS/trunk/Contrib/Makensisw/version.cpp,
+ /NSIS/trunk/Contrib/NSISdl,
+ /NSIS/trunk/Contrib/NSISdl/asyncdns.cpp,
+ /NSIS/trunk/Contrib/NSISdl/asyncdns.h,
+ /NSIS/trunk/Contrib/NSISdl/connection.cpp,
+ /NSIS/trunk/Contrib/NSISdl/connection.h,
+ /NSIS/trunk/Contrib/NSISdl/httpget.cpp,
+ /NSIS/trunk/Contrib/NSISdl/httpget.h,
+ /NSIS/trunk/Contrib/NSISdl/netinc.h,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsp,
+ /NSIS/trunk/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/trunk/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/trunk/Contrib/NSISdl/resource.h,
+ /NSIS/trunk/Contrib/NSISdl/Script1.rc,
+ /NSIS/trunk/Contrib/NSISdl/util.cpp,
+ /NSIS/trunk/Contrib/NSISdl/util.h, /NSIS/trunk/Contrib/Splash,
+ /NSIS/trunk/Contrib/Splash/splash.c,
+ /NSIS/trunk/Contrib/Splash/splash.dsp,
+ /NSIS/trunk/Contrib/Splash/splash.dsw,
+ /NSIS/trunk/Contrib/Splash/splash.txt, /NSIS/trunk/Contrib/UIs,
+ /NSIS/trunk/Contrib/UIs/default.exe,
+ /NSIS/trunk/Contrib/UIs/mlbl.exe,
+ /NSIS/trunk/Contrib/UIs/mlbl2.exe, /NSIS/trunk/Contrib/zip2exe,
+ /NSIS/trunk/Contrib/zip2exe/icon.ico,
+ /NSIS/trunk/Contrib/zip2exe/main.cpp,
+ /NSIS/trunk/Contrib/zip2exe/res.rc,
+ /NSIS/trunk/Contrib/zip2exe/resource.h,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/trunk/Contrib/zip2exe/zip2exe.dsw,
+ /NSIS/trunk/Contrib/zip2exe/zlib,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ADLER32.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/CRC32.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFBLOCK.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFBLOCK.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFCODES.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFCODES.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFFAST.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFFAST.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFFIXED.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFLATE.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFTREES.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFTREES.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFUTIL.C,
+ /NSIS/trunk/Contrib/zip2exe/zlib/INFUTIL.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/Unzip.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/UNZIP.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ZCONF.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ZLIB.H,
+ /NSIS/trunk/Contrib/zip2exe/zlib/Zutil.c,
+ /NSIS/trunk/Contrib/zip2exe/zlib/ZUTIL.H, /NSIS/trunk/Examples,
+ /NSIS/trunk/Examples/bigtest.nsi,
+ /NSIS/trunk/Examples/branding.nsh,
+ /NSIS/trunk/Examples/example1.nsi,
+ /NSIS/trunk/Examples/example2.nsi,
+ /NSIS/trunk/Examples/functions.htm, /NSIS/trunk/Examples/gfx.nsi,
+ /NSIS/trunk/Examples/makensis.nsi,
+ /NSIS/trunk/Examples/primes.nsi, /NSIS/trunk/Examples/rtest.nsi,
+ /NSIS/trunk/Examples/viewhtml.nsi,
+ /NSIS/trunk/Examples/waplugin.nsi,
+ /NSIS/trunk/Examples/WinMessages.NSH, /NSIS/trunk/Source,
+ /NSIS/trunk/Source/afxres.h, /NSIS/trunk/Source/build.cpp,
+ /NSIS/trunk/Source/build.h, /NSIS/trunk/Source/bzip2,
+ /NSIS/trunk/Source/bzip2/blocksort.c,
+ /NSIS/trunk/Source/bzip2/bzlib.c,
+ /NSIS/trunk/Source/bzip2/bzlib.h,
+ /NSIS/trunk/Source/bzip2/bzlib_private.h,
+ /NSIS/trunk/Source/bzip2/compress.c,
+ /NSIS/trunk/Source/bzip2/decompress.c,
+ /NSIS/trunk/Source/bzip2/huffman.c,
+ /NSIS/trunk/Source/bzip2/randtable.c,
+ /NSIS/trunk/Source/cbzip2.h, /NSIS/trunk/Source/compressor.h,
+ /NSIS/trunk/Source/crc32.c, /NSIS/trunk/Source/czlib.h,
+ /NSIS/trunk/Source/DialogTemplate.cpp,
+ /NSIS/trunk/Source/DialogTemplate.h,
+ /NSIS/trunk/Source/exedata.cpp, /NSIS/trunk/Source/exedata.h,
+ /NSIS/trunk/Source/exehead, /NSIS/trunk/Source/exehead/afxres.h,
+ /NSIS/trunk/Source/exehead/bgbg.c,
+ /NSIS/trunk/Source/exehead/bin2h.c,
+ /NSIS/trunk/Source/exehead/bin2h.exe,
+ /NSIS/trunk/Source/exehead/bitmap1.bmp,
+ /NSIS/trunk/Source/exehead/config.h,
+ /NSIS/trunk/Source/exehead/exec.c,
+ /NSIS/trunk/Source/exehead/exec.h,
+ /NSIS/trunk/Source/exehead/exehead.xml,
+ /NSIS/trunk/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/trunk/Source/exehead/exehead-zlib.dsp,
+ /NSIS/trunk/Source/exehead/fileform.c,
+ /NSIS/trunk/Source/exehead/fileform.h,
+ /NSIS/trunk/Source/exehead/lang.h,
+ /NSIS/trunk/Source/exehead/Main.c,
+ /NSIS/trunk/Source/exehead/Makefile,
+ /NSIS/trunk/Source/exehead/nsis.ico,
+ /NSIS/trunk/Source/exehead/resource.h,
+ /NSIS/trunk/Source/exehead/resource.rc,
+ /NSIS/trunk/Source/exehead/state.h,
+ /NSIS/trunk/Source/exehead/Ui.c, /NSIS/trunk/Source/exehead/ui.h,
+ /NSIS/trunk/Source/exehead/uninst.ico,
+ /NSIS/trunk/Source/exehead/util.c,
+ /NSIS/trunk/Source/exehead/util.h, /NSIS/trunk/Source/icon.ico,
+ /NSIS/trunk/Source/lineparse.h, /NSIS/trunk/Source/Makefile,
+ /NSIS/trunk/Source/makenssi.cpp, /NSIS/trunk/Source/makenssi.dsp,
+ /NSIS/trunk/Source/makenssi.dsw, /NSIS/trunk/Source/makenssi.ncb,
+ /NSIS/trunk/Source/makenssi.opt, /NSIS/trunk/Source/makenssi.plg,
+ /NSIS/trunk/Source/Release,
+ /NSIS/trunk/Source/Release/Script1.res,
+ /NSIS/trunk/Source/Release/vc60.idb,
+ /NSIS/trunk/Source/resource.h,
+ /NSIS/trunk/Source/ResourceEditor.cpp,
+ /NSIS/trunk/Source/ResourceEditor.h,
+ /NSIS/trunk/Source/script.cpp, /NSIS/trunk/Source/Script1.rc,
+ /NSIS/trunk/Source/strlist.h, /NSIS/trunk/Source/tokens.cpp,
+ /NSIS/trunk/Source/tokens.h, /NSIS/trunk/Source/util.cpp,
+ /NSIS/trunk/Source/util.h, /NSIS/trunk/Source/zlib,
+ /NSIS/trunk/Source/zlib/deflate.c,
+ /NSIS/trunk/Source/zlib/DEFLATE.H,
+ /NSIS/trunk/Source/zlib/INFBLOCK.C,
+ /NSIS/trunk/Source/zlib/INFBLOCK.H,
+ /NSIS/trunk/Source/zlib/INFCODES.C,
+ /NSIS/trunk/Source/zlib/INFCODES.H,
+ /NSIS/trunk/Source/zlib/INFLATE.C,
+ /NSIS/trunk/Source/zlib/INFTREES.C,
+ /NSIS/trunk/Source/zlib/INFTREES.H,
+ /NSIS/trunk/Source/zlib/INFUTIL.C,
+ /NSIS/trunk/Source/zlib/INFUTIL.H,
+ /NSIS/trunk/Source/zlib/trees.c, /NSIS/trunk/Source/zlib/ZCONF.H,
+ /NSIS/trunk/Source/zlib/ZLIB.H, /NSIS/trunk/Source/zlib/ZUTIL.H:
+ This commit was generated by cvs2svn to compensate for changes in
+ r2,
+ which included commits to RCS files with non-trunk default
+ branches.
+
+2002-08-02 10:01 kichik
+
+ * /NSIS/branches/kichik, /NSIS/branches/kichik/Contrib,
+ /NSIS/branches/kichik/Contrib/ExDLL,
+ /NSIS/branches/kichik/Contrib/ExDLL/exdll.c,
+ /NSIS/branches/kichik/Contrib/ExDLL/exdll.dpr,
+ /NSIS/branches/kichik/Contrib/ExDLL/exdll.dsp,
+ /NSIS/branches/kichik/Contrib/ExDLL/exdll.dsw,
+ /NSIS/branches/kichik/Contrib/Icons,
+ /NSIS/branches/kichik/Contrib/Icons/checks1.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/checks2.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/checks4.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/checksX.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/checksX2.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/jarsonic-checks.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/lucas-checks.bmp,
+ /NSIS/branches/kichik/Contrib/Icons/normal-install.ico,
+ /NSIS/branches/kichik/Contrib/Icons/normal-uninstall.ico,
+ /NSIS/branches/kichik/Contrib/Icons/setup.ico,
+ /NSIS/branches/kichik/Contrib/InstallOptions,
+ /NSIS/branches/kichik/Contrib/InstallOptions/Install
+ Options.html,
+ /NSIS/branches/kichik/Contrib/InstallOptions/InstallerOptions.cpp,
+ /NSIS/branches/kichik/Contrib/InstallOptions/io.dsp,
+ /NSIS/branches/kichik/Contrib/InstallOptions/io.dsw,
+ /NSIS/branches/kichik/Contrib/InstallOptions/ioptdll.rc,
+ /NSIS/branches/kichik/Contrib/InstallOptions/resource.h,
+ /NSIS/branches/kichik/Contrib/InstallOptions/test.ini,
+ /NSIS/branches/kichik/Contrib/InstallOptions/test.nsi,
+ /NSIS/branches/kichik/Contrib/Makensisw,
+ /NSIS/branches/kichik/Contrib/Makensisw/afxres.h,
+ /NSIS/branches/kichik/Contrib/Makensisw/License.txt,
+ /NSIS/branches/kichik/Contrib/Makensisw/makensisw.cpp,
+ /NSIS/branches/kichik/Contrib/Makensisw/makensisw.dsp,
+ /NSIS/branches/kichik/Contrib/Makensisw/makensisw.dsw,
+ /NSIS/branches/kichik/Contrib/Makensisw/makensisw.h,
+ /NSIS/branches/kichik/Contrib/Makensisw/makensisw.xml,
+ /NSIS/branches/kichik/Contrib/Makensisw/noclib.cpp,
+ /NSIS/branches/kichik/Contrib/Makensisw/noclib.h,
+ /NSIS/branches/kichik/Contrib/Makensisw/Readme.txt,
+ /NSIS/branches/kichik/Contrib/Makensisw/resource.h,
+ /NSIS/branches/kichik/Contrib/Makensisw/resource.rc,
+ /NSIS/branches/kichik/Contrib/Makensisw/utils.cpp,
+ /NSIS/branches/kichik/Contrib/Makensisw/utils.h,
+ /NSIS/branches/kichik/Contrib/Makensisw/version.cpp,
+ /NSIS/branches/kichik/Contrib/NSISdl,
+ /NSIS/branches/kichik/Contrib/NSISdl/asyncdns.cpp,
+ /NSIS/branches/kichik/Contrib/NSISdl/asyncdns.h,
+ /NSIS/branches/kichik/Contrib/NSISdl/connection.cpp,
+ /NSIS/branches/kichik/Contrib/NSISdl/connection.h,
+ /NSIS/branches/kichik/Contrib/NSISdl/httpget.cpp,
+ /NSIS/branches/kichik/Contrib/NSISdl/httpget.h,
+ /NSIS/branches/kichik/Contrib/NSISdl/netinc.h,
+ /NSIS/branches/kichik/Contrib/NSISdl/nsisdl.cpp,
+ /NSIS/branches/kichik/Contrib/NSISdl/nsisdl.dsp,
+ /NSIS/branches/kichik/Contrib/NSISdl/nsisdl.dsw,
+ /NSIS/branches/kichik/Contrib/NSISdl/ReadMe.txt,
+ /NSIS/branches/kichik/Contrib/NSISdl/resource.h,
+ /NSIS/branches/kichik/Contrib/NSISdl/Script1.rc,
+ /NSIS/branches/kichik/Contrib/NSISdl/util.cpp,
+ /NSIS/branches/kichik/Contrib/NSISdl/util.h,
+ /NSIS/branches/kichik/Contrib/Splash,
+ /NSIS/branches/kichik/Contrib/Splash/splash.c,
+ /NSIS/branches/kichik/Contrib/Splash/splash.dsp,
+ /NSIS/branches/kichik/Contrib/Splash/splash.dsw,
+ /NSIS/branches/kichik/Contrib/Splash/splash.txt,
+ /NSIS/branches/kichik/Contrib/UIs,
+ /NSIS/branches/kichik/Contrib/UIs/default.exe,
+ /NSIS/branches/kichik/Contrib/UIs/mlbl.exe,
+ /NSIS/branches/kichik/Contrib/UIs/mlbl2.exe,
+ /NSIS/branches/kichik/Contrib/zip2exe,
+ /NSIS/branches/kichik/Contrib/zip2exe/icon.ico,
+ /NSIS/branches/kichik/Contrib/zip2exe/main.cpp,
+ /NSIS/branches/kichik/Contrib/zip2exe/res.rc,
+ /NSIS/branches/kichik/Contrib/zip2exe/resource.h,
+ /NSIS/branches/kichik/Contrib/zip2exe/zip2exe.dsp,
+ /NSIS/branches/kichik/Contrib/zip2exe/zip2exe.dsw,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/ADLER32.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/CRC32.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFBLOCK.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFBLOCK.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFCODES.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFCODES.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFFAST.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFFAST.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFFIXED.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFLATE.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFTREES.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFTREES.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFUTIL.C,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/INFUTIL.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/Unzip.c,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/UNZIP.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/ZCONF.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/ZLIB.H,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/Zutil.c,
+ /NSIS/branches/kichik/Contrib/zip2exe/zlib/ZUTIL.H,
+ /NSIS/branches/kichik/Examples,
+ /NSIS/branches/kichik/Examples/bigtest.nsi,
+ /NSIS/branches/kichik/Examples/branding.nsh,
+ /NSIS/branches/kichik/Examples/example1.nsi,
+ /NSIS/branches/kichik/Examples/example2.nsi,
+ /NSIS/branches/kichik/Examples/functions.htm,
+ /NSIS/branches/kichik/Examples/gfx.nsi,
+ /NSIS/branches/kichik/Examples/makensis.nsi,
+ /NSIS/branches/kichik/Examples/primes.nsi,
+ /NSIS/branches/kichik/Examples/rtest.nsi,
+ /NSIS/branches/kichik/Examples/viewhtml.nsi,
+ /NSIS/branches/kichik/Examples/waplugin.nsi,
+ /NSIS/branches/kichik/Examples/WinMessages.NSH,
+ /NSIS/branches/kichik/Source,
+ /NSIS/branches/kichik/Source/afxres.h,
+ /NSIS/branches/kichik/Source/build.cpp,
+ /NSIS/branches/kichik/Source/build.h,
+ /NSIS/branches/kichik/Source/bzip2,
+ /NSIS/branches/kichik/Source/bzip2/blocksort.c,
+ /NSIS/branches/kichik/Source/bzip2/bzlib.c,
+ /NSIS/branches/kichik/Source/bzip2/bzlib.h,
+ /NSIS/branches/kichik/Source/bzip2/bzlib_private.h,
+ /NSIS/branches/kichik/Source/bzip2/compress.c,
+ /NSIS/branches/kichik/Source/bzip2/decompress.c,
+ /NSIS/branches/kichik/Source/bzip2/huffman.c,
+ /NSIS/branches/kichik/Source/bzip2/randtable.c,
+ /NSIS/branches/kichik/Source/cbzip2.h,
+ /NSIS/branches/kichik/Source/compressor.h,
+ /NSIS/branches/kichik/Source/crc32.c,
+ /NSIS/branches/kichik/Source/czlib.h,
+ /NSIS/branches/kichik/Source/DialogTemplate.cpp,
+ /NSIS/branches/kichik/Source/DialogTemplate.h,
+ /NSIS/branches/kichik/Source/exedata.cpp,
+ /NSIS/branches/kichik/Source/exedata.h,
+ /NSIS/branches/kichik/Source/exehead,
+ /NSIS/branches/kichik/Source/exehead/afxres.h,
+ /NSIS/branches/kichik/Source/exehead/bgbg.c,
+ /NSIS/branches/kichik/Source/exehead/bin2h.c,
+ /NSIS/branches/kichik/Source/exehead/bin2h.exe,
+ /NSIS/branches/kichik/Source/exehead/bitmap1.bmp,
+ /NSIS/branches/kichik/Source/exehead/config.h,
+ /NSIS/branches/kichik/Source/exehead/exec.c,
+ /NSIS/branches/kichik/Source/exehead/exec.h,
+ /NSIS/branches/kichik/Source/exehead/exehead.xml,
+ /NSIS/branches/kichik/Source/exehead/exehead-bzip2.dsp,
+ /NSIS/branches/kichik/Source/exehead/exehead-zlib.dsp,
+ /NSIS/branches/kichik/Source/exehead/fileform.c,
+ /NSIS/branches/kichik/Source/exehead/fileform.h,
+ /NSIS/branches/kichik/Source/exehead/lang.h,
+ /NSIS/branches/kichik/Source/exehead/Main.c,
+ /NSIS/branches/kichik/Source/exehead/Makefile,
+ /NSIS/branches/kichik/Source/exehead/nsis.ico,
+ /NSIS/branches/kichik/Source/exehead/resource.h,
+ /NSIS/branches/kichik/Source/exehead/resource.rc,
+ /NSIS/branches/kichik/Source/exehead/state.h,
+ /NSIS/branches/kichik/Source/exehead/Ui.c,
+ /NSIS/branches/kichik/Source/exehead/ui.h,
+ /NSIS/branches/kichik/Source/exehead/uninst.ico,
+ /NSIS/branches/kichik/Source/exehead/util.c,
+ /NSIS/branches/kichik/Source/exehead/util.h,
+ /NSIS/branches/kichik/Source/icon.ico,
+ /NSIS/branches/kichik/Source/lineparse.h,
+ /NSIS/branches/kichik/Source/Makefile,
+ /NSIS/branches/kichik/Source/makenssi.cpp,
+ /NSIS/branches/kichik/Source/makenssi.dsp,
+ /NSIS/branches/kichik/Source/makenssi.dsw,
+ /NSIS/branches/kichik/Source/makenssi.ncb,
+ /NSIS/branches/kichik/Source/makenssi.opt,
+ /NSIS/branches/kichik/Source/makenssi.plg,
+ /NSIS/branches/kichik/Source/Release,
+ /NSIS/branches/kichik/Source/Release/Script1.res,
+ /NSIS/branches/kichik/Source/Release/vc60.idb,
+ /NSIS/branches/kichik/Source/resource.h,
+ /NSIS/branches/kichik/Source/ResourceEditor.cpp,
+ /NSIS/branches/kichik/Source/ResourceEditor.h,
+ /NSIS/branches/kichik/Source/script.cpp,
+ /NSIS/branches/kichik/Source/Script1.rc,
+ /NSIS/branches/kichik/Source/strlist.h,
+ /NSIS/branches/kichik/Source/tokens.cpp,
+ /NSIS/branches/kichik/Source/tokens.h,
+ /NSIS/branches/kichik/Source/util.cpp,
+ /NSIS/branches/kichik/Source/util.h,
+ /NSIS/branches/kichik/Source/zlib,
+ /NSIS/branches/kichik/Source/zlib/deflate.c,
+ /NSIS/branches/kichik/Source/zlib/DEFLATE.H,
+ /NSIS/branches/kichik/Source/zlib/INFBLOCK.C,
+ /NSIS/branches/kichik/Source/zlib/INFBLOCK.H,
+ /NSIS/branches/kichik/Source/zlib/INFCODES.C,
+ /NSIS/branches/kichik/Source/zlib/INFCODES.H,
+ /NSIS/branches/kichik/Source/zlib/INFLATE.C,
+ /NSIS/branches/kichik/Source/zlib/INFTREES.C,
+ /NSIS/branches/kichik/Source/zlib/INFTREES.H,
+ /NSIS/branches/kichik/Source/zlib/INFUTIL.C,
+ /NSIS/branches/kichik/Source/zlib/INFUTIL.H,
+ /NSIS/branches/kichik/Source/zlib/trees.c,
+ /NSIS/branches/kichik/Source/zlib/ZCONF.H,
+ /NSIS/branches/kichik/Source/zlib/ZLIB.H,
+ /NSIS/branches/kichik/Source/zlib/ZUTIL.H: no message
+
+2002-08-02 10:01
+
+ * /NSIS, /NSIS/branches, /NSIS/tags, /NSIS/trunk: New repository
+ initialized by cvs2svn.
diff --git a/Contrib/AdvSplash/Example.nsi b/Contrib/AdvSplash/Example.nsi
index 4bffd3f..751c836 100755
--- a/Contrib/AdvSplash/Example.nsi
+++ b/Contrib/AdvSplash/Example.nsi
@@ -1,35 +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
+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/Contrib/AdvSplash/SConscript b/Contrib/AdvSplash/SConscript
index fe82e26..bbaaeb4 100755
--- a/Contrib/AdvSplash/SConscript
+++ b/Contrib/AdvSplash/SConscript
@@ -1,24 +1,24 @@
-target = 'AdvSplash'
-
-files = Split("""
- advsplash.c
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- winmm
-""")
-
-examples = Split("""
- Example.nsi
-""")
-
-docs = Split("""
- advsplash.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples, docs)
+target = 'AdvSplash'
+
+files = Split("""
+ advsplash.c
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ winmm
+""")
+
+examples = Split("""
+ Example.nsi
+""")
+
+docs = Split("""
+ advsplash.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples, docs)
diff --git a/Contrib/AdvSplash/advsplash.c b/Contrib/AdvSplash/advsplash.c
index 58199e7..9a0d000 100755
--- a/Contrib/AdvSplash/advsplash.c
+++ b/Contrib/AdvSplash/advsplash.c
@@ -1,338 +1,338 @@
-// For layered windows
-#define _WIN32_WINNT 0x0500
-
-#include <windows.h>
-#include <windowsx.h>
-#include "../ExDLL/exdll.h"
-
-HINSTANCE g_hInstance;
-
-#define RESOLUTION 32 // 30 fps ;) (32? I like SHR more than iDIV ;)
-
-BITMAP bm;
-HBITMAP g_hbm;
-int g_rv;
-int resolution;
-int sleep_val, fadein_val, fadeout_val, state, timeleft, keycolor, nt50,
- alphaparam;
-const char classname[4] = "_sp";
-
-typedef BOOL(_stdcall * _tSetLayeredWindowAttributesProc) (HWND hwnd, // handle to the layered window
- COLORREF crKey, // specifies the color key
- BYTE bAlpha, // value for the blend function
- DWORD dwFlags // action
- );
-_tSetLayeredWindowAttributesProc SetLayeredWindowAttributesProc;
-
-static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam,
- LPARAM lParam)
-{
- PAINTSTRUCT ps;
- RECT r;
- HDC curdc = NULL;
- HDC hdc;
- HBITMAP oldbm;
-
- switch (uMsg) {
- case WM_CREATE:
- SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
- SetWindowLong(hwnd, GWL_STYLE, 0);
- SetWindowPos(hwnd, NULL,
- r.left + (r.right - r.left - bm.bmWidth) / 2,
- r.top + (r.bottom - r.top - bm.bmHeight) / 2,
- bm.bmWidth, bm.bmHeight, SWP_NOZORDER | SWP_SHOWWINDOW);
- return 0;
-
- case WM_PAINT:
- curdc = BeginPaint(hwnd, &ps);
- hdc = CreateCompatibleDC(curdc);
- GetClientRect(hwnd, &r);
-
- oldbm = SelectObject(hdc, g_hbm);
- BitBlt(curdc, r.left, r.top, r.right - r.left, r.bottom - r.top, hdc,
- 0, 0, SRCCOPY);
-
- SelectObject(hdc, oldbm);
- DeleteDC(hdc);
- EndPaint(hwnd, &ps);
-
- case WM_CLOSE:
- return 0;
-
- case WM_TIMER:
- case WM_LBUTTONDOWN:
- g_rv = (uMsg == WM_LBUTTONDOWN);
- DestroyWindow(hwnd);
- break;
- }
- return DefWindowProc(hwnd, uMsg, wParam, lParam);
-}
-
-void SetTransparentRegion(HWND myWnd)
-{
- HDC dc;
- int x, y;
- HRGN region, cutrgn;
- BITMAPINFO bmi;
- int size = bm.bmWidth * bm.bmHeight * 4;
- int *bmp = GlobalAlloc(GPTR, size);
- int *bmp_orig = bmp;
- bmi.bmiHeader.biBitCount = 32;
- bmi.bmiHeader.biCompression = BI_RGB;
- bmi.bmiHeader.biHeight = bm.bmHeight;
- bmi.bmiHeader.biPlanes = 1;
- bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- bmi.bmiHeader.biWidth = bm.bmWidth;
- bmi.bmiHeader.biClrUsed = 0;
- bmi.bmiHeader.biClrImportant = 0;
-
- dc = CreateCompatibleDC(NULL);
- SelectObject(dc, g_hbm);
-
- x = GetDIBits(dc, g_hbm, 0, bm.bmHeight, bmp, &bmi, DIB_RGB_COLORS);
-
- region = CreateRectRgn(0, 0, bm.bmWidth, bm.bmHeight);
-
- // Search for transparent pixels
- for (y = bm.bmHeight - 1; y >= 0; y--) {
- for (x = 0; x < bm.bmWidth;) {
- if ((*bmp & 0xFFFFFF) == keycolor) {
- int j = x;
- while ((x < bm.bmWidth) && ((*bmp & 0xFFFFFF) == keycolor)) {
- bmp++, x++;
- }
-
- // Cut transparent pixels from the original region
- cutrgn = CreateRectRgn(j, y, x, y + 1);
- CombineRgn(region, region, cutrgn, RGN_XOR);
- DeleteObject(cutrgn);
- } else {
- bmp++, x++;
- }
- }
- }
-
- // Set resulting region.
- SetWindowRgn(myWnd, region, TRUE);
- DeleteObject(region);
- DeleteObject(dc);
- GlobalFree(bmp_orig);
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call,
- LPVOID lpReserved)
-{
- g_hInstance = hInst;
- return TRUE;
-}
-
-void CALLBACK TimeProc(UINT uID,
- UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
-{
- int call = -1;
- switch (state) {
- // FadeIN
- case 0:
- if (timeleft == 0) {
- timeleft = sleep_val;
- state++;
- if (nt50)
- call = 255;
- } else {
- call = ((fadein_val - timeleft) * 255) / fadein_val;
- break;
- }
- // Sleep
- case 1:
- if (timeleft == 0) {
- timeleft = fadeout_val;
- state++;
- // fadeout
- } else
- break;
- // FadeOUT
- case 2:
- if (timeleft == 0) {
- PostMessage((HWND) dwUser, WM_TIMER, 0, 0);
- return;
- } else {
- call = ((timeleft) * 255) / fadeout_val;
- break;
- }
- }
- // Transparency value aquired, and could be set...
- if ((call >= 0) && nt50)
- SetLayeredWindowAttributesProc((HWND) dwUser, keycolor,
- (BYTE) call, alphaparam);
-
- // Time is running out...
- timeleft--;
-}
-
-int myatoi(char *s);
-
-void __declspec(dllexport) show(HWND hwndParent, int string_size,
- char *variables, stack_t ** stacktop)
-{
- DEVMODE dm;
- char fn[MAX_PATH];
- char temp[64];
-
- g_rv = -1;
- resolution = RESOLUTION;
-
- EXDLL_INIT();
-
- popstring(temp);
- sleep_val = myatoi(temp);
- popstring(temp);
- fadein_val = myatoi(temp);
- popstring(temp);
- fadeout_val = myatoi(temp);
- popstring(temp);
- keycolor = myatoi(temp);
- popstring(fn);
-
- dm.dmSize = sizeof(DEVMODE);
- EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);
- // Check for winXP/2k at 32 bpp transparency
- nt50 = (LOBYTE(LOWORD(GetVersion())) >= 5) && !((dm.dmBitsPerPel < 32)
- && (keycolor != -1));
- if (!nt50) {
- // Fading+transparency is unsupported at old windows versions...
- resolution = sleep_val + fadein_val + fadeout_val;
- fadeout_val = fadein_val = 0;
- sleep_val = 1;
- state = 1; // skip fade in
- } else {
- // div them by resolution
- sleep_val >>= 5;
- fadein_val >>= 5;
- fadeout_val >>= 5;
- state = 0;
-
- alphaparam = LWA_ALPHA | ((keycolor == -1) ? (0) : (LWA_COLORKEY));
- keycolor =
- ((keycolor & 0xFF) << 16) + (keycolor & 0xFF00) +
- ((keycolor & 0xFF0000) >> 16);
- }
-
- if (fn[0] && ((sleep_val + fadein_val + fadeout_val) > 0)) {
- MSG msg;
- static WNDCLASS wc;
- wc.lpfnWndProc = WndProc;
- wc.hInstance = g_hInstance;
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.lpszClassName = classname;
- if (RegisterClass(&wc)) {
- char fn2[MAX_PATH];
- lstrcpy(fn2, fn);
- lstrcat(fn, ".bmp");
- lstrcat(fn2, ".wav");
- g_hbm =
- LoadImage(NULL, fn, IMAGE_BITMAP, 0, 0,
- LR_CREATEDIBSECTION | LR_LOADFROMFILE);
- if (g_hbm) {
- HWND myWnd;
- UINT timerEvent;
-
- // Get Bitmap Information
- GetObject(g_hbm, sizeof(bm), (LPSTR) & bm);
-
- myWnd =
- CreateWindowEx(WS_EX_TOOLWINDOW |
- ((nt50) ? (WS_EX_LAYERED) : (0)), classname,
- classname, 0, 0, 0, 0, 0, (HWND) hwndParent,
- NULL, g_hInstance, NULL);
-
- // Set transparency / key color
- if (nt50) {
- // Get blending proc address
- HANDLE user32 = GetModuleHandle("user32");
- SetLayeredWindowAttributesProc =
- (_tSetLayeredWindowAttributesProc) GetProcAddress(user32,
- "SetLayeredWindowAttributes");
- // Use win2k method
- SetLayeredWindowAttributesProc(myWnd, keycolor,
- (BYTE) ((fadein_val > 0) ? (0) : (255)),
- alphaparam);
- } else if (keycolor != -1) {
- // transparency mode
- SetTransparentRegion(myWnd);
- }
-
- PlaySound(fn2, NULL, SND_ASYNC | SND_FILENAME | SND_NODEFAULT);
-
- // Start up timer...
- timeleft = fadein_val;
- timerEvent =
- timeSetEvent(resolution, RESOLUTION / 4, TimeProc,
- (DWORD_PTR) myWnd, TIME_PERIODIC);
-
- while (IsWindow(myWnd) && GetMessage(&msg, myWnd, 0, 0)) {
- DispatchMessage(&msg);
- }
-
- // Kill the timer...
- timeKillEvent(timerEvent);
-
- // Stop currently playing wave, we want to exit
- PlaySound(0, 0, 0);
-
- DeleteObject(g_hbm);
- }
- // We should UnRegister class, since Windows NT series never does this by itself
- UnregisterClass(wc.lpszClassName, g_hInstance);
- }
- }
- wsprintf(temp, "%d", g_rv);
- pushstring(temp);
-}
-
-int myatoi(char *s)
-{
- unsigned int v = 0;
- if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) {
- s += 2;
- for (;;) {
- int c = *s++;
- if (c >= '0' && c <= '9')
- c -= '0';
- else if (c >= 'a' && c <= 'f')
- c -= 'a' - 10;
- else if (c >= 'A' && c <= 'F')
- c -= 'A' - 10;
- else
- break;
- v <<= 4;
- v += c;
- }
- } else if (*s == '0' && s[1] <= '7' && s[1] >= '0') {
- s++;
- for (;;) {
- int c = *s++;
- if (c >= '0' && c <= '7')
- c -= '0';
- else
- break;
- v <<= 3;
- v += c;
- }
- } else {
- int sign = 0;
- if (*s == '-') {
- s++;
- sign++;
- }
- for (;;) {
- int c = *s++ - '0';
- if (c < 0 || c > 9)
- break;
- v *= 10;
- v += c;
- }
- if (sign)
- return -(int) v;
- }
- return (int) v;
-}
+// For layered windows
+#define _WIN32_WINNT 0x0500
+
+#include <windows.h>
+#include <windowsx.h>
+#include "../ExDLL/exdll.h"
+
+HINSTANCE g_hInstance;
+
+#define RESOLUTION 32 // 30 fps ;) (32? I like SHR more than iDIV ;)
+
+BITMAP bm;
+HBITMAP g_hbm;
+int g_rv;
+int resolution;
+int sleep_val, fadein_val, fadeout_val, state, timeleft, keycolor, nt50,
+ alphaparam;
+const char classname[4] = "_sp";
+
+typedef BOOL(_stdcall * _tSetLayeredWindowAttributesProc) (HWND hwnd, // handle to the layered window
+ COLORREF crKey, // specifies the color key
+ BYTE bAlpha, // value for the blend function
+ DWORD dwFlags // action
+ );
+_tSetLayeredWindowAttributesProc SetLayeredWindowAttributesProc;
+
+static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam,
+ LPARAM lParam)
+{
+ PAINTSTRUCT ps;
+ RECT r;
+ HDC curdc = NULL;
+ HDC hdc;
+ HBITMAP oldbm;
+
+ switch (uMsg) {
+ case WM_CREATE:
+ SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
+ SetWindowLong(hwnd, GWL_STYLE, 0);
+ SetWindowPos(hwnd, NULL,
+ r.left + (r.right - r.left - bm.bmWidth) / 2,
+ r.top + (r.bottom - r.top - bm.bmHeight) / 2,
+ bm.bmWidth, bm.bmHeight, SWP_NOZORDER | SWP_SHOWWINDOW);
+ return 0;
+
+ case WM_PAINT:
+ curdc = BeginPaint(hwnd, &ps);
+ hdc = CreateCompatibleDC(curdc);
+ GetClientRect(hwnd, &r);
+
+ oldbm = SelectObject(hdc, g_hbm);
+ BitBlt(curdc, r.left, r.top, r.right - r.left, r.bottom - r.top, hdc,
+ 0, 0, SRCCOPY);
+
+ SelectObject(hdc, oldbm);
+ DeleteDC(hdc);
+ EndPaint(hwnd, &ps);
+
+ case WM_CLOSE:
+ return 0;
+
+ case WM_TIMER:
+ case WM_LBUTTONDOWN:
+ g_rv = (uMsg == WM_LBUTTONDOWN);
+ DestroyWindow(hwnd);
+ break;
+ }
+ return DefWindowProc(hwnd, uMsg, wParam, lParam);
+}
+
+void SetTransparentRegion(HWND myWnd)
+{
+ HDC dc;
+ int x, y;
+ HRGN region, cutrgn;
+ BITMAPINFO bmi;
+ int size = bm.bmWidth * bm.bmHeight * 4;
+ int *bmp = GlobalAlloc(GPTR, size);
+ int *bmp_orig = bmp;
+ bmi.bmiHeader.biBitCount = 32;
+ bmi.bmiHeader.biCompression = BI_RGB;
+ bmi.bmiHeader.biHeight = bm.bmHeight;
+ bmi.bmiHeader.biPlanes = 1;
+ bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmi.bmiHeader.biWidth = bm.bmWidth;
+ bmi.bmiHeader.biClrUsed = 0;
+ bmi.bmiHeader.biClrImportant = 0;
+
+ dc = CreateCompatibleDC(NULL);
+ SelectObject(dc, g_hbm);
+
+ x = GetDIBits(dc, g_hbm, 0, bm.bmHeight, bmp, &bmi, DIB_RGB_COLORS);
+
+ region = CreateRectRgn(0, 0, bm.bmWidth, bm.bmHeight);
+
+ // Search for transparent pixels
+ for (y = bm.bmHeight - 1; y >= 0; y--) {
+ for (x = 0; x < bm.bmWidth;) {
+ if ((*bmp & 0xFFFFFF) == keycolor) {
+ int j = x;
+ while ((x < bm.bmWidth) && ((*bmp & 0xFFFFFF) == keycolor)) {
+ bmp++, x++;
+ }
+
+ // Cut transparent pixels from the original region
+ cutrgn = CreateRectRgn(j, y, x, y + 1);
+ CombineRgn(region, region, cutrgn, RGN_XOR);
+ DeleteObject(cutrgn);
+ } else {
+ bmp++, x++;
+ }
+ }
+ }
+
+ // Set resulting region.
+ SetWindowRgn(myWnd, region, TRUE);
+ DeleteObject(region);
+ DeleteObject(dc);
+ GlobalFree(bmp_orig);
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call,
+ LPVOID lpReserved)
+{
+ g_hInstance = hInst;
+ return TRUE;
+}
+
+void CALLBACK TimeProc(UINT uID,
+ UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
+{
+ int call = -1;
+ switch (state) {
+ // FadeIN
+ case 0:
+ if (timeleft == 0) {
+ timeleft = sleep_val;
+ state++;
+ if (nt50)
+ call = 255;
+ } else {
+ call = ((fadein_val - timeleft) * 255) / fadein_val;
+ break;
+ }
+ // Sleep
+ case 1:
+ if (timeleft == 0) {
+ timeleft = fadeout_val;
+ state++;
+ // fadeout
+ } else
+ break;
+ // FadeOUT
+ case 2:
+ if (timeleft == 0) {
+ PostMessage((HWND) dwUser, WM_TIMER, 0, 0);
+ return;
+ } else {
+ call = ((timeleft) * 255) / fadeout_val;
+ break;
+ }
+ }
+ // Transparency value aquired, and could be set...
+ if ((call >= 0) && nt50)
+ SetLayeredWindowAttributesProc((HWND) dwUser, keycolor,
+ (BYTE) call, alphaparam);
+
+ // Time is running out...
+ timeleft--;
+}
+
+int myatoi(char *s);
+
+void __declspec(dllexport) show(HWND hwndParent, int string_size,
+ char *variables, stack_t ** stacktop)
+{
+ DEVMODE dm;
+ char fn[MAX_PATH];
+ char temp[64];
+
+ g_rv = -1;
+ resolution = RESOLUTION;
+
+ EXDLL_INIT();
+
+ popstring(temp);
+ sleep_val = myatoi(temp);
+ popstring(temp);
+ fadein_val = myatoi(temp);
+ popstring(temp);
+ fadeout_val = myatoi(temp);
+ popstring(temp);
+ keycolor = myatoi(temp);
+ popstring(fn);
+
+ dm.dmSize = sizeof(DEVMODE);
+ EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);
+ // Check for winXP/2k at 32 bpp transparency
+ nt50 = (LOBYTE(LOWORD(GetVersion())) >= 5) && !((dm.dmBitsPerPel < 32)
+ && (keycolor != -1));
+ if (!nt50) {
+ // Fading+transparency is unsupported at old windows versions...
+ resolution = sleep_val + fadein_val + fadeout_val;
+ fadeout_val = fadein_val = 0;
+ sleep_val = 1;
+ state = 1; // skip fade in
+ } else {
+ // div them by resolution
+ sleep_val >>= 5;
+ fadein_val >>= 5;
+ fadeout_val >>= 5;
+ state = 0;
+
+ alphaparam = LWA_ALPHA | ((keycolor == -1) ? (0) : (LWA_COLORKEY));
+ keycolor =
+ ((keycolor & 0xFF) << 16) + (keycolor & 0xFF00) +
+ ((keycolor & 0xFF0000) >> 16);
+ }
+
+ if (fn[0] && ((sleep_val + fadein_val + fadeout_val) > 0)) {
+ MSG msg;
+ static WNDCLASS wc;
+ wc.lpfnWndProc = WndProc;
+ wc.hInstance = g_hInstance;
+ wc.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wc.lpszClassName = classname;
+ if (RegisterClass(&wc)) {
+ char fn2[MAX_PATH];
+ lstrcpy(fn2, fn);
+ lstrcat(fn, ".bmp");
+ lstrcat(fn2, ".wav");
+ g_hbm =
+ LoadImage(NULL, fn, IMAGE_BITMAP, 0, 0,
+ LR_CREATEDIBSECTION | LR_LOADFROMFILE);
+ if (g_hbm) {
+ HWND myWnd;
+ UINT timerEvent;
+
+ // Get Bitmap Information
+ GetObject(g_hbm, sizeof(bm), (LPSTR) & bm);
+
+ myWnd =
+ CreateWindowEx(WS_EX_TOOLWINDOW |
+ ((nt50) ? (WS_EX_LAYERED) : (0)), classname,
+ classname, 0, 0, 0, 0, 0, (HWND) hwndParent,
+ NULL, g_hInstance, NULL);
+
+ // Set transparency / key color
+ if (nt50) {
+ // Get blending proc address
+ HANDLE user32 = GetModuleHandle("user32");
+ SetLayeredWindowAttributesProc =
+ (_tSetLayeredWindowAttributesProc) GetProcAddress(user32,
+ "SetLayeredWindowAttributes");
+ // Use win2k method
+ SetLayeredWindowAttributesProc(myWnd, keycolor,
+ (BYTE) ((fadein_val > 0) ? (0) : (255)),
+ alphaparam);
+ } else if (keycolor != -1) {
+ // transparency mode
+ SetTransparentRegion(myWnd);
+ }
+
+ PlaySound(fn2, NULL, SND_ASYNC | SND_FILENAME | SND_NODEFAULT);
+
+ // Start up timer...
+ timeleft = fadein_val;
+ timerEvent =
+ timeSetEvent(resolution, RESOLUTION / 4, TimeProc,
+ (DWORD_PTR) myWnd, TIME_PERIODIC);
+
+ while (IsWindow(myWnd) && GetMessage(&msg, myWnd, 0, 0)) {
+ DispatchMessage(&msg);
+ }
+
+ // Kill the timer...
+ timeKillEvent(timerEvent);
+
+ // Stop currently playing wave, we want to exit
+ PlaySound(0, 0, 0);
+
+ DeleteObject(g_hbm);
+ }
+ // We should UnRegister class, since Windows NT series never does this by itself
+ UnregisterClass(wc.lpszClassName, g_hInstance);
+ }
+ }
+ wsprintf(temp, "%d", g_rv);
+ pushstring(temp);
+}
+
+int myatoi(char *s)
+{
+ unsigned int v = 0;
+ if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) {
+ s += 2;
+ for (;;) {
+ int c = *s++;
+ if (c >= '0' && c <= '9')
+ c -= '0';
+ else if (c >= 'a' && c <= 'f')
+ c -= 'a' - 10;
+ else if (c >= 'A' && c <= 'F')
+ c -= 'A' - 10;
+ else
+ break;
+ v <<= 4;
+ v += c;
+ }
+ } else if (*s == '0' && s[1] <= '7' && s[1] >= '0') {
+ s++;
+ for (;;) {
+ int c = *s++;
+ if (c >= '0' && c <= '7')
+ c -= '0';
+ else
+ break;
+ v <<= 3;
+ v += c;
+ }
+ } else {
+ int sign = 0;
+ if (*s == '-') {
+ s++;
+ sign++;
+ }
+ for (;;) {
+ int c = *s++ - '0';
+ if (c < 0 || c > 9)
+ break;
+ v *= 10;
+ v += c;
+ }
+ if (sign)
+ return -(int) v;
+ }
+ return (int) v;
+}
diff --git a/Contrib/AdvSplash/advsplash.txt b/Contrib/AdvSplash/advsplash.txt
index 12692b4..92f333f 100755
--- a/Contrib/AdvSplash/advsplash.txt
+++ b/Contrib/AdvSplash/advsplash.txt
@@ -1,53 +1,53 @@
-AdvSplash.dll - small (5.5k), simple plugin that lets you throw
-up a splash screen in NSIS installers with cool fading effects (win2k/xp)
-and transparency.
-
-To use:
-
-Create a .BMP file of your splash screen.
-(optional) Create a .WAV file to play while your splash screen shows.
-
-Add the following lines to your .NSI file:
-
-Function .onInit
- SetOutPath $TEMP
- File /oname=spltmp.bmp "my_splash.bmp"
-
-; optional
-; File /oname=spltmp.wav "my_splashshit.wav"
-
- advsplash::show 1000 600 400 -1 $TEMP\spltmp
-
- Pop $0 ; $0 has '1' if the user closed the splash screen early,
- ; '0' if everything closed normally, and '-1' if some error occurred.
-
- Delete $TEMP\spltmp.bmp
-; Delete $TEMP\spltmp.wav
-FunctionEnd
-
-Calling format
- advsplash::show Delay FadeIn FadeOut KeyColor FileName
-
-Delay - length to show the screen for (in milliseconds)
-FadeIn - length to show the fadein scene (in ms) (not included in Delay)
-FadeOut - length to show the fadeout scene (in ms) (not included in Delay)
-KeyColor - color used for transparency, could be any RGB value
- (for ex. R=255 G=100 B=16 -> KeyColor=0xFF6410),
- use KeyColor=-1 if there is no transparent color at your image.
-FileName - splash bitmap filename (without the .bmp). The BMP file used will be
- this parameter.bmp, and the wave file used (if present) will be this
- parameter.wav.
-
-(If you already have an .onInit function, put that in it)
-
-Note 1: fadein/fadeout supported only on win2k/winxp systems, all other systems
-will show simple splash screen with Delay = Delay + FadeIn + FadeOut. Also, I've
-noted my winXP uses no transparent color at 16 bpp, so at bpps lower than 32
-for images with transparent color no fading effect will occur.
-
-Note 2: the return value of splash is 1 if the user closed the splash
-screen early (pop it from the stack)
-
--Justin
-Converted to a plugin DLL by Amir Szekely (kichik)
+AdvSplash.dll - small (5.5k), simple plugin that lets you throw
+up a splash screen in NSIS installers with cool fading effects (win2k/xp)
+and transparency.
+
+To use:
+
+Create a .BMP file of your splash screen.
+(optional) Create a .WAV file to play while your splash screen shows.
+
+Add the following lines to your .NSI file:
+
+Function .onInit
+ SetOutPath $TEMP
+ File /oname=spltmp.bmp "my_splash.bmp"
+
+; optional
+; File /oname=spltmp.wav "my_splashshit.wav"
+
+ advsplash::show 1000 600 400 -1 $TEMP\spltmp
+
+ Pop $0 ; $0 has '1' if the user closed the splash screen early,
+ ; '0' if everything closed normally, and '-1' if some error occurred.
+
+ Delete $TEMP\spltmp.bmp
+; Delete $TEMP\spltmp.wav
+FunctionEnd
+
+Calling format
+ advsplash::show Delay FadeIn FadeOut KeyColor FileName
+
+Delay - length to show the screen for (in milliseconds)
+FadeIn - length to show the fadein scene (in ms) (not included in Delay)
+FadeOut - length to show the fadeout scene (in ms) (not included in Delay)
+KeyColor - color used for transparency, could be any RGB value
+ (for ex. R=255 G=100 B=16 -> KeyColor=0xFF6410),
+ use KeyColor=-1 if there is no transparent color at your image.
+FileName - splash bitmap filename (without the .bmp). The BMP file used will be
+ this parameter.bmp, and the wave file used (if present) will be this
+ parameter.wav.
+
+(If you already have an .onInit function, put that in it)
+
+Note 1: fadein/fadeout supported only on win2k/winxp systems, all other systems
+will show simple splash screen with Delay = Delay + FadeIn + FadeOut. Also, I've
+noted my winXP uses no transparent color at 16 bpp, so at bpps lower than 32
+for images with transparent color no fading effect will occur.
+
+Note 2: the return value of splash is 1 if the user closed the splash
+screen early (pop it from the stack)
+
+-Justin
+Converted to a plugin DLL by Amir Szekely (kichik)
Fading and transparency by Nik Medved (brainsucker) \ No newline at end of file
diff --git a/Contrib/Banner/Banner.c b/Contrib/Banner/Banner.c
index c83e127..22e7fbc 100755
--- a/Contrib/Banner/Banner.c
+++ b/Contrib/Banner/Banner.c
@@ -1,184 +1,184 @@
-#include <windows.h>
-#include "../ExDLL/exdll.h"
-#include "../../Source/exehead/resource.h"
-
-// Turn a pair of chars into a word
-// Turn four chars into a dword
-#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
-#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
-#else
-#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
-#endif
-
-HINSTANCE hInstance;
-HWND hwBanner;
-HANDLE hThread;
-BOOL bFailed;
-
-char buf[1024];
-
-unsigned int myatoi(char *s);
-
-BOOL CALLBACK BannerProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if (uMsg == WM_INITDIALOG)
- {
- int iMainStringSet = 0;
-
- popstring(buf);
- while (*(int*)buf == CHAR4_TO_DWORD('/','s','e','t') && !buf[4])
- {
- unsigned int id;
- popstring(buf);
- id = myatoi(buf);
- popstring(buf);
- SetDlgItemText(hwndDlg, id, buf);
- popstring(buf);
-
- if (id == IDC_STR)
- iMainStringSet++;
- }
-
- SetWindowText(hwndDlg, buf);
- if (!iMainStringSet)
- SetDlgItemText(hwndDlg, IDC_STR, buf);
-
- if (!*buf)
- SetWindowLong(hwndDlg, GWL_EXSTYLE, GetWindowLong(hwndDlg, GWL_EXSTYLE) | WS_EX_TOOLWINDOW);
- }
- if (uMsg == WM_CLOSE)
- {
- DestroyWindow(hwndDlg);
- }
- return 0;
-}
-
-BOOL ProcessMessages()
-{
- BOOL processed = FALSE;
- MSG msg;
-
- while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
- {
- DispatchMessage(&msg);
- processed = TRUE;
- }
-
- return processed;
-}
-
-DWORD WINAPI BannerThread(LPVOID lpParameter)
-{
- HWND hwndParent = (HWND) lpParameter;
- HWND lhwBanner;
-
- lhwBanner = CreateDialog(
- GetModuleHandle(0),
- MAKEINTRESOURCE(IDD_VERIFY),
- hwndParent,
- BannerProc
- );
- if (!lhwBanner)
- {
- bFailed = TRUE;
- return 0;
- }
-
- while (IsWindow(lhwBanner))
- {
- if (!ProcessMessages())
- {
- hwBanner = lhwBanner;
- WaitMessage();
- }
- }
-
- hwBanner = NULL;
-
- return 0;
-}
-
-void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-{
- EXDLL_INIT();
-
- {
- DWORD dwThreadId;
- DWORD dwMainThreadId = GetCurrentThreadId();
-
- hwBanner = NULL;
-
- if (!IsWindowVisible(hwndParent))
- hwndParent = 0;
-
- bFailed = FALSE;
-
- hThread = CreateThread(0, 0, BannerThread, (LPVOID) hwndParent, 0, &dwThreadId);
-
- // wait for the window to initalize and for the stack operations to finish
- while (hThread && !hwBanner && !bFailed)
- {
- ProcessMessages();
- Sleep(10);
- }
-
- CloseHandle(hThread);
-
- if (AttachThreadInput(dwMainThreadId, dwThreadId, TRUE))
- {
- // Activates and displays a window
- ShowWindow(hwBanner, SW_SHOW);
- AttachThreadInput(dwMainThreadId, dwThreadId, FALSE);
- }
- else
- ShowWindow(hwBanner, SW_SHOW);
- }
-}
-
-void __declspec(dllexport) getWindow(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-{
- wsprintf(buf, "%u", hwBanner);
- pushstring(buf);
-}
-
-void __declspec(dllexport) destroy(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-{
- if (!hwBanner)
- return;
-
- PostMessage(hwBanner, WM_CLOSE, 0, 0);
-
- // Wait for the thread to finish
- while (hwBanner)
- {
- ProcessMessages();
- Sleep(25);
- }
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- hInstance = hInst;
- if (hwBanner && ul_reason_for_call == DLL_PROCESS_DETACH)
- {
- destroy(0, 0, 0, 0);
- }
- return TRUE;
-}
-
-unsigned int myatoi(char *s)
-{
- unsigned int v=0;
-
- for (;;)
- {
- unsigned int c=*s++;
- if (c >= '0' && c <= '9') c-='0';
- else break;
- v*=10;
- v+=c;
- }
- return v;
-}
+#include <windows.h>
+#include "../ExDLL/exdll.h"
+#include "../../Source/exehead/resource.h"
+
+// Turn a pair of chars into a word
+// Turn four chars into a dword
+#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
+#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
+#else
+#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
+#endif
+
+HINSTANCE hInstance;
+HWND hwBanner;
+HANDLE hThread;
+BOOL bFailed;
+
+char buf[1024];
+
+unsigned int myatoi(char *s);
+
+BOOL CALLBACK BannerProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_INITDIALOG)
+ {
+ int iMainStringSet = 0;
+
+ popstring(buf);
+ while (*(int*)buf == CHAR4_TO_DWORD('/','s','e','t') && !buf[4])
+ {
+ unsigned int id;
+ popstring(buf);
+ id = myatoi(buf);
+ popstring(buf);
+ SetDlgItemText(hwndDlg, id, buf);
+ popstring(buf);
+
+ if (id == IDC_STR)
+ iMainStringSet++;
+ }
+
+ SetWindowText(hwndDlg, buf);
+ if (!iMainStringSet)
+ SetDlgItemText(hwndDlg, IDC_STR, buf);
+
+ if (!*buf)
+ SetWindowLong(hwndDlg, GWL_EXSTYLE, GetWindowLong(hwndDlg, GWL_EXSTYLE) | WS_EX_TOOLWINDOW);
+ }
+ if (uMsg == WM_CLOSE)
+ {
+ DestroyWindow(hwndDlg);
+ }
+ return 0;
+}
+
+BOOL ProcessMessages()
+{
+ BOOL processed = FALSE;
+ MSG msg;
+
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
+ {
+ DispatchMessage(&msg);
+ processed = TRUE;
+ }
+
+ return processed;
+}
+
+DWORD WINAPI BannerThread(LPVOID lpParameter)
+{
+ HWND hwndParent = (HWND) lpParameter;
+ HWND lhwBanner;
+
+ lhwBanner = CreateDialog(
+ GetModuleHandle(0),
+ MAKEINTRESOURCE(IDD_VERIFY),
+ hwndParent,
+ BannerProc
+ );
+ if (!lhwBanner)
+ {
+ bFailed = TRUE;
+ return 0;
+ }
+
+ while (IsWindow(lhwBanner))
+ {
+ if (!ProcessMessages())
+ {
+ hwBanner = lhwBanner;
+ WaitMessage();
+ }
+ }
+
+ hwBanner = NULL;
+
+ return 0;
+}
+
+void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+{
+ EXDLL_INIT();
+
+ {
+ DWORD dwThreadId;
+ DWORD dwMainThreadId = GetCurrentThreadId();
+
+ hwBanner = NULL;
+
+ if (!IsWindowVisible(hwndParent))
+ hwndParent = 0;
+
+ bFailed = FALSE;
+
+ hThread = CreateThread(0, 0, BannerThread, (LPVOID) hwndParent, 0, &dwThreadId);
+
+ // wait for the window to initalize and for the stack operations to finish
+ while (hThread && !hwBanner && !bFailed)
+ {
+ ProcessMessages();
+ Sleep(10);
+ }
+
+ CloseHandle(hThread);
+
+ if (AttachThreadInput(dwMainThreadId, dwThreadId, TRUE))
+ {
+ // Activates and displays a window
+ ShowWindow(hwBanner, SW_SHOW);
+ AttachThreadInput(dwMainThreadId, dwThreadId, FALSE);
+ }
+ else
+ ShowWindow(hwBanner, SW_SHOW);
+ }
+}
+
+void __declspec(dllexport) getWindow(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+{
+ wsprintf(buf, "%u", hwBanner);
+ pushstring(buf);
+}
+
+void __declspec(dllexport) destroy(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+{
+ if (!hwBanner)
+ return;
+
+ PostMessage(hwBanner, WM_CLOSE, 0, 0);
+
+ // Wait for the thread to finish
+ while (hwBanner)
+ {
+ ProcessMessages();
+ Sleep(25);
+ }
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ hInstance = hInst;
+ if (hwBanner && ul_reason_for_call == DLL_PROCESS_DETACH)
+ {
+ destroy(0, 0, 0, 0);
+ }
+ return TRUE;
+}
+
+unsigned int myatoi(char *s)
+{
+ unsigned int v=0;
+
+ for (;;)
+ {
+ unsigned int c=*s++;
+ if (c >= '0' && c <= '9') c-='0';
+ else break;
+ v*=10;
+ v+=c;
+ }
+ return v;
+}
diff --git a/Contrib/Banner/Example.nsi b/Contrib/Banner/Example.nsi
index a1851a2..7719e20 100755
--- a/Contrib/Banner/Example.nsi
+++ b/Contrib/Banner/Example.nsi
@@ -1,38 +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 /NOUNLOAD "Calculating important stuff..."
-
- Banner::getWindow /NOUNLOAD
- Pop $1
-
- again:
- IntOp $0 $0 + 1
- Sleep 1
- StrCmp $0 1000 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 2000 0 again2
-
- Banner::destroy
-FunctionEnd
-
-Section
- DetailPrint "Using previous calculations to quickly calculate 1*2000..."
- Sleep 1000
- DetailPrint "Eureka! It's $0!!!"
- DetailPrint ""
+# 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 /NOUNLOAD "Calculating important stuff..."
+
+ Banner::getWindow /NOUNLOAD
+ Pop $1
+
+ again:
+ IntOp $0 $0 + 1
+ Sleep 1
+ StrCmp $0 1000 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 2000 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/Contrib/Banner/Readme.txt b/Contrib/Banner/Readme.txt
index 2682c2b..97813bc 100755
--- a/Contrib/Banner/Readme.txt
+++ b/Contrib/Banner/Readme.txt
@@ -1,47 +1,47 @@
-BANNER PLUG-IN
---------------
-
-The Banner plug-in shows a banner with customizable text. It uses the IDD_VERIFY dialog of the UI.
-
-There are three functions - show, getWindow and destroy.
-
-Usage
------
-
-Banner::show /NOUNLOAD "Text to show"
-
-[optional] Banner::getWindow /NOUNLOAD
-
-Banner::destroy
-
-See Example.nsi for an example.
-
-Modern UI
----------
-
-The Modern UI has two labels on the IDD_VERIFY dialog. To change all the texts, use:
-
-Banner::show /NOUNLOAD /set 76 "Text 1 (replaces Please wait while Setup is loading...)" "Normal text"
-
-Custom UI
----------
-
-If you have more labels on your IDD_VERIFY dialog, you can use multiple /set parameters to change the texts.
-
-Example:
-
-Banner::show /NOUNLOAD /set 76 "bah #1" /set 54 "bah #2" "Normal text"
-
-The second parameter for /set is the ID of the control.
-
-Some More Tricks
-----------------
-
-If you use /set to set the main string (IDC_STR, 1030) you can specify a different string for the window's caption and for the main string.
-
-If you use an empty string as the main string (Banner::show /NOUNLOAD "") the banner window will not show on the taskbar.
-
-Credits
--------
-
+BANNER PLUG-IN
+--------------
+
+The Banner plug-in shows a banner with customizable text. It uses the IDD_VERIFY dialog of the UI.
+
+There are three functions - show, getWindow and destroy.
+
+Usage
+-----
+
+Banner::show /NOUNLOAD "Text to show"
+
+[optional] Banner::getWindow /NOUNLOAD
+
+Banner::destroy
+
+See Example.nsi for an example.
+
+Modern UI
+---------
+
+The Modern UI has two labels on the IDD_VERIFY dialog. To change all the texts, use:
+
+Banner::show /NOUNLOAD /set 76 "Text 1 (replaces Please wait while Setup is loading...)" "Normal text"
+
+Custom UI
+---------
+
+If you have more labels on your IDD_VERIFY dialog, you can use multiple /set parameters to change the texts.
+
+Example:
+
+Banner::show /NOUNLOAD /set 76 "bah #1" /set 54 "bah #2" "Normal text"
+
+The second parameter for /set is the ID of the control.
+
+Some More Tricks
+----------------
+
+If you use /set to set the main string (IDC_STR, 1030) you can specify a different string for the window's caption and for the main string.
+
+If you use an empty string as the main string (Banner::show /NOUNLOAD "") the banner window will not show on the taskbar.
+
+Credits
+-------
+
A joint effort of brainsucker and kichik in honor of the messages dropped during the battle \ No newline at end of file
diff --git a/Contrib/Banner/SConscript b/Contrib/Banner/SConscript
index 947e821..ea4cb27 100755
--- a/Contrib/Banner/SConscript
+++ b/Contrib/Banner/SConscript
@@ -1,22 +1,22 @@
-target = 'Banner'
-
-files = Split("""
- Banner.c
-""")
-
-libs = Split("""
- kernel32
- user32
-""")
-
-examples = Split("""
- Example.nsi
-""")
-
-docs = Split("""
- Readme.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples, docs)
+target = 'Banner'
+
+files = Split("""
+ Banner.c
+""")
+
+libs = Split("""
+ kernel32
+ user32
+""")
+
+examples = Split("""
+ Example.nsi
+""")
+
+docs = Split("""
+ Readme.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples, docs)
diff --git a/Contrib/BgImage/BgImage.cpp b/Contrib/BgImage/BgImage.cpp
index 0d09a82..b67490a 100755
--- a/Contrib/BgImage/BgImage.cpp
+++ b/Contrib/BgImage/BgImage.cpp
@@ -1,651 +1,651 @@
-#include <windows.h>
-#include <mmsystem.h>
-#include "../ExDLL/exdll.h"
-
-#undef EXDLL_INIT
-
-#define EXDLL_INIT() { \
- g_stringsize=string_size; \
- g_stacktop=stacktop; }
-
-#define NSISFunc(name) extern "C" void __declspec(dllexport) name(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-
-char szTemp[2048];
-HWND hWndImage, hWndParent;
-
-HINSTANCE g_hInstance;
-
-CRITICAL_SECTION CriticalSection;
-
-void ECS() {
- EnterCriticalSection(&CriticalSection);
-}
-
-void LCS() {
- LeaveCriticalSection(&CriticalSection);
-}
-
-enum {
- MIL_DUMMY,
- MIL_GRADIENT,
- MIL_BITMAP,
- MIL_TRANSPARENT_BITMAP,
- MIL_TEXT
-};
-
-struct myImageList {
- BYTE iType;
- union {
- HBITMAP hBitmap;
- char *szText;
- COLORREF cGradientFrom;
- };
- RECT rPos;
- union {
- COLORREF cTransparent;
- COLORREF cTextColor;
- COLORREF cGradientTo;
- };
- HFONT hFont;
-
- BOOL bReady;
-
- myImageList *next;
-} bgBitmap;
-
-unsigned int uWndWidth, uWndHeight;
-
-void *oldProc;
-LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
-HBITMAP __stdcall LoadBitmapFile(long right, long bottom, BITMAP *bBitmap);
-int __stdcall myatoi(char *s);
-COLORREF GetColor();
-void __stdcall GetXY(LPPOINT lpPoint);
-
-BOOL bReturn;
-
-NSISFunc(SetReturn) {
- EXDLL_INIT();
-
- popstring(szTemp);
- bReturn = !lstrcmpi(szTemp, "on");
-}
-
-static void __stdcall my_pushstring(char *str)
-{
- stack_t *th;
- if (!g_stacktop || !bReturn) return;
- th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
- lstrcpyn(th->text,str,g_stringsize);
- th->next=*g_stacktop;
- *g_stacktop=th;
-}
-
-NSISFunc(SetBg) {
- EXDLL_INIT();
-
- ECS();
-
- if (!hWndImage) {
- hWndParent = hwndParent;
-
- if (!hwndParent) {
- my_pushstring("can't find parent window");
- LCS();
- return;
- }
-
- WNDCLASSEX wc = {
- sizeof(WNDCLASSEX),
- CS_VREDRAW|CS_HREDRAW,
- WndProc,
- 0,
- 0,
- g_hInstance,
- 0,
- LoadCursor(0, IDC_ARROW),
- 0,
- 0,
- "NSISBGImage",
- 0
- };
- ATOM atomClass = RegisterClassEx(&wc);
- if (!atomClass) {
- my_pushstring("can't create window");
- return;
- }
-
- hWndImage = CreateWindowEx(
- WS_EX_TOOLWINDOW,
- (LPSTR)(DWORD)atomClass,
- 0,
- WS_CLIPSIBLINGS|WS_POPUP,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- g_hInstance,
- 0
- );
- if (!hWndImage) {
- my_pushstring("can't create window");
- LCS();
- return;
- }
-
- oldProc = (void *)SetWindowLong(hwndParent, GWL_WNDPROC, (long)WndProc);
- }
-
- bgBitmap.bReady = FALSE;
-
- if (bgBitmap.iType == MIL_BITMAP)
- DeleteObject(bgBitmap.hBitmap);
-
- unsigned int uScrWidth = GetSystemMetrics(SM_CXSCREEN);
- unsigned int uScrHeight = GetSystemMetrics(SM_CYSCREEN);
-
- bgBitmap.iType = MIL_BITMAP;
- bgBitmap.rPos.right = 0;
- bgBitmap.rPos.bottom = 0;
- uWndWidth = uScrWidth;
- uWndHeight = uScrHeight;
-
- char szGradient[] = {'/', 'G', 'R', 'A', 'D', 'I', 'E', 'N', 'T', 0};
- char szFillScreen[] = {'/', 'F', 'I' ,'L', 'L', 'S', 'C', 'R', 'E', 'E', 'N', 0};
- char szTiled[] = {'/', 'T', 'I', 'L', 'E', 'D', 0};
-
- popstring(szTemp);
- if (!lstrcmpi(szTemp, szGradient)) {
- bgBitmap.cGradientFrom = GetColor();
- bgBitmap.cGradientTo = GetColor();
-
- bgBitmap.iType = MIL_GRADIENT;
-
- goto done;
- }
- if (!lstrcmpi(szTemp, szFillScreen)) {
- bgBitmap.rPos.right = uScrWidth;
- bgBitmap.rPos.bottom = uScrHeight;
- popstring(szTemp);
- }
- else if (!lstrcmpi(szTemp, szTiled)) {
- popstring(szTemp);
- }
- else {
- uWndWidth = 0;
- uWndHeight = 0;
- }
-
- BITMAP bBitmap;
-
- bgBitmap.hBitmap = LoadBitmapFile(bgBitmap.rPos.right, bgBitmap.rPos.bottom, &bBitmap);
- if (!bgBitmap.hBitmap)
- return;
-
- if (!bgBitmap.rPos.right) {
- bgBitmap.rPos.right = bBitmap.bmWidth;
- bgBitmap.rPos.bottom = bBitmap.bmHeight;
- }
- if (!uWndWidth) {
- uWndWidth = bBitmap.bmWidth;
- uWndHeight = bBitmap.bmHeight;
- }
-
-done:
-
- bgBitmap.bReady = TRUE;
-
- LCS();
-
- if (hWndImage) {
- SetWindowPos(
- hWndImage,
- hWndParent,
- (uScrWidth-uWndWidth)/2,
- (uScrHeight-uWndHeight)/2,
- uWndWidth,
- uWndHeight,
- SWP_NOACTIVATE
- );
- }
-
- my_pushstring("success");
-}
-
-NSISFunc(AddImage) {
- ECS();
-
- myImageList *newImg = (myImageList *)GlobalAlloc(GPTR, sizeof(myImageList));
- if (!newImg) {
- my_pushstring("memory allocation error");
- LCS();
- return;
- }
-
- newImg->iType = MIL_BITMAP;
- newImg->cTransparent = (COLORREF)-1;
-
- popstring(szTemp);
- if (!lstrcmpi(szTemp, "/TRANSPARENT")) {
- newImg->iType = MIL_TRANSPARENT_BITMAP;
- newImg->cTransparent = GetColor();
- popstring(szTemp);
- }
-
- BITMAP bBitmap;
-
- newImg->hBitmap = LoadBitmapFile(0, 0, &bBitmap);
- if (!newImg->hBitmap) {
- GlobalFree(newImg);
- return;
- }
-
- GetXY(LPPOINT(&newImg->rPos));
-
- newImg->rPos.right = newImg->rPos.left + bBitmap.bmWidth;
- newImg->rPos.bottom = newImg->rPos.top + bBitmap.bmHeight;
-
- myImageList *img = &bgBitmap;
- while (img->next) img = img->next;
- img->next = newImg;
-
- my_pushstring("success");
-
- LCS();
-}
-
-NSISFunc(AddText) {
- ECS();
-
- myImageList *newImg = (myImageList *)GlobalAlloc(GPTR, sizeof(myImageList));
- if (!newImg) {
- my_pushstring("memory allocation error");
- LCS();
- return;
- }
-
- newImg->iType = MIL_TEXT;
-
- popstring(szTemp);
- newImg->szText = (char *)GlobalAlloc(GPTR, lstrlen(szTemp)+1);
- if (!newImg->szText) {
- my_pushstring("memory allocation error");
- GlobalFree(newImg);
- LCS();
- return;
- }
- lstrcpy(newImg->szText, szTemp);
-
- popstring(szTemp);
- newImg->hFont = (HFONT)myatoi(szTemp);
- newImg->cTextColor = GetColor();
-
- GetXY(LPPOINT(&newImg->rPos));
- GetXY(LPPOINT(&newImg->rPos) + 1);
-
- myImageList *img = &bgBitmap;
- while (img->next) img = img->next;
- img->next = newImg;
-
- my_pushstring("success");
-
- LCS();
-}
-
-NSISFunc(Redraw) {
- RedrawWindow(hWndImage, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
- ShowWindow(hWndImage, SW_SHOWNA);
-}
-
-NSISFunc(Clear) {
- ECS();
-
- myImageList *img = &bgBitmap;
- while (img) {
- switch (img->iType) {
- case MIL_BITMAP:
- case MIL_TRANSPARENT_BITMAP:
- DeleteObject(img->hBitmap);
- break;
- case MIL_TEXT:
- GlobalFree(img->szText);
- break;
- }
-
- myImageList *thisImg = img;
-
- img = img->next;
- thisImg->next = NULL;
-
- if (thisImg != &bgBitmap)
- GlobalFree(thisImg);
- }
-
- bgBitmap.bReady = FALSE;
-
- LCS();
-}
-
-NSISFunc(Destroy) {
- bgBitmap.bReady = FALSE;
- if (IsWindow(hwndParent))
- SetWindowLong(hwndParent, GWL_WNDPROC, (long)oldProc);
- SendMessage(hWndImage, WM_CLOSE, 0, 0);
- hWndImage = 0;
- Clear(0, 0, 0, 0);
- UnregisterClass("NSISBGImage", g_hInstance);
-}
-
-NSISFunc(Sound) {
- char szLoop[] = {'/', 'L', 'O', 'O', 'P', 0};
- char szWait[] = {'/', 'W', 'A', 'I', 'T', 0};
- char szStop[] = {'/', 'S', 'T', 'O', 'P', 0};
-
- DWORD flags = SND_FILENAME | SND_NODEFAULT;
-
- g_stacktop = stacktop;
- popstring(szTemp);
- if (lstrcmpi(szTemp, szWait))
- flags |= SND_ASYNC;
- else
- popstring(szTemp);
- if (!lstrcmpi(szTemp, szLoop)) {
- flags |= SND_LOOP;
- popstring(szTemp);
- }
- PlaySound(lstrcmpi(szTemp, szStop) ? szTemp : 0, 0, flags);
-}
-
-LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
- HWND hwndParent = hWndParent;
- HWND hwndImage = hWndImage;
-
- if (hwnd == hwndParent) {
- if (message == WM_SIZE) {
- ShowWindow(hwndImage, wParam == SIZE_MINIMIZED ? SW_HIDE : SW_SHOW);
- }
- if (message == WM_WINDOWPOSCHANGED) {
- SetWindowPos(hwndImage, hwndParent, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
- }
- return CallWindowProc(
- (long (__stdcall *)(HWND,unsigned int,unsigned int,long))oldProc,
- hwnd,
- message,
- wParam,
- lParam
- );
- }
- switch (message) {
- case WM_PAINT:
- if (bgBitmap.bReady) {
- ECS();
-
- PAINTSTRUCT ps;
- HDC hdc = BeginPaint(hwnd, &ps);
-
- if (bgBitmap.iType == MIL_BITMAP) {
- HDC cdc = CreateCompatibleDC(hdc);
- SelectObject(cdc, bgBitmap.hBitmap);
- for (unsigned int x = 0; x < uWndWidth; x += bgBitmap.rPos.right) {
- for (unsigned int y = 0; y < uWndHeight; y += bgBitmap.rPos.bottom) {
- BitBlt(hdc, x, y, bgBitmap.rPos.right, bgBitmap.rPos.bottom, cdc, 0, 0, SRCCOPY);
- }
- }
- DeleteDC(cdc);
- }
- else {
- int r = GetRValue(bgBitmap.cGradientFrom) << 10;
- int g = GetGValue(bgBitmap.cGradientFrom) << 10;
- int b = GetBValue(bgBitmap.cGradientFrom) << 10;
- int dr = ((GetRValue(bgBitmap.cGradientTo) << 10) - r) / (int)uWndHeight * 4;
- int dg = ((GetGValue(bgBitmap.cGradientTo) << 10) - g) / (int)uWndHeight * 4;
- int db = ((GetBValue(bgBitmap.cGradientTo) << 10) - b) / (int)uWndHeight * 4;
- RECT rect;
- rect.left = 0;
- rect.top = 0;
- rect.right = uWndWidth;
- rect.bottom = 4;
- while (rect.top < (int)uWndHeight)
- {
- HBRUSH brush = CreateSolidBrush(RGB(r>>10,g>>10,b>>10));
- FillRect(hdc, &rect, brush);
- DeleteObject(brush);
- rect.top+=4;
- rect.bottom+=4;
- r+=dr;
- g+=dg;
- b+=db;
- }
- }
-
- myImageList *img = bgBitmap.next;
- while (img) {
- if (img->iType == MIL_TEXT) {
- SetBkMode(hdc, TRANSPARENT);
-
- SetTextColor(hdc, img->cTextColor);
- SelectObject(hdc, img->hFont);
- DrawText(hdc, img->szText, -1, &img->rPos, DT_TOP | DT_LEFT | DT_NOPREFIX | DT_WORDBREAK);
- }
- else if (img->iType == MIL_BITMAP) {
- HDC cdc = CreateCompatibleDC(hdc);
- SelectObject(cdc, img->hBitmap);
- BitBlt(hdc, img->rPos.left, img->rPos.top, img->rPos.right - img->rPos.left, img->rPos.bottom - img->rPos.top, cdc, 0, 0, SRCCOPY);
- DeleteDC(cdc);
- }
- else {
- COLORREF cColor;
- HBITMAP bmAndBack, bmAndObject, bmAndMem, bmSave;
- HBITMAP bmBackOld, bmObjectOld, bmMemOld, bmSaveOld;
- HDC hdcMem, hdcBack, hdcObject, hdcTemp, hdcSave;
- POINT ptSize;
-
- HBITMAP hBitmap = img->hBitmap;
-
- hdcTemp = CreateCompatibleDC(hdc);
- SelectObject(hdcTemp, hBitmap); // Select the bitmap
-
- ptSize.x = img->rPos.right - img->rPos.left;
- ptSize.y = img->rPos.bottom - img->rPos.top;
- DPtoLP(hdcTemp, &ptSize, 1); // Convert from device to logical points
-
- // Create some DCs to hold temporary data.
- hdcBack = CreateCompatibleDC(hdc);
- hdcObject = CreateCompatibleDC(hdc);
- hdcMem = CreateCompatibleDC(hdc);
- hdcSave = CreateCompatibleDC(hdc);
-
- // Create a bitmap for each DC. DCs are required for a number of
- // GDI functions.
-
- // Monochrome DC
- bmAndBack = CreateBitmap(ptSize.x, ptSize.y, 1, 1, NULL);
-
- // Monochrome DC
- bmAndObject = CreateBitmap(ptSize.x, ptSize.y, 1, 1, NULL);
-
- bmAndMem = CreateCompatibleBitmap(hdc, ptSize.x, ptSize.y);
- bmSave = CreateCompatibleBitmap(hdc, ptSize.x, ptSize.y);
-
- // Each DC must select a bitmap object to store pixel data.
- bmBackOld = (HBITMAP)SelectObject(hdcBack, bmAndBack);
- bmObjectOld = (HBITMAP)SelectObject(hdcObject, bmAndObject);
- bmMemOld = (HBITMAP)SelectObject(hdcMem, bmAndMem);
- bmSaveOld = (HBITMAP)SelectObject(hdcSave, bmSave);
-
- // Set proper mapping mode.
- SetMapMode(hdcTemp, GetMapMode(hdc));
-
- // Save the bitmap sent here, because it will be overwritten.
- BitBlt(hdcSave, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0, SRCCOPY);
-
- // Set the background color of the source DC to the color.
- // contained in the parts of the bitmap that should be transparent
- cColor = SetBkColor(hdcTemp, img->cTransparent);
-
- // Create the object mask for the bitmap by performing a BitBlt
- // from the source bitmap to a monochrome bitmap.
- BitBlt(hdcObject, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0,
- SRCCOPY);
-
- // Set the background color of the source DC back to the original
- // color.
- SetBkColor(hdcTemp, cColor);
-
- // Create the inverse of the object mask.
- BitBlt(hdcBack, 0, 0, ptSize.x, ptSize.y, hdcObject, 0, 0,
- NOTSRCCOPY);
-
- // Copy the background of the main DC to the destination.
- BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdc, img->rPos.left, img->rPos.top,
- SRCCOPY);
-
- // Mask out the places where the bitmap will be placed.
- BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcObject, 0, 0, SRCAND);
-
- // Mask out the transparent colored pixels on the bitmap.
- BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcBack, 0, 0, SRCAND);
-
- // XOR the bitmap with the background on the destination DC.
- BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0, SRCPAINT);
-
- // Copy the destination to the screen.
- BitBlt(hdc, img->rPos.left, img->rPos.top, ptSize.x, ptSize.y, hdcMem, 0, 0,
- SRCCOPY);
-
- // Place the original bitmap back into the bitmap sent here.
- BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcSave, 0, 0, SRCCOPY);
-
- // Delete the memory bitmaps.
- DeleteObject(SelectObject(hdcBack, bmBackOld));
- DeleteObject(SelectObject(hdcObject, bmObjectOld));
- DeleteObject(SelectObject(hdcMem, bmMemOld));
- DeleteObject(SelectObject(hdcSave, bmSaveOld));
-
- // Delete the memory DCs.
- DeleteDC(hdcMem);
- DeleteDC(hdcBack);
- DeleteDC(hdcObject);
- DeleteDC(hdcSave);
- DeleteDC(hdcTemp);
- }
- img = img->next;
- }
-
- LCS();
-
- EndPaint(hwnd, &ps);
- }
- break;
- case WM_WINDOWPOSCHANGING:
- if (IsWindow(hwndParent))
- {
- LPWINDOWPOS wp = (LPWINDOWPOS) lParam;
- wp->flags |= SWP_NOACTIVATE;
- wp->hwndInsertAfter = hwndParent;
- }
- break;
- case WM_CLOSE:
- DestroyWindow(hwnd);
- break;
- default:
- return DefWindowProc(hwnd, message, wParam, lParam);
- }
- return 0;
-}
-
-HBITMAP __stdcall LoadBitmapFile(long right, long bottom, BITMAP *bBitmap)
-{
- HBITMAP hBitmap = (HBITMAP)LoadImage(0, szTemp, IMAGE_BITMAP, right, bottom, LR_LOADFROMFILE);
- if (!hBitmap || !GetObject(hBitmap, sizeof(BITMAP), (void *)bBitmap)) {
- my_pushstring("can't load bitmap");
- if (hBitmap)
- DeleteObject(hBitmap);
- LCS();
- return 0;
- }
- return hBitmap;
-}
-
-COLORREF GetColor() {
- COLORREF cColor = 0;
- popstring(szTemp);
- cColor |= (BYTE) myatoi(szTemp);
- popstring(szTemp);
- cColor |= ((BYTE) myatoi(szTemp)) << 8;
- popstring(szTemp);
- cColor |= ((BYTE) myatoi(szTemp)) << 16;
- return cColor;
-}
-
-void __stdcall GetXY(LPPOINT lpPoint) {
- popstring(szTemp);
- int iPosTemp = myatoi(szTemp);
- if (iPosTemp < 0) iPosTemp = iPosTemp + (int)uWndWidth;
- lpPoint->x = (unsigned int)iPosTemp;
-
- popstring(szTemp);
- iPosTemp = myatoi(szTemp);
- if (iPosTemp < 0) iPosTemp = iPosTemp + (int)uWndHeight;
- lpPoint->y = (unsigned int)iPosTemp;
-}
-
-int __stdcall myatoi(char *s)
-{
- unsigned int v=0;
- if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
- {
- s+=2;
- for (;;)
- {
- int c=*s++;
- if (c >= '0' && c <= '9') c-='0';
- else if (c >= 'a' && c <= 'f') c-='a'-10;
- else if (c >= 'A' && c <= 'F') c-='A'-10;
- else break;
- v<<=4;
- v+=c;
- }
- }
- else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
- {
- s++;
- for (;;)
- {
- int c=*s++;
- if (c >= '0' && c <= '7') c-='0';
- else break;
- v<<=3;
- v+=c;
- }
- }
- else
- {
- int sign=0;
- if (*s == '-') { s++; sign++; }
- for (;;)
- {
- int c=*s++ - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- if (sign) return -(int) v;
- }
- return (int)v;
-}
-
-extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
- g_hInstance=hInst;
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- InitializeCriticalSection(&CriticalSection);
- break;
- case DLL_PROCESS_DETACH:
- DeleteCriticalSection(&CriticalSection);
- break;
- }
- return TRUE;
-}
+#include <windows.h>
+#include <mmsystem.h>
+#include "../ExDLL/exdll.h"
+
+#undef EXDLL_INIT
+
+#define EXDLL_INIT() { \
+ g_stringsize=string_size; \
+ g_stacktop=stacktop; }
+
+#define NSISFunc(name) extern "C" void __declspec(dllexport) name(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+
+char szTemp[2048];
+HWND hWndImage, hWndParent;
+
+HINSTANCE g_hInstance;
+
+CRITICAL_SECTION CriticalSection;
+
+void ECS() {
+ EnterCriticalSection(&CriticalSection);
+}
+
+void LCS() {
+ LeaveCriticalSection(&CriticalSection);
+}
+
+enum {
+ MIL_DUMMY,
+ MIL_GRADIENT,
+ MIL_BITMAP,
+ MIL_TRANSPARENT_BITMAP,
+ MIL_TEXT
+};
+
+struct myImageList {
+ BYTE iType;
+ union {
+ HBITMAP hBitmap;
+ char *szText;
+ COLORREF cGradientFrom;
+ };
+ RECT rPos;
+ union {
+ COLORREF cTransparent;
+ COLORREF cTextColor;
+ COLORREF cGradientTo;
+ };
+ HFONT hFont;
+
+ BOOL bReady;
+
+ myImageList *next;
+} bgBitmap;
+
+unsigned int uWndWidth, uWndHeight;
+
+void *oldProc;
+LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
+HBITMAP __stdcall LoadBitmapFile(long right, long bottom, BITMAP *bBitmap);
+int __stdcall myatoi(char *s);
+COLORREF GetColor();
+void __stdcall GetXY(LPPOINT lpPoint);
+
+BOOL bReturn;
+
+NSISFunc(SetReturn) {
+ EXDLL_INIT();
+
+ popstring(szTemp);
+ bReturn = !lstrcmpi(szTemp, "on");
+}
+
+static void __stdcall my_pushstring(char *str)
+{
+ stack_t *th;
+ if (!g_stacktop || !bReturn) return;
+ th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
+ lstrcpyn(th->text,str,g_stringsize);
+ th->next=*g_stacktop;
+ *g_stacktop=th;
+}
+
+NSISFunc(SetBg) {
+ EXDLL_INIT();
+
+ ECS();
+
+ if (!hWndImage) {
+ hWndParent = hwndParent;
+
+ if (!hwndParent) {
+ my_pushstring("can't find parent window");
+ LCS();
+ return;
+ }
+
+ WNDCLASSEX wc = {
+ sizeof(WNDCLASSEX),
+ CS_VREDRAW|CS_HREDRAW,
+ WndProc,
+ 0,
+ 0,
+ g_hInstance,
+ 0,
+ LoadCursor(0, IDC_ARROW),
+ 0,
+ 0,
+ "NSISBGImage",
+ 0
+ };
+ ATOM atomClass = RegisterClassEx(&wc);
+ if (!atomClass) {
+ my_pushstring("can't create window");
+ return;
+ }
+
+ hWndImage = CreateWindowEx(
+ WS_EX_TOOLWINDOW,
+ (LPSTR)(DWORD)atomClass,
+ 0,
+ WS_CLIPSIBLINGS|WS_POPUP,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ g_hInstance,
+ 0
+ );
+ if (!hWndImage) {
+ my_pushstring("can't create window");
+ LCS();
+ return;
+ }
+
+ oldProc = (void *)SetWindowLong(hwndParent, GWL_WNDPROC, (long)WndProc);
+ }
+
+ bgBitmap.bReady = FALSE;
+
+ if (bgBitmap.iType == MIL_BITMAP)
+ DeleteObject(bgBitmap.hBitmap);
+
+ unsigned int uScrWidth = GetSystemMetrics(SM_CXSCREEN);
+ unsigned int uScrHeight = GetSystemMetrics(SM_CYSCREEN);
+
+ bgBitmap.iType = MIL_BITMAP;
+ bgBitmap.rPos.right = 0;
+ bgBitmap.rPos.bottom = 0;
+ uWndWidth = uScrWidth;
+ uWndHeight = uScrHeight;
+
+ char szGradient[] = {'/', 'G', 'R', 'A', 'D', 'I', 'E', 'N', 'T', 0};
+ char szFillScreen[] = {'/', 'F', 'I' ,'L', 'L', 'S', 'C', 'R', 'E', 'E', 'N', 0};
+ char szTiled[] = {'/', 'T', 'I', 'L', 'E', 'D', 0};
+
+ popstring(szTemp);
+ if (!lstrcmpi(szTemp, szGradient)) {
+ bgBitmap.cGradientFrom = GetColor();
+ bgBitmap.cGradientTo = GetColor();
+
+ bgBitmap.iType = MIL_GRADIENT;
+
+ goto done;
+ }
+ if (!lstrcmpi(szTemp, szFillScreen)) {
+ bgBitmap.rPos.right = uScrWidth;
+ bgBitmap.rPos.bottom = uScrHeight;
+ popstring(szTemp);
+ }
+ else if (!lstrcmpi(szTemp, szTiled)) {
+ popstring(szTemp);
+ }
+ else {
+ uWndWidth = 0;
+ uWndHeight = 0;
+ }
+
+ BITMAP bBitmap;
+
+ bgBitmap.hBitmap = LoadBitmapFile(bgBitmap.rPos.right, bgBitmap.rPos.bottom, &bBitmap);
+ if (!bgBitmap.hBitmap)
+ return;
+
+ if (!bgBitmap.rPos.right) {
+ bgBitmap.rPos.right = bBitmap.bmWidth;
+ bgBitmap.rPos.bottom = bBitmap.bmHeight;
+ }
+ if (!uWndWidth) {
+ uWndWidth = bBitmap.bmWidth;
+ uWndHeight = bBitmap.bmHeight;
+ }
+
+done:
+
+ bgBitmap.bReady = TRUE;
+
+ LCS();
+
+ if (hWndImage) {
+ SetWindowPos(
+ hWndImage,
+ hWndParent,
+ (uScrWidth-uWndWidth)/2,
+ (uScrHeight-uWndHeight)/2,
+ uWndWidth,
+ uWndHeight,
+ SWP_NOACTIVATE
+ );
+ }
+
+ my_pushstring("success");
+}
+
+NSISFunc(AddImage) {
+ ECS();
+
+ myImageList *newImg = (myImageList *)GlobalAlloc(GPTR, sizeof(myImageList));
+ if (!newImg) {
+ my_pushstring("memory allocation error");
+ LCS();
+ return;
+ }
+
+ newImg->iType = MIL_BITMAP;
+ newImg->cTransparent = (COLORREF)-1;
+
+ popstring(szTemp);
+ if (!lstrcmpi(szTemp, "/TRANSPARENT")) {
+ newImg->iType = MIL_TRANSPARENT_BITMAP;
+ newImg->cTransparent = GetColor();
+ popstring(szTemp);
+ }
+
+ BITMAP bBitmap;
+
+ newImg->hBitmap = LoadBitmapFile(0, 0, &bBitmap);
+ if (!newImg->hBitmap) {
+ GlobalFree(newImg);
+ return;
+ }
+
+ GetXY(LPPOINT(&newImg->rPos));
+
+ newImg->rPos.right = newImg->rPos.left + bBitmap.bmWidth;
+ newImg->rPos.bottom = newImg->rPos.top + bBitmap.bmHeight;
+
+ myImageList *img = &bgBitmap;
+ while (img->next) img = img->next;
+ img->next = newImg;
+
+ my_pushstring("success");
+
+ LCS();
+}
+
+NSISFunc(AddText) {
+ ECS();
+
+ myImageList *newImg = (myImageList *)GlobalAlloc(GPTR, sizeof(myImageList));
+ if (!newImg) {
+ my_pushstring("memory allocation error");
+ LCS();
+ return;
+ }
+
+ newImg->iType = MIL_TEXT;
+
+ popstring(szTemp);
+ newImg->szText = (char *)GlobalAlloc(GPTR, lstrlen(szTemp)+1);
+ if (!newImg->szText) {
+ my_pushstring("memory allocation error");
+ GlobalFree(newImg);
+ LCS();
+ return;
+ }
+ lstrcpy(newImg->szText, szTemp);
+
+ popstring(szTemp);
+ newImg->hFont = (HFONT)myatoi(szTemp);
+ newImg->cTextColor = GetColor();
+
+ GetXY(LPPOINT(&newImg->rPos));
+ GetXY(LPPOINT(&newImg->rPos) + 1);
+
+ myImageList *img = &bgBitmap;
+ while (img->next) img = img->next;
+ img->next = newImg;
+
+ my_pushstring("success");
+
+ LCS();
+}
+
+NSISFunc(Redraw) {
+ RedrawWindow(hWndImage, 0, 0, RDW_INVALIDATE | RDW_UPDATENOW);
+ ShowWindow(hWndImage, SW_SHOWNA);
+}
+
+NSISFunc(Clear) {
+ ECS();
+
+ myImageList *img = &bgBitmap;
+ while (img) {
+ switch (img->iType) {
+ case MIL_BITMAP:
+ case MIL_TRANSPARENT_BITMAP:
+ DeleteObject(img->hBitmap);
+ break;
+ case MIL_TEXT:
+ GlobalFree(img->szText);
+ break;
+ }
+
+ myImageList *thisImg = img;
+
+ img = img->next;
+ thisImg->next = NULL;
+
+ if (thisImg != &bgBitmap)
+ GlobalFree(thisImg);
+ }
+
+ bgBitmap.bReady = FALSE;
+
+ LCS();
+}
+
+NSISFunc(Destroy) {
+ bgBitmap.bReady = FALSE;
+ if (IsWindow(hwndParent))
+ SetWindowLong(hwndParent, GWL_WNDPROC, (long)oldProc);
+ SendMessage(hWndImage, WM_CLOSE, 0, 0);
+ hWndImage = 0;
+ Clear(0, 0, 0, 0);
+ UnregisterClass("NSISBGImage", g_hInstance);
+}
+
+NSISFunc(Sound) {
+ char szLoop[] = {'/', 'L', 'O', 'O', 'P', 0};
+ char szWait[] = {'/', 'W', 'A', 'I', 'T', 0};
+ char szStop[] = {'/', 'S', 'T', 'O', 'P', 0};
+
+ DWORD flags = SND_FILENAME | SND_NODEFAULT;
+
+ g_stacktop = stacktop;
+ popstring(szTemp);
+ if (lstrcmpi(szTemp, szWait))
+ flags |= SND_ASYNC;
+ else
+ popstring(szTemp);
+ if (!lstrcmpi(szTemp, szLoop)) {
+ flags |= SND_LOOP;
+ popstring(szTemp);
+ }
+ PlaySound(lstrcmpi(szTemp, szStop) ? szTemp : 0, 0, flags);
+}
+
+LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
+ HWND hwndParent = hWndParent;
+ HWND hwndImage = hWndImage;
+
+ if (hwnd == hwndParent) {
+ if (message == WM_SIZE) {
+ ShowWindow(hwndImage, wParam == SIZE_MINIMIZED ? SW_HIDE : SW_SHOW);
+ }
+ if (message == WM_WINDOWPOSCHANGED) {
+ SetWindowPos(hwndImage, hwndParent, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+ }
+ return CallWindowProc(
+ (long (__stdcall *)(HWND,unsigned int,unsigned int,long))oldProc,
+ hwnd,
+ message,
+ wParam,
+ lParam
+ );
+ }
+ switch (message) {
+ case WM_PAINT:
+ if (bgBitmap.bReady) {
+ ECS();
+
+ PAINTSTRUCT ps;
+ HDC hdc = BeginPaint(hwnd, &ps);
+
+ if (bgBitmap.iType == MIL_BITMAP) {
+ HDC cdc = CreateCompatibleDC(hdc);
+ SelectObject(cdc, bgBitmap.hBitmap);
+ for (unsigned int x = 0; x < uWndWidth; x += bgBitmap.rPos.right) {
+ for (unsigned int y = 0; y < uWndHeight; y += bgBitmap.rPos.bottom) {
+ BitBlt(hdc, x, y, bgBitmap.rPos.right, bgBitmap.rPos.bottom, cdc, 0, 0, SRCCOPY);
+ }
+ }
+ DeleteDC(cdc);
+ }
+ else {
+ int r = GetRValue(bgBitmap.cGradientFrom) << 10;
+ int g = GetGValue(bgBitmap.cGradientFrom) << 10;
+ int b = GetBValue(bgBitmap.cGradientFrom) << 10;
+ int dr = ((GetRValue(bgBitmap.cGradientTo) << 10) - r) / (int)uWndHeight * 4;
+ int dg = ((GetGValue(bgBitmap.cGradientTo) << 10) - g) / (int)uWndHeight * 4;
+ int db = ((GetBValue(bgBitmap.cGradientTo) << 10) - b) / (int)uWndHeight * 4;
+ RECT rect;
+ rect.left = 0;
+ rect.top = 0;
+ rect.right = uWndWidth;
+ rect.bottom = 4;
+ while (rect.top < (int)uWndHeight)
+ {
+ HBRUSH brush = CreateSolidBrush(RGB(r>>10,g>>10,b>>10));
+ FillRect(hdc, &rect, brush);
+ DeleteObject(brush);
+ rect.top+=4;
+ rect.bottom+=4;
+ r+=dr;
+ g+=dg;
+ b+=db;
+ }
+ }
+
+ myImageList *img = bgBitmap.next;
+ while (img) {
+ if (img->iType == MIL_TEXT) {
+ SetBkMode(hdc, TRANSPARENT);
+
+ SetTextColor(hdc, img->cTextColor);
+ SelectObject(hdc, img->hFont);
+ DrawText(hdc, img->szText, -1, &img->rPos, DT_TOP | DT_LEFT | DT_NOPREFIX | DT_WORDBREAK);
+ }
+ else if (img->iType == MIL_BITMAP) {
+ HDC cdc = CreateCompatibleDC(hdc);
+ SelectObject(cdc, img->hBitmap);
+ BitBlt(hdc, img->rPos.left, img->rPos.top, img->rPos.right - img->rPos.left, img->rPos.bottom - img->rPos.top, cdc, 0, 0, SRCCOPY);
+ DeleteDC(cdc);
+ }
+ else {
+ COLORREF cColor;
+ HBITMAP bmAndBack, bmAndObject, bmAndMem, bmSave;
+ HBITMAP bmBackOld, bmObjectOld, bmMemOld, bmSaveOld;
+ HDC hdcMem, hdcBack, hdcObject, hdcTemp, hdcSave;
+ POINT ptSize;
+
+ HBITMAP hBitmap = img->hBitmap;
+
+ hdcTemp = CreateCompatibleDC(hdc);
+ SelectObject(hdcTemp, hBitmap); // Select the bitmap
+
+ ptSize.x = img->rPos.right - img->rPos.left;
+ ptSize.y = img->rPos.bottom - img->rPos.top;
+ DPtoLP(hdcTemp, &ptSize, 1); // Convert from device to logical points
+
+ // Create some DCs to hold temporary data.
+ hdcBack = CreateCompatibleDC(hdc);
+ hdcObject = CreateCompatibleDC(hdc);
+ hdcMem = CreateCompatibleDC(hdc);
+ hdcSave = CreateCompatibleDC(hdc);
+
+ // Create a bitmap for each DC. DCs are required for a number of
+ // GDI functions.
+
+ // Monochrome DC
+ bmAndBack = CreateBitmap(ptSize.x, ptSize.y, 1, 1, NULL);
+
+ // Monochrome DC
+ bmAndObject = CreateBitmap(ptSize.x, ptSize.y, 1, 1, NULL);
+
+ bmAndMem = CreateCompatibleBitmap(hdc, ptSize.x, ptSize.y);
+ bmSave = CreateCompatibleBitmap(hdc, ptSize.x, ptSize.y);
+
+ // Each DC must select a bitmap object to store pixel data.
+ bmBackOld = (HBITMAP)SelectObject(hdcBack, bmAndBack);
+ bmObjectOld = (HBITMAP)SelectObject(hdcObject, bmAndObject);
+ bmMemOld = (HBITMAP)SelectObject(hdcMem, bmAndMem);
+ bmSaveOld = (HBITMAP)SelectObject(hdcSave, bmSave);
+
+ // Set proper mapping mode.
+ SetMapMode(hdcTemp, GetMapMode(hdc));
+
+ // Save the bitmap sent here, because it will be overwritten.
+ BitBlt(hdcSave, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0, SRCCOPY);
+
+ // Set the background color of the source DC to the color.
+ // contained in the parts of the bitmap that should be transparent
+ cColor = SetBkColor(hdcTemp, img->cTransparent);
+
+ // Create the object mask for the bitmap by performing a BitBlt
+ // from the source bitmap to a monochrome bitmap.
+ BitBlt(hdcObject, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0,
+ SRCCOPY);
+
+ // Set the background color of the source DC back to the original
+ // color.
+ SetBkColor(hdcTemp, cColor);
+
+ // Create the inverse of the object mask.
+ BitBlt(hdcBack, 0, 0, ptSize.x, ptSize.y, hdcObject, 0, 0,
+ NOTSRCCOPY);
+
+ // Copy the background of the main DC to the destination.
+ BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdc, img->rPos.left, img->rPos.top,
+ SRCCOPY);
+
+ // Mask out the places where the bitmap will be placed.
+ BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcObject, 0, 0, SRCAND);
+
+ // Mask out the transparent colored pixels on the bitmap.
+ BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcBack, 0, 0, SRCAND);
+
+ // XOR the bitmap with the background on the destination DC.
+ BitBlt(hdcMem, 0, 0, ptSize.x, ptSize.y, hdcTemp, 0, 0, SRCPAINT);
+
+ // Copy the destination to the screen.
+ BitBlt(hdc, img->rPos.left, img->rPos.top, ptSize.x, ptSize.y, hdcMem, 0, 0,
+ SRCCOPY);
+
+ // Place the original bitmap back into the bitmap sent here.
+ BitBlt(hdcTemp, 0, 0, ptSize.x, ptSize.y, hdcSave, 0, 0, SRCCOPY);
+
+ // Delete the memory bitmaps.
+ DeleteObject(SelectObject(hdcBack, bmBackOld));
+ DeleteObject(SelectObject(hdcObject, bmObjectOld));
+ DeleteObject(SelectObject(hdcMem, bmMemOld));
+ DeleteObject(SelectObject(hdcSave, bmSaveOld));
+
+ // Delete the memory DCs.
+ DeleteDC(hdcMem);
+ DeleteDC(hdcBack);
+ DeleteDC(hdcObject);
+ DeleteDC(hdcSave);
+ DeleteDC(hdcTemp);
+ }
+ img = img->next;
+ }
+
+ LCS();
+
+ EndPaint(hwnd, &ps);
+ }
+ break;
+ case WM_WINDOWPOSCHANGING:
+ if (IsWindow(hwndParent))
+ {
+ LPWINDOWPOS wp = (LPWINDOWPOS) lParam;
+ wp->flags |= SWP_NOACTIVATE;
+ wp->hwndInsertAfter = hwndParent;
+ }
+ break;
+ case WM_CLOSE:
+ DestroyWindow(hwnd);
+ break;
+ default:
+ return DefWindowProc(hwnd, message, wParam, lParam);
+ }
+ return 0;
+}
+
+HBITMAP __stdcall LoadBitmapFile(long right, long bottom, BITMAP *bBitmap)
+{
+ HBITMAP hBitmap = (HBITMAP)LoadImage(0, szTemp, IMAGE_BITMAP, right, bottom, LR_LOADFROMFILE);
+ if (!hBitmap || !GetObject(hBitmap, sizeof(BITMAP), (void *)bBitmap)) {
+ my_pushstring("can't load bitmap");
+ if (hBitmap)
+ DeleteObject(hBitmap);
+ LCS();
+ return 0;
+ }
+ return hBitmap;
+}
+
+COLORREF GetColor() {
+ COLORREF cColor = 0;
+ popstring(szTemp);
+ cColor |= (BYTE) myatoi(szTemp);
+ popstring(szTemp);
+ cColor |= ((BYTE) myatoi(szTemp)) << 8;
+ popstring(szTemp);
+ cColor |= ((BYTE) myatoi(szTemp)) << 16;
+ return cColor;
+}
+
+void __stdcall GetXY(LPPOINT lpPoint) {
+ popstring(szTemp);
+ int iPosTemp = myatoi(szTemp);
+ if (iPosTemp < 0) iPosTemp = iPosTemp + (int)uWndWidth;
+ lpPoint->x = (unsigned int)iPosTemp;
+
+ popstring(szTemp);
+ iPosTemp = myatoi(szTemp);
+ if (iPosTemp < 0) iPosTemp = iPosTemp + (int)uWndHeight;
+ lpPoint->y = (unsigned int)iPosTemp;
+}
+
+int __stdcall myatoi(char *s)
+{
+ unsigned int v=0;
+ if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
+ {
+ s+=2;
+ for (;;)
+ {
+ int c=*s++;
+ if (c >= '0' && c <= '9') c-='0';
+ else if (c >= 'a' && c <= 'f') c-='a'-10;
+ else if (c >= 'A' && c <= 'F') c-='A'-10;
+ else break;
+ v<<=4;
+ v+=c;
+ }
+ }
+ else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
+ {
+ s++;
+ for (;;)
+ {
+ int c=*s++;
+ if (c >= '0' && c <= '7') c-='0';
+ else break;
+ v<<=3;
+ v+=c;
+ }
+ }
+ else
+ {
+ int sign=0;
+ if (*s == '-') { s++; sign++; }
+ for (;;)
+ {
+ int c=*s++ - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ if (sign) return -(int) v;
+ }
+ return (int)v;
+}
+
+extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
+ g_hInstance=hInst;
+ switch (ul_reason_for_call) {
+ case DLL_PROCESS_ATTACH:
+ InitializeCriticalSection(&CriticalSection);
+ break;
+ case DLL_PROCESS_DETACH:
+ DeleteCriticalSection(&CriticalSection);
+ break;
+ }
+ return TRUE;
+}
diff --git a/Contrib/BgImage/BgImage.txt b/Contrib/BgImage/BgImage.txt
index c333c14..305ca6f 100755
--- a/Contrib/BgImage/BgImage.txt
+++ b/Contrib/BgImage/BgImage.txt
@@ -1,96 +1,96 @@
-BgImage.DLL - NSIS extension DLL
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Displays an image or a gradient with user defined texts and/or images behind the NSIS window.
-Can also play WAVs.
-
-See Example.nsi for a usage example.
-
-Usage
-~~~~~
-
-1) Call SetBg to set the background
-2) Call AddText, or AddImage to add texts and images
-3) Call Redraw to update the background window
-4) Optional - repeat steps 2-3 to add more images
- -or-
- call Clear and repeat steps 1-3 for a completely new background.
-5) Call Destroy when the background is no longer required (.onGUIEnd for example)
-
-Notes
-~~~~~
-
-* All but the last used function (which should be Destroy) must use /NOUNLOAD so the image window won't be destroyed before it should.
-
-* This plugin requires NSIS 2.0b4 and above.
-
-* Do not call SetBg (which creates the window) from a section or a function called by a section.
-
-* Never use /NOUNLOAD in .onInstSuccess and .onInstFailed. Failing to do so will cause the installer to crash.
- This means you should not call Destroy from .onInstSuccess or .onInstFailed.
-
-Available functions
-~~~~~~~~~~~~~~
-
-SetBg [/FILLSCREEN|/TILED] path_to_bitmap
-SetBg /GRADIENT R G B R G B
- Sets the background and creates the window if necessary
- Use /FILLSCREEN to make the image fill the screen
- Use /TILED to set a tiled background
- Use /GRADIENT to set a gradient background
-
- If SetReturn on was called returns "success" on the stack
- or an error string if there was an error
-
- Do not use in .onInit!
-
-AddImage [/TRANSPARENT R G B] path_to_bitmap X Y
- Adds an image to the background window at (X,Y)
- X and Y can be negative to specify distance from right/bottom
- Use /TRANSPARENT to make BgImage draw the image transparently
- Define the transparent color using R G B
-
- If SetReturn on was called returns "success" on the stack
- or an error string if there was an error
-
-AddText text font_handle R G B X Y X Y
- Adds text to the background window
- Use NSIS's CreateFont to create a font and pass it as font_handle
- Use R G B to set the text color
- The first X Y is for the top left corner of the text box
- The second X Y is for the bottom right corner of the text box
- X and Y can be negative to specify distance from right/bottoms
-
- If SetReturn on was called returns "success" on the stack
- or an error string if there was an error
-
-Clear
- Clears all of the current background, images and texts
-
-Destroy
- Destroys the current background window
- Destroy calls Clear automatically
-
-Sound [/WAIT|/LOOP] path_to_wav
-Sound /STOP
- Plays a wave file
- Use /WAIT to wait for the sound to finish playing
- Use /LOOP to loop the sound
- Use Sound /STOP to stop the loop
-
-SetReturn on|off
- Enable return values from SetBg, AddImage and AddText
- Default value is off because all of the possible errors
- are either things you should handle when debugging your script
- such as "can't load bitmap" or errors you can do nothing about
- such as "memory allocation error"
-
-Credits
-~~~~~~~
-
-Coded by Amir Szekely, aka KiCHiK
-
-Ximon Eighteen, aka Sunjammer - Fixed window title bar issues
-iceman_k - Text idea and original implementation
-Lajos Molnar, aka orfanik - Tile idea and original implementation
+BgImage.DLL - NSIS extension DLL
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Displays an image or a gradient with user defined texts and/or images behind the NSIS window.
+Can also play WAVs.
+
+See Example.nsi for a usage example.
+
+Usage
+~~~~~
+
+1) Call SetBg to set the background
+2) Call AddText, or AddImage to add texts and images
+3) Call Redraw to update the background window
+4) Optional - repeat steps 2-3 to add more images
+ -or-
+ call Clear and repeat steps 1-3 for a completely new background.
+5) Call Destroy when the background is no longer required (.onGUIEnd for example)
+
+Notes
+~~~~~
+
+* All but the last used function (which should be Destroy) must use /NOUNLOAD so the image window won't be destroyed before it should.
+
+* This plugin requires NSIS 2.0b4 and above.
+
+* Do not call SetBg (which creates the window) from a section or a function called by a section.
+
+* Never use /NOUNLOAD in .onInstSuccess and .onInstFailed. Failing to do so will cause the installer to crash.
+ This means you should not call Destroy from .onInstSuccess or .onInstFailed.
+
+Available functions
+~~~~~~~~~~~~~~
+
+SetBg [/FILLSCREEN|/TILED] path_to_bitmap
+SetBg /GRADIENT R G B R G B
+ Sets the background and creates the window if necessary
+ Use /FILLSCREEN to make the image fill the screen
+ Use /TILED to set a tiled background
+ Use /GRADIENT to set a gradient background
+
+ If SetReturn on was called returns "success" on the stack
+ or an error string if there was an error
+
+ Do not use in .onInit!
+
+AddImage [/TRANSPARENT R G B] path_to_bitmap X Y
+ Adds an image to the background window at (X,Y)
+ X and Y can be negative to specify distance from right/bottom
+ Use /TRANSPARENT to make BgImage draw the image transparently
+ Define the transparent color using R G B
+
+ If SetReturn on was called returns "success" on the stack
+ or an error string if there was an error
+
+AddText text font_handle R G B X Y X Y
+ Adds text to the background window
+ Use NSIS's CreateFont to create a font and pass it as font_handle
+ Use R G B to set the text color
+ The first X Y is for the top left corner of the text box
+ The second X Y is for the bottom right corner of the text box
+ X and Y can be negative to specify distance from right/bottoms
+
+ If SetReturn on was called returns "success" on the stack
+ or an error string if there was an error
+
+Clear
+ Clears all of the current background, images and texts
+
+Destroy
+ Destroys the current background window
+ Destroy calls Clear automatically
+
+Sound [/WAIT|/LOOP] path_to_wav
+Sound /STOP
+ Plays a wave file
+ Use /WAIT to wait for the sound to finish playing
+ Use /LOOP to loop the sound
+ Use Sound /STOP to stop the loop
+
+SetReturn on|off
+ Enable return values from SetBg, AddImage and AddText
+ Default value is off because all of the possible errors
+ are either things you should handle when debugging your script
+ such as "can't load bitmap" or errors you can do nothing about
+ such as "memory allocation error"
+
+Credits
+~~~~~~~
+
+Coded by Amir Szekely, aka KiCHiK
+
+Ximon Eighteen, aka Sunjammer - Fixed window title bar issues
+iceman_k - Text idea and original implementation
+Lajos Molnar, aka orfanik - Tile idea and original implementation
Jason Reis - Coding help \ No newline at end of file
diff --git a/Contrib/BgImage/Example.nsi b/Contrib/BgImage/Example.nsi
index 4096816..9dc8535 100755
--- a/Contrib/BgImage/Example.nsi
+++ b/Contrib/BgImage/Example.nsi
@@ -1,102 +1,102 @@
-Name "BgImage.dll test"
-
-OutFile "BgImage Test.exe"
-
-XPStyle on
-
-!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 /NOUNLOAD 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 /NOUNLOAD /GRADIENT 0 0x80 0 0x80 0 0
- !insertmacro GetReturnValue
- # add an image @ (150,0)
- BgImage::AddImage /NOUNLOAD $PLUGINSDIR\2.bmp 150 0
- !insertmacro GetReturnValue
- # add the same image only transparent (magenta wiped) @ (150,16)
- BgImage::AddImage /NOUNLOAD /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 /NOUNLOAD "Testing 1... 2... 3..." $R0 0 0 255 48 48 798 198
- !insertmacro GetReturnValue
- # add a green shadow for the text
- BgImage::AddText /NOUNLOAD "Testing 1... 2... 3..." $R0 0 255 0 52 52 802 202
- !insertmacro GetReturnValue
- # add the text
- BgImage::AddText /NOUNLOAD "Testing 1... 2... 3..." $R0 255 0 0 50 50 800 200
- !insertmacro GetReturnValue
- # show our creation to the world!
- BgImage::Redraw /NOUNLOAD
- # 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 /NOUNLOAD /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 /NOUNLOAD /TILED $PLUGINSDIR\1.bmp
- !insertmacro GetReturnValue
- # we have to redraw to reflect the changes
- BgImage::Redraw /NOUNLOAD
-
- MessageBox MB_OK "Mike the llama"
-
- # clear everything
- BgImage::Clear /NOUNLOAD
- # Clear doesn't return any value
- # set another gradient
- BgImage::SetBg /NOUNLOAD /GRADIENT 0xFF 0xFA 0xBA 0xAA 0xA5 0x65
- !insertmacro GetReturnValue
- # add some text
- BgImage::AddText /NOUNLOAD "A Desert for Mike" $R0 0 0 0 50 50 800 150
- !insertmacro GetReturnValue
- # add mike as an image
- BgImage::AddImage /NOUNLOAD $PLUGINSDIR\1.bmp 50 150
- !insertmacro GetReturnValue
- # again, we have to call redraw to reflect changes
- BgImage::Redraw /NOUNLOAD
-SectionEnd
-
-Function .onGUIEnd
- # Destroy must not have /NOUNLOAD so NSIS will be able to unload
- # and delete BgImage before it exits
- BgImage::Destroy
- # Destroy doesn't return any value
+Name "BgImage.dll test"
+
+OutFile "BgImage Test.exe"
+
+XPStyle on
+
+!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 /NOUNLOAD 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 /NOUNLOAD /GRADIENT 0 0x80 0 0x80 0 0
+ !insertmacro GetReturnValue
+ # add an image @ (150,0)
+ BgImage::AddImage /NOUNLOAD $PLUGINSDIR\2.bmp 150 0
+ !insertmacro GetReturnValue
+ # add the same image only transparent (magenta wiped) @ (150,16)
+ BgImage::AddImage /NOUNLOAD /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 /NOUNLOAD "Testing 1... 2... 3..." $R0 0 0 255 48 48 798 198
+ !insertmacro GetReturnValue
+ # add a green shadow for the text
+ BgImage::AddText /NOUNLOAD "Testing 1... 2... 3..." $R0 0 255 0 52 52 802 202
+ !insertmacro GetReturnValue
+ # add the text
+ BgImage::AddText /NOUNLOAD "Testing 1... 2... 3..." $R0 255 0 0 50 50 800 200
+ !insertmacro GetReturnValue
+ # show our creation to the world!
+ BgImage::Redraw /NOUNLOAD
+ # 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 /NOUNLOAD /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 /NOUNLOAD /TILED $PLUGINSDIR\1.bmp
+ !insertmacro GetReturnValue
+ # we have to redraw to reflect the changes
+ BgImage::Redraw /NOUNLOAD
+
+ MessageBox MB_OK "Mike the llama"
+
+ # clear everything
+ BgImage::Clear /NOUNLOAD
+ # Clear doesn't return any value
+ # set another gradient
+ BgImage::SetBg /NOUNLOAD /GRADIENT 0xFF 0xFA 0xBA 0xAA 0xA5 0x65
+ !insertmacro GetReturnValue
+ # add some text
+ BgImage::AddText /NOUNLOAD "A Desert for Mike" $R0 0 0 0 50 50 800 150
+ !insertmacro GetReturnValue
+ # add mike as an image
+ BgImage::AddImage /NOUNLOAD $PLUGINSDIR\1.bmp 50 150
+ !insertmacro GetReturnValue
+ # again, we have to call redraw to reflect changes
+ BgImage::Redraw /NOUNLOAD
+SectionEnd
+
+Function .onGUIEnd
+ # Destroy must not have /NOUNLOAD so NSIS will be able to unload
+ # and delete BgImage before it exits
+ BgImage::Destroy
+ # Destroy doesn't return any value
FunctionEnd \ No newline at end of file
diff --git a/Contrib/BgImage/SConscript b/Contrib/BgImage/SConscript
index 8117676..b897435 100755
--- a/Contrib/BgImage/SConscript
+++ b/Contrib/BgImage/SConscript
@@ -1,24 +1,24 @@
-target = 'BgImage'
-
-files = Split("""
- BgImage.cpp
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- winmm
-""")
-
-examples = Split("""
- Example.nsi
-""")
-
-docs = Split("""
- BgImage.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples, docs)
+target = 'BgImage'
+
+files = Split("""
+ BgImage.cpp
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ winmm
+""")
+
+examples = Split("""
+ Example.nsi
+""")
+
+docs = Split("""
+ BgImage.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples, docs)
diff --git a/Contrib/Dialer/Dialer.txt b/Contrib/Dialer/Dialer.txt
index 076abc6..7e067d7 100755
--- a/Contrib/Dialer/Dialer.txt
+++ b/Contrib/Dialer/Dialer.txt
@@ -1,121 +1,121 @@
-DIALER PLUGIN
--------------
-
-Written by Amir Szekely aka KiCHiK
-Readme by Joost Verburg
-
-The Dialer plugin for NSIS provides five functions related to internet connections.
-
-To download files from the internet, use the NSISdl plugin.
-
-USAGE
------
-
-Example of usage:
-
-ClearErrors ;Clear the error flag
-Dialer::FunctionName ;Call Dialer function
-IfErrors "" +3 ;Check for errors
- MessageBox MB_OK "Function not available"
- Quit
-Pop $R0 ;Get the return value from the stack
-MessageBox MB_OK $R0 ;Display the return value
-
-EXAMPLE FUNCTION
-----------------
-
-; ConnectInternet (uses Dialer plugin)
-; Written by Joost Verburg
-;
-; This function attempts to make a connection to the internet if there is no
-; connection available. If you are not sure that a system using the installer
-; has an active internet connection, call this function before downloading
-; files with NSISdl.
-;
-; The function requires Internet Explorer 3, but asks to connect manually if
-; IE3 is not installed.
-
-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 ;Remove to make error not fatal
-
- noie3:
-
- ; IE3 not installed
- MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
-
- connected:
-
- Pop $R0
-
-FunctionEnd
-
-FUNCTIONS
----------
-
-If a function is not available on the system, the error flag will be set.
-
-* AttemptConnect
-
- Attempts to make a connection to the Internet if the system is not connected.
-
- online - already connected / connection successful
- offline - connection failed
-
- Requires Internet Explorer 3 or later
-
-* AutodialOnline
-
- Causes the modem to automatically dial the default Internet connection if the system
- is not connected to the internet. If the system is not set up to automatically
- connect, it will prompt the user.
-
- Return values:
-
- online - already connected / connection successful
- offline - connection failed
-
- Requires Internet Explorer 4 or later
-
-* AutodialUnattended
-
- Causes the modem to automatically dial the default Internet connection if the system
- is not connected to the internet. The user will not be prompted.
-
- Return values:
-
- online - already connected / connection successful
- offline - connection failed
-
- Requires Internet Explorer 4 or later
-
-* AutodialHangup
-
- Disconnects an automatic dial-up connection.
-
- Return values:
-
- success - disconnection successful
- failure - disconnection failed
-
- Requires Internet Explorer 4 or later
-
-* GetConnectedState
-
- Checks whether the system is connected to the internet.
-
- Return values:
-
- online - system is online
- offline - system is offline
-
+DIALER PLUGIN
+-------------
+
+Written by Amir Szekely aka KiCHiK
+Readme by Joost Verburg
+
+The Dialer plugin for NSIS provides five functions related to internet connections.
+
+To download files from the internet, use the NSISdl plugin.
+
+USAGE
+-----
+
+Example of usage:
+
+ClearErrors ;Clear the error flag
+Dialer::FunctionName ;Call Dialer function
+IfErrors "" +3 ;Check for errors
+ MessageBox MB_OK "Function not available"
+ Quit
+Pop $R0 ;Get the return value from the stack
+MessageBox MB_OK $R0 ;Display the return value
+
+EXAMPLE FUNCTION
+----------------
+
+; ConnectInternet (uses Dialer plugin)
+; Written by Joost Verburg
+;
+; This function attempts to make a connection to the internet if there is no
+; connection available. If you are not sure that a system using the installer
+; has an active internet connection, call this function before downloading
+; files with NSISdl.
+;
+; The function requires Internet Explorer 3, but asks to connect manually if
+; IE3 is not installed.
+
+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 ;Remove to make error not fatal
+
+ noie3:
+
+ ; IE3 not installed
+ MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
+
+ connected:
+
+ Pop $R0
+
+FunctionEnd
+
+FUNCTIONS
+---------
+
+If a function is not available on the system, the error flag will be set.
+
+* AttemptConnect
+
+ Attempts to make a connection to the Internet if the system is not connected.
+
+ online - already connected / connection successful
+ offline - connection failed
+
+ Requires Internet Explorer 3 or later
+
+* AutodialOnline
+
+ Causes the modem to automatically dial the default Internet connection if the system
+ is not connected to the internet. If the system is not set up to automatically
+ connect, it will prompt the user.
+
+ Return values:
+
+ online - already connected / connection successful
+ offline - connection failed
+
+ Requires Internet Explorer 4 or later
+
+* AutodialUnattended
+
+ Causes the modem to automatically dial the default Internet connection if the system
+ is not connected to the internet. The user will not be prompted.
+
+ Return values:
+
+ online - already connected / connection successful
+ offline - connection failed
+
+ Requires Internet Explorer 4 or later
+
+* AutodialHangup
+
+ Disconnects an automatic dial-up connection.
+
+ Return values:
+
+ success - disconnection successful
+ failure - disconnection failed
+
+ Requires Internet Explorer 4 or later
+
+* GetConnectedState
+
+ Checks whether the system is connected to the internet.
+
+ Return values:
+
+ online - system is online
+ offline - system is offline
+
Requires Internet Explorer 4 or later \ No newline at end of file
diff --git a/Contrib/Dialer/SConscript b/Contrib/Dialer/SConscript
index f9b6a34..0c9ea04 100755
--- a/Contrib/Dialer/SConscript
+++ b/Contrib/Dialer/SConscript
@@ -1,18 +1,18 @@
-target = 'Dialer'
-
-files = Split("""
- dialer.c
-""")
-
-libs = Split("""
- kernel32
- wininet
-""")
-
-docs = Split("""
- Dialer.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, docs = docs)
+target = 'Dialer'
+
+files = Split("""
+ dialer.c
+""")
+
+libs = Split("""
+ kernel32
+ wininet
+""")
+
+docs = Split("""
+ Dialer.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, docs = docs)
diff --git a/Contrib/Dialer/dialer.c b/Contrib/Dialer/dialer.c
index 4583d8e..1f126ca 100755
--- a/Contrib/Dialer/dialer.c
+++ b/Contrib/Dialer/dialer.c
@@ -1,126 +1,126 @@
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <wininet.h>
-
-#include "../ExDLL/exdll.h"
-
-#define NSISFunction(funcname) void __declspec(dllexport) funcname(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
- return TRUE;
-}
-
-/*************\
- * LOADER *
-\*************/
-
-HMODULE hWinInet = NULL;
-
-FARPROC GetWinInetFunc(char *func) {
- hWinInet = LoadLibrary("wininet.dll");
- if (hWinInet)
- return GetProcAddress(hWinInet, func);
- return NULL;
-}
-
-void FreeWinInet() {
- if (hWinInet)
- FreeLibrary(hWinInet);
- hWinInet = NULL;
-}
-
-/*************\
- * FUNCTIONS *
-\*************/
-
-NSISFunction(AutodialOnline) {
- typedef BOOL (WINAPI *fInternetAutodial)(DWORD, HWND);
- fInternetAutodial pInternetAutodial = (fInternetAutodial) GetWinInetFunc("InternetAutodial");
- if (!pInternetAutodial) {
- extra->exec_flags->exec_error++;
- return;
- }
-
- EXDLL_INIT();
-
- if (pInternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE, 0))
- pushstring("online");
- else
- pushstring("offline");
-
- FreeWinInet();
-}
-
-NSISFunction(AutodialUnattended) {
- typedef BOOL (WINAPI *fInternetAutodial)(DWORD, HWND);
- fInternetAutodial pInternetAutodial = (fInternetAutodial) GetWinInetFunc("InternetAutodial");
- if (!pInternetAutodial) {
- extra->exec_flags->exec_error++;
- return;
- }
-
- EXDLL_INIT();
-
- if (pInternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED , 0))
- pushstring("online");
- else
- pushstring("offline");
-
- FreeWinInet();
-}
-
-NSISFunction(AttemptConnect) {
- typedef DWORD (WINAPI *fAttemptConn)(DWORD);
- fAttemptConn pInternetAttemptConnect = (fAttemptConn) GetWinInetFunc("InternetAttemptConnect");
- if (!pInternetAttemptConnect) {
- extra->exec_flags->exec_error++;
- return;
- }
-
- EXDLL_INIT();
-
- if (pInternetAttemptConnect(0) == ERROR_SUCCESS)
- pushstring("online");
- else
- pushstring("offline");
-
- FreeWinInet();
-}
-
-NSISFunction(GetConnectedState) {
- DWORD dwState;
-
- typedef BOOL (WINAPI *fGetConState)(LPDWORD, DWORD);
- fGetConState pInternetGetConnectedState = (fGetConState) GetWinInetFunc("InternetGetConnectedState");
- if (!pInternetGetConnectedState) {
- extra->exec_flags->exec_error++;
- return;
- }
-
- EXDLL_INIT();
-
- if (pInternetGetConnectedState(&dwState, 0))
- pushstring("online");
- else
- pushstring("offline");
-
- FreeWinInet();
-}
-
-NSISFunction(AutodialHangup) {
- typedef BOOL (WINAPI *fAutodial)(DWORD);
- fAutodial pInternetAutodialHangup = (fAutodial) GetWinInetFunc("InternetAutodialHangup");
- if (!pInternetAutodialHangup) {
- extra->exec_flags->exec_error++;
- return;
- }
-
- EXDLL_INIT();
-
- if (pInternetAutodialHangup(0))
- pushstring("success");
- else
- pushstring("failure");
-
- FreeWinInet();
-}
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <wininet.h>
+
+#include "../ExDLL/exdll.h"
+
+#define NSISFunction(funcname) void __declspec(dllexport) funcname(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
+ return TRUE;
+}
+
+/*************\
+ * LOADER *
+\*************/
+
+HMODULE hWinInet = NULL;
+
+FARPROC GetWinInetFunc(char *func) {
+ hWinInet = LoadLibrary("wininet.dll");
+ if (hWinInet)
+ return GetProcAddress(hWinInet, func);
+ return NULL;
+}
+
+void FreeWinInet() {
+ if (hWinInet)
+ FreeLibrary(hWinInet);
+ hWinInet = NULL;
+}
+
+/*************\
+ * FUNCTIONS *
+\*************/
+
+NSISFunction(AutodialOnline) {
+ typedef BOOL (WINAPI *fInternetAutodial)(DWORD, HWND);
+ fInternetAutodial pInternetAutodial = (fInternetAutodial) GetWinInetFunc("InternetAutodial");
+ if (!pInternetAutodial) {
+ extra->exec_flags->exec_error++;
+ return;
+ }
+
+ EXDLL_INIT();
+
+ if (pInternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE, 0))
+ pushstring("online");
+ else
+ pushstring("offline");
+
+ FreeWinInet();
+}
+
+NSISFunction(AutodialUnattended) {
+ typedef BOOL (WINAPI *fInternetAutodial)(DWORD, HWND);
+ fInternetAutodial pInternetAutodial = (fInternetAutodial) GetWinInetFunc("InternetAutodial");
+ if (!pInternetAutodial) {
+ extra->exec_flags->exec_error++;
+ return;
+ }
+
+ EXDLL_INIT();
+
+ if (pInternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED , 0))
+ pushstring("online");
+ else
+ pushstring("offline");
+
+ FreeWinInet();
+}
+
+NSISFunction(AttemptConnect) {
+ typedef DWORD (WINAPI *fAttemptConn)(DWORD);
+ fAttemptConn pInternetAttemptConnect = (fAttemptConn) GetWinInetFunc("InternetAttemptConnect");
+ if (!pInternetAttemptConnect) {
+ extra->exec_flags->exec_error++;
+ return;
+ }
+
+ EXDLL_INIT();
+
+ if (pInternetAttemptConnect(0) == ERROR_SUCCESS)
+ pushstring("online");
+ else
+ pushstring("offline");
+
+ FreeWinInet();
+}
+
+NSISFunction(GetConnectedState) {
+ DWORD dwState;
+
+ typedef BOOL (WINAPI *fGetConState)(LPDWORD, DWORD);
+ fGetConState pInternetGetConnectedState = (fGetConState) GetWinInetFunc("InternetGetConnectedState");
+ if (!pInternetGetConnectedState) {
+ extra->exec_flags->exec_error++;
+ return;
+ }
+
+ EXDLL_INIT();
+
+ if (pInternetGetConnectedState(&dwState, 0))
+ pushstring("online");
+ else
+ pushstring("offline");
+
+ FreeWinInet();
+}
+
+NSISFunction(AutodialHangup) {
+ typedef BOOL (WINAPI *fAutodial)(DWORD);
+ fAutodial pInternetAutodialHangup = (fAutodial) GetWinInetFunc("InternetAutodialHangup");
+ if (!pInternetAutodialHangup) {
+ extra->exec_flags->exec_error++;
+ return;
+ }
+
+ EXDLL_INIT();
+
+ if (pInternetAutodialHangup(0))
+ pushstring("success");
+ else
+ pushstring("failure");
+
+ FreeWinInet();
+}
diff --git a/Contrib/ExDLL/SConscript b/Contrib/ExDLL/SConscript
index 2c63085..7bee5ab 100755
--- a/Contrib/ExDLL/SConscript
+++ b/Contrib/ExDLL/SConscript
@@ -1,25 +1,25 @@
-# FIXME: install assembly and pascal includes into the correct locations
-
-c_devel = Split("""
- exdll.h
-""")
-
-example = Split("""
- exdll.c
- exdll.dpr
- exdll.dsp
- exdll.dsw
- exdll_with_unit.dpr
- nsis.pas
- extdll.inc
-""")
-
-Import('defenv')
-
-if defenv['PLATFORM'] == 'win32':
- example += c_devel
-else:
- defenv.DistributeIncC(c_devel)
-
-defenv.DistributeExamples(example, path='Plugin')
-
+# FIXME: install assembly and pascal includes into the correct locations
+
+c_devel = Split("""
+ exdll.h
+""")
+
+example = Split("""
+ exdll.c
+ exdll.dpr
+ exdll.dsp
+ exdll.dsw
+ exdll_with_unit.dpr
+ nsis.pas
+ extdll.inc
+""")
+
+Import('defenv')
+
+if defenv['PLATFORM'] == 'win32':
+ example += c_devel
+else:
+ defenv.DistributeIncC(c_devel)
+
+defenv.DistributeExamples(example, path='Plugin')
+
diff --git a/Contrib/ExDLL/exdll.c b/Contrib/ExDLL/exdll.c
index 4d7480e..a999380 100755
--- a/Contrib/ExDLL/exdll.c
+++ b/Contrib/ExDLL/exdll.c
@@ -1,38 +1,38 @@
-#include <windows.h>
-#include "exdll.h"
-
-HINSTANCE g_hInstance;
-
-HWND g_hwndParent;
-
-void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop,
- extra_parameters *extra)
-{
- g_hwndParent=hwndParent;
-
- EXDLL_INIT();
-
-
- // note if you want parameters from the stack, pop them off in order.
- // i.e. if you are called via exdll::myFunction file.dat poop.dat
- // calling popstring() the first time would give you file.dat,
- // and the second time would give you poop.dat.
- // you should empty the stack of your parameters, and ONLY your
- // parameters.
-
- // do your stuff here
- {
- char buf[1024];
- wsprintf(buf,"$0=%s\n",getuservariable(INST_0));
- MessageBox(g_hwndParent,buf,0,MB_OK);
- }
-}
-
-
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- g_hInstance=hInst;
- return TRUE;
-}
+#include <windows.h>
+#include "exdll.h"
+
+HINSTANCE g_hInstance;
+
+HWND g_hwndParent;
+
+void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop,
+ extra_parameters *extra)
+{
+ g_hwndParent=hwndParent;
+
+ EXDLL_INIT();
+
+
+ // note if you want parameters from the stack, pop them off in order.
+ // i.e. if you are called via exdll::myFunction file.dat poop.dat
+ // calling popstring() the first time would give you file.dat,
+ // and the second time would give you poop.dat.
+ // you should empty the stack of your parameters, and ONLY your
+ // parameters.
+
+ // do your stuff here
+ {
+ char buf[1024];
+ wsprintf(buf,"$0=%s\n",getuservariable(INST_0));
+ MessageBox(g_hwndParent,buf,0,MB_OK);
+ }
+}
+
+
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance=hInst;
+ return TRUE;
+}
diff --git a/Contrib/ExDLL/exdll.dpr b/Contrib/ExDLL/exdll.dpr
index ab3f03d..ec70b10 100755
--- a/Contrib/ExDLL/exdll.dpr
+++ b/Contrib/ExDLL/exdll.dpr
@@ -1,118 +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.
+{
+ 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/Contrib/ExDLL/exdll.dsp b/Contrib/ExDLL/exdll.dsp
index 9888726..ddca874 100755
--- a/Contrib/ExDLL/exdll.dsp
+++ b/Contrib/ExDLL/exdll.dsp
@@ -1,111 +1,111 @@
-# 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 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /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 /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 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 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /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 /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=.\exdll.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
+# 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 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /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 /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 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 /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXDLL_EXPORTS" /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 /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=.\exdll.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/Contrib/ExDLL/exdll.dsw b/Contrib/ExDLL/exdll.dsw
index f40ce32..e8a07c1 100755
--- a/Contrib/ExDLL/exdll.dsw
+++ b/Contrib/ExDLL/exdll.dsw
@@ -1,29 +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>
-{{{
-}}}
-
-###############################################################################
-
+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/Contrib/ExDLL/exdll.h b/Contrib/ExDLL/exdll.h
index 9dc224b..661bf17 100755
--- a/Contrib/ExDLL/exdll.h
+++ b/Contrib/ExDLL/exdll.h
@@ -1,128 +1,128 @@
-#ifndef _EXDLL_H_
-#define _EXDLL_H_
-
-#include <windows.h>
-
-#if defined(__GNUC__)
-#define UNUSED __attribute__((unused))
-#else
-#define UNUSED
-#endif
-
-// only include this file from one place in your DLL.
-// (it is all static, if you use it in two places it will fail)
-
-#define EXDLL_INIT() { \
- g_stringsize=string_size; \
- g_stacktop=stacktop; \
- g_variables=variables; }
-
-// For page showing plug-ins
-#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
-#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
-#define NOTIFY_BYE_BYE 'x'
-
-typedef struct _stack_t {
- struct _stack_t *next;
- char text[1]; // this should be the length of string_size
-} stack_t;
-
-
-static unsigned int g_stringsize;
-static stack_t **g_stacktop;
-static char *g_variables;
-
-static int __stdcall popstring(char *str) UNUSED; // 0 on success, 1 on empty stack
-static void __stdcall pushstring(const char *str) UNUSED;
-static char * __stdcall getuservariable(const int varnum) UNUSED;
-static void __stdcall setuservariable(const int varnum, const char *var) UNUSED;
-
-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
-};
-
-typedef struct {
- int autoclose;
- int all_user_var;
- int exec_error;
- int abort;
- int exec_reboot;
- int reboot_called;
- int XXX_cur_insttype; // deprecated
- int XXX_insttype_changed; // deprecated
- int silent;
- int instdir_error;
- int rtl;
- int errlvl;
- int alter_reg_view;
-} exec_flags_type;
-
-typedef struct {
- exec_flags_type *exec_flags;
- int (__stdcall *ExecuteCodeSegment)(int, HWND);
- void (__stdcall *validate_filename)(char *);
-} extra_parameters;
-
-// utility functions (not required but often useful)
-static int __stdcall popstring(char *str)
-{
- stack_t *th;
- if (!g_stacktop || !*g_stacktop) return 1;
- th=(*g_stacktop);
- lstrcpyA(str,th->text);
- *g_stacktop = th->next;
- GlobalFree((HGLOBAL)th);
- return 0;
-}
-
-static void __stdcall pushstring(const char *str)
-{
- stack_t *th;
- if (!g_stacktop) return;
- th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
- lstrcpynA(th->text,str,g_stringsize);
- th->next=*g_stacktop;
- *g_stacktop=th;
-}
-
-static char * __stdcall getuservariable(const int varnum)
-{
- if (varnum < 0 || varnum >= __INST_LAST) return NULL;
- return g_variables+varnum*g_stringsize;
-}
-
-static void __stdcall setuservariable(const int varnum, const char *var)
-{
- if (var != NULL && varnum >= 0 && varnum < __INST_LAST)
- lstrcpyA(g_variables + varnum*g_stringsize, var);
-}
-
-
-
-#endif//_EXDLL_H_
+#ifndef _EXDLL_H_
+#define _EXDLL_H_
+
+#include <windows.h>
+
+#if defined(__GNUC__)
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+
+// only include this file from one place in your DLL.
+// (it is all static, if you use it in two places it will fail)
+
+#define EXDLL_INIT() { \
+ g_stringsize=string_size; \
+ g_stacktop=stacktop; \
+ g_variables=variables; }
+
+// For page showing plug-ins
+#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
+#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
+#define NOTIFY_BYE_BYE 'x'
+
+typedef struct _stack_t {
+ struct _stack_t *next;
+ char text[1]; // this should be the length of string_size
+} stack_t;
+
+
+static unsigned int g_stringsize;
+static stack_t **g_stacktop;
+static char *g_variables;
+
+static int __stdcall popstring(char *str) UNUSED; // 0 on success, 1 on empty stack
+static void __stdcall pushstring(const char *str) UNUSED;
+static char * __stdcall getuservariable(const int varnum) UNUSED;
+static void __stdcall setuservariable(const int varnum, const char *var) UNUSED;
+
+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
+};
+
+typedef struct {
+ int autoclose;
+ int all_user_var;
+ int exec_error;
+ int abort;
+ int exec_reboot;
+ int reboot_called;
+ int XXX_cur_insttype; // deprecated
+ int XXX_insttype_changed; // deprecated
+ int silent;
+ int instdir_error;
+ int rtl;
+ int errlvl;
+ int alter_reg_view;
+} exec_flags_type;
+
+typedef struct {
+ exec_flags_type *exec_flags;
+ int (__stdcall *ExecuteCodeSegment)(int, HWND);
+ void (__stdcall *validate_filename)(char *);
+} extra_parameters;
+
+// utility functions (not required but often useful)
+static int __stdcall popstring(char *str)
+{
+ stack_t *th;
+ if (!g_stacktop || !*g_stacktop) return 1;
+ th=(*g_stacktop);
+ lstrcpyA(str,th->text);
+ *g_stacktop = th->next;
+ GlobalFree((HGLOBAL)th);
+ return 0;
+}
+
+static void __stdcall pushstring(const char *str)
+{
+ stack_t *th;
+ if (!g_stacktop) return;
+ th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
+ lstrcpynA(th->text,str,g_stringsize);
+ th->next=*g_stacktop;
+ *g_stacktop=th;
+}
+
+static char * __stdcall getuservariable(const int varnum)
+{
+ if (varnum < 0 || varnum >= __INST_LAST) return NULL;
+ return g_variables+varnum*g_stringsize;
+}
+
+static void __stdcall setuservariable(const int varnum, const char *var)
+{
+ if (var != NULL && varnum >= 0 && varnum < __INST_LAST)
+ lstrcpyA(g_variables + varnum*g_stringsize, var);
+}
+
+
+
+#endif//_EXDLL_H_
diff --git a/Contrib/ExDLL/exdll_with_unit.dpr b/Contrib/ExDLL/exdll_with_unit.dpr
index 007e350..ad206af 100755
--- a/Contrib/ExDLL/exdll_with_unit.dpr
+++ b/Contrib/ExDLL/exdll_with_unit.dpr
@@ -1,31 +1,31 @@
-{
- NSIS ExDLL2 example
- Original is ExDLL
- (C) 2001 - Peter Windridge
-
- Changed with delphi unit nsis.pas
- by bernhard mayer
-
- Tested in Delphi 7.0
-}
-
-library exdll;
-
-uses
- nsis, windows;
-
-procedure ex_dll(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;
-
-exports ex_dll;
-
-begin
-end.
+{
+ NSIS ExDLL2 example
+ Original is ExDLL
+ (C) 2001 - Peter Windridge
+
+ Changed with delphi unit nsis.pas
+ by bernhard mayer
+
+ Tested in Delphi 7.0
+}
+
+library exdll;
+
+uses
+ nsis, windows;
+
+procedure ex_dll(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;
+
+exports ex_dll;
+
+begin
+end.
diff --git a/Contrib/ExDLL/extdll.inc b/Contrib/ExDLL/extdll.inc
index 4c48ae5..e3b7476 100755
--- a/Contrib/ExDLL/extdll.inc
+++ b/Contrib/ExDLL/extdll.inc
@@ -1,145 +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
+;################################################################
+; 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/Contrib/ExDLL/nsis.pas b/Contrib/ExDLL/nsis.pas
index 356d26c..be80e1b 100755
--- a/Contrib/ExDLL/nsis.pas
+++ b/Contrib/ExDLL/nsis.pas
@@ -1,126 +1,126 @@
-{
- Original Code from
- (C) 2001 - Peter Windridge
-
- Code in seperate 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;
-
-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;
- 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;
-
-procedure Init(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer);
-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);
-begin
- g_stringsize := string_size;
- g_hwndParent := hwndParent;
- g_stacktop := stacktop;
- g_variables := variables;
-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);
-begin
- MessageBox(g_hwndParent, PChar(text), PChar(caption), buttons);
-end;
-
-begin
-end.
+{
+ Original Code from
+ (C) 2001 - Peter Windridge
+
+ Code in seperate 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;
+
+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;
+ 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;
+
+procedure Init(const hwndParent: HWND; const string_size: integer; const variables: PChar; const stacktop: pointer);
+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);
+begin
+ g_stringsize := string_size;
+ g_hwndParent := hwndParent;
+ g_stacktop := stacktop;
+ g_variables := variables;
+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);
+begin
+ MessageBox(g_hwndParent, PChar(text), PChar(caption), buttons);
+end;
+
+begin
+end.
diff --git a/Contrib/Graphics/SConscript b/Contrib/Graphics/SConscript
index 8f6d78d..9154337 100755
--- a/Contrib/Graphics/SConscript
+++ b/Contrib/Graphics/SConscript
@@ -1,86 +1,86 @@
-checks = Split("""
- big.bmp
- classic-cross.bmp
- classic.bmp
- colorful.bmp
- grey-cross.bmp
- grey.bmp
- modern.bmp
- red-round.bmp
- red.bmp
- simple-round.bmp
- simple-round2.bmp
- simple.bmp
-""")
-
-headers = Split("""
- nsis-r.bmp
- nsis.bmp
- orange-nsis.bmp
- orange-r-nsis.bmp
- orange-r.bmp
- orange-uninstall-nsis.bmp
- orange-uninstall-r-nsis.bmp
- orange-uninstall-r.bmp
- orange-uninstall.bmp
- orange.bmp
- win.bmp
-""")
-
-icons = Split("""
- arrow-install.ico
- arrow-uninstall.ico
- arrow2-install.ico
- arrow2-uninstall.ico
- box-install.ico
- box-uninstall.ico
- classic-install.ico
- classic-uninstall.ico
- llama-blue.ico
- llama-grey.ico
- modern-install-blue-full.ico
- modern-install-blue.ico
- modern-install-colorful.ico
- modern-install-full.ico
- modern-install.ico
- modern-uninstall-blue-full.ico
- modern-uninstall-blue.ico
- modern-uninstall-colorful.ico
- modern-uninstall-full.ico
- modern-uninstall.ico
- nsis1-install.ico
- nsis1-uninstall.ico
- orange-install-nsis.ico
- orange-install.ico
- orange-uninstall-nsis.ico
- orange-uninstall.ico
- pixel-install.ico
- pixel-uninstall.ico
- win-install.ico
- win-uninstall.ico
-""")
-
-wizards = Split("""
- arrow.bmp
- llama.bmp
- nsis.bmp
- nullsoft.bmp
- orange-nsis.bmp
- orange-uninstall-nsis.bmp
- orange-uninstall.bmp
- orange.bmp
- win.bmp
-""")
-
-Import('defenv')
-
-def join(prefix, list):
- return map(lambda x: '%s/%s' % (prefix, x), list)
-
-def dist(dir, files):
- defenv.DistributeContrib(join(dir, files), path='Graphics/%s' % dir)
-
-dist('Checks', checks)
-dist('Header', headers)
-dist('Icons', icons)
-dist('Wizard', wizards)
+checks = Split("""
+ big.bmp
+ classic-cross.bmp
+ classic.bmp
+ colorful.bmp
+ grey-cross.bmp
+ grey.bmp
+ modern.bmp
+ red-round.bmp
+ red.bmp
+ simple-round.bmp
+ simple-round2.bmp
+ simple.bmp
+""")
+
+headers = Split("""
+ nsis-r.bmp
+ nsis.bmp
+ orange-nsis.bmp
+ orange-r-nsis.bmp
+ orange-r.bmp
+ orange-uninstall-nsis.bmp
+ orange-uninstall-r-nsis.bmp
+ orange-uninstall-r.bmp
+ orange-uninstall.bmp
+ orange.bmp
+ win.bmp
+""")
+
+icons = Split("""
+ arrow-install.ico
+ arrow-uninstall.ico
+ arrow2-install.ico
+ arrow2-uninstall.ico
+ box-install.ico
+ box-uninstall.ico
+ classic-install.ico
+ classic-uninstall.ico
+ llama-blue.ico
+ llama-grey.ico
+ modern-install-blue-full.ico
+ modern-install-blue.ico
+ modern-install-colorful.ico
+ modern-install-full.ico
+ modern-install.ico
+ modern-uninstall-blue-full.ico
+ modern-uninstall-blue.ico
+ modern-uninstall-colorful.ico
+ modern-uninstall-full.ico
+ modern-uninstall.ico
+ nsis1-install.ico
+ nsis1-uninstall.ico
+ orange-install-nsis.ico
+ orange-install.ico
+ orange-uninstall-nsis.ico
+ orange-uninstall.ico
+ pixel-install.ico
+ pixel-uninstall.ico
+ win-install.ico
+ win-uninstall.ico
+""")
+
+wizards = Split("""
+ arrow.bmp
+ llama.bmp
+ nsis.bmp
+ nullsoft.bmp
+ orange-nsis.bmp
+ orange-uninstall-nsis.bmp
+ orange-uninstall.bmp
+ orange.bmp
+ win.bmp
+""")
+
+Import('defenv')
+
+def join(prefix, list):
+ return map(lambda x: '%s/%s' % (prefix, x), list)
+
+def dist(dir, files):
+ defenv.DistributeContrib(join(dir, files), path='Graphics/%s' % dir)
+
+dist('Checks', checks)
+dist('Header', headers)
+dist('Icons', icons)
+dist('Wizard', wizards)
diff --git a/Contrib/InstallOptions/Changelog.txt b/Contrib/InstallOptions/Changelog.txt
index 8df09ca..27e6952 100755
--- a/Contrib/InstallOptions/Changelog.txt
+++ b/Contrib/InstallOptions/Changelog.txt
@@ -1,144 +1,144 @@
-DLL version 2.47 (4/27/2007)
-* Line breaks support in Link control
-* Added HLine and VLine controls
-
-DLL version 2.46 (3/31/2007)
-* Use installer's name for message boxes
-
-DLL version 2.45 (1/23/2007)
-* Added FOCUS flag for setting focus to a control other than the first
-
-DLL version 2.44 (10/11/2005)
-* Added HWND and HWND2 entries to the INI file to avoid messy calculations of the correct control id
-
-DLL version 2.43 (10/4/2005)
-* Fixed alteration of the working directory by FileRequest
-* Added WS_EX_LEFTSCROLLBAR in RTL mode
-
-DLL version 2.42 (1/21/2005)
-* Added TRANSPARENT flag for BITMAP fields (funded by Chris Morgan)
-
-DLL version 2.41 (8/5/2004)
-* Bitmaps are now automatically centered
-* Fixed a bug which prevented enabling the next button from the leave function of InstallOptions pages
-* Fixed a rare freeze
-
-DLL version 2.4 (1/4/2004)
-* Initial focus is set in "initDialog" making it possible to override it from NSIS prior to calling "show"
-* When initial focus is to a Text field InstallOptions now follows standard Windows behaviour by having the text selected
-* Label and other static fields no longer have State= written to the INI file when leaving the dialog
-* NOTIFY flag can now be used with Link fields (State should be omitted in this case)
-* Likewise, State can now be used with Button fields (behaves the same as with Link fields)
-* NOTIFY flag can also now be used with ListBox and DropList fields to have NSIS notified when the selection changes
-* Meaning of RIGHT flag is now reversed in right-to-left language mode
-* HSCROLL and VSCROLL flags are no longer restricted to Text fields
-* Various Link field fixes
-
-DLL version 2.3 (12/4/2003)
-* Added new control type "Button"
-* Added new flag "NOTIFY"
-* Added new flag "NOWORDWRAP" for multi-line text boxes
-* Reduced size down to 12K
-* Better RTL support
-
-DLL version 2.2 (6/10/2003)
-* Added New control type LINK
-* \r\n converts to newline in Multiline edit box
-* Support for multiline edit box
-* Better tab order in DirRequest and FileRequest
-* Added READONLY option to text box
-* Minor fixes
-
-DLL version 2.1 (3/15/2003)
-* \r\n converts to newline in both label Text and ValidateText
-* New browse dialog style (modern)
-* Word wrapping for check boxes and radio buttons
-* No ugly border for edit fields under XP
-* Scroll bar for list boxes
-* Works with SetStaticBkColor
-* DISABLED dir and file request fields now disable the browse button too
-* No more STATE value for labels
-* Minor fixes
-
-DLL version 2.0 (1/4/2003)
-* Supports custom font and DPI settings (by Joost Verburg)
-* INI files should contain dialog units now, no pixels (by Joost Verburg)
-* RESIZETOFIT flag for Bitmap control (by Amir Szekely)
-* New documentation (by Joost Verburg)
-* New GROUP/NOTABSTOP/DISABLED flags
-
-DLL version 1.7 beta (11/2/2002)
-* Added initDialog and show DLL functions
-
-DLL version 1.6 beta (9/30/2002)
-* CancelConfirmIcon becomes CancelConfirmFlags and can now take the other common MessageBox flags
-
-DLL version 1.5 beta (9/26/2002)
-* Made close [x] button behave like Cancel (thanks brainsucker)
-
-DLL version 1.4 beta (9/4/2002)
-* Added Icon and Bitmap controls (by Amir Szekely)
-
-DLL version 1.3 beta (8/15/2002)
-* Added CancelShow (by ORTIM)
-* Added pixel transformation for widgets (by ORTIM)
-
-DLL version 1.2 beta (7/31/2002)
-* Added CancelEnabled (by ORTIM)
-* Added CancelConfirmCaption and CancelConfirmIcon (by Amir Szekely)
-
-DLL version 1.1 beta (7/22/2002)
-* Font is now taken from the main NSIS window (by Amir Szekely)
-
-DLL version 1.0 beta (12/16/2001)
-* Moved to DLL, no longer need parentwnd ini writing
-* Tons of changes - no longer fully compatible (see source for a big list)
-* removed support for silent installers (it seems the old version would bring up it's own dialog)
-
-version 1.4 (11/18/2001)
-* Added Listbox controls.
-* Added MULTISELECT flag.
-* Made the HWND list for the parent window controls dynamically allocated. This prevents a crash if NSIS ever gets more than 150 controls on it's main window.
-* The TEXT property of DirRequest control can be used to specify an initial directory. The current directory is automatically selected when clicking the browse button of the DirRequest control.
-* Added ROOT property to DirRequest which can be used to set the root directory (mostly due to felfert)
-* Edit controls will now auto scroll (thanks felfert)
-* Fixed a problem where the window wouldn't draw properly on some systems (thanks felfert)
-
-version 1.3 (11/03/2001)
-* Got rid of the call to RedrawWindow() because it's no longer needed with the WS_CLIPCHILDREN flag for NSIS.
-* Removed a few hardcoded limits of buffer sizes
-* Added Checkbox and RadioButton controls
-* Added RIGHT and CHECKED flags
-
-version 1.2.2 (10/30/2001)
-* Additional size reductions. Further reduced the size down to 8k.
-* The text parameter to a combobox can now be used to specify the initial value
-* Changed from InvalidateRect() to RedrawWindow() to force a redraw after a browse dialog
-* On startup, set the flags of the NSIS window to include WS_CLIPCHILDREN. Otherwise, our controls don't get drawn right.
-
-version 1.2.1 (10/28/2001)
-* Bug fix. ControlID for the caption and the OK button were reused by the first two controls. (Thanks Schultz)
-
-version 1.2j (10/28/2001)
-* 8.5kb from 44kb. heh. (by Justin Frankel)
-
-version 1.2 (10/28/2001)
-* Still 44k
-* Added the "FileRequest" and "DirRequest" control types (thanks Schultz)
-* Added "MinLen", "MaxLen", and "ValidateText" properties to fields
-* Added "Flags" as a way to specify additional parameters for controls
-* Few more changes to the documentation
-* Cleaned the code in a few places...still trying to make it smaller
-
-version 1.1 (10/27/2001)
-* Added the "Title" option (thanks Alex)
-* Moved the OK button so it is in the same location as the buttons on the main NSIS window (thanks Alex)
-* Pressing "ENTER" will now automatically select the OK button (thanks Alex)
-* Slightly improved the documentation
-
-version 1.01 (10/25/2001)
-* Fixed the SetFocus loop so it exits after the first control like it was supposed to
-* Added the license to the documentation
-
-version 1.0 (10/25/2001)
-* Barely qualifies as a distribution
+DLL version 2.47 (4/27/2007)
+* Line breaks support in Link control
+* Added HLine and VLine controls
+
+DLL version 2.46 (3/31/2007)
+* Use installer's name for message boxes
+
+DLL version 2.45 (1/23/2007)
+* Added FOCUS flag for setting focus to a control other than the first
+
+DLL version 2.44 (10/11/2005)
+* Added HWND and HWND2 entries to the INI file to avoid messy calculations of the correct control id
+
+DLL version 2.43 (10/4/2005)
+* Fixed alteration of the working directory by FileRequest
+* Added WS_EX_LEFTSCROLLBAR in RTL mode
+
+DLL version 2.42 (1/21/2005)
+* Added TRANSPARENT flag for BITMAP fields (funded by Chris Morgan)
+
+DLL version 2.41 (8/5/2004)
+* Bitmaps are now automatically centered
+* Fixed a bug which prevented enabling the next button from the leave function of InstallOptions pages
+* Fixed a rare freeze
+
+DLL version 2.4 (1/4/2004)
+* Initial focus is set in "initDialog" making it possible to override it from NSIS prior to calling "show"
+* When initial focus is to a Text field InstallOptions now follows standard Windows behaviour by having the text selected
+* Label and other static fields no longer have State= written to the INI file when leaving the dialog
+* NOTIFY flag can now be used with Link fields (State should be omitted in this case)
+* Likewise, State can now be used with Button fields (behaves the same as with Link fields)
+* NOTIFY flag can also now be used with ListBox and DropList fields to have NSIS notified when the selection changes
+* Meaning of RIGHT flag is now reversed in right-to-left language mode
+* HSCROLL and VSCROLL flags are no longer restricted to Text fields
+* Various Link field fixes
+
+DLL version 2.3 (12/4/2003)
+* Added new control type "Button"
+* Added new flag "NOTIFY"
+* Added new flag "NOWORDWRAP" for multi-line text boxes
+* Reduced size down to 12K
+* Better RTL support
+
+DLL version 2.2 (6/10/2003)
+* Added New control type LINK
+* \r\n converts to newline in Multiline edit box
+* Support for multiline edit box
+* Better tab order in DirRequest and FileRequest
+* Added READONLY option to text box
+* Minor fixes
+
+DLL version 2.1 (3/15/2003)
+* \r\n converts to newline in both label Text and ValidateText
+* New browse dialog style (modern)
+* Word wrapping for check boxes and radio buttons
+* No ugly border for edit fields under XP
+* Scroll bar for list boxes
+* Works with SetStaticBkColor
+* DISABLED dir and file request fields now disable the browse button too
+* No more STATE value for labels
+* Minor fixes
+
+DLL version 2.0 (1/4/2003)
+* Supports custom font and DPI settings (by Joost Verburg)
+* INI files should contain dialog units now, no pixels (by Joost Verburg)
+* RESIZETOFIT flag for Bitmap control (by Amir Szekely)
+* New documentation (by Joost Verburg)
+* New GROUP/NOTABSTOP/DISABLED flags
+
+DLL version 1.7 beta (11/2/2002)
+* Added initDialog and show DLL functions
+
+DLL version 1.6 beta (9/30/2002)
+* CancelConfirmIcon becomes CancelConfirmFlags and can now take the other common MessageBox flags
+
+DLL version 1.5 beta (9/26/2002)
+* Made close [x] button behave like Cancel (thanks brainsucker)
+
+DLL version 1.4 beta (9/4/2002)
+* Added Icon and Bitmap controls (by Amir Szekely)
+
+DLL version 1.3 beta (8/15/2002)
+* Added CancelShow (by ORTIM)
+* Added pixel transformation for widgets (by ORTIM)
+
+DLL version 1.2 beta (7/31/2002)
+* Added CancelEnabled (by ORTIM)
+* Added CancelConfirmCaption and CancelConfirmIcon (by Amir Szekely)
+
+DLL version 1.1 beta (7/22/2002)
+* Font is now taken from the main NSIS window (by Amir Szekely)
+
+DLL version 1.0 beta (12/16/2001)
+* Moved to DLL, no longer need parentwnd ini writing
+* Tons of changes - no longer fully compatible (see source for a big list)
+* removed support for silent installers (it seems the old version would bring up it's own dialog)
+
+version 1.4 (11/18/2001)
+* Added Listbox controls.
+* Added MULTISELECT flag.
+* Made the HWND list for the parent window controls dynamically allocated. This prevents a crash if NSIS ever gets more than 150 controls on it's main window.
+* The TEXT property of DirRequest control can be used to specify an initial directory. The current directory is automatically selected when clicking the browse button of the DirRequest control.
+* Added ROOT property to DirRequest which can be used to set the root directory (mostly due to felfert)
+* Edit controls will now auto scroll (thanks felfert)
+* Fixed a problem where the window wouldn't draw properly on some systems (thanks felfert)
+
+version 1.3 (11/03/2001)
+* Got rid of the call to RedrawWindow() because it's no longer needed with the WS_CLIPCHILDREN flag for NSIS.
+* Removed a few hardcoded limits of buffer sizes
+* Added Checkbox and RadioButton controls
+* Added RIGHT and CHECKED flags
+
+version 1.2.2 (10/30/2001)
+* Additional size reductions. Further reduced the size down to 8k.
+* The text parameter to a combobox can now be used to specify the initial value
+* Changed from InvalidateRect() to RedrawWindow() to force a redraw after a browse dialog
+* On startup, set the flags of the NSIS window to include WS_CLIPCHILDREN. Otherwise, our controls don't get drawn right.
+
+version 1.2.1 (10/28/2001)
+* Bug fix. ControlID for the caption and the OK button were reused by the first two controls. (Thanks Schultz)
+
+version 1.2j (10/28/2001)
+* 8.5kb from 44kb. heh. (by Justin Frankel)
+
+version 1.2 (10/28/2001)
+* Still 44k
+* Added the "FileRequest" and "DirRequest" control types (thanks Schultz)
+* Added "MinLen", "MaxLen", and "ValidateText" properties to fields
+* Added "Flags" as a way to specify additional parameters for controls
+* Few more changes to the documentation
+* Cleaned the code in a few places...still trying to make it smaller
+
+version 1.1 (10/27/2001)
+* Added the "Title" option (thanks Alex)
+* Moved the OK button so it is in the same location as the buttons on the main NSIS window (thanks Alex)
+* Pressing "ENTER" will now automatically select the OK button (thanks Alex)
+* Slightly improved the documentation
+
+version 1.01 (10/25/2001)
+* Fixed the SetFocus loop so it exits after the first control like it was supposed to
+* Added the license to the documentation
+
+version 1.0 (10/25/2001)
+* Barely qualifies as a distribution
diff --git a/Contrib/InstallOptions/InstallOptions.nsh b/Contrib/InstallOptions/InstallOptions.nsh
index 56d47af..660b303 100755
--- a/Contrib/InstallOptions/InstallOptions.nsh
+++ b/Contrib/InstallOptions/InstallOptions.nsh
@@ -1,240 +1,240 @@
-/*
-
-InstallOptions.nsh
-Macros and conversion functions for InstallOptions
-
-*/
-
-!ifndef ___NSIS__INSTALL_OPTIONS__NSH___
-!define ___NSIS__INSTALL_OPTIONS__NSH___
-
-!include LogicLib.nsh
-
-!macro INSTALLOPTIONS_FUNCTION_READ_CONVERT
- !insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS ""
-!macroend
-
-!macro INSTALLOPTIONS_UNFUNCTION_READ_CONVERT
- !insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS un.
-!macroend
-
-!macro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
- !insertmacro INSTALLOPTIONS_FUNCTION_NSIS2IO ""
-!macroend
-
-!macro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
- !insertmacro INSTALLOPTIONS_FUNCTION_NSIS2IO un.
-!macroend
-
-!macro INSTALLOPTIONS_FUNCTION_NSIS2IO UNINSTALLER_FUNCPREFIX
-
- ; Convert an NSIS string to a form suitable for use by InstallOptions
- ; Usage:
- ; Push <NSIS-string>
- ; Call Nsis2Io
- ; Pop <IO-string>
-
- Function ${UNINSTALLER_FUNCPREFIX}Nsis2Io
-
- Exch $0 ; The source
- Push $1 ; The output
- Push $2 ; Temporary char
- Push $3 ; Length
- Push $4 ; Loop index
- StrCpy $1 "" ; Initialise the output
-
- StrLen $3 $0
- IntOp $3 $3 - 1
-
- ${For} $4 0 $3
- StrCpy $2 $0 1 $4
- ${If} $2 == '\'
- StrCpy $2 '\\'
- ${ElseIf} $2 == '$\r'
- StrCpy $2 '\r'
- ${ElseIf} $2 == '$\n'
- StrCpy $2 '\n'
- ${ElseIf} $2 == '$\t'
- StrCpy $2 '\t'
- ${EndIf}
- StrCpy $1 $1$2
- ${Next}
-
- StrCpy $0 $1
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
-
- FunctionEnd
-
-!macroend
-
-!macro INSTALLOPTIONS_FUNCTION_IO2NSIS UNINSTALLER_FUNCPREFIX
-
- ; Convert an InstallOptions string to a form suitable for use by NSIS
- ; Usage:
- ; Push <IO-string>
- ; Call Io2Nsis
- ; Pop <NSIS-string>
-
- Function ${UNINSTALLER_FUNCPREFIX}Io2Nsis
-
- Exch $0 ; The source
- Push $1 ; The output
- Push $2 ; Temporary char
- Push $3 ; Length
- Push $4 ; Loop index
- StrCpy $1 "" ; Initialise the output
-
- StrLen $3 $0
- IntOp $3 $3 - 1
-
- ${For} $4 0 $3
- StrCpy $2 $0 2 $4
- ${If} $2 == '\\'
- StrCpy $2 '\'
- IntOp $4 $4 + 1
- ${ElseIf} $2 == '\r'
- StrCpy $2 '$\r'
- IntOp $4 $4 + 1
- ${ElseIf} $2 == '\n'
- StrCpy $2 '$\n'
- IntOp $4 $4 + 1
- ${ElseIf} $2 == '\t'
- StrCpy $2 '$\t'
- IntOp $4 $4 + 1
- ${EndIf}
- StrCpy $2 $2 1
- StrCpy $1 $1$2
- ${Next}
-
- StrCpy $0 $1
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
-
- FunctionEnd
-
-!macroend
-
-!macro INSTALLOPTIONS_EXTRACT FILE
-
- InitPluginsDir
- File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
- !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "Settings" "RTL" "$(^RTL)"
-
- !verbose pop
-
-!macroend
-
-!macro INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
-
- InitPluginsDir
- File "/oname=$PLUGINSDIR\${FILENAME}" "${FILE}"
- !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 /NOUNLOAD "$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___
+/*
+
+InstallOptions.nsh
+Macros and conversion functions for InstallOptions
+
+*/
+
+!ifndef ___NSIS__INSTALL_OPTIONS__NSH___
+!define ___NSIS__INSTALL_OPTIONS__NSH___
+
+!include LogicLib.nsh
+
+!macro INSTALLOPTIONS_FUNCTION_READ_CONVERT
+ !insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS ""
+!macroend
+
+!macro INSTALLOPTIONS_UNFUNCTION_READ_CONVERT
+ !insertmacro INSTALLOPTIONS_FUNCTION_IO2NSIS un.
+!macroend
+
+!macro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
+ !insertmacro INSTALLOPTIONS_FUNCTION_NSIS2IO ""
+!macroend
+
+!macro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
+ !insertmacro INSTALLOPTIONS_FUNCTION_NSIS2IO un.
+!macroend
+
+!macro INSTALLOPTIONS_FUNCTION_NSIS2IO UNINSTALLER_FUNCPREFIX
+
+ ; Convert an NSIS string to a form suitable for use by InstallOptions
+ ; Usage:
+ ; Push <NSIS-string>
+ ; Call Nsis2Io
+ ; Pop <IO-string>
+
+ Function ${UNINSTALLER_FUNCPREFIX}Nsis2Io
+
+ Exch $0 ; The source
+ Push $1 ; The output
+ Push $2 ; Temporary char
+ Push $3 ; Length
+ Push $4 ; Loop index
+ StrCpy $1 "" ; Initialise the output
+
+ StrLen $3 $0
+ IntOp $3 $3 - 1
+
+ ${For} $4 0 $3
+ StrCpy $2 $0 1 $4
+ ${If} $2 == '\'
+ StrCpy $2 '\\'
+ ${ElseIf} $2 == '$\r'
+ StrCpy $2 '\r'
+ ${ElseIf} $2 == '$\n'
+ StrCpy $2 '\n'
+ ${ElseIf} $2 == '$\t'
+ StrCpy $2 '\t'
+ ${EndIf}
+ StrCpy $1 $1$2
+ ${Next}
+
+ StrCpy $0 $1
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ FunctionEnd
+
+!macroend
+
+!macro INSTALLOPTIONS_FUNCTION_IO2NSIS UNINSTALLER_FUNCPREFIX
+
+ ; Convert an InstallOptions string to a form suitable for use by NSIS
+ ; Usage:
+ ; Push <IO-string>
+ ; Call Io2Nsis
+ ; Pop <NSIS-string>
+
+ Function ${UNINSTALLER_FUNCPREFIX}Io2Nsis
+
+ Exch $0 ; The source
+ Push $1 ; The output
+ Push $2 ; Temporary char
+ Push $3 ; Length
+ Push $4 ; Loop index
+ StrCpy $1 "" ; Initialise the output
+
+ StrLen $3 $0
+ IntOp $3 $3 - 1
+
+ ${For} $4 0 $3
+ StrCpy $2 $0 2 $4
+ ${If} $2 == '\\'
+ StrCpy $2 '\'
+ IntOp $4 $4 + 1
+ ${ElseIf} $2 == '\r'
+ StrCpy $2 '$\r'
+ IntOp $4 $4 + 1
+ ${ElseIf} $2 == '\n'
+ StrCpy $2 '$\n'
+ IntOp $4 $4 + 1
+ ${ElseIf} $2 == '\t'
+ StrCpy $2 '$\t'
+ IntOp $4 $4 + 1
+ ${EndIf}
+ StrCpy $2 $2 1
+ StrCpy $1 $1$2
+ ${Next}
+
+ StrCpy $0 $1
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+
+ FunctionEnd
+
+!macroend
+
+!macro INSTALLOPTIONS_EXTRACT FILE
+
+ InitPluginsDir
+ File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
+ !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "Settings" "RTL" "$(^RTL)"
+
+ !verbose pop
+
+!macroend
+
+!macro INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
+
+ InitPluginsDir
+ File "/oname=$PLUGINSDIR\${FILENAME}" "${FILE}"
+ !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 /NOUNLOAD "$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/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp
index b613b6a..b4f42f7 100755
--- a/Contrib/InstallOptions/InstallerOptions.cpp
+++ b/Contrib/InstallOptions/InstallerOptions.cpp
@@ -1,1628 +1,1628 @@
-/*********************************************************
- *
- * InstallOptions version 2.0 - Plugin for custom pages
- *
- * See Readme.html for documentation and license
- *
- *********************************************************/
-
-#include <windows.h>
-#include <windowsx.h>
-#include <shlobj.h>
-#include <commdlg.h>
-#include <cderr.h>
-#include "resource.h"
-#include "shellapi.h"
-
-#define popstring dontuseme
-#include "../ExDLL/exdll.h"
-#undef popstring
-
-// Use for functions only called from one place to possibly reduce some code
-// size. Allows the source code to remain readable by leaving the function
-// intact.
-#ifdef _MSC_VER
-#define INLINE __forceinline
-#else
-#define INLINE inline
-#endif
-
-void *WINAPI MALLOC(int len) { return (void*)GlobalAlloc(GPTR,len); }
-void WINAPI FREE(void *d) { if (d) GlobalFree((HGLOBAL)d); }
-
-void WINAPI popstring(char *str)
-{
- if (g_stacktop && *g_stacktop)
- {
- stack_t *th = *g_stacktop;
- *g_stacktop = th->next;
- if (str)
- lstrcpy(str, th->text);
- FREE(th);
- }
-}
-
-#define strcpy(x,y) lstrcpy(x,y)
-//#define strncpy(x,y,z) lstrcpyn(x,y,z)
-#define strdup(x) STRDUP(x)
-#define stricmp(x,y) lstrcmpi(x,y)
-//#define abs(x) ((x) < 0 ? -(x) : (x))
-
-char *WINAPI STRDUP(const char *c)
-{
- char *t=(char*)MALLOC(lstrlen(c)+1);
- return lstrcpy(t,c);
-}
-
-// Turn a pair of chars into a word
-// Turn four chars into a dword
-#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
-#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
-#else
-#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
-#endif
-
-// Field types
-// NB - the order of this list is important - see below
-
-#define FIELD_INVALID (0)
-#define FIELD_HLINE (1)
-#define FIELD_VLINE (2)
-#define FIELD_LABEL (3)
-#define FIELD_ICON (4)
-#define FIELD_BITMAP (5)
-#define FIELD_BROWSEBUTTON (6)
-#define FIELD_LINK (7)
-#define FIELD_BUTTON (8)
-#define FIELD_GROUPBOX (9)
-#define FIELD_CHECKBOX (10)
-#define FIELD_RADIOBUTTON (11)
-#define FIELD_TEXT (12)
-#define FIELD_FILEREQUEST (13)
-#define FIELD_DIRREQUEST (14)
-#define FIELD_COMBOBOX (15)
-#define FIELD_LISTBOX (16)
-
-#define FIELD_SETFOCUS FIELD_CHECKBOX // First field that qualifies for having the initial keyboard focus
-#define FIELD_CHECKLEN FIELD_TEXT // First field to have length of state value checked against MinLen/MaxLen
-
-//---------------------------------------------------------------------
-// settings
-#define IO_ENABLE_LINK
-
-//#define IO_LINK_UNDERLINED // Uncomment to show links text underlined
-//---------------------------------------------------------------------
-
-// Flags
-
-// LBS_NOTIFY 0x00000001 // LISTBOX/CHECKBOX/RADIOBUTTON/BUTTON/LINK - Notify NSIS script when control is "activated" (exact meaning depends on the type of control)
-// OFN_OVERWRITEPROMPT 0x00000002 // FILEREQUEST
-// OFN_HIDEREADONLY 0x00000004 // FILEREQUEST
-// LBS_MULTIPLESEL 0x00000008 // LISTBOX
-#define FLAG_READONLY 0x00000010 // TEXT/FILEREQUEST/DIRREQUEST
-// BS_LEFTTEXT 0x00000020 // CHECKBOX/RADIOBUTTON
-#define TRANSPARENT_BMP 0x00000020 // BITMAP
-#define FLAG_PASSWORD 0x00000040 // TEXT/FILEREQUEST/DIRREQUEST
-#define FLAG_ONLYNUMBERS 0x00000080 // TEXT/FILEREQUEST/DIRREQUEST
-#define FLAG_MULTILINE 0x00000100 // TEXT/FILEREQUEST/DIRREQUEST
-#define FLAG_NOWORDWRAP 0x00000200 // TEXT/FILEREQUEST/DIRREQUEST - Disable word-wrap in multi-line text boxes
-#define FLAG_WANTRETURN 0x00000400 // TEXT/FILEREQUEST/DIRREQUEST
-// LBS_EXTENDEDSEL 0x00000800 // LISTBOX
-// OFN_PATHMUSTEXIST 0x00000800 // FILEREQUEST
-// OFN_FILEMUSTEXIST 0x00001000 // FILEREQUEST
-// OFN_CREATEPROMPT 0x00002000 // FILEREQUEST
-#define FLAG_DROPLIST 0x00004000 // COMBOBOX
-#define FLAG_RESIZETOFIT 0x00008000 // BITMAP
-// WS_TABSTOP 0x00010000 // *ALL*
-// WS_GROUP 0x00020000 // *ALL*
-#define FLAG_SAVEAS 0x00040000 // FILEREQUEST - Show "Save As" instead of "Open" for FileRequest field
-// OFN_EXPLORER 0x00080000 // FILEREQUEST
-// WS_HSCROLL 0x00100000 // *ALL*
-// WS_VSCROLL 0x00200000 // *ALL*
-// WS_DISABLED 0x08000000 // *ALL*
-#define FLAG_FOCUS 0x10000000 // Controls that can receive focus
-
-struct TableEntry {
- char *pszName;
- int nValue;
-};
-
-int WINAPI LookupToken(TableEntry*, char*);
-int WINAPI LookupTokens(TableEntry*, char*);
-
-void WINAPI ConvertNewLines(char *str);
-
-// all allocated buffers must be first in the struct
-// when adding more allocated buffers to FieldType, don't forget to change this define
-#define FIELD_BUFFERS 6
-struct FieldType {
- char *pszText;
- char *pszState;
- char *pszRoot;
-
- char *pszListItems;
- char *pszFilter;
-
- char *pszValidateText;
- int nMinLength;
- int nMaxLength;
-
- int nType;
- RECT rect;
-
- int nFlags;
-
- HWND hwnd;
- UINT nControlID;
-
- int nParentIdx; // this is used to store original windowproc for LINK
- HANDLE hImage; // this is used by image/icon field to save the handle to the image
-
- int nField; // field number in INI file
- char *pszHwndEntry; // "HWND" or "HWND2"
-
- long wndProc;
-};
-
-// initial buffer size. buffers will grow as required.
-// use a value larger than MAX_PATH to prevent need for excessive growing.
-#define BUFFER_SIZE 8192 // 8kb of mem is max char count in multiedit
-
-char szBrowseButtonCaption[] = "...";
-
-HWND hConfigWindow = NULL;
-HWND hMainWindow = NULL;
-HWND hCancelButton = NULL;
-HWND hNextButton = NULL;
-HWND hBackButton = NULL;
-
-HINSTANCE m_hInstance = NULL;
-
-struct _stack_t *pFilenameStackEntry = NULL;
-
-char *pszFilename = NULL;
-char *pszTitle = NULL;
-char *pszCancelButtonText = NULL;
-char *pszNextButtonText = NULL;
-char *pszBackButtonText = NULL;
-
-int bBackEnabled = FALSE;
-int bCancelEnabled = FALSE; // by ORTIM: 13-August-2002
-int bCancelShow = FALSE; // by ORTIM: 13-August-2002
-
-int bRTL = FALSE;
-
-FieldType *pFields = NULL;
-#define DEFAULT_RECT 1018
-int nRectId = 0;
-int nNumFields = 0;
-int g_done;
-int g_NotifyField; // Field number of notifying control
-
-int WINAPI FindControlIdx(UINT id)
-{
- for (int nIdx = 0; nIdx < nNumFields; nIdx++)
- if (id == pFields[nIdx].nControlID)
- return nIdx;
- return -1;
-}
-
-LRESULT WINAPI mySendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
-{
- return SendMessage(hWnd, Msg, wParam, lParam);
-}
-
-void WINAPI mySetFocus(HWND hWnd)
-{
- mySendMessage(hMainWindow, WM_NEXTDLGCTL, (WPARAM)hWnd, TRUE);
-}
-
-void WINAPI mySetWindowText(HWND hWnd, LPCTSTR pszText)
-{
- if (pszText)
- SetWindowText(hWnd, pszText);
-}
-
-int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) {
- static TCHAR szDir[MAX_PATH];
-
- if (uMsg == BFFM_INITIALIZED &&
- GetWindowText(pFields[(int)pData].hwnd, szDir, MAX_PATH) > 0)
- mySendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)szDir);
- return 0;
-}
-
-
-bool INLINE ValidateFields() {
- int nIdx;
- int nLength;
-
- // In the unlikely event we can't allocate memory, go ahead and return true so we can get out of here.
- // May cause problems for the install script, but no memory is problems for us.
- for (nIdx = 0; nIdx < nNumFields; nIdx++) {
- FieldType *pField = pFields + nIdx;
- // this if statement prevents a stupid bug where a min/max length is assigned to a label control
- // where the user obviously has no way of changing what is displayed. (can you say, "infinite loop"?)
- if (pField->nType >= FIELD_CHECKLEN) {
- nLength = mySendMessage(pField->hwnd, WM_GETTEXTLENGTH, 0, 0);
-
- if (((pField->nMaxLength > 0) && (nLength > pField->nMaxLength)) ||
- ((pField->nMinLength > 0) && (nLength < pField->nMinLength))) {
- if (pField->pszValidateText) {
- char szTitle[1024];
- GetWindowText(hMainWindow, szTitle, sizeof(szTitle));
- MessageBox(hConfigWindow, pField->pszValidateText, szTitle, MB_OK|MB_ICONWARNING);
- }
- mySetFocus(pField->hwnd);
- return false;
- }
-
- }
- }
- return true;
-}
-
-bool WINAPI SaveSettings(void) {
- static char szField[25];
- int nBufLen = BUFFER_SIZE;
- char *pszBuffer = (char*)MALLOC(nBufLen);
- if (!pszBuffer) return false;
-
- int nIdx;
- int CurrField;
- for (nIdx = 0, CurrField = 1; nIdx < nNumFields; nIdx++, CurrField++) {
- FieldType *pField = pFields + nIdx;
- HWND hwnd = pField->hwnd;
- switch (pField->nType) {
- case FIELD_BROWSEBUTTON:
- if (g_NotifyField > CurrField)
- --g_NotifyField;
- --CurrField;
- default:
- continue;
-
- case FIELD_CHECKBOX:
- case FIELD_RADIOBUTTON:
- wsprintf(pszBuffer, "%d", !!mySendMessage(hwnd, BM_GETCHECK, 0, 0));
- break;
-
- case FIELD_LISTBOX:
- {
- // Ok, this one requires a bit of work.
- // First, we allocate a buffer long enough to hold every item.
- // Then, we loop through every item and if it's selected we add it to our buffer.
- // If there is already an item in the list, then we prepend a | character before the new item.
- // We could simplify for single-select boxes, but using one piece of code saves some space.
- int nLength = lstrlen(pField->pszListItems) + 10;
- if (nLength > nBufLen) {
- FREE(pszBuffer);
- nBufLen = nLength;
- pszBuffer = (char*)MALLOC(nBufLen);
- if (!pszBuffer) return false;
- }
- char *pszItem = (char*)MALLOC(nBufLen);
- if (!pszItem) return false;
-
- *pszBuffer = '\0';
- int nNumItems = mySendMessage(hwnd, LB_GETCOUNT, 0, 0);
- for (int nIdx2 = 0; nIdx2 < nNumItems; nIdx2++) {
- if (mySendMessage(hwnd, LB_GETSEL, nIdx2, 0) > 0) {
- if (*pszBuffer) lstrcat(pszBuffer, "|");
- mySendMessage(hwnd, LB_GETTEXT, (WPARAM)nIdx2, (LPARAM)pszItem);
- lstrcat(pszBuffer, pszItem);
- }
- }
-
- FREE(pszItem);
- break;
- }
-
- case FIELD_TEXT:
- case FIELD_FILEREQUEST:
- case FIELD_DIRREQUEST:
- case FIELD_COMBOBOX:
- {
- int nLength = mySendMessage(pField->hwnd, WM_GETTEXTLENGTH, 0, 0);
- if (nLength > nBufLen) {
- FREE(pszBuffer);
- // add a bit extra so we do this less often
- nBufLen = nLength + 20;
- pszBuffer = (char*)MALLOC(nBufLen);
- if (!pszBuffer) return false;
- }
- *pszBuffer='"';
- GetWindowText(hwnd, pszBuffer+1, nBufLen-1);
- pszBuffer[nLength+1]='"';
- pszBuffer[nLength+2]='\0';
-
- if (pField->nType == FIELD_TEXT && (pField->nFlags & FLAG_MULTILINE))
- {
- char *pszBuf2 = (char*)MALLOC(nBufLen*2); // double the size, consider the worst case, all chars are \r\n
- char *p1, *p2;
- for (p1 = pszBuffer, p2 = pszBuf2; *p1; p1 = CharNext(p1), p2 = CharNext(p2))
- {
- switch (*p1) {
- case '\t':
- *(LPWORD)p2 = CHAR2_TO_WORD('\\', 't');
- p2++;
- break;
- case '\n':
- *(LPWORD)p2 = CHAR2_TO_WORD('\\', 'n');
- p2++;
- break;
- case '\r':
- *(LPWORD)p2 = CHAR2_TO_WORD('\\', 'r');
- p2++;
- break;
- case '\\':
- *p2++ = '\\';
- default:
- lstrcpyn(p2, p1, CharNext(p1) - p1 + 1);
- break;
- }
- }
- *p2 = 0;
- nBufLen = nBufLen*2;
- FREE(pszBuffer);
- pszBuffer=pszBuf2;
- }
- break;
- }
- }
- wsprintf(szField, "Field %d", CurrField);
- WritePrivateProfileString(szField, "State", pszBuffer, pszFilename);
- }
-
- // Tell NSIS which control was activated, if any
- wsprintf(pszBuffer, "%d", g_NotifyField);
- WritePrivateProfileString("Settings", "State", pszBuffer, pszFilename);
-
- FREE(pszBuffer);
-
- return true;
-}
-
-#define BROWSE_WIDTH 15
-
-static char szResult[BUFFER_SIZE];
-char *pszAppName;
-
-DWORD WINAPI myGetProfileString(LPCTSTR lpKeyName)
-{
- *szResult = '\0';
- return GetPrivateProfileString(pszAppName, lpKeyName, "", szResult, BUFFER_SIZE, pszFilename);
-}
-
-char * WINAPI myGetProfileStringDup(LPCTSTR lpKeyName)
-{
- int nSize = myGetProfileString(lpKeyName);
- if (nSize)
- return strdup(szResult);
- else
- return NULL;
-}
-
-UINT WINAPI myGetProfileInt(LPCTSTR lpKeyName, INT nDefault)
-{
- return GetPrivateProfileInt(pszAppName, lpKeyName, nDefault, pszFilename);
-}
-
-int WINAPI ReadSettings(void) {
- static char szField[25];
- int nIdx, nCtrlIdx;
-
- pszAppName = "Settings";
- pszTitle = myGetProfileStringDup("Title");
- pszCancelButtonText = myGetProfileStringDup("CancelButtonText");
- pszNextButtonText = myGetProfileStringDup("NextButtonText");
- pszBackButtonText = myGetProfileStringDup("BackButtonText");
-
- nNumFields = myGetProfileInt("NumFields", 0);
-
- nRectId = myGetProfileInt("Rect", DEFAULT_RECT);
-
- bBackEnabled = myGetProfileInt("BackEnabled", -1);
- // by ORTIM: 13-August-2002
- bCancelEnabled = myGetProfileInt("CancelEnabled", -1);
- bCancelShow = myGetProfileInt("CancelShow", -1);
-
- bRTL = myGetProfileInt("RTL", 0);
-
- if (nNumFields > 0) {
- // make this twice as large for the worst case that every control is a browse button.
- // the structure is small enough that this won't waste much memory.
- // if the structure gets much larger, we should switch to a linked list.
- pFields = (FieldType *)MALLOC(sizeof(FieldType)*2*nNumFields);
- }
-
- for (nIdx = 0, nCtrlIdx = 0; nCtrlIdx < nNumFields; nCtrlIdx++, nIdx++) {
- // Control types
- static TableEntry TypeTable[] = {
- { "LABEL", FIELD_LABEL },
- { "TEXT", FIELD_TEXT },
- { "PASSWORD", FIELD_TEXT },
- { "LISTBOX", FIELD_LISTBOX },
- { "COMBOBOX", FIELD_COMBOBOX },
- { "DROPLIST", FIELD_COMBOBOX },
- { "FILEREQUEST", FIELD_FILEREQUEST },
- { "DIRREQUEST", FIELD_DIRREQUEST },
- { "CHECKBOX", FIELD_CHECKBOX },
- { "RADIOBUTTON", FIELD_RADIOBUTTON },
- { "ICON", FIELD_ICON },
- { "BITMAP", FIELD_BITMAP },
- { "GROUPBOX", FIELD_GROUPBOX },
-#ifdef IO_ENABLE_LINK
- { "LINK", FIELD_LINK },
-#else
- { "LINK", FIELD_LABEL },
-#endif
- { "BUTTON", FIELD_BUTTON },
- { "HLINE", FIELD_HLINE },
- { "VLINE", FIELD_VLINE },
- { NULL, 0 }
- };
- // Control flags
- static TableEntry FlagTable[] = {
- { "NOTIFY", LBS_NOTIFY },
- { "WARN_IF_EXIST", OFN_OVERWRITEPROMPT },
- { "FILE_HIDEREADONLY", OFN_HIDEREADONLY },
- { "MULTISELECT", LBS_MULTIPLESEL },
- { "READONLY", FLAG_READONLY },
- { "RIGHT", BS_LEFTTEXT },
- { "PASSWORD", FLAG_PASSWORD },
- { "ONLY_NUMBERS", FLAG_ONLYNUMBERS },
- { "MULTILINE", FLAG_MULTILINE },
- { "NOWORDWRAP", FLAG_NOWORDWRAP },
- { "WANTRETURN", FLAG_WANTRETURN },
- { "EXTENDEDSELCT", LBS_EXTENDEDSEL },
- { "PATH_MUST_EXIST", OFN_PATHMUSTEXIST },
- { "FILE_MUST_EXIST", OFN_FILEMUSTEXIST },
- { "PROMPT_CREATE", OFN_CREATEPROMPT },
- { "DROPLIST", FLAG_DROPLIST },
- { "RESIZETOFIT", FLAG_RESIZETOFIT },
- { "NOTABSTOP", WS_TABSTOP },
- { "GROUP", WS_GROUP },
- { "REQ_SAVE", FLAG_SAVEAS },
- { "FILE_EXPLORER", OFN_EXPLORER },
- { "HSCROLL", WS_HSCROLL },
- { "VSCROLL", WS_VSCROLL },
- { "DISABLED", WS_DISABLED },
- { "TRANSPARENT", TRANSPARENT_BMP },
- { "FOCUS", FLAG_FOCUS },
- { NULL, 0 }
- };
- FieldType *pField = pFields + nIdx;
-
- pField->nField = nCtrlIdx + 1;
- pField->pszHwndEntry = "HWND";
-
- wsprintf(szField, "Field %d", nCtrlIdx + 1);
- pszAppName = szField;
-
- // Get the control type
- myGetProfileString("TYPE");
- pField->nType = LookupToken(TypeTable, szResult);
- if (pField->nType == FIELD_INVALID)
- continue;
-
- // Lookup flags associated with the control type
- pField->nFlags = LookupToken(FlagTable, szResult);
- myGetProfileString("Flags");
- pField->nFlags |= LookupTokens(FlagTable, szResult);
-
- // pszState must not be NULL!
- myGetProfileString("State");
- pField->pszState = strdup(szResult);
-
- // ListBox items list
- {
- int nResult = myGetProfileString("ListItems");
- if (nResult) {
- // add an extra | character to the end to simplify the loop where we add the items.
- pField->pszListItems = (char*)MALLOC(nResult + 2);
- strcpy(pField->pszListItems, szResult);
- pField->pszListItems[nResult] = '|';
- pField->pszListItems[nResult + 1] = '\0';
- }
- }
-
- // Label Text - convert newline
- pField->pszText = myGetProfileStringDup("TEXT");
- if (pField->nType == FIELD_LABEL || pField->nType == FIELD_LINK)
- ConvertNewLines(pField->pszText);
-
- // Dir request - root folder
- pField->pszRoot = myGetProfileStringDup("ROOT");
-
- // ValidateText - convert newline
- pField->pszValidateText = myGetProfileStringDup("ValidateText");
- ConvertNewLines(pField->pszValidateText);
-
- {
- int nResult = GetPrivateProfileString(szField, "Filter", "All Files|*.*", szResult, sizeof(szResult), pszFilename);
- if (nResult) {
- // Convert the filter to the format required by Windows: NULL after each
- // item followed by a terminating NULL
- pField->pszFilter = (char*)MALLOC(nResult + 2);
- strcpy(pField->pszFilter, szResult);
- char *pszPos = pField->pszFilter;
- while (*pszPos)
- {
- if (*pszPos == '|')
- *pszPos++ = 0;
- else
- pszPos = CharNext(pszPos);
- }
- }
- }
-
- pField->rect.left = myGetProfileInt("LEFT", 0);
- pField->rect.top = myGetProfileInt("TOP", 0);
- pField->rect.right = myGetProfileInt("RIGHT", 0);
- pField->rect.bottom = myGetProfileInt("BOTTOM", 0);
- pField->nMinLength = myGetProfileInt("MinLen", 0);
- pField->nMaxLength = myGetProfileInt("MaxLen", 0);
-
- // Text color for LINK control, default is pure blue
- pField->hImage = (HANDLE)myGetProfileInt("TxtColor", RGB(0,0,255));
-
- pField->nControlID = 1200 + nIdx;
- if (pField->nType == FIELD_FILEREQUEST || pField->nType == FIELD_DIRREQUEST)
- {
- FieldType *pNewField = &pFields[nIdx+1];
- pNewField->nControlID = 1200 + nIdx + 1;
- pNewField->nType = FIELD_BROWSEBUTTON;
- pNewField->nFlags = pField->nFlags & (WS_DISABLED | WS_TABSTOP);
- pNewField->pszText = STRDUP(szBrowseButtonCaption); // needed for generic FREE
- pNewField->rect.right = pField->rect.right;
- pNewField->rect.left = pNewField->rect.right - BROWSE_WIDTH;
- pNewField->rect.bottom = pField->rect.bottom;
- pNewField->rect.top = pField->rect.top;
- pField->rect.right = pNewField->rect.left - 3;
- pNewField->nField = nCtrlIdx + 1;
- pNewField->pszHwndEntry = "HWND2";
- nNumFields++;
- nIdx++;
- }
- }
-
- return nNumFields;
-}
-
-LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) {
- int nIdx = FindControlIdx(id);
- // Ignore if the dialog is in the process of being created
- if (g_done || nIdx < 0)
- return 0;
-
- switch (pFields[nIdx].nType)
- {
- case FIELD_BROWSEBUTTON:
- --nIdx;
- case FIELD_LINK:
- case FIELD_BUTTON:
- case FIELD_CHECKBOX:
- case FIELD_RADIOBUTTON:
- if (codeNotify != BN_CLICKED)
- return 0;
- break;
- case FIELD_COMBOBOX:
- case FIELD_LISTBOX:
- if (codeNotify != LBN_SELCHANGE) // LBN_SELCHANGE == CBN_SELCHANGE
- return 0;
- break;
- default:
- return 0;
- }
-
- FieldType *pField = pFields + nIdx;
-
- char szBrowsePath[MAX_PATH];
-
- switch (pField->nType) {
- case FIELD_FILEREQUEST: {
- OPENFILENAME ofn={0,};
-
- ofn.lStructSize = sizeof(ofn);
- ofn.hwndOwner = hConfigWindow;
- ofn.lpstrFilter = pField->pszFilter;
- ofn.lpstrFile = szBrowsePath;
- ofn.nMaxFile = sizeof(szBrowsePath);
- ofn.Flags = pField->nFlags & (OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_CREATEPROMPT | OFN_EXPLORER);
-
- GetWindowText(pField->hwnd, szBrowsePath, sizeof(szBrowsePath));
-
- tryagain:
- GetCurrentDirectory(BUFFER_SIZE, szResult); // save working dir
- if ((pField->nFlags & FLAG_SAVEAS) ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)) {
- mySetWindowText(pField->hwnd, szBrowsePath);
- SetCurrentDirectory(szResult); // restore working dir
- // OFN_NOCHANGEDIR doesn't always work (see MSDN)
- break;
- }
- else if (szBrowsePath[0] && CommDlgExtendedError() == FNERR_INVALIDFILENAME) {
- szBrowsePath[0] = '\0';
- goto tryagain;
- }
-
- break;
- }
-
- case FIELD_DIRREQUEST: {
- BROWSEINFO bi;
-
- bi.hwndOwner = hConfigWindow;
- bi.pidlRoot = NULL;
- bi.pszDisplayName = szBrowsePath;
- bi.lpszTitle = pField->pszText;
-#ifndef BIF_NEWDIALOGSTYLE
-#define BIF_NEWDIALOGSTYLE 0x0040
-#endif
- bi.ulFlags = BIF_STATUSTEXT | BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
- bi.lpfn = BrowseCallbackProc;
- bi.lParam = nIdx;
- bi.iImage = 0;
-
- if (pField->pszRoot) {
- LPSHELLFOLDER sf;
- ULONG eaten;
- LPITEMIDLIST root;
- int ccRoot = (lstrlen(pField->pszRoot) * 2) + 2;
- LPWSTR pwszRoot = (LPWSTR) MALLOC(ccRoot);
- MultiByteToWideChar(CP_ACP, 0, pField->pszRoot, -1, pwszRoot, ccRoot);
- SHGetDesktopFolder(&sf);
- sf->ParseDisplayName(hConfigWindow, NULL, pwszRoot, &eaten, &root, NULL);
- bi.pidlRoot = root;
- sf->Release();
- FREE(pwszRoot);
- }
- //CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- LPITEMIDLIST pResult = SHBrowseForFolder(&bi);
- if (!pResult)
- break;
-
- if (SHGetPathFromIDList(pResult, szBrowsePath)) {
- mySetWindowText(pField->hwnd, szBrowsePath);
- }
-
- CoTaskMemFree(pResult);
-
- break;
- }
-
- case FIELD_LINK:
- case FIELD_BUTTON:
- // Allow the state to be empty - this might be useful in conjunction
- // with the NOTIFY flag
- if (*pField->pszState)
- ShellExecute(hMainWindow, NULL, pField->pszState, NULL, NULL, SW_SHOWDEFAULT);
- break;
- }
-
- if (pField->nFlags & LBS_NOTIFY) {
- // Remember which control was activated then pretend the user clicked Next
- g_NotifyField = nIdx + 1;
- mySendMessage(hMainWindow, WM_NOTIFY_OUTER_NEXT, 1, 0);
- }
-
- return 0;
-}
-
-
-static void *lpWndProcOld;
-
-int g_is_cancel,g_is_back;
-
-BOOL CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- BOOL bRes;
- if (message == WM_NOTIFY_OUTER_NEXT && wParam == 1)
- {
- // Don't call leave function if fields aren't valid
- if (!g_NotifyField && !ValidateFields())
- return 0;
- // Get the settings ready for the leave function verification
- SaveSettings();
- // Reset the record of activated control
- g_NotifyField = 0;
- }
- bRes = CallWindowProc((long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long))lpWndProcOld,hwnd,message,wParam,lParam);
- if (message == WM_NOTIFY_OUTER_NEXT && !bRes)
- {
- // if leave function didn't abort (bRes != 0 in that case)
- if (wParam == (WPARAM)-1)
- g_is_back++;
- if (wParam == NOTIFY_BYE_BYE)
- g_is_cancel++;
- g_done++;
- PostMessage(hConfigWindow,WM_CLOSE,0,0);
- }
- return bRes;
-}
-
-BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch (uMsg)
- {
- HANDLE_MSG(hwndDlg, WM_COMMAND, WMCommandProc);
- case WM_DRAWITEM:
- {
- DRAWITEMSTRUCT* lpdis = (DRAWITEMSTRUCT*)lParam;
- int nIdx = FindControlIdx(lpdis->CtlID);
-#ifdef IO_LINK_UNDERLINED
- HFONT OldFont;
- LOGFONT lf;
-#endif
-
- if (nIdx < 0)
- break;
- FieldType *pField = pFields + nIdx;
-
-#ifdef IO_LINK_UNDERLINED
- GetObject(GetCurrentObject(lpdis->hDC, OBJ_FONT), sizeof(lf), &lf);
- lf.lfUnderline = TRUE;
- OldFont = (HFONT)SelectObject(lpdis->hDC, CreateFontIndirect(&lf));
-#endif
-
- // We need lpdis->rcItem later
- RECT rc = lpdis->rcItem;
-
- // Calculate needed size of the control
- DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT);
-
- // Make some more room so the focus rect won't cut letters off
- rc.right = min(rc.right + 2, lpdis->rcItem.right);
-
- // Move rect to right if in RTL mode
- if (bRTL)
- {
- rc.left += lpdis->rcItem.right - rc.right;
- rc.right += lpdis->rcItem.right - rc.right;
- }
-
- if (lpdis->itemAction & ODA_DRAWENTIRE)
- {
- // Get TxtColor unless the user has set another using SetCtlColors
- if (!GetWindowLong(lpdis->hwndItem, GWL_USERDATA))
- SetTextColor(lpdis->hDC, (COLORREF) pField->hImage);
-
- // Draw the text
- DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | (bRTL ? DT_RTLREADING : 0));
- }
-
- // Draw the focus rect if needed
- if (((lpdis->itemState & ODS_FOCUS) && (lpdis->itemAction & ODA_DRAWENTIRE)) || (lpdis->itemAction & ODA_FOCUS))
- {
- // NB: when not in DRAWENTIRE mode, this will actually toggle the focus
- // rectangle since it's drawn in a XOR way
- DrawFocusRect(lpdis->hDC, &rc);
- }
-
- pField->rect = rc;
-
-#ifdef IO_LINK_UNDERLINED
- DeleteObject(SelectObject(lpdis->hDC, OldFont));
-#endif
- break;
- }
- case WM_CTLCOLORSTATIC:
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORDLG:
- case WM_CTLCOLORBTN:
- case WM_CTLCOLORLISTBOX:
- // let the NSIS window handle colors, it knows best
- return mySendMessage(hMainWindow, uMsg, wParam, lParam);
- }
- return 0;
-}
-
-#ifdef IO_ENABLE_LINK
-
-#ifndef IDC_HAND
-#define IDC_HAND MAKEINTRESOURCE(32649)
-#endif
-
-#ifndef BS_TYPEMASK
-#define BS_TYPEMASK 0x0000000FL
-#endif
-
-// pFields[nIdx].nParentIdx is used to store original windowproc
-int WINAPI StaticLINKWindowProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- int StaticField = FindControlIdx(GetDlgCtrlID(hWin));
- if (StaticField < 0)
- return 0;
- FieldType *pField = pFields + StaticField;
-
- switch(uMsg)
- {
- case WM_GETDLGCODE:
- // Pretend we are a normal button/default button as appropriate
- return DLGC_BUTTON | ((pField->nFlags & FLAG_WANTRETURN) ? DLGC_DEFPUSHBUTTON : DLGC_UNDEFPUSHBUTTON);
-
- case BM_SETSTYLE:
- // Detect when we are becoming the default button but don't lose the owner-draw style
- if ((wParam & BS_TYPEMASK) == BS_DEFPUSHBUTTON)
- pField->nFlags |= FLAG_WANTRETURN; // Hijack this flag to indicate default button status
- else
- pField->nFlags &= ~FLAG_WANTRETURN;
- wParam = (wParam & ~BS_TYPEMASK) | BS_OWNERDRAW;
- break;
-
- case WM_NCHITTEST:
- {
- POINT pt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
- MapWindowPoints(0, hWin, &pt, 1);
- if (PtInRect(&pField->rect, pt))
- return HTCLIENT;
- else
- return HTNOWHERE;
- }
-
- case WM_SETCURSOR:
- {
- if ((HWND)wParam == hWin && LOWORD(lParam) == HTCLIENT)
- {
- HCURSOR hCur = LoadCursor(NULL, IDC_HAND);
- if (hCur)
- {
- SetCursor(hCur);
- return 1; // halt further processing
- }
- }
- }
- }
- return CallWindowProc((WNDPROC)pField->nParentIdx, hWin, uMsg, wParam, lParam);
-}
-#endif
-
-int WINAPI NumbersOnlyPasteWndProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- int nIdx = FindControlIdx(GetDlgCtrlID(hWin));
- if (nIdx < 0)
- return 0;
-
- FieldType *pField = pFields + nIdx;
-
- if (uMsg == WM_PASTE)
- {
- if (OpenClipboard(hWin))
- {
- HGLOBAL hData = GetClipboardData(CF_TEXT);
-
- if (hData)
- {
- char *lpData = (char *) GlobalLock(hData);
- if (lpData)
- {
- int iLen = lstrlen(lpData);
- char *lpFilteredData = (char *) MALLOC(iLen + 1);
-
- if (lpFilteredData)
- {
- for (int i = 0, j = 0; i < iLen; i++)
- {
- if (lpData[i] >= '0' && lpData[i] <= '9')
- {
- lpFilteredData[j] = lpData[i];
- j++;
- }
- lpFilteredData[j] = 0;
- }
-
- SendMessage(hWin, EM_REPLACESEL, TRUE, (LPARAM) lpFilteredData);
- FREE(lpFilteredData);
- }
-
- GlobalUnlock(hData);
- }
- }
-
- CloseClipboard();
-
- return 0;
- }
- }
-
- return CallWindowProc((WNDPROC) pField->wndProc, hWin, uMsg, wParam, lParam);
-}
-
-int old_cancel_visible;
-
-int WINAPI createCfgDlg()
-{
- g_is_back=0;
- g_is_cancel=0;
-
- HWND mainwnd = hMainWindow;
- if (!mainwnd)
- {
- popstring(NULL);
- pushstring("error finding mainwnd");
- return 1; // cannot be used in silent mode unfortunately.
- }
-
- if (!g_stacktop || !*g_stacktop || !(pszFilename = (*g_stacktop)->text) || !pszFilename[0] || !ReadSettings())
- {
- popstring(NULL);
- pushstring("error finding config");
- return 1;
- }
-
- HWND childwnd=GetDlgItem(mainwnd,nRectId);
- if (!childwnd)
- {
- popstring(NULL);
- pushstring("error finding childwnd");
- return 1;
- }
-
- hCancelButton = GetDlgItem(mainwnd,IDCANCEL);
- hNextButton = GetDlgItem(mainwnd,IDOK);
- hBackButton = GetDlgItem(mainwnd,3);
-
- mySetWindowText(hCancelButton,pszCancelButtonText);
- mySetWindowText(hNextButton,pszNextButtonText);
- mySetWindowText(hBackButton,pszBackButtonText);
-
- if (bBackEnabled!=-1) EnableWindow(hBackButton,bBackEnabled);
- if (bCancelEnabled!=-1)
- {
- EnableWindow(hCancelButton,bCancelEnabled);
- if (bCancelEnabled)
- EnableMenuItem(GetSystemMenu(mainwnd, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
- else
- EnableMenuItem(GetSystemMenu(mainwnd, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
- }
- if (bCancelShow!=-1) old_cancel_visible=ShowWindow(hCancelButton,bCancelShow?SW_SHOWNA:SW_HIDE);
-
- HFONT hFont = (HFONT)mySendMessage(mainwnd, WM_GETFONT, 0, 0);
-
- // Prevent WM_COMMANDs from being processed while we are building
- g_done = 1;
-
- int mainWndWidth, mainWndHeight;
- hConfigWindow=CreateDialog(m_hInstance,MAKEINTRESOURCE(IDD_DIALOG1),mainwnd,cfgDlgProc);
- if (hConfigWindow)
- {
- RECT dialog_r;
- GetWindowRect(childwnd,&dialog_r);
- MapWindowPoints(0, mainwnd, (LPPOINT) &dialog_r, 2);
- mainWndWidth = dialog_r.right - dialog_r.left;
- mainWndHeight = dialog_r.bottom - dialog_r.top;
- SetWindowPos(
- hConfigWindow,
- 0,
- dialog_r.left,
- dialog_r.top,
- mainWndWidth,
- mainWndHeight,
- SWP_NOZORDER|SWP_NOACTIVATE
- );
- // Sets the font of IO window to be the same as the main window
- mySendMessage(hConfigWindow, WM_SETFONT, (WPARAM)hFont, TRUE);
- }
- else
- {
- popstring(NULL);
- pushstring("error creating dialog");
- return 1;
- }
-
- BOOL fFocused = FALSE;
- BOOL fFocusedByFlag = FALSE;
-
-#define DEFAULT_STYLES (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS)
-#define RTL_EX_STYLES (WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR)
-
- for (int nIdx = 0; nIdx < nNumFields; nIdx++) {
- static struct {
- char* pszClass;
- DWORD dwStyle;
- DWORD dwRTLStyle;
- DWORD dwExStyle;
- DWORD dwRTLExStyle;
- } ClassTable[] = {
- { "STATIC", // FIELD_HLINE
- DEFAULT_STYLES | SS_ETCHEDHORZ | SS_SUNKEN,
- DEFAULT_STYLES | SS_ETCHEDHORZ | SS_SUNKEN,
- WS_EX_TRANSPARENT,
- WS_EX_TRANSPARENT | RTL_EX_STYLES },
- { "STATIC", // FIELD_VLINE
- DEFAULT_STYLES | SS_ETCHEDVERT | SS_SUNKEN,
- DEFAULT_STYLES | SS_ETCHEDVERT | SS_SUNKEN,
- WS_EX_TRANSPARENT,
- WS_EX_TRANSPARENT | RTL_EX_STYLES },
- { "STATIC", // FIELD_LABEL
- DEFAULT_STYLES,
- DEFAULT_STYLES | SS_RIGHT,
- WS_EX_TRANSPARENT,
- WS_EX_TRANSPARENT | RTL_EX_STYLES },
- { "STATIC", // FIELD_ICON
- DEFAULT_STYLES | SS_ICON,
- DEFAULT_STYLES | SS_ICON,
- 0,
- RTL_EX_STYLES },
- { "STATIC", // FIELD_BITMAP
- DEFAULT_STYLES | SS_BITMAP,
- DEFAULT_STYLES | SS_BITMAP,
- 0,
- RTL_EX_STYLES },
- { "BUTTON", // FIELD_BROWSEBUTTON
- DEFAULT_STYLES | WS_TABSTOP,
- DEFAULT_STYLES | WS_TABSTOP,
- 0,
- RTL_EX_STYLES },
- { "BUTTON", // FIELD_LINK
- DEFAULT_STYLES | WS_TABSTOP | BS_OWNERDRAW,
- DEFAULT_STYLES | WS_TABSTOP | BS_OWNERDRAW | BS_RIGHT,
- 0,
- RTL_EX_STYLES },
- { "BUTTON", // FIELD_BUTTON
- DEFAULT_STYLES | WS_TABSTOP,
- DEFAULT_STYLES | WS_TABSTOP,
- 0,
- RTL_EX_STYLES },
- { "BUTTON", // FIELD_GROUPBOX
- DEFAULT_STYLES | BS_GROUPBOX,
- DEFAULT_STYLES | BS_GROUPBOX | BS_RIGHT,
- WS_EX_TRANSPARENT,
- WS_EX_TRANSPARENT | RTL_EX_STYLES },
- { "BUTTON", // FIELD_CHECKBOX
- DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTOCHECKBOX | BS_MULTILINE,
- DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTOCHECKBOX | BS_MULTILINE | BS_RIGHT | BS_LEFTTEXT,
- 0,
- RTL_EX_STYLES },
- { "BUTTON", // FIELD_RADIOBUTTON
- DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTORADIOBUTTON | BS_MULTILINE,
- DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTORADIOBUTTON | BS_MULTILINE | BS_RIGHT | BS_LEFTTEXT,
- 0,
- RTL_EX_STYLES },
- { "EDIT", // FIELD_TEXT
- DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL,
- DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL | ES_RIGHT,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | RTL_EX_STYLES },
- { "EDIT", // FIELD_FILEREQUEST
- DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL,
- DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL | ES_RIGHT,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | RTL_EX_STYLES },
- { "EDIT", // FIELD_DIRREQUEST
- DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL,
- DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL | ES_RIGHT,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | RTL_EX_STYLES },
- { "COMBOBOX", // FIELD_COMBOBOX
- DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | WS_CLIPCHILDREN | CBS_AUTOHSCROLL | CBS_HASSTRINGS,
- DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | WS_CLIPCHILDREN | CBS_AUTOHSCROLL | CBS_HASSTRINGS,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_RIGHT | RTL_EX_STYLES },
- { "LISTBOX", // FIELD_LISTBOX
- DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT,
- DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
- WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_RIGHT | RTL_EX_STYLES }
- };
-
- FieldType *pField = pFields + nIdx;
-
-#undef DEFAULT_STYLES
-
- if (pField->nType < 1 || pField->nType > (int)(sizeof(ClassTable) / sizeof(ClassTable[0])))
- continue;
-
- DWORD dwStyle, dwExStyle;
- if (bRTL) {
- dwStyle = ClassTable[pField->nType - 1].dwRTLStyle;
- dwExStyle = ClassTable[pField->nType - 1].dwRTLExStyle;
- }
- else {
- dwStyle = ClassTable[pField->nType - 1].dwStyle;
- dwExStyle = ClassTable[pField->nType - 1].dwExStyle;
- }
-
- // Convert from dialog units
-
- RECT rect = pField->rect;
- // MapDialogRect uses the font used when a dialog is created, and ignores
- // any subsequent WM_SETFONT messages (like we used above); so use the main
- // NSIS window for the conversion, instead of this one.
- MapDialogRect(mainwnd, &rect);
-
- if (pField->rect.left < 0)
- rect.left += mainWndWidth;
- if (pField->rect.right < 0)
- rect.right += mainWndWidth;
- if (pField->rect.top < 0)
- rect.top += mainWndHeight;
- if (pField->rect.bottom < 0)
- rect.bottom += mainWndHeight;
-
- if (bRTL) {
- int right = rect.right;
- rect.right = mainWndWidth - rect.left;
- rect.left = mainWndWidth - right;
- }
-
- char *title = pField->pszText;
- switch (pField->nType) {
- case FIELD_ICON:
- case FIELD_BITMAP:
- title = NULL; // otherwise it is treated as the name of a resource
- break;
- case FIELD_CHECKBOX:
- case FIELD_RADIOBUTTON:
- dwStyle ^= pField->nFlags & BS_LEFTTEXT;
- break;
- case FIELD_TEXT:
- case FIELD_FILEREQUEST:
- case FIELD_DIRREQUEST:
- if (pField->nFlags & FLAG_PASSWORD)
- dwStyle |= ES_PASSWORD;
- if (pField->nFlags & FLAG_ONLYNUMBERS)
- dwStyle |= ES_NUMBER;
- if (pField->nFlags & FLAG_WANTRETURN)
- dwStyle |= ES_WANTRETURN;
- if (pField->nFlags & FLAG_READONLY)
- dwStyle |= ES_READONLY;
- title = pField->pszState;
- if (pField->nFlags & FLAG_MULTILINE)
- {
- dwStyle |= ES_MULTILINE | ES_AUTOVSCROLL;
- // Enable word-wrap unless we have a horizontal scroll bar
- // or it has been explicitly disallowed
- if (!(pField->nFlags & (WS_HSCROLL | FLAG_NOWORDWRAP)))
- dwStyle &= ~ES_AUTOHSCROLL;
- ConvertNewLines(pField->pszState);
- // If multiline-readonly then hold the text back until after the
- // initial focus has been set. This is so the text is not initially
- // selected - useful for License Page look-a-likes.
- if (pField->nFlags & FLAG_READONLY)
- title = NULL;
- }
- break;
- case FIELD_COMBOBOX:
- dwStyle |= (pField->nFlags & FLAG_DROPLIST) ? CBS_DROPDOWNLIST : CBS_DROPDOWN;
- title = pField->pszState;
- break;
- case FIELD_LISTBOX:
- dwStyle |= pField->nFlags & (LBS_NOTIFY | LBS_MULTIPLESEL | LBS_EXTENDEDSEL);
- break;
- }
-
- dwStyle |= pField->nFlags & (WS_GROUP | WS_HSCROLL | WS_VSCROLL | WS_DISABLED);
- if (pField->nFlags & WS_TABSTOP) dwStyle &= ~WS_TABSTOP;
-
- HWND hwCtrl = pField->hwnd = CreateWindowEx(
- dwExStyle,
- ClassTable[pField->nType - 1].pszClass,
- title,
- dwStyle,
- rect.left,
- rect.top,
- rect.right - rect.left,
- rect.bottom - rect.top,
- hConfigWindow,
- (HMENU)pField->nControlID,
- m_hInstance,
- NULL
- );
-
- {
- char szField[64];
- char szHwnd[64];
- wsprintf(szField, "Field %d", pField->nField);
- wsprintf(szHwnd, "%d", hwCtrl);
- WritePrivateProfileString(szField, pField->pszHwndEntry, szHwnd, pszFilename);
- }
-
- if (hwCtrl) {
- // Sets the font of IO window to be the same as the main window
- mySendMessage(hwCtrl, WM_SETFONT, (WPARAM)hFont, TRUE);
- // make sure we created the window, then set additional attributes
- switch (pField->nType) {
- case FIELD_TEXT:
- case FIELD_FILEREQUEST:
- case FIELD_DIRREQUEST:
- mySendMessage(hwCtrl, EM_LIMITTEXT, (WPARAM)pField->nMaxLength, (LPARAM)0);
- if (dwStyle & ES_NUMBER)
- {
- pField->wndProc = GetWindowLong(hwCtrl, GWL_WNDPROC);
- SetWindowLong(hwCtrl, GWL_WNDPROC, (long) NumbersOnlyPasteWndProc);
- }
- break;
-
- case FIELD_CHECKBOX:
- case FIELD_RADIOBUTTON:
- if (pField->pszState[0] == '1')
- mySendMessage(hwCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
- break;
-
- case FIELD_COMBOBOX:
- case FIELD_LISTBOX:
- // if this is a listbox or combobox, we need to add the list items.
- if (pField->pszListItems) {
- UINT nAddMsg, nFindMsg, nSetSelMsg;
- if (pField->nType == FIELD_COMBOBOX) {
- nAddMsg = CB_ADDSTRING;
- nFindMsg = CB_FINDSTRINGEXACT;
- nSetSelMsg = CB_SETCURSEL;
- }
- else {
- nAddMsg = LB_ADDSTRING;
- nFindMsg = LB_FINDSTRINGEXACT;
- nSetSelMsg = LB_SETCURSEL;
- }
- char *pszStart, *pszEnd, *pszList;
- pszStart = pszEnd = pszList = STRDUP(pField->pszListItems);
- // pszListItems has a trailing pipe
- while (*pszEnd) {
- if (*pszEnd == '|') {
- *pszEnd = '\0';
- if (*pszStart)
- mySendMessage(hwCtrl, nAddMsg, 0, (LPARAM) pszStart);
- pszStart = ++pszEnd;
- }
- else
- pszEnd = CharNext(pszEnd);
- }
- FREE(pszList);
- if (pField->pszState) {
- if (pField->nFlags & (LBS_MULTIPLESEL|LBS_EXTENDEDSEL) && nFindMsg == LB_FINDSTRINGEXACT) {
- mySendMessage(hwCtrl, LB_SETSEL, FALSE, (LPARAM)-1);
- pszStart = pszEnd = pField->pszState;
- for (;;) {
- char c = *pszEnd;
- if (c == '|' || c == '\0') {
- *pszEnd = '\0';
- if (*pszStart)
- {
- int nItem = mySendMessage(hwCtrl, LB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)pszStart);
- if (nItem != LB_ERR)
- mySendMessage(hwCtrl, LB_SETSEL, TRUE, nItem);
- }
- if (!c)
- break;
- pszStart = ++pszEnd;
- }
- else
- pszEnd = CharNext(pszEnd);
- }
- }
- else {
- int nItem = mySendMessage(hwCtrl, nFindMsg, (WPARAM)-1, (LPARAM)pField->pszState);
- if (nItem != CB_ERR) { // CB_ERR == LB_ERR == -1
- mySendMessage(hwCtrl, nSetSelMsg, nItem, 0);
- }
- }
- }
- }
- break;
-
- case FIELD_ICON:
- case FIELD_BITMAP:
- {
- WPARAM nImageType = pField->nType == FIELD_BITMAP ? IMAGE_BITMAP : IMAGE_ICON;
- LPARAM nImage = 0;
-
- if (pField->pszText) {
- pField->hImage = LoadImage(
- m_hInstance,
- pField->pszText,
- nImageType,
- (pField->nFlags & FLAG_RESIZETOFIT)
- ? (rect.right - rect.left)
- : 0,
- (pField->nFlags & FLAG_RESIZETOFIT)
- ? (rect.bottom - rect.top)
- : 0,
- LR_LOADFROMFILE
- );
- nImage = (LPARAM)pField->hImage;
- }
- else
- nImage = (LPARAM)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(103));
-
- if ((pField->nFlags & TRANSPARENT_BMP) && nImageType == IMAGE_BITMAP)
- {
- // based on AdvSplash's SetTransparentRegion
- BITMAP bm;
- HBITMAP hBitmap = (HBITMAP) nImage;
-
- if (GetObject(hBitmap, sizeof(bm), &bm))
- {
- HDC dc;
- int x, y;
- HRGN region, cutrgn;
- BITMAPINFO bmi;
- int size = bm.bmWidth * bm.bmHeight * sizeof(int);
- int *bmp = (int *) MALLOC(size);
- if (bmp)
- {
- bmi.bmiHeader.biBitCount = 32;
- bmi.bmiHeader.biCompression = BI_RGB;
- bmi.bmiHeader.biHeight = bm.bmHeight;
- bmi.bmiHeader.biPlanes = 1;
- bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
- bmi.bmiHeader.biWidth = bm.bmWidth;
- bmi.bmiHeader.biClrUsed = 0;
- bmi.bmiHeader.biClrImportant = 0;
-
- dc = CreateCompatibleDC(NULL);
- SelectObject(dc, hBitmap);
-
- x = GetDIBits(dc, hBitmap, 0, bm.bmHeight, bmp, &bmi, DIB_RGB_COLORS);
-
- region = CreateRectRgn(0, 0, bm.bmWidth, bm.bmHeight);
-
- int keycolor = *bmp & 0xFFFFFF;
-
- // Search for transparent pixels
- for (y = bm.bmHeight - 1; y >= 0; y--) {
- for (x = 0; x < bm.bmWidth;) {
- if ((*bmp & 0xFFFFFF) == keycolor) {
- int j = x;
- while ((x < bm.bmWidth) && ((*bmp & 0xFFFFFF) == keycolor)) {
- bmp++, x++;
- }
-
- // Cut transparent pixels from the original region
- cutrgn = CreateRectRgn(j, y, x, y + 1);
- CombineRgn(region, region, cutrgn, RGN_XOR);
- DeleteObject(cutrgn);
- } else {
- bmp++, x++;
- }
- }
- }
-
- // Set resulting region.
- SetWindowRgn(hwCtrl, region, TRUE);
- DeleteObject(region);
- DeleteObject(dc);
- FREE(bmp);
- }
- }
- }
-
- mySendMessage(
- hwCtrl,
- STM_SETIMAGE,
- nImageType,
- nImage
- );
-
- if (pField->nType == FIELD_BITMAP)
- {
- // Centre the image in the requested space.
- // Cannot use SS_CENTERIMAGE because it behaves differently on XP to
- // everything else. (Thank you Microsoft.)
- RECT bmp_rect;
- GetClientRect(hwCtrl, &bmp_rect);
- bmp_rect.left = (rect.left + rect.right - bmp_rect.right) / 2;
- bmp_rect.top = (rect.top + rect.bottom - bmp_rect.bottom) / 2;
- SetWindowPos(hwCtrl, NULL, bmp_rect.left, bmp_rect.top, 0, 0,
- SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
- }
-
- break;
- }
-
-#ifdef IO_ENABLE_LINK
- case FIELD_LINK:
- pField->nParentIdx = SetWindowLong(hwCtrl, GWL_WNDPROC, (long)StaticLINKWindowProc);
- break;
-#endif
- }
-
- // Set initial focus to the first appropriate field ( with FOCUS flag)
- if (!fFocusedByFlag && (dwStyle & (WS_TABSTOP | WS_DISABLED)) == WS_TABSTOP && pField->nType >= FIELD_SETFOCUS) {
- if (pField->nFlags & FLAG_FOCUS) {
- fFocusedByFlag = TRUE;
- }
- if (!fFocused || fFocusedByFlag) {
- fFocused = TRUE;
- mySetFocus(hwCtrl);
- }
- }
-
- // If multiline-readonly then hold the text back until after the
- // initial focus has been set. This is so the text is not initially
- // selected - useful for License Page look-a-likes.
- if ((pField->nFlags & (FLAG_MULTILINE | FLAG_READONLY)) == (FLAG_MULTILINE | FLAG_READONLY))
- mySetWindowText(hwCtrl, pField->pszState);
- }
- }
-
- if (!fFocused)
- mySetFocus(hNextButton);
-
- mySetWindowText(mainwnd,pszTitle);
- pFilenameStackEntry = *g_stacktop;
- *g_stacktop = (*g_stacktop)->next;
- static char tmp[32];
- wsprintf(tmp,"%d",hConfigWindow);
- pushstring(tmp);
- return 0;
-}
-
-void WINAPI showCfgDlg()
-{
- lpWndProcOld = (void *) SetWindowLong(hMainWindow,DWL_DLGPROC,(long)ParentWndProc);
-
- // Tell NSIS to remove old inner dialog and pass handle of the new inner dialog
- mySendMessage(hMainWindow, WM_NOTIFY_CUSTOM_READY, (WPARAM)hConfigWindow, 0);
- ShowWindow(hConfigWindow, SW_SHOWNA);
-
- g_done = g_NotifyField = 0;
-
- while (!g_done) {
- MSG msg;
- GetMessage(&msg, NULL, 0, 0);
- if (!IsDialogMessage(hConfigWindow,&msg) && !IsDialogMessage(hMainWindow,&msg))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
-
- // we don't save settings on cancel since that means your installer will likely
- // quit soon, which means the ini might get flushed late and cause crap. :) anwyay.
- if (!g_is_cancel) SaveSettings();
-
- SetWindowLong(hMainWindow,DWL_DLGPROC,(long)lpWndProcOld);
- DestroyWindow(hConfigWindow);
-
- // by ORTIM: 13-August-2002
- if (bCancelShow!=-1) ShowWindow(hCancelButton,old_cancel_visible?SW_SHOWNA:SW_HIDE);
-
- FREE(pFilenameStackEntry);
- FREE(pszTitle);
- FREE(pszCancelButtonText);
- FREE(pszNextButtonText);
- FREE(pszBackButtonText);
-
- int i = nNumFields;
- while (i--) {
- FieldType *pField = pFields + i;
-
- int j = FIELD_BUFFERS;
- while (j--)
- FREE(((char **) pField)[j]);
-
- if (pField->nType == FIELD_BITMAP) {
- DeleteObject(pField->hImage);
- }
- if (pField->nType == FIELD_ICON) {
- DestroyIcon((HICON)pField->hImage);
- }
- }
- FREE(pFields);
-
- pushstring(g_is_cancel?"cancel":g_is_back?"back":"success");
-}
-
-int initCalled;
-
-extern "C" void __declspec(dllexport) dialog(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- hMainWindow=hwndParent;
- EXDLL_INIT();
- if (initCalled) {
- pushstring("error");
- return;
- }
- if (createCfgDlg())
- return;
- popstring(NULL);
- showCfgDlg();
-}
-
-extern "C" void __declspec(dllexport) initDialog(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- hMainWindow=hwndParent;
- EXDLL_INIT();
- if (initCalled) {
- pushstring("error");
- return;
- }
- if (createCfgDlg())
- return;
- initCalled++;
-}
-
-extern "C" void __declspec(dllexport) show(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- EXDLL_INIT();
- if (!initCalled) {
- pushstring("error");
- return;
- }
- initCalled--;
- showCfgDlg();
-}
-
-extern "C" BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- m_hInstance=(HINSTANCE) hInst;
- return TRUE;
-}
-
-
-int WINAPI LookupToken(TableEntry* psTable_, char* pszToken_)
-{
- for (int i = 0; psTable_[i].pszName; i++)
- if (!stricmp(pszToken_, psTable_[i].pszName))
- return psTable_[i].nValue;
- return 0;
-}
-
-int WINAPI LookupTokens(TableEntry* psTable_, char* pszTokens_)
-{
- int n = 0;
- char *pszStart = pszTokens_;
- char *pszEnd = pszTokens_;
- for (;;) {
- char c = *pszEnd;
- if (c == '|' || c == '\0') {
- *pszEnd = '\0';
- n |= LookupToken(psTable_, pszStart);
- *pszEnd = c;
- if (!c)
- break;
- pszStart = ++pszEnd;
- }
- else
- pszEnd = CharNext(pszEnd);
- }
- return n;
-}
-
-void WINAPI ConvertNewLines(char *str) {
- char *p1, *p2, *p3;
-
- if (!str)
- return;
-
- p1 = p2 = str;
-
- while (*p1)
- {
- switch (*(LPWORD)p1)
- {
- case CHAR2_TO_WORD('\\', 't'):
- *p2 = '\t';
- p1 += 2;
- p2++;
- break;
- case CHAR2_TO_WORD('\\', 'n'):
- *p2 = '\n';
- p1 += 2;
- p2++;
- break;
- case CHAR2_TO_WORD('\\', 'r'):
- *p2 = '\r';
- p1 += 2;
- p2++;
- break;
- case CHAR2_TO_WORD('\\', '\\'):
- *p2 = '\\';
- p1 += 2;
- p2++;
- break;
- default:
- p3 = CharNext(p1);
- while (p1 < p3)
- *p2++ = *p1++;
- break;
- }
- }
-
- *p2 = 0;
-}
+/*********************************************************
+ *
+ * InstallOptions version 2.0 - Plugin for custom pages
+ *
+ * See Readme.html for documentation and license
+ *
+ *********************************************************/
+
+#include <windows.h>
+#include <windowsx.h>
+#include <shlobj.h>
+#include <commdlg.h>
+#include <cderr.h>
+#include "resource.h"
+#include "shellapi.h"
+
+#define popstring dontuseme
+#include "../ExDLL/exdll.h"
+#undef popstring
+
+// Use for functions only called from one place to possibly reduce some code
+// size. Allows the source code to remain readable by leaving the function
+// intact.
+#ifdef _MSC_VER
+#define INLINE __forceinline
+#else
+#define INLINE inline
+#endif
+
+void *WINAPI MALLOC(int len) { return (void*)GlobalAlloc(GPTR,len); }
+void WINAPI FREE(void *d) { if (d) GlobalFree((HGLOBAL)d); }
+
+void WINAPI popstring(char *str)
+{
+ if (g_stacktop && *g_stacktop)
+ {
+ stack_t *th = *g_stacktop;
+ *g_stacktop = th->next;
+ if (str)
+ lstrcpy(str, th->text);
+ FREE(th);
+ }
+}
+
+#define strcpy(x,y) lstrcpy(x,y)
+//#define strncpy(x,y,z) lstrcpyn(x,y,z)
+#define strdup(x) STRDUP(x)
+#define stricmp(x,y) lstrcmpi(x,y)
+//#define abs(x) ((x) < 0 ? -(x) : (x))
+
+char *WINAPI STRDUP(const char *c)
+{
+ char *t=(char*)MALLOC(lstrlen(c)+1);
+ return lstrcpy(t,c);
+}
+
+// Turn a pair of chars into a word
+// Turn four chars into a dword
+#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
+#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
+#else
+#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
+#endif
+
+// Field types
+// NB - the order of this list is important - see below
+
+#define FIELD_INVALID (0)
+#define FIELD_HLINE (1)
+#define FIELD_VLINE (2)
+#define FIELD_LABEL (3)
+#define FIELD_ICON (4)
+#define FIELD_BITMAP (5)
+#define FIELD_BROWSEBUTTON (6)
+#define FIELD_LINK (7)
+#define FIELD_BUTTON (8)
+#define FIELD_GROUPBOX (9)
+#define FIELD_CHECKBOX (10)
+#define FIELD_RADIOBUTTON (11)
+#define FIELD_TEXT (12)
+#define FIELD_FILEREQUEST (13)
+#define FIELD_DIRREQUEST (14)
+#define FIELD_COMBOBOX (15)
+#define FIELD_LISTBOX (16)
+
+#define FIELD_SETFOCUS FIELD_CHECKBOX // First field that qualifies for having the initial keyboard focus
+#define FIELD_CHECKLEN FIELD_TEXT // First field to have length of state value checked against MinLen/MaxLen
+
+//---------------------------------------------------------------------
+// settings
+#define IO_ENABLE_LINK
+
+//#define IO_LINK_UNDERLINED // Uncomment to show links text underlined
+//---------------------------------------------------------------------
+
+// Flags
+
+// LBS_NOTIFY 0x00000001 // LISTBOX/CHECKBOX/RADIOBUTTON/BUTTON/LINK - Notify NSIS script when control is "activated" (exact meaning depends on the type of control)
+// OFN_OVERWRITEPROMPT 0x00000002 // FILEREQUEST
+// OFN_HIDEREADONLY 0x00000004 // FILEREQUEST
+// LBS_MULTIPLESEL 0x00000008 // LISTBOX
+#define FLAG_READONLY 0x00000010 // TEXT/FILEREQUEST/DIRREQUEST
+// BS_LEFTTEXT 0x00000020 // CHECKBOX/RADIOBUTTON
+#define TRANSPARENT_BMP 0x00000020 // BITMAP
+#define FLAG_PASSWORD 0x00000040 // TEXT/FILEREQUEST/DIRREQUEST
+#define FLAG_ONLYNUMBERS 0x00000080 // TEXT/FILEREQUEST/DIRREQUEST
+#define FLAG_MULTILINE 0x00000100 // TEXT/FILEREQUEST/DIRREQUEST
+#define FLAG_NOWORDWRAP 0x00000200 // TEXT/FILEREQUEST/DIRREQUEST - Disable word-wrap in multi-line text boxes
+#define FLAG_WANTRETURN 0x00000400 // TEXT/FILEREQUEST/DIRREQUEST
+// LBS_EXTENDEDSEL 0x00000800 // LISTBOX
+// OFN_PATHMUSTEXIST 0x00000800 // FILEREQUEST
+// OFN_FILEMUSTEXIST 0x00001000 // FILEREQUEST
+// OFN_CREATEPROMPT 0x00002000 // FILEREQUEST
+#define FLAG_DROPLIST 0x00004000 // COMBOBOX
+#define FLAG_RESIZETOFIT 0x00008000 // BITMAP
+// WS_TABSTOP 0x00010000 // *ALL*
+// WS_GROUP 0x00020000 // *ALL*
+#define FLAG_SAVEAS 0x00040000 // FILEREQUEST - Show "Save As" instead of "Open" for FileRequest field
+// OFN_EXPLORER 0x00080000 // FILEREQUEST
+// WS_HSCROLL 0x00100000 // *ALL*
+// WS_VSCROLL 0x00200000 // *ALL*
+// WS_DISABLED 0x08000000 // *ALL*
+#define FLAG_FOCUS 0x10000000 // Controls that can receive focus
+
+struct TableEntry {
+ char *pszName;
+ int nValue;
+};
+
+int WINAPI LookupToken(TableEntry*, char*);
+int WINAPI LookupTokens(TableEntry*, char*);
+
+void WINAPI ConvertNewLines(char *str);
+
+// all allocated buffers must be first in the struct
+// when adding more allocated buffers to FieldType, don't forget to change this define
+#define FIELD_BUFFERS 6
+struct FieldType {
+ char *pszText;
+ char *pszState;
+ char *pszRoot;
+
+ char *pszListItems;
+ char *pszFilter;
+
+ char *pszValidateText;
+ int nMinLength;
+ int nMaxLength;
+
+ int nType;
+ RECT rect;
+
+ int nFlags;
+
+ HWND hwnd;
+ UINT nControlID;
+
+ int nParentIdx; // this is used to store original windowproc for LINK
+ HANDLE hImage; // this is used by image/icon field to save the handle to the image
+
+ int nField; // field number in INI file
+ char *pszHwndEntry; // "HWND" or "HWND2"
+
+ long wndProc;
+};
+
+// initial buffer size. buffers will grow as required.
+// use a value larger than MAX_PATH to prevent need for excessive growing.
+#define BUFFER_SIZE 8192 // 8kb of mem is max char count in multiedit
+
+char szBrowseButtonCaption[] = "...";
+
+HWND hConfigWindow = NULL;
+HWND hMainWindow = NULL;
+HWND hCancelButton = NULL;
+HWND hNextButton = NULL;
+HWND hBackButton = NULL;
+
+HINSTANCE m_hInstance = NULL;
+
+struct _stack_t *pFilenameStackEntry = NULL;
+
+char *pszFilename = NULL;
+char *pszTitle = NULL;
+char *pszCancelButtonText = NULL;
+char *pszNextButtonText = NULL;
+char *pszBackButtonText = NULL;
+
+int bBackEnabled = FALSE;
+int bCancelEnabled = FALSE; // by ORTIM: 13-August-2002
+int bCancelShow = FALSE; // by ORTIM: 13-August-2002
+
+int bRTL = FALSE;
+
+FieldType *pFields = NULL;
+#define DEFAULT_RECT 1018
+int nRectId = 0;
+int nNumFields = 0;
+int g_done;
+int g_NotifyField; // Field number of notifying control
+
+int WINAPI FindControlIdx(UINT id)
+{
+ for (int nIdx = 0; nIdx < nNumFields; nIdx++)
+ if (id == pFields[nIdx].nControlID)
+ return nIdx;
+ return -1;
+}
+
+LRESULT WINAPI mySendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
+{
+ return SendMessage(hWnd, Msg, wParam, lParam);
+}
+
+void WINAPI mySetFocus(HWND hWnd)
+{
+ mySendMessage(hMainWindow, WM_NEXTDLGCTL, (WPARAM)hWnd, TRUE);
+}
+
+void WINAPI mySetWindowText(HWND hWnd, LPCTSTR pszText)
+{
+ if (pszText)
+ SetWindowText(hWnd, pszText);
+}
+
+int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) {
+ static TCHAR szDir[MAX_PATH];
+
+ if (uMsg == BFFM_INITIALIZED &&
+ GetWindowText(pFields[(int)pData].hwnd, szDir, MAX_PATH) > 0)
+ mySendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)szDir);
+ return 0;
+}
+
+
+bool INLINE ValidateFields() {
+ int nIdx;
+ int nLength;
+
+ // In the unlikely event we can't allocate memory, go ahead and return true so we can get out of here.
+ // May cause problems for the install script, but no memory is problems for us.
+ for (nIdx = 0; nIdx < nNumFields; nIdx++) {
+ FieldType *pField = pFields + nIdx;
+ // this if statement prevents a stupid bug where a min/max length is assigned to a label control
+ // where the user obviously has no way of changing what is displayed. (can you say, "infinite loop"?)
+ if (pField->nType >= FIELD_CHECKLEN) {
+ nLength = mySendMessage(pField->hwnd, WM_GETTEXTLENGTH, 0, 0);
+
+ if (((pField->nMaxLength > 0) && (nLength > pField->nMaxLength)) ||
+ ((pField->nMinLength > 0) && (nLength < pField->nMinLength))) {
+ if (pField->pszValidateText) {
+ char szTitle[1024];
+ GetWindowText(hMainWindow, szTitle, sizeof(szTitle));
+ MessageBox(hConfigWindow, pField->pszValidateText, szTitle, MB_OK|MB_ICONWARNING);
+ }
+ mySetFocus(pField->hwnd);
+ return false;
+ }
+
+ }
+ }
+ return true;
+}
+
+bool WINAPI SaveSettings(void) {
+ static char szField[25];
+ int nBufLen = BUFFER_SIZE;
+ char *pszBuffer = (char*)MALLOC(nBufLen);
+ if (!pszBuffer) return false;
+
+ int nIdx;
+ int CurrField;
+ for (nIdx = 0, CurrField = 1; nIdx < nNumFields; nIdx++, CurrField++) {
+ FieldType *pField = pFields + nIdx;
+ HWND hwnd = pField->hwnd;
+ switch (pField->nType) {
+ case FIELD_BROWSEBUTTON:
+ if (g_NotifyField > CurrField)
+ --g_NotifyField;
+ --CurrField;
+ default:
+ continue;
+
+ case FIELD_CHECKBOX:
+ case FIELD_RADIOBUTTON:
+ wsprintf(pszBuffer, "%d", !!mySendMessage(hwnd, BM_GETCHECK, 0, 0));
+ break;
+
+ case FIELD_LISTBOX:
+ {
+ // Ok, this one requires a bit of work.
+ // First, we allocate a buffer long enough to hold every item.
+ // Then, we loop through every item and if it's selected we add it to our buffer.
+ // If there is already an item in the list, then we prepend a | character before the new item.
+ // We could simplify for single-select boxes, but using one piece of code saves some space.
+ int nLength = lstrlen(pField->pszListItems) + 10;
+ if (nLength > nBufLen) {
+ FREE(pszBuffer);
+ nBufLen = nLength;
+ pszBuffer = (char*)MALLOC(nBufLen);
+ if (!pszBuffer) return false;
+ }
+ char *pszItem = (char*)MALLOC(nBufLen);
+ if (!pszItem) return false;
+
+ *pszBuffer = '\0';
+ int nNumItems = mySendMessage(hwnd, LB_GETCOUNT, 0, 0);
+ for (int nIdx2 = 0; nIdx2 < nNumItems; nIdx2++) {
+ if (mySendMessage(hwnd, LB_GETSEL, nIdx2, 0) > 0) {
+ if (*pszBuffer) lstrcat(pszBuffer, "|");
+ mySendMessage(hwnd, LB_GETTEXT, (WPARAM)nIdx2, (LPARAM)pszItem);
+ lstrcat(pszBuffer, pszItem);
+ }
+ }
+
+ FREE(pszItem);
+ break;
+ }
+
+ case FIELD_TEXT:
+ case FIELD_FILEREQUEST:
+ case FIELD_DIRREQUEST:
+ case FIELD_COMBOBOX:
+ {
+ int nLength = mySendMessage(pField->hwnd, WM_GETTEXTLENGTH, 0, 0);
+ if (nLength > nBufLen) {
+ FREE(pszBuffer);
+ // add a bit extra so we do this less often
+ nBufLen = nLength + 20;
+ pszBuffer = (char*)MALLOC(nBufLen);
+ if (!pszBuffer) return false;
+ }
+ *pszBuffer='"';
+ GetWindowText(hwnd, pszBuffer+1, nBufLen-1);
+ pszBuffer[nLength+1]='"';
+ pszBuffer[nLength+2]='\0';
+
+ if (pField->nType == FIELD_TEXT && (pField->nFlags & FLAG_MULTILINE))
+ {
+ char *pszBuf2 = (char*)MALLOC(nBufLen*2); // double the size, consider the worst case, all chars are \r\n
+ char *p1, *p2;
+ for (p1 = pszBuffer, p2 = pszBuf2; *p1; p1 = CharNext(p1), p2 = CharNext(p2))
+ {
+ switch (*p1) {
+ case '\t':
+ *(LPWORD)p2 = CHAR2_TO_WORD('\\', 't');
+ p2++;
+ break;
+ case '\n':
+ *(LPWORD)p2 = CHAR2_TO_WORD('\\', 'n');
+ p2++;
+ break;
+ case '\r':
+ *(LPWORD)p2 = CHAR2_TO_WORD('\\', 'r');
+ p2++;
+ break;
+ case '\\':
+ *p2++ = '\\';
+ default:
+ lstrcpyn(p2, p1, CharNext(p1) - p1 + 1);
+ break;
+ }
+ }
+ *p2 = 0;
+ nBufLen = nBufLen*2;
+ FREE(pszBuffer);
+ pszBuffer=pszBuf2;
+ }
+ break;
+ }
+ }
+ wsprintf(szField, "Field %d", CurrField);
+ WritePrivateProfileString(szField, "State", pszBuffer, pszFilename);
+ }
+
+ // Tell NSIS which control was activated, if any
+ wsprintf(pszBuffer, "%d", g_NotifyField);
+ WritePrivateProfileString("Settings", "State", pszBuffer, pszFilename);
+
+ FREE(pszBuffer);
+
+ return true;
+}
+
+#define BROWSE_WIDTH 15
+
+static char szResult[BUFFER_SIZE];
+char *pszAppName;
+
+DWORD WINAPI myGetProfileString(LPCTSTR lpKeyName)
+{
+ *szResult = '\0';
+ return GetPrivateProfileString(pszAppName, lpKeyName, "", szResult, BUFFER_SIZE, pszFilename);
+}
+
+char * WINAPI myGetProfileStringDup(LPCTSTR lpKeyName)
+{
+ int nSize = myGetProfileString(lpKeyName);
+ if (nSize)
+ return strdup(szResult);
+ else
+ return NULL;
+}
+
+UINT WINAPI myGetProfileInt(LPCTSTR lpKeyName, INT nDefault)
+{
+ return GetPrivateProfileInt(pszAppName, lpKeyName, nDefault, pszFilename);
+}
+
+int WINAPI ReadSettings(void) {
+ static char szField[25];
+ int nIdx, nCtrlIdx;
+
+ pszAppName = "Settings";
+ pszTitle = myGetProfileStringDup("Title");
+ pszCancelButtonText = myGetProfileStringDup("CancelButtonText");
+ pszNextButtonText = myGetProfileStringDup("NextButtonText");
+ pszBackButtonText = myGetProfileStringDup("BackButtonText");
+
+ nNumFields = myGetProfileInt("NumFields", 0);
+
+ nRectId = myGetProfileInt("Rect", DEFAULT_RECT);
+
+ bBackEnabled = myGetProfileInt("BackEnabled", -1);
+ // by ORTIM: 13-August-2002
+ bCancelEnabled = myGetProfileInt("CancelEnabled", -1);
+ bCancelShow = myGetProfileInt("CancelShow", -1);
+
+ bRTL = myGetProfileInt("RTL", 0);
+
+ if (nNumFields > 0) {
+ // make this twice as large for the worst case that every control is a browse button.
+ // the structure is small enough that this won't waste much memory.
+ // if the structure gets much larger, we should switch to a linked list.
+ pFields = (FieldType *)MALLOC(sizeof(FieldType)*2*nNumFields);
+ }
+
+ for (nIdx = 0, nCtrlIdx = 0; nCtrlIdx < nNumFields; nCtrlIdx++, nIdx++) {
+ // Control types
+ static TableEntry TypeTable[] = {
+ { "LABEL", FIELD_LABEL },
+ { "TEXT", FIELD_TEXT },
+ { "PASSWORD", FIELD_TEXT },
+ { "LISTBOX", FIELD_LISTBOX },
+ { "COMBOBOX", FIELD_COMBOBOX },
+ { "DROPLIST", FIELD_COMBOBOX },
+ { "FILEREQUEST", FIELD_FILEREQUEST },
+ { "DIRREQUEST", FIELD_DIRREQUEST },
+ { "CHECKBOX", FIELD_CHECKBOX },
+ { "RADIOBUTTON", FIELD_RADIOBUTTON },
+ { "ICON", FIELD_ICON },
+ { "BITMAP", FIELD_BITMAP },
+ { "GROUPBOX", FIELD_GROUPBOX },
+#ifdef IO_ENABLE_LINK
+ { "LINK", FIELD_LINK },
+#else
+ { "LINK", FIELD_LABEL },
+#endif
+ { "BUTTON", FIELD_BUTTON },
+ { "HLINE", FIELD_HLINE },
+ { "VLINE", FIELD_VLINE },
+ { NULL, 0 }
+ };
+ // Control flags
+ static TableEntry FlagTable[] = {
+ { "NOTIFY", LBS_NOTIFY },
+ { "WARN_IF_EXIST", OFN_OVERWRITEPROMPT },
+ { "FILE_HIDEREADONLY", OFN_HIDEREADONLY },
+ { "MULTISELECT", LBS_MULTIPLESEL },
+ { "READONLY", FLAG_READONLY },
+ { "RIGHT", BS_LEFTTEXT },
+ { "PASSWORD", FLAG_PASSWORD },
+ { "ONLY_NUMBERS", FLAG_ONLYNUMBERS },
+ { "MULTILINE", FLAG_MULTILINE },
+ { "NOWORDWRAP", FLAG_NOWORDWRAP },
+ { "WANTRETURN", FLAG_WANTRETURN },
+ { "EXTENDEDSELCT", LBS_EXTENDEDSEL },
+ { "PATH_MUST_EXIST", OFN_PATHMUSTEXIST },
+ { "FILE_MUST_EXIST", OFN_FILEMUSTEXIST },
+ { "PROMPT_CREATE", OFN_CREATEPROMPT },
+ { "DROPLIST", FLAG_DROPLIST },
+ { "RESIZETOFIT", FLAG_RESIZETOFIT },
+ { "NOTABSTOP", WS_TABSTOP },
+ { "GROUP", WS_GROUP },
+ { "REQ_SAVE", FLAG_SAVEAS },
+ { "FILE_EXPLORER", OFN_EXPLORER },
+ { "HSCROLL", WS_HSCROLL },
+ { "VSCROLL", WS_VSCROLL },
+ { "DISABLED", WS_DISABLED },
+ { "TRANSPARENT", TRANSPARENT_BMP },
+ { "FOCUS", FLAG_FOCUS },
+ { NULL, 0 }
+ };
+ FieldType *pField = pFields + nIdx;
+
+ pField->nField = nCtrlIdx + 1;
+ pField->pszHwndEntry = "HWND";
+
+ wsprintf(szField, "Field %d", nCtrlIdx + 1);
+ pszAppName = szField;
+
+ // Get the control type
+ myGetProfileString("TYPE");
+ pField->nType = LookupToken(TypeTable, szResult);
+ if (pField->nType == FIELD_INVALID)
+ continue;
+
+ // Lookup flags associated with the control type
+ pField->nFlags = LookupToken(FlagTable, szResult);
+ myGetProfileString("Flags");
+ pField->nFlags |= LookupTokens(FlagTable, szResult);
+
+ // pszState must not be NULL!
+ myGetProfileString("State");
+ pField->pszState = strdup(szResult);
+
+ // ListBox items list
+ {
+ int nResult = myGetProfileString("ListItems");
+ if (nResult) {
+ // add an extra | character to the end to simplify the loop where we add the items.
+ pField->pszListItems = (char*)MALLOC(nResult + 2);
+ strcpy(pField->pszListItems, szResult);
+ pField->pszListItems[nResult] = '|';
+ pField->pszListItems[nResult + 1] = '\0';
+ }
+ }
+
+ // Label Text - convert newline
+ pField->pszText = myGetProfileStringDup("TEXT");
+ if (pField->nType == FIELD_LABEL || pField->nType == FIELD_LINK)
+ ConvertNewLines(pField->pszText);
+
+ // Dir request - root folder
+ pField->pszRoot = myGetProfileStringDup("ROOT");
+
+ // ValidateText - convert newline
+ pField->pszValidateText = myGetProfileStringDup("ValidateText");
+ ConvertNewLines(pField->pszValidateText);
+
+ {
+ int nResult = GetPrivateProfileString(szField, "Filter", "All Files|*.*", szResult, sizeof(szResult), pszFilename);
+ if (nResult) {
+ // Convert the filter to the format required by Windows: NULL after each
+ // item followed by a terminating NULL
+ pField->pszFilter = (char*)MALLOC(nResult + 2);
+ strcpy(pField->pszFilter, szResult);
+ char *pszPos = pField->pszFilter;
+ while (*pszPos)
+ {
+ if (*pszPos == '|')
+ *pszPos++ = 0;
+ else
+ pszPos = CharNext(pszPos);
+ }
+ }
+ }
+
+ pField->rect.left = myGetProfileInt("LEFT", 0);
+ pField->rect.top = myGetProfileInt("TOP", 0);
+ pField->rect.right = myGetProfileInt("RIGHT", 0);
+ pField->rect.bottom = myGetProfileInt("BOTTOM", 0);
+ pField->nMinLength = myGetProfileInt("MinLen", 0);
+ pField->nMaxLength = myGetProfileInt("MaxLen", 0);
+
+ // Text color for LINK control, default is pure blue
+ pField->hImage = (HANDLE)myGetProfileInt("TxtColor", RGB(0,0,255));
+
+ pField->nControlID = 1200 + nIdx;
+ if (pField->nType == FIELD_FILEREQUEST || pField->nType == FIELD_DIRREQUEST)
+ {
+ FieldType *pNewField = &pFields[nIdx+1];
+ pNewField->nControlID = 1200 + nIdx + 1;
+ pNewField->nType = FIELD_BROWSEBUTTON;
+ pNewField->nFlags = pField->nFlags & (WS_DISABLED | WS_TABSTOP);
+ pNewField->pszText = STRDUP(szBrowseButtonCaption); // needed for generic FREE
+ pNewField->rect.right = pField->rect.right;
+ pNewField->rect.left = pNewField->rect.right - BROWSE_WIDTH;
+ pNewField->rect.bottom = pField->rect.bottom;
+ pNewField->rect.top = pField->rect.top;
+ pField->rect.right = pNewField->rect.left - 3;
+ pNewField->nField = nCtrlIdx + 1;
+ pNewField->pszHwndEntry = "HWND2";
+ nNumFields++;
+ nIdx++;
+ }
+ }
+
+ return nNumFields;
+}
+
+LRESULT WINAPI WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) {
+ int nIdx = FindControlIdx(id);
+ // Ignore if the dialog is in the process of being created
+ if (g_done || nIdx < 0)
+ return 0;
+
+ switch (pFields[nIdx].nType)
+ {
+ case FIELD_BROWSEBUTTON:
+ --nIdx;
+ case FIELD_LINK:
+ case FIELD_BUTTON:
+ case FIELD_CHECKBOX:
+ case FIELD_RADIOBUTTON:
+ if (codeNotify != BN_CLICKED)
+ return 0;
+ break;
+ case FIELD_COMBOBOX:
+ case FIELD_LISTBOX:
+ if (codeNotify != LBN_SELCHANGE) // LBN_SELCHANGE == CBN_SELCHANGE
+ return 0;
+ break;
+ default:
+ return 0;
+ }
+
+ FieldType *pField = pFields + nIdx;
+
+ char szBrowsePath[MAX_PATH];
+
+ switch (pField->nType) {
+ case FIELD_FILEREQUEST: {
+ OPENFILENAME ofn={0,};
+
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = hConfigWindow;
+ ofn.lpstrFilter = pField->pszFilter;
+ ofn.lpstrFile = szBrowsePath;
+ ofn.nMaxFile = sizeof(szBrowsePath);
+ ofn.Flags = pField->nFlags & (OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_CREATEPROMPT | OFN_EXPLORER);
+
+ GetWindowText(pField->hwnd, szBrowsePath, sizeof(szBrowsePath));
+
+ tryagain:
+ GetCurrentDirectory(BUFFER_SIZE, szResult); // save working dir
+ if ((pField->nFlags & FLAG_SAVEAS) ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)) {
+ mySetWindowText(pField->hwnd, szBrowsePath);
+ SetCurrentDirectory(szResult); // restore working dir
+ // OFN_NOCHANGEDIR doesn't always work (see MSDN)
+ break;
+ }
+ else if (szBrowsePath[0] && CommDlgExtendedError() == FNERR_INVALIDFILENAME) {
+ szBrowsePath[0] = '\0';
+ goto tryagain;
+ }
+
+ break;
+ }
+
+ case FIELD_DIRREQUEST: {
+ BROWSEINFO bi;
+
+ bi.hwndOwner = hConfigWindow;
+ bi.pidlRoot = NULL;
+ bi.pszDisplayName = szBrowsePath;
+ bi.lpszTitle = pField->pszText;
+#ifndef BIF_NEWDIALOGSTYLE
+#define BIF_NEWDIALOGSTYLE 0x0040
+#endif
+ bi.ulFlags = BIF_STATUSTEXT | BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
+ bi.lpfn = BrowseCallbackProc;
+ bi.lParam = nIdx;
+ bi.iImage = 0;
+
+ if (pField->pszRoot) {
+ LPSHELLFOLDER sf;
+ ULONG eaten;
+ LPITEMIDLIST root;
+ int ccRoot = (lstrlen(pField->pszRoot) * 2) + 2;
+ LPWSTR pwszRoot = (LPWSTR) MALLOC(ccRoot);
+ MultiByteToWideChar(CP_ACP, 0, pField->pszRoot, -1, pwszRoot, ccRoot);
+ SHGetDesktopFolder(&sf);
+ sf->ParseDisplayName(hConfigWindow, NULL, pwszRoot, &eaten, &root, NULL);
+ bi.pidlRoot = root;
+ sf->Release();
+ FREE(pwszRoot);
+ }
+ //CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ LPITEMIDLIST pResult = SHBrowseForFolder(&bi);
+ if (!pResult)
+ break;
+
+ if (SHGetPathFromIDList(pResult, szBrowsePath)) {
+ mySetWindowText(pField->hwnd, szBrowsePath);
+ }
+
+ CoTaskMemFree(pResult);
+
+ break;
+ }
+
+ case FIELD_LINK:
+ case FIELD_BUTTON:
+ // Allow the state to be empty - this might be useful in conjunction
+ // with the NOTIFY flag
+ if (*pField->pszState)
+ ShellExecute(hMainWindow, NULL, pField->pszState, NULL, NULL, SW_SHOWDEFAULT);
+ break;
+ }
+
+ if (pField->nFlags & LBS_NOTIFY) {
+ // Remember which control was activated then pretend the user clicked Next
+ g_NotifyField = nIdx + 1;
+ mySendMessage(hMainWindow, WM_NOTIFY_OUTER_NEXT, 1, 0);
+ }
+
+ return 0;
+}
+
+
+static void *lpWndProcOld;
+
+int g_is_cancel,g_is_back;
+
+BOOL CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ BOOL bRes;
+ if (message == WM_NOTIFY_OUTER_NEXT && wParam == 1)
+ {
+ // Don't call leave function if fields aren't valid
+ if (!g_NotifyField && !ValidateFields())
+ return 0;
+ // Get the settings ready for the leave function verification
+ SaveSettings();
+ // Reset the record of activated control
+ g_NotifyField = 0;
+ }
+ bRes = CallWindowProc((long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long))lpWndProcOld,hwnd,message,wParam,lParam);
+ if (message == WM_NOTIFY_OUTER_NEXT && !bRes)
+ {
+ // if leave function didn't abort (bRes != 0 in that case)
+ if (wParam == (WPARAM)-1)
+ g_is_back++;
+ if (wParam == NOTIFY_BYE_BYE)
+ g_is_cancel++;
+ g_done++;
+ PostMessage(hConfigWindow,WM_CLOSE,0,0);
+ }
+ return bRes;
+}
+
+BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ HANDLE_MSG(hwndDlg, WM_COMMAND, WMCommandProc);
+ case WM_DRAWITEM:
+ {
+ DRAWITEMSTRUCT* lpdis = (DRAWITEMSTRUCT*)lParam;
+ int nIdx = FindControlIdx(lpdis->CtlID);
+#ifdef IO_LINK_UNDERLINED
+ HFONT OldFont;
+ LOGFONT lf;
+#endif
+
+ if (nIdx < 0)
+ break;
+ FieldType *pField = pFields + nIdx;
+
+#ifdef IO_LINK_UNDERLINED
+ GetObject(GetCurrentObject(lpdis->hDC, OBJ_FONT), sizeof(lf), &lf);
+ lf.lfUnderline = TRUE;
+ OldFont = (HFONT)SelectObject(lpdis->hDC, CreateFontIndirect(&lf));
+#endif
+
+ // We need lpdis->rcItem later
+ RECT rc = lpdis->rcItem;
+
+ // Calculate needed size of the control
+ DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT);
+
+ // Make some more room so the focus rect won't cut letters off
+ rc.right = min(rc.right + 2, lpdis->rcItem.right);
+
+ // Move rect to right if in RTL mode
+ if (bRTL)
+ {
+ rc.left += lpdis->rcItem.right - rc.right;
+ rc.right += lpdis->rcItem.right - rc.right;
+ }
+
+ if (lpdis->itemAction & ODA_DRAWENTIRE)
+ {
+ // Get TxtColor unless the user has set another using SetCtlColors
+ if (!GetWindowLong(lpdis->hwndItem, GWL_USERDATA))
+ SetTextColor(lpdis->hDC, (COLORREF) pField->hImage);
+
+ // Draw the text
+ DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | (bRTL ? DT_RTLREADING : 0));
+ }
+
+ // Draw the focus rect if needed
+ if (((lpdis->itemState & ODS_FOCUS) && (lpdis->itemAction & ODA_DRAWENTIRE)) || (lpdis->itemAction & ODA_FOCUS))
+ {
+ // NB: when not in DRAWENTIRE mode, this will actually toggle the focus
+ // rectangle since it's drawn in a XOR way
+ DrawFocusRect(lpdis->hDC, &rc);
+ }
+
+ pField->rect = rc;
+
+#ifdef IO_LINK_UNDERLINED
+ DeleteObject(SelectObject(lpdis->hDC, OldFont));
+#endif
+ break;
+ }
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLOREDIT:
+ case WM_CTLCOLORDLG:
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORLISTBOX:
+ // let the NSIS window handle colors, it knows best
+ return mySendMessage(hMainWindow, uMsg, wParam, lParam);
+ }
+ return 0;
+}
+
+#ifdef IO_ENABLE_LINK
+
+#ifndef IDC_HAND
+#define IDC_HAND MAKEINTRESOURCE(32649)
+#endif
+
+#ifndef BS_TYPEMASK
+#define BS_TYPEMASK 0x0000000FL
+#endif
+
+// pFields[nIdx].nParentIdx is used to store original windowproc
+int WINAPI StaticLINKWindowProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ int StaticField = FindControlIdx(GetDlgCtrlID(hWin));
+ if (StaticField < 0)
+ return 0;
+ FieldType *pField = pFields + StaticField;
+
+ switch(uMsg)
+ {
+ case WM_GETDLGCODE:
+ // Pretend we are a normal button/default button as appropriate
+ return DLGC_BUTTON | ((pField->nFlags & FLAG_WANTRETURN) ? DLGC_DEFPUSHBUTTON : DLGC_UNDEFPUSHBUTTON);
+
+ case BM_SETSTYLE:
+ // Detect when we are becoming the default button but don't lose the owner-draw style
+ if ((wParam & BS_TYPEMASK) == BS_DEFPUSHBUTTON)
+ pField->nFlags |= FLAG_WANTRETURN; // Hijack this flag to indicate default button status
+ else
+ pField->nFlags &= ~FLAG_WANTRETURN;
+ wParam = (wParam & ~BS_TYPEMASK) | BS_OWNERDRAW;
+ break;
+
+ case WM_NCHITTEST:
+ {
+ POINT pt = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)};
+ MapWindowPoints(0, hWin, &pt, 1);
+ if (PtInRect(&pField->rect, pt))
+ return HTCLIENT;
+ else
+ return HTNOWHERE;
+ }
+
+ case WM_SETCURSOR:
+ {
+ if ((HWND)wParam == hWin && LOWORD(lParam) == HTCLIENT)
+ {
+ HCURSOR hCur = LoadCursor(NULL, IDC_HAND);
+ if (hCur)
+ {
+ SetCursor(hCur);
+ return 1; // halt further processing
+ }
+ }
+ }
+ }
+ return CallWindowProc((WNDPROC)pField->nParentIdx, hWin, uMsg, wParam, lParam);
+}
+#endif
+
+int WINAPI NumbersOnlyPasteWndProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ int nIdx = FindControlIdx(GetDlgCtrlID(hWin));
+ if (nIdx < 0)
+ return 0;
+
+ FieldType *pField = pFields + nIdx;
+
+ if (uMsg == WM_PASTE)
+ {
+ if (OpenClipboard(hWin))
+ {
+ HGLOBAL hData = GetClipboardData(CF_TEXT);
+
+ if (hData)
+ {
+ char *lpData = (char *) GlobalLock(hData);
+ if (lpData)
+ {
+ int iLen = lstrlen(lpData);
+ char *lpFilteredData = (char *) MALLOC(iLen + 1);
+
+ if (lpFilteredData)
+ {
+ for (int i = 0, j = 0; i < iLen; i++)
+ {
+ if (lpData[i] >= '0' && lpData[i] <= '9')
+ {
+ lpFilteredData[j] = lpData[i];
+ j++;
+ }
+ lpFilteredData[j] = 0;
+ }
+
+ SendMessage(hWin, EM_REPLACESEL, TRUE, (LPARAM) lpFilteredData);
+ FREE(lpFilteredData);
+ }
+
+ GlobalUnlock(hData);
+ }
+ }
+
+ CloseClipboard();
+
+ return 0;
+ }
+ }
+
+ return CallWindowProc((WNDPROC) pField->wndProc, hWin, uMsg, wParam, lParam);
+}
+
+int old_cancel_visible;
+
+int WINAPI createCfgDlg()
+{
+ g_is_back=0;
+ g_is_cancel=0;
+
+ HWND mainwnd = hMainWindow;
+ if (!mainwnd)
+ {
+ popstring(NULL);
+ pushstring("error finding mainwnd");
+ return 1; // cannot be used in silent mode unfortunately.
+ }
+
+ if (!g_stacktop || !*g_stacktop || !(pszFilename = (*g_stacktop)->text) || !pszFilename[0] || !ReadSettings())
+ {
+ popstring(NULL);
+ pushstring("error finding config");
+ return 1;
+ }
+
+ HWND childwnd=GetDlgItem(mainwnd,nRectId);
+ if (!childwnd)
+ {
+ popstring(NULL);
+ pushstring("error finding childwnd");
+ return 1;
+ }
+
+ hCancelButton = GetDlgItem(mainwnd,IDCANCEL);
+ hNextButton = GetDlgItem(mainwnd,IDOK);
+ hBackButton = GetDlgItem(mainwnd,3);
+
+ mySetWindowText(hCancelButton,pszCancelButtonText);
+ mySetWindowText(hNextButton,pszNextButtonText);
+ mySetWindowText(hBackButton,pszBackButtonText);
+
+ if (bBackEnabled!=-1) EnableWindow(hBackButton,bBackEnabled);
+ if (bCancelEnabled!=-1)
+ {
+ EnableWindow(hCancelButton,bCancelEnabled);
+ if (bCancelEnabled)
+ EnableMenuItem(GetSystemMenu(mainwnd, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
+ else
+ EnableMenuItem(GetSystemMenu(mainwnd, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
+ }
+ if (bCancelShow!=-1) old_cancel_visible=ShowWindow(hCancelButton,bCancelShow?SW_SHOWNA:SW_HIDE);
+
+ HFONT hFont = (HFONT)mySendMessage(mainwnd, WM_GETFONT, 0, 0);
+
+ // Prevent WM_COMMANDs from being processed while we are building
+ g_done = 1;
+
+ int mainWndWidth, mainWndHeight;
+ hConfigWindow=CreateDialog(m_hInstance,MAKEINTRESOURCE(IDD_DIALOG1),mainwnd,cfgDlgProc);
+ if (hConfigWindow)
+ {
+ RECT dialog_r;
+ GetWindowRect(childwnd,&dialog_r);
+ MapWindowPoints(0, mainwnd, (LPPOINT) &dialog_r, 2);
+ mainWndWidth = dialog_r.right - dialog_r.left;
+ mainWndHeight = dialog_r.bottom - dialog_r.top;
+ SetWindowPos(
+ hConfigWindow,
+ 0,
+ dialog_r.left,
+ dialog_r.top,
+ mainWndWidth,
+ mainWndHeight,
+ SWP_NOZORDER|SWP_NOACTIVATE
+ );
+ // Sets the font of IO window to be the same as the main window
+ mySendMessage(hConfigWindow, WM_SETFONT, (WPARAM)hFont, TRUE);
+ }
+ else
+ {
+ popstring(NULL);
+ pushstring("error creating dialog");
+ return 1;
+ }
+
+ BOOL fFocused = FALSE;
+ BOOL fFocusedByFlag = FALSE;
+
+#define DEFAULT_STYLES (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS)
+#define RTL_EX_STYLES (WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR)
+
+ for (int nIdx = 0; nIdx < nNumFields; nIdx++) {
+ static struct {
+ char* pszClass;
+ DWORD dwStyle;
+ DWORD dwRTLStyle;
+ DWORD dwExStyle;
+ DWORD dwRTLExStyle;
+ } ClassTable[] = {
+ { "STATIC", // FIELD_HLINE
+ DEFAULT_STYLES | SS_ETCHEDHORZ | SS_SUNKEN,
+ DEFAULT_STYLES | SS_ETCHEDHORZ | SS_SUNKEN,
+ WS_EX_TRANSPARENT,
+ WS_EX_TRANSPARENT | RTL_EX_STYLES },
+ { "STATIC", // FIELD_VLINE
+ DEFAULT_STYLES | SS_ETCHEDVERT | SS_SUNKEN,
+ DEFAULT_STYLES | SS_ETCHEDVERT | SS_SUNKEN,
+ WS_EX_TRANSPARENT,
+ WS_EX_TRANSPARENT | RTL_EX_STYLES },
+ { "STATIC", // FIELD_LABEL
+ DEFAULT_STYLES,
+ DEFAULT_STYLES | SS_RIGHT,
+ WS_EX_TRANSPARENT,
+ WS_EX_TRANSPARENT | RTL_EX_STYLES },
+ { "STATIC", // FIELD_ICON
+ DEFAULT_STYLES | SS_ICON,
+ DEFAULT_STYLES | SS_ICON,
+ 0,
+ RTL_EX_STYLES },
+ { "STATIC", // FIELD_BITMAP
+ DEFAULT_STYLES | SS_BITMAP,
+ DEFAULT_STYLES | SS_BITMAP,
+ 0,
+ RTL_EX_STYLES },
+ { "BUTTON", // FIELD_BROWSEBUTTON
+ DEFAULT_STYLES | WS_TABSTOP,
+ DEFAULT_STYLES | WS_TABSTOP,
+ 0,
+ RTL_EX_STYLES },
+ { "BUTTON", // FIELD_LINK
+ DEFAULT_STYLES | WS_TABSTOP | BS_OWNERDRAW,
+ DEFAULT_STYLES | WS_TABSTOP | BS_OWNERDRAW | BS_RIGHT,
+ 0,
+ RTL_EX_STYLES },
+ { "BUTTON", // FIELD_BUTTON
+ DEFAULT_STYLES | WS_TABSTOP,
+ DEFAULT_STYLES | WS_TABSTOP,
+ 0,
+ RTL_EX_STYLES },
+ { "BUTTON", // FIELD_GROUPBOX
+ DEFAULT_STYLES | BS_GROUPBOX,
+ DEFAULT_STYLES | BS_GROUPBOX | BS_RIGHT,
+ WS_EX_TRANSPARENT,
+ WS_EX_TRANSPARENT | RTL_EX_STYLES },
+ { "BUTTON", // FIELD_CHECKBOX
+ DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTOCHECKBOX | BS_MULTILINE,
+ DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTOCHECKBOX | BS_MULTILINE | BS_RIGHT | BS_LEFTTEXT,
+ 0,
+ RTL_EX_STYLES },
+ { "BUTTON", // FIELD_RADIOBUTTON
+ DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTORADIOBUTTON | BS_MULTILINE,
+ DEFAULT_STYLES | WS_TABSTOP | BS_TEXT | BS_VCENTER | BS_AUTORADIOBUTTON | BS_MULTILINE | BS_RIGHT | BS_LEFTTEXT,
+ 0,
+ RTL_EX_STYLES },
+ { "EDIT", // FIELD_TEXT
+ DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL,
+ DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL | ES_RIGHT,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | RTL_EX_STYLES },
+ { "EDIT", // FIELD_FILEREQUEST
+ DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL,
+ DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL | ES_RIGHT,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | RTL_EX_STYLES },
+ { "EDIT", // FIELD_DIRREQUEST
+ DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL,
+ DEFAULT_STYLES | WS_TABSTOP | ES_AUTOHSCROLL | ES_RIGHT,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | RTL_EX_STYLES },
+ { "COMBOBOX", // FIELD_COMBOBOX
+ DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | WS_CLIPCHILDREN | CBS_AUTOHSCROLL | CBS_HASSTRINGS,
+ DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | WS_CLIPCHILDREN | CBS_AUTOHSCROLL | CBS_HASSTRINGS,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_RIGHT | RTL_EX_STYLES },
+ { "LISTBOX", // FIELD_LISTBOX
+ DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT,
+ DEFAULT_STYLES | WS_TABSTOP | WS_VSCROLL | LBS_DISABLENOSCROLL | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE,
+ WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_RIGHT | RTL_EX_STYLES }
+ };
+
+ FieldType *pField = pFields + nIdx;
+
+#undef DEFAULT_STYLES
+
+ if (pField->nType < 1 || pField->nType > (int)(sizeof(ClassTable) / sizeof(ClassTable[0])))
+ continue;
+
+ DWORD dwStyle, dwExStyle;
+ if (bRTL) {
+ dwStyle = ClassTable[pField->nType - 1].dwRTLStyle;
+ dwExStyle = ClassTable[pField->nType - 1].dwRTLExStyle;
+ }
+ else {
+ dwStyle = ClassTable[pField->nType - 1].dwStyle;
+ dwExStyle = ClassTable[pField->nType - 1].dwExStyle;
+ }
+
+ // Convert from dialog units
+
+ RECT rect = pField->rect;
+ // MapDialogRect uses the font used when a dialog is created, and ignores
+ // any subsequent WM_SETFONT messages (like we used above); so use the main
+ // NSIS window for the conversion, instead of this one.
+ MapDialogRect(mainwnd, &rect);
+
+ if (pField->rect.left < 0)
+ rect.left += mainWndWidth;
+ if (pField->rect.right < 0)
+ rect.right += mainWndWidth;
+ if (pField->rect.top < 0)
+ rect.top += mainWndHeight;
+ if (pField->rect.bottom < 0)
+ rect.bottom += mainWndHeight;
+
+ if (bRTL) {
+ int right = rect.right;
+ rect.right = mainWndWidth - rect.left;
+ rect.left = mainWndWidth - right;
+ }
+
+ char *title = pField->pszText;
+ switch (pField->nType) {
+ case FIELD_ICON:
+ case FIELD_BITMAP:
+ title = NULL; // otherwise it is treated as the name of a resource
+ break;
+ case FIELD_CHECKBOX:
+ case FIELD_RADIOBUTTON:
+ dwStyle ^= pField->nFlags & BS_LEFTTEXT;
+ break;
+ case FIELD_TEXT:
+ case FIELD_FILEREQUEST:
+ case FIELD_DIRREQUEST:
+ if (pField->nFlags & FLAG_PASSWORD)
+ dwStyle |= ES_PASSWORD;
+ if (pField->nFlags & FLAG_ONLYNUMBERS)
+ dwStyle |= ES_NUMBER;
+ if (pField->nFlags & FLAG_WANTRETURN)
+ dwStyle |= ES_WANTRETURN;
+ if (pField->nFlags & FLAG_READONLY)
+ dwStyle |= ES_READONLY;
+ title = pField->pszState;
+ if (pField->nFlags & FLAG_MULTILINE)
+ {
+ dwStyle |= ES_MULTILINE | ES_AUTOVSCROLL;
+ // Enable word-wrap unless we have a horizontal scroll bar
+ // or it has been explicitly disallowed
+ if (!(pField->nFlags & (WS_HSCROLL | FLAG_NOWORDWRAP)))
+ dwStyle &= ~ES_AUTOHSCROLL;
+ ConvertNewLines(pField->pszState);
+ // If multiline-readonly then hold the text back until after the
+ // initial focus has been set. This is so the text is not initially
+ // selected - useful for License Page look-a-likes.
+ if (pField->nFlags & FLAG_READONLY)
+ title = NULL;
+ }
+ break;
+ case FIELD_COMBOBOX:
+ dwStyle |= (pField->nFlags & FLAG_DROPLIST) ? CBS_DROPDOWNLIST : CBS_DROPDOWN;
+ title = pField->pszState;
+ break;
+ case FIELD_LISTBOX:
+ dwStyle |= pField->nFlags & (LBS_NOTIFY | LBS_MULTIPLESEL | LBS_EXTENDEDSEL);
+ break;
+ }
+
+ dwStyle |= pField->nFlags & (WS_GROUP | WS_HSCROLL | WS_VSCROLL | WS_DISABLED);
+ if (pField->nFlags & WS_TABSTOP) dwStyle &= ~WS_TABSTOP;
+
+ HWND hwCtrl = pField->hwnd = CreateWindowEx(
+ dwExStyle,
+ ClassTable[pField->nType - 1].pszClass,
+ title,
+ dwStyle,
+ rect.left,
+ rect.top,
+ rect.right - rect.left,
+ rect.bottom - rect.top,
+ hConfigWindow,
+ (HMENU)pField->nControlID,
+ m_hInstance,
+ NULL
+ );
+
+ {
+ char szField[64];
+ char szHwnd[64];
+ wsprintf(szField, "Field %d", pField->nField);
+ wsprintf(szHwnd, "%d", hwCtrl);
+ WritePrivateProfileString(szField, pField->pszHwndEntry, szHwnd, pszFilename);
+ }
+
+ if (hwCtrl) {
+ // Sets the font of IO window to be the same as the main window
+ mySendMessage(hwCtrl, WM_SETFONT, (WPARAM)hFont, TRUE);
+ // make sure we created the window, then set additional attributes
+ switch (pField->nType) {
+ case FIELD_TEXT:
+ case FIELD_FILEREQUEST:
+ case FIELD_DIRREQUEST:
+ mySendMessage(hwCtrl, EM_LIMITTEXT, (WPARAM)pField->nMaxLength, (LPARAM)0);
+ if (dwStyle & ES_NUMBER)
+ {
+ pField->wndProc = GetWindowLong(hwCtrl, GWL_WNDPROC);
+ SetWindowLong(hwCtrl, GWL_WNDPROC, (long) NumbersOnlyPasteWndProc);
+ }
+ break;
+
+ case FIELD_CHECKBOX:
+ case FIELD_RADIOBUTTON:
+ if (pField->pszState[0] == '1')
+ mySendMessage(hwCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
+ break;
+
+ case FIELD_COMBOBOX:
+ case FIELD_LISTBOX:
+ // if this is a listbox or combobox, we need to add the list items.
+ if (pField->pszListItems) {
+ UINT nAddMsg, nFindMsg, nSetSelMsg;
+ if (pField->nType == FIELD_COMBOBOX) {
+ nAddMsg = CB_ADDSTRING;
+ nFindMsg = CB_FINDSTRINGEXACT;
+ nSetSelMsg = CB_SETCURSEL;
+ }
+ else {
+ nAddMsg = LB_ADDSTRING;
+ nFindMsg = LB_FINDSTRINGEXACT;
+ nSetSelMsg = LB_SETCURSEL;
+ }
+ char *pszStart, *pszEnd, *pszList;
+ pszStart = pszEnd = pszList = STRDUP(pField->pszListItems);
+ // pszListItems has a trailing pipe
+ while (*pszEnd) {
+ if (*pszEnd == '|') {
+ *pszEnd = '\0';
+ if (*pszStart)
+ mySendMessage(hwCtrl, nAddMsg, 0, (LPARAM) pszStart);
+ pszStart = ++pszEnd;
+ }
+ else
+ pszEnd = CharNext(pszEnd);
+ }
+ FREE(pszList);
+ if (pField->pszState) {
+ if (pField->nFlags & (LBS_MULTIPLESEL|LBS_EXTENDEDSEL) && nFindMsg == LB_FINDSTRINGEXACT) {
+ mySendMessage(hwCtrl, LB_SETSEL, FALSE, (LPARAM)-1);
+ pszStart = pszEnd = pField->pszState;
+ for (;;) {
+ char c = *pszEnd;
+ if (c == '|' || c == '\0') {
+ *pszEnd = '\0';
+ if (*pszStart)
+ {
+ int nItem = mySendMessage(hwCtrl, LB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)pszStart);
+ if (nItem != LB_ERR)
+ mySendMessage(hwCtrl, LB_SETSEL, TRUE, nItem);
+ }
+ if (!c)
+ break;
+ pszStart = ++pszEnd;
+ }
+ else
+ pszEnd = CharNext(pszEnd);
+ }
+ }
+ else {
+ int nItem = mySendMessage(hwCtrl, nFindMsg, (WPARAM)-1, (LPARAM)pField->pszState);
+ if (nItem != CB_ERR) { // CB_ERR == LB_ERR == -1
+ mySendMessage(hwCtrl, nSetSelMsg, nItem, 0);
+ }
+ }
+ }
+ }
+ break;
+
+ case FIELD_ICON:
+ case FIELD_BITMAP:
+ {
+ WPARAM nImageType = pField->nType == FIELD_BITMAP ? IMAGE_BITMAP : IMAGE_ICON;
+ LPARAM nImage = 0;
+
+ if (pField->pszText) {
+ pField->hImage = LoadImage(
+ m_hInstance,
+ pField->pszText,
+ nImageType,
+ (pField->nFlags & FLAG_RESIZETOFIT)
+ ? (rect.right - rect.left)
+ : 0,
+ (pField->nFlags & FLAG_RESIZETOFIT)
+ ? (rect.bottom - rect.top)
+ : 0,
+ LR_LOADFROMFILE
+ );
+ nImage = (LPARAM)pField->hImage;
+ }
+ else
+ nImage = (LPARAM)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(103));
+
+ if ((pField->nFlags & TRANSPARENT_BMP) && nImageType == IMAGE_BITMAP)
+ {
+ // based on AdvSplash's SetTransparentRegion
+ BITMAP bm;
+ HBITMAP hBitmap = (HBITMAP) nImage;
+
+ if (GetObject(hBitmap, sizeof(bm), &bm))
+ {
+ HDC dc;
+ int x, y;
+ HRGN region, cutrgn;
+ BITMAPINFO bmi;
+ int size = bm.bmWidth * bm.bmHeight * sizeof(int);
+ int *bmp = (int *) MALLOC(size);
+ if (bmp)
+ {
+ bmi.bmiHeader.biBitCount = 32;
+ bmi.bmiHeader.biCompression = BI_RGB;
+ bmi.bmiHeader.biHeight = bm.bmHeight;
+ bmi.bmiHeader.biPlanes = 1;
+ bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmi.bmiHeader.biWidth = bm.bmWidth;
+ bmi.bmiHeader.biClrUsed = 0;
+ bmi.bmiHeader.biClrImportant = 0;
+
+ dc = CreateCompatibleDC(NULL);
+ SelectObject(dc, hBitmap);
+
+ x = GetDIBits(dc, hBitmap, 0, bm.bmHeight, bmp, &bmi, DIB_RGB_COLORS);
+
+ region = CreateRectRgn(0, 0, bm.bmWidth, bm.bmHeight);
+
+ int keycolor = *bmp & 0xFFFFFF;
+
+ // Search for transparent pixels
+ for (y = bm.bmHeight - 1; y >= 0; y--) {
+ for (x = 0; x < bm.bmWidth;) {
+ if ((*bmp & 0xFFFFFF) == keycolor) {
+ int j = x;
+ while ((x < bm.bmWidth) && ((*bmp & 0xFFFFFF) == keycolor)) {
+ bmp++, x++;
+ }
+
+ // Cut transparent pixels from the original region
+ cutrgn = CreateRectRgn(j, y, x, y + 1);
+ CombineRgn(region, region, cutrgn, RGN_XOR);
+ DeleteObject(cutrgn);
+ } else {
+ bmp++, x++;
+ }
+ }
+ }
+
+ // Set resulting region.
+ SetWindowRgn(hwCtrl, region, TRUE);
+ DeleteObject(region);
+ DeleteObject(dc);
+ FREE(bmp);
+ }
+ }
+ }
+
+ mySendMessage(
+ hwCtrl,
+ STM_SETIMAGE,
+ nImageType,
+ nImage
+ );
+
+ if (pField->nType == FIELD_BITMAP)
+ {
+ // Centre the image in the requested space.
+ // Cannot use SS_CENTERIMAGE because it behaves differently on XP to
+ // everything else. (Thank you Microsoft.)
+ RECT bmp_rect;
+ GetClientRect(hwCtrl, &bmp_rect);
+ bmp_rect.left = (rect.left + rect.right - bmp_rect.right) / 2;
+ bmp_rect.top = (rect.top + rect.bottom - bmp_rect.bottom) / 2;
+ SetWindowPos(hwCtrl, NULL, bmp_rect.left, bmp_rect.top, 0, 0,
+ SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER);
+ }
+
+ break;
+ }
+
+#ifdef IO_ENABLE_LINK
+ case FIELD_LINK:
+ pField->nParentIdx = SetWindowLong(hwCtrl, GWL_WNDPROC, (long)StaticLINKWindowProc);
+ break;
+#endif
+ }
+
+ // Set initial focus to the first appropriate field ( with FOCUS flag)
+ if (!fFocusedByFlag && (dwStyle & (WS_TABSTOP | WS_DISABLED)) == WS_TABSTOP && pField->nType >= FIELD_SETFOCUS) {
+ if (pField->nFlags & FLAG_FOCUS) {
+ fFocusedByFlag = TRUE;
+ }
+ if (!fFocused || fFocusedByFlag) {
+ fFocused = TRUE;
+ mySetFocus(hwCtrl);
+ }
+ }
+
+ // If multiline-readonly then hold the text back until after the
+ // initial focus has been set. This is so the text is not initially
+ // selected - useful for License Page look-a-likes.
+ if ((pField->nFlags & (FLAG_MULTILINE | FLAG_READONLY)) == (FLAG_MULTILINE | FLAG_READONLY))
+ mySetWindowText(hwCtrl, pField->pszState);
+ }
+ }
+
+ if (!fFocused)
+ mySetFocus(hNextButton);
+
+ mySetWindowText(mainwnd,pszTitle);
+ pFilenameStackEntry = *g_stacktop;
+ *g_stacktop = (*g_stacktop)->next;
+ static char tmp[32];
+ wsprintf(tmp,"%d",hConfigWindow);
+ pushstring(tmp);
+ return 0;
+}
+
+void WINAPI showCfgDlg()
+{
+ lpWndProcOld = (void *) SetWindowLong(hMainWindow,DWL_DLGPROC,(long)ParentWndProc);
+
+ // Tell NSIS to remove old inner dialog and pass handle of the new inner dialog
+ mySendMessage(hMainWindow, WM_NOTIFY_CUSTOM_READY, (WPARAM)hConfigWindow, 0);
+ ShowWindow(hConfigWindow, SW_SHOWNA);
+
+ g_done = g_NotifyField = 0;
+
+ while (!g_done) {
+ MSG msg;
+ GetMessage(&msg, NULL, 0, 0);
+ if (!IsDialogMessage(hConfigWindow,&msg) && !IsDialogMessage(hMainWindow,&msg))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+
+ // we don't save settings on cancel since that means your installer will likely
+ // quit soon, which means the ini might get flushed late and cause crap. :) anwyay.
+ if (!g_is_cancel) SaveSettings();
+
+ SetWindowLong(hMainWindow,DWL_DLGPROC,(long)lpWndProcOld);
+ DestroyWindow(hConfigWindow);
+
+ // by ORTIM: 13-August-2002
+ if (bCancelShow!=-1) ShowWindow(hCancelButton,old_cancel_visible?SW_SHOWNA:SW_HIDE);
+
+ FREE(pFilenameStackEntry);
+ FREE(pszTitle);
+ FREE(pszCancelButtonText);
+ FREE(pszNextButtonText);
+ FREE(pszBackButtonText);
+
+ int i = nNumFields;
+ while (i--) {
+ FieldType *pField = pFields + i;
+
+ int j = FIELD_BUFFERS;
+ while (j--)
+ FREE(((char **) pField)[j]);
+
+ if (pField->nType == FIELD_BITMAP) {
+ DeleteObject(pField->hImage);
+ }
+ if (pField->nType == FIELD_ICON) {
+ DestroyIcon((HICON)pField->hImage);
+ }
+ }
+ FREE(pFields);
+
+ pushstring(g_is_cancel?"cancel":g_is_back?"back":"success");
+}
+
+int initCalled;
+
+extern "C" void __declspec(dllexport) dialog(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ hMainWindow=hwndParent;
+ EXDLL_INIT();
+ if (initCalled) {
+ pushstring("error");
+ return;
+ }
+ if (createCfgDlg())
+ return;
+ popstring(NULL);
+ showCfgDlg();
+}
+
+extern "C" void __declspec(dllexport) initDialog(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ hMainWindow=hwndParent;
+ EXDLL_INIT();
+ if (initCalled) {
+ pushstring("error");
+ return;
+ }
+ if (createCfgDlg())
+ return;
+ initCalled++;
+}
+
+extern "C" void __declspec(dllexport) show(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ EXDLL_INIT();
+ if (!initCalled) {
+ pushstring("error");
+ return;
+ }
+ initCalled--;
+ showCfgDlg();
+}
+
+extern "C" BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ m_hInstance=(HINSTANCE) hInst;
+ return TRUE;
+}
+
+
+int WINAPI LookupToken(TableEntry* psTable_, char* pszToken_)
+{
+ for (int i = 0; psTable_[i].pszName; i++)
+ if (!stricmp(pszToken_, psTable_[i].pszName))
+ return psTable_[i].nValue;
+ return 0;
+}
+
+int WINAPI LookupTokens(TableEntry* psTable_, char* pszTokens_)
+{
+ int n = 0;
+ char *pszStart = pszTokens_;
+ char *pszEnd = pszTokens_;
+ for (;;) {
+ char c = *pszEnd;
+ if (c == '|' || c == '\0') {
+ *pszEnd = '\0';
+ n |= LookupToken(psTable_, pszStart);
+ *pszEnd = c;
+ if (!c)
+ break;
+ pszStart = ++pszEnd;
+ }
+ else
+ pszEnd = CharNext(pszEnd);
+ }
+ return n;
+}
+
+void WINAPI ConvertNewLines(char *str) {
+ char *p1, *p2, *p3;
+
+ if (!str)
+ return;
+
+ p1 = p2 = str;
+
+ while (*p1)
+ {
+ switch (*(LPWORD)p1)
+ {
+ case CHAR2_TO_WORD('\\', 't'):
+ *p2 = '\t';
+ p1 += 2;
+ p2++;
+ break;
+ case CHAR2_TO_WORD('\\', 'n'):
+ *p2 = '\n';
+ p1 += 2;
+ p2++;
+ break;
+ case CHAR2_TO_WORD('\\', 'r'):
+ *p2 = '\r';
+ p1 += 2;
+ p2++;
+ break;
+ case CHAR2_TO_WORD('\\', '\\'):
+ *p2 = '\\';
+ p1 += 2;
+ p2++;
+ break;
+ default:
+ p3 = CharNext(p1);
+ while (p1 < p3)
+ *p2++ = *p1++;
+ break;
+ }
+ }
+
+ *p2 = 0;
+}
diff --git a/Contrib/InstallOptions/Readme.html b/Contrib/InstallOptions/Readme.html
index 6a0839a..d4ef80b 100755
--- a/Contrib/InstallOptions/Readme.html
+++ b/Contrib/InstallOptions/Readme.html
@@ -1,907 +1,907 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>InstallOptions 2</title>
- <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
- <style type="text/css">
- /*<![CDATA[*/body
- {
- padding: 10px;
- background-color: #F0F0F0;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 13px;
- font-weight: normal;
- text-align: left;
- }
- p, li
- {
- font-size: 13px;
- }
- .center
- {
- text-align: center;
- }
- table
- {
- margin: auto;
- font-size: 13px;
- background-color: #FFFFFF;
- }
- .maintable
- {
- border: 2px solid #376EAB;
- }
- .parameter
- {
- font-weight: bold;
- color: #6586AC;
- }
- h1
- {
- font-size: 30px;
- color: #333333;
- font-weight: normal;
- text-align: center;
- margin-top: 20px;
- }
- h2
- {
- font-size: 20px;
- color: #7A7272;
- font-weight: normal;
- }
- h3
- {
- font-size: 17px;
- font-weight: bold;
- color: #303030;
- }
- pre
- {
- font-size: 13px;
- }
- div
- {
- margin: 20px;
- }
- a:link, a:visited, a:active
- {
- color: #294F75;
- text-decoration: none;
- }
- a:hover
- {
- color: #182634;
- text-decoration: underline;
- }
- .subtable
- {
- border: 0px;
- margin-left: 20px;
- margin-right: 20px;
- }
- .lefttable
- {
- background-color: #CCCCCC;
- vertical-align: top;
- }
- .righttable
- {
- background-color: #EEEEEE;
- vertical-align: top;
- }
- /*]]>*/</style>
-</head>
-<body>
- <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
- <tr>
- <td>
- <h1>
- InstallOptions 2</h1>
- <div>
- <p>
- The InstallOptions plug-in is deprecated. For new scripts, it is recommended to
- use the new nsDialogs plug-in instead.</p>
- </div>
- <div>
- <h2>
- Introduction</h2>
- <div>
- <p>
- InstallOptions is an NSIS plugin which allows you to create custom pages for NSIS
- installers, to prompt the user for extra information.</p>
- <p>
- The dialogs created by InstallOptions are based on INI files which define the controls
- on the dialog and their properties. These INI files can be modified from the script
- to adjust the dialogs on runtime.</p>
- <p>
- The format of INI files is described in a <a href="http://en.wikipedia.org/wiki/Ini_file">
- Wikipedia article</a>.</p>
- </div>
- <h2>
- INI file structure</h2>
- <div>
- <p>
- The INI file has one required section. This section includes the number of controls
- to be created as well as general window attributes. The INI file also includes a
- variable number of Field sections which are used to create the controls to be displayed.</p>
- <p>
- The required section is named &quot;<em>Settings</em>&quot;. It can contain the
- following values:</p>
- <table class="subtable">
- <tr>
- <td class="lefttable">
- <strong>NumFields</strong></td>
- <td class="lefttable">
- <em>(required)</em></td>
- <td class="righttable">
- The number of control elements to be displayed on the dialog window.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Title</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- If specified, gives the text to set the titlebar to. Otherwise, the titlebar text
- is not changed.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>CancelEnabled</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- If specified, overrides NSIS settings and enables or disables the cancel button.
- If set to 1, the cancel button will be enabled. If set to 0, the cancel button will
- be disabled.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>CancelShow</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- If specified, overrides NSIS settings and shows or hides the cancel button If set
- to 1, the cancel button will be shown. If set to 0, the cancel button will be hidden.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>BackEnabled</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- If specified, overrides NSIS settings and enables or disables the back button. If
- set to 1, the back button will be enabled. If set to 0, the back button will be
- disabled.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>CancelButtonText</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Overrides the text for the cancel button. If not specified, the cancel button text
- will not be changed.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>NextButtonText</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Overrides the text for the next button. If not specified, the next button text will
- not be changed.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>BackButtonText</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Overrides the text for the back button. If not specified, the back button text will
- not be changed.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Rect</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Overrides the default rect ID to run over. This will make IO resize itself according
- to a different rect than NSIS's dialogs rect.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>RTL</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- If 1 is specified the dialog will be mirrored and all texts will be aligned to the
- right. The INSTALLOPTIONS_EXTRACT macros automatically set this field to the right
- value for the current installer language as given by the NSIS string $(^RTL).</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>State</strong></td>
- <td class="lefttable">
- <em>(output)</em></td>
- <td class="righttable">
- This is not something you have to supply yourself but is set by InstallOptions,
- before calling your custom page validation function, to the field number of the
- custom Button control (or other control having the Notify flag) the user pressed,
- if any.</td>
- </tr>
- </table>
- <p>
- Each field section has the heading &quot;Field #&quot; where # must be sequential
- numbers from 1 to NumFields. Each Field section can contain the following values:</p>
- <table class="subtable">
- <tr>
- <td class="lefttable">
- <strong>Type</strong></td>
- <td class="lefttable">
- <em>(required)</em></td>
- <td class="righttable">
- Type of control to be created. Valid values are &quot;<em>Label</em>&quot;, &quot;<em>Text</em>&quot;,
- &quot;<em>Password</em>&quot;, &quot;<em>Combobox</em>&quot;, &quot;<em>DropList</em>&quot;,
- &quot;<em>Listbox</em>&quot;, &quot;<em>CheckBox</em>&quot;, &quot;<em>RadioButton</em>&quot;,
- &quot;<em>FileRequest</em>&quot;, &quot;<em>DirRequest</em>&quot; &quot;<em>Icon</em>&quot;,
- &quot;<em>Bitmap</em>&quot;, &quot;<em>GroupBox</em>&quot;, &quot;<em>HLine</em>&quot;,
- &quot;<em>VLine</em>&quot;, &quot;<em>Link</em>&quot; or &quot;<em>Button</em>&quot;.<br />
- <br />
- A &quot;<em>Label</em>&quot; is used to display static text. (i.e. a caption for
- a textbox)<br />
- A &quot;<em>Text</em>&quot; and &quot;<em>Password</em>&quot; accept text input
- from the user. &quot;<em>Password</em>&quot; masks the input with * characters.<br />
- A &quot;<em>Combobox</em>&quot; allows the user to type text not in the popup list,
- a &quot;<em>Droplist</em>&quot; only allows selection of items in the list.<br />
- A &quot;<em>Listbox</em>&quot; shows multiple items and can optionally allow the
- user to select more than one item.<br />
- A &quot;<em>CheckBox</em>&quot; control displays a check box with label.<br />
- A &quot;<em>RadioButton</em>&quot; control displays a radio button with label.<br />
- A &quot;<em>FileRequest</em>&quot; control displays a textbox and a browse button.
- Clicking the browse button will display a file requester where the user can browse
- for a file.<br />
- A &quot;<em>DirRequest</em>&quot; control displays a textbox and a browse button.
- Clicking the browse button will display a directory requester where the user can
- browse for a directory.<br />
- An &quot;<em>Icon</em>&quot; control displays an icon. Use no Text to use the installer
- icon.<br />
- A &quot;<em>Bitmap</em>&quot; control displays a bitmap.<br />
- A &quot;<em>GroupBox</em>&quot; control displays a frame to group controls.<br />
- A &quot;<em>HLine</em>&quot; control displays a horizontal line to separate controls.<br />
- A &quot;<em>VLine</em>&quot; control displays a vertical line to separate controls.<br />
- A &quot;<em>Link</em>&quot; control displays a static hot text. When the user clicks
- the control the contents of <strong>State</strong> (e.g. http://...) will be executed
- using ShellExecute. Alternatively <strong>State</strong> can be omitted and the
- <em>NOTIFY</em> flag used to have your NSIS script called. See the &quot;<em>NOTIFY</em>&quot;
- flag below for more information.<br />
- A &quot;<em>Button</em>&quot; control displays a push button that can be used in
- the same way as the &quot;<em>Link</em>&quot; control above.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Text</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Specifies the caption of a label, checkbox, or radio button control. For DirRequest
- control this specifies the title of the browse dialog. For icon and bitmaps control
- this specifies the path to the image.<br />
- <br />
- <strong>Note:</strong> For labels, \r\n will be converted to a newline. To use a
- back-slash in your text you have to escape it using another back-slash - \\. Described
- <a href="#escaping">below</a> are NSIS functions for converting text to/from this
- format.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>State</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Specifies the state of the control. This is updated when the user closes the window,
- so you can read from it from NSIS. For edit texts and dir and file request boxes,
- this is the string that is specified. For radio button and check boxes, this can
- be '0' or '1' (for unchecked or checked). For list boxes, combo boxes and drop lists
- this is the selected items separated by pipes ('|'). For Links and Buttons this
- can specify something to be executed or opened (using ShellExecute).<br />
- <br />
- <strong>Note:</strong> For Text fields with the MULTILINE flag, \r\n will be converted
- to a newline. To use a back-slash in your text you have to escape it using another
- back-slash - \\. Described <a href="#escaping">below</a> are NSIS functions for
- converting text to/from this format.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>ListItems</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- A list of items to display in a combobox, droplist, or listbox.<br />
- This is a single line of text with each item separated by a pipe character '|'</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>MaxLen</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Causes validation on the selected control to limit the maximum length of text.<br />
- If the user specifies more text than this, a message box will appear when they click
- &quot;OK&quot; and the dialog will not be dismissed.<br />
- You should not use this on a &quot;<em>combobox</em>&quot; since the user can not
- control what is selected.<br />
- This should be set to a maximum of 260 for &quot;<em>FileRequest</em>&quot; and
- &quot;<em>DirRequest</em>&quot; controls.<br />
- Ignored on &quot;<em>Label</em>&quot; controls.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>MinLen</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Causes validation on the selected control to force the user to enter a minimum amount
- of text.<br />
- If the user specifies less text than this, a message box will appear when they click
- &quot;OK&quot; and the dialog will not be dismissed.<br />
- Unlike MaxLen, this is useful for &quot;<em>Combobox</em>&quot; controls. By setting
- this to a value of &quot;1&quot; the program will force the user to select an item.<br />
- Ignored on &quot;<em>Label</em>&quot; controls.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>ValidateText</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- If the field fails the test for &quot;<em>MinLen</em>&quot; or &quot;<em>MaxLen</em>&quot;,
- a messagebox will be displayed with this text.<br />
- <br />
- <strong>Note:</strong> \r\n will be converted to a newline, two back-slashes will
- be converted to one - \\. Described <a href="#escaping">below</a> are NSIS functions
- for converting text to/from this format.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Left<br />
- Right<br />
- Top<br />
- Bottom</strong></td>
- <td class="lefttable">
- <em>(required)</em></td>
- <td class="righttable">
- The position on the dialog where this control appears. All sizes should be set in
- dialog units. To get the right dimensions for your controls, design your dialog
- using a resource editor and copy the dimensions to the INI file.<br />
- <br />
- <strong>Note:</strong> You can specify negative coordinates to specify the distance
- from the right or bottom edge.<br />
- <br />
- <strong>Note (2):</strong> For combobox or droplist, the &quot;<em>bottom</em>&quot;
- value is not used in the same way.<br />
- In this case, the bottom value is the maximum size of the window when the pop-up
- list is being displayed. All other times, the combobox is automatically sized to
- be one element tall. If you have trouble where you can not see the combobox drop-down,
- then check the bottom value and ensure it is large enough. A rough guide for the
- height required is the number of items in the list multiplied by 8, plus 20.<br />
- <br />
- <strong>Note (3):</strong> FileRequest and DirRequest controls will allocate 15
- dialog units to the browse button. Make this control wide enough the contents of
- the textbox can be seen.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Filter</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Specifies the filter to be used in the &quot;<em>FileRequest</em>&quot; control.<br />
- This is constructed by putting pairs of entries together, each item separated by
- a | character.<br />
- The first value in each pair is the text to display for the filter.<br />
- The second value is the pattern to use to match files.<br />
- For example, you might specify:<br />
- Filter=Text Files|*.txt|Programs|*.exe;*.com|All Files|*.*<br />
- If not specified, then the filter defaults to All Files|*.*<br />
- <br />
- <strong>Note:</strong> you should not put any extra spaces around the | characters.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Root</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Used by <strong>DirRequest</strong> controls to specify the root directory of the
- search. By default, this allows the user to browse any directory on the computer.
- This will limit the search to a particular directory on the system.</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>Flags</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- This specifies additional flags for the display of different controls. Each value
- should be separated by a | character, and you should be careful not to put any spaces
- around the | character.<br />
- <table class="righttable">
- <tr>
- <td class="righttable">
- <strong>Value</strong></td>
- <td class="righttable">
- <strong>Meaning</strong></td>
- </tr>
- <tr>
- <td class="righttable">
- REQ_SAVE</td>
- <td class="righttable">
- This causes &quot;<em>FileRequest</em>&quot; controls to display a Save As dialog.
- If not specified, an Open dialog is used.</td>
- </tr>
- <tr>
- <td class="righttable">
- FILE_MUST_EXIST</td>
- <td class="righttable">
- Used by &quot;<em>FileRequest</em>&quot; to determine if the selected file must
- exist.<br />
- This only applies if an &quot;Open&quot; dialog is being displayed.<br />
- This currently does not force the file to exist other than through the browse button.</td>
- </tr>
- <tr>
- <td class="righttable">
- FILE_EXPLORER</td>
- <td class="righttable">
- Used by &quot;<em>FileRequest</em>&quot;, enables new file request look (recommended)</td>
- </tr>
- <tr>
- <td class="righttable">
- FILE_HIDEREADONLY</td>
- <td class="righttable">
- Used by &quot;<em>FileRequest</em>&quot;, hides &quot;open read only&quot; checkbox
- in open dialog.</td>
- </tr>
- <tr>
- <td class="righttable">
- WARN_IF_EXIST</td>
- <td class="righttable">
- Used by &quot;<em>FileRequest</em>&quot; to display a warning message if the selected
- file already exists.<br />
- The warning message is only displayed for files selected with the browse button.</td>
- </tr>
- <tr>
- <td class="righttable">
- PATH_MUST_EXIST</td>
- <td class="righttable">
- Used by &quot;<em>FileRequest</em>&quot; to force the path to exist. Prevents the
- user from typing a non-existent path into the browse dialog window.<br />
- This only validates path's selected with the browse button.</td>
- </tr>
- <tr>
- <td class="righttable">
- PROMPT_CREATE</td>
- <td class="righttable">
- Used by &quot;<em>FileRequest</em>&quot; to display a warning if the selected file
- does not exist. However, it still allows the user to select the file.<br />
- This only displays the warning for files selected with the browse button.<br />
- Doesn't work along with REQ_SAVE.</td>
- </tr>
- <tr>
- <td class="righttable">
- RIGHT</td>
- <td class="righttable">
- Used by &quot;<em>Checkbox</em>&quot; and &quot;<em>Radiobutton</em>&quot; controls
- to specify you want the checkbox to the right of the text instead of the left as
- is the default.</td>
- </tr>
- <tr>
- <td class="righttable">
- MULTISELECT</td>
- <td class="righttable">
- Used by &quot;<em>Listbox</em>&quot; controls. Turns string selection on or off
- each time the user clicks or double-clicks a string in the list box. The user can
- select any number of strings. If this flag and EXTENDEDSELCT are not specified,
- only one item can be selected from the list.</td>
- </tr>
- <tr>
- <td class="righttable">
- EXTENDEDSELCT</td>
- <td class="righttable">
- Used by &quot;<em>Listbox</em>&quot; controls. Allows multiple items to be selected
- by using the SHIFT key and the mouse or special key combinations. If this flag and
- MULTISELECT are not specified, only one item can be selected from the list.</td>
- </tr>
- <tr>
- <td class="righttable">
- RESIZETOFIT</td>
- <td class="righttable">
- This causes &quot;<em>Bitmap</em>&quot; controls to resize the image to the size
- of the control. Also useful to support custom DPI settings. Without this, the image
- will be centered within the specified area.</td>
- </tr>
- <td class="righttable">
- TRANSPARENT</td>
- <td class="righttable">
- Used by &quot;<em>Bitmap</em>&quot; controls. Hides every pixel with the same color
- as of the top left pixel. This allows to see-through to controls behind it. This
- flag doesn't work well with a combination of the RESIZETOFIT flag and bitmaps with
- more than 256 colors.</td>
- </tr>
- <tr>
- <td class="righttable">
- GROUP</td>
- <td class="righttable">
- Add this flag to the first control of a group of controls to group them. Grouping
- controls allows you to create multiple groups of radio button and makes keyboard
- navigation using arrow keys easier.</td>
- </tr>
- <tr>
- <td class="righttable">
- FOCUS</td>
- <td class="righttable">
- Sets focus on the specified control, instead of the first focusable control. If
- more than one field is specified with this flag, only the first one will receive
- focus.</td>
- </tr>
- <tr>
- <td class="righttable">
- NOTABSTOP</td>
- <td class="righttable">
- Do not stop on the control when the user pressed the Tab key. Add NOTABSTOP to all
- controls of a group except the first one to allow navigation between groups with
- the Tab key.</td>
- </tr>
- <tr>
- <td class="righttable">
- DISABLED</td>
- <td class="righttable">
- Causes a control to be disabled.</td>
- </tr>
- <tr>
- <td class="righttable">
- ONLY_NUMBERS</td>
- <td class="righttable">
- Used by &quot;<em>Text</em>&quot; controls. Forces the user to enter only numbers
- into the edit box.</td>
- </tr>
- <tr>
- <td class="righttable">
- MULTILINE</td>
- <td class="righttable">
- Used by &quot;<em>Text</em>&quot; controls. Causes the control to accept multiple-lines.</td>
- </tr>
- <tr>
- <td class="righttable">
- WANTRETURN</td>
- <td class="righttable">
- Used by &quot;<em>Text</em>&quot; controls with multiple-line. Specifies that a
- carriage return be inserted when the user presses the ENTER key while entering text
- into the text box.</td>
- </tr>
- <tr>
- <td class="righttable">
- NOWORDWRAP</td>
- <td class="righttable">
- Used by &quot;<em>Text</em>&quot; controls with multiple-line. Disables the word-wrap
- that occurs when long lines are entered. Long lines instead scroll off to the side.
- Specifying the HSCROLL flag also has this effect.</td>
- </tr>
- <tr>
- <td class="righttable">
- HSCROLL</td>
- <td class="righttable">
- Show a horizontal scrollbar. When used by &quot;<em>Text</em>&quot; controls with
- multiple-lines this also disables word-wrap.</td>
- </tr>
- <tr>
- <td class="righttable">
- VSCROLL</td>
- <td class="righttable">
- Show a vertical scrollbar.</td>
- </tr>
- <tr>
- <td class="righttable">
- READONLY</td>
- <td class="righttable">
- Used by &quot;<em>Text</em>&quot; controls. Prevents the user from entering or editing
- text in the edit control, but allow the user to select and copy the text.</td>
- </tr>
- <tr>
- <td class="righttable">
- NOTIFY</td>
- <td class="righttable">
- Used by &quot;<em>Button</em>&quot;, &quot;<em>Link</em>&quot;, &quot;<em>CheckBox</em>&quot;,
- &quot;<em>RadioButton</em>&quot;, &quot;<em>ListBox</em>&quot; and &quot;<em>DropList</em>&quot;
- controls. Causes InstallOptions to call your NSIS custom page validation/leave function
- whenever the control's selection changes. Your validation/leave function can read
- the &quot;<em>State</em>&quot; value from the &quot;<em>Settings</em>&quot; section
- to determine which control caused the notification, if any, and perform some appropriate
- action followed by an Abort instruction (to tell NSIS to return to the page). The
- Examples\InstallOptions folder contains an example script showing how this might
- be used.</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>TxtColor</strong></td>
- <td class="lefttable">
- <em>(optional)</em></td>
- <td class="righttable">
- Used by <strong>Link</strong> controls to specify the foreground color of the text.
- Format: 0xBBGGRR (hexadecimal).</td>
- </tr>
- <tr>
- <td class="lefttable">
- <strong>HWND<br>
- HWND2</strong></td>
- <td class="lefttable">
- <em>(output)</em></td>
- <td class="righttable">
- After initDialog returns, this will contain the HWND of the control created by this
- field. It can be used instead of FindWindow and GetDlgItem. HWND2 contains the HWND
- of an additional control, such as the browse button.</td>
- </tr>
- </table>
- </div>
- <h2>
- Header file</h2>
- <div>
- <p>
- The InstallOptions header files provides macros and functions to easily create custom
- dialogs. You can include it on the top of your script as follows:
- <pre>
-!include InstallOptions.nsh
-</pre>
- </div>
- <h2>
- Creating dialogs</h2>
- <div>
- <h3>
- Extracting the INI file</h3>
- <div>
- <p>
- First, you have to extract your InstallOptions INI files in the .onInit function
- (or un.onInit for the uninstaller) using the INSTALLOPTIONS_EXTRACT macro. The files
- will be extracted to a temporary folder (the NSIS plug-ins folder) that is automatically
- created.</p>
- <pre>
-Function .onInit
- !insertmacro INSTALLOPTIONS_EXTRACT &quot;ioFile.ini&quot;
-FunctionEnd
-</pre>
- <p>
- If the INI file is located in another directory, use INSTALLOPTIONS_EXTRACT_AS.
- The second parameter is the filename in the temporary folder, which is the filename
- that should be used as input for the other macros.</p>
- <pre>
-Function .onInit
- !insertmacro INSTALLOPTIONS_EXTRACT_AS &quot;..\ioFile.ini&quot; &quot;ioFile.ini&quot;
-FunctionEnd
-</pre>
- </div>
- <h3>
- Displaying the dialog</h3>
- <div>
- <p>
- You can call InstallOptions in a page function defined with the Page or UninstPage
- command. Check the NSIS documentation (Scripting Reference -&gt; Pages) for information
- about the page system.</p>
- <pre>
-Page custom CustomPageFunction</pre>
- <p>
- To display the dialog, use the INSTALLOPTIONS_DISPLAY macro:<pre>
-Function CustomPageFunction ;Function name defined with Page command
- !insertmacro INSTALLOPTIONS_DISPLAY &quot;ioFile.ini&quot;
-FunctionEnd
-</pre>
- </div>
- </div>
- <h2>
- User input</h2>
- <div>
- <p>
- To get the input of the user, read the State value of a Field using the INSTALLOPTIONS_READ
- macro:</p>
- <pre>
-!insertmacro INSTALLOPTIONS_READ $VAR &quot;ioFile.ini&quot; &quot;Field #&quot; &quot;Name&quot;
-</pre>
- </div>
- <h2>
- Writing to INI files</h2>
- <div>
- <p>
- The INSTALLOPTIONS_WRITE macro allows you to write values to the INI file to change
- texts or control settings on runtime:
- <pre>
-!insertmacro INSTALLOPTIONS_WRITE &quot;ioFile.ini&quot; &quot;Field #&quot; &quot;Name&quot; &quot;Value&quot;
-</pre>
- </div>
- <h2>
- Escaped values</h2>
- <div>
- <p>
- Some InstallOptions values are escaped (in a similar manner to &quot;C&quot; strings)
- to allow characters to be used that are not normally valid in INI file values. The
- affected values are:</p>
- <ul>
- <li>The ValidateText field</li>
- <li>The Text value of Label fields</li>
- <li>The State value of Text fields that have the MULTILINE flag</li>
- </ul>
- <p>
- The escape character is the back-slash character (&quot;\&quot;) and the available
- escape sequences are:</p>
- <table class="subtable">
- <tr>
- <td class="lefttable">
- &quot;\\&quot;</td>
- <td class="righttable">
- Back-slash</td>
- </tr>
- <tr>
- <td class="lefttable">
- &quot;\r&quot;</td>
- <td class="righttable">
- Carriage return (ASCII 13)</td>
- </tr>
- <tr>
- <td class="lefttable">
- &quot;\n&quot;</td>
- <td class="righttable">
- Line feed (ASCII 10)</td>
- </tr>
- <tr>
- <td class="lefttable">
- &quot;\t&quot;</td>
- <td class="righttable">
- Tab (ASCII 9)</td>
- </tr>
- </table>
- <p>
- The INSTALLOPTIONS_READ_CONVERT and INSTALLOPTIONS_WRITE_CONVERT macros automatically
- convert these characters in installer code. In uninstaller code, use INSTALLOPTIONS_READ_UNCONVERT
- and INSTALLOPTIONS_WRITE_UNCONVERT.</p>
- <p>
- To use these macros in your script, the conversion functions need to be included:</p>
- <pre>
-;For INSTALLOPTIONS_READ_CONVERT
- !insertmacro INSTALLOPTIONS_FUNCTION_READ_CONVERT
-;For INSTALLOPTIONS_WRITE_CONVERT
- !insertmacro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
-;For INSTALLOPTIONS_READ_UNCONVERT
- !insertmacro INSTALLOPTIONS_UNFUNCTION_READ_CONVERT
-;For INSTALLOPTIONS_WRITE_UNCONVERT
- !insertmacro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
-</pre>
- </div>
- <h2>
- Input validation</h2>
- <div>
- <p>
- To validate the user input (for example, to check whether the user has filled in
- a textbox) use the leave function of the Page command and Abort when the validation
- has failed:</p>
- <pre>
-Function ValidateCustom
-
- !insertmacro INSTALLOPTIONS_READ $R0 "test.ini" "Field 1" "State"
- StrCmp $R0 "" 0 +3
- MessageBox MB_ICONEXCLAMATION|MB_OK "Please enter your name."
- Abort
-
-FunctionEnd
-</pre>
- </div>
- <h2>
- Return value</h2>
- <div>
- After a dialog is created (using display or show), a return value is available:</p>
- <ul>
- <li>success - The user has pressed the Next button</li>
- <li>back - The user has pressed the Back button</li>
- <li>cancel - The user has pressed the Cancel button</li>
- <li>error - An error has occurred, the dialog cannot be displayed.</li>
- </ul>
- <p>
- You only have to check this value if you need something really special, such as
- doing something when the user pressed the Back button.</p>
- <p>
- If you need the return value, use the INSTALLOPTIONS_DISPLAY_RETURN or INSTALLOPTIONS_SHOW_RETURN
- macro. The return value will be added to the stack, so you can use the Pop command
- to get it.</p>
- </div>
- <h2>
- Reserve files</h2>
- <div>
- <p>
- When using solid compression, it's important that files which are being extracted
- in user interface functions are located before other files in the data block. Otherwise
- there may be a delay before a page can be displayed.</p>
- <p>
- To ensure that this is the case, add ReserveFile commands for InstallOptions and
- the INI files before all sections and functions:</p>
- <pre>
-ReserveFile &quot;test.ini&quot;
-ReserveFile &quot;${NSISDIR}\Plugins\InstallOptions.dll&quot;
-</pre>
- </div>
- <h2>
- Fonts and colors</h2>
- <div>
- <p>
- To customize fonts or colors on InstallOptions dialogs, the INSTALLOPTIONS_INITDIALOG
- and INSTALLOPTIONS_SHOW macro can be used.</p>
- <p>
- INSTALLOPTIONS_INITDIALOG creates the dialog in memory, but does not show it. After
- inserting this macro, you can set the fonts and colors, and then insert INSTALLOPTIONS_SHOW
- to show the dialog.</p>
- <p>
- The INSTALLOPTIONS_INITDIALOG macro also pushes the HWND of the custom dialog to
- the stack. Control HWND's are available for each control in the HWND entry of the
- corresponding field in the INI file.</p>
- <p>
- Example of using a custom font:</p>
- <pre>
-Var HWND
-Var DLGITEM
-Var FONT
-
-Function FunctionName ;FunctionName defined with Page command
-
- !insertmacro INSTALLOPTIONS_INITDIALOG &quot;ioFile.ini&quot;
- Pop $HWND ;HWND of dialog
-
- !insertmacro INSTALLOPTIONS_READ $DLGITEM &quot;ioFile.ini&quot; &quot;Field 1&quot; &quot;HWND&quot;
-
- ;$DLGITEM contains the HWND of the first field
- CreateFont $FONT &quot;Tahoma&quot; 10 700
- SendMessage $DLGITEM ${WM_SETFONT} $FONT 0
-
- !insertmacro INSTALLOPTIONS_SHOW
-
-FunctionEnd
-</pre>
- </div>
- <h2>
- Credits</h2>
- <div>
- <p>
- Original version by Michael Bishop<br />
- DLL version by Nullsoft, Inc.<br />
- DLL version 2 by Amir Szekely, ORTIM, Joost Verburg<br />
- New documentation by Joost Verburg</p>
- </div>
- <h2>
- License</h2>
- <div>
- <pre>
-Original version Copyright &copy; 2001 Michael Bishop
-DLL version 1 Copyright &copy; 2001-2002 Nullsoft, Inc., ORTIM
-DLL version 2 Copyright &copy; 2003-2007 Amir Szekely, Joost Verburg, Dave Laundon
-
-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 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 distribution.
-</pre>
- </div>
- </div> </td> </tr> </table>
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>InstallOptions 2</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+ <style type="text/css">
+ /*<![CDATA[*/body
+ {
+ padding: 10px;
+ background-color: #F0F0F0;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ text-align: left;
+ }
+ p, li
+ {
+ font-size: 13px;
+ }
+ .center
+ {
+ text-align: center;
+ }
+ table
+ {
+ margin: auto;
+ font-size: 13px;
+ background-color: #FFFFFF;
+ }
+ .maintable
+ {
+ border: 2px solid #376EAB;
+ }
+ .parameter
+ {
+ font-weight: bold;
+ color: #6586AC;
+ }
+ h1
+ {
+ font-size: 30px;
+ color: #333333;
+ font-weight: normal;
+ text-align: center;
+ margin-top: 20px;
+ }
+ h2
+ {
+ font-size: 20px;
+ color: #7A7272;
+ font-weight: normal;
+ }
+ h3
+ {
+ font-size: 17px;
+ font-weight: bold;
+ color: #303030;
+ }
+ pre
+ {
+ font-size: 13px;
+ }
+ div
+ {
+ margin: 20px;
+ }
+ a:link, a:visited, a:active
+ {
+ color: #294F75;
+ text-decoration: none;
+ }
+ a:hover
+ {
+ color: #182634;
+ text-decoration: underline;
+ }
+ .subtable
+ {
+ border: 0px;
+ margin-left: 20px;
+ margin-right: 20px;
+ }
+ .lefttable
+ {
+ background-color: #CCCCCC;
+ vertical-align: top;
+ }
+ .righttable
+ {
+ background-color: #EEEEEE;
+ vertical-align: top;
+ }
+ /*]]>*/</style>
+</head>
+<body>
+ <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
+ <tr>
+ <td>
+ <h1>
+ InstallOptions 2</h1>
+ <div>
+ <p>
+ The InstallOptions plug-in is deprecated. For new scripts, it is recommended to
+ use the new nsDialogs plug-in instead.</p>
+ </div>
+ <div>
+ <h2>
+ Introduction</h2>
+ <div>
+ <p>
+ InstallOptions is an NSIS plugin which allows you to create custom pages for NSIS
+ installers, to prompt the user for extra information.</p>
+ <p>
+ The dialogs created by InstallOptions are based on INI files which define the controls
+ on the dialog and their properties. These INI files can be modified from the script
+ to adjust the dialogs on runtime.</p>
+ <p>
+ The format of INI files is described in a <a href="http://en.wikipedia.org/wiki/Ini_file">
+ Wikipedia article</a>.</p>
+ </div>
+ <h2>
+ INI file structure</h2>
+ <div>
+ <p>
+ The INI file has one required section. This section includes the number of controls
+ to be created as well as general window attributes. The INI file also includes a
+ variable number of Field sections which are used to create the controls to be displayed.</p>
+ <p>
+ The required section is named &quot;<em>Settings</em>&quot;. It can contain the
+ following values:</p>
+ <table class="subtable">
+ <tr>
+ <td class="lefttable">
+ <strong>NumFields</strong></td>
+ <td class="lefttable">
+ <em>(required)</em></td>
+ <td class="righttable">
+ The number of control elements to be displayed on the dialog window.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Title</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ If specified, gives the text to set the titlebar to. Otherwise, the titlebar text
+ is not changed.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>CancelEnabled</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ If specified, overrides NSIS settings and enables or disables the cancel button.
+ If set to 1, the cancel button will be enabled. If set to 0, the cancel button will
+ be disabled.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>CancelShow</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ If specified, overrides NSIS settings and shows or hides the cancel button If set
+ to 1, the cancel button will be shown. If set to 0, the cancel button will be hidden.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>BackEnabled</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ If specified, overrides NSIS settings and enables or disables the back button. If
+ set to 1, the back button will be enabled. If set to 0, the back button will be
+ disabled.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>CancelButtonText</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Overrides the text for the cancel button. If not specified, the cancel button text
+ will not be changed.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>NextButtonText</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Overrides the text for the next button. If not specified, the next button text will
+ not be changed.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>BackButtonText</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Overrides the text for the back button. If not specified, the back button text will
+ not be changed.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Rect</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Overrides the default rect ID to run over. This will make IO resize itself according
+ to a different rect than NSIS's dialogs rect.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>RTL</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ If 1 is specified the dialog will be mirrored and all texts will be aligned to the
+ right. The INSTALLOPTIONS_EXTRACT macros automatically set this field to the right
+ value for the current installer language as given by the NSIS string $(^RTL).</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>State</strong></td>
+ <td class="lefttable">
+ <em>(output)</em></td>
+ <td class="righttable">
+ This is not something you have to supply yourself but is set by InstallOptions,
+ before calling your custom page validation function, to the field number of the
+ custom Button control (or other control having the Notify flag) the user pressed,
+ if any.</td>
+ </tr>
+ </table>
+ <p>
+ Each field section has the heading &quot;Field #&quot; where # must be sequential
+ numbers from 1 to NumFields. Each Field section can contain the following values:</p>
+ <table class="subtable">
+ <tr>
+ <td class="lefttable">
+ <strong>Type</strong></td>
+ <td class="lefttable">
+ <em>(required)</em></td>
+ <td class="righttable">
+ Type of control to be created. Valid values are &quot;<em>Label</em>&quot;, &quot;<em>Text</em>&quot;,
+ &quot;<em>Password</em>&quot;, &quot;<em>Combobox</em>&quot;, &quot;<em>DropList</em>&quot;,
+ &quot;<em>Listbox</em>&quot;, &quot;<em>CheckBox</em>&quot;, &quot;<em>RadioButton</em>&quot;,
+ &quot;<em>FileRequest</em>&quot;, &quot;<em>DirRequest</em>&quot; &quot;<em>Icon</em>&quot;,
+ &quot;<em>Bitmap</em>&quot;, &quot;<em>GroupBox</em>&quot;, &quot;<em>HLine</em>&quot;,
+ &quot;<em>VLine</em>&quot;, &quot;<em>Link</em>&quot; or &quot;<em>Button</em>&quot;.<br />
+ <br />
+ A &quot;<em>Label</em>&quot; is used to display static text. (i.e. a caption for
+ a textbox)<br />
+ A &quot;<em>Text</em>&quot; and &quot;<em>Password</em>&quot; accept text input
+ from the user. &quot;<em>Password</em>&quot; masks the input with * characters.<br />
+ A &quot;<em>Combobox</em>&quot; allows the user to type text not in the popup list,
+ a &quot;<em>Droplist</em>&quot; only allows selection of items in the list.<br />
+ A &quot;<em>Listbox</em>&quot; shows multiple items and can optionally allow the
+ user to select more than one item.<br />
+ A &quot;<em>CheckBox</em>&quot; control displays a check box with label.<br />
+ A &quot;<em>RadioButton</em>&quot; control displays a radio button with label.<br />
+ A &quot;<em>FileRequest</em>&quot; control displays a textbox and a browse button.
+ Clicking the browse button will display a file requester where the user can browse
+ for a file.<br />
+ A &quot;<em>DirRequest</em>&quot; control displays a textbox and a browse button.
+ Clicking the browse button will display a directory requester where the user can
+ browse for a directory.<br />
+ An &quot;<em>Icon</em>&quot; control displays an icon. Use no Text to use the installer
+ icon.<br />
+ A &quot;<em>Bitmap</em>&quot; control displays a bitmap.<br />
+ A &quot;<em>GroupBox</em>&quot; control displays a frame to group controls.<br />
+ A &quot;<em>HLine</em>&quot; control displays a horizontal line to separate controls.<br />
+ A &quot;<em>VLine</em>&quot; control displays a vertical line to separate controls.<br />
+ A &quot;<em>Link</em>&quot; control displays a static hot text. When the user clicks
+ the control the contents of <strong>State</strong> (e.g. http://...) will be executed
+ using ShellExecute. Alternatively <strong>State</strong> can be omitted and the
+ <em>NOTIFY</em> flag used to have your NSIS script called. See the &quot;<em>NOTIFY</em>&quot;
+ flag below for more information.<br />
+ A &quot;<em>Button</em>&quot; control displays a push button that can be used in
+ the same way as the &quot;<em>Link</em>&quot; control above.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Text</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Specifies the caption of a label, checkbox, or radio button control. For DirRequest
+ control this specifies the title of the browse dialog. For icon and bitmaps control
+ this specifies the path to the image.<br />
+ <br />
+ <strong>Note:</strong> For labels, \r\n will be converted to a newline. To use a
+ back-slash in your text you have to escape it using another back-slash - \\. Described
+ <a href="#escaping">below</a> are NSIS functions for converting text to/from this
+ format.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>State</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Specifies the state of the control. This is updated when the user closes the window,
+ so you can read from it from NSIS. For edit texts and dir and file request boxes,
+ this is the string that is specified. For radio button and check boxes, this can
+ be '0' or '1' (for unchecked or checked). For list boxes, combo boxes and drop lists
+ this is the selected items separated by pipes ('|'). For Links and Buttons this
+ can specify something to be executed or opened (using ShellExecute).<br />
+ <br />
+ <strong>Note:</strong> For Text fields with the MULTILINE flag, \r\n will be converted
+ to a newline. To use a back-slash in your text you have to escape it using another
+ back-slash - \\. Described <a href="#escaping">below</a> are NSIS functions for
+ converting text to/from this format.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>ListItems</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ A list of items to display in a combobox, droplist, or listbox.<br />
+ This is a single line of text with each item separated by a pipe character '|'</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>MaxLen</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Causes validation on the selected control to limit the maximum length of text.<br />
+ If the user specifies more text than this, a message box will appear when they click
+ &quot;OK&quot; and the dialog will not be dismissed.<br />
+ You should not use this on a &quot;<em>combobox</em>&quot; since the user can not
+ control what is selected.<br />
+ This should be set to a maximum of 260 for &quot;<em>FileRequest</em>&quot; and
+ &quot;<em>DirRequest</em>&quot; controls.<br />
+ Ignored on &quot;<em>Label</em>&quot; controls.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>MinLen</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Causes validation on the selected control to force the user to enter a minimum amount
+ of text.<br />
+ If the user specifies less text than this, a message box will appear when they click
+ &quot;OK&quot; and the dialog will not be dismissed.<br />
+ Unlike MaxLen, this is useful for &quot;<em>Combobox</em>&quot; controls. By setting
+ this to a value of &quot;1&quot; the program will force the user to select an item.<br />
+ Ignored on &quot;<em>Label</em>&quot; controls.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>ValidateText</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ If the field fails the test for &quot;<em>MinLen</em>&quot; or &quot;<em>MaxLen</em>&quot;,
+ a messagebox will be displayed with this text.<br />
+ <br />
+ <strong>Note:</strong> \r\n will be converted to a newline, two back-slashes will
+ be converted to one - \\. Described <a href="#escaping">below</a> are NSIS functions
+ for converting text to/from this format.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Left<br />
+ Right<br />
+ Top<br />
+ Bottom</strong></td>
+ <td class="lefttable">
+ <em>(required)</em></td>
+ <td class="righttable">
+ The position on the dialog where this control appears. All sizes should be set in
+ dialog units. To get the right dimensions for your controls, design your dialog
+ using a resource editor and copy the dimensions to the INI file.<br />
+ <br />
+ <strong>Note:</strong> You can specify negative coordinates to specify the distance
+ from the right or bottom edge.<br />
+ <br />
+ <strong>Note (2):</strong> For combobox or droplist, the &quot;<em>bottom</em>&quot;
+ value is not used in the same way.<br />
+ In this case, the bottom value is the maximum size of the window when the pop-up
+ list is being displayed. All other times, the combobox is automatically sized to
+ be one element tall. If you have trouble where you can not see the combobox drop-down,
+ then check the bottom value and ensure it is large enough. A rough guide for the
+ height required is the number of items in the list multiplied by 8, plus 20.<br />
+ <br />
+ <strong>Note (3):</strong> FileRequest and DirRequest controls will allocate 15
+ dialog units to the browse button. Make this control wide enough the contents of
+ the textbox can be seen.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Filter</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Specifies the filter to be used in the &quot;<em>FileRequest</em>&quot; control.<br />
+ This is constructed by putting pairs of entries together, each item separated by
+ a | character.<br />
+ The first value in each pair is the text to display for the filter.<br />
+ The second value is the pattern to use to match files.<br />
+ For example, you might specify:<br />
+ Filter=Text Files|*.txt|Programs|*.exe;*.com|All Files|*.*<br />
+ If not specified, then the filter defaults to All Files|*.*<br />
+ <br />
+ <strong>Note:</strong> you should not put any extra spaces around the | characters.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Root</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Used by <strong>DirRequest</strong> controls to specify the root directory of the
+ search. By default, this allows the user to browse any directory on the computer.
+ This will limit the search to a particular directory on the system.</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>Flags</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ This specifies additional flags for the display of different controls. Each value
+ should be separated by a | character, and you should be careful not to put any spaces
+ around the | character.<br />
+ <table class="righttable">
+ <tr>
+ <td class="righttable">
+ <strong>Value</strong></td>
+ <td class="righttable">
+ <strong>Meaning</strong></td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ REQ_SAVE</td>
+ <td class="righttable">
+ This causes &quot;<em>FileRequest</em>&quot; controls to display a Save As dialog.
+ If not specified, an Open dialog is used.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ FILE_MUST_EXIST</td>
+ <td class="righttable">
+ Used by &quot;<em>FileRequest</em>&quot; to determine if the selected file must
+ exist.<br />
+ This only applies if an &quot;Open&quot; dialog is being displayed.<br />
+ This currently does not force the file to exist other than through the browse button.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ FILE_EXPLORER</td>
+ <td class="righttable">
+ Used by &quot;<em>FileRequest</em>&quot;, enables new file request look (recommended)</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ FILE_HIDEREADONLY</td>
+ <td class="righttable">
+ Used by &quot;<em>FileRequest</em>&quot;, hides &quot;open read only&quot; checkbox
+ in open dialog.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ WARN_IF_EXIST</td>
+ <td class="righttable">
+ Used by &quot;<em>FileRequest</em>&quot; to display a warning message if the selected
+ file already exists.<br />
+ The warning message is only displayed for files selected with the browse button.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ PATH_MUST_EXIST</td>
+ <td class="righttable">
+ Used by &quot;<em>FileRequest</em>&quot; to force the path to exist. Prevents the
+ user from typing a non-existent path into the browse dialog window.<br />
+ This only validates path's selected with the browse button.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ PROMPT_CREATE</td>
+ <td class="righttable">
+ Used by &quot;<em>FileRequest</em>&quot; to display a warning if the selected file
+ does not exist. However, it still allows the user to select the file.<br />
+ This only displays the warning for files selected with the browse button.<br />
+ Doesn't work along with REQ_SAVE.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ RIGHT</td>
+ <td class="righttable">
+ Used by &quot;<em>Checkbox</em>&quot; and &quot;<em>Radiobutton</em>&quot; controls
+ to specify you want the checkbox to the right of the text instead of the left as
+ is the default.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ MULTISELECT</td>
+ <td class="righttable">
+ Used by &quot;<em>Listbox</em>&quot; controls. Turns string selection on or off
+ each time the user clicks or double-clicks a string in the list box. The user can
+ select any number of strings. If this flag and EXTENDEDSELCT are not specified,
+ only one item can be selected from the list.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ EXTENDEDSELCT</td>
+ <td class="righttable">
+ Used by &quot;<em>Listbox</em>&quot; controls. Allows multiple items to be selected
+ by using the SHIFT key and the mouse or special key combinations. If this flag and
+ MULTISELECT are not specified, only one item can be selected from the list.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ RESIZETOFIT</td>
+ <td class="righttable">
+ This causes &quot;<em>Bitmap</em>&quot; controls to resize the image to the size
+ of the control. Also useful to support custom DPI settings. Without this, the image
+ will be centered within the specified area.</td>
+ </tr>
+ <td class="righttable">
+ TRANSPARENT</td>
+ <td class="righttable">
+ Used by &quot;<em>Bitmap</em>&quot; controls. Hides every pixel with the same color
+ as of the top left pixel. This allows to see-through to controls behind it. This
+ flag doesn't work well with a combination of the RESIZETOFIT flag and bitmaps with
+ more than 256 colors.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ GROUP</td>
+ <td class="righttable">
+ Add this flag to the first control of a group of controls to group them. Grouping
+ controls allows you to create multiple groups of radio button and makes keyboard
+ navigation using arrow keys easier.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ FOCUS</td>
+ <td class="righttable">
+ Sets focus on the specified control, instead of the first focusable control. If
+ more than one field is specified with this flag, only the first one will receive
+ focus.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ NOTABSTOP</td>
+ <td class="righttable">
+ Do not stop on the control when the user pressed the Tab key. Add NOTABSTOP to all
+ controls of a group except the first one to allow navigation between groups with
+ the Tab key.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ DISABLED</td>
+ <td class="righttable">
+ Causes a control to be disabled.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ ONLY_NUMBERS</td>
+ <td class="righttable">
+ Used by &quot;<em>Text</em>&quot; controls. Forces the user to enter only numbers
+ into the edit box.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ MULTILINE</td>
+ <td class="righttable">
+ Used by &quot;<em>Text</em>&quot; controls. Causes the control to accept multiple-lines.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ WANTRETURN</td>
+ <td class="righttable">
+ Used by &quot;<em>Text</em>&quot; controls with multiple-line. Specifies that a
+ carriage return be inserted when the user presses the ENTER key while entering text
+ into the text box.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ NOWORDWRAP</td>
+ <td class="righttable">
+ Used by &quot;<em>Text</em>&quot; controls with multiple-line. Disables the word-wrap
+ that occurs when long lines are entered. Long lines instead scroll off to the side.
+ Specifying the HSCROLL flag also has this effect.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ HSCROLL</td>
+ <td class="righttable">
+ Show a horizontal scrollbar. When used by &quot;<em>Text</em>&quot; controls with
+ multiple-lines this also disables word-wrap.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ VSCROLL</td>
+ <td class="righttable">
+ Show a vertical scrollbar.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ READONLY</td>
+ <td class="righttable">
+ Used by &quot;<em>Text</em>&quot; controls. Prevents the user from entering or editing
+ text in the edit control, but allow the user to select and copy the text.</td>
+ </tr>
+ <tr>
+ <td class="righttable">
+ NOTIFY</td>
+ <td class="righttable">
+ Used by &quot;<em>Button</em>&quot;, &quot;<em>Link</em>&quot;, &quot;<em>CheckBox</em>&quot;,
+ &quot;<em>RadioButton</em>&quot;, &quot;<em>ListBox</em>&quot; and &quot;<em>DropList</em>&quot;
+ controls. Causes InstallOptions to call your NSIS custom page validation/leave function
+ whenever the control's selection changes. Your validation/leave function can read
+ the &quot;<em>State</em>&quot; value from the &quot;<em>Settings</em>&quot; section
+ to determine which control caused the notification, if any, and perform some appropriate
+ action followed by an Abort instruction (to tell NSIS to return to the page). The
+ Examples\InstallOptions folder contains an example script showing how this might
+ be used.</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>TxtColor</strong></td>
+ <td class="lefttable">
+ <em>(optional)</em></td>
+ <td class="righttable">
+ Used by <strong>Link</strong> controls to specify the foreground color of the text.
+ Format: 0xBBGGRR (hexadecimal).</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ <strong>HWND<br>
+ HWND2</strong></td>
+ <td class="lefttable">
+ <em>(output)</em></td>
+ <td class="righttable">
+ After initDialog returns, this will contain the HWND of the control created by this
+ field. It can be used instead of FindWindow and GetDlgItem. HWND2 contains the HWND
+ of an additional control, such as the browse button.</td>
+ </tr>
+ </table>
+ </div>
+ <h2>
+ Header file</h2>
+ <div>
+ <p>
+ The InstallOptions header files provides macros and functions to easily create custom
+ dialogs. You can include it on the top of your script as follows:
+ <pre>
+!include InstallOptions.nsh
+</pre>
+ </div>
+ <h2>
+ Creating dialogs</h2>
+ <div>
+ <h3>
+ Extracting the INI file</h3>
+ <div>
+ <p>
+ First, you have to extract your InstallOptions INI files in the .onInit function
+ (or un.onInit for the uninstaller) using the INSTALLOPTIONS_EXTRACT macro. The files
+ will be extracted to a temporary folder (the NSIS plug-ins folder) that is automatically
+ created.</p>
+ <pre>
+Function .onInit
+ !insertmacro INSTALLOPTIONS_EXTRACT &quot;ioFile.ini&quot;
+FunctionEnd
+</pre>
+ <p>
+ If the INI file is located in another directory, use INSTALLOPTIONS_EXTRACT_AS.
+ The second parameter is the filename in the temporary folder, which is the filename
+ that should be used as input for the other macros.</p>
+ <pre>
+Function .onInit
+ !insertmacro INSTALLOPTIONS_EXTRACT_AS &quot;..\ioFile.ini&quot; &quot;ioFile.ini&quot;
+FunctionEnd
+</pre>
+ </div>
+ <h3>
+ Displaying the dialog</h3>
+ <div>
+ <p>
+ You can call InstallOptions in a page function defined with the Page or UninstPage
+ command. Check the NSIS documentation (Scripting Reference -&gt; Pages) for information
+ about the page system.</p>
+ <pre>
+Page custom CustomPageFunction</pre>
+ <p>
+ To display the dialog, use the INSTALLOPTIONS_DISPLAY macro:<pre>
+Function CustomPageFunction ;Function name defined with Page command
+ !insertmacro INSTALLOPTIONS_DISPLAY &quot;ioFile.ini&quot;
+FunctionEnd
+</pre>
+ </div>
+ </div>
+ <h2>
+ User input</h2>
+ <div>
+ <p>
+ To get the input of the user, read the State value of a Field using the INSTALLOPTIONS_READ
+ macro:</p>
+ <pre>
+!insertmacro INSTALLOPTIONS_READ $VAR &quot;ioFile.ini&quot; &quot;Field #&quot; &quot;Name&quot;
+</pre>
+ </div>
+ <h2>
+ Writing to INI files</h2>
+ <div>
+ <p>
+ The INSTALLOPTIONS_WRITE macro allows you to write values to the INI file to change
+ texts or control settings on runtime:
+ <pre>
+!insertmacro INSTALLOPTIONS_WRITE &quot;ioFile.ini&quot; &quot;Field #&quot; &quot;Name&quot; &quot;Value&quot;
+</pre>
+ </div>
+ <h2>
+ Escaped values</h2>
+ <div>
+ <p>
+ Some InstallOptions values are escaped (in a similar manner to &quot;C&quot; strings)
+ to allow characters to be used that are not normally valid in INI file values. The
+ affected values are:</p>
+ <ul>
+ <li>The ValidateText field</li>
+ <li>The Text value of Label fields</li>
+ <li>The State value of Text fields that have the MULTILINE flag</li>
+ </ul>
+ <p>
+ The escape character is the back-slash character (&quot;\&quot;) and the available
+ escape sequences are:</p>
+ <table class="subtable">
+ <tr>
+ <td class="lefttable">
+ &quot;\\&quot;</td>
+ <td class="righttable">
+ Back-slash</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ &quot;\r&quot;</td>
+ <td class="righttable">
+ Carriage return (ASCII 13)</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ &quot;\n&quot;</td>
+ <td class="righttable">
+ Line feed (ASCII 10)</td>
+ </tr>
+ <tr>
+ <td class="lefttable">
+ &quot;\t&quot;</td>
+ <td class="righttable">
+ Tab (ASCII 9)</td>
+ </tr>
+ </table>
+ <p>
+ The INSTALLOPTIONS_READ_CONVERT and INSTALLOPTIONS_WRITE_CONVERT macros automatically
+ convert these characters in installer code. In uninstaller code, use INSTALLOPTIONS_READ_UNCONVERT
+ and INSTALLOPTIONS_WRITE_UNCONVERT.</p>
+ <p>
+ To use these macros in your script, the conversion functions need to be included:</p>
+ <pre>
+;For INSTALLOPTIONS_READ_CONVERT
+ !insertmacro INSTALLOPTIONS_FUNCTION_READ_CONVERT
+;For INSTALLOPTIONS_WRITE_CONVERT
+ !insertmacro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
+;For INSTALLOPTIONS_READ_UNCONVERT
+ !insertmacro INSTALLOPTIONS_UNFUNCTION_READ_CONVERT
+;For INSTALLOPTIONS_WRITE_UNCONVERT
+ !insertmacro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
+</pre>
+ </div>
+ <h2>
+ Input validation</h2>
+ <div>
+ <p>
+ To validate the user input (for example, to check whether the user has filled in
+ a textbox) use the leave function of the Page command and Abort when the validation
+ has failed:</p>
+ <pre>
+Function ValidateCustom
+
+ !insertmacro INSTALLOPTIONS_READ $R0 "test.ini" "Field 1" "State"
+ StrCmp $R0 "" 0 +3
+ MessageBox MB_ICONEXCLAMATION|MB_OK "Please enter your name."
+ Abort
+
+FunctionEnd
+</pre>
+ </div>
+ <h2>
+ Return value</h2>
+ <div>
+ After a dialog is created (using display or show), a return value is available:</p>
+ <ul>
+ <li>success - The user has pressed the Next button</li>
+ <li>back - The user has pressed the Back button</li>
+ <li>cancel - The user has pressed the Cancel button</li>
+ <li>error - An error has occurred, the dialog cannot be displayed.</li>
+ </ul>
+ <p>
+ You only have to check this value if you need something really special, such as
+ doing something when the user pressed the Back button.</p>
+ <p>
+ If you need the return value, use the INSTALLOPTIONS_DISPLAY_RETURN or INSTALLOPTIONS_SHOW_RETURN
+ macro. The return value will be added to the stack, so you can use the Pop command
+ to get it.</p>
+ </div>
+ <h2>
+ Reserve files</h2>
+ <div>
+ <p>
+ When using solid compression, it's important that files which are being extracted
+ in user interface functions are located before other files in the data block. Otherwise
+ there may be a delay before a page can be displayed.</p>
+ <p>
+ To ensure that this is the case, add ReserveFile commands for InstallOptions and
+ the INI files before all sections and functions:</p>
+ <pre>
+ReserveFile &quot;test.ini&quot;
+ReserveFile &quot;${NSISDIR}\Plugins\InstallOptions.dll&quot;
+</pre>
+ </div>
+ <h2>
+ Fonts and colors</h2>
+ <div>
+ <p>
+ To customize fonts or colors on InstallOptions dialogs, the INSTALLOPTIONS_INITDIALOG
+ and INSTALLOPTIONS_SHOW macro can be used.</p>
+ <p>
+ INSTALLOPTIONS_INITDIALOG creates the dialog in memory, but does not show it. After
+ inserting this macro, you can set the fonts and colors, and then insert INSTALLOPTIONS_SHOW
+ to show the dialog.</p>
+ <p>
+ The INSTALLOPTIONS_INITDIALOG macro also pushes the HWND of the custom dialog to
+ the stack. Control HWND's are available for each control in the HWND entry of the
+ corresponding field in the INI file.</p>
+ <p>
+ Example of using a custom font:</p>
+ <pre>
+Var HWND
+Var DLGITEM
+Var FONT
+
+Function FunctionName ;FunctionName defined with Page command
+
+ !insertmacro INSTALLOPTIONS_INITDIALOG &quot;ioFile.ini&quot;
+ Pop $HWND ;HWND of dialog
+
+ !insertmacro INSTALLOPTIONS_READ $DLGITEM &quot;ioFile.ini&quot; &quot;Field 1&quot; &quot;HWND&quot;
+
+ ;$DLGITEM contains the HWND of the first field
+ CreateFont $FONT &quot;Tahoma&quot; 10 700
+ SendMessage $DLGITEM ${WM_SETFONT} $FONT 0
+
+ !insertmacro INSTALLOPTIONS_SHOW
+
+FunctionEnd
+</pre>
+ </div>
+ <h2>
+ Credits</h2>
+ <div>
+ <p>
+ Original version by Michael Bishop<br />
+ DLL version by Nullsoft, Inc.<br />
+ DLL version 2 by Amir Szekely, ORTIM, Joost Verburg<br />
+ New documentation by Joost Verburg</p>
+ </div>
+ <h2>
+ License</h2>
+ <div>
+ <pre>
+Original version Copyright &copy; 2001 Michael Bishop
+DLL version 1 Copyright &copy; 2001-2002 Nullsoft, Inc., ORTIM
+DLL version 2 Copyright &copy; 2003-2007 Amir Szekely, Joost Verburg, Dave Laundon
+
+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 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 distribution.
+</pre>
+ </div>
+ </div> </td> </tr> </table>
+</body>
+</html>
diff --git a/Contrib/InstallOptions/SConscript b/Contrib/InstallOptions/SConscript
index ec33df6..7923d51 100755
--- a/Contrib/InstallOptions/SConscript
+++ b/Contrib/InstallOptions/SConscript
@@ -1,43 +1,43 @@
-target = 'InstallOptions'
-
-files = Split("""
- InstallerOptions.cpp
-""")
-
-resources = Split("""
- ioptdll.rc
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- shell32
- comdlg32
- ole32
-""")
-
-examples = Split("""
- test.nsi
- test.ini
- testimgs.nsi
- testimgs.ini
- testlink.nsi
- testlink.ini
- testnotify.nsi
- testnotify.ini
-""")
-
-docs = Split("""
- Changelog.txt
- Readme.html
-""")
-
-includes = Split("""
- InstallOptions.nsh
-""")
-
-Import('BuildPlugin env')
-
-BuildPlugin(target, files, libs, examples, docs, res = resources)
-env.DistributeInclude(includes)
+target = 'InstallOptions'
+
+files = Split("""
+ InstallerOptions.cpp
+""")
+
+resources = Split("""
+ ioptdll.rc
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ shell32
+ comdlg32
+ ole32
+""")
+
+examples = Split("""
+ test.nsi
+ test.ini
+ testimgs.nsi
+ testimgs.ini
+ testlink.nsi
+ testlink.ini
+ testnotify.nsi
+ testnotify.ini
+""")
+
+docs = Split("""
+ Changelog.txt
+ Readme.html
+""")
+
+includes = Split("""
+ InstallOptions.nsh
+""")
+
+Import('BuildPlugin env')
+
+BuildPlugin(target, files, libs, examples, docs, res = resources)
+env.DistributeInclude(includes)
diff --git a/Contrib/InstallOptions/ioptdll.rc b/Contrib/InstallOptions/ioptdll.rc
index 27290a2..4444e18 100755
--- a/Contrib/InstallOptions/ioptdll.rc
+++ b/Contrib/InstallOptions/ioptdll.rc
@@ -1,94 +1,94 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <winresrc.h>
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 57, 41
-STYLE DS_CONTROL | WS_CHILD
-FONT 8, "MS Sans Serif"
-BEGIN
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG1, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 50
- TOPMARGIN, 7
- BOTTOMMARGIN, 34
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winresrc.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 57, 41
+STYLE DS_CONTROL | WS_CHILD
+FONT 8, "MS Sans Serif"
+BEGIN
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 50
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 34
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/InstallOptions/resource.h b/Contrib/InstallOptions/resource.h
index 843a653..6984d55 100755
--- a/Contrib/InstallOptions/resource.h
+++ b/Contrib/InstallOptions/resource.h
@@ -1,16 +1,16 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by ioptdll.rc
-//
-#define IDD_DIALOG1 101
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 102
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by ioptdll.rc
+//
+#define IDD_DIALOG1 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/InstallOptions/test.ini b/Contrib/InstallOptions/test.ini
index b51497c..7b94875 100755
--- a/Contrib/InstallOptions/test.ini
+++ b/Contrib/InstallOptions/test.ini
@@ -1,76 +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:\poop.poop
-Left=10
-Right=-10
-Top=56
-Bottom=68
-Filter=Poop Files|*.poop|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..."
+[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:\poop.poop
+Left=10
+Right=-10
+Top=56
+Bottom=68
+Filter=Poop Files|*.poop|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/Contrib/InstallOptions/test.nsi b/Contrib/InstallOptions/test.nsi
index a1b234e..53afe9b 100755
--- a/Contrib/InstallOptions/test.nsi
+++ b/Contrib/InstallOptions/test.nsi
@@ -1,84 +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 "${NSISDIR}\Plugins\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
+;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 "${NSISDIR}\Plugins\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/Contrib/InstallOptions/testimgs.ini b/Contrib/InstallOptions/testimgs.ini
index 49c499b..381a986 100755
--- a/Contrib/InstallOptions/testimgs.ini
+++ b/Contrib/InstallOptions/testimgs.ini
@@ -1,65 +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
-
+[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/Contrib/InstallOptions/testimgs.nsi b/Contrib/InstallOptions/testimgs.nsi
index 8a2faed..1a832e9 100755
--- a/Contrib/InstallOptions/testimgs.nsi
+++ b/Contrib/InstallOptions/testimgs.nsi
@@ -1,59 +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 "${NSISDIR}\Plugins\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
+;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 "${NSISDIR}\Plugins\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/Contrib/InstallOptions/testlink.ini b/Contrib/InstallOptions/testlink.ini
index 278a4f9..592ae93 100755
--- a/Contrib/InstallOptions/testlink.ini
+++ b/Contrib/InstallOptions/testlink.ini
@@ -1,44 +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
+[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/Contrib/InstallOptions/testlink.nsi b/Contrib/InstallOptions/testlink.nsi
index edc7ec0..8b73fc9 100755
--- a/Contrib/InstallOptions/testlink.nsi
+++ b/Contrib/InstallOptions/testlink.nsi
@@ -1,58 +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 "${NSISDIR}\Plugins\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
-
+;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 "${NSISDIR}\Plugins\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/Contrib/InstallOptions/testnotify.ini b/Contrib/InstallOptions/testnotify.ini
index 56d9231..f86fc8e 100755
--- a/Contrib/InstallOptions/testnotify.ini
+++ b/Contrib/InstallOptions/testnotify.ini
@@ -1,105 +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:\poop.poop
-Filter=Poop Files|*.poop|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
+[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:\poop.poop
+Filter=Poop Files|*.poop|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/Contrib/InstallOptions/testnotify.nsi b/Contrib/InstallOptions/testnotify.nsi
index e56061a..9d42188 100755
--- a/Contrib/InstallOptions/testnotify.nsi
+++ b/Contrib/InstallOptions/testnotify.nsi
@@ -1,133 +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 /NOUNLOAD "$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
+; 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 /NOUNLOAD "$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/Contrib/LangDLL/LangDLL.c b/Contrib/LangDLL/LangDLL.c
index 513dcb1..28e349a 100755
--- a/Contrib/LangDLL/LangDLL.c
+++ b/Contrib/LangDLL/LangDLL.c
@@ -1,230 +1,230 @@
-#include <windows.h>
-#include "resource.h"
-
-// JF> updated usage
-// call like this:
-// LangDLL:LangDialog "Window Title" "Window subtext" <number of languages>[F] language_text language_id ... [font_size font_face]
-// ex:
-// LangDLL:LangDialog "Language Selection" "Choose a language" 2 French 1036 English 1033
-// or (the F after the 2 means we're supplying font information)
-// LangDLL:LangDialog "Language Selection" "Choose a language" 2F French 1036 English 1033 12 Garamond
-
-
-#include "../ExDLL/exdll.h"
-
-int myatoi(char *s);
-
-HINSTANCE g_hInstance;
-HWND g_hwndParent;
-
-char temp[1024];
-char g_wndtitle[1024], g_wndtext[1024];
-int dofont;
-int docp;
-
-int langs_num;
-
-struct lang {
- char *name;
- char *id;
- UINT cp;
-} *langs;
-
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- int i, size;
- char *selected_language = NULL;
- static HFONT font;
- switch (uMsg) {
- case WM_INITDIALOG:
- // add languages
- for (i = langs_num - 1; i >= 0; i--) {
- int cbi;
-
- if (langs[i].cp != 0 && langs[i].cp != GetACP())
- continue;
-
- cbi = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM) langs[i].name);
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, cbi, (LPARAM) langs[i].id);
-
- // remember selected language
- if (!lstrcmp(langs[i].id, getuservariable(INST_LANG))) {
- selected_language = langs[i].name;
- }
- }
- // empty list box?
- if (SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCOUNT, 0, 0) == 0) {
- pushstring("no languages available");
- EndDialog(hwndDlg, 0);
- break;
- }
- // select the current language
- if (selected_language)
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) selected_language);
- else
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, 0, 0);
- // set texts
- SetDlgItemText(hwndDlg, IDC_TEXT, g_wndtext);
- SetWindowText(hwndDlg, g_wndtitle);
- SendDlgItemMessage(hwndDlg, IDC_APPICON, STM_SETICON, (LPARAM)LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(103)), 0);
- // set font
- if (dofont && !popstring(temp)) {
- size = myatoi(temp);
- if (!popstring(temp)) {
- LOGFONT f = {0,};
- if (lstrcmp(temp, "MS Shell Dlg")) {
- f.lfHeight = -MulDiv(size, GetDeviceCaps(GetDC(hwndDlg), LOGPIXELSY), 72);
- lstrcpy(f.lfFaceName, temp);
- font = CreateFontIndirect(&f);
- SendMessage(hwndDlg, WM_SETFONT, (WPARAM)font, 1);
- SendDlgItemMessage(hwndDlg, IDOK, WM_SETFONT, (WPARAM)font, 1);
- SendDlgItemMessage(hwndDlg, IDCANCEL, WM_SETFONT, (WPARAM)font, 1);
- SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, WM_SETFONT, (WPARAM)font, 1);
- SendDlgItemMessage(hwndDlg, IDC_TEXT, WM_SETFONT, (WPARAM)font, 1);
- }
- }
- }
- // show window
- ShowWindow(hwndDlg, SW_SHOW);
- break;
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDOK:
- // push result on the stack
- i = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0);
- i = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0);
- if (i != CB_ERR && i) {
- pushstring((char *) i);
- } else {
- // ?!
- pushstring("cancel");
- }
- // end dialog
- EndDialog(hwndDlg, 0);
- break;
- case IDCANCEL:
- // push "cancel" on the stack
- pushstring("cancel");
- // end dialog
- EndDialog(hwndDlg, 0);
- break;
- }
- break;
- case WM_DESTROY:
- // clean up
- if (font) DeleteObject(font);
- break;
- default:
- return FALSE; // message not processed
- }
- return TRUE; // message processed
-}
-
-void __declspec(dllexport) LangDialog(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- g_hwndParent=hwndParent;
- EXDLL_INIT();
-
- {
- int i;
- BOOL pop_empty_string = FALSE;
-
- // get texts
- if (popstring(g_wndtitle)) return;
- if (popstring(g_wndtext)) return;
-
- // get flags
- if (popstring(temp)) return;
-
- // parse flags
- {
- char *p=temp;
- while (*p)
- {
- if (*p == 'F') dofont=1; // parse font flag
- if (*p == 'C') docp=1; // parse codepage flag
- p++;
- }
- }
-
- if (*temp == 'A') {
- // automatic language count
- stack_t *th;
- langs_num=0;
- th=(*g_stacktop);
- while (th && th->text[0]) {
- langs_num++;
- th = th->next;
- }
- if (!th) return;
- if (docp)
- langs_num /= 3;
- else
- langs_num /= 2;
- pop_empty_string = TRUE;
- } else {
- // use counts languages
- langs_num = myatoi(temp);
- }
-
- // zero languages?
- if (!langs_num) return;
-
- // allocate language struct
- langs = (struct lang *)GlobalAlloc(GPTR, langs_num*sizeof(struct lang));
- if (!langs) return;
-
- // fill language struct
- for (i = 0; i < langs_num; i++) {
- if (popstring(temp)) return;
- langs[i].name = GlobalAlloc(GPTR, lstrlen(temp)+1);
- if (!langs[i].name) return;
- lstrcpy(langs[i].name, temp);
-
- if (popstring(temp)) return;
- langs[i].id = GlobalAlloc(GPTR, lstrlen(temp)+1);
- if (!langs[i].id) return;
- lstrcpy(langs[i].id, temp);
-
- if (docp)
- {
- if (popstring(temp)) return;
- langs[i].cp = myatoi(temp);
- }
- }
-
- // pop the empty string to keep the stack clean
- if (pop_empty_string) {
- if (popstring(temp)) return;
- }
-
- // start dialog
- DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_DIALOG), 0, DialogProc);
-
- // free structs
- for (i = 0; i < langs_num; i++) {
- GlobalFree(langs[i].name);
- GlobalFree(langs[i].id);
- }
- GlobalFree(langs);
- }
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- g_hInstance=hInst;
- return TRUE;
-}
-
-int myatoi(char *s)
-{
- unsigned int v=0;
- for (;;) {
- int c=*s++ - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- return (int)v;
-}
+#include <windows.h>
+#include "resource.h"
+
+// JF> updated usage
+// call like this:
+// LangDLL:LangDialog "Window Title" "Window subtext" <number of languages>[F] language_text language_id ... [font_size font_face]
+// ex:
+// LangDLL:LangDialog "Language Selection" "Choose a language" 2 French 1036 English 1033
+// or (the F after the 2 means we're supplying font information)
+// LangDLL:LangDialog "Language Selection" "Choose a language" 2F French 1036 English 1033 12 Garamond
+
+
+#include "../ExDLL/exdll.h"
+
+int myatoi(char *s);
+
+HINSTANCE g_hInstance;
+HWND g_hwndParent;
+
+char temp[1024];
+char g_wndtitle[1024], g_wndtext[1024];
+int dofont;
+int docp;
+
+int langs_num;
+
+struct lang {
+ char *name;
+ char *id;
+ UINT cp;
+} *langs;
+
+BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ int i, size;
+ char *selected_language = NULL;
+ static HFONT font;
+ switch (uMsg) {
+ case WM_INITDIALOG:
+ // add languages
+ for (i = langs_num - 1; i >= 0; i--) {
+ int cbi;
+
+ if (langs[i].cp != 0 && langs[i].cp != GetACP())
+ continue;
+
+ cbi = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM) langs[i].name);
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, cbi, (LPARAM) langs[i].id);
+
+ // remember selected language
+ if (!lstrcmp(langs[i].id, getuservariable(INST_LANG))) {
+ selected_language = langs[i].name;
+ }
+ }
+ // empty list box?
+ if (SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCOUNT, 0, 0) == 0) {
+ pushstring("no languages available");
+ EndDialog(hwndDlg, 0);
+ break;
+ }
+ // select the current language
+ if (selected_language)
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) selected_language);
+ else
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, 0, 0);
+ // set texts
+ SetDlgItemText(hwndDlg, IDC_TEXT, g_wndtext);
+ SetWindowText(hwndDlg, g_wndtitle);
+ SendDlgItemMessage(hwndDlg, IDC_APPICON, STM_SETICON, (LPARAM)LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(103)), 0);
+ // set font
+ if (dofont && !popstring(temp)) {
+ size = myatoi(temp);
+ if (!popstring(temp)) {
+ LOGFONT f = {0,};
+ if (lstrcmp(temp, "MS Shell Dlg")) {
+ f.lfHeight = -MulDiv(size, GetDeviceCaps(GetDC(hwndDlg), LOGPIXELSY), 72);
+ lstrcpy(f.lfFaceName, temp);
+ font = CreateFontIndirect(&f);
+ SendMessage(hwndDlg, WM_SETFONT, (WPARAM)font, 1);
+ SendDlgItemMessage(hwndDlg, IDOK, WM_SETFONT, (WPARAM)font, 1);
+ SendDlgItemMessage(hwndDlg, IDCANCEL, WM_SETFONT, (WPARAM)font, 1);
+ SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, WM_SETFONT, (WPARAM)font, 1);
+ SendDlgItemMessage(hwndDlg, IDC_TEXT, WM_SETFONT, (WPARAM)font, 1);
+ }
+ }
+ }
+ // show window
+ ShowWindow(hwndDlg, SW_SHOW);
+ break;
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ // push result on the stack
+ i = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETCURSEL, 0, 0);
+ i = SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_GETITEMDATA, i, 0);
+ if (i != CB_ERR && i) {
+ pushstring((char *) i);
+ } else {
+ // ?!
+ pushstring("cancel");
+ }
+ // end dialog
+ EndDialog(hwndDlg, 0);
+ break;
+ case IDCANCEL:
+ // push "cancel" on the stack
+ pushstring("cancel");
+ // end dialog
+ EndDialog(hwndDlg, 0);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ // clean up
+ if (font) DeleteObject(font);
+ break;
+ default:
+ return FALSE; // message not processed
+ }
+ return TRUE; // message processed
+}
+
+void __declspec(dllexport) LangDialog(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ g_hwndParent=hwndParent;
+ EXDLL_INIT();
+
+ {
+ int i;
+ BOOL pop_empty_string = FALSE;
+
+ // get texts
+ if (popstring(g_wndtitle)) return;
+ if (popstring(g_wndtext)) return;
+
+ // get flags
+ if (popstring(temp)) return;
+
+ // parse flags
+ {
+ char *p=temp;
+ while (*p)
+ {
+ if (*p == 'F') dofont=1; // parse font flag
+ if (*p == 'C') docp=1; // parse codepage flag
+ p++;
+ }
+ }
+
+ if (*temp == 'A') {
+ // automatic language count
+ stack_t *th;
+ langs_num=0;
+ th=(*g_stacktop);
+ while (th && th->text[0]) {
+ langs_num++;
+ th = th->next;
+ }
+ if (!th) return;
+ if (docp)
+ langs_num /= 3;
+ else
+ langs_num /= 2;
+ pop_empty_string = TRUE;
+ } else {
+ // use counts languages
+ langs_num = myatoi(temp);
+ }
+
+ // zero languages?
+ if (!langs_num) return;
+
+ // allocate language struct
+ langs = (struct lang *)GlobalAlloc(GPTR, langs_num*sizeof(struct lang));
+ if (!langs) return;
+
+ // fill language struct
+ for (i = 0; i < langs_num; i++) {
+ if (popstring(temp)) return;
+ langs[i].name = GlobalAlloc(GPTR, lstrlen(temp)+1);
+ if (!langs[i].name) return;
+ lstrcpy(langs[i].name, temp);
+
+ if (popstring(temp)) return;
+ langs[i].id = GlobalAlloc(GPTR, lstrlen(temp)+1);
+ if (!langs[i].id) return;
+ lstrcpy(langs[i].id, temp);
+
+ if (docp)
+ {
+ if (popstring(temp)) return;
+ langs[i].cp = myatoi(temp);
+ }
+ }
+
+ // pop the empty string to keep the stack clean
+ if (pop_empty_string) {
+ if (popstring(temp)) return;
+ }
+
+ // start dialog
+ DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_DIALOG), 0, DialogProc);
+
+ // free structs
+ for (i = 0; i < langs_num; i++) {
+ GlobalFree(langs[i].name);
+ GlobalFree(langs[i].id);
+ }
+ GlobalFree(langs);
+ }
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance=hInst;
+ return TRUE;
+}
+
+int myatoi(char *s)
+{
+ unsigned int v=0;
+ for (;;) {
+ int c=*s++ - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ return (int)v;
+}
diff --git a/Contrib/LangDLL/SConscript b/Contrib/LangDLL/SConscript
index 1eec9ed..46f78c5 100755
--- a/Contrib/LangDLL/SConscript
+++ b/Contrib/LangDLL/SConscript
@@ -1,19 +1,19 @@
-target = 'LangDLL'
-
-files = Split("""
- LangDLL.c
-""")
-
-resources = Split("""
- resource.rc
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, res = resources)
+target = 'LangDLL'
+
+files = Split("""
+ LangDLL.c
+""")
+
+resources = Split("""
+ resource.rc
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, res = resources)
diff --git a/Contrib/LangDLL/resource.h b/Contrib/LangDLL/resource.h
index a70b85c..d755eaf 100755
--- a/Contrib/LangDLL/resource.h
+++ b/Contrib/LangDLL/resource.h
@@ -1,19 +1,19 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by resource.rc
-//
-#define IDD_DIALOG 101
-#define IDC_LANGUAGE 1002
-#define IDC_TEXT 1007
-#define IDC_APPICON 1008
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 104
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1010
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+#define IDD_DIALOG 101
+#define IDC_LANGUAGE 1002
+#define IDC_TEXT 1007
+#define IDC_APPICON 1008
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 104
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1010
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/LangDLL/resource.rc b/Contrib/LangDLL/resource.rc
index c7e5dd2..ee7a46b 100755
--- a/Contrib/LangDLL/resource.rc
+++ b/Contrib/LangDLL/resource.rc
@@ -1,113 +1,113 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <winresrc.h>
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG DIALOGEX DISCARDABLE 0, 0, 192, 79
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Dialog"
-FONT 8, "MS Shell Dlg"
-BEGIN
- COMBOBOX IDC_LANGUAGE,45,39,140,100,CBS_DROPDOWNLIST | CBS_SORT |
- WS_VSCROLL | WS_TABSTOP
- DEFPUSHBUTTON "OK",IDOK,75,59,50,14
- PUSHBUTTON "Cancel",IDCANCEL,135,59,50,14
- LTEXT "",IDC_TEXT,45,10,140,27
- ICON "",IDC_APPICON,10,10,20,20
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 185
- TOPMARGIN, 7
- BOTTOMMARGIN, 72
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Unknown language: 0xD, 0x1 resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
-#ifdef _WIN32
-LANGUAGE 0xD, 0x1
-#pragma code_page(1255)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // Unknown language: 0xD, 0x1 resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winresrc.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG DIALOGEX DISCARDABLE 0, 0, 192, 79
+STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Dialog"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ COMBOBOX IDC_LANGUAGE,45,39,140,100,CBS_DROPDOWNLIST | CBS_SORT |
+ WS_VSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "OK",IDOK,75,59,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,135,59,50,14
+ LTEXT "",IDC_TEXT,45,10,140,27
+ ICON "",IDC_APPICON,10,10,20,20
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 185
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 72
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Unknown language: 0xD, 0x1 resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
+#ifdef _WIN32
+LANGUAGE 0xD, 0x1
+#pragma code_page(1255)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Unknown language: 0xD, 0x1 resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/Language files/Afrikaans.nlf b/Contrib/Language files/Afrikaans.nlf
index db42d00..3c45431 100755
--- a/Contrib/Language files/Afrikaans.nlf
+++ b/Contrib/Language files/Afrikaans.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1078
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Friedel Wolff
-# ^Branding
-Nullsoft Installeerstelsel %s
-# ^SetupCaption
-$(^Name) Installasie
-# ^UninstallCaption
-$(^Name) Verwydering
-# ^LicenseSubCaption
-: Lisensie-ooreenkoms
-# ^ComponentsSubCaption
-: Installasiekeuses
-# ^DirSubCaption
-: Installasiegids
-# ^InstallingSubCaption
-: Installeer tans
-# ^CompletedSubCaption
-: Voltooid
-# ^UnComponentsSubCaption
-: Verwyderingkeuses
-# ^UnDirSubCaption
-: Verwyderinggids
-# ^ConfirmSubCaption
-: Bevestiging
-# ^UninstallingSubCaption
-: Verwyder tans
-# ^UnCompletedSubCaption
-: Voltooid
-# ^BackBtn
-< V&orige
-# ^NextBtn
-&Volgende >
-# ^AgreeBtn
-&Regso
-# ^AcceptBtn
-Ek &aanvaar die ooreenkoms
-# ^DontAcceptBtn
-Ek aan vaar &nie die ooreenkoms nie
-# ^InstallBtn
-&Installeer
-# ^UninstallBtn
-&Verwyder
-# ^CancelBtn
-Kanselleer
-# ^CloseBtn
-&Sluit af
-# ^BrowseBtn
-&Blaai...
-# ^ShowDetailsBtn
-&Wys detail
-# ^ClickNext
-Klik op Volgende om verder te gaan.
-# ^ClickInstall
-Klik op Installeer om die installasie te begin.
-# ^ClickUninstall
-Klik op Verwyder om die verwydering te begin.
-# ^Name
-Naam
-# ^Completed
-Voltooid
-# ^LicenseText
-Lees die lisensieooreenkoms voordat u $(^NameDA) installeer. Klik op Regso as u die ooreenkoms aanvaar.
-# ^LicenseTextCB
-Lees die lisensieooreenkoms voordat u $(^NameDA) installeer. Merk die blokkie hieronder as u die ooreenkoms aanvaar. $_CLICK
-# ^LicenseTextRB
-Lees die lisensieooreenkoms voordat u $(^NameDA) installeer. Kies die eerste keuse hieronder as u die ooreenkoms aanvaar. $_CLICK
-# ^UnLicenseText
-Lees die lisensieooreenkoms voordat u $(^NameDA) verwyder. Klik op Regso als u die ooreenkoms aanvaar.
-# ^UnLicenseTextCB
-Lees die lisensieooreenkoms voordat u $(^NameDA) verwyder. Merk die blokkie hieronder as u die ooreenkoms aanvaar. $_CLICK
-# ^UnLicenseTextRB
-Lees die lisensieooreenkoms voordat u $(^NameDA) verwyder. KIes die eerste keuse hieronder as u die ooreenkoms aanvaar. $_CLICK
-# ^Custom
-Aangepast
-# ^ComponentsText
-Kies die komponente wat u wil installeer en deselekteer dié wat u nie wil installeer nie. $_CLICK
-# ^ComponentsSubText1
-Kies die installasietipe:
-# ^ComponentsSubText2_NoInstTypes
-Kies die komponente wat geïnstalleer moet word:
-# ^ComponentsSubText2
-Of kies die komponente wat geïnstalleer moet word:
-# ^UnComponentsText
-Kies die komponente wat u wil verwyder en deselekteer dié wat u nie wil verwyder nie. $_CLICK
-# ^UnComponentsSubText1
-Kies die verwyderingstipe:
-# ^UnComponentsSubText2_NoInstTypes
-Kies die komponente wat verwyder moet word:
-# ^UnComponentsSubText2
-Of kies die komponente wat verwyder moet word:
-# ^DirText
-$(^NameDA) sal in die volgende gids geïnstalleer word. Om elders te installeer, klik op Blaai en kies 'n ander een. $_CLICK
-# ^DirSubText
-Installasiegids
-# ^DirBrowseText
-Kies die gids om $(^NameDA) in te installeer:
-# ^UnDirText
-$(^NameDA) gaan uit die volgende gids verwyder word. Om van elders af te verwyder, klik op Blaai en kies 'n ander gids. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Kies die gids om $(^NameDA) uit te verwyder:
-# ^SpaceAvailable
-"Beskikbare spasie: "
-# ^SpaceRequired
-"Vereiste spasie: "
-# ^UninstallingText
-$(^NameDA) sal uit die volgende gids verwyder word. $_CLICK
-# ^UninstallingSubText
-Verwydering uit:
-# ^FileError
-Fout met skryf na lêer: \r\n\r\n$0\r\n\r\nKlik Staak om de installasie te stop,\r\nProbeer weer om weer te probeer of\r\nIgnoreer om dié lêer oor te slaan.
-# ^FileError_NoIgnore
-Fout met skryf na lêer: \r\n\r\n$0\r\n\r\nKlik Probeer weer om op nuut te probeer, of \r\nKanselleer om die installasie te stop.
-# ^CantWrite
-"Kon nie skyf nie: "
-# ^CopyFailed
-Kopiëring het misluk
-# ^CopyTo
-"Kopieer na "
-# ^Registering
-"Registreer tans: "
-# ^Unregistering
-"Deregistreer tans: "
-# ^SymbolNotFound
-"Kon nie simbool vind nie: "
-# ^CouldNotLoad
-"Kon nie laai nie: "
-# ^CreateFolder
-"Skep gids: "
-# ^CreateShortcut
-"Maak kortpad: "
-# ^CreatedUninstaller
-"Verwyderingsprogram gemaak: "
-# ^Delete
-"Verwyder lêer: "
-# ^DeleteOnReboot
-"Verwyder na herbegin van rekenaar: "
-# ^ErrorCreatingShortcut
-"Fout met maak van kortpad: "
-# ^ErrorCreating
-"Fout met skep: "
-# ^ErrorDecompressing
-Fout met uitpak van data! Korrupte installasielêer?
-# ^ErrorRegistering
-Fout met registrasie van DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Voer uit: "
-# ^Extract
-"Pak uit: "
-# ^ErrorWriting
-"Uitpak: fout met skryf na lêer "
-# ^InvalidOpcode
-Installasieprogram korrup: ongeldige opcode
-# ^NoOLE
-"Geen OLE vir: "
-# ^OutputFolder
-"Afvoergids: "
-# ^RemoveFolder
-"Verwyder gids: "
-# ^RenameOnReboot
-"Hernoem na herbegin van rekenaar: "
-# ^Rename
-"Hernoem: "
-# ^Skipped
-"Oorgeslaan: "
-# ^CopyDetails
-Kopieer detail na knipbord
-# ^LogInstall
-Boekstaaf die installasieproses
-# ^Byte
-G
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Language ID
+1078
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Friedel Wolff
+# ^Branding
+Nullsoft Installeerstelsel %s
+# ^SetupCaption
+$(^Name) Installasie
+# ^UninstallCaption
+$(^Name) Verwydering
+# ^LicenseSubCaption
+: Lisensie-ooreenkoms
+# ^ComponentsSubCaption
+: Installasiekeuses
+# ^DirSubCaption
+: Installasiegids
+# ^InstallingSubCaption
+: Installeer tans
+# ^CompletedSubCaption
+: Voltooid
+# ^UnComponentsSubCaption
+: Verwyderingkeuses
+# ^UnDirSubCaption
+: Verwyderinggids
+# ^ConfirmSubCaption
+: Bevestiging
+# ^UninstallingSubCaption
+: Verwyder tans
+# ^UnCompletedSubCaption
+: Voltooid
+# ^BackBtn
+< V&orige
+# ^NextBtn
+&Volgende >
+# ^AgreeBtn
+&Regso
+# ^AcceptBtn
+Ek &aanvaar die ooreenkoms
+# ^DontAcceptBtn
+Ek aan vaar &nie die ooreenkoms nie
+# ^InstallBtn
+&Installeer
+# ^UninstallBtn
+&Verwyder
+# ^CancelBtn
+Kanselleer
+# ^CloseBtn
+&Sluit af
+# ^BrowseBtn
+&Blaai...
+# ^ShowDetailsBtn
+&Wys detail
+# ^ClickNext
+Klik op Volgende om verder te gaan.
+# ^ClickInstall
+Klik op Installeer om die installasie te begin.
+# ^ClickUninstall
+Klik op Verwyder om die verwydering te begin.
+# ^Name
+Naam
+# ^Completed
+Voltooid
+# ^LicenseText
+Lees die lisensieooreenkoms voordat u $(^NameDA) installeer. Klik op Regso as u die ooreenkoms aanvaar.
+# ^LicenseTextCB
+Lees die lisensieooreenkoms voordat u $(^NameDA) installeer. Merk die blokkie hieronder as u die ooreenkoms aanvaar. $_CLICK
+# ^LicenseTextRB
+Lees die lisensieooreenkoms voordat u $(^NameDA) installeer. Kies die eerste keuse hieronder as u die ooreenkoms aanvaar. $_CLICK
+# ^UnLicenseText
+Lees die lisensieooreenkoms voordat u $(^NameDA) verwyder. Klik op Regso als u die ooreenkoms aanvaar.
+# ^UnLicenseTextCB
+Lees die lisensieooreenkoms voordat u $(^NameDA) verwyder. Merk die blokkie hieronder as u die ooreenkoms aanvaar. $_CLICK
+# ^UnLicenseTextRB
+Lees die lisensieooreenkoms voordat u $(^NameDA) verwyder. KIes die eerste keuse hieronder as u die ooreenkoms aanvaar. $_CLICK
+# ^Custom
+Aangepast
+# ^ComponentsText
+Kies die komponente wat u wil installeer en deselekteer dié wat u nie wil installeer nie. $_CLICK
+# ^ComponentsSubText1
+Kies die installasietipe:
+# ^ComponentsSubText2_NoInstTypes
+Kies die komponente wat geïnstalleer moet word:
+# ^ComponentsSubText2
+Of kies die komponente wat geïnstalleer moet word:
+# ^UnComponentsText
+Kies die komponente wat u wil verwyder en deselekteer dié wat u nie wil verwyder nie. $_CLICK
+# ^UnComponentsSubText1
+Kies die verwyderingstipe:
+# ^UnComponentsSubText2_NoInstTypes
+Kies die komponente wat verwyder moet word:
+# ^UnComponentsSubText2
+Of kies die komponente wat verwyder moet word:
+# ^DirText
+$(^NameDA) sal in die volgende gids geïnstalleer word. Om elders te installeer, klik op Blaai en kies 'n ander een. $_CLICK
+# ^DirSubText
+Installasiegids
+# ^DirBrowseText
+Kies die gids om $(^NameDA) in te installeer:
+# ^UnDirText
+$(^NameDA) gaan uit die volgende gids verwyder word. Om van elders af te verwyder, klik op Blaai en kies 'n ander gids. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Kies die gids om $(^NameDA) uit te verwyder:
+# ^SpaceAvailable
+"Beskikbare spasie: "
+# ^SpaceRequired
+"Vereiste spasie: "
+# ^UninstallingText
+$(^NameDA) sal uit die volgende gids verwyder word. $_CLICK
+# ^UninstallingSubText
+Verwydering uit:
+# ^FileError
+Fout met skryf na lêer: \r\n\r\n$0\r\n\r\nKlik Staak om de installasie te stop,\r\nProbeer weer om weer te probeer of\r\nIgnoreer om dié lêer oor te slaan.
+# ^FileError_NoIgnore
+Fout met skryf na lêer: \r\n\r\n$0\r\n\r\nKlik Probeer weer om op nuut te probeer, of \r\nKanselleer om die installasie te stop.
+# ^CantWrite
+"Kon nie skyf nie: "
+# ^CopyFailed
+Kopiëring het misluk
+# ^CopyTo
+"Kopieer na "
+# ^Registering
+"Registreer tans: "
+# ^Unregistering
+"Deregistreer tans: "
+# ^SymbolNotFound
+"Kon nie simbool vind nie: "
+# ^CouldNotLoad
+"Kon nie laai nie: "
+# ^CreateFolder
+"Skep gids: "
+# ^CreateShortcut
+"Maak kortpad: "
+# ^CreatedUninstaller
+"Verwyderingsprogram gemaak: "
+# ^Delete
+"Verwyder lêer: "
+# ^DeleteOnReboot
+"Verwyder na herbegin van rekenaar: "
+# ^ErrorCreatingShortcut
+"Fout met maak van kortpad: "
+# ^ErrorCreating
+"Fout met skep: "
+# ^ErrorDecompressing
+Fout met uitpak van data! Korrupte installasielêer?
+# ^ErrorRegistering
+Fout met registrasie van DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Voer uit: "
+# ^Extract
+"Pak uit: "
+# ^ErrorWriting
+"Uitpak: fout met skryf na lêer "
+# ^InvalidOpcode
+Installasieprogram korrup: ongeldige opcode
+# ^NoOLE
+"Geen OLE vir: "
+# ^OutputFolder
+"Afvoergids: "
+# ^RemoveFolder
+"Verwyder gids: "
+# ^RenameOnReboot
+"Hernoem na herbegin van rekenaar: "
+# ^Rename
+"Hernoem: "
+# ^Skipped
+"Oorgeslaan: "
+# ^CopyDetails
+Kopieer detail na knipbord
+# ^LogInstall
+Boekstaaf die installasieproses
+# ^Byte
+G
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Afrikaans.nsh b/Contrib/Language files/Afrikaans.nsh
index e268652..275a4f1 100755
--- a/Contrib/Language files/Afrikaans.nsh
+++ b/Contrib/Language files/Afrikaans.nsh
@@ -1,121 +1,121 @@
-;Language: Afrikaans (1078)
-;By Friedel Wolff
-
-!insertmacro LANGFILE "Afrikaans" "Afrikaans"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welkom by die $(^NameDA) Installasieslimmerd"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Hierdie slimmerd lei mens deur die installasie van $(^NameDA).$\r$\n$\r$\nDit word aanbeveel dat u alle ander programme afsluit voor die begin van die installasie. Dit maak dit moontlik om die relevante stelsellêers op te dateer sonder om die rekenaar te herlaai.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welkom by die $(^NameDA) Verwyderingslimmerd"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Hierdie slimmerd lei mens deur die verwydering van $(^NameDA).$\r$\n$\r$\nVoor die verwydering begin word, maak seker dat $(^NameDA) nie loop nie.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisensie-ooreenkoms"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lees die lisensie-ooreenkoms voordat u $(^NameDA) installeer."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Klik op Regso om verder te gaan as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te installeer."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Merk die blokkie hier onder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te installeer. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kies die eerste keuse hieronder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te installeer. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisensie-ooreenkoms"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lees die lisensie-ooreenkoms voordat u $(^NameDA) verwyder."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Klik op Regso om verder te gaan as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te verwyder."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Merk die kiesblokkie hieronder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te verwyder."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kies die eerste keuse hieronder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te verwyder."
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Druk op Page Down om die res van die ooreenkoms te sien."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Kies komponente"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Kies watter komponente van $(^NameDA) geïnstalleer moet word."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrywing"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Kies komponente"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Kies watter komponente van $(^NameDA) verwyder moet word."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg die muis oor 'n komponent om sy beskrywing te sien."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg die muis oor 'n komponent om sy beskrywing te sien."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Kies installasieplek"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Kies die gids waarin u $(^NameDA) wil installeer."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Kies verwyderinggids"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Kies die gids waaruit u $(^NameDA) wil verwyder."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installeer tans"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Wag asb. terwyl $(^NameDA) geïnstalleer word."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installasie voltooid"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Die installasie is suksesvol voltooi."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installasie gestaak"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Die installasie is nie suksesvol voltooi nie."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Verwyder tans"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Wag asb. terwyl $(^NameDA) van u rekenaar verwyder word."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Verwydering voltooi"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Verwydering is suksesvol voltooi."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Verwydering gestaak"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Verwydering is nie suksesvol voltooi nie."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Voltooi van die $(^NameDA) Installasieslimmerd"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) is geïnstalleer op uw rekenaar.$\r$\n$\r$\nKlik op Voltooi om hierdie slimmerd af te sluit."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Die rekenaar moet oorbegin word om die installasie van $(^NameDA) te voltooi. Wil u nou oorbegin?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Voltooi van die $(^NameDA) Verwyderingslimmerd"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) is van u rekenaar verwyder.$\r$\n$\r$\nKlik op Voltooi om hierdie slimmerd af te sluit."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Die rekenaar moet oorbegin word om die verwydering van $(^NameDA) te voltooi. Wil u nou oorbegin?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Begin nou oor"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ek wil later self oorbegin"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Laat loop $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Wys Leesmy-lêer"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Voltooi"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Kies gids in Begin-kieslys"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Kies 'n gids in die Begin-kieslys vir $(^NameDA) se kortpaaie."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Kies die gids in die Begin-kieslys waarin die program se kortpaaie geskep moet word. U kan ook 'n nuwe naam gee om 'n nuwe gids te skep."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Moenie kortpaaie maak nie"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Verwyder $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Verwyder $(^NameDA) van u rekenaar."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Wil u definitief die installasie van $(^Name) afsluit?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Wil u definitief die verwydering van $(^Name) afsluit?"
-!endif
+;Language: Afrikaans (1078)
+;By Friedel Wolff
+
+!insertmacro LANGFILE "Afrikaans" "Afrikaans"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welkom by die $(^NameDA) Installasieslimmerd"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Hierdie slimmerd lei mens deur die installasie van $(^NameDA).$\r$\n$\r$\nDit word aanbeveel dat u alle ander programme afsluit voor die begin van die installasie. Dit maak dit moontlik om die relevante stelsellêers op te dateer sonder om die rekenaar te herlaai.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welkom by die $(^NameDA) Verwyderingslimmerd"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Hierdie slimmerd lei mens deur die verwydering van $(^NameDA).$\r$\n$\r$\nVoor die verwydering begin word, maak seker dat $(^NameDA) nie loop nie.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisensie-ooreenkoms"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lees die lisensie-ooreenkoms voordat u $(^NameDA) installeer."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Klik op Regso om verder te gaan as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te installeer."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Merk die blokkie hier onder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te installeer. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kies die eerste keuse hieronder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te installeer. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisensie-ooreenkoms"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lees die lisensie-ooreenkoms voordat u $(^NameDA) verwyder."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Klik op Regso om verder te gaan as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te verwyder."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Merk die kiesblokkie hieronder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te verwyder."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kies die eerste keuse hieronder as u die ooreenkoms aanvaar. U moet die ooreenkoms aanvaar om $(^NameDA) te verwyder."
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Druk op Page Down om die res van die ooreenkoms te sien."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Kies komponente"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Kies watter komponente van $(^NameDA) geïnstalleer moet word."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrywing"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Kies komponente"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Kies watter komponente van $(^NameDA) verwyder moet word."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg die muis oor 'n komponent om sy beskrywing te sien."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg die muis oor 'n komponent om sy beskrywing te sien."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Kies installasieplek"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Kies die gids waarin u $(^NameDA) wil installeer."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Kies verwyderinggids"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Kies die gids waaruit u $(^NameDA) wil verwyder."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installeer tans"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Wag asb. terwyl $(^NameDA) geïnstalleer word."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installasie voltooid"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Die installasie is suksesvol voltooi."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installasie gestaak"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Die installasie is nie suksesvol voltooi nie."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Verwyder tans"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Wag asb. terwyl $(^NameDA) van u rekenaar verwyder word."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Verwydering voltooi"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Verwydering is suksesvol voltooi."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Verwydering gestaak"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Verwydering is nie suksesvol voltooi nie."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Voltooi van die $(^NameDA) Installasieslimmerd"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) is geïnstalleer op uw rekenaar.$\r$\n$\r$\nKlik op Voltooi om hierdie slimmerd af te sluit."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Die rekenaar moet oorbegin word om die installasie van $(^NameDA) te voltooi. Wil u nou oorbegin?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Voltooi van die $(^NameDA) Verwyderingslimmerd"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) is van u rekenaar verwyder.$\r$\n$\r$\nKlik op Voltooi om hierdie slimmerd af te sluit."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Die rekenaar moet oorbegin word om die verwydering van $(^NameDA) te voltooi. Wil u nou oorbegin?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Begin nou oor"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ek wil later self oorbegin"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Laat loop $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Wys Leesmy-lêer"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Voltooi"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Kies gids in Begin-kieslys"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Kies 'n gids in die Begin-kieslys vir $(^NameDA) se kortpaaie."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Kies die gids in die Begin-kieslys waarin die program se kortpaaie geskep moet word. U kan ook 'n nuwe naam gee om 'n nuwe gids te skep."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Moenie kortpaaie maak nie"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Verwyder $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Verwyder $(^NameDA) van u rekenaar."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Wil u definitief die installasie van $(^Name) afsluit?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Wil u definitief die verwydering van $(^Name) afsluit?"
+!endif
diff --git a/Contrib/Language files/Albanian.nlf b/Contrib/Language files/Albanian.nlf
index 4ad3c7d..8a08b96 100755
--- a/Contrib/Language files/Albanian.nlf
+++ b/Contrib/Language files/Albanian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1052
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation Besnik Bleta, besnik@spymac.com
-# ^Branding
-Sistemi Nullsoft për Instalime %s
-# ^SetupCaption
-Rregullim i $(^Name)
-# ^UninstallCaption
-Çinstalim i $(^Name)
-# ^LicenseSubCaption
-: Marrëveshje License
-# ^ComponentsSubCaption
-: Mundësi Instalimi
-# ^DirSubCaption
-: Dosje Instalimi
-# ^InstallingSubCaption
-: Po instaloj
-# ^CompletedSubCaption
-: Plotësuar
-# ^UnComponentsSubCaption
-: Mundësi Çinstalimi
-# ^UnDirSubCaption
-: Dosje Çinstalimi
-# ^ConfirmSubCaption
-: Ripohim
-# ^UninstallingSubCaption
-: Po çinstaloj
-# ^UnCompletedSubCaption
-: Plotësuar
-# ^BackBtn
-< &Prapa
-# ^NextBtn
-&Më tej >
-# ^AgreeBtn
-&Pajtohem
-# ^AcceptBtn
-I &pranoj kushtet e Marrëveshjes së Licensës
-# ^DontAcceptBtn
-N&uk i pranoj kushtet e Marrëveshjes së Licensës
-# ^InstallBtn
-&Instalo
-# ^UninstallBtn
-&Çinstalo
-# ^CancelBtn
-Anulo
-# ^CloseBtn
-&Mbyll
-# ^BrowseBtn
-Sh&fletoni...
-# ^ShowDetailsBtn
-Shfaq &hollësi
-# ^ClickNext
-Klikoni Më tej për të vazhduar.
-# ^ClickInstall
-Klikoni Instalo për të filluar instalimin.
-# ^ClickUninstall
-Klikoni Çinstalo për të filluar çinstalimin.
-# ^Name
-Emër
-# ^Completed
-Plotësuar
-# ^LicenseText
-Ju lutem shqyrtoni marrëveshjen e licensës para instalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni Pajtohem.
-# ^LicenseTextCB
-Ju lutem shqyrtoni marrëveshjen e licensës para instalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni kutizën më poshtë. $_CLICK
-# ^LicenseTextRB
-Ju lutem shqyrtoni marrëveshjen e licensës para instalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, përzgjidhni mundësinë e parë më poshtë. $_CLICK
-# ^UnLicenseText
-Ju lutem shqyrtoni marrëveshjen e licensës para çinstalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni Pajtohem.
-# ^UnLicenseTextCB
-Ju lutem shqyrtoni marrëveshjen e licensës para çinstalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni kutizën më poshtë. $_CLICK
-# ^UnLicenseTextRB
-Ju lutem shqyrtoni marrëveshjen e licensës para çinstalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, përzgjidhni mundësinë e parë më poshtë. $_CLICK
-# ^Custom
-Vetjake
-# ^ComponentsText
-U vini shenjë përbërësve që doni të instalohen dhe çshenjoni përbërësit që nuk doni të instalohen. $_CLICK
-# ^ComponentsSubText1
-Përzgjidhni tipin e instalimit:
-# ^ComponentsSubText2_NoInstTypes
-Përzgjidhni përbërësit për t'u instaluar:
-# ^ComponentsSubText2
-Ose, përzgjidhni përbërësit e mundshëm që doni të instalohen:
-# ^UnComponentsText
-U vini shenjë përbërësve që doni të çinstalohen dhe çshenjoni përbërësit që nuk doni të çinstalohen. $_CLICK
-# ^UnComponentsSubText1
-Përzgjidhni tipin e çinstalimit:
-# ^UnComponentsSubText2_NoInstTypes
-Përzgjidhni përbërësit për t'u çinstaluar:
-# ^UnComponentsSubText2
-Ose, përzgjidhni përbërësit e mundshëm që doni të çinstalohen:
-# ^DirText
-Rregullimi do të instalojë $(^NameDA) në dosjen vijuese. Për instalim në një dosje tjetër, klikoni Shfletoni dhe përzgjidhni një tjetër dosje. $_CLICK
-# ^DirSubText
-Dosje Vendmbërritje
-# ^DirBrowseText
-Përzgjidhni dosjen ku të instalohet $(^NameDA):
-# ^UnDirText
-Rregullimi do të çinstalojë $(^NameDA) prej dosjes vijuese. Për çinstalim prej një dosjeje tjetër, klikoni Shfletoni dhe përzgjidhni një tjetër dosje. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Përzgjidhni dosjen prej nga ku të çinstalohet $(^NameDA):
-# ^SpaceAvailable
-"Hapësirë e mundshme: "
-# ^SpaceRequired
-"Hapësirë e nevojshme: "
-# ^UninstallingText
-$(^NameDA) do të çinstalohet prej dosjes vijuese. $_CLICK
-# ^UninstallingSubText
-Po çinstaloj prej:
-# ^FileError
-Gabim në hapje kartele për shkrim: \r\n\r\n$0\r\n\r\nKlikoni Ndërprit për të ndalur instalimin,\r\nRiprovo për të provuar sërish, ose\r\nShpërfill për të anashkaluar këtë kartelë.
-# ^FileError_NoIgnore
-Gabim në hapje kartele për shkrim: \r\n\r\n$0\r\n\r\nKlikoni Riprovo për të provuar sërish, ose\r\nAnulo për të ndalur instalimin.
-# ^CantWrite
-"S'shkruaj dot: "
-# ^CopyFailed
-Kopjimi dështoi
-# ^CopyTo
-"Kopjo tek "
-# ^Registering
-"Regjistrim: "
-# ^Unregistering
-"Çregjistrim: "
-# ^SymbolNotFound
-"S'gjeta dot simbol: "
-# ^CouldNotLoad
-"S'ngarkova dot: "
-# ^CreateFolder
-"Krijo dosje: "
-# ^CreateShortcut
-"Krijo shkurtprerje: "
-# ^CreatedUninstaller
-"Krijo çinstalues: "
-# ^Delete
-"Fshi kartelë: "
-# ^DeleteOnReboot
-"Fshi gjatë rinisjes: "
-# ^ErrorCreatingShortcut
-"Gabim në krijim shkurtprerjesh: "
-# ^ErrorCreating
-"Gabim në krijim: "
-# ^ErrorDecompressing
-Gabim në çngjeshje të dhënash! Instalues i dëmtuar?
-# ^ErrorRegistering
-Gabim në regjistrim DLL-je
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Ekzekuto: "
-# ^Extract
-"Përfto: "
-# ^ErrorWriting
-"Përftim: gabim në shkrim te kartela "
-# ^InvalidOpcode
-Instalues i dëmtuar: opcode i pavlefshëm
-# ^NoOLE
-"Pa OLE për: "
-# ^OutputFolder
-"Dosje përfundimesh: "
-# ^RemoveFolder
-"Hiq dosje: "
-# ^RenameOnReboot
-"Riemërto gjatë rinisjes: "
-# ^Rename
-"Riemërto: "
-# ^Skipped
-"Anashkaluar: "
-# ^CopyDetails
-Kopjo Hollësira Te Clipboard
-# ^LogInstall
-Regjistro procesin e instalimit
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1052
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation Besnik Bleta, besnik@spymac.com
+# ^Branding
+Sistemi Nullsoft për Instalime %s
+# ^SetupCaption
+Rregullim i $(^Name)
+# ^UninstallCaption
+Çinstalim i $(^Name)
+# ^LicenseSubCaption
+: Marrëveshje License
+# ^ComponentsSubCaption
+: Mundësi Instalimi
+# ^DirSubCaption
+: Dosje Instalimi
+# ^InstallingSubCaption
+: Po instaloj
+# ^CompletedSubCaption
+: Plotësuar
+# ^UnComponentsSubCaption
+: Mundësi Çinstalimi
+# ^UnDirSubCaption
+: Dosje Çinstalimi
+# ^ConfirmSubCaption
+: Ripohim
+# ^UninstallingSubCaption
+: Po çinstaloj
+# ^UnCompletedSubCaption
+: Plotësuar
+# ^BackBtn
+< &Prapa
+# ^NextBtn
+&Më tej >
+# ^AgreeBtn
+&Pajtohem
+# ^AcceptBtn
+I &pranoj kushtet e Marrëveshjes së Licensës
+# ^DontAcceptBtn
+N&uk i pranoj kushtet e Marrëveshjes së Licensës
+# ^InstallBtn
+&Instalo
+# ^UninstallBtn
+&Çinstalo
+# ^CancelBtn
+Anulo
+# ^CloseBtn
+&Mbyll
+# ^BrowseBtn
+Sh&fletoni...
+# ^ShowDetailsBtn
+Shfaq &hollësi
+# ^ClickNext
+Klikoni Më tej për të vazhduar.
+# ^ClickInstall
+Klikoni Instalo për të filluar instalimin.
+# ^ClickUninstall
+Klikoni Çinstalo për të filluar çinstalimin.
+# ^Name
+Emër
+# ^Completed
+Plotësuar
+# ^LicenseText
+Ju lutem shqyrtoni marrëveshjen e licensës para instalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni Pajtohem.
+# ^LicenseTextCB
+Ju lutem shqyrtoni marrëveshjen e licensës para instalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni kutizën më poshtë. $_CLICK
+# ^LicenseTextRB
+Ju lutem shqyrtoni marrëveshjen e licensës para instalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, përzgjidhni mundësinë e parë më poshtë. $_CLICK
+# ^UnLicenseText
+Ju lutem shqyrtoni marrëveshjen e licensës para çinstalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni Pajtohem.
+# ^UnLicenseTextCB
+Ju lutem shqyrtoni marrëveshjen e licensës para çinstalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, klikoni kutizën më poshtë. $_CLICK
+# ^UnLicenseTextRB
+Ju lutem shqyrtoni marrëveshjen e licensës para çinstalimit të $(^NameDA). Nëse i pranoni tërë kushtet e marrëveshjes, përzgjidhni mundësinë e parë më poshtë. $_CLICK
+# ^Custom
+Vetjake
+# ^ComponentsText
+U vini shenjë përbërësve që doni të instalohen dhe çshenjoni përbërësit që nuk doni të instalohen. $_CLICK
+# ^ComponentsSubText1
+Përzgjidhni tipin e instalimit:
+# ^ComponentsSubText2_NoInstTypes
+Përzgjidhni përbërësit për t'u instaluar:
+# ^ComponentsSubText2
+Ose, përzgjidhni përbërësit e mundshëm që doni të instalohen:
+# ^UnComponentsText
+U vini shenjë përbërësve që doni të çinstalohen dhe çshenjoni përbërësit që nuk doni të çinstalohen. $_CLICK
+# ^UnComponentsSubText1
+Përzgjidhni tipin e çinstalimit:
+# ^UnComponentsSubText2_NoInstTypes
+Përzgjidhni përbërësit për t'u çinstaluar:
+# ^UnComponentsSubText2
+Ose, përzgjidhni përbërësit e mundshëm që doni të çinstalohen:
+# ^DirText
+Rregullimi do të instalojë $(^NameDA) në dosjen vijuese. Për instalim në një dosje tjetër, klikoni Shfletoni dhe përzgjidhni një tjetër dosje. $_CLICK
+# ^DirSubText
+Dosje Vendmbërritje
+# ^DirBrowseText
+Përzgjidhni dosjen ku të instalohet $(^NameDA):
+# ^UnDirText
+Rregullimi do të çinstalojë $(^NameDA) prej dosjes vijuese. Për çinstalim prej një dosjeje tjetër, klikoni Shfletoni dhe përzgjidhni një tjetër dosje. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Përzgjidhni dosjen prej nga ku të çinstalohet $(^NameDA):
+# ^SpaceAvailable
+"Hapësirë e mundshme: "
+# ^SpaceRequired
+"Hapësirë e nevojshme: "
+# ^UninstallingText
+$(^NameDA) do të çinstalohet prej dosjes vijuese. $_CLICK
+# ^UninstallingSubText
+Po çinstaloj prej:
+# ^FileError
+Gabim në hapje kartele për shkrim: \r\n\r\n$0\r\n\r\nKlikoni Ndërprit për të ndalur instalimin,\r\nRiprovo për të provuar sërish, ose\r\nShpërfill për të anashkaluar këtë kartelë.
+# ^FileError_NoIgnore
+Gabim në hapje kartele për shkrim: \r\n\r\n$0\r\n\r\nKlikoni Riprovo për të provuar sërish, ose\r\nAnulo për të ndalur instalimin.
+# ^CantWrite
+"S'shkruaj dot: "
+# ^CopyFailed
+Kopjimi dështoi
+# ^CopyTo
+"Kopjo tek "
+# ^Registering
+"Regjistrim: "
+# ^Unregistering
+"Çregjistrim: "
+# ^SymbolNotFound
+"S'gjeta dot simbol: "
+# ^CouldNotLoad
+"S'ngarkova dot: "
+# ^CreateFolder
+"Krijo dosje: "
+# ^CreateShortcut
+"Krijo shkurtprerje: "
+# ^CreatedUninstaller
+"Krijo çinstalues: "
+# ^Delete
+"Fshi kartelë: "
+# ^DeleteOnReboot
+"Fshi gjatë rinisjes: "
+# ^ErrorCreatingShortcut
+"Gabim në krijim shkurtprerjesh: "
+# ^ErrorCreating
+"Gabim në krijim: "
+# ^ErrorDecompressing
+Gabim në çngjeshje të dhënash! Instalues i dëmtuar?
+# ^ErrorRegistering
+Gabim në regjistrim DLL-je
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Ekzekuto: "
+# ^Extract
+"Përfto: "
+# ^ErrorWriting
+"Përftim: gabim në shkrim te kartela "
+# ^InvalidOpcode
+Instalues i dëmtuar: opcode i pavlefshëm
+# ^NoOLE
+"Pa OLE për: "
+# ^OutputFolder
+"Dosje përfundimesh: "
+# ^RemoveFolder
+"Hiq dosje: "
+# ^RenameOnReboot
+"Riemërto gjatë rinisjes: "
+# ^Rename
+"Riemërto: "
+# ^Skipped
+"Anashkaluar: "
+# ^CopyDetails
+Kopjo Hollësira Te Clipboard
+# ^LogInstall
+Regjistro procesin e instalimit
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Albanian.nsh b/Contrib/Language files/Albanian.nsh
index 41747f0..12804f2 100755
--- a/Contrib/Language files/Albanian.nsh
+++ b/Contrib/Language files/Albanian.nsh
@@ -1,121 +1,121 @@
-;Language: Albanian (1052)
-;Translation Besnik Bleta, besnik@spymac.com
-
-!insertmacro LANGFILE "Albanian" "Albanian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Mirësevini te Rregullimi i $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ky do t'ju udhëheqë gjatë instalimit të $(^NameDA).$\r$\n$\r$\nKëshillohet që të mbyllni tërë zbatimet e tjerë para se të nisni Rregullimin. Kjo bën të mundur përditësim kartelash të rëndësishme sistemi pa u dashur të riniset kompjuteri juaj.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Mirësevini te Çinstalimi i $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ky do t'ju udhëheqë gjatë çinstalimit të $(^NameDA).$\r$\n$\r$\nPara nisjes së çinstalimit, sigurohuni që $(^NameDA) nuk është duke xhiruar.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Marrëveshje License"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ju lutem shqyrtoni kushtet e licensës përpara instalimit të $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Nëse pranoni kushtet e marrëveshjes, klikoni Pajtohem për të vazhduar. Duhet të pranoni marrëveshjen për të instaluar $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Nëse pranoni kushtet e marrëveshjes, klikoni kutizën më poshtë. Duhet të pranoni marrëveshjen për të instaluar $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Nëse pranoni kushtet e marrëveshjes, përzgjidhni më poshtë mundësinë e parë. Duhet të pranoni marrëveshjen për të instaluar $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Marrëveshje License"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ju lutem shqyrtoni kushtet e licensës përpara çinstalimit të $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Nëse pranoni kushtet e marrëveshjes, klikoni Pajtohem për të vazhduar. Duhet të pranoni marrëveshjen për të çinstaluar $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Nëse pranoni kushtet e marrëveshjes, klikoni kutizën më poshtë. Duhet të pranoni marrëveshjen për të çinstaluar $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Nëse pranoni kushtet e marrëveshjes, përzgjidhni mundësinë e parë më poshtë. Duhet të pranoni marrëveshjen për të çinstaluar $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Shtypni Page Down për të parë pjesën e mbetur të marrëveshjes."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Përzgjidhni Përbërës"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zgjidhni cilat anë të $(^NameDA) doni të instalohen."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Përshkrim"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Zgjidhni Përbërësa"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zgjidhni cilat anë të $(^NameDA) doni të çinstalohen."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Për të parë përshkrimin e një përbërësi vendosni miun përsipër tij."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Për të parë përshkrimin e një përbërësi vendosni miun përsipër tij."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zgjidhni Vend Instalimi"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Zgjidhni dosjen tek e cila të instalohet $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Zgjidhni Vend Çinstalimi"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Zgjidhni dosjen prej së cilës të instalohet $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Po instaloj"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ju lutem prisni ndërkohë që $(^NameDA) instalohet."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalim i Plotësuar"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Rregullimi u plotësua me sukses."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalimi u Ndërpre"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Rregullimi nuk u plotësua me sukses."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Çinstalim"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ju lutem prisni ndërsa $(^NameDA) çinstalohet."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Çinstalim i Plotë"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Çinstalimi u plotësua me sukses."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Çinstalimi u Ndërpre"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Çinstalimi nuk plotësua me sukses."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Po plotësoj Rregullimin e $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) u instalua në kompjuterin tuaj.$\r$\n$\r$\nKlikoni Përfundo për të mbyllur këtë proces."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Që të mund të plotësohet instalimi i $(^NameDA) kompjuteri juaj duhet të riniset. Doni ta rinisni tani?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Po plotësoj çinstalimin e $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) u çinstalua prej kompjuterit tuaj.$\r$\n$\r$\nKlikoni Përfundo për të mbyllur procesin."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Kompjuteri juaj duhet të riniset që të mund të plotësohet çinstalimi i $(^NameDA). Doni ta rinisni tani?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Rinise tani"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Dua ta rinis dorazi më vonë"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Nis $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Shfaq Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Përfundo"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Zgjidhni Dosje Menuje Start"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Zgjidhni një dosje Menuje Start për shkurtprerje $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Përzgjidhni dosjen Menu Start në të cilën do të donit të krijonit shkurtprerjet për programin. Mundeni edhe të jepni një emër për të krijuar një dosje të re."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Mos krijo shkurtprerje"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Çinstalo $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Hiqni $(^NameDA) prej kompjuterit tuaj."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Jeni i sigurtë që doni të lini Rregullimin e $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Jeni i sigurtë që doni të lini Çinstalimin e $(^Name)?"
-!endif
+;Language: Albanian (1052)
+;Translation Besnik Bleta, besnik@spymac.com
+
+!insertmacro LANGFILE "Albanian" "Albanian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Mirësevini te Rregullimi i $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ky do t'ju udhëheqë gjatë instalimit të $(^NameDA).$\r$\n$\r$\nKëshillohet që të mbyllni tërë zbatimet e tjerë para se të nisni Rregullimin. Kjo bën të mundur përditësim kartelash të rëndësishme sistemi pa u dashur të riniset kompjuteri juaj.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Mirësevini te Çinstalimi i $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ky do t'ju udhëheqë gjatë çinstalimit të $(^NameDA).$\r$\n$\r$\nPara nisjes së çinstalimit, sigurohuni që $(^NameDA) nuk është duke xhiruar.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Marrëveshje License"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ju lutem shqyrtoni kushtet e licensës përpara instalimit të $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Nëse pranoni kushtet e marrëveshjes, klikoni Pajtohem për të vazhduar. Duhet të pranoni marrëveshjen për të instaluar $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Nëse pranoni kushtet e marrëveshjes, klikoni kutizën më poshtë. Duhet të pranoni marrëveshjen për të instaluar $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Nëse pranoni kushtet e marrëveshjes, përzgjidhni më poshtë mundësinë e parë. Duhet të pranoni marrëveshjen për të instaluar $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Marrëveshje License"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ju lutem shqyrtoni kushtet e licensës përpara çinstalimit të $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Nëse pranoni kushtet e marrëveshjes, klikoni Pajtohem për të vazhduar. Duhet të pranoni marrëveshjen për të çinstaluar $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Nëse pranoni kushtet e marrëveshjes, klikoni kutizën më poshtë. Duhet të pranoni marrëveshjen për të çinstaluar $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Nëse pranoni kushtet e marrëveshjes, përzgjidhni mundësinë e parë më poshtë. Duhet të pranoni marrëveshjen për të çinstaluar $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Shtypni Page Down për të parë pjesën e mbetur të marrëveshjes."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Përzgjidhni Përbërës"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zgjidhni cilat anë të $(^NameDA) doni të instalohen."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Përshkrim"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Zgjidhni Përbërësa"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zgjidhni cilat anë të $(^NameDA) doni të çinstalohen."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Për të parë përshkrimin e një përbërësi vendosni miun përsipër tij."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Për të parë përshkrimin e një përbërësi vendosni miun përsipër tij."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zgjidhni Vend Instalimi"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Zgjidhni dosjen tek e cila të instalohet $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Zgjidhni Vend Çinstalimi"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Zgjidhni dosjen prej së cilës të instalohet $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Po instaloj"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ju lutem prisni ndërkohë që $(^NameDA) instalohet."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalim i Plotësuar"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Rregullimi u plotësua me sukses."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalimi u Ndërpre"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Rregullimi nuk u plotësua me sukses."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Çinstalim"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ju lutem prisni ndërsa $(^NameDA) çinstalohet."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Çinstalim i Plotë"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Çinstalimi u plotësua me sukses."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Çinstalimi u Ndërpre"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Çinstalimi nuk plotësua me sukses."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Po plotësoj Rregullimin e $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) u instalua në kompjuterin tuaj.$\r$\n$\r$\nKlikoni Përfundo për të mbyllur këtë proces."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Që të mund të plotësohet instalimi i $(^NameDA) kompjuteri juaj duhet të riniset. Doni ta rinisni tani?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Po plotësoj çinstalimin e $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) u çinstalua prej kompjuterit tuaj.$\r$\n$\r$\nKlikoni Përfundo për të mbyllur procesin."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Kompjuteri juaj duhet të riniset që të mund të plotësohet çinstalimi i $(^NameDA). Doni ta rinisni tani?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Rinise tani"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Dua ta rinis dorazi më vonë"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Nis $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Shfaq Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Përfundo"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Zgjidhni Dosje Menuje Start"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Zgjidhni një dosje Menuje Start për shkurtprerje $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Përzgjidhni dosjen Menu Start në të cilën do të donit të krijonit shkurtprerjet për programin. Mundeni edhe të jepni një emër për të krijuar një dosje të re."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Mos krijo shkurtprerje"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Çinstalo $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Hiqni $(^NameDA) prej kompjuterit tuaj."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Jeni i sigurtë që doni të lini Rregullimin e $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Jeni i sigurtë që doni të lini Çinstalimin e $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Arabic.nlf b/Contrib/Language files/Arabic.nlf
index c28b462..ebb0e28 100755
--- a/Contrib/Language files/Arabic.nlf
+++ b/Contrib/Language files/Arabic.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1025
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1256
-# RTL - anything else than RTL means LTR
-RTL
-# Translation by asdfuae@msn.com, updated by Rami Kattan
-# ^Branding
-äÙÇã ÇáÊäÕíÈ äáÓæÝÊ %s
-# ^SetupCaption
-ÊäÕíÈ $(^Name)
-# ^UninstallCaption
-ÅÒÇáÉ $(^Name)
-# ^LicenseSubCaption
-ÅÊÝÇÞíÉþ ÇáÊÑÎíÕ :
-# ^ComponentsSubCaption
-ÎíÇÑÇÊ ÇáÊäÕíÈ :
-# ^DirSubCaption
-ãÌáÏ ÇáÊäÕíÈ :
-# ^InstallingSubCaption
-ÊäÕíÈ :
-# ^CompletedSubCaption
-ÅäÊåì :
-# ^UnComponentsSubCaption
-ÎíÇÑÇÊ ÇáÅÒÇáÉ :
-# ^UnDirSubCaption
-ãÌáÏ ÇáÅÒÇáÉ :
-# ^ConfirmSubCaption
-ÊÃßíÏ :
-# ^UninstallingSubCaption
-ÅÒÇáÉ :
-# ^UnCompletedSubCaption
-ÅäÊåì :
-# ^BackBtn
-< Çá&ÓÇÈÞ
-# ^NextBtn
-Çá&ÊÇáí >
-# ^AgreeBtn
-ãæÇÝÞ&
-# ^AcceptBtn
-&ÃæÇÝÞ Úáì ÔÑæØ ÇÊÝÇÞíÉ ÇáÊÑÎíÕ
-# ^DontAcceptBtn
-&áÇ ÃæÇÝÞ Úáì ÔÑæØ ÇÊÝÇÞíÉ ÇáÊÑÎíÕ
-# ^InstallBtn
-&ÊäÕíÈ
-# ^UninstallBtn
-&ÅÒÇáÉ
-# ^CancelBtn
-ÅáÛÇÁ
-# ^CloseBtn
-Å&ÛáÇÞ
-# ^BrowseBtn
-&ÚÑÖ...
-# ^ShowDetailsBtn
-Å&ÙåÇÑ ÇáÊÝÇÕíá
-# ^ClickNext
-ÅÖÛØ Úáì ÇáÊÇáí ááãÊÇÈÚÉ.
-# ^ClickInstall
-ÅÖÛØ Úáì ÊäÕíÈ áÊÔÛíá ÇáÊäÕíÈ.
-# ^ClickUninstall
-ÅÖÛØ Úáì ÅÒÇáÉ áÊÔÛíá ÇáÅÒÇáÉ.
-# ^Name
-ÇáÅÓã
-# ^Completed
-ÅäÊåì
-# ^LicenseText
-ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ ãæÇÝÞ.
-# ^LicenseTextCB
-ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ Úáì ãÑÈÚ ÇáãÄÔÑ ÇáÊÇáí. $_CLICK.
-# ^LicenseTextRB
-ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ÇáÊÇáí. $_CLICK
-# ^UnLicenseText
-ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ ãæÇÝÞ.
-# ^UnLicenseTextCB
-ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÇÖÛØ Úáì ãÑÈÚ ÇáãÄÔÑ ÇáÊÇáí. $_CLICK
-# ^UnLicenseTextRB
-ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ÇáÊÇáí. $_CLICK
-# ^Custom
-ÅÎÊíÇÑí
-# ^ComponentsText
-Úáøã ÇáãßæäÇÊ ÇáãÑÇÏ ÊäÕíÈåÇ æÅÒá ÇáÚáÇãÉ Úä ÇáãßæäÇÊ ÇáÛíÑ ãÑÇÏ ÊäÕíÈåÇ. $_CLICK
-# ^ComponentsSubText1
-ÅÎÊÑ äæÚ ÇáÊäÕíÈ:
-# ^ComponentsSubText2_NoInstTypes
-ÅÎÊÑ ÇáãßæäÇÊ ááÊäÕíÈ:
-# ^ComponentsSubText2
-Ãæ¡ Þã ÈÅÎÊíÇÑ ÇáãßæäÇÊ ÇáÅÎÊíÇÑíÉ ÇáãÑÇÏ ÊäÕíÈåÇ:
-# ^UnComponentsText
-Úáøã ÇáãßæäÇÊ ÇáãÑÇÏ ÅÒÇáÊåÇ æÃÒá ÇáÚáÇãÉ Úä ÇáãßæäÇÊ ÇáÛíÑ ãÑÇÏ ÅÒÇáÊåÇ. $_CLICK
-# ^UnComponentsSubText1
-ÅÎÊÑ äæÚ ÇáÅÒÇáÉ:
-# ^UnComponentsSubText2_NoInstTypes
-ÅÎÊÑ ÇáãßæäÇÊ ááÅÒÇáÉ:
-# ^UnComponentsSubText2
-Ãæ¡ ÅÎÊÑ ÇáãßæäÇÊ ÇáÅÎÊíÇÑíÉ ÇáãÑÇÏ ÅÒÇáÊåÇ:
-# ^DirText
-ÓíÊã ÊäÕíÈ $(^NameDA) Ýí ÇáãÌáÏ ÇáÊÇáí. ááÊäÕíÈ Ýí ãÌáÏ ÂÎÑ¡ ÅÖÛØ ÚÑÖ æÅÎÊÑ ãÌáÏ ÂÎÑ. $_CLICK
-# ^DirSubText
-ãÌáÏ ÇáåÏÝ
-# ^DirBrowseText
-ÅÎÊÑ ÇáãÌáÏ áÊäÕíÈ $(^NameDA) Ýíå:
-# ^UnDirText
-ÓíÊã ÅÒÇáÉ $(^NameDA) ãä ÇáãÌáÏ ÇáÊÇáí. ááÅÒÇáÉ ãä ãÌáÏ ÂÎÑ¡ ÅÖÛØ ÚÑÖ æÃÎÊÑ ãÌáÏ ÂÎÑ. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-ÅÎÊÑ ÇáãÌáÏ áÅÒÇáÉ $(^NameDA) ãäå:
-# ^SpaceAvailable
-"ÇáãÓÇÍÉ ÇáãÊæÝÑÉ: "
-# ^SpaceRequired
-"ÇáãÓÇÍÉ ÇáãØáæÈÉ: "
-# ^UninstallingText
-ÓíÊã ÅÒÇáÉ $(^NameDA) ãä ÇáãÌáÏ ÇáÊÇáí. $_CLICK
-# ^UninstallingSubText
-ÅÒÇáÉ ãä:
-# ^FileError
-ÍÏË Îáá ÃËäÇÁ ÝÊÍ ãáÝ ááßÊÇÈÉ: \r\n\t\"$0\"\r\nÅÖÛØ ÅáÛÇÁ áÅáÛÇÁ ÇáÊäÕíÈ¡\r\nãÍÇæáÉ áÅÚÇÏÉ ãÍÇæáÉ ßÊÇÈÉ ÇáãáÝ¡\r\n ÊÌÇåá áÊÎØí ÇáãáÝ
-# ^FileError_NoIgnore
-ÍÏË Îáá ÃËäÇÁ ÝÊÍ ãáÝ ááßÊÇÈÉ: \r\n\t\"$0\"\r\nÅÖÛØ ãÍÇæáÉ áÅÚÇÏÉ ãÍÇæáÉ ßÊÇÈÉ ÇáãáÝ¡ Ãæ\r\nÅáÛÇÁ áÅáÛÇÁ ÇáÊäÕíÈ
-# ^CantWrite
-"áÇ íÓÊØíÚ ÇáßÊÇÈÉ: "
-# ^CopyFailed
-ÝÔá ÇáäÓÎ
-# ^CopyTo
-"äÓÎ Åáì"
-# ^Registering
-"ÊÓÌíá: "
-# ^Unregistering
-"ÅáÛÇÁ ÊÓÌíá: "
-# ^SymbolNotFound
-"áã íÊãßä ãä ÅíÌÇÏ ÇáÑãÒ :"
-# ^CouldNotLoad
-"áã íÊãßä ãä ÊÍãíá :"
-# ^CreateFolder
-"ÅäÔÇÁ ãÌáÏ"
-# ^CreateShortcut
-"ÅäÔÇÁ ÅÎÊÕÇÑ: "
-# ^CreatedUninstaller
-"ÅäÔÇÁ ãÒíá: "
-# ^Delete
-"ÍÐÝ ãáÝ: "
-# ^DeleteOnReboot
-"ÍÐÝ ÈÚÏ ÅÚÇÏÉ ÇáÊÔÛíá: "
-# ^ErrorCreatingShortcut
-"Îáá ÃËäÇÁ ÅäÔÇÁ ÅÎÊÕÇÑ: "
-# ^ErrorCreating
-"Îáá ÃËäÇÁ ÅäÔÇÁ :"
-# ^ErrorDecompressing
-Îáá ÃËäÇÁ ÝÊÍ ÇáÈíÇäÇÊ ÇáãÖÛæØÉ! ãäÕÈ ÊÇáÝ¿
-# ^ErrorRegistering
-Îáá ÃËäÇÁ ÊÓÌíá DLL
-# ^ExecShell
-"ÊäÝíÐ ExecShell:"
-# ^Exec
-"ÊäÝíÐ: "
-# ^Extract
-"ÅÓÊÎÑÇÌ: "
-# ^ErrorWriting
-"ÅÓÊÎÑÇÌ: Îáá ÃËäÇÁ ÇáßÊÇÈÉ Åáì ãáÝ "
-# ^InvalidOpcode
-ÇáãäÕøÈ ÊÇáÝ: ÔÝÑÉ ÛíÑ ÕÇáÍÉ
-# ^NoOLE
-"áÇ ÊæÌÏ OLE áÜö: "
-# ^OutputFolder
-"ãÌáÏ ÇáÅÎÑÇÌ: "
-# ^RemoveFolder
-"ÅÒÇáÉ ãÌáÏ: "
-# ^RenameOnReboot
-"ÅÚÇÏÉ ÊÓãíÉ ÈÚÏ ÅÚÇÏÉ ÇáÊÔÛíá: "
-# ^Rename
-"ÅÚÇÏÉ ÊÓãíÉ: "
-# ^Skipped
-"ÊÎØì: "
-# ^CopyDetails
-äÓÎ ÇáÊÝÇÕíá Åáì ÇáÐÇßÑÉ
-# ^LogInstall
-ÓÌøá ÚãáíÉ ÇáÊäÕíÈ
-# ^Byte
-ÈÇíÊ
-# ^Kilo
-ßíáæ
-# ^Mega
-ãíÛÇ
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1025
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1256
+# RTL - anything else than RTL means LTR
+RTL
+# Translation by asdfuae@msn.com, updated by Rami Kattan
+# ^Branding
+äÙÇã ÇáÊäÕíÈ äáÓæÝÊ %s
+# ^SetupCaption
+ÊäÕíÈ $(^Name)
+# ^UninstallCaption
+ÅÒÇáÉ $(^Name)
+# ^LicenseSubCaption
+ÅÊÝÇÞíÉþ ÇáÊÑÎíÕ :
+# ^ComponentsSubCaption
+ÎíÇÑÇÊ ÇáÊäÕíÈ :
+# ^DirSubCaption
+ãÌáÏ ÇáÊäÕíÈ :
+# ^InstallingSubCaption
+ÊäÕíÈ :
+# ^CompletedSubCaption
+ÅäÊåì :
+# ^UnComponentsSubCaption
+ÎíÇÑÇÊ ÇáÅÒÇáÉ :
+# ^UnDirSubCaption
+ãÌáÏ ÇáÅÒÇáÉ :
+# ^ConfirmSubCaption
+ÊÃßíÏ :
+# ^UninstallingSubCaption
+ÅÒÇáÉ :
+# ^UnCompletedSubCaption
+ÅäÊåì :
+# ^BackBtn
+< Çá&ÓÇÈÞ
+# ^NextBtn
+Çá&ÊÇáí >
+# ^AgreeBtn
+ãæÇÝÞ&
+# ^AcceptBtn
+&ÃæÇÝÞ Úáì ÔÑæØ ÇÊÝÇÞíÉ ÇáÊÑÎíÕ
+# ^DontAcceptBtn
+&áÇ ÃæÇÝÞ Úáì ÔÑæØ ÇÊÝÇÞíÉ ÇáÊÑÎíÕ
+# ^InstallBtn
+&ÊäÕíÈ
+# ^UninstallBtn
+&ÅÒÇáÉ
+# ^CancelBtn
+ÅáÛÇÁ
+# ^CloseBtn
+Å&ÛáÇÞ
+# ^BrowseBtn
+&ÚÑÖ...
+# ^ShowDetailsBtn
+Å&ÙåÇÑ ÇáÊÝÇÕíá
+# ^ClickNext
+ÅÖÛØ Úáì ÇáÊÇáí ááãÊÇÈÚÉ.
+# ^ClickInstall
+ÅÖÛØ Úáì ÊäÕíÈ áÊÔÛíá ÇáÊäÕíÈ.
+# ^ClickUninstall
+ÅÖÛØ Úáì ÅÒÇáÉ áÊÔÛíá ÇáÅÒÇáÉ.
+# ^Name
+ÇáÅÓã
+# ^Completed
+ÅäÊåì
+# ^LicenseText
+ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ ãæÇÝÞ.
+# ^LicenseTextCB
+ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ Úáì ãÑÈÚ ÇáãÄÔÑ ÇáÊÇáí. $_CLICK.
+# ^LicenseTextRB
+ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ÇáÊÇáí. $_CLICK
+# ^UnLicenseText
+ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ ãæÇÝÞ.
+# ^UnLicenseTextCB
+ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÇÖÛØ Úáì ãÑÈÚ ÇáãÄÔÑ ÇáÊÇáí. $_CLICK
+# ^UnLicenseTextRB
+ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA). ÚäÏ ÇáãæÇÝÞÉ Úáì ÌãíÚ ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ÇáÊÇáí. $_CLICK
+# ^Custom
+ÅÎÊíÇÑí
+# ^ComponentsText
+Úáøã ÇáãßæäÇÊ ÇáãÑÇÏ ÊäÕíÈåÇ æÅÒá ÇáÚáÇãÉ Úä ÇáãßæäÇÊ ÇáÛíÑ ãÑÇÏ ÊäÕíÈåÇ. $_CLICK
+# ^ComponentsSubText1
+ÅÎÊÑ äæÚ ÇáÊäÕíÈ:
+# ^ComponentsSubText2_NoInstTypes
+ÅÎÊÑ ÇáãßæäÇÊ ááÊäÕíÈ:
+# ^ComponentsSubText2
+Ãæ¡ Þã ÈÅÎÊíÇÑ ÇáãßæäÇÊ ÇáÅÎÊíÇÑíÉ ÇáãÑÇÏ ÊäÕíÈåÇ:
+# ^UnComponentsText
+Úáøã ÇáãßæäÇÊ ÇáãÑÇÏ ÅÒÇáÊåÇ æÃÒá ÇáÚáÇãÉ Úä ÇáãßæäÇÊ ÇáÛíÑ ãÑÇÏ ÅÒÇáÊåÇ. $_CLICK
+# ^UnComponentsSubText1
+ÅÎÊÑ äæÚ ÇáÅÒÇáÉ:
+# ^UnComponentsSubText2_NoInstTypes
+ÅÎÊÑ ÇáãßæäÇÊ ááÅÒÇáÉ:
+# ^UnComponentsSubText2
+Ãæ¡ ÅÎÊÑ ÇáãßæäÇÊ ÇáÅÎÊíÇÑíÉ ÇáãÑÇÏ ÅÒÇáÊåÇ:
+# ^DirText
+ÓíÊã ÊäÕíÈ $(^NameDA) Ýí ÇáãÌáÏ ÇáÊÇáí. ááÊäÕíÈ Ýí ãÌáÏ ÂÎÑ¡ ÅÖÛØ ÚÑÖ æÅÎÊÑ ãÌáÏ ÂÎÑ. $_CLICK
+# ^DirSubText
+ãÌáÏ ÇáåÏÝ
+# ^DirBrowseText
+ÅÎÊÑ ÇáãÌáÏ áÊäÕíÈ $(^NameDA) Ýíå:
+# ^UnDirText
+ÓíÊã ÅÒÇáÉ $(^NameDA) ãä ÇáãÌáÏ ÇáÊÇáí. ááÅÒÇáÉ ãä ãÌáÏ ÂÎÑ¡ ÅÖÛØ ÚÑÖ æÃÎÊÑ ãÌáÏ ÂÎÑ. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+ÅÎÊÑ ÇáãÌáÏ áÅÒÇáÉ $(^NameDA) ãäå:
+# ^SpaceAvailable
+"ÇáãÓÇÍÉ ÇáãÊæÝÑÉ: "
+# ^SpaceRequired
+"ÇáãÓÇÍÉ ÇáãØáæÈÉ: "
+# ^UninstallingText
+ÓíÊã ÅÒÇáÉ $(^NameDA) ãä ÇáãÌáÏ ÇáÊÇáí. $_CLICK
+# ^UninstallingSubText
+ÅÒÇáÉ ãä:
+# ^FileError
+ÍÏË Îáá ÃËäÇÁ ÝÊÍ ãáÝ ááßÊÇÈÉ: \r\n\t\"$0\"\r\nÅÖÛØ ÅáÛÇÁ áÅáÛÇÁ ÇáÊäÕíÈ¡\r\nãÍÇæáÉ áÅÚÇÏÉ ãÍÇæáÉ ßÊÇÈÉ ÇáãáÝ¡\r\n ÊÌÇåá áÊÎØí ÇáãáÝ
+# ^FileError_NoIgnore
+ÍÏË Îáá ÃËäÇÁ ÝÊÍ ãáÝ ááßÊÇÈÉ: \r\n\t\"$0\"\r\nÅÖÛØ ãÍÇæáÉ áÅÚÇÏÉ ãÍÇæáÉ ßÊÇÈÉ ÇáãáÝ¡ Ãæ\r\nÅáÛÇÁ áÅáÛÇÁ ÇáÊäÕíÈ
+# ^CantWrite
+"áÇ íÓÊØíÚ ÇáßÊÇÈÉ: "
+# ^CopyFailed
+ÝÔá ÇáäÓÎ
+# ^CopyTo
+"äÓÎ Åáì"
+# ^Registering
+"ÊÓÌíá: "
+# ^Unregistering
+"ÅáÛÇÁ ÊÓÌíá: "
+# ^SymbolNotFound
+"áã íÊãßä ãä ÅíÌÇÏ ÇáÑãÒ :"
+# ^CouldNotLoad
+"áã íÊãßä ãä ÊÍãíá :"
+# ^CreateFolder
+"ÅäÔÇÁ ãÌáÏ"
+# ^CreateShortcut
+"ÅäÔÇÁ ÅÎÊÕÇÑ: "
+# ^CreatedUninstaller
+"ÅäÔÇÁ ãÒíá: "
+# ^Delete
+"ÍÐÝ ãáÝ: "
+# ^DeleteOnReboot
+"ÍÐÝ ÈÚÏ ÅÚÇÏÉ ÇáÊÔÛíá: "
+# ^ErrorCreatingShortcut
+"Îáá ÃËäÇÁ ÅäÔÇÁ ÅÎÊÕÇÑ: "
+# ^ErrorCreating
+"Îáá ÃËäÇÁ ÅäÔÇÁ :"
+# ^ErrorDecompressing
+Îáá ÃËäÇÁ ÝÊÍ ÇáÈíÇäÇÊ ÇáãÖÛæØÉ! ãäÕÈ ÊÇáÝ¿
+# ^ErrorRegistering
+Îáá ÃËäÇÁ ÊÓÌíá DLL
+# ^ExecShell
+"ÊäÝíÐ ExecShell:"
+# ^Exec
+"ÊäÝíÐ: "
+# ^Extract
+"ÅÓÊÎÑÇÌ: "
+# ^ErrorWriting
+"ÅÓÊÎÑÇÌ: Îáá ÃËäÇÁ ÇáßÊÇÈÉ Åáì ãáÝ "
+# ^InvalidOpcode
+ÇáãäÕøÈ ÊÇáÝ: ÔÝÑÉ ÛíÑ ÕÇáÍÉ
+# ^NoOLE
+"áÇ ÊæÌÏ OLE áÜö: "
+# ^OutputFolder
+"ãÌáÏ ÇáÅÎÑÇÌ: "
+# ^RemoveFolder
+"ÅÒÇáÉ ãÌáÏ: "
+# ^RenameOnReboot
+"ÅÚÇÏÉ ÊÓãíÉ ÈÚÏ ÅÚÇÏÉ ÇáÊÔÛíá: "
+# ^Rename
+"ÅÚÇÏÉ ÊÓãíÉ: "
+# ^Skipped
+"ÊÎØì: "
+# ^CopyDetails
+äÓÎ ÇáÊÝÇÕíá Åáì ÇáÐÇßÑÉ
+# ^LogInstall
+ÓÌøá ÚãáíÉ ÇáÊäÕíÈ
+# ^Byte
+ÈÇíÊ
+# ^Kilo
+ßíáæ
+# ^Mega
+ãíÛÇ
+# ^Giga
ÌíÛÇ \ No newline at end of file
diff --git a/Contrib/Language files/Arabic.nsh b/Contrib/Language files/Arabic.nsh
index d306e6c..afef641 100755
--- a/Contrib/Language files/Arabic.nsh
+++ b/Contrib/Language files/Arabic.nsh
@@ -1,122 +1,122 @@
-;Language: Arabic (1025)
-;Translation by asdfuae@msn.com
-;updated by Rami Kattan
-
-!insertmacro LANGFILE "Arabic" "Arabic"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "ãÑÍÈÇ Èß Ýí ãÑÔÏ ÅÚÏÇÏ $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "ÓíÓÇÚÏß åÐÇ ÇáãÑÔÏ Ýí ÊäÕíÈ $(^NameDA).$\r$\n$\r$\nãä ÇáãÝÖá ÅÛáÇÞ ÌãíÚ ÇáÈÑÇãÌ ÞÈá ÇáÊäÕíÈ. ÓíÓÇÚÏ åÐÇ Ýí ÊÌÏíÏ ãáÝÇÊ ÇáäÙÇã Ïæä ÇáÍÇÌÉ áÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "ãÑÍÈÇ Èß Ýí ãÑÔÏ ÅÒÇáÉ $(^NameDA) "
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "åÐÇ ÇáãÑÔÏ ÓíÏáøß ÃËäÇÁ ÅÒÇáÉ $(^NameDA).$\r$\n$\r$\n ÞÈá ÇáÈÏÁ ÈÇáÅÒÇáÉ¡ íÑÌì ÇáÊÃßÏ ãä Ãä $(^NameDA) ÛíÑ ÔÛøÇá.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "ÅÊÝÇÞíÉþ ÇáÊÑÎíÕ"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉþ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉþ¡ ÅÖÛØ ÃæÇÝÞ ááãÊÇÈÚÉ. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉþ áÊäÕíÈ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉþ¡ Úáøã ãÑÈÚ ÇáÚáÇãÉ ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉþ áÊäÕíÈ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ãä ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÊäÕíÈ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ÅÊÝÇÞíÉ ÇáÊÑÎíÕ"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ÇáÑÌÇÁ ãÑÇÌÚÉ ÔÑæØ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ Úáì ãæÇÝÞ. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÅÒÇáÉ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ Úáøã ÇáãÑÈÚ ÇáÚáÇãÉ ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÅÒÇáÉ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ãä ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÅÒÇáÉ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ÅÖÚØ ãÝÊÇÍ ÕÝÍÉ ááÃÓÝá áÑÄíÉ ÈÇÞí ÇáÅÊÝÇÞíÉ"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ÅÎÊÑ ÇáãßæäÇÊ"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "ÅÎÊÑ ãíÒÇÊ $(^NameDA) ÇáãÑÇÏ ÊäÕíÈåÇ."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÇáæÕÝ"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ÅÎÊÑ ÇáãßæäÇÊ"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "ÅÎÊÑ ãíÒÇÊ $(^NameDA) ÇáãÑÇÏ ÅÒÇáÊåÇ."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÃÔÑ ÈÇáÝÃÑÉ ÝæÞ ÃÍÏ ÇáãßæäÇÊ áÑÄíÉ ÇáæÕÝ"
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÃÔÑ ÈÇáÝÃÑÉ ÝæÞ ÃÍÏ ÇáãßæäÇÊ áÑÄíÉ ÇáæÕÝ"
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ÅÎÊÑ ãæÞÚ ÇáÊäÕíÈ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "ÅÎÊÑ ÇáãÌáÏ ÇáãÑÇÏ ÊäÕíÈ $(^NameDA) Ýíå."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "ÅÎÊÑ ãæÞÚ ÇáãÒíá"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "ÅÎÊÑ ÇáãÌáÏ ÇáÐí ÓíÒÇá ãäå $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ÊäÕíÈ"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "ÇáÑÌÇÁ ÇáÅäÊÙÇÑ ÃËäÇÁ ÊäÕíÈ $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "ÅäÊåì ÇáÊäÕíÈ"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ÅäÊåÊ ÚãáíÉ ÇáÊäÕíÈ ÈäÌÇÍ."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "ÅáÛÇÁ ÇáÊäÕíÈ"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "áã íäÊåí ÇáÊäÕíÈ ÈäÌÇÍ."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÅÒÇáÉ"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "ÇáÑÌÇÁ ÇáÅäÊÙÇÑ ÃËäÇÁ ÅÒÇáÉ $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ÅäÊåì"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ÅäÊåÊ ÚãáíÉ ÇáÅÒÇáÉ ÈäÌÇÍ."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ÅáÛÇÁ ÇáÅÒÇáÉ"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "áã ÊäÊåí ÇáÅÒÇáÉ ÈäÌÇÍ."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÅäåÇÁ ãÑÔÏ ÅÚÏÇÏ $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "áÞÏ Êã ÊäÕíÈ $(^NameDA) Úáì ÇáÌåÇÒ$\r$\n$\r$\nÅÖÛØ ÅäåÇÁ áÅÛáÇÞ ãÑÔÏ ÇáÅÚÏÇÏ."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "íÌÈ ÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ áÅäåÇÁ ÊäÕíÈ $(^NameDA). åá ÊÑíÏ ÅÚÇÏÉ ÇáÊÔÛíá ÇáÂä¿"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÅäåÇÁ ãÑÔÏ ÅÒÇáÉ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "áÞÏ Êã ÅÒÇáÉ $(^NameDA) ãä ÇáÌåÇÒ.$\r$\n$\r$\n ÅÖÛØ ÅäåÇÁ áÅÛáÇÞ ÇáãÑÔÏ."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "íÌÈ ÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ áÅäåÇÁ ÅÒÇáÉ $(^NameDA). åá ÊÑíÏ ÅÚÇÏÉ ÇáÊÔÛíá ÇáÂä¿"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÃÚÏ ÇáÊÔÛíá ÇáÂä"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "ÃÑÛÈ Ýí ÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ Ýí æÞÊ áÇÍÞ"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&ÔÛá $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "ÇÚÑÖ& ÃÞÑÃäí"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&ÅäåÇÁ"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ÅÎÊÑ ãÌáÏ ÞÇÆãÉ ÇÈÏÃ"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "ÅÎÊÑ ãÌáÏ ÞÇÆãÉ ÇÈÏà áÅÎÊÕÇÑÇÊ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "ÅÎÊÑ ÇáãÌáÏ Ýí ÞÇÆãÉ ÇÈÏà ÇáÐí ÓÊäÔà Ýíå ÅÎÊÕÇÑÇÊ ÇáÈÑäÇãÌ. íãßä ÃíÖÇ ßÊÇÈÉ ÅÓã áÅäÔÇÁ ãÌáÏ ÌÏíÏ."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "áÇ ÊäÔÆ ÅÎÊÕÇÑÇÊ"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "ÅÒÇáÉ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "ÅÒÇáÉ $(^NameDA) ãä ÇáÌåÇÒ."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "åá ÃäÊ ãÊÃßÏ ãä ÅÛáÇÞ ãäÕøÈ $(^Name)¿"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "åá ÃäÊ ãÊÃßÏ ãä Ãäß ÇáÎÑæÌ ãä ãÒíá $(^Name)¿"
-!endif
+;Language: Arabic (1025)
+;Translation by asdfuae@msn.com
+;updated by Rami Kattan
+
+!insertmacro LANGFILE "Arabic" "Arabic"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "ãÑÍÈÇ Èß Ýí ãÑÔÏ ÅÚÏÇÏ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "ÓíÓÇÚÏß åÐÇ ÇáãÑÔÏ Ýí ÊäÕíÈ $(^NameDA).$\r$\n$\r$\nãä ÇáãÝÖá ÅÛáÇÞ ÌãíÚ ÇáÈÑÇãÌ ÞÈá ÇáÊäÕíÈ. ÓíÓÇÚÏ åÐÇ Ýí ÊÌÏíÏ ãáÝÇÊ ÇáäÙÇã Ïæä ÇáÍÇÌÉ áÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "ãÑÍÈÇ Èß Ýí ãÑÔÏ ÅÒÇáÉ $(^NameDA) "
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "åÐÇ ÇáãÑÔÏ ÓíÏáøß ÃËäÇÁ ÅÒÇáÉ $(^NameDA).$\r$\n$\r$\n ÞÈá ÇáÈÏÁ ÈÇáÅÒÇáÉ¡ íÑÌì ÇáÊÃßÏ ãä Ãä $(^NameDA) ÛíÑ ÔÛøÇá.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "ÅÊÝÇÞíÉþ ÇáÊÑÎíÕ"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ÇáÑÌÇÁ ãÑÇÌÚÉ ÅÊÝÇÞíÉþ ÇáÊÑÎíÕ ÞÈá ÊäÕíÈ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉþ¡ ÅÖÛØ ÃæÇÝÞ ááãÊÇÈÚÉ. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉþ áÊäÕíÈ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉþ¡ Úáøã ãÑÈÚ ÇáÚáÇãÉ ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉþ áÊäÕíÈ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ãä ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÊäÕíÈ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ÅÊÝÇÞíÉ ÇáÊÑÎíÕ"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ÇáÑÌÇÁ ãÑÇÌÚÉ ÔÑæØ ÇáÊÑÎíÕ ÞÈá ÅÒÇáÉ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÖÛØ Úáì ãæÇÝÞ. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÅÒÇáÉ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ Úáøã ÇáãÑÈÚ ÇáÚáÇãÉ ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÅÒÇáÉ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÚäÏ ÇáãæÇÝÞÉ Úáì ÔÑæØ ÇáÅÊÝÇÞíÉ¡ ÅÎÊÑ ÇáÎíÇÑ ÇáÃæá ãä ÇáÊÇáí. íÌÈ ÇáãæÇÝÞÉ Úáì ÇáÅÊÝÇÞíÉ áÅÒÇáÉ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ÅÖÚØ ãÝÊÇÍ ÕÝÍÉ ááÃÓÝá áÑÄíÉ ÈÇÞí ÇáÅÊÝÇÞíÉ"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ÅÎÊÑ ÇáãßæäÇÊ"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "ÅÎÊÑ ãíÒÇÊ $(^NameDA) ÇáãÑÇÏ ÊäÕíÈåÇ."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÇáæÕÝ"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ÅÎÊÑ ÇáãßæäÇÊ"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "ÅÎÊÑ ãíÒÇÊ $(^NameDA) ÇáãÑÇÏ ÅÒÇáÊåÇ."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÃÔÑ ÈÇáÝÃÑÉ ÝæÞ ÃÍÏ ÇáãßæäÇÊ áÑÄíÉ ÇáæÕÝ"
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÃÔÑ ÈÇáÝÃÑÉ ÝæÞ ÃÍÏ ÇáãßæäÇÊ áÑÄíÉ ÇáæÕÝ"
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ÅÎÊÑ ãæÞÚ ÇáÊäÕíÈ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "ÅÎÊÑ ÇáãÌáÏ ÇáãÑÇÏ ÊäÕíÈ $(^NameDA) Ýíå."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "ÅÎÊÑ ãæÞÚ ÇáãÒíá"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "ÅÎÊÑ ÇáãÌáÏ ÇáÐí ÓíÒÇá ãäå $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ÊäÕíÈ"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "ÇáÑÌÇÁ ÇáÅäÊÙÇÑ ÃËäÇÁ ÊäÕíÈ $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "ÅäÊåì ÇáÊäÕíÈ"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ÅäÊåÊ ÚãáíÉ ÇáÊäÕíÈ ÈäÌÇÍ."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "ÅáÛÇÁ ÇáÊäÕíÈ"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "áã íäÊåí ÇáÊäÕíÈ ÈäÌÇÍ."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÅÒÇáÉ"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "ÇáÑÌÇÁ ÇáÅäÊÙÇÑ ÃËäÇÁ ÅÒÇáÉ $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ÅäÊåì"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ÅäÊåÊ ÚãáíÉ ÇáÅÒÇáÉ ÈäÌÇÍ."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ÅáÛÇÁ ÇáÅÒÇáÉ"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "áã ÊäÊåí ÇáÅÒÇáÉ ÈäÌÇÍ."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÅäåÇÁ ãÑÔÏ ÅÚÏÇÏ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "áÞÏ Êã ÊäÕíÈ $(^NameDA) Úáì ÇáÌåÇÒ$\r$\n$\r$\nÅÖÛØ ÅäåÇÁ áÅÛáÇÞ ãÑÔÏ ÇáÅÚÏÇÏ."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "íÌÈ ÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ áÅäåÇÁ ÊäÕíÈ $(^NameDA). åá ÊÑíÏ ÅÚÇÏÉ ÇáÊÔÛíá ÇáÂä¿"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÅäåÇÁ ãÑÔÏ ÅÒÇáÉ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "áÞÏ Êã ÅÒÇáÉ $(^NameDA) ãä ÇáÌåÇÒ.$\r$\n$\r$\n ÅÖÛØ ÅäåÇÁ áÅÛáÇÞ ÇáãÑÔÏ."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "íÌÈ ÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ áÅäåÇÁ ÅÒÇáÉ $(^NameDA). åá ÊÑíÏ ÅÚÇÏÉ ÇáÊÔÛíá ÇáÂä¿"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÃÚÏ ÇáÊÔÛíá ÇáÂä"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "ÃÑÛÈ Ýí ÅÚÇÏÉ ÊÔÛíá ÇáÌåÇÒ Ýí æÞÊ áÇÍÞ"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&ÔÛá $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "ÇÚÑÖ& ÃÞÑÃäí"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&ÅäåÇÁ"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ÅÎÊÑ ãÌáÏ ÞÇÆãÉ ÇÈÏÃ"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "ÅÎÊÑ ãÌáÏ ÞÇÆãÉ ÇÈÏà áÅÎÊÕÇÑÇÊ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "ÅÎÊÑ ÇáãÌáÏ Ýí ÞÇÆãÉ ÇÈÏà ÇáÐí ÓÊäÔà Ýíå ÅÎÊÕÇÑÇÊ ÇáÈÑäÇãÌ. íãßä ÃíÖÇ ßÊÇÈÉ ÅÓã áÅäÔÇÁ ãÌáÏ ÌÏíÏ."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "áÇ ÊäÔÆ ÅÎÊÕÇÑÇÊ"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "ÅÒÇáÉ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "ÅÒÇáÉ $(^NameDA) ãä ÇáÌåÇÒ."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "åá ÃäÊ ãÊÃßÏ ãä ÅÛáÇÞ ãäÕøÈ $(^Name)¿"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "åá ÃäÊ ãÊÃßÏ ãä Ãäß ÇáÎÑæÌ ãä ãÒíá $(^Name)¿"
+!endif
diff --git a/Contrib/Language files/Basque.nlf b/Contrib/Language files/Basque.nlf
index a58633b..d4230c5 100755
--- a/Contrib/Language files/Basque.nlf
+++ b/Contrib/Language files/Basque.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1069
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Iñaki San Vicente
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) -ren Instalazioa
-# ^UninstallCaption
-$(^Name) -ren Ezabaketa
-# ^LicenseSubCaption
-: Lizentzia hitzarmen agiria
-# ^ComponentsSubCaption
-: Instalazio aukerak
-# ^DirSubCaption
-: Instalazio karpeta
-# ^InstallingSubCaption
-: Instalatzen
-# ^CompletedSubCaption
-: Instalazioa burututa
-# ^UnComponentsSubCaption
-: Ezabaketa aukerak
-# ^UnDirSubCaption
-: Ezabaketa direktorioa
-# ^ConfirmSubCaption
-: Berretsi ezabaketa
-# ^UninstallingSubCaption
-: Ezabatzen
-# ^UnCompletedSubCaption
-: Ezabaketa burututa
-# ^BackBtn
-< &Atzera
-# ^NextBtn
-&Aurrera >
-# ^AgreeBtn
-Onartu
-# ^AcceptBtn
-Lizentzia hitzarmenaren baldintzak onartzen ditut.
-# ^DontAcceptBtn
-Ez ditut lizentzia hitzarmenaren baldintzak onartzen.
-# ^InstallBtn
-&Instalatu
-# ^UninstallBtn
-&Ezabatu
-# ^CancelBtn
-Ezeztatu
-# ^CloseBtn
-&Itxi
-# ^BrowseBtn
-&Arakatu...
-# ^ShowDetailsBtn
-Ikusi &zehaztasunak
-# ^ClickNext
-Sakatu Aurrera jarraitzeko.
-# ^ClickInstall
-Sakatu Instalatu instalazioarekin hasteko.
-# ^ClickUninstall
-Sakatu Ezabatu ezabaketarekin hasteko.
-# ^Name
-Izena
-# ^Completed
-Osatuta
-# ^LicenseText
-Mesedez, aztertu lizentzia hitzarmena $(^NameDA) instalatu aurretik. Baldintza guztiak onartzen badituzu, sakatu Onartu.
-# ^LicenseTextCB
-Mesedez, aztertu lizentzia hitzarmena $(^NameDA) instalatu aurretik. Baldintza guztiak onartzen badituzu, nabarmendu azpiko laukitxoa. $_CLICK
-# ^LicenseTextRB
-Mesedez, aztertu lizentzia hitzarmena $(^NameDA) instalatu aurretik. Baldintza guztiak onartzen badituzu, hautatu azpian lehen aukera. $_CLICK
-# ^UnLicenseText
-Mesedez, aztertu lizentzia hitzarmena $(^NameDA) ezabatu aurretik. Baldintza guztiak onartzen badituzu, sakatu Onartu.
-# ^UnLicenseTextCB
-Mesedez, aztertu lizentzia hitzarmena $(^NameDA) ezabatu aurretik. Baldintza guztiak onartzen badituzu, nabarmendu azpiko laukitxoa. $_CLICK.
-# ^UnLicenseTextRB
-Mesedez, aztertu lizentzia hitzarmena $(^NameDA) ezabatu aurretik. Baldintza guztiak onartzen badituzu, hautatu azpian lehen aukera. $_CLICK
-# ^Custom
-Norberaren nahien arabera
-# ^ComponentsText
-Nabarmendu instalatu nahi diren osagaiak, eta utzi zuri instalatu nahi ez direnak. $_CLICK
-# ^ComponentsSubText1
-Hautatu instalazio mota:
-# ^ComponentsSubText2_NoInstTypes
-Hautatu instalatu beharreko osagaiak:
-# ^ComponentsSubText2
-Edo hautatu instalatu beharreko aukerazko osagaiak:
-# ^UnComponentsText
-Nabarmendu ezabatu nahi diren osagaiak, eta utzi zuri ezabatu nahi ez direnak. $_CLICK
-# ^UnComponentsSubText1
-Hautatu ezabaketa mota:
-# ^UnComponentsSubText2_NoInstTypes
-Hautatu ezabatu beharreko osagaiak:
-# ^UnComponentsSubText2
-Edo hautatu ezabatu beharreko aukerazko osagaiak:
-# ^DirText
-Instalazio programak $(^NameDA) honako karpetan instalatuko du. Beste karpeta batean instalatzeko, sakatu Arakatu eta aukeratu beste bat. $_CLICK
-# ^DirSubText
-Helburu karpeta
-# ^DirBrowseText
-Aukeratu $(^NameDA) instalatuko den karpeta:
-# ^UnDirText
-Instalazio programak $(^NameDA) honako karpetatik ezabatuko du. Beste karpeta batetik ezabatzeko, sakatu Arakatu eta aukeratu beste bat. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Aukeratu $(^NameDA) zein karpetatik ezabatuko den:
-# ^SpaceAvailable
-Leku erabilgarria:
-# ^SpaceRequired
-Behar den lekua:
-# ^UninstallingText
-$(^NameDA) ondorengo karpetan instalatuko da. $_CLICK
-# ^UninstallingSubTex
-Ezabatzen honako karpetatik:
-# ^FileError
-Hutsegitea idazteko fitxategia irekitzean: \r\n\t"$0"\r\nSakatu Irten instalazioa ,\r\nsaiatu berriz fitxategi hau berriz idazten saiatzeko, u\r\njarraitu fitxategi hau alde batera utzita aurrera egiteko
-# ^FileError_NoIgnore
-Hutsegitea idazteko fitxategia irekitzean: \r\n\t"$0"\r\nsaiatu berriz fitxategi hau berriz idazten saiatzeko ,\r\nSakatu Irten instalazioa
-# ^CantWrite
-"Ezin izan da idatzi: "
-# ^CopyFailed
-Kopiatzeak hutsegin du
-# ^CopyTo
-"Kopiatu hona "
-# ^Registering
-"Erregistratzen: "
-# ^Unregistering
-"Erregistroa ezabatzen: "
-# ^SymbolNotFound
-"Ikurra ezin izan da aurkitu: "
-# ^CouldNotLoad
-"Ezin izan da kargatu: "
-# ^CreateFolder
-"Sortu karpeta: "
-# ^CreateShortcut
-"Sortu lasterbidea: "
-# ^CreatedUninstaller
-"Sortu ezabatzailea: "
-# ^Delete
-"Ezabatu fitxategia: "
-# ^DeleteOnReboot
-"Ezabatu berrabiarazitakoan: "
-# ^ErrorCreatingShortcut
-"Hutsegitea lasterbidea sortzerakoan: "
-# ^ErrorCreating
-"Hutsegitea sortzerakoan: "
-# ^ErrorDecompressing
-¡Hutsegitea datuak deskomprimatzean! Instalatzailea okerra?
-# ^ErrorRegistering
-Hutsegitea DLL erregistratzerakoan
-# ^ExecShell
-"Exekutatu agindua: "
-# ^Exec
-"Exekutatu: "
-# ^Extract
-"Kanporatu: "
-# ^ErrorWriting
-"Kanporaketa: hutsegitea fitxategira idazterakoan "
-# ^InvalidOpcode
-Instalatzailea okerra: ekintza kodea ez da baliozkoa
-# ^NoOLE
-"OLE-rik ez honentzako: "
-# ^OutputFolder
-"Irteera karpeta: "
-# ^RemoveFolder
-"Ezabatu karpeta: "
-# ^RenameOnReboot
-"Berrizendatu berrabiarazitakoan: "
-# ^Rename
-"Berrizendatu: "
-# ^Skipped
-"Alde batera utzitakoa: "
-# ^CopyDetails
-Kopiatu xehetasunak arbelera
-# ^LogInstall
-Instalazio prozesuaren erregistroa gorde
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1069
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Iñaki San Vicente
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) -ren Instalazioa
+# ^UninstallCaption
+$(^Name) -ren Ezabaketa
+# ^LicenseSubCaption
+: Lizentzia hitzarmen agiria
+# ^ComponentsSubCaption
+: Instalazio aukerak
+# ^DirSubCaption
+: Instalazio karpeta
+# ^InstallingSubCaption
+: Instalatzen
+# ^CompletedSubCaption
+: Instalazioa burututa
+# ^UnComponentsSubCaption
+: Ezabaketa aukerak
+# ^UnDirSubCaption
+: Ezabaketa direktorioa
+# ^ConfirmSubCaption
+: Berretsi ezabaketa
+# ^UninstallingSubCaption
+: Ezabatzen
+# ^UnCompletedSubCaption
+: Ezabaketa burututa
+# ^BackBtn
+< &Atzera
+# ^NextBtn
+&Aurrera >
+# ^AgreeBtn
+Onartu
+# ^AcceptBtn
+Lizentzia hitzarmenaren baldintzak onartzen ditut.
+# ^DontAcceptBtn
+Ez ditut lizentzia hitzarmenaren baldintzak onartzen.
+# ^InstallBtn
+&Instalatu
+# ^UninstallBtn
+&Ezabatu
+# ^CancelBtn
+Ezeztatu
+# ^CloseBtn
+&Itxi
+# ^BrowseBtn
+&Arakatu...
+# ^ShowDetailsBtn
+Ikusi &zehaztasunak
+# ^ClickNext
+Sakatu Aurrera jarraitzeko.
+# ^ClickInstall
+Sakatu Instalatu instalazioarekin hasteko.
+# ^ClickUninstall
+Sakatu Ezabatu ezabaketarekin hasteko.
+# ^Name
+Izena
+# ^Completed
+Osatuta
+# ^LicenseText
+Mesedez, aztertu lizentzia hitzarmena $(^NameDA) instalatu aurretik. Baldintza guztiak onartzen badituzu, sakatu Onartu.
+# ^LicenseTextCB
+Mesedez, aztertu lizentzia hitzarmena $(^NameDA) instalatu aurretik. Baldintza guztiak onartzen badituzu, nabarmendu azpiko laukitxoa. $_CLICK
+# ^LicenseTextRB
+Mesedez, aztertu lizentzia hitzarmena $(^NameDA) instalatu aurretik. Baldintza guztiak onartzen badituzu, hautatu azpian lehen aukera. $_CLICK
+# ^UnLicenseText
+Mesedez, aztertu lizentzia hitzarmena $(^NameDA) ezabatu aurretik. Baldintza guztiak onartzen badituzu, sakatu Onartu.
+# ^UnLicenseTextCB
+Mesedez, aztertu lizentzia hitzarmena $(^NameDA) ezabatu aurretik. Baldintza guztiak onartzen badituzu, nabarmendu azpiko laukitxoa. $_CLICK.
+# ^UnLicenseTextRB
+Mesedez, aztertu lizentzia hitzarmena $(^NameDA) ezabatu aurretik. Baldintza guztiak onartzen badituzu, hautatu azpian lehen aukera. $_CLICK
+# ^Custom
+Norberaren nahien arabera
+# ^ComponentsText
+Nabarmendu instalatu nahi diren osagaiak, eta utzi zuri instalatu nahi ez direnak. $_CLICK
+# ^ComponentsSubText1
+Hautatu instalazio mota:
+# ^ComponentsSubText2_NoInstTypes
+Hautatu instalatu beharreko osagaiak:
+# ^ComponentsSubText2
+Edo hautatu instalatu beharreko aukerazko osagaiak:
+# ^UnComponentsText
+Nabarmendu ezabatu nahi diren osagaiak, eta utzi zuri ezabatu nahi ez direnak. $_CLICK
+# ^UnComponentsSubText1
+Hautatu ezabaketa mota:
+# ^UnComponentsSubText2_NoInstTypes
+Hautatu ezabatu beharreko osagaiak:
+# ^UnComponentsSubText2
+Edo hautatu ezabatu beharreko aukerazko osagaiak:
+# ^DirText
+Instalazio programak $(^NameDA) honako karpetan instalatuko du. Beste karpeta batean instalatzeko, sakatu Arakatu eta aukeratu beste bat. $_CLICK
+# ^DirSubText
+Helburu karpeta
+# ^DirBrowseText
+Aukeratu $(^NameDA) instalatuko den karpeta:
+# ^UnDirText
+Instalazio programak $(^NameDA) honako karpetatik ezabatuko du. Beste karpeta batetik ezabatzeko, sakatu Arakatu eta aukeratu beste bat. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Aukeratu $(^NameDA) zein karpetatik ezabatuko den:
+# ^SpaceAvailable
+Leku erabilgarria:
+# ^SpaceRequired
+Behar den lekua:
+# ^UninstallingText
+$(^NameDA) ondorengo karpetan instalatuko da. $_CLICK
+# ^UninstallingSubTex
+Ezabatzen honako karpetatik:
+# ^FileError
+Hutsegitea idazteko fitxategia irekitzean: \r\n\t"$0"\r\nSakatu Irten instalazioa ,\r\nsaiatu berriz fitxategi hau berriz idazten saiatzeko, u\r\njarraitu fitxategi hau alde batera utzita aurrera egiteko
+# ^FileError_NoIgnore
+Hutsegitea idazteko fitxategia irekitzean: \r\n\t"$0"\r\nsaiatu berriz fitxategi hau berriz idazten saiatzeko ,\r\nSakatu Irten instalazioa
+# ^CantWrite
+"Ezin izan da idatzi: "
+# ^CopyFailed
+Kopiatzeak hutsegin du
+# ^CopyTo
+"Kopiatu hona "
+# ^Registering
+"Erregistratzen: "
+# ^Unregistering
+"Erregistroa ezabatzen: "
+# ^SymbolNotFound
+"Ikurra ezin izan da aurkitu: "
+# ^CouldNotLoad
+"Ezin izan da kargatu: "
+# ^CreateFolder
+"Sortu karpeta: "
+# ^CreateShortcut
+"Sortu lasterbidea: "
+# ^CreatedUninstaller
+"Sortu ezabatzailea: "
+# ^Delete
+"Ezabatu fitxategia: "
+# ^DeleteOnReboot
+"Ezabatu berrabiarazitakoan: "
+# ^ErrorCreatingShortcut
+"Hutsegitea lasterbidea sortzerakoan: "
+# ^ErrorCreating
+"Hutsegitea sortzerakoan: "
+# ^ErrorDecompressing
+¡Hutsegitea datuak deskomprimatzean! Instalatzailea okerra?
+# ^ErrorRegistering
+Hutsegitea DLL erregistratzerakoan
+# ^ExecShell
+"Exekutatu agindua: "
+# ^Exec
+"Exekutatu: "
+# ^Extract
+"Kanporatu: "
+# ^ErrorWriting
+"Kanporaketa: hutsegitea fitxategira idazterakoan "
+# ^InvalidOpcode
+Instalatzailea okerra: ekintza kodea ez da baliozkoa
+# ^NoOLE
+"OLE-rik ez honentzako: "
+# ^OutputFolder
+"Irteera karpeta: "
+# ^RemoveFolder
+"Ezabatu karpeta: "
+# ^RenameOnReboot
+"Berrizendatu berrabiarazitakoan: "
+# ^Rename
+"Berrizendatu: "
+# ^Skipped
+"Alde batera utzitakoa: "
+# ^CopyDetails
+Kopiatu xehetasunak arbelera
+# ^LogInstall
+Instalazio prozesuaren erregistroa gorde
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Basque.nsh b/Contrib/Language files/Basque.nsh
index 78bd45d..ebc9ef4 100755
--- a/Contrib/Language files/Basque.nsh
+++ b/Contrib/Language files/Basque.nsh
@@ -1,121 +1,121 @@
-;Language: Basque (1069)
-;By Iñaki San Vicente
-
-!insertmacro LANGFILE "Basque" "Euskera"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Ongi etorri $(^NameDA) -ren instalazio programara"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Programa honek $(^NameDA) zure ordenagailuan instalatuko du.$\r$\n$\r$\nAholkatzen da instalazioarekin hasi aurretik beste aplikazio guztiak ixtea. Honek sistemarekin erlazionatuta dauden fitxategien eguneratzea ahalbidetuko du, ordenagailua berrabiarazi beharrik izan gabe.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Ongi etorri $(^NameDA) -ren ezabaketa programara"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Laguntzaile honek $(^NameDA)-ren ezabaketa prozesuan zehar gidatuko zaitu.$\r$\n$\r$\nEzabaketa hasi aurretik, ziurtatu $(^NameDA) martxan ez dagoela .$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lizentzia hitzarmena"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Mesedez aztertu lizentziaren baldintzak $(^NameDA) instalatu aurretik."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Baldintzak onartzen badituzu, sakatu Onartu aurrera egiteko. Hitzarmena onartzea ezinbestekoa da $(^NameDA) instalatzeko."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Baldintzak onartzen badituzu, nabarmendu azpiko laukitxoa. Hitzarmena onartzea ezinbestekoa da $(^NameDA) instalatzeko. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Baldintzak onartzen badituzu, hautatu azpian lehen aukera. Hitzarmena onartzea ezinbestekoa da $(^NameDA) instalatzeko. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lizentzia hitzarmena"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Mesedez aztertu lizentziaren baldintzak $(^NameDA) ezabatu aurretik."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Baldintzak onartzen badituzu, sakatu Onartu aurrera egiteko. Hitzarmena onartzea ezinbestekoa da $(^NameDA) ezabatzeko."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Baldintzak onartzen badituzu, nabarmendu azpiko laukitxoa. Hitzarmena onartzea ezinbestekoa da $(^NameDA) ezabatzeko. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Baldintzak onartzen badituzu, hautatu azpian lehen aukera. Hitzarmena onartzea ezinbestekoa da $(^NameDA) ezabatzeko. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Sakatu Av Pág hitzarmenaren gainontzeko atalak ikusteko."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Osagaien hautatzea"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Hautatu $(^NameDA)-ren zein ezaugarri instalatu nahi duzun."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Azalpena"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Osagaien hautatzea"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Hautatu $(^NameDA)-ren zein ezaugarri ezabatu nahi duzun."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Jarri sagua osagai baten gainean dagokion azalpena ikusteko."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Jarri sagua osagai baten gainean dagokion azalpena ikusteko."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Hautatu instalazioaren lekua"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Aukeratu $(^NameDA) instalatzeko karpeta."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Aukeratu ezabatuko den karpeta"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Aukeratu $(^NameDA) zein karpetatik ezabatuko den."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalatzen"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Mesedez itxoin $(^NameDA) instalatzen den bitartean."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalazioa burututa"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalazioa zuzen burutu da."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalazioa ezeztatua"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalazioa ez da zuzen burutu."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Ezabatzen"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Mesedez itxoin $(^NameDA) ezabatzen den bitartean."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ezabatzea burututa"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Ezabatzea zuzen burutu da."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ezabatzea ezeztatuta"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Ezabatzea ez da zuzen burutu."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA)-ren instalazio laguntzailea osatzen"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) zure sisteman instalatu da.$\r$\n$\r$\nSakatu Amaitu laguntzaile hau ixteko."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Zure sistema berrabiarazi behar duzu $(^NameDA)-ren instalazioa osatzeko. Orain Berrabiarazi nahi duzu?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA)-ren ezabaketa laguntzailea osatzen"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) zure sistematik ezabatu da.$\r$\n$\r$\nSakatu Amaitu laguntzaile hau ixteko."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Zure ordenagailuak berrabiarazia izan behar du $(^NameDA)-ren ezabaketa osatzeko. Orain Berrabiarazi nahi duzu?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Berrabiarazi orain"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Neuk berrabiarazi geroago"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Exekutatu $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ikusi Readme.txt"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Amaitu"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Aukeratu Hasiera Menuko karpeta"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Aukeratu Hasiera Menuko karpeta bat $(^NameDA)-ren lasterbideentzako."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Aukeratu Hasiera Menuko karpeta bat, non programaren lasterbideak instalatu nahi dituzun. Karpeta berri bat sortzeko izen bat ere adierazi dezakezu."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ez sortu lasterbiderik"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Ezabatu $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) zure sistematik ezabatzen du."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ziur zaude $(^Name)-ren instalaziotik irten nahi duzula?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ziur zaude $(^Name)-ren ezabaketa laguntzailetik irten nahi duzula?"
-!endif
+;Language: Basque (1069)
+;By Iñaki San Vicente
+
+!insertmacro LANGFILE "Basque" "Euskera"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Ongi etorri $(^NameDA) -ren instalazio programara"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Programa honek $(^NameDA) zure ordenagailuan instalatuko du.$\r$\n$\r$\nAholkatzen da instalazioarekin hasi aurretik beste aplikazio guztiak ixtea. Honek sistemarekin erlazionatuta dauden fitxategien eguneratzea ahalbidetuko du, ordenagailua berrabiarazi beharrik izan gabe.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Ongi etorri $(^NameDA) -ren ezabaketa programara"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Laguntzaile honek $(^NameDA)-ren ezabaketa prozesuan zehar gidatuko zaitu.$\r$\n$\r$\nEzabaketa hasi aurretik, ziurtatu $(^NameDA) martxan ez dagoela .$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lizentzia hitzarmena"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Mesedez aztertu lizentziaren baldintzak $(^NameDA) instalatu aurretik."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Baldintzak onartzen badituzu, sakatu Onartu aurrera egiteko. Hitzarmena onartzea ezinbestekoa da $(^NameDA) instalatzeko."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Baldintzak onartzen badituzu, nabarmendu azpiko laukitxoa. Hitzarmena onartzea ezinbestekoa da $(^NameDA) instalatzeko. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Baldintzak onartzen badituzu, hautatu azpian lehen aukera. Hitzarmena onartzea ezinbestekoa da $(^NameDA) instalatzeko. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lizentzia hitzarmena"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Mesedez aztertu lizentziaren baldintzak $(^NameDA) ezabatu aurretik."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Baldintzak onartzen badituzu, sakatu Onartu aurrera egiteko. Hitzarmena onartzea ezinbestekoa da $(^NameDA) ezabatzeko."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Baldintzak onartzen badituzu, nabarmendu azpiko laukitxoa. Hitzarmena onartzea ezinbestekoa da $(^NameDA) ezabatzeko. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Baldintzak onartzen badituzu, hautatu azpian lehen aukera. Hitzarmena onartzea ezinbestekoa da $(^NameDA) ezabatzeko. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Sakatu Av Pág hitzarmenaren gainontzeko atalak ikusteko."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Osagaien hautatzea"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Hautatu $(^NameDA)-ren zein ezaugarri instalatu nahi duzun."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Azalpena"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Osagaien hautatzea"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Hautatu $(^NameDA)-ren zein ezaugarri ezabatu nahi duzun."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Jarri sagua osagai baten gainean dagokion azalpena ikusteko."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Jarri sagua osagai baten gainean dagokion azalpena ikusteko."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Hautatu instalazioaren lekua"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Aukeratu $(^NameDA) instalatzeko karpeta."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Aukeratu ezabatuko den karpeta"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Aukeratu $(^NameDA) zein karpetatik ezabatuko den."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalatzen"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Mesedez itxoin $(^NameDA) instalatzen den bitartean."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalazioa burututa"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalazioa zuzen burutu da."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalazioa ezeztatua"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalazioa ez da zuzen burutu."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Ezabatzen"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Mesedez itxoin $(^NameDA) ezabatzen den bitartean."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ezabatzea burututa"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Ezabatzea zuzen burutu da."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ezabatzea ezeztatuta"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Ezabatzea ez da zuzen burutu."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA)-ren instalazio laguntzailea osatzen"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) zure sisteman instalatu da.$\r$\n$\r$\nSakatu Amaitu laguntzaile hau ixteko."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Zure sistema berrabiarazi behar duzu $(^NameDA)-ren instalazioa osatzeko. Orain Berrabiarazi nahi duzu?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA)-ren ezabaketa laguntzailea osatzen"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) zure sistematik ezabatu da.$\r$\n$\r$\nSakatu Amaitu laguntzaile hau ixteko."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Zure ordenagailuak berrabiarazia izan behar du $(^NameDA)-ren ezabaketa osatzeko. Orain Berrabiarazi nahi duzu?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Berrabiarazi orain"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Neuk berrabiarazi geroago"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Exekutatu $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ikusi Readme.txt"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Amaitu"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Aukeratu Hasiera Menuko karpeta"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Aukeratu Hasiera Menuko karpeta bat $(^NameDA)-ren lasterbideentzako."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Aukeratu Hasiera Menuko karpeta bat, non programaren lasterbideak instalatu nahi dituzun. Karpeta berri bat sortzeko izen bat ere adierazi dezakezu."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ez sortu lasterbiderik"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Ezabatu $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) zure sistematik ezabatzen du."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ziur zaude $(^Name)-ren instalaziotik irten nahi duzula?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ziur zaude $(^Name)-ren ezabaketa laguntzailetik irten nahi duzula?"
+!endif
diff --git a/Contrib/Language files/Belarusian.nlf b/Contrib/Language files/Belarusian.nlf
index d91053d..8babe2c 100755
--- a/Contrib/Language files/Belarusian.nlf
+++ b/Contrib/Language files/Belarusian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1059
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Sitnikov Vjacheslav [ glory_man@tut.by ]
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Óñòàíî¢êà $(^Name)
-# ^UninstallCaption
-Âûäàëåííå $(^Name)
-# ^LicenseSubCaption
-: ˳öýíç³éíàå ïàãàäíåííå
-# ^ComponentsSubCaption
-: Ïàðàìåòðû ¢ñòàíî¢ê³
-# ^DirSubCaption
-: Ïàïêà óñòàíî¢ê³
-# ^InstallingSubCaption
-: Êàï³ðàâàííå ôàéëà¢
-# ^CompletedSubCaption
-: Ïðàöýäóðà çàâåðøåíà
-# ^UnComponentsSubCaption
-: Ïàðàìåòðû âûäàëåííÿ
-# ^UnDirSubCaption
-: Ïàïêà âûäàëåííÿ
-# ^ConfirmSubCaption
-: Ïàöâÿðäæýííå
-# ^UninstallingSubCaption
-: Âûäàëåííå ôàéëà¢
-# ^UnCompletedSubCaption
-: Ïðàöýäóðà çàâåðøàíà
-# ^BackBtn
-< &Íàçàä
-# ^NextBtn
-&Äàëåé >
-# ^AgreeBtn
-&Çãîäçåí
-# ^AcceptBtn
-ß &ïðûìàþ ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ
-# ^DontAcceptBtn
-ß í&å ïðûìàþ ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ
-# ^InstallBtn
-&Óñòàëÿâàöü
-# ^UninstallBtn
-Âûä&àë³öü
-# ^CancelBtn
-Àäìÿí³öü
-# ^CloseBtn
-Çà&÷ûí³öü
-# ^BrowseBtn
-À&ãëÿä ...
-# ^ShowDetailsBtn
-Ïàäðà&áÿçíà...
-# ^ClickNext
-Íàö³ñí³öå êíîïêó "Äàëåé", êàá ïðàöÿãíóöü óñòàíî¢êó ïðàãðàìû.
-# ^ClickInstall
-Íàö³ñí³öå êíîïêó "Óñòàëÿâàöü" äëÿ ïà÷àòêó ïðàöýñà ¢ñòàíî¢ê³ ïðàãðàìû.
-# ^ClickUninstall
-Íàö³ñí³öå êíîïêó "Âûäàë³öü" äëÿ ïà÷àòêó ïðàöýñà âûäàëåííÿ ïðàãðàìû.
-# ^Name
-²ìÿ
-# ^Completed
-Çàâåðøàíà
-# ^LicenseText
-Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢ê³ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, íàö³ñí³öå êíîïêó "Çãîäçåí".
-# ^LicenseTextCB
-Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢ê³ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. $_CLICK
-# ^LicenseTextRB
-Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢ê³ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíàâàíûõ íiæýé. $_CLICK
-# ^UnLicenseText
-Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, íàöiñíiöå êíîïêó "Çãîäçåí".
-# ^UnLicenseTextCB
-Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. $_CLICK
-# ^UnLicenseTextRB
-Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíàâàíûõ íiæýé. $_CLICK
-# ^Custom
-Âûáàðêîâà
-# ^ComponentsText
-Âûçíà÷öå êàìïàíåíòû ïðàãðàìû, ÿêiÿ Âû æàäàåöå ¢ñòàíàâiöü. $_CLICK
-# ^ComponentsSubText1
-Âûçíà÷öå òûï óñòàíî¢êi:
-# ^ComponentsSubText2_NoInstTypes
-Âûçíà÷öå êàìïàíåíòû ïðàãðàìû, êàá óñòàíàâiöü iõ:
-# ^ComponentsSubText2
-àëüáî âûçíà÷öå êàìïàíåíòû ïðàãðàìû, êàá óñòàíàâiöü iõ ïà ñâàéìó æàäàííþ:
-# ^UnComponentsText
-Âûçíà÷öå êàìïàíåíòû, ÿêiÿ Âû æàäàåöå âûäàëiöü, i çíiìiöå ñöÿæê³, âûáðàíûÿ äëÿ òûõ êàìïàíåíòà¢, ÿêiÿ íå òðýáà âûäàëÿöü. $_CLICK
-# ^UnComponentsSubText1
-Âûçíà÷öå òûï âûäàëåííÿ:
-# ^UnComponentsSubText2_NoInstTypes
-Âûçíà÷öå êàìïàíåíòû äëÿ âûäàëåííÿ:
-# ^UnComponentsSubText2
-àëüáî âûçíà÷öå êàìïàíåíòû ïðàãðàìû äëÿ âûäàëåííÿ:
-# ^DirText
-Ïðàãðàìà ¢ñòàëþå $(^NameDA) ó âûçíà÷àíóþ ïàïêó. Êàá óñòàíàâiöü ïðàãðàìó ¢ iíøàé ïàïê³, íàöiñíiöå êíîïêó "Àãëÿä" i âûçíà÷öå ïàòðýáíóþ ïàïêó. $_CLICK
-# ^DirSubText
-Ïàïêà óñòàíî¢êi
-# ^DirBrowseText
-Âûçíà÷öå ïàïêó äëÿ ¢ñòàíî¢êi $(^NameDA):
-# ^UnDirText
-Ïðàãðàìà âûäàëiöü $(^NameDA) ç àäçíà÷àíàé ïàïê³. Êàá âûðàá³öü âûäàëåííå ç iíøàé ïàïê³, íàöiñíiöå êíîïêó "Àãëÿä" i âûçíà÷öå ïàòðýáíóþ ïàïêó. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Âûçíà÷öå ïàïêó, ç ÿêîé Âû æàäàåöå âûäàëiöü $(^NameDA):
-# ^SpaceAvailable
-"Äàñÿæíà íà äûñêó: "
-# ^SpaceRequired
-"Ïàòðýáíàå ìåñöà íà äûñêó: "
-# ^UninstallingText
-Ïðàãðàìà âûäàëiöü $(^NameDA) ç Âàøàãà êàìïóòàðà. $_CLICK
-# ^UninstallingSubText
-Âûäàëåííå ç:
-# ^FileError
-Íåìàã÷ûìà àä÷ûí³öü ôàéë äëÿ çàïiñó: \r\n\r\n$0\r\n\r\nÍàöiñíiöå êíîïêó "Ïåðàïûíiöü", êàá ïåðàïûíiöü óñòàíî¢êó;\r\n"Ïà¢òàðûöü", êàá ïà¢òàðûöü ñïðîáó çàïiñó ¢ ôàéë;\r\n"²ãíàðàâàöü", êàá ïðàïóñöiöü ãýòà äçåÿííå.
-# ^FileError_NoIgnore
-Íåìàã÷ûìà àä÷ûí³öü ôàéë äëÿ çàïiñó: \r\n\r\n$0\r\n\r\nÍàöiñíiöå êíîïêó "Ïà¢òàðûöü", êàá ïà¢òàðûöü ñïðîáó çàïiñó ¢ ôàéë;\r\n"Àäìÿí³öü", êàá ïåðàïûíiöü óñòàíî¢êó.
-# ^CantWrite
-"Íåìàã÷ûìà çàïiñàöü: "
-# ^CopyFailed
-Êàïiðàâàííå íÿ¢äàëà
-# ^CopyTo
-"Êàïiðàâàííå ¢ "
-# ^Registering
-"Ðýãiñòðàöûÿ: "
-# ^Unregistering
-"Âûäàëåííå ðýãiñòðàöûi: "
-# ^SymbolNotFound
-"Íåìàã÷ûìà àäøóêàöü ñiìâàë: "
-# ^CouldNotLoad
-"Íåìàã÷ûìà çàãðóçiöü: "
-# ^CreateFolder
-"Ñòâàðýííå ïàïê³: "
-# ^CreateShortcut
-"Ñòâàðýííå ÿðëûêó: "
-# ^CreatedUninstaller
-"Ñòâàðýííå ïðàãðàìû âûäàëåííÿ: "
-# ^Delete
-"Âûäàëåííå ôàéëà: "
-# ^DeleteOnReboot
-"Âûäàëåííå ïàñëÿ ïåðåçàãðóçêi êàìïóòàðà: "
-# ^ErrorCreatingShortcut
-"Ïàìûëêà ñòâàðýííÿ ÿðëûêó: "
-# ^ErrorCreating
-"Ïàìûëêà ñòâàðýííÿ: "
-# ^ErrorDecompressing
-Íåìàã÷ûìà âûöÿãíóöü äàäçåíûÿ. Ìàã÷ûìà ïàøêîäæàíû äûñòðûáóòû¢.
-# ^ErrorRegistering
-Íåìàã÷ûìà çàðýã³ñòðàâàöü á³áë³ÿòýêó (DLL)
-# ^ExecShell
-"Âûêàíàííå êàìàíäû àáàëîíê³: "
-# ^Exec
-"Âûêàíàííå: "
-# ^Extract
-"Âûìàííå: "
-# ^ErrorWriting
-"Âûìàííå: ïàìûëêà çàïiñó ôàéëà"
-# ^InvalidOpcode
-äûñòðûáóòû¢ ïàøêîäæàíû: êîä ïàìûëêi
-# ^NoOLE
-"Íÿìà OLE äëÿ: "
-# ^OutputFolder
-"Êàòàëîã óñòàíî¢êi: "
-# ^RemoveFolder
-"Âûäàëåííå ïàïê³: "
-# ^RenameOnReboot
-"Ïåðàíàçâà ïàñëÿ ïåðåçàãðóçêi êàìïóòàðà: "
-# ^Rename
-"Ïåðàíàçâà: "
-# ^Skipped
-"Ïðàïóø÷àíà: "
-# ^CopyDetails
-Êàïiðàâàöü çâåñòêi ¢ áóôåð àáìåíà
-# ^LogInstall
-Çàïiñâàöü ó ëîã ïðàöýñ óñòàíî¢êi
-# byte
-# kilo
-# mega
-# giga
+# Header, don't edit
+NLF v6
+# Language ID
+1059
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Sitnikov Vjacheslav [ glory_man@tut.by ]
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Óñòàíî¢êà $(^Name)
+# ^UninstallCaption
+Âûäàëåííå $(^Name)
+# ^LicenseSubCaption
+: ˳öýíç³éíàå ïàãàäíåííå
+# ^ComponentsSubCaption
+: Ïàðàìåòðû ¢ñòàíî¢ê³
+# ^DirSubCaption
+: Ïàïêà óñòàíî¢ê³
+# ^InstallingSubCaption
+: Êàï³ðàâàííå ôàéëà¢
+# ^CompletedSubCaption
+: Ïðàöýäóðà çàâåðøåíà
+# ^UnComponentsSubCaption
+: Ïàðàìåòðû âûäàëåííÿ
+# ^UnDirSubCaption
+: Ïàïêà âûäàëåííÿ
+# ^ConfirmSubCaption
+: Ïàöâÿðäæýííå
+# ^UninstallingSubCaption
+: Âûäàëåííå ôàéëà¢
+# ^UnCompletedSubCaption
+: Ïðàöýäóðà çàâåðøàíà
+# ^BackBtn
+< &Íàçàä
+# ^NextBtn
+&Äàëåé >
+# ^AgreeBtn
+&Çãîäçåí
+# ^AcceptBtn
+ß &ïðûìàþ ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ
+# ^DontAcceptBtn
+ß í&å ïðûìàþ ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ
+# ^InstallBtn
+&Óñòàëÿâàöü
+# ^UninstallBtn
+Âûä&àë³öü
+# ^CancelBtn
+Àäìÿí³öü
+# ^CloseBtn
+Çà&÷ûí³öü
+# ^BrowseBtn
+À&ãëÿä ...
+# ^ShowDetailsBtn
+Ïàäðà&áÿçíà...
+# ^ClickNext
+Íàö³ñí³öå êíîïêó "Äàëåé", êàá ïðàöÿãíóöü óñòàíî¢êó ïðàãðàìû.
+# ^ClickInstall
+Íàö³ñí³öå êíîïêó "Óñòàëÿâàöü" äëÿ ïà÷àòêó ïðàöýñà ¢ñòàíî¢ê³ ïðàãðàìû.
+# ^ClickUninstall
+Íàö³ñí³öå êíîïêó "Âûäàë³öü" äëÿ ïà÷àòêó ïðàöýñà âûäàëåííÿ ïðàãðàìû.
+# ^Name
+²ìÿ
+# ^Completed
+Çàâåðøàíà
+# ^LicenseText
+Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢ê³ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, íàö³ñí³öå êíîïêó "Çãîäçåí".
+# ^LicenseTextCB
+Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢ê³ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. $_CLICK
+# ^LicenseTextRB
+Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢ê³ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíàâàíûõ íiæýé. $_CLICK
+# ^UnLicenseText
+Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, íàöiñíiöå êíîïêó "Çãîäçåí".
+# ^UnLicenseTextCB
+Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. $_CLICK
+# ^UnLicenseTextRB
+Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA). Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíàâàíûõ íiæýé. $_CLICK
+# ^Custom
+Âûáàðêîâà
+# ^ComponentsText
+Âûçíà÷öå êàìïàíåíòû ïðàãðàìû, ÿêiÿ Âû æàäàåöå ¢ñòàíàâiöü. $_CLICK
+# ^ComponentsSubText1
+Âûçíà÷öå òûï óñòàíî¢êi:
+# ^ComponentsSubText2_NoInstTypes
+Âûçíà÷öå êàìïàíåíòû ïðàãðàìû, êàá óñòàíàâiöü iõ:
+# ^ComponentsSubText2
+àëüáî âûçíà÷öå êàìïàíåíòû ïðàãðàìû, êàá óñòàíàâiöü iõ ïà ñâàéìó æàäàííþ:
+# ^UnComponentsText
+Âûçíà÷öå êàìïàíåíòû, ÿêiÿ Âû æàäàåöå âûäàëiöü, i çíiìiöå ñöÿæê³, âûáðàíûÿ äëÿ òûõ êàìïàíåíòà¢, ÿêiÿ íå òðýáà âûäàëÿöü. $_CLICK
+# ^UnComponentsSubText1
+Âûçíà÷öå òûï âûäàëåííÿ:
+# ^UnComponentsSubText2_NoInstTypes
+Âûçíà÷öå êàìïàíåíòû äëÿ âûäàëåííÿ:
+# ^UnComponentsSubText2
+àëüáî âûçíà÷öå êàìïàíåíòû ïðàãðàìû äëÿ âûäàëåííÿ:
+# ^DirText
+Ïðàãðàìà ¢ñòàëþå $(^NameDA) ó âûçíà÷àíóþ ïàïêó. Êàá óñòàíàâiöü ïðàãðàìó ¢ iíøàé ïàïê³, íàöiñíiöå êíîïêó "Àãëÿä" i âûçíà÷öå ïàòðýáíóþ ïàïêó. $_CLICK
+# ^DirSubText
+Ïàïêà óñòàíî¢êi
+# ^DirBrowseText
+Âûçíà÷öå ïàïêó äëÿ ¢ñòàíî¢êi $(^NameDA):
+# ^UnDirText
+Ïðàãðàìà âûäàëiöü $(^NameDA) ç àäçíà÷àíàé ïàïê³. Êàá âûðàá³öü âûäàëåííå ç iíøàé ïàïê³, íàöiñíiöå êíîïêó "Àãëÿä" i âûçíà÷öå ïàòðýáíóþ ïàïêó. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Âûçíà÷öå ïàïêó, ç ÿêîé Âû æàäàåöå âûäàëiöü $(^NameDA):
+# ^SpaceAvailable
+"Äàñÿæíà íà äûñêó: "
+# ^SpaceRequired
+"Ïàòðýáíàå ìåñöà íà äûñêó: "
+# ^UninstallingText
+Ïðàãðàìà âûäàëiöü $(^NameDA) ç Âàøàãà êàìïóòàðà. $_CLICK
+# ^UninstallingSubText
+Âûäàëåííå ç:
+# ^FileError
+Íåìàã÷ûìà àä÷ûí³öü ôàéë äëÿ çàïiñó: \r\n\r\n$0\r\n\r\nÍàöiñíiöå êíîïêó "Ïåðàïûíiöü", êàá ïåðàïûíiöü óñòàíî¢êó;\r\n"Ïà¢òàðûöü", êàá ïà¢òàðûöü ñïðîáó çàïiñó ¢ ôàéë;\r\n"²ãíàðàâàöü", êàá ïðàïóñöiöü ãýòà äçåÿííå.
+# ^FileError_NoIgnore
+Íåìàã÷ûìà àä÷ûí³öü ôàéë äëÿ çàïiñó: \r\n\r\n$0\r\n\r\nÍàöiñíiöå êíîïêó "Ïà¢òàðûöü", êàá ïà¢òàðûöü ñïðîáó çàïiñó ¢ ôàéë;\r\n"Àäìÿí³öü", êàá ïåðàïûíiöü óñòàíî¢êó.
+# ^CantWrite
+"Íåìàã÷ûìà çàïiñàöü: "
+# ^CopyFailed
+Êàïiðàâàííå íÿ¢äàëà
+# ^CopyTo
+"Êàïiðàâàííå ¢ "
+# ^Registering
+"Ðýãiñòðàöûÿ: "
+# ^Unregistering
+"Âûäàëåííå ðýãiñòðàöûi: "
+# ^SymbolNotFound
+"Íåìàã÷ûìà àäøóêàöü ñiìâàë: "
+# ^CouldNotLoad
+"Íåìàã÷ûìà çàãðóçiöü: "
+# ^CreateFolder
+"Ñòâàðýííå ïàïê³: "
+# ^CreateShortcut
+"Ñòâàðýííå ÿðëûêó: "
+# ^CreatedUninstaller
+"Ñòâàðýííå ïðàãðàìû âûäàëåííÿ: "
+# ^Delete
+"Âûäàëåííå ôàéëà: "
+# ^DeleteOnReboot
+"Âûäàëåííå ïàñëÿ ïåðåçàãðóçêi êàìïóòàðà: "
+# ^ErrorCreatingShortcut
+"Ïàìûëêà ñòâàðýííÿ ÿðëûêó: "
+# ^ErrorCreating
+"Ïàìûëêà ñòâàðýííÿ: "
+# ^ErrorDecompressing
+Íåìàã÷ûìà âûöÿãíóöü äàäçåíûÿ. Ìàã÷ûìà ïàøêîäæàíû äûñòðûáóòû¢.
+# ^ErrorRegistering
+Íåìàã÷ûìà çàðýã³ñòðàâàöü á³áë³ÿòýêó (DLL)
+# ^ExecShell
+"Âûêàíàííå êàìàíäû àáàëîíê³: "
+# ^Exec
+"Âûêàíàííå: "
+# ^Extract
+"Âûìàííå: "
+# ^ErrorWriting
+"Âûìàííå: ïàìûëêà çàïiñó ôàéëà"
+# ^InvalidOpcode
+äûñòðûáóòû¢ ïàøêîäæàíû: êîä ïàìûëêi
+# ^NoOLE
+"Íÿìà OLE äëÿ: "
+# ^OutputFolder
+"Êàòàëîã óñòàíî¢êi: "
+# ^RemoveFolder
+"Âûäàëåííå ïàïê³: "
+# ^RenameOnReboot
+"Ïåðàíàçâà ïàñëÿ ïåðåçàãðóçêi êàìïóòàðà: "
+# ^Rename
+"Ïåðàíàçâà: "
+# ^Skipped
+"Ïðàïóø÷àíà: "
+# ^CopyDetails
+Êàïiðàâàöü çâåñòêi ¢ áóôåð àáìåíà
+# ^LogInstall
+Çàïiñâàöü ó ëîã ïðàöýñ óñòàíî¢êi
+# byte
+# kilo
+# mega
+# giga
à \ No newline at end of file
diff --git a/Contrib/Language files/Belarusian.nsh b/Contrib/Language files/Belarusian.nsh
index 3e6be45..68664b4 100755
--- a/Contrib/Language files/Belarusian.nsh
+++ b/Contrib/Language files/Belarusian.nsh
@@ -1,121 +1,121 @@
-;Language: Belarusian (1059)
-;Translated by Sitnikov Vjacheslav [ glory_man@tut.by ]
-
-!insertmacro LANGFILE "Belarusian" "Byelorussian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Âàñ âiòàå ìàéñòàð ¢ñòàíî¢ê³ $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ãýòàÿ ïðàãðàìà ¢ñòàëþå $(^NameDA) íà Âàø êàìïóòàð.$\r$\n$\r$\nÏåðàä ïà÷àòêàì óñòàíî¢êi ïðàïàíóåì çà÷ûí³öü óñå ïðàãðàìû, ÿê³ÿ âûêîíâàþööà ¢ ñàïðà¢äíû ìîìàíò. Ãýòà äàïàìîæà ïðàãðàìå ¢ñòàíî¢ê³ àáíàâ³öü ñ³ñòýìíûÿ ôàéëû áåç ïåðàçàãðóçê³ êàìïóòàðà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Âàñ âiòàå ìàéñòàð âûäàëåííÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ãýòàÿ ïðàãðàìà âûäàë³öü $(^NameDA) ç Âàøàãà êàìïóòàðà.$\r$\n$\r$\nÏåðàä ïà÷àòêàì âûäàëåííÿ ïåðàêàíàéöåñÿ ¢ òûì, øòî ïðàãðàìà $(^NameDA) íå âûêîíâàåööà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëiöåíçiéíàå ïàãàäíåííå"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢êi $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Êàëi Âû ïðûìàåöå ¢ìîâû Ëiöåíçiéíàãà ïàãàäíåííÿ, íàö³ñí³öå êíîïêó $\"Çãîäçåí$\". Ãýòà íåàáõîäíà äëÿ ¢ñòàíî¢ê³ ïðàãðàìû."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Êàëi Âû ïðûìàåöå ¢ìîâû Ëiöåíçiéíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. Ãýòà íåàáõîäíà äëÿ ¢ñòàíî¢ê³ ïðàãðàìû. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Êàëi Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíîâàíûõ í³æýé. Ãýòà íåàáõîäíà äëÿ ¢ñòàíî¢ê³ ïðàãðàìû. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "˳öýíç³éíàå ïàãàäíåííå"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, íàö³ñí³öå êíîïêó $\"Çãîäçåí$\". Ãýòà íåàáõîäíà äëÿ âûäàëåííÿ ïðàãðàìû. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. Ãýòà íåàáõîäíà äëÿ âûäàëåííÿ ïðàãðàìû. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíàâàíûõ í³æýé. Ãýòà íåàáõîäíà äëÿ âûäàëåííÿ ïðàãðàìû. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Âûêàðûñòî¢âàéöå êíîïêi $\"PageUp$\" i $\"PageDown$\" äëÿ ïåðàìÿø÷ýííÿ ïà òýêñöå."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Êàìïàíåíòû ïðàãðàìû, ÿêàÿ ¢ñòà븢âàåööà"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Âûçíà÷öå êàìïàíåíòû $(^NameDA), ÿê³ÿ Âû æàäàåöå ¢ñòàëÿâàöü."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Àï³ñàííå"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Êàìïàíåíòû ïðàãðàìû"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Âûçíà÷öå êàìïàíåíòû $(^NameDA), ÿê³ÿ Âû æàäàåöå âûäàë³öü."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Óñòàëþéöå êóðñîð ìûøû íà íàçâó êàìïàíåíòà, êàá ïðà÷ûòàöü ÿãî àï³ñàííå."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Óñòàëþéöå êóðñîð ìûøû íà íàçâó êàìïàíåíòà, êàá ïðà÷ûòàöü ÿãî àï³ñàííå."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Âûáàð ïàïê³ ¢ñòàíî¢ê³"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Âûçíà÷öå ïàïêó äëÿ ¢ñòàíî¢ê³ $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Âûáàð ïàïê³ äëÿ âûäàëåííÿ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Âûçíà÷öå ïàïêó, ç ÿêîé ïàòðýáíà âûäàë³öü $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Êàï³ðàâàííå ôàéëà¢"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ïà÷àêàéöå, êàë³ ëàñêà, âûêîíâàåööà êàï³ðàâàííå ôàéëࢠ$(^NameDA) íà Âàø êàìïóòàð..."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Óñòàíî¢êà çàâåðøàíà"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Óñòàíî¢êà ïàñïÿõîâà çàâåðøàíà."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Óñòàíî¢êà ïåðàðâàíà"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Óñòàíî¢êà íå çàâåðøàíà."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Âûäàëåííå"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ïà÷àêàéöå, êàë³ ëàñêà, âûêîíâàåööà âûäàëåííå ôàéëࢠ$(^NameDA) ç Âàøàãà êàìïóòàðà..."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Âûäàëåííå çàâåðøàíà"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Âûäàëåííå ïðàãðàìû ïàñïÿõîâà çàâåðøàíà."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Âûäàëåííå ïåðàðâàíà"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Âûäàëåííå âûêàíàíà íå ïî¢íàñöþ."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàêàí÷ýííå ìàéñòðà ¢ñòàíî¢ê³ $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Óñòàíî¢êà $(^NameDA) âûêàíàíà.$\r$\n$\r$\nÍàö³ñí³öå êíîïêó $\"Ãàòîâà$\" äëÿ âûéñöÿ ç ïðàãðàìû ¢ñòàíî¢ê³."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Êàá çàêîí÷ûöü óñòàíî¢êó $(^NameDA), íåàáõîäíà ïåðàçàãðóç³öü êàìïóòàð. Ö³ æàäàåöå Âû çðàá³öü ãýòà çàðàç?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàêàí÷ýííå ðàáîòû ìàéñòàðà âûäàëåííÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðàãðàìà $(^NameDA) âûäàëåíà ç Âàøàãà êàìïóòàðà.$\r$\n$\r$\nÍàö³ñí³öå êíîïêó $\"Ãàòîâà$\"êàá âûéñö³ ç ïðàãðàìû âûäàëåííÿ."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Êàá ñêîí÷ûöü âûäàëåííå $(^NameDA), íåàáõîäíà ïåðàçàãðóç³öü êàìïóòàð. Ö³ æàäàåöå Âû çðàá³öü ãýòà çàðàç?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Òàê, ïåðàçàãðóç³öü êàìïóòàð çàðàç"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Íå, ïåðàçàãðóç³öü êàìïóòàð ïàçíåé"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Çàïóñö³öü $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ïàêàçàöü ³íôàðìàöûþ àá ïðàãðàìå"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ãàòîâà"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Ïàïêà ¢ ìåíþ $\"Ïóñê$\""
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Âûëó÷ûöå ïàïêó ¢ ìåíþ $\"Ïóñê$\" äëÿ ðàçìÿø÷ýííÿ ÿðëûêî¢ ïðàãðàìû."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Âûëó÷ûöå ïàïêó ¢ ìåíþ $\"Ïóñê$\", êóäû áóäóöü çìåø÷àíû ÿðëûê³ ïðàãðàìû. Âû òàêñàìà ìîæàöå àçíà÷ûöü ³íøàå ³ìÿ ïàïê³."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñòâàðàöü ÿðëûê³"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Âûäàëåííå $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Âûäàëåííå $(^NameDA) ç Âàøàãà êàìïóòàðà."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Âû ñàïðà¢äû æàäàåöå ñêàñàâàöü óñòàíî¢êó $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Âû ñàïðà¢äû æàäàåöå ñêàñàâàöü âûäàëåííå $(^Name)?"
-!endif
+;Language: Belarusian (1059)
+;Translated by Sitnikov Vjacheslav [ glory_man@tut.by ]
+
+!insertmacro LANGFILE "Belarusian" "Byelorussian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Âàñ âiòàå ìàéñòàð ¢ñòàíî¢ê³ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ãýòàÿ ïðàãðàìà ¢ñòàëþå $(^NameDA) íà Âàø êàìïóòàð.$\r$\n$\r$\nÏåðàä ïà÷àòêàì óñòàíî¢êi ïðàïàíóåì çà÷ûí³öü óñå ïðàãðàìû, ÿê³ÿ âûêîíâàþööà ¢ ñàïðà¢äíû ìîìàíò. Ãýòà äàïàìîæà ïðàãðàìå ¢ñòàíî¢ê³ àáíàâ³öü ñ³ñòýìíûÿ ôàéëû áåç ïåðàçàãðóçê³ êàìïóòàðà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Âàñ âiòàå ìàéñòàð âûäàëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ãýòàÿ ïðàãðàìà âûäàë³öü $(^NameDA) ç Âàøàãà êàìïóòàðà.$\r$\n$\r$\nÏåðàä ïà÷àòêàì âûäàëåííÿ ïåðàêàíàéöåñÿ ¢ òûì, øòî ïðàãðàìà $(^NameDA) íå âûêîíâàåööà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëiöåíçiéíàå ïàãàäíåííå"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì óñòàíî¢êi $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Êàëi Âû ïðûìàåöå ¢ìîâû Ëiöåíçiéíàãà ïàãàäíåííÿ, íàö³ñí³öå êíîïêó $\"Çãîäçåí$\". Ãýòà íåàáõîäíà äëÿ ¢ñòàíî¢ê³ ïðàãðàìû."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Êàëi Âû ïðûìàåöå ¢ìîâû Ëiöåíçiéíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. Ãýòà íåàáõîäíà äëÿ ¢ñòàíî¢ê³ ïðàãðàìû. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Êàëi Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíîâàíûõ í³æýé. Ãýòà íåàáõîäíà äëÿ ¢ñòàíî¢ê³ ïðàãðàìû. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "˳öýíç³éíàå ïàãàäíåííå"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Êàë³ ëàñêà, ïðà÷ûòàéöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ ïåðàä ïà÷àòêàì âûäàëåííÿ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, íàö³ñí³öå êíîïêó $\"Çãîäçåí$\". Ãýòà íåàáõîäíà äëÿ âûäàëåííÿ ïðàãðàìû. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, óñòàëþéöå ñöÿæîê í³æýé. Ãýòà íåàáõîäíà äëÿ âûäàëåííÿ ïðàãðàìû. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Êàë³ Âû ïðûìàåöå ¢ìîâû ˳öýíç³éíàãà ïàãàäíåííÿ, âûëó÷ûöå ïåðøû âàðûÿíò ç ïðàïàíàâàíûõ í³æýé. Ãýòà íåàáõîäíà äëÿ âûäàëåííÿ ïðàãðàìû. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Âûêàðûñòî¢âàéöå êíîïêi $\"PageUp$\" i $\"PageDown$\" äëÿ ïåðàìÿø÷ýííÿ ïà òýêñöå."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Êàìïàíåíòû ïðàãðàìû, ÿêàÿ ¢ñòà븢âàåööà"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Âûçíà÷öå êàìïàíåíòû $(^NameDA), ÿê³ÿ Âû æàäàåöå ¢ñòàëÿâàöü."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Àï³ñàííå"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Êàìïàíåíòû ïðàãðàìû"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Âûçíà÷öå êàìïàíåíòû $(^NameDA), ÿê³ÿ Âû æàäàåöå âûäàë³öü."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Óñòàëþéöå êóðñîð ìûøû íà íàçâó êàìïàíåíòà, êàá ïðà÷ûòàöü ÿãî àï³ñàííå."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Óñòàëþéöå êóðñîð ìûøû íà íàçâó êàìïàíåíòà, êàá ïðà÷ûòàöü ÿãî àï³ñàííå."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Âûáàð ïàïê³ ¢ñòàíî¢ê³"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Âûçíà÷öå ïàïêó äëÿ ¢ñòàíî¢ê³ $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Âûáàð ïàïê³ äëÿ âûäàëåííÿ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Âûçíà÷öå ïàïêó, ç ÿêîé ïàòðýáíà âûäàë³öü $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Êàï³ðàâàííå ôàéëà¢"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ïà÷àêàéöå, êàë³ ëàñêà, âûêîíâàåööà êàï³ðàâàííå ôàéëࢠ$(^NameDA) íà Âàø êàìïóòàð..."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Óñòàíî¢êà çàâåðøàíà"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Óñòàíî¢êà ïàñïÿõîâà çàâåðøàíà."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Óñòàíî¢êà ïåðàðâàíà"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Óñòàíî¢êà íå çàâåðøàíà."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Âûäàëåííå"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ïà÷àêàéöå, êàë³ ëàñêà, âûêîíâàåööà âûäàëåííå ôàéëࢠ$(^NameDA) ç Âàøàãà êàìïóòàðà..."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Âûäàëåííå çàâåðøàíà"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Âûäàëåííå ïðàãðàìû ïàñïÿõîâà çàâåðøàíà."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Âûäàëåííå ïåðàðâàíà"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Âûäàëåííå âûêàíàíà íå ïî¢íàñöþ."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàêàí÷ýííå ìàéñòðà ¢ñòàíî¢ê³ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Óñòàíî¢êà $(^NameDA) âûêàíàíà.$\r$\n$\r$\nÍàö³ñí³öå êíîïêó $\"Ãàòîâà$\" äëÿ âûéñöÿ ç ïðàãðàìû ¢ñòàíî¢ê³."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Êàá çàêîí÷ûöü óñòàíî¢êó $(^NameDA), íåàáõîäíà ïåðàçàãðóç³öü êàìïóòàð. Ö³ æàäàåöå Âû çðàá³öü ãýòà çàðàç?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàêàí÷ýííå ðàáîòû ìàéñòàðà âûäàëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðàãðàìà $(^NameDA) âûäàëåíà ç Âàøàãà êàìïóòàðà.$\r$\n$\r$\nÍàö³ñí³öå êíîïêó $\"Ãàòîâà$\"êàá âûéñö³ ç ïðàãðàìû âûäàëåííÿ."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Êàá ñêîí÷ûöü âûäàëåííå $(^NameDA), íåàáõîäíà ïåðàçàãðóç³öü êàìïóòàð. Ö³ æàäàåöå Âû çðàá³öü ãýòà çàðàç?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Òàê, ïåðàçàãðóç³öü êàìïóòàð çàðàç"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Íå, ïåðàçàãðóç³öü êàìïóòàð ïàçíåé"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Çàïóñö³öü $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ïàêàçàöü ³íôàðìàöûþ àá ïðàãðàìå"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ãàòîâà"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Ïàïêà ¢ ìåíþ $\"Ïóñê$\""
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Âûëó÷ûöå ïàïêó ¢ ìåíþ $\"Ïóñê$\" äëÿ ðàçìÿø÷ýííÿ ÿðëûêî¢ ïðàãðàìû."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Âûëó÷ûöå ïàïêó ¢ ìåíþ $\"Ïóñê$\", êóäû áóäóöü çìåø÷àíû ÿðëûê³ ïðàãðàìû. Âû òàêñàìà ìîæàöå àçíà÷ûöü ³íøàå ³ìÿ ïàïê³."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñòâàðàöü ÿðëûê³"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Âûäàëåííå $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Âûäàëåííå $(^NameDA) ç Âàøàãà êàìïóòàðà."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Âû ñàïðà¢äû æàäàåöå ñêàñàâàöü óñòàíî¢êó $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Âû ñàïðà¢äû æàäàåöå ñêàñàâàöü âûäàëåííå $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Bosnian.nlf b/Contrib/Language files/Bosnian.nlf
index ab19eb8..be2ba62 100755
--- a/Contrib/Language files/Bosnian.nlf
+++ b/Contrib/Language files/Bosnian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-5146
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Salih CAVKIC, cavkic@skynet.be
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Instalacija
-# ^UninstallCaption
-$(^Name) Uklanjanje
-# ^LicenseSubCaption
-: Licencno pravo korištenja
-# ^ComponentsSubCaption
-: Opcije instalacije
-# ^DirSubCaption
-: Izbor mape za instalaciju
-# ^InstallingSubCaption
-: Instaliranje
-# ^CompletedSubCaption
-: Završeno
-# ^UnComponentsSubCaption
-: Opcije uklanjanja
-# ^UnDirSubCaption
-: Mapa uklanjanja
-# ^ConfirmSubCaption
-: Potvrda
-# ^UninstallingSubCaption
-: Uklanjanje
-# ^UnCompletedSubCaption
-: Završeno uklanjanje
-# ^BackBtn
-< &Nazad
-# ^NextBtn
-&Dalje >
-# ^AgreeBtn
-&Prihvatam
-# ^AcceptBtn
-&Prihvatam uvjete licencnog ugovora
-# ^DontAcceptBtn
-&Ne prihvatam uvjete licencnog ugovora
-# ^InstallBtn
-&Instaliraj
-# ^UninstallBtn
-&Ukloni
-# ^CancelBtn
-Odustani
-# ^CloseBtn
-&Zatvori
-# ^BrowseBtn
-&Pregledaj...
-# ^ShowDetailsBtn
-Prikaži &detalje
-# ^ClickNext
-Pritisnite dugme 'Dalje' za nastavak.
-# ^ClickInstall
-Pritisnite dugme 'Instaliraj' za poèetak instalacije.
-# ^ClickUninstall
-Pritisnite dugme 'Ukloni' za poèetak uklanjanja.
-# ^Name
-Ime
-# ^Completed
-Završeno
-# ^LicenseText
-Molim proèitajte licencu prije instaliranja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite 'Prihvatam'.
-# ^LicenseTextCB
-Molim proèitajte licencu prije instaliranja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, oznaèite donji kvadratiæ. $_CLICK
-# ^LicenseTextRB
-Molim proèitajte licencu prije instaliranja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite prvu donju opciju. $_CLICK
-# ^UnLicenseText
-Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite 'Prihvatam'.
-# ^UnLicenseTextCB
-Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ako prihvatate sve uvjete ugovora, obilježite donji kvadratiæ. $_CLICK
-# ^UnLicenseTextRB
-Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite prvu opciju ispod. $_CLICK
-# ^Custom
-Podešavanje
-# ^ComponentsText
-Oznaèite komponente koje želite instalirati. Instaliraju se samo oznaèene komponente. Uklonite oznaku sa onih koje ne želite instalirati. $_CLICK
-# ^ComponentsSubText1
-Izaberite tip instalacije:
-# ^ComponentsSubText2_NoInstTypes
-Odaberite komponente za instalaciju:
-# ^ComponentsSubText2
-Ili po izboru oznaèite komponente koje želite instalirati:
-# ^UnComponentsText
-Oznaèite komponente koje želite ukloniti. Uklonite oznaku sa onih koje ne želite ukloniti. $_CLICK
-# ^UnComponentsSubText1
-Izaberite tip uklanjanja:
-# ^UnComponentsSubText2_NoInstTypes
-Izaberite komponente za uklanjanje:
-# ^UnComponentsSubText2
-Ili po izboru odaberite komponente koje želite da uklonite:
-# ^DirText
-Program $(^NameDA) æe biti instaliran u sljedeæu mapu. Za instalaciju na neku drugu mapu odaberite 'Pregledaj...' i odaberite drugu mapu. $_CLICK
-# ^DirSubText
-Odredišna mapa
-# ^DirBrowseText
-Izaberite mapu u koju želite instalirati program $(^NameDA):
-# ^UnDirText
-Program $(^NameDA) æe biti uklonjen iz navedene mape. Za uklanjanje iz druge mape odaberite 'Pregledaj...' i oznaèite drugu mapu. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Izaberite mapu iz koje æete program $(^NameDA) ukloniti:
-# ^SpaceAvailable
-"Slobodno prostora na disku: "
-# ^SpaceRequired
-"Potrebno prostora na disku: "
-# ^UninstallingText
-Program $(^NameDA) æe biti uklonjen iz sljedeæe mape. $_CLICK
-# ^UninstallingSubText
-Uklanjanje iz:
-# ^FileError
-Greška prilikom otvaranja datoteke za upisivanje: \r\n\t"$0"\r\n\"Odustani\" za prekid instalacije,\r\n\"Ponovi\" za ponovni pokušaj upisivanja, ili\r\n\"Ignoriši\" za zanemarenje te datoteke
-# ^FileError_NoIgnore
-Greška prilikom otvaranja datoteke za upisivanje: \r\n\t"$0"\r\n\"Ponovi\" za ponovni pokušaj zapisivanja, ili\r\n\"Odustani\" za prekid instalacije
-# ^CantWrite
-"Nemoguæe upisati: "
-# ^CopyFailed
-Greška prilikom kopiranja
-# ^CopyTo
-"Kopiraj u "
-# ^Registering
-"Prijava: "
-# ^Unregistering
-"Odjava: "
-# ^SymbolNotFound
-"Nemoguæe naæi simbol: "
-# ^CouldNotLoad
-"Nemoguæe uèitavanje: "
-# ^CreateFolder
-"Napravi mapu: "
-# ^CreateShortcut
-"Napravi preèicu: "
-# ^CreatedUninstaller
-"Program za uklanjanje: "
-# ^Delete
-"Obriši datoteku: "
-# ^DeleteOnReboot
-"Obriši prilikom ponovnog pokretanja: "
-# ^ErrorCreatingShortcut
-"Greška prilikom kreiranja preèica: "
-# ^ErrorCreating
-"Greška prilikom kreiranja: "
-# ^ErrorDecompressing
-Greška prilikom otpakivanja podataka! Ošteæen instalacijski program?
-# ^ErrorRegistering
-Greška prilikom prijavljivanja DLLa
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Izvrši: "
-# ^Extract
-"Otpakuj: "
-# ^ErrorWriting
-"Otpakivanje: greška upisivanja u datoteku "
-# ^InvalidOpcode
-Ošteæena instalacijska datoteka: neispravna opkoda
-# ^NoOLE
-"Nema OLE za: "
-# ^OutputFolder
-"Izlazna mapa: "
-# ^RemoveFolder
-"Obriši mapu: "
-# ^RenameOnReboot
-"Preimenuj prilikom ponovnog startovanja: "
-# ^Rename
-"Preimenuj: "
-# ^Skipped
-"Preskoèeno: "
-# ^CopyDetails
-Kopiraj detalje na Klembord
-# ^LogInstall
-Logiraj zapisnik procesa instalacije
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
-
+# Header, don't edit
+NLF v6
+# Language ID
+5146
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Salih CAVKIC, cavkic@skynet.be
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Instalacija
+# ^UninstallCaption
+$(^Name) Uklanjanje
+# ^LicenseSubCaption
+: Licencno pravo korištenja
+# ^ComponentsSubCaption
+: Opcije instalacije
+# ^DirSubCaption
+: Izbor mape za instalaciju
+# ^InstallingSubCaption
+: Instaliranje
+# ^CompletedSubCaption
+: Završeno
+# ^UnComponentsSubCaption
+: Opcije uklanjanja
+# ^UnDirSubCaption
+: Mapa uklanjanja
+# ^ConfirmSubCaption
+: Potvrda
+# ^UninstallingSubCaption
+: Uklanjanje
+# ^UnCompletedSubCaption
+: Završeno uklanjanje
+# ^BackBtn
+< &Nazad
+# ^NextBtn
+&Dalje >
+# ^AgreeBtn
+&Prihvatam
+# ^AcceptBtn
+&Prihvatam uvjete licencnog ugovora
+# ^DontAcceptBtn
+&Ne prihvatam uvjete licencnog ugovora
+# ^InstallBtn
+&Instaliraj
+# ^UninstallBtn
+&Ukloni
+# ^CancelBtn
+Odustani
+# ^CloseBtn
+&Zatvori
+# ^BrowseBtn
+&Pregledaj...
+# ^ShowDetailsBtn
+Prikaži &detalje
+# ^ClickNext
+Pritisnite dugme 'Dalje' za nastavak.
+# ^ClickInstall
+Pritisnite dugme 'Instaliraj' za poèetak instalacije.
+# ^ClickUninstall
+Pritisnite dugme 'Ukloni' za poèetak uklanjanja.
+# ^Name
+Ime
+# ^Completed
+Završeno
+# ^LicenseText
+Molim proèitajte licencu prije instaliranja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite 'Prihvatam'.
+# ^LicenseTextCB
+Molim proèitajte licencu prije instaliranja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, oznaèite donji kvadratiæ. $_CLICK
+# ^LicenseTextRB
+Molim proèitajte licencu prije instaliranja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite prvu donju opciju. $_CLICK
+# ^UnLicenseText
+Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite 'Prihvatam'.
+# ^UnLicenseTextCB
+Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ako prihvatate sve uvjete ugovora, obilježite donji kvadratiæ. $_CLICK
+# ^UnLicenseTextRB
+Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvatate sve uvjete ugovora, odaberite prvu opciju ispod. $_CLICK
+# ^Custom
+Podešavanje
+# ^ComponentsText
+Oznaèite komponente koje želite instalirati. Instaliraju se samo oznaèene komponente. Uklonite oznaku sa onih koje ne želite instalirati. $_CLICK
+# ^ComponentsSubText1
+Izaberite tip instalacije:
+# ^ComponentsSubText2_NoInstTypes
+Odaberite komponente za instalaciju:
+# ^ComponentsSubText2
+Ili po izboru oznaèite komponente koje želite instalirati:
+# ^UnComponentsText
+Oznaèite komponente koje želite ukloniti. Uklonite oznaku sa onih koje ne želite ukloniti. $_CLICK
+# ^UnComponentsSubText1
+Izaberite tip uklanjanja:
+# ^UnComponentsSubText2_NoInstTypes
+Izaberite komponente za uklanjanje:
+# ^UnComponentsSubText2
+Ili po izboru odaberite komponente koje želite da uklonite:
+# ^DirText
+Program $(^NameDA) æe biti instaliran u sljedeæu mapu. Za instalaciju na neku drugu mapu odaberite 'Pregledaj...' i odaberite drugu mapu. $_CLICK
+# ^DirSubText
+Odredišna mapa
+# ^DirBrowseText
+Izaberite mapu u koju želite instalirati program $(^NameDA):
+# ^UnDirText
+Program $(^NameDA) æe biti uklonjen iz navedene mape. Za uklanjanje iz druge mape odaberite 'Pregledaj...' i oznaèite drugu mapu. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Izaberite mapu iz koje æete program $(^NameDA) ukloniti:
+# ^SpaceAvailable
+"Slobodno prostora na disku: "
+# ^SpaceRequired
+"Potrebno prostora na disku: "
+# ^UninstallingText
+Program $(^NameDA) æe biti uklonjen iz sljedeæe mape. $_CLICK
+# ^UninstallingSubText
+Uklanjanje iz:
+# ^FileError
+Greška prilikom otvaranja datoteke za upisivanje: \r\n\t"$0"\r\n\"Odustani\" za prekid instalacije,\r\n\"Ponovi\" za ponovni pokušaj upisivanja, ili\r\n\"Ignoriši\" za zanemarenje te datoteke
+# ^FileError_NoIgnore
+Greška prilikom otvaranja datoteke za upisivanje: \r\n\t"$0"\r\n\"Ponovi\" za ponovni pokušaj zapisivanja, ili\r\n\"Odustani\" za prekid instalacije
+# ^CantWrite
+"Nemoguæe upisati: "
+# ^CopyFailed
+Greška prilikom kopiranja
+# ^CopyTo
+"Kopiraj u "
+# ^Registering
+"Prijava: "
+# ^Unregistering
+"Odjava: "
+# ^SymbolNotFound
+"Nemoguæe naæi simbol: "
+# ^CouldNotLoad
+"Nemoguæe uèitavanje: "
+# ^CreateFolder
+"Napravi mapu: "
+# ^CreateShortcut
+"Napravi preèicu: "
+# ^CreatedUninstaller
+"Program za uklanjanje: "
+# ^Delete
+"Obriši datoteku: "
+# ^DeleteOnReboot
+"Obriši prilikom ponovnog pokretanja: "
+# ^ErrorCreatingShortcut
+"Greška prilikom kreiranja preèica: "
+# ^ErrorCreating
+"Greška prilikom kreiranja: "
+# ^ErrorDecompressing
+Greška prilikom otpakivanja podataka! Ošteæen instalacijski program?
+# ^ErrorRegistering
+Greška prilikom prijavljivanja DLLa
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Izvrši: "
+# ^Extract
+"Otpakuj: "
+# ^ErrorWriting
+"Otpakivanje: greška upisivanja u datoteku "
+# ^InvalidOpcode
+Ošteæena instalacijska datoteka: neispravna opkoda
+# ^NoOLE
+"Nema OLE za: "
+# ^OutputFolder
+"Izlazna mapa: "
+# ^RemoveFolder
+"Obriši mapu: "
+# ^RenameOnReboot
+"Preimenuj prilikom ponovnog startovanja: "
+# ^Rename
+"Preimenuj: "
+# ^Skipped
+"Preskoèeno: "
+# ^CopyDetails
+Kopiraj detalje na Klembord
+# ^LogInstall
+Logiraj zapisnik procesa instalacije
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
+
diff --git a/Contrib/Language files/Bosnian.nsh b/Contrib/Language files/Bosnian.nsh
index 0502b7e..dacfcf7 100755
--- a/Contrib/Language files/Bosnian.nsh
+++ b/Contrib/Language files/Bosnian.nsh
@@ -1,121 +1,121 @@
-;Language: Bosnian (5146)
-;By Salih Èavkiæ, cavkic@skynet.be
-
-!insertmacro LANGFILE "Bosnian" "Bosanski"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli u program za instalaciju $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ovaj program æe instalirati $(^NameDA) na Vaš sistem. $\r$\n$\r$\nPreporuèujemo da neizostavno zatvorite sve druge otvorene programe prije nego što definitivno zapoènete sa instaliranjem. To æe omoguæiti bolju nadogradnju odreðenih sistemskih datoteka bez potrebe da Vaš raèunar ponovo startujete. Instaliranje programa možete prekinuti pritiskom na dugme 'Odustani'.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli u postupak uklanjanja programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ovaj æe Vas vodiè provesti kroz postupak uklanjanja programa $(^NameDA).$\r$\n$\r$\nPrije samog poèetka, molim zatvorite program $(^NameDA) ukoliko je sluèajno otvoren.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licencni ugovor"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Molim proèitajte licencni ugovor $(^NameDA) prije instalacije programa."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ako prihvatate uslove licence, odaberite 'Prihvatam' za nastavak. Morate prihvatiti licencu za instalaciju programa $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate uslove licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate uslove licence, odaberite prvu donju opciju. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licencni ugovor o pravu korištenja"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Molim proèitajte licencu prije uklanjanja programa $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ako prihvatate uslove licence, odaberite 'Prihvatam' za nastavak. Morate prihvatiti licencu za uklanjanje programa $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate uslove licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate uslove licence, odaberite prvu donju opciju. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pritisnite 'Page Down' na tastaturi za ostatak licence."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponenti za instalaciju"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izaberite komponente programa $(^NameDA) koje želite instalirati."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponenti za uklanjanje"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izaberite komponente programa $(^NameDA) koje želite ukloniti."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite kursor od miša iznad komponente da biste vidjeli njezin opis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite kursor od miša iznad komponente da biste vidjeli njezin opis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Odaberite odredište za instalaciju"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Odaberite mapu u koju želite instalirati program $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izaberite polazište za uklanjanje"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Selektirajte mapu iz koje želite ukloniti program $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instaliranje"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Molim prièekajte na završetak instalacije programa $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Kraj instalacije"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacija je u potpunosti uspješno završila."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalacija je prekinuta"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacija nije završila uspješno."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uklanjanje"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Molim Vas prièekajte da vodiè završi uklanjanje $(^NameDA) programa."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uklanjanje je završeno"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uklanjanje je u potpunosti završilo uspješno."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uklanjanje je prekinuto"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uklanjanje nije završilo uspješno."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dovršavanje instalacije programa $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) je instaliran na Vaše raèunar.$\r$\n$\r$\nPritisnite dugme 'Kraj' za završetak."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Raèunar treba ponovno startovati za dovršavanje instalacije programa $(^NameDA). Želite li to uèiniti sada?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Završetak uklanjanja programa $(^NameDA) sa Vašeg sistema."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) je uklonjen sa Vašeg raèunara.$\r$\n$\r$\nPritisnite dugme 'Kraj' za zatvaranje ovog prozora."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Vaš raèunar trebate ponovno startovati da dovršite uklanjanje programa $(^NameDA). Želite li da odmah sad ponovo startujete raèunar?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Startuj raèunar odmah sad"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ponovno æu pokrenuti raèunar kasnije"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Pokreni program $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Prikaži datoteku &Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Kraj"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izbor mape u Start meniju"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izaberite ime za programsku mapu unutar Start menija."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izaberite jednu mapu u Start meniju u kojoj želite da se kreiraju preèice programa. Možete takoðer unijeti ime za novu mapu ili selektirati veæ postojeæu."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nemojte praviti preèice"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uklanjanje programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Program $(^NameDA) æe biti uklonjen sa Vašeg raèunara."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti instalaciju programa $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti uklanjanje $(^Name) programa?"
-!endif
+;Language: Bosnian (5146)
+;By Salih Èavkiæ, cavkic@skynet.be
+
+!insertmacro LANGFILE "Bosnian" "Bosanski"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli u program za instalaciju $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ovaj program æe instalirati $(^NameDA) na Vaš sistem. $\r$\n$\r$\nPreporuèujemo da neizostavno zatvorite sve druge otvorene programe prije nego što definitivno zapoènete sa instaliranjem. To æe omoguæiti bolju nadogradnju odreðenih sistemskih datoteka bez potrebe da Vaš raèunar ponovo startujete. Instaliranje programa možete prekinuti pritiskom na dugme 'Odustani'.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli u postupak uklanjanja programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ovaj æe Vas vodiè provesti kroz postupak uklanjanja programa $(^NameDA).$\r$\n$\r$\nPrije samog poèetka, molim zatvorite program $(^NameDA) ukoliko je sluèajno otvoren.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licencni ugovor"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Molim proèitajte licencni ugovor $(^NameDA) prije instalacije programa."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ako prihvatate uslove licence, odaberite 'Prihvatam' za nastavak. Morate prihvatiti licencu za instalaciju programa $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate uslove licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate uslove licence, odaberite prvu donju opciju. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licencni ugovor o pravu korištenja"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Molim proèitajte licencu prije uklanjanja programa $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ako prihvatate uslove licence, odaberite 'Prihvatam' za nastavak. Morate prihvatiti licencu za uklanjanje programa $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate uslove licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate uslove licence, odaberite prvu donju opciju. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pritisnite 'Page Down' na tastaturi za ostatak licence."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponenti za instalaciju"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izaberite komponente programa $(^NameDA) koje želite instalirati."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponenti za uklanjanje"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izaberite komponente programa $(^NameDA) koje želite ukloniti."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite kursor od miša iznad komponente da biste vidjeli njezin opis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite kursor od miša iznad komponente da biste vidjeli njezin opis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Odaberite odredište za instalaciju"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Odaberite mapu u koju želite instalirati program $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izaberite polazište za uklanjanje"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Selektirajte mapu iz koje želite ukloniti program $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instaliranje"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Molim prièekajte na završetak instalacije programa $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Kraj instalacije"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacija je u potpunosti uspješno završila."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalacija je prekinuta"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacija nije završila uspješno."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uklanjanje"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Molim Vas prièekajte da vodiè završi uklanjanje $(^NameDA) programa."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uklanjanje je završeno"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uklanjanje je u potpunosti završilo uspješno."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uklanjanje je prekinuto"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uklanjanje nije završilo uspješno."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dovršavanje instalacije programa $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) je instaliran na Vaše raèunar.$\r$\n$\r$\nPritisnite dugme 'Kraj' za završetak."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Raèunar treba ponovno startovati za dovršavanje instalacije programa $(^NameDA). Želite li to uèiniti sada?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Završetak uklanjanja programa $(^NameDA) sa Vašeg sistema."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) je uklonjen sa Vašeg raèunara.$\r$\n$\r$\nPritisnite dugme 'Kraj' za zatvaranje ovog prozora."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Vaš raèunar trebate ponovno startovati da dovršite uklanjanje programa $(^NameDA). Želite li da odmah sad ponovo startujete raèunar?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Startuj raèunar odmah sad"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ponovno æu pokrenuti raèunar kasnije"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Pokreni program $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Prikaži datoteku &Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Kraj"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izbor mape u Start meniju"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izaberite ime za programsku mapu unutar Start menija."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izaberite jednu mapu u Start meniju u kojoj želite da se kreiraju preèice programa. Možete takoðer unijeti ime za novu mapu ili selektirati veæ postojeæu."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nemojte praviti preèice"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uklanjanje programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Program $(^NameDA) æe biti uklonjen sa Vašeg raèunara."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti instalaciju programa $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti uklanjanje $(^Name) programa?"
+!endif
diff --git a/Contrib/Language files/Breton.nlf b/Contrib/Language files/Breton.nlf
index 2d0e545..fcfaf33 100755
--- a/Contrib/Language files/Breton.nlf
+++ b/Contrib/Language files/Breton.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1150
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by KAD-Korvigelloù an Drouizig (drouizig@drouizig.org)
-# ^Branding
-Reizhiad staliañ Nullsoft %s
-# ^SetupCaption
-Staliañ ha kefluniañ $(^Name)
-# ^UninstallCaption
-Distaliañ $(^Name)
-# ^LicenseSubCaption
-: Aotre arverañ
-# ^ComponentsSubCaption
-: Dibaboù staliañ
-# ^DirSubCaption
-: Kavlec'h staliañ
-# ^InstallingSubCaption
-: O staliañ ar restroù
-# ^CompletedSubCaption
-: Echu eo
-# ^UnComponentsSubCaption
-: Dibaboù distaliañ
-# ^UnDirSubCaption
-: Kavlec'h distaliañ
-# ^ConfirmSubCaption
-: Kadarnañ
-# ^UninstallingSubCaption
-: O tistaliañ ar restroù
-# ^UnCompletedSubCaption
-: Echu eo
-# ^BackBtn
-< &Kent
-# ^NextBtn
-&War-lerc'h >
-# ^AgreeBtn
-&A-du emaon
-# ^AcceptBtn
-&Degemer holl dermoù al lañvaz emglev
-# ^DontAcceptBtn
-&Chom hep degemer termoù al lañvaz emglev
-# ^InstallBtn
-&Staliañ
-# ^UninstallBtn
-&Distaliañ
-# ^CancelBtn
-Nullañ
-# ^CloseBtn
-&Serriñ
-# ^BrowseBtn
-F&urchal...
-# ^ShowDetailsBtn
-Muioc'h a &ditouroù
-# ^ClickNext
-Klikit war « War-lerc'h » evit mont war-raok.
-# ^ClickInstall
-Klikit war « Staliañ » evit kregiñ gant ar staliadur.
-# ^ClickUninstall
-Klikit war « Distaliañ » evit kregiñ gant an distaliadur.
-# ^Name
-Anv
-# ^Completed
-Echu eo
-# ^LicenseText
-Bezit aketus en ur lenn an aotre arverañ a-raok staliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war « A-du emaon ».
-# ^LicenseTextCB
-Bezit aketus en ur lenn an aotre arverañ a-raok staliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war al log a-zindan. $_CLICK
-# ^LicenseTextRB
-Bezit aketus en ur lenn an aotre arverañ a-raok staliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, dizuzit an dibab kentañ a-zindan. $_CLICK
-# ^UnLicenseText
-Bezit aketus en ur lenn an aotre arverañ a-raok distaliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war « A-du emaon ».
-# ^UnLicenseTextCB
-Bezit aketus en ur lenn an aotre arverañ a-raok distaliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war al log a-zindan. $_CLICK
-# ^UnLicenseTextRB
-Bezit aketus en ur lenn an aotre arverañ a-raok distaliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, diuzit an dibab kentañ a-zindan. $_CLICK
-# ^Custom
-Diouzh ho kiz
-# ^ComponentsText
-Dibabit an elfennoù a fell deoc'h staliañ pe diziuzit an elfennoù a fell deoc'h leuskel a-gostez. $_CLICK
-# ^ComponentsSubText1
-Dibabit pe seurt staliañ a vo :
-# ^ComponentsSubText2_NoInstTypes
-Dibabit an elfennoù da staliañ :
-# ^ComponentsSubText2
-Pe dibabit an elfennoù diret a fell deoc'h staliañ :
-# ^UnComponentsText
-Dibabit an elfennoù a fell deoc'h distaliañ pe diziuzit an elfennoù a fell deoc'h mirout. $_CLICK
-# ^UnComponentsSubText1
-Dibabit peseurt distaliañ a vo :
-# ^UnComponentsSubText2_NoInstTypes
-Dibabit an elfennoù da zistaliañ :
-# ^UnComponentsSubText2
-Pe dibabit an elfennoù diret a fell deoc'h distaliañ :
-# ^DirText
-Staliet e vo $(^NameDA) gant ar goulev-mañ er c'havlec'h da-heul. Mar fell deoc'h dibab ur c'havlec'h all, klikit war « Furchal » ha dibabit ur c'havlec'h all. $_CLICK
-# ^DirSubText
-Kavlec'h bukenn
-# ^DirBrowseText
-Dibabit ar c'havlec'h e vo diazezet $(^NameDA) ennañ :
-# ^UnDirText
-Distaliet e vo $(^NameDA) gant ar goulev-mañ adalek ar c'havlec'h da heul. Ma fell deoc'h distaliañ adalek ur c'havlec'h all, klikit war « Furchal » ha diuzit ur c'havlec'h all. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Diuzit ar c'havlec'h evit distaliañ $(^NameDA) adalek :
-# ^SpaceAvailable
-"Egor kantenn vak : "
-# ^SpaceRequired
-"Egor kantenn rekis : "
-# ^UninstallingText
-Distaliet e vo $(^NameDA) adalek ar c'havelec'h da-heul. $_CLICK
-# ^UninstallingSubText
-Distaliañ adalek :
-# ^FileError
-Fazi en ur zigeriñ ur restr evit skrivañ : \r\n\r\n$0\r\n\r\nKlikit war « Paouez » evit paouez gant ar staliañ,\r\n« Adober » evit eseañ en-dro, pe\r\n« Tremen » evit leuskel a-gostez ar restr-mañ.
-# ^FileError_NoIgnore
-Fazi en ur zigeriñ ur restr a-benn skrivañ : \r\n\r\n$0\r\n\r\nKlikit war « Adober » evit esaeañ en-dro, pe\r\nwar « Nullañ » evit paouez gant ar staliañ.
-# ^CantWrite
-"N'haller ket skrivañ : "
-# ^CopyFailed
-Kopiañ faziet
-# ^CopyTo
-"Kopiañ da "
-# ^Registering
-"Oc'h enskrivañ : "
-# ^Unregistering
-"O tienskrivañ : "
-# ^SymbolNotFound
-"N'haller ket kavout ur simbolenn : "
-# ^CouldNotLoad
-"N'haller ket kargañ : "
-# ^CreateFolder
-"Krouiñ kavlec'h : "
-# ^CreateShortcut
-"Krouiñ berradenn : "
-# ^CreatedUninstaller
-"Skoazeller distaliañ krouet : "
-# ^Delete
-"Dilemel restr : "
-# ^DeleteOnReboot
-"Dilemel en ur adloc'hañ : "
-# ^ErrorCreatingShortcut
-"Fazi en ur grouiñ berradenn : "
-# ^ErrorCreating
-"Fazi en ur grouiñ : "
-# ^ErrorDecompressing
-Fazi en ur ziwaskañ stlenn ! Skoazeller staliañ gwastet ?
-# ^ErrorRegistering
-Fazi en ur enskrivañ an DLL
-# ^ExecShell
-"ExecShell : "
-# ^Exec
-"Lañsañ : "
-# ^Extract
-"Eztennañ : "
-# ^ErrorWriting
-"Eztennañ : fazi en ur skrivañ restr "
-# ^InvalidOpcode
-Skoazeller staliañ gwastet : opcode direizh
-# ^NoOLE
-"OLE ebet evit : "
-# ^OutputFolder
-"Kavlec'h ec'hank : "
-# ^RemoveFolder
-"Dilemel ar c'havlec'h : "
-# ^RenameOnReboot
-"Adenvel pa vez adloc'het : "
-# ^Rename
-"Adenvel : "
-# ^Skipped
-"Laosket a-gostez: "
-# ^CopyDetails
-Kopiañ ar munudoù er golver
-# ^LogInstall
-Tresañ an argerzh staliañ
-# ^Byte
-E
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1150
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by KAD-Korvigelloù an Drouizig (drouizig@drouizig.org)
+# ^Branding
+Reizhiad staliañ Nullsoft %s
+# ^SetupCaption
+Staliañ ha kefluniañ $(^Name)
+# ^UninstallCaption
+Distaliañ $(^Name)
+# ^LicenseSubCaption
+: Aotre arverañ
+# ^ComponentsSubCaption
+: Dibaboù staliañ
+# ^DirSubCaption
+: Kavlec'h staliañ
+# ^InstallingSubCaption
+: O staliañ ar restroù
+# ^CompletedSubCaption
+: Echu eo
+# ^UnComponentsSubCaption
+: Dibaboù distaliañ
+# ^UnDirSubCaption
+: Kavlec'h distaliañ
+# ^ConfirmSubCaption
+: Kadarnañ
+# ^UninstallingSubCaption
+: O tistaliañ ar restroù
+# ^UnCompletedSubCaption
+: Echu eo
+# ^BackBtn
+< &Kent
+# ^NextBtn
+&War-lerc'h >
+# ^AgreeBtn
+&A-du emaon
+# ^AcceptBtn
+&Degemer holl dermoù al lañvaz emglev
+# ^DontAcceptBtn
+&Chom hep degemer termoù al lañvaz emglev
+# ^InstallBtn
+&Staliañ
+# ^UninstallBtn
+&Distaliañ
+# ^CancelBtn
+Nullañ
+# ^CloseBtn
+&Serriñ
+# ^BrowseBtn
+F&urchal...
+# ^ShowDetailsBtn
+Muioc'h a &ditouroù
+# ^ClickNext
+Klikit war « War-lerc'h » evit mont war-raok.
+# ^ClickInstall
+Klikit war « Staliañ » evit kregiñ gant ar staliadur.
+# ^ClickUninstall
+Klikit war « Distaliañ » evit kregiñ gant an distaliadur.
+# ^Name
+Anv
+# ^Completed
+Echu eo
+# ^LicenseText
+Bezit aketus en ur lenn an aotre arverañ a-raok staliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war « A-du emaon ».
+# ^LicenseTextCB
+Bezit aketus en ur lenn an aotre arverañ a-raok staliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war al log a-zindan. $_CLICK
+# ^LicenseTextRB
+Bezit aketus en ur lenn an aotre arverañ a-raok staliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, dizuzit an dibab kentañ a-zindan. $_CLICK
+# ^UnLicenseText
+Bezit aketus en ur lenn an aotre arverañ a-raok distaliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war « A-du emaon ».
+# ^UnLicenseTextCB
+Bezit aketus en ur lenn an aotre arverañ a-raok distaliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, klikit war al log a-zindan. $_CLICK
+# ^UnLicenseTextRB
+Bezit aketus en ur lenn an aotre arverañ a-raok distaliañ $(^NameDA) mar plij. Mar degemerit pep term eus an aotre, diuzit an dibab kentañ a-zindan. $_CLICK
+# ^Custom
+Diouzh ho kiz
+# ^ComponentsText
+Dibabit an elfennoù a fell deoc'h staliañ pe diziuzit an elfennoù a fell deoc'h leuskel a-gostez. $_CLICK
+# ^ComponentsSubText1
+Dibabit pe seurt staliañ a vo :
+# ^ComponentsSubText2_NoInstTypes
+Dibabit an elfennoù da staliañ :
+# ^ComponentsSubText2
+Pe dibabit an elfennoù diret a fell deoc'h staliañ :
+# ^UnComponentsText
+Dibabit an elfennoù a fell deoc'h distaliañ pe diziuzit an elfennoù a fell deoc'h mirout. $_CLICK
+# ^UnComponentsSubText1
+Dibabit peseurt distaliañ a vo :
+# ^UnComponentsSubText2_NoInstTypes
+Dibabit an elfennoù da zistaliañ :
+# ^UnComponentsSubText2
+Pe dibabit an elfennoù diret a fell deoc'h distaliañ :
+# ^DirText
+Staliet e vo $(^NameDA) gant ar goulev-mañ er c'havlec'h da-heul. Mar fell deoc'h dibab ur c'havlec'h all, klikit war « Furchal » ha dibabit ur c'havlec'h all. $_CLICK
+# ^DirSubText
+Kavlec'h bukenn
+# ^DirBrowseText
+Dibabit ar c'havlec'h e vo diazezet $(^NameDA) ennañ :
+# ^UnDirText
+Distaliet e vo $(^NameDA) gant ar goulev-mañ adalek ar c'havlec'h da heul. Ma fell deoc'h distaliañ adalek ur c'havlec'h all, klikit war « Furchal » ha diuzit ur c'havlec'h all. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Diuzit ar c'havlec'h evit distaliañ $(^NameDA) adalek :
+# ^SpaceAvailable
+"Egor kantenn vak : "
+# ^SpaceRequired
+"Egor kantenn rekis : "
+# ^UninstallingText
+Distaliet e vo $(^NameDA) adalek ar c'havelec'h da-heul. $_CLICK
+# ^UninstallingSubText
+Distaliañ adalek :
+# ^FileError
+Fazi en ur zigeriñ ur restr evit skrivañ : \r\n\r\n$0\r\n\r\nKlikit war « Paouez » evit paouez gant ar staliañ,\r\n« Adober » evit eseañ en-dro, pe\r\n« Tremen » evit leuskel a-gostez ar restr-mañ.
+# ^FileError_NoIgnore
+Fazi en ur zigeriñ ur restr a-benn skrivañ : \r\n\r\n$0\r\n\r\nKlikit war « Adober » evit esaeañ en-dro, pe\r\nwar « Nullañ » evit paouez gant ar staliañ.
+# ^CantWrite
+"N'haller ket skrivañ : "
+# ^CopyFailed
+Kopiañ faziet
+# ^CopyTo
+"Kopiañ da "
+# ^Registering
+"Oc'h enskrivañ : "
+# ^Unregistering
+"O tienskrivañ : "
+# ^SymbolNotFound
+"N'haller ket kavout ur simbolenn : "
+# ^CouldNotLoad
+"N'haller ket kargañ : "
+# ^CreateFolder
+"Krouiñ kavlec'h : "
+# ^CreateShortcut
+"Krouiñ berradenn : "
+# ^CreatedUninstaller
+"Skoazeller distaliañ krouet : "
+# ^Delete
+"Dilemel restr : "
+# ^DeleteOnReboot
+"Dilemel en ur adloc'hañ : "
+# ^ErrorCreatingShortcut
+"Fazi en ur grouiñ berradenn : "
+# ^ErrorCreating
+"Fazi en ur grouiñ : "
+# ^ErrorDecompressing
+Fazi en ur ziwaskañ stlenn ! Skoazeller staliañ gwastet ?
+# ^ErrorRegistering
+Fazi en ur enskrivañ an DLL
+# ^ExecShell
+"ExecShell : "
+# ^Exec
+"Lañsañ : "
+# ^Extract
+"Eztennañ : "
+# ^ErrorWriting
+"Eztennañ : fazi en ur skrivañ restr "
+# ^InvalidOpcode
+Skoazeller staliañ gwastet : opcode direizh
+# ^NoOLE
+"OLE ebet evit : "
+# ^OutputFolder
+"Kavlec'h ec'hank : "
+# ^RemoveFolder
+"Dilemel ar c'havlec'h : "
+# ^RenameOnReboot
+"Adenvel pa vez adloc'het : "
+# ^Rename
+"Adenvel : "
+# ^Skipped
+"Laosket a-gostez: "
+# ^CopyDetails
+Kopiañ ar munudoù er golver
+# ^LogInstall
+Tresañ an argerzh staliañ
+# ^Byte
+E
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Breton.nsh b/Contrib/Language files/Breton.nsh
index 3d57272..79d3f81 100755
--- a/Contrib/Language files/Breton.nsh
+++ b/Contrib/Language files/Breton.nsh
@@ -1,121 +1,121 @@
-;Language: Breton (1150)
-;By KAD-Korvigelloù An Drouizig
-
-!insertmacro LANGFILE "Breton" "Brezhoneg"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Degemer mat e skoazeller staliañ $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Sturiet e viot gant ar skoazeller-mañ evit staliañ $(^NameDA).$\r$\n$\r$\nGwelloc'h eo serriñ pep arload oberiant er reizhiad a-raok mont pelloc'h gant ar skoazeller-mañ. Evel-se e c'heller nevesaat ar restroù reizhiad hep rankout adloc'hañ hoc'h urzhiataer.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Degemer mat er skoazeller distaliañ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Sturiet e viot gant ar skoazeller-mañ a-benn distaliañ $(^NameDA).$\r$\n$\r$\nEn em asurit n'eo ket lañset $(^NameDA) a-raok mont pelloc'h gant an distaliañ.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lañvaz emglev"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Bezit aketus en ur lenn pep term eus al lañvaz a-raok staliañ $(^NameDA), mar plij."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Mar degemerit pep term eus al lañvaz, klikit war « War-lerc'h ». Ret eo deoc'h degemer al lañvaz evit staliañ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Mar degemerit pep term eus al lañvaz, klikit war al log a-zindan. Ret eo deoc'h degemer al lañvaz a-benn staliañ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Mar degemerit pep term eus al lañvaz, diuzit an dibab kentañ a-zindan. Ret eo deoc'h degemer al lañvaz a-benn staliañ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lañvaz emglev"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Trugarez da lenn al lañvaz a-raok distaliañ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Mar degemerit pep term eus al lañvaz, klikit war « A-du emaon » evit kenderc'hel. Ret eo deoc'h degemer al lañvaz evit distaliañ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Mar degemerit pep term eus al lañvaz, klikit war al log a-zindan. Ret eo deoc'h degemer al lañvaz evit distaliañ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Mar degemerit pep term eus al lañvaz, dizuit an dibab kentañ a-zindan. Ret eo deoc'h degemer al lañvaz evit distaliañ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pouezit war « Pajenn a-raok » evit lenn ar pajennoù eus al lañvaz da-heul."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Dibab elfennoù"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Dibabit pe elfenn(où) $(^NameDA) a fell deoc'h staliañ."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Deskrivadenn"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Dibabit elfennoù"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Dibabit pe elfenn(où) $(^NameDA) a fell deoc'h distaliañ."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Lakait ho logodenn a-zioc'h an elfenn evit gwelout he deskrivadenn."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Lakait ho logodenn a-zioc'h an elfenn evit gwelout he deskrivadenn."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Dibabit al lec'hiadur staliañ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Dibabit ar c'havlec'h ma vo lakaet $(^NameDA) ennañ."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Dibabit al lec'hiadur distaliañ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Dibabit ar c'havlec'h e vo dilamet $(^NameDA) dioutañ."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "O staliañ"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Gortozit mar plij, emañ $(^NameDA) o vezañ staliet."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Echu eo gant ar staliañ"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Kaset eo bet da benn mat ar staliañ."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Staliañ paouezet"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "N'eo ket bet kaset da benn mat ar staliañ."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "O tistaliañ"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Gortozit mar plij, emañ $(^NameDA) o vezañ distaliet."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Echu eo gant an distaliañ"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Gant berzh eo bet kaset da benn an distaliañ."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Distaliañ paouezet"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "N'eo ket bet kaset da benn mat an distaliañ."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Oc'h echuiñ staliañ $(^NameDA) gant ar skoazeller"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Staliet eo bet $(^NameDA) war hoc'h urzhiataer.$\r$\n$\r$\nKlikit war « Echuiñ » evit serriñ ar skoazeller-mañ."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ret eo hoc'h urzhiataer bezañ adloc'het evit ma vez kaset da benn staliañ $(^NameDA). Ha fellout a ra deoc'h adloc'hañ diouzhtu ?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Oc'h echuiñ distaliañ $(^NameDA) gant ar skoazeller"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Distaliet eo bet $(^NameDA) diouzh hoc'h urzhiataer.$\r$\n$\r$\nKlikit war « Echuiñ » evit serriñ ar skoazeller-mañ."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ret eo hoc'h urzhiataer bezañ adloc'het evit ma vez kaset da benn distaliañ $(^NameDA). Ha fellout a ra deoc'h adloc'hañ diouzhtu ?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Adloc'hañ diouzhtu"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Fellout a ra din adloc'hañ diwezatoc'h dre zorn"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Lañsañ $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Diskouez ar restr Malennit"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Echuiñ"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Diskouez kavlec'h al Lañser loc'hañ"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Dibabit ur c'havlec'h Lañser loc'hañ evit berradennoù $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Diuzit ar c'havlec'h Lañser loc'hañ e vo savet ennañ berradennoù ar goulevioù. Gallout a rit ingal reiñ un anv evit sevel ur c'havlec'h nevez."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Chom hep sevel berradennoù"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Distaliañ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Dilemel $(^NameDA) adalek hoc'h urzhiataer."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ha sur oc'h e fell deoc'h kuitaat staliañ $(^Name) ?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ha sur oc'h e fell deoc'h kuitaat distaliañ $(^Name) ?"
-!endif
+;Language: Breton (1150)
+;By KAD-Korvigelloù An Drouizig
+
+!insertmacro LANGFILE "Breton" "Brezhoneg"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Degemer mat e skoazeller staliañ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Sturiet e viot gant ar skoazeller-mañ evit staliañ $(^NameDA).$\r$\n$\r$\nGwelloc'h eo serriñ pep arload oberiant er reizhiad a-raok mont pelloc'h gant ar skoazeller-mañ. Evel-se e c'heller nevesaat ar restroù reizhiad hep rankout adloc'hañ hoc'h urzhiataer.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Degemer mat er skoazeller distaliañ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Sturiet e viot gant ar skoazeller-mañ a-benn distaliañ $(^NameDA).$\r$\n$\r$\nEn em asurit n'eo ket lañset $(^NameDA) a-raok mont pelloc'h gant an distaliañ.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lañvaz emglev"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Bezit aketus en ur lenn pep term eus al lañvaz a-raok staliañ $(^NameDA), mar plij."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Mar degemerit pep term eus al lañvaz, klikit war « War-lerc'h ». Ret eo deoc'h degemer al lañvaz evit staliañ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Mar degemerit pep term eus al lañvaz, klikit war al log a-zindan. Ret eo deoc'h degemer al lañvaz a-benn staliañ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Mar degemerit pep term eus al lañvaz, diuzit an dibab kentañ a-zindan. Ret eo deoc'h degemer al lañvaz a-benn staliañ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lañvaz emglev"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Trugarez da lenn al lañvaz a-raok distaliañ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Mar degemerit pep term eus al lañvaz, klikit war « A-du emaon » evit kenderc'hel. Ret eo deoc'h degemer al lañvaz evit distaliañ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Mar degemerit pep term eus al lañvaz, klikit war al log a-zindan. Ret eo deoc'h degemer al lañvaz evit distaliañ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Mar degemerit pep term eus al lañvaz, dizuit an dibab kentañ a-zindan. Ret eo deoc'h degemer al lañvaz evit distaliañ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pouezit war « Pajenn a-raok » evit lenn ar pajennoù eus al lañvaz da-heul."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Dibab elfennoù"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Dibabit pe elfenn(où) $(^NameDA) a fell deoc'h staliañ."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Deskrivadenn"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Dibabit elfennoù"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Dibabit pe elfenn(où) $(^NameDA) a fell deoc'h distaliañ."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Lakait ho logodenn a-zioc'h an elfenn evit gwelout he deskrivadenn."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Lakait ho logodenn a-zioc'h an elfenn evit gwelout he deskrivadenn."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Dibabit al lec'hiadur staliañ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Dibabit ar c'havlec'h ma vo lakaet $(^NameDA) ennañ."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Dibabit al lec'hiadur distaliañ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Dibabit ar c'havlec'h e vo dilamet $(^NameDA) dioutañ."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "O staliañ"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Gortozit mar plij, emañ $(^NameDA) o vezañ staliet."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Echu eo gant ar staliañ"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Kaset eo bet da benn mat ar staliañ."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Staliañ paouezet"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "N'eo ket bet kaset da benn mat ar staliañ."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "O tistaliañ"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Gortozit mar plij, emañ $(^NameDA) o vezañ distaliet."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Echu eo gant an distaliañ"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Gant berzh eo bet kaset da benn an distaliañ."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Distaliañ paouezet"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "N'eo ket bet kaset da benn mat an distaliañ."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Oc'h echuiñ staliañ $(^NameDA) gant ar skoazeller"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Staliet eo bet $(^NameDA) war hoc'h urzhiataer.$\r$\n$\r$\nKlikit war « Echuiñ » evit serriñ ar skoazeller-mañ."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ret eo hoc'h urzhiataer bezañ adloc'het evit ma vez kaset da benn staliañ $(^NameDA). Ha fellout a ra deoc'h adloc'hañ diouzhtu ?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Oc'h echuiñ distaliañ $(^NameDA) gant ar skoazeller"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Distaliet eo bet $(^NameDA) diouzh hoc'h urzhiataer.$\r$\n$\r$\nKlikit war « Echuiñ » evit serriñ ar skoazeller-mañ."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ret eo hoc'h urzhiataer bezañ adloc'het evit ma vez kaset da benn distaliañ $(^NameDA). Ha fellout a ra deoc'h adloc'hañ diouzhtu ?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Adloc'hañ diouzhtu"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Fellout a ra din adloc'hañ diwezatoc'h dre zorn"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Lañsañ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Diskouez ar restr Malennit"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Echuiñ"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Diskouez kavlec'h al Lañser loc'hañ"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Dibabit ur c'havlec'h Lañser loc'hañ evit berradennoù $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Diuzit ar c'havlec'h Lañser loc'hañ e vo savet ennañ berradennoù ar goulevioù. Gallout a rit ingal reiñ un anv evit sevel ur c'havlec'h nevez."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Chom hep sevel berradennoù"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Distaliañ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Dilemel $(^NameDA) adalek hoc'h urzhiataer."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ha sur oc'h e fell deoc'h kuitaat staliañ $(^Name) ?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ha sur oc'h e fell deoc'h kuitaat distaliañ $(^Name) ?"
+!endif
diff --git a/Contrib/Language files/Bulgarian.nlf b/Contrib/Language files/Bulgarian.nlf
index ab266ae..a99c3bd 100755
--- a/Contrib/Language files/Bulgarian.nlf
+++ b/Contrib/Language files/Bulgarian.nlf
@@ -1,194 +1,194 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1026
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Asparouh Kalyandjiev <acnapyx@computers.bg>
-# Updated v2 to v6 by Plamen Penkov <plamen71@hotmail.com>
-# Updated by Êèðèë Êèðèëîâ (DumpeR)<dumper@data.bg>
-#
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Èíñòàëèðàíå íà $(^Name)
-# ^UninstallCaption
-Èçòðèâàíå íà $(^Name)
-#^LicenseSubCaption
-: Ëèöåíçèîííî ñïîðàçóìåíèå
-#^ComponentsSubCaption
-: Îïöèè çà èíñòàëèðàíå
-# ^DirSubCaption
-: Èíñòàëèðàíå â ïàïêà
-#^InstallingSubCaption
-: Èíñòàëèðàíå
-#^CompletedSubCaption
-: Çàâúðøâàíå
-# ^UnComponentsSubCaption
-: Îïöèè çà èçòðèâàíå
-# ^UnDirSubCaption
-: Èçòðèâàíå îò ïàïêà
-# ^ConfirmSubCaption
-: Ïîòâúðæäåíèå
-#^UninstallingSubCaption
-: Èçòðèâàíå
-#^UnCompletedSubCaption
-: Çàâúðøâàíå
-# ^BackBtn
-< &Íàçàä
-#^NextBtn
-Í&àïðåä >
-# ^AgreeBtn
-&Ñúãëàñåí
-# ^AcceptBtn
-&Ñúãëàñåí ñúì ñ óñëîâèÿòà íà Ëèöåíçèîííîòî ñïîðàçóìåíèå.
-# ^DontAcceptBtn
-&Íå ñúì ñúãëàñåí ñ óñëîâèÿòà íà Ëèöåíçèîííîòî ñïîðàçóìåíèå.
-# ^InstallBtn
-&Èíñòàëèðàé
-#^UninstallBtn
-&Èçòðèé
-# ^CancelBtn
-&Îòêàç
-#^CloseBtn
-&Çàòâîðè
-#^BrowseBtn
-Ï&ðåãëåä...
-#^ShowDetailsBtn
-&Äåòàéëè
-# ^ClickNext
-Íàòèñíåòå "Íàïðåä", çà äà ïðîäúëæèòå.
-# ^ClickInstall
-Íàòèñíåòå "Èíñòàëèðàé", çà äà çàïî÷íå èíñòàëèðàíåòî.
-# ^ClickUninstall
-Íàòèñíåòå "Èçòðèé", çà äà çàïî÷íå èçòðèâàíåòî.
-# ^Name
-Èìå
-#^Completed
-Êðàé
-# ^LicenseText
-Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èíñòàëèðàòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, íàòèñíåòå "Ñúãëàñåí".
-# ^LicenseTextCB
-Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èíñòàëèðàòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. $_CLICK
-# ^LicenseTextRB
-Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èíñòàëèðàòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. $_CLICK
-# ^UnLicenseText
-Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èçòðèåòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, íàòèñíåòå "Ñúãëàñåí".
-# ^UnLicenseTextCB
-Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èçòðèåòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. $_CLICK
-# ^UnLicenseTextRB
-Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èçòðèåòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. $_CLICK
-# ^Custom
-Èíñòàëèðàíå ïî èçáîð
-#^ComponentsText
-Èçáåðåòå êîìïîíåíòèòå, êîèòî èñêàòå äà áúäàò èíñòàëèðàíè. $_CLICK
-#^ComponentsSubText1
-Èçáåðåòå òèï èíñòàëèðàíå:
-#^ComponentsSubText2_NoInstTypes
-Èçáåðåòå êîìïîíåíòè:
-#^ComponentsSubText2
-Èëè èçáåðåòå êîìïîíåíòèòå, êîèòî èñêàòå äà áúäàò èíñòàëèðàíè:
-# ^UnComponentsText
-Ñëîæåòå îòìåòêà ïðåä êîìïîíåíòèòå, êîèòî èñêàòå äà èçòðèåòå, à òåçè êîèòî íå èñêàòå äà èçòðèåòå îñòàâåòå áåç îòìåòêà. $_CLICK
-# ^UnComponentsSubText1
-Èçáåðåòå òèïà íà èçòðèâàíå:
-# ^UnComponentsSubText2_NoInstTypes
-Èçáåðåòå êîìïîíåíòèòå çà èçòðèâàíå:
-# ^UnComponentsSubText2
-Èëè, èçáåðåòå äîïúëíèòåëíè êîìïîíåíòè çà èçòðèâàíå:
-# ^DirText
-Ïðîãðàìàòà ùå èíñòàëèðà $(^NameDA) â ïîñî÷åíàòà ïàïêà. Çà äà èíñòàëèðàòå â äðóãà ïàïêà, íàòèñíåòå "Ïðåãëåä" è èçáåðåòå äðóãà ïàïêà. $_CLICK
-# ^DirSubText
-Öåëåâà ïàïêà
-# ^DirBrowseText
-Èçáåðåòå ïàïêà, â êîÿòî äà ñå èíñòàëèðà $(^NameDA):
-# ^UnDirText
-Ïðîãðàìàòà ùå èçòðèå $(^NameDA) îò ñëåäíàòà ïàïêà. Çà äà èçòðèåòå îò äðóãà ïàïêà, íàòèñíåòå "Ïðåãëåä" è èçáåðåòå äðóãà ïàïêà. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Èçáåðåòå ïàïêàòà îò êîÿòî äà ñå èçòðèå $(^NameDA):
-# ^SpaceAvailable
-"Ñâîáîäíî ïðîñòðàíñòâî: "
-#^SpaceRequired
-"Íåîáõîäèìî ïðîñòðàíñòâî: "
-# ^UninstallingText
-$(^NameDA) ùå áúäå èçòðèòà îò ñëåäíàòà ïàïêà. $_CLICK
-# ^UninstallingSubText
-Èçòðèâàíå îò:
-# ^FileError
-Ãðåøêà ïðè îòâàðÿíå íà ôàéëà çà çàïèñ: \r\n\t"$0"\r\nÍàòèñíåòå "Ïðåêðàòè", çà äà ïðåêðàòèòå èíñòàëèðàíåòî, "Ïîâòîðè", çà äà îïèòàòå îòíîâî èëè "Èãíîðèðàé", çà äà ïðîïóñíåòå òîçè ôàéë
-# ^FileError_NoIgnore
-Ãðåøêà ïðè îòâàðÿíå íà ôàéëà çà çàïèñ: \r\n\t"$0"\r\nÍàòèñíåòå "Ïîâòîðè", çà äà îïèòàòå îòíîâî èëè "Ïðåêðàòè", çà äà ïðåêðàòèòå èíñòàëèðàíåòî.
-# ^CantWrite
-"Íåóñïåøíî çàïèñâàíå íà: "
-#^CopyFailed
-Êîïèðàíåòî íåóñïåøíî
-# ^CopyTo
-"Êîïèðàíå íà "
-# ^Registering
-"Ðåãèñòðèðàíå íà: "
-# ^Unregistering
-"Äåðåãèñòðèðàíå íà: "
-#^SymbolNotFound
-"Ñèìâîëúò íå å íàìåðåí: "
-# ^CouldNotLoad
-"Íåóñïåøíî çàðåæäàíå íà: "
-# ^CreateFolder
-"Ñúçäàâàíå íà ïàïêà: "
-# ^CreateShortcut
-"Ñúçäàâàíå íà ïðÿê ïúò: "
-#^CreatedUninstaller
-"Ñúçäàâàíå íà ïðîãðàìà çà èçòðèâàíå: "
-# ^Delete
-"Èçòðèâàíå íà: "
-#^DeleteOnReboot
-"Èçòðèâàíå ñëåä ðåñòàðò: "
-#^ErrorCreatingShortcut
-"Ãðåøêà ïðè ñúçäàâàíå íà ïðåêèÿ ïúò: "
-#^ErrorCreating
-"Ãðåøêà ïðè ñúçäàâàíå íà: "
-# ^ErrorDecompressing
-Ãðåøêà ïðè äåêîìïðåñèðàíå íà äàííèòå! Ïîâðåäåí èíñòàëàöèîíåí ïàêåò?
-# ^ErrorRegistering
-Ãðåøêà ïðè ðåãèñòðèðàíå íà DLL
-#^ExecShell
-"ExecShell: "
-#^Exec
-"Èçïúëíåíèå íà: "
-#^Extract
-"Èçâëè÷àíå íà: "
-#^ErrorWriting
-"Èçâëè÷àíå íà: ãðåøêà ïðè çàïèñ âúâ ôàéë "
-#^InvalidOpcode
-Ïàêåòà å ïîâðåäåí: ãðåøåí êîä íà îïåðàöèÿ
-# ^NoOLE
-"Íÿìà OLE çà: "
-#^OutputFolder
-"Èíñòàëèðàíå â ïàïêà: "
-#^RemoveFolder
-"Èçòðèâàíå íà ïàïêà: "
-#^RenameOnReboot
-"Ïðåèìåíóâàíå ïðè ðåñòàðò: "
-# ^Rename
-"Ïðåèìåíóâàíå íà: "
-#^Skipped
-"Ïðîïóñêàíå íà: "
-# ^CopyDetails
-Êîïèðàíå íà äàííèòå â áóôåðà
-# ^LogInstall
-Çàïèñâàíå íà îò÷åò çà èíñòàëèðàíåòî.
-# ^Byte
-# ^Kilo
- Ê
-# ^Mega
- Ì
-# ^Giga
- Ã \ No newline at end of file
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1026
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Asparouh Kalyandjiev <acnapyx@computers.bg>
+# Updated v2 to v6 by Plamen Penkov <plamen71@hotmail.com>
+# Updated by Êèðèë Êèðèëîâ (DumpeR)<dumper@data.bg>
+#
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Èíñòàëèðàíå íà $(^Name)
+# ^UninstallCaption
+Èçòðèâàíå íà $(^Name)
+#^LicenseSubCaption
+: Ëèöåíçèîííî ñïîðàçóìåíèå
+#^ComponentsSubCaption
+: Îïöèè çà èíñòàëèðàíå
+# ^DirSubCaption
+: Èíñòàëèðàíå â ïàïêà
+#^InstallingSubCaption
+: Èíñòàëèðàíå
+#^CompletedSubCaption
+: Çàâúðøâàíå
+# ^UnComponentsSubCaption
+: Îïöèè çà èçòðèâàíå
+# ^UnDirSubCaption
+: Èçòðèâàíå îò ïàïêà
+# ^ConfirmSubCaption
+: Ïîòâúðæäåíèå
+#^UninstallingSubCaption
+: Èçòðèâàíå
+#^UnCompletedSubCaption
+: Çàâúðøâàíå
+# ^BackBtn
+< &Íàçàä
+#^NextBtn
+Í&àïðåä >
+# ^AgreeBtn
+&Ñúãëàñåí
+# ^AcceptBtn
+&Ñúãëàñåí ñúì ñ óñëîâèÿòà íà Ëèöåíçèîííîòî ñïîðàçóìåíèå.
+# ^DontAcceptBtn
+&Íå ñúì ñúãëàñåí ñ óñëîâèÿòà íà Ëèöåíçèîííîòî ñïîðàçóìåíèå.
+# ^InstallBtn
+&Èíñòàëèðàé
+#^UninstallBtn
+&Èçòðèé
+# ^CancelBtn
+&Îòêàç
+#^CloseBtn
+&Çàòâîðè
+#^BrowseBtn
+Ï&ðåãëåä...
+#^ShowDetailsBtn
+&Äåòàéëè
+# ^ClickNext
+Íàòèñíåòå "Íàïðåä", çà äà ïðîäúëæèòå.
+# ^ClickInstall
+Íàòèñíåòå "Èíñòàëèðàé", çà äà çàïî÷íå èíñòàëèðàíåòî.
+# ^ClickUninstall
+Íàòèñíåòå "Èçòðèé", çà äà çàïî÷íå èçòðèâàíåòî.
+# ^Name
+Èìå
+#^Completed
+Êðàé
+# ^LicenseText
+Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èíñòàëèðàòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, íàòèñíåòå "Ñúãëàñåí".
+# ^LicenseTextCB
+Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èíñòàëèðàòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. $_CLICK
+# ^LicenseTextRB
+Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èíñòàëèðàòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. $_CLICK
+# ^UnLicenseText
+Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èçòðèåòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, íàòèñíåòå "Ñúãëàñåí".
+# ^UnLicenseTextCB
+Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èçòðèåòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. $_CLICK
+# ^UnLicenseTextRB
+Ìîëÿ ïðî÷åòåòå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà èçòðèåòå $(^NameDA). Àêî ïðèåìàòå âñè÷êè óñëîâèÿ íà ñïîðàçóìåíèåòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. $_CLICK
+# ^Custom
+Èíñòàëèðàíå ïî èçáîð
+#^ComponentsText
+Èçáåðåòå êîìïîíåíòèòå, êîèòî èñêàòå äà áúäàò èíñòàëèðàíè. $_CLICK
+#^ComponentsSubText1
+Èçáåðåòå òèï èíñòàëèðàíå:
+#^ComponentsSubText2_NoInstTypes
+Èçáåðåòå êîìïîíåíòè:
+#^ComponentsSubText2
+Èëè èçáåðåòå êîìïîíåíòèòå, êîèòî èñêàòå äà áúäàò èíñòàëèðàíè:
+# ^UnComponentsText
+Ñëîæåòå îòìåòêà ïðåä êîìïîíåíòèòå, êîèòî èñêàòå äà èçòðèåòå, à òåçè êîèòî íå èñêàòå äà èçòðèåòå îñòàâåòå áåç îòìåòêà. $_CLICK
+# ^UnComponentsSubText1
+Èçáåðåòå òèïà íà èçòðèâàíå:
+# ^UnComponentsSubText2_NoInstTypes
+Èçáåðåòå êîìïîíåíòèòå çà èçòðèâàíå:
+# ^UnComponentsSubText2
+Èëè, èçáåðåòå äîïúëíèòåëíè êîìïîíåíòè çà èçòðèâàíå:
+# ^DirText
+Ïðîãðàìàòà ùå èíñòàëèðà $(^NameDA) â ïîñî÷åíàòà ïàïêà. Çà äà èíñòàëèðàòå â äðóãà ïàïêà, íàòèñíåòå "Ïðåãëåä" è èçáåðåòå äðóãà ïàïêà. $_CLICK
+# ^DirSubText
+Öåëåâà ïàïêà
+# ^DirBrowseText
+Èçáåðåòå ïàïêà, â êîÿòî äà ñå èíñòàëèðà $(^NameDA):
+# ^UnDirText
+Ïðîãðàìàòà ùå èçòðèå $(^NameDA) îò ñëåäíàòà ïàïêà. Çà äà èçòðèåòå îò äðóãà ïàïêà, íàòèñíåòå "Ïðåãëåä" è èçáåðåòå äðóãà ïàïêà. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Èçáåðåòå ïàïêàòà îò êîÿòî äà ñå èçòðèå $(^NameDA):
+# ^SpaceAvailable
+"Ñâîáîäíî ïðîñòðàíñòâî: "
+#^SpaceRequired
+"Íåîáõîäèìî ïðîñòðàíñòâî: "
+# ^UninstallingText
+$(^NameDA) ùå áúäå èçòðèòà îò ñëåäíàòà ïàïêà. $_CLICK
+# ^UninstallingSubText
+Èçòðèâàíå îò:
+# ^FileError
+Ãðåøêà ïðè îòâàðÿíå íà ôàéëà çà çàïèñ: \r\n\t"$0"\r\nÍàòèñíåòå "Ïðåêðàòè", çà äà ïðåêðàòèòå èíñòàëèðàíåòî, "Ïîâòîðè", çà äà îïèòàòå îòíîâî èëè "Èãíîðèðàé", çà äà ïðîïóñíåòå òîçè ôàéë
+# ^FileError_NoIgnore
+Ãðåøêà ïðè îòâàðÿíå íà ôàéëà çà çàïèñ: \r\n\t"$0"\r\nÍàòèñíåòå "Ïîâòîðè", çà äà îïèòàòå îòíîâî èëè "Ïðåêðàòè", çà äà ïðåêðàòèòå èíñòàëèðàíåòî.
+# ^CantWrite
+"Íåóñïåøíî çàïèñâàíå íà: "
+#^CopyFailed
+Êîïèðàíåòî íåóñïåøíî
+# ^CopyTo
+"Êîïèðàíå íà "
+# ^Registering
+"Ðåãèñòðèðàíå íà: "
+# ^Unregistering
+"Äåðåãèñòðèðàíå íà: "
+#^SymbolNotFound
+"Ñèìâîëúò íå å íàìåðåí: "
+# ^CouldNotLoad
+"Íåóñïåøíî çàðåæäàíå íà: "
+# ^CreateFolder
+"Ñúçäàâàíå íà ïàïêà: "
+# ^CreateShortcut
+"Ñúçäàâàíå íà ïðÿê ïúò: "
+#^CreatedUninstaller
+"Ñúçäàâàíå íà ïðîãðàìà çà èçòðèâàíå: "
+# ^Delete
+"Èçòðèâàíå íà: "
+#^DeleteOnReboot
+"Èçòðèâàíå ñëåä ðåñòàðò: "
+#^ErrorCreatingShortcut
+"Ãðåøêà ïðè ñúçäàâàíå íà ïðåêèÿ ïúò: "
+#^ErrorCreating
+"Ãðåøêà ïðè ñúçäàâàíå íà: "
+# ^ErrorDecompressing
+Ãðåøêà ïðè äåêîìïðåñèðàíå íà äàííèòå! Âåðîÿòíî èíñòàëàöèîííèÿ ïàêåò å ïîâðåäåí.
+# ^ErrorRegistering
+Ãðåøêà ïðè ðåãèñòðèðàíå íà DLL
+#^ExecShell
+"ExecShell: "
+#^Exec
+"Èçïúëíåíèå íà: "
+#^Extract
+"Èçâëè÷àíå íà: "
+#^ErrorWriting
+"Èçâëè÷àíå íà: ãðåøêà ïðè çàïèñ âúâ ôàéë "
+#^InvalidOpcode
+Ïàêåòà å ïîâðåäåí: ãðåøåí êîä íà îïåðàöèÿ
+# ^NoOLE
+"Íÿìà OLE çà: "
+#^OutputFolder
+"Èíñòàëèðàíå â ïàïêà: "
+#^RemoveFolder
+"Èçòðèâàíå íà ïàïêà: "
+#^RenameOnReboot
+"Ïðåèìåíóâàíå ïðè ðåñòàðò: "
+# ^Rename
+"Ïðåèìåíóâàíå íà: "
+#^Skipped
+"Ïðîïóñêàíå íà: "
+# ^CopyDetails
+Êîïèðàíå íà äàííèòå â áóôåðà
+# ^LogInstall
+Çàïèñâàíå íà îò÷åò çà èíñòàëèðàíåòî
+# ^Byte
+# ^Kilo
+ Ê
+# ^Mega
+ Ì
+# ^Giga
+ Ã \ No newline at end of file
diff --git a/Contrib/Language files/Bulgarian.nsh b/Contrib/Language files/Bulgarian.nsh
index 882439b..744197c 100755
--- a/Contrib/Language files/Bulgarian.nsh
+++ b/Contrib/Language files/Bulgarian.nsh
@@ -1,124 +1,124 @@
-;Language: Bulgarian (1026)
-;Translated by Asparouh Kalyandjiev [acnapyx@sbline.net]
-;Review and update from v1.63 to v1.68 by Plamen Penkov [plamen71@hotmail.com]
-;Updated by Êèðèë Êèðèëîâ (DumpeR) [dumper@data.bg]
-;
-
-!insertmacro LANGFILE "Bulgarian" "Bulgarian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Äîáðå äîøëè â Ñúâåòíèêà$\r$\nçà èíñòàëèðàíå íà$\r$\n$(^NameDA)!"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Òîé ùå èíñòàëèðà $(^NameDA) íà âàøèÿ êîìïþòúð.$\r$\n$\r$\nÏðåïîðú÷âà ñå äà çàòâîðèòå âñè÷êè äðóãè ïðèëîæåíèÿ, ïðåäè äà ïðîäúëæèòå. Òîâà ùå ïîçâîëè íà ïðîãðàìàòà äà îáíîâè íÿêîè ñèñòåìíè ôàéëîâå, áåç äà ñå ðåñòàðòèðà êîìïþòúðà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Äîáðå äîøëè â Ñúâåòíèêà$\r$\nçà èçòðèâàíå íà$\r$\n$(^NameDA)!"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Òîé ùå âè ïîìîãíå äà èçòðèåòå $(^NameDA) îò âàøèÿ êîìïþòúð.$\r$\n$\r$\nÏðåäè äà ïðîäúëæèòå, óâåðåòå ñå ÷å $(^NameDA) íå å ñòàðòèðàíà â ìîìåíòà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíçíî ñïîðàçóìåíèå"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ìîëÿ çàïîçíàéòå ñå Ëèöåíçíîòî ñïîðàçóìåíèå ïðåäè äà ïðîäúëæèòå."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, íàòèñíåòå $\"Ñúãëàñåí$\", çà äà ïðîäúëæèòå. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èíñòàëèðàòå $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èíñòàëèðàòå $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èíñòàëèðàòå $(^NameDA) $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíçíî ñïîðàçóìåíèå"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ìîëÿ çàïîçíàéòå ñå ëèöåíçíèòå óñëîâèÿ ïðåäè äà èçòðèåòå $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèòî, íàòèñíåòå $\"Ñúãëàñåí$\" çà äà ïðîäúëæèòå. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èçòðèåòå $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èçòðèåòå $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èçòðèåòå $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Íàòèñíåòå êëàâèøà $\"Page Down$\", çà äà âèäèòå îñòàíàëàòà ÷àñò îò ñïîðàçóìåíèåòî."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Èçáîð íà êîìïîíåíòè"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Èçáåðåòå êîè êîìïîíåíòè íà $(^NameDA) èñêàòå äà áúäàò èíñòàëèðàíè."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñàíèå"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Èçáîð íà êîìïîíåíòè"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Èçáåðåòå êîè êîìïîíåíòè íà $(^NameDA) èñêàòå äà èçòðèåòå."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåìèíåòå ñ ìèøêàòà íàä îïðåäåëåí êîìïîíåíò, çà äà âèäèòå îïèñàíèåòî ìó."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåìèíåòå ñ ìèøêàòà íàä îïðåäåëåí êîìïîíåíò, çà äà âèäèòå îïèñàíèåòî ìó."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Èçáîð íà ïàïêà çà èíñòàëèðàíå"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Èçáåðåòå ïàïêàòà, â êîÿòî äà ñå èíñòàëèðà $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Èçáîð íà ïàïêà çà èçòðèâàíå"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Èçáåðåòå ïàïêàòà, îò êîÿòî äà ñå èçòðèå $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Èíñòàëèðàíå"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ìîëÿ èç÷àêàéòå, äîêàòî ñå èíñòàëèðà $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Èíñòàëèðàíåòî çàâúðøè."
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Èíñòàëèðàíåòî çàâúðøè óñïåøíî."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Èíñòàëèðàíåòî ïðåêðàòåíî."
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Èíñòàëèðàíåòî íå çàâúðøè óñïåøíî."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Èçòðèâàíå"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ìîëÿ èç÷àêàéòå, äîêàòî ñå èçòðèå $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Êðàé"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Èçòðèâàíåòî çàâúðøè óñïåøíî."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Èçòðèâàíåòî ïðåêðàòåíî."
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Èçòðèâàíåòî íå çàâúðøè óñïåøíî."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàòâàðÿíå íà Ñúâåòíèêà çà èíñòàëèðàíå íà $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) å èíñòàëèðàíà íà âàøèÿ êîìïþòúð.$\r$\n\rÍàòèñíåòå $\"Êðàé$\", çà äà çàòâîðèòå Ñúâåòíèêà."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Êîìïþòúðúò òðÿáâà äà áúäå ðåñòàðòèðàí, çà äà çàâúðøè èíñòàëèðàíåòî íà $(^NameDA). Èñêàòå ëè äà ðåñòàðòèðàòå ñåãà?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Ïðèêëþ÷âàíå íà Ñúâåòíèêà çà èçòðèâàíå íà $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) áåøå èçòðèòà îò âàøèÿ êîìïþòúð.$\r$\n$\r$\nÍàòèñíåòå $\"Êðàé$\" çà äà çàòâîðèòå òîçè Ñúâåòíèê."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Êîìïþòúðúò âè òðÿáâà äà ñå ðåñòàðòèðà, çà äà ïðèêëþ÷è óñïåøíî èçòðèâàíåòî íà $(^NameDA). Èñêàòå ëè äà ðåñòàðòèðàòå ñåãà?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Äà, ðåñòàðòèðàé ñåãà!"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Íå, ùå ðåñòàðòèðàì ïî-êúñíî."
- ${LangFileString} MUI_TEXT_FINISH_RUN "Ñòàðòèðàé $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Ïîêàæè ôàéëà $\"ReadMe$\"."
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Êðàé"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Èçáîð íà ïàïêà â ìåíþòî $\"Ñòàðò$\""
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Èçáåðåòå ïàïêà â ìåíþòî $\"Ñòàðò$\" çà ïðåêè ïúòèùà êúì ïðîãðàìàòà."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Èçáåðåòå ïàïêà â ìåíþòî $\"Ñòàðò$\", â êîÿòî èñêàòå äà ñúçäàäåòå ïðåêè ïúòèùà êúì ïðîãðàìàòà. Ìîæåòå ñúùî òàêà äà âúâåäåòå èìå, çà äà ñúçäàäåòå íîâà ïàïêà."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñúçäàâàé ïðåêè ïúòèùà"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Èçòðèâàíå"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Èçòðèâàíå íà $(^NameDA) îò âàøèÿ êîìïþòúð."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ñèãóðíè ëè ñòå, ÷å èñêàòå äà ïðåêðàòèòå èíñòàëèðàíåòî íà $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Íàèñòèíà ëè èñêàòå äà ïðåêðàòèòå èçòðèâàíåòî íà $(^Name)?"
-!endif
+;Language: Bulgarian (1026)
+;Translated by Asparouh Kalyandjiev [acnapyx@sbline.net]
+;Review and update from v1.63 to v1.68 by Plamen Penkov [plamen71@hotmail.com]
+;Updated by Êèðèë Êèðèëîâ (DumpeR) [dumper@data.bg]
+;
+
+!insertmacro LANGFILE "Bulgarian" "Bulgarian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Äîáðå äîøëè â Ñúâåòíèêà$\r$\nçà èíñòàëèðàíå íà$\r$\n$(^NameDA)!"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Òîé ùå èíñòàëèðà $(^NameDA) íà âàøèÿ êîìïþòúð.$\r$\n$\r$\nÏðåïîðú÷âà ñå äà çàòâîðèòå âñè÷êè äðóãè ïðèëîæåíèÿ, ïðåäè äà ïðîäúëæèòå. Òîâà ùå ïîçâîëè íà ïðîãðàìàòà äà îáíîâè íÿêîè ñèñòåìíè ôàéëîâå, áåç äà ñå ðåñòàðòèðà êîìïþòúðà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Äîáðå äîøëè â Ñúâåòíèêà$\r$\nçà èçòðèâàíå íà$\r$\n$(^NameDA)!"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Òîé ùå âè ïîìîãíå äà èçòðèåòå $(^NameDA) îò âàøèÿ êîìïþòúð.$\r$\n$\r$\nÏðåäè äà ïðîäúëæèòå, óâåðåòå ñå ÷å $(^NameDA) íå å ñòàðòèðàíà â ìîìåíòà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíçèîííî ñïîðàçóìåíèå"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ìîëÿ çàïîçíàéòå ñå Ëèöåíçèîííîòî ñïîðàçóìåíèå ïðåäè äà ïðîäúëæèòå."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, íàòèñíåòå $\"Ñúãëàñåí$\", çà äà ïðîäúëæèòå. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èíñòàëèðàòå $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èíñòàëèðàòå $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èíñòàëèðàòå $(^NameDA) $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíçèîííî ñïîðàçóìåíèå"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ìîëÿ çàïîçíàéòå ñå ëèöåíçèîííèòå óñëîâèÿ ïðåäè äà èçòðèåòå $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèòî, íàòèñíåòå $\"Ñúãëàñåí$\" çà äà ïðîäúëæèòå. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èçòðèåòå $(^NameDA)." $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèåòî, ñëîæåòå îòìåòêà â ïîëåòî ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èçòðèåòå $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèåìàòå óñëîâèÿòà íà ñïîðàçóìåíèòî, èçáåðåòå ïúðâàòà îïöèÿ ïî-äîëó. Òðÿáâà äà ïðèåìåòå ñïîðàçóìåíèåòî, çà äà èçòðèåòå $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Íàòèñíåòå êëàâèøà $\"Page Down$\", çà äà âèäèòå îñòàíàëàòà ÷àñò îò ñïîðàçóìåíèåòî."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Èçáîð íà êîìïîíåíòè"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Èçáåðåòå êîè êîìïîíåíòè íà $(^NameDA) èñêàòå äà èíñòàëèðàòå."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñàíèå"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Èçáîð íà êîìïîíåíòè"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Èçáåðåòå êîè êîìïîíåíòè íà $(^NameDA) èñêàòå äà èçòðèåòå."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåìèíåòå ñ ìèøêàòà íàä îïðåäåëåí êîìïîíåíò, çà äà âèäèòå îïèñàíèåòî ìó."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåìèíåòå ñ ìèøêàòà íàä îïðåäåëåí êîìïîíåíò, çà äà âèäèòå îïèñàíèåòî ìó."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Èçáîð íà ïàïêà çà èíñòàëèðàíå"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Èçáåðåòå ïàïêàòà, â êîÿòî äà ñå èíñòàëèðà $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Èçáîð íà ïàïêà çà èçòðèâàíå"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Èçáåðåòå ïàïêàòà, îò êîÿòî äà ñå èçòðèå $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Èíñòàëèðàíå"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Èç÷àêàéòå, èíñòàëèðàò ñå ôàéëîâåòå íà $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Èíñòàëèðàíåòî çàâúðøè."
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Èíñòàëèðàíåòî çàâúðøè óñïåøíî."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Èíñòàëèðàíåòî ïðåêðàòåíî."
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Èíñòàëèðàíåòî íå çàâúðøè óñïåøíî."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Èçòðèâàíå"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Èç÷àêàéòå, èçòðèâàò ñå ôàéëîâåòå íà $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Êðàé"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Èçòðèâàíåòî çàâúðøè óñïåøíî."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Èçòðèâàíåòî ïðåêðàòåíî."
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Èçòðèâàíåòî íå çàâúðøè óñïåøíî."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Ïðèêëþ÷âàíå íà Ñúâåòíèêà çà èíñòàëèðàíå íà $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Èíñòàëèðàíåòî íà $(^NameDA) å çàâúðøåíî.$\r$\n$\r$Íàòèñíåòå áóòîíà $\"Êðàé$\", çà äà çàòâîðèòå Ñúâåòíèêà."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Êîìïþòúðúò òðÿáâà äà áúäå ðåñòàðòèðàí, çà äà çàâúðøè èíñòàëèðàíåòî íà $(^NameDA). Èñêàòå ëè äà ðåñòàðòèðàòå ñåãà?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Ïðèêëþ÷âàíå íà Ñúâåòíèêà çà èçòðèâàíå íà $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðîãðàìàòà $(^NameDA) áåøå èçòðèòà îò âàøèÿ êîìïþòúð.$\r$\n$\r$\nÍàòèñíåòå $\"Êðàé$\" çà äà çàòâîðèòå òîçè Ñúâåòíèê."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Êîìïþòúðúò âè òðÿáâà äà ñå ðåñòàðòèðà, çà äà ïðèêëþ÷è óñïåøíî èçòðèâàíåòî íà $(^NameDA). Èñêàòå ëè äà ðåñòàðòèðàòå ñåãà?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Äà, ðåñòàðòèðàé ñåãà."
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Íå, ùå ðåñòàðòèðàì ïî-êúñíî."
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Ñòàðòèðàé $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Ïîêàæè ôàéëà $\"ReadMe$\"."
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Êðàé"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Èçáîð íà ïàïêà â ìåíþòî $\"Ñòàðò$\""
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Èçáåðåòå ïàïêà â ìåíþòî $\"Ñòàðò$\" çà ïðåêè ïúòèùà êúì ïðîãðàìàòà."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Èçáåðåòå ïàïêà â ìåíþòî $\"Ñòàðò$\", â êîÿòî èñêàòå äà ñúçäàäåòå ïðåêè ïúòèùà êúì ïðîãðàìàòà. Ìîæåòå ñúùî òàêà äà âúâåäåòå èìå, çà äà ñúçäàäåòå íîâà ïàïêà."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñúçäàâàé ïðåêè ïúòèùà"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Èçòðèâàíå íà $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Èçòðèâàíå íà $(^NameDA) îò âàøèÿ êîìïþòúð."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ñèãóðíè ëè ñòå, ÷å èñêàòå äà ïðåêðàòèòå èíñòàëèðàíåòî íà $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ñèãóðíè ëè ñòå, ÷å èñêàòå äà ïðåêðàòèòå èçòðèâàíåòî íà $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Catalan.nlf b/Contrib/Language files/Catalan.nlf
index 9908120..1c41751 100755
--- a/Contrib/Language files/Catalan.nlf
+++ b/Contrib/Language files/Catalan.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1027
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by falanko
-# Corrections by Toni Hermoso Pulido
-# ^Branding
-Sistema d'instal·lació de Nullsoft %s
-# ^SetupCaption
-Instal·lació de l'aplicació $(^Name)
-# ^UninstallCaption
-Desinstal·lació de l'aplicació $(^Name)
-# ^LicenseSubCaption
-: Acord de llicència
-# ^ComponentsSubCaption
-: Opcions d'instal·lació
-# ^DirSubCaption
-: Carpeta d'instal·lació
-# ^InstallingSubCaption
-: S'està instal·lant
-# ^CompletedSubCaption
-: S'ha acabat
-# ^UnComponentsSubCaption
-: Opcions de desinstal·lació
-# ^UnDirSubCaption
-: Carpeta de desinstal·lació
-# ^ConfirmSubCaption
-: Confirmació
-# ^UninstallingSubCaption
-: S'està desinstal·lant
-# ^UnCompletedSubCaption
-: No s'ha acabat
-# ^BackBtn
-< En&rere
-# ^NextBtn
-En&davant >
-# ^AgreeBtn
-Hi estic d'a&cord
-# ^AcceptBtn
-&Accepto els termes de l'acord de llicència
-# ^DontAcceptBtn
-&No accepto els termes de l'acord de llicència
-# ^InstallBtn
-&Instal·la
-# ^UninstallBtn
-&Desinstal·la
-# ^CancelBtn
-&Cancel·la
-# ^CloseBtn
-&Tanca
-# ^BrowseBtn
-&Navega...
-# ^ShowDetailsBtn
-&Mostra els detalls
-# ^ClickNext
-Feu clic a Endavant per a continuar.
-# ^ClickInstall
-Feu clic a Instal·la per a iniciar la instal·lació.
-# ^ClickUninstall
-Feu clic a Desinstal·la per a iniciar la desinstal·lació.
-# ^Name
-Nom
-# ^Completed
-S'ha acabat
-# ^LicenseText
-Reviseu l'acord de llicència abans d'instal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, feu clic a Hi estic d'acord.
-# ^LicenseTextCB
-Reviseu l'acord de llicència abans d'instal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, activeu la casella de sota. $_CLICK
-# ^LicesnseTextRB
-Reviseu l'acord de llicència abans d'instal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. $_CLICK
-# ^UnLicenseText
-Reviseu l'acord de llicència abans de desinstal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, feu clic a Hi estic d'acord.
-# ^UnLicenseTextCB
-Reviseu l'acord de llicència abans de desinstal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, activeu la la casella de sota. $_CLICK
-# ^UnLicesnseTextRB
-Reviseu l'acord de llicència abans de desinstal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. $_CLICK
-# ^Custom
-Personalitzada
-# ^ComponentsText
-Activeu els components que voleu instal·lar i desactiveu els que no. $_CLICK
-# ^ComponentsSubText1
-Seleccioneu el tipus d'instal·lació:
-# ^ComponentsSubText2_NoInstTypes
-Seleccioneu els components per instal·lar:
-# ^ComponentsSubText2
-O bé, seleccioneu els components opcionals que desitgéssiu instal·lar:
-# ^UnComponentsText
-Activeu els components que voleu desinstal·lar i desactiveu els que no. $_CLICK
-# ^UnComponentsSubText1
-Seleccioneu el tipus de desinstal·lació:
-# ^UnComponentsSubText2_NoInstTypes
-Seleccioneu els components per desinstal·lar:
-# ^UnComponentsSubText2
-O bé, seleccioneu els components opcionals per desinstal·lar:
-# ^DirText
-El programa d'instal·lació instal·larà l'aplicació $(^NameDA) en la següent carpeta. Per a instal·lar-lo en una carpeta diferent, feu clic a Navega i seleccioneu-ne una altra. $_CLICK
-# ^DirSubText
-Carpeta de destinació
-# ^DirBrowseText
-Seleccioneu la carpeta on s'instal·larà l'aplicació $(^NameDA):
-# ^UnDirText
-El programa d'instal·lació desinstal·larà l'aplicació $(^NameDA) de la següent carpeta. Per a desinstal·lar-lo d'una carpeta diferent, feu clic a Navega i seleccioneu-ne una altra. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Seleccioneu la carpeta des d'on es desinstal·larà l'aplicació $(^NameDA):
-# ^SpaceAvailable
-"Espai lliure: "
-# ^SpaceRequired
-"Espai necessari: "
-# ^UninstallingText
-Es desinstal·larà l'aplicació $(^NameDA) de la següent carpeta. $_CLICK
-# ^UninstallingSubTex
-S'està desinstal·lant de:
-# ^FileError
-S'ha produït un error en obrir el fitxer en mode d'escriptura: \r\n\t"$0"\r\nFeu clic a Abandona per a aturar la instal·lació,\r\nReintenta per a tornar-ho a provar, o\r\Ignora per a ometre aquest fitxer.
-# ^FileError_NoIgnore
-S'ha produït un error en obrir el fitxer en mode d'escriptura: \r\n\t"$0"\r\nFeu clic a Reintenta per a tornar-ho a provar, o\r\Cancel·la per a aturar la instal·lació.
-# ^CantWrite
-"No s'ha pogut escriure: "
-# ^CopyFailed
-Ha fallat la còpia
-# ^CopyTo
-"Copia a "
-# ^Registering
-"S'esta registrant:"
-# ^Unregistering
-"S'està suprimint el registre: "
-# ^SymbolNotFound
-"No s'ha trobat el símbol: "
-# ^CouldNotLoad
-"No s'ha pogut carregar: "
-# ^CreateFolder
-"Crea la carpeta: "
-# ^CreateShortcut
-"Crea la drecera: "
-# ^CreatedUninstaller
-"S'ha creat el desinstal·lador: "
-# ^Delete
-"S'ha suprimit el fitxer: "
-# ^DeleteOnReboot
-"Suprimeix en reiniciar: "
-# ^ErrorCreatingShortcut
-"S'ha produït un error en crear la drecera: "
-# ^ErrorCreating
-S'ha produït un error en crear:
-# ^ErrorDecompressing
-S'ha produït un error en descomprimir les dades! L'instal·lador està corrupte?
-# ^ErrorRegistering
-S'ha produït un error en registrar una DLL
-# ^ExecShell
-"Executa l'ordre: "
-# ^Exec
-"Executa:"
-# ^Extract
-"Extreu: "
-# ^ErrorWriting
-"Extreu: s'ha produït un error en escriure el fitxer "
-# ^InvalidOpcode
-L'instal·lador està corrupte: el codi d'operació no és vàlid
-# ^NoOLE
-"No hi ha OLE per a: "
-# ^OutputFolder
-"Carpeta de sortida: "
-# ^RemoveFolder
-"Suprimeix la carpeta: "
-# ^RenameOnReboot
-"Reanomena en reiniciar: "
-# ^Rename
-"Reanomena: "
-# ^Skipped
-"S'ha omès: "
-# ^CopyDetails
-Copia els detalls al porta-retalls
-# ^LogInstall
-Registra el procés d'instal·lació
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Language ID
+1027
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by falanko
+# Corrections by Toni Hermoso Pulido
+# ^Branding
+Sistema d'instal·lació de Nullsoft %s
+# ^SetupCaption
+Instal·lació de l'aplicació $(^Name)
+# ^UninstallCaption
+Desinstal·lació de l'aplicació $(^Name)
+# ^LicenseSubCaption
+: Acord de llicència
+# ^ComponentsSubCaption
+: Opcions d'instal·lació
+# ^DirSubCaption
+: Carpeta d'instal·lació
+# ^InstallingSubCaption
+: S'està instal·lant
+# ^CompletedSubCaption
+: S'ha acabat
+# ^UnComponentsSubCaption
+: Opcions de desinstal·lació
+# ^UnDirSubCaption
+: Carpeta de desinstal·lació
+# ^ConfirmSubCaption
+: Confirmació
+# ^UninstallingSubCaption
+: S'està desinstal·lant
+# ^UnCompletedSubCaption
+: No s'ha acabat
+# ^BackBtn
+< En&rere
+# ^NextBtn
+En&davant >
+# ^AgreeBtn
+Hi estic d'a&cord
+# ^AcceptBtn
+&Accepto els termes de l'acord de llicència
+# ^DontAcceptBtn
+&No accepto els termes de l'acord de llicència
+# ^InstallBtn
+&Instal·la
+# ^UninstallBtn
+&Desinstal·la
+# ^CancelBtn
+&Cancel·la
+# ^CloseBtn
+&Tanca
+# ^BrowseBtn
+&Navega...
+# ^ShowDetailsBtn
+&Mostra els detalls
+# ^ClickNext
+Feu clic a Endavant per a continuar.
+# ^ClickInstall
+Feu clic a Instal·la per a iniciar la instal·lació.
+# ^ClickUninstall
+Feu clic a Desinstal·la per a iniciar la desinstal·lació.
+# ^Name
+Nom
+# ^Completed
+S'ha acabat
+# ^LicenseText
+Reviseu l'acord de llicència abans d'instal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, feu clic a Hi estic d'acord.
+# ^LicenseTextCB
+Reviseu l'acord de llicència abans d'instal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, activeu la casella de sota. $_CLICK
+# ^LicesnseTextRB
+Reviseu l'acord de llicència abans d'instal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. $_CLICK
+# ^UnLicenseText
+Reviseu l'acord de llicència abans de desinstal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, feu clic a Hi estic d'acord.
+# ^UnLicenseTextCB
+Reviseu l'acord de llicència abans de desinstal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, activeu la la casella de sota. $_CLICK
+# ^UnLicesnseTextRB
+Reviseu l'acord de llicència abans de desinstal·lar l'aplicació $(^NameDA). Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. $_CLICK
+# ^Custom
+Personalitzada
+# ^ComponentsText
+Activeu els components que voleu instal·lar i desactiveu els que no. $_CLICK
+# ^ComponentsSubText1
+Seleccioneu el tipus d'instal·lació:
+# ^ComponentsSubText2_NoInstTypes
+Seleccioneu els components per instal·lar:
+# ^ComponentsSubText2
+O bé, seleccioneu els components opcionals que desitgéssiu instal·lar:
+# ^UnComponentsText
+Activeu els components que voleu desinstal·lar i desactiveu els que no. $_CLICK
+# ^UnComponentsSubText1
+Seleccioneu el tipus de desinstal·lació:
+# ^UnComponentsSubText2_NoInstTypes
+Seleccioneu els components per desinstal·lar:
+# ^UnComponentsSubText2
+O bé, seleccioneu els components opcionals per desinstal·lar:
+# ^DirText
+El programa d'instal·lació instal·larà l'aplicació $(^NameDA) en la següent carpeta. Per a instal·lar-lo en una carpeta diferent, feu clic a Navega i seleccioneu-ne una altra. $_CLICK
+# ^DirSubText
+Carpeta de destinació
+# ^DirBrowseText
+Seleccioneu la carpeta on s'instal·larà l'aplicació $(^NameDA):
+# ^UnDirText
+El programa d'instal·lació desinstal·larà l'aplicació $(^NameDA) de la següent carpeta. Per a desinstal·lar-lo d'una carpeta diferent, feu clic a Navega i seleccioneu-ne una altra. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Seleccioneu la carpeta des d'on es desinstal·larà l'aplicació $(^NameDA):
+# ^SpaceAvailable
+"Espai lliure: "
+# ^SpaceRequired
+"Espai necessari: "
+# ^UninstallingText
+Es desinstal·larà l'aplicació $(^NameDA) de la següent carpeta. $_CLICK
+# ^UninstallingSubTex
+S'està desinstal·lant de:
+# ^FileError
+S'ha produït un error en obrir el fitxer en mode d'escriptura: \r\n\t"$0"\r\nFeu clic a Abandona per a aturar la instal·lació,\r\nReintenta per a tornar-ho a provar, o\r\Ignora per a ometre aquest fitxer.
+# ^FileError_NoIgnore
+S'ha produït un error en obrir el fitxer en mode d'escriptura: \r\n\t"$0"\r\nFeu clic a Reintenta per a tornar-ho a provar, o\r\Cancel·la per a aturar la instal·lació.
+# ^CantWrite
+"No s'ha pogut escriure: "
+# ^CopyFailed
+Ha fallat la còpia
+# ^CopyTo
+"Copia a "
+# ^Registering
+"S'esta registrant:"
+# ^Unregistering
+"S'està suprimint el registre: "
+# ^SymbolNotFound
+"No s'ha trobat el símbol: "
+# ^CouldNotLoad
+"No s'ha pogut carregar: "
+# ^CreateFolder
+"Crea la carpeta: "
+# ^CreateShortcut
+"Crea la drecera: "
+# ^CreatedUninstaller
+"S'ha creat el desinstal·lador: "
+# ^Delete
+"S'ha suprimit el fitxer: "
+# ^DeleteOnReboot
+"Suprimeix en reiniciar: "
+# ^ErrorCreatingShortcut
+"S'ha produït un error en crear la drecera: "
+# ^ErrorCreating
+S'ha produït un error en crear:
+# ^ErrorDecompressing
+S'ha produït un error en descomprimir les dades! L'instal·lador està corrupte?
+# ^ErrorRegistering
+S'ha produït un error en registrar una DLL
+# ^ExecShell
+"Executa l'ordre: "
+# ^Exec
+"Executa:"
+# ^Extract
+"Extreu: "
+# ^ErrorWriting
+"Extreu: s'ha produït un error en escriure el fitxer "
+# ^InvalidOpcode
+L'instal·lador està corrupte: el codi d'operació no és vàlid
+# ^NoOLE
+"No hi ha OLE per a: "
+# ^OutputFolder
+"Carpeta de sortida: "
+# ^RemoveFolder
+"Suprimeix la carpeta: "
+# ^RenameOnReboot
+"Reanomena en reiniciar: "
+# ^Rename
+"Reanomena: "
+# ^Skipped
+"S'ha omès: "
+# ^CopyDetails
+Copia els detalls al porta-retalls
+# ^LogInstall
+Registra el procés d'instal·lació
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Catalan.nsh b/Contrib/Language files/Catalan.nsh
index 51360cc..2a07114 100755
--- a/Contrib/Language files/Catalan.nsh
+++ b/Contrib/Language files/Catalan.nsh
@@ -1,121 +1,121 @@
-;Language: Catalan (1027)
-;By falanko, corrections by Toni Hermoso Pulido
-
-!insertmacro LANGFILE "Catalan" "Català"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Benvinguts a l'auxiliar d'instal·lació de l'aplicació $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Aquest auxiliar us guiarà durant el procés d'instal·lació de l'aplicació $(^NameDA).$\r$\n$\r$\nEs recomana tancar la resta d'aplicacions abans de començar la instal·lació. Això permetrà al programa d'instal·ació actualitzar fitxers del sistema rellevants sense haver de reiniciar l'ordinador.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Benvinguts a l'auxiliar de desinstal·lació de l'aplicació $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Aquest auxiliar us guiarà a través de la desinstal·lació de l'aplicació $(^NameDA).$\r$\n\rAbans de començar la desinstal·lació, assegureu-vos que l'aplicació $(^NameDA) no s'està executant.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Acord de Llicència"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Reviseu els termes de la llicència abans d'instal·lar l'aplicació $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si accepteu tots els termes de l'acord, premeu Hi estic d'acord per a continuar. Heu d'acceptar l'acord per a poder instal·lar l'aplicació $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si accepteu tots els termes de l'acord, activeu la casella de sota. Heu d'acceptar l'acord per poder instal·lar l'aplicació $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. Heu d'acceptar l'acord per a poder instal·lar $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Acord de llicència"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Reviseu els termes de la llicència abans de desinstal·lar l'aplicació $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si accepteu tots els termes de l'acord, premeu Hi estic d'Acord per a continuar. Heu d'acceptar l'acord per a poder desinstal·lar l'aplicació $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si accepteu tots els termes de l'acord, activeu la casella de sota. Heu d'acceptar l'acord per a poder desinstal·lar l'aplicació $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. Heu d'acceptar l'acord per a poder desinstal·lar l'aplicació $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Premeu AvPàg per a veure la resta de l'acord."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selecció de components"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Seleccioneu quines característiques de l'aplicació $(^NameDA) desitgeu instal·lar."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descripció"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selecció de components"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Seleccioneu quines característiques de l'aplicació $(^NameDA) desitgeu desinstal·lar."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Situeu el ratolí damunt d'un component per a veure'n la descripció."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Situeu el ratolí damunt d'un component per a veure'n la descripció."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Trieu una ubicació d'instal·lació"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Trieu la carpeta on instal·lar-hi l'aplicació $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Trieu la ubicació de desinstal·lació"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Trieu la carpeta d'on desinstal·lar l'aplicació $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "S'està instal·lant"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Si us plau, espereu mentre l'aplicació $(^NameDA) s'instal·la."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "S'ha acabat la instal·lació"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "La instal·lació ha acabat correctament."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "S'ha abandonat la instal·lació"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "La instal·lació no ha acabat correctament."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "S'està desinstal·lant"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Si us plau, espereu mentre l'aplicació $(^NameDA) es desinstal·la."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "S'ha acabat la desinstal·lació"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La desinstal·lació s'ha realitzat correctament."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "S'ha abandonat la desinstal·lació"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La desinstal·lació no ha acabat correctament."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "S'està acabant l'auxiliar d'instal·lació de l'aplicació $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "L'aplicació $(^NameDA) s'ha instal·lat a l'ordinador.$\r$\n$\r$\nFeu clic a Finalitza per a tancar aquest auxiliar."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Cal reiniciar l'ordinador perquè pugui acabar-se la instal·lació de l'aplicació $(^NameDA). Voleu reiniciar-lo ara?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "S'està acabant l'auxiliar de desinstal·lació de l'aplicació $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "L'aplicació $(^NameDA) s'ha desinstal·lat de l'ordinador.$\r$\n$\r$\nFeu clic a Finalitza per a tancar aquest auxiliar."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Cal reiniciar l'ordinador perquè pugui acabar-se la desinstal·lació de l'aplicació $(^NameDA). Voleu reiniciar-lo ara?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reinicia ara"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reinicia més tard manualment"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Executa l'aplicació $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostra el Llegeix-me"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Finalitza"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Tria la carpeta del menú Inicia"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Tria una carpeta del menú Inicia per a les dreceres de l'aplicació $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccioneu la carpeta del Menú Inicia en la que hi vulgueu crear les dreceres del programa. Podeu introduir-hi un altre nom si voleu crear una carpeta nova."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "No creïs les dreceres"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstal·la l'aplicació $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Suprimeix l'aplicació $(^NameDA) de l'ordinador."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Esteu segur que voleu sortir del programa d'instal·lació de l'aplicació $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Esteu segur que voleu sortir del programa de desinstal·lació de l'aplicació $(^Name)?"
-!endif
+;Language: Catalan (1027)
+;By falanko, corrections by Toni Hermoso Pulido
+
+!insertmacro LANGFILE "Catalan" "Català"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Benvinguts a l'auxiliar d'instal·lació de l'aplicació $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Aquest auxiliar us guiarà durant el procés d'instal·lació de l'aplicació $(^NameDA).$\r$\n$\r$\nEs recomana tancar la resta d'aplicacions abans de començar la instal·lació. Això permetrà al programa d'instal·ació actualitzar fitxers del sistema rellevants sense haver de reiniciar l'ordinador.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Benvinguts a l'auxiliar de desinstal·lació de l'aplicació $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Aquest auxiliar us guiarà a través de la desinstal·lació de l'aplicació $(^NameDA).$\r$\n\rAbans de començar la desinstal·lació, assegureu-vos que l'aplicació $(^NameDA) no s'està executant.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Acord de Llicència"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Reviseu els termes de la llicència abans d'instal·lar l'aplicació $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si accepteu tots els termes de l'acord, premeu Hi estic d'acord per a continuar. Heu d'acceptar l'acord per a poder instal·lar l'aplicació $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si accepteu tots els termes de l'acord, activeu la casella de sota. Heu d'acceptar l'acord per poder instal·lar l'aplicació $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. Heu d'acceptar l'acord per a poder instal·lar $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Acord de llicència"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Reviseu els termes de la llicència abans de desinstal·lar l'aplicació $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si accepteu tots els termes de l'acord, premeu Hi estic d'Acord per a continuar. Heu d'acceptar l'acord per a poder desinstal·lar l'aplicació $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si accepteu tots els termes de l'acord, activeu la casella de sota. Heu d'acceptar l'acord per a poder desinstal·lar l'aplicació $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si accepteu tots els termes de l'acord, seleccioneu la primera opció de sota. Heu d'acceptar l'acord per a poder desinstal·lar l'aplicació $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Premeu AvPàg per a veure la resta de l'acord."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selecció de components"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Seleccioneu quines característiques de l'aplicació $(^NameDA) desitgeu instal·lar."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descripció"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selecció de components"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Seleccioneu quines característiques de l'aplicació $(^NameDA) desitgeu desinstal·lar."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Situeu el ratolí damunt d'un component per a veure'n la descripció."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Situeu el ratolí damunt d'un component per a veure'n la descripció."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Trieu una ubicació d'instal·lació"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Trieu la carpeta on instal·lar-hi l'aplicació $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Trieu la ubicació de desinstal·lació"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Trieu la carpeta d'on desinstal·lar l'aplicació $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "S'està instal·lant"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Si us plau, espereu mentre l'aplicació $(^NameDA) s'instal·la."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "S'ha acabat la instal·lació"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "La instal·lació ha acabat correctament."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "S'ha abandonat la instal·lació"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "La instal·lació no ha acabat correctament."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "S'està desinstal·lant"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Si us plau, espereu mentre l'aplicació $(^NameDA) es desinstal·la."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "S'ha acabat la desinstal·lació"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La desinstal·lació s'ha realitzat correctament."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "S'ha abandonat la desinstal·lació"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La desinstal·lació no ha acabat correctament."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "S'està acabant l'auxiliar d'instal·lació de l'aplicació $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "L'aplicació $(^NameDA) s'ha instal·lat a l'ordinador.$\r$\n$\r$\nFeu clic a Finalitza per a tancar aquest auxiliar."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Cal reiniciar l'ordinador perquè pugui acabar-se la instal·lació de l'aplicació $(^NameDA). Voleu reiniciar-lo ara?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "S'està acabant l'auxiliar de desinstal·lació de l'aplicació $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "L'aplicació $(^NameDA) s'ha desinstal·lat de l'ordinador.$\r$\n$\r$\nFeu clic a Finalitza per a tancar aquest auxiliar."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Cal reiniciar l'ordinador perquè pugui acabar-se la desinstal·lació de l'aplicació $(^NameDA). Voleu reiniciar-lo ara?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reinicia ara"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reinicia més tard manualment"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Executa l'aplicació $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostra el Llegeix-me"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Finalitza"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Tria la carpeta del menú Inicia"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Tria una carpeta del menú Inicia per a les dreceres de l'aplicació $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccioneu la carpeta del Menú Inicia en la que hi vulgueu crear les dreceres del programa. Podeu introduir-hi un altre nom si voleu crear una carpeta nova."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "No creïs les dreceres"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstal·la l'aplicació $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Suprimeix l'aplicació $(^NameDA) de l'ordinador."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Esteu segur que voleu sortir del programa d'instal·lació de l'aplicació $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Esteu segur que voleu sortir del programa de desinstal·lació de l'aplicació $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Croatian.nlf b/Contrib/Language files/Croatian.nlf
index 1b641be..b70ca36 100755
--- a/Contrib/Language files/Croatian.nlf
+++ b/Contrib/Language files/Croatian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1050
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Igor Ostriz
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Instalacija
-# ^UninstallCaption
-$(^Name) Uklanjanje
-# ^LicenseSubCaption
-: Licenenèni uvjeti
-# ^ComponentsSubCaption
-: Instalacijske opcije
-# ^DirSubCaption
-: Instalacijska mapa
-# ^InstallingSubCaption
-: Instaliranje
-# ^CompletedSubCaption
-: Završeno
-# ^UnComponentsSubCaption
-: Opcije uklanjanja
-# ^UnDirSubCaption
-: Mapa uklanjanja
-# ^ConfirmSubCaption
-: Potvrda
-# ^UninstallingSubCaption
-: Uklanjanje
-# ^UnCompletedSubCaption
-: Završeno
-# ^BackBtn
-< &Nazad
-# ^NextBtn
-&Dalje >
-# ^AgreeBtn
-&Prihvaæam
-# ^AcceptBtn
-&Prihvaæam uvjete licenènog ugovora
-# ^DontAcceptBtn
-&Ne prihvaæam uvjete licenènog ugovora
-# ^InstallBtn
-&Instaliraj
-# ^UninstallBtn
-&Ukloni
-# ^CancelBtn
-Odustani
-# ^CloseBtn
-&Zatvori
-# ^BrowseBtn
-&Pregledaj...
-# ^ShowDetailsBtn
-Prikaži &detalje
-# ^ClickNext
-Za nastavak odaberite 'Dalje'.
-# ^ClickInstall
-Za poèetak instalacije odaberite 'Instaliraj'.
-# ^ClickUninstall
-Za poèetak uklanjanja odaberite 'Ukloni'.
-# ^Name
-Ime
-# ^Completed
-Završeno
-# ^LicenseText
-Molim proèitajte licencu prije instalacije programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite 'Prihvaæam'.
-# ^LicenseTextCB
-Molim proèitajte licencu prije instalacije programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, oznaèite donji kvadratiæ. $_CLICK
-# ^LicenseTextRB
-Molim proèitajte licencu prije instalacije programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite prvu donju opciju. $_CLICK
-# ^UnLicenseText
-Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite 'Prihvaæam'.
-# ^UnLicenseTextCB
-Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, oznaèite donji kvadratiæ. $_CLICK
-# ^UnLicenseTextRB
-Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite prvu donju opciju. $_CLICK
-# ^Custom
-Posebna
-# ^ComponentsText
-Oznaèite komponente koje želite instalirati i uklonite oznaku s onih koje ne želite instalirati. $_CLICK
-# ^ComponentsSubText1
-Izaberite tip instalacije:
-# ^ComponentsSubText2_NoInstTypes
-Odaberite komponente za instalaciju:
-# ^ComponentsSubText2
-Ili po izboru oznaèite komponente koje želite instalirati:
-# ^UnComponentsText
-Oznaèite komponente koje želite ukloniti i uklonite oznaku s onih koje ne želite ukloniti. $_CLICK
-# ^UnComponentsSubText1
-Izaberite tip uklanjanja:
-# ^UnComponentsSubText2_NoInstTypes
-Odaberite komponente za uklanjanje:
-# ^UnComponentsSubText2
-Ili po izboru oznaèite komponente koje želite ukloniti:
-# ^DirText
-Program $(^NameDA) æe biti instaliran u slijedeæu mapu. Za instalaciju na drugo odredište odaberite 'Pregledaj' i oznaèite drugu mapu. $_CLICK
-# ^DirSubText
-Odredišna mapa
-# ^DirBrowseText
-Odaberite mapu u koju želite instalirati program $(^NameDA):
-# ^UnDirText
-Program $(^NameDA) æe biti uklonjen iz slijedeæe mape. Za uklanjanje s drugog mjesta odaberite 'Pregledaj' i oznaèite drugu mapu. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Mapa iz koje æe program $(^NameDA) biti uklonjen:
-# ^SpaceAvailable
-"Slobodno prostora na disku: "
-# ^SpaceRequired
-"Potrebno prostora na disku: "
-# ^UninstallingText
-Program $(^NameDA) æe biti uklonjen iz slijedeæe mape. $_CLICK
-# ^UninstallingSubText
-Uklanjam iz:
-# ^FileError
-Greška prilikom otvaranja datoteke za zapisivanje: \r\n\t"$0"\r\n\"Abort\" za prekid instalacije,\r\n\"Retry\" za ponovni pokušaj zapisivanja, ili\r\n\"Ignore\" za zanemarenje te datoteke
-# ^FileError_NoIgnore
-Greška prilikom otvaranja datoteke za zapisivanje: \r\n\t"$0"\r\n\"Retry\" za ponovni pokušaj zapisivanja, ili\r\n\"Cancel\" za prekid instalacije
-# ^CantWrite
-"Ne mogu zapisati: "
-# ^CopyFailed
-Greška prilikom kopiranja
-# ^CopyTo
-"Kopiraj u "
-# ^Registering
-"Prijava: "
-# ^Unregistering
-"Odjava: "
-# ^SymbolNotFound
-"Ne mogu naæi simbol: "
-# ^CouldNotLoad
-"Ne mogu uèitati: "
-# ^CreateFolder
-"Stvori mapu: "
-# ^CreateShortcut
-"Stvori preèac: "
-# ^CreatedUninstaller
-"Program za uklanjanje: "
-# ^Delete
-"Obriši datoteku: "
-# ^DeleteOnReboot
-"Obriši prilikom ponovnog pokretanja: "
-# ^ErrorCreatingShortcut
-"Greška prilikom stvaranja preèaca: "
-# ^ErrorCreating
-"Greška prilikom stvaranja: "
-# ^ErrorDecompressing
-Greška dekompresije podataka! Ošteæena instalacijska datoteka?
-# ^ErrorRegistering
-Greška prilikom prijavljivanja DLLa
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Izvrši: "
-# ^Extract
-"Otpakiraj: "
-# ^ErrorWriting
-"Otpakiranje: greška zapisivanja u datoteku "
-# ^InvalidOpcode
-Ošteæena instalacijska datoteka: neispravni opkod
-# ^NoOLE
-"Nema OLE za: "
-# ^OutputFolder
-"Izlazna mapa: "
-# ^RemoveFolder
-"Obriši mapu: "
-# ^RenameOnReboot
-"Preimenuj prilikom ponovnog pokretanja: "
-# ^Rename
-"Preimenuj: "
-# ^Skipped
-"Preskoèeno: "
-# ^CopyDetails
-Kopiraj detalje u Clipboard
-# ^LogInstall
-Logiraj instalacijski proces
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1050
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Igor Ostriz
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Instalacija
+# ^UninstallCaption
+$(^Name) Uklanjanje
+# ^LicenseSubCaption
+: Licenenèni uvjeti
+# ^ComponentsSubCaption
+: Instalacijske opcije
+# ^DirSubCaption
+: Instalacijska mapa
+# ^InstallingSubCaption
+: Instaliranje
+# ^CompletedSubCaption
+: Završeno
+# ^UnComponentsSubCaption
+: Opcije uklanjanja
+# ^UnDirSubCaption
+: Mapa uklanjanja
+# ^ConfirmSubCaption
+: Potvrda
+# ^UninstallingSubCaption
+: Uklanjanje
+# ^UnCompletedSubCaption
+: Završeno
+# ^BackBtn
+< &Nazad
+# ^NextBtn
+&Dalje >
+# ^AgreeBtn
+&Prihvaæam
+# ^AcceptBtn
+&Prihvaæam uvjete licenènog ugovora
+# ^DontAcceptBtn
+&Ne prihvaæam uvjete licenènog ugovora
+# ^InstallBtn
+&Instaliraj
+# ^UninstallBtn
+&Ukloni
+# ^CancelBtn
+Odustani
+# ^CloseBtn
+&Zatvori
+# ^BrowseBtn
+&Pregledaj...
+# ^ShowDetailsBtn
+Prikaži &detalje
+# ^ClickNext
+Za nastavak odaberite 'Dalje'.
+# ^ClickInstall
+Za poèetak instalacije odaberite 'Instaliraj'.
+# ^ClickUninstall
+Za poèetak uklanjanja odaberite 'Ukloni'.
+# ^Name
+Ime
+# ^Completed
+Završeno
+# ^LicenseText
+Molim proèitajte licencu prije instalacije programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite 'Prihvaæam'.
+# ^LicenseTextCB
+Molim proèitajte licencu prije instalacije programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, oznaèite donji kvadratiæ. $_CLICK
+# ^LicenseTextRB
+Molim proèitajte licencu prije instalacije programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite prvu donju opciju. $_CLICK
+# ^UnLicenseText
+Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite 'Prihvaæam'.
+# ^UnLicenseTextCB
+Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, oznaèite donji kvadratiæ. $_CLICK
+# ^UnLicenseTextRB
+Molim proèitajte licencu prije uklanjanja programa $(^NameDA). Ukoliko prihvaæate sve uvjete ugovora, odaberite prvu donju opciju. $_CLICK
+# ^Custom
+Posebna
+# ^ComponentsText
+Oznaèite komponente koje želite instalirati i uklonite oznaku s onih koje ne želite instalirati. $_CLICK
+# ^ComponentsSubText1
+Izaberite tip instalacije:
+# ^ComponentsSubText2_NoInstTypes
+Odaberite komponente za instalaciju:
+# ^ComponentsSubText2
+Ili po izboru oznaèite komponente koje želite instalirati:
+# ^UnComponentsText
+Oznaèite komponente koje želite ukloniti i uklonite oznaku s onih koje ne želite ukloniti. $_CLICK
+# ^UnComponentsSubText1
+Izaberite tip uklanjanja:
+# ^UnComponentsSubText2_NoInstTypes
+Odaberite komponente za uklanjanje:
+# ^UnComponentsSubText2
+Ili po izboru oznaèite komponente koje želite ukloniti:
+# ^DirText
+Program $(^NameDA) æe biti instaliran u slijedeæu mapu. Za instalaciju na drugo odredište odaberite 'Pregledaj' i oznaèite drugu mapu. $_CLICK
+# ^DirSubText
+Odredišna mapa
+# ^DirBrowseText
+Odaberite mapu u koju želite instalirati program $(^NameDA):
+# ^UnDirText
+Program $(^NameDA) æe biti uklonjen iz slijedeæe mape. Za uklanjanje s drugog mjesta odaberite 'Pregledaj' i oznaèite drugu mapu. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Mapa iz koje æe program $(^NameDA) biti uklonjen:
+# ^SpaceAvailable
+"Slobodno prostora na disku: "
+# ^SpaceRequired
+"Potrebno prostora na disku: "
+# ^UninstallingText
+Program $(^NameDA) æe biti uklonjen iz slijedeæe mape. $_CLICK
+# ^UninstallingSubText
+Uklanjam iz:
+# ^FileError
+Greška prilikom otvaranja datoteke za zapisivanje: \r\n\t"$0"\r\n\"Abort\" za prekid instalacije,\r\n\"Retry\" za ponovni pokušaj zapisivanja, ili\r\n\"Ignore\" za zanemarenje te datoteke
+# ^FileError_NoIgnore
+Greška prilikom otvaranja datoteke za zapisivanje: \r\n\t"$0"\r\n\"Retry\" za ponovni pokušaj zapisivanja, ili\r\n\"Cancel\" za prekid instalacije
+# ^CantWrite
+"Ne mogu zapisati: "
+# ^CopyFailed
+Greška prilikom kopiranja
+# ^CopyTo
+"Kopiraj u "
+# ^Registering
+"Prijava: "
+# ^Unregistering
+"Odjava: "
+# ^SymbolNotFound
+"Ne mogu naæi simbol: "
+# ^CouldNotLoad
+"Ne mogu uèitati: "
+# ^CreateFolder
+"Stvori mapu: "
+# ^CreateShortcut
+"Stvori preèac: "
+# ^CreatedUninstaller
+"Program za uklanjanje: "
+# ^Delete
+"Obriši datoteku: "
+# ^DeleteOnReboot
+"Obriši prilikom ponovnog pokretanja: "
+# ^ErrorCreatingShortcut
+"Greška prilikom stvaranja preèaca: "
+# ^ErrorCreating
+"Greška prilikom stvaranja: "
+# ^ErrorDecompressing
+Greška dekompresije podataka! Ošteæena instalacijska datoteka?
+# ^ErrorRegistering
+Greška prilikom prijavljivanja DLLa
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Izvrši: "
+# ^Extract
+"Otpakiraj: "
+# ^ErrorWriting
+"Otpakiranje: greška zapisivanja u datoteku "
+# ^InvalidOpcode
+Ošteæena instalacijska datoteka: neispravni opkod
+# ^NoOLE
+"Nema OLE za: "
+# ^OutputFolder
+"Izlazna mapa: "
+# ^RemoveFolder
+"Obriši mapu: "
+# ^RenameOnReboot
+"Preimenuj prilikom ponovnog pokretanja: "
+# ^Rename
+"Preimenuj: "
+# ^Skipped
+"Preskoèeno: "
+# ^CopyDetails
+Kopiraj detalje u Clipboard
+# ^LogInstall
+Logiraj instalacijski proces
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Croatian.nsh b/Contrib/Language files/Croatian.nsh
index e24ea46..206376a 100755
--- a/Contrib/Language files/Croatian.nsh
+++ b/Contrib/Language files/Croatian.nsh
@@ -1,121 +1,121 @@
-;Language: Croatian (1050)
-;By Igor Ostriz
-
-!insertmacro LANGFILE "Croatian" "Hrvatski"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli u instalaciju programa $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Instalacija programa $(^NameDA) na Vaše raèunalo sastoji se od nekoliko jednostavnih koraka kroz koje æe Vas provesti ovaj èarobnjak.$\r$\n$\r$\nPreporuèamo zatvaranje svih ostalih aplikacija prije samog poèetka instalacije. To æe omoguæiti nadogradnju nekih sistemskih datoteka bez potrebe za ponovnim pokretanjem Vašeg raèunala. U svakom trenutku instalaciju možete prekinuti pritiskom na 'Odustani'.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli u postupak uklanjanja programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ovaj æe Vas èarobnjak provesti kroz postupak uklanjanja programa $(^NameDA).$\r$\n$\r$\nPrije samog poèetka, molim zatvorite program $(^NameDA) ukoliko je sluèajno otvoren.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèni ugovor"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Molim proèitajte licencu prije instalacije programa $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ukoliko prihvaæate uvjete licence, odaberite 'Prihvaæam' za nastavak. Morate prihvatiti licencu za instalaciju programa $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ukoliko prihvaæate uvjete licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ukoliko prihvaæate uvjete licence, odaberite prvu donju opciju. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèni ugovor"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Molim proèitajte licencu prije uklanjanja programa $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ukoliko prihvaæate uvjete licence, odaberite 'Prihvaæam' za nastavak. Morate prihvatiti licencu za uklanjanje programa $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ukoliko prihvaæate uvjete licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ukoliko prihvaæate uvjete licence, odaberite prvu donju opciju. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "'Page Down' za ostatak licence."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponenti"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Odaberite komponente programa $(^NameDA) koje želite instalirati."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponenti"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Odaberite koje komponente programa $(^NameDA) želite ukloniti."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite pokazivaè iznad komponente za njezin opis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite pokazivaè iznad komponente za njezin opis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Odaberite odredište za instalaciju"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Odaberite mapu u koju želite instalirati program $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Odaberite polazište za uklanjanje"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Odaberite mapu iz koje želite ukloniti program $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instaliranje"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Molim prièekajte na završetak instalacije programa $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Kraj instalacije"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacija je u potpunosti završila uspješno."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalacija je prekinuta"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacija nije završila uspješno."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uklanjanje"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Molim prièekajte na završetak uklanjanja programa $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uklanjanje završeno"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uklanjanje je u potpunosti završilo uspješno."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uklanjanje je prekinuto"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uklanjanje nije završilo uspješno."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dovršenje instalacije programa $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) je instaliran na Vaše raèunalo.$\r$\n$\r$\nOdaberite 'Kraj' za završetak."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Vaše raèunalo treba ponovno pokrenuti za dovršenje instalacije programa $(^NameDA). Želite li to uèiniti sada?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Završetak uklanjanja programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) je uklonjen s Vašeg raèunala.$\r$\n$\r$\nOdaberite 'Kraj' za zatvaranje ovog èarobnjaka."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Vaše raèunalo treba ponovno pokrenuti za dovršenje postupka uklanjanja programa $(^NameDA). Želite li to uèiniti sada?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ponovno pokreni raèunalo sada"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ponovno æu pokrenuti raèunalo kasnije"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Pokreni program $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Prikaži &Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Kraj"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izbor mape u Start meniju"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Odaberite ime za programsku mapu unutar Start menija."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Program æe pripadati odabranoj programskoj mapi u Start meniju. Možete odrediti novo ime za mapu ili odabrati veæ postojeæu."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nemoj napraviti preèace"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uklanjanje programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Program $(^NameDA) æe biti uklonjen s Vašeg raèunala."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti instalaciju programa $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti uklanjanje programa $(^Name)?"
-!endif
+;Language: Croatian (1050)
+;By Igor Ostriz
+
+!insertmacro LANGFILE "Croatian" "Hrvatski"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli u instalaciju programa $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Instalacija programa $(^NameDA) na Vaše raèunalo sastoji se od nekoliko jednostavnih koraka kroz koje æe Vas provesti ovaj èarobnjak.$\r$\n$\r$\nPreporuèamo zatvaranje svih ostalih aplikacija prije samog poèetka instalacije. To æe omoguæiti nadogradnju nekih sistemskih datoteka bez potrebe za ponovnim pokretanjem Vašeg raèunala. U svakom trenutku instalaciju možete prekinuti pritiskom na 'Odustani'.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli u postupak uklanjanja programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ovaj æe Vas èarobnjak provesti kroz postupak uklanjanja programa $(^NameDA).$\r$\n$\r$\nPrije samog poèetka, molim zatvorite program $(^NameDA) ukoliko je sluèajno otvoren.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèni ugovor"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Molim proèitajte licencu prije instalacije programa $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ukoliko prihvaæate uvjete licence, odaberite 'Prihvaæam' za nastavak. Morate prihvatiti licencu za instalaciju programa $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ukoliko prihvaæate uvjete licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ukoliko prihvaæate uvjete licence, odaberite prvu donju opciju. Morate prihvatiti licencu za instalaciju programa $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèni ugovor"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Molim proèitajte licencu prije uklanjanja programa $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ukoliko prihvaæate uvjete licence, odaberite 'Prihvaæam' za nastavak. Morate prihvatiti licencu za uklanjanje programa $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ukoliko prihvaæate uvjete licence, oznaèite donji kvadratiæ. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ukoliko prihvaæate uvjete licence, odaberite prvu donju opciju. Morate prihvatiti licencu za uklanjanje programa $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "'Page Down' za ostatak licence."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponenti"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Odaberite komponente programa $(^NameDA) koje želite instalirati."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponenti"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Odaberite koje komponente programa $(^NameDA) želite ukloniti."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite pokazivaè iznad komponente za njezin opis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Postavite pokazivaè iznad komponente za njezin opis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Odaberite odredište za instalaciju"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Odaberite mapu u koju želite instalirati program $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Odaberite polazište za uklanjanje"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Odaberite mapu iz koje želite ukloniti program $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instaliranje"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Molim prièekajte na završetak instalacije programa $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Kraj instalacije"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacija je u potpunosti završila uspješno."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalacija je prekinuta"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacija nije završila uspješno."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uklanjanje"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Molim prièekajte na završetak uklanjanja programa $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uklanjanje završeno"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uklanjanje je u potpunosti završilo uspješno."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uklanjanje je prekinuto"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uklanjanje nije završilo uspješno."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dovršenje instalacije programa $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) je instaliran na Vaše raèunalo.$\r$\n$\r$\nOdaberite 'Kraj' za završetak."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Vaše raèunalo treba ponovno pokrenuti za dovršenje instalacije programa $(^NameDA). Želite li to uèiniti sada?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Završetak uklanjanja programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) je uklonjen s Vašeg raèunala.$\r$\n$\r$\nOdaberite 'Kraj' za zatvaranje ovog èarobnjaka."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Vaše raèunalo treba ponovno pokrenuti za dovršenje postupka uklanjanja programa $(^NameDA). Želite li to uèiniti sada?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ponovno pokreni raèunalo sada"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ponovno æu pokrenuti raèunalo kasnije"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Pokreni program $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Prikaži &Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Kraj"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izbor mape u Start meniju"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Odaberite ime za programsku mapu unutar Start menija."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Program æe pripadati odabranoj programskoj mapi u Start meniju. Možete odrediti novo ime za mapu ili odabrati veæ postojeæu."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nemoj napraviti preèace"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uklanjanje programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Program $(^NameDA) æe biti uklonjen s Vašeg raèunala."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti instalaciju programa $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Jeste li sigurni da želite prekinuti uklanjanje programa $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Czech.nlf b/Contrib/Language files/Czech.nlf
index 7a39dd3..534d4fe 100755
--- a/Contrib/Language files/Czech.nlf
+++ b/Contrib/Language files/Czech.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1029
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by SELiCE (ls@selice.cz - http://ls.selice.cz)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Instalovat $(^Name)
-# ^UninstallCaption
-Odinstalovat $(^Name)
-# ^LicenseSubCaption
-: Licenèní ujednání
-# ^ComponentsSubCaption
-: Možnosti instalace
-# ^DirSubCaption
-: Umístìní instalace
-# ^InstallingSubCaption
-: Instaluje se
-# ^CompletedSubCaption
-: Dokonèeno
-# ^UnComponentsSubCaption
-: Možnosti odinstalace
-# ^UnDirSubCaption
-: Odinstalovat adresáø
-# ^ConfirmSubCaption
-: Potvrzení
-# ^UninstallingSubCaption
-: Odinstalování
-# ^UnCompletedSubCaption
-: Dokonèeno
-# ^BackBtn
-< &Zpìt
-# ^NextBtn
-&Další >
-# ^AgreeBtn
-Souhl&asím
-# ^AcceptBtn
-Souhl&asím s podmínkami Licenèního ujednání
-# ^DontAcceptBtn
-&Nesouhlasím s podmínkami Licenèního ujednání
-# ^InstallBtn
-&Instalovat
-# ^UninstallBtn
-&Odinstalovat
-# ^CancelBtn
-Storno
-# ^CloseBtn
-&Zavøít
-# ^BrowseBtn
-P&rocházet...
-# ^ShowDetailsBtn
-Zobrazit &detaily
-# ^ClickNext
-Pro pokraèování kliknìte na 'Další'.
-# ^ClickInstall
-Kliknìte na 'Instalovat' pro zahájení instalace.
-# ^ClickUninstall
-Kliknìte na 'Odinstalovat' pro zahájení odinstalace.
-# ^Name
-Název
-# ^Completed
-Dokonèeno
-# ^LicenseText
-Pøed instalací $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, kliknìte 'Souhlasím'.
-# ^LicenseTextCB
-Pøed instalací $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte políèko dole. $_CLICK
-# ^LicenseTextRB
-Pøed instalací $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte níže první možnost. $_CLICK
-# ^UnLicenseText
-Pøed odinstalování $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, kliknìte 'Souhlasím'.
-# ^UnLicenseTextCB
-Pøed odinstalování $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte políèko dole. $_CLICK
-# ^UnLicenseTextRB
-Pøed odinstalování $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte níže první možnost. $_CLICK
-# ^Custom
-Vlastní
-# ^ComponentsText
-Zvolte souèásti, které chcete nainstalovat a nezatrhnìte souèásti, které instalovat nechcete. $_CLICK
-# ^ComponentsSubText1
-Zvolte zpùsob instalace:
-# ^ComponentsSubText2_NoInstTypes
-Zvolte souèásti k instalaci:
-# ^ComponentsSubText2
-Nebo zvolte volitelné souèásti, které chcete nainstalovat:
-# ^UnComponentsText
-Zatrhnìte souèásti, které chcete odinstalovat a nezatrhnìte souèásti, které odinstalovat nechcete. $_CLICK
-# ^UnComponentsSubText1
-Zvolte zpùsob odinstalace:
-# ^UnComponentsSubText2_NoInstTypes
-Zvolte souèásti pro odinstalaci:
-# ^UnComponentsSubText2
-Nebo zvolte jednotlivé souèásti, které chcete odinstalovat:
-# ^DirText
-Setup nyní nainstaluje program $(^NameDA) do následující složky. Pro instalaci do jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
-# ^DirSubText
-Cílová složka
-# ^DirBrowseText
-Zvolte složku kam instalovat program $(^NameDA):
-# ^UnDirText
-Setup nyní odinstaluje program $(^NameDA) z následující složky. Pro odinstalaci z jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Zvolte adresáø pro odinstalaci $(^NameDA) z:
-# ^SpaceAvailable
-"Volné místo: "
-# ^SpaceRequired
-"Potøebné místo: "
-# ^UninstallingText
-Tento prùvodce z Vašeho poèítaèe odinstaluje $(^NameDA). $_CLICK
-# ^UninstallingSubText
-Odinstalovat z:
-# ^FileError
-Nelze otevøít soubor pro zápis: \r\n\t"$0"\r\nStisknìte 'Pøerušit' pro ukonèení instalace\r\nnebo 'Znovu' pro další pokus nebo\r\n'Ignorovat' pro pøeskoèení souboru
-# ^FileError_NoIgnore
-Nelze otevøít soubor pro zápis: \r\n\t"$0"\r\nStisknìte 'Znovu' pro další pokus nebo\r\n*Storno* pro ukonèení instalace
-# ^CantWrite
-"Nelze zapsat: "
-# ^CopyFailed
-Kopírování selhalo
-# ^CopyTo
-"Zkopírovat do "
-# ^Registering
-"Registrování: "
-# ^Unregistering
-"Odregistrování: "
-# ^SymbolNotFound
-"Nelze najít znak: "
-# ^CouldNotLoad
-"Nelze naèíst: "
-# ^CreateFolder
-"Vytvoøen adresáø: "
-# ^CreateShortcut
-"Vytvoøen zástupce: "
-# ^CreatedUninstaller
-"Vytvoøen odinstalátor: "
-# ^Delete
-"Smazat soubor: "
-# ^DeleteOnReboot
-"Smazat po restartu: "
-# ^ErrorCreatingShortcut
-"Chyba pøi vytváøení zástupce: "
-# ^ErrorCreating
-"Chyba pøi vytváøení: "
-# ^ErrorDecompressing
-Chyba pøi rozbalování dat! Poškozený instalátor?
-# ^ErrorRegistering
-Chyba pøi registrování DLL
-# ^ExecShell
-"Spustit shell: "
-# ^Exec
-"Spustit: "
-# ^Extract
-"Rozbalit: "
-# ^ErrorWriting
-"Rozbalit: chyba pøi zápisu do souboru "
-# ^InvalidOpcode
-Instalátor je poškozen: nesprávný kontrolní kód
-# ^NoOLE
-"Nedostupné OLE pro: "
-# ^OutputFolder
-"Výstupní složka: "
-# ^RemoveFolder
-"Odstranit složku: "
-# ^RenameOnReboot
-"Pøejmenovat pøi restartu: "
-# ^Rename
-"Pøejmenováno: "
-# ^Skipped
-"Pøeskoèeno: "
-# ^CopyDetails
-Zkopírovat podrobnosti do schránky
-# ^LogInstall
-Zaznamenat prùbìh instalace
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1029
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by SELiCE (ls@selice.cz - http://ls.selice.cz)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Instalovat $(^Name)
+# ^UninstallCaption
+Odinstalovat $(^Name)
+# ^LicenseSubCaption
+: Licenèní ujednání
+# ^ComponentsSubCaption
+: Možnosti instalace
+# ^DirSubCaption
+: Umístìní instalace
+# ^InstallingSubCaption
+: Instaluje se
+# ^CompletedSubCaption
+: Dokonèeno
+# ^UnComponentsSubCaption
+: Možnosti odinstalace
+# ^UnDirSubCaption
+: Odinstalovat adresáø
+# ^ConfirmSubCaption
+: Potvrzení
+# ^UninstallingSubCaption
+: Odinstalování
+# ^UnCompletedSubCaption
+: Dokonèeno
+# ^BackBtn
+< &Zpìt
+# ^NextBtn
+&Další >
+# ^AgreeBtn
+Souhl&asím
+# ^AcceptBtn
+Souhl&asím s podmínkami Licenèního ujednání
+# ^DontAcceptBtn
+&Nesouhlasím s podmínkami Licenèního ujednání
+# ^InstallBtn
+&Instalovat
+# ^UninstallBtn
+&Odinstalovat
+# ^CancelBtn
+Storno
+# ^CloseBtn
+&Zavøít
+# ^BrowseBtn
+P&rocházet...
+# ^ShowDetailsBtn
+Zobrazit &detaily
+# ^ClickNext
+Pro pokraèování kliknìte na 'Další'.
+# ^ClickInstall
+Kliknìte na 'Instalovat' pro zahájení instalace.
+# ^ClickUninstall
+Kliknìte na 'Odinstalovat' pro zahájení odinstalace.
+# ^Name
+Název
+# ^Completed
+Dokonèeno
+# ^LicenseText
+Pøed instalací $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, kliknìte 'Souhlasím'.
+# ^LicenseTextCB
+Pøed instalací $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte políèko dole. $_CLICK
+# ^LicenseTextRB
+Pøed instalací $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte níže první možnost. $_CLICK
+# ^UnLicenseText
+Pøed odinstalování $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, kliknìte 'Souhlasím'.
+# ^UnLicenseTextCB
+Pøed odinstalování $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte políèko dole. $_CLICK
+# ^UnLicenseTextRB
+Pøed odinstalování $(^NameDA) si prosím pøeètìte licenèní ujednání. Jestliže souhlasíte se všema podmínkama ujednání, zaškrtnìte níže první možnost. $_CLICK
+# ^Custom
+Vlastní
+# ^ComponentsText
+Zvolte souèásti, které chcete nainstalovat a nezatrhnìte souèásti, které instalovat nechcete. $_CLICK
+# ^ComponentsSubText1
+Zvolte zpùsob instalace:
+# ^ComponentsSubText2_NoInstTypes
+Zvolte souèásti k instalaci:
+# ^ComponentsSubText2
+Nebo zvolte volitelné souèásti, které chcete nainstalovat:
+# ^UnComponentsText
+Zatrhnìte souèásti, které chcete odinstalovat a nezatrhnìte souèásti, které odinstalovat nechcete. $_CLICK
+# ^UnComponentsSubText1
+Zvolte zpùsob odinstalace:
+# ^UnComponentsSubText2_NoInstTypes
+Zvolte souèásti pro odinstalaci:
+# ^UnComponentsSubText2
+Nebo zvolte jednotlivé souèásti, které chcete odinstalovat:
+# ^DirText
+Setup nyní nainstaluje program $(^NameDA) do následující složky. Pro instalaci do jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
+# ^DirSubText
+Cílová složka
+# ^DirBrowseText
+Zvolte složku kam instalovat program $(^NameDA):
+# ^UnDirText
+Setup nyní odinstaluje program $(^NameDA) z následující složky. Pro odinstalaci z jiné složky zvolte 'Procházet' a vyberte jinou složku. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Zvolte adresáø pro odinstalaci $(^NameDA) z:
+# ^SpaceAvailable
+"Volné místo: "
+# ^SpaceRequired
+"Potøebné místo: "
+# ^UninstallingText
+Tento prùvodce z Vašeho poèítaèe odinstaluje $(^NameDA). $_CLICK
+# ^UninstallingSubText
+Odinstalovat z:
+# ^FileError
+Nelze otevøít soubor pro zápis: \r\n\t"$0"\r\nStisknìte 'Pøerušit' pro ukonèení instalace\r\nnebo 'Znovu' pro další pokus nebo\r\n'Ignorovat' pro pøeskoèení souboru
+# ^FileError_NoIgnore
+Nelze otevøít soubor pro zápis: \r\n\t"$0"\r\nStisknìte 'Znovu' pro další pokus nebo\r\n*Storno* pro ukonèení instalace
+# ^CantWrite
+"Nelze zapsat: "
+# ^CopyFailed
+Kopírování selhalo
+# ^CopyTo
+"Zkopírovat do "
+# ^Registering
+"Registrování: "
+# ^Unregistering
+"Odregistrování: "
+# ^SymbolNotFound
+"Nelze najít znak: "
+# ^CouldNotLoad
+"Nelze naèíst: "
+# ^CreateFolder
+"Vytvoøen adresáø: "
+# ^CreateShortcut
+"Vytvoøen zástupce: "
+# ^CreatedUninstaller
+"Vytvoøen odinstalátor: "
+# ^Delete
+"Smazat soubor: "
+# ^DeleteOnReboot
+"Smazat po restartu: "
+# ^ErrorCreatingShortcut
+"Chyba pøi vytváøení zástupce: "
+# ^ErrorCreating
+"Chyba pøi vytváøení: "
+# ^ErrorDecompressing
+Chyba pøi rozbalování dat! Poškozený instalátor?
+# ^ErrorRegistering
+Chyba pøi registrování DLL
+# ^ExecShell
+"Spustit shell: "
+# ^Exec
+"Spustit: "
+# ^Extract
+"Rozbalit: "
+# ^ErrorWriting
+"Rozbalit: chyba pøi zápisu do souboru "
+# ^InvalidOpcode
+Instalátor je poškozen: nesprávný kontrolní kód
+# ^NoOLE
+"Nedostupné OLE pro: "
+# ^OutputFolder
+"Výstupní složka: "
+# ^RemoveFolder
+"Odstranit složku: "
+# ^RenameOnReboot
+"Pøejmenovat pøi restartu: "
+# ^Rename
+"Pøejmenováno: "
+# ^Skipped
+"Pøeskoèeno: "
+# ^CopyDetails
+Zkopírovat podrobnosti do schránky
+# ^LogInstall
+Zaznamenat prùbìh instalace
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Czech.nsh b/Contrib/Language files/Czech.nsh
index 5960861..67be620 100755
--- a/Contrib/Language files/Czech.nsh
+++ b/Contrib/Language files/Czech.nsh
@@ -1,122 +1,122 @@
-;Language: Czech (1029)
-;By SELiCE (ls@selice.cz - http://ls.selice.cz)
-;Corrected by Ondøej Vaniš - http://www.vanis.cz/ondra
-
-!insertmacro LANGFILE "Czech" "Cesky"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Vítejte v prùvodci instalace programu $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tento prùvodce Vás provede instalací $(^NameDA).$\r$\n$\r$\nPøed zaèátkem instalace je doporuèeno zavøít všechny ostatní aplikace. Toto umožní aktualizovat dùležité systémové soubory bez restartování Vašeho poèítaèe.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Vítejte v $(^NameDA) odinstalaèním prùvodci"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento prùvodce Vás provede odinstalací $(^NameDA).$\r$\n$\r$\nPøed zaèátkem odinstalace, se pøesvìdète, že $(^NameDA) není spuštìn.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèní ujednání"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pøed instalací programu $(^NameDA) si prosím prostudujte licenèní podmínky."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte 'Souhlasím' pro pokraèování. Pro instalaci programu $(^NameDA) je nutné souhlasit s licenèním ujednáním."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jestliže souhlasíte se všemi podmínkami ujednání, zaškrtnìte níže uvedenou volbu. Pro instalaci programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte první z možností uvedených níže. Pro instalaci programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèní ujednání"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pøed odinstalováním programu $(^NameDA) si prosím prostudujte licenèní podmínky."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte 'Souhlasím' pro pokraèování. Pro odinstalování programu $(^NameDA) je nutné souhlasit s licenèním ujednáním."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jestliže souhlasíte se všemi podmínkami ujednání, zaškrtnìte níže uvedenou volbu. Pro odinstalování programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte první z níže uvedených možností. Pro odinstalování programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Stisknutím klávesy Page Down posunete text licenèního ujednání."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Volba souèástí"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zvolte souèásti programu $(^NameDA), které chcete nainstalovat."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Popis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Volba souèástí"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zvolte souèásti programu $(^NameDA), které chcete odinstalovat."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pøi pohybu myší nad instalátorem programu se zobrazí její popis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pøi pohybu myší nad instalátorem programu se zobrazí její popis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zvolte umístìní instalace"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Zvolte složku, do které bude program $(^NameDA) nainstalován."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Zvolte umístìní odinstalace"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Zvolte složku, ze které bude program $(^NameDA) odinstalován."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalace"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vyèkejte, prosím, na dokonèení instalace programu $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalace dokonèena"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalace probìhla v poøádku."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalace pøerušena"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalace nebyla dokonèena."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odinstalace"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vyèkejte, prosím, na dokonèení odinstalace programu $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Odinstalace dokonèena"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinstalace probìhla v poøádku."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Odinstalace pøerušena"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odinstalace nebyla dokonèena."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dokonèení prùvodce programu $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) byl nainstalován na Váš poèítaè.$\r$\n$\r$\nKliknìte 'Dokonèit' pro ukonèení prùvodce."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Pro dokonèení instalace programu $(^NameDA) je nutno restartovat poèítaè. Chcete restatovat nyní?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Dokonèuji odinstalaèního prùvodce $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) byl odinstalován z Vašeho poèítaèe.$\r$\n$\r$\nKliknìte na 'Dokonèit' pro ukonèení tohoto prùvodce."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Pro dokonèení odinstalace $(^NameDA) musí být Váš poèítaè restartován. Chcete restartovat nyní?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Restartovat nyní"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Restartovat ruènì pozdìji"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Spustit program $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Zobrazit Èti-mne"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Dokonèit"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Zvolte složku v Nabídce Start"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Zvolte složku v Nabídce Start pro zástupce programu $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Zvolte složku v Nabídce Start, ve které chcete vytvoøit zástupce programu. Mùžete také zadat nové jméno pro vytvoøení nové složky."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nevytváøet zástupce"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinstalovat program $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odebrat program $(^NameDA) z Vašeho poèítaèe."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Opravdu chcete ukonèit instalaci programu $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Skuteènì chcete ukonèit odinstalaci $(^Name)?"
-!endif
+;Language: Czech (1029)
+;By SELiCE (ls@selice.cz - http://ls.selice.cz)
+;Corrected by Ondøej Vaniš - http://www.vanis.cz/ondra
+
+!insertmacro LANGFILE "Czech" "Cesky"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Vítejte v prùvodci instalace programu $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tento prùvodce Vás provede instalací $(^NameDA).$\r$\n$\r$\nPøed zaèátkem instalace je doporuèeno zavøít všechny ostatní aplikace. Toto umožní aktualizovat dùležité systémové soubory bez restartování Vašeho poèítaèe.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Vítejte v $(^NameDA) odinstalaèním prùvodci"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento prùvodce Vás provede odinstalací $(^NameDA).$\r$\n$\r$\nPøed zaèátkem odinstalace, se pøesvìdète, že $(^NameDA) není spuštìn.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèní ujednání"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pøed instalací programu $(^NameDA) si prosím prostudujte licenèní podmínky."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte 'Souhlasím' pro pokraèování. Pro instalaci programu $(^NameDA) je nutné souhlasit s licenèním ujednáním."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jestliže souhlasíte se všemi podmínkami ujednání, zaškrtnìte níže uvedenou volbu. Pro instalaci programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte první z možností uvedených níže. Pro instalaci programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèní ujednání"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pøed odinstalováním programu $(^NameDA) si prosím prostudujte licenèní podmínky."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte 'Souhlasím' pro pokraèování. Pro odinstalování programu $(^NameDA) je nutné souhlasit s licenèním ujednáním."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jestliže souhlasíte se všemi podmínkami ujednání, zaškrtnìte níže uvedenou volbu. Pro odinstalování programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jestliže souhlasíte se všemi podmínkami ujednání, zvolte první z níže uvedených možností. Pro odinstalování programu $(^NameDA) je nutné souhlasit s licenèním ujednáním. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Stisknutím klávesy Page Down posunete text licenèního ujednání."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Volba souèástí"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zvolte souèásti programu $(^NameDA), které chcete nainstalovat."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Popis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Volba souèástí"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zvolte souèásti programu $(^NameDA), které chcete odinstalovat."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pøi pohybu myší nad instalátorem programu se zobrazí její popis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pøi pohybu myší nad instalátorem programu se zobrazí její popis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zvolte umístìní instalace"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Zvolte složku, do které bude program $(^NameDA) nainstalován."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Zvolte umístìní odinstalace"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Zvolte složku, ze které bude program $(^NameDA) odinstalován."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalace"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vyèkejte, prosím, na dokonèení instalace programu $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalace dokonèena"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalace probìhla v poøádku."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalace pøerušena"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalace nebyla dokonèena."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odinstalace"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vyèkejte, prosím, na dokonèení odinstalace programu $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Odinstalace dokonèena"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinstalace probìhla v poøádku."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Odinstalace pøerušena"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odinstalace nebyla dokonèena."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dokonèení prùvodce programu $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) byl nainstalován na Váš poèítaè.$\r$\n$\r$\nKliknìte 'Dokonèit' pro ukonèení prùvodce."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Pro dokonèení instalace programu $(^NameDA) je nutno restartovat poèítaè. Chcete restatovat nyní?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Dokonèuji odinstalaèního prùvodce $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) byl odinstalován z Vašeho poèítaèe.$\r$\n$\r$\nKliknìte na 'Dokonèit' pro ukonèení tohoto prùvodce."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Pro dokonèení odinstalace $(^NameDA) musí být Váš poèítaè restartován. Chcete restartovat nyní?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Restartovat nyní"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Restartovat ruènì pozdìji"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Spustit program $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Zobrazit Èti-mne"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Dokonèit"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Zvolte složku v Nabídce Start"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Zvolte složku v Nabídce Start pro zástupce programu $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Zvolte složku v Nabídce Start, ve které chcete vytvoøit zástupce programu. Mùžete také zadat nové jméno pro vytvoøení nové složky."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nevytváøet zástupce"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinstalovat program $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odebrat program $(^NameDA) z Vašeho poèítaèe."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Opravdu chcete ukonèit instalaci programu $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Skuteènì chcete ukonèit odinstalaci $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Danish.nlf b/Contrib/Language files/Danish.nlf
index 4bf59a3..10e0f54 100755
--- a/Contrib/Language files/Danish.nlf
+++ b/Contrib/Language files/Danish.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1030
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Claus Futtrup
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Installation
-# ^UninstallCaption
-$(^Name) Afinstallation
-# ^LicenseSubCaption
-: Licensaftale
-# ^ComponentsSubCaption
-: Installationsmuligheder
-# ^DirSubCaption
-: Installationsmappe
-# ^InstallingSubCaption
-: Installerer
-# ^CompletedSubCaption
-: Gennemført
-# ^UnComponentsSubCaption
-: Afinstallationsmuligheder
-# ^UnDirSubCaption
-: Afinstallationsmappe
-# ^ConfirmSubCaption
-: Bekræft
-# ^UninstallingSubCaption
-: Afinstallerer
-# ^UnCompletedSubCaption
-: Gennemført
-# ^BackBtn
-< &Tilbage
-# ^NextBtn
-&Næste >
-# ^AgreeBtn
-Jeg &accepterer
-# ^AcceptBtn
-Jeg &accepterer vilkårene i licensaftalen
-# ^DontAcceptBtn
-Jeg &accepterer ikke vilkårene i licensaftalen
-# ^InstallBtn
-&Installer
-# ^UninstallBtn
-&Afinstaller
-# ^CancelBtn
-Afbryd
-# ^CloseBtn
-&Luk
-# ^BrowseBtn
-G&ennemse...
-# ^ShowDetailsBtn
-Vis &detaljer
-# ^ClickNext
-Tryk Næste for at fortsætte.
-# ^ClickInstall
-Tryk Installer for at starte installationen.
-# ^ClickUninstall
-Tryk Afinstaller for at starte afinstallationen.
-# ^Name
-Navn
-# ^Completed
-Gennemført
-# ^LicenseText
-Læs venligst licensaftalen før installationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du trykke 'Jeg accepterer'.
-# ^LicenseTextCB
-Læs venligst licensaftalen før installationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du markere afkrydsningsfeltet nedenfor. $_CLICK
-# ^LicenseTextRB
-Læs venligst licensaftalen før installationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du vælge den første mulighed nedenfor. $_CLICK
-# ^UnLicenseText
-Læs venligst licensaftalen før afinstallationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du trykke 'Jeg accepterer'
-# ^UnLicenseTextCB
-Læs venligst licensaftalen før afinstallationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du markere afkrydsningsfeltet nedenfor. $_CLICK
-# ^UnLicenseTextRB
-Læs venligst licensaftalen før afinstallationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du vælge den første mulighed nedenfor $_CLICK
-# ^Custom
-Brugerdefineret
-# ^ComponentsText
-Marker de komponenter du vil installere, og fjern markeringen af de komponenter du ikke vil installere. $_CLICK
-# ^ComponentsSubText1
-Vælg installationstype:
-# ^ComponentsSubText2_NoInstTypes
-Vælg de komponenter der skal installeres:
-# ^ComponentsSubText2
-Eller vælg de tillægskomponenter komponenter du ønsker at installere:
-# ^UnComponentsText
-Marker de komponenter du vil afinstallere, og fjern markeringen af de komponenter du ikke vil afinstallere. $_CLICK
-# ^UnComponentsSubText1
-Vælg afinstallationstype:
-# ^UnComponentsSubText2_NoInstTypes
-Vælg de komponenter der skal afinstalleres:
-# ^UnComponentsSubText2
-Eller vælg de tillægskomponenter du ønsker at afinstallere:
-# ^DirText
-Installationsguiden vil installere $(^NameDA) i følgende mappe. For at installere i en anden mappe, tryk Gennemse og vælg en anden mappe. $_CLICK
-# ^DirSubText
-Destinationsmappe
-# ^DirBrowseText
-Vælg den mappe $(^NameDA) skal installeres i:
-# ^UnDirText
-Installationsguiden vil afinstallere $(^NameDA) fra følgende mappe. For at afinstallere fra en anden mappe, tryk Gennemse og vælg en anden mappe. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Vælg den mappe hvorfra $(^NameDA) skal afinstalleres:
-# ^SpaceAvailable
-"Ledig plads: "
-# ^SpaceRequired
-"Nødvendig plads: "
-# ^UninstallingText
-$(^NameDA) vil blive afinstalleret fra følgende mappe. $_CLICK
-# ^UninstallingSubText
-Afinstallerer fra:
-# ^FileError
-Fejl ved skrivning af fil: \r\n\t"$0"\r\nTryk Afbryd for at afbryde installationen,\r\nPrøv Igen for at prøve at skrive til filen, eller\r\nIgnorer for at springe over denne fil
-# ^FileError_NoIgnore
-Fejl ved åbning af fil: \r\n\t"$0"\r\nTryk Prøv Igen for at prøve at skrive til filen, eller\r\nAfbryd for at afbryde installationen
-# ^CantWrite
-"Kan ikke skrive: "
-# ^CopyFailed
-Kopiering mislykkedes
-# ^CopyTo
-"Kopier til "
-# ^Registering
-"Registrerer: "
-# ^Unregistering
-"Afregisterer: "
-# ^SymbolNotFound
-"Kunne ikke finde symbol: "
-# ^CouldNotLoad
-"Kunne ikke hente: "
-# ^CreateFolder
-"Opret mappe: "
-# ^CreateShortcut
-"Opret genvej: "
-# ^CreatedUninstaller
-"Afinstallationsguide oprettet: "
-# ^Delete
-"Slet fil: "
-# ^DeleteOnReboot
-"Slet ved genstart: "
-# ^ErrorCreatingShortcut
-"Fejl ved oprettelse af genvej: "
-# ^ErrorCreating
-"Fejl ved oprettelse: "
-# ^ErrorDecompressing
-Fejl ved udpakning af data! Installationsguiden skadet?
-# ^ErrorRegistering
-Fejl ved registrering af DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Kør: "
-# ^Extract
-"Udpak: "
-# ^ErrorWriting
-"Udpak: Fejl ved skrivning til fil "
-# ^InvalidOpcode
-Installationsguide i stykker: Ugyldig opcode
-# ^NoOLE
-"Ingen OLE for: "
-# ^OutputFolder
-"Outputmappe: "
-# ^RemoveFolder
-"Slet mappe: "
-# ^RenameOnReboot
-"Omdøb ved genstart: "
-# ^Rename
-"Omdøb: "
-# ^Skipped
-"Sprunget over: "
-# ^CopyDetails
-Kopier detaljer til udklipsholderen
-# ^LogInstall
-Log installationsproces
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1030
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Claus Futtrup
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Installation
+# ^UninstallCaption
+$(^Name) Afinstallation
+# ^LicenseSubCaption
+: Licensaftale
+# ^ComponentsSubCaption
+: Installationsmuligheder
+# ^DirSubCaption
+: Installationsmappe
+# ^InstallingSubCaption
+: Installerer
+# ^CompletedSubCaption
+: Gennemført
+# ^UnComponentsSubCaption
+: Afinstallationsmuligheder
+# ^UnDirSubCaption
+: Afinstallationsmappe
+# ^ConfirmSubCaption
+: Bekræft
+# ^UninstallingSubCaption
+: Afinstallerer
+# ^UnCompletedSubCaption
+: Gennemført
+# ^BackBtn
+< &Tilbage
+# ^NextBtn
+&Næste >
+# ^AgreeBtn
+Jeg &accepterer
+# ^AcceptBtn
+Jeg &accepterer vilkårene i licensaftalen
+# ^DontAcceptBtn
+Jeg &accepterer ikke vilkårene i licensaftalen
+# ^InstallBtn
+&Installer
+# ^UninstallBtn
+&Afinstaller
+# ^CancelBtn
+Afbryd
+# ^CloseBtn
+&Luk
+# ^BrowseBtn
+G&ennemse...
+# ^ShowDetailsBtn
+Vis &detaljer
+# ^ClickNext
+Tryk Næste for at fortsætte.
+# ^ClickInstall
+Tryk Installer for at starte installationen.
+# ^ClickUninstall
+Tryk Afinstaller for at starte afinstallationen.
+# ^Name
+Navn
+# ^Completed
+Gennemført
+# ^LicenseText
+Læs venligst licensaftalen før installationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du trykke 'Jeg accepterer'.
+# ^LicenseTextCB
+Læs venligst licensaftalen før installationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du markere afkrydsningsfeltet nedenfor. $_CLICK
+# ^LicenseTextRB
+Læs venligst licensaftalen før installationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du vælge den første mulighed nedenfor. $_CLICK
+# ^UnLicenseText
+Læs venligst licensaftalen før afinstallationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du trykke 'Jeg accepterer'
+# ^UnLicenseTextCB
+Læs venligst licensaftalen før afinstallationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du markere afkrydsningsfeltet nedenfor. $_CLICK
+# ^UnLicenseTextRB
+Læs venligst licensaftalen før afinstallationen af $(^NameDA). Hvis du accepterer alle betingelser i aftalen, skal du vælge den første mulighed nedenfor $_CLICK
+# ^Custom
+Brugerdefineret
+# ^ComponentsText
+Marker de komponenter du vil installere, og fjern markeringen af de komponenter du ikke vil installere. $_CLICK
+# ^ComponentsSubText1
+Vælg installationstype:
+# ^ComponentsSubText2_NoInstTypes
+Vælg de komponenter der skal installeres:
+# ^ComponentsSubText2
+Eller vælg de tillægskomponenter komponenter du ønsker at installere:
+# ^UnComponentsText
+Marker de komponenter du vil afinstallere, og fjern markeringen af de komponenter du ikke vil afinstallere. $_CLICK
+# ^UnComponentsSubText1
+Vælg afinstallationstype:
+# ^UnComponentsSubText2_NoInstTypes
+Vælg de komponenter der skal afinstalleres:
+# ^UnComponentsSubText2
+Eller vælg de tillægskomponenter du ønsker at afinstallere:
+# ^DirText
+Installationsguiden vil installere $(^NameDA) i følgende mappe. For at installere i en anden mappe, tryk Gennemse og vælg en anden mappe. $_CLICK
+# ^DirSubText
+Destinationsmappe
+# ^DirBrowseText
+Vælg den mappe $(^NameDA) skal installeres i:
+# ^UnDirText
+Installationsguiden vil afinstallere $(^NameDA) fra følgende mappe. For at afinstallere fra en anden mappe, tryk Gennemse og vælg en anden mappe. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Vælg den mappe hvorfra $(^NameDA) skal afinstalleres:
+# ^SpaceAvailable
+"Ledig plads: "
+# ^SpaceRequired
+"Nødvendig plads: "
+# ^UninstallingText
+$(^NameDA) vil blive afinstalleret fra følgende mappe. $_CLICK
+# ^UninstallingSubText
+Afinstallerer fra:
+# ^FileError
+Fejl ved skrivning af fil: \r\n\t"$0"\r\nTryk Afbryd for at afbryde installationen,\r\nPrøv Igen for at prøve at skrive til filen, eller\r\nIgnorer for at springe over denne fil
+# ^FileError_NoIgnore
+Fejl ved åbning af fil: \r\n\t"$0"\r\nTryk Prøv Igen for at prøve at skrive til filen, eller\r\nAfbryd for at afbryde installationen
+# ^CantWrite
+"Kan ikke skrive: "
+# ^CopyFailed
+Kopiering mislykkedes
+# ^CopyTo
+"Kopier til "
+# ^Registering
+"Registrerer: "
+# ^Unregistering
+"Afregisterer: "
+# ^SymbolNotFound
+"Kunne ikke finde symbol: "
+# ^CouldNotLoad
+"Kunne ikke hente: "
+# ^CreateFolder
+"Opret mappe: "
+# ^CreateShortcut
+"Opret genvej: "
+# ^CreatedUninstaller
+"Afinstallationsguide oprettet: "
+# ^Delete
+"Slet fil: "
+# ^DeleteOnReboot
+"Slet ved genstart: "
+# ^ErrorCreatingShortcut
+"Fejl ved oprettelse af genvej: "
+# ^ErrorCreating
+"Fejl ved oprettelse: "
+# ^ErrorDecompressing
+Fejl ved udpakning af data! Installationsguiden skadet?
+# ^ErrorRegistering
+Fejl ved registrering af DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Kør: "
+# ^Extract
+"Udpak: "
+# ^ErrorWriting
+"Udpak: Fejl ved skrivning til fil "
+# ^InvalidOpcode
+Installationsguide i stykker: Ugyldig opcode
+# ^NoOLE
+"Ingen OLE for: "
+# ^OutputFolder
+"Outputmappe: "
+# ^RemoveFolder
+"Slet mappe: "
+# ^RenameOnReboot
+"Omdøb ved genstart: "
+# ^Rename
+"Omdøb: "
+# ^Skipped
+"Sprunget over: "
+# ^CopyDetails
+Kopier detaljer til udklipsholderen
+# ^LogInstall
+Log installationsproces
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Danish.nsh b/Contrib/Language files/Danish.nsh
index 77e236b..1ce97e8 100755
--- a/Contrib/Language files/Danish.nsh
+++ b/Contrib/Language files/Danish.nsh
@@ -1,121 +1,121 @@
-;Language: Danish (1030)
-;By Claus Futtrup
-
-!insertmacro LANGFILE "Danish" "Dansk"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til installationsguiden for $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denne guide vil installere $(^NameDA) på din computer.$\r$\n$\r$\nDet anbefales, at du lukker alle kørende programmer inden start af installationsguiden. Dette vil tillade guiden at opdatere de nødvendige systemfiler uden at skulle genstarte computeren.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til $(^NameDA) afinstallationsguiden"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denne afinstallationsguide vil hjælpe dig gennem afinstallationen af $(^NameDA).$\r$\n$\r$\nFør start af afinstallationen skal du være sikker på at $(^NameDA) ikke kører.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licensaftale"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Læs venligst licensaftalen før du installerer $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Tryk 'Jeg accepterer' hvis du ønsker at accepterer alle vilkårene i aftalen og forsætte. Du skal acceptere vilkårene for at installere $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du accepterer alle vilkårene i aftalen, skal du markere afkrydsningsfeltet nedenfor. Du skal acceptere vilkårene for at installere $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du accepterer alle vilkårene i aftalen, skal du vælge den første mulighed nedenfor. Du skal acceptere vilkårene for at installere $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licensaftale"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Læs venligst licensvilkårene før afinstalleringen af $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Hvis du accepterer vilkårene for aftalen, skal du trykke 'Jeg accepterer' for at fortsætte. Du skal acceptere aftalen for at afinstallere $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du accepterer vilkårene for aftalen, skal du markere afkrydsningsfeltet nedenfor. Du skal acceptere aftalen for at afinstallere $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du accepterer vilkårene for aftalen, skal du vælge den første mulighed nedenfor. Du skal acceptere aftalen for at afinstallere $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tryk Page Down for at se resten af aftalen."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vælg komponenter"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Vælg hvilke features af $(^NameDA) du vil installere."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrivelse"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vælg komponenter"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Vælg hvilke features af $(^NameDA) du vil afinstallere."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Placer musemarkøren over en komponent for at se beskrivelsen af komponenten."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Placer musemarkøren over en komponent for at se beskrivelsen af komponenten."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vælg installationsmappe"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vælg hvilken mappe du vil installere $(^NameDA) i."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Vælg afinstallationsmappe"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vælg den mappe hvorfra du vil afinstallere $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installerer"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vent venligst mens $(^NameDA) bliver installeret."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installation gennemført"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Installationsguiden blev gennemført med succes."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installation afbrudt"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Installationsguiden blev ikke gennemført."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Afinstallerer"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vent venligst mens $(^NameDA) bliver afinstalleret."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Afinstallationen er færdig"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Afinstallationen blev afsluttet med succes."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Afinstallationen er blevet afbrudt"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Afinstallationen blev ikke genmmenført."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Afslutter $(^NameDA) installationsguiden"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er blevet installeret på din computer.$\r$\n$\r$\nTryk 'Afslut' for at lukke installationsguiden."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Din computer skal genstartes før installationen af $(^NameDA) er afsluttet. Vil du genstarte nu?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Afslutter $(^NameDA) afinstallationsguiden"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) er blevet afinstalleret fra din computer.$\r$\n$\r$\nTryk 'Afslut' for at lukke denne guide."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Din computer skal genstartes for at gennemføre afinstallationen af $(^NameDA). Vil du genstarte nu?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Genstart nu"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Jeg genstarter selv på et andet tidspunkt"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Start $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Vis vigtig information"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Afslut"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vælg Start Menu mappe"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vælg en Start Menu mappe til programmets genveje."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vælg Start Menu mappen hvor du vil lave programmets genveje. Du kan også skrive et navn for at oprette en ny mappe."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Opret ikke genveje"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Afinstaller $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Slet $(^NameDA) fra din computer."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Er du sikker på, at du vil afslutte $(^Name) installationen?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Er du sikker på at du vil afbryde $(^Name) afinstallationen?"
-!endif
+;Language: Danish (1030)
+;By Claus Futtrup
+
+!insertmacro LANGFILE "Danish" "Dansk"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til installationsguiden for $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denne guide vil installere $(^NameDA) på din computer.$\r$\n$\r$\nDet anbefales, at du lukker alle kørende programmer inden start af installationsguiden. Dette vil tillade guiden at opdatere de nødvendige systemfiler uden at skulle genstarte computeren.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til $(^NameDA) afinstallationsguiden"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denne afinstallationsguide vil hjælpe dig gennem afinstallationen af $(^NameDA).$\r$\n$\r$\nFør start af afinstallationen skal du være sikker på at $(^NameDA) ikke kører.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licensaftale"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Læs venligst licensaftalen før du installerer $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Tryk 'Jeg accepterer' hvis du ønsker at accepterer alle vilkårene i aftalen og forsætte. Du skal acceptere vilkårene for at installere $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du accepterer alle vilkårene i aftalen, skal du markere afkrydsningsfeltet nedenfor. Du skal acceptere vilkårene for at installere $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du accepterer alle vilkårene i aftalen, skal du vælge den første mulighed nedenfor. Du skal acceptere vilkårene for at installere $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licensaftale"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Læs venligst licensvilkårene før afinstalleringen af $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Hvis du accepterer vilkårene for aftalen, skal du trykke 'Jeg accepterer' for at fortsætte. Du skal acceptere aftalen for at afinstallere $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du accepterer vilkårene for aftalen, skal du markere afkrydsningsfeltet nedenfor. Du skal acceptere aftalen for at afinstallere $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du accepterer vilkårene for aftalen, skal du vælge den første mulighed nedenfor. Du skal acceptere aftalen for at afinstallere $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tryk Page Down for at se resten af aftalen."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vælg komponenter"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Vælg hvilke features af $(^NameDA) du vil installere."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrivelse"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vælg komponenter"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Vælg hvilke features af $(^NameDA) du vil afinstallere."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Placer musemarkøren over en komponent for at se beskrivelsen af komponenten."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Placer musemarkøren over en komponent for at se beskrivelsen af komponenten."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vælg installationsmappe"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vælg hvilken mappe du vil installere $(^NameDA) i."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Vælg afinstallationsmappe"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vælg den mappe hvorfra du vil afinstallere $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installerer"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vent venligst mens $(^NameDA) bliver installeret."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installation gennemført"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Installationsguiden blev gennemført med succes."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installation afbrudt"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Installationsguiden blev ikke gennemført."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Afinstallerer"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vent venligst mens $(^NameDA) bliver afinstalleret."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Afinstallationen er færdig"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Afinstallationen blev afsluttet med succes."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Afinstallationen er blevet afbrudt"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Afinstallationen blev ikke genmmenført."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Afslutter $(^NameDA) installationsguiden"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er blevet installeret på din computer.$\r$\n$\r$\nTryk 'Afslut' for at lukke installationsguiden."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Din computer skal genstartes før installationen af $(^NameDA) er afsluttet. Vil du genstarte nu?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Afslutter $(^NameDA) afinstallationsguiden"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) er blevet afinstalleret fra din computer.$\r$\n$\r$\nTryk 'Afslut' for at lukke denne guide."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Din computer skal genstartes for at gennemføre afinstallationen af $(^NameDA). Vil du genstarte nu?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Genstart nu"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Jeg genstarter selv på et andet tidspunkt"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Start $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Vis vigtig information"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Afslut"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vælg Start Menu mappe"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vælg en Start Menu mappe til programmets genveje."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vælg Start Menu mappen hvor du vil lave programmets genveje. Du kan også skrive et navn for at oprette en ny mappe."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Opret ikke genveje"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Afinstaller $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Slet $(^NameDA) fra din computer."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Er du sikker på, at du vil afslutte $(^Name) installationen?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Er du sikker på at du vil afbryde $(^Name) afinstallationen?"
+!endif
diff --git a/Contrib/Language files/Dutch.nlf b/Contrib/Language files/Dutch.nlf
index c7e5ebb..a39a3d7 100755
--- a/Contrib/Language files/Dutch.nlf
+++ b/Contrib/Language files/Dutch.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1043
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Joost Verburg & Hendri Adireans, fixes by Milan Bast
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name)-installatie
-# ^UninstallCaption
-$(^Name)-deïnstallatie
-# ^LicenseSubCaption
-: Licentieovereenkomst
-# ^ComponentsSubCaption
-: Installatieopties
-# ^DirSubCaption
-: Installatiemap
-# ^InstallingSubCaption
-: Bezig met installeren
-# ^CompletedSubCaption
-: Voltooid
-# ^UnComponentsSubCaption
-: Verwijderingsopties
-# ^UnDirSubCaption
-: Te verwijderen map
-# ^ConfirmSubCaption
-: Bevestiging
-# ^UninstallingSubCaption
-: Bezig met verwijderen
-# ^UnCompletedSubCaption
-: Voltooid
-# ^BackBtn
-< V&orige
-# ^NextBtn
-&Volgende >
-# ^AgreeBtn
-&Akkoord
-# ^AcceptBtn
-Ik &accepteer de overeenkomst
-# ^DontAcceptBtn
-Ik accepteer de overeenkomst &niet
-# ^InstallBtn
-&Installeren
-# ^UninstallBtn
-&Verwijderen
-# ^CancelBtn
-Annuleren
-# ^CloseBtn
-&Afsluiten
-# ^BrowseBtn
-&Bladeren...
-# ^ShowDetailsBtn
-&Details tonen
-# ^ClickNext
-Klik op Volgende om verder te gaan.
-# ^ClickInstall
-Klik op Installeren om de installatie te beginnen.
-# ^ClickUninstall
-Klik op Verwijderen om de deïnstallatie te beginnen.
-# ^Name
-Naam
-# ^Completed
-Voltooid
-# ^LicenseText
-Lees de licentieovereenkomst voordat u $(^NameDA) installeert. Klik op Akkoord als u de overeenkomst accepteert.
-# ^LicenseTextCB
-Lees de licentieovereenkomst voordat u $(^NameDA) installeert. Schakel het selectievakje hieronder in als u de overeenkomst accepteert. $_CLICK
-# ^LicenseTextRB
-Lees de licentieovereenkomst voordat u $(^NameDA) installeert. Selecteer de eerste optie hieronder als u de overeenkomst accepteert. $_CLICK
-# ^UnLicenseText
-Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert. Klik op Akkoord als u de overeenkomst accepteert.
-# ^UnLicenseTextCB
-Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert. Schakel het selectievakje hieronder in als u de overeenkomst accepteert. $_CLICK
-# ^UnLicenseTextRB
-Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert. Selecteer de eerste optie hieronder als u de overeenkomst accepteert. $_CLICK
-# ^Custom
-Aangepast
-# ^ComponentsText
-Selecteer de onderdelen die u wilt installeren en deselecteer welke u niet wilt installeren. $_CLICK
-# ^ComponentsSubText1
-Selecteer het installatietype:
-# ^ComponentsSubText2_NoInstTypes
-Selecteer de onderdelen die moeten worden geïnstalleerd:
-# ^ComponentsSubText2
-Of selecteer de optionele onderdelen die moeten worden geïnstalleerd:
-# ^UnComponentsText
-Selecteer de onderdelen die u wilt verwijderen en deselecteer welke u niet wilt verwijderen. $_CLICK
-# ^UnComponentsSubText1
-Selecteer het type verwijdering:
-# ^UnComponentsSubText2_NoInstTypes
-Selecteer de onderdelen die moeten worden verwijderd:
-# ^UnComponentsSubText2
-Of selecteer de optionele onderdelen die moeten worden verwijderd:
-# ^DirText
-Setup zal $(^NameDA) in de volgende map installeren. Klik op Bladeren als u $(^NameDA) in een andere map wilt installeren en selecteer deze. $_CLICK
-# ^DirSubText
-Installatiemap
-# ^DirBrowseText
-Selecteer de map om $(^NameDA) in te installeren:
-# ^UnDirText
-Setup zal $(^NameDA) uit de volgende map verwijderen. Klik op Bladeren als u $(^NameDA) uit een andere map wilt verwijderen en selecteer deze. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Selecteer de map om $(^NameDA) uit te verwijderen:
-# ^SpaceAvailable
-"Beschikbare ruimte: "
-# ^SpaceRequired
-"Vereiste ruimte: "
-# ^UninstallingText
-$(^NameDA) zal uit de volgende map worden verwijderd. $_CLICK
-# ^UninstallingSubText
-Verwijderen uit:
-# ^FileError
-Fout bij het schrijven naar bestand: \r\n\r\n$0\r\n\r\nKlik op Afbreken om de installatie te stoppen,\r\nOpnieuw om het opnieuw te proberen of\r\nNegeren om dit bestand over te slaan.
-# ^FileError_NoIgnore
-Fout bij het schrijven naar bestand: \r\n\r\n$0\r\n\r\nKlik op Opnieuw om het opnieuw te proberen of \r\nAnnuleren om de installatie te stoppen.
-# ^CantWrite
-"Kon niet schrijven: "
-# ^CopyFailed
-Kopiëren mislukt
-# ^CopyTo
-"Kopiëren naar "
-# ^Registering
-"Registreren: "
-# ^Unregistering
-"Deregistreren: "
-# ^SymbolNotFound
-"Kon symbool niet vinden: "
-# ^CouldNotLoad
-"Kon niet laden: "
-# ^CreateFolder
-"Map maken: "
-# ^CreateShortcut
-"Snelkoppeling maken: "
-# ^CreatedUninstaller
-"Deïnstallatieprogramma gemaakt: "
-# ^Delete
-"Bestand verwijderen: "
-# ^DeleteOnReboot
-"Verwijderen na opnieuw opstarten: "
-# ^ErrorCreatingShortcut
-"Fout bij maken snelkoppeling: "
-# ^ErrorCreating
-"Fout bij maken: "
-# ^ErrorDecompressing
-Fout bij uitpakken van gegevens! Gegevens beschadigd?
-# ^ErrorRegistering
-Fout bij registreren DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Uitvoeren: "
-# ^Extract
-"Uitpakken: "
-# ^ErrorWriting
-"Uitpakken: fout bij schrijven naar bestand "
-# ^InvalidOpcode
-Installatieprogramma beschadigd: ongeldige opcode
-# ^NoOLE
-"Geen OLE voor: "
-# ^OutputFolder
-"Uitvoermap: "
-# ^RemoveFolder
-"Map verwijderen: "
-# ^RenameOnReboot
-"Hernoemen na opnieuw opstarten: "
-# ^Rename
-"Hernoemen: "
-# ^Skipped
-"Overgeslagen: "
-# ^CopyDetails
-Details kopiëren naar klembord
-# ^LogInstall
-Gegevens over installatie bewaren
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1043
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Joost Verburg & Hendri Adireans, fixes by Milan Bast
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name)-installatie
+# ^UninstallCaption
+$(^Name)-deïnstallatie
+# ^LicenseSubCaption
+: Licentieovereenkomst
+# ^ComponentsSubCaption
+: Installatieopties
+# ^DirSubCaption
+: Installatiemap
+# ^InstallingSubCaption
+: Bezig met installeren
+# ^CompletedSubCaption
+: Voltooid
+# ^UnComponentsSubCaption
+: Verwijderingsopties
+# ^UnDirSubCaption
+: Te verwijderen map
+# ^ConfirmSubCaption
+: Bevestiging
+# ^UninstallingSubCaption
+: Bezig met verwijderen
+# ^UnCompletedSubCaption
+: Voltooid
+# ^BackBtn
+< V&orige
+# ^NextBtn
+&Volgende >
+# ^AgreeBtn
+&Akkoord
+# ^AcceptBtn
+Ik &accepteer de overeenkomst
+# ^DontAcceptBtn
+Ik accepteer de overeenkomst &niet
+# ^InstallBtn
+&Installeren
+# ^UninstallBtn
+&Verwijderen
+# ^CancelBtn
+Annuleren
+# ^CloseBtn
+&Afsluiten
+# ^BrowseBtn
+&Bladeren...
+# ^ShowDetailsBtn
+&Details tonen
+# ^ClickNext
+Klik op Volgende om verder te gaan.
+# ^ClickInstall
+Klik op Installeren om de installatie te beginnen.
+# ^ClickUninstall
+Klik op Verwijderen om de deïnstallatie te beginnen.
+# ^Name
+Naam
+# ^Completed
+Voltooid
+# ^LicenseText
+Lees de licentieovereenkomst voordat u $(^NameDA) installeert. Klik op Akkoord als u de overeenkomst accepteert.
+# ^LicenseTextCB
+Lees de licentieovereenkomst voordat u $(^NameDA) installeert. Schakel het selectievakje hieronder in als u de overeenkomst accepteert. $_CLICK
+# ^LicenseTextRB
+Lees de licentieovereenkomst voordat u $(^NameDA) installeert. Selecteer de eerste optie hieronder als u de overeenkomst accepteert. $_CLICK
+# ^UnLicenseText
+Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert. Klik op Akkoord als u de overeenkomst accepteert.
+# ^UnLicenseTextCB
+Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert. Schakel het selectievakje hieronder in als u de overeenkomst accepteert. $_CLICK
+# ^UnLicenseTextRB
+Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert. Selecteer de eerste optie hieronder als u de overeenkomst accepteert. $_CLICK
+# ^Custom
+Aangepast
+# ^ComponentsText
+Selecteer de onderdelen die u wilt installeren en deselecteer welke u niet wilt installeren. $_CLICK
+# ^ComponentsSubText1
+Selecteer het installatietype:
+# ^ComponentsSubText2_NoInstTypes
+Selecteer de onderdelen die moeten worden geïnstalleerd:
+# ^ComponentsSubText2
+Of selecteer de optionele onderdelen die moeten worden geïnstalleerd:
+# ^UnComponentsText
+Selecteer de onderdelen die u wilt verwijderen en deselecteer welke u niet wilt verwijderen. $_CLICK
+# ^UnComponentsSubText1
+Selecteer het type verwijdering:
+# ^UnComponentsSubText2_NoInstTypes
+Selecteer de onderdelen die moeten worden verwijderd:
+# ^UnComponentsSubText2
+Of selecteer de optionele onderdelen die moeten worden verwijderd:
+# ^DirText
+Setup zal $(^NameDA) in de volgende map installeren. Klik op Bladeren als u $(^NameDA) in een andere map wilt installeren en selecteer deze. $_CLICK
+# ^DirSubText
+Installatiemap
+# ^DirBrowseText
+Selecteer de map om $(^NameDA) in te installeren:
+# ^UnDirText
+Setup zal $(^NameDA) uit de volgende map verwijderen. Klik op Bladeren als u $(^NameDA) uit een andere map wilt verwijderen en selecteer deze. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Selecteer de map om $(^NameDA) uit te verwijderen:
+# ^SpaceAvailable
+"Beschikbare ruimte: "
+# ^SpaceRequired
+"Vereiste ruimte: "
+# ^UninstallingText
+$(^NameDA) zal uit de volgende map worden verwijderd. $_CLICK
+# ^UninstallingSubText
+Verwijderen uit:
+# ^FileError
+Fout bij het schrijven naar bestand: \r\n\r\n$0\r\n\r\nKlik op Afbreken om de installatie te stoppen,\r\nOpnieuw om het opnieuw te proberen of\r\nNegeren om dit bestand over te slaan.
+# ^FileError_NoIgnore
+Fout bij het schrijven naar bestand: \r\n\r\n$0\r\n\r\nKlik op Opnieuw om het opnieuw te proberen of \r\nAnnuleren om de installatie te stoppen.
+# ^CantWrite
+"Kon niet schrijven: "
+# ^CopyFailed
+Kopiëren mislukt
+# ^CopyTo
+"Kopiëren naar "
+# ^Registering
+"Registreren: "
+# ^Unregistering
+"Deregistreren: "
+# ^SymbolNotFound
+"Kon symbool niet vinden: "
+# ^CouldNotLoad
+"Kon niet laden: "
+# ^CreateFolder
+"Map maken: "
+# ^CreateShortcut
+"Snelkoppeling maken: "
+# ^CreatedUninstaller
+"Deïnstallatieprogramma gemaakt: "
+# ^Delete
+"Bestand verwijderen: "
+# ^DeleteOnReboot
+"Verwijderen na opnieuw opstarten: "
+# ^ErrorCreatingShortcut
+"Fout bij maken snelkoppeling: "
+# ^ErrorCreating
+"Fout bij maken: "
+# ^ErrorDecompressing
+Fout bij uitpakken van gegevens! Gegevens beschadigd?
+# ^ErrorRegistering
+Fout bij registreren DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Uitvoeren: "
+# ^Extract
+"Uitpakken: "
+# ^ErrorWriting
+"Uitpakken: fout bij schrijven naar bestand "
+# ^InvalidOpcode
+Installatieprogramma beschadigd: ongeldige opcode
+# ^NoOLE
+"Geen OLE voor: "
+# ^OutputFolder
+"Uitvoermap: "
+# ^RemoveFolder
+"Map verwijderen: "
+# ^RenameOnReboot
+"Hernoemen na opnieuw opstarten: "
+# ^Rename
+"Hernoemen: "
+# ^Skipped
+"Overgeslagen: "
+# ^CopyDetails
+Details kopiëren naar klembord
+# ^LogInstall
+Gegevens over installatie bewaren
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Dutch.nsh b/Contrib/Language files/Dutch.nsh
index 5576c8a..d9c38ed 100755
--- a/Contrib/Language files/Dutch.nsh
+++ b/Contrib/Language files/Dutch.nsh
@@ -1,121 +1,121 @@
-;Language: Dutch (1043)
-;By Joost Verburg
-
-!insertmacro LANGFILE "Dutch" "Nederlands"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welkom bij de $(^NameDA)-installatiewizard"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Deze wizard zal $(^NameDA) op uw systeem installeren.$\r$\n$\r$\nHet wordt aanbevolen alle overige toepassingen af te sluiten alvorens de installatie te starten. Dit maakt het mogelijk relevante systeembestanden bij te werken zonder uw systeem opnieuw op te moeten starten.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welkom bij de $(^NameDA)-deïnstallatiewizard"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Deze wizard zal $(^NameDA) van uw syteem verwijderen.$\r$\n$\r$\nControleer voordat u begint met verwijderen of $(^NameDA) is afgesloten.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licentieovereenkomst"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lees de licentieovereenkomst voordat u $(^NameDA) installeert."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Klik op Akkoord om verder te gaan als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te installeren."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Schakel het selectievakje hieronder in als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te installeren."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Selecteer de eerste optie hieronder als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te installeren."
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licentieovereenkomst"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Klik op Akkoord op verder te gaan als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te verwijderen."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Schakel het selectievakje hieronder in als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te verwijderen."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Selecteer de eerste optie hieronder als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te verwijderen."
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Druk op Page Down om de rest van de overeenkomst te zien."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Onderdelen kiezen"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Kies de onderdelen die u wilt installeren."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschrijving"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Onderdelen kiezen"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Kies de onderdelen die u wilt verwijderen."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg uw muis over een onderdeel om de beschrijving te zien."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg uw muis over een onderdeel om de beschrijving te zien."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Installatielocatie kiezen"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Kies de map waarin u $(^NameDA) wilt installeren."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Locatie kiezen"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Kies de map waaruit u $(^NameDA) wilt verwijderen."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Bezig met installeren"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Een ogenblik geduld terwijl $(^NameDA) wordt geïnstalleerd."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installatie voltooid"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "De installatie is succesvol voltooid."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installatie afgebroken"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "De installatie is niet voltooid."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Bezig met verwijderen"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Een ogenblik geduld terwijl $(^NameDA) van uw systeem wordt verwijderd."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Verwijderen gereed"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "$(^NameDA) is van uw systeem verwijderd."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Verwijderen afgebroken"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "$(^NameDA) is niet volledig van uw systeem verwijderd."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Voltooien van de $(^NameDA)-installatiewizard"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) is geïnstalleerd op uw systeem.$\r$\n$\r$\nKlik op Voltooien om deze wizard te sluiten."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Uw systeem moet opnieuw worden opgestart om de installatie van $(^NameDA) te voltooien. Wilt u nu herstarten?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Voltooien van de $(^NameDA)-deïnstallatiewizard"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) is van uw systeem verwijderd.$\r$\n$\r$\nKlik op Voltooien om deze wizard te sluiten."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Uw systeem moet opnieuw worden opgestart om het verwijderen van $(^NameDA) te voltooien. Wilt u nu herstarten?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Nu herstarten"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ik wil later handmatig herstarten"
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) &starten"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Leesmij weergeven"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Voltooien"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Startmenumap kiezen"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Kies een map in het menu Start voor de snelkoppelingen van $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Kies een map in het menu Start waarin de snelkoppelingen moeten worden aangemaakt. U kunt ook een naam invoeren om een nieuwe map te maken."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Geen snelkoppelingen aanmaken"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA) verwijderen"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) van uw systeem verwijderen."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Weet u zeker dat u de $(^Name)-installatie wilt afsluiten?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Weet u zeker dat u de $(^Name)-deïnstallatie wilt afsluiten?"
-!endif
+;Language: Dutch (1043)
+;By Joost Verburg
+
+!insertmacro LANGFILE "Dutch" "Nederlands"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welkom bij de $(^NameDA)-installatiewizard"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Deze wizard zal $(^NameDA) op uw systeem installeren.$\r$\n$\r$\nHet wordt aanbevolen alle overige toepassingen af te sluiten alvorens de installatie te starten. Dit maakt het mogelijk relevante systeembestanden bij te werken zonder uw systeem opnieuw op te moeten starten.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welkom bij de $(^NameDA)-deïnstallatiewizard"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Deze wizard zal $(^NameDA) van uw syteem verwijderen.$\r$\n$\r$\nControleer voordat u begint met verwijderen of $(^NameDA) is afgesloten.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licentieovereenkomst"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lees de licentieovereenkomst voordat u $(^NameDA) installeert."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Klik op Akkoord om verder te gaan als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te installeren."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Schakel het selectievakje hieronder in als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te installeren."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Selecteer de eerste optie hieronder als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te installeren."
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licentieovereenkomst"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lees de licentieovereenkomst voordat u $(^NameDA) verwijdert."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Klik op Akkoord op verder te gaan als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te verwijderen."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Schakel het selectievakje hieronder in als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te verwijderen."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Selecteer de eerste optie hieronder als u de overeenkomst accepteert. U moet de overeenkomst accepteren om $(^NameDA) te verwijderen."
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Druk op Page Down om de rest van de overeenkomst te zien."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Onderdelen kiezen"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Kies de onderdelen die u wilt installeren."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschrijving"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Onderdelen kiezen"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Kies de onderdelen die u wilt verwijderen."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg uw muis over een onderdeel om de beschrijving te zien."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg uw muis over een onderdeel om de beschrijving te zien."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Installatielocatie kiezen"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Kies de map waarin u $(^NameDA) wilt installeren."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Locatie kiezen"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Kies de map waaruit u $(^NameDA) wilt verwijderen."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Bezig met installeren"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Een ogenblik geduld terwijl $(^NameDA) wordt geïnstalleerd."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installatie voltooid"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "De installatie is succesvol voltooid."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installatie afgebroken"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "De installatie is niet voltooid."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Bezig met verwijderen"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Een ogenblik geduld terwijl $(^NameDA) van uw systeem wordt verwijderd."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Verwijderen gereed"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "$(^NameDA) is van uw systeem verwijderd."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Verwijderen afgebroken"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "$(^NameDA) is niet volledig van uw systeem verwijderd."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Voltooien van de $(^NameDA)-installatiewizard"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) is geïnstalleerd op uw systeem.$\r$\n$\r$\nKlik op Voltooien om deze wizard te sluiten."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Uw systeem moet opnieuw worden opgestart om de installatie van $(^NameDA) te voltooien. Wilt u nu herstarten?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Voltooien van de $(^NameDA)-deïnstallatiewizard"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) is van uw systeem verwijderd.$\r$\n$\r$\nKlik op Voltooien om deze wizard te sluiten."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Uw systeem moet opnieuw worden opgestart om het verwijderen van $(^NameDA) te voltooien. Wilt u nu herstarten?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Nu herstarten"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ik wil later handmatig herstarten"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) &starten"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Leesmij weergeven"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Voltooien"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Startmenumap kiezen"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Kies een map in het menu Start voor de snelkoppelingen van $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Kies een map in het menu Start waarin de snelkoppelingen moeten worden aangemaakt. U kunt ook een naam invoeren om een nieuwe map te maken."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Geen snelkoppelingen aanmaken"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA) verwijderen"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) van uw systeem verwijderen."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Weet u zeker dat u de $(^Name)-installatie wilt afsluiten?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Weet u zeker dat u de $(^Name)-deïnstallatie wilt afsluiten?"
+!endif
diff --git a/Contrib/Language files/English.nlf b/Contrib/Language files/English.nlf
index 84c438c..328f8da 100755
--- a/Contrib/Language files/English.nlf
+++ b/Contrib/Language files/English.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1033
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
--
-# RTL - anything else than RTL means LTR
--
-# Translation by ..... (any credits should go here)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Setup
-# ^UninstallCaption
-$(^Name) Uninstall
-# ^LicenseSubCaption
-: License Agreement
-# ^ComponentsSubCaption
-: Installation Options
-# ^DirSubCaption
-: Installation Folder
-# ^InstallingSubCaption
-: Installing
-# ^CompletedSubCaption
-: Completed
-# ^UnComponentsSubCaption
-: Uninstallation Options
-# ^UnDirSubCaption
-: Uninstallation Folder
-# ^ConfirmSubCaption
-: Confirmation
-# ^UninstallingSubCaption
-: Uninstalling
-# ^UnCompletedSubCaption
-: Completed
-# ^BackBtn
-< &Back
-# ^NextBtn
-&Next >
-# ^AgreeBtn
-I &Agree
-# ^AcceptBtn
-I &accept the terms in the License Agreement
-# ^DontAcceptBtn
-I &do not accept the terms in the License Agreement
-# ^InstallBtn
-&Install
-# ^UninstallBtn
-&Uninstall
-# ^CancelBtn
-Cancel
-# ^CloseBtn
-&Close
-# ^BrowseBtn
-B&rowse...
-# ^ShowDetailsBtn
-Show &details
-# ^ClickNext
-Click Next to continue.
-# ^ClickInstall
-Click Install to start the installation.
-# ^ClickUninstall
-Click Uninstall to start the uninstallation.
-# ^Name
-Name
-# ^Completed
-Completed
-# ^LicenseText
-Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.
-# ^LicenseTextCB
-Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
-# ^LicenseTextRB
-Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
-# ^UnLicenseText
-Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.
-# ^UnLicenseTextCB
-Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
-# ^UnLicenseTextRB
-Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
-# ^Custom
-Custom
-# ^ComponentsText
-Check the components you want to install and uncheck the components you don't want to install. $_CLICK
-# ^ComponentsSubText1
-Select the type of install:
-# ^ComponentsSubText2_NoInstTypes
-Select components to install:
-# ^ComponentsSubText2
-Or, select the optional components you wish to install:
-# ^UnComponentsText
-Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK
-# ^UnComponentsSubText1
-Select the type of uninstall:
-# ^UnComponentsSubText2_NoInstTypes
-Select components to uninstall:
-# ^UnComponentsSubText2
-Or, select the optional components you wish to uninstall:
-# ^DirText
-Setup will install $(^NameDA) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK
-# ^DirSubText
-Destination Folder
-# ^DirBrowseText
-Select the folder to install $(^NameDA) in:
-# ^UnDirText
-Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Select the folder to uninstall $(^NameDA) from:
-# ^SpaceAvailable
-"Space available: "
-# ^SpaceRequired
-"Space required: "
-# ^UninstallingText
-$(^NameDA) will be uninstalled from the following folder. $_CLICK
-# ^UninstallingSubText
-Uninstalling from:
-# ^FileError
-Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
-# ^FileError_NoIgnore
-Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
-# ^CantWrite
-"Can't write: "
-# ^CopyFailed
-Copy failed
-# ^CopyTo
-"Copy to "
-# ^Registering
-"Registering: "
-# ^Unregistering
-"Unregistering: "
-# ^SymbolNotFound
-"Could not find symbol: "
-# ^CouldNotLoad
-"Could not load: "
-# ^CreateFolder
-"Create folder: "
-# ^CreateShortcut
-"Create shortcut: "
-# ^CreatedUninstaller
-"Created uninstaller: "
-# ^Delete
-"Delete file: "
-# ^DeleteOnReboot
-"Delete on reboot: "
-# ^ErrorCreatingShortcut
-"Error creating shortcut: "
-# ^ErrorCreating
-"Error creating: "
-# ^ErrorDecompressing
-Error decompressing data! Corrupted installer?
-# ^ErrorRegistering
-Error registering DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Execute: "
-# ^Extract
-"Extract: "
-# ^ErrorWriting
-"Extract: error writing to file "
-# ^InvalidOpcode
-Installer corrupted: invalid opcode
-# ^NoOLE
-"No OLE for: "
-# ^OutputFolder
-"Output folder: "
-# ^RemoveFolder
-"Remove folder: "
-# ^RenameOnReboot
-"Rename on reboot: "
-# ^Rename
-"Rename: "
-# ^Skipped
-"Skipped: "
-# ^CopyDetails
-Copy Details To Clipboard
-# ^LogInstall
-Log install process
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1033
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+-
+# RTL - anything else than RTL means LTR
+-
+# Translation by ..... (any credits should go here)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Setup
+# ^UninstallCaption
+$(^Name) Uninstall
+# ^LicenseSubCaption
+: License Agreement
+# ^ComponentsSubCaption
+: Installation Options
+# ^DirSubCaption
+: Installation Folder
+# ^InstallingSubCaption
+: Installing
+# ^CompletedSubCaption
+: Completed
+# ^UnComponentsSubCaption
+: Uninstallation Options
+# ^UnDirSubCaption
+: Uninstallation Folder
+# ^ConfirmSubCaption
+: Confirmation
+# ^UninstallingSubCaption
+: Uninstalling
+# ^UnCompletedSubCaption
+: Completed
+# ^BackBtn
+< &Back
+# ^NextBtn
+&Next >
+# ^AgreeBtn
+I &Agree
+# ^AcceptBtn
+I &accept the terms in the License Agreement
+# ^DontAcceptBtn
+I &do not accept the terms in the License Agreement
+# ^InstallBtn
+&Install
+# ^UninstallBtn
+&Uninstall
+# ^CancelBtn
+Cancel
+# ^CloseBtn
+&Close
+# ^BrowseBtn
+B&rowse...
+# ^ShowDetailsBtn
+Show &details
+# ^ClickNext
+Click Next to continue.
+# ^ClickInstall
+Click Install to start the installation.
+# ^ClickUninstall
+Click Uninstall to start the uninstallation.
+# ^Name
+Name
+# ^Completed
+Completed
+# ^LicenseText
+Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.
+# ^LicenseTextCB
+Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
+# ^LicenseTextRB
+Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
+# ^UnLicenseText
+Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.
+# ^UnLicenseTextCB
+Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK
+# ^UnLicenseTextRB
+Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK
+# ^Custom
+Custom
+# ^ComponentsText
+Check the components you want to install and uncheck the components you don't want to install. $_CLICK
+# ^ComponentsSubText1
+Select the type of install:
+# ^ComponentsSubText2_NoInstTypes
+Select components to install:
+# ^ComponentsSubText2
+Or, select the optional components you wish to install:
+# ^UnComponentsText
+Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK
+# ^UnComponentsSubText1
+Select the type of uninstall:
+# ^UnComponentsSubText2_NoInstTypes
+Select components to uninstall:
+# ^UnComponentsSubText2
+Or, select the optional components you wish to uninstall:
+# ^DirText
+Setup will install $(^NameDA) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK
+# ^DirSubText
+Destination Folder
+# ^DirBrowseText
+Select the folder to install $(^NameDA) in:
+# ^UnDirText
+Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Select the folder to uninstall $(^NameDA) from:
+# ^SpaceAvailable
+"Space available: "
+# ^SpaceRequired
+"Space required: "
+# ^UninstallingText
+$(^NameDA) will be uninstalled from the following folder. $_CLICK
+# ^UninstallingSubText
+Uninstalling from:
+# ^FileError
+Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.
+# ^FileError_NoIgnore
+Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.
+# ^CantWrite
+"Can't write: "
+# ^CopyFailed
+Copy failed
+# ^CopyTo
+"Copy to "
+# ^Registering
+"Registering: "
+# ^Unregistering
+"Unregistering: "
+# ^SymbolNotFound
+"Could not find symbol: "
+# ^CouldNotLoad
+"Could not load: "
+# ^CreateFolder
+"Create folder: "
+# ^CreateShortcut
+"Create shortcut: "
+# ^CreatedUninstaller
+"Created uninstaller: "
+# ^Delete
+"Delete file: "
+# ^DeleteOnReboot
+"Delete on reboot: "
+# ^ErrorCreatingShortcut
+"Error creating shortcut: "
+# ^ErrorCreating
+"Error creating: "
+# ^ErrorDecompressing
+Error decompressing data! Corrupted installer?
+# ^ErrorRegistering
+Error registering DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Execute: "
+# ^Extract
+"Extract: "
+# ^ErrorWriting
+"Extract: error writing to file "
+# ^InvalidOpcode
+Installer corrupted: invalid opcode
+# ^NoOLE
+"No OLE for: "
+# ^OutputFolder
+"Output folder: "
+# ^RemoveFolder
+"Remove folder: "
+# ^RenameOnReboot
+"Rename on reboot: "
+# ^Rename
+"Rename: "
+# ^Skipped
+"Skipped: "
+# ^CopyDetails
+Copy Details To Clipboard
+# ^LogInstall
+Log install process
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/English.nsh b/Contrib/Language files/English.nsh
index eb2e414..36285a1 100755
--- a/Contrib/Language files/English.nsh
+++ b/Contrib/Language files/English.nsh
@@ -1,121 +1,121 @@
-;Language: English (1033)
-;By Joost Verburg
-
-!insertmacro LANGFILE "English" "English"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Setup Wizard"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of $(^NameDA).$\r$\n$\r$\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Uninstall Wizard"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "This wizard will guide you through the uninstallation of $(^NameDA).$\r$\n$\r$\nBefore starting the uninstallation, make sure $(^NameDA) is not running.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "License Agreement"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to install $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "License Agreement"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Please review the license terms before uninstalling $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to uninstall $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the agreement."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choose Components"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to install."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choose Components"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to uninstall."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choose Install Location"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choose the folder in which to install $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installing"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Please wait while $(^NameDA) is being installed."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installation Complete"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup was completed successfully."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installation Aborted"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup was not completed successfully."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstalling"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Please wait while $(^NameDA) is being uninstalled."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uninstallation Complete"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall was completed successfully."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uninstallation Aborted"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall was not completed successfully."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completing the $(^NameDA) Setup Wizard"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) has been installed on your computer.$\r$\n$\r$\nClick Finish to close this wizard."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completing the $(^NameDA) Uninstall Wizard"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nClick Finish to close this wizard."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot now"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "I want to manually reboot later"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Run $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Show Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Finish"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the $(^NameDA) shortcuts."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remove $(^NameDA) from your computer."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Setup?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Uninstall?"
-!endif
+;Language: English (1033)
+;By Joost Verburg
+
+!insertmacro LANGFILE "English" "English"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Setup Wizard"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "This wizard will guide you through the installation of $(^NameDA).$\r$\n$\r$\nIt is recommended that you close all other applications before starting Setup. This will make it possible to update relevant system files without having to reboot your computer.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welcome to the $(^NameDA) Uninstall Wizard"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "This wizard will guide you through the uninstallation of $(^NameDA).$\r$\n$\r$\nBefore starting the uninstallation, make sure $(^NameDA) is not running.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "License Agreement"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to install $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to install $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "License Agreement"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Please review the license terms before uninstalling $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to uninstall $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "If you accept the terms of the agreement, click the check box below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the agreement."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choose Components"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to install."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choose Components"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Choose which features of $(^NameDA) you want to uninstall."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Position your mouse over a component to see its description."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choose Install Location"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choose the folder in which to install $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installing"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Please wait while $(^NameDA) is being installed."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installation Complete"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup was completed successfully."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installation Aborted"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup was not completed successfully."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstalling"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Please wait while $(^NameDA) is being uninstalled."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Uninstallation Complete"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall was completed successfully."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Uninstallation Aborted"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall was not completed successfully."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completing the $(^NameDA) Setup Wizard"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) has been installed on your computer.$\r$\n$\r$\nClick Finish to close this wizard."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the installation of $(^NameDA). Do you want to reboot now?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completing the $(^NameDA) Uninstall Wizard"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) has been uninstalled from your computer.$\r$\n$\r$\nClick Finish to close this wizard."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Your computer must be restarted in order to complete the uninstallation of $(^NameDA). Do you want to reboot now?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot now"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "I want to manually reboot later"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Run $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Show Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Finish"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the $(^NameDA) shortcuts."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Select the Start Menu folder in which you would like to create the program's shortcuts. You can also enter a name to create a new folder."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remove $(^NameDA) from your computer."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Setup?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Are you sure you want to quit $(^Name) Uninstall?"
+!endif
diff --git a/Contrib/Language files/Estonian.nlf b/Contrib/Language files/Estonian.nlf
index 8d8bf68..0b80a01 100755
--- a/Contrib/Language files/Estonian.nlf
+++ b/Contrib/Language files/Estonian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1061
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1257
-# RTL - anything else than RTL means LTR
--
-# Translation by izzo (izzo@hot.ee)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Paigaldamine
-# ^UninstallCaption
-$(^Name) Eemaldamine
-# ^LicenseSubCaption
-: Litsentsileping
-# ^ComponentsSubCaption
-: Paigaldusvalikud
-# ^DirSubCaption
-: Paigalduskaust
-# ^InstallingSubCaption
-: Paigaldan
-# ^CompletedSubCaption
-: Valmis
-# ^UnComponentsSubCaption
-: Eemaldusvalikud
-# ^UnDirSubCaption
-: Eemalduskaust
-# ^ConfirmSubCaption
-: Kinnitus
-# ^UninstallingSubCaption
-: Eemaldan
-# ^UnCompletedSubCaption
-: Valmis
-# ^BackBtn
-< Tagasi
-# ^NextBtn
-Edasi >
-# ^AgreeBtn
-Nõustun
-# ^AcceptBtn
-Nõustun litsentsilepingu tingimustega
-# ^DontAcceptBtn
-Ei nõustu litsentsilepingu tingimustega
-# ^InstallBtn
-Paigalda
-# ^UninstallBtn
-Eemalda
-# ^CancelBtn
-Loobu
-# ^CloseBtn
-Sule
-# ^BrowseBtn
-Sirvi...
-# ^ShowDetailsBtn
-Detailid
-# ^ClickNext
-Jätkamiseks vajuta Edasi.
-# ^ClickInstall
-Paigaldamise alustamiseks vajuta Paigalda.
-# ^ClickUninstall
-Eemaldamise alustamiseks vajuta Eemalda.
-# ^Name
-Nimi
-# ^Completed
-Valmis
-# ^LicenseText
-Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vajuta Nõustun.
-# ^LicenseTextCB
-Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vali allolev märkeruut. $_CLICK
-# ^LicenseTextRB
-Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, märgi allpool esimene valik. $_CLICK
-# ^UnLicenseText
-Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vajuta Nõustun.
-# ^UnLicenseTextCB
-Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vali allolev märkeruut. $_CLICK
-# ^UnLicenseTextRB
-Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, märgi allpool esimene valik. $_CLICK
-# ^Custom
-Kohandatud
-# ^ComponentsText
-Märgista komponendid mida soovid paigaldada ja eemalda märgistus neilt, mida ei soovi paigaldada. $_CLICK
-# ^ComponentsSubText1
-Vali paigalduse tüüp:
-# ^ComponentsSubText2_NoInstTypes
-Vali paigaldatavad komponendid:
-# ^ComponentsSubText2
-või vali lisakomponendid mida soovid paigaldada:
-# ^UnComponentsText
-Märgista komponendid mida soovid eemaldada ja eemalda märgistus neilt, mida ei soovi eemaldada. $_CLICK
-# ^UnComponentsSubText1
-Vali eemalduse tüüp:
-# ^UnComponentsSubText2_NoInstTypes
-Vali eemaldatavad komponendid:
-# ^UnComponentsSubText2
-või vali lisakomponendid mida soovid eemaldada:
-# ^DirText
-$(^NameDA) paigaldatakse järgmisse kausta. Et mujale paigaldada, vajuta sirvi ja vali teine kaust. $_CLICK
-# ^DirSubText
-Sihtkaust
-# ^DirBrowseText
-Vali kaust kuhu $(^NameDA) paigaldada:
-# ^UnDirText
-$(^NameDA) eemaldatakse järgmisest kaustast. Et mujalt eemaldada, vajuta sirvi ja vali teine kaust. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Vali kaust kust $(^NameDA) eemaldada:
-# ^SpaceAvailable
-"Vaba ruum: "
-# ^SpaceRequired
-"Vajalik ruum: "
-# ^UninstallingText
-$(^NameDA) eemaldatakse järgmisest kaustast. $_CLICK
-# ^UninstallingSubText
-Eemaldan sealt:
-# ^FileError
-Tõrge faili avamisel kirjutamiseks: \r\n\t"$0"\r\nPaigalduse katkestamiseks vajuta Katkesta,\r\nvajuta Ürita uuesti, et faili kirjutamist uuesti proovida, või\r\nIgnoreeri, et see fail vahele jätta.
-# ^FileError_NoIgnore
-Tõrge faili avamisel kirjutamiseks: \r\n\t"$0"\r\nVajuta Ürita uuesti, et faili kirjutamist uuesti proovida, või\r\nLoobu, et paigaldamine katkestada
-# ^CantWrite
-"Ei saa kirjutada: "
-# ^CopyFailed
-Kopeerimine ebaõnnestus
-# ^CopyTo
-"Kopeeri sinna "
-# ^Registering
-"Registreerin: "
-# ^Unregistering
-"Deregistreerin: "
-# ^SymbolNotFound
-"Ei leidnud sümbolit: "
-# ^CouldNotLoad
-"Ei saanud laadida: "
-# ^CreateFolder
-"Loo kaust: "
-# ^CreateShortcut
-"Loo otsetee: "
-# ^CreatedUninstaller
-"Loodud eemaldaja: "
-# ^Delete
-"Kustuta fail: "
-# ^DeleteOnReboot
-"Kustuta taaskäivitamisel: "
-# ^ErrorCreatingShortcut
-"Tõrge otsetee loomisel: "
-# ^ErrorCreating
-"Tõrge loomisel: "
-# ^ErrorDecompressing
-Tõrge andmete lahtipakkimisel! Vigane paigaldaja?
-# ^ErrorRegistering
-Tõrge DLL-i registreerimisel
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Käivita: "
-# ^Extract
-"Paki lahti: "
-# ^ErrorWriting
-"Paki lahti: viga faili kirjutamisel "
-# ^InvalidOpcode
-Paigaldaja kõlbmatu: vigane opkood
-# ^NoOLE
-"No OLE for: "
-# ^OutputFolder
-"Väljastatav kaust: "
-# ^RemoveFolder
-"Eemalda kaust: "
-# ^RenameOnReboot
-"Taaskäivitusel nimeta ümber: "
-# ^Rename
-"Nimeta ümber: "
-# ^Skipped
-"Vahele jäetud: "
-# ^CopyDetails
-Kopeeri detailid lõikelauale
-# ^LogInstall
-Logi paigaldusprotsess
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Language ID
+1061
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1257
+# RTL - anything else than RTL means LTR
+-
+# Translation by izzo (izzo@hot.ee)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Paigaldamine
+# ^UninstallCaption
+$(^Name) Eemaldamine
+# ^LicenseSubCaption
+: Litsentsileping
+# ^ComponentsSubCaption
+: Paigaldusvalikud
+# ^DirSubCaption
+: Paigalduskaust
+# ^InstallingSubCaption
+: Paigaldan
+# ^CompletedSubCaption
+: Valmis
+# ^UnComponentsSubCaption
+: Eemaldusvalikud
+# ^UnDirSubCaption
+: Eemalduskaust
+# ^ConfirmSubCaption
+: Kinnitus
+# ^UninstallingSubCaption
+: Eemaldan
+# ^UnCompletedSubCaption
+: Valmis
+# ^BackBtn
+< Tagasi
+# ^NextBtn
+Edasi >
+# ^AgreeBtn
+Nõustun
+# ^AcceptBtn
+Nõustun litsentsilepingu tingimustega
+# ^DontAcceptBtn
+Ei nõustu litsentsilepingu tingimustega
+# ^InstallBtn
+Paigalda
+# ^UninstallBtn
+Eemalda
+# ^CancelBtn
+Loobu
+# ^CloseBtn
+Sule
+# ^BrowseBtn
+Sirvi...
+# ^ShowDetailsBtn
+Detailid
+# ^ClickNext
+Jätkamiseks vajuta Edasi.
+# ^ClickInstall
+Paigaldamise alustamiseks vajuta Paigalda.
+# ^ClickUninstall
+Eemaldamise alustamiseks vajuta Eemalda.
+# ^Name
+Nimi
+# ^Completed
+Valmis
+# ^LicenseText
+Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vajuta Nõustun.
+# ^LicenseTextCB
+Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vali allolev märkeruut. $_CLICK
+# ^LicenseTextRB
+Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, märgi allpool esimene valik. $_CLICK
+# ^UnLicenseText
+Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vajuta Nõustun.
+# ^UnLicenseTextCB
+Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, vali allolev märkeruut. $_CLICK
+# ^UnLicenseTextRB
+Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle. Kui sa nõustud kõigi lepingu tingimustega, märgi allpool esimene valik. $_CLICK
+# ^Custom
+Kohandatud
+# ^ComponentsText
+Märgista komponendid mida soovid paigaldada ja eemalda märgistus neilt, mida ei soovi paigaldada. $_CLICK
+# ^ComponentsSubText1
+Vali paigalduse tüüp:
+# ^ComponentsSubText2_NoInstTypes
+Vali paigaldatavad komponendid:
+# ^ComponentsSubText2
+või vali lisakomponendid mida soovid paigaldada:
+# ^UnComponentsText
+Märgista komponendid mida soovid eemaldada ja eemalda märgistus neilt, mida ei soovi eemaldada. $_CLICK
+# ^UnComponentsSubText1
+Vali eemalduse tüüp:
+# ^UnComponentsSubText2_NoInstTypes
+Vali eemaldatavad komponendid:
+# ^UnComponentsSubText2
+või vali lisakomponendid mida soovid eemaldada:
+# ^DirText
+$(^NameDA) paigaldatakse järgmisse kausta. Et mujale paigaldada, vajuta sirvi ja vali teine kaust. $_CLICK
+# ^DirSubText
+Sihtkaust
+# ^DirBrowseText
+Vali kaust kuhu $(^NameDA) paigaldada:
+# ^UnDirText
+$(^NameDA) eemaldatakse järgmisest kaustast. Et mujalt eemaldada, vajuta sirvi ja vali teine kaust. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Vali kaust kust $(^NameDA) eemaldada:
+# ^SpaceAvailable
+"Vaba ruum: "
+# ^SpaceRequired
+"Vajalik ruum: "
+# ^UninstallingText
+$(^NameDA) eemaldatakse järgmisest kaustast. $_CLICK
+# ^UninstallingSubText
+Eemaldan sealt:
+# ^FileError
+Tõrge faili avamisel kirjutamiseks: \r\n\t"$0"\r\nPaigalduse katkestamiseks vajuta Katkesta,\r\nvajuta Ürita uuesti, et faili kirjutamist uuesti proovida, või\r\nIgnoreeri, et see fail vahele jätta.
+# ^FileError_NoIgnore
+Tõrge faili avamisel kirjutamiseks: \r\n\t"$0"\r\nVajuta Ürita uuesti, et faili kirjutamist uuesti proovida, või\r\nLoobu, et paigaldamine katkestada
+# ^CantWrite
+"Ei saa kirjutada: "
+# ^CopyFailed
+Kopeerimine ebaõnnestus
+# ^CopyTo
+"Kopeeri sinna "
+# ^Registering
+"Registreerin: "
+# ^Unregistering
+"Deregistreerin: "
+# ^SymbolNotFound
+"Ei leidnud sümbolit: "
+# ^CouldNotLoad
+"Ei saanud laadida: "
+# ^CreateFolder
+"Loo kaust: "
+# ^CreateShortcut
+"Loo otsetee: "
+# ^CreatedUninstaller
+"Loodud eemaldaja: "
+# ^Delete
+"Kustuta fail: "
+# ^DeleteOnReboot
+"Kustuta taaskäivitamisel: "
+# ^ErrorCreatingShortcut
+"Tõrge otsetee loomisel: "
+# ^ErrorCreating
+"Tõrge loomisel: "
+# ^ErrorDecompressing
+Tõrge andmete lahtipakkimisel! Vigane paigaldaja?
+# ^ErrorRegistering
+Tõrge DLL-i registreerimisel
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Käivita: "
+# ^Extract
+"Paki lahti: "
+# ^ErrorWriting
+"Paki lahti: viga faili kirjutamisel "
+# ^InvalidOpcode
+Paigaldaja kõlbmatu: vigane opkood
+# ^NoOLE
+"No OLE for: "
+# ^OutputFolder
+"Väljastatav kaust: "
+# ^RemoveFolder
+"Eemalda kaust: "
+# ^RenameOnReboot
+"Taaskäivitusel nimeta ümber: "
+# ^Rename
+"Nimeta ümber: "
+# ^Skipped
+"Vahele jäetud: "
+# ^CopyDetails
+Kopeeri detailid lõikelauale
+# ^LogInstall
+Logi paigaldusprotsess
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Estonian.nsh b/Contrib/Language files/Estonian.nsh
index 2174665..c582b87 100755
--- a/Contrib/Language files/Estonian.nsh
+++ b/Contrib/Language files/Estonian.nsh
@@ -1,121 +1,121 @@
-;Language: Estonian (1061)
-;Translated by johnny izzo (izzo@hot.ee)
-
-!insertmacro LANGFILE "Estonian" "Eesti keel"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) paigaldamine!"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "See abiline aitab paigaldada $(^NameDA).$\r$\n$\r$\nEnne paigaldamise alustamist on soovitatav kõik teised programmid sulgeda, see võimaldab teatud süsteemifaile uuendada ilma arvutit taaskäivitamata.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) eemaldamine!"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "See abiline aitab eemaldada $(^NameDA).$\r$\n$\r$\nEnne eemaldamist vaata, et $(^NameDA) oleks suletud.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Litsentsileping"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Kui sa oled lepingu tingimustega nõus, vali jätkamiseks Nõustun. $(^NameDA) paigaldamiseks pead sa lepinguga nõustuma."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Kui nõustud lepingu tingimustega, vali allolev märkeruut. $(^NameDA) paigaldamiseks pead lepinguga nõustuma. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kui nõustud lepingu tingimustega, märgi allpool esimene valik. $(^NameDA) paigaldamiseks pead lepinguga nõustuma. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Litsentsileping"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Kui sa oled lepingu tingimustega nõus, vali jätkamiseks Nõustun. $(^NameDA) eemaldamiseks pead sa lepinguga nõustuma."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Kui nõustud lepingu tingimustega, vali allolev märkeruut. $(^NameDA) eemaldamiseks pead lepinguga nõustuma. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kui nõustud lepingu tingimustega, märgi allpool esimene valik. $(^NameDA) eemaldamiseks pead lepinguga nõustuma. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Vajuta Page Down, et näha ülejäänud teksti."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vali komponendid"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Vali millised $(^NameDA) osad sa soovid paigaldada."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Kirjeldus"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vali komponendid"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Vali millised $(^NameDA) osad sa soovid eemaldada."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Nihuta hiir komponendile, et näha selle kirjeldust."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Nihuta hiir komponendile, et näha selle kirjeldust."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vali asukoht"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vali kaust kuhu paigaldada $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Vali asukoht"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vali kaust kust $(^NameDA) eemaldada."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Paigaldan..."
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Palun oota kuni $(^NameDA) on paigaldatud."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Programm paigaldatud"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Paigaldus edukalt sooritatud."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Paigaldus katkestatud"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Paigaldamine ebaõnnestus."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Eemaldan..."
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Palun oota kuni $(^NameDA) on eemaldatud."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Eemaldamine lõpetatud"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Eemaldamine edukalt lõpule viidud."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Eemaldamine katkestatud"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Eemaldamine ebaõnestus."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) paigalduse lõpule viimine."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) on sinu arvutisse paigaldatud.$\r$\n$\r$\nAbilise sulgemiseks vajuta Lõpeta."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) täielikuks paigaldamiseks tuleb arvuti taaskäivitada. Kas soovid arvuti kohe taaskäivitada ?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) eemaldamise lõpule viimine."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) on sinu arvutist eemaldatud.$\r$\n$\r$\nAbilise sulgemiseks vajuta Lõpeta."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) täielikuks eemaldamiseks tuleb arvuti taaskäivitada. Kas soovid arvuti kohe taaskäivitada ?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Taaskäivita kohe"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Taaskäivitan hiljem käsitsi"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Käivita $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Kuva Loemind"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "Lõpeta"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vali Start-menüü kaust"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vali $(^NameDA) otseteede jaoks Start-menüü kaust."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vali Start-menüü kaust, kuhu soovid paigutada programmi otseteed. Võid ka sisestada nime, et luua uus kaust."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ära loo otseteid"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Eemalda $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Eemalda $(^NameDA) oma arvutist."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Oled sa kindel et soovid $(^Name) paigaldamise katkestada?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Oled sa kindel et soovid $(^Name) eemaldamise katkestada?"
-!endif
+;Language: Estonian (1061)
+;Translated by johnny izzo (izzo@hot.ee)
+
+!insertmacro LANGFILE "Estonian" "Eesti keel"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) paigaldamine!"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "See abiline aitab paigaldada $(^NameDA).$\r$\n$\r$\nEnne paigaldamise alustamist on soovitatav kõik teised programmid sulgeda, see võimaldab teatud süsteemifaile uuendada ilma arvutit taaskäivitamata.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) eemaldamine!"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "See abiline aitab eemaldada $(^NameDA).$\r$\n$\r$\nEnne eemaldamist vaata, et $(^NameDA) oleks suletud.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Litsentsileping"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Enne $(^NameDA) paigaldamist vaata palun litsentsileping üle."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Kui sa oled lepingu tingimustega nõus, vali jätkamiseks Nõustun. $(^NameDA) paigaldamiseks pead sa lepinguga nõustuma."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Kui nõustud lepingu tingimustega, vali allolev märkeruut. $(^NameDA) paigaldamiseks pead lepinguga nõustuma. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kui nõustud lepingu tingimustega, märgi allpool esimene valik. $(^NameDA) paigaldamiseks pead lepinguga nõustuma. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Litsentsileping"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Enne $(^NameDA) eemaldamist vaata palun litsentsileping üle."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Kui sa oled lepingu tingimustega nõus, vali jätkamiseks Nõustun. $(^NameDA) eemaldamiseks pead sa lepinguga nõustuma."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Kui nõustud lepingu tingimustega, vali allolev märkeruut. $(^NameDA) eemaldamiseks pead lepinguga nõustuma. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kui nõustud lepingu tingimustega, märgi allpool esimene valik. $(^NameDA) eemaldamiseks pead lepinguga nõustuma. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Vajuta Page Down, et näha ülejäänud teksti."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vali komponendid"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Vali millised $(^NameDA) osad sa soovid paigaldada."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Kirjeldus"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vali komponendid"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Vali millised $(^NameDA) osad sa soovid eemaldada."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Nihuta hiir komponendile, et näha selle kirjeldust."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Nihuta hiir komponendile, et näha selle kirjeldust."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vali asukoht"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vali kaust kuhu paigaldada $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Vali asukoht"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vali kaust kust $(^NameDA) eemaldada."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Paigaldan..."
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Palun oota kuni $(^NameDA) on paigaldatud."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Programm paigaldatud"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Paigaldus edukalt sooritatud."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Paigaldus katkestatud"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Paigaldamine ebaõnnestus."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Eemaldan..."
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Palun oota kuni $(^NameDA) on eemaldatud."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Eemaldamine lõpetatud"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Eemaldamine edukalt lõpule viidud."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Eemaldamine katkestatud"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Eemaldamine ebaõnestus."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) paigalduse lõpule viimine."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) on sinu arvutisse paigaldatud.$\r$\n$\r$\nAbilise sulgemiseks vajuta Lõpeta."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) täielikuks paigaldamiseks tuleb arvuti taaskäivitada. Kas soovid arvuti kohe taaskäivitada ?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) eemaldamise lõpule viimine."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) on sinu arvutist eemaldatud.$\r$\n$\r$\nAbilise sulgemiseks vajuta Lõpeta."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) täielikuks eemaldamiseks tuleb arvuti taaskäivitada. Kas soovid arvuti kohe taaskäivitada ?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Taaskäivita kohe"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Taaskäivitan hiljem käsitsi"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Käivita $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Kuva Loemind"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "Lõpeta"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vali Start-menüü kaust"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vali $(^NameDA) otseteede jaoks Start-menüü kaust."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vali Start-menüü kaust, kuhu soovid paigutada programmi otseteed. Võid ka sisestada nime, et luua uus kaust."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ära loo otseteid"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Eemalda $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Eemalda $(^NameDA) oma arvutist."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Oled sa kindel et soovid $(^Name) paigaldamise katkestada?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Oled sa kindel et soovid $(^Name) eemaldamise katkestada?"
+!endif
diff --git a/Contrib/Language files/Farsi.nlf b/Contrib/Language files/Farsi.nlf
index f523199..13a22c4 100755
--- a/Contrib/Language files/Farsi.nlf
+++ b/Contrib/Language files/Farsi.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1065
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1256
-# RTL - anything else than RTL means LTR
-RTL
-# Translation By FzerorubigD - FzerorubigD@gmail.com - Thanx to all people help me in forum.persiantools.com, Elnaz Sarbar <elnaz@farsiweb.info>
-# ^Branding
-ÓíÓÊã äÕÈ äÇáÓÇÝÊ %s
-# ^SetupCaption
-äÕÈ $(^Name)
-# ^UninstallCaption
-ÍÐÝ $(^Name)
-# ^LicenseSubCaption
-: ãÌæÒ äÕÈ
-# ^ComponentsSubCaption
-: ÒíäååÇì äÕÈ
-# ^DirSubCaption
-: æÔå äÕÈ
-# ^InstallingSubCaption
-: ÏÑ ÍÇá äÕÈ
-# ^CompletedSubCaption
-: ÇíÇä íÇÝÊ
-# ^UnComponentsSubCaption
-: ÒíäååÇì ÍÐÝ
-# ^UnDirSubCaption
-: æÔå ÍÐÝ
-# ^ConfirmSubCaption
-: ÊÃííÏ
-# ^UninstallingSubCaption
-: ÏÑ ÍÇá ÍÐÝ
-# ^UnCompletedSubCaption
-: ÇíÇä íÇÝÊ
-# ^BackBtn
-&ÞÈá
-# ^NextBtn
-&ÈÚÏ
-# ^AgreeBtn
-&ãæÇÝÞã
-# ^AcceptBtn
-ãä åãå ÈäÏåÇì ãÌæÒ ÑÇ ÞÈæá &ÏÇÑã
-# ^DontAcceptBtn
-ãä ÈäÏåÇì ãÌæÒ ÑÇ ÞÈæá &äÏÇÑã
-# ^InstallBtn
-&äÕÈ
-# ^UninstallBtn
-&ÍÐÝ
-# ^CancelBtn
-ÇäÕÑÇÝ
-# ^CloseBtn
-&ÈÓÊä
-# ^BrowseBtn
-&ãÑæÑ...
-# ^ShowDetailsBtn
-äãÇíÔ ÌÒÆíÇÊ
-# ^ClickNext
-ÈÑÇì ÇÏÇãå Ñæì Ϙãå ÈÚÏ ˜áí˜ ˜äíÏ.
-# ^ClickInstall
-ÈÑÇì ÔÑæÚ äÕÈ Ñæì Ϙãå äÕÈ ˜áí˜ ˜äíÏ.
-# ^ClickUninstall
-ÈÑÇì ÔÑæÚ ÍÐÝ Ñæì Ϙãå ÍÐÝ ˜áí˜ ˜äíÏ.
-# ^Name
-äÇã
-# ^Completed
-ÇíÇä íÇÝÊ
-# ^LicenseText
-áØÝÇð ÞÈá ÇÒ äÕÈ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì Ϙãå ãæÇÝÞã ˜áí˜ ˜äíÏ.
-# ^LicenseTextCB
-áØÝÇð ÞÈá ÇÒ äÕÈ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì ÌÚÈå äÔÇäåÒäì ÒíÑ ˜áí˜ ˜äíÏ. $_CLICK
-# ^LicenseTextRB
-áØÝÇð ÞÈá ÇÒ äÕÈ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ˜äíÏ. $_CLICK
-# ^UnLicenseText
-áØÝÇð ÞÈá ÇÒ ÍÐÝ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì Ϙãå ãæÇÝÞã ˜áí˜ ˜äíÏ.
-# ^UnLicenseTextCB
-áØÝÇð ÞÈá ÇÒ ÍÐÝ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì ÌÚÈå äÔÇäåÒäì ÒíÑ ˜áí˜ ˜äíÏ. $_CLICK
-# ^UnLicenseTextRB
-áØÝÇð ÞÈá ÇÒ ÍÐÝ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ˜äíÏ. $_CLICK
-# ^Custom
-ÓÝÇÑÔì
-# ^ComponentsText
-˜äÇÑ ÈÎÔåÇíì ˜å ãìÎæÇåíÏ äÕÈ ÔæäÏ äÔÇäå ÈÒäíÏ æ äÔÇäå ÈÎÔåÇíì ÑÇ ˜å äãìÎæÇåíÏ äÕÈ ÔæäÏ ÈÑÏÇÑíÏ. $_CLICK
-# ^ComponentsSubText1
-äæÚ äÕÈ ÑÇ ãÔÎÕ ˜äíÏ:
-# ^ComponentsSubText2_NoInstTypes
-ÈÎÔåÇíì ÑÇ ˜å ãìÎæÇåíÏ äÕÈ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
-# ^ComponentsSubText2
-íÇ¡ ÈÎÔåÇì ÇÎÊíÇÑì ÑÇ ˜å ãìÎæÇåíÏ äÕÈ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
-# ^UnComponentsText
-˜äÇÑ ÈÎÔåÇíì ˜å ãìÎæÇåíÏ ÍÐÝ ÔæäÏ äÔÇäå ÈÒäíÏ æ äÔÇäå ÈÎÔåÇíì ÑÇ ˜å äãìÎæÇåíÏ ÍÐÝ ÔæäÏ ÈÑÏÇÑíÏ. $_CLICK
-# ^UnComponentsSubText1
-äæÚ ÍÐÝ ÑÇ ÇäÊÎÇÈ ˜äíÏ:
-# ^UnComponentsSubText2_NoInstTypes
-ÈÎÔåÇíì ÑÇ ˜å ãìÎæÇåíÏ ÍÐÝ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
-# ^UnComponentsSubText2
-íÇ¡ ÈÎÔåÇì ÇÎÊíÇÑì ÑÇ ˜å ãìÎæÇåíÏ ÍÐÝ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
-# ^DirText
-ÈÑäÇãå äÕÈ¡ $(^NameDA) ÑÇ ÏÑ æÔå ÒíÑ äÕÈ ÎæÇåÏ ˜ÑÏ. ÈÑÇì äÕÈ ÏÑ æÔå ÏíÑ Ñæì Ϙãå ãÑæÑ ˜áí˜ ˜äíÏ æ æÔå ÏíÑì ÇäÊÎÇÈ ˜äíÏ. $_CLICK
-# ^DirSubText
-æÔå ãÞÕÏ
-# ^DirBrowseText
-ÇäÊÎÇÈ æÔå ÈÑÇì äÕÈ $(^NameDA):
-# ^UnDirText
-ÈÑäÇãå äÕÈ¡ $(^NameDA) ÑÇ ÇÒ æÔå ÒíÑ ÍÐÝ ÎæÇåÏ ˜ÑÏ. ÈÑÇì äÕÈ ÏÑ æÔå ÏíÑ Ñæì Ϙãå ãÑæÑ ˜áí˜ ˜äíÏ æ æÔå ÏíÑì ÇäÊÎÇÈ ˜äíÏ. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-ÇäÊÎÇÈ æÔå ÈÑÇì ÍÐÝ $(^NameDA):
-# ^SpaceAvailable
-"ÝÖÇì ãæÌæÏ: "
-# ^SpaceRequired
-"ÝÖÇì ãæÑÏ äíÇÒ: "
-# ^UninstallingText
-þ(^NameDA) ÇÒ æÔå ÒíÑ ÍÐÝ ÎæÇåÏ ÔÏ. $_CLICK
-# ^UninstallingSubText
-ÍÐÝ ÇÒ:
-# ^FileError
-ÎØÇ åäÇã ÈÇÒ ˜ÑÏä ÑæäÏå ÈÑÇì äæÔÊä: \r\n\r\n$0\r\n\n ÈÑÇì ÊæÞÝ äÕÈ Ñæì Abort \r\n ÈÑÇì ÊáÇÔ ãÌÏÏ Ñæì Retry \r\n æ ÈÑÇì ÕÑÝäÙÑ ÇÒ Çíä ÑæäÏå Ñæì Ignore ˜áí˜ ˜äíÏ.
-# ^FileError_NoIgnore
-ÎØÇ åäÇã ÈÇÒ ˜ÑÏä ÑæäÏå ÈÑÇì äæÔÊä: \r\n\r\n$0\r\n\nÈÑÇì ÊáÇÔ ãÌÏÏ Ñæì Retry\r\næ ÈÑÇì ÇäÕÑÇÝ Ñæì Cancel ˜áí˜ ˜äíÏ.
-# ^CantWrite
-"äæÔÊä ãã˜ä äíÓÊ: "
-# ^CopyFailed
-äÓÎåÈÑÏÇÑì äÇãæÝÞ ÈæÏ.
-# ^CopyTo
-"äÓÎåÈÑÏÇÑì ÏÑ: "
-# ^Registering
-"ÏÑ ÍÇá ËÈÊ: "
-# ^Unregistering
-"ÏÑ ÍÇá ÍÐÝ ËÈÊ: "
-# ^SymbolNotFound
-"ÚáÇãÊ íÏÇ äÔÏ: "
-# ^CouldNotLoad
-"ÈÇÑÐÇÑì ãã˜ä äíÓÊ: "
-# ^CreateFolder
-"ÇíÌÇÏ æÔå: "
-# ^CreateShortcut
-"ÇíÌÇÏ ãíÇäÈõÑ: "
-# ^CreatedUninstaller
-"ÍÐݘääÏå ÇíÌÇÏ ÔÏ: "
-# ^Delete
-"ÍÐÝ ÑæäÏå: "
-# ^DeleteOnReboot
-"ÍÐÝ åäÇã ÑÇå ÇäÏÇÒì ãÌÏÏ: "
-# ^ErrorCreatingShortcut
-"ÎØÇ åäÇã ÇíÌÇÏ ãíÇäÈõÑ: "
-# ^ErrorCreating
-"ÎØÇ åäÇã ÇíÌÇÏ: "
-# ^ErrorDecompressing
-ÎØÇ åäÇã ÈÇÒ ˜ÑÏä ÇØáÇÚÇÊ! äÕȘääÏå ÎÑÇÈ ÇÓÊ¿
-# ^ErrorRegistering
-ÎØÇ åäÇã ËÈÊ DLL
-# ^ExecShell
-"æÓÊå ÇÌÑÇíì: "
-# ^Exec
-"ÇÌÑÇ: "
-# ^Extract
-"ÇÓÊÎÑÇÌ: "
-# ^ErrorWriting
-"ÇÓÊÎÑÇÌ: ÎØÇ åäÇã äæÔÊä ÏÑ ÑæäÏå"
-# ^InvalidOpcode
-äÕȘääÏå ÎÑÇÈ ÇÓÊ: ˜Ï ÚãáíÇÊì äÇãÚÊÈÑ.
-# ^NoOLE
-"þOLE æÌæÏ äÏÇÑÏ: "
-# ^OutputFolder
-"æÔå ÎÑæÌì: "
-# ^RemoveFolder
-"ÍÐÝ æÔå: "
-# ^RenameOnReboot
-"ÊÛííÑ äÇã åäÇã ÑÇå ÇäÏÇÒì ãÌÏÏ: "
-# ^Rename
-"ÊÛííÑ äÇã: "
-# ^Skipped
-"Ôã æÔì ÔÏ: "
-# ^CopyDetails
-äÓÎåÈÑÏÇÑì ÌÒÆíÇÊ ÏÑ ˜áíÈÑÏ
-# ^LogInstall
-ËÈÊ ÑæäÏ äÕÈ
-# ^Byte
- ÈÇíÊ
-# ^Kilo
- ˜íáæ
-# ^Mega
- ãÇ
-# ^Giga
- íÇ
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1065
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1256
+# RTL - anything else than RTL means LTR
+RTL
+# Translation By FzerorubigD - FzerorubigD@gmail.com - Thanx to all people help me in forum.persiantools.com, Elnaz Sarbar <elnaz@farsiweb.info>
+# ^Branding
+ÓíÓÊã äÕÈ äÇáÓÇÝÊ %s
+# ^SetupCaption
+äÕÈ $(^Name)
+# ^UninstallCaption
+ÍÐÝ $(^Name)
+# ^LicenseSubCaption
+: ãÌæÒ äÕÈ
+# ^ComponentsSubCaption
+: ÒíäååÇì äÕÈ
+# ^DirSubCaption
+: æÔå äÕÈ
+# ^InstallingSubCaption
+: ÏÑ ÍÇá äÕÈ
+# ^CompletedSubCaption
+: ÇíÇä íÇÝÊ
+# ^UnComponentsSubCaption
+: ÒíäååÇì ÍÐÝ
+# ^UnDirSubCaption
+: æÔå ÍÐÝ
+# ^ConfirmSubCaption
+: ÊÃííÏ
+# ^UninstallingSubCaption
+: ÏÑ ÍÇá ÍÐÝ
+# ^UnCompletedSubCaption
+: ÇíÇä íÇÝÊ
+# ^BackBtn
+&ÞÈá
+# ^NextBtn
+&ÈÚÏ
+# ^AgreeBtn
+&ãæÇÝÞã
+# ^AcceptBtn
+ãä åãå ÈäÏåÇì ãÌæÒ ÑÇ ÞÈæá &ÏÇÑã
+# ^DontAcceptBtn
+ãä ÈäÏåÇì ãÌæÒ ÑÇ ÞÈæá &äÏÇÑã
+# ^InstallBtn
+&äÕÈ
+# ^UninstallBtn
+&ÍÐÝ
+# ^CancelBtn
+ÇäÕÑÇÝ
+# ^CloseBtn
+&ÈÓÊä
+# ^BrowseBtn
+&ãÑæÑ...
+# ^ShowDetailsBtn
+äãÇíÔ ÌÒÆíÇÊ
+# ^ClickNext
+ÈÑÇì ÇÏÇãå Ñæì Ϙãå ÈÚÏ ˜áí˜ ˜äíÏ.
+# ^ClickInstall
+ÈÑÇì ÔÑæÚ äÕÈ Ñæì Ϙãå äÕÈ ˜áí˜ ˜äíÏ.
+# ^ClickUninstall
+ÈÑÇì ÔÑæÚ ÍÐÝ Ñæì Ϙãå ÍÐÝ ˜áí˜ ˜äíÏ.
+# ^Name
+äÇã
+# ^Completed
+ÇíÇä íÇÝÊ
+# ^LicenseText
+áØÝÇð ÞÈá ÇÒ äÕÈ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì Ϙãå ãæÇÝÞã ˜áí˜ ˜äíÏ.
+# ^LicenseTextCB
+áØÝÇð ÞÈá ÇÒ äÕÈ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì ÌÚÈå äÔÇäåÒäì ÒíÑ ˜áí˜ ˜äíÏ. $_CLICK
+# ^LicenseTextRB
+áØÝÇð ÞÈá ÇÒ äÕÈ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ˜äíÏ. $_CLICK
+# ^UnLicenseText
+áØÝÇð ÞÈá ÇÒ ÍÐÝ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì Ϙãå ãæÇÝÞã ˜áí˜ ˜äíÏ.
+# ^UnLicenseTextCB
+áØÝÇð ÞÈá ÇÒ ÍÐÝ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Ñæì ÌÚÈå äÔÇäåÒäì ÒíÑ ˜áí˜ ˜äíÏ. $_CLICK
+# ^UnLicenseTextRB
+áØÝÇð ÞÈá ÇÒ ÍÐÝ $(^NameDA) ãÊä ãÌæÒ ÑÇ ÈÎæÇäíÏ. ÇÑ åãå ÈäÏåÇì Âä ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ˜äíÏ. $_CLICK
+# ^Custom
+ÓÝÇÑÔì
+# ^ComponentsText
+˜äÇÑ ÈÎÔåÇíì ˜å ãìÎæÇåíÏ äÕÈ ÔæäÏ äÔÇäå ÈÒäíÏ æ äÔÇäå ÈÎÔåÇíì ÑÇ ˜å äãìÎæÇåíÏ äÕÈ ÔæäÏ ÈÑÏÇÑíÏ. $_CLICK
+# ^ComponentsSubText1
+äæÚ äÕÈ ÑÇ ãÔÎÕ ˜äíÏ:
+# ^ComponentsSubText2_NoInstTypes
+ÈÎÔåÇíì ÑÇ ˜å ãìÎæÇåíÏ äÕÈ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
+# ^ComponentsSubText2
+íÇ¡ ÈÎÔåÇì ÇÎÊíÇÑì ÑÇ ˜å ãìÎæÇåíÏ äÕÈ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
+# ^UnComponentsText
+˜äÇÑ ÈÎÔåÇíì ˜å ãìÎæÇåíÏ ÍÐÝ ÔæäÏ äÔÇäå ÈÒäíÏ æ äÔÇäå ÈÎÔåÇíì ÑÇ ˜å äãìÎæÇåíÏ ÍÐÝ ÔæäÏ ÈÑÏÇÑíÏ. $_CLICK
+# ^UnComponentsSubText1
+äæÚ ÍÐÝ ÑÇ ÇäÊÎÇÈ ˜äíÏ:
+# ^UnComponentsSubText2_NoInstTypes
+ÈÎÔåÇíì ÑÇ ˜å ãìÎæÇåíÏ ÍÐÝ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
+# ^UnComponentsSubText2
+íÇ¡ ÈÎÔåÇì ÇÎÊíÇÑì ÑÇ ˜å ãìÎæÇåíÏ ÍÐÝ ÔæäÏ ÇäÊÎÇÈ ˜äíÏ:
+# ^DirText
+ÈÑäÇãå äÕÈ¡ $(^NameDA) ÑÇ ÏÑ æÔå ÒíÑ äÕÈ ÎæÇåÏ ˜ÑÏ. ÈÑÇì äÕÈ ÏÑ æÔå ÏíÑ Ñæì Ϙãå ãÑæÑ ˜áí˜ ˜äíÏ æ æÔå ÏíÑì ÇäÊÎÇÈ ˜äíÏ. $_CLICK
+# ^DirSubText
+æÔå ãÞÕÏ
+# ^DirBrowseText
+ÇäÊÎÇÈ æÔå ÈÑÇì äÕÈ $(^NameDA):
+# ^UnDirText
+ÈÑäÇãå äÕÈ¡ $(^NameDA) ÑÇ ÇÒ æÔå ÒíÑ ÍÐÝ ÎæÇåÏ ˜ÑÏ. ÈÑÇì äÕÈ ÏÑ æÔå ÏíÑ Ñæì Ϙãå ãÑæÑ ˜áí˜ ˜äíÏ æ æÔå ÏíÑì ÇäÊÎÇÈ ˜äíÏ. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+ÇäÊÎÇÈ æÔå ÈÑÇì ÍÐÝ $(^NameDA):
+# ^SpaceAvailable
+"ÝÖÇì ãæÌæÏ: "
+# ^SpaceRequired
+"ÝÖÇì ãæÑÏ äíÇÒ: "
+# ^UninstallingText
+þ(^NameDA) ÇÒ æÔå ÒíÑ ÍÐÝ ÎæÇåÏ ÔÏ. $_CLICK
+# ^UninstallingSubText
+ÍÐÝ ÇÒ:
+# ^FileError
+ÎØÇ åäÇã ÈÇÒ ˜ÑÏä ÑæäÏå ÈÑÇì äæÔÊä: \r\n\r\n$0\r\n\n ÈÑÇì ÊæÞÝ äÕÈ Ñæì Abort \r\n ÈÑÇì ÊáÇÔ ãÌÏÏ Ñæì Retry \r\n æ ÈÑÇì ÕÑÝäÙÑ ÇÒ Çíä ÑæäÏå Ñæì Ignore ˜áí˜ ˜äíÏ.
+# ^FileError_NoIgnore
+ÎØÇ åäÇã ÈÇÒ ˜ÑÏä ÑæäÏå ÈÑÇì äæÔÊä: \r\n\r\n$0\r\n\nÈÑÇì ÊáÇÔ ãÌÏÏ Ñæì Retry\r\næ ÈÑÇì ÇäÕÑÇÝ Ñæì Cancel ˜áí˜ ˜äíÏ.
+# ^CantWrite
+"äæÔÊä ãã˜ä äíÓÊ: "
+# ^CopyFailed
+äÓÎåÈÑÏÇÑì äÇãæÝÞ ÈæÏ.
+# ^CopyTo
+"äÓÎåÈÑÏÇÑì ÏÑ: "
+# ^Registering
+"ÏÑ ÍÇá ËÈÊ: "
+# ^Unregistering
+"ÏÑ ÍÇá ÍÐÝ ËÈÊ: "
+# ^SymbolNotFound
+"ÚáÇãÊ íÏÇ äÔÏ: "
+# ^CouldNotLoad
+"ÈÇÑÐÇÑì ãã˜ä äíÓÊ: "
+# ^CreateFolder
+"ÇíÌÇÏ æÔå: "
+# ^CreateShortcut
+"ÇíÌÇÏ ãíÇäÈõÑ: "
+# ^CreatedUninstaller
+"ÍÐݘääÏå ÇíÌÇÏ ÔÏ: "
+# ^Delete
+"ÍÐÝ ÑæäÏå: "
+# ^DeleteOnReboot
+"ÍÐÝ åäÇã ÑÇå ÇäÏÇÒì ãÌÏÏ: "
+# ^ErrorCreatingShortcut
+"ÎØÇ åäÇã ÇíÌÇÏ ãíÇäÈõÑ: "
+# ^ErrorCreating
+"ÎØÇ åäÇã ÇíÌÇÏ: "
+# ^ErrorDecompressing
+ÎØÇ åäÇã ÈÇÒ ˜ÑÏä ÇØáÇÚÇÊ! äÕȘääÏå ÎÑÇÈ ÇÓÊ¿
+# ^ErrorRegistering
+ÎØÇ åäÇã ËÈÊ DLL
+# ^ExecShell
+"æÓÊå ÇÌÑÇíì: "
+# ^Exec
+"ÇÌÑÇ: "
+# ^Extract
+"ÇÓÊÎÑÇÌ: "
+# ^ErrorWriting
+"ÇÓÊÎÑÇÌ: ÎØÇ åäÇã äæÔÊä ÏÑ ÑæäÏå"
+# ^InvalidOpcode
+äÕȘääÏå ÎÑÇÈ ÇÓÊ: ˜Ï ÚãáíÇÊì äÇãÚÊÈÑ.
+# ^NoOLE
+"þOLE æÌæÏ äÏÇÑÏ: "
+# ^OutputFolder
+"æÔå ÎÑæÌì: "
+# ^RemoveFolder
+"ÍÐÝ æÔå: "
+# ^RenameOnReboot
+"ÊÛííÑ äÇã åäÇã ÑÇå ÇäÏÇÒì ãÌÏÏ: "
+# ^Rename
+"ÊÛííÑ äÇã: "
+# ^Skipped
+"Ôã æÔì ÔÏ: "
+# ^CopyDetails
+äÓÎåÈÑÏÇÑì ÌÒÆíÇÊ ÏÑ ˜áíÈÑÏ
+# ^LogInstall
+ËÈÊ ÑæäÏ äÕÈ
+# ^Byte
+ ÈÇíÊ
+# ^Kilo
+ ˜íáæ
+# ^Mega
+ ãÇ
+# ^Giga
+ íÇ
diff --git a/Contrib/Language files/Farsi.nsh b/Contrib/Language files/Farsi.nsh
index 6ddaed7..4c3e3aa 100755
--- a/Contrib/Language files/Farsi.nsh
+++ b/Contrib/Language files/Farsi.nsh
@@ -1,121 +1,121 @@
-;Language: Farsi (1065)
-;By FzerorubigD - FzerorubigD@gmail.com - Thanx to all people help me in forum.persiantools.com
-
-!insertmacro LANGFILE "Farsi" "Farsi"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Èå ÈÑäÇãå äÕÈ $(^NameDA) ÎæÔ ÂãÏíÏ."
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Çíä ÈÑäÇãå ÔãÇ ÑÇ ÏÑ äÕÈ $(^NameDA) íÇÑí ãíßäÏ.$\r$\n$\r$\nÊæÕíå ãíßäíã ßáíå ÈÑäÇãå åÇí ÏÑ ÍÇá ÇÌÑÇ ÑÇ ÈÈäÏíÏ. Çíä Èå ÈÑäÇãå äÕÈ ÇÌÇÒå ãíÏåÏ ßå ÝÇíáåÇí áÇÒã ÑÇ ÈÏæä äíÇÒ Èå ÑÇå ÇäÏÇÒí ÏæÈÇÑå ßÇãíæÊÑ ÔãÇ Èå ÑæÒ ßäÏ.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Èå ÈÑäÇãå ÍÐÝ $(^NameDA) ÎæÔ ÂãÏíÏ."
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT " Çíä ÈÑäÇãå ÈÑÇí ÍÐÝ $(^NameDA) Èå ÔãÇ ßãß ãíßäÏ.$\r$\n$\r$\nÞÈá ÇÒ ÍÐÝ $(^NameDA) ãØãÆä ÔæíÏ Çíä ÈÑäÇãå ÏÑ ÍÇá ÇÌÑÇ äÈÇÔÏ.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "ÊæÇÝÞäÇãå äÕÈ"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "áØÝÇ íÔ ÇÒ äÕÈ $(^NameDA) ãÝÇÏ ÊæÇÝÞäÇãå ÑÇ ãÑæÑ ßäíÏ."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Ïßãå ãæÇÝÞã ÑÇ ÈÝÔÇÑíÏ. ÈÑÇí äÕÈ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Êíß ÒíÑ ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí äÕÈ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí äÕÈ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ÊæÇÝÞäÇãå ÍÐÝ"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "áØÝÇ ßáíå ÈäÏåÇí Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈá ÇÑ ÍÐÝ $(^NameDA) ãÑæÑ ßäíÏ."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Ïßãå ãæÇÝÞã ÑÇ ÈÝÔÇÑíÏ. ÈÑÇí ÍÐÝ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Êíß ÒíÑ ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí ÍÐÝ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå Ñ ÞÈæá ßäíÏ. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí ÍÐÝ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå Ñ ÞÈæá ßäíÏ. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ÈÑÇí ÏíÏä ãÊä Èå ÕæÑÊ ßÇãá ÇÒ ßáíÏ Page Down ÇÓÊÝÇÏå ßäíÏ."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ÇäÊÎÇÈ ÇÌÒÇí ÈÑäÇãå "
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "ÇÌÒÇíí ÇÒ $(^NameDA) ßå ãíÎæÇåíÏ äÕÈ ÔæäÏ ÑÇ ÇäÊÎÇÈ ßäíÏ."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÊæÖíÍÇÊ"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ÇäÊÎÇÈ ÇÌÒÇí ÈÑäÇãå"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "ÇÌÒÇíí ÇÒ $(^NameDA) ÑÇ ßå ãíÎæÇåíÏ ÍÐÝ ßäíÏ ÇäÊÎÇÈ ßäíÏ."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äÔÇäÑ ãÇæÓ ÑÇ ÈÑ Ñæí ÇÌÒÇíí ßå ãíÎæÇåíÏ ÈÈÑíÏ ÊÇ ÊæÖíÍÇÊ Âä ÑÇ ÈÈíäíÏ."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äÔÇäÑ ãÇæÓ ÑÇ ÈÑ Ñæí ÇÌÒÇíí ßå ãíÎæÇåíÏ ÈÈÑíÏ ÊÇ ÊæÖíÍÇÊ Âä ÑÇ ÈÈíäíÏ."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ÇäÊÎÇÈ æÔå äÕÈ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "æÔå Çí ßå ãíÎæÇåíÏ $(^NameDA) ÏÑ Âä äÕÈ ÔæÏ ÑÇ ÇäÊÎÇÈ ßäíÏ."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "æÔå ÍÐÝ ÑÇ ÇäÊÎÇÈ ßäíÏ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "æÔå Çí ßå ãíÎæÇåíÏ $(^NameDA) ÑÇ ÇÒ Âä ÍÐÝ ßäíÏ ÇäÊÎÇÈ ßäíÏ."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "äÕÈ ÈÑäÇãå"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "áØÝÇ ãÏÊ ÒãÇäí ßå $(^NameDA) ÏÑ ÍÇá äÕÈ ÇÓÊ ÑÇ ÕÈÑ ßäíÏ."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "äÕÈ ÇíÇä íÇÝÊ"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ÈÑäÇãå äÕÈ ÈÇ ãæÝÞíÊ ÇíÇä íÇÝÊ."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "ÈÑäÇãå äÕÈ áÛæ ÔÏ."
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ÈÑäÇãå äÕÈ Èå ÕæÑÊ äíãå ÊãÇã ÇíÇä íÇÝÊ."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÍÐÝ ÈÑäÇãå"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "áØÝÇ ãÏÊ ÒãÇäí ßå $(^NameDA) ÏÑ ÍÇá ÍÐÝ ÇÓÊ ÑÇ ÕÈÑ ßäíÏ."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ÍÐÝ ÇíÇä íÇÝÊ"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ÈÑäÇãå ÍÐÝ ÈÇ ãæÝÞíÊ ÇíÇä íÇÝÊ."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ÈÑäÇãå ÍÐÝ áÛæ ÔÏ"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ÈÑäÇãå ÍÐÝ Èå ÕæÑÊ äíãå ÊãÇã ÇíÇä íÇÝÊ"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÈÑäÇãå äÕÈ $(^NameDA) ÇíÇä íÇÝÊ"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ÈÑ Ñæí ßÇãíæÊÑ ÔãÇ äÕÈ ÔÏ.$\r$\n$\r$\nÈÑ Ñæí Ïßãå ÇíÇä ÈÑÇí ÎÑæÌ ÇÒ Çíä ÈÑäÇãå ßáíß ßäíÏ."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "ßÇãíæÊÑ ÔãÇ ÈÑÇí Êßãíá äÕÈ $(^NameDA) ÈÇíÓÊí ÏæÈÇÑå ÑÇå ÇäÏÇÒí ÔæÏ. ÂíÇ ãíÎæÇåíÏ Çíä ßÇÑ ÑÇ ÇáÇä ÇäÌÇã ÏåíÏ¿"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÈÑäÇãå ÍÐÝ $(^NameDA) ÇíÇä íÇÝÊ"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ÇÒ Ñæí ßÇãíæÊÑ ÔãÇ ÍÐÝ ÔÏ.$\r$\n$\r$\nÈÑ Ñæí Ïßãå ÇíÇä ÈÑÇí ÎÑæÌ ÇÒ Çíä ÈÑäÇãå ßáíß ßäíÏ."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "ßÇãíæÊÑ ÔãÇ ÈÑÇí Êßãíá ÍÐÝ$(^NameDA) ÈÇíÓÊ ÏæÈÇÑå ÑÇå ÇäÏÇÒí ÔæÏ.ÂíÇ ãíÎæÇåíÏ Çíä ßÇÑ ÑÇ ÇáÇä ÇäÌÇã ÏåíÏ¿"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÑÇå ÇäÏÇÒí ãÌÏÏ."
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "ãä ÎæÏã Çíä ßÇÑ ÑÇ ÇäÌÇã ÎæÇåã ÏÇÏ."
- ${LangFileString} MUI_TEXT_FINISH_RUN "&ÇÌÑÇí $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&äãÇíÔ ÝÇíá ÊæÖíÍÇÊ"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&ÇíÇä"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ÇäÊÎÇÈ æÔå ÏÑ ãäæí ÈÑäÇãå åÇ"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "æÔå Çí ßå ãíÎæÇåíÏ ãíÇäÈÑåÇí $(^NameDA) ÏÑ Âä ÞÑÇÑ ÈíÑäÏ ÑÇ ÇäÊÎÇÈ ßäíÏ."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "æÔå Çí ÏÑ ãäæí ÈÑäÇãå åÇ ßå ãíÎæÇåíÏ ãíÇäÈÑåÇí ÈÑäÇãå ÏÑ ÂäÌÇ ÇíÌÇÏ ÔæäÏ ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí ÇíÌÇÏ íß æÔå ÌÏíÏ ãíÊæÇäíÏ íß äÇã ÊÇí ßäíÏ."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "ãíÇäÈÑí äÓÇÒ"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "ÍÐÝ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Çß ßÑÏä $(^NameDA) ÇÒ Ñæí ßÇãíæÊÑ ÔãÇ."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "ÂíÇ ãØãÆäíÏ ßå ãíÎæÇåíÏ ÇÒ ÈÑäÇãå äÕÈ $(^Name) ÎÇÑÌ ÔæíÏ¿"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "ÂíÇ ãØãÆäíÏ ßå ãíÎæÇåíÏ ÇÒ ÈÑäÇãå ÍÐÝ $(^Name) ÎÇÑÌ ÔæíÏ¿"
-!endif
+;Language: Farsi (1065)
+;By FzerorubigD - FzerorubigD@gmail.com - Thanx to all people help me in forum.persiantools.com
+
+!insertmacro LANGFILE "Farsi" "Farsi"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Èå ÈÑäÇãå äÕÈ $(^NameDA) ÎæÔ ÂãÏíÏ."
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Çíä ÈÑäÇãå ÔãÇ ÑÇ ÏÑ äÕÈ $(^NameDA) íÇÑí ãíßäÏ.$\r$\n$\r$\nÊæÕíå ãíßäíã ßáíå ÈÑäÇãå åÇí ÏÑ ÍÇá ÇÌÑÇ ÑÇ ÈÈäÏíÏ. Çíä Èå ÈÑäÇãå äÕÈ ÇÌÇÒå ãíÏåÏ ßå ÝÇíáåÇí áÇÒã ÑÇ ÈÏæä äíÇÒ Èå ÑÇå ÇäÏÇÒí ÏæÈÇÑå ßÇãíæÊÑ ÔãÇ Èå ÑæÒ ßäÏ.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Èå ÈÑäÇãå ÍÐÝ $(^NameDA) ÎæÔ ÂãÏíÏ."
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT " Çíä ÈÑäÇãå ÈÑÇí ÍÐÝ $(^NameDA) Èå ÔãÇ ßãß ãíßäÏ.$\r$\n$\r$\nÞÈá ÇÒ ÍÐÝ $(^NameDA) ãØãÆä ÔæíÏ Çíä ÈÑäÇãå ÏÑ ÍÇá ÇÌÑÇ äÈÇÔÏ.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "ÊæÇÝÞäÇãå äÕÈ"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "áØÝÇ íÔ ÇÒ äÕÈ $(^NameDA) ãÝÇÏ ÊæÇÝÞäÇãå ÑÇ ãÑæÑ ßäíÏ."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Ïßãå ãæÇÝÞã ÑÇ ÈÝÔÇÑíÏ. ÈÑÇí äÕÈ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Êíß ÒíÑ ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí äÕÈ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí äÕÈ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ÊæÇÝÞäÇãå ÍÐÝ"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "áØÝÇ ßáíå ÈäÏåÇí Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈá ÇÑ ÍÐÝ $(^NameDA) ãÑæÑ ßäíÏ."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Ïßãå ãæÇÝÞã ÑÇ ÈÝÔÇÑíÏ. ÈÑÇí ÍÐÝ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå ÑÇ ÞÈæá ßäíÏ."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Êíß ÒíÑ ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí ÍÐÝ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå Ñ ÞÈæá ßäíÏ. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÇÑ ßáíå ÈäÏåÇí ÊæÇÝÞäÇãå ÑÇ ÞÈæá ÏÇÑíÏ Òíäå Çæá ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí ÍÐÝ $(^NameDA) ÔãÇ ÈÇíÓÊ Çíä ÊæÇÝÞäÇãå Ñ ÞÈæá ßäíÏ. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ÈÑÇí ÏíÏä ãÊä Èå ÕæÑÊ ßÇãá ÇÒ ßáíÏ Page Down ÇÓÊÝÇÏå ßäíÏ."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ÇäÊÎÇÈ ÇÌÒÇí ÈÑäÇãå "
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "ÇÌÒÇíí ÇÒ $(^NameDA) ßå ãíÎæÇåíÏ äÕÈ ÔæäÏ ÑÇ ÇäÊÎÇÈ ßäíÏ."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÊæÖíÍÇÊ"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ÇäÊÎÇÈ ÇÌÒÇí ÈÑäÇãå"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "ÇÌÒÇíí ÇÒ $(^NameDA) ÑÇ ßå ãíÎæÇåíÏ ÍÐÝ ßäíÏ ÇäÊÎÇÈ ßäíÏ."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äÔÇäÑ ãÇæÓ ÑÇ ÈÑ Ñæí ÇÌÒÇíí ßå ãíÎæÇåíÏ ÈÈÑíÏ ÊÇ ÊæÖíÍÇÊ Âä ÑÇ ÈÈíäíÏ."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äÔÇäÑ ãÇæÓ ÑÇ ÈÑ Ñæí ÇÌÒÇíí ßå ãíÎæÇåíÏ ÈÈÑíÏ ÊÇ ÊæÖíÍÇÊ Âä ÑÇ ÈÈíäíÏ."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ÇäÊÎÇÈ æÔå äÕÈ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "æÔå Çí ßå ãíÎæÇåíÏ $(^NameDA) ÏÑ Âä äÕÈ ÔæÏ ÑÇ ÇäÊÎÇÈ ßäíÏ."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "æÔå ÍÐÝ ÑÇ ÇäÊÎÇÈ ßäíÏ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "æÔå Çí ßå ãíÎæÇåíÏ $(^NameDA) ÑÇ ÇÒ Âä ÍÐÝ ßäíÏ ÇäÊÎÇÈ ßäíÏ."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "äÕÈ ÈÑäÇãå"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "áØÝÇ ãÏÊ ÒãÇäí ßå $(^NameDA) ÏÑ ÍÇá äÕÈ ÇÓÊ ÑÇ ÕÈÑ ßäíÏ."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "äÕÈ ÇíÇä íÇÝÊ"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ÈÑäÇãå äÕÈ ÈÇ ãæÝÞíÊ ÇíÇä íÇÝÊ."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "ÈÑäÇãå äÕÈ áÛæ ÔÏ."
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ÈÑäÇãå äÕÈ Èå ÕæÑÊ äíãå ÊãÇã ÇíÇä íÇÝÊ."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÍÐÝ ÈÑäÇãå"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "áØÝÇ ãÏÊ ÒãÇäí ßå $(^NameDA) ÏÑ ÍÇá ÍÐÝ ÇÓÊ ÑÇ ÕÈÑ ßäíÏ."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ÍÐÝ ÇíÇä íÇÝÊ"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ÈÑäÇãå ÍÐÝ ÈÇ ãæÝÞíÊ ÇíÇä íÇÝÊ."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ÈÑäÇãå ÍÐÝ áÛæ ÔÏ"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ÈÑäÇãå ÍÐÝ Èå ÕæÑÊ äíãå ÊãÇã ÇíÇä íÇÝÊ"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÈÑäÇãå äÕÈ $(^NameDA) ÇíÇä íÇÝÊ"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ÈÑ Ñæí ßÇãíæÊÑ ÔãÇ äÕÈ ÔÏ.$\r$\n$\r$\nÈÑ Ñæí Ïßãå ÇíÇä ÈÑÇí ÎÑæÌ ÇÒ Çíä ÈÑäÇãå ßáíß ßäíÏ."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "ßÇãíæÊÑ ÔãÇ ÈÑÇí Êßãíá äÕÈ $(^NameDA) ÈÇíÓÊí ÏæÈÇÑå ÑÇå ÇäÏÇÒí ÔæÏ. ÂíÇ ãíÎæÇåíÏ Çíä ßÇÑ ÑÇ ÇáÇä ÇäÌÇã ÏåíÏ¿"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÈÑäÇãå ÍÐÝ $(^NameDA) ÇíÇä íÇÝÊ"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ÇÒ Ñæí ßÇãíæÊÑ ÔãÇ ÍÐÝ ÔÏ.$\r$\n$\r$\nÈÑ Ñæí Ïßãå ÇíÇä ÈÑÇí ÎÑæÌ ÇÒ Çíä ÈÑäÇãå ßáíß ßäíÏ."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "ßÇãíæÊÑ ÔãÇ ÈÑÇí Êßãíá ÍÐÝ$(^NameDA) ÈÇíÓÊ ÏæÈÇÑå ÑÇå ÇäÏÇÒí ÔæÏ.ÂíÇ ãíÎæÇåíÏ Çíä ßÇÑ ÑÇ ÇáÇä ÇäÌÇã ÏåíÏ¿"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÑÇå ÇäÏÇÒí ãÌÏÏ."
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "ãä ÎæÏã Çíä ßÇÑ ÑÇ ÇäÌÇã ÎæÇåã ÏÇÏ."
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&ÇÌÑÇí $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&äãÇíÔ ÝÇíá ÊæÖíÍÇÊ"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&ÇíÇä"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ÇäÊÎÇÈ æÔå ÏÑ ãäæí ÈÑäÇãå åÇ"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "æÔå Çí ßå ãíÎæÇåíÏ ãíÇäÈÑåÇí $(^NameDA) ÏÑ Âä ÞÑÇÑ ÈíÑäÏ ÑÇ ÇäÊÎÇÈ ßäíÏ."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "æÔå Çí ÏÑ ãäæí ÈÑäÇãå åÇ ßå ãíÎæÇåíÏ ãíÇäÈÑåÇí ÈÑäÇãå ÏÑ ÂäÌÇ ÇíÌÇÏ ÔæäÏ ÑÇ ÇäÊÎÇÈ ßäíÏ. ÈÑÇí ÇíÌÇÏ íß æÔå ÌÏíÏ ãíÊæÇäíÏ íß äÇã ÊÇí ßäíÏ."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "ãíÇäÈÑí äÓÇÒ"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "ÍÐÝ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Çß ßÑÏä $(^NameDA) ÇÒ Ñæí ßÇãíæÊÑ ÔãÇ."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "ÂíÇ ãØãÆäíÏ ßå ãíÎæÇåíÏ ÇÒ ÈÑäÇãå äÕÈ $(^Name) ÎÇÑÌ ÔæíÏ¿"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "ÂíÇ ãØãÆäíÏ ßå ãíÎæÇåíÏ ÇÒ ÈÑäÇãå ÍÐÝ $(^Name) ÎÇÑÌ ÔæíÏ¿"
+!endif
diff --git a/Contrib/Language files/Finnish.nlf b/Contrib/Language files/Finnish.nlf
index 45368d9..d6e558b 100755
--- a/Contrib/Language files/Finnish.nlf
+++ b/Contrib/Language files/Finnish.nlf
@@ -1,192 +1,192 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1035
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Eclipser (Jonne Lehtinen) <Eclipser at pilvikaupunki dot net>
-# Corrections by the Mozilla.fi crew
-# ^Branding
-Nullsoftin asennusjärjestelmä %s
-# ^SetupCaption
-$(^Name) Asennus
-# ^UninstallCaption
-$(^Name) Poisto
-# ^LicenseSubCaption
-: Lisenssisopimus
-# ^ComponentsSubCaption
-: Asennusvaihtoehdot
-# ^DirSubCaption
-: Asennuskansio
-# ^InstallingSubCaption
-: Asennetaan
-# ^CompletedSubCaption
-: Valmis
-# ^UnComponentsSubCaption
-: Poistovaihtoehdot
-# ^UnDirSubCaption
-: Poistokansio
-# ^ConfirmSubCaption
-: Varmistus
-# ^UninstallingSubCaption
-: Poistetaan
-# ^UnCompletedSubCaption
-: Valmis
-# ^BackBtn
-< &Takaisin
-# ^NextBtn
-&Seuraava >
-# ^AgreeBtn
-&Hyväksyn
-# ^AcceptBtn
-Hyväksyn lisenssisopimuksen ehdot
-# ^DontAcceptBtn
-En hyväksy sopimuksen ehtoja
-# ^InstallBtn
-&Asenna
-# ^UninstallBtn
-&Poista
-# ^CancelBtn
-Peruuta
-# ^CloseBtn
-&Sulje
-# ^BrowseBtn
-S&elaa...
-# ^ShowDetailsBtn
-&Näytä tiedot
-# ^ClickNext
-Valitse Seuraava jatkaaksesi.
-# ^ClickInstall
-Valitse Asenna aloittaaksesi asennuksen.
-# ^ClickUninstall
-Valitse Poista poistaaksesi asennuksen.
-# ^Name
-Nimi
-# ^Completed
-Valmis
-# ^LicenseText
-Lue lisenssisopimus ennen asentamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse Hyväksyn.
-# ^LicenseTextCB
-Lue lisenssisopimus ennen asentamista. Jos hyväksyt sopimuksen kaikki ehdot, laita rasti ruutuun. $_CLICK
-# ^LicenseTextRB
-Lue lisenssisopimus ennen asentamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse ensimmäinen vaihtoehto alapuolelta. $_CLICK
-# ^UnLicenseText
-Lue lisenssisopimus ennen poistamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse Hyväksyn.
-# ^UnLicenseTextCB
-Lue lisenssisopimus ennen poistamista. Jos hyväksyt sopimuksen kaikki ehdot, laita rasti ruutuun. $_CLICK
-# ^UnLicenseTextRB
-Lue lisenssisopimus ennen poistamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse ensimmäinen vaihtoehto alapuolelta. $_CLICK
-# ^Custom
-Oma
-# ^ComponentsText
-Valitse komponentit, jotka haluat asentaa, ja poista valinta komponenteista, joita et halua asentaa. $_CLICK
-# ^ComponentsSubText1
-Valitse asennustyyppi:
-# ^ComponentsSubText2_NoInstTypes
-Valitse asennettavat komponentit:
-# ^ComponentsSubText2
-Tai, valitse valinnaiset komponentit, jotka haluat asentaa:
-# ^UnComponentsText
-Valitse komponentit, jotka haluat poistaa, ja poista valinta komponenteista, joita et haluat poistaa. $_CLICK
-# ^UnComponentsSubText1
-Valitse poistotyyppi:
-# ^UnComponentsSubText2_NoInstTypes
-Valitse poistettavat komponentit:
-# ^UnComponentsSubText2
-Tai, valitse valinnaiset komponentit, jotka haluat poistaa
-# ^DirText
-Asennus asentaa ohjelman $(^NameDA) seuraavaan kansioon. Jos haluat asentaa sen johonkin muuhun kansioon, valitse Selaa, ja valitse toinen kansio. $_CLICK
-# ^DirSubText
-Kohdekansio
-# ^DirBrowseText
-Valitse kansio, johon haluat asentaa ohjelman $(^NameDA):
-# ^UnDirText
-Asennus poistaa ohjelman $(^NameDA) seuraavasta kansiosta. Jos haluat poistaa sen jostakin muusta kansiosta, valitse Selaa, ja valitse toinen kansio. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Valitse kansio, josta haluat poistaa ohjelman $(^NameDA):
-# ^SpaceAvailable
-"Tilaa vapaana: "
-# ^SpaceRequired
-"Tarvittava tila: "
-# ^UninstallingText
-Tämä ohjelma poistaa ohjelman $(^NameDA) tietokoneelta. $_CLICK
-# ^UninstallingSubText
-Poistetaan kansiosta:
-# ^FileError
-Tiedostoon ei voitu kirjoittaa: \r\n\t"$0"\r\nLopeta asennus valitsemalla Hylkää,\r\nyritä uudelleen valitsemalla Uudelleen, tai\r\nohita tiedosto valitsemalla Ohita
-# ^FileError_NoIgnore
-Tiedostoon ei voitu kirjoittaa: \r\n\t"$0"\r\nYritä uudelleen valitsemalla Uudelleen, tai\r\nlopeta asennus valitsemalla Hylkää
-# ^CantWrite
-"Ei voi kirjoittaa: "
-# ^CopyFailed
-Kopiointi epäonnistui
-# ^CopyTo
-"Kopioidaan kohteeseen "
-# ^Registering
-"Rekisteröidään: "
-# ^Unregistering
-"Poistetaan rekisteröinti: "
-# ^SymbolNotFound
-"Symbolia ei löytynyt: "
-# ^CouldNotLoad
-"Ei voitu ladata: "
-# ^CreateFolder
-"Luo kansio: "
-# ^CreateShortcut
-"Luo pikakuvake: "
-# ^CreatedUninstaller
-"Poisto-ohjelma luotiin: "
-# ^Delete
-"Poista: "
-# ^DeleteOnReboot
-"Poista käynnistyksen yhteydessä: "
-# ^ErrorCreatingShortcut
-"Virhe luotaessa pikakuvaketta: "
-# ^ErrorCreating
-"Virhe luotaessa: "
-# ^ErrorDecompressing
-Pakettia ei voitu purkaa. Korruptoitunut asennusohjelma?
-# ^ErrorRegistering
-Virhe rekisteröidessä DLL-tiedostoa
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Suorita: "
-# ^Extract
-"Pura: "
-# ^ErrorWriting
-"Pura: tiedostoon ei voitu kirjoittaa "
-# ^InvalidOpcode
-Asennuspaketti on vioittunut: virheellinen opcode
-# ^NoOLE
-"Ei OLEa: "
-# ^OutputFolder
-"Kansio: "
-# ^RemoveFolder
-"Poista kansio: "
-# ^RenameOnReboot
-"Muuta nimi uudelleenkäynnistyksen yhteydessä: "
-# ^Rename
-"Muuta nimi: "
-# ^Skipped
-"Ohitettiin: "
-# ^CopyDetails
-Kopioi tiedot leikepöydälle
-# ^LogInstall
-Tallenna asennusloki
-# ^Byte
-t
-# ^Kilo
-k
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1035
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Eclipser (Jonne Lehtinen) <Eclipser at pilvikaupunki dot net>
+# Corrections by the Mozilla.fi crew
+# ^Branding
+Nullsoftin asennusjärjestelmä %s
+# ^SetupCaption
+$(^Name) Asennus
+# ^UninstallCaption
+$(^Name) Poisto
+# ^LicenseSubCaption
+: Lisenssisopimus
+# ^ComponentsSubCaption
+: Asennusvaihtoehdot
+# ^DirSubCaption
+: Asennuskansio
+# ^InstallingSubCaption
+: Asennetaan
+# ^CompletedSubCaption
+: Valmis
+# ^UnComponentsSubCaption
+: Poistovaihtoehdot
+# ^UnDirSubCaption
+: Poistokansio
+# ^ConfirmSubCaption
+: Varmistus
+# ^UninstallingSubCaption
+: Poistetaan
+# ^UnCompletedSubCaption
+: Valmis
+# ^BackBtn
+< &Takaisin
+# ^NextBtn
+&Seuraava >
+# ^AgreeBtn
+&Hyväksyn
+# ^AcceptBtn
+Hyväksyn lisenssisopimuksen ehdot
+# ^DontAcceptBtn
+En hyväksy sopimuksen ehtoja
+# ^InstallBtn
+&Asenna
+# ^UninstallBtn
+&Poista
+# ^CancelBtn
+Peruuta
+# ^CloseBtn
+&Sulje
+# ^BrowseBtn
+S&elaa...
+# ^ShowDetailsBtn
+&Näytä tiedot
+# ^ClickNext
+Valitse Seuraava jatkaaksesi.
+# ^ClickInstall
+Valitse Asenna aloittaaksesi asennuksen.
+# ^ClickUninstall
+Valitse Poista poistaaksesi asennuksen.
+# ^Name
+Nimi
+# ^Completed
+Valmis
+# ^LicenseText
+Lue lisenssisopimus ennen asentamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse Hyväksyn.
+# ^LicenseTextCB
+Lue lisenssisopimus ennen asentamista. Jos hyväksyt sopimuksen kaikki ehdot, laita rasti ruutuun. $_CLICK
+# ^LicenseTextRB
+Lue lisenssisopimus ennen asentamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse ensimmäinen vaihtoehto alapuolelta. $_CLICK
+# ^UnLicenseText
+Lue lisenssisopimus ennen poistamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse Hyväksyn.
+# ^UnLicenseTextCB
+Lue lisenssisopimus ennen poistamista. Jos hyväksyt sopimuksen kaikki ehdot, laita rasti ruutuun. $_CLICK
+# ^UnLicenseTextRB
+Lue lisenssisopimus ennen poistamista. Jos hyväksyt sopimuksen kaikki ehdot, valitse ensimmäinen vaihtoehto alapuolelta. $_CLICK
+# ^Custom
+Oma
+# ^ComponentsText
+Valitse komponentit, jotka haluat asentaa, ja poista valinta komponenteista, joita et halua asentaa. $_CLICK
+# ^ComponentsSubText1
+Valitse asennustyyppi:
+# ^ComponentsSubText2_NoInstTypes
+Valitse asennettavat komponentit:
+# ^ComponentsSubText2
+Tai, valitse valinnaiset komponentit, jotka haluat asentaa:
+# ^UnComponentsText
+Valitse komponentit, jotka haluat poistaa, ja poista valinta komponenteista, joita et haluat poistaa. $_CLICK
+# ^UnComponentsSubText1
+Valitse poistotyyppi:
+# ^UnComponentsSubText2_NoInstTypes
+Valitse poistettavat komponentit:
+# ^UnComponentsSubText2
+Tai, valitse valinnaiset komponentit, jotka haluat poistaa
+# ^DirText
+Asennus asentaa ohjelman $(^NameDA) seuraavaan kansioon. Jos haluat asentaa sen johonkin muuhun kansioon, valitse Selaa, ja valitse toinen kansio. $_CLICK
+# ^DirSubText
+Kohdekansio
+# ^DirBrowseText
+Valitse kansio, johon haluat asentaa ohjelman $(^NameDA):
+# ^UnDirText
+Asennus poistaa ohjelman $(^NameDA) seuraavasta kansiosta. Jos haluat poistaa sen jostakin muusta kansiosta, valitse Selaa, ja valitse toinen kansio. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Valitse kansio, josta haluat poistaa ohjelman $(^NameDA):
+# ^SpaceAvailable
+"Tilaa vapaana: "
+# ^SpaceRequired
+"Tarvittava tila: "
+# ^UninstallingText
+Tämä ohjelma poistaa ohjelman $(^NameDA) tietokoneelta. $_CLICK
+# ^UninstallingSubText
+Poistetaan kansiosta:
+# ^FileError
+Tiedostoon ei voitu kirjoittaa: \r\n\t"$0"\r\nLopeta asennus valitsemalla Hylkää,\r\nyritä uudelleen valitsemalla Uudelleen, tai\r\nohita tiedosto valitsemalla Ohita
+# ^FileError_NoIgnore
+Tiedostoon ei voitu kirjoittaa: \r\n\t"$0"\r\nYritä uudelleen valitsemalla Uudelleen, tai\r\nlopeta asennus valitsemalla Hylkää
+# ^CantWrite
+"Ei voi kirjoittaa: "
+# ^CopyFailed
+Kopiointi epäonnistui
+# ^CopyTo
+"Kopioidaan kohteeseen "
+# ^Registering
+"Rekisteröidään: "
+# ^Unregistering
+"Poistetaan rekisteröinti: "
+# ^SymbolNotFound
+"Symbolia ei löytynyt: "
+# ^CouldNotLoad
+"Ei voitu ladata: "
+# ^CreateFolder
+"Luo kansio: "
+# ^CreateShortcut
+"Luo pikakuvake: "
+# ^CreatedUninstaller
+"Poisto-ohjelma luotiin: "
+# ^Delete
+"Poista: "
+# ^DeleteOnReboot
+"Poista käynnistyksen yhteydessä: "
+# ^ErrorCreatingShortcut
+"Virhe luotaessa pikakuvaketta: "
+# ^ErrorCreating
+"Virhe luotaessa: "
+# ^ErrorDecompressing
+Pakettia ei voitu purkaa. Korruptoitunut asennusohjelma?
+# ^ErrorRegistering
+Virhe rekisteröidessä DLL-tiedostoa
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Suorita: "
+# ^Extract
+"Pura: "
+# ^ErrorWriting
+"Pura: tiedostoon ei voitu kirjoittaa "
+# ^InvalidOpcode
+Asennuspaketti on vioittunut: virheellinen opcode
+# ^NoOLE
+"Ei OLEa: "
+# ^OutputFolder
+"Kansio: "
+# ^RemoveFolder
+"Poista kansio: "
+# ^RenameOnReboot
+"Muuta nimi uudelleenkäynnistyksen yhteydessä: "
+# ^Rename
+"Muuta nimi: "
+# ^Skipped
+"Ohitettiin: "
+# ^CopyDetails
+Kopioi tiedot leikepöydälle
+# ^LogInstall
+Tallenna asennusloki
+# ^Byte
+t
+# ^Kilo
+k
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Finnish.nsh b/Contrib/Language files/Finnish.nsh
index 69e03ec..0f1c449 100755
--- a/Contrib/Language files/Finnish.nsh
+++ b/Contrib/Language files/Finnish.nsh
@@ -1,123 +1,123 @@
-;Compatible with Modern UI 1.86
-;Language: Finnish (1035)
-;By Eclipser (Jonne Lehtinen) <Eclipser at pilvikaupunki dot com>
-;Updated by Puuhis (puuhis@puuhis.net)
-
-!insertmacro LANGFILE "Finnish" "Suomi"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Tervetuloa ohjelman $(^NameDA) asennukseen"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tämä avustaja ohjaa sinut ohjelman $(^NameDA) asennuksen läpi.$\r$\n$\r$\nOn suositeltavaa sulkea kaikki muut ohjelmat ennen asennuksen aloittamista, jotta asennus voisi päivittää tiettyjä järjestelmätiedostoja käynnistämättä konetta uudelleen.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Tervetuloa $(^NameDA) -ohjelmiston poisto-ohjelmaan"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tämä velho auttaa sinut läpi $(^NameDA) -ohjelmiston poistamisen.$\r$\n$\r$\nEnnen poisto-ohjelman aloitusta, varmista ettei $(^NameDA) ole käynnissä.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisenssisopimus"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lue lisenssiehdot tarkasti ennen ohjelman $(^NameDA) asentamista."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jos hyväksyt ehdot, valitse Hyväksyn jatkaaksesi. Sinun pitää hyväksyä ehdot asentaaksesi ohjelman $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jos hyväksyt ehdot, laita rasti alla olevaan ruutuun. Sinun pitää hyväksyä ehdot asentaaksesi ohjelman $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jos hyväksyt ehdot, valitse ensimmäinen vaihtoehto alapuolelta. Sinun pitää hyväksyä ehdot asentaaksesi ohjelman $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisenssisopimus"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lue huolellisesti lisenssiehdot ennen $(^NameDA) -ohjelmiston poistoa."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jos hyväksyt säännöt ja ehdot, paina Hyväksyn -nappia jatkaakseni. Sinun täytyy hyväksyä ehdot poistaaksesi $(^NameDA) -ohjelmiston."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jos hyväksyt ehdot, klikkaa valintaruutua alhaalla. Sinun täytyy hyväksyä ehdot poistaaksesi $(^NameDA) -ohjelmiston. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jos hyväksyt ehdot, valitse ensimmäinen vaihtoehto alhaalta. Sinun täytyy hyväksyä ehdot poistaaksesi $(^NameDA) -ohjelmiston. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Paina Page Down nähdäksesi loput sopimuksesta."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Valitse komponentit"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Valitse toiminnot, jotka haluat asentaa ohjelmaan $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Selitys"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Valitse komponentit"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Valitse $(^NameDA) toiminnot, jotka haluat poistaa."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Siirrä hiiri komponentin nimen päälle saadaksesi sen selityksen."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Siirrä hiiri komponentin nimen päälle saadaksesi sen selityksen."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Valitse asennuskohde"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Valitse hakemisto, johon haluat asentaa ohjelman $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Valitse paikka mistä poistetaan"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Valitse kansio mistä $(^NameDA) poistetaan."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Asennetaan"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Odota... $(^NameDA) asennetaan..."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Asennus valmis"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Asennus valmistui onnistuneesti."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Asennus keskeytettiin"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Asennus ei onnistunut."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Poistetaan"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Odota... Ohjelmaa $(^NameDA) poistetaan."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Poisto valmis"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Ohjelma poistettiin onnistuneesti."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Poisto lopetettu"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Ohjelmaa poisto epäonnistuneesti."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Viimeistellään ohjelman $(^NameDA) asennusta"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) on asennettu koneellesi.$\r$\n$\r$\nValitse Valmis sulkeaksesi avustajan."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Tietokoneesi pitää käynnistää uudelleen jotta ohjelman $(^NameDA) asennus saataisiin valmiiksi. Haluatko käynnistää koneen uudelleen nyt?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Viimeistellään $(^NameDA) -ohjelmiston poistamista"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) on poistettu koneeltasi.$\r$\n$\r$\nPaina Lopeta -nappia sulkeaksesi tämän velhon."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Jotta $(^NameDA) -ohjelmiston poistaminen olisi valmis, tulee tietokone käynnistää uudelleen. Haluatko uudelleenkäynnistää nyt?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Käynnistä uudelleen nyt"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Käynnistän koneen myöhemmin uudelleen"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Käynnistä $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Näytä LueMinut"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Valmis"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Valitse Käynnistä-valikon hakemisto"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Valitse Käynnistä-valikon hakemisto ohjelman pikakuvakkeille."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Valitse Käynnistä-valikon hakemisto, johon haluaisit luoda ohjelman pikakuvakkeet. Voit myös kirjoittaa uuden nimen."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Älä luo pikakuvakkeita"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Poista $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Poista $(^NameDA) tietokoneestasi."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Haluatko varmasti lopettaa $(^Name) Asennuksen?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Oletko varma että haluat poistua $(^Name) poisto-ohjelmasta?"
-!endif
+;Compatible with Modern UI 1.86
+;Language: Finnish (1035)
+;By Eclipser (Jonne Lehtinen) <Eclipser at pilvikaupunki dot com>
+;Updated by Puuhis (puuhis@puuhis.net)
+
+!insertmacro LANGFILE "Finnish" "Suomi"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Tervetuloa ohjelman $(^NameDA) asennukseen"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tämä avustaja ohjaa sinut ohjelman $(^NameDA) asennuksen läpi.$\r$\n$\r$\nOn suositeltavaa sulkea kaikki muut ohjelmat ennen asennuksen aloittamista, jotta asennus voisi päivittää tiettyjä järjestelmätiedostoja käynnistämättä konetta uudelleen.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Tervetuloa $(^NameDA) -ohjelmiston poisto-ohjelmaan"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tämä velho auttaa sinut läpi $(^NameDA) -ohjelmiston poistamisen.$\r$\n$\r$\nEnnen poisto-ohjelman aloitusta, varmista ettei $(^NameDA) ole käynnissä.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisenssisopimus"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lue lisenssiehdot tarkasti ennen ohjelman $(^NameDA) asentamista."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jos hyväksyt ehdot, valitse Hyväksyn jatkaaksesi. Sinun pitää hyväksyä ehdot asentaaksesi ohjelman $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jos hyväksyt ehdot, laita rasti alla olevaan ruutuun. Sinun pitää hyväksyä ehdot asentaaksesi ohjelman $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jos hyväksyt ehdot, valitse ensimmäinen vaihtoehto alapuolelta. Sinun pitää hyväksyä ehdot asentaaksesi ohjelman $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisenssisopimus"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lue huolellisesti lisenssiehdot ennen $(^NameDA) -ohjelmiston poistoa."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jos hyväksyt säännöt ja ehdot, paina Hyväksyn -nappia jatkaakseni. Sinun täytyy hyväksyä ehdot poistaaksesi $(^NameDA) -ohjelmiston."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jos hyväksyt ehdot, klikkaa valintaruutua alhaalla. Sinun täytyy hyväksyä ehdot poistaaksesi $(^NameDA) -ohjelmiston. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jos hyväksyt ehdot, valitse ensimmäinen vaihtoehto alhaalta. Sinun täytyy hyväksyä ehdot poistaaksesi $(^NameDA) -ohjelmiston. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Paina Page Down nähdäksesi loput sopimuksesta."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Valitse komponentit"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Valitse toiminnot, jotka haluat asentaa ohjelmaan $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Selitys"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Valitse komponentit"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Valitse $(^NameDA) toiminnot, jotka haluat poistaa."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Siirrä hiiri komponentin nimen päälle saadaksesi sen selityksen."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Siirrä hiiri komponentin nimen päälle saadaksesi sen selityksen."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Valitse asennuskohde"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Valitse hakemisto, johon haluat asentaa ohjelman $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Valitse paikka mistä poistetaan"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Valitse kansio mistä $(^NameDA) poistetaan."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Asennetaan"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Odota... $(^NameDA) asennetaan..."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Asennus valmis"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Asennus valmistui onnistuneesti."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Asennus keskeytettiin"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Asennus ei onnistunut."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Poistetaan"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Odota... Ohjelmaa $(^NameDA) poistetaan."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Poisto valmis"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Ohjelma poistettiin onnistuneesti."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Poisto lopetettu"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Ohjelmaa poisto epäonnistuneesti."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Viimeistellään ohjelman $(^NameDA) asennusta"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) on asennettu koneellesi.$\r$\n$\r$\nValitse Valmis sulkeaksesi avustajan."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Tietokoneesi pitää käynnistää uudelleen jotta ohjelman $(^NameDA) asennus saataisiin valmiiksi. Haluatko käynnistää koneen uudelleen nyt?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Viimeistellään $(^NameDA) -ohjelmiston poistamista"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) on poistettu koneeltasi.$\r$\n$\r$\nPaina Lopeta -nappia sulkeaksesi tämän velhon."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Jotta $(^NameDA) -ohjelmiston poistaminen olisi valmis, tulee tietokone käynnistää uudelleen. Haluatko uudelleenkäynnistää nyt?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Käynnistä uudelleen nyt"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Käynnistän koneen myöhemmin uudelleen"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Käynnistä $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Näytä LueMinut"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Valmis"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Valitse Käynnistä-valikon hakemisto"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Valitse Käynnistä-valikon hakemisto ohjelman pikakuvakkeille."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Valitse Käynnistä-valikon hakemisto, johon haluaisit luoda ohjelman pikakuvakkeet. Voit myös kirjoittaa uuden nimen."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Älä luo pikakuvakkeita"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Poista $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Poista $(^NameDA) tietokoneestasi."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Haluatko varmasti lopettaa $(^Name) Asennuksen?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Oletko varma että haluat poistua $(^Name) poisto-ohjelmasta?"
+!endif
diff --git a/Contrib/Language files/French.nlf b/Contrib/Language files/French.nlf
index 706600f..5e7f6a1 100755
--- a/Contrib/Language files/French.nlf
+++ b/Contrib/Language files/French.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1036
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by the French NSIS team <veekee@winampfr.com> - http://www.winampfr.com/nsis.
-# Updated to v6 by Jerome Charaoui (lavamind@inetflex.com)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Installation de $(^Name)
-# ^UninstallCaption
-Désinstallation de $(^Name)
-# ^LicenseSubCaption
-: Licence
-# ^ComponentsSubCaption
-: Options d'installation
-# ^DirSubCaption
-: Dossier d'installation
-# ^InstallingSubCaption
-: Installation des fichiers
-# ^CompletedSubCaption
-: Terminé
-# ^UnComponentsSubCaption
-: Options de désinstallation
-# ^UnDirSubCaption
-: Dossier de désinstallation
-# ^ConfirmSubCaption
-: Confirmation
-# ^UninstallingSubCaption
-: Désinstallation des fichiers
-# ^UnCompletedSubCaption
-: Terminé
-# ^BackBtn
-< &Précédent
-# ^NextBtn
-&Suivant >
-# ^AgreeBtn
-J'a&ccepte
-# ^AcceptBtn
-J'a&ccepte les termes de la licence
-# ^DontAcceptBtn
-Je &n'accepte pas les termes de la licence
-# ^InstallBtn
-&Installer
-# ^UninstallBtn
-&Désinstaller
-# ^CancelBtn
-Annuler
-# ^CloseBtn
-&Fermer
-# ^BrowseBtn
-P&arcourir...
-# ^ShowDetailsBtn
-P&lus d'infos
-# ^ClickNext
-Cliquez sur Suivant pour continuer.
-# ^ClickInstall
-Cliquez sur Installer pour démarrer l'installation.
-# ^ClickUninstall
-Cliquez sur Désinstaller pour démarrer la désinstallation.
-# ^Name
-Nom
-# ^Completed
-Terminé
-# ^LicenseText
-Veuillez examiner le contrat de licence avant d'installer $(^NameDA). Si vous acceptez tous les termes du contrat, cliquez sur J'accepte.
-# ^LicenseTextCB
-Veuillez examiner le contrat de licence avant d'installer $(^NameDA). Si vous acceptez tous les termes du contrat, cochez la boîte de contrôle ci-dessous. $_CLICK
-# ^LicesnseTextRB
-Veuillez examiner le contrat de licence avant d'installer $(^NameDA). Si vous acceptez tous les termes du contrat, sélectionnez la première option ci-dessous. $_CLICK
-# ^UnLicenseText
-Veuillez examiner le contrat de licence avant de désinstaller $(^NameDA). Si vous acceptez tous les termes du contrat, cliquez sur J'accepte.
-# ^UnLicenseTextCB
-Veuillez examiner le contrat de licence avant de désinstaller $(^NameDA). Si vous acceptez tous les termes du contrat, cochez la boîte de contrôle ci-dessous. $_CLICK
-# ^UnLicesnseTextRB
-Veuillez examiner le contrat de licence avant de désinstaller $(^NameDA). Si vous acceptez tous les termes du contrat, sélectionnez la première option ci-dessous. $_CLICK
-# ^Custom
-Personnalisée
-# ^ComponentsText
-Cochez les composants que vous désirez installer et décochez ceux que vous ne désirez pas installer. $_CLICK
-# ^ComponentsSubText1
-Sélectionnez le type d'installation :
-# ^ComponentsSubText2_NoInstTypes
-Sélectionnez les composants à installer :
-# ^ComponentsSubText2
-Ou, sélectionnez les composants optionnels que vous voulez installer :
-# ^UnComponentsText
-Cochez les composants que vous désirez désinstaller et décochez ceux que vous ne désirez pas désinstaller. $_CLICK
-# ^UnComponentsSubText1
-Sélectionnez le type de désinstallation :
-# ^UnComponentsSubText2_NoInstTypes
-Sélectionnez les composants à désinstaller :
-# ^UnComponentsSubText2
-Ou, sélectionnez les composants optionnels que vous voulez désinstaller :
-# ^DirText
-Ceci installera $(^NameDA) dans le dossier suivant. Pour installer dans un autre dossier, cliquez sur Parcourir et choisissez un autre dossier. $_CLICK
-# ^DirSubText
-Dossier d'installation
-# ^DirBrowseText
-Sélectionnez le dossier d'installation pour $(^NameDA) :
-# ^UnDirText
-Ceci désinstallera $(^NameDA) du dossier suivant. Pour désinstaller d'un autre dossier, cliquez sur Parcourir et choisissez un autre dossier. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Sélectionnez le dossier de désinstallation pour $(^NameDA) :
-# ^SpaceAvailable
-"Espace disponible : "
-# ^SpaceRequired
-"Espace requis : "
-# ^UninstallingText
-Ce programme désinstallera $(^NameDA) de votre ordinateur. $_CLICK
-# ^UninstallingSubText
-Désinstallation à partir de :
-# ^FileError
-Erreur lors de l'ouverture du fichier en écriture : \r\n\t"$0"\r\nAppuyez sur Abandonner pour annuler l'installation,\r\nRéessayer pour réessayer l'écriture du fichier, ou\r\nIgnorer pour passer ce fichier
-# ^FileError_NoIgnore
-Erreur lors de l'ouverture du fichier en écriture : \r\n\t"$0"\r\nAppuyez sur Réessayez pour re-écrire le fichier, ou\r\nAnnuler pour abandonner l'installation
-# ^CantWrite
-"Impossible d'écrire : "
-# ^CopyFailed
-Échec de la copie
-# ^CopyTo
-"Copier vers "
-# ^Registering
-"Enregistrement : "
-# ^Unregistering
-"Suppression de l'enregistrement : "
-# ^SymbolNotFound
-"Impossible de trouver un symbole : "
-# ^CouldNotLoad
-"Impossible de charger : "
-# ^CreateFolder
-"Création du dossier : "
-# ^CreateShortcut
-"Création du raccourci : "
-# ^CreatedUninstaller
-"Création de la désinstallation : "
-# ^Delete
-"Suppression : "
-# ^DeleteOnReboot
-"Suppression au redémarrage : "
-# ^ErrorCreatingShortcut
-"Erreur lors de la création du raccourci : "
-# ^ErrorCreating
-"Erreur de la création : "
-# ^ErrorDecompressing
-Erreur lors de la décompression des données ! Installation corrompue ?
-# ^ErrorRegistering
-Erreur lors de l'enregistrement de la DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Exécution : "
-# ^Extract
-"Extraction : "
-# ^ErrorWriting
-"Extraction : erreur d'écriture du fichier "
-# ^InvalidOpcode
-Installation corrompue : opcode incorrect
-# ^NoOLE
-"Pas de OLE pour : "
-# ^OutputFolder
-"Destination : "
-# ^RemoveFolder
-"Suppression du dossier : "
-# ^RenameOnReboot
-"Renommer au redémarrage : "
-# ^Rename
-"Renommer : "
-# ^Skipped
-"Passé : "
-# ^CopyDetails
-Copier les Détails dans le Presse-papier
-# ^LogInstall
-Enregistrer le déroulement de l'installation
-# ^Byte
-o
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Language ID
+1036
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by the French NSIS team <veekee@winampfr.com> - http://www.winampfr.com/nsis.
+# Updated to v6 by Jerome Charaoui (lavamind@inetflex.com)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Installation de $(^Name)
+# ^UninstallCaption
+Désinstallation de $(^Name)
+# ^LicenseSubCaption
+: Licence
+# ^ComponentsSubCaption
+: Options d'installation
+# ^DirSubCaption
+: Dossier d'installation
+# ^InstallingSubCaption
+: Installation des fichiers
+# ^CompletedSubCaption
+: Terminé
+# ^UnComponentsSubCaption
+: Options de désinstallation
+# ^UnDirSubCaption
+: Dossier de désinstallation
+# ^ConfirmSubCaption
+: Confirmation
+# ^UninstallingSubCaption
+: Désinstallation des fichiers
+# ^UnCompletedSubCaption
+: Terminé
+# ^BackBtn
+< &Précédent
+# ^NextBtn
+&Suivant >
+# ^AgreeBtn
+J'a&ccepte
+# ^AcceptBtn
+J'a&ccepte les termes de la licence
+# ^DontAcceptBtn
+Je &n'accepte pas les termes de la licence
+# ^InstallBtn
+&Installer
+# ^UninstallBtn
+&Désinstaller
+# ^CancelBtn
+Annuler
+# ^CloseBtn
+&Fermer
+# ^BrowseBtn
+P&arcourir...
+# ^ShowDetailsBtn
+P&lus d'infos
+# ^ClickNext
+Cliquez sur Suivant pour continuer.
+# ^ClickInstall
+Cliquez sur Installer pour démarrer l'installation.
+# ^ClickUninstall
+Cliquez sur Désinstaller pour démarrer la désinstallation.
+# ^Name
+Nom
+# ^Completed
+Terminé
+# ^LicenseText
+Veuillez examiner le contrat de licence avant d'installer $(^NameDA). Si vous acceptez tous les termes du contrat, cliquez sur J'accepte.
+# ^LicenseTextCB
+Veuillez examiner le contrat de licence avant d'installer $(^NameDA). Si vous acceptez tous les termes du contrat, cochez la boîte de contrôle ci-dessous. $_CLICK
+# ^LicesnseTextRB
+Veuillez examiner le contrat de licence avant d'installer $(^NameDA). Si vous acceptez tous les termes du contrat, sélectionnez la première option ci-dessous. $_CLICK
+# ^UnLicenseText
+Veuillez examiner le contrat de licence avant de désinstaller $(^NameDA). Si vous acceptez tous les termes du contrat, cliquez sur J'accepte.
+# ^UnLicenseTextCB
+Veuillez examiner le contrat de licence avant de désinstaller $(^NameDA). Si vous acceptez tous les termes du contrat, cochez la boîte de contrôle ci-dessous. $_CLICK
+# ^UnLicesnseTextRB
+Veuillez examiner le contrat de licence avant de désinstaller $(^NameDA). Si vous acceptez tous les termes du contrat, sélectionnez la première option ci-dessous. $_CLICK
+# ^Custom
+Personnalisée
+# ^ComponentsText
+Cochez les composants que vous désirez installer et décochez ceux que vous ne désirez pas installer. $_CLICK
+# ^ComponentsSubText1
+Sélectionnez le type d'installation :
+# ^ComponentsSubText2_NoInstTypes
+Sélectionnez les composants à installer :
+# ^ComponentsSubText2
+Ou, sélectionnez les composants optionnels que vous voulez installer :
+# ^UnComponentsText
+Cochez les composants que vous désirez désinstaller et décochez ceux que vous ne désirez pas désinstaller. $_CLICK
+# ^UnComponentsSubText1
+Sélectionnez le type de désinstallation :
+# ^UnComponentsSubText2_NoInstTypes
+Sélectionnez les composants à désinstaller :
+# ^UnComponentsSubText2
+Ou, sélectionnez les composants optionnels que vous voulez désinstaller :
+# ^DirText
+Ceci installera $(^NameDA) dans le dossier suivant. Pour installer dans un autre dossier, cliquez sur Parcourir et choisissez un autre dossier. $_CLICK
+# ^DirSubText
+Dossier d'installation
+# ^DirBrowseText
+Sélectionnez le dossier d'installation pour $(^NameDA) :
+# ^UnDirText
+Ceci désinstallera $(^NameDA) du dossier suivant. Pour désinstaller d'un autre dossier, cliquez sur Parcourir et choisissez un autre dossier. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Sélectionnez le dossier de désinstallation pour $(^NameDA) :
+# ^SpaceAvailable
+"Espace disponible : "
+# ^SpaceRequired
+"Espace requis : "
+# ^UninstallingText
+Ce programme désinstallera $(^NameDA) de votre ordinateur. $_CLICK
+# ^UninstallingSubText
+Désinstallation à partir de :
+# ^FileError
+Erreur lors de l'ouverture du fichier en écriture : \r\n\t"$0"\r\nAppuyez sur Abandonner pour annuler l'installation,\r\nRéessayer pour réessayer l'écriture du fichier, ou\r\nIgnorer pour passer ce fichier
+# ^FileError_NoIgnore
+Erreur lors de l'ouverture du fichier en écriture : \r\n\t"$0"\r\nAppuyez sur Réessayez pour re-écrire le fichier, ou\r\nAnnuler pour abandonner l'installation
+# ^CantWrite
+"Impossible d'écrire : "
+# ^CopyFailed
+Échec de la copie
+# ^CopyTo
+"Copier vers "
+# ^Registering
+"Enregistrement : "
+# ^Unregistering
+"Suppression de l'enregistrement : "
+# ^SymbolNotFound
+"Impossible de trouver un symbole : "
+# ^CouldNotLoad
+"Impossible de charger : "
+# ^CreateFolder
+"Création du dossier : "
+# ^CreateShortcut
+"Création du raccourci : "
+# ^CreatedUninstaller
+"Création de la désinstallation : "
+# ^Delete
+"Suppression : "
+# ^DeleteOnReboot
+"Suppression au redémarrage : "
+# ^ErrorCreatingShortcut
+"Erreur lors de la création du raccourci : "
+# ^ErrorCreating
+"Erreur de la création : "
+# ^ErrorDecompressing
+Erreur lors de la décompression des données ! Installation corrompue ?
+# ^ErrorRegistering
+Erreur lors de l'enregistrement de la DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Exécution : "
+# ^Extract
+"Extraction : "
+# ^ErrorWriting
+"Extraction : erreur d'écriture du fichier "
+# ^InvalidOpcode
+Installation corrompue : opcode incorrect
+# ^NoOLE
+"Pas de OLE pour : "
+# ^OutputFolder
+"Destination : "
+# ^RemoveFolder
+"Suppression du dossier : "
+# ^RenameOnReboot
+"Renommer au redémarrage : "
+# ^Rename
+"Renommer : "
+# ^Skipped
+"Passé : "
+# ^CopyDetails
+Copier les Détails dans le Presse-papier
+# ^LogInstall
+Enregistrer le déroulement de l'installation
+# ^Byte
+o
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/French.nsh b/Contrib/Language files/French.nsh
index 67eeca6..fd41eab 100755
--- a/Contrib/Language files/French.nsh
+++ b/Contrib/Language files/French.nsh
@@ -1,121 +1,121 @@
-;Language: French (1036)
-;By Sébastien Delahaye <seb@delahaye.net>
-
-!insertmacro LANGFILE "French" "Français"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bienvenue dans le programme d'installation de $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Vous êtes sur le point d'installer $(^NameDA) sur votre ordinateur.$\r$\n$\r$\nAvant de démarrer l'installation, il est recommandé de fermer toutes les autres applications. Cela permettra la mise à jour de certains fichiers système sans redémarrer votre ordinateur.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bienvenue dans le programme de désinstallation de $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Vous êtes sur le point de désinstaller $(^NameDA) de votre ordinateur.$\r$\n$\r$\nAvant d'amorcer la désinstallation, assurez-vous que $(^NameDA) ne soit pas en cours d'exécution.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licence utilisateur"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Veuillez examiner les termes de la licence avant d'installer $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si vous acceptez les conditions de la licence utilisateur, cliquez sur J'accepte pour continuer. Vous devez accepter la licence utilisateur afin d'installer $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si vous acceptez les conditions de la licence utilisateur, cochez la case ci-dessous. Vous devez accepter la licence utilisateur afin d'installer $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si vous acceptez les conditions de la licence utilisateur, sélectionnez le premier choix ci-dessous. Vous devez accepter la licence utilisateur afin d'installer $(^NameDA)."
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licence utilisateur"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Veuillez examiner les conditions de la licence avant de désinstaller $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si vous acceptez les conditions de la licence utilisateur, cliquez sur J'accepte pour continuer. Vous devez accepter la licence utilisateur afin de désinstaller $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si vous acceptez les conditions de la licence utilisateur, cochez la case ci-dessous. Vous devez accepter la licence utilisateur afin de désintaller $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si vous acceptez les conditions de la licence utilisateur, sélectionnez le premier choix ci-dessous. Vous devez accepter la licence utilisateur afin de désinstaller $(^NameDA)."
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Appuyez sur Page Suivante pour lire le reste de la licence utilisateur."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choisissez les composants"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choisissez les composants de $(^NameDA) que vous souhaitez installer."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choisissez les composants"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Cochez les composants de $(^NameDA) que vous souhaitez désinstaller."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passez le curseur de votre souris sur un composant pour en voir la description."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passez le curseur de votre souris sur un composant pour en voir la description."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choisissez le dossier d'installation"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choisissez le dossier dans lequel installer $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choisissez le dossier de désinstallation"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choisissez le dossier à partir duquel vous voulez désinstaller $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installation en cours"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Veuillez patienter pendant que $(^NameDA) est en train d'être installé."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installation terminée"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "L'installation s'est terminée avec succès."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installation interrompue"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "L'installation n'a pas été terminée."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Désinstallation en cours"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Veuillez patienter pendant que $(^NameDA) est en train d'être supprimé de votre ordinateur."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Désinstallation terminée"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La désinstallation s'est terminée avec succès."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Désinstallation interrompue"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La désinstallation n'a pas été terminée."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Fin de l'installation de $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) a été installé sur votre ordinateur.$\r$\n$\r$\nCliquez sur Fermer pour quitter le programme d'installation."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Votre ordinateur doit être redémarré afin de compléter l'installation de $(^NameDA). Souhaitez-vous redémarrer maintenant ?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Fin de la désinstallation de $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) a été supprimé de votre ordinateur.$\r$\n$\r$\nCliquez sur Fermer pour quitter le programme d'installation."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Votre ordinateur doit être redémarré pour terminer l'installation de $(^NameDA). Souhaitez-vous redémarrer maintenant ?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Redémarrer maintenant"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Je souhaite redémarrer moi-même plus tard"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Lancer $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Afficher le fichier Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fermer"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choisissez un dossier dans le menu Démarrer"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choisissez un dossier dans le menu Démarrer pour les raccourcis de l'application."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Choisissez le dossier du menu Démarrer dans lequel vous voulez placer les raccourcis du programme. Vous pouvez également entrer un nouveau nom pour créer un nouveau dossier."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ne pas créer de raccourcis"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Désinstaller $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Supprimer $(^NameDA) de votre ordinateur."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Êtes-vous sûr de vouloir quitter l'installation de $(^Name) ?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Êtes-vous sûr de vouloir quitter la désinstallation de $(^Name) ?"
-!endif
+;Language: French (1036)
+;By Sébastien Delahaye <seb@delahaye.net>
+
+!insertmacro LANGFILE "French" "Français"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bienvenue dans le programme d'installation de $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Vous êtes sur le point d'installer $(^NameDA) sur votre ordinateur.$\r$\n$\r$\nAvant de démarrer l'installation, il est recommandé de fermer toutes les autres applications. Cela permettra la mise à jour de certains fichiers système sans redémarrer votre ordinateur.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bienvenue dans le programme de désinstallation de $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Vous êtes sur le point de désinstaller $(^NameDA) de votre ordinateur.$\r$\n$\r$\nAvant d'amorcer la désinstallation, assurez-vous que $(^NameDA) ne soit pas en cours d'exécution.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licence utilisateur"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Veuillez examiner les termes de la licence avant d'installer $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si vous acceptez les conditions de la licence utilisateur, cliquez sur J'accepte pour continuer. Vous devez accepter la licence utilisateur afin d'installer $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si vous acceptez les conditions de la licence utilisateur, cochez la case ci-dessous. Vous devez accepter la licence utilisateur afin d'installer $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si vous acceptez les conditions de la licence utilisateur, sélectionnez le premier choix ci-dessous. Vous devez accepter la licence utilisateur afin d'installer $(^NameDA)."
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licence utilisateur"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Veuillez examiner les conditions de la licence avant de désinstaller $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si vous acceptez les conditions de la licence utilisateur, cliquez sur J'accepte pour continuer. Vous devez accepter la licence utilisateur afin de désinstaller $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si vous acceptez les conditions de la licence utilisateur, cochez la case ci-dessous. Vous devez accepter la licence utilisateur afin de désintaller $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si vous acceptez les conditions de la licence utilisateur, sélectionnez le premier choix ci-dessous. Vous devez accepter la licence utilisateur afin de désinstaller $(^NameDA)."
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Appuyez sur Page Suivante pour lire le reste de la licence utilisateur."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Choisissez les composants"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Choisissez les composants de $(^NameDA) que vous souhaitez installer."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Description"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Choisissez les composants"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Cochez les composants de $(^NameDA) que vous souhaitez désinstaller."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passez le curseur de votre souris sur un composant pour en voir la description."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passez le curseur de votre souris sur un composant pour en voir la description."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Choisissez le dossier d'installation"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Choisissez le dossier dans lequel installer $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choisissez le dossier de désinstallation"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choisissez le dossier à partir duquel vous voulez désinstaller $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installation en cours"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Veuillez patienter pendant que $(^NameDA) est en train d'être installé."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installation terminée"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "L'installation s'est terminée avec succès."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installation interrompue"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "L'installation n'a pas été terminée."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Désinstallation en cours"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Veuillez patienter pendant que $(^NameDA) est en train d'être supprimé de votre ordinateur."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Désinstallation terminée"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La désinstallation s'est terminée avec succès."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Désinstallation interrompue"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La désinstallation n'a pas été terminée."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Fin de l'installation de $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) a été installé sur votre ordinateur.$\r$\n$\r$\nCliquez sur Fermer pour quitter le programme d'installation."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Votre ordinateur doit être redémarré afin de compléter l'installation de $(^NameDA). Souhaitez-vous redémarrer maintenant ?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Fin de la désinstallation de $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) a été supprimé de votre ordinateur.$\r$\n$\r$\nCliquez sur Fermer pour quitter le programme d'installation."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Votre ordinateur doit être redémarré pour terminer l'installation de $(^NameDA). Souhaitez-vous redémarrer maintenant ?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Redémarrer maintenant"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Je souhaite redémarrer moi-même plus tard"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Lancer $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Afficher le fichier Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fermer"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Choisissez un dossier dans le menu Démarrer"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Choisissez un dossier dans le menu Démarrer pour les raccourcis de l'application."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Choisissez le dossier du menu Démarrer dans lequel vous voulez placer les raccourcis du programme. Vous pouvez également entrer un nouveau nom pour créer un nouveau dossier."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ne pas créer de raccourcis"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Désinstaller $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Supprimer $(^NameDA) de votre ordinateur."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Êtes-vous sûr de vouloir quitter l'installation de $(^Name) ?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Êtes-vous sûr de vouloir quitter la désinstallation de $(^Name) ?"
+!endif
diff --git a/Contrib/Language files/Galician.nlf b/Contrib/Language files/Galician.nlf
index edb69cf..f1e405e 100755
--- a/Contrib/Language files/Galician.nlf
+++ b/Contrib/Language files/Galician.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1110
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation v 1.0.0 by Ramon Flores <fa2ramon@usc.es>
-# ^Branding
-Sistema de Instalación Nullsoft %s
-# ^SetupCaption
-Instalación de $(^Name)
-# ^UninstallCaption
-Desinstalación de $(^Name)
-# ^LicenseSubCaption
-: Contrato de licenza
-# ^ComponentsSubCaption
-: Opcións de instalación
-# ^DirSubCaption
-: Diretória de instalación
-# ^InstallingSubCaption
-: Instalando ficheiros
-# ^CompletedSubCaption
-: Concluído
-# ^UnComponentsSubCaption
-: Opcións de desinstalación
-# ^UnDirSubCaption
-: Cartafol de desinstalación
-# ^ConfirmSubCaption
-: Confirmación
-# ^UninstallingSubCaption
-: Desinstalando
-# ^UnCompletedSubCaption
-: Concluído
-# ^BackBtn
-< &Anterior
-# ^NextBtn
-&Seguinte >
-# ^AgreeBtn
-&Aceito
-# ^AcceptBtn
-Eu &aceito os termos do Contrato de licenza
-# ^DontAcceptBtn
-Eu &non aceito os termos do Contrato de licenza
-# ^InstallBtn
-&Instalar
-# ^UninstallBtn
-&Desinstalar
-# ^CancelBtn
-Cancelar
-# ^CloseBtn
-&Fechar
-# ^BrowseBtn
-&Procurar...
-# ^ShowDetailsBtn
-Ver &Detalles
-# ^ClickNext
-Clique en 'Seguinte' para continuar.
-# ^ClickInstall
-Clique en 'Instalar' para iniciar a instalación.
-# ^ClickUninstall
-Clique en 'Desinstalar' para iniciar a desinstalación.
-# ^Name
-Nome
-# ^Completed
-Concluído
-# ^LicenseText
-Por favor revexa o acordo de licenza antes de instalar $(^NameDA). Se concordar con todos os termos da licenza, clique em 'Aceito'.
-# ^LicenseTextCB
-Por favor reveja o acordo de licenza antes de instalar $(^NameDA). Se concordar con todos os termos da licenza, clique na caixa de selección abaixo. $_CLICK
-# ^LicenseTextRB
-Por favor revexa o acordo de licenza antes de instalar $(^NameDA). Se concordar con todos os termos da licenza, escolla a primeira opción abaixo. $_CLICK
-# ^UnLicenseText
-Por favor revexa o acordo de licenza antes de desinstalar $(^NameDA). Se concordar con todos os termos da licenza, clique em 'Aceito'.
-# ^UnLicenseTextCB
-Por favor reveja o acordo de licenza antes de desinstalar $(^NameDA). Se concordar con todos os termos da licenza, clique na caixa de selección abaixo. $_CLICK
-# ^UnLicenseTextRB
-Por favor revexa o acordo de licenza antes de desinstalar $(^NameDA). Se concordar con todos os termos da licenza, escolla a primeira opción abaixo. $_CLICK
-# ^Custom
-Personalizado
-# ^ComponentsText
-Marque os componentes que desexa instalar e desmarque os componentes que non desexa instalar. $_CLICK
-# ^ComponentsSubText1
-Escolla o tipo de instalación:
-# ^ComponentsSubText2_NoInstTypes
-Escolla os componentes para instalar:
-# ^ComponentsSubText2
-Ou, escolla os componentes opcionais que desexa instalar:
-# ^UnComponentsText
-Marque os componentes que queira desinstalar e vice versa. $_CLICK
-# ^UnComponentsSubText1
-Escolla o tipo de desinstalación:
-# ^UnComponentsSubText2_NoInstTypes
-Escolla os componentes para desinstalar:
-# ^UnComponentsSubText2
-Ou, escolla os componentes opcionais que queira desinstalar:
-# ^DirText
-O $(^NameDA) será instalado na seguinte directória. Para instalar nunha directória diferente, clique en 'Procurar...' e escolla outra directória. $_CLICK
-# ^DirSubText
-Directória de destino
-# ^DirBrowseText
-Escolla unha directória para instalar o $(^NameDA):
-# ^UnDirText
-O $(^NameDA) será desinstalado da seguinte directória. Para desinstalar dunha pasta diferente, clique en 'Procurar...' e escolla outra directória. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Escolla a directória de onde vai ser desinstalado o $(^NameDA):
-# ^SpaceAvailable
-"Espazo disponíbel: "
-# ^SpaceRequired
-"Espazo necesário: "
-# ^UninstallingText
-$(^NameDA) vai ser desinstalado da seguinte directória. $_CLICK
-# ^UninstallingSubText
-Desinstalando de:
-# ^FileError
-Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique en Abortar para abortar a instalación,\r\nRepetir para tentar novamente a escrita do ficheiro, ou\r\nIgnorar para ignorar este ficheiro.
-# ^FileError_NoIgnore
-Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique en Repetir para tentar novamente a gravación do ficheiro, ou\r\nCancelar para abortar a instalación.
-# ^CantWrite
-"Non foi posíbel escreber: "
-# ^CopyFailed
-Falla ao copiar
-# ^CopyTo
-"Copiar para "
-# ^Registering
-"Rexistando: "
-# ^Unregistering
-"Desrexistando: "
-# ^SymbolNotFound
-"Símbolo non achado: "
-# ^CouldNotLoad
-"Non foi posíbel carregar: "
-# ^CreateFolder
-"Criando diretória: "
-# ^CreateShortcut
-"Criando atallo: "
-# ^CreatedUninstaller
-"Criando desinstalador: "
-# ^Delete
-"Eliminando ficheiro: "
-# ^DeleteOnReboot
-"Eliminar ao reiniciar: "
-# ^ErrorCreatingShortcut
-"Erro ao criar atallo: "
-# ^ErrorCreating
-"Erro ao criar: "
-# ^ErrorDecompressing
-Erro ao descomprimir dados! Instalador corrompido?
-# ^ErrorRegistering
-Erro ao rexistar DLL
-# ^ExecShell
-"Executando polo Shell: "
-# ^Exec
-"Executando: "
-# ^Extract
-"Extraindo: "
-# ^ErrorWriting
-"Extraindo: erro ao escreber ficheiro "
-# ^InvalidOpcode
-Instalador corrompido: código de operación inválido
-# ^NoOLE
-"Sen OLE para: "
-# ^OutputFolder
-"Cartafol de destino: "
-# ^RemoveFolder
-"Removendo cartafol: "
-# ^RenameOnReboot
-"Renomear ao reiniciar: "
-# ^Rename
-"Renomeando: "
-# ^Skipped
-"Ignorado: "
-# ^CopyDetails
-Copiar detalles para a Área de transférencia
-# ^LogInstall
-Rexistar proceso de instalación
-# ^Byte
-B
-# kilo
-K
-# mega
-M
-# giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1110
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation v 1.0.0 by Ramon Flores <fa2ramon@usc.es>
+# ^Branding
+Sistema de Instalación Nullsoft %s
+# ^SetupCaption
+Instalación de $(^Name)
+# ^UninstallCaption
+Desinstalación de $(^Name)
+# ^LicenseSubCaption
+: Contrato de licenza
+# ^ComponentsSubCaption
+: Opcións de instalación
+# ^DirSubCaption
+: Diretória de instalación
+# ^InstallingSubCaption
+: Instalando ficheiros
+# ^CompletedSubCaption
+: Concluído
+# ^UnComponentsSubCaption
+: Opcións de desinstalación
+# ^UnDirSubCaption
+: Cartafol de desinstalación
+# ^ConfirmSubCaption
+: Confirmación
+# ^UninstallingSubCaption
+: Desinstalando
+# ^UnCompletedSubCaption
+: Concluído
+# ^BackBtn
+< &Anterior
+# ^NextBtn
+&Seguinte >
+# ^AgreeBtn
+&Aceito
+# ^AcceptBtn
+Eu &aceito os termos do Contrato de licenza
+# ^DontAcceptBtn
+Eu &non aceito os termos do Contrato de licenza
+# ^InstallBtn
+&Instalar
+# ^UninstallBtn
+&Desinstalar
+# ^CancelBtn
+Cancelar
+# ^CloseBtn
+&Fechar
+# ^BrowseBtn
+&Procurar...
+# ^ShowDetailsBtn
+Ver &Detalles
+# ^ClickNext
+Clique en 'Seguinte' para continuar.
+# ^ClickInstall
+Clique en 'Instalar' para iniciar a instalación.
+# ^ClickUninstall
+Clique en 'Desinstalar' para iniciar a desinstalación.
+# ^Name
+Nome
+# ^Completed
+Concluído
+# ^LicenseText
+Por favor revexa o acordo de licenza antes de instalar $(^NameDA). Se concordar con todos os termos da licenza, clique em 'Aceito'.
+# ^LicenseTextCB
+Por favor reveja o acordo de licenza antes de instalar $(^NameDA). Se concordar con todos os termos da licenza, clique na caixa de selección abaixo. $_CLICK
+# ^LicenseTextRB
+Por favor revexa o acordo de licenza antes de instalar $(^NameDA). Se concordar con todos os termos da licenza, escolla a primeira opción abaixo. $_CLICK
+# ^UnLicenseText
+Por favor revexa o acordo de licenza antes de desinstalar $(^NameDA). Se concordar con todos os termos da licenza, clique em 'Aceito'.
+# ^UnLicenseTextCB
+Por favor reveja o acordo de licenza antes de desinstalar $(^NameDA). Se concordar con todos os termos da licenza, clique na caixa de selección abaixo. $_CLICK
+# ^UnLicenseTextRB
+Por favor revexa o acordo de licenza antes de desinstalar $(^NameDA). Se concordar con todos os termos da licenza, escolla a primeira opción abaixo. $_CLICK
+# ^Custom
+Personalizado
+# ^ComponentsText
+Marque os componentes que desexa instalar e desmarque os componentes que non desexa instalar. $_CLICK
+# ^ComponentsSubText1
+Escolla o tipo de instalación:
+# ^ComponentsSubText2_NoInstTypes
+Escolla os componentes para instalar:
+# ^ComponentsSubText2
+Ou, escolla os componentes opcionais que desexa instalar:
+# ^UnComponentsText
+Marque os componentes que queira desinstalar e vice versa. $_CLICK
+# ^UnComponentsSubText1
+Escolla o tipo de desinstalación:
+# ^UnComponentsSubText2_NoInstTypes
+Escolla os componentes para desinstalar:
+# ^UnComponentsSubText2
+Ou, escolla os componentes opcionais que queira desinstalar:
+# ^DirText
+O $(^NameDA) será instalado na seguinte directória. Para instalar nunha directória diferente, clique en 'Procurar...' e escolla outra directória. $_CLICK
+# ^DirSubText
+Directória de destino
+# ^DirBrowseText
+Escolla unha directória para instalar o $(^NameDA):
+# ^UnDirText
+O $(^NameDA) será desinstalado da seguinte directória. Para desinstalar dunha pasta diferente, clique en 'Procurar...' e escolla outra directória. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Escolla a directória de onde vai ser desinstalado o $(^NameDA):
+# ^SpaceAvailable
+"Espazo disponíbel: "
+# ^SpaceRequired
+"Espazo necesário: "
+# ^UninstallingText
+$(^NameDA) vai ser desinstalado da seguinte directória. $_CLICK
+# ^UninstallingSubText
+Desinstalando de:
+# ^FileError
+Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique en Abortar para abortar a instalación,\r\nRepetir para tentar novamente a escrita do ficheiro, ou\r\nIgnorar para ignorar este ficheiro.
+# ^FileError_NoIgnore
+Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique en Repetir para tentar novamente a gravación do ficheiro, ou\r\nCancelar para abortar a instalación.
+# ^CantWrite
+"Non foi posíbel escreber: "
+# ^CopyFailed
+Falla ao copiar
+# ^CopyTo
+"Copiar para "
+# ^Registering
+"Rexistando: "
+# ^Unregistering
+"Desrexistando: "
+# ^SymbolNotFound
+"Símbolo non achado: "
+# ^CouldNotLoad
+"Non foi posíbel carregar: "
+# ^CreateFolder
+"Criando diretória: "
+# ^CreateShortcut
+"Criando atallo: "
+# ^CreatedUninstaller
+"Criando desinstalador: "
+# ^Delete
+"Eliminando ficheiro: "
+# ^DeleteOnReboot
+"Eliminar ao reiniciar: "
+# ^ErrorCreatingShortcut
+"Erro ao criar atallo: "
+# ^ErrorCreating
+"Erro ao criar: "
+# ^ErrorDecompressing
+Erro ao descomprimir dados! Instalador corrompido?
+# ^ErrorRegistering
+Erro ao rexistar DLL
+# ^ExecShell
+"Executando polo Shell: "
+# ^Exec
+"Executando: "
+# ^Extract
+"Extraindo: "
+# ^ErrorWriting
+"Extraindo: erro ao escreber ficheiro "
+# ^InvalidOpcode
+Instalador corrompido: código de operación inválido
+# ^NoOLE
+"Sen OLE para: "
+# ^OutputFolder
+"Cartafol de destino: "
+# ^RemoveFolder
+"Removendo cartafol: "
+# ^RenameOnReboot
+"Renomear ao reiniciar: "
+# ^Rename
+"Renomeando: "
+# ^Skipped
+"Ignorado: "
+# ^CopyDetails
+Copiar detalles para a Área de transférencia
+# ^LogInstall
+Rexistar proceso de instalación
+# ^Byte
+B
+# kilo
+K
+# mega
+M
+# giga
+G
diff --git a/Contrib/Language files/Galician.nsh b/Contrib/Language files/Galician.nsh
index 57befb6..8a57f47 100755
--- a/Contrib/Language files/Galician.nsh
+++ b/Contrib/Language files/Galician.nsh
@@ -1,121 +1,121 @@
-;Language: Galician (1110)
-;Ramon Flores <fa2ramon@usc.es>
-
-!insertmacro LANGFILE "Galician" "Galego"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Benvindo ao Asistente de Instalación do $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este asistente vai axudá-lo durante a instalación do $(^NameDA).$\r$\n$\r$\nRecomenda-se fechar todas as outras aplicacións antes de iniciar a instalación. Isto posibilita actualizar os ficheiros do sistema relevantes sen ter que reiniciar o computador.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Benvindo ao Asistente de desinstalación do $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente vai axudá-lo durante a desinstalación do $(^NameDA).$\r$\n$\r$\nAntes de iniciar a desinstalación, certifique-se de que o $(^NameDA) non está a executar-se.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contrato de licenza"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licenza antes de instalar o $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licenza, clique en 'Aceito' para continuar. Cumpre aceitar o contrato para instalar o $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licenza, clique na caixa de selección abaixo. Cumpre aceitar o contrato para instalar o $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licenza, seleccione a primeira opción abaixo. Cumpre aceitar o contrato para instalar o $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contrato de licenza"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licenza antes de desinstalar o $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licenza, clique en 'Aceito' para continuar. Cumpre aceitar o contrato para desinstalar o $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licenza, clique na caixa de selección abaixo. Cumpre aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licenza, seleccione a primeira opción abaixo. Cumpre aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Prema Page Down para ver o restante da licenza."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Escolla de componentes"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Escolla que características do $(^NameDA) que desexa instalar."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrición"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Escoller componentes"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Escolla que características do $(^NameDA) desexa desinstalar."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre un componente para ver a sua descrición."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre un componente para ver a sua descrición."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Escolla do local da instalación"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Escolla a directória na cal desexa instalar o $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Escolla o Local de desinstalación"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Escolla a directória de onde pretende desinstalar o $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor, agarde entanto o $(^NameDA) está sendo instalado."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalación completa"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A instalación concluiu con suceso."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalación Abortada"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A instalación concluiu sen suceso."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor, agarde entanto se desinstala o $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalación completa"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "A desinstalación concluiu con suceso."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalación abortada"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "A desinstalación non concluiu con suceso"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Concluindo o Asistente de instalación do $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Instalou-se o $(^NameDA) no seu computador.$\r$\n$\r$\nClique en Rematar para fechar este asistente."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Cumpre reiniciar o seu computador para concluír a instalación do $(^NameDA). Desexa reiniciar agora?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Concluíndo o asistente de desinstalación do $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Eliminou-se $(^NameDA) do seu computador.$\r$\n$\r$\nClique em Rematar para fechar este asistente."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Cumpre reiniciar o seu computador para concluír a desinstalación do $(^NameDA). Desexa reiniciá-lo agora?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar agora"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Prefiro reinicia-lo manualmente despois"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Executar $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Leame"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Rematar"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Escolla un cartafol do Menu Iniciar"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Escolla un cartafol do Menu Iniciar para os atallos do programa."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccione o cartafol do Menu Iniciar no que desexa criar os atallos do programa. Tamén é posíbel dixitar un nome para criar un novo cartafol. "
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Non criar atallos"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Eliminar o $(^NameDA) do seu computador."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Realmente desexa cancelar a instalación do $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Realmente desexa cancelar a desinstalación do $(^Name)?"
-!endif
+;Language: Galician (1110)
+;Ramon Flores <fa2ramon@usc.es>
+
+!insertmacro LANGFILE "Galician" "Galego"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Benvindo ao Asistente de Instalación do $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este asistente vai axudá-lo durante a instalación do $(^NameDA).$\r$\n$\r$\nRecomenda-se fechar todas as outras aplicacións antes de iniciar a instalación. Isto posibilita actualizar os ficheiros do sistema relevantes sen ter que reiniciar o computador.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Benvindo ao Asistente de desinstalación do $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente vai axudá-lo durante a desinstalación do $(^NameDA).$\r$\n$\r$\nAntes de iniciar a desinstalación, certifique-se de que o $(^NameDA) non está a executar-se.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contrato de licenza"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licenza antes de instalar o $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licenza, clique en 'Aceito' para continuar. Cumpre aceitar o contrato para instalar o $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licenza, clique na caixa de selección abaixo. Cumpre aceitar o contrato para instalar o $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licenza, seleccione a primeira opción abaixo. Cumpre aceitar o contrato para instalar o $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contrato de licenza"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licenza antes de desinstalar o $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licenza, clique en 'Aceito' para continuar. Cumpre aceitar o contrato para desinstalar o $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licenza, clique na caixa de selección abaixo. Cumpre aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licenza, seleccione a primeira opción abaixo. Cumpre aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Prema Page Down para ver o restante da licenza."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Escolla de componentes"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Escolla que características do $(^NameDA) que desexa instalar."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrición"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Escoller componentes"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Escolla que características do $(^NameDA) desexa desinstalar."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre un componente para ver a sua descrición."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre un componente para ver a sua descrición."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Escolla do local da instalación"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Escolla a directória na cal desexa instalar o $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Escolla o Local de desinstalación"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Escolla a directória de onde pretende desinstalar o $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor, agarde entanto o $(^NameDA) está sendo instalado."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalación completa"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A instalación concluiu con suceso."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalación Abortada"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A instalación concluiu sen suceso."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor, agarde entanto se desinstala o $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalación completa"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "A desinstalación concluiu con suceso."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalación abortada"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "A desinstalación non concluiu con suceso"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Concluindo o Asistente de instalación do $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Instalou-se o $(^NameDA) no seu computador.$\r$\n$\r$\nClique en Rematar para fechar este asistente."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Cumpre reiniciar o seu computador para concluír a instalación do $(^NameDA). Desexa reiniciar agora?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Concluíndo o asistente de desinstalación do $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Eliminou-se $(^NameDA) do seu computador.$\r$\n$\r$\nClique em Rematar para fechar este asistente."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Cumpre reiniciar o seu computador para concluír a desinstalación do $(^NameDA). Desexa reiniciá-lo agora?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar agora"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Prefiro reinicia-lo manualmente despois"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Executar $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Leame"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Rematar"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Escolla un cartafol do Menu Iniciar"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Escolla un cartafol do Menu Iniciar para os atallos do programa."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccione o cartafol do Menu Iniciar no que desexa criar os atallos do programa. Tamén é posíbel dixitar un nome para criar un novo cartafol. "
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Non criar atallos"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Eliminar o $(^NameDA) do seu computador."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Realmente desexa cancelar a instalación do $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Realmente desexa cancelar a desinstalación do $(^Name)?"
+!endif
diff --git a/Contrib/Language files/German.nlf b/Contrib/Language files/German.nlf
index d6b902c..0b2464d 100755
--- a/Contrib/Language files/German.nlf
+++ b/Contrib/Language files/German.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1031
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by L.King, changes by R. Bisswanger, Tim Kosse
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Installation
-# ^UninstallCaption
-$(^Name) Deinstallation
-# ^LicenseSubCaption
-: Lizenzabkommen
-# ^ComponentsSubCaption
-: Installations-Optionen
-# ^DirSubCaption
-: Zielverzeichnis
-# ^InstallingSubCaption
-: Installiere
-# ^CompletedSubCaption
-: Fertig
-# ^UnComponentsSubCaption
-: Deinstallations-Optionen
-# ^UnDirSubCaption
-: Quellverzeichnis
-# ^ConfirmSubCaption
-: Bestätigung
-# ^UninstallingSubCaption
-: Entferne
-# ^UnCompletedSubCaption
-: Fertig
-# ^BackBtn
-< &Zurück
-# ^NextBtn
-&Weiter >
-# ^AgreeBtn
-&Annehmen
-# ^AcceptBtn
-Ich &akzeptiere das Lizenzabkommen.
-# ^DontAcceptBtn
-Ich &lehne das Lizenzabkommen ab.
-# ^InstallBtn
-&Installieren
-# ^UninstallBtn
-&Deinstallieren
-# ^CancelBtn
-Abbrechen
-# ^CloseBtn
-&Beenden
-# ^BrowseBtn
-&Durchsuchen...
-# ^ShowDetailsBtn
-&Details anzeigen
-# ^ClickNext
-Klicken Sie auf Weiter, um fortzufahren.
-# ^ClickInstall
-Klicken Sie auf Installieren, um die Installation zu starten.
-# ^ClickUninstall
-Klicken Sie auf Deinstallieren, um die Deinstallation zu starten.
-# ^Name
-Name
-# ^Completed
-Fertig
-# ^LicenseText
-Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) installieren. Wenn Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen.
-# ^LicenseTextCB
-Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) installieren. Wenn Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kontrollkästchen. $_CLICK
-# ^LicenseTextRB
-Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) installieren. Wenn Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie die entsprechende Option. $_CLICK
-# ^UnLicenseText
-Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) entfernen. Wenn Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen.
-# ^UnLicenseTextCB
-Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) entfernen. Wenn Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kontrollkästchen. $_CLICK
-# ^UnLicenseTextRB
-Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) entfernen. Wenn Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie die entsprechende Option. $_CLICK
-# ^Custom
-Benutzerdefiniert
-# ^ComponentsText
-Wählen Sie die Komponenten aus, die Sie installieren möchten und wählen Sie diejenigen ab, die Sie nicht installieren wollen. $_CLICK
-# ^ComponentsSubText1
-Installations-Typ bestimmen:
-# ^ComponentsSubText2_NoInstTypes
-Wählen Sie die Komponenten aus, die Sie installieren möchten:
-# ^ComponentsSubText2
-oder wählen Sie zusätzliche Komponenten aus, die Sie installieren möchten:
-# ^UnComponentsText
-Wählen Sie die Komponenten aus, die Sie entfernen möchten und wählen Sie diejenigen ab, die Sie nicht entfernen wollen. $_CLICK
-# ^UnComponentsSubText1
-Deinstallations-Typ bestimmen:
-# ^UnComponentsSubText2_NoInstTypes
-Wählen Sie die Komponenten aus, die Sie entfernen möchten:
-# ^UnComponentsSubText2
-oder wählen Sie zusätzliche Komponenten aus, die Sie entfernen möchten:
-# ^DirText
-$(^NameDA) wird in das unten angegebene Verzeichnis installiert. Falls Sie in ein anderes Verzeichnis installieren möchten, klicken Sie auf Durchsuchen und wählen Sie ein anderes Verzeichnis aus. $_CLICK
-# ^DirSubText
-Zielverzeichnis
-# ^DirBrowseText
-Wählen Sie das Verzeichnis aus, in das Sie $(^NameDA) installieren möchten:
-# ^UnDirText
-$(^NameDA) wird aus dem unten angegebenen Verzeichnis entfernt. Falls sich $(^NameDA) in einem anderen Verzeichnis befindet, klicken Sie auf Durchsuchen und wählen Sie das richtige Verzeichnis aus. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Wählen Sie das Verzeichnis aus, in dem sich $(^NameDA) befindet:
-# ^SpaceAvailable
-"Verfügbarer Speicher: "
-# ^SpaceRequired
-"Benötigter Speicher: "
-# ^UninstallingText
-$(^NameDA) wird aus dem unten angegebenen Verzeichnis entfernt. $_CLICK
-# ^UninstallingSubText
-Entferne aus:
-# ^FileError
-Fehler beim Überschreiben der Datei: \r\n\t"$0"\r\nKlicken Sie auf Abbrechen, um abzubrechen,\r\nauf Wiederholen, um den Schreibvorgang erneut zu versuchen\r\noder auf Ignorieren, um diese Datei zu überspringen.
-# ^FileError_NoIgnore
-Fehler beim Überschreiben der Datei: \r\n\t"$0"\r\nKlicken Sie auf Wiederholen, um den Schreibvorgang erneut zu versuchen\r\noder auf Abbrechen, um die Installation zu beenden.
-# ^CantWrite
-"Fehler beim Schreiben: "
-# ^CopyFailed
-Kopieren fehlgeschlagen
-# ^CopyTo
-"Kopiere nach "
-# ^Registering
-"Registriere: "
-# ^Unregistering
-"Deregistriere: "
-# ^SymbolNotFound
-"Symbol ist nicht vorhanden: "
-# ^CouldNotLoad
-"Fehler beim Laden von "
-# ^CreateFolder
-"Erstelle Verzeichnis: "
-# ^CreateShortcut
-"Erstelle Verknüpfung: "
-# ^CreatedUninstaller
-"Erstelle Deinstallations-Programm: "
-# ^Delete
-"Lösche Datei: "
-# ^DeleteOnReboot
-"Lösche Datei nach Neustart: "
-# ^ErrorCreatingShortcut
-"Fehler beim Erstellen der Verknüpfung: "
-# ^ErrorCreating
-"Fehler beim Erstellen: "
-# ^ErrorDecompressing
-Fehler beim Dekomprimieren. Beschädigtes Installations-Programm?
-# ^ErrorRegistering
-Fehler beim Registrieren der DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Starte: "
-# ^Extract
-"Dekomprimiere: "
-# ^ErrorWriting
-"Dekomprimierung: Fehler beim Schreiben der Datei "
-# ^InvalidOpcode
-Beschädigtes Installations-Programm: ungültiger Befehlscode
-# ^NoOLE
-"Kein OLE für: "
-# ^OutputFolder
-"Zielverzeichnis: "
-# ^RemoveFolder
-"Entferne Verzeichnis: "
-# ^RenameOnReboot
-"Umbenennen nach Neustart: "
-# ^Rename
-"Umbenennen: "
-# ^Skipped
-"Übersprungen: "
-# ^CopyDetails
-Details in die Zwischenablage kopieren
-# ^LogInstall
-Installationsverlauf protokollieren
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1031
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by L.King, changes by R. Bisswanger, Tim Kosse
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Installation
+# ^UninstallCaption
+$(^Name) Deinstallation
+# ^LicenseSubCaption
+: Lizenzabkommen
+# ^ComponentsSubCaption
+: Installations-Optionen
+# ^DirSubCaption
+: Zielverzeichnis
+# ^InstallingSubCaption
+: Installiere
+# ^CompletedSubCaption
+: Fertig
+# ^UnComponentsSubCaption
+: Deinstallations-Optionen
+# ^UnDirSubCaption
+: Quellverzeichnis
+# ^ConfirmSubCaption
+: Bestätigung
+# ^UninstallingSubCaption
+: Entferne
+# ^UnCompletedSubCaption
+: Fertig
+# ^BackBtn
+< &Zurück
+# ^NextBtn
+&Weiter >
+# ^AgreeBtn
+&Annehmen
+# ^AcceptBtn
+Ich &akzeptiere das Lizenzabkommen.
+# ^DontAcceptBtn
+Ich &lehne das Lizenzabkommen ab.
+# ^InstallBtn
+&Installieren
+# ^UninstallBtn
+&Deinstallieren
+# ^CancelBtn
+Abbrechen
+# ^CloseBtn
+&Beenden
+# ^BrowseBtn
+&Durchsuchen...
+# ^ShowDetailsBtn
+&Details anzeigen
+# ^ClickNext
+Klicken Sie auf Weiter, um fortzufahren.
+# ^ClickInstall
+Klicken Sie auf Installieren, um die Installation zu starten.
+# ^ClickUninstall
+Klicken Sie auf Deinstallieren, um die Deinstallation zu starten.
+# ^Name
+Name
+# ^Completed
+Fertig
+# ^LicenseText
+Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) installieren. Wenn Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen.
+# ^LicenseTextCB
+Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) installieren. Wenn Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kontrollkästchen. $_CLICK
+# ^LicenseTextRB
+Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) installieren. Wenn Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie die entsprechende Option. $_CLICK
+# ^UnLicenseText
+Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) entfernen. Wenn Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen.
+# ^UnLicenseTextCB
+Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) entfernen. Wenn Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kontrollkästchen. $_CLICK
+# ^UnLicenseTextRB
+Bitte lesen Sie das Lizenzabkommen, bevor Sie $(^NameDA) entfernen. Wenn Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie die entsprechende Option. $_CLICK
+# ^Custom
+Benutzerdefiniert
+# ^ComponentsText
+Wählen Sie die Komponenten aus, die Sie installieren möchten und wählen Sie diejenigen ab, die Sie nicht installieren wollen. $_CLICK
+# ^ComponentsSubText1
+Installations-Typ bestimmen:
+# ^ComponentsSubText2_NoInstTypes
+Wählen Sie die Komponenten aus, die Sie installieren möchten:
+# ^ComponentsSubText2
+oder wählen Sie zusätzliche Komponenten aus, die Sie installieren möchten:
+# ^UnComponentsText
+Wählen Sie die Komponenten aus, die Sie entfernen möchten und wählen Sie diejenigen ab, die Sie nicht entfernen wollen. $_CLICK
+# ^UnComponentsSubText1
+Deinstallations-Typ bestimmen:
+# ^UnComponentsSubText2_NoInstTypes
+Wählen Sie die Komponenten aus, die Sie entfernen möchten:
+# ^UnComponentsSubText2
+oder wählen Sie zusätzliche Komponenten aus, die Sie entfernen möchten:
+# ^DirText
+$(^NameDA) wird in das unten angegebene Verzeichnis installiert. Falls Sie in ein anderes Verzeichnis installieren möchten, klicken Sie auf Durchsuchen und wählen Sie ein anderes Verzeichnis aus. $_CLICK
+# ^DirSubText
+Zielverzeichnis
+# ^DirBrowseText
+Wählen Sie das Verzeichnis aus, in das Sie $(^NameDA) installieren möchten:
+# ^UnDirText
+$(^NameDA) wird aus dem unten angegebenen Verzeichnis entfernt. Falls sich $(^NameDA) in einem anderen Verzeichnis befindet, klicken Sie auf Durchsuchen und wählen Sie das richtige Verzeichnis aus. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Wählen Sie das Verzeichnis aus, in dem sich $(^NameDA) befindet:
+# ^SpaceAvailable
+"Verfügbarer Speicher: "
+# ^SpaceRequired
+"Benötigter Speicher: "
+# ^UninstallingText
+$(^NameDA) wird aus dem unten angegebenen Verzeichnis entfernt. $_CLICK
+# ^UninstallingSubText
+Entferne aus:
+# ^FileError
+Fehler beim Überschreiben der Datei: \r\n\t"$0"\r\nKlicken Sie auf Abbrechen, um abzubrechen,\r\nauf Wiederholen, um den Schreibvorgang erneut zu versuchen\r\noder auf Ignorieren, um diese Datei zu überspringen.
+# ^FileError_NoIgnore
+Fehler beim Überschreiben der Datei: \r\n\t"$0"\r\nKlicken Sie auf Wiederholen, um den Schreibvorgang erneut zu versuchen\r\noder auf Abbrechen, um die Installation zu beenden.
+# ^CantWrite
+"Fehler beim Schreiben: "
+# ^CopyFailed
+Kopieren fehlgeschlagen
+# ^CopyTo
+"Kopiere nach "
+# ^Registering
+"Registriere: "
+# ^Unregistering
+"Deregistriere: "
+# ^SymbolNotFound
+"Symbol ist nicht vorhanden: "
+# ^CouldNotLoad
+"Fehler beim Laden von "
+# ^CreateFolder
+"Erstelle Verzeichnis: "
+# ^CreateShortcut
+"Erstelle Verknüpfung: "
+# ^CreatedUninstaller
+"Erstelle Deinstallations-Programm: "
+# ^Delete
+"Lösche Datei: "
+# ^DeleteOnReboot
+"Lösche Datei nach Neustart: "
+# ^ErrorCreatingShortcut
+"Fehler beim Erstellen der Verknüpfung: "
+# ^ErrorCreating
+"Fehler beim Erstellen: "
+# ^ErrorDecompressing
+Fehler beim Dekomprimieren. Beschädigtes Installations-Programm?
+# ^ErrorRegistering
+Fehler beim Registrieren der DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Starte: "
+# ^Extract
+"Dekomprimiere: "
+# ^ErrorWriting
+"Dekomprimierung: Fehler beim Schreiben der Datei "
+# ^InvalidOpcode
+Beschädigtes Installations-Programm: ungültiger Befehlscode
+# ^NoOLE
+"Kein OLE für: "
+# ^OutputFolder
+"Zielverzeichnis: "
+# ^RemoveFolder
+"Entferne Verzeichnis: "
+# ^RenameOnReboot
+"Umbenennen nach Neustart: "
+# ^Rename
+"Umbenennen: "
+# ^Skipped
+"Übersprungen: "
+# ^CopyDetails
+Details in die Zwischenablage kopieren
+# ^LogInstall
+Installationsverlauf protokollieren
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/German.nsh b/Contrib/Language files/German.nsh
index 0046679..be7630b 100755
--- a/Contrib/Language files/German.nsh
+++ b/Contrib/Language files/German.nsh
@@ -1,121 +1,121 @@
-;Language: German (1031)
-;By L.King, changes by K. Windszus & R. Bisswanger & M. Simmack & D. Weiß
-
-!insertmacro LANGFILE "German" "Deutsch"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Willkommen beim Installations-$\r$\nAssistenten für $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Dieser Assistent wird Sie durch die Installation von $(^NameDA) begleiten.$\r$\n$\r$\nEs wird empfohlen, vor der Installation alle anderen Programme zu schließen, damit bestimmte Systemdateien ohne Neustart ersetzt werden können.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Willkommen beim Deinstallations-$\r$\nAssistenten für $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Dieser Assistent wird Sie durch die Deinstallation von $(^NameDA) begleiten.$\r$\n$\r$\nBitte beenden Sie $(^NameDA), bevor Sie mit der Deinstallation fortfahren.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lizenzabkommen"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Bitte lesen Sie die Lizenzbedingungen durch, bevor Sie mit der Installation fortfahren."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Falls Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) installieren zu können."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Falls Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kästchen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) installieren zu können. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Falls Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie unten die entsprechende Option. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) installieren zu können. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lizenzabkommen"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Bitte lesen Sie die Lizenzbedingungen durch, bevor Sie mit der Deinstallation von $(^NameDA) fortfahren."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Falls Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) deinstallieren zu können."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Falls Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kästchen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) deinstallieren zu können. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Falls Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie unten die entsprechende Option. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) deinstallieren zu können. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Drücken Sie die Bild-nach-unten Taste, um den Rest des Abkommens zu sehen."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Komponenten auswählen"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Wählen Sie die Komponenten aus, die Sie installieren möchten."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschreibung"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Komponenten auswählen"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Wählen Sie die Komponenten aus, die Sie entfernen möchten."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bewegen Sie den Mauszeiger über eine Komponente, um ihre Beschreibung zu sehen."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bewegen Sie den Mauszeiger über eine Komponente, um ihre Beschreibung zu sehen."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zielverzeichnis auswählen"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Wählen Sie das Verzeichnis aus, in das $(^NameDA) installiert werden soll."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Verzeichnis für Deinstallation auswählen"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Wählen Sie das Verzeichnis aus, aus dem $(^NameDA) entfernt werden soll."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installiere..."
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Bitte warten Sie, während $(^NameDA) installiert wird."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Die Installation ist vollständig"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Die Installation wurde erfolgreich abgeschlossen."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Abbruch der Installation"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Die Installation wurde nicht vollständig abgeschlossen."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Deinstalliere..."
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Bitte warten Sie, während $(^NameDA) entfernt wird."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Die Deinstallation ist vollständig"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Die Deinstallation wurde erfolgreich abgeschlossen."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Abbruch der Deinstallation"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Die Deinstallation wurde nicht vollständig abgeschlossen."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Die Installation von $(^NameDA) wird abgeschlossen"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) wurde auf Ihrem Computer installiert.$\r$\n$\r$\nKlicken Sie auf Fertig stellen, um den Installations-Assistenten zu schließen."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Windows muss neu gestartet werden, um die Installation von $(^NameDA) zu vervollständigen. Möchten Sie Windows jetzt neu starten?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Die Deinstallation von $(^NameDA) wird abgeschlossen"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ist von ihrem Computer entfernt worden.$\r$\n$\r$\nKlicken Sie auf Fertig stellen, um den Assistenten zu schließen."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Windows muss neu gestartet werden, um die Deinstallation von $(^NameDA) zu vervollständigen. Möchten Sie Windows jetzt neu starten?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Jetzt neu starten"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Windows später selbst neu starten"
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) ausführen"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Liesmich anzeigen"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fertig stellen"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Startmenü-Ordner bestimmen"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Bestimmen Sie einen Startmenü-Ordner für die Programmverknüpfungen."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Wählen Sie den Startmenü-Ordner für die Programmverknüpfungen aus. Falls Sie einen neuen Ordner erstellen möchten, geben Sie dessen Namen ein."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Keine Verknüpfungen erstellen"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Deinstallation von $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) wird von Ihrem Computer entfernt."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Sind Sie sicher, dass Sie die Installation von $(^Name) abbrechen wollen?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sind Sie sicher, dass Sie die Deinstallation von $(^Name) abbrechen möchten?"
-!endif
+;Language: German (1031)
+;By L.King, changes by K. Windszus & R. Bisswanger & M. Simmack & D. Weiß
+
+!insertmacro LANGFILE "German" "Deutsch"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Willkommen beim Installations-$\r$\nAssistenten für $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Dieser Assistent wird Sie durch die Installation von $(^NameDA) begleiten.$\r$\n$\r$\nEs wird empfohlen, vor der Installation alle anderen Programme zu schließen, damit bestimmte Systemdateien ohne Neustart ersetzt werden können.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Willkommen beim Deinstallations-$\r$\nAssistenten für $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Dieser Assistent wird Sie durch die Deinstallation von $(^NameDA) begleiten.$\r$\n$\r$\nBitte beenden Sie $(^NameDA), bevor Sie mit der Deinstallation fortfahren.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lizenzabkommen"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Bitte lesen Sie die Lizenzbedingungen durch, bevor Sie mit der Installation fortfahren."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Falls Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) installieren zu können."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Falls Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kästchen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) installieren zu können. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Falls Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie unten die entsprechende Option. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) installieren zu können. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lizenzabkommen"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Bitte lesen Sie die Lizenzbedingungen durch, bevor Sie mit der Deinstallation von $(^NameDA) fortfahren."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Falls Sie alle Bedingungen des Abkommens akzeptieren, klicken Sie auf Annehmen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) deinstallieren zu können."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Falls Sie alle Bedingungen des Abkommens akzeptieren, aktivieren Sie das Kästchen. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) deinstallieren zu können. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Falls Sie alle Bedingungen des Abkommens akzeptieren, wählen Sie unten die entsprechende Option. Sie müssen die Lizenzvereinbarungen anerkennen, um $(^NameDA) deinstallieren zu können. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Drücken Sie die Bild-nach-unten Taste, um den Rest des Abkommens zu sehen."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Komponenten auswählen"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Wählen Sie die Komponenten aus, die Sie installieren möchten."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschreibung"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Komponenten auswählen"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Wählen Sie die Komponenten aus, die Sie entfernen möchten."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bewegen Sie den Mauszeiger über eine Komponente, um ihre Beschreibung zu sehen."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bewegen Sie den Mauszeiger über eine Komponente, um ihre Beschreibung zu sehen."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zielverzeichnis auswählen"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Wählen Sie das Verzeichnis aus, in das $(^NameDA) installiert werden soll."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Verzeichnis für Deinstallation auswählen"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Wählen Sie das Verzeichnis aus, aus dem $(^NameDA) entfernt werden soll."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installiere..."
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Bitte warten Sie, während $(^NameDA) installiert wird."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Die Installation ist vollständig"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Die Installation wurde erfolgreich abgeschlossen."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Abbruch der Installation"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Die Installation wurde nicht vollständig abgeschlossen."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Deinstalliere..."
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Bitte warten Sie, während $(^NameDA) entfernt wird."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Die Deinstallation ist vollständig"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Die Deinstallation wurde erfolgreich abgeschlossen."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Abbruch der Deinstallation"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Die Deinstallation wurde nicht vollständig abgeschlossen."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Die Installation von $(^NameDA) wird abgeschlossen"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) wurde auf Ihrem Computer installiert.$\r$\n$\r$\nKlicken Sie auf Fertig stellen, um den Installations-Assistenten zu schließen."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Windows muss neu gestartet werden, um die Installation von $(^NameDA) zu vervollständigen. Möchten Sie Windows jetzt neu starten?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Die Deinstallation von $(^NameDA) wird abgeschlossen"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ist von ihrem Computer entfernt worden.$\r$\n$\r$\nKlicken Sie auf Fertig stellen, um den Assistenten zu schließen."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Windows muss neu gestartet werden, um die Deinstallation von $(^NameDA) zu vervollständigen. Möchten Sie Windows jetzt neu starten?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Jetzt neu starten"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Windows später selbst neu starten"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) ausführen"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Liesmich anzeigen"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fertig stellen"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Startmenü-Ordner bestimmen"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Bestimmen Sie einen Startmenü-Ordner für die Programmverknüpfungen."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Wählen Sie den Startmenü-Ordner für die Programmverknüpfungen aus. Falls Sie einen neuen Ordner erstellen möchten, geben Sie dessen Namen ein."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Keine Verknüpfungen erstellen"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Deinstallation von $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) wird von Ihrem Computer entfernt."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Sind Sie sicher, dass Sie die Installation von $(^Name) abbrechen wollen?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sind Sie sicher, dass Sie die Deinstallation von $(^Name) abbrechen möchten?"
+!endif
diff --git a/Contrib/Language files/Greek.nlf b/Contrib/Language files/Greek.nlf
index a0c619d..0caed22 100755
--- a/Contrib/Language files/Greek.nlf
+++ b/Contrib/Language files/Greek.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1032
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1253
-# RTL - anything else than RTL means LTR
--
-# Translation by Makidis N. Michael - http://dias.aueb.gr/~p3010094/
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-ÅãêáôÜóôáóç ôïõ '$(^Name)'
-# ^UninstallCaption
-ÁðåãêáôÜóôáóç ôïõ '$(^Name)'
-# ^LicenseSubCaption
-: Óõìöùíßá ¢äåéáò ×ñÞóçò
-# ^ComponentsSubCaption
-: ÅðéëïãÝò ÅãêáôÜóôáóçò
-# ^DirSubCaption
-: ÖÜêåëïò ÅãêáôÜóôáóçò
-# ^InstallingSubCaption
-: ÅãêáôÜóôáóç óå åîÝëéîç
-# ^CompletedSubCaption
-: Ïëïêëçñþèçêå
-# ^UnComponentsSubCaption
-: ÅðéëïãÝò ÁðåãêáôÜóôáóçò
-# ^UnDirSubCaption
-: ÖÜêåëïò ÁðåãêáôÜóôáóçò
-# ^ConfirmSubCaption
-: Åðéâåâáßùóç
-# ^UninstallingSubCaption
-: ÁðåãêáôÜóôáóç óå åîÝëéîç
-# ^UnCompletedSubCaption
-: Ïëïêëçñþèçêå
-# ^BackBtn
-< &Ðßóù
-# ^NextBtn
-&Åðüìåíï >
-# ^AgreeBtn
-&Óõìöùíþ
-# ^AcceptBtn
-&ÁðïäÝ÷ïìáé ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò
-# ^DontAcceptBtn
-&Äåí áðïäÝ÷ïìáé ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò
-# ^InstallBtn
-&ÅãêáôÜóôáóç
-# ^UninstallBtn
-Áðå&ãêáôÜóô.
-# ^CancelBtn
-¢êõñï
-# ^CloseBtn
-&Êëåßóéìï
-# ^BrowseBtn
-Á&íáæÞôçóç...
-# ^ShowDetailsBtn
-&ËåðôïìÝñåéåò
-# ^ClickNext
-ÊÜíôå êëéê óôï Åðüìåíï ãéá íá óõíå÷ßóåôå.
-# ^ClickInstall
-ÊÜíôå êëéê óôï ÅãêáôÜóôáóç ãéá íá áñ÷ßóåôå ôçí åãêáôÜóôáóç.
-# ^ClickUninstall
-ÊÜíôå êëéê óôï ÁðåãêáôÜóôáóç ãéá íá áñ÷ßóåôå ôçí áðåãêáôÜóôáóç.
-# ^Name
-¼íïìá
-# ^Completed
-Ïëïêëçñþèçêå
-# ^LicenseText
-ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôï Óõìöùíþ.
-# ^LicenseTextCB
-ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. $_CLICK
-# ^LicenseTextRB
-ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. $_CLICK
-# ^UnLicenseText
-ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôï Óõìöùíþ.
-# ^UnLicenseTextCB
-ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. $_CLICK
-# ^UnLicenseTextRB
-ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. $_CLICK
-# ^Custom
-ÐñïóáñìïóìÝíç
-# ^ComponentsText
-ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá åãêáôáóôÞóåôå êáé áðïåðéëÝîôå ôá óôïé÷åßá ðïõ äå èÝëåôå íá åãêáôáóôÞóåôå. $_CLICK
-# ^ComponentsSubText1
-ÅðéëÝîôå ôýðï åãêáôÜóôáóçò:
-# ^ComponentsSubText2_NoInstTypes
-ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá åãêáôáóôÞóåôå:
-# ^ComponentsSubText2
-¹, åðéëÝîôå ôá ðñïáéñåôéêÜ óôïé÷åßá ðïõ èÝëåôå íá åãêáôáóôÞóåôå:
-# ^UnComponentsText
-ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå êáé áðïåðéëÝîôå ôá óôïé÷åßá ðïõ äå èÝëåôå íá áðåãêáôáóôÞóåôå. $_CLICK
-# ^UnComponentsSubText1
-ÅðéëÝîôå ôýðï áðåãêáôÜóôáóçò:
-# ^UnComponentsSubText2_NoInstTypes
-ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå:
-# ^UnComponentsSubText2
-¹, åðéëÝîôå ôá ðñïáéñåôéêÜ óôïé÷åßá ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå:
-# ^DirText
-Ôï ðñüãñáììá åãêáôÜóôáóçò èá åãêáôáóôÞóåé ôï '$(^NameDA)' óôïí ðáñáêÜôù öÜêåëï. Ãéá íá ôï åãêáôáóôÞóåôå óå Ýíáí Üëëï öÜêåëï, êÜíôå êëéê óôï ÁíáæÞôçóç êáé åðéëÝîôå êÜðïéïí Üëëï öÜêåëï. $_CLICK
-# ^DirSubText
-ÖÜêåëïò ÅãêáôÜóôáóçò
-# ^DirBrowseText
-ÅðéëÝîôå ôï öÜêåëï åãêáôÜóôáóçò ãéá ôï '$(^NameDA)':
-# ^UnDirText
-Ôï ðñüãñáììá åãêáôÜóôáóçò èá áðåãêáôáóôÞóåé ôï '$(^NameDA)' áðü ôïí ðáñáêÜôù öÜêåëï. Ãéá íá áðåãêáôáóôÞóåôå áðü Ýíáí Üëëï öÜêåëï, êÜíôå êëéê óôï ÁíáæÞôçóç êáé åðéëÝîôå êÜðïéïí Üëëï öÜêåëï. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-ÅðéëÝîôå ôï öÜêåëï áðåãêáôÜóôáóçò ãéá ôï '$(^NameDA)':
-# ^SpaceAvailable
-"ÄéáèÝóéìïò ÷þñïò: "
-# ^SpaceRequired
-"Áðáéôïýìåíïò ÷þñïò: "
-# ^UninstallingText
-Ôï '$(^NameDA)' èá áðåãêáôáóôáèåß áðü ôïí áêüëïõèï öÜêåëï. $_CLICK
-# ^UninstallingSubText
-ÁðåãêáôÜóô. áðü:
-# ^FileError
-ÓöÜëìá êáôÜ ôï Üíïéãìá áñ÷åßïõ ãéá åããñáöÞ: \r\n\t"$0"\r\nÅðéëÝîôå ìáôáßùóç ãéá íá ìáôáéþóåôå ôçí åãêáôÜóôáóç,\r\nåðáíÜëçøç ãéá íá äïêéìÜóåôå íá ãñÜøåôå ôï áñ÷åßï ðÜëé, Þ\r\nðáñÜâëåøç ãéá íá ðáñáëåßøåôå áõôü ôï áñ÷åßï.
-# ^FileError_NoIgnore
-ÓöÜëìá êáôÜ ôï Üíïéãìá áñ÷åßïõ ãéá åããñáöÞ: \r\n\t"$0"\r\nÅðéëÝîôå åðáíÜëçøç ãéá íá äïêéìÜóåôå íá ãñÜøåôå ôï áñ÷åßï ðÜëé, Þ\r\nìáôáßùóç ãéá íá ìáôáéþóåôå ôçí åãêáôÜóôáóç.
-# ^CantWrite
-"Áäõíáìßá åããñáöÞò: "
-# ^CopyFailed
-ÁíôéãñáöÞ áðÝôõ÷å
-# ^CopyTo
-"ÁíôéãñáöÞ óôï "
-# ^Registering
-"Êáôá÷þñçóç: "
-# ^Unregistering
-"ÊáôÜñãçóç êáôá÷þñçóçò: "
-# ^SymbolNotFound
-"Áäõíáìßá åýñåóçò óõìâüëïõ: "
-# ^CouldNotLoad
-"Áäõíáìßá öüñôùóçò: "
-# ^CreateFolder
-"Äçìéïõñãßá öáêÝëïõ: "
-# ^CreateShortcut
-"Äçìéïõñãßá óõíôüìåõóçò: "
-# ^CreatedUninstaller
-"Äçìéïõñãßá ðñïãñÜììáôïò áðåãêáôÜóôáóçò: "
-# ^Delete
-"ÄéáãñáöÞ áñ÷åßïõ: "
-# ^DeleteOnReboot
-"ÄéáãñáöÞ óôçí åðáíåêêßíçóç: "
-# ^ErrorCreatingShortcut
-"ÓöÜëìá óôç äçìéïõñãßá óõíôüìåõóçò: "
-# ^ErrorCreating
-"ÓöÜëìá óôç äçìéïõñãßá: "
-# ^ErrorDecompressing
-ÓöÜëìá óôçí áðïóõìðßåóç äåäïìÝíùí! ÊáôåóôñáììÝíï ðñüãñáììá åãêáôÜóôáóçò;
-# ^ErrorRegistering
-ÓöÜëìá êáôá÷þñçóçò ôïõ DLL
-# ^ExecShell
-"ÅêôÝëåóç (ExecShell): "
-# ^Exec
-"ÅêôÝëåóç: "
-# ^Extract
-"Áðïóõìðßåóç: "
-# ^ErrorWriting
-"Áðïóõìðßåóç: óöÜëìá åããñáöÞò óôï áñ÷åßï "
-# ^InvalidOpcode
-ÅãêáôÜóôáóç êáôåóôñáììÝíç: ìç-Ýãêõñï opcode
-# ^NoOLE
-"¼÷é OLE ãéá ôï: "
-# ^OutputFolder
-"ÖÜêåëïò åîüäïõ: "
-# ^RemoveFolder
-"ÄéáãñáöÞ öáêÝëïõ: "
-# ^RenameOnReboot
-"Ìåôïíïìáóßá óôçí åðáíåêêßíçóç: "
-# ^Rename
-"Ìåôïíïìáóßá: "
-# ^Skipped
-"Ðáñáëåßöèçêå: "
-# ^CopyDetails
-ÁíôéãñáöÞ ëåðôïìåñåéþí óôï Ðñü÷åéñï
-# ^LogInstall
-ÊáôáãñáöÞ äéáäéêáóßáò åãêáôÜóôáóçò
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1032
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1253
+# RTL - anything else than RTL means LTR
+-
+# Translation by Makidis N. Michael - http://dias.aueb.gr/~p3010094/
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+ÅãêáôÜóôáóç ôïõ '$(^Name)'
+# ^UninstallCaption
+ÁðåãêáôÜóôáóç ôïõ '$(^Name)'
+# ^LicenseSubCaption
+: Óõìöùíßá ¢äåéáò ×ñÞóçò
+# ^ComponentsSubCaption
+: ÅðéëïãÝò ÅãêáôÜóôáóçò
+# ^DirSubCaption
+: ÖÜêåëïò ÅãêáôÜóôáóçò
+# ^InstallingSubCaption
+: ÅãêáôÜóôáóç óå åîÝëéîç
+# ^CompletedSubCaption
+: Ïëïêëçñþèçêå
+# ^UnComponentsSubCaption
+: ÅðéëïãÝò ÁðåãêáôÜóôáóçò
+# ^UnDirSubCaption
+: ÖÜêåëïò ÁðåãêáôÜóôáóçò
+# ^ConfirmSubCaption
+: Åðéâåâáßùóç
+# ^UninstallingSubCaption
+: ÁðåãêáôÜóôáóç óå åîÝëéîç
+# ^UnCompletedSubCaption
+: Ïëïêëçñþèçêå
+# ^BackBtn
+< &Ðßóù
+# ^NextBtn
+&Åðüìåíï >
+# ^AgreeBtn
+&Óõìöùíþ
+# ^AcceptBtn
+&ÁðïäÝ÷ïìáé ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò
+# ^DontAcceptBtn
+&Äåí áðïäÝ÷ïìáé ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò
+# ^InstallBtn
+&ÅãêáôÜóôáóç
+# ^UninstallBtn
+Áðå&ãêáôÜóô.
+# ^CancelBtn
+¢êõñï
+# ^CloseBtn
+&Êëåßóéìï
+# ^BrowseBtn
+Á&íáæÞôçóç...
+# ^ShowDetailsBtn
+&ËåðôïìÝñåéåò
+# ^ClickNext
+ÊÜíôå êëéê óôï Åðüìåíï ãéá íá óõíå÷ßóåôå.
+# ^ClickInstall
+ÊÜíôå êëéê óôï ÅãêáôÜóôáóç ãéá íá áñ÷ßóåôå ôçí åãêáôÜóôáóç.
+# ^ClickUninstall
+ÊÜíôå êëéê óôï ÁðåãêáôÜóôáóç ãéá íá áñ÷ßóåôå ôçí áðåãêáôÜóôáóç.
+# ^Name
+¼íïìá
+# ^Completed
+Ïëïêëçñþèçêå
+# ^LicenseText
+ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôï Óõìöùíþ.
+# ^LicenseTextCB
+ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. $_CLICK
+# ^LicenseTextRB
+ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. $_CLICK
+# ^UnLicenseText
+ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôï Óõìöùíþ.
+# ^UnLicenseTextCB
+ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. $_CLICK
+# ^UnLicenseTextRB
+ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. ÅÜí áðïäÝ÷åóôå üëïõò ôïõò üñïõò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. $_CLICK
+# ^Custom
+ÐñïóáñìïóìÝíç
+# ^ComponentsText
+ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá åãêáôáóôÞóåôå êáé áðïåðéëÝîôå ôá óôïé÷åßá ðïõ äå èÝëåôå íá åãêáôáóôÞóåôå. $_CLICK
+# ^ComponentsSubText1
+ÅðéëÝîôå ôýðï åãêáôÜóôáóçò:
+# ^ComponentsSubText2_NoInstTypes
+ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá åãêáôáóôÞóåôå:
+# ^ComponentsSubText2
+¹, åðéëÝîôå ôá ðñïáéñåôéêÜ óôïé÷åßá ðïõ èÝëåôå íá åãêáôáóôÞóåôå:
+# ^UnComponentsText
+ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå êáé áðïåðéëÝîôå ôá óôïé÷åßá ðïõ äå èÝëåôå íá áðåãêáôáóôÞóåôå. $_CLICK
+# ^UnComponentsSubText1
+ÅðéëÝîôå ôýðï áðåãêáôÜóôáóçò:
+# ^UnComponentsSubText2_NoInstTypes
+ÅðéëÝîôå ôá óôïé÷åßá ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå:
+# ^UnComponentsSubText2
+¹, åðéëÝîôå ôá ðñïáéñåôéêÜ óôïé÷åßá ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå:
+# ^DirText
+Ôï ðñüãñáììá åãêáôÜóôáóçò èá åãêáôáóôÞóåé ôï '$(^NameDA)' óôïí ðáñáêÜôù öÜêåëï. Ãéá íá ôï åãêáôáóôÞóåôå óå Ýíáí Üëëï öÜêåëï, êÜíôå êëéê óôï ÁíáæÞôçóç êáé åðéëÝîôå êÜðïéïí Üëëï öÜêåëï. $_CLICK
+# ^DirSubText
+ÖÜêåëïò ÅãêáôÜóôáóçò
+# ^DirBrowseText
+ÅðéëÝîôå ôï öÜêåëï åãêáôÜóôáóçò ãéá ôï '$(^NameDA)':
+# ^UnDirText
+Ôï ðñüãñáììá åãêáôÜóôáóçò èá áðåãêáôáóôÞóåé ôï '$(^NameDA)' áðü ôïí ðáñáêÜôù öÜêåëï. Ãéá íá áðåãêáôáóôÞóåôå áðü Ýíáí Üëëï öÜêåëï, êÜíôå êëéê óôï ÁíáæÞôçóç êáé åðéëÝîôå êÜðïéïí Üëëï öÜêåëï. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+ÅðéëÝîôå ôï öÜêåëï áðåãêáôÜóôáóçò ãéá ôï '$(^NameDA)':
+# ^SpaceAvailable
+"ÄéáèÝóéìïò ÷þñïò: "
+# ^SpaceRequired
+"Áðáéôïýìåíïò ÷þñïò: "
+# ^UninstallingText
+Ôï '$(^NameDA)' èá áðåãêáôáóôáèåß áðü ôïí áêüëïõèï öÜêåëï. $_CLICK
+# ^UninstallingSubText
+ÁðåãêáôÜóô. áðü:
+# ^FileError
+ÓöÜëìá êáôÜ ôï Üíïéãìá áñ÷åßïõ ãéá åããñáöÞ: \r\n\t"$0"\r\nÅðéëÝîôå ìáôáßùóç ãéá íá ìáôáéþóåôå ôçí åãêáôÜóôáóç,\r\nåðáíÜëçøç ãéá íá äïêéìÜóåôå íá ãñÜøåôå ôï áñ÷åßï ðÜëé, Þ\r\nðáñÜâëåøç ãéá íá ðáñáëåßøåôå áõôü ôï áñ÷åßï.
+# ^FileError_NoIgnore
+ÓöÜëìá êáôÜ ôï Üíïéãìá áñ÷åßïõ ãéá åããñáöÞ: \r\n\t"$0"\r\nÅðéëÝîôå åðáíÜëçøç ãéá íá äïêéìÜóåôå íá ãñÜøåôå ôï áñ÷åßï ðÜëé, Þ\r\nìáôáßùóç ãéá íá ìáôáéþóåôå ôçí åãêáôÜóôáóç.
+# ^CantWrite
+"Áäõíáìßá åããñáöÞò: "
+# ^CopyFailed
+ÁíôéãñáöÞ áðÝôõ÷å
+# ^CopyTo
+"ÁíôéãñáöÞ óôï "
+# ^Registering
+"Êáôá÷þñçóç: "
+# ^Unregistering
+"ÊáôÜñãçóç êáôá÷þñçóçò: "
+# ^SymbolNotFound
+"Áäõíáìßá åýñåóçò óõìâüëïõ: "
+# ^CouldNotLoad
+"Áäõíáìßá öüñôùóçò: "
+# ^CreateFolder
+"Äçìéïõñãßá öáêÝëïõ: "
+# ^CreateShortcut
+"Äçìéïõñãßá óõíôüìåõóçò: "
+# ^CreatedUninstaller
+"Äçìéïõñãßá ðñïãñÜììáôïò áðåãêáôÜóôáóçò: "
+# ^Delete
+"ÄéáãñáöÞ áñ÷åßïõ: "
+# ^DeleteOnReboot
+"ÄéáãñáöÞ óôçí åðáíåêêßíçóç: "
+# ^ErrorCreatingShortcut
+"ÓöÜëìá óôç äçìéïõñãßá óõíôüìåõóçò: "
+# ^ErrorCreating
+"ÓöÜëìá óôç äçìéïõñãßá: "
+# ^ErrorDecompressing
+ÓöÜëìá óôçí áðïóõìðßåóç äåäïìÝíùí! ÊáôåóôñáììÝíï ðñüãñáììá åãêáôÜóôáóçò;
+# ^ErrorRegistering
+ÓöÜëìá êáôá÷þñçóçò ôïõ DLL
+# ^ExecShell
+"ÅêôÝëåóç (ExecShell): "
+# ^Exec
+"ÅêôÝëåóç: "
+# ^Extract
+"Áðïóõìðßåóç: "
+# ^ErrorWriting
+"Áðïóõìðßåóç: óöÜëìá åããñáöÞò óôï áñ÷åßï "
+# ^InvalidOpcode
+ÅãêáôÜóôáóç êáôåóôñáììÝíç: ìç-Ýãêõñï opcode
+# ^NoOLE
+"¼÷é OLE ãéá ôï: "
+# ^OutputFolder
+"ÖÜêåëïò åîüäïõ: "
+# ^RemoveFolder
+"ÄéáãñáöÞ öáêÝëïõ: "
+# ^RenameOnReboot
+"Ìåôïíïìáóßá óôçí åðáíåêêßíçóç: "
+# ^Rename
+"Ìåôïíïìáóßá: "
+# ^Skipped
+"Ðáñáëåßöèçêå: "
+# ^CopyDetails
+ÁíôéãñáöÞ ëåðôïìåñåéþí óôï Ðñü÷åéñï
+# ^LogInstall
+ÊáôáãñáöÞ äéáäéêáóßáò åãêáôÜóôáóçò
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Greek.nsh b/Contrib/Language files/Greek.nsh
index 6835ff3..ef3d3f4 100755
--- a/Contrib/Language files/Greek.nsh
+++ b/Contrib/Language files/Greek.nsh
@@ -1,121 +1,121 @@
-;Language: Greek (1032)
-;By Makidis N. Michael - http://dias.aueb.gr/~p3010094/
-
-!insertmacro LANGFILE "Greek" "Greek"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Êáëþò Þëèáôå óôçí ÅãêáôÜóôáóç ôïõ '$(^NameDA)'"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ï ïäçãüò áõôüò èá óáò êáèïäçãÞóåé êáôÜ ôç äéÜñêåéá ôçò åãêáôÜóôáóçò ôïõ '$(^NameDA)'.$\r$\n$\r$\nÓõíéóôÜôáé íá êëåßóåôå üëåò ôéò Üëëåò åöáñìïãÝò ðñéí îåêéíÞóåôå ôçí ÅãêáôÜóôáóç. Áõôü èá åðéôñÝøåé óôçí ÅãêáôÜóôáóç íá åíçìåñþóåé ôá ó÷åôéêÜ áñ÷åßá óõóôÞìáôïò ÷ùñßò ôçí åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Êáëþò Þëèáôå óôïí ïäçãü áðåãêáô. ôïõ '$(^NameDA)'"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ï ïäçãüò áõôüò èá óáò êáèïäçãÞóåé êáôÜ ôç äéÜñêåéá ôçò áðåãêáôÜóôáóçò ôïõ '$(^NameDA)'.$\r$\n$\r$\nÐñéí îåêéíÞóåôå ôçí áðåãêáôÜóôáóç, âåâáéùèåßôå üôé ôï '$(^NameDA)' äåí ôñÝ÷åé.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Óõìöùíßá ¢äåéáò ×ñÞóçò"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôï Óõìöùíþ ãéá íá óõíå÷ßóåôå. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá åãêáôáóôÞóåôå ôï '$(^NameDA)'."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá åãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá åãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Óõìöùíßá ¢äåéáò ×ñÞóçò"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôï Óõìöùíþ ãéá íá óõíå÷ßóåôå. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá áðåãêáôáóôÞóåôå ôï '$(^NameDA)'."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ÐáôÞóôå ôï Page Down ãéá íá äåßôå ôï õðüëïéðï ôçò Üäåéáò ÷ñÞóçò."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ÅðéëïãÞ Óôïé÷åßùí"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "ÅðéëÝîôå ôá óôïé÷åßá ôïõ '$(^NameDA)' ðïõ èÝëåôå íá åãêáôáóôÞóåôå."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÐåñéãñáöÞ"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ÅðéëïãÞ Óôïé÷åßùí"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "ÅðéëÝîôå ôá óôïé÷åßá ôïõ '$(^NameDA)' ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÐåñÜóôå ôï äåßêôç ôïõ ðïíôéêéïý ðÜíù áðü Ýíá óôïé÷åßï ãéá íá äåßôå ôçí ðåñéãñáöÞ ôïõ."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÐåñÜóôå ôï äåßêôç ôïõ ðïíôéêéïý ðÜíù áðü Ýíá óôïé÷åßï ãéá íá äåßôå ôçí ðåñéãñáöÞ ôïõ."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ÅðéëïãÞ ÈÝóçò ÅãêáôÜóôáóçò"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "ÅðéëÝîôå ôï öÜêåëï ìÝóá óôïí ïðïßï èá åãêáôáóôáèåß ôï '$(^NameDA)'."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "ÅðéëïãÞ ÈÝóçò ÁðåãêáôÜóôáóçò"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "ÅðéëÝîôå ôï öÜêåëï áðü ôïí ïðïßï èá áðåãêáôáóôáèåß ôï '$(^NameDA)'."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ÅãêáôÜóôáóç Óå ÅîÝëéîç"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ðáñáêáëþ ðåñéìÝíåôå üóï ôï '$(^NameDA)' åãêáèßóôáôáé."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Ç ÅãêáôÜóôáóç Ïëïêëçñþèçêå"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Ç åãêáôÜóôáóç ïëïêëçñþèçêå åðéôõ÷þò."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Ç ÅãêáôÜóôáóç Äéáêüðçêå"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Ç åãêáôÜóôáóç äåí ïëïêëçñþèçêå åðéôõ÷þò."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÁðåãêáôÜóôáóç Óå ÅîÝëéîç"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ðáñáêáëþ ðåñéìÝíåôå üóï ôï '$(^NameDA)' áðåãêáèßóôáôáé."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ç ÁðåãêáôÜóôáóç Ïëïêëçñþèçêå"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Ç áðåãêáôÜóôáóç ïëïêëçñþèçêå åðéôõ÷þò."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ç ÁðåãêáôÜóôáóç Äéáêüðçêå"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Ç áðåãêáôÜóôáóç äåí ïëïêëçñþèçêå åðéôõ÷þò."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÏëïêëÞñùóç ôçò ÅãêáôÜóôáóçò ôïõ '$(^NameDA)'"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Ôï '$(^NameDA)' åãêáôáóôÜèçêå óôïí õðïëïãéóôÞ óáò.$\r$\n$\r$\nÊÜíôå êëéê óôï ÔÝëïò ãéá íá êëåßóåôå áõôüí ôïí ïäçãü."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "ÐñÝðåé íá ãßíåé åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò ãéá íá ïëïêëçñùèåß ç åãêáôÜóôáóç ôïõ '$(^NameDA)'. ÈÝëåôå íá åðáíåêêéíÞóåôå ôïí õðïëïãéóôÞ óáò ôþñá;"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÏëïêëÞñùóç ôçò ÁðåãêáôÜóôáóçò ôïõ '$(^NameDA)'"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ôï '$(^NameDA)' áðåãêáôáóôÜèçêå áðü ôïí õðïëïãéóôÞ óáò.$\r$\n$\r$\nÊÜíôå êëéê óôï ÔÝëïò ãéá íá êëåßóåôå áõôüí ôïí ïäçãü."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "ÐñÝðåé íá ãßíåé åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò ãéá íá ïëïêëçñùèåß ç áðåãêáôÜóôáóç ôïõ '$(^NameDA)'. ÈÝëåôå íá åðáíåêêéíÞóåôå ôïí õðïëïãéóôÞ óáò ôþñá;"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Íá ãßíåé åðáíåêêßíçóç ôþñá"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Èá åðáíåêêéíÞóù ôïí õðïëïãéóôÞ ìïõ áñãüôåñá"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&ÅêôÝëåóç ôïõ '$(^NameDA)'"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "ÅìöÜíéóç ôïõ &áñ÷åßïõ Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&ÔÝëïò"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ÅðéëïãÞ ÖáêÝëïõ ãéá ôï Ìåíïý ¸íáñîç"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "ÅðéëÝîôå Ýíá öÜêåëï ôïõ ìåíïý ¸íáñîç ãéá ôéò óõíôïìåýóåéò ôïõ '$(^NameDA)'."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "ÅðéëÝîôå Ýíá öÜêåëï ôïõ ìåíïý ¸íáñîç ãéá ôéò óõíôïìåýóåéò ôïõ ðñïãñÜììáôïò. Ìðïñåßôå åðßóçò íá åéóÜãåôå Ýíá üíïìá ãéá íá äçìéïõñãÞóåôå Ýíá íÝï öÜêåëï."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íá ìç äçìéïõñãçèïýí óõíôïìåýóåéò"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "ÁðåãêáôÜóôáóç ôïõ '$(^NameDA)'"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Áöáßñåóç ôïõ '$(^NameDA)' áðü ôïí õðïëïãéóôÞ óáò."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Åßóôå óßãïõñïé ðùò èÝëåôå íá ôåñìáôßóåôå ôçí åãêáôÜóôáóç ôïõ '$(^Name)';"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Åßóôå óßãïõñïé ðùò èÝëåôå íá ôåñìáôßóåôå ôçí áðåãêáôÜóôáóç ôïõ '$(^Name)';"
-!endif
+;Language: Greek (1032)
+;By Makidis N. Michael - http://dias.aueb.gr/~p3010094/
+
+!insertmacro LANGFILE "Greek" "Greek"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Êáëþò Þëèáôå óôçí ÅãêáôÜóôáóç ôïõ '$(^NameDA)'"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ï ïäçãüò áõôüò èá óáò êáèïäçãÞóåé êáôÜ ôç äéÜñêåéá ôçò åãêáôÜóôáóçò ôïõ '$(^NameDA)'.$\r$\n$\r$\nÓõíéóôÜôáé íá êëåßóåôå üëåò ôéò Üëëåò åöáñìïãÝò ðñéí îåêéíÞóåôå ôçí ÅãêáôÜóôáóç. Áõôü èá åðéôñÝøåé óôçí ÅãêáôÜóôáóç íá åíçìåñþóåé ôá ó÷åôéêÜ áñ÷åßá óõóôÞìáôïò ÷ùñßò ôçí åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Êáëþò Þëèáôå óôïí ïäçãü áðåãêáô. ôïõ '$(^NameDA)'"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ï ïäçãüò áõôüò èá óáò êáèïäçãÞóåé êáôÜ ôç äéÜñêåéá ôçò áðåãêáôÜóôáóçò ôïõ '$(^NameDA)'.$\r$\n$\r$\nÐñéí îåêéíÞóåôå ôçí áðåãêáôÜóôáóç, âåâáéùèåßôå üôé ôï '$(^NameDA)' äåí ôñÝ÷åé.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Óõìöùíßá ¢äåéáò ×ñÞóçò"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí åãêáôáóôÞóåôå ôï '$(^NameDA)'."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôï Óõìöùíþ ãéá íá óõíå÷ßóåôå. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá åãêáôáóôÞóåôå ôï '$(^NameDA)'."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá åãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá åãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Óõìöùíßá ¢äåéáò ×ñÞóçò"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ÅëÝãîôå ôçí Üäåéá ÷ñÞóçò ðñéí áðåãêáôáóôÞóåôå ôï '$(^NameDA)'."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôï Óõìöùíþ ãéá íá óõíå÷ßóåôå. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá áðåãêáôáóôÞóåôå ôï '$(^NameDA)'."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ÅÜí áðïäÝ÷åóôå ôïõò üñïõò ôçò Üäåéáò ÷ñÞóçò, êÜíôå êëéê óôçí ðñþôç åðéëïãÞ ðáñáêÜôù. ÐñÝðåé íá áðïäå÷èåßôå ôç óõìöùíßá ãéá íá áðåãêáôáóôÞóåôå ôï '$(^NameDA)'. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ÐáôÞóôå ôï Page Down ãéá íá äåßôå ôï õðüëïéðï ôçò Üäåéáò ÷ñÞóçò."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ÅðéëïãÞ Óôïé÷åßùí"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "ÅðéëÝîôå ôá óôïé÷åßá ôïõ '$(^NameDA)' ðïõ èÝëåôå íá åãêáôáóôÞóåôå."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÐåñéãñáöÞ"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ÅðéëïãÞ Óôïé÷åßùí"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "ÅðéëÝîôå ôá óôïé÷åßá ôïõ '$(^NameDA)' ðïõ èÝëåôå íá áðåãêáôáóôÞóåôå."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÐåñÜóôå ôï äåßêôç ôïõ ðïíôéêéïý ðÜíù áðü Ýíá óôïé÷åßï ãéá íá äåßôå ôçí ðåñéãñáöÞ ôïõ."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ÐåñÜóôå ôï äåßêôç ôïõ ðïíôéêéïý ðÜíù áðü Ýíá óôïé÷åßï ãéá íá äåßôå ôçí ðåñéãñáöÞ ôïõ."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ÅðéëïãÞ ÈÝóçò ÅãêáôÜóôáóçò"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "ÅðéëÝîôå ôï öÜêåëï ìÝóá óôïí ïðïßï èá åãêáôáóôáèåß ôï '$(^NameDA)'."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "ÅðéëïãÞ ÈÝóçò ÁðåãêáôÜóôáóçò"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "ÅðéëÝîôå ôï öÜêåëï áðü ôïí ïðïßï èá áðåãêáôáóôáèåß ôï '$(^NameDA)'."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ÅãêáôÜóôáóç Óå ÅîÝëéîç"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ðáñáêáëþ ðåñéìÝíåôå üóï ôï '$(^NameDA)' åãêáèßóôáôáé."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Ç ÅãêáôÜóôáóç Ïëïêëçñþèçêå"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Ç åãêáôÜóôáóç ïëïêëçñþèçêå åðéôõ÷þò."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Ç ÅãêáôÜóôáóç Äéáêüðçêå"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Ç åãêáôÜóôáóç äåí ïëïêëçñþèçêå åðéôõ÷þò."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÁðåãêáôÜóôáóç Óå ÅîÝëéîç"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ðáñáêáëþ ðåñéìÝíåôå üóï ôï '$(^NameDA)' áðåãêáèßóôáôáé."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ç ÁðåãêáôÜóôáóç Ïëïêëçñþèçêå"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Ç áðåãêáôÜóôáóç ïëïêëçñþèçêå åðéôõ÷þò."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ç ÁðåãêáôÜóôáóç Äéáêüðçêå"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Ç áðåãêáôÜóôáóç äåí ïëïêëçñþèçêå åðéôõ÷þò."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÏëïêëÞñùóç ôçò ÅãêáôÜóôáóçò ôïõ '$(^NameDA)'"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Ôï '$(^NameDA)' åãêáôáóôÜèçêå óôïí õðïëïãéóôÞ óáò.$\r$\n$\r$\nÊÜíôå êëéê óôï ÔÝëïò ãéá íá êëåßóåôå áõôüí ôïí ïäçãü."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "ÐñÝðåé íá ãßíåé åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò ãéá íá ïëïêëçñùèåß ç åãêáôÜóôáóç ôïõ '$(^NameDA)'. ÈÝëåôå íá åðáíåêêéíÞóåôå ôïí õðïëïãéóôÞ óáò ôþñá;"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÏëïêëÞñùóç ôçò ÁðåãêáôÜóôáóçò ôïõ '$(^NameDA)'"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ôï '$(^NameDA)' áðåãêáôáóôÜèçêå áðü ôïí õðïëïãéóôÞ óáò.$\r$\n$\r$\nÊÜíôå êëéê óôï ÔÝëïò ãéá íá êëåßóåôå áõôüí ôïí ïäçãü."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "ÐñÝðåé íá ãßíåé åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò ãéá íá ïëïêëçñùèåß ç áðåãêáôÜóôáóç ôïõ '$(^NameDA)'. ÈÝëåôå íá åðáíåêêéíÞóåôå ôïí õðïëïãéóôÞ óáò ôþñá;"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Íá ãßíåé åðáíåêêßíçóç ôþñá"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Èá åðáíåêêéíÞóù ôïí õðïëïãéóôÞ ìïõ áñãüôåñá"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&ÅêôÝëåóç ôïõ '$(^NameDA)'"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "ÅìöÜíéóç ôïõ &áñ÷åßïõ Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&ÔÝëïò"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ÅðéëïãÞ ÖáêÝëïõ ãéá ôï Ìåíïý ¸íáñîç"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "ÅðéëÝîôå Ýíá öÜêåëï ôïõ ìåíïý ¸íáñîç ãéá ôéò óõíôïìåýóåéò ôïõ '$(^NameDA)'."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "ÅðéëÝîôå Ýíá öÜêåëï ôïõ ìåíïý ¸íáñîç ãéá ôéò óõíôïìåýóåéò ôïõ ðñïãñÜììáôïò. Ìðïñåßôå åðßóçò íá åéóÜãåôå Ýíá üíïìá ãéá íá äçìéïõñãÞóåôå Ýíá íÝï öÜêåëï."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íá ìç äçìéïõñãçèïýí óõíôïìåýóåéò"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "ÁðåãêáôÜóôáóç ôïõ '$(^NameDA)'"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Áöáßñåóç ôïõ '$(^NameDA)' áðü ôïí õðïëïãéóôÞ óáò."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Åßóôå óßãïõñïé ðùò èÝëåôå íá ôåñìáôßóåôå ôçí åãêáôÜóôáóç ôïõ '$(^Name)';"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Åßóôå óßãïõñïé ðùò èÝëåôå íá ôåñìáôßóåôå ôçí áðåãêáôÜóôáóç ôïõ '$(^Name)';"
+!endif
diff --git a/Contrib/Language files/Hebrew.nlf b/Contrib/Language files/Hebrew.nlf
index 8a21d1c..7acde6f 100755
--- a/Contrib/Language files/Hebrew.nlf
+++ b/Contrib/Language files/Hebrew.nlf
@@ -1,190 +1,190 @@
-# Hebrew NSIS language file
-NLF v6
-# Language ID
-1037
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1255
-# RTL - anything else than RTL means LTR
-RTL
-# Translation by Amir Szekely (aka KiCHiK), fixed by Yaron Shahrabani
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-äú÷ðú $(^Name)
-# ^UninstallCaption
-äñøú $(^Name)
-# ^LicenseSubCaption
-: äñëí øéùåé
-# ^ComponentsSubCaption
-: àôùøåéåú äú÷ðä
-# ^DirSubCaption
-: úé÷ééú äú÷ðä
-# ^InstallingSubCaption
-: îú÷éï
-# ^CompletedSubCaption
-: ääú÷ðä äåùìîä
-# ^UnComponentsSubCaption
-: àôùøåéåú äñøä
-# ^UnDirSubCaption
-: úé÷ééä ìäñøä
-# ^ConfirmSubCaption
-: àéùåø äñøä
-# ^UninstallingSubCaption
-: îñéø
-# ^UnCompletedSubCaption
-: ääñøä äåùìîä
-# ^BackBtn
-< ä&÷åãí
-# ^NextBtn
-ä&áà >
-# ^AgreeBtn
-àðé &îñëéí
-# ^AcceptBtn
-àðé &îñëéí ìúðàé äñëí äøéùåé
-# ^DontAcceptBtn
-àðé &ìà îñëéí ìúðàé äñëí äøéùåé
-# ^InstallBtn
-&äú÷ï
-# ^UninstallBtn
-&äñø
-# ^CancelBtn
-áéèåì
-# ^CloseBtn
-ñâåø&
-# ^BrowseBtn
-&òééï...
-# ^ShowDetailsBtn
-ä&öâ ôøèéí
-# ^ClickNext
-ìçõ òì äáà ëãé ìäîùéê.
-# ^ClickInstall
-ìçõ òì äú÷ï ëãé ìäúçéì àú ääú÷ðä.
-# ^ClickUninstall
-ìçõ òì äñø ëãé ìäúçéì àú ääñøä.
-# ^Name
-ùí
-# ^Completed
-äôòåìä äåùìîä
-# ^LicenseText
-àðà ñ÷åø àú äñëí äøéùåé ìôðé äú÷ðú $(^NameDA). àí äéðê î÷áì àú ëì úðàé ääñëí, ìçõ 'àðé îñëéí'.
-# ^LicenseTextCB
-àðà ñ÷åø àú äñëí äøéùåé ìôðé äú÷ðú $(^NameDA). àí äéðê î÷áì àú ëì úðàé ääñëí, ñîï àú úéáú äñéîåï ùìäìï. $_CLICK
-# ^LicenseTextRB
-àðà ñ÷åø àú äñëí äøéùåé ìôðé äú÷ðú $(^NameDA). àí äéðê î÷áì àú ëì úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. $_CLICK
-# ^UnLicenseText
-àðà ñ÷åø àú äñëí äøéùåé ìôðé äñøú $(^NameDA). àí äéðê îñëéí ìëì úðàé ääñëí, ìçõ 'àðé îñëéí'.
-# ^UnLicenseTextCB
-àðà ñ÷åø àú äñëí äøéùåé ìôðé äñøú $(^NameDA). àí äéðê îñëéí ìëì úðàé ääñëí, ñîï àú úéáú äñéîåï ùìäìï. $_CLICK
-# ^UnLicenseTextRB
-àðà ñ÷åø àú äñëí äøéùåé ìôðé äñøú $(^NameDA). àí äéðê îñëéí ìëì úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. $_CLICK
-# ^Custom
-îåúàí àéùéú
-# ^ComponentsText
-ñîï àú äøëéáéí ùáøöåðê ìäú÷éï åáèì àú äñéîåï ùì øëéáéí ùàéï áøöåðê ìäú÷éï. $_CLICK
-# ^ComponentsSubText1
-áçø ñåâ äú÷ðä:
-# ^ComponentsSubText2_NoInstTypes
-áçø øëéáéí ìäú÷ðä:
-# ^ComponentsSubText2
-àå, áçø øëéáé øùåú ìäú÷ðä:
-# ^UnComponentsText
-ñîï àú äøëéáéí ùáøöåðê ìäñéø åáèì àú äñéîåï ùì øëéáéí ùàéï áøöåðê ìäñéø. $_CLICK
-# ^UnComponentsSubText1
-áçø ñåâ äñøä:
-# ^UnComponentsSubText2_NoInstTypes
-áçø øëéáéí ìäñøä:
-# ^UnComponentsSubText2
-àå, áçø øëéáé øùåú ìäñøä:
-# ^DirText
-úåëðéú æå úú÷éï àú $(^NameDA) ìúé÷ééä ùìäìï. ëãé ìäú÷éï ìúé÷ééä àçøú, ìçõ òì 'òééï' åáçø úé÷ééä àçøú. $_CLICK
-# ^DirSubText
-úé÷ééú éòã
-# ^DirBrowseText
-áçø úé÷ééä ìäú÷ðú $(^NameDA):
-# ^UnDirText
-úåëðéú æå úñéø àú $(^NameDA) îäúé÷ééä ùìäìï. ëãé ìäñéø îúé÷ééä àçøú, ìçõ òì 'òééï' åáçø úé÷ééä àçøú. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-áçø úé÷ééä îîðä úåñø $(^NameDA):
-# ^SpaceAvailable
-"î÷åí ôðåé: "
-# ^SpaceRequired
-"î÷åí ãøåù: "
-# ^UninstallingText
-äñøú $(^NameDA) úúáöò îäúé÷ééä ùìäìï. $_CLICK
-# ^UninstallingSubText
-îñéø î:
-# ^FileError
-àøòä ùâéàä áòú ôúéçú ÷åáõ ìëúéáä:\r\n\t"$0"\r\nìçõ òì áéèåì ëãé ìáèì àú ääú÷ðä,\r\nðñä ùðéú ëãé ìðñåú ìôúåç àú ä÷åáõ ùåá, àå\r\näúòìí ëãé ìãìâ òì ä÷åáõ
-# ^FileError_NoIgnore
-àøòä ùâéàä áòú ôúéçú ÷åáõ ìëúéáä:\r\n\t"$0"\r\nìçõ òì ðñä ùðéú ëãé ìðñåú ìôúåç àú ä÷åáõ ùåá, àå\r\náéèåì ëãé ìáèì àú äúú÷ðä
-# ^CantWrite
-"ìà ðéúï ìëúåá: "
-# ^CopyFailed
-ääòú÷ä ðëùìä
-# ^CopyTo
-äòú÷ ì-
-# ^Registering
-"øåùí: "
-# ^Unregistering
-"áéèåì øéùåí: "
-# ^SymbolNotFound
-"ñîì ìà ðîöà: "
-# ^CouldNotLoad
-"ìà ðéúï ìèòåï: "
-# ^CreateFolder
-"öåø úé÷ééä: "
-# ^CreateShortcut
-"öåø ÷éöåø ãøê: "
-# ^CreatedUninstaller
-"îñéø äú÷ðä ðåöø: "
-# ^Delete
-"îç÷ ÷åáõ: "
-# ^DeleteOnReboot
-"îç÷ àçøé àúçåì: "
-# ^ErrorCreatingShortcut
-"ùâéàä áòú éöéøú ÷éöåø ãøê: "
-# ^ErrorCreating
-"ùâéàä áòú éöéøú: "
-# ^ErrorDecompressing
-ùâéàä áòú ôøéùú îéãò! äú÷ðä ôâåîä?
-# ^ErrorRegistering
-ùâéàä áòú øéùåí DLL
-# ^ExecShell
-"áöò ôòåìú-÷åáõ: "
-# ^Exec
-"áöò: "
-# ^Extract
-"ôøåù: "
-# ^ErrorWriting
-"ôøåù: ùâéàä áòú ëúéáä ì÷åáõ "
-# ^InvalidOpcode
-äú÷ðä ôâåîä! ô÷åãú áéöåò ùâåéä
-# ^NoOLE
-"àéï OLE ì: "
-# ^OutputFolder
-"úé÷ééú ôìè: "
-# ^RemoveFolder
-"äñø úé÷ééä: "
-# ^RenameOnReboot
-"ùðä ùí ìàçø àúçåì: "
-# ^Rename
-"ùðä ùí: "
-# ^Skipped
-"ãìâ: "
-# ^CopyDetails
-äòú÷ ôøèéí ììåç
-# ^LogInstall
-ùîåø øéùåí ôòéìåéåú ääú÷ðä
-# ^Byte
-"á
-# ^Kilo
-" ÷"
-# ^Mega
-" î"
-# ^Giga
+# Hebrew NSIS language file
+NLF v6
+# Language ID
+1037
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1255
+# RTL - anything else than RTL means LTR
+RTL
+# Translation by Amir Szekely (aka KiCHiK), fixed by Yaron Shahrabani
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+äú÷ðú $(^Name)
+# ^UninstallCaption
+äñøú $(^Name)
+# ^LicenseSubCaption
+: äñëí øéùåé
+# ^ComponentsSubCaption
+: àôùøåéåú äú÷ðä
+# ^DirSubCaption
+: úé÷ééú äú÷ðä
+# ^InstallingSubCaption
+: îú÷éï
+# ^CompletedSubCaption
+: ääú÷ðä äåùìîä
+# ^UnComponentsSubCaption
+: àôùøåéåú äñøä
+# ^UnDirSubCaption
+: úé÷ééä ìäñøä
+# ^ConfirmSubCaption
+: àéùåø äñøä
+# ^UninstallingSubCaption
+: îñéø
+# ^UnCompletedSubCaption
+: ääñøä äåùìîä
+# ^BackBtn
+< ä&÷åãí
+# ^NextBtn
+ä&áà >
+# ^AgreeBtn
+àðé &îñëéí
+# ^AcceptBtn
+àðé &îñëéí ìúðàé äñëí äøéùåé
+# ^DontAcceptBtn
+àðé &ìà îñëéí ìúðàé äñëí äøéùåé
+# ^InstallBtn
+&äú÷ï
+# ^UninstallBtn
+&äñø
+# ^CancelBtn
+áéèåì
+# ^CloseBtn
+ñâåø&
+# ^BrowseBtn
+&òééï...
+# ^ShowDetailsBtn
+ä&öâ ôøèéí
+# ^ClickNext
+ìçõ òì äáà ëãé ìäîùéê.
+# ^ClickInstall
+ìçõ òì äú÷ï ëãé ìäúçéì àú ääú÷ðä.
+# ^ClickUninstall
+ìçõ òì äñø ëãé ìäúçéì àú ääñøä.
+# ^Name
+ùí
+# ^Completed
+äôòåìä äåùìîä
+# ^LicenseText
+àðà ñ÷åø àú äñëí äøéùåé ìôðé äú÷ðú $(^NameDA). àí äéðê î÷áì àú ëì úðàé ääñëí, ìçõ 'àðé îñëéí'.
+# ^LicenseTextCB
+àðà ñ÷åø àú äñëí äøéùåé ìôðé äú÷ðú $(^NameDA). àí äéðê î÷áì àú ëì úðàé ääñëí, ñîï àú úéáú äñéîåï ùìäìï. $_CLICK
+# ^LicenseTextRB
+àðà ñ÷åø àú äñëí äøéùåé ìôðé äú÷ðú $(^NameDA). àí äéðê î÷áì àú ëì úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. $_CLICK
+# ^UnLicenseText
+àðà ñ÷åø àú äñëí äøéùåé ìôðé äñøú $(^NameDA). àí äéðê îñëéí ìëì úðàé ääñëí, ìçõ 'àðé îñëéí'.
+# ^UnLicenseTextCB
+àðà ñ÷åø àú äñëí äøéùåé ìôðé äñøú $(^NameDA). àí äéðê îñëéí ìëì úðàé ääñëí, ñîï àú úéáú äñéîåï ùìäìï. $_CLICK
+# ^UnLicenseTextRB
+àðà ñ÷åø àú äñëí äøéùåé ìôðé äñøú $(^NameDA). àí äéðê îñëéí ìëì úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. $_CLICK
+# ^Custom
+îåúàí àéùéú
+# ^ComponentsText
+ñîï àú äøëéáéí ùáøöåðê ìäú÷éï åáèì àú äñéîåï ùì øëéáéí ùàéï áøöåðê ìäú÷éï. $_CLICK
+# ^ComponentsSubText1
+áçø ñåâ äú÷ðä:
+# ^ComponentsSubText2_NoInstTypes
+áçø øëéáéí ìäú÷ðä:
+# ^ComponentsSubText2
+àå, áçø øëéáé øùåú ìäú÷ðä:
+# ^UnComponentsText
+ñîï àú äøëéáéí ùáøöåðê ìäñéø åáèì àú äñéîåï ùì øëéáéí ùàéï áøöåðê ìäñéø. $_CLICK
+# ^UnComponentsSubText1
+áçø ñåâ äñøä:
+# ^UnComponentsSubText2_NoInstTypes
+áçø øëéáéí ìäñøä:
+# ^UnComponentsSubText2
+àå, áçø øëéáé øùåú ìäñøä:
+# ^DirText
+úåëðéú æå úú÷éï àú $(^NameDA) ìúé÷ééä ùìäìï. ëãé ìäú÷éï ìúé÷ééä àçøú, ìçõ òì 'òééï' åáçø úé÷ééä àçøú. $_CLICK
+# ^DirSubText
+úé÷ééú éòã
+# ^DirBrowseText
+áçø úé÷ééä ìäú÷ðú $(^NameDA):
+# ^UnDirText
+úåëðéú æå úñéø àú $(^NameDA) îäúé÷ééä ùìäìï. ëãé ìäñéø îúé÷ééä àçøú, ìçõ òì 'òééï' åáçø úé÷ééä àçøú. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+áçø úé÷ééä îîðä úåñø $(^NameDA):
+# ^SpaceAvailable
+"î÷åí ôðåé: "
+# ^SpaceRequired
+"î÷åí ãøåù: "
+# ^UninstallingText
+äñøú $(^NameDA) úúáöò îäúé÷ééä ùìäìï. $_CLICK
+# ^UninstallingSubText
+îñéø î:
+# ^FileError
+àøòä ùâéàä áòú ôúéçú ÷åáõ ìëúéáä:\r\n\t"$0"\r\nìçõ òì áéèåì ëãé ìáèì àú ääú÷ðä,\r\nðñä ùðéú ëãé ìðñåú ìôúåç àú ä÷åáõ ùåá, àå\r\näúòìí ëãé ìãìâ òì ä÷åáõ
+# ^FileError_NoIgnore
+àøòä ùâéàä áòú ôúéçú ÷åáõ ìëúéáä:\r\n\t"$0"\r\nìçõ òì ðñä ùðéú ëãé ìðñåú ìôúåç àú ä÷åáõ ùåá, àå\r\náéèåì ëãé ìáèì àú äúú÷ðä
+# ^CantWrite
+"ìà ðéúï ìëúåá: "
+# ^CopyFailed
+ääòú÷ä ðëùìä
+# ^CopyTo
+äòú÷ ì-
+# ^Registering
+"øåùí: "
+# ^Unregistering
+"áéèåì øéùåí: "
+# ^SymbolNotFound
+"ñîì ìà ðîöà: "
+# ^CouldNotLoad
+"ìà ðéúï ìèòåï: "
+# ^CreateFolder
+"öåø úé÷ééä: "
+# ^CreateShortcut
+"öåø ÷éöåø ãøê: "
+# ^CreatedUninstaller
+"îñéø äú÷ðä ðåöø: "
+# ^Delete
+"îç÷ ÷åáõ: "
+# ^DeleteOnReboot
+"îç÷ àçøé àúçåì: "
+# ^ErrorCreatingShortcut
+"ùâéàä áòú éöéøú ÷éöåø ãøê: "
+# ^ErrorCreating
+"ùâéàä áòú éöéøú: "
+# ^ErrorDecompressing
+ùâéàä áòú ôøéùú îéãò! äú÷ðä ôâåîä?
+# ^ErrorRegistering
+ùâéàä áòú øéùåí DLL
+# ^ExecShell
+"áöò ôòåìú-÷åáõ: "
+# ^Exec
+"áöò: "
+# ^Extract
+"ôøåù: "
+# ^ErrorWriting
+"ôøåù: ùâéàä áòú ëúéáä ì÷åáõ "
+# ^InvalidOpcode
+äú÷ðä ôâåîä! ô÷åãú áéöåò ùâåéä
+# ^NoOLE
+"àéï OLE ì: "
+# ^OutputFolder
+"úé÷ééú ôìè: "
+# ^RemoveFolder
+"äñø úé÷ééä: "
+# ^RenameOnReboot
+"ùðä ùí ìàçø àúçåì: "
+# ^Rename
+"ùðä ùí: "
+# ^Skipped
+"ãìâ: "
+# ^CopyDetails
+äòú÷ ôøèéí ììåç
+# ^LogInstall
+ùîåø øéùåí ôòéìåéåú ääú÷ðä
+# ^Byte
+"á
+# ^Kilo
+" ÷"
+# ^Mega
+" î"
+# ^Giga
" â" \ No newline at end of file
diff --git a/Contrib/Language files/Hebrew.nsh b/Contrib/Language files/Hebrew.nsh
index fcc2165..d27a6b2 100755
--- a/Contrib/Language files/Hebrew.nsh
+++ b/Contrib/Language files/Hebrew.nsh
@@ -1,121 +1,121 @@
-;Language: Hebrew (1037)
-;By Yaron Shahrabani
-
-!insertmacro LANGFILE "Hebrew" "Hebrew"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "áøåëéí äáàéí ìàùó ääú÷ðä ùì $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "àùó æä éðçä àúëí áîäìê ääú÷ðä ùì $(^NameDA).$\r$\n$\r$\nîåîìõ ìñâåø ëì úåëðéú àçøú ìôðé äúçìú ääú÷ðä. ôòåìä æå úàôùø ìàùó ìòãëï ÷áöé îòøëú ììà àéúçåì äîçùá.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "áøåëéí äáàéí ìàùó ääñøä ùì $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "àùó æä éðçä àúëí áîäìê ääñøä ùì $(^NameDA).$\r$\n$\r$\nîåîìõ ìñâåø ëì úåëðéú àçøú ìôðé äúçìú ääñøä. ôòåìä æå úàôùø ìàùó ìòãëï ÷áöé îòøëú ììà àéúçåì äîçùá.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "äñëí øéùåé"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ðà òééï áúðàé äñëí äøéùåé ìôðé äú÷ðú $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "àí àúä î÷áì àú úðàé ääñëí, ìçõ òì 'àðé îñëéí' ëãé ìäîùéê. àí ìà úñëéí ìúðàé ääñëí ìà úåëì ìäú÷éï àú $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "àí àúä î÷áì àú úðàé ääñëí, ñîï àú úéáú äáçéøä ùìäìï. òìééê ì÷áì àú úðàé ääñëí áëãé ìäú÷éï àú $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "àí àúä î÷áì àú úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. òìééê ì÷áì àú ääñëí ëãé ìäú÷éï àú $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "äñëí øéùåé"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ðà òééï áúðàé äñëí äøéùåé ìôðé äñøú $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "àí àúä î÷áì àú úðàé ääñëí, ìçõ òì 'àðé îñëéí' ëãé ìäîùéê. àí ìà ú÷áì àú úðàé ääñëí ìà úåëì ìäñéø àú $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "àí àúä î÷áì àú úðàé ääñëí, ñîï àú úéáú äáçéøä ùìäìï. òìééê ì÷áì àú úðàé ääñëí ëãé ìäñéø àú $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "àí àúä î÷áì àú úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. òìééê ì÷áì àú ääñëí ëãé ìäñéø àú $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ëãé ìöôåú áùàø äñëí äøéùåé ìçõ òì Page Down."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "áçø øëéáéí"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "áçø àéìå øëéáéí ùì $(^NameDA) áøöåðê ìäú÷éï."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "úéàåø"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "áçø øëéáéí"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "áçø àéìå úëåðåú ùì $(^NameDA) áøöåðê ìäñéø."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äòáø àú äòëáø îòì øëéá ëìùäå áëãé ìöôåú áúéàåøå."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äòáø àú äòëáø îòì øëéá ëìùäå áëãé ìöôåú áúéàåøå."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "áçø îé÷åí ìäú÷ðä"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "áçø àú äúé÷ééä áä àúä îòåðééï ìäú÷éï àú $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "áçø îé÷åí ìäñøä"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "áçø àú äúé÷ééä îîðä àúä îòåðééï ìäñéø àú $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "îú÷éï"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "àðà äîúï áæîï ù-$(^NameDA) îåú÷ï."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "ääú÷ðä äåùìîä"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ääú÷ðä äåùìîä áîìåàä."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "ääú÷ðä áåèìä"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ääú÷ðä ìà äåùìîä äîìåàä."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "îñéø"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "àðà äîúï áæîï ù-$(^NameDA) îåñø îäîçùá."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ääñøä äåùìîä"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ääñøä äåùìîä áîìåàä."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ääñøä áåèìä"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ääñøä ìà äåùìîä áîìåàä."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "îùìéí àú àùó ääú÷ðä ùì $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) äåú÷ï áäöìçä.$\r$\n$\r$\nìçõ òì ñéåí ëãé ìñâåø àú äàùó."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "òìééê ìàúçì àú äîçùá ëãé ìñééí àú äú÷ðú $(^NameDA). äàí áøöåðê ìàúçì ëòú?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "îùìéí àú àùó ääñøä ùì $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) äåñø áäöìçä.$\r$\n$\r$\nìçõ òì ñéåí ëãé ìñâåø àú äàùó."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "òìééê ìàúçì àú äîçùá ëãé ìñééí àú äñøú $(^NameDA). äàí áøöåðê ìàúçì ëòú?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "àúçì ëòú"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "áøöåðé ìàúçì éãðéú îàåçø éåúø"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&äøõ àú $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&äöâ îñîê '÷øà àåúé'"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&ñééí"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "áçø úé÷ééä áúôøéè ääúçìä"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "áçø áúé÷ééú úôøéè ääúçìä áä éååöøå ÷éöåøé äãøê ùì äúåëðéú."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "áçø áúé÷ééä îúôøéè ääúçìä áä áøöåðê ìéöåø àú ÷éöåøé äãøê òáåø äúåëðéú. áàôùøåúê âí ìä÷ìéã àú ùí äúé÷ééä ëãé ìéöåø úé÷ééä çãùä."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "àì úéöåø ÷éöåøé ãøê"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "äñø àú $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "äñø àú $(^NameDA) îäîçùá."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "äàí àúä áèåç ùáøöåðê ìöàú îäú÷ðú $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "äàí àúä áèåç ùáøöåðê ìöàú îäñøú $(^Name)?"
-!endif
+;Language: Hebrew (1037)
+;By Yaron Shahrabani
+
+!insertmacro LANGFILE "Hebrew" "Hebrew"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "áøåëéí äáàéí ìàùó ääú÷ðä ùì $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "àùó æä éðçä àúëí áîäìê ääú÷ðä ùì $(^NameDA).$\r$\n$\r$\nîåîìõ ìñâåø ëì úåëðéú àçøú ìôðé äúçìú ääú÷ðä. ôòåìä æå úàôùø ìàùó ìòãëï ÷áöé îòøëú ììà àéúçåì äîçùá.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "áøåëéí äáàéí ìàùó ääñøä ùì $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "àùó æä éðçä àúëí áîäìê ääñøä ùì $(^NameDA).$\r$\n$\r$\nîåîìõ ìñâåø ëì úåëðéú àçøú ìôðé äúçìú ääñøä. ôòåìä æå úàôùø ìàùó ìòãëï ÷áöé îòøëú ììà àéúçåì äîçùá.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "äñëí øéùåé"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ðà òééï áúðàé äñëí äøéùåé ìôðé äú÷ðú $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "àí àúä î÷áì àú úðàé ääñëí, ìçõ òì 'àðé îñëéí' ëãé ìäîùéê. àí ìà úñëéí ìúðàé ääñëí ìà úåëì ìäú÷éï àú $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "àí àúä î÷áì àú úðàé ääñëí, ñîï àú úéáú äáçéøä ùìäìï. òìééê ì÷áì àú úðàé ääñëí áëãé ìäú÷éï àú $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "àí àúä î÷áì àú úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. òìééê ì÷áì àú ääñëí ëãé ìäú÷éï àú $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "äñëí øéùåé"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ðà òééï áúðàé äñëí äøéùåé ìôðé äñøú $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "àí àúä î÷áì àú úðàé ääñëí, ìçõ òì 'àðé îñëéí' ëãé ìäîùéê. àí ìà ú÷áì àú úðàé ääñëí ìà úåëì ìäñéø àú $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "àí àúä î÷áì àú úðàé ääñëí, ñîï àú úéáú äáçéøä ùìäìï. òìééê ì÷áì àú úðàé ääñëí ëãé ìäñéø àú $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "àí àúä î÷áì àú úðàé ääñëí, áçø áàôùøåú äøàùåðä ùìäìï. òìééê ì÷áì àú ääñëí ëãé ìäñéø àú $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "ëãé ìöôåú áùàø äñëí äøéùåé ìçõ òì Page Down."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "áçø øëéáéí"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "áçø àéìå øëéáéí ùì $(^NameDA) áøöåðê ìäú÷éï."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "úéàåø"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "áçø øëéáéí"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "áçø àéìå úëåðåú ùì $(^NameDA) áøöåðê ìäñéø."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äòáø àú äòëáø îòì øëéá ëìùäå áëãé ìöôåú áúéàåøå."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "äòáø àú äòëáø îòì øëéá ëìùäå áëãé ìöôåú áúéàåøå."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "áçø îé÷åí ìäú÷ðä"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "áçø àú äúé÷ééä áä àúä îòåðééï ìäú÷éï àú $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "áçø îé÷åí ìäñøä"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "áçø àú äúé÷ééä îîðä àúä îòåðééï ìäñéø àú $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "îú÷éï"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "àðà äîúï áæîï ù-$(^NameDA) îåú÷ï."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "ääú÷ðä äåùìîä"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ääú÷ðä äåùìîä áîìåàä."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "ääú÷ðä áåèìä"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ääú÷ðä ìà äåùìîä äîìåàä."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "îñéø"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "àðà äîúï áæîï ù-$(^NameDA) îåñø îäîçùá."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ääñøä äåùìîä"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ääñøä äåùìîä áîìåàä."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ääñøä áåèìä"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ääñøä ìà äåùìîä áîìåàä."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "îùìéí àú àùó ääú÷ðä ùì $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) äåú÷ï áäöìçä.$\r$\n$\r$\nìçõ òì ñéåí ëãé ìñâåø àú äàùó."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "òìééê ìàúçì àú äîçùá ëãé ìñééí àú äú÷ðú $(^NameDA). äàí áøöåðê ìàúçì ëòú?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "îùìéí àú àùó ääñøä ùì $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) äåñø áäöìçä.$\r$\n$\r$\nìçõ òì ñéåí ëãé ìñâåø àú äàùó."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "òìééê ìàúçì àú äîçùá ëãé ìñééí àú äñøú $(^NameDA). äàí áøöåðê ìàúçì ëòú?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "àúçì ëòú"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "áøöåðé ìàúçì éãðéú îàåçø éåúø"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&äøõ àú $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&äöâ îñîê '÷øà àåúé'"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&ñééí"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "áçø úé÷ééä áúôøéè ääúçìä"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "áçø áúé÷ééú úôøéè ääúçìä áä éååöøå ÷éöåøé äãøê ùì äúåëðéú."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "áçø áúé÷ééä îúôøéè ääúçìä áä áøöåðê ìéöåø àú ÷éöåøé äãøê òáåø äúåëðéú. áàôùøåúê âí ìä÷ìéã àú ùí äúé÷ééä ëãé ìéöåø úé÷ééä çãùä."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "àì úéöåø ÷éöåøé ãøê"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "äñø àú $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "äñø àú $(^NameDA) îäîçùá."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "äàí àúä áèåç ùáøöåðê ìöàú îäú÷ðú $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "äàí àúä áèåç ùáøöåðê ìöàú îäñøú $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Hungarian.nlf b/Contrib/Language files/Hungarian.nlf
index aeb0313..4a411d2 100755
--- a/Contrib/Language files/Hungarian.nlf
+++ b/Contrib/Language files/Hungarian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1038
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Soft-Trans Bt. (V2)
-# Translation by Orfanik Kft. (V3-V6)
-# ^Branding
-Nullsoft Telepítõrendszer %s
-# ^SetupCaption
-$(^Name) Telepítõ
-# ^UninstallCaption
-$(^Name) Eltávolító
-# ^LicenseSubCaption
-: Licencszerzõdés
-# ^ComponentsSubCaption
-: Telepítési lehetõségek
-# ^DirSubCaption
-: Célmappa
-# ^InstallingSubCaption
-: Fájlok telepítése
-# ^CompletedSubCaption
-: Kész
-# ^UnComponentsSubCaption
-: Eltávolítási lehetõségek
-# ^UnDirSubCaption
-: Eltávolítás mappája
-# ^ConfirmSubCaption
-: Megerõsítés
-# ^UninstallingSubCaption
-: Fájlok eltávolítása
-# ^UnCompletedSubCaption
-: Kész
-# ^BackBtn
-< &Vissza
-# ^NextBtn
-&Tovább >
-# ^AgreeBtn
-&Elfogadom
-# ^AcceptBtn
-&Elfogadom a Licencszerzõdés feltételeit
-# ^DontAcceptBtn
-&Nem fogadom el a Licencszerzõdés feltételeit
-# ^InstallBtn
-&Telepítés
-# ^UninstallBtn
-&Eltávolítás
-# ^CancelBtn
-&Mégse
-# ^CloseBtn
-&Bezárás
-# ^BrowseBtn
-&Tallózás...
-# ^ShowDetailsBtn
-&Részletek
-# ^ClickNext
-Kattintson a Tovább-ra a folytatáshoz.
-# ^ClickInstall
-Kattintson a Telepítésre a telepítéshez.
-# ^ClickUninstall
-Kattintson az Eltávolításra az eltávolításhoz.
-# ^Name
-Név
-# ^Completed
-Kész
-# ^LicenseText
-A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja.
-# ^LicenseTextCB
-A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, jelölje be a Jelölõnégyzeten. $_CLICK
-# ^LicenseTextRB
-A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, válassza az elsõ lehetõséget. $_CLICK
-# ^UnLicenseText
-A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja.
-# ^UnLicenseTextCB
-A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, jelölje be a Jelölõnégyzeten. $_CLICK
-# ^UnLicenseTextRB
-A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, válassza az elsõ lehetõséget. $_CLICK
-# ^Custom
-Egyéni
-# ^ComponentsText
-Jelölje be azokat az összetevõket amelyeket telepíteni kíván és törölje a jelölést a nem kívánt összetevõknél. $_CLICK
-# ^ComponentsSubText1
-Válassza ki a telepítés típusát:
-# ^ComponentsSubText2_NoInstTypes
-Válassza ki a telepítendõ összetevõket:
-# ^ComponentsSubText2
-vagy, jelölje ki a választható összetevõk közül a telepíteni kívánta(ka)t:
-# ^UnComponentsText
-Jelölje be azokat az összetevõket amelyeket el kíván távolítani és törölje a jelölést az eltávolítani nem kívánt összetevõknél. $_CLICK
-# ^UnComponentsSubText1
-Válassza ki az Eltávolítás típusát:
-# ^UnComponentsSubText2_NoInstTypes
-Válassza ki az eltávolítandó összetevõket:
-# ^UnComponentsSubText2
-vagy, jelölje ki a választható összetevõk közül az eltávolítani kívánta(ka)t:
-# ^DirText
-A $(^NameDA) a következõ mappába kerül. Másik mappa választásához kattintson a Tallózás gombra. $_CLICK
-# ^DirSubText
-Telepítés helye
-# ^DirBrowseText
-A(z) $(^NameDA) telepítési helyének kiválasztása:
-# ^UnDirText
-A(z) $(^NameDA) eltávolítása a következõ mappából. Másik mappa választásához kattintson a Tallózás gombra. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Válassza ki, hogy a $(^NameDA) melyik mappából kerüljön eltávolításra:
-# ^SpaceAvailable
-"Szabad terület: "
-# ^SpaceRequired
-"Helyigény: "
-# ^UninstallingText
-A(z) $(^NameDA) eltávolítása következik a számítógéprõl. $_CLICK
-# ^UninstallingSubText
-Eltávolítás helye:
-# ^FileError
-Hiba történt a fájl írásra történõ megnyitásakor: \r\n\t"$0"\r\nA Mégse gomb megnyomásával megszakíthatja a telepítést,\r\naz Ismét gombbal megismételheti a fájl írását,\r\na Kihagyás gombbal kihagyhatja ezt a fájlt.
-# ^FileError_NoIgnore
-Hiba történt a fájl írásra történõ megnyitásakor: \r\n\t"$0"\r\nAz Újra gomb megnyomásával megismételheti a mûveletet, vagy \r\na Mégse gombbal megszakíthatja a telepítést.
-# ^CantWrite
-"Nem írható: "
-# ^CopyFailed
-A másolás megszakadt
-# ^CopyTo
-"Másolás ide: "
-# ^Registering
-"Bejegyzés: "
-# ^Unregistering
-"Eltávolítás: "
-# ^SymbolNotFound
-"A következõ szimbólum nem található: "
-# ^CouldNotLoad
-"Nem tölthetõ be: "
-# ^CreateFolder
-"Mappa létrehozás: "
-# ^CreateShortcut
-"Parancsikon létrehozása: "
-# ^CreatedUninstaller
-"Létrehozott eltávolító: "
-# ^Delete
-"Törölt fájl: "
-# ^DeleteOnReboot
-"Rendszerindításkor törlendõ: "
-# ^ErrorCreatingShortcut
-"Hiba a parancsikon létrehozásakor: "
-# ^ErrorCreating
-"Hiba a létrehozáskor: "
-# ^ErrorDecompressing
-Hiba az adatok kibontásakor! Megsérült a Telepítõ?
-# ^ErrorRegistering
-Hiba a DLL regisztrálásakor
-# ^ExecShell
-"Végrehajtás a hozzárendeléseken keresztül: "
-# ^Exec
-"Végrehajtás: "
-# ^Extract
-"Kibontás: "
-# ^ErrorWriting
-"Kibontás: Hiba a fájl írásakor "
-# ^InvalidOpcode
-Sérült a telepítõ: hibás utasítás
-# ^NoOLE
-"Nincs OLE: "
-# ^OutputFolder
-"Kimeneti mappa: "
-# ^RemoveFolder
-"Mappa eltávolítása: "
-# ^RenameOnReboot
-"Átnevezés rendszerindításkor: "
-# ^Rename
-"Átnevezés: "
-# ^Skipped
-"Kihagyott: "
-# ^CopyDetails
-Adatok vágólapra másolása
-# ^LogInstall
-Telepítõ ellenõrzõlista
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1038
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Soft-Trans Bt. (V2)
+# Translation by Orfanik Kft. (V3-V6)
+# ^Branding
+Nullsoft Telepítõrendszer %s
+# ^SetupCaption
+$(^Name) Telepítõ
+# ^UninstallCaption
+$(^Name) Eltávolító
+# ^LicenseSubCaption
+: Licencszerzõdés
+# ^ComponentsSubCaption
+: Telepítési lehetõségek
+# ^DirSubCaption
+: Célmappa
+# ^InstallingSubCaption
+: Fájlok telepítése
+# ^CompletedSubCaption
+: Kész
+# ^UnComponentsSubCaption
+: Eltávolítási lehetõségek
+# ^UnDirSubCaption
+: Eltávolítás mappája
+# ^ConfirmSubCaption
+: Megerõsítés
+# ^UninstallingSubCaption
+: Fájlok eltávolítása
+# ^UnCompletedSubCaption
+: Kész
+# ^BackBtn
+< &Vissza
+# ^NextBtn
+&Tovább >
+# ^AgreeBtn
+&Elfogadom
+# ^AcceptBtn
+&Elfogadom a Licencszerzõdés feltételeit
+# ^DontAcceptBtn
+&Nem fogadom el a Licencszerzõdés feltételeit
+# ^InstallBtn
+&Telepítés
+# ^UninstallBtn
+&Eltávolítás
+# ^CancelBtn
+&Mégse
+# ^CloseBtn
+&Bezárás
+# ^BrowseBtn
+&Tallózás...
+# ^ShowDetailsBtn
+&Részletek
+# ^ClickNext
+Kattintson a Tovább-ra a folytatáshoz.
+# ^ClickInstall
+Kattintson a Telepítésre a telepítéshez.
+# ^ClickUninstall
+Kattintson az Eltávolításra az eltávolításhoz.
+# ^Name
+Név
+# ^Completed
+Kész
+# ^LicenseText
+A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja.
+# ^LicenseTextCB
+A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, jelölje be a Jelölõnégyzeten. $_CLICK
+# ^LicenseTextRB
+A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, válassza az elsõ lehetõséget. $_CLICK
+# ^UnLicenseText
+A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja.
+# ^UnLicenseTextCB
+A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, jelölje be a Jelölõnégyzeten. $_CLICK
+# ^UnLicenseTextRB
+A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit. Ha elfogadja a szerzõdés valamennyi feltételét, válassza az elsõ lehetõséget. $_CLICK
+# ^Custom
+Egyéni
+# ^ComponentsText
+Jelölje be azokat az összetevõket amelyeket telepíteni kíván és törölje a jelölést a nem kívánt összetevõknél. $_CLICK
+# ^ComponentsSubText1
+Válassza ki a telepítés típusát:
+# ^ComponentsSubText2_NoInstTypes
+Válassza ki a telepítendõ összetevõket:
+# ^ComponentsSubText2
+vagy, jelölje ki a választható összetevõk közül a telepíteni kívánta(ka)t:
+# ^UnComponentsText
+Jelölje be azokat az összetevõket amelyeket el kíván távolítani és törölje a jelölést az eltávolítani nem kívánt összetevõknél. $_CLICK
+# ^UnComponentsSubText1
+Válassza ki az Eltávolítás típusát:
+# ^UnComponentsSubText2_NoInstTypes
+Válassza ki az eltávolítandó összetevõket:
+# ^UnComponentsSubText2
+vagy, jelölje ki a választható összetevõk közül az eltávolítani kívánta(ka)t:
+# ^DirText
+A $(^NameDA) a következõ mappába kerül. Másik mappa választásához kattintson a Tallózás gombra. $_CLICK
+# ^DirSubText
+Telepítés helye
+# ^DirBrowseText
+A(z) $(^NameDA) telepítési helyének kiválasztása:
+# ^UnDirText
+A(z) $(^NameDA) eltávolítása a következõ mappából. Másik mappa választásához kattintson a Tallózás gombra. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Válassza ki, hogy a $(^NameDA) melyik mappából kerüljön eltávolításra:
+# ^SpaceAvailable
+"Szabad terület: "
+# ^SpaceRequired
+"Helyigény: "
+# ^UninstallingText
+A(z) $(^NameDA) eltávolítása következik a számítógéprõl. $_CLICK
+# ^UninstallingSubText
+Eltávolítás helye:
+# ^FileError
+Hiba történt a fájl írásra történõ megnyitásakor: \r\n\t"$0"\r\nA Mégse gomb megnyomásával megszakíthatja a telepítést,\r\naz Ismét gombbal megismételheti a fájl írását,\r\na Kihagyás gombbal kihagyhatja ezt a fájlt.
+# ^FileError_NoIgnore
+Hiba történt a fájl írásra történõ megnyitásakor: \r\n\t"$0"\r\nAz Újra gomb megnyomásával megismételheti a mûveletet, vagy \r\na Mégse gombbal megszakíthatja a telepítést.
+# ^CantWrite
+"Nem írható: "
+# ^CopyFailed
+A másolás megszakadt
+# ^CopyTo
+"Másolás ide: "
+# ^Registering
+"Bejegyzés: "
+# ^Unregistering
+"Eltávolítás: "
+# ^SymbolNotFound
+"A következõ szimbólum nem található: "
+# ^CouldNotLoad
+"Nem tölthetõ be: "
+# ^CreateFolder
+"Mappa létrehozás: "
+# ^CreateShortcut
+"Parancsikon létrehozása: "
+# ^CreatedUninstaller
+"Létrehozott eltávolító: "
+# ^Delete
+"Törölt fájl: "
+# ^DeleteOnReboot
+"Rendszerindításkor törlendõ: "
+# ^ErrorCreatingShortcut
+"Hiba a parancsikon létrehozásakor: "
+# ^ErrorCreating
+"Hiba a létrehozáskor: "
+# ^ErrorDecompressing
+Hiba az adatok kibontásakor! Megsérült a Telepítõ?
+# ^ErrorRegistering
+Hiba a DLL regisztrálásakor
+# ^ExecShell
+"Végrehajtás a hozzárendeléseken keresztül: "
+# ^Exec
+"Végrehajtás: "
+# ^Extract
+"Kibontás: "
+# ^ErrorWriting
+"Kibontás: Hiba a fájl írásakor "
+# ^InvalidOpcode
+Sérült a telepítõ: hibás utasítás
+# ^NoOLE
+"Nincs OLE: "
+# ^OutputFolder
+"Kimeneti mappa: "
+# ^RemoveFolder
+"Mappa eltávolítása: "
+# ^RenameOnReboot
+"Átnevezés rendszerindításkor: "
+# ^Rename
+"Átnevezés: "
+# ^Skipped
+"Kihagyott: "
+# ^CopyDetails
+Adatok vágólapra másolása
+# ^LogInstall
+Telepítõ ellenõrzõlista
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Hungarian.nsh b/Contrib/Language files/Hungarian.nsh
index 2d473bf..d1181bb 100755
--- a/Contrib/Language files/Hungarian.nsh
+++ b/Contrib/Language files/Hungarian.nsh
@@ -1,122 +1,122 @@
-;Language: Hungarian (1038)
-;Translation by Jozsef Tamas Herczeg ( - 1.61-ig),
-; Lajos Molnar (Orfanik) <orfanik@axelero.hu> ( 1.62 - tõl)
-
-!insertmacro LANGFILE "Hungarian" "Magyar"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Üdvözli a(z) $(^NameDA) Telepítõ Varázsló"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "A(z) $(^NameDA) telepítése következik a számítógépre.$\r$\n$\r$\nJavasoljuk, hogy indítás elõtt zárja be a futó alkalmazásokat. Így a telepítõ a rendszer újraindítása nélkül tudja frissíteni a szükséges rendszerfájlokat.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Üdvözli a(z) $(^NameDA) Eltávolító Varázsló"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ez a varázsló segíti a(z) $(^NameDA) eltávolításában.$\r$\n$\r$\nMielõtt elkezdi az eltávilítást gyõzõdjön meg arról, hogy a(z) $(^NameDA) nem fut.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licencszerzõdés"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja. El kell fogadnia a(z) $(^NameDA) telepítéséhez."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Amennyiben elfogadja a feltételeket, jelölje be a jelölõnényzeten. A(z) $(^NameDA) telepítéséhez el kell fogadnia a feltételeket. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Amennyiben elfogadja a feltételeket, válassza az elsõ opciót. A(z) $(^NameDA) telepítéséhez el kell fogadnia a feltételeket. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licencszerzõdés"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja. El kell fogadnia a(z) $(^NameDA) eltávolításához."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Amennyiben elfogadja a feltételeket, jelölje be a jelölõnényzeten. A(z) $(^NameDA) eltávolításához el kell fogadnia a feltételeket. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Amennyiben elfogadja a feltételeket, válassza az elsõ opciót. A(z) $(^NameDA) eltávolításához el kell fogadnia a feltételeket. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "A PageDown gombbal olvashatja el a szerzõdés folytatását."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Összetevõk kiválasztása"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Válassza ki, hogy a(z) $(^NameDA) mely funkcióit kívánja telepíteni."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Leírás"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Összetevõk kiválasztása"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Válassza ki, hogy a(z) $(^NameDA) mely funkcióit kívánja eltávolítani."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Vigye rá az egeret az összetevõre, hogy megtekinthesse a leírását."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Vigye rá az egeret az összetevõre, hogy megtekinthesse a leírását."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Telepítési hely kiválasztása"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Válassza ki a(z) $(^NameDA) telepítésének mappáját."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Telepítési hely kiválasztása"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Válassza ki a(z) $(^NameDA) telepítésének mappáját."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Telepítési folyamat"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Kis türelmet a(z) $(^NameDA) telepítéséig."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Telepítés befejezõdött"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A telepítés sikeresen befejezõdött."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "A telepítés megszakadt"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A telepítés sikertelen volt."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Eltávolítási folyamat"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Kis türelmet a(z) $(^NameDA) eltávolításáig."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Az eltávolítás befejezõdött"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Az eltávolítás sikeresen befejezõdött."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Az eltávolítás megszakadt"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Az eltávolítás sikertelen volt."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "A(z) $(^NameDA) telepítése megtörtént."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "A(z) $(^NameDA) telepítése megtörtént.$\r$\n$\r$\nA Befejezés gomb megnyomásával zárja be a varázslót."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "A(z) $(^NameDA) telepítésének befejezéséhez újra kell indítani a rendszert. Most akarja újraindítani?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "A(z) $(^NameDA) eltávolítás varázslójának befejezése."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "A(z) $(^NameDA) eltávolítása sikeresen befejezõdött.$\r$\n$\r$\nA Finish-re kattintva bezárul ez a varázsló."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "A számítógépet újra kell indítani, hogy a(z) $(^NameDA) eltávolítása teljes legyen. Akarja most újraindítani a rendszert?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Most indítom újra"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Késõbb fogom újraindítani"
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) futtatása"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "OlvassEl fájl megjelenítése"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Befejezés"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Start menü mappa kijelölése"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Start menü mappa kijelölése a program parancsikonjaihoz."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Jelöljön ki egy mappát a Start menüben, melybe a program parancsikonjait fogja elhelyezni. Beírhatja új mappa nevét is."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nincs parancsikon elhelyezés"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "A(z) $(^NameDA) Eltávolítása."
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "A(z) $(^NameDA) eltávolítása következik a számítógéprõl."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Biztos, hogy ki akar lépni a(z) $(^Name) Telepítõbõl?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Biztos, hogy ki akar lépni a(z) $(^Name) Eltávolítóból?"
-!endif
+;Language: Hungarian (1038)
+;Translation by Jozsef Tamas Herczeg ( - 1.61-ig),
+; Lajos Molnar (Orfanik) <orfanik@axelero.hu> ( 1.62 - tõl)
+
+!insertmacro LANGFILE "Hungarian" "Magyar"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Üdvözli a(z) $(^NameDA) Telepítõ Varázsló"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "A(z) $(^NameDA) telepítése következik a számítógépre.$\r$\n$\r$\nJavasoljuk, hogy indítás elõtt zárja be a futó alkalmazásokat. Így a telepítõ a rendszer újraindítása nélkül tudja frissíteni a szükséges rendszerfájlokat.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Üdvözli a(z) $(^NameDA) Eltávolító Varázsló"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ez a varázsló segíti a(z) $(^NameDA) eltávolításában.$\r$\n$\r$\nMielõtt elkezdi az eltávilítást gyõzõdjön meg arról, hogy a(z) $(^NameDA) nem fut.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licencszerzõdés"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "A(z) $(^NameDA) telepítése elõtt tekintse át a szerzõdés feltételeit."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja. El kell fogadnia a(z) $(^NameDA) telepítéséhez."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Amennyiben elfogadja a feltételeket, jelölje be a jelölõnényzeten. A(z) $(^NameDA) telepítéséhez el kell fogadnia a feltételeket. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Amennyiben elfogadja a feltételeket, válassza az elsõ opciót. A(z) $(^NameDA) telepítéséhez el kell fogadnia a feltételeket. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licencszerzõdés"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "A(z) $(^NameDA) eltávolítása elõtt tekintse át a szerzõdés feltételeit."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ha elfogadja a szerzõdés valamennyi feltételét, az Elfogadom gombbal folytathatja. El kell fogadnia a(z) $(^NameDA) eltávolításához."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Amennyiben elfogadja a feltételeket, jelölje be a jelölõnényzeten. A(z) $(^NameDA) eltávolításához el kell fogadnia a feltételeket. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Amennyiben elfogadja a feltételeket, válassza az elsõ opciót. A(z) $(^NameDA) eltávolításához el kell fogadnia a feltételeket. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "A PageDown gombbal olvashatja el a szerzõdés folytatását."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Összetevõk kiválasztása"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Válassza ki, hogy a(z) $(^NameDA) mely funkcióit kívánja telepíteni."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Leírás"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Összetevõk kiválasztása"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Válassza ki, hogy a(z) $(^NameDA) mely funkcióit kívánja eltávolítani."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Vigye rá az egeret az összetevõre, hogy megtekinthesse a leírását."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Vigye rá az egeret az összetevõre, hogy megtekinthesse a leírását."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Telepítési hely kiválasztása"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Válassza ki a(z) $(^NameDA) telepítésének mappáját."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Telepítési hely kiválasztása"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Válassza ki a(z) $(^NameDA) telepítésének mappáját."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Telepítési folyamat"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Kis türelmet a(z) $(^NameDA) telepítéséig."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Telepítés befejezõdött"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A telepítés sikeresen befejezõdött."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "A telepítés megszakadt"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A telepítés sikertelen volt."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Eltávolítási folyamat"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Kis türelmet a(z) $(^NameDA) eltávolításáig."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Az eltávolítás befejezõdött"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Az eltávolítás sikeresen befejezõdött."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Az eltávolítás megszakadt"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Az eltávolítás sikertelen volt."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "A(z) $(^NameDA) telepítése megtörtént."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "A(z) $(^NameDA) telepítése megtörtént.$\r$\n$\r$\nA Befejezés gomb megnyomásával zárja be a varázslót."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "A(z) $(^NameDA) telepítésének befejezéséhez újra kell indítani a rendszert. Most akarja újraindítani?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "A(z) $(^NameDA) eltávolítás varázslójának befejezése."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "A(z) $(^NameDA) eltávolítása sikeresen befejezõdött.$\r$\n$\r$\nA Finish-re kattintva bezárul ez a varázsló."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "A számítógépet újra kell indítani, hogy a(z) $(^NameDA) eltávolítása teljes legyen. Akarja most újraindítani a rendszert?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Most indítom újra"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Késõbb fogom újraindítani"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) futtatása"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "OlvassEl fájl megjelenítése"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Befejezés"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Start menü mappa kijelölése"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Start menü mappa kijelölése a program parancsikonjaihoz."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Jelöljön ki egy mappát a Start menüben, melybe a program parancsikonjait fogja elhelyezni. Beírhatja új mappa nevét is."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nincs parancsikon elhelyezés"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "A(z) $(^NameDA) Eltávolítása."
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "A(z) $(^NameDA) eltávolítása következik a számítógéprõl."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Biztos, hogy ki akar lépni a(z) $(^Name) Telepítõbõl?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Biztos, hogy ki akar lépni a(z) $(^Name) Eltávolítóból?"
+!endif
diff --git a/Contrib/Language files/Icelandic.nlf b/Contrib/Language files/Icelandic.nlf
index 473e51b..6375697 100755
--- a/Contrib/Language files/Icelandic.nlf
+++ b/Contrib/Language files/Icelandic.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-15
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Gretar Orri Kristinsson
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Uppsetning
-# ^UninstallCaption
-$(^Name) Fjarlæging
-# ^LicenseSubCaption
-: Notandaleyfissamningur
-# ^ComponentsSubCaption
-: Uppsetningarvalmöguleikar
-# ^DirSubCaption
-: Uppsetningarskráarsafn
-# ^InstallingSubCaption
-: Set upp
-# ^CompletedSubCaption
-: Lokið
-# ^UnComponentsSubCaption
-: Fjarlægingarvalmöguleikar
-# ^UnDirSubCaption
-: Fjarlægingarskráarsafn
-# ^ConfirmSubCaption
-: Staðfesting
-# ^UninstallingSubCaption
-: Fjarlægi
-# ^UnCompletedSubCaption
-: Lokið
-# ^BackBtn
-< &Til baka
-# ^NextBtn
-&Áfram >
-# ^AgreeBtn
-Ég &Samþykki
-# ^AcceptBtn
-Ég &samþykki skilmála leyfissamningsins
-# ^DontAcceptBtn
-Ég samþykki &ekki skilmála leyfissamningsins
-# ^InstallBtn
-&Setja upp
-# ^UninstallBtn
-&Fjarlægja
-# ^CancelBtn
-Hætta við
-# ^CloseBtn
-&Loka
-# ^BrowseBtn
-&Vafra...
-# ^ShowDetailsBtn
-Sýna &upplýsingar
-# ^ClickNext
-Smelltu á 'Áfram' til að halda áfram.
-# ^ClickInstall
-Smelltu á 'Setja upp' til þess að hefja uppsetninguna.
-# ^ClickUninstall
-Smelltu á 'Fjarlægja' til að hefja fjarlægingar ferlið.
-# ^Name
-Nafn
-# ^Completed
-Lokið
-# ^LicenseText
-Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki'.
-# ^LicenseTextCB
-Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. $_CLICK
-# ^LicenseTextRB
-Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. $_CLICK
-# ^UnLicenseText
-Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki'.
-# ^UnLicenseTextCB
-Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. $_CLICK
-# ^UnLicenseTextRB
-Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. $_CLICK
-# ^Custom
-Sjálfval
-# ^ComponentsText
-Hakaðu við þá íhluti sem þú vilt setja upp og taktu hakið af þeim íhlutum sem þú vilt ekki setja upp. $_CLICK
-# ^ComponentsSubText1
-Veldu tegund uppsetningar:
-# ^ComponentsSubText2_NoInstTypes
-Veldu þá íhluti sem á að setja upp:
-# ^ComponentsSubText2
-Eða, veldu valfrjálsa íhluti á að setja upp:
-# ^UnComponentsText
-Hakaðu við þá íhluti sem þú vilt fjarlægja og taktu hakið af þeim íhlutum sem þú vilt ekki fjarlægja. $_CLICK
-# ^UnComponentsSubText1
-Veldu tegund fjarlægingar:
-# ^UnComponentsSubText2_NoInstTypes
-Veldu íhluti sem á að fjarlægja:
-# ^UnComponentsSubText2
-Eða, veldu valfrjálsa íhluti sem á að fjarlægja:
-# ^DirText
-Uppsetningin mun setja $(^NameDA) upp í eftirfarandi skráarsafn. Til að setja forritið upp í annað skráarsafn, smelltu á 'Vafra...' og veldu annað skráarsafn. $_CLICK
-# ^DirSubText
-Uppsetningarskráarsafn
-# ^DirBrowseText
-Veldu það skráarsafn sem þú vilt setja $(^NameDA) upp í:
-# ^UnDirText
-Uppsetningin mun fjarlægja $(^NameDA) úr eftirfarandi skráarsafni. Til að fjarlægja forritið úr öðru skráarsafni, smelltu á 'Vafra...' og veldu annað skráarsafn. $_CLICK
-# ^UnDirSubText
-"Fjarlægingarskráarsafn"
-# ^UnDirBrowseText
-Veldu það skráarsafn sem þú vilt fjarlægja $(^NameDA) úr:
-# ^SpaceAvailable
-"Tiltækt rými: "
-# ^SpaceRequired
-"Nauðsynlegt rými: "
-# ^UninstallingText
-$(^NameDA) verður fjarlægt úr eftirfarandi skráarsafni. $_CLICK
-# ^UninstallingSubText
-Fjarlægi úr:
-# ^FileError
-Villa við að skrifa í skrá: \r\n\r\n$0\r\n\r\nSmelltu á 'Hætta við' til að stoppa uppsetninguna,\r\n'Reyna aftur' til að gera aðra tilraun, eða\r\n'Hunsa' til sleppa þessari skrá.
-# ^FileError_NoIgnore
-Villa við að skrifa í skrá: \r\n\r\n$0\r\n\r\nSmelltu á 'Reyna aftur' til að gera aðra tilraun, eða\r\n'Hætta við' til að stoppa uppsetninguna.
-# ^CantWrite
-"Get ei skrifað: "
-# ^CopyFailed
-Afritun mistókst
-# ^CopyTo
-"Afrita til "
-# ^Registering
-"Skrásetja: "
-# ^Unregistering
-"Afskrá: "
-# ^SymbolNotFound
-"Fann ekki tákn: "
-# ^CouldNotLoad
-"Gat ekki hlaðið inn: "
-# ^CreateFolder
-"Búa til skráarsafn: "
-# ^CreateShortcut
-"Búa til flýtileið: "
-# ^CreatedUninstaller
-"Bjó til fjarlægingarhjálp: "
-# ^Delete
-"Eyða skrá: "
-# ^DeleteOnReboot
-"Eyða við endurræsingu: "
-# ^ErrorCreatingShortcut
-"Villa við gerð flýtileiðar: "
-# ^ErrorCreating
-"Villa við gerð: "
-# ^ErrorDecompressing
-Villa við afþjöppun gagna! Biluð uppsetningarhjálp?
-# ^ErrorRegistering
-Villa við skrásetningu DLL
-# ^ExecShell
-"Keyrslugluggi: "
-# ^Exec
-"Keyra: "
-# ^Extract
-"Færa út: "
-# ^ErrorWriting
-"Færa út: villa við að skrifa í skrá "
-# ^InvalidOpcode
-Uppsetningarhjálp biluð: rangur stýrikóði
-# ^NoOLE
-"Engin OLE fyrir: "
-# ^OutputFolder
-"Útskráarsafn: "
-# ^RemoveFolder
-"Fjarlægja skráarsafn: "
-# ^RenameOnReboot
-"Endurskíra við endurræsingu: "
-# ^Rename
-"Endurskíra: "
-# ^Skipped
-"Sleppt: "
-# ^CopyDetails
-Afrita upplýsingar til skrifbrettis
-# ^LogInstall
-Skrá uppsetningarferli
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+15
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Gretar Orri Kristinsson
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Uppsetning
+# ^UninstallCaption
+$(^Name) Fjarlæging
+# ^LicenseSubCaption
+: Notandaleyfissamningur
+# ^ComponentsSubCaption
+: Uppsetningarvalmöguleikar
+# ^DirSubCaption
+: Uppsetningarskráarsafn
+# ^InstallingSubCaption
+: Set upp
+# ^CompletedSubCaption
+: Lokið
+# ^UnComponentsSubCaption
+: Fjarlægingarvalmöguleikar
+# ^UnDirSubCaption
+: Fjarlægingarskráarsafn
+# ^ConfirmSubCaption
+: Staðfesting
+# ^UninstallingSubCaption
+: Fjarlægi
+# ^UnCompletedSubCaption
+: Lokið
+# ^BackBtn
+< &Til baka
+# ^NextBtn
+&Áfram >
+# ^AgreeBtn
+Ég &Samþykki
+# ^AcceptBtn
+Ég &samþykki skilmála leyfissamningsins
+# ^DontAcceptBtn
+Ég samþykki &ekki skilmála leyfissamningsins
+# ^InstallBtn
+&Setja upp
+# ^UninstallBtn
+&Fjarlægja
+# ^CancelBtn
+Hætta við
+# ^CloseBtn
+&Loka
+# ^BrowseBtn
+&Vafra...
+# ^ShowDetailsBtn
+Sýna &upplýsingar
+# ^ClickNext
+Smelltu á 'Áfram' til að halda áfram.
+# ^ClickInstall
+Smelltu á 'Setja upp' til þess að hefja uppsetninguna.
+# ^ClickUninstall
+Smelltu á 'Fjarlægja' til að hefja fjarlægingar ferlið.
+# ^Name
+Nafn
+# ^Completed
+Lokið
+# ^LicenseText
+Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki'.
+# ^LicenseTextCB
+Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. $_CLICK
+# ^LicenseTextRB
+Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. $_CLICK
+# ^UnLicenseText
+Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki'.
+# ^UnLicenseTextCB
+Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. $_CLICK
+# ^UnLicenseTextRB
+Vinsamlegast skoðaðu notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst. Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. $_CLICK
+# ^Custom
+Sjálfval
+# ^ComponentsText
+Hakaðu við þá íhluti sem þú vilt setja upp og taktu hakið af þeim íhlutum sem þú vilt ekki setja upp. $_CLICK
+# ^ComponentsSubText1
+Veldu tegund uppsetningar:
+# ^ComponentsSubText2_NoInstTypes
+Veldu þá íhluti sem á að setja upp:
+# ^ComponentsSubText2
+Eða, veldu valfrjálsa íhluti á að setja upp:
+# ^UnComponentsText
+Hakaðu við þá íhluti sem þú vilt fjarlægja og taktu hakið af þeim íhlutum sem þú vilt ekki fjarlægja. $_CLICK
+# ^UnComponentsSubText1
+Veldu tegund fjarlægingar:
+# ^UnComponentsSubText2_NoInstTypes
+Veldu íhluti sem á að fjarlægja:
+# ^UnComponentsSubText2
+Eða, veldu valfrjálsa íhluti sem á að fjarlægja:
+# ^DirText
+Uppsetningin mun setja $(^NameDA) upp í eftirfarandi skráarsafn. Til að setja forritið upp í annað skráarsafn, smelltu á 'Vafra...' og veldu annað skráarsafn. $_CLICK
+# ^DirSubText
+Uppsetningarskráarsafn
+# ^DirBrowseText
+Veldu það skráarsafn sem þú vilt setja $(^NameDA) upp í:
+# ^UnDirText
+Uppsetningin mun fjarlægja $(^NameDA) úr eftirfarandi skráarsafni. Til að fjarlægja forritið úr öðru skráarsafni, smelltu á 'Vafra...' og veldu annað skráarsafn. $_CLICK
+# ^UnDirSubText
+"Fjarlægingarskráarsafn"
+# ^UnDirBrowseText
+Veldu það skráarsafn sem þú vilt fjarlægja $(^NameDA) úr:
+# ^SpaceAvailable
+"Tiltækt rými: "
+# ^SpaceRequired
+"Nauðsynlegt rými: "
+# ^UninstallingText
+$(^NameDA) verður fjarlægt úr eftirfarandi skráarsafni. $_CLICK
+# ^UninstallingSubText
+Fjarlægi úr:
+# ^FileError
+Villa við að skrifa í skrá: \r\n\r\n$0\r\n\r\nSmelltu á 'Hætta við' til að stoppa uppsetninguna,\r\n'Reyna aftur' til að gera aðra tilraun, eða\r\n'Hunsa' til sleppa þessari skrá.
+# ^FileError_NoIgnore
+Villa við að skrifa í skrá: \r\n\r\n$0\r\n\r\nSmelltu á 'Reyna aftur' til að gera aðra tilraun, eða\r\n'Hætta við' til að stoppa uppsetninguna.
+# ^CantWrite
+"Get ei skrifað: "
+# ^CopyFailed
+Afritun mistókst
+# ^CopyTo
+"Afrita til "
+# ^Registering
+"Skrásetja: "
+# ^Unregistering
+"Afskrá: "
+# ^SymbolNotFound
+"Fann ekki tákn: "
+# ^CouldNotLoad
+"Gat ekki hlaðið inn: "
+# ^CreateFolder
+"Búa til skráarsafn: "
+# ^CreateShortcut
+"Búa til flýtileið: "
+# ^CreatedUninstaller
+"Bjó til fjarlægingarhjálp: "
+# ^Delete
+"Eyða skrá: "
+# ^DeleteOnReboot
+"Eyða við endurræsingu: "
+# ^ErrorCreatingShortcut
+"Villa við gerð flýtileiðar: "
+# ^ErrorCreating
+"Villa við gerð: "
+# ^ErrorDecompressing
+Villa við afþjöppun gagna! Biluð uppsetningarhjálp?
+# ^ErrorRegistering
+Villa við skrásetningu DLL
+# ^ExecShell
+"Keyrslugluggi: "
+# ^Exec
+"Keyra: "
+# ^Extract
+"Færa út: "
+# ^ErrorWriting
+"Færa út: villa við að skrifa í skrá "
+# ^InvalidOpcode
+Uppsetningarhjálp biluð: rangur stýrikóði
+# ^NoOLE
+"Engin OLE fyrir: "
+# ^OutputFolder
+"Útskráarsafn: "
+# ^RemoveFolder
+"Fjarlægja skráarsafn: "
+# ^RenameOnReboot
+"Endurskíra við endurræsingu: "
+# ^Rename
+"Endurskíra: "
+# ^Skipped
+"Sleppt: "
+# ^CopyDetails
+Afrita upplýsingar til skrifbrettis
+# ^LogInstall
+Skrá uppsetningarferli
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Icelandic.nsh b/Contrib/Language files/Icelandic.nsh
index 3b8ebd5..0d39eb0 100755
--- a/Contrib/Language files/Icelandic.nsh
+++ b/Contrib/Language files/Icelandic.nsh
@@ -1,121 +1,121 @@
-;Language: Icelandic (15)
-;By Gretar Orri Kristinsson
-
-!insertmacro LANGFILE "Icelandic" "Icelandic"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkominn til $(^NameDA) uppsetningarhjálparinnar"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Þessi hjálp mun leiða þig í gegnum uppsetninguna á $(^NameDA).$\r$\n$\r$\nMælt er með því að þú lokir öllum öðrum forritum áður en uppsetningin hefst. Þetta mun gera uppsetningarforritinu kleyft að uppfæra kerfiskrár án þess að endurræsa tölvuna.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkomin(n) til $(^NameDA) fjarlægingarhjálparinnar"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Þessi hjálp mun leiða þig í gegnum fjarlæginguna á $(^NameDA).$\r$\n$\r$\nÁður en fjarlæging hefst skal ganga úr skugga um að $(^NameDA) sé ekki opið.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Notandaleyfissamningur"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Vinsamlegast skoðaðu Notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki' til að halda áfram. Þú verður að samþykkja samninginn til þess að setja upp $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. Þú verður að samþykkja samninginn til þess að setja upp $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. Þú verður að samþykkja samninginn til þess að setja upp $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Leyfissamningur"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Vinsamlegast skoðaðu leyfissamninginn vel áður en fjarlæging á $(^NameDA) hefst."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki' til að halda áfram. Þú verður að samþykkja samninginn til þess að fjarlægja $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. Þú verður að samþykkja samninginn til þess að fjarlægja $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. Þú verður að samþykkja samninginn til þess að fjarlægja $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Smelltu á 'PageDown' takkann á lyklaborðinu til að sjá afganginn af samningnum."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Velja íhluti"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Veldu hvaða $(^NameDA) íhluti þú vilt setja upp."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Lýsing"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Velja íhluti"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Velja hvaða $(^NameDA) íhluti þú vilt fjarlægja."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Færðu músina yfir íhlut til að fá lýsinguna á honum."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Færðu músina yfir íhlut til að fá lýsinguna á honum."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Veldu uppsetningarskáarsafn"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Veldu það skráarsafn sem þú vilt setja $(^NameDA) upp í."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Velja fjarlægingarskáarsafn"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Veldu það skráarsafn sem þú vilt fjarlægja $(^NameDA) úr."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Set upp"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vinsamlegast dokaðu við meðan $(^NameDA) er sett upp."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Uppsetningu lokið"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Uppsetning tókst."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Hætt við uppsetningu"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Uppsetningu lauk ekki sem skildi."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Fjarlægi"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vinsamlegast dokaðu við á meðan $(^NameDA) er fjarlægt."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Fjarlægingu lokið"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Fjarlæging tókst."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Hætt við fjarlægingu"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Fjarlægingu lauk ekki sem skildi."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Ljúka $(^NameDA) uppsetningarhjálpinni"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er nú upp sett á tölvunni þinni.$\r$\n$\r$\nSmelltu á 'Ljúka' til að loka þessari hjálp."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Til að ljúka uppsetningunni á $(^NameDA) verður að endurræsa tölvuna. Viltu endurræsa núna?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Ljúka $(^NameDA) fjarlægingarhjálpinni"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) hefur nú verið fjarlægt úr tölvunni.$\r$\n$\r$\nSmelltu á 'Ljúka' til að loka þessari hjálp."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Til að ljúka fjarlægingunni á $(^NameDA) verður að endurræsa tölvuna. Viltu endurræsa núna?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Endurræsa núna"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ég vil endurræsa seinna"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Keyra $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Skoða LestuMig"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ljúka"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Velja skráarsafn 'Start' valmyndar"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Veldu skráarsafn $(^NameDA) flýtileiða fyrir 'Start' valmyndina."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Veldu skráarsafn flýtileiða forritsins fyrir 'Start' valmyndina. Þú getur einnig búið til nýtt skráarsafn með því að setja inn nýtt nafn."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ekki búa til flýtileiðir í 'Start' valmyndinni"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Fjarlægja $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Fjarlægja $(^NameDA) úr tölvunni."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ertu viss um að þú viljir loka $(^Name) uppsetningarhjálpinni?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ertu viss um að þú viljir loka $(^Name) fjarlægingarhjálpinni?"
-!endif
+;Language: Icelandic (15)
+;By Gretar Orri Kristinsson
+
+!insertmacro LANGFILE "Icelandic" "Icelandic"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkominn til $(^NameDA) uppsetningarhjálparinnar"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Þessi hjálp mun leiða þig í gegnum uppsetninguna á $(^NameDA).$\r$\n$\r$\nMælt er með því að þú lokir öllum öðrum forritum áður en uppsetningin hefst. Þetta mun gera uppsetningarforritinu kleyft að uppfæra kerfiskrár án þess að endurræsa tölvuna.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkomin(n) til $(^NameDA) fjarlægingarhjálparinnar"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Þessi hjálp mun leiða þig í gegnum fjarlæginguna á $(^NameDA).$\r$\n$\r$\nÁður en fjarlæging hefst skal ganga úr skugga um að $(^NameDA) sé ekki opið.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Notandaleyfissamningur"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Vinsamlegast skoðaðu Notandaleyfissamninginn vel áður en uppsetning á $(^NameDA) hefst."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki' til að halda áfram. Þú verður að samþykkja samninginn til þess að setja upp $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. Þú verður að samþykkja samninginn til þess að setja upp $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. Þú verður að samþykkja samninginn til þess að setja upp $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Leyfissamningur"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Vinsamlegast skoðaðu leyfissamninginn vel áður en fjarlæging á $(^NameDA) hefst."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ef þú samþykkir skilmála samningsins, smelltu þá á 'Ég samþykki' til að halda áfram. Þú verður að samþykkja samninginn til þess að fjarlægja $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ef þú samþykkir skilmála samningsins, hakaðu þá í kassann hér að neðan. Þú verður að samþykkja samninginn til þess að fjarlægja $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ef þú samþykkir skilmála samningsins, veldu þá fyrsta valmöguleikann hér að neðan. Þú verður að samþykkja samninginn til þess að fjarlægja $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Smelltu á 'PageDown' takkann á lyklaborðinu til að sjá afganginn af samningnum."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Velja íhluti"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Veldu hvaða $(^NameDA) íhluti þú vilt setja upp."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Lýsing"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Velja íhluti"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Velja hvaða $(^NameDA) íhluti þú vilt fjarlægja."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Færðu músina yfir íhlut til að fá lýsinguna á honum."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Færðu músina yfir íhlut til að fá lýsinguna á honum."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Veldu uppsetningarskáarsafn"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Veldu það skráarsafn sem þú vilt setja $(^NameDA) upp í."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Velja fjarlægingarskáarsafn"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Veldu það skráarsafn sem þú vilt fjarlægja $(^NameDA) úr."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Set upp"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vinsamlegast dokaðu við meðan $(^NameDA) er sett upp."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Uppsetningu lokið"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Uppsetning tókst."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Hætt við uppsetningu"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Uppsetningu lauk ekki sem skildi."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Fjarlægi"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vinsamlegast dokaðu við á meðan $(^NameDA) er fjarlægt."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Fjarlægingu lokið"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Fjarlæging tókst."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Hætt við fjarlægingu"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Fjarlægingu lauk ekki sem skildi."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Ljúka $(^NameDA) uppsetningarhjálpinni"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er nú upp sett á tölvunni þinni.$\r$\n$\r$\nSmelltu á 'Ljúka' til að loka þessari hjálp."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Til að ljúka uppsetningunni á $(^NameDA) verður að endurræsa tölvuna. Viltu endurræsa núna?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Ljúka $(^NameDA) fjarlægingarhjálpinni"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) hefur nú verið fjarlægt úr tölvunni.$\r$\n$\r$\nSmelltu á 'Ljúka' til að loka þessari hjálp."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Til að ljúka fjarlægingunni á $(^NameDA) verður að endurræsa tölvuna. Viltu endurræsa núna?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Endurræsa núna"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ég vil endurræsa seinna"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Keyra $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Skoða LestuMig"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ljúka"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Velja skráarsafn 'Start' valmyndar"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Veldu skráarsafn $(^NameDA) flýtileiða fyrir 'Start' valmyndina."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Veldu skráarsafn flýtileiða forritsins fyrir 'Start' valmyndina. Þú getur einnig búið til nýtt skráarsafn með því að setja inn nýtt nafn."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ekki búa til flýtileiðir í 'Start' valmyndinni"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Fjarlægja $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Fjarlægja $(^NameDA) úr tölvunni."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ertu viss um að þú viljir loka $(^Name) uppsetningarhjálpinni?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ertu viss um að þú viljir loka $(^Name) fjarlægingarhjálpinni?"
+!endif
diff --git a/Contrib/Language files/Indonesian.nlf b/Contrib/Language files/Indonesian.nlf
index 32b2e2d..c3295c6 100755
--- a/Contrib/Language files/Indonesian.nlf
+++ b/Contrib/Language files/Indonesian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1057
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
--
-# RTL - anything else than RTL means LTR
--
-# Translation ariel825010106@yahoo.com [visit www.ariel106.cjb.net]
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Setup $(^Name)
-# ^UninstallCaption
-Uninstall $(^Name)
-# ^LicenseSubCaption
-: Perihal Lisensi
-# ^ComponentsSubCaption
-: Options Instalasi
-# ^DirSubCaption
-: Folder Instalasi
-# ^InstallingSubCaption
-: Menginstall
-# ^CompletedSubCaption
-: Selesai
-# ^UnComponentsSubCaption
-: Options Uninstal
-# ^UnDirSubCaption
-: Folder Uninstal
-# ^ConfirmSubCaption
-: Konfirmasi
-# ^UninstallingSubCaption
-: Meng-uninstall
-# ^UnCompletedSubCaption
-: Selsai
-# ^BackBtn
-< &Mundur
-# ^NextBtn
-&Maju >
-# ^AgreeBtn
-Saya &setuju
-# ^AcceptBtn
-Saya s&etuju dengan Perihal Lisensi
-# ^DontAcceptBtn
-Saya &tidak setuju dengan Perihal Lisensi
-# ^InstallBtn
-&Instal
-# ^UninstallBtn
-&Uninstal
-# ^CancelBtn
-Cancel
-# ^CloseBtn
-&Tutup
-# ^BrowseBtn
-B&rowse...
-# ^ShowDetailsBtn
-Buka &lagi
-# ^ClickNext
-Klik Maju untuk melanjutkan.
-# ^ClickInstall
-Klik Instal untuk memulai instalasi.
-# ^ClickUninstall
-Klik Uninstall untuk memulai uninstalasi.
-# ^Name
-Nama
-# ^Completed
-Selesai
-# ^LicenseText
-Silahkan membaca lisensi berikut sebelum menginstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, klik Saya setuju.
-# ^LicenseTextCB
-Silahkan membaca linsensi berikut sebelum menginstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, beri tanda centang. $_CLICK
-# ^LicenseTextRB
-Silahkan membaca linsensi berikut sebelum menginstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. $_CLICK
-# ^UnLicenseText
-Silahkan membaca linsensi berikut sebelum meng-uninstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, klik Saya setuju.
-# ^UnLicenseTextCB
-Silahkan membaca linsensi berikut sebelum meng-uninstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, beri tanda centang. $_CLICK
-# ^UnLicenseTextRB
-Silahkan membaca linsensi berikut sebelum meng-uninstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. $_CLICK
-# ^Custom
-Custom
-# ^ComponentsText
-Beri tanda centang pada komponen yang mau di install and hilangkan tanda centang pada komponen yang tidak perlu di install. $_CLICK
-# ^ComponentsSubText1
-Pilih tipe instalasi:
-# ^ComponentsSubText2_NoInstTypes
-Pilih komponen-komponen untuk di install:
-# ^ComponentsSubText2
-Atau, pilih komponen berikut untuk di install:
-# ^UnComponentsText
-Beri tanda centang pada komponen yang mau di uninstall and hilangkan tanda centang pada komponen yang tidak perlu di uninstall. $_CLICK
-# ^UnComponentsSubText1
-Pilih tipe un-instalasi:
-# ^UnComponentsSubText2_NoInstTypes
-Pilih komponen-komponen untuk di un-install:
-# ^UnComponentsSubText2
-Atau, pilih komponen berikut untuk di un-install:
-# ^DirText
-Setup akan menginstall $(^NameDA) pada folder berikut. Untuk memilih folder lainnya, klik Browse dan pilih folder pilihan anda. $_CLICK
-# ^DirSubText
-Folder tujuan
-# ^DirBrowseText
-Pilih folder untuk menginstall $(^NameDA):
-# ^UnDirText
-Setup akan meng-uninstall $(^NameDA) dari folder berikut. Untuk memilih folder lainnya, klik Browse dan pilih folder pilihan anda. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Pilih folder untuk meng-uninstall $(^NameDA):
-# ^SpaceAvailable
-"Ruang disk yang tersedia: "
-# ^SpaceRequired
-"Ruang disk yang dibutuhkan: "
-# ^UninstallingText
-$(^NameDA) akan di-uninstall dari folder berikut. $_CLICK
-# ^UninstallingSubText
-Meng-uninstall:
-# ^FileError
-Tidak dapat menulis pada file: \r\n\t"$0"\r\nKlik abort untuk membatalkan instalasi,\r\nretry untuk mencoba lagi, atau\r\nignore untuk mengacuhkan file ini.
-# ^FileError_NoIgnore
-Tidak dapat menulis pada file: \r\n\t"$0"\r\nKlik retry untuk mencoba lagi, atau\r\ncancel untuk membatalkan instalasi
-# ^CantWrite
-"Tidak bisa menulis pada: "
-# ^CopyFailed
-Gagal meng-copy
-# ^CopyTo
-"Meng-copy ke "
-# ^Registering
-"Mendaftarkan modul: "
-# ^Unregistering
-"Melepas modul: "
-# ^SymbolNotFound
-"Tidak dapat menemukan : "
-# ^CouldNotLoad
-"Tidak dapat membuka: "
-# ^CreateFolder
-"Membuat folder: "
-# ^CreateShortcut
-"Membuat shortcut: "
-# ^CreatedUninstaller
-"Membuat program unistall: "
-# ^Delete
-"Menghapus file: "
-# ^DeleteOnReboot
-"Akan dihapus pada reboot: "
-# ^ErrorCreatingShortcut
-"Tidak dapat membuat shortcut: "
-# ^ErrorCreating
-"Error creating: "
-# ^ErrorDecompressing
-Error pada saat membuka data! Program Installer rusak
-# ^ErrorRegistering
-Error mendaftarkan modul DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Menjalankan: "
-# ^Extract
-"Meng-ekstrak: "
-# ^ErrorWriting
-"Ekstrak: error pada saat menulis ke file "
-# ^InvalidOpcode
-Installer rusak: opcode tidak lengkap
-# ^NoOLE
-"OLE tidak ditemukan: "
-# ^OutputFolder
-"Folder tujuan: "
-# ^RemoveFolder
-"Menghapus folder: "
-# ^RenameOnReboot
-"Akan di-Rename pada reboot: "
-# ^Rename
-"Rename: "
-# ^Skipped
-"Dilewati: "
-# ^CopyDetails
-Copy Details ke Clipboard
-# ^LogInstall
-Catat proses instalasi
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1057
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+-
+# RTL - anything else than RTL means LTR
+-
+# Translation ariel825010106@yahoo.com [visit www.ariel106.cjb.net]
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Setup $(^Name)
+# ^UninstallCaption
+Uninstall $(^Name)
+# ^LicenseSubCaption
+: Perihal Lisensi
+# ^ComponentsSubCaption
+: Options Instalasi
+# ^DirSubCaption
+: Folder Instalasi
+# ^InstallingSubCaption
+: Menginstall
+# ^CompletedSubCaption
+: Selesai
+# ^UnComponentsSubCaption
+: Options Uninstal
+# ^UnDirSubCaption
+: Folder Uninstal
+# ^ConfirmSubCaption
+: Konfirmasi
+# ^UninstallingSubCaption
+: Meng-uninstall
+# ^UnCompletedSubCaption
+: Selsai
+# ^BackBtn
+< &Mundur
+# ^NextBtn
+&Maju >
+# ^AgreeBtn
+Saya &setuju
+# ^AcceptBtn
+Saya s&etuju dengan Perihal Lisensi
+# ^DontAcceptBtn
+Saya &tidak setuju dengan Perihal Lisensi
+# ^InstallBtn
+&Instal
+# ^UninstallBtn
+&Uninstal
+# ^CancelBtn
+Cancel
+# ^CloseBtn
+&Tutup
+# ^BrowseBtn
+B&rowse...
+# ^ShowDetailsBtn
+Buka &lagi
+# ^ClickNext
+Klik Maju untuk melanjutkan.
+# ^ClickInstall
+Klik Instal untuk memulai instalasi.
+# ^ClickUninstall
+Klik Uninstall untuk memulai uninstalasi.
+# ^Name
+Nama
+# ^Completed
+Selesai
+# ^LicenseText
+Silahkan membaca lisensi berikut sebelum menginstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, klik Saya setuju.
+# ^LicenseTextCB
+Silahkan membaca linsensi berikut sebelum menginstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, beri tanda centang. $_CLICK
+# ^LicenseTextRB
+Silahkan membaca linsensi berikut sebelum menginstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. $_CLICK
+# ^UnLicenseText
+Silahkan membaca linsensi berikut sebelum meng-uninstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, klik Saya setuju.
+# ^UnLicenseTextCB
+Silahkan membaca linsensi berikut sebelum meng-uninstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, beri tanda centang. $_CLICK
+# ^UnLicenseTextRB
+Silahkan membaca linsensi berikut sebelum meng-uninstall $(^NameDA). Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. $_CLICK
+# ^Custom
+Custom
+# ^ComponentsText
+Beri tanda centang pada komponen yang mau di install and hilangkan tanda centang pada komponen yang tidak perlu di install. $_CLICK
+# ^ComponentsSubText1
+Pilih tipe instalasi:
+# ^ComponentsSubText2_NoInstTypes
+Pilih komponen-komponen untuk di install:
+# ^ComponentsSubText2
+Atau, pilih komponen berikut untuk di install:
+# ^UnComponentsText
+Beri tanda centang pada komponen yang mau di uninstall and hilangkan tanda centang pada komponen yang tidak perlu di uninstall. $_CLICK
+# ^UnComponentsSubText1
+Pilih tipe un-instalasi:
+# ^UnComponentsSubText2_NoInstTypes
+Pilih komponen-komponen untuk di un-install:
+# ^UnComponentsSubText2
+Atau, pilih komponen berikut untuk di un-install:
+# ^DirText
+Setup akan menginstall $(^NameDA) pada folder berikut. Untuk memilih folder lainnya, klik Browse dan pilih folder pilihan anda. $_CLICK
+# ^DirSubText
+Folder tujuan
+# ^DirBrowseText
+Pilih folder untuk menginstall $(^NameDA):
+# ^UnDirText
+Setup akan meng-uninstall $(^NameDA) dari folder berikut. Untuk memilih folder lainnya, klik Browse dan pilih folder pilihan anda. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Pilih folder untuk meng-uninstall $(^NameDA):
+# ^SpaceAvailable
+"Ruang disk yang tersedia: "
+# ^SpaceRequired
+"Ruang disk yang dibutuhkan: "
+# ^UninstallingText
+$(^NameDA) akan di-uninstall dari folder berikut. $_CLICK
+# ^UninstallingSubText
+Meng-uninstall:
+# ^FileError
+Tidak dapat menulis pada file: \r\n\t"$0"\r\nKlik abort untuk membatalkan instalasi,\r\nretry untuk mencoba lagi, atau\r\nignore untuk mengacuhkan file ini.
+# ^FileError_NoIgnore
+Tidak dapat menulis pada file: \r\n\t"$0"\r\nKlik retry untuk mencoba lagi, atau\r\ncancel untuk membatalkan instalasi
+# ^CantWrite
+"Tidak bisa menulis pada: "
+# ^CopyFailed
+Gagal meng-copy
+# ^CopyTo
+"Meng-copy ke "
+# ^Registering
+"Mendaftarkan modul: "
+# ^Unregistering
+"Melepas modul: "
+# ^SymbolNotFound
+"Tidak dapat menemukan : "
+# ^CouldNotLoad
+"Tidak dapat membuka: "
+# ^CreateFolder
+"Membuat folder: "
+# ^CreateShortcut
+"Membuat shortcut: "
+# ^CreatedUninstaller
+"Membuat program unistall: "
+# ^Delete
+"Menghapus file: "
+# ^DeleteOnReboot
+"Akan dihapus pada reboot: "
+# ^ErrorCreatingShortcut
+"Tidak dapat membuat shortcut: "
+# ^ErrorCreating
+"Error creating: "
+# ^ErrorDecompressing
+Error pada saat membuka data! Program Installer rusak
+# ^ErrorRegistering
+Error mendaftarkan modul DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Menjalankan: "
+# ^Extract
+"Meng-ekstrak: "
+# ^ErrorWriting
+"Ekstrak: error pada saat menulis ke file "
+# ^InvalidOpcode
+Installer rusak: opcode tidak lengkap
+# ^NoOLE
+"OLE tidak ditemukan: "
+# ^OutputFolder
+"Folder tujuan: "
+# ^RemoveFolder
+"Menghapus folder: "
+# ^RenameOnReboot
+"Akan di-Rename pada reboot: "
+# ^Rename
+"Rename: "
+# ^Skipped
+"Dilewati: "
+# ^CopyDetails
+Copy Details ke Clipboard
+# ^LogInstall
+Catat proses instalasi
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Indonesian.nsh b/Contrib/Language files/Indonesian.nsh
index 0730ddd..149f87e 100755
--- a/Contrib/Language files/Indonesian.nsh
+++ b/Contrib/Language files/Indonesian.nsh
@@ -1,121 +1,121 @@
-;Language: Indonesian (1057)
-;By Ariel825010106@yahoo.com [visit www.ariel106.cjb.net]
-
-!insertmacro LANGFILE "Indonesian" "Indonesian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Selamat datang di $(^NameDA) Setup Wizard"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup Wizard akan membantu anda pada proses instalasi $(^NameDA).$\r$\n$\r$\nSangat disarankan untuk menutup program lainnya sebelum memulai Setup ini. Ini memungkinkan untuk merubah file yang dipakai oleh sistem tanpa harus me-reboot komputer anda.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Selamat datang di $(^NameDA) Uninstall Wizard"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Uninstall Wizard akan membantu anda pada proses uninstalasi $(^NameDA).$\r$\n$\r$\nSebelum memulai uninstalasi, pastikan dulu $(^NameDA) tidak sedang berjalan.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Perihal Lisensi"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Silahkan membaca lisensi berikut sebelum menginstall $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jika anda menerima semua yang ada di lisensi, klik Saya setuju untuk melanjutkan. Anda harus setuju untuk dapat menginstall $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda menerima semua yang ada di lisensi, beri tanda centang. Anda harus setuju untuk dapat menginstall $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. Anda harus setuju untuk dapat menginstall $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Perihal Lisensi"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Silahkan membaca lisensi berikut sebelum meng-uninstall $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jika anda menerima semua yang ada di lisensi, klik Saya setuju untuk melanjutkan. Anda harus setuju untuk dapat meng-uninstall $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda menerima semua yang ada di lisensi, beri tanda centang. Anda harus setuju untuk dapat meng-uninstall $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. Anda harus setuju untuk dapat meng-uninstall $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tekan Page Down untuk melihat selanjutnya."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Pilih Komponen"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Pilih fasilitas dari $(^NameDA) yang ingin di-install."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Deskripsi"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Pilih Komponen"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pilih fasilitas dari $(^NameDA) yang ingin di-uninstall."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Tunjuk ke salah satu komponen untuk melihat deskripsi tentang komponen itu."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Tunjuk ke salah satu komponen untuk melihat deskripsi tentang komponen itu."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Pilih Lokasi Install"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Pilih folder untuk meng-install $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Pilih Lokasi Uninstall"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Pilih folder untuk meng-uninstall $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Install"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Mohon tunggu selama $(^NameDA) sedang di-install."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalasi Selesai"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup sudah selesai."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalasi Dibatalkan"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup belum selesai secara sempurna."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstall"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Mohon tunggu selama $(^NameDA) sedang di-uninstall."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Proses Uninstall Selesai"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall sudah selesai."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Proses Uninstall Dibatalkan"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall belum selesai secara sempurna."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Setup Wizard"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) sudah ter-install di komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Komputer anda harus di reboot untuk menyelesaikan proses instalasi $(^NameDA). Apakah anda mau reboot sekarang juga?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Uninstall Wizard"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) sudah ter-uninstall di komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Komputer anda harus di reboot untuk menyelesaikan proses uninstall $(^NameDA). Apakah anda mau reboot sekarang juga?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot sekarang"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reboot nanti saja"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Jalankan $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Buka file Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Selesai"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Pilih Folder Start Menu"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Pilih folder Start Menu untuk meletakan shortcut $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Pilih folder Start Menu dimana ingin diletakan shortcut program ini. Bisa juga memasukan nama folder yang belum ada untuk membuatnya."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Jangan buat shortcut"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Menghapus $(^NameDA) dari komputer anda."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Apa anda yakin ingin menghentikan Setup $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Apa anda yakin ingin menghentikan Uninstall $(^Name)?"
-!endif
+;Language: Indonesian (1057)
+;By Ariel825010106@yahoo.com [visit www.ariel106.cjb.net]
+
+!insertmacro LANGFILE "Indonesian" "Indonesian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Selamat datang di $(^NameDA) Setup Wizard"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup Wizard akan membantu anda pada proses instalasi $(^NameDA).$\r$\n$\r$\nSangat disarankan untuk menutup program lainnya sebelum memulai Setup ini. Ini memungkinkan untuk merubah file yang dipakai oleh sistem tanpa harus me-reboot komputer anda.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Selamat datang di $(^NameDA) Uninstall Wizard"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Uninstall Wizard akan membantu anda pada proses uninstalasi $(^NameDA).$\r$\n$\r$\nSebelum memulai uninstalasi, pastikan dulu $(^NameDA) tidak sedang berjalan.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Perihal Lisensi"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Silahkan membaca lisensi berikut sebelum menginstall $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jika anda menerima semua yang ada di lisensi, klik Saya setuju untuk melanjutkan. Anda harus setuju untuk dapat menginstall $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda menerima semua yang ada di lisensi, beri tanda centang. Anda harus setuju untuk dapat menginstall $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. Anda harus setuju untuk dapat menginstall $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Perihal Lisensi"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Silahkan membaca lisensi berikut sebelum meng-uninstall $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jika anda menerima semua yang ada di lisensi, klik Saya setuju untuk melanjutkan. Anda harus setuju untuk dapat meng-uninstall $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda menerima semua yang ada di lisensi, beri tanda centang. Anda harus setuju untuk dapat meng-uninstall $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda menerima semua yang ada di lisensi, pilihlah salah satu item dibawah ini. Anda harus setuju untuk dapat meng-uninstall $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tekan Page Down untuk melihat selanjutnya."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Pilih Komponen"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Pilih fasilitas dari $(^NameDA) yang ingin di-install."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Deskripsi"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Pilih Komponen"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pilih fasilitas dari $(^NameDA) yang ingin di-uninstall."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Tunjuk ke salah satu komponen untuk melihat deskripsi tentang komponen itu."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Tunjuk ke salah satu komponen untuk melihat deskripsi tentang komponen itu."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Pilih Lokasi Install"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Pilih folder untuk meng-install $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Pilih Lokasi Uninstall"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Pilih folder untuk meng-uninstall $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Install"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Mohon tunggu selama $(^NameDA) sedang di-install."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalasi Selesai"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup sudah selesai."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalasi Dibatalkan"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup belum selesai secara sempurna."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstall"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Mohon tunggu selama $(^NameDA) sedang di-uninstall."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Proses Uninstall Selesai"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall sudah selesai."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Proses Uninstall Dibatalkan"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall belum selesai secara sempurna."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Setup Wizard"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) sudah ter-install di komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Komputer anda harus di reboot untuk menyelesaikan proses instalasi $(^NameDA). Apakah anda mau reboot sekarang juga?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Uninstall Wizard"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) sudah ter-uninstall di komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Komputer anda harus di reboot untuk menyelesaikan proses uninstall $(^NameDA). Apakah anda mau reboot sekarang juga?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot sekarang"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reboot nanti saja"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Jalankan $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Buka file Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Selesai"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Pilih Folder Start Menu"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Pilih folder Start Menu untuk meletakan shortcut $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Pilih folder Start Menu dimana ingin diletakan shortcut program ini. Bisa juga memasukan nama folder yang belum ada untuk membuatnya."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Jangan buat shortcut"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Uninstall $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Menghapus $(^NameDA) dari komputer anda."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Apa anda yakin ingin menghentikan Setup $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Apa anda yakin ingin menghentikan Uninstall $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Irish.nlf b/Contrib/Language files/Irish.nlf
index 06e0f25..999b278 100755
--- a/Contrib/Language files/Irish.nlf
+++ b/Contrib/Language files/Irish.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-2108
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Kevin P. Scannell < scannell at slu dot edu >
-# ^Branding
-Córas Suiteála Nullsoft %s
-# ^SetupCaption
-Socrú $(^Name)
-# ^UninstallCaption
-Díshuiteáil $(^Name)
-# ^LicenseSubCaption
-: Comhaontú um Cheadúnas
-# ^ComponentsSubCaption
-: Roghanna Suiteála
-# ^DirSubCaption
-: Fillteán Suiteála
-# ^InstallingSubCaption
-: Suiteáil
-# ^CompletedSubCaption
-: Críochnaithe
-# ^UnComponentsSubCaption
-: Roghanna Díshuiteála
-# ^UnDirSubCaption
-: Fillteán Díshuiteála
-# ^ConfirmSubCaption
-: Deimhniú
-# ^UninstallingSubCaption
-: Díshuiteáil
-# ^UnCompletedSubCaption
-: Críochnaithe
-# ^BackBtn
-< Ar Ai&s
-# ^NextBtn
-Ar &Aghaidh >
-# ^AgreeBtn
-Gl&acaim Leis
-# ^AcceptBtn
-Táim toilteanach &glacadh le coinníollacha an Chomhaontú um Cheadúnas
-# ^DontAcceptBtn
-Nílim &toilteanach glacadh le coinníollacha an Chomhaontú um Cheadúnas
-# ^InstallBtn
-&Suiteáil
-# ^UninstallBtn
-&Díshuiteáil
-# ^CancelBtn
-Cealaigh
-# ^CloseBtn
-&Dún
-# ^BrowseBtn
-B&rabhsáil...
-# ^ShowDetailsBtn
-Taispeáin &sonraí
-# ^ClickNext
-Cliceáil "Ar Aghaidh" chun leanúint ar aghaidh.
-# ^ClickInstall
-Cliceáil "Suiteáil" chun tosú.
-# ^ClickUninstall
-Cliceáil "Díshuiteáil" chun tosú.
-# ^Name
-Ainm
-# ^Completed
-Críochnaithe
-# ^LicenseText
-Déan iniúchadh ar an gComhaontú um Cheadúnas sula suiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil "Glacaim Leis".
-# ^LicenseTextCB
-Déan iniúchadh ar an gComhaontú um Cheadúnas sula suiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil an ticbhosca thíos. $_CLICK
-# ^LicenseTextRB
-Déan iniúchadh ar an gComhaontú um Cheadúnas sula suiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, roghnaigh an chéad rogha thíos. $_CLICK
-# ^UnLicenseText
-Déan iniúchadh ar an gComhaontú um Cheadúnas sula ndíshuiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil "Glacaim Leis".
-# ^UnLicenseTextCB
-Déan iniúchadh ar an gComhaontú um Cheadúnas sula ndíshuiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil an ticbhosca thíos. $_CLICK
-# ^UnLicenseTextRB
-Déan iniúchadh ar an gComhaontú um Cheadúnas sula ndíshuiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, roghnaigh an chéad rogha thíos. $_CLICK
-# ^Custom
-Saincheaptha
-# ^ComponentsText
-Roghnaigh na comhpháirteanna is mian leat a shuiteáil, agus díroghnaigh na comhpháirteanna nach mian leat a shuiteáil. $_CLICK
-# ^ComponentsSubText1
-Roghnaigh cineál na suiteála:
-# ^ComponentsSubText2_NoInstTypes
-Roghnaigh na comhpháirteanna is mian leat a shuiteáil:
-# ^ComponentsSubText2
-Nó, roghnaigh na comhpháirteanna roghnacha is mian leat a shuiteáil:
-# ^UnComponentsText
-Roghnaigh na comhpháirteanna is mian leat a dhíshuiteáil, agus díroghnaigh na comhpháirteanna nach mian leat a dhíshuiteáil. $_CLICK
-# ^UnComponentsSubText1
-Roghnaigh cineál na díshuiteála:
-# ^UnComponentsSubText2_NoInstTypes
-Roghnaigh comhpháirteanna le díshuiteáil:
-# ^UnComponentsSubText2
-Nó, roghnaigh na comhpháirteanna roghnacha is mian leat a dhíshuiteáil:
-# ^DirText
-Cuirfidh an Suiteálaí $(^NameDA) san fhillteán seo a leanas. Más mian leat suiteáil i bhfillteán difriúil, cliceáil "Brabhsáil" agus roghnaigh fillteán eile. $_CLICK
-# ^DirSubText
-Sprioc-Fhillteán
-# ^DirBrowseText
-Roghnaigh an fillteán inar mian leat $(^NameDA) a shuiteáil:
-# ^UnDirText
-Bainfidh an Suiteálaí $(^NameDA) amach as an bhfillteán seo a leanas. Más mian leat é a dhíshuiteáil ó fhillteán difriúil, cliceáil "Brabhsáil" agus roghnaigh fillteán eile. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Roghnaigh an fillteán ar mian leat $(^NameDA) a dhíshuiteáil as:
-# ^SpaceAvailable
-"Spás le fáil: "
-# ^SpaceRequired
-"Spás de dhíth: "
-# ^UninstallingText
-Díshuiteálfar $(^NameDA) ón fhillteán seo a leanas. $_CLICK
-# ^UninstallingSubText
-Á dhíshuiteáil ó:
-# ^FileError
-Earráid agus comhad á scríobh: \r\n\r\n$0\r\n\r\nCliceáil "Abort" chun an tsuiteáil a stopadh,\r\n"Retry" chun iarracht eile a dhéanamh, nó\r\n"Ignore" chun neamhaird a dhéanamh den chomhad seo.
-# ^FileError_NoIgnore
-Earráid agus comhad á scríobh: \r\n\r\n$0\r\n\r\nCliceáil "Retry" chun iarracht eile a dhéanamh, nó\r\n"Cancel" chun an tsuiteáil a stopadh.
-# ^CantWrite
-"Ní féidir scríobh: "
-# ^CopyFailed
-Theip ar an gcóipeáil
-# ^CopyTo
-"Cóipeáil go "
-# ^Registering
-"Clárú: "
-# ^Unregistering
-"Díchlárú: "
-# ^SymbolNotFound
-"Níorbh fhéidir siombail a aimsiú: "
-# ^CouldNotLoad
-"Níorbh fhéidir luchtú: "
-# ^CreateFolder
-"Cruthaigh fillteán: "
-# ^CreateShortcut
-"Cruthaigh aicearra: "
-# ^CreatedUninstaller
-"Cruthaíodh díshuiteálaí: "
-# ^Delete
-"Scrios comhad: "
-# ^DeleteOnReboot
-"Scrios ag am atosaithe: "
-# ^ErrorCreatingShortcut
-"Earráid agus aicearra á chruthú: "
-# ^ErrorCreating
-"Earráid le linn cruthaithe: "
-# ^ErrorDecompressing
-Earráid agus sonraí á ndíchomhbhrú! Suiteálaí truaillithe?
-# ^ErrorRegistering
-Earráid agus DLL á chlárú
-# ^ExecShell
-"Blaosc: "
-# ^Exec
-"Rith: "
-# ^Extract
-"Bain Amach: "
-# ^ErrorWriting
-"Extract: earráid le linn scríofa "
-# ^InvalidOpcode
-Díshuiteálaí truaillithe: cód neamhbhailí oibríochta
-# ^NoOLE
-"Gan OLE le haghaidh: "
-# ^OutputFolder
-"Fillteán aschurtha: "
-# ^RemoveFolder
-"Bain fillteán: "
-# ^RenameOnReboot
-"Athainmnigh ag am atosaithe: "
-# ^Rename
-"Athainmnigh: "
-# ^Skipped
-"Neamhaird déanta de: "
-# ^CopyDetails
-Cóipeáil Sonraí go dtí an Ghearrthaisce
-# ^LogInstall
-Logáil an próiseas suiteála
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+2108
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Kevin P. Scannell < scannell at slu dot edu >
+# ^Branding
+Córas Suiteála Nullsoft %s
+# ^SetupCaption
+Socrú $(^Name)
+# ^UninstallCaption
+Díshuiteáil $(^Name)
+# ^LicenseSubCaption
+: Comhaontú um Cheadúnas
+# ^ComponentsSubCaption
+: Roghanna Suiteála
+# ^DirSubCaption
+: Fillteán Suiteála
+# ^InstallingSubCaption
+: Suiteáil
+# ^CompletedSubCaption
+: Críochnaithe
+# ^UnComponentsSubCaption
+: Roghanna Díshuiteála
+# ^UnDirSubCaption
+: Fillteán Díshuiteála
+# ^ConfirmSubCaption
+: Deimhniú
+# ^UninstallingSubCaption
+: Díshuiteáil
+# ^UnCompletedSubCaption
+: Críochnaithe
+# ^BackBtn
+< Ar Ai&s
+# ^NextBtn
+Ar &Aghaidh >
+# ^AgreeBtn
+Gl&acaim Leis
+# ^AcceptBtn
+Táim toilteanach &glacadh le coinníollacha an Chomhaontú um Cheadúnas
+# ^DontAcceptBtn
+Nílim &toilteanach glacadh le coinníollacha an Chomhaontú um Cheadúnas
+# ^InstallBtn
+&Suiteáil
+# ^UninstallBtn
+&Díshuiteáil
+# ^CancelBtn
+Cealaigh
+# ^CloseBtn
+&Dún
+# ^BrowseBtn
+B&rabhsáil...
+# ^ShowDetailsBtn
+Taispeáin &sonraí
+# ^ClickNext
+Cliceáil "Ar Aghaidh" chun leanúint ar aghaidh.
+# ^ClickInstall
+Cliceáil "Suiteáil" chun tosú.
+# ^ClickUninstall
+Cliceáil "Díshuiteáil" chun tosú.
+# ^Name
+Ainm
+# ^Completed
+Críochnaithe
+# ^LicenseText
+Déan iniúchadh ar an gComhaontú um Cheadúnas sula suiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil "Glacaim Leis".
+# ^LicenseTextCB
+Déan iniúchadh ar an gComhaontú um Cheadúnas sula suiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil an ticbhosca thíos. $_CLICK
+# ^LicenseTextRB
+Déan iniúchadh ar an gComhaontú um Cheadúnas sula suiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, roghnaigh an chéad rogha thíos. $_CLICK
+# ^UnLicenseText
+Déan iniúchadh ar an gComhaontú um Cheadúnas sula ndíshuiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil "Glacaim Leis".
+# ^UnLicenseTextCB
+Déan iniúchadh ar an gComhaontú um Cheadúnas sula ndíshuiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, cliceáil an ticbhosca thíos. $_CLICK
+# ^UnLicenseTextRB
+Déan iniúchadh ar an gComhaontú um Cheadúnas sula ndíshuiteálann tú $(^NameDA). Má ghlacann tú le gach coinníoll den chomhaontú, roghnaigh an chéad rogha thíos. $_CLICK
+# ^Custom
+Saincheaptha
+# ^ComponentsText
+Roghnaigh na comhpháirteanna is mian leat a shuiteáil, agus díroghnaigh na comhpháirteanna nach mian leat a shuiteáil. $_CLICK
+# ^ComponentsSubText1
+Roghnaigh cineál na suiteála:
+# ^ComponentsSubText2_NoInstTypes
+Roghnaigh na comhpháirteanna is mian leat a shuiteáil:
+# ^ComponentsSubText2
+Nó, roghnaigh na comhpháirteanna roghnacha is mian leat a shuiteáil:
+# ^UnComponentsText
+Roghnaigh na comhpháirteanna is mian leat a dhíshuiteáil, agus díroghnaigh na comhpháirteanna nach mian leat a dhíshuiteáil. $_CLICK
+# ^UnComponentsSubText1
+Roghnaigh cineál na díshuiteála:
+# ^UnComponentsSubText2_NoInstTypes
+Roghnaigh comhpháirteanna le díshuiteáil:
+# ^UnComponentsSubText2
+Nó, roghnaigh na comhpháirteanna roghnacha is mian leat a dhíshuiteáil:
+# ^DirText
+Cuirfidh an Suiteálaí $(^NameDA) san fhillteán seo a leanas. Más mian leat suiteáil i bhfillteán difriúil, cliceáil "Brabhsáil" agus roghnaigh fillteán eile. $_CLICK
+# ^DirSubText
+Sprioc-Fhillteán
+# ^DirBrowseText
+Roghnaigh an fillteán inar mian leat $(^NameDA) a shuiteáil:
+# ^UnDirText
+Bainfidh an Suiteálaí $(^NameDA) amach as an bhfillteán seo a leanas. Más mian leat é a dhíshuiteáil ó fhillteán difriúil, cliceáil "Brabhsáil" agus roghnaigh fillteán eile. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Roghnaigh an fillteán ar mian leat $(^NameDA) a dhíshuiteáil as:
+# ^SpaceAvailable
+"Spás le fáil: "
+# ^SpaceRequired
+"Spás de dhíth: "
+# ^UninstallingText
+Díshuiteálfar $(^NameDA) ón fhillteán seo a leanas. $_CLICK
+# ^UninstallingSubText
+Á dhíshuiteáil ó:
+# ^FileError
+Earráid agus comhad á scríobh: \r\n\r\n$0\r\n\r\nCliceáil "Abort" chun an tsuiteáil a stopadh,\r\n"Retry" chun iarracht eile a dhéanamh, nó\r\n"Ignore" chun neamhaird a dhéanamh den chomhad seo.
+# ^FileError_NoIgnore
+Earráid agus comhad á scríobh: \r\n\r\n$0\r\n\r\nCliceáil "Retry" chun iarracht eile a dhéanamh, nó\r\n"Cancel" chun an tsuiteáil a stopadh.
+# ^CantWrite
+"Ní féidir scríobh: "
+# ^CopyFailed
+Theip ar an gcóipeáil
+# ^CopyTo
+"Cóipeáil go "
+# ^Registering
+"Clárú: "
+# ^Unregistering
+"Díchlárú: "
+# ^SymbolNotFound
+"Níorbh fhéidir siombail a aimsiú: "
+# ^CouldNotLoad
+"Níorbh fhéidir luchtú: "
+# ^CreateFolder
+"Cruthaigh fillteán: "
+# ^CreateShortcut
+"Cruthaigh aicearra: "
+# ^CreatedUninstaller
+"Cruthaíodh díshuiteálaí: "
+# ^Delete
+"Scrios comhad: "
+# ^DeleteOnReboot
+"Scrios ag am atosaithe: "
+# ^ErrorCreatingShortcut
+"Earráid agus aicearra á chruthú: "
+# ^ErrorCreating
+"Earráid le linn cruthaithe: "
+# ^ErrorDecompressing
+Earráid agus sonraí á ndíchomhbhrú! Suiteálaí truaillithe?
+# ^ErrorRegistering
+Earráid agus DLL á chlárú
+# ^ExecShell
+"Blaosc: "
+# ^Exec
+"Rith: "
+# ^Extract
+"Bain Amach: "
+# ^ErrorWriting
+"Extract: earráid le linn scríofa "
+# ^InvalidOpcode
+Díshuiteálaí truaillithe: cód neamhbhailí oibríochta
+# ^NoOLE
+"Gan OLE le haghaidh: "
+# ^OutputFolder
+"Fillteán aschurtha: "
+# ^RemoveFolder
+"Bain fillteán: "
+# ^RenameOnReboot
+"Athainmnigh ag am atosaithe: "
+# ^Rename
+"Athainmnigh: "
+# ^Skipped
+"Neamhaird déanta de: "
+# ^CopyDetails
+Cóipeáil Sonraí go dtí an Ghearrthaisce
+# ^LogInstall
+Logáil an próiseas suiteála
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Irish.nsh b/Contrib/Language files/Irish.nsh
index 8aab46d..7187af9 100755
--- a/Contrib/Language files/Irish.nsh
+++ b/Contrib/Language files/Irish.nsh
@@ -1,121 +1,121 @@
-;Language: Irish (2108)
-;By Kevin P. Scannell < scannell at slu dot edu >
-
-!insertmacro LANGFILE "Irish" "Irish"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Fáilte go dtí Draoi Suiteála $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Déanfaidh an draoi seo treorú duit tríd an suiteáil de $(^NameDA).$\r$\n$\r$\nMoltar duit gach feidhmchlár eile a dhúnadh sula dtosaíonn tú an Suiteálaí. Cinnteoidh sé seo gur féidir na comhaid oiriúnacha a nuashonrú gan do ríomhaire a atosú.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Fáilte go dtí Draoi Díshuiteála $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Déanfaidh an draoi seo treorú duit tríd an díshuiteáil de $(^NameDA).$\r$\n$\r$\nBí cinnte nach bhfuil $(^NameDA) ag rith sula dtosaíonn tú an díshuiteáil.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Comhaontú um Cheadúnas"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Déan iniúchadh ar choinníollacha an cheadúnais sula suiteálann tú $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil $\"Glacaim Leis$\" chun leanúint ar aghaidh. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a shuiteáil."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil an ticbhosca thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a shuiteáil. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Má ghlacann tú le coinníollacha an chomhaontaithe, roghnaigh an chéad rogha thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Comhaontú um Cheadúnas"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Déan iniúchadh ar choinníollacha an cheadúnais sula ndíshuiteálann tú $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil $\"Glacaim Leis$\" chun leanúint ar aghaidh. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil an ticbhosca thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Má ghlacann tú le coinníollacha an chomhaontaithe, roghnaigh an chéad rogha thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Brúigh $\"Page Down$\" chun an chuid eile den cheadúnas a léamh."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Roghnaigh Comhpháirteanna"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Roghnaigh na gnéithe $(^NameDA) ba mhaith leat suiteáil."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Cur Síos"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Roghnaigh Comhpháirteanna"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Roghnaigh na gnéithe $(^NameDA) ba mhaith leat díshuiteáil."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Cuir do luch os cionn comhpháirte chun cur síos a fheiceáil."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Cuir do luch os cionn comhpháirte chun cur síos a fheiceáil."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Roghnaigh Suíomh na Suiteála"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Roghnaigh an fillteán inar mian leat $(^NameDA) a shuiteáil."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Roghnaigh Suíomh na Díshuiteála"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Roghnaigh an fillteán ar mian leat $(^NameDA) a dhíshuiteáil as."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Á Shuiteáil"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Fan go fóill; $(^NameDA) á shuiteáil."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Suiteáil Críochnaithe"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "D'éirigh leis an tsuiteáil."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Suiteáil Tobscortha"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Níor éirigh leis an tsuiteáil."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Á Dhíshuiteáil"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Fan go fóill; $(^NameDA) á dhíshuiteáil."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Díshuiteáil Críochnaithe"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "D'éirigh leis an díshuiteáil."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Díshuiteáil Tobscortha"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Níor éirigh leis an díshuiteáil."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Draoi Suiteála $(^NameDA) á Chríochnú"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Suiteáladh $(^NameDA) ar do ríomhaire.$\r$\n$\r$\nCliceáil $\"Críochnaigh$\" chun an draoi seo a dhúnadh."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ní mór duit do ríomhaire a atosú chun suiteáil $(^NameDA) a chur i gcrích. Ar mhaith leat atosú anois?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Draoi Díshuiteála $(^NameDA) á Chríochnú"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Díshuiteáladh $(^NameDA) ó do ríomhaire.$\r$\n$\r$\nCliceáil $\"Críochnaigh$\" chun an draoi seo a dhúnadh."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ní mór duit do ríomhaire a atosú chun díshuiteáil $(^NameDA) a chur i gcrích. Ar mhaith leat atosú anois?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Atosaigh anois"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Atosóidh mé de láimh níos déanaí"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Rith $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Tai&speáin comhad README"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Críochnaigh"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Roghnaigh Fillteán sa Roghchlár Tosaigh"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Roghnaigh fillteán sa Roghchlár Tosaigh a gcuirfear aicearraí $(^NameDA) ann."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Roghnaigh an fillteán sa Roghchlár Tosaigh inar mian leat aicearraí an chláir a chruthú. Is féidir freisin fillteán nua a chruthú trí ainm nua a iontráil."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ná cruthaigh aicearraí"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Díshuiteáil $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Bain $(^NameDA) ó do ríomhaire."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "An bhfuil tú cinnte gur mian leat Suiteálaí $(^Name) a scor?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "An bhfuil tú cinnte gur mian leat Díshuiteálaí $(^Name) a scor?"
-!endif
+;Language: Irish (2108)
+;By Kevin P. Scannell < scannell at slu dot edu >
+
+!insertmacro LANGFILE "Irish" "Irish"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Fáilte go dtí Draoi Suiteála $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Déanfaidh an draoi seo treorú duit tríd an suiteáil de $(^NameDA).$\r$\n$\r$\nMoltar duit gach feidhmchlár eile a dhúnadh sula dtosaíonn tú an Suiteálaí. Cinnteoidh sé seo gur féidir na comhaid oiriúnacha a nuashonrú gan do ríomhaire a atosú.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Fáilte go dtí Draoi Díshuiteála $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Déanfaidh an draoi seo treorú duit tríd an díshuiteáil de $(^NameDA).$\r$\n$\r$\nBí cinnte nach bhfuil $(^NameDA) ag rith sula dtosaíonn tú an díshuiteáil.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Comhaontú um Cheadúnas"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Déan iniúchadh ar choinníollacha an cheadúnais sula suiteálann tú $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil $\"Glacaim Leis$\" chun leanúint ar aghaidh. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a shuiteáil."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil an ticbhosca thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a shuiteáil. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Má ghlacann tú le coinníollacha an chomhaontaithe, roghnaigh an chéad rogha thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Comhaontú um Cheadúnas"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Déan iniúchadh ar choinníollacha an cheadúnais sula ndíshuiteálann tú $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil $\"Glacaim Leis$\" chun leanúint ar aghaidh. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Má ghlacann tú le coinníollacha an chomhaontaithe, cliceáil an ticbhosca thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Má ghlacann tú le coinníollacha an chomhaontaithe, roghnaigh an chéad rogha thíos. Caithfidh tú glacadh leis an gcomhaontú chun $(^NameDA) a dhíshuiteáil. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Brúigh $\"Page Down$\" chun an chuid eile den cheadúnas a léamh."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Roghnaigh Comhpháirteanna"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Roghnaigh na gnéithe $(^NameDA) ba mhaith leat suiteáil."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Cur Síos"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Roghnaigh Comhpháirteanna"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Roghnaigh na gnéithe $(^NameDA) ba mhaith leat díshuiteáil."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Cuir do luch os cionn comhpháirte chun cur síos a fheiceáil."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Cuir do luch os cionn comhpháirte chun cur síos a fheiceáil."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Roghnaigh Suíomh na Suiteála"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Roghnaigh an fillteán inar mian leat $(^NameDA) a shuiteáil."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Roghnaigh Suíomh na Díshuiteála"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Roghnaigh an fillteán ar mian leat $(^NameDA) a dhíshuiteáil as."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Á Shuiteáil"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Fan go fóill; $(^NameDA) á shuiteáil."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Suiteáil Críochnaithe"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "D'éirigh leis an tsuiteáil."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Suiteáil Tobscortha"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Níor éirigh leis an tsuiteáil."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Á Dhíshuiteáil"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Fan go fóill; $(^NameDA) á dhíshuiteáil."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Díshuiteáil Críochnaithe"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "D'éirigh leis an díshuiteáil."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Díshuiteáil Tobscortha"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Níor éirigh leis an díshuiteáil."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Draoi Suiteála $(^NameDA) á Chríochnú"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Suiteáladh $(^NameDA) ar do ríomhaire.$\r$\n$\r$\nCliceáil $\"Críochnaigh$\" chun an draoi seo a dhúnadh."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ní mór duit do ríomhaire a atosú chun suiteáil $(^NameDA) a chur i gcrích. Ar mhaith leat atosú anois?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Draoi Díshuiteála $(^NameDA) á Chríochnú"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Díshuiteáladh $(^NameDA) ó do ríomhaire.$\r$\n$\r$\nCliceáil $\"Críochnaigh$\" chun an draoi seo a dhúnadh."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ní mór duit do ríomhaire a atosú chun díshuiteáil $(^NameDA) a chur i gcrích. Ar mhaith leat atosú anois?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Atosaigh anois"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Atosóidh mé de láimh níos déanaí"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Rith $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Tai&speáin comhad README"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Críochnaigh"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Roghnaigh Fillteán sa Roghchlár Tosaigh"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Roghnaigh fillteán sa Roghchlár Tosaigh a gcuirfear aicearraí $(^NameDA) ann."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Roghnaigh an fillteán sa Roghchlár Tosaigh inar mian leat aicearraí an chláir a chruthú. Is féidir freisin fillteán nua a chruthú trí ainm nua a iontráil."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ná cruthaigh aicearraí"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Díshuiteáil $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Bain $(^NameDA) ó do ríomhaire."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "An bhfuil tú cinnte gur mian leat Suiteálaí $(^Name) a scor?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "An bhfuil tú cinnte gur mian leat Díshuiteálaí $(^Name) a scor?"
+!endif
diff --git a/Contrib/Language files/Italian.nlf b/Contrib/Language files/Italian.nlf
index c942b2c..7b48362 100755
--- a/Contrib/Language files/Italian.nlf
+++ b/Contrib/Language files/Italian.nlf
@@ -1,192 +1,192 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1040
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation orginally started by Orfanik - http://www.orfanik.hu
-# Updated v2 to v6 by Alessandro Staltari < staltari (a) geocities.com >
-# corrected by < mdalco@gmail.com >
-# ^Branding
-Sistema di installazione Nullsoft %s
-# ^SetupCaption
-Installazione di $(^Name)
-# ^UninstallCaption
-Disinstallazione di $(^Name)
-# ^LicenseSubCaption
-: Licenza d'uso
-# ^ComponentsSubCaption
-: Opzioni di installazione
-# ^DirSubCaption
-: Cartella di installazione
-# ^InstallingSubCaption
-: Installazione dei file
-# ^CompletedSubCaption
-: Completata
-# ^UnComponentsSubCaption
-: Opzioni di disinstallazione
-# ^UnDirSubCaption
-: Cartella di disinstallazione
-# ^ConfirmSubCaption
-: Conferma
-# ^UninstallingSubCaption
-: Rimozione dei file
-# ^UnCompletedSubCaption
-: Completata
-# ^BackBtn
-< &Indietro
-# ^NextBtn
-&Avanti >
-# ^AgreeBtn
-&Accetto
-# ^AcceptBtn
-&Accetto le condizioni della licenza
-# ^DontAcceptBtn
-&Non accetto le condizioni della licenza
-# ^InstallBtn
-Ins&talla
-# ^UninstallBtn
-&Disinstalla
-# ^CancelBtn
-Annulla
-# ^CloseBtn
-&Fine
-# ^BrowseBtn
-S&foglia...
-# ^ShowDetailsBtn
-Mostra &dettagli
-# ^ClickNext
-Per proseguire, scegliere Avanti.
-# ^ClickInstall
-Per avviare l'installazione, selezionare Installa.
-# ^ClickUninstall
-Per avviare la disinstallazione, selezionare Disinstalla.
-# ^Name
-Nome
-# ^Completed
-Completata
-# ^LicenseText
-Leggere la licenza prima di procedere con l'installazione di $(^NameDA). Se si accettano le condizioni di licenza, selezionare Accetto.
-# ^LicenseTextCB
-Leggere la licenza prima di procedere con l'installazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la casella sottostante. $_CLICK
-# ^LicesnseTextRB
-Leggere la licenza prima di procedere con l'installazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la prima delle opzioni sottoindicate. $_CLICK
-# ^UnLicenseText
-Leggere la licenza prima di procedere con la disinstallazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare Accetto. $_CLICK
-# ^UnLicenseTextCB
-Leggere la licenza prima di procedere con la disinstallazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la casella sottostante. $_CLICK
-# ^UnLicesnseTextRB
-Leggere la licenza prima di procedere con la disinstallazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la prima delle opzioni sottoindicate. $_CLICK
-# ^Custom
-Personalizzata
-# ^ComponentsText
-Selezionare i componenti che si desidera installare.
-# ^ComponentsSubText1
-Selezionare il tipo d'installazione:
-# ^ComponentsSubText2_NoInstTypes
-Selezionare i componenti da installare:
-# ^ComponentsSubText2
-Oppure, selezionare i componenti opzionali che si desidera installare:
-# ^UnComponentsText
-Selezionare i componenti che si desidera disinstallare.
-# ^UnComponentsSubText1
-Selezionare il tipo di disinstallazione:
-# ^UnComponentsSubText2_NoInstTypes
-Selezionare i componenti da disinstallare:
-# ^UnComponentsSubText2
-Oppure, selezionare i componenti opzionali che si desidera disinstallare :
-# ^DirText
-Questa procedura installerà $(^NameDA) nella cartella seguente. Per installare in una cartella diversa, selezionare Sfoglia e sceglierne un'altra. $_CLICK
-# ^DirSubText
-Cartella di destinazione
-# ^DirBrowseText
-Selezionare la cartella dove installare $(^NameDA):
-# ^UnDirText
-Questa procedura disinstallerà $(^NameDA) nella cartella seguente. Per disinstallare da una cartella diversa, selezionare Sfoglia e sceglierene un'altra. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Selezionare la cartella dalla quale disinstallare $(^NameDA):
-# ^SpaceAvailable
-"Spazio disponibile: "
-# ^SpaceRequired
-"Spazio richiesto: "
-# ^UninstallingText
-$(^NameDA) verrà disinstallato dalla cartella seguente. $_CLICK
-# ^UninstallingSubText
-Rimozione da:
-# ^FileError
-Errore nell'apertura del file per la scrittura: \r\n\t"$0"\r\nSeleziona Termina per interrompere l'installazione,\r\nsu Riprova per ritentare, oppure\r\nsu Ignora per saltare questo file.
-# ^FileError_NoIgnore
-Errore nell'apertura del file per la scrittura: \r\n\t"$0"\r\nSeleziona Riprova per ritentare, oppure\r\nsu Termina per interrompere l'installazione
-# ^CantWrite
-"Impossibile scrivere: "
-# ^CopyFailed
-Copia fallita
-# ^CopyTo
-"Copia in "
-# ^Registering
-"Registrazione in corso: "
-# ^Unregistering
-"Deregistrazione in corso: "
-# ^SymbolNotFound
-"Impossibile trovare il simbolo: "
-# ^CouldNotLoad
-"Impossibile caricare: "
-# ^CreateFolder
-"Crea cartella: "
-# ^CreateShortcut
-"Crea collegamento: "
-# ^CreatedUninstaller
-"Creato il programma di disinstallazione: "
-# ^Delete
-"Elimina file: "
-# ^DeleteOnReboot
-"Elimina al riavvio: "
-# ^ErrorCreatingShortcut
-"Errore nella creazione del collegamento: "
-# ^ErrorCreating
-"Errore nella creazione: "
-# ^ErrorDecompressing
-Errore nella decompressione dei dati! Programma di installazione corrotto?
-# ^ErrorRegistering
-Errore nella registrazione della DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Esecuzione: "
-# ^Extract
-"Estrazione: "
-# ^ErrorWriting
-"Estrazione: errore nella scrittura sul file "
-# ^InvalidOpcode
-Programma di installazione corrotto: opcode non valido
-# ^NoOLE
-"Nessuna OLE per: "
-# ^OutputFolder
-"Cartella di destinazione: "
-# ^RemoveFolder
-"Rimuovi cartella: "
-# ^RenameOnReboot
-"Rinomina al riavvio: "
-# ^Rename
-Rinomina
-# ^Skipped
-"Saltato: "
-# ^CopyDetails
-Copia i dettagli negli appunti
-# ^LogInstall
-Log del processo di installazione
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1040
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation orginally started by Orfanik - http://www.orfanik.hu
+# Updated v2 to v6 by Alessandro Staltari < staltari (a) geocities.com >
+# corrected by < mdalco@gmail.com >
+# ^Branding
+Sistema di installazione Nullsoft %s
+# ^SetupCaption
+Installazione di $(^Name)
+# ^UninstallCaption
+Disinstallazione di $(^Name)
+# ^LicenseSubCaption
+: Licenza d'uso
+# ^ComponentsSubCaption
+: Opzioni di installazione
+# ^DirSubCaption
+: Cartella di installazione
+# ^InstallingSubCaption
+: Installazione dei file
+# ^CompletedSubCaption
+: Completata
+# ^UnComponentsSubCaption
+: Opzioni di disinstallazione
+# ^UnDirSubCaption
+: Cartella di disinstallazione
+# ^ConfirmSubCaption
+: Conferma
+# ^UninstallingSubCaption
+: Rimozione dei file
+# ^UnCompletedSubCaption
+: Completata
+# ^BackBtn
+< &Indietro
+# ^NextBtn
+&Avanti >
+# ^AgreeBtn
+&Accetto
+# ^AcceptBtn
+&Accetto le condizioni della licenza
+# ^DontAcceptBtn
+&Non accetto le condizioni della licenza
+# ^InstallBtn
+Ins&talla
+# ^UninstallBtn
+&Disinstalla
+# ^CancelBtn
+Annulla
+# ^CloseBtn
+&Fine
+# ^BrowseBtn
+S&foglia...
+# ^ShowDetailsBtn
+Mostra &dettagli
+# ^ClickNext
+Per proseguire, scegliere Avanti.
+# ^ClickInstall
+Per avviare l'installazione, selezionare Installa.
+# ^ClickUninstall
+Per avviare la disinstallazione, selezionare Disinstalla.
+# ^Name
+Nome
+# ^Completed
+Completata
+# ^LicenseText
+Leggere la licenza prima di procedere con l'installazione di $(^NameDA). Se si accettano le condizioni di licenza, selezionare Accetto.
+# ^LicenseTextCB
+Leggere la licenza prima di procedere con l'installazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la casella sottostante. $_CLICK
+# ^LicesnseTextRB
+Leggere la licenza prima di procedere con l'installazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la prima delle opzioni sottoindicate. $_CLICK
+# ^UnLicenseText
+Leggere la licenza prima di procedere con la disinstallazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare Accetto. $_CLICK
+# ^UnLicenseTextCB
+Leggere la licenza prima di procedere con la disinstallazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la casella sottostante. $_CLICK
+# ^UnLicesnseTextRB
+Leggere la licenza prima di procedere con la disinstallazione di $(^NameDA). Se si accettano pienamente le condizioni di licenza, selezionare la prima delle opzioni sottoindicate. $_CLICK
+# ^Custom
+Personalizzata
+# ^ComponentsText
+Selezionare i componenti che si desidera installare.
+# ^ComponentsSubText1
+Selezionare il tipo d'installazione:
+# ^ComponentsSubText2_NoInstTypes
+Selezionare i componenti da installare:
+# ^ComponentsSubText2
+Oppure, selezionare i componenti opzionali che si desidera installare:
+# ^UnComponentsText
+Selezionare i componenti che si desidera disinstallare.
+# ^UnComponentsSubText1
+Selezionare il tipo di disinstallazione:
+# ^UnComponentsSubText2_NoInstTypes
+Selezionare i componenti da disinstallare:
+# ^UnComponentsSubText2
+Oppure, selezionare i componenti opzionali che si desidera disinstallare :
+# ^DirText
+Questa procedura installerà $(^NameDA) nella cartella seguente. Per installare in una cartella diversa, selezionare Sfoglia e sceglierne un'altra. $_CLICK
+# ^DirSubText
+Cartella di destinazione
+# ^DirBrowseText
+Selezionare la cartella dove installare $(^NameDA):
+# ^UnDirText
+Questa procedura disinstallerà $(^NameDA) nella cartella seguente. Per disinstallare da una cartella diversa, selezionare Sfoglia e sceglierene un'altra. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Selezionare la cartella dalla quale disinstallare $(^NameDA):
+# ^SpaceAvailable
+"Spazio disponibile: "
+# ^SpaceRequired
+"Spazio richiesto: "
+# ^UninstallingText
+$(^NameDA) verrà disinstallato dalla cartella seguente. $_CLICK
+# ^UninstallingSubText
+Rimozione da:
+# ^FileError
+Errore nell'apertura del file per la scrittura: \r\n\t"$0"\r\nSeleziona Termina per interrompere l'installazione,\r\nsu Riprova per ritentare, oppure\r\nsu Ignora per saltare questo file.
+# ^FileError_NoIgnore
+Errore nell'apertura del file per la scrittura: \r\n\t"$0"\r\nSeleziona Riprova per ritentare, oppure\r\nsu Termina per interrompere l'installazione
+# ^CantWrite
+"Impossibile scrivere: "
+# ^CopyFailed
+Copia fallita
+# ^CopyTo
+"Copia in "
+# ^Registering
+"Registrazione in corso: "
+# ^Unregistering
+"Deregistrazione in corso: "
+# ^SymbolNotFound
+"Impossibile trovare il simbolo: "
+# ^CouldNotLoad
+"Impossibile caricare: "
+# ^CreateFolder
+"Crea cartella: "
+# ^CreateShortcut
+"Crea collegamento: "
+# ^CreatedUninstaller
+"Creato il programma di disinstallazione: "
+# ^Delete
+"Elimina file: "
+# ^DeleteOnReboot
+"Elimina al riavvio: "
+# ^ErrorCreatingShortcut
+"Errore nella creazione del collegamento: "
+# ^ErrorCreating
+"Errore nella creazione: "
+# ^ErrorDecompressing
+Errore nella decompressione dei dati! Programma di installazione corrotto?
+# ^ErrorRegistering
+Errore nella registrazione della DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Esecuzione: "
+# ^Extract
+"Estrazione: "
+# ^ErrorWriting
+"Estrazione: errore nella scrittura sul file "
+# ^InvalidOpcode
+Programma di installazione corrotto: opcode non valido
+# ^NoOLE
+"Nessuna OLE per: "
+# ^OutputFolder
+"Cartella di destinazione: "
+# ^RemoveFolder
+"Rimuovi cartella: "
+# ^RenameOnReboot
+"Rinomina al riavvio: "
+# ^Rename
+Rinomina
+# ^Skipped
+"Saltato: "
+# ^CopyDetails
+Copia i dettagli negli appunti
+# ^LogInstall
+Log del processo di installazione
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Italian.nsh b/Contrib/Language files/Italian.nsh
index cdf9e13..1f46370 100755
--- a/Contrib/Language files/Italian.nsh
+++ b/Contrib/Language files/Italian.nsh
@@ -1,123 +1,123 @@
-;Language: Italian (1040)
-;By SANFACE Software <sanface@sanface.com> v1.67 accents
-;Review and update from v1.65 to v1.67 by Alessandro Staltari < staltari (a) geocities.com >
-;Review and update from v1.67 to v1.68 by Lorenzo Bevilacqua < meow811@libero.it >
-
-!insertmacro LANGFILE "Italian" "Italiano"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Benvenuti nel programma di installazione di $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Questo programma installerà $(^NameDA) nel vostro computer.$\r$\n$\r$\nSi raccomanda di chiudere tutte le altre applicazioni prima di iniziare l'installazione. Questo permetterà al programma di installazione di aggiornare i file di sistema senza dover riavviare il computer.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Benvenuti nella procedura guidata di disinstallazione di $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Questa procedura vi guiderà nella disinstallazione di $(^NameDA).$\r$\n$\r$\nPrima di iniziare la disinstallazione, assicuratevi che $(^Name) non sia in esecuzione.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenza d'uso"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Prego leggere le condizioni della licenza d'uso prima di installare $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se si accettano i termini della licenza d'uso scegliere Accetto per continuare. È necessario accettare i termini della licenza d'uso per installare $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se si accettano i termini della licenza d'uso, selezionare la casella sottostante. È necessario accettare i termini della licenza d'uso per installare $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se si accettano i termini della licenza d'uso, selezionare la prima opzione sottostante. È necessario accettare i termini della licenza d'uso per installare $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenza d'uso"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Prego leggere le condizioni della licenza d'uso prima di disinstallare $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se si accettano i termini della licenza d'uso scegliere Accetto per continuare. È necessario accettare i termini della licenza d'uso per disinstallare $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se si accettano i termini della licenza d'uso, selezionare la casella sottostante. È necessario accettare i termini della licenza d'uso per disinstallare $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se si accettano i termini della licenza d'uso, selezionare la prima opzione sottostante. È necessario accettare i termini della licenza d'uso per disinstallare $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Premere Page Down per vedere il resto della licenza d'uso."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selezione dei componenti"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Selezionare i componenti di $(^NameDA) che si desidera installare."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrizione"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selezione componenti"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Scegliere i componenti di $(^NameDA) che si desidera disinstallare."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posizionare il puntatore del mouse sul componente per vederne la descrizione."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posizionare il puntatore del mouse sul componente per vederne la descrizione."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Scelta della cartella di installazione"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Scegliere la cartella nella quale installare $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Scelta della cartella da cui disinstallare"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Scegliere la cartella dalla quale disinstallare $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installazione in corso"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Prego attendere mentre $(^NameDA) viene installato."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installazione completata"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "L'installazione è stata completata con successo."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installazione interrotta"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "L'installazione non è stata completata correttamente."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Disinstallazione in corso"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Prego attendere mentre $(^NameDA) viene disinstallato."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Disinstallazione completata"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La disinstallazione è stata completata con successo."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Disinstallazione interrotta"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La disintallazione non è stata completata correttamente."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completamento dell'installazione di $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) è stato installato sul vostro computer.$\r$\n$\r$\nScegliere Fine per chiudere il programma di installazione."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Il computer deve essere riavviato per completare l'installazione di $(^NameDA). Vuoi riavviarlo ora?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completamento della disinstallazione di $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) è stato disinstallato dal computer.$\r$\n$\r$\nSelezionare Fine per terminare questa procedura."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Il computer deve essere riavviato per completare l'installazione di $(^NameDA). Vuoi riavviarlo ora?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Riavvia adesso"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Preferisco riavviarlo manualmente più tardi"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Esegui $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Mostra il file Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fine"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Scelta della cartella del menu Start"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Scegliere una cartella del menu Start per i collegamenti del programma."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Scegliere la cartella del menu Start in cui verranno creati i collegamenti del programma. È possibile inserire un nome per creare una nuova cartella."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Non creare i collegamenti al programma."
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Disinstalla $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Rimuove $(^NameDA) dal computer."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Sei sicuro di voler interrompere l'installazione di $(^Name) ?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sei sicuro di voler interrompere la disinstallazione di $(^Name)?"
-!endif
+;Language: Italian (1040)
+;By SANFACE Software <sanface@sanface.com> v1.67 accents
+;Review and update from v1.65 to v1.67 by Alessandro Staltari < staltari (a) geocities.com >
+;Review and update from v1.67 to v1.68 by Lorenzo Bevilacqua < meow811@libero.it >
+
+!insertmacro LANGFILE "Italian" "Italiano"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Benvenuti nel programma di installazione di $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Questo programma installerà $(^NameDA) nel vostro computer.$\r$\n$\r$\nSi raccomanda di chiudere tutte le altre applicazioni prima di iniziare l'installazione. Questo permetterà al programma di installazione di aggiornare i file di sistema senza dover riavviare il computer.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Benvenuti nella procedura guidata di disinstallazione di $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Questa procedura vi guiderà nella disinstallazione di $(^NameDA).$\r$\n$\r$\nPrima di iniziare la disinstallazione, assicuratevi che $(^Name) non sia in esecuzione.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenza d'uso"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Prego leggere le condizioni della licenza d'uso prima di installare $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se si accettano i termini della licenza d'uso scegliere Accetto per continuare. È necessario accettare i termini della licenza d'uso per installare $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se si accettano i termini della licenza d'uso, selezionare la casella sottostante. È necessario accettare i termini della licenza d'uso per installare $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se si accettano i termini della licenza d'uso, selezionare la prima opzione sottostante. È necessario accettare i termini della licenza d'uso per installare $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenza d'uso"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Prego leggere le condizioni della licenza d'uso prima di disinstallare $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se si accettano i termini della licenza d'uso scegliere Accetto per continuare. È necessario accettare i termini della licenza d'uso per disinstallare $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se si accettano i termini della licenza d'uso, selezionare la casella sottostante. È necessario accettare i termini della licenza d'uso per disinstallare $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se si accettano i termini della licenza d'uso, selezionare la prima opzione sottostante. È necessario accettare i termini della licenza d'uso per disinstallare $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Premere Page Down per vedere il resto della licenza d'uso."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selezione dei componenti"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Selezionare i componenti di $(^NameDA) che si desidera installare."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrizione"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selezione componenti"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Scegliere i componenti di $(^NameDA) che si desidera disinstallare."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posizionare il puntatore del mouse sul componente per vederne la descrizione."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posizionare il puntatore del mouse sul componente per vederne la descrizione."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Scelta della cartella di installazione"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Scegliere la cartella nella quale installare $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Scelta della cartella da cui disinstallare"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Scegliere la cartella dalla quale disinstallare $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installazione in corso"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Prego attendere mentre $(^NameDA) viene installato."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installazione completata"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "L'installazione è stata completata con successo."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installazione interrotta"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "L'installazione non è stata completata correttamente."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Disinstallazione in corso"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Prego attendere mentre $(^NameDA) viene disinstallato."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Disinstallazione completata"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La disinstallazione è stata completata con successo."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Disinstallazione interrotta"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La disintallazione non è stata completata correttamente."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completamento dell'installazione di $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) è stato installato sul vostro computer.$\r$\n$\r$\nScegliere Fine per chiudere il programma di installazione."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Il computer deve essere riavviato per completare l'installazione di $(^NameDA). Vuoi riavviarlo ora?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completamento della disinstallazione di $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) è stato disinstallato dal computer.$\r$\n$\r$\nSelezionare Fine per terminare questa procedura."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Il computer deve essere riavviato per completare l'installazione di $(^NameDA). Vuoi riavviarlo ora?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Riavvia adesso"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Preferisco riavviarlo manualmente più tardi"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Esegui $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Mostra il file Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fine"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Scelta della cartella del menu Start"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Scegliere una cartella del menu Start per i collegamenti del programma."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Scegliere la cartella del menu Start in cui verranno creati i collegamenti del programma. È possibile inserire un nome per creare una nuova cartella."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Non creare i collegamenti al programma."
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Disinstalla $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Rimuove $(^NameDA) dal computer."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Sei sicuro di voler interrompere l'installazione di $(^Name) ?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sei sicuro di voler interrompere la disinstallazione di $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Japanese.nlf b/Contrib/Language files/Japanese.nlf
index 33ae55e..3045126 100755
--- a/Contrib/Language files/Japanese.nlf
+++ b/Contrib/Language files/Japanese.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1041
-# Font and size - dash (-) means default
-‚l‚r ‚oƒSƒVƒbƒN
-9
-# Codepage - dash (-) means ANSI code page
-932
-# RTL - anything else than RTL means LTR
--
-# Translation by Dnanako, updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) ƒZƒbƒgƒAƒbƒv
-# ^UninstallCaption
-$(^Name) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹
-# ^LicenseSubCaption
-Fƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘
-# ^ComponentsSubCaption
-FƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“
-# ^DirSubCaption
-FƒCƒ“ƒXƒg[ƒ‹ ƒtƒHƒ‹ƒ_
-# ^InstallingSubCaption
-FƒCƒ“ƒXƒg[ƒ‹
-# ^CompletedSubCaption
-FŠ®—¹
-# ^UnComponentsSubCaption
-: ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“
-# ^UnDirSubCaption
-: ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒtƒHƒ‹ƒ_
-# ^ComfirmSubCaption
-FŠm”F
-# ^UninstallingSubCaption
-FƒAƒ“ƒCƒ“ƒXƒg[ƒ‹
-# ^UnCompletedSubCaption
-FŠ®—¹
-# ^BackBtn
-< –ß‚é(&B)
-# ^NextBtn
-ŽŸ‚Ö(&N) >
-# ^AgreeBtn
-“¯ˆÓ‚·‚é(&A)
-# ^AcceptBtn
-‚±‚̃‰ƒCƒZƒ“ƒXŒ_–ñ‘‚É“¯ˆÓ‚µ‚Ü‚·(&A)
-# ^DontAcceptBtn
-‚±‚̃‰ƒCƒZƒ“ƒXŒ_–ñ‘‚É‚Í“¯ˆÓ‚Å‚«‚Ü‚¹‚ñ(&D)
-# ^InstallBtn
-ƒCƒ“ƒXƒg[ƒ‹
-# ^UninstallBtn
-±Ý²Ý½Ä°Ù(&U)
-# ^CancelBtn
-ƒLƒƒƒ“ƒZƒ‹
-# ^CloseBtn
-•Â‚¶‚é(&C)
-# ^BrowseBtn
-ŽQÆ(&R)...
-# ^ShowDetailsBtn
-Úׂð•\Ž¦(&D)
-# ^ClickNext
-‘±‚¯‚é‚É‚Í [ŽŸ‚Ö] ‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
-# ^ClickInstall
-ƒCƒ“ƒXƒg[ƒ‹‚ðŽn‚ß‚é‚É‚Í [ƒCƒ“ƒXƒg[ƒ‹] ‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
-# ^ClickUninstall
-ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŽn‚ß‚é‚É‚Í [±Ý²Ý½Ä°Ù] ‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
-# ^Name
-ƒAƒvƒŠƒP[ƒVƒ‡ƒ“
-# ^Completed
-Š®—¹
-# ^LicenseText
-$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ƒ{ƒ^ƒ“‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
-# ^LicenseTextCB
-$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B $_CLICK
-# ^LicenseTextRB
-$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B $_CLICK
-# ^UnLicenseText
-$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ƒ{ƒ^ƒ“‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
-# ^UnLicenseTextCB
-$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B $_CLICK
-# ^UnLicenseTextRB
-$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B $_CLICK
-# ^Custom
-ƒJƒXƒ^ƒ€
-# ^ComponentsText
-ƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚¢ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ƀ`ƒFƒbƒN‚ð•t‚¯‚ĉº‚³‚¢B•s—v‚È‚à‚̂ɂ‚¢‚Ä‚ÍAƒ`ƒFƒbƒN‚ðŠO‚µ‚ĉº‚³‚¢B $_CLICK
-# ^ComponentsSubText1
-ƒCƒ“ƒXƒg[ƒ‹ ƒ^ƒCƒv‚ð‘I‘ðF
-# ^ComponentsSubText2_NoInstTypes
-ƒCƒ“ƒXƒg[ƒ‹ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
-# ^ComponentsSubText2
-‚Ü‚½‚ÍAƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
-# ^UnComponentsText
-ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚¢ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ƀ`ƒFƒbƒN‚ð•t‚¯‚ĉº‚³‚¢B‚»‚¤‚Å‚È‚¢‚à‚̂ɂ‚¢‚Ä‚ÍAƒ`ƒFƒbƒN‚ðŠO‚µ‚ĉº‚³‚¢B $_CLICK
-# ^UnComponentsSubText1
-ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒ^ƒCƒv‚ð‘I‘ðF
-# ^UnComponentsSubText2_NoInstTypes
-ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
-# ^UnComponentsSubText2
-‚Ü‚½‚ÍAƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
-# ^DirText
-$(^NameDA)‚ðˆÈ‰º‚̃tƒHƒ‹ƒ_‚ɃCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·BˆÙ‚È‚Á‚½ƒtƒHƒ‹ƒ_‚ɃCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍA[ŽQÆ] ‚ð‰Ÿ‚µ‚ÄA•Ê‚̃tƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B $_CLICK
-# ^DirSubText
-ƒCƒ“ƒXƒg[ƒ‹æ ƒtƒHƒ‹ƒ_
-# ^DirBrowseText
-$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢F
-# ^UnDirText
-$(^NameDA)‚ðˆÈ‰º‚̃tƒHƒ‹ƒ_‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·BˆÙ‚È‚Á‚½ƒtƒHƒ‹ƒ_‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍA[ŽQÆ] ‚ð‰Ÿ‚µ‚ÄA•Ê‚̃tƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢F
-# ^SpaceAvailable
-—˜—p‰Â”\‚ȃfƒBƒXƒNƒXƒy[ƒXF
-# ^SpaceRequired
-•K—v‚ȃfƒBƒXƒNƒXƒy[ƒXF
-# ^UninstallingText
-$(^NameDA)‚ÍAˆÈ‰º‚̃tƒHƒ‹ƒ_‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B $_CLICK
-# ^UninstallingSubText
-ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹Œ³F
-# ^FileError
-‰Šúƒtƒ@ƒCƒ‹‚Ì쬃Gƒ‰[F\r\n\t"$0"\r\nƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚É‚Í’†Ž~‚ð,\r\nÄ‚Ñ‚±‚̃tƒ@ƒCƒ‹‚Ìì¬‚ðŽŽ‚Ý‚é‚É‚ÍÄŽŽs‚ð, ‚Ü‚½\r\n‚±‚̃tƒ@ƒCƒ‹‚ðƒXƒLƒbƒv‚µ‚Ä‘±‚¯‚é‚É‚Í–³Ž‹‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢
-# ^FileError_NoIgnore
-‰Šúƒtƒ@ƒCƒ‹‚Ì쬃Gƒ‰[: \r\n\t"$0"\r\nÄ‚Ñ‚±‚̃tƒ@ƒCƒ‹‚Ìì¬‚ðŽŽ‚Ý‚é‚É‚ÍÄŽŽs‚ð, ‚Ü‚½\r\nƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚ɂ̓Lƒƒƒ“ƒZƒ‹‚ð‰Ÿ‚µ‚ĉº‚³‚¢
-# ^CantWrite
-쬂ł«‚Ü‚¹‚ñF
-# ^CopyFailed
-ƒRƒs[‚ÍŽ¸”s‚µ‚Ü‚µ‚½
-# ^CopyTo
-ƒRƒs[‚µ‚Ü‚·
-# ^Registering
-“o˜^’†:
-# ^Unregistering
-“o˜^‰ðœ’†:
-# ^SymbolNotFound
-ƒVƒ“ƒ{ƒ‹‚ðŒ©‚Â‚¯‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñF
-# ^CouldNotLoad
-ƒ[ƒh‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñF
-# ^CreateFolder
-ƒtƒHƒ‹ƒ_‚Ìì¬F
-# ^CreateShortcut
-ƒVƒ‡[ƒgƒJƒbƒg‚Ìì¬F
-# ^CreatedUninstaller
-ƒAƒ“ƒCƒ“ƒXƒg[ƒ‰‚Ìì¬F
-# ^Delete
-ƒtƒ@ƒCƒ‹‚ÌíœF
-# ^DeleteOnReboot
-ƒŠƒu[ƒgŽž‚ÉíœF
-# ^ErrorCreatingShortcut
-ƒVƒ‡[ƒgƒJƒbƒg‚Ì쬃Gƒ‰[F
-# ^ErrorCreating
-쬃Gƒ‰[F
-# ^ErrorDecompressing
-ƒf[ƒ^‚Ì’ŠoƒGƒ‰[\r\n\r\nƒCƒ“ƒXƒg[ƒ‰‚ª”j‘¹‚µ‚Ä‚¢‚Ü‚·B
-# ^ErrorRegistering
-DLL‚Ì“o˜^ƒGƒ‰[
-# ^ExecShell
-Šg’£Žq‚ÌŠÖ˜A•t‚¯ŽÀs:
-# ^Execute
-ŽÀsF
-# ^Extract
-’ŠoF
-# ^ErrorWriting
-’ŠoFƒtƒ@ƒCƒ‹ì¬ƒGƒ‰[
-# ^InvalidOpcode
-ƒCƒ“ƒXƒg[ƒ‹‚Ì•s³F–³Œø‚Èopcode
-# ^NoOLE
-OLE‚ª‚ ‚è‚Ü‚¹‚ñF
-# ^OutputFolder
-o—ÍæƒtƒHƒ‹ƒ_F
-# ^RemoveFolder
-ƒtƒHƒ‹ƒ_‚ÌíœF
-# ^RenameOnReboot
-ƒŠƒu[ƒgŽž‚É–¼‘O‚Ì•ÏXF
-# ^Rename
-–¼‘O‚Ì•ÏXF
-# ^Skipped
-ƒXƒLƒbƒvF
-# ^CopyDetails
-ƒNƒŠƒbƒvƒ{[ƒh‚ÖÚׂðƒRƒs[
-# ^LogInstall
-ƒCƒ“ƒXƒg[ƒ‹ƒvƒƒZƒX‚ðƒƒOƒw‹L˜^
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1041
+# Font and size - dash (-) means default
+‚l‚r ‚oƒSƒVƒbƒN
+9
+# Codepage - dash (-) means ANSI code page
+932
+# RTL - anything else than RTL means LTR
+-
+# Translation by Dnanako, updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) ƒZƒbƒgƒAƒbƒv
+# ^UninstallCaption
+$(^Name) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹
+# ^LicenseSubCaption
+Fƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘
+# ^ComponentsSubCaption
+FƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“
+# ^DirSubCaption
+FƒCƒ“ƒXƒg[ƒ‹ ƒtƒHƒ‹ƒ_
+# ^InstallingSubCaption
+FƒCƒ“ƒXƒg[ƒ‹
+# ^CompletedSubCaption
+FŠ®—¹
+# ^UnComponentsSubCaption
+: ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“
+# ^UnDirSubCaption
+: ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒtƒHƒ‹ƒ_
+# ^ComfirmSubCaption
+FŠm”F
+# ^UninstallingSubCaption
+FƒAƒ“ƒCƒ“ƒXƒg[ƒ‹
+# ^UnCompletedSubCaption
+FŠ®—¹
+# ^BackBtn
+< –ß‚é(&B)
+# ^NextBtn
+ŽŸ‚Ö(&N) >
+# ^AgreeBtn
+“¯ˆÓ‚·‚é(&A)
+# ^AcceptBtn
+‚±‚̃‰ƒCƒZƒ“ƒXŒ_–ñ‘‚É“¯ˆÓ‚µ‚Ü‚·(&A)
+# ^DontAcceptBtn
+‚±‚̃‰ƒCƒZƒ“ƒXŒ_–ñ‘‚É‚Í“¯ˆÓ‚Å‚«‚Ü‚¹‚ñ(&D)
+# ^InstallBtn
+ƒCƒ“ƒXƒg[ƒ‹
+# ^UninstallBtn
+±Ý²Ý½Ä°Ù(&U)
+# ^CancelBtn
+ƒLƒƒƒ“ƒZƒ‹
+# ^CloseBtn
+•Â‚¶‚é(&C)
+# ^BrowseBtn
+ŽQÆ(&R)...
+# ^ShowDetailsBtn
+Úׂð•\Ž¦(&D)
+# ^ClickNext
+‘±‚¯‚é‚É‚Í [ŽŸ‚Ö] ‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
+# ^ClickInstall
+ƒCƒ“ƒXƒg[ƒ‹‚ðŽn‚ß‚é‚É‚Í [ƒCƒ“ƒXƒg[ƒ‹] ‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
+# ^ClickUninstall
+ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŽn‚ß‚é‚É‚Í [±Ý²Ý½Ä°Ù] ‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
+# ^Name
+ƒAƒvƒŠƒP[ƒVƒ‡ƒ“
+# ^Completed
+Š®—¹
+# ^LicenseText
+$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ƒ{ƒ^ƒ“‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
+# ^LicenseTextCB
+$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B $_CLICK
+# ^LicenseTextRB
+$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B $_CLICK
+# ^UnLicenseText
+$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ƒ{ƒ^ƒ“‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B
+# ^UnLicenseTextCB
+$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚ĉº‚³‚¢B $_CLICK
+# ^UnLicenseTextRB
+$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘‚ðŠm”F‚µ‚ĉº‚³‚¢BŒ_–ñ‘‚Ì‘S‚Ä‚ÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B $_CLICK
+# ^Custom
+ƒJƒXƒ^ƒ€
+# ^ComponentsText
+ƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚¢ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ƀ`ƒFƒbƒN‚ð•t‚¯‚ĉº‚³‚¢B•s—v‚È‚à‚̂ɂ‚¢‚Ä‚ÍAƒ`ƒFƒbƒN‚ðŠO‚µ‚ĉº‚³‚¢B $_CLICK
+# ^ComponentsSubText1
+ƒCƒ“ƒXƒg[ƒ‹ ƒ^ƒCƒv‚ð‘I‘ðF
+# ^ComponentsSubText2_NoInstTypes
+ƒCƒ“ƒXƒg[ƒ‹ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
+# ^ComponentsSubText2
+‚Ü‚½‚ÍAƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
+# ^UnComponentsText
+ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚½‚¢ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ƀ`ƒFƒbƒN‚ð•t‚¯‚ĉº‚³‚¢B‚»‚¤‚Å‚È‚¢‚à‚̂ɂ‚¢‚Ä‚ÍAƒ`ƒFƒbƒN‚ðŠO‚µ‚ĉº‚³‚¢B $_CLICK
+# ^UnComponentsSubText1
+ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒ^ƒCƒv‚ð‘I‘ðF
+# ^UnComponentsSubText2_NoInstTypes
+ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
+# ^UnComponentsSubText2
+‚Ü‚½‚ÍAƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“ ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ðF
+# ^DirText
+$(^NameDA)‚ðˆÈ‰º‚̃tƒHƒ‹ƒ_‚ɃCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·BˆÙ‚È‚Á‚½ƒtƒHƒ‹ƒ_‚ɃCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍA[ŽQÆ] ‚ð‰Ÿ‚µ‚ÄA•Ê‚̃tƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B $_CLICK
+# ^DirSubText
+ƒCƒ“ƒXƒg[ƒ‹æ ƒtƒHƒ‹ƒ_
+# ^DirBrowseText
+$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢F
+# ^UnDirText
+$(^NameDA)‚ðˆÈ‰º‚̃tƒHƒ‹ƒ_‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·BˆÙ‚È‚Á‚½ƒtƒHƒ‹ƒ_‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍA[ŽQÆ] ‚ð‰Ÿ‚µ‚ÄA•Ê‚̃tƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢F
+# ^SpaceAvailable
+—˜—p‰Â”\‚ȃfƒBƒXƒNƒXƒy[ƒXF
+# ^SpaceRequired
+•K—v‚ȃfƒBƒXƒNƒXƒy[ƒXF
+# ^UninstallingText
+$(^NameDA)‚ÍAˆÈ‰º‚̃tƒHƒ‹ƒ_‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚·B $_CLICK
+# ^UninstallingSubText
+ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹Œ³F
+# ^FileError
+‰Šúƒtƒ@ƒCƒ‹‚Ì쬃Gƒ‰[F\r\n\t"$0"\r\nƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚É‚Í’†Ž~‚ð,\r\nÄ‚Ñ‚±‚̃tƒ@ƒCƒ‹‚Ìì¬‚ðŽŽ‚Ý‚é‚É‚ÍÄŽŽs‚ð, ‚Ü‚½\r\n‚±‚̃tƒ@ƒCƒ‹‚ðƒXƒLƒbƒv‚µ‚Ä‘±‚¯‚é‚É‚Í–³Ž‹‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢
+# ^FileError_NoIgnore
+‰Šúƒtƒ@ƒCƒ‹‚Ì쬃Gƒ‰[: \r\n\t"$0"\r\nÄ‚Ñ‚±‚̃tƒ@ƒCƒ‹‚Ìì¬‚ðŽŽ‚Ý‚é‚É‚ÍÄŽŽs‚ð, ‚Ü‚½\r\nƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚ɂ̓Lƒƒƒ“ƒZƒ‹‚ð‰Ÿ‚µ‚ĉº‚³‚¢
+# ^CantWrite
+쬂ł«‚Ü‚¹‚ñF
+# ^CopyFailed
+ƒRƒs[‚ÍŽ¸”s‚µ‚Ü‚µ‚½
+# ^CopyTo
+ƒRƒs[‚µ‚Ü‚·
+# ^Registering
+“o˜^’†:
+# ^Unregistering
+“o˜^‰ðœ’†:
+# ^SymbolNotFound
+ƒVƒ“ƒ{ƒ‹‚ðŒ©‚Â‚¯‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñF
+# ^CouldNotLoad
+ƒ[ƒh‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñF
+# ^CreateFolder
+ƒtƒHƒ‹ƒ_‚Ìì¬F
+# ^CreateShortcut
+ƒVƒ‡[ƒgƒJƒbƒg‚Ìì¬F
+# ^CreatedUninstaller
+ƒAƒ“ƒCƒ“ƒXƒg[ƒ‰‚Ìì¬F
+# ^Delete
+ƒtƒ@ƒCƒ‹‚ÌíœF
+# ^DeleteOnReboot
+ƒŠƒu[ƒgŽž‚ÉíœF
+# ^ErrorCreatingShortcut
+ƒVƒ‡[ƒgƒJƒbƒg‚Ì쬃Gƒ‰[F
+# ^ErrorCreating
+쬃Gƒ‰[F
+# ^ErrorDecompressing
+ƒf[ƒ^‚Ì’ŠoƒGƒ‰[\r\n\r\nƒCƒ“ƒXƒg[ƒ‰‚ª”j‘¹‚µ‚Ä‚¢‚Ü‚·B
+# ^ErrorRegistering
+DLL‚Ì“o˜^ƒGƒ‰[
+# ^ExecShell
+Šg’£Žq‚ÌŠÖ˜A•t‚¯ŽÀs:
+# ^Execute
+ŽÀsF
+# ^Extract
+’ŠoF
+# ^ErrorWriting
+’ŠoFƒtƒ@ƒCƒ‹ì¬ƒGƒ‰[
+# ^InvalidOpcode
+ƒCƒ“ƒXƒg[ƒ‹‚Ì•s³F–³Œø‚Èopcode
+# ^NoOLE
+OLE‚ª‚ ‚è‚Ü‚¹‚ñF
+# ^OutputFolder
+o—ÍæƒtƒHƒ‹ƒ_F
+# ^RemoveFolder
+ƒtƒHƒ‹ƒ_‚ÌíœF
+# ^RenameOnReboot
+ƒŠƒu[ƒgŽž‚É–¼‘O‚Ì•ÏXF
+# ^Rename
+–¼‘O‚Ì•ÏXF
+# ^Skipped
+ƒXƒLƒbƒvF
+# ^CopyDetails
+ƒNƒŠƒbƒvƒ{[ƒh‚ÖÚׂðƒRƒs[
+# ^LogInstall
+ƒCƒ“ƒXƒg[ƒ‹ƒvƒƒZƒX‚ðƒƒOƒw‹L˜^
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Japanese.nsh b/Contrib/Language files/Japanese.nsh
index 6ee7f19..e3af5b0 100755
--- a/Contrib/Language files/Japanese.nsh
+++ b/Contrib/Language files/Japanese.nsh
@@ -1,122 +1,122 @@
-;Language: Japanese (1041)
-;By Dnanako
-;Translation updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
-
-!insertmacro LANGFILE "Japanese" "Japanese"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) ƒZƒbƒgƒAƒbƒv ƒEƒBƒU[ƒh‚ւ悤‚±‚»"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "‚±‚̃EƒBƒU[ƒh‚ÍA$(^NameDA)‚̃Cƒ“ƒXƒg[ƒ‹‚ðƒKƒCƒh‚µ‚Ä‚¢‚«‚Ü‚·B\r\n\r\nƒZƒbƒgƒAƒbƒv‚ðŠJŽn‚·‚é‘O‚ÉA‘¼‚Ì‚·‚ׂẴAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðI—¹‚·‚邱‚Æ‚ð„§‚µ‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ăZƒbƒgƒAƒbƒv‚ªƒRƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚¹‚¸‚ÉAƒVƒXƒeƒ€ ƒtƒ@ƒCƒ‹‚ðXV‚·‚邱‚Æ‚ªo—ˆ‚é‚悤‚É‚È‚è‚Ü‚·B\r\n\r\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒEƒBƒU[ƒh‚ւ悤‚±‚»"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "‚±‚̃EƒBƒU[ƒh‚ÍA$(^NameDA)‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðƒKƒCƒh‚µ‚Ä‚¢‚«‚Ü‚·B\r\n\r\nƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŠJŽn‚·‚é‘O‚ÉA$(^NameDA)‚ª‹N“®‚µ‚Ä‚¢‚È‚¢‚±‚Æ‚ðŠm”F‚µ‚ĉº‚³‚¢B\r\n\r\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "ƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXðŒ‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ‚ð‘I‚ñ‚ŃCƒ“ƒXƒg[ƒ‹‚𑱂¯‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B$(^NameDA) ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXðŒ‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ‚ð‘I‚ñ‚ŃAƒ“ƒCƒ“ƒXƒg[ƒ‹‚𑱂¯‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B$(^NameDA) ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "[Page Down]‚ð‰Ÿ‚µ‚ÄŒ_–ñ‘‚ð‚·‚×‚Ä‚¨“Ç‚Ý‚­‚¾‚³‚¢B"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA)‚̃Cƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "à–¾"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ìã‚Ƀ}ƒEƒX ƒJ[ƒ\ƒ‹‚ðˆÚ“®‚·‚é‚ÆA‚±‚±‚Éà–¾‚ª•\Ž¦‚³‚ê‚Ü‚·B"
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ìã‚Ƀ}ƒEƒX ƒJ[ƒ\ƒ‹‚ðˆÚ“®‚·‚é‚ÆA‚±‚±‚Éà–¾‚ª•\Ž¦‚³‚ê‚Ü‚·B"
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ƒCƒ“ƒXƒg[ƒ‹æ‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹Œ³‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ƒCƒ“ƒXƒg[ƒ‹"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚¢‚Ü‚·B‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_TEXT_FINISH_TITLE "ƒCƒ“ƒXƒg[ƒ‹‚ÌŠ®—¹"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ƒCƒ“ƒXƒg[ƒ‹‚ɬŒ÷‚µ‚Ü‚µ‚½B"
- ${LangFileString} MUI_TEXT_ABORT_TITLE "ƒCƒ“ƒXƒg[ƒ‹‚Ì’†Ž~"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ƒZƒbƒgƒAƒbƒv‚ͳí‚ÉŠ®—¹‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B"
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚¢‚Ü‚·B‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ÌŠ®—¹"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ɬŒ÷‚µ‚Ü‚µ‚½B"
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚Ì’†Ž~"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ͳí‚ÉŠ®—¹‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) ƒZƒbƒgƒAƒbƒv ƒEƒBƒU[ƒh‚ÍŠ®—¹‚µ‚Ü‚µ‚½B"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚µ‚½B\r\n\r\nƒEƒBƒU[ƒh‚ð•Â‚¶‚é‚É‚Í [Š®—¹] ‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) ‚̃Cƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚é‚É‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B¡‚·‚®Ä‹N“®‚µ‚Ü‚·‚©H"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒEƒBƒU[ƒh‚ÍŠ®—¹‚µ‚Ü‚µ‚½B"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA)‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚µ‚½B\r\n\r\nƒEƒBƒU[ƒh‚ð•Â‚¶‚é‚É‚Í [Š®—¹] ‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) ‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚é‚É‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B¡‚·‚®Ä‹N“®‚µ‚Ü‚·‚©H"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "¡‚·‚®Ä‹N“®‚·‚é"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Œã‚ÅŽè“®‚ÅÄ‹N“®‚·‚é"
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA)‚ðŽÀs(&R)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Readme ‚ð•\Ž¦‚·‚é(&S)"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "Š®—¹(&F)"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ƒXƒ^[ƒgƒƒjƒ…[ ƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "$(^NameDA)‚̃Vƒ‡[ƒgƒJƒbƒg‚ð쬂·‚éƒXƒ^[ƒgƒƒjƒ…[ ƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚ʼnº‚³‚¢B"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "‚±‚̃vƒƒOƒ‰ƒ€‚̃Vƒ‡[ƒgƒJƒbƒg‚ð쬂µ‚½‚¢ƒXƒ^[ƒgƒƒjƒ…[ ƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B‚Ü‚½A쬂·‚éV‚µ‚¢ƒtƒHƒ‹ƒ_‚É–¼‘O‚ð‚‚¯‚邱‚Æ‚à‚Å‚«‚Ü‚·B"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "ƒVƒ‡[ƒgƒJƒbƒg‚ð쬂µ‚È‚¢"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA)‚ð‚±‚ÌƒRƒ“ƒsƒ…[ƒ^‚©‚ç휂µ‚Ü‚·B"
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) ƒZƒbƒgƒAƒbƒv‚𒆎~‚µ‚Ü‚·‚©H"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚µ‚Ü‚·‚©H"
-!endif
+;Language: Japanese (1041)
+;By Dnanako
+;Translation updated by Takahiro Yoshimura <takahiro_y@monolithworks.co.jp>
+
+!insertmacro LANGFILE "Japanese" "Japanese"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) ƒZƒbƒgƒAƒbƒv ƒEƒBƒU[ƒh‚ւ悤‚±‚»"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "‚±‚̃EƒBƒU[ƒh‚ÍA$(^NameDA)‚̃Cƒ“ƒXƒg[ƒ‹‚ðƒKƒCƒh‚µ‚Ä‚¢‚«‚Ü‚·B$\r$\n$\r$\nƒZƒbƒgƒAƒbƒv‚ðŠJŽn‚·‚é‘O‚ÉA‘¼‚Ì‚·‚ׂẴAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðI—¹‚·‚邱‚Æ‚ð„§‚µ‚Ü‚·B‚±‚ê‚É‚æ‚Á‚ăZƒbƒgƒAƒbƒv‚ªƒRƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚¹‚¸‚ÉAƒVƒXƒeƒ€ ƒtƒ@ƒCƒ‹‚ðXV‚·‚邱‚Æ‚ªo—ˆ‚é‚悤‚É‚È‚è‚Ü‚·B$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒEƒBƒU[ƒh‚ւ悤‚±‚»"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "‚±‚̃EƒBƒU[ƒh‚ÍA$(^NameDA)‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðƒKƒCƒh‚µ‚Ä‚¢‚«‚Ü‚·B$\r$\n$\r$\nƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŠJŽn‚·‚é‘O‚ÉA$(^NameDA)‚ª‹N“®‚µ‚Ä‚¢‚È‚¢‚±‚Æ‚ðŠm”F‚µ‚ĉº‚³‚¢B$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "ƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXðŒ‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ‚ð‘I‚ñ‚ŃCƒ“ƒXƒg[ƒ‹‚𑱂¯‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B$(^NameDA) ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "ƒ‰ƒCƒZƒ“ƒXŒ_–ñ‘"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‘O‚ÉAƒ‰ƒCƒZƒ“ƒXðŒ‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA[“¯ˆÓ‚·‚é] ‚ð‘I‚ñ‚ŃAƒ“ƒCƒ“ƒXƒg[ƒ‹‚𑱂¯‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚̃`ƒFƒbƒNƒ{ƒbƒNƒX‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B$(^NameDA) ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Œ_–ñ‘‚Ì‚·‚ׂĂÌðŒ‚É“¯ˆÓ‚·‚é‚È‚ç‚ÎA‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒIƒvƒVƒ‡ƒ“‚Ì‚¤‚¿Aʼn‚Ì‚à‚Ì‚ð‘I‚ñ‚ʼnº‚³‚¢B$(^NameDA) ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é‚É‚ÍAŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "[Page Down]‚ð‰Ÿ‚µ‚ÄŒ_–ñ‘‚ð‚·‚×‚Ä‚¨“Ç‚Ý‚­‚¾‚³‚¢B"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA)‚̃Cƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "à–¾"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒIƒvƒVƒ‡ƒ“‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ìã‚Ƀ}ƒEƒX ƒJ[ƒ\ƒ‹‚ðˆÚ“®‚·‚é‚ÆA‚±‚±‚Éà–¾‚ª•\Ž¦‚³‚ê‚Ü‚·B"
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ìã‚Ƀ}ƒEƒX ƒJ[ƒ\ƒ‹‚ðˆÚ“®‚·‚é‚ÆA‚±‚±‚Éà–¾‚ª•\Ž¦‚³‚ê‚Ü‚·B"
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "ƒCƒ“ƒXƒg[ƒ‹æ‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹Œ³‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ƒCƒ“ƒXƒg[ƒ‹"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚¢‚Ü‚·B‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "ƒCƒ“ƒXƒg[ƒ‹‚ÌŠ®—¹"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "ƒCƒ“ƒXƒg[ƒ‹‚ɬŒ÷‚µ‚Ü‚µ‚½B"
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "ƒCƒ“ƒXƒg[ƒ‹‚Ì’†Ž~"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ƒZƒbƒgƒAƒbƒv‚ͳí‚ÉŠ®—¹‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B"
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA)‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚¢‚Ü‚·B‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ÌŠ®—¹"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ɬŒ÷‚µ‚Ü‚µ‚½B"
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚Ì’†Ž~"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ͳí‚ÉŠ®—¹‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) ƒZƒbƒgƒAƒbƒv ƒEƒBƒU[ƒh‚ÍŠ®—¹‚µ‚Ü‚µ‚½B"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚µ‚½B$\r$\n$\r$\nƒEƒBƒU[ƒh‚ð•Â‚¶‚é‚É‚Í [Š®—¹] ‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) ‚̃Cƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚é‚É‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B¡‚·‚®Ä‹N“®‚µ‚Ü‚·‚©H"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ ƒEƒBƒU[ƒh‚ÍŠ®—¹‚µ‚Ü‚µ‚½B"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA)‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚©‚çƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚µ‚½B$\r$\n$\r$\nƒEƒBƒU[ƒh‚ð•Â‚¶‚é‚É‚Í [Š®—¹] ‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) ‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚é‚É‚ÍA‚±‚̃Rƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B¡‚·‚®Ä‹N“®‚µ‚Ü‚·‚©H"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "¡‚·‚®Ä‹N“®‚·‚é"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Œã‚ÅŽè“®‚ÅÄ‹N“®‚·‚é"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA)‚ðŽÀs(&R)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Readme ‚ð•\Ž¦‚·‚é(&S)"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "Š®—¹(&F)"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "ƒXƒ^[ƒgƒƒjƒ…[ ƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢B"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "$(^NameDA)‚̃Vƒ‡[ƒgƒJƒbƒg‚ð쬂·‚éƒXƒ^[ƒgƒƒjƒ…[ ƒtƒHƒ‹ƒ_‚ð‘I‚ñ‚ʼnº‚³‚¢B"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "‚±‚̃vƒƒOƒ‰ƒ€‚̃Vƒ‡[ƒgƒJƒbƒg‚ð쬂µ‚½‚¢ƒXƒ^[ƒgƒƒjƒ…[ ƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B‚Ü‚½A쬂·‚éV‚µ‚¢ƒtƒHƒ‹ƒ_‚É–¼‘O‚ð‚‚¯‚邱‚Æ‚à‚Å‚«‚Ü‚·B"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "ƒVƒ‡[ƒgƒJƒbƒg‚ð쬂µ‚È‚¢"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA)‚ð‚±‚ÌƒRƒ“ƒsƒ…[ƒ^‚©‚ç휂µ‚Ü‚·B"
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) ƒZƒbƒgƒAƒbƒv‚𒆎~‚µ‚Ü‚·‚©H"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚µ‚Ü‚·‚©H"
+!endif
diff --git a/Contrib/Language files/Korean.nlf b/Contrib/Language files/Korean.nlf
index 196f195..b9d5a0f 100755
--- a/Contrib/Language files/Korean.nlf
+++ b/Contrib/Language files/Korean.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1042
-# Font and size - dash (-) means default
-±¼¸²
-9
-# Codepage - dash (-) means ANSI code page
-949
-# RTL - anything else than RTL means LTR
--
-# Translation by dTomoyo dtomoyo@empal.com ( ~V2.0 BETA2 ) / By hardkoder@gmail.com (V2.0 BETA3 ~ )
-# ^Branding
-³Î¼ÒÇÁÆ® ¼³Ä¡ ½Ã½ºÅÛ %s
-# ^SetupCaption
-$(^Name) ¼³Ä¡
-# ^UninstallCaption
-$(^Name) Á¦°Å
-# ^LicenseSubCaption
-: »ç¿ë±Ç °è¾à µ¿ÀÇ
-# ^ComponentsSubCaption
-: ¼³Ä¡ ¿É¼Ç
-# ^DirSubCaption
-: Æú´õ ÁöÁ¤
-# ^InstallingSubCaption
-: ÆÄÀÏ ¼³Ä¡Áß
-# ^CompletedSubCaption
-: ¼³Ä¡ ¿Ï·á
-# ^UnComponentsSubCaption
-: Á¦°Å ¿É¼Ç
-# ^UnDirSubCaption
-: Á¦°Å Æú´õ
-# ^ConfirmSubCaption
-: È®ÀÎ
-# ^UninstallingSubCaption
-: Á¦°ÅÁß
-# ^UnCompletedSubCaption
-: Á¦°Å ¿Ï·á
-# ^BackBtn
-< µÚ·Î
-# ^NextBtn
-´ÙÀ½ >
-# ^AgreeBtn
-µ¿ÀÇÇÔ
-# ^AcceptBtn
-À§ »çÇ׿¡ µ¿ÀÇÇÕ´Ï´Ù.
-# ^DontAcceptBtn
-µ¿ÀÇÇÏÁö ¾Ê½À´Ï´Ù.
-# ^InstallBtn
-¼³Ä¡
-# ^UninstallBtn
-Á¦°Å
-# ^CancelBtn
-Ãë¼Ò
-# ^CloseBtn
-´ÝÀ½
-# ^BrowseBtn
-ã¾Æº¸±â...
-# ^ShowDetailsBtn
-ÀÚ¼¼È÷ º¸±â
-# ^ClickNext
-°è¼ÓÇϽ÷Á¸é '´ÙÀ½' ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä.
-# ^ClickInstall
-¼³Ä¡¸¦ ½ÃÀÛÇϽ÷Á¸é '¼³Ä¡' ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä.
-# ^ClickUninstall
-'Á¦°Å' ¹öÆ°À» ´©¸£¸é Á¦°Å°¡ ½ÃÀ۵˴ϴÙ.
-# ^Name
-À̸§
-# ^Completed
-¿Ï·á
-# ^LicenseText
-$(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä.
-# ^LicenseTextCB
-$(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» üũÇØ ÁÖ¼¼¿ä. $_CLICK
-# ^LicesnseTextRB
-$(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ ¿É¼ÇÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
-# ^UnLicenseText
-$(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä.
-# ^UnLicenseTextCB
-$(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» üũÇØ ÁÖ¼¼¿ä. $_CLICK
-# ^UnLicesnseTextRB
-$(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ ¿É¼ÇÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
-# ^Custom
-»ç¿ëÀÚ Á¤ÀÇ
-# ^ComponentsText
-¼³Ä¡¸¦ ¿øÇϽô ±¸¼º ¿ä¼Ò¸¦ ¼±ÅÃÇÏ¿© Áֽñ⠹ٶø´Ï´Ù. $_CLICK
-# ^ComponentsSubText1
-¼³Ä¡ ÇüÅ ¼±ÅÃ:
-# ^ComponentsSubText2_NoInstTypes
-¼³Ä¡ÇÏ·Á´Â ±¸¼º ¿ä¼Ò ¼±ÅÃ:
-# ^ComponentsSubText2
-±¸¼º¿ä¼Ò Á÷Á¢ ¼±ÅÃ:
-# ^UnComponentsText
-Á¦°Å¸¦ ¿øÇÏ´Â ±¸¼º ¿ä¼Ò¸¦ üũÇØ Áֽñ⠹ٶø´Ï´Ù. $_CLICK
-# ^UnComponentsSubText1
-Á¦°Å ÇüÅ ¼±ÅÃ:
-# ^UnComponentsSubText2_NoInstTypes
-Á¦°ÅÇÏ·Á´Â ±¸¼º ¿ä¼Ò ¼±ÅÃ:
-# ^UnComponentsSubText2
-Á¦°ÅÇÏ·Á´Â ±¸¼º¿ä¼Ò Á÷Á¢ ¼±ÅÃ:
-# ^DirText
-$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡ ¼³Ä¡ÇÒ ¿¹Á¤ÀÔ´Ï´Ù. \r\n´Ù¸¥ Æú´õ¿¡ ¼³Ä¡ÇÏ°í ½ÍÀ¸½Ã¸é 'ã¾Æº¸±â' ¹öÆ°À» ´­·¯¼­ ´Ù¸¥ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
-# ^DirSubText
-¼³Ä¡ Æú´õ
-# ^DirBrowseText
-$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡ ¼³Ä¡ÇÕ´Ï´Ù:
-# ^UnDirText
-$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡¼­ Á¦°ÅÇÒ ¿¹Á¤ÀÔ´Ï´Ù. \r\n´Ù¸¥ Æú´õ¿¡¼­ Á¦°ÅÇÏ°í ½ÍÀ¸½Ã¸é 'ã¾Æº¸±â' ¹öÆ°À» ´­·¯¼­ ´Ù¸¥ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡¼­ Á¦°Å ÇÕ´Ï´Ù:
-# ^SpaceAvailable
-"³²Àº µð½ºÅ© °ø°£: "
-# ^SpaceRequired
-"ÇÊ¿äÇÑ µð½ºÅ© °ø°£: "
-# ^UninstallingText
-½Ã½ºÅÛ¿¡¼­ $(^NameDA)(À»)¸¦ Á¦°Å ÇÒ °ÍÀÔ´Ï´Ù. $_CLICK
-# ^UninstallingText
-Á¦°Å ´ë»ó:
-# ^FileError
-´ÙÀ½ ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù.: \r\n\t"$0"\r\n'Áß´Ü'À» ´­·¯ ¼³Ä¡¸¦ Á¾·áÇϰųª,\r'´Ù½Ã ½Ãµµ'¸¦ ´­·¯ ´Ù½Ã ½ÃµµÇØ º¸°Å³ª,\r'¹«½Ã'¸¦ ´­·¯ ÀÌ ÆÄÀÏÀ» °Ç³Ê ¶Ù¼¼¿ä.
-# ^FileError_NoIgnore
-´ÙÀ½ ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù.: \r\n\t"$0"\r\n'´Ù½Ã ½Ãµµ'¸¦ ´­·¯ ´Ù½Ã ½ÃµµÇØ º¸°Å³ª,\r'Ãë¼Ò'¸¦ ´­·¯ ¼³Ä¡¸¦ Á¾·áÇϼ¼¿ä.
-# ^CantWrite
-"±â·ÏÇÒ ¼ö ¾øÀ½: "
-# ^CopyFailed
-º¹»ç ½ÇÆÐ
-# ^CopyTo
-"ÆÄÀÏ º¹»ç "
-# ^Registering
-"µî·ÏÁß: "
-# ^Unregistering
-"µî·Ï ÇØÁ¦Áß: "
-# ^SymbolNotFound
-"½Éº¼À» ãÀ» ¼ö ¾øÀ½: "
-# ^CouldNotLoad
-"ºÒ·¯¿Ã ¼ö ¾øÀ½: "
-# ^CreateFolder
-"Æú´õ »ý¼º: "
-# ^CreateShortcut
-"¹Ù·Î °¡±â »ý¼º: "
-# ^CreatedUninstaller
-"¾ðÀνºÅç·¯ »ý¼º: "
-# ^Delete
-"ÆÄÀÏ »èÁ¦: "
-# ^DeleteOnReboot
-"ÀçºÎÆýà »èÁ¦: "
-# ^ErrorCreatingShortcut
-"¹Ù·Î °¡±â »ý¼º ¿À·ù: "
-# ^ErrorCreating
-"»ý¼º ½ÇÆÐ: "
-# ^ErrorDecompressing
-¾ÐÃà ÇØÁ¦Áß ¿À·ù ¹ß»ý! ¼³Ä¡ ÆÄÀÏÀÌ ¼Õ»óµÇ¾ú½À´Ï´Ù.
-# ^ErrorRegistering
-DLL µî·Ï ½ÇÆÐ
-# ^ExecShell
-"½© ½ÇÇà: "
-# ^Exec
-"½ÇÇà: "
-# ^Extract
-"¾ÐÃà ÇØÁ¦: "
-# ^ErrorWriting
-"¾ÐÃà ÇØÁ¦: ÆÄÀÏÀ» ±â·ÏÇÏ´Â µµÁß ¿À·ù ¹ß»ý "
-# ^InvalidOpcode
-ÀνºÅç·¯ ¼Õ»óµÊ: À߸øµÈ ½ÇÇàÄÚµå
-# ^NoOLE
-"OLE Á¤º¸ ¾øÀ½: "
-# ^OutputFolder
-"´ë»ó Æú´õ: "
-# ^RemoveFolder
-"Æú´õ »èÁ¦: "
-# ^RenameOnReboot
-"ÀçºÎÆýà À̸§ º¯°æ: "
-# ^Rename
-"À̸§ º¯°æ: "
-# ^Skipped
-"°Ç³Ê¶Ü: "
-# ^CopyDetails
-ÀÚ¼¼ÇÑ ³»¿ëÀ» Ŭ¸³º¸µå·Î º¹»ç
-# ^LogInstall
-¼³Ä¡ ·Î±× ÀÛ¼º
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1042
+# Font and size - dash (-) means default
+±¼¸²
+9
+# Codepage - dash (-) means ANSI code page
+949
+# RTL - anything else than RTL means LTR
+-
+# Translation by dTomoyo dtomoyo@empal.com ( ~V2.0 BETA2 ) / By hardkoder@gmail.com (V2.0 BETA3 ~ )
+# ^Branding
+³Î¼ÒÇÁÆ® ¼³Ä¡ ½Ã½ºÅÛ %s
+# ^SetupCaption
+$(^Name) ¼³Ä¡
+# ^UninstallCaption
+$(^Name) Á¦°Å
+# ^LicenseSubCaption
+: »ç¿ë±Ç °è¾à µ¿ÀÇ
+# ^ComponentsSubCaption
+: ¼³Ä¡ ¿É¼Ç
+# ^DirSubCaption
+: Æú´õ ÁöÁ¤
+# ^InstallingSubCaption
+: ÆÄÀÏ ¼³Ä¡Áß
+# ^CompletedSubCaption
+: ¼³Ä¡ ¿Ï·á
+# ^UnComponentsSubCaption
+: Á¦°Å ¿É¼Ç
+# ^UnDirSubCaption
+: Á¦°Å Æú´õ
+# ^ConfirmSubCaption
+: È®ÀÎ
+# ^UninstallingSubCaption
+: Á¦°ÅÁß
+# ^UnCompletedSubCaption
+: Á¦°Å ¿Ï·á
+# ^BackBtn
+< µÚ·Î
+# ^NextBtn
+´ÙÀ½ >
+# ^AgreeBtn
+µ¿ÀÇÇÔ
+# ^AcceptBtn
+À§ »çÇ׿¡ µ¿ÀÇÇÕ´Ï´Ù.
+# ^DontAcceptBtn
+µ¿ÀÇÇÏÁö ¾Ê½À´Ï´Ù.
+# ^InstallBtn
+¼³Ä¡
+# ^UninstallBtn
+Á¦°Å
+# ^CancelBtn
+Ãë¼Ò
+# ^CloseBtn
+´ÝÀ½
+# ^BrowseBtn
+ã¾Æº¸±â...
+# ^ShowDetailsBtn
+ÀÚ¼¼È÷ º¸±â
+# ^ClickNext
+°è¼ÓÇϽ÷Á¸é '´ÙÀ½' ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä.
+# ^ClickInstall
+¼³Ä¡¸¦ ½ÃÀÛÇϽ÷Á¸é '¼³Ä¡' ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä.
+# ^ClickUninstall
+'Á¦°Å' ¹öÆ°À» ´©¸£¸é Á¦°Å°¡ ½ÃÀ۵˴ϴÙ.
+# ^Name
+À̸§
+# ^Completed
+¿Ï·á
+# ^LicenseText
+$(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä.
+# ^LicenseTextCB
+$(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» üũÇØ ÁÖ¼¼¿ä. $_CLICK
+# ^LicesnseTextRB
+$(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ ¿É¼ÇÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
+# ^UnLicenseText
+$(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä.
+# ^UnLicenseTextCB
+$(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» üũÇØ ÁÖ¼¼¿ä. $_CLICK
+# ^UnLicesnseTextRB
+$(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù. ³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ ¿É¼ÇÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
+# ^Custom
+»ç¿ëÀÚ Á¤ÀÇ
+# ^ComponentsText
+¼³Ä¡¸¦ ¿øÇϽô ±¸¼º ¿ä¼Ò¸¦ ¼±ÅÃÇÏ¿© Áֽñ⠹ٶø´Ï´Ù. $_CLICK
+# ^ComponentsSubText1
+¼³Ä¡ ÇüÅ ¼±ÅÃ:
+# ^ComponentsSubText2_NoInstTypes
+¼³Ä¡ÇÏ·Á´Â ±¸¼º ¿ä¼Ò ¼±ÅÃ:
+# ^ComponentsSubText2
+±¸¼º¿ä¼Ò Á÷Á¢ ¼±ÅÃ:
+# ^UnComponentsText
+Á¦°Å¸¦ ¿øÇÏ´Â ±¸¼º ¿ä¼Ò¸¦ üũÇØ Áֽñ⠹ٶø´Ï´Ù. $_CLICK
+# ^UnComponentsSubText1
+Á¦°Å ÇüÅ ¼±ÅÃ:
+# ^UnComponentsSubText2_NoInstTypes
+Á¦°ÅÇÏ·Á´Â ±¸¼º ¿ä¼Ò ¼±ÅÃ:
+# ^UnComponentsSubText2
+Á¦°ÅÇÏ·Á´Â ±¸¼º¿ä¼Ò Á÷Á¢ ¼±ÅÃ:
+# ^DirText
+$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡ ¼³Ä¡ÇÒ ¿¹Á¤ÀÔ´Ï´Ù. \r\n´Ù¸¥ Æú´õ¿¡ ¼³Ä¡ÇÏ°í ½ÍÀ¸½Ã¸é 'ã¾Æº¸±â' ¹öÆ°À» ´­·¯¼­ ´Ù¸¥ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
+# ^DirSubText
+¼³Ä¡ Æú´õ
+# ^DirBrowseText
+$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡ ¼³Ä¡ÇÕ´Ï´Ù:
+# ^UnDirText
+$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡¼­ Á¦°ÅÇÒ ¿¹Á¤ÀÔ´Ï´Ù. \r\n´Ù¸¥ Æú´õ¿¡¼­ Á¦°ÅÇÏ°í ½ÍÀ¸½Ã¸é 'ã¾Æº¸±â' ¹öÆ°À» ´­·¯¼­ ´Ù¸¥ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+$(^NameDA)(À»)¸¦ ´ÙÀ½ Æú´õ¿¡¼­ Á¦°Å ÇÕ´Ï´Ù:
+# ^SpaceAvailable
+"³²Àº µð½ºÅ© °ø°£: "
+# ^SpaceRequired
+"ÇÊ¿äÇÑ µð½ºÅ© °ø°£: "
+# ^UninstallingText
+½Ã½ºÅÛ¿¡¼­ $(^NameDA)(À»)¸¦ Á¦°Å ÇÒ °ÍÀÔ´Ï´Ù. $_CLICK
+# ^UninstallingText
+Á¦°Å ´ë»ó:
+# ^FileError
+´ÙÀ½ ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù.: \r\n\t"$0"\r\n'Áß´Ü'À» ´­·¯ ¼³Ä¡¸¦ Á¾·áÇϰųª,\r'´Ù½Ã ½Ãµµ'¸¦ ´­·¯ ´Ù½Ã ½ÃµµÇØ º¸°Å³ª,\r'¹«½Ã'¸¦ ´­·¯ ÀÌ ÆÄÀÏÀ» °Ç³Ê ¶Ù¼¼¿ä.
+# ^FileError_NoIgnore
+´ÙÀ½ ÆÄÀÏÀ» ¿­ ¼ö ¾ø½À´Ï´Ù.: \r\n\t"$0"\r\n'´Ù½Ã ½Ãµµ'¸¦ ´­·¯ ´Ù½Ã ½ÃµµÇØ º¸°Å³ª,\r'Ãë¼Ò'¸¦ ´­·¯ ¼³Ä¡¸¦ Á¾·áÇϼ¼¿ä.
+# ^CantWrite
+"±â·ÏÇÒ ¼ö ¾øÀ½: "
+# ^CopyFailed
+º¹»ç ½ÇÆÐ
+# ^CopyTo
+"ÆÄÀÏ º¹»ç "
+# ^Registering
+"µî·ÏÁß: "
+# ^Unregistering
+"µî·Ï ÇØÁ¦Áß: "
+# ^SymbolNotFound
+"½Éº¼À» ãÀ» ¼ö ¾øÀ½: "
+# ^CouldNotLoad
+"ºÒ·¯¿Ã ¼ö ¾øÀ½: "
+# ^CreateFolder
+"Æú´õ »ý¼º: "
+# ^CreateShortcut
+"¹Ù·Î °¡±â »ý¼º: "
+# ^CreatedUninstaller
+"¾ðÀνºÅç·¯ »ý¼º: "
+# ^Delete
+"ÆÄÀÏ »èÁ¦: "
+# ^DeleteOnReboot
+"ÀçºÎÆýà »èÁ¦: "
+# ^ErrorCreatingShortcut
+"¹Ù·Î °¡±â »ý¼º ¿À·ù: "
+# ^ErrorCreating
+"»ý¼º ½ÇÆÐ: "
+# ^ErrorDecompressing
+¾ÐÃà ÇØÁ¦Áß ¿À·ù ¹ß»ý! ¼³Ä¡ ÆÄÀÏÀÌ ¼Õ»óµÇ¾ú½À´Ï´Ù.
+# ^ErrorRegistering
+DLL µî·Ï ½ÇÆÐ
+# ^ExecShell
+"½© ½ÇÇà: "
+# ^Exec
+"½ÇÇà: "
+# ^Extract
+"¾ÐÃà ÇØÁ¦: "
+# ^ErrorWriting
+"¾ÐÃà ÇØÁ¦: ÆÄÀÏÀ» ±â·ÏÇÏ´Â µµÁß ¿À·ù ¹ß»ý "
+# ^InvalidOpcode
+ÀνºÅç·¯ ¼Õ»óµÊ: À߸øµÈ ½ÇÇàÄÚµå
+# ^NoOLE
+"OLE Á¤º¸ ¾øÀ½: "
+# ^OutputFolder
+"´ë»ó Æú´õ: "
+# ^RemoveFolder
+"Æú´õ »èÁ¦: "
+# ^RenameOnReboot
+"ÀçºÎÆýà À̸§ º¯°æ: "
+# ^Rename
+"À̸§ º¯°æ: "
+# ^Skipped
+"°Ç³Ê¶Ü: "
+# ^CopyDetails
+ÀÚ¼¼ÇÑ ³»¿ëÀ» Ŭ¸³º¸µå·Î º¹»ç
+# ^LogInstall
+¼³Ä¡ ·Î±× ÀÛ¼º
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Korean.nsh b/Contrib/Language files/Korean.nsh
index 27d1cb2..0be1a38 100755
--- a/Contrib/Language files/Korean.nsh
+++ b/Contrib/Language files/Korean.nsh
@@ -1,121 +1,121 @@
-;Language: Korean (1042)
-;By linak linak@korea.com ( ~ V2.0 BETA3 ) By kippler@gmail.com(www.kipple.pe.kr) ( V2.0 BETA3 ~ ) (last update:2007/09/05)
-
-!insertmacro LANGFILE "Korean" "Korean"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) ¼³Ä¡¸¦ ½ÃÀÛÇÕ´Ï´Ù."
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "ÀÌ ÇÁ·Î±×·¥Àº ´ç½ÅÀÇ ÄÄÇ»ÅÍ¿¡ $(^NameDA)(À»)¸¦ ¼³Ä¡ÇÒ °ÍÀÔ´Ï´Ù.$\r$\n$\r$\n¼³Ä¡¸¦ ½ÃÀÛÇϱâ Àü °¡´ÉÇÑ ÇÑ ¸ðµç ÇÁ·Î±×·¥À» Á¾·áÇÏ¿© Áֽñ⠹ٶø´Ï´Ù. ÀÌ´Â ÀçºÎÆÃÀ» ÇÏÁö ¾Ê°í¼­µµ ½Ã½ºÅÛ ÆÄÀÏÀ» ¼öÁ¤ÇÒ ¼ö ÀÖ°Ô ÇØÁÝ´Ï´Ù.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Á¦°Å¸¦ ½ÃÀÛÇÕ´Ï´Ù."
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "ÀÌ ÇÁ·Î±×·¥Àº ´ç½ÅÀÇ ÄÄÇ»ÅÍ¿¡¼­ $(^NameDA)(À»)¸¦ Á¦°ÅÇÒ °ÍÀÔ´Ï´Ù.$\r$\n$\r$\nÁ¦°Å¸¦ ½ÃÀÛÇϱâ Àü¿¡ $(^NameDA)(À»)¸¦ Á¾·áÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "»ç¿ë±Ç °è¾à"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)(À»)¸¦ ¼³Ä¡ÇϽñâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé ù ¹ø° »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "»ç¿ë±Ç °è¾à µ¿ÀÇ"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)(À»)¸¦ Á¦°ÅÇϽñâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé ù ¹ø° »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "»ç¿ë±Ç °è¾à µ¿ÀÇ »çÇ×ÀÇ ³ª¸ÓÁö ºÎºÐÀ» º¸½Ã·Á¸é [Page Down] Å°¸¦ ´­·¯ ÁÖ¼¼¿ä."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "±¸¼º ¿ä¼Ò ¼±ÅÃ"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "¼³Ä¡ÇÏ°íÀÚ ÇÏ´Â $(^NameDA)ÀÇ ±¸¼º ¿ä¼Ò¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "»ó¼¼ ¼³¸í"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "±¸¼º ¿ä¼Ò ¼±ÅÃ"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Á¦°ÅÇÏ°íÀÚ ÇÏ´Â $(^NameDA)ÀÇ ±¸¼º ¿ä¼Ò¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "»ó¼¼ ¼³¸íÀ» º¸°í ½ÍÀ¸½Å ºÎºÐ¿¡ ¸¶¿ì½º¸¦ ¿Ã·Á³õÀ¸¼¼¿ä."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "»ó¼¼ ¼³¸íÀ» º¸°í ½ÍÀ¸½Å ºÎºÐ¿¡ ¸¶¿ì½º¸¦ ¿Ã·Á³õÀ¸¼¼¿ä."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "¼³Ä¡ À§Ä¡ ¼±ÅÃ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)(À»)¸¦ ¼³Ä¡ÇÒ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Á¦°Å À§Ä¡ ¼±ÅÃ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)(À»)¸¦ Á¦°ÅÇÒ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "¼³Ä¡Áß"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)(À»)¸¦ ¼³Ä¡ÇÏ´Â µ¿¾È Àá½Ã ±â´Ù·Á ÁÖ¼¼¿ä."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "¼³Ä¡ ¿Ï·á"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "¼³Ä¡°¡ ¼º°øÀûÀ¸·Î ¿Ï·áµÇ¾ú½À´Ï´Ù."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "¼³Ä¡ Ãë¼Ò"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ÇÁ·Î±×·¥ ¼³Ä¡°¡ Ãë¼ÒµÇ¾ú½À´Ï´Ù."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Á¦°ÅÁß"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA)(À»)¸¦ Á¦°ÅÇÏ´Â µ¿¾È Àá½Ã ±â´Ù·Á Áֽñ⠹ٶø´Ï´Ù."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Á¦°Å ¸¶Ä§"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ÇÁ·Î±×·¥À» ¼º°øÀûÀ¸·Î Á¦°ÅÇÏ¿´½À´Ï´Ù."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ÇÁ·Î±×·¥ Á¦°Å Ãë¼Ò"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ÇÁ·Î±×·¥ Á¦°Å°¡ Ãë¼ÒµÇ¾ú½À´Ï´Ù."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) ¼³Ä¡ ¿Ï·á"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)ÀÇ ¼³Ä¡°¡ ¿Ï·áµÇ¾ú½À´Ï´Ù. ¼³Ä¡ ÇÁ·Î±×·¥À» ¸¶Ä¡·Á¸é '¸¶Ä§' ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA)ÀÇ ¼³Ä¡¸¦ ¿Ï·áÇϱâ À§Çؼ­´Â ½Ã½ºÅÛÀ» ´Ù½Ã ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. Áö±Ý ÀçºÎÆà ÇϽðڽÀ´Ï±î?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Á¦°Å ¿Ï·á"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA)ÀÇ Á¦°Å°¡ ¿Ï·á µÇ¾ú½À´Ï´Ù."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA)ÀÇ Á¦°Å¸¦ ¿Ï·áÇϱâ À§Çؼ­´Â ½Ã½ºÅÛÀ» ´Ù½Ã ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. Áö±Ý ÀçºÎÆà ÇϽðڽÀ´Ï±î?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Áö±Ý ÀçºÎÆà ÇÏ°Ú½À´Ï´Ù."
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "³ªÁß¿¡ ÀçºÎÆà ÇÏ°Ú½À´Ï´Ù."
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) ½ÇÇàÇϱâ(&R)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Readme ÆÄÀÏ º¸±â(&S)"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "¸¶Ä§"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "½ÃÀÛ ¸Þ´º Æú´õ ¼±ÅÃ"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "ÇÁ·Î±×·¥ÀÇ ¹Ù·Î °¡±â ¾ÆÀÌÄÜÀÌ »ý¼ºµÉ ½ÃÀÛ ¸Þ´º Æú´õ ¼±ÅÃ."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "ÇÁ·Î±×·¥ÀÇ ¹Ù·Î °¡±â ¾ÆÀÌÄÜÀÌ »ý¼ºµÉ ½ÃÀÛ ¸Þ´º Æú´õ¸¦ ¼±ÅÃÇϼ¼¿ä. »õ·Î¿î Æú´õ¸¦ »ý¼ºÇÏ·Á¸é Æú´õ À̸§À» ÀÔ·ÂÇϼ¼¿ä."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "¹Ù·Î °¡±â ¾ÆÀÌÄÜÀ» ¸¸µéÁö ¾Ê°Ú½À´Ï´Ù."
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA) Á¦°Å"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) Á¦°ÅÇϱâ"
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) ¼³Ä¡¸¦ Ãë¼ÒÇϽðڽÀ´Ï±î?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) Á¦°Å¸¦ Ãë¼ÒÇϽðڽÀ´Ï±î?"
-!endif
+;Language: Korean (1042)
+;By linak linak@korea.com ( ~ V2.0 BETA3 ) By kippler@gmail.com(www.kipple.pe.kr) ( V2.0 BETA3 ~ ) (last update:2007/09/05)
+
+!insertmacro LANGFILE "Korean" "Korean"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) ¼³Ä¡¸¦ ½ÃÀÛÇÕ´Ï´Ù."
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "ÀÌ ÇÁ·Î±×·¥Àº ´ç½ÅÀÇ ÄÄÇ»ÅÍ¿¡ $(^NameDA)(À»)¸¦ ¼³Ä¡ÇÒ °ÍÀÔ´Ï´Ù.$\r$\n$\r$\n¼³Ä¡¸¦ ½ÃÀÛÇϱâ Àü °¡´ÉÇÑ ÇÑ ¸ðµç ÇÁ·Î±×·¥À» Á¾·áÇÏ¿© Áֽñ⠹ٶø´Ï´Ù. ÀÌ´Â ÀçºÎÆÃÀ» ÇÏÁö ¾Ê°í¼­µµ ½Ã½ºÅÛ ÆÄÀÏÀ» ¼öÁ¤ÇÒ ¼ö ÀÖ°Ô ÇØÁÝ´Ï´Ù.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Á¦°Å¸¦ ½ÃÀÛÇÕ´Ï´Ù."
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "ÀÌ ÇÁ·Î±×·¥Àº ´ç½ÅÀÇ ÄÄÇ»ÅÍ¿¡¼­ $(^NameDA)(À»)¸¦ Á¦°ÅÇÒ °ÍÀÔ´Ï´Ù.$\r$\n$\r$\nÁ¦°Å¸¦ ½ÃÀÛÇϱâ Àü¿¡ $(^NameDA)(À»)¸¦ Á¾·áÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "»ç¿ë±Ç °è¾à"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)(À»)¸¦ ¼³Ä¡ÇϽñâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé ù ¹ø° »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ ¼³Ä¡Çϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "»ç¿ë±Ç °è¾à µ¿ÀÇ"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)(À»)¸¦ Á¦°ÅÇϽñâ Àü¿¡ »ç¿ë±Ç °è¾à ³»¿ëÀ» »ìÆ캸½Ã±â ¹Ù¶ø´Ï´Ù."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé 'µ¿ÀÇÇÔ'À» ´­·¯ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "³»¿ë¿¡ µ¿ÀÇÇÏ¼Ì´Ù¸é ¾Æ·¡ »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "³»¿ë¿¡ µ¿ÀÇÇϼ̴ٸé ù ¹ø° »çÇ×À» ¼±ÅÃÇØ ÁÖ¼¼¿ä. $(^NameDA)(À»)¸¦ Á¦°ÅÇϱâ À§Çؼ­´Â ¹Ýµå½Ã ³»¿ë¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "»ç¿ë±Ç °è¾à µ¿ÀÇ »çÇ×ÀÇ ³ª¸ÓÁö ºÎºÐÀ» º¸½Ã·Á¸é [Page Down] Å°¸¦ ´­·¯ ÁÖ¼¼¿ä."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "±¸¼º ¿ä¼Ò ¼±ÅÃ"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "¼³Ä¡ÇÏ°íÀÚ ÇÏ´Â $(^NameDA)ÀÇ ±¸¼º ¿ä¼Ò¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "»ó¼¼ ¼³¸í"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "±¸¼º ¿ä¼Ò ¼±ÅÃ"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Á¦°ÅÇÏ°íÀÚ ÇÏ´Â $(^NameDA)ÀÇ ±¸¼º ¿ä¼Ò¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "»ó¼¼ ¼³¸íÀ» º¸°í ½ÍÀ¸½Å ºÎºÐ¿¡ ¸¶¿ì½º¸¦ ¿Ã·Á³õÀ¸¼¼¿ä."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "»ó¼¼ ¼³¸íÀ» º¸°í ½ÍÀ¸½Å ºÎºÐ¿¡ ¸¶¿ì½º¸¦ ¿Ã·Á³õÀ¸¼¼¿ä."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "¼³Ä¡ À§Ä¡ ¼±ÅÃ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)(À»)¸¦ ¼³Ä¡ÇÒ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Á¦°Å À§Ä¡ ¼±ÅÃ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)(À»)¸¦ Á¦°ÅÇÒ Æú´õ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "¼³Ä¡Áß"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)(À»)¸¦ ¼³Ä¡ÇÏ´Â µ¿¾È Àá½Ã ±â´Ù·Á ÁÖ¼¼¿ä."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "¼³Ä¡ ¿Ï·á"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "¼³Ä¡°¡ ¼º°øÀûÀ¸·Î ¿Ï·áµÇ¾ú½À´Ï´Ù."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "¼³Ä¡ Ãë¼Ò"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "ÇÁ·Î±×·¥ ¼³Ä¡°¡ Ãë¼ÒµÇ¾ú½À´Ï´Ù."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Á¦°ÅÁß"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA)(À»)¸¦ Á¦°ÅÇÏ´Â µ¿¾È Àá½Ã ±â´Ù·Á Áֽñ⠹ٶø´Ï´Ù."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Á¦°Å ¸¶Ä§"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "ÇÁ·Î±×·¥À» ¼º°øÀûÀ¸·Î Á¦°ÅÇÏ¿´½À´Ï´Ù."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "ÇÁ·Î±×·¥ Á¦°Å Ãë¼Ò"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "ÇÁ·Î±×·¥ Á¦°Å°¡ Ãë¼ÒµÇ¾ú½À´Ï´Ù."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) ¼³Ä¡ ¿Ï·á"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)ÀÇ ¼³Ä¡°¡ ¿Ï·áµÇ¾ú½À´Ï´Ù. ¼³Ä¡ ÇÁ·Î±×·¥À» ¸¶Ä¡·Á¸é '¸¶Ä§' ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA)ÀÇ ¼³Ä¡¸¦ ¿Ï·áÇϱâ À§Çؼ­´Â ½Ã½ºÅÛÀ» ´Ù½Ã ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. Áö±Ý ÀçºÎÆà ÇϽðڽÀ´Ï±î?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Á¦°Å ¿Ï·á"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA)ÀÇ Á¦°Å°¡ ¿Ï·á µÇ¾ú½À´Ï´Ù."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA)ÀÇ Á¦°Å¸¦ ¿Ï·áÇϱâ À§Çؼ­´Â ½Ã½ºÅÛÀ» ´Ù½Ã ½ÃÀÛÇØ¾ß ÇÕ´Ï´Ù. Áö±Ý ÀçºÎÆà ÇϽðڽÀ´Ï±î?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Áö±Ý ÀçºÎÆà ÇÏ°Ú½À´Ï´Ù."
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "³ªÁß¿¡ ÀçºÎÆà ÇÏ°Ú½À´Ï´Ù."
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) ½ÇÇàÇϱâ(&R)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Readme ÆÄÀÏ º¸±â(&S)"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "¸¶Ä§"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "½ÃÀÛ ¸Þ´º Æú´õ ¼±ÅÃ"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "ÇÁ·Î±×·¥ÀÇ ¹Ù·Î °¡±â ¾ÆÀÌÄÜÀÌ »ý¼ºµÉ ½ÃÀÛ ¸Þ´º Æú´õ ¼±ÅÃ."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "ÇÁ·Î±×·¥ÀÇ ¹Ù·Î °¡±â ¾ÆÀÌÄÜÀÌ »ý¼ºµÉ ½ÃÀÛ ¸Þ´º Æú´õ¸¦ ¼±ÅÃÇϼ¼¿ä. »õ·Î¿î Æú´õ¸¦ »ý¼ºÇÏ·Á¸é Æú´õ À̸§À» ÀÔ·ÂÇϼ¼¿ä."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "¹Ù·Î °¡±â ¾ÆÀÌÄÜÀ» ¸¸µéÁö ¾Ê°Ú½À´Ï´Ù."
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA) Á¦°Å"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) Á¦°ÅÇϱâ"
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) ¼³Ä¡¸¦ Ãë¼ÒÇϽðڽÀ´Ï±î?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) Á¦°Å¸¦ Ãë¼ÒÇϽðڽÀ´Ï±î?"
+!endif
diff --git a/Contrib/Language files/Kurdish.nlf b/Contrib/Language files/Kurdish.nlf
index 577771d..8716a1d 100755
--- a/Contrib/Language files/Kurdish.nlf
+++ b/Contrib/Language files/Kurdish.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID (none exists for Kurdish at this time)
-9999
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
--
-# RTL - anything else than RTL means LTR
--
-# Translation by Rêzan Tovjîn(chagy) (retovjin@hotmail.com.com)
-# ^Branding
-Nullsoft Pergala Sazkirinê %s
-# ^SetupCaption
-$(^Name) Sazkirin
-# ^UninstallCaption
-$(^Name) Rakirin
-# ^LicenseSubCaption
-: Peymana Lîsansê
-# ^ComponentsSubCaption
-: Vebijêrkên Sazkirinê
-# ^DirSubCaption
-: Peldanka Sazkirinê
-# ^InstallingSubCaption
-: Tê Sazkirin
-# ^CompletedSubCaption
-: Qediya
-# ^UnComponentsSubCaption
-: Vebijêrkên Rakirinê
-# ^UnDirSubCaption
-: Peldanka Rakirinê
-# ^ConfirmSubCaption
-: Erêkirin
-# ^UninstallingSubCaption
-: Tê Rakirin
-# ^UnCompletedSubCaption
-: Qediya
-# ^BackBtn
-< &Vegere
-# ^NextBtn
-&Bidomîne >
-# ^AgreeBtn
-&Ez Dipejirînim
-# ^AcceptBtn
-Þertên Peymanê &Dipejirînim
-# ^DontAcceptBtn
-Þertên Peymanê Napejirînim
-# ^InstallBtn
-&Saz Bike
-# ^UninstallBtn
-&Rake
-# ^CancelBtn
-Betal
-# ^CloseBtn
-&Bigire
-# ^BrowseBtn
-&Çavlêgerîn...
-# ^ShowDetailsBtn
-Hûragahiyan &Nîþan Bide
-# ^ClickNext
-Ji bo berdewamê 'Bidomîne'yê bitikîne.
-# ^ClickInstall
-Ji bo destpêka sazkirinê 'Saz Bike'yê bitikîne.
-# ^ClickUninstall
-Ji bo destpêka rakirinê 'Rake' bitikîne.
-# ^Name
-nav
-# ^Completed
-Qediya
-# ^LicenseText
-Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, 'Ez Dipejirînim'ê bitikîne.
-# ^LicenseTextCB
-Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertan dipejirînî, zeviya erêkirinê ya jêrîn dagire. $_CLICK
-# ^LicenseTextRB
-Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, zeviya vebijêrkê ya jêrîn dagire. $_CLICK
-# ^UnLicenseText
-Ji kerema xwe re berî tu bernameya $(^NameDA) rakî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, 'Ez Dipejirînim'ê bitikîn.
-# ^UnLicenseTextCB
-Ji kerema xwe re berî tu bernameya $(^NameDA) ji pergala xwe rakî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, zeviya jêrîn a erêkirinê dagire. $_CLICK
-# ^UnLicenseTextRB
-Ji kerema xwe re berî tu bernameya $(^NameDA) ji pergala xwe rakî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, zeviya vebijêrkê ya jêrîn dagire. $_CLICK
-# ^Custom
-Taybet
-# ^ComponentsText
-Beþên tu dixwazî saz bikî hilbijêre û niqirên 'check' beþên tu naxwazî werin sazkirin rake. $_CLICK
-# ^ComponentsSubText1
-Awayê sazkirinê hilbijêre:
-# ^ComponentsSubText2_NoInstTypes
-Beþên dê werin sazkirin hilbijêre:
-# ^ComponentsSubText2
-an jî, beþên beþên tu dixwazî werin sazkirin hilbijêre:
-# ^UnComponentsText
-Beþên tu dixwazî rakî hilbijêre, an jî niqira 'check'a ber beþên tu daxwazî were rakirin, rake. $_CLICK
-# ^UnComponentsSubText1
-Awayê rakirinê hilbijêre:
-# ^UnComponentsSubText2_NoInstTypes
-Beþên dê werin rakirin hilbijêre:
-# ^UnComponentsSubText2
-an jî beþên tu dixwazî werin rakirin hilbijêre:
-# ^DirText
-$(^NameDA) dê ji aliyê sazkirinê ve li peldanka jêrîn were sazkirin. Ji bo tu li peldankeke din saz bikî 'Çavlêgerîn'ê bitikîne û peldankeke din hilbijêre. $_CLICK
-# ^DirSubText
-Peldanka Armanckirî
-# ^DirBrowseText
-Peldanka tu dixwazî bernameya $(^NameDA) lê were sazkirin hilbijêre:
-# ^UnDirText
-$(^NameDA) dê ji aliyê sazkirinê ve ji peldanka jêrîn were rakirin. Ji bo tu ji peldankeke cuda rakî 'Çavlêgerîn'ê bitikîne û peldankeke din hilbijêre. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Peldanka tu dixwazî bernameya $(^NameDA) jê were rakirin hilbijêre:
-# ^SpaceAvailable
-"Herêma vala ku dikare were bikaranîn: "
-# ^SpaceRequired
-"Herêma vala ya pêwist: "
-# ^UninstallingText
-Bernameya $(^NameDA) dê ji peldanka jêrîn were rakirin. $_CLICK
-# ^UninstallingSubText
-tê rakirin:
-# ^FileError
-Dosya ji bo nivîsandinê venebû: \r\n\t"$0"\r\nJi bo destjêberdana sazkirinê abort'ê bitikîne,\r\nji bo ceribandina ji nû ve retry'ê , an jî\r\nji bo tu dosiyê tune bihesibînî û berdewam bikî ignore'yê bitikîne
-# ^FileError_NoIgnore
-Dosya ji bo nivîsandinê vebenebû: \r\n\t"$0"\r\nJi bo nivîsandina ji nû ve retry'yê, an jî\r\nJi bo destjêberdana sazkirinê abort'ê hilbijêre
-# ^CantWrite
-"Nehate Nivîsandin: "
-# ^CopyFailed
-Çewtiya Jibergirtinê
-# ^CopyTo
-"Ji Ber Bigire "
-# ^Registering
-"Tê Tomarkirin: "
-# ^Unregistering
-"Tomarî Tê Jêbirin: "
-# ^SymbolNotFound
-"Dawêr Nehate Dîtin: "
-# ^CouldNotLoad
-"Nehate Barkirin: "
-# ^CreateFolder
-"Peldankê Çêke: "
-# ^CreateShortcut
-"Kineriyê Çêke: "
-# ^CreatedUninstaller
-"Sêrbazê Rakirinê Hate Çêkirin: "
-# ^Delete
-"Dosyayê Jê Bibe: "
-# ^DeleteOnReboot
-"Dema ji nû ve dest pê kir dosiyê jê bibe: "
-# ^ErrorCreatingShortcut
-"Dema çêkirina kineriyê çewtî derket: "
-# ^ErrorCreating
-"Çewtiya çêkirinê: "
-# ^ErrorDecompressing
-Di dema vekirina daneyan de çewtî derket! Sazkirina Çewt?
-# ^ErrorRegistering
-Çewtiya tomariya DLL
-# ^ExecShell
-"Qalikê Xebatê: "
-# ^Exec
-"Bixebitîne: "
-# ^Extract
-"Veke: "
-# ^ErrorWriting
-"Veke: Dema li dosiyê hate nivîsîn çewtiyek derket "
-# ^InvalidOpcode
-Sazkirina Xirabe: koda nerast pêkanînê
-# ^NoOLE
-"OLE nehate dîtin: "
-# ^OutputFolder
-"Peldanka derketinê: "
-# ^RemoveFolder
-"Peldankê jê bibe: "
-# ^RenameOnReboot
-"Dema ji nû hate destpêkirin ji nû ve bi nav bike: "
-# ^Rename
-"Nav Biguhere: "
-# ^Skipped
-"Hate gavkirin: "
-# ^CopyDetails
-Hûragahiyan li Pano'yê binivîse
-# ^LogInstall
-Pêkanîna sazkirinê li lênûska rewþê binivîse
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID (none exists for Kurdish at this time)
+9999
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+-
+# RTL - anything else than RTL means LTR
+-
+# Translation by Rêzan Tovjîn(chagy) (retovjin@hotmail.com.com)
+# ^Branding
+Nullsoft Pergala Sazkirinê %s
+# ^SetupCaption
+$(^Name) Sazkirin
+# ^UninstallCaption
+$(^Name) Rakirin
+# ^LicenseSubCaption
+: Peymana Lîsansê
+# ^ComponentsSubCaption
+: Vebijêrkên Sazkirinê
+# ^DirSubCaption
+: Peldanka Sazkirinê
+# ^InstallingSubCaption
+: Tê Sazkirin
+# ^CompletedSubCaption
+: Qediya
+# ^UnComponentsSubCaption
+: Vebijêrkên Rakirinê
+# ^UnDirSubCaption
+: Peldanka Rakirinê
+# ^ConfirmSubCaption
+: Erêkirin
+# ^UninstallingSubCaption
+: Tê Rakirin
+# ^UnCompletedSubCaption
+: Qediya
+# ^BackBtn
+< &Vegere
+# ^NextBtn
+&Bidomîne >
+# ^AgreeBtn
+&Ez Dipejirînim
+# ^AcceptBtn
+Þertên Peymanê &Dipejirînim
+# ^DontAcceptBtn
+Þertên Peymanê Napejirînim
+# ^InstallBtn
+&Saz Bike
+# ^UninstallBtn
+&Rake
+# ^CancelBtn
+Betal
+# ^CloseBtn
+&Bigire
+# ^BrowseBtn
+&Çavlêgerîn...
+# ^ShowDetailsBtn
+Hûragahiyan &Nîþan Bide
+# ^ClickNext
+Ji bo berdewamê 'Bidomîne'yê bitikîne.
+# ^ClickInstall
+Ji bo destpêka sazkirinê 'Saz Bike'yê bitikîne.
+# ^ClickUninstall
+Ji bo destpêka rakirinê 'Rake' bitikîne.
+# ^Name
+nav
+# ^Completed
+Qediya
+# ^LicenseText
+Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, 'Ez Dipejirînim'ê bitikîne.
+# ^LicenseTextCB
+Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertan dipejirînî, zeviya erêkirinê ya jêrîn dagire. $_CLICK
+# ^LicenseTextRB
+Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, zeviya vebijêrkê ya jêrîn dagire. $_CLICK
+# ^UnLicenseText
+Ji kerema xwe re berî tu bernameya $(^NameDA) rakî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, 'Ez Dipejirînim'ê bitikîn.
+# ^UnLicenseTextCB
+Ji kerema xwe re berî tu bernameya $(^NameDA) ji pergala xwe rakî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, zeviya jêrîn a erêkirinê dagire. $_CLICK
+# ^UnLicenseTextRB
+Ji kerema xwe re berî tu bernameya $(^NameDA) ji pergala xwe rakî, çavekî li peymana lîsansê bigerîne. Heke tu hemû þertên peymanê dipejirînî, zeviya vebijêrkê ya jêrîn dagire. $_CLICK
+# ^Custom
+Taybet
+# ^ComponentsText
+Beþên tu dixwazî saz bikî hilbijêre û niqirên 'check' beþên tu naxwazî werin sazkirin rake. $_CLICK
+# ^ComponentsSubText1
+Awayê sazkirinê hilbijêre:
+# ^ComponentsSubText2_NoInstTypes
+Beþên dê werin sazkirin hilbijêre:
+# ^ComponentsSubText2
+an jî, beþên beþên tu dixwazî werin sazkirin hilbijêre:
+# ^UnComponentsText
+Beþên tu dixwazî rakî hilbijêre, an jî niqira 'check'a ber beþên tu daxwazî were rakirin, rake. $_CLICK
+# ^UnComponentsSubText1
+Awayê rakirinê hilbijêre:
+# ^UnComponentsSubText2_NoInstTypes
+Beþên dê werin rakirin hilbijêre:
+# ^UnComponentsSubText2
+an jî beþên tu dixwazî werin rakirin hilbijêre:
+# ^DirText
+$(^NameDA) dê ji aliyê sazkirinê ve li peldanka jêrîn were sazkirin. Ji bo tu li peldankeke din saz bikî 'Çavlêgerîn'ê bitikîne û peldankeke din hilbijêre. $_CLICK
+# ^DirSubText
+Peldanka Armanckirî
+# ^DirBrowseText
+Peldanka tu dixwazî bernameya $(^NameDA) lê were sazkirin hilbijêre:
+# ^UnDirText
+$(^NameDA) dê ji aliyê sazkirinê ve ji peldanka jêrîn were rakirin. Ji bo tu ji peldankeke cuda rakî 'Çavlêgerîn'ê bitikîne û peldankeke din hilbijêre. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Peldanka tu dixwazî bernameya $(^NameDA) jê were rakirin hilbijêre:
+# ^SpaceAvailable
+"Herêma vala ku dikare were bikaranîn: "
+# ^SpaceRequired
+"Herêma vala ya pêwist: "
+# ^UninstallingText
+Bernameya $(^NameDA) dê ji peldanka jêrîn were rakirin. $_CLICK
+# ^UninstallingSubText
+tê rakirin:
+# ^FileError
+Dosya ji bo nivîsandinê venebû: \r\n\t"$0"\r\nJi bo destjêberdana sazkirinê abort'ê bitikîne,\r\nji bo ceribandina ji nû ve retry'ê , an jî\r\nji bo tu dosiyê tune bihesibînî û berdewam bikî ignore'yê bitikîne
+# ^FileError_NoIgnore
+Dosya ji bo nivîsandinê vebenebû: \r\n\t"$0"\r\nJi bo nivîsandina ji nû ve retry'yê, an jî\r\nJi bo destjêberdana sazkirinê abort'ê hilbijêre
+# ^CantWrite
+"Nehate Nivîsandin: "
+# ^CopyFailed
+Çewtiya Jibergirtinê
+# ^CopyTo
+"Ji Ber Bigire "
+# ^Registering
+"Tê Tomarkirin: "
+# ^Unregistering
+"Tomarî Tê Jêbirin: "
+# ^SymbolNotFound
+"Dawêr Nehate Dîtin: "
+# ^CouldNotLoad
+"Nehate Barkirin: "
+# ^CreateFolder
+"Peldankê Çêke: "
+# ^CreateShortcut
+"Kineriyê Çêke: "
+# ^CreatedUninstaller
+"Sêrbazê Rakirinê Hate Çêkirin: "
+# ^Delete
+"Dosyayê Jê Bibe: "
+# ^DeleteOnReboot
+"Dema ji nû ve dest pê kir dosiyê jê bibe: "
+# ^ErrorCreatingShortcut
+"Dema çêkirina kineriyê çewtî derket: "
+# ^ErrorCreating
+"Çewtiya çêkirinê: "
+# ^ErrorDecompressing
+Di dema vekirina daneyan de çewtî derket! Sazkirina Çewt?
+# ^ErrorRegistering
+Çewtiya tomariya DLL
+# ^ExecShell
+"Qalikê Xebatê: "
+# ^Exec
+"Bixebitîne: "
+# ^Extract
+"Veke: "
+# ^ErrorWriting
+"Veke: Dema li dosiyê hate nivîsîn çewtiyek derket "
+# ^InvalidOpcode
+Sazkirina Xirabe: koda nerast pêkanînê
+# ^NoOLE
+"OLE nehate dîtin: "
+# ^OutputFolder
+"Peldanka derketinê: "
+# ^RemoveFolder
+"Peldankê jê bibe: "
+# ^RenameOnReboot
+"Dema ji nû hate destpêkirin ji nû ve bi nav bike: "
+# ^Rename
+"Nav Biguhere: "
+# ^Skipped
+"Hate gavkirin: "
+# ^CopyDetails
+Hûragahiyan li Pano'yê binivîse
+# ^LogInstall
+Pêkanîna sazkirinê li lênûska rewþê binivîse
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Kurdish.nsh b/Contrib/Language files/Kurdish.nsh
index 8260081..ab246d4 100755
--- a/Contrib/Language files/Kurdish.nsh
+++ b/Contrib/Language files/Kurdish.nsh
@@ -1,122 +1,122 @@
-;Language: Kurdish
-;By Rêzan Tovjîn
-;Updated by Erdal Ronahî (erdal.ronahi@gmail.com)
-
-!insertmacro LANGFILE "Kurdish" "Kurdî"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) Tu bi xêr hatî sêrbaziya sazkirinê"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ev sêrbaz dê di dema sazkirina $(^NameDA) de rêberiya te bike.$\r$\n$\r$\nBerî tu dest bi sazkirinê bikî, em pêþniyar dikin tu hemû bernameyên vekirî bigirî. Bi vî rengî beyî tu komputera ji nû ve vekî dê hinek dosiyên pergalê bêpirsgirêk werin sazkirin.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Tu bi xêr hatî sêrbaziya rakirina bernameya $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ev sêrbaz ji bo rakirina bernameya $(^NameDA) dê alîkariya te bike.$\r$\n$\r$\nBerî tu dest bi rakirina bernameyê bikî, bernameyên vekirî hemûyan bigire. Bi vî rengî dû re tu mecbûr namînî ku komputera xwe bigirî û ji nû ve veki.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Peymana Lîsansê"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî, peymana lîsansê bixwîne."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Heke tu þertên peymanê dipejirînî, 'Ez Dipejirînim'ê bitikîne. Ji bo sazkirina bernameya $(^NameDA) divê tu þertên peymanê bipejirînî."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Heke tu þertên peymanê dipejirînî, zeviya piþtrastkirinê ya jêrîn dagire. Ji bo tu bikarî bernameya $(^NameDA) saz bikî divê tu þertên peymanê bipejirînî. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Heke tu þertên peymanê dipejirînî, biþkojka erêkirinê ya jêrîn bitikîne. Ji bo sazkirina bernameya $(^NameDA) divê tu þertên peymanê bipejirînî. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Peymana Lîsansê"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Berî tu bernameya $(^NameDA) ji pergala xwe rakî peymanê bixwîne."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Heke tu þertên peymanê dipejirînî, 'Dipejirînim'ê bitikîne. Ji bo rakirina bernameya $(^NameDA) divê tu þertên peymanê bipejirînî."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Heke tu þertên peymanê dipejirînî, zeviya erêkirinê ya jêrîn dagire. Ji bo tu bernameya $(^NameDA) ji pergala xwe rakî divê tu peymanê bipejirînî. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Heke tu þertên peymanê dipejirînî, biþkojka erêkirinê ya jêrîn hilbijêre. Ji bo tu bernameya $(^NameDA) ji pergala xwe rakî divê tu þertên peymanê bipejirînî. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Ji bo dûmahîka peymanê biþkojka 'page down' bitikîne."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Hilbijartina pareyan"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Ji bo sazkirina $(^NameDA) pareyên tu dixwazî hilbijêre."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Dazanîn"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Hilbijartina Pareyan"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pareya bernameya $(^NameDA) ku tu dixwazî rakî hilbijêre."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ji bo tu der barê pareyan de agahiyan bistînî nîþanekê bibe ser pareyekê."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ji bo tu der barê pareyan de agahiyan bistînî nîþanekê bibe ser pareyekê."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Hilbijartina peldanka armanckirî"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Peldanka tu dixwazî bernameya $(^NameDA) tê de were sazkirin hilbijêre."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Hilbijartina Peldanka Dê Were Rakirin"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Peldanka bernameya $(^NameDA) ku tudixwazî rakî hilbijêre."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Tê sazkirin"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ji kerema xwe re heta sazkirina $(^NameDA) biqede raweste."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Sazkirin Qediya"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Sazkirin bi serkeftinî qediya."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Sazkirin hate betalkirin"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Sazkirin be tevahî qediya."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Tê rakirin"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Heta bernameya $(^NameDA) ji pergala te were rakirin raweste."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Rakirina Bernameyê Biqedîne"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Rakirina bernameyê bi serkeftin pêk hat."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Rakirina bernameyê hate betalkirin"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Rakirina bernameyê neqediya."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Sêrbaziya sazkirina $(^NameDA) diqede."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) li komputera te hate barkirin.$\r$\n$\r$\n'Biqedîne'yê bitikîne û sazkirinê bi dawî bîne."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ji bo bidawîkirina sazkirina $(^NameDA) divê tu komputerê ji nû ve vekî.Tu dixwazî komputerê ji nû ve vekî?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Sêrbaziya Rakirina Bernameya $(^NameDA) Tê Temamkirin"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Bernameya $(^NameDA) ji pergale hate rakirin.$\r$\n$\r$\nJi bo girtina sêrbaz 'biqedîne'yê bitikîne."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ji bo rakirina bernameya $(^NameDA) biqede divê tu komputera xwe ji nû ve vekî. Tu dixwazî niha komputera te were girtin û ji nû ve dest pê bike?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ji nû ve veke"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ezê paþê ji nû ve vekim."
- ${LangFileString} MUI_TEXT_FINISH_RUN "Bernameya $(^NameDA) bixebitîne"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Dosiya min bixwîne/readme &nîþan bide"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Biqedîne"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Hilbijartina Peldanka Pêþeka Destpêkê"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Peldanka pêþeka destpêkê ya ku dê kineriya $(^NameDA) tê de were bikaranîn hilbijêre."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Peldanka pêþeka destpêkê ya ku dê kineriya bernameyê tê de were bicihkirin hilbijêre. Tu dikarî bi navekî nû peldankeke nû ava bikî."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Bêyî çêkirina kineriyê bidomîne"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Bernameya $(^NameDA) Rake"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Rakirina bernameya $(^NameDA) ji pergala te."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Tu bawer î ku dixwazî ji sazkirina $(^Name) derkevî?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Tu bawer î ku dixwazî dest ji rakirina bernameya $(^Name) berdî?"
-!endif
+;Language: Kurdish
+;By Rêzan Tovjîn
+;Updated by Erdal Ronahî (erdal.ronahi@gmail.com)
+
+!insertmacro LANGFILE "Kurdish" "Kurdî"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) Tu bi xêr hatî sêrbaziya sazkirinê"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ev sêrbaz dê di dema sazkirina $(^NameDA) de rêberiya te bike.$\r$\n$\r$\nBerî tu dest bi sazkirinê bikî, em pêþniyar dikin tu hemû bernameyên vekirî bigirî. Bi vî rengî beyî tu komputera ji nû ve vekî dê hinek dosiyên pergalê bêpirsgirêk werin sazkirin.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Tu bi xêr hatî sêrbaziya rakirina bernameya $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ev sêrbaz ji bo rakirina bernameya $(^NameDA) dê alîkariya te bike.$\r$\n$\r$\nBerî tu dest bi rakirina bernameyê bikî, bernameyên vekirî hemûyan bigire. Bi vî rengî dû re tu mecbûr namînî ku komputera xwe bigirî û ji nû ve veki.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Peymana Lîsansê"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ji kerema xwe re berî tu bernameya $(^NameDA) saz bikî, peymana lîsansê bixwîne."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Heke tu þertên peymanê dipejirînî, 'Ez Dipejirînim'ê bitikîne. Ji bo sazkirina bernameya $(^NameDA) divê tu þertên peymanê bipejirînî."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Heke tu þertên peymanê dipejirînî, zeviya piþtrastkirinê ya jêrîn dagire. Ji bo tu bikarî bernameya $(^NameDA) saz bikî divê tu þertên peymanê bipejirînî. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Heke tu þertên peymanê dipejirînî, biþkojka erêkirinê ya jêrîn bitikîne. Ji bo sazkirina bernameya $(^NameDA) divê tu þertên peymanê bipejirînî. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Peymana Lîsansê"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Berî tu bernameya $(^NameDA) ji pergala xwe rakî peymanê bixwîne."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Heke tu þertên peymanê dipejirînî, 'Dipejirînim'ê bitikîne. Ji bo rakirina bernameya $(^NameDA) divê tu þertên peymanê bipejirînî."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Heke tu þertên peymanê dipejirînî, zeviya erêkirinê ya jêrîn dagire. Ji bo tu bernameya $(^NameDA) ji pergala xwe rakî divê tu peymanê bipejirînî. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Heke tu þertên peymanê dipejirînî, biþkojka erêkirinê ya jêrîn hilbijêre. Ji bo tu bernameya $(^NameDA) ji pergala xwe rakî divê tu þertên peymanê bipejirînî. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Ji bo dûmahîka peymanê biþkojka 'page down' bitikîne."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Hilbijartina pareyan"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Ji bo sazkirina $(^NameDA) pareyên tu dixwazî hilbijêre."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Dazanîn"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Hilbijartina Pareyan"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pareya bernameya $(^NameDA) ku tu dixwazî rakî hilbijêre."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ji bo tu der barê pareyan de agahiyan bistînî nîþanekê bibe ser pareyekê."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ji bo tu der barê pareyan de agahiyan bistînî nîþanekê bibe ser pareyekê."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Hilbijartina peldanka armanckirî"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Peldanka tu dixwazî bernameya $(^NameDA) tê de were sazkirin hilbijêre."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Hilbijartina Peldanka Dê Were Rakirin"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Peldanka bernameya $(^NameDA) ku tudixwazî rakî hilbijêre."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Tê sazkirin"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ji kerema xwe re heta sazkirina $(^NameDA) biqede raweste."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Sazkirin Qediya"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Sazkirin bi serkeftinî qediya."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Sazkirin hate betalkirin"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Sazkirin be tevahî qediya."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Tê rakirin"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Heta bernameya $(^NameDA) ji pergala te were rakirin raweste."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Rakirina Bernameyê Biqedîne"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Rakirina bernameyê bi serkeftin pêk hat."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Rakirina bernameyê hate betalkirin"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Rakirina bernameyê neqediya."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Sêrbaziya sazkirina $(^NameDA) diqede."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) li komputera te hate barkirin.$\r$\n$\r$\n'Biqedîne'yê bitikîne û sazkirinê bi dawî bîne."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ji bo bidawîkirina sazkirina $(^NameDA) divê tu komputerê ji nû ve vekî.Tu dixwazî komputerê ji nû ve vekî?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Sêrbaziya Rakirina Bernameya $(^NameDA) Tê Temamkirin"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Bernameya $(^NameDA) ji pergale hate rakirin.$\r$\n$\r$\nJi bo girtina sêrbaz 'biqedîne'yê bitikîne."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ji bo rakirina bernameya $(^NameDA) biqede divê tu komputera xwe ji nû ve vekî. Tu dixwazî niha komputera te were girtin û ji nû ve dest pê bike?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ji nû ve veke"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ezê paþê ji nû ve vekim."
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Bernameya $(^NameDA) bixebitîne"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Dosiya min bixwîne/readme &nîþan bide"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Biqedîne"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Hilbijartina Peldanka Pêþeka Destpêkê"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Peldanka pêþeka destpêkê ya ku dê kineriya $(^NameDA) tê de were bikaranîn hilbijêre."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Peldanka pêþeka destpêkê ya ku dê kineriya bernameyê tê de were bicihkirin hilbijêre. Tu dikarî bi navekî nû peldankeke nû ava bikî."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Bêyî çêkirina kineriyê bidomîne"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Bernameya $(^NameDA) Rake"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Rakirina bernameya $(^NameDA) ji pergala te."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Tu bawer î ku dixwazî ji sazkirina $(^Name) derkevî?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Tu bawer î ku dixwazî dest ji rakirina bernameya $(^Name) berdî?"
+!endif
diff --git a/Contrib/Language files/Latvian.nlf b/Contrib/Language files/Latvian.nlf
index d011dc8..280a028 100755
--- a/Contrib/Language files/Latvian.nlf
+++ b/Contrib/Language files/Latvian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1062
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1257
-# RTL - anything else than RTL means LTR
--
-# Translation by Valdis Griíis (valmiera-9@inbox.lv)
-# Corrections by Kristaps Meòìelis / x-f (x-f 'AT' inbox.lv)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-'$(^Name)' Uzstâdîðana
-# ^UninstallCaption
-'$(^Name)' Atinstalçðana
-# ^LicenseSubCaption
-: Licences lîgums
-# ^ComponentsSubCaption
-: Uzstâdîðanas opcijas
-# ^DirSubCaption
-: Uzstâdîðanas mape
-# ^InstallingSubCaption
-: Notiek uzstâdîðana
-# ^CompletedSubCaption
-: Uzstâdîðana pabeigta.
-# ^UnComponentsSubCaption
-: Atinstalçðanas opcijas
-# ^UnDirSubCaption
-: Atinstalçðanas mape
-# ^ConfirmSubCaption
-: Apstiprinâðana
-# ^UninstallingSubCaption
-: Notiek atinstalçðana
-# ^UnCompletedSubCaption
-: Atinstalçðana pabeigta
-# ^BackBtn
-< &Atpakaï
-# ^NextBtn
-&Tâlâk >
-# ^AgreeBtn
-Es &piekrîtu
-# ^AcceptBtn
-Es &piekrîtu licences lîguma noteikumiem
-# ^DontAcceptBtn
-Es &nepiekrîtu licences lîguma noteikumiem
-# ^InstallBtn
-&Uzstâdît
-# ^UninstallBtn
-&Atinstalçt
-# ^CancelBtn
-Atcelt
-# ^CloseBtn
-Ai&zvçrt
-# ^BrowseBtn
-Pâ&rlûkot...
-# ^ShowDetailsBtn
-Parâdît &detaïas
-# ^ClickNext
-Spiediet 'Tâlâk', lai turpinâtu.
-# ^ClickInstall
-Spiediet 'Uzstâdît', lai sâktu uzstâdîðanas procesu.
-# ^ClickUninstall
-Spiediet 'Atinstalçt', lai sâktu atinstalçðanas procesu.
-# ^Name
-Vârds
-# ^Completed
-Uzstâdîðana pabeigta
-# ^LicenseText
-Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas. Ja piekrîtat licences lîguma noteikumiem, tad spiediet 'Es piekrîtu'.
-# ^LicenseTextCB
-Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas. Ja piekrîtat licences lîguma noteikumiem, tad atzîmçjiet izvçles rûtiòu. $_CLICK
-# ^LicenseTextRB
-Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas. Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties pirmo zemâkesoðo opciju. $_CLICK
-# ^UnLicenseText
-Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas. Ja piekrîtat licences lîguma noteikumiem, tad spiediet 'Es piekrîtu'.
-# ^UnLicenseTextCB
-Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas. Ja piekrîtat licences lîguma noteikumiem, tad atzîmçjiet izvçles rûtiòu. $_CLICK
-# ^UnLicenseTextRB
-Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas. Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties zemâkesoðo opciju. $_CLICK
-# ^Custom
-Pielâgots
-# ^ComponentsText
-Izvçlieties, kurus komponentus vçlaties uzstâdît un neiezîmçjiet tos, kurus nevçlaties uzstâdît. $_CLICK
-# ^ComponentsSubText1
-Izvçlieties uzstâdîðanas veidu:
-# ^ComponentsSubText2_NoInstTypes
-Izvçlieties uzstâdâmos komponentus:
-# ^ComponentsSubText2
-Vai arî – izvçlieties tikai nepiecieðamos komponentus, kurus vçlaties uzstâdît:
-# ^UnComponentsText
-Izvçlieties, kurus komponentus atinstalçt un neiezîmçjiet tos, kurus nevçlaties atinstalçt. $_CLICK
-# ^UnComponentsSubText1
-Izvçlieties atinstalçðanas veidu:
-# ^UnComponentsSubText2_NoInstTypes
-Izvçlieties atinstalçjamos komponentus:
-# ^UnComponentsSubText2
-Vai arî – izvçlieties tikai nepiecieðamos komponentus, kurus vçlaties atinstalçt:
-# ^DirText
-'$(^NameDA)' tiks uzstâdîta ðajâ mapç. Lai to uzstâdîtu citâ mapç, nospiediet 'Pârlûkot' un izvçlieties citu mapi. $_CLICK
-# ^DirSubText
-Uzstâdîðanas mape
-# ^DirBrowseText
-Izvçlieties mapi, kurâ uzstâdît '$(^NameDA)':
-# ^UnDirText
-'$(^NameDA)' tiks atinstalçta no ðîs mapes. Lai to atinstalçtu no citas mapes, nospiediet 'Pârlûkot' un izvçlieties citu mapi. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Izvçlieties mapi, no kuras atinstalçt '$(^NameDA)':
-# ^SpaceAvailable
-"Pieejamais diska apjoms: "
-# ^SpaceRequired
-"Nepiecieðamais diska apjoms: "
-# ^UninstallingText
-'$(^NameDA)' tiks atinstalçta no ðîs mapes. $_CLICK
-# ^UninstallingSubText
-Atinstalçðana no:
-# ^FileError
-Kïûda atverot failu rakstîðanai: \r\n\t"$0"\r\nNospiediet 'Atcelt', lai atceltu uzstâdîðanas procesu,\r\n'Mçìinât vçlreiz', lai atkârtoti mçìinâtu rakstît failâ vai\r\n'Ignorçt', lai izlaistu ðî faila uzstâdîðanu
-# ^FileError_NoIgnore
-Kïûda atverot failu rakstîðanai: \r\n\t"$0"\r\nNospiediet 'Atcelt', lai pârtrauktu uzstâdîðanas procesu
-# ^CantWrite
-"Nevar ierakstît: "
-# ^CopyFailed
-Kopçðana neizdevâs
-# ^CopyTo
-"Kopç uz "
-# ^Registering
-"Reìistrç: "
-# ^Unregistering
-"Atreìistrç: "
-# ^SymbolNotFound
-"Simbols nav atrasts: "
-# ^CouldNotLoad
-"Nav iespçjams ielâdçt: "
-# ^CreateFolder
-"Izveido mapi: "
-# ^CreateShortcut
-"Izveido saîsni: "
-# ^CreatedUninstaller
-"Izveidots atinstalçtâjs: "
-# ^Delete
-"Dzçð failu: "
-# ^DeleteOnReboot
-"Dzçst pçc pârstartçðanas: "
-# ^ErrorCreatingShortcut
-"Kïûda veidojot saîsni: "
-# ^ErrorCreating
-"Kïûda veidojot: "
-# ^ErrorDecompressing
-Kïûda atkompresçjot datus! Bojâta instalâcija?
-# ^ErrorRegistering
-Kïûda reìistrçjot DLL failu
-# ^ExecShell
-"Izpilda èaulâ: "
-# ^Exec
-"Izpilda: "
-# ^Extract
-"Atspieþ: "
-# ^ErrorWriting
-"Atspieðana: kïûda rakstot failâ "
-# ^InvalidOpcode
-Instalâcija bojâta: nederîgs CRC kods
-# ^NoOLE
-"Nav OLE priekð: "
-# ^OutputFolder
-"Izvades mape: "
-# ^RemoveFolder
-"Dzçð mapi: "
-# ^RenameOnReboot
-"Pârsaukt pçc pârstartçðanas: "
-# ^Rename
-"Pârsaukt: "
-# ^Skipped
-"Izlaists: "
-# ^CopyDetails
-Iekopçt detaïas starpliktuvç
-# ^LogInstall
-Ierakstît þurnâla failâ uzstâdîðanas procesu
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1062
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1257
+# RTL - anything else than RTL means LTR
+-
+# Translation by Valdis Griíis (valmiera-9@inbox.lv)
+# Corrections by Kristaps Meòìelis / x-f (x-f 'AT' inbox.lv)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+'$(^Name)' Uzstâdîðana
+# ^UninstallCaption
+'$(^Name)' Atinstalçðana
+# ^LicenseSubCaption
+: Licences lîgums
+# ^ComponentsSubCaption
+: Uzstâdîðanas opcijas
+# ^DirSubCaption
+: Uzstâdîðanas mape
+# ^InstallingSubCaption
+: Notiek uzstâdîðana
+# ^CompletedSubCaption
+: Uzstâdîðana pabeigta.
+# ^UnComponentsSubCaption
+: Atinstalçðanas opcijas
+# ^UnDirSubCaption
+: Atinstalçðanas mape
+# ^ConfirmSubCaption
+: Apstiprinâðana
+# ^UninstallingSubCaption
+: Notiek atinstalçðana
+# ^UnCompletedSubCaption
+: Atinstalçðana pabeigta
+# ^BackBtn
+< &Atpakaï
+# ^NextBtn
+&Tâlâk >
+# ^AgreeBtn
+Es &piekrîtu
+# ^AcceptBtn
+Es &piekrîtu licences lîguma noteikumiem
+# ^DontAcceptBtn
+Es &nepiekrîtu licences lîguma noteikumiem
+# ^InstallBtn
+&Uzstâdît
+# ^UninstallBtn
+&Atinstalçt
+# ^CancelBtn
+Atcelt
+# ^CloseBtn
+Ai&zvçrt
+# ^BrowseBtn
+Pâ&rlûkot...
+# ^ShowDetailsBtn
+Parâdît &detaïas
+# ^ClickNext
+Spiediet 'Tâlâk', lai turpinâtu.
+# ^ClickInstall
+Spiediet 'Uzstâdît', lai sâktu uzstâdîðanas procesu.
+# ^ClickUninstall
+Spiediet 'Atinstalçt', lai sâktu atinstalçðanas procesu.
+# ^Name
+Vârds
+# ^Completed
+Uzstâdîðana pabeigta
+# ^LicenseText
+Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas. Ja piekrîtat licences lîguma noteikumiem, tad spiediet 'Es piekrîtu'.
+# ^LicenseTextCB
+Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas. Ja piekrîtat licences lîguma noteikumiem, tad atzîmçjiet izvçles rûtiòu. $_CLICK
+# ^LicenseTextRB
+Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas. Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties pirmo zemâkesoðo opciju. $_CLICK
+# ^UnLicenseText
+Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas. Ja piekrîtat licences lîguma noteikumiem, tad spiediet 'Es piekrîtu'.
+# ^UnLicenseTextCB
+Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas. Ja piekrîtat licences lîguma noteikumiem, tad atzîmçjiet izvçles rûtiòu. $_CLICK
+# ^UnLicenseTextRB
+Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas. Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties zemâkesoðo opciju. $_CLICK
+# ^Custom
+Pielâgots
+# ^ComponentsText
+Izvçlieties, kurus komponentus vçlaties uzstâdît un neiezîmçjiet tos, kurus nevçlaties uzstâdît. $_CLICK
+# ^ComponentsSubText1
+Izvçlieties uzstâdîðanas veidu:
+# ^ComponentsSubText2_NoInstTypes
+Izvçlieties uzstâdâmos komponentus:
+# ^ComponentsSubText2
+Vai arî – izvçlieties tikai nepiecieðamos komponentus, kurus vçlaties uzstâdît:
+# ^UnComponentsText
+Izvçlieties, kurus komponentus atinstalçt un neiezîmçjiet tos, kurus nevçlaties atinstalçt. $_CLICK
+# ^UnComponentsSubText1
+Izvçlieties atinstalçðanas veidu:
+# ^UnComponentsSubText2_NoInstTypes
+Izvçlieties atinstalçjamos komponentus:
+# ^UnComponentsSubText2
+Vai arî – izvçlieties tikai nepiecieðamos komponentus, kurus vçlaties atinstalçt:
+# ^DirText
+'$(^NameDA)' tiks uzstâdîta ðajâ mapç. Lai to uzstâdîtu citâ mapç, nospiediet 'Pârlûkot' un izvçlieties citu mapi. $_CLICK
+# ^DirSubText
+Uzstâdîðanas mape
+# ^DirBrowseText
+Izvçlieties mapi, kurâ uzstâdît '$(^NameDA)':
+# ^UnDirText
+'$(^NameDA)' tiks atinstalçta no ðîs mapes. Lai to atinstalçtu no citas mapes, nospiediet 'Pârlûkot' un izvçlieties citu mapi. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Izvçlieties mapi, no kuras atinstalçt '$(^NameDA)':
+# ^SpaceAvailable
+"Pieejamais diska apjoms: "
+# ^SpaceRequired
+"Nepiecieðamais diska apjoms: "
+# ^UninstallingText
+'$(^NameDA)' tiks atinstalçta no ðîs mapes. $_CLICK
+# ^UninstallingSubText
+Atinstalçðana no:
+# ^FileError
+Kïûda atverot failu rakstîðanai: \r\n\t"$0"\r\nNospiediet 'Atcelt', lai atceltu uzstâdîðanas procesu,\r\n'Mçìinât vçlreiz', lai atkârtoti mçìinâtu rakstît failâ vai\r\n'Ignorçt', lai izlaistu ðî faila uzstâdîðanu
+# ^FileError_NoIgnore
+Kïûda atverot failu rakstîðanai: \r\n\t"$0"\r\nNospiediet 'Atcelt', lai pârtrauktu uzstâdîðanas procesu
+# ^CantWrite
+"Nevar ierakstît: "
+# ^CopyFailed
+Kopçðana neizdevâs
+# ^CopyTo
+"Kopç uz "
+# ^Registering
+"Reìistrç: "
+# ^Unregistering
+"Atreìistrç: "
+# ^SymbolNotFound
+"Simbols nav atrasts: "
+# ^CouldNotLoad
+"Nav iespçjams ielâdçt: "
+# ^CreateFolder
+"Izveido mapi: "
+# ^CreateShortcut
+"Izveido saîsni: "
+# ^CreatedUninstaller
+"Izveidots atinstalçtâjs: "
+# ^Delete
+"Dzçð failu: "
+# ^DeleteOnReboot
+"Dzçst pçc pârstartçðanas: "
+# ^ErrorCreatingShortcut
+"Kïûda veidojot saîsni: "
+# ^ErrorCreating
+"Kïûda veidojot: "
+# ^ErrorDecompressing
+Kïûda atkompresçjot datus! Bojâta instalâcija?
+# ^ErrorRegistering
+Kïûda reìistrçjot DLL failu
+# ^ExecShell
+"Izpilda èaulâ: "
+# ^Exec
+"Izpilda: "
+# ^Extract
+"Atspieþ: "
+# ^ErrorWriting
+"Atspieðana: kïûda rakstot failâ "
+# ^InvalidOpcode
+Instalâcija bojâta: nederîgs CRC kods
+# ^NoOLE
+"Nav OLE priekð: "
+# ^OutputFolder
+"Izvades mape: "
+# ^RemoveFolder
+"Dzçð mapi: "
+# ^RenameOnReboot
+"Pârsaukt pçc pârstartçðanas: "
+# ^Rename
+"Pârsaukt: "
+# ^Skipped
+"Izlaists: "
+# ^CopyDetails
+Iekopçt detaïas starpliktuvç
+# ^LogInstall
+Ierakstît þurnâla failâ uzstâdîðanas procesu
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Latvian.nsh b/Contrib/Language files/Latvian.nsh
index 16e1053..fb8c4c5 100755
--- a/Contrib/Language files/Latvian.nsh
+++ b/Contrib/Language files/Latvian.nsh
@@ -1,122 +1,122 @@
-;Language: Latvieðu [Latvian] - (1062)
-;By Valdis Griíis
-;Corrections by Kristaps Meòìelis / x-f (x-f 'AT' inbox.lv)
-
-!insertmacro LANGFILE "Latvian" "Latvieðu"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Esiet sveicinâti '$(^NameDA)' uzstâdîðanas vednî"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ðis uzstâdîðanas vednis jums palîdzçs veikt '$(^NameDA)' uzstâdîðanu.$\r$\n$\r$\nÏoti ieteicams aizvçrt citas programmas pirms ðîs programmas uzstâdîðanas veikðanas. Tas ïaus atjaunot svarîgus sistçmas failus bez datora pârstartçðanas.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Esiet sveicinâti '$(^NameDA)' atinstalçðanas vednî"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ðis vednis jums palîdzçs veikt '$(^NameDA)' atinstalçðanu.$\r$\n$\r$\nPirms sâkt atinstalçðanas procesu, pârliecinieties, vai '$(^NameDA)' paðlaik nedarbojas.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licences lîgums"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ja piekrîtat licences lîguma noteikumiem, spiediet 'Piekrîtu', lai turpinâtu uzstâdîðanu. Jums ir jâpiekrît licences noteikumiem, lai uzstâdîtu '$(^NameDA)'."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ja piekrîtat licences lîguma noteikumiem, tad atzîmçjiet izvçles rûtiòu. Jums ir jâpiekrît licences noteikumiem, lai uzstâdîtu '$(^NameDA)'. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties pirmo zemâkesoðo opciju. Jums ir jâpiekrît licences noteikumiem, lai uzstâdîtu '$(^NameDA)'. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licences lîgums"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ja piekrîtat licences noteikumiem, spiediet 'Piekrîtu', lai turpinâtu. Jums ir jâpiekrît licences noteikumiem, lai atinstalçtu '$(^NameDA)'."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ja piekrîtat licences lîguma noteikumiem, tad iezîmçjiet izvçles rûtiòu. Jums ir jâpiekrît licences noteikumiem, lai atinstalçtu '$(^NameDA)'. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties pirmo zemâkesoðo opciju. Jums ir jâpiekrît licences noteikumiem, lai atinstalçtu '$(^NameDA)'. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Spiediet 'Page Down', lai aplûkotu visu lîgumu."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izvçlieties komponentus"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izvçlieties nepiecieðamâs '$(^NameDA)' sastâvdaïas, kuras uzstâdît."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Apraksts"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izvçlieties komponentus"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izvçlieties nepiecieðamâs '$(^NameDA)' sastâvdaïas, kuras atinstalçt."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Novietojiet peles kursoru uz komponenta, lai tiktu parâdîts tâ apraksts."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Novietojiet peles kursoru uz komponenta, lai tiktu parâdîts tâ apraksts."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Izvçlieties uzstâdîðanas mapi"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Izvçlieties mapi, kurâ uzstâdît '$(^NameDA)'."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izvçlieties atinstalçðanas mapi"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Izvçlieties mapi, no kuras notiks '$(^NameDA)' atinstalçðana."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Notiek uzstâdîðana"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Lûdzu uzgaidiet, kamçr notiek '$(^NameDA)' uzstâdîðana."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Uzstâdîðana pabeigta"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Uzstâdîðana noritçja veiksmîgi."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Uzstâdîðana atcelta"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Uzstâdîðana nenoritçja veiksmîgi."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Notiek atinstalçðana"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Lûdzu uzgaidiet, kamçr '$(^NameDA)' tiek atinstalçta."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Atinstalçðana pabeigta"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Atinstalçðana noritçja veiksmîgi."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Atinstalçðana atcelta"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Atinstalçðana nenoritçja veiksmîgi."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Tiek pabeigta '$(^NameDA)' uzstâdîðana"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "'$(^NameDA)' tika veiksmîgi uzstâdîta jûsu datorâ.$\r$\n$\r$\nNospiediet 'Pabeigt', lai aizvçrtu vedni."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Jûsu datoru ir nepiecieðams pârstartçt, lai pabeigtu '$(^NameDA)' uzstâdîðanu. Vai vçlaties pârstartçt datoru tûlît?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Tiek pabeigta '$(^NameDA)' atinstalâcija"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "'$(^NameDA)' tika veiksmîgi izdzçsta no jûsu datora.$\r$\n$\r$\nNospiediet 'Pabeigt', lai aizvçrtu vedni."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Jûsu datoru nepiecieðams pârstartçt, lai pabeigtu '$(^NameDA)' atinstalçðanu. Vai vçlaties pârstartçt datoru tûlît?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Pârstartçt tûlît"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Es vçlos pârstartçt pats vçlâk"
- ${LangFileString} MUI_TEXT_FINISH_RUN "P&alaist '$(^NameDA)'"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Pa&râdît LasiMani failu"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Pabeigt"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izvçlieties 'Start Menu' folderi"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izvçlieties 'Start Menu' mapi '$(^NameDA)' saîsnçm."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izvçlieties 'Start Menu' mapi, kurâ tiks izveidotas programmas saîsnes. Varat arî pats izveidot jaunu mapi."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Neveidot saîsnes"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "'$(^NameDA)' atinstalçðana"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Dzçst '$(^NameDA)' no jûsu datora."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Vai tieðâm vçlaties pârtraukt '$(^Name)' uzstâdîðanu?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Vai tieðâm vçlaties pârtraukt '$(^Name)' atinstalçðanu?"
-!endif
+;Language: Latvieðu [Latvian] - (1062)
+;By Valdis Griíis
+;Corrections by Kristaps Meòìelis / x-f (x-f 'AT' inbox.lv)
+
+!insertmacro LANGFILE "Latvian" "Latvieðu"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Esiet sveicinâti '$(^NameDA)' uzstâdîðanas vednî"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ðis uzstâdîðanas vednis jums palîdzçs veikt '$(^NameDA)' uzstâdîðanu.$\r$\n$\r$\nÏoti ieteicams aizvçrt citas programmas pirms ðîs programmas uzstâdîðanas veikðanas. Tas ïaus atjaunot svarîgus sistçmas failus bez datora pârstartçðanas.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Esiet sveicinâti '$(^NameDA)' atinstalçðanas vednî"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ðis vednis jums palîdzçs veikt '$(^NameDA)' atinstalçðanu.$\r$\n$\r$\nPirms sâkt atinstalçðanas procesu, pârliecinieties, vai '$(^NameDA)' paðlaik nedarbojas.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licences lîgums"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' uzstâdîðanas."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ja piekrîtat licences lîguma noteikumiem, spiediet 'Piekrîtu', lai turpinâtu uzstâdîðanu. Jums ir jâpiekrît licences noteikumiem, lai uzstâdîtu '$(^NameDA)'."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ja piekrîtat licences lîguma noteikumiem, tad atzîmçjiet izvçles rûtiòu. Jums ir jâpiekrît licences noteikumiem, lai uzstâdîtu '$(^NameDA)'. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties pirmo zemâkesoðo opciju. Jums ir jâpiekrît licences noteikumiem, lai uzstâdîtu '$(^NameDA)'. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licences lîgums"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lûdzu izlasiet licences lîgumu pirms '$(^NameDA)' atinstalçðanas."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ja piekrîtat licences noteikumiem, spiediet 'Piekrîtu', lai turpinâtu. Jums ir jâpiekrît licences noteikumiem, lai atinstalçtu '$(^NameDA)'."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ja piekrîtat licences lîguma noteikumiem, tad iezîmçjiet izvçles rûtiòu. Jums ir jâpiekrît licences noteikumiem, lai atinstalçtu '$(^NameDA)'. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ja piekrîtat licences lîguma noteikumiem, tad izvçlieties pirmo zemâkesoðo opciju. Jums ir jâpiekrît licences noteikumiem, lai atinstalçtu '$(^NameDA)'. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Spiediet 'Page Down', lai aplûkotu visu lîgumu."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izvçlieties komponentus"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izvçlieties nepiecieðamâs '$(^NameDA)' sastâvdaïas, kuras uzstâdît."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Apraksts"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izvçlieties komponentus"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izvçlieties nepiecieðamâs '$(^NameDA)' sastâvdaïas, kuras atinstalçt."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Novietojiet peles kursoru uz komponenta, lai tiktu parâdîts tâ apraksts."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Novietojiet peles kursoru uz komponenta, lai tiktu parâdîts tâ apraksts."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Izvçlieties uzstâdîðanas mapi"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Izvçlieties mapi, kurâ uzstâdît '$(^NameDA)'."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izvçlieties atinstalçðanas mapi"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Izvçlieties mapi, no kuras notiks '$(^NameDA)' atinstalçðana."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Notiek uzstâdîðana"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Lûdzu uzgaidiet, kamçr notiek '$(^NameDA)' uzstâdîðana."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Uzstâdîðana pabeigta"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Uzstâdîðana noritçja veiksmîgi."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Uzstâdîðana atcelta"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Uzstâdîðana nenoritçja veiksmîgi."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Notiek atinstalçðana"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Lûdzu uzgaidiet, kamçr '$(^NameDA)' tiek atinstalçta."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Atinstalçðana pabeigta"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Atinstalçðana noritçja veiksmîgi."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Atinstalçðana atcelta"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Atinstalçðana nenoritçja veiksmîgi."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Tiek pabeigta '$(^NameDA)' uzstâdîðana"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "'$(^NameDA)' tika veiksmîgi uzstâdîta jûsu datorâ.$\r$\n$\r$\nNospiediet 'Pabeigt', lai aizvçrtu vedni."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Jûsu datoru ir nepiecieðams pârstartçt, lai pabeigtu '$(^NameDA)' uzstâdîðanu. Vai vçlaties pârstartçt datoru tûlît?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Tiek pabeigta '$(^NameDA)' atinstalâcija"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "'$(^NameDA)' tika veiksmîgi izdzçsta no jûsu datora.$\r$\n$\r$\nNospiediet 'Pabeigt', lai aizvçrtu vedni."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Jûsu datoru nepiecieðams pârstartçt, lai pabeigtu '$(^NameDA)' atinstalçðanu. Vai vçlaties pârstartçt datoru tûlît?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Pârstartçt tûlît"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Es vçlos pârstartçt pats vçlâk"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "P&alaist '$(^NameDA)'"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Pa&râdît LasiMani failu"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Pabeigt"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izvçlieties 'Start Menu' folderi"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izvçlieties 'Start Menu' mapi '$(^NameDA)' saîsnçm."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izvçlieties 'Start Menu' mapi, kurâ tiks izveidotas programmas saîsnes. Varat arî pats izveidot jaunu mapi."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Neveidot saîsnes"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "'$(^NameDA)' atinstalçðana"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Dzçst '$(^NameDA)' no jûsu datora."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Vai tieðâm vçlaties pârtraukt '$(^Name)' uzstâdîðanu?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Vai tieðâm vçlaties pârtraukt '$(^Name)' atinstalçðanu?"
+!endif
diff --git a/Contrib/Language files/Lithuanian.nlf b/Contrib/Language files/Lithuanian.nlf
index f9c713a..50fff1b 100755
--- a/Contrib/Language files/Lithuanian.nlf
+++ b/Contrib/Language files/Lithuanian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1063
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1257
-# RTL - anything else than RTL means LTR
--
-# Translation by Vytautas Krivickas (Vytautas)
-# Updated by Danielius Scepanskis (Daan daniel@takas.lt) 2004.03.24
-# ^Branding
-Nullsoft instaliavimo sistema %s
-# ^SetupCaption
-$(^Name) Ádiegimas
-# ^UninstallCaption
-$(^Name) Ðalinti
-# ^LicenseSubCaption
-: Naudojimo sutartis
-# ^ComponentsSubCaption
-: Ádiegimo nustatymai
-# ^DirSubCaption
-: Ádiegimo katalogas
-# ^InstallingSubCaption
-: Ádiegiama
-# ^CompletedSubCaption
-: Baigta
-# ^UnComponentsSubCaption
-: Iðtrinimo nustatymai
-# ^UnDirSubCaption
-: Iðtrinimo katalogas
-# ^ConfirmSubCaption
-: Patvirtinimas
-# ^UninstallingSubCaption
-: Panaikinama
-# ^UnCompletedSubCaption
-: Baigta
-# ^BackBtn
-< &Atgal
-# ^NextBtn
-&Toliau >
-# ^AgreeBtn
-Að &sutinku
-# ^AcceptBtn
-Að &sutinku su naudojimo sutarties sàlygomis
-# ^DontAcceptBtn
-Að &nesutinku su naudojimo sutarties sàlygomis
-# ^InstallBtn
-&Ádiegti
-# ^UninstallBtn
-&Panaikinti
-# ^CancelBtn
-Nutraukti
-# ^CloseBtn
-&Uþdaryti
-# ^BrowseBtn
-P&asirinkti...
-# ^ShowDetailsBtn
-Parodyti &detales
-# ^ClickNext
-Paspauskite toliau
-# ^ClickInstall
-Paspauskite ádiegti
-# ^ClickUninstall
-Paspauskite iðtrinti
-# ^Name
-Vardas
-# ^Completed
-Baigta
-# ^LicenseText
-Praðome perskaityti sutartá prieð ádiegdami $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku.
-# ^LicenseTextCB
-Praðome perskaityti sutartá prieð ádiegdami $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, padëkite varnelæ tam skirtame laukelyje. $_CLICK
-# ^LicenseTextRB
-Praðome perskaityti sutartá prieð ádiegdami $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. $_CLICK
-# ^UnLicenseText
-Praðome perskaityti sutartá prieð iðtrinant $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku.
-# ^UnLicenseTextCB
-Praðome perskaityti sutartá prieð iðtrinant $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, padëkite varnelæ tam skirtame laukelyje. $_CLICK
-# ^UnLicenseTextRB
-Praðome perskaityti sutartá prieð iðtrinant $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. $_CLICK
-# ^Custom
-Kitoks
-# ^ComponentsText
-Padëkite varneles laukeliuose komponentø kuriuos norite ádiegti ir nuimkite nuo kuriø nenorite ádiegti. $_CLICK
-# ^ComponentsSubText1
-Pasirinkite ádiegimo bûdà:
-# ^ComponentsSubText2_NoInstTypes
-Pasirinkite komponentus, kuriuos ádiegti:
-# ^ComponentsSubText2
-Arba, pasirinkite neprivalomus komponentus, kuriuos jûs norite ádiegti:
-# ^UnComponentsText
-Padëkite varneles laukeliuose komponentø kuriuos norite paðalinti ir nuimkite nuo kuriø nenorite paðalinti. $_CLICK
-# ^UnComponentsSubText1
-Pasirinkite ðalinimo bûdà:
-# ^UnComponentsSubText2_NoInstTypes
-Pasirinkite komponentus, kuriuos ðalinti:
-# ^UnComponentsSubText2
-Arba, pasirinkite neprivalomus komponentus, kuriuos jûs norite paðalinti:
-# ^DirText
-Ádiegimas dabar ádiegs $(^NameDA) ðiame kataloge. Jeigu norite pakeisti ðá katalogà, paspauskite Pasirinkti. $_CLICK
-# ^DirSubText
-Ádiegimo katalogas
-# ^DirBrowseText
-Pasirinkite katalogà, kur ádiegti $(^NameDA):
-# ^UnDirText
-Ádiegimas dabar paðalins $(^NameDA) ið ðio katalogo. Jeigu norite pakeisti ðá katalogà paspauskite Pasirinkti. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Pasirinkite katalogà ið kurio paðalinti $(^NameDA):
-# ^SpaceAvailable
-Yra vietos:
-# ^SpaceRequired
-Reikia vietos:
-# ^UninstallingText
-$(^NameDA) dabar bus paðalintas ið ðio katalogo. $_CLICK
-# ^UninstallingSubText
-Trinama ið:
-# ^FileError
-Klaida atidarant failà áraðymui: \r\n\t"$0"\r\nPaspauskite Nutraukti, jei norite nutraukti ádiegimà,\r\nPakartoti, jei norite pabandyti dar kartà áraðyti failà, ar\r\nIgnoruoti, jei norite praleisti ðá failà
-# ^FileError_NoIgnore
-Klaida atidarant failà áraðymui: \r\n\t"$0"\r\nPaspauskite Pakartoti, jei norite pabandyti dar kartà áraðyti failà, ar\r\nNutraukti, jei norite nutraukti ádiegimà.
-# ^CantWrite
-"Negalima áraðyti: "
-# ^CopyFailed
-Kopijavimas nepavyko
-# ^CopyTo
-Kopijuoti á
-# ^Registering
-"Uþregistruojama: "
-# ^Unregistering
-"Iðregistruojama: "
-# ^SymbolNotFound
-Nerastas simbolis:
-# ^CouldNotLoad
-Negaliu ákrauti:
-# ^CreateFolder
-Sukurti katalogà:
-# ^CreateShortcut
-Sukurti nuorodà:
-# ^CreatedUninstaller
-Sukurti panaikinimo programà:
-# ^Delete
-Iðtrinti failà:
-# ^DeleteOnReboot
-"Iðtrinti perkraunant: "
-# ^ErrorCreatingShortcut
-"Klaida kuriant nuorodà: "
-# ^ErrorCreating
-"Klaida kuriant: "
-# ^ErrorDecompressing
-Klaida iðskleidþiant duomenis! Sugadintas ádiegimo failas?
-# ^ErrorRegistering
-Klaida uþregistruojant DLL
-# ^ExecShell
-"VykdytiShell: "
-# ^Exec
-"Vykdyti: "
-# ^Extract
-"Iðskleisti: "
-# ^ErrorWriting
-Iðskleisti: klaida áraðant á failà
-# ^InvalidOpcode
-Ádiegimo failas sugadintas: neteisingas opkodas
-# ^NoOLE
-"Nëra OLE dël: "
-# ^OutputFolder
-"Paskirties katalogas: "
-# ^RemoveFolder
-"Panaikinti katalogà: "
-# ^RenameOnReboot
-"Pervardinti perkraunant: "
-# ^Rename
-"Pervardinti: "
-# ^Skipped
-"Praleista: "
-# ^CopyDetails
-Kopijuoti detales á atmintá
-# ^LogInstall
-Áraðyti ádiegimo detales
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1063
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1257
+# RTL - anything else than RTL means LTR
+-
+# Translation by Vytautas Krivickas (Vytautas)
+# Updated by Danielius Scepanskis (Daan daniel@takas.lt) 2004.03.24
+# ^Branding
+Nullsoft instaliavimo sistema %s
+# ^SetupCaption
+$(^Name) Ádiegimas
+# ^UninstallCaption
+$(^Name) Ðalinti
+# ^LicenseSubCaption
+: Naudojimo sutartis
+# ^ComponentsSubCaption
+: Ádiegimo nustatymai
+# ^DirSubCaption
+: Ádiegimo katalogas
+# ^InstallingSubCaption
+: Ádiegiama
+# ^CompletedSubCaption
+: Baigta
+# ^UnComponentsSubCaption
+: Iðtrinimo nustatymai
+# ^UnDirSubCaption
+: Iðtrinimo katalogas
+# ^ConfirmSubCaption
+: Patvirtinimas
+# ^UninstallingSubCaption
+: Panaikinama
+# ^UnCompletedSubCaption
+: Baigta
+# ^BackBtn
+< &Atgal
+# ^NextBtn
+&Toliau >
+# ^AgreeBtn
+Að &sutinku
+# ^AcceptBtn
+Að &sutinku su naudojimo sutarties sàlygomis
+# ^DontAcceptBtn
+Að &nesutinku su naudojimo sutarties sàlygomis
+# ^InstallBtn
+&Ádiegti
+# ^UninstallBtn
+&Panaikinti
+# ^CancelBtn
+Nutraukti
+# ^CloseBtn
+&Uþdaryti
+# ^BrowseBtn
+P&asirinkti...
+# ^ShowDetailsBtn
+Parodyti &detales
+# ^ClickNext
+Paspauskite toliau
+# ^ClickInstall
+Paspauskite ádiegti
+# ^ClickUninstall
+Paspauskite iðtrinti
+# ^Name
+Vardas
+# ^Completed
+Baigta
+# ^LicenseText
+Praðome perskaityti sutartá prieð ádiegdami $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku.
+# ^LicenseTextCB
+Praðome perskaityti sutartá prieð ádiegdami $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, padëkite varnelæ tam skirtame laukelyje. $_CLICK
+# ^LicenseTextRB
+Praðome perskaityti sutartá prieð ádiegdami $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. $_CLICK
+# ^UnLicenseText
+Praðome perskaityti sutartá prieð iðtrinant $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku.
+# ^UnLicenseTextCB
+Praðome perskaityti sutartá prieð iðtrinant $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, padëkite varnelæ tam skirtame laukelyje. $_CLICK
+# ^UnLicenseTextRB
+Praðome perskaityti sutartá prieð iðtrinant $(^NameDA). Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. $_CLICK
+# ^Custom
+Kitoks
+# ^ComponentsText
+Padëkite varneles laukeliuose komponentø kuriuos norite ádiegti ir nuimkite nuo kuriø nenorite ádiegti. $_CLICK
+# ^ComponentsSubText1
+Pasirinkite ádiegimo bûdà:
+# ^ComponentsSubText2_NoInstTypes
+Pasirinkite komponentus, kuriuos ádiegti:
+# ^ComponentsSubText2
+Arba, pasirinkite neprivalomus komponentus, kuriuos jûs norite ádiegti:
+# ^UnComponentsText
+Padëkite varneles laukeliuose komponentø kuriuos norite paðalinti ir nuimkite nuo kuriø nenorite paðalinti. $_CLICK
+# ^UnComponentsSubText1
+Pasirinkite ðalinimo bûdà:
+# ^UnComponentsSubText2_NoInstTypes
+Pasirinkite komponentus, kuriuos ðalinti:
+# ^UnComponentsSubText2
+Arba, pasirinkite neprivalomus komponentus, kuriuos jûs norite paðalinti:
+# ^DirText
+Ádiegimas dabar ádiegs $(^NameDA) ðiame kataloge. Jeigu norite pakeisti ðá katalogà, paspauskite Pasirinkti. $_CLICK
+# ^DirSubText
+Ádiegimo katalogas
+# ^DirBrowseText
+Pasirinkite katalogà, kur ádiegti $(^NameDA):
+# ^UnDirText
+Ádiegimas dabar paðalins $(^NameDA) ið ðio katalogo. Jeigu norite pakeisti ðá katalogà paspauskite Pasirinkti. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Pasirinkite katalogà ið kurio paðalinti $(^NameDA):
+# ^SpaceAvailable
+Yra vietos:
+# ^SpaceRequired
+Reikia vietos:
+# ^UninstallingText
+$(^NameDA) dabar bus paðalintas ið ðio katalogo. $_CLICK
+# ^UninstallingSubText
+Trinama ið:
+# ^FileError
+Klaida atidarant failà áraðymui: \r\n\t"$0"\r\nPaspauskite Nutraukti, jei norite nutraukti ádiegimà,\r\nPakartoti, jei norite pabandyti dar kartà áraðyti failà, ar\r\nIgnoruoti, jei norite praleisti ðá failà
+# ^FileError_NoIgnore
+Klaida atidarant failà áraðymui: \r\n\t"$0"\r\nPaspauskite Pakartoti, jei norite pabandyti dar kartà áraðyti failà, ar\r\nNutraukti, jei norite nutraukti ádiegimà.
+# ^CantWrite
+"Negalima áraðyti: "
+# ^CopyFailed
+Kopijavimas nepavyko
+# ^CopyTo
+Kopijuoti á
+# ^Registering
+"Uþregistruojama: "
+# ^Unregistering
+"Iðregistruojama: "
+# ^SymbolNotFound
+Nerastas simbolis:
+# ^CouldNotLoad
+Negaliu ákrauti:
+# ^CreateFolder
+Sukurti katalogà:
+# ^CreateShortcut
+Sukurti nuorodà:
+# ^CreatedUninstaller
+Sukurti panaikinimo programà:
+# ^Delete
+Iðtrinti failà:
+# ^DeleteOnReboot
+"Iðtrinti perkraunant: "
+# ^ErrorCreatingShortcut
+"Klaida kuriant nuorodà: "
+# ^ErrorCreating
+"Klaida kuriant: "
+# ^ErrorDecompressing
+Klaida iðskleidþiant duomenis! Sugadintas ádiegimo failas?
+# ^ErrorRegistering
+Klaida uþregistruojant DLL
+# ^ExecShell
+"VykdytiShell: "
+# ^Exec
+"Vykdyti: "
+# ^Extract
+"Iðskleisti: "
+# ^ErrorWriting
+Iðskleisti: klaida áraðant á failà
+# ^InvalidOpcode
+Ádiegimo failas sugadintas: neteisingas opkodas
+# ^NoOLE
+"Nëra OLE dël: "
+# ^OutputFolder
+"Paskirties katalogas: "
+# ^RemoveFolder
+"Panaikinti katalogà: "
+# ^RenameOnReboot
+"Pervardinti perkraunant: "
+# ^Rename
+"Pervardinti: "
+# ^Skipped
+"Praleista: "
+# ^CopyDetails
+Kopijuoti detales á atmintá
+# ^LogInstall
+Áraðyti ádiegimo detales
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Lithuanian.nsh b/Contrib/Language files/Lithuanian.nsh
index 28e4a90..dcc331a 100755
--- a/Contrib/Language files/Lithuanian.nsh
+++ b/Contrib/Language files/Lithuanian.nsh
@@ -1,121 +1,121 @@
-;Language: Lithuanian (1063)
-;By Vytautas Krivickas (Vytautas). Updated by Danielius Scepanskis (Daan daniel@takas.lt) 2004.01.09
-
-!insertmacro LANGFILE "Lithuanian" "Lietuviu"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Sveiki atvykæ á $(^NameDA) ádiegimo programà."
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ði programa jums padës lengvai ádiegti $(^NameDA).$\r$\n$\r$\nRekomenduojama iðjungti visas programas, prieð pradedant ádiegimà. Tai leis atnaujinti sistemos failus neperkraunat kompiuterio.$\r$\n$\r$\n"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Sveiki atvykæ á $(^NameDA) paðalinimo programà."
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ði programa jums padës lengvai iðtrinti $(^NameDA).$\r$\n$\r$\nPrieð pradedant pasitikrinkite kad $(^NameDA) yra iðjungta.$\r$\n$\r$\n"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Naudojimo sutartis"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Praðome perskaityti sutartá prieð ádiegdami $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku. Jûs privalote sutikti, jei norite ádiegti $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jei jûs sutinkate su nurodytomis sàlygomis, padëkite varnelæ tam skirtame laukelyje. Jûs privalote sutikti, jei norite ádiegti $(^NameDA). "
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. Jûs privalote sutikti, jei norite ádiegti $(^NameDA). "
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Naudojimo sutartis"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Praðome perskaityti sutartá prieð $(^NameDA) paðalinimà."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku. Jûs privalote sutikti, jei norite iðtrinti $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "s, padëkite varnelæ tam skirtame laukelyje. Jûs privalote sutikti, jei norite iðtrinti $(^NameDA). "
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. Jûs privalote sutikti, jei norite iðtrinti $(^NameDA)."
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Paspauskite Page Down ir perskaitykite visà sutartá."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Pasirinkite"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Pasirinkite kokias $(^NameDA) galimybes jûs norite ádiegti."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Paaiðkinimas"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Pasirinkite"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pasirinkite kokias $(^NameDA) galimybes jûs norite paðalinti."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Uþveskite pelës þymeklá ant komponento ir pamatysite jo apraðymà."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Uþveskite pelës þymeklá ant komponento ir pamatysite jo apraðymà."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Pasirinkite ádiegimo vietà"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Pasirinkite katalogà á kûri ádiegsite $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Pasirinkite iðtrinimo vietà"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Pasirinkite katalogà ið kurio iðtrinsite $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Diegiama"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Praðome palaukti, kol $(^NameDA) bus ádiegtas."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Ádiegimas baigtas"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Ádiegimas baigtas sekmingai."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Ádiegimas nutrauktas"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Ádiegimas nebuvo baigtas sekmingai."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Ðalinama"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Praðome palaukti, kol $(^NameDA) bus paðalinta."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Programos paðalinimas baigtas"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Iðtrynimas baigtas sekmingai."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Iðtrynimas nutrauktas"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Iðtrynimas nebuvo baigtas sekmingai."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Baigiu $(^NameDA) ádiegimo procesà"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) buvo ádiegtas á jûsø kompiuterá.$\r$\n$\r$\nPaspauskite Baigti."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Jûsø kompiuteris turi bûti perkrautas, kad bûtø baigtas $(^NameDA) ádiegimas. Ar jûs norite perkrauti dabar?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Baigiu $(^NameDA) paðalinimo programà."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) buvo iðtrinta ið jûsø kompiuterio.$\r$\n$\r$\nPaspauskite Baigti."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Jûsø kompiuteris turi bûti perkrautas, kad bûtø baigtas $(^NameDA) paðalinimas. Ar jûs norite perkrauti dabar?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Perkrauti dabar"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Að noriu perkrauti veliau pats"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Leisti $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Parodyti dokumentacijà"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Baigti"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Pasirinkite Start Menu katalogà"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Pasirinkite Start Menu katalogà, kuriame bus sukurtos programos nuorodos."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Pasirinkite Start Menu katalogà, kuriame bus sukurtos programos nuorodos. Jûs taip pat galite sukurti naujà katalogà."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nekurti nuorodø"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Panaikinti $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Iðtrinti $(^NameDA) ið jûsø kompiuterio."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ar jûs tikrai norite iðjungti $(^Name) ádiegimo programà?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ar jûs tikrai norite iðjungti $(^Name) paðalinimo programà?"
-!endif
+;Language: Lithuanian (1063)
+;By Vytautas Krivickas (Vytautas). Updated by Danielius Scepanskis (Daan daniel@takas.lt) 2004.01.09
+
+!insertmacro LANGFILE "Lithuanian" "Lietuviu"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Sveiki atvykæ á $(^NameDA) ádiegimo programà."
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ði programa jums padës lengvai ádiegti $(^NameDA).$\r$\n$\r$\nRekomenduojama iðjungti visas programas, prieð pradedant ádiegimà. Tai leis atnaujinti sistemos failus neperkraunat kompiuterio.$\r$\n$\r$\n"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Sveiki atvykæ á $(^NameDA) paðalinimo programà."
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ði programa jums padës lengvai iðtrinti $(^NameDA).$\r$\n$\r$\nPrieð pradedant pasitikrinkite kad $(^NameDA) yra iðjungta.$\r$\n$\r$\n"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Naudojimo sutartis"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Praðome perskaityti sutartá prieð ádiegdami $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku. Jûs privalote sutikti, jei norite ádiegti $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jei jûs sutinkate su nurodytomis sàlygomis, padëkite varnelæ tam skirtame laukelyje. Jûs privalote sutikti, jei norite ádiegti $(^NameDA). "
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. Jûs privalote sutikti, jei norite ádiegti $(^NameDA). "
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Naudojimo sutartis"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Praðome perskaityti sutartá prieð $(^NameDA) paðalinimà."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jei jûs sutinkate su nurodytomis sàlygomis, spauskite Sutinku. Jûs privalote sutikti, jei norite iðtrinti $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "s, padëkite varnelæ tam skirtame laukelyje. Jûs privalote sutikti, jei norite iðtrinti $(^NameDA). "
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jei jûs sutinkate su nurodytomis sàlygomis, pasirinkite pirmà pasirinkimà esantá þemiau. Jûs privalote sutikti, jei norite iðtrinti $(^NameDA)."
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Paspauskite Page Down ir perskaitykite visà sutartá."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Pasirinkite"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Pasirinkite kokias $(^NameDA) galimybes jûs norite ádiegti."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Paaiðkinimas"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Pasirinkite"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pasirinkite kokias $(^NameDA) galimybes jûs norite paðalinti."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Uþveskite pelës þymeklá ant komponento ir pamatysite jo apraðymà."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Uþveskite pelës þymeklá ant komponento ir pamatysite jo apraðymà."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Pasirinkite ádiegimo vietà"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Pasirinkite katalogà á kûri ádiegsite $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Pasirinkite iðtrinimo vietà"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Pasirinkite katalogà ið kurio iðtrinsite $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Diegiama"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Praðome palaukti, kol $(^NameDA) bus ádiegtas."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Ádiegimas baigtas"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Ádiegimas baigtas sekmingai."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Ádiegimas nutrauktas"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Ádiegimas nebuvo baigtas sekmingai."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Ðalinama"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Praðome palaukti, kol $(^NameDA) bus paðalinta."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Programos paðalinimas baigtas"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Iðtrynimas baigtas sekmingai."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Iðtrynimas nutrauktas"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Iðtrynimas nebuvo baigtas sekmingai."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Baigiu $(^NameDA) ádiegimo procesà"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) buvo ádiegtas á jûsø kompiuterá.$\r$\n$\r$\nPaspauskite Baigti."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Jûsø kompiuteris turi bûti perkrautas, kad bûtø baigtas $(^NameDA) ádiegimas. Ar jûs norite perkrauti dabar?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Baigiu $(^NameDA) paðalinimo programà."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) buvo iðtrinta ið jûsø kompiuterio.$\r$\n$\r$\nPaspauskite Baigti."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Jûsø kompiuteris turi bûti perkrautas, kad bûtø baigtas $(^NameDA) paðalinimas. Ar jûs norite perkrauti dabar?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Perkrauti dabar"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Að noriu perkrauti veliau pats"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Leisti $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Parodyti dokumentacijà"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Baigti"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Pasirinkite Start Menu katalogà"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Pasirinkite Start Menu katalogà, kuriame bus sukurtos programos nuorodos."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Pasirinkite Start Menu katalogà, kuriame bus sukurtos programos nuorodos. Jûs taip pat galite sukurti naujà katalogà."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nekurti nuorodø"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Panaikinti $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Iðtrinti $(^NameDA) ið jûsø kompiuterio."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ar jûs tikrai norite iðjungti $(^Name) ádiegimo programà?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ar jûs tikrai norite iðjungti $(^Name) paðalinimo programà?"
+!endif
diff --git a/Contrib/Language files/Luxembourgish.nlf b/Contrib/Language files/Luxembourgish.nlf
index b8474bd..4638d78 100755
--- a/Contrib/Language files/Luxembourgish.nlf
+++ b/Contrib/Language files/Luxembourgish.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-4103
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Jo Hoeser
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Installatioun
-# ^UninstallCaption
-$(^Name) Desinstallatioun
-# ^LicenseSubCaption
-: Lizenzofkommes
-# ^ComponentsSubCaption
-: Installatiouns-Optiounen
-# ^DirSubCaption
-: Zielverzeechnis
-# ^InstallingSubCaption
-: Installéieren
-# ^CompletedSubCaption
-: Färdeg
-# ^UnComponentsSubCaption
-: Desinstallatiuons-Optiounen
-# ^UnDirSubCaption
-: Quellverzeechnes
-# ^ConfirmSubCaption
-: Bestätegung
-# ^UninstallingSubCaption
-: Läschen
-# ^UnCompletedSubCaption
-: Färdeg
-# ^BackBtn
-< &Zréck
-# ^NextBtn
-&Weider >
-# ^AgreeBtn
-&Unhuelen
-# ^AcceptBtn
-Ech &huelen d'Lizenzofkommes un.
-# ^DontAcceptBtn
-Ech &lehnen d'Lizenzofkommes of.
-# ^InstallBtn
-&Installéieren
-# ^UninstallBtn
-&Desinstalléieren
-# ^CancelBtn
-Ofbriechen
-# ^CloseBtn
-&Zou maan
-# ^BrowseBtn
-&Duerchsichen...
-# ^ShowDetailsBtn
-&Details uweisen
-# ^ClickNext
-Klick op weider fir weiderzefueren
-# ^ClickInstall
-Klick op Installéieren, fir d'Installatioun unzefänken.
-# ^ClickUninstall
-Klick op Desinstalléieren, fir d'Desinstallatioun unzefänken.
-# ^Name
-Numm
-# ^Completed
-Färdeg
-# ^LicenseText
-W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) installéiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, klick op Unhuelen.
-# ^LicenseTextCB
-W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) installéiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, aktivéier d'Kontrollkeschtchen. $_CLICK
-# ^LicenseTextRB
-W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) installéiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, wiel d'entsprichend Optioun. $_CLICK
-# ^UnLicenseText
-W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) desinstalléiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, klick op Unhuelen.
-# ^UnLicenseTextCB
-W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) desinstalléiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, aktivéier d'Kontrollkeschtchen. $_CLICK
-# ^UnLicenseTextRB
-W.e.g. d'Lizenzoofkommes liesen, ierts de $(^NameDA) desinstalléiers. Wanns de all Bedengungen vum Oofkommes akzeptéiers, wiel d'entspriechend Optioun. $_CLICK
-# ^Custom
-Benutzerdefiniert
-# ^ComponentsText
-Wiel d'Komponenten aus, déis de wëlls installéieren an wiel déijéineg of, déis de net installéieren wëlls. $_CLICK
-# ^ComponentsSubText1
-Installatiouns-Typ bestëmmen:
-# ^ComponentsSubText2_NoInstTypes
-Wiel d'Komponenten aus, déis de installéieren wëlls:
-# ^ComponentsSubText2
-oder wiel zousätzlech Komponenten aus déis de installéieren wëlls:
-# ^UnComponentsText
-Wiel d'Komponenten aus déis de desinstalléieren wëlls an wiel déijéineg of, déis de net desinstalléieren wëlls. $_CLICK
-# ^UnComponentsSubText1
-Deinstallatiouns-Typ bestëmmen:
-# ^UnComponentsSubText2_NoInstTypes
-Wiel d'Komponenten aus, déis de desinstalléieren wëlls:
-# ^UnComponentsSubText2
-oder wiel zusätzlech Komponenten aus, déis de desinstalléieren wëlls:
-# ^DirText
-$(^NameDA) gëtt an den Dossier installéiert deen fierginn gouf. Wanns de et an een aneren Dossier installéieren wëlls, klick op Duechsichen an wiel een aneren Dossier aus. $_CLICK
-# ^DirSubText
-Zielverzeechnes
-# ^DirBrowseText
-Wiel en Dossier aus wuers de $(^NameDA) installéieren wëlls:
-# ^UnDirText
-$(^NameDA) gëtt an deem Dossier desinstalléiert, deen uginn gouf. Wann $(^NameDA) an engem aneren Dossier ass, klick op Duechsichen an wiel een aneren Dossier aus. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Wiel den Dossier aus wou $(^NameDA) dran installéiert ass:
-# ^SpaceAvailable
-"Verfügbaren Späicher: "
-# ^SpaceRequired
-"Gebrauchten Späicher: "
-# ^UninstallingText
-$(^NameDA) gëtt aus dem ausgewielten Dossier desinstalléiert. $_CLICK
-# ^UninstallingSubText
-Desinstalléieren aus:
-# ^FileError
-Fehler beim Iwwerschreiwen vun der Datei: \r\n\t"$0"\r\nKlick op ofbriechen fir den Setup ze verloossen,\r\nop Widderhuelen fir den Setup nach eng Kéier duechzeféieren\r\n oder op Ignoréieren fir des Datei ze iwwersprengen an weiderzefueren.
-# ^FileError_NoIgnore
-Fehler beim Iwwerschreiwen vun der Datei: \r\n\t"$0"\r\nKlick op Widderhuelen fir den Setup nach eng Kéier duechzeféieren,\r\noder op ofbriechen fir den Setup ze verloossen.
-# ^CantWrite
-"Fehler beim Schreiwen: "
-# ^CopyFailed
-Kopéieren fehlgeschloen
-# ^CopyTo
-"Kopéiere an "
-# ^Registering
-"Registréieren: "
-# ^Unregistering
-"Deregistréieren: "
-# ^SymbolNotFound
-"Symbol ass net do: "
-# ^CouldNotLoad
-"Fehler beim Lueden vun: "
-# ^CreateFolder
-"Maan Dossier: "
-# ^CreateShortcut
-"Maan Oofkierzung: "
-# ^CreatedUninstaller
-"Man Desinstallatiouns-Programm: "
-# ^Delete
-"Läschen Datei: "
-# ^DeleteOnReboot
-"Läschen Datei no engem Neistart: "
-# ^ErrorCreatingShortcut
-"Fehler beim man vun enger Oofkierzung: "
-# ^ErrorCreating
-"Fehler beim maan: "
-# ^ErrorDecompressing
-Fehler beim Dekompriméieren. Installations-Programm beschiedegt?
-# ^ErrorRegistering
-Fehler beim Registréieren vun der DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Starten: "
-# ^Extract
-"Dekompriméieren: "
-# ^ErrorWriting
-"Dekompriméierung: Fehler beim Schreiwen vun der Datei "
-# ^InvalidOpcode
-Installations-Programm Beschiedegt: net zoulässegen Befehlscode
-# ^NoOLE
-"Keen OLE fier: "
-# ^OutputFolder
-"Zieldossier: "
-# ^RemoveFolder
-"Läschen Dossier: "
-# ^RenameOnReboot
-"Gett no Neistart embenannt: "
-# ^Rename
-"Embenennen: "
-# ^Skipped
-"Iwwersprongen: "
-# ^CopyDetails
-Detailler an d'Zwëschenooflag kopéieren
-# ^LogInstall
-Installatioun protokolléieren
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+4103
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Jo Hoeser
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Installatioun
+# ^UninstallCaption
+$(^Name) Desinstallatioun
+# ^LicenseSubCaption
+: Lizenzofkommes
+# ^ComponentsSubCaption
+: Installatiouns-Optiounen
+# ^DirSubCaption
+: Zielverzeechnis
+# ^InstallingSubCaption
+: Installéieren
+# ^CompletedSubCaption
+: Färdeg
+# ^UnComponentsSubCaption
+: Desinstallatiuons-Optiounen
+# ^UnDirSubCaption
+: Quellverzeechnes
+# ^ConfirmSubCaption
+: Bestätegung
+# ^UninstallingSubCaption
+: Läschen
+# ^UnCompletedSubCaption
+: Färdeg
+# ^BackBtn
+< &Zréck
+# ^NextBtn
+&Weider >
+# ^AgreeBtn
+&Unhuelen
+# ^AcceptBtn
+Ech &huelen d'Lizenzofkommes un.
+# ^DontAcceptBtn
+Ech &lehnen d'Lizenzofkommes of.
+# ^InstallBtn
+&Installéieren
+# ^UninstallBtn
+&Desinstalléieren
+# ^CancelBtn
+Ofbriechen
+# ^CloseBtn
+&Zou maan
+# ^BrowseBtn
+&Duerchsichen...
+# ^ShowDetailsBtn
+&Details uweisen
+# ^ClickNext
+Klick op weider fir weiderzefueren
+# ^ClickInstall
+Klick op Installéieren, fir d'Installatioun unzefänken.
+# ^ClickUninstall
+Klick op Desinstalléieren, fir d'Desinstallatioun unzefänken.
+# ^Name
+Numm
+# ^Completed
+Färdeg
+# ^LicenseText
+W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) installéiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, klick op Unhuelen.
+# ^LicenseTextCB
+W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) installéiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, aktivéier d'Kontrollkeschtchen. $_CLICK
+# ^LicenseTextRB
+W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) installéiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, wiel d'entsprichend Optioun. $_CLICK
+# ^UnLicenseText
+W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) desinstalléiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, klick op Unhuelen.
+# ^UnLicenseTextCB
+W.e.g. d'Lizenzofkommes liesen, ierts de $(^NameDA) desinstalléiers. Wanns de all Bedengungen vum Ofkommes akzeptéiers, aktivéier d'Kontrollkeschtchen. $_CLICK
+# ^UnLicenseTextRB
+W.e.g. d'Lizenzoofkommes liesen, ierts de $(^NameDA) desinstalléiers. Wanns de all Bedengungen vum Oofkommes akzeptéiers, wiel d'entspriechend Optioun. $_CLICK
+# ^Custom
+Benutzerdefiniert
+# ^ComponentsText
+Wiel d'Komponenten aus, déis de wëlls installéieren an wiel déijéineg of, déis de net installéieren wëlls. $_CLICK
+# ^ComponentsSubText1
+Installatiouns-Typ bestëmmen:
+# ^ComponentsSubText2_NoInstTypes
+Wiel d'Komponenten aus, déis de installéieren wëlls:
+# ^ComponentsSubText2
+oder wiel zousätzlech Komponenten aus déis de installéieren wëlls:
+# ^UnComponentsText
+Wiel d'Komponenten aus déis de desinstalléieren wëlls an wiel déijéineg of, déis de net desinstalléieren wëlls. $_CLICK
+# ^UnComponentsSubText1
+Deinstallatiouns-Typ bestëmmen:
+# ^UnComponentsSubText2_NoInstTypes
+Wiel d'Komponenten aus, déis de desinstalléieren wëlls:
+# ^UnComponentsSubText2
+oder wiel zusätzlech Komponenten aus, déis de desinstalléieren wëlls:
+# ^DirText
+$(^NameDA) gëtt an den Dossier installéiert deen fierginn gouf. Wanns de et an een aneren Dossier installéieren wëlls, klick op Duechsichen an wiel een aneren Dossier aus. $_CLICK
+# ^DirSubText
+Zielverzeechnes
+# ^DirBrowseText
+Wiel en Dossier aus wuers de $(^NameDA) installéieren wëlls:
+# ^UnDirText
+$(^NameDA) gëtt an deem Dossier desinstalléiert, deen uginn gouf. Wann $(^NameDA) an engem aneren Dossier ass, klick op Duechsichen an wiel een aneren Dossier aus. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Wiel den Dossier aus wou $(^NameDA) dran installéiert ass:
+# ^SpaceAvailable
+"Verfügbaren Späicher: "
+# ^SpaceRequired
+"Gebrauchten Späicher: "
+# ^UninstallingText
+$(^NameDA) gëtt aus dem ausgewielten Dossier desinstalléiert. $_CLICK
+# ^UninstallingSubText
+Desinstalléieren aus:
+# ^FileError
+Fehler beim Iwwerschreiwen vun der Datei: \r\n\t"$0"\r\nKlick op ofbriechen fir den Setup ze verloossen,\r\nop Widderhuelen fir den Setup nach eng Kéier duechzeféieren\r\n oder op Ignoréieren fir des Datei ze iwwersprengen an weiderzefueren.
+# ^FileError_NoIgnore
+Fehler beim Iwwerschreiwen vun der Datei: \r\n\t"$0"\r\nKlick op Widderhuelen fir den Setup nach eng Kéier duechzeféieren,\r\noder op ofbriechen fir den Setup ze verloossen.
+# ^CantWrite
+"Fehler beim Schreiwen: "
+# ^CopyFailed
+Kopéieren fehlgeschloen
+# ^CopyTo
+"Kopéiere an "
+# ^Registering
+"Registréieren: "
+# ^Unregistering
+"Deregistréieren: "
+# ^SymbolNotFound
+"Symbol ass net do: "
+# ^CouldNotLoad
+"Fehler beim Lueden vun: "
+# ^CreateFolder
+"Maan Dossier: "
+# ^CreateShortcut
+"Maan Oofkierzung: "
+# ^CreatedUninstaller
+"Man Desinstallatiouns-Programm: "
+# ^Delete
+"Läschen Datei: "
+# ^DeleteOnReboot
+"Läschen Datei no engem Neistart: "
+# ^ErrorCreatingShortcut
+"Fehler beim man vun enger Oofkierzung: "
+# ^ErrorCreating
+"Fehler beim maan: "
+# ^ErrorDecompressing
+Fehler beim Dekompriméieren. Installations-Programm beschiedegt?
+# ^ErrorRegistering
+Fehler beim Registréieren vun der DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Starten: "
+# ^Extract
+"Dekompriméieren: "
+# ^ErrorWriting
+"Dekompriméierung: Fehler beim Schreiwen vun der Datei "
+# ^InvalidOpcode
+Installations-Programm Beschiedegt: net zoulässegen Befehlscode
+# ^NoOLE
+"Keen OLE fier: "
+# ^OutputFolder
+"Zieldossier: "
+# ^RemoveFolder
+"Läschen Dossier: "
+# ^RenameOnReboot
+"Gett no Neistart embenannt: "
+# ^Rename
+"Embenennen: "
+# ^Skipped
+"Iwwersprongen: "
+# ^CopyDetails
+Detailler an d'Zwëschenooflag kopéieren
+# ^LogInstall
+Installatioun protokolléieren
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Luxembourgish.nsh b/Contrib/Language files/Luxembourgish.nsh
index 9efe7f9..639ab5a 100755
--- a/Contrib/Language files/Luxembourgish.nsh
+++ b/Contrib/Language files/Luxembourgish.nsh
@@ -1,121 +1,121 @@
-;Language: Luxembourgish (1031)
-;By Snowloard, changes by Philo
-
-!insertmacro LANGFILE "Luxembourgish" "Lëtzebuergesch"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Wëllkomm beim Installatiouns-$\r$\nAssistent vun $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Dësen Assistent wärt dech duech d'Installatioun vun $(^NameDA) begleeden.$\r$\n$\r$\nEt gëtt ugeroden alleguer d'Programmer di am Moment lafen zouzemaan, datt bestëmmt Systemdateien ouni Neistart ersat kënne ginn.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Wëllkomm am Desinstallatiouns-$\r$\n\Assistent fir $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Desen Assistent begleet dech duech d'Desinstallatioun vun $(^NameDA).$\r$\n$\r$\nW.e.g. maach $(^NameDA) zu, ierts de mat der Desinstallatioun ufänks.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lizenzofkommes"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "W.e.g. d'Lizenzoofkommes liesen, ierts de mat der Installatioun weiderfiers."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Wanns de alleguer d'Bedengungen vum Ofkommes akzeptéiers, klick op Unhuelen. Du muss alleguer d'Fuerderungen unerkennen, fir $(^NameDA) installéieren ze kënnen."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Wanns de alleguer d'Bedengungen vum Ofkommes akzeptéiers, aktivéier d'Këschtchen. Du muss alleguer d'Fuerderungen unerkennen, fir $(^NameDA) installéieren ze kënnen. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Wanns de alleguer d'Bedengungen vum Ofkommes akzeptéiers, wiel ënnen di entspriechend Äntwert aus. Du muss alleguer d'Fuerderungen unerkennen, fir $(^NameDA) installéieren ze kënnen. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lizenzofkommes"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "W.e.g. lies d'Lizenzofkommes duech ierts de mat der Desinstallatioun vun $(^NameDA) weiderfiers."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Wanns de d'Fuerderungen vum Ofkommes akzeptéiers, klick op unhuelen. Du muss d'Ofkommes akzeptéieren, fir $(^NameDA) kënnen ze desinstalléieren."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Wanns de d'Fuerderungen vum Ofkommes akzeptéiers, aktivéier d'Këschtchen. Du muss d'Ofkommes akzeptéieren, fir $(^NameDA) kënnen ze desinstalléieren. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Wanns de d'Fuerderungen vum Ofkommes akzeptéiers, wiel ënnen di entspriechend Optioun. Du muss d'Oofkommes akzeptéieren, fir $(^NameDA) kennen ze desinstalléieren. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Dréck d'PageDown-Tast fir den Rescht vum Ofkommes ze liesen."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Komponenten auswielen"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Wiel d'Komponenten aus, déis de wëlls installéieren."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschreiwung"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Komponenten auswielen"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Wiel eng Komponent aus, déis de desinstalléieren wëlls."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Hal den Mausfeil iwwer eng Komponent, fir d'Beschreiwung dervun ze gesinn."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Hal den Mausfeil iwwer eng Komponent, fir d'Beschreiwung dervun ze gesinn."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zielverzeechnes auswielen"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Wiel den Dossier aus, an deen $(^NameDA) installéiert soll ginn."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Dossier fir d'Desinstallatioun wielen"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Wiel den Dossier aus, aus dem $(^NameDA) desinstalléiert soll ginn."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installéieren..."
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Waard w.e.g während deem $(^NameDA) installéiert gëtt."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installatioun färdeg"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "D'Installatioun ass feelerfräi oofgeschloss ginn."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installatioun ofgebrach"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "D'Installatioun ass net komplett ofgeschloss ginn."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalléieren..."
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "W.e.g. waard, während deems $(^NameDA) desinstalléiert gëtt."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstallatioun ofgeschloss"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "D'Desinstallatioun ass erfollegräich ofgeschloss ginn."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstallatioun oofbriechen"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Desinstallatioun ass net erfollegräich ofgeschloss ginn."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "D'Installatioun vun $(^NameDA) gëtt ofgeschloss."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ass um Computer installéiert ginn.$\r$\n$\r$\nKlick op färdeg maan, fir den Installatiouns-Assistent zou ze maan.."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Den Windows muss nei gestart ginn, fir d'Installatioun vun $(^NameDA) ofzeschléissen. Wëlls de Windows lo néi starten?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Desinstallatioun vun $(^NameDA) gëtt ofgeschloss"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ass vum Computer desinstalléiert ginn.$\r$\n$\r$\nKlick op Ofschléissen fir den Assistent zou ze maan."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Windows muss néi gestart gin, fir d'Desinstallatioun vun $(^NameDA) ze vervollstännegen. Wëlls de Windows lo néi starten?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Lo néi starten"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Spéider manuell néi starten"
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) op maan"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Liesmech op maan"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Färdeg man"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Startmenü-Dossier bestëmmen"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Bestëmm een Startmanü-Dossier an deen d'Programmofkierzungen kommen."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Bestëmm een Startmanü-Dossier an deen d'Programmofkierzungen kommen. Wanns de een néien Dossier man wells, gëff deem säin zukünftegen Numm an."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Keng Ofkierzungen man"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstallatioun vun $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) gett vum Computer desinstalléiert."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Bass de sécher, dass de d'Installatioun vun $(^Name) ofbriechen wëlls?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Bass de sécher, dass de d'Desinstallatioun vun $(^Name) ofbriechen wëlls?"
-!endif
+;Language: Luxembourgish (1031)
+;By Snowloard, changes by Philo
+
+!insertmacro LANGFILE "Luxembourgish" "Lëtzebuergesch"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Wëllkomm beim Installatiouns-$\r$\nAssistent vun $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Dësen Assistent wärt dech duech d'Installatioun vun $(^NameDA) begleeden.$\r$\n$\r$\nEt gëtt ugeroden alleguer d'Programmer di am Moment lafen zouzemaan, datt bestëmmt Systemdateien ouni Neistart ersat kënne ginn.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Wëllkomm am Desinstallatiouns-$\r$\n\Assistent fir $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Desen Assistent begleet dech duech d'Desinstallatioun vun $(^NameDA).$\r$\n$\r$\nW.e.g. maach $(^NameDA) zu, ierts de mat der Desinstallatioun ufänks.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lizenzofkommes"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "W.e.g. d'Lizenzoofkommes liesen, ierts de mat der Installatioun weiderfiers."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Wanns de alleguer d'Bedengungen vum Ofkommes akzeptéiers, klick op Unhuelen. Du muss alleguer d'Fuerderungen unerkennen, fir $(^NameDA) installéieren ze kënnen."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Wanns de alleguer d'Bedengungen vum Ofkommes akzeptéiers, aktivéier d'Këschtchen. Du muss alleguer d'Fuerderungen unerkennen, fir $(^NameDA) installéieren ze kënnen. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Wanns de alleguer d'Bedengungen vum Ofkommes akzeptéiers, wiel ënnen di entspriechend Äntwert aus. Du muss alleguer d'Fuerderungen unerkennen, fir $(^NameDA) installéieren ze kënnen. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lizenzofkommes"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "W.e.g. lies d'Lizenzofkommes duech ierts de mat der Desinstallatioun vun $(^NameDA) weiderfiers."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Wanns de d'Fuerderungen vum Ofkommes akzeptéiers, klick op unhuelen. Du muss d'Ofkommes akzeptéieren, fir $(^NameDA) kënnen ze desinstalléieren."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Wanns de d'Fuerderungen vum Ofkommes akzeptéiers, aktivéier d'Këschtchen. Du muss d'Ofkommes akzeptéieren, fir $(^NameDA) kënnen ze desinstalléieren. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Wanns de d'Fuerderungen vum Ofkommes akzeptéiers, wiel ënnen di entspriechend Optioun. Du muss d'Oofkommes akzeptéieren, fir $(^NameDA) kennen ze desinstalléieren. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Dréck d'PageDown-Tast fir den Rescht vum Ofkommes ze liesen."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Komponenten auswielen"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Wiel d'Komponenten aus, déis de wëlls installéieren."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschreiwung"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Komponenten auswielen"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Wiel eng Komponent aus, déis de desinstalléieren wëlls."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Hal den Mausfeil iwwer eng Komponent, fir d'Beschreiwung dervun ze gesinn."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Hal den Mausfeil iwwer eng Komponent, fir d'Beschreiwung dervun ze gesinn."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Zielverzeechnes auswielen"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Wiel den Dossier aus, an deen $(^NameDA) installéiert soll ginn."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Dossier fir d'Desinstallatioun wielen"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Wiel den Dossier aus, aus dem $(^NameDA) desinstalléiert soll ginn."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installéieren..."
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Waard w.e.g während deem $(^NameDA) installéiert gëtt."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installatioun färdeg"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "D'Installatioun ass feelerfräi oofgeschloss ginn."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installatioun ofgebrach"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "D'Installatioun ass net komplett ofgeschloss ginn."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalléieren..."
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "W.e.g. waard, während deems $(^NameDA) desinstalléiert gëtt."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstallatioun ofgeschloss"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "D'Desinstallatioun ass erfollegräich ofgeschloss ginn."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstallatioun oofbriechen"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Desinstallatioun ass net erfollegräich ofgeschloss ginn."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "D'Installatioun vun $(^NameDA) gëtt ofgeschloss."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ass um Computer installéiert ginn.$\r$\n$\r$\nKlick op färdeg maan, fir den Installatiouns-Assistent zou ze maan.."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Den Windows muss nei gestart ginn, fir d'Installatioun vun $(^NameDA) ofzeschléissen. Wëlls de Windows lo néi starten?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Desinstallatioun vun $(^NameDA) gëtt ofgeschloss"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ass vum Computer desinstalléiert ginn.$\r$\n$\r$\nKlick op Ofschléissen fir den Assistent zou ze maan."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Windows muss néi gestart gin, fir d'Desinstallatioun vun $(^NameDA) ze vervollstännegen. Wëlls de Windows lo néi starten?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Lo néi starten"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Spéider manuell néi starten"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) op maan"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Liesmech op maan"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Färdeg man"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Startmenü-Dossier bestëmmen"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Bestëmm een Startmanü-Dossier an deen d'Programmofkierzungen kommen."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Bestëmm een Startmanü-Dossier an deen d'Programmofkierzungen kommen. Wanns de een néien Dossier man wells, gëff deem säin zukünftegen Numm an."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Keng Ofkierzungen man"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstallatioun vun $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) gett vum Computer desinstalléiert."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Bass de sécher, dass de d'Installatioun vun $(^Name) ofbriechen wëlls?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Bass de sécher, dass de d'Desinstallatioun vun $(^Name) ofbriechen wëlls?"
+!endif
diff --git a/Contrib/Language files/Macedonian.nlf b/Contrib/Language files/Macedonian.nlf
index 30b50b3..818ab8e 100755
--- a/Contrib/Language files/Macedonian.nlf
+++ b/Contrib/Language files/Macedonian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1071
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Sasko Zdravkin [wingman2083@yahoo.com]
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Èíñòàëèðàœå íà $(^Name)
-# ^UninstallCaption
-Äåèíñòàëèðàœå íà $(^Name)
-# ^LicenseSubCaption
-: Ëèöåíöåí Äîãîâîð
-# ^ComponentsSubCaption
-: Èíñòàëàöèîíè Îïöèè
-# ^DirSubCaption
-: Èíñòàëàöèîíåí Äèðåêòîðèóì
-# ^InstallingSubCaption
-: Èíñòàëèðà
-# ^CompletedSubCaption
-: Çàâðøåíî
-# ^UnComponentsSubCaption
-: Äåèíñòàëàöèîíè Îïöèè
-# ^UnDirSubCaption
-: Äåèíñòàëàöèîíåí Äèðåêòîðèóì
-# ^ConfirmSubCaption
-: Ïîòâðäà
-# ^UninstallingSubCaption
-: Äåèíñòàëèðà
-# ^UnCompletedSubCaption
-: Çàâðøåíî
-# ^BackBtn
-< &Íàçàä
-# ^NextBtn
-Í&àïðåä >
-# ^AgreeBtn
-&Äà
-# ^AcceptBtn
-&Ãè ïðèôààì óñëîâèòå îä Ëèöåíöíèîò Äîãîâîð
-# ^DontAcceptBtn
-Í&å ãè ïðèôààì óñëîâèòå îä Ëèöåíöíèîò Äîãîâîð
-# ^InstallBtn
-&Èíñòàëèðà¼
-# ^UninstallBtn
-&Äåèíñòàëèðà¼
-# ^CancelBtn
-Îòêàæè
-# ^CloseBtn
-&Çàòâîðè
-# ^BrowseBtn
-&Ïðåáàðóâà¼...
-# ^ShowDetailsBtn
-Ï&îêàæè Äåòàëè
-# ^ClickNext
-Ïðèòèñíåòå 'Íàïðåä' çà äà ïðîäîëæèòå.
-# ^ClickInstall
-Ïðèòèñíåòå 'Èíñòàëèðà¼' çà äà ñå èíñòàëèðà.
-# ^ClickUninstall
-Ïðèòèñíåòå 'Äåèíñòàëèðà¼' çà äà ñå äåèíñòàëèðà.
-# ^Name
-Èìå
-# ^Completed
-Çàâðøåíî
-# ^LicenseText
-Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå èíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå 'Äà'.
-# ^LicenseTextCB
-Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå èíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå ãî Check box-îò ïîäîëå. $_CLICK
-# ^LicenseTextRB
-Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå èíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. $_CLICK
-# ^UnLicenseText
-Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå äåèíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå 'Äà'.
-# ^UnLicenseTextCB
-Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå äåèíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå ãî Check box-îò ïîäîëå. $_CLICK
-# ^UnLicenseTextRB
-Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå äåèíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. $_CLICK
-# ^Custom
-Ïîäåñåíî
-# ^ComponentsText
-×åêèðà¼òå ãè êîìïîíåíòèòå øòî ñàêàòå äà ñå èíñòàëèðààò èëè äå÷åêèðà¼òå ãè òèå øòî íå ñàêàòå äà ñå èíñòàëèðààò. $_CLICK
-# ^ComponentsSubText1
-Îäáåðåòå âèä íà èíñòàëàöè¼à:
-# ^ComponentsSubText2_NoInstTypes
-Îäáåðåòå ãè êîìïîíåíòèòå øòî å ñå èíñòàëèðààò:
-# ^ComponentsSubText2
-èëè, îäáåðåòå äðóãè êîìïîíåíòè øòî ñàêàòå äà ñå èíñòàëèðààò:
-# ^UnComponentsText
-×åêèðà¼òå ãè êîìïîíåíòèòå øòî ñàêàòå äà ñå äåèíñòàëèðààò èëè äå÷åêèðà¼òå ãè òèå øòî íå ñàêàòå äà ñå äåèíñòàëèðààò. $_CLICK
-# ^UnComponentsSubText1
-Îäáåðåòå ãî âèäîò íà äåèíñòàëàöè¼àòà:
-# ^UnComponentsSubText2_NoInstTypes
-Îäáåðåòå ãè êîìïîíåíòèòå øòî å ñå äåèíñòàëèðààò:
-# ^UnComponentsSubText2
-èëè, îäáåðåòå äðóãè êîìïîíåíòè øòî ñàêàòå äà ñå äåèíñòàëèðààò:
-# ^DirText
-Èíñòàëàöèîíèîò ïðîãðàì å ãî èíñòàëèðà $(^NameDA) âî ñëåäíèîâ äèðåêòîðèóì. Çà äà èíñòàëèðàòå âî äðóã, ïðèòèñíåòå 'Ïðåáàðóâà¼' è îäáåðåòå äðóã äèðåêòîðèóì. $_CLICK
-# ^DirSubText
-Äèðåêòîðèóì êàäå øòî å ñå èíñòàëèðà
-# ^DirBrowseText
-Îäáåðåòå äèðåêòîðèóì çà èíñòàëèðàœå íà $(^NameDA):
-# ^UnDirText
-Èíñòàëàöèîíèîò ïðîãðàì å ãî äåèíñòàëèðà $(^NameDA) îä ñëåäíèîâ äèðåêòîðèóì. Çà äà äåèíñòàëèðàòå îä äðóã, ïðèòèñíåòå 'Ïðåáàðóâà¼' è îäáåðåòå äðóã äèðåêòîðèóì. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Îäáåðåòå ãî äèðåêòîðèóìîò çà äåèíñòàëèðàœå íà $(^NameDA):
-# ^SpaceAvailable
-"Ñëîáîäåí ïðîñòîð: "
-# ^SpaceRequired
-"Ïîòðåáåí ïðîñòîð: "
-# ^UninstallingText
-$(^NameDA) å áèäå äåèíñòàëèðàí îä ñëåäíèîâ äèðåêòîðèóì. $_CLICK
-# ^UninstallingSubText
-Äåèíñòàëèðà îä:
-# ^FileError
-Ãðåøêà ïðè îòâàðàœåòî íà äàòîòåêàòà çà çàïèøóâàœå: \r\n\t"$0"\r\nÏðèòèñíåòå 'Îòêàæè' çà äà ¼à îòêàæåòå èíñòàëàöè¼àòà,\r\n'Ïðîáà¼' çà äà ïðîáà äà ¼à çàïèøå äàòîòåêàòà, èëè\r\n'Èãíîðèðà¼' çà äà ¼à ïðåðèïà äàòîòåêàòà
-# ^FileError_NoIgnore
-Ãðåøêà ïðè îòâàðàœåòî íà äàòîòåêàòà çà çàïèøóâàœå: \r\n\t"$0"\r\nÏðèòèñíåòå 'Ïðîáà¼' çà äà ïðîáà äà ¼à çàïèøå äàòîòåêàòà, èëè\r\n'Îòêàæè' çà äà ¼à îòêàæå èíñòàëàöè¼àòà
-# ^CantWrite
-"Íå ìîæå äà çàïèøå: "
-# ^CopyFailed
-Êîïèðàœåòî íå óñïåà
-# ^CopyTo
-"Êîïèð༠äî "
-# ^Registering
-"Ðåãèñòðèðà: "
-# ^Unregistering
-"Äåðåãèñòðèðà: "
-# ^SymbolNotFound
-"Íå ìîæå äà ãî íà¼äå ñèìáîëîò: "
-# ^CouldNotLoad
-"Íå ìîæå äà ëîàäèðà: "
-# ^CreateFolder
-"Ñîçäàäè äèðåêòîðèóì: "
-# ^CreateShortcut
-"Ñîçäàäè êðàòåíèöà: "
-# ^CreatedUninstaller
-"Ñîçäàäåí äåèíñòàëàòîð: "
-# ^Delete
-"Èçáðèøàíà äàòîòåêà: "
-# ^DeleteOnReboot
-"Èçáðèøè ïîñëå ðåñòàðòèðàœå: "
-# ^ErrorCreatingShortcut
-"Ãðåøêà ïðè ñîçäàâàœåòî íà ñêðàòåíèöàòà: "
-# ^ErrorCreating
-"Ãðåøêà ïðè ñîçäàâàœåòî: "
-# ^ErrorDecompressing
-Ãðåøêà ïðè îòïàêóâàœåòî íà ïîäàòîöèòå! Ðàñèïàí èíñòàëàöèîíåí ïðîãðàì?
-# ^ErrorRegistering
-Ãðåøêà ïðè ðåãèñòðèðàœåòî íà DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Ïîêðåíè: "
-# ^Extract
-"Îòïàêóâàíî: "
-# ^ErrorWriting
-"Îòïàêóâà¼: ãðåøêà ïðè ñíèìàœåòî âî äàòîòåêàòà "
-# ^InvalidOpcode
-Ðàñèïàí èíñòàëàöèîíåí ïðîãðàì: ïîãðåøåí êîä
-# ^NoOLE
-"Íåìà OLE çà: "
-# ^OutputFolder
-"Èíñòàëàöèîíåí äèðåêòîðèóì: "
-# ^RemoveFolder
-"Èçáðèøàí äèðåêòîðèóì: "
-# ^RenameOnReboot
-"Ïðåèìåíóâ༠ïîñëå ðåñòàðòèðàœå: "
-# ^Rename
-"Ïðåèìåíóâà¼: "
-# ^Skipped
-"Ïðåðèïàíî: "
-# ^CopyDetails
-Êîïèð༠ãè Äåòàëèòå âî Clipboard-îò
-# ^LogInstall
-Ñíèìè ëîã çà èíñòàëàöèîíèòå ïðîöåñè
-# ^Byte
-# ^Kilo
-# ^Mega
-# ^Giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1071
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Sasko Zdravkin [wingman2083@yahoo.com]
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Èíñòàëèðàœå íà $(^Name)
+# ^UninstallCaption
+Äåèíñòàëèðàœå íà $(^Name)
+# ^LicenseSubCaption
+: Ëèöåíöåí Äîãîâîð
+# ^ComponentsSubCaption
+: Èíñòàëàöèîíè Îïöèè
+# ^DirSubCaption
+: Èíñòàëàöèîíåí Äèðåêòîðèóì
+# ^InstallingSubCaption
+: Èíñòàëèðà
+# ^CompletedSubCaption
+: Çàâðøåíî
+# ^UnComponentsSubCaption
+: Äåèíñòàëàöèîíè Îïöèè
+# ^UnDirSubCaption
+: Äåèíñòàëàöèîíåí Äèðåêòîðèóì
+# ^ConfirmSubCaption
+: Ïîòâðäà
+# ^UninstallingSubCaption
+: Äåèíñòàëèðà
+# ^UnCompletedSubCaption
+: Çàâðøåíî
+# ^BackBtn
+< &Íàçàä
+# ^NextBtn
+Í&àïðåä >
+# ^AgreeBtn
+&Äà
+# ^AcceptBtn
+&Ãè ïðèôààì óñëîâèòå îä Ëèöåíöíèîò Äîãîâîð
+# ^DontAcceptBtn
+Í&å ãè ïðèôààì óñëîâèòå îä Ëèöåíöíèîò Äîãîâîð
+# ^InstallBtn
+&Èíñòàëèðà¼
+# ^UninstallBtn
+&Äåèíñòàëèðà¼
+# ^CancelBtn
+Îòêàæè
+# ^CloseBtn
+&Çàòâîðè
+# ^BrowseBtn
+&Ïðåáàðóâà¼...
+# ^ShowDetailsBtn
+Ï&îêàæè Äåòàëè
+# ^ClickNext
+Ïðèòèñíåòå 'Íàïðåä' çà äà ïðîäîëæèòå.
+# ^ClickInstall
+Ïðèòèñíåòå 'Èíñòàëèðà¼' çà äà ñå èíñòàëèðà.
+# ^ClickUninstall
+Ïðèòèñíåòå 'Äåèíñòàëèðà¼' çà äà ñå äåèíñòàëèðà.
+# ^Name
+Èìå
+# ^Completed
+Çàâðøåíî
+# ^LicenseText
+Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå èíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå 'Äà'.
+# ^LicenseTextCB
+Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå èíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå ãî Check box-îò ïîäîëå. $_CLICK
+# ^LicenseTextRB
+Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå èíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. $_CLICK
+# ^UnLicenseText
+Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå äåèíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå 'Äà'.
+# ^UnLicenseTextCB
+Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå äåèíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, ïðèòèñíåòå ãî Check box-îò ïîäîëå. $_CLICK
+# ^UnLicenseTextRB
+Âå ìîëèìå ïðî÷èòà¼òå ãî Ëèöåíöíèîò Äîãîâîð ïðåä äà ñå äåèíñòàëèðà $(^NameDA). Àêî ãè ïðèôààòå ñèòå óñëîâè, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. $_CLICK
+# ^Custom
+Ïîäåñåíî
+# ^ComponentsText
+×åêèðà¼òå ãè êîìïîíåíòèòå øòî ñàêàòå äà ñå èíñòàëèðààò èëè äå÷åêèðà¼òå ãè òèå øòî íå ñàêàòå äà ñå èíñòàëèðààò. $_CLICK
+# ^ComponentsSubText1
+Îäáåðåòå âèä íà èíñòàëàöè¼à:
+# ^ComponentsSubText2_NoInstTypes
+Îäáåðåòå ãè êîìïîíåíòèòå øòî å ñå èíñòàëèðààò:
+# ^ComponentsSubText2
+èëè, îäáåðåòå äðóãè êîìïîíåíòè øòî ñàêàòå äà ñå èíñòàëèðààò:
+# ^UnComponentsText
+×åêèðà¼òå ãè êîìïîíåíòèòå øòî ñàêàòå äà ñå äåèíñòàëèðààò èëè äå÷åêèðà¼òå ãè òèå øòî íå ñàêàòå äà ñå äåèíñòàëèðààò. $_CLICK
+# ^UnComponentsSubText1
+Îäáåðåòå ãî âèäîò íà äåèíñòàëàöè¼àòà:
+# ^UnComponentsSubText2_NoInstTypes
+Îäáåðåòå ãè êîìïîíåíòèòå øòî å ñå äåèíñòàëèðààò:
+# ^UnComponentsSubText2
+èëè, îäáåðåòå äðóãè êîìïîíåíòè øòî ñàêàòå äà ñå äåèíñòàëèðààò:
+# ^DirText
+Èíñòàëàöèîíèîò ïðîãðàì å ãî èíñòàëèðà $(^NameDA) âî ñëåäíèîâ äèðåêòîðèóì. Çà äà èíñòàëèðàòå âî äðóã, ïðèòèñíåòå 'Ïðåáàðóâà¼' è îäáåðåòå äðóã äèðåêòîðèóì. $_CLICK
+# ^DirSubText
+Äèðåêòîðèóì êàäå øòî å ñå èíñòàëèðà
+# ^DirBrowseText
+Îäáåðåòå äèðåêòîðèóì çà èíñòàëèðàœå íà $(^NameDA):
+# ^UnDirText
+Èíñòàëàöèîíèîò ïðîãðàì å ãî äåèíñòàëèðà $(^NameDA) îä ñëåäíèîâ äèðåêòîðèóì. Çà äà äåèíñòàëèðàòå îä äðóã, ïðèòèñíåòå 'Ïðåáàðóâà¼' è îäáåðåòå äðóã äèðåêòîðèóì. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Îäáåðåòå ãî äèðåêòîðèóìîò çà äåèíñòàëèðàœå íà $(^NameDA):
+# ^SpaceAvailable
+"Ñëîáîäåí ïðîñòîð: "
+# ^SpaceRequired
+"Ïîòðåáåí ïðîñòîð: "
+# ^UninstallingText
+$(^NameDA) å áèäå äåèíñòàëèðàí îä ñëåäíèîâ äèðåêòîðèóì. $_CLICK
+# ^UninstallingSubText
+Äåèíñòàëèðà îä:
+# ^FileError
+Ãðåøêà ïðè îòâàðàœåòî íà äàòîòåêàòà çà çàïèøóâàœå: \r\n\t"$0"\r\nÏðèòèñíåòå 'Îòêàæè' çà äà ¼à îòêàæåòå èíñòàëàöè¼àòà,\r\n'Ïðîáà¼' çà äà ïðîáà äà ¼à çàïèøå äàòîòåêàòà, èëè\r\n'Èãíîðèðà¼' çà äà ¼à ïðåðèïà äàòîòåêàòà
+# ^FileError_NoIgnore
+Ãðåøêà ïðè îòâàðàœåòî íà äàòîòåêàòà çà çàïèøóâàœå: \r\n\t"$0"\r\nÏðèòèñíåòå 'Ïðîáà¼' çà äà ïðîáà äà ¼à çàïèøå äàòîòåêàòà, èëè\r\n'Îòêàæè' çà äà ¼à îòêàæå èíñòàëàöè¼àòà
+# ^CantWrite
+"Íå ìîæå äà çàïèøå: "
+# ^CopyFailed
+Êîïèðàœåòî íå óñïåà
+# ^CopyTo
+"Êîïèð༠äî "
+# ^Registering
+"Ðåãèñòðèðà: "
+# ^Unregistering
+"Äåðåãèñòðèðà: "
+# ^SymbolNotFound
+"Íå ìîæå äà ãî íà¼äå ñèìáîëîò: "
+# ^CouldNotLoad
+"Íå ìîæå äà ëîàäèðà: "
+# ^CreateFolder
+"Ñîçäàäè äèðåêòîðèóì: "
+# ^CreateShortcut
+"Ñîçäàäè êðàòåíèöà: "
+# ^CreatedUninstaller
+"Ñîçäàäåí äåèíñòàëàòîð: "
+# ^Delete
+"Èçáðèøàíà äàòîòåêà: "
+# ^DeleteOnReboot
+"Èçáðèøè ïîñëå ðåñòàðòèðàœå: "
+# ^ErrorCreatingShortcut
+"Ãðåøêà ïðè ñîçäàâàœåòî íà ñêðàòåíèöàòà: "
+# ^ErrorCreating
+"Ãðåøêà ïðè ñîçäàâàœåòî: "
+# ^ErrorDecompressing
+Ãðåøêà ïðè îòïàêóâàœåòî íà ïîäàòîöèòå! Ðàñèïàí èíñòàëàöèîíåí ïðîãðàì?
+# ^ErrorRegistering
+Ãðåøêà ïðè ðåãèñòðèðàœåòî íà DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Ïîêðåíè: "
+# ^Extract
+"Îòïàêóâàíî: "
+# ^ErrorWriting
+"Îòïàêóâà¼: ãðåøêà ïðè ñíèìàœåòî âî äàòîòåêàòà "
+# ^InvalidOpcode
+Ðàñèïàí èíñòàëàöèîíåí ïðîãðàì: ïîãðåøåí êîä
+# ^NoOLE
+"Íåìà OLE çà: "
+# ^OutputFolder
+"Èíñòàëàöèîíåí äèðåêòîðèóì: "
+# ^RemoveFolder
+"Èçáðèøàí äèðåêòîðèóì: "
+# ^RenameOnReboot
+"Ïðåèìåíóâ༠ïîñëå ðåñòàðòèðàœå: "
+# ^Rename
+"Ïðåèìåíóâà¼: "
+# ^Skipped
+"Ïðåðèïàíî: "
+# ^CopyDetails
+Êîïèð༠ãè Äåòàëèòå âî Clipboard-îò
+# ^LogInstall
+Ñíèìè ëîã çà èíñòàëàöèîíèòå ïðîöåñè
+# ^Byte
+# ^Kilo
+# ^Mega
+# ^Giga
à \ No newline at end of file
diff --git a/Contrib/Language files/Macedonian.nsh b/Contrib/Language files/Macedonian.nsh
index 7f59b0a..bcc7797 100755
--- a/Contrib/Language files/Macedonian.nsh
+++ b/Contrib/Language files/Macedonian.nsh
@@ -1,121 +1,121 @@
-;Language: Macedonian (1071)
-;By Sasko Zdravkin [wingman2083@yahoo.com]
-
-!insertmacro LANGFILE "Macedonian" "Macedonian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Äîáðî äî¼äîâòå âî èíñòàëàöè¼àòà íà $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Îâî¼ ïðîãðàì å âå âîäè íèç èíñòàëàöè¼àòà íà $(^NameDA).$\r$\n$\r$\nÏðåïîðà÷àíî å äà ãè çàòâîðèòå ñèòå ïðîãðàìè ïðåä äà èíñòàëèðàòå. Îâà å äîçâîëè èíñòàëàöèîíèîò ïðîãðàì äà îáíîâè íåêîè ñèñòåìñêè äàòîòåêè áåç äà ãî ðåñòàðòèðà êîìï¼óòåðîò.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Äîáðî äî¼äîâòå âî äåèíñòàëàöè¼àòà íà $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Îâî¼ ïðîãðàì å âå âîäè íèç äåèíñòàëàöè¼àòà íà $(^NameDA).$\r$\n$\r$\nÏðåä äà ¼à ïî÷íåòå äåèíñòàëàöè¼àòà íà $(^NameDA) ïðîâåðåòå äàëè å èñêëó÷åíà ïðîãðàìàòà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíöåí Äîãîâîð"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Âå ìîëèìå ïðîâåðåòå ãè ëèöåíöíèòå óñëîâè ïðåä äà ãî èíñòàëèðàòå $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ïðèòèñíåòå 'Äà' çà äà ïðîäîëæèòå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà äà ãî èíñòàëèðàòå $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ÷åêèðà¼òå ãî check box-îò ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî èíñòàëèðàòå $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî èíñòàëèðàòå $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíöåí Äîãîâîð"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Âå ìîëèìå ïðîâåðåòå ãè ëèöåíöíèòå óñëîâè ïðåä äà ãî äåèíñòàëèðàòå $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ïðèòèñíåòå 'Äà' çà äà ïðîäîëæèòå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà äà ãî äåèíñòàëèðàòå $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ÷åêèðà¼òå ãî check box-îò ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî äåèíñòàëèðàòå $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî äåèíñòàëèðàòå $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Ïðèòèñíåòå 'Page Down' çà äà ãî âèäåòå îñòàíàòèîò äåë îä äîãîâîðîò."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Îäáåðåòå Êîìïîíåíòè"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Îäáåðåòå êîè ðàáîòè îä $(^NameDA) ñàêàòå äà ñå èíñòàëèðààò."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îá¼àñíåíèå"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Îäáåðåòå Êîìïîíåíòè"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Îäáåðåòå êîè ðàáîòè îä $(^NameDA) ñàêàòå äà ñå äåèíñòàëèðààò."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Îäíåñåòå ãî êóðñîðîò äî êîìïîíåíòàòà çà äà ãî âèäåòå íå¼çèíîòî îá¼àñíåíèå."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Îäíåñåòå ãî êóðñîðîò äî êîìïîíåíòàòà çà äà ãî âèäåòå íå¼çèíîòî îá¼àñíåíèå."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Îäáåðåòå ¼à ëîêàöè¼àòà çà èíñòàëèðàœå"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Îäáåðåòå ãî äèðåêòîðèóìîò êàäå øòî ñàêàòå äà ñå èíñòàëèðà $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Îäáåðåòå ¼à ëîêàöè¼àòà çà äåèíñòàëèðàœå"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Îäáåðåòå ãî äèðåêòîðèóìîò îä êî¼ ñàêàòå äà ñå äåèíñòàëèðà $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Èíñòàëèðà"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Âå ìîëèìå ïî÷åêà¼òå äîäåêà $(^NameDA) ñå èíñòàëèðà."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Èíñòàëàöè¼àòà å çàâðøåíà"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Èíñòàëèðàœåòî áåøå óñïåøíî."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Èíñòàëàöè¼àòà å îòêàæàíà"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Èíñòàëèðàœåòî íå áåøå óñïåøíî çàâðøåíî."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Äåèíñòàëèðà"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Âå ìîëèìå ïî÷åêà¼òå äîäåêà $(^NameDA) ñå äåèíñòàëèðà."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Äåèíñòàëàöè¼àòà å çàâðøåíà"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Äåèíñòàëèðàœåòî áåøå óñïåøíî."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Äåèíñòàëàöè¼àòà å îòêàæàíà"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Äåèíñòàëèðàœåòî íå áåøå óñïåøíî çàâðøåíî."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâðøóâà èíñòàëèðàœåòî íà $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) å èíñòàëèðàí íà âàøèîò êîìï¼óòåð.$\r$\n$\r$\nÏðèòèñíåòå 'Êðà¼' çà äà ãî çàòâîðèòå èíñòàëàöèîíèîò ïðîãðàì."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Âàøèîò êîìï¼óòåð ìîðà äà ñå ðåñòàðòèðà çà äà çàâðøè èíñòàëàöè¼àòà íà $(^NameDA). Äàëè ñàêàòå äà ñå ðåñòàðòèðà ñåãà?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâðøóâà äåèíñòàëèðàœåòî íà $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) å äåèíñòàëèðàí îä âàøèîò êîìï¼óòåð.$\r$\n$\r$\nÏðèòèñíåòå 'Êðà¼' çà äà ãî çàòâîðèòå äåèíñòàëàöèîíèîò ïðîãðàì."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Âàøèîò êîìï¼óòåð ìîðà äà ñå ðåñòàðòèðà çà äà çàâðøè äåèíñòàëàöè¼àòà íà $(^NameDA). Äàëè ñàêàòå äà ñå ðåñòàðòèðà ñåãà?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ðåñòàðòèð༠ñåãà"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Àêî ñàêàòå äà ãî ðåñòàðòèðàòå ïîäîöíà"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Ïîê&ðåíè ãî $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Îòâîð&è 'Ïðî÷èò༠Ìå'"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Êðà¼"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Îäáåðåòå äèðåêòîðèóì çà Ñòàðò Ìåíèòî"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Îäáåðåòå äèðåêòîðèóì âî Ñòàðò Ìåíèòî çà êðåèðàœå ñêðàòåíèöà íà $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Îäáåðåòå ãî äèðåêòîðèóìîò âî Ñòàðò Ìåíèòî âî êî¼ ñàêàòå äà ñå êðåèðà ñêðàòåíèöà çà ïðîãðàìàòà. Èñòî òàêà ìîæåòå äà âíåñåòå äðóãî èìå çà äà ñå êðåèðà íîâ äèðåêòîðèóì."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå êðåèð༠ñêðàòåíèöà"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Äåèíñòàëèð༠ãî $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Îäñòðàíåòå ãî $(^NameDA) îä âàøèîò êîìï¼óòåð."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ñèãóðíè ëè ñòå äåêà ñàêàòå äà ñå îòêàæåòå îä èíñòàëàöè¼àòà íà $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ñèãóðíè ëè ñòå äåêà ñàêàòå äà ñå îòêàæåòå îä äåèíñòàëàöè¼àòà íà $(^Name)?"
-!endif
+;Language: Macedonian (1071)
+;By Sasko Zdravkin [wingman2083@yahoo.com]
+
+!insertmacro LANGFILE "Macedonian" "Macedonian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Äîáðî äî¼äîâòå âî èíñòàëàöè¼àòà íà $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Îâî¼ ïðîãðàì å âå âîäè íèç èíñòàëàöè¼àòà íà $(^NameDA).$\r$\n$\r$\nÏðåïîðà÷àíî å äà ãè çàòâîðèòå ñèòå ïðîãðàìè ïðåä äà èíñòàëèðàòå. Îâà å äîçâîëè èíñòàëàöèîíèîò ïðîãðàì äà îáíîâè íåêîè ñèñòåìñêè äàòîòåêè áåç äà ãî ðåñòàðòèðà êîìï¼óòåðîò.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Äîáðî äî¼äîâòå âî äåèíñòàëàöè¼àòà íà $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Îâî¼ ïðîãðàì å âå âîäè íèç äåèíñòàëàöè¼àòà íà $(^NameDA).$\r$\n$\r$\nÏðåä äà ¼à ïî÷íåòå äåèíñòàëàöè¼àòà íà $(^NameDA) ïðîâåðåòå äàëè å èñêëó÷åíà ïðîãðàìàòà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíöåí Äîãîâîð"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Âå ìîëèìå ïðîâåðåòå ãè ëèöåíöíèòå óñëîâè ïðåä äà ãî èíñòàëèðàòå $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ïðèòèñíåòå 'Äà' çà äà ïðîäîëæèòå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà äà ãî èíñòàëèðàòå $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ÷åêèðà¼òå ãî check box-îò ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî èíñòàëèðàòå $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî èíñòàëèðàòå $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíöåí Äîãîâîð"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Âå ìîëèìå ïðîâåðåòå ãè ëèöåíöíèòå óñëîâè ïðåä äà ãî äåèíñòàëèðàòå $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ïðèòèñíåòå 'Äà' çà äà ïðîäîëæèòå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà äà ãî äåèíñòàëèðàòå $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, ÷åêèðà¼òå ãî check box-îò ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî äåèíñòàëèðàòå $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ãè ïðèôààòå óñëîâèòå îä äîãîâîðîò, îäáåðåòå ¼à ïðâàòà îïöè¼à ïîäîëå. Ìîðà äà ãî ïðèôàòèòå äîãîâîðîò çà ãî äåèíñòàëèðàòå $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Ïðèòèñíåòå 'Page Down' çà äà ãî âèäåòå îñòàíàòèîò äåë îä äîãîâîðîò."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Îäáåðåòå Êîìïîíåíòè"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Îäáåðåòå êîè ðàáîòè îä $(^NameDA) ñàêàòå äà ñå èíñòàëèðààò."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îá¼àñíåíèå"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Îäáåðåòå Êîìïîíåíòè"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Îäáåðåòå êîè ðàáîòè îä $(^NameDA) ñàêàòå äà ñå äåèíñòàëèðààò."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Îäíåñåòå ãî êóðñîðîò äî êîìïîíåíòàòà çà äà ãî âèäåòå íå¼çèíîòî îá¼àñíåíèå."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Îäíåñåòå ãî êóðñîðîò äî êîìïîíåíòàòà çà äà ãî âèäåòå íå¼çèíîòî îá¼àñíåíèå."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Îäáåðåòå ¼à ëîêàöè¼àòà çà èíñòàëèðàœå"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Îäáåðåòå ãî äèðåêòîðèóìîò êàäå øòî ñàêàòå äà ñå èíñòàëèðà $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Îäáåðåòå ¼à ëîêàöè¼àòà çà äåèíñòàëèðàœå"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Îäáåðåòå ãî äèðåêòîðèóìîò îä êî¼ ñàêàòå äà ñå äåèíñòàëèðà $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Èíñòàëèðà"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Âå ìîëèìå ïî÷åêà¼òå äîäåêà $(^NameDA) ñå èíñòàëèðà."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Èíñòàëàöè¼àòà å çàâðøåíà"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Èíñòàëèðàœåòî áåøå óñïåøíî."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Èíñòàëàöè¼àòà å îòêàæàíà"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Èíñòàëèðàœåòî íå áåøå óñïåøíî çàâðøåíî."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Äåèíñòàëèðà"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Âå ìîëèìå ïî÷åêà¼òå äîäåêà $(^NameDA) ñå äåèíñòàëèðà."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Äåèíñòàëàöè¼àòà å çàâðøåíà"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Äåèíñòàëèðàœåòî áåøå óñïåøíî."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Äåèíñòàëàöè¼àòà å îòêàæàíà"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Äåèíñòàëèðàœåòî íå áåøå óñïåøíî çàâðøåíî."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâðøóâà èíñòàëèðàœåòî íà $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) å èíñòàëèðàí íà âàøèîò êîìï¼óòåð.$\r$\n$\r$\nÏðèòèñíåòå 'Êðà¼' çà äà ãî çàòâîðèòå èíñòàëàöèîíèîò ïðîãðàì."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Âàøèîò êîìï¼óòåð ìîðà äà ñå ðåñòàðòèðà çà äà çàâðøè èíñòàëàöè¼àòà íà $(^NameDA). Äàëè ñàêàòå äà ñå ðåñòàðòèðà ñåãà?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâðøóâà äåèíñòàëèðàœåòî íà $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) å äåèíñòàëèðàí îä âàøèîò êîìï¼óòåð.$\r$\n$\r$\nÏðèòèñíåòå 'Êðà¼' çà äà ãî çàòâîðèòå äåèíñòàëàöèîíèîò ïðîãðàì."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Âàøèîò êîìï¼óòåð ìîðà äà ñå ðåñòàðòèðà çà äà çàâðøè äåèíñòàëàöè¼àòà íà $(^NameDA). Äàëè ñàêàòå äà ñå ðåñòàðòèðà ñåãà?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ðåñòàðòèð༠ñåãà"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Àêî ñàêàòå äà ãî ðåñòàðòèðàòå ïîäîöíà"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Ïîê&ðåíè ãî $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Îòâîð&è 'Ïðî÷èò༠Ìå'"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Êðà¼"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Îäáåðåòå äèðåêòîðèóì çà Ñòàðò Ìåíèòî"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Îäáåðåòå äèðåêòîðèóì âî Ñòàðò Ìåíèòî çà êðåèðàœå ñêðàòåíèöà íà $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Îäáåðåòå ãî äèðåêòîðèóìîò âî Ñòàðò Ìåíèòî âî êî¼ ñàêàòå äà ñå êðåèðà ñêðàòåíèöà çà ïðîãðàìàòà. Èñòî òàêà ìîæåòå äà âíåñåòå äðóãî èìå çà äà ñå êðåèðà íîâ äèðåêòîðèóì."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå êðåèð༠ñêðàòåíèöà"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Äåèíñòàëèð༠ãî $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Îäñòðàíåòå ãî $(^NameDA) îä âàøèîò êîìï¼óòåð."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ñèãóðíè ëè ñòå äåêà ñàêàòå äà ñå îòêàæåòå îä èíñòàëàöè¼àòà íà $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ñèãóðíè ëè ñòå äåêà ñàêàòå äà ñå îòêàæåòå îä äåèíñòàëàöè¼àòà íà $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Malay.nlf b/Contrib/Language files/Malay.nlf
index 1ad0e37..0dd0585 100755
--- a/Contrib/Language files/Malay.nlf
+++ b/Contrib/Language files/Malay.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1086
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
--
-# RTL - anything else than RTL means LTR
--
-# Translation muhammadazwa@yahoo.com
-# ^Branding
-Qump Versi 1.0
-# ^SetupCaption
-Setup $(^Name)
-# ^UninstallCaption
-Uninstall $(^Name)
-# ^LicenseSubCaption
-: Perlesenan
-# ^ComponentsSubCaption
-: Pilihan kemasukan
-# ^DirSubCaption
-: Folder kemasukan
-# ^InstallingSubCaption
-: Memasang
-# ^CompletedSubCaption
-: Selesai
-# ^UnComponentsSubCaption
-: Pilihan membuang
-# ^UnDirSubCaption
-: Folder Uninstal
-# ^ConfirmSubCaption
-: Kepastian
-# ^UninstallingSubCaption
-: Membuang
-# ^UnCompletedSubCaption
-: Tidak Selesai
-# ^BackBtn
-< &Ke Belakang
-# ^NextBtn
-&Ke Depan >
-# ^AgreeBtn
-Saya &setuju
-# ^AcceptBtn
-Saya s&etuju dengan Perlesenan
-# ^DontAcceptBtn
-Saya &tidak setuju dengan Perlesenan
-# ^InstallBtn
-&Masukkan
-# ^UninstallBtn
-&Buang
-# ^CancelBtn
-Batal
-# ^CloseBtn
-&Tutup
-# ^BrowseBtn
-S&elusur...
-# ^ShowDetailsBtn
-Buka &lagi
-# ^ClickNext
-Klik Ke Depan untuk teruskan.
-# ^ClickInstall
-Klik Masukkan untuk kemasukkan.
-# ^ClickUninstall
-Klik Uninstall untuk membuang.
-# ^Name
-Nama
-# ^Completed
-Selesai
-# ^LicenseText
-Sila baca lesen sebelum memasukkan $(^NameDA). Jika anda terima perlesenan, klik Saya setuju.
-# ^LicenseTextCB
-Sila baca lesen sebelum memasukkan $(^NameDA). Jika terima, beri tanda dicheckbox. $_CLICK
-# ^LicenseTextRB
-Sila baca lesen sebelum sebelum membuang $(^NameDA). Jika anda terima perlesenan, pilihlah salah satu item dibawah ini. $_CLICK
-# ^UnLicenseText
-Sila baca lesen sebelum sebelum membuang $(^NameDA). Jika anda terima perlesenan, klik Saya setuju.
-# ^UnLicenseTextCB
-Sila baca lesen sebelum memasukkan $(^NameDA). Jika terima, beri tanda dicheckbox. $_CLICK
-# ^UnLicenseTextRB
-Sila baca lesen sebelum sebelum membuang $(^NameDA).Jika anda terima perlesenan, pilihlah salah satu item dibawah ini. $_CLICK
-# ^Custom
-Custom
-# ^ComponentsText
-Beri tanda dicheckbox pada komponen yang ingin dimasukkan and hilangkan tanda pada komponen yang tidak perlu dimasukkan. $_CLICK
-# ^ComponentsSubText1
-Pilih kemasukan:
-# ^ComponentsSubText2_NoInstTypes
-Pilih komponen-komponen untuk dimasukkan:
-# ^ComponentsSubText2
-Atau, pilih komponen berikut untuk dimasukkan:
-# ^UnComponentsText
-Beri tanda dicheckbox pada komponen yang ingin dimasukkan and hilangkan tanda pada komponen yang tidak perlu dimasukkan. $_CLICK
-# ^UnComponentsSubText1
-Pilih tipe un-kemasukan:
-# ^UnComponentsSubText2_NoInstTypes
-Pilih komponen-komponen untuk di buang:
-# ^UnComponentsSubText2
-Atau, pilih komponen berikut untuk di buang:
-# ^DirText
-Setup akan memasukkan $(^NameDA) pada folder berikut. Untuk memilih folder lainnya, klik Selusur dan pilih folder pilihan anda. $_CLICK
-# ^DirSubText
-Folder tujuan
-# ^DirBrowseText
-Pilih folder untuk memasukkan $(^NameDA):
-# ^UnDirText
-Setup akan membuang $(^NameDA) dari folder berikut. Untuk memilih folder lainnya, klik Selusur dan pilih folder pilihan anda. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Pilih folder untuk dibuang $(^NameDA):
-# ^SpaceAvailable
-"Ruang cakera keras yang ada: "
-# ^SpaceRequired
-"Ruang cakera keras yang diperlukan: "
-# ^UninstallingText
-$(^NameDA) akan buang dari folder berikut. $_CLICK
-# ^UninstallingSubText
-Membuang:
-# ^FileError
-Tidak dapat menulis pada fail: \r\n\t"$0"\r\nKlik abort untuk membatalkan kemasukan,\r\nretry untuk cuba lagi, atau\r\nignore untuk abaikan fail ini.
-# ^FileError_NoIgnore
-Tidak dapat menulis pada fail: \r\n\t"$0"\r\nKlik retry untuk cuba lagi, atau\r\ncancel untuk batalkan kemasukan
-# ^CantWrite
-"Gagal menulis pada: "
-# ^CopyFailed
-Gagal menyalin
-# ^CopyTo
-"Menyalin ke "
-# ^Registering
-"Mendaftarkan modul: "
-# ^Unregistering
-"Melepaskan modul: "
-# ^SymbolNotFound
-"Symbol tidak jumpa : "
-# ^CouldNotLoad
-"Tidak dapat membuka: "
-# ^CreateFolder
-"Membuat folder: "
-# ^CreateShortcut
-"Membuat pintasan: "
-# ^CreatedUninstaller
-"Membuat program unistall: "
-# ^Delete
-"Memadam fail: "
-# ^DeleteOnReboot
-"Akan dipadam ketika reboot: "
-# ^ErrorCreatingShortcut
-"Tidak dapat membuat pintasan: "
-# ^ErrorCreating
-"Ralat penciptaan: "
-# ^ErrorDecompressing
-Ralat ketika membuka data! Program Installer rosak
-# ^ErrorRegistering
-Ralat mendaftarkan modul DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Menjalankan: "
-# ^Extract
-"Mengekstrak: "
-# ^ErrorWriting
-"Ekstrak: ralat ketika menulis ke fail "
-# ^InvalidOpcode
-Installer rosak: opcode tidak lengkap
-# ^NoOLE
-"OLE tidak ditemukan: "
-# ^OutputFolder
-"Folder tujuan: "
-# ^RemoveFolder
-"Menghapuskan folder: "
-# ^RenameOnReboot
-"Menamakan semula pada reboot: "
-# ^Rename
-"Menamakan semula: "
-# ^Skipped
-"Diabaikan: "
-# ^CopyDetails
-Salin terperinci ke clipboard
-# ^LogInstall
-Catat proses kemasukan
-# ^Byte
-Bait
-# ^Kilo
-Kilo
-# ^Mega
-Mega
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1086
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+-
+# RTL - anything else than RTL means LTR
+-
+# Translation muhammadazwa@yahoo.com
+# ^Branding
+Qump Versi 1.0
+# ^SetupCaption
+Setup $(^Name)
+# ^UninstallCaption
+Uninstall $(^Name)
+# ^LicenseSubCaption
+: Perlesenan
+# ^ComponentsSubCaption
+: Pilihan kemasukan
+# ^DirSubCaption
+: Folder kemasukan
+# ^InstallingSubCaption
+: Memasang
+# ^CompletedSubCaption
+: Selesai
+# ^UnComponentsSubCaption
+: Pilihan membuang
+# ^UnDirSubCaption
+: Folder Uninstal
+# ^ConfirmSubCaption
+: Kepastian
+# ^UninstallingSubCaption
+: Membuang
+# ^UnCompletedSubCaption
+: Tidak Selesai
+# ^BackBtn
+< &Ke Belakang
+# ^NextBtn
+&Ke Depan >
+# ^AgreeBtn
+Saya &setuju
+# ^AcceptBtn
+Saya s&etuju dengan Perlesenan
+# ^DontAcceptBtn
+Saya &tidak setuju dengan Perlesenan
+# ^InstallBtn
+&Masukkan
+# ^UninstallBtn
+&Buang
+# ^CancelBtn
+Batal
+# ^CloseBtn
+&Tutup
+# ^BrowseBtn
+S&elusur...
+# ^ShowDetailsBtn
+Buka &lagi
+# ^ClickNext
+Klik Ke Depan untuk teruskan.
+# ^ClickInstall
+Klik Masukkan untuk kemasukkan.
+# ^ClickUninstall
+Klik Uninstall untuk membuang.
+# ^Name
+Nama
+# ^Completed
+Selesai
+# ^LicenseText
+Sila baca lesen sebelum memasukkan $(^NameDA). Jika anda terima perlesenan, klik Saya setuju.
+# ^LicenseTextCB
+Sila baca lesen sebelum memasukkan $(^NameDA). Jika terima, beri tanda dicheckbox. $_CLICK
+# ^LicenseTextRB
+Sila baca lesen sebelum sebelum membuang $(^NameDA). Jika anda terima perlesenan, pilihlah salah satu item dibawah ini. $_CLICK
+# ^UnLicenseText
+Sila baca lesen sebelum sebelum membuang $(^NameDA). Jika anda terima perlesenan, klik Saya setuju.
+# ^UnLicenseTextCB
+Sila baca lesen sebelum memasukkan $(^NameDA). Jika terima, beri tanda dicheckbox. $_CLICK
+# ^UnLicenseTextRB
+Sila baca lesen sebelum sebelum membuang $(^NameDA).Jika anda terima perlesenan, pilihlah salah satu item dibawah ini. $_CLICK
+# ^Custom
+Custom
+# ^ComponentsText
+Beri tanda dicheckbox pada komponen yang ingin dimasukkan and hilangkan tanda pada komponen yang tidak perlu dimasukkan. $_CLICK
+# ^ComponentsSubText1
+Pilih kemasukan:
+# ^ComponentsSubText2_NoInstTypes
+Pilih komponen-komponen untuk dimasukkan:
+# ^ComponentsSubText2
+Atau, pilih komponen berikut untuk dimasukkan:
+# ^UnComponentsText
+Beri tanda dicheckbox pada komponen yang ingin dimasukkan and hilangkan tanda pada komponen yang tidak perlu dimasukkan. $_CLICK
+# ^UnComponentsSubText1
+Pilih tipe un-kemasukan:
+# ^UnComponentsSubText2_NoInstTypes
+Pilih komponen-komponen untuk di buang:
+# ^UnComponentsSubText2
+Atau, pilih komponen berikut untuk di buang:
+# ^DirText
+Setup akan memasukkan $(^NameDA) pada folder berikut. Untuk memilih folder lainnya, klik Selusur dan pilih folder pilihan anda. $_CLICK
+# ^DirSubText
+Folder tujuan
+# ^DirBrowseText
+Pilih folder untuk memasukkan $(^NameDA):
+# ^UnDirText
+Setup akan membuang $(^NameDA) dari folder berikut. Untuk memilih folder lainnya, klik Selusur dan pilih folder pilihan anda. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Pilih folder untuk dibuang $(^NameDA):
+# ^SpaceAvailable
+"Ruang cakera keras yang ada: "
+# ^SpaceRequired
+"Ruang cakera keras yang diperlukan: "
+# ^UninstallingText
+$(^NameDA) akan buang dari folder berikut. $_CLICK
+# ^UninstallingSubText
+Membuang:
+# ^FileError
+Tidak dapat menulis pada fail: \r\n\t"$0"\r\nKlik abort untuk membatalkan kemasukan,\r\nretry untuk cuba lagi, atau\r\nignore untuk abaikan fail ini.
+# ^FileError_NoIgnore
+Tidak dapat menulis pada fail: \r\n\t"$0"\r\nKlik retry untuk cuba lagi, atau\r\ncancel untuk batalkan kemasukan
+# ^CantWrite
+"Gagal menulis pada: "
+# ^CopyFailed
+Gagal menyalin
+# ^CopyTo
+"Menyalin ke "
+# ^Registering
+"Mendaftarkan modul: "
+# ^Unregistering
+"Melepaskan modul: "
+# ^SymbolNotFound
+"Symbol tidak jumpa : "
+# ^CouldNotLoad
+"Tidak dapat membuka: "
+# ^CreateFolder
+"Membuat folder: "
+# ^CreateShortcut
+"Membuat pintasan: "
+# ^CreatedUninstaller
+"Membuat program unistall: "
+# ^Delete
+"Memadam fail: "
+# ^DeleteOnReboot
+"Akan dipadam ketika reboot: "
+# ^ErrorCreatingShortcut
+"Tidak dapat membuat pintasan: "
+# ^ErrorCreating
+"Ralat penciptaan: "
+# ^ErrorDecompressing
+Ralat ketika membuka data! Program Installer rosak
+# ^ErrorRegistering
+Ralat mendaftarkan modul DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Menjalankan: "
+# ^Extract
+"Mengekstrak: "
+# ^ErrorWriting
+"Ekstrak: ralat ketika menulis ke fail "
+# ^InvalidOpcode
+Installer rosak: opcode tidak lengkap
+# ^NoOLE
+"OLE tidak ditemukan: "
+# ^OutputFolder
+"Folder tujuan: "
+# ^RemoveFolder
+"Menghapuskan folder: "
+# ^RenameOnReboot
+"Menamakan semula pada reboot: "
+# ^Rename
+"Menamakan semula: "
+# ^Skipped
+"Diabaikan: "
+# ^CopyDetails
+Salin terperinci ke clipboard
+# ^LogInstall
+Catat proses kemasukan
+# ^Byte
+Bait
+# ^Kilo
+Kilo
+# ^Mega
+Mega
+# ^Giga
Giga \ No newline at end of file
diff --git a/Contrib/Language files/Malay.nsh b/Contrib/Language files/Malay.nsh
index d827e77..4911452 100755
--- a/Contrib/Language files/Malay.nsh
+++ b/Contrib/Language files/Malay.nsh
@@ -1,121 +1,121 @@
-;Language: Malay (1086)
-;By muhammadazwa@yahoo.com
-
-!insertmacro LANGFILE "Malay" "Malay"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Assalamualaikum, Selamat datang ke $(^NameDA) Setup Wizard"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup Wizard akan membantu anda untuk memasukkan $(^NameDA).$\r$\n$\r$\nSila tutup program aplikasi yang lain sebelum Setup ini dimulakan. Ini supaya tiada proses reboot komputer diperlukan.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Selamat datang ke $(^NameDA) Uninstall Wizard"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Uninstall Wizard akan membantu anda pada proses membuang $(^NameDA).$\r$\n$\r$\nSebelum membuang, pastikan dulu $(^NameDA) dimatikan.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Perlesenan"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Sila baca teks lesen berikut sebelum memasukkan $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jika anda bersetuju, klik Saya setuju untuk teruskan. Anda mesti setuju untuk sebelum aplikasi dapat dimasukkan $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda bersetuju dengan syarat-syarat lesen, sila tanda dicheckbox. Anda mesti setuju sebelum memasukkan $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda terima semua yang ada di lesen, pilihlah salah satu item dibawah ini. Anda mesti setuju sebelum memasukkan $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Tentang Lesen"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Sila baca teks lesen sebelum membuang $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jika anda menerima lesen, klik Saya setuju untuk teruskan. Anda mesti setuju untuk dapat membuang $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda menerima semua yang ada di lesen, beri tanda dicheckbox. Anda mesti setuju untuk dapat membuang $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda menerima semua yang ada di lesen, pilihlah salah satu item dibawah ini. Anda mesti setuju untuk dapat membuang $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tekan Page Down untuk melihat teks selebihnya."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Pilih Komponen"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Pilih fungsi-fungsi dari $(^NameDA) yang ingin dimasukkan."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Penerangan"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Pilih Komponen"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pilih fungsi-fungsi $(^NameDA) yang ingin dibuang."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Alihkan tetikus ke komponen untuk mengetahui penerangannya."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Alihkan tetikus ke komponen untuk mengetahui penerangannya."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Pilih Lokasi Kemasukan"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Pilih folder untuk memasukkan $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Pilih Lokasi Uninstall"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Pilih folder untuk meng-uninstall $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Pemasangan"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Sila tunggu ketika $(^NameDA) sedang dimasukkan."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Proses Selesai"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup sudah selesai."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Proses Dibatalkan"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup terbatal."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstall"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Sila tunggu ketika $(^NameDA) sedang di-buang."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Proses Uninstall Selesai"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall sudah selesai."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Proses Uninstall Dibatalkan"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall belum selesai secara sempurna."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Setup Wizard"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) sudah dimasukkan di komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Komputer anda harus direboot untuk menyelesaikan proses memasukkan $(^NameDA). Apakah anda hendak reboot sekarang juga?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Uninstall Wizard"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) sudah dibuang dari komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Komputer anda harus di reboot untuk menyelesaikan proses membuang $(^NameDA). Reboot sekarang?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot sekarang"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reboot nanti"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Jalankan $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Buka fail Readme"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Selesai"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Pilih Folder Start Menu"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Pilih folder Start Menu untuk meletakkan pintasan $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Pilih folder Start Menu untuk perletakkan pintasan aplikasi ini. Boleh cipta nama folder anda sendiri."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Tidak perlu pintasan"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Buang $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Padam $(^NameDA) dari komputer anda."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Adakan anda yakin ingin membatalkan Setup $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Adakan anda yakin ingin membatalkan proses buang $(^Name)?"
-!endif
+;Language: Malay (1086)
+;By muhammadazwa@yahoo.com
+
+!insertmacro LANGFILE "Malay" "Malay"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Assalamualaikum, Selamat datang ke $(^NameDA) Setup Wizard"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Setup Wizard akan membantu anda untuk memasukkan $(^NameDA).$\r$\n$\r$\nSila tutup program aplikasi yang lain sebelum Setup ini dimulakan. Ini supaya tiada proses reboot komputer diperlukan.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Selamat datang ke $(^NameDA) Uninstall Wizard"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Uninstall Wizard akan membantu anda pada proses membuang $(^NameDA).$\r$\n$\r$\nSebelum membuang, pastikan dulu $(^NameDA) dimatikan.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Perlesenan"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Sila baca teks lesen berikut sebelum memasukkan $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Jika anda bersetuju, klik Saya setuju untuk teruskan. Anda mesti setuju untuk sebelum aplikasi dapat dimasukkan $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda bersetuju dengan syarat-syarat lesen, sila tanda dicheckbox. Anda mesti setuju sebelum memasukkan $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda terima semua yang ada di lesen, pilihlah salah satu item dibawah ini. Anda mesti setuju sebelum memasukkan $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Tentang Lesen"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Sila baca teks lesen sebelum membuang $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Jika anda menerima lesen, klik Saya setuju untuk teruskan. Anda mesti setuju untuk dapat membuang $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Jika anda menerima semua yang ada di lesen, beri tanda dicheckbox. Anda mesti setuju untuk dapat membuang $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Jika anda menerima semua yang ada di lesen, pilihlah salah satu item dibawah ini. Anda mesti setuju untuk dapat membuang $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tekan Page Down untuk melihat teks selebihnya."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Pilih Komponen"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Pilih fungsi-fungsi dari $(^NameDA) yang ingin dimasukkan."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Penerangan"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Pilih Komponen"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Pilih fungsi-fungsi $(^NameDA) yang ingin dibuang."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Alihkan tetikus ke komponen untuk mengetahui penerangannya."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Alihkan tetikus ke komponen untuk mengetahui penerangannya."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Pilih Lokasi Kemasukan"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Pilih folder untuk memasukkan $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Pilih Lokasi Uninstall"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Pilih folder untuk meng-uninstall $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Pemasangan"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Sila tunggu ketika $(^NameDA) sedang dimasukkan."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Proses Selesai"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Setup sudah selesai."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Proses Dibatalkan"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Setup terbatal."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Uninstall"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Sila tunggu ketika $(^NameDA) sedang di-buang."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Proses Uninstall Selesai"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Uninstall sudah selesai."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Proses Uninstall Dibatalkan"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Uninstall belum selesai secara sempurna."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Setup Wizard"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) sudah dimasukkan di komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Komputer anda harus direboot untuk menyelesaikan proses memasukkan $(^NameDA). Apakah anda hendak reboot sekarang juga?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Menyelesaikan $(^NameDA) Uninstall Wizard"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) sudah dibuang dari komputer anda.$\r$\n$\r$\nKlik Selesai untuk menutup Setup Wizard."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Komputer anda harus di reboot untuk menyelesaikan proses membuang $(^NameDA). Reboot sekarang?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reboot sekarang"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reboot nanti"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Jalankan $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Buka fail Readme"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Selesai"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Pilih Folder Start Menu"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Pilih folder Start Menu untuk meletakkan pintasan $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Pilih folder Start Menu untuk perletakkan pintasan aplikasi ini. Boleh cipta nama folder anda sendiri."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Tidak perlu pintasan"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Buang $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Padam $(^NameDA) dari komputer anda."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Adakan anda yakin ingin membatalkan Setup $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Adakan anda yakin ingin membatalkan proses buang $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Mongolian.nlf b/Contrib/Language files/Mongolian.nlf
index a08f3e3..c49c2ae 100755
--- a/Contrib/Language files/Mongolian.nlf
+++ b/Contrib/Language files/Mongolian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1104
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Bayarsaikhan Enkhtaivan. ebayaraa@gmail.com
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Ñóóëãàö
-# ^UninstallCaption
-$(^Name) Ñóóëãàñíûã óñòãàõ
-# ^LicenseSubCaption
-: Ëèöåíçèéí çºâøººðºë
-# ^ComponentsSubCaption
-: Ñóóëãàõ ñîíãîëò
-# ^DirSubCaption
-: Ñóóëãàõ Õàâòàñ
-# ^InstallingSubCaption
-:Ñóóëãàæ áàéíà
-# ^CompletedSubCaption
-: Äóóñëàà
-# ^UnComponentsSubCaption
-: Ñóóëãàñíûã óñòãàõûí Ñîíãîëò
-# ^UnDirSubCaption
-: Ñóóëãàñíûã óñòãàõ Õàâòàñ
-# ^ConfirmSubCaption
-: Áàòëàìæ
-# ^UninstallingSubCaption
-: Ñóóëãàñíûã óñòãàæ áàéíà
-# ^UnCompletedSubCaption
-: Äóóñëàà
-# ^BackBtn
-< &Áóöàõ
-# ^NextBtn
-&Öààø>
-# ^AgreeBtn
-&Ǻâøººð뺺
-# ^AcceptBtn
-Áè Ëèöåíçèéí Ǻâøººðëèéí ç¿éë¿¿äèéã &çºâøººð÷ áàéíà
-# ^DontAcceptBtn
-Áè Ëèöåíçèéí Ǻâøººðëèéí ç¿éë¿¿äèéã &çºâøººðºõã¿é áàéíà
-# ^InstallBtn
-&Ñóóëãà
-# ^UninstallBtn
-&Óñòãà
-# ^CancelBtn
-Áîëèõ
-# ^CloseBtn
-&Xaax
-# ^BrowseBtn
-Õ&ºòëºõ...
-# ^ShowDetailsBtn
-&Äýëãýðýíã¿é
-# ^ClickNext
-Öààø äýýð äàðâàë ¿ðãýëæèëíý.
-# ^ClickInstall
-Ñóóëãà äýýð äàðâàë ñóóëãàö ýõýëíý.
-# ^ClickUninstall
-Óñòãà äýýð äàðâàë ñóóëãàöûí óñòãàëò ýõýëíý.
-# ^Name
-Íýð
-# ^Completed
-Äóóñëàà
-# ^LicenseText
-$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺-ã äàðíà óó.
-# ^LicenseTextCB
-$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ í¿äèéã ÷àãòàëíà óó. $_CLICK
-# ^LicenseTextRB
-$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ ýõíèé ñîíãîëòûã ñîíãîíî óó. $_CLICK
-# ^UnLicenseText
-$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺-ã äàðíà óó.
-# ^UnLicenseTextCB
-$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ í¿äèéã ÷àãòàëíà óó. $_CLICK
-# ^UnLicenseTextRB
-$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ ýõíèé ñîíãîëòûã ñîíãîíî óó. $_CLICK
-# ^Custom
-Áóñàä
-# ^ComponentsText
-Ñóóëãàõûã õ¿ññýí íýãäëýý ÷àãòëààä, ñóóëãàõûã õ¿ñýõã¿é áóéãàà á¿¿ ÷àãòëààðàé. $_CLICK
-# ^ComponentsSubText1
-Ñóóëãàõ òºðëèéã ñîíãîíî óó:
-# ^ComponentsSubText2_NoInstTypes
-Ñóóëãàõ íýãäëèéã ñîíãîíî óó:
-# ^ComponentsSubText2
-Ýñâýë, çààâàë ñóóëãàõã¿é áàéõ íýãäë¿¿äèéã ñîíãî:
-# ^UnComponentsText
-Óñòãàõûã õ¿ññýí íýãäëýý ÷àãòëààä, óñòãàõûã õ¿ñýõã¿é áàéãààãàà á¿¿ ÷àãòëààðàé. $_CLICK
-# ^UnComponentsSubText1
-Óñòãàõ òºðëèéã ñîíãîíî óó:
-# ^UnComponentsSubText2_NoInstTypes
-Óñòãàõ íýãäë¿¿äèéã ñîíãîíî óól:
-# ^UnComponentsSubText2
-Ýñâýë, çààâàë óñòãàõã¿é áàéõ íýãäë¿¿äèéã ñîíãî:
-# ^DirText
-$(^NameDA) íü äàðààõ õàâòñàíä ñóóíà. ªºð ãàçàð ñóóëãàõûã õ¿ñâýë Õºòëºõ òîâ÷ äýýð äàðàí ººð õàâòàñ ñîíãîíî óó. $_CLICK
-# ^DirSubText
-Çîðèëòîò Õàâòàñ
-# ^DirBrowseText
-$(^NameDA)-ûã ñóóëãàõ õàâòñûã ñîíãîõ:
-# ^UnDirText
-$(^NameDA)-ã óã õàâòàñíààñ óñòãàíà. ªºð ãàçðààñ óñòãàõûã õ¿ñâýë Õºòëºõ òîâ÷ äýýð äàðàí ººð õàâòàñ ñîíãîíî óó. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-$(^NameDA)-ã óñòãàõ õàâòñûã ñîíãîõ:
-# ^SpaceAvailable
-"Áîëîìæèò çàé: "
-# ^SpaceRequired
-"Øààðäàãäàõ çàé: "
-# ^UninstallingText
-$(^NameDA) íü óã õàâòàñíààñ óñòãàãäëàà. $_CLICK
-# ^UninstallingSubText
-Óñòãàãäàõ ãàçàð:
-# ^FileError
-Ôàéë áè÷èõýýð íýýõýä àëäëàà: \r\n\t"$0"\r\nÒàñëàõ äàðâàë ñóóëãàëò òàñëàãäàíà,\r\nÄàõüÿ äàðâàë ôàéëûã áè÷èõýýð äàõèí îðîëäîíî,\r\nýñâýë ¯ë òîîõ äàðâàë óã ôàéëûã àëãàñíà
-# ^FileError_NoIgnore
-Ôàéë áè÷èõýýð íýýõýä àëäëàà: \r\n\t"$0"\r\nÄàõèÿ äàðâàë ôàéëûã áè÷èõýýð äàõèí îðîëäîíî, \r\nýñâýë áîëèõ äàðâàë ñóóëãàëò òàñëàãäàíà
-# ^CantWrite
-"Áè÷èæ ÷àäñàíã¿é: "
-# ^CopyFailed
-Õóóëàëò á¿òñýíã¿é
-# ^CopyTo
-"Õóóëàõ íü "
-# ^Registering
-"Á¿ðòãýæ áàéíà: "
-# ^Unregistering
-"Á¿ðòãýëèéã àðèëãàæ áàéíà: "
-# ^SymbolNotFound
-"Òýìäýã õàéãäñàíã¿é: "
-# ^CouldNotLoad
-"Äóóäàãäñàíã¿é: "
-# ^CreateFolder
-"¯¿ñãýõ õàâòàñ: "
-# ^CreateShortcut
-"¯¿ñãýõ shortcut: "
-# ^CreatedUninstaller
-"¯¿ññýí uninstaller: "
-# ^Delete
-"Ôàéë óñòãàõ: "
-# ^DeleteOnReboot
-"Ä.à÷ààëàõàä óñòãàõ: "
-# ^ErrorCreatingShortcut
-"Shortcut ¿¿ñãýõýä àëäëàà: "
-# ^ErrorCreating
-"¯¿ñãýõ àëäàà: "
-# ^ErrorDecompressing
-ªãºãäºë çàäëàõàä àëäëàà! Ñóóëãàö ýâäýð÷ýý?
-# ^ErrorRegistering
-DLL á¿ðòã¿¿ëýõýä àëäëàà
-# ^ExecShell
-"Àæèëëóóëàõ êîìàíä(ExecShell): "
-# ^Exec
-"Àæèëëóóëàõ: "
-# ^Extract
-"Çàäëàõ: "
-# ^ErrorWriting
-"Çàäëàëò:ôàéë ðóó áè÷èõýä àëäàà "
-# ^InvalidOpcode
-Ñóóëãàö ýâäýð÷ýý: çàäëàõ êîä áóðóó
-# ^NoOLE
-"OLE áàéõã¿é: "
-# ^OutputFolder
-"Ãàðãàõ õàâòàñ: "
-# ^RemoveFolder
-"Óñòãàõ õàâòàñ: "
-# ^RenameOnReboot
-"Ä.à÷ààëàõàä äàõèí íýðëýõ: "
-# ^Rename
-"Äàõèí íýðëýõ: "
-# ^Skipped
-"Àëãàññàí: "
-# ^CopyDetails
-Äýëãýðýíã¿éã Clipboard ðóó õóóëàõ
-# ^LogInstall
-Ñóóëãàõ ÿâöûí áàðèìò
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1104
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Bayarsaikhan Enkhtaivan. ebayaraa@gmail.com
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Ñóóëãàö
+# ^UninstallCaption
+$(^Name) Ñóóëãàñíûã óñòãàõ
+# ^LicenseSubCaption
+: Ëèöåíçèéí çºâøººðºë
+# ^ComponentsSubCaption
+: Ñóóëãàõ ñîíãîëò
+# ^DirSubCaption
+: Ñóóëãàõ Õàâòàñ
+# ^InstallingSubCaption
+:Ñóóëãàæ áàéíà
+# ^CompletedSubCaption
+: Äóóñëàà
+# ^UnComponentsSubCaption
+: Ñóóëãàñíûã óñòãàõûí Ñîíãîëò
+# ^UnDirSubCaption
+: Ñóóëãàñíûã óñòãàõ Õàâòàñ
+# ^ConfirmSubCaption
+: Áàòëàìæ
+# ^UninstallingSubCaption
+: Ñóóëãàñíûã óñòãàæ áàéíà
+# ^UnCompletedSubCaption
+: Äóóñëàà
+# ^BackBtn
+< &Áóöàõ
+# ^NextBtn
+&Öààø>
+# ^AgreeBtn
+&Ǻâøººð뺺
+# ^AcceptBtn
+Áè Ëèöåíçèéí Ǻâøººðëèéí ç¿éë¿¿äèéã &çºâøººð÷ áàéíà
+# ^DontAcceptBtn
+Áè Ëèöåíçèéí Ǻâøººðëèéí ç¿éë¿¿äèéã &çºâøººðºõã¿é áàéíà
+# ^InstallBtn
+&Ñóóëãà
+# ^UninstallBtn
+&Óñòãà
+# ^CancelBtn
+Áîëèõ
+# ^CloseBtn
+&Xaax
+# ^BrowseBtn
+Õ&ºòëºõ...
+# ^ShowDetailsBtn
+&Äýëãýðýíã¿é
+# ^ClickNext
+Öààø äýýð äàðâàë ¿ðãýëæèëíý.
+# ^ClickInstall
+Ñóóëãà äýýð äàðâàë ñóóëãàö ýõýëíý.
+# ^ClickUninstall
+Óñòãà äýýð äàðâàë ñóóëãàöûí óñòãàëò ýõýëíý.
+# ^Name
+Íýð
+# ^Completed
+Äóóñëàà
+# ^LicenseText
+$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺-ã äàðíà óó.
+# ^LicenseTextCB
+$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ í¿äèéã ÷àãòàëíà óó. $_CLICK
+# ^LicenseTextRB
+$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ ýõíèé ñîíãîëòûã ñîíãîíî óó. $_CLICK
+# ^UnLicenseText
+$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺-ã äàðíà óó.
+# ^UnLicenseTextCB
+$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ í¿äèéã ÷àãòàëíà óó. $_CLICK
+# ^UnLicenseTextRB
+$(^NameDA)-ã ñóóëãàõûí ºìíº Ëèöåíçèéí Ǻâøººðëèéã óíøèíà óó. Õýðýâ òà çºâøèëöëèéí ç¿éë¿¿äèéã çºâøººð÷ áàéâàë, äîîðõ ýõíèé ñîíãîëòûã ñîíãîíî óó. $_CLICK
+# ^Custom
+Áóñàä
+# ^ComponentsText
+Ñóóëãàõûã õ¿ññýí íýãäëýý ÷àãòëààä, ñóóëãàõûã õ¿ñýõã¿é áóéãàà á¿¿ ÷àãòëààðàé. $_CLICK
+# ^ComponentsSubText1
+Ñóóëãàõ òºðëèéã ñîíãîíî óó:
+# ^ComponentsSubText2_NoInstTypes
+Ñóóëãàõ íýãäëèéã ñîíãîíî óó:
+# ^ComponentsSubText2
+Ýñâýë, çààâàë ñóóëãàõã¿é áàéõ íýãäë¿¿äèéã ñîíãî:
+# ^UnComponentsText
+Óñòãàõûã õ¿ññýí íýãäëýý ÷àãòëààä, óñòãàõûã õ¿ñýõã¿é áàéãààãàà á¿¿ ÷àãòëààðàé. $_CLICK
+# ^UnComponentsSubText1
+Óñòãàõ òºðëèéã ñîíãîíî óó:
+# ^UnComponentsSubText2_NoInstTypes
+Óñòãàõ íýãäë¿¿äèéã ñîíãîíî óól:
+# ^UnComponentsSubText2
+Ýñâýë, çààâàë óñòãàõã¿é áàéõ íýãäë¿¿äèéã ñîíãî:
+# ^DirText
+$(^NameDA) íü äàðààõ õàâòñàíä ñóóíà. ªºð ãàçàð ñóóëãàõûã õ¿ñâýë Õºòëºõ òîâ÷ äýýð äàðàí ººð õàâòàñ ñîíãîíî óó. $_CLICK
+# ^DirSubText
+Çîðèëòîò Õàâòàñ
+# ^DirBrowseText
+$(^NameDA)-ûã ñóóëãàõ õàâòñûã ñîíãîõ:
+# ^UnDirText
+$(^NameDA)-ã óã õàâòàñíààñ óñòãàíà. ªºð ãàçðààñ óñòãàõûã õ¿ñâýë Õºòëºõ òîâ÷ äýýð äàðàí ººð õàâòàñ ñîíãîíî óó. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+$(^NameDA)-ã óñòãàõ õàâòñûã ñîíãîõ:
+# ^SpaceAvailable
+"Áîëîìæèò çàé: "
+# ^SpaceRequired
+"Øààðäàãäàõ çàé: "
+# ^UninstallingText
+$(^NameDA) íü óã õàâòàñíààñ óñòãàãäëàà. $_CLICK
+# ^UninstallingSubText
+Óñòãàãäàõ ãàçàð:
+# ^FileError
+Ôàéë áè÷èõýýð íýýõýä àëäëàà: \r\n\t"$0"\r\nÒàñëàõ äàðâàë ñóóëãàëò òàñëàãäàíà,\r\nÄàõüÿ äàðâàë ôàéëûã áè÷èõýýð äàõèí îðîëäîíî,\r\nýñâýë ¯ë òîîõ äàðâàë óã ôàéëûã àëãàñíà
+# ^FileError_NoIgnore
+Ôàéë áè÷èõýýð íýýõýä àëäëàà: \r\n\t"$0"\r\nÄàõèÿ äàðâàë ôàéëûã áè÷èõýýð äàõèí îðîëäîíî, \r\nýñâýë áîëèõ äàðâàë ñóóëãàëò òàñëàãäàíà
+# ^CantWrite
+"Áè÷èæ ÷àäñàíã¿é: "
+# ^CopyFailed
+Õóóëàëò á¿òñýíã¿é
+# ^CopyTo
+"Õóóëàõ íü "
+# ^Registering
+"Á¿ðòãýæ áàéíà: "
+# ^Unregistering
+"Á¿ðòãýëèéã àðèëãàæ áàéíà: "
+# ^SymbolNotFound
+"Òýìäýã õàéãäñàíã¿é: "
+# ^CouldNotLoad
+"Äóóäàãäñàíã¿é: "
+# ^CreateFolder
+"¯¿ñãýõ õàâòàñ: "
+# ^CreateShortcut
+"¯¿ñãýõ shortcut: "
+# ^CreatedUninstaller
+"¯¿ññýí uninstaller: "
+# ^Delete
+"Ôàéë óñòãàõ: "
+# ^DeleteOnReboot
+"Ä.à÷ààëàõàä óñòãàõ: "
+# ^ErrorCreatingShortcut
+"Shortcut ¿¿ñãýõýä àëäëàà: "
+# ^ErrorCreating
+"¯¿ñãýõ àëäàà: "
+# ^ErrorDecompressing
+ªãºãäºë çàäëàõàä àëäëàà! Ñóóëãàö ýâäýð÷ýý?
+# ^ErrorRegistering
+DLL á¿ðòã¿¿ëýõýä àëäëàà
+# ^ExecShell
+"Àæèëëóóëàõ êîìàíä(ExecShell): "
+# ^Exec
+"Àæèëëóóëàõ: "
+# ^Extract
+"Çàäëàõ: "
+# ^ErrorWriting
+"Çàäëàëò:ôàéë ðóó áè÷èõýä àëäàà "
+# ^InvalidOpcode
+Ñóóëãàö ýâäýð÷ýý: çàäëàõ êîä áóðóó
+# ^NoOLE
+"OLE áàéõã¿é: "
+# ^OutputFolder
+"Ãàðãàõ õàâòàñ: "
+# ^RemoveFolder
+"Óñòãàõ õàâòàñ: "
+# ^RenameOnReboot
+"Ä.à÷ààëàõàä äàõèí íýðëýõ: "
+# ^Rename
+"Äàõèí íýðëýõ: "
+# ^Skipped
+"Àëãàññàí: "
+# ^CopyDetails
+Äýëãýðýíã¿éã Clipboard ðóó õóóëàõ
+# ^LogInstall
+Ñóóëãàõ ÿâöûí áàðèìò
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Mongolian.nsh b/Contrib/Language files/Mongolian.nsh
index 9328f4c..40ff03e 100755
--- a/Contrib/Language files/Mongolian.nsh
+++ b/Contrib/Language files/Mongolian.nsh
@@ -1,121 +1,121 @@
-;Language: Mongolian (1104)
-;By Bayarsaikhan Enkhtaivan
-
-!insertmacro LANGFILE "Mongolian" "Mongolian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) Ñóóëãàöàä òàâòàé ìîðèë"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "$(^NameDA) ñóóëãàöûí èëáý÷èíã òà øóóä àøèãëàæ áîëíî.$\r$\n$\r$\n¯¿íèéã ñóóëãàõûí ºìíº áóñàä á¿õ ïðîãðàìóóäàà õààõûã çºâëºæ áàéíà. Ñèñòåìèéí ôàéëóóäûã øèíý÷èëáýë êîìïüþòåðýý äàõèí à÷ààëàõã¿é áàéõ áîëîìæòîé.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Ñóóëãàöûã óñòãàõ èëáý÷èíä òàâòàé ìîðèë"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "$(^NameDA) óñòãàöûí èëáý÷èíã òà øóóä àøèãëàæ áîëíî.$\r$\n$\r$\nÓñòãàõûí ºìíº $(^NameDA) íü àæèëëààã¿é ýñýõèéã øàëãà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíçèéí çºâøººðºë"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)-ûã ñóóëãàõûíõàà ºìíº çºâøèëöëèéí ç¿éë¿¿äèéã óíøèíà óó."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺 òîâ÷èéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã ñóóëãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâëºõ õàéðöãèéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã ñóóëãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, äîîðõîîñ ýõíèéã íü ñîíãîí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã ñóóëãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíçèéí çºâøººðºë"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA) óñòãàõûí ºìíº çºâøèëöëèéí ç¿éëñèéã óíøèíà óó."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺 òîâ÷èéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã óñòãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâëºõ õàéðöãèéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã óñòãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, äîîðõîîñ ýõíèéã íü ñîíãîí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã óñòãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Page Down òîâ÷èéã äàðàí çºâøèëöëèéã äîîø ã¿éëãýíý ¿¿."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Íýãäëèéã ñîíãîõ"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA)-ûã ñóóëãàõàä øààðäàãäàõ õýñãèéã ñîíãîíî óó."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Òàéëáàð"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Íýãäëèéã ñîíãîõ"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)-ûí óñòãàõ øààðäëàãàòàé íýãäëèéã ñîíãîõ."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òà õóëãàíààðàà íýãäëèéí äýýð î÷èõîä ò¿¿íèé òàéëáàðûã õàðóóëíà."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òà õóëãàíààðàà íýãäëèéí äýýð î÷èõîä ò¿¿íèé òàéëáàðûã õàðóóëíà."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Ñóóëãàõ áàéðëàëûã ñîíãîõ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA) ñóóëãàöûí ñóóëãàõ çàìûã ñîíãî."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Óñòãàöûí áàéðëàëûã ñîíãîõ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)-ûã óñòãàõ õàâòñûã ñîíãîõ."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Ñóóëãàæ áàéíà"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)-ûã ñóóëãàæ äóóñòàë ò¿ð õ¿ëýýíý ¿¿."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Ñóóëãàæ äóóñëàà"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Ñóóëãàö àìæèëòòàé áîëîâ."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Ñóóëãàëò òàñëàãäëàà"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Ñóóëãàëò àìæèëòã¿é áîëîâ."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Óñòãàæ áàéíà"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA) -ûã çàéëóóëæ äóóñòàë ò¿ð õ¿ëýýíý ¿¿."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Óñòãàæ äóóñëàà"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Óñòãàëò àìæèëòòàé äóóñëàà."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Óñòãàö òàñëàãäëàà"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Óñòãàëò àìæèëòã¿é áîëëîî."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) Ñóóëãàöûí èëáý÷èí äóóñëàà"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) íü òàíû êîìïüþòåðò ñóóëàà.$\r$\n$\r$\nÒºãñãºë äýýð äàðâàë õààíà."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA)-ûí ñóóëãàöûí äàðààëàëä òà êîìïüþòåðýý äàõèí à÷ààëñíààð äóóñíà. Òà äàõèí à÷ààëàõûã õ¿ñýæ áàéíà óó?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) Óñòãàöûí èëáý÷èí äóóñëàà"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) íü òàíû êîìïüþòåðýýñ çàéëóóëàãäëàà.$\r$\n$\r$\nÒºãñãºë äýýð äàðâàë õààíà."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) Óñòãàöûí äàðààëàëä òà êîìïüþòåðýý äàõèí à÷ààëñíààð äóóñíà. Òà ä.à÷ààëìààð áàéíà óó?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ä.À÷ààë"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Áè äàðàà ä.à÷ààëàõûã õ¿ñýæ áàéíà."
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) àæèëëóóëàõ"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Readme õàðóóëàõ"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Òºãñãºë"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Start öýñíèé õàâòñûã ñîíãî"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Start öýñ äýõ $(^NameDA) shortcut-ûí õàâòñûã ñîíãî."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Start öýñýíä ïðîãðàìûí shortcut ¿¿ñãýõ õàâòñûã ñîíãî. Ýñâýë òà øèíý íýðýýð ¿¿ñãýæ áîëíî."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)--ûí Óñòãàö"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) -ûã òàíû êîìïüþòåðýýñ çàéëóóëàõ."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) -ûí ñóóëãàöààñ ãàðìààð áàéíà óó?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) Óñòãàöààñ ãàðìààð áàéíà óó?"
-!endif
+;Language: Mongolian (1104)
+;By Bayarsaikhan Enkhtaivan
+
+!insertmacro LANGFILE "Mongolian" "Mongolian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) Ñóóëãàöàä òàâòàé ìîðèë"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "$(^NameDA) ñóóëãàöûí èëáý÷èíã òà øóóä àøèãëàæ áîëíî.$\r$\n$\r$\n¯¿íèéã ñóóëãàõûí ºìíº áóñàä á¿õ ïðîãðàìóóäàà õààõûã çºâëºæ áàéíà. Ñèñòåìèéí ôàéëóóäûã øèíý÷èëáýë êîìïüþòåðýý äàõèí à÷ààëàõã¿é áàéõ áîëîìæòîé.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Ñóóëãàöûã óñòãàõ èëáý÷èíä òàâòàé ìîðèë"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "$(^NameDA) óñòãàöûí èëáý÷èíã òà øóóä àøèãëàæ áîëíî.$\r$\n$\r$\nÓñòãàõûí ºìíº $(^NameDA) íü àæèëëààã¿é ýñýõèéã øàëãà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíçèéí çºâøººðºë"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA)-ûã ñóóëãàõûíõàà ºìíº çºâøèëöëèéí ç¿éë¿¿äèéã óíøèíà óó."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺 òîâ÷èéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã ñóóëãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâëºõ õàéðöãèéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã ñóóëãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, äîîðõîîñ ýõíèéã íü ñîíãîí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã ñóóëãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíçèéí çºâøººðºë"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA) óñòãàõûí ºìíº çºâøèëöëèéí ç¿éëñèéã óíøèíà óó."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâøººð뺺 òîâ÷èéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã óñòãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, Ǻâëºõ õàéðöãèéã äàðàí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã óñòãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Õýðýâ çºâøèëöëèéí ç¿éëñèéã çºâøººð÷ áàéâàë, äîîðõîîñ ýõíèéã íü ñîíãîí ¿ðãýëæë¿¿ëíý ¿¿. $(^NameDA)-ûã óñòãàõûí òóëä çààâàë çºâøººðºõ øààðäëàãàòàé. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Page Down òîâ÷èéã äàðàí çºâøèëöëèéã äîîø ã¿éëãýíý ¿¿."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Íýãäëèéã ñîíãîõ"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA)-ûã ñóóëãàõàä øààðäàãäàõ õýñãèéã ñîíãîíî óó."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Òàéëáàð"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Íýãäëèéã ñîíãîõ"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)-ûí óñòãàõ øààðäëàãàòàé íýãäëèéã ñîíãîõ."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òà õóëãàíààðàà íýãäëèéí äýýð î÷èõîä ò¿¿íèé òàéëáàðûã õàðóóëíà."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òà õóëãàíààðàà íýãäëèéí äýýð î÷èõîä ò¿¿íèé òàéëáàðûã õàðóóëíà."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Ñóóëãàõ áàéðëàëûã ñîíãîõ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA) ñóóëãàöûí ñóóëãàõ çàìûã ñîíãî."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Óñòãàöûí áàéðëàëûã ñîíãîõ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA)-ûã óñòãàõ õàâòñûã ñîíãîõ."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Ñóóëãàæ áàéíà"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA)-ûã ñóóëãàæ äóóñòàë ò¿ð õ¿ëýýíý ¿¿."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Ñóóëãàæ äóóñëàà"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Ñóóëãàö àìæèëòòàé áîëîâ."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Ñóóëãàëò òàñëàãäëàà"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Ñóóëãàëò àìæèëòã¿é áîëîâ."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Óñòãàæ áàéíà"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA) -ûã çàéëóóëæ äóóñòàë ò¿ð õ¿ëýýíý ¿¿."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Óñòãàæ äóóñëàà"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Óñòãàëò àìæèëòòàé äóóñëàà."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Óñòãàö òàñëàãäëàà"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Óñòãàëò àìæèëòã¿é áîëëîî."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) Ñóóëãàöûí èëáý÷èí äóóñëàà"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) íü òàíû êîìïüþòåðò ñóóëàà.$\r$\n$\r$\nÒºãñãºë äýýð äàðâàë õààíà."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA)-ûí ñóóëãàöûí äàðààëàëä òà êîìïüþòåðýý äàõèí à÷ààëñíààð äóóñíà. Òà äàõèí à÷ààëàõûã õ¿ñýæ áàéíà óó?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) Óñòãàöûí èëáý÷èí äóóñëàà"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) íü òàíû êîìïüþòåðýýñ çàéëóóëàãäëàà.$\r$\n$\r$\nÒºãñãºë äýýð äàðâàë õààíà."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) Óñòãàöûí äàðààëàëä òà êîìïüþòåðýý äàõèí à÷ààëñíààð äóóñíà. Òà ä.à÷ààëìààð áàéíà óó?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ä.À÷ààë"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Áè äàðàà ä.à÷ààëàõûã õ¿ñýæ áàéíà."
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) àæèëëóóëàõ"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Readme õàðóóëàõ"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Òºãñãºë"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Start öýñíèé õàâòñûã ñîíãî"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Start öýñ äýõ $(^NameDA) shortcut-ûí õàâòñûã ñîíãî."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Start öýñýíä ïðîãðàìûí shortcut ¿¿ñãýõ õàâòñûã ñîíãî. Ýñâýë òà øèíý íýðýýð ¿¿ñãýæ áîëíî."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Do not create shortcuts"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)--ûí Óñòãàö"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) -ûã òàíû êîìïüþòåðýýñ çàéëóóëàõ."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) -ûí ñóóëãàöààñ ãàðìààð áàéíà óó?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) Óñòãàöààñ ãàðìààð áàéíà óó?"
+!endif
diff --git a/Contrib/Language files/Norwegian.nlf b/Contrib/Language files/Norwegian.nlf
index f473885..1370395 100755
--- a/Contrib/Language files/Norwegian.nlf
+++ b/Contrib/Language files/Norwegian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1044
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Jonas Lindstrøm (jonasc_88@hotmail.com). Reviewed and fixed by Jan Ivar Beddari <d0der at online.no>
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) installasjon
-# ^UninstallCaption
-$(^Name) avinstallasjon
-# ^LicenseSubCaption
-: Lisensavtale
-# ^ComponentsSubCaption
-: Installasjonsvalg
-# ^DirSubCaption
-: Installasjonsmappe
-# ^InstallingSubCaption
-: Installerer
-# ^CompletedSubCaption
-: Ferdig
-# ^UnComponentsSubCaption
-: Avinstallasjonsvalg
-# ^UnDirSubCaption
-: Avinstallasjonsmappe
-# ^ConfirmSubCaption
-: Bekreft
-# ^UninstallingSubCaption
-: Avinstallerer
-# ^UnCompletedSubCaption
-: Ferdig
-# ^BackBtn
-< &Tilbake
-# ^NextBtn
-&Neste >
-# ^AgreeBtn
-&Godta
-# ^AcceptBtn
-Jeg &godtar vilkårene i lisensavtalen
-# ^DontAcceptBtn
-Jeg godtar &ikke vilkårene i lisensavtalen
-# ^InstallBtn
-&Installer
-# ^UninstallBtn
-&Avinstaller
-# ^CancelBtn
-Avbryt
-# ^CloseBtn
-&Lukk
-# ^BrowseBtn
-Bla &gjennom...
-# ^ShowDetailsBtn
-Vis &detaljer
-# ^ClickNext
-Trykk Neste for å fortsette.
-# ^ClickInstall
-Trykk Installer for å starte installasjonen.
-# ^ClickUninstall
-Trykk Avinstaller for å starte avinstallasjonen.
-# ^Name
-Navn
-# ^Completed
-Ferdig
-# ^LicenseText
-Vennligst les gjennom lisensavtalen før du installerer $(^Name). Hvis du godtar vilkårene i avtalen, trykk på Godta.
-# ^LicenseTextCB
-Vennligst les gjennom lisensavtalen før du installerer $(^Name). Hvis du godtar vilkårene i avtalen, merk av under. $_CLICK
-# ^LicenseTextRB
-Vennligst les gjennom lisensavtalen før du installerer $(^Name). Hvis du godtar vilkårene i avtalen, velg det første alternativet. $_CLICK
-# ^UnLicenseText
-Vennligst les gjennom lisensavtalen før du avinstallerer $(^Name). Hvis du godtar vilkårene i avtalen, trykk på Godta.
-# ^UnLicenseTextCB
-Vennligst les gjennom lisensavtalen før du avinstallerer $(^Name). Hvis du godtar vilkårene i avtalen, merk av under. $_CLICK
-# ^UnLicenseTextRB
-Vennligst les gjennom lisensavtalen før du avinstallerer $(^Name). Hvis du godtar vilkårene i avtalen, velg det første alternativet. $_CLICK
-# ^Custom
-Egendefinert
-# ^ComponentsText
-Merk komponentene du vil installere og fjern merkingen for de du ikke vil installere. $_CLICK
-# ^ComponentsSubText1
-Velg hvilken måte du vil installere på:
-# ^ComponentsSubText2_NoInstTypes
-Merk komponenter du vil installere:
-# ^ComponentsSubText2
-Eller merk de valgfrie komponentene du ønsker å installere:
-# ^UnComponentsText
-Merk komponentene du vil avinstallere og fjern merkingen for de du vil beholde. $_CLICK
-# ^UnComponentsSubText1
-Velg hvilken måte du vil avinstallere på:
-# ^UnComponentsSubText2_NoInstTypes
-Merk komponenter du vil avinstallere:
-# ^UnComponentsSubText2
-Eller merk de valgfrie komponentene du ønsker å avinstallere:
-# ^DirText
-$(^Name) vil bli installert i følgende mappe. For å velge en annen mappe, trykk Bla gjennom. $_CLICK
-# ^DirSubText
-Målmappe
-# ^DirBrowseText
-Velg mappe du vil installere $(^Name) i:
-# ^UnDirText
-$(^Name) i følgende mappe vil bli avinstallert. For å velge en annen mappe, trykk Bla gjennom. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Velg mappe du vil avinstallere $(^Name) fra:
-# ^SpaceAvailable
-"Ledig plass: "
-# ^SpaceRequired
-"Nødvendig plass: "
-# ^UninstallingText
-Denne veiviseren vil avinstallere $(^Name) fra din datamaskin. $_CLICK
-# ^UninstallingSubText
-Avinstallerer fra:
-# ^FileError
-Feil under åpning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Avbryt for å avbryte installasjonen,\r\nPrøv igjen for å prøve igjen, eller\r\nIgnorer for å hoppe over denne filen
-# ^FileError_NoIgnore
-Feil under åpning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Prøv igjen for å prøve igjen, or\r\neller Avbryt for å avbryte installasjonen
-# ^CantWrite
-"Kan ikke skrive: "
-# ^CopyFailed
-Kopiering mislyktes
-# ^CopyTo
-"Kopier til "
-# ^Registering
-"Registrerer: "
-# ^Unregistering
-""Avregistrerer: "
-# ^SymbolNotFound
-"Kunne ikke finne symbol: "
-# ^CouldNotLoad
-"Kunne ikke laste: "
-# ^CreateFolder
-"Lag mappe: "
-# ^CreateShortcut
-"Lag snarvei: "
-# ^CreatedUninstaller
-"Avinstallasjon laget: "
-# ^Delete
-"Slett fil: "
-# ^DeleteOnReboot
-"Slett ved omstart: "
-# ^ErrorCreatingShortcut
-"Feil under opprettelse av snarvei: "
-# ^ErrorCreating
-"Feil under opprettelse av: "
-# ^ErrorDecompressing
-Feil under utpakking av data! Installasjonsprogrammet kan være skadet.
-# ^ErrorRegistering
-Feil under registrering av DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Kjøre: "
-# ^Extract
-"Pakk ut: "
-# ^ErrorWriting
-"Pakk ut: Feil under skriving til fil "
-# ^InvalidOpcode
-Installasjonsprogrammet er skadet: ukjent kode
-# ^NoOLE
-"Ingen OLE for: "
-# ^OutputFolder
-"Ut-mappe: "
-# ^RemoveFolder
-"Fjern mappe: "
-# ^RenameOnReboot
-"Gi nytt navn ved omstart: "
-# ^Rename
-"Gi nytt navn: "
-# ^Skipped
-"Hoppet over: "
-# ^CopyDetails
-Kopier detaljer til utklippstavlen
-# ^LogInstall
-Loggfør installasjonsprosessen
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1044
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Jonas Lindstrøm (jonasc_88@hotmail.com). Reviewed and fixed by Jan Ivar Beddari <d0der at online.no>
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) installasjon
+# ^UninstallCaption
+$(^Name) avinstallasjon
+# ^LicenseSubCaption
+: Lisensavtale
+# ^ComponentsSubCaption
+: Installasjonsvalg
+# ^DirSubCaption
+: Installasjonsmappe
+# ^InstallingSubCaption
+: Installerer
+# ^CompletedSubCaption
+: Ferdig
+# ^UnComponentsSubCaption
+: Avinstallasjonsvalg
+# ^UnDirSubCaption
+: Avinstallasjonsmappe
+# ^ConfirmSubCaption
+: Bekreft
+# ^UninstallingSubCaption
+: Avinstallerer
+# ^UnCompletedSubCaption
+: Ferdig
+# ^BackBtn
+< &Tilbake
+# ^NextBtn
+&Neste >
+# ^AgreeBtn
+&Godta
+# ^AcceptBtn
+Jeg &godtar vilkårene i lisensavtalen
+# ^DontAcceptBtn
+Jeg godtar &ikke vilkårene i lisensavtalen
+# ^InstallBtn
+&Installer
+# ^UninstallBtn
+&Avinstaller
+# ^CancelBtn
+Avbryt
+# ^CloseBtn
+&Lukk
+# ^BrowseBtn
+Bla &gjennom...
+# ^ShowDetailsBtn
+Vis &detaljer
+# ^ClickNext
+Trykk Neste for å fortsette.
+# ^ClickInstall
+Trykk Installer for å starte installasjonen.
+# ^ClickUninstall
+Trykk Avinstaller for å starte avinstallasjonen.
+# ^Name
+Navn
+# ^Completed
+Ferdig
+# ^LicenseText
+Vennligst les gjennom lisensavtalen før du installerer $(^Name). Hvis du godtar vilkårene i avtalen, trykk på Godta.
+# ^LicenseTextCB
+Vennligst les gjennom lisensavtalen før du installerer $(^Name). Hvis du godtar vilkårene i avtalen, merk av under. $_CLICK
+# ^LicenseTextRB
+Vennligst les gjennom lisensavtalen før du installerer $(^Name). Hvis du godtar vilkårene i avtalen, velg det første alternativet. $_CLICK
+# ^UnLicenseText
+Vennligst les gjennom lisensavtalen før du avinstallerer $(^Name). Hvis du godtar vilkårene i avtalen, trykk på Godta.
+# ^UnLicenseTextCB
+Vennligst les gjennom lisensavtalen før du avinstallerer $(^Name). Hvis du godtar vilkårene i avtalen, merk av under. $_CLICK
+# ^UnLicenseTextRB
+Vennligst les gjennom lisensavtalen før du avinstallerer $(^Name). Hvis du godtar vilkårene i avtalen, velg det første alternativet. $_CLICK
+# ^Custom
+Egendefinert
+# ^ComponentsText
+Merk komponentene du vil installere og fjern merkingen for de du ikke vil installere. $_CLICK
+# ^ComponentsSubText1
+Velg hvilken måte du vil installere på:
+# ^ComponentsSubText2_NoInstTypes
+Merk komponenter du vil installere:
+# ^ComponentsSubText2
+Eller merk de valgfrie komponentene du ønsker å installere:
+# ^UnComponentsText
+Merk komponentene du vil avinstallere og fjern merkingen for de du vil beholde. $_CLICK
+# ^UnComponentsSubText1
+Velg hvilken måte du vil avinstallere på:
+# ^UnComponentsSubText2_NoInstTypes
+Merk komponenter du vil avinstallere:
+# ^UnComponentsSubText2
+Eller merk de valgfrie komponentene du ønsker å avinstallere:
+# ^DirText
+$(^Name) vil bli installert i følgende mappe. For å velge en annen mappe, trykk Bla gjennom. $_CLICK
+# ^DirSubText
+Målmappe
+# ^DirBrowseText
+Velg mappe du vil installere $(^Name) i:
+# ^UnDirText
+$(^Name) i følgende mappe vil bli avinstallert. For å velge en annen mappe, trykk Bla gjennom. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Velg mappe du vil avinstallere $(^Name) fra:
+# ^SpaceAvailable
+"Ledig plass: "
+# ^SpaceRequired
+"Nødvendig plass: "
+# ^UninstallingText
+Denne veiviseren vil avinstallere $(^Name) fra din datamaskin. $_CLICK
+# ^UninstallingSubText
+Avinstallerer fra:
+# ^FileError
+Feil under åpning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Avbryt for å avbryte installasjonen,\r\nPrøv igjen for å prøve igjen, eller\r\nIgnorer for å hoppe over denne filen
+# ^FileError_NoIgnore
+Feil under åpning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Prøv igjen for å prøve igjen, or\r\neller Avbryt for å avbryte installasjonen
+# ^CantWrite
+"Kan ikke skrive: "
+# ^CopyFailed
+Kopiering mislyktes
+# ^CopyTo
+"Kopier til "
+# ^Registering
+"Registrerer: "
+# ^Unregistering
+""Avregistrerer: "
+# ^SymbolNotFound
+"Kunne ikke finne symbol: "
+# ^CouldNotLoad
+"Kunne ikke laste: "
+# ^CreateFolder
+"Lag mappe: "
+# ^CreateShortcut
+"Lag snarvei: "
+# ^CreatedUninstaller
+"Avinstallasjon laget: "
+# ^Delete
+"Slett fil: "
+# ^DeleteOnReboot
+"Slett ved omstart: "
+# ^ErrorCreatingShortcut
+"Feil under opprettelse av snarvei: "
+# ^ErrorCreating
+"Feil under opprettelse av: "
+# ^ErrorDecompressing
+Feil under utpakking av data! Installasjonsprogrammet kan være skadet.
+# ^ErrorRegistering
+Feil under registrering av DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Kjøre: "
+# ^Extract
+"Pakk ut: "
+# ^ErrorWriting
+"Pakk ut: Feil under skriving til fil "
+# ^InvalidOpcode
+Installasjonsprogrammet er skadet: ukjent kode
+# ^NoOLE
+"Ingen OLE for: "
+# ^OutputFolder
+"Ut-mappe: "
+# ^RemoveFolder
+"Fjern mappe: "
+# ^RenameOnReboot
+"Gi nytt navn ved omstart: "
+# ^Rename
+"Gi nytt navn: "
+# ^Skipped
+"Hoppet over: "
+# ^CopyDetails
+Kopier detaljer til utklippstavlen
+# ^LogInstall
+Loggfør installasjonsprosessen
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Norwegian.nsh b/Contrib/Language files/Norwegian.nsh
index 5f3c379..2ca3160 100755
--- a/Contrib/Language files/Norwegian.nsh
+++ b/Contrib/Language files/Norwegian.nsh
@@ -1,121 +1,121 @@
-;Language: Norwegian (2068)
-;By Jonas Lindsrøm (jonasc_88@hotmail.com) Reviewed and fixed by Jan Ivar Beddari, d0der at online.no
-
-!insertmacro LANGFILE "Norwegian" "Norwegian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til veiviseren for installasjon av $(^NameDA) "
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denne veiviseren vil lede deg gjennom installasjonen av $(^NameDA).$\r$\n$\r$\nDet anbefales at du avslutter alle andre programmer før du fortsetter. Dette vil la installasjonsprogrammet forandre på systemfiler uten at du må starte datamaskinen på nytt.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til veiviseren for avinstallasjon av $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denne veiviseren vil lede deg gjennom avinstallasjonen av $(^NameDA).$\r$\n$\r$\nFør du fortsetter må du forsikre deg om at $(^NameDA) ikke kjører.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisensavtale"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Vennligst les gjennom lisensavtalen før du starter installasjonen av $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Hvis du godtar lisensavtalen trykk Godta for å fortsette. Du må godta lisensavtalen for å installere $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du godtar lisensavtalen, kryss av på merket under. Du må godta lisensavtalen for å installere $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du godtar lisensavtalen, velg det første alternativet ovenfor. Du må godta lisensavtalen for å installere $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisensavtale"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Vennligst les gjennom lisensavtalen før du avinstallerer $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Hvis du godtar lisensavtalen trykk Godta for å fortsette. Du må godta lisensavtalen for å avintallere $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du godtar lisensavtalen, kryss av på merket under. Du må godta lisensavtalen for å avinstallere $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du godtar lisensavtalen, velg det første alternativet ovenfor. Du må godta lisensavtalen for å avinstallere $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Trykk Page Down knappen for å se resten av lisensavtalen."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Velg komponenter"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Velg hvilke deler av $(^NameDA) du ønsker å installere."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrivelse"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Velg komponenter"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Velg hvilke deler av $(^NameDA) du ønsker å avinstallere."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musen over komponentene for å se beskrivelsen."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musen over komponentene for å se beskrivelsen."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Velg installasjonsmappe"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Velg hvilken mappe du vil installere $(^NameDA) i."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Velg mappe for avinstallasjon"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Velg mappen du vil avinstallere $(^NameDA) fra."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installasjonen pågår"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vennligst vent mens $(^NameDA) blir installert."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installasjonen er ferdig"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Installasjonen ble fullført uten feil."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installasjonen er avbrutt"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Installasjonen ble ikke fullført riktig."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallasjon pågår"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vennligst vent mens $(^NameDA) blir avinstallert."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Avinstallasjon ferdig"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Avinstallasjonen ble utført uten feil."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Avinstallasjon avbrutt"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Avinstallasjonen ble ikke utført riktig."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Avslutter $(^NameDA) installasjonsveiviser"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er klart til bruk på din datamskin.$\r$\n$\r$\nTrykk Ferdig for å avslutte installasjonsprogrammet."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Du må starte datamaskinen på nytt for å fullføre installasjonen av $(^NameDA). Vil du starte datamaskinen på nytt nå?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Fullfører avinstallasjonen av $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) har blitt avinstallert fra din datamaskin.$\r$\n$\r$\nTrykk på ferdig for å avslutte denne veiviseren."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Datamaskinen må starte på nytt for å fullføre avinstallasjonen av $(^NameDA). Vil du starte datamaskinen på nytt nå?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ja. Start datamaskinen på nytt nå"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Nei. Jeg vil starte datamaskinen på nytt senere"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Kjør $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Vis Readme filen"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ferdig"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Velg plassering på startmenyen"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Velg hvilken mappe snarveiene til $(^NameDA) skal ligge i."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Velg mappe for snarveiene til programmet. Du kan også skrive inn et nytt navn for å lage en ny mappe."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ikke lag snarveier"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Avinstaller $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Fjern $(^NameDA) fra din datamaskin."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Er du sikker på at du vil avslutte installasjonen av $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Er du sikker på at du vil avbryte avinstallasjonen av $(^Name)?"
-!endif
+;Language: Norwegian (2068)
+;By Jonas Lindsrøm (jonasc_88@hotmail.com) Reviewed and fixed by Jan Ivar Beddari, d0der at online.no
+
+!insertmacro LANGFILE "Norwegian" "Norwegian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til veiviseren for installasjon av $(^NameDA) "
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denne veiviseren vil lede deg gjennom installasjonen av $(^NameDA).$\r$\n$\r$\nDet anbefales at du avslutter alle andre programmer før du fortsetter. Dette vil la installasjonsprogrammet forandre på systemfiler uten at du må starte datamaskinen på nytt.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til veiviseren for avinstallasjon av $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denne veiviseren vil lede deg gjennom avinstallasjonen av $(^NameDA).$\r$\n$\r$\nFør du fortsetter må du forsikre deg om at $(^NameDA) ikke kjører.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisensavtale"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Vennligst les gjennom lisensavtalen før du starter installasjonen av $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Hvis du godtar lisensavtalen trykk Godta for å fortsette. Du må godta lisensavtalen for å installere $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du godtar lisensavtalen, kryss av på merket under. Du må godta lisensavtalen for å installere $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du godtar lisensavtalen, velg det første alternativet ovenfor. Du må godta lisensavtalen for å installere $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisensavtale"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Vennligst les gjennom lisensavtalen før du avinstallerer $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Hvis du godtar lisensavtalen trykk Godta for å fortsette. Du må godta lisensavtalen for å avintallere $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Hvis du godtar lisensavtalen, kryss av på merket under. Du må godta lisensavtalen for å avinstallere $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Hvis du godtar lisensavtalen, velg det første alternativet ovenfor. Du må godta lisensavtalen for å avinstallere $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Trykk Page Down knappen for å se resten av lisensavtalen."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Velg komponenter"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Velg hvilke deler av $(^NameDA) du ønsker å installere."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrivelse"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Velg komponenter"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Velg hvilke deler av $(^NameDA) du ønsker å avinstallere."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musen over komponentene for å se beskrivelsen."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musen over komponentene for å se beskrivelsen."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Velg installasjonsmappe"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Velg hvilken mappe du vil installere $(^NameDA) i."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Velg mappe for avinstallasjon"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Velg mappen du vil avinstallere $(^NameDA) fra."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installasjonen pågår"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vennligst vent mens $(^NameDA) blir installert."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installasjonen er ferdig"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Installasjonen ble fullført uten feil."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installasjonen er avbrutt"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Installasjonen ble ikke fullført riktig."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallasjon pågår"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vennligst vent mens $(^NameDA) blir avinstallert."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Avinstallasjon ferdig"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Avinstallasjonen ble utført uten feil."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Avinstallasjon avbrutt"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Avinstallasjonen ble ikke utført riktig."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Avslutter $(^NameDA) installasjonsveiviser"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er klart til bruk på din datamskin.$\r$\n$\r$\nTrykk Ferdig for å avslutte installasjonsprogrammet."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Du må starte datamaskinen på nytt for å fullføre installasjonen av $(^NameDA). Vil du starte datamaskinen på nytt nå?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Fullfører avinstallasjonen av $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) har blitt avinstallert fra din datamaskin.$\r$\n$\r$\nTrykk på ferdig for å avslutte denne veiviseren."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Datamaskinen må starte på nytt for å fullføre avinstallasjonen av $(^NameDA). Vil du starte datamaskinen på nytt nå?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ja. Start datamaskinen på nytt nå"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Nei. Jeg vil starte datamaskinen på nytt senere"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Kjør $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Vis Readme filen"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ferdig"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Velg plassering på startmenyen"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Velg hvilken mappe snarveiene til $(^NameDA) skal ligge i."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Velg mappe for snarveiene til programmet. Du kan også skrive inn et nytt navn for å lage en ny mappe."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ikke lag snarveier"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Avinstaller $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Fjern $(^NameDA) fra din datamaskin."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Er du sikker på at du vil avslutte installasjonen av $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Er du sikker på at du vil avbryte avinstallasjonen av $(^Name)?"
+!endif
diff --git a/Contrib/Language files/NorwegianNynorsk.nlf b/Contrib/Language files/NorwegianNynorsk.nlf
index e32483c..ae6a41d 100755
--- a/Contrib/Language files/NorwegianNynorsk.nlf
+++ b/Contrib/Language files/NorwegianNynorsk.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-2068
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Vebjørn Sture, vsture gmail com
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) installasjon
-# ^UninstallCaption
-$(^Name) avinstallasjon
-# ^LicenseSubCaption
-: Lisensavtale
-# ^ComponentsSubCaption
-: Installasjonsval
-# ^DirSubCaption
-: Installasjonsmappe
-# ^InstallingSubCaption
-: Installerer
-# ^CompletedSubCaption
-: Ferdig
-# ^UnComponentsSubCaption
-: Avinstallasjonsval
-# ^UnDirSubCaption
-: Avinstallasjonsmappe
-# ^ConfirmSubCaption
-: Stadfest
-# ^UninstallingSubCaption
-: Avinstallerer
-# ^UnCompletedSubCaption
-: Ferdig
-# ^BackBtn
-< &Attende
-# ^NextBtn
-&Neste >
-# ^AgreeBtn
-&Godta
-# ^AcceptBtn
-Eg &godtek vilkåra i lisensavtalen
-# ^DontAcceptBtn
-Eg godtek &ikkje vilkåra i lisensavtalen
-# ^InstallBtn
-&Installer
-# ^UninstallBtn
-&Avinstaller
-# ^CancelBtn
-Avbryt
-# ^CloseBtn
-&Lat att
-# ^BrowseBtn
-Bla &gjennom ...
-# ^ShowDetailsBtn
-Syn &detaljar
-# ^ClickNext
-Trykk Neste for å halda fram.
-# ^ClickInstall
-Trykk Installer for å starta installasjonen.
-# ^ClickUninstall
-Trykk Avinstaller for å starta avinstallasjonen.
-# ^Name
-Namn
-# ^Completed
-Ferdig
-# ^LicenseText
-Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, trykk på Godta.
-# ^LicenseTextCB
-Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, merk av under. $_CLICK
-# ^LicenseTextRB
-Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, vel det fyrste alternativet. $_CLICK
-# ^UnLicenseText
-Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, trykk på Godta.
-# ^UnLicenseTextCB
-Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, merk av under. $_CLICK
-# ^UnLicenseTextRB
-Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, vel det fyrste alternativet. $_CLICK
-# ^Custom
-Eigendefinert
-# ^ComponentsText
-Merk komponentane du vil installera og fjern merkinga for dei du ikkje vil installera. $_CLICK
-# ^ComponentsSubText1
-Vel kva måte du vil installera på:
-# ^ComponentsSubText2_NoInstTypes
-Merk komponentar du vil installera:
-# ^ComponentsSubText2
-Eller merk dei valfrie komponentane du ynskjer å installera:
-# ^UnComponentsText
-Merk komponentane du vil avinstallera og fjern merkinga for dei du vil ta vare på. $_CLICK
-# ^UnComponentsSubText1
-Vel kva måte du vil avinstallera på:
-# ^UnComponentsSubText2_NoInstTypes
-Merk komponentar du vil avinstallera:
-# ^UnComponentsSubText2
-Eller merk dei valfrie komponentane du ynskjer å avinstallera:
-# ^DirText
-$(^NameDA) vil verta installert i fylgjande mappe. For å velja ei anna mappe, trykk Bla gjennom. $_CLICK
-# ^DirSubText
-Målmappe
-# ^DirBrowseText
-Vel mappe du vil installera $(^NameDA) i:
-# ^UnDirText
-$(^NameDA) i fylgjande mappe vil verta avinstallert. For å velja ei anna mappe, trykk Bla gjennom. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Vel mappe du vil avinstallera $(^NameDA) frå:
-# ^SpaceAvailable
-"Ledig plass: "
-# ^SpaceRequired
-"Naudsynt plass: "
-# ^UninstallingText
-Denne vegvisaren vil avinstallera $(^NameDA) frå din datamaskin. $_CLICK
-# ^UninstallingSubText
-Avinstallerer frå:
-# ^FileError
-Feil under opning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Avbryt for å avbryta installasjonen,\r\nPrøv igjen for å prøva igjen, eller\r\nIgnorer for å hoppa over denne fila
-# ^FileError_NoIgnore
-Feil under opning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Prøv igjen for å prøva igjen, or\r\neller Avbryt for å avbryta installasjonen
-# ^CantWrite
-"Kan ikkje skriva: "
-# ^CopyFailed
-Kopiering mislukka
-# ^CopyTo
-"Kopier til "
-# ^Registering
-"Registrerer: "
-# ^Unregistering
-""Avregistrerer: "
-# ^SymbolNotFound
-"Kunne ikkje finna symbol: "
-# ^CouldNotLoad
-"Kunne ikkje lasta: "
-# ^CreateFolder
-"Lag mappe: "
-# ^CreateShortcut
-"Lag snarveg: "
-# ^CreatedUninstaller
-"Avinstallasjon laga: "
-# ^Delete
-"Slett fil: "
-# ^DeleteOnReboot
-"Slett ved omstart: "
-# ^ErrorCreatingShortcut
-"Feil under oppretting av snarveg: "
-# ^ErrorCreating
-"Feil under oppretting av: "
-# ^ErrorDecompressing
-Feil under utpakking av data! Installasjonsprogrammet kan vera skadd.
-# ^ErrorRegistering
-Feil under registrering av DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Køyra: "
-# ^Extract
-"Pakk ut: "
-# ^ErrorWriting
-"Pakk ut: Feil under skriving til fil "
-# ^InvalidOpcode
-Installasjonsprogrammet er skadd: ukjend kode
-# ^NoOLE
-"Ingen OLE for: "
-# ^OutputFolder
-"Ut-mappe: "
-# ^RemoveFolder
-"Fjern mappe: "
-# ^RenameOnReboot
-"Gje nytt namn ved omstart: "
-# ^Rename
-"Gje nytt namn: "
-# ^Skipped
-"Hoppa over: "
-# ^CopyDetails
-Kopier detaljar til utklyppstavla
-# ^LogInstall
-Loggfør installasjonsprosessen
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
-
+# Header, don't edit
+NLF v6
+# Language ID
+2068
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Vebjørn Sture, vsture gmail com
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) installasjon
+# ^UninstallCaption
+$(^Name) avinstallasjon
+# ^LicenseSubCaption
+: Lisensavtale
+# ^ComponentsSubCaption
+: Installasjonsval
+# ^DirSubCaption
+: Installasjonsmappe
+# ^InstallingSubCaption
+: Installerer
+# ^CompletedSubCaption
+: Ferdig
+# ^UnComponentsSubCaption
+: Avinstallasjonsval
+# ^UnDirSubCaption
+: Avinstallasjonsmappe
+# ^ConfirmSubCaption
+: Stadfest
+# ^UninstallingSubCaption
+: Avinstallerer
+# ^UnCompletedSubCaption
+: Ferdig
+# ^BackBtn
+< &Attende
+# ^NextBtn
+&Neste >
+# ^AgreeBtn
+&Godta
+# ^AcceptBtn
+Eg &godtek vilkåra i lisensavtalen
+# ^DontAcceptBtn
+Eg godtek &ikkje vilkåra i lisensavtalen
+# ^InstallBtn
+&Installer
+# ^UninstallBtn
+&Avinstaller
+# ^CancelBtn
+Avbryt
+# ^CloseBtn
+&Lat att
+# ^BrowseBtn
+Bla &gjennom ...
+# ^ShowDetailsBtn
+Syn &detaljar
+# ^ClickNext
+Trykk Neste for å halda fram.
+# ^ClickInstall
+Trykk Installer for å starta installasjonen.
+# ^ClickUninstall
+Trykk Avinstaller for å starta avinstallasjonen.
+# ^Name
+Namn
+# ^Completed
+Ferdig
+# ^LicenseText
+Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, trykk på Godta.
+# ^LicenseTextCB
+Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, merk av under. $_CLICK
+# ^LicenseTextRB
+Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, vel det fyrste alternativet. $_CLICK
+# ^UnLicenseText
+Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, trykk på Godta.
+# ^UnLicenseTextCB
+Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, merk av under. $_CLICK
+# ^UnLicenseTextRB
+Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, vel det fyrste alternativet. $_CLICK
+# ^Custom
+Eigendefinert
+# ^ComponentsText
+Merk komponentane du vil installera og fjern merkinga for dei du ikkje vil installera. $_CLICK
+# ^ComponentsSubText1
+Vel kva måte du vil installera på:
+# ^ComponentsSubText2_NoInstTypes
+Merk komponentar du vil installera:
+# ^ComponentsSubText2
+Eller merk dei valfrie komponentane du ynskjer å installera:
+# ^UnComponentsText
+Merk komponentane du vil avinstallera og fjern merkinga for dei du vil ta vare på. $_CLICK
+# ^UnComponentsSubText1
+Vel kva måte du vil avinstallera på:
+# ^UnComponentsSubText2_NoInstTypes
+Merk komponentar du vil avinstallera:
+# ^UnComponentsSubText2
+Eller merk dei valfrie komponentane du ynskjer å avinstallera:
+# ^DirText
+$(^NameDA) vil verta installert i fylgjande mappe. For å velja ei anna mappe, trykk Bla gjennom. $_CLICK
+# ^DirSubText
+Målmappe
+# ^DirBrowseText
+Vel mappe du vil installera $(^NameDA) i:
+# ^UnDirText
+$(^NameDA) i fylgjande mappe vil verta avinstallert. For å velja ei anna mappe, trykk Bla gjennom. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Vel mappe du vil avinstallera $(^NameDA) frå:
+# ^SpaceAvailable
+"Ledig plass: "
+# ^SpaceRequired
+"Naudsynt plass: "
+# ^UninstallingText
+Denne vegvisaren vil avinstallera $(^NameDA) frå din datamaskin. $_CLICK
+# ^UninstallingSubText
+Avinstallerer frå:
+# ^FileError
+Feil under opning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Avbryt for å avbryta installasjonen,\r\nPrøv igjen for å prøva igjen, eller\r\nIgnorer for å hoppa over denne fila
+# ^FileError_NoIgnore
+Feil under opning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Prøv igjen for å prøva igjen, or\r\neller Avbryt for å avbryta installasjonen
+# ^CantWrite
+"Kan ikkje skriva: "
+# ^CopyFailed
+Kopiering mislukka
+# ^CopyTo
+"Kopier til "
+# ^Registering
+"Registrerer: "
+# ^Unregistering
+""Avregistrerer: "
+# ^SymbolNotFound
+"Kunne ikkje finna symbol: "
+# ^CouldNotLoad
+"Kunne ikkje lasta: "
+# ^CreateFolder
+"Lag mappe: "
+# ^CreateShortcut
+"Lag snarveg: "
+# ^CreatedUninstaller
+"Avinstallasjon laga: "
+# ^Delete
+"Slett fil: "
+# ^DeleteOnReboot
+"Slett ved omstart: "
+# ^ErrorCreatingShortcut
+"Feil under oppretting av snarveg: "
+# ^ErrorCreating
+"Feil under oppretting av: "
+# ^ErrorDecompressing
+Feil under utpakking av data! Installasjonsprogrammet kan vera skadd.
+# ^ErrorRegistering
+Feil under registrering av DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Køyra: "
+# ^Extract
+"Pakk ut: "
+# ^ErrorWriting
+"Pakk ut: Feil under skriving til fil "
+# ^InvalidOpcode
+Installasjonsprogrammet er skadd: ukjend kode
+# ^NoOLE
+"Ingen OLE for: "
+# ^OutputFolder
+"Ut-mappe: "
+# ^RemoveFolder
+"Fjern mappe: "
+# ^RenameOnReboot
+"Gje nytt namn ved omstart: "
+# ^Rename
+"Gje nytt namn: "
+# ^Skipped
+"Hoppa over: "
+# ^CopyDetails
+Kopier detaljar til utklyppstavla
+# ^LogInstall
+Loggfør installasjonsprosessen
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
+
diff --git a/Contrib/Language files/NorwegianNynorsk.nsh b/Contrib/Language files/NorwegianNynorsk.nsh
index 8f467e8..a7a9014 100755
--- a/Contrib/Language files/NorwegianNynorsk.nsh
+++ b/Contrib/Language files/NorwegianNynorsk.nsh
@@ -1,121 +1,121 @@
-;Language: Norwegian nynorsk (2068)
-;By Vebjoern Sture and Håvard Mork (www.firefox.no)
-
-!insertmacro LANGFILE "NorwegianNynorsk" "Norwegian nynorsk"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til $(^NameDA) innstallasjonsvegvisar"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denne vegvisaren vil leie deg gjennom installeringa av $(^NameDA).\n\nDet er tilrådd at du avsluttar alle andre program før du held fram. Dette vil la installeringsprogrammet oppdatera systemfiler utan at du må starta datamaskinen på nytt.\n\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til avinstallering av $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denne vegvisaren vil leie deg gjennom avinstalleringen av $(^NameDA).\n\nFør du fortsetter må du forsikre deg om at $(^NameDA) ikkje er opent.\n\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisensavtale"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Les gjennom lisensavtalen før du startar installeringa av $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Trykk på «Godta» dersom du godtar betingelsane i avtala. Du må godta avtala for å installere $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Trykk på avkryssingsboksen nedanfor nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å installere $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Vel det første alternativet nedanfor dersom du godtek vilkåra i avtala. Du må godta avtala for å installera $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisensavtale"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Les gjennom lisensavtalen før du startar avinstalleringa av $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Trykk på «Godta» dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Trykk på avkryssingsboksen nedanfor nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Vel det første alternativet nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Trykk Page Down-knappen for å sjå resten av lisensavtala."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vel komponentar"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Vel kva delar av $(^NameDA) du ynskjer å installera."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskriving"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vel funksjonar"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Vel kva for funksjonar du vil avinstallera i $(^NameDA)."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musa over komponentene for å sjå beskrivinga."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musa over komponentene for å sjå beskrivinga."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vel installasjonsmappe"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vel kva mappe du vil installera $(^NameDA) i."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Vel avinstalleringplassering"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vel mappa du vil avinstallere $(^NameDA) frå."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installerer"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vent mens $(^NameDA) blir installert."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installeringa er fullført"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Installeringa vart fullført."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installeringa vart avbroten"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Installeringa vart ikkje fullført."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallerer"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vent medan $(^NameDA) vert avinstallert."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Avinstallering ferdig"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Avinstallering ble utført uten feil."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Avinstallering broten"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Avinstallering ble ikkje utført riktig."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Installering fullført"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er installert og klar til bruk.\n\nTrykk på «Fullfør» for å avslutte installeringa."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Du må starta datamaskinen på nytt for å fullføra installeringa av $(^NameDA). Vil du starta på nytt no?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Fullfører avinstalleringa av $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) er no avinstallert frå datamaskina di.\n\nTrykk på «Fullfør» for å avslutta denne vegvisaren."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Datamaskinen må starta på nytt for å fullføra avinstalleringa av $(^NameDA). Vil du starta datamaskina på nytt no?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Start på nytt no"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Eg vil starta på nytt seinare"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Køyr $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Syn lesmeg"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fullfør"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vel mappe på startmenyen"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vel kva mappe snarvegane til $(^NameDA) skal liggja i."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vel mappa du vil oppretta snarvegane til programmet i. Du kan òg skriva inn eit nytt namn for å laga ei ny mappe."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ikkje opprett snarvegar"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Avinstaller $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Slett $(^NameDA) frå datamaskinen."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Er du viss på at du vil avslutta installeringa av $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Er du viss på at du vil avbryta avinstalleringa av $(^Name)?"
-!endif
+;Language: Norwegian nynorsk (2068)
+;By Vebjoern Sture and Håvard Mork (www.firefox.no)
+
+!insertmacro LANGFILE "NorwegianNynorsk" "Norwegian nynorsk"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til $(^NameDA) innstallasjonsvegvisar"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denne vegvisaren vil leie deg gjennom installeringa av $(^NameDA).$\n$\nDet er tilrådd at du avsluttar alle andre program før du held fram. Dette vil la installeringsprogrammet oppdatera systemfiler utan at du må starta datamaskinen på nytt.$\n$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til avinstallering av $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denne vegvisaren vil leie deg gjennom avinstalleringen av $(^NameDA).$\n$\nFør du fortsetter må du forsikre deg om at $(^NameDA) ikkje er opent.$\n$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisensavtale"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Les gjennom lisensavtalen før du startar installeringa av $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Trykk på «Godta» dersom du godtar betingelsane i avtala. Du må godta avtala for å installere $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Trykk på avkryssingsboksen nedanfor nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å installere $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Vel det første alternativet nedanfor dersom du godtek vilkåra i avtala. Du må godta avtala for å installera $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisensavtale"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Les gjennom lisensavtalen før du startar avinstalleringa av $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Trykk på «Godta» dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Trykk på avkryssingsboksen nedanfor nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Vel det første alternativet nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Trykk Page Down-knappen for å sjå resten av lisensavtala."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vel komponentar"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Vel kva delar av $(^NameDA) du ynskjer å installera."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskriving"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vel funksjonar"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Vel kva for funksjonar du vil avinstallera i $(^NameDA)."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musa over komponentene for å sjå beskrivinga."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musa over komponentene for å sjå beskrivinga."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vel installasjonsmappe"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vel kva mappe du vil installera $(^NameDA) i."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Vel avinstalleringplassering"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vel mappa du vil avinstallere $(^NameDA) frå."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installerer"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vent mens $(^NameDA) blir installert."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installeringa er fullført"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Installeringa vart fullført."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installeringa vart avbroten"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Installeringa vart ikkje fullført."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallerer"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vent medan $(^NameDA) vert avinstallert."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Avinstallering ferdig"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Avinstallering ble utført uten feil."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Avinstallering broten"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Avinstallering ble ikkje utført riktig."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Installering fullført"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er installert og klar til bruk.$\n$\nTrykk på «Fullfør» for å avslutte installeringa."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Du må starta datamaskinen på nytt for å fullføra installeringa av $(^NameDA). Vil du starta på nytt no?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Fullfører avinstalleringa av $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) er no avinstallert frå datamaskina di.$\n$\nTrykk på «Fullfør» for å avslutta denne vegvisaren."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Datamaskinen må starta på nytt for å fullføra avinstalleringa av $(^NameDA). Vil du starta datamaskina på nytt no?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Start på nytt no"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Eg vil starta på nytt seinare"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Køyr $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Syn lesmeg"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Fullfør"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vel mappe på startmenyen"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vel kva mappe snarvegane til $(^NameDA) skal liggja i."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vel mappa du vil oppretta snarvegane til programmet i. Du kan òg skriva inn eit nytt namn for å laga ei ny mappe."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ikkje opprett snarvegar"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Avinstaller $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Slett $(^NameDA) frå datamaskinen."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Er du viss på at du vil avslutta installeringa av $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Er du viss på at du vil avbryta avinstalleringa av $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Polish.nlf b/Contrib/Language files/Polish.nlf
index 3d79802..b62fafd 100755
--- a/Contrib/Language files/Polish.nlf
+++ b/Contrib/Language files/Polish.nlf
@@ -1,192 +1,192 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1045
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Piotr Murawski & Rafa³ Lampe <ppiter@skrzynka.pl> - www.lomsel.prv.pl
-# Updated by cube, kubad(at)poczta.onet.pl and SYSTEMsoft Group, http://www.systemsoft-group.com
-# Corrections by Marek Stepien <marcoos@aviary.pl> - http://www.aviary.pl/
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Instalator programu $(^Name)
-# ^UninstallCaption
-Deinstalator programu $(^Name)
-# ^LicenseSubCaption
-: Umowa licencyjna
-# ^ComponentsSubCaption
-: Opcje instalacji
-# ^DirSubCaption
-: Folder instalacyjny
-# ^InstallingSubCaption
-: Instalowanie plików
-# ^CompletedSubCaption
-: Zakoñczono
-# ^UnComponentsSubCaption
-: Opcje deinstalacji
-# ^UnDirSubCaption
-: Folder deinstalacyjny
-# ^ConfirmSubCaption
-: Potwierdzenie
-# ^UnDirSubCaption
-: Deinstalowanie plików
-# ^UnCompletedSubCaption
-: Zakoñczono
-# ^BackBtn
-< &Wstecz
-# ^NextBtn
-&Dalej >
-# ^AgreeBtn
-&Zgadzam siê
-# ^AcceptBtn
-&Akceptujê warunki umowy licencyjnej
-# ^DontAcceptBtn
-&Nie akceptujê warunków umowy licencyjnej
-# ^InstallBtn
-&Zainstaluj
-# ^UninstallBtn
-&Odinstaluj
-# ^CancelBtn
-&Anuluj
-# ^CloseBtn
-&Zamknij
-# ^BrowseBtn
-&Przegl¹daj...
-# ^ShowDetailsBtn
-Poka¿ &szczegó³y
-# ^ClickNext
-Kliknij Dalej, aby kontynuowaæ.
-# ^ClickInstall
-Kliknij Zainstaluj, aby rozpocz¹æ instalacjê.
-# ^ClickUninstall
-Kliknij Odinstaluj, aby rozpocz¹æ deinstalacjê.
-# ^Name
-Nazwa
-# ^Completed
-Zakoñczono
-# ^LicenseText
-Przed zainstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij Zgadzam siê.
-# ^LicenseTextCB
-Przed zainstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij pole wyboru poni¿ej. $_CLICK.
-# ^LicenseTextRB
-Przed zainstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, wybierz pierwsz¹ opcjê poni¿ej. $_CLICK.
-# ^UnLicenseText
-Przed odinstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij Zgadzam siê.
-# ^UnLicenseTextCB
-Przed odinstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij pole wyboru poni¿ej. $_CLICK.
-# ^UnLicenseTextRB
-Przed odinstalowaniem $(^NameDA) przeczytaj licencjê. Jeœli akceptujesz wszystkie warunki umowy, wybierz pierwsz¹ opcjê poni¿ej. $_CLICK.
-# ^Custom
-U¿ytkownika
-# ^ComponentsText
-Zaznacz komponenty, które chcesz zainstalowaæ i odznacz te, których nie chcesz zainstalowaæ. $_CLICK
-# ^ComponentsSubText1
-Wybierz typ instalacji:
-# ^ComponentsSubText2_NoInstTypes
-Wybierz komponenty do zainstalowania:
-# ^ComponentsSubText2
-Albo wybierz opcjonalne komponenty, które chcesz zainstalowaæ:
-# ^UnComponentsText
-Zaznacz komponenty, które chcesz odinstalowaæ, i odznacz te, których nie chcesz odinstalowaæ. $_CLICK
-# ^UnComponentsSubText1
-Wybierz typ deinstalacji:
-# ^UnComponentsSubText2_NoInstTypes
-Wybierz komponenty do odinstalowania:
-# ^UnComponentsSubText2
-Albo wybierz opcjonalne komponenty, które chcesz odinstalowaæ:
-# ^DirText
-Instalator zainstaluje program $(^NameDA) w nastêpuj¹cym folderze. Aby zainstalowaæ w innym folderze, kliknij Przegl¹daj i wybierz folder. $_CLICK
-# ^DirSubText
-Folder docelowy
-# ^DirBrowseText
-Wybierz folder instalacyjny $(^NameDA):
-# ^UnDirText
-Deinstalator usunie $(^NameDA) z nastêpuj¹cego folderu. Aby odinstalowaæ z innego folderu, kliknij Przegl¹daj i wybierz folder. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Wybierz folder, z którego zostanie odinstalowany program $(^NameDA):
-# ^SpaceAvailable
-Dostêpne miejsce:
-# ^SpaceRequired
-Wymagane miejsce:
-# ^UninstallingText
-Ten kreator odinstaluje $(^NameDA) z twojego komputera. $_CLICK
-# ^UninstallingSubText
-Deinstalacja z:
-# ^FileError
-B³¹d otwarcia pliku do zapisu: \r\n\t"$0"\r\nWybierz Anuluj, aby przerwaæ instalacjê,\r\nPonów, aby ponowiæ zapis do pliku lub\r\nIgnoruj, aby pomin¹æ ten plik
-# ^FileError_NoIgnore
-B³¹d otwarcia pliku do zapisu: \r\n\t"$0"\r\nWybierz Ponów, aby ponowiæ zapis do pliku lub\r\nAnuluj, aby przerwaæ instalacjê
-# ^CantWrite
-Nie mo¿na zapisaæ:
-# ^CopyFailed
-B³¹d kopiowania
-# ^CopyTo
-"Kopiuj do"
-# ^Registering
-"Rejestrowanie: "
-# ^Unregistering
-"Odrejestrowywanie:"
-# ^SymbolNotFound
-"Nie mo¿na odnaleŸæ symbolu: "
-# ^CouldNotLoad
-"Nie mo¿na wczytaæ: "
-#^CreateFolder
-"Utworzono folder: "
-# ^CreateShortcut
-"Utworzono skrót: "
-# ^CreatedUninstaller
-"Utworzono deinstalator: "
-# ^Delete
-"Usuñ plik: "
-# ^DeleteOnReboot
-"Usuñ przy ponownym uruchomieniu: "
-# ^ErrorCreatingShortcut
-"B³¹d tworzenia skrótu: "
-# ^ErrorCreating
-"B³¹d tworzenia: "
-# ^ErrorDecompressing
-B³¹d rozpakowywania danych! Uszkodzony instalator?
-# ^ErrorRegistering
-B³¹d rejestracji pliku DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Uruchom: "
-# ^Extract
-"Rozpakuj: "
-# ^ErrorWriting
-"Rozpakuj: b³¹d zapisu do pliku "
-# ^InvalidOpcode
-Instalator uszkodzony: nieprawid³owy kod operacji
-# ^NoOLE
-"Brak OLE dla: "
-# ^OutputFolder
-"Folder wyjœciowy: "
-# ^RemoveFolder
-"Usuñ folder: "
-# ^RenameOnReboot
-"Zmieñ nazwê przy ponownym uruchomieniu: "
-# ^Rename
-"Zmieñ nazwê: "
-# ^Skipped
-"Pominiête: "
-# ^CopyDetails
-Kopiuj szczegó³y do schowka
-# ^LogInstall
-Rejestruj przebieg instalacji
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1045
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Piotr Murawski & Rafa³ Lampe <ppiter@skrzynka.pl> - www.lomsel.prv.pl
+# Updated by cube, kubad(at)poczta.onet.pl and SYSTEMsoft Group, http://www.systemsoft-group.com
+# Corrections by Marek Stepien <marcoos@aviary.pl> - http://www.aviary.pl/
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Instalator programu $(^Name)
+# ^UninstallCaption
+Deinstalator programu $(^Name)
+# ^LicenseSubCaption
+: Umowa licencyjna
+# ^ComponentsSubCaption
+: Opcje instalacji
+# ^DirSubCaption
+: Folder instalacyjny
+# ^InstallingSubCaption
+: Instalowanie plików
+# ^CompletedSubCaption
+: Zakoñczono
+# ^UnComponentsSubCaption
+: Opcje deinstalacji
+# ^UnDirSubCaption
+: Folder deinstalacyjny
+# ^ConfirmSubCaption
+: Potwierdzenie
+# ^UnDirSubCaption
+: Deinstalowanie plików
+# ^UnCompletedSubCaption
+: Zakoñczono
+# ^BackBtn
+< &Wstecz
+# ^NextBtn
+&Dalej >
+# ^AgreeBtn
+&Zgadzam siê
+# ^AcceptBtn
+&Akceptujê warunki umowy licencyjnej
+# ^DontAcceptBtn
+&Nie akceptujê warunków umowy licencyjnej
+# ^InstallBtn
+&Zainstaluj
+# ^UninstallBtn
+&Odinstaluj
+# ^CancelBtn
+&Anuluj
+# ^CloseBtn
+&Zamknij
+# ^BrowseBtn
+&Przegl¹daj...
+# ^ShowDetailsBtn
+Poka¿ &szczegó³y
+# ^ClickNext
+Kliknij Dalej, aby kontynuowaæ.
+# ^ClickInstall
+Kliknij Zainstaluj, aby rozpocz¹æ instalacjê.
+# ^ClickUninstall
+Kliknij Odinstaluj, aby rozpocz¹æ deinstalacjê.
+# ^Name
+Nazwa
+# ^Completed
+Zakoñczono
+# ^LicenseText
+Przed zainstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij Zgadzam siê.
+# ^LicenseTextCB
+Przed zainstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij pole wyboru poni¿ej. $_CLICK.
+# ^LicenseTextRB
+Przed zainstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, wybierz pierwsz¹ opcjê poni¿ej. $_CLICK.
+# ^UnLicenseText
+Przed odinstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij Zgadzam siê.
+# ^UnLicenseTextCB
+Przed odinstalowaniem $(^NameDA) przeczytaj umowê licencyjn¹. Jeœli akceptujesz wszystkie warunki umowy, kliknij pole wyboru poni¿ej. $_CLICK.
+# ^UnLicenseTextRB
+Przed odinstalowaniem $(^NameDA) przeczytaj licencjê. Jeœli akceptujesz wszystkie warunki umowy, wybierz pierwsz¹ opcjê poni¿ej. $_CLICK.
+# ^Custom
+U¿ytkownika
+# ^ComponentsText
+Zaznacz komponenty, które chcesz zainstalowaæ i odznacz te, których nie chcesz zainstalowaæ. $_CLICK
+# ^ComponentsSubText1
+Wybierz typ instalacji:
+# ^ComponentsSubText2_NoInstTypes
+Wybierz komponenty do zainstalowania:
+# ^ComponentsSubText2
+Albo wybierz opcjonalne komponenty, które chcesz zainstalowaæ:
+# ^UnComponentsText
+Zaznacz komponenty, które chcesz odinstalowaæ, i odznacz te, których nie chcesz odinstalowaæ. $_CLICK
+# ^UnComponentsSubText1
+Wybierz typ deinstalacji:
+# ^UnComponentsSubText2_NoInstTypes
+Wybierz komponenty do odinstalowania:
+# ^UnComponentsSubText2
+Albo wybierz opcjonalne komponenty, które chcesz odinstalowaæ:
+# ^DirText
+Instalator zainstaluje program $(^NameDA) w nastêpuj¹cym folderze. Aby zainstalowaæ w innym folderze, kliknij Przegl¹daj i wybierz folder. $_CLICK
+# ^DirSubText
+Folder docelowy
+# ^DirBrowseText
+Wybierz folder instalacyjny $(^NameDA):
+# ^UnDirText
+Deinstalator usunie $(^NameDA) z nastêpuj¹cego folderu. Aby odinstalowaæ z innego folderu, kliknij Przegl¹daj i wybierz folder. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Wybierz folder, z którego zostanie odinstalowany program $(^NameDA):
+# ^SpaceAvailable
+Dostêpne miejsce:
+# ^SpaceRequired
+Wymagane miejsce:
+# ^UninstallingText
+Ten kreator odinstaluje $(^NameDA) z twojego komputera. $_CLICK
+# ^UninstallingSubText
+Deinstalacja z:
+# ^FileError
+B³¹d otwarcia pliku do zapisu: \r\n\t"$0"\r\nWybierz Anuluj, aby przerwaæ instalacjê,\r\nPonów, aby ponowiæ zapis do pliku lub\r\nIgnoruj, aby pomin¹æ ten plik
+# ^FileError_NoIgnore
+B³¹d otwarcia pliku do zapisu: \r\n\t"$0"\r\nWybierz Ponów, aby ponowiæ zapis do pliku lub\r\nAnuluj, aby przerwaæ instalacjê
+# ^CantWrite
+Nie mo¿na zapisaæ:
+# ^CopyFailed
+B³¹d kopiowania
+# ^CopyTo
+"Kopiuj do"
+# ^Registering
+"Rejestrowanie: "
+# ^Unregistering
+"Odrejestrowywanie:"
+# ^SymbolNotFound
+"Nie mo¿na odnaleŸæ symbolu: "
+# ^CouldNotLoad
+"Nie mo¿na wczytaæ: "
+#^CreateFolder
+"Utworzono folder: "
+# ^CreateShortcut
+"Utworzono skrót: "
+# ^CreatedUninstaller
+"Utworzono deinstalator: "
+# ^Delete
+"Usuñ plik: "
+# ^DeleteOnReboot
+"Usuñ przy ponownym uruchomieniu: "
+# ^ErrorCreatingShortcut
+"B³¹d tworzenia skrótu: "
+# ^ErrorCreating
+"B³¹d tworzenia: "
+# ^ErrorDecompressing
+B³¹d rozpakowywania danych! Uszkodzony instalator?
+# ^ErrorRegistering
+B³¹d rejestracji pliku DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Uruchom: "
+# ^Extract
+"Rozpakuj: "
+# ^ErrorWriting
+"Rozpakuj: b³¹d zapisu do pliku "
+# ^InvalidOpcode
+Instalator uszkodzony: nieprawid³owy kod operacji
+# ^NoOLE
+"Brak OLE dla: "
+# ^OutputFolder
+"Folder wyjœciowy: "
+# ^RemoveFolder
+"Usuñ folder: "
+# ^RenameOnReboot
+"Zmieñ nazwê przy ponownym uruchomieniu: "
+# ^Rename
+"Zmieñ nazwê: "
+# ^Skipped
+"Pominiête: "
+# ^CopyDetails
+Kopiuj szczegó³y do schowka
+# ^LogInstall
+Rejestruj przebieg instalacji
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Polish.nsh b/Contrib/Language files/Polish.nsh
index 008351c..bbbf47e 100755
--- a/Contrib/Language files/Polish.nsh
+++ b/Contrib/Language files/Polish.nsh
@@ -1,122 +1,122 @@
-;Language: Polish (1045)
-;By Piotr Murawski & Rafa³ Lampe; www.lomsel.prv.pl mailto:ppiter@skrzynka.pl
-;Updated by cube, kubad(at)poczta.onet.pl and SYSTEMsoft Group, http://www.systemsoft-group.com
-
-!insertmacro LANGFILE "Polish" "Polski"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Witamy w kreatorze instalacji programu $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ten kreator pomo¿e Ci zainstalowaæ program $(^NameDA).$\r$\n$\r$\nZalecane jest zamkniêcie wszystkich uruchomionych programów przed rozpoczêciem instalacji. To pozwoli na uaktualnienie niezbêdnych plików systemowych bez koniecznoœci ponownego uruchomienia komputera.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Witamy w kreatorze deinstalacji $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Kreator poprowadzi Ciê przez proces deinstalacji $(^NameDA).$\r$\n$\r$\nPrzed rozpoczêciem deinstalacji programu, upewnij siê, czy $(^NameDA) NIE jest w³aœnie uruchomiony.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Umowa licencyjna"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Przed instalacj¹ programu $(^NameDA) zapoznaj siê z warunkami licencji."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Je¿eli akceptujesz warunki umowy, wybierz Zgadzam siê, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby zainstalowaæ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Je¿eli akceptujesz warunki umowy, zaznacz pole wyboru poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby zainstalowaæ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Je¿eli akceptujesz warunki umowy, wybierz pierwsz¹ opcjê poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby zainstalowaæ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Umowa Licencyjna."
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Przed deinstalacj¹ programu $(^NameDA) zapoznaj siê z warunkami licencji."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Je¿eli akceptujesz warunki umowy, wybierz Zgadzam siê, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby odinstalowaæ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Je¿eli akceptujesz warunki umowy, zaznacz pole wyboru poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby odinstalowaæ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Je¿eli akceptujesz warunki umowy, wybierz pierwsz¹ opcjê poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby odinstalowaæ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Naciœnij klawisz Page Down, aby zobaczyæ resztê umowy."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Wybierz komponenty"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Wybierz komponenty programu $(^NameDA), które chcesz zainstalowaæ."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Wybierz komponenty"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Wybierz, które elementy $(^NameDA) chcesz odinstalowaæ."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Przesuñ kursor myszy nad komponent, aby zobaczyæ jego opis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Przesuñ kursor myszy nad komponent, aby zobaczyæ jego opis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Wybierz lokalizacjê dla instalacji"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Wybierz folder, w którym ma byæ zainstalowany $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Wybór miejsca deinstalacji"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Wybierz folder, z którego chcesz odinstalowaæ $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalacja"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Proszê czekaæ, podczas gdy $(^NameDA) jest instalowany."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Zakoñczono"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacja zakoñczona pomyœlnie."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalacja przerwana"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacja nie zosta³a zakoñczona pomyœlnie."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Deinstalowanie"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Proszê czekaæ, $(^NameDA) jest odinstalowywany."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Zakoñczono odinstalowanie"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinstalowanie zakoñczone pomyœlnie."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Deinstalacja przerwana"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Deinstalacja nie zosta³a zakoñczona pomyœlnie."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Koñczenie pracy kreatora instalacji $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) zosta³ pomyœlnie zainstalowany na Twoim komputerze.$\r$\n$\r$\nKliknij Zakoñcz, aby zakoñczyæ dzia³anie Kreatora."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Twój komputer musi zostaæ ponownie uruchomiony aby zakoñczyæ instalacjê programu $(^NameDA). Czy chcesz zrobiæ to teraz?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Koñczenie pracy kreatora deinstalacyjnego $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) zosta³ odinstalowany z Twojego komputera.$\r$\n$\r$\nKliknij Zakoñcz, aby zakoñczyæ dzia³anie Kreatora."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Twój komputer musi zostaæ ponownie uruchomiony w celu zakoñczenia deinstalacji programu $(^NameDA). Czy chcesz zrobiæ to teraz?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Uruchom ponownie teraz"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Sam uruchomiê ponownie komputer póŸniej"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Uruchom program $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Poka¿ plik ReadMe"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Zakoñcz"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Wybierz folder w menu Start"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Wybierz folder menu Start w którym zostan¹ umieszczone skróty do programu"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Wybierz folder w menu Start w którym chcia³byœ umieœciæ skróty do programu. Mo¿esz tak¿e utworzyæ nowy folder wpisuj¹c jego nazwê."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nie twórz skrótów"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinstaluj $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Usuñ $(^NameDA) z twojego komputera."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Czy na pewno chcesz zakoñczyæ dzia³anie instalatora $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Czy na pewno chcesz przerwaæ proces deinstalacji $(^Name)?"
-!endif
+;Language: Polish (1045)
+;By Piotr Murawski & Rafa³ Lampe; www.lomsel.prv.pl mailto:ppiter@skrzynka.pl
+;Updated by cube, kubad(at)poczta.onet.pl and SYSTEMsoft Group, http://www.systemsoft-group.com
+
+!insertmacro LANGFILE "Polish" "Polski"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Witamy w kreatorze instalacji programu $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ten kreator pomo¿e Ci zainstalowaæ program $(^NameDA).$\r$\n$\r$\nZalecane jest zamkniêcie wszystkich uruchomionych programów przed rozpoczêciem instalacji. To pozwoli na uaktualnienie niezbêdnych plików systemowych bez koniecznoœci ponownego uruchomienia komputera.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Witamy w kreatorze deinstalacji $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Kreator poprowadzi Ciê przez proces deinstalacji $(^NameDA).$\r$\n$\r$\nPrzed rozpoczêciem deinstalacji programu, upewnij siê, czy $(^NameDA) NIE jest w³aœnie uruchomiony.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Umowa licencyjna"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Przed instalacj¹ programu $(^NameDA) zapoznaj siê z warunkami licencji."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Je¿eli akceptujesz warunki umowy, wybierz Zgadzam siê, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby zainstalowaæ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Je¿eli akceptujesz warunki umowy, zaznacz pole wyboru poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby zainstalowaæ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Je¿eli akceptujesz warunki umowy, wybierz pierwsz¹ opcjê poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby zainstalowaæ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Umowa Licencyjna."
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Przed deinstalacj¹ programu $(^NameDA) zapoznaj siê z warunkami licencji."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Je¿eli akceptujesz warunki umowy, wybierz Zgadzam siê, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby odinstalowaæ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Je¿eli akceptujesz warunki umowy, zaznacz pole wyboru poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby odinstalowaæ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Je¿eli akceptujesz warunki umowy, wybierz pierwsz¹ opcjê poni¿ej, aby kontynuowaæ. Musisz zaakceptowaæ warunki umowy, aby odinstalowaæ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Naciœnij klawisz Page Down, aby zobaczyæ resztê umowy."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Wybierz komponenty"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Wybierz komponenty programu $(^NameDA), które chcesz zainstalowaæ."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Wybierz komponenty"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Wybierz, które elementy $(^NameDA) chcesz odinstalowaæ."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Przesuñ kursor myszy nad komponent, aby zobaczyæ jego opis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Przesuñ kursor myszy nad komponent, aby zobaczyæ jego opis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Wybierz lokalizacjê dla instalacji"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Wybierz folder, w którym ma byæ zainstalowany $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Wybór miejsca deinstalacji"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Wybierz folder, z którego chcesz odinstalowaæ $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalacja"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Proszê czekaæ, podczas gdy $(^NameDA) jest instalowany."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Zakoñczono"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacja zakoñczona pomyœlnie."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalacja przerwana"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacja nie zosta³a zakoñczona pomyœlnie."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Deinstalowanie"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Proszê czekaæ, $(^NameDA) jest odinstalowywany."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Zakoñczono odinstalowanie"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinstalowanie zakoñczone pomyœlnie."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Deinstalacja przerwana"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Deinstalacja nie zosta³a zakoñczona pomyœlnie."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Koñczenie pracy kreatora instalacji $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) zosta³ pomyœlnie zainstalowany na Twoim komputerze.$\r$\n$\r$\nKliknij Zakoñcz, aby zakoñczyæ dzia³anie Kreatora."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Twój komputer musi zostaæ ponownie uruchomiony aby zakoñczyæ instalacjê programu $(^NameDA). Czy chcesz zrobiæ to teraz?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Koñczenie pracy kreatora deinstalacyjnego $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) zosta³ odinstalowany z Twojego komputera.$\r$\n$\r$\nKliknij Zakoñcz, aby zakoñczyæ dzia³anie Kreatora."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Twój komputer musi zostaæ ponownie uruchomiony w celu zakoñczenia deinstalacji programu $(^NameDA). Czy chcesz zrobiæ to teraz?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Uruchom ponownie teraz"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Sam uruchomiê ponownie komputer póŸniej"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Uruchom program $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Poka¿ plik ReadMe"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Zakoñcz"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Wybierz folder w menu Start"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Wybierz folder menu Start w którym zostan¹ umieszczone skróty do programu"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Wybierz folder w menu Start w którym chcia³byœ umieœciæ skróty do programu. Mo¿esz tak¿e utworzyæ nowy folder wpisuj¹c jego nazwê."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nie twórz skrótów"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinstaluj $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Usuñ $(^NameDA) z twojego komputera."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Czy na pewno chcesz zakoñczyæ dzia³anie instalatora $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Czy na pewno chcesz przerwaæ proces deinstalacji $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Portuguese.nlf b/Contrib/Language files/Portuguese.nlf
index a34d297..8ccf71c 100755
--- a/Contrib/Language files/Portuguese.nlf
+++ b/Contrib/Language files/Portuguese.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-2070
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation v4.0.3 by DragonSoull <dragonsoull@madalien.tk> with help from Dre` - Updated by Ramon
-# ^Branding
-Sistema de Instalação Nullsoft %s
-# ^SetupCaption
-Instalação de $(^Name)
-# ^UninstallCaption
-Desinstalação de $(^Name)
-# ^LicenseSubCaption
-: Contrato de Licença
-# ^ComponentsSubCaption
-: Opções de instalação
-# ^DirSubCaption
-: Diretório de instalação
-# ^InstallingSubCaption
-: Instalando Ficheiros
-# ^CompletedSubCaption
-: Concluído
-# ^UnComponentsSubCaption
-: Opções de Desinstalação
-# ^UnDirSubCaption
-: Pasta de Desinstalação
-# ^ConfirmSubCaption
-: Confirmação
-# ^UninstallingSubCaption
-: Desinstalando
-# ^UnCompletedSubCaption
-: Concluído
-# ^BackBtn
-< &Anterior
-# ^NextBtn
-&Seguinte >
-# ^AgreeBtn
-&Aceito
-# ^AcceptBtn
-Eu &aceito os termos do Contrato de Licença
-# ^DontAcceptBtn
-Eu &não aceito os termos do Contrato de Licença
-# ^InstallBtn
-&Instalar
-# ^UninstallBtn
-&Desinstalar
-# ^CancelBtn
-Cancelar
-# ^CloseBtn
-&Fechar
-# ^BrowseBtn
-&Procurar...
-# ^ShowDetailsBtn
-Ver &Detalhes
-# ^ClickNext
-Clique em 'Seguinte' para continuar.
-# ^ClickInstall
-Clique em 'Instalar' para iniciar a instalação.
-# ^ClickUninstall
-Clique em 'Desinstalar' para iniciar a desinstalação.
-# ^Name
-Nome
-# ^Completed
-Concluído
-# ^LicenseText
-Por favor reveja o acordo de licensa antes de instalar $(^NameDA). Se concorda com todos os termos da licensa, clique em 'Aceito'.
-# ^LicenseTextCB
-Por favor reveja o acordo de licensa antes de instalar $(^NameDA). Se concorda com todos os termos da licensa, clique na caixa de seleção abaixo. $_CLICK
-# ^LicenseTextRB
-Por favor reveja o acordo de licensa antes de instalar $(^NameDA). Se concorda com todos os termos da licensa, escolha a primeira opção abaixo. $_CLICK
-# ^UnLicenseText
-Por favor reveja o acordo de licensa antes de desinstalar $(^NameDA). Se concorda com todos os termos da licensa, clique em 'Aceito'.
-# ^UnLicenseTextCB
-Por favor reveja o acordo de licensa antes de desinstalar $(^NameDA). Se concorda com todos os termos da licensa, clique na caixa de seleção abaixo. $_CLICK
-# ^UnLicenseTextRB
-Por favor reveja o acordo de licensa antes de desinstalar $(^NameDA). Se concorda com todos os termos da licensa, escolha a primeira opção abaixo. $_CLICK
-# ^Custom
-Personalizado
-# ^ComponentsText
-Marque os componentes que deseja instalar e desmarque os componentes que não deseja instalar. $_CLICK
-# ^ComponentsSubText1
-Escolha o tipo de instalação:
-# ^ComponentsSubText2_NoInstTypes
-Escolha os componentes para instalar:
-# ^ComponentsSubText2
-Ou, escolha os componentes opcionais que deseja instalar:
-# ^UnComponentsText
-Marque os componentes que queira desinstalar e vice versa. $_CLICK
-# ^UnComponentsSubText1
-Escolha o tipo de desinstalação:
-# ^UnComponentsSubText2_NoInstTypes
-Escolha os componentes para desinstalar:
-# ^UnComponentsSubText2
-Ou, escolha os componentes opcionais que queira desinstalar:
-# ^DirText
-O $(^NameDA) será instalado na seguinte pasta. Para instalar numa pasta diferente, clique em 'Procurar...' e escolha outra pasta. $_CLICK
-# ^DirSubText
-Pasta de Destino
-# ^DirBrowseText
-Escolha uma pasta para instalar o $(^NameDA):
-# ^UnDirText
-O $(^NameDA) será desinstalado da seguinte pasta. Para desinstalar de uma pasta diferente, clique em 'Procurar...' e escolha outra pasta. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Escolha uma pasta de onde será desinstalado o $(^NameDA):
-# ^SpaceAvailable
-"Espaço disponível: "
-# ^SpaceRequired
-"Espaço necessário: "
-# ^UninstallingText
-$(^NameDA) será desinstalado da seguinte pasta. $_CLICK
-# ^UninstallingSubText
-Desinstalando de:
-# ^FileError
-Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique em Abortar para abortar a instalação,\r\nRepetir para tentar novamente a escrita do ficheiro, ou\r\nIgnorar para ignorar este ficheiro.
-# ^FileError_NoIgnore
-Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique em Repetir para tentar novamente a gravação do ficheiro, ou\r\nCancelar para abortar a instalação.
-# ^CantWrite
-"Não foi possível escrever: "
-# ^CopyFailed
-Falha ao copiar
-# ^CopyTo
-"Copiar para "
-# ^Registering
-"Registando: "
-# ^Unregistering
-"Desregistando: "
-# ^SymbolNotFound
-"Símbolo não encontrado: "
-# ^CouldNotLoad
-"Não foi possível carregar: "
-# ^CreateFolder
-"Criando diretório: "
-# ^CreateShortcut
-"Criando atalho: "
-# ^CreatedUninstaller
-"Criando desinstalador: "
-# ^Delete
-"Apagando ficheiro: "
-# ^DeleteOnReboot
-"Apagar ao reiniciar: "
-# ^ErrorCreatingShortcut
-"Erro ao criar atalho: "
-# ^ErrorCreating
-"Erro ao criar: "
-# ^ErrorDecompressing
-Erro ao descomprimir dados! Instalador corrompido?
-# ^ErrorRegistering
-Erro ao registar DLL
-# ^ExecShell
-"Executando pelo Shell: "
-# ^Exec
-"Executando: "
-# ^Extract
-"Extraindo: "
-# ^ErrorWriting
-"Extraindo: erro ao escrever ficheiro "
-# ^InvalidOpcode
-Instalador corrompido: código de operação inválido
-# ^NoOLE
-"Sem OLE para: "
-# ^OutputFolder
-"Pasta de destino: "
-# ^RemoveFolder
-"Removendo pasta: "
-# ^RenameOnReboot
-"Renomear ao reiniciar: "
-# ^Rename
-"Renomeando: "
-# ^Skipped
-"Ignorado: "
-# ^CopyDetails
-Copiar detalhes para a Área de Transfêrencia
-# ^LogInstall
-Registar processo de instalação
-# ^Byte
-B
-# kilo
-K
-# mega
-M
-# giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+2070
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation v4.0.3 by DragonSoull <dragonsoull@madalien.tk> with help from Dre` - Updated by Ramon
+# ^Branding
+Sistema de Instalação Nullsoft %s
+# ^SetupCaption
+Instalação de $(^Name)
+# ^UninstallCaption
+Desinstalação de $(^Name)
+# ^LicenseSubCaption
+: Contrato de Licença
+# ^ComponentsSubCaption
+: Opções de instalação
+# ^DirSubCaption
+: Diretório de instalação
+# ^InstallingSubCaption
+: Instalando Ficheiros
+# ^CompletedSubCaption
+: Concluído
+# ^UnComponentsSubCaption
+: Opções de Desinstalação
+# ^UnDirSubCaption
+: Pasta de Desinstalação
+# ^ConfirmSubCaption
+: Confirmação
+# ^UninstallingSubCaption
+: Desinstalando
+# ^UnCompletedSubCaption
+: Concluído
+# ^BackBtn
+< &Anterior
+# ^NextBtn
+&Seguinte >
+# ^AgreeBtn
+&Aceito
+# ^AcceptBtn
+Eu &aceito os termos do Contrato de Licença
+# ^DontAcceptBtn
+Eu &não aceito os termos do Contrato de Licença
+# ^InstallBtn
+&Instalar
+# ^UninstallBtn
+&Desinstalar
+# ^CancelBtn
+Cancelar
+# ^CloseBtn
+&Fechar
+# ^BrowseBtn
+&Procurar...
+# ^ShowDetailsBtn
+Ver &Detalhes
+# ^ClickNext
+Clique em 'Seguinte' para continuar.
+# ^ClickInstall
+Clique em 'Instalar' para iniciar a instalação.
+# ^ClickUninstall
+Clique em 'Desinstalar' para iniciar a desinstalação.
+# ^Name
+Nome
+# ^Completed
+Concluído
+# ^LicenseText
+Por favor reveja o acordo de licensa antes de instalar $(^NameDA). Se concorda com todos os termos da licensa, clique em 'Aceito'.
+# ^LicenseTextCB
+Por favor reveja o acordo de licensa antes de instalar $(^NameDA). Se concorda com todos os termos da licensa, clique na caixa de seleção abaixo. $_CLICK
+# ^LicenseTextRB
+Por favor reveja o acordo de licensa antes de instalar $(^NameDA). Se concorda com todos os termos da licensa, escolha a primeira opção abaixo. $_CLICK
+# ^UnLicenseText
+Por favor reveja o acordo de licensa antes de desinstalar $(^NameDA). Se concorda com todos os termos da licensa, clique em 'Aceito'.
+# ^UnLicenseTextCB
+Por favor reveja o acordo de licensa antes de desinstalar $(^NameDA). Se concorda com todos os termos da licensa, clique na caixa de seleção abaixo. $_CLICK
+# ^UnLicenseTextRB
+Por favor reveja o acordo de licensa antes de desinstalar $(^NameDA). Se concorda com todos os termos da licensa, escolha a primeira opção abaixo. $_CLICK
+# ^Custom
+Personalizado
+# ^ComponentsText
+Marque os componentes que deseja instalar e desmarque os componentes que não deseja instalar. $_CLICK
+# ^ComponentsSubText1
+Escolha o tipo de instalação:
+# ^ComponentsSubText2_NoInstTypes
+Escolha os componentes para instalar:
+# ^ComponentsSubText2
+Ou, escolha os componentes opcionais que deseja instalar:
+# ^UnComponentsText
+Marque os componentes que queira desinstalar e vice versa. $_CLICK
+# ^UnComponentsSubText1
+Escolha o tipo de desinstalação:
+# ^UnComponentsSubText2_NoInstTypes
+Escolha os componentes para desinstalar:
+# ^UnComponentsSubText2
+Ou, escolha os componentes opcionais que queira desinstalar:
+# ^DirText
+O $(^NameDA) será instalado na seguinte pasta. Para instalar numa pasta diferente, clique em 'Procurar...' e escolha outra pasta. $_CLICK
+# ^DirSubText
+Pasta de Destino
+# ^DirBrowseText
+Escolha uma pasta para instalar o $(^NameDA):
+# ^UnDirText
+O $(^NameDA) será desinstalado da seguinte pasta. Para desinstalar de uma pasta diferente, clique em 'Procurar...' e escolha outra pasta. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Escolha uma pasta de onde será desinstalado o $(^NameDA):
+# ^SpaceAvailable
+"Espaço disponível: "
+# ^SpaceRequired
+"Espaço necessário: "
+# ^UninstallingText
+$(^NameDA) será desinstalado da seguinte pasta. $_CLICK
+# ^UninstallingSubText
+Desinstalando de:
+# ^FileError
+Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique em Abortar para abortar a instalação,\r\nRepetir para tentar novamente a escrita do ficheiro, ou\r\nIgnorar para ignorar este ficheiro.
+# ^FileError_NoIgnore
+Erro ao abrir ficheiro para escrita: \r\n\t"$0"\r\nClique em Repetir para tentar novamente a gravação do ficheiro, ou\r\nCancelar para abortar a instalação.
+# ^CantWrite
+"Não foi possível escrever: "
+# ^CopyFailed
+Falha ao copiar
+# ^CopyTo
+"Copiar para "
+# ^Registering
+"Registando: "
+# ^Unregistering
+"Desregistando: "
+# ^SymbolNotFound
+"Símbolo não encontrado: "
+# ^CouldNotLoad
+"Não foi possível carregar: "
+# ^CreateFolder
+"Criando diretório: "
+# ^CreateShortcut
+"Criando atalho: "
+# ^CreatedUninstaller
+"Criando desinstalador: "
+# ^Delete
+"Apagando ficheiro: "
+# ^DeleteOnReboot
+"Apagar ao reiniciar: "
+# ^ErrorCreatingShortcut
+"Erro ao criar atalho: "
+# ^ErrorCreating
+"Erro ao criar: "
+# ^ErrorDecompressing
+Erro ao descomprimir dados! Instalador corrompido?
+# ^ErrorRegistering
+Erro ao registar DLL
+# ^ExecShell
+"Executando pelo Shell: "
+# ^Exec
+"Executando: "
+# ^Extract
+"Extraindo: "
+# ^ErrorWriting
+"Extraindo: erro ao escrever ficheiro "
+# ^InvalidOpcode
+Instalador corrompido: código de operação inválido
+# ^NoOLE
+"Sem OLE para: "
+# ^OutputFolder
+"Pasta de destino: "
+# ^RemoveFolder
+"Removendo pasta: "
+# ^RenameOnReboot
+"Renomear ao reiniciar: "
+# ^Rename
+"Renomeando: "
+# ^Skipped
+"Ignorado: "
+# ^CopyDetails
+Copiar detalhes para a Área de Transfêrencia
+# ^LogInstall
+Registar processo de instalação
+# ^Byte
+B
+# kilo
+K
+# mega
+M
+# giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Portuguese.nsh b/Contrib/Language files/Portuguese.nsh
index 5637674..0406f05 100755
--- a/Contrib/Language files/Portuguese.nsh
+++ b/Contrib/Language files/Portuguese.nsh
@@ -1,121 +1,121 @@
-;Language: Portuguese (2070)
-;By Ramon <ramon@netcabo.pt>
-
-!insertmacro LANGFILE "Portuguese" "Português"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bem vindo ao Assistente de Instalação do $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este assistente ajudá-lo-á durante a instalação do $(^NameDA).$\r$\n$\r$\nÉ recomendado que feche todas as outras aplicações antes de iniciar a Instalação. Isto permitirá que o Instalador actualize ficheiros relacionados com o sistema sem necessidade de reiniciar o computador.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bem vindo ao Assistente de desinstalação do $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este assistente ajudá-lo-á durante a desinstalação do $(^NameDA).$\r$\n$\r$\nAntes de iniciar a desinstalação, certifique-se de que o $(^NameDA) não está em execução.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contrato de Licença"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de instalar o $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licença, clique em 'Aceito' para continuar. Deverá aceitar o contrato para instalar o $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licença, clique na caixa de seleção abaixo. Deverá aceitar o contrato para instalar o $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para instalar o $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contrato de Licença"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de desinstalar o $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licença, clique em 'Aceito' para continuar. Deverá aceitar o contrato para desinstalar o $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licença, clique na caixa de seleção abaixo. Deverá aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tecle Page Down para ver o restante da licença."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Escolha de Componentes"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Escolha quais as características do $(^NameDA) que deseja instalar."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrição"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Escolher Componentes"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Escolha quais as características do $(^NameDA) que deseja desinstalar."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre um componente para ver a sua descrição."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre um componente para ver a sua descrição."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Escolha do Local da Instalação"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Escolha a pasta na qual deseja instalar o $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Escolha o Local de desinstalação"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Escolha a pasta de onde pretende desinstalar o $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo instalado."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalação Completa"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A instalação foi concluída com sucesso."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalação Abortada"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A instalação não foi concluída com sucesso."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo desinstalado."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalação Completa"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "A desinstalação foi concluída com sucesso."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalação Abortada"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "A desinstalação não foi concluída com sucesso"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Concluindo o Assistente de Instalação do $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) foi instalado no seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "O seu computador deve ser reiniciado para concluír a instalação do $(^NameDA). Deseja reiniciar agora?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Concluíndo o assistente de desisntalação do $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) foi removido do seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "O seu computador deve ser reiniciado para concluír a desinstalação do $(^NameDA). Deseja reiniciar agora?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar Agora"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Eu quero reiniciar manualmente depois"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Executar $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Leiame"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Escolha uma Pasta do Menu Iniciar"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Escolha uma pasta do Menu Iniciar para os atalhos do programa."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Selecione uma pasta do Menu Iniciar em que deseja criar os atalhos do programa. Você pode também digitar um nome para criar uma nova pasta. "
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Não criar atalhos"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remover o $(^NameDA) do seu computador."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Deseja realmente cancelar a instalação do $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Deseja realmente cancelar a desinstalação do $(^Name)?"
-!endif
+;Language: Portuguese (2070)
+;By Ramon <ramon@netcabo.pt>
+
+!insertmacro LANGFILE "Portuguese" "Português"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bem vindo ao Assistente de Instalação do $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este assistente ajudá-lo-á durante a instalação do $(^NameDA).$\r$\n$\r$\nÉ recomendado que feche todas as outras aplicações antes de iniciar a Instalação. Isto permitirá que o Instalador actualize ficheiros relacionados com o sistema sem necessidade de reiniciar o computador.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bem vindo ao Assistente de desinstalação do $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este assistente ajudá-lo-á durante a desinstalação do $(^NameDA).$\r$\n$\r$\nAntes de iniciar a desinstalação, certifique-se de que o $(^NameDA) não está em execução.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contrato de Licença"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de instalar o $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licença, clique em 'Aceito' para continuar. Deverá aceitar o contrato para instalar o $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licença, clique na caixa de seleção abaixo. Deverá aceitar o contrato para instalar o $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para instalar o $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contrato de Licença"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de desinstalar o $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se aceitar os termos da licença, clique em 'Aceito' para continuar. Deverá aceitar o contrato para desinstalar o $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se aceitar os termos da licença, clique na caixa de seleção abaixo. Deverá aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tecle Page Down para ver o restante da licença."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Escolha de Componentes"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Escolha quais as características do $(^NameDA) que deseja instalar."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrição"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Escolher Componentes"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Escolha quais as características do $(^NameDA) que deseja desinstalar."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre um componente para ver a sua descrição."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Posicione o rato sobre um componente para ver a sua descrição."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Escolha do Local da Instalação"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Escolha a pasta na qual deseja instalar o $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Escolha o Local de desinstalação"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Escolha a pasta de onde pretende desinstalar o $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo instalado."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalação Completa"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A instalação foi concluída com sucesso."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalação Abortada"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A instalação não foi concluída com sucesso."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo desinstalado."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalação Completa"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "A desinstalação foi concluída com sucesso."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalação Abortada"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "A desinstalação não foi concluída com sucesso"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Concluindo o Assistente de Instalação do $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) foi instalado no seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "O seu computador deve ser reiniciado para concluír a instalação do $(^NameDA). Deseja reiniciar agora?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Concluíndo o assistente de desisntalação do $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) foi removido do seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "O seu computador deve ser reiniciado para concluír a desinstalação do $(^NameDA). Deseja reiniciar agora?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar Agora"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Eu quero reiniciar manualmente depois"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Executar $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Leiame"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Escolha uma Pasta do Menu Iniciar"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Escolha uma pasta do Menu Iniciar para os atalhos do programa."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Selecione uma pasta do Menu Iniciar em que deseja criar os atalhos do programa. Você pode também digitar um nome para criar uma nova pasta. "
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Não criar atalhos"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remover o $(^NameDA) do seu computador."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Deseja realmente cancelar a instalação do $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Deseja realmente cancelar a desinstalação do $(^Name)?"
+!endif
diff --git a/Contrib/Language files/PortugueseBR.nlf b/Contrib/Language files/PortugueseBR.nlf
index c1e7a51..1362ece 100755
--- a/Contrib/Language files/PortugueseBR.nlf
+++ b/Contrib/Language files/PortugueseBR.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1046
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Diego Marcos
-# Corrections by Jeferson Hultmann
-# ^Branding
-Sistema de instalação Nullsoft %s
-# ^SetupCaption
-Instalação do $(^Name)
-# ^UninstallCaption
-Desinstalação do $(^Name)
-# ^LicenseSubCaption
-: Acordo de licença
-# ^ComponentsSubCaption
-: Opções de instalação
-# ^DirSubCaption
-: Pasta de instalação
-# ^InstallingSubCaption
-: Instalando arquivos
-# ^CompletedSubCaption
-: Concluído
-# ^UnComponentsSubCaption
-: Opções de desinstalação
-# ^UnDirSubCaption
-: Pasta de desinstalação
-# ^ConfirmSubCaption
-: Confirmação
-# ^UninstallingSubCaption
-: Desinstalando
-# ^UnCompletedSubCaption
-: Concluído
-# ^BackBtn
-< &Voltar
-# ^NextBtn
-&Avançar >
-# ^AgreeBtn
-&Concordo
-# ^AcceptBtn
-&Eu aceito os termos do acordo de licença
-# ^DontAcceptBtn
-Eu &não aceito os termos do acordo de licença
-# ^InstallBtn
-&Instalar
-# ^UninstallBtn
-&Desinstalar
-# ^CancelBtn
-Cancelar
-# ^CloseBtn
-&Fechar
-# ^BrowseBtn
-&Procurar...
-# ^ShowDetailsBtn
-E&xibir detalhes
-# ^ClickNext
-Clique em "Avançar" para continuar.
-# ^ClickInstall
-Clique em "Instalar" para iniciar a instalação.
-# ^ClickUninstall
-Clique em "Desinstalar" para iniciar a desinstalação.
-# ^Name
-Nome
-# ^Completed
-Concluído
-# ^LicenseText
-Por favor, examine o acordo de licença antes de instalar o $(^NameDA). Se concordar com todos os termos da licença, clique em "Concordo".
-# ^LicenseTextCB
-Por favor, examine o acordo de licença antes de instalar o $(^NameDA). Se concordar com todos os termos da licença, clique na caixa de seleção abaixo. $_CLICK
-# ^LicenseTextRB
-Por favor, examine o acordo de licença antes de instalar o $(^NameDA). Se concordar com todos os termos da licença, escolha a primeira opção abaixo. $_CLICK
-# ^UnLicenseText
-Por favor, examine o acordo de licença antes de desinstalar o $(^NameDA). Se concordar com todos os termos da licença, clique em "Concordo".
-# ^UnLicenseTextCB
-Por favor, examine o acordo de licença antes de desinstalar o $(^NameDA). Se concordar com todos os termos da licença, clique na caixa de seleção abaixo. $_CLICK
-# ^UnLicenseTextRB
-Por favor, examine o acordo de licença antes de desinstalar o $(^NameDA). Se concordar com todos os termos da licença, escolha a primeira opção abaixo. $_CLICK
-# ^Custom
-Personalizado
-# ^ComponentsText
-Marque os componentes que deseja instalar e desmarque os que não deseja instalar. $_CLICK
-# ^ComponentsSubText1
-Selecione o tipo de instalação:
-# ^ComponentsSubText2_NoInstTypes
-Selecione os componentes para instalar:
-# ^ComponentsSubText2
-Ou selecione os componentes opcionais que deseja instalar:
-# ^UnComponentsText
-Marque os componentes que deseja desinstalar e desmarque os que não deseja desinstalar. $_CLICK
-# ^UnComponentsSubText1
-Selecione o tipo de desinstalação:
-# ^UnComponentsSubText2_NoInstTypes
-Selecione os componentes para desinstalar:
-# ^UnComponentsSubText2
-Ou selecione os componentes opcionais que gostaria de desinstalar:
-# ^DirText
-O $(^NameDA) será instalado nesta pasta. Para instalar em uma pasta diferente, clique em "Procurar..." e selecione outra pasta. $_CLICK
-# ^DirSubText
-Pasta de destino
-# ^DirBrowseText
-Selecione a pasta para instalar o $(^NameDA):
-# ^UnDirText
-O $(^NameDA) será desinstalado nesta pasta. Para desinstalar de uma pasta diferente, clique em "Procurar..." e selecione outra pasta. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Selecione a pasta de onde será desinstalado o $(^NameDA):
-# ^SpaceAvailable
-"Espaço disponível: "
-# ^SpaceRequired
-"Espaço necessário: "
-# ^UninstallingText
-O $(^NameDA) será desinstalado desta pasta: $_CLICK
-# ^UninstallingSubText
-Desinstalando de:
-# ^FileError
-Erro ao abrir arquivo para escrita: \r\n\t"$0"\r\nClique em Abortar para interromper a instalação,\r\nRepetir para tentar novamente a gravação do arquivo, ou\r\nIgnorar para passar para o próximo arquivo.
-# ^FileError_NoIgnore
-Erro ao abrir arquivo para escrita: \r\n\t"$0"\r\nClique em Repetir para tentar novamente a gravação do arquivo, ou\r\nCancelar para interromper a instalação.
-# ^CantWrite
-"Não foi possível escrever: "
-# ^CopyFailed
-Falha ao copiar
-# ^CopyTo
-"Copiar para "
-# ^Registering
-"Registrando: "
-# ^Unregistering
-"Desregistrando: "
-# ^SymbolNotFound
-"Não foi encontrado símbolo: "
-# ^CouldNotLoad
-"Não foi possível carregar: "
-# ^CreateFolder
-"Criando pasta: "
-# ^CreateShortcut
-"Criando atalho: "
-# ^CreatedUninstaller
-"Criando desinstalador: "
-# ^Delete
-"Excluindo arquivo: "
-# ^DeleteOnReboot
-"Excluir ao reiniciar: "
-# ^ErrorCreatingShortcut
-"Erro ao criar atalho: "
-# ^ErrorCreating
-"Erro ao criar: "
-# ^ErrorDecompressing
-Erro ao descompactar dados! Instalador corrompido?
-# ^ErrorRegistering
-Erro ao registar DLL
-# ^ExecShell
-"Executando pelo Shell: "
-# ^Exec
-"Executando: "
-# ^Extract
-"Extraindo: "
-# ^ErrorWriting
-"Extraindo: erro ao escrever arquivo "
-# ^InvalidOpcode
-Instalador corrompido: código de operação inválido
-# ^NoOLE
-"Sem OLE para: "
-# ^OutputFolder
-"Pasta de saída: "
-# ^RemoveFolder
-"Excluindo pasta: "
-# ^RenameOnReboot
-"Renomear ao reiniciar: "
-# ^Rename
-"Renomeando: "
-# ^Skipped
-"Ignorado: "
-# ^CopyDetails
-Copiar detalhes para a área de transfêrencia
-# ^LogInstall
-Registrar processo de instalação
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1046
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Diego Marcos
+# Corrections by Jeferson Hultmann
+# ^Branding
+Sistema de instalação Nullsoft %s
+# ^SetupCaption
+Instalação do $(^Name)
+# ^UninstallCaption
+Desinstalação do $(^Name)
+# ^LicenseSubCaption
+: Acordo de licença
+# ^ComponentsSubCaption
+: Opções de instalação
+# ^DirSubCaption
+: Pasta de instalação
+# ^InstallingSubCaption
+: Instalando arquivos
+# ^CompletedSubCaption
+: Concluído
+# ^UnComponentsSubCaption
+: Opções de desinstalação
+# ^UnDirSubCaption
+: Pasta de desinstalação
+# ^ConfirmSubCaption
+: Confirmação
+# ^UninstallingSubCaption
+: Desinstalando
+# ^UnCompletedSubCaption
+: Concluído
+# ^BackBtn
+< &Voltar
+# ^NextBtn
+&Avançar >
+# ^AgreeBtn
+&Concordo
+# ^AcceptBtn
+&Eu aceito os termos do acordo de licença
+# ^DontAcceptBtn
+Eu &não aceito os termos do acordo de licença
+# ^InstallBtn
+&Instalar
+# ^UninstallBtn
+&Desinstalar
+# ^CancelBtn
+Cancelar
+# ^CloseBtn
+&Fechar
+# ^BrowseBtn
+&Procurar...
+# ^ShowDetailsBtn
+E&xibir detalhes
+# ^ClickNext
+Clique em "Avançar" para continuar.
+# ^ClickInstall
+Clique em "Instalar" para iniciar a instalação.
+# ^ClickUninstall
+Clique em "Desinstalar" para iniciar a desinstalação.
+# ^Name
+Nome
+# ^Completed
+Concluído
+# ^LicenseText
+Por favor, examine o acordo de licença antes de instalar o $(^NameDA). Se concordar com todos os termos da licença, clique em "Concordo".
+# ^LicenseTextCB
+Por favor, examine o acordo de licença antes de instalar o $(^NameDA). Se concordar com todos os termos da licença, clique na caixa de seleção abaixo. $_CLICK
+# ^LicenseTextRB
+Por favor, examine o acordo de licença antes de instalar o $(^NameDA). Se concordar com todos os termos da licença, escolha a primeira opção abaixo. $_CLICK
+# ^UnLicenseText
+Por favor, examine o acordo de licença antes de desinstalar o $(^NameDA). Se concordar com todos os termos da licença, clique em "Concordo".
+# ^UnLicenseTextCB
+Por favor, examine o acordo de licença antes de desinstalar o $(^NameDA). Se concordar com todos os termos da licença, clique na caixa de seleção abaixo. $_CLICK
+# ^UnLicenseTextRB
+Por favor, examine o acordo de licença antes de desinstalar o $(^NameDA). Se concordar com todos os termos da licença, escolha a primeira opção abaixo. $_CLICK
+# ^Custom
+Personalizado
+# ^ComponentsText
+Marque os componentes que deseja instalar e desmarque os que não deseja instalar. $_CLICK
+# ^ComponentsSubText1
+Selecione o tipo de instalação:
+# ^ComponentsSubText2_NoInstTypes
+Selecione os componentes para instalar:
+# ^ComponentsSubText2
+Ou selecione os componentes opcionais que deseja instalar:
+# ^UnComponentsText
+Marque os componentes que deseja desinstalar e desmarque os que não deseja desinstalar. $_CLICK
+# ^UnComponentsSubText1
+Selecione o tipo de desinstalação:
+# ^UnComponentsSubText2_NoInstTypes
+Selecione os componentes para desinstalar:
+# ^UnComponentsSubText2
+Ou selecione os componentes opcionais que gostaria de desinstalar:
+# ^DirText
+O $(^NameDA) será instalado nesta pasta. Para instalar em uma pasta diferente, clique em "Procurar..." e selecione outra pasta. $_CLICK
+# ^DirSubText
+Pasta de destino
+# ^DirBrowseText
+Selecione a pasta para instalar o $(^NameDA):
+# ^UnDirText
+O $(^NameDA) será desinstalado nesta pasta. Para desinstalar de uma pasta diferente, clique em "Procurar..." e selecione outra pasta. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Selecione a pasta de onde será desinstalado o $(^NameDA):
+# ^SpaceAvailable
+"Espaço disponível: "
+# ^SpaceRequired
+"Espaço necessário: "
+# ^UninstallingText
+O $(^NameDA) será desinstalado desta pasta: $_CLICK
+# ^UninstallingSubText
+Desinstalando de:
+# ^FileError
+Erro ao abrir arquivo para escrita: \r\n\t"$0"\r\nClique em Abortar para interromper a instalação,\r\nRepetir para tentar novamente a gravação do arquivo, ou\r\nIgnorar para passar para o próximo arquivo.
+# ^FileError_NoIgnore
+Erro ao abrir arquivo para escrita: \r\n\t"$0"\r\nClique em Repetir para tentar novamente a gravação do arquivo, ou\r\nCancelar para interromper a instalação.
+# ^CantWrite
+"Não foi possível escrever: "
+# ^CopyFailed
+Falha ao copiar
+# ^CopyTo
+"Copiar para "
+# ^Registering
+"Registrando: "
+# ^Unregistering
+"Desregistrando: "
+# ^SymbolNotFound
+"Não foi encontrado símbolo: "
+# ^CouldNotLoad
+"Não foi possível carregar: "
+# ^CreateFolder
+"Criando pasta: "
+# ^CreateShortcut
+"Criando atalho: "
+# ^CreatedUninstaller
+"Criando desinstalador: "
+# ^Delete
+"Excluindo arquivo: "
+# ^DeleteOnReboot
+"Excluir ao reiniciar: "
+# ^ErrorCreatingShortcut
+"Erro ao criar atalho: "
+# ^ErrorCreating
+"Erro ao criar: "
+# ^ErrorDecompressing
+Erro ao descompactar dados! Instalador corrompido?
+# ^ErrorRegistering
+Erro ao registar DLL
+# ^ExecShell
+"Executando pelo Shell: "
+# ^Exec
+"Executando: "
+# ^Extract
+"Extraindo: "
+# ^ErrorWriting
+"Extraindo: erro ao escrever arquivo "
+# ^InvalidOpcode
+Instalador corrompido: código de operação inválido
+# ^NoOLE
+"Sem OLE para: "
+# ^OutputFolder
+"Pasta de saída: "
+# ^RemoveFolder
+"Excluindo pasta: "
+# ^RenameOnReboot
+"Renomear ao reiniciar: "
+# ^Rename
+"Renomeando: "
+# ^Skipped
+"Ignorado: "
+# ^CopyDetails
+Copiar detalhes para a área de transfêrencia
+# ^LogInstall
+Registrar processo de instalação
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/PortugueseBR.nsh b/Contrib/Language files/PortugueseBR.nsh
index 7ee989c..5d06aa3 100755
--- a/Contrib/Language files/PortugueseBR.nsh
+++ b/Contrib/Language files/PortugueseBR.nsh
@@ -1,121 +1,121 @@
-;Language: Brazilian Portuguese (1046)
-;By Diego Marcos <jump@osite.com.br>
-
-!insertmacro LANGFILE "PortugueseBR" "Português (do Brasil)"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bem-vindo ao Assistente de Instalação do $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este assistente o guiará durante a instalação do $(^NameDA).$\r$\n$\r$\nÉ recomendado que você feche todas as outras aplicações antes de iniciar a Instalação. Isto possibilitará fazer update dos arquivos do sistema sem reiniciar o computador.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bem-vindo ao Assistente de Desinstalação do $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este assistente o guiará durante a desinstalação do $(^NameDA).$\r$\n$\r$\nAntes de iniciar a desinstalação, tenha certeza que o $(^NameDA) não está sendo executado.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contrato de Licença"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de instalar o $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se você aceitar os termos da licença, clique em Concordo para continuar. Você deve aceitar o contrato para instalar o $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se você aceitar os termos da licença, clique na caixa de seleção abaixo. Você deve aceitar o contrato para instalar o $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se você aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para instalar o $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contrato de Licença"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de desinstalar o $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se você aceitar os termos da licença, clique em Concordo para continuar. Você deve aceitar o contrato para desinstalar o $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se você aceitar os termos da licença, clique na caixa de seleção abaixo. Você deve aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se você aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tecle Page Down para ver o restante da licença."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Escolha de Componentes"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Escolha quais características do $(^NameDA) que você deseja instalar."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrição"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Escolher Componentes"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Escolha quais qualidades do $(^NameDA) quer desinstalar."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passe o ponteiro do mouse sobre um componente para ver sua descrição."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passe o ponteiro do mouse sobre um componente para ver sua descrição."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Escolha do Local da Instalação"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Escolha a pasta na qual deseja instalar o $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Escolha do Local da Desinstalação"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Escolha a pasta na qual deseja desinstalar o $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo instalado."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalação Completada"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A instalação foi concluída com sucesso."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalação Abortada"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A instalação não foi concluída com sucesso."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo desinstalado."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalação Completada"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "A desinstalação foi concluída com sucesso."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalação Abortada"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "A desinstalação não foi concluída com sucesso"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Concluindo o Assistente de Instalação do $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) foi instalado no seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Seu computador deve ser reiniciado para concluír a instalação do $(^NameDA). Você quer reiniciar agora?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Concluindo o Assistente de Desinstalação do $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) foi desinstalado do seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Seu computador tem que ser reiniciado para completar a desinstalação do $(^NameDA). Quer reiniciar agora?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar Agora"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Eu quero reiniciar manualmente depois"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Executar $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Leiame"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Escolha uma Pasta do Menu Iniciar"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Escolha uma pasta do Menu Iniciar para os atalhos do programa."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Selecione uma pasta do Menu Iniciar em que deseja criar os atalhos do programa. Você pode também digitar um nome para criar uma nova pasta. "
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Não criar atalhos"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar o $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remover o $(^NameDA) do seu computador."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Você deseja realmente finalizar a instalação do $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Você deseja realmente finalizar a desinstalação do $(^Name)?"
-!endif
+;Language: Brazilian Portuguese (1046)
+;By Diego Marcos <jump@osite.com.br>
+
+!insertmacro LANGFILE "PortugueseBR" "Português (do Brasil)"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bem-vindo ao Assistente de Instalação do $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este assistente o guiará durante a instalação do $(^NameDA).$\r$\n$\r$\nÉ recomendado que você feche todas as outras aplicações antes de iniciar a Instalação. Isto possibilitará fazer update dos arquivos do sistema sem reiniciar o computador.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bem-vindo ao Assistente de Desinstalação do $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este assistente o guiará durante a desinstalação do $(^NameDA).$\r$\n$\r$\nAntes de iniciar a desinstalação, tenha certeza que o $(^NameDA) não está sendo executado.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contrato de Licença"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de instalar o $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Se você aceitar os termos da licença, clique em Concordo para continuar. Você deve aceitar o contrato para instalar o $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se você aceitar os termos da licença, clique na caixa de seleção abaixo. Você deve aceitar o contrato para instalar o $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se você aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para instalar o $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contrato de Licença"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor, verifique os termos da licença antes de desinstalar o $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Se você aceitar os termos da licença, clique em Concordo para continuar. Você deve aceitar o contrato para desinstalar o $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Se você aceitar os termos da licença, clique na caixa de seleção abaixo. Você deve aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Se você aceitar os termos da licença, selecione a primeira opção abaixo. Você deve aceitar o contrato para desinstalar o $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tecle Page Down para ver o restante da licença."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Escolha de Componentes"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Escolha quais características do $(^NameDA) que você deseja instalar."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descrição"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Escolher Componentes"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Escolha quais qualidades do $(^NameDA) quer desinstalar."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passe o ponteiro do mouse sobre um componente para ver sua descrição."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Passe o ponteiro do mouse sobre um componente para ver sua descrição."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Escolha do Local da Instalação"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Escolha a pasta na qual deseja instalar o $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Escolha do Local da Desinstalação"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Escolha a pasta na qual deseja desinstalar o $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo instalado."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalação Completada"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "A instalação foi concluída com sucesso."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalação Abortada"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "A instalação não foi concluída com sucesso."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor, aguarde enquanto o $(^NameDA) está sendo desinstalado."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalação Completada"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "A desinstalação foi concluída com sucesso."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalação Abortada"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "A desinstalação não foi concluída com sucesso"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Concluindo o Assistente de Instalação do $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) foi instalado no seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Seu computador deve ser reiniciado para concluír a instalação do $(^NameDA). Você quer reiniciar agora?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Concluindo o Assistente de Desinstalação do $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) foi desinstalado do seu computador.$\r$\n$\r$\nClique em Terminar para fechar este assistente."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Seu computador tem que ser reiniciado para completar a desinstalação do $(^NameDA). Quer reiniciar agora?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar Agora"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Eu quero reiniciar manualmente depois"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Executar $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Leiame"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Escolha uma Pasta do Menu Iniciar"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Escolha uma pasta do Menu Iniciar para os atalhos do programa."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Selecione uma pasta do Menu Iniciar em que deseja criar os atalhos do programa. Você pode também digitar um nome para criar uma nova pasta. "
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Não criar atalhos"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar o $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Remover o $(^NameDA) do seu computador."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Você deseja realmente finalizar a instalação do $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Você deseja realmente finalizar a desinstalação do $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Romanian.nlf b/Contrib/Language files/Romanian.nlf
index 9de66a1..74ad4b1 100755
--- a/Contrib/Language files/Romanian.nlf
+++ b/Contrib/Language files/Romanian.nlf
@@ -1,202 +1,202 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1048
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Cristian Pirvu (pcristip@yahoo.com) v6
-# Revision by Sorin Sbarnea (sorin@intersol.ro) v5.1
-# and Sorin Sbarnea INTERSOL SRL (sorin@intersol.ro) v4
-# New revision by George Radu (georadu@hotmail.com)
-# New revision by Iulian Dogariu (iulian@jayomega.net)
-# - Use Romanian letters ãâîºþ
-# - Use imperative forms on buttons
-# - Replace some neologisms
-# New revision by Vlad Rusu (vlad@bitattack.ro)
-# - "Rasfoieºte" replaced with "Alege" - more appropiate
-# - "Eliminã" related terms replaced with more appropiate "Dezinstaleazã"
-# - Fixed: Wrong translation in ^FileError and ^FileError_NoIgnore -> no translation
-# needed Abort/Retry/Ignore, as these are not translated into local language, OS related
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Instalare $(^Name)
-# ^UninstallCaption
-Dezinstalare $(^Name)
-# ^LicenseSubCaption
-: Contract de licenþã
-# ^ComponentsSubCaption
-: Opþiuni instalare
-# ^DirSubCaption
-: Directorul destinaþie
-# ^InstallingSubCaption
-: În curs de instalare
-# ^CompletedSubCaption
-: Instalare terminatã
-# ^UnComponentsSubCaption
-: Opþiuni dezinstalare
-# ^UnDirSubCaption
-: Directorul de dezinstalare
-# ^ConfirmSubCaption
-: Confirmã
-# ^UninstallingSubCaption
-: În curs de dezinstalare
-# ^UnCompletedSubCaption
-: Terminã
-# ^BackBtn
-< Îna&poi
-# ^NextBtn
-Îna&inte >
-# ^AgreeBtn
-&De acord
-# ^AcceptBtn
-&Accept termenii contractului de licenþã
-# ^DontAcceptBtn
-Nu accept termenii contractului de licenþã
-# ^InstallBtn
-&Instaleazã
-# ^UninstallBtn
-&Dezinstaleazã
-# ^CancelBtn
-&Renunþã
-# ^CloseBtn
-În&chide
-# ^BrowseBtn
-&Alege...
-# ^ShowDetailsBtn
-Aratã &detalii
-# ^ClickNext
-Apãsaþi Înainte pentru a continua.
-# ^ClickInstall
-Apãsaþi Instaleazã pentru a începe instalarea.
-# ^ClickUninstall
-Apãsaþi Dezinstaleazã pentru a începe dezinstalarea.
-# ^Name
-Nume
-# ^Completed
-Terminat
-# ^LicenseText
-Citiþi cu atenþie contractul de licenþã înainte de a instala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, apãsaþi butonul De acord.
-# ^LicenseTextCB
-Citiþi cu atenþie contractul de licenþã înainte de a instala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. $_CLICK
-# ^LicenseTextRB
-Citiþi cu atenþie contractul de licenþã înainte de a instala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. $_CLICK
-# ^UnLicenseText
-Citiþi cu atenþie contractul de licenþã înainte de a dezinstala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, apãsaþi butonul De acord.
-# ^UnLicenseTextCB
-Citiþi cu atenþie contractul de licenþã înainte de a dezinstala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. $_CLICK
-# ^UnLicenseTextRB
-Citiþi cu atenþie contractul de licenþã înainte de a dezinstala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. $_CLICK
-# ^Custom
-Personalizatã
-# ^ComponentsText
-Alegeþi componentele pe care doriþi sã le instalaþi. $_CLICK
-# ^ComponentsSubText1
-Alegeþi tipul instalãrii:
-# ^ComponentsSubText2_NoInstTypes
-Alegeþi componentele ce urmeazã a fi instalate:
-# ^ComponentsSubText2
-Sau, alegeþi componentele opþionale pe care doriþi sã le instalaþi:
-# ^UnComponentsText
-Alegeþi componentele pe care doriþi sã le dezinstalaþi. $_CLICK
-# ^UnComponentsSubText1
-Alegeþi tipul de dezinstalare:
-# ^UnComponentsSubText2_NoInstTypes
-Alegeþi componentele ce urmeazã a fi dezinstalate:
-# ^UnComponentsSubText2
-Sau, alegeþi componentele opþionale pe care doriþi sã le dezinstalaþi:
-# ^DirText
-$(^NameDA) se va instala în urmãtorul director. Pentru a alege altã destinaþie, apãsaþi Alege ºi alegeþi alt director. $_CLICK
-# ^DirSubText
-Director destinaþie
-# ^DirBrowseText
-Alegeþi directorul în care doriþi sã instalaþi $(^NameDA):
-# ^UnDirText
-$(^NameDA) se va dezinstala din urmãtorul director. Pentru a dezinstala din alt director, apãsaþi Alege ºi alegeþi alt director. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Alegeþi directorul de dezinstalare al $(^NameDA):
-# ^SpaceAvailable
-"Spaþiu disponibil: "
-# ^SpaceRequired
-"Spaþiu necesar: "
-# ^UninstallingText
-Aceastã aplicaþie va dezinstala $(^NameDA) din computerul Dv. $_CLICK
-# ^UninstallingSubText
-Dezinstalare din:
-# ^FileError
-Eroare la scrierea fiºierului: \r\n\t"$0"\r\nApãsaþi Abort pentru oprirea instalãrii,\r\nRetry pentru a mai încerca o datã scrierea fiºierului, \r\nIgnore pentru a trece peste acest fiºier.
-# ^FileError_NoIgnore
-Eroare la scrierea fiºierului: \r\n\t"$0"\r\nApãsaþi Retry pentru a mai încerca o datã, sau\r\nAbort pentru oprirea instalãrii.
-# ^CantWrite
-"Nu am putut scrie: "
-# ^CopyFailed
-Copierea a eºuat
-# ^CopyTo
-"Copiere în "
-# ^Registering
-"Se înregistreazã: "
-# ^Unregistering
-"Se dezînregistreazã din registru: "
-# ^SymbolNotFound
-"Simbolul nu a fost gãsit: "
-# ^CouldNotLoad
-"Nu am putut încãrca: "
-# ^CreateFolder
-"Creare director: "
-# ^CreateShortcut
-"Creare comandã rapidã: "
-# ^CreatedUninstaller
-"S-a creat aplicaþia de dezinstalare: "
-# ^Delete
-"ªtergere fiºier: "
-# ^DeleteOnReboot
-"ªtergere la repornire: "
-# ^ErrorCreatingShortcut
-"Eroare la crearea comenzii rapide: "
-# ^ErrorCreating
-"Eroare la creare: "
-# ^ErrorDecompressing
-Eroare la dezarhivarea datelor! Aplicatia de instalare este defectã?
-# ^ErrorRegistering
-Eroare la Înregistrarea DLL-ului
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Executare: "
-# ^Extract
-"Extragere: "
-# ^ErrorWriting
-"Extragere: eroare la scriere în fiºier "
-# ^InvalidOpcode
-Aplicaþie de instalare defectã: opcode incorect
-# ^NoOLE
-"Nu existã OLE pentru: "
-# ^OutputFolder
-"Directorul destinaþie: "
-# ^RemoveFolder
-"ªtergere destinaþie: "
-# ^RenameOnReboot
-"Redenumire la repornirea computerului: "
-# ^Rename
-"Redenumire: "
-# ^Skipped
-"Sãrite: "
-# ^CopyDetails
-Copiere detalii în clipboard
-# ^LogInstall
-Jurnal proces instalare
-# ^Byte
-O
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1048
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Cristian Pirvu (pcristip@yahoo.com) v6
+# Revision by Sorin Sbarnea (sorin@intersol.ro) v5.1
+# and Sorin Sbarnea INTERSOL SRL (sorin@intersol.ro) v4
+# New revision by George Radu (georadu@hotmail.com)
+# New revision by Iulian Dogariu (iulian@jayomega.net)
+# - Use Romanian letters ãâîºþ
+# - Use imperative forms on buttons
+# - Replace some neologisms
+# New revision by Vlad Rusu (vlad@bitattack.ro)
+# - "Rasfoieºte" replaced with "Alege" - more appropiate
+# - "Eliminã" related terms replaced with more appropiate "Dezinstaleazã"
+# - Fixed: Wrong translation in ^FileError and ^FileError_NoIgnore -> no translation
+# needed Abort/Retry/Ignore, as these are not translated into local language, OS related
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Instalare $(^Name)
+# ^UninstallCaption
+Dezinstalare $(^Name)
+# ^LicenseSubCaption
+: Contract de licenþã
+# ^ComponentsSubCaption
+: Opþiuni instalare
+# ^DirSubCaption
+: Directorul destinaþie
+# ^InstallingSubCaption
+: În curs de instalare
+# ^CompletedSubCaption
+: Instalare terminatã
+# ^UnComponentsSubCaption
+: Opþiuni dezinstalare
+# ^UnDirSubCaption
+: Directorul de dezinstalare
+# ^ConfirmSubCaption
+: Confirmã
+# ^UninstallingSubCaption
+: În curs de dezinstalare
+# ^UnCompletedSubCaption
+: Terminã
+# ^BackBtn
+< Îna&poi
+# ^NextBtn
+Îna&inte >
+# ^AgreeBtn
+&De acord
+# ^AcceptBtn
+&Accept termenii contractului de licenþã
+# ^DontAcceptBtn
+Nu accept termenii contractului de licenþã
+# ^InstallBtn
+&Instaleazã
+# ^UninstallBtn
+&Dezinstaleazã
+# ^CancelBtn
+&Renunþã
+# ^CloseBtn
+În&chide
+# ^BrowseBtn
+&Alege...
+# ^ShowDetailsBtn
+Aratã &detalii
+# ^ClickNext
+Apãsaþi Înainte pentru a continua.
+# ^ClickInstall
+Apãsaþi Instaleazã pentru a începe instalarea.
+# ^ClickUninstall
+Apãsaþi Dezinstaleazã pentru a începe dezinstalarea.
+# ^Name
+Nume
+# ^Completed
+Terminat
+# ^LicenseText
+Citiþi cu atenþie contractul de licenþã înainte de a instala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, apãsaþi butonul De acord.
+# ^LicenseTextCB
+Citiþi cu atenþie contractul de licenþã înainte de a instala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. $_CLICK
+# ^LicenseTextRB
+Citiþi cu atenþie contractul de licenþã înainte de a instala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. $_CLICK
+# ^UnLicenseText
+Citiþi cu atenþie contractul de licenþã înainte de a dezinstala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, apãsaþi butonul De acord.
+# ^UnLicenseTextCB
+Citiþi cu atenþie contractul de licenþã înainte de a dezinstala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. $_CLICK
+# ^UnLicenseTextRB
+Citiþi cu atenþie contractul de licenþã înainte de a dezinstala $(^NameDA). Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. $_CLICK
+# ^Custom
+Personalizatã
+# ^ComponentsText
+Alegeþi componentele pe care doriþi sã le instalaþi. $_CLICK
+# ^ComponentsSubText1
+Alegeþi tipul instalãrii:
+# ^ComponentsSubText2_NoInstTypes
+Alegeþi componentele ce urmeazã a fi instalate:
+# ^ComponentsSubText2
+Sau, alegeþi componentele opþionale pe care doriþi sã le instalaþi:
+# ^UnComponentsText
+Alegeþi componentele pe care doriþi sã le dezinstalaþi. $_CLICK
+# ^UnComponentsSubText1
+Alegeþi tipul de dezinstalare:
+# ^UnComponentsSubText2_NoInstTypes
+Alegeþi componentele ce urmeazã a fi dezinstalate:
+# ^UnComponentsSubText2
+Sau, alegeþi componentele opþionale pe care doriþi sã le dezinstalaþi:
+# ^DirText
+$(^NameDA) se va instala în urmãtorul director. Pentru a alege altã destinaþie, apãsaþi Alege ºi alegeþi alt director. $_CLICK
+# ^DirSubText
+Director destinaþie
+# ^DirBrowseText
+Alegeþi directorul în care doriþi sã instalaþi $(^NameDA):
+# ^UnDirText
+$(^NameDA) se va dezinstala din urmãtorul director. Pentru a dezinstala din alt director, apãsaþi Alege ºi alegeþi alt director. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Alegeþi directorul de dezinstalare al $(^NameDA):
+# ^SpaceAvailable
+"Spaþiu disponibil: "
+# ^SpaceRequired
+"Spaþiu necesar: "
+# ^UninstallingText
+Aceastã aplicaþie va dezinstala $(^NameDA) din computerul Dv. $_CLICK
+# ^UninstallingSubText
+Dezinstalare din:
+# ^FileError
+Eroare la scrierea fiºierului: \r\n\t"$0"\r\nApãsaþi Abort pentru oprirea instalãrii,\r\nRetry pentru a mai încerca o datã scrierea fiºierului, \r\nIgnore pentru a trece peste acest fiºier.
+# ^FileError_NoIgnore
+Eroare la scrierea fiºierului: \r\n\t"$0"\r\nApãsaþi Retry pentru a mai încerca o datã, sau\r\nAbort pentru oprirea instalãrii.
+# ^CantWrite
+"Nu am putut scrie: "
+# ^CopyFailed
+Copierea a eºuat
+# ^CopyTo
+"Copiere în "
+# ^Registering
+"Se înregistreazã: "
+# ^Unregistering
+"Se dezînregistreazã din registru: "
+# ^SymbolNotFound
+"Simbolul nu a fost gãsit: "
+# ^CouldNotLoad
+"Nu am putut încãrca: "
+# ^CreateFolder
+"Creare director: "
+# ^CreateShortcut
+"Creare comandã rapidã: "
+# ^CreatedUninstaller
+"S-a creat aplicaþia de dezinstalare: "
+# ^Delete
+"ªtergere fiºier: "
+# ^DeleteOnReboot
+"ªtergere la repornire: "
+# ^ErrorCreatingShortcut
+"Eroare la crearea comenzii rapide: "
+# ^ErrorCreating
+"Eroare la creare: "
+# ^ErrorDecompressing
+Eroare la dezarhivarea datelor! Aplicatia de instalare este defectã?
+# ^ErrorRegistering
+Eroare la Înregistrarea DLL-ului
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Executare: "
+# ^Extract
+"Extragere: "
+# ^ErrorWriting
+"Extragere: eroare la scriere în fiºier "
+# ^InvalidOpcode
+Aplicaþie de instalare defectã: opcode incorect
+# ^NoOLE
+"Nu existã OLE pentru: "
+# ^OutputFolder
+"Directorul destinaþie: "
+# ^RemoveFolder
+"ªtergere destinaþie: "
+# ^RenameOnReboot
+"Redenumire la repornirea computerului: "
+# ^Rename
+"Redenumire: "
+# ^Skipped
+"Sãrite: "
+# ^CopyDetails
+Copiere detalii în clipboard
+# ^LogInstall
+Jurnal proces instalare
+# ^Byte
+O
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Romanian.nsh b/Contrib/Language files/Romanian.nsh
index 12cb53d..2d218cd 100755
--- a/Contrib/Language files/Romanian.nsh
+++ b/Contrib/Language files/Romanian.nsh
@@ -1,130 +1,130 @@
-;Language: Romanian (1048)
-;Translated by Cristian Pirvu (pcristip@yahoo.com)
-;Updates by Sorin Sbarnea - INTERSOL SRL (sbarneasorin@intersol.ro) - ROBO Design (www.robodesign.ro)
-;New revision by George Radu (georadu@hotmail.com) http://mediatae.3x.ro
-;New revision by Vlad Rusu (vlad@bitattack.ro)
-; - Use Romanian letters ãâîºþ
-; - ".. produsului" removed as unnecessary
-; - "Eliminã" related terms replaced with more appropiate "Dezinstaleazã"
-; - Misc language tweaks
-!insertmacro LANGFILE "Romanian" "Romana"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bine aþi venit la instalarea $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Aceastã aplicaþie va instala $(^NameDA).$\r$\n$\r$\nEste recomandat sã închideþi toate aplicaþiile înainte de începerea procesului de instalare. Acest lucru vã poate asigura un proces de instalare fãrã erori sau situaþii neprevãzute.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bine aþi venit la dezinstalarea $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Aceastã aplicaþie va dezinstala $(^NameDA).$\r$\n$\r$\nEste recomandat sã închideþi toate aplicaþiile înainte de începerea procesului de dezinstalare. Acest lucru vã poate asigura un proces de dezinstalare fãrã erori sau situaþii neprevãzute.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_WELCOMEPAGE | MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminare"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contract de licenþã"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Citiþi cu atenþie termenii contractului de licenþã înainte de a instala $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Dacã acceptaþi termenii contractului de licenþã, apãsati De Acord. Pentru a instala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. Pentru a instala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. Pentru a instala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contract de licenþã"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Citiþi cu atenþie termenii contractului de licenþã înainte de a dezinstala $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Dacã acceptaþi termenii contractului de licenþã, apãsati De Acord. Pentru a dezinstala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. Pentru a dezinstala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. Pentru a dezinstala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Apãsaþi Page Down pentru a vizualiza restul contractului de licenþã."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selectare componente"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Selectaþi componentele $(^NameDA) pe care doriþi sã le instalaþi."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descriere"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selectare componente"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Selectaþi componentele $(^NameDA) pe care doriþi sã le dezinstalaþi."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Aºezaþi mouse-ul deasupra fiecãrei componente pentru a vizualiza descrierea acesteia."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Aºezaþi mouse-ul deasupra fiecãrei componente pentru a vizualiza descrierea acesteia."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Selectare director destinaþie"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Selectaþi directorul în care doriþi sã instalaþi $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Selectare director de dezinstalat"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Selectaþi directorul din care doriþi sã dezinstalaþi $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "În curs de instalare"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vã rugãm sã aºteptaþi, $(^NameDA) se instaleazã."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalare terminatã"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalarea s-a terminat cu succes."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalare anulatã"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalarea a fost anulatã de utilizator."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "În curs de dezinstalare"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vã rugãm sã aºteptaþi, $(^NameDA) se dezinstaleazã."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Dezinstalare terminatã"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Dezinstalarea s-a terminat cu succes."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Dezinstalare anulatã"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Dezinstalarea fost anulatã de utilizator."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Terminare instalare $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) a fost instalat.$\r$\n$\r$\nApãsaþi Terminare pentru a încheia instalarea."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Trebuie sã reporniþi calculatorul pentru a termina instalarea. Doriþi sã-l reporniþi acum?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Terminare dezinstalare $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) a fost dezinstalat.$\r$\n$\r$\nApãsaþi Terminare pentru a încheia dezinstalarea."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Trebuie sã reporniþi calculatorul pentru a termina dezinstalarea. Doriþi sã-l reporniþi acum?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reporneºte acum"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Repornesc eu mai târziu"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Executare $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Afiºare fiºier readme (citeºte-mã)."
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Selectare grup Meniul Start"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Selectaþi un grup in Meniul Start pentru a crea comenzi rapide pentru produs."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Selectaþi grupul din Meniul Start în care vor fi create comenzi rapide pentru produs. Puteþi de asemenea sã creaþi un grup nou."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nu doresc comenzi rapide"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Dezinstalare $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Dezinstalare $(^NameDA) din calculatorul dumneavoastrã."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Sunteþi sigur(ã) cã doriþi sã anulaþi instalarea $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sunteþi sigur(ã) cã doriþi sã anulaþi dezinstalarea $(^Name)?"
-!endif
+;Language: Romanian (1048)
+;Translated by Cristian Pirvu (pcristip@yahoo.com)
+;Updates by Sorin Sbarnea - INTERSOL SRL (sbarneasorin@intersol.ro) - ROBO Design (www.robodesign.ro)
+;New revision by George Radu (georadu@hotmail.com) http://mediatae.3x.ro
+;New revision by Vlad Rusu (vlad@bitattack.ro)
+; - Use Romanian letters ãâîºþ
+; - ".. produsului" removed as unnecessary
+; - "Eliminã" related terms replaced with more appropiate "Dezinstaleazã"
+; - Misc language tweaks
+!insertmacro LANGFILE "Romanian" "Romana"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bine aþi venit la instalarea $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Aceastã aplicaþie va instala $(^NameDA).$\r$\n$\r$\nEste recomandat sã închideþi toate aplicaþiile înainte de începerea procesului de instalare. Acest lucru vã poate asigura un proces de instalare fãrã erori sau situaþii neprevãzute.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bine aþi venit la dezinstalarea $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Aceastã aplicaþie va dezinstala $(^NameDA).$\r$\n$\r$\nEste recomandat sã închideþi toate aplicaþiile înainte de începerea procesului de dezinstalare. Acest lucru vã poate asigura un proces de dezinstalare fãrã erori sau situaþii neprevãzute.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_WELCOMEPAGE | MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminare"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Contract de licenþã"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Citiþi cu atenþie termenii contractului de licenþã înainte de a instala $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Dacã acceptaþi termenii contractului de licenþã, apãsati De Acord. Pentru a instala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. Pentru a instala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. Pentru a instala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Contract de licenþã"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Citiþi cu atenþie termenii contractului de licenþã înainte de a dezinstala $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Dacã acceptaþi termenii contractului de licenþã, apãsati De Acord. Pentru a dezinstala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Dacã acceptaþi termenii contractului de licenþã, bifaþi cãsuþa de mai jos. Pentru a dezinstala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Dacã acceptaþi termenii contractului de licenþã, selectaþi prima opþiune de mai jos. Pentru a dezinstala $(^NameDA) trebuie sã acceptaþi termenii din contractul de licenþã. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Apãsaþi Page Down pentru a vizualiza restul contractului de licenþã."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selectare componente"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Selectaþi componentele $(^NameDA) pe care doriþi sã le instalaþi."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descriere"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selectare componente"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Selectaþi componentele $(^NameDA) pe care doriþi sã le dezinstalaþi."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Aºezaþi mouse-ul deasupra fiecãrei componente pentru a vizualiza descrierea acesteia."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Aºezaþi mouse-ul deasupra fiecãrei componente pentru a vizualiza descrierea acesteia."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Selectare director destinaþie"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Selectaþi directorul în care doriþi sã instalaþi $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Selectare director de dezinstalat"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Selectaþi directorul din care doriþi sã dezinstalaþi $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "În curs de instalare"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Vã rugãm sã aºteptaþi, $(^NameDA) se instaleazã."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalare terminatã"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalarea s-a terminat cu succes."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalare anulatã"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalarea a fost anulatã de utilizator."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "În curs de dezinstalare"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vã rugãm sã aºteptaþi, $(^NameDA) se dezinstaleazã."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Dezinstalare terminatã"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Dezinstalarea s-a terminat cu succes."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Dezinstalare anulatã"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Dezinstalarea fost anulatã de utilizator."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Terminare instalare $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) a fost instalat.$\r$\n$\r$\nApãsaþi Terminare pentru a încheia instalarea."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Trebuie sã reporniþi calculatorul pentru a termina instalarea. Doriþi sã-l reporniþi acum?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Terminare dezinstalare $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) a fost dezinstalat.$\r$\n$\r$\nApãsaþi Terminare pentru a încheia dezinstalarea."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Trebuie sã reporniþi calculatorul pentru a termina dezinstalarea. Doriþi sã-l reporniþi acum?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reporneºte acum"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Repornesc eu mai târziu"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Executare $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Afiºare fiºier readme (citeºte-mã)."
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Selectare grup Meniul Start"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Selectaþi un grup in Meniul Start pentru a crea comenzi rapide pentru produs."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Selectaþi grupul din Meniul Start în care vor fi create comenzi rapide pentru produs. Puteþi de asemenea sã creaþi un grup nou."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nu doresc comenzi rapide"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Dezinstalare $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Dezinstalare $(^NameDA) din calculatorul dumneavoastrã."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Sunteþi sigur(ã) cã doriþi sã anulaþi instalarea $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sunteþi sigur(ã) cã doriþi sã anulaþi dezinstalarea $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Russian.nlf b/Contrib/Language files/Russian.nlf
index 6660997..2064bd1 100755
--- a/Contrib/Language files/Russian.nlf
+++ b/Contrib/Language files/Russian.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1049
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Timon [ timon@front.ru ] + 20030919
-# Translation updated by Dmitry Yerokhin [erodim@mail.ru] (050424)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Óñòàíîâêà $(^Name)
-# ^UninstallCaption
-Óäàëåíèå $(^Name)
-# ^LicenseSubCaption
-: Ëèöåíçèîííîå ñîãëàøåíèå
-# ^ComponentsSubCaption
-: Ïàðàìåòðû óñòàíîâêè
-# ^DirSubCaption
-: Ïàïêà óñòàíîâêè
-# ^InstallingSubCaption
-: Êîïèðîâàíèå ôàéëîâ
-# ^CompletedSubCaption
-: Îïåðàöèÿ çàâåðøåíà
-# ^UnComponentsSubCaption
-: Ïàðàìåòðû óäàëåíèÿ
-# ^UnDirSubCaption
-: Ïàïêà óäàëåíèÿ
-# ^ConfirmSubCaption
-: Ïîäòâåðæäåíèå
-# ^UninstallingSubCaption
-: Óäàëåíèå ôàéëîâ
-# ^UnCompletedSubCaption
-: Îïåðàöèÿ çàâåðøåíà
-# ^BackBtn
-< &Íàçàä
-# ^NextBtn
-&Äàëåå >
-# ^AgreeBtn
-Ïðèíèìà&þ
-# ^AcceptBtn
-ß &ïðèíèìàþ óñëîâèÿ ñîãëàøåíèÿ
-# ^DontAcceptBtn
-ß &íå ïðèíèìàþ óñëîâèÿ ñîãëàøåíèÿ
-# ^InstallBtn
-&Óñòàíîâèòü
-# ^UninstallBtn
-Óä&àëèòü
-# ^CancelBtn
-Îòìåíà
-# ^CloseBtn
-&Çàêðûòü
-# ^BrowseBtn
-Î&áçîð ...
-# ^ShowDetailsBtn
-&Äåòàëè...
-# ^ClickNext
-Íàæìèòå êíîïêó 'Äàëåå' äëÿ ïðîäîëæåíèÿ.
-# ^ClickInstall
-Íàæìèòå êíîïêó 'Óñòàíîâèòü', ÷òîáû óñòàíîâèòü ïðîãðàììó.
-# ^ClickUninstall
-Íàæìèòå êíîïêó 'Óäàëèòü', ÷òîáû óäàëèòü ïðîãðàììó.
-# ^Name
-Èìÿ
-# ^Completed
-Ãîòîâî
-# ^LicenseText
-Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó 'Ïðèíèìàþ'.
-# ^LicenseTextCB
-Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. $_CLICK
-# ^LicenseTextRB
-Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. $_CLICK
-# ^UnLicenseText
-Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó 'Ïðèíèìàþ'.
-# ^UnLicenseTextCB
-Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. $_CLICK
-# ^UnLicenseTextRB
-Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. $_CLICK
-# ^Custom
-Ïî âûáîðó
-# ^ComponentsText
-Âûáåðèòå êîìïîíåíòû ïðîãðàììû, êîòîðûå âû õîòèòå óñòàíîâèòü. $_CLICK
-# ^ComponentsSubText1
-Âûáåðèòå òèï óñòàíîâêè:
-# ^ComponentsSubText2_NoInstTypes
-Âûáåðèòå êîìïîíåíòû ïðîãðàììû äëÿ óñòàíîâêè:
-# ^ComponentsSubText2
-èëè âûáåðèòå äîïîëíèòåëüíûå êîìïîíåíòû äëÿ óñòàíîâêè:
-# ^UnComponentsText
-Âûáåðèòå êîìïîíåíòû, êîòîðûå âû õîòèòå óäàëèòü. $_CLICK
-# ^UnComponentsSubText1
-Âûáåðèòå òèï óäàëåíèÿ:
-# ^UnComponentsSubText2_NoInstTypes
-Âûáåðèòå êîìïîíåíòû äëÿ óäàëåíèÿ:
-# ^UnComponentsSubText2
-èëè âûáåðèòå äîïîëíèòåëüíûå êîìïîíåíòû äëÿ óäàëåíèÿ:
-# ^DirText
-Ïðîãðàììà óñòàíîâèò $(^NameDA) â óêàçàííóþ ïàïêó. ×òîáû óñòàíîâèòü ïðèëîæåíèå â äðóãóþ ïàïêó, íàæìèòå êíîïêó 'Îáçîð' è óêàæèòå åå. $_CLICK
-# ^DirSubText
-Ïàïêà óñòàíîâêè
-# ^DirBrowseText
-Óêàæèòå ïàïêó äëÿ óñòàíîâêè $(^NameDA):
-# ^UnDirText
-Ïðîãðàììà óäàëèò $(^NameDA) èç óêàçàííîé ïàïêè. ×òîáû âûïîëíèòü óäàëåíèå èç äðóãîé ïàïêè, íàæìèòå êíîïêó 'Îáçîð' è óêàæèòå åå. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Óêàæèòå ïàïêó, èç êîòîðîé íóæíî óäàëèòü $(^NameDA):
-# ^SpaceAvailable
-"Äîñòóïíî íà äèñêå: "
-# ^SpaceRequired
-"Òðåáóåòñÿ íà äèñêå: "
-# ^UninstallingText
-Ïðîãðàììà $(^NameDA) áóäåò óäàëåíà èç âàøåãî ÏÊ. $_CLICK
-# ^UninstallingSubText
-Óäàëåíèå èç:
-# ^FileError
-Íåâîçìîæíî îòêðûòü ôàéë äëÿ çàïèñè: \r\n\t"$0"\r\n'Ïðåðâàòü': îñòàíîâèòü óñòàíîâêó;\r\n"Ïîâòîð": ïîâòîðèòü ïîïûòêó;\r\n"Ïðîïóñê": ïðîïóñòèòü ýòî äåéñòâèå.
-# ^FileError_NoIgnore
-Íåâîçìîæíî îòêðûòü ôàéë äëÿ çàïèñè: \r\n\t"$0"\r\n'Ïîâòîð': ïîâòîðèòü ïîïûòêó;\r\n'Îòìåíà': ïðåðâàòü ïðîöåññ óñòàíîâêè.
-# ^CantWrite
-"Íåâîçìîæíî çàïèñàòü: "
-# ^CopyFailed
-Îøèáêà ïðè êîïèðîâàíèè
-# ^CopyTo
-"Êîïèðîâàíèå â "
-# ^Registering
-"Ðåãèñòðàöèÿ: "
-# ^Unregistering
-"Äå-ðåãèñòðàöèÿ: "
-# ^SymbolNotFound
-"Íåâîçìîæíî íàéòè ñèìâîë: "
-# ^CouldNotLoad
-"Íåâîçìîæíî çàãðóçèòü: "
-# ^CreateFolder
-"Ñîçäàíèå ïàïêè: "
-# ^CreateShortcut
-"Ñîçäàíèå ÿðëûêà: "
-# ^CreatedUninstaller
-"Ñîçäàíèå ïðîãðàììû óäàëåíèÿ: "
-# ^Delete
-"Óäàëåíèå ôàéëà: "
-# ^DeleteOnReboot
-"Óäàëåíèå ïðè ïåðåçàãðóçêå ÏÊ: "
-# ^ErrorCreatingShortcut
-"Îøèáêà ñîçäàíèÿ ÿðëûêà: "
-# ^ErrorCreating
-"Îøèáêà ñîçäàíèÿ: "
-# ^ErrorDecompressing
-Îøèáêà ðàñïàêîâêè äàííûõ! Âîçìîæíî, ïîâðåæä¸í äèñòðèáóòèâ.
-# ^ErrorRegistering
-Íåâîçìîæíî çàðåãèñòðèðîâàòü áèáëèîòåêó (DLL)
-# ^ExecShell
-"Âûïîëíåíèå êîìàíäû îáîëî÷êè: "
-# ^Exec
-"Âûïîëíåíèå: "
-# ^Extract
-"Èçâëå÷åíèå: "
-# ^ErrorWriting
-"Èçâëå÷åíèå: îøèáêà çàïèñè ôàéëà "
-# ^InvalidOpcode
-Äèñòðèáóòèâ ïîâðåæäåí: íåäîïóñòèìûé êîä
-# ^NoOLE
-"Íåò OLE äëÿ: "
-# ^OutputFolder
-"Ïàïêà óñòàíîâêè: "
-# ^RemoveFolder
-"Óäàëåíèå ïàïêè: "
-# ^RenameOnReboot
-"Ïåðåèìåíîâàíèå ïðè ïåðåçàãðóçêå ÏÊ: "
-# ^Rename
-"Ïåðåèìåíîâàíèå: "
-# ^Skipped
-"Ïðîïóñê: "
-# ^CopyDetails
-Êîïèðîâàòü ñâåäåíèÿ â áóôåð îáìåíà
-# ^LogInstall
-Âåñòè îò÷åò óñòàíîâêè
-# byte
-áàéò
-# kilo
- Ê
-# mega
- Ì
-# giga
+# Header, don't edit
+NLF v6
+# Language ID
+1049
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Timon [ timon@front.ru ] + 20030919
+# Translation updated by Dmitry Yerokhin [erodim@mail.ru] (050424)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Óñòàíîâêà $(^Name)
+# ^UninstallCaption
+Óäàëåíèå $(^Name)
+# ^LicenseSubCaption
+: Ëèöåíçèîííîå ñîãëàøåíèå
+# ^ComponentsSubCaption
+: Ïàðàìåòðû óñòàíîâêè
+# ^DirSubCaption
+: Ïàïêà óñòàíîâêè
+# ^InstallingSubCaption
+: Êîïèðîâàíèå ôàéëîâ
+# ^CompletedSubCaption
+: Îïåðàöèÿ çàâåðøåíà
+# ^UnComponentsSubCaption
+: Ïàðàìåòðû óäàëåíèÿ
+# ^UnDirSubCaption
+: Ïàïêà óäàëåíèÿ
+# ^ConfirmSubCaption
+: Ïîäòâåðæäåíèå
+# ^UninstallingSubCaption
+: Óäàëåíèå ôàéëîâ
+# ^UnCompletedSubCaption
+: Îïåðàöèÿ çàâåðøåíà
+# ^BackBtn
+< &Íàçàä
+# ^NextBtn
+&Äàëåå >
+# ^AgreeBtn
+Ïðèíèìà&þ
+# ^AcceptBtn
+ß &ïðèíèìàþ óñëîâèÿ ñîãëàøåíèÿ
+# ^DontAcceptBtn
+ß &íå ïðèíèìàþ óñëîâèÿ ñîãëàøåíèÿ
+# ^InstallBtn
+&Óñòàíîâèòü
+# ^UninstallBtn
+Óä&àëèòü
+# ^CancelBtn
+Îòìåíà
+# ^CloseBtn
+&Çàêðûòü
+# ^BrowseBtn
+Î&áçîð ...
+# ^ShowDetailsBtn
+&Äåòàëè...
+# ^ClickNext
+Íàæìèòå êíîïêó 'Äàëåå' äëÿ ïðîäîëæåíèÿ.
+# ^ClickInstall
+Íàæìèòå êíîïêó 'Óñòàíîâèòü', ÷òîáû óñòàíîâèòü ïðîãðàììó.
+# ^ClickUninstall
+Íàæìèòå êíîïêó 'Óäàëèòü', ÷òîáû óäàëèòü ïðîãðàììó.
+# ^Name
+Èìÿ
+# ^Completed
+Ãîòîâî
+# ^LicenseText
+Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó 'Ïðèíèìàþ'.
+# ^LicenseTextCB
+Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. $_CLICK
+# ^LicenseTextRB
+Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. $_CLICK
+# ^UnLicenseText
+Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó 'Ïðèíèìàþ'.
+# ^UnLicenseTextCB
+Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. $_CLICK
+# ^UnLicenseTextRB
+Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì. Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. $_CLICK
+# ^Custom
+Ïî âûáîðó
+# ^ComponentsText
+Âûáåðèòå êîìïîíåíòû ïðîãðàììû, êîòîðûå âû õîòèòå óñòàíîâèòü. $_CLICK
+# ^ComponentsSubText1
+Âûáåðèòå òèï óñòàíîâêè:
+# ^ComponentsSubText2_NoInstTypes
+Âûáåðèòå êîìïîíåíòû ïðîãðàììû äëÿ óñòàíîâêè:
+# ^ComponentsSubText2
+èëè âûáåðèòå äîïîëíèòåëüíûå êîìïîíåíòû äëÿ óñòàíîâêè:
+# ^UnComponentsText
+Âûáåðèòå êîìïîíåíòû, êîòîðûå âû õîòèòå óäàëèòü. $_CLICK
+# ^UnComponentsSubText1
+Âûáåðèòå òèï óäàëåíèÿ:
+# ^UnComponentsSubText2_NoInstTypes
+Âûáåðèòå êîìïîíåíòû äëÿ óäàëåíèÿ:
+# ^UnComponentsSubText2
+èëè âûáåðèòå äîïîëíèòåëüíûå êîìïîíåíòû äëÿ óäàëåíèÿ:
+# ^DirText
+Ïðîãðàììà óñòàíîâèò $(^NameDA) â óêàçàííóþ ïàïêó. ×òîáû óñòàíîâèòü ïðèëîæåíèå â äðóãóþ ïàïêó, íàæìèòå êíîïêó 'Îáçîð' è óêàæèòå åå. $_CLICK
+# ^DirSubText
+Ïàïêà óñòàíîâêè
+# ^DirBrowseText
+Óêàæèòå ïàïêó äëÿ óñòàíîâêè $(^NameDA):
+# ^UnDirText
+Ïðîãðàììà óäàëèò $(^NameDA) èç óêàçàííîé ïàïêè. ×òîáû âûïîëíèòü óäàëåíèå èç äðóãîé ïàïêè, íàæìèòå êíîïêó 'Îáçîð' è óêàæèòå åå. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Óêàæèòå ïàïêó, èç êîòîðîé íóæíî óäàëèòü $(^NameDA):
+# ^SpaceAvailable
+"Äîñòóïíî íà äèñêå: "
+# ^SpaceRequired
+"Òðåáóåòñÿ íà äèñêå: "
+# ^UninstallingText
+Ïðîãðàììà $(^NameDA) áóäåò óäàëåíà èç âàøåãî ÏÊ. $_CLICK
+# ^UninstallingSubText
+Óäàëåíèå èç:
+# ^FileError
+Íåâîçìîæíî îòêðûòü ôàéë äëÿ çàïèñè: \r\n\t"$0"\r\n'Ïðåðâàòü': îñòàíîâèòü óñòàíîâêó;\r\n"Ïîâòîð": ïîâòîðèòü ïîïûòêó;\r\n"Ïðîïóñê": ïðîïóñòèòü ýòî äåéñòâèå.
+# ^FileError_NoIgnore
+Íåâîçìîæíî îòêðûòü ôàéë äëÿ çàïèñè: \r\n\t"$0"\r\n'Ïîâòîð': ïîâòîðèòü ïîïûòêó;\r\n'Îòìåíà': ïðåðâàòü ïðîöåññ óñòàíîâêè.
+# ^CantWrite
+"Íåâîçìîæíî çàïèñàòü: "
+# ^CopyFailed
+Îøèáêà ïðè êîïèðîâàíèè
+# ^CopyTo
+"Êîïèðîâàíèå â "
+# ^Registering
+"Ðåãèñòðàöèÿ: "
+# ^Unregistering
+"Äå-ðåãèñòðàöèÿ: "
+# ^SymbolNotFound
+"Íåâîçìîæíî íàéòè ñèìâîë: "
+# ^CouldNotLoad
+"Íåâîçìîæíî çàãðóçèòü: "
+# ^CreateFolder
+"Ñîçäàíèå ïàïêè: "
+# ^CreateShortcut
+"Ñîçäàíèå ÿðëûêà: "
+# ^CreatedUninstaller
+"Ñîçäàíèå ïðîãðàììû óäàëåíèÿ: "
+# ^Delete
+"Óäàëåíèå ôàéëà: "
+# ^DeleteOnReboot
+"Óäàëåíèå ïðè ïåðåçàãðóçêå ÏÊ: "
+# ^ErrorCreatingShortcut
+"Îøèáêà ñîçäàíèÿ ÿðëûêà: "
+# ^ErrorCreating
+"Îøèáêà ñîçäàíèÿ: "
+# ^ErrorDecompressing
+Îøèáêà ðàñïàêîâêè äàííûõ! Âîçìîæíî, ïîâðåæä¸í äèñòðèáóòèâ.
+# ^ErrorRegistering
+Íåâîçìîæíî çàðåãèñòðèðîâàòü áèáëèîòåêó (DLL)
+# ^ExecShell
+"Âûïîëíåíèå êîìàíäû îáîëî÷êè: "
+# ^Exec
+"Âûïîëíåíèå: "
+# ^Extract
+"Èçâëå÷åíèå: "
+# ^ErrorWriting
+"Èçâëå÷åíèå: îøèáêà çàïèñè ôàéëà "
+# ^InvalidOpcode
+Äèñòðèáóòèâ ïîâðåæäåí: íåäîïóñòèìûé êîä
+# ^NoOLE
+"Íåò OLE äëÿ: "
+# ^OutputFolder
+"Ïàïêà óñòàíîâêè: "
+# ^RemoveFolder
+"Óäàëåíèå ïàïêè: "
+# ^RenameOnReboot
+"Ïåðåèìåíîâàíèå ïðè ïåðåçàãðóçêå ÏÊ: "
+# ^Rename
+"Ïåðåèìåíîâàíèå: "
+# ^Skipped
+"Ïðîïóñê: "
+# ^CopyDetails
+Êîïèðîâàòü ñâåäåíèÿ â áóôåð îáìåíà
+# ^LogInstall
+Âåñòè îò÷åò óñòàíîâêè
+# byte
+áàéò
+# kilo
+ Ê
+# mega
+ Ì
+# giga
à \ No newline at end of file
diff --git a/Contrib/Language files/Russian.nsh b/Contrib/Language files/Russian.nsh
index 3fcf738..9557c82 100755
--- a/Contrib/Language files/Russian.nsh
+++ b/Contrib/Language files/Russian.nsh
@@ -1,121 +1,121 @@
-;Language: Russian (1049)
-;Translation updated by Dmitry Yerokhin [erodim@mail.ru] (050424)
-
-!insertmacro LANGFILE "Russian" "Russian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Âàñ ïðèâåòñòâóåò ìàñòåð óñòàíîâêè $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ýòà ïðîãðàììà óñòàíîâèò $(^NameDA) íà âàø êîìïüþòåð.$\r$\n$\r$\nÏåðåä íà÷àëîì óñòàíîâêè ðåêîìåíäóåòñÿ çàêðûòü âñå ðàáîòàþùèå ïðèëîæåíèÿ. Ýòî ïîçâîëèò ïðîãðàììå óñòàíîâêè îáíîâèòü ñèñòåìíûå ôàéëû áåç ïåðåçàãðóçêè êîìïüþòåðà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Âàñ ïðèâåòñòâóåò ìàñòåð óäàëåíèÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ýòà ïðîãðàììà óäàëèò $(^NameDA) èç âàøåãî êîìïüþòåðà.$\r$\n$\r$\nÏåðåä íà÷àëîì óäàëåíèÿ óáåäèòåñü, ÷òî ïðîãðàììà $(^NameDA) íå çàïóùåíà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíçèîííîå ñîãëàøåíèå"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó $\"Ïðèíèìàþ$\". ×òîáû óñòàíîâèòü ïðîãðàììó, íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. ×òîáû óñòàíîâèòü ïðîãðàììó, íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. ×òîáû óñòàíîâèòü ïðîãðàììó, íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíçèîííîå ñîãëàøåíèå"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ïåðåä óäàëåíèåì $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó $\"Ïðèíèìàþ$\". Äëÿ óäàëåíèÿ íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. Äëÿ óäàëåíèÿ íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. Äëÿ óäàëåíèÿ íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Äëÿ ïåðåìåùåíèÿ ïî òåêñòó èñïîëüçóéòå êëàâèøè $\"PageUp$\" è $\"PageDown$\"."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Êîìïîíåíòû óñòàíàâëèâàåìîé ïðîãðàììû"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Âûáåðèòå êîìïîíåíòû $(^NameDA), êîòîðûå âû õîòèòå óñòàíîâèòü."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñàíèå"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Êîìïîíåíòû ïðîãðàììû"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Âûáåðèòå êîìïîíåíòû $(^NameDA), êîòîðûå âû õîòèòå óäàëèòü."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Íàâåäèòå êóðñîð ìûøè íà íàçâàíèå êîìïîíåíòà, ÷òîáû ïðî÷åñòü åãî îïèñàíèå."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Íàâåäèòå êóðñîð ìûøè íà íàçâàíèå êîìïîíåíòà, ÷òîáû ïðî÷åñòü åãî îïèñàíèå."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Âûáîð ïàïêè óñòàíîâêè"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Âûáåðèòå ïàïêó äëÿ óñòàíîâêè $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Âûáîð ïàïêè äëÿ óäàëåíèÿ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Óêàæèòå ïàïêó, èç êîòîðîé íóæíî óäàëèòü $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Êîïèðîâàíèå ôàéëîâ"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ïîäîæäèòå, èäåò êîïèðîâàíèå ôàéëîâ $(^NameDA)..."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Óñòàíîâêà çàâåðøåíà"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Óñòàíîâêà óñïåøíî çàâåðøåíà."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Óñòàíîâêà ïðåðâàíà"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Óñòàíîâêà íå çàâåðøåíà."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Óäàëåíèå"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ïîäîæäèòå, èäåò óäàëåíèå ôàéëîâ $(^NameDA)..."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Óäàëåíèå çàâåðøåíî"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Óäàëåíèå ïðîãðàììû óñïåøíî çàâåðøåíî."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Óäàëåíèå ïðåðâàíî"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Óäàëåíèå ïðîèçâåäåíî íå ïîëíîñòüþ."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâåðøåíèå ðàáîòû ìàñòåðà óñòàíîâêè $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Óñòàíîâêà $(^NameDA) âûïîëíåíà.$\r$\n$\r$\nÍàæìèòå êíîïêó $\"Ãîòîâî$\" äëÿ âûõîäà èç ïðîãðàììû óñòàíîâêè."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Äëÿ çàâåðøåíèÿ óñòàíîâêè $(^NameDA) íåîáõîäèìî ïåðåçàãðóçèòü êîìïüþòåð. Õîòèòå ñäåëàòü ýòî ñåé÷àñ?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâåðøåíèå ðàáîòû ìàñòåðà óäàëåíèÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðîãðàììà $(^NameDA) óäàëåíà èç âàøåãî êîìïüþòåðà.$\r$\n$\r$\nÍàæìèòå êíîïêó $\"Ãîòîâî$\"äëÿ âûõîäà èç ïðîãðàììû óäàëåíèÿ."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Äëÿ çàâåðøåíèÿ óäàëåíèÿ $(^NameDA) íóæíî ïåðåçàãðóçèòü êîìïüþòåð. Õîòèòå ñäåëàòü ýòî ñåé÷àñ?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Äà, ïåðåçàãðóçèòü ÏÊ ñåé÷àñ"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Íåò, ÿ ïåðåçàãðóæó ÏÊ ïîçæå"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Çàïóñòèòü $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ïîêàçàòü ôàéë ReadMe"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ãîòîâî"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Ïàïêà â ìåíþ $\"Ïóñê$\""
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Âûáåðèòå ïàïêó â ìåíþ $\"Ïóñê$\" äëÿ ðàçìåùåíèÿ ÿðëûêîâ ïðîãðàììû."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Âûáåðèòå ïàïêó â ìåíþ $\"Ïóñê$\", êóäà áóäóò ïîìåùåíû ÿðëûêè ïðîãðàììû. Âû òàêæå ìîæåòå ââåñòè äðóãîå èìÿ ïàïêè."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñîçäàâàòü ÿðëûêè"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Óäàëåíèå $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Óäàëåíèå $(^NameDA) èç êîìïüþòåðà."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Âû äåéñòâèòåëüíî õîòèòå îòìåíèòü óñòàíîâêó $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Âû äåéñòâèòåëüíî õîòèòå îòìåíèòü óäàëåíèå $(^Name)?"
-!endif
+;Language: Russian (1049)
+;Translation updated by Dmitry Yerokhin [erodim@mail.ru] (050424)
+
+!insertmacro LANGFILE "Russian" "Russian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Âàñ ïðèâåòñòâóåò ìàñòåð óñòàíîâêè $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ýòà ïðîãðàììà óñòàíîâèò $(^NameDA) íà âàø êîìïüþòåð.$\r$\n$\r$\nÏåðåä íà÷àëîì óñòàíîâêè ðåêîìåíäóåòñÿ çàêðûòü âñå ðàáîòàþùèå ïðèëîæåíèÿ. Ýòî ïîçâîëèò ïðîãðàììå óñòàíîâêè îáíîâèòü ñèñòåìíûå ôàéëû áåç ïåðåçàãðóçêè êîìïüþòåðà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Âàñ ïðèâåòñòâóåò ìàñòåð óäàëåíèÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ýòà ïðîãðàììà óäàëèò $(^NameDA) èç âàøåãî êîìïüþòåðà.$\r$\n$\r$\nÏåðåä íà÷àëîì óäàëåíèÿ óáåäèòåñü, ÷òî ïðîãðàììà $(^NameDA) íå çàïóùåíà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ëèöåíçèîííîå ñîãëàøåíèå"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ïåðåä óñòàíîâêîé $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó $\"Ïðèíèìàþ$\". ×òîáû óñòàíîâèòü ïðîãðàììó, íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. ×òîáû óñòàíîâèòü ïðîãðàììó, íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. ×òîáû óñòàíîâèòü ïðîãðàììó, íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ëèöåíçèîííîå ñîãëàøåíèå"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ïåðåä óäàëåíèåì $(^NameDA) îçíàêîìüòåñü ñ ëèöåíçèîííûì ñîãëàøåíèåì."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, íàæìèòå êíîïêó $\"Ïðèíèìàþ$\". Äëÿ óäàëåíèÿ íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, óñòàíîâèòå ôëàæîê íèæå. Äëÿ óäàëåíèÿ íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Åñëè âû ïðèíèìàåòå óñëîâèÿ ñîãëàøåíèÿ, âûáåðèòå ïåðâûé âàðèàíò èç ïðåäëîæåííûõ íèæå. Äëÿ óäàëåíèÿ íåîáõîäèìî ïðèíÿòü ñîãëàøåíèå. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Äëÿ ïåðåìåùåíèÿ ïî òåêñòó èñïîëüçóéòå êëàâèøè $\"PageUp$\" è $\"PageDown$\"."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Êîìïîíåíòû óñòàíàâëèâàåìîé ïðîãðàììû"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Âûáåðèòå êîìïîíåíòû $(^NameDA), êîòîðûå âû õîòèòå óñòàíîâèòü."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñàíèå"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Êîìïîíåíòû ïðîãðàììû"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Âûáåðèòå êîìïîíåíòû $(^NameDA), êîòîðûå âû õîòèòå óäàëèòü."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Íàâåäèòå êóðñîð ìûøè íà íàçâàíèå êîìïîíåíòà, ÷òîáû ïðî÷åñòü åãî îïèñàíèå."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Íàâåäèòå êóðñîð ìûøè íà íàçâàíèå êîìïîíåíòà, ÷òîáû ïðî÷åñòü åãî îïèñàíèå."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Âûáîð ïàïêè óñòàíîâêè"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Âûáåðèòå ïàïêó äëÿ óñòàíîâêè $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Âûáîð ïàïêè äëÿ óäàëåíèÿ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Óêàæèòå ïàïêó, èç êîòîðîé íóæíî óäàëèòü $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Êîïèðîâàíèå ôàéëîâ"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ïîäîæäèòå, èäåò êîïèðîâàíèå ôàéëîâ $(^NameDA)..."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Óñòàíîâêà çàâåðøåíà"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Óñòàíîâêà óñïåøíî çàâåðøåíà."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Óñòàíîâêà ïðåðâàíà"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Óñòàíîâêà íå çàâåðøåíà."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Óäàëåíèå"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ïîäîæäèòå, èäåò óäàëåíèå ôàéëîâ $(^NameDA)..."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Óäàëåíèå çàâåðøåíî"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Óäàëåíèå ïðîãðàììû óñïåøíî çàâåðøåíî."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Óäàëåíèå ïðåðâàíî"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Óäàëåíèå ïðîèçâåäåíî íå ïîëíîñòüþ."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâåðøåíèå ðàáîòû ìàñòåðà óñòàíîâêè $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Óñòàíîâêà $(^NameDA) âûïîëíåíà.$\r$\n$\r$\nÍàæìèòå êíîïêó $\"Ãîòîâî$\" äëÿ âûõîäà èç ïðîãðàììû óñòàíîâêè."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Äëÿ çàâåðøåíèÿ óñòàíîâêè $(^NameDA) íåîáõîäèìî ïåðåçàãðóçèòü êîìïüþòåð. Õîòèòå ñäåëàòü ýòî ñåé÷àñ?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâåðøåíèå ðàáîòû ìàñòåðà óäàëåíèÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðîãðàììà $(^NameDA) óäàëåíà èç âàøåãî êîìïüþòåðà.$\r$\n$\r$\nÍàæìèòå êíîïêó $\"Ãîòîâî$\"äëÿ âûõîäà èç ïðîãðàììû óäàëåíèÿ."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Äëÿ çàâåðøåíèÿ óäàëåíèÿ $(^NameDA) íóæíî ïåðåçàãðóçèòü êîìïüþòåð. Õîòèòå ñäåëàòü ýòî ñåé÷àñ?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Äà, ïåðåçàãðóçèòü ÏÊ ñåé÷àñ"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Íåò, ÿ ïåðåçàãðóæó ÏÊ ïîçæå"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Çàïóñòèòü $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ïîêàçàòü ôàéë ReadMe"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Ãîòîâî"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Ïàïêà â ìåíþ $\"Ïóñê$\""
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Âûáåðèòå ïàïêó â ìåíþ $\"Ïóñê$\" äëÿ ðàçìåùåíèÿ ÿðëûêîâ ïðîãðàììû."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Âûáåðèòå ïàïêó â ìåíþ $\"Ïóñê$\", êóäà áóäóò ïîìåùåíû ÿðëûêè ïðîãðàììû. Âû òàêæå ìîæåòå ââåñòè äðóãîå èìÿ ïàïêè."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñîçäàâàòü ÿðëûêè"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Óäàëåíèå $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Óäàëåíèå $(^NameDA) èç êîìïüþòåðà."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Âû äåéñòâèòåëüíî õîòèòå îòìåíèòü óñòàíîâêó $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Âû äåéñòâèòåëüíî õîòèòå îòìåíèòü óäàëåíèå $(^Name)?"
+!endif
diff --git a/Contrib/Language files/SConscript b/Contrib/Language files/SConscript
index 02613b9..bfb34d6 100755
--- a/Contrib/Language files/SConscript
+++ b/Contrib/Language files/SConscript
@@ -1,120 +1,120 @@
-languages = Split("""
- Albanian.nlf
- Afrikaans.nlf
- Arabic.nlf
- Basque.nlf
- Belarusian.nlf
- Bosnian.nlf
- Breton.nlf
- Bulgarian.nlf
- Catalan.nlf
- Croatian.nlf
- Czech.nlf
- Danish.nlf
- Dutch.nlf
- English.nlf
- Estonian.nlf
- Farsi.nlf
- Finnish.nlf
- French.nlf
- Galician.nlf
- German.nlf
- Greek.nlf
- Hebrew.nlf
- Hungarian.nlf
- Icelandic.nlf
- Indonesian.nlf
- Irish.nlf
- Italian.nlf
- Japanese.nlf
- Korean.nlf
- Kurdish.nlf
- Latvian.nlf
- Lithuanian.nlf
- Luxembourgish.nlf
- Macedonian.nlf
- Malay.nlf
- Mongolian.nlf
- Norwegian.nlf
- NorwegianNynorsk.nlf
- Polish.nlf
- Portuguese.nlf
- PortugueseBR.nlf
- Romanian.nlf
- Russian.nlf
- Serbian.nlf
- SerbianLatin.nlf
- SimpChinese.nlf
- Slovak.nlf
- Slovenian.nlf
- Spanish.nlf
- SpanishInternational.nlf
- Swedish.nlf
- Thai.nlf
- TradChinese.nlf
- Turkish.nlf
- Ukrainian.nlf
- Uzbek.nlf
- Welsh.nlf
- Albanian.nsh
- Afrikaans.nsh
- Arabic.nsh
- Basque.nsh
- Belarusian.nsh
- Bosnian.nsh
- Breton.nsh
- Bulgarian.nsh
- Catalan.nsh
- Croatian.nsh
- Czech.nsh
- Danish.nsh
- Dutch.nsh
- English.nsh
- Estonian.nsh
- Farsi.nsh
- Finnish.nsh
- French.nsh
- Galician.nsh
- German.nsh
- Greek.nsh
- Hebrew.nsh
- Hungarian.nsh
- Icelandic.nsh
- Indonesian.nsh
- Irish.nsh
- Italian.nsh
- Japanese.nsh
- Korean.nsh
- Kurdish.nsh
- Latvian.nsh
- Lithuanian.nsh
- Luxembourgish.nsh
- Macedonian.nsh
- Malay.nsh
- Mongolian.nsh
- Norwegian.nsh
- NorwegianNynorsk.nsh
- Polish.nsh
- Portuguese.nsh
- PortugueseBR.nsh
- Romanian.nsh
- Russian.nsh
- Serbian.nsh
- SerbianLatin.nsh
- SimpChinese.nsh
- Slovak.nsh
- Slovenian.nsh
- Spanish.nsh
- SpanishInternational.nsh
- Swedish.nsh
- Thai.nsh
- TradChinese.nsh
- Turkish.nsh
- Ukrainian.nsh
- Uzbek.nsh
- Welsh.nsh
-""")
-
-Import('defenv')
-
-defenv.DistributeContrib(languages, path='Language files')
+languages = Split("""
+ Albanian.nlf
+ Afrikaans.nlf
+ Arabic.nlf
+ Basque.nlf
+ Belarusian.nlf
+ Bosnian.nlf
+ Breton.nlf
+ Bulgarian.nlf
+ Catalan.nlf
+ Croatian.nlf
+ Czech.nlf
+ Danish.nlf
+ Dutch.nlf
+ English.nlf
+ Estonian.nlf
+ Farsi.nlf
+ Finnish.nlf
+ French.nlf
+ Galician.nlf
+ German.nlf
+ Greek.nlf
+ Hebrew.nlf
+ Hungarian.nlf
+ Icelandic.nlf
+ Indonesian.nlf
+ Irish.nlf
+ Italian.nlf
+ Japanese.nlf
+ Korean.nlf
+ Kurdish.nlf
+ Latvian.nlf
+ Lithuanian.nlf
+ Luxembourgish.nlf
+ Macedonian.nlf
+ Malay.nlf
+ Mongolian.nlf
+ Norwegian.nlf
+ NorwegianNynorsk.nlf
+ Polish.nlf
+ Portuguese.nlf
+ PortugueseBR.nlf
+ Romanian.nlf
+ Russian.nlf
+ Serbian.nlf
+ SerbianLatin.nlf
+ SimpChinese.nlf
+ Slovak.nlf
+ Slovenian.nlf
+ Spanish.nlf
+ SpanishInternational.nlf
+ Swedish.nlf
+ Thai.nlf
+ TradChinese.nlf
+ Turkish.nlf
+ Ukrainian.nlf
+ Uzbek.nlf
+ Welsh.nlf
+ Albanian.nsh
+ Afrikaans.nsh
+ Arabic.nsh
+ Basque.nsh
+ Belarusian.nsh
+ Bosnian.nsh
+ Breton.nsh
+ Bulgarian.nsh
+ Catalan.nsh
+ Croatian.nsh
+ Czech.nsh
+ Danish.nsh
+ Dutch.nsh
+ English.nsh
+ Estonian.nsh
+ Farsi.nsh
+ Finnish.nsh
+ French.nsh
+ Galician.nsh
+ German.nsh
+ Greek.nsh
+ Hebrew.nsh
+ Hungarian.nsh
+ Icelandic.nsh
+ Indonesian.nsh
+ Irish.nsh
+ Italian.nsh
+ Japanese.nsh
+ Korean.nsh
+ Kurdish.nsh
+ Latvian.nsh
+ Lithuanian.nsh
+ Luxembourgish.nsh
+ Macedonian.nsh
+ Malay.nsh
+ Mongolian.nsh
+ Norwegian.nsh
+ NorwegianNynorsk.nsh
+ Polish.nsh
+ Portuguese.nsh
+ PortugueseBR.nsh
+ Romanian.nsh
+ Russian.nsh
+ Serbian.nsh
+ SerbianLatin.nsh
+ SimpChinese.nsh
+ Slovak.nsh
+ Slovenian.nsh
+ Spanish.nsh
+ SpanishInternational.nsh
+ Swedish.nsh
+ Thai.nsh
+ TradChinese.nsh
+ Turkish.nsh
+ Ukrainian.nsh
+ Uzbek.nsh
+ Welsh.nsh
+""")
+
+Import('defenv')
+
+defenv.DistributeContrib(languages, path='Language files')
diff --git a/Contrib/Language files/Serbian.nlf b/Contrib/Language files/Serbian.nlf
index e8a90a2..8b68ebd 100755
--- a/Contrib/Language files/Serbian.nlf
+++ b/Contrib/Language files/Serbian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-3098
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Ñðàí Îáóžèíà <obucina@srpskijezik.edu.yu>
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Èíñòàëàöè¼à
-# ^UninstallCaption
-$(^Name) Äåèíñòàëàöè¼à
-# ^LicenseSubCaption
-: Äîãîâîð î ïðàâó êîðèøžåœà
-# ^ComponentsSubCaption
-: Îïöè¼å èíñòàëàöè¼å
-# ^DirSubCaption
-: Èçáîð ôîëäåðà çà èíñòàëàöè¼ó
-# ^InstallingSubCaption
-: Èíñòàëàöè¼à
-# ^CompletedSubCaption
-: Çàâðøåíà èíñòàëàöè¼à
-# ^UnComponentsSubCaption
-: Îïöè¼å äåèíñòàëàöè¼å
-# ^UnDirSubCaption
-: Èçáîð ôîëäåðà çà äåèíñòàëàöè¼ó
-# ^ConfirmSubCaption
-: Ïîòâðèâàœå
-# ^UninstallingSubCaption
-: Äåèíñòàëàöè¼à
-# ^UnCompletedSubCaption
-: Çàâðøåíà äåèíñòàëàöè¼à
-# ^BackBtn
-< Íàçàä
-# ^NextBtn
-Íàïðåä >
-# ^AgreeBtn
-Ïðèõâàòàì
-# ^AcceptBtn
-Ïðèõâàòàì óñëîâå äîãîâîðà î ïðàâó êîðèøžåœà
-# ^DontAcceptBtn
-Íå ïðèõâàòàì óñëîâå äîãîâîðà î ïðàâó êîðèøžåœà
-# ^InstallBtn
-Èíñòàëèðà¼
-# ^UninstallBtn
-Äåèíñòàëèðà¼
-# ^CancelBtn
-Îäóñòàíè
-# ^CloseBtn
-Çàòâîðè
-# ^BrowseBtn
-Èçáîð...
-# ^ShowDetailsBtn
-Äåòàšè
-# ^ClickNext
-Ïðèòèñíèòå äóãìå „Íàïðåä“ çà íàñòàâàê.
-# ^ClickInstall
-Ïðèòèñíèòå äóãìå „Èíñòàëèð༓ çà ïî÷åòàê èíñòàëàöè¼å.
-# ^ClickUninstall
-Ïðèòèñíèòå äóãìå „Äåèíñòàëèð༓ çà ïî÷åòàê äåèíñòàëàöè¼å.
-# ^Name
-Èìå
-# ^Completed
-Çàâðøåíî
-# ^LicenseText
-Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“.
-# ^LicenseTextCB
-Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. $_CLICK
-# ^LicenseTextRB
-Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. $_CLICK
-# ^UnLicenseText
-Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“.
-# ^UnLicenseTextCB
-Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. $_CLICK
-# ^UnLicenseTextRB
-Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. $_CLICK
-# ^Custom
-Ïðèëàãîàâàœå
-# ^ComponentsText
-Èçàáåðèòå êîìïîíåíòå çà èíñòàëàöè¼ó. Èíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå. $_CLICK
-# ^ComponentsSubText1
-Èçàáåðèòå òèï èíñòàëàöè¼å:
-# ^ComponentsSubText2_NoInstTypes
-Èçàáåðèòå êîìïîíåíòå çà èíñòàëàöè¼ó:
-# ^ComponentsSubText2
-Èëè, èçàáåðèòå îïöèîíå êîìïîíåíòå êî¼å æåëèòå äà èíñòàëèðàòå:
-# ^UnComponentsText
-Èçàáåðèòå êîìïîíåíòå çà äåèíñòàëàöè¼ó. Äåèíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå. $_CLICK
-# ^UnComponentsSubText1
-Èçàáåðèòå òèï äåèíñòàëàöè¼å:
-# ^UnComponentsSubText2_NoInstTypes
-Èçàáåðèòå êîìïîíåíòå çà äåèíñòàëàöè¼ó:
-# ^UnComponentsSubText2
-Èëè, èçàáåðèòå îïöèîíå êîìïîíåíòå êî¼å æåëèòå äà äåèíñòàëèðàòå:
-# ^DirText
-Ïðîãðàì $(^NameDA) žå áèòè èíñòàëèðàí ó íàâåäåíè ôîëäåð. Çà èíñòàëàöè¼ó ó äðóãè ôîëäåð ïðèòèñíèòå äóãìå „Èçáîð...“ è èçàáåðèòå ôîëäåð. $_CLICK
-# ^DirSubText
-Ôîëäåð
-# ^DirBrowseText
-Èçàáåðèòå ôîëäåð ó êî¼è žåòå èíñòàëèðàòè ïðîãðàì $(^NameDA):
-# ^UnDirText
-Ïðîãðàì $(^NameDA) žå áèòè äåèíñòàëèðàí èç íàâåäåíîã ôîëäåðà. Çà äåèíñòàëàöè¼ó èç äðóãîã ôîëäåðà ïðèòèñíèòå äóãìå „Èçáîð...“ è èçàáåðèòå ôîëäåð. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Èçàáåðèòå ôîëäåð èç êîãà žåòå äåèíñòàëèðàòè ïðîãðàì $(^NameDA):
-# ^SpaceAvailable
-"Ñëîáîäàí ïðîñòîð: "
-# ^SpaceRequired
-"Ïîòðåáàí ïðîñòîð: "
-# ^UninstallingText
-Ïðîãðàì $(^NameDA) žå áèòè äåèíñòàëèðàí èç íàâåäåíîã ôîëäåðà. $_CLICK
-# ^UninstallingSubText
-Äåèíñòàëàöè¼à èç:
-# ^FileError
-Ãðåøêà ïðè îòâàðàœó ôà¼ëà çà ïèñàœå: \r\n\t"$0"\r\nÏðèòèñíèòå äóãìå „Îäóñòàíè“ çà ïðåêèä èíñòàëàöè¼å,\r\n„Ïîíîâè“ çà ïîíîâíè ïîêóø༠ïèñàœà ó ôà¼ë, èëè\r\n„Èãíîðèøè“ çà ïðåñêàêàœå îâîã ôà¼ëà.
-# ^FileError_NoIgnore
-Ãðåøêà ïðè îòâàðàœó ôà¼ëà çà ïèñàœå: \r\n\t"$0"\r\nÏðèòèñíèòå äóãìå „Ïîíîâè“ çà ïîíîâíè ïîêóø༠ïèñàœà ó ôà¼ë, èëè\r\n„Îäóñòàíè“ çà ïðåêèä èíñòàëèðàœà.
-# ^CantWrite
-"Íåìîãóžå ïèñàœå: "
-# ^CopyFailed
-Íåóñïåøíî êîïèðàœå
-# ^CopyTo
-"Êîïèðàœå ó "
-# ^Registering
-"Ðåãèñòðîâàœå: "
-# ^Unregistering
-"Äåðåãèñòðîâàœå: "
-# ^SymbolNotFound
-"Ñèìáîë íè¼å íàåí: "
-# ^CouldNotLoad
-"Íåìîãóžå ó÷èòàâàœå: "
-# ^CreateFolder
-"Êðåèðàœå ôîëäåðà: "
-# ^CreateShortcut
-"Êðåèðàœå ïðå÷èöå: "
-# ^CreatedUninstaller
-"Êðåèðàœå äåèíñòàëåðà: "
-# ^Delete
-"Áðèñàœå ôà¼ëà: "
-# ^DeleteOnReboot
-"Áðèñàœå ïðè ðåñòàðòó: "
-# ^ErrorCreatingShortcut
-"Ãðåøêà ïðè êðåèðàœó ïðå÷èöå: "
-# ^ErrorCreating
-"Ãðåøêà ïðè êðåèðàœó: "
-# ^ErrorDecompressing
-Ãðåøêà ïðè îòïàêèâàœó ïîäàòàêà! Îøòåžåí èíñòàëàöèîíè ïðîãðàì?
-# ^ErrorRegistering
-Ãðåøêà ïðè ðåãèñòðîâàœó áèáëèîòåêå
-# ^ExecShell
-"Èçâðøàâàœå ó îêðóæåœó: "
-# ^Exec
-"Èçâðøàâàœå: "
-# ^Extract
-"Îòïàêèâàœå: "
-# ^ErrorWriting
-"Îòïàêèâàœå: ãðåøêà ïðè óïèñó ó ôà¼ë "
-# ^InvalidOpcode
-Îøòåžåí èíñòàëàöèîíè ïðîãðàì: íåèñïðàâíà êîìàíäà
-# ^NoOLE
-"Íåìà OLE ïîäðøêå çà: "
-# ^OutputFolder
-"Èçëàçíè ôîëäåð: "
-# ^RemoveFolder
-"Áðèñàœå ôîëäåðà: "
-# ^RenameOnReboot
-"Ïðåèìåíîâàœå ïðè ðåñòàðòîâàœó: "
-# ^Rename
-"Ïðåèìåíîâàí: "
-# ^Skipped
-"Ïðåñêî÷åí: "
-# ^CopyDetails
-Êîïèð༠äåòàšå ó êëèïáîðä
-# ^LogInstall
-Âîäè çàïèñíèê î ïðîöåñó èíñòàëàöè¼å
-# ^Byte
-B
-# ^Kilo
-k
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+3098
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Ñðàí Îáóžèíà <obucina@srpskijezik.edu.yu>
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Èíñòàëàöè¼à
+# ^UninstallCaption
+$(^Name) Äåèíñòàëàöè¼à
+# ^LicenseSubCaption
+: Äîãîâîð î ïðàâó êîðèøžåœà
+# ^ComponentsSubCaption
+: Îïöè¼å èíñòàëàöè¼å
+# ^DirSubCaption
+: Èçáîð ôîëäåðà çà èíñòàëàöè¼ó
+# ^InstallingSubCaption
+: Èíñòàëàöè¼à
+# ^CompletedSubCaption
+: Çàâðøåíà èíñòàëàöè¼à
+# ^UnComponentsSubCaption
+: Îïöè¼å äåèíñòàëàöè¼å
+# ^UnDirSubCaption
+: Èçáîð ôîëäåðà çà äåèíñòàëàöè¼ó
+# ^ConfirmSubCaption
+: Ïîòâðèâàœå
+# ^UninstallingSubCaption
+: Äåèíñòàëàöè¼à
+# ^UnCompletedSubCaption
+: Çàâðøåíà äåèíñòàëàöè¼à
+# ^BackBtn
+< Íàçàä
+# ^NextBtn
+Íàïðåä >
+# ^AgreeBtn
+Ïðèõâàòàì
+# ^AcceptBtn
+Ïðèõâàòàì óñëîâå äîãîâîðà î ïðàâó êîðèøžåœà
+# ^DontAcceptBtn
+Íå ïðèõâàòàì óñëîâå äîãîâîðà î ïðàâó êîðèøžåœà
+# ^InstallBtn
+Èíñòàëèðà¼
+# ^UninstallBtn
+Äåèíñòàëèðà¼
+# ^CancelBtn
+Îäóñòàíè
+# ^CloseBtn
+Çàòâîðè
+# ^BrowseBtn
+Èçáîð...
+# ^ShowDetailsBtn
+Äåòàšè
+# ^ClickNext
+Ïðèòèñíèòå äóãìå „Íàïðåä“ çà íàñòàâàê.
+# ^ClickInstall
+Ïðèòèñíèòå äóãìå „Èíñòàëèð༓ çà ïî÷åòàê èíñòàëàöè¼å.
+# ^ClickUninstall
+Ïðèòèñíèòå äóãìå „Äåèíñòàëèð༓ çà ïî÷åòàê äåèíñòàëàöè¼å.
+# ^Name
+Èìå
+# ^Completed
+Çàâðøåíî
+# ^LicenseText
+Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“.
+# ^LicenseTextCB
+Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. $_CLICK
+# ^LicenseTextRB
+Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. $_CLICK
+# ^UnLicenseText
+Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“.
+# ^UnLicenseTextCB
+Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. $_CLICK
+# ^UnLicenseTextRB
+Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA). Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. $_CLICK
+# ^Custom
+Ïðèëàãîàâàœå
+# ^ComponentsText
+Èçàáåðèòå êîìïîíåíòå çà èíñòàëàöè¼ó. Èíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå. $_CLICK
+# ^ComponentsSubText1
+Èçàáåðèòå òèï èíñòàëàöè¼å:
+# ^ComponentsSubText2_NoInstTypes
+Èçàáåðèòå êîìïîíåíòå çà èíñòàëàöè¼ó:
+# ^ComponentsSubText2
+Èëè, èçàáåðèòå îïöèîíå êîìïîíåíòå êî¼å æåëèòå äà èíñòàëèðàòå:
+# ^UnComponentsText
+Èçàáåðèòå êîìïîíåíòå çà äåèíñòàëàöè¼ó. Äåèíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå. $_CLICK
+# ^UnComponentsSubText1
+Èçàáåðèòå òèï äåèíñòàëàöè¼å:
+# ^UnComponentsSubText2_NoInstTypes
+Èçàáåðèòå êîìïîíåíòå çà äåèíñòàëàöè¼ó:
+# ^UnComponentsSubText2
+Èëè, èçàáåðèòå îïöèîíå êîìïîíåíòå êî¼å æåëèòå äà äåèíñòàëèðàòå:
+# ^DirText
+Ïðîãðàì $(^NameDA) žå áèòè èíñòàëèðàí ó íàâåäåíè ôîëäåð. Çà èíñòàëàöè¼ó ó äðóãè ôîëäåð ïðèòèñíèòå äóãìå „Èçáîð...“ è èçàáåðèòå ôîëäåð. $_CLICK
+# ^DirSubText
+Ôîëäåð
+# ^DirBrowseText
+Èçàáåðèòå ôîëäåð ó êî¼è žåòå èíñòàëèðàòè ïðîãðàì $(^NameDA):
+# ^UnDirText
+Ïðîãðàì $(^NameDA) žå áèòè äåèíñòàëèðàí èç íàâåäåíîã ôîëäåðà. Çà äåèíñòàëàöè¼ó èç äðóãîã ôîëäåðà ïðèòèñíèòå äóãìå „Èçáîð...“ è èçàáåðèòå ôîëäåð. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Èçàáåðèòå ôîëäåð èç êîãà žåòå äåèíñòàëèðàòè ïðîãðàì $(^NameDA):
+# ^SpaceAvailable
+"Ñëîáîäàí ïðîñòîð: "
+# ^SpaceRequired
+"Ïîòðåáàí ïðîñòîð: "
+# ^UninstallingText
+Ïðîãðàì $(^NameDA) žå áèòè äåèíñòàëèðàí èç íàâåäåíîã ôîëäåðà. $_CLICK
+# ^UninstallingSubText
+Äåèíñòàëàöè¼à èç:
+# ^FileError
+Ãðåøêà ïðè îòâàðàœó ôà¼ëà çà ïèñàœå: \r\n\t"$0"\r\nÏðèòèñíèòå äóãìå „Îäóñòàíè“ çà ïðåêèä èíñòàëàöè¼å,\r\n„Ïîíîâè“ çà ïîíîâíè ïîêóø༠ïèñàœà ó ôà¼ë, èëè\r\n„Èãíîðèøè“ çà ïðåñêàêàœå îâîã ôà¼ëà.
+# ^FileError_NoIgnore
+Ãðåøêà ïðè îòâàðàœó ôà¼ëà çà ïèñàœå: \r\n\t"$0"\r\nÏðèòèñíèòå äóãìå „Ïîíîâè“ çà ïîíîâíè ïîêóø༠ïèñàœà ó ôà¼ë, èëè\r\n„Îäóñòàíè“ çà ïðåêèä èíñòàëèðàœà.
+# ^CantWrite
+"Íåìîãóžå ïèñàœå: "
+# ^CopyFailed
+Íåóñïåøíî êîïèðàœå
+# ^CopyTo
+"Êîïèðàœå ó "
+# ^Registering
+"Ðåãèñòðîâàœå: "
+# ^Unregistering
+"Äåðåãèñòðîâàœå: "
+# ^SymbolNotFound
+"Ñèìáîë íè¼å íàåí: "
+# ^CouldNotLoad
+"Íåìîãóžå ó÷èòàâàœå: "
+# ^CreateFolder
+"Êðåèðàœå ôîëäåðà: "
+# ^CreateShortcut
+"Êðåèðàœå ïðå÷èöå: "
+# ^CreatedUninstaller
+"Êðåèðàœå äåèíñòàëåðà: "
+# ^Delete
+"Áðèñàœå ôà¼ëà: "
+# ^DeleteOnReboot
+"Áðèñàœå ïðè ðåñòàðòó: "
+# ^ErrorCreatingShortcut
+"Ãðåøêà ïðè êðåèðàœó ïðå÷èöå: "
+# ^ErrorCreating
+"Ãðåøêà ïðè êðåèðàœó: "
+# ^ErrorDecompressing
+Ãðåøêà ïðè îòïàêèâàœó ïîäàòàêà! Îøòåžåí èíñòàëàöèîíè ïðîãðàì?
+# ^ErrorRegistering
+Ãðåøêà ïðè ðåãèñòðîâàœó áèáëèîòåêå
+# ^ExecShell
+"Èçâðøàâàœå ó îêðóæåœó: "
+# ^Exec
+"Èçâðøàâàœå: "
+# ^Extract
+"Îòïàêèâàœå: "
+# ^ErrorWriting
+"Îòïàêèâàœå: ãðåøêà ïðè óïèñó ó ôà¼ë "
+# ^InvalidOpcode
+Îøòåžåí èíñòàëàöèîíè ïðîãðàì: íåèñïðàâíà êîìàíäà
+# ^NoOLE
+"Íåìà OLE ïîäðøêå çà: "
+# ^OutputFolder
+"Èçëàçíè ôîëäåð: "
+# ^RemoveFolder
+"Áðèñàœå ôîëäåðà: "
+# ^RenameOnReboot
+"Ïðåèìåíîâàœå ïðè ðåñòàðòîâàœó: "
+# ^Rename
+"Ïðåèìåíîâàí: "
+# ^Skipped
+"Ïðåñêî÷åí: "
+# ^CopyDetails
+Êîïèð༠äåòàšå ó êëèïáîðä
+# ^LogInstall
+Âîäè çàïèñíèê î ïðîöåñó èíñòàëàöè¼å
+# ^Byte
+B
+# ^Kilo
+k
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Serbian.nsh b/Contrib/Language files/Serbian.nsh
index 73086b2..2114f93 100755
--- a/Contrib/Language files/Serbian.nsh
+++ b/Contrib/Language files/Serbian.nsh
@@ -1,121 +1,121 @@
-;Language: Serbian (3098)
-;Translation by Ñðàí Îáóžèíà <obucina@srpskijezik.edu.yu>
-
-!insertmacro LANGFILE "Serbian" "Serbian Cyrillic"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Äîáðîäîøëè ó âîäè÷ çà èíñòàëàöè¼ó ïðîãðàìà $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Áèžåòå âîåíè êðîç ïðîöåñ èíñòàëàöè¼å ïðîãðàìà $(^NameDA).$\r$\n$\r$\nÏðåïîðó÷šèâî ¼å äà èñêšó÷èòå ñâå äðóãå ïðîãðàìå ïðå ïî÷åòêà èíñòàëàöè¼å. Îâî ìîæå îìîãóžèòè àæóðèðàœå ñèñòåìñêèõ ôà¼ëîâà áåç ïîòðåáå çà ïîíîâíèì ïîêðåòàœåì ðà÷óíàðà.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Äîáðîäîøëè ó äåèíñòàëàöè¼ó ïðîãðàìà $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Áèžåòå âîåíè êðîç ïðîöåñ äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA).$\r$\n$\r$\nÏðå ïî÷åòêà äåèíñòàëàöè¼å, óâåðèòå ñå äà ¼å ïðîãðàì $(^NameDA) èñêšó÷åí. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Äîãîâîð î ïðàâó êîðèøžåœà"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“ çà íàñòàâàê. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå èíñòàëèðàëè ïðîãðàì $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå èíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå èíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Äîãîâîð î ïðàâó êîðèøžåœà"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“ çà íàñòàâàê. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå äåèíñòàëèðàëè ïðîãðàì $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå äåèíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå äåèíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Ïðèòèñíèòå Page Down äà áèñòå âèäåëè îñòàòàê äîãîâîðà."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Èçáîð êîìïîíåíòè çà èíñòàëàöè¼ó"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Èçàáåðèòå êîìïîíåíòå çà èíñòàëàöè¼ó. Èíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñ"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Èçáîð êîìïîíåíòè çà äåèíñòàëàöè¼ó"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Èçàáåðèòå êîìïîíåíòå çà äåèíñòàëàöè¼ó. Äåèíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåèòå êóðñîðîì ìèøà ïðåêî èìåíà êîìïîíåíòå äà áèñòå âèäåëè œåí îïèñ."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåèòå êóðñîðîì ìèøà ïðåêî èìåíà êîìïîíåíòå äà áèñòå âèäåëè œåí îïèñ."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Èçáîð ôîëäåðà çà èíñòàëàöè¼ó"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Èçàáåðèòå ôîëäåð ó êî¼è žåòå èíñòàëèðàòè ïðîãðàì $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Èçáîð ôîëäåðà çà äåèíñòàëaöè¼ó"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Èçàáåðèòå ôîëäåð èç êîãà žåòå äåèíñòàëèðàòè ïðîãðàì $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Èíñòàëàöè¼à"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ñà÷åêà¼òå äîê ñå ïðîãðàì $(^NameDA) èíñòàëèðà."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Çàâðøåíà èíñòàëàöè¼à"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Èíñòàëàöè¼à ¼å óñïåøíî çàâðøåíà."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Ïðåêèíóòà èíñòàëàöè¼à"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Èíñòàëàöè¼à ¼å ïðåêèíóòà è íè¼å óñïåøíî çàâðøåíà."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Äåèíñòàëàöè¼à"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ñà÷åêà¼òå äîê ñå ïðîãðàì $(^NameDA) äåèíñòàëèðà."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Çàâðøåíà äåèíñòàëàöè¼à"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Äåèíñòàëàöè¼à ¼å óñïåøíî çàâðøåíà."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ïðåêèíóòà äåèíñòàëàöè¼à"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Äåèíñòàëàöè¼à ¼å ïðåêèíóòà è íè¼å óñïåøíî çàâðøåíà."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâðøåíà èíñòàëàöè¼à ïðîãðàìà $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Ïðîãðàì $(^NameDA) ¼å èíñòàëèðàí íà ðà÷óíàð.$\r$\n$\r$\nÏðèòèñíèòå äóãìå „Êð༓ çà çàòâàðàœå îâîã ïðîçîðà."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ðà÷óíàð ìîðà áèòè ïîíîâî ïîêðåíóò äà áè ñå ïðîöåñ èíñòàëàöè¼å ïðîãðàìà $(^NameDA) óñïåøíî çàâðøèî. Æåëèòå ëè òî îäìàõ äà óðàäèòå?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâðøåíà äåèíñòàëàöè¼à ïðîãðàìà $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðîãðàì $(^NameDA) ¼å äåèíñòàëèðàí ñà ðà÷óíàðà.$\r$\n$\r$\nÏðèòèñíèòå äóãìå „Êð༓ çà çàòâàðàœå îâîã ïðîçîðà."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ðà÷óíàð ìîðà áèòè ïîíîâî ïîêðåíóò äà áè ñå ïðîöåñ äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA) óñïåøíî çàâðøèî. Æåëèòå ëè òî äà óðàäèòå îäìàõ?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Îäìàõ ïîíîâî ïîêðåíè ðà÷óíàð"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Áåç ïîíîâíîã ïîêðåòàœà"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Ïîêðåíè ïðîãðàì $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Ïðèêàæè Ïðî÷èòà¼Ìå ôà¼ë"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "Êðà¼"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Èçáîð ôîëäåðà ó Ñòàðò ìåíè¼ó"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Èçàáåðèòå ôîëäåð ó Ñòàðò ìåíè¼ó ó êîìå žåòå êðåèðàòè ïðå÷èöå."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Èçàáåðèòå ôîëäåð ó Ñòàðò ìåíè¼ó ó êîìå æåëèòå äà áóäó êðåèðàíå ïðå÷èöå ïðîãðàìà. Ìîæåòå óïèñàòè è èìå çà êðåèðàœå íîâîã ôîëäåðà."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Áåç êðåèðàœà ïðå÷èöà"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Äåèíñòàëàöè¼à ïðîãðàìà $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Äåèíñòàëàöè¼à ïðîãðàìà $(^NameDA) ñà ðà÷óíàðà."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ñèãóðíî æåëèòå äà ïðåêèíåòå èíñòàëàöè¼ó ïðîãðàìà $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ñèãóðíî æåëèòå äà ïðåêèíåòå äåèíñòàëàöè¼ó ïðîãðàìà $(^Name)?"
-!endif
+;Language: Serbian (3098)
+;Translation by Ñðàí Îáóžèíà <obucina@srpskijezik.edu.yu>
+
+!insertmacro LANGFILE "Serbian" "Serbian Cyrillic"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Äîáðîäîøëè ó âîäè÷ çà èíñòàëàöè¼ó ïðîãðàìà $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Áèžåòå âîåíè êðîç ïðîöåñ èíñòàëàöè¼å ïðîãðàìà $(^NameDA).$\r$\n$\r$\nÏðåïîðó÷šèâî ¼å äà èñêšó÷èòå ñâå äðóãå ïðîãðàìå ïðå ïî÷åòêà èíñòàëàöè¼å. Îâî ìîæå îìîãóžèòè àæóðèðàœå ñèñòåìñêèõ ôà¼ëîâà áåç ïîòðåáå çà ïîíîâíèì ïîêðåòàœåì ðà÷óíàðà.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Äîáðîäîøëè ó äåèíñòàëàöè¼ó ïðîãðàìà $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Áèžåòå âîåíè êðîç ïðîöåñ äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA).$\r$\n$\r$\nÏðå ïî÷åòêà äåèíñòàëàöè¼å, óâåðèòå ñå äà ¼å ïðîãðàì $(^NameDA) èñêšó÷åí. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Äîãîâîð î ïðàâó êîðèøžåœà"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå èíñòàëàöè¼å ïðîãðàìà $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“ çà íàñòàâàê. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå èíñòàëèðàëè ïðîãðàì $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå èíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå èíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Äîãîâîð î ïðàâó êîðèøžåœà"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ïàæšèâî ïðî÷èòà¼òå äîãîâîð î ïðàâó êîðèøžåœà ïðå äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, ïðèòèñíèòå äóãìå „Ïðèõâàòàì“ çà íàñòàâàê. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå äåèíñòàëèðàëè ïðîãðàì $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, îáåëåæèòå êâàäðàòèž èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå äåèíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Àêî ïðèõâàòàòå ñâå óñëîâå äîãîâîðà, èçàáåðèòå ïðâó îïöè¼ó èñïîä. Ìîðàòå ïðèõâàòèòè äîãîâîð äà áèñòå äåèíñòàëèðàëè ïðîãðàì $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Ïðèòèñíèòå Page Down äà áèñòå âèäåëè îñòàòàê äîãîâîðà."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Èçáîð êîìïîíåíòè çà èíñòàëàöè¼ó"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Èçàáåðèòå êîìïîíåíòå çà èíñòàëàöè¼ó. Èíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñ"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Èçáîð êîìïîíåíòè çà äåèíñòàëàöè¼ó"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Èçàáåðèòå êîìïîíåíòå çà äåèíñòàëàöè¼ó. Äåèíñòàëèðà¼ó ñå ñàìî îçíà÷åíå êîìïîíåíòå."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåèòå êóðñîðîì ìèøà ïðåêî èìåíà êîìïîíåíòå äà áèñòå âèäåëè œåí îïèñ."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïðåèòå êóðñîðîì ìèøà ïðåêî èìåíà êîìïîíåíòå äà áèñòå âèäåëè œåí îïèñ."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Èçáîð ôîëäåðà çà èíñòàëàöè¼ó"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Èçàáåðèòå ôîëäåð ó êî¼è žåòå èíñòàëèðàòè ïðîãðàì $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Èçáîð ôîëäåðà çà äåèíñòàëaöè¼ó"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Èçàáåðèòå ôîëäåð èç êîãà žåòå äåèíñòàëèðàòè ïðîãðàì $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Èíñòàëàöè¼à"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Ñà÷åêà¼òå äîê ñå ïðîãðàì $(^NameDA) èíñòàëèðà."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Çàâðøåíà èíñòàëàöè¼à"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Èíñòàëàöè¼à ¼å óñïåøíî çàâðøåíà."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Ïðåêèíóòà èíñòàëàöè¼à"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Èíñòàëàöè¼à ¼å ïðåêèíóòà è íè¼å óñïåøíî çàâðøåíà."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Äåèíñòàëàöè¼à"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Ñà÷åêà¼òå äîê ñå ïðîãðàì $(^NameDA) äåèíñòàëèðà."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Çàâðøåíà äåèíñòàëàöè¼à"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Äåèíñòàëàöè¼à ¼å óñïåøíî çàâðøåíà."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ïðåêèíóòà äåèíñòàëàöè¼à"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Äåèíñòàëàöè¼à ¼å ïðåêèíóòà è íè¼å óñïåøíî çàâðøåíà."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâðøåíà èíñòàëàöè¼à ïðîãðàìà $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Ïðîãðàì $(^NameDA) ¼å èíñòàëèðàí íà ðà÷óíàð.$\r$\n$\r$\nÏðèòèñíèòå äóãìå „Êð༓ çà çàòâàðàœå îâîã ïðîçîðà."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Ðà÷óíàð ìîðà áèòè ïîíîâî ïîêðåíóò äà áè ñå ïðîöåñ èíñòàëàöè¼å ïðîãðàìà $(^NameDA) óñïåøíî çàâðøèî. Æåëèòå ëè òî îäìàõ äà óðàäèòå?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâðøåíà äåèíñòàëàöè¼à ïðîãðàìà $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Ïðîãðàì $(^NameDA) ¼å äåèíñòàëèðàí ñà ðà÷óíàðà.$\r$\n$\r$\nÏðèòèñíèòå äóãìå „Êð༓ çà çàòâàðàœå îâîã ïðîçîðà."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Ðà÷óíàð ìîðà áèòè ïîíîâî ïîêðåíóò äà áè ñå ïðîöåñ äåèíñòàëàöè¼å ïðîãðàìà $(^NameDA) óñïåøíî çàâðøèî. Æåëèòå ëè òî äà óðàäèòå îäìàõ?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Îäìàõ ïîíîâî ïîêðåíè ðà÷óíàð"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Áåç ïîíîâíîã ïîêðåòàœà"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Ïîêðåíè ïðîãðàì $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Ïðèêàæè Ïðî÷èòà¼Ìå ôà¼ë"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "Êðà¼"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Èçáîð ôîëäåðà ó Ñòàðò ìåíè¼ó"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Èçàáåðèòå ôîëäåð ó Ñòàðò ìåíè¼ó ó êîìå žåòå êðåèðàòè ïðå÷èöå."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Èçàáåðèòå ôîëäåð ó Ñòàðò ìåíè¼ó ó êîìå æåëèòå äà áóäó êðåèðàíå ïðå÷èöå ïðîãðàìà. Ìîæåòå óïèñàòè è èìå çà êðåèðàœå íîâîã ôîëäåðà."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Áåç êðåèðàœà ïðå÷èöà"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Äåèíñòàëàöè¼à ïðîãðàìà $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Äåèíñòàëàöè¼à ïðîãðàìà $(^NameDA) ñà ðà÷óíàðà."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ñèãóðíî æåëèòå äà ïðåêèíåòå èíñòàëàöè¼ó ïðîãðàìà $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ñèãóðíî æåëèòå äà ïðåêèíåòå äåèíñòàëàöè¼ó ïðîãðàìà $(^Name)?"
+!endif
diff --git a/Contrib/Language files/SerbianLatin.nlf b/Contrib/Language files/SerbianLatin.nlf
index 6abaf58..534381a 100755
--- a/Contrib/Language files/SerbianLatin.nlf
+++ b/Contrib/Language files/SerbianLatin.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-2074
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Srðan Obuæina <obucina@srpskijezik.edu.yu>
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Instalacija
-# ^UninstallCaption
-$(^Name) Deinstalacija
-# ^LicenseSubCaption
-: Dogovor o pravu korišæenja
-# ^ComponentsSubCaption
-: Opcije instalacije
-# ^DirSubCaption
-: Izbor foldera za instalaciju
-# ^InstallingSubCaption
-: Instalacija
-# ^CompletedSubCaption
-: Završena instalacija
-# ^UnComponentsSubCaption
-: Opcije deinstalacije
-# ^UnDirSubCaption
-: Izbor foldera za deinstalaciju
-# ^ConfirmSubCaption
-: Potvrðivanje
-# ^UninstallingSubCaption
-: Deinstalacija
-# ^UnCompletedSubCaption
-: Završena deinstalacija
-# ^BackBtn
-< Nazad
-# ^NextBtn
-Napred >
-# ^AgreeBtn
-Prihvatam
-# ^AcceptBtn
-Prihvatam uslove dogovora o pravu korišæenja
-# ^DontAcceptBtn
-Ne prihvatam uslove dogovora o pravu korišæenja
-# ^InstallBtn
-Instaliraj
-# ^UninstallBtn
-Deinstaliraj
-# ^CancelBtn
-Odustani
-# ^CloseBtn
-Zatvori
-# ^BrowseBtn
-Izbor...
-# ^ShowDetailsBtn
-Detalji
-# ^ClickNext
-Pritisnite dugme „Napred“ za nastavak.
-# ^ClickInstall
-Pritisnite dugme „Instaliraj“ za poèetak instalacije.
-# ^ClickUninstall
-Pritisnite dugme „Deinstaliraj“ za poèetak deinstalacije.
-# ^Name
-Ime
-# ^Completed
-Završeno
-# ^LicenseText
-Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
-# ^LicenseTextCB
-Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
-# ^LicenseTextRB
-Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
-# ^UnLicenseText
-Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
-# ^UnLicenseTextCB
-Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
-# ^UnLicenseTextRB
-Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
-# ^Custom
-Prilagoðavanje
-# ^ComponentsText
-Izaberite komponente za instalaciju. Instaliraju se samo oznaèene komponente. $_CLICK
-# ^ComponentsSubText1
-Izaberite tip instalacije:
-# ^ComponentsSubText2_NoInstTypes
-Izaberite komponente za instalaciju:
-# ^ComponentsSubText2
-Ili, izaberite opcione komponente koje želite da instalirate:
-# ^UnComponentsText
-Izaberite komponente za deinstalaciju. Deinstaliraju se samo oznaèene komponente. $_CLICK
-# ^UnComponentsSubText1
-Izaberite tip deinstalacije:
-# ^UnComponentsSubText2_NoInstTypes
-Izaberite komponente za deinstalaciju:
-# ^UnComponentsSubText2
-Ili, izaberite opcione komponente koje želite da deinstalirate:
-# ^DirText
-Program $(^NameDA) æe biti instaliran u navedeni folder. Za instalaciju u drugi folder pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
-# ^DirSubText
-Folder
-# ^DirBrowseText
-Izaberite folder u koji æete instalirati program $(^NameDA):
-# ^UnDirText
-Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. Za deinstalaciju iz drugog foldera pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Izaberite folder iz koga æete deinstalirati program $(^NameDA):
-# ^SpaceAvailable
-"Slobodan prostor: "
-# ^SpaceRequired
-"Potreban prostor: "
-# ^UninstallingText
-Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. $_CLICK
-# ^UninstallingSubText
-Deinstalacija iz:
-# ^FileError
-Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Odustani“ za prekid instalacije,\r\n„Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Ignoriši“ za preskakanje ovog fajla.
-# ^FileError_NoIgnore
-Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Odustani“ za prekid instaliranja.
-# ^CantWrite
-"Nemoguæe pisanje: "
-# ^CopyFailed
-Neuspešno kopiranje
-# ^CopyTo
-"Kopiranje u "
-# ^Registering
-"Registrovanje: "
-# ^Unregistering
-"Deregistrovanje: "
-# ^SymbolNotFound
-"Simbol nije naðen: "
-# ^CouldNotLoad
-"Nemoguæe uèitavanje: "
-# ^CreateFolder
-"Kreiranje foldera: "
-# ^CreateShortcut
-"Kreiranje preèice: "
-# ^CreatedUninstaller
-"Kreiranje deinstalera: "
-# ^Delete
-"Brisanje fajla: "
-# ^DeleteOnReboot
-"Brisanje pri restartu: "
-# ^ErrorCreatingShortcut
-"Greška pri kreiranju preèice: "
-# ^ErrorCreating
-"Greška pri kreiranju: "
-# ^ErrorDecompressing
-Greška pri otpakivanju podataka! Ošteæen instalacioni program?
-# ^ErrorRegistering
-Greška pri registrovanju biblioteke
-# ^ExecShell
-"Izvršavanje u okruženju: "
-# ^Exec
-"Izvršavanje: "
-# ^Extract
-"Otpakivanje: "
-# ^ErrorWriting
-"Otpakivanje: greška pri upisu u fajl "
-# ^InvalidOpcode
-Ošteæen instalacioni program: neispravna komanda
-# ^NoOLE
-"Nema OLE podrške za: "
-# ^OutputFolder
-"Izlazni folder: "
-# ^RemoveFolder
-"Brisanje foldera: "
-# ^RenameOnReboot
-"Preimenovanje pri restartu: "
-# ^Rename
-"Preimenovan: "
-# ^Skipped
-"Preskoèen: "
-# ^CopyDetails
-Kopiraj detalje u klipbord
-# ^LogInstall
-Vodi zapisnik o procesu instalacije
-# ^Byte
-B
-# ^Kilo
-k
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+2074
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Srðan Obuæina <obucina@srpskijezik.edu.yu>
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Instalacija
+# ^UninstallCaption
+$(^Name) Deinstalacija
+# ^LicenseSubCaption
+: Dogovor o pravu korišæenja
+# ^ComponentsSubCaption
+: Opcije instalacije
+# ^DirSubCaption
+: Izbor foldera za instalaciju
+# ^InstallingSubCaption
+: Instalacija
+# ^CompletedSubCaption
+: Završena instalacija
+# ^UnComponentsSubCaption
+: Opcije deinstalacije
+# ^UnDirSubCaption
+: Izbor foldera za deinstalaciju
+# ^ConfirmSubCaption
+: Potvrðivanje
+# ^UninstallingSubCaption
+: Deinstalacija
+# ^UnCompletedSubCaption
+: Završena deinstalacija
+# ^BackBtn
+< Nazad
+# ^NextBtn
+Napred >
+# ^AgreeBtn
+Prihvatam
+# ^AcceptBtn
+Prihvatam uslove dogovora o pravu korišæenja
+# ^DontAcceptBtn
+Ne prihvatam uslove dogovora o pravu korišæenja
+# ^InstallBtn
+Instaliraj
+# ^UninstallBtn
+Deinstaliraj
+# ^CancelBtn
+Odustani
+# ^CloseBtn
+Zatvori
+# ^BrowseBtn
+Izbor...
+# ^ShowDetailsBtn
+Detalji
+# ^ClickNext
+Pritisnite dugme „Napred“ za nastavak.
+# ^ClickInstall
+Pritisnite dugme „Instaliraj“ za poèetak instalacije.
+# ^ClickUninstall
+Pritisnite dugme „Deinstaliraj“ za poèetak deinstalacije.
+# ^Name
+Ime
+# ^Completed
+Završeno
+# ^LicenseText
+Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
+# ^LicenseTextCB
+Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
+# ^LicenseTextRB
+Pažlivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
+# ^UnLicenseText
+Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“.
+# ^UnLicenseTextCB
+Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. $_CLICK
+# ^UnLicenseTextRB
+Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA). Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. $_CLICK
+# ^Custom
+Prilagoðavanje
+# ^ComponentsText
+Izaberite komponente za instalaciju. Instaliraju se samo oznaèene komponente. $_CLICK
+# ^ComponentsSubText1
+Izaberite tip instalacije:
+# ^ComponentsSubText2_NoInstTypes
+Izaberite komponente za instalaciju:
+# ^ComponentsSubText2
+Ili, izaberite opcione komponente koje želite da instalirate:
+# ^UnComponentsText
+Izaberite komponente za deinstalaciju. Deinstaliraju se samo oznaèene komponente. $_CLICK
+# ^UnComponentsSubText1
+Izaberite tip deinstalacije:
+# ^UnComponentsSubText2_NoInstTypes
+Izaberite komponente za deinstalaciju:
+# ^UnComponentsSubText2
+Ili, izaberite opcione komponente koje želite da deinstalirate:
+# ^DirText
+Program $(^NameDA) æe biti instaliran u navedeni folder. Za instalaciju u drugi folder pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
+# ^DirSubText
+Folder
+# ^DirBrowseText
+Izaberite folder u koji æete instalirati program $(^NameDA):
+# ^UnDirText
+Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. Za deinstalaciju iz drugog foldera pritisnite dugme „Izbor...“ i izaberite folder. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Izaberite folder iz koga æete deinstalirati program $(^NameDA):
+# ^SpaceAvailable
+"Slobodan prostor: "
+# ^SpaceRequired
+"Potreban prostor: "
+# ^UninstallingText
+Program $(^NameDA) æe biti deinstaliran iz navedenog foldera. $_CLICK
+# ^UninstallingSubText
+Deinstalacija iz:
+# ^FileError
+Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Odustani“ za prekid instalacije,\r\n„Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Ignoriši“ za preskakanje ovog fajla.
+# ^FileError_NoIgnore
+Greška pri otvaranju fajla za pisanje: \r\n\t"$0"\r\nPritisnite dugme „Ponovi“ za ponovni pokušaj pisanja u fajl, ili\r\n„Odustani“ za prekid instaliranja.
+# ^CantWrite
+"Nemoguæe pisanje: "
+# ^CopyFailed
+Neuspešno kopiranje
+# ^CopyTo
+"Kopiranje u "
+# ^Registering
+"Registrovanje: "
+# ^Unregistering
+"Deregistrovanje: "
+# ^SymbolNotFound
+"Simbol nije naðen: "
+# ^CouldNotLoad
+"Nemoguæe uèitavanje: "
+# ^CreateFolder
+"Kreiranje foldera: "
+# ^CreateShortcut
+"Kreiranje preèice: "
+# ^CreatedUninstaller
+"Kreiranje deinstalera: "
+# ^Delete
+"Brisanje fajla: "
+# ^DeleteOnReboot
+"Brisanje pri restartu: "
+# ^ErrorCreatingShortcut
+"Greška pri kreiranju preèice: "
+# ^ErrorCreating
+"Greška pri kreiranju: "
+# ^ErrorDecompressing
+Greška pri otpakivanju podataka! Ošteæen instalacioni program?
+# ^ErrorRegistering
+Greška pri registrovanju biblioteke
+# ^ExecShell
+"Izvršavanje u okruženju: "
+# ^Exec
+"Izvršavanje: "
+# ^Extract
+"Otpakivanje: "
+# ^ErrorWriting
+"Otpakivanje: greška pri upisu u fajl "
+# ^InvalidOpcode
+Ošteæen instalacioni program: neispravna komanda
+# ^NoOLE
+"Nema OLE podrške za: "
+# ^OutputFolder
+"Izlazni folder: "
+# ^RemoveFolder
+"Brisanje foldera: "
+# ^RenameOnReboot
+"Preimenovanje pri restartu: "
+# ^Rename
+"Preimenovan: "
+# ^Skipped
+"Preskoèen: "
+# ^CopyDetails
+Kopiraj detalje u klipbord
+# ^LogInstall
+Vodi zapisnik o procesu instalacije
+# ^Byte
+B
+# ^Kilo
+k
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/SerbianLatin.nsh b/Contrib/Language files/SerbianLatin.nsh
index 0e0af86..257906f 100755
--- a/Contrib/Language files/SerbianLatin.nsh
+++ b/Contrib/Language files/SerbianLatin.nsh
@@ -1,121 +1,121 @@
-;Language: Serbian Latin (2074)
-;Translation by Srðan Obuæina <obucina@srpskijezik.edu.yu>
-
-!insertmacro LANGFILE "SerbianLatin" "Serbian Latin"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli u vodiè za instalaciju programa $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Biæete voðeni kroz proces instalacije programa $(^NameDA).$\r$\n$\r$\nPreporuèljivo je da iskljuèite sve druge programe pre poèetka instalacije. Ovo može omoguæiti ažuriranje sistemskih fajlova bez potrebe za ponovnim pokretanjem raèunara.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli u deinstalaciju programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Biæete voðeni kroz proces deinstalacije programa $(^NameDA).$\r$\n$\r$\nPre poèetka deinstalacije, uverite se da je program $(^NameDA) iskljuèen. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Dogovor o pravu korišæenja"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pažljivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“ za nastavak. Morate prihvatiti dogovor da biste instalirali program $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. Morate prihvatiti dogovor da biste instalirali program $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. Morate prihvatiti dogovor da biste instalirali program $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Dogovor o pravu korišæenja"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“ za nastavak. Morate prihvatiti dogovor da biste deinstalirali program $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. Morate prihvatiti dogovor da biste deinstalirali program $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. Morate prihvatiti dogovor da biste deinstalirali program $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pritisnite Page Down da biste videli ostatak dogovora."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponenti za instalaciju"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izaberite komponente za instalaciju. Instaliraju se samo oznaèene komponente."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponenti za deinstalaciju"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izaberite komponente za deinstalaciju. Deinstaliraju se samo oznaèene komponente."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Preðite kursorom miša preko imena komponente da biste videli njen opis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Preðite kursorom miša preko imena komponente da biste videli njen opis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Izbor foldera za instalaciju"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Izaberite folder u koji æete instalirati program $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izbor foldera za deinstalaciju"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Izaberite folder iz koga æete deinstalirati program $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalacija"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Saèekajte dok se program $(^NameDA) instalira."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Završena instalacija"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacija je uspešno završena."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Prekinuta instalacija"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacija je prekinuta i nije uspešno završena."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Deinstalacija"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Saèekajte dok se program $(^NameDA) deinstalira."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Završena deinstalacija"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Deinstalacija je uspešno završena."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Prekinuta deinstalacija"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Deinstalacija je prekinuta i nije uspešno završena."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Završena instalacija programa $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) je instaliran na raèunar.$\r$\n$\r$\nPritisnite dugme „Kraj“ za zatvaranje ovog prozora."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Raèunar mora biti ponovo pokrenut da bi se proces instalacije programa $(^NameDA) uspešno završio. Želite li to odmah da uradite?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Završena deinstalacija programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) je deinstaliran sa raèunara.$\r$\n$\r$\nPritisnite dugme „Kraj“ za zatvaranje ovog prozora."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Raèunar mora biti ponovo pokrenut da bi se proces deinstalacije programa $(^NameDA) uspešno završio. Želite li to da uradite odmah?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Odmah ponovo pokreni raèunar"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Bez ponovnog pokretanja"
- ${LangFileString} MUI_TEXT_FINISH_RUN "Pokreni program $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Prikaži ProèitajMe fajl"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "Kraj"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izbor foldera u Start meniju"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izaberite folder u Start meniju u kome æete kreirati preèice."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izaberite folder u Start meniju u kome želite da budu kreirane preèice programa. Možete upisati i ime za kreiranje novog foldera."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Bez kreiranja preèica"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Deinstalacija programa $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Deinstalacija programa $(^NameDA) sa raèunara."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Sigurno želite da prekinete instalaciju programa $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sigurno želite da prekinete deinstalaciju programa $(^Name)?"
-!endif
+;Language: Serbian Latin (2074)
+;Translation by Srðan Obuæina <obucina@srpskijezik.edu.yu>
+
+!insertmacro LANGFILE "SerbianLatin" "Serbian Latin"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli u vodiè za instalaciju programa $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Biæete voðeni kroz proces instalacije programa $(^NameDA).$\r$\n$\r$\nPreporuèljivo je da iskljuèite sve druge programe pre poèetka instalacije. Ovo može omoguæiti ažuriranje sistemskih fajlova bez potrebe za ponovnim pokretanjem raèunara.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli u deinstalaciju programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Biæete voðeni kroz proces deinstalacije programa $(^NameDA).$\r$\n$\r$\nPre poèetka deinstalacije, uverite se da je program $(^NameDA) iskljuèen. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Dogovor o pravu korišæenja"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pažljivo proèitajte dogovor o pravu korišæenja pre instalacije programa $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“ za nastavak. Morate prihvatiti dogovor da biste instalirali program $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. Morate prihvatiti dogovor da biste instalirali program $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. Morate prihvatiti dogovor da biste instalirali program $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Dogovor o pravu korišæenja"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pažlivo proèitajte dogovor o pravu korišæenja pre deinstalacije programa $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ako prihvatate sve uslove dogovora, pritisnite dugme „Prihvatam“ za nastavak. Morate prihvatiti dogovor da biste deinstalirali program $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ako prihvatate sve uslove dogovora, obeležite kvadratiæ ispod. Morate prihvatiti dogovor da biste deinstalirali program $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ako prihvatate sve uslove dogovora, izaberite prvu opciju ispod. Morate prihvatiti dogovor da biste deinstalirali program $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pritisnite Page Down da biste videli ostatak dogovora."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponenti za instalaciju"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izaberite komponente za instalaciju. Instaliraju se samo oznaèene komponente."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponenti za deinstalaciju"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izaberite komponente za deinstalaciju. Deinstaliraju se samo oznaèene komponente."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Preðite kursorom miša preko imena komponente da biste videli njen opis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Preðite kursorom miša preko imena komponente da biste videli njen opis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Izbor foldera za instalaciju"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Izaberite folder u koji æete instalirati program $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izbor foldera za deinstalaciju"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Izaberite folder iz koga æete deinstalirati program $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalacija"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Saèekajte dok se program $(^NameDA) instalira."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Završena instalacija"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Instalacija je uspešno završena."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Prekinuta instalacija"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Instalacija je prekinuta i nije uspešno završena."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Deinstalacija"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Saèekajte dok se program $(^NameDA) deinstalira."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Završena deinstalacija"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Deinstalacija je uspešno završena."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Prekinuta deinstalacija"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Deinstalacija je prekinuta i nije uspešno završena."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Završena instalacija programa $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) je instaliran na raèunar.$\r$\n$\r$\nPritisnite dugme „Kraj“ za zatvaranje ovog prozora."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Raèunar mora biti ponovo pokrenut da bi se proces instalacije programa $(^NameDA) uspešno završio. Želite li to odmah da uradite?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Završena deinstalacija programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) je deinstaliran sa raèunara.$\r$\n$\r$\nPritisnite dugme „Kraj“ za zatvaranje ovog prozora."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Raèunar mora biti ponovo pokrenut da bi se proces deinstalacije programa $(^NameDA) uspešno završio. Želite li to da uradite odmah?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Odmah ponovo pokreni raèunar"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Bez ponovnog pokretanja"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "Pokreni program $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Prikaži ProèitajMe fajl"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "Kraj"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izbor foldera u Start meniju"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izaberite folder u Start meniju u kome æete kreirati preèice."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izaberite folder u Start meniju u kome želite da budu kreirane preèice programa. Možete upisati i ime za kreiranje novog foldera."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Bez kreiranja preèica"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Deinstalacija programa $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Deinstalacija programa $(^NameDA) sa raèunara."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Sigurno želite da prekinete instalaciju programa $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Sigurno želite da prekinete deinstalaciju programa $(^Name)?"
+!endif
diff --git a/Contrib/Language files/SimpChinese.nlf b/Contrib/Language files/SimpChinese.nlf
index 067c349..b906c9e 100755
--- a/Contrib/Language files/SimpChinese.nlf
+++ b/Contrib/Language files/SimpChinese.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-2052
-# Font and size - dash (-) means default ×ÖÌåÃû³ÆÓë´óС
-ËÎÌå
-9
-# Codepage - dash (-) means ANSI code page ANSI ×ÖÂëÒ³
-936
-# RTL - anything else than RTL means LTR ÓÉÓÒÖÁ×óÊéд
--
-# Translator: Kii Ali <kiiali@cpatch.org>;Revision date: 2004-12-15
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) °²×°
-# ^UninstallCaption
-$(^Name) ½â³ý°²×°
-# ^LicenseSubCaption
-: Ðí¿É֤ЭÒé
-# ^ComponentsSubCaption
-: °²×°Ñ¡Ïî
-# ^DirSubCaption
-: °²×°Îļþ¼Ð
-# ^InstallingSubCaption
-: ÕýÔÚ°²×°
-# ^CompletedSubCaption
-: ÒÑÍê³É
-# ^UnComponentsSubCaption
-: ½â³ý°²×°Ñ¡Ïî
-# ^UnDirSubCaption
-: ½â³ý°²×°Îļþ¼Ð
-# ^ConfirmSubCaption
-: È·ÈÏ
-# ^UninstallingSubCaption
-: ÕýÔÚ½â³ý°²×°
-# ^UnCompletedSubCaption
-: Íê³É
-# ^BackBtn
-< ÉÏÒ»²½(&P)
-# ^NextBtn
-ÏÂÒ»²½(&N) >
-# ^AgreeBtn
-ÎÒ½ÓÊÜ(&I)
-# ^AcceptBtn
-ÎÒ½ÓÊÜ¡°Ðí¿É֤ЭÒ顱ÖеÄÌõ¿î(&A)
-# ^DontAcceptBtn
-ÎÒ²»½ÓÊÜ¡°Ðí¿É֤ЭÒ顱ÖеÄÌõ¿î(&N)
-# ^InstallBtn
-°²×°(&I)
-# ^UninstallBtn
-ÒƳý(&U)
-# ^CancelBtn
-È¡Ïû(&C)
-# ^CloseBtn
-¹Ø±Õ(&L)
-# ^BrowseBtn
-ä¯ÀÀ(&B)...
-# ^ShowDetailsBtn
-ÏÔʾϸ½Ú(&D)
-# ^ClickNext
-µ¥»÷ [ÏÂÒ»²½(N)] ¼ÌÐø¡£
-# ^ClickInstall
-µ¥»÷ [°²×°(I)] ¿ªÊ¼°²×°½ø³Ì¡£
-# ^ClickUninstall
-µ¥»÷ [½â³ý°²×°(U)] ¿ªÊ¼½â³ý°²×°½ø³Ì¡£
-# ^Name
-Ãû³Æ
-# ^Completed
-ÒÑÍê³É
-# ^LicenseText
-ÔÚ°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¡£
-# ^LicenseTextCB
-ÔÚ°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£ $_CLICK
-# ^LicenseTextRB
-ÔÚ°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬Ñ¡ÔñÏ·½µÄµÚÒ»¸öÑ¡Ïî¡£ $_CLICK
-# ^UnLicenseText
-ÔÚ½â³ý°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¡£
-# ^UnLicenseTextCB
-ÔÚ½â³ý°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£ $_CLICK
-# ^UnLicenseTextRB
-ÔÚ½â³ý°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬Ñ¡ÔñÏ·½µÄµÚÒ»¸öÑ¡Ïî¡£ $_CLICK
-# ^Custom
-×Ô¶¨Òå
-# ^ComponentsText
-¹´Ñ¡ÄãÏëÒª°²×°µÄ×é¼þ£¬²¢½â³ý¹´Ñ¡Ä㲻ϣÍû°²×°µÄ×é¼þ¡£ $_CLICK
-# ^ComponentsSubText1
-Ñ¡¶¨°²×°µÄÀàÐÍ:
-# ^ComponentsSubText2_NoInstTypes
-Ñ¡¶¨°²×°µÄ×é¼þ:
-# ^ComponentsSubText2
-»òÕߣ¬×Ô¶¨ÒåÑ¡¶¨Ïë°²×°µÄ×é¼þ:
-# ^UnComponentsText
-¹´Ñ¡ÄãÏëÒª½â³ý°²×°µÄ×é¼þ£¬²¢½â³ý¹´Ñ¡Ä㲻ϣÍû½â³ý°²×°µÄ×é¼þ¡£ $_CLICK
-# ^UnComponentsSubText1
-Ñ¡Ôñ½â³ý°²×°µÄÀàÐÍ:
-# ^UnComponentsSubText2_NoInstTypes
-Ñ¡ÔñÒª½â³ý°²×°µÄ×é¼þ:
-# ^UnComponentsSubText2
-»òÊÇ£¬Ñ¡ÔñÏëÒª½â³ý°²×°µÄ¿ÉÑ¡Ïî×é¼þ:
-# ^DirText
-Setup ½«°²×° $(^NameDA) ÔÚÏÂÁÐÎļþ¼Ð¡£Òª°²×°µ½²»Í¬Îļþ¼Ð£¬µ¥»÷ [ä¯ÀÀ(B)] ²¢Ñ¡ÔñÆäËûµÄÎļþ¼Ð¡£ $_CLICK
-# ^DirSubText
-Ä¿±êÎļþ¼Ð
-# ^DirBrowseText
-Ñ¡ÔñÒª°²×° $(^NameDA) µÄÎļþ¼ÐλÖÃ:
-# ^UnDirText
-Setup ½«½â³ý°²×° $(^NameDA) ÔÚÏÂÁÐÎļþ¼Ð¡£Òª½â³ý°²×°µ½²»Í¬Îļþ¼Ð£¬µ¥»÷ [ä¯ÀÀ(B)] ²¢Ñ¡ÔñÆäËûµÄÎļþ¼Ð¡£ $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Ñ¡ÔñÒª½â³ý°²×° $(^NameDA) µÄÎļþ¼ÐλÖÃ:
-# ^SpaceAvailable
-"¿ÉÓÿռä: "
-# ^SpaceRequired
-"ËùÐè¿Õ¼ä: "
-# ^UninstallingText
-Õâ¸öÏòµ¼½«´ÓÄãµÄ¼ÆËã»ú½â³ý°²×° $(^NameDA) ¡£ $_CLICK
-# ^UninstallingSubText
-½â³ý°²×°Ä¿Â¼:
-# ^FileError
-²»ÄÜ´ò¿ªÒªÐ´ÈëµÄÎļþ: \r\n\t"$0"\r\nµ¥»÷ [Abort] ·ÅÆú°²×°£¬\r\n [Retry] ÖØг¢ÊÔдÈëÎļþ£¬»ò\r\n [Ignore] ºöÂÔÕâ¸öÎļþ¡£
-# ^FileError_NoIgnore
-²»ÄÜ´ò¿ªÒªÐ´ÈëµÄÎļþ: \r\n\t"$0"\r\nµ¥»÷ [Retry] ÖØг¢ÊÔдÈëÎļþ£¬»ò\r\n [Cancel] È¡Ïû°²×°¡£
-# ^CantWrite
-"ÎÞ·¨Ð´Èë: "
-# ^CopyFailed
-"¸´ÖÆʧ°Ü "
-# ^CopyTo
-"¸´ÖƵ½: "
-# ^Registering
-"ÕýÔÚ×¢²á: "
-# ^Unregistering
-"ÕýÔÚ½â³ý×¢²á: "
-# ^SymbolNotFound
-"ÎÞ·¨ÕÒµ½·ûºÅ: "
-# ^CouldNotLoad
-"ÎÞ·¨¼ÓÔØ: "
-# ^CreateFolder
-"´´½¨Îļþ¼Ð: "
-# ^CreateShortcut
-"´´½¨¿ì½Ý·½Ê½: "
-# ^CreatedUninstaller
-"´´½¨½â³ý°²×°³ÌÐò: "
-# ^Delete
-"ɾ³ýÎļþ: "
-# ^DeleteOnReboot
-"ÖØÐÂÆô¶¯ºóɾ³ý: "
-# ^ErrorCreatingShortcut
-"ÕýÔÚ´´½¨¿ì½Ý·½Ê½Ê±·¢Éú´íÎó: "
-# ^ErrorCreating
-"ÕýÔÚ´´½¨Ê±·¢Éú´íÎó: "
-# ^ErrorDecompressing
-"ÕýÔÚ½âѹËõÊý¾Ý·¢Éú´íÎó£¡ÒÑË𻵵ݲװ³ÌÐò£¿"
-# ^ErrorRegistering
-"ÕýÔÚ×¢²á DLL ʱ·¢Éú´íÎó"
-# ^ExecShell
-"ÔËÐÐÍⲿ³ÌÐò: "
-# ^Exec
-"ÔËÐÐ: "
-# ^Extract
-"³éÈ¡: "
-# ^ErrorWriting
-"³éÈ¡: ÎÞ·¨Ð´ÈëÎļþ "
-# ^InvalidOpcode
-"°²×°Ëð»Ù: ÎÞЧµÄ²Ù×÷´úÂë "
-# ^NoOLE
-"ûÓÐ OLE ÓÃÓÚ: "
-# ^OutputFolder
-"Êä³öĿ¼: "
-# ^RemoveFolder
-"ÒƳýĿ¼: "
-# ^RenameOnReboot
-"ÖØÐÂÆô¶¯ºóÖØÃüÃû: "
-# ^Rename
-"ÖØÃüÃû: "
-# ^Skipped
-"ÒÑÌø¹ý: "
-# ^CopyDetails
-"¸´ÖÆϸ½Úµ½¼ôÌù°å "
-# ^LogInstall
-"ÈÕÖ¾°²×°½ø³Ì"
-# byte
-B
-# kilo
-K
-# mega
-M
-# giga
-G
+# Header, don't edit
+NLF v6
+# Language ID
+2052
+# Font and size - dash (-) means default ×ÖÌåÃû³ÆÓë´óС
+ËÎÌå
+9
+# Codepage - dash (-) means ANSI code page ANSI ×ÖÂëÒ³
+936
+# RTL - anything else than RTL means LTR ÓÉÓÒÖÁ×óÊéд
+-
+# Translator: Kii Ali <kiiali@cpatch.org>;Revision date: 2004-12-15
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) °²×°
+# ^UninstallCaption
+$(^Name) ½â³ý°²×°
+# ^LicenseSubCaption
+: Ðí¿É֤ЭÒé
+# ^ComponentsSubCaption
+: °²×°Ñ¡Ïî
+# ^DirSubCaption
+: °²×°Îļþ¼Ð
+# ^InstallingSubCaption
+: ÕýÔÚ°²×°
+# ^CompletedSubCaption
+: ÒÑÍê³É
+# ^UnComponentsSubCaption
+: ½â³ý°²×°Ñ¡Ïî
+# ^UnDirSubCaption
+: ½â³ý°²×°Îļþ¼Ð
+# ^ConfirmSubCaption
+: È·ÈÏ
+# ^UninstallingSubCaption
+: ÕýÔÚ½â³ý°²×°
+# ^UnCompletedSubCaption
+: Íê³É
+# ^BackBtn
+< ÉÏÒ»²½(&P)
+# ^NextBtn
+ÏÂÒ»²½(&N) >
+# ^AgreeBtn
+ÎÒ½ÓÊÜ(&I)
+# ^AcceptBtn
+ÎÒ½ÓÊÜ¡°Ðí¿É֤ЭÒ顱ÖеÄÌõ¿î(&A)
+# ^DontAcceptBtn
+ÎÒ²»½ÓÊÜ¡°Ðí¿É֤ЭÒ顱ÖеÄÌõ¿î(&N)
+# ^InstallBtn
+°²×°(&I)
+# ^UninstallBtn
+ÒƳý(&U)
+# ^CancelBtn
+È¡Ïû(&C)
+# ^CloseBtn
+¹Ø±Õ(&L)
+# ^BrowseBtn
+ä¯ÀÀ(&B)...
+# ^ShowDetailsBtn
+ÏÔʾϸ½Ú(&D)
+# ^ClickNext
+µ¥»÷ [ÏÂÒ»²½(N)] ¼ÌÐø¡£
+# ^ClickInstall
+µ¥»÷ [°²×°(I)] ¿ªÊ¼°²×°½ø³Ì¡£
+# ^ClickUninstall
+µ¥»÷ [½â³ý°²×°(U)] ¿ªÊ¼½â³ý°²×°½ø³Ì¡£
+# ^Name
+Ãû³Æ
+# ^Completed
+ÒÑÍê³É
+# ^LicenseText
+ÔÚ°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¡£
+# ^LicenseTextCB
+ÔÚ°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£ $_CLICK
+# ^LicenseTextRB
+ÔÚ°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬Ñ¡ÔñÏ·½µÄµÚÒ»¸öÑ¡Ïî¡£ $_CLICK
+# ^UnLicenseText
+ÔÚ½â³ý°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¡£
+# ^UnLicenseTextCB
+ÔÚ½â³ý°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£ $_CLICK
+# ^UnLicenseTextRB
+ÔÚ½â³ý°²×° $(^NameDA) ֮ǰÇë¼ìÔÄÐí¿É֤ЭÒé¡£Èç¹ûÄã½ÓÊÜЭÒéÖÐËùÓÐÌõ¿î£¬Ñ¡ÔñÏ·½µÄµÚÒ»¸öÑ¡Ïî¡£ $_CLICK
+# ^Custom
+×Ô¶¨Òå
+# ^ComponentsText
+¹´Ñ¡ÄãÏëÒª°²×°µÄ×é¼þ£¬²¢½â³ý¹´Ñ¡Ä㲻ϣÍû°²×°µÄ×é¼þ¡£ $_CLICK
+# ^ComponentsSubText1
+Ñ¡¶¨°²×°µÄÀàÐÍ:
+# ^ComponentsSubText2_NoInstTypes
+Ñ¡¶¨°²×°µÄ×é¼þ:
+# ^ComponentsSubText2
+»òÕߣ¬×Ô¶¨ÒåÑ¡¶¨Ïë°²×°µÄ×é¼þ:
+# ^UnComponentsText
+¹´Ñ¡ÄãÏëÒª½â³ý°²×°µÄ×é¼þ£¬²¢½â³ý¹´Ñ¡Ä㲻ϣÍû½â³ý°²×°µÄ×é¼þ¡£ $_CLICK
+# ^UnComponentsSubText1
+Ñ¡Ôñ½â³ý°²×°µÄÀàÐÍ:
+# ^UnComponentsSubText2_NoInstTypes
+Ñ¡ÔñÒª½â³ý°²×°µÄ×é¼þ:
+# ^UnComponentsSubText2
+»òÊÇ£¬Ñ¡ÔñÏëÒª½â³ý°²×°µÄ¿ÉÑ¡Ïî×é¼þ:
+# ^DirText
+Setup ½«°²×° $(^NameDA) ÔÚÏÂÁÐÎļþ¼Ð¡£Òª°²×°µ½²»Í¬Îļþ¼Ð£¬µ¥»÷ [ä¯ÀÀ(B)] ²¢Ñ¡ÔñÆäËûµÄÎļþ¼Ð¡£ $_CLICK
+# ^DirSubText
+Ä¿±êÎļþ¼Ð
+# ^DirBrowseText
+Ñ¡ÔñÒª°²×° $(^NameDA) µÄÎļþ¼ÐλÖÃ:
+# ^UnDirText
+Setup ½«½â³ý°²×° $(^NameDA) ÔÚÏÂÁÐÎļþ¼Ð¡£Òª½â³ý°²×°µ½²»Í¬Îļþ¼Ð£¬µ¥»÷ [ä¯ÀÀ(B)] ²¢Ñ¡ÔñÆäËûµÄÎļþ¼Ð¡£ $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Ñ¡ÔñÒª½â³ý°²×° $(^NameDA) µÄÎļþ¼ÐλÖÃ:
+# ^SpaceAvailable
+"¿ÉÓÿռä: "
+# ^SpaceRequired
+"ËùÐè¿Õ¼ä: "
+# ^UninstallingText
+Õâ¸öÏòµ¼½«´ÓÄãµÄ¼ÆËã»ú½â³ý°²×° $(^NameDA) ¡£ $_CLICK
+# ^UninstallingSubText
+½â³ý°²×°Ä¿Â¼:
+# ^FileError
+²»ÄÜ´ò¿ªÒªÐ´ÈëµÄÎļþ: \r\n\t"$0"\r\nµ¥»÷ [Abort] ·ÅÆú°²×°£¬\r\n [Retry] ÖØг¢ÊÔдÈëÎļþ£¬»ò\r\n [Ignore] ºöÂÔÕâ¸öÎļþ¡£
+# ^FileError_NoIgnore
+²»ÄÜ´ò¿ªÒªÐ´ÈëµÄÎļþ: \r\n\t"$0"\r\nµ¥»÷ [Retry] ÖØг¢ÊÔдÈëÎļþ£¬»ò\r\n [Cancel] È¡Ïû°²×°¡£
+# ^CantWrite
+"ÎÞ·¨Ð´Èë: "
+# ^CopyFailed
+"¸´ÖÆʧ°Ü "
+# ^CopyTo
+"¸´ÖƵ½: "
+# ^Registering
+"ÕýÔÚ×¢²á: "
+# ^Unregistering
+"ÕýÔÚ½â³ý×¢²á: "
+# ^SymbolNotFound
+"ÎÞ·¨ÕÒµ½·ûºÅ: "
+# ^CouldNotLoad
+"ÎÞ·¨¼ÓÔØ: "
+# ^CreateFolder
+"´´½¨Îļþ¼Ð: "
+# ^CreateShortcut
+"´´½¨¿ì½Ý·½Ê½: "
+# ^CreatedUninstaller
+"´´½¨½â³ý°²×°³ÌÐò: "
+# ^Delete
+"ɾ³ýÎļþ: "
+# ^DeleteOnReboot
+"ÖØÐÂÆô¶¯ºóɾ³ý: "
+# ^ErrorCreatingShortcut
+"ÕýÔÚ´´½¨¿ì½Ý·½Ê½Ê±·¢Éú´íÎó: "
+# ^ErrorCreating
+"ÕýÔÚ´´½¨Ê±·¢Éú´íÎó: "
+# ^ErrorDecompressing
+"ÕýÔÚ½âѹËõÊý¾Ý·¢Éú´íÎó£¡ÒÑË𻵵ݲװ³ÌÐò£¿"
+# ^ErrorRegistering
+"ÕýÔÚ×¢²á DLL ʱ·¢Éú´íÎó"
+# ^ExecShell
+"ÔËÐÐÍⲿ³ÌÐò: "
+# ^Exec
+"ÔËÐÐ: "
+# ^Extract
+"³éÈ¡: "
+# ^ErrorWriting
+"³éÈ¡: ÎÞ·¨Ð´ÈëÎļþ "
+# ^InvalidOpcode
+"°²×°Ëð»Ù: ÎÞЧµÄ²Ù×÷´úÂë "
+# ^NoOLE
+"ûÓÐ OLE ÓÃÓÚ: "
+# ^OutputFolder
+"Êä³öĿ¼: "
+# ^RemoveFolder
+"ÒƳýĿ¼: "
+# ^RenameOnReboot
+"ÖØÐÂÆô¶¯ºóÖØÃüÃû: "
+# ^Rename
+"ÖØÃüÃû: "
+# ^Skipped
+"ÒÑÌø¹ý: "
+# ^CopyDetails
+"¸´ÖÆϸ½Úµ½¼ôÌù°å "
+# ^LogInstall
+"ÈÕÖ¾°²×°½ø³Ì"
+# byte
+B
+# kilo
+K
+# mega
+M
+# giga
+G
diff --git a/Contrib/Language files/SimpChinese.nsh b/Contrib/Language files/SimpChinese.nsh
index 9160ebd..7066981 100755
--- a/Contrib/Language files/SimpChinese.nsh
+++ b/Contrib/Language files/SimpChinese.nsh
@@ -1,123 +1,123 @@
-;Language: 'Chinese (Simplified)' (2052)
-;Translator: Kii Ali <kiiali@cpatch.org>
-;Revision date: 2004-12-15
-;Verified by: QFox <qfox99@gmail.com>
-
-!insertmacro LANGFILE "SimpChinese" "Chinese (Simplified)"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "»¶Ó­Ê¹Óá°$(^NameDA)¡±°²×°Ïòµ¼"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Õâ¸öÏòµ¼½«Ö¸ÒýÄãÍê³É¡°$(^NameDA)¡±µÄ°²×°½ø³Ì¡£$\r$\n$\r$\nÔÚ¿ªÊ¼°²×°Ö®Ç°£¬½¨ÒéÏȹرÕÆäËûËùÓÐÓ¦ÓóÌÐò¡£Õ⽫ÔÊÐí¡°°²×°³ÌÐò¡±¸üÐÂÖ¸¶¨µÄϵͳÎļþ£¬¶ø²»ÐèÒªÖØÐÂÆô¶¯ÄãµÄ¼ÆËã»ú¡£$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "»¶Ó­Ê¹Óá°$(^NameDA)¡±Ð¶ÔØÏòµ¼"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Õâ¸öÏòµ¼½«È«³ÌÖ¸ÒýÄã¡°$(^NameDA)¡±µÄжÔؽø³Ì¡£$\r$\n$\r$\nÔÚ¿ªÊ¼Ð¶ÔØ֮ǰ£¬È·ÈÏ¡°$(^NameDA)¡±²¢Î´ÔËÐе±ÖС£$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ðí¿É֤ЭÒé"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ÔÚ°²×°¡°$(^NameDA)¡±Ö®Ç°£¬ÇëÔĶÁÊÚȨЭÒé¡£"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¼ÌÐø°²×°¡£Èç¹ûÄãÑ¡¶¨ [È¡Ïû(C)] £¬°²×°³ÌÐò½«»á¹Ø±Õ¡£±ØÐë½ÓÊÜЭÒé²ÅÄÜ°²×°¡°$(^NameDA)¡±¡£"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜ°²×° $(^NameDA)¡£$_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬Ñ¡ÔñÏ·½µÚÒ»¸öÑ¡Ïî¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜ°²×° $(^NameDA)¡£$_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ðí¿É֤ЭÒé"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ÔÚжÔØ¡°$(^NameDA)¡±Ö®Ç°£¬Çë¼ìÔÄÊÚȨÌõ¿î¡£"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¼ÌÐøжÔØ¡£Èç¹ûÄãÑ¡¶¨ [È¡Ïû(C)] £¬°²×°³ÌÐò½«»á¹Ø±Õ¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜжÔØ¡°$(^NameDA)¡±¡£"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜжÔØ $(^NameDA)¡£$_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬Ñ¡ÔñÏ·½µÚÒ»¸öÑ¡Ïî¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜжÔØ $(^NameDA)¡£$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "°´ [PgDn] ÔĶÁ¡°ÊÚȨЭÒ顱µÄÆäÓಿ·Ö¡£"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Ñ¡Ôñ×é¼þ"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Ñ¡ÔñÄãÏëÒª°²×°¡°$(^NameDA)¡±µÄÄÇЩ¹¦ÄÜ¡£"
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÃèÊö"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Ñ¡¶¨×é¼þ"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Ñ¡¶¨¡°$(^NameDA)¡±µ±ÖÐÄãÏëҪжÔصŦÄÜ¡£"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òƶ¯ÄãµÄÊó±êÖ¸Õëµ½×é¼þÖ®ÉÏ£¬±ã¿É¼ûµ½ËüµÄÃèÊö¡£"
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òƶ¯ÄãµÄÊó±êÖ¸Õëµ½×é¼þÖ®ÉÏ£¬±ã¿É¼ûµ½ËüµÄÃèÊö¡£"
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Ñ¡Ôñ°²×°Î»ÖÃ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Ñ¡Ôñ¡°$(^NameDA)¡±µÄ°²×°Îļþ¼Ð¡£"
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Ñ¡¶¨Ð¶ÔØλÖÃ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Ñ¡¶¨¡°$(^NameDA)¡±ÒªÐ¶ÔصÄÎļþ¼Ð¡£"
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ÕýÔÚ°²×°"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "¡°$(^NameDA)¡±ÕýÔÚ°²×°£¬ÇëµÈºò..."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "°²×°Íê³É"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "°²×°Òѳɹ¦Íê³É¡£"
- ${LangFileString} MUI_TEXT_ABORT_TITLE "°²×°¼ºÖÐÖ¹"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "°²×°Ã»Óгɹ¦¡£"
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÕýÔÚжÔØ"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "¡°$(^NameDA)¡±ÕýÔÚжÔØ£¬ÇëµÈºò..."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "жÔØÒÑÍê³É"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "жÔØÒѳɹ¦µØÍê³É¡£"
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "жÔØÒÑÖÐÖ¹"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "жÔسÌÐò²¢Î´³É¹¦µØÍê³É¡£"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÕýÔÚÍê³É¡°$(^NameDA)¡±°²×°Ïòµ¼"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "¡°$(^NameDA)¡±ÒÑ°²×°ÔÚÄãµÄϵͳ¡£$\r$\nµ¥»÷ [Íê³É(F)] ¹Ø±Õ´ËÏòµ¼¡£"
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "ÄãµÄϵͳÐèÒªÖØÐÂÆô¶¯£¬ÒÔ±ãÍê³É¡°$(^NameDA)¡±µÄ°²×°¡£ÏÖÔÚÒªÖØÐÂÆô¶¯Âð£¿"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÕýÔÚÍê³É¡°$(^NameDA)¡±Ð¶ÔØÏòµ¼"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "¡°$(^NameDA)¡±ÒÑ´ÓÄãµÄ¼ÆËã»úжÔØ¡£$\r$\n$\r$\nµ¥»÷ [Íê³É] ¹Ø±ÕÕâ¸öÏòµ¼¡£"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "¼ÆËã»úÐèÒªÖØÐÂÆô¶¯£¬ÒÔ±ãÍê³É¡°$(^NameDA)¡±µÄжÔØ¡£ÏÖÔÚÏëÒªÖØÐÂÆô¶¯Âð£¿"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÊÇ£¬ÏÖÔÚÖØÐÂÆô¶¯(&Y)"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "·ñ£¬ÎÒÉÔºóÔÙ×ÔÐÐÖØÐÂÆô¶¯(&N)"
- ${LangFileString} MUI_TEXT_FINISH_RUN "ÔËÐÐ $(^NameDA)(&R)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "ÏÔʾ¡°×ÔÊöÎļþ¡±(&M)"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "Íê³É(&F)"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Ñ¡Ôñ¡°¿ªÊ¼²Ëµ¥¡±Îļþ¼Ð"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Ñ¡Ôñ¡°¿ªÊ¼²Ëµ¥¡±Îļþ¼Ð£¬ÓÃÓÚ³ÌÐòµÄ¿ì½Ý·½Ê½¡£"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Ñ¡Ôñ¡°¿ªÊ¼²Ëµ¥¡±Îļþ¼Ð£¬ÒԱ㴴½¨³ÌÐòµÄ¿ì½Ý·½Ê½¡£ÄãÒ²¿ÉÒÔÊäÈëÃû³Æ£¬´´½¨ÐÂÎļþ¼Ð¡£"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "²»Òª´´½¨¿ì½Ý·½Ê½(&N)"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "жÔØ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "´ÓÄãµÄ¼ÆËã»úжÔØ¡°$(^NameDA)¡±"
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "ÄãȷʵҪÍ˳ö¡°$(^Name)¡±°²×°³ÌÐò£¿"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "ÄãȷʵҪÍ˳ö¡°$(^Name)¡±Ð¶ÔØÂð£¿"
-!endif
+;Language: 'Chinese (Simplified)' (2052)
+;Translator: Kii Ali <kiiali@cpatch.org>
+;Revision date: 2004-12-15
+;Verified by: QFox <qfox99@gmail.com>
+
+!insertmacro LANGFILE "SimpChinese" "Chinese (Simplified)"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "»¶Ó­Ê¹Óá°$(^NameDA)¡±°²×°Ïòµ¼"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Õâ¸öÏòµ¼½«Ö¸ÒýÄãÍê³É¡°$(^NameDA)¡±µÄ°²×°½ø³Ì¡£$\r$\n$\r$\nÔÚ¿ªÊ¼°²×°Ö®Ç°£¬½¨ÒéÏȹرÕÆäËûËùÓÐÓ¦ÓóÌÐò¡£Õ⽫ÔÊÐí¡°°²×°³ÌÐò¡±¸üÐÂÖ¸¶¨µÄϵͳÎļþ£¬¶ø²»ÐèÒªÖØÐÂÆô¶¯ÄãµÄ¼ÆËã»ú¡£$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "»¶Ó­Ê¹Óá°$(^NameDA)¡±Ð¶ÔØÏòµ¼"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Õâ¸öÏòµ¼½«È«³ÌÖ¸ÒýÄã¡°$(^NameDA)¡±µÄжÔؽø³Ì¡£$\r$\n$\r$\nÔÚ¿ªÊ¼Ð¶ÔØ֮ǰ£¬È·ÈÏ¡°$(^NameDA)¡±²¢Î´ÔËÐе±ÖС£$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Ðí¿É֤ЭÒé"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "ÔÚ°²×°¡°$(^NameDA)¡±Ö®Ç°£¬ÇëÔĶÁÊÚȨЭÒé¡£"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¼ÌÐø°²×°¡£Èç¹ûÄãÑ¡¶¨ [È¡Ïû(C)] £¬°²×°³ÌÐò½«»á¹Ø±Õ¡£±ØÐë½ÓÊÜЭÒé²ÅÄÜ°²×°¡°$(^NameDA)¡±¡£"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜ°²×° $(^NameDA)¡£$_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬Ñ¡ÔñÏ·½µÚÒ»¸öÑ¡Ïî¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜ°²×° $(^NameDA)¡£$_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Ðí¿É֤ЭÒé"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "ÔÚжÔØ¡°$(^NameDA)¡±Ö®Ç°£¬Çë¼ìÔÄÊÚȨÌõ¿î¡£"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷ [ÎÒͬÒâ(I)] ¼ÌÐøжÔØ¡£Èç¹ûÄãÑ¡¶¨ [È¡Ïû(C)] £¬°²×°³ÌÐò½«»á¹Ø±Õ¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜжÔØ¡°$(^NameDA)¡±¡£"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬µ¥»÷Ï·½µÄ¹´Ñ¡¿ò¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜжÔØ $(^NameDA)¡£$_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èç¹ûÄã½ÓÊÜЭÒéÖеÄÌõ¿î£¬Ñ¡ÔñÏ·½µÚÒ»¸öÑ¡Ïî¡£±ØÐëÒª½ÓÊÜЭÒé²ÅÄÜжÔØ $(^NameDA)¡£$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "°´ [PgDn] ÔĶÁ¡°ÊÚȨЭÒ顱µÄÆäÓಿ·Ö¡£"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Ñ¡Ôñ×é¼þ"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Ñ¡ÔñÄãÏëÒª°²×°¡°$(^NameDA)¡±µÄÄÇЩ¹¦ÄÜ¡£"
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÃèÊö"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Ñ¡¶¨×é¼þ"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Ñ¡¶¨¡°$(^NameDA)¡±µ±ÖÐÄãÏëҪжÔصŦÄÜ¡£"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òƶ¯ÄãµÄÊó±êÖ¸Õëµ½×é¼þÖ®ÉÏ£¬±ã¿É¼ûµ½ËüµÄÃèÊö¡£"
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Òƶ¯ÄãµÄÊó±êÖ¸Õëµ½×é¼þÖ®ÉÏ£¬±ã¿É¼ûµ½ËüµÄÃèÊö¡£"
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Ñ¡Ôñ°²×°Î»ÖÃ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Ñ¡Ôñ¡°$(^NameDA)¡±µÄ°²×°Îļþ¼Ð¡£"
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Ñ¡¶¨Ð¶ÔØλÖÃ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Ñ¡¶¨¡°$(^NameDA)¡±ÒªÐ¶ÔصÄÎļþ¼Ð¡£"
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "ÕýÔÚ°²×°"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "¡°$(^NameDA)¡±ÕýÔÚ°²×°£¬ÇëµÈºò..."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "°²×°Íê³É"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "°²×°Òѳɹ¦Íê³É¡£"
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "°²×°¼ºÖÐÖ¹"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "°²×°Ã»Óгɹ¦¡£"
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "ÕýÔÚжÔØ"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "¡°$(^NameDA)¡±ÕýÔÚжÔØ£¬ÇëµÈºò..."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "жÔØÒÑÍê³É"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "жÔØÒѳɹ¦µØÍê³É¡£"
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "жÔØÒÑÖÐÖ¹"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "жÔسÌÐò²¢Î´³É¹¦µØÍê³É¡£"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "ÕýÔÚÍê³É¡°$(^NameDA)¡±°²×°Ïòµ¼"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "¡°$(^NameDA)¡±ÒÑ°²×°ÔÚÄãµÄϵͳ¡£$\r$\nµ¥»÷ [Íê³É(F)] ¹Ø±Õ´ËÏòµ¼¡£"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "ÄãµÄϵͳÐèÒªÖØÐÂÆô¶¯£¬ÒÔ±ãÍê³É¡°$(^NameDA)¡±µÄ°²×°¡£ÏÖÔÚÒªÖØÐÂÆô¶¯Âð£¿"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "ÕýÔÚÍê³É¡°$(^NameDA)¡±Ð¶ÔØÏòµ¼"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "¡°$(^NameDA)¡±ÒÑ´ÓÄãµÄ¼ÆËã»úжÔØ¡£$\r$\n$\r$\nµ¥»÷ [Íê³É] ¹Ø±ÕÕâ¸öÏòµ¼¡£"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "¼ÆËã»úÐèÒªÖØÐÂÆô¶¯£¬ÒÔ±ãÍê³É¡°$(^NameDA)¡±µÄжÔØ¡£ÏÖÔÚÏëÒªÖØÐÂÆô¶¯Âð£¿"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÊÇ£¬ÏÖÔÚÖØÐÂÆô¶¯(&Y)"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "·ñ£¬ÎÒÉÔºóÔÙ×ÔÐÐÖØÐÂÆô¶¯(&N)"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "ÔËÐÐ $(^NameDA)(&R)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "ÏÔʾ¡°×ÔÊöÎļþ¡±(&M)"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "Íê³É(&F)"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Ñ¡Ôñ¡°¿ªÊ¼²Ëµ¥¡±Îļþ¼Ð"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Ñ¡Ôñ¡°¿ªÊ¼²Ëµ¥¡±Îļþ¼Ð£¬ÓÃÓÚ³ÌÐòµÄ¿ì½Ý·½Ê½¡£"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Ñ¡Ôñ¡°¿ªÊ¼²Ëµ¥¡±Îļþ¼Ð£¬ÒԱ㴴½¨³ÌÐòµÄ¿ì½Ý·½Ê½¡£ÄãÒ²¿ÉÒÔÊäÈëÃû³Æ£¬´´½¨ÐÂÎļþ¼Ð¡£"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "²»Òª´´½¨¿ì½Ý·½Ê½(&N)"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "жÔØ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "´ÓÄãµÄ¼ÆËã»úжÔØ¡°$(^NameDA)¡±"
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "ÄãȷʵҪÍ˳ö¡°$(^Name)¡±°²×°³ÌÐò£¿"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "ÄãȷʵҪÍ˳ö¡°$(^Name)¡±Ð¶ÔØÂð£¿"
+!endif
diff --git a/Contrib/Language files/Slovak.nlf b/Contrib/Language files/Slovak.nlf
index 2bcbf88..702523c 100755
--- a/Contrib/Language files/Slovak.nlf
+++ b/Contrib/Language files/Slovak.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1051
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translated by: Kypec, edited by: Marián Hikaník
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Inštalácia programu $(^Name)
-# ^UninstallCaption
-Odinštalovanie programu $(^Name)
-# ^LicenseSubCaption
-: Licenèná zmluva
-# ^ComponentsSubCaption
-: Možnosti inštalácie
-# ^DirSubCaption
-: Inštalaèný prieèinok
-# ^InstallingSubCaption
-: Prebieha inštalácia
-# ^CompletedSubCaption
-: Hotovo
-# ^UnComponentsSubCaption
-: Možnosti odinštalovania
-# ^UnDirSubCaption
-: Prieèinok s informáciami pre odinštalovanie
-# ^ConfirmSubCaption
-: Potvrdenie
-# ^UninstallingSubCaption
-: Odinštalováva sa
-# ^UnCompletedSubCaption
-: Hotovo
-# ^BackBtn
-< &Spä
-# ^NextBtn
-Ï&alej >
-# ^AgreeBtn
-&Súhlasím
-# ^AcceptBtn
-&Súhlasím s podmienkami licenènej zmluvy
-# ^DontAcceptBtn
-N&esúhlasím s podmienkami licenènej zmluvy
-# ^InstallBtn
-&Nainštalova
-# ^UninstallBtn
-&Odinštalova
-# ^CancelBtn
-Zruši
-# ^CloseBtn
-&Zatvori
-# ^BrowseBtn
-&Preh¾adáva...
-# ^ShowDetailsBtn
-&Podrobnosti
-# ^ClickNext
-Pre pokraèovanie v inštalácií kliknite na tlaèidlo Ïalej.
-# ^ClickInstall
-Pre spustenie inštalácie kliknite na tlaèidlo Nainštalova.
-# ^ClickUninstall
-Pre spustenie procesu odinštalovania kliknite na tlaèidlo Odinštalova.
-# ^Name
-Názov
-# ^Completed
-Hotovo
-# ^LicenseText
-Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
-# ^LicenseTextCB
-Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
-# ^LicenseTextRB
-Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
-# ^UnLicenseText
-Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
-# ^UnLicenseTextCB
-Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
-# ^UnLicenseTextRB
-Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
-# ^Custom
-Volite¾ná
-# ^ComponentsText
-Oznaète súèasti programu, ktoré chcete nainštalova a odznaète tie, ktoré nainštalova nechcete. $_CLICK
-# ^ComponentsSubText1
-Vyberte si typ inštalácie:
-# ^ComponentsSubText2_NoInstTypes
-Vyberte si tie súèasti programu, ktoré chcete nainštalova:
-# ^ComponentsSubText2
-Alebo oznaète volite¾né doplnky, ktoré chcete nainštalova:
-# ^UnComponentsText
-Oznaète súèasti programu, ktoré chcete odinštalova a odznaète tie, ktoré chcete ponecha nainštalované. $_CLICK
-# ^UnComponentsSubText1
-Zvo¾te typ deinštalácie:
-# ^UnComponentsSubText2_NoInstTypes
-Vyberte súèasti, ktoré chcete odinštalova:
-# ^UnComponentsSubText2
-Alebo oznaète volite¾né súèasti, ktoré chcete odinštalova:
-# ^DirText
-$(^NameDA) bude nainštalovaný do nasledujúceho prieèinka. Pre nainštalovanie do iného prieèinka, kliknite na tlaèidlo Preh¾adáva a vyberte iný prieèinok. $_CLICK
-# ^DirSubText
-Cie¾ový prieèinok
-# ^DirBrowseText
-Zvo¾te prieèinok, do ktorého bude program $(^NameDA) nainštalovaný:
-# ^UnDirText
-Inštalátor odinštaluje program $(^NameDA) z nasledujúceho prieèinka. Pre odinštalovanie z iného prieèinka kliknite na tlaèidlo Preh¾adáva a vyberte iný prieèinok. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Zvo¾te prieèinok, z ktorého bude program $(^NameDA) odinštalovaný:
-# ^SpaceAvailable
-"Vo¾né miesto na disku: "
-# ^SpaceRequired
-"Miesto potrebné na disku: "
-# ^UninstallingText
-Program $(^NameDA) bude odinštalovaný z nasledujúceho prieèinka. $_CLICK
-# ^UninstallingSubText
-Prebieha odinštalovanie z:
-# ^FileError
-Chyba pri otváraní súboru pre zápis: \r\n\r\n$0\r\n\r\n. Ak chcete inštaláciu ukonèi, kliknite na tlaèidlo Ukonèi,\r\ ak chcete zápis súboru zopakova, kliknite na tlaèidlo Opakova, alebo kliknite na tlaèidlo \r\nIgnorova, ak chcete inštaláciu tohto súboru vynecha.
-# ^FileError_NoIgnore
-Chyba pri otváraní súboru pre zápis: \r\n\r\n$0\r\n\r\n. Ak chcete zopakova zápis súboru, kliknite na tlaèidlo Opakova, alebo kliknite na tlaèidlo \r\nZruši, v prípade, že chcete inštaláciu ukonèi.
-# ^CantWrite
-"Nemožno zapísa súbor: "
-# ^CopyFailed
-Kopírovanie nebolo úspešné.
-# ^CopyTo
-"Kopírova do "
-# ^Registering
-"Registruje sa: "
-# ^Unregistering
-"Vymazáva sa z registrov: "
-# ^SymbolNotFound
-"Nemožno nájs symbol: "
-# ^CouldNotLoad
-"Nemožno naèíta: "
-# ^CreateFolder
-"Vytvorený prieèinok: "
-# ^CreateShortcut
-"Vytvorený odkaz: "
-# ^CreatedUninstaller
-"Program pre odinštalovanie: "
-# ^Delete
-"Vymazaný súbor: "
-# ^DeleteOnReboot
-"Vymaza po reštartovaní systému: "
-# ^ErrorCreatingShortcut
-"Chyba pri vytváraní odkazu: "
-# ^ErrorCreating
-"Chyba pri vytváraní: "
-# ^ErrorDecompressing
-Chyba pri dekomprimovaní dát! Inštalátor je pravdepodobne poškodený...
-# ^ErrorRegistering
-Chyba pri registrácií súèasti
-# ^ExecShell
-"Vykona príkaz: "
-# ^Exec
-"Spusti: "
-# ^Extract
-"Extrahova: "
-# ^ErrorWriting
-"Chyba pri zápise do súboru "
-# ^InvalidOpcode
-Inštalátor je pravdepodobne poškodený, pretože obsahuje neplatný operaèný kód.
-# ^NoOLE
-"Žiadny zápis OLE pre: "
-# ^OutputFolder
-"Výstupný prieèinok: "
-# ^RemoveFolder
-"Odstráni prieèinok: "
-# ^RenameOnReboot
-"Premenova po reštartovaní systému: "
-# ^Rename
-"Premenova: "
-# ^Skipped
-"Vynechané: "
-# ^CopyDetails
-Skopírova podrobnosti do schránky
-# ^LogInstall
-Zaznamena priebeh inštalácie
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1051
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translated by: Kypec, edited by: Marián Hikaník
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Inštalácia programu $(^Name)
+# ^UninstallCaption
+Odinštalovanie programu $(^Name)
+# ^LicenseSubCaption
+: Licenèná zmluva
+# ^ComponentsSubCaption
+: Možnosti inštalácie
+# ^DirSubCaption
+: Inštalaèný prieèinok
+# ^InstallingSubCaption
+: Prebieha inštalácia
+# ^CompletedSubCaption
+: Hotovo
+# ^UnComponentsSubCaption
+: Možnosti odinštalovania
+# ^UnDirSubCaption
+: Prieèinok s informáciami pre odinštalovanie
+# ^ConfirmSubCaption
+: Potvrdenie
+# ^UninstallingSubCaption
+: Odinštalováva sa
+# ^UnCompletedSubCaption
+: Hotovo
+# ^BackBtn
+< &Spä
+# ^NextBtn
+Ï&alej >
+# ^AgreeBtn
+&Súhlasím
+# ^AcceptBtn
+&Súhlasím s podmienkami licenènej zmluvy
+# ^DontAcceptBtn
+N&esúhlasím s podmienkami licenènej zmluvy
+# ^InstallBtn
+&Nainštalova
+# ^UninstallBtn
+&Odinštalova
+# ^CancelBtn
+Zruši
+# ^CloseBtn
+&Zatvori
+# ^BrowseBtn
+&Preh¾adáva...
+# ^ShowDetailsBtn
+&Podrobnosti
+# ^ClickNext
+Pre pokraèovanie v inštalácií kliknite na tlaèidlo Ïalej.
+# ^ClickInstall
+Pre spustenie inštalácie kliknite na tlaèidlo Nainštalova.
+# ^ClickUninstall
+Pre spustenie procesu odinštalovania kliknite na tlaèidlo Odinštalova.
+# ^Name
+Názov
+# ^Completed
+Hotovo
+# ^LicenseText
+Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
+# ^LicenseTextCB
+Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
+# ^LicenseTextRB
+Pred inštaláciou programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
+# ^UnLicenseText
+Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, kliknite na tlaèidlo Súhlasím.
+# ^UnLicenseTextCB
+Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, zaškrtnite nasledujúce políèko. $_CLICK
+# ^UnLicenseTextRB
+Pred odinštalovaním programu si prosím dôkladne preèítajte licenènú zmluvu $(^NameDA). Ak súhlasíte so všetkými jej podmienkami, oznaète prvú z nasledujúcich možností. $_CLICK
+# ^Custom
+Volite¾ná
+# ^ComponentsText
+Oznaète súèasti programu, ktoré chcete nainštalova a odznaète tie, ktoré nainštalova nechcete. $_CLICK
+# ^ComponentsSubText1
+Vyberte si typ inštalácie:
+# ^ComponentsSubText2_NoInstTypes
+Vyberte si tie súèasti programu, ktoré chcete nainštalova:
+# ^ComponentsSubText2
+Alebo oznaète volite¾né doplnky, ktoré chcete nainštalova:
+# ^UnComponentsText
+Oznaète súèasti programu, ktoré chcete odinštalova a odznaète tie, ktoré chcete ponecha nainštalované. $_CLICK
+# ^UnComponentsSubText1
+Zvo¾te typ deinštalácie:
+# ^UnComponentsSubText2_NoInstTypes
+Vyberte súèasti, ktoré chcete odinštalova:
+# ^UnComponentsSubText2
+Alebo oznaète volite¾né súèasti, ktoré chcete odinštalova:
+# ^DirText
+$(^NameDA) bude nainštalovaný do nasledujúceho prieèinka. Pre nainštalovanie do iného prieèinka, kliknite na tlaèidlo Preh¾adáva a vyberte iný prieèinok. $_CLICK
+# ^DirSubText
+Cie¾ový prieèinok
+# ^DirBrowseText
+Zvo¾te prieèinok, do ktorého bude program $(^NameDA) nainštalovaný:
+# ^UnDirText
+Inštalátor odinštaluje program $(^NameDA) z nasledujúceho prieèinka. Pre odinštalovanie z iného prieèinka kliknite na tlaèidlo Preh¾adáva a vyberte iný prieèinok. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Zvo¾te prieèinok, z ktorého bude program $(^NameDA) odinštalovaný:
+# ^SpaceAvailable
+"Vo¾né miesto na disku: "
+# ^SpaceRequired
+"Miesto potrebné na disku: "
+# ^UninstallingText
+Program $(^NameDA) bude odinštalovaný z nasledujúceho prieèinka. $_CLICK
+# ^UninstallingSubText
+Prebieha odinštalovanie z:
+# ^FileError
+Chyba pri otváraní súboru pre zápis: \r\n\r\n$0\r\n\r\n. Ak chcete inštaláciu ukonèi, kliknite na tlaèidlo Ukonèi,\r\ ak chcete zápis súboru zopakova, kliknite na tlaèidlo Opakova, alebo kliknite na tlaèidlo \r\nIgnorova, ak chcete inštaláciu tohto súboru vynecha.
+# ^FileError_NoIgnore
+Chyba pri otváraní súboru pre zápis: \r\n\r\n$0\r\n\r\n. Ak chcete zopakova zápis súboru, kliknite na tlaèidlo Opakova, alebo kliknite na tlaèidlo \r\nZruši, v prípade, že chcete inštaláciu ukonèi.
+# ^CantWrite
+"Nemožno zapísa súbor: "
+# ^CopyFailed
+Kopírovanie nebolo úspešné.
+# ^CopyTo
+"Kopírova do "
+# ^Registering
+"Registruje sa: "
+# ^Unregistering
+"Vymazáva sa z registrov: "
+# ^SymbolNotFound
+"Nemožno nájs symbol: "
+# ^CouldNotLoad
+"Nemožno naèíta: "
+# ^CreateFolder
+"Vytvorený prieèinok: "
+# ^CreateShortcut
+"Vytvorený odkaz: "
+# ^CreatedUninstaller
+"Program pre odinštalovanie: "
+# ^Delete
+"Vymazaný súbor: "
+# ^DeleteOnReboot
+"Vymaza po reštartovaní systému: "
+# ^ErrorCreatingShortcut
+"Chyba pri vytváraní odkazu: "
+# ^ErrorCreating
+"Chyba pri vytváraní: "
+# ^ErrorDecompressing
+Chyba pri dekomprimovaní dát! Inštalátor je pravdepodobne poškodený...
+# ^ErrorRegistering
+Chyba pri registrácií súèasti
+# ^ExecShell
+"Vykona príkaz: "
+# ^Exec
+"Spusti: "
+# ^Extract
+"Extrahova: "
+# ^ErrorWriting
+"Chyba pri zápise do súboru "
+# ^InvalidOpcode
+Inštalátor je pravdepodobne poškodený, pretože obsahuje neplatný operaèný kód.
+# ^NoOLE
+"Žiadny zápis OLE pre: "
+# ^OutputFolder
+"Výstupný prieèinok: "
+# ^RemoveFolder
+"Odstráni prieèinok: "
+# ^RenameOnReboot
+"Premenova po reštartovaní systému: "
+# ^Rename
+"Premenova: "
+# ^Skipped
+"Vynechané: "
+# ^CopyDetails
+Skopírova podrobnosti do schránky
+# ^LogInstall
+Zaznamena priebeh inštalácie
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Slovak.nsh b/Contrib/Language files/Slovak.nsh
index 401c022..73c0592 100755
--- a/Contrib/Language files/Slovak.nsh
+++ b/Contrib/Language files/Slovak.nsh
@@ -1,121 +1,121 @@
-;Language: Slovak (1051)
-;Translated by: Kypec (peter.dzugas@mahe.sk), edited by: Marián Hikaník (podnety@mojepreklady.net)
-
-!insertmacro LANGFILE "Slovak" "Slovensky"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi inštaláciou programu $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tento sprievodca Vás prevedie inštaláciou $(^NameDA).$\r$\n$\r$\nPred zaèiatkom inštalácie sa odporúèa ukonèi všetky ostatné programy. Tým umožníte aktualizovanie systémových súborov bez potreby reštartovania Vášho poèítaèa.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi odinštalovaním programu $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento sprievodca Vás prevedie procesom odinštalovania programu $(^NameDA).$\r$\n$\r$\nPred spustením procesu odinštalovania sa uistite, že program $(^NameDA) nie je práve aktívny.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèná zmluva"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pred inštaláciou $(^NameDA) si prosím preštudujte licenèné podmienky."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, kliknite na tlaèidlo Súhlasím a môžete pokraèova v inštalácií. Ak chcete v inštalácií pokraèova, musíte odsúhlasi podmienky licenènej zmluvy $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Ak chcete v inštalácií pokraèova, musíte odsúhlasi podmienky licenènej zmluvy $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami zmluvy, oznaète prvú z nižšie uvedených možností. Ak chcete v inštalácií pokraèova, musíte odsúhlasi podmienky licenènej zmluvy $(^NameDA)."
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèná zmluva"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pred odinštalovaním programu $(^NameDA) si prosím preèítajte licenèné podmienky."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, zvo¾te Súhlasím. Licenènú zmluvu musíte odsúhlasi, ak chcete v odinštalovávaní programu $(^NameDA) pokraèova."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Licenènú zmluvu musíte odsúhlasi, ak chcete pokraèova v odinštalovávaní programu $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami licenènej zmluvy, oznaète prvú z nižšie uvedených možností. Licenènú zmluvu musíte odsúhlasi, ak chcete pokraèova v odinštalovávaní programu $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Stlaèením klávesy Page Down posuniete text licenènej zmluvy."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vo¾ba súèastí programu"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zvo¾te si tie súèasti programu $(^NameDA), ktoré chcete nainštalova."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Popis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vo¾ba súèastí"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zvo¾te súèasti programu $(^NameDA), ktoré chcete odinštalova."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vo¾ba umiestnenia programu"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, do ktorého chcete nainštalova program $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Umiestenie programu pre odinštalovanie"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, z ktorého chcete odinštalova program $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Inštalácia"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Poèkajte prosím, kým prebehne inštalácia programu $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Ukonèenie inštalácie"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Inštalácia bola dokonèená úspešne."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Prerušenie inštalácie"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Inštaláciu sa nepodarilo dokonèi."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odinštalovanie"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Èakajte prosím, kým prebehne odinštalovanie programu $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ukonèenie odinštalovania"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinštalovanie bolo úspešne dokonèené."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Prerušenie odinštalovania"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odinštalovanie sa neukonèilo úspešne."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dokonèenie inštalácie programu $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol nainštalovaný do Vášho poèítaèa.$\r$\nKliknite na tlaèidlo Dokonèi a tento sprievodca sa ukonèí."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie inštalácie programu $(^NameDA) je potrebné reštartova Váš poèítaè. Chcete ho reštartova ihneï?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Dokonèenie sprievodcu odinštalovaním"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol odinštalovaný z Vášho poèítaèa.$\r$\n$\r$\nKliknite na tlaèidlo Dokonèi a tento sprievodca sa ukonèí."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie odinštalovania programu $(^NameDA) je nutné reštartova Váš poèítaè. Chcete ho reštartova ihneï?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reštartova teraz"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reštartova neskôr (manuálne)"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Spusti program $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Zobrazi súbor s informáciami"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Dokonèi"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vo¾ba umiestnenia v ponuke Štart"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vyberte si zložku v ponuke Štart, kam sa umiestnia odkazy na program $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vyberte si zložku v ponuke Štart, v ktorej chcete vytvori odkazy na program. Takisto môžte napísa názov pre vytvorenie novej zložky."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nevytvára odkazy"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinštalovanie programu $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odstránenie programu $(^NameDA) z Vášho poèítaèa."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Naozaj chcete ukonèi inštaláciu programu $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Naozaj chcete ukonèi proces odinštalovania programu $(^Name)?"
-!endif
+;Language: Slovak (1051)
+;Translated by: Kypec (peter.dzugas@mahe.sk), edited by: Marián Hikaník (podnety@mojepreklady.net)
+
+!insertmacro LANGFILE "Slovak" "Slovensky"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi inštaláciou programu $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Tento sprievodca Vás prevedie inštaláciou $(^NameDA).$\r$\n$\r$\nPred zaèiatkom inštalácie sa odporúèa ukonèi všetky ostatné programy. Tým umožníte aktualizovanie systémových súborov bez potreby reštartovania Vášho poèítaèa.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Vitajte v sprievodcovi odinštalovaním programu $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Tento sprievodca Vás prevedie procesom odinštalovania programu $(^NameDA).$\r$\n$\r$\nPred spustením procesu odinštalovania sa uistite, že program $(^NameDA) nie je práve aktívny.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèná zmluva"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Pred inštaláciou $(^NameDA) si prosím preštudujte licenèné podmienky."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, kliknite na tlaèidlo Súhlasím a môžete pokraèova v inštalácií. Ak chcete v inštalácií pokraèova, musíte odsúhlasi podmienky licenènej zmluvy $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Ak chcete v inštalácií pokraèova, musíte odsúhlasi podmienky licenènej zmluvy $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami zmluvy, oznaète prvú z nižšie uvedených možností. Ak chcete v inštalácií pokraèova, musíte odsúhlasi podmienky licenènej zmluvy $(^NameDA)."
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèná zmluva"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Pred odinštalovaním programu $(^NameDA) si prosím preèítajte licenèné podmienky."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Ak súhlasíte s podmienkami zmluvy, zvo¾te Súhlasím. Licenènú zmluvu musíte odsúhlasi, ak chcete v odinštalovávaní programu $(^NameDA) pokraèova."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Ak súhlasíte s podmienkami zmluvy, zaškrtnite nižšie uvedené políèko. Licenènú zmluvu musíte odsúhlasi, ak chcete pokraèova v odinštalovávaní programu $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Ak súhlasíte s podmienkami licenènej zmluvy, oznaète prvú z nižšie uvedených možností. Licenènú zmluvu musíte odsúhlasi, ak chcete pokraèova v odinštalovávaní programu $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Stlaèením klávesy Page Down posuniete text licenènej zmluvy."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Vo¾ba súèastí programu"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Zvo¾te si tie súèasti programu $(^NameDA), ktoré chcete nainštalova."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Popis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Vo¾ba súèastí"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Zvo¾te súèasti programu $(^NameDA), ktoré chcete odinštalova."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Pri prejdení kurzorom myši nad názvom súèasti sa zobrazí jej popis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Vo¾ba umiestnenia programu"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, do ktorého chcete nainštalova program $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Umiestenie programu pre odinštalovanie"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Vyberte si prieèinok, z ktorého chcete odinštalova program $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Inštalácia"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Poèkajte prosím, kým prebehne inštalácia programu $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Ukonèenie inštalácie"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Inštalácia bola dokonèená úspešne."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Prerušenie inštalácie"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Inštaláciu sa nepodarilo dokonèi."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odinštalovanie"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Èakajte prosím, kým prebehne odinštalovanie programu $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Ukonèenie odinštalovania"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odinštalovanie bolo úspešne dokonèené."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Prerušenie odinštalovania"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odinštalovanie sa neukonèilo úspešne."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Dokonèenie inštalácie programu $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol nainštalovaný do Vášho poèítaèa.$\r$\nKliknite na tlaèidlo Dokonèi a tento sprievodca sa ukonèí."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie inštalácie programu $(^NameDA) je potrebné reštartova Váš poèítaè. Chcete ho reštartova ihneï?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Dokonèenie sprievodcu odinštalovaním"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Program $(^NameDA) bol odinštalovaný z Vášho poèítaèa.$\r$\n$\r$\nKliknite na tlaèidlo Dokonèi a tento sprievodca sa ukonèí."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Pre úplné dokonèenie odinštalovania programu $(^NameDA) je nutné reštartova Váš poèítaè. Chcete ho reštartova ihneï?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reštartova teraz"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Reštartova neskôr (manuálne)"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Spusti program $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Zobrazi súbor s informáciami"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Dokonèi"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Vo¾ba umiestnenia v ponuke Štart"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Vyberte si zložku v ponuke Štart, kam sa umiestnia odkazy na program $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Vyberte si zložku v ponuke Štart, v ktorej chcete vytvori odkazy na program. Takisto môžte napísa názov pre vytvorenie novej zložky."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Nevytvára odkazy"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odinštalovanie programu $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odstránenie programu $(^NameDA) z Vášho poèítaèa."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Naozaj chcete ukonèi inštaláciu programu $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Naozaj chcete ukonèi proces odinštalovania programu $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Slovenian.nlf b/Contrib/Language files/Slovenian.nlf
index 5581b2a..8f76654 100755
--- a/Contrib/Language files/Slovenian.nlf
+++ b/Contrib/Language files/Slovenian.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1060
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1250
-# RTL - anything else than RTL means LTR
--
-# Translation by Janez Dolinar, edited by Martin Srebotnjak - Lugos.si
-# ^Branding
-Namestitveni sistem Nullsoft %s
-# ^SetupCaption
-Namestitev $(^Name)
-# ^UninstallCaption
-Odstranitev $(^Name)
-# ^LicenseSubCaption
-: Licenèna pogodba
-# ^ComponentsSubCaption
-: Možnosti namestitve
-# ^DirSubCaption
-: Mapa namestitve
-# ^InstallingSubCaption
-: Namešèanje poteka
-# ^CompletedSubCaption
-: Dokonèano
-# ^UnComponentsSubCaption
-: Možnosti odstranitve
-# ^UnDirSubCaption
-: Mapa odstranitve
-# ^ConfirmSubCaption
-: Potrditev
-# ^UninstallingSubCaption
-: Odstranjevanje poteka
-# ^UnCompletedSubCaption
-: Dokonèano
-# ^BackBtn
-< &Nazaj
-# ^NextBtn
-N&aprej >
-# ^AgreeBtn
-Se &strinjam
-# ^AcceptBtn
-&Sprejmem pogoje licenène pogodbe
-# ^DontAcceptBtn
-&Ne sprejmem pogojev licenène pogodbe
-# ^InstallBtn
-&Namesti
-# ^UninstallBtn
-&Odstrani
-# ^CancelBtn
-Preklièi
-# ^CloseBtn
-&Zapri
-# ^BrowseBtn
-Prebrsk&aj ...
-# ^ShowDetailsBtn
-&Podrobnosti
-# ^ClickNext
-Pritisnite tipko Naprej za nadaljevanje.
-# ^ClickInstall
-Pritisnite tipko Namesti za zaèetek namestitve.
-# ^ClickUninstall
-Pritisnite tipko Odstrani za odstranitev.
-# ^NameIme
-Ime
-# ^Completed
-Dokonèano
-# ^LicenseText
-Prosimo, da pred namestitvijo $(^NameDA) pregledate licenèno pogodbo. Èe se z njo strinjate, pritisnite Se strinjam.
-# ^LicenseTextCB
-Prosimo, da pred namestitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, obkljukajte spodnje okence. $_CLICK
-# ^LicenseTextRB
-Prosimo, da pred namestitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, izberite prvo spodaj podano možnost. $_CLICK
-# ^UnLicenseText
-Prosimo, da pred odstranitvijo $(^NameDA) pregledate licenèno pogodbo. Èe se z njo strinjate, pritisnite Se strinjam.
-# ^UnLicenseTextCB
-Prosimo, da pred odstranitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, obkljukajte spodnje okence. $_CLICK
-# ^UnLicenseTextRB
-Prosimo, da pred odstranitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, izberite prvo spodaj podano možnost. $_CLICK
-# ^Custom
-Po meri ...
-# ^ComponentsText
-Oznaèite komponente, ki jih želite namestiti, in pustite neoznaèene tiste, katerih ne želite namestiti. $_CLICK
-# ^ComponentsSubText1
-Izberite vrsto namestitve:
-# ^ComponentsSubText2_NoInstTypes
-Izberite komponente namestitve:
-# ^ComponentsSubText2
-Ali pa izberite komponente, ki jih želite namestiti:
-# ^UnComponentsText
-Oznaèite komponente, ki jih želite odstraniti, in pustite neoznaèene tiste, ki jih ne želite odstraniti. $_CLICK
-# ^UnComponentsSubText1
-Izberite vrsto odstranitve:
-# ^UnComponentsSubText2_NoInstTypes
-Izberite komponente za odstranitev:
-# ^UnComponentsSubText2
-Ali pa izberite komponente namestitve, ki jih želite odstraniti:
-# ^DirText
-$(^NameDA) boste namestili v sledeèo mapo. Za izbiro druge mape kliknite tipko Prebrskaj in izberite drugo mapo. $_CLICK
-# ^DirSubText
-Ciljna mapa
-# ^DirBrowseText
-Izberite mapo, kamor želite namestiti $(^NameDA):
-# ^UnDirText
-Odstranili boste $(^NameDA) iz sledeèe mape. Za izbiro druge mape kliknite tipko Prebrskaj in izberite drugo mapo. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Izberite mapo, od koder želite odstraniti $(^NameDA):
-# ^SpaceAvailable
-"Prostor na disku: "
-# ^SpaceRequired
-"Potreben prostor: "
-# ^UninstallingText
-$(^NameDA) bo odstranjen iz naslednje mape. $_CLICK
-# ^UninstallingSubText
-Odstranjevanje iz:
-# ^FileError
-Napaka pri odpiranju datoteke za pisanje: \r\n\r\n$0\r\n\r\nPritisnite Prekini za prekinitev namestitve,\r\nPonovi za ponoven poskus ali\r\nPrezri za izpust te datoteke.
-# ^FileError_NoIgnore
-Napaka pri odpiranju datoteke za pisanje: \r\n\r\n$0\r\n\r\nPritisnite Ponovi za ponoven poskus pisanja ali\r\Preklièi za prekinitev namestitve.
-# ^CantWrite
-"Ni mogoèe pisati: "
-# ^CopyFailed
-Kopiranje neuspešno
-# ^CopyTo
-"Kopiranje v "
-# ^Registering
-"Registracija: "
-# ^Unregistering
-"Preklic registracije: "
-# ^SymbolNotFound
-"Ni mogoèe najti simbola: "
-# ^CouldNotLoad
-"Ni mogoèe naložiti: "
-# ^CreateFolder
-"Ustvarjanje mape: "
-# ^CreateShortcut
-"Ustvarjanje bližnjice: "
-# ^CreatedUninstaller
-"Ustvarjena odstranitev: "
-# ^Delete
-"Brisanje datoteke: "
-# ^DeleteOnReboot
-"Brisanje ob ponovnem zagonu: "
-# ^ErrorCreatingShortcut
-"Napaka ustvarjanja bližnjice: "
-# ^ErrorCreating
-"Napaka ustvarjanja: "
-# ^ErrorDecompressing
-Napaka pri razširjanju podatkov! Je namestitvena datoteka okvarjena?
-# ^ErrorRegistering
-Napaka registracije DLL
-# ^ExecShell
-"Izvajanje ExecShell: "
-# ^Exec
-"Izvajanje Execute: "
-# ^Extract
-"Razširjanje: "
-# ^ErrorWriting
-"Razširjanje: napaka pri pisanju v datoteko "
-# ^InvalidOpcode
-Namestitev neveljavna: napaèen ukaz
-# ^NoOLE
-"Neobstojeèi OLE za: "
-# ^OutputFolder
-"Ciljna mapa: "
-# ^RemoveFolder
-"Odstranjevanje mape: "
-# ^RenameOnReboot
-"Preimenovanje ob zagonu: "
-# ^Rename
-"Preimenovanje: "
-# ^Skipped
-"Izpušèeno: "
-# ^CopyDetails
-Kopiraj podrobnosti v odlagališèe
-# ^LogInstall
-Shrani potek namestitve
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1060
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1250
+# RTL - anything else than RTL means LTR
+-
+# Translation by Janez Dolinar, edited by Martin Srebotnjak - Lugos.si
+# ^Branding
+Namestitveni sistem Nullsoft %s
+# ^SetupCaption
+Namestitev $(^Name)
+# ^UninstallCaption
+Odstranitev $(^Name)
+# ^LicenseSubCaption
+: Licenèna pogodba
+# ^ComponentsSubCaption
+: Možnosti namestitve
+# ^DirSubCaption
+: Mapa namestitve
+# ^InstallingSubCaption
+: Namešèanje poteka
+# ^CompletedSubCaption
+: Dokonèano
+# ^UnComponentsSubCaption
+: Možnosti odstranitve
+# ^UnDirSubCaption
+: Mapa odstranitve
+# ^ConfirmSubCaption
+: Potrditev
+# ^UninstallingSubCaption
+: Odstranjevanje poteka
+# ^UnCompletedSubCaption
+: Dokonèano
+# ^BackBtn
+< &Nazaj
+# ^NextBtn
+N&aprej >
+# ^AgreeBtn
+Se &strinjam
+# ^AcceptBtn
+&Sprejmem pogoje licenène pogodbe
+# ^DontAcceptBtn
+&Ne sprejmem pogojev licenène pogodbe
+# ^InstallBtn
+&Namesti
+# ^UninstallBtn
+&Odstrani
+# ^CancelBtn
+Preklièi
+# ^CloseBtn
+&Zapri
+# ^BrowseBtn
+Prebrsk&aj ...
+# ^ShowDetailsBtn
+&Podrobnosti
+# ^ClickNext
+Pritisnite tipko Naprej za nadaljevanje.
+# ^ClickInstall
+Pritisnite tipko Namesti za zaèetek namestitve.
+# ^ClickUninstall
+Pritisnite tipko Odstrani za odstranitev.
+# ^NameIme
+Ime
+# ^Completed
+Dokonèano
+# ^LicenseText
+Prosimo, da pred namestitvijo $(^NameDA) pregledate licenèno pogodbo. Èe se z njo strinjate, pritisnite Se strinjam.
+# ^LicenseTextCB
+Prosimo, da pred namestitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, obkljukajte spodnje okence. $_CLICK
+# ^LicenseTextRB
+Prosimo, da pred namestitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, izberite prvo spodaj podano možnost. $_CLICK
+# ^UnLicenseText
+Prosimo, da pred odstranitvijo $(^NameDA) pregledate licenèno pogodbo. Èe se z njo strinjate, pritisnite Se strinjam.
+# ^UnLicenseTextCB
+Prosimo, da pred odstranitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, obkljukajte spodnje okence. $_CLICK
+# ^UnLicenseTextRB
+Prosimo, da pred odstranitvijo $(^NameDA) pregledate licenèno pogodbo. Èe sprejmete vse naštete pogoje, izberite prvo spodaj podano možnost. $_CLICK
+# ^Custom
+Po meri ...
+# ^ComponentsText
+Oznaèite komponente, ki jih želite namestiti, in pustite neoznaèene tiste, katerih ne želite namestiti. $_CLICK
+# ^ComponentsSubText1
+Izberite vrsto namestitve:
+# ^ComponentsSubText2_NoInstTypes
+Izberite komponente namestitve:
+# ^ComponentsSubText2
+Ali pa izberite komponente, ki jih želite namestiti:
+# ^UnComponentsText
+Oznaèite komponente, ki jih želite odstraniti, in pustite neoznaèene tiste, ki jih ne želite odstraniti. $_CLICK
+# ^UnComponentsSubText1
+Izberite vrsto odstranitve:
+# ^UnComponentsSubText2_NoInstTypes
+Izberite komponente za odstranitev:
+# ^UnComponentsSubText2
+Ali pa izberite komponente namestitve, ki jih želite odstraniti:
+# ^DirText
+$(^NameDA) boste namestili v sledeèo mapo. Za izbiro druge mape kliknite tipko Prebrskaj in izberite drugo mapo. $_CLICK
+# ^DirSubText
+Ciljna mapa
+# ^DirBrowseText
+Izberite mapo, kamor želite namestiti $(^NameDA):
+# ^UnDirText
+Odstranili boste $(^NameDA) iz sledeèe mape. Za izbiro druge mape kliknite tipko Prebrskaj in izberite drugo mapo. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Izberite mapo, od koder želite odstraniti $(^NameDA):
+# ^SpaceAvailable
+"Prostor na disku: "
+# ^SpaceRequired
+"Potreben prostor: "
+# ^UninstallingText
+$(^NameDA) bo odstranjen iz naslednje mape. $_CLICK
+# ^UninstallingSubText
+Odstranjevanje iz:
+# ^FileError
+Napaka pri odpiranju datoteke za pisanje: \r\n\r\n$0\r\n\r\nPritisnite Prekini za prekinitev namestitve,\r\nPonovi za ponoven poskus ali\r\nPrezri za izpust te datoteke.
+# ^FileError_NoIgnore
+Napaka pri odpiranju datoteke za pisanje: \r\n\r\n$0\r\n\r\nPritisnite Ponovi za ponoven poskus pisanja ali\r\Preklièi za prekinitev namestitve.
+# ^CantWrite
+"Ni mogoèe pisati: "
+# ^CopyFailed
+Kopiranje neuspešno
+# ^CopyTo
+"Kopiranje v "
+# ^Registering
+"Registracija: "
+# ^Unregistering
+"Preklic registracije: "
+# ^SymbolNotFound
+"Ni mogoèe najti simbola: "
+# ^CouldNotLoad
+"Ni mogoèe naložiti: "
+# ^CreateFolder
+"Ustvarjanje mape: "
+# ^CreateShortcut
+"Ustvarjanje bližnjice: "
+# ^CreatedUninstaller
+"Ustvarjena odstranitev: "
+# ^Delete
+"Brisanje datoteke: "
+# ^DeleteOnReboot
+"Brisanje ob ponovnem zagonu: "
+# ^ErrorCreatingShortcut
+"Napaka ustvarjanja bližnjice: "
+# ^ErrorCreating
+"Napaka ustvarjanja: "
+# ^ErrorDecompressing
+Napaka pri razširjanju podatkov! Je namestitvena datoteka okvarjena?
+# ^ErrorRegistering
+Napaka registracije DLL
+# ^ExecShell
+"Izvajanje ExecShell: "
+# ^Exec
+"Izvajanje Execute: "
+# ^Extract
+"Razširjanje: "
+# ^ErrorWriting
+"Razširjanje: napaka pri pisanju v datoteko "
+# ^InvalidOpcode
+Namestitev neveljavna: napaèen ukaz
+# ^NoOLE
+"Neobstojeèi OLE za: "
+# ^OutputFolder
+"Ciljna mapa: "
+# ^RemoveFolder
+"Odstranjevanje mape: "
+# ^RenameOnReboot
+"Preimenovanje ob zagonu: "
+# ^Rename
+"Preimenovanje: "
+# ^Skipped
+"Izpušèeno: "
+# ^CopyDetails
+Kopiraj podrobnosti v odlagališèe
+# ^LogInstall
+Shrani potek namestitve
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Slovenian.nsh b/Contrib/Language files/Slovenian.nsh
index 8aee939..16ef283 100755
--- a/Contrib/Language files/Slovenian.nsh
+++ b/Contrib/Language files/Slovenian.nsh
@@ -1,121 +1,121 @@
-;Language: Slovenian (1060)
-;By Janez Dolinar, edited by Martin Srebotnjak - Lugos.si
-
-!insertmacro LANGFILE "Slovenian" "Slovenski jezik"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli v èarovniku namestitve $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ta èarovnik vas vodi skozi namestitev programa $(^NameDA).$\r$\n$\r$\nPred namestitvijo je priporoèeno zapreti vsa ostala okna in programe. S tem omogoèite nemoteno namestitev programa in potrebnih sistemskih datotek brez ponovnega zagona raèunalnika.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli v èarovniku za odstranitev $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ta èarovnik vas bo vodil skozi odstranitev $(^NameDA).$\r$\n$\r$\nPreden priènete z odstranitvijo, se preprièajte, da aplikacija $(^NameDA) ni zagnana.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèna pogodba"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Prosimo, da si ogledate pogoje licenène pogodbe pred namestitvijo $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Èe se strinjate s pogoji, pritisnite Se strinjam. Da bi lahko namestili $(^NameDA), se morate s pogodbo strinjati."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èe se strinjate z licenènimi pogoji pogodbe, spodaj izberite ustrezno okence. Za namestitev $(^NameDA) se morate strinjati s pogoji pogodbe. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èe se strinjate z licenènimi pogoji pogodbe, spodaj izberite prvo možnost. Za namestitev $(^NameDA) se morate strinjati s pogoji pogodbe. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèna pogodba"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Prosimo, da pred odstranitvijo $(^NameDA) pregledate pogoje licenène pogodbe."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Èe se strinjate s pogoji licenène pogodbe, izberite Se strinjam. Za odstranitev $(^NameDA) se morate strinjati s pogoji."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èe se strinjate s pogoji licenène pogodbe, kliknite na okence spodaj. Za odstranitev $(^NameDA) se morate strinjati s pogoji. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èe se strinjate s pogoji licenène pogodbe, spodaj izberite prvo podano možnost. Za odstranitev $(^NameDA) se morate strinjati s pogoji. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Za preostali del pogodbe pritisnite tipko 'Page Down'."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponent"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izberite, katere komponente izdelka $(^NameDA) želite namestiti."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponent"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izberite komponente $(^NameDA), ki jih želite odstraniti."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Povlecite miško nad komponento, da vidite njen opis."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Povlecite miško nad komponento, da vidite njen opis."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Izberite pot namestive"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Izberite mapo, v katero želite namestiti $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izbor mape"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Izberite mapo, iz katere želite odstraniti $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Namešèanje poteka"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Prosimo, poèakajte, $(^NameDA) se namešèa."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Dokonèana namestitev"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Namestitev je uspešno zakljuèena."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Prekinjena namestitev"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Namestitev ni bila uspešno zakljuèena."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odstranjevanje poteka"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Prosimo, poèakajte, dokler se aplikacija $(^NameDA) odstranjuje."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Odstranitev konèana"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odstranitev je uspešno konèana."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Odstranitev prekinjena"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odstranitev ni bila konèana uspešno."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Zakljuèevanje namestitve $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Aplikacija $(^NameDA) je bila namešèena na vaš raèunalnik.$\r$\n$\r$\nPritisnite Dokonèaj za zaprtje èarovnika."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Za dokonèanje namestitve $(^NameDA) morate ponovno zagnati raèunalnik. Želite zdaj ponovno zagnati raèunalnik?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Èarovnik za odstranitev $(^NameDA) se zakljuèuje"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Aplikacija $(^NameDA) je odstranjena iz vašega raèunalnika.$\r$\n$\r$\nKliknite Dokonèaj, da zaprete èarovnika."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Da bi se $(^NameDA) namestitev dokonèala, morate ponovno zagnati raèunalnik. Želite zdaj ponovno zagnati raèunalnik?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ponovni zagon"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Raèunalnik želim ponovno zagnati kasneje"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Zaženi $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Pokaži BeriMe"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "Do&konèaj"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izberite mapo menija Start"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izberite mapo menija Start za bližnjice do $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izberite mapo menija Start, kjer želite ustvariti bližnjico do programa. Èe vpišete novo ime, boste ustvarili istoimensko mapo."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ne ustvari bližnjic"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odstranitev $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odstrani $(^NameDA) iz vašega raèunalnika."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ste preprièani, da želite prekiniti namestitev $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ste preprièani, da želite zapustiti odstranitev $(^Name)?"
-!endif
+;Language: Slovenian (1060)
+;By Janez Dolinar, edited by Martin Srebotnjak - Lugos.si
+
+!insertmacro LANGFILE "Slovenian" "Slovenski jezik"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Dobrodošli v èarovniku namestitve $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Ta èarovnik vas vodi skozi namestitev programa $(^NameDA).$\r$\n$\r$\nPred namestitvijo je priporoèeno zapreti vsa ostala okna in programe. S tem omogoèite nemoteno namestitev programa in potrebnih sistemskih datotek brez ponovnega zagona raèunalnika.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Dobrodošli v èarovniku za odstranitev $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Ta èarovnik vas bo vodil skozi odstranitev $(^NameDA).$\r$\n$\r$\nPreden priènete z odstranitvijo, se preprièajte, da aplikacija $(^NameDA) ni zagnana.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licenèna pogodba"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Prosimo, da si ogledate pogoje licenène pogodbe pred namestitvijo $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Èe se strinjate s pogoji, pritisnite Se strinjam. Da bi lahko namestili $(^NameDA), se morate s pogodbo strinjati."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èe se strinjate z licenènimi pogoji pogodbe, spodaj izberite ustrezno okence. Za namestitev $(^NameDA) se morate strinjati s pogoji pogodbe. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èe se strinjate z licenènimi pogoji pogodbe, spodaj izberite prvo možnost. Za namestitev $(^NameDA) se morate strinjati s pogoji pogodbe. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licenèna pogodba"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Prosimo, da pred odstranitvijo $(^NameDA) pregledate pogoje licenène pogodbe."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Èe se strinjate s pogoji licenène pogodbe, izberite Se strinjam. Za odstranitev $(^NameDA) se morate strinjati s pogoji."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Èe se strinjate s pogoji licenène pogodbe, kliknite na okence spodaj. Za odstranitev $(^NameDA) se morate strinjati s pogoji. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Èe se strinjate s pogoji licenène pogodbe, spodaj izberite prvo podano možnost. Za odstranitev $(^NameDA) se morate strinjati s pogoji. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Za preostali del pogodbe pritisnite tipko 'Page Down'."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Izbor komponent"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Izberite, katere komponente izdelka $(^NameDA) želite namestiti."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Opis"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Izbor komponent"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Izberite komponente $(^NameDA), ki jih želite odstraniti."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Povlecite miško nad komponento, da vidite njen opis."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Povlecite miško nad komponento, da vidite njen opis."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Izberite pot namestive"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Izberite mapo, v katero želite namestiti $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Izbor mape"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Izberite mapo, iz katere želite odstraniti $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Namešèanje poteka"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Prosimo, poèakajte, $(^NameDA) se namešèa."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Dokonèana namestitev"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Namestitev je uspešno zakljuèena."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Prekinjena namestitev"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Namestitev ni bila uspešno zakljuèena."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Odstranjevanje poteka"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Prosimo, poèakajte, dokler se aplikacija $(^NameDA) odstranjuje."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Odstranitev konèana"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Odstranitev je uspešno konèana."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Odstranitev prekinjena"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Odstranitev ni bila konèana uspešno."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Zakljuèevanje namestitve $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Aplikacija $(^NameDA) je bila namešèena na vaš raèunalnik.$\r$\n$\r$\nPritisnite Dokonèaj za zaprtje èarovnika."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Za dokonèanje namestitve $(^NameDA) morate ponovno zagnati raèunalnik. Želite zdaj ponovno zagnati raèunalnik?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Èarovnik za odstranitev $(^NameDA) se zakljuèuje"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Aplikacija $(^NameDA) je odstranjena iz vašega raèunalnika.$\r$\n$\r$\nKliknite Dokonèaj, da zaprete èarovnika."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Da bi se $(^NameDA) namestitev dokonèala, morate ponovno zagnati raèunalnik. Želite zdaj ponovno zagnati raèunalnik?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ponovni zagon"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Raèunalnik želim ponovno zagnati kasneje"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Zaženi $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Pokaži BeriMe"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "Do&konèaj"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Izberite mapo menija Start"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Izberite mapo menija Start za bližnjice do $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Izberite mapo menija Start, kjer želite ustvariti bližnjico do programa. Èe vpišete novo ime, boste ustvarili istoimensko mapo."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Ne ustvari bližnjic"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Odstranitev $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Odstrani $(^NameDA) iz vašega raèunalnika."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ste preprièani, da želite prekiniti namestitev $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ste preprièani, da želite zapustiti odstranitev $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Spanish.nlf b/Contrib/Language files/Spanish.nlf
index 48dc4c2..084a33b 100755
--- a/Contrib/Language files/Spanish.nlf
+++ b/Contrib/Language files/Spanish.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit ;Español - España (Alfabetización Tradicional)
-NLF v6
-# Language ID
-1034
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by MoNKi & Joel
-# Review Darwin Rodrigo Toledo Cáceres (niwrad777@gmail.com) www.winamp-es.com
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Instalación de $(^Name)
-# ^UninstallCaption
-Desinstalación de $(^Name)
-# ^LicenseSubCaption
-: Acuerdo de Licencia
-# ^ComponentsSubCaption
-: Opciones de Instalación
-# ^DirSubCaption
-: Directorio de Instalación
-# ^InstallingSubCaption
-: Instalando
-# ^CompletedSubCaption
-: Completado
-# ^UnComponentsSubCaption
-: Opciones de Desinstalación
-# ^UnDirSubCaption
-: Directorio de Desinstalación
-# ^ConfirmSubCaption
-: Confirmación
-# ^UninstallingSubCaption
-: Desinstalando
-# ^UnCompletedSubCaption
-: Completado
-# ^BackBtn
-< &Atrás
-# ^NextBtn
-&Siguiente >
-# ^AgreeBtn
-A&cepto
-# ^AcceptBtn
-A&cepto los términos de la licencia
-# ^DontAcceptBtn
-&No acepto los términos de la licencia
-# ^InstallBtn
-&Instalar
-# ^UninstallBtn
-&Desinstalar
-# ^CancelBtn
-Cancelar
-# ^CloseBtn
-&Cerrar
-# ^BrowseBtn
-&Examinar...
-# ^ShowDetailsBtn
-Ver &detalles
-# ^ClickNext
-Presione Siguiente para continuar.
-# ^ClickInstall
-Presione Instalar para comenzar la instalación.
-# ^ClickUninstall
-Presione Desinstalar para comenzar la desinstalación.
-# ^Name
-Nombre
-# ^Completed
-Completado
-# ^LicenseText
-Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si acepta todos los términos del acuerdo, presione Acepto.
-# ^LicenseTextCB
-Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si acepta todos los términos del acuerdo, marque abajo la casilla. $_CLICK
-# ^LicenseTextRB
-Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si acepta todos los términos del acuerdo, seleccione abajo la primera opción. $_CLICK
-# ^UnLicenseText
-Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si acepta todos los términos del acuerdo, presione Acepto.
-# ^UnLicenseTextCB
-Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si acepta todos los términos del acuerdo, marque abajo la casilla. $_CLICK.
-# ^UnLicenseTextRB
-Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si acepta todos los términos del acuerdo, seleccione abajo la primera opción. $_CLICK
-# ^Custom
-Personalizada
-# ^ComponentsText
-Marque los componentes que desee instalar y desmarque los componentes que no desee instalar. $_CLICK
-# ^ComponentsSubText1
-Tipos de instalación:
-# ^ComponentsSubText2_NoInstTypes
-Seleccione los componentes a instalar:
-# ^ComponentsSubText2
-O seleccione los componentes opcionales que desee instalar:
-# ^UnComponentsText
-Marque los componentes que desee desinstalar y desmarque los componentes que no desee desinstalar. $_CLICK
-# ^UnComponentsSubText1
-Tipos de desinstalación:
-# ^UnComponentsSubText2_NoInstTypes
-Seleccione los componentes a desinstalar:
-# ^UnComponentsSubText2
-O seleccione los componentes opcionales que desee desinstalar:
-# ^DirText
-El programa de instalación instalará $(^NameDA) en el siguiente directorio. Para instalar en un directorio diferente, presione Examinar y seleccione otro directorio. $_CLICK
-# ^DirSubText
-Directorio de Destino
-# ^DirBrowseText
-Seleccione el directorio en el que instalar $(^NameDA):
-# ^UnDirText
-El programa de instalación desinstalará $(^NameDA) del siguiente directorio. Para desinstalar de un directorio diferente, presione Examinar y seleccione otro directorio. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Seleccione el directorio desde el cual desinstalar $(^NameDA):
-# ^SpaceAvailable
-Espacio disponible:
-# ^SpaceRequired
-Espacio requerido:
-# ^UninstallingText
-$(^NameDA) será desinstalado del siguiente directorio. $_CLICK
-# ^UninstallingSubTex
-Desinstalando desde:
-# ^FileError
-Error abriendo archivo para escritura: \r\n\t"$0"\r\nPresione abortar para anular la instalación,\r\nreintentar para volver a intentar escribir el archivo, u\r\nomitir para ignorar este archivo
-# ^FileError_NoIgnore
-Error abriendo archivo para escritura: \r\n\t"$0"\r\nPresione reintentar para volver a intentar escribir el archivo, o\r\ncancelar para anular la instalación
-# ^CantWrite
-"No pudo escribirse: "
-# ^CopyFailed
-Falló la copia
-# ^CopyTo
-"Copiar a "
-# ^Registering
-"Registrando: "
-# ^Unregistering
-"Eliminando registro: "
-# ^SymbolNotFound
-"No pudo encontrarse símbolo: "
-# ^CouldNotLoad
-"No pudo cargarse: "
-# ^CreateFolder
-"Crear directorio: "
-# ^CreateShortcut
-"Crear acceso directo: "
-# ^CreatedUninstaller
-"Crear desinstalador: "
-# ^Delete
-"Borrar archivo: "
-# ^DeleteOnReboot
-"Borrar al reinicio: "
-# ^ErrorCreatingShortcut
-"Error creando acceso directo: "
-# ^ErrorCreating
-"Error creando: "
-# ^ErrorDecompressing
-¡Error descomprimiendo datos! ¿Instalador corrupto?
-# ^ErrorRegistering
-Error registrando DLL
-# ^ExecShell
-"Ejecutar comando: "
-# ^Exec
-"Ejecutar: "
-# ^Extract
-"Extraer: "
-# ^ErrorWriting
-"Extraer: error escribiendo al archivo "
-# ^InvalidOpcode
-Instalador corrupto: código de operación no válido
-# ^NoOLE
-"Sin OLE para: "
-# ^OutputFolder
-"Directorio de salida: "
-# ^RemoveFolder
-"Eliminar directorio: "
-# ^RenameOnReboot
-"Renombrar al reinicio: "
-# ^Rename
-"Renombrar: "
-# ^Skipped
-"Omitido: "
-# ^CopyDetails
-Copiar Detalles al Portapapeles
-# ^LogInstall
-Registrar proceso de instalación
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit ;Español - España (Alfabetización Tradicional)
+NLF v6
+# Language ID
+1034
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by MoNKi & Joel
+# Review Darwin Rodrigo Toledo Cáceres (niwrad777@gmail.com) www.winamp-es.com
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Instalación de $(^Name)
+# ^UninstallCaption
+Desinstalación de $(^Name)
+# ^LicenseSubCaption
+: Acuerdo de Licencia
+# ^ComponentsSubCaption
+: Opciones de Instalación
+# ^DirSubCaption
+: Directorio de Instalación
+# ^InstallingSubCaption
+: Instalando
+# ^CompletedSubCaption
+: Completado
+# ^UnComponentsSubCaption
+: Opciones de Desinstalación
+# ^UnDirSubCaption
+: Directorio de Desinstalación
+# ^ConfirmSubCaption
+: Confirmación
+# ^UninstallingSubCaption
+: Desinstalando
+# ^UnCompletedSubCaption
+: Completado
+# ^BackBtn
+< &Atrás
+# ^NextBtn
+&Siguiente >
+# ^AgreeBtn
+A&cepto
+# ^AcceptBtn
+A&cepto los términos de la licencia
+# ^DontAcceptBtn
+&No acepto los términos de la licencia
+# ^InstallBtn
+&Instalar
+# ^UninstallBtn
+&Desinstalar
+# ^CancelBtn
+Cancelar
+# ^CloseBtn
+&Cerrar
+# ^BrowseBtn
+&Examinar...
+# ^ShowDetailsBtn
+Ver &detalles
+# ^ClickNext
+Presione Siguiente para continuar.
+# ^ClickInstall
+Presione Instalar para comenzar la instalación.
+# ^ClickUninstall
+Presione Desinstalar para comenzar la desinstalación.
+# ^Name
+Nombre
+# ^Completed
+Completado
+# ^LicenseText
+Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si acepta todos los términos del acuerdo, presione Acepto.
+# ^LicenseTextCB
+Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si acepta todos los términos del acuerdo, marque abajo la casilla. $_CLICK
+# ^LicenseTextRB
+Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si acepta todos los términos del acuerdo, seleccione abajo la primera opción. $_CLICK
+# ^UnLicenseText
+Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si acepta todos los términos del acuerdo, presione Acepto.
+# ^UnLicenseTextCB
+Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si acepta todos los términos del acuerdo, marque abajo la casilla. $_CLICK.
+# ^UnLicenseTextRB
+Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si acepta todos los términos del acuerdo, seleccione abajo la primera opción. $_CLICK
+# ^Custom
+Personalizada
+# ^ComponentsText
+Marque los componentes que desee instalar y desmarque los componentes que no desee instalar. $_CLICK
+# ^ComponentsSubText1
+Tipos de instalación:
+# ^ComponentsSubText2_NoInstTypes
+Seleccione los componentes a instalar:
+# ^ComponentsSubText2
+O seleccione los componentes opcionales que desee instalar:
+# ^UnComponentsText
+Marque los componentes que desee desinstalar y desmarque los componentes que no desee desinstalar. $_CLICK
+# ^UnComponentsSubText1
+Tipos de desinstalación:
+# ^UnComponentsSubText2_NoInstTypes
+Seleccione los componentes a desinstalar:
+# ^UnComponentsSubText2
+O seleccione los componentes opcionales que desee desinstalar:
+# ^DirText
+El programa de instalación instalará $(^NameDA) en el siguiente directorio. Para instalar en un directorio diferente, presione Examinar y seleccione otro directorio. $_CLICK
+# ^DirSubText
+Directorio de Destino
+# ^DirBrowseText
+Seleccione el directorio en el que instalar $(^NameDA):
+# ^UnDirText
+El programa de instalación desinstalará $(^NameDA) del siguiente directorio. Para desinstalar de un directorio diferente, presione Examinar y seleccione otro directorio. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Seleccione el directorio desde el cual desinstalar $(^NameDA):
+# ^SpaceAvailable
+Espacio disponible:
+# ^SpaceRequired
+Espacio requerido:
+# ^UninstallingText
+$(^NameDA) será desinstalado del siguiente directorio. $_CLICK
+# ^UninstallingSubTex
+Desinstalando desde:
+# ^FileError
+Error abriendo archivo para escritura: \r\n\t"$0"\r\nPresione abortar para anular la instalación,\r\nreintentar para volver a intentar escribir el archivo, u\r\nomitir para ignorar este archivo
+# ^FileError_NoIgnore
+Error abriendo archivo para escritura: \r\n\t"$0"\r\nPresione reintentar para volver a intentar escribir el archivo, o\r\ncancelar para anular la instalación
+# ^CantWrite
+"No pudo escribirse: "
+# ^CopyFailed
+Falló la copia
+# ^CopyTo
+"Copiar a "
+# ^Registering
+"Registrando: "
+# ^Unregistering
+"Eliminando registro: "
+# ^SymbolNotFound
+"No pudo encontrarse símbolo: "
+# ^CouldNotLoad
+"No pudo cargarse: "
+# ^CreateFolder
+"Crear directorio: "
+# ^CreateShortcut
+"Crear acceso directo: "
+# ^CreatedUninstaller
+"Crear desinstalador: "
+# ^Delete
+"Borrar archivo: "
+# ^DeleteOnReboot
+"Borrar al reinicio: "
+# ^ErrorCreatingShortcut
+"Error creando acceso directo: "
+# ^ErrorCreating
+"Error creando: "
+# ^ErrorDecompressing
+¡Error descomprimiendo datos! ¿Instalador corrupto?
+# ^ErrorRegistering
+Error registrando DLL
+# ^ExecShell
+"Ejecutar comando: "
+# ^Exec
+"Ejecutar: "
+# ^Extract
+"Extraer: "
+# ^ErrorWriting
+"Extraer: error escribiendo al archivo "
+# ^InvalidOpcode
+Instalador corrupto: código de operación no válido
+# ^NoOLE
+"Sin OLE para: "
+# ^OutputFolder
+"Directorio de salida: "
+# ^RemoveFolder
+"Eliminar directorio: "
+# ^RenameOnReboot
+"Renombrar al reinicio: "
+# ^Rename
+"Renombrar: "
+# ^Skipped
+"Omitido: "
+# ^CopyDetails
+Copiar Detalles al Portapapeles
+# ^LogInstall
+Registrar proceso de instalación
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Spanish.nsh b/Contrib/Language files/Spanish.nsh
index 9f30115..7829a94 100755
--- a/Contrib/Language files/Spanish.nsh
+++ b/Contrib/Language files/Spanish.nsh
@@ -1,122 +1,122 @@
-;Language: Spanish (1034)
-;By MoNKi & Joel
-;Updates & Review Darwin Toledo Cáceres
-
-!insertmacro LANGFILE "Spanish" "Español"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Instalación de $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este programa instalará $(^NameDA) en su ordenador.$\r$\n$\r$\nSe recomienda que cierre todas las demás aplicaciones antes de iniciar la instalación. Esto hará posible actualizar archivos relacionados con el sistema sin tener que reiniciar su ordenador.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Desinstalación de $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente le guiará durante la desinstalación de $(^NameDA).$\r$\n$\r$\nAntes de comenzar la desinstalación, asegúrese de que $(^NameDA) no se está ejecutando.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Acuerdo de licencia"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor revise los términos de la licencia antes de instalar $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si acepta todos los términos del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para instalar $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta los términos del acuerdo, marque abajo la casilla. Debe aceptar los términos para instalar $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si acepta los términos del acuerdo, seleccione abajo la primera opción. Debe aceptar los términos para instalar $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Acuerdo de licencia"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor revise los términos de la licencia antes de desinstalar $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si acepta todos los términos del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para desinstalar $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta los términos del acuerdo, marque abajo la casilla. Debe aceptar los términos para desinstalar $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si acepta los términos del acuerdo, seleccione abajo la primera opción. Debe aceptar los términos para desinstalar $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Presione Avanzar Página para ver el resto del acuerdo."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selección de componentes"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea instalar."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descripción"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selección de componentes"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea desinstalar."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Elegir lugar de instalación"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Elija el directorio para instalar $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Elegir lugar de desinstalación"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Elija el directorio desde el cual se desinstalará $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se instala."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalación Completada"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "La instalación se ha completado correctamente."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalación Anulada"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "La instalación no se completó correctamente."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se desinstala."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalación Completada"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La desinstalación se ha completado correctamente."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalación Anulada"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La desinstalación no se completó correctamente."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completando el Asistente de Instalación de $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido instalado en su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Su sistema debe ser reiniciado para que pueda completarse la instalación de $(^NameDA). ¿Desea reiniciar ahora?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completando el Asistente de Desinstalación de $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido desinstalado de su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Su ordenador debe ser reiniciado para completar la desinstalación de $(^NameDA). ¿Desea reiniciar ahora?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar ahora"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Deseo reiniciar manualmente más tarde"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Ejecutar $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ver Léame"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Elegir Carpeta del Menú Inicio"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Elija una Carpeta del Menú Inicio para los accesos directos de $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccione una carpeta del Menú Inicio en la que quiera crear los accesos directos del programa. También puede introducir un nombre para crear una nueva carpeta."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "No crear accesos directos"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Elimina $(^NameDA) de su sistema."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "¿Está seguro de que desea salir de la instalación de $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "¿Está seguro de que desea salir de la desinstalación de $(^Name)?"
-!endif
+;Language: Spanish (1034)
+;By MoNKi & Joel
+;Updates & Review Darwin Toledo Cáceres
+
+!insertmacro LANGFILE "Spanish" "Español"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Instalación de $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este programa instalará $(^NameDA) en su ordenador.$\r$\n$\r$\nSe recomienda que cierre todas las demás aplicaciones antes de iniciar la instalación. Esto hará posible actualizar archivos relacionados con el sistema sin tener que reiniciar su ordenador.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Desinstalación de $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente le guiará durante la desinstalación de $(^NameDA).$\r$\n$\r$\nAntes de comenzar la desinstalación, asegúrese de que $(^NameDA) no se está ejecutando.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Acuerdo de licencia"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor revise los términos de la licencia antes de instalar $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si acepta todos los términos del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para instalar $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta los términos del acuerdo, marque abajo la casilla. Debe aceptar los términos para instalar $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si acepta los términos del acuerdo, seleccione abajo la primera opción. Debe aceptar los términos para instalar $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Acuerdo de licencia"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor revise los términos de la licencia antes de desinstalar $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si acepta todos los términos del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para desinstalar $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta los términos del acuerdo, marque abajo la casilla. Debe aceptar los términos para desinstalar $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si acepta los términos del acuerdo, seleccione abajo la primera opción. Debe aceptar los términos para desinstalar $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Presione Avanzar Página para ver el resto del acuerdo."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selección de componentes"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea instalar."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descripción"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selección de componentes"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea desinstalar."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Elegir lugar de instalación"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Elija el directorio para instalar $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Elegir lugar de desinstalación"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Elija el directorio desde el cual se desinstalará $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se instala."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalación Completada"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "La instalación se ha completado correctamente."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalación Anulada"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "La instalación no se completó correctamente."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se desinstala."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalación Completada"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La desinstalación se ha completado correctamente."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalación Anulada"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La desinstalación no se completó correctamente."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Completando el Asistente de Instalación de $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido instalado en su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Su sistema debe ser reiniciado para que pueda completarse la instalación de $(^NameDA). ¿Desea reiniciar ahora?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completando el Asistente de Desinstalación de $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido desinstalado de su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Su ordenador debe ser reiniciado para completar la desinstalación de $(^NameDA). ¿Desea reiniciar ahora?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar ahora"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Deseo reiniciar manualmente más tarde"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Ejecutar $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ver Léame"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Elegir Carpeta del Menú Inicio"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Elija una Carpeta del Menú Inicio para los accesos directos de $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccione una carpeta del Menú Inicio en la que quiera crear los accesos directos del programa. También puede introducir un nombre para crear una nueva carpeta."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "No crear accesos directos"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Elimina $(^NameDA) de su sistema."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "¿Está seguro de que desea salir de la instalación de $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "¿Está seguro de que desea salir de la desinstalación de $(^Name)?"
+!endif
diff --git a/Contrib/Language files/SpanishInternational.nlf b/Contrib/Language files/SpanishInternational.nlf
index 7488b3b..827dd48 100755
--- a/Contrib/Language files/SpanishInternational.nlf
+++ b/Contrib/Language files/SpanishInternational.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit ;Español (Alfabetización Internacional)
-NLF v6
-# Language ID
-3082
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Darwin Rodrigo Toledo Cáceres - www.winamp-es.com - nwrad777@gmail.com
-# Base traslation by MoNKi & Joel
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Instalación de $(^Name)
-# ^UninstallCaption
-Desinstalación de $(^Name)
-# ^LicenseSubCaption
-: Acuerdo de Licencia
-# ^ComponentsSubCaption
-: Opciones de Instalación
-# ^DirSubCaption
-: Carpeta de Instalación
-# ^InstallingSubCaption
-: Instalando
-# ^CompletedSubCaption
-: Finalizado
-# ^UnComponentsSubCaption
-: Opciones de Desinstalación
-# ^UnDirSubCaption
-: Carpeta de Desinstalación
-# ^ConfirmSubCaption
-: Confirmación
-# ^UninstallingSubCaption
-: Desinstalando
-# ^UnCompletedSubCaption
-: Finalizado
-# ^BackBtn
-< &Atrás
-# ^NextBtn
-&Siguiente >
-# ^AgreeBtn
-&Acepto
-# ^AcceptBtn
-&Acepto las condiciones del Acuerdo de Licencia
-# ^DontAcceptBtn
-No &acepto las condiciones del Acuerdo de Licencia
-# ^InstallBtn
-&Instalar
-# ^UninstallBtn
-&Desinstalar
-# ^CancelBtn
-Cancelar
-# ^CloseBtn
-&Cerrar
-# ^BrowseBtn
-&Examinar...
-# ^ShowDetailsBtn
-Mostrar &detalles
-# ^ClickNext
-Presione Siguiente para continuar.
-# ^ClickInstall
-Presione Instalar para iniciar la instalación.
-# ^ClickUninstall
-Presione Desinstalar para iniciar la desinstalación.
-# ^Name
-Nombre
-# ^Completed
-Finalizado
-# ^LicenseText
-Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, presione Acepto.
-# ^LicenseTextCB
-Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, marque abajo la casilla. $_CLICK
-# ^LicenseTextRB
-Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, seleccione abajo la primera opción. $_CLICK
-# ^UnLicenseText
-Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, presione Acepto.
-# ^UnLicenseTextCB
-Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, marque abajo la casilla. $_CLICK
-# ^UnLicenseTextRB
-Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, seleccione abajo la primera opción. $_CLICK
-# ^Custom
-Personalizada
-# ^ComponentsText
-Marque los componentes que desee instalar y desmarque los componentes que no desee instalar. $_CLICK
-# ^ComponentsSubText1
-Seleccione el tipo de instalación:
-# ^ComponentsSubText2_NoInstTypes
-Seleccione los componentes a instalar:
-# ^ComponentsSubText2
-O seleccione los componentes opcionales que desee instalar:
-# ^UnComponentsText
-Marque los componentes que desee desinstalar y desmarque los componentes que no desee desinstalar. $_CLICK
-# ^UnComponentsSubText1
-Seleccione el tipo de desinstalación:
-# ^UnComponentsSubText2_NoInstTypes
-Seleccione los componentes a desinstalar:
-# ^UnComponentsSubText2
-O seleccione los componentes opcionales que desee desinstalar:
-# ^DirText
-El programa de instalación instalará $(^NameDA) en la siguiente carpeta. Para instalar en una carpeta diferente, presione Examinar y seleccione otra carpeta. $_CLICK
-# ^DirSubText
-Carpeta de Destino
-# ^DirBrowseText
-Seleccione la carpeta en la que instalará $(^NameDA):
-# ^UnDirText
-El programa de instalación desinstalará $(^NameDA) de la siguiente carpeta. Para desinstalar de una carpeta diferente, presione Examinar y seleccione otra carpeta. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Seleccione la carpeta desde la que desinstalará $(^NameDA):
-# ^SpaceAvailable
-Espacio disponible:
-# ^SpaceRequired
-Espacio requerido:
-# ^UninstallingText
-$(^NameDA) será desinstalado de la siguiente carpeta. $_CLICK
-# ^UninstallingSubText
-Desinstalando desde:
-# ^FileError
-Error abriendo archivo para escribir: \r\n\r\n$0\r\n\r\nPresione Abortar para detener la instalación,\r\nReintentar para probar otra vez, o\r\nOmitir para ignorar este archivo.
-# ^FileError_NoIgnore
-Error abriendo archivo para escribir: \r\n\r\n$0\r\n\r\nPresione Reintentar para probar otra vez, o\r\nCancelar para detener la instalación.
-# ^CantWrite
-"No pudo escribirse: "
-# ^CopyFailed
-Copia fallida
-# ^CopyTo
-"Copiar a "
-# ^Registering
-"Registrando: "
-# ^Unregistering
-"Eliminando registro: "
-# ^SymbolNotFound
-"No se encontró simbolo: "
-# ^CouldNotLoad
-"No pudo cargarse: "
-# ^CreateFolder
-"Crear carpeta: "
-# ^CreateShortcut
-"Crear acceso directo: "
-# ^CreatedUninstaller
-"Crear desinstalador: "
-# ^Delete
-"Borrar archivo: "
-# ^DeleteOnReboot
-"Borrar al reinicio: "
-# ^ErrorCreatingShortcut
-"Error creando acceso directo: "
-# ^ErrorCreating
-"Error creando: "
-# ^ErrorDecompressing
-¡Error descomprimiendo datos! ¿Instalador corrupto?
-# ^ErrorRegistering
-Error registrando DLL
-# ^ExecShell
-"Ejecutar comando: "
-# ^Exec
-"Ejecutar: "
-# ^Extract
-"Extraer: "
-# ^ErrorWriting
-"Extraer: error escribiendo al archivo "
-# ^InvalidOpcode
-Instalador corrupto: código de operación no válido
-# ^NoOLE
-"Sin OLE para: "
-# ^OutputFolder
-"Carpeta de salida: "
-# ^RemoveFolder
-"Eliminar carpeta: "
-# ^RenameOnReboot
-"Renombrar al reinicio: "
-# ^Rename
-"Renombrar: "
-# ^Skipped
-"Omitido: "
-# ^CopyDetails
-Copiar Detalles al Portapapeles
-# ^LogInstall
-Registrar proceso de instalación
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit ;Español (Alfabetización Internacional)
+NLF v6
+# Language ID
+3082
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Darwin Rodrigo Toledo Cáceres - www.winamp-es.com - nwrad777@gmail.com
+# Base traslation by MoNKi & Joel
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Instalación de $(^Name)
+# ^UninstallCaption
+Desinstalación de $(^Name)
+# ^LicenseSubCaption
+: Acuerdo de Licencia
+# ^ComponentsSubCaption
+: Opciones de Instalación
+# ^DirSubCaption
+: Carpeta de Instalación
+# ^InstallingSubCaption
+: Instalando
+# ^CompletedSubCaption
+: Finalizado
+# ^UnComponentsSubCaption
+: Opciones de Desinstalación
+# ^UnDirSubCaption
+: Carpeta de Desinstalación
+# ^ConfirmSubCaption
+: Confirmación
+# ^UninstallingSubCaption
+: Desinstalando
+# ^UnCompletedSubCaption
+: Finalizado
+# ^BackBtn
+< &Atrás
+# ^NextBtn
+&Siguiente >
+# ^AgreeBtn
+&Acepto
+# ^AcceptBtn
+&Acepto las condiciones del Acuerdo de Licencia
+# ^DontAcceptBtn
+No &acepto las condiciones del Acuerdo de Licencia
+# ^InstallBtn
+&Instalar
+# ^UninstallBtn
+&Desinstalar
+# ^CancelBtn
+Cancelar
+# ^CloseBtn
+&Cerrar
+# ^BrowseBtn
+&Examinar...
+# ^ShowDetailsBtn
+Mostrar &detalles
+# ^ClickNext
+Presione Siguiente para continuar.
+# ^ClickInstall
+Presione Instalar para iniciar la instalación.
+# ^ClickUninstall
+Presione Desinstalar para iniciar la desinstalación.
+# ^Name
+Nombre
+# ^Completed
+Finalizado
+# ^LicenseText
+Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, presione Acepto.
+# ^LicenseTextCB
+Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, marque abajo la casilla. $_CLICK
+# ^LicenseTextRB
+Por favor, revise el acuerdo de licencia antes de instalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, seleccione abajo la primera opción. $_CLICK
+# ^UnLicenseText
+Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, presione Acepto.
+# ^UnLicenseTextCB
+Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, marque abajo la casilla. $_CLICK
+# ^UnLicenseTextRB
+Por favor, revise el acuerdo de licencia antes de desinstalar $(^NameDA). Si usted acepta todas las condiciones del acuerdo, seleccione abajo la primera opción. $_CLICK
+# ^Custom
+Personalizada
+# ^ComponentsText
+Marque los componentes que desee instalar y desmarque los componentes que no desee instalar. $_CLICK
+# ^ComponentsSubText1
+Seleccione el tipo de instalación:
+# ^ComponentsSubText2_NoInstTypes
+Seleccione los componentes a instalar:
+# ^ComponentsSubText2
+O seleccione los componentes opcionales que desee instalar:
+# ^UnComponentsText
+Marque los componentes que desee desinstalar y desmarque los componentes que no desee desinstalar. $_CLICK
+# ^UnComponentsSubText1
+Seleccione el tipo de desinstalación:
+# ^UnComponentsSubText2_NoInstTypes
+Seleccione los componentes a desinstalar:
+# ^UnComponentsSubText2
+O seleccione los componentes opcionales que desee desinstalar:
+# ^DirText
+El programa de instalación instalará $(^NameDA) en la siguiente carpeta. Para instalar en una carpeta diferente, presione Examinar y seleccione otra carpeta. $_CLICK
+# ^DirSubText
+Carpeta de Destino
+# ^DirBrowseText
+Seleccione la carpeta en la que instalará $(^NameDA):
+# ^UnDirText
+El programa de instalación desinstalará $(^NameDA) de la siguiente carpeta. Para desinstalar de una carpeta diferente, presione Examinar y seleccione otra carpeta. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Seleccione la carpeta desde la que desinstalará $(^NameDA):
+# ^SpaceAvailable
+Espacio disponible:
+# ^SpaceRequired
+Espacio requerido:
+# ^UninstallingText
+$(^NameDA) será desinstalado de la siguiente carpeta. $_CLICK
+# ^UninstallingSubText
+Desinstalando desde:
+# ^FileError
+Error abriendo archivo para escribir: \r\n\r\n$0\r\n\r\nPresione Abortar para detener la instalación,\r\nReintentar para probar otra vez, o\r\nOmitir para ignorar este archivo.
+# ^FileError_NoIgnore
+Error abriendo archivo para escribir: \r\n\r\n$0\r\n\r\nPresione Reintentar para probar otra vez, o\r\nCancelar para detener la instalación.
+# ^CantWrite
+"No pudo escribirse: "
+# ^CopyFailed
+Copia fallida
+# ^CopyTo
+"Copiar a "
+# ^Registering
+"Registrando: "
+# ^Unregistering
+"Eliminando registro: "
+# ^SymbolNotFound
+"No se encontró simbolo: "
+# ^CouldNotLoad
+"No pudo cargarse: "
+# ^CreateFolder
+"Crear carpeta: "
+# ^CreateShortcut
+"Crear acceso directo: "
+# ^CreatedUninstaller
+"Crear desinstalador: "
+# ^Delete
+"Borrar archivo: "
+# ^DeleteOnReboot
+"Borrar al reinicio: "
+# ^ErrorCreatingShortcut
+"Error creando acceso directo: "
+# ^ErrorCreating
+"Error creando: "
+# ^ErrorDecompressing
+¡Error descomprimiendo datos! ¿Instalador corrupto?
+# ^ErrorRegistering
+Error registrando DLL
+# ^ExecShell
+"Ejecutar comando: "
+# ^Exec
+"Ejecutar: "
+# ^Extract
+"Extraer: "
+# ^ErrorWriting
+"Extraer: error escribiendo al archivo "
+# ^InvalidOpcode
+Instalador corrupto: código de operación no válido
+# ^NoOLE
+"Sin OLE para: "
+# ^OutputFolder
+"Carpeta de salida: "
+# ^RemoveFolder
+"Eliminar carpeta: "
+# ^RenameOnReboot
+"Renombrar al reinicio: "
+# ^Rename
+"Renombrar: "
+# ^Skipped
+"Omitido: "
+# ^CopyDetails
+Copiar Detalles al Portapapeles
+# ^LogInstall
+Registrar proceso de instalación
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/SpanishInternational.nsh b/Contrib/Language files/SpanishInternational.nsh
index fdd2b0f..3c8b776 100755
--- a/Contrib/Language files/SpanishInternational.nsh
+++ b/Contrib/Language files/SpanishInternational.nsh
@@ -1,122 +1,122 @@
-;Language: Spanish Modern (3082)
-;By Darwin Rodrigo Toledo Cáceres - www.winamp-es.com - niwrad777@gmail.com
-;Base by Monki y Joel
-
-!insertmacro LANGFILE "SpanishInternational" "Español (Alfabetización Internacional)"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Instalación de $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este asistente le guiará a través de la instalación de $(^NameDA).$\r$\n$\r$\nSe recomienda que cierre todas la demás aplicaciones antes de iniciar la instalación. Esto hará posible actualizar archivos de sistema sin tener que reiniciar su computadora.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Desinstalación de $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente le guiará durante la desinstalación de $(^NameDA).$\r$\n$\r$\nAntes de iniciar la desinstalación, asegúrese de que $(^NameDA) no se está ejecutando.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Acuerdo de licencia"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor revise el acuerdo de licencia antes de instalar $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si acepta todas las condiciones del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para instalar $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta las condiciones del acuerdo, marque abajo la casilla. Debe aceptar las condiciones para instalar $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si acepta las condiciones del acuerdo, seleccione abajo la primera opción. Debe aceptar las condiciones para instalar $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Acuerdo de licencia"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor revise el acuerdo de licencia antes de desinstalar $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si acepta todos las condiciones del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para desinstalar $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta los términos del acuerdo, marque abajo la casilla. Debe aceptar los términos para desinstalar $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Presione Avanzar Página para ver el resto del acuerdo."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selección de componentes"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea instalar."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descripción"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selección de componentes"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea desinstalar."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Elegir lugar de instalación"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Elija la carpeta para instalar $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se instala."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalación Finalizada"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "La instalación se ha finalizado correctamente."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalación Abortada"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "La instalación no se terminó correctamente."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se desinstala."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalación Finalizada"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La desinstalación se ha finalizado correctamente."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalación Abortada"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La desinstalación no se terminó correctamente."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Finalizando el Asistente de Instalación de $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido instalado en su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Su sistema debe ser reiniciado para poder finalizar la instalación de $(^NameDA). ¿Desea reiniciar ahora?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completando el Asistente de Desinstalación de $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido desinstalado de su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Su computadora debe ser reiniciada para finalizar la desinstalación de $(^NameDA). ¿Desea reiniciar ahora?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar ahora"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Deseo reiniciar manualmente más tarde"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Ejecutar $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Léame"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Elegir Carpeta del Menú Inicio"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Elija una Carpeta del Menú Inicio para los accesos directos de $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccione una carpeta del Menú Inicio en la que quiera crear los accesos directos del programa. También puede introducir un nombre para crear una nueva carpeta."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "No crear accesos directos"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Elimina $(^NameDA) de su sistema."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "¿Está seguro de que desea salir de la instalación de $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "¿Está seguro de que desea salir de la desinstalación de $(^Name)?"
-!endif
+;Language: Spanish Modern (3082)
+;By Darwin Rodrigo Toledo Cáceres - www.winamp-es.com - niwrad777@gmail.com
+;Base by Monki y Joel
+
+!insertmacro LANGFILE "SpanishInternational" "Español (Alfabetización Internacional)"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Instalación de $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Este asistente le guiará a través de la instalación de $(^NameDA).$\r$\n$\r$\nSe recomienda que cierre todas la demás aplicaciones antes de iniciar la instalación. Esto hará posible actualizar archivos de sistema sin tener que reiniciar su computadora.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Bienvenido al Asistente de Desinstalación de $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Este asistente le guiará durante la desinstalación de $(^NameDA).$\r$\n$\r$\nAntes de iniciar la desinstalación, asegúrese de que $(^NameDA) no se está ejecutando.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Acuerdo de licencia"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Por favor revise el acuerdo de licencia antes de instalar $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Si acepta todas las condiciones del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para instalar $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta las condiciones del acuerdo, marque abajo la casilla. Debe aceptar las condiciones para instalar $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Si acepta las condiciones del acuerdo, seleccione abajo la primera opción. Debe aceptar las condiciones para instalar $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Acuerdo de licencia"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Por favor revise el acuerdo de licencia antes de desinstalar $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Si acepta todos las condiciones del acuerdo, seleccione Acepto para continuar. Debe aceptar el acuerdo para desinstalar $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Si acepta los términos del acuerdo, marque abajo la casilla. Debe aceptar los términos para desinstalar $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "If you accept the terms of the agreement, select the first option below. You must accept the agreement to uninstall $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Presione Avanzar Página para ver el resto del acuerdo."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Selección de componentes"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea instalar."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Descripción"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Selección de componentes"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Seleccione qué características de $(^NameDA) desea desinstalar."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sitúe el ratón encima de un componente para ver su descripción."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Elegir lugar de instalación"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Elija la carpeta para instalar $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Choose Uninstall Location"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Choose the folder from which to uninstall $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Instalando"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se instala."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Instalación Finalizada"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "La instalación se ha finalizado correctamente."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Instalación Abortada"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "La instalación no se terminó correctamente."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Desinstalando"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Por favor espere mientras $(^NameDA) se desinstala."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Desinstalación Finalizada"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "La desinstalación se ha finalizado correctamente."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Desinstalación Abortada"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "La desinstalación no se terminó correctamente."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Finalizando el Asistente de Instalación de $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido instalado en su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Su sistema debe ser reiniciado para poder finalizar la instalación de $(^NameDA). ¿Desea reiniciar ahora?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Completando el Asistente de Desinstalación de $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ha sido desinstalado de su sistema.$\r$\n$\r$\nPresione Terminar para cerrar este asistente."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Su computadora debe ser reiniciada para finalizar la desinstalación de $(^NameDA). ¿Desea reiniciar ahora?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Reiniciar ahora"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Deseo reiniciar manualmente más tarde"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Ejecutar $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Mostrar Léame"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Terminar"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Elegir Carpeta del Menú Inicio"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Elija una Carpeta del Menú Inicio para los accesos directos de $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Seleccione una carpeta del Menú Inicio en la que quiera crear los accesos directos del programa. También puede introducir un nombre para crear una nueva carpeta."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "No crear accesos directos"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Desinstalar $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Elimina $(^NameDA) de su sistema."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "¿Está seguro de que desea salir de la instalación de $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "¿Está seguro de que desea salir de la desinstalación de $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Swedish.nlf b/Contrib/Language files/Swedish.nlf
index d0d9836..d1f2f33 100755
--- a/Contrib/Language files/Swedish.nlf
+++ b/Contrib/Language files/Swedish.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1053
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Magnus Bonnevier (magnus.bonnevier@telia.com)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Installation
-# ^UninstallCaption
-$(^Name) Avinstallation
-# ^LicenseSubCaption
-: Licensavtal
-# ^ComponentsSubCaption
-: Installationsval
-# ^DirSubCaption
-: Installationskatalog
-# ^InstallingSubCaption
-: Installerar
-# ^CompletedSubCaption
-: Slutförd
-# ^UnComponentsSubCaption
-: Avinstallationsval
-# ^UnDirSubCaption
-: Avinstallationskatalog
-# ^ConfirmSubCaption
-: Bekräftelse
-# ^UninstallingSubCaption
-: Avinstallerar
-# ^UnCompletedSubCaption
-: Slutförd
-# ^BackBtn
-< &Tillbaka
-# ^NextBtn
-&Nästa >
-# ^AgreeBtn
-Jag &Godkänner
-# ^AcceptBtn
-Jag &Godkänner villkoren i licensavtalet
-# ^DontAcceptBtn
-Jag &Godkänner inte villkoren i licensavtalet
-# ^InstallBtn
-&Installera
-# ^UninstallBtn
-&Avinstallera
-# ^CancelBtn
-Avbryt
-# ^CloseBtn
-&Stäng
-# ^BrowseBtn
-B&läddra...
-# ^ShowDetailsBtn
-Visa &detaljer
-# ^ClickNext
-Klicka på Nästa för att fortsätta.
-# ^ClickInstall
-Klicka på Installera för att starta installationen.
-# ^ClickUninstall
-Klicka på Avinstallera för att starta avinstallationen.
-# ^Name
-Namn
-# ^Completed
-Slutförd
-# ^LicenseText
-Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka Jag Godkänner.
-# ^LicenseTextCB
-Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. $_CLICK
-# ^LicenseTextRB
-Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA). Om du accepterar villkoren i avtalet, välj det första alternativet nedan. $_CLICK
-# ^UnLicenseText
-Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka Jag Godkänner.
-# ^UnLicenseTextCB
-Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. $_CLICK
-# ^UnLicenseTextRB
-Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA). Om du accepterar villkoren i avtalet, välj det första alternativet nedan. $_CLICK
-# ^Custom
-Valfri
-# ^ComponentsText
-Markera de komponenter du vill installera och avmarkera de komponenter du inte vill installera. $_CLICK
-# ^ComponentsSubText1
-Välj typ av installation:
-# ^ComponentsSubText2_NoInstTypes
-Välj komponenter att installera:
-# ^ComponentsSubText2
-Eller, välj de alternativa komponenter du önskar installera:
-# ^UnComponentsText
-Markera de komponenter du vill avinstallera och avmarkera de komponenter du inte vill avinstallera. $_CLICK
-# ^UnComponentsSubText1
-Välj typ av avinstallation:
-# ^UnComponentsSubText2_NoInstTypes
-Välj komponenter att avinstallera:
-# ^UnComponentsSubText2
-Eller, välj de alternativa komponenter du önskar avinstallera:
-# ^DirText
-Guiden kommer att installera $(^NameDA) i följande katalog. För att installera i en annan katalog, klicka Bläddra och välj en alternativ katalog. $_CLICK
-# ^DirSubText
-Målkatalog
-# ^DirBrowseText
-Välj katalog att installera $(^NameDA) i:
-# ^UnDirText
-Installationsguiden kommer att avinstallera $(^NameDA) från följande katalog. För att avinstallera från en annan katalog, klicka Bläddra och välj en annan katalog. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Välj katalog att avinstallera $(^NameDA) från:
-# ^SpaceAvailable
-"Utrymme tillgängligt: "
-# ^SpaceRequired
-"Utrymme som behövs: "
-# ^UninstallingText
-$(^NameDA) kommer att avinstalleras från följande katalog. $_CLICK
-# ^UninstallingSubText
-Avinstallerar från:
-# ^FileError
-Fel vid Öppning av fil för skrivning: \r\n\t"$0"\r\nKlicka på avbryt för att avbryta installationen,\r\nförsök igen för att försöka skriva till filen igen, eller\r\nIgnorera för att skippa denna fil
-# ^FileError_NoIgnore
-Fel vid Öppning av fil för skrivning: \r\n\t"$0"\r\nKlicka på försök igen för att skriva till filen igen, eller\r\navbryt för att avbryta installationen
-# ^CantWrite
-"Kan inte skriva: "
-# ^CopyFailed
-Kopiering misslyckades
-# ^CopyTo
-"Kopiera till "
-# ^Registering
-"Registrerar: "
-# ^Unregistering
-"Avregistrerar: "
-# ^SymbolNotFound
-"Kunde inte hitta symbol: "
-# ^CouldNotLoad
-"Kunde inte ladda: "
-# ^CreateFolder
-"Skapa katalog: "
-# ^CreateShortcut
-"Skapa genväg: "
-# ^CreatedUninstaller
-"Skapade avinstallationsprogram: "
-# ^Delete
-"Radera fil: "
-# ^DeleteOnReboot
-"Radera vid omstart: "
-# ^ErrorCreatingShortcut
-"Fel vid skapande av genväg: "
-# ^ErrorCreating
-"Fel vid skapande: "
-# ^ErrorDecompressing
-Fel vid uppackning av data! Skadat installationspaket?
-# ^ErrorRegistering
-Fel vid registrering av DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Kör: "
-# ^Extract
-"Extrahera: "
-# ^ErrorWriting
-"Extrahera: fel vid skrivning till fil "
-# ^InvalidOpcode
-Installationspaket skadat: ogiltig opcode
-# ^NoOLE
-"Ingen OLE för: "
-# ^OutputFolder
-"Målkatalog: "
-# ^RemoveFolder
-"Ta bort katalog: "
-# ^RenameOnReboot
-"Döp om vid omstart: "
-# ^Rename
-"Döp om: "
-# ^Skipped
-"Ignorerad: "
-# ^CopyDetails
-Kopiera detaljinformation till klippbordet
-# ^LogInstall
-Logga installationsförfarandet
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Language ID
+1053
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Magnus Bonnevier (magnus.bonnevier@telia.com)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Installation
+# ^UninstallCaption
+$(^Name) Avinstallation
+# ^LicenseSubCaption
+: Licensavtal
+# ^ComponentsSubCaption
+: Installationsval
+# ^DirSubCaption
+: Installationskatalog
+# ^InstallingSubCaption
+: Installerar
+# ^CompletedSubCaption
+: Slutförd
+# ^UnComponentsSubCaption
+: Avinstallationsval
+# ^UnDirSubCaption
+: Avinstallationskatalog
+# ^ConfirmSubCaption
+: Bekräftelse
+# ^UninstallingSubCaption
+: Avinstallerar
+# ^UnCompletedSubCaption
+: Slutförd
+# ^BackBtn
+< &Tillbaka
+# ^NextBtn
+&Nästa >
+# ^AgreeBtn
+Jag &Godkänner
+# ^AcceptBtn
+Jag &Godkänner villkoren i licensavtalet
+# ^DontAcceptBtn
+Jag &Godkänner inte villkoren i licensavtalet
+# ^InstallBtn
+&Installera
+# ^UninstallBtn
+&Avinstallera
+# ^CancelBtn
+Avbryt
+# ^CloseBtn
+&Stäng
+# ^BrowseBtn
+B&läddra...
+# ^ShowDetailsBtn
+Visa &detaljer
+# ^ClickNext
+Klicka på Nästa för att fortsätta.
+# ^ClickInstall
+Klicka på Installera för att starta installationen.
+# ^ClickUninstall
+Klicka på Avinstallera för att starta avinstallationen.
+# ^Name
+Namn
+# ^Completed
+Slutförd
+# ^LicenseText
+Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka Jag Godkänner.
+# ^LicenseTextCB
+Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. $_CLICK
+# ^LicenseTextRB
+Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA). Om du accepterar villkoren i avtalet, välj det första alternativet nedan. $_CLICK
+# ^UnLicenseText
+Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka Jag Godkänner.
+# ^UnLicenseTextCB
+Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA). Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. $_CLICK
+# ^UnLicenseTextRB
+Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA). Om du accepterar villkoren i avtalet, välj det första alternativet nedan. $_CLICK
+# ^Custom
+Valfri
+# ^ComponentsText
+Markera de komponenter du vill installera och avmarkera de komponenter du inte vill installera. $_CLICK
+# ^ComponentsSubText1
+Välj typ av installation:
+# ^ComponentsSubText2_NoInstTypes
+Välj komponenter att installera:
+# ^ComponentsSubText2
+Eller, välj de alternativa komponenter du önskar installera:
+# ^UnComponentsText
+Markera de komponenter du vill avinstallera och avmarkera de komponenter du inte vill avinstallera. $_CLICK
+# ^UnComponentsSubText1
+Välj typ av avinstallation:
+# ^UnComponentsSubText2_NoInstTypes
+Välj komponenter att avinstallera:
+# ^UnComponentsSubText2
+Eller, välj de alternativa komponenter du önskar avinstallera:
+# ^DirText
+Guiden kommer att installera $(^NameDA) i följande katalog. För att installera i en annan katalog, klicka Bläddra och välj en alternativ katalog. $_CLICK
+# ^DirSubText
+Målkatalog
+# ^DirBrowseText
+Välj katalog att installera $(^NameDA) i:
+# ^UnDirText
+Installationsguiden kommer att avinstallera $(^NameDA) från följande katalog. För att avinstallera från en annan katalog, klicka Bläddra och välj en annan katalog. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Välj katalog att avinstallera $(^NameDA) från:
+# ^SpaceAvailable
+"Utrymme tillgängligt: "
+# ^SpaceRequired
+"Utrymme som behövs: "
+# ^UninstallingText
+$(^NameDA) kommer att avinstalleras från följande katalog. $_CLICK
+# ^UninstallingSubText
+Avinstallerar från:
+# ^FileError
+Fel vid Öppning av fil för skrivning: \r\n\t"$0"\r\nKlicka på avbryt för att avbryta installationen,\r\nförsök igen för att försöka skriva till filen igen, eller\r\nIgnorera för att skippa denna fil
+# ^FileError_NoIgnore
+Fel vid Öppning av fil för skrivning: \r\n\t"$0"\r\nKlicka på försök igen för att skriva till filen igen, eller\r\navbryt för att avbryta installationen
+# ^CantWrite
+"Kan inte skriva: "
+# ^CopyFailed
+Kopiering misslyckades
+# ^CopyTo
+"Kopiera till "
+# ^Registering
+"Registrerar: "
+# ^Unregistering
+"Avregistrerar: "
+# ^SymbolNotFound
+"Kunde inte hitta symbol: "
+# ^CouldNotLoad
+"Kunde inte ladda: "
+# ^CreateFolder
+"Skapa katalog: "
+# ^CreateShortcut
+"Skapa genväg: "
+# ^CreatedUninstaller
+"Skapade avinstallationsprogram: "
+# ^Delete
+"Radera fil: "
+# ^DeleteOnReboot
+"Radera vid omstart: "
+# ^ErrorCreatingShortcut
+"Fel vid skapande av genväg: "
+# ^ErrorCreating
+"Fel vid skapande: "
+# ^ErrorDecompressing
+Fel vid uppackning av data! Skadat installationspaket?
+# ^ErrorRegistering
+Fel vid registrering av DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Kör: "
+# ^Extract
+"Extrahera: "
+# ^ErrorWriting
+"Extrahera: fel vid skrivning till fil "
+# ^InvalidOpcode
+Installationspaket skadat: ogiltig opcode
+# ^NoOLE
+"Ingen OLE för: "
+# ^OutputFolder
+"Målkatalog: "
+# ^RemoveFolder
+"Ta bort katalog: "
+# ^RenameOnReboot
+"Döp om vid omstart: "
+# ^Rename
+"Döp om: "
+# ^Skipped
+"Ignorerad: "
+# ^CopyDetails
+Kopiera detaljinformation till klippbordet
+# ^LogInstall
+Logga installationsförfarandet
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Swedish.nsh b/Contrib/Language files/Swedish.nsh
index 81b3a82..a28ffe8 100755
--- a/Contrib/Language files/Swedish.nsh
+++ b/Contrib/Language files/Swedish.nsh
@@ -1,122 +1,122 @@
-;Compatible with Modern UI 1.72
-;Language: Swedish (1053)
-;By Magnus Bonnevier (magnus.bonnevier@telia.com), updated by Rickard Angbratt (r.angbratt@home.se), updated by Ulf Axelsson (ulf.axelsson@gmail.com)
-
-!insertmacro LANGFILE "Swedish" "Svenska"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Välkommen till installationsguiden för $(^NameDA)."
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denna guide tar dig igenom installationen av $(^NameDA).$\r$\n$\r$\nDet rekommenderas att du avslutar alla andra program innan du fortsätter installationen. Detta tillåter att installationen uppdaterar nödvändiga systemfiler utan att behöva starta om din dator.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Välkommen till avinstallationsguiden för $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denna guide tar dig igenom avinstallationen av $(^NameDA).$\r$\n$\r$\nInnan du startar avinstallationen, försäkra dig om att $(^NameDA) inte körs.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licensavtal"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Om du accepterar villkoren i avtalet, klicka Jag Godkänner för att fortsätta. Du måste acceptera avtalet för att installera $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. Du måste acceptera avtalet för att installera $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Om du accepterar villkoren i avtalet, välj det första alternativet nedan. Du måste acceptera avtalet för att installera $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licensavtal"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Om du accepterar villkoren i avtalet, klicka Jag Godkänner för att fortsätta. Du måste acceptera avtalet för att avinstallera $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. Du måste acceptera avtalet för att avinstallera $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Om du accepterar villkoren i avtalet, välj det första alternativet nedan. Du måste acceptera avtalet för att avinstallera $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tryck Page Down för att se resten av licensavtalet."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Välj komponenter"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Välj vilka alternativ av $(^NameDA) som du vill installera."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrivning"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Välj komponenter"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Välj vilka alternativ av $(^NameDA) som du vill avinstallera."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Håll muspekaren över ett alternativ för att se dess beskrivning."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Håll muspekaren över ett alternativ för att se dess beskrivning."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Välj installationsväg"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Välj katalog att installera $(^NameDA) i."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Välj avinstallationsväg"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Välj katalog att avinstallera $(^NameDA) från."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installerar"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Var vänlig vänta medan $(^NameDA) installeras."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Installationen är klar"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Guiden avslutades korrekt."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Installationen avbröts"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Guiden genomfördes inte korrekt."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallerar"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Var vänlig vänta medan $(^NameDA) avinstalleras."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Avinstallationen genomförd"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Avinstallationen genomfördes korrekt."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Avinstallationen avbruten"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Avinstallationen genomfördes inte korrekt."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Avslutar installationsguiden för $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) har installerats på din dator.$\r$\n$\r$\nKlicka på Slutför för att avsluta guiden."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Din dator måste startas om för att fullborda installationen av $(^NameDA). Vill du starta om nu?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Avslutar avinstallationsguiden för $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) komponenter har avinstallerats från din dator.$\r$\n$\r$\nKlicka på Slutför för att avsluta guiden."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Din dator måste startas om för att fullborda avinstallationen av $(^NameDA). Vill du starta om nu?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Starta om nu"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Jag vill starta om själv senare"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Kör $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Visa Readme-filen"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Slutför"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Välj Startmenykatalog"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Välj en Startmenykatalog för programmets genvägar."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Välj startmenykatalog i vilken du vill skapa programmets genvägar. Du kan ange ett eget namn för att skapa en ny katalog."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Skapa ej genvägar"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Avinstallera $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Ta bort $(^NameDA) från din dator."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Är du säker på att du vill avbryta installationen av $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Är du säker på att du vill avbryta avinstallationen av $(^Name)?"
-!endif
+;Compatible with Modern UI 1.72
+;Language: Swedish (1053)
+;By Magnus Bonnevier (magnus.bonnevier@telia.com), updated by Rickard Angbratt (r.angbratt@home.se), updated by Ulf Axelsson (ulf.axelsson@gmail.com)
+
+!insertmacro LANGFILE "Swedish" "Svenska"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Välkommen till installationsguiden för $(^NameDA)."
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Denna guide tar dig igenom installationen av $(^NameDA).$\r$\n$\r$\nDet rekommenderas att du avslutar alla andra program innan du fortsätter installationen. Detta tillåter att installationen uppdaterar nödvändiga systemfiler utan att behöva starta om din dator.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Välkommen till avinstallationsguiden för $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Denna guide tar dig igenom avinstallationen av $(^NameDA).$\r$\n$\r$\nInnan du startar avinstallationen, försäkra dig om att $(^NameDA) inte körs.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Licensavtal"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Var vänlig läs igenom licensvillkoren innan du installerar $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Om du accepterar villkoren i avtalet, klicka Jag Godkänner för att fortsätta. Du måste acceptera avtalet för att installera $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. Du måste acceptera avtalet för att installera $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Om du accepterar villkoren i avtalet, välj det första alternativet nedan. Du måste acceptera avtalet för att installera $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licensavtal"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Var vänlig läs igenom licensvillkoren innan du avinstallerar $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Om du accepterar villkoren i avtalet, klicka Jag Godkänner för att fortsätta. Du måste acceptera avtalet för att avinstallera $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Om du accepterar villkoren i avtalet, klicka i checkrutan nedan. Du måste acceptera avtalet för att avinstallera $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Om du accepterar villkoren i avtalet, välj det första alternativet nedan. Du måste acceptera avtalet för att avinstallera $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Tryck Page Down för att se resten av licensavtalet."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Välj komponenter"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Välj vilka alternativ av $(^NameDA) som du vill installera."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskrivning"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Välj komponenter"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Välj vilka alternativ av $(^NameDA) som du vill avinstallera."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Håll muspekaren över ett alternativ för att se dess beskrivning."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Håll muspekaren över ett alternativ för att se dess beskrivning."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Välj installationsväg"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Välj katalog att installera $(^NameDA) i."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Välj avinstallationsväg"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Välj katalog att avinstallera $(^NameDA) från."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installerar"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Var vänlig vänta medan $(^NameDA) installeras."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Installationen är klar"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Guiden avslutades korrekt."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Installationen avbröts"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Guiden genomfördes inte korrekt."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallerar"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Var vänlig vänta medan $(^NameDA) avinstalleras."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Avinstallationen genomförd"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Avinstallationen genomfördes korrekt."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Avinstallationen avbruten"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Avinstallationen genomfördes inte korrekt."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Avslutar installationsguiden för $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) har installerats på din dator.$\r$\n$\r$\nKlicka på Slutför för att avsluta guiden."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Din dator måste startas om för att fullborda installationen av $(^NameDA). Vill du starta om nu?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Avslutar avinstallationsguiden för $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) komponenter har avinstallerats från din dator.$\r$\n$\r$\nKlicka på Slutför för att avsluta guiden."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Din dator måste startas om för att fullborda avinstallationen av $(^NameDA). Vill du starta om nu?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Starta om nu"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Jag vill starta om själv senare"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Kör $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Visa Readme-filen"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Slutför"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Välj Startmenykatalog"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Välj en Startmenykatalog för programmets genvägar."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Välj startmenykatalog i vilken du vill skapa programmets genvägar. Du kan ange ett eget namn för att skapa en ny katalog."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Skapa ej genvägar"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Avinstallera $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Ta bort $(^NameDA) från din dator."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Är du säker på att du vill avbryta installationen av $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Är du säker på att du vill avbryta avinstallationen av $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Thai.nlf b/Contrib/Language files/Thai.nlf
index a003523..d47409a 100755
--- a/Contrib/Language files/Thai.nlf
+++ b/Contrib/Language files/Thai.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1054
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-874
-# RTL - anything else than RTL means LTR
--
-# Translation by SoKoOLz, TuW@nNu (asdfuae)
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) µÔ´µÑé§
-# ^UninstallCaption
-$(^Name) ¡àÅÔ¡¡ÒõԴµÑé§
-# ^LicenseSubCaption
-: ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì
-# ^ComponentsSubCaption
-: µÑÇàÅ×Í¡¡ÒõԴµÑé§
-# ^DirSubCaption
-: á¿éÁ·ÕèµÔ´µÑé§
-# ^InstallingSubCaption
-: ¡ÓÅѧµÔ´µÑé§
-# ^CompletedSubCaption
-: àÊÃç¨ÊÔé¹
-# ^UnComponentsSubCaption
-: µÑÇàÅ×͡¡àÅÔ¡¡ÒõԴµÑé§
-# ^UnDirSubCaption
-: á¿éÁ·Õè¡àÅÔ¡¡ÒõԴµÑé§
-# ^ConfirmSubCaption
-: Â×¹Âѹ
-# ^UninstallingSubCaption
-: ¡ÓÅѧ¡àÅÔ¡¡ÒõԴµÑé§
-# ^UnCompletedSubCaption
-: àÊÃç¨ÊÔé¹
-# ^BackBtn
-< &¡ÅѺä»
-# ^NextBtn
-&µèÍä» >
-# ^AgreeBtn
-&µ¡Å§
-# ^AcceptBtn
-&µ¡Å§ÂÍÁÃѺ¢é͵èÒ§æã¹ËÑÇ¢éÍÅÔ¢ÊÔ·¸Ôì
-# ^DontAcceptBtn
-&äÁèÂÍÁÃѺ¢é͵èÒ§æã¹ËÑÇ¢éÍÅÔ¢ÊÔ·¸Ôì
-# ^InstallBtn
-&µÔ´µÑé§
-# ^UninstallBtn
-&¡àÅÔ¡¡ÒõԴµÑé§
-# ^CancelBtn
-¡àÅÔ¡
-# ^CloseBtn
-&»Ô´
-# ^BrowseBtn
-à&ÃÕ¡´Ù...
-# ^ShowDetailsBtn
-&ÃÒÂÅÐàÍÕ´
-# ^ClickNext
-¡´ µèÍä» à¾×èÍàÃÔèÁÃкºÍѵÔâ¹ÁѵÔ
-# ^ClickInstall
-¡´ µÔ´µÑé§ à¾×èÍ·Ó¡ÒõԴµÑé§
-# ^ClickUninstall
-¡´ ¡àÅÔ¡¡ÒõԴµÑé§ à¾×èÍ¡àÅÔ¡¡ÒõԴµÑé§
-# ^Name
-ª×èÍ
-# ^Completed
-àÊÃç¨ÊÔé¹áÅéÇ
-# ^LicenseText
-â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´ ©Ñ¹ÂÍÁÃѺ
-# ^LicenseTextCB
-â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´àÅ×Í¡·Õè¡Åèͧ´éÒ¹ÅèÒ§. $_CLICK
-# ^LicenseTextRB
-â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, àÅ×Í¡µÑÇàÅ×Í¡áá¢éÒ§ÅèÒ§. $_CLICK
-# ^UnLicenseText
-â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒáàÅÔ¡µÔ´µÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´ ©Ñ¹ÂÍÁÃѺ
-# ^UnLicenseTextCB
-â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒáàÅÔ¡µÔ´µÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´àÅ×Í¡·Õè¡Åèͧ´éÒ¹ÅèÒ§. $_CLICK
-# ^UnLicenseTextRB
-â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒáàÅÔ¡µÔ´µÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, àÅ×Í¡µÑÇàÅ×Í¡áá¢éÒ§ÅèÒ§. $_CLICK
-# ^Custom
-¡Ó˹´àͧ
-# ^ComponentsText
-àÅ×èÍ¡ÊÔ觷Õè¤Ø³µéͧ¡ÒõԴµÑé§áÅÐäÁèàÅ×Í¡ÊÔ觷Õè¤Ø³äÁèµéͧ¡ÒõԴµÑé§ $_CLICK
-# ^ComponentsSubText1
-àÅ×Í¡ÇÔ¸Õ¡ÒáÒõԴµÑé§:
-# ^ComponentsSubText2_NoInstTypes
-àÅ×Í¡ÊÔ觷Õè¤Ø³µéͧ¡ÒõԴµÑé§:
-# ^ComponentsSubText2
-ËÃ×Í, àÅ×Í¡µÑÇàÅ×Í¡·Õè¤Ø³µéͧ¡ÒõԴµÑé§:
-# ^UnComponentsText
-àÅ×Í¡µÑÇàÅ×Í¡·Õè¤Ø³µéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§áÅÐäÁèàÅ×Í¡ÊÔ觷Õè¤Ø³äÁèµéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§ $_CLICK
-# ^UnComponentsSubText1
-àÅ×Í¡ÇÔ¸Õ¡ÒáàÅÔ¡¡ÒõԴµÑé§:
-# ^UnComponentsSubText2_NoInstTypes
-àÅ×Í¡µÑÇàÅ×Í¡·Õèµéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§:
-# ^UnComponentsSubText2
-ËÃ×Í, àÅ×Í¡¨Ò¡µÑÇàÅ×Í¡Í×è¹æ·Õè¤Ø³µéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§:
-# ^DirText
-µÑǵԴµÑ駨зӡÒõԴµÑé§ $(^NameDA) ŧã¹á¿éÁ´Ñ§µèÍ仹Õé, ¶éÒµéͧ¡ÒõԴµÑé§Å§ã¹á¿éÁÍ×è¹, ¡´ àÃÕ¡´ÙáÅÐàÅ×Í¡á¿éÁÍ×è¹ $_CLICK
-# ^DirSubText
-á¿éÁ·Õèµéͧ¡ÒõԴµÑé§
-# ^DirBrowseText
-àÅ×Í¡á¿éÁ·Õèµéͧ¡ÒõԴµÑé§ $(^NameDA) ã¹:
-# ^UnDirText
-µÑǵԴµÑ駨зӡÒáàÅÔ¡¡ÒõԴµÑé§ $(^NameDA) ¨Ò¡á¿éÁ´Ñ§µèÍ仹Õé, ¶éÒµéͧ¡ÒáàÅÔ¡¡ÒõԴµÑ駨ҡá¿éÁÍ×è¹, ¡´ àÃÕ¡´Ù áÅÐàÅ×Í¡á¿éÁÍ×è¹ $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-àÅ×Í¡á¿éÁ·Õèµéͧ¡ÒáàÅÔ¡¡ÒõԴµÑé§ $(^NameDA) ¨Ò¡:
-# ^SpaceAvailable
-"ÁÕ¾×é¹·ÕèàËÅ×Í: "
-# ^SpaceRequired
-"µéͧ¡Òþ×é¹·Õè: "
-# ^UninstallingText
-$(^NameDA) ¨Ð¶Ù¡Â¡àÅÔ¡¡ÒõԴµÑ駨ҡá¿éÁµèÍ仹Õé. $_CLICK
-# ^UninstallingSubText
-¡àÅÔ¡¡ÒõԴµÑ駨ҡ:
-# ^FileError
-äÁèÊÒÁÒöà»Ô´ä¿ÅìÊÓËÃѺà¢Õ¹ä´é: \r\n\r\n$0\r\n\r\n¡´ ¡àÅÔ¡ à¾×èÍËÂØ´¡ÒõԴµÑé§,\r\nÅͧÍÕ¡¤ÃÑé§ à¾×èÍÅͧÍÕ¡¤ÃÑé§, ËÃ×Í\r\nà¾Ô¡à©Â à¾×èÍ¢éÒÁä¿Åì¹Õé.
-# ^FileError_NoIgnore
-äÁèÊÒÁÒöà»Ô´ä¿ÅìÊÓËÃѺà¢Õ¹ä´é: \r\n\r\n$0\r\n\r\n¡´ ÅͧÍÕ¡¤ÃÑé§ à¾×èÍÅͧÍÕ¡¤ÃÑé§, ËÃ×Í\r\n¡àÅÔ¡à¾×èÍËÂØ´¡ÒõԴµÑé§
-# ^CantWrite
-"äÁèÊÒÁÒöà¢Õ¹: "
-# ^CopyFailed
-¤Ñ´ÅÍ¡¼Ô´¾ÅÒ´
-# ^CopyTo
-"¤Ñ´ÅÍ¡ä»Âѧ "
-# ^Registering
-"¡ÓÅѧŧ·ÐàºÕ¹: "
-# ^Unregistering
-"¡àÅÔ¡¡ÒÃŧ·ÐàºÕ¹: "
-# ^SymbolNotFound
-"äÁèÊÒÁÒöËÒÊÑ­Åѡɳìä´é: "
-# ^CouldNotLoad
-"äÁèÊÒÁÒöâËÅ´ä´é: "
-# ^CreateFolder
-"ÊÃéÒ§á¿éÁ: "
-# ^CreateShortcut
-"ÊÃéÒ§ªÍÃ쵤ѷ: "
-# ^CreatedUninstaller
-"ÊÃéÒ§µÑÇ¡àÅÔ¡¡ÒõԴµÑé§: "
-# ^Delete
-"źä¿Åì: "
-# ^DeleteOnReboot
-"źµÍ¹ÃÕºÙ·: "
-# ^ErrorCreatingShortcut
-"ÁջѭËÒÊÃéÒ§ä¿ÅìªÍÃ쵤ѷ: "
-# ^ErrorCreating
-"ÁջѭËÒ㹡ÒÃÊÃéÒ§ä¿Åì: "
-# ^ErrorDecompressing
-ÁջѭËÒ㹡ÒäÅÒ¢éÍÁÙÅ! à¡Ô´¢éͼԴ¾ÅÒ´¨Ò¡µÑǵԴµÑé§?
-# ^ErrorRegistering
-ÁջѭËÒ㹡ÒÃŧ·ÐàºÕ¹ DLL
-# ^ExecShell
-"ÃѹàªÅÅìä¿Åì: "
-# ^Exec
-"Ãѹä¿Åì: "
-# ^Extract
-"ᵡä¿Åì: "
-# ^ErrorWriting
-"ᵡä¿Åì: à¡Ô´»Ñ­ËÒ㹡ÒÃà¢Õ¹ä¿Åì"
-# ^InvalidOpcode
-µÑǵԴµÑé§ÁջѭËÒ: ÃËÑÊ opcode ¼Ô´¾ÅÒ´
-# ^NoOLE
-"äÁèÁÕ OLE ÊÓËÃѺ: "
-# ^OutputFolder
-"á¿éÁ·ÕµÔ´µÑé§: "
-# ^RemoveFolder
-"źá¿éÁ: "
-# ^RenameOnReboot
-"à»ÅÕ蹪×è͵͹ÃÕºÙ·: "
-# ^Rename
-"à»ÅÕ蹪×èÍ: "
-# ^Skipped
-"¢éÒÁ: "
-# ^CopyDetails
-¤Ñ´ÅÍ¡ÃÒÂÅÐàÍÕ´ŧ¤ÅÔ»ºÍÃì´
-# ^LogInstall
-ºÑ¹·Ö¡¡ÒõԴµÑé§
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1054
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+874
+# RTL - anything else than RTL means LTR
+-
+# Translation by SoKoOLz, TuW@nNu (asdfuae)
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) µÔ´µÑé§
+# ^UninstallCaption
+$(^Name) ¡àÅÔ¡¡ÒõԴµÑé§
+# ^LicenseSubCaption
+: ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì
+# ^ComponentsSubCaption
+: µÑÇàÅ×Í¡¡ÒõԴµÑé§
+# ^DirSubCaption
+: á¿éÁ·ÕèµÔ´µÑé§
+# ^InstallingSubCaption
+: ¡ÓÅѧµÔ´µÑé§
+# ^CompletedSubCaption
+: àÊÃç¨ÊÔé¹
+# ^UnComponentsSubCaption
+: µÑÇàÅ×͡¡àÅÔ¡¡ÒõԴµÑé§
+# ^UnDirSubCaption
+: á¿éÁ·Õè¡àÅÔ¡¡ÒõԴµÑé§
+# ^ConfirmSubCaption
+: Â×¹Âѹ
+# ^UninstallingSubCaption
+: ¡ÓÅѧ¡àÅÔ¡¡ÒõԴµÑé§
+# ^UnCompletedSubCaption
+: àÊÃç¨ÊÔé¹
+# ^BackBtn
+< &¡ÅѺä»
+# ^NextBtn
+&µèÍä» >
+# ^AgreeBtn
+&µ¡Å§
+# ^AcceptBtn
+&µ¡Å§ÂÍÁÃѺ¢é͵èÒ§æã¹ËÑÇ¢éÍÅÔ¢ÊÔ·¸Ôì
+# ^DontAcceptBtn
+&äÁèÂÍÁÃѺ¢é͵èÒ§æã¹ËÑÇ¢éÍÅÔ¢ÊÔ·¸Ôì
+# ^InstallBtn
+&µÔ´µÑé§
+# ^UninstallBtn
+&¡àÅÔ¡¡ÒõԴµÑé§
+# ^CancelBtn
+¡àÅÔ¡
+# ^CloseBtn
+&»Ô´
+# ^BrowseBtn
+à&ÃÕ¡´Ù...
+# ^ShowDetailsBtn
+&ÃÒÂÅÐàÍÕ´
+# ^ClickNext
+¡´ µèÍä» à¾×èÍàÃÔèÁÃкºÍѵÔâ¹ÁѵÔ
+# ^ClickInstall
+¡´ µÔ´µÑé§ à¾×èÍ·Ó¡ÒõԴµÑé§
+# ^ClickUninstall
+¡´ ¡àÅÔ¡¡ÒõԴµÑé§ à¾×èÍ¡àÅÔ¡¡ÒõԴµÑé§
+# ^Name
+ª×èÍ
+# ^Completed
+àÊÃç¨ÊÔé¹áÅéÇ
+# ^LicenseText
+â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´ ©Ñ¹ÂÍÁÃѺ
+# ^LicenseTextCB
+â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´àÅ×Í¡·Õè¡Åèͧ´éÒ¹ÅèÒ§. $_CLICK
+# ^LicenseTextRB
+â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, àÅ×Í¡µÑÇàÅ×Í¡áá¢éÒ§ÅèÒ§. $_CLICK
+# ^UnLicenseText
+â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒáàÅÔ¡µÔ´µÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´ ©Ñ¹ÂÍÁÃѺ
+# ^UnLicenseTextCB
+â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒáàÅÔ¡µÔ´µÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, ¡´àÅ×Í¡·Õè¡Åèͧ´éÒ¹ÅèÒ§. $_CLICK
+# ^UnLicenseTextRB
+â»Ã´ÍèÒ¹·Ç¹àÃ×èͧ¡ÒÃÂÍÁÃѺã¹ÅÔ¢ÊÔ·¸Ôì¡è͹·Õè¤Ø³¨Ð·Ó¡ÒáàÅÔ¡µÔ´µÑé§ $(^NameDA). ¶éҤسÂÍÁÃѺ¢é͵¡Å§ã¹·Ø¡æ´éÒ¹, àÅ×Í¡µÑÇàÅ×Í¡áá¢éÒ§ÅèÒ§. $_CLICK
+# ^Custom
+¡Ó˹´àͧ
+# ^ComponentsText
+àÅ×èÍ¡ÊÔ觷Õè¤Ø³µéͧ¡ÒõԴµÑé§áÅÐäÁèàÅ×Í¡ÊÔ觷Õè¤Ø³äÁèµéͧ¡ÒõԴµÑé§ $_CLICK
+# ^ComponentsSubText1
+àÅ×Í¡ÇÔ¸Õ¡ÒáÒõԴµÑé§:
+# ^ComponentsSubText2_NoInstTypes
+àÅ×Í¡ÊÔ觷Õè¤Ø³µéͧ¡ÒõԴµÑé§:
+# ^ComponentsSubText2
+ËÃ×Í, àÅ×Í¡µÑÇàÅ×Í¡·Õè¤Ø³µéͧ¡ÒõԴµÑé§:
+# ^UnComponentsText
+àÅ×Í¡µÑÇàÅ×Í¡·Õè¤Ø³µéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§áÅÐäÁèàÅ×Í¡ÊÔ觷Õè¤Ø³äÁèµéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§ $_CLICK
+# ^UnComponentsSubText1
+àÅ×Í¡ÇÔ¸Õ¡ÒáàÅÔ¡¡ÒõԴµÑé§:
+# ^UnComponentsSubText2_NoInstTypes
+àÅ×Í¡µÑÇàÅ×Í¡·Õèµéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§:
+# ^UnComponentsSubText2
+ËÃ×Í, àÅ×Í¡¨Ò¡µÑÇàÅ×Í¡Í×è¹æ·Õè¤Ø³µéͧ¡ÒèСàÅÔ¡¡ÒõԴµÑé§:
+# ^DirText
+µÑǵԴµÑ駨зӡÒõԴµÑé§ $(^NameDA) ŧã¹á¿éÁ´Ñ§µèÍ仹Õé, ¶éÒµéͧ¡ÒõԴµÑé§Å§ã¹á¿éÁÍ×è¹, ¡´ àÃÕ¡´ÙáÅÐàÅ×Í¡á¿éÁÍ×è¹ $_CLICK
+# ^DirSubText
+á¿éÁ·Õèµéͧ¡ÒõԴµÑé§
+# ^DirBrowseText
+àÅ×Í¡á¿éÁ·Õèµéͧ¡ÒõԴµÑé§ $(^NameDA) ã¹:
+# ^UnDirText
+µÑǵԴµÑ駨зӡÒáàÅÔ¡¡ÒõԴµÑé§ $(^NameDA) ¨Ò¡á¿éÁ´Ñ§µèÍ仹Õé, ¶éÒµéͧ¡ÒáàÅÔ¡¡ÒõԴµÑ駨ҡá¿éÁÍ×è¹, ¡´ àÃÕ¡´Ù áÅÐàÅ×Í¡á¿éÁÍ×è¹ $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+àÅ×Í¡á¿éÁ·Õèµéͧ¡ÒáàÅÔ¡¡ÒõԴµÑé§ $(^NameDA) ¨Ò¡:
+# ^SpaceAvailable
+"ÁÕ¾×é¹·ÕèàËÅ×Í: "
+# ^SpaceRequired
+"µéͧ¡Òþ×é¹·Õè: "
+# ^UninstallingText
+$(^NameDA) ¨Ð¶Ù¡Â¡àÅÔ¡¡ÒõԴµÑ駨ҡá¿éÁµèÍ仹Õé. $_CLICK
+# ^UninstallingSubText
+¡àÅÔ¡¡ÒõԴµÑ駨ҡ:
+# ^FileError
+äÁèÊÒÁÒöà»Ô´ä¿ÅìÊÓËÃѺà¢Õ¹ä´é: \r\n\r\n$0\r\n\r\n¡´ ¡àÅÔ¡ à¾×èÍËÂØ´¡ÒõԴµÑé§,\r\nÅͧÍÕ¡¤ÃÑé§ à¾×èÍÅͧÍÕ¡¤ÃÑé§, ËÃ×Í\r\nà¾Ô¡à©Â à¾×èÍ¢éÒÁä¿Åì¹Õé.
+# ^FileError_NoIgnore
+äÁèÊÒÁÒöà»Ô´ä¿ÅìÊÓËÃѺà¢Õ¹ä´é: \r\n\r\n$0\r\n\r\n¡´ ÅͧÍÕ¡¤ÃÑé§ à¾×èÍÅͧÍÕ¡¤ÃÑé§, ËÃ×Í\r\n¡àÅÔ¡à¾×èÍËÂØ´¡ÒõԴµÑé§
+# ^CantWrite
+"äÁèÊÒÁÒöà¢Õ¹: "
+# ^CopyFailed
+¤Ñ´ÅÍ¡¼Ô´¾ÅÒ´
+# ^CopyTo
+"¤Ñ´ÅÍ¡ä»Âѧ "
+# ^Registering
+"¡ÓÅѧŧ·ÐàºÕ¹: "
+# ^Unregistering
+"¡àÅÔ¡¡ÒÃŧ·ÐàºÕ¹: "
+# ^SymbolNotFound
+"äÁèÊÒÁÒöËÒÊÑ­Åѡɳìä´é: "
+# ^CouldNotLoad
+"äÁèÊÒÁÒöâËÅ´ä´é: "
+# ^CreateFolder
+"ÊÃéÒ§á¿éÁ: "
+# ^CreateShortcut
+"ÊÃéÒ§ªÍÃ쵤ѷ: "
+# ^CreatedUninstaller
+"ÊÃéÒ§µÑÇ¡àÅÔ¡¡ÒõԴµÑé§: "
+# ^Delete
+"źä¿Åì: "
+# ^DeleteOnReboot
+"źµÍ¹ÃÕºÙ·: "
+# ^ErrorCreatingShortcut
+"ÁջѭËÒÊÃéÒ§ä¿ÅìªÍÃ쵤ѷ: "
+# ^ErrorCreating
+"ÁջѭËÒ㹡ÒÃÊÃéÒ§ä¿Åì: "
+# ^ErrorDecompressing
+ÁջѭËÒ㹡ÒäÅÒ¢éÍÁÙÅ! à¡Ô´¢éͼԴ¾ÅÒ´¨Ò¡µÑǵԴµÑé§?
+# ^ErrorRegistering
+ÁջѭËÒ㹡ÒÃŧ·ÐàºÕ¹ DLL
+# ^ExecShell
+"ÃѹàªÅÅìä¿Åì: "
+# ^Exec
+"Ãѹä¿Åì: "
+# ^Extract
+"ᵡä¿Åì: "
+# ^ErrorWriting
+"ᵡä¿Åì: à¡Ô´»Ñ­ËÒ㹡ÒÃà¢Õ¹ä¿Åì"
+# ^InvalidOpcode
+µÑǵԴµÑé§ÁջѭËÒ: ÃËÑÊ opcode ¼Ô´¾ÅÒ´
+# ^NoOLE
+"äÁèÁÕ OLE ÊÓËÃѺ: "
+# ^OutputFolder
+"á¿éÁ·ÕµÔ´µÑé§: "
+# ^RemoveFolder
+"źá¿éÁ: "
+# ^RenameOnReboot
+"à»ÅÕ蹪×è͵͹ÃÕºÙ·: "
+# ^Rename
+"à»ÅÕ蹪×èÍ: "
+# ^Skipped
+"¢éÒÁ: "
+# ^CopyDetails
+¤Ñ´ÅÍ¡ÃÒÂÅÐàÍÕ´ŧ¤ÅÔ»ºÍÃì´
+# ^LogInstall
+ºÑ¹·Ö¡¡ÒõԴµÑé§
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Thai.nsh b/Contrib/Language files/Thai.nsh
index 6acadf3..748ceeb 100755
--- a/Contrib/Language files/Thai.nsh
+++ b/Contrib/Language files/Thai.nsh
@@ -1,121 +1,121 @@
-;Language: Thai (1054)
-;By SoKoOLz, TuW@nNu (asdfuae)
-
-!insertmacro LANGFILE "Thai" "Thai"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "ÂÔ¹´Õµé͹ÃѺà¢éÒÊÙè¡ÒõԴµÑé§â»Ãá¡ÃÁ $(^NameDA) "
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "µÑǵԴµÑé§ÍѵÔâ¹ÁѵԨйӤسä»ÊÙè¡ÒõԴµÑ駢ͧ $(^NameDA).$\r$\n$\r$\nàÃÒ¢Íá¹Ð¹ÓãËé»Ô´â»Ãá¡ÃÁÍ×è¹æãËéËÁ´¡è͹·Õè¨ÐàÃÔèÁµÔ´µÑé§, ¹Õè¨Ðà»ç¹¡ÒÃÍѻഷä¿Åìä´é§èÒ¢Öé¹â´Â¤Ø³äÁè¨Óà»ç¹µéͧ·Ó¡ÒÃÃÕºÙ·¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "ÂÔ¹´Õµé͹ÃѺÊÙè¡ÒáàÅÔ¡¡ÒõԴµÑé§ÍѵÔâ¹ÁѵԢͧ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "µÑǵԴµÑé§ÍѵÔâ¹ÁѵԹÕé¨Ð¹Ó¤Ø³ä»ÊÙè¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^NameDA).$\r$\n$\r$\n¡ÒèÐàÃÔèÁ¡ÒáàÅÔ¡¡ÒõԴµÑ駹Õé, â»Ã´µÃǨÊͺÇèÒ $(^NameDA) äÁèä´éãªéÍÂÙè$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "â»Ã´ÍèÒ¹·Ç¹ÅÔ¢ÊÔ·¸Ôìã¹ËÑÇ¢é͵èÒ§æÍÕ¡¤ÃÑ駡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì, ¡´ ©Ñ¹ÂÍÁÃѺ à¾×èÍ·ÓµèÍä», ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸, ¡´àÅ×͡㹡Åèͧ¢éÒ§ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸, àÅ×Í¡µÑÇàÅ×Í¡áá´éÒ¹ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "¡ÃسÒÍèÒ¹¢é͵¡Å§´éÒ¹ÅÔ¢ÊÔ·¸Ôì¡è͹µÔ´µÑé§â»Ãá¡ÃÁ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "¶éҤسÂÍÁÃѺ㹢é͵¡Å§¹Õé ¡Ãسҡ´»ØèÁ ©Ñ¹ÂÍÁÃѺ áÅФس¨Ðµéͧµ¡Å§¡è͹·Õè¨ÐàÃÔèÁ¡ÒáàÅÔ¡µÔ´µÑé§â»Ãá¡ÃÁ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì, ¡´àÅ×͡㹡Åèͧ¢éÒ§ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì, àÅ×Í¡µÑÇàÅ×Í¡áá´éÒ¹ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "¡´ Page Down à¾×èÍÍèÒ¹¢é͵¡Å§·Ñé§ËÁ´"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "àÅ×Í¡Êèǹ»ÃСͺ"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "àÅ×Í¡ÊÔ觷Õè¤Ø³µéͧ¡ÒÃãªé§Ò¹¨Ò¡ $(^NameDA) ·Õè¤Ø³µéͧ¡ÒõԴµÑé§"
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÃÒÂÅÐàÍÕ´"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "àÅ×Í¡Êèǹ»ÃСͺ"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "àÅ×Í¡ÊÔ觷Õè¤Ø³µéͧ¡ÒÃãªé§Ò¹¨Ò¡ $(^NameDA) ·Õè¤Ø³µéͧ¡àÅÔ¡¡ÒõԴµÑé§"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "¢ÂѺàÁÒÊì¢Í§¤Ø³à˹×ÍÊèǹ»ÃСͺà¾×èÍ´ÙÃÒÂÅÐàÍÕ´"
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "¢ÂѺàÁÒÊì¢Í§¤Ø³à˹×ÍÊèǹ»ÃСͺà¾×èÍ´ÙÃÒÂÅÐàÍÕ´"
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "àÅ×Í¡·Õè·Õèµéͧ¡ÒõԴµÑé§"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "àÅ×Í¡á¼éÁ·Õèµéͧ¡ÒõԴµÑé§ $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "àÅ×Í¡á¿éÁ·Õèµéͧ¡ÒáàÅÔ¡¡ÒõԴµÑé§"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "àÅ×Í¡á¿éÁ·Õè¤Ø³µéͧ¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "¡ÓÅѧµÔ´µÑé§"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "â»Ã´ÃÍã¹¢³Ð·Õè $(^NameDA) ¡ÓÅѧ¶Ù¡µÔ´µÑé§"
- ${LangFileString} MUI_TEXT_FINISH_TITLE "¡ÒõԴµÑé§àÊÃç¨ÊÔé¹"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "¡ÒõԴµÑé§àÊÃç¨ÊÁºÙóì"
- ${LangFileString} MUI_TEXT_ABORT_TITLE "¡ÒõԴµÑ駶١¡àÅÔ¡"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "¡ÒõԴµÑé§äÁèàÊÃç¨ÊÁºÙóì"
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "¡ÓÅѧ¡àÅÔ¡¡ÒõԴµÑé§"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "â»Ã´ÃÍã¹¢³Ð·Õè $(^NameDA) ¡ÓÅѧ¶Ù¡Â¡àÅÔ¡¡ÒõԴµÑé§."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§àÊÃç¨ÊÔé¹"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§àÊÃç¨ÊÔé¹â´ÂÊÁºÙóì"
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "¡ÒáàÅÔ¡¡ÒõԴµÑ駶١¡àÅÔ¡"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§äÁèÊÓàÃç¨"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "¡ÒõԴµÑé§ÍѵÔâ¹ÁѵԢͧ $(^NameDA) ¡ÓÅѧàÊÃç¨ÊÔé¹"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ä´é¶Ù¡µÔ´µÑé§Å§ã¹à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³áÅéÇ$\r$\n$\r$\n¡´ àÊÃç¨ÊÔé¹à¾×èͻԴµÑǵԴµÑé§ÍѵÔâ¹ÁѵÔ"
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³¨Óà»ç¹µéͧÃÕʵÒ÷ìà¾×èÍ¡ÒõԴµÑ駢ͧ $(^NameDA) ¨ÐàÃÕºÃéÍÂ, ¤Ø³µéͧ¡ÒèРÃÕºÙ· à´ÕëÂǹÕéäËÁ?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§ÍѵÔâ¹ÁѵԢͧ $(^NameDA) ¡ÓÅѧàÊÃç¨ÊÁºÙóì"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ä´é¶Ù¡Â¡àÅÔ¡ÍÍ¡¨Ò¡à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³áÅéÇ $\r$\n$\r$\n¡´ àÊÃç¨ÊÔé¹ à¾×èͻԴ˹éҨ͵ԴµÑé§ÍѵÔâ¹ÁѵÔ"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³¨Óà»ç¹µéͧÃÕʵÒÃì·ã¹¡Ò÷Õè¨Ð·Ó¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^NameDA) àÊÃç¨ÊÔé¹, ¤Ø³µéͧ¡ÒèÐÃÕºÙ·à´ÕëÂǹÕéäËÁ?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÃÕºÙ· à´ÕëÂǹÕé"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "©Ñ¹µéͧ¡Òà ÃÕºÙ·´éǵ¹àͧ ·ÕËÅѧ"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Ãѹ $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&áÊ´§ÃÒÂÅÐàÍÕ´"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&àÊÃç¨ÊÔé¹"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "àÅ×Í¡á¿éÁ Start Menu"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "àÅ×Í¡á¿éÁ Start Menu à¾×èÍÊÃéÒ§ªÍÃ쵤ѷ¢Í§ $(^NameDA). "
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "àÅ×Í¡á¼éÁ Start Menu ·Õè¤Ø³µéͧ¡ÒèÐÊÃéÒ§ªÍÃ쵤ѷ¢Í§â»Ãá¡ÃÁ, ¤Ø³ÂѧÊÒÁÒö¡Ó˹´ª×èÍà¾×èÍÊÃéÒ§á¿éÁãËÁèä´éÍÕ¡´éÇÂ"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "äÁèµéͧÊÃéÒ§ ªÍÃ쵤ѷ"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "¡àÅÔ¡¡ÒõԴµÑé§ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "¡àÅÔ¡¡ÒõԴµÑé§ $(^NameDA) ¨Ò¡à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³"
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "¤Ø³á¹èã¨ËÃ×ÍÇèҤسµéͧ¡ÒèÐÍÍ¡¨Ò¡¡ÒõԴµÑ駢ͧ $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "¤Ø³á¹èã¨ËÃ×ÍÇèҤسµéͧ¡ÒÃÍÍ¡¨Ò¡¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^Name)?"
-!endif
+;Language: Thai (1054)
+;By SoKoOLz, TuW@nNu (asdfuae)
+
+!insertmacro LANGFILE "Thai" "Thai"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "ÂÔ¹´Õµé͹ÃѺà¢éÒÊÙè¡ÒõԴµÑé§â»Ãá¡ÃÁ $(^NameDA) "
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "µÑǵԴµÑé§ÍѵÔâ¹ÁѵԨйӤسä»ÊÙè¡ÒõԴµÑ駢ͧ $(^NameDA).$\r$\n$\r$\nàÃÒ¢Íá¹Ð¹ÓãËé»Ô´â»Ãá¡ÃÁÍ×è¹æãËéËÁ´¡è͹·Õè¨ÐàÃÔèÁµÔ´µÑé§, ¹Õè¨Ðà»ç¹¡ÒÃÍѻഷä¿Åìä´é§èÒ¢Öé¹â´Â¤Ø³äÁè¨Óà»ç¹µéͧ·Ó¡ÒÃÃÕºÙ·¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "ÂÔ¹´Õµé͹ÃѺÊÙè¡ÒáàÅÔ¡¡ÒõԴµÑé§ÍѵÔâ¹ÁѵԢͧ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "µÑǵԴµÑé§ÍѵÔâ¹ÁѵԹÕé¨Ð¹Ó¤Ø³ä»ÊÙè¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^NameDA).$\r$\n$\r$\n¡ÒèÐàÃÔèÁ¡ÒáàÅÔ¡¡ÒõԴµÑ駹Õé, â»Ã´µÃǨÊͺÇèÒ $(^NameDA) äÁèä´éãªéÍÂÙè$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "â»Ã´ÍèÒ¹·Ç¹ÅÔ¢ÊÔ·¸Ôìã¹ËÑÇ¢é͵èÒ§æÍÕ¡¤ÃÑ駡è͹·Õè¤Ø³¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì, ¡´ ©Ñ¹ÂÍÁÃѺ à¾×èÍ·ÓµèÍä», ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸, ¡´àÅ×͡㹡Åèͧ¢éÒ§ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸, àÅ×Í¡µÑÇàÅ×Í¡áá´éÒ¹ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "¡ÃسÒÍèÒ¹¢é͵¡Å§´éÒ¹ÅÔ¢ÊÔ·¸Ôì¡è͹µÔ´µÑé§â»Ãá¡ÃÁ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "¶éҤسÂÍÁÃѺ㹢é͵¡Å§¹Õé ¡Ãسҡ´»ØèÁ ©Ñ¹ÂÍÁÃѺ áÅФس¨Ðµéͧµ¡Å§¡è͹·Õè¨ÐàÃÔèÁ¡ÒáàÅÔ¡µÔ´µÑé§â»Ãá¡ÃÁ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì, ¡´àÅ×͡㹡Åèͧ¢éÒ§ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¶éҤسÂÍÁÃѺ¢é͵¡Å§àÃ×èͧÅÔ¢ÊÔ·¸Ôì, àÅ×Í¡µÑÇàÅ×Í¡áá´éÒ¹ÅèÒ§¹Õé ¤Ø³µéͧÂÍÁÃѺ㹢é͵¡Å§ÅÔ¢ÊÔ·¸Ôìà¾×èÍ·Õè¨Ð·Ó¡ÒõԴµÑé§ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "¡´ Page Down à¾×èÍÍèÒ¹¢é͵¡Å§·Ñé§ËÁ´"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "àÅ×Í¡Êèǹ»ÃСͺ"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "àÅ×Í¡ÊÔ觷Õè¤Ø³µéͧ¡ÒÃãªé§Ò¹¨Ò¡ $(^NameDA) ·Õè¤Ø³µéͧ¡ÒõԴµÑé§"
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "ÃÒÂÅÐàÍÕ´"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "àÅ×Í¡Êèǹ»ÃСͺ"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "àÅ×Í¡ÊÔ觷Õè¤Ø³µéͧ¡ÒÃãªé§Ò¹¨Ò¡ $(^NameDA) ·Õè¤Ø³µéͧ¡àÅÔ¡¡ÒõԴµÑé§"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "¢ÂѺàÁÒÊì¢Í§¤Ø³à˹×ÍÊèǹ»ÃСͺà¾×èÍ´ÙÃÒÂÅÐàÍÕ´"
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "¢ÂѺàÁÒÊì¢Í§¤Ø³à˹×ÍÊèǹ»ÃСͺà¾×èÍ´ÙÃÒÂÅÐàÍÕ´"
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "àÅ×Í¡·Õè·Õèµéͧ¡ÒõԴµÑé§"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "àÅ×Í¡á¼éÁ·Õèµéͧ¡ÒõԴµÑé§ $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "àÅ×Í¡á¿éÁ·Õèµéͧ¡ÒáàÅÔ¡¡ÒõԴµÑé§"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "àÅ×Í¡á¿éÁ·Õè¤Ø³µéͧ¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "¡ÓÅѧµÔ´µÑé§"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "â»Ã´ÃÍã¹¢³Ð·Õè $(^NameDA) ¡ÓÅѧ¶Ù¡µÔ´µÑé§"
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "¡ÒõԴµÑé§àÊÃç¨ÊÔé¹"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "¡ÒõԴµÑé§àÊÃç¨ÊÁºÙóì"
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "¡ÒõԴµÑ駶١¡àÅÔ¡"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "¡ÒõԴµÑé§äÁèàÊÃç¨ÊÁºÙóì"
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "¡ÓÅѧ¡àÅÔ¡¡ÒõԴµÑé§"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "â»Ã´ÃÍã¹¢³Ð·Õè $(^NameDA) ¡ÓÅѧ¶Ù¡Â¡àÅÔ¡¡ÒõԴµÑé§."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§àÊÃç¨ÊÔé¹"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§àÊÃç¨ÊÔé¹â´ÂÊÁºÙóì"
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "¡ÒáàÅÔ¡¡ÒõԴµÑ駶١¡àÅÔ¡"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§äÁèÊÓàÃç¨"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "¡ÒõԴµÑé§ÍѵÔâ¹ÁѵԢͧ $(^NameDA) ¡ÓÅѧàÊÃç¨ÊÔé¹"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ä´é¶Ù¡µÔ´µÑé§Å§ã¹à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³áÅéÇ$\r$\n$\r$\n¡´ àÊÃç¨ÊÔé¹à¾×èͻԴµÑǵԴµÑé§ÍѵÔâ¹ÁѵÔ"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³¨Óà»ç¹µéͧÃÕʵÒ÷ìà¾×èÍ¡ÒõԴµÑ駢ͧ $(^NameDA) ¨ÐàÃÕºÃéÍÂ, ¤Ø³µéͧ¡ÒèРÃÕºÙ· à´ÕëÂǹÕéäËÁ?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "¡ÒáàÅÔ¡¡ÒõԴµÑé§ÍѵÔâ¹ÁѵԢͧ $(^NameDA) ¡ÓÅѧàÊÃç¨ÊÁºÙóì"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ä´é¶Ù¡Â¡àÅÔ¡ÍÍ¡¨Ò¡à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³áÅéÇ $\r$\n$\r$\n¡´ àÊÃç¨ÊÔé¹ à¾×èͻԴ˹éҨ͵ԴµÑé§ÍѵÔâ¹ÁѵÔ"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³¨Óà»ç¹µéͧÃÕʵÒÃì·ã¹¡Ò÷Õè¨Ð·Ó¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^NameDA) àÊÃç¨ÊÔé¹, ¤Ø³µéͧ¡ÒèÐÃÕºÙ·à´ÕëÂǹÕéäËÁ?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "ÃÕºÙ· à´ÕëÂǹÕé"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "©Ñ¹µéͧ¡Òà ÃÕºÙ·´éǵ¹àͧ ·ÕËÅѧ"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Ãѹ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&áÊ´§ÃÒÂÅÐàÍÕ´"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&àÊÃç¨ÊÔé¹"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "àÅ×Í¡á¿éÁ Start Menu"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "àÅ×Í¡á¿éÁ Start Menu à¾×èÍÊÃéÒ§ªÍÃ쵤ѷ¢Í§ $(^NameDA). "
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "àÅ×Í¡á¼éÁ Start Menu ·Õè¤Ø³µéͧ¡ÒèÐÊÃéÒ§ªÍÃ쵤ѷ¢Í§â»Ãá¡ÃÁ, ¤Ø³ÂѧÊÒÁÒö¡Ó˹´ª×èÍà¾×èÍÊÃéÒ§á¿éÁãËÁèä´éÍÕ¡´éÇÂ"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "äÁèµéͧÊÃéÒ§ ªÍÃ쵤ѷ"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "¡àÅÔ¡¡ÒõԴµÑé§ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "¡àÅÔ¡¡ÒõԴµÑé§ $(^NameDA) ¨Ò¡à¤Ã×èͧ¤ÍÁ¾ÔÇàµÍÃì¢Í§¤Ø³"
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "¤Ø³á¹èã¨ËÃ×ÍÇèҤسµéͧ¡ÒèÐÍÍ¡¨Ò¡¡ÒõԴµÑ駢ͧ $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "¤Ø³á¹èã¨ËÃ×ÍÇèҤسµéͧ¡ÒÃÍÍ¡¨Ò¡¡ÒáàÅÔ¡¡ÒõԴµÑ駢ͧ $(^Name)?"
+!endif
diff --git a/Contrib/Language files/TradChinese.nlf b/Contrib/Language files/TradChinese.nlf
index a2a2c26..a335319 100755
--- a/Contrib/Language files/TradChinese.nlf
+++ b/Contrib/Language files/TradChinese.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1028
-# Font and size - dash (-) means default ¦r«¬¦WºÙ»P¤j¤p
-·s²Ó©úÅé
-9
-# Codepage - dash (-) means ANSI code page ANSI ¦r½X­¶
-950
-# RTL - anything else than RTL means LTR ¥Ñ¥k¦Ü¥ª®Ñ¼g
--
-# Translator: Kii Ali <kiiali@cpatch.org>;Revision date: 2004-12-14
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) ¦w¸Ë
-# ^UninstallCaption
-$(^Name) ¸Ñ°£¦w¸Ë
-# ^LicenseSubCaption
-: ±ÂÅv¨óij
-# ^ComponentsSubCaption
-: ¦w¸Ë¿ï¶µ
-# ^DirSubCaption
-: ¦w¸Ë¸ê®Æ§¨
-# ^InstallingSubCaption
-: ¥¿¦b¦w¸Ë
-# ^CompletedSubCaption
-: ¤w§¹¦¨
-# ^UnComponentsSubCaption
-: ¸Ñ°£¦w¸Ë¿ï¶µ
-# ^UnDirSubCaption
-: ¸Ñ°£¦w¸Ë¸ê®Æ§¨
-# ^ConfirmSubCaption
-: ½T»{
-# ^UninstallingSubCaption
-: ¥¿¦b¸Ñ°£¦w¸Ë
-# ^UnCompletedSubCaption
-: §¹¦¨
-# ^BackBtn
-< ¤W¤@¨B(&P)
-# ^NextBtn
-¤U¤@¨B(&N) >
-# ^AgreeBtn
-§Ú±µ¨ü(&I)
-# ^AcceptBtn
-§Ú±µ¨ü¡u±ÂÅv¨óij¡v¤¤ªº±ø´Ú(&A)
-# ^DontAcceptBtn
-§Ú¤£±µ¨ü¡u±ÂÅv¨óij¡v¤¤ªº±ø´Ú(&N)
-# ^InstallBtn
-¦w¸Ë(&I)
-# ^UninstallBtn
-²¾°£(&U)
-# ^CancelBtn
-¨ú®ø(&C)
-# ^CloseBtn
-Ãö³¬(&L)
-# ^BrowseBtn
-ÂsÄý(&B)...
-# ^ShowDetailsBtn
-Åã¥Ü²Ó¸`(&D)
-# ^ClickNext
-«ö¤@¤U [¤U¤@¨B(N)] Ä~Äò¡C
-# ^ClickInstall
-«ö¤@¤U [¦w¸Ë(I)] ¶}©l¦w¸Ë¶iµ{¡C
-# ^ClickUninstall
-«ö¤@¤U [¸Ñ°£¦w¸Ë(U)] ¶}©l¸Ñ°£¦w¸Ë¶iµ{¡C
-# ^Name
-¦WºÙ
-# ^Completed
-¤w§¹¦¨
-# ^LicenseText
-¦b¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] ¡C
-# ^LicenseTextCB
-¦b¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C $_CLICK
-# ^LicenseTextRB
-¦b¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A¿ï¾Ü¤U¤èªº²Ä¤@­Ó¿ï¶µ¡C $_CLICK
-# ^UnLicenseText
-¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] ¡C
-# ^UnLicenseTextCB
-¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C $_CLICK
-# ^UnLicenseTextRB
-¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A¿ï¾Ü¤U¤èªº²Ä¤@­Ó¿ï¶µ¡C $_CLICK
-# ^Custom
-¦Û­q
-# ^ComponentsText
-¤Ä¿ï§A·Q­n¦w¸Ëªº¤¸¥ó¡A¨Ã¸Ñ°£¤Ä¿ï§A¤£§Æ±æ¦w¸Ëªº¤¸¥ó¡C $_CLICK
-# ^ComponentsSubText1
-¿ï¨ú¦w¸ËªºÃþ«¬:
-# ^ComponentsSubText2_NoInstTypes
-¿ï¨ú¦w¸Ëªº¤¸¥ó:
-# ^ComponentsSubText2
-©ÎªÌ¡A¦Û­q¿ï¨ú·Q¦w¸Ëªº¤¸¥ó:
-# ^UnComponentsText
-¤Ä¿ï§A·Q­n¸Ñ°£¦w¸Ëªº¤¸¥ó¡A¨Ã¸Ñ°£¤Ä¿ï§A¤£§Æ±æ¸Ñ°£¦w¸Ëªº¤¸¥ó¡C $_CLICK
-# ^UnComponentsSubText1
-¿ï¾Ü¸Ñ°£¦w¸ËªºÃþ«¬:
-# ^UnComponentsSubText2_NoInstTypes
-¿ï¾Ü­n¸Ñ°£¦w¸Ëªº¤¸¥ó:
-# ^UnComponentsSubText2
-©Î¬O¡A¿ï¾Ü·Q­n¸Ñ°£¦w¸Ëªº¥i¿ï¶µ¤¸¥ó:
-# ^DirText
-Setup ±N¦w¸Ë $(^NameDA) ¦b¤U¦C¸ê®Æ§¨¡C­n¦w¸Ë¨ì¤£¦P¸ê®Æ§¨¡A«ö¤@¤U [ÂsÄý(B)] ¨Ã¿ï¾Ü¨ä¥Lªº¸ê®Æ§¨¡C $_CLICK
-# ^DirSubText
-¥Ø¼Ð¸ê®Æ§¨
-# ^DirBrowseText
-¿ï¾Ü­n¦w¸Ë $(^NameDA) ªº¸ê®Æ§¨¦ì¸m:
-# ^UnDirText
-Setup ±N¸Ñ°£¦w¸Ë $(^NameDA) ¦b¤U¦C¸ê®Æ§¨¡C­n¸Ñ°£¦w¸Ë¨ì¤£¦P¸ê®Æ§¨¡A«ö¤@¤U [ÂsÄý(B)] ¨Ã¿ï¾Ü¨ä¥Lªº¸ê®Æ§¨¡C $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-¿ï¾Ü­n¸Ñ°£¦w¸Ë $(^NameDA) ªº¸ê®Æ§¨¦ì¸m:
-# ^SpaceAvailable
-"¥i¥ÎªÅ¶¡: "
-# ^SpaceRequired
-"©Ò»ÝªÅ¶¡: "
-# ^UninstallingText
-³o­ÓºëÆF±N±q§Aªº¹q¸£¸Ñ°£¦w¸Ë $(^NameDA) ¡C $_CLICK
-# ^UninstallingSubText
-¸Ñ°£¦w¸Ë¥Ø¿ý:
-# ^FileError
-µLªk¶}±Ò­n¼g¤JªºÀÉ®×: \r\n\t"$0"\r\n«ö¤@¤U [Abort] ©ñ±ó¦w¸Ë¡A\r\n [Retry] ­«·s¹Á¸Õ¼g¤JÀɮסA©Î\r\n [Ignore] ©¿²¤³o­ÓÀɮסC
-# ^FileError_NoIgnore
-µLªk¶}±Ò­n¼g¤JªºÀÉ®×: \r\n\t"$0"\r\n«ö¤@¤U [Retry] ­«·s¹Á¸Õ¼g¤JÀɮסA©Î\r\n [Cancel] ¨ú®ø¦w¸Ë¡C
-# ^CantWrite
-"µLªk¼g¤J: "
-# ^CopyFailed
-"½Æ»s¥¢±Ñ "
-# ^CopyTo
-"½Æ»s¨ì: "
-# ^Registering
-"¥¿¦bµù¥U: "
-# ^Unregistering
-"¥¿¦b¸Ñ°£µù¥U: "
-# ^SymbolNotFound
-"µLªk§ä¨ì²Å¸¹: "
-# ^CouldNotLoad
-"µLªk¸ü¤J: "
-# ^CreateFolder
-"«Ø¥ß¸ê®Æ§¨: "
-# ^CreateShortcut
-"«Ø¥ß±¶®|: "
-# ^CreatedUninstaller
-"«Ø¥ß¸Ñ°£¦w¸Ëµ{¦¡: "
-# ^Delete
-"§R°£ÀÉ®×: "
-# ^DeleteOnReboot
-"­«·s±Ò°Ê«á§R°£: "
-# ^ErrorCreatingShortcut
-"¥¿¦b«Ø¥ß±¶®|®Éµo¥Í¿ù»~: "
-# ^ErrorCreating
-"¥¿¦b«Ø¥ß®Éµo¥Í¿ù»~: "
-# ^ErrorDecompressing
-"¥¿¦b¸ÑÀ£ÁY¸ê®Æµo¥Í¿ù»~¡I¤w·lÃaªº¦w¸Ëµ{¦¡¡H"
-# ^ErrorRegistering
-"¥¿¦bµù¥U DLL ®Éµo¥Í¿ù»~"
-# ^ExecShell
-"°õ¦æ¥~³¡µ{¦¡: "
-# ^Exec
-"°õ¦æ: "
-# ^Extract
-"©â¨ú: "
-# ^ErrorWriting
-"©â¨ú: µLªk¼g¤JÀÉ®× "
-# ^InvalidOpcode
-"¦w¸Ë·l·´: µL®Äªº§@·~¥N½X "
-# ^NoOLE
-"¨S¦³ OLE ¥Î©ó: "
-# ^OutputFolder
-"¿é¥X¥Ø¿ý: "
-# ^RemoveFolder
-"²¾°£¥Ø¿ý: "
-# ^RenameOnReboot
-"­«·s±Ò°Ê«á­«·s©R¦W: "
-# ^Rename
-"­«·s©R¦W: "
-# ^Skipped
-"¤w²¤¹L: "
-# ^CopyDetails
-"½Æ»s²Ó¸`¨ì°Å¶Kï "
-# ^LogInstall
-"¤é»x¦w¸Ë¶iµ{"
-# byte
-B
-# kilo
-K
-# mega
-M
-# giga
+# Header, don't edit
+NLF v6
+# Language ID
+1028
+# Font and size - dash (-) means default ¦r«¬¦WºÙ»P¤j¤p
+·s²Ó©úÅé
+9
+# Codepage - dash (-) means ANSI code page ANSI ¦r½X­¶
+950
+# RTL - anything else than RTL means LTR ¥Ñ¥k¦Ü¥ª®Ñ¼g
+-
+# Translator: Kii Ali <kiiali@cpatch.org>;Revision date: 2004-12-14
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) ¦w¸Ë
+# ^UninstallCaption
+$(^Name) ¸Ñ°£¦w¸Ë
+# ^LicenseSubCaption
+: ±ÂÅv¨óij
+# ^ComponentsSubCaption
+: ¦w¸Ë¿ï¶µ
+# ^DirSubCaption
+: ¦w¸Ë¸ê®Æ§¨
+# ^InstallingSubCaption
+: ¥¿¦b¦w¸Ë
+# ^CompletedSubCaption
+: ¤w§¹¦¨
+# ^UnComponentsSubCaption
+: ¸Ñ°£¦w¸Ë¿ï¶µ
+# ^UnDirSubCaption
+: ¸Ñ°£¦w¸Ë¸ê®Æ§¨
+# ^ConfirmSubCaption
+: ½T»{
+# ^UninstallingSubCaption
+: ¥¿¦b¸Ñ°£¦w¸Ë
+# ^UnCompletedSubCaption
+: §¹¦¨
+# ^BackBtn
+< ¤W¤@¨B(&P)
+# ^NextBtn
+¤U¤@¨B(&N) >
+# ^AgreeBtn
+§Ú±µ¨ü(&I)
+# ^AcceptBtn
+§Ú±µ¨ü¡u±ÂÅv¨óij¡v¤¤ªº±ø´Ú(&A)
+# ^DontAcceptBtn
+§Ú¤£±µ¨ü¡u±ÂÅv¨óij¡v¤¤ªº±ø´Ú(&N)
+# ^InstallBtn
+¦w¸Ë(&I)
+# ^UninstallBtn
+²¾°£(&U)
+# ^CancelBtn
+¨ú®ø(&C)
+# ^CloseBtn
+Ãö³¬(&L)
+# ^BrowseBtn
+ÂsÄý(&B)...
+# ^ShowDetailsBtn
+Åã¥Ü²Ó¸`(&D)
+# ^ClickNext
+«ö¤@¤U [¤U¤@¨B(N)] Ä~Äò¡C
+# ^ClickInstall
+«ö¤@¤U [¦w¸Ë(I)] ¶}©l¦w¸Ë¶iµ{¡C
+# ^ClickUninstall
+«ö¤@¤U [¸Ñ°£¦w¸Ë(U)] ¶}©l¸Ñ°£¦w¸Ë¶iµ{¡C
+# ^Name
+¦WºÙ
+# ^Completed
+¤w§¹¦¨
+# ^LicenseText
+¦b¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] ¡C
+# ^LicenseTextCB
+¦b¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C $_CLICK
+# ^LicenseTextRB
+¦b¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A¿ï¾Ü¤U¤èªº²Ä¤@­Ó¿ï¶µ¡C $_CLICK
+# ^UnLicenseText
+¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] ¡C
+# ^UnLicenseTextCB
+¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C $_CLICK
+# ^UnLicenseTextRB
+¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e½ÐÀ˾\±ÂÅv¨óij¡C¦pªG§A±µ¨ü¨óij¤¤©Ò¦³±ø´Ú¡A¿ï¾Ü¤U¤èªº²Ä¤@­Ó¿ï¶µ¡C $_CLICK
+# ^Custom
+¦Û­q
+# ^ComponentsText
+¤Ä¿ï§A·Q­n¦w¸Ëªº¤¸¥ó¡A¨Ã¸Ñ°£¤Ä¿ï§A¤£§Æ±æ¦w¸Ëªº¤¸¥ó¡C $_CLICK
+# ^ComponentsSubText1
+¿ï¨ú¦w¸ËªºÃþ«¬:
+# ^ComponentsSubText2_NoInstTypes
+¿ï¨ú¦w¸Ëªº¤¸¥ó:
+# ^ComponentsSubText2
+©ÎªÌ¡A¦Û­q¿ï¨ú·Q¦w¸Ëªº¤¸¥ó:
+# ^UnComponentsText
+¤Ä¿ï§A·Q­n¸Ñ°£¦w¸Ëªº¤¸¥ó¡A¨Ã¸Ñ°£¤Ä¿ï§A¤£§Æ±æ¸Ñ°£¦w¸Ëªº¤¸¥ó¡C $_CLICK
+# ^UnComponentsSubText1
+¿ï¾Ü¸Ñ°£¦w¸ËªºÃþ«¬:
+# ^UnComponentsSubText2_NoInstTypes
+¿ï¾Ü­n¸Ñ°£¦w¸Ëªº¤¸¥ó:
+# ^UnComponentsSubText2
+©Î¬O¡A¿ï¾Ü·Q­n¸Ñ°£¦w¸Ëªº¥i¿ï¶µ¤¸¥ó:
+# ^DirText
+Setup ±N¦w¸Ë $(^NameDA) ¦b¤U¦C¸ê®Æ§¨¡C­n¦w¸Ë¨ì¤£¦P¸ê®Æ§¨¡A«ö¤@¤U [ÂsÄý(B)] ¨Ã¿ï¾Ü¨ä¥Lªº¸ê®Æ§¨¡C $_CLICK
+# ^DirSubText
+¥Ø¼Ð¸ê®Æ§¨
+# ^DirBrowseText
+¿ï¾Ü­n¦w¸Ë $(^NameDA) ªº¸ê®Æ§¨¦ì¸m:
+# ^UnDirText
+Setup ±N¸Ñ°£¦w¸Ë $(^NameDA) ¦b¤U¦C¸ê®Æ§¨¡C­n¸Ñ°£¦w¸Ë¨ì¤£¦P¸ê®Æ§¨¡A«ö¤@¤U [ÂsÄý(B)] ¨Ã¿ï¾Ü¨ä¥Lªº¸ê®Æ§¨¡C $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+¿ï¾Ü­n¸Ñ°£¦w¸Ë $(^NameDA) ªº¸ê®Æ§¨¦ì¸m:
+# ^SpaceAvailable
+"¥i¥ÎªÅ¶¡: "
+# ^SpaceRequired
+"©Ò»ÝªÅ¶¡: "
+# ^UninstallingText
+³o­ÓºëÆF±N±q§Aªº¹q¸£¸Ñ°£¦w¸Ë $(^NameDA) ¡C $_CLICK
+# ^UninstallingSubText
+¸Ñ°£¦w¸Ë¥Ø¿ý:
+# ^FileError
+µLªk¶}±Ò­n¼g¤JªºÀÉ®×: \r\n\t"$0"\r\n«ö¤@¤U [Abort] ©ñ±ó¦w¸Ë¡A\r\n [Retry] ­«·s¹Á¸Õ¼g¤JÀɮסA©Î\r\n [Ignore] ©¿²¤³o­ÓÀɮסC
+# ^FileError_NoIgnore
+µLªk¶}±Ò­n¼g¤JªºÀÉ®×: \r\n\t"$0"\r\n«ö¤@¤U [Retry] ­«·s¹Á¸Õ¼g¤JÀɮסA©Î\r\n [Cancel] ¨ú®ø¦w¸Ë¡C
+# ^CantWrite
+"µLªk¼g¤J: "
+# ^CopyFailed
+"½Æ»s¥¢±Ñ "
+# ^CopyTo
+"½Æ»s¨ì: "
+# ^Registering
+"¥¿¦bµù¥U: "
+# ^Unregistering
+"¥¿¦b¸Ñ°£µù¥U: "
+# ^SymbolNotFound
+"µLªk§ä¨ì²Å¸¹: "
+# ^CouldNotLoad
+"µLªk¸ü¤J: "
+# ^CreateFolder
+"«Ø¥ß¸ê®Æ§¨: "
+# ^CreateShortcut
+"«Ø¥ß±¶®|: "
+# ^CreatedUninstaller
+"«Ø¥ß¸Ñ°£¦w¸Ëµ{¦¡: "
+# ^Delete
+"§R°£ÀÉ®×: "
+# ^DeleteOnReboot
+"­«·s±Ò°Ê«á§R°£: "
+# ^ErrorCreatingShortcut
+"¥¿¦b«Ø¥ß±¶®|®Éµo¥Í¿ù»~: "
+# ^ErrorCreating
+"¥¿¦b«Ø¥ß®Éµo¥Í¿ù»~: "
+# ^ErrorDecompressing
+"¥¿¦b¸ÑÀ£ÁY¸ê®Æµo¥Í¿ù»~¡I¤w·lÃaªº¦w¸Ëµ{¦¡¡H"
+# ^ErrorRegistering
+"¥¿¦bµù¥U DLL ®Éµo¥Í¿ù»~"
+# ^ExecShell
+"°õ¦æ¥~³¡µ{¦¡: "
+# ^Exec
+"°õ¦æ: "
+# ^Extract
+"©â¨ú: "
+# ^ErrorWriting
+"©â¨ú: µLªk¼g¤JÀÉ®× "
+# ^InvalidOpcode
+"¦w¸Ë·l·´: µL®Äªº§@·~¥N½X "
+# ^NoOLE
+"¨S¦³ OLE ¥Î©ó: "
+# ^OutputFolder
+"¿é¥X¥Ø¿ý: "
+# ^RemoveFolder
+"²¾°£¥Ø¿ý: "
+# ^RenameOnReboot
+"­«·s±Ò°Ê«á­«·s©R¦W: "
+# ^Rename
+"­«·s©R¦W: "
+# ^Skipped
+"¤w²¤¹L: "
+# ^CopyDetails
+"½Æ»s²Ó¸`¨ì°Å¶Kï "
+# ^LogInstall
+"¤é»x¦w¸Ë¶iµ{"
+# byte
+B
+# kilo
+K
+# mega
+M
+# giga
G \ No newline at end of file
diff --git a/Contrib/Language files/TradChinese.nsh b/Contrib/Language files/TradChinese.nsh
index fd660ef..df6ae58 100755
--- a/Contrib/Language files/TradChinese.nsh
+++ b/Contrib/Language files/TradChinese.nsh
@@ -1,122 +1,122 @@
-;Language: 'Chinese (Traditional)' (1028)
-;Translator: Kii Ali <kiiali@cpatch.org>
-;Revision date: 2004-12-15
-
-!insertmacro LANGFILE "TradChinese" "Chinese (Traditional)"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Åwªï¨Ï¥Î $(^NameDA) ¦w¸ËºëÆF"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "³o­ÓºëÆF±N«ü¤Þ§A§¹¦¨ $(^NameDA) ªº¦w¸Ë¶iµ{¡C$\r$\n$\r$\n¦b¶}©l¦w¸Ë¤§«e¡A«Øij¥ýÃö³¬¨ä¥L©Ò¦³À³¥Îµ{¦¡¡C³o±N¤¹³\\¡u¦w¸Ëµ{¦¡¡v§ó·s«ü©wªº¨t²ÎÀɮסA¦Ó¤£»Ý­n­«·s±Ò°Ê§Aªº¹q¸£¡C$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Åwªï¨Ï¥Î $(^NameDA) ¸Ñ°£¦w¸ËºëÆF"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "³o­ÓºëÆF±N¥þµ{«ü¤Þ§A $(^NameDA) ªº¸Ñ°£¦w¸Ë¶iµ{¡C$\r$\n$\r$\n¦b¶}©l¸Ñ°£¦w¸Ë¤§«e¡A½T»{ $(^NameDA) ¨Ã¥¼°õ¦æ·í¤¤¡C$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "±ÂÅv¨óij"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "¦b¦w¸Ë $(^NameDA) ¤§«e¡A½ÐÀ˾\±ÂÅv±ø´Ú¡C"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] Ä~Äò¦w¸Ë¡C¦pªG§A¿ï¨ú [¨ú®ø(C)] ¡A¦w¸Ëµ{¦¡±N·|Ãö³¬¡C¥²¶·­n±µ¨ü¨óij¤~¯à¦w¸Ë $(^NameDA) ¡C"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C¥²¶·­n±µ¨ü¨óij¤~¯à¦w¸Ë $(^NameDA)¡C$_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A¿ï¾Ü¤U¤è²Ä¤@­Ó¿ï¶µ¡C¥²¶·­n±µ¨ü¨óij¤~¯à¦w¸Ë $(^NameDA)¡C$_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "±ÂÅv¨óij"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e¡A½ÐÀ˾\±ÂÅv±ø´Ú¡C"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] Ä~Äò¸Ñ°£¦w¸Ë¡C¦pªG§A¿ï¨ú [¨ú®ø(C)] ¡A¦w¸Ëµ{¦¡±N·|Ãö³¬¡C¥²¶·­n±µ¨ü¨óij¤~¯à¸Ñ°£¦w¸Ë $(^NameDA) ¡C"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C¥²¶·­n±µ¨ü¨óij¤~¯à¸Ñ°£¦w¸Ë $(^NameDA)¡C$_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A¿ï¾Ü¤U¤è²Ä¤@­Ó¿ï¶µ¡C¥²¶·­n±µ¨ü¨óij¤~¯à¸Ñ°£¦w¸Ë $(^NameDA)¡C$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "À˾\¨óijªº¨ä¾l³¡¤À¡A½Ð«ö [PgDn] ©¹¤U±²°Ê­¶­±¡C"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "¿ï¾Ü¤¸¥ó"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "¿ï¾Ü§A·Q­n¦w¸Ë $(^NameDA) ªº¨º¨Ç¥\¯à¡C"
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "´y­z"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "¿ï¨ú¤¸¥ó"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "¿ï¨ú $(^NameDA) ·í¤¤§A·Q­n¸Ñ°£¦w¸Ëªº¥\¯à¡C"
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "²¾°Ê§Aªº·Æ¹««ü¼Ð¨ì¤¸¥ó¤§¤W¡A«K¥i¨£¨ì¥¦ªº´y­z¡C"
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "²¾°Ê§Aªº·Æ¹««ü¼Ð¨ì¤¸¥ó¤§¤W¡A«K¥i¨£¨ì¥¦ªº´y­z¡C"
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "¿ï¨ú¦w¸Ë¦ì¸m"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "¿ï¨ú $(^NameDA) ­n¦w¸Ëªº¸ê®Æ§¨¡C"
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "¿ï¨ú¸Ñ°£¦w¸Ë¦ì¸m"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "¿ï¨ú $(^NameDA) ­n¸Ñ°£¦w¸Ëªº¸ê®Æ§¨¡C"
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "¥¿¦b¦w¸Ë"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA) ¥¿¦b¦w¸Ë¡A½Ðµ¥­Ô¡C"
- ${LangFileString} MUI_TEXT_FINISH_TITLE "¦w¸Ë§¹¦¨"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "¦w¸Ëµ{¦¡¤w¦¨¥\¦a°õ¦æ§¹¦¨¡C"
- ${LangFileString} MUI_TEXT_ABORT_TITLE "¦w¸Ë¤v¤¤¤î"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "¦w¸Ëµ{¦¡¨Ã¥¼¦¨¥\¦a°õ¦æ§¹¦¨¡C"
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "¥¿¦b¸Ñ°£¦w¸Ë"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA) ¥¿¦b¸Ñ°£¦w¸Ë¡A½Ðµ¥­Ô¡C"
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "¸Ñ°£¦w¸Ë¤w§¹¦¨"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "¸Ñ°£¦w¸Ëµ{¦¡¤w¦¨¥\¦a°õ¦æ§¹¦¨¡C"
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "¸Ñ°£¦w¸Ë¤w¤¤¤î"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "¸Ñ°£¦w¸Ëµ{¦¡¨Ã¥¼¦¨¥\¦a°õ¦æ§¹¦¨¡C"
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "¥¿¦b§¹¦¨ $(^NameDA) ¦w¸ËºëÆF"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ¤w¦w¸Ë¦b§Aªº¨t²Î¡C$\r$\n«ö¤@¤U [§¹¦¨(F)] Ãö³¬¦¹ºëÆF¡C"
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "§Aªº¨t²Î»Ý­n­«·s±Ò°Ê¡A¥H«K§¹¦¨ $(^NameDA) ªº¦w¸Ë¡C²{¦b­n­«·s±Ò°Ê¶Ü¡H"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "¥¿¦b§¹¦¨ $(^NameDA) ¸Ñ°£¦w¸ËºëÆF"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ¤w±q§Aªº¹q¸£¸Ñ°£¦w¸Ë¡C$\r$\n$\r$\n«ö¤@¤U [§¹¦¨] Ãö³¬³o­ÓºëÆF¡C"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "¹q¸£»Ý­n­«·s±Ò°Ê¡A¥H«K§¹¦¨ $(^NameDA) ªº¸Ñ°£¦w¸Ë¡C²{¦b·Q­n­«·s±Ò°Ê¶Ü¡H"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "¬O¡A²{¦b­«·s±Ò°Ê(&Y)"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "§_¡A§Úµy«á¦A¦Û¦æ­«·s±Ò°Ê(&N)"
- ${LangFileString} MUI_TEXT_FINISH_RUN "°õ¦æ $(^NameDA)(&R)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Åã¥Ü¡uŪ§ÚÀɮסv(&M)"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "§¹¦¨(&F)"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "¿ï¾Ü¡u¶}©l¥\¯àªí¡v¸ê®Æ§¨"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "¿ï¾Ü¡u¶}©l¥\¯àªí¡v¸ê®Æ§¨¡A¥Î©óµ{¦¡ªº±¶®|¡C"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "¿ï¾Ü¡u¶}©l¥\¯àªí¡v¸ê®Æ§¨¡A¥H«K«Ø¥ßµ{¦¡ªº±¶®|¡C§A¤]¥i¥H¿é¤J¦WºÙ¡A«Ø¥ß·s¸ê®Æ§¨¡C"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "¤£­n«Ø¥ß±¶®|(&N)"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "¸Ñ°£¦w¸Ë $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "±q§Aªº¹q¸£¸Ñ°£¦w¸Ë $(^NameDA) ¡C"
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "§A½T©w­nÂ÷¶} $(^Name) ¦w¸Ëµ{¦¡¡H"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "§A½T©w­nÂ÷¶} $(^Name) ¸Ñ°£¦w¸Ë¶Ü¡H"
-!endif
+;Language: 'Chinese (Traditional)' (1028)
+;Translator: Kii Ali <kiiali@cpatch.org>
+;Revision date: 2004-12-15
+
+!insertmacro LANGFILE "TradChinese" "Chinese (Traditional)"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Åwªï¨Ï¥Î $(^NameDA) ¦w¸ËºëÆF"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "³o­ÓºëÆF±N«ü¤Þ§A§¹¦¨ $(^NameDA) ªº¦w¸Ë¶iµ{¡C$\r$\n$\r$\n¦b¶}©l¦w¸Ë¤§«e¡A«Øij¥ýÃö³¬¨ä¥L©Ò¦³À³¥Îµ{¦¡¡C³o±N¤¹³\\¡u¦w¸Ëµ{¦¡¡v§ó·s«ü©wªº¨t²ÎÀɮסA¦Ó¤£»Ý­n­«·s±Ò°Ê§Aªº¹q¸£¡C$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Åwªï¨Ï¥Î $(^NameDA) ¸Ñ°£¦w¸ËºëÆF"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "³o­ÓºëÆF±N¥þµ{«ü¤Þ§A $(^NameDA) ªº¸Ñ°£¦w¸Ë¶iµ{¡C$\r$\n$\r$\n¦b¶}©l¸Ñ°£¦w¸Ë¤§«e¡A½T»{ $(^NameDA) ¨Ã¥¼°õ¦æ·í¤¤¡C$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "±ÂÅv¨óij"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "¦b¦w¸Ë $(^NameDA) ¤§«e¡A½ÐÀ˾\±ÂÅv±ø´Ú¡C"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] Ä~Äò¦w¸Ë¡C¦pªG§A¿ï¨ú [¨ú®ø(C)] ¡A¦w¸Ëµ{¦¡±N·|Ãö³¬¡C¥²¶·­n±µ¨ü¨óij¤~¯à¦w¸Ë $(^NameDA) ¡C"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C¥²¶·­n±µ¨ü¨óij¤~¯à¦w¸Ë $(^NameDA)¡C$_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A¿ï¾Ü¤U¤è²Ä¤@­Ó¿ï¶µ¡C¥²¶·­n±µ¨ü¨óij¤~¯à¦w¸Ë $(^NameDA)¡C$_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "±ÂÅv¨óij"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "¦b¸Ñ°£¦w¸Ë $(^NameDA) ¤§«e¡A½ÐÀ˾\±ÂÅv±ø´Ú¡C"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U [§Ú¦P·N(I)] Ä~Äò¸Ñ°£¦w¸Ë¡C¦pªG§A¿ï¨ú [¨ú®ø(C)] ¡A¦w¸Ëµ{¦¡±N·|Ãö³¬¡C¥²¶·­n±µ¨ü¨óij¤~¯à¸Ñ°£¦w¸Ë $(^NameDA) ¡C"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A«ö¤@¤U¤U¤èªº¤Ä¿ï®Ø¡C¥²¶·­n±µ¨ü¨óij¤~¯à¸Ñ°£¦w¸Ë $(^NameDA)¡C$_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "¦pªG§A±µ¨ü¨óij¤¤ªº±ø´Ú¡A¿ï¾Ü¤U¤è²Ä¤@­Ó¿ï¶µ¡C¥²¶·­n±µ¨ü¨óij¤~¯à¸Ñ°£¦w¸Ë $(^NameDA)¡C$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "À˾\¨óijªº¨ä¾l³¡¤À¡A½Ð«ö [PgDn] ©¹¤U±²°Ê­¶­±¡C"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "¿ï¾Ü¤¸¥ó"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "¿ï¾Ü§A·Q­n¦w¸Ë $(^NameDA) ªº¨º¨Ç¥\¯à¡C"
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "´y­z"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "¿ï¨ú¤¸¥ó"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "¿ï¨ú $(^NameDA) ·í¤¤§A·Q­n¸Ñ°£¦w¸Ëªº¥\¯à¡C"
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "²¾°Ê§Aªº·Æ¹««ü¼Ð¨ì¤¸¥ó¤§¤W¡A«K¥i¨£¨ì¥¦ªº´y­z¡C"
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "²¾°Ê§Aªº·Æ¹««ü¼Ð¨ì¤¸¥ó¤§¤W¡A«K¥i¨£¨ì¥¦ªº´y­z¡C"
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "¿ï¨ú¦w¸Ë¦ì¸m"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "¿ï¨ú $(^NameDA) ­n¦w¸Ëªº¸ê®Æ§¨¡C"
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "¿ï¨ú¸Ñ°£¦w¸Ë¦ì¸m"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "¿ï¨ú $(^NameDA) ­n¸Ñ°£¦w¸Ëªº¸ê®Æ§¨¡C"
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "¥¿¦b¦w¸Ë"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "$(^NameDA) ¥¿¦b¦w¸Ë¡A½Ðµ¥­Ô¡C"
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "¦w¸Ë§¹¦¨"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "¦w¸Ëµ{¦¡¤w¦¨¥\¦a°õ¦æ§¹¦¨¡C"
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "¦w¸Ë¤v¤¤¤î"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "¦w¸Ëµ{¦¡¨Ã¥¼¦¨¥\¦a°õ¦æ§¹¦¨¡C"
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "¥¿¦b¸Ñ°£¦w¸Ë"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "$(^NameDA) ¥¿¦b¸Ñ°£¦w¸Ë¡A½Ðµ¥­Ô¡C"
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "¸Ñ°£¦w¸Ë¤w§¹¦¨"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "¸Ñ°£¦w¸Ëµ{¦¡¤w¦¨¥\¦a°õ¦æ§¹¦¨¡C"
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "¸Ñ°£¦w¸Ë¤w¤¤¤î"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "¸Ñ°£¦w¸Ëµ{¦¡¨Ã¥¼¦¨¥\¦a°õ¦æ§¹¦¨¡C"
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "¥¿¦b§¹¦¨ $(^NameDA) ¦w¸ËºëÆF"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) ¤w¦w¸Ë¦b§Aªº¨t²Î¡C$\r$\n«ö¤@¤U [§¹¦¨(F)] Ãö³¬¦¹ºëÆF¡C"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "§Aªº¨t²Î»Ý­n­«·s±Ò°Ê¡A¥H«K§¹¦¨ $(^NameDA) ªº¦w¸Ë¡C²{¦b­n­«·s±Ò°Ê¶Ü¡H"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "¥¿¦b§¹¦¨ $(^NameDA) ¸Ñ°£¦w¸ËºëÆF"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) ¤w±q§Aªº¹q¸£¸Ñ°£¦w¸Ë¡C$\r$\n$\r$\n«ö¤@¤U [§¹¦¨] Ãö³¬³o­ÓºëÆF¡C"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "¹q¸£»Ý­n­«·s±Ò°Ê¡A¥H«K§¹¦¨ $(^NameDA) ªº¸Ñ°£¦w¸Ë¡C²{¦b·Q­n­«·s±Ò°Ê¶Ü¡H"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "¬O¡A²{¦b­«·s±Ò°Ê(&Y)"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "§_¡A§Úµy«á¦A¦Û¦æ­«·s±Ò°Ê(&N)"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "°õ¦æ $(^NameDA)(&R)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "Åã¥Ü¡uŪ§ÚÀɮסv(&M)"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "§¹¦¨(&F)"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "¿ï¾Ü¡u¶}©l¥\¯àªí¡v¸ê®Æ§¨"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "¿ï¾Ü¡u¶}©l¥\¯àªí¡v¸ê®Æ§¨¡A¥Î©óµ{¦¡ªº±¶®|¡C"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "¿ï¾Ü¡u¶}©l¥\¯àªí¡v¸ê®Æ§¨¡A¥H«K«Ø¥ßµ{¦¡ªº±¶®|¡C§A¤]¥i¥H¿é¤J¦WºÙ¡A«Ø¥ß·s¸ê®Æ§¨¡C"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "¤£­n«Ø¥ß±¶®|(&N)"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "¸Ñ°£¦w¸Ë $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "±q§Aªº¹q¸£¸Ñ°£¦w¸Ë $(^NameDA) ¡C"
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "§A½T©w­nÂ÷¶} $(^Name) ¦w¸Ëµ{¦¡¡H"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "§A½T©w­nÂ÷¶} $(^Name) ¸Ñ°£¦w¸Ë¶Ü¡H"
+!endif
diff --git a/Contrib/Language files/Turkish.nlf b/Contrib/Language files/Turkish.nlf
index 2ca4f8b..964ef20 100755
--- a/Contrib/Language files/Turkish.nlf
+++ b/Contrib/Language files/Turkish.nlf
@@ -1,192 +1,192 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1055
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1254
-# RTL - anything else than RTL means LTR
--
-# Translation by ?atay Dilsiz(chagy) (amigos_cagi@hotmail.com)
-# Corrections by Mozilla Türkiye Yerelleþtirme Topluluðu tarafýndan çevrilmiþtir. http://mozilla.org.tr
-# ^Branding
-Nullsoft Kurulum Sistemi %s
-# ^SetupCaption
-$(^Name) Kurulumu
-# ^UninstallCaption
-$(^Name) Kaldýrma
-# ^LicenseSubCaption
-: Lisans Sözleþmesi
-# ^ComponentsSubCaption
-: Kurulum Seçenekleri
-# ^DirSubCaption
-: Kurulum Dizini
-# ^InstallingSubCaption
-: Kuruluyor
-# ^CompletedSubCaption
-: Tamamlandý
-# ^UnComponentsSubCaption
-: Kaldýrma Seçenekleri
-# ^UnDirSubCaption
-: Kaldýrýlacak Dizin
-# ^ConfirmSubCaption
-: Onay
-# ^UninstallingSubCaption
-: Kaldýrýlýyor
-# ^UnCompletedSubCaption
-: Tamamlandý
-# ^BackBtn
-< &Geri
-# ^NextBtn
-Ý&leri >
-# ^AgreeBtn
-&Kabul Ediyorum
-# ^AcceptBtn
-Lisans Sözleþmesi'nin koþullarýný &kabul ediyorum
-# ^DontAcceptBtn
-Lisans Sözleþmesi'nin koþullarýný kabul et&miyorum
-# ^InstallBtn
-&Kur
-# ^UninstallBtn
-&Kaldýr
-# ^CancelBtn
-Vazgeç
-# ^CloseBtn
-&Kapat
-# ^BrowseBtn
-&Gözat...
-# ^ShowDetailsBtn
-&Ayrýntýlarý göster
-# ^ClickNext
-Devam etmek için Ýleri düðmesine basýn.
-# ^ClickInstall
-Kurulumu baþlatmak için Kur düðmesine basýn.
-# ^ClickUninstall
-Kaldýrmayý baþlatmak için Kaldýr düðmesine basýn.
-# ^Name
-Ad
-# ^Completed
-Tamamlandý
-# ^LicenseText
-Lütfen $(^NameDA) uygulamasýný kurmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz Kabul Ediyorum düðmesine basýn.
-# ^LicenseTextCB
-Lütfen $(^NameDA) uygulamasýný kurmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki kutuya iþaret koyun. $_CLICK
-# ^LicenseTextRB
-Lütfen $(^NameDA) uygulamasýný kurmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki ilk seçeneði seçin. $_CLICK
-# ^UnLicenseText
-Lütfen $(^NameDA) uygulamasýný kaldýrmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz Kabul Ediyorum düðmesine basýn.
-# ^UnLicenseTextCB
-Lütfen $(^NameDA) uygulamasýný kaldýrmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki kutuya iþaret koyun. $_CLICK
-# ^UnLicenseTextRB
-Lütfen $(^NameDA) uygulamasýný kaldýrmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki ilk seçeneði seçin. $_CLICK
-# ^Custom
-Özel
-# ^ComponentsText
-Kurmak istediðiniz bileþenleri iþaretleyip kurmak istemediklerinizi iþaretlemeden býrakýn. $_CLICK
-# ^ComponentsSubText1
-Kurulum türünü seçin:
-# ^ComponentsSubText2_NoInstTypes
-Kurulacak bileþenleri seçin:
-# ^ComponentsSubText2
-ya da isteðe baðlý olarak kurmak istediðiniz bileþenleri seçin:
-# ^UnComponentsText
-Kaldýrmak istediðiniz bileþenleri iþaretleyip kaldýrmak istemediklerinizi iþaretlemeden býrakýn. $_CLICK
-# ^UnComponentsSubText1
-Kaldýrma türünü seçin:
-# ^UnComponentsSubText2_NoInstTypes
-Kaldýrýlacak bileþenleri seçin:
-# ^UnComponentsSubText2
-ya da isteðe baðlý olarak kaldýrmak istediðiniz bileþenleri seçin:
-# ^DirText
-$(^NameDA) aþaðýdaki dizinde kurulacak. Farklý bir dizinde kurmak için Gözat düðmesine basýp baþka bir dizin seçin. $_CLICK
-# ^DirSubText
-Hedef Dizin
-# ^DirBrowseText
-$(^NameDA) uygulamasýnýn kurulacaðý dizini seçin:
-# ^UnDirText
-$(^NameDA) aþaðýdaki dizinden kaldýrýlacak. Farklý bir dizinden kaldýrmak için Gözat düðmesine basýp baþka bir dizin seçin. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-$(^NameDA) uygulamasýnýn kaldýrýlacaðý dizini seçin:
-# ^SpaceAvailable
-"Kullanýlabilir boþ alan: "
-# ^SpaceRequired
-"Gereken boþ alan: "
-# ^UninstallingText
-$(^NameDA) aþaðýdaki dizinden kaldýrýlacak. $_CLICK
-# ^UninstallingSubText
-Kaldýrýlan yer:
-# ^FileError
-Dosya yazmak için açýlýrken hata meydana geldi: \r\n\r\n$0\r\n\r\nKurulumu durdurmak için Dur düðmesine,\r\nyeniden denemek için Yeniden Dene düðmesine,\r\nbu dosyayý atlamak için Yoksay düðmesine basýn.
-# ^FileError_NoIgnore
-Dosya yazmak için açýlýrken hata meydana geldi: \r\n\r\n$0\r\n\r\nYeniden denemek için Yeniden Dene düðmesine,\r\nkurulumu durdurmak için Vazgeç düðmesine basýn.
-# ^CantWrite
-"Yazýlamadý: "
-# ^CopyFailed
-Kopyalama baþarýsýz oldu
-# ^CopyTo
-"Kayýt: "
-# ^Registering
-"Kaydediliyor: "
-# ^Unregistering
-"Kayýt siliniyor: "
-# ^SymbolNotFound
-"Simge bulunamadý: "
-# ^CouldNotLoad
-"Yüklenemedi: "
-# ^CreateFolder
-"Dizin oluþtur: "
-# ^CreateShortcut
-"Kýsayol oluþtur: "
-# ^CreatedUninstaller
-"Kaldýrma uygulamasý oluþtur: "
-# ^Delete
-"Dosya sil: "
-# ^DeleteOnReboot
-"Açýlýþta sil: "
-# ^ErrorCreatingShortcut
-"Kýsayol oluþturulurken hata meydana geldi: "
-# ^ErrorCreating
-"Oluþturma hatasý: "
-# ^ErrorDecompressing
-Veriyi açarken hata meydana geldi! Acaba kurulum uygulamasý mý bozuk?
-# ^ErrorRegistering
-DLL kaydedilirken hata meydana geldi
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Çalýþtýr: "
-# ^Extract
-"Aç: "
-# ^ErrorWriting
-"Açma: Dosyaya yazarken hata meydana geldi "
-# ^InvalidOpcode
-Kurulum bozuk: Geçersiz kod
-# ^NoOLE
-"OLE yok: "
-# ^OutputFolder
-"Çýktý dizini: "
-# ^RemoveFolder
-"Dizini sil: "
-# ^RenameOnReboot
-"Açýlýþta adýný deðiþtir: "
-# ^Rename
-"Ad deðiþtir: "
-# ^Skipped
-"Atlandý: "
-# ^CopyDetails
-Ayrýntýlarý panoya kopyala
-# ^LogInstall
-Kurulum sürecinin kaydýný tut
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1055
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1254
+# RTL - anything else than RTL means LTR
+-
+# Translation by ?atay Dilsiz(chagy) (amigos_cagi@hotmail.com)
+# Corrections by Mozilla Türkiye Yerelleþtirme Topluluðu tarafýndan çevrilmiþtir. http://mozilla.org.tr
+# ^Branding
+Nullsoft Kurulum Sistemi %s
+# ^SetupCaption
+$(^Name) Kurulumu
+# ^UninstallCaption
+$(^Name) Kaldýrma
+# ^LicenseSubCaption
+: Lisans Sözleþmesi
+# ^ComponentsSubCaption
+: Kurulum Seçenekleri
+# ^DirSubCaption
+: Kurulum Dizini
+# ^InstallingSubCaption
+: Kuruluyor
+# ^CompletedSubCaption
+: Tamamlandý
+# ^UnComponentsSubCaption
+: Kaldýrma Seçenekleri
+# ^UnDirSubCaption
+: Kaldýrýlacak Dizin
+# ^ConfirmSubCaption
+: Onay
+# ^UninstallingSubCaption
+: Kaldýrýlýyor
+# ^UnCompletedSubCaption
+: Tamamlandý
+# ^BackBtn
+< &Geri
+# ^NextBtn
+Ý&leri >
+# ^AgreeBtn
+&Kabul Ediyorum
+# ^AcceptBtn
+Lisans Sözleþmesi'nin koþullarýný &kabul ediyorum
+# ^DontAcceptBtn
+Lisans Sözleþmesi'nin koþullarýný kabul et&miyorum
+# ^InstallBtn
+&Kur
+# ^UninstallBtn
+&Kaldýr
+# ^CancelBtn
+Vazgeç
+# ^CloseBtn
+&Kapat
+# ^BrowseBtn
+&Gözat...
+# ^ShowDetailsBtn
+&Ayrýntýlarý göster
+# ^ClickNext
+Devam etmek için Ýleri düðmesine basýn.
+# ^ClickInstall
+Kurulumu baþlatmak için Kur düðmesine basýn.
+# ^ClickUninstall
+Kaldýrmayý baþlatmak için Kaldýr düðmesine basýn.
+# ^Name
+Ad
+# ^Completed
+Tamamlandý
+# ^LicenseText
+Lütfen $(^NameDA) uygulamasýný kurmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz Kabul Ediyorum düðmesine basýn.
+# ^LicenseTextCB
+Lütfen $(^NameDA) uygulamasýný kurmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki kutuya iþaret koyun. $_CLICK
+# ^LicenseTextRB
+Lütfen $(^NameDA) uygulamasýný kurmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki ilk seçeneði seçin. $_CLICK
+# ^UnLicenseText
+Lütfen $(^NameDA) uygulamasýný kaldýrmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz Kabul Ediyorum düðmesine basýn.
+# ^UnLicenseTextCB
+Lütfen $(^NameDA) uygulamasýný kaldýrmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki kutuya iþaret koyun. $_CLICK
+# ^UnLicenseTextRB
+Lütfen $(^NameDA) uygulamasýný kaldýrmadan önce lisans sözleþmesini gözden geçirin. Sözleþmedeki bütün koþullarý kabul ediyorsanýz aþaðýdaki ilk seçeneði seçin. $_CLICK
+# ^Custom
+Özel
+# ^ComponentsText
+Kurmak istediðiniz bileþenleri iþaretleyip kurmak istemediklerinizi iþaretlemeden býrakýn. $_CLICK
+# ^ComponentsSubText1
+Kurulum türünü seçin:
+# ^ComponentsSubText2_NoInstTypes
+Kurulacak bileþenleri seçin:
+# ^ComponentsSubText2
+ya da isteðe baðlý olarak kurmak istediðiniz bileþenleri seçin:
+# ^UnComponentsText
+Kaldýrmak istediðiniz bileþenleri iþaretleyip kaldýrmak istemediklerinizi iþaretlemeden býrakýn. $_CLICK
+# ^UnComponentsSubText1
+Kaldýrma türünü seçin:
+# ^UnComponentsSubText2_NoInstTypes
+Kaldýrýlacak bileþenleri seçin:
+# ^UnComponentsSubText2
+ya da isteðe baðlý olarak kaldýrmak istediðiniz bileþenleri seçin:
+# ^DirText
+$(^NameDA) aþaðýdaki dizinde kurulacak. Farklý bir dizinde kurmak için Gözat düðmesine basýp baþka bir dizin seçin. $_CLICK
+# ^DirSubText
+Hedef Dizin
+# ^DirBrowseText
+$(^NameDA) uygulamasýnýn kurulacaðý dizini seçin:
+# ^UnDirText
+$(^NameDA) aþaðýdaki dizinden kaldýrýlacak. Farklý bir dizinden kaldýrmak için Gözat düðmesine basýp baþka bir dizin seçin. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+$(^NameDA) uygulamasýnýn kaldýrýlacaðý dizini seçin:
+# ^SpaceAvailable
+"Kullanýlabilir boþ alan: "
+# ^SpaceRequired
+"Gereken boþ alan: "
+# ^UninstallingText
+$(^NameDA) aþaðýdaki dizinden kaldýrýlacak. $_CLICK
+# ^UninstallingSubText
+Kaldýrýlan yer:
+# ^FileError
+Dosya yazmak için açýlýrken hata meydana geldi: \r\n\r\n$0\r\n\r\nKurulumu durdurmak için Dur düðmesine,\r\nyeniden denemek için Yeniden Dene düðmesine,\r\nbu dosyayý atlamak için Yoksay düðmesine basýn.
+# ^FileError_NoIgnore
+Dosya yazmak için açýlýrken hata meydana geldi: \r\n\r\n$0\r\n\r\nYeniden denemek için Yeniden Dene düðmesine,\r\nkurulumu durdurmak için Vazgeç düðmesine basýn.
+# ^CantWrite
+"Yazýlamadý: "
+# ^CopyFailed
+Kopyalama baþarýsýz oldu
+# ^CopyTo
+"Kayýt: "
+# ^Registering
+"Kaydediliyor: "
+# ^Unregistering
+"Kayýt siliniyor: "
+# ^SymbolNotFound
+"Simge bulunamadý: "
+# ^CouldNotLoad
+"Yüklenemedi: "
+# ^CreateFolder
+"Dizin oluþtur: "
+# ^CreateShortcut
+"Kýsayol oluþtur: "
+# ^CreatedUninstaller
+"Kaldýrma uygulamasý oluþtur: "
+# ^Delete
+"Dosya sil: "
+# ^DeleteOnReboot
+"Açýlýþta sil: "
+# ^ErrorCreatingShortcut
+"Kýsayol oluþturulurken hata meydana geldi: "
+# ^ErrorCreating
+"Oluþturma hatasý: "
+# ^ErrorDecompressing
+Veriyi açarken hata meydana geldi! Acaba kurulum uygulamasý mý bozuk?
+# ^ErrorRegistering
+DLL kaydedilirken hata meydana geldi
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Çalýþtýr: "
+# ^Extract
+"Aç: "
+# ^ErrorWriting
+"Açma: Dosyaya yazarken hata meydana geldi "
+# ^InvalidOpcode
+Kurulum bozuk: Geçersiz kod
+# ^NoOLE
+"OLE yok: "
+# ^OutputFolder
+"Çýktý dizini: "
+# ^RemoveFolder
+"Dizini sil: "
+# ^RenameOnReboot
+"Açýlýþta adýný deðiþtir: "
+# ^Rename
+"Ad deðiþtir: "
+# ^Skipped
+"Atlandý: "
+# ^CopyDetails
+Ayrýntýlarý panoya kopyala
+# ^LogInstall
+Kurulum sürecinin kaydýný tut
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
G \ No newline at end of file
diff --git a/Contrib/Language files/Turkish.nsh b/Contrib/Language files/Turkish.nsh
index 4e88351..e699c66 100755
--- a/Contrib/Language files/Turkish.nsh
+++ b/Contrib/Language files/Turkish.nsh
@@ -1,122 +1,122 @@
-;Language: Turkish (1055)
-;By Çagatay Dilsiz(Chagy)
-;Updated by Fatih BOY (fatih_boy@yahoo.com)
-
-!insertmacro LANGFILE "Turkish" "Türkçe"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) Kurulum sihirbazýna hoþ geldiniz"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Bu sihirbaz size $(^NameDA) kurulumu boyunca rehberlik edecektir.$\r$\n$\r$\nKurulumu baþlatmadan önce çalýþan diðer programlari kapatmanýzý öneririz. Böylece bilgisayarýnýzý yeniden baþlatmadan bazý sistem dosyalarý sorunsuz kurulabilir.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Programýný Kaldýrma Sihirbazýna Hoþ Geldiniz"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Bu sihirbaz size $(^NameDA) programýnýn kadýrýlýmý boyunca rehberlik edecektir.$\r$\n$\r$\nKaldýrým iþlemeni baþlatmadan önce çalýþan diðer programlari kapatmanýzý öneririz. Böylece bilgisayarýnýzý yeniden baþlatmadan bazý sistem dosyalarý sorunsuz kaldýrýlabilir.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisans Sözleþmesi"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lütfen $(^NameDA) programýný kurmadan önce sözleþmeyi okuyunuz."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Sözleþme koþullarýný kabul ediyorsanýz, 'Kabul Ediyorum'a basýnýz. $(^NameDA) programýný kurmak için sözleþme koþullarýný kabul etmelisiniz."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Sözleþme koþullarýný kabul ediyorsanýz, aþaðýdaki onay kutusunu doldurunuz. $(^NameDA) programýný kurmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Sözleþme koþullarýný kabul ediyorsanýz, asagidaki onay düðmesini seçiniz. $(^NameDA) programýný kurmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisans Sözleþmesi"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lütfen $(^NameDA) programýný sisteminizden kaldýrmadan önce sözleþmeyi okuyunuz."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Sözleþme koþullarýný kabul ediyorsanýz, 'Kabul Ediyorum'a basýnýz. $(^NameDA) programýný sisteminizden kaldýrmak için sözleþme koþullarýný kabul etmelisiniz."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Sözleþme koþullarýný kabul ediyorsanýz, aþaðýdaki onay kutusunu doldurunuz. $(^NameDA) programýný sisteminizden kaldýrmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Sözleþme koþullarýný kabul ediyorsanýz, asagidaki onay düðmesini seçiniz. $(^NameDA) programýný sisteminizden kaldýrmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Sözleþmenin geri kalanýný okumak için 'page down' tuþuna basabilirsiniz."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Bileþen seçimi"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Lütfen $(^NameDA) için kurmak istediginiz bileþenleri seçiniz."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Açýklama"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Bileþen Þeçimi"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Lütfen kaldýrmak istediðiniz $(^NameDA) program bileþenini seçiniz."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bileþenlerin açýklamalarýný görmek için imleci bileþen üzerine götürün."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bileþenlerin açýklamalarýný görmek için imleci bileþen üzerine götürün."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Hedef dizini seçimi"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA) programýný kurmak istediðiniz dizini þeçiniz."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Kaldýrýlýcak Dizin Seçimi"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA) programýný kaldýrmak istediginiz dizini seçiniz."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Kuruluyor"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Lütfen $(^NameDA) kurulurken bekleyiniz."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Kurulum Tamamlandý"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Kurulum baþarýyla tamamlandý."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Kurulum Ýptal Edildi"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Kurulum tam olarak tamamlanmadý."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Kaldýrýlýyor"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Litfen $(^NameDA) programý sisteminizden kaldýrýlýrken bekleyiniz."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Kaldýrma Ýþlemi Tamamlandýr"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Kaldýrma iþlemi baþarýyla tamamlandý."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Kaldýrma Ýþlemi Ýptal Edildi"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Kaldýrma Ýþlemi tamamlanamadý."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) Kurulum sihirbazý tamamlanýyor."
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) bilgisayariniza yüklendi.$\r$\n$\r$\nLütfen 'Bitir'e basarak kurulumu sonlandýrýn."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) kurulumunun tamamlanmasý için bilgisayarýnýzý yeniden baþlatmanýz gerekiyor.Bilgisayarýnýzý yeniden baþlatmak istiyor musunuz?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) Programý Kaldýrma Sihirbazý Tamamlanýyor"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) programý sisteminizden kaldýrýldý.$\r$\n$\r$\nSihirbazý kapatmak için 'bitir'e basýnýz."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) programýný kaldýrma iþleminin tamamlanmasý için bilgisayarýnýzýn yeniden baþlatýlmasý gerekiyor. Bilgisayarýnýzýn þimdi yeniden baþlatýlmasýný ister misiniz?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Yeniden baþlat"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Bilgisayarýmý daha sonra baþlatacaðým."
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) programýný çalýþtýr"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "beni oku/readme dosyasýný &göster"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Bitir"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Baþlat Menüsü Klasör Seçimi"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "$(^NameDA) kýsayollarýnýn konulacagý baþlat menüsü klasörünü seçiniz."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Programýn kýsayollarýnýn konulacaðý baþlat menüsü klasörünü seçiniz. Farklý bir isim girerek yeni bir klasör yaratabilirsiniz."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Kýsayollarý oluþturmadan devam et"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA) Programýný Kaldýr"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) programýný sisteminizden kaldýrma."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) kurulumundan çýkmak istediðinize emin misiniz?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) Programi Kaldýrma iþleminden çýkmak istediðinize emin misiniz?"
-!endif
+;Language: Turkish (1055)
+;By Çagatay Dilsiz(Chagy)
+;Updated by Fatih BOY (fatih_boy@yahoo.com)
+
+!insertmacro LANGFILE "Turkish" "Türkçe"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "$(^NameDA) Kurulum sihirbazýna hoþ geldiniz"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Bu sihirbaz size $(^NameDA) kurulumu boyunca rehberlik edecektir.$\r$\n$\r$\nKurulumu baþlatmadan önce çalýþan diðer programlari kapatmanýzý öneririz. Böylece bilgisayarýnýzý yeniden baþlatmadan bazý sistem dosyalarý sorunsuz kurulabilir.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "$(^NameDA) Programýný Kaldýrma Sihirbazýna Hoþ Geldiniz"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Bu sihirbaz size $(^NameDA) programýnýn kadýrýlýmý boyunca rehberlik edecektir.$\r$\n$\r$\nKaldýrým iþlemeni baþlatmadan önce çalýþan diðer programlari kapatmanýzý öneririz. Böylece bilgisayarýnýzý yeniden baþlatmadan bazý sistem dosyalarý sorunsuz kaldýrýlabilir.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisans Sözleþmesi"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Lütfen $(^NameDA) programýný kurmadan önce sözleþmeyi okuyunuz."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Sözleþme koþullarýný kabul ediyorsanýz, 'Kabul Ediyorum'a basýnýz. $(^NameDA) programýný kurmak için sözleþme koþullarýný kabul etmelisiniz."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Sözleþme koþullarýný kabul ediyorsanýz, aþaðýdaki onay kutusunu doldurunuz. $(^NameDA) programýný kurmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Sözleþme koþullarýný kabul ediyorsanýz, asagidaki onay düðmesini seçiniz. $(^NameDA) programýný kurmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisans Sözleþmesi"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Lütfen $(^NameDA) programýný sisteminizden kaldýrmadan önce sözleþmeyi okuyunuz."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Sözleþme koþullarýný kabul ediyorsanýz, 'Kabul Ediyorum'a basýnýz. $(^NameDA) programýný sisteminizden kaldýrmak için sözleþme koþullarýný kabul etmelisiniz."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Sözleþme koþullarýný kabul ediyorsanýz, aþaðýdaki onay kutusunu doldurunuz. $(^NameDA) programýný sisteminizden kaldýrmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Sözleþme koþullarýný kabul ediyorsanýz, asagidaki onay düðmesini seçiniz. $(^NameDA) programýný sisteminizden kaldýrmak için sözleþme koþullarýný kabul etmelisiniz. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Sözleþmenin geri kalanýný okumak için 'page down' tuþuna basabilirsiniz."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Bileþen seçimi"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Lütfen $(^NameDA) için kurmak istediginiz bileþenleri seçiniz."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Açýklama"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Bileþen Þeçimi"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Lütfen kaldýrmak istediðiniz $(^NameDA) program bileþenini seçiniz."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bileþenlerin açýklamalarýný görmek için imleci bileþen üzerine götürün."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Bileþenlerin açýklamalarýný görmek için imleci bileþen üzerine götürün."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Hedef dizini seçimi"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA) programýný kurmak istediðiniz dizini þeçiniz."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Kaldýrýlýcak Dizin Seçimi"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA) programýný kaldýrmak istediginiz dizini seçiniz."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Kuruluyor"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Lütfen $(^NameDA) kurulurken bekleyiniz."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Kurulum Tamamlandý"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Kurulum baþarýyla tamamlandý."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Kurulum Ýptal Edildi"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Kurulum tam olarak tamamlanmadý."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Kaldýrýlýyor"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Litfen $(^NameDA) programý sisteminizden kaldýrýlýrken bekleyiniz."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Kaldýrma Ýþlemi Tamamlandýr"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Kaldýrma iþlemi baþarýyla tamamlandý."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Kaldýrma Ýþlemi Ýptal Edildi"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Kaldýrma Ýþlemi tamamlanamadý."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA) Kurulum sihirbazý tamamlanýyor."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) bilgisayariniza yüklendi.$\r$\n$\r$\nLütfen 'Bitir'e basarak kurulumu sonlandýrýn."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) kurulumunun tamamlanmasý için bilgisayarýnýzý yeniden baþlatmanýz gerekiyor.Bilgisayarýnýzý yeniden baþlatmak istiyor musunuz?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA) Programý Kaldýrma Sihirbazý Tamamlanýyor"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) programý sisteminizden kaldýrýldý.$\r$\n$\r$\nSihirbazý kapatmak için 'bitir'e basýnýz."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) programýný kaldýrma iþleminin tamamlanmasý için bilgisayarýnýzýn yeniden baþlatýlmasý gerekiyor. Bilgisayarýnýzýn þimdi yeniden baþlatýlmasýný ister misiniz?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Yeniden baþlat"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Bilgisayarýmý daha sonra baþlatacaðým."
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) programýný çalýþtýr"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "beni oku/readme dosyasýný &göster"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Bitir"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Baþlat Menüsü Klasör Seçimi"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "$(^NameDA) kýsayollarýnýn konulacagý baþlat menüsü klasörünü seçiniz."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Programýn kýsayollarýnýn konulacaðý baþlat menüsü klasörünü seçiniz. Farklý bir isim girerek yeni bir klasör yaratabilirsiniz."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Kýsayollarý oluþturmadan devam et"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA) Programýný Kaldýr"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA) programýný sisteminizden kaldýrma."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "$(^Name) kurulumundan çýkmak istediðinize emin misiniz?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name) Programi Kaldýrma iþleminden çýkmak istediðinize emin misiniz?"
+!endif
diff --git a/Contrib/Language files/Ukrainian.nlf b/Contrib/Language files/Ukrainian.nlf
index 4291272..5a6b4a9 100755
--- a/Contrib/Language files/Ukrainian.nlf
+++ b/Contrib/Language files/Ukrainian.nlf
@@ -1,192 +1,192 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1058
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1251
-# RTL - anything else than RTL means LTR
--
-# Translation by Yuri Holubow, Nash-Soft.com <http://www.Nash-Soft.com>
-# Corrections by Dmitriy Kononchuk [http://gri3ly.kiev.ua]
-# New corrections by Osidach Vitaly
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-$(^Name) Âñòàíîâëåííÿ
-# ^UninstallCaption
-$(^Name) Âèäàëåííÿ
-# ^LicenseSubCaption
-: ˳öåíç³éíà óãîäà
-# ^ComponentsSubCaption
-: Îïö³¿ âñòàíîâëåííÿ
-# ^DirSubCaption
-: Òåêà âñòàíîâëåííÿ
-# ^InstallingSubCaption
-: Êîï³þâàííÿ ôàéë³â
-# ^CompletedSubCaption
-: Çàâåðøåíî
-# ^UnComponentsSubCaption
-: Îïö³¿ âèäàëåííÿ
-# ^UnDirSubCaption
-: Òåêà âèäàëåííÿ
-# ^ConfirmSubCaption
-: ϳäòâåðæäåííÿ
-# ^UninstallingSubCaption
-: Âèäàëåííÿ ôàéë³â
-# ^UnCompletedSubCaption
-: Çàâåðøåíî
-# ^BackBtn
-< &Íàçàä
-# ^NextBtn
-&Äàë³ >
-# ^AgreeBtn
-&Çãîäåí
-# ^AcceptBtn
-ß &ïðèéìàþ óìîâè ˳öåíç³éíî¿ óãîäè
-# ^DontAcceptBtn
-ß &íå ïðèéìàþ óìîâè ˳öåíç³éíî¿ óãîäè
-# ^InstallBtn
-&Âñòàíîâèòè
-# ^UninstallBtn
-Âèäàëèòè
-# ^CancelBtn
-Ñêàñóâàòè
-# ^CloseBtn
-&Çàêðèòè
-# ^BrowseBtn
-Î&ãëÿä...
-# ^ShowDetailsBtn
-Ïîäðîáèö³
-# ^ClickNext
-Íàòèñí³òü Äàë³ ùîá ïðîäîâæèòè
-# ^ClickInstall
-Íàòèñí³òü Âñòàíîâèòè äëÿ ïî÷àòêó ïðîöåññó âñòàíîâëåííÿ
-# ^ClickUninstall
-Íàòèñí³òü Âèäàëèòü äëÿ ïî÷àòêó ïðîöåññó âèäàëåííÿ
-# ^Name
-²ì'ÿ
-# ^Completed
-Çàâåðøåíî
-# ^LicenseText
-Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, íàòèñí³òü íà êíîïêó Çãîäåí.
-# ^LicenseTextCB
-Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. $_CLICK
-# ^LicenseTextRB
-Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âèáåð³òü ïåðøèé âàð³àíò. $_CLICK
-# ^UnLicenseText
-Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè ë³öåíç³éíî¿ óãîäè, íàòèñí³òü íà êíîïêó Çãîäåí.
-# ^UnLicenseTextCB
-Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. $_CLICK
-# ^UnLicenseTextRB
-Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âèäàëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âèáåð³òü ïåðøèé âàð³àíò. $_CLICK
-# ^Custom
-Ïî âèáîðó
-# ^ComponentsText
-Âèáåð³òü ÿê³ êîìïîíåíòè ïðîãðàìè Âè áàæàºòå âñòàíîâèòè. $_CLICK
-# ^ComponentsSubText1
-Âèáåð³òü òèï âñòàíîâëåííÿ:
-# ^ComponentsSubText2_NoInstTypes
-Âèáåð³òü êîìïîíåíòè äëÿ âñòàíîâëåííÿ:
-# ^ComponentsSubText2
-×è, âèáåð³òü âðó÷íó êîìïîíåíòè, ÿê³ Âè õî÷åòå âñòàíîâèòè:
-# ^UnComponentsText
-Âèáåð³òü ÿê³ êîìïîíåíòè Âè áàæàºòå âèäàëèòè. ³äì³òüòå êîìïîíåíòè äëÿ âèäàëåííÿ ³ çí³ì³òü â³äì³òêó ç òèõ, ÿê³ Âè âèäàëÿòè íå áàæàºòå. $_CLICK
-# ^UnComponentsSubText1
-Âèáåð³òü òèï âèäàëåííÿ:
-# ^UnComponentsSubText2_NoInstTypes
-Âèá³ð êîìïîíåíò³â äëÿ âèäàëåííÿ:
-# ^UnComponentsSubText2
-×è âèáåð³òü êîìïîíåíòè ïðîãðàìè äëÿ âèäàëåííÿ ïî ñâîºìó áàæàíí³:
-# ^DirText
-Ïðîãðàììà âñòàíîâèòü $(^NameDA) ó âêàçàíó òåêó. Äëÿ òîãî, ùîá âñòàíîâèòè ïðîãðàììó â ³íøó òåêó, íàòèñí³òü Îãëÿä ³ âêàæ³òü ïîòð³áíó òåêó. $_CLICK
-# ^DirSubText
-Òåêà ïðèçíà÷åííÿ
-# ^DirBrowseText
-Âèáåð³òü òåêó äëÿ âñòàíîâëåííÿ $(^NameDA):
-# ^UnDirText
-Ïðîãðàììà âñòàíîâëåííÿ âèäàëèòü $(^NameDA) ³ç âêàçàííî¿ òåêè. Äëÿ òîãî, ùîá ïðîâåñòè âèäàëåííÿ ç ³íøî¿ òåêè, íàòèñí³òü Îãëÿä ³ âêàæ³òü ïîòð³áíó òåêó. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Âèáåð³òü òåêó, ç ÿêî¿ Âè áàæàºòå âèäàëèòè $(^NameDA):
-# ^SpaceAvailable
-"Äîñòóïíî ì³ñöÿ: "
-# ^SpaceRequired
-"Íåîáõ³äíî ì³ñöÿ: "
-# ^UninstallingText
-Ìàéñòåð âñòàíîâëåííÿ äîïîìîæå Âàì âèäàëèòè $(^NameDA) ç Âàøîãî êîìï'þòåðà. $_CLICK
-# ^UninstallingSubText
-Âèäàëåííÿ ç:
-# ^FileError
-Íåìîæëèâî â³äêðèòè ôàéë äëÿ çàïèñó: \r\n\t"$0"\r\nÍàòèñí³òü Ïåðåðâàòè äëÿ òîãî, ùîá ïåðåðâàòè âñòàíîâëåííÿ,\r\nÏîâòîðèòè äëÿ òîãî, ùîá ïîâòîðèòè ñïðîáó çàïèñó ó ôàéë, ÷è\r\n²ãíîðóâàòè äëÿ òîãî, ùîá ïðîïóñòèòè öþ ä³þ
-# ^FileError_NoIgnore
-Íåìîæëèâî â³äêðèòè ôàéë äëÿ çàïèñó: \r\n\t"$0"\r\nÍàòèñí³òü Ïîâòîðèòè äëÿ òîãî, ùîá ïîâòîðèòè ñïðîáó çàïèñó ó ôàéë, ÷è\r\nÑêàñóâàòè äëÿ òîãî, ùîá ïåðåðâàòè âñòàíîâëåííÿ
-# ^CantWrite
-"Íåìîæëèâî çàïèñàòè: "
-# ^CopyFailed
-Êîï³þâàííÿ íåâä³ëå
-# ^CopyTo
-"Êîï³þâàííÿ â "
-# ^Registering
-"Ðåºñòðàö³ÿ: "
-# ^Unregistering
-"Âèäàëåííÿ ðåºñòðàö³¿: "
-# ^SymbolNotFound
-"Íåìîæëèâî çíàéòè ñèìâîë: "
-# ^CouldNotLoad
-"Íåìîæëèâî çàâàíòàæèòè: "
-# ^CreateFolder
-"Ñòâîðåííÿ òåêè: "
-# ^CreateShortcut
-"Ñòâîðåííÿ ÿðëèêà: "
-# ^CreatedUninstaller
-"Ñòâîðåííÿ ïðîãðàìè âèäàëåííÿ: "
-# ^Delete
-"Âèäàëåííÿ ôàéëó: "
-# ^DeleteOnReboot
-"Âèäàëåííÿ ï³ñëÿ ïåðåçàâàíòàæåííÿ: "
-# ^ErrorCreatingShortcut
-"Ïîìèëêà ñòâîðåííÿ ÿðëèêà: "
-# ^ErrorCreating
-"Ïîìèëêà ñòâîðåííÿ: "
-# ^ErrorDecompressing
-Íåìîæëèâî âèòÿãíóòè äàí³. Ìîæëèâî ïîøêîäæåíèé äèñòðèáóòèâ.
-# ^ErrorRegistering
-Íåìîæëèâî çàðåºñòðóâàòè á³áë³îòåêó (DLL)
-# ^ExecShell
-"Âèêîíàííÿ êîìàíäè îáîëîíêè: "
-# ^Exec
-"Âèêîíàííÿ: "
-# ^Extract
-"Âèòÿãíåííÿ: "
-# ^ErrorWriting
-"Âèòÿãíåííÿ: ïîìèëêà çàïèñó ôàéëà"
-# ^InvalidOpcode
-Äèñòðèáóòèâ ïîøêîäæåíèé: ïîìèëêîâèé êîä â³äïîâ³ä³
-# ^NoOLE
-"ÍåìຠOLE äëÿ: "
-# ^OutputFolder
-"Òåêà ïðèçíà÷åííÿ: "
-# ^RemoveFolder
-"Âèäàëåííÿ òåêè: "
-# ^RenameOnReboot
-"Ïåðå³ìåíóâàííÿ ï³ñëÿ ïåðåçàâàíàæåííÿ: "
-# ^Rename
-"Ïåðåéìåíóâàííÿ: "
-# ^Skipped
-"Ïðîïóùåíî: "
-# ^CopyDetails
-Êîï³þâàòè äåòàë³ ó áóôåð îáì³íó
-# ^LogInstall
-Çàïèñóâàòè â ëîã ïðîöåñ âñòíîâëåííÿ
-# byte
-# kilo
-# mega
-# giga
+# Header, don't edit
+NLF v6
+# Language ID
+1058
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1251
+# RTL - anything else than RTL means LTR
+-
+# Translation by Yuri Holubow, Nash-Soft.com <http://www.Nash-Soft.com>
+# Corrections by Dmitriy Kononchuk [http://gri3ly.kiev.ua]
+# New corrections by Osidach Vitaly
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) Âñòàíîâëåííÿ
+# ^UninstallCaption
+$(^Name) Âèäàëåííÿ
+# ^LicenseSubCaption
+: ˳öåíç³éíà óãîäà
+# ^ComponentsSubCaption
+: Îïö³¿ âñòàíîâëåííÿ
+# ^DirSubCaption
+: Òåêà âñòàíîâëåííÿ
+# ^InstallingSubCaption
+: Êîï³þâàííÿ ôàéë³â
+# ^CompletedSubCaption
+: Çàâåðøåíî
+# ^UnComponentsSubCaption
+: Îïö³¿ âèäàëåííÿ
+# ^UnDirSubCaption
+: Òåêà âèäàëåííÿ
+# ^ConfirmSubCaption
+: ϳäòâåðæäåííÿ
+# ^UninstallingSubCaption
+: Âèäàëåííÿ ôàéë³â
+# ^UnCompletedSubCaption
+: Çàâåðøåíî
+# ^BackBtn
+< &Íàçàä
+# ^NextBtn
+&Äàë³ >
+# ^AgreeBtn
+&Çãîäåí
+# ^AcceptBtn
+ß &ïðèéìàþ óìîâè ˳öåíç³éíî¿ óãîäè
+# ^DontAcceptBtn
+ß &íå ïðèéìàþ óìîâè ˳öåíç³éíî¿ óãîäè
+# ^InstallBtn
+&Âñòàíîâèòè
+# ^UninstallBtn
+Âèäàëèòè
+# ^CancelBtn
+Ñêàñóâàòè
+# ^CloseBtn
+&Çàêðèòè
+# ^BrowseBtn
+Î&ãëÿä...
+# ^ShowDetailsBtn
+Ïîäðîáèö³
+# ^ClickNext
+Íàòèñí³òü Äàë³ ùîá ïðîäîâæèòè
+# ^ClickInstall
+Íàòèñí³òü Âñòàíîâèòè äëÿ ïî÷àòêó ïðîöåññó âñòàíîâëåííÿ
+# ^ClickUninstall
+Íàòèñí³òü Âèäàëèòü äëÿ ïî÷àòêó ïðîöåññó âèäàëåííÿ
+# ^Name
+²ì'ÿ
+# ^Completed
+Çàâåðøåíî
+# ^LicenseText
+Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, íàòèñí³òü íà êíîïêó Çãîäåí.
+# ^LicenseTextCB
+Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. $_CLICK
+# ^LicenseTextRB
+Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âèáåð³òü ïåðøèé âàð³àíò. $_CLICK
+# ^UnLicenseText
+Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè ë³öåíç³éíî¿ óãîäè, íàòèñí³òü íà êíîïêó Çãîäåí.
+# ^UnLicenseTextCB
+Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âñòàíîâëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. $_CLICK
+# ^UnLicenseTextRB
+Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âèäàëåííÿì $(^NameDA). ßêùî Âè ïðèéìàºòå óìîâè óãîäè, âèáåð³òü ïåðøèé âàð³àíò. $_CLICK
+# ^Custom
+Ïî âèáîðó
+# ^ComponentsText
+Âèáåð³òü ÿê³ êîìïîíåíòè ïðîãðàìè Âè áàæàºòå âñòàíîâèòè. $_CLICK
+# ^ComponentsSubText1
+Âèáåð³òü òèï âñòàíîâëåííÿ:
+# ^ComponentsSubText2_NoInstTypes
+Âèáåð³òü êîìïîíåíòè äëÿ âñòàíîâëåííÿ:
+# ^ComponentsSubText2
+×è, âèáåð³òü âðó÷íó êîìïîíåíòè, ÿê³ Âè õî÷åòå âñòàíîâèòè:
+# ^UnComponentsText
+Âèáåð³òü ÿê³ êîìïîíåíòè Âè áàæàºòå âèäàëèòè. ³äì³òüòå êîìïîíåíòè äëÿ âèäàëåííÿ ³ çí³ì³òü â³äì³òêó ç òèõ, ÿê³ Âè âèäàëÿòè íå áàæàºòå. $_CLICK
+# ^UnComponentsSubText1
+Âèáåð³òü òèï âèäàëåííÿ:
+# ^UnComponentsSubText2_NoInstTypes
+Âèá³ð êîìïîíåíò³â äëÿ âèäàëåííÿ:
+# ^UnComponentsSubText2
+×è âèáåð³òü êîìïîíåíòè ïðîãðàìè äëÿ âèäàëåííÿ ïî ñâîºìó áàæàíí³:
+# ^DirText
+Ïðîãðàììà âñòàíîâèòü $(^NameDA) ó âêàçàíó òåêó. Äëÿ òîãî, ùîá âñòàíîâèòè ïðîãðàììó â ³íøó òåêó, íàòèñí³òü Îãëÿä ³ âêàæ³òü ïîòð³áíó òåêó. $_CLICK
+# ^DirSubText
+Òåêà ïðèçíà÷åííÿ
+# ^DirBrowseText
+Âèáåð³òü òåêó äëÿ âñòàíîâëåííÿ $(^NameDA):
+# ^UnDirText
+Ïðîãðàììà âñòàíîâëåííÿ âèäàëèòü $(^NameDA) ³ç âêàçàííî¿ òåêè. Äëÿ òîãî, ùîá ïðîâåñòè âèäàëåííÿ ç ³íøî¿ òåêè, íàòèñí³òü Îãëÿä ³ âêàæ³òü ïîòð³áíó òåêó. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Âèáåð³òü òåêó, ç ÿêî¿ Âè áàæàºòå âèäàëèòè $(^NameDA):
+# ^SpaceAvailable
+"Äîñòóïíî ì³ñöÿ: "
+# ^SpaceRequired
+"Íåîáõ³äíî ì³ñöÿ: "
+# ^UninstallingText
+Ìàéñòåð âñòàíîâëåííÿ äîïîìîæå Âàì âèäàëèòè $(^NameDA) ç Âàøîãî êîìï'þòåðà. $_CLICK
+# ^UninstallingSubText
+Âèäàëåííÿ ç:
+# ^FileError
+Íåìîæëèâî â³äêðèòè ôàéë äëÿ çàïèñó: \r\n\t"$0"\r\nÍàòèñí³òü Ïåðåðâàòè äëÿ òîãî, ùîá ïåðåðâàòè âñòàíîâëåííÿ,\r\nÏîâòîðèòè äëÿ òîãî, ùîá ïîâòîðèòè ñïðîáó çàïèñó ó ôàéë, ÷è\r\n²ãíîðóâàòè äëÿ òîãî, ùîá ïðîïóñòèòè öþ ä³þ
+# ^FileError_NoIgnore
+Íåìîæëèâî â³äêðèòè ôàéë äëÿ çàïèñó: \r\n\t"$0"\r\nÍàòèñí³òü Ïîâòîðèòè äëÿ òîãî, ùîá ïîâòîðèòè ñïðîáó çàïèñó ó ôàéë, ÷è\r\nÑêàñóâàòè äëÿ òîãî, ùîá ïåðåðâàòè âñòàíîâëåííÿ
+# ^CantWrite
+"Íåìîæëèâî çàïèñàòè: "
+# ^CopyFailed
+Êîï³þâàííÿ íåâä³ëå
+# ^CopyTo
+"Êîï³þâàííÿ â "
+# ^Registering
+"Ðåºñòðàö³ÿ: "
+# ^Unregistering
+"Âèäàëåííÿ ðåºñòðàö³¿: "
+# ^SymbolNotFound
+"Íåìîæëèâî çíàéòè ñèìâîë: "
+# ^CouldNotLoad
+"Íåìîæëèâî çàâàíòàæèòè: "
+# ^CreateFolder
+"Ñòâîðåííÿ òåêè: "
+# ^CreateShortcut
+"Ñòâîðåííÿ ÿðëèêà: "
+# ^CreatedUninstaller
+"Ñòâîðåííÿ ïðîãðàìè âèäàëåííÿ: "
+# ^Delete
+"Âèäàëåííÿ ôàéëó: "
+# ^DeleteOnReboot
+"Âèäàëåííÿ ï³ñëÿ ïåðåçàâàíòàæåííÿ: "
+# ^ErrorCreatingShortcut
+"Ïîìèëêà ñòâîðåííÿ ÿðëèêà: "
+# ^ErrorCreating
+"Ïîìèëêà ñòâîðåííÿ: "
+# ^ErrorDecompressing
+Íåìîæëèâî âèòÿãíóòè äàí³. Ìîæëèâî ïîøêîäæåíèé äèñòðèáóòèâ.
+# ^ErrorRegistering
+Íåìîæëèâî çàðåºñòðóâàòè á³áë³îòåêó (DLL)
+# ^ExecShell
+"Âèêîíàííÿ êîìàíäè îáîëîíêè: "
+# ^Exec
+"Âèêîíàííÿ: "
+# ^Extract
+"Âèòÿãíåííÿ: "
+# ^ErrorWriting
+"Âèòÿãíåííÿ: ïîìèëêà çàïèñó ôàéëà"
+# ^InvalidOpcode
+Äèñòðèáóòèâ ïîøêîäæåíèé: ïîìèëêîâèé êîä â³äïîâ³ä³
+# ^NoOLE
+"ÍåìຠOLE äëÿ: "
+# ^OutputFolder
+"Òåêà ïðèçíà÷åííÿ: "
+# ^RemoveFolder
+"Âèäàëåííÿ òåêè: "
+# ^RenameOnReboot
+"Ïåðå³ìåíóâàííÿ ï³ñëÿ ïåðåçàâàíàæåííÿ: "
+# ^Rename
+"Ïåðåéìåíóâàííÿ: "
+# ^Skipped
+"Ïðîïóùåíî: "
+# ^CopyDetails
+Êîï³þâàòè äåòàë³ ó áóôåð îáì³íó
+# ^LogInstall
+Çàïèñóâàòè â ëîã ïðîöåñ âñòíîâëåííÿ
+# byte
+# kilo
+# mega
+# giga
diff --git a/Contrib/Language files/Ukrainian.nsh b/Contrib/Language files/Ukrainian.nsh
index e29e0cb..add5f8f 100755
--- a/Contrib/Language files/Ukrainian.nsh
+++ b/Contrib/Language files/Ukrainian.nsh
@@ -1,122 +1,122 @@
-;Language: Ukrainian (1058)
-;By Yuri Holubow, http://www.Nash-Soft.com
-;Correct by Osidach Vitaly (Vit_Os2)
-
-!insertmacro LANGFILE "Ukrainian" "Ukrainian"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Ëàñêàâî ïðîñèìî äî Ìàéñòðà Âñòàíîâëåííÿ $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Äàíà ïðîãðàìà âñòàíîâèòü $(^NameDA) íà Âàø êîìï'þòåð.$\r$\n$\r$\nÐåêîìåíäîâàíî çàêðèòè âñ³ ïðîãðàìè ïåðåä ïî÷àòêîì ³íñòàëÿö³¿. Öå äîçâîëèòü ïðîãðàì³ âñòàíîâëåííÿ îíîâèòè ñèñòåìí³ ôàéëè áåç ïåðåçàâàíòàæåííÿ ñèñòåìè.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Ëàñêàâî ïðîñèìî äî Ìàéñòðà Âèäàëåííÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Äàíèé ìàéñòåð äîìîæå âèäàëèòè $(^NameDA).$\r$\n$\r$\nÏåðåä ïî÷àòêîì âèäàëåííÿ, ïåðåâ³ðòå, ÷è íå çàïóùåíî $(^NameDA).$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "˳öåíç³éíà Óãîäà"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Áóäü-ëàñêà ïåðåãëÿíüòå ë³öåíç³þ ïåðåä âñòàíîâëåííÿì $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ßêùî Âè ïðèéìàºòå âñi óìîâè Óãîäè, íàòèñíiòü íà êíîïêó Çãîäåí. Âè ïîâèííi ïðèéíÿòè óìîâè Óãîäè äëÿ âñòàíîâëåííÿ $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âñòàíîâëåííÿ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âèáåð³òü ïåðøèé âàð³àíò ç òèõ ùî íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âñòàíîâëåííÿ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "˳öåíç³éíà óãîäà"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âèäàëåííÿì $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ßêùî Âè ïðèéìàºòå âñi óìîâè Óãîäè, íàòèñíiòü íà êíîïêó Çãîäåí. Âè ïîâèííi ïðèéíÿòè óìîâè Óãîäè äëÿ âèäàëåííÿ $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âèäàëåííÿ $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âèáåð³òü ïåðøèé âàð³àíò ç òèõ, ùî íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âèäàëåííÿ $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Íàòèñíiòü PageDown ùîá ïåðåì³ñòèòèñü âíèç óãîäè."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Îáåð³òü êîìïîíåíòè"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Îáåð³òü êîìïîíåíòè $(^NameDA) ÿêi Âè áàæàºòå âñòàíîâèòè."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñ"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Êîìïîíåíòè ïðîãðàìè"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Îáåð³òü ÿê³ êîìïîíåíòè $(^NameDA) Âè áàæàºòå âèäàëèòè."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïiäâåäiòü âàøó ìèøêó äî êîìïîíåíòà, ùîá ïîáà÷èòè éîãî îïèñ."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïiäâåäiòü âàøó ìèøêó äî êîìïîíåíòà, ùîá ïîáà÷èòè éîãî îïèñ."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Îáåðiòü òåêó âñòàíîâëåííÿ"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Îáåðiòü òåêó äëÿ âñòàíîâëåííÿ $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Âèá³ð òåêè äëÿ âèäàëåííÿ"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Îáåð³òü òåêó, ç ÿêî¿ Âè áàæàºòå âèäàëèòè $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Êîï³þâàííÿ ôàéë³â"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Áóäü-ëàñêà çà÷åêàéòå, äîêè ïðîãðàìà âñòàíîâëåííÿ ñêîï³þº âñ³ íåîáõ³äí³ ôàéëè $(^NameDA)."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Âñòàíîâëåííÿ çàâåðøåíî"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Âñòàíîâëåííÿ óñïiøíî çàâåðøåíî."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Âñòàíîâëåííÿ ïåðåðâàíà"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Âñòàíîâëåííÿ íå áóëî óñïiøíî çàâåðøåíî."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Âèäàëåííÿ"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Áóäü-ëàñêà çà÷åêàéòå, éäå âèäàëåííÿ ôàéë³â $(^NameDA)."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Âèäàëåííÿ çàâåðøåíî"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Âèäàëåííÿ ïðîãðàìè áóëî óñï³øíî çàâåðøåíî."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Âèäàëåííÿ ïåðåðâàíî"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Âèäàëåííÿ íå áóëî âèêîíàíî ïîâí³ñòþ."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâåðøåííÿ ìàéñòðà âñòàíîâëåííÿ $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) âñòàíîâëåíî íà âàø êîìï'þòåð.$\r$\n$\r$\nÍàòèñí³òü ʳíåöü äëÿ âèõîäó."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Äëÿ òîãî, ùîá çàâåðøèòè âñòàíîâëåííÿ $(^NameDA) Âàø êîìï'þòåð ïîâèíåí ïåðåçàâàíòàæèòèñÿ. Çðîáèòè öå çàðàç?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâåðøåííÿ Ìàéñòðà Âèäàëåííÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) âèäàëåíèé ç âàøîãî êîìï'þòåðà.$\r$\n$\r$\nÍàòèñí³òü Âèõ³ä, ùîá çàêðèòè Ìàéñòðà."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Äëÿ òîãî, ùîá çàê³í÷èòè âèäàëåííÿ $(^NameDA) âàø êîìï'þòåð ïîâèíåí ïåðåçàâàíòàæèòèñÿ. Âè áàæàºòå çðîáèòè öå çàðàç?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ïåðåçàâàíòàæèòèñÿ çàðàç"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "ß õî÷ó ïåðåçàâàíòàæèòèñÿ âëàñíîðó÷ ï³çí³øå"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Çàïóñòèòè $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ïîêàçàòè ³íôîðìàö³þ ïðî ïðîãðàìó"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&ʳíåöü"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Òåêà â ìåíþ Ïóñê"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Îáåð³òü òåêó â ìåíþ Ïóñê äëÿ ÿðëèê³â ïðîãðàìè."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Îáåð³òü òåêó â ìåíþ Ïóñê â ÿêó áóäóòü ïîì³ùåí³ ÿðëèêè äëÿ âñòàíîâëåíî¿ ïðîãðàìè. Âè òàêîæ ìîæåòå ââåñòè ³íøå ³ì'ÿ äëÿ ñòâîðåííÿ íîâî¿ òåêè."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñòâîðþâàòè ÿðëèêè"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Âèäàëåííÿ $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Âèäàëåííÿ $(^NameDA) ç âàøîãî êîìï'þòåðà."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Âè âïåâíåííi, ùî áàæàºòå ïîêèíóòè âñòàíîâëåííÿ $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Âè âïåâíåíí³ ùî áàæàºòå ïîêèíóòè Ìàéñòð Âèäàëåííÿ $(^Name)?"
-!endif
+;Language: Ukrainian (1058)
+;By Yuri Holubow, http://www.Nash-Soft.com
+;Correct by Osidach Vitaly (Vit_Os2)
+
+!insertmacro LANGFILE "Ukrainian" "Ukrainian"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Ëàñêàâî ïðîñèìî äî Ìàéñòðà Âñòàíîâëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Äàíà ïðîãðàìà âñòàíîâèòü $(^NameDA) íà Âàø êîìï'þòåð.$\r$\n$\r$\nÐåêîìåíäîâàíî çàêðèòè âñ³ ïðîãðàìè ïåðåä ïî÷àòêîì ³íñòàëÿö³¿. Öå äîçâîëèòü ïðîãðàì³ âñòàíîâëåííÿ îíîâèòè ñèñòåìí³ ôàéëè áåç ïåðåçàâàíòàæåííÿ ñèñòåìè.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Ëàñêàâî ïðîñèìî äî Ìàéñòðà Âèäàëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Äàíèé ìàéñòåð äîìîæå âèäàëèòè $(^NameDA).$\r$\n$\r$\nÏåðåä ïî÷àòêîì âèäàëåííÿ, ïåðåâ³ðòå, ÷è íå çàïóùåíî $(^NameDA).$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "˳öåíç³éíà Óãîäà"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Áóäü-ëàñêà ïåðåãëÿíüòå ë³öåíç³þ ïåðåä âñòàíîâëåííÿì $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "ßêùî Âè ïðèéìàºòå âñi óìîâè Óãîäè, íàòèñíiòü íà êíîïêó Çãîäåí. Âè ïîâèííi ïðèéíÿòè óìîâè Óãîäè äëÿ âñòàíîâëåííÿ $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âñòàíîâëåííÿ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âèáåð³òü ïåðøèé âàð³àíò ç òèõ ùî íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âñòàíîâëåííÿ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "˳öåíç³éíà óãîäà"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Ïðî÷èòàéòå óìîâè ë³öåíç³éíî¿ óãîäè ïåðåä âèäàëåííÿì $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "ßêùî Âè ïðèéìàºòå âñi óìîâè Óãîäè, íàòèñíiòü íà êíîïêó Çãîäåí. Âè ïîâèííi ïðèéíÿòè óìîâè Óãîäè äëÿ âèäàëåííÿ $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âñòàíîâ³òü â³äì³òêó ó êâàäðàòèêó íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âèäàëåííÿ $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "ßêùî Âè ïðèéìàºòå âñ³ óìîâè Óãîäè, âèáåð³òü ïåðøèé âàð³àíò ç òèõ, ùî íèæ÷å. Âè ïîâèíí³ ïðèéíÿòè óìîâè Óãîäè äëÿ âèäàëåííÿ $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Íàòèñíiòü PageDown ùîá ïåðåì³ñòèòèñü âíèç óãîäè."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Îáåð³òü êîìïîíåíòè"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Îáåð³òü êîìïîíåíòè $(^NameDA) ÿêi Âè áàæàºòå âñòàíîâèòè."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Îïèñ"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Êîìïîíåíòè ïðîãðàìè"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Îáåð³òü ÿê³ êîìïîíåíòè $(^NameDA) Âè áàæàºòå âèäàëèòè."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïiäâåäiòü âàøó ìèøêó äî êîìïîíåíòà, ùîá ïîáà÷èòè éîãî îïèñ."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Ïiäâåäiòü âàøó ìèøêó äî êîìïîíåíòà, ùîá ïîáà÷èòè éîãî îïèñ."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Îáåðiòü òåêó âñòàíîâëåííÿ"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Îáåðiòü òåêó äëÿ âñòàíîâëåííÿ $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Âèá³ð òåêè äëÿ âèäàëåííÿ"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Îáåð³òü òåêó, ç ÿêî¿ Âè áàæàºòå âèäàëèòè $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Êîï³þâàííÿ ôàéë³â"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Áóäü-ëàñêà çà÷åêàéòå, äîêè ïðîãðàìà âñòàíîâëåííÿ ñêîï³þº âñ³ íåîáõ³äí³ ôàéëè $(^NameDA)."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Âñòàíîâëåííÿ çàâåðøåíî"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Âñòàíîâëåííÿ óñïiøíî çàâåðøåíî."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Âñòàíîâëåííÿ ïåðåðâàíà"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Âñòàíîâëåííÿ íå áóëî óñïiøíî çàâåðøåíî."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Âèäàëåííÿ"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Áóäü-ëàñêà çà÷åêàéòå, éäå âèäàëåííÿ ôàéë³â $(^NameDA)."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Âèäàëåííÿ çàâåðøåíî"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Âèäàëåííÿ ïðîãðàìè áóëî óñï³øíî çàâåðøåíî."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Âèäàëåííÿ ïåðåðâàíî"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Âèäàëåííÿ íå áóëî âèêîíàíî ïîâí³ñòþ."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Çàâåðøåííÿ ìàéñòðà âñòàíîâëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) âñòàíîâëåíî íà âàø êîìï'þòåð.$\r$\n$\r$\nÍàòèñí³òü ʳíåöü äëÿ âèõîäó."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Äëÿ òîãî, ùîá çàâåðøèòè âñòàíîâëåííÿ $(^NameDA) Âàø êîìï'þòåð ïîâèíåí ïåðåçàâàíòàæèòèñÿ. Çðîáèòè öå çàðàç?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Çàâåðøåííÿ Ìàéñòðà Âèäàëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) âèäàëåíèé ç âàøîãî êîìï'þòåðà.$\r$\n$\r$\nÍàòèñí³òü Âèõ³ä, ùîá çàêðèòè Ìàéñòðà."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Äëÿ òîãî, ùîá çàê³í÷èòè âèäàëåííÿ $(^NameDA) âàø êîìï'þòåð ïîâèíåí ïåðåçàâàíòàæèòèñÿ. Âè áàæàºòå çðîáèòè öå çàðàç?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ïåðåçàâàíòàæèòèñÿ çàðàç"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "ß õî÷ó ïåðåçàâàíòàæèòèñÿ âëàñíîðó÷ ï³çí³øå"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Çàïóñòèòè $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Ïîêàçàòè ³íôîðìàö³þ ïðî ïðîãðàìó"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&ʳíåöü"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Òåêà â ìåíþ Ïóñê"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Îáåð³òü òåêó â ìåíþ Ïóñê äëÿ ÿðëèê³â ïðîãðàìè."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Îáåð³òü òåêó â ìåíþ Ïóñê â ÿêó áóäóòü ïîì³ùåí³ ÿðëèêè äëÿ âñòàíîâëåíî¿ ïðîãðàìè. Âè òàêîæ ìîæåòå ââåñòè ³íøå ³ì'ÿ äëÿ ñòâîðåííÿ íîâî¿ òåêè."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Íå ñòâîðþâàòè ÿðëèêè"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Âèäàëåííÿ $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Âèäàëåííÿ $(^NameDA) ç âàøîãî êîìï'þòåðà."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Âè âïåâíåííi, ùî áàæàºòå ïîêèíóòè âñòàíîâëåííÿ $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Âè âïåâíåíí³ ùî áàæàºòå ïîêèíóòè Ìàéñòð Âèäàëåííÿ $(^Name)?"
+!endif
diff --git a/Contrib/Language files/Uzbek.nlf b/Contrib/Language files/Uzbek.nlf
index ef6b7ac..a64ad97 100755
--- a/Contrib/Language files/Uzbek.nlf
+++ b/Contrib/Language files/Uzbek.nlf
@@ -1,190 +1,190 @@
-# Header, don't edit
-NLF v6
-# Language ID
-1091
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
-1252
-# RTL - anything else than RTL means LTR
--
-# Translation by Emil Garipov [emil.garipov@gmail.com]
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-O'rnatish $(^Name)
-# ^UninstallCaption
-O'chirish $(^Name)
-# ^LicenseSubCaption
-: Lisenzion kelishuv
-# ^ComponentsSubCaption
-: O'rnatish parametrlari
-# ^DirSubCaption
-: O'rnatish papkasi
-# ^InstallingSubCaption
-: Fayllarni kopiya qilish
-# ^CompletedSubCaption
-: Operatsiya yakunlandi
-# ^UnComponentsSubCaption
-: O'chirish parametrlari
-# ^UnDirSubCaption
-: O'chirsh papkasi
-# ^ConfirmSubCaption
-: Tasdiqlash
-# ^UninstallingSubCaption
-: Fayllarni o'chirish
-# ^UnCompletedSubCaption
-: Operatsiya yakunlandi
-# ^BackBtn
-< &Orqaga
-# ^NextBtn
-&Oldinga >
-# ^AgreeBtn
-&Qabul qilaman
-# ^AcceptBtn
-Men &kelishuv shartlarini qabul qilaman
-# ^DontAcceptBtn
-Men &kelishuv shartlarini qabul qilmayman
-# ^InstallBtn
-&O'rnatish
-# ^UninstallBtn
-&O'chirish
-# ^CancelBtn
-Bekor qilish
-# ^CloseBtn
-&Yopish
-# ^BrowseBtn
-&Ko'rish ...
-# ^ShowDetailsBtn
-&Äåòàëè...
-# ^ClickNext
-Davom etish uchun 'Oldinga'tugmachasini bosing.
-# ^ClickInstall
-Dasturni o'rnatish uchun'O'rnatish' tugmachasini bosing.
-# ^ClickUninstall
-Dasturni o'chirish uchun 'O'chirsh' tugmachasini bosing.
-# ^Name
-Ism
-# ^Completed
-Tayor
-# ^LicenseText
-$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz 'Qabul qilaman' tugmachasini bosing.
-# ^LicenseTextCB
-$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz bayroqchani joylashtiring. $_CLICK
-# ^LicenseTextRB
-$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz quyida taklif etilganlardan birinchi variantni tanlang. $_CLICK
-# ^UnLicenseText
-$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz 'Qabul qilaman' tugmachasini bosing.
-# ^UnLicenseTextCB
-$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz bayroqchani joylashtiring. $_CLICK
-# ^UnLicenseTextRB
-$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz quyida taklif etilganlardan birinchi variantni tanlang. $_CLICK
-# ^Custom
-Tanlash bo'icha
-# ^ComponentsText
-O'rnatish ucun dastur komponentlarini tanlang. $_CLICK
-# ^ComponentsSubText1
-O'rnatish jarayonini tanlang:
-# ^ComponentsSubText2_NoInstTypes
-O'rnatish uchun dastur komponentlarini tanlang:
-# ^ComponentsSubText2
-Yoki o'rnatish uchun qushimcha komponentlarini tanlang:
-# ^UnComponentsText
-O'chirish uchun dastur komponentlarini tanlang. $_CLICK
-# ^UnComponentsSubText1
-O'chirish jarayonini tanlang:
-# ^UnComponentsSubText2_NoInstTypes
-O'chirish uchun dastur komponentlarini tanlang:
-# ^UnComponentsSubText2
-Yoki o'chirish uchun qushimcha komponentlarini tanlang:
-# ^DirText
-Dastur $(^NameDA)ni ko'rsatilgan papkaga o'rnatadi. Boshqa papkaga o'rnatish uchun, 'Ko'rish'tugmachasini bosing va uni ko'rsatib bering. $_CLICK
-# ^DirSubText
-O'rnatish papkasi
-# ^DirBrowseText
-O'rnatish papkasini ko'rsating $(^NameDA):
-# ^UnDirText
-Dastur $(^NameDA)ni ko'rsatilgan papkadan o'chiradi. Boshqa papkaga o'rnatish uchun, 'Ko'rish'tugmachasini bosing va uni ko'rsatib bering. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-$(^NameDA)ni o'chirish uchun papkani ko'rsating:
-# ^SpaceAvailable
-"Diskda joriy qilingan: "
-# ^SpaceRequired
-"Diskda talab qilinadigan: "
-# ^UninstallingText
-$(^NameDA) dasturi kompyuterizdan uchiriladi. $_CLICK
-# ^UninstallingSubText
-O'chirilish:
-# ^FileError
-Yozish uchun faylni ochish imkoniyati yuq: \r\n\t"$0"\r\n'Tuxtashish': O'rnatishni tuxtatish;\r\n"Takrorlash":yana bir o'rinib ko'rish;\r\n"Taylab ketish": shu xarakatni taylab ketish.
-# ^FileError_NoIgnore
-Yozish uchun faylni ochish imkoniyati yuq: \r\n\t"$0"\r\n'Takrorlash': yana bir o'rinib ko'rish;\r\n'Bekor qilish': o'rnatish protsessini bekor qilish.
-# ^CantWrite
-"Yozish uchun imkoniyat yuq: "
-# ^CopyFailed
-Kopiya qilganda xato bor
-# ^CopyTo
-"Kopiya qilish "
-# ^Registering
-"Ro'yxatga olish: "
-# ^Unregistering
-"Ro'xatdan chiqish: "
-# ^SymbolNotFound
-"Simvolni topish imkoniyati yuq: "
-# ^CouldNotLoad
-"Zagruzka qilish imkoniyati yuq: "
-# ^CreateFolder
-"Papkani yaratish: "
-# ^CreateShortcut
-"Belgini yaratish: "
-# ^CreatedUninstaller
-"O'chirish dasturini yaratish: "
-# ^Delete
-"Faylni o'chirish: "
-# ^DeleteOnReboot
-"Kompyuter qayta yuklash jaraonida o'chirish: "
-# ^ErrorCreatingShortcut
-"Belgini yaratish jarayonida xato: "
-# ^ErrorCreating
-"Yaratish xatosi: "
-# ^ErrorDecompressing
-Ma'lumotlarni asilga qaytarish xatosi! Distributiv ziyonlangan bulishi mumkin.
-# ^ErrorRegistering
-Kutubxonani ro'xatga olish imkoniyati yuq (DLL)
-# ^ExecShell
-"Qoplang'ich komandasini bajarish: "
-# ^Exec
-"Bajarish: "
-# ^Extract
-"Ichidan olish: "
-# ^ErrorWriting
-"Ichidan olish: fayl yozish xatosi "
-# ^InvalidOpcode
-Distributiv ziyonlangan: ruxsatlanmangan kod
-# ^NoOLE
-"Quydagilarga OLE yuq: "
-# ^OutputFolder
-"Papkani o'rnatish: "
-# ^RemoveFolder
-"Papkani o'chirish: "
-# ^RenameOnReboot
-"Kompyuter qayta yuklanish jarayonida ismni qaita quyish: "
-# ^Rename
-"Ismni qayta quyish: "
-# ^Skipped
-"O'tkazib yuborish: "
-# ^CopyDetails
-Bufer obmenaga ma'lumotlarni kopiya qilish
-# ^LogInstall
-O'rnatish xisobotini chiqorish
-# byte
-áàéò
-# kilo
- Ê
-# mega
- Ì
-# giga
+# Header, don't edit
+NLF v6
+# Language ID
+1091
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+1252
+# RTL - anything else than RTL means LTR
+-
+# Translation by Emil Garipov [emil.garipov@gmail.com]
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+O'rnatish $(^Name)
+# ^UninstallCaption
+O'chirish $(^Name)
+# ^LicenseSubCaption
+: Lisenzion kelishuv
+# ^ComponentsSubCaption
+: O'rnatish parametrlari
+# ^DirSubCaption
+: O'rnatish papkasi
+# ^InstallingSubCaption
+: Fayllarni kopiya qilish
+# ^CompletedSubCaption
+: Operatsiya yakunlandi
+# ^UnComponentsSubCaption
+: O'chirish parametrlari
+# ^UnDirSubCaption
+: O'chirsh papkasi
+# ^ConfirmSubCaption
+: Tasdiqlash
+# ^UninstallingSubCaption
+: Fayllarni o'chirish
+# ^UnCompletedSubCaption
+: Operatsiya yakunlandi
+# ^BackBtn
+< &Orqaga
+# ^NextBtn
+&Oldinga >
+# ^AgreeBtn
+&Qabul qilaman
+# ^AcceptBtn
+Men &kelishuv shartlarini qabul qilaman
+# ^DontAcceptBtn
+Men &kelishuv shartlarini qabul qilmayman
+# ^InstallBtn
+&O'rnatish
+# ^UninstallBtn
+&O'chirish
+# ^CancelBtn
+Bekor qilish
+# ^CloseBtn
+&Yopish
+# ^BrowseBtn
+&Ko'rish ...
+# ^ShowDetailsBtn
+&Äåòàëè...
+# ^ClickNext
+Davom etish uchun 'Oldinga'tugmachasini bosing.
+# ^ClickInstall
+Dasturni o'rnatish uchun'O'rnatish' tugmachasini bosing.
+# ^ClickUninstall
+Dasturni o'chirish uchun 'O'chirsh' tugmachasini bosing.
+# ^Name
+Ism
+# ^Completed
+Tayor
+# ^LicenseText
+$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz 'Qabul qilaman' tugmachasini bosing.
+# ^LicenseTextCB
+$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz bayroqchani joylashtiring. $_CLICK
+# ^LicenseTextRB
+$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz quyida taklif etilganlardan birinchi variantni tanlang. $_CLICK
+# ^UnLicenseText
+$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz 'Qabul qilaman' tugmachasini bosing.
+# ^UnLicenseTextCB
+$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz bayroqchani joylashtiring. $_CLICK
+# ^UnLicenseTextRB
+$(^NameDA)ni o'rnatishdan oldin lisenzion kelishuv bilan tanishib oling. Kelishuv shartlarini qabul qilsangiz quyida taklif etilganlardan birinchi variantni tanlang. $_CLICK
+# ^Custom
+Tanlash bo'icha
+# ^ComponentsText
+O'rnatish ucun dastur komponentlarini tanlang. $_CLICK
+# ^ComponentsSubText1
+O'rnatish jarayonini tanlang:
+# ^ComponentsSubText2_NoInstTypes
+O'rnatish uchun dastur komponentlarini tanlang:
+# ^ComponentsSubText2
+Yoki o'rnatish uchun qushimcha komponentlarini tanlang:
+# ^UnComponentsText
+O'chirish uchun dastur komponentlarini tanlang. $_CLICK
+# ^UnComponentsSubText1
+O'chirish jarayonini tanlang:
+# ^UnComponentsSubText2_NoInstTypes
+O'chirish uchun dastur komponentlarini tanlang:
+# ^UnComponentsSubText2
+Yoki o'chirish uchun qushimcha komponentlarini tanlang:
+# ^DirText
+Dastur $(^NameDA)ni ko'rsatilgan papkaga o'rnatadi. Boshqa papkaga o'rnatish uchun, 'Ko'rish'tugmachasini bosing va uni ko'rsatib bering. $_CLICK
+# ^DirSubText
+O'rnatish papkasi
+# ^DirBrowseText
+O'rnatish papkasini ko'rsating $(^NameDA):
+# ^UnDirText
+Dastur $(^NameDA)ni ko'rsatilgan papkadan o'chiradi. Boshqa papkaga o'rnatish uchun, 'Ko'rish'tugmachasini bosing va uni ko'rsatib bering. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+$(^NameDA)ni o'chirish uchun papkani ko'rsating:
+# ^SpaceAvailable
+"Diskda joriy qilingan: "
+# ^SpaceRequired
+"Diskda talab qilinadigan: "
+# ^UninstallingText
+$(^NameDA) dasturi kompyuterizdan uchiriladi. $_CLICK
+# ^UninstallingSubText
+O'chirilish:
+# ^FileError
+Yozish uchun faylni ochish imkoniyati yuq: \r\n\t"$0"\r\n'Tuxtashish': O'rnatishni tuxtatish;\r\n"Takrorlash":yana bir o'rinib ko'rish;\r\n"Taylab ketish": shu xarakatni taylab ketish.
+# ^FileError_NoIgnore
+Yozish uchun faylni ochish imkoniyati yuq: \r\n\t"$0"\r\n'Takrorlash': yana bir o'rinib ko'rish;\r\n'Bekor qilish': o'rnatish protsessini bekor qilish.
+# ^CantWrite
+"Yozish uchun imkoniyat yuq: "
+# ^CopyFailed
+Kopiya qilganda xato bor
+# ^CopyTo
+"Kopiya qilish "
+# ^Registering
+"Ro'yxatga olish: "
+# ^Unregistering
+"Ro'xatdan chiqish: "
+# ^SymbolNotFound
+"Simvolni topish imkoniyati yuq: "
+# ^CouldNotLoad
+"Zagruzka qilish imkoniyati yuq: "
+# ^CreateFolder
+"Papkani yaratish: "
+# ^CreateShortcut
+"Belgini yaratish: "
+# ^CreatedUninstaller
+"O'chirish dasturini yaratish: "
+# ^Delete
+"Faylni o'chirish: "
+# ^DeleteOnReboot
+"Kompyuter qayta yuklash jaraonida o'chirish: "
+# ^ErrorCreatingShortcut
+"Belgini yaratish jarayonida xato: "
+# ^ErrorCreating
+"Yaratish xatosi: "
+# ^ErrorDecompressing
+Ma'lumotlarni asilga qaytarish xatosi! Distributiv ziyonlangan bulishi mumkin.
+# ^ErrorRegistering
+Kutubxonani ro'xatga olish imkoniyati yuq (DLL)
+# ^ExecShell
+"Qoplang'ich komandasini bajarish: "
+# ^Exec
+"Bajarish: "
+# ^Extract
+"Ichidan olish: "
+# ^ErrorWriting
+"Ichidan olish: fayl yozish xatosi "
+# ^InvalidOpcode
+Distributiv ziyonlangan: ruxsatlanmangan kod
+# ^NoOLE
+"Quydagilarga OLE yuq: "
+# ^OutputFolder
+"Papkani o'rnatish: "
+# ^RemoveFolder
+"Papkani o'chirish: "
+# ^RenameOnReboot
+"Kompyuter qayta yuklanish jarayonida ismni qaita quyish: "
+# ^Rename
+"Ismni qayta quyish: "
+# ^Skipped
+"O'tkazib yuborish: "
+# ^CopyDetails
+Bufer obmenaga ma'lumotlarni kopiya qilish
+# ^LogInstall
+O'rnatish xisobotini chiqorish
+# byte
+áàéò
+# kilo
+ Ê
+# mega
+ Ì
+# giga
à \ No newline at end of file
diff --git a/Contrib/Language files/Uzbek.nsh b/Contrib/Language files/Uzbek.nsh
index c61cc5a..97737d2 100755
--- a/Contrib/Language files/Uzbek.nsh
+++ b/Contrib/Language files/Uzbek.nsh
@@ -1,121 +1,121 @@
-;Language: Uzbek (1091)
-;Translation updated by Emil Garipov [emil.garipov@gmail.com]
-
-!insertmacro LANGFILE "Uzbek" "Uzbek"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Sizni o'rnatish dastur tabriklaydi $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Bu dastur sizning komputeringizga $(^NameDA) dasturni o'rnatadi.$\r$\n$\r$\nO'rnatishdan oldin ishlayotgan barcha ilovalarni yopish tavsiya etiladi. Bu o'rnatuvchi dasturga kompyuterni qayta yuklamasdan sistemali fayllarni yangilash imkonini beradi.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Sizni $(^NameDA)ni o'chirish dasturi tabriklaydi"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Bu dastur $(^NameDA)ni sizning kompyuteringizdan o'chiradi.$\r$\n$\r$\nO'chirishdan oldin $(^NameDA) dasturni ishlamayotganligini aniqlang.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisenzion kelishuv"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA) dasturini o'rnatishdan oldin lisenzion kelishuv bilan tanishib chiking."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Agar kelishuv shartlariga rozi bo'lsangiz $\"Qabul kilaman$\" tugmasini bosing.Dasturni o'rnatish uchun,kelishuv shartlarini qabul qilish kerak."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Agar siz kelishuv shartlarini qabul kilsangiz,bayroqchani joylashtiring. Dasturni o'rnatish uchun kelisuv shartlarini qabul qilish kerak. $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kelishuv shartlarini qabul qilsangiz quida taklif etilganlardan birinchi variantni tanlang. Dasturni o'rnatish uchun kelisuv shartlarini qabul qilish kerak. $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisenzion kelishuv"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)ni o'chirishdan oldin lesinzion kelishuv bilan tanishing."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Agar siz kelishuv shartlariniqabul qilsangiz $\"Qabul qilaman$\" tugmasini bosing. O'chirish uchun kelishuv shartlarini qabul qilishingiz kerak. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Agar shartlarni qabul qilsangiz, bayroqchani o'rnating.O'chirish uchun kelishuv shartlarini qabul qilishingiz kerak. $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kelishuv shartlarini qabul qilsangiz, taklif etilganlardan birinchi variantni tanlang.O'chirish uchun kelishuv shartlarini qabul qilishingiz kerak. $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Matn bo'icha silgish uchun $\"PageUp$\" va $\"PageDown$\" tugmasidan foydalaning."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "O'rnatilayotgan dastur komponentlari"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA) dasturning o'zingizga kerak bo'lgan komponentasini tanlang."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Tasvir"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Dastur komponentlari"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)ning o'chirish kerak bo'lgan komponentlarini tanlang."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sichqonchaning kursorini komponent tasvirini o'qish uchun ustiga quying."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sichqonchaning kursorini komponent tasvirini o'qish uchun ustiga quying."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "O'rnatish papkasini tanlash"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)ni o'rnatish uchun papka tanlang."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "O'chiriladigan papkani tanlash"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA) o'chiriladigan papkasini ko'rsating."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Fayllarni ko'chirish"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Biror kuting, $(^NameDA) fayllari ko'chirilmoqda..."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "O'rnatish jarayoni tugadi"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "O'rnatish jarayoni muvaffaqiyat bilan tugadi."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "O'rnatish jarayoni uzildi"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "O'rnatish jarayoni tugamadi."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "O'chirish"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Biror kutib turing, $(^NameDA) fayllarini o'chirish bajarilmoqda..."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "O'chirish tuganlandi"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Dasturni o'chirish muvaffaqiyatli yakunlandi."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "O'chirish jarayoni uzildi"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "O'chirish to'la bajarilmadi."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA)ni o'rnatuvci dasturi o'z ishini tugatmoqda"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)ni o'rnatish bajarildi.$\r$\n$\r$\nO'rnatuvchi dasturdan chiqish uchun $\"Tayor$\" tugmasini bosing."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) dasturini o'rnatish jarayonini tugatish uchun Kompyuterni qayta yuklash kerak.Shu ishni bajarishni xoziroq istaysizmi?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA)ni o'chirish dasturi o'z ishini tugatdi."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) dasturi kompyuteringizdan o'chirildi.$\r$\n$\r$\nO'chirish dasturidan chiqish uchun $\"Tayor$\"tugmasini bosing."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) dasturini o'chirishni tugatish uchun kompyuterni qayta yuklash kerak.shu ishni xozir bajarasizmi?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ha, kompyuter hozir qayta yuklansin"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Yo'q, bu ishni keyinroq bajaraman"
- ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) &Ishga tushirilsin"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Readme fayli ko'rsatilsin"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Tayor"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Papka $\"Ïóñê$\" menyusida"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Dastur belgilarini joylashtirish uchun $\"Ïóñê$\" menyusidan papka tanlang."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "$\"Ïóñê$\" menyusidan dastur belgilari joylashadigan papka tanlang. Siz papkaning boshqa ismini kiritishingiz mumkin"
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Belgilar yaratilmasin"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)ni o'chirish"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA)ni kompyuterdan o'chirish."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Haqiqatdan ham siz $(^Name)ni o'rnatishni bekor qilmoqchimisiz?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name)ni o'chirish jarayonini bekor qilmoqchisizmi?"
-!endif
+;Language: Uzbek (1091)
+;Translation updated by Emil Garipov [emil.garipov@gmail.com]
+
+!insertmacro LANGFILE "Uzbek" "Uzbek"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Sizni o'rnatish dastur tabriklaydi $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Bu dastur sizning komputeringizga $(^NameDA) dasturni o'rnatadi.$\r$\n$\r$\nO'rnatishdan oldin ishlayotgan barcha ilovalarni yopish tavsiya etiladi. Bu o'rnatuvchi dasturga kompyuterni qayta yuklamasdan sistemali fayllarni yangilash imkonini beradi.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Sizni $(^NameDA)ni o'chirish dasturi tabriklaydi"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Bu dastur $(^NameDA)ni sizning kompyuteringizdan o'chiradi.$\r$\n$\r$\nO'chirishdan oldin $(^NameDA) dasturni ishlamayotganligini aniqlang.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Lisenzion kelishuv"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "$(^NameDA) dasturini o'rnatishdan oldin lisenzion kelishuv bilan tanishib chiking."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Agar kelishuv shartlariga rozi bo'lsangiz $\"Qabul kilaman$\" tugmasini bosing.Dasturni o'rnatish uchun,kelishuv shartlarini qabul qilish kerak."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Agar siz kelishuv shartlarini qabul kilsangiz,bayroqchani joylashtiring. Dasturni o'rnatish uchun kelisuv shartlarini qabul qilish kerak. $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kelishuv shartlarini qabul qilsangiz quida taklif etilganlardan birinchi variantni tanlang. Dasturni o'rnatish uchun kelisuv shartlarini qabul qilish kerak. $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Lisenzion kelishuv"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "$(^NameDA)ni o'chirishdan oldin lesinzion kelishuv bilan tanishing."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Agar siz kelishuv shartlariniqabul qilsangiz $\"Qabul qilaman$\" tugmasini bosing. O'chirish uchun kelishuv shartlarini qabul qilishingiz kerak. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Agar shartlarni qabul qilsangiz, bayroqchani o'rnating.O'chirish uchun kelishuv shartlarini qabul qilishingiz kerak. $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Kelishuv shartlarini qabul qilsangiz, taklif etilganlardan birinchi variantni tanlang.O'chirish uchun kelishuv shartlarini qabul qilishingiz kerak. $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Matn bo'icha silgish uchun $\"PageUp$\" va $\"PageDown$\" tugmasidan foydalaning."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "O'rnatilayotgan dastur komponentlari"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "$(^NameDA) dasturning o'zingizga kerak bo'lgan komponentasini tanlang."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Tasvir"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Dastur komponentlari"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "$(^NameDA)ning o'chirish kerak bo'lgan komponentlarini tanlang."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sichqonchaning kursorini komponent tasvirini o'qish uchun ustiga quying."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Sichqonchaning kursorini komponent tasvirini o'qish uchun ustiga quying."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "O'rnatish papkasini tanlash"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "$(^NameDA)ni o'rnatish uchun papka tanlang."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "O'chiriladigan papkani tanlash"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "$(^NameDA) o'chiriladigan papkasini ko'rsating."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Fayllarni ko'chirish"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Biror kuting, $(^NameDA) fayllari ko'chirilmoqda..."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "O'rnatish jarayoni tugadi"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "O'rnatish jarayoni muvaffaqiyat bilan tugadi."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "O'rnatish jarayoni uzildi"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "O'rnatish jarayoni tugamadi."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "O'chirish"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Biror kutib turing, $(^NameDA) fayllarini o'chirish bajarilmoqda..."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "O'chirish tuganlandi"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Dasturni o'chirish muvaffaqiyatli yakunlandi."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "O'chirish jarayoni uzildi"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "O'chirish to'la bajarilmadi."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "$(^NameDA)ni o'rnatuvci dasturi o'z ishini tugatmoqda"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA)ni o'rnatish bajarildi.$\r$\n$\r$\nO'rnatuvchi dasturdan chiqish uchun $\"Tayor$\" tugmasini bosing."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "$(^NameDA) dasturini o'rnatish jarayonini tugatish uchun Kompyuterni qayta yuklash kerak.Shu ishni bajarishni xoziroq istaysizmi?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "$(^NameDA)ni o'chirish dasturi o'z ishini tugatdi."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) dasturi kompyuteringizdan o'chirildi.$\r$\n$\r$\nO'chirish dasturidan chiqish uchun $\"Tayor$\"tugmasini bosing."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "$(^NameDA) dasturini o'chirishni tugatish uchun kompyuterni qayta yuklash kerak.shu ishni xozir bajarasizmi?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ha, kompyuter hozir qayta yuklansin"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Yo'q, bu ishni keyinroq bajaraman"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "$(^NameDA) &Ishga tushirilsin"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Readme fayli ko'rsatilsin"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Tayor"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Papka $\"Ïóñê$\" menyusida"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Dastur belgilarini joylashtirish uchun $\"Ïóñê$\" menyusidan papka tanlang."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "$\"Ïóñê$\" menyusidan dastur belgilari joylashadigan papka tanlang. Siz papkaning boshqa ismini kiritishingiz mumkin"
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Belgilar yaratilmasin"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "$(^NameDA)ni o'chirish"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "$(^NameDA)ni kompyuterdan o'chirish."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Haqiqatdan ham siz $(^Name)ni o'rnatishni bekor qilmoqchimisiz?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "$(^Name)ni o'chirish jarayonini bekor qilmoqchisizmi?"
+!endif
diff --git a/Contrib/Language files/Welsh.nlf b/Contrib/Language files/Welsh.nlf
index ac06fd9..85520e2 100755
--- a/Contrib/Language files/Welsh.nlf
+++ b/Contrib/Language files/Welsh.nlf
@@ -1,191 +1,191 @@
-# Header, don't edit
-NLF v6
-# Start editing here
-# Language ID
-1160
-# Font and size - dash (-) means default
--
--
-# Codepage - dash (-) means ANSI code page
--
-# RTL - anything else than RTL means LTR
--
-# Translation by Rhoslyn Prys, Meddal.com
-# ^Branding
-Nullsoft Install System %s
-# ^SetupCaption
-Rhaglen Osod $(^Name)
-# ^UninstallCaption
-Rhaglen Dadosod $(^Name)
-# ^LicenseSubCaption
-: Cytundeb Trwyddedu
-# ^ComponentsSubCaption
-: Dewisiadau Gosod
-# ^DirSubCaption
-: Ffolder Gosod
-# ^InstallingSubCaption
-: Gosod
-# ^CompletedSubCaption
-: Cwblhawyd
-# ^UnComponentsSubCaption
-: Dewisiadau Dadosod
-# ^UnDirSubCaption
-: Ffolder Dadosod
-# ^ConfirmSubCaption
-: Cadarnhad
-# ^UninstallingSubCaption
-: Dadosod
-# ^UnCompletedSubCaption
-: Cwblhawyd
-# ^BackBtn
-< &Nôl
-# ^NextBtn
-&Nesaf >
-# ^AgreeBtn
-&Cytuno
-# ^AcceptBtn
-Rwy'n &derbyn Amodau'r Drwydded
-# ^DontAcceptBtn
-Rwy'n &gwrthod Amodau'r Drwydded
-# ^InstallBtn
-&Gosod
-# ^UninstallBtn
-&Dadosod
-# ^CancelBtn
-Diddymu
-# ^CloseBtn
-C&au
-# ^BrowseBtn
-&Pori...
-# ^ShowDetailsBtn
-&Dangos manylion
-# ^ClickNext
-Cliciwch Nesaf i barhau.
-# ^ClickInstall
-Cliciwch Gosod i gychwyn gosod.
-# ^ClickUninstall
-Cliciwch Dadosod i gychwyn dadosod.
-# ^Name
-Enw
-# ^Completed
-Cwblhawyd
-# ^LicenseText
-Darllenwch y cytundeb trwyddedu cyn gosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch Cytuno.
-# ^LicenseTextCB
-Darllenwch y cytundeb trwyddedu cyn gosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch y blwch ticio isod. $_CLICK
-# ^LicenseTextRB
-Darllenwch y cytundeb trwyddedu cyn gosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, ticiwch y dewis cyntaf isod. $_CLICK
-# ^UnLicenseText
-Darllenwch y cytundeb trwyddedu cyn dadosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch Cytuno.
-# ^UnLicenseTextCB
-Darllenwch y cytundeb trwyddedu cyn dadosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch y blwch ticio isod. $_CLICK
-# ^UnLicenseTextRB
-Darllenwch y cytundeb trwyddedu cyn dadosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, ticiwch y dewis cyntaf isod. $_CLICK
-# ^Custom
-Addasu
-# ^ComponentsText
-Ticiwch y cydrannau rydych am eu gosod a dad-dicio'r cydrannau nad ydych am eu gosod. $_CLICK
-# ^ComponentsSubText1
-Dewis y math o osod:
-# ^ComponentsSubText2_NoInstTypes
-Dewis cydrannau i'w gosod:
-# ^ComponentsSubText2
-Neu, ddewis y cydrannau ychwanegol i'w gosod:
-# ^UnComponentsText
-Ticiwch y cydrannau rydych am eu dadosod a dad-dicio'r cydrannau nad ydych am eu dadosod. $_CLICK
-# ^UnComponentsSubText1
-Dewis y math o ddadosod:
-# ^UnComponentsSubText2_NoInstTypes
-Dewis cydrannau i'w dadosod:
-# ^UnComponentsSubText2
-Neu, ddewis y cydrannau ychwanegol i'w dadosod:
-# ^DirText
-Bydd y Rhaglen Osod yn gosod $(^NameDA) yn y ffolder canlynol. I'w osod mewn ffolder gwahanol, cliciwch Pori a dewis ffolder arall. $_CLICK
-# ^DirSubText
-Ffolder Cyrchfan
-# ^DirBrowseText
-Dewis y ffolder i osod $(^NameDA) ynddo:
-# ^UnDirText
-Bydd y Rhegen Osod yn dadosod $(^NameDA) o'r ffolder canlynol. I ddadosod o ffolder gwahanol, cliciwch Pori a dewis ffolder arall. $_CLICK
-# ^UnDirSubText
-""
-# ^UnDirBrowseText
-Dewis ffolder i ddadosod $(^NameDA) ohono:
-# ^SpaceAvailable
-"Lle ar gael: "
-# ^SpaceRequired
-"Lle angenrheidiol: "
-# ^UninstallingText
-Bydd $(^NameDA) yn cael ei ddadosod o'r ffolder canlynol. $_CLICK
-# ^UninstallingSubText
-Dadosod o:
-# ^FileError
-Gwall agor ffeil i'w hysgrifennu: \r\n\r\n$0\r\n\r\nCliciwch Atal i atal y gosod,\r\nEto i geisio eto, neu\r\nAnwybyddu i hepgor y ffeil.
-# ^FileError_NoIgnore
-Gwall agor ffeil i'w hysgrifennu: \r\n\r\n$0\r\n\r\nCliciwch Eto i geisio eto, neu\r\nDiddymu i atal y gosod.
-# ^CantWrite
-"Methu ysgrifennu: "
-# ^CopyFailed
-Methu Copïo
-# ^CopyTo
-"Copïo i "
-# ^Registering
-"Cofrestru: "
-# ^Unregistering
-"Dadgofrestru: "
-# ^SymbolNotFound
-"Methu canfod symbol: "
-# ^CouldNotLoad
-"Methu llwytho: "
-# ^CreateFolder
-"Creu ffolder: "
-# ^CreateShortcut
-"Creu llwybr byr: "
-# ^CreatedUninstaller
-"Creu dadosodwr: "
-# ^Delete
-"Dileu ffeil: "
-# ^DeleteOnReboot
-"Dileu wrth ailgychwyn: "
-# ^ErrorCreatingShortcut
-"Gwall wrth greu llwybr byr: "
-# ^ErrorCreating
-"Gwall wrth greu: "
-# ^ErrorDecompressing
-Gwall wrth ddatgywasgu data! Gosodwr llwgr?
-# ^ErrorRegistering
-Gwall cofrestru DLL
-# ^ExecShell
-"ExecShell: "
-# ^Exec
-"Gweithredu: "
-# ^Extract
-"Echdynnu: "
-# ^ErrorWriting
-"Echdynnu: gwall ysgrifennu i ffeil "
-# ^InvalidOpcode
-Gosodwr llwgr: opcode annilys
-# ^NoOLE
-"Dim OLE ar gyfer: "
-# ^OutputFolder
-"Ffolder allbwn: "
-# ^RemoveFolder
-"Tynnu ffolder: "
-# ^RenameOnReboot
-"Ailenwi wrth ailgychwyn: "
-# ^Rename
-"Ailenwi: "
-# ^Skipped
-"Hepgor: "
-# ^CopyDetails
-Copïo Manylion i'r Clipfwrdd
-# ^LogInstall
-Cofnodi'r brosed gosod
-# ^Byte
-B
-# ^Kilo
-K
-# ^Mega
-M
-# ^Giga
-G
+# Header, don't edit
+NLF v6
+# Start editing here
+# Language ID
+1160
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+-
+# RTL - anything else than RTL means LTR
+-
+# Translation by Rhoslyn Prys, Meddal.com
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+Rhaglen Osod $(^Name)
+# ^UninstallCaption
+Rhaglen Dadosod $(^Name)
+# ^LicenseSubCaption
+: Cytundeb Trwyddedu
+# ^ComponentsSubCaption
+: Dewisiadau Gosod
+# ^DirSubCaption
+: Ffolder Gosod
+# ^InstallingSubCaption
+: Gosod
+# ^CompletedSubCaption
+: Cwblhawyd
+# ^UnComponentsSubCaption
+: Dewisiadau Dadosod
+# ^UnDirSubCaption
+: Ffolder Dadosod
+# ^ConfirmSubCaption
+: Cadarnhad
+# ^UninstallingSubCaption
+: Dadosod
+# ^UnCompletedSubCaption
+: Cwblhawyd
+# ^BackBtn
+< &Nôl
+# ^NextBtn
+&Nesaf >
+# ^AgreeBtn
+&Cytuno
+# ^AcceptBtn
+Rwy'n &derbyn Amodau'r Drwydded
+# ^DontAcceptBtn
+Rwy'n &gwrthod Amodau'r Drwydded
+# ^InstallBtn
+&Gosod
+# ^UninstallBtn
+&Dadosod
+# ^CancelBtn
+Diddymu
+# ^CloseBtn
+C&au
+# ^BrowseBtn
+&Pori...
+# ^ShowDetailsBtn
+&Dangos manylion
+# ^ClickNext
+Cliciwch Nesaf i barhau.
+# ^ClickInstall
+Cliciwch Gosod i gychwyn gosod.
+# ^ClickUninstall
+Cliciwch Dadosod i gychwyn dadosod.
+# ^Name
+Enw
+# ^Completed
+Cwblhawyd
+# ^LicenseText
+Darllenwch y cytundeb trwyddedu cyn gosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch Cytuno.
+# ^LicenseTextCB
+Darllenwch y cytundeb trwyddedu cyn gosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch y blwch ticio isod. $_CLICK
+# ^LicenseTextRB
+Darllenwch y cytundeb trwyddedu cyn gosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, ticiwch y dewis cyntaf isod. $_CLICK
+# ^UnLicenseText
+Darllenwch y cytundeb trwyddedu cyn dadosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch Cytuno.
+# ^UnLicenseTextCB
+Darllenwch y cytundeb trwyddedu cyn dadosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, cliciwch y blwch ticio isod. $_CLICK
+# ^UnLicenseTextRB
+Darllenwch y cytundeb trwyddedu cyn dadosod $(^NameDA). Os ydych yn derbyn holl amodau'r cytundeb, ticiwch y dewis cyntaf isod. $_CLICK
+# ^Custom
+Addasu
+# ^ComponentsText
+Ticiwch y cydrannau rydych am eu gosod a dad-dicio'r cydrannau nad ydych am eu gosod. $_CLICK
+# ^ComponentsSubText1
+Dewis y math o osod:
+# ^ComponentsSubText2_NoInstTypes
+Dewis cydrannau i'w gosod:
+# ^ComponentsSubText2
+Neu, ddewis y cydrannau ychwanegol i'w gosod:
+# ^UnComponentsText
+Ticiwch y cydrannau rydych am eu dadosod a dad-dicio'r cydrannau nad ydych am eu dadosod. $_CLICK
+# ^UnComponentsSubText1
+Dewis y math o ddadosod:
+# ^UnComponentsSubText2_NoInstTypes
+Dewis cydrannau i'w dadosod:
+# ^UnComponentsSubText2
+Neu, ddewis y cydrannau ychwanegol i'w dadosod:
+# ^DirText
+Bydd y Rhaglen Osod yn gosod $(^NameDA) yn y ffolder canlynol. I'w osod mewn ffolder gwahanol, cliciwch Pori a dewis ffolder arall. $_CLICK
+# ^DirSubText
+Ffolder Cyrchfan
+# ^DirBrowseText
+Dewis y ffolder i osod $(^NameDA) ynddo:
+# ^UnDirText
+Bydd y Rhegen Osod yn dadosod $(^NameDA) o'r ffolder canlynol. I ddadosod o ffolder gwahanol, cliciwch Pori a dewis ffolder arall. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Dewis ffolder i ddadosod $(^NameDA) ohono:
+# ^SpaceAvailable
+"Lle ar gael: "
+# ^SpaceRequired
+"Lle angenrheidiol: "
+# ^UninstallingText
+Bydd $(^NameDA) yn cael ei ddadosod o'r ffolder canlynol. $_CLICK
+# ^UninstallingSubText
+Dadosod o:
+# ^FileError
+Gwall agor ffeil i'w hysgrifennu: \r\n\r\n$0\r\n\r\nCliciwch Atal i atal y gosod,\r\nEto i geisio eto, neu\r\nAnwybyddu i hepgor y ffeil.
+# ^FileError_NoIgnore
+Gwall agor ffeil i'w hysgrifennu: \r\n\r\n$0\r\n\r\nCliciwch Eto i geisio eto, neu\r\nDiddymu i atal y gosod.
+# ^CantWrite
+"Methu ysgrifennu: "
+# ^CopyFailed
+Methu Copïo
+# ^CopyTo
+"Copïo i "
+# ^Registering
+"Cofrestru: "
+# ^Unregistering
+"Dadgofrestru: "
+# ^SymbolNotFound
+"Methu canfod symbol: "
+# ^CouldNotLoad
+"Methu llwytho: "
+# ^CreateFolder
+"Creu ffolder: "
+# ^CreateShortcut
+"Creu llwybr byr: "
+# ^CreatedUninstaller
+"Creu dadosodwr: "
+# ^Delete
+"Dileu ffeil: "
+# ^DeleteOnReboot
+"Dileu wrth ailgychwyn: "
+# ^ErrorCreatingShortcut
+"Gwall wrth greu llwybr byr: "
+# ^ErrorCreating
+"Gwall wrth greu: "
+# ^ErrorDecompressing
+Gwall wrth ddatgywasgu data! Gosodwr llwgr?
+# ^ErrorRegistering
+Gwall cofrestru DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Gweithredu: "
+# ^Extract
+"Echdynnu: "
+# ^ErrorWriting
+"Echdynnu: gwall ysgrifennu i ffeil "
+# ^InvalidOpcode
+Gosodwr llwgr: opcode annilys
+# ^NoOLE
+"Dim OLE ar gyfer: "
+# ^OutputFolder
+"Ffolder allbwn: "
+# ^RemoveFolder
+"Tynnu ffolder: "
+# ^RenameOnReboot
+"Ailenwi wrth ailgychwyn: "
+# ^Rename
+"Ailenwi: "
+# ^Skipped
+"Hepgor: "
+# ^CopyDetails
+Copïo Manylion i'r Clipfwrdd
+# ^LogInstall
+Cofnodi'r brosed gosod
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
diff --git a/Contrib/Language files/Welsh.nsh b/Contrib/Language files/Welsh.nsh
index df8cbc8..228ef1a 100755
--- a/Contrib/Language files/Welsh.nsh
+++ b/Contrib/Language files/Welsh.nsh
@@ -1,121 +1,121 @@
-;Language: Welsh (1106)
-;By Rhoslyn Prys, Meddal.com
-
-!insertmacro LANGFILE "Welsh" "Welsh"
-
-!ifdef MUI_WELCOMEPAGE
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Croeso i Ddewin Gosod $(^NameDA)"
- ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Bydd y dewin yn eich arwain drwy osodiad $(^NameDA).$\r$\n$\r$\nCaewch pob rhaglen cyn cychwyn y rhaglen osod. Bydd hyn yn ei gwneud yn bosibl i ddiweddaru'r ffeiliau system berthnasol heb fod angen ailgychwyn eich cyfrifiadur.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_UNWELCOMEPAGE
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Croeso i Ddewin Dadosod $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Bydd y dewin yn eich arwain drwy ddadosod $(^NameDA).$\r$\n$\r$\nCyn cychwyn dadosod, gwnewch yn siwr nad yw $(^NameDA) yn rhedeg.$\r$\n$\r$\n$_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE
- ${LangFileString} MUI_TEXT_LICENSE_TITLE "Cytundeb Trwyddedu"
- ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Darllenwch amodau'r drwydded cyn gosod $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Os ydych yn derbyn amodau'r cytundeb, cliciwch Cytuno i barhau. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn gosod $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Os ydych yn derbyn amodau'r cytundeb, cliciwch y blwch ticio isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn gosod $(^NameDA). $_CLICK"
- ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Os ydych yn derbyn amodau'r cytundeb, cliciwch y dewis cyntaf isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn gosod $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_UNLICENSEPAGE
- ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Cytundeb Trwyddedu"
- ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Darllenwch amodau'r drwydded cyn dadosod $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Os ydych yn derbyn amodau'r cytundeb, cliciwch Cytuno i barhau. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn dadosod $(^NameDA)."
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Os ydych yn derbyn amodau'r cytundeb, cliciwch y blwch ticio isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn dadosod $(^NameDA). $_CLICK"
- ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Os ydych yn derbyn amodau'r cytundeb, cliciwch y dewis cyntaf isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn dadosod $(^NameDA). $_CLICK"
-!endif
-
-!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
- ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pwyswch Page Down i ddarllen gweddill y cytundeb."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE
- ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Dewis Cydrannau"
- ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Dewis pa nodweddion o $(^NameDA) rydych am eu gosod."
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Disgrifiad"
-!endif
-
-!ifdef MUI_UNCOMPONENTSPAGE
- ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Dewis Cydrannau"
- ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Dewis pa nodweddion o $(^NameDA) i'w dadoso."
-!endif
-
-!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
- !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Gosod eich llygoden dros gydran i weld ei ddisgrifiad."
- !else
- ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Gosod eich llygoden dros gydran i weld ei ddisgrifiad."
- !endif
-!endif
-
-!ifdef MUI_DIRECTORYPAGE
- ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Dewis Lleoliad Gosod"
- ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Dewis y ffolder i osod $(^NameDA)."
-!endif
-
-!ifdef MUI_UNDIRECTORYSPAGE
- ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Dewis Lleoliad Dadosod"
- ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Dewis y ffolder i ddadosod $(^NameDA)."
-!endif
-
-!ifdef MUI_INSTFILESPAGE
- ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Gosod"
- ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Arhoswch tra fo $(^NameDA) yn cael ei osod."
- ${LangFileString} MUI_TEXT_FINISH_TITLE "Cwblhawyd y Gosod"
- ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Mae'r Gosod wedi ei gwblhau'n llwyddiannus."
- ${LangFileString} MUI_TEXT_ABORT_TITLE "Ataliwyd y Gosod"
- ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Methwyd â chwblhau'r gosod yn llwyddiannus."
-!endif
-
-!ifdef MUI_UNINSTFILESPAGE
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Dadosod"
- ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Arhoswch tra bo $(^NameDA) yn cael ei ddadosod."
- ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Cwblhawyd y Dadosod"
- ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Mae'r Dadosod wedi ei gwblhau'n llwyddiannus."
- ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ataliwyd y Dadosod"
- ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Methwyd â chwblhau'r dadosod yn llwyddiannus."
-!endif
-
-!ifdef MUI_FINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Cwblhau Dewin Gosod $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Mae $(^NameDA) wedi cael ei osod ar eich cyfrifiadur.$\r$\n$\r$\nCliciwch Gorffen i gau'r dewin."
- ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Rhaid ailgychwyn eich cyfrifiadur i gwblhau gosod $(^NameDA). Hoffech chi ailgychwyn?"
-!endif
-
-!ifdef MUI_UNFINISHPAGE
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Cwblhau Dewin Dadosod $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Mae $(^NameDA) wedi ei ddadosod oddi ar eich cyfrifiadur.$\r$\n$\r$\nCliciwch Gorffen i gau'r dewin."
- ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Rhaid ailgychwyn eich cyfrifiadur i gwblhau gosod $(^NameDA). Hoffech chi ailgychwyn?"
-!endif
-
-!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
- ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ailgychwyn"
- ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Rwyf am ailgychwyn yn hwyrach"
- ${LangFileString} MUI_TEXT_FINISH_RUN "&Rhedeg $(^NameDA)"
- ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Dangos Darllenfi"
- ${LangFileString} MUI_BUTTONTEXT_FINISH "&Gorffen"
-!endif
-
-!ifdef MUI_STARTMENUPAGE
- ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Dewis Ffolder Dewislen Cychwyn"
- ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Dewis ffolder Dewislen Cychwyn ar gyfer llwybrau byr $(^NameDA)."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Dewis ffolder Dewislen Cychwyn i greu llwybrau byr y rhaglen. Gallwch roi enw i greu ffolder newydd."
- ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Peidio creu llwybrau byr"
-!endif
-
-!ifdef MUI_UNCONFIRMPAGE
- ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Dadosod $(^NameDA)"
- ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Tynnu $(^NameDA) oddiar eich cyfrifiadur."
-!endif
-
-!ifdef MUI_ABORTWARNING
- ${LangFileString} MUI_TEXT_ABORTWARNING "Ydych chi'n si?r eich bod am adael Rhaglen Osod $(^Name)?"
-!endif
-
-!ifdef MUI_UNABORTWARNING
- ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ydych chi'n siwr eich bod am adael Rhaglen Dadosod $(^Name)?"
-!endif
+;Language: Welsh (1106)
+;By Rhoslyn Prys, Meddal.com
+
+!insertmacro LANGFILE "Welsh" "Welsh"
+
+!ifdef MUI_WELCOMEPAGE
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Croeso i Ddewin Gosod $(^NameDA)"
+ ${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Bydd y dewin yn eich arwain drwy osodiad $(^NameDA).$\r$\n$\r$\nCaewch pob rhaglen cyn cychwyn y rhaglen osod. Bydd hyn yn ei gwneud yn bosibl i ddiweddaru'r ffeiliau system berthnasol heb fod angen ailgychwyn eich cyfrifiadur.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_UNWELCOMEPAGE
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Croeso i Ddewin Dadosod $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Bydd y dewin yn eich arwain drwy ddadosod $(^NameDA).$\r$\n$\r$\nCyn cychwyn dadosod, gwnewch yn siwr nad yw $(^NameDA) yn rhedeg.$\r$\n$\r$\n$_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE
+ ${LangFileString} MUI_TEXT_LICENSE_TITLE "Cytundeb Trwyddedu"
+ ${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Darllenwch amodau'r drwydded cyn gosod $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Os ydych yn derbyn amodau'r cytundeb, cliciwch Cytuno i barhau. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn gosod $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Os ydych yn derbyn amodau'r cytundeb, cliciwch y blwch ticio isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn gosod $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Os ydych yn derbyn amodau'r cytundeb, cliciwch y dewis cyntaf isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn gosod $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Cytundeb Trwyddedu"
+ ${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Darllenwch amodau'r drwydded cyn dadosod $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Os ydych yn derbyn amodau'r cytundeb, cliciwch Cytuno i barhau. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn dadosod $(^NameDA)."
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Os ydych yn derbyn amodau'r cytundeb, cliciwch y blwch ticio isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn dadosod $(^NameDA). $_CLICK"
+ ${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Os ydych yn derbyn amodau'r cytundeb, cliciwch y dewis cyntaf isod. Mae'n rhaid i chi dderbyn amodau'r cytundeb er mwyn dadosod $(^NameDA). $_CLICK"
+!endif
+
+!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
+ ${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Pwyswch Page Down i ddarllen gweddill y cytundeb."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE
+ ${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Dewis Cydrannau"
+ ${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Dewis pa nodweddion o $(^NameDA) rydych am eu gosod."
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Disgrifiad"
+!endif
+
+!ifdef MUI_UNCOMPONENTSPAGE
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Dewis Cydrannau"
+ ${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Dewis pa nodweddion o $(^NameDA) i'w dadoso."
+!endif
+
+!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Gosod eich llygoden dros gydran i weld ei ddisgrifiad."
+ !else
+ ${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Gosod eich llygoden dros gydran i weld ei ddisgrifiad."
+ !endif
+!endif
+
+!ifdef MUI_DIRECTORYPAGE
+ ${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Dewis Lleoliad Gosod"
+ ${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Dewis y ffolder i osod $(^NameDA)."
+!endif
+
+!ifdef MUI_UNDIRECTORYSPAGE
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Dewis Lleoliad Dadosod"
+ ${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Dewis y ffolder i ddadosod $(^NameDA)."
+!endif
+
+!ifdef MUI_INSTFILESPAGE
+ ${LangFileString} MUI_TEXT_INSTALLING_TITLE "Gosod"
+ ${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Arhoswch tra fo $(^NameDA) yn cael ei osod."
+ ${LangFileString} MUI_TEXT_FINISH_TITLE "Cwblhawyd y Gosod"
+ ${LangFileString} MUI_TEXT_FINISH_SUBTITLE "Mae'r Gosod wedi ei gwblhau'n llwyddiannus."
+ ${LangFileString} MUI_TEXT_ABORT_TITLE "Ataliwyd y Gosod"
+ ${LangFileString} MUI_TEXT_ABORT_SUBTITLE "Methwyd â chwblhau'r gosod yn llwyddiannus."
+!endif
+
+!ifdef MUI_UNINSTFILESPAGE
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "Dadosod"
+ ${LangFileString} MUI_UNTEXT_UNINSTALLING_SUBTITLE "Arhoswch tra bo $(^NameDA) yn cael ei ddadosod."
+ ${LangFileString} MUI_UNTEXT_FINISH_TITLE "Cwblhawyd y Dadosod"
+ ${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Mae'r Dadosod wedi ei gwblhau'n llwyddiannus."
+ ${LangFileString} MUI_UNTEXT_ABORT_TITLE "Ataliwyd y Dadosod"
+ ${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Methwyd â chwblhau'r dadosod yn llwyddiannus."
+!endif
+
+!ifdef MUI_FINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Cwblhau Dewin Gosod $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "Mae $(^NameDA) wedi cael ei osod ar eich cyfrifiadur.$\r$\n$\r$\nCliciwch Gorffen i gau'r dewin."
+ ${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Rhaid ailgychwyn eich cyfrifiadur i gwblhau gosod $(^NameDA). Hoffech chi ailgychwyn?"
+!endif
+
+!ifdef MUI_UNFINISHPAGE
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Cwblhau Dewin Dadosod $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "Mae $(^NameDA) wedi ei ddadosod oddi ar eich cyfrifiadur.$\r$\n$\r$\nCliciwch Gorffen i gau'r dewin."
+ ${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Rhaid ailgychwyn eich cyfrifiadur i gwblhau gosod $(^NameDA). Hoffech chi ailgychwyn?"
+!endif
+
+!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Ailgychwyn"
+ ${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Rwyf am ailgychwyn yn hwyrach"
+ ${LangFileString} MUI_TEXT_FINISH_RUN "&Rhedeg $(^NameDA)"
+ ${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Dangos Darllenfi"
+ ${LangFileString} MUI_BUTTONTEXT_FINISH "&Gorffen"
+!endif
+
+!ifdef MUI_STARTMENUPAGE
+ ${LangFileString} MUI_TEXT_STARTMENU_TITLE "Dewis Ffolder Dewislen Cychwyn"
+ ${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Dewis ffolder Dewislen Cychwyn ar gyfer llwybrau byr $(^NameDA)."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Dewis ffolder Dewislen Cychwyn i greu llwybrau byr y rhaglen. Gallwch roi enw i greu ffolder newydd."
+ ${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Peidio creu llwybrau byr"
+!endif
+
+!ifdef MUI_UNCONFIRMPAGE
+ ${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Dadosod $(^NameDA)"
+ ${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Tynnu $(^NameDA) oddiar eich cyfrifiadur."
+!endif
+
+!ifdef MUI_ABORTWARNING
+ ${LangFileString} MUI_TEXT_ABORTWARNING "Ydych chi'n si?r eich bod am adael Rhaglen Osod $(^Name)?"
+!endif
+
+!ifdef MUI_UNABORTWARNING
+ ${LangFileString} MUI_UNTEXT_ABORTWARNING "Ydych chi'n siwr eich bod am adael Rhaglen Dadosod $(^Name)?"
+!endif
diff --git a/Contrib/Library/LibraryLocal/LibraryLocal.cpp b/Contrib/Library/LibraryLocal/LibraryLocal.cpp
index ecdb53c..4f94fab 100755
--- a/Contrib/Library/LibraryLocal/LibraryLocal.cpp
+++ b/Contrib/Library/LibraryLocal/LibraryLocal.cpp
@@ -1,159 +1,159 @@
-/*
-
- LibraryLocal - used by the Library.nsh macros
- Get the version of local DLL and TLB files
- Written by Joost Verburg
-
-*/
-
-#include "../../../Source/Platform.h"
-
-#include <stdio.h>
-#include <iostream>
-#include <fstream>
-
-#include "../../../Source/util.h"
-#include "../../../Source/winchar.h"
-
-using namespace std;
-
-int g_noconfig=0;
-int g_display_errors=1;
-FILE *g_output=stdout;
-
-int GetTLBVersion(string& filepath, DWORD& high, DWORD & low)
-{
-#ifdef _WIN32
-
- int found = 0;
-
- char fullpath[1024];
- char *p;
- if (!GetFullPathName(filepath.c_str(), sizeof(fullpath), fullpath, &p))
- return 0;
-
- wchar_t ole_filename[1024];
- MultiByteToWideChar(CP_ACP, 0, fullpath, lstrlen(fullpath) + 1, ole_filename, 1024);
-
- ITypeLib* typeLib;
- HRESULT hr;
-
- hr = LoadTypeLib(ole_filename, &typeLib);
-
- if (SUCCEEDED(hr)) {
-
- TLIBATTR* typelibAttr;
-
- hr = typeLib->GetLibAttr(&typelibAttr);
-
- if (SUCCEEDED(hr)) {
-
- high = typelibAttr->wMajorVerNum;
- low = typelibAttr->wMinorVerNum;
-
- found = 1;
-
- }
-
- typeLib->Release();
-
- }
-
- return found;
-
-#else
-
- return 0;
-
-#endif
-}
-
-int main(int argc, char* argv[])
-{
-
- // Parse the command line
-
- string cmdline;
-
- string mode;
- string filename;
- string filepath;
-
- int filefound = 0;
-
- if (argc != 4)
- return 1;
-
- // Get the full path of the local file
-
- mode = argv[1];
- filename = argv[2];
-
- // Validate filename
-
- ifstream fs(filename.c_str());
-
- if (fs.is_open())
- {
- filefound = 1;
- fs.close();
- }
-
- // Work
-
- int versionfound = 0;
- DWORD low = 0, high = 0;
-
- if (filefound)
- {
-
- // Get version
-
- // DLL
-
- if (mode.compare("D") == 0)
- {
-
- versionfound = GetDLLVersion(filename, high, low);
-
- }
-
- // TLB
-
- if (mode.compare("T") == 0)
- {
-
- versionfound = GetTLBVersion(filename, high, low);
-
- }
-
- }
-
- // Write the version to an NSIS header file
-
- ofstream header(argv[3], ofstream::out);
-
- if (header)
- {
-
- if (!filefound)
- {
- header << "!define LIBRARY_VERSION_FILENOTFOUND" << endl;
- }
- else if (!versionfound)
- {
- header << "!define LIBRARY_VERSION_NONE" << endl;
- }
- else
- {
- header << "!define LIBRARY_VERSION_HIGH " << high << endl;
- header << "!define LIBRARY_VERSION_LOW " << low << endl;
- }
-
- header.close();
-
- }
-
- return 0;
-
-}
+/*
+
+ LibraryLocal - used by the Library.nsh macros
+ Get the version of local DLL and TLB files
+ Written by Joost Verburg
+
+*/
+
+#include "../../../Source/Platform.h"
+
+#include <stdio.h>
+#include <iostream>
+#include <fstream>
+
+#include "../../../Source/util.h"
+#include "../../../Source/winchar.h"
+
+using namespace std;
+
+int g_noconfig=0;
+int g_display_errors=1;
+FILE *g_output=stdout;
+
+int GetTLBVersion(string& filepath, DWORD& high, DWORD & low)
+{
+#ifdef _WIN32
+
+ int found = 0;
+
+ char fullpath[1024];
+ char *p;
+ if (!GetFullPathName(filepath.c_str(), sizeof(fullpath), fullpath, &p))
+ return 0;
+
+ wchar_t ole_filename[1024];
+ MultiByteToWideChar(CP_ACP, 0, fullpath, lstrlen(fullpath) + 1, ole_filename, 1024);
+
+ ITypeLib* typeLib;
+ HRESULT hr;
+
+ hr = LoadTypeLib(ole_filename, &typeLib);
+
+ if (SUCCEEDED(hr)) {
+
+ TLIBATTR* typelibAttr;
+
+ hr = typeLib->GetLibAttr(&typelibAttr);
+
+ if (SUCCEEDED(hr)) {
+
+ high = typelibAttr->wMajorVerNum;
+ low = typelibAttr->wMinorVerNum;
+
+ found = 1;
+
+ }
+
+ typeLib->Release();
+
+ }
+
+ return found;
+
+#else
+
+ return 0;
+
+#endif
+}
+
+int main(int argc, char* argv[])
+{
+
+ // Parse the command line
+
+ string cmdline;
+
+ string mode;
+ string filename;
+ string filepath;
+
+ int filefound = 0;
+
+ if (argc != 4)
+ return 1;
+
+ // Get the full path of the local file
+
+ mode = argv[1];
+ filename = argv[2];
+
+ // Validate filename
+
+ ifstream fs(filename.c_str());
+
+ if (fs.is_open())
+ {
+ filefound = 1;
+ fs.close();
+ }
+
+ // Work
+
+ int versionfound = 0;
+ DWORD low = 0, high = 0;
+
+ if (filefound)
+ {
+
+ // Get version
+
+ // DLL
+
+ if (mode.compare("D") == 0)
+ {
+
+ versionfound = GetDLLVersion(filename, high, low);
+
+ }
+
+ // TLB
+
+ if (mode.compare("T") == 0)
+ {
+
+ versionfound = GetTLBVersion(filename, high, low);
+
+ }
+
+ }
+
+ // Write the version to an NSIS header file
+
+ ofstream header(argv[3], ofstream::out);
+
+ if (header)
+ {
+
+ if (!filefound)
+ {
+ header << "!define LIBRARY_VERSION_FILENOTFOUND" << endl;
+ }
+ else if (!versionfound)
+ {
+ header << "!define LIBRARY_VERSION_NONE" << endl;
+ }
+ else
+ {
+ header << "!define LIBRARY_VERSION_HIGH " << high << endl;
+ header << "!define LIBRARY_VERSION_LOW " << low << endl;
+ }
+
+ header.close();
+
+ }
+
+ return 0;
+
+}
diff --git a/Contrib/Library/LibraryLocal/SConscript b/Contrib/Library/LibraryLocal/SConscript
index d71edd6..e3f676c 100755
--- a/Contrib/Library/LibraryLocal/SConscript
+++ b/Contrib/Library/LibraryLocal/SConscript
@@ -1,33 +1,33 @@
-target = 'LibraryLocal'
-
-files = Split("""
- LibraryLocal.cpp
-""")
-
-required_files = Split("""
- #Source/ResourceEditor.cpp
- #Source/util.cpp
- #Source/winchar.cpp
-""")
-
-libs = Split("""
- oleaut32
- version
-""")
-
-Import('BuildUtil BuildUtilEnv')
-
-env = BuildUtilEnv(flags = ['$EXCEPTION_FLAG'], cross_platform = True)
-
-import os.path
-
-for s in required_files:
- fn = os.path.split(s)[-1]
- bn = os.path.splitext(fn)[0]
- o = env.Object(bn, s)
- files.append(o)
-
-if env['PLATFORM'] != 'win32':
- libs = []
-
-BuildUtil(target, files, libs, flags = ['$EXCEPTION_FLAG'], cross_platform = True)
+target = 'LibraryLocal'
+
+files = Split("""
+ LibraryLocal.cpp
+""")
+
+required_files = Split("""
+ #Source/ResourceEditor.cpp
+ #Source/util.cpp
+ #Source/winchar.cpp
+""")
+
+libs = Split("""
+ oleaut32
+ version
+""")
+
+Import('BuildUtil BuildUtilEnv')
+
+env = BuildUtilEnv(flags = ['$EXCEPTION_FLAG'], cross_platform = True)
+
+import os.path
+
+for s in required_files:
+ fn = os.path.split(s)[-1]
+ bn = os.path.splitext(fn)[0]
+ o = env.Object(bn, s)
+ files.append(o)
+
+if env['PLATFORM'] != 'win32':
+ libs = []
+
+BuildUtil(target, files, libs, flags = ['$EXCEPTION_FLAG'], cross_platform = True)
diff --git a/Contrib/Library/RegTool/RegTool.c b/Contrib/Library/RegTool/RegTool.c
index d393d9c..7c62d35 100755
--- a/Contrib/Library/RegTool/RegTool.c
+++ b/Contrib/Library/RegTool/RegTool.c
@@ -1,314 +1,314 @@
-#include <windows.h>
-
-#define STR_SIZE 1024
-
-void RunSelf(char cmd, char *file, int x64);
-void RegDll(char *file);
-void RegTypeLib(char *file);
-void DeleteFileOnReboot(char *pszFile);
-
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
-{
- char *cmdline;
- char seekchar = ' ';
-
- cmdline = GetCommandLine();
- if (*cmdline == '\"')
- seekchar = *cmdline++;
-
- while (*cmdline && *cmdline != seekchar)
- cmdline = CharNext(cmdline);
- cmdline = CharNext(cmdline);
- while (*cmdline == ' ')
- cmdline++;
-
- if (*cmdline++ != '/')
- {
- ExitProcess(1);
- return 0;
- }
-
- if (*cmdline == 'S')
- {
- HKEY rootkey;
-
- if (SUCCEEDED(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\NSIS.Library.RegTool.v2", 0, KEY_READ, &rootkey)))
- {
- char keyname[STR_SIZE];
-
- while (RegEnumKey(rootkey, 0, keyname, STR_SIZE) == ERROR_SUCCESS)
- {
- HKEY key;
-
- if (SUCCEEDED(RegOpenKeyEx(rootkey, keyname, 0, KEY_READ, &key)))
- {
- DWORD t, count, l = sizeof(DWORD);
-
- if (SUCCEEDED(RegQueryValueEx(key, "count", NULL, &t, (LPBYTE) &count, &l)) && t == REG_DWORD)
- {
- DWORD j;
- char valname[128], mode[3], file[STR_SIZE];
-
- for (j = 1; j <= count; j++)
- {
- wsprintf(valname, "%u.mode", j);
- l = sizeof(mode);
- if (FAILED(RegQueryValueEx(key, valname, NULL, &t, (LPBYTE) mode, &l)) || t != REG_SZ)
- continue;
-
- wsprintf(valname, "%u.file", j);
- l = STR_SIZE;
- if (FAILED(RegQueryValueEx(key, valname, NULL, &t, (LPBYTE) file, &l)) || t != REG_SZ)
- continue;
-
- RunSelf(mode[0], file, mode[1] == 'X');
- }
- }
-
- RegCloseKey(key);
- RegDeleteKey(rootkey, keyname);
- }
- }
-
- RegCloseKey(rootkey);
- RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\\NSIS.Library.RegTool.v2");
- }
-
- {
- char file[STR_SIZE];
- if (GetModuleFileName(GetModuleHandle(NULL), file, STR_SIZE))
- {
- DeleteFileOnReboot(file);
- }
- }
- }
- else
- {
- SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
- OleInitialize(NULL);
-
- if (*cmdline == 'D')
- {
- RegDll(cmdline + 1);
- }
- else if (*cmdline == 'T')
- {
- RegTypeLib(cmdline + 1);
- }
-
- OleUninitialize();
- SetErrorMode(0);
- }
-
- ExitProcess(0);
- return 0;
-}
-
-void SafeWow64EnableWow64FsRedirection(BOOL Wow64FsEnableRedirection)
-{
- HMODULE kernel = GetModuleHandle("kernel32");
- if (kernel)
- {
- FARPROC proc = GetProcAddress(kernel, "Wow64EnableWow64FsRedirection");
- if (proc)
- {
- typedef BOOL (WINAPI *Wow64EnableWow64FsRedirectionPtr)(BOOL);
- Wow64EnableWow64FsRedirectionPtr Wow64EnableWow64FsRedirectionFunc =
- (Wow64EnableWow64FsRedirectionPtr) proc;
-
- Wow64EnableWow64FsRedirectionFunc(Wow64FsEnableRedirection);
- }
- }
-}
-
-void RunSelf(char cmd, char *file, int x64)
-{
- char self[STR_SIZE];
- char cmdline[STR_SIZE];
-
- int ready = 0;
-
- if (!*file || (cmd != 'D' && cmd != 'T'))
- return;
-
- if (!x64)
- {
- if (GetModuleFileName(GetModuleHandle(NULL), self, STR_SIZE))
- {
- wsprintf(cmdline, "\"%s\" /%c%s", self, cmd, file);
- ready++;
- }
- }
- else
- {
- if (GetSystemDirectory(self, STR_SIZE))
- {
- wsprintf(cmdline, "\"%s\\regsvr32.exe\" /s \"%s\"", self, file);
- ready++;
-
- SafeWow64EnableWow64FsRedirection(FALSE);
- }
- }
-
- if (ready)
- {
- PROCESS_INFORMATION pi;
- STARTUPINFO si = { sizeof(STARTUPINFO) };
-
- if (CreateProcess(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
- {
- CloseHandle(pi.hThread);
-
- WaitForSingleObject(pi.hProcess, INFINITE);
-
- CloseHandle(pi.hProcess);
- }
-
- if (x64)
- {
- SafeWow64EnableWow64FsRedirection(TRUE);
- }
- }
-}
-
-void RegDll(char *file)
-{
- HMODULE mod = LoadLibraryEx(file, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
- if (mod)
- {
- FARPROC regfunc = GetProcAddress(mod, "DllRegisterServer");
- if (regfunc)
- regfunc();
- FreeLibrary(mod);
- }
-}
-
-void RegTypeLib(char *file)
-{
- WCHAR wfile[STR_SIZE];
-
- if (MultiByteToWideChar(CP_ACP, 0, file, -1, wfile, STR_SIZE) != 0)
- {
- ITypeLib* tlib;
- if (SUCCEEDED(LoadTypeLib(wfile, &tlib))) {
- RegisterTypeLib(tlib, wfile, NULL);
- tlib->lpVtbl->Release(tlib);
- }
- }
-}
-
-char *mystrstri(char *a, char *b)
-{
- int l = lstrlen(b);
- while (lstrlen(a) >= l)
- {
- char c = a[l];
- a[l] = 0;
- if (!lstrcmpi(a, b))
- {
- a[l] = c;
- return a;
- }
- a[l] = c;
- a = CharNext(a);
- }
- return NULL;
-}
-
-void mini_memcpy(void *out, const void *in, int len)
-{
- char *c_out=(char*)out;
- char *c_in=(char *)in;
- while (len-- > 0)
- {
- *c_out++=*c_in++;
- }
-}
-
-void DeleteFileOnReboot(char *pszFile)
-{
- BOOL fOk = 0;
- HMODULE hLib=GetModuleHandle("KERNEL32.dll");
- if (hLib)
- {
- typedef BOOL (WINAPI *mfea_t)(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
- mfea_t mfea;
- mfea=(mfea_t) GetProcAddress(hLib,"MoveFileExA");
- if (mfea)
- {
- fOk=mfea(pszFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
- }
- }
-
- if (!fOk)
- {
- static char szRenameLine[1024];
- static char wininit[1024];
- int cchRenameLine;
- char *szRenameSec = "[Rename]\r\n";
- HANDLE hfile, hfilemap;
- DWORD dwFileSize, dwRenameLinePos;
-
- int spn;
-
- // wininit is used as a temporary here
- spn = GetShortPathName(pszFile,wininit,1024);
- if (!spn || spn > 1024)
- return;
- cchRenameLine = wsprintf(szRenameLine,"NUL=%s\r\n",wininit);
-
- GetWindowsDirectory(wininit, 1024-16);
- lstrcat(wininit, "\\wininit.ini");
- hfile = CreateFile(wininit,
- GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
-
- if (hfile != INVALID_HANDLE_VALUE)
- {
- dwFileSize = GetFileSize(hfile, NULL);
- hfilemap = CreateFileMapping(hfile, NULL, PAGE_READWRITE, 0, dwFileSize + cchRenameLine + 10, NULL);
-
- if (hfilemap != NULL)
- {
- LPSTR pszWinInit = (LPSTR) MapViewOfFile(hfilemap, FILE_MAP_WRITE, 0, 0, 0);
-
- if (pszWinInit != NULL)
- {
- LPSTR pszRenameSecInFile = mystrstri(pszWinInit, szRenameSec);
- if (pszRenameSecInFile == NULL)
- {
- lstrcpy(pszWinInit+dwFileSize, szRenameSec);
- dwFileSize += 10;
- dwRenameLinePos = dwFileSize;
- }
- else
- {
- char *pszFirstRenameLine = pszRenameSecInFile+10;
- char *pszNextSec = mystrstri(pszFirstRenameLine,"\n[");
- if (pszNextSec)
- {
- char *p = ++pszNextSec;
- while (p < pszWinInit + dwFileSize) {
- p[cchRenameLine] = *p;
- p++;
- }
-
- dwRenameLinePos = pszNextSec - pszWinInit;
- }
- // rename section is last, stick item at end of file
- else dwRenameLinePos = dwFileSize;
- }
-
- mini_memcpy(&pszWinInit[dwRenameLinePos], szRenameLine, cchRenameLine);
- dwFileSize += cchRenameLine;
-
- UnmapViewOfFile(pszWinInit);
- }
- CloseHandle(hfilemap);
- }
- SetFilePointer(hfile, dwFileSize, NULL, FILE_BEGIN);
- SetEndOfFile(hfile);
- CloseHandle(hfile);
- }
- }
-}
+#include <windows.h>
+
+#define STR_SIZE 1024
+
+void RunSelf(char cmd, char *file, int x64);
+void RegDll(char *file);
+void RegTypeLib(char *file);
+void DeleteFileOnReboot(char *pszFile);
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+ char *cmdline;
+ char seekchar = ' ';
+
+ cmdline = GetCommandLine();
+ if (*cmdline == '\"')
+ seekchar = *cmdline++;
+
+ while (*cmdline && *cmdline != seekchar)
+ cmdline = CharNext(cmdline);
+ cmdline = CharNext(cmdline);
+ while (*cmdline == ' ')
+ cmdline++;
+
+ if (*cmdline++ != '/')
+ {
+ ExitProcess(1);
+ return 0;
+ }
+
+ if (*cmdline == 'S')
+ {
+ HKEY rootkey;
+
+ if (SUCCEEDED(RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\NSIS.Library.RegTool.v2", 0, KEY_READ, &rootkey)))
+ {
+ char keyname[STR_SIZE];
+
+ while (RegEnumKey(rootkey, 0, keyname, STR_SIZE) == ERROR_SUCCESS)
+ {
+ HKEY key;
+
+ if (SUCCEEDED(RegOpenKeyEx(rootkey, keyname, 0, KEY_READ, &key)))
+ {
+ DWORD t, count, l = sizeof(DWORD);
+
+ if (SUCCEEDED(RegQueryValueEx(key, "count", NULL, &t, (LPBYTE) &count, &l)) && t == REG_DWORD)
+ {
+ DWORD j;
+ char valname[128], mode[3], file[STR_SIZE];
+
+ for (j = 1; j <= count; j++)
+ {
+ wsprintf(valname, "%u.mode", j);
+ l = sizeof(mode);
+ if (FAILED(RegQueryValueEx(key, valname, NULL, &t, (LPBYTE) mode, &l)) || t != REG_SZ)
+ continue;
+
+ wsprintf(valname, "%u.file", j);
+ l = STR_SIZE;
+ if (FAILED(RegQueryValueEx(key, valname, NULL, &t, (LPBYTE) file, &l)) || t != REG_SZ)
+ continue;
+
+ RunSelf(mode[0], file, mode[1] == 'X');
+ }
+ }
+
+ RegCloseKey(key);
+ RegDeleteKey(rootkey, keyname);
+ }
+ }
+
+ RegCloseKey(rootkey);
+ RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\\NSIS.Library.RegTool.v2");
+ }
+
+ {
+ char file[STR_SIZE];
+ if (GetModuleFileName(GetModuleHandle(NULL), file, STR_SIZE))
+ {
+ DeleteFileOnReboot(file);
+ }
+ }
+ }
+ else
+ {
+ SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
+ OleInitialize(NULL);
+
+ if (*cmdline == 'D')
+ {
+ RegDll(cmdline + 1);
+ }
+ else if (*cmdline == 'T')
+ {
+ RegTypeLib(cmdline + 1);
+ }
+
+ OleUninitialize();
+ SetErrorMode(0);
+ }
+
+ ExitProcess(0);
+ return 0;
+}
+
+void SafeWow64EnableWow64FsRedirection(BOOL Wow64FsEnableRedirection)
+{
+ HMODULE kernel = GetModuleHandle("kernel32");
+ if (kernel)
+ {
+ FARPROC proc = GetProcAddress(kernel, "Wow64EnableWow64FsRedirection");
+ if (proc)
+ {
+ typedef BOOL (WINAPI *Wow64EnableWow64FsRedirectionPtr)(BOOL);
+ Wow64EnableWow64FsRedirectionPtr Wow64EnableWow64FsRedirectionFunc =
+ (Wow64EnableWow64FsRedirectionPtr) proc;
+
+ Wow64EnableWow64FsRedirectionFunc(Wow64FsEnableRedirection);
+ }
+ }
+}
+
+void RunSelf(char cmd, char *file, int x64)
+{
+ char self[STR_SIZE];
+ char cmdline[STR_SIZE];
+
+ int ready = 0;
+
+ if (!*file || (cmd != 'D' && cmd != 'T'))
+ return;
+
+ if (!x64)
+ {
+ if (GetModuleFileName(GetModuleHandle(NULL), self, STR_SIZE))
+ {
+ wsprintf(cmdline, "\"%s\" /%c%s", self, cmd, file);
+ ready++;
+ }
+ }
+ else
+ {
+ if (GetSystemDirectory(self, STR_SIZE))
+ {
+ wsprintf(cmdline, "\"%s\\regsvr32.exe\" /s \"%s\"", self, file);
+ ready++;
+
+ SafeWow64EnableWow64FsRedirection(FALSE);
+ }
+ }
+
+ if (ready)
+ {
+ PROCESS_INFORMATION pi;
+ STARTUPINFO si = { sizeof(STARTUPINFO) };
+
+ if (CreateProcess(NULL, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
+ {
+ CloseHandle(pi.hThread);
+
+ WaitForSingleObject(pi.hProcess, INFINITE);
+
+ CloseHandle(pi.hProcess);
+ }
+
+ if (x64)
+ {
+ SafeWow64EnableWow64FsRedirection(TRUE);
+ }
+ }
+}
+
+void RegDll(char *file)
+{
+ HMODULE mod = LoadLibraryEx(file, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+ if (mod)
+ {
+ FARPROC regfunc = GetProcAddress(mod, "DllRegisterServer");
+ if (regfunc)
+ regfunc();
+ FreeLibrary(mod);
+ }
+}
+
+void RegTypeLib(char *file)
+{
+ WCHAR wfile[STR_SIZE];
+
+ if (MultiByteToWideChar(CP_ACP, 0, file, -1, wfile, STR_SIZE) != 0)
+ {
+ ITypeLib* tlib;
+ if (SUCCEEDED(LoadTypeLib(wfile, &tlib))) {
+ RegisterTypeLib(tlib, wfile, NULL);
+ tlib->lpVtbl->Release(tlib);
+ }
+ }
+}
+
+char *mystrstri(char *a, char *b)
+{
+ int l = lstrlen(b);
+ while (lstrlen(a) >= l)
+ {
+ char c = a[l];
+ a[l] = 0;
+ if (!lstrcmpi(a, b))
+ {
+ a[l] = c;
+ return a;
+ }
+ a[l] = c;
+ a = CharNext(a);
+ }
+ return NULL;
+}
+
+void mini_memcpy(void *out, const void *in, int len)
+{
+ char *c_out=(char*)out;
+ char *c_in=(char *)in;
+ while (len-- > 0)
+ {
+ *c_out++=*c_in++;
+ }
+}
+
+void DeleteFileOnReboot(char *pszFile)
+{
+ BOOL fOk = 0;
+ HMODULE hLib=GetModuleHandle("KERNEL32.dll");
+ if (hLib)
+ {
+ typedef BOOL (WINAPI *mfea_t)(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
+ mfea_t mfea;
+ mfea=(mfea_t) GetProcAddress(hLib,"MoveFileExA");
+ if (mfea)
+ {
+ fOk=mfea(pszFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
+ }
+ }
+
+ if (!fOk)
+ {
+ static char szRenameLine[1024];
+ static char wininit[1024];
+ int cchRenameLine;
+ char *szRenameSec = "[Rename]\r\n";
+ HANDLE hfile, hfilemap;
+ DWORD dwFileSize, dwRenameLinePos;
+
+ int spn;
+
+ // wininit is used as a temporary here
+ spn = GetShortPathName(pszFile,wininit,1024);
+ if (!spn || spn > 1024)
+ return;
+ cchRenameLine = wsprintf(szRenameLine,"NUL=%s\r\n",wininit);
+
+ GetWindowsDirectory(wininit, 1024-16);
+ lstrcat(wininit, "\\wininit.ini");
+ hfile = CreateFile(wininit,
+ GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
+
+ if (hfile != INVALID_HANDLE_VALUE)
+ {
+ dwFileSize = GetFileSize(hfile, NULL);
+ hfilemap = CreateFileMapping(hfile, NULL, PAGE_READWRITE, 0, dwFileSize + cchRenameLine + 10, NULL);
+
+ if (hfilemap != NULL)
+ {
+ LPSTR pszWinInit = (LPSTR) MapViewOfFile(hfilemap, FILE_MAP_WRITE, 0, 0, 0);
+
+ if (pszWinInit != NULL)
+ {
+ LPSTR pszRenameSecInFile = mystrstri(pszWinInit, szRenameSec);
+ if (pszRenameSecInFile == NULL)
+ {
+ lstrcpy(pszWinInit+dwFileSize, szRenameSec);
+ dwFileSize += 10;
+ dwRenameLinePos = dwFileSize;
+ }
+ else
+ {
+ char *pszFirstRenameLine = pszRenameSecInFile+10;
+ char *pszNextSec = mystrstri(pszFirstRenameLine,"\n[");
+ if (pszNextSec)
+ {
+ char *p = ++pszNextSec;
+ while (p < pszWinInit + dwFileSize) {
+ p[cchRenameLine] = *p;
+ p++;
+ }
+
+ dwRenameLinePos = pszNextSec - pszWinInit;
+ }
+ // rename section is last, stick item at end of file
+ else dwRenameLinePos = dwFileSize;
+ }
+
+ mini_memcpy(&pszWinInit[dwRenameLinePos], szRenameLine, cchRenameLine);
+ dwFileSize += cchRenameLine;
+
+ UnmapViewOfFile(pszWinInit);
+ }
+ CloseHandle(hfilemap);
+ }
+ SetFilePointer(hfile, dwFileSize, NULL, FILE_BEGIN);
+ SetEndOfFile(hfile);
+ CloseHandle(hfile);
+ }
+ }
+}
diff --git a/Contrib/Library/RegTool/SConscript b/Contrib/Library/RegTool/SConscript
index 70f762b..d40a0f6 100755
--- a/Contrib/Library/RegTool/SConscript
+++ b/Contrib/Library/RegTool/SConscript
@@ -1,17 +1,17 @@
-target = 'RegTool'
-
-files = Split("""
- RegTool.c
-""")
-
-libs = Split("""
- kernel32
- oleaut32
- advapi32
- user32
- ole32
-""")
-
-Import('BuildUtil')
-
-BuildUtil(target, files, libs, entry = 'WinMain', nodeflib = True, file_name = 'RegTool.bin')
+target = 'RegTool'
+
+files = Split("""
+ RegTool.c
+""")
+
+libs = Split("""
+ kernel32
+ oleaut32
+ advapi32
+ user32
+ ole32
+""")
+
+Import('BuildUtil')
+
+BuildUtil(target, files, libs, entry = 'WinMain', nodeflib = True, file_name = 'RegTool.bin')
diff --git a/Contrib/Library/TypeLib/SConscript b/Contrib/Library/TypeLib/SConscript
index 76ca8d4..4ba60b3 100755
--- a/Contrib/Library/TypeLib/SConscript
+++ b/Contrib/Library/TypeLib/SConscript
@@ -1,16 +1,16 @@
-target = 'TypeLib'
-
-files = Split("""
- TypeLib.cpp
-""")
-
-libs = Split("""
- kernel32
- user32
- oleaut32
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs)
-
+target = 'TypeLib'
+
+files = Split("""
+ TypeLib.cpp
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ oleaut32
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs)
+
diff --git a/Contrib/Library/TypeLib/TypeLib.cpp b/Contrib/Library/TypeLib/TypeLib.cpp
index 2f2c94e..ef1b23e 100755
--- a/Contrib/Library/TypeLib/TypeLib.cpp
+++ b/Contrib/Library/TypeLib/TypeLib.cpp
@@ -1,135 +1,135 @@
-/*
-
- NSIS plug-in for Type Library Registration/UnRegistration
- Written by Joost Verburg
-
-*/
-
-#include <windows.h>
-#include "../../ExDLL/exdll.h"
-
-#define NSISFunction(funcname) extern "C" void __declspec(dllexport) funcname(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-
-extern "C" BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
- return TRUE;
-}
-
-// Functions
-
-NSISFunction(Register) {
-
- EXDLL_INIT();
-
- char filename[1024];
- popstring(filename);
-
- wchar_t ole_filename[1024];
- MultiByteToWideChar(CP_ACP, 0, filename, 1024, ole_filename, 1024);
-
- ITypeLib* typeLib;
- HRESULT hr;
-
- hr = LoadTypeLib(ole_filename, &typeLib);
-
- if (SUCCEEDED(hr)) {
-
- RegisterTypeLib(typeLib, ole_filename, NULL);
-
- hr = typeLib->Release();
-
- }
-
-}
-
-NSISFunction(UnRegister) {
-
- EXDLL_INIT();
-
- char filename[1024];
- popstring(filename);
-
- wchar_t ole_filename[1024];
- MultiByteToWideChar(CP_ACP, 0, filename, 1024, ole_filename, 1024);
-
- ITypeLib* typeLib;
- HRESULT hr;
-
- hr = LoadTypeLibEx(ole_filename, REGKIND_NONE, &typeLib);
-
- if (SUCCEEDED(hr))
- {
-
- TLIBATTR* typelibAttr;
-
- hr = typeLib->GetLibAttr(&typelibAttr);
-
- if(SUCCEEDED(hr))
- {
-
- UnRegisterTypeLib(typelibAttr->guid,
- typelibAttr->wMajorVerNum,
- typelibAttr->wMinorVerNum,
- typelibAttr->lcid,
- typelibAttr->syskind);
-
- typeLib->ReleaseTLibAttr(typelibAttr);
-
- }
-
- typeLib->Release();
-
- }
-
-}
-
-NSISFunction(GetLibVersion) {
-
- EXDLL_INIT();
-
- char filename[1024];
- popstring(filename);
-
- wchar_t ole_filename[1024];
- MultiByteToWideChar(CP_ACP, 0, filename, 1024, ole_filename, 1024);
-
- ITypeLib* typeLib;
- HRESULT hr;
-
- hr = LoadTypeLib(ole_filename, &typeLib);
-
- if (SUCCEEDED(hr))
- {
-
- TLIBATTR* typelibAttr;
-
- hr = typeLib->GetLibAttr(&typelibAttr);
-
- if (SUCCEEDED(hr))
- {
-
- char buf[33];
-
- wsprintf(buf, "%d", typelibAttr->wMajorVerNum);
- pushstring(buf);
- wsprintf(buf, "%d", typelibAttr->wMinorVerNum);
- pushstring(buf);
-
- typeLib->ReleaseTLibAttr(typelibAttr);
-
- }
- else
- {
- pushstring("0");
- pushstring("0");
- }
-
- typeLib->Release();
-
- }
- else
- {
- pushstring("0");
- pushstring("0");
- }
-
-}
+/*
+
+ NSIS plug-in for Type Library Registration/UnRegistration
+ Written by Joost Verburg
+
+*/
+
+#include <windows.h>
+#include "../../ExDLL/exdll.h"
+
+#define NSISFunction(funcname) extern "C" void __declspec(dllexport) funcname(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+
+extern "C" BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
+ return TRUE;
+}
+
+// Functions
+
+NSISFunction(Register) {
+
+ EXDLL_INIT();
+
+ char filename[1024];
+ popstring(filename);
+
+ wchar_t ole_filename[1024];
+ MultiByteToWideChar(CP_ACP, 0, filename, 1024, ole_filename, 1024);
+
+ ITypeLib* typeLib;
+ HRESULT hr;
+
+ hr = LoadTypeLib(ole_filename, &typeLib);
+
+ if (SUCCEEDED(hr)) {
+
+ RegisterTypeLib(typeLib, ole_filename, NULL);
+
+ hr = typeLib->Release();
+
+ }
+
+}
+
+NSISFunction(UnRegister) {
+
+ EXDLL_INIT();
+
+ char filename[1024];
+ popstring(filename);
+
+ wchar_t ole_filename[1024];
+ MultiByteToWideChar(CP_ACP, 0, filename, 1024, ole_filename, 1024);
+
+ ITypeLib* typeLib;
+ HRESULT hr;
+
+ hr = LoadTypeLibEx(ole_filename, REGKIND_NONE, &typeLib);
+
+ if (SUCCEEDED(hr))
+ {
+
+ TLIBATTR* typelibAttr;
+
+ hr = typeLib->GetLibAttr(&typelibAttr);
+
+ if(SUCCEEDED(hr))
+ {
+
+ UnRegisterTypeLib(typelibAttr->guid,
+ typelibAttr->wMajorVerNum,
+ typelibAttr->wMinorVerNum,
+ typelibAttr->lcid,
+ typelibAttr->syskind);
+
+ typeLib->ReleaseTLibAttr(typelibAttr);
+
+ }
+
+ typeLib->Release();
+
+ }
+
+}
+
+NSISFunction(GetLibVersion) {
+
+ EXDLL_INIT();
+
+ char filename[1024];
+ popstring(filename);
+
+ wchar_t ole_filename[1024];
+ MultiByteToWideChar(CP_ACP, 0, filename, 1024, ole_filename, 1024);
+
+ ITypeLib* typeLib;
+ HRESULT hr;
+
+ hr = LoadTypeLib(ole_filename, &typeLib);
+
+ if (SUCCEEDED(hr))
+ {
+
+ TLIBATTR* typelibAttr;
+
+ hr = typeLib->GetLibAttr(&typelibAttr);
+
+ if (SUCCEEDED(hr))
+ {
+
+ char buf[33];
+
+ wsprintf(buf, "%d", typelibAttr->wMajorVerNum);
+ pushstring(buf);
+ wsprintf(buf, "%d", typelibAttr->wMinorVerNum);
+ pushstring(buf);
+
+ typeLib->ReleaseTLibAttr(typelibAttr);
+
+ }
+ else
+ {
+ pushstring("0");
+ pushstring("0");
+ }
+
+ typeLib->Release();
+
+ }
+ else
+ {
+ pushstring("0");
+ pushstring("0");
+ }
+
+}
diff --git a/Contrib/MakeLangId/MakeLangId.cpp b/Contrib/MakeLangId/MakeLangId.cpp
index 489cdc5..02df7d9 100755
--- a/Contrib/MakeLangId/MakeLangId.cpp
+++ b/Contrib/MakeLangId/MakeLangId.cpp
@@ -1,244 +1,244 @@
-#include <windows.h>
-#include <commctrl.h>
-#include "resource.h"
-
-#define CBL(x) {x,#x}
-
-struct line {
- unsigned short id;
- char *name;
-};
-
-line primary[] = {
- CBL(LANG_NEUTRAL),
- CBL(LANG_INVARIANT),
- CBL(LANG_AFRIKAANS),
- CBL(LANG_ALBANIAN),
- CBL(LANG_ARABIC),
- CBL(LANG_ARMENIAN),
- CBL(LANG_ASSAMESE),
- CBL(LANG_AZERI),
- CBL(LANG_BASQUE),
- CBL(LANG_BELARUSIAN),
- CBL(LANG_BENGALI),
- CBL(LANG_BULGARIAN),
- CBL(LANG_CATALAN),
- CBL(LANG_CHINESE),
- CBL(LANG_CROATIAN),
- CBL(LANG_CZECH),
- CBL(LANG_DANISH),
- CBL(LANG_DIVEHI),
- CBL(LANG_DUTCH),
- CBL(LANG_ENGLISH),
- CBL(LANG_ESTONIAN),
- CBL(LANG_FAEROESE),
- CBL(LANG_FARSI),
- CBL(LANG_FINNISH),
- CBL(LANG_FRENCH),
- CBL(LANG_GALICIAN),
- CBL(LANG_GEORGIAN),
- CBL(LANG_GERMAN),
- CBL(LANG_GREEK),
- CBL(LANG_GUJARATI),
- CBL(LANG_HEBREW),
- CBL(LANG_HINDI),
- CBL(LANG_HUNGARIAN),
- CBL(LANG_ICELANDIC),
- CBL(LANG_INDONESIAN),
- CBL(LANG_ITALIAN),
- CBL(LANG_JAPANESE),
- CBL(LANG_KANNADA),
- CBL(LANG_KASHMIRI),
- CBL(LANG_KAZAK),
- CBL(LANG_KONKANI),
- CBL(LANG_KOREAN),
- CBL(LANG_KYRGYZ),
- CBL(LANG_LATVIAN),
- CBL(LANG_LITHUANIAN),
- CBL(LANG_MACEDONIAN),
- CBL(LANG_MALAY),
- CBL(LANG_MALAYALAM),
- CBL(LANG_MANIPURI),
- CBL(LANG_MARATHI),
- CBL(LANG_MONGOLIAN),
- CBL(LANG_NEPALI),
- CBL(LANG_NORWEGIAN),
- CBL(LANG_ORIYA),
- CBL(LANG_POLISH),
- CBL(LANG_PORTUGUESE),
- CBL(LANG_PUNJABI),
- CBL(LANG_ROMANIAN),
- CBL(LANG_RUSSIAN),
- CBL(LANG_SANSKRIT),
- CBL(LANG_SERBIAN),
- CBL(LANG_SINDHI),
- CBL(LANG_SLOVAK),
- CBL(LANG_SLOVENIAN),
- CBL(LANG_SPANISH),
- CBL(LANG_SWAHILI),
- CBL(LANG_SWEDISH),
- CBL(LANG_SYRIAC),
- CBL(LANG_TAMIL),
- CBL(LANG_TATAR),
- CBL(LANG_TELUGU),
- CBL(LANG_THAI),
- CBL(LANG_TURKISH),
- CBL(LANG_UKRAINIAN),
- CBL(LANG_URDU),
- CBL(LANG_UZBEK),
- CBL(LANG_VIETNAMESE)
-};
-
-line sub[] = {
- CBL(SUBLANG_NEUTRAL),
- CBL(SUBLANG_DEFAULT),
- CBL(SUBLANG_SYS_DEFAULT),
- CBL(SUBLANG_ARABIC_SAUDI_ARABIA),
- CBL(SUBLANG_ARABIC_IRAQ),
- CBL(SUBLANG_ARABIC_EGYPT),
- CBL(SUBLANG_ARABIC_LIBYA),
- CBL(SUBLANG_ARABIC_ALGERIA),
- CBL(SUBLANG_ARABIC_MOROCCO),
- CBL(SUBLANG_ARABIC_TUNISIA),
- CBL(SUBLANG_ARABIC_OMAN),
- CBL(SUBLANG_ARABIC_YEMEN),
- CBL(SUBLANG_ARABIC_SYRIA),
- CBL(SUBLANG_ARABIC_JORDAN),
- CBL(SUBLANG_ARABIC_LEBANON),
- CBL(SUBLANG_ARABIC_KUWAIT),
- CBL(SUBLANG_ARABIC_UAE),
- CBL(SUBLANG_ARABIC_BAHRAIN),
- CBL(SUBLANG_ARABIC_QATAR),
- CBL(SUBLANG_AZERI_LATIN),
- CBL(SUBLANG_AZERI_CYRILLIC),
- CBL(SUBLANG_CHINESE_TRADITIONAL),
- CBL(SUBLANG_CHINESE_SIMPLIFIED),
- CBL(SUBLANG_CHINESE_HONGKONG),
- CBL(SUBLANG_CHINESE_SINGAPORE),
- CBL(SUBLANG_CHINESE_MACAU),
- CBL(SUBLANG_DUTCH),
- CBL(SUBLANG_DUTCH_BELGIAN),
- CBL(SUBLANG_ENGLISH_US),
- CBL(SUBLANG_ENGLISH_UK),
- CBL(SUBLANG_ENGLISH_AUS),
- CBL(SUBLANG_ENGLISH_CAN),
- CBL(SUBLANG_ENGLISH_NZ),
- CBL(SUBLANG_ENGLISH_EIRE),
- CBL(SUBLANG_ENGLISH_SOUTH_AFRICA),
- CBL(SUBLANG_ENGLISH_JAMAICA),
- CBL(SUBLANG_ENGLISH_CARIBBEAN),
- CBL(SUBLANG_ENGLISH_BELIZE),
- CBL(SUBLANG_ENGLISH_TRINIDAD),
- CBL(SUBLANG_ENGLISH_ZIMBABWE),
- CBL(SUBLANG_ENGLISH_PHILIPPINES),
- CBL(SUBLANG_FRENCH),
- CBL(SUBLANG_FRENCH_BELGIAN),
- CBL(SUBLANG_FRENCH_CANADIAN),
- CBL(SUBLANG_FRENCH_SWISS),
- CBL(SUBLANG_FRENCH_LUXEMBOURG),
- CBL(SUBLANG_FRENCH_MONACO),
- CBL(SUBLANG_GERMAN),
- CBL(SUBLANG_GERMAN_SWISS),
- CBL(SUBLANG_GERMAN_AUSTRIAN),
- CBL(SUBLANG_GERMAN_LUXEMBOURG),
- CBL(SUBLANG_GERMAN_LIECHTENSTEIN),
- CBL(SUBLANG_ITALIAN),
- CBL(SUBLANG_ITALIAN_SWISS),
- CBL(SUBLANG_KASHMIRI_INDIA),
- CBL(SUBLANG_KOREAN),
- CBL(SUBLANG_LITHUANIAN),
- CBL(SUBLANG_MALAY_MALAYSIA),
- CBL(SUBLANG_MALAY_BRUNEI_DARUSSALAM),
- CBL(SUBLANG_NEPALI_INDIA),
- CBL(SUBLANG_NORWEGIAN_BOKMAL),
- CBL(SUBLANG_NORWEGIAN_NYNORSK),
- CBL(SUBLANG_PORTUGUESE),
- CBL(SUBLANG_PORTUGUESE_BRAZILIAN),
- CBL(SUBLANG_SERBIAN_LATIN),
- CBL(SUBLANG_SERBIAN_CYRILLIC),
- CBL(SUBLANG_SPANISH),
- CBL(SUBLANG_SPANISH_MEXICAN),
- CBL(SUBLANG_SPANISH_MODERN),
- CBL(SUBLANG_SPANISH_GUATEMALA),
- CBL(SUBLANG_SPANISH_COSTA_RICA),
- CBL(SUBLANG_SPANISH_PANAMA),
- CBL(SUBLANG_SPANISH_DOMINICAN_REPUBLIC),
- CBL(SUBLANG_SPANISH_VENEZUELA),
- CBL(SUBLANG_SPANISH_COLOMBIA),
- CBL(SUBLANG_SPANISH_PERU),
- CBL(SUBLANG_SPANISH_ARGENTINA),
- CBL(SUBLANG_SPANISH_ECUADOR),
- CBL(SUBLANG_SPANISH_CHILE),
- CBL(SUBLANG_SPANISH_URUGUAY),
- CBL(SUBLANG_SPANISH_PARAGUAY),
- CBL(SUBLANG_SPANISH_BOLIVIA),
- CBL(SUBLANG_SPANISH_EL_SALVADOR),
- CBL(SUBLANG_SPANISH_HONDURAS),
- CBL(SUBLANG_SPANISH_NICARAGUA),
- CBL(SUBLANG_SPANISH_PUERTO_RICO),
- CBL(SUBLANG_SWEDISH),
- CBL(SUBLANG_SWEDISH_FINLAND),
- CBL(SUBLANG_URDU_PAKISTAN),
- CBL(SUBLANG_URDU_INDIA),
- CBL(SUBLANG_UZBEK_LATIN),
- CBL(SUBLANG_UZBEK_CYRILLIC)
-};
-
-BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
- size_t i;
- switch (uMsg) {
- case WM_INITDIALOG:
- SendMessage(hwndDlg, WM_SETICON, 0, 0);
- for (i = 0; i < sizeof(primary)/sizeof(line); i++)
- SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_ADDSTRING, 0, (LPARAM)primary[i].name);
- for (i = 0; i < sizeof(sub)/sizeof(line); i++)
- SendDlgItemMessage(hwndDlg, IDC_SUB, CB_ADDSTRING, 0, (LPARAM)sub[i].name);
- break;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDCANCEL) {
- EndDialog(hwndDlg, 0);
- PostQuitMessage(0);
- }
- else if (HIWORD(wParam) == CBN_SELCHANGE) {
- if (SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0) != CB_ERR && SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0) != CB_ERR) {
- char lang[512];
- wsprintf(lang, "Language ID: %d", MAKELANGID(primary[SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0)].id, sub[SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0)].id));
- SetDlgItemText(hwndDlg, IDC_RESULT, lang);
- }
- }
- else if (LOWORD(wParam) == IDOK) {
- if (SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0) != CB_ERR && SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0) != CB_ERR) {
- HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, 16);
- if (!hMem) return 0;
- char *lang_id = (char *)GlobalLock(hMem);
- wsprintf(lang_id, "%u", MAKELANGID(primary[SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0)].id, sub[SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0)].id));
- GlobalUnlock(hMem);
- if (!OpenClipboard(hwndDlg)) return 0;
- EmptyClipboard();
- SetClipboardData(CF_TEXT,hMem);
- CloseClipboard();
- }
- }
- break;
- }
- return 0;
-}
-
-int APIENTRY WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
-{
- InitCommonControls();
-
- DialogBox(
- GetModuleHandle(0),
- MAKEINTRESOURCE(IDD_DIALOG),
- 0,
- DialogProc
- );
-
- ExitProcess(0);
-
- return 0;
-}
+#include <windows.h>
+#include <commctrl.h>
+#include "resource.h"
+
+#define CBL(x) {x,#x}
+
+struct line {
+ unsigned short id;
+ char *name;
+};
+
+line primary[] = {
+ CBL(LANG_NEUTRAL),
+ CBL(LANG_INVARIANT),
+ CBL(LANG_AFRIKAANS),
+ CBL(LANG_ALBANIAN),
+ CBL(LANG_ARABIC),
+ CBL(LANG_ARMENIAN),
+ CBL(LANG_ASSAMESE),
+ CBL(LANG_AZERI),
+ CBL(LANG_BASQUE),
+ CBL(LANG_BELARUSIAN),
+ CBL(LANG_BENGALI),
+ CBL(LANG_BULGARIAN),
+ CBL(LANG_CATALAN),
+ CBL(LANG_CHINESE),
+ CBL(LANG_CROATIAN),
+ CBL(LANG_CZECH),
+ CBL(LANG_DANISH),
+ CBL(LANG_DIVEHI),
+ CBL(LANG_DUTCH),
+ CBL(LANG_ENGLISH),
+ CBL(LANG_ESTONIAN),
+ CBL(LANG_FAEROESE),
+ CBL(LANG_FARSI),
+ CBL(LANG_FINNISH),
+ CBL(LANG_FRENCH),
+ CBL(LANG_GALICIAN),
+ CBL(LANG_GEORGIAN),
+ CBL(LANG_GERMAN),
+ CBL(LANG_GREEK),
+ CBL(LANG_GUJARATI),
+ CBL(LANG_HEBREW),
+ CBL(LANG_HINDI),
+ CBL(LANG_HUNGARIAN),
+ CBL(LANG_ICELANDIC),
+ CBL(LANG_INDONESIAN),
+ CBL(LANG_ITALIAN),
+ CBL(LANG_JAPANESE),
+ CBL(LANG_KANNADA),
+ CBL(LANG_KASHMIRI),
+ CBL(LANG_KAZAK),
+ CBL(LANG_KONKANI),
+ CBL(LANG_KOREAN),
+ CBL(LANG_KYRGYZ),
+ CBL(LANG_LATVIAN),
+ CBL(LANG_LITHUANIAN),
+ CBL(LANG_MACEDONIAN),
+ CBL(LANG_MALAY),
+ CBL(LANG_MALAYALAM),
+ CBL(LANG_MANIPURI),
+ CBL(LANG_MARATHI),
+ CBL(LANG_MONGOLIAN),
+ CBL(LANG_NEPALI),
+ CBL(LANG_NORWEGIAN),
+ CBL(LANG_ORIYA),
+ CBL(LANG_POLISH),
+ CBL(LANG_PORTUGUESE),
+ CBL(LANG_PUNJABI),
+ CBL(LANG_ROMANIAN),
+ CBL(LANG_RUSSIAN),
+ CBL(LANG_SANSKRIT),
+ CBL(LANG_SERBIAN),
+ CBL(LANG_SINDHI),
+ CBL(LANG_SLOVAK),
+ CBL(LANG_SLOVENIAN),
+ CBL(LANG_SPANISH),
+ CBL(LANG_SWAHILI),
+ CBL(LANG_SWEDISH),
+ CBL(LANG_SYRIAC),
+ CBL(LANG_TAMIL),
+ CBL(LANG_TATAR),
+ CBL(LANG_TELUGU),
+ CBL(LANG_THAI),
+ CBL(LANG_TURKISH),
+ CBL(LANG_UKRAINIAN),
+ CBL(LANG_URDU),
+ CBL(LANG_UZBEK),
+ CBL(LANG_VIETNAMESE)
+};
+
+line sub[] = {
+ CBL(SUBLANG_NEUTRAL),
+ CBL(SUBLANG_DEFAULT),
+ CBL(SUBLANG_SYS_DEFAULT),
+ CBL(SUBLANG_ARABIC_SAUDI_ARABIA),
+ CBL(SUBLANG_ARABIC_IRAQ),
+ CBL(SUBLANG_ARABIC_EGYPT),
+ CBL(SUBLANG_ARABIC_LIBYA),
+ CBL(SUBLANG_ARABIC_ALGERIA),
+ CBL(SUBLANG_ARABIC_MOROCCO),
+ CBL(SUBLANG_ARABIC_TUNISIA),
+ CBL(SUBLANG_ARABIC_OMAN),
+ CBL(SUBLANG_ARABIC_YEMEN),
+ CBL(SUBLANG_ARABIC_SYRIA),
+ CBL(SUBLANG_ARABIC_JORDAN),
+ CBL(SUBLANG_ARABIC_LEBANON),
+ CBL(SUBLANG_ARABIC_KUWAIT),
+ CBL(SUBLANG_ARABIC_UAE),
+ CBL(SUBLANG_ARABIC_BAHRAIN),
+ CBL(SUBLANG_ARABIC_QATAR),
+ CBL(SUBLANG_AZERI_LATIN),
+ CBL(SUBLANG_AZERI_CYRILLIC),
+ CBL(SUBLANG_CHINESE_TRADITIONAL),
+ CBL(SUBLANG_CHINESE_SIMPLIFIED),
+ CBL(SUBLANG_CHINESE_HONGKONG),
+ CBL(SUBLANG_CHINESE_SINGAPORE),
+ CBL(SUBLANG_CHINESE_MACAU),
+ CBL(SUBLANG_DUTCH),
+ CBL(SUBLANG_DUTCH_BELGIAN),
+ CBL(SUBLANG_ENGLISH_US),
+ CBL(SUBLANG_ENGLISH_UK),
+ CBL(SUBLANG_ENGLISH_AUS),
+ CBL(SUBLANG_ENGLISH_CAN),
+ CBL(SUBLANG_ENGLISH_NZ),
+ CBL(SUBLANG_ENGLISH_EIRE),
+ CBL(SUBLANG_ENGLISH_SOUTH_AFRICA),
+ CBL(SUBLANG_ENGLISH_JAMAICA),
+ CBL(SUBLANG_ENGLISH_CARIBBEAN),
+ CBL(SUBLANG_ENGLISH_BELIZE),
+ CBL(SUBLANG_ENGLISH_TRINIDAD),
+ CBL(SUBLANG_ENGLISH_ZIMBABWE),
+ CBL(SUBLANG_ENGLISH_PHILIPPINES),
+ CBL(SUBLANG_FRENCH),
+ CBL(SUBLANG_FRENCH_BELGIAN),
+ CBL(SUBLANG_FRENCH_CANADIAN),
+ CBL(SUBLANG_FRENCH_SWISS),
+ CBL(SUBLANG_FRENCH_LUXEMBOURG),
+ CBL(SUBLANG_FRENCH_MONACO),
+ CBL(SUBLANG_GERMAN),
+ CBL(SUBLANG_GERMAN_SWISS),
+ CBL(SUBLANG_GERMAN_AUSTRIAN),
+ CBL(SUBLANG_GERMAN_LUXEMBOURG),
+ CBL(SUBLANG_GERMAN_LIECHTENSTEIN),
+ CBL(SUBLANG_ITALIAN),
+ CBL(SUBLANG_ITALIAN_SWISS),
+ CBL(SUBLANG_KASHMIRI_INDIA),
+ CBL(SUBLANG_KOREAN),
+ CBL(SUBLANG_LITHUANIAN),
+ CBL(SUBLANG_MALAY_MALAYSIA),
+ CBL(SUBLANG_MALAY_BRUNEI_DARUSSALAM),
+ CBL(SUBLANG_NEPALI_INDIA),
+ CBL(SUBLANG_NORWEGIAN_BOKMAL),
+ CBL(SUBLANG_NORWEGIAN_NYNORSK),
+ CBL(SUBLANG_PORTUGUESE),
+ CBL(SUBLANG_PORTUGUESE_BRAZILIAN),
+ CBL(SUBLANG_SERBIAN_LATIN),
+ CBL(SUBLANG_SERBIAN_CYRILLIC),
+ CBL(SUBLANG_SPANISH),
+ CBL(SUBLANG_SPANISH_MEXICAN),
+ CBL(SUBLANG_SPANISH_MODERN),
+ CBL(SUBLANG_SPANISH_GUATEMALA),
+ CBL(SUBLANG_SPANISH_COSTA_RICA),
+ CBL(SUBLANG_SPANISH_PANAMA),
+ CBL(SUBLANG_SPANISH_DOMINICAN_REPUBLIC),
+ CBL(SUBLANG_SPANISH_VENEZUELA),
+ CBL(SUBLANG_SPANISH_COLOMBIA),
+ CBL(SUBLANG_SPANISH_PERU),
+ CBL(SUBLANG_SPANISH_ARGENTINA),
+ CBL(SUBLANG_SPANISH_ECUADOR),
+ CBL(SUBLANG_SPANISH_CHILE),
+ CBL(SUBLANG_SPANISH_URUGUAY),
+ CBL(SUBLANG_SPANISH_PARAGUAY),
+ CBL(SUBLANG_SPANISH_BOLIVIA),
+ CBL(SUBLANG_SPANISH_EL_SALVADOR),
+ CBL(SUBLANG_SPANISH_HONDURAS),
+ CBL(SUBLANG_SPANISH_NICARAGUA),
+ CBL(SUBLANG_SPANISH_PUERTO_RICO),
+ CBL(SUBLANG_SWEDISH),
+ CBL(SUBLANG_SWEDISH_FINLAND),
+ CBL(SUBLANG_URDU_PAKISTAN),
+ CBL(SUBLANG_URDU_INDIA),
+ CBL(SUBLANG_UZBEK_LATIN),
+ CBL(SUBLANG_UZBEK_CYRILLIC)
+};
+
+BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
+ size_t i;
+ switch (uMsg) {
+ case WM_INITDIALOG:
+ SendMessage(hwndDlg, WM_SETICON, 0, 0);
+ for (i = 0; i < sizeof(primary)/sizeof(line); i++)
+ SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_ADDSTRING, 0, (LPARAM)primary[i].name);
+ for (i = 0; i < sizeof(sub)/sizeof(line); i++)
+ SendDlgItemMessage(hwndDlg, IDC_SUB, CB_ADDSTRING, 0, (LPARAM)sub[i].name);
+ break;
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDCANCEL) {
+ EndDialog(hwndDlg, 0);
+ PostQuitMessage(0);
+ }
+ else if (HIWORD(wParam) == CBN_SELCHANGE) {
+ if (SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0) != CB_ERR && SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0) != CB_ERR) {
+ char lang[512];
+ wsprintf(lang, "Language ID: %d", MAKELANGID(primary[SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0)].id, sub[SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0)].id));
+ SetDlgItemText(hwndDlg, IDC_RESULT, lang);
+ }
+ }
+ else if (LOWORD(wParam) == IDOK) {
+ if (SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0) != CB_ERR && SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0) != CB_ERR) {
+ HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, 16);
+ if (!hMem) return 0;
+ char *lang_id = (char *)GlobalLock(hMem);
+ wsprintf(lang_id, "%u", MAKELANGID(primary[SendDlgItemMessage(hwndDlg, IDC_PRIMARY, CB_GETCURSEL, 0, 0)].id, sub[SendDlgItemMessage(hwndDlg, IDC_SUB, CB_GETCURSEL, 0, 0)].id));
+ GlobalUnlock(hMem);
+ if (!OpenClipboard(hwndDlg)) return 0;
+ EmptyClipboard();
+ SetClipboardData(CF_TEXT,hMem);
+ CloseClipboard();
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
+int APIENTRY WinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
+{
+ InitCommonControls();
+
+ DialogBox(
+ GetModuleHandle(0),
+ MAKEINTRESOURCE(IDD_DIALOG),
+ 0,
+ DialogProc
+ );
+
+ ExitProcess(0);
+
+ return 0;
+}
diff --git a/Contrib/MakeLangId/MakeLangId.xml b/Contrib/MakeLangId/MakeLangId.xml
index b04ff01..ec0f63e 100755
--- a/Contrib/MakeLangId/MakeLangId.xml
+++ b/Contrib/MakeLangId/MakeLangId.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Nullsoft.NSIS.MakeLangId" type="win32"/>
-<description>MakeLangId</description>
-<dependency>
-<dependentAssembly>
-<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
-</dependentAssembly>
-</dependency>
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
-<security>
-<requestedPrivileges>
-<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
-</requestedPrivileges>
-</security>
-</trustInfo>
-</assembly>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Nullsoft.NSIS.MakeLangId" type="win32"/>
+<description>MakeLangId</description>
+<dependency>
+<dependentAssembly>
+<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
+</dependentAssembly>
+</dependency>
+<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+<security>
+<requestedPrivileges>
+<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+</requestedPrivileges>
+</security>
+</trustInfo>
+</assembly>
diff --git a/Contrib/MakeLangId/SConscript b/Contrib/MakeLangId/SConscript
index 24330a5..122629d 100755
--- a/Contrib/MakeLangId/SConscript
+++ b/Contrib/MakeLangId/SConscript
@@ -1,24 +1,24 @@
-target = "MakeLangId"
-
-files = Split("""
- MakeLangId.cpp
-""")
-
-res = Split("""
- resource.rc
-""")
-
-resources = Split("""
- MakeLangId.xml
-""")
-
-libs = Split("""
- kernel32
- user32
- comctl32
-""")
-
-Import('BuildUtil')
-
-BuildUtil(target, files, libs, res = res, resources = resources, entry = 'WinMain')
-
+target = "MakeLangId"
+
+files = Split("""
+ MakeLangId.cpp
+""")
+
+res = Split("""
+ resource.rc
+""")
+
+resources = Split("""
+ MakeLangId.xml
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ comctl32
+""")
+
+Import('BuildUtil')
+
+BuildUtil(target, files, libs, res = res, resources = resources, entry = 'WinMain')
+
diff --git a/Contrib/MakeLangId/resource.h b/Contrib/MakeLangId/resource.h
index b132e50..d2b8176 100755
--- a/Contrib/MakeLangId/resource.h
+++ b/Contrib/MakeLangId/resource.h
@@ -1,20 +1,20 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by resource.rc
-//
-#define IDR_MANIFEST 1
-#define IDD_DIALOG 101
-#define IDC_SUB 1001
-#define IDC_PRIMARY 1002
-#define IDC_RESULT 1003
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 104
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1005
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+#define IDR_MANIFEST 1
+#define IDD_DIALOG 101
+#define IDC_SUB 1001
+#define IDC_PRIMARY 1002
+#define IDC_RESULT 1003
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 104
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1005
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/MakeLangId/resource.rc b/Contrib/MakeLangId/resource.rc
index c9b0177..9caf94f 100755
--- a/Contrib/MakeLangId/resource.rc
+++ b/Contrib/MakeLangId/resource.rc
@@ -1,120 +1,120 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <windows.h>
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG DIALOG DISCARDABLE 0, 0, 135, 75
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "MakeLangID"
-FONT 8, "MS Sans Serif"
-BEGIN
- COMBOBOX IDC_PRIMARY,7,7,121,100,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- COMBOBOX IDC_SUB,7,24,121,100,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- DEFPUSHBUTTON "Copy",IDOK,78,54,50,14
- PUSHBUTTON "Exit",IDCANCEL,7,54,50,14
- LTEXT "",IDC_RESULT,7,41,121,8
-END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// RT_MANIFEST
-//
-
-1 RT_MANIFEST "MakeLangId.xml"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 128
- TOPMARGIN, 7
- BOTTOMMARGIN, 68
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// Unknown language: 0xD, 0x1 resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
-#ifdef _WIN32
-LANGUAGE 0xD, 0x1
-#pragma code_page(1255)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // Unknown language: 0xD, 0x1 resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG DIALOG DISCARDABLE 0, 0, 135, 75
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "MakeLangID"
+FONT 8, "MS Sans Serif"
+BEGIN
+ COMBOBOX IDC_PRIMARY,7,7,121,100,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ COMBOBOX IDC_SUB,7,24,121,100,CBS_DROPDOWNLIST | WS_VSCROLL |
+ WS_TABSTOP
+ DEFPUSHBUTTON "Copy",IDOK,78,54,50,14
+ PUSHBUTTON "Exit",IDCANCEL,7,54,50,14
+ LTEXT "",IDC_RESULT,7,41,121,8
+END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+1 RT_MANIFEST "MakeLangId.xml"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 128
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 68
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Unknown language: 0xD, 0x1 resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_HEB)
+#ifdef _WIN32
+LANGUAGE 0xD, 0x1
+#pragma code_page(1255)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Unknown language: 0xD, 0x1 resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/Makensisw/License.txt b/Contrib/Makensisw/License.txt
index f4a28bc..ccb71be 100755
--- a/Contrib/Makensisw/License.txt
+++ b/Contrib/Makensisw/License.txt
@@ -1,17 +1,17 @@
-Copyright (c) 2002 Robert Rainwater <rrainwater@yahoo.com>
-
-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.
+Copyright (c) 2002 Robert Rainwater <rrainwater@yahoo.com>
+
+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/Contrib/Makensisw/Readme.txt b/Contrib/Makensisw/Readme.txt
index 22e8fe8..f28b162 100755
--- a/Contrib/Makensisw/Readme.txt
+++ b/Contrib/Makensisw/Readme.txt
@@ -1,214 +1,214 @@
-----------------------------------------------------
-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
-
-Copyright Information
----------------------
-Copyright (c) 2002 Robert Rainwater
-Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
-
-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.
+----------------------------------------------------
+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
+
+Copyright Information
+---------------------
+Copyright (c) 2002 Robert Rainwater
+Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
+
+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/Contrib/Makensisw/SConscript b/Contrib/Makensisw/SConscript
index ad0acae..401fab8 100755
--- a/Contrib/Makensisw/SConscript
+++ b/Contrib/Makensisw/SConscript
@@ -1,59 +1,59 @@
-target = 'makensisw'
-
-files = Split("""
- makensisw.cpp
- noclib.cpp
- toolbar.cpp
- utils.cpp
- version.cpp
- update.cpp
- jnetlib/asyncdns.cpp
- jnetlib/connection.cpp
- jnetlib/httpget.cpp
- jnetlib/util.cpp
-""")
-
-res = Split("""
- resource.rc
-""")
-
-resources = Split("""
- shell.ico
- icon.ico
- makensisw.xml
- logo.bmp
- toolbar.bmp
- toolbar24.bmp
- toolbar24d.bmp
- toolbar24h.bmp
-""")
-
-libs = Split("""
- kernel32
- advapi32
- user32
- gdi32
- shell32
- comdlg32
- comctl32
- wsock32
-""")
-
-docs = Split("""
- License.txt
- Readme.txt
-""")
-
-Import('BuildUtil')
-
-BuildUtil(
- target,
- files,
- libs,
- res = res,
- resources = resources,
- entry = 'WinMain',
- defines = ['RELEASE=2.3'],
- docs = docs,
- root_util = True
-)
+target = 'makensisw'
+
+files = Split("""
+ makensisw.cpp
+ noclib.cpp
+ toolbar.cpp
+ utils.cpp
+ version.cpp
+ update.cpp
+ jnetlib/asyncdns.cpp
+ jnetlib/connection.cpp
+ jnetlib/httpget.cpp
+ jnetlib/util.cpp
+""")
+
+res = Split("""
+ resource.rc
+""")
+
+resources = Split("""
+ shell.ico
+ icon.ico
+ makensisw.xml
+ logo.bmp
+ toolbar.bmp
+ toolbar24.bmp
+ toolbar24d.bmp
+ toolbar24h.bmp
+""")
+
+libs = Split("""
+ kernel32
+ advapi32
+ user32
+ gdi32
+ shell32
+ comdlg32
+ comctl32
+ wsock32
+""")
+
+docs = Split("""
+ License.txt
+ Readme.txt
+""")
+
+Import('BuildUtil')
+
+BuildUtil(
+ target,
+ files,
+ libs,
+ res = res,
+ resources = resources,
+ entry = 'WinMain',
+ defines = ['RELEASE=2.3'],
+ docs = docs,
+ root_util = True
+)
diff --git a/Contrib/Makensisw/afxres.h b/Contrib/Makensisw/afxres.h
index 2c9dca3..d4c5e1f 100755
--- a/Contrib/Makensisw/afxres.h
+++ b/Contrib/Makensisw/afxres.h
@@ -1,6 +1,6 @@
-#define _WIN32_IE 0x0400
-#include <windows.h>
-
-#ifndef IDC_STATIC
-#define IDC_STATIC -1
-#endif
+#define _WIN32_IE 0x0400
+#include <windows.h>
+
+#ifndef IDC_STATIC
+#define IDC_STATIC -1
+#endif
diff --git a/Contrib/Makensisw/jnetlib/asyncdns.cpp b/Contrib/Makensisw/jnetlib/asyncdns.cpp
index a027872..4789bda 100755
--- a/Contrib/Makensisw/jnetlib/asyncdns.cpp
+++ b/Contrib/Makensisw/jnetlib/asyncdns.cpp
@@ -1,78 +1,78 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: asyncdns.cpp - JNL portable asynchronous DNS implementation
-** License: see jnetlib.h
-*/
-
-
-#include "netinc.h"
-#include "util.h"
-#include "asyncdns.h"
-
-JNL_AsyncDNS::JNL_AsyncDNS(int max_cache_entries)
-{
- m_thread_kill=1;
- m_thread=0;
- m_addr=0;
- m_hostname[0]=0;
-}
-
-JNL_AsyncDNS::~JNL_AsyncDNS()
-{
- m_thread_kill=1;
-
- if (m_thread)
- {
- WaitForSingleObject(m_thread,INFINITE);
- CloseHandle(m_thread);
- }
-}
-
-DWORD WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
-{
- JNL_AsyncDNS *_this=(JNL_AsyncDNS*)_d;
- int nowinsock=JNL::open_socketlib();
- struct hostent *hostentry;
- hostentry=::gethostbyname(_this->m_hostname);
- if (hostentry)
- {
- _this->m_addr=*((int*)hostentry->h_addr);
- }
- else
- _this->m_addr=INADDR_NONE;
- if (!nowinsock) JNL::close_socketlib();
- _this->m_thread_kill=1;
- return 0;
-}
-
-int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
-{
- // return 0 on success, 1 on wait, -1 on unresolvable
- unsigned long ip=inet_addr(hostname);
- if (ip != INADDR_NONE)
- {
- *addr=ip;
- return 0;
- }
-
- if (lstrcmpi(m_hostname,hostname)) m_addr=0;
- else if (m_addr == INADDR_NONE) return -1;
- else if (m_addr)
- {
- *addr=m_addr;
- return 0;
- }
- lstrcpy(m_hostname,hostname);
-
- if (m_thread_kill)
- {
- DWORD id;
- if (m_thread) return -1;
- m_thread_kill=0;
- m_thread=CreateThread(NULL,0,_threadfunc,(LPVOID)this,0,&id);
- if (!m_thread) return -1;
- }
- return 1;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: asyncdns.cpp - JNL portable asynchronous DNS implementation
+** License: see jnetlib.h
+*/
+
+
+#include "netinc.h"
+#include "util.h"
+#include "asyncdns.h"
+
+JNL_AsyncDNS::JNL_AsyncDNS(int max_cache_entries)
+{
+ m_thread_kill=1;
+ m_thread=0;
+ m_addr=0;
+ m_hostname[0]=0;
+}
+
+JNL_AsyncDNS::~JNL_AsyncDNS()
+{
+ m_thread_kill=1;
+
+ if (m_thread)
+ {
+ WaitForSingleObject(m_thread,INFINITE);
+ CloseHandle(m_thread);
+ }
+}
+
+DWORD WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
+{
+ JNL_AsyncDNS *_this=(JNL_AsyncDNS*)_d;
+ int nowinsock=JNL::open_socketlib();
+ struct hostent *hostentry;
+ hostentry=::gethostbyname(_this->m_hostname);
+ if (hostentry)
+ {
+ _this->m_addr=*((int*)hostentry->h_addr);
+ }
+ else
+ _this->m_addr=INADDR_NONE;
+ if (!nowinsock) JNL::close_socketlib();
+ _this->m_thread_kill=1;
+ return 0;
+}
+
+int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
+{
+ // return 0 on success, 1 on wait, -1 on unresolvable
+ unsigned long ip=inet_addr(hostname);
+ if (ip != INADDR_NONE)
+ {
+ *addr=ip;
+ return 0;
+ }
+
+ if (lstrcmpi(m_hostname,hostname)) m_addr=0;
+ else if (m_addr == INADDR_NONE) return -1;
+ else if (m_addr)
+ {
+ *addr=m_addr;
+ return 0;
+ }
+ lstrcpy(m_hostname,hostname);
+
+ if (m_thread_kill)
+ {
+ DWORD id;
+ if (m_thread) return -1;
+ m_thread_kill=0;
+ m_thread=CreateThread(NULL,0,_threadfunc,(LPVOID)this,0,&id);
+ if (!m_thread) return -1;
+ }
+ return 1;
+}
diff --git a/Contrib/Makensisw/jnetlib/asyncdns.h b/Contrib/Makensisw/jnetlib/asyncdns.h
index a4f14ca..a8bbb46 100755
--- a/Contrib/Makensisw/jnetlib/asyncdns.h
+++ b/Contrib/Makensisw/jnetlib/asyncdns.h
@@ -1,38 +1,38 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: asyncdns.h - JNL portable asynchronous DNS interface
-** License: see jnetlib.h
-**
-** Usage:
-** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries.
-** 2. call resolve() to resolve a hostname into an address. The return value of
-** resolve is 0 on success (host successfully resolved), 1 on wait (meaning
-** try calling resolve() with the same hostname in a few hundred milliseconds
-** or so), or -1 on error (i.e. the host can't resolve).
-** 4. enjoy.
-*/
-
-#ifndef _ASYNCDNS_H_
-#define _ASYNCDNS_H_
-
-class JNL_AsyncDNS
-{
-public:
- JNL_AsyncDNS(int max_cache_entries=64);
- ~JNL_AsyncDNS();
-
- int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
-
-private:
- char m_hostname[256];
- unsigned long m_addr;
-
- volatile int m_thread_kill;
- HANDLE m_thread;
- static DWORD WINAPI _threadfunc(LPVOID _d);
-
-};
-
-#endif //_ASYNCDNS_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: asyncdns.h - JNL portable asynchronous DNS interface
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries.
+** 2. call resolve() to resolve a hostname into an address. The return value of
+** resolve is 0 on success (host successfully resolved), 1 on wait (meaning
+** try calling resolve() with the same hostname in a few hundred milliseconds
+** or so), or -1 on error (i.e. the host can't resolve).
+** 4. enjoy.
+*/
+
+#ifndef _ASYNCDNS_H_
+#define _ASYNCDNS_H_
+
+class JNL_AsyncDNS
+{
+public:
+ JNL_AsyncDNS(int max_cache_entries=64);
+ ~JNL_AsyncDNS();
+
+ int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
+
+private:
+ char m_hostname[256];
+ unsigned long m_addr;
+
+ volatile int m_thread_kill;
+ HANDLE m_thread;
+ static DWORD WINAPI _threadfunc(LPVOID _d);
+
+};
+
+#endif //_ASYNCDNS_H_
diff --git a/Contrib/Makensisw/jnetlib/connection.cpp b/Contrib/Makensisw/jnetlib/connection.cpp
index fb33878..38d5f29 100755
--- a/Contrib/Makensisw/jnetlib/connection.cpp
+++ b/Contrib/Makensisw/jnetlib/connection.cpp
@@ -1,447 +1,447 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: connection.cpp - JNL TCP connection implementation
-** License: see jnetlib.h
-*/
-
-#include "netinc.h"
-#include "util.h"
-#include "connection.h"
-
-
-JNL_Connection::JNL_Connection(JNL_AsyncDNS *dns, int sendbufsize, int recvbufsize)
-{
- m_errorstr="";
- if (dns == JNL_CONNECTION_AUTODNS)
- {
- m_dns=new JNL_AsyncDNS();
- m_dns_owned=1;
- }
- else
- {
- m_dns=dns;
- m_dns_owned=0;
- }
- m_recv_buffer_len=recvbufsize;
- m_send_buffer_len=sendbufsize;
- m_recv_buffer=(char*)malloc(m_recv_buffer_len);
- m_send_buffer=(char*)malloc(m_send_buffer_len);
- m_socket=-1;
- memset(m_recv_buffer,0,recvbufsize);
- memset(m_send_buffer,0,sendbufsize);
- m_remote_port=0;
- m_state=STATE_NOCONNECTION;
- m_recv_len=m_recv_pos=0;
- m_send_len=m_send_pos=0;
- m_host[0]=0;
- memset(&m_saddr,0,sizeof(m_saddr));
-}
-
-void JNL_Connection::connect(int s, struct sockaddr_in *loc)
-{
- close(1);
- m_socket=s;
- m_remote_port=0;
- m_dns=NULL;
- if (loc) m_saddr=*loc;
- else memset(&m_saddr,0,sizeof(m_saddr));
- if (m_socket != -1)
- {
- SET_SOCK_BLOCK(m_socket,0);
- m_state=STATE_CONNECTED;
- }
- else
- {
- m_errorstr="invalid socket passed to connect";
- m_state=STATE_ERROR;
- }
-}
-
-void JNL_Connection::connect(char *hostname, int port)
-{
- close(1);
- m_remote_port=(short)port;
- m_socket=::socket(AF_INET,SOCK_STREAM,0);
- if (m_socket==-1)
- {
- m_errorstr="creating socket";
- m_state=STATE_ERROR;
- }
- else
- {
- SET_SOCK_BLOCK(m_socket,0);
- strncpy(m_host,hostname,sizeof(m_host)-1);
- m_host[sizeof(m_host)-1]=0;
- memset(&m_saddr,0,sizeof(m_saddr));
- if (!m_host[0])
- {
- m_errorstr="empty hostname";
- m_state=STATE_ERROR;
- }
- else
- {
- m_state=STATE_RESOLVING;
- m_saddr.sin_family=AF_INET;
- m_saddr.sin_port=htons((unsigned short)port);
- m_saddr.sin_addr.s_addr=inet_addr(hostname);
- }
- }
-}
-
-JNL_Connection::~JNL_Connection()
-{
- if (m_socket >= 0)
- {
- ::shutdown(m_socket, SHUT_RDWR);
- ::closesocket(m_socket);
- m_socket=-1;
- }
- free(m_recv_buffer);
- free(m_send_buffer);
- if (m_dns_owned)
- {
- delete m_dns;
- }
-}
-
-void JNL_Connection::run(int max_send_bytes, int max_recv_bytes, int *bytes_sent, int *bytes_rcvd)
-{
- int bytes_allowed_to_send=(max_send_bytes<0)?m_send_buffer_len:max_send_bytes;
- int bytes_allowed_to_recv=(max_recv_bytes<0)?m_recv_buffer_len:max_recv_bytes;
-
- if (bytes_sent) *bytes_sent=0;
- if (bytes_rcvd) *bytes_rcvd=0;
-
- switch (m_state)
- {
- case STATE_RESOLVING:
- if (m_saddr.sin_addr.s_addr == INADDR_NONE)
- {
- int a=m_dns?m_dns->resolve(m_host,(unsigned long int *)&m_saddr.sin_addr.s_addr):-1;
- if (!a) { m_state=STATE_CONNECTING; }
- else if (a == 1)
- {
- m_state=STATE_RESOLVING;
- break;
- }
- else
- {
- m_errorstr="resolving hostname";
- m_state=STATE_ERROR;
- return;
- }
- }
- if (!::connect(m_socket,(struct sockaddr *)&m_saddr,16))
- {
- m_state=STATE_CONNECTED;
- }
- else if (ERRNO!=EINPROGRESS)
- {
- m_errorstr="connecting to host";
- m_state=STATE_ERROR;
- }
- else { m_state=STATE_CONNECTING; }
- break;
- case STATE_CONNECTING:
- {
- fd_set f[3];
- FD_ZERO(&f[0]);
- FD_ZERO(&f[1]);
- FD_ZERO(&f[2]);
- FD_SET(m_socket,&f[0]);
- FD_SET(m_socket,&f[1]);
- FD_SET(m_socket,&f[2]);
- struct timeval tv;
- memset(&tv,0,sizeof(tv));
- if (select(m_socket+1,&f[0],&f[1],&f[2],&tv)==-1)
- {
- m_errorstr="connecting to host (calling select())";
- m_state=STATE_ERROR;
- }
- else if (FD_ISSET(m_socket,&f[1]))
- {
- m_state=STATE_CONNECTED;
- }
- else if (FD_ISSET(m_socket,&f[2]))
- {
- m_errorstr="connecting to host";
- m_state=STATE_ERROR;
- }
- }
- break;
- case STATE_CONNECTED:
- case STATE_CLOSING:
- if (m_send_len>0 && bytes_allowed_to_send>0)
- {
- int len=m_send_buffer_len-m_send_pos;
- if (len > m_send_len) len=m_send_len;
- if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
- if (len > 0)
- {
- int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
- if (res==-1 && ERRNO != EWOULDBLOCK)
- {
-// m_state=STATE_CLOSED;
-// return;
- }
- if (res>0)
- {
- bytes_allowed_to_send-=res;
- if (bytes_sent) *bytes_sent+=res;
- m_send_pos+=res;
- m_send_len-=res;
- }
- }
- if (m_send_pos>=m_send_buffer_len)
- {
- m_send_pos=0;
- if (m_send_len>0)
- {
- len=m_send_buffer_len-m_send_pos;
- if (len > m_send_len) len=m_send_len;
- if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
- int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
- if (res==-1 && ERRNO != EWOULDBLOCK)
- {
-// m_state=STATE_CLOSED;
- }
- if (res>0)
- {
- bytes_allowed_to_send-=res;
- if (bytes_sent) *bytes_sent+=res;
- m_send_pos+=res;
- m_send_len-=res;
- }
- }
- }
- }
- if (m_recv_len<m_recv_buffer_len)
- {
- int len=m_recv_buffer_len-m_recv_pos;
- if (len > m_recv_buffer_len-m_recv_len) len=m_recv_buffer_len-m_recv_len;
- if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
- if (len>0)
- {
- int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
- if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
- {
- m_state=STATE_CLOSED;
- break;
- }
- if (res > 0)
- {
- bytes_allowed_to_recv-=res;
- if (bytes_rcvd) *bytes_rcvd+=res;
- m_recv_pos+=res;
- m_recv_len+=res;
- }
- }
- if (m_recv_pos >= m_recv_buffer_len)
- {
- m_recv_pos=0;
- if (m_recv_len < m_recv_buffer_len)
- {
- len=m_recv_buffer_len-m_recv_len;
- if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
- if (len > 0)
- {
- int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
- if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
- {
- m_state=STATE_CLOSED;
- break;
- }
- if (res > 0)
- {
- bytes_allowed_to_recv-=res;
- if (bytes_rcvd) *bytes_rcvd+=res;
- m_recv_pos+=res;
- m_recv_len+=res;
- }
- }
- }
- }
- }
- if (m_state == STATE_CLOSING)
- {
- if (m_send_len < 1) m_state = STATE_CLOSED;
- }
- break;
- default: break;
- }
-}
-
-void JNL_Connection::close(int quick)
-{
- if (quick || m_state == STATE_RESOLVING || m_state == STATE_CONNECTING)
- {
- m_state=STATE_CLOSED;
- if (m_socket >= 0)
- {
- ::shutdown(m_socket, SHUT_RDWR);
- ::closesocket(m_socket);
- }
- m_socket=-1;
- memset(m_recv_buffer,0,m_recv_buffer_len);
- memset(m_send_buffer,0,m_send_buffer_len);
- m_remote_port=0;
- m_recv_len=m_recv_pos=0;
- m_send_len=m_send_pos=0;
- m_host[0]=0;
- memset(&m_saddr,0,sizeof(m_saddr));
- }
- else
- {
- if (m_state == STATE_CONNECTED) m_state=STATE_CLOSING;
- }
-}
-
-int JNL_Connection::send_bytes_in_queue(void)
-{
- return m_send_len;
-}
-
-int JNL_Connection::send_bytes_available(void)
-{
- return m_send_buffer_len-m_send_len;
-}
-
-int JNL_Connection::send(char *data, int length)
-{
- if (length > send_bytes_available())
- {
- return -1;
- }
-
- int write_pos=m_send_pos+m_send_len;
- if (write_pos >= m_send_buffer_len)
- {
- write_pos-=m_send_buffer_len;
- }
-
- int len=m_send_buffer_len-write_pos;
- if (len > length)
- {
- len=length;
- }
-
- memcpy(m_send_buffer+write_pos,data,len);
- if (length > len)
- {
- memcpy(m_send_buffer,data+len,length-len);
- }
- m_send_len+=length;
- return 0;
-}
-
-int JNL_Connection::send_string(char *line)
-{
- return send(line,strlen(line));
-}
-
-int JNL_Connection::recv_bytes_available(void)
-{
- return m_recv_len;
-}
-
-int JNL_Connection::peek_bytes(char *data, int maxlength)
-{
- if (maxlength > m_recv_len)
- {
- maxlength=m_recv_len;
- }
- int read_pos=m_recv_pos-m_recv_len;
- if (read_pos < 0)
- {
- read_pos += m_recv_buffer_len;
- }
- int len=m_recv_buffer_len-read_pos;
- if (len > maxlength)
- {
- len=maxlength;
- }
- memcpy(data,m_recv_buffer+read_pos,len);
- if (len < maxlength)
- {
- memcpy(data+len,m_recv_buffer,maxlength-len);
- }
-
- return maxlength;
-}
-
-int JNL_Connection::recv_bytes(char *data, int maxlength)
-{
-
- int ml=peek_bytes(data,maxlength);
- m_recv_len-=ml;
- return ml;
-}
-
-int JNL_Connection::getbfromrecv(int pos, int remove)
-{
- int read_pos=m_recv_pos-m_recv_len + pos;
- if (pos < 0 || pos > m_recv_len) return -1;
- if (read_pos < 0)
- {
- read_pos += m_recv_buffer_len;
- }
- if (read_pos >= m_recv_buffer_len)
- {
- read_pos-=m_recv_buffer_len;
- }
- if (remove) m_recv_len--;
- return m_recv_buffer[read_pos];
-}
-
-int JNL_Connection::recv_lines_available(void)
-{
- int l=recv_bytes_available();
- int lcount=0;
- int lastch=0;
- int pos;
- for (pos=0; pos < l; pos ++)
- {
- int t=getbfromrecv(pos,0);
- if (t == -1) return lcount;
- if ((t=='\r' || t=='\n') &&(
- (lastch != '\r' && lastch != '\n') || lastch==t
- )) lcount++;
- lastch=t;
- }
- return lcount;
-}
-
-int JNL_Connection::recv_line(char *line, int maxlength)
-{
- if (maxlength > m_recv_len) maxlength=m_recv_len;
- while (maxlength--)
- {
- int t=getbfromrecv(0,1);
- if (t == -1)
- {
- *line=0;
- return 0;
- }
- if (t == '\r' || t == '\n')
- {
- int r=getbfromrecv(0,0);
- if ((r == '\r' || r == '\n') && r != t) getbfromrecv(0,1);
- *line=0;
- return 0;
- }
- *line++=(char)t;
- }
- return 1;
-}
-
-unsigned long JNL_Connection::get_interface(void)
-{
- if (m_socket==-1) return 0;
- struct sockaddr_in sin;
- memset(&sin,0,sizeof(sin));
- socklen_t len=16;
- if (::getsockname(m_socket,(struct sockaddr *)&sin,&len)) return 0;
- return (unsigned long) sin.sin_addr.s_addr;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: connection.cpp - JNL TCP connection implementation
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "connection.h"
+
+
+JNL_Connection::JNL_Connection(JNL_AsyncDNS *dns, int sendbufsize, int recvbufsize)
+{
+ m_errorstr="";
+ if (dns == JNL_CONNECTION_AUTODNS)
+ {
+ m_dns=new JNL_AsyncDNS();
+ m_dns_owned=1;
+ }
+ else
+ {
+ m_dns=dns;
+ m_dns_owned=0;
+ }
+ m_recv_buffer_len=recvbufsize;
+ m_send_buffer_len=sendbufsize;
+ m_recv_buffer=(char*)malloc(m_recv_buffer_len);
+ m_send_buffer=(char*)malloc(m_send_buffer_len);
+ m_socket=-1;
+ memset(m_recv_buffer,0,recvbufsize);
+ memset(m_send_buffer,0,sendbufsize);
+ m_remote_port=0;
+ m_state=STATE_NOCONNECTION;
+ m_recv_len=m_recv_pos=0;
+ m_send_len=m_send_pos=0;
+ m_host[0]=0;
+ memset(&m_saddr,0,sizeof(m_saddr));
+}
+
+void JNL_Connection::connect(int s, struct sockaddr_in *loc)
+{
+ close(1);
+ m_socket=s;
+ m_remote_port=0;
+ m_dns=NULL;
+ if (loc) m_saddr=*loc;
+ else memset(&m_saddr,0,sizeof(m_saddr));
+ if (m_socket != -1)
+ {
+ SET_SOCK_BLOCK(m_socket,0);
+ m_state=STATE_CONNECTED;
+ }
+ else
+ {
+ m_errorstr="invalid socket passed to connect";
+ m_state=STATE_ERROR;
+ }
+}
+
+void JNL_Connection::connect(char *hostname, int port)
+{
+ close(1);
+ m_remote_port=(short)port;
+ m_socket=::socket(AF_INET,SOCK_STREAM,0);
+ if (m_socket==-1)
+ {
+ m_errorstr="creating socket";
+ m_state=STATE_ERROR;
+ }
+ else
+ {
+ SET_SOCK_BLOCK(m_socket,0);
+ strncpy(m_host,hostname,sizeof(m_host)-1);
+ m_host[sizeof(m_host)-1]=0;
+ memset(&m_saddr,0,sizeof(m_saddr));
+ if (!m_host[0])
+ {
+ m_errorstr="empty hostname";
+ m_state=STATE_ERROR;
+ }
+ else
+ {
+ m_state=STATE_RESOLVING;
+ m_saddr.sin_family=AF_INET;
+ m_saddr.sin_port=htons((unsigned short)port);
+ m_saddr.sin_addr.s_addr=inet_addr(hostname);
+ }
+ }
+}
+
+JNL_Connection::~JNL_Connection()
+{
+ if (m_socket >= 0)
+ {
+ ::shutdown(m_socket, SHUT_RDWR);
+ ::closesocket(m_socket);
+ m_socket=-1;
+ }
+ free(m_recv_buffer);
+ free(m_send_buffer);
+ if (m_dns_owned)
+ {
+ delete m_dns;
+ }
+}
+
+void JNL_Connection::run(int max_send_bytes, int max_recv_bytes, int *bytes_sent, int *bytes_rcvd)
+{
+ int bytes_allowed_to_send=(max_send_bytes<0)?m_send_buffer_len:max_send_bytes;
+ int bytes_allowed_to_recv=(max_recv_bytes<0)?m_recv_buffer_len:max_recv_bytes;
+
+ if (bytes_sent) *bytes_sent=0;
+ if (bytes_rcvd) *bytes_rcvd=0;
+
+ switch (m_state)
+ {
+ case STATE_RESOLVING:
+ if (m_saddr.sin_addr.s_addr == INADDR_NONE)
+ {
+ int a=m_dns?m_dns->resolve(m_host,(unsigned long int *)&m_saddr.sin_addr.s_addr):-1;
+ if (!a) { m_state=STATE_CONNECTING; }
+ else if (a == 1)
+ {
+ m_state=STATE_RESOLVING;
+ break;
+ }
+ else
+ {
+ m_errorstr="resolving hostname";
+ m_state=STATE_ERROR;
+ return;
+ }
+ }
+ if (!::connect(m_socket,(struct sockaddr *)&m_saddr,16))
+ {
+ m_state=STATE_CONNECTED;
+ }
+ else if (ERRNO!=EINPROGRESS)
+ {
+ m_errorstr="connecting to host";
+ m_state=STATE_ERROR;
+ }
+ else { m_state=STATE_CONNECTING; }
+ break;
+ case STATE_CONNECTING:
+ {
+ fd_set f[3];
+ FD_ZERO(&f[0]);
+ FD_ZERO(&f[1]);
+ FD_ZERO(&f[2]);
+ FD_SET(m_socket,&f[0]);
+ FD_SET(m_socket,&f[1]);
+ FD_SET(m_socket,&f[2]);
+ struct timeval tv;
+ memset(&tv,0,sizeof(tv));
+ if (select(m_socket+1,&f[0],&f[1],&f[2],&tv)==-1)
+ {
+ m_errorstr="connecting to host (calling select())";
+ m_state=STATE_ERROR;
+ }
+ else if (FD_ISSET(m_socket,&f[1]))
+ {
+ m_state=STATE_CONNECTED;
+ }
+ else if (FD_ISSET(m_socket,&f[2]))
+ {
+ m_errorstr="connecting to host";
+ m_state=STATE_ERROR;
+ }
+ }
+ break;
+ case STATE_CONNECTED:
+ case STATE_CLOSING:
+ if (m_send_len>0 && bytes_allowed_to_send>0)
+ {
+ int len=m_send_buffer_len-m_send_pos;
+ if (len > m_send_len) len=m_send_len;
+ if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
+ if (len > 0)
+ {
+ int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
+ if (res==-1 && ERRNO != EWOULDBLOCK)
+ {
+// m_state=STATE_CLOSED;
+// return;
+ }
+ if (res>0)
+ {
+ bytes_allowed_to_send-=res;
+ if (bytes_sent) *bytes_sent+=res;
+ m_send_pos+=res;
+ m_send_len-=res;
+ }
+ }
+ if (m_send_pos>=m_send_buffer_len)
+ {
+ m_send_pos=0;
+ if (m_send_len>0)
+ {
+ len=m_send_buffer_len-m_send_pos;
+ if (len > m_send_len) len=m_send_len;
+ if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
+ int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
+ if (res==-1 && ERRNO != EWOULDBLOCK)
+ {
+// m_state=STATE_CLOSED;
+ }
+ if (res>0)
+ {
+ bytes_allowed_to_send-=res;
+ if (bytes_sent) *bytes_sent+=res;
+ m_send_pos+=res;
+ m_send_len-=res;
+ }
+ }
+ }
+ }
+ if (m_recv_len<m_recv_buffer_len)
+ {
+ int len=m_recv_buffer_len-m_recv_pos;
+ if (len > m_recv_buffer_len-m_recv_len) len=m_recv_buffer_len-m_recv_len;
+ if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
+ if (len>0)
+ {
+ int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
+ if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
+ {
+ m_state=STATE_CLOSED;
+ break;
+ }
+ if (res > 0)
+ {
+ bytes_allowed_to_recv-=res;
+ if (bytes_rcvd) *bytes_rcvd+=res;
+ m_recv_pos+=res;
+ m_recv_len+=res;
+ }
+ }
+ if (m_recv_pos >= m_recv_buffer_len)
+ {
+ m_recv_pos=0;
+ if (m_recv_len < m_recv_buffer_len)
+ {
+ len=m_recv_buffer_len-m_recv_len;
+ if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
+ if (len > 0)
+ {
+ int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
+ if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
+ {
+ m_state=STATE_CLOSED;
+ break;
+ }
+ if (res > 0)
+ {
+ bytes_allowed_to_recv-=res;
+ if (bytes_rcvd) *bytes_rcvd+=res;
+ m_recv_pos+=res;
+ m_recv_len+=res;
+ }
+ }
+ }
+ }
+ }
+ if (m_state == STATE_CLOSING)
+ {
+ if (m_send_len < 1) m_state = STATE_CLOSED;
+ }
+ break;
+ default: break;
+ }
+}
+
+void JNL_Connection::close(int quick)
+{
+ if (quick || m_state == STATE_RESOLVING || m_state == STATE_CONNECTING)
+ {
+ m_state=STATE_CLOSED;
+ if (m_socket >= 0)
+ {
+ ::shutdown(m_socket, SHUT_RDWR);
+ ::closesocket(m_socket);
+ }
+ m_socket=-1;
+ memset(m_recv_buffer,0,m_recv_buffer_len);
+ memset(m_send_buffer,0,m_send_buffer_len);
+ m_remote_port=0;
+ m_recv_len=m_recv_pos=0;
+ m_send_len=m_send_pos=0;
+ m_host[0]=0;
+ memset(&m_saddr,0,sizeof(m_saddr));
+ }
+ else
+ {
+ if (m_state == STATE_CONNECTED) m_state=STATE_CLOSING;
+ }
+}
+
+int JNL_Connection::send_bytes_in_queue(void)
+{
+ return m_send_len;
+}
+
+int JNL_Connection::send_bytes_available(void)
+{
+ return m_send_buffer_len-m_send_len;
+}
+
+int JNL_Connection::send(char *data, int length)
+{
+ if (length > send_bytes_available())
+ {
+ return -1;
+ }
+
+ int write_pos=m_send_pos+m_send_len;
+ if (write_pos >= m_send_buffer_len)
+ {
+ write_pos-=m_send_buffer_len;
+ }
+
+ int len=m_send_buffer_len-write_pos;
+ if (len > length)
+ {
+ len=length;
+ }
+
+ memcpy(m_send_buffer+write_pos,data,len);
+ if (length > len)
+ {
+ memcpy(m_send_buffer,data+len,length-len);
+ }
+ m_send_len+=length;
+ return 0;
+}
+
+int JNL_Connection::send_string(char *line)
+{
+ return send(line,strlen(line));
+}
+
+int JNL_Connection::recv_bytes_available(void)
+{
+ return m_recv_len;
+}
+
+int JNL_Connection::peek_bytes(char *data, int maxlength)
+{
+ if (maxlength > m_recv_len)
+ {
+ maxlength=m_recv_len;
+ }
+ int read_pos=m_recv_pos-m_recv_len;
+ if (read_pos < 0)
+ {
+ read_pos += m_recv_buffer_len;
+ }
+ int len=m_recv_buffer_len-read_pos;
+ if (len > maxlength)
+ {
+ len=maxlength;
+ }
+ memcpy(data,m_recv_buffer+read_pos,len);
+ if (len < maxlength)
+ {
+ memcpy(data+len,m_recv_buffer,maxlength-len);
+ }
+
+ return maxlength;
+}
+
+int JNL_Connection::recv_bytes(char *data, int maxlength)
+{
+
+ int ml=peek_bytes(data,maxlength);
+ m_recv_len-=ml;
+ return ml;
+}
+
+int JNL_Connection::getbfromrecv(int pos, int remove)
+{
+ int read_pos=m_recv_pos-m_recv_len + pos;
+ if (pos < 0 || pos > m_recv_len) return -1;
+ if (read_pos < 0)
+ {
+ read_pos += m_recv_buffer_len;
+ }
+ if (read_pos >= m_recv_buffer_len)
+ {
+ read_pos-=m_recv_buffer_len;
+ }
+ if (remove) m_recv_len--;
+ return m_recv_buffer[read_pos];
+}
+
+int JNL_Connection::recv_lines_available(void)
+{
+ int l=recv_bytes_available();
+ int lcount=0;
+ int lastch=0;
+ int pos;
+ for (pos=0; pos < l; pos ++)
+ {
+ int t=getbfromrecv(pos,0);
+ if (t == -1) return lcount;
+ if ((t=='\r' || t=='\n') &&(
+ (lastch != '\r' && lastch != '\n') || lastch==t
+ )) lcount++;
+ lastch=t;
+ }
+ return lcount;
+}
+
+int JNL_Connection::recv_line(char *line, int maxlength)
+{
+ if (maxlength > m_recv_len) maxlength=m_recv_len;
+ while (maxlength--)
+ {
+ int t=getbfromrecv(0,1);
+ if (t == -1)
+ {
+ *line=0;
+ return 0;
+ }
+ if (t == '\r' || t == '\n')
+ {
+ int r=getbfromrecv(0,0);
+ if ((r == '\r' || r == '\n') && r != t) getbfromrecv(0,1);
+ *line=0;
+ return 0;
+ }
+ *line++=(char)t;
+ }
+ return 1;
+}
+
+unsigned long JNL_Connection::get_interface(void)
+{
+ if (m_socket==-1) return 0;
+ struct sockaddr_in sin;
+ memset(&sin,0,sizeof(sin));
+ socklen_t len=16;
+ if (::getsockname(m_socket,(struct sockaddr *)&sin,&len)) return 0;
+ return (unsigned long) sin.sin_addr.s_addr;
+}
diff --git a/Contrib/Makensisw/jnetlib/connection.h b/Contrib/Makensisw/jnetlib/connection.h
index c742bbf..d77e856 100755
--- a/Contrib/Makensisw/jnetlib/connection.h
+++ b/Contrib/Makensisw/jnetlib/connection.h
@@ -1,135 +1,135 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: connection.h - JNL TCP connection interface
-** License: see jnetlib.h
-**
-** Usage:
-** 1. Create a JNL_Connection object, optionally specifying a JNL_AsyncDNS
-** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
-** and the send and receive buffer sizes.
-** 2. Call connect() to have it connect to a host/port (the hostname will be
-** resolved if possible).
-** 3. call run() with the maximum send/recv amounts, and optionally parameters
-** so you can tell how much has been send/received. You want to do this a lot, while:
-** 4. check get_state() to check the state of the connection. The states are:
-** JNL_Connection::STATE_ERROR
-** - an error has occurred on the connection. the connection has closed,
-** and you can no longer write to the socket (there still might be
-** data in the receive buffer - use recv_bytes_available()).
-** JNL_Connection::STATE_NOCONNECTION
-** - no connection has been made yet. call connect() already! :)
-** JNL_Connection::STATE_RESOLVING
-** - the connection is still waiting for a JNL_AsycnDNS to resolve the
-** host.
-** JNL_Connection::STATE_CONNECTING
-** - the asynchronous call to connect() is still running.
-** JNL_Connection::STATE_CONNECTED
-** - the connection has connected, all is well.
-** JNL_Connection::STATE_CLOSING
-** - the connection is closing. This happens after a call to close,
-** without the quick parameter set. This means that the connection
-** will close once the data in the send buffer is sent (data could
-** still be being received when it would be closed). After it is
-** closed, the state will transition to:
-** JNL_Connection::STATE_CLOSED
-** - the connection has closed, generally without error. There still
-** might be data in the receieve buffer, use recv_bytes_available().
-** 5. Use send() and send_string() to send data. You can use
-** send_bytes_in_queue() to see how much has yet to go out, or
-** send_bytes_available() to see how much you can write. If you use send()
-** or send_string() and not enough room is available, both functions will
-** return error ( < 0)
-** 6. Use recv() and recv_line() to get data. If you want to see how much data
-** there is, use recv_bytes_available() and recv_lines_available(). If you
-** call recv() and not enough data is available, recv() will return how much
-** data was actually read. See comments at the function defs.
-**
-** 7. To close, call close(1) for a quick close, or close() for a close that will
-** make the socket close after sending all the data sent.
-**
-** 8. delete ye' ol' object.
-*/
-
-#ifndef _CONNECTION_H_
-#define _CONNECTION_H_
-
-#include "asyncdns.h"
-
-#define JNL_CONNECTION_AUTODNS ((JNL_AsyncDNS*)-1)
-
-class JNL_Connection
-{
- public:
- typedef enum
- {
- STATE_ERROR,
- STATE_NOCONNECTION,
- STATE_RESOLVING,
- STATE_CONNECTING,
- STATE_CONNECTED,
- STATE_CLOSING,
- STATE_CLOSED
- } state;
-
- JNL_Connection(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int sendbufsize=8192, int recvbufsize=8192);
- ~JNL_Connection();
-
- void connect(char *hostname, int port);
- void connect(int sock, struct sockaddr_in *loc=NULL); // used by the listen object, usually not needed by users.
-
- void run(int max_send_bytes=-1, int max_recv_bytes=-1, int *bytes_sent=NULL, int *bytes_rcvd=NULL);
- int get_state() { return m_state; }
- char *get_errstr() { return m_errorstr; }
-
- void close(int quick=0);
- void flush_send(void) { m_send_len=m_send_pos=0; }
-
- int send_bytes_in_queue(void);
- int send_bytes_available(void);
- int send(char *data, int length); // returns -1 if not enough room
- int send_string(char *line); // returns -1 if not enough room
-
-
- int recv_bytes_available(void);
- int recv_bytes(char *data, int maxlength); // returns actual bytes read
- unsigned int recv_int(void);
- int recv_lines_available(void);
- int recv_line(char *line, int maxlength); // returns 0 if the line was terminated with a \r or \n, 1 if not.
- // (i.e. if you specify maxlength=10, and the line is 12 bytes long
- // it will return 1. or if there is no \r or \n and that's all the data
- // the connection has.)
- int peek_bytes(char *data, int maxlength); // returns bytes peeked
-
- unsigned long get_interface(void); // this returns the interface the connection is on
- unsigned long get_remote(void) { return m_saddr.sin_addr.s_addr; } // remote host ip.
- short get_remote_port(void) { return m_remote_port; } // this returns the remote port of connection
-
- protected:
- int m_socket;
- short m_remote_port;
- char *m_recv_buffer;
- char *m_send_buffer;
- int m_recv_buffer_len;
- int m_send_buffer_len;
-
- int m_recv_pos;
- int m_recv_len;
- int m_send_pos;
- int m_send_len;
-
- struct sockaddr_in m_saddr;
- char m_host[256];
-
- JNL_AsyncDNS *m_dns;
- int m_dns_owned;
-
- state m_state;
- char *m_errorstr;
-
- int getbfromrecv(int pos, int remove); // used by recv_line*
-
-};
-
-#endif // _Connection_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: connection.h - JNL TCP connection interface
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create a JNL_Connection object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the send and receive buffer sizes.
+** 2. Call connect() to have it connect to a host/port (the hostname will be
+** resolved if possible).
+** 3. call run() with the maximum send/recv amounts, and optionally parameters
+** so you can tell how much has been send/received. You want to do this a lot, while:
+** 4. check get_state() to check the state of the connection. The states are:
+** JNL_Connection::STATE_ERROR
+** - an error has occurred on the connection. the connection has closed,
+** and you can no longer write to the socket (there still might be
+** data in the receive buffer - use recv_bytes_available()).
+** JNL_Connection::STATE_NOCONNECTION
+** - no connection has been made yet. call connect() already! :)
+** JNL_Connection::STATE_RESOLVING
+** - the connection is still waiting for a JNL_AsycnDNS to resolve the
+** host.
+** JNL_Connection::STATE_CONNECTING
+** - the asynchronous call to connect() is still running.
+** JNL_Connection::STATE_CONNECTED
+** - the connection has connected, all is well.
+** JNL_Connection::STATE_CLOSING
+** - the connection is closing. This happens after a call to close,
+** without the quick parameter set. This means that the connection
+** will close once the data in the send buffer is sent (data could
+** still be being received when it would be closed). After it is
+** closed, the state will transition to:
+** JNL_Connection::STATE_CLOSED
+** - the connection has closed, generally without error. There still
+** might be data in the receieve buffer, use recv_bytes_available().
+** 5. Use send() and send_string() to send data. You can use
+** send_bytes_in_queue() to see how much has yet to go out, or
+** send_bytes_available() to see how much you can write. If you use send()
+** or send_string() and not enough room is available, both functions will
+** return error ( < 0)
+** 6. Use recv() and recv_line() to get data. If you want to see how much data
+** there is, use recv_bytes_available() and recv_lines_available(). If you
+** call recv() and not enough data is available, recv() will return how much
+** data was actually read. See comments at the function defs.
+**
+** 7. To close, call close(1) for a quick close, or close() for a close that will
+** make the socket close after sending all the data sent.
+**
+** 8. delete ye' ol' object.
+*/
+
+#ifndef _CONNECTION_H_
+#define _CONNECTION_H_
+
+#include "asyncdns.h"
+
+#define JNL_CONNECTION_AUTODNS ((JNL_AsyncDNS*)-1)
+
+class JNL_Connection
+{
+ public:
+ typedef enum
+ {
+ STATE_ERROR,
+ STATE_NOCONNECTION,
+ STATE_RESOLVING,
+ STATE_CONNECTING,
+ STATE_CONNECTED,
+ STATE_CLOSING,
+ STATE_CLOSED
+ } state;
+
+ JNL_Connection(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int sendbufsize=8192, int recvbufsize=8192);
+ ~JNL_Connection();
+
+ void connect(char *hostname, int port);
+ void connect(int sock, struct sockaddr_in *loc=NULL); // used by the listen object, usually not needed by users.
+
+ void run(int max_send_bytes=-1, int max_recv_bytes=-1, int *bytes_sent=NULL, int *bytes_rcvd=NULL);
+ int get_state() { return m_state; }
+ char *get_errstr() { return m_errorstr; }
+
+ void close(int quick=0);
+ void flush_send(void) { m_send_len=m_send_pos=0; }
+
+ int send_bytes_in_queue(void);
+ int send_bytes_available(void);
+ int send(char *data, int length); // returns -1 if not enough room
+ int send_string(char *line); // returns -1 if not enough room
+
+
+ int recv_bytes_available(void);
+ int recv_bytes(char *data, int maxlength); // returns actual bytes read
+ unsigned int recv_int(void);
+ int recv_lines_available(void);
+ int recv_line(char *line, int maxlength); // returns 0 if the line was terminated with a \r or \n, 1 if not.
+ // (i.e. if you specify maxlength=10, and the line is 12 bytes long
+ // it will return 1. or if there is no \r or \n and that's all the data
+ // the connection has.)
+ int peek_bytes(char *data, int maxlength); // returns bytes peeked
+
+ unsigned long get_interface(void); // this returns the interface the connection is on
+ unsigned long get_remote(void) { return m_saddr.sin_addr.s_addr; } // remote host ip.
+ short get_remote_port(void) { return m_remote_port; } // this returns the remote port of connection
+
+ protected:
+ int m_socket;
+ short m_remote_port;
+ char *m_recv_buffer;
+ char *m_send_buffer;
+ int m_recv_buffer_len;
+ int m_send_buffer_len;
+
+ int m_recv_pos;
+ int m_recv_len;
+ int m_send_pos;
+ int m_send_len;
+
+ struct sockaddr_in m_saddr;
+ char m_host[256];
+
+ JNL_AsyncDNS *m_dns;
+ int m_dns_owned;
+
+ state m_state;
+ char *m_errorstr;
+
+ int getbfromrecv(int pos, int remove); // used by recv_line*
+
+};
+
+#endif // _Connection_H_
diff --git a/Contrib/Makensisw/jnetlib/httpget.cpp b/Contrib/Makensisw/jnetlib/httpget.cpp
index d7596ec..a23202c 100755
--- a/Contrib/Makensisw/jnetlib/httpget.cpp
+++ b/Contrib/Makensisw/jnetlib/httpget.cpp
@@ -1,474 +1,474 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: httpget.cpp - JNL HTTP GET implementation
-** License: see jnetlib.h
-*/
-
-#include "netinc.h"
-#include "util.h"
-#include "httpget.h"
-
-void *operator new( unsigned int num_bytes ){return GlobalAlloc(GPTR,num_bytes);}
-void operator delete( void *p ) { if (p) GlobalFree(p); }
-
-JNL_HTTPGet::JNL_HTTPGet(JNL_AsyncDNS *dns, int recvbufsize, char *proxy)
-{
- m_recvbufsize=recvbufsize;
- m_dns=dns;
- m_con=NULL;
- m_http_proxylpinfo=0;
- m_http_proxyhost=0;
- m_http_proxyport=0;
- if (proxy && *proxy)
- {
- char *p=(char*)malloc(strlen(proxy)+1);
- if (p)
- {
- char *r=NULL;
- strcpy(p,proxy);
- do_parse_url(p,&m_http_proxyhost,&m_http_proxyport,&r,&m_http_proxylpinfo);
- free(r);
- free(p);
- }
- }
- m_sendheaders=NULL;
- reinit();
-}
-
-void JNL_HTTPGet::reinit()
-{
- m_errstr=0;
- m_recvheaders=NULL;
- m_recvheaders_size=0;
- m_http_state=0;
- m_http_port=0;
- m_http_url=0;
- m_reply=0;
- m_http_host=m_http_lpinfo=m_http_request=NULL;
-}
-
-void JNL_HTTPGet::deinit()
-{
- delete m_con;
- free(m_recvheaders);
-
- free(m_http_url);
- free(m_http_host);
- free(m_http_lpinfo);
- free(m_http_request);
- free(m_errstr);
- free(m_reply);
- reinit();
-}
-
-JNL_HTTPGet::~JNL_HTTPGet()
-{
- deinit();
- free(m_sendheaders);
- free(m_http_proxylpinfo);
- free(m_http_proxyhost);
-
-}
-
-
-void JNL_HTTPGet::addheader(char *header)
-{
- //if (strstr(header,"\r") || strstr(header,"\n")) return;
- if (!m_sendheaders)
- {
- m_sendheaders=(char*)malloc(strlen(header)+3);
- if (m_sendheaders)
- {
- strcpy(m_sendheaders,header);
- strcat(m_sendheaders,"\r\n");
- }
- }
- else
- {
- char *t=(char*)malloc(strlen(header)+strlen(m_sendheaders)+1+2);
- if (t)
- {
- strcpy(t,m_sendheaders);
- strcat(t,header);
- strcat(t,"\r\n");
- free(m_sendheaders);
- m_sendheaders=t;
- }
- }
-}
-
-void JNL_HTTPGet::do_encode_mimestr(char *in, char *out)
-{
- char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- int shift = 0;
- int accum = 0;
-
- while (*in)
- {
- if (*in)
- {
- accum <<= 8;
- shift += 8;
- accum |= *in++;
- }
- while ( shift >= 6 )
- {
- shift -= 6;
- *out++ = alphabet[(accum >> shift) & 0x3F];
- }
- }
- if (shift == 4)
- {
- *out++ = alphabet[(accum & 0xF)<<2];
- *out++='=';
- }
- else if (shift == 2)
- {
- *out++ = alphabet[(accum & 0x3)<<4];
- *out++='=';
- *out++='=';
- }
-
- *out++=0;
-}
-
-
-void JNL_HTTPGet::connect(char *url)
-{
- deinit();
- m_http_url=(char*)malloc(strlen(url)+1);
- strcpy(m_http_url,url);
- do_parse_url(m_http_url,&m_http_host,&m_http_port,&m_http_request, &m_http_lpinfo);
- strcpy(m_http_url,url);
- if (!m_http_host || !m_http_host[0] || !m_http_port)
- {
- m_http_state=-1;
- seterrstr("invalid URL");
- return;
- }
-
- int sendbufferlen=0;
-
- if (!m_http_proxyhost || !m_http_proxyhost[0])
- {
- sendbufferlen += 4 /* GET */ + strlen(m_http_request) + 9 /* HTTP/1.0 */ + 2;
- }
- else
- {
- sendbufferlen += 4 /* GET */ + strlen(m_http_url) + 9 /* HTTP/1.0 */ + 2;
- if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
- {
- sendbufferlen+=58+strlen(m_http_proxylpinfo)*2; // being safe here
- }
- }
- sendbufferlen += 5 /* Host: */ + strlen(m_http_host) + 2;
-
- if (m_http_lpinfo&&m_http_lpinfo[0])
- {
- sendbufferlen+=46+strlen(m_http_lpinfo)*2; // being safe here
- }
-
- if (m_sendheaders) sendbufferlen+=strlen(m_sendheaders);
-
- char *str=(char*)malloc(sendbufferlen+1024);
- if (!str)
- {
- seterrstr("error allocating memory");
- m_http_state=-1;
- }
-
- if (!m_http_proxyhost || !m_http_proxyhost[0])
- {
- wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_request);
- }
- else
- {
- wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_url);
- }
-
- wsprintf(str+strlen(str),"Host: %s\r\n",m_http_host);
-
- if (m_http_lpinfo&&m_http_lpinfo[0])
- {
- strcat(str,"Authorization: Basic ");
- do_encode_mimestr(m_http_lpinfo,str+strlen(str));
- strcat(str,"\r\n");
- }
- if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
- {
- strcat(str,"Proxy-Authorization: Basic ");
- do_encode_mimestr(m_http_proxylpinfo,str+strlen(str));
- strcat(str,"\r\n");
- }
-
- if (m_sendheaders) strcat(str,m_sendheaders);
- strcat(str,"\r\n");
-
- int a=m_recvbufsize;
- if (a < 4096) a=4096;
- m_con=new JNL_Connection(m_dns,strlen(str)+4,a);
- if (m_con)
- {
- if (!m_http_proxyhost || !m_http_proxyhost[0])
- {
- m_con->connect(m_http_host,m_http_port);
- }
- else
- {
- m_con->connect(m_http_proxyhost,m_http_proxyport);
- }
- m_con->send_string(str);
- }
- else
- {
- m_http_state=-1;
- seterrstr("could not create connection object");
- }
- free(str);
-
-}
-
-static int my_strnicmp(char *b1, char *b2, int l)
-{
- while (l-- && *b1 && *b2)
- {
- char bb1=*b1++;
- char bb2=*b2++;
- if (bb1>='a' && bb1 <= 'z') bb1+='A'-'a';
- if (bb2>='a' && bb2 <= 'z') bb2+='A'-'a';
- if (bb1 != bb2) return bb1-bb2;
- }
- return 0;
-}
-
-char *_strstr(char *i, char *s)
-{
- if (strlen(i)>=strlen(s)) while (i[strlen(s)-1])
- {
- int l=strlen(s)+1;
- char *ii=i;
- char *is=s;
- while (--l>0)
- {
- if (*ii != *is) break;
- ii++;
- is++;
- }
- if (l==0) return i;
- i++;
- }
- return NULL;
-}
-
-#define strstr _strstr
-
-void JNL_HTTPGet::do_parse_url(char *url, char **host, int *port, char **req, char **lp)
-{
- char *p,*np;
- free(*host); *host=0;
- free(*req); *req=0;
- free(*lp); *lp=0;
-
- if (strstr(url,"://")) np=p=strstr(url,"://")+3;
- else np=p=url;
- while (*np != '/' && *np) np++;
- if (*np)
- {
- *req=(char*)malloc(strlen(np)+1);
- if (*req) strcpy(*req,np);
- *np++=0;
- }
- else
- {
- *req=(char*)malloc(2);
- if (*req) strcpy(*req,"/");
- }
-
- np=p;
- while (*np != '@' && *np) np++;
- if (*np)
- {
- *np++=0;
- *lp=(char*)malloc(strlen(p)+1);
- if (*lp) strcpy(*lp,p);
- p=np;
- }
- else
- {
- *lp=(char*)malloc(1);
- if (*lp) strcpy(*lp,"");
- }
- np=p;
- while (*np != ':' && *np) np++;
- if (*np)
- {
- *np++=0;
- *port=my_atoi(np);
- } else *port=80;
- *host=(char*)malloc(strlen(p)+1);
- if (*host) strcpy(*host,p);
-}
-
-
-char *JNL_HTTPGet::getallheaders()
-{ // double null terminated, null delimited list
- if (m_recvheaders) return m_recvheaders;
- else return "\0\0";
-}
-
-char *JNL_HTTPGet::getheader(char *headername)
-{
- char *ret=NULL;
- if (strlen(headername)<1||!m_recvheaders) return NULL;
- char *p=m_recvheaders;
- while (*p)
- {
- if (!my_strnicmp(headername,p,strlen(headername)))
- {
- ret=p+strlen(headername);
- while (*ret == ' ') ret++;
- break;
- }
- p+=strlen(p)+1;
- }
- return ret;
-}
-
-int JNL_HTTPGet::run()
-{
- int cnt=0;
- if (m_http_state==-1||!m_con) return -1; // error
-
-
-run_again:
- static char main_buf[4096];
- char *buf = main_buf;
- m_con->run();
-
- if (m_con->get_state()==JNL_Connection::STATE_ERROR)
- {
- seterrstr(m_con->get_errstr());
- return -1;
- }
- if (m_con->get_state()==JNL_Connection::STATE_CLOSED) return 1;
-
- if (m_http_state==0) // connected, waiting for reply
- {
- if (m_con->recv_lines_available()>0)
- {
- m_con->recv_line(buf,4095);
- buf[4095]=0;
- m_reply=(char*)malloc(strlen(buf)+1);
- strcpy(m_reply,buf);
-
- if (strstr(buf,"200")) m_http_state=2; // proceed to read headers normally
- else if (strstr(buf,"301") || strstr(buf,"302"))
- {
- m_http_state=1; // redirect city
- }
- else
- {
- seterrstr(buf);
- m_http_state=-1;
- return -1;
- }
- cnt=0;
- }
- else if (!cnt++) goto run_again;
- }
- if (m_http_state == 1) // redirect
- {
- while (m_con->recv_lines_available() > 0)
- {
- m_con->recv_line(buf,4096);
- if (!buf[0])
- {
- m_http_state=-1;
- return -1;
- }
- if (!my_strnicmp(buf,"Location:",9))
- {
- char *p=buf+9; while (*p== ' ') p++;
- if (*p)
- {
- connect(p);
- return 0;
- }
- }
- }
- }
- if (m_http_state==2)
- {
- if (!cnt++ && m_con->recv_lines_available() < 1) goto run_again;
- while (m_con->recv_lines_available() > 0)
- {
- m_con->recv_line(buf,4096);
- if (!buf[0]) { m_http_state=3; break; }
- if (!m_recvheaders)
- {
- m_recvheaders_size=strlen(buf)+1;
- m_recvheaders=(char*)malloc(m_recvheaders_size+1);
- if (m_recvheaders)
- {
- strcpy(m_recvheaders,buf);
- m_recvheaders[m_recvheaders_size]=0;
- }
- }
- else
- {
- int oldsize=m_recvheaders_size;
- m_recvheaders_size+=strlen(buf)+1;
- char *n=(char*)malloc(m_recvheaders_size+1);
- if (n)
- {
- memcpy(n,m_recvheaders,oldsize);
- strcpy(n+oldsize,buf);
- n[m_recvheaders_size]=0;
- free(m_recvheaders);
- m_recvheaders=n;
- }
- }
- }
- }
- if (m_http_state==3)
- {
- }
- return 0;
-}
-
-int JNL_HTTPGet::get_status() // returns 0 if connecting, 1 if reading headers,
- // 2 if reading content, -1 if error.
-{
- if (m_http_state < 0) return -1;
- if (m_http_state < 2) return 0;
- if (m_http_state == 2) return 1;
- if (m_http_state == 3) return 2;
- return -1;
-}
-
-int JNL_HTTPGet::getreplycode()// returns 0 if none yet, otherwise returns http reply code.
-{
- if (!m_reply) return 0;
- char *p=m_reply;
- while (*p && *p != ' ') p++; // skip over HTTP/x.x
- if (!*p) return 0;
- return my_atoi(++p);
-}
-
-int JNL_HTTPGet::bytes_available()
-{
- if (m_con && m_http_state==3) return m_con->recv_bytes_available();
- return 0;
-}
-int JNL_HTTPGet::get_bytes(char *buf, int len)
-{
- if (m_con && m_http_state==3) return m_con->recv_bytes(buf,len);
- return 0;
-}
-int JNL_HTTPGet::peek_bytes(char *buf, int len)
-{
- if (m_con && m_http_state==3) return m_con->peek_bytes(buf,len);
- return 0;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: httpget.cpp - JNL HTTP GET implementation
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "httpget.h"
+
+void *operator new( unsigned int num_bytes ){return GlobalAlloc(GPTR,num_bytes);}
+void operator delete( void *p ) { if (p) GlobalFree(p); }
+
+JNL_HTTPGet::JNL_HTTPGet(JNL_AsyncDNS *dns, int recvbufsize, char *proxy)
+{
+ m_recvbufsize=recvbufsize;
+ m_dns=dns;
+ m_con=NULL;
+ m_http_proxylpinfo=0;
+ m_http_proxyhost=0;
+ m_http_proxyport=0;
+ if (proxy && *proxy)
+ {
+ char *p=(char*)malloc(strlen(proxy)+1);
+ if (p)
+ {
+ char *r=NULL;
+ strcpy(p,proxy);
+ do_parse_url(p,&m_http_proxyhost,&m_http_proxyport,&r,&m_http_proxylpinfo);
+ free(r);
+ free(p);
+ }
+ }
+ m_sendheaders=NULL;
+ reinit();
+}
+
+void JNL_HTTPGet::reinit()
+{
+ m_errstr=0;
+ m_recvheaders=NULL;
+ m_recvheaders_size=0;
+ m_http_state=0;
+ m_http_port=0;
+ m_http_url=0;
+ m_reply=0;
+ m_http_host=m_http_lpinfo=m_http_request=NULL;
+}
+
+void JNL_HTTPGet::deinit()
+{
+ delete m_con;
+ free(m_recvheaders);
+
+ free(m_http_url);
+ free(m_http_host);
+ free(m_http_lpinfo);
+ free(m_http_request);
+ free(m_errstr);
+ free(m_reply);
+ reinit();
+}
+
+JNL_HTTPGet::~JNL_HTTPGet()
+{
+ deinit();
+ free(m_sendheaders);
+ free(m_http_proxylpinfo);
+ free(m_http_proxyhost);
+
+}
+
+
+void JNL_HTTPGet::addheader(char *header)
+{
+ //if (strstr(header,"\r") || strstr(header,"\n")) return;
+ if (!m_sendheaders)
+ {
+ m_sendheaders=(char*)malloc(strlen(header)+3);
+ if (m_sendheaders)
+ {
+ strcpy(m_sendheaders,header);
+ strcat(m_sendheaders,"\r\n");
+ }
+ }
+ else
+ {
+ char *t=(char*)malloc(strlen(header)+strlen(m_sendheaders)+1+2);
+ if (t)
+ {
+ strcpy(t,m_sendheaders);
+ strcat(t,header);
+ strcat(t,"\r\n");
+ free(m_sendheaders);
+ m_sendheaders=t;
+ }
+ }
+}
+
+void JNL_HTTPGet::do_encode_mimestr(char *in, char *out)
+{
+ char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ int shift = 0;
+ int accum = 0;
+
+ while (*in)
+ {
+ if (*in)
+ {
+ accum <<= 8;
+ shift += 8;
+ accum |= *in++;
+ }
+ while ( shift >= 6 )
+ {
+ shift -= 6;
+ *out++ = alphabet[(accum >> shift) & 0x3F];
+ }
+ }
+ if (shift == 4)
+ {
+ *out++ = alphabet[(accum & 0xF)<<2];
+ *out++='=';
+ }
+ else if (shift == 2)
+ {
+ *out++ = alphabet[(accum & 0x3)<<4];
+ *out++='=';
+ *out++='=';
+ }
+
+ *out++=0;
+}
+
+
+void JNL_HTTPGet::connect(char *url)
+{
+ deinit();
+ m_http_url=(char*)malloc(strlen(url)+1);
+ strcpy(m_http_url,url);
+ do_parse_url(m_http_url,&m_http_host,&m_http_port,&m_http_request, &m_http_lpinfo);
+ strcpy(m_http_url,url);
+ if (!m_http_host || !m_http_host[0] || !m_http_port)
+ {
+ m_http_state=-1;
+ seterrstr("invalid URL");
+ return;
+ }
+
+ int sendbufferlen=0;
+
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ sendbufferlen += 4 /* GET */ + strlen(m_http_request) + 9 /* HTTP/1.0 */ + 2;
+ }
+ else
+ {
+ sendbufferlen += 4 /* GET */ + strlen(m_http_url) + 9 /* HTTP/1.0 */ + 2;
+ if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
+ {
+ sendbufferlen+=58+strlen(m_http_proxylpinfo)*2; // being safe here
+ }
+ }
+ sendbufferlen += 5 /* Host: */ + strlen(m_http_host) + 2;
+
+ if (m_http_lpinfo&&m_http_lpinfo[0])
+ {
+ sendbufferlen+=46+strlen(m_http_lpinfo)*2; // being safe here
+ }
+
+ if (m_sendheaders) sendbufferlen+=strlen(m_sendheaders);
+
+ char *str=(char*)malloc(sendbufferlen+1024);
+ if (!str)
+ {
+ seterrstr("error allocating memory");
+ m_http_state=-1;
+ }
+
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_request);
+ }
+ else
+ {
+ wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_url);
+ }
+
+ wsprintf(str+strlen(str),"Host: %s\r\n",m_http_host);
+
+ if (m_http_lpinfo&&m_http_lpinfo[0])
+ {
+ strcat(str,"Authorization: Basic ");
+ do_encode_mimestr(m_http_lpinfo,str+strlen(str));
+ strcat(str,"\r\n");
+ }
+ if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
+ {
+ strcat(str,"Proxy-Authorization: Basic ");
+ do_encode_mimestr(m_http_proxylpinfo,str+strlen(str));
+ strcat(str,"\r\n");
+ }
+
+ if (m_sendheaders) strcat(str,m_sendheaders);
+ strcat(str,"\r\n");
+
+ int a=m_recvbufsize;
+ if (a < 4096) a=4096;
+ m_con=new JNL_Connection(m_dns,strlen(str)+4,a);
+ if (m_con)
+ {
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ m_con->connect(m_http_host,m_http_port);
+ }
+ else
+ {
+ m_con->connect(m_http_proxyhost,m_http_proxyport);
+ }
+ m_con->send_string(str);
+ }
+ else
+ {
+ m_http_state=-1;
+ seterrstr("could not create connection object");
+ }
+ free(str);
+
+}
+
+static int my_strnicmp(char *b1, char *b2, int l)
+{
+ while (l-- && *b1 && *b2)
+ {
+ char bb1=*b1++;
+ char bb2=*b2++;
+ if (bb1>='a' && bb1 <= 'z') bb1+='A'-'a';
+ if (bb2>='a' && bb2 <= 'z') bb2+='A'-'a';
+ if (bb1 != bb2) return bb1-bb2;
+ }
+ return 0;
+}
+
+char *_strstr(char *i, char *s)
+{
+ if (strlen(i)>=strlen(s)) while (i[strlen(s)-1])
+ {
+ int l=strlen(s)+1;
+ char *ii=i;
+ char *is=s;
+ while (--l>0)
+ {
+ if (*ii != *is) break;
+ ii++;
+ is++;
+ }
+ if (l==0) return i;
+ i++;
+ }
+ return NULL;
+}
+
+#define strstr _strstr
+
+void JNL_HTTPGet::do_parse_url(char *url, char **host, int *port, char **req, char **lp)
+{
+ char *p,*np;
+ free(*host); *host=0;
+ free(*req); *req=0;
+ free(*lp); *lp=0;
+
+ if (strstr(url,"://")) np=p=strstr(url,"://")+3;
+ else np=p=url;
+ while (*np != '/' && *np) np++;
+ if (*np)
+ {
+ *req=(char*)malloc(strlen(np)+1);
+ if (*req) strcpy(*req,np);
+ *np++=0;
+ }
+ else
+ {
+ *req=(char*)malloc(2);
+ if (*req) strcpy(*req,"/");
+ }
+
+ np=p;
+ while (*np != '@' && *np) np++;
+ if (*np)
+ {
+ *np++=0;
+ *lp=(char*)malloc(strlen(p)+1);
+ if (*lp) strcpy(*lp,p);
+ p=np;
+ }
+ else
+ {
+ *lp=(char*)malloc(1);
+ if (*lp) strcpy(*lp,"");
+ }
+ np=p;
+ while (*np != ':' && *np) np++;
+ if (*np)
+ {
+ *np++=0;
+ *port=my_atoi(np);
+ } else *port=80;
+ *host=(char*)malloc(strlen(p)+1);
+ if (*host) strcpy(*host,p);
+}
+
+
+char *JNL_HTTPGet::getallheaders()
+{ // double null terminated, null delimited list
+ if (m_recvheaders) return m_recvheaders;
+ else return "\0\0";
+}
+
+char *JNL_HTTPGet::getheader(char *headername)
+{
+ char *ret=NULL;
+ if (strlen(headername)<1||!m_recvheaders) return NULL;
+ char *p=m_recvheaders;
+ while (*p)
+ {
+ if (!my_strnicmp(headername,p,strlen(headername)))
+ {
+ ret=p+strlen(headername);
+ while (*ret == ' ') ret++;
+ break;
+ }
+ p+=strlen(p)+1;
+ }
+ return ret;
+}
+
+int JNL_HTTPGet::run()
+{
+ int cnt=0;
+ if (m_http_state==-1||!m_con) return -1; // error
+
+
+run_again:
+ static char main_buf[4096];
+ char *buf = main_buf;
+ m_con->run();
+
+ if (m_con->get_state()==JNL_Connection::STATE_ERROR)
+ {
+ seterrstr(m_con->get_errstr());
+ return -1;
+ }
+ if (m_con->get_state()==JNL_Connection::STATE_CLOSED) return 1;
+
+ if (m_http_state==0) // connected, waiting for reply
+ {
+ if (m_con->recv_lines_available()>0)
+ {
+ m_con->recv_line(buf,4095);
+ buf[4095]=0;
+ m_reply=(char*)malloc(strlen(buf)+1);
+ strcpy(m_reply,buf);
+
+ if (strstr(buf,"200")) m_http_state=2; // proceed to read headers normally
+ else if (strstr(buf,"301") || strstr(buf,"302"))
+ {
+ m_http_state=1; // redirect city
+ }
+ else
+ {
+ seterrstr(buf);
+ m_http_state=-1;
+ return -1;
+ }
+ cnt=0;
+ }
+ else if (!cnt++) goto run_again;
+ }
+ if (m_http_state == 1) // redirect
+ {
+ while (m_con->recv_lines_available() > 0)
+ {
+ m_con->recv_line(buf,4096);
+ if (!buf[0])
+ {
+ m_http_state=-1;
+ return -1;
+ }
+ if (!my_strnicmp(buf,"Location:",9))
+ {
+ char *p=buf+9; while (*p== ' ') p++;
+ if (*p)
+ {
+ connect(p);
+ return 0;
+ }
+ }
+ }
+ }
+ if (m_http_state==2)
+ {
+ if (!cnt++ && m_con->recv_lines_available() < 1) goto run_again;
+ while (m_con->recv_lines_available() > 0)
+ {
+ m_con->recv_line(buf,4096);
+ if (!buf[0]) { m_http_state=3; break; }
+ if (!m_recvheaders)
+ {
+ m_recvheaders_size=strlen(buf)+1;
+ m_recvheaders=(char*)malloc(m_recvheaders_size+1);
+ if (m_recvheaders)
+ {
+ strcpy(m_recvheaders,buf);
+ m_recvheaders[m_recvheaders_size]=0;
+ }
+ }
+ else
+ {
+ int oldsize=m_recvheaders_size;
+ m_recvheaders_size+=strlen(buf)+1;
+ char *n=(char*)malloc(m_recvheaders_size+1);
+ if (n)
+ {
+ memcpy(n,m_recvheaders,oldsize);
+ strcpy(n+oldsize,buf);
+ n[m_recvheaders_size]=0;
+ free(m_recvheaders);
+ m_recvheaders=n;
+ }
+ }
+ }
+ }
+ if (m_http_state==3)
+ {
+ }
+ return 0;
+}
+
+int JNL_HTTPGet::get_status() // returns 0 if connecting, 1 if reading headers,
+ // 2 if reading content, -1 if error.
+{
+ if (m_http_state < 0) return -1;
+ if (m_http_state < 2) return 0;
+ if (m_http_state == 2) return 1;
+ if (m_http_state == 3) return 2;
+ return -1;
+}
+
+int JNL_HTTPGet::getreplycode()// returns 0 if none yet, otherwise returns http reply code.
+{
+ if (!m_reply) return 0;
+ char *p=m_reply;
+ while (*p && *p != ' ') p++; // skip over HTTP/x.x
+ if (!*p) return 0;
+ return my_atoi(++p);
+}
+
+int JNL_HTTPGet::bytes_available()
+{
+ if (m_con && m_http_state==3) return m_con->recv_bytes_available();
+ return 0;
+}
+int JNL_HTTPGet::get_bytes(char *buf, int len)
+{
+ if (m_con && m_http_state==3) return m_con->recv_bytes(buf,len);
+ return 0;
+}
+int JNL_HTTPGet::peek_bytes(char *buf, int len)
+{
+ if (m_con && m_http_state==3) return m_con->peek_bytes(buf,len);
+ return 0;
+}
diff --git a/Contrib/Makensisw/jnetlib/httpget.h b/Contrib/Makensisw/jnetlib/httpget.h
index ba9938f..ba0790f 100755
--- a/Contrib/Makensisw/jnetlib/httpget.h
+++ b/Contrib/Makensisw/jnetlib/httpget.h
@@ -1,110 +1,110 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: httpget.h - JNL interface for doing HTTP GETs.
-** License: see jnetlib.h
-**
-** Usage:
-** 1. Create a JNL_HTTPGet object, optionally specifying a JNL_AsyncDNS
-** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
-** and the receive buffer size, and a string specifying proxy (or NULL
-** for none). See note on proxy string below.
-** 2. call addheader() to add whatever headers you want. It is recommended to
-** add at least the following two:
-** addheader("User-Agent:MyApp (Mozilla)");
-*/// addheader("Accept:*/*");
-/* ( the comment weirdness is there so I Can do the star-slash :)
-** 3. Call connect() with the URL you wish to GET (see URL string note below)
-** 4. Call run() once in a while, checking to see if it returns -1
-** (if it does return -1, call geterrorstr() to see what the error is).
-** (if it returns 1, no big deal, the connection has closed).
-** 5. While you're at it, you can call bytes_available() to see if any data
-** from the http stream is available, or getheader() to see if any headers
-** are available, or getreply() to see the HTTP reply, or getallheaders()
-** to get a double null terminated, null delimited list of headers returned.
-** 6. If you want to read from the stream, call get_bytes (which returns how much
-** was actually read).
-** 7. content_length() is a helper function that uses getheader() to check the
-** content-length header.
-** 8. Delete ye' ol' object when done.
-**
-** Proxy String:
-** should be in the format of host:port, or user@host:port, or
-** user:password@host:port. if port is not specified, 80 is assumed.
-** URL String:
-** should be in the format of http://user:pass@host:port/requestwhatever
-** note that user, pass, port, and /requestwhatever are all optional :)
-** note that also, http:// is really not important. if you do poo://
-** or even leave out the http:// altogether, it will still work.
-*/
-
-#ifndef _HTTPGET_H_
-#define _HTTPGET_H_
-
-#include "connection.h"
-#include "util.h"
-
-class JNL_HTTPGet
-{
- public:
- JNL_HTTPGet(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int recvbufsize=16384, char *proxy=NULL);
- ~JNL_HTTPGet();
-
- void addheader(char *header);
-
- void connect(char *url);
-
- int run(); // returns: 0 if all is OK. -1 if error (call geterrorstr()). 1 if connection closed.
-
- int get_status(); // returns 0 if connecting, 1 if reading headers,
- // 2 if reading content, -1 if error.
-
- char *getallheaders(); // double null terminated, null delimited list
- char *getheader(char *headername);
- char *getreply() { return m_reply; }
- int getreplycode(); // returns 0 if none yet, otherwise returns http reply code.
-
- char *geterrorstr() { return m_errstr;}
-
- int bytes_available();
- int get_bytes(char *buf, int len);
- int peek_bytes(char *buf, int len);
-
- int content_length() { char *p=getheader("content-length:"); if (p) return my_atoi(p); return 0; }
-
- JNL_Connection *get_con() { return m_con; }
-
- public:
- void reinit();
- void deinit();
- void seterrstr(char *str) { if (m_errstr) free(m_errstr); m_errstr=(char*)malloc(strlen(str)+1); strcpy(m_errstr,str); }
-
- void do_parse_url(char *url, char **host, int *port, char **req, char **lp);
- void do_encode_mimestr(char *in, char *out);
-
- JNL_AsyncDNS *m_dns;
- JNL_Connection *m_con;
- int m_recvbufsize;
-
- int m_http_state;
-
- int m_http_port;
- char *m_http_url;
- char *m_http_host;
- char *m_http_lpinfo;
- char *m_http_request;
-
- char *m_http_proxylpinfo;
- char *m_http_proxyhost;
- int m_http_proxyport;
-
- char *m_sendheaders;
- char *m_recvheaders;
- int m_recvheaders_size;
- char *m_reply;
-
- char *m_errstr;
-};
-
-#endif // _HTTPGET_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: httpget.h - JNL interface for doing HTTP GETs.
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create a JNL_HTTPGet object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the receive buffer size, and a string specifying proxy (or NULL
+** for none). See note on proxy string below.
+** 2. call addheader() to add whatever headers you want. It is recommended to
+** add at least the following two:
+** addheader("User-Agent:MyApp (Mozilla)");
+*/// addheader("Accept:*/*");
+/* ( the comment weirdness is there so I Can do the star-slash :)
+** 3. Call connect() with the URL you wish to GET (see URL string note below)
+** 4. Call run() once in a while, checking to see if it returns -1
+** (if it does return -1, call geterrorstr() to see what the error is).
+** (if it returns 1, no big deal, the connection has closed).
+** 5. While you're at it, you can call bytes_available() to see if any data
+** from the http stream is available, or getheader() to see if any headers
+** are available, or getreply() to see the HTTP reply, or getallheaders()
+** to get a double null terminated, null delimited list of headers returned.
+** 6. If you want to read from the stream, call get_bytes (which returns how much
+** was actually read).
+** 7. content_length() is a helper function that uses getheader() to check the
+** content-length header.
+** 8. Delete ye' ol' object when done.
+**
+** Proxy String:
+** should be in the format of host:port, or user@host:port, or
+** user:password@host:port. if port is not specified, 80 is assumed.
+** URL String:
+** should be in the format of http://user:pass@host:port/requestwhatever
+** note that user, pass, port, and /requestwhatever are all optional :)
+** note that also, http:// is really not important. if you do poo://
+** or even leave out the http:// altogether, it will still work.
+*/
+
+#ifndef _HTTPGET_H_
+#define _HTTPGET_H_
+
+#include "connection.h"
+#include "util.h"
+
+class JNL_HTTPGet
+{
+ public:
+ JNL_HTTPGet(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int recvbufsize=16384, char *proxy=NULL);
+ ~JNL_HTTPGet();
+
+ void addheader(char *header);
+
+ void connect(char *url);
+
+ int run(); // returns: 0 if all is OK. -1 if error (call geterrorstr()). 1 if connection closed.
+
+ int get_status(); // returns 0 if connecting, 1 if reading headers,
+ // 2 if reading content, -1 if error.
+
+ char *getallheaders(); // double null terminated, null delimited list
+ char *getheader(char *headername);
+ char *getreply() { return m_reply; }
+ int getreplycode(); // returns 0 if none yet, otherwise returns http reply code.
+
+ char *geterrorstr() { return m_errstr;}
+
+ int bytes_available();
+ int get_bytes(char *buf, int len);
+ int peek_bytes(char *buf, int len);
+
+ int content_length() { char *p=getheader("content-length:"); if (p) return my_atoi(p); return 0; }
+
+ JNL_Connection *get_con() { return m_con; }
+
+ public:
+ void reinit();
+ void deinit();
+ void seterrstr(char *str) { if (m_errstr) free(m_errstr); m_errstr=(char*)malloc(strlen(str)+1); strcpy(m_errstr,str); }
+
+ void do_parse_url(char *url, char **host, int *port, char **req, char **lp);
+ void do_encode_mimestr(char *in, char *out);
+
+ JNL_AsyncDNS *m_dns;
+ JNL_Connection *m_con;
+ int m_recvbufsize;
+
+ int m_http_state;
+
+ int m_http_port;
+ char *m_http_url;
+ char *m_http_host;
+ char *m_http_lpinfo;
+ char *m_http_request;
+
+ char *m_http_proxylpinfo;
+ char *m_http_proxyhost;
+ int m_http_proxyport;
+
+ char *m_sendheaders;
+ char *m_recvheaders;
+ int m_recvheaders_size;
+ char *m_reply;
+
+ char *m_errstr;
+};
+
+#endif // _HTTPGET_H_
diff --git a/Contrib/Makensisw/jnetlib/netinc.h b/Contrib/Makensisw/jnetlib/netinc.h
index dd31b1b..b4d96fd 100755
--- a/Contrib/Makensisw/jnetlib/netinc.h
+++ b/Contrib/Makensisw/jnetlib/netinc.h
@@ -1,82 +1,82 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: netinc.h - network includes and portability defines (used internally)
-** License: see jnetlib.h
-*/
-
-#ifndef _NETINC_H_
-#define _NETINC_H_
-
-#ifdef _WIN32
-
-#include <windows.h>
-#include <stdio.h>
-#include <time.h>
-#define strcasecmp(x,y) stricmp(x,y)
-#define ERRNO (WSAGetLastError())
-#define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); }
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINPROGRESS WSAEWOULDBLOCK
-typedef int socklen_t;
-
-#else
-
-#ifndef THREAD_SAFE
-#define THREAD_SAFE
-#endif
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <sys/time.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-
-#define ERRNO errno
-#define closesocket(s) close(s)
-#define SET_SOCK_BLOCK(s,block) { int __flags; if ((__flags = fcntl(s, F_GETFL, 0)) != -1) { if (!block) __flags |= O_NONBLOCK; else __flags &= ~O_NONBLOCK; fcntl(s, F_SETFL, __flags); } }
-
-#define stricmp(x,y) strcasecmp(x,y)
-#define strnicmp(x,y,z) strncasecmp(x,y,z)
-#define wsprintf sprintf
-
-#endif // !_WIN32
-
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
-
-#ifndef INADDR_ANY
-#define INADDR_ANY 0
-#endif
-
-#ifndef SHUT_RDWR
-#define SHUT_RDWR 2
-#endif
-
-extern void mini_memset(void *,char,int);
-extern void mini_memcpy(void *,void*,int);
-#define memset mini_memset
-#define memcpy mini_memcpy
-#define strcpy lstrcpy
-#define strncpy lstrcpyn
-#define strcat lstrcat
-#define strlen lstrlen
-#define malloc(x) GlobalAlloc(GPTR,(x))
-#define free(x) { if (x) GlobalFree(x); }
-
-#endif //_NETINC_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: netinc.h - network includes and portability defines (used internally)
+** License: see jnetlib.h
+*/
+
+#ifndef _NETINC_H_
+#define _NETINC_H_
+
+#ifdef _WIN32
+
+#include <windows.h>
+#include <stdio.h>
+#include <time.h>
+#define strcasecmp(x,y) stricmp(x,y)
+#define ERRNO (WSAGetLastError())
+#define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); }
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EINPROGRESS WSAEWOULDBLOCK
+typedef int socklen_t;
+
+#else
+
+#ifndef THREAD_SAFE
+#define THREAD_SAFE
+#endif
+#ifndef _REENTRANT
+#define _REENTRANT
+#endif
+#include <pthread.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+
+#define ERRNO errno
+#define closesocket(s) close(s)
+#define SET_SOCK_BLOCK(s,block) { int __flags; if ((__flags = fcntl(s, F_GETFL, 0)) != -1) { if (!block) __flags |= O_NONBLOCK; else __flags &= ~O_NONBLOCK; fcntl(s, F_SETFL, __flags); } }
+
+#define stricmp(x,y) strcasecmp(x,y)
+#define strnicmp(x,y,z) strncasecmp(x,y,z)
+#define wsprintf sprintf
+
+#endif // !_WIN32
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+#ifndef INADDR_ANY
+#define INADDR_ANY 0
+#endif
+
+#ifndef SHUT_RDWR
+#define SHUT_RDWR 2
+#endif
+
+extern void mini_memset(void *,char,int);
+extern void mini_memcpy(void *,void*,int);
+#define memset mini_memset
+#define memcpy mini_memcpy
+#define strcpy lstrcpy
+#define strncpy lstrcpyn
+#define strcat lstrcat
+#define strlen lstrlen
+#define malloc(x) GlobalAlloc(GPTR,(x))
+#define free(x) { if (x) GlobalFree(x); }
+
+#endif //_NETINC_H_
diff --git a/Contrib/Makensisw/jnetlib/util.cpp b/Contrib/Makensisw/jnetlib/util.cpp
index db8f854..350bb16 100755
--- a/Contrib/Makensisw/jnetlib/util.cpp
+++ b/Contrib/Makensisw/jnetlib/util.cpp
@@ -1,64 +1,64 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: util.cpp - JNL implementation of basic network utilities
-** License: see jnetlib.h
-*/
-
-#include "netinc.h"
-
-#include "util.h"
-
-int JNL::open_socketlib()
-{
-#ifdef _WIN32
- WSADATA wsaData;
- if (WSAStartup(MAKEWORD(1, 1), &wsaData)) return 1;
-#endif
- return 0;
-}
-void JNL::close_socketlib()
-{
-#ifdef _WIN32
- WSACleanup();
-#endif
-}
-unsigned long JNL::ipstr_to_addr(const char *cp)
-{
- return ::inet_addr(cp);
-}
-
-void JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen)
-{
- struct in_addr a; a.s_addr=addr;
- char *p=::inet_ntoa(a); strncpy(host,p?p:"",maxhostlen);
-}
-
-int my_atoi(char *s)
-{
- int sign=0;
- int v=0;
- if (*s == '-') { s++; sign++; }
- for (;;)
- {
- int c=*s++ - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- if (sign) return -(int) v;
- return (int)v;
-}
-
-void mini_memset(void *o,char i,int l)
-{
- char *oo=(char*)o;
- while (l-- > 0) *oo++=i;
-}
-void mini_memcpy(void *o,void*i,int l)
-{
- char *oo=(char*)o;
- char *ii=(char*)i;
- while (l-- > 0) *oo++=*ii++;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: util.cpp - JNL implementation of basic network utilities
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+
+#include "util.h"
+
+int JNL::open_socketlib()
+{
+#ifdef _WIN32
+ WSADATA wsaData;
+ if (WSAStartup(MAKEWORD(1, 1), &wsaData)) return 1;
+#endif
+ return 0;
+}
+void JNL::close_socketlib()
+{
+#ifdef _WIN32
+ WSACleanup();
+#endif
+}
+unsigned long JNL::ipstr_to_addr(const char *cp)
+{
+ return ::inet_addr(cp);
+}
+
+void JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen)
+{
+ struct in_addr a; a.s_addr=addr;
+ char *p=::inet_ntoa(a); strncpy(host,p?p:"",maxhostlen);
+}
+
+int my_atoi(char *s)
+{
+ int sign=0;
+ int v=0;
+ if (*s == '-') { s++; sign++; }
+ for (;;)
+ {
+ int c=*s++ - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ if (sign) return -(int) v;
+ return (int)v;
+}
+
+void mini_memset(void *o,char i,int l)
+{
+ char *oo=(char*)o;
+ while (l-- > 0) *oo++=i;
+}
+void mini_memcpy(void *o,void*i,int l)
+{
+ char *oo=(char*)o;
+ char *ii=(char*)i;
+ while (l-- > 0) *oo++=*ii++;
+}
diff --git a/Contrib/Makensisw/jnetlib/util.h b/Contrib/Makensisw/jnetlib/util.h
index 1efd55c..d271fd6 100755
--- a/Contrib/Makensisw/jnetlib/util.h
+++ b/Contrib/Makensisw/jnetlib/util.h
@@ -1,41 +1,41 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: util.h - JNL interface for basic network utilities
-** License: see jnetlib.h
-**
-** routines you may be interested in:
-** JNL::open_socketlib();
-** opens the socket library. Call this once before using any network
-** code. If you create a new thread, call this again. Only really an
-** issue for Win32 support, but use it anyway for portability/
-**
-** JNL::close_Socketlib();
-** closes the socketlib. Call this when you're done with the network,
-** after all your JNetLib objects have been destroyed.
-**
-** unsigned long JNL::ipstr_to_addr(const char *cp);
-** gives you the integer representation of a ip address in dotted
-** decimal form.
-**
-** JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
-** gives you the dotted decimal notation of an integer ip address.
-**
-*/
-
-#ifndef _UTIL_H_
-#define _UTIL_H_
-
-class JNL
-{
- public:
- static int open_socketlib();
- static void close_socketlib();
- static unsigned long ipstr_to_addr(const char *cp);
- static void addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
-};
-
-int my_atoi(char *p);
-
-#endif //_UTIL_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: util.h - JNL interface for basic network utilities
+** License: see jnetlib.h
+**
+** routines you may be interested in:
+** JNL::open_socketlib();
+** opens the socket library. Call this once before using any network
+** code. If you create a new thread, call this again. Only really an
+** issue for Win32 support, but use it anyway for portability/
+**
+** JNL::close_Socketlib();
+** closes the socketlib. Call this when you're done with the network,
+** after all your JNetLib objects have been destroyed.
+**
+** unsigned long JNL::ipstr_to_addr(const char *cp);
+** gives you the integer representation of a ip address in dotted
+** decimal form.
+**
+** JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
+** gives you the dotted decimal notation of an integer ip address.
+**
+*/
+
+#ifndef _UTIL_H_
+#define _UTIL_H_
+
+class JNL
+{
+ public:
+ static int open_socketlib();
+ static void close_socketlib();
+ static unsigned long ipstr_to_addr(const char *cp);
+ static void addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
+};
+
+int my_atoi(char *p);
+
+#endif //_UTIL_H_
diff --git a/Contrib/Makensisw/logo.psp b/Contrib/Makensisw/logo.psp
index ca546cc..3ad05dc 100755
--- a/Contrib/Makensisw/logo.psp
+++ b/Contrib/Makensisw/logo.psp
@@ -1 +1 @@
-Paint Shop Pro Image File
+Paint Shop Pro Image File
diff --git a/Contrib/Makensisw/makensisw.cpp b/Contrib/Makensisw/makensisw.cpp
index ad03bd0..9bad59f 100755
--- a/Contrib/Makensisw/makensisw.cpp
+++ b/Contrib/Makensisw/makensisw.cpp
@@ -1,1297 +1,1297 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
-
- 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.
-*/
-#define MAKENSISW_CPP
-
-#include "makensisw.h"
-#include <windowsx.h>
-#include <stdio.h>
-#include "resource.h"
-#include "noclib.h"
-#include "toolbar.h"
-#include "update.h"
-
-NSCRIPTDATA g_sdata;
-NRESIZEDATA g_resize;
-NFINDREPLACE g_find;
-extern NTOOLBAR g_toolbar;
-int g_symbol_set_mode;
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmdShow) {
- MSG msg;
- int status;
- HACCEL haccel;
-
- my_memset(&g_sdata,0,sizeof(NSCRIPTDATA));
- my_memset(&g_resize,0,sizeof(NRESIZEDATA));
- my_memset(&g_find,0,sizeof(NFINDREPLACE));
- g_sdata.hInstance=GetModuleHandle(0);
- g_sdata.symbols = NULL;
- g_sdata.sigint_event = CreateEvent(NULL, FALSE, FALSE, "makensis win32 signint event");
- RestoreSymbols();
-
- HINSTANCE hRichEditDLL = LoadLibrary("RichEd32.dll");
-
- if (!InitBranding()) {
- MessageBox(0,NSISERROR,"Error",MB_ICONEXCLAMATION|MB_OK);
- return 1;
- }
- ResetObjects();
- HWND hDialog = CreateDialog(g_sdata.hInstance,MAKEINTRESOURCE(DLG_MAIN),0,DialogProc);
- if (!hDialog) {
- MessageBox(0,DLGERROR,"Error",MB_ICONEXCLAMATION|MB_OK);
- return 1;
- }
- haccel = LoadAccelerators(g_sdata.hInstance, MAKEINTRESOURCE(IDK_ACCEL));
- while ((status=GetMessage(&msg,0,0,0))!=0) {
- if (status==-1) return -1;
- if (!IsDialogMessage(g_find.hwndFind, &msg)) {
- if (!TranslateAccelerator(hDialog,haccel,&msg)) {
- if (!IsDialogMessage(hDialog,&msg)) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- }
- }
- if (g_sdata.script) GlobalFree(g_sdata.script);
- if (g_sdata.script_cmd_args) GlobalFree(g_sdata.script_cmd_args);
- if (g_sdata.sigint_event) CloseHandle(g_sdata.sigint_event);
- FreeLibrary(hRichEditDLL);
- FinalizeUpdate();
- ExitProcess(msg.wParam);
- return msg.wParam;
-}
-
-void SetScript(const char *script, bool clearArgs /*= true*/)
-{
- if (g_sdata.script)
- {
- GlobalFree(g_sdata.script);
- }
-
- if (clearArgs)
- {
- if (g_sdata.script_cmd_args)
- {
- GlobalFree(g_sdata.script_cmd_args);
- }
-
- g_sdata.script_cmd_args = GlobalAlloc(GHND, 1);
- }
-
- g_sdata.script = (char *) GlobalAlloc(GPTR, lstrlen(script) + 1);
- lstrcpy(g_sdata.script, script);
-}
-
-void AddScriptCmdArgs(const char *arg)
-{
- g_sdata.script_cmd_args = GlobalReAlloc(g_sdata.script_cmd_args,
- GlobalSize(g_sdata.script_cmd_args) + lstrlen(arg) + 2 /* quotes */ + 1 /* space */,
- 0);
-
- char *args = (char *) GlobalLock(g_sdata.script_cmd_args);
-
- lstrcat(args, " \"");
- lstrcat(args, arg);
- lstrcat(args, "\"");
-
- GlobalUnlock(g_sdata.script_cmd_args);
-}
-
-void ProcessCommandLine()
-{
- int argc;
- char **argv;
- int i, j;
- int argSpaceSize;
-
- argSpaceSize = SetArgv((char *)GetCommandLine(), &argc, &argv);
- if (argc > 1) {
- for (i = 1; i < argc; i++)
- {
- if (!lstrncmpi(argv[i], "/XSetCompressor ", lstrlen("/XSetCompressor ")))
- {
- char *p = argv[i] + lstrlen("/XSetCompressor ");
- if(!lstrncmpi(p,"/FINAL ", lstrlen("/FINAL ")))
- {
- p += lstrlen("/FINAL ");
- }
-
- while (*p == ' ') p++;
-
- for (j = (int) COMPRESSOR_SCRIPT + 1; j < (int) COMPRESSOR_BEST; j++)
- {
- if (!lstrcmpi(p, compressor_names[j]))
- {
- SetCompressor((NCOMPRESSOR) j);
- }
- }
- }
- else if (!lstrcmpi(argv[i], "/ChooseCompressor"))
- {
- g_sdata.userSelectCompressor = TRUE;
- }
- else if (argv[i][0] == '-' || argv[i][0] == '/')
- {
- AddScriptCmdArgs(argv[i]);
- }
- else
- {
- SetScript(argv[i], false);
- PushMRUFile(g_sdata.script);
- break;
- }
- }
- }
-
- if (argSpaceSize)
- GlobalFree(argv);
-}
-
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
- switch (msg) {
- case WM_INITDIALOG:
- {
- g_sdata.hwnd=hwndDlg;
- HICON hIcon = LoadIcon(g_sdata.hInstance,MAKEINTRESOURCE(IDI_ICON));
- SetClassLong(hwndDlg,GCL_HICON,(long)hIcon);
- // Altered by Darren Owen (DrO) on 29/9/2003
- // Added in receiving of mouse and key events from the richedit control
- SendMessage(GetDlgItem(hwndDlg,IDC_LOGWIN),EM_SETEVENTMASK,(WPARAM)NULL,ENM_SELCHANGE|ENM_MOUSEEVENTS|ENM_KEYEVENTS);
- DragAcceptFiles(g_sdata.hwnd,FALSE);
- g_sdata.menu = GetMenu(g_sdata.hwnd);
- g_sdata.fileSubmenu = FindSubMenu(g_sdata.menu, IDM_FILE);
- g_sdata.editSubmenu = FindSubMenu(g_sdata.menu, IDM_EDIT);
- g_sdata.toolsSubmenu = FindSubMenu(g_sdata.menu, IDM_TOOLS);
- RestoreMRUList();
- CreateToolBar();
- InitTooltips(g_sdata.hwnd);
- SetBranding(g_sdata.hwnd);
- HFONT hFont = CreateFont(14,0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,OUT_CHARACTER_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FIXED_PITCH|FF_DONTCARE,"Courier New");
- SendDlgItemMessage(hwndDlg,IDC_LOGWIN,WM_SETFONT,(WPARAM)hFont,0);
- RestoreWindowPos(g_sdata.hwnd);
- RestoreCompressor();
- SetScript("");
- g_sdata.compressor = COMPRESSOR_NONE_SELECTED;
- g_sdata.userSelectCompressor = FALSE;
-
- ProcessCommandLine();
-
- if(g_sdata.compressor == COMPRESSOR_NONE_SELECTED) {
- SetCompressor(g_sdata.default_compressor);
- }
-
- if(g_sdata.userSelectCompressor) {
- if (DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_COMPRESSOR),g_sdata.hwnd,(DLGPROC)CompressorProc)) {
- EnableItems(g_sdata.hwnd);
- return TRUE;
- }
- }
-
- CompileNSISScript();
- return TRUE;
- }
- case WM_PAINT:
- {
- PAINTSTRUCT ps;
- GetClientRect(g_sdata.hwnd, &g_resize.griprect);
- HDC hdc = BeginPaint(g_sdata.hwnd, &ps);
- g_resize.griprect.left = g_resize.griprect.right - GetSystemMetrics(SM_CXVSCROLL);
- g_resize.griprect.top = g_resize.griprect.bottom - GetSystemMetrics(SM_CYVSCROLL);
- DrawFrameControl(hdc, &g_resize.griprect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
- EndPaint(g_sdata.hwnd,&ps);
- return TRUE;
- }
- case WM_DESTROY:
- {
- DragAcceptFiles(g_sdata.hwnd,FALSE);
- SaveSymbols();
- SaveCompressor();
- SaveMRUList();
- SaveWindowPos(g_sdata.hwnd);
- ImageList_Destroy(g_toolbar.imagelist);
- ImageList_Destroy(g_toolbar.imagelistd);
- ImageList_Destroy(g_toolbar.imagelisth);
- DestroyTooltips();
- PostQuitMessage(0);
- return TRUE;
- }
- case WM_CLOSE:
- {
- if (!g_sdata.thread) {
- DestroyWindow(hwndDlg);
- }
- return TRUE;
- }
- case WM_DROPFILES: {
- int num;
- char szTmp[MAX_PATH];
- num = DragQueryFile((HDROP)wParam,(UINT)-1,NULL,0);
- if (num==1) {
- DragQueryFile((HDROP)wParam,0,szTmp,MAX_PATH);
- if (lstrlen(szTmp)>0) {
- SetScript(szTmp);
- PushMRUFile(g_sdata.script);
- ResetObjects();
- CompileNSISScript();
- }
- } else {
- MessageBox(hwndDlg,MULTIDROPERROR,"Error",MB_OK|MB_ICONSTOP);
- }
- DragFinish((HDROP)wParam);
- break;
- }
- case WM_GETMINMAXINFO:
- {
- ((MINMAXINFO*)lParam)->ptMinTrackSize.x=MINWIDTH;
- ((MINMAXINFO*)lParam)->ptMinTrackSize.y=MINHEIGHT;
- }
- case WM_ENTERSIZEMOVE:
- {
- GetClientRect(g_sdata.hwnd, &g_resize.resizeRect);
- return TRUE;
- }
- case WM_SIZE:
- {
- if ((wParam == SIZE_MAXHIDE)||(wParam == SIZE_MAXSHOW)) return TRUE;
- RECT rSize;
- if (hwndDlg == g_sdata.hwnd) {
- GetClientRect(g_sdata.hwnd, &rSize);
- if (((rSize.right==0)&&(rSize.bottom==0))||((g_resize.resizeRect.right==0)&&(g_resize.resizeRect.bottom==0))) return TRUE;
- g_resize.dx = rSize.right - g_resize.resizeRect.right;
- g_resize.dy = rSize.bottom - g_resize.resizeRect.bottom;
- EnumChildWindows(g_sdata.hwnd, DialogResize, (LPARAM)0);
- g_resize.resizeRect = rSize;
- }
- return TRUE;
- }
- case WM_SIZING:
- {
- InvalidateRect(g_sdata.hwnd,&g_resize.griprect,TRUE);
- GetClientRect(g_sdata.hwnd, &g_resize.griprect);
- g_resize.griprect.left = g_resize.griprect.right - GetSystemMetrics(SM_CXVSCROLL);
- g_resize.griprect.top = g_resize.griprect.bottom - GetSystemMetrics(SM_CYVSCROLL);
- return TRUE;
- }
- case WM_MAKENSIS_PROCESSCOMPLETE:
- {
- if (g_sdata.thread) {
- CloseHandle(g_sdata.thread);
- g_sdata.thread=0;
- }
- if(g_sdata.compressor == COMPRESSOR_BEST) {
- if (g_sdata.retcode==0 && FileExists(g_sdata.output_exe)) {
- char temp_file_name[1024];
- wsprintf(temp_file_name,"%s_makensisw_temp",g_sdata.output_exe);
- if(!lstrcmpi(g_sdata.compressor_name,compressor_names[(int)COMPRESSOR_SCRIPT+1])) {
- SetCompressorStats();
- CopyFile(g_sdata.output_exe,temp_file_name,false);
- g_sdata.best_compressor_name = g_sdata.compressor_name;
- g_sdata.compressor_name = compressor_names[(int)COMPRESSOR_SCRIPT+2];
- ResetObjects();
-
- CompileNSISScript();
- return TRUE;
- }
- else {
- int this_compressor=0;
- int last_compressor;
- int i;
- HANDLE hPrev, hThis;
- DWORD prevSize=0, thisSize=0;
-
-
- for(i=(int)COMPRESSOR_SCRIPT+2; i<(int)COMPRESSOR_BEST; i++) {
- if(!lstrcmpi(g_sdata.compressor_name,compressor_names[i])) {
- this_compressor = i;
- last_compressor = i-1;
- break;
- }
- }
-
- if(FileExists(temp_file_name)) {
- hPrev = CreateFile(temp_file_name,GENERIC_READ, FILE_SHARE_READ,
- NULL, OPEN_EXISTING, (DWORD)NULL, NULL);
- if(hPrev != INVALID_HANDLE_VALUE) {
- prevSize = GetFileSize(hPrev, 0);
- CloseHandle(hPrev);
-
- if(prevSize != INVALID_FILE_SIZE) {
- hThis = CreateFile(g_sdata.output_exe,GENERIC_READ, FILE_SHARE_READ,
- NULL, OPEN_EXISTING, (DWORD)NULL, NULL);
- if(hThis != INVALID_HANDLE_VALUE) {
- thisSize = GetFileSize(hThis, 0);
- CloseHandle(hThis);
-
- if(thisSize != INVALID_FILE_SIZE) {
- if(prevSize > thisSize) {
- CopyFile(g_sdata.output_exe,temp_file_name,false);
- SetCompressorStats();
- g_sdata.best_compressor_name = g_sdata.compressor_name;
- }
- }
- }
- }
- }
- }
-
- if(this_compressor == ((int)COMPRESSOR_BEST - 1)) {
- char buf[1024];
-
- g_sdata.compressor_name = compressor_names[(int)COMPRESSOR_SCRIPT+1];
-
- if(!lstrcmpi(g_sdata.best_compressor_name,compressor_names[this_compressor])) {
- wsprintf(buf,COMPRESSOR_MESSAGE,g_sdata.best_compressor_name,thisSize);
- LogMessage(g_sdata.hwnd,buf);
- }
- else {
- CopyFile(temp_file_name,g_sdata.output_exe,false);
- wsprintf(buf,RESTORED_COMPRESSOR_MESSAGE,g_sdata.best_compressor_name,prevSize);
- LogMessage(g_sdata.hwnd,buf);
- LogMessage(g_sdata.hwnd, g_sdata.compressor_stats);
- }
- DeleteFile(temp_file_name);
- lstrcpy(g_sdata.compressor_stats,"");
- }
- else {
- g_sdata.compressor_name = compressor_names[this_compressor+1];
- ResetObjects();
-
- CompileNSISScript();
- return TRUE;
- }
- }
- }
- }
- EnableItems(g_sdata.hwnd);
- if (!g_sdata.retcode) {
- MessageBeep(MB_ICONASTERISK);
- if (g_sdata.warnings)
- SetTitle(g_sdata.hwnd,"Finished with Warnings");
- else
- SetTitle(g_sdata.hwnd,"Finished Sucessfully");
- // Added by Darren Owen (DrO) on 1/10/2003
- if(g_sdata.recompile_test)
- PostMessage(g_sdata.hwnd, WM_COMMAND, LOWORD(IDC_TEST), 0);
- }
- else {
- MessageBeep(MB_ICONEXCLAMATION);
- SetTitle(g_sdata.hwnd,"Compile Error: See Log for Details");
- }
-
- // Added by Darren Owen (DrO) on 1/10/2003
- // ensures the recompile and run state is reset after use
- g_sdata.recompile_test = 0;
- DragAcceptFiles(g_sdata.hwnd,TRUE);
- return TRUE;
- }
- case WM_NOTIFY:
- switch (((NMHDR*)lParam)->code ) {
- case EN_SELCHANGE:
- SendDlgItemMessage(hwndDlg,IDC_LOGWIN, EM_EXGETSEL, 0, (LPARAM) &g_sdata.textrange);
- {
- BOOL enabled = (g_sdata.textrange.cpMax-g_sdata.textrange.cpMin<=0?FALSE:TRUE);
- EnableMenuItem(g_sdata.menu,IDM_COPYSELECTED,(enabled?MF_ENABLED:MF_GRAYED));
- EnableToolBarButton(IDM_COPY,enabled);
- }
- // Altered by Darren Owen (DrO) on 6/10/2003
- // Allows the detection of the right-click menu when running on OSes below Windows 2000
- // and will then simulate the effective WM_CONTEXTMENU message that would be received
- // note: removed the WM_CONTEXTMENU handling to prevent a duplicate menu appearing on
- // Windows 2000 and higher
- case EN_MSGFILTER:
- #define lpnmMsg ((MSGFILTER*)lParam)
- if(WM_RBUTTONUP == lpnmMsg->msg || WM_KEYUP == lpnmMsg->msg && lpnmMsg->wParam == VK_APPS){
- POINT pt;
- HWND edit = GetDlgItem(g_sdata.hwnd,IDC_LOGWIN);
- RECT r;
- GetCursorPos(&pt);
-
- // Added and altered by Darren Owen (DrO) on 29/9/2003
- // Will place the right-click menu in the top left corner of the window
- // if the application key is pressed and the mouse is not in the window
- // from here...
- ScreenToClient(edit, &pt);
- GetClientRect(edit, &r);
- if(!PtInRect(&r, pt))
- pt.x = pt.y = 0;
- MapWindowPoints(edit, HWND_DESKTOP, &pt, 1);
- TrackPopupMenu(g_sdata.editSubmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, pt.x, pt.y, 0, g_sdata.hwnd, 0);
- }
- case TBN_DROPDOWN:
- {
- LPNMTOOLBAR pToolBar = (LPNMTOOLBAR) lParam;
- if(pToolBar->hdr.hwndFrom == g_toolbar.hwnd && pToolBar->iItem == IDM_COMPRESSOR) {
- ShowToolbarDropdownMenu();
- return TBDDRET_DEFAULT;
- }
- else {
- return TBDDRET_NODEFAULT;
- }
- }
- }
- return TRUE;
- case WM_COPYDATA:
- {
- PCOPYDATASTRUCT cds = PCOPYDATASTRUCT(lParam);
- switch (cds->dwData) {
- case MAKENSIS_NOTIFY_SCRIPT:
- if (g_sdata.input_script) GlobalFree(g_sdata.input_script);
- g_sdata.input_script = (char *)GlobalAlloc(GPTR, cds->cbData);
- lstrcpy(g_sdata.input_script, (char *)cds->lpData);
- break;
- case MAKENSIS_NOTIFY_WARNING:
- g_sdata.warnings++;
- break;
- case MAKENSIS_NOTIFY_ERROR:
- break;
- case MAKENSIS_NOTIFY_OUTPUT:
- if (g_sdata.output_exe) GlobalFree(g_sdata.output_exe);
- g_sdata.output_exe = (char *)GlobalAlloc(GPTR, cds->cbData);
- lstrcpy(g_sdata.output_exe, (char *)cds->lpData);
- break;
- }
- return TRUE;
- }
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDM_BROWSESCR: {
- if (g_sdata.input_script) {
- char str[MAX_PATH],*str2;
- lstrcpy(str,g_sdata.input_script);
- str2=my_strrchr(str,'\\');
- if(str2!=NULL) *str2=0;
- ShellExecute(g_sdata.hwnd,"open",str,NULL,NULL,SW_SHOWNORMAL);
- }
- return TRUE;
- }
- case IDM_ABOUT:
- {
- DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_ABOUT),g_sdata.hwnd,(DLGPROC)AboutProc);
- return TRUE;
- }
- case IDM_NSISHOME:
- {
- ShellExecute(g_sdata.hwnd,"open",NSIS_URL,NULL,NULL,SW_SHOWNORMAL);
- return TRUE;
- }
- case IDM_FORUM:
- {
- ShellExecute(g_sdata.hwnd,"open",NSIS_FOR,NULL,NULL,SW_SHOWNORMAL);
- return TRUE;
- }
- case IDM_NSISUPDATE:
- {
- Update();
- return TRUE;
- }
- case IDM_SELECTALL:
- {
- SendDlgItemMessage(g_sdata.hwnd, IDC_LOGWIN, EM_SETSEL, 0, -1);
- return TRUE;
- }
- case IDM_DOCS:
- {
- ShowDocs();
- return TRUE;
- }
- case IDM_LOADSCRIPT:
- {
- if (!g_sdata.thread) {
- OPENFILENAME l={sizeof(l),};
- char buf[MAX_PATH];
- l.hwndOwner = hwndDlg;
- l.lpstrFilter = "NSIS Script (*.nsi)\0*.nsi\0All Files (*.*)\0*.*\0";
- l.lpstrFile = buf;
- l.nMaxFile = MAX_STRING-1;
- l.lpstrTitle = "Load Script";
- l.lpstrDefExt = "log";
- l.lpstrFileTitle = NULL;
- l.lpstrInitialDir = NULL;
- l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER|OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST;
- lstrcpy(buf,"");
- if (GetOpenFileName(&l)) {
- SetScript(buf);
- PushMRUFile(g_sdata.script);
- ResetObjects();
- CompileNSISScript();
- }
- }
- return TRUE;
- }
- case IDM_MRU_FILE:
- case IDM_MRU_FILE+1:
- case IDM_MRU_FILE+2:
- case IDM_MRU_FILE+3:
- case IDM_MRU_FILE+4:
- LoadMRUFile(LOWORD(wParam)-IDM_MRU_FILE);
- return TRUE;
- case IDM_CLEAR_MRU_LIST:
- ClearMRUList();
- return TRUE;
- case IDM_COMPRESSOR:
- {
- SetCompressor((NCOMPRESSOR)(g_sdata.compressor+1));
- return TRUE;
- }
- case IDM_CLEARLOG:
- {
- if (!g_sdata.thread) {
- ClearLog(g_sdata.hwnd);
- }
- return TRUE;
- }
- case IDM_RECOMPILE:
- {
- CompileNSISScript();
- return TRUE;
- }
- // Added by Darren Owen (DrO) on 1/10/2003
- case IDM_RECOMPILE_TEST:
- case IDC_RECOMPILE_TEST:
- {
- g_sdata.recompile_test = 1;
- CompileNSISScript();
- return TRUE;
- }
- case IDM_SETTINGS:
- {
- DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_SETTINGS),g_sdata.hwnd,(DLGPROC)SettingsProc);
- return TRUE;
- }
- case IDM_TEST:
- case IDC_TEST:
- {
- if (g_sdata.output_exe) {
- ShellExecute(g_sdata.hwnd,"open",g_sdata.output_exe,NULL,NULL,SW_SHOWNORMAL);
- }
- return TRUE;
- }
- case IDM_EDITSCRIPT:
- {
- if (g_sdata.input_script) {
- if ((int)ShellExecute(g_sdata.hwnd,"open",g_sdata.input_script,NULL,NULL,SW_SHOWNORMAL)<=32) {
- char path[MAX_PATH];
- if (GetWindowsDirectory(path,sizeof(path))) {
- lstrcat(path,"\\notepad.exe");
- ShellExecute(g_sdata.hwnd,"open",path,g_sdata.input_script,NULL,SW_SHOWNORMAL);
- }
- }
- }
- return TRUE;
- }
- case IDCANCEL:
- case IDM_EXIT:
- {
- if (!g_sdata.thread) {
- DestroyWindow(g_sdata.hwnd);
- }
- return TRUE;
- }
- case IDM_CANCEL:
- {
- SetEvent(g_sdata.sigint_event);
- return TRUE;
- }
- case IDM_COPY:
- {
- CopyToClipboard(g_sdata.hwnd);
- return TRUE;
- }
- case IDM_COPYSELECTED:
- {
- SendDlgItemMessage(g_sdata.hwnd,IDC_LOGWIN, WM_COPY, 0, 0);
- return TRUE;
- }
- case IDM_SAVE:
- {
- OPENFILENAME l={sizeof(l),};
- char buf[MAX_STRING];
- l.hwndOwner = hwndDlg;
- l.lpstrFilter = "Log Files (*.log)\0*.log\0Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
- l.lpstrFile = buf;
- l.nMaxFile = MAX_STRING-1;
- l.lpstrTitle = "Save Output";
- l.lpstrDefExt = "log";
- l.lpstrInitialDir = NULL;
- l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER|OFN_PATHMUSTEXIST;
- lstrcpy(buf,"output");
- if (GetSaveFileName(&l)) {
- HANDLE hFile = CreateFile(buf,GENERIC_WRITE,0,0,CREATE_ALWAYS,0,0);
- if (hFile) {
- int len=SendDlgItemMessage(g_sdata.hwnd,IDC_LOGWIN,WM_GETTEXTLENGTH,0,0);
- char *existing_text=(char*)GlobalAlloc(GPTR,len);
- existing_text[0]=0;
- GetDlgItemText(g_sdata.hwnd, IDC_LOGWIN, existing_text, len);
- DWORD dwWritten = 0;
- WriteFile(hFile,existing_text,len,&dwWritten,0);
- CloseHandle(hFile);
- GlobalFree(existing_text);
- }
- }
- return TRUE;
- }
- case IDM_FIND:
- {
- if (!g_find.uFindReplaceMsg) g_find.uFindReplaceMsg = RegisterWindowMessage(FINDMSGSTRING);
- my_memset(&g_find.fr, 0, sizeof(FINDREPLACE));
- g_find.fr.lStructSize = sizeof(FINDREPLACE);
- g_find.fr.hwndOwner = hwndDlg;
- g_find.fr.Flags = FR_NOUPDOWN;
- g_find.fr.lpstrFindWhat = (char *)GlobalAlloc(GPTR, 128);
- if (!g_find.fr.lpstrFindWhat) return TRUE;
- g_find.fr.wFindWhatLen = 128;
- g_find.hwndFind = FindText(&g_find.fr);
- return TRUE;
- }
- default:
- {
- int i;
- DWORD command = LOWORD(wParam);
- for(i=(int)COMPRESSOR_SCRIPT; i<=(int)COMPRESSOR_BEST; i++) {
- if(command == compressor_commands[i]) {
- SetCompressor((NCOMPRESSOR)i);
- return TRUE;
- }
- }
- }
- }
- }
- }
- if (g_find.uFindReplaceMsg && msg == g_find.uFindReplaceMsg) {
- LPFINDREPLACE lpfr = (LPFINDREPLACE)lParam;
- if (lpfr->Flags & FR_FINDNEXT) {
- WPARAM flags = FR_DOWN;
- if (lpfr->Flags & FR_MATCHCASE) flags |= FR_MATCHCASE;
- if (lpfr->Flags & FR_WHOLEWORD) flags |= FR_WHOLEWORD;
- FINDTEXTEX ft;
- SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_EXGETSEL, 0, (LPARAM)&ft.chrg);
- if (ft.chrg.cpMax == ft.chrg.cpMin) ft.chrg.cpMin = 0;
- else ft.chrg.cpMin = ft.chrg.cpMax;
- ft.chrg.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, WM_GETTEXTLENGTH, 0, 0);
- ft.lpstrText = lpfr->lpstrFindWhat;
- ft.chrg.cpMin = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_FINDTEXTEX, flags, (LPARAM)&ft);
- if (ft.chrg.cpMin != -1) SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_SETSEL, ft.chrgText.cpMin, ft.chrgText.cpMax);
- else MessageBeep(MB_ICONASTERISK);
- }
- if (lpfr->Flags & FR_DIALOGTERM) g_find.hwndFind = 0;
- return TRUE;
- }
- return 0;
-}
-
-DWORD WINAPI MakeNSISProc(LPVOID p) {
- STARTUPINFO si={sizeof(si),};
- SECURITY_ATTRIBUTES sa={sizeof(sa),};
- SECURITY_DESCRIPTOR sd={0,};
- PROCESS_INFORMATION pi={0,};
- HANDLE newstdout=0,read_stdout=0;
- HANDLE newstdin=0,read_stdin=0;
- OSVERSIONINFO osv={sizeof(osv)};
- GetVersionEx(&osv);
- if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl(&sd,true,NULL,false);
- sa.lpSecurityDescriptor = &sd;
- }
- else sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = true;
- if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) {
- ErrorMessage(g_sdata.hwnd,"There was an error creating the output pipe.");
- PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
- return 1;
- }
- if (!CreatePipe(&read_stdin,&newstdin,&sa,0)) {
- ErrorMessage(g_sdata.hwnd,"There was an error creating the input pipe.");
- PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
- return 1;
- }
- GetStartupInfo(&si);
- si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
- si.hStdOutput = newstdout;
- si.hStdError = newstdout;
- si.hStdInput = newstdin;
- if (!CreateProcess(NULL,g_sdata.compile_command,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
- char buf[MAX_STRING];
- wsprintf(buf,"Could not execute:\r\n %s.",g_sdata.compile_command);
- ErrorMessage(g_sdata.hwnd,buf);
- CloseHandle(newstdout);
- CloseHandle(read_stdout);
- PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
- return 1;
- }
- char szBuf[1024];
- DWORD dwRead = 1;
- DWORD dwExit = !STILL_ACTIVE;
- while (dwExit == STILL_ACTIVE || dwRead) {
- PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
- if (dwRead) {
- ReadFile(read_stdout, szBuf, sizeof(szBuf)-1, &dwRead, NULL);
- szBuf[dwRead] = 0;
- LogMessage(g_sdata.hwnd, szBuf);
- }
- else Sleep(TIMEOUT);
- GetExitCodeProcess(pi.hProcess, &dwExit);
- // Make sure we have no data before killing getting out of the loop
- if (dwExit != STILL_ACTIVE) {
- PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
- }
- }
-
- g_sdata.retcode = dwExit;
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
- CloseHandle(newstdout);
- CloseHandle(read_stdout);
- CloseHandle(newstdin);
- CloseHandle(read_stdin);
- PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
- return 0;
-}
-
-BOOL CALLBACK DialogResize(HWND hWnd, LPARAM /* unused */)
-{
- RECT r;
- GetWindowRect(hWnd, &r);
- ScreenToClient(g_sdata.hwnd, (LPPOINT)&r);
- ScreenToClient(g_sdata.hwnd, ((LPPOINT)&r)+1);
- if(hWnd != g_toolbar.hwnd) {
- switch (GetDlgCtrlID(hWnd)) {
- case IDC_LOGWIN:
- SetWindowPos(hWnd, 0, r.left, r.top,r.right - r.left + g_resize.dx, r.bottom - r.top + g_resize.dy, SWP_NOZORDER|SWP_NOMOVE);
- break;
- case IDC_TEST:
- case IDCANCEL:
- SetWindowPos(hWnd, 0, r.left + g_resize.dx, r.top + g_resize.dy, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
- break;
- default:
- SetWindowPos(hWnd, 0, r.left, r.top + g_resize.dy, r.right - r.left + g_resize.dx, r.bottom - r.top, SWP_NOZORDER);
- break;
- }
- }
- else {
- RECT r2;
- GetWindowRect(g_toolbar.hwnd, &r2);
- SetWindowPos(hWnd, 0, 0, 0, r.right - r.left + g_resize.dx, r2.bottom-r2.top, SWP_NOMOVE|SWP_NOZORDER);
- }
- RedrawWindow(hWnd,NULL,NULL,RDW_INVALIDATE);
- return TRUE;
-}
-
-BOOL CALLBACK AboutProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
- switch(msg) {
- case WM_INITDIALOG:
- {
- HFONT bfont = CreateFont(13,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
- OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
- FIXED_PITCH|FF_DONTCARE, "Tahoma");
- HFONT bfontb = CreateFont(13,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
- OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
- FIXED_PITCH|FF_DONTCARE, "Tahoma");
- HFONT rfont = CreateFont(12,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
- OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
- FIXED_PITCH|FF_DONTCARE, "MS Shell Dlg");
- HFONT rfontb = CreateFont(12,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
- OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
- FIXED_PITCH|FF_DONTCARE, "MS Shell Dlg");
- if (bfont&&bfontb) {
- SendDlgItemMessage(hwndDlg, IDC_ABOUTVERSION, WM_SETFONT, (WPARAM)bfontb, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_ABOUTCOPY, WM_SETFONT, (WPARAM)bfont, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_ABOUTPORTIONS, WM_SETFONT, (WPARAM)bfont, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_NSISVER, WM_SETFONT, (WPARAM)bfont, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_OTHERCONTRIB, WM_SETFONT, (WPARAM)bfont, FALSE);
- }
- else if (rfont&&rfontb) {
- SendDlgItemMessage(hwndDlg, IDC_ABOUTVERSION, WM_SETFONT, (WPARAM)rfontb, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_ABOUTCOPY, WM_SETFONT, (WPARAM)rfont, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_ABOUTPORTIONS, WM_SETFONT, (WPARAM)rfont, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_NSISVER, WM_SETFONT, (WPARAM)rfont, FALSE);
- SendDlgItemMessage(hwndDlg, IDC_OTHERCONTRIB, WM_SETFONT, (WPARAM)rfont, FALSE);
- }
- SetDlgItemText(hwndDlg,IDC_NSISVER,g_sdata.branding);
- SetDlgItemText(hwndDlg,IDC_ABOUTVERSION,NSISW_VERSION);
- SetDlgItemText(hwndDlg,IDC_ABOUTCOPY,COPYRIGHT);
- SetDlgItemText(hwndDlg,IDC_OTHERCONTRIB,CONTRIB);
- break;
- }
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDOK:
- EndDialog(hwndDlg, TRUE);
- break;
- }
- }
- }
- return FALSE;
-}
-
-void EnableSymbolSetButtons(HWND hwndDlg)
-{
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETCOUNT, 0, 0);
- if(n > 0) {
- EnableWindow(GetDlgItem(hwndDlg, IDCLEAR), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDSAVE), TRUE);
- }
- else {
- EnableWindow(GetDlgItem(hwndDlg, IDCLEAR), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDSAVE), FALSE);
- }
-}
-
-void EnableSymbolEditButtons(HWND hwndDlg)
-{
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0);
- if(n == 0) {
- EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
- }
- else if(n == 1) {
- EnableWindow(GetDlgItem(hwndDlg, IDLEFT), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), TRUE);
- }
- else if(n > 1) {
- EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), TRUE);
- }
-}
-
-void SetSymbols(HWND hwndDlg, char **symbols)
-{
- int i = 0;
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_RESETCONTENT , 0, 0);
- if (symbols) {
- while (symbols[i]) {
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_ADDSTRING, 0, (LPARAM)symbols[i]);
- i++;
- }
- }
- EnableSymbolSetButtons(hwndDlg);
- EnableWindow(GetDlgItem(hwndDlg, IDRIGHT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
-}
-
-char **GetSymbols(HWND hwndDlg)
-{
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETCOUNT, 0, 0);
- char **symbols = NULL;
- if(n > 0) {
- HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, (n+1)*sizeof(char *));
- symbols = (char **)GlobalLock(hMem);
- for (int i = 0; i < n; i++) {
- int len = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXTLEN, (WPARAM)i, 0);
- symbols[i] = (char *)GlobalAlloc(GPTR, (len+1)*sizeof(char));
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXT, (WPARAM)i, (LPARAM)symbols[i]);
- }
- symbols[n] = NULL;
- }
-
- return symbols;
-}
-
-BOOL CALLBACK SettingsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
- switch(msg) {
- case WM_INITDIALOG:
- {
- int i = 0;
- LRESULT rv;
-
- for(i = (int)COMPRESSOR_SCRIPT; i <= (int)COMPRESSOR_BEST; i++) {
- rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_ADDSTRING, 0, (LPARAM)compressor_display_names[i]);
- }
- rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_SETCURSEL, (WPARAM)g_sdata.default_compressor, (LPARAM)0);
-
- SetSymbols(hwndDlg, g_sdata.symbols);
- SetFocus(GetDlgItem(hwndDlg, IDC_SYMBOL));
- break;
- }
- case WM_MAKENSIS_LOADSYMBOLSET:
- {
- char *name = (char *)wParam;
- char **symbols = LoadSymbolSet(name);
- HGLOBAL hMem;
-
- SetSymbols(hwndDlg, symbols);
- if(symbols) {
- hMem = GlobalHandle(symbols);
- GlobalUnlock(hMem);
- GlobalFree(hMem);
- }
- break;
- }
- case WM_MAKENSIS_SAVESYMBOLSET:
- {
- char *name = (char *)wParam;
- char **symbols = GetSymbols(hwndDlg);
- HGLOBAL hMem;
-
- if(symbols) {
- SaveSymbolSet(name, symbols);
- hMem = GlobalHandle(symbols);
- GlobalUnlock(hMem);
- GlobalFree(hMem);
- }
- break;
- }
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDOK:
- {
- ResetObjects();
- ResetSymbols();
- g_sdata.symbols = GetSymbols(hwndDlg);
-
- int n = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
- if (n >= (int)COMPRESSOR_SCRIPT && n <= (int)COMPRESSOR_BEST) {
- g_sdata.default_compressor = (NCOMPRESSOR)n;
- }
- else {
- g_sdata.default_compressor = COMPRESSOR_SCRIPT;
- }
- EndDialog(hwndDlg, TRUE);
- SetCompressor(g_sdata.default_compressor);
- }
- break;
- case IDCANCEL:
- EndDialog(hwndDlg, TRUE);
- break;
- case IDRIGHT:
- {
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_GETTEXTLENGTH, 0, 0);
- if(n > 0) {
- char *buf = (char *)GlobalAlloc(GPTR, (n+1)*sizeof(char));
- SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_GETTEXT, n+1, (LPARAM)buf);
- if(my_strstr(buf," ") || my_strstr(buf,"\t")) {
- MessageBox(hwndDlg,SYMBOLSERROR,"Error",MB_OK|MB_ICONSTOP);
- GlobalFree(buf);
- break;
- }
-
- n = SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_GETTEXTLENGTH, 0, 0);
- if(n > 0) {
- char *buf2 = (char *)GlobalAlloc(GPTR, (n+1)*sizeof(char));
- SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_GETTEXT, n+1, (LPARAM)buf2);
- char *buf3 = (char *)GlobalAlloc(GPTR, (lstrlen(buf)+lstrlen(buf2)+2)*sizeof(char));
- wsprintf(buf3,"%s=%s",buf,buf2);
- GlobalFree(buf);
- buf = buf3;
- GlobalFree(buf2);
- }
- int idx = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_ADDSTRING, 0, (LPARAM)buf);
- if (idx >= 0)
- {
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_SETSEL, FALSE, -1);
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_SETSEL, TRUE, idx);
- }
- EnableSymbolEditButtons(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_SETTEXT, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_SETTEXT, 0, 0);
- GlobalFree(buf);
- EnableSymbolSetButtons(hwndDlg);
- }
- }
- break;
- case IDLEFT:
- {
- if (SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0) != 1)
- break;
-
- int index;
- int num = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELITEMS, 1, (LPARAM) &index);
- if(num == 1) {
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXTLEN, (WPARAM)index, 0);
- if(n > 0) {
- char *buf = (char *)GlobalAlloc(GPTR, (n+1)*sizeof(char));
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXT, (WPARAM)index, (LPARAM)buf);
- char *p = my_strstr(buf,"=");
- if(p) {
- SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_SETTEXT, 0, (LPARAM)(p+1));
- *p=0;
- }
- SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_SETTEXT, 0, (LPARAM)buf);
- GlobalFree(buf);
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_DELETESTRING, (WPARAM)index, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
- EnableSymbolSetButtons(hwndDlg);
- }
- }
- }
- break;
- case IDCLEAR:
- {
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_RESETCONTENT , 0, 0);
- EnableSymbolSetButtons(hwndDlg);
- }
- break;
- case IDLOAD:
- {
- g_symbol_set_mode=1;
- DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_SYMBOLSET),hwndDlg,(DLGPROC)SymbolSetProc);
- }
- break;
- case IDSAVE:
- {
- g_symbol_set_mode=2;
- DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_SYMBOLSET),hwndDlg,(DLGPROC)SymbolSetProc);
- }
- break;
- case IDDEL:
- {
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0);
- int *items = (int *)GlobalAlloc(GPTR, n*sizeof(int));
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELITEMS, (WPARAM)n, (LPARAM)items);
- int i;
- for(i=n-1;i>=0;i--) {
- SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_DELETESTRING, (WPARAM)items[i], 0);
- }
- EnableSymbolEditButtons(hwndDlg);
- EnableSymbolSetButtons(hwndDlg);
- }
- break;
- case IDC_SYMBOL:
- if(HIWORD(wParam) == EN_CHANGE)
- {
- int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_GETTEXTLENGTH, 0, 0);
- if(n > 0) {
- EnableWindow(GetDlgItem(hwndDlg, IDRIGHT), TRUE);
- }
- else {
- EnableWindow(GetDlgItem(hwndDlg, IDRIGHT), FALSE);
- }
- }
- break;
- case IDC_SYMBOLS:
- if (HIWORD(wParam) == LBN_SELCHANGE)
- {
- EnableSymbolEditButtons(hwndDlg);
- }
- else if (HIWORD(wParam) == LBN_DBLCLK)
- {
- SendDlgItemMessage(hwndDlg, IDLEFT, BM_CLICK, 0, 0);
- }
- break;
- }
- break;
- }
- }
- return FALSE;
-}
-
-BOOL CALLBACK CompressorProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
- switch(msg) {
- case WM_INITDIALOG:
- {
- int i=0;
- LRESULT rv;
-
- for(i=(int)COMPRESSOR_SCRIPT; i<= (int)COMPRESSOR_BEST; i++) {
- rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_ADDSTRING, 0, (LPARAM)compressor_display_names[i]);
- }
- rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_SETCURSEL, (WPARAM)g_sdata.compressor, (LPARAM)0);
-
- SetFocus(GetDlgItem(hwndDlg, IDC_COMPRESSOR));
- break;
- }
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDOK:
- {
- int n;
- n = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
- if(n >= (int)COMPRESSOR_SCRIPT && n <= (int)COMPRESSOR_BEST) {
- SetCompressor((NCOMPRESSOR)n);
- }
- else {
- SetCompressor(g_sdata.default_compressor);
- }
-
- EndDialog(hwndDlg, 0);
- break;
- }
- case IDCANCEL:
- {
- EndDialog(hwndDlg, 1);
- LogMessage(g_sdata.hwnd,USAGE);
- break;
- }
- }
- break;
- }
- }
- return FALSE;
-}
-
-BOOL CALLBACK SymbolSetProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
- switch(msg) {
- case WM_INITDIALOG:
- {
- HWND hwndEdit;
- HKEY hKey;
-
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
- if (OpenRegSettingsKey(hKey)) {
- HKEY hSubKey;
-
- if (RegOpenKeyEx(hKey,REGSYMSUBKEY,0,KEY_READ,&hSubKey) == ERROR_SUCCESS) {
- char subkey[1024];
- int i=0;
-
- while (RegEnumKey(hSubKey,i,subkey,sizeof(subkey)) == ERROR_SUCCESS) {
- SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_ADDSTRING, 0, (LPARAM)subkey);
- i++;
- }
- RegCloseKey(hSubKey);
- }
- RegCloseKey(hKey);
- }
-
- hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), 0, 0, 0); // Handle of list
- hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), hwndEdit, 0, 0); //Handle of edit box
- SendMessage(hwndEdit, EM_LIMITTEXT, (WPARAM)SYMBOL_SET_NAME_MAXLEN, 0);
- if(g_symbol_set_mode == 1) { //Load
- SetWindowText(hwndDlg, LOAD_SYMBOL_SET_DLG_NAME);
- SetWindowText(GetDlgItem(hwndDlg, IDOK), LOAD_BUTTON_TEXT);
- SendMessage(hwndEdit, EM_SETREADONLY, (WPARAM)TRUE, 0);
- }
- else {
- SetWindowText(hwndDlg, SAVE_SYMBOL_SET_DLG_NAME);
- SetWindowText(GetDlgItem(hwndDlg, IDOK), SAVE_BUTTON_TEXT);
- }
- break;
- }
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDOK:
- {
- HWND hwndEdit;
- char name[SYMBOL_SET_NAME_MAXLEN+1];
-
- hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), 0, 0, 0); // Handle of list
- hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), hwndEdit, 0, 0); //Handle of edit box
- SendMessage(hwndEdit, WM_GETTEXT, (WPARAM)SYMBOL_SET_NAME_MAXLEN+1, (LPARAM)name);
- if(!lstrlen(name)) {
- if(g_symbol_set_mode == 1) { //Load
- MessageBox(hwndDlg,LOAD_SYMBOL_SET_MESSAGE,LOAD_SYMBOL_SET_DLG_NAME,MB_OK|MB_ICONEXCLAMATION);
- }
- else {
- MessageBox(hwndDlg,SAVE_SYMBOL_SET_MESSAGE,SAVE_SYMBOL_SET_DLG_NAME,MB_OK|MB_ICONEXCLAMATION);
- }
- }
- else {
- HWND hwndParent = GetParent(hwndDlg);
- if(g_symbol_set_mode == 1) { //Load
- SendMessage(hwndParent, WM_MAKENSIS_LOADSYMBOLSET, (WPARAM)name, (LPARAM)NULL);
- }
- else {
- SendMessage(hwndParent, WM_MAKENSIS_SAVESYMBOLSET, (WPARAM)name, (LPARAM)NULL);
- }
- EndDialog(hwndDlg, TRUE);
- }
- break;
- }
- case IDCANCEL:
- {
- EndDialog(hwndDlg, TRUE);
- break;
- }
- case IDDEL:
- {
- int n = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETCURSEL, 0, 0);
- if(n != CB_ERR) {
- long len = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETLBTEXTLEN, (WPARAM)n, 0);
- char *buf = (char *)GlobalAlloc(GPTR, (len+1)*sizeof(char));
- if(SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETLBTEXT, (WPARAM)n, (LPARAM)buf) != CB_ERR) {
- SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_DELETESTRING, n, 0);
- DeleteSymbolSet(buf);
- }
- GlobalFree(buf);
- }
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
- break;
- }
- case IDC_NAMES:
- {
- if(HIWORD(wParam) == CBN_SELCHANGE)
- {
- int n = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETCURSEL, 0, 0);
- if(n == CB_ERR) {
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
- }
- else {
- EnableWindow(GetDlgItem(hwndDlg, IDDEL), TRUE);
- }
- }
- else if(HIWORD(wParam) == CBN_DBLCLK)
- {
- int n = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETCURSEL, 0, 0);
- if (n != CB_ERR)
- {
- SendDlgItemMessage(hwndDlg, IDOK, BM_CLICK, 0, 0);
- }
- }
- break;
- }
- }
- break;
- }
- }
- return FALSE;
-}
-
-void SetCompressor(NCOMPRESSOR compressor)
-{
- int i;
-
- if(g_sdata.compressor != compressor) {
- WORD command;
- char *compressor_name;
-
- if(compressor > COMPRESSOR_SCRIPT && compressor < COMPRESSOR_BEST) {
- command = compressor_commands[(int)compressor];
- compressor_name = compressor_names[(int)compressor];
- }
- else if(compressor == COMPRESSOR_BEST) {
- command = compressor_commands[(int)compressor];
- compressor_name = compressor_names[(int)COMPRESSOR_SCRIPT+1];
- }
- else {
- compressor = COMPRESSOR_SCRIPT;
- command = IDM_COMPRESSOR_SCRIPT;
- compressor_name = "";
- }
- g_sdata.compressor = compressor;
- g_sdata.compressor_name = compressor_name;
- UpdateToolBarCompressorButton();
- for(i=(int)COMPRESSOR_SCRIPT; i<= (int)COMPRESSOR_BEST; i++) {
- CheckMenuItem(g_sdata.menu, compressor_commands[i], MF_BYCOMMAND | MF_UNCHECKED);
- }
- CheckMenuItem(g_sdata.menu, command, MF_BYCOMMAND | MF_CHECKED);
- ResetObjects();
- }
-}
-
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
+
+ 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.
+*/
+#define MAKENSISW_CPP
+
+#include "makensisw.h"
+#include <windowsx.h>
+#include <stdio.h>
+#include "resource.h"
+#include "noclib.h"
+#include "toolbar.h"
+#include "update.h"
+
+NSCRIPTDATA g_sdata;
+NRESIZEDATA g_resize;
+NFINDREPLACE g_find;
+extern NTOOLBAR g_toolbar;
+int g_symbol_set_mode;
+
+int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmdShow) {
+ MSG msg;
+ int status;
+ HACCEL haccel;
+
+ my_memset(&g_sdata,0,sizeof(NSCRIPTDATA));
+ my_memset(&g_resize,0,sizeof(NRESIZEDATA));
+ my_memset(&g_find,0,sizeof(NFINDREPLACE));
+ g_sdata.hInstance=GetModuleHandle(0);
+ g_sdata.symbols = NULL;
+ g_sdata.sigint_event = CreateEvent(NULL, FALSE, FALSE, "makensis win32 signint event");
+ RestoreSymbols();
+
+ HINSTANCE hRichEditDLL = LoadLibrary("RichEd32.dll");
+
+ if (!InitBranding()) {
+ MessageBox(0,NSISERROR,"Error",MB_ICONEXCLAMATION|MB_OK);
+ return 1;
+ }
+ ResetObjects();
+ HWND hDialog = CreateDialog(g_sdata.hInstance,MAKEINTRESOURCE(DLG_MAIN),0,DialogProc);
+ if (!hDialog) {
+ MessageBox(0,DLGERROR,"Error",MB_ICONEXCLAMATION|MB_OK);
+ return 1;
+ }
+ haccel = LoadAccelerators(g_sdata.hInstance, MAKEINTRESOURCE(IDK_ACCEL));
+ while ((status=GetMessage(&msg,0,0,0))!=0) {
+ if (status==-1) return -1;
+ if (!IsDialogMessage(g_find.hwndFind, &msg)) {
+ if (!TranslateAccelerator(hDialog,haccel,&msg)) {
+ if (!IsDialogMessage(hDialog,&msg)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+ }
+ }
+ if (g_sdata.script) GlobalFree(g_sdata.script);
+ if (g_sdata.script_cmd_args) GlobalFree(g_sdata.script_cmd_args);
+ if (g_sdata.sigint_event) CloseHandle(g_sdata.sigint_event);
+ FreeLibrary(hRichEditDLL);
+ FinalizeUpdate();
+ ExitProcess(msg.wParam);
+ return msg.wParam;
+}
+
+void SetScript(const char *script, bool clearArgs /*= true*/)
+{
+ if (g_sdata.script)
+ {
+ GlobalFree(g_sdata.script);
+ }
+
+ if (clearArgs)
+ {
+ if (g_sdata.script_cmd_args)
+ {
+ GlobalFree(g_sdata.script_cmd_args);
+ }
+
+ g_sdata.script_cmd_args = GlobalAlloc(GHND, 1);
+ }
+
+ g_sdata.script = (char *) GlobalAlloc(GPTR, lstrlen(script) + 1);
+ lstrcpy(g_sdata.script, script);
+}
+
+void AddScriptCmdArgs(const char *arg)
+{
+ g_sdata.script_cmd_args = GlobalReAlloc(g_sdata.script_cmd_args,
+ GlobalSize(g_sdata.script_cmd_args) + lstrlen(arg) + 2 /* quotes */ + 1 /* space */,
+ 0);
+
+ char *args = (char *) GlobalLock(g_sdata.script_cmd_args);
+
+ lstrcat(args, " \"");
+ lstrcat(args, arg);
+ lstrcat(args, "\"");
+
+ GlobalUnlock(g_sdata.script_cmd_args);
+}
+
+void ProcessCommandLine()
+{
+ int argc;
+ char **argv;
+ int i, j;
+ int argSpaceSize;
+
+ argSpaceSize = SetArgv((char *)GetCommandLine(), &argc, &argv);
+ if (argc > 1) {
+ for (i = 1; i < argc; i++)
+ {
+ if (!lstrncmpi(argv[i], "/XSetCompressor ", lstrlen("/XSetCompressor ")))
+ {
+ char *p = argv[i] + lstrlen("/XSetCompressor ");
+ if(!lstrncmpi(p,"/FINAL ", lstrlen("/FINAL ")))
+ {
+ p += lstrlen("/FINAL ");
+ }
+
+ while (*p == ' ') p++;
+
+ for (j = (int) COMPRESSOR_SCRIPT + 1; j < (int) COMPRESSOR_BEST; j++)
+ {
+ if (!lstrcmpi(p, compressor_names[j]))
+ {
+ SetCompressor((NCOMPRESSOR) j);
+ }
+ }
+ }
+ else if (!lstrcmpi(argv[i], "/ChooseCompressor"))
+ {
+ g_sdata.userSelectCompressor = TRUE;
+ }
+ else if (argv[i][0] == '-' || argv[i][0] == '/')
+ {
+ AddScriptCmdArgs(argv[i]);
+ }
+ else
+ {
+ SetScript(argv[i], false);
+ PushMRUFile(g_sdata.script);
+ break;
+ }
+ }
+ }
+
+ if (argSpaceSize)
+ GlobalFree(argv);
+}
+
+BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ switch (msg) {
+ case WM_INITDIALOG:
+ {
+ g_sdata.hwnd=hwndDlg;
+ HICON hIcon = LoadIcon(g_sdata.hInstance,MAKEINTRESOURCE(IDI_ICON));
+ SetClassLong(hwndDlg,GCL_HICON,(long)hIcon);
+ // Altered by Darren Owen (DrO) on 29/9/2003
+ // Added in receiving of mouse and key events from the richedit control
+ SendMessage(GetDlgItem(hwndDlg,IDC_LOGWIN),EM_SETEVENTMASK,(WPARAM)NULL,ENM_SELCHANGE|ENM_MOUSEEVENTS|ENM_KEYEVENTS);
+ DragAcceptFiles(g_sdata.hwnd,FALSE);
+ g_sdata.menu = GetMenu(g_sdata.hwnd);
+ g_sdata.fileSubmenu = FindSubMenu(g_sdata.menu, IDM_FILE);
+ g_sdata.editSubmenu = FindSubMenu(g_sdata.menu, IDM_EDIT);
+ g_sdata.toolsSubmenu = FindSubMenu(g_sdata.menu, IDM_TOOLS);
+ RestoreMRUList();
+ CreateToolBar();
+ InitTooltips(g_sdata.hwnd);
+ SetBranding(g_sdata.hwnd);
+ HFONT hFont = CreateFont(14,0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,OUT_CHARACTER_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FIXED_PITCH|FF_DONTCARE,"Courier New");
+ SendDlgItemMessage(hwndDlg,IDC_LOGWIN,WM_SETFONT,(WPARAM)hFont,0);
+ RestoreWindowPos(g_sdata.hwnd);
+ RestoreCompressor();
+ SetScript("");
+ g_sdata.compressor = COMPRESSOR_NONE_SELECTED;
+ g_sdata.userSelectCompressor = FALSE;
+
+ ProcessCommandLine();
+
+ if(g_sdata.compressor == COMPRESSOR_NONE_SELECTED) {
+ SetCompressor(g_sdata.default_compressor);
+ }
+
+ if(g_sdata.userSelectCompressor) {
+ if (DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_COMPRESSOR),g_sdata.hwnd,(DLGPROC)CompressorProc)) {
+ EnableItems(g_sdata.hwnd);
+ return TRUE;
+ }
+ }
+
+ CompileNSISScript();
+ return TRUE;
+ }
+ case WM_PAINT:
+ {
+ PAINTSTRUCT ps;
+ GetClientRect(g_sdata.hwnd, &g_resize.griprect);
+ HDC hdc = BeginPaint(g_sdata.hwnd, &ps);
+ g_resize.griprect.left = g_resize.griprect.right - GetSystemMetrics(SM_CXVSCROLL);
+ g_resize.griprect.top = g_resize.griprect.bottom - GetSystemMetrics(SM_CYVSCROLL);
+ DrawFrameControl(hdc, &g_resize.griprect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
+ EndPaint(g_sdata.hwnd,&ps);
+ return TRUE;
+ }
+ case WM_DESTROY:
+ {
+ DragAcceptFiles(g_sdata.hwnd,FALSE);
+ SaveSymbols();
+ SaveCompressor();
+ SaveMRUList();
+ SaveWindowPos(g_sdata.hwnd);
+ ImageList_Destroy(g_toolbar.imagelist);
+ ImageList_Destroy(g_toolbar.imagelistd);
+ ImageList_Destroy(g_toolbar.imagelisth);
+ DestroyTooltips();
+ PostQuitMessage(0);
+ return TRUE;
+ }
+ case WM_CLOSE:
+ {
+ if (!g_sdata.thread) {
+ DestroyWindow(hwndDlg);
+ }
+ return TRUE;
+ }
+ case WM_DROPFILES: {
+ int num;
+ char szTmp[MAX_PATH];
+ num = DragQueryFile((HDROP)wParam,(UINT)-1,NULL,0);
+ if (num==1) {
+ DragQueryFile((HDROP)wParam,0,szTmp,MAX_PATH);
+ if (lstrlen(szTmp)>0) {
+ SetScript(szTmp);
+ PushMRUFile(g_sdata.script);
+ ResetObjects();
+ CompileNSISScript();
+ }
+ } else {
+ MessageBox(hwndDlg,MULTIDROPERROR,"Error",MB_OK|MB_ICONSTOP);
+ }
+ DragFinish((HDROP)wParam);
+ break;
+ }
+ case WM_GETMINMAXINFO:
+ {
+ ((MINMAXINFO*)lParam)->ptMinTrackSize.x=MINWIDTH;
+ ((MINMAXINFO*)lParam)->ptMinTrackSize.y=MINHEIGHT;
+ }
+ case WM_ENTERSIZEMOVE:
+ {
+ GetClientRect(g_sdata.hwnd, &g_resize.resizeRect);
+ return TRUE;
+ }
+ case WM_SIZE:
+ {
+ if ((wParam == SIZE_MAXHIDE)||(wParam == SIZE_MAXSHOW)) return TRUE;
+ RECT rSize;
+ if (hwndDlg == g_sdata.hwnd) {
+ GetClientRect(g_sdata.hwnd, &rSize);
+ if (((rSize.right==0)&&(rSize.bottom==0))||((g_resize.resizeRect.right==0)&&(g_resize.resizeRect.bottom==0))) return TRUE;
+ g_resize.dx = rSize.right - g_resize.resizeRect.right;
+ g_resize.dy = rSize.bottom - g_resize.resizeRect.bottom;
+ EnumChildWindows(g_sdata.hwnd, DialogResize, (LPARAM)0);
+ g_resize.resizeRect = rSize;
+ }
+ return TRUE;
+ }
+ case WM_SIZING:
+ {
+ InvalidateRect(g_sdata.hwnd,&g_resize.griprect,TRUE);
+ GetClientRect(g_sdata.hwnd, &g_resize.griprect);
+ g_resize.griprect.left = g_resize.griprect.right - GetSystemMetrics(SM_CXVSCROLL);
+ g_resize.griprect.top = g_resize.griprect.bottom - GetSystemMetrics(SM_CYVSCROLL);
+ return TRUE;
+ }
+ case WM_MAKENSIS_PROCESSCOMPLETE:
+ {
+ if (g_sdata.thread) {
+ CloseHandle(g_sdata.thread);
+ g_sdata.thread=0;
+ }
+ if(g_sdata.compressor == COMPRESSOR_BEST) {
+ if (g_sdata.retcode==0 && FileExists(g_sdata.output_exe)) {
+ char temp_file_name[1024];
+ wsprintf(temp_file_name,"%s_makensisw_temp",g_sdata.output_exe);
+ if(!lstrcmpi(g_sdata.compressor_name,compressor_names[(int)COMPRESSOR_SCRIPT+1])) {
+ SetCompressorStats();
+ CopyFile(g_sdata.output_exe,temp_file_name,false);
+ g_sdata.best_compressor_name = g_sdata.compressor_name;
+ g_sdata.compressor_name = compressor_names[(int)COMPRESSOR_SCRIPT+2];
+ ResetObjects();
+
+ CompileNSISScript();
+ return TRUE;
+ }
+ else {
+ int this_compressor=0;
+ int last_compressor;
+ int i;
+ HANDLE hPrev, hThis;
+ DWORD prevSize=0, thisSize=0;
+
+
+ for(i=(int)COMPRESSOR_SCRIPT+2; i<(int)COMPRESSOR_BEST; i++) {
+ if(!lstrcmpi(g_sdata.compressor_name,compressor_names[i])) {
+ this_compressor = i;
+ last_compressor = i-1;
+ break;
+ }
+ }
+
+ if(FileExists(temp_file_name)) {
+ hPrev = CreateFile(temp_file_name,GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, (DWORD)NULL, NULL);
+ if(hPrev != INVALID_HANDLE_VALUE) {
+ prevSize = GetFileSize(hPrev, 0);
+ CloseHandle(hPrev);
+
+ if(prevSize != INVALID_FILE_SIZE) {
+ hThis = CreateFile(g_sdata.output_exe,GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, (DWORD)NULL, NULL);
+ if(hThis != INVALID_HANDLE_VALUE) {
+ thisSize = GetFileSize(hThis, 0);
+ CloseHandle(hThis);
+
+ if(thisSize != INVALID_FILE_SIZE) {
+ if(prevSize > thisSize) {
+ CopyFile(g_sdata.output_exe,temp_file_name,false);
+ SetCompressorStats();
+ g_sdata.best_compressor_name = g_sdata.compressor_name;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if(this_compressor == ((int)COMPRESSOR_BEST - 1)) {
+ char buf[1024];
+
+ g_sdata.compressor_name = compressor_names[(int)COMPRESSOR_SCRIPT+1];
+
+ if(!lstrcmpi(g_sdata.best_compressor_name,compressor_names[this_compressor])) {
+ wsprintf(buf,COMPRESSOR_MESSAGE,g_sdata.best_compressor_name,thisSize);
+ LogMessage(g_sdata.hwnd,buf);
+ }
+ else {
+ CopyFile(temp_file_name,g_sdata.output_exe,false);
+ wsprintf(buf,RESTORED_COMPRESSOR_MESSAGE,g_sdata.best_compressor_name,prevSize);
+ LogMessage(g_sdata.hwnd,buf);
+ LogMessage(g_sdata.hwnd, g_sdata.compressor_stats);
+ }
+ DeleteFile(temp_file_name);
+ lstrcpy(g_sdata.compressor_stats,"");
+ }
+ else {
+ g_sdata.compressor_name = compressor_names[this_compressor+1];
+ ResetObjects();
+
+ CompileNSISScript();
+ return TRUE;
+ }
+ }
+ }
+ }
+ EnableItems(g_sdata.hwnd);
+ if (!g_sdata.retcode) {
+ MessageBeep(MB_ICONASTERISK);
+ if (g_sdata.warnings)
+ SetTitle(g_sdata.hwnd,"Finished with Warnings");
+ else
+ SetTitle(g_sdata.hwnd,"Finished Sucessfully");
+ // Added by Darren Owen (DrO) on 1/10/2003
+ if(g_sdata.recompile_test)
+ PostMessage(g_sdata.hwnd, WM_COMMAND, LOWORD(IDC_TEST), 0);
+ }
+ else {
+ MessageBeep(MB_ICONEXCLAMATION);
+ SetTitle(g_sdata.hwnd,"Compile Error: See Log for Details");
+ }
+
+ // Added by Darren Owen (DrO) on 1/10/2003
+ // ensures the recompile and run state is reset after use
+ g_sdata.recompile_test = 0;
+ DragAcceptFiles(g_sdata.hwnd,TRUE);
+ return TRUE;
+ }
+ case WM_NOTIFY:
+ switch (((NMHDR*)lParam)->code ) {
+ case EN_SELCHANGE:
+ SendDlgItemMessage(hwndDlg,IDC_LOGWIN, EM_EXGETSEL, 0, (LPARAM) &g_sdata.textrange);
+ {
+ BOOL enabled = (g_sdata.textrange.cpMax-g_sdata.textrange.cpMin<=0?FALSE:TRUE);
+ EnableMenuItem(g_sdata.menu,IDM_COPYSELECTED,(enabled?MF_ENABLED:MF_GRAYED));
+ EnableToolBarButton(IDM_COPY,enabled);
+ }
+ // Altered by Darren Owen (DrO) on 6/10/2003
+ // Allows the detection of the right-click menu when running on OSes below Windows 2000
+ // and will then simulate the effective WM_CONTEXTMENU message that would be received
+ // note: removed the WM_CONTEXTMENU handling to prevent a duplicate menu appearing on
+ // Windows 2000 and higher
+ case EN_MSGFILTER:
+ #define lpnmMsg ((MSGFILTER*)lParam)
+ if(WM_RBUTTONUP == lpnmMsg->msg || WM_KEYUP == lpnmMsg->msg && lpnmMsg->wParam == VK_APPS){
+ POINT pt;
+ HWND edit = GetDlgItem(g_sdata.hwnd,IDC_LOGWIN);
+ RECT r;
+ GetCursorPos(&pt);
+
+ // Added and altered by Darren Owen (DrO) on 29/9/2003
+ // Will place the right-click menu in the top left corner of the window
+ // if the application key is pressed and the mouse is not in the window
+ // from here...
+ ScreenToClient(edit, &pt);
+ GetClientRect(edit, &r);
+ if(!PtInRect(&r, pt))
+ pt.x = pt.y = 0;
+ MapWindowPoints(edit, HWND_DESKTOP, &pt, 1);
+ TrackPopupMenu(g_sdata.editSubmenu, TPM_LEFTALIGN | TPM_LEFTBUTTON | TPM_RIGHTBUTTON, pt.x, pt.y, 0, g_sdata.hwnd, 0);
+ }
+ case TBN_DROPDOWN:
+ {
+ LPNMTOOLBAR pToolBar = (LPNMTOOLBAR) lParam;
+ if(pToolBar->hdr.hwndFrom == g_toolbar.hwnd && pToolBar->iItem == IDM_COMPRESSOR) {
+ ShowToolbarDropdownMenu();
+ return TBDDRET_DEFAULT;
+ }
+ else {
+ return TBDDRET_NODEFAULT;
+ }
+ }
+ }
+ return TRUE;
+ case WM_COPYDATA:
+ {
+ PCOPYDATASTRUCT cds = PCOPYDATASTRUCT(lParam);
+ switch (cds->dwData) {
+ case MAKENSIS_NOTIFY_SCRIPT:
+ if (g_sdata.input_script) GlobalFree(g_sdata.input_script);
+ g_sdata.input_script = (char *)GlobalAlloc(GPTR, cds->cbData);
+ lstrcpy(g_sdata.input_script, (char *)cds->lpData);
+ break;
+ case MAKENSIS_NOTIFY_WARNING:
+ g_sdata.warnings++;
+ break;
+ case MAKENSIS_NOTIFY_ERROR:
+ break;
+ case MAKENSIS_NOTIFY_OUTPUT:
+ if (g_sdata.output_exe) GlobalFree(g_sdata.output_exe);
+ g_sdata.output_exe = (char *)GlobalAlloc(GPTR, cds->cbData);
+ lstrcpy(g_sdata.output_exe, (char *)cds->lpData);
+ break;
+ }
+ return TRUE;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDM_BROWSESCR: {
+ if (g_sdata.input_script) {
+ char str[MAX_PATH],*str2;
+ lstrcpy(str,g_sdata.input_script);
+ str2=my_strrchr(str,'\\');
+ if(str2!=NULL) *str2=0;
+ ShellExecute(g_sdata.hwnd,"open",str,NULL,NULL,SW_SHOWNORMAL);
+ }
+ return TRUE;
+ }
+ case IDM_ABOUT:
+ {
+ DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_ABOUT),g_sdata.hwnd,(DLGPROC)AboutProc);
+ return TRUE;
+ }
+ case IDM_NSISHOME:
+ {
+ ShellExecute(g_sdata.hwnd,"open",NSIS_URL,NULL,NULL,SW_SHOWNORMAL);
+ return TRUE;
+ }
+ case IDM_FORUM:
+ {
+ ShellExecute(g_sdata.hwnd,"open",NSIS_FOR,NULL,NULL,SW_SHOWNORMAL);
+ return TRUE;
+ }
+ case IDM_NSISUPDATE:
+ {
+ Update();
+ return TRUE;
+ }
+ case IDM_SELECTALL:
+ {
+ SendDlgItemMessage(g_sdata.hwnd, IDC_LOGWIN, EM_SETSEL, 0, -1);
+ return TRUE;
+ }
+ case IDM_DOCS:
+ {
+ ShowDocs();
+ return TRUE;
+ }
+ case IDM_LOADSCRIPT:
+ {
+ if (!g_sdata.thread) {
+ OPENFILENAME l={sizeof(l),};
+ char buf[MAX_PATH];
+ l.hwndOwner = hwndDlg;
+ l.lpstrFilter = "NSIS Script (*.nsi)\0*.nsi\0All Files (*.*)\0*.*\0";
+ l.lpstrFile = buf;
+ l.nMaxFile = MAX_STRING-1;
+ l.lpstrTitle = "Load Script";
+ l.lpstrDefExt = "log";
+ l.lpstrFileTitle = NULL;
+ l.lpstrInitialDir = NULL;
+ l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER|OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST;
+ lstrcpy(buf,"");
+ if (GetOpenFileName(&l)) {
+ SetScript(buf);
+ PushMRUFile(g_sdata.script);
+ ResetObjects();
+ CompileNSISScript();
+ }
+ }
+ return TRUE;
+ }
+ case IDM_MRU_FILE:
+ case IDM_MRU_FILE+1:
+ case IDM_MRU_FILE+2:
+ case IDM_MRU_FILE+3:
+ case IDM_MRU_FILE+4:
+ LoadMRUFile(LOWORD(wParam)-IDM_MRU_FILE);
+ return TRUE;
+ case IDM_CLEAR_MRU_LIST:
+ ClearMRUList();
+ return TRUE;
+ case IDM_COMPRESSOR:
+ {
+ SetCompressor((NCOMPRESSOR)(g_sdata.compressor+1));
+ return TRUE;
+ }
+ case IDM_CLEARLOG:
+ {
+ if (!g_sdata.thread) {
+ ClearLog(g_sdata.hwnd);
+ }
+ return TRUE;
+ }
+ case IDM_RECOMPILE:
+ {
+ CompileNSISScript();
+ return TRUE;
+ }
+ // Added by Darren Owen (DrO) on 1/10/2003
+ case IDM_RECOMPILE_TEST:
+ case IDC_RECOMPILE_TEST:
+ {
+ g_sdata.recompile_test = 1;
+ CompileNSISScript();
+ return TRUE;
+ }
+ case IDM_SETTINGS:
+ {
+ DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_SETTINGS),g_sdata.hwnd,(DLGPROC)SettingsProc);
+ return TRUE;
+ }
+ case IDM_TEST:
+ case IDC_TEST:
+ {
+ if (g_sdata.output_exe) {
+ ShellExecute(g_sdata.hwnd,"open",g_sdata.output_exe,NULL,NULL,SW_SHOWNORMAL);
+ }
+ return TRUE;
+ }
+ case IDM_EDITSCRIPT:
+ {
+ if (g_sdata.input_script) {
+ if ((int)ShellExecute(g_sdata.hwnd,"open",g_sdata.input_script,NULL,NULL,SW_SHOWNORMAL)<=32) {
+ char path[MAX_PATH];
+ if (GetWindowsDirectory(path,sizeof(path))) {
+ lstrcat(path,"\\notepad.exe");
+ ShellExecute(g_sdata.hwnd,"open",path,g_sdata.input_script,NULL,SW_SHOWNORMAL);
+ }
+ }
+ }
+ return TRUE;
+ }
+ case IDCANCEL:
+ case IDM_EXIT:
+ {
+ if (!g_sdata.thread) {
+ DestroyWindow(g_sdata.hwnd);
+ }
+ return TRUE;
+ }
+ case IDM_CANCEL:
+ {
+ SetEvent(g_sdata.sigint_event);
+ return TRUE;
+ }
+ case IDM_COPY:
+ {
+ CopyToClipboard(g_sdata.hwnd);
+ return TRUE;
+ }
+ case IDM_COPYSELECTED:
+ {
+ SendDlgItemMessage(g_sdata.hwnd,IDC_LOGWIN, WM_COPY, 0, 0);
+ return TRUE;
+ }
+ case IDM_SAVE:
+ {
+ OPENFILENAME l={sizeof(l),};
+ char buf[MAX_STRING];
+ l.hwndOwner = hwndDlg;
+ l.lpstrFilter = "Log Files (*.log)\0*.log\0Text Files (*.txt)\0*.txt\0All Files (*.*)\0*.*\0";
+ l.lpstrFile = buf;
+ l.nMaxFile = MAX_STRING-1;
+ l.lpstrTitle = "Save Output";
+ l.lpstrDefExt = "log";
+ l.lpstrInitialDir = NULL;
+ l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER|OFN_PATHMUSTEXIST;
+ lstrcpy(buf,"output");
+ if (GetSaveFileName(&l)) {
+ HANDLE hFile = CreateFile(buf,GENERIC_WRITE,0,0,CREATE_ALWAYS,0,0);
+ if (hFile) {
+ int len=SendDlgItemMessage(g_sdata.hwnd,IDC_LOGWIN,WM_GETTEXTLENGTH,0,0);
+ char *existing_text=(char*)GlobalAlloc(GPTR,len);
+ existing_text[0]=0;
+ GetDlgItemText(g_sdata.hwnd, IDC_LOGWIN, existing_text, len);
+ DWORD dwWritten = 0;
+ WriteFile(hFile,existing_text,len,&dwWritten,0);
+ CloseHandle(hFile);
+ GlobalFree(existing_text);
+ }
+ }
+ return TRUE;
+ }
+ case IDM_FIND:
+ {
+ if (!g_find.uFindReplaceMsg) g_find.uFindReplaceMsg = RegisterWindowMessage(FINDMSGSTRING);
+ my_memset(&g_find.fr, 0, sizeof(FINDREPLACE));
+ g_find.fr.lStructSize = sizeof(FINDREPLACE);
+ g_find.fr.hwndOwner = hwndDlg;
+ g_find.fr.Flags = FR_NOUPDOWN;
+ g_find.fr.lpstrFindWhat = (char *)GlobalAlloc(GPTR, 128);
+ if (!g_find.fr.lpstrFindWhat) return TRUE;
+ g_find.fr.wFindWhatLen = 128;
+ g_find.hwndFind = FindText(&g_find.fr);
+ return TRUE;
+ }
+ default:
+ {
+ int i;
+ DWORD command = LOWORD(wParam);
+ for(i=(int)COMPRESSOR_SCRIPT; i<=(int)COMPRESSOR_BEST; i++) {
+ if(command == compressor_commands[i]) {
+ SetCompressor((NCOMPRESSOR)i);
+ return TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+ if (g_find.uFindReplaceMsg && msg == g_find.uFindReplaceMsg) {
+ LPFINDREPLACE lpfr = (LPFINDREPLACE)lParam;
+ if (lpfr->Flags & FR_FINDNEXT) {
+ WPARAM flags = FR_DOWN;
+ if (lpfr->Flags & FR_MATCHCASE) flags |= FR_MATCHCASE;
+ if (lpfr->Flags & FR_WHOLEWORD) flags |= FR_WHOLEWORD;
+ FINDTEXTEX ft;
+ SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_EXGETSEL, 0, (LPARAM)&ft.chrg);
+ if (ft.chrg.cpMax == ft.chrg.cpMin) ft.chrg.cpMin = 0;
+ else ft.chrg.cpMin = ft.chrg.cpMax;
+ ft.chrg.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, WM_GETTEXTLENGTH, 0, 0);
+ ft.lpstrText = lpfr->lpstrFindWhat;
+ ft.chrg.cpMin = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_FINDTEXTEX, flags, (LPARAM)&ft);
+ if (ft.chrg.cpMin != -1) SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_SETSEL, ft.chrgText.cpMin, ft.chrgText.cpMax);
+ else MessageBeep(MB_ICONASTERISK);
+ }
+ if (lpfr->Flags & FR_DIALOGTERM) g_find.hwndFind = 0;
+ return TRUE;
+ }
+ return 0;
+}
+
+DWORD WINAPI MakeNSISProc(LPVOID p) {
+ STARTUPINFO si={sizeof(si),};
+ SECURITY_ATTRIBUTES sa={sizeof(sa),};
+ SECURITY_DESCRIPTOR sd={0,};
+ PROCESS_INFORMATION pi={0,};
+ HANDLE newstdout=0,read_stdout=0;
+ HANDLE newstdin=0,read_stdin=0;
+ OSVERSIONINFO osv={sizeof(osv)};
+ GetVersionEx(&osv);
+ if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
+ SetSecurityDescriptorDacl(&sd,true,NULL,false);
+ sa.lpSecurityDescriptor = &sd;
+ }
+ else sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = true;
+ if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) {
+ ErrorMessage(g_sdata.hwnd,"There was an error creating the output pipe.");
+ PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
+ return 1;
+ }
+ if (!CreatePipe(&read_stdin,&newstdin,&sa,0)) {
+ ErrorMessage(g_sdata.hwnd,"There was an error creating the input pipe.");
+ PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
+ return 1;
+ }
+ GetStartupInfo(&si);
+ si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ si.wShowWindow = SW_HIDE;
+ si.hStdOutput = newstdout;
+ si.hStdError = newstdout;
+ si.hStdInput = newstdin;
+ if (!CreateProcess(NULL,g_sdata.compile_command,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
+ char buf[MAX_STRING];
+ wsprintf(buf,"Could not execute:\r\n %s.",g_sdata.compile_command);
+ ErrorMessage(g_sdata.hwnd,buf);
+ CloseHandle(newstdout);
+ CloseHandle(read_stdout);
+ PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
+ return 1;
+ }
+ char szBuf[1024];
+ DWORD dwRead = 1;
+ DWORD dwExit = !STILL_ACTIVE;
+ while (dwExit == STILL_ACTIVE || dwRead) {
+ PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
+ if (dwRead) {
+ ReadFile(read_stdout, szBuf, sizeof(szBuf)-1, &dwRead, NULL);
+ szBuf[dwRead] = 0;
+ LogMessage(g_sdata.hwnd, szBuf);
+ }
+ else Sleep(TIMEOUT);
+ GetExitCodeProcess(pi.hProcess, &dwExit);
+ // Make sure we have no data before killing getting out of the loop
+ if (dwExit != STILL_ACTIVE) {
+ PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
+ }
+ }
+
+ g_sdata.retcode = dwExit;
+ CloseHandle(pi.hThread);
+ CloseHandle(pi.hProcess);
+ CloseHandle(newstdout);
+ CloseHandle(read_stdout);
+ CloseHandle(newstdin);
+ CloseHandle(read_stdin);
+ PostMessage(g_sdata.hwnd,WM_MAKENSIS_PROCESSCOMPLETE,0,0);
+ return 0;
+}
+
+BOOL CALLBACK DialogResize(HWND hWnd, LPARAM /* unused */)
+{
+ RECT r;
+ GetWindowRect(hWnd, &r);
+ ScreenToClient(g_sdata.hwnd, (LPPOINT)&r);
+ ScreenToClient(g_sdata.hwnd, ((LPPOINT)&r)+1);
+ if(hWnd != g_toolbar.hwnd) {
+ switch (GetDlgCtrlID(hWnd)) {
+ case IDC_LOGWIN:
+ SetWindowPos(hWnd, 0, r.left, r.top,r.right - r.left + g_resize.dx, r.bottom - r.top + g_resize.dy, SWP_NOZORDER|SWP_NOMOVE);
+ break;
+ case IDC_TEST:
+ case IDCANCEL:
+ SetWindowPos(hWnd, 0, r.left + g_resize.dx, r.top + g_resize.dy, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
+ break;
+ default:
+ SetWindowPos(hWnd, 0, r.left, r.top + g_resize.dy, r.right - r.left + g_resize.dx, r.bottom - r.top, SWP_NOZORDER);
+ break;
+ }
+ }
+ else {
+ RECT r2;
+ GetWindowRect(g_toolbar.hwnd, &r2);
+ SetWindowPos(hWnd, 0, 0, 0, r.right - r.left + g_resize.dx, r2.bottom-r2.top, SWP_NOMOVE|SWP_NOZORDER);
+ }
+ RedrawWindow(hWnd,NULL,NULL,RDW_INVALIDATE);
+ return TRUE;
+}
+
+BOOL CALLBACK AboutProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ HFONT bfont = CreateFont(13,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
+ OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
+ FIXED_PITCH|FF_DONTCARE, "Tahoma");
+ HFONT bfontb = CreateFont(13,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
+ OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
+ FIXED_PITCH|FF_DONTCARE, "Tahoma");
+ HFONT rfont = CreateFont(12,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
+ OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
+ FIXED_PITCH|FF_DONTCARE, "MS Shell Dlg");
+ HFONT rfontb = CreateFont(12,0,0,0,FW_BOLD,FALSE,FALSE,FALSE,DEFAULT_CHARSET,
+ OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
+ FIXED_PITCH|FF_DONTCARE, "MS Shell Dlg");
+ if (bfont&&bfontb) {
+ SendDlgItemMessage(hwndDlg, IDC_ABOUTVERSION, WM_SETFONT, (WPARAM)bfontb, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_ABOUTCOPY, WM_SETFONT, (WPARAM)bfont, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_ABOUTPORTIONS, WM_SETFONT, (WPARAM)bfont, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_NSISVER, WM_SETFONT, (WPARAM)bfont, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_OTHERCONTRIB, WM_SETFONT, (WPARAM)bfont, FALSE);
+ }
+ else if (rfont&&rfontb) {
+ SendDlgItemMessage(hwndDlg, IDC_ABOUTVERSION, WM_SETFONT, (WPARAM)rfontb, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_ABOUTCOPY, WM_SETFONT, (WPARAM)rfont, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_ABOUTPORTIONS, WM_SETFONT, (WPARAM)rfont, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_NSISVER, WM_SETFONT, (WPARAM)rfont, FALSE);
+ SendDlgItemMessage(hwndDlg, IDC_OTHERCONTRIB, WM_SETFONT, (WPARAM)rfont, FALSE);
+ }
+ SetDlgItemText(hwndDlg,IDC_NSISVER,g_sdata.branding);
+ SetDlgItemText(hwndDlg,IDC_ABOUTVERSION,NSISW_VERSION);
+ SetDlgItemText(hwndDlg,IDC_ABOUTCOPY,COPYRIGHT);
+ SetDlgItemText(hwndDlg,IDC_OTHERCONTRIB,CONTRIB);
+ break;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ EndDialog(hwndDlg, TRUE);
+ break;
+ }
+ }
+ }
+ return FALSE;
+}
+
+void EnableSymbolSetButtons(HWND hwndDlg)
+{
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETCOUNT, 0, 0);
+ if(n > 0) {
+ EnableWindow(GetDlgItem(hwndDlg, IDCLEAR), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDSAVE), TRUE);
+ }
+ else {
+ EnableWindow(GetDlgItem(hwndDlg, IDCLEAR), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDSAVE), FALSE);
+ }
+}
+
+void EnableSymbolEditButtons(HWND hwndDlg)
+{
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0);
+ if(n == 0) {
+ EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
+ }
+ else if(n == 1) {
+ EnableWindow(GetDlgItem(hwndDlg, IDLEFT), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), TRUE);
+ }
+ else if(n > 1) {
+ EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), TRUE);
+ }
+}
+
+void SetSymbols(HWND hwndDlg, char **symbols)
+{
+ int i = 0;
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_RESETCONTENT , 0, 0);
+ if (symbols) {
+ while (symbols[i]) {
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_ADDSTRING, 0, (LPARAM)symbols[i]);
+ i++;
+ }
+ }
+ EnableSymbolSetButtons(hwndDlg);
+ EnableWindow(GetDlgItem(hwndDlg, IDRIGHT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
+}
+
+char **GetSymbols(HWND hwndDlg)
+{
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETCOUNT, 0, 0);
+ char **symbols = NULL;
+ if(n > 0) {
+ HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, (n+1)*sizeof(char *));
+ symbols = (char **)GlobalLock(hMem);
+ for (int i = 0; i < n; i++) {
+ int len = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXTLEN, (WPARAM)i, 0);
+ symbols[i] = (char *)GlobalAlloc(GPTR, (len+1)*sizeof(char));
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXT, (WPARAM)i, (LPARAM)symbols[i]);
+ }
+ symbols[n] = NULL;
+ }
+
+ return symbols;
+}
+
+BOOL CALLBACK SettingsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ int i = 0;
+ LRESULT rv;
+
+ for(i = (int)COMPRESSOR_SCRIPT; i <= (int)COMPRESSOR_BEST; i++) {
+ rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_ADDSTRING, 0, (LPARAM)compressor_display_names[i]);
+ }
+ rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_SETCURSEL, (WPARAM)g_sdata.default_compressor, (LPARAM)0);
+
+ SetSymbols(hwndDlg, g_sdata.symbols);
+ SetFocus(GetDlgItem(hwndDlg, IDC_SYMBOL));
+ break;
+ }
+ case WM_MAKENSIS_LOADSYMBOLSET:
+ {
+ char *name = (char *)wParam;
+ char **symbols = LoadSymbolSet(name);
+ HGLOBAL hMem;
+
+ SetSymbols(hwndDlg, symbols);
+ if(symbols) {
+ hMem = GlobalHandle(symbols);
+ GlobalUnlock(hMem);
+ GlobalFree(hMem);
+ }
+ break;
+ }
+ case WM_MAKENSIS_SAVESYMBOLSET:
+ {
+ char *name = (char *)wParam;
+ char **symbols = GetSymbols(hwndDlg);
+ HGLOBAL hMem;
+
+ if(symbols) {
+ SaveSymbolSet(name, symbols);
+ hMem = GlobalHandle(symbols);
+ GlobalUnlock(hMem);
+ GlobalFree(hMem);
+ }
+ break;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ {
+ ResetObjects();
+ ResetSymbols();
+ g_sdata.symbols = GetSymbols(hwndDlg);
+
+ int n = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
+ if (n >= (int)COMPRESSOR_SCRIPT && n <= (int)COMPRESSOR_BEST) {
+ g_sdata.default_compressor = (NCOMPRESSOR)n;
+ }
+ else {
+ g_sdata.default_compressor = COMPRESSOR_SCRIPT;
+ }
+ EndDialog(hwndDlg, TRUE);
+ SetCompressor(g_sdata.default_compressor);
+ }
+ break;
+ case IDCANCEL:
+ EndDialog(hwndDlg, TRUE);
+ break;
+ case IDRIGHT:
+ {
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_GETTEXTLENGTH, 0, 0);
+ if(n > 0) {
+ char *buf = (char *)GlobalAlloc(GPTR, (n+1)*sizeof(char));
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_GETTEXT, n+1, (LPARAM)buf);
+ if(my_strstr(buf," ") || my_strstr(buf,"\t")) {
+ MessageBox(hwndDlg,SYMBOLSERROR,"Error",MB_OK|MB_ICONSTOP);
+ GlobalFree(buf);
+ break;
+ }
+
+ n = SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_GETTEXTLENGTH, 0, 0);
+ if(n > 0) {
+ char *buf2 = (char *)GlobalAlloc(GPTR, (n+1)*sizeof(char));
+ SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_GETTEXT, n+1, (LPARAM)buf2);
+ char *buf3 = (char *)GlobalAlloc(GPTR, (lstrlen(buf)+lstrlen(buf2)+2)*sizeof(char));
+ wsprintf(buf3,"%s=%s",buf,buf2);
+ GlobalFree(buf);
+ buf = buf3;
+ GlobalFree(buf2);
+ }
+ int idx = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_ADDSTRING, 0, (LPARAM)buf);
+ if (idx >= 0)
+ {
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_SETSEL, FALSE, -1);
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_SETSEL, TRUE, idx);
+ }
+ EnableSymbolEditButtons(hwndDlg);
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_SETTEXT, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_SETTEXT, 0, 0);
+ GlobalFree(buf);
+ EnableSymbolSetButtons(hwndDlg);
+ }
+ }
+ break;
+ case IDLEFT:
+ {
+ if (SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0) != 1)
+ break;
+
+ int index;
+ int num = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELITEMS, 1, (LPARAM) &index);
+ if(num == 1) {
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXTLEN, (WPARAM)index, 0);
+ if(n > 0) {
+ char *buf = (char *)GlobalAlloc(GPTR, (n+1)*sizeof(char));
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETTEXT, (WPARAM)index, (LPARAM)buf);
+ char *p = my_strstr(buf,"=");
+ if(p) {
+ SendDlgItemMessage(hwndDlg, IDC_VALUE, WM_SETTEXT, 0, (LPARAM)(p+1));
+ *p=0;
+ }
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_SETTEXT, 0, (LPARAM)buf);
+ GlobalFree(buf);
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_DELETESTRING, (WPARAM)index, 0);
+ EnableWindow(GetDlgItem(hwndDlg, IDLEFT), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
+ EnableSymbolSetButtons(hwndDlg);
+ }
+ }
+ }
+ break;
+ case IDCLEAR:
+ {
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_RESETCONTENT , 0, 0);
+ EnableSymbolSetButtons(hwndDlg);
+ }
+ break;
+ case IDLOAD:
+ {
+ g_symbol_set_mode=1;
+ DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_SYMBOLSET),hwndDlg,(DLGPROC)SymbolSetProc);
+ }
+ break;
+ case IDSAVE:
+ {
+ g_symbol_set_mode=2;
+ DialogBox(g_sdata.hInstance,MAKEINTRESOURCE(DLG_SYMBOLSET),hwndDlg,(DLGPROC)SymbolSetProc);
+ }
+ break;
+ case IDDEL:
+ {
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELCOUNT, 0, 0);
+ int *items = (int *)GlobalAlloc(GPTR, n*sizeof(int));
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_GETSELITEMS, (WPARAM)n, (LPARAM)items);
+ int i;
+ for(i=n-1;i>=0;i--) {
+ SendDlgItemMessage(hwndDlg, IDC_SYMBOLS, LB_DELETESTRING, (WPARAM)items[i], 0);
+ }
+ EnableSymbolEditButtons(hwndDlg);
+ EnableSymbolSetButtons(hwndDlg);
+ }
+ break;
+ case IDC_SYMBOL:
+ if(HIWORD(wParam) == EN_CHANGE)
+ {
+ int n = SendDlgItemMessage(hwndDlg, IDC_SYMBOL, WM_GETTEXTLENGTH, 0, 0);
+ if(n > 0) {
+ EnableWindow(GetDlgItem(hwndDlg, IDRIGHT), TRUE);
+ }
+ else {
+ EnableWindow(GetDlgItem(hwndDlg, IDRIGHT), FALSE);
+ }
+ }
+ break;
+ case IDC_SYMBOLS:
+ if (HIWORD(wParam) == LBN_SELCHANGE)
+ {
+ EnableSymbolEditButtons(hwndDlg);
+ }
+ else if (HIWORD(wParam) == LBN_DBLCLK)
+ {
+ SendDlgItemMessage(hwndDlg, IDLEFT, BM_CLICK, 0, 0);
+ }
+ break;
+ }
+ break;
+ }
+ }
+ return FALSE;
+}
+
+BOOL CALLBACK CompressorProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ int i=0;
+ LRESULT rv;
+
+ for(i=(int)COMPRESSOR_SCRIPT; i<= (int)COMPRESSOR_BEST; i++) {
+ rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_ADDSTRING, 0, (LPARAM)compressor_display_names[i]);
+ }
+ rv = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_SETCURSEL, (WPARAM)g_sdata.compressor, (LPARAM)0);
+
+ SetFocus(GetDlgItem(hwndDlg, IDC_COMPRESSOR));
+ break;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ {
+ int n;
+ n = SendDlgItemMessage(hwndDlg, IDC_COMPRESSOR, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
+ if(n >= (int)COMPRESSOR_SCRIPT && n <= (int)COMPRESSOR_BEST) {
+ SetCompressor((NCOMPRESSOR)n);
+ }
+ else {
+ SetCompressor(g_sdata.default_compressor);
+ }
+
+ EndDialog(hwndDlg, 0);
+ break;
+ }
+ case IDCANCEL:
+ {
+ EndDialog(hwndDlg, 1);
+ LogMessage(g_sdata.hwnd,USAGE);
+ break;
+ }
+ }
+ break;
+ }
+ }
+ return FALSE;
+}
+
+BOOL CALLBACK SymbolSetProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ HWND hwndEdit;
+ HKEY hKey;
+
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
+ if (OpenRegSettingsKey(hKey)) {
+ HKEY hSubKey;
+
+ if (RegOpenKeyEx(hKey,REGSYMSUBKEY,0,KEY_READ,&hSubKey) == ERROR_SUCCESS) {
+ char subkey[1024];
+ int i=0;
+
+ while (RegEnumKey(hSubKey,i,subkey,sizeof(subkey)) == ERROR_SUCCESS) {
+ SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_ADDSTRING, 0, (LPARAM)subkey);
+ i++;
+ }
+ RegCloseKey(hSubKey);
+ }
+ RegCloseKey(hKey);
+ }
+
+ hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), 0, 0, 0); // Handle of list
+ hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), hwndEdit, 0, 0); //Handle of edit box
+ SendMessage(hwndEdit, EM_LIMITTEXT, (WPARAM)SYMBOL_SET_NAME_MAXLEN, 0);
+ if(g_symbol_set_mode == 1) { //Load
+ SetWindowText(hwndDlg, LOAD_SYMBOL_SET_DLG_NAME);
+ SetWindowText(GetDlgItem(hwndDlg, IDOK), LOAD_BUTTON_TEXT);
+ SendMessage(hwndEdit, EM_SETREADONLY, (WPARAM)TRUE, 0);
+ }
+ else {
+ SetWindowText(hwndDlg, SAVE_SYMBOL_SET_DLG_NAME);
+ SetWindowText(GetDlgItem(hwndDlg, IDOK), SAVE_BUTTON_TEXT);
+ }
+ break;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ {
+ HWND hwndEdit;
+ char name[SYMBOL_SET_NAME_MAXLEN+1];
+
+ hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), 0, 0, 0); // Handle of list
+ hwndEdit = FindWindowEx(GetDlgItem(hwndDlg, IDC_NAMES), hwndEdit, 0, 0); //Handle of edit box
+ SendMessage(hwndEdit, WM_GETTEXT, (WPARAM)SYMBOL_SET_NAME_MAXLEN+1, (LPARAM)name);
+ if(!lstrlen(name)) {
+ if(g_symbol_set_mode == 1) { //Load
+ MessageBox(hwndDlg,LOAD_SYMBOL_SET_MESSAGE,LOAD_SYMBOL_SET_DLG_NAME,MB_OK|MB_ICONEXCLAMATION);
+ }
+ else {
+ MessageBox(hwndDlg,SAVE_SYMBOL_SET_MESSAGE,SAVE_SYMBOL_SET_DLG_NAME,MB_OK|MB_ICONEXCLAMATION);
+ }
+ }
+ else {
+ HWND hwndParent = GetParent(hwndDlg);
+ if(g_symbol_set_mode == 1) { //Load
+ SendMessage(hwndParent, WM_MAKENSIS_LOADSYMBOLSET, (WPARAM)name, (LPARAM)NULL);
+ }
+ else {
+ SendMessage(hwndParent, WM_MAKENSIS_SAVESYMBOLSET, (WPARAM)name, (LPARAM)NULL);
+ }
+ EndDialog(hwndDlg, TRUE);
+ }
+ break;
+ }
+ case IDCANCEL:
+ {
+ EndDialog(hwndDlg, TRUE);
+ break;
+ }
+ case IDDEL:
+ {
+ int n = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETCURSEL, 0, 0);
+ if(n != CB_ERR) {
+ long len = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETLBTEXTLEN, (WPARAM)n, 0);
+ char *buf = (char *)GlobalAlloc(GPTR, (len+1)*sizeof(char));
+ if(SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETLBTEXT, (WPARAM)n, (LPARAM)buf) != CB_ERR) {
+ SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_DELETESTRING, n, 0);
+ DeleteSymbolSet(buf);
+ }
+ GlobalFree(buf);
+ }
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
+ break;
+ }
+ case IDC_NAMES:
+ {
+ if(HIWORD(wParam) == CBN_SELCHANGE)
+ {
+ int n = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETCURSEL, 0, 0);
+ if(n == CB_ERR) {
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), FALSE);
+ }
+ else {
+ EnableWindow(GetDlgItem(hwndDlg, IDDEL), TRUE);
+ }
+ }
+ else if(HIWORD(wParam) == CBN_DBLCLK)
+ {
+ int n = SendDlgItemMessage(hwndDlg, IDC_NAMES, CB_GETCURSEL, 0, 0);
+ if (n != CB_ERR)
+ {
+ SendDlgItemMessage(hwndDlg, IDOK, BM_CLICK, 0, 0);
+ }
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+ return FALSE;
+}
+
+void SetCompressor(NCOMPRESSOR compressor)
+{
+ int i;
+
+ if(g_sdata.compressor != compressor) {
+ WORD command;
+ char *compressor_name;
+
+ if(compressor > COMPRESSOR_SCRIPT && compressor < COMPRESSOR_BEST) {
+ command = compressor_commands[(int)compressor];
+ compressor_name = compressor_names[(int)compressor];
+ }
+ else if(compressor == COMPRESSOR_BEST) {
+ command = compressor_commands[(int)compressor];
+ compressor_name = compressor_names[(int)COMPRESSOR_SCRIPT+1];
+ }
+ else {
+ compressor = COMPRESSOR_SCRIPT;
+ command = IDM_COMPRESSOR_SCRIPT;
+ compressor_name = "";
+ }
+ g_sdata.compressor = compressor;
+ g_sdata.compressor_name = compressor_name;
+ UpdateToolBarCompressorButton();
+ for(i=(int)COMPRESSOR_SCRIPT; i<= (int)COMPRESSOR_BEST; i++) {
+ CheckMenuItem(g_sdata.menu, compressor_commands[i], MF_BYCOMMAND | MF_UNCHECKED);
+ }
+ CheckMenuItem(g_sdata.menu, command, MF_BYCOMMAND | MF_CHECKED);
+ ResetObjects();
+ }
+}
+
diff --git a/Contrib/Makensisw/makensisw.h b/Contrib/Makensisw/makensisw.h
index 2756d93..beadc3f 100755
--- a/Contrib/Makensisw/makensisw.h
+++ b/Contrib/Makensisw/makensisw.h
@@ -1,219 +1,219 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
-
- 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.
-
-*/
-#ifndef MAKENSIS_H
-#define MAKENSIS_H
-
-#define _WIN32_IE 0x0400
-#include <windows.h>
-#include <commctrl.h>
-#include "utils.h"
-#define _RICHEDIT_VER 0x0200
-#include <richedit.h>
-#undef _RICHEDIT_VER
-
-// Defines
-#define NSIS_URL "http://nsis.sourceforge.net/"
-#define NSIS_FOR "http://forums.winamp.com/forumdisplay.php?forumid=65"
-#define NSIS_UPDATE "http://nsis.sourceforge.net/update.php?version="
-#define NSIS_DL_URL "http://nsis.sourceforge.net/download/"
-#define USAGE "Usage:\r\n\r\n - File | Load Script...\r\n - Drag the .nsi file into this window\r\n - Right click the .nsi file and choose \"Compile NSIS Script\""
-#define COPYRIGHT "Copyright © 2002 Robert Rainwater"
-#define CONTRIB "Fritz Elfert, Justin Frankel, Amir Szekely, Sunil Kamath, Joost Verburg"
-#define DOCPATH "http://nsis.sourceforge.net/Docs/"
-#define LOCALDOCS "\\NSIS.chm"
-#define NSISERROR "Unable to intialize MakeNSIS. Please verify that makensis.exe is in the same directory as makensisw.exe."
-#define DLGERROR "Unable to intialize MakeNSISW."
-#define SYMBOLSERROR "Symbol cannot contain whitespace characters"
-#define MULTIDROPERROR "Dropping more than one script at a time is not supported"
-#define NSISUPDATEPROMPT "Running NSIS Update will close MakeNSISW.\nContinue?"
-#define REGSEC HKEY_CURRENT_USER
-#define REGSECDEF HKEY_LOCAL_MACHINE
-#define REGKEY "Software\\NSIS"
-#define REGLOC "MakeNSISWPlacement"
-#define REGCOMPRESSOR "MakeNSISWCompressor"
-#define REGSYMSUBKEY "Symbols"
-#define REGMRUSUBKEY "MRU"
-#define EXENAME "makensis.exe"
-#define MAX_STRING 256
-#define TIMEOUT 100
-#define MINWIDTH 350
-#define MINHEIGHT 180
-#define COMPRESSOR_MESSAGE "\n\nThe %s compressor created the smallest installer (%d bytes)."
-#define RESTORED_COMPRESSOR_MESSAGE "\n\nThe %s compressor created the smallest installer (%d bytes)."
-#define EXE_HEADER_COMPRESSOR_STAT "EXE header size:"
-#define TOTAL_SIZE_COMPRESSOR_STAT "Total size:"
-#define SYMBOL_SET_NAME_MAXLEN 40
-#define LOAD_SYMBOL_SET_DLG_NAME "Load Symbol Definitions Set"
-#define SAVE_SYMBOL_SET_DLG_NAME "Save Symbol Definitions Set"
-#define LOAD_BUTTON_TEXT "Load"
-#define SAVE_BUTTON_TEXT "Save"
-#define LOAD_SYMBOL_SET_MESSAGE "Please select a name for the Symbol Definitions Set to load."
-#define SAVE_SYMBOL_SET_MESSAGE "Please enter or select a name for the Symbol Definitions Set to save."
-
-#define WM_MAKENSIS_PROCESSCOMPLETE (WM_USER+1001)
-#define WM_MAKENSIS_LOADSYMBOLSET (WM_USER+1002)
-#define WM_MAKENSIS_SAVESYMBOLSET (WM_USER+1003)
-
-enum {
- MAKENSIS_NOTIFY_SCRIPT,
- MAKENSIS_NOTIFY_WARNING,
- MAKENSIS_NOTIFY_ERROR,
- MAKENSIS_NOTIFY_OUTPUT
-};
-
-typedef enum {
- COMPRESSOR_NONE_SELECTED = -1,
- COMPRESSOR_SCRIPT = 0,
- COMPRESSOR_ZLIB,
- COMPRESSOR_ZLIB_SOLID,
- COMPRESSOR_BZIP2,
- COMPRESSOR_BZIP2_SOLID,
- COMPRESSOR_LZMA,
- COMPRESSOR_LZMA_SOLID,
- COMPRESSOR_BEST,
-} NCOMPRESSOR;
-
-#ifdef MAKENSISW_CPP
-char *compressor_names[] = {"",
- "zlib",
- "/SOLID zlib",
- "bzip2",
- "/SOLID bzip2",
- "lzma",
- "/SOLID lzma",
- "Best"};
-char *compressor_display_names[] = {"Defined in Script/Compiler Default",
- "ZLIB",
- "ZLIB (solid)",
- "BZIP2",
- "BZIP2 (solid)",
- "LZMA",
- "LZMA (solid)",
- "Best Compressor"};
-WORD compressor_commands[] = {IDM_COMPRESSOR_SCRIPT,
- IDM_ZLIB,
- IDM_ZLIB_SOLID,
- IDM_BZIP2,
- IDM_BZIP2_SOLID,
- IDM_LZMA,
- IDM_LZMA_SOLID,
- IDM_BEST};
-#endif
-
-#ifdef TOOLBAR_CPP
-int compressor_bitmaps[] = {IDB_COMPRESSOR_SCRIPT,
- IDB_COMPRESSOR_ZLIB,
- IDB_COMPRESSOR_ZLIB,
- IDB_COMPRESSOR_BZIP2,
- IDB_COMPRESSOR_BZIP2,
- IDB_COMPRESSOR_LZMA,
- IDB_COMPRESSOR_LZMA,
- IDB_COMPRESSOR_BEST};
-int compressor_strings[] = {IDS_SCRIPT,
- IDS_ZLIB,
- IDS_ZLIB_SOLID,
- IDS_BZIP2,
- IDS_BZIP2_SOLID,
- IDS_LZMA,
- IDS_LZMA_SOLID,
- IDS_BEST};
-#endif
-
-// Extern Variables
-
-extern const char* NSISW_VERSION;
-
-int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmdShow);
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-DWORD WINAPI MakeNSISProc(LPVOID p);
-BOOL CALLBACK DialogResize(HWND hWnd, LPARAM /* unused*/);
-BOOL CALLBACK AboutNSISProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK AboutProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK SettingsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK SymbolSetProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK CompressorProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-void SetScript(const char *script, bool clearArgs = true);
-void CompileNSISScript();
-char* BuildSymbols();
-void SetCompressor(NCOMPRESSOR);
-void RestoreSymbols();
-void SaveSymbols();
-void DeleteSymbolSet(char *);
-char** LoadSymbolSet(char *);
-void SaveSymbolSet(char *, char **);
-void RestoreMRUList();
-void SaveMRUList();
-
-typedef struct NSISScriptData {
- char *script;
- HGLOBAL script_cmd_args;
- char *compile_command;
- char *output_exe;
- char *input_script;
- char *branding;
- char *brandingv;
- char **symbols;
- int retcode;
- BOOL userSelectCompressor;
- DWORD logLength;
- DWORD warnings;
- HINSTANCE hInstance;
- HWND hwnd;
- HMENU menu;
- HMENU fileSubmenu;
- HMENU editSubmenu;
- HMENU toolsSubmenu;
- HANDLE thread;
- HANDLE sigint_event;
- HWND focused_hwnd;
- CHARRANGE textrange;
- NCOMPRESSOR default_compressor;
- NCOMPRESSOR compressor;
- char *compressor_name;
- char compressor_stats[512];
- char *best_compressor_name;
- // Added by Darren Owen (DrO) on 1/10/2003
- int recompile_test;
-} NSCRIPTDATA;
-
-extern NSCRIPTDATA g_sdata;
-
-typedef struct ResizeData {
- RECT resizeRect;
- RECT griprect;
- int dx;
- int dy;
-} NRESIZEDATA;
-
-typedef struct FindReplaceDialog {
- FINDREPLACE fr;
- UINT uFindReplaceMsg;
- HWND hwndFind;
-} NFINDREPLACE;
-
-typedef struct ToolTipStruct {
- HWND tip;
- HWND tip_p;
- HHOOK hook;
-} NTOOLTIP;
-
-#endif
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
+
+ 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.
+
+*/
+#ifndef MAKENSIS_H
+#define MAKENSIS_H
+
+#define _WIN32_IE 0x0400
+#include <windows.h>
+#include <commctrl.h>
+#include "utils.h"
+#define _RICHEDIT_VER 0x0200
+#include <richedit.h>
+#undef _RICHEDIT_VER
+
+// Defines
+#define NSIS_URL "http://nsis.sourceforge.net/"
+#define NSIS_FOR "http://forums.winamp.com/forumdisplay.php?forumid=65"
+#define NSIS_UPDATE "http://nsis.sourceforge.net/update.php?version="
+#define NSIS_DL_URL "http://nsis.sourceforge.net/download/"
+#define USAGE "Usage:\r\n\r\n - File | Load Script...\r\n - Drag the .nsi file into this window\r\n - Right click the .nsi file and choose \"Compile NSIS Script\""
+#define COPYRIGHT "Copyright © 2002 Robert Rainwater"
+#define CONTRIB "Fritz Elfert, Justin Frankel, Amir Szekely, Sunil Kamath, Joost Verburg"
+#define DOCPATH "http://nsis.sourceforge.net/Docs/"
+#define LOCALDOCS "\\NSIS.chm"
+#define NSISERROR "Unable to intialize MakeNSIS. Please verify that makensis.exe is in the same directory as makensisw.exe."
+#define DLGERROR "Unable to intialize MakeNSISW."
+#define SYMBOLSERROR "Symbol cannot contain whitespace characters"
+#define MULTIDROPERROR "Dropping more than one script at a time is not supported"
+#define NSISUPDATEPROMPT "Running NSIS Update will close MakeNSISW.\nContinue?"
+#define REGSEC HKEY_CURRENT_USER
+#define REGSECDEF HKEY_LOCAL_MACHINE
+#define REGKEY "Software\\NSIS"
+#define REGLOC "MakeNSISWPlacement"
+#define REGCOMPRESSOR "MakeNSISWCompressor"
+#define REGSYMSUBKEY "Symbols"
+#define REGMRUSUBKEY "MRU"
+#define EXENAME "makensis.exe"
+#define MAX_STRING 256
+#define TIMEOUT 100
+#define MINWIDTH 350
+#define MINHEIGHT 180
+#define COMPRESSOR_MESSAGE "\n\nThe %s compressor created the smallest installer (%d bytes)."
+#define RESTORED_COMPRESSOR_MESSAGE "\n\nThe %s compressor created the smallest installer (%d bytes)."
+#define EXE_HEADER_COMPRESSOR_STAT "EXE header size:"
+#define TOTAL_SIZE_COMPRESSOR_STAT "Total size:"
+#define SYMBOL_SET_NAME_MAXLEN 40
+#define LOAD_SYMBOL_SET_DLG_NAME "Load Symbol Definitions Set"
+#define SAVE_SYMBOL_SET_DLG_NAME "Save Symbol Definitions Set"
+#define LOAD_BUTTON_TEXT "Load"
+#define SAVE_BUTTON_TEXT "Save"
+#define LOAD_SYMBOL_SET_MESSAGE "Please select a name for the Symbol Definitions Set to load."
+#define SAVE_SYMBOL_SET_MESSAGE "Please enter or select a name for the Symbol Definitions Set to save."
+
+#define WM_MAKENSIS_PROCESSCOMPLETE (WM_USER+1001)
+#define WM_MAKENSIS_LOADSYMBOLSET (WM_USER+1002)
+#define WM_MAKENSIS_SAVESYMBOLSET (WM_USER+1003)
+
+enum {
+ MAKENSIS_NOTIFY_SCRIPT,
+ MAKENSIS_NOTIFY_WARNING,
+ MAKENSIS_NOTIFY_ERROR,
+ MAKENSIS_NOTIFY_OUTPUT
+};
+
+typedef enum {
+ COMPRESSOR_NONE_SELECTED = -1,
+ COMPRESSOR_SCRIPT = 0,
+ COMPRESSOR_ZLIB,
+ COMPRESSOR_ZLIB_SOLID,
+ COMPRESSOR_BZIP2,
+ COMPRESSOR_BZIP2_SOLID,
+ COMPRESSOR_LZMA,
+ COMPRESSOR_LZMA_SOLID,
+ COMPRESSOR_BEST,
+} NCOMPRESSOR;
+
+#ifdef MAKENSISW_CPP
+char *compressor_names[] = {"",
+ "zlib",
+ "/SOLID zlib",
+ "bzip2",
+ "/SOLID bzip2",
+ "lzma",
+ "/SOLID lzma",
+ "Best"};
+char *compressor_display_names[] = {"Defined in Script/Compiler Default",
+ "ZLIB",
+ "ZLIB (solid)",
+ "BZIP2",
+ "BZIP2 (solid)",
+ "LZMA",
+ "LZMA (solid)",
+ "Best Compressor"};
+WORD compressor_commands[] = {IDM_COMPRESSOR_SCRIPT,
+ IDM_ZLIB,
+ IDM_ZLIB_SOLID,
+ IDM_BZIP2,
+ IDM_BZIP2_SOLID,
+ IDM_LZMA,
+ IDM_LZMA_SOLID,
+ IDM_BEST};
+#endif
+
+#ifdef TOOLBAR_CPP
+int compressor_bitmaps[] = {IDB_COMPRESSOR_SCRIPT,
+ IDB_COMPRESSOR_ZLIB,
+ IDB_COMPRESSOR_ZLIB,
+ IDB_COMPRESSOR_BZIP2,
+ IDB_COMPRESSOR_BZIP2,
+ IDB_COMPRESSOR_LZMA,
+ IDB_COMPRESSOR_LZMA,
+ IDB_COMPRESSOR_BEST};
+int compressor_strings[] = {IDS_SCRIPT,
+ IDS_ZLIB,
+ IDS_ZLIB_SOLID,
+ IDS_BZIP2,
+ IDS_BZIP2_SOLID,
+ IDS_LZMA,
+ IDS_LZMA_SOLID,
+ IDS_BEST};
+#endif
+
+// Extern Variables
+
+extern const char* NSISW_VERSION;
+
+int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmdShow);
+BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+DWORD WINAPI MakeNSISProc(LPVOID p);
+BOOL CALLBACK DialogResize(HWND hWnd, LPARAM /* unused*/);
+BOOL CALLBACK AboutNSISProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK AboutProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK SettingsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK SymbolSetProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK CompressorProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+void SetScript(const char *script, bool clearArgs = true);
+void CompileNSISScript();
+char* BuildSymbols();
+void SetCompressor(NCOMPRESSOR);
+void RestoreSymbols();
+void SaveSymbols();
+void DeleteSymbolSet(char *);
+char** LoadSymbolSet(char *);
+void SaveSymbolSet(char *, char **);
+void RestoreMRUList();
+void SaveMRUList();
+
+typedef struct NSISScriptData {
+ char *script;
+ HGLOBAL script_cmd_args;
+ char *compile_command;
+ char *output_exe;
+ char *input_script;
+ char *branding;
+ char *brandingv;
+ char **symbols;
+ int retcode;
+ BOOL userSelectCompressor;
+ DWORD logLength;
+ DWORD warnings;
+ HINSTANCE hInstance;
+ HWND hwnd;
+ HMENU menu;
+ HMENU fileSubmenu;
+ HMENU editSubmenu;
+ HMENU toolsSubmenu;
+ HANDLE thread;
+ HANDLE sigint_event;
+ HWND focused_hwnd;
+ CHARRANGE textrange;
+ NCOMPRESSOR default_compressor;
+ NCOMPRESSOR compressor;
+ char *compressor_name;
+ char compressor_stats[512];
+ char *best_compressor_name;
+ // Added by Darren Owen (DrO) on 1/10/2003
+ int recompile_test;
+} NSCRIPTDATA;
+
+extern NSCRIPTDATA g_sdata;
+
+typedef struct ResizeData {
+ RECT resizeRect;
+ RECT griprect;
+ int dx;
+ int dy;
+} NRESIZEDATA;
+
+typedef struct FindReplaceDialog {
+ FINDREPLACE fr;
+ UINT uFindReplaceMsg;
+ HWND hwndFind;
+} NFINDREPLACE;
+
+typedef struct ToolTipStruct {
+ HWND tip;
+ HWND tip_p;
+ HHOOK hook;
+} NTOOLTIP;
+
+#endif
diff --git a/Contrib/Makensisw/makensisw.xml b/Contrib/Makensisw/makensisw.xml
index 2e9dd8a..4ba9030 100755
--- a/Contrib/Makensisw/makensisw.xml
+++ b/Contrib/Makensisw/makensisw.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Nullsoft.NSIS.makensisw" type="win32"/>
-<description>MakeNSIS Wrapper</description>
-<dependency>
-<dependentAssembly>
-<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
-</dependentAssembly>
-</dependency>
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
-<security>
-<requestedPrivileges>
-<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
-</requestedPrivileges>
-</security>
-</trustInfo>
-</assembly>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Nullsoft.NSIS.makensisw" type="win32"/>
+<description>MakeNSIS Wrapper</description>
+<dependency>
+<dependentAssembly>
+<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
+</dependentAssembly>
+</dependency>
+<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+<security>
+<requestedPrivileges>
+<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+</requestedPrivileges>
+</security>
+</trustInfo>
+</assembly>
diff --git a/Contrib/Makensisw/noclib.cpp b/Contrib/Makensisw/noclib.cpp
index bbb5eda..b462166 100755
--- a/Contrib/Makensisw/noclib.cpp
+++ b/Contrib/Makensisw/noclib.cpp
@@ -1,72 +1,72 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, and Amir Szekely
-
- 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.
-
-*/
-#include <windows.h>
-#include "noclib.h"
-
-// kickik's clib methods
-char *my_strrchr(const char *string, int c) {
- for (int i=lstrlen(string); i>=0; i--)
- if (string[i]==c) return (char*)&string[i];
- return 0;
-}
-
-char *my_strstr(char *i, char *s) {
- if (lstrlen(i)>=lstrlen(s)) while (i[lstrlen(s)-1]) {
- int l=lstrlen(s)+1;
- char *ii=i;
- char *is=s;
- while (--l>0) {
- if (*ii != *is) break;
- ii++;
- is++;
- }
- if (l==0) return i;
- i++;
- }
- return NULL;
-}
-
-void *my_memset(void *dest, int c, size_t count) {
- for (size_t i=0; i<count;i++) ((char*)dest)[i]=c;
- return dest;
-}
-
-// iceman_k's clib methods
-int lstrncmp(char *s1, const char *s2, int chars)
-{
- while ((chars > 0) && (*s1) && (*s2) && (*(s1) == *(s2))) chars--, s1++, s2++;
- if ((chars == 0) || (*s1 == *s2)) return 0;
- return (*s1 - *s2);
-}
-
-int lstrncmpi(char *s1, const char *s2, int chars)
-{
- while (chars-- && *s1 && *s2)
- {
- char ss1=*s1++;
- char ss2=*s2++;
- if (ss1>='a' && ss1 <= 'z') ss1+='A'-'a';
- if (ss2>='a' && ss2 <= 'z') ss2+='A'-'a';
- if (ss1 != ss2) return ss1-ss2;
- }
- return 0;
-}
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, and Amir Szekely
+
+ 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.
+
+*/
+#include <windows.h>
+#include "noclib.h"
+
+// kickik's clib methods
+char *my_strrchr(const char *string, int c) {
+ for (int i=lstrlen(string); i>=0; i--)
+ if (string[i]==c) return (char*)&string[i];
+ return 0;
+}
+
+char *my_strstr(char *i, char *s) {
+ if (lstrlen(i)>=lstrlen(s)) while (i[lstrlen(s)-1]) {
+ int l=lstrlen(s)+1;
+ char *ii=i;
+ char *is=s;
+ while (--l>0) {
+ if (*ii != *is) break;
+ ii++;
+ is++;
+ }
+ if (l==0) return i;
+ i++;
+ }
+ return NULL;
+}
+
+void *my_memset(void *dest, int c, size_t count) {
+ for (size_t i=0; i<count;i++) ((char*)dest)[i]=c;
+ return dest;
+}
+
+// iceman_k's clib methods
+int lstrncmp(char *s1, const char *s2, int chars)
+{
+ while ((chars > 0) && (*s1) && (*s2) && (*(s1) == *(s2))) chars--, s1++, s2++;
+ if ((chars == 0) || (*s1 == *s2)) return 0;
+ return (*s1 - *s2);
+}
+
+int lstrncmpi(char *s1, const char *s2, int chars)
+{
+ while (chars-- && *s1 && *s2)
+ {
+ char ss1=*s1++;
+ char ss2=*s2++;
+ if (ss1>='a' && ss1 <= 'z') ss1+='A'-'a';
+ if (ss2>='a' && ss2 <= 'z') ss2+='A'-'a';
+ if (ss1 != ss2) return ss1-ss2;
+ }
+ return 0;
+}
diff --git a/Contrib/Makensisw/noclib.h b/Contrib/Makensisw/noclib.h
index acd839e..51686b0 100755
--- a/Contrib/Makensisw/noclib.h
+++ b/Contrib/Makensisw/noclib.h
@@ -1,33 +1,33 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, and Amir Szekely
-
- 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.
-
-*/
-#ifndef NOCLIB_H
-#define NOCLIB_H
-
-// kickik's clib methods
-char *my_strstr(char *i, char *s);
-char *my_strrchr(const char *string, int c);
-void *my_memset(void *dest, int c, size_t count);
-
-// iceman_k's clib methods
-int lstrncmp(char *s1, const char *s2, int chars);
-int lstrncmpi(char *s1, const char *s2, int chars);
-#endif
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, and Amir Szekely
+
+ 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.
+
+*/
+#ifndef NOCLIB_H
+#define NOCLIB_H
+
+// kickik's clib methods
+char *my_strstr(char *i, char *s);
+char *my_strrchr(const char *string, int c);
+void *my_memset(void *dest, int c, size_t count);
+
+// iceman_k's clib methods
+int lstrncmp(char *s1, const char *s2, int chars);
+int lstrncmpi(char *s1, const char *s2, int chars);
+#endif
diff --git a/Contrib/Makensisw/resource.h b/Contrib/Makensisw/resource.h
index a037ca4..e6e23b5 100755
--- a/Contrib/Makensisw/resource.h
+++ b/Contrib/Makensisw/resource.h
@@ -1,114 +1,114 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by resource.rc
-//
-#define IDS_LOADSCRIPT 1
-#define IDS_SAVE 2
-#define IDS_EXIT 3
-#define IDLOAD 3
-#define IDS_COPY 4
-#define IDSAVE 4
-#define IDS_FIND 5
-#define IDCLEAR 5
-#define IDS_RECOMPILE 6
-#define IDS_SETTINGS 7
-#define IDS_COMPRESSOR 8
-#define IDS_TEST 9
-#define IDS_EDITSCRIPT 10
-#define IDS_BROWSESCR 11
-#define IDS_CLEARLOG 12
-#define IDS_NSISHOME 13
-#define IDS_FORUM 15
-#define IDS_NSISUPDATE 16
-#define IDS_DOCS 17
-#define IDS_SCRIPT 18
-#define IDS_ZLIB 19
-#define IDS_ZLIB_SOLID 20
-#define IDS_BZIP2 21
-#define IDS_BZIP2_SOLID 22
-#define IDS_RECOMPILE_TEST 23
-#define IDS_BEST 24
-#define IDS_LZMA 25
-#define IDS_LZMA_SOLID 26
-#define DLG_MAIN 101
-#define IDI_ICON 102
-#define DLG_ABOUT 103
-#define IDM_MENU 104
-#define IDK_ACCEL 105
-#define IDI_SHELL 112
-#define IDB_LOGO 115
-#define DLG_SETTINGS 116
-#define IDB_BITMAP1 120
-#define IDB_TOOLBAR 122
-#define DLG_COMPRESSOR 124
-#define DLG_SYMBOLSET 125
-#define IDB_TOOLBAR24 129
-#define IDB_TOOLBAR24D 130
-#define IDB_BITMAP2 131
-#define IDB_TOOLBAR24H 132
-#define IDC_LOGWIN 402
-#define IDC_VERSION 405
-#define IDM_ABOUT 501
-#define IDM_EXIT 502
-#define IDM_SAVE 503
-#define IDM_COPY 504
-#define IDM_COPYSELECTED 505
-#define IDM_RECOMPILE 506
-#define IDM_NSISHOME 507
-#define IDC_TEST 1000
-#define IDC_ABOUTVERSION 1001
-#define IDC_ABOUTCOPY 1003
-#define IDC_ABOUTPORTIONS 1005
-#define IDC_CONTRIB 1009
-#define IDC_NSISVER 1010
-#define IDC_OTHERCONTRIB 1016
-#define IDC_SYMBOL 1017
-#define IDC_VALUE 1018
-#define IDRIGHT 1019
-#define IDLEFT 1020
-#define IDC_SYMBOLS 1021
-#define IDC_RECOMPILE_TEST 1022
-#define IDC_COMPRESSOR 1025
-#define IDC_NAMES 1027
-#define IDDEL 1028
-#define IDM_COMPRESSOR 40001
-#define IDM_TEST 40002
-#define IDM_EDITSCRIPT 40003
-#define IDM_DOCS 40004
-#define IDM_LOADSCRIPT 40005
-#define IDM_FIND 40006
-#define IDM_SELECTALL 40007
-#define IDM_CLEARLOG 40009
-#define IDM_BROWSESCR 40013
-#define IDM_FORUM 40016
-#define IDM_NSISUPDATE 40018
-#define IDM_COMPRESSOR_SCRIPT 40020
-#define IDM_ZLIB 40021
-#define IDM_ZLIB_SOLID 40022
-#define IDM_BZIP2 40023
-#define IDM_BZIP2_SOLID 40024
-#define IDM_LZMA 40025
-#define IDM_LZMA_SOLID 40026
-#define IDM_MRU_FILE 40027
-#define IDM_CLEAR_MRU_LIST 40032
-#define IDM_RECOMPILE_TEST 40033
-#define IDM_BEST 40034
-#define IDM_SETTINGS 40035
-#define IDM_CANCEL 40036
-#define IDM_FILE 40037
-#define IDM_EDIT 40038
-#define IDM_SCRIPT 40039
-#define IDM_COMPRESSOR_SUBMENU 40040
-#define IDM_TOOLS 40041
-#define IDM_HELP 40042
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 133
-#define _APS_NEXT_COMMAND_VALUE 40043
-#define _APS_NEXT_CONTROL_VALUE 1032
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by resource.rc
+//
+#define IDS_LOADSCRIPT 1
+#define IDS_SAVE 2
+#define IDS_EXIT 3
+#define IDLOAD 3
+#define IDS_COPY 4
+#define IDSAVE 4
+#define IDS_FIND 5
+#define IDCLEAR 5
+#define IDS_RECOMPILE 6
+#define IDS_SETTINGS 7
+#define IDS_COMPRESSOR 8
+#define IDS_TEST 9
+#define IDS_EDITSCRIPT 10
+#define IDS_BROWSESCR 11
+#define IDS_CLEARLOG 12
+#define IDS_NSISHOME 13
+#define IDS_FORUM 15
+#define IDS_NSISUPDATE 16
+#define IDS_DOCS 17
+#define IDS_SCRIPT 18
+#define IDS_ZLIB 19
+#define IDS_ZLIB_SOLID 20
+#define IDS_BZIP2 21
+#define IDS_BZIP2_SOLID 22
+#define IDS_RECOMPILE_TEST 23
+#define IDS_BEST 24
+#define IDS_LZMA 25
+#define IDS_LZMA_SOLID 26
+#define DLG_MAIN 101
+#define IDI_ICON 102
+#define DLG_ABOUT 103
+#define IDM_MENU 104
+#define IDK_ACCEL 105
+#define IDI_SHELL 112
+#define IDB_LOGO 115
+#define DLG_SETTINGS 116
+#define IDB_BITMAP1 120
+#define IDB_TOOLBAR 122
+#define DLG_COMPRESSOR 124
+#define DLG_SYMBOLSET 125
+#define IDB_TOOLBAR24 129
+#define IDB_TOOLBAR24D 130
+#define IDB_BITMAP2 131
+#define IDB_TOOLBAR24H 132
+#define IDC_LOGWIN 402
+#define IDC_VERSION 405
+#define IDM_ABOUT 501
+#define IDM_EXIT 502
+#define IDM_SAVE 503
+#define IDM_COPY 504
+#define IDM_COPYSELECTED 505
+#define IDM_RECOMPILE 506
+#define IDM_NSISHOME 507
+#define IDC_TEST 1000
+#define IDC_ABOUTVERSION 1001
+#define IDC_ABOUTCOPY 1003
+#define IDC_ABOUTPORTIONS 1005
+#define IDC_CONTRIB 1009
+#define IDC_NSISVER 1010
+#define IDC_OTHERCONTRIB 1016
+#define IDC_SYMBOL 1017
+#define IDC_VALUE 1018
+#define IDRIGHT 1019
+#define IDLEFT 1020
+#define IDC_SYMBOLS 1021
+#define IDC_RECOMPILE_TEST 1022
+#define IDC_COMPRESSOR 1025
+#define IDC_NAMES 1027
+#define IDDEL 1028
+#define IDM_COMPRESSOR 40001
+#define IDM_TEST 40002
+#define IDM_EDITSCRIPT 40003
+#define IDM_DOCS 40004
+#define IDM_LOADSCRIPT 40005
+#define IDM_FIND 40006
+#define IDM_SELECTALL 40007
+#define IDM_CLEARLOG 40009
+#define IDM_BROWSESCR 40013
+#define IDM_FORUM 40016
+#define IDM_NSISUPDATE 40018
+#define IDM_COMPRESSOR_SCRIPT 40020
+#define IDM_ZLIB 40021
+#define IDM_ZLIB_SOLID 40022
+#define IDM_BZIP2 40023
+#define IDM_BZIP2_SOLID 40024
+#define IDM_LZMA 40025
+#define IDM_LZMA_SOLID 40026
+#define IDM_MRU_FILE 40027
+#define IDM_CLEAR_MRU_LIST 40032
+#define IDM_RECOMPILE_TEST 40033
+#define IDM_BEST 40034
+#define IDM_SETTINGS 40035
+#define IDM_CANCEL 40036
+#define IDM_FILE 40037
+#define IDM_EDIT 40038
+#define IDM_SCRIPT 40039
+#define IDM_COMPRESSOR_SUBMENU 40040
+#define IDM_TOOLS 40041
+#define IDM_HELP 40042
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 133
+#define _APS_NEXT_COMMAND_VALUE 40043
+#define _APS_NEXT_CONTROL_VALUE 1032
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/Makensisw/resource.rc b/Contrib/Makensisw/resource.rc
index 30ada97..d0a1bfc 100755
--- a/Contrib/Makensisw/resource.rc
+++ b/Contrib/Makensisw/resource.rc
@@ -1,359 +1,359 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON ICON "icon.ico"
-IDI_SHELL ICON "shell.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDM_MENU MENUEX
-BEGIN
- POPUP "&File", IDM_FILE
- BEGIN
- MENUITEM "&Save Output...", IDM_SAVE
- MENUITEM "&Load Script...\tCtrl+L", IDM_LOADSCRIPT
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "E&xit\tAlt+X", IDM_EXIT
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "", IDM_MRU_FILE
- END
- POPUP "&Edit", IDM_EDIT
- BEGIN
- MENUITEM "&Copy\tCtrl+C", IDM_COPYSELECTED
- MENUITEM "Copy &All", IDM_COPY
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "&Find...\tCtrl+F", IDM_FIND
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "&Select All\tCtrl+A", IDM_SELECTALL
- MENUITEM "Clear &Log Window\tCtrl+W", IDM_CLEARLOG
- END
- POPUP "&Script", IDM_SCRIPT
- BEGIN
- MENUITEM "&Recompile\tCtrl+R", IDM_RECOMPILE
- MENUITEM "Test &Installer\tCtrl+T", IDM_TEST
- MENUITEM "Reco&mpile and Test\tCtrl+M", IDM_RECOMPILE_TEST
- MENUITEM "C&ancel compilation", IDM_CANCEL
- MENUITEM "", -1, MFT_SEPARATOR
- POPUP "Set &Compressor", IDM_COMPRESSOR_SUBMENU
- BEGIN
- MENUITEM "&Defined in Script/Compiler Default", IDM_COMPRESSOR_SCRIPT
- MENUITEM "&ZLIB", IDM_ZLIB
- MENUITEM "ZLIB (solid)", IDM_ZLIB_SOLID
- MENUITEM "BZI&P2", IDM_BZIP2
- MENUITEM "BZIP2 (solid)", IDM_BZIP2_SOLID
- MENUITEM "&LZMA", IDM_LZMA
- MENUITEM "LZMA (solid)", IDM_LZMA_SOLID
- MENUITEM "&Best Compressor", IDM_BEST
- END
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "&Edit Script\tCtrl+E", IDM_EDITSCRIPT
- MENUITEM "Open Script &Folder\tCtrl+B", IDM_BROWSESCR
- END
- POPUP "&Tools", IDM_TOOLS
- BEGIN
- MENUITEM "&Settings..\tCtrl+S", IDM_SETTINGS
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "Clear Recent &Files List", IDM_CLEAR_MRU_LIST
- END
- POPUP "&Help", IDM_HELP
- BEGIN
- MENUITEM "NSIS Users &Manual\tF1", IDM_DOCS
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "NSIS &Homepage", IDM_NSISHOME
- MENUITEM "NSIS &Forum", IDM_FORUM
- MENUITEM "NSIS &Update", IDM_NSISUPDATE
- MENUITEM "", -1, MFT_SEPARATOR
- MENUITEM "&About MakeNSISW", IDM_ABOUT
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
-IDK_ACCEL ACCELERATORS
-BEGIN
- "A", IDM_SELECTALL, VIRTKEY, CONTROL, NOINVERT
- "B", IDM_BROWSESCR, VIRTKEY, CONTROL, NOINVERT
- "C", IDM_COPYSELECTED, VIRTKEY, CONTROL, NOINVERT
- "E", IDM_EDITSCRIPT, VIRTKEY, CONTROL, NOINVERT
- "F", IDM_FIND, VIRTKEY, CONTROL, NOINVERT
- "L", IDM_LOADSCRIPT, VIRTKEY, CONTROL, NOINVERT
- "M", IDM_RECOMPILE_TEST, VIRTKEY, CONTROL, NOINVERT
- "R", IDM_RECOMPILE, VIRTKEY, CONTROL, NOINVERT
- "S", IDM_SETTINGS, VIRTKEY, CONTROL, NOINVERT
- "T", IDM_TEST, VIRTKEY, CONTROL, NOINVERT
- VK_F1, IDM_DOCS, VIRTKEY, NOINVERT
- "W", IDM_CLEARLOG, VIRTKEY, CONTROL, NOINVERT
- "X", IDM_EXIT, VIRTKEY, ALT, NOINVERT
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-DLG_MAIN DIALOG 0, 0, 362, 246
-STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX |
- WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION |
- WS_SYSMENU | WS_THICKFRAME
-CAPTION "MakeNSISW"
-MENU IDM_MENU
-FONT 8, "MS Shell Dlg"
-BEGIN
- CONTROL "",IDC_LOGWIN,"RICHEDIT",TCS_HOTTRACK | TCS_BUTTONS |
- TCS_RAGGEDRIGHT | TCS_OWNERDRAWFIXED | TCS_MULTISELECT |
- WS_BORDER | WS_VSCROLL,7,22,345,186
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,220,346,1
- LTEXT "",IDC_VERSION,7,230,200,12,WS_DISABLED
- DEFPUSHBUTTON "&Close",IDCANCEL,296,226,49,15
- PUSHBUTTON "Test &Installer",IDC_TEST,230,226,60,15,WS_DISABLED
-END
-
-DLG_ABOUT DIALOGEX 0, 0, 233, 126
-STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP |
- WS_CAPTION | WS_SYSMENU
-CAPTION "About MakeNSISW"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,174,104,49,15
- CONTROL 115,IDC_STATIC,"Static",SS_BITMAP,0,0,233,25
- LTEXT "MakeNSISW",IDC_ABOUTVERSION,14,31,219,8
- LTEXT "Copyright",IDC_ABOUTCOPY,14,43,220,8
- LTEXT "Other Contributors:",IDC_ABOUTPORTIONS,14,56,220,10
- LTEXT "",IDC_OTHERCONTRIB,27,68,206,22
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,15,97,208,1
- LTEXT "NSIS",IDC_NSISVER,15,107,135,8,WS_DISABLED
-END
-
-DLG_SETTINGS DIALOGEX 0, 0, 292, 215
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-CAPTION "MakeNSISW Settings"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,180,192,48,14
- PUSHBUTTON "Cancel",IDCANCEL,234,192,48,14
- GROUPBOX "Default Compressor (overrides script setting)",
- IDC_STATIC,6,6,282,41
- COMBOBOX IDC_COMPRESSOR,18,24,258,94,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Symbol Definitions",IDC_STATIC,6,54,282,132
- LTEXT "Symbol &Name",IDC_STATIC,18,84,44,8
- EDITTEXT IDC_SYMBOL,18,96,68,12,ES_AUTOHSCROLL,WS_EX_CLIENTEDGE
- LTEXT "&Value (optional)",IDC_STATIC,18,120,50,8
- EDITTEXT IDC_VALUE,18,132,66,12,ES_AUTOHSCROLL,WS_EX_CLIENTEDGE
- PUSHBUTTON "&Add >>",IDRIGHT,96,84,49,14
- PUSHBUTTON "&Edit <<",IDLEFT,96,108,49,14
- PUSHBUTTON "&Delete",IDDEL,96,132,49,14
- LTEXT "Symbol List",IDC_STATIC,156,66,118,9
- LISTBOX IDC_SYMBOLS,156,78,121,79,LBS_NOINTEGRALHEIGHT |
- LBS_EXTENDEDSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,
- WS_EX_CLIENTEDGE
- PUSHBUTTON "&Clear",IDCLEAR,156,162,36,14
- PUSHBUTTON "&Load",IDLOAD,198,162,36,14
- PUSHBUTTON "&Save",IDSAVE,240,162,36,14
-END
-
-DLG_COMPRESSOR DIALOGEX 0, 0, 250, 53
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-CAPTION "Choose Compressor"
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,138,30,48,14
- PUSHBUTTON "Cancel",IDCANCEL,192,30,48,14
- LTEXT "Compressor:",IDC_STATIC,6,14,43,8
- COMBOBOX IDC_COMPRESSOR,54,12,184,94,CBS_DROPDOWNLIST |
- WS_VSCROLL | WS_TABSTOP
-END
-
-DLG_SYMBOLSET DIALOGEX 0, 0, 190, 125
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,78,102,50,14
- PUSHBUTTON "Cancel",IDCANCEL,132,102,50,14
- LTEXT "Symbol Definitions Set Name:",IDC_STATIC,6,6,101,10
- COMBOBOX IDC_NAMES,6,17,174,85,CBS_SIMPLE | CBS_AUTOHSCROLL |
- CBS_SORT | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "&Delete",IDDEL,6,102,50,14
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- DLG_MAIN, DIALOG
- BEGIN
- RIGHTMARGIN, 361
- BOTTOMMARGIN, 228
- END
-
- DLG_ABOUT, DIALOG
- BEGIN
- BOTTOMMARGIN, 121
- END
-
- DLG_SETTINGS, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 285
- TOPMARGIN, 7
- BOTTOMMARGIN, 208
- END
-
- DLG_COMPRESSOR, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 243
- TOPMARGIN, 7
- BOTTOMMARGIN, 46
- END
-
- DLG_SYMBOLSET, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 183
- TOPMARGIN, 7
- BOTTOMMARGIN, 118
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// RT_MANIFEST
-//
-
-1 RT_MANIFEST "makensisw.xml"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_LOGO BITMAP "logo.bmp"
-IDB_TOOLBAR BITMAP "toolbar.bmp"
-IDB_TOOLBAR24 BITMAP "toolbar24.bmp"
-IDB_TOOLBAR24D BITMAP "toolbar24d.bmp"
-IDB_TOOLBAR24H BITMAP "toolbar24h.bmp"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE
-BEGIN
- IDS_LOADSCRIPT "Load Script..."
- IDS_SAVE "Save Output..."
- IDS_EXIT "Exit"
- IDS_COPY "Copy"
- IDS_FIND "Find..."
- IDS_RECOMPILE "Recompile"
- IDS_SETTINGS "Settings..."
- IDS_COMPRESSOR "Set Compressor"
- IDS_TEST "Test Installer"
- IDS_EDITSCRIPT "Edit Script"
- IDS_BROWSESCR "Open Script Folder"
- IDS_CLEARLOG "Clear Log Window"
- IDS_NSISHOME "NSIS Homepage"
- IDS_FORUM "NSIS Forum"
-END
-
-STRINGTABLE
-BEGIN
- IDS_NSISUPDATE "NSIS Update"
- IDS_DOCS "NSIS Users Manual"
- IDS_SCRIPT "Defined in Script/Compiler Default"
- IDS_ZLIB "ZLIB"
- IDS_ZLIB_SOLID "ZLIB (solid)"
- IDS_BZIP2 "BZIP2"
- IDS_BZIP2_SOLID "BZIP2 (solid)"
- IDS_RECOMPILE_TEST "Recompile and Test"
- IDS_BEST "Best Compressor"
- IDS_LZMA "LZMA"
- IDS_LZMA_SOLID "LZMA (solid)"
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON ICON "icon.ico"
+IDI_SHELL ICON "shell.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDM_MENU MENUEX
+BEGIN
+ POPUP "&File", IDM_FILE
+ BEGIN
+ MENUITEM "&Save Output...", IDM_SAVE
+ MENUITEM "&Load Script...\tCtrl+L", IDM_LOADSCRIPT
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "E&xit\tAlt+X", IDM_EXIT
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "", IDM_MRU_FILE
+ END
+ POPUP "&Edit", IDM_EDIT
+ BEGIN
+ MENUITEM "&Copy\tCtrl+C", IDM_COPYSELECTED
+ MENUITEM "Copy &All", IDM_COPY
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "&Find...\tCtrl+F", IDM_FIND
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "&Select All\tCtrl+A", IDM_SELECTALL
+ MENUITEM "Clear &Log Window\tCtrl+W", IDM_CLEARLOG
+ END
+ POPUP "&Script", IDM_SCRIPT
+ BEGIN
+ MENUITEM "&Recompile\tCtrl+R", IDM_RECOMPILE
+ MENUITEM "Test &Installer\tCtrl+T", IDM_TEST
+ MENUITEM "Reco&mpile and Test\tCtrl+M", IDM_RECOMPILE_TEST
+ MENUITEM "C&ancel compilation", IDM_CANCEL
+ MENUITEM "", -1, MFT_SEPARATOR
+ POPUP "Set &Compressor", IDM_COMPRESSOR_SUBMENU
+ BEGIN
+ MENUITEM "&Defined in Script/Compiler Default", IDM_COMPRESSOR_SCRIPT
+ MENUITEM "&ZLIB", IDM_ZLIB
+ MENUITEM "ZLIB (solid)", IDM_ZLIB_SOLID
+ MENUITEM "BZI&P2", IDM_BZIP2
+ MENUITEM "BZIP2 (solid)", IDM_BZIP2_SOLID
+ MENUITEM "&LZMA", IDM_LZMA
+ MENUITEM "LZMA (solid)", IDM_LZMA_SOLID
+ MENUITEM "&Best Compressor", IDM_BEST
+ END
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "&Edit Script\tCtrl+E", IDM_EDITSCRIPT
+ MENUITEM "Open Script &Folder\tCtrl+B", IDM_BROWSESCR
+ END
+ POPUP "&Tools", IDM_TOOLS
+ BEGIN
+ MENUITEM "&Settings..\tCtrl+S", IDM_SETTINGS
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "Clear Recent &Files List", IDM_CLEAR_MRU_LIST
+ END
+ POPUP "&Help", IDM_HELP
+ BEGIN
+ MENUITEM "NSIS Users &Manual\tF1", IDM_DOCS
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "NSIS &Homepage", IDM_NSISHOME
+ MENUITEM "NSIS &Forum", IDM_FORUM
+ MENUITEM "NSIS &Update", IDM_NSISUPDATE
+ MENUITEM "", -1, MFT_SEPARATOR
+ MENUITEM "&About MakeNSISW", IDM_ABOUT
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDK_ACCEL ACCELERATORS
+BEGIN
+ "A", IDM_SELECTALL, VIRTKEY, CONTROL, NOINVERT
+ "B", IDM_BROWSESCR, VIRTKEY, CONTROL, NOINVERT
+ "C", IDM_COPYSELECTED, VIRTKEY, CONTROL, NOINVERT
+ "E", IDM_EDITSCRIPT, VIRTKEY, CONTROL, NOINVERT
+ "F", IDM_FIND, VIRTKEY, CONTROL, NOINVERT
+ "L", IDM_LOADSCRIPT, VIRTKEY, CONTROL, NOINVERT
+ "M", IDM_RECOMPILE_TEST, VIRTKEY, CONTROL, NOINVERT
+ "R", IDM_RECOMPILE, VIRTKEY, CONTROL, NOINVERT
+ "S", IDM_SETTINGS, VIRTKEY, CONTROL, NOINVERT
+ "T", IDM_TEST, VIRTKEY, CONTROL, NOINVERT
+ VK_F1, IDM_DOCS, VIRTKEY, NOINVERT
+ "W", IDM_CLEARLOG, VIRTKEY, CONTROL, NOINVERT
+ "X", IDM_EXIT, VIRTKEY, ALT, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+DLG_MAIN DIALOG 0, 0, 362, 246
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX |
+ WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION |
+ WS_SYSMENU | WS_THICKFRAME
+CAPTION "MakeNSISW"
+MENU IDM_MENU
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "",IDC_LOGWIN,"RICHEDIT",TCS_HOTTRACK | TCS_BUTTONS |
+ TCS_RAGGEDRIGHT | TCS_OWNERDRAWFIXED | TCS_MULTISELECT |
+ WS_BORDER | WS_VSCROLL,7,22,345,186
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,220,346,1
+ LTEXT "",IDC_VERSION,7,230,200,12,WS_DISABLED
+ DEFPUSHBUTTON "&Close",IDCANCEL,296,226,49,15
+ PUSHBUTTON "Test &Installer",IDC_TEST,230,226,60,15,WS_DISABLED
+END
+
+DLG_ABOUT DIALOGEX 0, 0, 233, 126
+STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "About MakeNSISW"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,174,104,49,15
+ CONTROL 115,IDC_STATIC,"Static",SS_BITMAP,0,0,233,25
+ LTEXT "MakeNSISW",IDC_ABOUTVERSION,14,31,219,8
+ LTEXT "Copyright",IDC_ABOUTCOPY,14,43,220,8
+ LTEXT "Other Contributors:",IDC_ABOUTPORTIONS,14,56,220,10
+ LTEXT "",IDC_OTHERCONTRIB,27,68,206,22
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,15,97,208,1
+ LTEXT "NSIS",IDC_NSISVER,15,107,135,8,WS_DISABLED
+END
+
+DLG_SETTINGS DIALOGEX 0, 0, 292, 215
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "MakeNSISW Settings"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,180,192,48,14
+ PUSHBUTTON "Cancel",IDCANCEL,234,192,48,14
+ GROUPBOX "Default Compressor (overrides script setting)",
+ IDC_STATIC,6,6,282,41
+ COMBOBOX IDC_COMPRESSOR,18,24,258,94,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
+ GROUPBOX "Symbol Definitions",IDC_STATIC,6,54,282,132
+ LTEXT "Symbol &Name",IDC_STATIC,18,84,44,8
+ EDITTEXT IDC_SYMBOL,18,96,68,12,ES_AUTOHSCROLL,WS_EX_CLIENTEDGE
+ LTEXT "&Value (optional)",IDC_STATIC,18,120,50,8
+ EDITTEXT IDC_VALUE,18,132,66,12,ES_AUTOHSCROLL,WS_EX_CLIENTEDGE
+ PUSHBUTTON "&Add >>",IDRIGHT,96,84,49,14
+ PUSHBUTTON "&Edit <<",IDLEFT,96,108,49,14
+ PUSHBUTTON "&Delete",IDDEL,96,132,49,14
+ LTEXT "Symbol List",IDC_STATIC,156,66,118,9
+ LISTBOX IDC_SYMBOLS,156,78,121,79,LBS_NOINTEGRALHEIGHT |
+ LBS_EXTENDEDSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,
+ WS_EX_CLIENTEDGE
+ PUSHBUTTON "&Clear",IDCLEAR,156,162,36,14
+ PUSHBUTTON "&Load",IDLOAD,198,162,36,14
+ PUSHBUTTON "&Save",IDSAVE,240,162,36,14
+END
+
+DLG_COMPRESSOR DIALOGEX 0, 0, 250, 53
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Choose Compressor"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,138,30,48,14
+ PUSHBUTTON "Cancel",IDCANCEL,192,30,48,14
+ LTEXT "Compressor:",IDC_STATIC,6,14,43,8
+ COMBOBOX IDC_COMPRESSOR,54,12,184,94,CBS_DROPDOWNLIST |
+ WS_VSCROLL | WS_TABSTOP
+END
+
+DLG_SYMBOLSET DIALOGEX 0, 0, 190, 125
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,78,102,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,132,102,50,14
+ LTEXT "Symbol Definitions Set Name:",IDC_STATIC,6,6,101,10
+ COMBOBOX IDC_NAMES,6,17,174,85,CBS_SIMPLE | CBS_AUTOHSCROLL |
+ CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Delete",IDDEL,6,102,50,14
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ DLG_MAIN, DIALOG
+ BEGIN
+ RIGHTMARGIN, 361
+ BOTTOMMARGIN, 228
+ END
+
+ DLG_ABOUT, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 121
+ END
+
+ DLG_SETTINGS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 285
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 208
+ END
+
+ DLG_COMPRESSOR, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 243
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 46
+ END
+
+ DLG_SYMBOLSET, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 183
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 118
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+1 RT_MANIFEST "makensisw.xml"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_LOGO BITMAP "logo.bmp"
+IDB_TOOLBAR BITMAP "toolbar.bmp"
+IDB_TOOLBAR24 BITMAP "toolbar24.bmp"
+IDB_TOOLBAR24D BITMAP "toolbar24d.bmp"
+IDB_TOOLBAR24H BITMAP "toolbar24h.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDS_LOADSCRIPT "Load Script..."
+ IDS_SAVE "Save Output..."
+ IDS_EXIT "Exit"
+ IDS_COPY "Copy"
+ IDS_FIND "Find..."
+ IDS_RECOMPILE "Recompile"
+ IDS_SETTINGS "Settings..."
+ IDS_COMPRESSOR "Set Compressor"
+ IDS_TEST "Test Installer"
+ IDS_EDITSCRIPT "Edit Script"
+ IDS_BROWSESCR "Open Script Folder"
+ IDS_CLEARLOG "Clear Log Window"
+ IDS_NSISHOME "NSIS Homepage"
+ IDS_FORUM "NSIS Forum"
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NSISUPDATE "NSIS Update"
+ IDS_DOCS "NSIS Users Manual"
+ IDS_SCRIPT "Defined in Script/Compiler Default"
+ IDS_ZLIB "ZLIB"
+ IDS_ZLIB_SOLID "ZLIB (solid)"
+ IDS_BZIP2 "BZIP2"
+ IDS_BZIP2_SOLID "BZIP2 (solid)"
+ IDS_RECOMPILE_TEST "Recompile and Test"
+ IDS_BEST "Best Compressor"
+ IDS_LZMA "LZMA"
+ IDS_LZMA_SOLID "LZMA (solid)"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/Makensisw/toolbar.cpp b/Contrib/Makensisw/toolbar.cpp
index 876fd85..55edbf7 100755
--- a/Contrib/Makensisw/toolbar.cpp
+++ b/Contrib/Makensisw/toolbar.cpp
@@ -1,225 +1,225 @@
-/*
- Copyright (c) 2003 Sunil Kamath
- Modified by Joost Verburg
-
- 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.
-
-*/
-#define TOOLBAR_CPP
-
-#include "makensisw.h"
-#include "resource.h"
-#include "noclib.h"
-#include "toolbar.h"
-
-NTOOLBAR g_toolbar;
-extern NSCRIPTDATA g_sdata;
-extern NTOOLTIP g_tip;
-
-TBBUTTON CreateToolBarButton(int iBitmap, int idCommand, BYTE fsState, BYTE fsStyle, DWORD dwData, int iString)
-{
- TBBUTTON tbButton;
- tbButton.iBitmap = iBitmap;
- tbButton.idCommand = idCommand;
- tbButton.fsState = fsState;
- tbButton.fsStyle = fsStyle;
- tbButton.dwData = dwData;
- tbButton.iString = iString;
-
- return tbButton;
-}
-
-void CreateToolBar()
-{
- static TBBUTTON tbButton[BUTTONCOUNT];
- tbButton[TBB_LOADSCRIPT] = CreateToolBarButton(IDB_LOADSCRIPT, IDM_LOADSCRIPT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_SAVE] = CreateToolBarButton(IDB_SAVE, IDM_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_SEP1] = CreateToolBarButton(0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0);
- tbButton[TBB_COPY] = CreateToolBarButton(IDB_COPY, IDM_COPY, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_FIND] = CreateToolBarButton(IDB_FIND, IDM_FIND, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_CLEARLOG] = CreateToolBarButton(IDB_CLEARLOG, IDM_CLEARLOG, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_SEP2] = CreateToolBarButton(0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0);
- tbButton[TBB_RECOMPILE] = CreateToolBarButton(IDB_RECOMPILE, IDM_RECOMPILE, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_COMPRESSOR] = CreateToolBarButton(IDB_COMPRESSOR, IDM_COMPRESSOR, TBSTATE_ENABLED, TBSTYLE_DROPDOWN, 0, 0);
- tbButton[TBB_TEST] = CreateToolBarButton(IDB_TEST, IDM_TEST, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_EDITSCRIPT] = CreateToolBarButton(IDB_EDITSCRIPT, IDM_EDITSCRIPT, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_BROWSESCR] = CreateToolBarButton(IDB_BROWSESCR, IDM_BROWSESCR, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_SEP3] = CreateToolBarButton(0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0);
- tbButton[TBB_NSISHOME] = CreateToolBarButton(IDB_NSISHOME, IDM_NSISHOME, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
- tbButton[TBB_DOCS] = CreateToolBarButton(IDB_DOCS, IDM_DOCS, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
-
- g_toolbar.hwnd = CreateWindowEx (
- 0L,
- TOOLBARCLASSNAME,
- "",
- WS_CHILD | WS_VISIBLE | TBSTYLE_TRANSPARENT | TBSTYLE_FLAT,
- 0, 0, 0, 30,
- g_sdata.hwnd,
- (HMENU) TOOLBAR_ID,
- g_sdata.hInstance,
- NULL );
-
- SendMessage(g_toolbar.hwnd, TB_BUTTONSTRUCTSIZE, sizeof(tbButton[0]), 0);
- SendMessage(g_toolbar.hwnd, TB_ADDBUTTONS, BUTTONCOUNT, (LONG) &tbButton);
-
- // For Comctl32.dll version detection
- HMODULE hMod = GetModuleHandle("comctl32.dll");
-
- if (GetProcAddress(hMod, "InitCommonControlsEx")) { // Version 4.70
- // Modern toolbar, 24-bit bitmaps
-
- g_toolbar.imagelist = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
- g_toolbar.imagelistd = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24D), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
- g_toolbar.imagelisth = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24H), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
-
- SendMessage(g_toolbar.hwnd, TB_SETIMAGELIST, 0, (LPARAM) g_toolbar.imagelist);
- SendMessage(g_toolbar.hwnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM) g_toolbar.imagelistd);
- SendMessage(g_toolbar.hwnd, TB_SETHOTIMAGELIST, 0, (LPARAM) g_toolbar.imagelisth);
-
- // Version 4.71
- if (GetProcAddress(hMod, "DllGetVersion")) {
- SendMessage(g_toolbar.hwnd, TB_SETEXTENDEDSTYLE, 0, (LPARAM) (DWORD) TBSTYLE_EX_DRAWDDARROWS);
- }
-
- }
- else
- {
- // Old Windows 95 toolbar, 256 color bitmap with system palette
-
- TBADDBITMAP tbBitmap;
-
- tbBitmap.hInst = g_sdata.hInstance;
- tbBitmap.nID = IDB_TOOLBAR;
-
- SendMessage(g_toolbar.hwnd, TB_ADDBITMAP, IMAGECOUNT, (LONG) &tbBitmap);
- }
-
- HMENU toolmenu = FindSubMenu(g_sdata.menu, IDM_SCRIPT);
- g_toolbar.dropdownmenu = FindSubMenu(toolmenu, IDM_COMPRESSOR_SUBMENU);
- RECT rect;
- SendMessage(g_toolbar.hwnd, TB_GETITEMRECT, TBB_COMPRESSOR, (LPARAM) (LPRECT) &rect);
- g_toolbar.dropdownpoint.x = rect.left;
- g_toolbar.dropdownpoint.y = rect.bottom+1;
-}
-
-void UpdateToolBarCompressorButton()
-{
- int iBitmap;
- int iString;
- char szBuffer[64];
- char temp[32];
- TOOLINFO ti;
-
- my_memset(&ti, 0, sizeof(TOOLINFO));
-
- if(g_sdata.compressor >= COMPRESSOR_SCRIPT && g_sdata.compressor <= COMPRESSOR_BEST) {
- iBitmap = compressor_bitmaps[(int)g_sdata.compressor];
- iString = compressor_strings[(int)g_sdata.compressor];
- }
- else {
- return;
- }
- LoadString(g_sdata.hInstance,
- IDS_COMPRESSOR,
- temp,
- sizeof(temp));
- my_memset(szBuffer, 0, sizeof(szBuffer));
- lstrcat(szBuffer,temp);
- lstrcat(szBuffer," [");
- LoadString(g_sdata.hInstance,
- iString,
- temp,
- sizeof(temp));
- lstrcat(szBuffer,temp);
- lstrcat(szBuffer,"]");
-
- SendMessage(g_toolbar.hwnd, TB_CHANGEBITMAP, (WPARAM) IDM_COMPRESSOR, (LPARAM) MAKELPARAM(iBitmap, 0));
-
- ti.cbSize = sizeof(TOOLINFO);
- ti.uFlags = 0;
- ti.hinst = g_sdata.hInstance;
- ti.hwnd = g_toolbar.hwnd;
- ti.uId = (UINT)TBB_COMPRESSOR;
- SendMessage(g_tip.tip, TTM_GETTOOLINFO, 0, (LPARAM) (LPTOOLINFO) &ti);
- ti.lpszText = (LPSTR)szBuffer;
- SendMessage(g_tip.tip, TTM_SETTOOLINFO, 0, (LPARAM) (LPTOOLINFO) &ti);
-}
-
-void AddToolBarButtonTooltip(int id, int iString)
-{
- TOOLINFO ti;
- char szBuffer[64];
- RECT rect;
-
- my_memset(&ti, 0, sizeof(TOOLINFO));
-
- SendMessage(g_toolbar.hwnd, TB_GETITEMRECT, id, (LPARAM) (LPRECT) &rect);
-
- ti.cbSize = sizeof(TOOLINFO);
- ti.uFlags = 0;
- ti.hwnd = g_toolbar.hwnd;
- ti.hinst = g_sdata.hInstance;
- ti.uId = (UINT)id;
-
- LoadString(g_sdata.hInstance,
- iString,
- szBuffer,
- sizeof(szBuffer));
- ti.lpszText = (LPSTR) szBuffer;
- ti.rect.left =rect.left;
- ti.rect.top = rect.top;
- ti.rect.right = rect.right;
- ti.rect.bottom = rect.bottom;
-
- SendMessage(g_tip.tip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
-}
-
-void AddToolBarTooltips()
-{
- AddToolBarButtonTooltip(TBB_LOADSCRIPT, IDS_LOADSCRIPT);
- AddToolBarButtonTooltip(TBB_SAVE, IDS_SAVE);
- AddToolBarButtonTooltip(TBB_COPY, IDS_COPY);
- AddToolBarButtonTooltip(TBB_FIND, IDS_FIND);
- AddToolBarButtonTooltip(TBB_RECOMPILE, IDS_RECOMPILE);
- AddToolBarButtonTooltip(TBB_COMPRESSOR, IDS_COMPRESSOR);
- AddToolBarButtonTooltip(TBB_TEST, IDS_TEST);
- AddToolBarButtonTooltip(TBB_EDITSCRIPT, IDS_EDITSCRIPT);
- AddToolBarButtonTooltip(TBB_BROWSESCR, IDS_BROWSESCR);
- AddToolBarButtonTooltip(TBB_CLEARLOG, IDS_CLEARLOG);
- AddToolBarButtonTooltip(TBB_NSISHOME, IDS_NSISHOME);
- AddToolBarButtonTooltip(TBB_DOCS, IDS_DOCS);
-}
-
-void EnableToolBarButton(int id, BOOL enabled)
-{
- UINT state = (enabled?TBSTATE_ENABLED:TBSTATE_INDETERMINATE);
-
- SendMessage(g_toolbar.hwnd, TB_SETSTATE, id, MAKELPARAM(state, 0));
-}
-
-void ShowToolbarDropdownMenu()
-{
- RECT rect;
- GetWindowRect(g_toolbar.hwnd, (LPRECT) &rect);
- TrackPopupMenu(g_toolbar.dropdownmenu,
- (UINT)NULL,
- rect.left + (int)(short)g_toolbar.dropdownpoint.x,
- rect.top + (int)(short)g_toolbar.dropdownpoint.y,
- 0,
- g_sdata.hwnd,
- 0);
-}
+/*
+ Copyright (c) 2003 Sunil Kamath
+ Modified by Joost Verburg
+
+ 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.
+
+*/
+#define TOOLBAR_CPP
+
+#include "makensisw.h"
+#include "resource.h"
+#include "noclib.h"
+#include "toolbar.h"
+
+NTOOLBAR g_toolbar;
+extern NSCRIPTDATA g_sdata;
+extern NTOOLTIP g_tip;
+
+TBBUTTON CreateToolBarButton(int iBitmap, int idCommand, BYTE fsState, BYTE fsStyle, DWORD dwData, int iString)
+{
+ TBBUTTON tbButton;
+ tbButton.iBitmap = iBitmap;
+ tbButton.idCommand = idCommand;
+ tbButton.fsState = fsState;
+ tbButton.fsStyle = fsStyle;
+ tbButton.dwData = dwData;
+ tbButton.iString = iString;
+
+ return tbButton;
+}
+
+void CreateToolBar()
+{
+ static TBBUTTON tbButton[BUTTONCOUNT];
+ tbButton[TBB_LOADSCRIPT] = CreateToolBarButton(IDB_LOADSCRIPT, IDM_LOADSCRIPT, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_SAVE] = CreateToolBarButton(IDB_SAVE, IDM_SAVE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_SEP1] = CreateToolBarButton(0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0);
+ tbButton[TBB_COPY] = CreateToolBarButton(IDB_COPY, IDM_COPY, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_FIND] = CreateToolBarButton(IDB_FIND, IDM_FIND, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_CLEARLOG] = CreateToolBarButton(IDB_CLEARLOG, IDM_CLEARLOG, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_SEP2] = CreateToolBarButton(0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0);
+ tbButton[TBB_RECOMPILE] = CreateToolBarButton(IDB_RECOMPILE, IDM_RECOMPILE, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_COMPRESSOR] = CreateToolBarButton(IDB_COMPRESSOR, IDM_COMPRESSOR, TBSTATE_ENABLED, TBSTYLE_DROPDOWN, 0, 0);
+ tbButton[TBB_TEST] = CreateToolBarButton(IDB_TEST, IDM_TEST, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_EDITSCRIPT] = CreateToolBarButton(IDB_EDITSCRIPT, IDM_EDITSCRIPT, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_BROWSESCR] = CreateToolBarButton(IDB_BROWSESCR, IDM_BROWSESCR, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_SEP3] = CreateToolBarButton(0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0);
+ tbButton[TBB_NSISHOME] = CreateToolBarButton(IDB_NSISHOME, IDM_NSISHOME, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
+ tbButton[TBB_DOCS] = CreateToolBarButton(IDB_DOCS, IDM_DOCS, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0);
+
+ g_toolbar.hwnd = CreateWindowEx (
+ 0L,
+ TOOLBARCLASSNAME,
+ "",
+ WS_CHILD | WS_VISIBLE | TBSTYLE_TRANSPARENT | TBSTYLE_FLAT,
+ 0, 0, 0, 30,
+ g_sdata.hwnd,
+ (HMENU) TOOLBAR_ID,
+ g_sdata.hInstance,
+ NULL );
+
+ SendMessage(g_toolbar.hwnd, TB_BUTTONSTRUCTSIZE, sizeof(tbButton[0]), 0);
+ SendMessage(g_toolbar.hwnd, TB_ADDBUTTONS, BUTTONCOUNT, (LONG) &tbButton);
+
+ // For Comctl32.dll version detection
+ HMODULE hMod = GetModuleHandle("comctl32.dll");
+
+ if (GetProcAddress(hMod, "InitCommonControlsEx")) { // Version 4.70
+ // Modern toolbar, 24-bit bitmaps
+
+ g_toolbar.imagelist = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
+ g_toolbar.imagelistd = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24D), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
+ g_toolbar.imagelisth = ImageList_LoadImage(g_sdata.hInstance, MAKEINTRESOURCE(IDB_TOOLBAR24H), 16, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
+
+ SendMessage(g_toolbar.hwnd, TB_SETIMAGELIST, 0, (LPARAM) g_toolbar.imagelist);
+ SendMessage(g_toolbar.hwnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM) g_toolbar.imagelistd);
+ SendMessage(g_toolbar.hwnd, TB_SETHOTIMAGELIST, 0, (LPARAM) g_toolbar.imagelisth);
+
+ // Version 4.71
+ if (GetProcAddress(hMod, "DllGetVersion")) {
+ SendMessage(g_toolbar.hwnd, TB_SETEXTENDEDSTYLE, 0, (LPARAM) (DWORD) TBSTYLE_EX_DRAWDDARROWS);
+ }
+
+ }
+ else
+ {
+ // Old Windows 95 toolbar, 256 color bitmap with system palette
+
+ TBADDBITMAP tbBitmap;
+
+ tbBitmap.hInst = g_sdata.hInstance;
+ tbBitmap.nID = IDB_TOOLBAR;
+
+ SendMessage(g_toolbar.hwnd, TB_ADDBITMAP, IMAGECOUNT, (LONG) &tbBitmap);
+ }
+
+ HMENU toolmenu = FindSubMenu(g_sdata.menu, IDM_SCRIPT);
+ g_toolbar.dropdownmenu = FindSubMenu(toolmenu, IDM_COMPRESSOR_SUBMENU);
+ RECT rect;
+ SendMessage(g_toolbar.hwnd, TB_GETITEMRECT, TBB_COMPRESSOR, (LPARAM) (LPRECT) &rect);
+ g_toolbar.dropdownpoint.x = rect.left;
+ g_toolbar.dropdownpoint.y = rect.bottom+1;
+}
+
+void UpdateToolBarCompressorButton()
+{
+ int iBitmap;
+ int iString;
+ char szBuffer[64];
+ char temp[32];
+ TOOLINFO ti;
+
+ my_memset(&ti, 0, sizeof(TOOLINFO));
+
+ if(g_sdata.compressor >= COMPRESSOR_SCRIPT && g_sdata.compressor <= COMPRESSOR_BEST) {
+ iBitmap = compressor_bitmaps[(int)g_sdata.compressor];
+ iString = compressor_strings[(int)g_sdata.compressor];
+ }
+ else {
+ return;
+ }
+ LoadString(g_sdata.hInstance,
+ IDS_COMPRESSOR,
+ temp,
+ sizeof(temp));
+ my_memset(szBuffer, 0, sizeof(szBuffer));
+ lstrcat(szBuffer,temp);
+ lstrcat(szBuffer," [");
+ LoadString(g_sdata.hInstance,
+ iString,
+ temp,
+ sizeof(temp));
+ lstrcat(szBuffer,temp);
+ lstrcat(szBuffer,"]");
+
+ SendMessage(g_toolbar.hwnd, TB_CHANGEBITMAP, (WPARAM) IDM_COMPRESSOR, (LPARAM) MAKELPARAM(iBitmap, 0));
+
+ ti.cbSize = sizeof(TOOLINFO);
+ ti.uFlags = 0;
+ ti.hinst = g_sdata.hInstance;
+ ti.hwnd = g_toolbar.hwnd;
+ ti.uId = (UINT)TBB_COMPRESSOR;
+ SendMessage(g_tip.tip, TTM_GETTOOLINFO, 0, (LPARAM) (LPTOOLINFO) &ti);
+ ti.lpszText = (LPSTR)szBuffer;
+ SendMessage(g_tip.tip, TTM_SETTOOLINFO, 0, (LPARAM) (LPTOOLINFO) &ti);
+}
+
+void AddToolBarButtonTooltip(int id, int iString)
+{
+ TOOLINFO ti;
+ char szBuffer[64];
+ RECT rect;
+
+ my_memset(&ti, 0, sizeof(TOOLINFO));
+
+ SendMessage(g_toolbar.hwnd, TB_GETITEMRECT, id, (LPARAM) (LPRECT) &rect);
+
+ ti.cbSize = sizeof(TOOLINFO);
+ ti.uFlags = 0;
+ ti.hwnd = g_toolbar.hwnd;
+ ti.hinst = g_sdata.hInstance;
+ ti.uId = (UINT)id;
+
+ LoadString(g_sdata.hInstance,
+ iString,
+ szBuffer,
+ sizeof(szBuffer));
+ ti.lpszText = (LPSTR) szBuffer;
+ ti.rect.left =rect.left;
+ ti.rect.top = rect.top;
+ ti.rect.right = rect.right;
+ ti.rect.bottom = rect.bottom;
+
+ SendMessage(g_tip.tip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+}
+
+void AddToolBarTooltips()
+{
+ AddToolBarButtonTooltip(TBB_LOADSCRIPT, IDS_LOADSCRIPT);
+ AddToolBarButtonTooltip(TBB_SAVE, IDS_SAVE);
+ AddToolBarButtonTooltip(TBB_COPY, IDS_COPY);
+ AddToolBarButtonTooltip(TBB_FIND, IDS_FIND);
+ AddToolBarButtonTooltip(TBB_RECOMPILE, IDS_RECOMPILE);
+ AddToolBarButtonTooltip(TBB_COMPRESSOR, IDS_COMPRESSOR);
+ AddToolBarButtonTooltip(TBB_TEST, IDS_TEST);
+ AddToolBarButtonTooltip(TBB_EDITSCRIPT, IDS_EDITSCRIPT);
+ AddToolBarButtonTooltip(TBB_BROWSESCR, IDS_BROWSESCR);
+ AddToolBarButtonTooltip(TBB_CLEARLOG, IDS_CLEARLOG);
+ AddToolBarButtonTooltip(TBB_NSISHOME, IDS_NSISHOME);
+ AddToolBarButtonTooltip(TBB_DOCS, IDS_DOCS);
+}
+
+void EnableToolBarButton(int id, BOOL enabled)
+{
+ UINT state = (enabled?TBSTATE_ENABLED:TBSTATE_INDETERMINATE);
+
+ SendMessage(g_toolbar.hwnd, TB_SETSTATE, id, MAKELPARAM(state, 0));
+}
+
+void ShowToolbarDropdownMenu()
+{
+ RECT rect;
+ GetWindowRect(g_toolbar.hwnd, (LPRECT) &rect);
+ TrackPopupMenu(g_toolbar.dropdownmenu,
+ (UINT)NULL,
+ rect.left + (int)(short)g_toolbar.dropdownpoint.x,
+ rect.top + (int)(short)g_toolbar.dropdownpoint.y,
+ 0,
+ g_sdata.hwnd,
+ 0);
+}
diff --git a/Contrib/Makensisw/toolbar.h b/Contrib/Makensisw/toolbar.h
index e341047..568118a 100755
--- a/Contrib/Makensisw/toolbar.h
+++ b/Contrib/Makensisw/toolbar.h
@@ -1,80 +1,80 @@
-/*
- Copyright (c) 2003 Sunil Kamath
- Modified by Joost Verburg
-
- 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.
-
-*/
-#ifndef TOOLBAR_H
-#define TOOLBAR_H
-#include <commctrl.h>
-
-#define TOOLBAR_ID 10001
-
-#define BUTTONCOUNT 15
-
-#define TBB_LOADSCRIPT 0
-#define TBB_SAVE 1
-#define TBB_SEP1 2
-#define TBB_COPY 3
-#define TBB_FIND 4
-#define TBB_CLEARLOG 5
-#define TBB_SEP2 6
-#define TBB_RECOMPILE 7
-#define TBB_TEST 8
-#define TBB_COMPRESSOR 9
-#define TBB_EDITSCRIPT 10
-#define TBB_BROWSESCR 11
-#define TBB_SEP3 12
-#define TBB_NSISHOME 13
-#define TBB_DOCS 14
-
-#define IMAGECOUNT 16
-
-#define IDB_LOADSCRIPT 0
-#define IDB_SAVE 1
-#define IDB_COPY 2
-#define IDB_FIND 3
-#define IDB_RECOMPILE 4
-#define IDB_TEST 5
-#define IDB_EDITSCRIPT 6
-#define IDB_BROWSESCR 7
-#define IDB_CLEARLOG 8
-#define IDB_NSISHOME 9
-#define IDB_DOCS 10
-#define IDB_COMPRESSOR 11
-#define IDB_COMPRESSOR_SCRIPT 11
-#define IDB_COMPRESSOR_BZIP2 12
-#define IDB_COMPRESSOR_ZLIB 13
-#define IDB_COMPRESSOR_BEST 14
-#define IDB_COMPRESSOR_LZMA 15
-
-typedef struct ToolBarStruct {
- HWND hwnd;
- HMENU dropdownmenu;
- POINT dropdownpoint;
- HIMAGELIST imagelist;
- HIMAGELIST imagelistd;
- HIMAGELIST imagelisth;
-} NTOOLBAR;
-
-void CreateToolBar();
-void EnableToolBarButton(int, BOOL);
-void AddToolBarTooltips();
-void ShowToolbarDropdownMenu();
-void UpdateToolBarCompressorButton();
-#endif
+/*
+ Copyright (c) 2003 Sunil Kamath
+ Modified by Joost Verburg
+
+ 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.
+
+*/
+#ifndef TOOLBAR_H
+#define TOOLBAR_H
+#include <commctrl.h>
+
+#define TOOLBAR_ID 10001
+
+#define BUTTONCOUNT 15
+
+#define TBB_LOADSCRIPT 0
+#define TBB_SAVE 1
+#define TBB_SEP1 2
+#define TBB_COPY 3
+#define TBB_FIND 4
+#define TBB_CLEARLOG 5
+#define TBB_SEP2 6
+#define TBB_RECOMPILE 7
+#define TBB_TEST 8
+#define TBB_COMPRESSOR 9
+#define TBB_EDITSCRIPT 10
+#define TBB_BROWSESCR 11
+#define TBB_SEP3 12
+#define TBB_NSISHOME 13
+#define TBB_DOCS 14
+
+#define IMAGECOUNT 16
+
+#define IDB_LOADSCRIPT 0
+#define IDB_SAVE 1
+#define IDB_COPY 2
+#define IDB_FIND 3
+#define IDB_RECOMPILE 4
+#define IDB_TEST 5
+#define IDB_EDITSCRIPT 6
+#define IDB_BROWSESCR 7
+#define IDB_CLEARLOG 8
+#define IDB_NSISHOME 9
+#define IDB_DOCS 10
+#define IDB_COMPRESSOR 11
+#define IDB_COMPRESSOR_SCRIPT 11
+#define IDB_COMPRESSOR_BZIP2 12
+#define IDB_COMPRESSOR_ZLIB 13
+#define IDB_COMPRESSOR_BEST 14
+#define IDB_COMPRESSOR_LZMA 15
+
+typedef struct ToolBarStruct {
+ HWND hwnd;
+ HMENU dropdownmenu;
+ POINT dropdownpoint;
+ HIMAGELIST imagelist;
+ HIMAGELIST imagelistd;
+ HIMAGELIST imagelisth;
+} NTOOLBAR;
+
+void CreateToolBar();
+void EnableToolBarButton(int, BOOL);
+void AddToolBarTooltips();
+void ShowToolbarDropdownMenu();
+void UpdateToolBarCompressorButton();
+#endif
diff --git a/Contrib/Makensisw/update.cpp b/Contrib/Makensisw/update.cpp
index 741c7d6..9dcbc17 100755
--- a/Contrib/Makensisw/update.cpp
+++ b/Contrib/Makensisw/update.cpp
@@ -1,140 +1,140 @@
-#include "makensisw.h"
-#include "update.h"
-#include "noclib.h"
-
-#include "jnetlib/httpget.h"
-
-static BOOL update_initialized = FALSE;
-
-static JNL_AsyncDNS *g_dns = NULL;
-
-void InitializeUpdate() {
- if (update_initialized)
- return;
-
- update_initialized = TRUE;
- JNL::open_socketlib();
- g_dns = new JNL_AsyncDNS();
-}
-
-void FinalizeUpdate() {
- if (!update_initialized)
- return;
-
- delete g_dns;
- JNL::close_socketlib();
-}
-
-int getProxyInfo(char *out) {
- DWORD v=0;
- HKEY hKey;
- if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS) {
- DWORD l = 4;
- DWORD t;
- if (RegQueryValueEx(hKey,"ProxyEnable",NULL,&t,(unsigned char *)&v,&l) == ERROR_SUCCESS && t == REG_DWORD) {
- l=8192;
- if (RegQueryValueEx(hKey,"ProxyServer",NULL,&t,(unsigned char *)out,&l ) != ERROR_SUCCESS || t != REG_SZ) {
- v=0;
- *out=0;
- }
- }
- else v=0;
- out[8192-1]=0;
- RegCloseKey(hKey);
- }
- return v;
-}
-
-DWORD CALLBACK UpdateThread(LPVOID v) {
- #define RSZ 30
- int len;
- char *response = (char *)GlobalAlloc(GPTR,RSZ);
- char *r;
- char url[300];
- BOOL error = FALSE;
- static char pbuf[8192];
- char *p=NULL;
- *response = 0;
-
- if (getProxyInfo(pbuf))
- {
- p=my_strstr(pbuf,"http=");
- if (!p) p=pbuf;
- else {
- p+=5;
- }
- char *tp=my_strstr(p,";");
- if (tp) *tp=0;
- char *p2=my_strstr(p,"=");
- if (p2) p=0; // we found the wrong proxy
- }
-
- InitializeUpdate();
-
- JNL_HTTPGet *get = new JNL_HTTPGet(g_dns,8192,(p&&p[0])?p:NULL);;
- lstrcpy(url,NSIS_UPDATE);
- lstrcat(url,g_sdata.brandingv);
- lstrcpy(response,"");
- get->addheader("User-Agent: MakeNSISw (jnetlib)");
- get->addheader("Accept:*/*");
- get->connect(url);
- while (1) {
- int st=get->run();
- if (st<0) { error = TRUE; break; }//error
- if (get->get_status()==2) {
- while(len=get->bytes_available()) {
- char b[RSZ];
- if (len>RSZ) len=RSZ;
- if (lstrlen(response)+len>RSZ) break;
- len=get->get_bytes(b,len);
- b[len]=0;
- lstrcat(response,b);
- }
- }
- if (st==1) break; //closed
- }
- r = response;
- while (r&&*r) {
- if (*r=='\n') { *r = 0; break; }
- r++;
- }
- if (error) {
- char buf[1000];
- wsprintf(buf,"There was a problem checking for an update. Please try again later.\n\nError: %s",get->geterrorstr());
- MessageBox(g_sdata.hwnd,buf,"NSIS Update",MB_OK|MB_ICONINFORMATION);
- }
- else if (*response=='1'&&lstrlen(response)>2) {
- char buf[200];
- response+=2;
- wsprintf(buf,"NSIS %s is now available. Would you like to download it now?",response);
- if (MessageBox(g_sdata.hwnd,buf,"NSIS Update",MB_YESNO|MB_ICONINFORMATION)==IDYES) {
- ShellExecute(g_sdata.hwnd,"open",NSIS_DL_URL,NULL,NULL,SW_SHOWNORMAL);
- }
- }
- else if (*response=='2'&&lstrlen(response)>2) {
- char buf[200];
- response+=2;
- wsprintf(buf,"NSIS %s is now available. Would you like to download this preview release now?",response);
- if (MessageBox(g_sdata.hwnd,buf,"NSIS Update",MB_YESNO|MB_ICONINFORMATION)==IDYES) {
- ShellExecute(g_sdata.hwnd,"open",NSIS_DL_URL,NULL,NULL,SW_SHOWNORMAL);
- }
- }
- else MessageBox(g_sdata.hwnd,"There is no update available for NSIS at this time.","NSIS Update",MB_OK|MB_ICONINFORMATION);
- GlobalFree(response);
- delete get;
- EnableMenuItem(g_sdata.menu,IDM_NSISUPDATE,MF_ENABLED);
- return 0;
-}
-
-void Update() {
- DWORD dwThreadId;
-
- if (my_strstr(g_sdata.brandingv,"cvs"))
- {
- MessageBox(g_sdata.hwnd,"Cannot check for new version of CVS builds. To update, download a new nightly build.","NSIS Update",MB_OK|MB_ICONSTOP);
- return;
- }
-
- EnableMenuItem(g_sdata.menu,IDM_NSISUPDATE,MF_GRAYED);
- CloseHandle(CreateThread(NULL,0,UpdateThread,(LPVOID)NULL,0,&dwThreadId));
-}
+#include "makensisw.h"
+#include "update.h"
+#include "noclib.h"
+
+#include "jnetlib/httpget.h"
+
+static BOOL update_initialized = FALSE;
+
+static JNL_AsyncDNS *g_dns = NULL;
+
+void InitializeUpdate() {
+ if (update_initialized)
+ return;
+
+ update_initialized = TRUE;
+ JNL::open_socketlib();
+ g_dns = new JNL_AsyncDNS();
+}
+
+void FinalizeUpdate() {
+ if (!update_initialized)
+ return;
+
+ delete g_dns;
+ JNL::close_socketlib();
+}
+
+int getProxyInfo(char *out) {
+ DWORD v=0;
+ HKEY hKey;
+ if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS) {
+ DWORD l = 4;
+ DWORD t;
+ if (RegQueryValueEx(hKey,"ProxyEnable",NULL,&t,(unsigned char *)&v,&l) == ERROR_SUCCESS && t == REG_DWORD) {
+ l=8192;
+ if (RegQueryValueEx(hKey,"ProxyServer",NULL,&t,(unsigned char *)out,&l ) != ERROR_SUCCESS || t != REG_SZ) {
+ v=0;
+ *out=0;
+ }
+ }
+ else v=0;
+ out[8192-1]=0;
+ RegCloseKey(hKey);
+ }
+ return v;
+}
+
+DWORD CALLBACK UpdateThread(LPVOID v) {
+ #define RSZ 30
+ int len;
+ char *response = (char *)GlobalAlloc(GPTR,RSZ);
+ char *r;
+ char url[300];
+ BOOL error = FALSE;
+ static char pbuf[8192];
+ char *p=NULL;
+ *response = 0;
+
+ if (getProxyInfo(pbuf))
+ {
+ p=my_strstr(pbuf,"http=");
+ if (!p) p=pbuf;
+ else {
+ p+=5;
+ }
+ char *tp=my_strstr(p,";");
+ if (tp) *tp=0;
+ char *p2=my_strstr(p,"=");
+ if (p2) p=0; // we found the wrong proxy
+ }
+
+ InitializeUpdate();
+
+ JNL_HTTPGet *get = new JNL_HTTPGet(g_dns,8192,(p&&p[0])?p:NULL);;
+ lstrcpy(url,NSIS_UPDATE);
+ lstrcat(url,g_sdata.brandingv);
+ lstrcpy(response,"");
+ get->addheader("User-Agent: MakeNSISw (jnetlib)");
+ get->addheader("Accept:*/*");
+ get->connect(url);
+ while (1) {
+ int st=get->run();
+ if (st<0) { error = TRUE; break; }//error
+ if (get->get_status()==2) {
+ while(len=get->bytes_available()) {
+ char b[RSZ];
+ if (len>RSZ) len=RSZ;
+ if (lstrlen(response)+len>RSZ) break;
+ len=get->get_bytes(b,len);
+ b[len]=0;
+ lstrcat(response,b);
+ }
+ }
+ if (st==1) break; //closed
+ }
+ r = response;
+ while (r&&*r) {
+ if (*r=='\n') { *r = 0; break; }
+ r++;
+ }
+ if (error) {
+ char buf[1000];
+ wsprintf(buf,"There was a problem checking for an update. Please try again later.\n\nError: %s",get->geterrorstr());
+ MessageBox(g_sdata.hwnd,buf,"NSIS Update",MB_OK|MB_ICONINFORMATION);
+ }
+ else if (*response=='1'&&lstrlen(response)>2) {
+ char buf[200];
+ response+=2;
+ wsprintf(buf,"NSIS %s is now available. Would you like to download it now?",response);
+ if (MessageBox(g_sdata.hwnd,buf,"NSIS Update",MB_YESNO|MB_ICONINFORMATION)==IDYES) {
+ ShellExecute(g_sdata.hwnd,"open",NSIS_DL_URL,NULL,NULL,SW_SHOWNORMAL);
+ }
+ }
+ else if (*response=='2'&&lstrlen(response)>2) {
+ char buf[200];
+ response+=2;
+ wsprintf(buf,"NSIS %s is now available. Would you like to download this preview release now?",response);
+ if (MessageBox(g_sdata.hwnd,buf,"NSIS Update",MB_YESNO|MB_ICONINFORMATION)==IDYES) {
+ ShellExecute(g_sdata.hwnd,"open",NSIS_DL_URL,NULL,NULL,SW_SHOWNORMAL);
+ }
+ }
+ else MessageBox(g_sdata.hwnd,"There is no update available for NSIS at this time.","NSIS Update",MB_OK|MB_ICONINFORMATION);
+ GlobalFree(response);
+ delete get;
+ EnableMenuItem(g_sdata.menu,IDM_NSISUPDATE,MF_ENABLED);
+ return 0;
+}
+
+void Update() {
+ DWORD dwThreadId;
+
+ if (my_strstr(g_sdata.brandingv,"cvs"))
+ {
+ MessageBox(g_sdata.hwnd,"Cannot check for new version of nightly builds. To update, download a new nightly build.","NSIS Update",MB_OK|MB_ICONSTOP);
+ return;
+ }
+
+ EnableMenuItem(g_sdata.menu,IDM_NSISUPDATE,MF_GRAYED);
+ CloseHandle(CreateThread(NULL,0,UpdateThread,(LPVOID)NULL,0,&dwThreadId));
+}
diff --git a/Contrib/Makensisw/update.h b/Contrib/Makensisw/update.h
index 7b01f19..fa9c2bb 100755
--- a/Contrib/Makensisw/update.h
+++ b/Contrib/Makensisw/update.h
@@ -1,8 +1,8 @@
-/* Initialize update objects. */
-void InitializeUpdate();
-
-/* Check for newer version on server and show a message to the user. */
-void Update();
-
-/* Finalize update objects. */
-void FinalizeUpdate();
+/* Initialize update objects. */
+void InitializeUpdate();
+
+/* Check for newer version on server and show a message to the user. */
+void Update();
+
+/* Finalize update objects. */
+void FinalizeUpdate();
diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp
index 5c482b7..430f0e9 100755
--- a/Contrib/Makensisw/utils.cpp
+++ b/Contrib/Makensisw/utils.cpp
@@ -1,971 +1,971 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
-
- 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.
-
-*/
-
-#include "makensisw.h"
-#include "resource.h"
-#include "toolbar.h"
-#include "noclib.h"
-
-NTOOLTIP g_tip;
-LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam);
-
-char g_mru_list[MRU_LIST_SIZE][MAX_PATH] = { "", "", "", "", "" };
-
-extern NSCRIPTDATA g_sdata;
-extern char *compressor_names[];
-
-int SetArgv(const char *cmdLine, int *argc, char ***argv)
-{
- const char *p;
- char *arg, *argSpace;
- int size, argSpaceSize, inquote, copy, slashes;
-
- size = 2;
- for (p = cmdLine; *p != '\0'; p++) {
- if ((*p == ' ') || (*p == '\t')) {
- size++;
- while ((*p == ' ') || (*p == '\t')) {
- p++;
- }
- if (*p == '\0') {
- break;
- }
- }
- }
-
- argSpaceSize = size * sizeof(char *) + lstrlen(cmdLine) + 1;
- argSpace = (char *) GlobalAlloc(GMEM_FIXED, argSpaceSize);
- if (!argSpace)
- return 0;
-
- *argv = (char **) argSpace;
- argSpace += size * sizeof(char *);
- size--;
-
- p = cmdLine;
- for (*argc = 0; *argc < size; (*argc)++) {
- (*argv)[*argc] = arg = argSpace;
- while ((*p == ' ') || (*p == '\t')) {
- p++;
- }
- if (*p == '\0') {
- break;
- }
-
- inquote = 0;
- slashes = 0;
- while (1) {
- copy = 1;
- while (*p == '\\') {
- slashes++;
- p++;
- }
- if (*p == '"') {
- if ((slashes & 1) == 0) {
- copy = 0;
- if ((inquote) && (p[1] == '"')) {
- p++;
- copy = 1;
- }
- else {
- inquote = !inquote;
- }
- }
- slashes >>= 1;
- }
-
- while (slashes) {
- *arg = '\\';
- arg++;
- slashes--;
- }
-
- if ((*p == '\0') || (!inquote && ((*p == ' ') || (*p == '\t')))) {
- break;
- }
- if (copy != 0) {
- *arg = *p;
- arg++;
- }
- p++;
- }
- *arg = '\0';
- argSpace = arg + 1;
- }
- (*argv)[*argc] = NULL;
-
- return argSpaceSize;
-}
-
-void SetTitle(HWND hwnd,char *substr) {
- char title[64];
- if (substr==NULL) wsprintf(title,"MakeNSISW");
- else wsprintf(title,"MakeNSISW - %s",substr);
- SetWindowText(hwnd,title);
-}
-
-void SetBranding(HWND hwnd) {
- SetDlgItemText(hwnd, IDC_VERSION, g_sdata.branding);
-}
-
-void CopyToClipboard(HWND hwnd) {
- if (!hwnd||!OpenClipboard(hwnd)) return;
- int len=SendDlgItemMessage(hwnd,IDC_LOGWIN,WM_GETTEXTLENGTH,0,0);
- HGLOBAL mem = GlobalAlloc(GMEM_MOVEABLE,len+1);
- if (!mem) { CloseClipboard(); return; }
- char *existing_text = (char *)GlobalLock(mem);
- if (!existing_text) { CloseClipboard(); return; }
- EmptyClipboard();
- existing_text[0]=0;
- GetDlgItemText(hwnd, IDC_LOGWIN, existing_text, len+1);
- GlobalUnlock(mem);
- SetClipboardData(CF_TEXT,mem);
- CloseClipboard();
-}
-
-void ClearLog(HWND hwnd) {
- SetDlgItemText(hwnd, IDC_LOGWIN, "");
-}
-
-void LogMessage(HWND hwnd,const char *str) {
- SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SETSEL, g_sdata.logLength, g_sdata.logLength);
- g_sdata.logLength += lstrlen(str);
- SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_REPLACESEL, 0, (WPARAM)str);
- SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SCROLLCARET, 0, 0);
-}
-
-void ErrorMessage(HWND hwnd,const char *str) {
- if (!str) return;
- char buf[1028];
- wsprintf(buf,"[Error] %s\r\n",str);
- LogMessage(hwnd,buf);
-}
-
-// Altered by Darren Owen (DrO) on 1/10/2003
-void Items(HWND hwnd, int on){
- UINT mf = (!on ? MF_GRAYED : MF_ENABLED);
- UINT nmf = (!on ? MF_ENABLED : MF_GRAYED);
-
- if(!on)
- g_sdata.focused_hwnd = GetFocus();
- // Altered by Darren Owen (DrO) on 6/10/2003
- else
- EnableWindow(GetDlgItem(hwnd,IDCANCEL),1);
-
- EnableWindow(GetDlgItem(hwnd,IDCANCEL),on);
- // Altered by Darren Owen (DrO) on 6/10/2003
- if((!g_sdata.retcode && on) || !on)
- EnableWindow(GetDlgItem(hwnd,IDC_TEST),on);
- EnableWindow(GetDlgItem(hwnd,IDC_RECOMPILE_TEST),on);
-
- EnableMenuItem(g_sdata.menu,IDM_SAVE,mf);
- // Altered by Darren Owen (DrO) on 6/10/2003
- if((!g_sdata.retcode && on) || !on)
- EnableMenuItem(g_sdata.menu,IDM_TEST,mf);
- EnableMenuItem(g_sdata.menu,IDM_EXIT,mf);
- EnableMenuItem(g_sdata.menu,IDM_LOADSCRIPT,mf);
- EnableMenuItem(g_sdata.menu,IDM_RECOMPILE,mf);
- EnableMenuItem(g_sdata.menu,IDM_COPY,mf);
- EnableMenuItem(g_sdata.menu,IDM_COPYSELECTED,mf);
- EnableMenuItem(g_sdata.menu,IDM_EDITSCRIPT,mf);
- EnableMenuItem(g_sdata.menu,IDM_CLEARLOG,mf);
- EnableMenuItem(g_sdata.menu,IDM_BROWSESCR,mf);
- EnableMenuItem(g_sdata.menu,IDM_RECOMPILE_TEST,mf);
- EnableMenuItem(g_sdata.menu,IDM_COMPRESSOR,mf);
- EnableMenuItem(g_sdata.menu,IDM_CANCEL,nmf);
-
- EnableToolBarButton(IDM_SAVE,on);
- // Altered by Darren Owen (DrO) on 6/10/2003
- if((!g_sdata.retcode && on) || !on)
- EnableToolBarButton(IDM_TEST,on);
- EnableToolBarButton(IDM_EXIT,on);
- EnableToolBarButton(IDM_LOADSCRIPT,on);
- EnableToolBarButton(IDM_RECOMPILE,on);
- EnableToolBarButton(IDM_COPY,on);
- EnableToolBarButton(IDM_EDITSCRIPT,on);
- EnableToolBarButton(IDM_CLEARLOG,on);
- EnableToolBarButton(IDM_BROWSESCR,on);
- EnableToolBarButton(IDM_RECOMPILE_TEST,on);
- EnableToolBarButton(IDM_COMPRESSOR,on);
-
- if(!on) {
- if (!IsWindowEnabled(g_sdata.focused_hwnd))
- SetFocus(GetDlgItem(hwnd,IDC_LOGWIN));
- }
- else
- SetFocus(g_sdata.focused_hwnd);
-}
-
-void SetCompressorStats()
-{
- DWORD line_count, i;
- char buf[1024];
- bool found = false;
-
- line_count = SendDlgItemMessage(g_sdata.hwnd, IDC_LOGWIN, EM_GETLINECOUNT, 0, 0);
- for(i=0; i<line_count; i++) {
- *((LPWORD)buf) = sizeof(buf);
- SendDlgItemMessage(g_sdata.hwnd, IDC_LOGWIN, EM_GETLINE, (WPARAM)i, (LPARAM)buf);
- if(found) {
- DWORD len = lstrlen(TOTAL_SIZE_COMPRESSOR_STAT);
- lstrcat(g_sdata.compressor_stats,buf);
-
- if(!lstrncmp(buf,TOTAL_SIZE_COMPRESSOR_STAT,len)) {
- break;
- }
- }
- else {
- DWORD len = lstrlen(EXE_HEADER_COMPRESSOR_STAT);
- if(!lstrncmp(buf,EXE_HEADER_COMPRESSOR_STAT,len)) {
- found = true;
- lstrcpy(g_sdata.compressor_stats,"\n\n");
- lstrcat(g_sdata.compressor_stats,buf);
- }
- }
- }
-}
-
-void CompileNSISScript() {
- static char *s;
- DragAcceptFiles(g_sdata.hwnd,FALSE);
- ClearLog(g_sdata.hwnd);
- SetTitle(g_sdata.hwnd,NULL);
- if (lstrlen(g_sdata.script)==0) {
- LogMessage(g_sdata.hwnd,USAGE);
- EnableMenuItem(g_sdata.menu,IDM_RECOMPILE,MF_GRAYED);
- EnableMenuItem(g_sdata.menu,IDM_EDITSCRIPT,MF_GRAYED);
- EnableMenuItem(g_sdata.menu,IDM_TEST,MF_GRAYED);
- EnableMenuItem(g_sdata.menu,IDM_BROWSESCR,MF_GRAYED);
- // Added by Darren Owen (DrO) on 1/10/2003
- EnableMenuItem(g_sdata.menu,IDM_RECOMPILE_TEST,MF_GRAYED);
-
- EnableToolBarButton(IDM_RECOMPILE,FALSE);
- EnableToolBarButton(IDM_EDITSCRIPT,FALSE);
- EnableToolBarButton(IDM_TEST,FALSE);
- EnableToolBarButton(IDM_RECOMPILE_TEST,FALSE);
- EnableToolBarButton(IDM_BROWSESCR,FALSE);
-
- EnableWindow(GetDlgItem(g_sdata.hwnd,IDC_TEST),0);
- DragAcceptFiles(g_sdata.hwnd,TRUE);
- return;
- }
- if (!g_sdata.compile_command) {
- if (s) GlobalFree(s);
- char *symbols = BuildSymbols();
-
- char compressor[40];
- if(lstrlen(g_sdata.compressor_name)) {
- wsprintf(compressor,"/X\"SetCompressor /FINAL %s\"",g_sdata.compressor_name);
- }
- else {
- lstrcpy(compressor,"");
- }
-
- char *args = (char *) GlobalLock(g_sdata.script_cmd_args);
-
- g_sdata.compile_command = (char *) GlobalAlloc(
- GPTR,
- /* makensis.exe */ sizeof(EXENAME) + /* space */ 1 +
- /* script path */ lstrlen(g_sdata.script) + /* space */ 1 +
- /* script cmd args */ lstrlen(args) + /* space */ 1 +
- /* defines /Dblah=... */ lstrlen(symbols) + /* space */ 1 +
- /* /XSetCompressor... */ lstrlen(compressor) + /* space */ 1 +
- /* /NOTTIFYHWND + HWND */ sizeof("/NOTIFYHWND -4294967295") + /* space */ 1
- );
-
- wsprintf(
- g_sdata.compile_command,
- "%s %s %s /NOTIFYHWND %d %s -- \"%s\"",
- EXENAME,
- compressor,
- symbols,
- g_sdata.hwnd,
- args,
- g_sdata.script
- );
-
- GlobalUnlock(g_sdata.script_cmd_args);
- GlobalFree(symbols);
- }
- GlobalFree(g_sdata.input_script);
- GlobalFree(g_sdata.output_exe);
- g_sdata.input_script = 0;
- g_sdata.output_exe = 0;
- g_sdata.warnings = 0;
- g_sdata.logLength = 0;
- // Disable buttons during compile
- DisableItems(g_sdata.hwnd);
- DWORD id;
- g_sdata.thread=CreateThread(NULL,0,MakeNSISProc,0,0,&id);
-}
-
-static bool InternalOpenRegSettingsKey(HKEY root, HKEY &key, bool create) {
- if (create) {
- if (RegCreateKey(root, REGKEY, &key) == ERROR_SUCCESS)
- return true;
- } else {
- if (RegOpenKeyEx(root, REGKEY, 0, KEY_READ, &key) == ERROR_SUCCESS)
- return true;
- }
- return false;
-}
-
-bool OpenRegSettingsKey(HKEY &hKey, bool create) {
- if (InternalOpenRegSettingsKey(REGSEC, hKey, create))
- return true;
- if (InternalOpenRegSettingsKey(REGSECDEF, hKey, create))
- return true;
- return false;
-}
-
-void RestoreWindowPos(HWND hwnd) {
- HKEY hKey;
- WINDOWPLACEMENT p;
- if (OpenRegSettingsKey(hKey)) {
- DWORD l = sizeof(p);
- DWORD t;
- if ((RegQueryValueEx(hKey,REGLOC,NULL,&t,(unsigned char*)&p,&l)==ERROR_SUCCESS)&&(t == REG_BINARY)&&(l==sizeof(p))) {
- int width, height;
- int windowWidth, windowHeight;
-
- width = GetSystemMetrics(SM_CXFULLSCREEN);
- height = GetSystemMetrics(SM_CYFULLSCREEN);
- height += GetSystemMetrics(SM_CYCAPTION);
- windowWidth = p.rcNormalPosition.right-p.rcNormalPosition.left;
- if(windowWidth > width) {
- p.rcNormalPosition.left = 0;
- p.rcNormalPosition.right = width;
- }
- else if(p.rcNormalPosition.right > width) {
- p.rcNormalPosition.left = width - windowWidth;
- p.rcNormalPosition.right = width;
- }
- else if(p.rcNormalPosition.left < 0) {
- p.rcNormalPosition.left = 0;
- p.rcNormalPosition.right = windowWidth;
- }
-
- windowHeight = p.rcNormalPosition.bottom-p.rcNormalPosition.top;
- if(windowHeight > height) {
- p.rcNormalPosition.top = 0;
- p.rcNormalPosition.bottom = height;
- }
- else if(p.rcNormalPosition.bottom > height) {
- p.rcNormalPosition.top = height - windowHeight;
- p.rcNormalPosition.bottom = height;
- }
- else if(p.rcNormalPosition.top < 0) {
- p.rcNormalPosition.top = 0;
- p.rcNormalPosition.bottom = windowHeight;
- }
-
- p.length = sizeof(p);
- SetWindowPlacement(hwnd, &p);
- }
- RegCloseKey(hKey);
- }
-}
-
-void SaveWindowPos(HWND hwnd) {
- HKEY hKey;
- WINDOWPLACEMENT p;
- p.length = sizeof(p);
- GetWindowPlacement(hwnd, &p);
- if (OpenRegSettingsKey(hKey, true)) {
- RegSetValueEx(hKey,REGLOC,0,REG_BINARY,(unsigned char*)&p,sizeof(p));
- RegCloseKey(hKey);
- }
-}
-
-void RestoreSymbols()
-{
- g_sdata.symbols = LoadSymbolSet(NULL);
-}
-
-void SaveSymbols()
-{
- SaveSymbolSet(NULL, g_sdata.symbols);
-}
-
-void DeleteSymbolSet(char *name)
-{
- if(name) {
- HKEY hKey;
- if (OpenRegSettingsKey(hKey)) {
- char subkey[1024];
- wsprintf(subkey,"%s\\%s",REGSYMSUBKEY,name);
- RegDeleteKey(hKey,subkey);
- RegCloseKey(hKey);
- }
- }
-}
-
-char** LoadSymbolSet(char *name)
-{
- HKEY hKey;
- HKEY hSubKey;
- char **symbols = NULL;
- if (OpenRegSettingsKey(hKey)) {
- char subkey[1024];
- if(name) {
- wsprintf(subkey,"%s\\%s",REGSYMSUBKEY,name);
- }
- else {
- lstrcpy(subkey,REGSYMSUBKEY);
- }
- if (RegCreateKey(hKey,subkey,&hSubKey) == ERROR_SUCCESS) {
- char buf[8];
- DWORD l;
- DWORD t;
- DWORD bufSize;
- DWORD i = 0;
- HGLOBAL hMem = NULL;
-
- while(TRUE) {
- l = 0;
- bufSize = sizeof(buf);
- if ((RegEnumValue(hSubKey,i, buf, &bufSize,NULL,&t,NULL,&l)==ERROR_SUCCESS)&&(t == REG_SZ)) {
- if(symbols) {
- GlobalUnlock(hMem);
- hMem = GlobalReAlloc(hMem, (i+2)*sizeof(char *), GMEM_MOVEABLE|GMEM_ZEROINIT);
- symbols = (char **)GlobalLock(hMem);
- }
- else {
- hMem = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, (i+2)*sizeof(char *));
- symbols = (char **)GlobalLock(hMem);
- }
- if(symbols) {
- l++;
- symbols[i] = (char *)GlobalAlloc(GPTR, l*sizeof(char));
- if (symbols[i]) {
- RegQueryValueEx(hSubKey,buf,NULL,&t,(unsigned char*)symbols[i],&l);
- }
- else {
- break;
- }
- }
- else {
- break;
- }
- i++;
- symbols[i] = NULL;
- }
- else {
- break;
- }
- }
- RegCloseKey(hSubKey);
- }
- RegCloseKey(hKey);
- }
-
- return symbols;
-}
-
-void SaveSymbolSet(char *name, char **symbols)
-{
- HKEY hKey;
- HKEY hSubKey;
- int n = 0;
- if (OpenRegSettingsKey(hKey, true)) {
- char subkey[1024];
- if(name) {
- wsprintf(subkey,"%s\\%s",REGSYMSUBKEY,name);
- }
- else {
- lstrcpy(subkey,REGSYMSUBKEY);
- }
-
- if (RegOpenKey(hKey,subkey,&hSubKey) == ERROR_SUCCESS) {
- char buf[8];
- DWORD l;
- while(TRUE) {
- l = sizeof(buf);
- if (RegEnumValue(hSubKey,0, buf, &l,NULL,NULL,NULL,NULL)==ERROR_SUCCESS) {
- RegDeleteValue(hSubKey,buf);
- }
- else {
- break;
- }
- }
- RegCloseKey(hSubKey);
- }
- if(symbols) {
- if (RegCreateKey(hKey,subkey,&hSubKey) == ERROR_SUCCESS) {
- char buf[8];
- n = 0;
- while(symbols[n]) {
- wsprintf(buf,"%d",n);
- RegSetValueEx(hSubKey,buf,0,REG_SZ,(CONST BYTE *)symbols[n],lstrlen(symbols[n])+1);
- n++;
- }
- RegCloseKey(hSubKey);
- }
- }
- RegCloseKey(hKey);
- }
-}
-
-void ResetObjects() {
- if (g_sdata.compile_command)
- GlobalFree(g_sdata.compile_command);
-
- g_sdata.warnings = FALSE;
- g_sdata.retcode = -1;
- g_sdata.thread = NULL;
- g_sdata.compile_command = NULL;
-}
-
-void ResetSymbols() {
- if(g_sdata.symbols) {
- HGLOBAL hMem;
- int i = 0;
- while(g_sdata.symbols[i]) {
- GlobalFree(g_sdata.symbols[i]);
- i++;
- }
- hMem = GlobalHandle(g_sdata.symbols);
- GlobalUnlock(hMem);
- GlobalFree(hMem);
- g_sdata.symbols = NULL;
- }
-}
-
-int InitBranding() {
- char *s;
- s = (char *)GlobalAlloc(GPTR,lstrlen(EXENAME)+10);
- wsprintf(s,"%s /version",EXENAME);
- {
- STARTUPINFO si={sizeof(si),};
- SECURITY_ATTRIBUTES sa={sizeof(sa),};
- SECURITY_DESCRIPTOR sd={0,};
- PROCESS_INFORMATION pi={0,};
- HANDLE newstdout=0,read_stdout=0;
-
- OSVERSIONINFO osv={sizeof(osv)};
- GetVersionEx(&osv);
- if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl(&sd,true,NULL,false);
- sa.lpSecurityDescriptor = &sd;
- }
- else sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = true;
- if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) {
- return 0;
- }
- GetStartupInfo(&si);
- si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
- si.hStdOutput = newstdout;
- si.hStdError = newstdout;
- if (!CreateProcess(NULL,s,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
- CloseHandle(newstdout);
- CloseHandle(read_stdout);
- return 0;
- }
- char szBuf[1024];
- DWORD dwRead = 1;
- if (WaitForSingleObject(pi.hProcess,10000)!=WAIT_OBJECT_0) {
- return 0;
- }
- ReadFile(read_stdout, szBuf, sizeof(szBuf)-1, &dwRead, NULL);
- szBuf[dwRead] = 0;
- if (lstrlen(szBuf)==0) return 0;
- g_sdata.branding = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+6);
- wsprintf(g_sdata.branding,"NSIS %s",szBuf);
- g_sdata.brandingv = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+1);
- lstrcpy(g_sdata.brandingv,szBuf);
- GlobalFree(s);
- }
- return 1;
-}
-
-void InitTooltips(HWND h) {
- if (h == NULL) return;
- my_memset(&g_tip,0,sizeof(NTOOLTIP));
- g_tip.tip_p = h;
- INITCOMMONCONTROLSEX icx;
- icx.dwSize = sizeof(icx);
- icx.dwICC = ICC_BAR_CLASSES;
- InitCommonControlsEx(&icx);
- DWORD dwStyle = WS_POPUP | WS_BORDER | TTS_ALWAYSTIP;
- DWORD dwExStyle = WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
- g_tip.tip = CreateWindowEx(dwExStyle,TOOLTIPS_CLASS,NULL,dwStyle,0,0,0,0,h,NULL,GetModuleHandle(NULL),NULL);
- if (!g_tip.tip) return;
- g_tip.hook = SetWindowsHookEx(WH_GETMESSAGE,TipHookProc,NULL, GetCurrentThreadId());
- AddTip(GetDlgItem(h,IDCANCEL),TEXT("Close MakeNSISW"));
- AddTip(GetDlgItem(h,IDC_TEST),TEXT("Test the installer generated by MakeNSISW"));
- AddToolBarTooltips();
-}
-
-void DestroyTooltips() {
- UnhookWindowsHookEx(g_tip.hook);
-}
-
-void AddTip(HWND hWnd,LPSTR lpszToolTip) {
- TOOLINFO ti;
- ti.cbSize = sizeof(TOOLINFO);
- ti.uFlags = TTF_IDISHWND;
- ti.hwnd = g_tip.tip_p;
- ti.uId = (UINT) hWnd;
- ti.lpszText = lpszToolTip;
- SendMessage(g_tip.tip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
-}
-
-LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam) {
- if (nCode < 0) return CallNextHookEx(g_tip.hook, nCode, wParam, lParam);
- switch (((MSG*)lParam)->message) {
- case WM_MOUSEMOVE:
- if (IsChild(g_tip.tip_p,((MSG*)lParam)->hwnd))
- SendMessage(g_tip.tip, TTM_RELAYEVENT, 0,lParam);
- break;
- default:
- break;
- }
- return CallNextHookEx(g_tip.hook, nCode, wParam, lParam);
-}
-
-void ShowDocs() {
- char pathf[MAX_PATH],*path;
- GetModuleFileName(NULL,pathf,sizeof(pathf));
- path=my_strrchr(pathf,'\\');
- if(path!=NULL) *path=0;
- lstrcat(pathf,LOCALDOCS);
- if ((int)ShellExecute(g_sdata.hwnd,"open",pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
- ShellExecute(g_sdata.hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL);
-}
-
-char* BuildSymbols()
-{
- char *buf = NULL;
-
- if(g_sdata.symbols) {
- int i=0;
- while(g_sdata.symbols[i]) {
- if(buf) {
- char *buf3 = (char *)GlobalAlloc(GPTR,(lstrlen(buf)+lstrlen(g_sdata.symbols[i])+6)*sizeof(char));
- wsprintf(buf3,"%s \"/D%s\"",buf,g_sdata.symbols[i]);
- GlobalFree(buf);
- buf = buf3;
- }
- else {
- buf = (char *)GlobalAlloc(GPTR,(lstrlen(g_sdata.symbols[i])+5)*sizeof(char));
- wsprintf(buf,"\"/D%s\"",g_sdata.symbols[i]);
- }
- i++;
- }
- }
- else {
- buf = (char *)GlobalAlloc(GPTR, sizeof(char));
- buf[0] = '\0';
- }
-
- return buf;
-}
-
-BOOL PopMRUFile(char* fname)
-{
- int i;
-
- for(i=0; i<MRU_LIST_SIZE; i++) {
- if(!lstrcmpi(g_mru_list[i], fname)) {
- break;
- }
- }
-
- if(i < MRU_LIST_SIZE) {
- int j;
- for(j = i; j < MRU_LIST_SIZE-1; j++) {
- lstrcpy(g_mru_list[j],g_mru_list[j+1]);
- }
- g_mru_list[MRU_LIST_SIZE-1][0]='\0';
- return TRUE;
- }
- else {
- return FALSE;
- }
-}
-
-BOOL IsValidFile(char *fname)
-{
- WIN32_FIND_DATA wfd;
- HANDLE h;
-
- h = FindFirstFile(fname,&wfd);
- if(h != INVALID_HANDLE_VALUE) {
- FindClose(h);
- return true;
- }
- return false;
-}
-
-void PushMRUFile(char* fname)
-{
- int i;
- DWORD rv;
- char* file_part;
- char full_file_name[MAX_PATH+1];
-
- if(!fname || fname[0] == '\0' || fname[0] == '/' || fname[0] == '-') {
- return;
- }
-
- my_memset(full_file_name,0,sizeof(full_file_name));
- rv = GetFullPathName(fname,sizeof(full_file_name),full_file_name,&file_part);
- if (rv == 0) {
- return;
- }
-
- if(IsValidFile(full_file_name)) {
- PopMRUFile(full_file_name);
- for(i = MRU_LIST_SIZE - 2; i >= 0; i--) {
- lstrcpy(g_mru_list[i+1], g_mru_list[i]);
- }
- lstrcpy(g_mru_list[0],full_file_name);
- BuildMRUMenus();
- }
-}
-
-void BuildMRUMenus()
-{
- HMENU hMenu = g_sdata.fileSubmenu;
- int i;
- MENUITEMINFO mii;
- char buf[MRU_DISPLAY_LENGTH + 5/*number*/ + 1/*null*/];
- char buf2[MRU_DISPLAY_LENGTH - 6];
- char buf3[MRU_DISPLAY_LENGTH + 1];
- int n;
-
- for(i = 0; i < MRU_LIST_SIZE; i++) {
- DeleteMenu(hMenu, IDM_MRU_FILE+i, MF_BYCOMMAND);
- }
-
- n = GetMenuItemCount(hMenu);
-
- for(i = 0; i < MRU_LIST_SIZE; i++) {
- if(g_mru_list[i][0]) {
- my_memset(buf,0,sizeof(buf));
- my_memset(&mii, 0, sizeof(mii));
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
- mii.wID = IDM_MRU_FILE+i;
- mii.fType = MFT_STRING;
- wsprintf(buf, "&%d ", i + 1);
- if(lstrlen(g_mru_list[i]) > MRU_DISPLAY_LENGTH) {
- char *p = my_strrchr(g_mru_list[i],'\\');
- if(p) {
- p++;
- if(lstrlen(p) > MRU_DISPLAY_LENGTH - 7) {
- my_memset(buf2,0,sizeof(buf2));
- lstrcpyn(buf2,p,MRU_DISPLAY_LENGTH - 9);
- lstrcat(buf2,"...");
-
- lstrcpyn(buf3,g_mru_list[i],4);
- lstrcat(buf,buf3);
- lstrcat(buf,"...\\");
- lstrcat(buf,buf2);
- }
- else {
- lstrcpyn(buf3,g_mru_list[i],(MRU_DISPLAY_LENGTH - lstrlen(p) - 3));
- lstrcat(buf,buf3);
- lstrcat(buf,"...\\");
- lstrcat(buf,p);
- }
- }
- else {
- lstrcpyn(buf3,g_mru_list[i],(MRU_DISPLAY_LENGTH-2));
- lstrcat(buf,buf3);
- lstrcat(buf,"...");
- }
- }
- else {
- lstrcat(buf, g_mru_list[i]);
- }
-
- mii.dwTypeData = buf;
- mii.cch = lstrlen(buf)+1;
- mii.fState = MFS_ENABLED;
- InsertMenuItem(hMenu, n++, TRUE, &mii);
-
- }
- else {
- break;
- }
- }
-
- hMenu = g_sdata.toolsSubmenu;
- my_memset(&mii, 0, sizeof(mii));
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_STATE;
-
- if(g_mru_list[0][0]) {
- mii.fState = MFS_ENABLED;
- }
- else {
- mii.fState = MFS_GRAYED;
- }
-
- SetMenuItemInfo(hMenu, IDM_CLEAR_MRU_LIST,FALSE,&mii);
-}
-
-void LoadMRUFile(int position)
-{
- if (!g_sdata.thread && position >=0 && position < MRU_LIST_SIZE && g_mru_list[position][0]) {
- SetScript(g_mru_list[position]);
- if(IsValidFile(g_mru_list[position])) {
- PushMRUFile(g_mru_list[position]);
- }
- else {
- PopMRUFile(g_mru_list[position]);
- BuildMRUMenus();
- }
- ResetObjects();
- CompileNSISScript();
- }
-}
-
-void RestoreMRUList()
-{
- HKEY hKey;
- HKEY hSubKey;
- int n = 0;
- int i;
- if (OpenRegSettingsKey(hKey)) {
- if (RegCreateKey(hKey,REGMRUSUBKEY,&hSubKey) == ERROR_SUCCESS) {
- char buf[8];
- DWORD l;
- for(int i=0; i<MRU_LIST_SIZE; i++) {
- wsprintf(buf,"%d",i);
- l = sizeof(g_mru_list[n]);
- RegQueryValueEx(hSubKey,buf,NULL,NULL,(unsigned char*)g_mru_list[n],&l);
- if(g_mru_list[n][0] != '\0') {
- n++;
- }
- }
- RegCloseKey(hSubKey);
- }
- RegCloseKey(hKey);
- }
- for(i = n; i < MRU_LIST_SIZE; i++) {
- g_mru_list[i][0] = '\0';
- }
-
- BuildMRUMenus();
-}
-
-void SaveMRUList()
-{
- HKEY hKey;
- HKEY hSubKey;
- int i = 0;
- if (OpenRegSettingsKey(hKey, true)) {
- if (RegCreateKey(hKey,REGMRUSUBKEY,&hSubKey) == ERROR_SUCCESS) {
- char buf[8];
- for(i = 0; i < MRU_LIST_SIZE; i++) {
- wsprintf(buf,"%d",i);
- RegSetValueEx(hSubKey,buf,0,REG_SZ,(const unsigned char *)g_mru_list[i],lstrlen(g_mru_list[i]));
- }
- RegCloseKey(hSubKey);
- }
- RegCloseKey(hKey);
- }
-}
-
-void ClearMRUList()
-{
- int i;
- for(i=0; i<MRU_LIST_SIZE; i++) {
- g_mru_list[i][0] = '\0';
- }
-
- BuildMRUMenus();
-}
-
-void RestoreCompressor()
-{
- HKEY hKey;
- NCOMPRESSOR v = COMPRESSOR_SCRIPT;
- if (OpenRegSettingsKey(hKey)) {
- char compressor_name[32];
- DWORD l = sizeof(compressor_name);
- DWORD t;
-
- if (RegQueryValueEx(hKey,REGCOMPRESSOR,NULL,&t,(unsigned char*)compressor_name,&l)==ERROR_SUCCESS) {
- int i;
- for(i=(int)COMPRESSOR_SCRIPT; i<= (int)COMPRESSOR_BEST; i++) {
- if(!lstrcmpi(compressor_names[i],compressor_name)) {
- v = (NCOMPRESSOR)i;
- break;
- }
- }
- }
- RegCloseKey(hKey);
- }
- g_sdata.default_compressor=v;
-}
-
-void SaveCompressor()
-{
- HKEY hKey;
- int n = (int)COMPRESSOR_SCRIPT;
- NCOMPRESSOR v = g_sdata.default_compressor;
-
- if(v >= COMPRESSOR_SCRIPT && v <= COMPRESSOR_BEST) {
- n = (int)v;
- }
-
- if (OpenRegSettingsKey(hKey, true)) {
- RegSetValueEx(hKey,REGCOMPRESSOR,0,REG_SZ,(unsigned char*)compressor_names[n],
- lstrlen(compressor_names[n]));
- RegCloseKey(hKey);
- }
-}
-
-BOOL FileExists(char *fname)
-{
- WIN32_FIND_DATA wfd;
- HANDLE h;
-
- h = FindFirstFile(fname,&wfd);
- if(h == INVALID_HANDLE_VALUE) {
- return false;
- }
- else {
- FindClose(h);
- return true;
- }
-}
-
-HMENU FindSubMenu(HMENU hMenu, UINT uId)
-{
- MENUITEMINFO mii = {
- sizeof(MENUITEMINFO),
- MIIM_SUBMENU,
- };
-
- mii.hSubMenu = NULL;
-
- GetMenuItemInfo(hMenu, uId, FALSE, &mii);
-
- return mii.hSubMenu;
-}
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, Amir Szekely, Sunil Kamath, Joost Verburg
+
+ 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.
+
+*/
+
+#include "makensisw.h"
+#include "resource.h"
+#include "toolbar.h"
+#include "noclib.h"
+
+NTOOLTIP g_tip;
+LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam);
+
+char g_mru_list[MRU_LIST_SIZE][MAX_PATH] = { "", "", "", "", "" };
+
+extern NSCRIPTDATA g_sdata;
+extern char *compressor_names[];
+
+int SetArgv(const char *cmdLine, int *argc, char ***argv)
+{
+ const char *p;
+ char *arg, *argSpace;
+ int size, argSpaceSize, inquote, copy, slashes;
+
+ size = 2;
+ for (p = cmdLine; *p != '\0'; p++) {
+ if ((*p == ' ') || (*p == '\t')) {
+ size++;
+ while ((*p == ' ') || (*p == '\t')) {
+ p++;
+ }
+ if (*p == '\0') {
+ break;
+ }
+ }
+ }
+
+ argSpaceSize = size * sizeof(char *) + lstrlen(cmdLine) + 1;
+ argSpace = (char *) GlobalAlloc(GMEM_FIXED, argSpaceSize);
+ if (!argSpace)
+ return 0;
+
+ *argv = (char **) argSpace;
+ argSpace += size * sizeof(char *);
+ size--;
+
+ p = cmdLine;
+ for (*argc = 0; *argc < size; (*argc)++) {
+ (*argv)[*argc] = arg = argSpace;
+ while ((*p == ' ') || (*p == '\t')) {
+ p++;
+ }
+ if (*p == '\0') {
+ break;
+ }
+
+ inquote = 0;
+ slashes = 0;
+ while (1) {
+ copy = 1;
+ while (*p == '\\') {
+ slashes++;
+ p++;
+ }
+ if (*p == '"') {
+ if ((slashes & 1) == 0) {
+ copy = 0;
+ if ((inquote) && (p[1] == '"')) {
+ p++;
+ copy = 1;
+ }
+ else {
+ inquote = !inquote;
+ }
+ }
+ slashes >>= 1;
+ }
+
+ while (slashes) {
+ *arg = '\\';
+ arg++;
+ slashes--;
+ }
+
+ if ((*p == '\0') || (!inquote && ((*p == ' ') || (*p == '\t')))) {
+ break;
+ }
+ if (copy != 0) {
+ *arg = *p;
+ arg++;
+ }
+ p++;
+ }
+ *arg = '\0';
+ argSpace = arg + 1;
+ }
+ (*argv)[*argc] = NULL;
+
+ return argSpaceSize;
+}
+
+void SetTitle(HWND hwnd,char *substr) {
+ char title[64];
+ if (substr==NULL) wsprintf(title,"MakeNSISW");
+ else wsprintf(title,"MakeNSISW - %s",substr);
+ SetWindowText(hwnd,title);
+}
+
+void SetBranding(HWND hwnd) {
+ SetDlgItemText(hwnd, IDC_VERSION, g_sdata.branding);
+}
+
+void CopyToClipboard(HWND hwnd) {
+ if (!hwnd||!OpenClipboard(hwnd)) return;
+ int len=SendDlgItemMessage(hwnd,IDC_LOGWIN,WM_GETTEXTLENGTH,0,0);
+ HGLOBAL mem = GlobalAlloc(GMEM_MOVEABLE,len+1);
+ if (!mem) { CloseClipboard(); return; }
+ char *existing_text = (char *)GlobalLock(mem);
+ if (!existing_text) { CloseClipboard(); return; }
+ EmptyClipboard();
+ existing_text[0]=0;
+ GetDlgItemText(hwnd, IDC_LOGWIN, existing_text, len+1);
+ GlobalUnlock(mem);
+ SetClipboardData(CF_TEXT,mem);
+ CloseClipboard();
+}
+
+void ClearLog(HWND hwnd) {
+ SetDlgItemText(hwnd, IDC_LOGWIN, "");
+}
+
+void LogMessage(HWND hwnd,const char *str) {
+ SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SETSEL, g_sdata.logLength, g_sdata.logLength);
+ g_sdata.logLength += lstrlen(str);
+ SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_REPLACESEL, 0, (WPARAM)str);
+ SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SCROLLCARET, 0, 0);
+}
+
+void ErrorMessage(HWND hwnd,const char *str) {
+ if (!str) return;
+ char buf[1028];
+ wsprintf(buf,"[Error] %s\r\n",str);
+ LogMessage(hwnd,buf);
+}
+
+// Altered by Darren Owen (DrO) on 1/10/2003
+void Items(HWND hwnd, int on){
+ UINT mf = (!on ? MF_GRAYED : MF_ENABLED);
+ UINT nmf = (!on ? MF_ENABLED : MF_GRAYED);
+
+ if(!on)
+ g_sdata.focused_hwnd = GetFocus();
+ // Altered by Darren Owen (DrO) on 6/10/2003
+ else
+ EnableWindow(GetDlgItem(hwnd,IDCANCEL),1);
+
+ EnableWindow(GetDlgItem(hwnd,IDCANCEL),on);
+ // Altered by Darren Owen (DrO) on 6/10/2003
+ if((!g_sdata.retcode && on) || !on)
+ EnableWindow(GetDlgItem(hwnd,IDC_TEST),on);
+ EnableWindow(GetDlgItem(hwnd,IDC_RECOMPILE_TEST),on);
+
+ EnableMenuItem(g_sdata.menu,IDM_SAVE,mf);
+ // Altered by Darren Owen (DrO) on 6/10/2003
+ if((!g_sdata.retcode && on) || !on)
+ EnableMenuItem(g_sdata.menu,IDM_TEST,mf);
+ EnableMenuItem(g_sdata.menu,IDM_EXIT,mf);
+ EnableMenuItem(g_sdata.menu,IDM_LOADSCRIPT,mf);
+ EnableMenuItem(g_sdata.menu,IDM_RECOMPILE,mf);
+ EnableMenuItem(g_sdata.menu,IDM_COPY,mf);
+ EnableMenuItem(g_sdata.menu,IDM_COPYSELECTED,mf);
+ EnableMenuItem(g_sdata.menu,IDM_EDITSCRIPT,mf);
+ EnableMenuItem(g_sdata.menu,IDM_CLEARLOG,mf);
+ EnableMenuItem(g_sdata.menu,IDM_BROWSESCR,mf);
+ EnableMenuItem(g_sdata.menu,IDM_RECOMPILE_TEST,mf);
+ EnableMenuItem(g_sdata.menu,IDM_COMPRESSOR,mf);
+ EnableMenuItem(g_sdata.menu,IDM_CANCEL,nmf);
+
+ EnableToolBarButton(IDM_SAVE,on);
+ // Altered by Darren Owen (DrO) on 6/10/2003
+ if((!g_sdata.retcode && on) || !on)
+ EnableToolBarButton(IDM_TEST,on);
+ EnableToolBarButton(IDM_EXIT,on);
+ EnableToolBarButton(IDM_LOADSCRIPT,on);
+ EnableToolBarButton(IDM_RECOMPILE,on);
+ EnableToolBarButton(IDM_COPY,on);
+ EnableToolBarButton(IDM_EDITSCRIPT,on);
+ EnableToolBarButton(IDM_CLEARLOG,on);
+ EnableToolBarButton(IDM_BROWSESCR,on);
+ EnableToolBarButton(IDM_RECOMPILE_TEST,on);
+ EnableToolBarButton(IDM_COMPRESSOR,on);
+
+ if(!on) {
+ if (!IsWindowEnabled(g_sdata.focused_hwnd))
+ SetFocus(GetDlgItem(hwnd,IDC_LOGWIN));
+ }
+ else
+ SetFocus(g_sdata.focused_hwnd);
+}
+
+void SetCompressorStats()
+{
+ DWORD line_count, i;
+ char buf[1024];
+ bool found = false;
+
+ line_count = SendDlgItemMessage(g_sdata.hwnd, IDC_LOGWIN, EM_GETLINECOUNT, 0, 0);
+ for(i=0; i<line_count; i++) {
+ *((LPWORD)buf) = sizeof(buf);
+ SendDlgItemMessage(g_sdata.hwnd, IDC_LOGWIN, EM_GETLINE, (WPARAM)i, (LPARAM)buf);
+ if(found) {
+ DWORD len = lstrlen(TOTAL_SIZE_COMPRESSOR_STAT);
+ lstrcat(g_sdata.compressor_stats,buf);
+
+ if(!lstrncmp(buf,TOTAL_SIZE_COMPRESSOR_STAT,len)) {
+ break;
+ }
+ }
+ else {
+ DWORD len = lstrlen(EXE_HEADER_COMPRESSOR_STAT);
+ if(!lstrncmp(buf,EXE_HEADER_COMPRESSOR_STAT,len)) {
+ found = true;
+ lstrcpy(g_sdata.compressor_stats,"\n\n");
+ lstrcat(g_sdata.compressor_stats,buf);
+ }
+ }
+ }
+}
+
+void CompileNSISScript() {
+ static char *s;
+ DragAcceptFiles(g_sdata.hwnd,FALSE);
+ ClearLog(g_sdata.hwnd);
+ SetTitle(g_sdata.hwnd,NULL);
+ if (lstrlen(g_sdata.script)==0) {
+ LogMessage(g_sdata.hwnd,USAGE);
+ EnableMenuItem(g_sdata.menu,IDM_RECOMPILE,MF_GRAYED);
+ EnableMenuItem(g_sdata.menu,IDM_EDITSCRIPT,MF_GRAYED);
+ EnableMenuItem(g_sdata.menu,IDM_TEST,MF_GRAYED);
+ EnableMenuItem(g_sdata.menu,IDM_BROWSESCR,MF_GRAYED);
+ // Added by Darren Owen (DrO) on 1/10/2003
+ EnableMenuItem(g_sdata.menu,IDM_RECOMPILE_TEST,MF_GRAYED);
+
+ EnableToolBarButton(IDM_RECOMPILE,FALSE);
+ EnableToolBarButton(IDM_EDITSCRIPT,FALSE);
+ EnableToolBarButton(IDM_TEST,FALSE);
+ EnableToolBarButton(IDM_RECOMPILE_TEST,FALSE);
+ EnableToolBarButton(IDM_BROWSESCR,FALSE);
+
+ EnableWindow(GetDlgItem(g_sdata.hwnd,IDC_TEST),0);
+ DragAcceptFiles(g_sdata.hwnd,TRUE);
+ return;
+ }
+ if (!g_sdata.compile_command) {
+ if (s) GlobalFree(s);
+ char *symbols = BuildSymbols();
+
+ char compressor[40];
+ if(lstrlen(g_sdata.compressor_name)) {
+ wsprintf(compressor,"/X\"SetCompressor /FINAL %s\"",g_sdata.compressor_name);
+ }
+ else {
+ lstrcpy(compressor,"");
+ }
+
+ char *args = (char *) GlobalLock(g_sdata.script_cmd_args);
+
+ g_sdata.compile_command = (char *) GlobalAlloc(
+ GPTR,
+ /* makensis.exe */ sizeof(EXENAME) + /* space */ 1 +
+ /* script path */ lstrlen(g_sdata.script) + /* space */ 1 +
+ /* script cmd args */ lstrlen(args) + /* space */ 1 +
+ /* defines /Dblah=... */ lstrlen(symbols) + /* space */ 1 +
+ /* /XSetCompressor... */ lstrlen(compressor) + /* space */ 1 +
+ /* /NOTTIFYHWND + HWND */ sizeof("/NOTIFYHWND -4294967295") + /* space */ 1
+ );
+
+ wsprintf(
+ g_sdata.compile_command,
+ "%s %s %s /NOTIFYHWND %d %s -- \"%s\"",
+ EXENAME,
+ compressor,
+ symbols,
+ g_sdata.hwnd,
+ args,
+ g_sdata.script
+ );
+
+ GlobalUnlock(g_sdata.script_cmd_args);
+ GlobalFree(symbols);
+ }
+ GlobalFree(g_sdata.input_script);
+ GlobalFree(g_sdata.output_exe);
+ g_sdata.input_script = 0;
+ g_sdata.output_exe = 0;
+ g_sdata.warnings = 0;
+ g_sdata.logLength = 0;
+ // Disable buttons during compile
+ DisableItems(g_sdata.hwnd);
+ DWORD id;
+ g_sdata.thread=CreateThread(NULL,0,MakeNSISProc,0,0,&id);
+}
+
+static bool InternalOpenRegSettingsKey(HKEY root, HKEY &key, bool create) {
+ if (create) {
+ if (RegCreateKey(root, REGKEY, &key) == ERROR_SUCCESS)
+ return true;
+ } else {
+ if (RegOpenKeyEx(root, REGKEY, 0, KEY_READ, &key) == ERROR_SUCCESS)
+ return true;
+ }
+ return false;
+}
+
+bool OpenRegSettingsKey(HKEY &hKey, bool create) {
+ if (InternalOpenRegSettingsKey(REGSEC, hKey, create))
+ return true;
+ if (InternalOpenRegSettingsKey(REGSECDEF, hKey, create))
+ return true;
+ return false;
+}
+
+void RestoreWindowPos(HWND hwnd) {
+ HKEY hKey;
+ WINDOWPLACEMENT p;
+ if (OpenRegSettingsKey(hKey)) {
+ DWORD l = sizeof(p);
+ DWORD t;
+ if ((RegQueryValueEx(hKey,REGLOC,NULL,&t,(unsigned char*)&p,&l)==ERROR_SUCCESS)&&(t == REG_BINARY)&&(l==sizeof(p))) {
+ int width, height;
+ int windowWidth, windowHeight;
+
+ width = GetSystemMetrics(SM_CXFULLSCREEN);
+ height = GetSystemMetrics(SM_CYFULLSCREEN);
+ height += GetSystemMetrics(SM_CYCAPTION);
+ windowWidth = p.rcNormalPosition.right-p.rcNormalPosition.left;
+ if(windowWidth > width) {
+ p.rcNormalPosition.left = 0;
+ p.rcNormalPosition.right = width;
+ }
+ else if(p.rcNormalPosition.right > width) {
+ p.rcNormalPosition.left = width - windowWidth;
+ p.rcNormalPosition.right = width;
+ }
+ else if(p.rcNormalPosition.left < 0) {
+ p.rcNormalPosition.left = 0;
+ p.rcNormalPosition.right = windowWidth;
+ }
+
+ windowHeight = p.rcNormalPosition.bottom-p.rcNormalPosition.top;
+ if(windowHeight > height) {
+ p.rcNormalPosition.top = 0;
+ p.rcNormalPosition.bottom = height;
+ }
+ else if(p.rcNormalPosition.bottom > height) {
+ p.rcNormalPosition.top = height - windowHeight;
+ p.rcNormalPosition.bottom = height;
+ }
+ else if(p.rcNormalPosition.top < 0) {
+ p.rcNormalPosition.top = 0;
+ p.rcNormalPosition.bottom = windowHeight;
+ }
+
+ p.length = sizeof(p);
+ SetWindowPlacement(hwnd, &p);
+ }
+ RegCloseKey(hKey);
+ }
+}
+
+void SaveWindowPos(HWND hwnd) {
+ HKEY hKey;
+ WINDOWPLACEMENT p;
+ p.length = sizeof(p);
+ GetWindowPlacement(hwnd, &p);
+ if (OpenRegSettingsKey(hKey, true)) {
+ RegSetValueEx(hKey,REGLOC,0,REG_BINARY,(unsigned char*)&p,sizeof(p));
+ RegCloseKey(hKey);
+ }
+}
+
+void RestoreSymbols()
+{
+ g_sdata.symbols = LoadSymbolSet(NULL);
+}
+
+void SaveSymbols()
+{
+ SaveSymbolSet(NULL, g_sdata.symbols);
+}
+
+void DeleteSymbolSet(char *name)
+{
+ if(name) {
+ HKEY hKey;
+ if (OpenRegSettingsKey(hKey)) {
+ char subkey[1024];
+ wsprintf(subkey,"%s\\%s",REGSYMSUBKEY,name);
+ RegDeleteKey(hKey,subkey);
+ RegCloseKey(hKey);
+ }
+ }
+}
+
+char** LoadSymbolSet(char *name)
+{
+ HKEY hKey;
+ HKEY hSubKey;
+ char **symbols = NULL;
+ if (OpenRegSettingsKey(hKey)) {
+ char subkey[1024];
+ if(name) {
+ wsprintf(subkey,"%s\\%s",REGSYMSUBKEY,name);
+ }
+ else {
+ lstrcpy(subkey,REGSYMSUBKEY);
+ }
+ if (RegCreateKey(hKey,subkey,&hSubKey) == ERROR_SUCCESS) {
+ char buf[8];
+ DWORD l;
+ DWORD t;
+ DWORD bufSize;
+ DWORD i = 0;
+ HGLOBAL hMem = NULL;
+
+ while(TRUE) {
+ l = 0;
+ bufSize = sizeof(buf);
+ if ((RegEnumValue(hSubKey,i, buf, &bufSize,NULL,&t,NULL,&l)==ERROR_SUCCESS)&&(t == REG_SZ)) {
+ if(symbols) {
+ GlobalUnlock(hMem);
+ hMem = GlobalReAlloc(hMem, (i+2)*sizeof(char *), GMEM_MOVEABLE|GMEM_ZEROINIT);
+ symbols = (char **)GlobalLock(hMem);
+ }
+ else {
+ hMem = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, (i+2)*sizeof(char *));
+ symbols = (char **)GlobalLock(hMem);
+ }
+ if(symbols) {
+ l++;
+ symbols[i] = (char *)GlobalAlloc(GPTR, l*sizeof(char));
+ if (symbols[i]) {
+ RegQueryValueEx(hSubKey,buf,NULL,&t,(unsigned char*)symbols[i],&l);
+ }
+ else {
+ break;
+ }
+ }
+ else {
+ break;
+ }
+ i++;
+ symbols[i] = NULL;
+ }
+ else {
+ break;
+ }
+ }
+ RegCloseKey(hSubKey);
+ }
+ RegCloseKey(hKey);
+ }
+
+ return symbols;
+}
+
+void SaveSymbolSet(char *name, char **symbols)
+{
+ HKEY hKey;
+ HKEY hSubKey;
+ int n = 0;
+ if (OpenRegSettingsKey(hKey, true)) {
+ char subkey[1024];
+ if(name) {
+ wsprintf(subkey,"%s\\%s",REGSYMSUBKEY,name);
+ }
+ else {
+ lstrcpy(subkey,REGSYMSUBKEY);
+ }
+
+ if (RegOpenKey(hKey,subkey,&hSubKey) == ERROR_SUCCESS) {
+ char buf[8];
+ DWORD l;
+ while(TRUE) {
+ l = sizeof(buf);
+ if (RegEnumValue(hSubKey,0, buf, &l,NULL,NULL,NULL,NULL)==ERROR_SUCCESS) {
+ RegDeleteValue(hSubKey,buf);
+ }
+ else {
+ break;
+ }
+ }
+ RegCloseKey(hSubKey);
+ }
+ if(symbols) {
+ if (RegCreateKey(hKey,subkey,&hSubKey) == ERROR_SUCCESS) {
+ char buf[8];
+ n = 0;
+ while(symbols[n]) {
+ wsprintf(buf,"%d",n);
+ RegSetValueEx(hSubKey,buf,0,REG_SZ,(CONST BYTE *)symbols[n],lstrlen(symbols[n])+1);
+ n++;
+ }
+ RegCloseKey(hSubKey);
+ }
+ }
+ RegCloseKey(hKey);
+ }
+}
+
+void ResetObjects() {
+ if (g_sdata.compile_command)
+ GlobalFree(g_sdata.compile_command);
+
+ g_sdata.warnings = FALSE;
+ g_sdata.retcode = -1;
+ g_sdata.thread = NULL;
+ g_sdata.compile_command = NULL;
+}
+
+void ResetSymbols() {
+ if(g_sdata.symbols) {
+ HGLOBAL hMem;
+ int i = 0;
+ while(g_sdata.symbols[i]) {
+ GlobalFree(g_sdata.symbols[i]);
+ i++;
+ }
+ hMem = GlobalHandle(g_sdata.symbols);
+ GlobalUnlock(hMem);
+ GlobalFree(hMem);
+ g_sdata.symbols = NULL;
+ }
+}
+
+int InitBranding() {
+ char *s;
+ s = (char *)GlobalAlloc(GPTR,lstrlen(EXENAME)+10);
+ wsprintf(s,"%s /version",EXENAME);
+ {
+ STARTUPINFO si={sizeof(si),};
+ SECURITY_ATTRIBUTES sa={sizeof(sa),};
+ SECURITY_DESCRIPTOR sd={0,};
+ PROCESS_INFORMATION pi={0,};
+ HANDLE newstdout=0,read_stdout=0;
+
+ OSVERSIONINFO osv={sizeof(osv)};
+ GetVersionEx(&osv);
+ if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
+ SetSecurityDescriptorDacl(&sd,true,NULL,false);
+ sa.lpSecurityDescriptor = &sd;
+ }
+ else sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = true;
+ if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) {
+ return 0;
+ }
+ GetStartupInfo(&si);
+ si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ si.wShowWindow = SW_HIDE;
+ si.hStdOutput = newstdout;
+ si.hStdError = newstdout;
+ if (!CreateProcess(NULL,s,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
+ CloseHandle(newstdout);
+ CloseHandle(read_stdout);
+ return 0;
+ }
+ char szBuf[1024];
+ DWORD dwRead = 1;
+ if (WaitForSingleObject(pi.hProcess,10000)!=WAIT_OBJECT_0) {
+ return 0;
+ }
+ ReadFile(read_stdout, szBuf, sizeof(szBuf)-1, &dwRead, NULL);
+ szBuf[dwRead] = 0;
+ if (lstrlen(szBuf)==0) return 0;
+ g_sdata.branding = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+6);
+ wsprintf(g_sdata.branding,"NSIS %s",szBuf);
+ g_sdata.brandingv = (char *)GlobalAlloc(GPTR,lstrlen(szBuf)+1);
+ lstrcpy(g_sdata.brandingv,szBuf);
+ GlobalFree(s);
+ }
+ return 1;
+}
+
+void InitTooltips(HWND h) {
+ if (h == NULL) return;
+ my_memset(&g_tip,0,sizeof(NTOOLTIP));
+ g_tip.tip_p = h;
+ INITCOMMONCONTROLSEX icx;
+ icx.dwSize = sizeof(icx);
+ icx.dwICC = ICC_BAR_CLASSES;
+ InitCommonControlsEx(&icx);
+ DWORD dwStyle = WS_POPUP | WS_BORDER | TTS_ALWAYSTIP;
+ DWORD dwExStyle = WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
+ g_tip.tip = CreateWindowEx(dwExStyle,TOOLTIPS_CLASS,NULL,dwStyle,0,0,0,0,h,NULL,GetModuleHandle(NULL),NULL);
+ if (!g_tip.tip) return;
+ g_tip.hook = SetWindowsHookEx(WH_GETMESSAGE,TipHookProc,NULL, GetCurrentThreadId());
+ AddTip(GetDlgItem(h,IDCANCEL),TEXT("Close MakeNSISW"));
+ AddTip(GetDlgItem(h,IDC_TEST),TEXT("Test the installer generated by MakeNSISW"));
+ AddToolBarTooltips();
+}
+
+void DestroyTooltips() {
+ UnhookWindowsHookEx(g_tip.hook);
+}
+
+void AddTip(HWND hWnd,LPSTR lpszToolTip) {
+ TOOLINFO ti;
+ ti.cbSize = sizeof(TOOLINFO);
+ ti.uFlags = TTF_IDISHWND;
+ ti.hwnd = g_tip.tip_p;
+ ti.uId = (UINT) hWnd;
+ ti.lpszText = lpszToolTip;
+ SendMessage(g_tip.tip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+}
+
+LRESULT CALLBACK TipHookProc(int nCode, WPARAM wParam, LPARAM lParam) {
+ if (nCode < 0) return CallNextHookEx(g_tip.hook, nCode, wParam, lParam);
+ switch (((MSG*)lParam)->message) {
+ case WM_MOUSEMOVE:
+ if (IsChild(g_tip.tip_p,((MSG*)lParam)->hwnd))
+ SendMessage(g_tip.tip, TTM_RELAYEVENT, 0,lParam);
+ break;
+ default:
+ break;
+ }
+ return CallNextHookEx(g_tip.hook, nCode, wParam, lParam);
+}
+
+void ShowDocs() {
+ char pathf[MAX_PATH],*path;
+ GetModuleFileName(NULL,pathf,sizeof(pathf));
+ path=my_strrchr(pathf,'\\');
+ if(path!=NULL) *path=0;
+ lstrcat(pathf,LOCALDOCS);
+ if ((int)ShellExecute(g_sdata.hwnd,"open",pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
+ ShellExecute(g_sdata.hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL);
+}
+
+char* BuildSymbols()
+{
+ char *buf = NULL;
+
+ if(g_sdata.symbols) {
+ int i=0;
+ while(g_sdata.symbols[i]) {
+ if(buf) {
+ char *buf3 = (char *)GlobalAlloc(GPTR,(lstrlen(buf)+lstrlen(g_sdata.symbols[i])+6)*sizeof(char));
+ wsprintf(buf3,"%s \"/D%s\"",buf,g_sdata.symbols[i]);
+ GlobalFree(buf);
+ buf = buf3;
+ }
+ else {
+ buf = (char *)GlobalAlloc(GPTR,(lstrlen(g_sdata.symbols[i])+5)*sizeof(char));
+ wsprintf(buf,"\"/D%s\"",g_sdata.symbols[i]);
+ }
+ i++;
+ }
+ }
+ else {
+ buf = (char *)GlobalAlloc(GPTR, sizeof(char));
+ buf[0] = '\0';
+ }
+
+ return buf;
+}
+
+BOOL PopMRUFile(char* fname)
+{
+ int i;
+
+ for(i=0; i<MRU_LIST_SIZE; i++) {
+ if(!lstrcmpi(g_mru_list[i], fname)) {
+ break;
+ }
+ }
+
+ if(i < MRU_LIST_SIZE) {
+ int j;
+ for(j = i; j < MRU_LIST_SIZE-1; j++) {
+ lstrcpy(g_mru_list[j],g_mru_list[j+1]);
+ }
+ g_mru_list[MRU_LIST_SIZE-1][0]='\0';
+ return TRUE;
+ }
+ else {
+ return FALSE;
+ }
+}
+
+BOOL IsValidFile(char *fname)
+{
+ WIN32_FIND_DATA wfd;
+ HANDLE h;
+
+ h = FindFirstFile(fname,&wfd);
+ if(h != INVALID_HANDLE_VALUE) {
+ FindClose(h);
+ return true;
+ }
+ return false;
+}
+
+void PushMRUFile(char* fname)
+{
+ int i;
+ DWORD rv;
+ char* file_part;
+ char full_file_name[MAX_PATH+1];
+
+ if(!fname || fname[0] == '\0' || fname[0] == '/' || fname[0] == '-') {
+ return;
+ }
+
+ my_memset(full_file_name,0,sizeof(full_file_name));
+ rv = GetFullPathName(fname,sizeof(full_file_name),full_file_name,&file_part);
+ if (rv == 0) {
+ return;
+ }
+
+ if(IsValidFile(full_file_name)) {
+ PopMRUFile(full_file_name);
+ for(i = MRU_LIST_SIZE - 2; i >= 0; i--) {
+ lstrcpy(g_mru_list[i+1], g_mru_list[i]);
+ }
+ lstrcpy(g_mru_list[0],full_file_name);
+ BuildMRUMenus();
+ }
+}
+
+void BuildMRUMenus()
+{
+ HMENU hMenu = g_sdata.fileSubmenu;
+ int i;
+ MENUITEMINFO mii;
+ char buf[MRU_DISPLAY_LENGTH + 5/*number*/ + 1/*null*/];
+ char buf2[MRU_DISPLAY_LENGTH - 6];
+ char buf3[MRU_DISPLAY_LENGTH + 1];
+ int n;
+
+ for(i = 0; i < MRU_LIST_SIZE; i++) {
+ DeleteMenu(hMenu, IDM_MRU_FILE+i, MF_BYCOMMAND);
+ }
+
+ n = GetMenuItemCount(hMenu);
+
+ for(i = 0; i < MRU_LIST_SIZE; i++) {
+ if(g_mru_list[i][0]) {
+ my_memset(buf,0,sizeof(buf));
+ my_memset(&mii, 0, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
+ mii.wID = IDM_MRU_FILE+i;
+ mii.fType = MFT_STRING;
+ wsprintf(buf, "&%d ", i + 1);
+ if(lstrlen(g_mru_list[i]) > MRU_DISPLAY_LENGTH) {
+ char *p = my_strrchr(g_mru_list[i],'\\');
+ if(p) {
+ p++;
+ if(lstrlen(p) > MRU_DISPLAY_LENGTH - 7) {
+ my_memset(buf2,0,sizeof(buf2));
+ lstrcpyn(buf2,p,MRU_DISPLAY_LENGTH - 9);
+ lstrcat(buf2,"...");
+
+ lstrcpyn(buf3,g_mru_list[i],4);
+ lstrcat(buf,buf3);
+ lstrcat(buf,"...\\");
+ lstrcat(buf,buf2);
+ }
+ else {
+ lstrcpyn(buf3,g_mru_list[i],(MRU_DISPLAY_LENGTH - lstrlen(p) - 3));
+ lstrcat(buf,buf3);
+ lstrcat(buf,"...\\");
+ lstrcat(buf,p);
+ }
+ }
+ else {
+ lstrcpyn(buf3,g_mru_list[i],(MRU_DISPLAY_LENGTH-2));
+ lstrcat(buf,buf3);
+ lstrcat(buf,"...");
+ }
+ }
+ else {
+ lstrcat(buf, g_mru_list[i]);
+ }
+
+ mii.dwTypeData = buf;
+ mii.cch = lstrlen(buf)+1;
+ mii.fState = MFS_ENABLED;
+ InsertMenuItem(hMenu, n++, TRUE, &mii);
+
+ }
+ else {
+ break;
+ }
+ }
+
+ hMenu = g_sdata.toolsSubmenu;
+ my_memset(&mii, 0, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_STATE;
+
+ if(g_mru_list[0][0]) {
+ mii.fState = MFS_ENABLED;
+ }
+ else {
+ mii.fState = MFS_GRAYED;
+ }
+
+ SetMenuItemInfo(hMenu, IDM_CLEAR_MRU_LIST,FALSE,&mii);
+}
+
+void LoadMRUFile(int position)
+{
+ if (!g_sdata.thread && position >=0 && position < MRU_LIST_SIZE && g_mru_list[position][0]) {
+ SetScript(g_mru_list[position]);
+ if(IsValidFile(g_mru_list[position])) {
+ PushMRUFile(g_mru_list[position]);
+ }
+ else {
+ PopMRUFile(g_mru_list[position]);
+ BuildMRUMenus();
+ }
+ ResetObjects();
+ CompileNSISScript();
+ }
+}
+
+void RestoreMRUList()
+{
+ HKEY hKey;
+ HKEY hSubKey;
+ int n = 0;
+ int i;
+ if (OpenRegSettingsKey(hKey)) {
+ if (RegCreateKey(hKey,REGMRUSUBKEY,&hSubKey) == ERROR_SUCCESS) {
+ char buf[8];
+ DWORD l;
+ for(int i=0; i<MRU_LIST_SIZE; i++) {
+ wsprintf(buf,"%d",i);
+ l = sizeof(g_mru_list[n]);
+ RegQueryValueEx(hSubKey,buf,NULL,NULL,(unsigned char*)g_mru_list[n],&l);
+ if(g_mru_list[n][0] != '\0') {
+ n++;
+ }
+ }
+ RegCloseKey(hSubKey);
+ }
+ RegCloseKey(hKey);
+ }
+ for(i = n; i < MRU_LIST_SIZE; i++) {
+ g_mru_list[i][0] = '\0';
+ }
+
+ BuildMRUMenus();
+}
+
+void SaveMRUList()
+{
+ HKEY hKey;
+ HKEY hSubKey;
+ int i = 0;
+ if (OpenRegSettingsKey(hKey, true)) {
+ if (RegCreateKey(hKey,REGMRUSUBKEY,&hSubKey) == ERROR_SUCCESS) {
+ char buf[8];
+ for(i = 0; i < MRU_LIST_SIZE; i++) {
+ wsprintf(buf,"%d",i);
+ RegSetValueEx(hSubKey,buf,0,REG_SZ,(const unsigned char *)g_mru_list[i],lstrlen(g_mru_list[i]));
+ }
+ RegCloseKey(hSubKey);
+ }
+ RegCloseKey(hKey);
+ }
+}
+
+void ClearMRUList()
+{
+ int i;
+ for(i=0; i<MRU_LIST_SIZE; i++) {
+ g_mru_list[i][0] = '\0';
+ }
+
+ BuildMRUMenus();
+}
+
+void RestoreCompressor()
+{
+ HKEY hKey;
+ NCOMPRESSOR v = COMPRESSOR_SCRIPT;
+ if (OpenRegSettingsKey(hKey)) {
+ char compressor_name[32];
+ DWORD l = sizeof(compressor_name);
+ DWORD t;
+
+ if (RegQueryValueEx(hKey,REGCOMPRESSOR,NULL,&t,(unsigned char*)compressor_name,&l)==ERROR_SUCCESS) {
+ int i;
+ for(i=(int)COMPRESSOR_SCRIPT; i<= (int)COMPRESSOR_BEST; i++) {
+ if(!lstrcmpi(compressor_names[i],compressor_name)) {
+ v = (NCOMPRESSOR)i;
+ break;
+ }
+ }
+ }
+ RegCloseKey(hKey);
+ }
+ g_sdata.default_compressor=v;
+}
+
+void SaveCompressor()
+{
+ HKEY hKey;
+ int n = (int)COMPRESSOR_SCRIPT;
+ NCOMPRESSOR v = g_sdata.default_compressor;
+
+ if(v >= COMPRESSOR_SCRIPT && v <= COMPRESSOR_BEST) {
+ n = (int)v;
+ }
+
+ if (OpenRegSettingsKey(hKey, true)) {
+ RegSetValueEx(hKey,REGCOMPRESSOR,0,REG_SZ,(unsigned char*)compressor_names[n],
+ lstrlen(compressor_names[n]));
+ RegCloseKey(hKey);
+ }
+}
+
+BOOL FileExists(char *fname)
+{
+ WIN32_FIND_DATA wfd;
+ HANDLE h;
+
+ h = FindFirstFile(fname,&wfd);
+ if(h == INVALID_HANDLE_VALUE) {
+ return false;
+ }
+ else {
+ FindClose(h);
+ return true;
+ }
+}
+
+HMENU FindSubMenu(HMENU hMenu, UINT uId)
+{
+ MENUITEMINFO mii = {
+ sizeof(MENUITEMINFO),
+ MIIM_SUBMENU,
+ };
+
+ mii.hSubMenu = NULL;
+
+ GetMenuItemInfo(hMenu, uId, FALSE, &mii);
+
+ return mii.hSubMenu;
+}
diff --git a/Contrib/Makensisw/utils.h b/Contrib/Makensisw/utils.h
index e0723fa..8e16f54 100755
--- a/Contrib/Makensisw/utils.h
+++ b/Contrib/Makensisw/utils.h
@@ -1,66 +1,66 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, and Sunil Kamath
-
- 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.
-
-*/
-#ifndef UTILS_H
-#define UTILS_H
-#include "resource.h"
-#include "toolbar.h"
-
-#define MRU_LIST_SIZE 5
-#define MRU_DISPLAY_LENGTH 40
-
-int SetArgv(const char *cmdLine, int *argc, char ***argv);
-void SetTitle(HWND hwnd,char *substr);
-void SetBranding(HWND hwnd);
-void CopyToClipboard(HWND hwnd);
-void ClearLog(HWND hwnd);
-void LogMessage(HWND hwnd,const char *str);
-void ErrorMessage(HWND hwnd,const char *str);
-#define DisableItems(hwnd) Items(hwnd, 0)
-#define EnableItems(hwnd) Items(hwnd, 1)
-void Items(HWND hwnd, int on);
-/*void DisableItems(HWND hwnd);
-void EnableItems(HWND hwnd);*/
-bool OpenRegSettingsKey(HKEY &hKey, bool create = false);
-void RestoreWindowPos(HWND hwnd);
-void SaveWindowPos(HWND hwnd);
-void ResetObjects();
-void ResetSymbols();
-int InitBranding();
-void InitTooltips(HWND h);
-void DestroyTooltips();
-void AddTip(HWND hWnd,LPSTR lpszToolTip);
-void ShowDocs();
-void RestoreCompressor();
-void SaveCompressor();
-void SetCompressorStats();
-
-BOOL PopMRUFile(char* fname);
-void PushMRUFile(char* fname);
-void BuildMRUMenus();
-void LoadMRUFile(int position);
-void ClearMRUList();
-
-BOOL FileExists(char *fname);
-
-HMENU FindSubMenu(HMENU hMenu, UINT uId);
-#endif
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, and Sunil Kamath
+
+ 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.
+
+*/
+#ifndef UTILS_H
+#define UTILS_H
+#include "resource.h"
+#include "toolbar.h"
+
+#define MRU_LIST_SIZE 5
+#define MRU_DISPLAY_LENGTH 40
+
+int SetArgv(const char *cmdLine, int *argc, char ***argv);
+void SetTitle(HWND hwnd,char *substr);
+void SetBranding(HWND hwnd);
+void CopyToClipboard(HWND hwnd);
+void ClearLog(HWND hwnd);
+void LogMessage(HWND hwnd,const char *str);
+void ErrorMessage(HWND hwnd,const char *str);
+#define DisableItems(hwnd) Items(hwnd, 0)
+#define EnableItems(hwnd) Items(hwnd, 1)
+void Items(HWND hwnd, int on);
+/*void DisableItems(HWND hwnd);
+void EnableItems(HWND hwnd);*/
+bool OpenRegSettingsKey(HKEY &hKey, bool create = false);
+void RestoreWindowPos(HWND hwnd);
+void SaveWindowPos(HWND hwnd);
+void ResetObjects();
+void ResetSymbols();
+int InitBranding();
+void InitTooltips(HWND h);
+void DestroyTooltips();
+void AddTip(HWND hWnd,LPSTR lpszToolTip);
+void ShowDocs();
+void RestoreCompressor();
+void SaveCompressor();
+void SetCompressorStats();
+
+BOOL PopMRUFile(char* fname);
+void PushMRUFile(char* fname);
+void BuildMRUMenus();
+void LoadMRUFile(int position);
+void ClearMRUList();
+
+BOOL FileExists(char *fname);
+
+HMENU FindSubMenu(HMENU hMenu, UINT uId);
+#endif
diff --git a/Contrib/Makensisw/version.cpp b/Contrib/Makensisw/version.cpp
index b2ffe14..e9bb32b 100755
--- a/Contrib/Makensisw/version.cpp
+++ b/Contrib/Makensisw/version.cpp
@@ -1,29 +1,29 @@
-/*
- Copyright (c) 2002 Robert Rainwater
- Contributors: Justin Frankel, Fritz Elfert, and Amir Szekely
-
- 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.
-
-*/
-#define REALSTR(x) #x
-#define STR(x) REALSTR(x)
-
-#ifdef RELEASE
-const char *NSISW_VERSION = "MakeNSISW " STR(RELEASE) " (NSIS Compiler Interface)";
-#else
-const char *NSISW_VERSION = "MakeNSISW " __DATE__;
-#endif
+/*
+ Copyright (c) 2002 Robert Rainwater
+ Contributors: Justin Frankel, Fritz Elfert, and Amir Szekely
+
+ 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.
+
+*/
+#define REALSTR(x) #x
+#define STR(x) REALSTR(x)
+
+#ifdef RELEASE
+const char *NSISW_VERSION = "MakeNSISW " STR(RELEASE) " (NSIS Compiler Interface)";
+#else
+const char *NSISW_VERSION = "MakeNSISW " __DATE__;
+#endif
diff --git a/Contrib/Math/Math.txt b/Contrib/Math/Math.txt
index 0f2d030..83fdd79 100755
--- a/Contrib/Math/Math.txt
+++ b/Contrib/Math/Math.txt
@@ -1,199 +1,199 @@
-Math::Script NSIS plugin.
-
-C-like style scripting (operators at least).
-Tip1: plugin watches the case of the letters.
-Tip2: plugin makes almost no error checks. So YOU should check your script
-twice before run :)
-
-New HOW TO USE: run the MathTest.Exe, and try yourself. After spending
-some minutes your should be able to write your script by yourself.
-To include it to your NSIS script just insert that (don't forget /NOUNLOAD
-in case of multiple calls):
- Math::Script /NOUNLOAD "YourScript1"
- Math::Script /NOUNLOAD "YourScript2"
- Math::Script "YourScriptFinal"
-
-How to use it? Simple:
- Strcpy $0 "Brainsucker"
- Math::Script "a = 'Math'; B = 'Script'; r0 += ' wants to use ' + a + '::' + b +'!'"
- DetailPrint "$0"
-That string will fill r0 with some shit.
-
-Here are some other samples:
- 10! (factorial, r0 will contain '10! = 362880'):
- r0 = '10! = ' + (1*2*3*4*5*6*7*8*9)
- the same:
- a = b = 1; #{++a <= 10, b = b*a}; r0 = (a-1) + '! = ' + b
- Some floating point:
- Strcpy $R0 "1e1"
- Math::Script "pi = 3.14159; R1 = 2*pi*R0; r0 = 'Length of circle with radius ' + R0 + ' is equal to ' + R1 + '.'"
- Detailprint "$0"
-
-Ok. Variables.
-NSIS: r0-r9 -> $0-$9. R0-R9 -> $R0-$R9.
-Also CL ($CMDLINE), ID ($INSTDIR), OD ($OUTDIR), LG ($LANG), ED ($EXEDIR).
-User definable: name starting from character, up to 28 letters long.
-
-Stacks. Two stacks are supported: NSIS stack and plugin's own stack. I see no
-reasons for using plugin stack, but if you will, remember - the plugin stores
-variables used at function to that stack before function execution, and restores
-after execution. Even less I recommend you to use NSIS stack. You should use it
-only for input/output.
-How to use? It's variable styled. Plugins stack is associated with S variable,
-and NSIS stack associated with NS variable. To push to stack just do "S=0" or
-"NS=0", to pop from stack "a=S" or "b=NS". Combined operations supported too:
-"S += 1.5" will increment value at the top of stack by 1.5.
-
-Supported types: int (in fact that is __int64), float (double in fact),
-string.
-Int: just numbers, may include sign.
-Float: -123.456, 123.456e-78, 123e-45
-String: something in quotes ("", '', ``).
-
-There is also an array type. It is actually a reference type, so if b is array
-and you will perform "a=b", the a and b will reference a single array.
-To create a copy of array, use ca func: dest = ca(source). Btw - you couldn't
-control dimensions of arrays - they are autosized.
-To declare array:
-a = {};
-To declare array and initialize some items with values:
-{"Hello!", "Use", "mixed types", 1.01e23, "like that" ,1234};
-To access array:
-a[index] = "Cool";
-
-Also [] operation could be used to strings. str[x] gives you a single char with
-index x (zero-based) as new string. str[-x] - the same, but x counts from the
-string end (so the last char is -1). str[x,y] gives you characters in range x-y
-(inclusive), both x and y could be <0 - in this case they counted from the end
-of the string.
-
-The function could be useful - is conversion of arrays to strings and back.
-Example:
-a = a("Hello"); str = s(a);
-After running such script array a will contain 6 integers (chars and last zero
-- end of string), and str will contain your string back.
-
-Operators (some binary, some unary):
->>= <<= -= += /= *= |= &= ^= %= -- ++ >> << && || <= =< >= => != ==
-= + - * / % < > & | ^ ~ !
-Only some are applicable to float (logic & arithmetic) and string (+ and logic)
-of course.
-Additional case: reference/de-reference operators (& and *). & will
-give you the reference to argument which should be a variable (NSIS, user, array
-item, stack), and * will convert it back to original variable. For example
-(a=&b; *a=10) will set b to 10. Expression (*&a) is equal to simple (a).
-
-Script is set of expressions (mathematical in general) delimited with ';'.
-Processing is mathematically right (2+2*2 will give 6), operations are performed
-in a C like order (precedence).
-
-Flow control:
- if-then-else like: #[if-expression, then-expr, else-expr]
- example:
- #[a==0, b=1; c=2, b *= (--c); c/=10]
- C eq:
- if (a==0) { b=1; c=2;} else { b*=(c++);c-=10; }
- while (expr) do; like #{expr, do}
- example:
- #{(c<1.1e25)&&(b < 10), b++; c*=1.23}
- C eq:
- while ((c<1.1e25)&&(b<10)) { b++; c*=1.23; }
-
-WATCH OUT! Comma (,) separates if-expr, then-expr, and else-expr from each
-other. All sub-expressions separated by (;) are the part of one expression,
-and the result of the last one of these sub-exprs gives you the result of
-expression.
-
-All the shit (like variables and functions) will be saved between calls if
-you'll use /NOUNLOAD or setpluginunload alwaysoff.
-
-Functions:
- type conversions:
- l(string) returns the length of string or array argument
- s(source) converts source to string type
- i(source) converts source to int type
- f(source) converts source to float type
- c(source) if source is string, returns int value of first
- char, if source is int, returns string which consists
- of a single char (source) (+0 terminator).
- a(source) converts source to array (only string supported)
- ff(float, format) converts float to string, with format
- options.
- options = precision + flags.
- Precision shows how many digits after decimal point
- will be shown. Flags:
- 16 (or 0x10) - No Exponential View
- (number will be shown as 123.123)
- 32 (or 0x20) - Only exponential view
- (number will be shown as 123.12e123)
- 64 (or 0x40) - use 'E' character instead of 'e'
- By default the plugin decides itself how to show your
- number.
-
- math (description of all these functions is available at MSDN, use the
- second given name for search):
- sin(x), sin Sine of argument
- cos(x), cos Cosine of argument
- cel(x), ceil Ceil of argument (no fract. part)
- csh(x), cosh Hyperbolic Cosine of Argument
- exp(x), exp Exponential
- abs(x), abs Absolute value (warning: float)
- flr(x), floor Floor of argument (no fract. part)
- asn(x), asin ArcSine of argument
- acs(x), acos ArcCosine of argument
- atn(x), atan ArcTangent of argument
- ln(x), log Exponential Logarithm
- log(x), log10 Decimal logarithm
- snh(x), sinh Hyperbolic Sine of Argument
- sqt(x), sqrt Square root of argument
- tan(x), tan Tangent of argument
- tnh(x), tanh Hyperbolic tangent of argument
-
- functions taking two arguments
- at2(x, y) atan2 Arctangent of the value (y/x)
- pow(x, y) pow power, x^y
- fmd(x, y) fmod floating point remainder
- fex(x, o) frexp Gets the mantissa (result = r)
- and exponent (o) of floating-point
- number (x): x = r*(2^o)
- mdf(x, o) modf Splits a floating-point value into
- fractional and integer parts.
-
-User-defined functions.
-It's very simple. Example:
- test(a,b) (a+b);
-After that test(1,2) will give you 3.
- test2(a,b) (a=a+b; b *= a);
-The result of function is always the result of last expression.
-As said before it better not to use stack (S) in between function calls.
-It will be better to develop variable-safe functions, i.e. functions which will
-not corrupt variables. For this you should either push/pop them to stack, or
-declare as additional arguments, which will never be used. Example:
- test3(a,b,c) (c=10; #{--c > 0, a=sqrt(a*b)}; a)
-No matter how many arguments will be passed to function, the values of all three
-vars (a,b,c) will be saved.
-Such variable-safe functions could be recursive:
- Math::Script /NOUNLOAD 'rec(a) (#[a > 0, rec(a-1), 0]+a);'
- Math::Script 'R1 = rec(10)'
-will set R1 to right result 55.
-Sometimes functions will need to return more than one value, in this case you
-could declare argument as referent (b at example):
- test4(a, &b) (*b = a*a; a*a*a)
-In this case test4 will return a^3, and if we will call it like that test4(a,c),
-it will place a^2 to c. BUT! Note: you should use de-referencer (*) with variable,
-at example *b. CAUTION: never use the same variable as function internal reference
-variable and external argument variable (for example test4(a,b)). It will surely
-fail. Also: if you declared argument as reference - you should never supply
-a constant expression to it. It could be either array item (array[1]), NSIS
-register R0, any of the user variables (beside the variable with the same name:),
-but never the constant.
-
-Another may-be-useful possibility is to redeclare the function (the usual
-declaration at the time when function already defined will simply call that
-function). For such task you could use "#name", like "func()(1); #func()(2);".
-But beware, function declaration occurs at time of parsing, so it's not possible
-to perform flow controlled declaration.
-SUCH IS NOT POSSIBLE: "#[a<0, #func()(1), #func()(2)]"
-IT WILL SIMPLY DEFINE #func as (2), as the latest variant.
-
+Math::Script NSIS plugin.
+
+C-like style scripting (operators at least).
+Tip1: plugin watches the case of the letters.
+Tip2: plugin makes almost no error checks. So YOU should check your script
+twice before run :)
+
+New HOW TO USE: run the MathTest.Exe, and try yourself. After spending
+some minutes your should be able to write your script by yourself.
+To include it to your NSIS script just insert that (don't forget /NOUNLOAD
+in case of multiple calls):
+ Math::Script /NOUNLOAD "YourScript1"
+ Math::Script /NOUNLOAD "YourScript2"
+ Math::Script "YourScriptFinal"
+
+How to use it? Simple:
+ Strcpy $0 "Brainsucker"
+ Math::Script "a = 'Math'; B = 'Script'; r0 += ' wants to use ' + a + '::' + b +'!'"
+ DetailPrint "$0"
+That string will fill r0 with some shit.
+
+Here are some other samples:
+ 10! (factorial, r0 will contain '10! = 362880'):
+ r0 = '10! = ' + (1*2*3*4*5*6*7*8*9)
+ the same:
+ a = b = 1; #{++a <= 10, b = b*a}; r0 = (a-1) + '! = ' + b
+ Some floating point:
+ Strcpy $R0 "1e1"
+ Math::Script "pi = 3.14159; R1 = 2*pi*R0; r0 = 'Length of circle with radius ' + R0 + ' is equal to ' + R1 + '.'"
+ Detailprint "$0"
+
+Ok. Variables.
+NSIS: r0-r9 -> $0-$9. R0-R9 -> $R0-$R9.
+Also CL ($CMDLINE), ID ($INSTDIR), OD ($OUTDIR), LG ($LANG), ED ($EXEDIR).
+User definable: name starting from character, up to 28 letters long.
+
+Stacks. Two stacks are supported: NSIS stack and plugin's own stack. I see no
+reasons for using plugin stack, but if you will, remember - the plugin stores
+variables used at function to that stack before function execution, and restores
+after execution. Even less I recommend you to use NSIS stack. You should use it
+only for input/output.
+How to use? It's variable styled. Plugins stack is associated with S variable,
+and NSIS stack associated with NS variable. To push to stack just do "S=0" or
+"NS=0", to pop from stack "a=S" or "b=NS". Combined operations supported too:
+"S += 1.5" will increment value at the top of stack by 1.5.
+
+Supported types: int (in fact that is __int64), float (double in fact),
+string.
+Int: just numbers, may include sign.
+Float: -123.456, 123.456e-78, 123e-45
+String: something in quotes ("", '', ``).
+
+There is also an array type. It is actually a reference type, so if b is array
+and you will perform "a=b", the a and b will reference a single array.
+To create a copy of array, use ca func: dest = ca(source). Btw - you couldn't
+control dimensions of arrays - they are autosized.
+To declare array:
+a = {};
+To declare array and initialize some items with values:
+{"Hello!", "Use", "mixed types", 1.01e23, "like that" ,1234};
+To access array:
+a[index] = "Cool";
+
+Also [] operation could be used to strings. str[x] gives you a single char with
+index x (zero-based) as new string. str[-x] - the same, but x counts from the
+string end (so the last char is -1). str[x,y] gives you characters in range x-y
+(inclusive), both x and y could be <0 - in this case they counted from the end
+of the string.
+
+The function could be useful - is conversion of arrays to strings and back.
+Example:
+a = a("Hello"); str = s(a);
+After running such script array a will contain 6 integers (chars and last zero
+- end of string), and str will contain your string back.
+
+Operators (some binary, some unary):
+>>= <<= -= += /= *= |= &= ^= %= -- ++ >> << && || <= =< >= => != ==
+= + - * / % < > & | ^ ~ !
+Only some are applicable to float (logic & arithmetic) and string (+ and logic)
+of course.
+Additional case: reference/de-reference operators (& and *). & will
+give you the reference to argument which should be a variable (NSIS, user, array
+item, stack), and * will convert it back to original variable. For example
+(a=&b; *a=10) will set b to 10. Expression (*&a) is equal to simple (a).
+
+Script is set of expressions (mathematical in general) delimited with ';'.
+Processing is mathematically right (2+2*2 will give 6), operations are performed
+in a C like order (precedence).
+
+Flow control:
+ if-then-else like: #[if-expression, then-expr, else-expr]
+ example:
+ #[a==0, b=1; c=2, b *= (--c); c/=10]
+ C eq:
+ if (a==0) { b=1; c=2;} else { b*=(c++);c-=10; }
+ while (expr) do; like #{expr, do}
+ example:
+ #{(c<1.1e25)&&(b < 10), b++; c*=1.23}
+ C eq:
+ while ((c<1.1e25)&&(b<10)) { b++; c*=1.23; }
+
+WATCH OUT! Comma (,) separates if-expr, then-expr, and else-expr from each
+other. All sub-expressions separated by (;) are the part of one expression,
+and the result of the last one of these sub-exprs gives you the result of
+expression.
+
+All the shit (like variables and functions) will be saved between calls if
+you'll use /NOUNLOAD or setpluginunload alwaysoff.
+
+Functions:
+ type conversions:
+ l(string) returns the length of string or array argument
+ s(source) converts source to string type
+ i(source) converts source to int type
+ f(source) converts source to float type
+ c(source) if source is string, returns int value of first
+ char, if source is int, returns string which consists
+ of a single char (source) (+0 terminator).
+ a(source) converts source to array (only string supported)
+ ff(float, format) converts float to string, with format
+ options.
+ options = precision + flags.
+ Precision shows how many digits after decimal point
+ will be shown. Flags:
+ 16 (or 0x10) - No Exponential View
+ (number will be shown as 123.123)
+ 32 (or 0x20) - Only exponential view
+ (number will be shown as 123.12e123)
+ 64 (or 0x40) - use 'E' character instead of 'e'
+ By default the plugin decides itself how to show your
+ number.
+
+ math (description of all these functions is available at MSDN, use the
+ second given name for search):
+ sin(x), sin Sine of argument
+ cos(x), cos Cosine of argument
+ cel(x), ceil Ceil of argument (no fract. part)
+ csh(x), cosh Hyperbolic Cosine of Argument
+ exp(x), exp Exponential
+ abs(x), abs Absolute value (warning: float)
+ flr(x), floor Floor of argument (no fract. part)
+ asn(x), asin ArcSine of argument
+ acs(x), acos ArcCosine of argument
+ atn(x), atan ArcTangent of argument
+ ln(x), log Exponential Logarithm
+ log(x), log10 Decimal logarithm
+ snh(x), sinh Hyperbolic Sine of Argument
+ sqt(x), sqrt Square root of argument
+ tan(x), tan Tangent of argument
+ tnh(x), tanh Hyperbolic tangent of argument
+
+ functions taking two arguments
+ at2(x, y) atan2 Arctangent of the value (y/x)
+ pow(x, y) pow power, x^y
+ fmd(x, y) fmod floating point remainder
+ fex(x, o) frexp Gets the mantissa (result = r)
+ and exponent (o) of floating-point
+ number (x): x = r*(2^o)
+ mdf(x, o) modf Splits a floating-point value into
+ fractional and integer parts.
+
+User-defined functions.
+It's very simple. Example:
+ test(a,b) (a+b);
+After that test(1,2) will give you 3.
+ test2(a,b) (a=a+b; b *= a);
+The result of function is always the result of last expression.
+As said before it better not to use stack (S) in between function calls.
+It will be better to develop variable-safe functions, i.e. functions which will
+not corrupt variables. For this you should either push/pop them to stack, or
+declare as additional arguments, which will never be used. Example:
+ test3(a,b,c) (c=10; #{--c > 0, a=sqrt(a*b)}; a)
+No matter how many arguments will be passed to function, the values of all three
+vars (a,b,c) will be saved.
+Such variable-safe functions could be recursive:
+ Math::Script /NOUNLOAD 'rec(a) (#[a > 0, rec(a-1), 0]+a);'
+ Math::Script 'R1 = rec(10)'
+will set R1 to right result 55.
+Sometimes functions will need to return more than one value, in this case you
+could declare argument as referent (b at example):
+ test4(a, &b) (*b = a*a; a*a*a)
+In this case test4 will return a^3, and if we will call it like that test4(a,c),
+it will place a^2 to c. BUT! Note: you should use de-referencer (*) with variable,
+at example *b. CAUTION: never use the same variable as function internal reference
+variable and external argument variable (for example test4(a,b)). It will surely
+fail. Also: if you declared argument as reference - you should never supply
+a constant expression to it. It could be either array item (array[1]), NSIS
+register R0, any of the user variables (beside the variable with the same name:),
+but never the constant.
+
+Another may-be-useful possibility is to redeclare the function (the usual
+declaration at the time when function already defined will simply call that
+function). For such task you could use "#name", like "func()(1); #func()(2);".
+But beware, function declaration occurs at time of parsing, so it's not possible
+to perform flow controlled declaration.
+SUCH IS NOT POSSIBLE: "#[a<0, #func()(1), #func()(2)]"
+IT WILL SIMPLY DEFINE #func as (2), as the latest variant.
+
(c) Nik Medved (brainsucker) \ No newline at end of file
diff --git a/Contrib/Math/SConscript b/Contrib/Math/SConscript
index 9c4df58..cac91a1 100755
--- a/Contrib/Math/SConscript
+++ b/Contrib/Math/SConscript
@@ -1,26 +1,26 @@
-target = 'Math'
-
-files = Split("""
- Source/Math.c
- Source/MyMath.c
- Source/plugin.c
-""")
-
-libs = Split("""
- kernel32
-""")
-
-examples = Split("""
- math.nsi
- mathtest.nsi
- mathtest.ini
- mathtest.txt
-""")
-
-docs = Split("""
- Math.txt
-""")
-
-Import('BuildPlugin env')
-
-BuildPlugin(target, files, libs, examples, docs, nodeflib = False, flags = ['$CPP_FLAG'], entry = None)
+target = 'Math'
+
+files = Split("""
+ Source/Math.c
+ Source/MyMath.c
+ Source/plugin.c
+""")
+
+libs = Split("""
+ kernel32
+""")
+
+examples = Split("""
+ math.nsi
+ mathtest.nsi
+ mathtest.ini
+ mathtest.txt
+""")
+
+docs = Split("""
+ Math.txt
+""")
+
+Import('BuildPlugin env')
+
+BuildPlugin(target, files, libs, examples, docs, nodeflib = False, flags = ['$CPP_FLAG'], entry = None)
diff --git a/Contrib/Math/Source/Math.c b/Contrib/Math/Source/Math.c
index 4106310..7077c84 100755
--- a/Contrib/Math/Source/Math.c
+++ b/Contrib/Math/Source/Math.c
@@ -1,1548 +1,1548 @@
-#include <windows.h>
-#include "MyMath.h"
-#include "Math.h"
-
-extern "C" int _fltused;
-
-#ifdef __MINGW32__
-int _fltused = 1;
-#endif
-
-ExpressionItem *stack;
-
-int UserVarsCount, UserFuncsCount;
-UserVar UserVars[MAX_USER_VARS];
-UserFunc UserFuncs[MAX_USER_FUNCS];
-
-void PrintTree(ExpressionItem *root, char *str);
-void ParseString(char *&sp, ExpressionItem* &itemplace);
-void CleanupItems(ExpressionItem* &itemplace);
-void PlaceVariable(char *&vb, ParseInfo *pi);
-
-void PlaceNewItem(char *&vb, ParseInfo *pi, int precedence)
-{
- ExpressionItem *newroot;
- PlaceVariable(vb, pi);
- if (pi->item == NULL) return;
-
- while ((pi->OpsStack) && ((((int) pi->OpsStack->param2) < precedence)
- || ((((int)pi->OpsStack->param2) == precedence)
- && (precedence != OPERATOR_SET_PRECEDENCE))))
- {
- // second operand for our operator
- newroot = pi->OpsStack;
- *((ExpressionItem **)&(newroot->param2)) = pi->item;
- pi->OpsStack = newroot->next;
- newroot->next = NULL;
- pi->item = newroot;
- }
- // finally we have got new root
- newroot = pi->item;
-
- if (pi->SetupNewRoot)
- {
- (*pi->root)->next = newroot;
- pi->root = &((*pi->root)->next);
- pi->SetupNewRoot = 0;
- }
- if (*pi->place == *pi->root) *pi->place = *pi->root = newroot;
- else *pi->root = newroot;
- // no item at our pockets
- pi->item = NULL;
-}
-
-#define NSIS_VARS_COUNT 27
-#define NSIS_VARS_STACK 25
-#define NSIS_VARS_NSTACK 26
-
-typedef char smallstr[2];
-const smallstr NSISVariablesNames[NSIS_VARS_COUNT] = {{'r','0'}, {'r','1'}, {'r','2'}, {'r','3'}, {'r','4'}, {'r','5'}, {'r','6'}, {'r','7'}, {'r','8'}, {'r','9'},
-{'R','0'}, {'R','1'}, {'R','2'}, {'R','3'}, {'R','4'}, {'R','5'}, {'R','6'}, {'R','7'}, {'R','8'}, {'R','9'},
-{'C','L'}, {'I','D'}, {'O','D'}, {'E','D'}, {'L','G'}, {'S',0}, {'N','S'}};
-
-ExpressionItem *FindVariable(char *varname)
-{
- int i;
-
- ExpressionItem *item = AllocItem();
- // check NSIS variables
- for (i = 0; i < NSIS_VARS_COUNT; i++)
- {
- if (lstrcmpn(varname, NSISVariablesNames[i],2) == 0)
- {
- if (i == NSIS_VARS_STACK) item->type = IT_VARIABLE | ITV_STACK;
- else if (i == NSIS_VARS_NSTACK) item->type = IT_VARIABLE | ITV_NSTACK;
- else
- item->type = (IT_VARIABLE | ITV_NSIS) + i;
- return item;
- }
- }
- // no.. that's user variable
- for (i = 0; i < UserVarsCount; i++)
- {
- if (lstrcmp(varname, UserVars[i].name) == 0)
- {
- // ok. we found user var expression needed
- break;
- }
- }
- if (i == UserVarsCount)
- {
- // new variable
- UserVarsCount++;
- lstrcpy(UserVars[i].name, varname);
- UserVars[i].item = NULL;
- }
- item->type = (IT_VARIABLE | ITV_USER) + i;
- return item;
-}
-
-void PlaceVariable(char *&vb, ParseInfo *pi)
-{
- if (vb <= pi->valbuf) return;
- *vb = 0;
- pi->item = FindVariable(pi->valbuf);
- vb = pi->valbuf;
-}
-
-typedef double (*math_d2)(double, double);
-typedef double (*math_ddp)(double, double*);
-typedef double (*math_di)(double, int*);
-
-#define MATHFUNCNUM 29
-const MathFunction MathFunctions[MATHFUNCNUM] = {
- {{'s','i','n'}, ITF_MATH1 >> 8, sin},
- {{'s','n','h'}, ITF_MATH1 >> 8, sinh},
- {{'a','s','n'}, ITF_MATH1 >> 8, asin},
- {{'c','o','s'}, ITF_MATH1 >> 8, cos},
- {{'c','s','h'}, ITF_MATH1 >> 8, cosh},
- {{'a','c','s'}, ITF_MATH1 >> 8, acos},
- {{'t','a','n'}, ITF_MATH1 >> 8, tan},
- {{'t','n','h'}, ITF_MATH1 >> 8, tanh},
- {{'a','t','n'}, ITF_MATH1 >> 8, atan},
- {{'a','b','s'}, ITF_MATH1 >> 8, fabs},
- {{'l','n',0}, ITF_MATH1 >> 8, log},
- {{'l','o','g'}, ITF_MATH1 >> 8, log10},
- {{'e','x','p'}, ITF_MATH1 >> 8, exp},
- {{'s','q','t'}, ITF_MATH1 >> 8, sqrt},
- {{'c','e','l'}, ITF_MATH1 >> 8, ceil},
- {{'f','l','r'}, ITF_MATH1 >> 8, floor},
-
- {{'a','t','2'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)atan2},
- {{'p','o','w'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)pow},
- {{'f','m','d'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)fmod},
-
- // type conversions
- {{'i',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_INT},
- {{'s',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_STRING},
- {{'f',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_FLOAT},
- {{'a',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_ARRAY},
-#define ITFT_CARRAY_ID 23
- {{'c','a',0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_ARRAY},
- {{'f','f',0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_FLOATF},
- {{'l',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_LEN},
- {{'c',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_CHAR},
-
- {{'f','e','x'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_di)frexp},
- {{'m','d','f'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_ddp)modf},
-};
-
-void PlaceFunction(char *&vb, char *&sp, ParseInfo *pi, int redefine)
-{
- int i;
- ExpressionItem *item = pi->item = AllocItem();
- *vb = 0;
-
- // check BUILTIN functions
- for (i = 0; i < MATHFUNCNUM; i++)
- {
- if (lstrcmpn(pi->valbuf, MathFunctions[i].name, 3) == 0)
- {
- item->type = IT_FUNCTION | (MathFunctions[i].type << 8) | i;
- // get first argument
- sp++;
- ParseString(sp, *((ExpressionItem **)(&item->param1)));
- if (*sp == ',')
- {
- // get second argument
- sp++;
- ParseString(sp, *((ExpressionItem **)(&item->param2)));
- }
- sp++; vb = pi->valbuf;
- return;
- }
- }
-
- // heh, may be it user function
- for (i = 0; i < UserFuncsCount; i++)
- {
- if (lstrcmp(pi->valbuf, UserFuncs[i].name) == 0)
- {
- // Function found? Redefine option specified?
- if (redefine) break;
-
- item->type = IT_FUNCTION | ITF_USER | i;
- // get arguments list
- ExpressionItem **newplace = ((ExpressionItem **)(&pi->item->param1));
- while (*sp != ')')
- {
- *newplace = AllocItem();
- (*newplace)->type = IT_EXPRESSION;
- sp++;
- ParseString(sp, *((ExpressionItem **)(&(*newplace)->param1)));
- newplace = &((*newplace)->next);
- }
- sp++; vb = pi->valbuf;
- return;
- }
- }
-
- // oops, we need no item for function defenition
- CleanupItems(item); pi->item = NULL;
-
- // it's user function define
- int flags = 0;
- char buffer[128], *buf = buffer;
-
- // workaround for redefine flag - if the function already present,
- // it will be cleared and redefined
- UserFunc *f = &UserFuncs[i];
- if (i == UserFuncsCount) UserFuncsCount++;
- else CleanupItems(f->root);
-
- lstrcpy(f->name, pi->valbuf);
- f->varflags = 0;
- f->varsnum = 0;
- do
- {
- sp++;
- switch (*sp)
- {
- case ' ':
- break;
- case ',':
- case ')':
- if (buf > buffer)
- {
- *buf = 0;
- // it should be user variable
- ExpressionItem *it = FindVariable(buffer);
- f->vars[f->varsnum++] = (it->type) & ITEMOPTIONS;
- CleanupItems(it);
- buf = buffer;
- flags <<= 1;
- }
- break;
- case '&':
- flags |= 1;
- break;
- default:
- *(buf++) = *sp;
- break;
- }
- }
- while (*sp != ')');
-
- // prepare flag for fast analisys
- for (i = 0; i < f->varsnum; i++)
- {
- f->varflags <<= 1;
- flags >>= 1;
- f->varflags |= flags&1;
- }
-
- // find nearest round bracket - function body
- while (*sp != '(' && *sp) sp++;
- if (!*sp)
- return;
- sp++;
-
- // now we are ready to parse function body
- ParseString(sp, f->root);
- sp++; // closing bracket
- vb = pi->valbuf;
-
-#ifdef _DEBUG
- // dump function (in debug mode)
- char place[1024];
- wsprintf(place, "function %s(", f->name);
- flags = f->varflags;
- for (i = 0; i < f->varsnum; i++)
- {
- if (flags&1) lstrcat(place, "&");
- lstrcat(place, UserVars[f->vars[i]].name);
- if (i < f->varsnum-1) lstrcat(place, ", ");
- flags >>= 1;
- }
- lstrcat(place, ")");
- PrintTree(f->root, place);
-#endif
-}
-
-// operator options
-#define PO_UNARYPRE 0x1 // this operator can be uniary pre (--a) for ex
-#define PO_UNARYPOST 0x2 // this op can be uniary post (a++) (couldn't be binary)
-#define PO_PRENONCONST 0x4 // pre argument (a = b) -> a is non const
-#define PO_POSTNONCONST 0x8 // post argument (b--) is non const
-#define PO_LASTOP 0x10 // op should be the last item at expression (=, -=, etc)
-#define PO_SET 0x20 // op will set new value to one of args
-#define PO_USESPRE 0x40 // operator will use pre operand
-#define PO_USESPOST 0x80 // operator will use post operan
-
-void PlaceOp(char *&vb, int type, int precedence, ParseInfo *pi)
-{
- PlaceVariable(vb, pi);
- if ((type & PO_UNARYPRE) && (!pi->item))
- {
- // uniary pre op
- ExpressionItem *item = AllocItem();
- item->type = type;
- item->param2 = (EIPARAM) precedence;
- item->next = pi->OpsStack;
- pi->OpsStack = item;
- }
- else
- {
- // get previous tree as items and operators of lower precedence
- PlaceNewItem(vb, pi, precedence);
- // post operators
- ExpressionItem *item = AllocItem();
- item->type = type;
- item->param1 = (EIPARAM) (*pi->root);
-
- if (*pi->place == *pi->root) *pi->place = *pi->root = NULL;
- else *pi->root = NULL;
-
- if (type & PO_UNARYPOST)
- {
- // uniary post op
- pi->item = item;
- } else
- {
- // binary operator
- item->param2 = (EIPARAM) precedence;
- item->next = pi->OpsStack;
- pi->OpsStack = item;
- }
- }
-}
-
-#define OPSNUM 35
-const OpStruct Operators[OPSNUM] =
-{
-// three byte ops
-{{'>','>','='}, 14, ITO_SHR | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{{'<','<','='}, 14, ITO_SHL | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-
-// two byte ops
-// !!! don't forget to change Set Operator Precedence !!!
-{"-=", 14, ITO_MINUS | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"+=", 14, ITO_PLUS | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"/=", 14, ITO_DIV | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"*=", 14, ITO_MUL | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"|=", 14, ITO_OR | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"&=", 14, ITO_AND | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"^=", 14, ITO_XOR | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"%=", 14, ITO_MOD | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
-{"--", 2, ITO_DEC | PO_POSTNONCONST | PO_PRENONCONST | PO_UNARYPRE | PO_UNARYPOST | PO_SET | PO_USESPRE | PO_USESPOST},
-{"++", 2, ITO_INC | PO_POSTNONCONST | PO_PRENONCONST | PO_UNARYPRE | PO_UNARYPOST | PO_SET | PO_USESPRE | PO_USESPOST},
-{">>", 6, ITO_SHR | PO_USESPRE | PO_USESPOST},
-{"<<", 6, ITO_SHL | PO_USESPRE | PO_USESPOST},
-
-// logical
-{"&&", 12, ITO_LAND | PO_USESPRE | PO_USESPOST},
-{"||", 13, ITO_LOR | PO_USESPRE | PO_USESPOST},
-
-// comparisons
-{"<=", 7, ITO_LE | PO_USESPRE | PO_USESPOST},
-{"=<", 7, ITO_LE | PO_USESPRE | PO_USESPOST},
-{">=", 7, ITO_GE | PO_USESPRE | PO_USESPOST},
-{"=>", 7, ITO_GE | PO_USESPRE | PO_USESPOST},
-{"!=", 8, ITO_NE | PO_USESPRE | PO_USESPOST},
-{"==", 8, ITO_EQ | PO_USESPRE | PO_USESPOST},
-
-// single byte ops
-// !!! don't forget to change Set Operator Precedence !!!
-{"=", 14, ITO_SET | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPOST},
-{"+", 5, ITO_PLUS | PO_USESPRE | PO_USESPOST},
-{"-", 5, ITO_MINUS | PO_USESPRE | PO_USESPOST | PO_UNARYPRE},
-{"*", 4, ITO_MUL | PO_USESPRE | PO_USESPOST | PO_UNARYPRE},
-{"/", 4, ITO_DIV | PO_USESPRE | PO_USESPOST},
-{"%", 4, ITO_MOD | PO_USESPRE | PO_USESPOST},
-{"<", 7, ITO_LS | PO_USESPRE | PO_USESPOST},
-{">", 7, ITO_GR | PO_USESPRE | PO_USESPOST},
-{"&", 9, ITO_AND | PO_USESPRE | PO_USESPOST | PO_UNARYPRE},
-{"|", 11, ITO_OR | PO_USESPRE | PO_USESPOST},
-{"^", 10, ITO_XOR | PO_USESPRE | PO_USESPOST},
-{"~", 3, ITO_NOT | PO_USESPOST | PO_UNARYPRE},
-{"!", 3, ITO_LNOT |PO_USESPOST | PO_UNARYPRE}
-};
-
-void CheckForOperator(char *&sp, char *&vb, ParseInfo *pi)
-{
- for (int op = 0; op < OPSNUM; op++)
- {
- int c = lstrlen(Operators[op].name);
- if (c > 3) c = 3; // real operator length
- if (lstrcmpn(sp, Operators[op].name, c))
- {
- // wrong - different op
- continue;
- }
- // that is our op
- sp += c;
- PlaceOp(vb, ((int) Operators[op].type) | IT_OPERATOR, Operators[op].precedence, pi);
- break;
- }
-}
-
-void ParseString(char *&sp, ExpressionItem* &itemplace)
-{
- ParseInfo pi = {0, NULL, NULL, &itemplace, &itemplace};
-
- int redefine = 0;
- char *vb = pi.valbuf;
- // cycle until current expression end
- while ((*sp != 0) && (*sp != ')') && (*sp != '}') &&
- (*sp != ']') && (*sp != ','))
- {
- int processed = 1;
- switch (*sp)
- {
- case ' ':
- case '\t':
- sp++;
- break;
- case ';':
- // expression delimeter
- PlaceNewItem(vb, &pi, 255);
- if (*pi.root) pi.SetupNewRoot = 1;
- sp++;
- break;
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- // variable & function names could contain numbers as non first chars
- if (vb > pi.valbuf)
- {
- processed = FALSE;
- break;
- }
- case '\'': case '\"': case '`':
- // constant meet
- pi.item = AllocItem();
- StringToItem(sp, pi.item, STI_STRING | STI_FLOAT | STI_INT);
- break;
-
- case '(': // start of function or expression
- if (vb > pi.valbuf)
- {
- // thats function
- PlaceFunction(vb, sp, &pi, redefine);
- } else
- {
- // expression
- sp++;
- ParseString(sp, pi.item);
- if (*sp == ')') sp++;
- }
- redefine = 0;
- break;
-
- case '#': // start of one of logical expresions
- sp++;
- if ((*sp != '[') && (*sp != '{'))
- {
- // function redefine flag
- redefine = 1;
- break;
- }
- {
- pi.item = AllocItem();
- // IF or WHILE
- pi.item->type = ((*sp == '[')?(IT_LOGIC | ITL_IF):(IT_LOGIC | ITL_WHILE));
- // first expr - logic statement
- sp++;
-
- ParseString(sp, *((ExpressionItem **)(&pi.item->param1)));
- // ok, second expr - then, third - else statement.. others???
- ExpressionItem **newplace = ((ExpressionItem **)(&pi.item->param2));
- while (*sp == ',')
- {
- *newplace = AllocItem();
- (*newplace)->type = IT_EXPRESSION;
- sp++;
- ParseString(sp, *((ExpressionItem **)(&(*newplace)->param1)));
- newplace = &((*newplace)->next);
- }
- }
- sp++;
- break;
-
- case '[':
- {
- // thats array access
- PlaceOp(vb, IT_ARRAY | ITA_ACCESS | PO_UNARYPOST, 1, &pi);
- sp++;
- // item index
- ParseString(sp, *(ExpressionItem **)&(pi.item->param2));
- if (*sp == ',')
- {
- // two indexes - string access
- ExpressionItem *it = AllocItem();
- it->type = IT_EXPRESSION;
- it->param1 = (EIPARAM) *(ExpressionItem **)&(pi.item->param2);
- *(ExpressionItem **)&(pi.item->param2) = it;
- it = it->next = AllocItem();
- it->type = IT_EXPRESSION;
- sp++;
- ParseString(sp, *((ExpressionItem **)(&it->param1)));
- }
- sp++;
- }
- break;
-
- case '{': // start of array define
- {
- // array define - constists of array copy operator and array define itself
-
- // type conversion item (to create a copy of array)
- pi.item = AllocItem();
- pi.item->type = IT_FUNCTION | ITF_TYPE | ITFT_CARRAY_ID | ITFA_COPY;
-
- // during first create our array descriptor and array pointers
- ExpressionItem *ai = AllocArray(DEFAULT_ARRAY_SIZE);
- pi.item->param1 = (EIPARAM) ai;
- ArrayDesc *ad = *((ArrayDesc**)&(ai->param1));
-
- // parse array initializers
- while (*sp != '}')
- {
- sp++;
- ParseString(sp, ad->array[ad->count]);
- if (ad->array[ad->count])
- ad->count++;
- }
-
- sp++;
- }
- break;
- case '-': case '+': case '<': case '=': case '>':
- case '/': case '*': case '~': case '^': case '!':
- case '&': case '|': case '%':
- CheckForOperator(sp, vb, &pi);
- break;
-
- // non expression? ok, then it should be common char, like function or var name
- default:
- processed = FALSE;
- break;
- }
- if (!processed) *(vb++) = *(sp++);
- }
- PlaceNewItem(vb, &pi, 255);
-}
-
-void CleanupArray(ArrayDesc *ad)
-{
- if (!(--(ad->references)))
- {
- // last array reference, we could kill it
- // cleanup array items
- for (int i = 0; i < ad->count; i++)
- {
- ExpressionItem *aritem = ad->array[i];
- if (aritem)
- CleanupItems(aritem);
- }
- // cleanup ptrs and descriptor
- dbgGlobalFree(ad->array);
- dbgGlobalFree(ad);
- }
- }
-
-void CleanupItems(ExpressionItem* &itemplace)
-{
- if (itemplace == NULL) return;
- ExpressionItem *item = itemplace, *itemnext;
- do
- {
- if (((item->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_VARIABLE|ITV_ARRITEM))
- ||
- ((item->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_ARRAY)))
- {
- CleanupArray((ArrayDesc *)item->param1);
- }
- else
- if ((item->type & ITEMTYPE) == IT_CONST)
- {
- if ((item->type & ITEMSUBTYPE) == ITC_STRING)
- dbgGlobalFree((HGLOBAL) item->param1);
- } else
- {
- CleanupItems(*((ExpressionItem**) &item->param1));
- CleanupItems(*((ExpressionItem**) &item->param2));
- }
- // free the item itself
- itemnext = item->next;
- dbgGlobalFree((HGLOBAL) item);
- item = itemnext;
- } while (item != NULL);
- itemplace = NULL;
-}
-
-#ifdef _DEBUG
-HANDLE myfile;
-
-char *opsnames[] = {"", "-", "+", "<<", ">>", "*", "/", "=", "&&", "||", "++", "--",
-"=<", ">=", "!=", "==", "<", ">", "&", "%", "|", "^", "~", "!"};
-
-void PrintNode(int index, int spaces, ExpressionItem* itemplace)
-{
- if (itemplace == NULL) return;
-
- ExpressionItem *item = itemplace;
- do
- {
- DWORD wrote;
- char buffer[1024], *place = buffer;
- for (int k = 0; k < spaces; k++)
- *(place++) = 32;
- *place = 0;
-
- switch (item->type & ITEMTYPE)
- {
- case IT_EXPRESSION:
- wsprintf(place, "Expression Place-Holder ");
- break;
- case IT_CONST:
- switch (item->type & ITEMSUBTYPE)
- {
- case ITC_STRING:
- wsprintf(place, "String: \"%s\"", (char *) item->param1);
- break;
- case ITC_INT:
- wsprintf(place, "Int: ");
- itoa64(*((__int64*)&(item->param1)), place+5);
- break;
- case ITC_FLOAT:
- wsprintf(place, "Float: ");
- FloatFormat(place+7, *((double*)&(item->param1)), 6);
- break;
- case ITC_ARRAY:
- ArrayDesc *ad = (ArrayDesc*) item->param1;
- wsprintf(place, "Array, ptr %08X, size %d, count %d, references %d",
- ad->array, ad->size, ad->count, ad->references);
- break;
- }
- strcat(place, " ");
- break;
- case IT_OPERATOR:
- wsprintf(place, "Op: %s%s ", opsnames[(item->type & ITEMSUBTYPE) >> 8], (item->type & PO_SET)?("(=)"):(""));
- break;
- case IT_VARIABLE:
- switch (item->type & ITEMSUBTYPE)
- {
- case ITV_NSIS:
- {
- char buffer[128];
- buffer[0] = NSISVariablesNames[item->type & ITEMOPTIONS][0];
- buffer[1] = NSISVariablesNames[item->type & ITEMOPTIONS][1];
- buffer[2] = 0;
- wsprintf(place, "Var: %s (%d) ",
- buffer,
- item->type & ITEMOPTIONS);
- }
- break;
- case ITV_USER:
- wsprintf(place, "Var: %s (%d) ", UserVars[item->type & ITEMOPTIONS].name, item->type & ITEMOPTIONS);
- break;
- case ITV_STACK:
- wsprintf(place, "Plugin Stack ");
- break;
- case ITV_NSTACK:
- wsprintf(place, "NSIS Stack ");
- break;
- }
- break;
- case IT_LOGIC:
- if ((item->type & ITEMSUBTYPE) == ITL_IF)
- wsprintf(place, "IF ");
- else
- wsprintf(place, "WHILE ");
- break;
- case IT_FUNCTION:
- if (((item->type & ITEMSUBTYPE) == ITF_MATH1) ||
- ((item->type & ITEMSUBTYPE) == ITF_MATH2) ||
- ((item->type & ITEMSUBTYPE) == ITF_TYPE))
- {
- char buffer[128];
- buffer[0] = (MathFunctions[item->type &ITEMOPTIONS].name)[0];
- buffer[1] = (MathFunctions[item->type &ITEMOPTIONS].name)[1];
- buffer[2] = (MathFunctions[item->type &ITEMOPTIONS].name)[2];
- buffer[3] = 0;
- wsprintf(place, "Built-In Function %s() [%d] ",
- buffer,
- item->type &ITEMOPTIONS);
- }
- else
- {
- UserFunc *f = &(UserFuncs[item->type & ITEMOPTIONS]);
- wsprintf(place, "User Function: %s(", f->name);
- int flags = f->varflags;
- for (int i = 0; i < f->varsnum; i++)
- {
- if (flags&1) lstrcat(place, "&");
- lstrcat(place, UserVars[f->vars[i]].name);
- if (i < f->varsnum-1) lstrcat(place, ", ");
- flags >>= 1;
- }
- lstrcat(place, ") ");
- }
- break;
- case IT_ARRAY:
- wsprintf(place, "Array access [] ");
- break;
- }
- place += lstrlen(place);
- wsprintf(place, "Addr: %08X Type: %08X Next: %08X Param1: %08X Param2: %08X", item, item->type, item->next, item->param1, item->param2);
- lstrcat(place, "\n");
- WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
- if (((item->type & ITEMTYPE) != IT_CONST) && ((item->type & (ITEMTYPE|ITEMSUBTYPE)) != (IT_VARIABLE|ITV_ARRITEM)))
- {
- place = buffer;
- for (int k = 0; k < spaces+2; k++)
- *(place++) = 32;
- int show = 0;
- if (((item->param1 != NULL) && ((*((ExpressionItem**) &item->param1))->next != NULL)) ||
- ((item->param2 != NULL) && ((*((ExpressionItem**) &item->param2))->next != NULL)))
- show = 1;
- if (show)
- {
- wsprintf(place, "Sub1:\n");
- WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
- }
- PrintNode(1, spaces + 4, *((ExpressionItem**) &item->param1));
- if (show)
- {
- wsprintf(place, "Sub2:\n");
- WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
- }
- PrintNode(2, spaces + 4, *((ExpressionItem**) &item->param2));
- } else if ((item->type & (ITEMSUBTYPE|ITEMTYPE)) == (ITC_ARRAY|IT_CONST))
- {
- ArrayDesc *ad = (ArrayDesc *) item->param1;
- for (int i = 0; i < ad->count; i++)
- {
- ExpressionItem *aritem = ad->array[i];
- if (aritem)
- PrintNode(2, spaces + 4, aritem);
- }
- }
- item = item->next;
- } while (item != NULL);
-}
-
-void PrintTree(ExpressionItem *root, char *str)
-{
- myfile = CreateFile("d:\\math.debug", GENERIC_ALL, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, 0);
- SetFilePointer(myfile, 0, NULL, FILE_END);
- char buffer[1024]; DWORD wrote;
- wsprintf(buffer, "New tree for \'%s\'\n", str);
- WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
-
- PrintNode(0, 4, root);
- CloseHandle(myfile);
- myfile = NULL;
-}
-#endif
-
-void CopyArray(ExpressionItem *&item)
-{
- if (item == NULL) return;
- // especial case - array to array conversion is requested array copy
- ExpressionItem *olditem = item;
- ArrayDesc *oad = (ArrayDesc *) (olditem->param1);
- // Initialize the array of the same size
- item = AllocArray(oad->size);
- ArrayDesc *nad = (ArrayDesc *) (item->param1);
- nad->count = oad->count;
- // copy items
- for (int i = 0; i < oad->count; i++)
- nad->array[i] = CopyItem(oad->array[i], TRUE);
- // cleanup old array pointer (may be array itself)
- CleanupItems(olditem);
-}
-
-void ItemToType(ExpressionItem* &item, int type)
-{
- char *buffer, *bp;
- if (item == NULL) return;
- int itemt = item->type & ITEMTYPE, oldtype = item->type & ITEMSUBTYPE;
-
- if (((itemt == IT_CONST) && (oldtype == type))
- || (itemt != IT_CONST)) return;
-
- switch (type)
- {
- case ITC_STRING:
- buffer = AllocString();
- ItemToString(buffer, item);
- item->param1 = (EIPARAM) buffer;
- item->param2 = 0;
- break;
- case ITC_FLOAT:
- if (oldtype == ITC_INT)
- *((double *)&(item->param1)) = (double) *((__int64 *)&(item->param1));
- else
- {
- bp = buffer = (char*) item->param1;
- StringToItem(buffer, item, STI_FLOAT);
- dbgGlobalFree(bp);
- }
- break;
- case ITC_INT:
- if (oldtype == ITC_FLOAT)
- *((__int64 *)&(item->param1)) = (__int64) *((double *)&(item->param1));
- else
- {
- bp = buffer = (char*) item->param1;
- StringToItem(buffer, item, STI_INT);
- dbgGlobalFree(bp);
- }
- break;
- case ITC_ARRAY:
- if (oldtype == ITC_STRING)
- {
- char *buf = (char*) item->param1;
- int len = lstrlen(buf)+1;
- ExpressionItem *ni = AllocArray(lstrlen(buf)+1);
- ArrayDesc *ad = (ArrayDesc*) ni->param1;
- for (int i = 0; i < len; i++)
- {
- ad->array[i] = AllocItem();
- *((__int64 *) &(ad->array[i]->param1)) = (__int64) buf[i];
- }
- ad->count = len;
- CleanupItems(item);
- item = ni;
- }
- break;
- }
- item->type = IT_CONST | type;
-}
-
-void SaveResult(ExpressionItem *var, ExpressionItem *result)
-{
- if ((var->type & ITEMTYPE) != IT_VARIABLE) return;
-
- // result should be stored at variable to
- int varindex = var->type & ITEMOPTIONS;
- switch (var->type & ITEMSUBTYPE)
- {
- case ITV_NSIS:
- {
- // store string result direct to NSIS variable
- char *ptr = g_variables + varindex*g_stringsize;
- ItemToString(ptr, result);
- }
- break;
- case ITV_USER:
- {
- CleanupItems(UserVars[varindex].item);
- UserVars[varindex].item = CopyItem(result);
- }
- break;
- case ITV_ARRITEM:
- {
- ExpressionItem *&ei = ((ArrayDesc*)(var->param1))->array[(int)var->param2];
- CleanupItems(ei);
- ei = CopyItem(result);
- }
- break;
- case ITV_STACK:
- {
- ExpressionItem *newitem = CopyItem(result);
- newitem->next = stack;
- stack = newitem;
- }
- break;
- case ITV_NSTACK:
- {
- char *buf = AllocString();
- ItemToString(buf, result);
- pushstring(buf);
- dbgGlobalFree(buf);
- }
- break;
- }
-}
-
-void RunAndGetConst(int from, ExpressionItem* &result, int type)
-{
- RunTree(*((ExpressionItem**)&(from)), result, type | RTO_NEEDCONST);
- ItemToType(result, type);
-}
-
-void RunTree(ExpressionItem *from, ExpressionItem* &result, int options)
-{
- ExpressionItem *item = from;
- result = NULL;
- while (item != NULL)
- {
- CleanupItems(result);
- int type = item->type & ITEMTYPE,
- subtype = item->type & ITEMSUBTYPE,
- ioptions = item->type & ITEMOPTIONS;
- switch (type)
- {
- case IT_EXPRESSION:
- RunTree(*((ExpressionItem**)&(item->param1)), result, options);
- break;
- case IT_CONST:
- result = CopyItem(item);
- break;
- case IT_VARIABLE:
- if (options & RTO_NEEDCONST)
- {
- // we need const result - :) is it nsis or common variable
- switch (subtype)
- {
- case ITV_NSIS:
- {
- // nsis
- result = AllocItem();
- char *variable = getuservariable(ioptions);
- StringToItem(variable, result, options);
- }
- break;
- case ITV_USER:
- {
- // usual variable
- if (UserVars[ioptions].item)
- result = CopyItem(UserVars[ioptions].item);
- else
- result = AllocItem();
- }
- break;
- case ITV_ARRITEM:
- {
- // array item
- ExpressionItem *ei = ((ArrayDesc*)(item->param1))->array[(int)item->param2];
- if (ei)
- result = CopyItem(ei);
- else
- result = AllocItem();
- }
- break;
- case ITV_STACK:
- {
- // pop from plugin stack
- result = stack;
- if (result == NULL) result = AllocItem();
- stack = result->next;
- result->next = NULL;
- }
- break;
- case ITV_NSTACK:
- {
- // NSIS stack
- char buffer[1024], *buf = buffer;
- result = AllocItem();
- popstring(buffer);
- StringToItem(buf, result, options);
- }
- break;
- }
- }
- else
- // if we don't need const - we will just pass variable record
- result = CopyItem(item);
- break;
- case IT_OPERATOR:
- {
- ExpressionItem *var = NULL, *item1 = NULL, *item2 = NULL;
- // prepare arguments in case of SET operator
- if (ioptions & PO_SET)
- {
- if ((item->param1) && (ioptions & PO_PRENONCONST))
- {
- RunTree(*((ExpressionItem**)&(item->param1)), var, 0);
- if (ioptions & PO_USESPRE)
- RunTree(var, item1, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
- } else
- if ((item->param2) && (ioptions & PO_POSTNONCONST))
- {
- RunTree(*((ExpressionItem**)&(item->param2)), var, 0);
- if (ioptions & PO_USESPOST)
- RunTree(var, item2, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
- }
- }
-
- // prepare arguments in case of any operator
- int needmore = 1;
- if ((!item1) && (item->param1) && (ioptions & PO_USESPRE))
- {
- RunTree(*((ExpressionItem**)&(item->param1)), item1, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
- // logical expressions && and || can make decision on first arg basis
- if ((subtype == ITO_LAND) || (subtype == ITO_LOR) )
- {
- ItemToType(item1, ITC_INT);
- int res = (int) *((__int64*) &(item1->param1));
- if (((res)&&(subtype==ITO_LOR)) || ((!res)&&(subtype==ITO_LAND)))
- needmore = 0;
- }
- }
-
- // get-reference operator
- if ((!item1) && (subtype == ITO_AND) && (!item2) && (item->param2))
- {
- RunTree(*((ExpressionItem**)&(item->param2)), result, 0);
- break;
- }
-
- if ((needmore) && (!item2) && (item->param2) && (ioptions & PO_USESPOST))
- RunTree(*((ExpressionItem**)&(item->param2)), item2, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
-
- // reference operator
- if ((!item1) && (subtype == ITO_MUL) && ((item2->type & ITEMTYPE) == (IT_VARIABLE)))
- {
- // ok, that's the result we need
- if (options & RTO_NEEDCONST)
- {
- RunTree(item2, result, options);
- CleanupItems(item2);
- } else
- result = item2;
- break;
- }
-
- __int64 i1=0, i2=0, i3=0, i4=0;
- if (((!item1)||((item1->type & ITEMTYPE)==IT_CONST)) &&
- ((!item2)||((item2->type & ITEMTYPE)==IT_CONST)))
- {
-
- // find the best type match for operation
- int it1 = (item1 && (ioptions & PO_USESPRE))?(item1->type & ITEMSUBTYPE):(ITC_UNKNOWN),
- it2 = (item2 && (ioptions & PO_USESPOST))?(item2->type & ITEMSUBTYPE):(ITC_UNKNOWN),
- type = (it1 < it2)?(it1):(it2);
-
- // convert operands to desired type
- ItemToType(item1, type);
- ItemToType(item2, type);
-
- switch (type)
- {
- case ITC_INT:
- {
- i1 = (item1)?(*((__int64*)&item1->param1)):(0);
- i2 = (item2)?(*((__int64*)&item2->param1)):(0);
-
- switch (subtype)
- {
- case ITO_MINUS: i1 -= i2; break; // unary minus auto handled with NULL
- case ITO_PLUS: i1 += i2; break;
- case ITO_SHL: i1 <<= i2; break;
- case ITO_SHR: i1 >>= i2; break;
- case ITO_MUL: i1 *= i2; break;
- case ITO_MOD:
- case ITO_DIV:
- if (i2 == 0) { i3 = 0; i4 = i1; }
- else { i3 = i1 / i2; i4 = i1 % i2; }
- if (subtype == ITO_DIV) i1 = i3; else i1 = i4;
- break;
- case ITO_SET: i1 = i2; break;
- case ITO_LE: i1 = (i1 <= i2); break;
- case ITO_GE: i1 = (i1 >= i2); break;
- case ITO_NE: i1 = (i1 != i2); break;
- case ITO_EQ: i1 = (i1 == i2); break;
- case ITO_LS: i1 = (i1 < i2); break;
- case ITO_GR: i1 = (i1 > i2); break;
- case ITO_AND: i1 = (i1 & i2); break;
- case ITO_OR: i1 = (i1 | i2); break;
- case ITO_XOR: i1 = (i1 ^ i2); break;
- case ITO_NOT: i1 = ~i2; break;
- case ITO_LNOT: i1 = !i2; break;
- case ITO_LAND: i1 = i1 && i2; break;
- case ITO_LOR: i1 = i1 || i2; break;
- case ITO_INC:
- if (item1) i2 = i1++;
- else i1 = ++i2;
- break;
- case ITO_DEC:
- if (item1) i2 = i1--;
- else i1 = --i2;
- break;
- }
- result = AllocItem();
- *((__int64*)&result->param1) = i1;
- }
- break;
- case ITC_FLOAT:
- {
- int ir = -666;
- double i1 = (item1)?(*((double*)&item1->param1)):(0.0);
- double i2 = (item2)?(*((double*)&item2->param1)):(0.0);
-
- switch (subtype)
- {
- case ITO_MINUS: i1 -= i2; break; // unary minus auto handled with NULL
- case ITO_PLUS: i1 += i2; break;
- case ITO_MUL: i1 *= i2; break;
- case ITO_DIV: i1 /= i2; break;
- case ITO_SET: i1 = i2; break;
- case ITO_LE: ir = (i1 <= i2); break;
- case ITO_GE: ir = (i1 >= i2); break;
- case ITO_NE: ir = (i1 != i2); break;
- case ITO_EQ: ir = (i1 == i2); break;
- case ITO_LS: ir = (i1 < i2); break;
- case ITO_GR: ir = (i1 > i2); break;
- }
- result = AllocItem();
- if (ir == -666)
- {
- // if ir value left intact - result is double
- result->type = IT_CONST | ITC_FLOAT;
- *((double*)&result->param1) = i1;
- } else
- *((__int64*)&result->param1) = (__int64) ir;
- }
- break;
- case ITC_STRING:
- {
- int ir = -666;
- char *i1 = (item1)?((char*)item1->param1):(NULL);
- char *i2 = (item2)?((char*)item2->param1):(NULL);
- int sc = (i1 && i2)?(lstrcmp(i1, i2)):((i1)?(1):((i2)?(-1):(0)));
-
- switch (subtype)
- {
- case ITO_PLUS: lstrcat(i1, i2); break;
- case ITO_SET: i1 = i2; break;
- case ITO_LE: ir = (sc <= 0); break;
- case ITO_GE: ir = (sc >= 0); break;
- case ITO_NE: ir = (sc != 0); break;
- case ITO_EQ: ir = (sc == 0); break;
- case ITO_LS: ir = (sc < 0); break;
- case ITO_GR: ir = (sc > 0); break;
- }
- if (ir == -666)
- {
- result = CopyItem((item1)?(item1):(item2));
- } else
- {
- result = AllocItem();
- *((__int64*)&result->param1) = (__int64) ir;
- }
- }
- break;
- case ITC_ARRAY:
- result = CopyItem(item2);
- break;
- }
-
- } // check for both items constant
- // the other case - usually UniaryPre operators working with non constants
- else result = CopyItem(item2);
-
- if (ioptions & PO_SET)
- {
- // Save our result in output variable
- SaveResult(var, result);
- }
-
- // Actual value to be returned as result is at i2 for ++ and -- ops
- if ((subtype == ITO_DEC) || (subtype == ITO_INC))
- *((__int64*)&result->param1) = i2;
-
- CleanupItems(item1); CleanupItems(item2); CleanupItems(var);
- }
- break;
- case IT_LOGIC:
- {
- int ifmode = (subtype == ITL_IF);
- ExpressionItem *ifbr = *((ExpressionItem**)&(item->param1)),
- *dobr = *((ExpressionItem**)&(item->param2)),
- *thbr = NULL, *elbr = NULL;
- // check do branche for existance
- if (dobr && ifmode)
- {
- // then...
- thbr = *((ExpressionItem**)&(dobr->param1));
- // ... and else branches
- if (dobr->next) elbr = *((ExpressionItem**)&(dobr->next->param1));
- }
- while (true)
- {
- RunAndGetConst((int) ifbr, result, ITC_INT);
- if (ifmode)
- {
- // we need then or else branch?
- if ((*((__int64*)&result->param1))) dobr = thbr;
- else dobr = elbr;
- } else
- {
- // while mode
- if (!(*((__int64*)&result->param1))) break;
- }
- // ok, run the approtiate branch of if statement (if available)
- if (dobr)
- {
- CleanupItems(result);
- RunTree(dobr, result, options);
- }
- if (ifmode) break;
- CleanupItems(result);
- }
- }
- break;
- case IT_FUNCTION:
- if (subtype == ITF_USER)
- {
- int i;
- UserFunc *f = &(UserFuncs[ioptions]);
- int flags = f->varflags;
- ExpressionItem *ip = *((ExpressionItem**)&(item->param1));
- ExpressionItem *si = AllocItem(), *var = AllocItem();
- ExpressionItem *vals[32];
- si->type = IT_VARIABLE | ITV_STACK;
- for (i = 0; i < f->varsnum; i++)
- {
- // push every variable
- ExpressionItem *val;
- var->type = (IT_VARIABLE | ITV_USER) + f->vars[i];
- RunTree(var, val, RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
- SaveResult(si, val);
- CleanupItems(val);
- // calculate argument value and for future
- if (ip)
- {
- if (flags&1)
- {
- // var ptr required
- RunTree(*((ExpressionItem**)&(ip->param1)), vals[i], 0);
- } else
- {
- RunTree(*((ExpressionItem**)&(ip->param1)), vals[i], RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
- }
- ip = ip->next;
- } else vals[i] = AllocItem();
-
- flags >>= 1;
- }
-
- // now when all values got we could save them to variables
- for (i = 0; i < f->varsnum; i++)
- {
- var->type = (IT_VARIABLE | ITV_USER) + f->vars[i];
- SaveResult(var, vals[i]);
- CleanupItems(vals[i]);
- }
-
-
- // ok, call the func
- RunTree(f->root, result, RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
-
- // pop original params
- for (i = f->varsnum-1; i >= 0; i--)
- {
- // pop every variable
- ExpressionItem *val;
- var->type = (IT_VARIABLE | ITV_USER) + f->vars[i];
- RunTree(si, val, RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
- SaveResult(var, val);
- CleanupItems(val);
- }
-
- // free used items
- CleanupItems(si); CleanupItems(var);
- } else if (subtype == ITF_TYPE)
- {
- int newtype = (int) MathFunctions[ioptions].fptr;
- if (newtype < ITC_UNKNOWN)
- {
- // get as possibly close to ready expression
- RunAndGetConst((int)item->param1, result, newtype);
- if (ioptions == ITFT_CARRAY_ID)
- CopyArray(result);
- } else if (newtype == FTT_FLOATF)
- {
- // float format function
- ExpressionItem *arg1, *arg2;
- RunAndGetConst((int)item->param1, arg1, ITC_FLOAT);
- double value = *((double*)&(arg1->param1));
- RunAndGetConst((int)item->param2, arg2, ITC_INT);
- int format = (int) *((__int64*)&(arg2->param1));
-
- result = AllocItem();
- result->type = IT_CONST | ITC_STRING;
- result->param1 = (EIPARAM) AllocString();
- FloatFormat((char*) result->param1, value, format);
- CleanupItems(arg1); CleanupItems(arg2);
- } else if (newtype == FTT_LEN)
- {
- // length function
- RunTree(*((ExpressionItem **) &(item->param1)), result, RTO_NEEDCONST | ITC_STRING | ITC_ARRAY);
- if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_ARRAY))
- {
- int len = ((ArrayDesc*)(result->param1))->count;
- CleanupItems(result);
- result = AllocItem();
- *((__int64*)&(result->param1)) = (__int64) len;
- break;
- } else
- if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) != (IT_CONST|ITC_STRING))
- ItemToType(result, ITC_STRING);
-
- if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_STRING))
- {
- // ok, that's string
- int len = lstrlen((char*)result->param1);
- dbgGlobalFree((HGLOBAL) result->param1);
- *((__int64*)&(result->param1)) = (__int64) len;
- result->type = IT_CONST | ITC_INT;
- } else CleanupItems(result);
- } else
- {
- // only one left - c() - char/int/char conversion
- RunTree(*((ExpressionItem **) &(item->param1)), result, RTO_NEEDCONST | ITC_STRING | ITC_INT);
- if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_STRING))
- {
- // ok, that's string - convert first char to int
- int chr = (*((char*)result->param1)) & 0xFF;
- dbgGlobalFree((HGLOBAL) result->param1);
- *((__int64*)&(result->param1)) = (__int64) chr;
- result->type = IT_CONST | ITC_INT;
- break;
- }
- if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_INT))
- {
- // ok, that's int - convert to new string (char+0)
- int chr = (int) (*((__int64*)&(result->param1))) & 0xFF;
- result->param1 = (EIPARAM) AllocString();
- *((char*)result->param1) = (char) chr;
- *((char*)(result->param1+1)) = (char) 0;
- result->type = IT_CONST | ITC_STRING;
- break;
- } else CleanupItems(result);
- }
- } else
- {
- // oops :-o function call :)
- RunAndGetConst((int)item->param1, result, ITC_FLOAT);
- double &value = *((double*)&(result->param1));
- if (subtype == ITF_MATH1)
- {
- // Built-In math function with 1 arg
- value = MathFunctions[ioptions].fptr(value);
- } else
- if (subtype == ITF_MATH2)
- {
- // Built-In math function with 2 args
- if (ioptions >= MATHFUNCNUM-2)
- {
- // specific function - we need second arg as out
- ExpressionItem *arg2, *res2 = AllocItem();
- RunTree(*((ExpressionItem**)&(item->param2)), arg2, 0);
- if (ioptions == MATHFUNCNUM-1)
- {
- // fmodf function - second arg is ptr to double
- res2->type = IT_CONST | ITC_FLOAT;
- double &v = *((double*)&(res2->param1));
- value = ((Math2dFuncPtr)(MathFunctions[ioptions].fptr))(value, &v);
- } else
- {
- // frexp function - second arg is ptr to int
- int v = 0;
- value = ((Math2iFuncPtr)(MathFunctions[ioptions].fptr))(value, &v);
- *((__int64 *)&(res2->param1)) = (__int64) v;
- }
- SaveResult(arg2, res2);
- CleanupItems(arg2); CleanupItems(res2);
- } else
- {
- // normal 2-arg math function
- ExpressionItem *arg2;
- RunAndGetConst((int)item->param2, arg2, ITC_FLOAT);
- double value2 = *((double*)&(arg2->param1));
- value = ((Math2FuncPtr)(MathFunctions[ioptions].fptr))(value, value2);
- CleanupItems(arg2);
- }
- }
- }
- break;
- case IT_ARRAY:
- {
- // currently only array access is used
- ExpressionItem *index, *aritem;
- RunTree(*((ExpressionItem **) &(item->param1)), aritem, RTO_NEEDCONST | ITC_STRING | ITC_ARRAY);
-
- if ((aritem->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST | ITC_STRING))
- {
- // argument is string
- char *str = (char*)(aritem->param1);
- int len = lstrlen(str);
- // have we two indexes or one?
- if ((*((ExpressionItem **) &(item->param2)))->type != IT_EXPRESSION)
- {
- // one index - user need a char
- RunAndGetConst((int)item->param2, index, ITC_INT);
-
- int pos = (int) *((__int64*)&(index->param1));
- if (pos < 0) pos += len; // -index - means from end
- if ((pos > len) || (pos < 0))
- *str = 0; // index is accross string boundaries
- else
- {
- // new string - just a single char
- *str = *(str+pos);
- *(str+1) = 0;
- }
- } else
- {
- // two indexes
- ExpressionItem *index2;
- // if first index is skipped -> 0 (from first char)
- if ((*((ExpressionItem **) &(item->param2)))->param1 == 0)
- index = AllocItem();
- else
- RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->param1, index, ITC_INT);
- if ((*((ExpressionItem **) &(item->param2)))->next->param1 == 0)
- {
- // if second index is skipped -> -1 (till last char)
- index2 = AllocItem();
- *((__int64*)&(index2->param1)) = -1;
- }
- else
- RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->next->param1, index2, ITC_INT);
-
- // ok, we've got two indexes
- int pos1 = (int) *((__int64*)&(index->param1));
- int pos2 = (int) *((__int64*)&(index2->param1));
- if (pos1 < 0) pos1 += len; // -index - means from end
- if (pos2 < 0) pos2 += len; // -index - means from end
- // limit start/stop positions
- if (pos1 < 0) pos1 = 0;
- if (pos2 < 0) pos2 = 0;
- if (pos1 > len) pos1 = len;
- if (pos2 >= len) pos2 = len-1;
-
- // copy string part
- char* lpos = str + (pos2-pos1);
- while (str <= lpos)
- {
- *str = *(str + pos1);
- str++;
- }
- // null-termiante
- *str = 0;
-
- CleanupItems(index2);
- }
-
- } else
- {
- // argument is array
- RunAndGetConst((int)item->param2, index, ITC_INT);
-
- // convert array pointer to array item pointer
- aritem->type = IT_VARIABLE | ITV_ARRITEM;
- aritem->param2 = (EIPARAM) *((__int64*)&(index->param1));
-
- ArrayDesc *ad = (ArrayDesc*)aritem->param1;
- if (((int)aritem->param2) >= ad->count)
- {
- ad->count = ((int)aritem->param2)+1;
- while (ad->count > ad->size)
- {
- // resize array
- ExpressionItem **oldei = ad->array;
- ad->array = (ExpressionItem**) dbgGlobalAlloc(GPTR, 2*ad->size*sizeof(ExpressionItem*));
- for (int i = 0; i < ad->size; i++)
- ad->array[i] = oldei[i];
- ad->size*=2;
- dbgGlobalFree(oldei);
- }
- }
- }
-
- CleanupItems(index);
-
- // we need constant result?
- if (options & RTO_NEEDCONST)
- {
- RunTree(aritem, result, options);
- CleanupItems(aritem);
- } else result = aritem;
- }
- break;
- }
- item = item->next;
- }
-}
-
-extern "C"
-void __declspec(dllexport) Script(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- Math_INIT();
- char *buffer = AllocString(), *buf = buffer;
- ExpressionItem *root = NULL; // root of current tree
-
- // pop script string
- popstring(buffer);
-
- // parse it
- ParseString(buf, root);
-
-#ifdef _DEBUG
- // dump
- PrintTree(root, buffer);
-#endif
-
- ExpressionItem *result;
- RunTree(root, result, 0);
- CleanupItems(result);
-
- CleanupItems(root);
- dbgGlobalFree((HGLOBAL) buffer);
-}
-
-double _infinity;
-extern "C" void _fpreset();
-
-void CleanAll(int init)
-{
- if (init)
- {
- unsigned char _infinity_base[8] = {0, 0, 0, 0, 0, 0, 0xf0, 0x7f};
- _fltused = 0;
- _infinity = *((double*)(_infinity_base));
- _fpreset();
-
- stack = NULL;
- UserVarsCount = 0;
- UserFuncsCount = 0;
- } else
- {
- int i;
- // cleanup stack
- CleanupItems(stack); stack = NULL;
- // cleanup user vars
- for (i = 0; i < UserVarsCount; i++)
- CleanupItems(UserVars[i].item);
- // cleanup user funcs
- for (i = 0; i < UserFuncsCount; i++)
- CleanupItems(UserFuncs[i].root);
- UserVarsCount = 0;
- UserFuncsCount = 0;
-
- dbgGlobalCheck();
- }
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- CleanAll(ul_reason_for_call == DLL_PROCESS_ATTACH);
- return TRUE;
-}
-
+#include <windows.h>
+#include "MyMath.h"
+#include "Math.h"
+
+extern "C" int _fltused;
+
+#ifdef __MINGW32__
+int _fltused = 1;
+#endif
+
+ExpressionItem *stack;
+
+int UserVarsCount, UserFuncsCount;
+UserVar UserVars[MAX_USER_VARS];
+UserFunc UserFuncs[MAX_USER_FUNCS];
+
+void PrintTree(ExpressionItem *root, char *str);
+void ParseString(char *&sp, ExpressionItem* &itemplace);
+void CleanupItems(ExpressionItem* &itemplace);
+void PlaceVariable(char *&vb, ParseInfo *pi);
+
+void PlaceNewItem(char *&vb, ParseInfo *pi, int precedence)
+{
+ ExpressionItem *newroot;
+ PlaceVariable(vb, pi);
+ if (pi->item == NULL) return;
+
+ while ((pi->OpsStack) && ((((int) pi->OpsStack->param2) < precedence)
+ || ((((int)pi->OpsStack->param2) == precedence)
+ && (precedence != OPERATOR_SET_PRECEDENCE))))
+ {
+ // second operand for our operator
+ newroot = pi->OpsStack;
+ *((ExpressionItem **)&(newroot->param2)) = pi->item;
+ pi->OpsStack = newroot->next;
+ newroot->next = NULL;
+ pi->item = newroot;
+ }
+ // finally we have got new root
+ newroot = pi->item;
+
+ if (pi->SetupNewRoot)
+ {
+ (*pi->root)->next = newroot;
+ pi->root = &((*pi->root)->next);
+ pi->SetupNewRoot = 0;
+ }
+ if (*pi->place == *pi->root) *pi->place = *pi->root = newroot;
+ else *pi->root = newroot;
+ // no item at our pockets
+ pi->item = NULL;
+}
+
+#define NSIS_VARS_COUNT 27
+#define NSIS_VARS_STACK 25
+#define NSIS_VARS_NSTACK 26
+
+typedef char smallstr[2];
+const smallstr NSISVariablesNames[NSIS_VARS_COUNT] = {{'r','0'}, {'r','1'}, {'r','2'}, {'r','3'}, {'r','4'}, {'r','5'}, {'r','6'}, {'r','7'}, {'r','8'}, {'r','9'},
+{'R','0'}, {'R','1'}, {'R','2'}, {'R','3'}, {'R','4'}, {'R','5'}, {'R','6'}, {'R','7'}, {'R','8'}, {'R','9'},
+{'C','L'}, {'I','D'}, {'O','D'}, {'E','D'}, {'L','G'}, {'S',0}, {'N','S'}};
+
+ExpressionItem *FindVariable(char *varname)
+{
+ int i;
+
+ ExpressionItem *item = AllocItem();
+ // check NSIS variables
+ for (i = 0; i < NSIS_VARS_COUNT; i++)
+ {
+ if (lstrcmpn(varname, NSISVariablesNames[i],2) == 0)
+ {
+ if (i == NSIS_VARS_STACK) item->type = IT_VARIABLE | ITV_STACK;
+ else if (i == NSIS_VARS_NSTACK) item->type = IT_VARIABLE | ITV_NSTACK;
+ else
+ item->type = (IT_VARIABLE | ITV_NSIS) + i;
+ return item;
+ }
+ }
+ // no.. that's user variable
+ for (i = 0; i < UserVarsCount; i++)
+ {
+ if (lstrcmp(varname, UserVars[i].name) == 0)
+ {
+ // ok. we found user var expression needed
+ break;
+ }
+ }
+ if (i == UserVarsCount)
+ {
+ // new variable
+ UserVarsCount++;
+ lstrcpy(UserVars[i].name, varname);
+ UserVars[i].item = NULL;
+ }
+ item->type = (IT_VARIABLE | ITV_USER) + i;
+ return item;
+}
+
+void PlaceVariable(char *&vb, ParseInfo *pi)
+{
+ if (vb <= pi->valbuf) return;
+ *vb = 0;
+ pi->item = FindVariable(pi->valbuf);
+ vb = pi->valbuf;
+}
+
+typedef double (*math_d2)(double, double);
+typedef double (*math_ddp)(double, double*);
+typedef double (*math_di)(double, int*);
+
+#define MATHFUNCNUM 29
+const MathFunction MathFunctions[MATHFUNCNUM] = {
+ {{'s','i','n'}, ITF_MATH1 >> 8, sin},
+ {{'s','n','h'}, ITF_MATH1 >> 8, sinh},
+ {{'a','s','n'}, ITF_MATH1 >> 8, asin},
+ {{'c','o','s'}, ITF_MATH1 >> 8, cos},
+ {{'c','s','h'}, ITF_MATH1 >> 8, cosh},
+ {{'a','c','s'}, ITF_MATH1 >> 8, acos},
+ {{'t','a','n'}, ITF_MATH1 >> 8, tan},
+ {{'t','n','h'}, ITF_MATH1 >> 8, tanh},
+ {{'a','t','n'}, ITF_MATH1 >> 8, atan},
+ {{'a','b','s'}, ITF_MATH1 >> 8, fabs},
+ {{'l','n',0}, ITF_MATH1 >> 8, log},
+ {{'l','o','g'}, ITF_MATH1 >> 8, log10},
+ {{'e','x','p'}, ITF_MATH1 >> 8, exp},
+ {{'s','q','t'}, ITF_MATH1 >> 8, sqrt},
+ {{'c','e','l'}, ITF_MATH1 >> 8, ceil},
+ {{'f','l','r'}, ITF_MATH1 >> 8, floor},
+
+ {{'a','t','2'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)atan2},
+ {{'p','o','w'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)pow},
+ {{'f','m','d'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_d2)fmod},
+
+ // type conversions
+ {{'i',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_INT},
+ {{'s',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_STRING},
+ {{'f',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_FLOAT},
+ {{'a',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_ARRAY},
+#define ITFT_CARRAY_ID 23
+ {{'c','a',0}, ITF_TYPE >> 8, (Math1FuncPtr)ITC_ARRAY},
+ {{'f','f',0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_FLOATF},
+ {{'l',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_LEN},
+ {{'c',0,0}, ITF_TYPE >> 8, (Math1FuncPtr)FTT_CHAR},
+
+ {{'f','e','x'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_di)frexp},
+ {{'m','d','f'}, ITF_MATH2 >> 8, (Math1FuncPtr)(math_ddp)modf},
+};
+
+void PlaceFunction(char *&vb, char *&sp, ParseInfo *pi, int redefine)
+{
+ int i;
+ ExpressionItem *item = pi->item = AllocItem();
+ *vb = 0;
+
+ // check BUILTIN functions
+ for (i = 0; i < MATHFUNCNUM; i++)
+ {
+ if (lstrcmpn(pi->valbuf, MathFunctions[i].name, 3) == 0)
+ {
+ item->type = IT_FUNCTION | (MathFunctions[i].type << 8) | i;
+ // get first argument
+ sp++;
+ ParseString(sp, *((ExpressionItem **)(&item->param1)));
+ if (*sp == ',')
+ {
+ // get second argument
+ sp++;
+ ParseString(sp, *((ExpressionItem **)(&item->param2)));
+ }
+ sp++; vb = pi->valbuf;
+ return;
+ }
+ }
+
+ // heh, may be it user function
+ for (i = 0; i < UserFuncsCount; i++)
+ {
+ if (lstrcmp(pi->valbuf, UserFuncs[i].name) == 0)
+ {
+ // Function found? Redefine option specified?
+ if (redefine) break;
+
+ item->type = IT_FUNCTION | ITF_USER | i;
+ // get arguments list
+ ExpressionItem **newplace = ((ExpressionItem **)(&pi->item->param1));
+ while (*sp != ')')
+ {
+ *newplace = AllocItem();
+ (*newplace)->type = IT_EXPRESSION;
+ sp++;
+ ParseString(sp, *((ExpressionItem **)(&(*newplace)->param1)));
+ newplace = &((*newplace)->next);
+ }
+ sp++; vb = pi->valbuf;
+ return;
+ }
+ }
+
+ // oops, we need no item for function defenition
+ CleanupItems(item); pi->item = NULL;
+
+ // it's user function define
+ int flags = 0;
+ char buffer[128], *buf = buffer;
+
+ // workaround for redefine flag - if the function already present,
+ // it will be cleared and redefined
+ UserFunc *f = &UserFuncs[i];
+ if (i == UserFuncsCount) UserFuncsCount++;
+ else CleanupItems(f->root);
+
+ lstrcpy(f->name, pi->valbuf);
+ f->varflags = 0;
+ f->varsnum = 0;
+ do
+ {
+ sp++;
+ switch (*sp)
+ {
+ case ' ':
+ break;
+ case ',':
+ case ')':
+ if (buf > buffer)
+ {
+ *buf = 0;
+ // it should be user variable
+ ExpressionItem *it = FindVariable(buffer);
+ f->vars[f->varsnum++] = (it->type) & ITEMOPTIONS;
+ CleanupItems(it);
+ buf = buffer;
+ flags <<= 1;
+ }
+ break;
+ case '&':
+ flags |= 1;
+ break;
+ default:
+ *(buf++) = *sp;
+ break;
+ }
+ }
+ while (*sp != ')');
+
+ // prepare flag for fast analisys
+ for (i = 0; i < f->varsnum; i++)
+ {
+ f->varflags <<= 1;
+ flags >>= 1;
+ f->varflags |= flags&1;
+ }
+
+ // find nearest round bracket - function body
+ while (*sp != '(' && *sp) sp++;
+ if (!*sp)
+ return;
+ sp++;
+
+ // now we are ready to parse function body
+ ParseString(sp, f->root);
+ sp++; // closing bracket
+ vb = pi->valbuf;
+
+#ifdef _DEBUG
+ // dump function (in debug mode)
+ char place[1024];
+ wsprintf(place, "function %s(", f->name);
+ flags = f->varflags;
+ for (i = 0; i < f->varsnum; i++)
+ {
+ if (flags&1) lstrcat(place, "&");
+ lstrcat(place, UserVars[f->vars[i]].name);
+ if (i < f->varsnum-1) lstrcat(place, ", ");
+ flags >>= 1;
+ }
+ lstrcat(place, ")");
+ PrintTree(f->root, place);
+#endif
+}
+
+// operator options
+#define PO_UNARYPRE 0x1 // this operator can be uniary pre (--a) for ex
+#define PO_UNARYPOST 0x2 // this op can be uniary post (a++) (couldn't be binary)
+#define PO_PRENONCONST 0x4 // pre argument (a = b) -> a is non const
+#define PO_POSTNONCONST 0x8 // post argument (b--) is non const
+#define PO_LASTOP 0x10 // op should be the last item at expression (=, -=, etc)
+#define PO_SET 0x20 // op will set new value to one of args
+#define PO_USESPRE 0x40 // operator will use pre operand
+#define PO_USESPOST 0x80 // operator will use post operan
+
+void PlaceOp(char *&vb, int type, int precedence, ParseInfo *pi)
+{
+ PlaceVariable(vb, pi);
+ if ((type & PO_UNARYPRE) && (!pi->item))
+ {
+ // uniary pre op
+ ExpressionItem *item = AllocItem();
+ item->type = type;
+ item->param2 = (EIPARAM) precedence;
+ item->next = pi->OpsStack;
+ pi->OpsStack = item;
+ }
+ else
+ {
+ // get previous tree as items and operators of lower precedence
+ PlaceNewItem(vb, pi, precedence);
+ // post operators
+ ExpressionItem *item = AllocItem();
+ item->type = type;
+ item->param1 = (EIPARAM) (*pi->root);
+
+ if (*pi->place == *pi->root) *pi->place = *pi->root = NULL;
+ else *pi->root = NULL;
+
+ if (type & PO_UNARYPOST)
+ {
+ // uniary post op
+ pi->item = item;
+ } else
+ {
+ // binary operator
+ item->param2 = (EIPARAM) precedence;
+ item->next = pi->OpsStack;
+ pi->OpsStack = item;
+ }
+ }
+}
+
+#define OPSNUM 35
+const OpStruct Operators[OPSNUM] =
+{
+// three byte ops
+{{'>','>','='}, 14, ITO_SHR | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{{'<','<','='}, 14, ITO_SHL | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+
+// two byte ops
+// !!! don't forget to change Set Operator Precedence !!!
+{"-=", 14, ITO_MINUS | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"+=", 14, ITO_PLUS | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"/=", 14, ITO_DIV | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"*=", 14, ITO_MUL | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"|=", 14, ITO_OR | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"&=", 14, ITO_AND | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"^=", 14, ITO_XOR | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"%=", 14, ITO_MOD | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPRE | PO_USESPOST},
+{"--", 2, ITO_DEC | PO_POSTNONCONST | PO_PRENONCONST | PO_UNARYPRE | PO_UNARYPOST | PO_SET | PO_USESPRE | PO_USESPOST},
+{"++", 2, ITO_INC | PO_POSTNONCONST | PO_PRENONCONST | PO_UNARYPRE | PO_UNARYPOST | PO_SET | PO_USESPRE | PO_USESPOST},
+{">>", 6, ITO_SHR | PO_USESPRE | PO_USESPOST},
+{"<<", 6, ITO_SHL | PO_USESPRE | PO_USESPOST},
+
+// logical
+{"&&", 12, ITO_LAND | PO_USESPRE | PO_USESPOST},
+{"||", 13, ITO_LOR | PO_USESPRE | PO_USESPOST},
+
+// comparisons
+{"<=", 7, ITO_LE | PO_USESPRE | PO_USESPOST},
+{"=<", 7, ITO_LE | PO_USESPRE | PO_USESPOST},
+{">=", 7, ITO_GE | PO_USESPRE | PO_USESPOST},
+{"=>", 7, ITO_GE | PO_USESPRE | PO_USESPOST},
+{"!=", 8, ITO_NE | PO_USESPRE | PO_USESPOST},
+{"==", 8, ITO_EQ | PO_USESPRE | PO_USESPOST},
+
+// single byte ops
+// !!! don't forget to change Set Operator Precedence !!!
+{"=", 14, ITO_SET | PO_PRENONCONST | PO_LASTOP | PO_SET | PO_USESPOST},
+{"+", 5, ITO_PLUS | PO_USESPRE | PO_USESPOST},
+{"-", 5, ITO_MINUS | PO_USESPRE | PO_USESPOST | PO_UNARYPRE},
+{"*", 4, ITO_MUL | PO_USESPRE | PO_USESPOST | PO_UNARYPRE},
+{"/", 4, ITO_DIV | PO_USESPRE | PO_USESPOST},
+{"%", 4, ITO_MOD | PO_USESPRE | PO_USESPOST},
+{"<", 7, ITO_LS | PO_USESPRE | PO_USESPOST},
+{">", 7, ITO_GR | PO_USESPRE | PO_USESPOST},
+{"&", 9, ITO_AND | PO_USESPRE | PO_USESPOST | PO_UNARYPRE},
+{"|", 11, ITO_OR | PO_USESPRE | PO_USESPOST},
+{"^", 10, ITO_XOR | PO_USESPRE | PO_USESPOST},
+{"~", 3, ITO_NOT | PO_USESPOST | PO_UNARYPRE},
+{"!", 3, ITO_LNOT |PO_USESPOST | PO_UNARYPRE}
+};
+
+void CheckForOperator(char *&sp, char *&vb, ParseInfo *pi)
+{
+ for (int op = 0; op < OPSNUM; op++)
+ {
+ int c = lstrlen(Operators[op].name);
+ if (c > 3) c = 3; // real operator length
+ if (lstrcmpn(sp, Operators[op].name, c))
+ {
+ // wrong - different op
+ continue;
+ }
+ // that is our op
+ sp += c;
+ PlaceOp(vb, ((int) Operators[op].type) | IT_OPERATOR, Operators[op].precedence, pi);
+ break;
+ }
+}
+
+void ParseString(char *&sp, ExpressionItem* &itemplace)
+{
+ ParseInfo pi = {0, NULL, NULL, &itemplace, &itemplace};
+
+ int redefine = 0;
+ char *vb = pi.valbuf;
+ // cycle until current expression end
+ while ((*sp != 0) && (*sp != ')') && (*sp != '}') &&
+ (*sp != ']') && (*sp != ','))
+ {
+ int processed = 1;
+ switch (*sp)
+ {
+ case ' ':
+ case '\t':
+ sp++;
+ break;
+ case ';':
+ // expression delimeter
+ PlaceNewItem(vb, &pi, 255);
+ if (*pi.root) pi.SetupNewRoot = 1;
+ sp++;
+ break;
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ // variable & function names could contain numbers as non first chars
+ if (vb > pi.valbuf)
+ {
+ processed = FALSE;
+ break;
+ }
+ case '\'': case '\"': case '`':
+ // constant meet
+ pi.item = AllocItem();
+ StringToItem(sp, pi.item, STI_STRING | STI_FLOAT | STI_INT);
+ break;
+
+ case '(': // start of function or expression
+ if (vb > pi.valbuf)
+ {
+ // thats function
+ PlaceFunction(vb, sp, &pi, redefine);
+ } else
+ {
+ // expression
+ sp++;
+ ParseString(sp, pi.item);
+ if (*sp == ')') sp++;
+ }
+ redefine = 0;
+ break;
+
+ case '#': // start of one of logical expresions
+ sp++;
+ if ((*sp != '[') && (*sp != '{'))
+ {
+ // function redefine flag
+ redefine = 1;
+ break;
+ }
+ {
+ pi.item = AllocItem();
+ // IF or WHILE
+ pi.item->type = ((*sp == '[')?(IT_LOGIC | ITL_IF):(IT_LOGIC | ITL_WHILE));
+ // first expr - logic statement
+ sp++;
+
+ ParseString(sp, *((ExpressionItem **)(&pi.item->param1)));
+ // ok, second expr - then, third - else statement.. others???
+ ExpressionItem **newplace = ((ExpressionItem **)(&pi.item->param2));
+ while (*sp == ',')
+ {
+ *newplace = AllocItem();
+ (*newplace)->type = IT_EXPRESSION;
+ sp++;
+ ParseString(sp, *((ExpressionItem **)(&(*newplace)->param1)));
+ newplace = &((*newplace)->next);
+ }
+ }
+ sp++;
+ break;
+
+ case '[':
+ {
+ // thats array access
+ PlaceOp(vb, IT_ARRAY | ITA_ACCESS | PO_UNARYPOST, 1, &pi);
+ sp++;
+ // item index
+ ParseString(sp, *(ExpressionItem **)&(pi.item->param2));
+ if (*sp == ',')
+ {
+ // two indexes - string access
+ ExpressionItem *it = AllocItem();
+ it->type = IT_EXPRESSION;
+ it->param1 = (EIPARAM) *(ExpressionItem **)&(pi.item->param2);
+ *(ExpressionItem **)&(pi.item->param2) = it;
+ it = it->next = AllocItem();
+ it->type = IT_EXPRESSION;
+ sp++;
+ ParseString(sp, *((ExpressionItem **)(&it->param1)));
+ }
+ sp++;
+ }
+ break;
+
+ case '{': // start of array define
+ {
+ // array define - constists of array copy operator and array define itself
+
+ // type conversion item (to create a copy of array)
+ pi.item = AllocItem();
+ pi.item->type = IT_FUNCTION | ITF_TYPE | ITFT_CARRAY_ID | ITFA_COPY;
+
+ // during first create our array descriptor and array pointers
+ ExpressionItem *ai = AllocArray(DEFAULT_ARRAY_SIZE);
+ pi.item->param1 = (EIPARAM) ai;
+ ArrayDesc *ad = *((ArrayDesc**)&(ai->param1));
+
+ // parse array initializers
+ while (*sp != '}')
+ {
+ sp++;
+ ParseString(sp, ad->array[ad->count]);
+ if (ad->array[ad->count])
+ ad->count++;
+ }
+
+ sp++;
+ }
+ break;
+ case '-': case '+': case '<': case '=': case '>':
+ case '/': case '*': case '~': case '^': case '!':
+ case '&': case '|': case '%':
+ CheckForOperator(sp, vb, &pi);
+ break;
+
+ // non expression? ok, then it should be common char, like function or var name
+ default:
+ processed = FALSE;
+ break;
+ }
+ if (!processed) *(vb++) = *(sp++);
+ }
+ PlaceNewItem(vb, &pi, 255);
+}
+
+void CleanupArray(ArrayDesc *ad)
+{
+ if (!(--(ad->references)))
+ {
+ // last array reference, we could kill it
+ // cleanup array items
+ for (int i = 0; i < ad->count; i++)
+ {
+ ExpressionItem *aritem = ad->array[i];
+ if (aritem)
+ CleanupItems(aritem);
+ }
+ // cleanup ptrs and descriptor
+ dbgGlobalFree(ad->array);
+ dbgGlobalFree(ad);
+ }
+ }
+
+void CleanupItems(ExpressionItem* &itemplace)
+{
+ if (itemplace == NULL) return;
+ ExpressionItem *item = itemplace, *itemnext;
+ do
+ {
+ if (((item->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_VARIABLE|ITV_ARRITEM))
+ ||
+ ((item->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_ARRAY)))
+ {
+ CleanupArray((ArrayDesc *)item->param1);
+ }
+ else
+ if ((item->type & ITEMTYPE) == IT_CONST)
+ {
+ if ((item->type & ITEMSUBTYPE) == ITC_STRING)
+ dbgGlobalFree((HGLOBAL) item->param1);
+ } else
+ {
+ CleanupItems(*((ExpressionItem**) &item->param1));
+ CleanupItems(*((ExpressionItem**) &item->param2));
+ }
+ // free the item itself
+ itemnext = item->next;
+ dbgGlobalFree((HGLOBAL) item);
+ item = itemnext;
+ } while (item != NULL);
+ itemplace = NULL;
+}
+
+#ifdef _DEBUG
+HANDLE myfile;
+
+char *opsnames[] = {"", "-", "+", "<<", ">>", "*", "/", "=", "&&", "||", "++", "--",
+"=<", ">=", "!=", "==", "<", ">", "&", "%", "|", "^", "~", "!"};
+
+void PrintNode(int index, int spaces, ExpressionItem* itemplace)
+{
+ if (itemplace == NULL) return;
+
+ ExpressionItem *item = itemplace;
+ do
+ {
+ DWORD wrote;
+ char buffer[1024], *place = buffer;
+ for (int k = 0; k < spaces; k++)
+ *(place++) = 32;
+ *place = 0;
+
+ switch (item->type & ITEMTYPE)
+ {
+ case IT_EXPRESSION:
+ wsprintf(place, "Expression Place-Holder ");
+ break;
+ case IT_CONST:
+ switch (item->type & ITEMSUBTYPE)
+ {
+ case ITC_STRING:
+ wsprintf(place, "String: \"%s\"", (char *) item->param1);
+ break;
+ case ITC_INT:
+ wsprintf(place, "Int: ");
+ itoa64(*((__int64*)&(item->param1)), place+5);
+ break;
+ case ITC_FLOAT:
+ wsprintf(place, "Float: ");
+ FloatFormat(place+7, *((double*)&(item->param1)), 6);
+ break;
+ case ITC_ARRAY:
+ ArrayDesc *ad = (ArrayDesc*) item->param1;
+ wsprintf(place, "Array, ptr %08X, size %d, count %d, references %d",
+ ad->array, ad->size, ad->count, ad->references);
+ break;
+ }
+ strcat(place, " ");
+ break;
+ case IT_OPERATOR:
+ wsprintf(place, "Op: %s%s ", opsnames[(item->type & ITEMSUBTYPE) >> 8], (item->type & PO_SET)?("(=)"):(""));
+ break;
+ case IT_VARIABLE:
+ switch (item->type & ITEMSUBTYPE)
+ {
+ case ITV_NSIS:
+ {
+ char buffer[128];
+ buffer[0] = NSISVariablesNames[item->type & ITEMOPTIONS][0];
+ buffer[1] = NSISVariablesNames[item->type & ITEMOPTIONS][1];
+ buffer[2] = 0;
+ wsprintf(place, "Var: %s (%d) ",
+ buffer,
+ item->type & ITEMOPTIONS);
+ }
+ break;
+ case ITV_USER:
+ wsprintf(place, "Var: %s (%d) ", UserVars[item->type & ITEMOPTIONS].name, item->type & ITEMOPTIONS);
+ break;
+ case ITV_STACK:
+ wsprintf(place, "Plugin Stack ");
+ break;
+ case ITV_NSTACK:
+ wsprintf(place, "NSIS Stack ");
+ break;
+ }
+ break;
+ case IT_LOGIC:
+ if ((item->type & ITEMSUBTYPE) == ITL_IF)
+ wsprintf(place, "IF ");
+ else
+ wsprintf(place, "WHILE ");
+ break;
+ case IT_FUNCTION:
+ if (((item->type & ITEMSUBTYPE) == ITF_MATH1) ||
+ ((item->type & ITEMSUBTYPE) == ITF_MATH2) ||
+ ((item->type & ITEMSUBTYPE) == ITF_TYPE))
+ {
+ char buffer[128];
+ buffer[0] = (MathFunctions[item->type &ITEMOPTIONS].name)[0];
+ buffer[1] = (MathFunctions[item->type &ITEMOPTIONS].name)[1];
+ buffer[2] = (MathFunctions[item->type &ITEMOPTIONS].name)[2];
+ buffer[3] = 0;
+ wsprintf(place, "Built-In Function %s() [%d] ",
+ buffer,
+ item->type &ITEMOPTIONS);
+ }
+ else
+ {
+ UserFunc *f = &(UserFuncs[item->type & ITEMOPTIONS]);
+ wsprintf(place, "User Function: %s(", f->name);
+ int flags = f->varflags;
+ for (int i = 0; i < f->varsnum; i++)
+ {
+ if (flags&1) lstrcat(place, "&");
+ lstrcat(place, UserVars[f->vars[i]].name);
+ if (i < f->varsnum-1) lstrcat(place, ", ");
+ flags >>= 1;
+ }
+ lstrcat(place, ") ");
+ }
+ break;
+ case IT_ARRAY:
+ wsprintf(place, "Array access [] ");
+ break;
+ }
+ place += lstrlen(place);
+ wsprintf(place, "Addr: %08X Type: %08X Next: %08X Param1: %08X Param2: %08X", item, item->type, item->next, item->param1, item->param2);
+ lstrcat(place, "\n");
+ WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
+ if (((item->type & ITEMTYPE) != IT_CONST) && ((item->type & (ITEMTYPE|ITEMSUBTYPE)) != (IT_VARIABLE|ITV_ARRITEM)))
+ {
+ place = buffer;
+ for (int k = 0; k < spaces+2; k++)
+ *(place++) = 32;
+ int show = 0;
+ if (((item->param1 != NULL) && ((*((ExpressionItem**) &item->param1))->next != NULL)) ||
+ ((item->param2 != NULL) && ((*((ExpressionItem**) &item->param2))->next != NULL)))
+ show = 1;
+ if (show)
+ {
+ wsprintf(place, "Sub1:\n");
+ WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
+ }
+ PrintNode(1, spaces + 4, *((ExpressionItem**) &item->param1));
+ if (show)
+ {
+ wsprintf(place, "Sub2:\n");
+ WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
+ }
+ PrintNode(2, spaces + 4, *((ExpressionItem**) &item->param2));
+ } else if ((item->type & (ITEMSUBTYPE|ITEMTYPE)) == (ITC_ARRAY|IT_CONST))
+ {
+ ArrayDesc *ad = (ArrayDesc *) item->param1;
+ for (int i = 0; i < ad->count; i++)
+ {
+ ExpressionItem *aritem = ad->array[i];
+ if (aritem)
+ PrintNode(2, spaces + 4, aritem);
+ }
+ }
+ item = item->next;
+ } while (item != NULL);
+}
+
+void PrintTree(ExpressionItem *root, char *str)
+{
+ myfile = CreateFile("d:\\math.debug", GENERIC_ALL, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, 0);
+ SetFilePointer(myfile, 0, NULL, FILE_END);
+ char buffer[1024]; DWORD wrote;
+ wsprintf(buffer, "New tree for \'%s\'\n", str);
+ WriteFile(myfile, buffer, lstrlen(buffer), &wrote, NULL);
+
+ PrintNode(0, 4, root);
+ CloseHandle(myfile);
+ myfile = NULL;
+}
+#endif
+
+void CopyArray(ExpressionItem *&item)
+{
+ if (item == NULL) return;
+ // especial case - array to array conversion is requested array copy
+ ExpressionItem *olditem = item;
+ ArrayDesc *oad = (ArrayDesc *) (olditem->param1);
+ // Initialize the array of the same size
+ item = AllocArray(oad->size);
+ ArrayDesc *nad = (ArrayDesc *) (item->param1);
+ nad->count = oad->count;
+ // copy items
+ for (int i = 0; i < oad->count; i++)
+ nad->array[i] = CopyItem(oad->array[i], TRUE);
+ // cleanup old array pointer (may be array itself)
+ CleanupItems(olditem);
+}
+
+void ItemToType(ExpressionItem* &item, int type)
+{
+ char *buffer, *bp;
+ if (item == NULL) return;
+ int itemt = item->type & ITEMTYPE, oldtype = item->type & ITEMSUBTYPE;
+
+ if (((itemt == IT_CONST) && (oldtype == type))
+ || (itemt != IT_CONST)) return;
+
+ switch (type)
+ {
+ case ITC_STRING:
+ buffer = AllocString();
+ ItemToString(buffer, item);
+ item->param1 = (EIPARAM) buffer;
+ item->param2 = 0;
+ break;
+ case ITC_FLOAT:
+ if (oldtype == ITC_INT)
+ *((double *)&(item->param1)) = (double) *((__int64 *)&(item->param1));
+ else
+ {
+ bp = buffer = (char*) item->param1;
+ StringToItem(buffer, item, STI_FLOAT);
+ dbgGlobalFree(bp);
+ }
+ break;
+ case ITC_INT:
+ if (oldtype == ITC_FLOAT)
+ *((__int64 *)&(item->param1)) = (__int64) *((double *)&(item->param1));
+ else
+ {
+ bp = buffer = (char*) item->param1;
+ StringToItem(buffer, item, STI_INT);
+ dbgGlobalFree(bp);
+ }
+ break;
+ case ITC_ARRAY:
+ if (oldtype == ITC_STRING)
+ {
+ char *buf = (char*) item->param1;
+ int len = lstrlen(buf)+1;
+ ExpressionItem *ni = AllocArray(lstrlen(buf)+1);
+ ArrayDesc *ad = (ArrayDesc*) ni->param1;
+ for (int i = 0; i < len; i++)
+ {
+ ad->array[i] = AllocItem();
+ *((__int64 *) &(ad->array[i]->param1)) = (__int64) buf[i];
+ }
+ ad->count = len;
+ CleanupItems(item);
+ item = ni;
+ }
+ break;
+ }
+ item->type = IT_CONST | type;
+}
+
+void SaveResult(ExpressionItem *var, ExpressionItem *result)
+{
+ if ((var->type & ITEMTYPE) != IT_VARIABLE) return;
+
+ // result should be stored at variable to
+ int varindex = var->type & ITEMOPTIONS;
+ switch (var->type & ITEMSUBTYPE)
+ {
+ case ITV_NSIS:
+ {
+ // store string result direct to NSIS variable
+ char *ptr = g_variables + varindex*g_stringsize;
+ ItemToString(ptr, result);
+ }
+ break;
+ case ITV_USER:
+ {
+ CleanupItems(UserVars[varindex].item);
+ UserVars[varindex].item = CopyItem(result);
+ }
+ break;
+ case ITV_ARRITEM:
+ {
+ ExpressionItem *&ei = ((ArrayDesc*)(var->param1))->array[(int)var->param2];
+ CleanupItems(ei);
+ ei = CopyItem(result);
+ }
+ break;
+ case ITV_STACK:
+ {
+ ExpressionItem *newitem = CopyItem(result);
+ newitem->next = stack;
+ stack = newitem;
+ }
+ break;
+ case ITV_NSTACK:
+ {
+ char *buf = AllocString();
+ ItemToString(buf, result);
+ pushstring(buf);
+ dbgGlobalFree(buf);
+ }
+ break;
+ }
+}
+
+void RunAndGetConst(int from, ExpressionItem* &result, int type)
+{
+ RunTree(*((ExpressionItem**)&(from)), result, type | RTO_NEEDCONST);
+ ItemToType(result, type);
+}
+
+void RunTree(ExpressionItem *from, ExpressionItem* &result, int options)
+{
+ ExpressionItem *item = from;
+ result = NULL;
+ while (item != NULL)
+ {
+ CleanupItems(result);
+ int type = item->type & ITEMTYPE,
+ subtype = item->type & ITEMSUBTYPE,
+ ioptions = item->type & ITEMOPTIONS;
+ switch (type)
+ {
+ case IT_EXPRESSION:
+ RunTree(*((ExpressionItem**)&(item->param1)), result, options);
+ break;
+ case IT_CONST:
+ result = CopyItem(item);
+ break;
+ case IT_VARIABLE:
+ if (options & RTO_NEEDCONST)
+ {
+ // we need const result - :) is it nsis or common variable
+ switch (subtype)
+ {
+ case ITV_NSIS:
+ {
+ // nsis
+ result = AllocItem();
+ char *variable = getuservariable(ioptions);
+ StringToItem(variable, result, options);
+ }
+ break;
+ case ITV_USER:
+ {
+ // usual variable
+ if (UserVars[ioptions].item)
+ result = CopyItem(UserVars[ioptions].item);
+ else
+ result = AllocItem();
+ }
+ break;
+ case ITV_ARRITEM:
+ {
+ // array item
+ ExpressionItem *ei = ((ArrayDesc*)(item->param1))->array[(int)item->param2];
+ if (ei)
+ result = CopyItem(ei);
+ else
+ result = AllocItem();
+ }
+ break;
+ case ITV_STACK:
+ {
+ // pop from plugin stack
+ result = stack;
+ if (result == NULL) result = AllocItem();
+ stack = result->next;
+ result->next = NULL;
+ }
+ break;
+ case ITV_NSTACK:
+ {
+ // NSIS stack
+ char buffer[1024], *buf = buffer;
+ result = AllocItem();
+ popstring(buffer);
+ StringToItem(buf, result, options);
+ }
+ break;
+ }
+ }
+ else
+ // if we don't need const - we will just pass variable record
+ result = CopyItem(item);
+ break;
+ case IT_OPERATOR:
+ {
+ ExpressionItem *var = NULL, *item1 = NULL, *item2 = NULL;
+ // prepare arguments in case of SET operator
+ if (ioptions & PO_SET)
+ {
+ if ((item->param1) && (ioptions & PO_PRENONCONST))
+ {
+ RunTree(*((ExpressionItem**)&(item->param1)), var, 0);
+ if (ioptions & PO_USESPRE)
+ RunTree(var, item1, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
+ } else
+ if ((item->param2) && (ioptions & PO_POSTNONCONST))
+ {
+ RunTree(*((ExpressionItem**)&(item->param2)), var, 0);
+ if (ioptions & PO_USESPOST)
+ RunTree(var, item2, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
+ }
+ }
+
+ // prepare arguments in case of any operator
+ int needmore = 1;
+ if ((!item1) && (item->param1) && (ioptions & PO_USESPRE))
+ {
+ RunTree(*((ExpressionItem**)&(item->param1)), item1, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
+ // logical expressions && and || can make decision on first arg basis
+ if ((subtype == ITO_LAND) || (subtype == ITO_LOR) )
+ {
+ ItemToType(item1, ITC_INT);
+ int res = (int) *((__int64*) &(item1->param1));
+ if (((res)&&(subtype==ITO_LOR)) || ((!res)&&(subtype==ITO_LAND)))
+ needmore = 0;
+ }
+ }
+
+ // get-reference operator
+ if ((!item1) && (subtype == ITO_AND) && (!item2) && (item->param2))
+ {
+ RunTree(*((ExpressionItem**)&(item->param2)), result, 0);
+ break;
+ }
+
+ if ((needmore) && (!item2) && (item->param2) && (ioptions & PO_USESPOST))
+ RunTree(*((ExpressionItem**)&(item->param2)), item2, RTO_NEEDCONST | STI_INT | STI_FLOAT | STI_STRING);
+
+ // reference operator
+ if ((!item1) && (subtype == ITO_MUL) && ((item2->type & ITEMTYPE) == (IT_VARIABLE)))
+ {
+ // ok, that's the result we need
+ if (options & RTO_NEEDCONST)
+ {
+ RunTree(item2, result, options);
+ CleanupItems(item2);
+ } else
+ result = item2;
+ break;
+ }
+
+ __int64 i1=0, i2=0, i3=0, i4=0;
+ if (((!item1)||((item1->type & ITEMTYPE)==IT_CONST)) &&
+ ((!item2)||((item2->type & ITEMTYPE)==IT_CONST)))
+ {
+
+ // find the best type match for operation
+ int it1 = (item1 && (ioptions & PO_USESPRE))?(item1->type & ITEMSUBTYPE):(ITC_UNKNOWN),
+ it2 = (item2 && (ioptions & PO_USESPOST))?(item2->type & ITEMSUBTYPE):(ITC_UNKNOWN),
+ type = (it1 < it2)?(it1):(it2);
+
+ // convert operands to desired type
+ ItemToType(item1, type);
+ ItemToType(item2, type);
+
+ switch (type)
+ {
+ case ITC_INT:
+ {
+ i1 = (item1)?(*((__int64*)&item1->param1)):(0);
+ i2 = (item2)?(*((__int64*)&item2->param1)):(0);
+
+ switch (subtype)
+ {
+ case ITO_MINUS: i1 -= i2; break; // unary minus auto handled with NULL
+ case ITO_PLUS: i1 += i2; break;
+ case ITO_SHL: i1 <<= i2; break;
+ case ITO_SHR: i1 >>= i2; break;
+ case ITO_MUL: i1 *= i2; break;
+ case ITO_MOD:
+ case ITO_DIV:
+ if (i2 == 0) { i3 = 0; i4 = i1; }
+ else { i3 = i1 / i2; i4 = i1 % i2; }
+ if (subtype == ITO_DIV) i1 = i3; else i1 = i4;
+ break;
+ case ITO_SET: i1 = i2; break;
+ case ITO_LE: i1 = (i1 <= i2); break;
+ case ITO_GE: i1 = (i1 >= i2); break;
+ case ITO_NE: i1 = (i1 != i2); break;
+ case ITO_EQ: i1 = (i1 == i2); break;
+ case ITO_LS: i1 = (i1 < i2); break;
+ case ITO_GR: i1 = (i1 > i2); break;
+ case ITO_AND: i1 = (i1 & i2); break;
+ case ITO_OR: i1 = (i1 | i2); break;
+ case ITO_XOR: i1 = (i1 ^ i2); break;
+ case ITO_NOT: i1 = ~i2; break;
+ case ITO_LNOT: i1 = !i2; break;
+ case ITO_LAND: i1 = i1 && i2; break;
+ case ITO_LOR: i1 = i1 || i2; break;
+ case ITO_INC:
+ if (item1) i2 = i1++;
+ else i1 = ++i2;
+ break;
+ case ITO_DEC:
+ if (item1) i2 = i1--;
+ else i1 = --i2;
+ break;
+ }
+ result = AllocItem();
+ *((__int64*)&result->param1) = i1;
+ }
+ break;
+ case ITC_FLOAT:
+ {
+ int ir = -666;
+ double i1 = (item1)?(*((double*)&item1->param1)):(0.0);
+ double i2 = (item2)?(*((double*)&item2->param1)):(0.0);
+
+ switch (subtype)
+ {
+ case ITO_MINUS: i1 -= i2; break; // unary minus auto handled with NULL
+ case ITO_PLUS: i1 += i2; break;
+ case ITO_MUL: i1 *= i2; break;
+ case ITO_DIV: i1 /= i2; break;
+ case ITO_SET: i1 = i2; break;
+ case ITO_LE: ir = (i1 <= i2); break;
+ case ITO_GE: ir = (i1 >= i2); break;
+ case ITO_NE: ir = (i1 != i2); break;
+ case ITO_EQ: ir = (i1 == i2); break;
+ case ITO_LS: ir = (i1 < i2); break;
+ case ITO_GR: ir = (i1 > i2); break;
+ }
+ result = AllocItem();
+ if (ir == -666)
+ {
+ // if ir value left intact - result is double
+ result->type = IT_CONST | ITC_FLOAT;
+ *((double*)&result->param1) = i1;
+ } else
+ *((__int64*)&result->param1) = (__int64) ir;
+ }
+ break;
+ case ITC_STRING:
+ {
+ int ir = -666;
+ char *i1 = (item1)?((char*)item1->param1):(NULL);
+ char *i2 = (item2)?((char*)item2->param1):(NULL);
+ int sc = (i1 && i2)?(lstrcmp(i1, i2)):((i1)?(1):((i2)?(-1):(0)));
+
+ switch (subtype)
+ {
+ case ITO_PLUS: lstrcat(i1, i2); break;
+ case ITO_SET: i1 = i2; break;
+ case ITO_LE: ir = (sc <= 0); break;
+ case ITO_GE: ir = (sc >= 0); break;
+ case ITO_NE: ir = (sc != 0); break;
+ case ITO_EQ: ir = (sc == 0); break;
+ case ITO_LS: ir = (sc < 0); break;
+ case ITO_GR: ir = (sc > 0); break;
+ }
+ if (ir == -666)
+ {
+ result = CopyItem((item1)?(item1):(item2));
+ } else
+ {
+ result = AllocItem();
+ *((__int64*)&result->param1) = (__int64) ir;
+ }
+ }
+ break;
+ case ITC_ARRAY:
+ result = CopyItem(item2);
+ break;
+ }
+
+ } // check for both items constant
+ // the other case - usually UniaryPre operators working with non constants
+ else result = CopyItem(item2);
+
+ if (ioptions & PO_SET)
+ {
+ // Save our result in output variable
+ SaveResult(var, result);
+ }
+
+ // Actual value to be returned as result is at i2 for ++ and -- ops
+ if ((subtype == ITO_DEC) || (subtype == ITO_INC))
+ *((__int64*)&result->param1) = i2;
+
+ CleanupItems(item1); CleanupItems(item2); CleanupItems(var);
+ }
+ break;
+ case IT_LOGIC:
+ {
+ int ifmode = (subtype == ITL_IF);
+ ExpressionItem *ifbr = *((ExpressionItem**)&(item->param1)),
+ *dobr = *((ExpressionItem**)&(item->param2)),
+ *thbr = NULL, *elbr = NULL;
+ // check do branche for existance
+ if (dobr && ifmode)
+ {
+ // then...
+ thbr = *((ExpressionItem**)&(dobr->param1));
+ // ... and else branches
+ if (dobr->next) elbr = *((ExpressionItem**)&(dobr->next->param1));
+ }
+ while (true)
+ {
+ RunAndGetConst((int) ifbr, result, ITC_INT);
+ if (ifmode)
+ {
+ // we need then or else branch?
+ if ((*((__int64*)&result->param1))) dobr = thbr;
+ else dobr = elbr;
+ } else
+ {
+ // while mode
+ if (!(*((__int64*)&result->param1))) break;
+ }
+ // ok, run the approtiate branch of if statement (if available)
+ if (dobr)
+ {
+ CleanupItems(result);
+ RunTree(dobr, result, options);
+ }
+ if (ifmode) break;
+ CleanupItems(result);
+ }
+ }
+ break;
+ case IT_FUNCTION:
+ if (subtype == ITF_USER)
+ {
+ int i;
+ UserFunc *f = &(UserFuncs[ioptions]);
+ int flags = f->varflags;
+ ExpressionItem *ip = *((ExpressionItem**)&(item->param1));
+ ExpressionItem *si = AllocItem(), *var = AllocItem();
+ ExpressionItem *vals[32];
+ si->type = IT_VARIABLE | ITV_STACK;
+ for (i = 0; i < f->varsnum; i++)
+ {
+ // push every variable
+ ExpressionItem *val;
+ var->type = (IT_VARIABLE | ITV_USER) + f->vars[i];
+ RunTree(var, val, RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
+ SaveResult(si, val);
+ CleanupItems(val);
+ // calculate argument value and for future
+ if (ip)
+ {
+ if (flags&1)
+ {
+ // var ptr required
+ RunTree(*((ExpressionItem**)&(ip->param1)), vals[i], 0);
+ } else
+ {
+ RunTree(*((ExpressionItem**)&(ip->param1)), vals[i], RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
+ }
+ ip = ip->next;
+ } else vals[i] = AllocItem();
+
+ flags >>= 1;
+ }
+
+ // now when all values got we could save them to variables
+ for (i = 0; i < f->varsnum; i++)
+ {
+ var->type = (IT_VARIABLE | ITV_USER) + f->vars[i];
+ SaveResult(var, vals[i]);
+ CleanupItems(vals[i]);
+ }
+
+
+ // ok, call the func
+ RunTree(f->root, result, RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
+
+ // pop original params
+ for (i = f->varsnum-1; i >= 0; i--)
+ {
+ // pop every variable
+ ExpressionItem *val;
+ var->type = (IT_VARIABLE | ITV_USER) + f->vars[i];
+ RunTree(si, val, RTO_NEEDCONST | ITC_STRING | ITC_INT | ITC_FLOAT | ITC_ARRAY);
+ SaveResult(var, val);
+ CleanupItems(val);
+ }
+
+ // free used items
+ CleanupItems(si); CleanupItems(var);
+ } else if (subtype == ITF_TYPE)
+ {
+ int newtype = (int) MathFunctions[ioptions].fptr;
+ if (newtype < ITC_UNKNOWN)
+ {
+ // get as possibly close to ready expression
+ RunAndGetConst((int)item->param1, result, newtype);
+ if (ioptions == ITFT_CARRAY_ID)
+ CopyArray(result);
+ } else if (newtype == FTT_FLOATF)
+ {
+ // float format function
+ ExpressionItem *arg1, *arg2;
+ RunAndGetConst((int)item->param1, arg1, ITC_FLOAT);
+ double value = *((double*)&(arg1->param1));
+ RunAndGetConst((int)item->param2, arg2, ITC_INT);
+ int format = (int) *((__int64*)&(arg2->param1));
+
+ result = AllocItem();
+ result->type = IT_CONST | ITC_STRING;
+ result->param1 = (EIPARAM) AllocString();
+ FloatFormat((char*) result->param1, value, format);
+ CleanupItems(arg1); CleanupItems(arg2);
+ } else if (newtype == FTT_LEN)
+ {
+ // length function
+ RunTree(*((ExpressionItem **) &(item->param1)), result, RTO_NEEDCONST | ITC_STRING | ITC_ARRAY);
+ if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_ARRAY))
+ {
+ int len = ((ArrayDesc*)(result->param1))->count;
+ CleanupItems(result);
+ result = AllocItem();
+ *((__int64*)&(result->param1)) = (__int64) len;
+ break;
+ } else
+ if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) != (IT_CONST|ITC_STRING))
+ ItemToType(result, ITC_STRING);
+
+ if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_STRING))
+ {
+ // ok, that's string
+ int len = lstrlen((char*)result->param1);
+ dbgGlobalFree((HGLOBAL) result->param1);
+ *((__int64*)&(result->param1)) = (__int64) len;
+ result->type = IT_CONST | ITC_INT;
+ } else CleanupItems(result);
+ } else
+ {
+ // only one left - c() - char/int/char conversion
+ RunTree(*((ExpressionItem **) &(item->param1)), result, RTO_NEEDCONST | ITC_STRING | ITC_INT);
+ if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_STRING))
+ {
+ // ok, that's string - convert first char to int
+ int chr = (*((char*)result->param1)) & 0xFF;
+ dbgGlobalFree((HGLOBAL) result->param1);
+ *((__int64*)&(result->param1)) = (__int64) chr;
+ result->type = IT_CONST | ITC_INT;
+ break;
+ }
+ if ((result->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST|ITC_INT))
+ {
+ // ok, that's int - convert to new string (char+0)
+ int chr = (int) (*((__int64*)&(result->param1))) & 0xFF;
+ result->param1 = (EIPARAM) AllocString();
+ *((char*)result->param1) = (char) chr;
+ *((char*)(result->param1+1)) = (char) 0;
+ result->type = IT_CONST | ITC_STRING;
+ break;
+ } else CleanupItems(result);
+ }
+ } else
+ {
+ // oops :-o function call :)
+ RunAndGetConst((int)item->param1, result, ITC_FLOAT);
+ double &value = *((double*)&(result->param1));
+ if (subtype == ITF_MATH1)
+ {
+ // Built-In math function with 1 arg
+ value = MathFunctions[ioptions].fptr(value);
+ } else
+ if (subtype == ITF_MATH2)
+ {
+ // Built-In math function with 2 args
+ if (ioptions >= MATHFUNCNUM-2)
+ {
+ // specific function - we need second arg as out
+ ExpressionItem *arg2, *res2 = AllocItem();
+ RunTree(*((ExpressionItem**)&(item->param2)), arg2, 0);
+ if (ioptions == MATHFUNCNUM-1)
+ {
+ // fmodf function - second arg is ptr to double
+ res2->type = IT_CONST | ITC_FLOAT;
+ double &v = *((double*)&(res2->param1));
+ value = ((Math2dFuncPtr)(MathFunctions[ioptions].fptr))(value, &v);
+ } else
+ {
+ // frexp function - second arg is ptr to int
+ int v = 0;
+ value = ((Math2iFuncPtr)(MathFunctions[ioptions].fptr))(value, &v);
+ *((__int64 *)&(res2->param1)) = (__int64) v;
+ }
+ SaveResult(arg2, res2);
+ CleanupItems(arg2); CleanupItems(res2);
+ } else
+ {
+ // normal 2-arg math function
+ ExpressionItem *arg2;
+ RunAndGetConst((int)item->param2, arg2, ITC_FLOAT);
+ double value2 = *((double*)&(arg2->param1));
+ value = ((Math2FuncPtr)(MathFunctions[ioptions].fptr))(value, value2);
+ CleanupItems(arg2);
+ }
+ }
+ }
+ break;
+ case IT_ARRAY:
+ {
+ // currently only array access is used
+ ExpressionItem *index, *aritem;
+ RunTree(*((ExpressionItem **) &(item->param1)), aritem, RTO_NEEDCONST | ITC_STRING | ITC_ARRAY);
+
+ if ((aritem->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST | ITC_STRING))
+ {
+ // argument is string
+ char *str = (char*)(aritem->param1);
+ int len = lstrlen(str);
+ // have we two indexes or one?
+ if ((*((ExpressionItem **) &(item->param2)))->type != IT_EXPRESSION)
+ {
+ // one index - user need a char
+ RunAndGetConst((int)item->param2, index, ITC_INT);
+
+ int pos = (int) *((__int64*)&(index->param1));
+ if (pos < 0) pos += len; // -index - means from end
+ if ((pos > len) || (pos < 0))
+ *str = 0; // index is accross string boundaries
+ else
+ {
+ // new string - just a single char
+ *str = *(str+pos);
+ *(str+1) = 0;
+ }
+ } else
+ {
+ // two indexes
+ ExpressionItem *index2;
+ // if first index is skipped -> 0 (from first char)
+ if ((*((ExpressionItem **) &(item->param2)))->param1 == 0)
+ index = AllocItem();
+ else
+ RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->param1, index, ITC_INT);
+ if ((*((ExpressionItem **) &(item->param2)))->next->param1 == 0)
+ {
+ // if second index is skipped -> -1 (till last char)
+ index2 = AllocItem();
+ *((__int64*)&(index2->param1)) = -1;
+ }
+ else
+ RunAndGetConst((int)(*((ExpressionItem **) &(item->param2)))->next->param1, index2, ITC_INT);
+
+ // ok, we've got two indexes
+ int pos1 = (int) *((__int64*)&(index->param1));
+ int pos2 = (int) *((__int64*)&(index2->param1));
+ if (pos1 < 0) pos1 += len; // -index - means from end
+ if (pos2 < 0) pos2 += len; // -index - means from end
+ // limit start/stop positions
+ if (pos1 < 0) pos1 = 0;
+ if (pos2 < 0) pos2 = 0;
+ if (pos1 > len) pos1 = len;
+ if (pos2 >= len) pos2 = len-1;
+
+ // copy string part
+ char* lpos = str + (pos2-pos1);
+ while (str <= lpos)
+ {
+ *str = *(str + pos1);
+ str++;
+ }
+ // null-termiante
+ *str = 0;
+
+ CleanupItems(index2);
+ }
+
+ } else
+ {
+ // argument is array
+ RunAndGetConst((int)item->param2, index, ITC_INT);
+
+ // convert array pointer to array item pointer
+ aritem->type = IT_VARIABLE | ITV_ARRITEM;
+ aritem->param2 = (EIPARAM) *((__int64*)&(index->param1));
+
+ ArrayDesc *ad = (ArrayDesc*)aritem->param1;
+ if (((int)aritem->param2) >= ad->count)
+ {
+ ad->count = ((int)aritem->param2)+1;
+ while (ad->count > ad->size)
+ {
+ // resize array
+ ExpressionItem **oldei = ad->array;
+ ad->array = (ExpressionItem**) dbgGlobalAlloc(GPTR, 2*ad->size*sizeof(ExpressionItem*));
+ for (int i = 0; i < ad->size; i++)
+ ad->array[i] = oldei[i];
+ ad->size*=2;
+ dbgGlobalFree(oldei);
+ }
+ }
+ }
+
+ CleanupItems(index);
+
+ // we need constant result?
+ if (options & RTO_NEEDCONST)
+ {
+ RunTree(aritem, result, options);
+ CleanupItems(aritem);
+ } else result = aritem;
+ }
+ break;
+ }
+ item = item->next;
+ }
+}
+
+extern "C"
+void __declspec(dllexport) Script(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ Math_INIT();
+ char *buffer = AllocString(), *buf = buffer;
+ ExpressionItem *root = NULL; // root of current tree
+
+ // pop script string
+ popstring(buffer);
+
+ // parse it
+ ParseString(buf, root);
+
+#ifdef _DEBUG
+ // dump
+ PrintTree(root, buffer);
+#endif
+
+ ExpressionItem *result;
+ RunTree(root, result, 0);
+ CleanupItems(result);
+
+ CleanupItems(root);
+ dbgGlobalFree((HGLOBAL) buffer);
+}
+
+double _infinity;
+extern "C" void _fpreset();
+
+void CleanAll(int init)
+{
+ if (init)
+ {
+ unsigned char _infinity_base[8] = {0, 0, 0, 0, 0, 0, 0xf0, 0x7f};
+ _fltused = 0;
+ _infinity = *((double*)(_infinity_base));
+ _fpreset();
+
+ stack = NULL;
+ UserVarsCount = 0;
+ UserFuncsCount = 0;
+ } else
+ {
+ int i;
+ // cleanup stack
+ CleanupItems(stack); stack = NULL;
+ // cleanup user vars
+ for (i = 0; i < UserVarsCount; i++)
+ CleanupItems(UserVars[i].item);
+ // cleanup user funcs
+ for (i = 0; i < UserFuncsCount; i++)
+ CleanupItems(UserFuncs[i].root);
+ UserVarsCount = 0;
+ UserFuncsCount = 0;
+
+ dbgGlobalCheck();
+ }
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ CleanAll(ul_reason_for_call == DLL_PROCESS_ATTACH);
+ return TRUE;
+}
+
diff --git a/Contrib/Math/Source/Math.h b/Contrib/Math/Source/Math.h
index 545004e..23dad92 100755
--- a/Contrib/Math/Source/Math.h
+++ b/Contrib/Math/Source/Math.h
@@ -1,87 +1,87 @@
-#pragma once
-
-#ifdef _DEBUG
-//#define _DEBUG_LEAKS
-#endif
-
-#ifdef _DEBUG_LEAKS
-
-#define dbgGlobalAlloc(a, b) watchGlobalAlloc(a, b)
-#define dbgGlobalFree(a) watchGlobalFree(a)
-#define dbgGlobalCheck() watchGlobal();
-void watchGlobal();
-void watchGlobalFree(HGLOBAL block);
-HGLOBAL watchGlobalAlloc(UINT Flags, UINT size);
-
-#else
-
-#define dbgGlobalAlloc(a, b) GlobalAlloc(a, b)
-#define dbgGlobalFree(a) GlobalFree(a)
-#define dbgGlobalCheck() {};
-
-#endif
-
-
-
-// only include this file from one place in your DLL.
-// (it is all static, if you use it in two places it will fail)
-
-#define Math_INIT() { \
- g_stringsize=string_size; \
- g_stacktop=stacktop; \
- g_variables=variables; }
-
-// For page showing plug-ins
-#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
-#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
-#define NOTIFY_BYE_BYE 'x'
-
-typedef struct _stack_t {
- struct _stack_t *next;
- char text[1]; // this should be the length of string_size
-} stack_t;
-
-extern unsigned int g_stringsize;
-extern stack_t **g_stacktop;
-extern char *g_variables;
-
-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
-};
-
-
-// utility functions (not required but often useful)
-int popstring(char *str);
-void pushstring(char *str);
-char *getuservariable(int varnum);
-void setuservariable(int varnum, char *var);
-char *AllocString();
-ExpressionItem *AllocItem();
-ExpressionItem *AllocArray(int size);
-ExpressionItem *CopyItem(ExpressionItem *item, int NeedConst = 0);
+#pragma once
+
+#ifdef _DEBUG
+//#define _DEBUG_LEAKS
+#endif
+
+#ifdef _DEBUG_LEAKS
+
+#define dbgGlobalAlloc(a, b) watchGlobalAlloc(a, b)
+#define dbgGlobalFree(a) watchGlobalFree(a)
+#define dbgGlobalCheck() watchGlobal();
+void watchGlobal();
+void watchGlobalFree(HGLOBAL block);
+HGLOBAL watchGlobalAlloc(UINT Flags, UINT size);
+
+#else
+
+#define dbgGlobalAlloc(a, b) GlobalAlloc(a, b)
+#define dbgGlobalFree(a) GlobalFree(a)
+#define dbgGlobalCheck() {};
+
+#endif
+
+
+
+// only include this file from one place in your DLL.
+// (it is all static, if you use it in two places it will fail)
+
+#define Math_INIT() { \
+ g_stringsize=string_size; \
+ g_stacktop=stacktop; \
+ g_variables=variables; }
+
+// For page showing plug-ins
+#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
+#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
+#define NOTIFY_BYE_BYE 'x'
+
+typedef struct _stack_t {
+ struct _stack_t *next;
+ char text[1]; // this should be the length of string_size
+} stack_t;
+
+extern unsigned int g_stringsize;
+extern stack_t **g_stacktop;
+extern char *g_variables;
+
+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
+};
+
+
+// utility functions (not required but often useful)
+int popstring(char *str);
+void pushstring(char *str);
+char *getuservariable(int varnum);
+void setuservariable(int varnum, char *var);
+char *AllocString();
+ExpressionItem *AllocItem();
+ExpressionItem *AllocArray(int size);
+ExpressionItem *CopyItem(ExpressionItem *item, int NeedConst = 0);
diff --git a/Contrib/Math/Source/MyMath.c b/Contrib/Math/Source/MyMath.c
index 0ee41c5..eed587c 100755
--- a/Contrib/Math/Source/MyMath.c
+++ b/Contrib/Math/Source/MyMath.c
@@ -1,243 +1,243 @@
-#include <windows.h>
-#include <stdio.h>
-#include "MyMath.h"
-#include "Math.h"
-
-// Converts String to Int (Dec, Hex) or Float value
-void StringToItem(char *&s, ExpressionItem *item, int options)
-{
- item->type = IT_CONST | ITC_INT;
- __int64 &v=*((__int64*)&(item->param1));
- v = 0;
-
- // Check for right input
- if (!s) return;
-
- // String-value
- if ((((options & (STI_FLOAT | STI_INT)) == 0) || *s == '\'' || *s == '\"' || *s == '`' ||
- ((*s != '+') && (*s != '-') && ((*s < '0') || (*s > '9'))))
- && (options & STI_STRING))
- {
- // end of string char
- char eol = 0;
- if (*s == '\'' || *s == '\"' || *s == '`') eol = *s;
- else s--;
-
- item->type = IT_CONST | ITC_STRING;
- // allocate memory buffer for string
- char *sp;
- sp = *((char**)&(item->param1)) = AllocString();
- while (*(++s) && (*s != eol))
- {
- *(sp++) = *s;
- }
- if (*s == eol) s++;
- *sp = 0;
- } else
- {
- // strip leading spaces and tabs
- while ((*s == ' ') || (*s == '\t')) s++;
- // Hex-value
- if ((options & STI_INT) && *s == '0' && (s[1] == 'x' || s[1] == 'X'))
- {
- s++;
- while (*(s+1) == '0') *s++;
- for (;;)
- {
- int c=*(++s);
- if (c >= '0' && c <= '9') c-='0';
- else if (c >= 'a' && c <= 'f') c-='a'-10;
- else if (c >= 'A' && c <= 'F') c-='A'-10;
- else break;
- v<<=4;
- v+=c;
- }
- }
- // Dec-value, possible floating-point
- else
- {
- int sign=0, numsignif = 0;
- if (*s == '-') sign++; else s--;
- while (*(s+1) == '0') *s++;
- for (;;)
- {
- int c=*(++s) - '0'; numsignif++;
- if ((options & STI_FLOAT) &&
- ((c == ('e'-'0')) || (c==('E'-'0')) || (c==('.'-'0'))
- || (numsignif > 18)))
- {
- // Switch to floating point conversion rountine
- item->type = IT_CONST | ITC_FLOAT;
- double& d = *((double*)&(item->param1));
- d = (double) v;
-
- while ((c >= 0) && (c <= 9))
- {
- d = d*10.0 + (double) c;
- c=*(++s) - '0';
- }
-
- // sub-decimal part
- if (c == ('.'-'0'))
- {
- double pwr = 1.0, dec = 0.0;
- for (;;)
- {
- c=*(++s) - '0';
- if ((c < 0) || (c > 9)) break;
- dec = dec*10.0 + (double) c;
- pwr *= 10.0;
- }
- d += dec/pwr;
- }
- // exponental part
- if ((c == ('E'-'0')) || (c == ('e'-'0')))
- {
- int expc = 0, esign = 0;
- s++;
- // detect exponential sign
- if ((*s == '+') || (*s == '-'))
- esign = (*s == '-');
- else s--;
-
- // detect exp value
- for (;;)
- {
- c=*(++s) - '0';
- if ((c < 0) || (c > 9)) break;
- expc = expc*10 + c;
- }
-
- if (expc >= DBL_MAX_EXP)
- {
- d = HUGE_VAL;
- expc = 0;
- }
-
- double pwr = 1;
- while (expc > 99) { pwr *= 1.0e100; expc -= 100; }
- while (expc > 9) { pwr *= 1.0e10; expc -= 10; }
- while (expc) { pwr *= 10.0; expc--; }
- if (esign) d /= pwr;
- else d *= pwr;
- }
- if (sign) d = -d;
- return;
- }
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- if (sign) v = -v;
- if ((options & STI_FLOAT) && ((options & STI_INT) == 0))
- {
- double& d = *((double*)&(item->param1));
- d = (double) v;
- item->type = IT_CONST | ITC_FLOAT;
- }
- }
- }
-}
-
-void ItemToString(char *sbuf, ExpressionItem *item)
-{
- if ((item == NULL) || ((item->type & ITEMTYPE) != IT_CONST))
- {
- *sbuf = 0;
- return;
- }
-
- switch (item->type & ITEMSUBTYPE)
- {
- case ITC_STRING:
- {
- char *ptr = *((char**)&(item->param1));
- while (*(sbuf++) = *(ptr++));
- }
- break;
- case ITC_ARRAY:
- {
- ArrayDesc *ad = (ArrayDesc *) item->param1;
- for (int index = 0; index < ad->count; index++)
- if ((ad->array[index]) &&
- ((ad->array[index]->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST | ITC_INT)))
- if ((*(sbuf++) = (char) *((__int64*)&(ad->array[index]->param1))) == 0)
- break;
- }
- break;
- case ITC_FLOAT:
- FloatFormat(sbuf, *((double*)&(item->param1)), 6);
- break;
- case ITC_INT:
- itoa64(*((__int64*)&(item->param1)), sbuf);
- break;
- }
-}
-
-void itoa64(__int64 i, char *buffer)
-{
- char buf[128], *b = buf;
-
- if (i < 0)
- {
- *(buffer++) = '-';
- i = -i;
- }
- if (i == 0) *(buffer++) = '0';
- else
- {
- while (i > 0)
- {
- *(b++) = '0' + ((char) (i%10));
- i /= 10;
- }
- while (b > buf) *(buffer++) = *(--b);
- }
- *buffer = 0;
-}
-
-#define POS_INFINITY "#INF"
-#define NEG_INFINITY "-#INF"
-
-void FloatFormat(char *s, double value, int options)
-{
- char format[128];
- int prec = options & 0xF;
-
- *s = 0;
-
- if(value == HUGE_VAL)
- {
- lstrcpy(s, POS_INFINITY);
- return;
- } else if(value == -HUGE_VAL) {
- lstrcpy(s, NEG_INFINITY);
- return;
- }
-
- if (options & FF_NOEXP)
- {
- sprintf(format, "%%.%df", prec);
- }
- else if (options & FF_EXP)
- {
- sprintf(format, "%%.%de", prec);
- }
- else if (options & FF_LEXP)
- {
- sprintf(format, "%%.%dE", prec);
- }
- else
- {
- sprintf(format, "%%.%dg", prec);
- }
-
- sprintf(s, format, value);
-}
-
-int lstrcmpn(char *s1, const char *s2, int chars)
-{
- while ((chars > 0) && (*s1) && (*s2) && (*(s1) == *(s2))) chars--, s1++, s2++;
- if ((chars == 0) || (*s1 == *s2)) return 0;
- return (*s1 - *s2);
-}
+#include <windows.h>
+#include <stdio.h>
+#include "MyMath.h"
+#include "Math.h"
+
+// Converts String to Int (Dec, Hex) or Float value
+void StringToItem(char *&s, ExpressionItem *item, int options)
+{
+ item->type = IT_CONST | ITC_INT;
+ __int64 &v=*((__int64*)&(item->param1));
+ v = 0;
+
+ // Check for right input
+ if (!s) return;
+
+ // String-value
+ if ((((options & (STI_FLOAT | STI_INT)) == 0) || *s == '\'' || *s == '\"' || *s == '`' ||
+ ((*s != '+') && (*s != '-') && ((*s < '0') || (*s > '9'))))
+ && (options & STI_STRING))
+ {
+ // end of string char
+ char eol = 0;
+ if (*s == '\'' || *s == '\"' || *s == '`') eol = *s;
+ else s--;
+
+ item->type = IT_CONST | ITC_STRING;
+ // allocate memory buffer for string
+ char *sp;
+ sp = *((char**)&(item->param1)) = AllocString();
+ while (*(++s) && (*s != eol))
+ {
+ *(sp++) = *s;
+ }
+ if (*s == eol) s++;
+ *sp = 0;
+ } else
+ {
+ // strip leading spaces and tabs
+ while ((*s == ' ') || (*s == '\t')) s++;
+ // Hex-value
+ if ((options & STI_INT) && *s == '0' && (s[1] == 'x' || s[1] == 'X'))
+ {
+ s++;
+ while (*(s+1) == '0') *s++;
+ for (;;)
+ {
+ int c=*(++s);
+ if (c >= '0' && c <= '9') c-='0';
+ else if (c >= 'a' && c <= 'f') c-='a'-10;
+ else if (c >= 'A' && c <= 'F') c-='A'-10;
+ else break;
+ v<<=4;
+ v+=c;
+ }
+ }
+ // Dec-value, possible floating-point
+ else
+ {
+ int sign=0, numsignif = 0;
+ if (*s == '-') sign++; else s--;
+ while (*(s+1) == '0') *s++;
+ for (;;)
+ {
+ int c=*(++s) - '0'; numsignif++;
+ if ((options & STI_FLOAT) &&
+ ((c == ('e'-'0')) || (c==('E'-'0')) || (c==('.'-'0'))
+ || (numsignif > 18)))
+ {
+ // Switch to floating point conversion rountine
+ item->type = IT_CONST | ITC_FLOAT;
+ double& d = *((double*)&(item->param1));
+ d = (double) v;
+
+ while ((c >= 0) && (c <= 9))
+ {
+ d = d*10.0 + (double) c;
+ c=*(++s) - '0';
+ }
+
+ // sub-decimal part
+ if (c == ('.'-'0'))
+ {
+ double pwr = 1.0, dec = 0.0;
+ for (;;)
+ {
+ c=*(++s) - '0';
+ if ((c < 0) || (c > 9)) break;
+ dec = dec*10.0 + (double) c;
+ pwr *= 10.0;
+ }
+ d += dec/pwr;
+ }
+ // exponental part
+ if ((c == ('E'-'0')) || (c == ('e'-'0')))
+ {
+ int expc = 0, esign = 0;
+ s++;
+ // detect exponential sign
+ if ((*s == '+') || (*s == '-'))
+ esign = (*s == '-');
+ else s--;
+
+ // detect exp value
+ for (;;)
+ {
+ c=*(++s) - '0';
+ if ((c < 0) || (c > 9)) break;
+ expc = expc*10 + c;
+ }
+
+ if (expc >= DBL_MAX_EXP)
+ {
+ d = HUGE_VAL;
+ expc = 0;
+ }
+
+ double pwr = 1;
+ while (expc > 99) { pwr *= 1.0e100; expc -= 100; }
+ while (expc > 9) { pwr *= 1.0e10; expc -= 10; }
+ while (expc) { pwr *= 10.0; expc--; }
+ if (esign) d /= pwr;
+ else d *= pwr;
+ }
+ if (sign) d = -d;
+ return;
+ }
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ if (sign) v = -v;
+ if ((options & STI_FLOAT) && ((options & STI_INT) == 0))
+ {
+ double& d = *((double*)&(item->param1));
+ d = (double) v;
+ item->type = IT_CONST | ITC_FLOAT;
+ }
+ }
+ }
+}
+
+void ItemToString(char *sbuf, ExpressionItem *item)
+{
+ if ((item == NULL) || ((item->type & ITEMTYPE) != IT_CONST))
+ {
+ *sbuf = 0;
+ return;
+ }
+
+ switch (item->type & ITEMSUBTYPE)
+ {
+ case ITC_STRING:
+ {
+ char *ptr = *((char**)&(item->param1));
+ while (*(sbuf++) = *(ptr++));
+ }
+ break;
+ case ITC_ARRAY:
+ {
+ ArrayDesc *ad = (ArrayDesc *) item->param1;
+ for (int index = 0; index < ad->count; index++)
+ if ((ad->array[index]) &&
+ ((ad->array[index]->type & (ITEMTYPE|ITEMSUBTYPE)) == (IT_CONST | ITC_INT)))
+ if ((*(sbuf++) = (char) *((__int64*)&(ad->array[index]->param1))) == 0)
+ break;
+ }
+ break;
+ case ITC_FLOAT:
+ FloatFormat(sbuf, *((double*)&(item->param1)), 6);
+ break;
+ case ITC_INT:
+ itoa64(*((__int64*)&(item->param1)), sbuf);
+ break;
+ }
+}
+
+void itoa64(__int64 i, char *buffer)
+{
+ char buf[128], *b = buf;
+
+ if (i < 0)
+ {
+ *(buffer++) = '-';
+ i = -i;
+ }
+ if (i == 0) *(buffer++) = '0';
+ else
+ {
+ while (i > 0)
+ {
+ *(b++) = '0' + ((char) (i%10));
+ i /= 10;
+ }
+ while (b > buf) *(buffer++) = *(--b);
+ }
+ *buffer = 0;
+}
+
+#define POS_INFINITY "#INF"
+#define NEG_INFINITY "-#INF"
+
+void FloatFormat(char *s, double value, int options)
+{
+ char format[128];
+ int prec = options & 0xF;
+
+ *s = 0;
+
+ if(value == HUGE_VAL)
+ {
+ lstrcpy(s, POS_INFINITY);
+ return;
+ } else if(value == -HUGE_VAL) {
+ lstrcpy(s, NEG_INFINITY);
+ return;
+ }
+
+ if (options & FF_NOEXP)
+ {
+ sprintf(format, "%%.%df", prec);
+ }
+ else if (options & FF_EXP)
+ {
+ sprintf(format, "%%.%de", prec);
+ }
+ else if (options & FF_LEXP)
+ {
+ sprintf(format, "%%.%dE", prec);
+ }
+ else
+ {
+ sprintf(format, "%%.%dg", prec);
+ }
+
+ sprintf(s, format, value);
+}
+
+int lstrcmpn(char *s1, const char *s2, int chars)
+{
+ while ((chars > 0) && (*s1) && (*s2) && (*(s1) == *(s2))) chars--, s1++, s2++;
+ if ((chars == 0) || (*s1 == *s2)) return 0;
+ return (*s1 - *s2);
+}
diff --git a/Contrib/Math/Source/MyMath.h b/Contrib/Math/Source/MyMath.h
index 106d9b1..5ed44aa 100755
--- a/Contrib/Math/Source/MyMath.h
+++ b/Contrib/Math/Source/MyMath.h
@@ -1,166 +1,166 @@
-#pragma once
-
-#include <math.h>
-#include <float.h>
-
-#define DEFAULT_ARRAY_SIZE 1024
-
-#define ITEMTYPE 0xFF0000
-// items classes
-#define IT_CONST 0x000000
-#define IT_EXPRESSION 0x010000
-#define IT_OPERATOR 0x020000
-#define IT_VARIABLE 0x030000
-#define IT_LOGIC 0x040000 // flow control items
-#define IT_FUNCTION 0x050000
-#define IT_ARRAY 0x060000 // array operation
-
-#define ITEMSUBTYPE 0x00FF00
-// const items
-#define ITC_STRING 0x000100
-#define ITC_FLOAT 0x000200
-#define ITC_INT 0x000400
-#define ITC_ARRAY 0x000800
-#define ITC_UNKNOWN 0x001000
-
-// type function
-#define FTT_FLOATF (ITC_UNKNOWN << 0)
-#define FTT_LEN (ITC_UNKNOWN << 1)
-#define FTT_CHAR (ITC_UNKNOWN << 2)
-
-// additional option - for "ca" function
-#define ITFA_COPY 0x000001
-
-// ops items
-#define ITO_MINUS 0x000100
-#define ITO_PLUS 0x000200
-#define ITO_SHL 0x000300
-#define ITO_SHR 0x000400
-#define ITO_MUL 0x000500
-#define ITO_DIV 0x000600
-#define ITO_SET 0x000700
-#define ITO_LAND 0x000800
-#define ITO_LOR 0x000900
-#define ITO_INC 0x000A00
-#define ITO_DEC 0x000B00
-#define ITO_LE 0x000C00
-#define ITO_GE 0x000D00
-#define ITO_NE 0x000E00
-#define ITO_EQ 0x000F00
-#define ITO_LS 0x001000
-#define ITO_GR 0x001100
-#define ITO_AND 0x001200
-#define ITO_MOD 0x001300
-#define ITO_OR 0x001400
-#define ITO_XOR 0x001500
-#define ITO_NOT 0x001600
-#define ITO_LNOT 0x001700
-
-// variables sub-types
-#define ITV_NSIS 0x000100
-#define ITV_USER 0x000200
-#define ITV_ARRITEM 0x000400
-#define ITV_STACK 0x000800 // plugin specific stack
-#define ITV_NSTACK 0x001000 // nsis stack
-
-// logic sub-types
-#define ITL_IF 0x000100
-#define ITL_WHILE 0x000200
-
-// function sub-types
-#define ITF_MATH1 0x000100
-#define ITF_MATH2 0x000200
-#define ITF_TYPE 0x000300
-#define ITF_USER 0x000400
-
-// array items sub-types
-#define ITA_ACCESS 0x000000
-
-#define ITEMOPTIONS 0x0000FF
-
-// 16 bytes structure
-typedef struct __ExpressionItem ExpressionItem;
-//#define EIPARAM int
-#define EIPARAM ExpressionItem*
-typedef struct __ExpressionItem
-{
- int type;
- EIPARAM param1;
- EIPARAM param2;
- ExpressionItem *next;
-} ExpressionItem;
-
-typedef struct __ParseInfo
-{
- int SetupNewRoot;
- ExpressionItem *item;
- ExpressionItem *OpsStack;
- ExpressionItem **place;
- ExpressionItem **root;
- char valbuf[108];
-} ParseInfo;
-
-#define OPERATOR_SET_PRECEDENCE 14
-typedef struct __OpStruct
-{
- char name[3];
- unsigned char precedence;
- unsigned short int type;
-} OpStruct;
-
-#define MAX_USER_VARS 256
-typedef struct __UserVar
-{
- char name[28];
- ExpressionItem *item;
-} UserVar;
-
-#define MAX_USER_FUNCS 256
-typedef struct __UserFunc
-{
- char name[20];
- unsigned char vars[31];
- unsigned char varsnum;
- unsigned int varflags;
- ExpressionItem *root;
-} UserFunc;
-
-typedef struct __ArrayDesc
-{
- ExpressionItem **array;
- int size; // size of allocated items pool
- int count; // max number of item accessed
- int references; // array will be killed at CleanupItems only when references == 0
-} ArrayDesc;
-
-typedef double (*Math1FuncPtr)(double arg);
-typedef double (*Math2FuncPtr)(double arg, double arg2);
-typedef double (*Math2iFuncPtr)(double arg, int *arg2);
-typedef double (*Math2dFuncPtr)(double arg, double *arg2);
-
-typedef struct __MathFunction
-{
- char name[3];
- unsigned char type;
- Math1FuncPtr fptr;
-} MathFunction;
-
-#define STI_STRING 0x0100
-#define STI_FLOAT 0x0200
-#define STI_INT 0x0400
-
-#define FF_DEFAULT 0x00 // uses default mode: if available noexp, else exp
-#define FF_NOEXP 0x10 // uses noexp mode
-#define FF_EXP 0x20 // uses exp mode (small e)
-#define FF_LEXP 0x40 // uses exp mode (large E)
-
-// RunTree options
-#define RTO_NEEDCONST 0x0001
-#define RTO_PREFFEREDTYPE 0xFF00
-void RunTree(ExpressionItem *from, ExpressionItem* &result, int type);
-
-void StringToItem(char *&sbuf, ExpressionItem *item, int options);
-void ItemToString(char *sbuf, ExpressionItem *item);
-void FloatFormat(char *sbuf, double value, int options);
-void itoa64(__int64 i, char *buffer);
-int lstrcmpn(char *s1, const char *s2, int chars);
+#pragma once
+
+#include <math.h>
+#include <float.h>
+
+#define DEFAULT_ARRAY_SIZE 1024
+
+#define ITEMTYPE 0xFF0000
+// items classes
+#define IT_CONST 0x000000
+#define IT_EXPRESSION 0x010000
+#define IT_OPERATOR 0x020000
+#define IT_VARIABLE 0x030000
+#define IT_LOGIC 0x040000 // flow control items
+#define IT_FUNCTION 0x050000
+#define IT_ARRAY 0x060000 // array operation
+
+#define ITEMSUBTYPE 0x00FF00
+// const items
+#define ITC_STRING 0x000100
+#define ITC_FLOAT 0x000200
+#define ITC_INT 0x000400
+#define ITC_ARRAY 0x000800
+#define ITC_UNKNOWN 0x001000
+
+// type function
+#define FTT_FLOATF (ITC_UNKNOWN << 0)
+#define FTT_LEN (ITC_UNKNOWN << 1)
+#define FTT_CHAR (ITC_UNKNOWN << 2)
+
+// additional option - for "ca" function
+#define ITFA_COPY 0x000001
+
+// ops items
+#define ITO_MINUS 0x000100
+#define ITO_PLUS 0x000200
+#define ITO_SHL 0x000300
+#define ITO_SHR 0x000400
+#define ITO_MUL 0x000500
+#define ITO_DIV 0x000600
+#define ITO_SET 0x000700
+#define ITO_LAND 0x000800
+#define ITO_LOR 0x000900
+#define ITO_INC 0x000A00
+#define ITO_DEC 0x000B00
+#define ITO_LE 0x000C00
+#define ITO_GE 0x000D00
+#define ITO_NE 0x000E00
+#define ITO_EQ 0x000F00
+#define ITO_LS 0x001000
+#define ITO_GR 0x001100
+#define ITO_AND 0x001200
+#define ITO_MOD 0x001300
+#define ITO_OR 0x001400
+#define ITO_XOR 0x001500
+#define ITO_NOT 0x001600
+#define ITO_LNOT 0x001700
+
+// variables sub-types
+#define ITV_NSIS 0x000100
+#define ITV_USER 0x000200
+#define ITV_ARRITEM 0x000400
+#define ITV_STACK 0x000800 // plugin specific stack
+#define ITV_NSTACK 0x001000 // nsis stack
+
+// logic sub-types
+#define ITL_IF 0x000100
+#define ITL_WHILE 0x000200
+
+// function sub-types
+#define ITF_MATH1 0x000100
+#define ITF_MATH2 0x000200
+#define ITF_TYPE 0x000300
+#define ITF_USER 0x000400
+
+// array items sub-types
+#define ITA_ACCESS 0x000000
+
+#define ITEMOPTIONS 0x0000FF
+
+// 16 bytes structure
+typedef struct __ExpressionItem ExpressionItem;
+//#define EIPARAM int
+#define EIPARAM ExpressionItem*
+typedef struct __ExpressionItem
+{
+ int type;
+ EIPARAM param1;
+ EIPARAM param2;
+ ExpressionItem *next;
+} ExpressionItem;
+
+typedef struct __ParseInfo
+{
+ int SetupNewRoot;
+ ExpressionItem *item;
+ ExpressionItem *OpsStack;
+ ExpressionItem **place;
+ ExpressionItem **root;
+ char valbuf[108];
+} ParseInfo;
+
+#define OPERATOR_SET_PRECEDENCE 14
+typedef struct __OpStruct
+{
+ char name[3];
+ unsigned char precedence;
+ unsigned short int type;
+} OpStruct;
+
+#define MAX_USER_VARS 256
+typedef struct __UserVar
+{
+ char name[28];
+ ExpressionItem *item;
+} UserVar;
+
+#define MAX_USER_FUNCS 256
+typedef struct __UserFunc
+{
+ char name[20];
+ unsigned char vars[31];
+ unsigned char varsnum;
+ unsigned int varflags;
+ ExpressionItem *root;
+} UserFunc;
+
+typedef struct __ArrayDesc
+{
+ ExpressionItem **array;
+ int size; // size of allocated items pool
+ int count; // max number of item accessed
+ int references; // array will be killed at CleanupItems only when references == 0
+} ArrayDesc;
+
+typedef double (*Math1FuncPtr)(double arg);
+typedef double (*Math2FuncPtr)(double arg, double arg2);
+typedef double (*Math2iFuncPtr)(double arg, int *arg2);
+typedef double (*Math2dFuncPtr)(double arg, double *arg2);
+
+typedef struct __MathFunction
+{
+ char name[3];
+ unsigned char type;
+ Math1FuncPtr fptr;
+} MathFunction;
+
+#define STI_STRING 0x0100
+#define STI_FLOAT 0x0200
+#define STI_INT 0x0400
+
+#define FF_DEFAULT 0x00 // uses default mode: if available noexp, else exp
+#define FF_NOEXP 0x10 // uses noexp mode
+#define FF_EXP 0x20 // uses exp mode (small e)
+#define FF_LEXP 0x40 // uses exp mode (large E)
+
+// RunTree options
+#define RTO_NEEDCONST 0x0001
+#define RTO_PREFFEREDTYPE 0xFF00
+void RunTree(ExpressionItem *from, ExpressionItem* &result, int type);
+
+void StringToItem(char *&sbuf, ExpressionItem *item, int options);
+void ItemToString(char *sbuf, ExpressionItem *item);
+void FloatFormat(char *sbuf, double value, int options);
+void itoa64(__int64 i, char *buffer);
+int lstrcmpn(char *s1, const char *s2, int chars);
diff --git a/Contrib/Math/Source/plugin.c b/Contrib/Math/Source/plugin.c
index 3286ed6..93cb37e 100755
--- a/Contrib/Math/Source/plugin.c
+++ b/Contrib/Math/Source/plugin.c
@@ -1,136 +1,136 @@
-#include <windows.h>
-#include "MyMath.h"
-#include "Math.h"
-
-unsigned int g_stringsize;
-stack_t **g_stacktop;
-char *g_variables;
-
-#ifdef _DEBUG_LEAKS
-
-#include <crtdbg.h>
-
-int blocksnum = 0;
-HGLOBAL blocks[100000];
-
-HGLOBAL watchGlobalAlloc(UINT Flags, UINT size)
-{
- HGLOBAL block = GlobalAlloc(Flags, size);
- blocks[blocksnum++] = block;
- return block;
-}
-
-void watchGlobalFree(HGLOBAL block)
-{
- for (int i = 0; i < blocksnum; i++)
- if (blocks[i] == block) blocks[i] = NULL;
- GlobalFree(block);
-}
-
-void watchGlobal()
-{
- for (int i = 0; i < blocksnum; i++)
- if (blocks[i] != NULL)
- {
- _RPT2(_CRT_WARN, "Memory leak %d at %8X\n", i, blocks[i]);
- }
-}
-
-#endif
-
-// utility functions (not required but often useful)
-int popstring(char *str)
-{
- stack_t *th;
- if (!g_stacktop || !*g_stacktop) return 1;
- th=(*g_stacktop);
- lstrcpy(str,th->text);
- *g_stacktop = th->next;
- dbgGlobalFree((HGLOBAL)th);
- return 0;
-}
-
-void pushstring(char *str)
-{
- stack_t *th;
- if (!g_stacktop) return;
- th=(stack_t*)dbgGlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
- lstrcpyn(th->text,str,g_stringsize);
- th->next=*g_stacktop;
- *g_stacktop=th;
-}
-
-char *getuservariable(int varnum)
-{
- if (varnum < 0 || varnum >= __INST_LAST) return NULL;
- return g_variables+varnum*g_stringsize;
-}
-
-void setuservariable(int varnum, char *var)
-{
- if (var != NULL && varnum >= 0 && varnum < __INST_LAST)
- lstrcpy(g_variables + varnum*g_stringsize, var);
-}
-
-char *AllocString()
-{
- return (char*) dbgGlobalAlloc(GPTR,g_stringsize);
-}
-
-ExpressionItem *AllocItem()
-{
- ExpressionItem *item = (ExpressionItem*)dbgGlobalAlloc(GPTR,sizeof(ExpressionItem));
- item->next = NULL;
- item->type = IT_CONST | ITC_INT;
- item->param1 = item->param2 = 0;
- return item;
-}
-
-ExpressionItem *AllocArray(int s)
-{
- int size = DEFAULT_ARRAY_SIZE;
- while (s > size) size*=2;
-
- ExpressionItem *ai = (ExpressionItem*)dbgGlobalAlloc(GPTR,sizeof(ExpressionItem));
- ai->type = IT_CONST | ITC_ARRAY;
- ai->param1 = (EIPARAM) dbgGlobalAlloc(GPTR, sizeof(ArrayDesc));
-
- ArrayDesc *ad = *((ArrayDesc**)&(ai->param1));
- // initialize and clear the array memory
- ad->array = (ExpressionItem**) dbgGlobalAlloc(GPTR, size*sizeof(ExpressionItem*));
- ad->size = size;
- ad->count = 0;
- ad->references = 1;
- return ai;
-}
-
-ExpressionItem *CopyItem(ExpressionItem *citem, int NeedConst)
-{
- if (!citem) return NULL;
- ExpressionItem *item = NULL;
- if ((NeedConst) && ((citem->type & ITEMTYPE) != IT_CONST))
- {
- // in case of non constant expression - flat it to const
- RunTree(citem, item, RTO_NEEDCONST | ITC_INT | ITC_STRING | ITC_FLOAT | ITC_ARRAY);
- if (item) return item;
- }
-
- item = AllocItem();
- item->type = citem->type;
- if ((item->type & (ITEMTYPE | ITEMSUBTYPE)) == (IT_CONST | ITC_STRING))
- {
- item->param1 = (EIPARAM) AllocString();
- lstrcpy((LPSTR) item->param1, (LPSTR) citem->param1);
- } else if (((item->type & (ITEMTYPE | ITEMSUBTYPE)) == (IT_CONST | ITC_ARRAY))
- ||
- ((item->type & (ITEMTYPE | ITEMSUBTYPE)) == (IT_VARIABLE | ITV_ARRITEM)))
- {
- item->param1 = citem->param1;
- ArrayDesc *ad = (ArrayDesc*) item->param1;
- ad->references++;
- }
- else item->param1 = citem->param1;
- item->param2 = citem->param2;
- item->next = NULL;
- return item;
-}
+#include <windows.h>
+#include "MyMath.h"
+#include "Math.h"
+
+unsigned int g_stringsize;
+stack_t **g_stacktop;
+char *g_variables;
+
+#ifdef _DEBUG_LEAKS
+
+#include <crtdbg.h>
+
+int blocksnum = 0;
+HGLOBAL blocks[100000];
+
+HGLOBAL watchGlobalAlloc(UINT Flags, UINT size)
+{
+ HGLOBAL block = GlobalAlloc(Flags, size);
+ blocks[blocksnum++] = block;
+ return block;
+}
+
+void watchGlobalFree(HGLOBAL block)
+{
+ for (int i = 0; i < blocksnum; i++)
+ if (blocks[i] == block) blocks[i] = NULL;
+ GlobalFree(block);
+}
+
+void watchGlobal()
+{
+ for (int i = 0; i < blocksnum; i++)
+ if (blocks[i] != NULL)
+ {
+ _RPT2(_CRT_WARN, "Memory leak %d at %8X\n", i, blocks[i]);
+ }
+}
+
+#endif
+
+// utility functions (not required but often useful)
+int popstring(char *str)
+{
+ stack_t *th;
+ if (!g_stacktop || !*g_stacktop) return 1;
+ th=(*g_stacktop);
+ lstrcpy(str,th->text);
+ *g_stacktop = th->next;
+ dbgGlobalFree((HGLOBAL)th);
+ return 0;
+}
+
+void pushstring(char *str)
+{
+ stack_t *th;
+ if (!g_stacktop) return;
+ th=(stack_t*)dbgGlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
+ lstrcpyn(th->text,str,g_stringsize);
+ th->next=*g_stacktop;
+ *g_stacktop=th;
+}
+
+char *getuservariable(int varnum)
+{
+ if (varnum < 0 || varnum >= __INST_LAST) return NULL;
+ return g_variables+varnum*g_stringsize;
+}
+
+void setuservariable(int varnum, char *var)
+{
+ if (var != NULL && varnum >= 0 && varnum < __INST_LAST)
+ lstrcpy(g_variables + varnum*g_stringsize, var);
+}
+
+char *AllocString()
+{
+ return (char*) dbgGlobalAlloc(GPTR,g_stringsize);
+}
+
+ExpressionItem *AllocItem()
+{
+ ExpressionItem *item = (ExpressionItem*)dbgGlobalAlloc(GPTR,sizeof(ExpressionItem));
+ item->next = NULL;
+ item->type = IT_CONST | ITC_INT;
+ item->param1 = item->param2 = 0;
+ return item;
+}
+
+ExpressionItem *AllocArray(int s)
+{
+ int size = DEFAULT_ARRAY_SIZE;
+ while (s > size) size*=2;
+
+ ExpressionItem *ai = (ExpressionItem*)dbgGlobalAlloc(GPTR,sizeof(ExpressionItem));
+ ai->type = IT_CONST | ITC_ARRAY;
+ ai->param1 = (EIPARAM) dbgGlobalAlloc(GPTR, sizeof(ArrayDesc));
+
+ ArrayDesc *ad = *((ArrayDesc**)&(ai->param1));
+ // initialize and clear the array memory
+ ad->array = (ExpressionItem**) dbgGlobalAlloc(GPTR, size*sizeof(ExpressionItem*));
+ ad->size = size;
+ ad->count = 0;
+ ad->references = 1;
+ return ai;
+}
+
+ExpressionItem *CopyItem(ExpressionItem *citem, int NeedConst)
+{
+ if (!citem) return NULL;
+ ExpressionItem *item = NULL;
+ if ((NeedConst) && ((citem->type & ITEMTYPE) != IT_CONST))
+ {
+ // in case of non constant expression - flat it to const
+ RunTree(citem, item, RTO_NEEDCONST | ITC_INT | ITC_STRING | ITC_FLOAT | ITC_ARRAY);
+ if (item) return item;
+ }
+
+ item = AllocItem();
+ item->type = citem->type;
+ if ((item->type & (ITEMTYPE | ITEMSUBTYPE)) == (IT_CONST | ITC_STRING))
+ {
+ item->param1 = (EIPARAM) AllocString();
+ lstrcpy((LPSTR) item->param1, (LPSTR) citem->param1);
+ } else if (((item->type & (ITEMTYPE | ITEMSUBTYPE)) == (IT_CONST | ITC_ARRAY))
+ ||
+ ((item->type & (ITEMTYPE | ITEMSUBTYPE)) == (IT_VARIABLE | ITV_ARRITEM)))
+ {
+ item->param1 = citem->param1;
+ ArrayDesc *ad = (ArrayDesc*) item->param1;
+ ad->references++;
+ }
+ else item->param1 = citem->param1;
+ item->param2 = citem->param2;
+ item->next = NULL;
+ return item;
+}
diff --git a/Contrib/Math/math.nsi b/Contrib/Math/math.nsi
index 922d64c..bde7616 100755
--- a/Contrib/Math/math.nsi
+++ b/Contrib/Math/math.nsi
@@ -1,39 +1,39 @@
-; This is just an example of Math plugin
-;
-; (c) brainsucker, 2002
-; (r) BSForce
-
-Name "Math Plugin Example"
-OutFile "math.exe"
-SetPluginUnload alwaysoff
-ShowInstDetails show
-XPStyle on
-
-Section "ThisNameIsIgnoredSoWhyBother?"
- Math::Script 'SaR(s,fa,ra, i,f,r,e,p) (i=0;#{i<l(fa),e=l(f=fa[i]);r=ra[i];p=0;#{p<l(s),#[s[p,p+e-1]==f,s=(s[,p-1])+r+(s[p+e,]);p+=l(r), p++]}; i++}; s);'
- Math::Script "TQ(s) (s = s(NS); #[s[0]=='$\"',s=s[1,]]; #[s[-1]=='$\"',s=s[,-2]]; NS = s)"
- Math::Script "P(s,e, p,i) (p=-1;i=0; #{(i<l(s))&&(p<0), #[s[i,i+l(e)-1]==e, p=i]; i++}; p)"
- Math::Script "DL(s) (s=s(NS); p=P(s,'\r\n'); #[p>=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'"
-
- ; last plugin call must not have /NOUNLOAD so NSIS will be able to delete the temporary DLL
- SetPluginUnload manual
- ; do nothing
- Math::Script ""
-SectionEnd
-
-; eof
+; This is just an example of Math plugin
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+Name "Math Plugin Example"
+OutFile "math.exe"
+SetPluginUnload alwaysoff
+ShowInstDetails show
+XPStyle on
+
+Section "ThisNameIsIgnoredSoWhyBother?"
+ Math::Script 'SaR(s,fa,ra, i,f,r,e,p) (i=0;#{i<l(fa),e=l(f=fa[i]);r=ra[i];p=0;#{p<l(s),#[s[p,p+e-1]==f,s=(s[,p-1])+r+(s[p+e,]);p+=l(r), p++]}; i++}; s);'
+ Math::Script "TQ(s) (s = s(NS); #[s[0]=='$\"',s=s[1,]]; #[s[-1]=='$\"',s=s[,-2]]; NS = s)"
+ Math::Script "P(s,e, p,i) (p=-1;i=0; #{(i<l(s))&&(p<0), #[s[i,i+l(e)-1]==e, p=i]; i++}; p)"
+ Math::Script "DL(s) (s=s(NS); p=P(s,'\r\n'); #[p>=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'"
+
+ ; last plugin call must not have /NOUNLOAD so NSIS will be able to delete the temporary DLL
+ SetPluginUnload manual
+ ; do nothing
+ Math::Script ""
+SectionEnd
+
+; eof
diff --git a/Contrib/Math/mathtest.ini b/Contrib/Math/mathtest.ini
index 8db59da..f18075b 100755
--- a/Contrib/Math/mathtest.ini
+++ b/Contrib/Math/mathtest.ini
@@ -1,101 +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
-
+[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/Contrib/Math/mathtest.nsi b/Contrib/Math/mathtest.nsi
index 86d76c6..a70777b 100755
--- a/Contrib/Math/mathtest.nsi
+++ b/Contrib/Math/mathtest.nsi
@@ -1,171 +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 /NOUNLOAD "mtsDL()"
- pop $TEMP2
- pop $TEMP1
-FunctionEnd
-
-Function ExecuteScript
- !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 2" "State"
-
- Math::Script /NOUNLOAD "mtsTQ(s) (s = s(NS); #[s[0]=='$\"',s=s[1,]]; #[s[-1]=='$\"',s=s[,-2]]; NS = s)"
- Math::Script /NOUNLOAD "mtsP(s,e, p,i) (p=-1;i=0; #{(i<l(s))&&(p<0), #[s[i,i+l(e)-1]==e, p=i]; i++}; p)"
- Math::Script /NOUNLOAD "mtsDL(s) (s=s(NS); p=mtsP(s,'\r\n'); #[p>=0, (NS=s[p+4,]; NS=#[p>0,s[,p-1],'']), (NS='';NS=s)])"
-
- push $TEMP1
- ; remove ""
- Math::Script /NOUNLOAD "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 /NOUNLOAD "$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
+;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 /NOUNLOAD "mtsDL()"
+ pop $TEMP2
+ pop $TEMP1
+FunctionEnd
+
+Function ExecuteScript
+ !insertmacro MUI_INSTALLOPTIONS_READ $TEMP1 "MathTest.ini" "Field 2" "State"
+
+ Math::Script /NOUNLOAD "mtsTQ(s) (s = s(NS); #[s[0]=='$\"',s=s[1,]]; #[s[-1]=='$\"',s=s[,-2]]; NS = s)"
+ Math::Script /NOUNLOAD "mtsP(s,e, p,i) (p=-1;i=0; #{(i<l(s))&&(p<0), #[s[i,i+l(e)-1]==e, p=i]; i++}; p)"
+ Math::Script /NOUNLOAD "mtsDL(s) (s=s(NS); p=mtsP(s,'\r\n'); #[p>=0, (NS=s[p+4,]; NS=#[p>0,s[,p-1],'']), (NS='';NS=s)])"
+
+ push $TEMP1
+ ; remove ""
+ Math::Script /NOUNLOAD "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 /NOUNLOAD "$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/Contrib/Math/mathtest.txt b/Contrib/Math/mathtest.txt
index 9b96fdd..f911e66 100755
--- a/Contrib/Math/mathtest.txt
+++ b/Contrib/Math/mathtest.txt
@@ -1,7 +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.
+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/Contrib/Modern UI 2/Interface.nsh b/Contrib/Modern UI 2/Interface.nsh
index 0a548d0..323526f 100755
--- a/Contrib/Modern UI 2/Interface.nsh
+++ b/Contrib/Modern UI 2/Interface.nsh
@@ -1,306 +1,306 @@
-/*
-
-NSIS Modern User Interface
-Interface code for all pages
-
-*/
-
-;--------------------------------
-;Variables
-
-Var mui.Header.Text
-Var mui.Header.Text.Font
-Var mui.Header.SubText
-Var mui.Header.Background
-Var mui.Header.Image
-
-Var mui.Branding.Text
-Var mui.Branding.Background
-
-Var mui.Line.Standard
-Var mui.Line.FullWindow
-
-Var mui.Button.Next
-Var mui.Button.Cancel
-Var mui.Button.Back
-
-
-;--------------------------------
-;General interface settings
-
-!macro MUI_INTERFACE
-
- !ifndef MUI_INTERFACE
-
- !define MUI_INTERFACE
-
- ;These values are set after the interface settings in the script,
- ;so the script itself can override all values.
-
- ;Default interface settings in nsisconf.nsh
- !ifdef MUI_INSERT_NSISCONF
- !insertmacro MUI_NSISCONF
- !endif
-
- ;Default interface settings
- !insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
- !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
- !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
- !insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
- !insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
- !insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
-
- ;Default header images
- !ifdef MUI_HEADERIMAGE
-
- !insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
-
- !ifndef MUI_HEADERIMAGE_UNBITMAP
- !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
- !ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH
- !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH ""
- !endif
- !endif
-
- !ifdef MUI_HEADERIMAGE_BITMAP_RTL
- !ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
- !define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
- !ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
- !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH ""
- !endif
- !endif
- !endif
-
- !endif
-
- ;Default texts
- !insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
- !insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"
-
- ;Apply settings
-
- XPStyle On ;XP style setting in manifest resource
-
- ;Dialog resources
- ChangeUI all "${MUI_UI}"
- !ifdef MUI_HEADERIMAGE
- !ifndef MUI_HEADERIMAGE_RIGHT
- ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
- !else
- ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
- !endif
- !endif
-
- ;Icons
- Icon "${MUI_ICON}"
- UninstallIcon "${MUI_UNICON}"
-
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Abort warning message box
-
-!macro MUI_ABORTWARNING
-
- ${MUI_ABORTWARNING}
-
- !ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
- MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
- !else
- MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
- !endif
-
- Abort
- mui.Quit:
-
-!macroend
-
-!macro MUI_UNABORTWARNING
-
- !ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
- MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
- !else
- MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
- !endif
-
- Abort
- mui.Quit:
-
-!macroend
-
-
-;--------------------------------
-;Initialization of GUI
-
-!macro MUI_HEADERIMAGE_INIT UNINSTALLER
-
- ;Load and display header image
-
- !ifdef MUI_HEADERIMAGE
-
- InitPluginsDir
-
- !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
-
- ${if} $(^RTL) == 1
-
- File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
-
- !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
- SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
- !else
- SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
- !endif
-
- ${else}
-
- !endif
-
- File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
-
- !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
- SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
- !else
- SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
- !endif
-
- !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
-
- ${endif}
-
- !endif
-
- !endif
-
-!macroend
-
-!macro MUI_GUIINIT_OUTERDIALOG UNINSTALLER
-
- ;Initialize outer dialog (fonts & colors)
-
- ;Header
- GetDlgItem $mui.Header.Text $HWNDPARENT 1037
- CreateFont $mui.Header.Text.Font "$(^Font)" "$(^FontSize)" "700"
- SendMessage $mui.Header.Text ${WM_SETFONT} $mui.Header.Text.Font 0
-
- GetDlgItem $mui.Header.SubText $HWNDPARENT 1038
-
- !ifndef MUI_HEADER_TRANSPARENT_TEXT
- SetCtlColors $mui.Header.Text "" "${MUI_BGCOLOR}"
- SetCtlColors $mui.Header.SubText "" "${MUI_BGCOLOR}"
- !else
- SetCtlColors $mui.Header.Text "" "transparent"
- SetCtlColors $mui.Header.SubText "" "transparent"
- !endif
-
- ;Header image
- !insertmacro MUI_HEADERIMAGE_INIT "${UNINSTALLER}"
-
- ;Header background
- GetDlgItem $mui.Header.Background $HWNDPARENT 1034
- SetCtlColors $mui.Header.Background "" "${MUI_BGCOLOR}"
-
- ;Header image background
- GetDlgItem $mui.Header.Image $HWNDPARENT 1039
- SetCtlColors $mui.Header.Image "" "${MUI_BGCOLOR}"
-
- ;Branding text
- GetDlgItem $mui.Branding.Background $HWNDPARENT 1028
- SetCtlColors $mui.Branding.Background /BRANDING
- GetDlgItem $mui.Branding.Text $HWNDPARENT 1256
- SetCtlColors $mui.Branding.Text /BRANDING
- SendMessage $mui.Branding.Text ${WM_SETTEXT} 0 "STR:$(^Branding) "
-
- ;Lines
- GetDlgItem $mui.Line.Standard $HWNDPARENT 1035
- GetDlgItem $mui.Line.FullWindow $HWNDPARENT 1045
-
- ;Buttons
- GetDlgItem $mui.Button.Next $HWNDPARENT 1
- GetDlgItem $mui.Button.Cancel $HWNDPARENT 2
- GetDlgItem $mui.Button.Back $HWNDPARENT 3
-
-!macroend
-
-
-;--------------------------------
-;Interface functions
-
-!macro MUI_FUNCTION_GUIINIT
-
- Function .onGUIInit
-
- !insertmacro MUI_GUIINIT_OUTERDIALOG ""
-
- !ifdef MUI_PAGE_FUNCTION_GUIINIT
- Call "${MUI_PAGE_FUNCTION_GUIINIT}"
- !endif
-
- !ifdef MUI_CUSTOMFUNCTION_GUIINIT
- Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
- !endif
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_UNFUNCTION_GUIINIT
-
- Function un.onGUIInit
-
- !insertmacro MUI_GUIINIT_OUTERDIALOG UN
-
- !ifdef MUI_UNPAGE_FUNCTION_GUIINIT
- Call "${MUI_UNPAGE_FUNCTION_GUIINIT}"
- !endif
-
- !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
- Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
- !endif
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_ABORTWARNING
-
- Function .onUserAbort
-
- !ifdef MUI_PAGE_FUNCTION_ABORTWARNING
- Call ${MUI_PAGE_FUNCTION_ABORTWARNING}
- !endif
-
- !ifdef MUI_ABORTWARNING
- !insertmacro MUI_ABORTWARNING
- !endif
-
- !ifdef MUI_CUSTOMFUNCTION_ABORT
- Call "${MUI_CUSTOMFUNCTION_ABORT}"
- !endif
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_UNABORTWARNING
-
- Function un.onUserAbort
-
- !ifdef MUI_UNPAGE_FUNCTION_ABORTWARNING
- Call ${MUI_UNPAGE_FUNCTION_ABORTWARNING}
- !endif
-
- !ifdef MUI_UNABORTWARNING
- !insertmacro MUI_UNABORTWARNING
- !endif
-
- !ifdef MUI_CUSTOMFUNCTION_UNABORT
- Call "${MUI_CUSTOMFUNCTION_UNABORT}"
- !endif
-
- FunctionEnd
-
-!macroend
+/*
+
+NSIS Modern User Interface
+Interface code for all pages
+
+*/
+
+;--------------------------------
+;Variables
+
+Var mui.Header.Text
+Var mui.Header.Text.Font
+Var mui.Header.SubText
+Var mui.Header.Background
+Var mui.Header.Image
+
+Var mui.Branding.Text
+Var mui.Branding.Background
+
+Var mui.Line.Standard
+Var mui.Line.FullWindow
+
+Var mui.Button.Next
+Var mui.Button.Cancel
+Var mui.Button.Back
+
+
+;--------------------------------
+;General interface settings
+
+!macro MUI_INTERFACE
+
+ !ifndef MUI_INTERFACE
+
+ !define MUI_INTERFACE
+
+ ;These values are set after the interface settings in the script,
+ ;so the script itself can override all values.
+
+ ;Default interface settings in nsisconf.nsh
+ !ifdef MUI_INSERT_NSISCONF
+ !insertmacro MUI_NSISCONF
+ !endif
+
+ ;Default interface settings
+ !insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
+ !insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+ !insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+ !insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
+
+ ;Default header images
+ !ifdef MUI_HEADERIMAGE
+
+ !insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
+
+ !ifndef MUI_HEADERIMAGE_UNBITMAP
+ !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
+ !ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH
+ !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH ""
+ !endif
+ !endif
+
+ !ifdef MUI_HEADERIMAGE_BITMAP_RTL
+ !ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
+ !define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
+ !ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
+ !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH ""
+ !endif
+ !endif
+ !endif
+
+ !endif
+
+ ;Default texts
+ !insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
+ !insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"
+
+ ;Apply settings
+
+ XPStyle On ;XP style setting in manifest resource
+
+ ;Dialog resources
+ ChangeUI all "${MUI_UI}"
+ !ifdef MUI_HEADERIMAGE
+ !ifndef MUI_HEADERIMAGE_RIGHT
+ ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
+ !else
+ ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
+ !endif
+ !endif
+
+ ;Icons
+ Icon "${MUI_ICON}"
+ UninstallIcon "${MUI_UNICON}"
+
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Abort warning message box
+
+!macro MUI_ABORTWARNING
+
+ ${MUI_ABORTWARNING}
+
+ !ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
+ !else
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
+ !endif
+
+ Abort
+ mui.Quit:
+
+!macroend
+
+!macro MUI_UNABORTWARNING
+
+ !ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
+ !else
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
+ !endif
+
+ Abort
+ mui.Quit:
+
+!macroend
+
+
+;--------------------------------
+;Initialization of GUI
+
+!macro MUI_HEADERIMAGE_INIT UNINSTALLER
+
+ ;Load and display header image
+
+ !ifdef MUI_HEADERIMAGE
+
+ InitPluginsDir
+
+ !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
+
+ ${if} $(^RTL) == 1
+
+ File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
+
+ !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
+ SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
+ !else
+ SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
+ !endif
+
+ ${else}
+
+ !endif
+
+ File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
+
+ !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
+ SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
+ !else
+ SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
+ !endif
+
+ !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
+
+ ${endif}
+
+ !endif
+
+ !endif
+
+!macroend
+
+!macro MUI_GUIINIT_OUTERDIALOG UNINSTALLER
+
+ ;Initialize outer dialog (fonts & colors)
+
+ ;Header
+ GetDlgItem $mui.Header.Text $HWNDPARENT 1037
+ CreateFont $mui.Header.Text.Font "$(^Font)" "$(^FontSize)" "700"
+ SendMessage $mui.Header.Text ${WM_SETFONT} $mui.Header.Text.Font 0
+
+ GetDlgItem $mui.Header.SubText $HWNDPARENT 1038
+
+ !ifndef MUI_HEADER_TRANSPARENT_TEXT
+ SetCtlColors $mui.Header.Text "" "${MUI_BGCOLOR}"
+ SetCtlColors $mui.Header.SubText "" "${MUI_BGCOLOR}"
+ !else
+ SetCtlColors $mui.Header.Text "" "transparent"
+ SetCtlColors $mui.Header.SubText "" "transparent"
+ !endif
+
+ ;Header image
+ !insertmacro MUI_HEADERIMAGE_INIT "${UNINSTALLER}"
+
+ ;Header background
+ GetDlgItem $mui.Header.Background $HWNDPARENT 1034
+ SetCtlColors $mui.Header.Background "" "${MUI_BGCOLOR}"
+
+ ;Header image background
+ GetDlgItem $mui.Header.Image $HWNDPARENT 1039
+ SetCtlColors $mui.Header.Image "" "${MUI_BGCOLOR}"
+
+ ;Branding text
+ GetDlgItem $mui.Branding.Background $HWNDPARENT 1028
+ SetCtlColors $mui.Branding.Background /BRANDING
+ GetDlgItem $mui.Branding.Text $HWNDPARENT 1256
+ SetCtlColors $mui.Branding.Text /BRANDING
+ SendMessage $mui.Branding.Text ${WM_SETTEXT} 0 "STR:$(^Branding) "
+
+ ;Lines
+ GetDlgItem $mui.Line.Standard $HWNDPARENT 1035
+ GetDlgItem $mui.Line.FullWindow $HWNDPARENT 1045
+
+ ;Buttons
+ GetDlgItem $mui.Button.Next $HWNDPARENT 1
+ GetDlgItem $mui.Button.Cancel $HWNDPARENT 2
+ GetDlgItem $mui.Button.Back $HWNDPARENT 3
+
+!macroend
+
+
+;--------------------------------
+;Interface functions
+
+!macro MUI_FUNCTION_GUIINIT
+
+ Function .onGUIInit
+
+ !insertmacro MUI_GUIINIT_OUTERDIALOG ""
+
+ !ifdef MUI_PAGE_FUNCTION_GUIINIT
+ Call "${MUI_PAGE_FUNCTION_GUIINIT}"
+ !endif
+
+ !ifdef MUI_CUSTOMFUNCTION_GUIINIT
+ Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_UNFUNCTION_GUIINIT
+
+ Function un.onGUIInit
+
+ !insertmacro MUI_GUIINIT_OUTERDIALOG UN
+
+ !ifdef MUI_UNPAGE_FUNCTION_GUIINIT
+ Call "${MUI_UNPAGE_FUNCTION_GUIINIT}"
+ !endif
+
+ !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
+ Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_ABORTWARNING
+
+ Function .onUserAbort
+
+ !ifdef MUI_PAGE_FUNCTION_ABORTWARNING
+ Call ${MUI_PAGE_FUNCTION_ABORTWARNING}
+ !endif
+
+ !ifdef MUI_ABORTWARNING
+ !insertmacro MUI_ABORTWARNING
+ !endif
+
+ !ifdef MUI_CUSTOMFUNCTION_ABORT
+ Call "${MUI_CUSTOMFUNCTION_ABORT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_UNABORTWARNING
+
+ Function un.onUserAbort
+
+ !ifdef MUI_UNPAGE_FUNCTION_ABORTWARNING
+ Call ${MUI_UNPAGE_FUNCTION_ABORTWARNING}
+ !endif
+
+ !ifdef MUI_UNABORTWARNING
+ !insertmacro MUI_UNABORTWARNING
+ !endif
+
+ !ifdef MUI_CUSTOMFUNCTION_UNABORT
+ Call "${MUI_CUSTOMFUNCTION_UNABORT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
diff --git a/Contrib/Modern UI 2/License.txt b/Contrib/Modern UI 2/License.txt
index edc0e2a..c1d2673 100755
--- a/Contrib/Modern UI 2/License.txt
+++ b/Contrib/Modern UI 2/License.txt
@@ -1,10 +1,10 @@
-Copyright © 2002-2007 Joost Verburg
-
-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 versions must be plainly marked as such, and must not be misrepresented as being the original software.
+Copyright © 2002-2007 Joost Verburg
+
+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 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 distribution. \ No newline at end of file
diff --git a/Contrib/Modern UI 2/Localization.nsh b/Contrib/Modern UI 2/Localization.nsh
index a592236..e954861 100755
--- a/Contrib/Modern UI 2/Localization.nsh
+++ b/Contrib/Modern UI 2/Localization.nsh
@@ -1,186 +1,189 @@
-/*
-
-NSIS Modern User Interface
-Localization
-
-*/
-
-;--------------------------------
-;Variables
-
-!macro MUI_LANGDLL_VARIABLES
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- !ifndef MUI_LANGDLL_REGISTRY_VARAIBLES
- !define MUI_LANGDLL_REGISTRY_VARAIBLES
-
- ;/GLOBAL because the macros are included in a function
- Var /GLOBAL mui.LangDLL.RegistryLanguage
-
- !endif
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Include langauge files
-
-!macro MUI_LANGUAGE LANGUAGE
-
- ;Include a language
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_INSERT
-
- LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf"
- !insertmacro LANGFILE_INCLUDE "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nsh"
-
- !ifndef MUI_LANGDLL_LANGUAGES
- !ifdef MUI_LANGDLL_ALLLANGUAGES
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
- !else
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
- !endif
- !else
- !ifdef MUI_LANGDLL_LANGUAGES_TEMP
- !undef MUI_LANGDLL_LANGUAGES_TEMP
- !endif
- !define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
- !undef MUI_LANGDLL_LANGUAGES
-
- !ifdef MUI_LANGDLL_ALLLANGUAGES
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
- !else
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
- !endif
- !endif
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Language selection
-
-!macro MUI_LANGDLL_DISPLAY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_LANGDLL_VARIABLES
-
- !insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
- !insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
-
- !ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
-
- ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
-
- ${if} $mui.LangDLL.RegistryLanguage != ""
- ;Set default langauge to registry language
- StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
- ${endif}
-
- !endif
-
- !ifdef NSIS_CONFIG_SILENT_SUPPORT
- ${unless} ${Silent}
- !endif
-
- !ifndef MUI_LANGDLL_ALWAYSSHOW
- !ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
- ${if} $mui.LangDLL.RegistryLanguage == ""
- !endif
- !endif
-
- ;Show langauge selection dialog
- !ifdef MUI_LANGDLL_ALLLANGUAGES
- LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
- !else
- LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES} ""
- !endif
-
- Pop $LANGUAGE
- ${if} $LANGUAGE == "cancel"
- Abort
- ${endif}
-
- !ifndef MUI_LANGDLL_ALWAYSSHOW
- !ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
- ${endif}
- !endif
- !endif
-
-
- !ifdef NSIS_CONFIG_SILENT_SUPPORT
- ${endif}
- !endif
-
- !verbose pop
-
-!macroend
-
-!macro MUI_LANGDLL_SAVELANGUAGE
-
- ;Save language in registry
-
- !ifndef MUI_PAGE_UNINSTALLER
-
- IfAbort mui.langdllsavelanguage_abort
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
- !endif
-
- mui.langdllsavelanguage_abort:
-
- !endif
-
-!macroend
-
-!macro MUI_UNGETLANGUAGE
-
- ;Get language from registry in uninstaller
-
- !verbose pop
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
-
- ${if} mui.LangDLL.RegistryLanguage = ""
-
- !endif
-
- !insertmacro MUI_LANGDLL_DISPLAY
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- ${else}
- StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
- ${endif}
-
- !endif
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Rerserve LangDLL file
-
-!macro MUI_RESERVEFILE_LANGDLL
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
-
- !verbose pop
-
-!macroend
+/*
+
+NSIS Modern User Interface
+Localization
+
+*/
+
+;--------------------------------
+;Variables
+
+!macro MUI_LANGDLL_VARIABLES
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+ !ifndef MUI_LANGDLL_REGISTRY_VARAIBLES
+ !define MUI_LANGDLL_REGISTRY_VARAIBLES
+
+ ;/GLOBAL because the macros are included in a function
+ Var /GLOBAL mui.LangDLL.RegistryLanguage
+
+ !endif
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Include langauge files
+
+!macro MUI_LANGUAGE LANGUAGE
+
+ ;Include a language
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_INSERT
+
+ LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf"
+ !insertmacro LANGFILE_INCLUDE "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nsh"
+
+ !ifndef MUI_LANGDLL_LANGUAGES
+ !ifdef MUI_LANGDLL_ALLLANGUAGES
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
+ !else
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
+ !endif
+ !else
+ !ifdef MUI_LANGDLL_LANGUAGES_TEMP
+ !undef MUI_LANGDLL_LANGUAGES_TEMP
+ !endif
+ !define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
+ !undef MUI_LANGDLL_LANGUAGES
+
+ !ifdef MUI_LANGDLL_ALLLANGUAGES
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
+ !else
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
+ !endif
+ !endif
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Language selection
+
+!macro MUI_LANGDLL_DISPLAY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_LANGDLL_VARIABLES
+
+ !insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
+ !insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
+
+ !ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
+
+ ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
+
+ ${if} $mui.LangDLL.RegistryLanguage != ""
+ ;Set default langauge to registry language
+ StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
+ ${endif}
+
+ !endif
+
+ !ifdef NSIS_CONFIG_SILENT_SUPPORT
+ ${unless} ${Silent}
+ !endif
+
+ !ifndef MUI_LANGDLL_ALWAYSSHOW
+ !ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
+ ${if} $mui.LangDLL.RegistryLanguage == ""
+ !endif
+ !endif
+
+ ;Show langauge selection dialog
+ !ifdef MUI_LANGDLL_ALLLANGUAGES
+ LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
+ !else
+ LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES} ""
+ !endif
+
+ Pop $LANGUAGE
+ ${if} $LANGUAGE == "cancel"
+ Abort
+ ${endif}
+
+ !ifndef MUI_LANGDLL_ALWAYSSHOW
+ !ifdef MUI_LANGDLL_REGISTRY_VARAIBLES
+ ${endif}
+ !endif
+ !endif
+
+
+ !ifdef NSIS_CONFIG_SILENT_SUPPORT
+ ${endif}
+ !endif
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_LANGDLL_SAVELANGUAGE
+
+ ;Save language in registry
+
+ !ifndef MUI_PAGE_UNINSTALLER
+
+ IfAbort mui.langdllsavelanguage_abort
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+ WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
+ !endif
+
+ mui.langdllsavelanguage_abort:
+
+ !endif
+
+!macroend
+
+!macro MUI_UNGETLANGUAGE
+
+ ;Get language from registry in uninstaller
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_LANGDLL_VARIABLES
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ ReadRegStr $mui.LangDLL.RegistryLanguage "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
+
+ ${if} $mui.LangDLL.RegistryLanguage = ""
+
+ !endif
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ ${else}
+ StrCpy $LANGUAGE $mui.LangDLL.RegistryLanguage
+ ${endif}
+
+ !endif
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Rerserve LangDLL file
+
+!macro MUI_RESERVEFILE_LANGDLL
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
+
+ !verbose pop
+
+!macroend
diff --git a/Contrib/Modern UI 2/MUI2.nsh b/Contrib/Modern UI 2/MUI2.nsh
index 5e3a64c..ab034cd 100755
--- a/Contrib/Modern UI 2/MUI2.nsh
+++ b/Contrib/Modern UI 2/MUI2.nsh
@@ -1,123 +1,123 @@
-/*
-
-NSIS Modern User Interface - Version 2.0 beta
-Copyright © 2002-2007 Joost Verburg
-
-*/
-
-!echo "NSIS Modern User Interface version 2.0 beta - © 2002-2007 Joost Verburg"
-
-;--------------------------------
-
-!ifndef MUI_INCLUDED
-!define MUI_INCLUDED
-
-!define MUI_SYSVERSION "2.0beta"
-
-!verbose push
-
-!ifndef MUI_VERBOSE
- !define MUI_VERBOSE 3
-!endif
-
-!verbose ${MUI_VERBOSE}
-
-!addincludedir "${NSISDIR}\Contrib\Modern UI 2"
-
-;--------------------------------
-;Header files required by MUI
-
-!include WinMessages.nsh
-!include LogicLib.nsh
-!include nsDialogs.nsh
-!include LangFile.nsh
-
-!define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
-
-
-;--------------------------------
-;Macros for compile-time defines
-
-!macro MUI_DEFAULT SYMBOL CONTENT
-
- ;Define symbol if not yet defined
- ;For setting default values
-
- !ifndef "${SYMBOL}"
- !define "${SYMBOL}" "${CONTENT}"
- !endif
-
-!macroend
-
-!macro MUI_SET SYMBOL CONTENT
-
- ;Define symbol and undefine if neccesary
-
- !insertmacro MUI_UNSET "${SYMBOL}"
- !define "${SYMBOL}" "${CONTENT}"
-
-!macroend
-
-!macro MUI_UNSET SYMBOL
-
- ;Undefine symbol if defined
-
- !ifdef "${SYMBOL}"
- !undef "${SYMBOL}"
- !endif
-
-!macroend
-
-
-;--------------------------------
-;MUI interface
-
-!include "Interface.nsh"
-!include "Localization.nsh"
-!include "Pages.nsh"
-
-
-;--------------------------------
-;Pages
-
-!include "Pages\Components.nsh"
-!include "Pages\Directory.nsh"
-!include "Pages\Finish.nsh"
-!include "Pages\InstallFiles.nsh"
-!include "Pages\License.nsh"
-!include "Pages\StartMenu.nsh"
-!include "Pages\UninstallConfirm.nsh"
-!include "Pages\Welcome.nsh"
-
-
-;--------------------------------
-;Insert MUI code in script
-
-!macro MUI_INSERT
-
- !ifndef MUI_INSERT
- !define MUI_INSERT
-
- ;This macro is included when the first language file is included,
- ;after the pages.
-
- ;Interface settings
- !insertmacro MUI_INTERFACE
-
- ;Interface functions - Installer
- !insertmacro MUI_FUNCTION_GUIINIT
- !insertmacro MUI_FUNCTION_ABORTWARNING
-
- ;Interface functions - Uninstaller
- !ifdef MUI_UNINSTALLER
- !insertmacro MUI_UNFUNCTION_GUIINIT
- !insertmacro MUI_FUNCTION_UNABORTWARNING
- !endif
-
- !endif
-
-!macroend
-
-!endif
-
-!verbose pop
+/*
+
+NSIS Modern User Interface - Version 2.0 beta
+Copyright © 2002-2007 Joost Verburg
+
+*/
+
+!echo "NSIS Modern User Interface version 2.0 beta - © 2002-2007 Joost Verburg"
+
+;--------------------------------
+
+!ifndef MUI_INCLUDED
+!define MUI_INCLUDED
+
+!define MUI_SYSVERSION "2.0beta"
+
+!verbose push
+
+!ifndef MUI_VERBOSE
+ !define MUI_VERBOSE 3
+!endif
+
+!verbose ${MUI_VERBOSE}
+
+!addincludedir "${NSISDIR}\Contrib\Modern UI 2"
+
+;--------------------------------
+;Header files required by MUI
+
+!include WinMessages.nsh
+!include LogicLib.nsh
+!include nsDialogs.nsh
+!include LangFile.nsh
+
+!define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
+
+
+;--------------------------------
+;Macros for compile-time defines
+
+!macro MUI_DEFAULT SYMBOL CONTENT
+
+ ;Define symbol if not yet defined
+ ;For setting default values
+
+ !ifndef "${SYMBOL}"
+ !define "${SYMBOL}" "${CONTENT}"
+ !endif
+
+!macroend
+
+!macro MUI_SET SYMBOL CONTENT
+
+ ;Define symbol and undefine if neccesary
+
+ !insertmacro MUI_UNSET "${SYMBOL}"
+ !define "${SYMBOL}" "${CONTENT}"
+
+!macroend
+
+!macro MUI_UNSET SYMBOL
+
+ ;Undefine symbol if defined
+
+ !ifdef "${SYMBOL}"
+ !undef "${SYMBOL}"
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;MUI interface
+
+!include "Interface.nsh"
+!include "Localization.nsh"
+!include "Pages.nsh"
+
+
+;--------------------------------
+;Pages
+
+!include "Pages\Components.nsh"
+!include "Pages\Directory.nsh"
+!include "Pages\Finish.nsh"
+!include "Pages\InstallFiles.nsh"
+!include "Pages\License.nsh"
+!include "Pages\StartMenu.nsh"
+!include "Pages\UninstallConfirm.nsh"
+!include "Pages\Welcome.nsh"
+
+
+;--------------------------------
+;Insert MUI code in script
+
+!macro MUI_INSERT
+
+ !ifndef MUI_INSERT
+ !define MUI_INSERT
+
+ ;This macro is included when the first language file is included,
+ ;after the pages.
+
+ ;Interface settings
+ !insertmacro MUI_INTERFACE
+
+ ;Interface functions - Installer
+ !insertmacro MUI_FUNCTION_GUIINIT
+ !insertmacro MUI_FUNCTION_ABORTWARNING
+
+ ;Interface functions - Uninstaller
+ !ifdef MUI_UNINSTALLER
+ !insertmacro MUI_UNFUNCTION_GUIINIT
+ !insertmacro MUI_FUNCTION_UNABORTWARNING
+ !endif
+
+ !endif
+
+!macroend
+
+!endif
+
+!verbose pop
diff --git a/Contrib/Modern UI 2/Pages.nsh b/Contrib/Modern UI 2/Pages.nsh
index 55a3e5e..cf0cb51 100755
--- a/Contrib/Modern UI 2/Pages.nsh
+++ b/Contrib/Modern UI 2/Pages.nsh
@@ -1,160 +1,160 @@
-/*
-
-NSIS Modern User Interface
-Support code for all pages
-
-*/
-
-;--------------------------------
-;Page initialization
-
-!macro MUI_PAGE_INIT
-
- ;Include interface settings in neccesary
- !insertmacro MUI_INTERFACE
-
- ;Define settings for installer page
- !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER
- !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_PREFIX
- !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_FUNCPREFIX
-
- !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX ""
- !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX ""
-
- ;Generate unique ID
- !insertmacro MUI_UNSET MUI_UNIQUEID
- !define MUI_UNIQUEID ${__LINE__}
-
-!macroend
-
-!macro MUI_UNPAGE_INIT
-
- ;Include interface settings
- !insertmacro MUI_INTERFACE
-
- ;Define prefixes for uninstaller page
- !insertmacro MUI_SET MUI_UNINSTALLER ""
-
- !insertmacro MUI_SET MUI_PAGE_UNINSTALLER ""
- !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX "UN"
- !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX "un."
-
- ;Generate unique ID
- !insertmacro MUI_UNSET MUI_UNIQUEID
- !define MUI_UNIQUEID ${__LINE__}
-
-!macroend
-
-
-;--------------------------------
-;Header text for standard MUI page
-
-!macro MUI_HEADER_TEXT_PAGE TEXT SUBTEXT
-
- !ifdef MUI_PAGE_HEADER_TEXT & MUI_PAGE_HEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
- !else ifdef MUI_PAGE_HEADER_TEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${SUBTEXT}"
- !else ifdef MUI_PAGE_HEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
- !else
- !insertmacro MUI_HEADER_TEXT "${TEXT}" "${SUBTEXT}"
- !endif
-
- !insertmacro MUI_UNSET MUI_PAGE_HEADER_TEXT
- !insertmacro MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
-
-!macroend
-
-
-;--------------------------------
-;Header text for custom page
-
-!macro MUI_HEADER_TEXT TEXT SUBTEXT ;Called from script
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifdef MUI_HEADER_TRANSPARENT_TEXT
- LockWindow on
- !endif
-
- SendMessage $mui.Header.Text ${WM_SETTEXT} 0 "STR:${TEXT}"
- SendMessage $mui.Header.SubText ${WM_SETTEXT} 0 "STR:${SUBTEXT}"
-
- !ifdef MUI_HEADER_TRANSPARENT_TEXT
- LockWindow off
- !endif
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Custom page functions
-
-!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
-
- !ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
- Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
- !undef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Support for full window pages (like welcome/finish page)
-
-!macro MUI_PAGE_FUNCTION_FULLWINDOW
-
- !ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
- !define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
-
- Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
-
- LockWindow on
-
- ;The branding text needs to be hidden because the full windows page
- ;overlaps with it.
- ShowWindow $mui.Branding.Background ${SW_HIDE}
- ShowWindow $mui.Branding.Text ${SW_HIDE}
-
- ;The texts need to be hidden because otherwise they may show through
- ;the page above when the Alt key is pressed.
- ShowWindow $mui.Header.Text ${SW_HIDE}
- ShowWindow $mui.Header.SubText ${SW_HIDE}
- ShowWindow $mui.Header.Image ${SW_HIDE}
-
- ;Show line below full width of page
- ShowWindow $mui.Line.Standard ${SW_HIDE}
- ShowWindow $mui.Line.FullWindow ${SW_NORMAL}
-
- LockWindow off
-
- FunctionEnd
-
- Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
-
- ;Set everything back to normal again
-
- LockWindow on
-
- ShowWindow $mui.Branding.Background ${SW_NORMAL}
- ShowWindow $mui.Branding.Text ${SW_NORMAL}
-
- ShowWindow $mui.Header.Text ${SW_NORMAL}
- ShowWindow $mui.Header.SubText ${SW_NORMAL}
- ShowWindow $mui.Header.Image ${SW_NORMAL}
-
- ShowWindow $mui.Line.Standard ${SW_NORMAL}
- ShowWindow $mui.Line.FullWindow ${SW_HIDE}
-
- LockWindow off
-
- FunctionEnd
-
- !endif
-
-!macroend
+/*
+
+NSIS Modern User Interface
+Support code for all pages
+
+*/
+
+;--------------------------------
+;Page initialization
+
+!macro MUI_PAGE_INIT
+
+ ;Include interface settings in neccesary
+ !insertmacro MUI_INTERFACE
+
+ ;Define settings for installer page
+ !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER
+ !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_PREFIX
+ !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_FUNCPREFIX
+
+ !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX ""
+ !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX ""
+
+ ;Generate unique ID
+ !insertmacro MUI_UNSET MUI_UNIQUEID
+ !define MUI_UNIQUEID ${__LINE__}
+
+!macroend
+
+!macro MUI_UNPAGE_INIT
+
+ ;Include interface settings
+ !insertmacro MUI_INTERFACE
+
+ ;Define prefixes for uninstaller page
+ !insertmacro MUI_SET MUI_UNINSTALLER ""
+
+ !insertmacro MUI_SET MUI_PAGE_UNINSTALLER ""
+ !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_PREFIX "UN"
+ !insertmacro MUI_SET MUI_PAGE_UNINSTALLER_FUNCPREFIX "un."
+
+ ;Generate unique ID
+ !insertmacro MUI_UNSET MUI_UNIQUEID
+ !define MUI_UNIQUEID ${__LINE__}
+
+!macroend
+
+
+;--------------------------------
+;Header text for standard MUI page
+
+!macro MUI_HEADER_TEXT_PAGE TEXT SUBTEXT
+
+ !ifdef MUI_PAGE_HEADER_TEXT & MUI_PAGE_HEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
+ !else ifdef MUI_PAGE_HEADER_TEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${SUBTEXT}"
+ !else ifdef MUI_PAGE_HEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
+ !else
+ !insertmacro MUI_HEADER_TEXT "${TEXT}" "${SUBTEXT}"
+ !endif
+
+ !insertmacro MUI_UNSET MUI_PAGE_HEADER_TEXT
+ !insertmacro MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
+
+!macroend
+
+
+;--------------------------------
+;Header text for custom page
+
+!macro MUI_HEADER_TEXT TEXT SUBTEXT ;Called from script
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifdef MUI_HEADER_TRANSPARENT_TEXT
+ LockWindow on
+ !endif
+
+ SendMessage $mui.Header.Text ${WM_SETTEXT} 0 "STR:${TEXT}"
+ SendMessage $mui.Header.SubText ${WM_SETTEXT} 0 "STR:${SUBTEXT}"
+
+ !ifdef MUI_HEADER_TRANSPARENT_TEXT
+ LockWindow off
+ !endif
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Custom page functions
+
+!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
+
+ !ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
+ Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
+ !undef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Support for full window pages (like welcome/finish page)
+
+!macro MUI_PAGE_FUNCTION_FULLWINDOW
+
+ !ifndef MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
+ !define MUI_${MUI_PAGE_UNINSTALLER_PREFIX}PAGE_FUNCTION_FULLWINDOW
+
+ Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
+
+ LockWindow on
+
+ ;The branding text needs to be hidden because the full windows page
+ ;overlaps with it.
+ ShowWindow $mui.Branding.Background ${SW_HIDE}
+ ShowWindow $mui.Branding.Text ${SW_HIDE}
+
+ ;The texts need to be hidden because otherwise they may show through
+ ;the page above when the Alt key is pressed.
+ ShowWindow $mui.Header.Text ${SW_HIDE}
+ ShowWindow $mui.Header.SubText ${SW_HIDE}
+ ShowWindow $mui.Header.Image ${SW_HIDE}
+
+ ;Show line below full width of page
+ ShowWindow $mui.Line.Standard ${SW_HIDE}
+ ShowWindow $mui.Line.FullWindow ${SW_NORMAL}
+
+ LockWindow off
+
+ FunctionEnd
+
+ Function ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
+
+ ;Set everything back to normal again
+
+ LockWindow on
+
+ ShowWindow $mui.Branding.Background ${SW_NORMAL}
+ ShowWindow $mui.Branding.Text ${SW_NORMAL}
+
+ ShowWindow $mui.Header.Text ${SW_NORMAL}
+ ShowWindow $mui.Header.SubText ${SW_NORMAL}
+ ShowWindow $mui.Header.Image ${SW_NORMAL}
+
+ ShowWindow $mui.Line.Standard ${SW_NORMAL}
+ ShowWindow $mui.Line.FullWindow ${SW_HIDE}
+
+ LockWindow off
+
+ FunctionEnd
+
+ !endif
+
+!macroend
diff --git a/Contrib/Modern UI 2/Pages/Components.nsh b/Contrib/Modern UI 2/Pages/Components.nsh
index a187803..3af12ce 100755
--- a/Contrib/Modern UI 2/Pages/Components.nsh
+++ b/Contrib/Modern UI 2/Pages/Components.nsh
@@ -1,215 +1,215 @@
-/*
-
-NSIS Modern User Interface
-Components page
-
-*/
-
-;--------------------------------
-;Page interface settings and variables
-
-!macro MUI_COMPONENTSPAGE_INTERFACE
-
- !ifndef MUI_COMPONENTSPAGE_INTERFACE
- !define MUI_COMPONENTSPAGE_INTERFACE
- Var mui.ComponentsPage
-
- Var mui.ComponentsPage.Text
- Var mui.ComponentsPage.InstTypesText
- Var mui.ComponentsPage.ComponentsText
-
- Var mui.ComponentsPage.InstTypes
- Var mui.ComponentsPage.Components
-
- Var mui.ComponentsPage.DescriptionTitle
- Var mui.ComponentsPage.DescriptionText.Info
- Var mui.ComponentsPage.DescriptionText
-
- Var mui.ComponentsPage.SpaceRequired
-
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
-
- !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\modern_smalldesc.exe"
- !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\modern_nodesc.exe"
-
- ;Apply settings
-
- !ifdef MUI_COMPONENTSPAGE_SMALLDESC
- ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_SMALLDESC}"
- !else ifdef MUI_COMPONENTSPAGE_NODESC
- ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_NODESC}"
- !endif
-
- CheckBitmap "${MUI_COMPONENTSPAGE_CHECKBITMAP}"
-
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Page declaration
-
-!macro MUI_PAGEDECLARATION_COMPONENTS
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}COMPONENTSPAGE ""
- !insertmacro MUI_COMPONENTSPAGE_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_TOP ""
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_COMPLIST ""
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_INSTTYPE ""
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE)"
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}components
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- ComponentText "${MUI_COMPONENTSPAGE_TEXT_TOP}" "${MUI_COMPONENTSPAGE_TEXT_INSTTYPE}" "${MUI_COMPONENTSPAGE_TEXT_COMPLIST}"
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_COMPONENTSPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
-
- !undef MUI_COMPONENTSPAGE_TEXT_TOP
- !undef MUI_COMPONENTSPAGE_TEXT_COMPLIST
- !undef MUI_COMPONENTSPAGE_TEXT_INSTTYPE
- !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
- !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
-
-!macroend
-
-!macro MUI_PAGE_COMPONENTS
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_COMPONENTS
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_COMPONENTS
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_COMPONENTS
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Page functions
-
-!macro MUI_FUNCTION_COMPONENTSPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_SUBTITLE)
- FunctionEnd
-
- Function "${SHOW}"
-
- ;Get control hanldes
- FindWindow $mui.ComponentsPage "#32770" "" $HWNDPARENT
- GetDlgItem $mui.ComponentsPage.Text $mui.ComponentsPage 1006
- GetDlgItem $mui.ComponentsPage.InstTypesText $mui.ComponentsPage 1021
- GetDlgItem $mui.ComponentsPage.ComponentsText $mui.ComponentsPage 1022
- GetDlgItem $mui.ComponentsPage.InstTypes $mui.ComponentsPage 1017
- GetDlgItem $mui.ComponentsPage.Components $mui.ComponentsPage 1032
- GetDlgItem $mui.ComponentsPage.DescriptionTitle $mui.ComponentsPage 1042
- GetDlgItem $mui.ComponentsPage.DescriptionText $mui.ComponentsPage 1043
- GetDlgItem $mui.ComponentsPage.SpaceRequired $mui.ComponentsPage 1023
-
- ;Default text in description textbox
- SendMessage $mui.ComponentsPage.DescriptionTitle ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
- EnableWindow $mui.ComponentsPage.DescriptionText 0
- SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
-
- StrCpy $mui.ComponentsPage.DescriptionText.Info "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}" ;Text for current components page
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-
-;--------------------------------
-;Script functions for components descriptions
-
-!macro MUI_DESCRIPTION_BEGIN
-
- ${if} $0 == -1
- ;No mouse hover over component in list
- SendMessage $mui.ComponentsPage.Description ${WM_SETTEXT} 0 "STR:"
- EnableWindow $mui.ComponentsPage.Description 0
- SendMessage $mui.ComponentsPage.Description ${WM_SETTEXT} 0 "STR:$mui.ComponentsPage.DescriptionText.Info"
-
-!macroend
-
-!macro MUI_DESCRIPTION_TEXT VAR TEXT
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- ${elseif} $0 == ${VAR}
- SendMessage $mui.ComponentsPage.Description ${WM_SETTEXT} 0 "STR:"
- EnableWindow $mui.ComponentsPage.Description 1
- SendMessage $mui.ComponentsPage.Description ${WM_SETTEXT} 0 "STR:${TEXT}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_DESCRIPTION_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- ${endif}
-
- !verbose pop
-
-!macroend
-
-!macro MUI_FUNCTION_DESCRIPTION_BEGIN
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- Function .onMouseOverSection
- !insertmacro MUI_DESCRIPTION_BEGIN
-
- !verbose pop
-
-!macroend
-
-!macro MUI_FUNCTION_DESCRIPTION_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_DESCRIPTION_END
- !ifdef MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION
- Call "${MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION}"
- !endif
- FunctionEnd
-
- !verbose pop
-
-!macroend
+/*
+
+NSIS Modern User Interface
+Components page
+
+*/
+
+;--------------------------------
+;Page interface settings and variables
+
+!macro MUI_COMPONENTSPAGE_INTERFACE
+
+ !ifndef MUI_COMPONENTSPAGE_INTERFACE
+ !define MUI_COMPONENTSPAGE_INTERFACE
+ Var mui.ComponentsPage
+
+ Var mui.ComponentsPage.Text
+ Var mui.ComponentsPage.InstTypesText
+ Var mui.ComponentsPage.ComponentsText
+
+ Var mui.ComponentsPage.InstTypes
+ Var mui.ComponentsPage.Components
+
+ Var mui.ComponentsPage.DescriptionTitle
+ Var mui.ComponentsPage.DescriptionText.Info
+ Var mui.ComponentsPage.DescriptionText
+
+ Var mui.ComponentsPage.SpaceRequired
+
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
+
+ !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\modern_smalldesc.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\modern_nodesc.exe"
+
+ ;Apply settings
+
+ !ifdef MUI_COMPONENTSPAGE_SMALLDESC
+ ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_SMALLDESC}"
+ !else ifdef MUI_COMPONENTSPAGE_NODESC
+ ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_NODESC}"
+ !endif
+
+ CheckBitmap "${MUI_COMPONENTSPAGE_CHECKBITMAP}"
+
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Page declaration
+
+!macro MUI_PAGEDECLARATION_COMPONENTS
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}COMPONENTSPAGE ""
+ !insertmacro MUI_COMPONENTSPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_TOP ""
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_COMPLIST ""
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_INSTTYPE ""
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE)"
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}components
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ ComponentText "${MUI_COMPONENTSPAGE_TEXT_TOP}" "${MUI_COMPONENTSPAGE_TEXT_INSTTYPE}" "${MUI_COMPONENTSPAGE_TEXT_COMPLIST}"
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_COMPONENTSPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
+
+ !undef MUI_COMPONENTSPAGE_TEXT_TOP
+ !undef MUI_COMPONENTSPAGE_TEXT_COMPLIST
+ !undef MUI_COMPONENTSPAGE_TEXT_INSTTYPE
+ !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
+ !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
+
+!macroend
+
+!macro MUI_PAGE_COMPONENTS
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_COMPONENTS
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_COMPONENTS
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_COMPONENTS
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Page functions
+
+!macro MUI_FUNCTION_COMPONENTSPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_SUBTITLE)
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ ;Get control hanldes
+ FindWindow $mui.ComponentsPage "#32770" "" $HWNDPARENT
+ GetDlgItem $mui.ComponentsPage.Text $mui.ComponentsPage 1006
+ GetDlgItem $mui.ComponentsPage.InstTypesText $mui.ComponentsPage 1021
+ GetDlgItem $mui.ComponentsPage.ComponentsText $mui.ComponentsPage 1022
+ GetDlgItem $mui.ComponentsPage.InstTypes $mui.ComponentsPage 1017
+ GetDlgItem $mui.ComponentsPage.Components $mui.ComponentsPage 1032
+ GetDlgItem $mui.ComponentsPage.DescriptionTitle $mui.ComponentsPage 1042
+ GetDlgItem $mui.ComponentsPage.DescriptionText $mui.ComponentsPage 1043
+ GetDlgItem $mui.ComponentsPage.SpaceRequired $mui.ComponentsPage 1023
+
+ ;Default text in description textbox
+ SendMessage $mui.ComponentsPage.DescriptionTitle ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
+ EnableWindow $mui.ComponentsPage.DescriptionText 0
+ SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
+
+ StrCpy $mui.ComponentsPage.DescriptionText.Info "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}" ;Text for current components page
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+
+;--------------------------------
+;Script functions for components descriptions
+
+!macro MUI_DESCRIPTION_BEGIN
+
+ ${if} $0 == -1
+ ;No mouse hover over component in list
+ SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
+ EnableWindow $mui.ComponentsPage.DescriptionText 0
+ SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:$mui.ComponentsPage.DescriptionText.Info"
+
+!macroend
+
+!macro MUI_DESCRIPTION_TEXT VAR TEXT
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ ${elseif} $0 == ${VAR}
+ SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
+ EnableWindow $mui.ComponentsPage.DescriptionText 1
+ SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:${TEXT}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_DESCRIPTION_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ ${endif}
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_FUNCTION_DESCRIPTION_BEGIN
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ Function .onMouseOverSection
+ !insertmacro MUI_DESCRIPTION_BEGIN
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_FUNCTION_DESCRIPTION_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_DESCRIPTION_END
+ !ifdef MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION
+ Call "${MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION}"
+ !endif
+ FunctionEnd
+
+ !verbose pop
+
+!macroend
diff --git a/Contrib/Modern UI 2/Pages/Directory.nsh b/Contrib/Modern UI 2/Pages/Directory.nsh
index 04b74c2..ba999bc 100755
--- a/Contrib/Modern UI 2/Pages/Directory.nsh
+++ b/Contrib/Modern UI 2/Pages/Directory.nsh
@@ -1,125 +1,125 @@
-/*
-
-NSIS Modern User Interface
-Directory page
-
-*/
-
-;--------------------------------
-;Page interface settings and variables
-
-!macro MUI_DIRECTORYPAGE_INTERFACE
-
- !ifndef MUI_DIRECTORYPAGE_INTERFACE
- !define MUI_DIRECTORYPAGE_INTERFACE
- Var mui.DirectoryPage
-
- Var mui.DirectoryPage.Text
-
- Var mui.DirectoryPage.DirectoryBox
- Var mui.DirectoryPage.Directory
- Var mui.DirectoryPage.BrowseButton
-
- Var mui.DirectoryPage.SpaceRequired
- Var mui.DirectoryPage.SpaceAvailable
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Page declaration
-
-!macro MUI_PAGEDECLARATION_DIRECTORY
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}DIRECTORYPAGE ""
- !insertmacro MUI_DIRECTORYPAGE_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP ""
- !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION ""
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}directory
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- DirText "${MUI_DIRECTORYPAGE_TEXT_TOP}" "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
-
- !ifdef MUI_DIRECTORYPAGE_VARIABLE
- DirVar "${MUI_DIRECTORYPAGE_VARIABLE}"
- !endif
-
- !ifdef MUI_DIRECTORYPAGE_VERIFYONLEAVE
- DirVerify leave
- !endif
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_DIRECTORYPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
-
- !undef MUI_DIRECTORYPAGE_TEXT_TOP
- !undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
- !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VARIABLE
- !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VERIFYONLEAVE
-
-!macroend
-
-!macro MUI_PAGE_DIRECTORY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_DIRECTORY
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_DIRECTORY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_DIRECTORY
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Page functions
-
-!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_SUBTITLE)
- FunctionEnd
-
- Function "${SHOW}"
-
- ;Get control handles
- FindWindow $mui.DirectoryPage "#32770" "" $HWNDPARENT
- GetDlgItem $mui.DirectoryPage.Text $mui.DirectoryPage 1006
- GetDlgItem $mui.DirectoryPage.DirectoryBox $mui.DirectoryPage 1020
- GetDlgItem $mui.DirectoryPage.Directory $mui.DirectoryPage 1019
- GetDlgItem $mui.DirectoryPage.BrowseButton $mui.DirectoryPage 1001
- GetDlgItem $mui.DirectoryPage.SpaceRequired $mui.DirectoryPage 1023
- GetDlgItem $mui.DirectoryPage.SpaceAvailable $mui.DirectoryPage 1024
-
- !ifdef MUI_DIRECTORYPAGE_BGCOLOR
- SetCtlColors $mui.DirectoryPage.BrowseBox "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
- !endif
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
- FunctionEnd
-
- Function "${LEAVE}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
- FunctionEnd
-
-!macroend
+/*
+
+NSIS Modern User Interface
+Directory page
+
+*/
+
+;--------------------------------
+;Page interface settings and variables
+
+!macro MUI_DIRECTORYPAGE_INTERFACE
+
+ !ifndef MUI_DIRECTORYPAGE_INTERFACE
+ !define MUI_DIRECTORYPAGE_INTERFACE
+ Var mui.DirectoryPage
+
+ Var mui.DirectoryPage.Text
+
+ Var mui.DirectoryPage.DirectoryBox
+ Var mui.DirectoryPage.Directory
+ Var mui.DirectoryPage.BrowseButton
+
+ Var mui.DirectoryPage.SpaceRequired
+ Var mui.DirectoryPage.SpaceAvailable
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Page declaration
+
+!macro MUI_PAGEDECLARATION_DIRECTORY
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}DIRECTORYPAGE ""
+ !insertmacro MUI_DIRECTORYPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP ""
+ !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION ""
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}directory
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ DirText "${MUI_DIRECTORYPAGE_TEXT_TOP}" "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
+
+ !ifdef MUI_DIRECTORYPAGE_VARIABLE
+ DirVar "${MUI_DIRECTORYPAGE_VARIABLE}"
+ !endif
+
+ !ifdef MUI_DIRECTORYPAGE_VERIFYONLEAVE
+ DirVerify leave
+ !endif
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_DIRECTORYPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
+
+ !undef MUI_DIRECTORYPAGE_TEXT_TOP
+ !undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
+ !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VARIABLE
+ !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VERIFYONLEAVE
+
+!macroend
+
+!macro MUI_PAGE_DIRECTORY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_DIRECTORY
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_DIRECTORY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_DIRECTORY
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Page functions
+
+!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_SUBTITLE)
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ ;Get control handles
+ FindWindow $mui.DirectoryPage "#32770" "" $HWNDPARENT
+ GetDlgItem $mui.DirectoryPage.Text $mui.DirectoryPage 1006
+ GetDlgItem $mui.DirectoryPage.DirectoryBox $mui.DirectoryPage 1020
+ GetDlgItem $mui.DirectoryPage.Directory $mui.DirectoryPage 1019
+ GetDlgItem $mui.DirectoryPage.BrowseButton $mui.DirectoryPage 1001
+ GetDlgItem $mui.DirectoryPage.SpaceRequired $mui.DirectoryPage 1023
+ GetDlgItem $mui.DirectoryPage.SpaceAvailable $mui.DirectoryPage 1024
+
+ !ifdef MUI_DIRECTORYPAGE_BGCOLOR
+ SetCtlColors $mui.DirectoryPage.DirectoryBox "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
+ !endif
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+ FunctionEnd
+
+ Function "${LEAVE}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+ FunctionEnd
+
+!macroend
diff --git a/Contrib/Modern UI 2/Pages/Finish.nsh b/Contrib/Modern UI 2/Pages/Finish.nsh
index a1161e4..f010dd6 100755
--- a/Contrib/Modern UI 2/Pages/Finish.nsh
+++ b/Contrib/Modern UI 2/Pages/Finish.nsh
@@ -60,7 +60,6 @@ Finish page (implemented using nsDialogs)
!ifndef MUI_FINISHPAGE_LINK_VARIABLES
!define MUI_FINISHPAGE_LINK_VARIABLES
Var mui.FinishPage.Link
- Var mui.FinishPage.Link.Label
!endif
!endif
@@ -359,9 +358,9 @@ Finish page (implemented using nsDialogs)
;Finish text
!ifndef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
- ${NSD_CreateLabel} 120u 45u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT}u "${MUI_FINISHPAGE_TEXT}"
+ ${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT}u "${MUI_FINISHPAGE_TEXT}"
!else
- ${NSD_CreateLabel} 120u 45u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT}"
+ ${NSD_CreateLabel} 120u ${MUI_FINISHPAGE_TEXT_TOP}u 195u ${MUI_FINISHPAGE_TEXT_HEIGHT_BUTTONS}u "${MUI_FINISHPAGE_TEXT}"
!endif
Pop $mui.FinishPage.Text
SetCtlColors $mui.FinishPage.Text "" "${MUI_BGCOLOR}"
@@ -386,11 +385,9 @@ Finish page (implemented using nsDialogs)
;Link
!ifdef MUI_FINISHPAGE_LINK
- ${NSD_CreateLabel} 120u 175u 195u 10u "${MUI_FINISHPAGE_LINK}"
- Pop $mui.FinishPage.Link.Label
${NSD_CreateLink} 120u 175u 195u 10u "${MUI_FINISHPAGE_LINK}"
Pop $mui.FinishPage.Link
- SetCtlColors $mui.FinishPage.Link.Label "${MUI_FINISHPAGE_LINK_COLOR}" "${MUI_BGCOLOR}"
+ SetCtlColors $mui.FinishPage.Link "${MUI_FINISHPAGE_LINK_COLOR}" "${MUI_BGCOLOR}"
${NSD_OnClick} $mui.FinishPage.Link "${LINK}"
!endif
diff --git a/Contrib/Modern UI 2/Pages/InstallFiles.nsh b/Contrib/Modern UI 2/Pages/InstallFiles.nsh
index 65f382e..868ae17 100755
--- a/Contrib/Modern UI 2/Pages/InstallFiles.nsh
+++ b/Contrib/Modern UI 2/Pages/InstallFiles.nsh
@@ -1,149 +1,149 @@
-/*
-
-NSIS Modern User Interface
-InstallFiles page
-
-*/
-
-;--------------------------------
-;Page interface settings and variables
-
-!macro MUI_INSTFILESPAGE_INTERFACE
-
- !ifndef MUI_INSTFILESYPAGE_INTERFACE
- !define MUI_INSTFILESYPAGE_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
- !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
-
- Var mui.InstFilesPage
-
- Var mui.InstFilesPage.Text
- Var mui.InstFilesPage.ProgressBar
- Var mui.InstFilesPage.ShowLogButton
- Var mui.InstFilesPage.Log
-
- ;Apply settings
- InstallColors ${MUI_INSTFILESPAGE_COLORS}
- InstProgressFlags ${MUI_INSTFILESPAGE_PROGRESSBAR}
- SubCaption 4 " "
- UninstallSubCaption 2 " "
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Page declaration
-
-!macro MUI_PAGEDECLARATION_INSTFILES
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INSTFILESPAGE ""
- !insertmacro MUI_INSTFILESPAGE_INTERFACE
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}instfiles
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_INSTFILESPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_TEXT
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_TEXT
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_SUBTEXT
-
-!macroend
-
-!macro MUI_PAGE_INSTFILES
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_INSTFILES
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_INSTFILES
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_INSTFILES
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Page functions
-
-!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_SUBTITLE)
-
- FunctionEnd
-
- Function "${SHOW}"
-
- ;Get controls handles
- FindWindow $mui.InstFilesPage "#32770" "" $HWNDPARENT
- GetDlgItem $mui.InstFilesPage.Text $mui.InstFilesPage 1006
- GetDlgItem $mui.InstFilesPage.ProgressBar $mui.InstFilesPage 1004
- GetDlgItem $mui.InstFilesPage.ShowLogButton $mui.InstFilesPage 1027
- GetDlgItem $mui.InstFilesPage.Log $mui.InstFilesPage 1016
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- ;Set text on completed page header
-
- IfAbort mui.endheader_abort
-
- !ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT & MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
- !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
- !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
- !else
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
- !endif
-
- Goto mui.endheader_done
-
- mui.endheader_abort:
-
- !ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT & MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
- !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
- !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
- !else
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
- !endif
-
- mui.endheader_done:
-
- !insertmacro MUI_LANGDLL_SAVELANGUAGE
-
- FunctionEnd
-
-!macroend
+/*
+
+NSIS Modern User Interface
+InstallFiles page
+
+*/
+
+;--------------------------------
+;Page interface settings and variables
+
+!macro MUI_INSTFILESPAGE_INTERFACE
+
+ !ifndef MUI_INSTFILESYPAGE_INTERFACE
+ !define MUI_INSTFILESYPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
+ !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
+
+ Var mui.InstFilesPage
+
+ Var mui.InstFilesPage.Text
+ Var mui.InstFilesPage.ProgressBar
+ Var mui.InstFilesPage.ShowLogButton
+ Var mui.InstFilesPage.Log
+
+ ;Apply settings
+ InstallColors ${MUI_INSTFILESPAGE_COLORS}
+ InstProgressFlags ${MUI_INSTFILESPAGE_PROGRESSBAR}
+ SubCaption 4 " "
+ UninstallSubCaption 2 " "
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Page declaration
+
+!macro MUI_PAGEDECLARATION_INSTFILES
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INSTFILESPAGE ""
+ !insertmacro MUI_INSTFILESPAGE_INTERFACE
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}instfiles
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_INSTFILESPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_TEXT
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_TEXT
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_SUBTEXT
+
+!macroend
+
+!macro MUI_PAGE_INSTFILES
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_INSTFILES
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_INSTFILES
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_INSTFILES
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Page functions
+
+!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_SUBTITLE)
+
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ ;Get controls handles
+ FindWindow $mui.InstFilesPage "#32770" "" $HWNDPARENT
+ GetDlgItem $mui.InstFilesPage.Text $mui.InstFilesPage 1006
+ GetDlgItem $mui.InstFilesPage.ProgressBar $mui.InstFilesPage 1004
+ GetDlgItem $mui.InstFilesPage.ShowLogButton $mui.InstFilesPage 1027
+ GetDlgItem $mui.InstFilesPage.Log $mui.InstFilesPage 1016
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ ;Set text on completed page header
+
+ IfAbort mui.endheader_abort
+
+ !ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT & MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
+ !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
+ !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
+ !else
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
+ !endif
+
+ Goto mui.endheader_done
+
+ mui.endheader_abort:
+
+ !ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT & MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
+ !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
+ !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
+ !else
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
+ !endif
+
+ mui.endheader_done:
+
+ !insertmacro MUI_LANGDLL_SAVELANGUAGE
+
+ FunctionEnd
+
+!macroend
diff --git a/Contrib/Modern UI 2/Pages/License.nsh b/Contrib/Modern UI 2/Pages/License.nsh
index c7386f0..2bcbee5 100755
--- a/Contrib/Modern UI 2/Pages/License.nsh
+++ b/Contrib/Modern UI 2/Pages/License.nsh
@@ -1,145 +1,145 @@
-/*
-
-NSIS Modern User Interface
-License page
-
-*/
-
-;--------------------------------
-;Page interface settings and variables
-
-!macro MUI_LICENSEPAGE_INTERFACE
-
- !ifndef MUI_LICENSEPAGE_INTERFACE
- !define MUI_LICENSEPAGE_INTERFACE
- Var mui.LicensePage
-
- Var mui.Licensepage.TopText
- Var mui.Licensepage.Text
- Var mui.Licensepage.LicenseText
-
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BGCOLOR "/windows"
-
- ;Apply settings
- LicenseBkColor "${MUI_LICENSEPAGE_BGCOLOR}"
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Page declaration
-
-!macro MUI_PAGEDECLARATION_LICENSE LICENSEDATA
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}LICENSEPAGE ""
- !insertmacro MUI_LICENSEPAGE_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP "$(MUI_INNERTEXT_LICENSE_TOP)"
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BUTTON ""
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_CHECKBOX_TEXT ""
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT ""
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE ""
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}license
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- LicenseData "${LICENSEDATA}"
-
- !ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
- !ifndef MUI_LICENSEPAGE_CHECKBOX & MUI_LICENSEPAGE_RADIOBUTTONS
- LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM)" "${MUI_LICENSEPAGE_BUTTON}"
- !else ifdef MUI_LICENSEPAGE_CHECKBOX
- LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_CHECKBOX)" "${MUI_LICENSEPAGE_BUTTON}"
- !else
- LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS)" "${MUI_LICENSEPAGE_BUTTON}"
- !endif
- !else
- LicenseText "${MUI_LICENSEPAGE_TEXT_BOTTOM}" "${MUI_LICENSEPAGE_BUTTON}"
- !endif
-
- !ifdef MUI_LICENSEPAGE_CHECKBOX
- LicenseForceSelection checkbox "${MUI_LICENSEPAGE_CHECKBOX_TEXT}"
- !else ifdef MUI_LICENSEPAGE_RADIOBUTTONS
- LicenseForceSelection radiobuttons "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}" "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}"
- !endif
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_LICENSEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_TOP
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_BOTTOM
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_BUTTON
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_RADIOBUTTONS
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_ACCEPT
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_DECLINE
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_LICENSE LICENSEDATA
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_LICENSE LICENSEDATA
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Page functions
-
-!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_SUBTITLE)
-
- FunctionEnd
-
- Function "${SHOW}"
-
- ;Get conrol handles
- FindWindow $mui.LicensePage "#32770" "" $HWNDPARENT
- GetDlgItem $mui.LicensePage.TopText $mui.LicensePage 1040
- GetDlgItem $mui.LicensePage.Text $mui.LicensePage 1006
- GetDlgItem $mui.LicensePage.LicenseText $mui.LicensePage 1000
-
- ;Top text
- SendMessage $mui.LicensePage.TopText ${WM_SETTEXT} 0 "STR:${MUI_LICENSEPAGE_TEXT_TOP}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
+/*
+
+NSIS Modern User Interface
+License page
+
+*/
+
+;--------------------------------
+;Page interface settings and variables
+
+!macro MUI_LICENSEPAGE_INTERFACE
+
+ !ifndef MUI_LICENSEPAGE_INTERFACE
+ !define MUI_LICENSEPAGE_INTERFACE
+ Var mui.LicensePage
+
+ Var mui.Licensepage.TopText
+ Var mui.Licensepage.Text
+ Var mui.Licensepage.LicenseText
+
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BGCOLOR "/windows"
+
+ ;Apply settings
+ LicenseBkColor "${MUI_LICENSEPAGE_BGCOLOR}"
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Page declaration
+
+!macro MUI_PAGEDECLARATION_LICENSE LICENSEDATA
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}LICENSEPAGE ""
+ !insertmacro MUI_LICENSEPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP "$(MUI_INNERTEXT_LICENSE_TOP)"
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BUTTON ""
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_CHECKBOX_TEXT ""
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT ""
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE ""
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}license
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ LicenseData "${LICENSEDATA}"
+
+ !ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
+ !ifndef MUI_LICENSEPAGE_CHECKBOX & MUI_LICENSEPAGE_RADIOBUTTONS
+ LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM)" "${MUI_LICENSEPAGE_BUTTON}"
+ !else ifdef MUI_LICENSEPAGE_CHECKBOX
+ LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_CHECKBOX)" "${MUI_LICENSEPAGE_BUTTON}"
+ !else
+ LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS)" "${MUI_LICENSEPAGE_BUTTON}"
+ !endif
+ !else
+ LicenseText "${MUI_LICENSEPAGE_TEXT_BOTTOM}" "${MUI_LICENSEPAGE_BUTTON}"
+ !endif
+
+ !ifdef MUI_LICENSEPAGE_CHECKBOX
+ LicenseForceSelection checkbox "${MUI_LICENSEPAGE_CHECKBOX_TEXT}"
+ !else ifdef MUI_LICENSEPAGE_RADIOBUTTONS
+ LicenseForceSelection radiobuttons "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}" "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}"
+ !endif
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_LICENSEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_TOP
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_BOTTOM
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_BUTTON
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_RADIOBUTTONS
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_ACCEPT
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_DECLINE
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_LICENSE LICENSEDATA
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_LICENSE LICENSEDATA
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_LICENSE "${LICENSEDATA}"
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Page functions
+
+!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_SUBTITLE)
+
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ ;Get conrol handles
+ FindWindow $mui.LicensePage "#32770" "" $HWNDPARENT
+ GetDlgItem $mui.LicensePage.TopText $mui.LicensePage 1040
+ GetDlgItem $mui.LicensePage.Text $mui.LicensePage 1006
+ GetDlgItem $mui.LicensePage.LicenseText $mui.LicensePage 1000
+
+ ;Top text
+ SendMessage $mui.LicensePage.TopText ${WM_SETTEXT} 0 "STR:${MUI_LICENSEPAGE_TEXT_TOP}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
diff --git a/Contrib/Modern UI 2/Pages/StartMenu.nsh b/Contrib/Modern UI 2/Pages/StartMenu.nsh
index 33956e9..afd7ed4 100755
--- a/Contrib/Modern UI 2/Pages/StartMenu.nsh
+++ b/Contrib/Modern UI 2/Pages/StartMenu.nsh
@@ -1,234 +1,234 @@
-/*
-
-NSIS Modern User Interface
-Start Menu folder page
-
-*/
-
-;--------------------------------
-;Page interface settings and variables
-
-!macro MUI_STARTMENUPAGE_INTERFACE
-
- !ifndef MUI_STARTMENUPAGE_INTERFACE
- !define MUI_STARTMENUPAGE_INTERFACE
- Var mui.StartMenuPage
- Var mui.StartMenuPage.Location
- Var mui.StartMenuPage.FolderList
-
- Var mui.StartMenuPage.Create
- Var mui.StartMenuPage.ReturnValue
- !endif
-
- !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
- !ifndef MUI_STARTMENUPAGE_REGISTRY_VARIABLES
- !define MUI_STARTMENUPAGE_REGISTRY_VARIABLES
- Var mui.StartMenuPage.RegistryLocation
- !endif
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Page declaration
-
-!macro MUI_PAGEDECLARATION_STARTMENU ID VAR
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}STARTMENUPAGE ""
- !insertmacro MUI_STARTMENUPAGE_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
- !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_TOP "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_TOP)"
- !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_CHECKBOX "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_CHECKBOX)"
-
- !define MUI_STARTMENUPAGE_VARIABLE "${VAR}"
- !define "MUI_STARTMENUPAGE_${ID}_VARIABLE" "${MUI_STARTMENUPAGE_VARIABLE}"
- !define "MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
- !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
- !endif
- !ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
- !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
- !endif
- !ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
- !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
- !endif
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_STARTMENUPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
-
- !undef MUI_STARTMENUPAGE_VARIABLE
- !undef MUI_STARTMENUPAGE_TEXT_TOP
- !undef MUI_STARTMENUPAGE_TEXT_CHECKBOX
- !undef MUI_STARTMENUPAGE_DEFAULTFOLDER
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_NODISABLE
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_ROOT
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_KEY
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_VALUENAME
-
-!macroend
-
-!macro MUI_PAGE_STARTMENU ID VAR
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_STARTMENU "${ID}" "${VAR}"
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;Page functions
-
-!macro MUI_FUNCTION_STARTMENUPAGE PRE LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
-
- !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
-
- ;Get Start Menu location from registry
-
- ${if} "${MUI_STARTMENUPAGE_VARIABLE}" == ""
-
- ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
- ${if} $mui.StartMenuPage.RegistryLocation != ""
- StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" $mui.StartMenuPage.RegistryLocation
- ${endif}
-
- ${endif}
-
- !endif
-
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
-
- ${if} $(^RTL) == "0"
- !ifndef MUI_STARTMENUPAGE_NODISABLE
- StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !else
- StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !endif
- ${else}
- !ifndef MUI_STARTMENUPAGE_NODISABLE
- StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !else
- StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !endif
- ${endif}
-
- Pop $mui.StartMenuPage
-
- ;Get control handles
- GetDlgItem $mui.StartMenuPage.Location $mui.StartMenuPage 1002
- GetDlgItem $mui.StartMenuPage.FolderList $mui.StartMenuPage 1004
-
- !ifdef MUI_STARTMENUPAGE_BGCOLOR
- SetCtlColors $mui.StartMenuPage.Location "" "${MUI_STARTMENUPAGE_BGCOLOR}"
- SetCtlColors $mui.StartMenuMenu.FolderList "" "${MUI_STARTMENUPAGE_BGCOLOR}"
- !endif
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- StartMenu::Show
-
- Pop $mui.StartMenuPage.ReturnValue
- ${if} $mui.StartMenuPage.ReturnValue == "success"
- Pop "${MUI_STARTMENUPAGE_VARIABLE}"
- ${endif}
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-
-;--------------------------------
-;Script macros to get Start Menu folder
-
-!macro MUI_STARTMENU_GETFOLDER ID VAR
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- ;Get Start Menu folder from registry
- ;Can be called from the script in the uninstaller
-
- !ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
-
- ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
-
- ${if} mui.StartMenuPage.RegistryLocation != ""
- StrCpy "${VAR}" $mui.StartMenuPage.RegistryLocation
- ${else}
- StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
- ${endif}
-
- !else
-
- StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
-
- !endif
-
- !verbose pop
-
-!macroend
-
-!macro MUI_STARTMENU_WRITE_BEGIN ID
-
- ;The code in the script to write the shortcuts should be put between the
- ;MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !define MUI_STARTMENUPAGE_CURRENT_ID "${ID}"
-
- StrCpy $mui.StartMenuPage.Create "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
-
- ;If the folder start with >, the user has chosen not to create a shortcut
- ${if} $mui.StartMenuPage.Create != ">"
-
- ${if} "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" == ""
- ;Get folder from registry if the variable doesn't contain anything
- !insertmacro MUI_STARTMENU_GETFOLDER "${MUI_STARTMENUPAGE_CURRENT_ID}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
- ${endif}
-
- !verbose pop
-
-!macroend
-
-!macro MUI_STARTMENU_WRITE_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifdef MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
- ;Write folder to registry
- WriteRegStr "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
- !endif
-
- ${endif}
-
- !undef MUI_STARTMENUPAGE_CURRENT_ID
-
- !verbose pop
-
-!macroend
-
+/*
+
+NSIS Modern User Interface
+Start Menu folder page
+
+*/
+
+;--------------------------------
+;Page interface settings and variables
+
+!macro MUI_STARTMENUPAGE_INTERFACE
+
+ !ifndef MUI_STARTMENUPAGE_INTERFACE
+ !define MUI_STARTMENUPAGE_INTERFACE
+ Var mui.StartMenuPage
+ Var mui.StartMenuPage.Location
+ Var mui.StartMenuPage.FolderList
+
+ Var mui.StartMenuPage.Create
+ Var mui.StartMenuPage.ReturnValue
+ !endif
+
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+ !ifndef MUI_STARTMENUPAGE_REGISTRY_VARIABLES
+ !define MUI_STARTMENUPAGE_REGISTRY_VARIABLES
+ Var mui.StartMenuPage.RegistryLocation
+ !endif
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Page declaration
+
+!macro MUI_PAGEDECLARATION_STARTMENU ID VAR
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}STARTMENUPAGE ""
+ !insertmacro MUI_STARTMENUPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
+ !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_TOP "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_TOP)"
+ !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_CHECKBOX "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_CHECKBOX)"
+
+ !define MUI_STARTMENUPAGE_VARIABLE "${VAR}"
+ !define "MUI_STARTMENUPAGE_${ID}_VARIABLE" "${MUI_STARTMENUPAGE_VARIABLE}"
+ !define "MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
+ !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
+ !endif
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
+ !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
+ !endif
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+ !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+ !endif
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_STARTMENUPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
+
+ !undef MUI_STARTMENUPAGE_VARIABLE
+ !undef MUI_STARTMENUPAGE_TEXT_TOP
+ !undef MUI_STARTMENUPAGE_TEXT_CHECKBOX
+ !undef MUI_STARTMENUPAGE_DEFAULTFOLDER
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_NODISABLE
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_ROOT
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_KEY
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+
+!macroend
+
+!macro MUI_PAGE_STARTMENU ID VAR
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_STARTMENU "${ID}" "${VAR}"
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;Page functions
+
+!macro MUI_FUNCTION_STARTMENUPAGE PRE LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+
+ ;Get Start Menu location from registry
+
+ ${if} "${MUI_STARTMENUPAGE_VARIABLE}" == ""
+
+ ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+ ${if} $mui.StartMenuPage.RegistryLocation != ""
+ StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" $mui.StartMenuPage.RegistryLocation
+ ${endif}
+
+ ${endif}
+
+ !endif
+
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
+
+ ${if} $(^RTL) == "0"
+ !ifndef MUI_STARTMENUPAGE_NODISABLE
+ StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !else
+ StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !endif
+ ${else}
+ !ifndef MUI_STARTMENUPAGE_NODISABLE
+ StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !else
+ StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !endif
+ ${endif}
+
+ Pop $mui.StartMenuPage
+
+ ;Get control handles
+ GetDlgItem $mui.StartMenuPage.Location $mui.StartMenuPage 1002
+ GetDlgItem $mui.StartMenuPage.FolderList $mui.StartMenuPage 1004
+
+ !ifdef MUI_STARTMENUPAGE_BGCOLOR
+ SetCtlColors $mui.StartMenuPage.Location "" "${MUI_STARTMENUPAGE_BGCOLOR}"
+ SetCtlColors $mui.StartMenuMenu.FolderList "" "${MUI_STARTMENUPAGE_BGCOLOR}"
+ !endif
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ StartMenu::Show
+
+ Pop $mui.StartMenuPage.ReturnValue
+ ${if} $mui.StartMenuPage.ReturnValue == "success"
+ Pop "${MUI_STARTMENUPAGE_VARIABLE}"
+ ${endif}
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+
+;--------------------------------
+;Script macros to get Start Menu folder
+
+!macro MUI_STARTMENU_GETFOLDER ID VAR
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ ;Get Start Menu folder from registry
+ ;Can be called from the script in the uninstaller
+
+ !ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
+
+ ReadRegStr $mui.StartMenuPage.RegistryLocation "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
+
+ ${if} mui.StartMenuPage.RegistryLocation != ""
+ StrCpy "${VAR}" $mui.StartMenuPage.RegistryLocation
+ ${else}
+ StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
+ ${endif}
+
+ !else
+
+ StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
+
+ !endif
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_STARTMENU_WRITE_BEGIN ID
+
+ ;The code in the script to write the shortcuts should be put between the
+ ;MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END macros
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !define MUI_STARTMENUPAGE_CURRENT_ID "${ID}"
+
+ StrCpy $mui.StartMenuPage.Create "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
+
+ ;If the folder start with >, the user has chosen not to create a shortcut
+ ${if} $mui.StartMenuPage.Create != ">"
+
+ ${if} "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" == ""
+ ;Get folder from registry if the variable doesn't contain anything
+ !insertmacro MUI_STARTMENU_GETFOLDER "${MUI_STARTMENUPAGE_CURRENT_ID}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
+ ${endif}
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_STARTMENU_WRITE_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifdef MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
+ ;Write folder to registry
+ WriteRegStr "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
+ !endif
+
+ ${endif}
+
+ !undef MUI_STARTMENUPAGE_CURRENT_ID
+
+ !verbose pop
+
+!macroend
+
diff --git a/Contrib/Modern UI 2/Pages/UninstallConfirm.nsh b/Contrib/Modern UI 2/Pages/UninstallConfirm.nsh
index 4848826..a9323ee 100755
--- a/Contrib/Modern UI 2/Pages/UninstallConfirm.nsh
+++ b/Contrib/Modern UI 2/Pages/UninstallConfirm.nsh
@@ -1,96 +1,96 @@
-/*
-
-NSIS Modern User Interface
-Uninstall confirmation page
-
-*/
-
-;--------------------------------
-;Page interface settings and variables
-
-!macro MUI_UNCONFIRMPAGE_INTERFACE
-
- !ifndef MUI_UNCONFIRMPAGE_INTERFACE
- !define MUI_UNCONFIRMPAGE_INTERFACE
- Var mui.UnConfirmPage
-
- Var mui.UnConfirmPage.Text
- Var mui.UnConfirmPage.DirectoryText
- Var mui.UnConfirmPage.Directory
- !endif
-
-!macroend
-
-
-;--------------------------------
-;Page declaration
-
-!macro MUI_PAGEDECLARATION_CONFIRM
-
- !insertmacro MUI_SET MUI_UNCONFIRMPAGE ""
- !insertmacro MUI_UNCONFIRMPAGE_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_TOP ""
- !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_LOCATION ""
-
- PageEx un.uninstConfirm
-
- PageCallbacks un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- UninstallText "${MUI_UNCONFIRMPAGE_TEXT_TOP}" "${MUI_UNCONFIRMPAGE_TEXT_LOCATION}"
-
- PageExEnd
-
- !insertmacro MUI_UNFUNCTION_CONFIRMPAGE un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_TOP
- !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_LOCATION
-
-!macroend
-
-!macro MUI_UNPAGE_CONFIRM
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
- !insertmacro MUI_PAGEDECLARATION_CONFIRM
-
- !verbose pop
-
-!macroend
-
-
-;--------------------------------
-;Page functions
-
-!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
-
- FunctionEnd
-
- Function "${SHOW}"
-
- ;Get controls handles
- FindWindow $mui.UnConfirmPage "#32770" "" $HWNDPARENT
- GetDlgItem $mui.UnConfirmPage.Text $mui.UnConfirmPage 1006
- GetDlgItem $mui.UnConfirmPage.DirectoryText $mui.UnConfirmPage 1029
- GetDlgItem $mui.UnConfirmPage.Directory $mui.UnConfirmPage 1000
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
+/*
+
+NSIS Modern User Interface
+Uninstall confirmation page
+
+*/
+
+;--------------------------------
+;Page interface settings and variables
+
+!macro MUI_UNCONFIRMPAGE_INTERFACE
+
+ !ifndef MUI_UNCONFIRMPAGE_INTERFACE
+ !define MUI_UNCONFIRMPAGE_INTERFACE
+ Var mui.UnConfirmPage
+
+ Var mui.UnConfirmPage.Text
+ Var mui.UnConfirmPage.DirectoryText
+ Var mui.UnConfirmPage.Directory
+ !endif
+
+!macroend
+
+
+;--------------------------------
+;Page declaration
+
+!macro MUI_PAGEDECLARATION_CONFIRM
+
+ !insertmacro MUI_SET MUI_UNCONFIRMPAGE ""
+ !insertmacro MUI_UNCONFIRMPAGE_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_TOP ""
+ !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_LOCATION ""
+
+ PageEx un.uninstConfirm
+
+ PageCallbacks un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ UninstallText "${MUI_UNCONFIRMPAGE_TEXT_TOP}" "${MUI_UNCONFIRMPAGE_TEXT_LOCATION}"
+
+ PageExEnd
+
+ !insertmacro MUI_UNFUNCTION_CONFIRMPAGE un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_TOP
+ !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_LOCATION
+
+!macroend
+
+!macro MUI_UNPAGE_CONFIRM
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+ !insertmacro MUI_PAGEDECLARATION_CONFIRM
+
+ !verbose pop
+
+!macroend
+
+
+;--------------------------------
+;Page functions
+
+!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
+
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ ;Get controls handles
+ FindWindow $mui.UnConfirmPage "#32770" "" $HWNDPARENT
+ GetDlgItem $mui.UnConfirmPage.Text $mui.UnConfirmPage 1006
+ GetDlgItem $mui.UnConfirmPage.DirectoryText $mui.UnConfirmPage 1029
+ GetDlgItem $mui.UnConfirmPage.Directory $mui.UnConfirmPage 1000
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
diff --git a/Contrib/Modern UI 2/Pages/Welcome.nsh b/Contrib/Modern UI 2/Pages/Welcome.nsh
index 38fdb5d..5cad0b0 100755
--- a/Contrib/Modern UI 2/Pages/Welcome.nsh
+++ b/Contrib/Modern UI 2/Pages/Welcome.nsh
@@ -120,38 +120,54 @@ Welcome page (implemented using nsDialogs)
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
;Create dialog
- nsDialogs::Create /NOUNLOAD 1044
- Pop $mui.WelcomePage
+ nsDialogs::Create /NOUNLOAD 1044
+ Pop $mui.WelcomePage
nsDialogs::SetRTL /NOUNLOAD $(^RTL)
SetCtlColors $mui.WelcomePage "" "${MUI_BGCOLOR}"
;Image control
- ${NSD_CreateBitmap} 0u 0u 109u 193u ""
- Pop $mui.WelcomePage.Image
- System::Call 'user32::LoadImage(i 0, t "$PLUGINSDIR\modern-wizard.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
- Pop $mui.WelcomePage.Image.Bitmap
- SendMessage $mui.WelcomePage.Image ${STM_SETIMAGE} ${IMAGE_BITMAP} $mui.WelcomePage.Image.Bitmap
+ ${NSD_CreateBitmap} 0u 0u 109u 193u ""
+ Pop $mui.WelcomePage.Image
+ System::Call 'user32::LoadImage(i 0, t "$PLUGINSDIR\modern-wizard.bmp", i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
+ Pop $mui.WelcomePage.Image.Bitmap
+ SendMessage $mui.WelcomePage.Image ${STM_SETIMAGE} ${IMAGE_BITMAP} $mui.WelcomePage.Image.Bitmap
+
+ ;Positiong of controls
+
+ ;Title
+ !ifndef MUI_WELCOMEPAGE_TITLE_3LINES
+ !define MUI_WELCOMEPAGE_TITLE_HEIGHT 28
+ !else
+ !define MUI_WELCOMEPAGE_TITLE_HEIGHT 38
+ !endif
+
+ ;Text
+ ;17 = 10 (top margin) + 7 (distance between texts)
+ !define /math MUI_WELCOMEPAGE_TEXT_TOP 17 + ${MUI_WELCOMEPAGE_TITLE_HEIGHT}
;Title
- ${NSD_CreateLabel} 120u 10u 195u 28u "${MUI_WELCOMEPAGE_TITLE}"
- Pop $mui.WelcomePage.Title
+ ${NSD_CreateLabel} 120u 10u 195u ${MUI_WELCOMEPAGE_TITLE_HEIGHT}u "${MUI_WELCOMEPAGE_TITLE}"
+ Pop $mui.WelcomePage.Title
SetCtlColors $mui.WelcomePage.Title "" "${MUI_BGCOLOR}"
CreateFont $mui.WelcomePage.Title.Font "$(^Font)" "12" "700"
- SendMessage $mui.WelcomePage.Title ${WM_SETFONT} $mui.WelcomePage.Title.Font 0
+ SendMessage $mui.WelcomePage.Title ${WM_SETFONT} $mui.WelcomePage.Title.Font 0
;Welcome text
- ${NSD_CreateLabel} 120u 45u 195u 130u "${MUI_WELCOMEPAGE_TEXT}"
- Pop $mui.WelcomePage.Text
+ ${NSD_CreateLabel} 120u ${MUI_WELCOMEPAGE_TEXT_TOP}u 195u 130u "${MUI_WELCOMEPAGE_TEXT}"
+ Pop $mui.WelcomePage.Text
SetCtlColors $mui.WelcomePage.Text "" "${MUI_BGCOLOR}"
;Show page
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageLoadFullWindow
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
- nsDialogs::Show
+ nsDialogs::Show
Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}muiPageUnloadFullWindow
;Delete image from memory
- System::Call gdi32::DeleteObject(i$mui.WelcomePage.Image.Bitmap)
+ System::Call gdi32::DeleteObject(i$mui.WelcomePage.Image.Bitmap)
+
+ !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_HEIGHT
+ !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT_TOP
FunctionEnd
diff --git a/Contrib/Modern UI 2/Readme.html b/Contrib/Modern UI 2/Readme.html
index 581496f..86b566c 100755
--- a/Contrib/Modern UI 2/Readme.html
+++ b/Contrib/Modern UI 2/Readme.html
@@ -1,1158 +1,1158 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>NSIS Modern User Interface - Documentation</title>
- <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
- <style type="text/css">
- /*<![CDATA[*/body
- {
- padding: 10px;
- background-color: #F0F0F0;
- font-size: 13px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight: normal;
- text-align: justify;
- }
- p, li
- {
- font-size: 13px;
- }
- table
- {
- margin: auto;
- background-color: #FFFFFF;
- }
- .maintable
- {
- border: 2px solid #376EAB;
- }
- .parameter
- {
- font-weight: bold;
- color: #6586AC;
- }
- h1
- {
- font-size: 20px;
- color: #7A7272;
- font-weight: normal;
- }
- h2
- {
- font-size: 17px;
- font-weight: bold;
- color: #303030;
- }
- h3
- {
- font-size: 14px;
- font-weight: bold;
- color: #2B5885;
- }
- pre
- {
- font-size: 13px;
- }
- div
- {
- margin: 20px;
- }
- div.settings
- {
- margin-right: 0;
- }
- a:link, a:visited, a:active
- {
- color: #294F75;
- text-decoration: none;
- }
- a:hover
- {
- color: #182634;
- text-decoration: underline;
- }
- .trigger
- {
- cursor: pointer;
- cursor: hand;
- height: 14px;
- }
- .toggle
- {
- display: none;
- }
- .options
- {
- text-align: center;
- cursor: pointer;
- cursor: hand;
- color: #294F75;
- }
- /*]]>*/</style>
-
- <script type="text/javascript">
-//<![CDATA[
-
- var image_open = new Image();
- image_open.src = "images/open.gif";
- var image_closed = new Image();
- image_closed.src = "images/closed.gif";
-
- function toggle(image, section) {
-
- if(document.all) {
- if(document.all[section].style.display == "block") {
- document.all[section].style.display = "none";
- document.all[image].src = image_closed.src;
- }
- else
- {
- document.all[section].style.display = "block";
- document.all[image].src = image_open.src;
- }
- }
- else
- {
- if(document.getElementById(section).style.display == "block") {
- document.getElementById(section).style.display = "none";
- document.getElementById(image).src = image_closed.src;
- }
- else
- {
- document.getElementById(section).style.display = "block";
- document.getElementById(image).src = image_open.src;
- }
- }
-
- }
-
- function expandall() {
-
- var divNodeList = document.getElementsByTagName('div');
- for (i = 0; i < divNodeList.length; i++) {
- if(divNodeList[i].id) {
- divNodeList[i].style.display = "block";
- document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/open.gif";
- }
- }
-
- }
-
- function collapseall() {
-
- var divNodeList = document.getElementsByTagName('div');
- for (i = 0; i < divNodeList.length; i++) {
- if(divNodeList[i].id) {
- divNodeList[i].style.display = "none";
- document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/closed.gif";
- }
- }
-
- }
-
-//]]>
- </script>
-
-</head>
-<body>
- <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
- <tr>
- <td>
- <img src="images/header.gif" width="750" height="80" alt="" />
- <p class="options">
- <a onclick="expandall()">[Expand all]</a>&nbsp; &nbsp;<a onclick="collapseall()">[Collapse
- all]</a></p>
- <div>
- <h1>
- Introduction</h1>
- <div>
- <p>
- The Modern UI provides a user interface for NSIS installers with a modern wizard
- style, similar to the wizards of recent Windows versions. It is based on the basic
- user interface that is provided by the NSIS compiler itself and extends it with
- more interface features and pages.</p>
- <p>
- All standard NSIS pages (such as the pages to select components and the installation
- folder) are supported as well as a number of additional pages. The welcome page
- allows you to provide an introduction to the installation process, while the finish
- page provides a way to let the user decide what steps should be performed after
- the setup wizard is closed (for example, whether the application should be started
- immediately). A finish page can also be used to ask for a system restart is necessary.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_scr" src="images/closed.gif"
- onclick="toggle('trigger_scr', 'toggle_scr');" />
- Screenshots</h3>
- <div class="toggle" id="toggle_scr">
- <p>
- <img src="images/screen1.png" width="503" height="393" alt="" /></p>
- <p>
- <img src="images/screen2.png" width="503" height="393" alt="" /></p>
- </div>
- </div>
- <h1>
- Modern UI 2.0 beta</h1>
- <div>
- <p>
- This is a beta version of the Modern UI version 2.0, which is only intended for
- testing purposes.</p>
- <p>
- This new version makes it easier to customize pages, because the same method can
- be used to&nbsp; change standard NSIS pages as well as additional pages provided
- by the Modern UI. It is now also possible for other NSIS plug-ins to add new pages
- to the Modern UI. You can expect to see examples of this soon.</p>
- <p>
- The welcome and finish page are no longer implemented using InstallOptions. Instead,
- the new nsDialogs plug-in is used. nsDialogs allows you to create custom pages or
- customize existing pages directly from the script.</p>
- <p>
- To upgrade a Modern UI 1.8 script, you should:</p>
- <ul>
- <li>Insert the MUI2.nsh header file instead of MUI.nsh.</li>
- <li>The macros for InstallOptions have been moved to a separate header file unrelated
- to the Modern UI. If you are still using InstallOptions for custom pages, insert
- InstallOptions.nsh and use the INSTALLOPTIONS_* macros instead of the MUI_INSTALLOPTIONS_*
- macros. The macros itself have remained the same.</li>
- <li>Rewrite customization code for the Modern UI 1.8 welcome and finish pages in which
- the InstallOptions INI file is used. nsDialogs commands should be used instead.</li>
- <li>Use the standard NSIS method to escape special characters in all texts. For example,
- $\r$\n creates newline.</li>
- </ul>
- </div>
- <h1>
- Script header</h1>
- <div>
- <p>
- The settings for the Modern UI should be inserted in the header of the script file.
- It&#39;s important to follow the same order as the items below.&nbsp;For example,
- interface settings should be defined before you insert pages, because the pages
- depend on the interface configuration. It may be useful to look at the <a href="#examples">
- example scripts</a> too see how this is done in actual script files.</p>
- <p>
- Parameters are given in this format: <span class="parameter">required (option1 | option2)
- [optional]</span></p>
- </div>
- <h2>
- 1. Header file</h2>
- <div>
- <p>
- First of all, add this line to the top of script to include the Modern UI:</p>
- <pre>
-!include MUI2.nsh
-</pre>
- </div>
- <h2>
- 2. Interface configuration</h2>
- <div>
- <p>
- Then, you may want to use interface settings to change the look and feel of the
- installer. These settings apply to all pages.<p>
- The interface settings provided by the NSIS compiler itself (such as LicenseText,
- Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts. The Modern
- UI provides equalivent or extended versions of these settings.<p>
- Examples:</p>
- <pre>
-!define MUI_COMPONENTSPAGE_SMALLDESC ;No value
-!define MUI_UI &quot;myUI.exe&quot; ;Value
-!define MUI_INSTFILESPAGE_COLORS &quot;FFFFFF 000000&quot; ;Two colors
-</pre>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_in" src="images/closed.gif"
- onclick="toggle('trigger_in', 'toggle_in');" />
- Interface settings</h3>
- <div class="toggle" id="toggle_in">
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ingen" src="images/closed.gif"
- onclick="toggle('trigger_ingen', 'toggle_ingen');" />
- Page header</h3>
- <div class="toggle" id="toggle_ingen">
- <p>
- <strong>MUI_ICON</strong> <span class="parameter">icon_file</span><br />
- The icon for the installer.<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico</em></p>
- <p>
- <strong>MUI_UNICON</strong> <span class="parameter">icon_file</span><br />
- The icon for the uninstaller.<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico</em></p>
- <p>
- <strong>MUI_HEADERIMAGE</strong><br />
- Display an image on the header of the page.</p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of installers pages (recommended size: 150x57
- pixels).<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP_NOSTRETCH</strong><br />
- Do not stretch the installer header bitmap to fit the size of the field. Use this
- option only if you have an image that does not use the whole space. If you have
- a full size bitmap that fits exactly, you should not use this option because the
- size of the field will be different if the user has a custom DPI setting.</p>
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of installers pages when using a RTL language
- (recommended size: 150x57 pixels).<br />
- <em>Default: Non-RTL bitmap</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH</strong><br />
- Do not stretch the installer header bitmap when using a RTL language to fit the
- size of the field. Use this option only if you have an image that does not use the
- whole space. If you have a full size bitmap that fits exactly, you should not use
- this option because the size of the field will be different if the user has a custom
- DPI setting.</p>
- </div>
- </div>
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of uninstaller pages (recommended size: 150x57
- pixels).<br />
- <em>Default: Installer header bitmap</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH</strong><br />
- Do not stretch the uninstaller header bitmap to fit the size of the field. Use this
- option only if you have an image that does not use the whole space. If you have
- a full size bitmap that fits exactly, you should not use this option because the
- size of the field will be different if the user has a custom DPI setting.</p>
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of uninstallers pages when using a RTL language
- (recommended size: 150x57 pixels).<br />
- <em>Default: Installer RTL header bitmap</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH</strong><br />
- Do not stretch the uninstaller header bitmap when using a RTL language to fit the
- size of the field. Use this option only if you have an image that does not use the
- whole space. If you have a full size bitmap that fits exactly, you should not use
- this option because the size of the field will be different if the user has a custom
- DPI setting.</p>
- </div>
- </div>
- <p>
- <strong>MUI_HEADERIMAGE_RIGHT</strong><br />
- Display the header image on the right side instead of the left side (when using
- a RTL language it will be displayed on the left side instead of the right side).</p>
- </div>
- <p>
- <strong>MUI_BGCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
- Background color for the header, the Welcome page and the Finish page.<br />
- <em>Default: FFFFFF</em></p>
- <p>
- <strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
- Set a transparent background for the header's label controls. Useful for custom
- user interfaces that set a bigger header image.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/closed.gif"
- onclick="toggle('trigger_inres', 'toggle_inres');" />
- Interface resources</h3>
- <div class="toggle" id="toggle_inres">
- <p>
- <strong>MUI_UI</strong> <span class="parameter">ui_file</span><br />
- The interface file with the dialog resources. Change this if you have made your
- own customized UI.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern.exe</em></p>
- <p>
- <strong>MUI_UI_HEADERIMAGE</strong> <span class="parameter">ui_file</span><br />
- The interface files with the dialog resource IDD_INST that contains a bitmap control
- and space for the header bitmap.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe</em></p>
- <p>
- <strong>MUI_UI_HEADERIMAGE_RIGHT</strong> <span class="parameter">ui_file</span><br />
- The interface files with the dialog resource IDD_INST that contains a bitmap control
- and space for the header bitmap on the right side.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe</em></p>
- <p>
- <strong>MUI_UI_COMPONENTSPAGE_SMALLDESC</strong> <span class="parameter">ui_file</span><br />
- The interface files with a customized dialog resource IDD_SELCOM with a small description
- area.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_smalldesc.exe</em></p>
- <p>
- <strong>MUI_UI_COMPONENTSPAGE_NODESC</strong> <span class="parameter">ui_file</span><br />
- The interface files with a customized dialog resource IDD_SELCOM without a description
- area.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_nodesc.exe</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inwf" src="images/closed.gif"
- onclick="toggle('trigger_inwf', 'toggle_inwf');" />
- Installer welcome/finish page</h3>
- <div class="toggle" id="toggle_inwf">
- <p>
- <strong>MUI_WELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
- <div class="settings">
- <p>
- <strong>MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
- Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
- field. Use this option only if you have an image that does not use the whole space.
- If you have a full size bitmap that fits exactly, you should not use this option
- because the size of the field will be different if the user has a custom DPI setting.</p>
- </div>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inuwf" src="images/closed.gif"
- onclick="toggle('trigger_inuwf', 'toggle_inuwf');" />
- Uninstaller welcome/finish page</h3>
- <div class="toggle" id="toggle_inuwf">
- <p>
- <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
- <div class="settings">
- <p>
- <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
- Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
- field. Use this option only if you have an image that does not use the whole space.
- If you have a full size bitmap that fits exactly, you should not use this option
- because the size of the field will be different if the user has a custom DPI setting.</p>
- </div>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inl" src="images/closed.gif"
- onclick="toggle('trigger_inl', 'toggle_inl');" />
- License page</h3>
- <div class="toggle" id="toggle_inl">
- <p>
- <strong>MUI_LICENSEPAGE_BGCOLOR</strong> <span class="parameter">(/windows | /grey |
- (color: RRGGBB hexadecimal))</span><br />
- The background color for the license textbox. Use /windows for the Windows text
- background color (usually white). Use the /grey for the window background color
- (usually grey).<br />
- <em>Default: /windows</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inc" src="images/closed.gif"
- onclick="toggle('trigger_inc', 'toggle_inc');" />
- Components page</h3>
- <div class="toggle" id="toggle_inc">
- <p>
- <strong>MUI_COMPONENTSPAGE_CHECKBITMAP</strong> <span class="parameter">bitmap_file</span><br />
- The bitmap with images for the checks of the component select treeview.<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Checks\modern.bmp</em></p>
- <p>
- <strong>MUI_COMPONENTSPAGE_SMALLDESC</strong><br />
- A small description area on the bottom of the page. Use this layout if you have
- a lot of sections and don't need large descriptions.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_NODESC</strong><br />
- No description area.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ind" src="images/closed.gif"
- onclick="toggle('trigger_ind', 'toggle_ind');" />
- Directory page</h3>
- <div class="toggle" id="toggle_ind">
- <p>
- <strong>MUI_DIRECTORYPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
- The background color for the directory textbox.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ins" src="images/closed.gif"
- onclick="toggle('trigger_ins', 'toggle_ins');" />
- Start Menu folder page</h3>
- <div class="toggle" id="toggle_ins">
- <p>
- <strong>MUI_STARTMENUPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
- The background color for the startmenu directory list and textbox.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ini" src="images/closed.gif"
- onclick="toggle('trigger_ini', 'toggle_ini');" />
- Installation page</h3>
- <div class="toggle" id="toggle_ini">
- <p>
- <strong>MUI_INSTFILESPAGE_COLORS</strong> <span class="parameter">(/windows | &quot;(foreground
- color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal)&quot;)</span><br />
- The colors of the details screen. Use /windows for the default Windows colors.<br />
- <em>Default: /windows</em></p>
- <p>
- <strong>MUI_INSTFILESPAGE_PROGRESSBAR</strong> <span class="parameter">(&quot;&quot;
- | colored | smooth)</span><br />
- The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.<br />
- <em>Default: smooth</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inf" src="images/closed.gif"
- onclick="toggle('trigger_inf', 'toggle_inf');" />
- Installer finish page</h3>
- <div class="toggle" id="toggle_inf">
- <p>
- <strong>MUI_FINISHPAGE_NOAUTOCLOSE</strong><br />
- Do not automatically jump to the finish page, to allow the user to check the install
- log.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_uinf" src="images/closed.gif"
- onclick="toggle('trigger_uinf', 'toggle_uinf');" />
- Uninstaller finish page</h3>
- <div class="toggle" id="toggle_uinf">
- <p>
- <strong>MUI_UNFINISHPAGE_NOAUTOCLOSE</strong><br />
- Do not automatically jump to the finish page, to allow the user to check the uninstall
- log.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inaw" src="images/closed.gif"
- onclick="toggle('trigger_inaw', 'toggle_inaw');" />
- Abort warning</h3>
- <div class="toggle" id="toggle_inaw">
- <p>
- <strong>MUI_ABORTWARNING</strong><br />
- Show a message box with a warning when the user wants to close the installer.</p>
- <div class="settings">
- <p>
- <strong>MUI_ABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the abort warning message box.</p>
- <p>
- <strong>MUI_ABORTWARNING_CANCEL_DEFAULT</strong><br />
- Set the Cancel button as the default button on the message box.</p>
- </div>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inuaw" src="images/closed.gif"
- onclick="toggle('trigger_inuaw', 'toggle_inuaw');" />
- Uninstaller abort warning</h3>
- <div class="toggle" id="toggle_inuaw">
- <p>
- <strong>MUI_UNABORTWARNING</strong><br />
- Show a message box with a warning when the user wants to close the uninstaller.</p>
- <div class="settings">
- <p>
- <strong>MUI_UNABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the abort warning message box.</p>
- <p>
- <strong>MUI_UNABORTWARNING_CANCEL_DEFAULT</strong><br />
- Set the Cancel button as the default button on the message box.</p>
- </div>
- </div>
- </div>
- </div>
- <h2>
- 3. Pages</h2>
- <div>
- <p>
- Insert the following macros to set the pages you want to use. The pages will appear
- in the order in which you insert them in the script. You can also insert custom
- Page commands between the macros to add custom pages.</p>
- <p>
- You can add multiple pages of certain types (for example, if you want the user to
- specify multiple folders).</p>
- <p>
- Examples:</p>
- <pre>
-!insertmacro MUI_PAGE_LICENSE &quot;License.rtf&quot;
-!insertmacro MUI_PAGE_COMPONENTS
-
-Var STARTMENU_FOLDER
-!insertmacro MUI_PAGE_STARTMENU &quot;Application&quot; $StartMenuFolder
-</pre>
- <p>
- You will need the page ID for the Start Menu folder page when using the Start Menu
- folder macros. The folder will be stored in the specified variable.</p>
- <p>
- <strong>Installer pages</strong><br />
- MUI_PAGE_WELCOME<br />
- MUI_PAGE_LICENSE <span class="parameter">textfile</span><br />
- MUI_PAGE_COMPONENTS<br />
- MUI_PAGE_DIRECTORY<br />
- MUI_PAGE_STARTMENU <span class="parameter">pageid variable</span><br />
- MUI_PAGE_INSTFILES<br />
- MUI_PAGE_FINISH</p>
- <p>
- <strong>Uninstaller pages</strong><br />
- MUI_UNPAGE_WELCOME<br />
- MUI_UNPAGE_CONFIRM<br />
- MUI_UNPAGE_LICENSE <span class="parameter">textfile</span><br />
- MUI_UNPAGE_COMPONENTS<br />
- MUI_UNPAGE_DIRECTORY<br />
- MUI_UNPAGE_INSTFILES<br />
- MUI_UNPAGE_FINISH</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pg" src="images/closed.gif"
- onclick="toggle('trigger_pg', 'toggle_pg');" />
- Page settings</h3>
- <div class="toggle" id="toggle_pg">
- <p>
- Page settings apply to a single page and should be set before inserting a page macro.
- The same settings can be used for installer and uninstaller pages. You have to repeat
- the setting if you want it to apply to multiple pages. Example:</p>
- <pre>
-;Add a directory page to let the user specify a plug-ins folder
-;Store the folder in $PluginsFolder
-
-Var PLUGINS_FOLDER
-!define MUI_DIRECTORYPAGE_VARIABLE $PluginsFolder
-!insertmacro MUI_PAGE_DIRECTORY
-</pre>
- <p>
- <p>
- All standard texts in the user interface are loaded from language files, which are
- available for all languages supported by NSIS. So you only need to define these
- texts if you want to change the default.</p>
- <p>
- If the parameter is a text that should be different for each language, define a
- language string using LangString and use $(LangStringName) as value. For a license
- text in multiple languages, LicenseLangString can be used. Refer the NSIS Users
- Manual for more information about installers with multiple languages.</p>
- <p>
- In all text settings, the doublequote character (&quot;) should be escaped in the
- following form: $\&quot;</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgg" src="images/closed.gif"
- onclick="toggle('trigger_pgg', 'toggle_pgg');" />
- General page settings</h3>
- <div class="toggle" id="toggle_pgg">
- <p>
- <strong>MUI_PAGE_HEADER_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the header of the page.</p>
- <p>
- <strong>MUI_PAGE_HEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
- Subtext to display on the header of the page.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgw" src="images/closed.gif"
- onclick="toggle('trigger_pgw', 'toggle_pgw');" />
- Welcome page settings</h3>
- <div class="toggle" id="toggle_pgw">
- <p>
- <strong>MUI_WELCOMEPAGE_TITLE</strong> <span class="parameter">title</span><br />
- Title to display on the top of the page.</p>
- <p>
- <strong>MUI_WELCOMEPAGE_TITLE_3LINES</strong><br />
- Extra space for the title area.</p>
- <p>
- <strong>MUI_WELCOMEPAGE_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the page.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgl" src="images/closed.gif"
- onclick="toggle('trigger_pgl', 'toggle_pgl');" />
- License page settings</h3>
- <div class="toggle" id="toggle_pgl">
- <p>
- <strong>MUI_LICENSEPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_LICENSEPAGE_TEXT_BOTTOM</strong> <span class="parameter">text</span><br />
- Text to display on the bottom of the page.</p>
- <p>
- <strong>MUI_LICENSEPAGE_BUTTON</strong> <span class="parameter">button_text</span><br />
- Text to display on the 'I Agree' button.</p>
- <p>
- <strong>MUI_LICENSEPAGE_CHECKBOX</strong><br />
- Display a checkbox the user has to check to agree with the license terms.</p>
- <div class="settings">
- <p>
- <strong>MUI_LICENSEPAGE_CHECKBOX_TEXT</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to agree with the license terms.</p>
- </div>
- <p>
- <strong>MUI_LICENSEPAGE_RADIOBUTTONS</strong><br />
- Display two radio buttons to allow the user to choose between accepting the license
- terms or not.</p>
- <div class="settings">
- <p>
- <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to accept the license terms.</p>
- <p>
- <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to decline the license terms.</p>
- </div>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgc" src="images/closed.gif"
- onclick="toggle('trigger_pgc', 'toggle_pgc');" />
- Components page settings</h3>
- <div class="toggle" id="toggle_pgc">
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_COMPLIST</strong> <span class="parameter">text</span><br />
- Text to display on next to the components list.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_INSTTYPE</strong> <span class="parameter">text</span><br />
- Text to display on next to the installation type combo box.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE</strong> <span class="parameter">text</span><br />
- Text to display on the of the top of the description box.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO</strong> <span class="parameter">text</span><br />
- Text to display inside the description box when no section is selected.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgd" src="images/closed.gif"
- onclick="toggle('trigger_pgd', 'toggle_pgd');" />
- Directory page settings</h3>
- <div class="toggle" id="toggle_pgd">
- <p>
- <strong>MUI_DIRECTORYPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on top of the page.</p>
- <p>
- <strong>MUI_DIRECTORYPAGE_TEXT_DESTINATION</strong> <span class="parameter">text</span><br />
- Text to display on the destination folder frame.</p>
- <p>
- <strong>MUI_DIRECTORYPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
- Variable in which to store the selected folder.<br />
- <em>Default: $INSTDIR</em></p>
- <p>
- <strong>MUI_DIRECTORYPAGE_VERIFYONLEAVE</strong><br />
- Does not disable the Next button when a folder is invalid but allows you to use
- GetInstDirError in the leave function to handle an invalid folder.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgs" src="images/closed.gif"
- onclick="toggle('trigger_pgs', 'toggle_pgs');" />
- Start Menu folder page settings</h3>
- <div class="toggle" id="toggle_pgs">
- <p>
- <strong>MUI_STARTMENUPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_TEXT_CHECKBOX</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to disable the Start Menu folder creation.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_DEFAULTFOLDER</strong> <span class="parameter">folder</span><br />
- The default Start Menu Folder.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_NODISABLE</strong><br />
- Do not display the checkbox to disable the creation of Start Menu shortcuts.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
- <strong>MUI_STARTMENUPAGE_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
- <strong>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
- The registry key to store the Start Menu folder. The page will use it to remember
- the users preference. You should also use for the uninstaller to remove the Start
- Menu folders. Don't forget to remove this key during uninstallation.</p>
- <p>
- For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu
- folder:</p>
- <pre>
-!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
- Delete &quot;$SMPROGRAMS\$R0\Your Shortcut.lnk&quot;
-</pre>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgi" src="images/closed.gif"
- onclick="toggle('trigger_pgi', 'toggle_pgi');" />
- Installation page settings</h3>
- <div class="toggle" id="toggle_pgi">
- <p>
- <strong>MUI_INSTFILESPAGE_FINISHHEADER_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the header of the installation page when the installation has
- been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
- <p>
- <strong>MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
- Subtext to display on the header of the installation page when the installation
- has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
- <p>
- <strong>MUI_INSTFILESPAGE_ABORTHEADER_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the header of the installation page when the installation has
- been aborted.</p>
- <p>
- <strong>MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
- Subext to display on the header of the installation page when the installation has
- been aborted.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgf" src="images/closed.gif"
- onclick="toggle('trigger_pgf', 'toggle_pgf');" />
- Finish page settings</h3>
- <div class="toggle" id="toggle_pgf">
- <p>
- <strong>MUI_FINISHPAGE_TITLE</strong> <span class="parameter">title</span><br />
- Title to display on the top of the page.</p>
- <p>
- <strong>MUI_FINISHPAGE_TITLE_3LINES</strong><br />
- Extra space for the title area.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the page.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_LARGE</strong><br />
- Extra space for the text area (if using checkboxes).</p>
- <p>
- <strong>MUI_FINISHPAGE_BUTTON</strong> <span class="parameter">text</span><br />
- Text to display on the Finish button.</p>
- <p>
- <strong>MUI_FINISHPAGE_CANCEL_ENABLED</strong><br />
- Enable the Cancel button so the user can skip any options displayed on the finish
- page.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_REBOOT</strong> <span class="parameter">text</span><br />
- Text to display on the finish page when asking for a system reboot.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_REBOOTNOW</strong> <span class="parameter">text</span><br />
- Text to display next to the 'Reboot now' option button.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_REBOOTLATER</strong> <span class="parameter">text</span><br />
- Text to display next to the 'Reboot later' option button.</p>
- <p>
- <strong>MUI_FINISHPAGE_REBOOTLATER_DEFAULT</strong><br />
- Sets the 'Reboot later' option as the default option.</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN</strong> <span class="parameter">exe_file</span><br />
- Application which the user can select to run using a checkbox. You don't need to
- put quotes around the filename when it contains spaces.</p>
- <div class="settings">
- <p>
- <strong>MUI_FINISHPAGE_RUN_TEXT</strong> <span class="parameter">text</span><br />
- Texts to display next to the 'Run program' checkbox.</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN_PARAMETERS</strong> <span class="parameter">parameters</span><br />
- Parameters for the application to run. Don't forget to escape double quotes in the
- value (use $\&quot;).</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN_NOTCHECKED</strong><br />
- Do not check the 'Run program' checkbox by default</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN_FUNCTION</strong> <span class="parameter">function</span><br />
- Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without
- parameters). You can use the function to execute multiple applications or you can
- change the checkbox name and use it for other things.</p>
- </div>
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME</strong> <span class="parameter">file/url</span><br />
- File or website which the user can select to view using a checkbox. You don't need
- to put quotes around the filename when it contains spaces.</p>
- <div class="settings">
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME_TEXT</strong> <span class="parameter">text</span><br />
- Texts to display next to the 'Show Readme' checkbox.</p>
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</strong><br />
- Do not check the 'Show Readme' checkbox by default</p>
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME_FUNCTION</strong> <span class="parameter">function</span><br />
- Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without
- parameters). You can use the function to show multiple files or you can change the
- checkbox name and use it for other things.</p>
- </div>
- <p>
- <strong>MUI_FINISHPAGE_LINK</strong> <span class="parameter">link_text</span><br />
- Text for a link on the which the user can click to view a website or file.</p>
- <div class="settings">
- <p>
- <strong>MUI_FINISHPAGE_LINK_LOCATION</strong> <span class="parameter">file/url</span><br />
- Website or file which the user can select to view using the link. You don't need
- to put quotes around the filename when it contains spaces.</p>
- <p>
- <strong>MUI_FINISHPAGE_LINK_COLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
- Text color for the link on the Finish page.<br />
- <em>Default: 000080</em></p>
- </div>
- <p>
- <strong>MUI_FINISHPAGE_NOREBOOTSUPPORT</strong><br />
- Disables support for the page that allows the user to reboot the system. Define
- this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgu" src="images/closed.gif"
- onclick="toggle('trigger_pgu', 'toggle_pgu');" />
- Uninstall confirm page settings</h3>
- <div class="toggle" id="toggle_pgu">
- <p>
- <strong>MUI_UNCONFIRMPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_UNCONFIRMPAGE_TEXT_LOCATION</strong> <span class="parameter">text</span><br />
- Text to display next to the uninstall location text box.</p>
- </div>
- </div>
- </div>
- <h2>
- 4. Language files</h2>
- <div>
- <p>
- Insert the Modern UI language files for the languages to want to include.</p>
- <pre>
-!insertmacro MUI_LANGUAGE &quot;English&quot;
-</pre>
- <p>
- The standard NSIS language files are loaded automatically, there is no need to use
- LoadLanguageFile.</p>
- </div>
- <h2>
- 5. Reserve files</h2>
- <div>
- <p>
- 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. Include reserve file commands for such files before your sections
- and functions:</p>
- <pre>
-ReserveFile MyPlugin.dll
-!insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
-...
-</pre>
- </div>
- <h1>
- Script code for pages</h1>
- <div>
- <p>
- Some pages allow you to show additional information or can be used to get user input.
- Here you can find the script code to use these features.</p>
- <h2>
- Components page descriptions</h2>
- <div>
- <p>
- The Modern UI components page has a text box in which a description can be shown
- when the user hovers the mouse over a component. If you don't want to use these
- descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.</p>
- <p>
- To set a description for a section, an additional parameter needs to be added to
- Section commmand with a unique identifier for the section. This name can later be
- used to set the description for this section.</p>
- <pre>
-Section &quot;Section Name 1&quot; Section1
- ...
-SectionEnd
-</pre>
- <p>
- After the sections, use these macros to set the descriptions:</p>
- <pre>
-LangString DESC_Section1 ${LANG_ENGLISH} &quot;Description of section 1.&quot;
-LangString DESC_Section2 ${LANG_ENGLISH} &quot;Description of section 2.&quot;
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-</pre>
- <p>
- For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END
- macros.</p>
- </div>
- <h2>
- Start Menu folder</h2>
- <div>
- <p>
- Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
- and MUI_STARTMENU_WRITE_END macros:</p>
- <pre>
-!insertmacro MUI_STARTMENU_WRITE_BEGIN pageid
- ...create shortcuts...
-!insertmacro MUI_STARTMENU_WRITE_END
-</pre>
- <p>
- The page ID should be the ID of the page on which the user has selected the folder
- for the shortcuts you want to write.</p>
- <p>
- The variable which contains the folder and the page ID are set as parameters of
- the page macro.</p>
- </div>
- </div>
- <h1>
- Language selection dialog</h1>
- <div>
- <p>
- If you want the installer to display a language selection dialog (see the the <a
- href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a> example),
- insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:</p>
- <pre>
-Function .onInit
-
- !insertmacro MUI_LANGDLL_DISPLAY
-
-FunctionEnd
-</pre>
- <p>
- This macro can also be used in the un.onInit function.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_lss" src="images/closed.gif"
- onclick="toggle('trigger_lss', 'toggle_lss');" />
- Settings for registry storage of selected language</h3>
- <div class="toggle" id="toggle_lss">
- <p>
- To remember the user's preference, you can define a registry key. These defines
- should be set before inserting the installation page macro.</p>
- <p>
- <strong>MUI_LANGDLL_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
- <strong>MUI_LANGDLL_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
- <strong>MUI_LANGDLL_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
- The registry key to store the language. The users preference will be remembered.
- You can also use it for the uninstaller to display the right language. Don't forget
- to remove this key in the uninstaller.</p>
- <p>
- For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the
- stored language preference:</p>
- <pre>
-Function un.onInit
-
- !insertmacro MUI_UNGETLANGUAGE
-
-FunctionEnd
-</pre>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_lsin" src="images/closed.gif"
- onclick="toggle('trigger_lsin', 'toggle_lsin');" />
- Interface settings for selection dialog</h3>
- <div class="toggle" id="toggle_lsin">
- <p>
- To customize the language selection dialog interface, use these defines before inserting
- the MUI_LANGDLL_DISPLAY macro.</p>
- <p>
- <strong>MUI_LANGDLL_WINDOWTITLE</strong> <span class="parameter">text</span><br />
- The window title of the language selection dialog.</p>
- <p>
- <strong>MUI_LANGDLL_INFO</strong> <span class="parameter">text</span><br />
- The text to display on the language selection dialog.</p>
- <p>
- <strong>MUI_LANGDLL_ALWAYSSHOW</strong><br />
- Always show the language selection dialog, even if a language has been stored in
- the registry. The language stored in the registry will be selected by default.</p>
- <p>
- <strong>MUI_LANGDLL_ALLLANGUAGES</strong><br />
- Always show all available languages and don't filter according to their codepage.</p>
- </div>
- </div>
- <h1>
- Custom pages</h1>
- <div>
- <p>
- If you want add your custom pages to your installer, you can insert your own page
- commands between the page macros.</p>
- <pre>
-!insertmacro MUI_PAGE_WELCOME
-Page custom FunctionName ;Custom page
-!insertmacro MUI_PAGE_COMPONENTS
-
-;Uninstaller
-!insertmacro MUI_UNPAGE_CONFIRM
-UninstPage custom un.FunctionName ;Custom page
-!insertmacro MUI_UNPAGE_INSTFILES
-</pre>
- <p>
- Use the MUI_HEADER_TEXT macro to set the text on the page header in a page function:</p>
- <pre>
-LangString PAGE_TITLE ${LANG_ENGLISH} &quot;Title&quot;
-LangString PAGE_SUBTITLE ${LANG_ENGLISH} &quot;Subtitle&quot;
-
-Function CustomPageFunction
- !insermacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
- ...
-FuctionEnd
-</pre>
- </div>
- <h1>
- Custom functions</h1>
- <div>
- <p>
- Interface functions provided by NSIS, like the .onGUIInit function and the page
- functions are automatically included by the Modern UI and filled with code to support
- new interface features. If you want to add additional code to these function, create
- a function with the custom script code in the script use the Modern UI functions
- call them.</p>
- <p>
- Example:</p>
- <pre class="text">
-!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
-
-Function myGUIInit
- ...
-FunctionEnd</pre>
- <p>
- Modern UI pages can also customized using custom functions.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_cfg" src="images/closed.gif"
- onclick="toggle('trigger_cfg', 'toggle_cfg');" />
- General Custom Functions</h3>
- <div class="toggle" id="toggle_cfg">
- <p>
- These defines should be set before inserting the language macros.</p>
- <p>
- <strong>MUI_CUSTOMFUNCTION_GUIINIT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_UNGUIINIT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_ABORT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_UNABORT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_MOUSEOVERSECTION</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_UNMOUSEOVERSECTION</strong> <span class="parameter">function</span></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_cfpg" src="images/closed.gif"
- onclick="toggle('trigger_cfpg', 'toggle_cfpg');" />
- Page Custom Functions</h3>
- <div class="toggle" id="toggle_cfpg">
- <p>
- These defines should be set before inserting a page macro.</p>
- <p>
- <strong>MUI_PAGE_CUSTOMFUNCTION_PRE</strong> <span class="parameter">function</span><br />
- <strong>MUI_PAGE_CUSTOMFUNCTION_SHOW</strong> <span class="parameter">function</span><br />
- </p>
- <p>
- The pre function is called first and allows you to initalize variables or decide
- wehther the page should be skipped. Then, the shown function is called, which can
- be used to customize the interface. Finally, the user input can be validated leave
- function. The NSIS Users Manual provides more information about these funtions.</p>
- <p>
- In the show function, the window handles of all controls on the page can be retrieved
- from a Modern UI variable. A list of the variables names is not yet available. For
- now, refer to the source files of the Modern UI 2.0. The variable declarations can
- be found in the first lines of the header file for a certain page.</p>
- </div>
- </div>
- <h1>
- <a name="examples" id="examples">Example scripts</a></h1>
- <div>
- <p>
- The example scripts do not use the Modern UI 2.0 yet. To can upgrade any example
- (except InstallOptions.nsi) by inserting the MUI2.nsh header file instead of MUI.nsh.</p>
- <p>
- Basic: <a href="../../Examples/Modern%20UI/Basic.nsi">Basic.nsi</a><br />
- Welcome/Finish page: <a href="../../Examples/Modern%20UI/WelcomeFinish.nsi">WelcomeFinish.nsi</a><br />
- Multiple languages: <a href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br />
- Header image: <a href="../../Examples/Modern%20UI/HeaderBitmap.nsi">HeaderBitmap.nsi</a><br />
- Start Menu Folder page: <a href="../../Examples/Modern%20UI/StartMenu.nsi">StartMenu.nsi</a></p>
- </div>
- <h1>
- Credits</h1>
- <div>
- <p>
- Written by Joost Verburg.<br />
- Icons designed by Nikos Adamamas, aka adni18.<br />
- Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.</p>
- </div>
- <h1>
- License</h1>
- <div>
- <p>
- The zlib/libpng license applies to the Modern UI.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_lic" src="images/closed.gif"
- onclick="toggle('trigger_lic', 'toggle_lic');" />
- License Terms</h3>
- <div class="toggle" id="toggle_lic">
- <pre>
-Copyright &copy; 2002-2007 Joost Verburg
-
-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 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 distribution.
-</pre>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>NSIS Modern User Interface - Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+ <style type="text/css">
+ /*<![CDATA[*/body
+ {
+ padding: 10px;
+ background-color: #F0F0F0;
+ font-size: 13px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ text-align: justify;
+ }
+ p, li
+ {
+ font-size: 13px;
+ }
+ table
+ {
+ margin: auto;
+ background-color: #FFFFFF;
+ }
+ .maintable
+ {
+ border: 2px solid #376EAB;
+ }
+ .parameter
+ {
+ font-weight: bold;
+ color: #6586AC;
+ }
+ h1
+ {
+ font-size: 20px;
+ color: #7A7272;
+ font-weight: normal;
+ }
+ h2
+ {
+ font-size: 17px;
+ font-weight: bold;
+ color: #303030;
+ }
+ h3
+ {
+ font-size: 14px;
+ font-weight: bold;
+ color: #2B5885;
+ }
+ pre
+ {
+ font-size: 13px;
+ }
+ div
+ {
+ margin: 20px;
+ }
+ div.settings
+ {
+ margin-right: 0;
+ }
+ a:link, a:visited, a:active
+ {
+ color: #294F75;
+ text-decoration: none;
+ }
+ a:hover
+ {
+ color: #182634;
+ text-decoration: underline;
+ }
+ .trigger
+ {
+ cursor: pointer;
+ cursor: hand;
+ height: 14px;
+ }
+ .toggle
+ {
+ display: none;
+ }
+ .options
+ {
+ text-align: center;
+ cursor: pointer;
+ cursor: hand;
+ color: #294F75;
+ }
+ /*]]>*/</style>
+
+ <script type="text/javascript">
+//<![CDATA[
+
+ var image_open = new Image();
+ image_open.src = "images/open.gif";
+ var image_closed = new Image();
+ image_closed.src = "images/closed.gif";
+
+ function toggle(image, section) {
+
+ if(document.all) {
+ if(document.all[section].style.display == "block") {
+ document.all[section].style.display = "none";
+ document.all[image].src = image_closed.src;
+ }
+ else
+ {
+ document.all[section].style.display = "block";
+ document.all[image].src = image_open.src;
+ }
+ }
+ else
+ {
+ if(document.getElementById(section).style.display == "block") {
+ document.getElementById(section).style.display = "none";
+ document.getElementById(image).src = image_closed.src;
+ }
+ else
+ {
+ document.getElementById(section).style.display = "block";
+ document.getElementById(image).src = image_open.src;
+ }
+ }
+
+ }
+
+ function expandall() {
+
+ var divNodeList = document.getElementsByTagName('div');
+ for (i = 0; i < divNodeList.length; i++) {
+ if(divNodeList[i].id) {
+ divNodeList[i].style.display = "block";
+ document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/open.gif";
+ }
+ }
+
+ }
+
+ function collapseall() {
+
+ var divNodeList = document.getElementsByTagName('div');
+ for (i = 0; i < divNodeList.length; i++) {
+ if(divNodeList[i].id) {
+ divNodeList[i].style.display = "none";
+ document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/closed.gif";
+ }
+ }
+
+ }
+
+//]]>
+ </script>
+
+</head>
+<body>
+ <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
+ <tr>
+ <td>
+ <img src="images/header.gif" width="750" height="80" alt="" />
+ <p class="options">
+ <a onclick="expandall()">[Expand all]</a>&nbsp; &nbsp;<a onclick="collapseall()">[Collapse
+ all]</a></p>
+ <div>
+ <h1>
+ Introduction</h1>
+ <div>
+ <p>
+ The Modern UI provides a user interface for NSIS installers with a modern wizard
+ style, similar to the wizards of recent Windows versions. It is based on the basic
+ user interface that is provided by the NSIS compiler itself and extends it with
+ more interface features and pages.</p>
+ <p>
+ All standard NSIS pages (such as the pages to select components and the installation
+ folder) are supported as well as a number of additional pages. The welcome page
+ allows you to provide an introduction to the installation process, while the finish
+ page provides a way to let the user decide what steps should be performed after
+ the setup wizard is closed (for example, whether the application should be started
+ immediately). A finish page can also be used to ask for a system restart is necessary.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_scr" src="images/closed.gif"
+ onclick="toggle('trigger_scr', 'toggle_scr');" />
+ Screenshots</h3>
+ <div class="toggle" id="toggle_scr">
+ <p>
+ <img src="images/screen1.png" width="503" height="393" alt="" /></p>
+ <p>
+ <img src="images/screen2.png" width="503" height="393" alt="" /></p>
+ </div>
+ </div>
+ <h1>
+ Modern UI 2.0 beta</h1>
+ <div>
+ <p>
+ This is a beta version of the Modern UI version 2.0, which is only intended for
+ testing purposes.</p>
+ <p>
+ This new version makes it easier to customize pages, because the same method can
+ be used to&nbsp; change standard NSIS pages as well as additional pages provided
+ by the Modern UI. It is now also possible for other NSIS plug-ins to add new pages
+ to the Modern UI. You can expect to see examples of this soon.</p>
+ <p>
+ The welcome and finish page are no longer implemented using InstallOptions. Instead,
+ the new nsDialogs plug-in is used. nsDialogs allows you to create custom pages or
+ customize existing pages directly from the script.</p>
+ <p>
+ To upgrade a Modern UI 1.8 script, you should:</p>
+ <ul>
+ <li>Insert the MUI2.nsh header file instead of MUI.nsh.</li>
+ <li>The macros for InstallOptions have been moved to a separate header file unrelated
+ to the Modern UI. If you are still using InstallOptions for custom pages, insert
+ InstallOptions.nsh and use the INSTALLOPTIONS_* macros instead of the MUI_INSTALLOPTIONS_*
+ macros. The macros itself have remained the same.</li>
+ <li>Rewrite customization code for the Modern UI 1.8 welcome and finish pages in which
+ the InstallOptions INI file is used. nsDialogs commands should be used instead.</li>
+ <li>Use the standard NSIS method to escape special characters in all texts. For example,
+ $\r$\n creates newline.</li>
+ </ul>
+ </div>
+ <h1>
+ Script header</h1>
+ <div>
+ <p>
+ The settings for the Modern UI should be inserted in the header of the script file.
+ It&#39;s important to follow the same order as the items below.&nbsp;For example,
+ interface settings should be defined before you insert pages, because the pages
+ depend on the interface configuration. It may be useful to look at the <a href="#examples">
+ example scripts</a> too see how this is done in actual script files.</p>
+ <p>
+ Parameters are given in this format: <span class="parameter">required (option1 | option2)
+ [optional]</span></p>
+ </div>
+ <h2>
+ 1. Header file</h2>
+ <div>
+ <p>
+ First of all, add this line to the top of script to include the Modern UI:</p>
+ <pre>
+!include MUI2.nsh
+</pre>
+ </div>
+ <h2>
+ 2. Interface configuration</h2>
+ <div>
+ <p>
+ Then, you may want to use interface settings to change the look and feel of the
+ installer. These settings apply to all pages.<p>
+ The interface settings provided by the NSIS compiler itself (such as LicenseText,
+ Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts. The Modern
+ UI provides equalivent or extended versions of these settings.<p>
+ Examples:</p>
+ <pre>
+!define MUI_COMPONENTSPAGE_SMALLDESC ;No value
+!define MUI_UI &quot;myUI.exe&quot; ;Value
+!define MUI_INSTFILESPAGE_COLORS &quot;FFFFFF 000000&quot; ;Two colors
+</pre>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_in" src="images/closed.gif"
+ onclick="toggle('trigger_in', 'toggle_in');" />
+ Interface settings</h3>
+ <div class="toggle" id="toggle_in">
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ingen" src="images/closed.gif"
+ onclick="toggle('trigger_ingen', 'toggle_ingen');" />
+ Page header</h3>
+ <div class="toggle" id="toggle_ingen">
+ <p>
+ <strong>MUI_ICON</strong> <span class="parameter">icon_file</span><br />
+ The icon for the installer.<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico</em></p>
+ <p>
+ <strong>MUI_UNICON</strong> <span class="parameter">icon_file</span><br />
+ The icon for the uninstaller.<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico</em></p>
+ <p>
+ <strong>MUI_HEADERIMAGE</strong><br />
+ Display an image on the header of the page.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of installers pages (recommended size: 150x57
+ pixels).<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP_NOSTRETCH</strong><br />
+ Do not stretch the installer header bitmap to fit the size of the field. Use this
+ option only if you have an image that does not use the whole space. If you have
+ a full size bitmap that fits exactly, you should not use this option because the
+ size of the field will be different if the user has a custom DPI setting.</p>
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of installers pages when using a RTL language
+ (recommended size: 150x57 pixels).<br />
+ <em>Default: Non-RTL bitmap</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH</strong><br />
+ Do not stretch the installer header bitmap when using a RTL language to fit the
+ size of the field. Use this option only if you have an image that does not use the
+ whole space. If you have a full size bitmap that fits exactly, you should not use
+ this option because the size of the field will be different if the user has a custom
+ DPI setting.</p>
+ </div>
+ </div>
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of uninstaller pages (recommended size: 150x57
+ pixels).<br />
+ <em>Default: Installer header bitmap</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH</strong><br />
+ Do not stretch the uninstaller header bitmap to fit the size of the field. Use this
+ option only if you have an image that does not use the whole space. If you have
+ a full size bitmap that fits exactly, you should not use this option because the
+ size of the field will be different if the user has a custom DPI setting.</p>
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of uninstallers pages when using a RTL language
+ (recommended size: 150x57 pixels).<br />
+ <em>Default: Installer RTL header bitmap</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH</strong><br />
+ Do not stretch the uninstaller header bitmap when using a RTL language to fit the
+ size of the field. Use this option only if you have an image that does not use the
+ whole space. If you have a full size bitmap that fits exactly, you should not use
+ this option because the size of the field will be different if the user has a custom
+ DPI setting.</p>
+ </div>
+ </div>
+ <p>
+ <strong>MUI_HEADERIMAGE_RIGHT</strong><br />
+ Display the header image on the right side instead of the left side (when using
+ a RTL language it will be displayed on the left side instead of the right side).</p>
+ </div>
+ <p>
+ <strong>MUI_BGCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
+ Background color for the header, the Welcome page and the Finish page.<br />
+ <em>Default: FFFFFF</em></p>
+ <p>
+ <strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
+ Set a transparent background for the header's label controls. Useful for custom
+ user interfaces that set a bigger header image.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/closed.gif"
+ onclick="toggle('trigger_inres', 'toggle_inres');" />
+ Interface resources</h3>
+ <div class="toggle" id="toggle_inres">
+ <p>
+ <strong>MUI_UI</strong> <span class="parameter">ui_file</span><br />
+ The interface file with the dialog resources. Change this if you have made your
+ own customized UI.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern.exe</em></p>
+ <p>
+ <strong>MUI_UI_HEADERIMAGE</strong> <span class="parameter">ui_file</span><br />
+ The interface files with the dialog resource IDD_INST that contains a bitmap control
+ and space for the header bitmap.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe</em></p>
+ <p>
+ <strong>MUI_UI_HEADERIMAGE_RIGHT</strong> <span class="parameter">ui_file</span><br />
+ The interface files with the dialog resource IDD_INST that contains a bitmap control
+ and space for the header bitmap on the right side.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe</em></p>
+ <p>
+ <strong>MUI_UI_COMPONENTSPAGE_SMALLDESC</strong> <span class="parameter">ui_file</span><br />
+ The interface files with a customized dialog resource IDD_SELCOM with a small description
+ area.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_smalldesc.exe</em></p>
+ <p>
+ <strong>MUI_UI_COMPONENTSPAGE_NODESC</strong> <span class="parameter">ui_file</span><br />
+ The interface files with a customized dialog resource IDD_SELCOM without a description
+ area.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_nodesc.exe</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inwf" src="images/closed.gif"
+ onclick="toggle('trigger_inwf', 'toggle_inwf');" />
+ Installer welcome/finish page</h3>
+ <div class="toggle" id="toggle_inwf">
+ <p>
+ <strong>MUI_WELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
+ Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
+ field. Use this option only if you have an image that does not use the whole space.
+ If you have a full size bitmap that fits exactly, you should not use this option
+ because the size of the field will be different if the user has a custom DPI setting.</p>
+ </div>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inuwf" src="images/closed.gif"
+ onclick="toggle('trigger_inuwf', 'toggle_inuwf');" />
+ Uninstaller welcome/finish page</h3>
+ <div class="toggle" id="toggle_inuwf">
+ <p>
+ <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
+ Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
+ field. Use this option only if you have an image that does not use the whole space.
+ If you have a full size bitmap that fits exactly, you should not use this option
+ because the size of the field will be different if the user has a custom DPI setting.</p>
+ </div>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inl" src="images/closed.gif"
+ onclick="toggle('trigger_inl', 'toggle_inl');" />
+ License page</h3>
+ <div class="toggle" id="toggle_inl">
+ <p>
+ <strong>MUI_LICENSEPAGE_BGCOLOR</strong> <span class="parameter">(/windows | /grey |
+ (color: RRGGBB hexadecimal))</span><br />
+ The background color for the license textbox. Use /windows for the Windows text
+ background color (usually white). Use the /grey for the window background color
+ (usually grey).<br />
+ <em>Default: /windows</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inc" src="images/closed.gif"
+ onclick="toggle('trigger_inc', 'toggle_inc');" />
+ Components page</h3>
+ <div class="toggle" id="toggle_inc">
+ <p>
+ <strong>MUI_COMPONENTSPAGE_CHECKBITMAP</strong> <span class="parameter">bitmap_file</span><br />
+ The bitmap with images for the checks of the component select treeview.<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Checks\modern.bmp</em></p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_SMALLDESC</strong><br />
+ A small description area on the bottom of the page. Use this layout if you have
+ a lot of sections and don't need large descriptions.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_NODESC</strong><br />
+ No description area.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ind" src="images/closed.gif"
+ onclick="toggle('trigger_ind', 'toggle_ind');" />
+ Directory page</h3>
+ <div class="toggle" id="toggle_ind">
+ <p>
+ <strong>MUI_DIRECTORYPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
+ The background color for the directory textbox.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ins" src="images/closed.gif"
+ onclick="toggle('trigger_ins', 'toggle_ins');" />
+ Start Menu folder page</h3>
+ <div class="toggle" id="toggle_ins">
+ <p>
+ <strong>MUI_STARTMENUPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
+ The background color for the startmenu directory list and textbox.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ini" src="images/closed.gif"
+ onclick="toggle('trigger_ini', 'toggle_ini');" />
+ Installation page</h3>
+ <div class="toggle" id="toggle_ini">
+ <p>
+ <strong>MUI_INSTFILESPAGE_COLORS</strong> <span class="parameter">(/windows | &quot;(foreground
+ color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal)&quot;)</span><br />
+ The colors of the details screen. Use /windows for the default Windows colors.<br />
+ <em>Default: /windows</em></p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_PROGRESSBAR</strong> <span class="parameter">(&quot;&quot;
+ | colored | smooth)</span><br />
+ The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.<br />
+ <em>Default: smooth</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inf" src="images/closed.gif"
+ onclick="toggle('trigger_inf', 'toggle_inf');" />
+ Installer finish page</h3>
+ <div class="toggle" id="toggle_inf">
+ <p>
+ <strong>MUI_FINISHPAGE_NOAUTOCLOSE</strong><br />
+ Do not automatically jump to the finish page, to allow the user to check the install
+ log.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_uinf" src="images/closed.gif"
+ onclick="toggle('trigger_uinf', 'toggle_uinf');" />
+ Uninstaller finish page</h3>
+ <div class="toggle" id="toggle_uinf">
+ <p>
+ <strong>MUI_UNFINISHPAGE_NOAUTOCLOSE</strong><br />
+ Do not automatically jump to the finish page, to allow the user to check the uninstall
+ log.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inaw" src="images/closed.gif"
+ onclick="toggle('trigger_inaw', 'toggle_inaw');" />
+ Abort warning</h3>
+ <div class="toggle" id="toggle_inaw">
+ <p>
+ <strong>MUI_ABORTWARNING</strong><br />
+ Show a message box with a warning when the user wants to close the installer.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_ABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the abort warning message box.</p>
+ <p>
+ <strong>MUI_ABORTWARNING_CANCEL_DEFAULT</strong><br />
+ Set the Cancel button as the default button on the message box.</p>
+ </div>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inuaw" src="images/closed.gif"
+ onclick="toggle('trigger_inuaw', 'toggle_inuaw');" />
+ Uninstaller abort warning</h3>
+ <div class="toggle" id="toggle_inuaw">
+ <p>
+ <strong>MUI_UNABORTWARNING</strong><br />
+ Show a message box with a warning when the user wants to close the uninstaller.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_UNABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the abort warning message box.</p>
+ <p>
+ <strong>MUI_UNABORTWARNING_CANCEL_DEFAULT</strong><br />
+ Set the Cancel button as the default button on the message box.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>
+ 3. Pages</h2>
+ <div>
+ <p>
+ Insert the following macros to set the pages you want to use. The pages will appear
+ in the order in which you insert them in the script. You can also insert custom
+ Page commands between the macros to add custom pages.</p>
+ <p>
+ You can add multiple pages of certain types (for example, if you want the user to
+ specify multiple folders).</p>
+ <p>
+ Examples:</p>
+ <pre>
+!insertmacro MUI_PAGE_LICENSE &quot;License.rtf&quot;
+!insertmacro MUI_PAGE_COMPONENTS
+
+Var STARTMENU_FOLDER
+!insertmacro MUI_PAGE_STARTMENU &quot;Application&quot; $StartMenuFolder
+</pre>
+ <p>
+ You will need the page ID for the Start Menu folder page when using the Start Menu
+ folder macros. The folder will be stored in the specified variable.</p>
+ <p>
+ <strong>Installer pages</strong><br />
+ MUI_PAGE_WELCOME<br />
+ MUI_PAGE_LICENSE <span class="parameter">textfile</span><br />
+ MUI_PAGE_COMPONENTS<br />
+ MUI_PAGE_DIRECTORY<br />
+ MUI_PAGE_STARTMENU <span class="parameter">pageid variable</span><br />
+ MUI_PAGE_INSTFILES<br />
+ MUI_PAGE_FINISH</p>
+ <p>
+ <strong>Uninstaller pages</strong><br />
+ MUI_UNPAGE_WELCOME<br />
+ MUI_UNPAGE_CONFIRM<br />
+ MUI_UNPAGE_LICENSE <span class="parameter">textfile</span><br />
+ MUI_UNPAGE_COMPONENTS<br />
+ MUI_UNPAGE_DIRECTORY<br />
+ MUI_UNPAGE_INSTFILES<br />
+ MUI_UNPAGE_FINISH</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pg" src="images/closed.gif"
+ onclick="toggle('trigger_pg', 'toggle_pg');" />
+ Page settings</h3>
+ <div class="toggle" id="toggle_pg">
+ <p>
+ Page settings apply to a single page and should be set before inserting a page macro.
+ The same settings can be used for installer and uninstaller pages. You have to repeat
+ the setting if you want it to apply to multiple pages. Example:</p>
+ <pre>
+;Add a directory page to let the user specify a plug-ins folder
+;Store the folder in $PluginsFolder
+
+Var PLUGINS_FOLDER
+!define MUI_DIRECTORYPAGE_VARIABLE $PluginsFolder
+!insertmacro MUI_PAGE_DIRECTORY
+</pre>
+ <p>
+ <p>
+ All standard texts in the user interface are loaded from language files, which are
+ available for all languages supported by NSIS. So you only need to define these
+ texts if you want to change the default.</p>
+ <p>
+ If the parameter is a text that should be different for each language, define a
+ language string using LangString and use $(LangStringName) as value. For a license
+ text in multiple languages, LicenseLangString can be used. Refer the NSIS Users
+ Manual for more information about installers with multiple languages.</p>
+ <p>
+ In all text settings, the doublequote character (&quot;) should be escaped in the
+ following form: $\&quot;</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgg" src="images/closed.gif"
+ onclick="toggle('trigger_pgg', 'toggle_pgg');" />
+ General page settings</h3>
+ <div class="toggle" id="toggle_pgg">
+ <p>
+ <strong>MUI_PAGE_HEADER_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the header of the page.</p>
+ <p>
+ <strong>MUI_PAGE_HEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
+ Subtext to display on the header of the page.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgw" src="images/closed.gif"
+ onclick="toggle('trigger_pgw', 'toggle_pgw');" />
+ Welcome page settings</h3>
+ <div class="toggle" id="toggle_pgw">
+ <p>
+ <strong>MUI_WELCOMEPAGE_TITLE</strong> <span class="parameter">title</span><br />
+ Title to display on the top of the page.</p>
+ <p>
+ <strong>MUI_WELCOMEPAGE_TITLE_3LINES</strong><br />
+ Extra space for the title area.</p>
+ <p>
+ <strong>MUI_WELCOMEPAGE_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the page.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgl" src="images/closed.gif"
+ onclick="toggle('trigger_pgl', 'toggle_pgl');" />
+ License page settings</h3>
+ <div class="toggle" id="toggle_pgl">
+ <p>
+ <strong>MUI_LICENSEPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_TEXT_BOTTOM</strong> <span class="parameter">text</span><br />
+ Text to display on the bottom of the page.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_BUTTON</strong> <span class="parameter">button_text</span><br />
+ Text to display on the 'I Agree' button.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_CHECKBOX</strong><br />
+ Display a checkbox the user has to check to agree with the license terms.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_LICENSEPAGE_CHECKBOX_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to agree with the license terms.</p>
+ </div>
+ <p>
+ <strong>MUI_LICENSEPAGE_RADIOBUTTONS</strong><br />
+ Display two radio buttons to allow the user to choose between accepting the license
+ terms or not.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to accept the license terms.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to decline the license terms.</p>
+ </div>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgc" src="images/closed.gif"
+ onclick="toggle('trigger_pgc', 'toggle_pgc');" />
+ Components page settings</h3>
+ <div class="toggle" id="toggle_pgc">
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_COMPLIST</strong> <span class="parameter">text</span><br />
+ Text to display on next to the components list.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_INSTTYPE</strong> <span class="parameter">text</span><br />
+ Text to display on next to the installation type combo box.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE</strong> <span class="parameter">text</span><br />
+ Text to display on the of the top of the description box.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO</strong> <span class="parameter">text</span><br />
+ Text to display inside the description box when no section is selected.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgd" src="images/closed.gif"
+ onclick="toggle('trigger_pgd', 'toggle_pgd');" />
+ Directory page settings</h3>
+ <div class="toggle" id="toggle_pgd">
+ <p>
+ <strong>MUI_DIRECTORYPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on top of the page.</p>
+ <p>
+ <strong>MUI_DIRECTORYPAGE_TEXT_DESTINATION</strong> <span class="parameter">text</span><br />
+ Text to display on the destination folder frame.</p>
+ <p>
+ <strong>MUI_DIRECTORYPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
+ Variable in which to store the selected folder.<br />
+ <em>Default: $INSTDIR</em></p>
+ <p>
+ <strong>MUI_DIRECTORYPAGE_VERIFYONLEAVE</strong><br />
+ Does not disable the Next button when a folder is invalid but allows you to use
+ GetInstDirError in the leave function to handle an invalid folder.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgs" src="images/closed.gif"
+ onclick="toggle('trigger_pgs', 'toggle_pgs');" />
+ Start Menu folder page settings</h3>
+ <div class="toggle" id="toggle_pgs">
+ <p>
+ <strong>MUI_STARTMENUPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_TEXT_CHECKBOX</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to disable the Start Menu folder creation.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_DEFAULTFOLDER</strong> <span class="parameter">folder</span><br />
+ The default Start Menu Folder.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_NODISABLE</strong><br />
+ Do not display the checkbox to disable the creation of Start Menu shortcuts.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
+ <strong>MUI_STARTMENUPAGE_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
+ <strong>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
+ The registry key to store the Start Menu folder. The page will use it to remember
+ the users preference. You should also use for the uninstaller to remove the Start
+ Menu folders. Don't forget to remove this key during uninstallation.</p>
+ <p>
+ For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu
+ folder:</p>
+ <pre>
+!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
+ Delete &quot;$SMPROGRAMS\$R0\Your Shortcut.lnk&quot;
+</pre>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgi" src="images/closed.gif"
+ onclick="toggle('trigger_pgi', 'toggle_pgi');" />
+ Installation page settings</h3>
+ <div class="toggle" id="toggle_pgi">
+ <p>
+ <strong>MUI_INSTFILESPAGE_FINISHHEADER_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the header of the installation page when the installation has
+ been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
+ Subtext to display on the header of the installation page when the installation
+ has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_ABORTHEADER_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the header of the installation page when the installation has
+ been aborted.</p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
+ Subext to display on the header of the installation page when the installation has
+ been aborted.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgf" src="images/closed.gif"
+ onclick="toggle('trigger_pgf', 'toggle_pgf');" />
+ Finish page settings</h3>
+ <div class="toggle" id="toggle_pgf">
+ <p>
+ <strong>MUI_FINISHPAGE_TITLE</strong> <span class="parameter">title</span><br />
+ Title to display on the top of the page.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TITLE_3LINES</strong><br />
+ Extra space for the title area.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the page.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_LARGE</strong><br />
+ Extra space for the text area (if using checkboxes).</p>
+ <p>
+ <strong>MUI_FINISHPAGE_BUTTON</strong> <span class="parameter">text</span><br />
+ Text to display on the Finish button.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_CANCEL_ENABLED</strong><br />
+ Enable the Cancel button so the user can skip any options displayed on the finish
+ page.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_REBOOT</strong> <span class="parameter">text</span><br />
+ Text to display on the finish page when asking for a system reboot.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_REBOOTNOW</strong> <span class="parameter">text</span><br />
+ Text to display next to the 'Reboot now' option button.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_REBOOTLATER</strong> <span class="parameter">text</span><br />
+ Text to display next to the 'Reboot later' option button.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_REBOOTLATER_DEFAULT</strong><br />
+ Sets the 'Reboot later' option as the default option.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN</strong> <span class="parameter">exe_file</span><br />
+ Application which the user can select to run using a checkbox. You don't need to
+ put quotes around the filename when it contains spaces.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_TEXT</strong> <span class="parameter">text</span><br />
+ Texts to display next to the 'Run program' checkbox.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_PARAMETERS</strong> <span class="parameter">parameters</span><br />
+ Parameters for the application to run. Don't forget to escape double quotes in the
+ value (use $\&quot;).</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_NOTCHECKED</strong><br />
+ Do not check the 'Run program' checkbox by default</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_FUNCTION</strong> <span class="parameter">function</span><br />
+ Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without
+ parameters). You can use the function to execute multiple applications or you can
+ change the checkbox name and use it for other things.</p>
+ </div>
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME</strong> <span class="parameter">file/url</span><br />
+ File or website which the user can select to view using a checkbox. You don't need
+ to put quotes around the filename when it contains spaces.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME_TEXT</strong> <span class="parameter">text</span><br />
+ Texts to display next to the 'Show Readme' checkbox.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</strong><br />
+ Do not check the 'Show Readme' checkbox by default</p>
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME_FUNCTION</strong> <span class="parameter">function</span><br />
+ Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without
+ parameters). You can use the function to show multiple files or you can change the
+ checkbox name and use it for other things.</p>
+ </div>
+ <p>
+ <strong>MUI_FINISHPAGE_LINK</strong> <span class="parameter">link_text</span><br />
+ Text for a link on the which the user can click to view a website or file.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_FINISHPAGE_LINK_LOCATION</strong> <span class="parameter">file/url</span><br />
+ Website or file which the user can select to view using the link. You don't need
+ to put quotes around the filename when it contains spaces.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_LINK_COLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
+ Text color for the link on the Finish page.<br />
+ <em>Default: 000080</em></p>
+ </div>
+ <p>
+ <strong>MUI_FINISHPAGE_NOREBOOTSUPPORT</strong><br />
+ Disables support for the page that allows the user to reboot the system. Define
+ this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgu" src="images/closed.gif"
+ onclick="toggle('trigger_pgu', 'toggle_pgu');" />
+ Uninstall confirm page settings</h3>
+ <div class="toggle" id="toggle_pgu">
+ <p>
+ <strong>MUI_UNCONFIRMPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_UNCONFIRMPAGE_TEXT_LOCATION</strong> <span class="parameter">text</span><br />
+ Text to display next to the uninstall location text box.</p>
+ </div>
+ </div>
+ </div>
+ <h2>
+ 4. Language files</h2>
+ <div>
+ <p>
+ Insert the Modern UI language files for the languages to want to include.</p>
+ <pre>
+!insertmacro MUI_LANGUAGE &quot;English&quot;
+</pre>
+ <p>
+ The standard NSIS language files are loaded automatically, there is no need to use
+ LoadLanguageFile.</p>
+ </div>
+ <h2>
+ 5. Reserve files</h2>
+ <div>
+ <p>
+ 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. Include reserve file commands for such files before your sections
+ and functions:</p>
+ <pre>
+ReserveFile MyPlugin.dll
+!insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
+...
+</pre>
+ </div>
+ <h1>
+ Script code for pages</h1>
+ <div>
+ <p>
+ Some pages allow you to show additional information or can be used to get user input.
+ Here you can find the script code to use these features.</p>
+ <h2>
+ Components page descriptions</h2>
+ <div>
+ <p>
+ The Modern UI components page has a text box in which a description can be shown
+ when the user hovers the mouse over a component. If you don't want to use these
+ descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.</p>
+ <p>
+ To set a description for a section, an additional parameter needs to be added to
+ Section commmand with a unique identifier for the section. This name can later be
+ used to set the description for this section.</p>
+ <pre>
+Section &quot;Section Name 1&quot; Section1
+ ...
+SectionEnd
+</pre>
+ <p>
+ After the sections, use these macros to set the descriptions:</p>
+ <pre>
+LangString DESC_Section1 ${LANG_ENGLISH} &quot;Description of section 1.&quot;
+LangString DESC_Section2 ${LANG_ENGLISH} &quot;Description of section 2.&quot;
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+</pre>
+ <p>
+ For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END
+ macros.</p>
+ </div>
+ <h2>
+ Start Menu folder</h2>
+ <div>
+ <p>
+ Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
+ and MUI_STARTMENU_WRITE_END macros:</p>
+ <pre>
+!insertmacro MUI_STARTMENU_WRITE_BEGIN pageid
+ ...create shortcuts...
+!insertmacro MUI_STARTMENU_WRITE_END
+</pre>
+ <p>
+ The page ID should be the ID of the page on which the user has selected the folder
+ for the shortcuts you want to write.</p>
+ <p>
+ The variable which contains the folder and the page ID are set as parameters of
+ the page macro.</p>
+ </div>
+ </div>
+ <h1>
+ Language selection dialog</h1>
+ <div>
+ <p>
+ If you want the installer to display a language selection dialog (see the the <a
+ href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a> example),
+ insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:</p>
+ <pre>
+Function .onInit
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+FunctionEnd
+</pre>
+ <p>
+ This macro can also be used in the un.onInit function.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_lss" src="images/closed.gif"
+ onclick="toggle('trigger_lss', 'toggle_lss');" />
+ Settings for registry storage of selected language</h3>
+ <div class="toggle" id="toggle_lss">
+ <p>
+ To remember the user's preference, you can define a registry key. These defines
+ should be set before inserting the installation page macro.</p>
+ <p>
+ <strong>MUI_LANGDLL_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
+ <strong>MUI_LANGDLL_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
+ <strong>MUI_LANGDLL_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
+ The registry key to store the language. The users preference will be remembered.
+ You can also use it for the uninstaller to display the right language. Don't forget
+ to remove this key in the uninstaller.</p>
+ <p>
+ For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the
+ stored language preference:</p>
+ <pre>
+Function un.onInit
+
+ !insertmacro MUI_UNGETLANGUAGE
+
+FunctionEnd
+</pre>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_lsin" src="images/closed.gif"
+ onclick="toggle('trigger_lsin', 'toggle_lsin');" />
+ Interface settings for selection dialog</h3>
+ <div class="toggle" id="toggle_lsin">
+ <p>
+ To customize the language selection dialog interface, use these defines before inserting
+ the MUI_LANGDLL_DISPLAY macro.</p>
+ <p>
+ <strong>MUI_LANGDLL_WINDOWTITLE</strong> <span class="parameter">text</span><br />
+ The window title of the language selection dialog.</p>
+ <p>
+ <strong>MUI_LANGDLL_INFO</strong> <span class="parameter">text</span><br />
+ The text to display on the language selection dialog.</p>
+ <p>
+ <strong>MUI_LANGDLL_ALWAYSSHOW</strong><br />
+ Always show the language selection dialog, even if a language has been stored in
+ the registry. The language stored in the registry will be selected by default.</p>
+ <p>
+ <strong>MUI_LANGDLL_ALLLANGUAGES</strong><br />
+ Always show all available languages and don't filter according to their codepage.</p>
+ </div>
+ </div>
+ <h1>
+ Custom pages</h1>
+ <div>
+ <p>
+ If you want add your custom pages to your installer, you can insert your own page
+ commands between the page macros.</p>
+ <pre>
+!insertmacro MUI_PAGE_WELCOME
+Page custom FunctionName ;Custom page
+!insertmacro MUI_PAGE_COMPONENTS
+
+;Uninstaller
+!insertmacro MUI_UNPAGE_CONFIRM
+UninstPage custom un.FunctionName ;Custom page
+!insertmacro MUI_UNPAGE_INSTFILES
+</pre>
+ <p>
+ Use the MUI_HEADER_TEXT macro to set the text on the page header in a page function:</p>
+ <pre>
+LangString PAGE_TITLE ${LANG_ENGLISH} &quot;Title&quot;
+LangString PAGE_SUBTITLE ${LANG_ENGLISH} &quot;Subtitle&quot;
+
+Function CustomPageFunction
+ !insermacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
+ ...
+FuctionEnd
+</pre>
+ </div>
+ <h1>
+ Custom functions</h1>
+ <div>
+ <p>
+ Interface functions provided by NSIS, like the .onGUIInit function and the page
+ functions are automatically included by the Modern UI and filled with code to support
+ new interface features. If you want to add additional code to these function, create
+ a function with the custom script code in the script use the Modern UI functions
+ call them.</p>
+ <p>
+ Example:</p>
+ <pre class="text">
+!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
+
+Function myGUIInit
+ ...
+FunctionEnd</pre>
+ <p>
+ Modern UI pages can also customized using custom functions.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_cfg" src="images/closed.gif"
+ onclick="toggle('trigger_cfg', 'toggle_cfg');" />
+ General Custom Functions</h3>
+ <div class="toggle" id="toggle_cfg">
+ <p>
+ These defines should be set before inserting the language macros.</p>
+ <p>
+ <strong>MUI_CUSTOMFUNCTION_GUIINIT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_UNGUIINIT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_ABORT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_UNABORT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_MOUSEOVERSECTION</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_UNMOUSEOVERSECTION</strong> <span class="parameter">function</span></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_cfpg" src="images/closed.gif"
+ onclick="toggle('trigger_cfpg', 'toggle_cfpg');" />
+ Page Custom Functions</h3>
+ <div class="toggle" id="toggle_cfpg">
+ <p>
+ These defines should be set before inserting a page macro.</p>
+ <p>
+ <strong>MUI_PAGE_CUSTOMFUNCTION_PRE</strong> <span class="parameter">function</span><br />
+ <strong>MUI_PAGE_CUSTOMFUNCTION_SHOW</strong> <span class="parameter">function</span><br />
+ </p>
+ <p>
+ The pre function is called first and allows you to initalize variables or decide
+ wehther the page should be skipped. Then, the shown function is called, which can
+ be used to customize the interface. Finally, the user input can be validated leave
+ function. The NSIS Users Manual provides more information about these funtions.</p>
+ <p>
+ In the show function, the window handles of all controls on the page can be retrieved
+ from a Modern UI variable. A list of the variables names is not yet available. For
+ now, refer to the source files of the Modern UI 2.0. The variable declarations can
+ be found in the first lines of the header file for a certain page.</p>
+ </div>
+ </div>
+ <h1>
+ <a name="examples" id="examples">Example scripts</a></h1>
+ <div>
+ <p>
+ The example scripts do not use the Modern UI 2.0 yet. To can upgrade any example
+ (except InstallOptions.nsi) by inserting the MUI2.nsh header file instead of MUI.nsh.</p>
+ <p>
+ Basic: <a href="../../Examples/Modern%20UI/Basic.nsi">Basic.nsi</a><br />
+ Welcome/Finish page: <a href="../../Examples/Modern%20UI/WelcomeFinish.nsi">WelcomeFinish.nsi</a><br />
+ Multiple languages: <a href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br />
+ Header image: <a href="../../Examples/Modern%20UI/HeaderBitmap.nsi">HeaderBitmap.nsi</a><br />
+ Start Menu Folder page: <a href="../../Examples/Modern%20UI/StartMenu.nsi">StartMenu.nsi</a></p>
+ </div>
+ <h1>
+ Credits</h1>
+ <div>
+ <p>
+ Written by Joost Verburg.<br />
+ Icons designed by Nikos Adamamas, aka adni18.<br />
+ Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.</p>
+ </div>
+ <h1>
+ License</h1>
+ <div>
+ <p>
+ The zlib/libpng license applies to the Modern UI.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_lic" src="images/closed.gif"
+ onclick="toggle('trigger_lic', 'toggle_lic');" />
+ License Terms</h3>
+ <div class="toggle" id="toggle_lic">
+ <pre>
+Copyright &copy; 2002-2007 Joost Verburg
+
+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 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 distribution.
+</pre>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/Contrib/Modern UI 2/SConscript b/Contrib/Modern UI 2/SConscript
index 2c8c3cf..e683570 100755
--- a/Contrib/Modern UI 2/SConscript
+++ b/Contrib/Modern UI 2/SConscript
@@ -1,43 +1,43 @@
-target = 'Modern UI 2'
-
-docs = Split("""
- License.txt
- Readme.html
-""")
-
-doc_images = Split("""
- closed.gif
- header.gif
- open.gif
- screen1.png
- screen2.png
-""")
-
-contribs = Split("""
- Interface.nsh
- Localization.nsh
- MUI2.nsh
- Pages.nsh
-""")
-
-pages = Split("""
- Components.nsh
- Directory.nsh
- Finish.nsh
- InstallFiles.nsh
- License.nsh
- StartMenu.nsh
- UninstallConfirm.nsh
- Welcome.nsh
-""")
-
-Import('defenv')
-
-def join(prefix, list):
- return map(lambda x: '%s/%s' % (prefix, x), list)
-
-defenv.DistributeDocs(docs, path=target)
-defenv.DistributeDocs(join('../Modern UI/images',doc_images), path='%s/%s'%(target,'images'))
-path = 'Pages'
-defenv.DistributeContrib(join(path,pages), path='%s/%s'%(target,path))
-defenv.DistributeContrib(contribs, path=target)
+target = 'Modern UI 2'
+
+docs = Split("""
+ License.txt
+ Readme.html
+""")
+
+doc_images = Split("""
+ closed.gif
+ header.gif
+ open.gif
+ screen1.png
+ screen2.png
+""")
+
+contribs = Split("""
+ Interface.nsh
+ Localization.nsh
+ MUI2.nsh
+ Pages.nsh
+""")
+
+pages = Split("""
+ Components.nsh
+ Directory.nsh
+ Finish.nsh
+ InstallFiles.nsh
+ License.nsh
+ StartMenu.nsh
+ UninstallConfirm.nsh
+ Welcome.nsh
+""")
+
+Import('defenv')
+
+def join(prefix, list):
+ return map(lambda x: '%s/%s' % (prefix, x), list)
+
+defenv.DistributeDocs(docs, path=target)
+defenv.DistributeDocs(join('../Modern UI/images',doc_images), path='%s/%s'%(target,'images'))
+path = 'Pages'
+defenv.DistributeContrib(join(path,pages), path='%s/%s'%(target,path))
+defenv.DistributeContrib(contribs, path=target)
diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt
index 5fb0c17..673615c 100755
--- a/Contrib/Modern UI/Changelog.txt
+++ b/Contrib/Modern UI/Changelog.txt
@@ -1,263 +1,263 @@
-NSIS Modern User Interface
-Version History
-
-1.8 - August 9, 2007
-* Uses the new language files
-* Updated documentation
-* Although MUI_DIRECTORYPAGE_BGCOLOR and MUI_STARTMENUPAGE_BGCOLOR are documented as interface
- setttings that apply to every directory page or Start Menu folder page, they were actually
- implemented as page specific settings. They have been changed to interface settings.
-* MUI_LANGDLL_DISPLAY now also reads a previously saved language from the registry if the
- installation is silent.
-* InstallOptions macros have been moved to a separate header file (InstallOptions.nsh).
- The MUI_INSTALLOPTIONS_* macros are still provided for backwards compatibility and insert the
- equalivent INSTALLOPTIONS_* macros.
-* Added MUI_CUSTOMFUNCTION_MOUSEOVERSECTION
-
-1.78 - June 8, 2007
-* Added MUI_STARTMENUPAGE_BGCOLOR
-* Added MUI_DIRECTORYPAGE_BGCOLOR
-* Added MUI_LANGDLL_ALLLANGUAGES
-
-1.77 - April 27, 2007
-* Added MUI_FINISHPAGE_CANCEL_ENABLED
-* Added MUI_FINISHPAGE_REBOOTLATER_DEFAULT
-* Block unsupported languages in the language selection dialog
-* Cancel button no longer enabled by default on the finish page
-* Reduced flicker caused by MUI_HEADER_TRANSPARENT_TEXT
-
-1.76 - September 23, 2006
-* Added MUI_ABORTWARNING_CANCEL_DEFAULT
-
-1.75 - April 1, 2006
-* Added show function for the start menu page
-* Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts
-
-1.74 - September 4, 2005
-* Fixed compile error when checkboxes are used on multiple finish page pages
-
-1.73 - August 6, 2005
-* The checkboxes to run an application or show a Readme file can now also be used on an uninstaller
- finish pages or multiple finish pages
-
-1.72 - November 27, 2004
-* Fixed state of Finish page Cancel button when both an installer and uninstaller page is included
-
-1.71 - October 14, 2004
-* The selected language is only stored in the registry when installation was successful
-
-1.70 - February 6, 2004
-* Improved documentation
-* New Init custom function for Welcome and Finish page
-
-1.69 - January 7, 2004
-* All uninstaller pages work without installer pages
-* Fixed top text on uninstaller license page
-
-1.68 - November 24, 2003
-* New settings for extra space for title and text on Welcome and Finish page.
-* Improved handling of verbose settings. Define MUI_VERBOSE the set the Modern UI verbose level (1-4).
-* Language file string for uninstaller reboot information
-* Setting for folder validation in leave function
-* Fixed finish page text settings for multiple pages
-
-1.67 - November 18, 2003
-* Support for uninstaller Welcome pages and Finish pages
-* Improved and changed text settings
-* ID for Start Menu Folder pages, easier to use multiple pages
-* Renamed a few settings
-* Default header image
-* Support for uninstaller abort warning
-* Setting for 3 line text on Welcome and Finish page
- (NOTE: New settings have been introduced in version 1.68)
-* Langauge file backwards compatibility: English for missing strings
-* Support for different uninstaller header image
-* Language selection dialog not displayed if installer is silent
-* Cancel button on Finish page when there are options
-* Full RTL support
-
-1.66 - October 7, 2003
-* New system for page settings and custom pages
-* Support for uninstaller components page
-* Support for multiple pages of the same type
-* New position for interface settings
-* Changed macro and setting names
-* Updated langauge system, new language files and settings
-* Removed MUI_BRANDINGTEXT. You can use the standard BrandingText instruction.
-* Removed MUI_PRODUCT and MUI VERSION. You can use the standard Name instruction.
-
-1.65 - July 16, 2003
-* New page configuration system, no different system for installers with custom pages
-* Default windows color for the license text background
-* Example script updates (new format, user variables)
-* Improved registry storage for Start Menu folder
-* ReserveFile macro for StartMenu plug-in
-* Option to always show the language selection dialog (even if a language has been stored in the registry)
-* Checkboxes on Finish page can be used to call a function
-* Support for custom leave functions for Start Menu Folder, Welcome and Finish pages
-* Support for a link on the Finish page
-* New macro to get Start Menu folder in uninstaller
-* Options to disable bitmap stretching
-* Components page description box info text: always displayed
- when mouse is outside box, disabled style
-
-1.64 - April 27, 2003
-* Support for license page with checkbox or radiobuttons to let the user accept the agreement or not
-* Macros for finish headers don't have to be inserted anymore
-* Language preference stored when installation has completed, no problems anymore when the users selects the wrong language
-* Header text for aborted installation
-* New macros: get language for uninstaller, delete shortcuts
-* Language specific fonts
-* Welcome/Finish page INI files can be modified in pre functions
-* More texts can be customized
-
-1.63 - March 9, 2003
-* Support for a bitmap in the wizard header
-* New defines to change the components page interface
-* MUI_SYSTEM inserted automatically
-* Single macro for language selection dialog
-* Removed page description in window title
-* Easier to customize resource files
-* New system for custom functions
-* Start Menu folder registry key automatically written
-* New InstallOptions macros that do not remove the return value from the stack
-* Support for custom pages before the finish page
-* Renamed Start Menu page defines
-* 'Do not create shortcuts' checkbox can be removed
-* 'MS Shell Dlg' font for header title
-* RTL support
-* Documentation updates
-* Minor fixes
-
-1.62 - February 2, 2003
-* New language strings for Finish page
-* Possibility to let a Modern UI Function call your own function
-* No problems anymore when using both 'Run program' and 'Show Readme' on the Finish page
-* Default state of checkboxes on the finish page can be changed
-* Welcome / Finish page compatible with custom DPI settings
-* Converted Install Options INI files to use dialog units
-* More ReserveFile macros
- (NOTE: Some of these macros have been removed in later versions)
-* Background color can be changed with a define
-* Support for multilingual branding texts
-* Start Menu / Finish page window titles also work when using custom page commands
-* Language files should be inserted after inserting the MUI_SYSTEM macro
- (NOTE: The MUI_SYSTEM macro has been removed in version 1.63)
-* Define MUI_MANUALVERBOSE if you don't want the Modern UI to change the verbose settings during compilation
- (NOTE: This setting has been changed in version 1.68)
-
-1.61 - December 5, 2002
-* modern3.exe UI without description area
- (NOTE: This setting has been changed in version 1.63)
-* Added define to show uninstall confirm page
-* Added language string for finish page title and continue to uninstall
-* Define for parameters for the application to run on the finish page
-* Minor fixes
-
-1.6 - November 18, 2002
-* Welcome / Finish page
-* Automatic ask for reboot on finish page
-* Create no shortcut option on the Start Menu Folder selection page
-* Customizing GUIInit functions easier
-* Minor font / UI changes
-
-1.5 - November 11, 2002
-* New language file format
-* Language strings can be changed in the script without editing languagefiles
-* Start Menu Folder selection page
-* 'Click Next to continue' and 'Click Install to start the installation' texts automatically change to the page order
-* Install Options macros updated. MUI_INSTALLOPTIONS_DISPLAY is the standard macro now.
- Use MUI_INSTALLOPTIONS_INITDIALOG and MUI_INSTALLOPTIONS_SHOW if you want to customize dialog controls.
-* No more writing window titles & abort warnings to Install Options INI Files
-* Compatible with updated paging system
-* Renamed macros and defines
-* Minor fixes
-
-1.4 - November 4, 2002
-* Uses new NSIS Page command
-* Macro System updates (smaller)
-* Macro System a lot easier
-* Modern UI Language Files load NLF language files
-* Renamed macros and defines
-
-1.3 - October 27, 2002
-* Easier macro system for basic scripts
-* New MultiLanguage system using Modern UI Language Files
-* New directory structure (header/language files in Contrib\Modern UI)
-* Small bugfixes & typo corrections
-* SetPage function should be set using defines
-* Different NextPage/PrevPage/FinishHeader macros for install/uninstall
- (NOTE: These macros have been removed in version 1.4)
-* Interface settings can be definend (for example, MUI_ICON), no parameters for MUI_INTERFACE anymore
-* New Install Options macros to read/write IO INI file value
-
-1.21 - September 30, 2002
-* Temp vars set in Modern UI header
-* Currentpage & Install Options vars should be set using
- parameters of the MUI_INTERFACE and * MUI_INSTALLOPTIONS macros
- (NOTE: The MUI_INTERFACE macro has been removed in version 1.3)
-* MultiLanguage.nsi uses the new language strings
-
-1.2 - September 22, 2002
- (NOTE: All macros mentioned here have been removed in version 1.4)
-
-* Lots of macro system updates & fixes
-* InstallOptions support in macro system
-* Added Modern UI + InstallOptions example (InstallOptions.nsi)
-* MUI_NEXTPAGE_OUTER integrated in MUI_NEXTPAGE
-* No hard-coded function names anymore (you should give
- MUI_PREVPAGE a parameter with the set page function name
- (for example, MUI_PREVPAGE SetPage)
-* Examples use ReserveFile for faster startup
-
-1.19 - Semtember 19, 2002
-* Renamed some macros
-* Custom code can be used between page start/stop macros
- (NOTE: These macros have been removed in version 1.4)
-
-1.18 - Semtember 13, 2002
-* Uses the new Sendmessage string option
-
-1.17 - Semtember 10, 2002
-* Win9x font weight bug fixed (font of title in white rect)
-
-1.16 - Semtember 6, 2002
-* Change text 'Scroll down' on license page to 'Press Page Down',
- because the RichEdit control has focus by default now
-
-1.15 - Semtember 4, 2002
-* Multilanguage example: changed LangDialog to LangDLL::LangDialog (using the DLL name is now required)
- (NOTE: A new macro for the language selection dialog has been introduced in version 1.63)
-
-1.14 - Semtember 3, 2002
-* Small grammar fix (thanks eccles)
-* UI files updated by Justin for better RichEdit usage
-
-1.13 - Semtember 2, 2002
-* Added 16 color icons
-
-1.12 - August 30, 2002
-* Verifying installer & Unpacking data dialog has no titlebar anymore
-
-1.11 - August 29, 2002
-* Finish header for uninstaller can also be set using MUI_FINISHHEADER
- (NOTE: The MUI_FINISHHEADER macro has been removed in version 1.64)
-
-1.1 - August 29, 2002
- (NOTE: All settings mentioned here do not exist anymore)
-
-* Header file with macros, it's now very easy to use the UI in your scripts
-* Added the modern2.exe UI, with an other location of the Description frame, for installers with a lot of subsections (thanks rainwater)
-* Updated example scripts
-* Added Multilanguage.nsi example (Multilanguage & LangDLL)
-* Fixed background color issue with some custom XP themes
-* Removed WS_VISIBLE from black rect for inner dialog (fixes display issues)
-* Changed size of description area
-* Example script: Added instructions for the user on the Description frame
-* Auto sizing branding text
-* Used modern.bmp for the checks (thanks rainwater)
-* Using the new NSIS version, descriptions work using the keyboard and you can give descriptions to subsections
-* Correct font size using High-DPI fonts
-
-1.0 - August 26, 2002
+NSIS Modern User Interface
+Version History
+
+1.8 - August 9, 2007
+* Uses the new language files
+* Updated documentation
+* Although MUI_DIRECTORYPAGE_BGCOLOR and MUI_STARTMENUPAGE_BGCOLOR are documented as interface
+ setttings that apply to every directory page or Start Menu folder page, they were actually
+ implemented as page specific settings. They have been changed to interface settings.
+* MUI_LANGDLL_DISPLAY now also reads a previously saved language from the registry if the
+ installation is silent.
+* InstallOptions macros have been moved to a separate header file (InstallOptions.nsh).
+ The MUI_INSTALLOPTIONS_* macros are still provided for backwards compatibility and insert the
+ equalivent INSTALLOPTIONS_* macros.
+* Added MUI_CUSTOMFUNCTION_MOUSEOVERSECTION
+
+1.78 - June 8, 2007
+* Added MUI_STARTMENUPAGE_BGCOLOR
+* Added MUI_DIRECTORYPAGE_BGCOLOR
+* Added MUI_LANGDLL_ALLLANGUAGES
+
+1.77 - April 27, 2007
+* Added MUI_FINISHPAGE_CANCEL_ENABLED
+* Added MUI_FINISHPAGE_REBOOTLATER_DEFAULT
+* Block unsupported languages in the language selection dialog
+* Cancel button no longer enabled by default on the finish page
+* Reduced flicker caused by MUI_HEADER_TRANSPARENT_TEXT
+
+1.76 - September 23, 2006
+* Added MUI_ABORTWARNING_CANCEL_DEFAULT
+
+1.75 - April 1, 2006
+* Added show function for the start menu page
+* Added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts
+
+1.74 - September 4, 2005
+* Fixed compile error when checkboxes are used on multiple finish page pages
+
+1.73 - August 6, 2005
+* The checkboxes to run an application or show a Readme file can now also be used on an uninstaller
+ finish pages or multiple finish pages
+
+1.72 - November 27, 2004
+* Fixed state of Finish page Cancel button when both an installer and uninstaller page is included
+
+1.71 - October 14, 2004
+* The selected language is only stored in the registry when installation was successful
+
+1.70 - February 6, 2004
+* Improved documentation
+* New Init custom function for Welcome and Finish page
+
+1.69 - January 7, 2004
+* All uninstaller pages work without installer pages
+* Fixed top text on uninstaller license page
+
+1.68 - November 24, 2003
+* New settings for extra space for title and text on Welcome and Finish page.
+* Improved handling of verbose settings. Define MUI_VERBOSE the set the Modern UI verbose level (1-4).
+* Language file string for uninstaller reboot information
+* Setting for folder validation in leave function
+* Fixed finish page text settings for multiple pages
+
+1.67 - November 18, 2003
+* Support for uninstaller Welcome pages and Finish pages
+* Improved and changed text settings
+* ID for Start Menu Folder pages, easier to use multiple pages
+* Renamed a few settings
+* Default header image
+* Support for uninstaller abort warning
+* Setting for 3 line text on Welcome and Finish page
+ (NOTE: New settings have been introduced in version 1.68)
+* Langauge file backwards compatibility: English for missing strings
+* Support for different uninstaller header image
+* Language selection dialog not displayed if installer is silent
+* Cancel button on Finish page when there are options
+* Full RTL support
+
+1.66 - October 7, 2003
+* New system for page settings and custom pages
+* Support for uninstaller components page
+* Support for multiple pages of the same type
+* New position for interface settings
+* Changed macro and setting names
+* Updated langauge system, new language files and settings
+* Removed MUI_BRANDINGTEXT. You can use the standard BrandingText instruction.
+* Removed MUI_PRODUCT and MUI VERSION. You can use the standard Name instruction.
+
+1.65 - July 16, 2003
+* New page configuration system, no different system for installers with custom pages
+* Default windows color for the license text background
+* Example script updates (new format, user variables)
+* Improved registry storage for Start Menu folder
+* ReserveFile macro for StartMenu plug-in
+* Option to always show the language selection dialog (even if a language has been stored in the registry)
+* Checkboxes on Finish page can be used to call a function
+* Support for custom leave functions for Start Menu Folder, Welcome and Finish pages
+* Support for a link on the Finish page
+* New macro to get Start Menu folder in uninstaller
+* Options to disable bitmap stretching
+* Components page description box info text: always displayed
+ when mouse is outside box, disabled style
+
+1.64 - April 27, 2003
+* Support for license page with checkbox or radiobuttons to let the user accept the agreement or not
+* Macros for finish headers don't have to be inserted anymore
+* Language preference stored when installation has completed, no problems anymore when the users selects the wrong language
+* Header text for aborted installation
+* New macros: get language for uninstaller, delete shortcuts
+* Language specific fonts
+* Welcome/Finish page INI files can be modified in pre functions
+* More texts can be customized
+
+1.63 - March 9, 2003
+* Support for a bitmap in the wizard header
+* New defines to change the components page interface
+* MUI_SYSTEM inserted automatically
+* Single macro for language selection dialog
+* Removed page description in window title
+* Easier to customize resource files
+* New system for custom functions
+* Start Menu folder registry key automatically written
+* New InstallOptions macros that do not remove the return value from the stack
+* Support for custom pages before the finish page
+* Renamed Start Menu page defines
+* 'Do not create shortcuts' checkbox can be removed
+* 'MS Shell Dlg' font for header title
+* RTL support
+* Documentation updates
+* Minor fixes
+
+1.62 - February 2, 2003
+* New language strings for Finish page
+* Possibility to let a Modern UI Function call your own function
+* No problems anymore when using both 'Run program' and 'Show Readme' on the Finish page
+* Default state of checkboxes on the finish page can be changed
+* Welcome / Finish page compatible with custom DPI settings
+* Converted Install Options INI files to use dialog units
+* More ReserveFile macros
+ (NOTE: Some of these macros have been removed in later versions)
+* Background color can be changed with a define
+* Support for multilingual branding texts
+* Start Menu / Finish page window titles also work when using custom page commands
+* Language files should be inserted after inserting the MUI_SYSTEM macro
+ (NOTE: The MUI_SYSTEM macro has been removed in version 1.63)
+* Define MUI_MANUALVERBOSE if you don't want the Modern UI to change the verbose settings during compilation
+ (NOTE: This setting has been changed in version 1.68)
+
+1.61 - December 5, 2002
+* modern3.exe UI without description area
+ (NOTE: This setting has been changed in version 1.63)
+* Added define to show uninstall confirm page
+* Added language string for finish page title and continue to uninstall
+* Define for parameters for the application to run on the finish page
+* Minor fixes
+
+1.6 - November 18, 2002
+* Welcome / Finish page
+* Automatic ask for reboot on finish page
+* Create no shortcut option on the Start Menu Folder selection page
+* Customizing GUIInit functions easier
+* Minor font / UI changes
+
+1.5 - November 11, 2002
+* New language file format
+* Language strings can be changed in the script without editing languagefiles
+* Start Menu Folder selection page
+* 'Click Next to continue' and 'Click Install to start the installation' texts automatically change to the page order
+* Install Options macros updated. MUI_INSTALLOPTIONS_DISPLAY is the standard macro now.
+ Use MUI_INSTALLOPTIONS_INITDIALOG and MUI_INSTALLOPTIONS_SHOW if you want to customize dialog controls.
+* No more writing window titles & abort warnings to Install Options INI Files
+* Compatible with updated paging system
+* Renamed macros and defines
+* Minor fixes
+
+1.4 - November 4, 2002
+* Uses new NSIS Page command
+* Macro System updates (smaller)
+* Macro System a lot easier
+* Modern UI Language Files load NLF language files
+* Renamed macros and defines
+
+1.3 - October 27, 2002
+* Easier macro system for basic scripts
+* New MultiLanguage system using Modern UI Language Files
+* New directory structure (header/language files in Contrib\Modern UI)
+* Small bugfixes & typo corrections
+* SetPage function should be set using defines
+* Different NextPage/PrevPage/FinishHeader macros for install/uninstall
+ (NOTE: These macros have been removed in version 1.4)
+* Interface settings can be definend (for example, MUI_ICON), no parameters for MUI_INTERFACE anymore
+* New Install Options macros to read/write IO INI file value
+
+1.21 - September 30, 2002
+* Temp vars set in Modern UI header
+* Currentpage & Install Options vars should be set using
+ parameters of the MUI_INTERFACE and * MUI_INSTALLOPTIONS macros
+ (NOTE: The MUI_INTERFACE macro has been removed in version 1.3)
+* MultiLanguage.nsi uses the new language strings
+
+1.2 - September 22, 2002
+ (NOTE: All macros mentioned here have been removed in version 1.4)
+
+* Lots of macro system updates & fixes
+* InstallOptions support in macro system
+* Added Modern UI + InstallOptions example (InstallOptions.nsi)
+* MUI_NEXTPAGE_OUTER integrated in MUI_NEXTPAGE
+* No hard-coded function names anymore (you should give
+ MUI_PREVPAGE a parameter with the set page function name
+ (for example, MUI_PREVPAGE SetPage)
+* Examples use ReserveFile for faster startup
+
+1.19 - Semtember 19, 2002
+* Renamed some macros
+* Custom code can be used between page start/stop macros
+ (NOTE: These macros have been removed in version 1.4)
+
+1.18 - Semtember 13, 2002
+* Uses the new Sendmessage string option
+
+1.17 - Semtember 10, 2002
+* Win9x font weight bug fixed (font of title in white rect)
+
+1.16 - Semtember 6, 2002
+* Change text 'Scroll down' on license page to 'Press Page Down',
+ because the RichEdit control has focus by default now
+
+1.15 - Semtember 4, 2002
+* Multilanguage example: changed LangDialog to LangDLL::LangDialog (using the DLL name is now required)
+ (NOTE: A new macro for the language selection dialog has been introduced in version 1.63)
+
+1.14 - Semtember 3, 2002
+* Small grammar fix (thanks eccles)
+* UI files updated by Justin for better RichEdit usage
+
+1.13 - Semtember 2, 2002
+* Added 16 color icons
+
+1.12 - August 30, 2002
+* Verifying installer & Unpacking data dialog has no titlebar anymore
+
+1.11 - August 29, 2002
+* Finish header for uninstaller can also be set using MUI_FINISHHEADER
+ (NOTE: The MUI_FINISHHEADER macro has been removed in version 1.64)
+
+1.1 - August 29, 2002
+ (NOTE: All settings mentioned here do not exist anymore)
+
+* Header file with macros, it's now very easy to use the UI in your scripts
+* Added the modern2.exe UI, with an other location of the Description frame, for installers with a lot of subsections (thanks rainwater)
+* Updated example scripts
+* Added Multilanguage.nsi example (Multilanguage & LangDLL)
+* Fixed background color issue with some custom XP themes
+* Removed WS_VISIBLE from black rect for inner dialog (fixes display issues)
+* Changed size of description area
+* Example script: Added instructions for the user on the Description frame
+* Auto sizing branding text
+* Used modern.bmp for the checks (thanks rainwater)
+* Using the new NSIS version, descriptions work using the keyboard and you can give descriptions to subsections
+* Correct font size using High-DPI fonts
+
+1.0 - August 26, 2002
* Initial release \ No newline at end of file
diff --git a/Contrib/Modern UI/License.txt b/Contrib/Modern UI/License.txt
index edc0e2a..c1d2673 100755
--- a/Contrib/Modern UI/License.txt
+++ b/Contrib/Modern UI/License.txt
@@ -1,10 +1,10 @@
-Copyright © 2002-2007 Joost Verburg
-
-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 versions must be plainly marked as such, and must not be misrepresented as being the original software.
+Copyright © 2002-2007 Joost Verburg
+
+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 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 distribution. \ No newline at end of file
diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html
index f441443..e449beb 100755
--- a/Contrib/Modern UI/Readme.html
+++ b/Contrib/Modern UI/Readme.html
@@ -1,1150 +1,1150 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>NSIS Modern User Interface - Documentation</title>
- <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
- <style type="text/css">
- /*<![CDATA[*/body
- {
- padding: 10px;
- background-color: #F0F0F0;
- font-size: 13px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight: normal;
- text-align: justify;
- }
- p, li
- {
- font-size: 13px;
- }
- table
- {
- margin: auto;
- background-color: #FFFFFF;
- }
- .maintable
- {
- border: 2px solid #376EAB;
- }
- .parameter
- {
- font-weight: bold;
- color: #6586AC;
- }
- h1
- {
- font-size: 20px;
- color: #7A7272;
- font-weight: normal;
- }
- h2
- {
- font-size: 17px;
- font-weight: bold;
- color: #303030;
- }
- h3
- {
- font-size: 14px;
- font-weight: bold;
- color: #2B5885;
- }
- pre
- {
- font-size: 13px;
- }
- div
- {
- margin: 20px;
- }
- div.settings
- {
- margin-right: 0;
- }
- a:link, a:visited, a:active
- {
- color: #294F75;
- text-decoration: none;
- }
- a:hover
- {
- color: #182634;
- text-decoration: underline;
- }
- .trigger
- {
- cursor: pointer;
- cursor: hand;
- height: 14px;
- }
- .toggle
- {
- display: none;
- }
- .options
- {
- text-align: center;
- cursor: pointer;
- cursor: hand;
- color: #294F75;
- }
- /*]]>*/</style>
-
- <script type="text/javascript">
-//<![CDATA[
-
- var image_open = new Image();
- image_open.src = "images/open.gif";
- var image_closed = new Image();
- image_closed.src = "images/closed.gif";
-
- function toggle(image, section) {
-
- if(document.all) {
- if(document.all[section].style.display == "block") {
- document.all[section].style.display = "none";
- document.all[image].src = image_closed.src;
- }
- else
- {
- document.all[section].style.display = "block";
- document.all[image].src = image_open.src;
- }
- }
- else
- {
- if(document.getElementById(section).style.display == "block") {
- document.getElementById(section).style.display = "none";
- document.getElementById(image).src = image_closed.src;
- }
- else
- {
- document.getElementById(section).style.display = "block";
- document.getElementById(image).src = image_open.src;
- }
- }
-
- }
-
- function expandall() {
-
- var divNodeList = document.getElementsByTagName('div');
- for (i = 0; i < divNodeList.length; i++) {
- if(divNodeList[i].id) {
- divNodeList[i].style.display = "block";
- document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/open.gif";
- }
- }
-
- }
-
- function collapseall() {
-
- var divNodeList = document.getElementsByTagName('div');
- for (i = 0; i < divNodeList.length; i++) {
- if(divNodeList[i].id) {
- divNodeList[i].style.display = "none";
- document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/closed.gif";
- }
- }
-
- }
-
-//]]>
- </script>
-
-</head>
-<body>
- <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
- <tr>
- <td>
- <img src="images/header.gif" width="750" height="80" alt="" />
- <p class="options">
- <a onclick="expandall()">[Expand all]</a>&nbsp; &nbsp;<a onclick="collapseall()">[Collapse
- all]</a></p>
- <div>
- <h1>
- Introduction</h1>
- <div>
- <p>
- The Modern UI provides a user interface for NSIS installers with a modern wizard
- style, similar to the wizards of recent Windows versions. It is based on the basic
- user interface that is provided by the NSIS compiler itself and extends it with
- more interface features and pages.</p>
- <p>
- All standard NSIS pages (such as the pages to select components and the installation
- folder) are supported as well as a number of additional pages. The welcome page
- allows you to provide an introduction to the installation process, while the finish
- page provides a way to let the user decide what steps should be performed after
- the setup wizard is closed (for example, whether the application should be started
- immediately). A finish page can also be used to ask for a system restart is necessary.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_scr" src="images/closed.gif"
- onclick="toggle('trigger_scr', 'toggle_scr');" />
- Screenshots</h3>
- <div class="toggle" id="toggle_scr">
- <p>
- <img src="images/screen1.png" width="503" height="393" alt="" /></p>
- <p>
- <img src="images/screen2.png" width="503" height="393" alt="" /></p>
- </div>
- </div>
- <h1>
- Script header</h1>
- <div>
- <p>
- The settings for the Modern UI should be inserted in the header of the script file.
- It&#39;s important to follow the same order as the items below.&nbsp;For example,
- interface settings should be defined before you insert pages, because the pages
- depend on the interface configuration. It may be useful to look at the <a href="#examples">
- example scripts</a> too see how this is done in actual script files.</p>
- <p>
- Parameters are given in this format: <span class="parameter">required (option1 | option2)
- [optional]</span></p>
- <h2>
- 1. Header file</h2>
- <div>
- <p>
- First of all, add this line to the top of script to include the Modern UI:</p>
- <pre>
-!include &quot;MUI.nsh&quot;
-</pre>
- </div>
- <h2>
- 2. Interface configuration</h2>
- <div>
- <p>
- Then, you may want to use interface settings to change the look and feel of the
- installer. These settings apply to all pages.<p>
- The interface settings provided by the NSIS compiler itself (such as LicenseText,
- Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts. The Modern
- UI provides equalivent or extended versions of these settings.<p>
- Examples:</p>
- <pre>
-!define MUI_COMPONENTSPAGE_SMALLDESC ;No value
-!define MUI_UI &quot;myUI.exe&quot; ;Value
-!define MUI_INSTFILESPAGE_COLORS &quot;FFFFFF 000000&quot; ;Two colors
-</pre>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_in" src="images/closed.gif"
- onclick="toggle('trigger_in', 'toggle_in');" />
- Interface settings</h3>
- <div class="toggle" id="toggle_in">
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ingen" src="images/closed.gif"
- onclick="toggle('trigger_ingen', 'toggle_ingen');" />
- Page header</h3>
- <div class="toggle" id="toggle_ingen">
- <p>
- <strong>MUI_ICON</strong> <span class="parameter">icon_file</span><br />
- The icon for the installer.<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico</em></p>
- <p>
- <strong>MUI_UNICON</strong> <span class="parameter">icon_file</span><br />
- The icon for the uninstaller.<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico</em></p>
- <p>
- <strong>MUI_HEADERIMAGE</strong><br />
- Display an image on the header of the page.</p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of installers pages (recommended size: 150x57
- pixels).<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP_NOSTRETCH</strong><br />
- Do not stretch the installer header bitmap to fit the size of the field. Use this
- option only if you have an image that does not use the whole space. If you have
- a full size bitmap that fits exactly, you should not use this option because the
- size of the field will be different if the user has a custom DPI setting.</p>
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of installers pages when using a RTL language
- (recommended size: 150x57 pixels).<br />
- <em>Default: Non-RTL bitmap</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH</strong><br />
- Do not stretch the installer header bitmap when using a RTL language to fit the
- size of the field. Use this option only if you have an image that does not use the
- whole space. If you have a full size bitmap that fits exactly, you should not use
- this option because the size of the field will be different if the user has a custom
- DPI setting.</p>
- </div>
- </div>
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of uninstaller pages (recommended size: 150x57
- pixels).<br />
- <em>Default: Installer header bitmap</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH</strong><br />
- Do not stretch the uninstaller header bitmap to fit the size of the field. Use this
- option only if you have an image that does not use the whole space. If you have
- a full size bitmap that fits exactly, you should not use this option because the
- size of the field will be different if the user has a custom DPI setting.</p>
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
- Bitmap image to display on the header of uninstallers pages when using a RTL language
- (recommended size: 150x57 pixels).<br />
- <em>Default: Installer RTL header bitmap</em></p>
- <div class="settings">
- <p>
- <strong>MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH</strong><br />
- Do not stretch the uninstaller header bitmap when using a RTL language to fit the
- size of the field. Use this option only if you have an image that does not use the
- whole space. If you have a full size bitmap that fits exactly, you should not use
- this option because the size of the field will be different if the user has a custom
- DPI setting.</p>
- </div>
- </div>
- <p>
- <strong>MUI_HEADERIMAGE_RIGHT</strong><br />
- Display the header image on the right side instead of the left side (when using
- a RTL language it will be displayed on the left side instead of the right side).</p>
- </div>
- <p>
- <strong>MUI_BGCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
- Background color for the header, the Welcome page and the Finish page.<br />
- <em>Default: FFFFFF</em></p>
- <p>
- <strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
- Set a transparent background for the header's label controls. Useful for custom
- user interfaces that set a bigger header image.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/closed.gif"
- onclick="toggle('trigger_inres', 'toggle_inres');" />
- Interface resources</h3>
- <div class="toggle" id="toggle_inres">
- <p>
- <strong>MUI_UI</strong> <span class="parameter">ui_file</span><br />
- The interface file with the dialog resources. Change this if you have made your
- own customized UI.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern.exe</em></p>
- <p>
- <strong>MUI_UI_HEADERIMAGE</strong> <span class="parameter">ui_file</span><br />
- The interface files with the dialog resource IDD_INST that contains a bitmap control
- and space for the header bitmap.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe</em></p>
- <p>
- <strong>MUI_UI_HEADERIMAGE_RIGHT</strong> <span class="parameter">ui_file</span><br />
- The interface files with the dialog resource IDD_INST that contains a bitmap control
- and space for the header bitmap on the right side.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe</em></p>
- <p>
- <strong>MUI_UI_COMPONENTSPAGE_SMALLDESC</strong> <span class="parameter">ui_file</span><br />
- The interface files with a customized dialog resource IDD_SELCOM with a small description
- area.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_smalldesc.exe</em></p>
- <p>
- <strong>MUI_UI_COMPONENTSPAGE_NODESC</strong> <span class="parameter">ui_file</span><br />
- The interface files with a customized dialog resource IDD_SELCOM without a description
- area.<br />
- <em>Default: ${NSISDIR}\Contrib\UIs\modern_nodesc.exe</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inwf" src="images/closed.gif"
- onclick="toggle('trigger_inwf', 'toggle_inwf');" />
- Installer welcome/finish page</h3>
- <div class="toggle" id="toggle_inwf">
- <p>
- <strong>MUI_WELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
- <div class="settings">
- <p>
- <strong>MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
- Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
- field. Use this option only if you have an image that does not use the whole space.
- If you have a full size bitmap that fits exactly, you should not use this option
- because the size of the field will be different if the user has a custom DPI setting.</p>
- </div>
- <p>
- <strong>MUI_WELCOMEFINISHPAGE_INI</strong> <span class="parameter">ini_file</span><br />
- InstallOptions INI file for the Welcome page and the Finish page.<br />
- <em>Default: ${NSISDIR}\Contrib\Modern UI\ioSpecial.ini</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inuwf" src="images/closed.gif"
- onclick="toggle('trigger_inuwf', 'toggle_inuwf');" />
- Uninstaller welcome/finish page</h3>
- <div class="toggle" id="toggle_inuwf">
- <p>
- <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
- Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
- <div class="settings">
- <p>
- <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
- Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
- field. Use this option only if you have an image that does not use the whole space.
- If you have a full size bitmap that fits exactly, you should not use this option
- because the size of the field will be different if the user has a custom DPI setting.</p>
- </div>
- <p>
- <strong>MUI_UNWELCOMEFINISHPAGE_INI</strong> <span class="parameter">ini_file</span><br />
- InstallOptions INI file for the uninstaller Welcome page and the Finish page.<br />
- <em>Default: ${NSISDIR}\Contrib\Modern UI\ioSpecial.ini</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inl" src="images/closed.gif"
- onclick="toggle('trigger_inl', 'toggle_inl');" />
- License page</h3>
- <div class="toggle" id="toggle_inl">
- <p>
- <strong>MUI_LICENSEPAGE_BGCOLOR</strong> <span class="parameter">(/windows | /grey |
- (color: RRGGBB hexadecimal))</span><br />
- The background color for the license textbox. Use /windows for the Windows text
- background color (usually white). Use the /grey for the window background color
- (usually grey).<br />
- <em>Default: /windows</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inc" src="images/closed.gif"
- onclick="toggle('trigger_inc', 'toggle_inc');" />
- Components page</h3>
- <div class="toggle" id="toggle_inc">
- <p>
- <strong>MUI_COMPONENTSPAGE_CHECKBITMAP</strong> <span class="parameter">bitmap_file</span><br />
- The bitmap with images for the checks of the component select treeview.<br />
- <em>Default: ${NSISDIR}\Contrib\Graphics\Checks\modern.bmp</em></p>
- <p>
- <strong>MUI_COMPONENTSPAGE_SMALLDESC</strong><br />
- A small description area on the bottom of the page. Use this layout if you have
- a lot of sections and don't need large descriptions.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_NODESC</strong><br />
- No description area.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ind" src="images/closed.gif"
- onclick="toggle('trigger_ind', 'toggle_ind');" />
- Directory page</h3>
- <div class="toggle" id="toggle_ind">
- <p>
- <strong>MUI_DIRECTORYPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
- The background color for the directory textbox.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ins" src="images/closed.gif"
- onclick="toggle('trigger_ins', 'toggle_ins');" />
- Start Menu folder page</h3>
- <div class="toggle" id="toggle_ins">
- <p>
- <strong>MUI_STARTMENUPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
- The background color for the startmenu directory list and textbox.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_ini" src="images/closed.gif"
- onclick="toggle('trigger_ini', 'toggle_ini');" />
- Installation page</h3>
- <div class="toggle" id="toggle_ini">
- <p>
- <strong>MUI_INSTFILESPAGE_COLORS</strong> <span class="parameter">(/windows | &quot;(foreground
- color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal)&quot;)</span><br />
- The colors of the details screen. Use /windows for the default Windows colors.<br />
- <em>Default: /windows</em></p>
- <p>
- <strong>MUI_INSTFILESPAGE_PROGRESSBAR</strong> <span class="parameter">(&quot;&quot;
- | colored | smooth)</span><br />
- The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.<br />
- <em>Default: smooth</em></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inf" src="images/closed.gif"
- onclick="toggle('trigger_inf', 'toggle_inf');" />
- Installer finish page</h3>
- <div class="toggle" id="toggle_inf">
- <p>
- <strong>MUI_FINISHPAGE_NOAUTOCLOSE</strong><br />
- Do not automatically jump to the finish page, to allow the user to check the install
- log.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_uinf" src="images/closed.gif"
- onclick="toggle('trigger_uinf', 'toggle_uinf');" />
- Uninstaller finish page</h3>
- <div class="toggle" id="toggle_uinf">
- <p>
- <strong>MUI_UNFINISHPAGE_NOAUTOCLOSE</strong><br />
- Do not automatically jump to the finish page, to allow the user to check the uninstall
- log.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inaw" src="images/closed.gif"
- onclick="toggle('trigger_inaw', 'toggle_inaw');" />
- Abort warning</h3>
- <div class="toggle" id="toggle_inaw">
- <p>
- <strong>MUI_ABORTWARNING</strong><br />
- Show a message box with a warning when the user wants to close the installer.</p>
- <div class="settings">
- <p>
- <strong>MUI_ABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the abort warning message box.</p>
- <p>
- <strong>MUI_ABORTWARNING_CANCEL_DEFAULT</strong><br />
- Set the Cancel button as the default button on the message box.</p>
- </div>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_inuaw" src="images/closed.gif"
- onclick="toggle('trigger_inuaw', 'toggle_inuaw');" />
- Uninstaller abort warning</h3>
- <div class="toggle" id="toggle_inuaw">
- <p>
- <strong>MUI_UNABORTWARNING</strong><br />
- Show a message box with a warning when the user wants to close the uninstaller.</p>
- <div class="settings">
- <p>
- <strong>MUI_UNABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the abort warning message box.</p>
- <p>
- <strong>MUI_UNABORTWARNING_CANCEL_DEFAULT</strong><br />
- Set the Cancel button as the default button on the message box.</p>
- </div>
- </div>
- </div>
- </div>
- <h2>
- 3. Pages</h2>
- <div>
- <p>
- Insert the following macros to set the pages you want to use. The pages will appear
- in the order in which you insert them in the script. You can also insert custom
- Page commands between the macros to add custom pages.</p>
- <p>
- You can add multiple pages of certain types (for example, if you want the user to
- specify multiple folders).</p>
- <p>
- Examples:</p>
- <pre>
-!insertmacro MUI_PAGE_LICENSE &quot;License.rtf&quot;
-!insertmacro MUI_PAGE_COMPONENTS
-
-Var STARTMENU_FOLDER
-!insertmacro MUI_PAGE_STARTMENU &quot;Application&quot; $StartMenuFolder
-</pre>
- <p>
- You will need the page ID for the Start Menu folder page when using the Start Menu
- folder macros. The folder will be stored in the specified variable.</p>
- <p>
- <strong>Installer pages</strong><br />
- MUI_PAGE_WELCOME<br />
- MUI_PAGE_LICENSE <span class="parameter">textfile</span><br />
- MUI_PAGE_COMPONENTS<br />
- MUI_PAGE_DIRECTORY<br />
- MUI_PAGE_STARTMENU <span class="parameter">pageid variable</span><br />
- MUI_PAGE_INSTFILES<br />
- MUI_PAGE_FINISH</p>
- <p>
- <strong>Uninstaller pages</strong><br />
- MUI_UNPAGE_WELCOME<br />
- MUI_UNPAGE_CONFIRM<br />
- MUI_UNPAGE_LICENSE <span class="parameter">textfile</span><br />
- MUI_UNPAGE_COMPONENTS<br />
- MUI_UNPAGE_DIRECTORY<br />
- MUI_UNPAGE_INSTFILES<br />
- MUI_UNPAGE_FINISH</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pg" src="images/closed.gif"
- onclick="toggle('trigger_pg', 'toggle_pg');" />
- Page settings</h3>
- <div class="toggle" id="toggle_pg">
- <p>
- Page settings apply to a single page and should be set before inserting a page macro.
- The same settings can be used for installer and uninstaller pages. You have to repeat
- the setting if you want it to apply to multiple pages. Example:</p>
- <pre>
-;Add a directory page to let the user specify a plug-ins folder
-;Store the folder in $PluginsFolder
-
-Var PLUGINS_FOLDER
-!define MUI_DIRECTORYPAGE_VARIABLE $PluginsFolder
-!insertmacro MUI_PAGE_DIRECTORY
-</pre>
- <p>
- <p>
- All standard texts in the user interface are loaded from language files, which are
- available for all languages supported by NSIS. So you only need to define these
- texts if you want to change the default.</p>
- <p>
- If the parameter is a text that should be different for each language, define a
- language string using LangString and use $(LangStringName) as value. For a license
- text in multiple languages, LicenseLangString can be used. Refer the NSIS Users
- Manual for more information about installers with multiple languages.</p>
- <p>
- In all text settings, the doublequote character (&quot;) should be escaped in the
- following form: $\&quot;</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgg" src="images/closed.gif"
- onclick="toggle('trigger_pgg', 'toggle_pgg');" />
- General page settings</h3>
- <div class="toggle" id="toggle_pgg">
- <p>
- <strong>MUI_PAGE_HEADER_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the header of the page.</p>
- <p>
- <strong>MUI_PAGE_HEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
- Subtext to display on the header of the page.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgw" src="images/closed.gif"
- onclick="toggle('trigger_pgw', 'toggle_pgw');" />
- Welcome page settings</h3>
- <div class="toggle" id="toggle_pgw">
- <p>
- To add a newline to any of these texts, use \r\n instead of $\r$\n.</p>
- <p>
- <strong>MUI_WELCOMEPAGE_TITLE</strong> <span class="parameter">title</span><br />
- Title to display on the top of the page.</p>
- <p>
- <strong>MUI_WELCOMEPAGE_TITLE_3LINES</strong><br />
- Extra space for the title area.</p>
- <p>
- <strong>MUI_WELCOMEPAGE_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the page.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgl" src="images/closed.gif"
- onclick="toggle('trigger_pgl', 'toggle_pgl');" />
- License page settings</h3>
- <div class="toggle" id="toggle_pgl">
- <p>
- <strong>MUI_LICENSEPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_LICENSEPAGE_TEXT_BOTTOM</strong> <span class="parameter">text</span><br />
- Text to display on the bottom of the page.</p>
- <p>
- <strong>MUI_LICENSEPAGE_BUTTON</strong> <span class="parameter">button_text</span><br />
- Text to display on the 'I Agree' button.</p>
- <p>
- <strong>MUI_LICENSEPAGE_CHECKBOX</strong><br />
- Display a checkbox the user has to check to agree with the license terms.</p>
- <div class="settings">
- <p>
- <strong>MUI_LICENSEPAGE_CHECKBOX_TEXT</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to agree with the license terms.</p>
- </div>
- <p>
- <strong>MUI_LICENSEPAGE_RADIOBUTTONS</strong><br />
- Display two radio buttons to allow the user to choose between accepting the license
- terms or not.</p>
- <div class="settings">
- <p>
- <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to accept the license terms.</p>
- <p>
- <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to decline the license terms.</p>
- </div>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgc" src="images/closed.gif"
- onclick="toggle('trigger_pgc', 'toggle_pgc');" />
- Components page settings</h3>
- <div class="toggle" id="toggle_pgc">
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_COMPLIST</strong> <span class="parameter">text</span><br />
- Text to display on next to the components list.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_INSTTYPE</strong> <span class="parameter">text</span><br />
- Text to display on next to the installation type combo box.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE</strong> <span class="parameter">text</span><br />
- Text to display on the of the top of the description box.</p>
- <p>
- <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO</strong> <span class="parameter">text</span><br />
- Text to display inside the description box when no section is selected.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgd" src="images/closed.gif"
- onclick="toggle('trigger_pgd', 'toggle_pgd');" />
- Directory page settings</h3>
- <div class="toggle" id="toggle_pgd">
- <p>
- <strong>MUI_DIRECTORYPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on top of the page.</p>
- <p>
- <strong>MUI_DIRECTORYPAGE_TEXT_DESTINATION</strong> <span class="parameter">text</span><br />
- Text to display on the destination folder frame.</p>
- <p>
- <strong>MUI_DIRECTORYPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
- Variable in which to store the selected folder.<br />
- <em>Default: $INSTDIR</em></p>
- <p>
- <strong>MUI_DIRECTORYPAGE_VERIFYONLEAVE</strong><br />
- Does not disable the Next button when a folder is invalid but allows you to use
- GetInstDirError in the leave function to handle an invalid folder.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgs" src="images/closed.gif"
- onclick="toggle('trigger_pgs', 'toggle_pgs');" />
- Start Menu folder page settings</h3>
- <div class="toggle" id="toggle_pgs">
- <p>
- <strong>MUI_STARTMENUPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_TEXT_CHECKBOX</strong> <span class="parameter">text</span><br />
- Text to display next to the checkbox to disable the Start Menu folder creation.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_DEFAULTFOLDER</strong> <span class="parameter">folder</span><br />
- The default Start Menu Folder.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_NODISABLE</strong><br />
- Do not display the checkbox to disable the creation of Start Menu shortcuts.</p>
- <p>
- <strong>MUI_STARTMENUPAGE_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
- <strong>MUI_STARTMENUPAGE_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
- <strong>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
- The registry key to store the Start Menu folder. The page will use it to remember
- the users preference. You should also use for the uninstaller to remove the Start
- Menu folders. Don't forget to remove this key during uninstallation.</p>
- <p>
- For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu
- folder:</p>
- <pre>
-!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
- Delete &quot;$SMPROGRAMS\$R0\Your Shortcut.lnk&quot;
-</pre>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgi" src="images/closed.gif"
- onclick="toggle('trigger_pgi', 'toggle_pgi');" />
- Installation page settings</h3>
- <div class="toggle" id="toggle_pgi">
- <p>
- <strong>MUI_INSTFILESPAGE_FINISHHEADER_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the header of the installation page when the installation has
- been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
- <p>
- <strong>MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
- Subtext to display on the header of the installation page when the installation
- has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
- <p>
- <strong>MUI_INSTFILESPAGE_ABORTHEADER_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the header of the installation page when the installation has
- been aborted.</p>
- <p>
- <strong>MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
- Subext to display on the header of the installation page when the installation has
- been aborted.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgf" src="images/closed.gif"
- onclick="toggle('trigger_pgf', 'toggle_pgf');" />
- Finish page settings</h3>
- <div class="toggle" id="toggle_pgf">
- <p>
- To add a newline to any of these texts, use \r\n instead of $\r$\n.</p>
- <p>
- <strong>MUI_FINISHPAGE_TITLE</strong> <span class="parameter">title</span><br />
- Title to display on the top of the page.</p>
- <p>
- <strong>MUI_FINISHPAGE_TITLE_3LINES</strong><br />
- Extra space for the title area.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT</strong> <span class="parameter">text</span><br />
- Text to display on the page.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_LARGE</strong><br />
- Extra space for the text area (if using checkboxes).</p>
- <p>
- <strong>MUI_FINISHPAGE_BUTTON</strong> <span class="parameter">text</span><br />
- Text to display on the Finish button.</p>
- <p>
- <strong>MUI_FINISHPAGE_CANCEL_ENABLED</strong><br />
- Enable the Cancel button so the user can skip any options displayed on the finish
- page.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_REBOOT</strong> <span class="parameter">text</span><br />
- Text to display on the finish page when asking for a system reboot.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_REBOOTNOW</strong> <span class="parameter">text</span><br />
- Text to display next to the 'Reboot now' option button.</p>
- <p>
- <strong>MUI_FINISHPAGE_TEXT_REBOOTLATER</strong> <span class="parameter">text</span><br />
- Text to display next to the 'Reboot later' option button.</p>
- <p>
- <strong>MUI_FINISHPAGE_REBOOTLATER_DEFAULT</strong><br />
- Sets the 'Reboot later' option as the default option.</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN</strong> <span class="parameter">exe_file</span><br />
- Application which the user can select to run using a checkbox. You don't need to
- put quotes around the filename when it contains spaces.</p>
- <div class="settings">
- <p>
- <strong>MUI_FINISHPAGE_RUN_TEXT</strong> <span class="parameter">text</span><br />
- Texts to display next to the 'Run program' checkbox.</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN_PARAMETERS</strong> <span class="parameter">parameters</span><br />
- Parameters for the application to run. Don't forget to escape double quotes in the
- value (use $\&quot;).</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN_NOTCHECKED</strong><br />
- Do not check the 'Run program' checkbox by default</p>
- <p>
- <strong>MUI_FINISHPAGE_RUN_FUNCTION</strong> <span class="parameter">function</span><br />
- Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without
- parameters). You can use the function to execute multiple applications or you can
- change the checkbox name and use it for other things.</p>
- </div>
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME</strong> <span class="parameter">file/url</span><br />
- File or website which the user can select to view using a checkbox. You don't need
- to put quotes around the filename when it contains spaces.</p>
- <div class="settings">
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME_TEXT</strong> <span class="parameter">text</span><br />
- Texts to display next to the 'Show Readme' checkbox.</p>
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</strong><br />
- Do not check the 'Show Readme' checkbox by default</p>
- <p>
- <strong>MUI_FINISHPAGE_SHOWREADME_FUNCTION</strong> <span class="parameter">function</span><br />
- Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without
- parameters). You can use the function to show multiple files or you can change the
- checkbox name and use it for other things.</p>
- </div>
- <p>
- <strong>MUI_FINISHPAGE_LINK</strong> <span class="parameter">link_text</span><br />
- Text for a link on the which the user can click to view a website or file.</p>
- <div class="settings">
- <p>
- <strong>MUI_FINISHPAGE_LINK_LOCATION</strong> <span class="parameter">file/url</span><br />
- Website or file which the user can select to view using the link. You don't need
- to put quotes around the filename when it contains spaces.</p>
- <p>
- <strong>MUI_FINISHPAGE_LINK_COLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
- Text color for the link on the Finish page.<br />
- <em>Default: 000080</em></p>
- </div>
- <p>
- <strong>MUI_FINISHPAGE_NOREBOOTSUPPORT</strong><br />
- Disables support for the page that allows the user to reboot the system. Define
- this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.</p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_pgu" src="images/closed.gif"
- onclick="toggle('trigger_pgu', 'toggle_pgu');" />
- Uninstall confirm page settings</h3>
- <div class="toggle" id="toggle_pgu">
- <p>
- <strong>MUI_UNCONFIRMPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
- Text to display on the top of the page.</p>
- <p>
- <strong>MUI_UNCONFIRMPAGE_TEXT_LOCATION</strong> <span class="parameter">text</span><br />
- Text to display next to the uninstall location text box.</p>
- </div>
- </div>
- </div>
- <h2>
- 4. Language files</h2>
- <div>
- <p>
- Insert the Modern UI language files for the languages to want to include.</p>
- <pre>
-!insertmacro MUI_LANGUAGE &quot;English&quot;
-</pre>
- <p>
- The standard NSIS language files are loaded automatically, there is no need to use
- LoadLanguageFile.</p>
- </div>
- <h2>
- 5. Reserve files</h2>
- <div>
- <p>
- 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. Include reserve file commands for such files before your sections
- and functions:</p>
- <pre>
-ReserveFile &quot;ioFile.ini&quot; ;Your own InstallOptions INI files
-!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions plug-in
-!insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
-</pre>
- </div>
- </div>
- <h1>
- Script code for pages</h1>
- <div>
- <p>
- Some pages allow you to show additional information or can be used to get user input.
- Here you can find the script code to use these features.</p>
- <h2>
- Components page descriptions</h2>
- <div>
- <p>
- The Modern UI components page has a text box in which a description can be shown
- when the user hovers the mouse over a component. If you don't want to use these
- descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.</p>
- <p>
- To set a description for a section, an additional parameter needs to be added to
- Section commmand with a unique identifier for the section. This name can later be
- used to set the description for this section.</p>
- <pre>
-Section &quot;Section Name 1&quot; Section1
- ...
-SectionEnd
-</pre>
- <p>
- After the sections, use these macros to set the descriptions:</p>
- <pre>
-LangString DESC_Section1 ${LANG_ENGLISH} &quot;Description of section 1.&quot;
-LangString DESC_Section2 ${LANG_ENGLISH} &quot;Description of section 2.&quot;
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-</pre>
- <p>
- For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END
- macros.</p>
- </div>
- <h2>
- Start Menu folder</h2>
- <div>
- <p>
- Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
- and MUI_STARTMENU_WRITE_END macros:</p>
- <pre>
-!insertmacro MUI_STARTMENU_WRITE_BEGIN pageid
- ...create shortcuts...
-!insertmacro MUI_STARTMENU_WRITE_END
-</pre>
- <p>
- The page ID should be the ID of the page on which the user has selected the folder
- for the shortcuts you want to write.</p>
- <p>
- The variable which contains the folder and the page ID are set as parameters of
- the page macro.</p>
- </div>
- </div>
- <h1>
- Language selection dialog</h1>
- <div>
- <p>
- If you want the installer to display a language selection dialog (see the the <a
- href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a> example),
- insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:</p>
- <pre>
-Function .onInit
-
- !insertmacro MUI_LANGDLL_DISPLAY
-
-FunctionEnd
-</pre>
- <p>
- This macro can also be used in the un.onInit function.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_lss" src="images/closed.gif"
- onclick="toggle('trigger_lss', 'toggle_lss');" />
- Settings for registry storage of selected language</h3>
- <div class="toggle" id="toggle_lss">
- <p>
- To remember the user's preference, you can define a registry key. These defines
- should be set before inserting the installation page macro.</p>
- <p>
- <strong>MUI_LANGDLL_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
- <strong>MUI_LANGDLL_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
- <strong>MUI_LANGDLL_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
- The registry key to store the language. The users preference will be remembered.
- You can also use it for the uninstaller to display the right language. Don't forget
- to remove this key in the uninstaller.</p>
- <p>
- For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the
- stored language preference:</p>
- <pre>
-Function un.onInit
-
- !insertmacro MUI_UNGETLANGUAGE
-
-FunctionEnd
-</pre>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_lsin" src="images/closed.gif"
- onclick="toggle('trigger_lsin', 'toggle_lsin');" />
- Interface settings for selection dialog</h3>
- <div class="toggle" id="toggle_lsin">
- <p>
- To customize the language selection dialog interface, use these defines before inserting
- the MUI_LANGDLL_DISPLAY macro.</p>
- <p>
- <strong>MUI_LANGDLL_WINDOWTITLE</strong> <span class="parameter">text</span><br />
- The window title of the language selection dialog.</p>
- <p>
- <strong>MUI_LANGDLL_INFO</strong> <span class="parameter">text</span><br />
- The text to display on the language selection dialog.</p>
- <p>
- <strong>MUI_LANGDLL_ALWAYSSHOW</strong><br />
- Always show the language selection dialog, even if a language has been stored in
- the registry. The language stored in the registry will be selected by default.</p>
- <p>
- <strong>MUI_LANGDLL_ALLLANGUAGES</strong><br />
- Always show all available languages and don't filter according to their codepage.</p>
- </div>
- </div>
- <h1>
- Custom pages</h1>
- <div>
- <p>
- If you want add your custom pages to your installer, you can insert your own page
- commands between the page macros. The <a href="../InstallOptions/Readme.html">InstallOptions
- documentation</a> provides information about creating custom pages using InstallOptions.</p>
- <pre>
-!insertmacro MUI_PAGE_WELCOME
-Page custom FunctionName ;Custom page
-!insertmacro MUI_PAGE_COMPONENTS
-
-;Uninstaller
-!insertmacro MUI_UNPAGE_CONFIRM
-UninstPage custom un.FunctionName ;Custom page
-!insertmacro MUI_UNPAGE_INSTFILES
-</pre>
- <p>
- Use the MUI_HEADER_TEXT macro to set the text on the page header in a page function:</p>
- <pre>
-LangString PAGE_TITLE ${LANG_ENGLISH} &quot;Title&quot;
-LangString PAGE_SUBTITLE ${LANG_ENGLISH} &quot;Subtitle&quot;
-
-Function CustomPageFunction
- !insermacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY &quot;ioFile.ini&quot;
-FuctionEnd
-</pre>
- </div>
- <h1>
- Custom functions</h1>
- <div>
- <p>
- Interface functions provided by NSIS, like the .onGUIInit function and the page
- functions are automatically included by the Modern UI and filled with code to support
- new interface features. If you want to add additional code to these function, create
- a function with the custom script code in the script use the Modern UI functions
- call them.</p>
- <p>
- Example:</p>
- <pre class="text">
-!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
-
-Function myGUIInit
- ...your own code...
-FunctionEnd
-</pre>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_cfg" src="images/closed.gif"
- onclick="toggle('trigger_cfg', 'toggle_cfg');" />
- General Custom Functions</h3>
- <div class="toggle" id="toggle_cfg">
- <p>
- These defines should be set before inserting the language macros.</p>
- <p>
- <strong>MUI_CUSTOMFUNCTION_GUIINIT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_UNGUIINIT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_ABORT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_UNABORT</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_MOUSEOVERSECTION</strong> <span class="parameter">function</span><br />
- <strong>MUI_CUSTOMFUNCTION_UNMOUSEOVERSECTION</strong> <span class="parameter">function</span></p>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_cfpg" src="images/closed.gif"
- onclick="toggle('trigger_cfpg', 'toggle_cfpg');" />
- Page Custom Functions</h3>
- <div class="toggle" id="toggle_cfpg">
- <p>
- These defines should be set before inserting a page macro.</p>
- <p>
- <strong>MUI_PAGE_CUSTOMFUNCTION_PRE</strong> <span class="parameter">function</span><br />
- <strong>MUI_PAGE_CUSTOMFUNCTION_SHOW</strong> <span class="parameter">function</span><br />
- <strong>MUI_PAGE_CUSTOMFUNCTION_LEAVE</strong> <span class="parameter">function</span></p>
- <p>
- <strong>Notes:</strong></p>
- <ul>
- <li>In the Pre function of the Welcome page and the Finish page, you can write to the
- InstallOptions INI file of the page (ioSpecial.ini)</li>
- <li>In the Show function of the Welcome, Finish and StartMenu pages, $MUI_HWND contains
- the HWND of the inner dialog</li>
- </ul>
- </div>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_cfwf" src="images/closed.gif"
- onclick="toggle('trigger_cfwf', 'toggle_cfwf');" />
- Welcome/Finish Page Custom Functions</h3>
- <div class="toggle" id="toggle_cfwf">
- <p>
- This define should be inserted before a single Welcome or Finish page.</p>
- <p>
- <strong>MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT</strong> <span class="parameter">function</span></p>
- <p>
- This Init function is called before the InstallOptions INI file for the page is
- written, so you can use it to initialize any variables used in the page settings.</p>
- </div>
- </div>
- <h1>
- <a name="examples" id="examples">Example scripts</a></h1>
- <div>
- <p>
- Basic: <a href="../../Examples/Modern%20UI/Basic.nsi">Basic.nsi</a><br />
- Welcome/Finish page: <a href="../../Examples/Modern%20UI/WelcomeFinish.nsi">WelcomeFinish.nsi</a><br />
- Multiple languages: <a href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br />
- Header image: <a href="../../Examples/Modern%20UI/HeaderBitmap.nsi">HeaderBitmap.nsi</a><br />
- Custom pages: <a href="../../Examples/Modern%20UI/InstallOptions.nsi">InstallOptions.nsi</a><br />
- Start Menu Folder page: <a href="../../Examples/Modern%20UI/StartMenu.nsi">StartMenu.nsi</a></p>
- </div>
- <h1>
- Credits</h1>
- <div>
- <p>
- Written by Joost Verburg.<br />
- Icons designed by Nikos Adamamas, aka adni18.<br />
- Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.</p>
- </div>
- <h1>
- License</h1>
- <div>
- <p>
- The zlib/libpng license applies to the Modern UI.</p>
- <h3>
- <img class="trigger" alt="Open/Close section" id="trigger_lic" src="images/closed.gif"
- onclick="toggle('trigger_lic', 'toggle_lic');" />
- License Terms</h3>
- <div class="toggle" id="toggle_lic">
- <pre>
-Copyright &copy; 2002-2007 Joost Verburg
-
-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 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 distribution.
-</pre>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>NSIS Modern User Interface - Documentation</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+ <style type="text/css">
+ /*<![CDATA[*/body
+ {
+ padding: 10px;
+ background-color: #F0F0F0;
+ font-size: 13px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ text-align: justify;
+ }
+ p, li
+ {
+ font-size: 13px;
+ }
+ table
+ {
+ margin: auto;
+ background-color: #FFFFFF;
+ }
+ .maintable
+ {
+ border: 2px solid #376EAB;
+ }
+ .parameter
+ {
+ font-weight: bold;
+ color: #6586AC;
+ }
+ h1
+ {
+ font-size: 20px;
+ color: #7A7272;
+ font-weight: normal;
+ }
+ h2
+ {
+ font-size: 17px;
+ font-weight: bold;
+ color: #303030;
+ }
+ h3
+ {
+ font-size: 14px;
+ font-weight: bold;
+ color: #2B5885;
+ }
+ pre
+ {
+ font-size: 13px;
+ }
+ div
+ {
+ margin: 20px;
+ }
+ div.settings
+ {
+ margin-right: 0;
+ }
+ a:link, a:visited, a:active
+ {
+ color: #294F75;
+ text-decoration: none;
+ }
+ a:hover
+ {
+ color: #182634;
+ text-decoration: underline;
+ }
+ .trigger
+ {
+ cursor: pointer;
+ cursor: hand;
+ height: 14px;
+ }
+ .toggle
+ {
+ display: none;
+ }
+ .options
+ {
+ text-align: center;
+ cursor: pointer;
+ cursor: hand;
+ color: #294F75;
+ }
+ /*]]>*/</style>
+
+ <script type="text/javascript">
+//<![CDATA[
+
+ var image_open = new Image();
+ image_open.src = "images/open.gif";
+ var image_closed = new Image();
+ image_closed.src = "images/closed.gif";
+
+ function toggle(image, section) {
+
+ if(document.all) {
+ if(document.all[section].style.display == "block") {
+ document.all[section].style.display = "none";
+ document.all[image].src = image_closed.src;
+ }
+ else
+ {
+ document.all[section].style.display = "block";
+ document.all[image].src = image_open.src;
+ }
+ }
+ else
+ {
+ if(document.getElementById(section).style.display == "block") {
+ document.getElementById(section).style.display = "none";
+ document.getElementById(image).src = image_closed.src;
+ }
+ else
+ {
+ document.getElementById(section).style.display = "block";
+ document.getElementById(image).src = image_open.src;
+ }
+ }
+
+ }
+
+ function expandall() {
+
+ var divNodeList = document.getElementsByTagName('div');
+ for (i = 0; i < divNodeList.length; i++) {
+ if(divNodeList[i].id) {
+ divNodeList[i].style.display = "block";
+ document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/open.gif";
+ }
+ }
+
+ }
+
+ function collapseall() {
+
+ var divNodeList = document.getElementsByTagName('div');
+ for (i = 0; i < divNodeList.length; i++) {
+ if(divNodeList[i].id) {
+ divNodeList[i].style.display = "none";
+ document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/closed.gif";
+ }
+ }
+
+ }
+
+//]]>
+ </script>
+
+</head>
+<body>
+ <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
+ <tr>
+ <td>
+ <img src="images/header.gif" width="750" height="80" alt="" />
+ <p class="options">
+ <a onclick="expandall()">[Expand all]</a>&nbsp; &nbsp;<a onclick="collapseall()">[Collapse
+ all]</a></p>
+ <div>
+ <h1>
+ Introduction</h1>
+ <div>
+ <p>
+ The Modern UI provides a user interface for NSIS installers with a modern wizard
+ style, similar to the wizards of recent Windows versions. It is based on the basic
+ user interface that is provided by the NSIS compiler itself and extends it with
+ more interface features and pages.</p>
+ <p>
+ All standard NSIS pages (such as the pages to select components and the installation
+ folder) are supported as well as a number of additional pages. The welcome page
+ allows you to provide an introduction to the installation process, while the finish
+ page provides a way to let the user decide what steps should be performed after
+ the setup wizard is closed (for example, whether the application should be started
+ immediately). A finish page can also be used to ask for a system restart is necessary.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_scr" src="images/closed.gif"
+ onclick="toggle('trigger_scr', 'toggle_scr');" />
+ Screenshots</h3>
+ <div class="toggle" id="toggle_scr">
+ <p>
+ <img src="images/screen1.png" width="503" height="393" alt="" /></p>
+ <p>
+ <img src="images/screen2.png" width="503" height="393" alt="" /></p>
+ </div>
+ </div>
+ <h1>
+ Script header</h1>
+ <div>
+ <p>
+ The settings for the Modern UI should be inserted in the header of the script file.
+ It&#39;s important to follow the same order as the items below.&nbsp;For example,
+ interface settings should be defined before you insert pages, because the pages
+ depend on the interface configuration. It may be useful to look at the <a href="#examples">
+ example scripts</a> too see how this is done in actual script files.</p>
+ <p>
+ Parameters are given in this format: <span class="parameter">required (option1 | option2)
+ [optional]</span></p>
+ <h2>
+ 1. Header file</h2>
+ <div>
+ <p>
+ First of all, add this line to the top of script to include the Modern UI:</p>
+ <pre>
+!include &quot;MUI.nsh&quot;
+</pre>
+ </div>
+ <h2>
+ 2. Interface configuration</h2>
+ <div>
+ <p>
+ Then, you may want to use interface settings to change the look and feel of the
+ installer. These settings apply to all pages.<p>
+ The interface settings provided by the NSIS compiler itself (such as LicenseText,
+ Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts. The Modern
+ UI provides equalivent or extended versions of these settings.<p>
+ Examples:</p>
+ <pre>
+!define MUI_COMPONENTSPAGE_SMALLDESC ;No value
+!define MUI_UI &quot;myUI.exe&quot; ;Value
+!define MUI_INSTFILESPAGE_COLORS &quot;FFFFFF 000000&quot; ;Two colors
+</pre>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_in" src="images/closed.gif"
+ onclick="toggle('trigger_in', 'toggle_in');" />
+ Interface settings</h3>
+ <div class="toggle" id="toggle_in">
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ingen" src="images/closed.gif"
+ onclick="toggle('trigger_ingen', 'toggle_ingen');" />
+ Page header</h3>
+ <div class="toggle" id="toggle_ingen">
+ <p>
+ <strong>MUI_ICON</strong> <span class="parameter">icon_file</span><br />
+ The icon for the installer.<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico</em></p>
+ <p>
+ <strong>MUI_UNICON</strong> <span class="parameter">icon_file</span><br />
+ The icon for the uninstaller.<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico</em></p>
+ <p>
+ <strong>MUI_HEADERIMAGE</strong><br />
+ Display an image on the header of the page.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of installers pages (recommended size: 150x57
+ pixels).<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP_NOSTRETCH</strong><br />
+ Do not stretch the installer header bitmap to fit the size of the field. Use this
+ option only if you have an image that does not use the whole space. If you have
+ a full size bitmap that fits exactly, you should not use this option because the
+ size of the field will be different if the user has a custom DPI setting.</p>
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of installers pages when using a RTL language
+ (recommended size: 150x57 pixels).<br />
+ <em>Default: Non-RTL bitmap</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH</strong><br />
+ Do not stretch the installer header bitmap when using a RTL language to fit the
+ size of the field. Use this option only if you have an image that does not use the
+ whole space. If you have a full size bitmap that fits exactly, you should not use
+ this option because the size of the field will be different if the user has a custom
+ DPI setting.</p>
+ </div>
+ </div>
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of uninstaller pages (recommended size: 150x57
+ pixels).<br />
+ <em>Default: Installer header bitmap</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH</strong><br />
+ Do not stretch the uninstaller header bitmap to fit the size of the field. Use this
+ option only if you have an image that does not use the whole space. If you have
+ a full size bitmap that fits exactly, you should not use this option because the
+ size of the field will be different if the user has a custom DPI setting.</p>
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap image to display on the header of uninstallers pages when using a RTL language
+ (recommended size: 150x57 pixels).<br />
+ <em>Default: Installer RTL header bitmap</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH</strong><br />
+ Do not stretch the uninstaller header bitmap when using a RTL language to fit the
+ size of the field. Use this option only if you have an image that does not use the
+ whole space. If you have a full size bitmap that fits exactly, you should not use
+ this option because the size of the field will be different if the user has a custom
+ DPI setting.</p>
+ </div>
+ </div>
+ <p>
+ <strong>MUI_HEADERIMAGE_RIGHT</strong><br />
+ Display the header image on the right side instead of the left side (when using
+ a RTL language it will be displayed on the left side instead of the right side).</p>
+ </div>
+ <p>
+ <strong>MUI_BGCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
+ Background color for the header, the Welcome page and the Finish page.<br />
+ <em>Default: FFFFFF</em></p>
+ <p>
+ <strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
+ Set a transparent background for the header's label controls. Useful for custom
+ user interfaces that set a bigger header image.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/closed.gif"
+ onclick="toggle('trigger_inres', 'toggle_inres');" />
+ Interface resources</h3>
+ <div class="toggle" id="toggle_inres">
+ <p>
+ <strong>MUI_UI</strong> <span class="parameter">ui_file</span><br />
+ The interface file with the dialog resources. Change this if you have made your
+ own customized UI.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern.exe</em></p>
+ <p>
+ <strong>MUI_UI_HEADERIMAGE</strong> <span class="parameter">ui_file</span><br />
+ The interface files with the dialog resource IDD_INST that contains a bitmap control
+ and space for the header bitmap.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe</em></p>
+ <p>
+ <strong>MUI_UI_HEADERIMAGE_RIGHT</strong> <span class="parameter">ui_file</span><br />
+ The interface files with the dialog resource IDD_INST that contains a bitmap control
+ and space for the header bitmap on the right side.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe</em></p>
+ <p>
+ <strong>MUI_UI_COMPONENTSPAGE_SMALLDESC</strong> <span class="parameter">ui_file</span><br />
+ The interface files with a customized dialog resource IDD_SELCOM with a small description
+ area.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_smalldesc.exe</em></p>
+ <p>
+ <strong>MUI_UI_COMPONENTSPAGE_NODESC</strong> <span class="parameter">ui_file</span><br />
+ The interface files with a customized dialog resource IDD_SELCOM without a description
+ area.<br />
+ <em>Default: ${NSISDIR}\Contrib\UIs\modern_nodesc.exe</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inwf" src="images/closed.gif"
+ onclick="toggle('trigger_inwf', 'toggle_inwf');" />
+ Installer welcome/finish page</h3>
+ <div class="toggle" id="toggle_inwf">
+ <p>
+ <strong>MUI_WELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
+ Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
+ field. Use this option only if you have an image that does not use the whole space.
+ If you have a full size bitmap that fits exactly, you should not use this option
+ because the size of the field will be different if the user has a custom DPI setting.</p>
+ </div>
+ <p>
+ <strong>MUI_WELCOMEFINISHPAGE_INI</strong> <span class="parameter">ini_file</span><br />
+ InstallOptions INI file for the Welcome page and the Finish page.<br />
+ <em>Default: ${NSISDIR}\Contrib\Modern UI\ioSpecial.ini</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inuwf" src="images/closed.gif"
+ onclick="toggle('trigger_inuwf', 'toggle_inuwf');" />
+ Uninstaller welcome/finish page</h3>
+ <div class="toggle" id="toggle_inuwf">
+ <p>
+ <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
+ Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
+ <div class="settings">
+ <p>
+ <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
+ Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
+ field. Use this option only if you have an image that does not use the whole space.
+ If you have a full size bitmap that fits exactly, you should not use this option
+ because the size of the field will be different if the user has a custom DPI setting.</p>
+ </div>
+ <p>
+ <strong>MUI_UNWELCOMEFINISHPAGE_INI</strong> <span class="parameter">ini_file</span><br />
+ InstallOptions INI file for the uninstaller Welcome page and the Finish page.<br />
+ <em>Default: ${NSISDIR}\Contrib\Modern UI\ioSpecial.ini</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inl" src="images/closed.gif"
+ onclick="toggle('trigger_inl', 'toggle_inl');" />
+ License page</h3>
+ <div class="toggle" id="toggle_inl">
+ <p>
+ <strong>MUI_LICENSEPAGE_BGCOLOR</strong> <span class="parameter">(/windows | /grey |
+ (color: RRGGBB hexadecimal))</span><br />
+ The background color for the license textbox. Use /windows for the Windows text
+ background color (usually white). Use the /grey for the window background color
+ (usually grey).<br />
+ <em>Default: /windows</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inc" src="images/closed.gif"
+ onclick="toggle('trigger_inc', 'toggle_inc');" />
+ Components page</h3>
+ <div class="toggle" id="toggle_inc">
+ <p>
+ <strong>MUI_COMPONENTSPAGE_CHECKBITMAP</strong> <span class="parameter">bitmap_file</span><br />
+ The bitmap with images for the checks of the component select treeview.<br />
+ <em>Default: ${NSISDIR}\Contrib\Graphics\Checks\modern.bmp</em></p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_SMALLDESC</strong><br />
+ A small description area on the bottom of the page. Use this layout if you have
+ a lot of sections and don't need large descriptions.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_NODESC</strong><br />
+ No description area.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ind" src="images/closed.gif"
+ onclick="toggle('trigger_ind', 'toggle_ind');" />
+ Directory page</h3>
+ <div class="toggle" id="toggle_ind">
+ <p>
+ <strong>MUI_DIRECTORYPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
+ The background color for the directory textbox.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ins" src="images/closed.gif"
+ onclick="toggle('trigger_ins', 'toggle_ins');" />
+ Start Menu folder page</h3>
+ <div class="toggle" id="toggle_ins">
+ <p>
+ <strong>MUI_STARTMENUPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
+ The background color for the startmenu directory list and textbox.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_ini" src="images/closed.gif"
+ onclick="toggle('trigger_ini', 'toggle_ini');" />
+ Installation page</h3>
+ <div class="toggle" id="toggle_ini">
+ <p>
+ <strong>MUI_INSTFILESPAGE_COLORS</strong> <span class="parameter">(/windows | &quot;(foreground
+ color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal)&quot;)</span><br />
+ The colors of the details screen. Use /windows for the default Windows colors.<br />
+ <em>Default: /windows</em></p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_PROGRESSBAR</strong> <span class="parameter">(&quot;&quot;
+ | colored | smooth)</span><br />
+ The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.<br />
+ <em>Default: smooth</em></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inf" src="images/closed.gif"
+ onclick="toggle('trigger_inf', 'toggle_inf');" />
+ Installer finish page</h3>
+ <div class="toggle" id="toggle_inf">
+ <p>
+ <strong>MUI_FINISHPAGE_NOAUTOCLOSE</strong><br />
+ Do not automatically jump to the finish page, to allow the user to check the install
+ log.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_uinf" src="images/closed.gif"
+ onclick="toggle('trigger_uinf', 'toggle_uinf');" />
+ Uninstaller finish page</h3>
+ <div class="toggle" id="toggle_uinf">
+ <p>
+ <strong>MUI_UNFINISHPAGE_NOAUTOCLOSE</strong><br />
+ Do not automatically jump to the finish page, to allow the user to check the uninstall
+ log.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inaw" src="images/closed.gif"
+ onclick="toggle('trigger_inaw', 'toggle_inaw');" />
+ Abort warning</h3>
+ <div class="toggle" id="toggle_inaw">
+ <p>
+ <strong>MUI_ABORTWARNING</strong><br />
+ Show a message box with a warning when the user wants to close the installer.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_ABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the abort warning message box.</p>
+ <p>
+ <strong>MUI_ABORTWARNING_CANCEL_DEFAULT</strong><br />
+ Set the Cancel button as the default button on the message box.</p>
+ </div>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_inuaw" src="images/closed.gif"
+ onclick="toggle('trigger_inuaw', 'toggle_inuaw');" />
+ Uninstaller abort warning</h3>
+ <div class="toggle" id="toggle_inuaw">
+ <p>
+ <strong>MUI_UNABORTWARNING</strong><br />
+ Show a message box with a warning when the user wants to close the uninstaller.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_UNABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the abort warning message box.</p>
+ <p>
+ <strong>MUI_UNABORTWARNING_CANCEL_DEFAULT</strong><br />
+ Set the Cancel button as the default button on the message box.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>
+ 3. Pages</h2>
+ <div>
+ <p>
+ Insert the following macros to set the pages you want to use. The pages will appear
+ in the order in which you insert them in the script. You can also insert custom
+ Page commands between the macros to add custom pages.</p>
+ <p>
+ You can add multiple pages of certain types (for example, if you want the user to
+ specify multiple folders).</p>
+ <p>
+ Examples:</p>
+ <pre>
+!insertmacro MUI_PAGE_LICENSE &quot;License.rtf&quot;
+!insertmacro MUI_PAGE_COMPONENTS
+
+Var STARTMENU_FOLDER
+!insertmacro MUI_PAGE_STARTMENU &quot;Application&quot; $StartMenuFolder
+</pre>
+ <p>
+ You will need the page ID for the Start Menu folder page when using the Start Menu
+ folder macros. The folder will be stored in the specified variable.</p>
+ <p>
+ <strong>Installer pages</strong><br />
+ MUI_PAGE_WELCOME<br />
+ MUI_PAGE_LICENSE <span class="parameter">textfile</span><br />
+ MUI_PAGE_COMPONENTS<br />
+ MUI_PAGE_DIRECTORY<br />
+ MUI_PAGE_STARTMENU <span class="parameter">pageid variable</span><br />
+ MUI_PAGE_INSTFILES<br />
+ MUI_PAGE_FINISH</p>
+ <p>
+ <strong>Uninstaller pages</strong><br />
+ MUI_UNPAGE_WELCOME<br />
+ MUI_UNPAGE_CONFIRM<br />
+ MUI_UNPAGE_LICENSE <span class="parameter">textfile</span><br />
+ MUI_UNPAGE_COMPONENTS<br />
+ MUI_UNPAGE_DIRECTORY<br />
+ MUI_UNPAGE_INSTFILES<br />
+ MUI_UNPAGE_FINISH</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pg" src="images/closed.gif"
+ onclick="toggle('trigger_pg', 'toggle_pg');" />
+ Page settings</h3>
+ <div class="toggle" id="toggle_pg">
+ <p>
+ Page settings apply to a single page and should be set before inserting a page macro.
+ The same settings can be used for installer and uninstaller pages. You have to repeat
+ the setting if you want it to apply to multiple pages. Example:</p>
+ <pre>
+;Add a directory page to let the user specify a plug-ins folder
+;Store the folder in $PluginsFolder
+
+Var PLUGINS_FOLDER
+!define MUI_DIRECTORYPAGE_VARIABLE $PluginsFolder
+!insertmacro MUI_PAGE_DIRECTORY
+</pre>
+ <p>
+ <p>
+ All standard texts in the user interface are loaded from language files, which are
+ available for all languages supported by NSIS. So you only need to define these
+ texts if you want to change the default.</p>
+ <p>
+ If the parameter is a text that should be different for each language, define a
+ language string using LangString and use $(LangStringName) as value. For a license
+ text in multiple languages, LicenseLangString can be used. Refer the NSIS Users
+ Manual for more information about installers with multiple languages.</p>
+ <p>
+ In all text settings, the doublequote character (&quot;) should be escaped in the
+ following form: $\&quot;</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgg" src="images/closed.gif"
+ onclick="toggle('trigger_pgg', 'toggle_pgg');" />
+ General page settings</h3>
+ <div class="toggle" id="toggle_pgg">
+ <p>
+ <strong>MUI_PAGE_HEADER_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the header of the page.</p>
+ <p>
+ <strong>MUI_PAGE_HEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
+ Subtext to display on the header of the page.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgw" src="images/closed.gif"
+ onclick="toggle('trigger_pgw', 'toggle_pgw');" />
+ Welcome page settings</h3>
+ <div class="toggle" id="toggle_pgw">
+ <p>
+ To add a newline to any of these texts, use \r\n instead of $\r$\n.</p>
+ <p>
+ <strong>MUI_WELCOMEPAGE_TITLE</strong> <span class="parameter">title</span><br />
+ Title to display on the top of the page.</p>
+ <p>
+ <strong>MUI_WELCOMEPAGE_TITLE_3LINES</strong><br />
+ Extra space for the title area.</p>
+ <p>
+ <strong>MUI_WELCOMEPAGE_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the page.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgl" src="images/closed.gif"
+ onclick="toggle('trigger_pgl', 'toggle_pgl');" />
+ License page settings</h3>
+ <div class="toggle" id="toggle_pgl">
+ <p>
+ <strong>MUI_LICENSEPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_TEXT_BOTTOM</strong> <span class="parameter">text</span><br />
+ Text to display on the bottom of the page.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_BUTTON</strong> <span class="parameter">button_text</span><br />
+ Text to display on the 'I Agree' button.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_CHECKBOX</strong><br />
+ Display a checkbox the user has to check to agree with the license terms.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_LICENSEPAGE_CHECKBOX_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to agree with the license terms.</p>
+ </div>
+ <p>
+ <strong>MUI_LICENSEPAGE_RADIOBUTTONS</strong><br />
+ Display two radio buttons to allow the user to choose between accepting the license
+ terms or not.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to accept the license terms.</p>
+ <p>
+ <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to decline the license terms.</p>
+ </div>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgc" src="images/closed.gif"
+ onclick="toggle('trigger_pgc', 'toggle_pgc');" />
+ Components page settings</h3>
+ <div class="toggle" id="toggle_pgc">
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_COMPLIST</strong> <span class="parameter">text</span><br />
+ Text to display on next to the components list.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_INSTTYPE</strong> <span class="parameter">text</span><br />
+ Text to display on next to the installation type combo box.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE</strong> <span class="parameter">text</span><br />
+ Text to display on the of the top of the description box.</p>
+ <p>
+ <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO</strong> <span class="parameter">text</span><br />
+ Text to display inside the description box when no section is selected.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgd" src="images/closed.gif"
+ onclick="toggle('trigger_pgd', 'toggle_pgd');" />
+ Directory page settings</h3>
+ <div class="toggle" id="toggle_pgd">
+ <p>
+ <strong>MUI_DIRECTORYPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on top of the page.</p>
+ <p>
+ <strong>MUI_DIRECTORYPAGE_TEXT_DESTINATION</strong> <span class="parameter">text</span><br />
+ Text to display on the destination folder frame.</p>
+ <p>
+ <strong>MUI_DIRECTORYPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
+ Variable in which to store the selected folder.<br />
+ <em>Default: $INSTDIR</em></p>
+ <p>
+ <strong>MUI_DIRECTORYPAGE_VERIFYONLEAVE</strong><br />
+ Does not disable the Next button when a folder is invalid but allows you to use
+ GetInstDirError in the leave function to handle an invalid folder.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgs" src="images/closed.gif"
+ onclick="toggle('trigger_pgs', 'toggle_pgs');" />
+ Start Menu folder page settings</h3>
+ <div class="toggle" id="toggle_pgs">
+ <p>
+ <strong>MUI_STARTMENUPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_TEXT_CHECKBOX</strong> <span class="parameter">text</span><br />
+ Text to display next to the checkbox to disable the Start Menu folder creation.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_DEFAULTFOLDER</strong> <span class="parameter">folder</span><br />
+ The default Start Menu Folder.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_NODISABLE</strong><br />
+ Do not display the checkbox to disable the creation of Start Menu shortcuts.</p>
+ <p>
+ <strong>MUI_STARTMENUPAGE_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
+ <strong>MUI_STARTMENUPAGE_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
+ <strong>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
+ The registry key to store the Start Menu folder. The page will use it to remember
+ the users preference. You should also use for the uninstaller to remove the Start
+ Menu folders. Don't forget to remove this key during uninstallation.</p>
+ <p>
+ For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu
+ folder:</p>
+ <pre>
+!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
+ Delete &quot;$SMPROGRAMS\$R0\Your Shortcut.lnk&quot;
+</pre>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgi" src="images/closed.gif"
+ onclick="toggle('trigger_pgi', 'toggle_pgi');" />
+ Installation page settings</h3>
+ <div class="toggle" id="toggle_pgi">
+ <p>
+ <strong>MUI_INSTFILESPAGE_FINISHHEADER_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the header of the installation page when the installation has
+ been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
+ Subtext to display on the header of the installation page when the installation
+ has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_ABORTHEADER_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the header of the installation page when the installation has
+ been aborted.</p>
+ <p>
+ <strong>MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
+ Subext to display on the header of the installation page when the installation has
+ been aborted.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgf" src="images/closed.gif"
+ onclick="toggle('trigger_pgf', 'toggle_pgf');" />
+ Finish page settings</h3>
+ <div class="toggle" id="toggle_pgf">
+ <p>
+ To add a newline to any of these texts, use \r\n instead of $\r$\n.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TITLE</strong> <span class="parameter">title</span><br />
+ Title to display on the top of the page.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TITLE_3LINES</strong><br />
+ Extra space for the title area.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT</strong> <span class="parameter">text</span><br />
+ Text to display on the page.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_LARGE</strong><br />
+ Extra space for the text area (if using checkboxes).</p>
+ <p>
+ <strong>MUI_FINISHPAGE_BUTTON</strong> <span class="parameter">text</span><br />
+ Text to display on the Finish button.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_CANCEL_ENABLED</strong><br />
+ Enable the Cancel button so the user can skip any options displayed on the finish
+ page.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_REBOOT</strong> <span class="parameter">text</span><br />
+ Text to display on the finish page when asking for a system reboot.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_REBOOTNOW</strong> <span class="parameter">text</span><br />
+ Text to display next to the 'Reboot now' option button.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_TEXT_REBOOTLATER</strong> <span class="parameter">text</span><br />
+ Text to display next to the 'Reboot later' option button.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_REBOOTLATER_DEFAULT</strong><br />
+ Sets the 'Reboot later' option as the default option.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN</strong> <span class="parameter">exe_file</span><br />
+ Application which the user can select to run using a checkbox. You don't need to
+ put quotes around the filename when it contains spaces.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_TEXT</strong> <span class="parameter">text</span><br />
+ Texts to display next to the 'Run program' checkbox.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_PARAMETERS</strong> <span class="parameter">parameters</span><br />
+ Parameters for the application to run. Don't forget to escape double quotes in the
+ value (use $\&quot;).</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_NOTCHECKED</strong><br />
+ Do not check the 'Run program' checkbox by default</p>
+ <p>
+ <strong>MUI_FINISHPAGE_RUN_FUNCTION</strong> <span class="parameter">function</span><br />
+ Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without
+ parameters). You can use the function to execute multiple applications or you can
+ change the checkbox name and use it for other things.</p>
+ </div>
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME</strong> <span class="parameter">file/url</span><br />
+ File or website which the user can select to view using a checkbox. You don't need
+ to put quotes around the filename when it contains spaces.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME_TEXT</strong> <span class="parameter">text</span><br />
+ Texts to display next to the 'Show Readme' checkbox.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</strong><br />
+ Do not check the 'Show Readme' checkbox by default</p>
+ <p>
+ <strong>MUI_FINISHPAGE_SHOWREADME_FUNCTION</strong> <span class="parameter">function</span><br />
+ Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without
+ parameters). You can use the function to show multiple files or you can change the
+ checkbox name and use it for other things.</p>
+ </div>
+ <p>
+ <strong>MUI_FINISHPAGE_LINK</strong> <span class="parameter">link_text</span><br />
+ Text for a link on the which the user can click to view a website or file.</p>
+ <div class="settings">
+ <p>
+ <strong>MUI_FINISHPAGE_LINK_LOCATION</strong> <span class="parameter">file/url</span><br />
+ Website or file which the user can select to view using the link. You don't need
+ to put quotes around the filename when it contains spaces.</p>
+ <p>
+ <strong>MUI_FINISHPAGE_LINK_COLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
+ Text color for the link on the Finish page.<br />
+ <em>Default: 000080</em></p>
+ </div>
+ <p>
+ <strong>MUI_FINISHPAGE_NOREBOOTSUPPORT</strong><br />
+ Disables support for the page that allows the user to reboot the system. Define
+ this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.</p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_pgu" src="images/closed.gif"
+ onclick="toggle('trigger_pgu', 'toggle_pgu');" />
+ Uninstall confirm page settings</h3>
+ <div class="toggle" id="toggle_pgu">
+ <p>
+ <strong>MUI_UNCONFIRMPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
+ Text to display on the top of the page.</p>
+ <p>
+ <strong>MUI_UNCONFIRMPAGE_TEXT_LOCATION</strong> <span class="parameter">text</span><br />
+ Text to display next to the uninstall location text box.</p>
+ </div>
+ </div>
+ </div>
+ <h2>
+ 4. Language files</h2>
+ <div>
+ <p>
+ Insert the Modern UI language files for the languages to want to include.</p>
+ <pre>
+!insertmacro MUI_LANGUAGE &quot;English&quot;
+</pre>
+ <p>
+ The standard NSIS language files are loaded automatically, there is no need to use
+ LoadLanguageFile.</p>
+ </div>
+ <h2>
+ 5. Reserve files</h2>
+ <div>
+ <p>
+ 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. Include reserve file commands for such files before your sections
+ and functions:</p>
+ <pre>
+ReserveFile &quot;ioFile.ini&quot; ;Your own InstallOptions INI files
+!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions plug-in
+!insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
+</pre>
+ </div>
+ </div>
+ <h1>
+ Script code for pages</h1>
+ <div>
+ <p>
+ Some pages allow you to show additional information or can be used to get user input.
+ Here you can find the script code to use these features.</p>
+ <h2>
+ Components page descriptions</h2>
+ <div>
+ <p>
+ The Modern UI components page has a text box in which a description can be shown
+ when the user hovers the mouse over a component. If you don't want to use these
+ descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.</p>
+ <p>
+ To set a description for a section, an additional parameter needs to be added to
+ Section commmand with a unique identifier for the section. This name can later be
+ used to set the description for this section.</p>
+ <pre>
+Section &quot;Section Name 1&quot; Section1
+ ...
+SectionEnd
+</pre>
+ <p>
+ After the sections, use these macros to set the descriptions:</p>
+ <pre>
+LangString DESC_Section1 ${LANG_ENGLISH} &quot;Description of section 1.&quot;
+LangString DESC_Section2 ${LANG_ENGLISH} &quot;Description of section 2.&quot;
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+</pre>
+ <p>
+ For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END
+ macros.</p>
+ </div>
+ <h2>
+ Start Menu folder</h2>
+ <div>
+ <p>
+ Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
+ and MUI_STARTMENU_WRITE_END macros:</p>
+ <pre>
+!insertmacro MUI_STARTMENU_WRITE_BEGIN pageid
+ ...create shortcuts...
+!insertmacro MUI_STARTMENU_WRITE_END
+</pre>
+ <p>
+ The page ID should be the ID of the page on which the user has selected the folder
+ for the shortcuts you want to write.</p>
+ <p>
+ The variable which contains the folder and the page ID are set as parameters of
+ the page macro.</p>
+ </div>
+ </div>
+ <h1>
+ Language selection dialog</h1>
+ <div>
+ <p>
+ If you want the installer to display a language selection dialog (see the the <a
+ href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a> example),
+ insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:</p>
+ <pre>
+Function .onInit
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+FunctionEnd
+</pre>
+ <p>
+ This macro can also be used in the un.onInit function.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_lss" src="images/closed.gif"
+ onclick="toggle('trigger_lss', 'toggle_lss');" />
+ Settings for registry storage of selected language</h3>
+ <div class="toggle" id="toggle_lss">
+ <p>
+ To remember the user's preference, you can define a registry key. These defines
+ should be set before inserting the installation page macro.</p>
+ <p>
+ <strong>MUI_LANGDLL_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
+ <strong>MUI_LANGDLL_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
+ <strong>MUI_LANGDLL_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
+ The registry key to store the language. The users preference will be remembered.
+ You can also use it for the uninstaller to display the right language. Don't forget
+ to remove this key in the uninstaller.</p>
+ <p>
+ For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the
+ stored language preference:</p>
+ <pre>
+Function un.onInit
+
+ !insertmacro MUI_UNGETLANGUAGE
+
+FunctionEnd
+</pre>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_lsin" src="images/closed.gif"
+ onclick="toggle('trigger_lsin', 'toggle_lsin');" />
+ Interface settings for selection dialog</h3>
+ <div class="toggle" id="toggle_lsin">
+ <p>
+ To customize the language selection dialog interface, use these defines before inserting
+ the MUI_LANGDLL_DISPLAY macro.</p>
+ <p>
+ <strong>MUI_LANGDLL_WINDOWTITLE</strong> <span class="parameter">text</span><br />
+ The window title of the language selection dialog.</p>
+ <p>
+ <strong>MUI_LANGDLL_INFO</strong> <span class="parameter">text</span><br />
+ The text to display on the language selection dialog.</p>
+ <p>
+ <strong>MUI_LANGDLL_ALWAYSSHOW</strong><br />
+ Always show the language selection dialog, even if a language has been stored in
+ the registry. The language stored in the registry will be selected by default.</p>
+ <p>
+ <strong>MUI_LANGDLL_ALLLANGUAGES</strong><br />
+ Always show all available languages and don't filter according to their codepage.</p>
+ </div>
+ </div>
+ <h1>
+ Custom pages</h1>
+ <div>
+ <p>
+ If you want add your custom pages to your installer, you can insert your own page
+ commands between the page macros. The <a href="../InstallOptions/Readme.html">InstallOptions
+ documentation</a> provides information about creating custom pages using InstallOptions.</p>
+ <pre>
+!insertmacro MUI_PAGE_WELCOME
+Page custom FunctionName ;Custom page
+!insertmacro MUI_PAGE_COMPONENTS
+
+;Uninstaller
+!insertmacro MUI_UNPAGE_CONFIRM
+UninstPage custom un.FunctionName ;Custom page
+!insertmacro MUI_UNPAGE_INSTFILES
+</pre>
+ <p>
+ Use the MUI_HEADER_TEXT macro to set the text on the page header in a page function:</p>
+ <pre>
+LangString PAGE_TITLE ${LANG_ENGLISH} &quot;Title&quot;
+LangString PAGE_SUBTITLE ${LANG_ENGLISH} &quot;Subtitle&quot;
+
+Function CustomPageFunction
+ !insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY &quot;ioFile.ini&quot;
+FuctionEnd
+</pre>
+ </div>
+ <h1>
+ Custom functions</h1>
+ <div>
+ <p>
+ Interface functions provided by NSIS, like the .onGUIInit function and the page
+ functions are automatically included by the Modern UI and filled with code to support
+ new interface features. If you want to add additional code to these function, create
+ a function with the custom script code in the script use the Modern UI functions
+ call them.</p>
+ <p>
+ Example:</p>
+ <pre class="text">
+!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
+
+Function myGUIInit
+ ...your own code...
+FunctionEnd
+</pre>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_cfg" src="images/closed.gif"
+ onclick="toggle('trigger_cfg', 'toggle_cfg');" />
+ General Custom Functions</h3>
+ <div class="toggle" id="toggle_cfg">
+ <p>
+ These defines should be set before inserting the language macros.</p>
+ <p>
+ <strong>MUI_CUSTOMFUNCTION_GUIINIT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_UNGUIINIT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_ABORT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_UNABORT</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_MOUSEOVERSECTION</strong> <span class="parameter">function</span><br />
+ <strong>MUI_CUSTOMFUNCTION_UNMOUSEOVERSECTION</strong> <span class="parameter">function</span></p>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_cfpg" src="images/closed.gif"
+ onclick="toggle('trigger_cfpg', 'toggle_cfpg');" />
+ Page Custom Functions</h3>
+ <div class="toggle" id="toggle_cfpg">
+ <p>
+ These defines should be set before inserting a page macro.</p>
+ <p>
+ <strong>MUI_PAGE_CUSTOMFUNCTION_PRE</strong> <span class="parameter">function</span><br />
+ <strong>MUI_PAGE_CUSTOMFUNCTION_SHOW</strong> <span class="parameter">function</span><br />
+ <strong>MUI_PAGE_CUSTOMFUNCTION_LEAVE</strong> <span class="parameter">function</span></p>
+ <p>
+ <strong>Notes:</strong></p>
+ <ul>
+ <li>In the Pre function of the Welcome page and the Finish page, you can write to the
+ InstallOptions INI file of the page (ioSpecial.ini)</li>
+ <li>In the Show function of the Welcome, Finish and StartMenu pages, $MUI_HWND contains
+ the HWND of the inner dialog</li>
+ </ul>
+ </div>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_cfwf" src="images/closed.gif"
+ onclick="toggle('trigger_cfwf', 'toggle_cfwf');" />
+ Welcome/Finish Page Custom Functions</h3>
+ <div class="toggle" id="toggle_cfwf">
+ <p>
+ This define should be inserted before a single Welcome or Finish page.</p>
+ <p>
+ <strong>MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT</strong> <span class="parameter">function</span></p>
+ <p>
+ This Init function is called before the InstallOptions INI file for the page is
+ written, so you can use it to initialize any variables used in the page settings.</p>
+ </div>
+ </div>
+ <h1>
+ <a name="examples" id="examples">Example scripts</a></h1>
+ <div>
+ <p>
+ Basic: <a href="../../Examples/Modern%20UI/Basic.nsi">Basic.nsi</a><br />
+ Welcome/Finish page: <a href="../../Examples/Modern%20UI/WelcomeFinish.nsi">WelcomeFinish.nsi</a><br />
+ Multiple languages: <a href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br />
+ Header image: <a href="../../Examples/Modern%20UI/HeaderBitmap.nsi">HeaderBitmap.nsi</a><br />
+ Custom pages: <a href="../../Examples/Modern%20UI/InstallOptions.nsi">InstallOptions.nsi</a><br />
+ Start Menu Folder page: <a href="../../Examples/Modern%20UI/StartMenu.nsi">StartMenu.nsi</a></p>
+ </div>
+ <h1>
+ Credits</h1>
+ <div>
+ <p>
+ Written by Joost Verburg.<br />
+ Icons designed by Nikos Adamamas, aka adni18.<br />
+ Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.</p>
+ </div>
+ <h1>
+ License</h1>
+ <div>
+ <p>
+ The zlib/libpng license applies to the Modern UI.</p>
+ <h3>
+ <img class="trigger" alt="Open/Close section" id="trigger_lic" src="images/closed.gif"
+ onclick="toggle('trigger_lic', 'toggle_lic');" />
+ License Terms</h3>
+ <div class="toggle" id="toggle_lic">
+ <pre>
+Copyright &copy; 2002-2007 Joost Verburg
+
+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 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 distribution.
+</pre>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/Contrib/Modern UI/SConscript b/Contrib/Modern UI/SConscript
index 01a3517..551aa78 100755
--- a/Contrib/Modern UI/SConscript
+++ b/Contrib/Modern UI/SConscript
@@ -1,31 +1,31 @@
-target = 'Modern UI'
-
-docs = Split("""
- Changelog.txt
- License.txt
- Readme.html
-""")
-
-doc_images = Split("""
- closed.gif
- header.gif
- open.gif
- screen1.png
- screen2.png
-""")
-
-contribs = Split("""
- ioSpecial.ini
- System.nsh
-""")
-
-
-Import('defenv')
-
-def join(prefix, list):
- return map(lambda x: '%s/%s' % (prefix, x), list)
-
-defenv.DistributeDocs(docs, path=target)
-path = 'images'
-defenv.DistributeDocs(join(path,doc_images), path='%s/%s'%(target,path))
-defenv.DistributeContrib(contribs, path=target)
+target = 'Modern UI'
+
+docs = Split("""
+ Changelog.txt
+ License.txt
+ Readme.html
+""")
+
+doc_images = Split("""
+ closed.gif
+ header.gif
+ open.gif
+ screen1.png
+ screen2.png
+""")
+
+contribs = Split("""
+ ioSpecial.ini
+ System.nsh
+""")
+
+
+Import('defenv')
+
+def join(prefix, list):
+ return map(lambda x: '%s/%s' % (prefix, x), list)
+
+defenv.DistributeDocs(docs, path=target)
+path = 'images'
+defenv.DistributeDocs(join(path,doc_images), path='%s/%s'%(target,path))
+defenv.DistributeContrib(contribs, path=target)
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh
index 5e19172..9070737 100755
--- a/Contrib/Modern UI/System.nsh
+++ b/Contrib/Modern UI/System.nsh
@@ -1,2203 +1,2203 @@
-/*
-
-NSIS Modern User Interface - Version 1.8
-Copyright © 2002-2007 Joost Verburg
-
-*/
-
-!echo "NSIS Modern User Interface version 1.8 - © 2002-2007 Joost Verburg"
-
-;--------------------------------
-
-!ifndef MUI_INCLUDED
-!define MUI_INCLUDED
-
-!define MUI_SYSVERSION "1.8"
-
-!verbose push
-
-!ifndef MUI_VERBOSE
- !define MUI_VERBOSE 3
-!endif
-
-!verbose ${MUI_VERBOSE}
-
-;--------------------------------
-;HEADER FILES, DECLARATIONS
-
-!include InstallOptions.nsh
-!include LangFile.nsh
-!include WinMessages.nsh
-
-!define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
-
-Var MUI_TEMP1
-Var MUI_TEMP2
-
-;--------------------------------
-;INSERT CODE
-
-!macro MUI_INSERT
-
- !ifndef MUI_INSERT
- !define MUI_INSERT
-
- !ifdef MUI_PRODUCT | MUI_VERSION
- !warning "The MUI_PRODUCT and MUI_VERSION defines have been removed. Use a normal Name command now."
- !endif
-
- !insertmacro MUI_INTERFACE
-
- !insertmacro MUI_FUNCTION_GUIINIT
- !insertmacro MUI_FUNCTION_ABORTWARNING
-
- !ifdef MUI_IOCONVERT_USED
- !insertmacro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
- !endif
-
- !ifdef MUI_UNINSTALLER
- !insertmacro MUI_UNFUNCTION_GUIINIT
- !insertmacro MUI_FUNCTION_UNABORTWARNING
-
- !ifdef MUI_UNIOCONVERT_USED
- !insertmacro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
- !endif
- !endif
-
- !endif
-
-!macroend
-
-;--------------------------------
-;GENERAL
-
-!macro MUI_DEFAULT SYMBOL CONTENT
-
- !ifndef "${SYMBOL}"
- !define "${SYMBOL}" "${CONTENT}"
- !endif
-
-!macroend
-
-!macro MUI_DEFAULT_IOCONVERT SYMBOL CONTENT
-
- !ifndef "${SYMBOL}"
- !define "${SYMBOL}" "${CONTENT}"
- !insertmacro MUI_SET "${SYMBOL}_DEFAULTSET"
- !insertmacro MUI_SET "MUI_${MUI_PAGE_UNINSTALLER_PREFIX}IOCONVERT_USED"
- !else
- !insertmacro MUI_UNSET "${SYMBOL}_DEFAULTSET"
- !endif
-
-!macroend
-
-!macro MUI_SET SYMBOL
-
- !ifndef "${SYMBOL}"
- !define "${SYMBOL}"
- !endif
-
-!macroend
-
-!macro MUI_UNSET SYMBOL
-
- !ifdef "${SYMBOL}"
- !undef "${SYMBOL}"
- !endif
-
-!macroend
-
-;--------------------------------
-;INTERFACE - COMPILE TIME SETTINGS
-
-!macro MUI_INTERFACE
-
- !ifndef MUI_INTERFACE
- !define MUI_INTERFACE
-
- !ifdef MUI_INSERT_NSISCONF
- !insertmacro MUI_NSISCONF
- !endif
-
- !insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
- !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
- !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
- !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\modern_smalldesc.exe"
- !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\modern_nodesc.exe"
- !insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
- !insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BGCOLOR "/windows"
- !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
- !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
- !insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
- !insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_INI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
- !insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_INI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
- !insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
- !insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
-
- !ifdef MUI_HEADERIMAGE
-
- !insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
-
- !ifndef MUI_HEADERIMAGE_UNBITMAP
- !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
- !ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH
- !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH
- !endif
- !endif
-
- !ifdef MUI_HEADERIMAGE_BITMAP_RTL
- !ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
- !define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
- !ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
- !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH
- !endif
- !endif
- !endif
-
- !endif
-
- XPStyle On
-
- ChangeUI all "${MUI_UI}"
- !ifdef MUI_HEADERIMAGE
- !ifndef MUI_HEADERIMAGE_RIGHT
- ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
- !else
- ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
- !endif
- !endif
- !ifdef MUI_COMPONENTSPAGE_SMALLDESC
- ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_SMALLDESC}"
- !else ifdef MUI_COMPONENTSPAGE_NODESC
- ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_NODESC}"
- !endif
-
- Icon "${MUI_ICON}"
- UninstallIcon "${MUI_UNICON}"
-
- CheckBitmap "${MUI_COMPONENTSPAGE_CHECKBITMAP}"
- LicenseBkColor "${MUI_LICENSEPAGE_BGCOLOR}"
- InstallColors ${MUI_INSTFILESPAGE_COLORS}
- InstProgressFlags ${MUI_INSTFILESPAGE_PROGRESSBAR}
-
- SubCaption 4 " "
- UninstallSubCaption 2 " "
-
- !insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
- !insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"
-
- !endif
-
-!macroend
-
-;--------------------------------
-;INTERFACE - RUN-TIME
-
-!macro MUI_INNERDIALOG_TEXT CONTROL TEXT
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
- GetDlgItem $MUI_TEMP1 $MUI_TEMP1 ${CONTROL}
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:${TEXT}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_HEADER_TEXT_INTERNAL ID TEXT
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT "${ID}"
-
- !ifdef MUI_HEADER_TRANSPARENT_TEXT
-
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- !endif
-
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:${TEXT}"
-
- !ifdef MUI_HEADER_TRANSPARENT_TEXT
-
- ShowWindow $MUI_TEMP1 ${SW_SHOWNA}
-
- !endif
-
-!macroend
-
-!macro MUI_HEADER_TEXT TEXT SUBTEXT
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifdef MUI_HEADER_TRANSPARENT_TEXT
-
- LockWindow on
-
- !endif
-
- !insertmacro MUI_HEADER_TEXT_INTERNAL 1037 "${TEXT}"
- !insertmacro MUI_HEADER_TEXT_INTERNAL 1038 "${SUBTEXT}"
-
- !ifdef MUI_HEADER_TRANSPARENT_TEXT
-
- LockWindow off
-
- !endif
-
- !verbose pop
-
-!macroend
-
-!macro MUI_HEADER_TEXT_PAGE TEXT SUBTEXT
-
- !ifdef MUI_PAGE_HEADER_TEXT & MUI_PAGE_HEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
- !else ifdef MUI_PAGE_HEADER_TEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${SUBTEXT}"
- !else ifdef MUI_PAGE_HEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
- !else
- !insertmacro MUI_HEADER_TEXT "${TEXT}" "${SUBTEXT}"
- !endif
-
- !insertmacro MUI_UNSET MUI_PAGE_HEADER_TEXT
- !insertmacro MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
-
-!macroend
-
-!macro MUI_DESCRIPTION_BEGIN
-
- FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
- GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1043
-
- StrCmp $0 -1 0 mui.description_begin_done
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:"
- EnableWindow $MUI_TEMP1 0
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:$MUI_TEXT"
- Goto mui.description_done
- mui.description_begin_done:
-
-!macroend
-
-!macro MUI_DESCRIPTION_TEXT VAR TEXT
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- StrCmp $0 ${VAR} 0 mui.description_${VAR}_done
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:"
- EnableWindow $MUI_TEMP1 1
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:${TEXT}"
- Goto mui.description_done
- mui.description_${VAR}_done:
-
- !verbose pop
-
-!macroend
-
-!macro MUI_DESCRIPTION_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- mui.description_done:
-
- !verbose pop
-
-!macroend
-
-!macro MUI_ENDHEADER
-
- IfAbort mui.endheader_abort
-
- !ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT & MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
- !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
- !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
- !else
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
- !endif
-
- Goto mui.endheader_done
-
- mui.endheader_abort:
-
- !ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT & MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
- !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT
- !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
- !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
- !else
- !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
- !endif
-
- mui.endheader_done:
-
-!macroend
-
-!macro MUI_ABORTWARNING
-
- !ifdef MUI_FINISHPAGE_ABORTWARNINGCHECK
- StrCmp $MUI_NOABORTWARNING "1" mui.quit
- !endif
-
- !ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
- MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit
- !else
- MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit
- !endif
-
- Abort
- mui.quit:
-
-!macroend
-
-!macro MUI_UNABORTWARNING
-
- !ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
- MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit
- !else
- MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit
- !endif
-
- Abort
- mui.quit:
-
-!macroend
-
-!macro MUI_GUIINIT
-
- !insertmacro MUI_WELCOMEFINISHPAGE_INIT ""
- !insertmacro MUI_HEADERIMAGE_INIT ""
-
- !insertmacro MUI_GUIINIT_BASIC
-
-!macroend
-
-!macro MUI_UNGUIINIT
-
- !insertmacro MUI_WELCOMEFINISHPAGE_INIT "UN"
- !insertmacro MUI_HEADERIMAGE_INIT "UN"
-
- !insertmacro MUI_GUIINIT_BASIC
-
- !ifdef MUI_UNFINISHPAGE
- !ifndef MUI_UNFINISHPAGE_NOAUTOCLOSE
- SetAutoClose true
- !endif
- !endif
-
-!macroend
-
-!macro MUI_GUIINIT_BASIC
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
- CreateFont $MUI_TEMP2 "$(^Font)" "$(^FontSize)" "700"
- SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
-
- !ifndef MUI_HEADER_TRANSPARENT_TEXT
-
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- !else
-
- SetCtlColors $MUI_TEMP1 "" "transparent"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- SetCtlColors $MUI_TEMP1 "" "transparent"
-
- !endif
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1034
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
- SetCtlColors $MUI_TEMP1 /BRANDING
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
- SetCtlColors $MUI_TEMP1 /BRANDING
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:$(^Branding) "
-
-!macroend
-
-!macro MUI_WELCOMEFINISHPAGE_INIT UNINSTALLER
-
- !ifdef MUI_${UNINSTALLER}WELCOMEPAGE | MUI_${UNINSTALLER}FINISHPAGE
-
- !insertmacro INSTALLOPTIONS_EXTRACT_AS "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_INI}" "ioSpecial.ini"
- File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP}"
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "$PLUGINSDIR\modern-wizard.bmp"
-
- !ifdef MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Flags" ""
- !endif
-
- !endif
-
-!macroend
-
-!macro MUI_HEADERIMAGE_INIT UNINSTALLER
-
- !ifdef MUI_HEADERIMAGE
-
- InitPluginsDir
-
- !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
-
- StrCmp $(^RTL) 0 mui.headerimageinit_nortl
-
- File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
-
- !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
- SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
- !else
- SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
- !endif
-
- Goto mui.headerimageinit_done
-
- mui.headerimageinit_nortl:
-
- !endif
-
- File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
-
- !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
- SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
- !else
- SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
- !endif
-
- !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
-
- mui.headerimageinit_done:
-
- !endif
-
- !endif
-
-!macroend
-
-;--------------------------------
-;INTERFACE - FUNCTIONS
-
-!macro MUI_FUNCTION_GUIINIT
-
- Function .onGUIInit
-
- !insertmacro MUI_GUIINIT
-
- !ifdef MUI_CUSTOMFUNCTION_GUIINIT
- Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
- !endif
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_DESCRIPTION_BEGIN
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifndef MUI_VAR_TEXT
- Var MUI_TEXT
- !define MUI_VAR_TEXT
- !endif
-
- Function .onMouseOverSection
- !insertmacro MUI_DESCRIPTION_BEGIN
-
- !verbose pop
-
-!macroend
-
-!macro MUI_FUNCTION_DESCRIPTION_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_DESCRIPTION_END
- !ifdef MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION
- Call "${MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION}"
- !endif
- FunctionEnd
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNFUNCTION_DESCRIPTION_BEGIN
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- Function un.onMouseOverSection
- !insertmacro MUI_DESCRIPTION_BEGIN
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNFUNCTION_DESCRIPTION_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_DESCRIPTION_END
- !ifdef MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION
- Call "${MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION}"
- !endif
- FunctionEnd
-
- !verbose pop
-
-!macroend
-
-!macro MUI_FUNCTION_ABORTWARNING
-
- Function .onUserAbort
- !ifdef MUI_ABORTWARNING
- !insertmacro MUI_ABORTWARNING
- !endif
- !ifdef MUI_CUSTOMFUNCTION_ABORT
- Call "${MUI_CUSTOMFUNCTION_ABORT}"
- !endif
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_UNABORTWARNING
-
- Function un.onUserAbort
- !ifdef MUI_UNABORTWARNING
- !insertmacro MUI_UNABORTWARNING
- !endif
- !ifdef MUI_CUSTOMFUNCTION_UNABORT
- Call "${MUI_CUSTOMFUNCTION_UNABORT}"
- !endif
- FunctionEnd
-
-!macroend
-
-!macro MUI_UNFUNCTION_GUIINIT
-
- Function un.onGUIInit
-
- !insertmacro MUI_UNGUIINIT
-
- !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
- Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
- !endif
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTIONS_DESCRIPTION_BEGIN
-
- ;1.65 compatibility
-
- !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_BEGIN to MUI_FUNCTION_DESCRIPTION_BEGIN."
-
- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-
-!macroend
-
-!macro MUI_FUNCTIONS_DESCRIPTION_END
-
- ;1.65 compatibility
-
- !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_END to MUI_FUNCTION_DESCRIPTION_END."
-
- !insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-!macroend
-
-;--------------------------------
-;START MENU FOLDER
-
-!macro MUI_STARTMENU_GETFOLDER ID VAR
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
-
- ReadRegStr $MUI_TEMP1 "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
- StrCmp $MUI_TEMP1 "" +3
- StrCpy "${VAR}" $MUI_TEMP1
- Goto +2
-
- StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
-
- !else
-
- StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
-
- !endif
-
- !verbose pop
-
-!macroend
-
-!macro MUI_STARTMENU_WRITE_BEGIN ID
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !define MUI_STARTMENUPAGE_CURRENT_ID "${ID}"
-
- StrCpy $MUI_TEMP1 "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
- StrCmp $MUI_TEMP1 ">" mui.startmenu_write_${MUI_STARTMENUPAGE_CURRENT_ID}_done
-
- StrCmp "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" "" 0 mui.startmenu_writebegin_${MUI_STARTMENUPAGE_CURRENT_ID}_notempty
-
- !insertmacro MUI_STARTMENU_GETFOLDER "${MUI_STARTMENUPAGE_CURRENT_ID}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
-
- mui.startmenu_writebegin_${MUI_STARTMENUPAGE_CURRENT_ID}_notempty:
-
- !verbose pop
-
-!macroend
-
-!macro MUI_STARTMENU_WRITE_END
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifdef MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
- WriteRegStr "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
- !endif
-
- mui.startmenu_write_${MUI_STARTMENUPAGE_CURRENT_ID}_done:
-
- !undef MUI_STARTMENUPAGE_CURRENT_ID
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;PAGES
-
-!macro MUI_PAGE_INIT
-
- !insertmacro MUI_INTERFACE
-
- !insertmacro MUI_DEFAULT MUI_PAGE_UNINSTALLER_PREFIX ""
- !insertmacro MUI_DEFAULT MUI_PAGE_UNINSTALLER_FUNCPREFIX ""
-
- !insertmacro MUI_UNSET MUI_UNIQUEID
-
- !define MUI_UNIQUEID ${__LINE__}
-
-!macroend
-
-!macro MUI_UNPAGE_INIT
-
- !ifndef MUI_UNINSTALLER
- !define MUI_UNINSTALLER
- !endif
-
- !define MUI_PAGE_UNINSTALLER
-
- !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_PREFIX
- !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_FUNCPREFIX
-
- !define MUI_PAGE_UNINSTALLER_PREFIX "UN"
- !define MUI_PAGE_UNINSTALLER_FUNCPREFIX "un."
-
-!macroend
-
-!macro MUI_UNPAGE_END
-
- !undef MUI_PAGE_UNINSTALLER
- !undef MUI_PAGE_UNINSTALLER_PREFIX
- !undef MUI_PAGE_UNINSTALLER_FUNCPREFIX
-
-!macroend
-
-!macro MUI_PAGE_WELCOME
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEPAGE
-
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_WELCOMEPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TITLE)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_WELCOMEPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TEXT)"
-
- !ifndef MUI_VAR_HWND
- Var MUI_HWND
- !define MUI_VAR_HWND
- !endif
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_WELCOMEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE
- !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_3LINES
- !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_LICENSE LICENSEDATA
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}LICENSEPAGE
-
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP "$(MUI_INNERTEXT_LICENSE_TOP)"
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BUTTON ""
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_CHECKBOX_TEXT ""
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT ""
- !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE ""
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}license
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- LicenseData "${LICENSEDATA}"
-
- !ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
- !ifndef MUI_LICENSEPAGE_CHECKBOX & MUI_LICENSEPAGE_RADIOBUTTONS
- LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM)" "${MUI_LICENSEPAGE_BUTTON}"
- !else ifdef MUI_LICENSEPAGE_CHECKBOX
- LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_CHECKBOX)" "${MUI_LICENSEPAGE_BUTTON}"
- !else
- LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS)" "${MUI_LICENSEPAGE_BUTTON}"
- !endif
- !else
- LicenseText "${MUI_LICENSEPAGE_TEXT_BOTTOM}" "${MUI_LICENSEPAGE_BUTTON}"
- !endif
-
- !ifdef MUI_LICENSEPAGE_CHECKBOX
- LicenseForceSelection checkbox "${MUI_LICENSEPAGE_CHECKBOX_TEXT}"
- !else ifdef MUI_LICENSEPAGE_RADIOBUTTONS
- LicenseForceSelection radiobuttons "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}" "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}"
- !endif
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_LICENSEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_TOP
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_BOTTOM
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_BUTTON
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_RADIOBUTTONS
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_ACCEPT
- !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_DECLINE
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_COMPONENTS
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}COMPONENTSPAGE
-
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_TOP ""
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_COMPLIST ""
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_INSTTYPE ""
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE)"
- !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
-
- !ifndef MUI_VAR_TEXT
- Var MUI_TEXT
- !define MUI_VAR_TEXT
- !endif
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}components
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- ComponentText "${MUI_COMPONENTSPAGE_TEXT_TOP}" "${MUI_COMPONENTSPAGE_TEXT_INSTTYPE}" "${MUI_COMPONENTSPAGE_TEXT_COMPLIST}"
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_COMPONENTSPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
-
- !undef MUI_COMPONENTSPAGE_TEXT_TOP
- !undef MUI_COMPONENTSPAGE_TEXT_COMPLIST
- !undef MUI_COMPONENTSPAGE_TEXT_INSTTYPE
- !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
- !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_DIRECTORY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}DIRECTORYPAGE
-
- !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP ""
- !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION ""
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}directory
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- DirText "${MUI_DIRECTORYPAGE_TEXT_TOP}" "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
-
- !ifdef MUI_DIRECTORYPAGE_VARIABLE
- DirVar "${MUI_DIRECTORYPAGE_VARIABLE}"
- !endif
-
- !ifdef MUI_DIRECTORYPAGE_VERIFYONLEAVE
- DirVerify leave
- !endif
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_DIRECTORYPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
-
- !undef MUI_DIRECTORYPAGE_TEXT_TOP
- !undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
- !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_BGCOLOR
- !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VARIABLE
- !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VERIFYONLEAVE
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_STARTMENU ID VAR
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}STARTMENUPAGE
-
- !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
- !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_TOP "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_TOP)"
- !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_CHECKBOX "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_CHECKBOX)"
-
- !define MUI_STARTMENUPAGE_VARIABLE "${VAR}"
- !define "MUI_STARTMENUPAGE_${ID}_VARIABLE" "${MUI_STARTMENUPAGE_VARIABLE}"
- !define "MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
- !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
- !endif
- !ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
- !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
- !endif
- !ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
- !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
- !endif
-
- !ifndef MUI_VAR_HWND
- Var MUI_HWND
- !define MUI_VAR_HWND
- !endif
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_STARTMENUPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
-
- !undef MUI_STARTMENUPAGE_VARIABLE
- !undef MUI_STARTMENUPAGE_TEXT_TOP
- !undef MUI_STARTMENUPAGE_TEXT_CHECKBOX
- !undef MUI_STARTMENUPAGE_DEFAULTFOLDER
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_NODISABLE
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_ROOT
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_KEY
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_VALUENAME
- !insertmacro MUI_UNSET MUI_STARTMENUPAGE_BGCOLOR
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_INSTFILES
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INSTFILESPAGE
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}instfiles
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_INSTFILESPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_TEXT
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_TEXT
- !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_SUBTEXT
-
- !verbose pop
-
-!macroend
-
-!macro MUI_PAGE_FINISH
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE
-
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TITLE)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TEXT)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_BUTTON "$(MUI_BUTTONTEXT_FINISH)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT_REBOOT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_REBOOT)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT_REBOOTNOW "$(MUI_TEXT_FINISH_REBOOTNOW)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT_REBOOTLATER "$(MUI_TEXT_FINISH_REBOOTLATER)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_RUN_TEXT "$(MUI_TEXT_FINISH_RUN)"
- !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_SHOWREADME_TEXT "$(MUI_TEXT_FINISH_SHOWREADME)"
- !insertmacro MUI_DEFAULT MUI_FINISHPAGE_LINK_COLOR "000080"
-
- !ifndef MUI_VAR_HWND
- Var MUI_HWND
- !define MUI_VAR_HWND
- !endif
-
- !ifndef MUI_PAGE_UNINSTALLER
- !ifndef MUI_FINISHPAGE_NOAUTOCLOSE
- AutoCloseWindow true
- !endif
- !endif
-
- !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
- !ifndef MUI_VAR_NOABORTWARNING
- !define MUI_VAR_NOABORTWARNING
- Var MUI_NOABORTWARNING
- !endif
- !endif
-
- PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
-
- PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- PageExEnd
-
- !insertmacro MUI_FUNCTION_FINISHPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE_3LINES
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro MUI_UNSET MUI_FINISHPAGE_BUTTON
- !insertmacro MUI_UNSET MUI_FINISHPAGE_CANCEL_ENABLED
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOT
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTNOW
- !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTLATER
- !insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTLATER_DEFAULT
- !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN
- !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_TEXT
- !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_PARAMETERS
- !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_NOTCHECKED
- !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_FUNCTION
- !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME
- !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_TEXT
- !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
- !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_FUNCTION
- !insertmacro MUI_UNSET MUI_FINISHPAGE_LINK
- !insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_LOCATION
- !insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_COLOR
- !insertmacro MUI_UNSET MUI_FINISHPAGE_NOREBOOTSUPPORT
-
- !insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_TOP
- !insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_BOTTOM
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_WELCOME
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
-
- !insertmacro MUI_PAGE_WELCOME
-
- !insertmacro MUI_UNPAGE_END
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_CONFIRM
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifndef MUI_UNINSTALLER
- !define MUI_UNINSTALLER
- !endif
-
- !insertmacro MUI_PAGE_INIT
-
- !insertmacro MUI_SET MUI_UNCONFIRMPAGE
-
- !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_TOP ""
- !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_LOCATION ""
-
- PageEx un.uninstConfirm
-
- PageCallbacks un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
-
- Caption " "
-
- UninstallText "${MUI_UNCONFIRMPAGE_TEXT_TOP}" "${MUI_UNCONFIRMPAGE_TEXT_LOCATION}"
-
- PageExEnd
-
- !insertmacro MUI_UNFUNCTION_CONFIRMPAGE un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
-
- !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_TOP
- !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_LOCATION
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_LICENSE LICENSEDATA
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
-
- !insertmacro MUI_PAGE_LICENSE "${LICENSEDATA}"
-
- !insertmacro MUI_UNPAGE_END
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_COMPONENTS
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
-
- !insertmacro MUI_PAGE_COMPONENTS
-
- !insertmacro MUI_UNPAGE_END
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_DIRECTORY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
-
- !insertmacro MUI_PAGE_DIRECTORY
-
- !insertmacro MUI_UNPAGE_END
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_INSTFILES
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
-
- !insertmacro MUI_PAGE_INSTFILES
-
- !insertmacro MUI_UNPAGE_END
-
- !verbose pop
-
-!macroend
-
-!macro MUI_UNPAGE_FINISH
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_UNPAGE_INIT
-
- !insertmacro MUI_PAGE_FINISH
-
- !insertmacro MUI_UNPAGE_END
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;PAGE FUNCTIONS
-
-!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
-
- !ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
- Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
- !undef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
- !endif
-
-!macroend
-
-!macro MUI_WELCOMEFINISHPAGE_FUNCTION_CUSTOM
-
- !ifdef MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT
- Call "${MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT}"
- !undef MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT
- !endif
-
-!macroend
-
-!macro MUI_FUNCTION_WELCOMEPAGE PRE LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_WELCOMEFINISHPAGE_FUNCTION_CUSTOM
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NumFields" "3"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NextButtonText" ""
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "CancelEnabled" ""
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 2" "Text" MUI_WELCOMEPAGE_TITLE
-
- !ifndef MUI_WELCOMEPAGE_TITLE_3LINES
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "38"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "45"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "48"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "55"
- !endif
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "185"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 3" "Text" MUI_WELCOMEPAGE_TEXT
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
-
- LockWindow on
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
- LockWindow off
-
- !insertmacro INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
- Pop $MUI_HWND
- SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1201
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- CreateFont $MUI_TEMP2 "$(^Font)" "12" "700"
- SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
-
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1202
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- !insertmacro INSTALLOPTIONS_SHOW
-
- LockWindow on
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
- LockWindow off
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_SUBTITLE)
-
- FunctionEnd
-
- Function "${SHOW}"
-
- !insertmacro MUI_INNERDIALOG_TEXT 1040 "${MUI_LICENSEPAGE_TEXT_TOP}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_COMPONENTSPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_SUBTITLE)
- FunctionEnd
-
- Function "${SHOW}"
-
- !insertmacro MUI_INNERDIALOG_TEXT 1042 "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
-
- FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
- GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1043
- EnableWindow $MUI_TEMP1 0
-
- !insertmacro MUI_INNERDIALOG_TEXT 1043 "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
- StrCpy $MUI_TEXT "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_SUBTITLE)
- FunctionEnd
-
- Function "${SHOW}"
- !ifdef MUI_DIRECTORYPAGE_BGCOLOR
- FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
- GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1019
- SetCtlColors $MUI_TEMP1 "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
- !endif
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
- FunctionEnd
-
- Function "${LEAVE}"
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_STARTMENUPAGE PRE LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
-
- !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
-
- StrCmp "${MUI_STARTMENUPAGE_VARIABLE}" "" 0 +4
-
- ReadRegStr $MUI_TEMP1 "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
- StrCmp $MUI_TEMP1 "" +2
- StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" $MUI_TEMP1
-
- !endif
-
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
-
- StrCmp $(^RTL) 0 mui.startmenu_nortl
- !ifndef MUI_STARTMENUPAGE_NODISABLE
- StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !else
- StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !endif
- Goto mui.startmenu_initdone
- mui.startmenu_nortl:
- !ifndef MUI_STARTMENUPAGE_NODISABLE
- StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !else
- StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
- !endif
- mui.startmenu_initdone:
-
- Pop $MUI_HWND
-
- !ifdef MUI_STARTMENUPAGE_BGCOLOR
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1002
- SetCtlColors $MUI_TEMP1 "" "${MUI_STARTMENUPAGE_BGCOLOR}"
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1004
- SetCtlColors $MUI_TEMP1 "" "${MUI_STARTMENUPAGE_BGCOLOR}"
- !endif
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- StartMenu::Show
-
- Pop $MUI_TEMP1
- StrCmp $MUI_TEMP1 "success" 0 +2
- Pop "${MUI_STARTMENUPAGE_VARIABLE}"
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_SUBTITLE)
-
- FunctionEnd
-
- Function "${SHOW}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- !insertmacro MUI_ENDHEADER
- !insertmacro MUI_LANGDLL_SAVELANGUAGE
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_FUNCTION_FINISHPAGE PRE LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_WELCOMEFINISHPAGE_FUNCTION_CUSTOM
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Settings" "NextButtonText" MUI_FINISHPAGE_BUTTON
-
- !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "CancelEnabled" "1"
- !endif
-
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "38"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "45"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "48"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "55"
- !endif
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 2" "Text" MUI_FINISHPAGE_TITLE
-
- !ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "85"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "115"
- !endif
- !else
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "95"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "125"
- !endif
- !endif
- !else
- !ifndef MUI_FINISHPAGE_LINK
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "185"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "175"
- !endif
- !endif
-
- !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
-
- IfRebootFlag 0 mui.finish_noreboot_init
-
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "85"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "115"
- !endif
- !else
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "95"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "125"
- !endif
- !endif
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 3" "Text" MUI_FINISHPAGE_TEXT_REBOOT
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "RadioButton"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 4" "Text" MUI_FINISHPAGE_TEXT_REBOOTNOW
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "321"
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "90"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "100"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "130"
- !endif
- !else
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "100"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "110"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "130"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "140"
- !endif
- !endif
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Type" "RadioButton"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 5" "Text" MUI_FINISHPAGE_TEXT_REBOOTLATER
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "321"
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "110"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "120"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "110"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "120"
- !endif
- !ifdef MUI_FINISHPAGE_REBOOTLATER_DEFAULT
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "1"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
- !endif
-
- Goto mui.finish_load
-
- mui.finish_noreboot_init:
-
- !endif
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 3" "Text" MUI_FINISHPAGE_TEXT
-
- !ifdef MUI_FINISHPAGE_RUN
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "CheckBox"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 4" "Text" MUI_FINISHPAGE_RUN_TEXT
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "90"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "100"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "130"
- !endif
- !else
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "100"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "110"
- !else
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "130"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "140"
- !endif
- !endif
- !ifndef MUI_FINISHPAGE_RUN_NOTCHECKED
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
- !endif
-
- !endif
-
- !ifdef MUI_FINISHPAGE_SHOWREADME
-
- !ifdef MUI_FINISHPAGE_CURFIELD_NO
- !undef MUI_FINISHPAGE_CURFIELD_NO
- !endif
-
- !ifndef MUI_FINISHPAGE_RUN
- !define MUI_FINISHPAGE_CURFIELD_NO 4
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !define MUI_FINISHPAGE_CURFIELD_TOP 90
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 100
- !else
- !define MUI_FINISHPAGE_CURFIELD_TOP 120
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 130
- !endif
- !else
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !define MUI_FINISHPAGE_CURFIELD_TOP 100
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 110
- !else
- !define MUI_FINISHPAGE_CURFIELD_TOP 130
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 140
- !endif
- !endif
- !else
- !define MUI_FINISHPAGE_CURFIELD_NO 5
- !ifndef MUI_FINISHPAGE_TITLE_3LINES
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !define MUI_FINISHPAGE_CURFIELD_TOP 110
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 120
- !else
- !define MUI_FINISHPAGE_CURFIELD_TOP 140
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 150
- !endif
- !else
- !ifndef MUI_FINISHPAGE_TEXT_LARGE
- !define MUI_FINISHPAGE_CURFIELD_TOP 120
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 130
- !else
- !define MUI_FINISHPAGE_CURFIELD_TOP 150
- !define MUI_FINISHPAGE_CURFIELD_BOTTOM 160
- !endif
- !endif
- !endif
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Type" "CheckBox"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Text" MUI_FINISHPAGE_SHOWREADME_TEXT
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Left" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Right" "315"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Top" ${MUI_FINISHPAGE_CURFIELD_TOP}
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Bottom" ${MUI_FINISHPAGE_CURFIELD_BOTTOM}
- !ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "State" "1"
- !endif
-
- !endif
-
- !ifdef MUI_FINISHPAGE_LINK
-
- !ifdef MUI_FINISHPAGE_CURFIELD_NO
- !undef MUI_FINISHPAGE_CURFIELD_NO
- !endif
-
- !ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
- !define MUI_FINISHPAGE_CURFIELD_NO 6
- !else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
- !define MUI_FINISHPAGE_CURFIELD_NO 5
- !else
- !define MUI_FINISHPAGE_CURFIELD_NO 4
- !endif
-
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Type" "Link"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Text" MUI_FINISHPAGE_LINK
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Left" "120"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Right" "315"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Top" "175"
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Bottom" "185"
- !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "State" MUI_FINISHPAGE_LINK_LOCATION
-
- !endif
-
- !ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME & MUI_FINISHPAGE_LINK
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "6"
- !else ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
- !else ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_LINK
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
- !else ifdef MUI_FINISHPAGE_SHOWREADME & MUI_FINISHPAGE_LINK
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
- !else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME | MUI_FINISHPAGE_LINK
- !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "4"
- !endif
-
- !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
- mui.finish_load:
- !endif
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
-
- LockWindow on
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
- LockWindow off
-
- !insertmacro INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
- Pop $MUI_HWND
- SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1201
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- CreateFont $MUI_TEMP2 "$(^Font)" "12" "700"
- SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
-
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1202
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
-
- IfRebootFlag 0 mui.finish_noreboot_show
-
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- Goto mui.finish_show
-
- mui.finish_noreboot_show:
-
- !endif
-
- !ifdef MUI_FINISHPAGE_RUN
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
- !endif
-
- !ifdef MUI_FINISHPAGE_SHOWREADME
- !ifndef MUI_FINISHPAGE_RUN
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
- !else
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
- !endif
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
- !endif
-
- !ifdef MUI_FINISHPAGE_LINK
- !ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1205
- !else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
- !else
- GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
- !endif
- SetCtlColors $MUI_TEMP1 "${MUI_FINISHPAGE_LINK_COLOR}" "${MUI_BGCOLOR}"
- !endif
-
- !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
- mui.finish_show:
- !endif
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
- StrCpy $MUI_NOABORTWARNING "1"
- !endif
-
- !insertmacro INSTALLOPTIONS_SHOW
-
- !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
- StrCpy $MUI_NOABORTWARNING ""
- !endif
-
- LockWindow on
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
- ShowWindow $MUI_TEMP1 ${SW_NORMAL}
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
- ShowWindow $MUI_TEMP1 ${SW_HIDE}
- LockWindow off
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
-
- IfRebootFlag "" mui.finish_noreboot_end
-
- !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 4" "State"
-
- StrCmp $MUI_TEMP1 "1" 0 +2
- Reboot
-
- Return
-
- mui.finish_noreboot_end:
-
- !endif
-
- !ifdef MUI_FINISHPAGE_RUN
-
- !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 4" "State"
-
- StrCmp $MUI_TEMP1 "1" 0 mui.finish_norun
- !ifndef MUI_FINISHPAGE_RUN_FUNCTION
- !ifndef MUI_FINISHPAGE_RUN_PARAMETERS
- StrCpy $MUI_TEMP1 "$\"${MUI_FINISHPAGE_RUN}$\""
- !else
- StrCpy $MUI_TEMP1 "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
- !endif
- Exec "$MUI_TEMP1"
- !else
- Call "${MUI_FINISHPAGE_RUN_FUNCTION}"
- !endif
-
- mui.finish_norun:
-
- !endif
-
- !ifdef MUI_FINISHPAGE_SHOWREADME
-
- !ifndef MUI_FINISHPAGE_RUN
- !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 4" "State"
- !else
- !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 5" "State"
- !endif
-
- StrCmp $MUI_TEMP1 "1" 0 mui.finish_noshowreadme
- !ifndef MUI_FINISHPAGE_SHOWREADME_FUNCTION
- ExecShell "open" "${MUI_FINISHPAGE_SHOWREADME}"
- !else
- Call "${MUI_FINISHPAGE_SHOWREADME_FUNCTION}"
- !endif
-
- mui.finish_noshowreadme:
-
- !endif
-
- FunctionEnd
-
-!macroend
-
-!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
-
- Function "${PRE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
- !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
-
- FunctionEnd
-
- Function "${SHOW}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
-
- FunctionEnd
-
- Function "${LEAVE}"
-
- !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
-
- FunctionEnd
-
-!macroend
-
-;--------------------------------
-;INSTALL OPTIONS (CUSTOM PAGES)
-
-!macro MUI_INSTALLOPTIONS_EXTRACT FILE
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_EXTRACT "${FILE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_EXTRACT_AS "${FILE}" "${FILENAME}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_DISPLAY FILE
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_DISPLAY "${FILE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_DISPLAY_RETURN "${FILE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_INITDIALOG "${FILE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_SHOW
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_SHOW
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_SHOW_RETURN
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_SHOW_RETURN
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_READ "${VAR}" "${FILE}" "${SECTION}" "${KEY}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "${SECTION}" "${KEY}" "${VALUE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT FILE SECTION KEY SYMBOL
-
- ;Converts default strings from language files to InstallOptions format
- ;Only for use inside MUI
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !ifndef "${SYMBOL}_DEFAULTSET"
- !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "${SECTION}" "${KEY}" "${${SYMBOL}}"
- !else
- Push "${${SYMBOL}}"
- Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}Nsis2Io
- Pop $MUI_TEMP1
- !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "${SECTION}" "${KEY}" $MUI_TEMP1
- !endif
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;RESERVE FILES
-
-!macro MUI_RESERVEFILE_INSTALLOPTIONS
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_RESERVEFILE_LANGDLL
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;LANGUAGES
-
-!macro MUI_LANGUAGE LANGUAGE
-
- ;Include a language
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_INSERT
-
- LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf"
- !insertmacro LANGFILE_INCLUDE "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nsh"
-
- !ifndef MUI_LANGDLL_LANGUAGES
- !ifdef MUI_LANGDLL_ALLLANGUAGES
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
- !else
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
- !endif
- !else
- !ifdef MUI_LANGDLL_LANGUAGES_TEMP
- !undef MUI_LANGDLL_LANGUAGES_TEMP
- !endif
- !define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
- !undef MUI_LANGDLL_LANGUAGES
-
- !ifdef MUI_LANGDLL_ALLLANGUAGES
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
- !else
- !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
- !endif
- !endif
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;LANGUAGE SELECTION DIALOG
-
-!macro MUI_LANGDLL_DISPLAY
-
- !verbose push
- !verbose ${MUI_VERBOSE}
-
- !insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
- !insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
- StrCmp $MUI_TEMP1 "" mui.langdll_show
- StrCpy $LANGUAGE $MUI_TEMP1
- !ifndef MUI_LANGDLL_ALWAYSSHOW
- Goto mui.langdll_done
- !endif
- mui.langdll_show:
-
- !endif
-
- !ifdef NSIS_CONFIG_SILENT_SUPPORT
- IfSilent mui.langdll_done
- !endif
-
- !ifdef MUI_LANGDLL_ALLLANGUAGES
- LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
- !else
- LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES} ""
- !endif
-
- Pop $LANGUAGE
- StrCmp $LANGUAGE "cancel" 0 +2
- Abort
-
- !ifdef NSIS_CONFIG_SILENT_SUPPORT
- mui.langdll_done:
- !else ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- mui.langdll_done:
- !endif
-
- !verbose pop
-
-!macroend
-
-!macro MUI_LANGDLL_SAVELANGUAGE
-
- !ifndef MUI_PAGE_UNINSTALLER
-
- IfAbort mui.langdllsavelanguage_abort
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
- !endif
-
- mui.langdllsavelanguage_abort:
-
- !endif
-
-!macroend
-
-!macro MUI_UNGETLANGUAGE
-
- !verbose pop
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
- StrCmp $MUI_TEMP1 "" 0 mui.ungetlanguage_setlang
-
- !endif
-
- !insertmacro MUI_LANGDLL_DISPLAY
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- Goto mui.ungetlanguage_done
-
- mui.ungetlanguage_setlang:
- StrCpy $LANGUAGE $MUI_TEMP1
-
- mui.ungetlanguage_done:
-
- !endif
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;END
-
-!endif
-
-!verbose pop
+/*
+
+NSIS Modern User Interface - Version 1.8
+Copyright © 2002-2007 Joost Verburg
+
+*/
+
+!echo "NSIS Modern User Interface version 1.8 - © 2002-2007 Joost Verburg"
+
+;--------------------------------
+
+!ifndef MUI_INCLUDED
+!define MUI_INCLUDED
+
+!define MUI_SYSVERSION "1.8"
+
+!verbose push
+
+!ifndef MUI_VERBOSE
+ !define MUI_VERBOSE 3
+!endif
+
+!verbose ${MUI_VERBOSE}
+
+;--------------------------------
+;HEADER FILES, DECLARATIONS
+
+!include InstallOptions.nsh
+!include LangFile.nsh
+!include WinMessages.nsh
+
+!define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
+
+Var MUI_TEMP1
+Var MUI_TEMP2
+
+;--------------------------------
+;INSERT CODE
+
+!macro MUI_INSERT
+
+ !ifndef MUI_INSERT
+ !define MUI_INSERT
+
+ !ifdef MUI_PRODUCT | MUI_VERSION
+ !warning "The MUI_PRODUCT and MUI_VERSION defines have been removed. Use a normal Name command now."
+ !endif
+
+ !insertmacro MUI_INTERFACE
+
+ !insertmacro MUI_FUNCTION_GUIINIT
+ !insertmacro MUI_FUNCTION_ABORTWARNING
+
+ !ifdef MUI_IOCONVERT_USED
+ !insertmacro INSTALLOPTIONS_FUNCTION_WRITE_CONVERT
+ !endif
+
+ !ifdef MUI_UNINSTALLER
+ !insertmacro MUI_UNFUNCTION_GUIINIT
+ !insertmacro MUI_FUNCTION_UNABORTWARNING
+
+ !ifdef MUI_UNIOCONVERT_USED
+ !insertmacro INSTALLOPTIONS_UNFUNCTION_WRITE_CONVERT
+ !endif
+ !endif
+
+ !endif
+
+!macroend
+
+;--------------------------------
+;GENERAL
+
+!macro MUI_DEFAULT SYMBOL CONTENT
+
+ !ifndef "${SYMBOL}"
+ !define "${SYMBOL}" "${CONTENT}"
+ !endif
+
+!macroend
+
+!macro MUI_DEFAULT_IOCONVERT SYMBOL CONTENT
+
+ !ifndef "${SYMBOL}"
+ !define "${SYMBOL}" "${CONTENT}"
+ !insertmacro MUI_SET "${SYMBOL}_DEFAULTSET"
+ !insertmacro MUI_SET "MUI_${MUI_PAGE_UNINSTALLER_PREFIX}IOCONVERT_USED"
+ !else
+ !insertmacro MUI_UNSET "${SYMBOL}_DEFAULTSET"
+ !endif
+
+!macroend
+
+!macro MUI_SET SYMBOL
+
+ !ifndef "${SYMBOL}"
+ !define "${SYMBOL}"
+ !endif
+
+!macroend
+
+!macro MUI_UNSET SYMBOL
+
+ !ifdef "${SYMBOL}"
+ !undef "${SYMBOL}"
+ !endif
+
+!macroend
+
+;--------------------------------
+;INTERFACE - COMPILE TIME SETTINGS
+
+!macro MUI_INTERFACE
+
+ !ifndef MUI_INTERFACE
+ !define MUI_INTERFACE
+
+ !ifdef MUI_INSERT_NSISCONF
+ !insertmacro MUI_NSISCONF
+ !endif
+
+ !insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\modern_smalldesc.exe"
+ !insertmacro MUI_DEFAULT MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\modern_nodesc.exe"
+ !insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
+ !insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\modern.bmp"
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BGCOLOR "/windows"
+ !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_COLORS "/windows"
+ !insertmacro MUI_DEFAULT MUI_INSTFILESPAGE_PROGRESSBAR "smooth"
+ !insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"
+ !insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_INI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
+ !insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_INI "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
+ !insertmacro MUI_DEFAULT MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
+ !insertmacro MUI_DEFAULT MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp"
+
+ !ifdef MUI_HEADERIMAGE
+
+ !insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
+
+ !ifndef MUI_HEADERIMAGE_UNBITMAP
+ !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
+ !ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH
+ !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH
+ !endif
+ !endif
+
+ !ifdef MUI_HEADERIMAGE_BITMAP_RTL
+ !ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
+ !define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
+ !ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
+ !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH
+ !endif
+ !endif
+ !endif
+
+ !endif
+
+ XPStyle On
+
+ ChangeUI all "${MUI_UI}"
+ !ifdef MUI_HEADERIMAGE
+ !ifndef MUI_HEADERIMAGE_RIGHT
+ ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
+ !else
+ ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
+ !endif
+ !endif
+ !ifdef MUI_COMPONENTSPAGE_SMALLDESC
+ ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_SMALLDESC}"
+ !else ifdef MUI_COMPONENTSPAGE_NODESC
+ ChangeUI IDD_SELCOM "${MUI_UI_COMPONENTSPAGE_NODESC}"
+ !endif
+
+ Icon "${MUI_ICON}"
+ UninstallIcon "${MUI_UNICON}"
+
+ CheckBitmap "${MUI_COMPONENTSPAGE_CHECKBITMAP}"
+ LicenseBkColor "${MUI_LICENSEPAGE_BGCOLOR}"
+ InstallColors ${MUI_INSTFILESPAGE_COLORS}
+ InstProgressFlags ${MUI_INSTFILESPAGE_PROGRESSBAR}
+
+ SubCaption 4 " "
+ UninstallSubCaption 2 " "
+
+ !insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
+ !insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"
+
+ !endif
+
+!macroend
+
+;--------------------------------
+;INTERFACE - RUN-TIME
+
+!macro MUI_INNERDIALOG_TEXT CONTROL TEXT
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
+ GetDlgItem $MUI_TEMP1 $MUI_TEMP1 ${CONTROL}
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:${TEXT}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_HEADER_TEXT_INTERNAL ID TEXT
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT "${ID}"
+
+ !ifdef MUI_HEADER_TRANSPARENT_TEXT
+
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ !endif
+
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:${TEXT}"
+
+ !ifdef MUI_HEADER_TRANSPARENT_TEXT
+
+ ShowWindow $MUI_TEMP1 ${SW_SHOWNA}
+
+ !endif
+
+!macroend
+
+!macro MUI_HEADER_TEXT TEXT SUBTEXT
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifdef MUI_HEADER_TRANSPARENT_TEXT
+
+ LockWindow on
+
+ !endif
+
+ !insertmacro MUI_HEADER_TEXT_INTERNAL 1037 "${TEXT}"
+ !insertmacro MUI_HEADER_TEXT_INTERNAL 1038 "${SUBTEXT}"
+
+ !ifdef MUI_HEADER_TRANSPARENT_TEXT
+
+ LockWindow off
+
+ !endif
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_HEADER_TEXT_PAGE TEXT SUBTEXT
+
+ !ifdef MUI_PAGE_HEADER_TEXT & MUI_PAGE_HEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
+ !else ifdef MUI_PAGE_HEADER_TEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_PAGE_HEADER_TEXT}" "${SUBTEXT}"
+ !else ifdef MUI_PAGE_HEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${TEXT}" "${MUI_PAGE_HEADER_SUBTEXT}"
+ !else
+ !insertmacro MUI_HEADER_TEXT "${TEXT}" "${SUBTEXT}"
+ !endif
+
+ !insertmacro MUI_UNSET MUI_PAGE_HEADER_TEXT
+ !insertmacro MUI_UNSET MUI_PAGE_HEADER_SUBTEXT
+
+!macroend
+
+!macro MUI_DESCRIPTION_BEGIN
+
+ FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
+ GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1043
+
+ StrCmp $0 -1 0 mui.description_begin_done
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:"
+ EnableWindow $MUI_TEMP1 0
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:$MUI_TEXT"
+ Goto mui.description_done
+ mui.description_begin_done:
+
+!macroend
+
+!macro MUI_DESCRIPTION_TEXT VAR TEXT
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ StrCmp $0 ${VAR} 0 mui.description_${VAR}_done
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:"
+ EnableWindow $MUI_TEMP1 1
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:${TEXT}"
+ Goto mui.description_done
+ mui.description_${VAR}_done:
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_DESCRIPTION_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ mui.description_done:
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_ENDHEADER
+
+ IfAbort mui.endheader_abort
+
+ !ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT & MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
+ !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_TEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_FINISHHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
+ !else ifdef MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "${MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT}"
+ !else
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_SUBTITLE)"
+ !endif
+
+ Goto mui.endheader_done
+
+ mui.endheader_abort:
+
+ !ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT & MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
+ !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_TEXT
+ !insertmacro MUI_HEADER_TEXT "${MUI_INSTFILESPAGE_ABORTHEADER_TEXT}" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
+ !else ifdef MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "${MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT}"
+ !else
+ !insertmacro MUI_HEADER_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_TITLE)" "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_ABORT_SUBTITLE)"
+ !endif
+
+ mui.endheader_done:
+
+!macroend
+
+!macro MUI_ABORTWARNING
+
+ !ifdef MUI_FINISHPAGE_ABORTWARNINGCHECK
+ StrCmp $MUI_NOABORTWARNING "1" mui.quit
+ !endif
+
+ !ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit
+ !else
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.quit
+ !endif
+
+ Abort
+ mui.quit:
+
+!macroend
+
+!macro MUI_UNABORTWARNING
+
+ !ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit
+ !else
+ MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.quit
+ !endif
+
+ Abort
+ mui.quit:
+
+!macroend
+
+!macro MUI_GUIINIT
+
+ !insertmacro MUI_WELCOMEFINISHPAGE_INIT ""
+ !insertmacro MUI_HEADERIMAGE_INIT ""
+
+ !insertmacro MUI_GUIINIT_BASIC
+
+!macroend
+
+!macro MUI_UNGUIINIT
+
+ !insertmacro MUI_WELCOMEFINISHPAGE_INIT "UN"
+ !insertmacro MUI_HEADERIMAGE_INIT "UN"
+
+ !insertmacro MUI_GUIINIT_BASIC
+
+ !ifdef MUI_UNFINISHPAGE
+ !ifndef MUI_UNFINISHPAGE_NOAUTOCLOSE
+ SetAutoClose true
+ !endif
+ !endif
+
+!macroend
+
+!macro MUI_GUIINIT_BASIC
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
+ CreateFont $MUI_TEMP2 "$(^Font)" "$(^FontSize)" "700"
+ SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
+
+ !ifndef MUI_HEADER_TRANSPARENT_TEXT
+
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ !else
+
+ SetCtlColors $MUI_TEMP1 "" "transparent"
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
+ SetCtlColors $MUI_TEMP1 "" "transparent"
+
+ !endif
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1034
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
+ SetCtlColors $MUI_TEMP1 /BRANDING
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
+ SetCtlColors $MUI_TEMP1 /BRANDING
+ SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:$(^Branding) "
+
+!macroend
+
+!macro MUI_WELCOMEFINISHPAGE_INIT UNINSTALLER
+
+ !ifdef MUI_${UNINSTALLER}WELCOMEPAGE | MUI_${UNINSTALLER}FINISHPAGE
+
+ !insertmacro INSTALLOPTIONS_EXTRACT_AS "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_INI}" "ioSpecial.ini"
+ File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP}"
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "$PLUGINSDIR\modern-wizard.bmp"
+
+ !ifdef MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Flags" ""
+ !endif
+
+ !endif
+
+!macroend
+
+!macro MUI_HEADERIMAGE_INIT UNINSTALLER
+
+ !ifdef MUI_HEADERIMAGE
+
+ InitPluginsDir
+
+ !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
+
+ StrCmp $(^RTL) 0 mui.headerimageinit_nortl
+
+ File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"
+
+ !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
+ SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
+ !else
+ SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
+ !endif
+
+ Goto mui.headerimageinit_done
+
+ mui.headerimageinit_nortl:
+
+ !endif
+
+ File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
+
+ !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
+ SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
+ !else
+ SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
+ !endif
+
+ !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL
+
+ mui.headerimageinit_done:
+
+ !endif
+
+ !endif
+
+!macroend
+
+;--------------------------------
+;INTERFACE - FUNCTIONS
+
+!macro MUI_FUNCTION_GUIINIT
+
+ Function .onGUIInit
+
+ !insertmacro MUI_GUIINIT
+
+ !ifdef MUI_CUSTOMFUNCTION_GUIINIT
+ Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_DESCRIPTION_BEGIN
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifndef MUI_VAR_TEXT
+ Var MUI_TEXT
+ !define MUI_VAR_TEXT
+ !endif
+
+ Function .onMouseOverSection
+ !insertmacro MUI_DESCRIPTION_BEGIN
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_FUNCTION_DESCRIPTION_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_DESCRIPTION_END
+ !ifdef MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION
+ Call "${MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION}"
+ !endif
+ FunctionEnd
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNFUNCTION_DESCRIPTION_BEGIN
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ Function un.onMouseOverSection
+ !insertmacro MUI_DESCRIPTION_BEGIN
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNFUNCTION_DESCRIPTION_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_DESCRIPTION_END
+ !ifdef MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION
+ Call "${MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION}"
+ !endif
+ FunctionEnd
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_FUNCTION_ABORTWARNING
+
+ Function .onUserAbort
+ !ifdef MUI_ABORTWARNING
+ !insertmacro MUI_ABORTWARNING
+ !endif
+ !ifdef MUI_CUSTOMFUNCTION_ABORT
+ Call "${MUI_CUSTOMFUNCTION_ABORT}"
+ !endif
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_UNABORTWARNING
+
+ Function un.onUserAbort
+ !ifdef MUI_UNABORTWARNING
+ !insertmacro MUI_UNABORTWARNING
+ !endif
+ !ifdef MUI_CUSTOMFUNCTION_UNABORT
+ Call "${MUI_CUSTOMFUNCTION_UNABORT}"
+ !endif
+ FunctionEnd
+
+!macroend
+
+!macro MUI_UNFUNCTION_GUIINIT
+
+ Function un.onGUIInit
+
+ !insertmacro MUI_UNGUIINIT
+
+ !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
+ Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTIONS_DESCRIPTION_BEGIN
+
+ ;1.65 compatibility
+
+ !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_BEGIN to MUI_FUNCTION_DESCRIPTION_BEGIN."
+
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+
+!macroend
+
+!macro MUI_FUNCTIONS_DESCRIPTION_END
+
+ ;1.65 compatibility
+
+ !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_END to MUI_FUNCTION_DESCRIPTION_END."
+
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+!macroend
+
+;--------------------------------
+;START MENU FOLDER
+
+!macro MUI_STARTMENU_GETFOLDER ID VAR
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifdef MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME
+
+ ReadRegStr $MUI_TEMP1 "${MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME}"
+ StrCmp $MUI_TEMP1 "" +3
+ StrCpy "${VAR}" $MUI_TEMP1
+ Goto +2
+
+ StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
+
+ !else
+
+ StrCpy "${VAR}" "${MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER}"
+
+ !endif
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_STARTMENU_WRITE_BEGIN ID
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !define MUI_STARTMENUPAGE_CURRENT_ID "${ID}"
+
+ StrCpy $MUI_TEMP1 "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" 1
+ StrCmp $MUI_TEMP1 ">" mui.startmenu_write_${MUI_STARTMENUPAGE_CURRENT_ID}_done
+
+ StrCmp "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}" "" 0 mui.startmenu_writebegin_${MUI_STARTMENUPAGE_CURRENT_ID}_notempty
+
+ !insertmacro MUI_STARTMENU_GETFOLDER "${MUI_STARTMENUPAGE_CURRENT_ID}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
+
+ mui.startmenu_writebegin_${MUI_STARTMENUPAGE_CURRENT_ID}_notempty:
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_STARTMENU_WRITE_END
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifdef MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY & MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME
+ WriteRegStr "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_${MUI_STARTMENUPAGE_CURRENT_ID}_VARIABLE}"
+ !endif
+
+ mui.startmenu_write_${MUI_STARTMENUPAGE_CURRENT_ID}_done:
+
+ !undef MUI_STARTMENUPAGE_CURRENT_ID
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;PAGES
+
+!macro MUI_PAGE_INIT
+
+ !insertmacro MUI_INTERFACE
+
+ !insertmacro MUI_DEFAULT MUI_PAGE_UNINSTALLER_PREFIX ""
+ !insertmacro MUI_DEFAULT MUI_PAGE_UNINSTALLER_FUNCPREFIX ""
+
+ !insertmacro MUI_UNSET MUI_UNIQUEID
+
+ !define MUI_UNIQUEID ${__LINE__}
+
+!macroend
+
+!macro MUI_UNPAGE_INIT
+
+ !ifndef MUI_UNINSTALLER
+ !define MUI_UNINSTALLER
+ !endif
+
+ !define MUI_PAGE_UNINSTALLER
+
+ !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_PREFIX
+ !insertmacro MUI_UNSET MUI_PAGE_UNINSTALLER_FUNCPREFIX
+
+ !define MUI_PAGE_UNINSTALLER_PREFIX "UN"
+ !define MUI_PAGE_UNINSTALLER_FUNCPREFIX "un."
+
+!macroend
+
+!macro MUI_UNPAGE_END
+
+ !undef MUI_PAGE_UNINSTALLER
+ !undef MUI_PAGE_UNINSTALLER_PREFIX
+ !undef MUI_PAGE_UNINSTALLER_FUNCPREFIX
+
+!macroend
+
+!macro MUI_PAGE_WELCOME
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}WELCOMEPAGE
+
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_WELCOMEPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TITLE)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_WELCOMEPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_WELCOME_INFO_TEXT)"
+
+ !ifndef MUI_VAR_HWND
+ Var MUI_HWND
+ !define MUI_VAR_HWND
+ !endif
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_WELCOMEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.WelcomeLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE
+ !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TITLE_3LINES
+ !insertmacro MUI_UNSET MUI_WELCOMEPAGE_TEXT
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_LICENSE LICENSEDATA
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}LICENSEPAGE
+
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_TEXT_TOP "$(MUI_INNERTEXT_LICENSE_TOP)"
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_BUTTON ""
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_CHECKBOX_TEXT ""
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT ""
+ !insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE ""
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}license
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ LicenseData "${LICENSEDATA}"
+
+ !ifndef MUI_LICENSEPAGE_TEXT_BOTTOM
+ !ifndef MUI_LICENSEPAGE_CHECKBOX & MUI_LICENSEPAGE_RADIOBUTTONS
+ LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM)" "${MUI_LICENSEPAGE_BUTTON}"
+ !else ifdef MUI_LICENSEPAGE_CHECKBOX
+ LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_CHECKBOX)" "${MUI_LICENSEPAGE_BUTTON}"
+ !else
+ LicenseText "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS)" "${MUI_LICENSEPAGE_BUTTON}"
+ !endif
+ !else
+ LicenseText "${MUI_LICENSEPAGE_TEXT_BOTTOM}" "${MUI_LICENSEPAGE_BUTTON}"
+ !endif
+
+ !ifdef MUI_LICENSEPAGE_CHECKBOX
+ LicenseForceSelection checkbox "${MUI_LICENSEPAGE_CHECKBOX_TEXT}"
+ !else ifdef MUI_LICENSEPAGE_RADIOBUTTONS
+ LicenseForceSelection radiobuttons "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT}" "${MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE}"
+ !endif
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_LICENSEPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicensePre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.LicenseLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_TOP
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_TEXT_BOTTOM
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_BUTTON
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_RADIOBUTTONS
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_ACCEPT
+ !insertmacro MUI_UNSET MUI_LICENSEPAGE_CHECKBOX_TEXT_DECLINE
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_COMPONENTS
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}COMPONENTSPAGE
+
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_TOP ""
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_COMPLIST ""
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_INSTTYPE ""
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE)"
+ !insertmacro MUI_DEFAULT MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
+
+ !ifndef MUI_VAR_TEXT
+ Var MUI_TEXT
+ !define MUI_VAR_TEXT
+ !endif
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}components
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ ComponentText "${MUI_COMPONENTSPAGE_TEXT_TOP}" "${MUI_COMPONENTSPAGE_TEXT_INSTTYPE}" "${MUI_COMPONENTSPAGE_TEXT_COMPLIST}"
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_COMPONENTSPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.ComponentsLeave_${MUI_UNIQUEID}
+
+ !undef MUI_COMPONENTSPAGE_TEXT_TOP
+ !undef MUI_COMPONENTSPAGE_TEXT_COMPLIST
+ !undef MUI_COMPONENTSPAGE_TEXT_INSTTYPE
+ !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE
+ !insertmacro MUI_UNSET MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_DIRECTORY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}DIRECTORYPAGE
+
+ !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_TOP ""
+ !insertmacro MUI_DEFAULT MUI_DIRECTORYPAGE_TEXT_DESTINATION ""
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}directory
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ DirText "${MUI_DIRECTORYPAGE_TEXT_TOP}" "${MUI_DIRECTORYPAGE_TEXT_DESTINATION}"
+
+ !ifdef MUI_DIRECTORYPAGE_VARIABLE
+ DirVar "${MUI_DIRECTORYPAGE_VARIABLE}"
+ !endif
+
+ !ifdef MUI_DIRECTORYPAGE_VERIFYONLEAVE
+ DirVerify leave
+ !endif
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_DIRECTORYPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.DirectoryLeave_${MUI_UNIQUEID}
+
+ !undef MUI_DIRECTORYPAGE_TEXT_TOP
+ !undef MUI_DIRECTORYPAGE_TEXT_DESTINATION
+ !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_BGCOLOR
+ !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VARIABLE
+ !insertmacro MUI_UNSET MUI_DIRECTORYPAGE_VERIFYONLEAVE
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_STARTMENU ID VAR
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}STARTMENUPAGE
+
+ !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_DEFAULTFOLDER "$(^Name)"
+ !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_TOP "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_TOP)"
+ !insertmacro MUI_DEFAULT MUI_STARTMENUPAGE_TEXT_CHECKBOX "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INNERTEXT_STARTMENU_CHECKBOX)"
+
+ !define MUI_STARTMENUPAGE_VARIABLE "${VAR}"
+ !define "MUI_STARTMENUPAGE_${ID}_VARIABLE" "${MUI_STARTMENUPAGE_VARIABLE}"
+ !define "MUI_STARTMENUPAGE_${ID}_DEFAULTFOLDER" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT
+ !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_ROOT" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}"
+ !endif
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_KEY
+ !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_KEY" "${MUI_STARTMENUPAGE_REGISTRY_KEY}"
+ !endif
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+ !define "MUI_STARTMENUPAGE_${ID}_REGISTRY_VALUENAME" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+ !endif
+
+ !ifndef MUI_VAR_HWND
+ Var MUI_HWND
+ !define MUI_VAR_HWND
+ !endif
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_STARTMENUPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.StartmenuLeave_${MUI_UNIQUEID}
+
+ !undef MUI_STARTMENUPAGE_VARIABLE
+ !undef MUI_STARTMENUPAGE_TEXT_TOP
+ !undef MUI_STARTMENUPAGE_TEXT_CHECKBOX
+ !undef MUI_STARTMENUPAGE_DEFAULTFOLDER
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_NODISABLE
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_ROOT
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_KEY
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+ !insertmacro MUI_UNSET MUI_STARTMENUPAGE_BGCOLOR
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_INSTFILES
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}INSTFILESPAGE
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}instfiles
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_INSTFILESPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesShow_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.InstFilesLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_TEXT
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_TEXT
+ !insertmacro MUI_UNSET MUI_INSTFILESPAGE_ABORTWARNING_SUBTEXT
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_PAGE_FINISH
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_${MUI_PAGE_UNINSTALLER_PREFIX}FINISHPAGE
+
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TITLE "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TITLE)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_TEXT)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_BUTTON "$(MUI_BUTTONTEXT_FINISH)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT_REBOOT "$(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_FINISH_INFO_REBOOT)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT_REBOOTNOW "$(MUI_TEXT_FINISH_REBOOTNOW)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_TEXT_REBOOTLATER "$(MUI_TEXT_FINISH_REBOOTLATER)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_RUN_TEXT "$(MUI_TEXT_FINISH_RUN)"
+ !insertmacro MUI_DEFAULT_IOCONVERT MUI_FINISHPAGE_SHOWREADME_TEXT "$(MUI_TEXT_FINISH_SHOWREADME)"
+ !insertmacro MUI_DEFAULT MUI_FINISHPAGE_LINK_COLOR "000080"
+
+ !ifndef MUI_VAR_HWND
+ Var MUI_HWND
+ !define MUI_VAR_HWND
+ !endif
+
+ !ifndef MUI_PAGE_UNINSTALLER
+ !ifndef MUI_FINISHPAGE_NOAUTOCLOSE
+ AutoCloseWindow true
+ !endif
+ !endif
+
+ !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
+ !ifndef MUI_VAR_NOABORTWARNING
+ !define MUI_VAR_NOABORTWARNING
+ Var MUI_NOABORTWARNING
+ !endif
+ !endif
+
+ PageEx ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}custom
+
+ PageCallbacks ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ PageExEnd
+
+ !insertmacro MUI_FUNCTION_FINISHPAGE ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishPre_${MUI_UNIQUEID} ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}mui.FinishLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TITLE_3LINES
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_BUTTON
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_CANCEL_ENABLED
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOT
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTNOW
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_TEXT_REBOOTLATER
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_REBOOTLATER_DEFAULT
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_TEXT
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_PARAMETERS
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_NOTCHECKED
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_RUN_FUNCTION
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_TEXT
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_SHOWREADME_FUNCTION
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_LINK
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_LOCATION
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_LINK_COLOR
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_NOREBOOTSUPPORT
+
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_TOP
+ !insertmacro MUI_UNSET MUI_FINISHPAGE_CURFIELD_BOTTOM
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_WELCOME
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+
+ !insertmacro MUI_PAGE_WELCOME
+
+ !insertmacro MUI_UNPAGE_END
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_CONFIRM
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifndef MUI_UNINSTALLER
+ !define MUI_UNINSTALLER
+ !endif
+
+ !insertmacro MUI_PAGE_INIT
+
+ !insertmacro MUI_SET MUI_UNCONFIRMPAGE
+
+ !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_TOP ""
+ !insertmacro MUI_DEFAULT MUI_UNCONFIRMPAGE_TEXT_LOCATION ""
+
+ PageEx un.uninstConfirm
+
+ PageCallbacks un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
+
+ Caption " "
+
+ UninstallText "${MUI_UNCONFIRMPAGE_TEXT_TOP}" "${MUI_UNCONFIRMPAGE_TEXT_LOCATION}"
+
+ PageExEnd
+
+ !insertmacro MUI_UNFUNCTION_CONFIRMPAGE un.mui.ConfirmPre_${MUI_UNIQUEID} un.mui.ConfirmShow_${MUI_UNIQUEID} un.mui.ConfirmLeave_${MUI_UNIQUEID}
+
+ !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_TOP
+ !insertmacro MUI_UNSET MUI_UNCONFIRMPAGE_TEXT_LOCATION
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_LICENSE LICENSEDATA
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+
+ !insertmacro MUI_PAGE_LICENSE "${LICENSEDATA}"
+
+ !insertmacro MUI_UNPAGE_END
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_COMPONENTS
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+
+ !insertmacro MUI_PAGE_COMPONENTS
+
+ !insertmacro MUI_UNPAGE_END
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_DIRECTORY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+
+ !insertmacro MUI_PAGE_DIRECTORY
+
+ !insertmacro MUI_UNPAGE_END
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_INSTFILES
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_END
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNPAGE_FINISH
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_UNPAGE_INIT
+
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_END
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;PAGE FUNCTIONS
+
+!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
+
+ !ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
+ Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
+ !undef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
+ !endif
+
+!macroend
+
+!macro MUI_WELCOMEFINISHPAGE_FUNCTION_CUSTOM
+
+ !ifdef MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT
+ Call "${MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT}"
+ !undef MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT
+ !endif
+
+!macroend
+
+!macro MUI_FUNCTION_WELCOMEPAGE PRE LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_WELCOMEFINISHPAGE_FUNCTION_CUSTOM
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NumFields" "3"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NextButtonText" ""
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "CancelEnabled" ""
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 2" "Text" MUI_WELCOMEPAGE_TITLE
+
+ !ifndef MUI_WELCOMEPAGE_TITLE_3LINES
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "38"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "45"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "48"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "55"
+ !endif
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "185"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 3" "Text" MUI_WELCOMEPAGE_TEXT
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+
+ LockWindow on
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+ LockWindow off
+
+ !insertmacro INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
+ Pop $MUI_HWND
+ SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
+
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1201
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ CreateFont $MUI_TEMP2 "$(^Font)" "12" "700"
+ SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
+
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1202
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ !insertmacro INSTALLOPTIONS_SHOW
+
+ LockWindow on
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+ LockWindow off
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_LICENSEPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_LICENSE_SUBTITLE)
+
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ !insertmacro MUI_INNERDIALOG_TEXT 1040 "${MUI_LICENSEPAGE_TEXT_TOP}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_COMPONENTSPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_COMPONENTS_SUBTITLE)
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ !insertmacro MUI_INNERDIALOG_TEXT 1042 "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE}"
+
+ FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
+ GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1043
+ EnableWindow $MUI_TEMP1 0
+
+ !insertmacro MUI_INNERDIALOG_TEXT 1043 "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
+ StrCpy $MUI_TEXT "${MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_DIRECTORY_SUBTITLE)
+ FunctionEnd
+
+ Function "${SHOW}"
+ !ifdef MUI_DIRECTORYPAGE_BGCOLOR
+ FindWindow $MUI_TEMP1 "#32770" "" $HWNDPARENT
+ GetDlgItem $MUI_TEMP1 $MUI_TEMP1 1019
+ SetCtlColors $MUI_TEMP1 "" "${MUI_DIRECTORYPAGE_BGCOLOR}"
+ !endif
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+ FunctionEnd
+
+ Function "${LEAVE}"
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_STARTMENUPAGE PRE LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+
+ !ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
+
+ StrCmp "${MUI_STARTMENUPAGE_VARIABLE}" "" 0 +4
+
+ ReadRegStr $MUI_TEMP1 "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
+ StrCmp $MUI_TEMP1 "" +2
+ StrCpy "${MUI_STARTMENUPAGE_VARIABLE}" $MUI_TEMP1
+
+ !endif
+
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
+
+ StrCmp $(^RTL) 0 mui.startmenu_nortl
+ !ifndef MUI_STARTMENUPAGE_NODISABLE
+ StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !else
+ StartMenu::Init /NOUNLOAD /rtl /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !endif
+ Goto mui.startmenu_initdone
+ mui.startmenu_nortl:
+ !ifndef MUI_STARTMENUPAGE_NODISABLE
+ StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" /checknoshortcuts "${MUI_STARTMENUPAGE_TEXT_CHECKBOX}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !else
+ StartMenu::Init /NOUNLOAD /noicon /autoadd /text "${MUI_STARTMENUPAGE_TEXT_TOP}" /lastused "${MUI_STARTMENUPAGE_VARIABLE}" "${MUI_STARTMENUPAGE_DEFAULTFOLDER}"
+ !endif
+ mui.startmenu_initdone:
+
+ Pop $MUI_HWND
+
+ !ifdef MUI_STARTMENUPAGE_BGCOLOR
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1002
+ SetCtlColors $MUI_TEMP1 "" "${MUI_STARTMENUPAGE_BGCOLOR}"
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1004
+ SetCtlColors $MUI_TEMP1 "" "${MUI_STARTMENUPAGE_BGCOLOR}"
+ !endif
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ StartMenu::Show
+
+ Pop $MUI_TEMP1
+ StrCmp $MUI_TEMP1 "success" 0 +2
+ Pop "${MUI_STARTMENUPAGE_VARIABLE}"
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_INSTFILESPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER_PREFIX}TEXT_${MUI_PAGE_UNINSTALLER_PREFIX}INSTALLING_SUBTITLE)
+
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ !insertmacro MUI_ENDHEADER
+ !insertmacro MUI_LANGDLL_SAVELANGUAGE
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_FINISHPAGE PRE LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_WELCOMEFINISHPAGE_FUNCTION_CUSTOM
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Settings" "NextButtonText" MUI_FINISHPAGE_BUTTON
+
+ !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "CancelEnabled" "1"
+ !endif
+
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "38"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "45"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 2" "Bottom" "48"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Top" "55"
+ !endif
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 2" "Text" MUI_FINISHPAGE_TITLE
+
+ !ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "85"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "115"
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "95"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "125"
+ !endif
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_LINK
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "185"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "175"
+ !endif
+ !endif
+
+ !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
+
+ IfRebootFlag 0 mui.finish_noreboot_init
+
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "85"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "115"
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "95"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "125"
+ !endif
+ !endif
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 3" "Text" MUI_FINISHPAGE_TEXT_REBOOT
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "RadioButton"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 4" "Text" MUI_FINISHPAGE_TEXT_REBOOTNOW
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "321"
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "90"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "100"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "130"
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "100"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "110"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "130"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "140"
+ !endif
+ !endif
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Type" "RadioButton"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 5" "Text" MUI_FINISHPAGE_TEXT_REBOOTLATER
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Left" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Right" "321"
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "110"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "120"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Top" "110"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "Bottom" "120"
+ !endif
+ !ifdef MUI_FINISHPAGE_REBOOTLATER_DEFAULT
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "1"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
+ !endif
+
+ Goto mui.finish_load
+
+ mui.finish_noreboot_init:
+
+ !endif
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 3" "Text" MUI_FINISHPAGE_TEXT
+
+ !ifdef MUI_FINISHPAGE_RUN
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "CheckBox"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field 4" "Text" MUI_FINISHPAGE_RUN_TEXT
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "90"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "100"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "130"
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "100"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "110"
+ !else
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "130"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "140"
+ !endif
+ !endif
+ !ifndef MUI_FINISHPAGE_RUN_NOTCHECKED
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "1"
+ !endif
+
+ !endif
+
+ !ifdef MUI_FINISHPAGE_SHOWREADME
+
+ !ifdef MUI_FINISHPAGE_CURFIELD_NO
+ !undef MUI_FINISHPAGE_CURFIELD_NO
+ !endif
+
+ !ifndef MUI_FINISHPAGE_RUN
+ !define MUI_FINISHPAGE_CURFIELD_NO 4
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !define MUI_FINISHPAGE_CURFIELD_TOP 90
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 100
+ !else
+ !define MUI_FINISHPAGE_CURFIELD_TOP 120
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 130
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !define MUI_FINISHPAGE_CURFIELD_TOP 100
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 110
+ !else
+ !define MUI_FINISHPAGE_CURFIELD_TOP 130
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 140
+ !endif
+ !endif
+ !else
+ !define MUI_FINISHPAGE_CURFIELD_NO 5
+ !ifndef MUI_FINISHPAGE_TITLE_3LINES
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !define MUI_FINISHPAGE_CURFIELD_TOP 110
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 120
+ !else
+ !define MUI_FINISHPAGE_CURFIELD_TOP 140
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 150
+ !endif
+ !else
+ !ifndef MUI_FINISHPAGE_TEXT_LARGE
+ !define MUI_FINISHPAGE_CURFIELD_TOP 120
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 130
+ !else
+ !define MUI_FINISHPAGE_CURFIELD_TOP 150
+ !define MUI_FINISHPAGE_CURFIELD_BOTTOM 160
+ !endif
+ !endif
+ !endif
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Type" "CheckBox"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Text" MUI_FINISHPAGE_SHOWREADME_TEXT
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Left" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Right" "315"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Top" ${MUI_FINISHPAGE_CURFIELD_TOP}
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Bottom" ${MUI_FINISHPAGE_CURFIELD_BOTTOM}
+ !ifndef MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "State" "1"
+ !endif
+
+ !endif
+
+ !ifdef MUI_FINISHPAGE_LINK
+
+ !ifdef MUI_FINISHPAGE_CURFIELD_NO
+ !undef MUI_FINISHPAGE_CURFIELD_NO
+ !endif
+
+ !ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
+ !define MUI_FINISHPAGE_CURFIELD_NO 6
+ !else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
+ !define MUI_FINISHPAGE_CURFIELD_NO 5
+ !else
+ !define MUI_FINISHPAGE_CURFIELD_NO 4
+ !endif
+
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Type" "Link"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Text" MUI_FINISHPAGE_LINK
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Left" "120"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Right" "315"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Top" "175"
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "Bottom" "185"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT "ioSpecial.ini" "Field ${MUI_FINISHPAGE_CURFIELD_NO}" "State" MUI_FINISHPAGE_LINK_LOCATION
+
+ !endif
+
+ !ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME & MUI_FINISHPAGE_LINK
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "6"
+ !else ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
+ !else ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_LINK
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
+ !else ifdef MUI_FINISHPAGE_SHOWREADME & MUI_FINISHPAGE_LINK
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "5"
+ !else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME | MUI_FINISHPAGE_LINK
+ !insertmacro INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "4"
+ !endif
+
+ !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
+ mui.finish_load:
+ !endif
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+
+ LockWindow on
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+ LockWindow off
+
+ !insertmacro INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
+ Pop $MUI_HWND
+ SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
+
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1201
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ CreateFont $MUI_TEMP2 "$(^Font)" "12" "700"
+ SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
+
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1202
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
+
+ IfRebootFlag 0 mui.finish_noreboot_show
+
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+
+ Goto mui.finish_show
+
+ mui.finish_noreboot_show:
+
+ !endif
+
+ !ifdef MUI_FINISHPAGE_RUN
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+ !endif
+
+ !ifdef MUI_FINISHPAGE_SHOWREADME
+ !ifndef MUI_FINISHPAGE_RUN
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
+ !else
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
+ !endif
+ SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
+ !endif
+
+ !ifdef MUI_FINISHPAGE_LINK
+ !ifdef MUI_FINISHPAGE_RUN & MUI_FINISHPAGE_SHOWREADME
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1205
+ !else ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1204
+ !else
+ GetDlgItem $MUI_TEMP1 $MUI_HWND 1203
+ !endif
+ SetCtlColors $MUI_TEMP1 "${MUI_FINISHPAGE_LINK_COLOR}" "${MUI_BGCOLOR}"
+ !endif
+
+ !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
+ mui.finish_show:
+ !endif
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
+ StrCpy $MUI_NOABORTWARNING "1"
+ !endif
+
+ !insertmacro INSTALLOPTIONS_SHOW
+
+ !ifdef MUI_FINISHPAGE_CANCEL_ENABLED
+ StrCpy $MUI_NOABORTWARNING ""
+ !endif
+
+ LockWindow on
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
+ ShowWindow $MUI_TEMP1 ${SW_NORMAL}
+
+ GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
+ ShowWindow $MUI_TEMP1 ${SW_HIDE}
+ LockWindow off
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
+
+ IfRebootFlag "" mui.finish_noreboot_end
+
+ !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 4" "State"
+
+ StrCmp $MUI_TEMP1 "1" 0 +2
+ Reboot
+
+ Return
+
+ mui.finish_noreboot_end:
+
+ !endif
+
+ !ifdef MUI_FINISHPAGE_RUN
+
+ !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 4" "State"
+
+ StrCmp $MUI_TEMP1 "1" 0 mui.finish_norun
+ !ifndef MUI_FINISHPAGE_RUN_FUNCTION
+ !ifndef MUI_FINISHPAGE_RUN_PARAMETERS
+ StrCpy $MUI_TEMP1 "$\"${MUI_FINISHPAGE_RUN}$\""
+ !else
+ StrCpy $MUI_TEMP1 "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
+ !endif
+ Exec "$MUI_TEMP1"
+ !else
+ Call "${MUI_FINISHPAGE_RUN_FUNCTION}"
+ !endif
+
+ mui.finish_norun:
+
+ !endif
+
+ !ifdef MUI_FINISHPAGE_SHOWREADME
+
+ !ifndef MUI_FINISHPAGE_RUN
+ !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 4" "State"
+ !else
+ !insertmacro INSTALLOPTIONS_READ $MUI_TEMP1 "ioSpecial.ini" "Field 5" "State"
+ !endif
+
+ StrCmp $MUI_TEMP1 "1" 0 mui.finish_noshowreadme
+ !ifndef MUI_FINISHPAGE_SHOWREADME_FUNCTION
+ ExecShell "open" "${MUI_FINISHPAGE_SHOWREADME}"
+ !else
+ Call "${MUI_FINISHPAGE_SHOWREADME_FUNCTION}"
+ !endif
+
+ mui.finish_noshowreadme:
+
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
+
+ Function "${PRE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
+
+ FunctionEnd
+
+ Function "${SHOW}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
+
+ FunctionEnd
+
+ Function "${LEAVE}"
+
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
+
+ FunctionEnd
+
+!macroend
+
+;--------------------------------
+;INSTALL OPTIONS (CUSTOM PAGES)
+
+!macro MUI_INSTALLOPTIONS_EXTRACT FILE
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_EXTRACT "${FILE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_EXTRACT_AS "${FILE}" "${FILENAME}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_DISPLAY FILE
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_DISPLAY "${FILE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_DISPLAY_RETURN "${FILE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_INITDIALOG "${FILE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_SHOW
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_SHOW
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_SHOW_RETURN
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_SHOW_RETURN
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_READ "${VAR}" "${FILE}" "${SECTION}" "${KEY}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "${SECTION}" "${KEY}" "${VALUE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_WRITE_DEFAULTCONVERT FILE SECTION KEY SYMBOL
+
+ ;Converts default strings from language files to InstallOptions format
+ ;Only for use inside MUI
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !ifndef "${SYMBOL}_DEFAULTSET"
+ !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "${SECTION}" "${KEY}" "${${SYMBOL}}"
+ !else
+ Push "${${SYMBOL}}"
+ Call ${MUI_PAGE_UNINSTALLER_FUNCPREFIX}Nsis2Io
+ Pop $MUI_TEMP1
+ !insertmacro INSTALLOPTIONS_WRITE "${FILE}" "${SECTION}" "${KEY}" $MUI_TEMP1
+ !endif
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;RESERVE FILES
+
+!macro MUI_RESERVEFILE_INSTALLOPTIONS
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_RESERVEFILE_LANGDLL
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;LANGUAGES
+
+!macro MUI_LANGUAGE LANGUAGE
+
+ ;Include a language
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_INSERT
+
+ LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nlf"
+ !insertmacro LANGFILE_INCLUDE "${NSISDIR}\Contrib\Language files\${LANGUAGE}.nsh"
+
+ !ifndef MUI_LANGDLL_LANGUAGES
+ !ifdef MUI_LANGDLL_ALLLANGUAGES
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
+ !else
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
+ !endif
+ !else
+ !ifdef MUI_LANGDLL_LANGUAGES_TEMP
+ !undef MUI_LANGDLL_LANGUAGES_TEMP
+ !endif
+ !define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
+ !undef MUI_LANGDLL_LANGUAGES
+
+ !ifdef MUI_LANGDLL_ALLLANGUAGES
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
+ !else
+ !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
+ !endif
+ !endif
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;LANGUAGE SELECTION DIALOG
+
+!macro MUI_LANGDLL_DISPLAY
+
+ !verbose push
+ !verbose ${MUI_VERBOSE}
+
+ !insertmacro MUI_DEFAULT MUI_LANGDLL_WINDOWTITLE "Installer Language"
+ !insertmacro MUI_DEFAULT MUI_LANGDLL_INFO "Please select a language."
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
+ StrCmp $MUI_TEMP1 "" mui.langdll_show
+ StrCpy $LANGUAGE $MUI_TEMP1
+ !ifndef MUI_LANGDLL_ALWAYSSHOW
+ Goto mui.langdll_done
+ !endif
+ mui.langdll_show:
+
+ !endif
+
+ !ifdef NSIS_CONFIG_SILENT_SUPPORT
+ IfSilent mui.langdll_done
+ !endif
+
+ !ifdef MUI_LANGDLL_ALLLANGUAGES
+ LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_LANGUAGES} ""
+ !else
+ LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" AC ${MUI_LANGDLL_LANGUAGES} ""
+ !endif
+
+ Pop $LANGUAGE
+ StrCmp $LANGUAGE "cancel" 0 +2
+ Abort
+
+ !ifdef NSIS_CONFIG_SILENT_SUPPORT
+ mui.langdll_done:
+ !else ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+ mui.langdll_done:
+ !endif
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_LANGDLL_SAVELANGUAGE
+
+ !ifndef MUI_PAGE_UNINSTALLER
+
+ IfAbort mui.langdllsavelanguage_abort
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+ WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
+ !endif
+
+ mui.langdllsavelanguage_abort:
+
+ !endif
+
+!macroend
+
+!macro MUI_UNGETLANGUAGE
+
+ !verbose pop
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
+ StrCmp $MUI_TEMP1 "" 0 mui.ungetlanguage_setlang
+
+ !endif
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ Goto mui.ungetlanguage_done
+
+ mui.ungetlanguage_setlang:
+ StrCpy $LANGUAGE $MUI_TEMP1
+
+ mui.ungetlanguage_done:
+
+ !endif
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;END
+
+!endif
+
+!verbose pop
diff --git a/Contrib/Modern UI/ioSpecial.ini b/Contrib/Modern UI/ioSpecial.ini
index 55dc5a6..c8dfe6e 100755
--- a/Contrib/Modern UI/ioSpecial.ini
+++ b/Contrib/Modern UI/ioSpecial.ini
@@ -1,19 +1,19 @@
-[Settings]
-Rect=1044
-NumFields=3
-[Field 1]
-Type=bitmap
-Left=0
-Right=109
-Top=0
-Bottom=193
-Flags=RESIZETOFIT
-[Field 2]
-Type=label
-Left=120
-Right=315
-Top=10
-[Field 3]
-Type=label
-Left=120
+[Settings]
+Rect=1044
+NumFields=3
+[Field 1]
+Type=bitmap
+Left=0
+Right=109
+Top=0
+Bottom=193
+Flags=RESIZETOFIT
+[Field 2]
+Type=label
+Left=120
+Right=315
+Top=10
+[Field 3]
+Type=label
+Left=120
Right=315 \ No newline at end of file
diff --git a/Contrib/NSIS Menu/SConscript b/Contrib/NSIS Menu/SConscript
index bfba2e7..bf8cfcc 100755
--- a/Contrib/NSIS Menu/SConscript
+++ b/Contrib/NSIS Menu/SConscript
@@ -1,104 +1,104 @@
-target = "NSIS"
-
-files = Split("""
- nsismenu/nsismenu.cpp
- nsismenu/nslinks.cpp
-""")
-
-resources = Split("""
- nsismenu/nsisicon.ico
-""")
-
-rc = 'nsismenu/nsismenu.rc'
-
-libs = Split("""
- advapi32
- comctl32
- gdi32
- shell32
- user32
- wxbase28
- wxmsw28_core
- wxmsw28_html
-""")
-
-html = Split("""
- #Menu/compiler.html
- #Menu/docs.html
- #Menu/index.html
- #Menu/intro.html
- #Menu/notinstalled.html
- #Menu/update.html
- #Menu/websites.html
-""")
-
-images = Split("""
- #Menu/images/clear.gif
- #Menu/images/header.gif
- #Menu/images/line.gif
- #Menu/images/menu.gif
- #Menu/images/menud.gif
- #Menu/images/site.gif
-""")
-
-Import('BuildUtil env')
-
-import os
-from os.path import join
-
-if env['PLATFORM'] != 'win32' and WhereIs('wx-config') or \
- env['PLATFORM'] == 'win32' and os.environ.has_key('WXWIN'):
-
- # build
-
- if env['PLATFORM'] != 'win32':
- rc = libs = []
-
- nsis_menu = BuildUtil(
- target,
- files,
- libs,
- res = rc,
- resources = resources,
- flags = ['$MSVCRT_FLAG', '$EXCEPTION_FLAG'],
- root_util = True,
- cross_platform = True
- )
-
- # manifest
-
- if env.has_key('MSVS_VERSION'):
- if float(env['MSVS_VERSION'].replace('Exp','')) >= 8.0:
- manifest = env.SideEffect('%s.exe.manifest' % target, nsis_menu)
- env.DistributeBin(manifest, alias='install-utils')
-
- # set directories
-
- if nsis_menu[0].env['PLATFORM'] == 'win32':
- wxlib = [join(os.environ['WXWIN'], 'lib', 'vc_libnsis')]
- wxinc = [
- join(os.environ['WXWIN'], 'include'),
- join(os.environ['WXWIN'], 'lib', 'vc_libnsis', 'msw')
- ]
- nsis_menu[0].env.Append(LIBPATH = wxlib)
- nsis_menu[0].env.Append(CPPPATH = wxinc)
- else:
- nsis_menu[0].env.ParseConfig('wx-config --cxxflags --libs')
-
- # install menu files
-
- env.DistributeMenu(html, alias='install-utils')
- env.DistributeMenu(images, path='images', alias='install-utils')
-
-else:
-
- # no wxWidgets
- def err(target, source, env):
- if env['PLATFORM'] == 'win32':
- print '*** error: WXWIN must be set to build NSIS Menu!'
- else:
- print '*** error: wx-config must be in the PATH to build NSIS Menu!'
- return 1
-
- cmd = env.Command(target, files, Action(err, ''))
- env.Alias('NSIS Menu', cmd)
+target = "NSIS"
+
+files = Split("""
+ nsismenu/nsismenu.cpp
+ nsismenu/nslinks.cpp
+""")
+
+resources = Split("""
+ nsismenu/nsisicon.ico
+""")
+
+rc = 'nsismenu/nsismenu.rc'
+
+libs = Split("""
+ advapi32
+ comctl32
+ gdi32
+ shell32
+ user32
+ wxbase28
+ wxmsw28_core
+ wxmsw28_html
+""")
+
+html = Split("""
+ #Menu/compiler.html
+ #Menu/docs.html
+ #Menu/index.html
+ #Menu/intro.html
+ #Menu/notinstalled.html
+ #Menu/update.html
+ #Menu/websites.html
+""")
+
+images = Split("""
+ #Menu/images/clear.gif
+ #Menu/images/header.gif
+ #Menu/images/line.gif
+ #Menu/images/menu.gif
+ #Menu/images/menud.gif
+ #Menu/images/site.gif
+""")
+
+Import('BuildUtil env')
+
+import os
+from os.path import join
+
+if env['PLATFORM'] != 'win32' and WhereIs('wx-config') or \
+ env['PLATFORM'] == 'win32' and os.environ.has_key('WXWIN'):
+
+ # build
+
+ if env['PLATFORM'] != 'win32':
+ rc = libs = []
+
+ nsis_menu = BuildUtil(
+ target,
+ files,
+ libs,
+ res = rc,
+ resources = resources,
+ flags = ['$MSVCRT_FLAG', '$EXCEPTION_FLAG'],
+ root_util = True,
+ cross_platform = True
+ )
+
+ # manifest
+
+ if env.has_key('MSVS_VERSION'):
+ if float(env['MSVS_VERSION'].replace('Exp','')) >= 8.0:
+ manifest = env.SideEffect('%s.exe.manifest' % target, nsis_menu)
+ env.DistributeBin(manifest, alias='install-utils')
+
+ # set directories
+
+ if nsis_menu[0].env['PLATFORM'] == 'win32':
+ wxlib = [join(os.environ['WXWIN'], 'lib', 'vc_libnsis')]
+ wxinc = [
+ join(os.environ['WXWIN'], 'include'),
+ join(os.environ['WXWIN'], 'lib', 'vc_libnsis', 'msw')
+ ]
+ nsis_menu[0].env.Append(LIBPATH = wxlib)
+ nsis_menu[0].env.Append(CPPPATH = wxinc)
+ else:
+ nsis_menu[0].env.ParseConfig('wx-config --cxxflags --libs')
+
+ # install menu files
+
+ env.DistributeMenu(html, alias='install-utils')
+ env.DistributeMenu(images, path='images', alias='install-utils')
+
+else:
+
+ # no wxWidgets
+ def err(target, source, env):
+ if env['PLATFORM'] == 'win32':
+ print '*** error: WXWIN must be set to build NSIS Menu!'
+ else:
+ print '*** error: wx-config must be in the PATH to build NSIS Menu!'
+ return 1
+
+ cmd = env.Command(target, files, Action(err, ''))
+ env.Alias('NSIS Menu', cmd)
diff --git a/Contrib/NSIS Menu/nsismenu/nsismenu.cpp b/Contrib/NSIS Menu/nsismenu/nsismenu.cpp
index 15fff7f..0e97d43 100755
--- a/Contrib/NSIS Menu/nsismenu/nsismenu.cpp
+++ b/Contrib/NSIS Menu/nsismenu/nsismenu.cpp
@@ -1,175 +1,175 @@
-/////////////////////////////////////////////////////////////////////////////
-// NSIS MENU
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include <wx/wxprec.h>
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-// for all others, include the necessary headers (this file is usually all you
-// need because it includes almost all "standard" wxWindows headers
-#ifndef WX_PRECOMP
- #include <wx/wx.h>
-#endif
-
-#include <wx/event.h>
-#include <wx/filefn.h>
-#include <wx/image.h>
-#include <wx/html/htmlwin.h>
-#include <wx/html/htmlproc.h>
-#include <wx/stdpaths.h>
-#include <wx/utils.h>
-
-// ----------------------------------------------------------------------------
-// private classes
-// ----------------------------------------------------------------------------
-
-// Define a new application type, each program should derive a class from wxApp
-class MyApp : public wxApp
-{
-public:
- // override base class virtuals
- // ----------------------------
-
- // this one is called on application startup and is a good place for the app
- // initialization (doing it here and not in the ctor allows to have an error
- // return: if OnInit() returns false, the application terminates)
- virtual bool OnInit();
-};
-
-// Define a new frame type: this is going to be our main frame
-class MyFrame : public wxFrame
-{
-public:
- // ctor(s)
- MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
- // event handler(s)
- void OnLink(wxHtmlLinkEvent& event);
- void OnClose(wxCloseEvent& event);
-
-private:
- wxHtmlWindow *m_Html;
-
- // any class wishing to process wxWindows events must use this macro
- DECLARE_EVENT_TABLE()
-};
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// IDs for the controls and the menu commands
- enum
- {
- // controls start here (the numbers are, of course, arbitrary)
- HtmlControl = 1000
- };
-
-// ----------------------------------------------------------------------------
-// event tables and other macros for wxWindows
-// ----------------------------------------------------------------------------
-
-// the event tables connect the wxWindows events with the functions (event
-// handlers) which process them. It can be also done at run-time, but for the
-// simple menu events like this the static method is much simpler.
- BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_HTML_LINK_CLICKED(HtmlControl, OnLink)
- END_EVENT_TABLE()
-
- // Create a new application object: this macro will allow wxWindows to create
- // the application object during program execution (it's better than using a
- // static object for many reasons) and also declares the accessor function
- // wxGetApp() which will return the reference of the right type (i.e. MyApp and
- // not wxApp)
- IMPLEMENT_APP(MyApp)
-
- // ============================================================================
- // implementation
- // ============================================================================
-
- // ----------------------------------------------------------------------------
- // the application class
- // ----------------------------------------------------------------------------
- // `Main program' equivalent: the program execution "starts" here
- bool MyApp::OnInit()
- {
- wxInitAllImageHandlers();
-
- // Create the main application window
- MyFrame *frame = new MyFrame(_("NSIS Menu"),
- wxPoint(50, 50), wxSize(600 + wxSystemSettings::GetMetric(wxSYS_FRAMESIZE_X), 365 + wxSystemSettings::GetMetric(wxSYS_FRAMESIZE_X)));
-
- // Show it and tell the application that it's our main window
-
- frame->Show(TRUE);
- SetTopWindow(frame);
-
- // success: wxApp::OnRun() will be called which will enter the main message
- // loop and the application will run. If we returned FALSE here, the
- // application would exit immediately.
- return TRUE;
- }
-
-// ----------------------------------------------------------------------------
-// main frame
-// ----------------------------------------------------------------------------
-
-
-// frame constructor
- MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
- : wxFrame((wxFrame *)NULL, -1, title, pos, size, wxCLOSE_BOX | wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION,
- wxT("nsis_menu"))
- {
- m_Html = new wxHtmlWindow(this, HtmlControl);
- m_Html->SetRelatedFrame(this, _("NSIS Menu"));
- m_Html->SetBorders(0);
- m_Html->EnableScrolling(false, false);
- m_Html->SetSize(600, 365);
-
- // Set font size
- wxWindow UnitConvert;
- wxSize DialogSize(1000, 1000);
- DialogSize = UnitConvert.ConvertDialogToPixels(DialogSize);
- int fonts[7] = {0, 0, 14000 / (DialogSize.GetWidth()), 19000 / (DialogSize.GetWidth()), 0, 0, 0};
- m_Html->SetFonts(wxString(), wxString(), fonts);
-
- m_Html->LoadPage(wxT("Menu/index.html"));
-
- this->Centre(wxBOTH);
- this->SetIcon(wxICON(nsisicon));
- }
-
-// event handler
-
-void MyFrame::OnLink(wxHtmlLinkEvent& event)
-{
- const wxMouseEvent *e = event.GetLinkInfo().GetEvent();
- if (e == NULL || e->LeftUp())
- {
- const wxString href = event.GetLinkInfo().GetHref();
- if (href.Left(3).IsSameAs((const wxChar*)"EX:", false))
- {
- wxString url = href.Mid(3);
- if (url.Left(7).IsSameAs((const wxChar*)"http://", false) || url.Left(6).IsSameAs((const wxChar*)"irc://", false))
- {
- ::wxLaunchDefaultBrowser(url);
- }
- else
- {
- wxString exePath = wxStandardPaths::Get().GetExecutablePath();
- wxString path = ::wxPathOnly(exePath);
- path.Append(wxFileName::GetPathSeparators()[0]);
- path.Append(url);
- ::wxLaunchDefaultBrowser(path);
- }
- }
- else
- {
- event.Skip();
- }
- }
-}
-
+/////////////////////////////////////////////////////////////////////////////
+// NSIS MENU
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include <wx/wxprec.h>
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+// for all others, include the necessary headers (this file is usually all you
+// need because it includes almost all "standard" wxWindows headers
+#ifndef WX_PRECOMP
+ #include <wx/wx.h>
+#endif
+
+#include <wx/event.h>
+#include <wx/filefn.h>
+#include <wx/image.h>
+#include <wx/html/htmlwin.h>
+#include <wx/html/htmlproc.h>
+#include <wx/stdpaths.h>
+#include <wx/utils.h>
+
+// ----------------------------------------------------------------------------
+// private classes
+// ----------------------------------------------------------------------------
+
+// Define a new application type, each program should derive a class from wxApp
+class MyApp : public wxApp
+{
+public:
+ // override base class virtuals
+ // ----------------------------
+
+ // this one is called on application startup and is a good place for the app
+ // initialization (doing it here and not in the ctor allows to have an error
+ // return: if OnInit() returns false, the application terminates)
+ virtual bool OnInit();
+};
+
+// Define a new frame type: this is going to be our main frame
+class MyFrame : public wxFrame
+{
+public:
+ // ctor(s)
+ MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
+ // event handler(s)
+ void OnLink(wxHtmlLinkEvent& event);
+ void OnClose(wxCloseEvent& event);
+
+private:
+ wxHtmlWindow *m_Html;
+
+ // any class wishing to process wxWindows events must use this macro
+ DECLARE_EVENT_TABLE()
+};
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// IDs for the controls and the menu commands
+ enum
+ {
+ // controls start here (the numbers are, of course, arbitrary)
+ HtmlControl = 1000
+ };
+
+// ----------------------------------------------------------------------------
+// event tables and other macros for wxWindows
+// ----------------------------------------------------------------------------
+
+// the event tables connect the wxWindows events with the functions (event
+// handlers) which process them. It can be also done at run-time, but for the
+// simple menu events like this the static method is much simpler.
+ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_HTML_LINK_CLICKED(HtmlControl, OnLink)
+ END_EVENT_TABLE()
+
+ // Create a new application object: this macro will allow wxWindows to create
+ // the application object during program execution (it's better than using a
+ // static object for many reasons) and also declares the accessor function
+ // wxGetApp() which will return the reference of the right type (i.e. MyApp and
+ // not wxApp)
+ IMPLEMENT_APP(MyApp)
+
+ // ============================================================================
+ // implementation
+ // ============================================================================
+
+ // ----------------------------------------------------------------------------
+ // the application class
+ // ----------------------------------------------------------------------------
+ // `Main program' equivalent: the program execution "starts" here
+ bool MyApp::OnInit()
+ {
+ wxInitAllImageHandlers();
+
+ // Create the main application window
+ MyFrame *frame = new MyFrame(_("NSIS Menu"),
+ wxPoint(50, 50), wxSize(600 + wxSystemSettings::GetMetric(wxSYS_FRAMESIZE_X), 365 + wxSystemSettings::GetMetric(wxSYS_FRAMESIZE_X)));
+
+ // Show it and tell the application that it's our main window
+
+ frame->Show(TRUE);
+ SetTopWindow(frame);
+
+ // success: wxApp::OnRun() will be called which will enter the main message
+ // loop and the application will run. If we returned FALSE here, the
+ // application would exit immediately.
+ return TRUE;
+ }
+
+// ----------------------------------------------------------------------------
+// main frame
+// ----------------------------------------------------------------------------
+
+
+// frame constructor
+ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
+ : wxFrame((wxFrame *)NULL, -1, title, pos, size, wxCLOSE_BOX | wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION,
+ wxT("nsis_menu"))
+ {
+ m_Html = new wxHtmlWindow(this, HtmlControl);
+ m_Html->SetRelatedFrame(this, _("NSIS Menu"));
+ m_Html->SetBorders(0);
+ m_Html->EnableScrolling(false, false);
+ m_Html->SetSize(600, 365);
+
+ // Set font size
+ wxWindow UnitConvert;
+ wxSize DialogSize(1000, 1000);
+ DialogSize = UnitConvert.ConvertDialogToPixels(DialogSize);
+ int fonts[7] = {0, 0, 14000 / (DialogSize.GetWidth()), 19000 / (DialogSize.GetWidth()), 0, 0, 0};
+ m_Html->SetFonts(wxString(), wxString(), fonts);
+
+ m_Html->LoadPage(wxT("Menu/index.html"));
+
+ this->Centre(wxBOTH);
+ this->SetIcon(wxICON(nsisicon));
+ }
+
+// event handler
+
+void MyFrame::OnLink(wxHtmlLinkEvent& event)
+{
+ const wxMouseEvent *e = event.GetLinkInfo().GetEvent();
+ if (e == NULL || e->LeftUp())
+ {
+ const wxString href = event.GetLinkInfo().GetHref();
+ if (href.Left(3).IsSameAs((const wxChar*)"EX:", false))
+ {
+ wxString url = href.Mid(3);
+ if (url.Left(7).IsSameAs((const wxChar*)"http://", false) || url.Left(6).IsSameAs((const wxChar*)"irc://", false))
+ {
+ ::wxLaunchDefaultBrowser(url);
+ }
+ else
+ {
+ wxString exePath = wxStandardPaths::Get().GetExecutablePath();
+ wxString path = ::wxPathOnly(exePath);
+ path.Append(wxFileName::GetPathSeparators()[0]);
+ path.Append(url);
+ ::wxLaunchDefaultBrowser(path);
+ }
+ }
+ else
+ {
+ event.Skip();
+ }
+ }
+}
+
diff --git a/Contrib/NSIS Menu/nsismenu/nsismenu.rc b/Contrib/NSIS Menu/nsismenu/nsismenu.rc
index 2471379..84931ff 100755
--- a/Contrib/NSIS Menu/nsismenu/nsismenu.rc
+++ b/Contrib/NSIS Menu/nsismenu/nsismenu.rc
@@ -1,2 +1,2 @@
-nsisicon ICON "nsisicon.ico"
+nsisicon ICON "nsisicon.ico"
WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur" \ No newline at end of file
diff --git a/Contrib/NSIS Menu/nsismenu/nslinks.cpp b/Contrib/NSIS Menu/nsismenu/nslinks.cpp
index 7382820..8770667 100755
--- a/Contrib/NSIS Menu/nsismenu/nslinks.cpp
+++ b/Contrib/NSIS Menu/nsismenu/nslinks.cpp
@@ -1,109 +1,109 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: src/html/m_links.cpp
-// Purpose: wxHtml module for links & anchors
-// Author: Vaclav Slavik
-// RCS-ID: $Id: nslinks.cpp,v 1.2 2007/03/08 01:47:14 pabs3 Exp $
-// Copyright: (c) 1999 Vaclav Slavik
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#if wxUSE_HTML && wxUSE_STREAMS
-
-#ifndef WXPRECOMP
-#endif
-
-#include "wx/html/forcelnk.h"
-#include "wx/html/m_templ.h"
-
-#include <wx/filefn.h>
-#include <wx/stdpaths.h>
-
-FORCE_LINK_ME(nslinks)
-
-class wxHtmlAnchorCell : public wxHtmlCell
-{
-private:
- wxString m_AnchorName;
-
-public:
- wxHtmlAnchorCell(const wxString& name) : wxHtmlCell()
- { m_AnchorName = name; }
- void Draw(wxDC& WXUNUSED(dc),
- int WXUNUSED(x), int WXUNUSED(y),
- int WXUNUSED(view_y1), int WXUNUSED(view_y2),
- wxHtmlRenderingInfo& WXUNUSED(info)) {}
-
- DECLARE_NO_COPY_CLASS(wxHtmlAnchorCell)
-};
-
-
-
-TAG_HANDLER_BEGIN(A, "A")
- TAG_HANDLER_CONSTR(A) { }
-
- TAG_HANDLER_PROC(tag)
- {
- if (tag.HasParam( wxT("HREF") ))
- {
- wxHtmlLinkInfo oldlnk = m_WParser->GetLink();
- wxColour oldclr = m_WParser->GetActualColor();
- wxString name(tag.GetParam( wxT("HREF") )), target;
-
- if (tag.HasParam( wxT("TARGET") )) target = tag.GetParam( wxT("TARGET") );
-
- wxColour colour = m_WParser->GetLinkColor();
- wxHtmlLinkInfo linkInfo(name, target);
-
- if (name.Left(3).IsSameAs((const wxChar*)"EX:", false))
- {
- wxString url = name.Mid(3);
- if (!url.Left(7).IsSameAs((const wxChar*)"http://", false) && !url.Left(6).IsSameAs((const wxChar*)"irc://", false))
- {
- wxString exePath = wxStandardPaths::Get().GetExecutablePath();
- wxString path = ::wxPathOnly(exePath);
- path.Append(wxFileName::GetPathSeparators()[0]);
- path.Append(url);
-
- if (!::wxFileExists(path) && !::wxDirExists(path))
- {
- colour = wxColour(0x80, 0x80, 0x80);
- linkInfo = wxHtmlLinkInfo("notinstalled.html", target);
- }
- }
- }
-
- m_WParser->SetActualColor(colour);
- m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(colour));
- m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
- m_WParser->SetLink(linkInfo);
-
- ParseInner(tag);
-
- m_WParser->SetLink(oldlnk);
- m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
- m_WParser->SetActualColor(oldclr);
- m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
-
- return true;
- }
- else return false;
- }
-
-TAG_HANDLER_END(A)
-
-
-
-TAGS_MODULE_BEGIN(CustomLinks)
-
- TAGS_MODULE_ADD(A)
-
-TAGS_MODULE_END(CustomLinks)
-
-
-#endif
+/////////////////////////////////////////////////////////////////////////////
+// Name: src/html/m_links.cpp
+// Purpose: wxHtml module for links & anchors
+// Author: Vaclav Slavik
+// RCS-ID: $Id: nslinks.cpp,v 1.1 2007/02/24 18:57:09 kichik Exp $
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#if wxUSE_HTML && wxUSE_STREAMS
+
+#ifndef WXPRECOMP
+#endif
+
+#include "wx/html/forcelnk.h"
+#include "wx/html/m_templ.h"
+
+#include <wx/filefn.h>
+#include <wx/stdpaths.h>
+
+FORCE_LINK_ME(nslinks)
+
+class wxHtmlAnchorCell : public wxHtmlCell
+{
+private:
+ wxString m_AnchorName;
+
+public:
+ wxHtmlAnchorCell(const wxString& name) : wxHtmlCell()
+ { m_AnchorName = name; }
+ void Draw(wxDC& WXUNUSED(dc),
+ int WXUNUSED(x), int WXUNUSED(y),
+ int WXUNUSED(view_y1), int WXUNUSED(view_y2),
+ wxHtmlRenderingInfo& WXUNUSED(info)) {}
+
+ DECLARE_NO_COPY_CLASS(wxHtmlAnchorCell)
+};
+
+
+
+TAG_HANDLER_BEGIN(A, "A")
+ TAG_HANDLER_CONSTR(A) { }
+
+ TAG_HANDLER_PROC(tag)
+ {
+ if (tag.HasParam( wxT("HREF") ))
+ {
+ wxHtmlLinkInfo oldlnk = m_WParser->GetLink();
+ wxColour oldclr = m_WParser->GetActualColor();
+ wxString name(tag.GetParam( wxT("HREF") )), target;
+
+ if (tag.HasParam( wxT("TARGET") )) target = tag.GetParam( wxT("TARGET") );
+
+ wxColour colour = m_WParser->GetLinkColor();
+ wxHtmlLinkInfo linkInfo(name, target);
+
+ if (name.Left(3).IsSameAs((const wxChar*)"EX:", false))
+ {
+ wxString url = name.Mid(3);
+ if (!url.Left(7).IsSameAs((const wxChar*)"http://", false) && !url.Left(6).IsSameAs((const wxChar*)"irc://", false))
+ {
+ wxString exePath = wxStandardPaths::Get().GetExecutablePath();
+ wxString path = ::wxPathOnly(exePath);
+ path.Append(wxFileName::GetPathSeparators()[0]);
+ path.Append(url);
+
+ if (!::wxFileExists(path) && !::wxDirExists(path))
+ {
+ colour = wxColour(0x80, 0x80, 0x80);
+ linkInfo = wxHtmlLinkInfo("notinstalled.html", target);
+ }
+ }
+ }
+
+ m_WParser->SetActualColor(colour);
+ m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(colour));
+ m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
+ m_WParser->SetLink(linkInfo);
+
+ ParseInner(tag);
+
+ m_WParser->SetLink(oldlnk);
+ m_WParser->GetContainer()->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
+ m_WParser->SetActualColor(oldclr);
+ m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(oldclr));
+
+ return true;
+ }
+ else return false;
+ }
+
+TAG_HANDLER_END(A)
+
+
+
+TAGS_MODULE_BEGIN(CustomLinks)
+
+ TAGS_MODULE_ADD(A)
+
+TAGS_MODULE_END(CustomLinks)
+
+
+#endif
diff --git a/Contrib/NSIS Menu/nsismenu/resource.h b/Contrib/NSIS Menu/nsismenu/resource.h
index 8731294..3d5cb9c 100755
--- a/Contrib/NSIS Menu/nsismenu/resource.h
+++ b/Contrib/NSIS Menu/nsismenu/resource.h
@@ -1,15 +1,15 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by test.rc
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 104
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by test.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 104
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/NSIS Menu/wx/build.txt b/Contrib/NSIS Menu/wx/build.txt
index 1cd48b4..c77a0ef 100755
--- a/Contrib/NSIS Menu/wx/build.txt
+++ b/Contrib/NSIS Menu/wx/build.txt
@@ -1,4 +1,4 @@
-1. Install wxWidgets 2.8
-2. Set WXWIN environment variable
-3. Run wxbuild.bat
-4. Build NSIS happily
+1. Install wxWidgets 2.8
+2. Set WXWIN environment variable
+3. Run wxbuild.bat
+4. Build NSIS happily
diff --git a/Contrib/NSIS Menu/wx/setup.h b/Contrib/NSIS Menu/wx/setup.h
index dee9540..aa7f14d 100755
--- a/Contrib/NSIS Menu/wx/setup.h
+++ b/Contrib/NSIS Menu/wx/setup.h
@@ -1,1348 +1,1348 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/msw/setup.h
-// Purpose: Configuration for the library
-// Author: Julian Smart
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: setup.h,v 1.1 2007/02/24 18:57:09 kichik Exp $
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_SETUP_H_
-#define _WX_SETUP_H_
-
-/* --- start common options --- */
-// ----------------------------------------------------------------------------
-// global settings
-// ----------------------------------------------------------------------------
-
-// define this to 0 when building wxBase library - this can also be done from
-// makefile/project file overriding the value here
-#ifndef wxUSE_GUI
- #define wxUSE_GUI 1
-#endif // wxUSE_GUI
-
-// ----------------------------------------------------------------------------
-// compatibility settings
-// ----------------------------------------------------------------------------
-
-// This setting determines the compatibility with 2.4 API: set it to 1 to
-// enable it but please consider updating your code instead.
-//
-// Default is 0
-//
-// Recommended setting: 0 (please update your code)
-#define WXWIN_COMPATIBILITY_2_4 0
-
-// This setting determines the compatibility with 2.6 API: set it to 0 to
-// flag all cases of using deprecated functions.
-//
-// Default is 1 but please try building your code with 0 as the default will
-// change to 0 in the next version and the deprecated functions will disappear
-// in the version after it completely.
-//
-// Recommended setting: 0 (please update your code)
-#define WXWIN_COMPATIBILITY_2_6 0
-
-// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when
-// default system font is used for wxWindow::GetCharWidth/Height() instead of
-// the current font.
-//
-// Default is 0
-//
-// Recommended setting: 0
-#define wxDIALOG_UNIT_COMPATIBILITY 0
-
-// ----------------------------------------------------------------------------
-// debugging settings
-// ----------------------------------------------------------------------------
-
-// Generic comment about debugging settings: they are very useful if you don't
-// use any other memory leak detection tools such as Purify/BoundsChecker, but
-// are probably redundant otherwise. Also, Visual C++ CRT has the same features
-// as wxWidgets memory debugging subsystem built in since version 5.0 and you
-// may prefer to use it instead of built in memory debugging code because it is
-// faster and more fool proof.
-//
-// Using VC++ CRT memory debugging is enabled by default in debug mode
-// (__WXDEBUG__) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
-// and if __NO_VC_CRTDBG__ is not defined.
-
-// If 1, enables wxDebugContext, for writing error messages to file, etc. If
-// __WXDEBUG__ is not defined, will still use the normal memory operators.
-//
-// Default is 0
-//
-// Recommended setting: 0
-#define wxUSE_DEBUG_CONTEXT 0
-
-// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
-// __WXDEBUG__ is also defined.
-//
-// WARNING: this code may not work with all architectures, especially if
-// alignment is an issue. This switch is currently ignored for mingw / cygwin
-//
-// Default is 0
-//
-// Recommended setting: 1 if you are not using a memory debugging tool, else 0
-#define wxUSE_MEMORY_TRACING 0
-
-// In debug mode, cause new and delete to be redefined globally.
-// If this causes problems (e.g. link errors which is a common problem
-// especially if you use another library which also redefines the global new
-// and delete), set this to 0.
-// This switch is currently ignored for mingw / cygwin
-//
-// Default is 0
-//
-// Recommended setting: 0
-#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
-
-// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
-// this causes problems (e.g. link errors), set this to 0. You may need to set
-// this to 0 if using templates (at least for VC++). This switch is currently
-// ignored for mingw / cygwin / CodeWarrior
-//
-// Default is 0
-//
-// Recommended setting: 0
-#define wxUSE_DEBUG_NEW_ALWAYS 0
-
-// wxHandleFatalExceptions() may be used to catch the program faults at run
-// time and, instead of terminating the program with a usual GPF message box,
-// call the user-defined wxApp::OnFatalException() function. If you set
-// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work.
-//
-// This setting is for Win32 only and can only be enabled if your compiler
-// supports Win32 structured exception handling (currently only VC++ does)
-//
-// Default is 1
-//
-// Recommended setting: 1 if your compiler supports it.
-#define wxUSE_ON_FATAL_EXCEPTION 0
-
-// Set this to 1 to be able to generate a human-readable (unlike
-// machine-readable minidump created by wxCrashReport::Generate()) stack back
-// trace when your program crashes using wxStackWalker
-//
-// Default is 1 if supported by the compiler.
-//
-// Recommended setting: 1, set to 0 if your programs never crash
-#define wxUSE_STACKWALKER 0
-
-// Set this to 1 to compile in wxDebugReport class which allows you to create
-// and optionally upload to your web site a debug report consisting of back
-// trace of the crash (if wxUSE_STACKWALKER == 1) and other information.
-//
-// Default is 1 if supported by the compiler.
-//
-// Recommended setting: 1, it is compiled into a separate library so there
-// is no overhead if you don't use it
-#define wxUSE_DEBUGREPORT 0
-
-// ----------------------------------------------------------------------------
-// Unicode support
-// ----------------------------------------------------------------------------
-
-// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
-// defined as wchar_t, wxString will use Unicode internally. If you set this
-// to 1, you must use wxT() macro for all literal strings in the program.
-//
-// Unicode is currently only fully supported under Windows NT/2000/XP
-// (Windows 9x doesn't support it and the programs compiled in Unicode mode
-// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
-//
-// Default is 0
-//
-// Recommended setting: 0 (unless you only plan to use Windows NT/2000/XP)
-#ifndef wxUSE_UNICODE
- #define wxUSE_UNICODE 0
-#endif
-
-// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
-// compiling the program in Unicode mode. More precisely, it will be possible
-// to construct wxString from a wide (Unicode) string and convert any wxString
-// to Unicode.
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_WCHAR_T 1
-
-// ----------------------------------------------------------------------------
-// global features
-// ----------------------------------------------------------------------------
-
-// Compile library in exception-safe mode? If set to 1, the library will try to
-// behave correctly in presence of exceptions (even though it still will not
-// use the exceptions itself) and notify the user code about any unhandled
-// exceptions. If set to 0, propagation of the exceptions through the library
-// code will lead to undefined behaviour -- but the code itself will be
-// slightly smaller and faster.
-//
-// Note that like wxUSE_THREADS this option is automatically set to 0 if
-// wxNO_EXCEPTIONS is defined.
-//
-// Default is 1
-//
-// Recommended setting: depends on whether you intend to use C++ exceptions
-// in your own code (1 if you do, 0 if you don't)
-#define wxUSE_EXCEPTIONS 0
-
-// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
-//
-// Default is 0
-//
-// Recommended setting: 0 (this is still work in progress...)
-#define wxUSE_EXTENDED_RTTI 0
-
-// Set wxUSE_STL to 1 to derive wxList(Foo) and wxArray(Foo) from
-// std::list<Foo*> and std::vector<Foo*>, with a compatibility interface,
-// and for wxHashMap to be implemented with templates.
-//
-// Default is 0
-//
-// Recommended setting: YMMV
-#define wxUSE_STL 0
-
-// Support for message/error logging. This includes wxLogXXX() functions and
-// wxLog and derived classes. Don't set this to 0 unless you really know what
-// you are doing.
-//
-// Default is 1
-//
-// Recommended setting: 1 (always)
-#define wxUSE_LOG 0
-
-// Recommended setting: 1
-#define wxUSE_LOGWINDOW 0
-
-// Recommended setting: 1
-#define wxUSE_LOGGUI 0
-
-// Recommended setting: 1
-#define wxUSE_LOG_DIALOG 0
-
-// Support for command line parsing using wxCmdLineParser class.
-//
-// Default is 1
-//
-// Recommended setting: 1 (can be set to 0 if you don't use the cmd line)
-#define wxUSE_CMDLINE_PARSER 0
-
-// Support for multithreaded applications: if 1, compile in thread classes
-// (thread.h) and make the library a bit more thread safe. Although thread
-// support is quite stable by now, you may still consider recompiling the
-// library without it if you have no use for it - this will result in a
-// somewhat smaller and faster operation.
-//
-// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset
-// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in
-// build/msw/config.* file this value will have no effect.
-//
-// Default is 1
-//
-// Recommended setting: 0 unless you do plan to develop MT applications
-#define wxUSE_THREADS 0
-
-// If enabled, compiles wxWidgets streams classes
-//
-// wx stream classes are used for image IO, process IO redirection, network
-// protocols implementation and much more and so disabling this results in a
-// lot of other functionality being lost.
-//
-// Default is 1
-//
-// Recommended setting: 1 as setting it to 0 disables many other things
-#define wxUSE_STREAMS 1
-
-// Use standard C++ streams if 1 instead of wx streams in some places. If
-// disabled (default), wx streams are used everywhere and wxWidgets doesn't
-// depend on the standard streams library.
-//
-// Notice that enabling this does not replace wx streams with std streams
-// everywhere, in a lot of places wx streams are used no matter what.
-//
-// Default is 0
-//
-// Recommended setting: 1 if you use the standard streams anyhow and so
-// dependency on the standard streams library is not a
-// problem
-#define wxUSE_STD_IOSTREAM 0
-
-// Enable conversion to standard C++ string if 1.
-//
-// Default is 1 for most compilers.
-//
-// Currently the Digital Mars and Watcom compilers come without standard C++
-// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
-// them (e.g. from STLPort).
-//
-// VC++ 5.0 does include standard C++ library header, however they produce
-// many warnings that can't be turned off when compiled at warning level 4.
-#if defined(__DMC__) || defined(__WATCOMC__) \
- || (defined(_MSC_VER) && _MSC_VER < 1200)
- #define wxUSE_STD_STRING 0
-#else
- #define wxUSE_STD_STRING 1
-#endif
-
-// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf.
-// Note that if the system's implementation does not support positional
-// parameters, setting this to 1 forces the use of the wxWidgets implementation
-// of wxVsnprintf. The standard vsnprintf() supports positional parameters on
-// many Unix systems but usually doesn't under Windows.
-//
-// Positional parameters are very useful when translating a program since using
-// them in formatting strings allow translators to correctly reorder the
-// translated sentences.
-//
-// Default is 1
-//
-// Recommended setting: 1 if you want to support multiple languages
-#define wxUSE_PRINTF_POS_PARAMS 0
-
-// ----------------------------------------------------------------------------
-// non GUI features selection
-// ----------------------------------------------------------------------------
-
-// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit
-// integer which is implemented in terms of native 64 bit integers if any or
-// uses emulation otherwise.
-//
-// This class is required by wxDateTime and so you should enable it if you want
-// to use wxDateTime. For most modern platforms, it will use the native 64 bit
-// integers in which case (almost) all of its functions are inline and it
-// almost does not take any space, so there should be no reason to switch it
-// off.
-//
-// Recommended setting: 1
-#define wxUSE_LONGLONG 1
-
-// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level
-// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions.
-//
-// Default is 1
-//
-// Recommended setting: 1 (wxFile is highly recommended as it is required by
-// i18n code, wxFileConfig and others)
-#define wxUSE_FILE 1
-#define wxUSE_FFILE 0
-
-// Use wxFSVolume class providing access to the configured/active mount points
-//
-// Default is 1
-//
-// Recommended setting: 1 (but may be safely disabled if you don't use it)
-#define wxUSE_FSVOLUME 0
-
-// Use wxStandardPaths class which allows to retrieve some standard locations
-// in the file system
-//
-// Default is 1
-//
-// Recommended setting: 1 (may be disabled to save space, but not much)
-#define wxUSE_STDPATHS 1
-
-// use wxTextBuffer class: required by wxTextFile
-#define wxUSE_TEXTBUFFER 1
-
-// use wxTextFile class: requires wxFile and wxTextBuffer, required by
-// wxFileConfig
-#define wxUSE_TEXTFILE 1
-
-// i18n support: _() macro, wxLocale class. Requires wxTextFile.
-#define wxUSE_INTL 1
-
-// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which
-// allow to manipulate dates, times and time intervals. wxDateTime replaces the
-// old wxTime and wxDate classes which are still provided for backwards
-// compatibility (and implemented in terms of wxDateTime).
-//
-// Note that this class is relatively new and is still officially in alpha
-// stage because some features are not yet (fully) implemented. It is already
-// quite useful though and should only be disabled if you are aiming at
-// absolutely minimal version of the library.
-//
-// Requires: wxUSE_LONGLONG
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_DATETIME 0
-
-// Set wxUSE_TIMER to 1 to compile wxTimer class
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_TIMER 0
-
-// Use wxStopWatch clas.
-//
-// Default is 1
-//
-// Recommended setting: 1 (needed by wxSocket)
-#define wxUSE_STOPWATCH 0
-
-// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes
-// which allow the application to store its settings in the persistent
-// storage. Setting this to 1 will also enable on-demand creation of the
-// global config object in wxApp.
-//
-// See also wxUSE_CONFIG_NATIVE below.
-//
-// Recommended setting: 1
-#define wxUSE_CONFIG 1
-
-// If wxUSE_CONFIG is 1, you may choose to use either the native config
-// classes under Windows (using .INI files under Win16 and the registry under
-// Win32) or the portable text file format used by the config classes under
-// Unix.
-//
-// Default is 1 to use native classes. Note that you may still use
-// wxFileConfig even if you set this to 1 - just the config object created by
-// default for the applications needs will be a wxRegConfig or wxIniConfig and
-// not wxFileConfig.
-//
-// Recommended setting: 1
-#define wxUSE_CONFIG_NATIVE 0
-
-// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows
-// to connect/disconnect from the network and be notified whenever the dial-up
-// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_DIALUP_MANAGER 0
-
-// Compile in classes for run-time DLL loading and function calling.
-// Required by wxUSE_DIALUP_MANAGER.
-//
-// This setting is for Win32 only
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_DYNLIB_CLASS 1
-
-// experimental, don't use for now
-#define wxUSE_DYNAMIC_LOADER 0
-
-// Set to 1 to use socket classes
-#define wxUSE_SOCKETS 0
-
-// Set to 1 to enable virtual file systems (required by wxHTML)
-#define wxUSE_FILESYSTEM 1
-
-// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM)
-#define wxUSE_FS_ZIP 0
-
-// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM)
-#define wxUSE_FS_ARCHIVE 0
-
-// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM)
-#define wxUSE_FS_INET 0
-
-// wxArchive classes for accessing archives such as zip and tar
-#define wxUSE_ARCHIVE_STREAMS 0
-
-// Set to 1 to compile wxZipInput/OutputStream classes.
-#define wxUSE_ZIPSTREAM 0
-
-// Set to 1 to compile wxTarInput/OutputStream classes.
-#define wxUSE_TARSTREAM 0
-
-// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by
-// wxUSE_LIBPNG
-#define wxUSE_ZLIB 0
-
-// If enabled, the code written by Apple will be used to write, in a portable
-// way, float on the disk. See extended.c for the license which is different
-// from wxWidgets one.
-//
-// Default is 1.
-//
-// Recommended setting: 1 unless you don't like the license terms (unlikely)
-#define wxUSE_APPLE_IEEE 0
-
-// Joystick support class
-#define wxUSE_JOYSTICK 0
-
-// wxFontMapper class
-#define wxUSE_FONTMAP 1
-
-// wxMimeTypesManager class
-#define wxUSE_MIMETYPE 0
-
-// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
-// or wxURL you need to set this to 1.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_PROTOCOL 0
-
-// The settings for the individual URL schemes
-#define wxUSE_PROTOCOL_FILE 0
-#define wxUSE_PROTOCOL_FTP 0
-#define wxUSE_PROTOCOL_HTTP 0
-
-// Define this to use wxURL class.
-#define wxUSE_URL 0
-
-// Define this to use native platform url and protocol support.
-// Currently valid only for MS-Windows.
-// Note: if you set this to 1, you can open ftp/http/gopher sites
-// and obtain a valid input stream for these sites
-// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0.
-// Doing so reduces the code size.
-//
-// This code is experimental and subject to change.
-#define wxUSE_URL_NATIVE 0
-
-// Support for wxVariant class used in several places throughout the library,
-// notably in wxDataViewCtrl API.
-//
-// Default is 1.
-//
-// Recommended setting: 1 unless you want to reduce the library size as much as
-// possible in which case setting this to 0 can gain up to 100KB.
-#define wxUSE_VARIANT 0
-
-// Support for regular expression matching via wxRegEx class: enable this to
-// use POSIX regular expressions in your code. You need to compile regex
-// library from src/regex to use it under Windows.
-//
-// Default is 0
-//
-// Recommended setting: 1 if your compiler supports it, if it doesn't please
-// contribute us a makefile for src/regex for it
-#define wxUSE_REGEX 0
-
-// wxSystemOptions class
-#define wxUSE_SYSTEM_OPTIONS 0
-
-// wxSound class
-#define wxUSE_SOUND 0
-
-// Use wxMediaCtrl
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_MEDIACTRL 0
-
-// Use GStreamer for Unix (req a lot of dependancies)
-//
-// Default is 0
-//
-// Recommended setting: 1 (wxMediaCtrl won't work by default without it)
-#define wxUSE_GSTREAMER 0
-
-// Use wxWidget's XRC XML-based resource system. Recommended.
-//
-// Default is 1
-//
-// Recommended setting: 1 (requires wxUSE_XML)
-#define wxUSE_XRC 0
-
-// XML parsing classes. Note that their API will change in the future, so
-// using wxXmlDocument and wxXmlNode in your app is not recommended.
-//
-// Default is the same as wxUSE_XRC, i.e. 1 by default.
-//
-// Recommended setting: 1 (required by XRC)
-#define wxUSE_XML wxUSE_XRC
-
-// Use wxWidget's AUI docking system
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_AUI 0
-
-
-// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
-// 2D drawing API. (Still somewhat experimental)
-//
-// Please note that on Windows you will need to link with gdiplus.lib (use
-// USE_GDIPLUS=1 for makefile builds) and distribute gdiplus.dll with your
-// application if you want it to be runnable on pre-XP systems.
-//
-// Default is 0
-//
-// Recommended setting: 1
-#ifndef wxUSE_GRAPHICS_CONTEXT
-#define wxUSE_GRAPHICS_CONTEXT 0
-#endif
-
-// ----------------------------------------------------------------------------
-// Individual GUI controls
-// ----------------------------------------------------------------------------
-
-// You must set wxUSE_CONTROLS to 1 if you are using any controls at all
-// (without it, wxControl class is not compiled)
-//
-// Default is 1
-//
-// Recommended setting: 1 (don't change except for very special programs)
-#define wxUSE_CONTROLS 1
-
-// wxPopupWindow class is a top level transient window. It is currently used
-// to implement wxTipWindow
-//
-// Default is 1
-//
-// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW)
-#define wxUSE_POPUPWIN 0
-
-// wxTipWindow allows to implement the custom tooltips, it is used by the
-// context help classes. Requires wxUSE_POPUPWIN.
-//
-// Default is 1
-//
-// Recommended setting: 1 (may be set to 0)
-#define wxUSE_TIPWINDOW 0
-
-// Each of the settings below corresponds to one wxWidgets control. They are
-// all switched on by default but may be disabled if you are sure that your
-// program (including any standard dialogs it can show!) doesn't need them and
-// if you desperately want to save some space. If you use any of these you must
-// set wxUSE_CONTROLS as well.
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_ANIMATIONCTRL 0 // wxAnimationCtrl
-#define wxUSE_BUTTON 0 // wxButton
-#define wxUSE_BMPBUTTON 0 // wxBitmapButton
-#define wxUSE_CALENDARCTRL 0 // wxCalendarCtrl
-#define wxUSE_CHECKBOX 0 // wxCheckBox
-#define wxUSE_CHECKLISTBOX 0 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
-#define wxUSE_CHOICE 0 // wxChoice
-#define wxUSE_COLLPANE 0 // wxCollapsiblePane
-#define wxUSE_COLOURPICKERCTRL 0 // wxColourPickerCtrl
-#define wxUSE_COMBOBOX 0 // wxComboBox
-#define wxUSE_DATAVIEWCTRL 0 // wxDataViewCtrl
-#define wxUSE_DATEPICKCTRL 0 // wxDatePickerCtrl
-#define wxUSE_DIRPICKERCTRL 0 // wxDirPickerCtrl
-#define wxUSE_FILEPICKERCTRL 0 // wxFilePickerCtrl
-#define wxUSE_FONTPICKERCTRL 0 // wxFontPickerCtrl
-#define wxUSE_GAUGE 0 // wxGauge
-#define wxUSE_HYPERLINKCTRL 0 // wxHyperlinkCtrl
-#define wxUSE_LISTBOX 0 // wxListBox
-#define wxUSE_LISTCTRL 0 // wxListCtrl
-#define wxUSE_RADIOBOX 0 // wxRadioBox
-#define wxUSE_RADIOBTN 1 // wxRadioButton
-#define wxUSE_SCROLLBAR 0 // wxScrollBar
-#define wxUSE_SLIDER 0 // wxSlider
-#define wxUSE_SPINBTN 0 // wxSpinButton
-#define wxUSE_SPINCTRL 0 // wxSpinCtrl
-#define wxUSE_STATBOX 0 // wxStaticBox
-#define wxUSE_STATLINE 0 // wxStaticLine
-#define wxUSE_STATTEXT 0 // wxStaticText
-#define wxUSE_STATBMP 0 // wxStaticBitmap
-#define wxUSE_TEXTCTRL 0 // wxTextCtrl
-#define wxUSE_TOGGLEBTN 0 // requires wxButton
-#define wxUSE_TREECTRL 0 // wxTreeCtrl
-
-// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
-// below either wxStatusBar95 or a generic wxStatusBar will be used.
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_STATUSBAR 0
-
-// Two status bar implementations are available under Win32: the generic one
-// or the wrapper around native control. For native look and feel the native
-// version should be used.
-//
-// Default is 1 for the platforms where native status bar is supported.
-//
-// Recommended setting: 1 (there is no advantage in using the generic one)
-#define wxUSE_NATIVE_STATUSBAR 0
-
-// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar
-// classes at all. Otherwise, use the native toolbar class unless
-// wxUSE_TOOLBAR_NATIVE is 0.
-//
-// Default is 1 for all settings.
-//
-// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE.
-#define wxUSE_TOOLBAR 0
-#define wxUSE_TOOLBAR_NATIVE 0
-
-// wxNotebook is a control with several "tabs" located on one of its sides. It
-// may be used to logically organise the data presented to the user instead of
-// putting everything in one huge dialog. It replaces wxTabControl and related
-// classes of wxWin 1.6x.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_NOTEBOOK 0
-
-// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of
-// the tabs
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_LISTBOOK 0
-
-// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of
-// the tabs
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_CHOICEBOOK 0
-
-// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of
-// the tabs
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_TREEBOOK 0
-
-// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of
-// tabs
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_TOOLBOOK 0
-
-// wxTabDialog is a generic version of wxNotebook but it is incompatible with
-// the new class. It shouldn't be used in new code.
-//
-// Default is 0.
-//
-// Recommended setting: 0 (use wxNotebook)
-#define wxUSE_TAB_DIALOG 0
-
-// wxGrid class
-//
-// Default is 1, set to 0 to cut down compilation time and binaries size if you
-// don't use it.
-//
-// Recommended setting: 1
-//
-#define wxUSE_GRID 0
-
-// wxMiniFrame class: a frame with narrow title bar
-//
-// Default is 1.
-//
-// Recommended setting: 1 (it doesn't cost almost anything)
-#define wxUSE_MINIFRAME 0
-
-// wxComboCtrl and related classes: combobox with custom popup window and
-// not necessarily a listbox.
-//
-// Default is 1.
-//
-// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
-// it used by wxComboBox
-#define wxUSE_COMBOCTRL 0
-
-// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
-// items.
-//
-// Default is 1.
-//
-// Recommended setting: 1 but can be safely set to 0, except where it is
-// needed as a base class for generic wxBitmapComboBox.
-#define wxUSE_ODCOMBOBOX 0
-
-// wxBitmapComboBox is a combobox that can have images in front of text items.
-//
-// Default is 1.
-//
-// Recommended setting: 1 but can be safely set to 0
-#define wxUSE_BITMAPCOMBOBOX 0
-
-// ----------------------------------------------------------------------------
-// Miscellaneous GUI stuff
-// ----------------------------------------------------------------------------
-
-// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
-#define wxUSE_ACCEL 0
-
-// Hotkey support (currently Windows only)
-#define wxUSE_HOTKEY 0
-
-// Use wxCaret: a class implementing a "cursor" in a text control (called caret
-// under Windows).
-//
-// Default is 1.
-//
-// Recommended setting: 1 (can be safely set to 0, not used by the library)
-#define wxUSE_CARET 0
-
-// Use wxDisplay class: it allows enumerating all displays on a system and
-// their geometries as well as finding the display on which the given point or
-// window lies.
-//
-// Default is 1.
-//
-// Recommended setting: 1 if you need it, can be safely set to 0 otherwise
-#define wxUSE_DISPLAY 0
-
-// Miscellaneous geometry code: needed for Canvas library
-#define wxUSE_GEOMETRY 0
-
-// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and
-// wxListCtrl.
-//
-// Default is 1.
-//
-// Recommended setting: 1 (set it to 0 if you don't use any of the controls
-// enumerated above, then this class is mostly useless too)
-#define wxUSE_IMAGLIST 0
-
-// Use wxMenu, wxMenuBar, wxMenuItem.
-//
-// Default is 1.
-//
-// Recommended setting: 1 (can't be disabled under MSW)
-#define wxUSE_MENUS 1
-
-// Use wxSashWindow class.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_SASH 0
-
-// Use wxSplitterWindow class.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_SPLITTER 0
-
-// Use wxToolTip and wxWindow::Set/GetToolTip() methods.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_TOOLTIPS 0
-
-// wxValidator class and related methods
-#define wxUSE_VALIDATORS 1
-
-// ----------------------------------------------------------------------------
-// common dialogs
-// ----------------------------------------------------------------------------
-
-// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
-// file selector, printer dialog). Switching this off also switches off the
-// printing architecture and interactive wxPrinterDC.
-//
-// Default is 1
-//
-// Recommended setting: 1 (unless it really doesn't work)
-#define wxUSE_COMMON_DIALOGS 0
-
-// wxBusyInfo displays window with message when app is busy. Works in same way
-// as wxBusyCursor
-#define wxUSE_BUSYINFO 0
-
-// Use single/multiple choice dialogs.
-//
-// Default is 1
-//
-// Recommended setting: 1 (used in the library itself)
-#define wxUSE_CHOICEDLG 0
-
-// Use colour picker dialog
-//
-// Default is 1
-//
-// Recommended setting: 1
-#define wxUSE_COLOURDLG 0
-
-// wxDirDlg class for getting a directory name from user
-#define wxUSE_DIRDLG 0
-
-// TODO: setting to choose the generic or native one
-
-// Use file open/save dialogs.
-//
-// Default is 1
-//
-// Recommended setting: 1 (used in many places in the library itself)
-#define wxUSE_FILEDLG 0
-
-// Use find/replace dialogs.
-//
-// Default is 1
-//
-// Recommended setting: 1 (but may be safely set to 0)
-#define wxUSE_FINDREPLDLG 0
-
-// Use font picker dialog
-//
-// Default is 1
-//
-// Recommended setting: 1 (used in the library itself)
-#define wxUSE_FONTDLG 0
-
-// Use wxMessageDialog and wxMessageBox.
-//
-// Default is 1
-//
-// Recommended setting: 1 (used in the library itself)
-#define wxUSE_MSGDLG 1
-
-// progress dialog class for lengthy operations
-#define wxUSE_PROGRESSDLG 0
-
-// support for startup tips (wxShowTip &c)
-#define wxUSE_STARTUP_TIPS 0
-
-// text entry dialog and wxGetTextFromUser function
-#define wxUSE_TEXTDLG 0
-
-// number entry dialog
-#define wxUSE_NUMBERDLG 0
-
-// splash screen class
-#define wxUSE_SPLASH 0
-
-// wizards
-#define wxUSE_WIZARDDLG 0
-
-// Compile in wxAboutBox() function showing the standard "About" dialog.
-//
-// Default is 1
-//
-// Recommended setting: 1 but can be set to 0 to save some space if you don't
-// use this function
-#define wxUSE_ABOUTDLG 0
-
-// ----------------------------------------------------------------------------
-// Metafiles support
-// ----------------------------------------------------------------------------
-
-// Windows supports the graphics format known as metafile which is, though not
-// portable, is widely used under Windows and so is supported by wxWin (under
-// Windows only, of course). Win16 (Win3.1) used the so-called "Window
-// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
-// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
-// default, WMFs will be used under Win16 and EMFs under Win32. This may be
-// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
-// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
-// in any metafile related classes at all.
-//
-// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
-//
-// Recommended setting: default or 0 for everything for portable programs.
-#define wxUSE_METAFILE 0
-#define wxUSE_ENH_METAFILE 0
-#define wxUSE_WIN_METAFILES_ALWAYS 0
-
-// ----------------------------------------------------------------------------
-// Big GUI components
-// ----------------------------------------------------------------------------
-
-// Set to 0 to disable MDI support.
-//
-// Requires wxUSE_NOTEBOOK under platforms other than MSW.
-//
-// Default is 1.
-//
-// Recommended setting: 1, can be safely set to 0.
-#define wxUSE_MDI 0
-
-// Set to 0 to disable document/view architecture
-#define wxUSE_DOC_VIEW_ARCHITECTURE 0
-
-// Set to 0 to disable MDI document/view architecture
-//
-// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE
-#define wxUSE_MDI_ARCHITECTURE 0
-
-// Set to 0 to disable print/preview architecture code
-#define wxUSE_PRINTING_ARCHITECTURE 0
-
-// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
-// much more.
-//
-// Default is 1.
-//
-// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
-// smaller library.
-#define wxUSE_HTML 1
-
-// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
-// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
-//
-// Default is 0.
-//
-// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
-
-// wxRichTextCtrl allows editing of styled text.
-//
-// Default is 1.
-//
-// Recommended setting: 1, set to 0 if you want compile a
-// smaller library.
-#define wxUSE_RICHTEXT 0
-
-// ----------------------------------------------------------------------------
-// Data transfer
-// ----------------------------------------------------------------------------
-
-// Use wxClipboard class for clipboard copy/paste.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_CLIPBOARD 0
-
-// Use wxDataObject and related classes. Needed for clipboard and OLE drag and
-// drop
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_DATAOBJ 0
-
-// Use wxDropTarget and wxDropSource classes for drag and drop (this is
-// different from "built in" drag and drop in wxTreeCtrl which is always
-// available). Requires wxUSE_DATAOBJ.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_DRAG_AND_DROP 0
-
-// Use wxAccessible for enhanced and customisable accessibility.
-// Depends on wxUSE_OLE.
-//
-// Default is 0.
-//
-// Recommended setting (at present): 0
-#define wxUSE_ACCESSIBILITY 0
-
-// ----------------------------------------------------------------------------
-// miscellaneous settings
-// ----------------------------------------------------------------------------
-
-// wxSingleInstanceChecker class allows to verify at startup if another program
-// instance is running (it is only available under Win32)
-//
-// Default is 1
-//
-// Recommended setting: 1 (the class is tiny, disabling it won't save much
-// space)
-#define wxUSE_SNGLINST_CHECKER 0
-
-#define wxUSE_DRAGIMAGE 0
-
-#define wxUSE_IPC 0
- // 0 for no interprocess comms
-#define wxUSE_HELP 0
- // 0 for no help facility
-
-// Should we use MS HTML help for wxHelpController? If disabled, neither
-// wxCHMHelpController nor wxBestHelpController are available.
-//
-// Default is 1 under MSW, 0 is always used for the other platforms.
-//
-// Recommended setting: 1, only set to 0 if you have trouble compiling
-// wxCHMHelpController (could be a problem with really ancient compilers)
-#define wxUSE_MS_HTML_HELP 0
-
-
-// Use wxHTML-based help controller?
-#define wxUSE_WXHTML_HELP 0
-
-#define wxUSE_RESOURCES 0
- // 0 for no wxGetResource/wxWriteResource
-#define wxUSE_CONSTRAINTS 0
- // 0 for no window layout constraint system
-
-#define wxUSE_SPLINES 0
- // 0 for no splines
-
-#define wxUSE_MOUSEWHEEL 0
- // Include mouse wheel support
-
-// ----------------------------------------------------------------------------
-// postscript support settings
-// ----------------------------------------------------------------------------
-
-// Set to 1 for PostScript device context.
-#define wxUSE_POSTSCRIPT 0
-
-// Set to 1 to use font metric files in GetTextExtent
-#define wxUSE_AFM_FOR_POSTSCRIPT 0
-
-// ----------------------------------------------------------------------------
-// database classes
-// ----------------------------------------------------------------------------
-
-// Define 1 to use ODBC classes
-#define wxUSE_ODBC 0
-
-// For backward compatibility reasons, this parameter now only controls the
-// default scrolling method used by cursors. This default behavior can be
-// overriden by setting the second param of wxDB::wxDbGetConnection() or
-// wxDb() constructor to indicate whether the connection (and any wxDbTable()s
-// that use the connection) should support forward only scrolling of cursors,
-// or both forward and backward support for backward scrolling cursors is
-// dependent on the data source as well as the ODBC driver being used.
-#define wxODBC_FWD_ONLY_CURSORS 0
-
-// Default is 0. Set to 1 to use the deprecated classes, enum types, function,
-// member variables. With a setting of 1, full backward compatibility with the
-// 2.0.x release is possible. It is STRONGLY recommended that this be set to 0,
-// as future development will be done only on the non-deprecated
-// functions/classes/member variables/etc.
-#define wxODBC_BACKWARD_COMPATABILITY 0
-
-// ----------------------------------------------------------------------------
-// other compiler (mis)features
-// ----------------------------------------------------------------------------
-
-// Set this to 0 if your compiler can't cope with omission of prototype
-// parameters.
-//
-// Default is 1.
-//
-// Recommended setting: 1 (should never need to set this to 0)
-#define REMOVE_UNUSED_ARG 1
-
-// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
-// them. Set to 1 for <iostream.h>, 0 for <iostream>. Note that VC++ 7.1
-// and later doesn't support wxUSE_IOSTREAMH == 1 and so <iostream> will be
-// used anyhow.
-//
-// Default is 1.
-//
-// Recommended setting: whatever your compiler likes more
-#define wxUSE_IOSTREAMH 1
-
-// ----------------------------------------------------------------------------
-// image format support
-// ----------------------------------------------------------------------------
-
-// wxImage supports many different image formats which can be configured at
-// compile-time. BMP is always supported, others are optional and can be safely
-// disabled if you don't plan to use images in such format sometimes saving
-// substantial amount of code in the final library.
-//
-// Some formats require an extra library which is included in wxWin sources
-// which is mentioned if it is the case.
-
-// Set to 1 for wxImage support (recommended).
-#define wxUSE_IMAGE 1
-
-// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB.
-#define wxUSE_LIBPNG 0
-
-// Set to 1 for JPEG format support (requires libjpeg)
-#define wxUSE_LIBJPEG 0
-
-// Set to 1 for TIFF format support (requires libtiff)
-#define wxUSE_LIBTIFF 0
-
-// Set to 1 for TGA format support (loading only)
-#define wxUSE_TGA 0
-
-// Set to 1 for GIF format support
-#define wxUSE_GIF 1
-
-// Set to 1 for PNM format support
-#define wxUSE_PNM 0
-
-// Set to 1 for PCX format support
-#define wxUSE_PCX 0
-
-// Set to 1 for IFF format support (Amiga format)
-#define wxUSE_IFF 0
-
-// Set to 1 for XPM format support
-#define wxUSE_XPM 0
-
-// Set to 1 for MS Icons and Cursors format support
-#define wxUSE_ICO_CUR 0
-
-// Set to 1 to compile in wxPalette class
-#define wxUSE_PALETTE 0
-
-// ----------------------------------------------------------------------------
-// wxUniversal-only options
-// ----------------------------------------------------------------------------
-
-// Set to 1 to enable compilation of all themes, this is the default
-#define wxUSE_ALL_THEMES 0
-
-// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
-// is unset, if it is set these options are not used; notice that metal theme
-// uses Win32 one
-#define wxUSE_THEME_GTK 0
-#define wxUSE_THEME_METAL 0
-#define wxUSE_THEME_MONO 0
-#define wxUSE_THEME_WIN32 0
-
-
-/* --- end common options --- */
-
-// ----------------------------------------------------------------------------
-// Windows-only settings
-// ----------------------------------------------------------------------------
-
-// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode
-// and want to run your programs under Windows 9x and not only NT/2000/XP.
-// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see
-// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note
-// that you will have to modify the makefiles to include unicows.lib import
-// library as the first library (see installation instructions in install.txt
-// to learn how to do it when building the library or samples).
-//
-// If your compiler doesn't have unicows.lib, you can get a version of it at
-// http://libunicows.sourceforge.net
-//
-// Default is 0
-//
-// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems)
-#ifndef wxUSE_UNICODE_MSLU
- #define wxUSE_UNICODE_MSLU 0
-#endif
-
-// Set this to 1 if you want to use wxWidgets and MFC in the same program. This
-// will override some other settings (see below)
-//
-// Default is 0.
-//
-// Recommended setting: 0 unless you really have to use MFC
-#define wxUSE_MFC 0
-
-// Set this to 1 for generic OLE support: this is required for drag-and-drop,
-// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and
-// can't compile/doesn't have the OLE headers.
-//
-// Default is 1.
-//
-// Recommended setting: 1
-#define wxUSE_OLE 0
-
-// Set this to 1 to enable wxAutomationObject class.
-//
-// Default is 1.
-//
-// Recommended setting: 1 if you need to control other applications via OLE
-// Automation, can be safely set to 0 otherwise
-#define wxUSE_OLE_AUTOMATION 0
-
-// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE
-// controls in wx.
-//
-// Default is 1.
-//
-// Recommended setting: 1, required by wxMediaCtrl
-#define wxUSE_ACTIVEX 0
-
-// wxDC cacheing implementation
-#define wxUSE_DC_CACHEING 0
-
-// Set this to 1 to enable the use of DIB's for wxBitmap to support
-// bitmaps > 16MB on Win95/98/Me. Set to 0 to use DDB's only.
-#define wxUSE_DIB_FOR_BITMAP 0
-
-// Set this to 1 to enable wxDIB class used internally for manipulating
-// wxBitmao data.
-//
-// Default is 1, set it to 0 only if you don't use wxImage neither
-//
-// Recommended setting: 1 (without it conversion to/from wxImage won't work)
-#define wxUSE_WXDIB 1
-
-// Set to 0 to disable PostScript print/preview architecture code under Windows
-// (just use Windows printing).
-#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0
-
-// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH
-// which allows to put more than ~32Kb of text in it even under Win9x (NT
-// doesn't have such limitation).
-//
-// Default is 1 for compilers which support it
-//
-// Recommended setting: 1, only set it to 0 if your compiler doesn't have
-// or can't compile <richedit.h>
-#define wxUSE_RICHEDIT 0
-
-// Set this to 1 to use extra features of richedit v2 and later controls
-//
-// Default is 1 for compilers which support it
-//
-// Recommended setting: 1
-#define wxUSE_RICHEDIT2 0
-
-// Set this to 1 to enable support for the owner-drawn menu and listboxes. This
-// is required by wxUSE_CHECKLISTBOX.
-//
-// Default is 1.
-//
-// Recommended setting: 1, set to 0 for a small library size reduction
-#define wxUSE_OWNER_DRAWN 0
-
-// Set to 1 to compile MS Windows XP theme engine support
-#define wxUSE_UXTHEME 0
-
-// Set to 1 to auto-adapt to MS Windows XP themes where possible
-// (notably, wxNotebook pages)
-#define wxUSE_UXTHEME_AUTO 0
-
-// Set to 1 to use InkEdit control (Tablet PC), if available
-#define wxUSE_INKEDIT 0
-
-// ----------------------------------------------------------------------------
-// Generic versions of native controls
-// ----------------------------------------------------------------------------
-
-// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the
-// native wxDatePickerCtrl
-//
-// Default is 0.
-//
-// Recommended setting: 0, this is mainly used for testing
-#define wxUSE_DATEPICKCTRL_GENERIC 0
-
-// ----------------------------------------------------------------------------
-// Crash debugging helpers
-// ----------------------------------------------------------------------------
-
-// Set this to 1 to be able to use wxCrashReport::Generate() to create mini
-// dumps of your program when it crashes (or at any other moment)
-//
-// Default is 1 if supported by the compiler (VC++ and recent BC++ only).
-//
-// Recommended setting: 1, set to 0 if your programs never crash
-#define wxUSE_CRASHREPORT 0
-
-// ----------------------------------------------------------------------------
-// obsolete settings
-// ----------------------------------------------------------------------------
-
-// NB: all settings in this section are obsolete and should not be used/changed
-// at all, they will disappear
-
-// Define 1 to use bitmap messages.
-#define wxUSE_BITMAP_MESSAGE 0
-
-#endif // _WX_SETUP_H_
-
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/msw/setup.h
+// Purpose: Configuration for the library
+// Author: Julian Smart
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id: setup0.h,v 1.246 2006/11/09 00:54:51 VZ Exp $
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_SETUP_H_
+#define _WX_SETUP_H_
+
+/* --- start common options --- */
+// ----------------------------------------------------------------------------
+// global settings
+// ----------------------------------------------------------------------------
+
+// define this to 0 when building wxBase library - this can also be done from
+// makefile/project file overriding the value here
+#ifndef wxUSE_GUI
+ #define wxUSE_GUI 1
+#endif // wxUSE_GUI
+
+// ----------------------------------------------------------------------------
+// compatibility settings
+// ----------------------------------------------------------------------------
+
+// This setting determines the compatibility with 2.4 API: set it to 1 to
+// enable it but please consider updating your code instead.
+//
+// Default is 0
+//
+// Recommended setting: 0 (please update your code)
+#define WXWIN_COMPATIBILITY_2_4 0
+
+// This setting determines the compatibility with 2.6 API: set it to 0 to
+// flag all cases of using deprecated functions.
+//
+// Default is 1 but please try building your code with 0 as the default will
+// change to 0 in the next version and the deprecated functions will disappear
+// in the version after it completely.
+//
+// Recommended setting: 0 (please update your code)
+#define WXWIN_COMPATIBILITY_2_6 0
+
+// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when
+// default system font is used for wxWindow::GetCharWidth/Height() instead of
+// the current font.
+//
+// Default is 0
+//
+// Recommended setting: 0
+#define wxDIALOG_UNIT_COMPATIBILITY 0
+
+// ----------------------------------------------------------------------------
+// debugging settings
+// ----------------------------------------------------------------------------
+
+// Generic comment about debugging settings: they are very useful if you don't
+// use any other memory leak detection tools such as Purify/BoundsChecker, but
+// are probably redundant otherwise. Also, Visual C++ CRT has the same features
+// as wxWidgets memory debugging subsystem built in since version 5.0 and you
+// may prefer to use it instead of built in memory debugging code because it is
+// faster and more fool proof.
+//
+// Using VC++ CRT memory debugging is enabled by default in debug mode
+// (__WXDEBUG__) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0)
+// and if __NO_VC_CRTDBG__ is not defined.
+
+// If 1, enables wxDebugContext, for writing error messages to file, etc. If
+// __WXDEBUG__ is not defined, will still use the normal memory operators.
+//
+// Default is 0
+//
+// Recommended setting: 0
+#define wxUSE_DEBUG_CONTEXT 0
+
+// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF*
+// __WXDEBUG__ is also defined.
+//
+// WARNING: this code may not work with all architectures, especially if
+// alignment is an issue. This switch is currently ignored for mingw / cygwin
+//
+// Default is 0
+//
+// Recommended setting: 1 if you are not using a memory debugging tool, else 0
+#define wxUSE_MEMORY_TRACING 0
+
+// In debug mode, cause new and delete to be redefined globally.
+// If this causes problems (e.g. link errors which is a common problem
+// especially if you use another library which also redefines the global new
+// and delete), set this to 0.
+// This switch is currently ignored for mingw / cygwin
+//
+// Default is 0
+//
+// Recommended setting: 0
+#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
+
+// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
+// this causes problems (e.g. link errors), set this to 0. You may need to set
+// this to 0 if using templates (at least for VC++). This switch is currently
+// ignored for mingw / cygwin / CodeWarrior
+//
+// Default is 0
+//
+// Recommended setting: 0
+#define wxUSE_DEBUG_NEW_ALWAYS 0
+
+// wxHandleFatalExceptions() may be used to catch the program faults at run
+// time and, instead of terminating the program with a usual GPF message box,
+// call the user-defined wxApp::OnFatalException() function. If you set
+// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work.
+//
+// This setting is for Win32 only and can only be enabled if your compiler
+// supports Win32 structured exception handling (currently only VC++ does)
+//
+// Default is 1
+//
+// Recommended setting: 1 if your compiler supports it.
+#define wxUSE_ON_FATAL_EXCEPTION 0
+
+// Set this to 1 to be able to generate a human-readable (unlike
+// machine-readable minidump created by wxCrashReport::Generate()) stack back
+// trace when your program crashes using wxStackWalker
+//
+// Default is 1 if supported by the compiler.
+//
+// Recommended setting: 1, set to 0 if your programs never crash
+#define wxUSE_STACKWALKER 0
+
+// Set this to 1 to compile in wxDebugReport class which allows you to create
+// and optionally upload to your web site a debug report consisting of back
+// trace of the crash (if wxUSE_STACKWALKER == 1) and other information.
+//
+// Default is 1 if supported by the compiler.
+//
+// Recommended setting: 1, it is compiled into a separate library so there
+// is no overhead if you don't use it
+#define wxUSE_DEBUGREPORT 0
+
+// ----------------------------------------------------------------------------
+// Unicode support
+// ----------------------------------------------------------------------------
+
+// Set wxUSE_UNICODE to 1 to compile wxWidgets in Unicode mode: wxChar will be
+// defined as wchar_t, wxString will use Unicode internally. If you set this
+// to 1, you must use wxT() macro for all literal strings in the program.
+//
+// Unicode is currently only fully supported under Windows NT/2000/XP
+// (Windows 9x doesn't support it and the programs compiled in Unicode mode
+// will not run under 9x -- but see wxUSE_UNICODE_MSLU below).
+//
+// Default is 0
+//
+// Recommended setting: 0 (unless you only plan to use Windows NT/2000/XP)
+#ifndef wxUSE_UNICODE
+ #define wxUSE_UNICODE 0
+#endif
+
+// Setting wxUSE_WCHAR_T to 1 gives you some degree of Unicode support without
+// compiling the program in Unicode mode. More precisely, it will be possible
+// to construct wxString from a wide (Unicode) string and convert any wxString
+// to Unicode.
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_WCHAR_T 1
+
+// ----------------------------------------------------------------------------
+// global features
+// ----------------------------------------------------------------------------
+
+// Compile library in exception-safe mode? If set to 1, the library will try to
+// behave correctly in presence of exceptions (even though it still will not
+// use the exceptions itself) and notify the user code about any unhandled
+// exceptions. If set to 0, propagation of the exceptions through the library
+// code will lead to undefined behaviour -- but the code itself will be
+// slightly smaller and faster.
+//
+// Note that like wxUSE_THREADS this option is automatically set to 0 if
+// wxNO_EXCEPTIONS is defined.
+//
+// Default is 1
+//
+// Recommended setting: depends on whether you intend to use C++ exceptions
+// in your own code (1 if you do, 0 if you don't)
+#define wxUSE_EXCEPTIONS 0
+
+// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI
+//
+// Default is 0
+//
+// Recommended setting: 0 (this is still work in progress...)
+#define wxUSE_EXTENDED_RTTI 0
+
+// Set wxUSE_STL to 1 to derive wxList(Foo) and wxArray(Foo) from
+// std::list<Foo*> and std::vector<Foo*>, with a compatibility interface,
+// and for wxHashMap to be implemented with templates.
+//
+// Default is 0
+//
+// Recommended setting: YMMV
+#define wxUSE_STL 0
+
+// Support for message/error logging. This includes wxLogXXX() functions and
+// wxLog and derived classes. Don't set this to 0 unless you really know what
+// you are doing.
+//
+// Default is 1
+//
+// Recommended setting: 1 (always)
+#define wxUSE_LOG 0
+
+// Recommended setting: 1
+#define wxUSE_LOGWINDOW 0
+
+// Recommended setting: 1
+#define wxUSE_LOGGUI 0
+
+// Recommended setting: 1
+#define wxUSE_LOG_DIALOG 0
+
+// Support for command line parsing using wxCmdLineParser class.
+//
+// Default is 1
+//
+// Recommended setting: 1 (can be set to 0 if you don't use the cmd line)
+#define wxUSE_CMDLINE_PARSER 0
+
+// Support for multithreaded applications: if 1, compile in thread classes
+// (thread.h) and make the library a bit more thread safe. Although thread
+// support is quite stable by now, you may still consider recompiling the
+// library without it if you have no use for it - this will result in a
+// somewhat smaller and faster operation.
+//
+// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset
+// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in
+// build/msw/config.* file this value will have no effect.
+//
+// Default is 1
+//
+// Recommended setting: 0 unless you do plan to develop MT applications
+#define wxUSE_THREADS 0
+
+// If enabled, compiles wxWidgets streams classes
+//
+// wx stream classes are used for image IO, process IO redirection, network
+// protocols implementation and much more and so disabling this results in a
+// lot of other functionality being lost.
+//
+// Default is 1
+//
+// Recommended setting: 1 as setting it to 0 disables many other things
+#define wxUSE_STREAMS 1
+
+// Use standard C++ streams if 1 instead of wx streams in some places. If
+// disabled (default), wx streams are used everywhere and wxWidgets doesn't
+// depend on the standard streams library.
+//
+// Notice that enabling this does not replace wx streams with std streams
+// everywhere, in a lot of places wx streams are used no matter what.
+//
+// Default is 0
+//
+// Recommended setting: 1 if you use the standard streams anyhow and so
+// dependency on the standard streams library is not a
+// problem
+#define wxUSE_STD_IOSTREAM 0
+
+// Enable conversion to standard C++ string if 1.
+//
+// Default is 1 for most compilers.
+//
+// Currently the Digital Mars and Watcom compilers come without standard C++
+// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
+// them (e.g. from STLPort).
+//
+// VC++ 5.0 does include standard C++ library header, however they produce
+// many warnings that can't be turned off when compiled at warning level 4.
+#if defined(__DMC__) || defined(__WATCOMC__) \
+ || (defined(_MSC_VER) && _MSC_VER < 1200)
+ #define wxUSE_STD_STRING 0
+#else
+ #define wxUSE_STD_STRING 1
+#endif
+
+// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf.
+// Note that if the system's implementation does not support positional
+// parameters, setting this to 1 forces the use of the wxWidgets implementation
+// of wxVsnprintf. The standard vsnprintf() supports positional parameters on
+// many Unix systems but usually doesn't under Windows.
+//
+// Positional parameters are very useful when translating a program since using
+// them in formatting strings allow translators to correctly reorder the
+// translated sentences.
+//
+// Default is 1
+//
+// Recommended setting: 1 if you want to support multiple languages
+#define wxUSE_PRINTF_POS_PARAMS 0
+
+// ----------------------------------------------------------------------------
+// non GUI features selection
+// ----------------------------------------------------------------------------
+
+// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit
+// integer which is implemented in terms of native 64 bit integers if any or
+// uses emulation otherwise.
+//
+// This class is required by wxDateTime and so you should enable it if you want
+// to use wxDateTime. For most modern platforms, it will use the native 64 bit
+// integers in which case (almost) all of its functions are inline and it
+// almost does not take any space, so there should be no reason to switch it
+// off.
+//
+// Recommended setting: 1
+#define wxUSE_LONGLONG 1
+
+// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level
+// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions.
+//
+// Default is 1
+//
+// Recommended setting: 1 (wxFile is highly recommended as it is required by
+// i18n code, wxFileConfig and others)
+#define wxUSE_FILE 1
+#define wxUSE_FFILE 0
+
+// Use wxFSVolume class providing access to the configured/active mount points
+//
+// Default is 1
+//
+// Recommended setting: 1 (but may be safely disabled if you don't use it)
+#define wxUSE_FSVOLUME 0
+
+// Use wxStandardPaths class which allows to retrieve some standard locations
+// in the file system
+//
+// Default is 1
+//
+// Recommended setting: 1 (may be disabled to save space, but not much)
+#define wxUSE_STDPATHS 1
+
+// use wxTextBuffer class: required by wxTextFile
+#define wxUSE_TEXTBUFFER 1
+
+// use wxTextFile class: requires wxFile and wxTextBuffer, required by
+// wxFileConfig
+#define wxUSE_TEXTFILE 1
+
+// i18n support: _() macro, wxLocale class. Requires wxTextFile.
+#define wxUSE_INTL 1
+
+// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which
+// allow to manipulate dates, times and time intervals. wxDateTime replaces the
+// old wxTime and wxDate classes which are still provided for backwards
+// compatibility (and implemented in terms of wxDateTime).
+//
+// Note that this class is relatively new and is still officially in alpha
+// stage because some features are not yet (fully) implemented. It is already
+// quite useful though and should only be disabled if you are aiming at
+// absolutely minimal version of the library.
+//
+// Requires: wxUSE_LONGLONG
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_DATETIME 0
+
+// Set wxUSE_TIMER to 1 to compile wxTimer class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_TIMER 0
+
+// Use wxStopWatch clas.
+//
+// Default is 1
+//
+// Recommended setting: 1 (needed by wxSocket)
+#define wxUSE_STOPWATCH 0
+
+// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes
+// which allow the application to store its settings in the persistent
+// storage. Setting this to 1 will also enable on-demand creation of the
+// global config object in wxApp.
+//
+// See also wxUSE_CONFIG_NATIVE below.
+//
+// Recommended setting: 1
+#define wxUSE_CONFIG 1
+
+// If wxUSE_CONFIG is 1, you may choose to use either the native config
+// classes under Windows (using .INI files under Win16 and the registry under
+// Win32) or the portable text file format used by the config classes under
+// Unix.
+//
+// Default is 1 to use native classes. Note that you may still use
+// wxFileConfig even if you set this to 1 - just the config object created by
+// default for the applications needs will be a wxRegConfig or wxIniConfig and
+// not wxFileConfig.
+//
+// Recommended setting: 1
+#define wxUSE_CONFIG_NATIVE 0
+
+// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows
+// to connect/disconnect from the network and be notified whenever the dial-up
+// network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_DIALUP_MANAGER 0
+
+// Compile in classes for run-time DLL loading and function calling.
+// Required by wxUSE_DIALUP_MANAGER.
+//
+// This setting is for Win32 only
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_DYNLIB_CLASS 1
+
+// experimental, don't use for now
+#define wxUSE_DYNAMIC_LOADER 0
+
+// Set to 1 to use socket classes
+#define wxUSE_SOCKETS 0
+
+// Set to 1 to enable virtual file systems (required by wxHTML)
+#define wxUSE_FILESYSTEM 1
+
+// Set to 1 to enable virtual ZIP filesystem (requires wxUSE_FILESYSTEM)
+#define wxUSE_FS_ZIP 0
+
+// Set to 1 to enable virtual archive filesystem (requires wxUSE_FILESYSTEM)
+#define wxUSE_FS_ARCHIVE 0
+
+// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM)
+#define wxUSE_FS_INET 0
+
+// wxArchive classes for accessing archives such as zip and tar
+#define wxUSE_ARCHIVE_STREAMS 0
+
+// Set to 1 to compile wxZipInput/OutputStream classes.
+#define wxUSE_ZIPSTREAM 0
+
+// Set to 1 to compile wxTarInput/OutputStream classes.
+#define wxUSE_TARSTREAM 0
+
+// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by
+// wxUSE_LIBPNG
+#define wxUSE_ZLIB 0
+
+// If enabled, the code written by Apple will be used to write, in a portable
+// way, float on the disk. See extended.c for the license which is different
+// from wxWidgets one.
+//
+// Default is 1.
+//
+// Recommended setting: 1 unless you don't like the license terms (unlikely)
+#define wxUSE_APPLE_IEEE 0
+
+// Joystick support class
+#define wxUSE_JOYSTICK 0
+
+// wxFontMapper class
+#define wxUSE_FONTMAP 1
+
+// wxMimeTypesManager class
+#define wxUSE_MIMETYPE 0
+
+// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP
+// or wxURL you need to set this to 1.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_PROTOCOL 0
+
+// The settings for the individual URL schemes
+#define wxUSE_PROTOCOL_FILE 0
+#define wxUSE_PROTOCOL_FTP 0
+#define wxUSE_PROTOCOL_HTTP 0
+
+// Define this to use wxURL class.
+#define wxUSE_URL 0
+
+// Define this to use native platform url and protocol support.
+// Currently valid only for MS-Windows.
+// Note: if you set this to 1, you can open ftp/http/gopher sites
+// and obtain a valid input stream for these sites
+// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0.
+// Doing so reduces the code size.
+//
+// This code is experimental and subject to change.
+#define wxUSE_URL_NATIVE 0
+
+// Support for wxVariant class used in several places throughout the library,
+// notably in wxDataViewCtrl API.
+//
+// Default is 1.
+//
+// Recommended setting: 1 unless you want to reduce the library size as much as
+// possible in which case setting this to 0 can gain up to 100KB.
+#define wxUSE_VARIANT 0
+
+// Support for regular expression matching via wxRegEx class: enable this to
+// use POSIX regular expressions in your code. You need to compile regex
+// library from src/regex to use it under Windows.
+//
+// Default is 0
+//
+// Recommended setting: 1 if your compiler supports it, if it doesn't please
+// contribute us a makefile for src/regex for it
+#define wxUSE_REGEX 0
+
+// wxSystemOptions class
+#define wxUSE_SYSTEM_OPTIONS 0
+
+// wxSound class
+#define wxUSE_SOUND 0
+
+// Use wxMediaCtrl
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_MEDIACTRL 0
+
+// Use GStreamer for Unix (req a lot of dependancies)
+//
+// Default is 0
+//
+// Recommended setting: 1 (wxMediaCtrl won't work by default without it)
+#define wxUSE_GSTREAMER 0
+
+// Use wxWidget's XRC XML-based resource system. Recommended.
+//
+// Default is 1
+//
+// Recommended setting: 1 (requires wxUSE_XML)
+#define wxUSE_XRC 0
+
+// XML parsing classes. Note that their API will change in the future, so
+// using wxXmlDocument and wxXmlNode in your app is not recommended.
+//
+// Default is the same as wxUSE_XRC, i.e. 1 by default.
+//
+// Recommended setting: 1 (required by XRC)
+#define wxUSE_XML wxUSE_XRC
+
+// Use wxWidget's AUI docking system
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_AUI 0
+
+
+// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
+// 2D drawing API. (Still somewhat experimental)
+//
+// Please note that on Windows you will need to link with gdiplus.lib (use
+// USE_GDIPLUS=1 for makefile builds) and distribute gdiplus.dll with your
+// application if you want it to be runnable on pre-XP systems.
+//
+// Default is 0
+//
+// Recommended setting: 1
+#ifndef wxUSE_GRAPHICS_CONTEXT
+#define wxUSE_GRAPHICS_CONTEXT 0
+#endif
+
+// ----------------------------------------------------------------------------
+// Individual GUI controls
+// ----------------------------------------------------------------------------
+
+// You must set wxUSE_CONTROLS to 1 if you are using any controls at all
+// (without it, wxControl class is not compiled)
+//
+// Default is 1
+//
+// Recommended setting: 1 (don't change except for very special programs)
+#define wxUSE_CONTROLS 1
+
+// wxPopupWindow class is a top level transient window. It is currently used
+// to implement wxTipWindow
+//
+// Default is 1
+//
+// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW)
+#define wxUSE_POPUPWIN 0
+
+// wxTipWindow allows to implement the custom tooltips, it is used by the
+// context help classes. Requires wxUSE_POPUPWIN.
+//
+// Default is 1
+//
+// Recommended setting: 1 (may be set to 0)
+#define wxUSE_TIPWINDOW 0
+
+// Each of the settings below corresponds to one wxWidgets control. They are
+// all switched on by default but may be disabled if you are sure that your
+// program (including any standard dialogs it can show!) doesn't need them and
+// if you desperately want to save some space. If you use any of these you must
+// set wxUSE_CONTROLS as well.
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_ANIMATIONCTRL 0 // wxAnimationCtrl
+#define wxUSE_BUTTON 0 // wxButton
+#define wxUSE_BMPBUTTON 0 // wxBitmapButton
+#define wxUSE_CALENDARCTRL 0 // wxCalendarCtrl
+#define wxUSE_CHECKBOX 0 // wxCheckBox
+#define wxUSE_CHECKLISTBOX 0 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
+#define wxUSE_CHOICE 0 // wxChoice
+#define wxUSE_COLLPANE 0 // wxCollapsiblePane
+#define wxUSE_COLOURPICKERCTRL 0 // wxColourPickerCtrl
+#define wxUSE_COMBOBOX 0 // wxComboBox
+#define wxUSE_DATAVIEWCTRL 0 // wxDataViewCtrl
+#define wxUSE_DATEPICKCTRL 0 // wxDatePickerCtrl
+#define wxUSE_DIRPICKERCTRL 0 // wxDirPickerCtrl
+#define wxUSE_FILEPICKERCTRL 0 // wxFilePickerCtrl
+#define wxUSE_FONTPICKERCTRL 0 // wxFontPickerCtrl
+#define wxUSE_GAUGE 0 // wxGauge
+#define wxUSE_HYPERLINKCTRL 0 // wxHyperlinkCtrl
+#define wxUSE_LISTBOX 0 // wxListBox
+#define wxUSE_LISTCTRL 0 // wxListCtrl
+#define wxUSE_RADIOBOX 0 // wxRadioBox
+#define wxUSE_RADIOBTN 1 // wxRadioButton
+#define wxUSE_SCROLLBAR 0 // wxScrollBar
+#define wxUSE_SLIDER 0 // wxSlider
+#define wxUSE_SPINBTN 0 // wxSpinButton
+#define wxUSE_SPINCTRL 0 // wxSpinCtrl
+#define wxUSE_STATBOX 0 // wxStaticBox
+#define wxUSE_STATLINE 0 // wxStaticLine
+#define wxUSE_STATTEXT 0 // wxStaticText
+#define wxUSE_STATBMP 0 // wxStaticBitmap
+#define wxUSE_TEXTCTRL 0 // wxTextCtrl
+#define wxUSE_TOGGLEBTN 0 // requires wxButton
+#define wxUSE_TREECTRL 0 // wxTreeCtrl
+
+// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
+// below either wxStatusBar95 or a generic wxStatusBar will be used.
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_STATUSBAR 0
+
+// Two status bar implementations are available under Win32: the generic one
+// or the wrapper around native control. For native look and feel the native
+// version should be used.
+//
+// Default is 1 for the platforms where native status bar is supported.
+//
+// Recommended setting: 1 (there is no advantage in using the generic one)
+#define wxUSE_NATIVE_STATUSBAR 0
+
+// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar
+// classes at all. Otherwise, use the native toolbar class unless
+// wxUSE_TOOLBAR_NATIVE is 0.
+//
+// Default is 1 for all settings.
+//
+// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE.
+#define wxUSE_TOOLBAR 0
+#define wxUSE_TOOLBAR_NATIVE 0
+
+// wxNotebook is a control with several "tabs" located on one of its sides. It
+// may be used to logically organise the data presented to the user instead of
+// putting everything in one huge dialog. It replaces wxTabControl and related
+// classes of wxWin 1.6x.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_NOTEBOOK 0
+
+// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of
+// the tabs
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_LISTBOOK 0
+
+// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of
+// the tabs
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_CHOICEBOOK 0
+
+// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of
+// the tabs
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_TREEBOOK 0
+
+// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of
+// tabs
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_TOOLBOOK 0
+
+// wxTabDialog is a generic version of wxNotebook but it is incompatible with
+// the new class. It shouldn't be used in new code.
+//
+// Default is 0.
+//
+// Recommended setting: 0 (use wxNotebook)
+#define wxUSE_TAB_DIALOG 0
+
+// wxGrid class
+//
+// Default is 1, set to 0 to cut down compilation time and binaries size if you
+// don't use it.
+//
+// Recommended setting: 1
+//
+#define wxUSE_GRID 0
+
+// wxMiniFrame class: a frame with narrow title bar
+//
+// Default is 1.
+//
+// Recommended setting: 1 (it doesn't cost almost anything)
+#define wxUSE_MINIFRAME 0
+
+// wxComboCtrl and related classes: combobox with custom popup window and
+// not necessarily a listbox.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it
+// it used by wxComboBox
+#define wxUSE_COMBOCTRL 0
+
+// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox
+// items.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0, except where it is
+// needed as a base class for generic wxBitmapComboBox.
+#define wxUSE_ODCOMBOBOX 0
+
+// wxBitmapComboBox is a combobox that can have images in front of text items.
+//
+// Default is 1.
+//
+// Recommended setting: 1 but can be safely set to 0
+#define wxUSE_BITMAPCOMBOBOX 0
+
+// ----------------------------------------------------------------------------
+// Miscellaneous GUI stuff
+// ----------------------------------------------------------------------------
+
+// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar)
+#define wxUSE_ACCEL 0
+
+// Hotkey support (currently Windows only)
+#define wxUSE_HOTKEY 0
+
+// Use wxCaret: a class implementing a "cursor" in a text control (called caret
+// under Windows).
+//
+// Default is 1.
+//
+// Recommended setting: 1 (can be safely set to 0, not used by the library)
+#define wxUSE_CARET 0
+
+// Use wxDisplay class: it allows enumerating all displays on a system and
+// their geometries as well as finding the display on which the given point or
+// window lies.
+//
+// Default is 1.
+//
+// Recommended setting: 1 if you need it, can be safely set to 0 otherwise
+#define wxUSE_DISPLAY 0
+
+// Miscellaneous geometry code: needed for Canvas library
+#define wxUSE_GEOMETRY 0
+
+// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and
+// wxListCtrl.
+//
+// Default is 1.
+//
+// Recommended setting: 1 (set it to 0 if you don't use any of the controls
+// enumerated above, then this class is mostly useless too)
+#define wxUSE_IMAGLIST 0
+
+// Use wxMenu, wxMenuBar, wxMenuItem.
+//
+// Default is 1.
+//
+// Recommended setting: 1 (can't be disabled under MSW)
+#define wxUSE_MENUS 1
+
+// Use wxSashWindow class.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_SASH 0
+
+// Use wxSplitterWindow class.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_SPLITTER 0
+
+// Use wxToolTip and wxWindow::Set/GetToolTip() methods.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_TOOLTIPS 0
+
+// wxValidator class and related methods
+#define wxUSE_VALIDATORS 1
+
+// ----------------------------------------------------------------------------
+// common dialogs
+// ----------------------------------------------------------------------------
+
+// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g.
+// file selector, printer dialog). Switching this off also switches off the
+// printing architecture and interactive wxPrinterDC.
+//
+// Default is 1
+//
+// Recommended setting: 1 (unless it really doesn't work)
+#define wxUSE_COMMON_DIALOGS 0
+
+// wxBusyInfo displays window with message when app is busy. Works in same way
+// as wxBusyCursor
+#define wxUSE_BUSYINFO 0
+
+// Use single/multiple choice dialogs.
+//
+// Default is 1
+//
+// Recommended setting: 1 (used in the library itself)
+#define wxUSE_CHOICEDLG 0
+
+// Use colour picker dialog
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_COLOURDLG 0
+
+// wxDirDlg class for getting a directory name from user
+#define wxUSE_DIRDLG 0
+
+// TODO: setting to choose the generic or native one
+
+// Use file open/save dialogs.
+//
+// Default is 1
+//
+// Recommended setting: 1 (used in many places in the library itself)
+#define wxUSE_FILEDLG 0
+
+// Use find/replace dialogs.
+//
+// Default is 1
+//
+// Recommended setting: 1 (but may be safely set to 0)
+#define wxUSE_FINDREPLDLG 0
+
+// Use font picker dialog
+//
+// Default is 1
+//
+// Recommended setting: 1 (used in the library itself)
+#define wxUSE_FONTDLG 0
+
+// Use wxMessageDialog and wxMessageBox.
+//
+// Default is 1
+//
+// Recommended setting: 1 (used in the library itself)
+#define wxUSE_MSGDLG 1
+
+// progress dialog class for lengthy operations
+#define wxUSE_PROGRESSDLG 0
+
+// support for startup tips (wxShowTip &c)
+#define wxUSE_STARTUP_TIPS 0
+
+// text entry dialog and wxGetTextFromUser function
+#define wxUSE_TEXTDLG 0
+
+// number entry dialog
+#define wxUSE_NUMBERDLG 0
+
+// splash screen class
+#define wxUSE_SPLASH 0
+
+// wizards
+#define wxUSE_WIZARDDLG 0
+
+// Compile in wxAboutBox() function showing the standard "About" dialog.
+//
+// Default is 1
+//
+// Recommended setting: 1 but can be set to 0 to save some space if you don't
+// use this function
+#define wxUSE_ABOUTDLG 0
+
+// ----------------------------------------------------------------------------
+// Metafiles support
+// ----------------------------------------------------------------------------
+
+// Windows supports the graphics format known as metafile which is, though not
+// portable, is widely used under Windows and so is supported by wxWin (under
+// Windows only, of course). Win16 (Win3.1) used the so-called "Window
+// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in
+// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by
+// default, WMFs will be used under Win16 and EMFs under Win32. This may be
+// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting
+// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile
+// in any metafile related classes at all.
+//
+// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS.
+//
+// Recommended setting: default or 0 for everything for portable programs.
+#define wxUSE_METAFILE 0
+#define wxUSE_ENH_METAFILE 0
+#define wxUSE_WIN_METAFILES_ALWAYS 0
+
+// ----------------------------------------------------------------------------
+// Big GUI components
+// ----------------------------------------------------------------------------
+
+// Set to 0 to disable MDI support.
+//
+// Requires wxUSE_NOTEBOOK under platforms other than MSW.
+//
+// Default is 1.
+//
+// Recommended setting: 1, can be safely set to 0.
+#define wxUSE_MDI 0
+
+// Set to 0 to disable document/view architecture
+#define wxUSE_DOC_VIEW_ARCHITECTURE 0
+
+// Set to 0 to disable MDI document/view architecture
+//
+// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE
+#define wxUSE_MDI_ARCHITECTURE 0
+
+// Set to 0 to disable print/preview architecture code
+#define wxUSE_PRINTING_ARCHITECTURE 0
+
+// wxHTML sublibrary allows to display HTML in wxWindow programs and much,
+// much more.
+//
+// Default is 1.
+//
+// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a
+// smaller library.
+#define wxUSE_HTML 1
+
+// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
+// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
+// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
+// will need to manually add opengl32.lib and glu32.lib to the list of
+// libraries linked with your program if you use OpenGL.
+//
+// Default is 0.
+//
+// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
+#define wxUSE_GLCANVAS 0
+
+// wxRichTextCtrl allows editing of styled text.
+//
+// Default is 1.
+//
+// Recommended setting: 1, set to 0 if you want compile a
+// smaller library.
+#define wxUSE_RICHTEXT 0
+
+// ----------------------------------------------------------------------------
+// Data transfer
+// ----------------------------------------------------------------------------
+
+// Use wxClipboard class for clipboard copy/paste.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_CLIPBOARD 0
+
+// Use wxDataObject and related classes. Needed for clipboard and OLE drag and
+// drop
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_DATAOBJ 0
+
+// Use wxDropTarget and wxDropSource classes for drag and drop (this is
+// different from "built in" drag and drop in wxTreeCtrl which is always
+// available). Requires wxUSE_DATAOBJ.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_DRAG_AND_DROP 0
+
+// Use wxAccessible for enhanced and customisable accessibility.
+// Depends on wxUSE_OLE.
+//
+// Default is 0.
+//
+// Recommended setting (at present): 0
+#define wxUSE_ACCESSIBILITY 0
+
+// ----------------------------------------------------------------------------
+// miscellaneous settings
+// ----------------------------------------------------------------------------
+
+// wxSingleInstanceChecker class allows to verify at startup if another program
+// instance is running (it is only available under Win32)
+//
+// Default is 1
+//
+// Recommended setting: 1 (the class is tiny, disabling it won't save much
+// space)
+#define wxUSE_SNGLINST_CHECKER 0
+
+#define wxUSE_DRAGIMAGE 0
+
+#define wxUSE_IPC 0
+ // 0 for no interprocess comms
+#define wxUSE_HELP 0
+ // 0 for no help facility
+
+// Should we use MS HTML help for wxHelpController? If disabled, neither
+// wxCHMHelpController nor wxBestHelpController are available.
+//
+// Default is 1 under MSW, 0 is always used for the other platforms.
+//
+// Recommended setting: 1, only set to 0 if you have trouble compiling
+// wxCHMHelpController (could be a problem with really ancient compilers)
+#define wxUSE_MS_HTML_HELP 0
+
+
+// Use wxHTML-based help controller?
+#define wxUSE_WXHTML_HELP 0
+
+#define wxUSE_RESOURCES 0
+ // 0 for no wxGetResource/wxWriteResource
+#define wxUSE_CONSTRAINTS 0
+ // 0 for no window layout constraint system
+
+#define wxUSE_SPLINES 0
+ // 0 for no splines
+
+#define wxUSE_MOUSEWHEEL 0
+ // Include mouse wheel support
+
+// ----------------------------------------------------------------------------
+// postscript support settings
+// ----------------------------------------------------------------------------
+
+// Set to 1 for PostScript device context.
+#define wxUSE_POSTSCRIPT 0
+
+// Set to 1 to use font metric files in GetTextExtent
+#define wxUSE_AFM_FOR_POSTSCRIPT 0
+
+// ----------------------------------------------------------------------------
+// database classes
+// ----------------------------------------------------------------------------
+
+// Define 1 to use ODBC classes
+#define wxUSE_ODBC 0
+
+// For backward compatibility reasons, this parameter now only controls the
+// default scrolling method used by cursors. This default behavior can be
+// overriden by setting the second param of wxDB::wxDbGetConnection() or
+// wxDb() constructor to indicate whether the connection (and any wxDbTable()s
+// that use the connection) should support forward only scrolling of cursors,
+// or both forward and backward support for backward scrolling cursors is
+// dependent on the data source as well as the ODBC driver being used.
+#define wxODBC_FWD_ONLY_CURSORS 0
+
+// Default is 0. Set to 1 to use the deprecated classes, enum types, function,
+// member variables. With a setting of 1, full backward compatibility with the
+// 2.0.x release is possible. It is STRONGLY recommended that this be set to 0,
+// as future development will be done only on the non-deprecated
+// functions/classes/member variables/etc.
+#define wxODBC_BACKWARD_COMPATABILITY 0
+
+// ----------------------------------------------------------------------------
+// other compiler (mis)features
+// ----------------------------------------------------------------------------
+
+// Set this to 0 if your compiler can't cope with omission of prototype
+// parameters.
+//
+// Default is 1.
+//
+// Recommended setting: 1 (should never need to set this to 0)
+#define REMOVE_UNUSED_ARG 1
+
+// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
+// them. Set to 1 for <iostream.h>, 0 for <iostream>. Note that VC++ 7.1
+// and later doesn't support wxUSE_IOSTREAMH == 1 and so <iostream> will be
+// used anyhow.
+//
+// Default is 1.
+//
+// Recommended setting: whatever your compiler likes more
+#define wxUSE_IOSTREAMH 1
+
+// ----------------------------------------------------------------------------
+// image format support
+// ----------------------------------------------------------------------------
+
+// wxImage supports many different image formats which can be configured at
+// compile-time. BMP is always supported, others are optional and can be safely
+// disabled if you don't plan to use images in such format sometimes saving
+// substantial amount of code in the final library.
+//
+// Some formats require an extra library which is included in wxWin sources
+// which is mentioned if it is the case.
+
+// Set to 1 for wxImage support (recommended).
+#define wxUSE_IMAGE 1
+
+// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB.
+#define wxUSE_LIBPNG 0
+
+// Set to 1 for JPEG format support (requires libjpeg)
+#define wxUSE_LIBJPEG 0
+
+// Set to 1 for TIFF format support (requires libtiff)
+#define wxUSE_LIBTIFF 0
+
+// Set to 1 for TGA format support (loading only)
+#define wxUSE_TGA 0
+
+// Set to 1 for GIF format support
+#define wxUSE_GIF 1
+
+// Set to 1 for PNM format support
+#define wxUSE_PNM 0
+
+// Set to 1 for PCX format support
+#define wxUSE_PCX 0
+
+// Set to 1 for IFF format support (Amiga format)
+#define wxUSE_IFF 0
+
+// Set to 1 for XPM format support
+#define wxUSE_XPM 0
+
+// Set to 1 for MS Icons and Cursors format support
+#define wxUSE_ICO_CUR 0
+
+// Set to 1 to compile in wxPalette class
+#define wxUSE_PALETTE 0
+
+// ----------------------------------------------------------------------------
+// wxUniversal-only options
+// ----------------------------------------------------------------------------
+
+// Set to 1 to enable compilation of all themes, this is the default
+#define wxUSE_ALL_THEMES 0
+
+// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES
+// is unset, if it is set these options are not used; notice that metal theme
+// uses Win32 one
+#define wxUSE_THEME_GTK 0
+#define wxUSE_THEME_METAL 0
+#define wxUSE_THEME_MONO 0
+#define wxUSE_THEME_WIN32 0
+
+
+/* --- end common options --- */
+
+// ----------------------------------------------------------------------------
+// Windows-only settings
+// ----------------------------------------------------------------------------
+
+// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode
+// and want to run your programs under Windows 9x and not only NT/2000/XP.
+// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see
+// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note
+// that you will have to modify the makefiles to include unicows.lib import
+// library as the first library (see installation instructions in install.txt
+// to learn how to do it when building the library or samples).
+//
+// If your compiler doesn't have unicows.lib, you can get a version of it at
+// http://libunicows.sourceforge.net
+//
+// Default is 0
+//
+// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems)
+#ifndef wxUSE_UNICODE_MSLU
+ #define wxUSE_UNICODE_MSLU 0
+#endif
+
+// Set this to 1 if you want to use wxWidgets and MFC in the same program. This
+// will override some other settings (see below)
+//
+// Default is 0.
+//
+// Recommended setting: 0 unless you really have to use MFC
+#define wxUSE_MFC 0
+
+// Set this to 1 for generic OLE support: this is required for drag-and-drop,
+// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and
+// can't compile/doesn't have the OLE headers.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_OLE 0
+
+// Set this to 1 to enable wxAutomationObject class.
+//
+// Default is 1.
+//
+// Recommended setting: 1 if you need to control other applications via OLE
+// Automation, can be safely set to 0 otherwise
+#define wxUSE_OLE_AUTOMATION 0
+
+// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE
+// controls in wx.
+//
+// Default is 1.
+//
+// Recommended setting: 1, required by wxMediaCtrl
+#define wxUSE_ACTIVEX 0
+
+// wxDC cacheing implementation
+#define wxUSE_DC_CACHEING 0
+
+// Set this to 1 to enable the use of DIB's for wxBitmap to support
+// bitmaps > 16MB on Win95/98/Me. Set to 0 to use DDB's only.
+#define wxUSE_DIB_FOR_BITMAP 0
+
+// Set this to 1 to enable wxDIB class used internally for manipulating
+// wxBitmao data.
+//
+// Default is 1, set it to 0 only if you don't use wxImage neither
+//
+// Recommended setting: 1 (without it conversion to/from wxImage won't work)
+#define wxUSE_WXDIB 1
+
+// Set to 0 to disable PostScript print/preview architecture code under Windows
+// (just use Windows printing).
+#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 0
+
+// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH
+// which allows to put more than ~32Kb of text in it even under Win9x (NT
+// doesn't have such limitation).
+//
+// Default is 1 for compilers which support it
+//
+// Recommended setting: 1, only set it to 0 if your compiler doesn't have
+// or can't compile <richedit.h>
+#define wxUSE_RICHEDIT 0
+
+// Set this to 1 to use extra features of richedit v2 and later controls
+//
+// Default is 1 for compilers which support it
+//
+// Recommended setting: 1
+#define wxUSE_RICHEDIT2 0
+
+// Set this to 1 to enable support for the owner-drawn menu and listboxes. This
+// is required by wxUSE_CHECKLISTBOX.
+//
+// Default is 1.
+//
+// Recommended setting: 1, set to 0 for a small library size reduction
+#define wxUSE_OWNER_DRAWN 0
+
+// Set to 1 to compile MS Windows XP theme engine support
+#define wxUSE_UXTHEME 0
+
+// Set to 1 to auto-adapt to MS Windows XP themes where possible
+// (notably, wxNotebook pages)
+#define wxUSE_UXTHEME_AUTO 0
+
+// Set to 1 to use InkEdit control (Tablet PC), if available
+#define wxUSE_INKEDIT 0
+
+// ----------------------------------------------------------------------------
+// Generic versions of native controls
+// ----------------------------------------------------------------------------
+
+// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the
+// native wxDatePickerCtrl
+//
+// Default is 0.
+//
+// Recommended setting: 0, this is mainly used for testing
+#define wxUSE_DATEPICKCTRL_GENERIC 0
+
+// ----------------------------------------------------------------------------
+// Crash debugging helpers
+// ----------------------------------------------------------------------------
+
+// Set this to 1 to be able to use wxCrashReport::Generate() to create mini
+// dumps of your program when it crashes (or at any other moment)
+//
+// Default is 1 if supported by the compiler (VC++ and recent BC++ only).
+//
+// Recommended setting: 1, set to 0 if your programs never crash
+#define wxUSE_CRASHREPORT 0
+
+// ----------------------------------------------------------------------------
+// obsolete settings
+// ----------------------------------------------------------------------------
+
+// NB: all settings in this section are obsolete and should not be used/changed
+// at all, they will disappear
+
+// Define 1 to use bitmap messages.
+#define wxUSE_BITMAP_MESSAGE 0
+
+#endif // _WX_SETUP_H_
+
diff --git a/Contrib/NSIS Menu/wx/wxbuild.bat b/Contrib/NSIS Menu/wx/wxbuild.bat
index f37d0d0..0c29e84 100755
--- a/Contrib/NSIS Menu/wx/wxbuild.bat
+++ b/Contrib/NSIS Menu/wx/wxbuild.bat
@@ -1,18 +1,18 @@
-if not exist setup.h goto setup_error
-if not exist "%WXWIN%\build\msw\makefile.vc" goto error
-set OLDCD=%CD%
-cd /D "%WXWIN%\build\msw"
-copy /y "%WXWIN%\include\wx\msw\setup.h" "%OLDCD%\old_setup.h"
-copy /y "%OLDCD%\setup.h" "%WXWIN%\include\wx\msw\setup.h"
-rd /S ..\..\lib\vc_libnsis
-rd /S vc_mswnsis
-nmake -f makefile.vc CFG=nsis BUILD=release RUNTIME_LIBS=dynamic SHARED=0 UNICODE=0 WXUNIV=0 USE_OPENGL=0 USE_ODBC=0 USE_HTML=1 USE_XRC=0
-copy /y "%OLDCD%\old_setup.h" "%WXWIN%\include\wx\msw\setup.h"
-cd /D "%OLDCD%"
-goto done
-:error
-echo WXWIN is not properly set
-goto done
-:setup_error
-echo setup.h cannot be found, wrong working directory?
-:done
+if not exist setup.h goto setup_error
+if not exist "%WXWIN%\build\msw\makefile.vc" goto error
+set OLDCD=%CD%
+cd /D "%WXWIN%\build\msw"
+copy /y "%WXWIN%\include\wx\msw\setup.h" "%OLDCD%\old_setup.h"
+copy /y "%OLDCD%\setup.h" "%WXWIN%\include\wx\msw\setup.h"
+rd /S ..\..\lib\vc_libnsis
+rd /S vc_mswnsis
+nmake -f makefile.vc CFG=nsis BUILD=release RUNTIME_LIBS=dynamic SHARED=0 UNICODE=0 WXUNIV=0 USE_OPENGL=0 USE_ODBC=0 USE_HTML=1 USE_XRC=0
+copy /y "%OLDCD%\old_setup.h" "%WXWIN%\include\wx\msw\setup.h"
+cd /D "%OLDCD%"
+goto done
+:error
+echo WXWIN is not properly set
+goto done
+:setup_error
+echo setup.h cannot be found, wrong working directory?
+:done
diff --git a/Contrib/NSISdl/License.txt b/Contrib/NSISdl/License.txt
index f5e9621..642304f 100755
--- a/Contrib/NSISdl/License.txt
+++ b/Contrib/NSISdl/License.txt
@@ -1,18 +1,18 @@
-NSISdl 1.1 - HTTP downloading plugin for NSIS
-Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
-
-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.
+NSISdl 1.1 - HTTP downloading plugin for NSIS
+Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
+
+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. \ No newline at end of file
diff --git a/Contrib/NSISdl/ReadMe.txt b/Contrib/NSISdl/ReadMe.txt
index 986ed07..db98b43 100755
--- a/Contrib/NSISdl/ReadMe.txt
+++ b/Contrib/NSISdl/ReadMe.txt
@@ -1,91 +1,91 @@
-NSISdl 1.3 - HTTP downloading plugin for NSIS
----------------------------------------------
-
-Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
-
-This plugin can be used from NSIS to download files via http.
-
-To connect to the internet, use the Dialer plugin.
-
-USAGE
------
-
-NSISdl::download http://www.domain.com/file localfile.exe
-
-You can also pass /TIMEOUT to set the timeout in milliseconds:
-
-NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe
-
-The return value is pushed to the stack:
-
- "cancel" if cancelled
- "success" if success
- otherwise, an error string describing the error
-
-If you don't want the progress window to appear, use NSISdl::download_quiet.
-
-Example of usage:
-
-NSISdl::download http://www.domain.com/file localfile.exe
-Pop $R0 ;Get the return value
- StrCmp $R0 "success" +3
- MessageBox MB_OK "Download failed: $R0"
- Quit
-
-For another example, see waplugin.nsi in the examples directory.
-
-PROXIES
--------
-
-NSISdl supports only basic configurations of proxies. It doesn't support
-proxies which require authentication, automatic configuration script, etc.
-NSISdl reads the proxy configuration from Internet Explorer's registry key
-under HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings. It
-reads and parses ProxyEnable and ProxyServer.
-
-If you don't want NSISdl to use Internet Explorer's settings, use the
-/NOIEPROXY flag. /NOIEPROXY should be used after /TRANSLATE and
-/TIMEOUT. For example:
-
-If you want to specify a proxy on your own, use the /PROXY flag.
-
-NSISdl::download /NOIEPROXY http://www.domain.com/file localfile.exe
-NSISdl::download /TIMEOUT=30000 /NOIEPROXY http://www.domain.com/file localfile.exe
-NSISdl::download /PROXY proxy.whatever.com http://www.domain.com/file localfile.exe
-NSISdl::download /PROXY proxy.whatever.com:8080 http://www.domain.com/file localfile.exe
-
-TRANSLATE
----------
-
-To translate NSISdl add the following values to the call line:
-
-/TRANSLATE2 downloading connecting second minute hour seconds minutes hours progress
-
-Default values are:
-
- downloading - "Downloading %s"
- connecting - "Connecting ..."
- second - " (1 second remaining)"
- minute - " (1 minute remaining)"
- hour - " (1 hour remaining)"
- seconds - " (%u seconds remaining)"
- minutes - " (%u minutes remaining)"
- hours - " (%u hours remaining)"
- progress - "%skB (%d%%) of %skB @ %u.%01ukB/s"
-
-The old /TRANSLATE method still works for backward compatibility.
-
-/TRANSLATE downloading connecting second minute hour plural progress remianing
-
-Default values are:
-
- downloading - "Downloading %s"
- connecting - "Connecting ..."
- second - "second"
- minute - "minute"
- hour - "hour"
- plural - "s"
- progress - "%dkB (%d%%) of %ukB @ %d.%01dkB/s"
- remaining - " (%d %s%s remaining)"
-
-/TRANSLATE and /TRANSLATE2 must come before /TIMEOUT.
+NSISdl 1.3 - HTTP downloading plugin for NSIS
+---------------------------------------------
+
+Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
+
+This plugin can be used from NSIS to download files via http.
+
+To connect to the internet, use the Dialer plugin.
+
+USAGE
+-----
+
+NSISdl::download http://www.domain.com/file localfile.exe
+
+You can also pass /TIMEOUT to set the timeout in milliseconds:
+
+NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe
+
+The return value is pushed to the stack:
+
+ "cancel" if cancelled
+ "success" if success
+ otherwise, an error string describing the error
+
+If you don't want the progress window to appear, use NSISdl::download_quiet.
+
+Example of usage:
+
+NSISdl::download http://www.domain.com/file localfile.exe
+Pop $R0 ;Get the return value
+ StrCmp $R0 "success" +3
+ MessageBox MB_OK "Download failed: $R0"
+ Quit
+
+For another example, see waplugin.nsi in the examples directory.
+
+PROXIES
+-------
+
+NSISdl supports only basic configurations of proxies. It doesn't support
+proxies which require authentication, automatic configuration script, etc.
+NSISdl reads the proxy configuration from Internet Explorer's registry key
+under HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings. It
+reads and parses ProxyEnable and ProxyServer.
+
+If you don't want NSISdl to use Internet Explorer's settings, use the
+/NOIEPROXY flag. /NOIEPROXY should be used after /TRANSLATE and
+/TIMEOUT. For example:
+
+If you want to specify a proxy on your own, use the /PROXY flag.
+
+NSISdl::download /NOIEPROXY http://www.domain.com/file localfile.exe
+NSISdl::download /TIMEOUT=30000 /NOIEPROXY http://www.domain.com/file localfile.exe
+NSISdl::download /PROXY proxy.whatever.com http://www.domain.com/file localfile.exe
+NSISdl::download /PROXY proxy.whatever.com:8080 http://www.domain.com/file localfile.exe
+
+TRANSLATE
+---------
+
+To translate NSISdl add the following values to the call line:
+
+/TRANSLATE2 downloading connecting second minute hour seconds minutes hours progress
+
+Default values are:
+
+ downloading - "Downloading %s"
+ connecting - "Connecting ..."
+ second - " (1 second remaining)"
+ minute - " (1 minute remaining)"
+ hour - " (1 hour remaining)"
+ seconds - " (%u seconds remaining)"
+ minutes - " (%u minutes remaining)"
+ hours - " (%u hours remaining)"
+ progress - "%skB (%d%%) of %skB @ %u.%01ukB/s"
+
+The old /TRANSLATE method still works for backward compatibility.
+
+/TRANSLATE downloading connecting second minute hour plural progress remianing
+
+Default values are:
+
+ downloading - "Downloading %s"
+ connecting - "Connecting ..."
+ second - "second"
+ minute - "minute"
+ hour - "hour"
+ plural - "s"
+ progress - "%dkB (%d%%) of %ukB @ %d.%01dkB/s"
+ remaining - " (%d %s%s remaining)"
+
+/TRANSLATE and /TRANSLATE2 must come before /TIMEOUT.
diff --git a/Contrib/NSISdl/SConscript b/Contrib/NSISdl/SConscript
index e4d9f6c..101aa15 100755
--- a/Contrib/NSISdl/SConscript
+++ b/Contrib/NSISdl/SConscript
@@ -1,30 +1,30 @@
-target = 'NSISdl'
-
-files = Split("""
- asyncdns.cpp
- connection.cpp
- httpget.cpp
- nsisdl.cpp
- util.cpp
-""")
-
-libs = Split("""
- kernel32
- user32
- advapi32
- ws2_32
-""")
-
-docs = Split("""
- License.txt
- ReadMe.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(
- target, files, libs,
- docs = docs,
- cppused = True,
- nodeflib = False,
-)
+target = 'NSISdl'
+
+files = Split("""
+ asyncdns.cpp
+ connection.cpp
+ httpget.cpp
+ nsisdl.cpp
+ util.cpp
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ advapi32
+ ws2_32
+""")
+
+docs = Split("""
+ License.txt
+ ReadMe.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(
+ target, files, libs,
+ docs = docs,
+ cppused = True,
+ nodeflib = False,
+)
diff --git a/Contrib/NSISdl/asyncdns.cpp b/Contrib/NSISdl/asyncdns.cpp
index 360a372..da3e4d3 100755
--- a/Contrib/NSISdl/asyncdns.cpp
+++ b/Contrib/NSISdl/asyncdns.cpp
@@ -1,82 +1,82 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: asyncdns.cpp - JNL portable asynchronous DNS implementation
-** License: see jnetlib.h
-*/
-
-
-#include "netinc.h"
-#include "util.h"
-#include "asyncdns.h"
-
-JNL_AsyncDNS::JNL_AsyncDNS()
-{
- m_thread=0;
- m_addr=0;
- m_hostname[0]=0;
-}
-
-JNL_AsyncDNS::~JNL_AsyncDNS()
-{
- wait_for_thread_death();
-}
-
-unsigned long WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
-{
- JNL_AsyncDNS *_this=(JNL_AsyncDNS*)_d;
- struct hostent *hostentry;
- hostentry=::gethostbyname(_this->m_hostname);
- if (hostentry)
- {
- _this->m_addr=*((int*)hostentry->h_addr);
- }
- else
- _this->m_addr=INADDR_NONE;
- return 0;
-}
-
-int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
-{
- // return 0 on success, 1 on wait, -1 on unresolvable
- unsigned long ip=inet_addr(hostname);
- if (ip != INADDR_NONE)
- {
- *addr=ip;
- return 0;
- }
-
- if (lstrcmpi(m_hostname,hostname)) m_addr=0;
- else if (m_addr == INADDR_NONE)
- {
- wait_for_thread_death();
- return -1;
- }
- else if (m_addr)
- {
- *addr=m_addr;
- wait_for_thread_death();
- return 0;
- }
- lstrcpy(m_hostname,hostname);
-
- if (!m_thread)
- {
- DWORD id;
- m_thread=CreateThread(NULL,0,_threadfunc,(LPVOID)this,0,&id);
- if (!m_thread) return -1;
- }
- return 1;
-}
-
-void JNL_AsyncDNS::wait_for_thread_death()
-{
- if (m_thread)
- {
- WaitForSingleObject(m_thread,INFINITE);
- CloseHandle(m_thread);
- }
-
- m_thread=0;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: asyncdns.cpp - JNL portable asynchronous DNS implementation
+** License: see jnetlib.h
+*/
+
+
+#include "netinc.h"
+#include "util.h"
+#include "asyncdns.h"
+
+JNL_AsyncDNS::JNL_AsyncDNS()
+{
+ m_thread=0;
+ m_addr=0;
+ m_hostname[0]=0;
+}
+
+JNL_AsyncDNS::~JNL_AsyncDNS()
+{
+ wait_for_thread_death();
+}
+
+unsigned long WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
+{
+ JNL_AsyncDNS *_this=(JNL_AsyncDNS*)_d;
+ struct hostent *hostentry;
+ hostentry=::gethostbyname(_this->m_hostname);
+ if (hostentry)
+ {
+ _this->m_addr=*((int*)hostentry->h_addr);
+ }
+ else
+ _this->m_addr=INADDR_NONE;
+ return 0;
+}
+
+int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
+{
+ // return 0 on success, 1 on wait, -1 on unresolvable
+ unsigned long ip=inet_addr(hostname);
+ if (ip != INADDR_NONE)
+ {
+ *addr=ip;
+ return 0;
+ }
+
+ if (lstrcmpi(m_hostname,hostname)) m_addr=0;
+ else if (m_addr == INADDR_NONE)
+ {
+ wait_for_thread_death();
+ return -1;
+ }
+ else if (m_addr)
+ {
+ *addr=m_addr;
+ wait_for_thread_death();
+ return 0;
+ }
+ lstrcpy(m_hostname,hostname);
+
+ if (!m_thread)
+ {
+ DWORD id;
+ m_thread=CreateThread(NULL,0,_threadfunc,(LPVOID)this,0,&id);
+ if (!m_thread) return -1;
+ }
+ return 1;
+}
+
+void JNL_AsyncDNS::wait_for_thread_death()
+{
+ if (m_thread)
+ {
+ WaitForSingleObject(m_thread,INFINITE);
+ CloseHandle(m_thread);
+ }
+
+ m_thread=0;
+}
diff --git a/Contrib/NSISdl/asyncdns.h b/Contrib/NSISdl/asyncdns.h
index ba750a3..f99d3ef 100755
--- a/Contrib/NSISdl/asyncdns.h
+++ b/Contrib/NSISdl/asyncdns.h
@@ -1,39 +1,39 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: asyncdns.h - JNL portable asynchronous DNS interface
-** License: see jnetlib.h
-**
-** Usage:
-** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries.
-** 2. call resolve() to resolve a hostname into an address. The return value of
-** resolve is 0 on success (host successfully resolved), 1 on wait (meaning
-** try calling resolve() with the same hostname in a few hundred milliseconds
-** or so), or -1 on error (i.e. the host can't resolve).
-** 4. enjoy.
-*/
-
-#ifndef _ASYNCDNS_H_
-#define _ASYNCDNS_H_
-
-class JNL_AsyncDNS
-{
-public:
- JNL_AsyncDNS();
- ~JNL_AsyncDNS();
-
- int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
-
-private:
- void wait_for_thread_death();
-
- char m_hostname[256];
- unsigned long m_addr;
-
- HANDLE m_thread;
- static unsigned long WINAPI _threadfunc(LPVOID _d);
-
-};
-
-#endif //_ASYNCDNS_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: asyncdns.h - JNL portable asynchronous DNS interface
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries.
+** 2. call resolve() to resolve a hostname into an address. The return value of
+** resolve is 0 on success (host successfully resolved), 1 on wait (meaning
+** try calling resolve() with the same hostname in a few hundred milliseconds
+** or so), or -1 on error (i.e. the host can't resolve).
+** 4. enjoy.
+*/
+
+#ifndef _ASYNCDNS_H_
+#define _ASYNCDNS_H_
+
+class JNL_AsyncDNS
+{
+public:
+ JNL_AsyncDNS();
+ ~JNL_AsyncDNS();
+
+ int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
+
+private:
+ void wait_for_thread_death();
+
+ char m_hostname[256];
+ unsigned long m_addr;
+
+ HANDLE m_thread;
+ static unsigned long WINAPI _threadfunc(LPVOID _d);
+
+};
+
+#endif //_ASYNCDNS_H_
diff --git a/Contrib/NSISdl/connection.cpp b/Contrib/NSISdl/connection.cpp
index ca45427..b542654 100755
--- a/Contrib/NSISdl/connection.cpp
+++ b/Contrib/NSISdl/connection.cpp
@@ -1,445 +1,445 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: connection.cpp - JNL TCP connection implementation
-** License: see jnetlib.h
-*/
-
-#include "netinc.h"
-#include "util.h"
-#include "connection.h"
-
-
-JNL_Connection::JNL_Connection(JNL_AsyncDNS *dns, int sendbufsize, int recvbufsize)
-{
- m_errorstr="";
- if (dns == JNL_CONNECTION_AUTODNS)
- {
- m_dns=new JNL_AsyncDNS();
- m_dns_owned=1;
- }
- else
- {
- m_dns=dns;
- m_dns_owned=0;
- }
- m_recv_buffer_len=recvbufsize;
- m_send_buffer_len=sendbufsize;
- m_recv_buffer=(char*)malloc(m_recv_buffer_len);
- m_send_buffer=(char*)malloc(m_send_buffer_len);
- m_socket=-1;
- m_remote_port=0;
- m_state=STATE_NOCONNECTION;
- m_recv_len=m_recv_pos=0;
- m_send_len=m_send_pos=0;
- m_host[0]=0;
- memset(&m_saddr,0,sizeof(m_saddr));
-}
-
-void JNL_Connection::connect(int s, struct sockaddr_in *loc)
-{
- close(1);
- m_socket=s;
- m_remote_port=0;
- m_dns=NULL;
- if (loc) m_saddr=*loc;
- else memset(&m_saddr,0,sizeof(m_saddr));
- if (m_socket != -1)
- {
- SET_SOCK_BLOCK(m_socket,0);
- m_state=STATE_CONNECTED;
- }
- else
- {
- m_errorstr="invalid socket passed to connect";
- m_state=STATE_ERROR;
- }
-}
-
-void JNL_Connection::connect(char *hostname, int port)
-{
- close(1);
- m_remote_port=(short)port;
- m_socket=::socket(AF_INET,SOCK_STREAM,0);
- if (m_socket==-1)
- {
- m_errorstr="creating socket";
- m_state=STATE_ERROR;
- }
- else
- {
- SET_SOCK_BLOCK(m_socket,0);
- strncpy(m_host,hostname,sizeof(m_host)-1);
- m_host[sizeof(m_host)-1]=0;
- memset(&m_saddr,0,sizeof(m_saddr));
- if (!m_host[0])
- {
- m_errorstr="empty hostname";
- m_state=STATE_ERROR;
- }
- else
- {
- m_state=STATE_RESOLVING;
- m_saddr.sin_family=AF_INET;
- m_saddr.sin_port=htons((unsigned short)port);
- m_saddr.sin_addr.s_addr=inet_addr(hostname);
- }
- }
-}
-
-JNL_Connection::~JNL_Connection()
-{
- if (m_socket >= 0)
- {
- ::shutdown(m_socket, SHUT_RDWR);
- ::closesocket(m_socket);
- m_socket=-1;
- }
- free(m_recv_buffer);
- free(m_send_buffer);
- if (m_dns_owned)
- {
- delete m_dns;
- }
-}
-
-void JNL_Connection::run(int max_send_bytes, int max_recv_bytes, int *bytes_sent, int *bytes_rcvd)
-{
- int bytes_allowed_to_send=(max_send_bytes<0)?m_send_buffer_len:max_send_bytes;
- int bytes_allowed_to_recv=(max_recv_bytes<0)?m_recv_buffer_len:max_recv_bytes;
-
- if (bytes_sent) *bytes_sent=0;
- if (bytes_rcvd) *bytes_rcvd=0;
-
- switch (m_state)
- {
- case STATE_RESOLVING:
- if (m_saddr.sin_addr.s_addr == INADDR_NONE)
- {
- int a=m_dns?m_dns->resolve(m_host,(unsigned long int *)&m_saddr.sin_addr.s_addr):-1;
- if (!a) { m_state=STATE_CONNECTING; }
- else if (a == 1)
- {
- m_state=STATE_RESOLVING;
- break;
- }
- else
- {
- m_errorstr="resolving hostname";
- m_state=STATE_ERROR;
- return;
- }
- }
- if (!::connect(m_socket,(struct sockaddr *)&m_saddr,16))
- {
- m_state=STATE_CONNECTED;
- }
- else if (ERRNO!=EINPROGRESS)
- {
- m_errorstr="connecting to host";
- m_state=STATE_ERROR;
- }
- else { m_state=STATE_CONNECTING; }
- break;
- case STATE_CONNECTING:
- {
- fd_set f[3];
- FD_ZERO(&f[0]);
- FD_ZERO(&f[1]);
- FD_ZERO(&f[2]);
- FD_SET(m_socket,&f[0]);
- FD_SET(m_socket,&f[1]);
- FD_SET(m_socket,&f[2]);
- struct timeval tv;
- memset(&tv,0,sizeof(tv));
- if (select(m_socket+1,&f[0],&f[1],&f[2],&tv)==-1)
- {
- m_errorstr="connecting to host (calling select())";
- m_state=STATE_ERROR;
- }
- else if (FD_ISSET(m_socket,&f[1]))
- {
- m_state=STATE_CONNECTED;
- }
- else if (FD_ISSET(m_socket,&f[2]))
- {
- m_errorstr="connecting to host";
- m_state=STATE_ERROR;
- }
- }
- break;
- case STATE_CONNECTED:
- case STATE_CLOSING:
- if (m_send_len>0 && bytes_allowed_to_send>0)
- {
- int len=m_send_buffer_len-m_send_pos;
- if (len > m_send_len) len=m_send_len;
- if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
- if (len > 0)
- {
- int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
- if (res==-1 && ERRNO != EWOULDBLOCK)
- {
-// m_state=STATE_CLOSED;
-// return;
- }
- if (res>0)
- {
- bytes_allowed_to_send-=res;
- if (bytes_sent) *bytes_sent+=res;
- m_send_pos+=res;
- m_send_len-=res;
- }
- }
- if (m_send_pos>=m_send_buffer_len)
- {
- m_send_pos=0;
- if (m_send_len>0)
- {
- len=m_send_buffer_len-m_send_pos;
- if (len > m_send_len) len=m_send_len;
- if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
- int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
- if (res==-1 && ERRNO != EWOULDBLOCK)
- {
-// m_state=STATE_CLOSED;
- }
- if (res>0)
- {
- bytes_allowed_to_send-=res;
- if (bytes_sent) *bytes_sent+=res;
- m_send_pos+=res;
- m_send_len-=res;
- }
- }
- }
- }
- if (m_recv_len<m_recv_buffer_len)
- {
- int len=m_recv_buffer_len-m_recv_pos;
- if (len > m_recv_buffer_len-m_recv_len) len=m_recv_buffer_len-m_recv_len;
- if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
- if (len>0)
- {
- int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
- if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
- {
- m_state=STATE_CLOSED;
- break;
- }
- if (res > 0)
- {
- bytes_allowed_to_recv-=res;
- if (bytes_rcvd) *bytes_rcvd+=res;
- m_recv_pos+=res;
- m_recv_len+=res;
- }
- }
- if (m_recv_pos >= m_recv_buffer_len)
- {
- m_recv_pos=0;
- if (m_recv_len < m_recv_buffer_len)
- {
- len=m_recv_buffer_len-m_recv_len;
- if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
- if (len > 0)
- {
- int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
- if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
- {
- m_state=STATE_CLOSED;
- break;
- }
- if (res > 0)
- {
- bytes_allowed_to_recv-=res;
- if (bytes_rcvd) *bytes_rcvd+=res;
- m_recv_pos+=res;
- m_recv_len+=res;
- }
- }
- }
- }
- }
- if (m_state == STATE_CLOSING)
- {
- if (m_send_len < 1) m_state = STATE_CLOSED;
- }
- break;
- default: break;
- }
-}
-
-void JNL_Connection::close(int quick)
-{
- if (quick || m_state == STATE_RESOLVING || m_state == STATE_CONNECTING)
- {
- m_state=STATE_CLOSED;
- if (m_socket >= 0)
- {
- ::shutdown(m_socket, SHUT_RDWR);
- ::closesocket(m_socket);
- }
- m_socket=-1;
- memset(m_recv_buffer,0,m_recv_buffer_len);
- memset(m_send_buffer,0,m_send_buffer_len);
- m_remote_port=0;
- m_recv_len=m_recv_pos=0;
- m_send_len=m_send_pos=0;
- m_host[0]=0;
- memset(&m_saddr,0,sizeof(m_saddr));
- }
- else
- {
- if (m_state == STATE_CONNECTED) m_state=STATE_CLOSING;
- }
-}
-
-int JNL_Connection::send_bytes_in_queue(void)
-{
- return m_send_len;
-}
-
-int JNL_Connection::send_bytes_available(void)
-{
- return m_send_buffer_len-m_send_len;
-}
-
-int JNL_Connection::send(char *data, int length)
-{
- if (length > send_bytes_available())
- {
- return -1;
- }
-
- int write_pos=m_send_pos+m_send_len;
- if (write_pos >= m_send_buffer_len)
- {
- write_pos-=m_send_buffer_len;
- }
-
- int len=m_send_buffer_len-write_pos;
- if (len > length)
- {
- len=length;
- }
-
- memcpy(m_send_buffer+write_pos,data,len);
- if (length > len)
- {
- memcpy(m_send_buffer,data+len,length-len);
- }
- m_send_len+=length;
- return 0;
-}
-
-int JNL_Connection::send_string(char *line)
-{
- return send(line,strlen(line));
-}
-
-int JNL_Connection::recv_bytes_available(void)
-{
- return m_recv_len;
-}
-
-int JNL_Connection::peek_bytes(char *data, int maxlength)
-{
- if (maxlength > m_recv_len)
- {
- maxlength=m_recv_len;
- }
- int read_pos=m_recv_pos-m_recv_len;
- if (read_pos < 0)
- {
- read_pos += m_recv_buffer_len;
- }
- int len=m_recv_buffer_len-read_pos;
- if (len > maxlength)
- {
- len=maxlength;
- }
- memcpy(data,m_recv_buffer+read_pos,len);
- if (len < maxlength)
- {
- memcpy(data+len,m_recv_buffer,maxlength-len);
- }
-
- return maxlength;
-}
-
-int JNL_Connection::recv_bytes(char *data, int maxlength)
-{
-
- int ml=peek_bytes(data,maxlength);
- m_recv_len-=ml;
- return ml;
-}
-
-int JNL_Connection::getbfromrecv(int pos, int remove)
-{
- int read_pos=m_recv_pos-m_recv_len + pos;
- if (pos < 0 || pos > m_recv_len) return -1;
- if (read_pos < 0)
- {
- read_pos += m_recv_buffer_len;
- }
- if (read_pos >= m_recv_buffer_len)
- {
- read_pos-=m_recv_buffer_len;
- }
- if (remove) m_recv_len--;
- return m_recv_buffer[read_pos];
-}
-
-int JNL_Connection::recv_lines_available(void)
-{
- int l=recv_bytes_available();
- int lcount=0;
- int lastch=0;
- int pos;
- for (pos=0; pos < l; pos ++)
- {
- int t=getbfromrecv(pos,0);
- if (t == -1) return lcount;
- if ((t=='\r' || t=='\n') &&(
- (lastch != '\r' && lastch != '\n') || lastch==t
- )) lcount++;
- lastch=t;
- }
- return lcount;
-}
-
-int JNL_Connection::recv_line(char *line, int maxlength)
-{
- if (maxlength > m_recv_len) maxlength=m_recv_len;
- while (maxlength--)
- {
- int t=getbfromrecv(0,1);
- if (t == -1)
- {
- *line=0;
- return 0;
- }
- if (t == '\r' || t == '\n')
- {
- int r=getbfromrecv(0,0);
- if ((r == '\r' || r == '\n') && r != t) getbfromrecv(0,1);
- *line=0;
- return 0;
- }
- *line++=(char)t;
- }
- return 1;
-}
-
-unsigned long JNL_Connection::get_interface(void)
-{
- if (m_socket==-1) return 0;
- struct sockaddr_in sin;
- memset(&sin,0,sizeof(sin));
- socklen_t len=16;
- if (::getsockname(m_socket,(struct sockaddr *)&sin,&len)) return 0;
- return (unsigned long) sin.sin_addr.s_addr;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: connection.cpp - JNL TCP connection implementation
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "connection.h"
+
+
+JNL_Connection::JNL_Connection(JNL_AsyncDNS *dns, int sendbufsize, int recvbufsize)
+{
+ m_errorstr="";
+ if (dns == JNL_CONNECTION_AUTODNS)
+ {
+ m_dns=new JNL_AsyncDNS();
+ m_dns_owned=1;
+ }
+ else
+ {
+ m_dns=dns;
+ m_dns_owned=0;
+ }
+ m_recv_buffer_len=recvbufsize;
+ m_send_buffer_len=sendbufsize;
+ m_recv_buffer=(char*)malloc(m_recv_buffer_len);
+ m_send_buffer=(char*)malloc(m_send_buffer_len);
+ m_socket=-1;
+ m_remote_port=0;
+ m_state=STATE_NOCONNECTION;
+ m_recv_len=m_recv_pos=0;
+ m_send_len=m_send_pos=0;
+ m_host[0]=0;
+ memset(&m_saddr,0,sizeof(m_saddr));
+}
+
+void JNL_Connection::connect(int s, struct sockaddr_in *loc)
+{
+ close(1);
+ m_socket=s;
+ m_remote_port=0;
+ m_dns=NULL;
+ if (loc) m_saddr=*loc;
+ else memset(&m_saddr,0,sizeof(m_saddr));
+ if (m_socket != -1)
+ {
+ SET_SOCK_BLOCK(m_socket,0);
+ m_state=STATE_CONNECTED;
+ }
+ else
+ {
+ m_errorstr="invalid socket passed to connect";
+ m_state=STATE_ERROR;
+ }
+}
+
+void JNL_Connection::connect(char *hostname, int port)
+{
+ close(1);
+ m_remote_port=(short)port;
+ m_socket=::socket(AF_INET,SOCK_STREAM,0);
+ if (m_socket==-1)
+ {
+ m_errorstr="creating socket";
+ m_state=STATE_ERROR;
+ }
+ else
+ {
+ SET_SOCK_BLOCK(m_socket,0);
+ strncpy(m_host,hostname,sizeof(m_host)-1);
+ m_host[sizeof(m_host)-1]=0;
+ memset(&m_saddr,0,sizeof(m_saddr));
+ if (!m_host[0])
+ {
+ m_errorstr="empty hostname";
+ m_state=STATE_ERROR;
+ }
+ else
+ {
+ m_state=STATE_RESOLVING;
+ m_saddr.sin_family=AF_INET;
+ m_saddr.sin_port=htons((unsigned short)port);
+ m_saddr.sin_addr.s_addr=inet_addr(hostname);
+ }
+ }
+}
+
+JNL_Connection::~JNL_Connection()
+{
+ if (m_socket >= 0)
+ {
+ ::shutdown(m_socket, SHUT_RDWR);
+ ::closesocket(m_socket);
+ m_socket=-1;
+ }
+ free(m_recv_buffer);
+ free(m_send_buffer);
+ if (m_dns_owned)
+ {
+ delete m_dns;
+ }
+}
+
+void JNL_Connection::run(int max_send_bytes, int max_recv_bytes, int *bytes_sent, int *bytes_rcvd)
+{
+ int bytes_allowed_to_send=(max_send_bytes<0)?m_send_buffer_len:max_send_bytes;
+ int bytes_allowed_to_recv=(max_recv_bytes<0)?m_recv_buffer_len:max_recv_bytes;
+
+ if (bytes_sent) *bytes_sent=0;
+ if (bytes_rcvd) *bytes_rcvd=0;
+
+ switch (m_state)
+ {
+ case STATE_RESOLVING:
+ if (m_saddr.sin_addr.s_addr == INADDR_NONE)
+ {
+ int a=m_dns?m_dns->resolve(m_host,(unsigned long int *)&m_saddr.sin_addr.s_addr):-1;
+ if (!a) { m_state=STATE_CONNECTING; }
+ else if (a == 1)
+ {
+ m_state=STATE_RESOLVING;
+ break;
+ }
+ else
+ {
+ m_errorstr="resolving hostname";
+ m_state=STATE_ERROR;
+ return;
+ }
+ }
+ if (!::connect(m_socket,(struct sockaddr *)&m_saddr,16))
+ {
+ m_state=STATE_CONNECTED;
+ }
+ else if (ERRNO!=EINPROGRESS)
+ {
+ m_errorstr="connecting to host";
+ m_state=STATE_ERROR;
+ }
+ else { m_state=STATE_CONNECTING; }
+ break;
+ case STATE_CONNECTING:
+ {
+ fd_set f[3];
+ FD_ZERO(&f[0]);
+ FD_ZERO(&f[1]);
+ FD_ZERO(&f[2]);
+ FD_SET(m_socket,&f[0]);
+ FD_SET(m_socket,&f[1]);
+ FD_SET(m_socket,&f[2]);
+ struct timeval tv;
+ memset(&tv,0,sizeof(tv));
+ if (select(m_socket+1,&f[0],&f[1],&f[2],&tv)==-1)
+ {
+ m_errorstr="connecting to host (calling select())";
+ m_state=STATE_ERROR;
+ }
+ else if (FD_ISSET(m_socket,&f[1]))
+ {
+ m_state=STATE_CONNECTED;
+ }
+ else if (FD_ISSET(m_socket,&f[2]))
+ {
+ m_errorstr="connecting to host";
+ m_state=STATE_ERROR;
+ }
+ }
+ break;
+ case STATE_CONNECTED:
+ case STATE_CLOSING:
+ if (m_send_len>0 && bytes_allowed_to_send>0)
+ {
+ int len=m_send_buffer_len-m_send_pos;
+ if (len > m_send_len) len=m_send_len;
+ if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
+ if (len > 0)
+ {
+ int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
+ if (res==-1 && ERRNO != EWOULDBLOCK)
+ {
+// m_state=STATE_CLOSED;
+// return;
+ }
+ if (res>0)
+ {
+ bytes_allowed_to_send-=res;
+ if (bytes_sent) *bytes_sent+=res;
+ m_send_pos+=res;
+ m_send_len-=res;
+ }
+ }
+ if (m_send_pos>=m_send_buffer_len)
+ {
+ m_send_pos=0;
+ if (m_send_len>0)
+ {
+ len=m_send_buffer_len-m_send_pos;
+ if (len > m_send_len) len=m_send_len;
+ if (len > bytes_allowed_to_send) len=bytes_allowed_to_send;
+ int res=::send(m_socket,m_send_buffer+m_send_pos,len,0);
+ if (res==-1 && ERRNO != EWOULDBLOCK)
+ {
+// m_state=STATE_CLOSED;
+ }
+ if (res>0)
+ {
+ bytes_allowed_to_send-=res;
+ if (bytes_sent) *bytes_sent+=res;
+ m_send_pos+=res;
+ m_send_len-=res;
+ }
+ }
+ }
+ }
+ if (m_recv_len<m_recv_buffer_len)
+ {
+ int len=m_recv_buffer_len-m_recv_pos;
+ if (len > m_recv_buffer_len-m_recv_len) len=m_recv_buffer_len-m_recv_len;
+ if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
+ if (len>0)
+ {
+ int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
+ if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
+ {
+ m_state=STATE_CLOSED;
+ break;
+ }
+ if (res > 0)
+ {
+ bytes_allowed_to_recv-=res;
+ if (bytes_rcvd) *bytes_rcvd+=res;
+ m_recv_pos+=res;
+ m_recv_len+=res;
+ }
+ }
+ if (m_recv_pos >= m_recv_buffer_len)
+ {
+ m_recv_pos=0;
+ if (m_recv_len < m_recv_buffer_len)
+ {
+ len=m_recv_buffer_len-m_recv_len;
+ if (len > bytes_allowed_to_recv) len=bytes_allowed_to_recv;
+ if (len > 0)
+ {
+ int res=::recv(m_socket,m_recv_buffer+m_recv_pos,len,0);
+ if (res == 0 || (res < 0 && ERRNO != EWOULDBLOCK))
+ {
+ m_state=STATE_CLOSED;
+ break;
+ }
+ if (res > 0)
+ {
+ bytes_allowed_to_recv-=res;
+ if (bytes_rcvd) *bytes_rcvd+=res;
+ m_recv_pos+=res;
+ m_recv_len+=res;
+ }
+ }
+ }
+ }
+ }
+ if (m_state == STATE_CLOSING)
+ {
+ if (m_send_len < 1) m_state = STATE_CLOSED;
+ }
+ break;
+ default: break;
+ }
+}
+
+void JNL_Connection::close(int quick)
+{
+ if (quick || m_state == STATE_RESOLVING || m_state == STATE_CONNECTING)
+ {
+ m_state=STATE_CLOSED;
+ if (m_socket >= 0)
+ {
+ ::shutdown(m_socket, SHUT_RDWR);
+ ::closesocket(m_socket);
+ }
+ m_socket=-1;
+ memset(m_recv_buffer,0,m_recv_buffer_len);
+ memset(m_send_buffer,0,m_send_buffer_len);
+ m_remote_port=0;
+ m_recv_len=m_recv_pos=0;
+ m_send_len=m_send_pos=0;
+ m_host[0]=0;
+ memset(&m_saddr,0,sizeof(m_saddr));
+ }
+ else
+ {
+ if (m_state == STATE_CONNECTED) m_state=STATE_CLOSING;
+ }
+}
+
+int JNL_Connection::send_bytes_in_queue(void)
+{
+ return m_send_len;
+}
+
+int JNL_Connection::send_bytes_available(void)
+{
+ return m_send_buffer_len-m_send_len;
+}
+
+int JNL_Connection::send(char *data, int length)
+{
+ if (length > send_bytes_available())
+ {
+ return -1;
+ }
+
+ int write_pos=m_send_pos+m_send_len;
+ if (write_pos >= m_send_buffer_len)
+ {
+ write_pos-=m_send_buffer_len;
+ }
+
+ int len=m_send_buffer_len-write_pos;
+ if (len > length)
+ {
+ len=length;
+ }
+
+ memcpy(m_send_buffer+write_pos,data,len);
+ if (length > len)
+ {
+ memcpy(m_send_buffer,data+len,length-len);
+ }
+ m_send_len+=length;
+ return 0;
+}
+
+int JNL_Connection::send_string(char *line)
+{
+ return send(line,strlen(line));
+}
+
+int JNL_Connection::recv_bytes_available(void)
+{
+ return m_recv_len;
+}
+
+int JNL_Connection::peek_bytes(char *data, int maxlength)
+{
+ if (maxlength > m_recv_len)
+ {
+ maxlength=m_recv_len;
+ }
+ int read_pos=m_recv_pos-m_recv_len;
+ if (read_pos < 0)
+ {
+ read_pos += m_recv_buffer_len;
+ }
+ int len=m_recv_buffer_len-read_pos;
+ if (len > maxlength)
+ {
+ len=maxlength;
+ }
+ memcpy(data,m_recv_buffer+read_pos,len);
+ if (len < maxlength)
+ {
+ memcpy(data+len,m_recv_buffer,maxlength-len);
+ }
+
+ return maxlength;
+}
+
+int JNL_Connection::recv_bytes(char *data, int maxlength)
+{
+
+ int ml=peek_bytes(data,maxlength);
+ m_recv_len-=ml;
+ return ml;
+}
+
+int JNL_Connection::getbfromrecv(int pos, int remove)
+{
+ int read_pos=m_recv_pos-m_recv_len + pos;
+ if (pos < 0 || pos > m_recv_len) return -1;
+ if (read_pos < 0)
+ {
+ read_pos += m_recv_buffer_len;
+ }
+ if (read_pos >= m_recv_buffer_len)
+ {
+ read_pos-=m_recv_buffer_len;
+ }
+ if (remove) m_recv_len--;
+ return m_recv_buffer[read_pos];
+}
+
+int JNL_Connection::recv_lines_available(void)
+{
+ int l=recv_bytes_available();
+ int lcount=0;
+ int lastch=0;
+ int pos;
+ for (pos=0; pos < l; pos ++)
+ {
+ int t=getbfromrecv(pos,0);
+ if (t == -1) return lcount;
+ if ((t=='\r' || t=='\n') &&(
+ (lastch != '\r' && lastch != '\n') || lastch==t
+ )) lcount++;
+ lastch=t;
+ }
+ return lcount;
+}
+
+int JNL_Connection::recv_line(char *line, int maxlength)
+{
+ if (maxlength > m_recv_len) maxlength=m_recv_len;
+ while (maxlength--)
+ {
+ int t=getbfromrecv(0,1);
+ if (t == -1)
+ {
+ *line=0;
+ return 0;
+ }
+ if (t == '\r' || t == '\n')
+ {
+ int r=getbfromrecv(0,0);
+ if ((r == '\r' || r == '\n') && r != t) getbfromrecv(0,1);
+ *line=0;
+ return 0;
+ }
+ *line++=(char)t;
+ }
+ return 1;
+}
+
+unsigned long JNL_Connection::get_interface(void)
+{
+ if (m_socket==-1) return 0;
+ struct sockaddr_in sin;
+ memset(&sin,0,sizeof(sin));
+ socklen_t len=16;
+ if (::getsockname(m_socket,(struct sockaddr *)&sin,&len)) return 0;
+ return (unsigned long) sin.sin_addr.s_addr;
+}
diff --git a/Contrib/NSISdl/connection.h b/Contrib/NSISdl/connection.h
index c742bbf..d77e856 100755
--- a/Contrib/NSISdl/connection.h
+++ b/Contrib/NSISdl/connection.h
@@ -1,135 +1,135 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: connection.h - JNL TCP connection interface
-** License: see jnetlib.h
-**
-** Usage:
-** 1. Create a JNL_Connection object, optionally specifying a JNL_AsyncDNS
-** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
-** and the send and receive buffer sizes.
-** 2. Call connect() to have it connect to a host/port (the hostname will be
-** resolved if possible).
-** 3. call run() with the maximum send/recv amounts, and optionally parameters
-** so you can tell how much has been send/received. You want to do this a lot, while:
-** 4. check get_state() to check the state of the connection. The states are:
-** JNL_Connection::STATE_ERROR
-** - an error has occurred on the connection. the connection has closed,
-** and you can no longer write to the socket (there still might be
-** data in the receive buffer - use recv_bytes_available()).
-** JNL_Connection::STATE_NOCONNECTION
-** - no connection has been made yet. call connect() already! :)
-** JNL_Connection::STATE_RESOLVING
-** - the connection is still waiting for a JNL_AsycnDNS to resolve the
-** host.
-** JNL_Connection::STATE_CONNECTING
-** - the asynchronous call to connect() is still running.
-** JNL_Connection::STATE_CONNECTED
-** - the connection has connected, all is well.
-** JNL_Connection::STATE_CLOSING
-** - the connection is closing. This happens after a call to close,
-** without the quick parameter set. This means that the connection
-** will close once the data in the send buffer is sent (data could
-** still be being received when it would be closed). After it is
-** closed, the state will transition to:
-** JNL_Connection::STATE_CLOSED
-** - the connection has closed, generally without error. There still
-** might be data in the receieve buffer, use recv_bytes_available().
-** 5. Use send() and send_string() to send data. You can use
-** send_bytes_in_queue() to see how much has yet to go out, or
-** send_bytes_available() to see how much you can write. If you use send()
-** or send_string() and not enough room is available, both functions will
-** return error ( < 0)
-** 6. Use recv() and recv_line() to get data. If you want to see how much data
-** there is, use recv_bytes_available() and recv_lines_available(). If you
-** call recv() and not enough data is available, recv() will return how much
-** data was actually read. See comments at the function defs.
-**
-** 7. To close, call close(1) for a quick close, or close() for a close that will
-** make the socket close after sending all the data sent.
-**
-** 8. delete ye' ol' object.
-*/
-
-#ifndef _CONNECTION_H_
-#define _CONNECTION_H_
-
-#include "asyncdns.h"
-
-#define JNL_CONNECTION_AUTODNS ((JNL_AsyncDNS*)-1)
-
-class JNL_Connection
-{
- public:
- typedef enum
- {
- STATE_ERROR,
- STATE_NOCONNECTION,
- STATE_RESOLVING,
- STATE_CONNECTING,
- STATE_CONNECTED,
- STATE_CLOSING,
- STATE_CLOSED
- } state;
-
- JNL_Connection(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int sendbufsize=8192, int recvbufsize=8192);
- ~JNL_Connection();
-
- void connect(char *hostname, int port);
- void connect(int sock, struct sockaddr_in *loc=NULL); // used by the listen object, usually not needed by users.
-
- void run(int max_send_bytes=-1, int max_recv_bytes=-1, int *bytes_sent=NULL, int *bytes_rcvd=NULL);
- int get_state() { return m_state; }
- char *get_errstr() { return m_errorstr; }
-
- void close(int quick=0);
- void flush_send(void) { m_send_len=m_send_pos=0; }
-
- int send_bytes_in_queue(void);
- int send_bytes_available(void);
- int send(char *data, int length); // returns -1 if not enough room
- int send_string(char *line); // returns -1 if not enough room
-
-
- int recv_bytes_available(void);
- int recv_bytes(char *data, int maxlength); // returns actual bytes read
- unsigned int recv_int(void);
- int recv_lines_available(void);
- int recv_line(char *line, int maxlength); // returns 0 if the line was terminated with a \r or \n, 1 if not.
- // (i.e. if you specify maxlength=10, and the line is 12 bytes long
- // it will return 1. or if there is no \r or \n and that's all the data
- // the connection has.)
- int peek_bytes(char *data, int maxlength); // returns bytes peeked
-
- unsigned long get_interface(void); // this returns the interface the connection is on
- unsigned long get_remote(void) { return m_saddr.sin_addr.s_addr; } // remote host ip.
- short get_remote_port(void) { return m_remote_port; } // this returns the remote port of connection
-
- protected:
- int m_socket;
- short m_remote_port;
- char *m_recv_buffer;
- char *m_send_buffer;
- int m_recv_buffer_len;
- int m_send_buffer_len;
-
- int m_recv_pos;
- int m_recv_len;
- int m_send_pos;
- int m_send_len;
-
- struct sockaddr_in m_saddr;
- char m_host[256];
-
- JNL_AsyncDNS *m_dns;
- int m_dns_owned;
-
- state m_state;
- char *m_errorstr;
-
- int getbfromrecv(int pos, int remove); // used by recv_line*
-
-};
-
-#endif // _Connection_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: connection.h - JNL TCP connection interface
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create a JNL_Connection object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the send and receive buffer sizes.
+** 2. Call connect() to have it connect to a host/port (the hostname will be
+** resolved if possible).
+** 3. call run() with the maximum send/recv amounts, and optionally parameters
+** so you can tell how much has been send/received. You want to do this a lot, while:
+** 4. check get_state() to check the state of the connection. The states are:
+** JNL_Connection::STATE_ERROR
+** - an error has occurred on the connection. the connection has closed,
+** and you can no longer write to the socket (there still might be
+** data in the receive buffer - use recv_bytes_available()).
+** JNL_Connection::STATE_NOCONNECTION
+** - no connection has been made yet. call connect() already! :)
+** JNL_Connection::STATE_RESOLVING
+** - the connection is still waiting for a JNL_AsycnDNS to resolve the
+** host.
+** JNL_Connection::STATE_CONNECTING
+** - the asynchronous call to connect() is still running.
+** JNL_Connection::STATE_CONNECTED
+** - the connection has connected, all is well.
+** JNL_Connection::STATE_CLOSING
+** - the connection is closing. This happens after a call to close,
+** without the quick parameter set. This means that the connection
+** will close once the data in the send buffer is sent (data could
+** still be being received when it would be closed). After it is
+** closed, the state will transition to:
+** JNL_Connection::STATE_CLOSED
+** - the connection has closed, generally without error. There still
+** might be data in the receieve buffer, use recv_bytes_available().
+** 5. Use send() and send_string() to send data. You can use
+** send_bytes_in_queue() to see how much has yet to go out, or
+** send_bytes_available() to see how much you can write. If you use send()
+** or send_string() and not enough room is available, both functions will
+** return error ( < 0)
+** 6. Use recv() and recv_line() to get data. If you want to see how much data
+** there is, use recv_bytes_available() and recv_lines_available(). If you
+** call recv() and not enough data is available, recv() will return how much
+** data was actually read. See comments at the function defs.
+**
+** 7. To close, call close(1) for a quick close, or close() for a close that will
+** make the socket close after sending all the data sent.
+**
+** 8. delete ye' ol' object.
+*/
+
+#ifndef _CONNECTION_H_
+#define _CONNECTION_H_
+
+#include "asyncdns.h"
+
+#define JNL_CONNECTION_AUTODNS ((JNL_AsyncDNS*)-1)
+
+class JNL_Connection
+{
+ public:
+ typedef enum
+ {
+ STATE_ERROR,
+ STATE_NOCONNECTION,
+ STATE_RESOLVING,
+ STATE_CONNECTING,
+ STATE_CONNECTED,
+ STATE_CLOSING,
+ STATE_CLOSED
+ } state;
+
+ JNL_Connection(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int sendbufsize=8192, int recvbufsize=8192);
+ ~JNL_Connection();
+
+ void connect(char *hostname, int port);
+ void connect(int sock, struct sockaddr_in *loc=NULL); // used by the listen object, usually not needed by users.
+
+ void run(int max_send_bytes=-1, int max_recv_bytes=-1, int *bytes_sent=NULL, int *bytes_rcvd=NULL);
+ int get_state() { return m_state; }
+ char *get_errstr() { return m_errorstr; }
+
+ void close(int quick=0);
+ void flush_send(void) { m_send_len=m_send_pos=0; }
+
+ int send_bytes_in_queue(void);
+ int send_bytes_available(void);
+ int send(char *data, int length); // returns -1 if not enough room
+ int send_string(char *line); // returns -1 if not enough room
+
+
+ int recv_bytes_available(void);
+ int recv_bytes(char *data, int maxlength); // returns actual bytes read
+ unsigned int recv_int(void);
+ int recv_lines_available(void);
+ int recv_line(char *line, int maxlength); // returns 0 if the line was terminated with a \r or \n, 1 if not.
+ // (i.e. if you specify maxlength=10, and the line is 12 bytes long
+ // it will return 1. or if there is no \r or \n and that's all the data
+ // the connection has.)
+ int peek_bytes(char *data, int maxlength); // returns bytes peeked
+
+ unsigned long get_interface(void); // this returns the interface the connection is on
+ unsigned long get_remote(void) { return m_saddr.sin_addr.s_addr; } // remote host ip.
+ short get_remote_port(void) { return m_remote_port; } // this returns the remote port of connection
+
+ protected:
+ int m_socket;
+ short m_remote_port;
+ char *m_recv_buffer;
+ char *m_send_buffer;
+ int m_recv_buffer_len;
+ int m_send_buffer_len;
+
+ int m_recv_pos;
+ int m_recv_len;
+ int m_send_pos;
+ int m_send_len;
+
+ struct sockaddr_in m_saddr;
+ char m_host[256];
+
+ JNL_AsyncDNS *m_dns;
+ int m_dns_owned;
+
+ state m_state;
+ char *m_errorstr;
+
+ int getbfromrecv(int pos, int remove); // used by recv_line*
+
+};
+
+#endif // _Connection_H_
diff --git a/Contrib/NSISdl/httpget.cpp b/Contrib/NSISdl/httpget.cpp
index 9c4adca..8761e80 100755
--- a/Contrib/NSISdl/httpget.cpp
+++ b/Contrib/NSISdl/httpget.cpp
@@ -1,499 +1,499 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: httpget.cpp - JNL HTTP GET implementation
-** License: see jnetlib.h
-*/
-
-#include "netinc.h"
-#include "util.h"
-#include "httpget.h"
-
-
-JNL_HTTPGet::JNL_HTTPGet(JNL_AsyncDNS *dns, int recvbufsize, char *proxy)
-{
- m_recvbufsize=recvbufsize;
- m_dns=dns;
- m_con=NULL;
- m_http_proxylpinfo=0;
- m_http_proxyhost=0;
- m_http_proxyport=0;
- if (proxy && *proxy)
- {
- char *p=(char*)malloc(strlen(proxy)+1);
- if (p)
- {
- char *r=NULL;
- strcpy(p,proxy);
- do_parse_url(p,&m_http_proxyhost,&m_http_proxyport,&r,&m_http_proxylpinfo);
- free(r);
- free(p);
- }
- }
- m_sendheaders=NULL;
- reinit();
-}
-
-void JNL_HTTPGet::reinit()
-{
- m_errstr=0;
- m_recvheaders=NULL;
- m_recvheaders_size=0;
- m_http_state=0;
- m_http_port=0;
- m_http_url=0;
- m_reply=0;
- m_http_host=m_http_lpinfo=m_http_request=NULL;
-}
-
-void JNL_HTTPGet::deinit()
-{
- delete m_con;
- free(m_recvheaders);
-
- free(m_http_url);
- free(m_http_host);
- free(m_http_lpinfo);
- free(m_http_request);
- free(m_errstr);
- free(m_reply);
- reinit();
-}
-
-JNL_HTTPGet::~JNL_HTTPGet()
-{
- deinit();
- free(m_sendheaders);
- free(m_http_proxylpinfo);
- free(m_http_proxyhost);
-
-}
-
-
-void JNL_HTTPGet::addheader(char *header)
-{
- //if (strstr(header,"\r") || strstr(header,"\n")) return;
- if (!m_sendheaders)
- {
- m_sendheaders=(char*)malloc(strlen(header)+3);
- if (m_sendheaders)
- {
- strcpy(m_sendheaders,header);
- strcat(m_sendheaders,"\r\n");
- }
- }
- else
- {
- char *t=(char*)malloc(strlen(header)+strlen(m_sendheaders)+1+2);
- if (t)
- {
- strcpy(t,m_sendheaders);
- strcat(t,header);
- strcat(t,"\r\n");
- free(m_sendheaders);
- m_sendheaders=t;
- }
- }
-}
-
-void JNL_HTTPGet::do_encode_mimestr(char *in, char *out)
-{
- char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
- int shift = 0;
- int accum = 0;
-
- while (*in)
- {
- if (*in)
- {
- accum <<= 8;
- shift += 8;
- accum |= *in++;
- }
- while ( shift >= 6 )
- {
- shift -= 6;
- *out++ = alphabet[(accum >> shift) & 0x3F];
- }
- }
- if (shift == 4)
- {
- *out++ = alphabet[(accum & 0xF)<<2];
- *out++='=';
- }
- else if (shift == 2)
- {
- *out++ = alphabet[(accum & 0x3)<<4];
- *out++='=';
- *out++='=';
- }
-
- *out++=0;
-}
-
-
-void JNL_HTTPGet::connect(char *url)
-{
- deinit();
- m_http_url=(char*)malloc(strlen(url)+1);
- strcpy(m_http_url,url);
- do_parse_url(m_http_url,&m_http_host,&m_http_port,&m_http_request, &m_http_lpinfo);
- strcpy(m_http_url,url);
- if (!m_http_host || !m_http_host[0] || !m_http_port)
- {
- m_http_state=-1;
- seterrstr("invalid URL");
- return;
- }
-
- int sendbufferlen=0;
-
- if (!m_http_proxyhost || !m_http_proxyhost[0])
- {
- sendbufferlen += 4 /* GET */ + strlen(m_http_request) + 9 /* HTTP/1.0 */ + 2;
- }
- else
- {
- sendbufferlen += 4 /* GET */ + strlen(m_http_url) + 9 /* HTTP/1.0 */ + 2;
- if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
- {
- sendbufferlen+=58+strlen(m_http_proxylpinfo)*2; // being safe here
- }
- }
- sendbufferlen += 5 /* Host: */ + strlen(m_http_host) + 2;
-
- if (m_http_lpinfo&&m_http_lpinfo[0])
- {
- sendbufferlen+=46+strlen(m_http_lpinfo)*2; // being safe here
- }
-
- if (m_sendheaders) sendbufferlen+=strlen(m_sendheaders);
-
- char *str=(char*)malloc(sendbufferlen+1024);
- if (!str)
- {
- seterrstr("error allocating memory");
- m_http_state=-1;
- }
-
- if (!m_http_proxyhost || !m_http_proxyhost[0])
- {
- wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_request);
- }
- else
- {
- wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_url);
- }
-
- wsprintf(str+strlen(str),"Host: %s\r\n",m_http_host);
-
- if (m_http_lpinfo&&m_http_lpinfo[0])
- {
- strcat(str,"Authorization: Basic ");
- do_encode_mimestr(m_http_lpinfo,str+strlen(str));
- strcat(str,"\r\n");
- }
- if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
- {
- strcat(str,"Proxy-Authorization: Basic ");
- do_encode_mimestr(m_http_proxylpinfo,str+strlen(str));
- strcat(str,"\r\n");
- }
-
- if (m_sendheaders) strcat(str,m_sendheaders);
- strcat(str,"\r\n");
-
- int a=m_recvbufsize;
- if (a < 4096) a=4096;
- m_con=new JNL_Connection(m_dns,strlen(str)+4,a);
- if (m_con)
- {
- if (!m_http_proxyhost || !m_http_proxyhost[0])
- {
- m_con->connect(m_http_host,m_http_port);
- }
- else
- {
- m_con->connect(m_http_proxyhost,m_http_proxyport);
- }
- m_con->send_string(str);
- }
- else
- {
- m_http_state=-1;
- seterrstr("could not create connection object");
- }
- free(str);
-
-}
-
-static int my_strnicmp(char *b1, char *b2, int l)
-{
- while (l-- && *b1 && *b2)
- {
- char bb1=*b1++;
- char bb2=*b2++;
- if (bb1>='a' && bb1 <= 'z') bb1+='A'-'a';
- if (bb2>='a' && bb2 <= 'z') bb2+='A'-'a';
- if (bb1 != bb2) return bb1-bb2;
- }
- return 0;
-}
-
-char *_strstr(char *i, char *s)
-{
- if (strlen(i)>=strlen(s)) while (i[strlen(s)-1])
- {
- int l=strlen(s)+1;
- char *ii=i;
- char *is=s;
- while (--l>0)
- {
- if (*ii != *is) break;
- ii++;
- is++;
- }
- if (l==0) return i;
- i++;
- }
- return NULL;
-}
-
-#define strstr _strstr
-
-void JNL_HTTPGet::do_parse_url(char *url, char **host, int *port, char **req, char **lp)
-{
- char *p,*np;
- free(*host); *host=0;
- free(*req); *req=0;
- free(*lp); *lp=0;
-
- if (strstr(url,"://")) np=p=strstr(url,"://")+3;
- else np=p=url;
- while (*np != '/' && *np) np++;
- if (*np)
- {
- *req=(char*)malloc(strlen(np)+1);
- if (*req) strcpy(*req,np);
- *np++=0;
- }
- else
- {
- *req=(char*)malloc(2);
- if (*req) strcpy(*req,"/");
- }
-
- np=p;
- while (*np != '@' && *np) np++;
- if (*np)
- {
- *np++=0;
- *lp=(char*)malloc(strlen(p)+1);
- if (*lp) strcpy(*lp,p);
- p=np;
- }
- else
- {
- *lp=(char*)malloc(1);
- if (*lp) strcpy(*lp,"");
- }
- np=p;
- while (*np != ':' && *np) np++;
- if (*np)
- {
- *np++=0;
- *port=my_atoi(np);
- } else *port=80;
- *host=(char*)malloc(strlen(p)+1);
- if (*host) strcpy(*host,p);
-}
-
-
-char *JNL_HTTPGet::getallheaders()
-{ // double null terminated, null delimited list
- if (m_recvheaders) return m_recvheaders;
- else return "\0\0";
-}
-
-char *JNL_HTTPGet::getheader(char *headername)
-{
- char *ret=NULL;
- if (strlen(headername)<1||!m_recvheaders) return NULL;
- char *p=m_recvheaders;
- while (*p)
- {
- if (!my_strnicmp(headername,p,strlen(headername)))
- {
- ret=p+strlen(headername);
- while (*ret == ' ') ret++;
- break;
- }
- p+=strlen(p)+1;
- }
- return ret;
-}
-
-int JNL_HTTPGet::run()
-{
- int cnt=0;
- if (m_http_state==-1||!m_con) return -1; // error
-
-
-run_again:
- static char main_buf[4096];
- char *buf = main_buf;
- m_con->run();
-
- if (m_con->get_state()==JNL_Connection::STATE_ERROR)
- {
- seterrstr(m_con->get_errstr());
- return -1;
- }
- if (m_con->get_state()==JNL_Connection::STATE_CLOSED) return 1;
-
- if (m_http_state==0) // connected, waiting for reply
- {
- if (m_con->recv_lines_available()>0)
- {
- m_con->recv_line(buf,4095);
- buf[4095]=0;
- m_reply=(char*)malloc(strlen(buf)+1);
- strcpy(m_reply,buf);
-
- if (strstr(buf,"200")) m_http_state=2; // proceed to read headers normally
- else if (strstr(buf,"301") || strstr(buf,"302"))
- {
- m_http_state=1; // redirect city
- }
- else
- {
- seterrstr(buf);
- m_http_state=-1;
- return -1;
- }
- cnt=0;
- }
- else if (!cnt++) goto run_again;
- }
- if (m_http_state == 1) // redirect
- {
- while (m_con->recv_lines_available() > 0)
- {
- m_con->recv_line(buf,4096);
- if (!buf[0])
- {
- m_http_state=-1;
- return -1;
- }
- if (!my_strnicmp(buf,"Location:",9))
- {
- char *p=buf+9; while (*p== ' ') p++;
- if (*p)
- {
- connect(p);
- return 0;
- }
- }
- }
- }
- if (m_http_state==2)
- {
- if (!cnt++ && m_con->recv_lines_available() < 1) goto run_again;
- while (m_con->recv_lines_available() > 0)
- {
- m_con->recv_line(buf,4096);
- if (!buf[0]) { m_http_state=3; break; }
-
- char *h = buf;
-
- // workaround for bug #1445735
- //
- // some proxies, like WinProxy, prefix headers with tabs
- // or spaces. to make sure headers are detected properly,
- // this removes up to 128 useless white spaces.
-
- while ((h - buf < 128) && (*h == ' ' || *h == '\t')) h++;
-
- if (!m_recvheaders)
- {
- m_recvheaders_size=strlen(h)+1;
- m_recvheaders=(char*)malloc(m_recvheaders_size+1);
- if (m_recvheaders)
- {
- strcpy(m_recvheaders,h);
- m_recvheaders[m_recvheaders_size]=0;
- }
- }
- else
- {
- int oldsize=m_recvheaders_size;
- m_recvheaders_size+=strlen(h)+1;
- char *n=(char*)malloc(m_recvheaders_size+1);
- if (n)
- {
- memcpy(n,m_recvheaders,oldsize);
- strcpy(n+oldsize,h);
- n[m_recvheaders_size]=0;
- free(m_recvheaders);
- m_recvheaders=n;
- }
- }
- }
- }
- if (m_http_state==3)
- {
- }
- return 0;
-}
-
-int JNL_HTTPGet::get_status() // returns 0 if connecting, 1 if reading headers,
- // 2 if reading content, -1 if error.
-{
- if (m_http_state < 0) return -1;
- if (m_http_state < 2) return 0;
- if (m_http_state == 2) return 1;
- if (m_http_state == 3) return 2;
- return -1;
-}
-
-int JNL_HTTPGet::getreplycode()// returns 0 if none yet, otherwise returns http reply code.
-{
- if (!m_reply) return 0;
- char *p=m_reply;
- while (*p && *p != ' ') p++; // skip over HTTP/x.x
- if (!*p) return 0;
- return my_atoi(++p);
-}
-
-int JNL_HTTPGet::bytes_available()
-{
- if (m_con && m_http_state==3) return m_con->recv_bytes_available();
- return 0;
-}
-int JNL_HTTPGet::get_bytes(char *buf, int len)
-{
- if (m_con && m_http_state==3) return m_con->recv_bytes(buf,len);
- return 0;
-}
-int JNL_HTTPGet::peek_bytes(char *buf, int len)
-{
- if (m_con && m_http_state==3) return m_con->peek_bytes(buf,len);
- return 0;
-}
-
-__int64 JNL_HTTPGet::content_length()
-{
- char *p=getheader("content-length:");
- if (!p) return 0;
- __int64 cl = myatoi64(p);
- if (cl > 0) return cl;
-
- // workaround for bug #1744091
- // some buggy apache servers return negative values for sizes
- // over 2gb - fix it for them
- if (cl < 0)
- return (__int64)((unsigned int)(cl));
-
- return 0;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: httpget.cpp - JNL HTTP GET implementation
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+#include "util.h"
+#include "httpget.h"
+
+
+JNL_HTTPGet::JNL_HTTPGet(JNL_AsyncDNS *dns, int recvbufsize, char *proxy)
+{
+ m_recvbufsize=recvbufsize;
+ m_dns=dns;
+ m_con=NULL;
+ m_http_proxylpinfo=0;
+ m_http_proxyhost=0;
+ m_http_proxyport=0;
+ if (proxy && *proxy)
+ {
+ char *p=(char*)malloc(strlen(proxy)+1);
+ if (p)
+ {
+ char *r=NULL;
+ strcpy(p,proxy);
+ do_parse_url(p,&m_http_proxyhost,&m_http_proxyport,&r,&m_http_proxylpinfo);
+ free(r);
+ free(p);
+ }
+ }
+ m_sendheaders=NULL;
+ reinit();
+}
+
+void JNL_HTTPGet::reinit()
+{
+ m_errstr=0;
+ m_recvheaders=NULL;
+ m_recvheaders_size=0;
+ m_http_state=0;
+ m_http_port=0;
+ m_http_url=0;
+ m_reply=0;
+ m_http_host=m_http_lpinfo=m_http_request=NULL;
+}
+
+void JNL_HTTPGet::deinit()
+{
+ delete m_con;
+ free(m_recvheaders);
+
+ free(m_http_url);
+ free(m_http_host);
+ free(m_http_lpinfo);
+ free(m_http_request);
+ free(m_errstr);
+ free(m_reply);
+ reinit();
+}
+
+JNL_HTTPGet::~JNL_HTTPGet()
+{
+ deinit();
+ free(m_sendheaders);
+ free(m_http_proxylpinfo);
+ free(m_http_proxyhost);
+
+}
+
+
+void JNL_HTTPGet::addheader(char *header)
+{
+ //if (strstr(header,"\r") || strstr(header,"\n")) return;
+ if (!m_sendheaders)
+ {
+ m_sendheaders=(char*)malloc(strlen(header)+3);
+ if (m_sendheaders)
+ {
+ strcpy(m_sendheaders,header);
+ strcat(m_sendheaders,"\r\n");
+ }
+ }
+ else
+ {
+ char *t=(char*)malloc(strlen(header)+strlen(m_sendheaders)+1+2);
+ if (t)
+ {
+ strcpy(t,m_sendheaders);
+ strcat(t,header);
+ strcat(t,"\r\n");
+ free(m_sendheaders);
+ m_sendheaders=t;
+ }
+ }
+}
+
+void JNL_HTTPGet::do_encode_mimestr(char *in, char *out)
+{
+ char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ int shift = 0;
+ int accum = 0;
+
+ while (*in)
+ {
+ if (*in)
+ {
+ accum <<= 8;
+ shift += 8;
+ accum |= *in++;
+ }
+ while ( shift >= 6 )
+ {
+ shift -= 6;
+ *out++ = alphabet[(accum >> shift) & 0x3F];
+ }
+ }
+ if (shift == 4)
+ {
+ *out++ = alphabet[(accum & 0xF)<<2];
+ *out++='=';
+ }
+ else if (shift == 2)
+ {
+ *out++ = alphabet[(accum & 0x3)<<4];
+ *out++='=';
+ *out++='=';
+ }
+
+ *out++=0;
+}
+
+
+void JNL_HTTPGet::connect(char *url)
+{
+ deinit();
+ m_http_url=(char*)malloc(strlen(url)+1);
+ strcpy(m_http_url,url);
+ do_parse_url(m_http_url,&m_http_host,&m_http_port,&m_http_request, &m_http_lpinfo);
+ strcpy(m_http_url,url);
+ if (!m_http_host || !m_http_host[0] || !m_http_port)
+ {
+ m_http_state=-1;
+ seterrstr("invalid URL");
+ return;
+ }
+
+ int sendbufferlen=0;
+
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ sendbufferlen += 4 /* GET */ + strlen(m_http_request) + 9 /* HTTP/1.0 */ + 2;
+ }
+ else
+ {
+ sendbufferlen += 4 /* GET */ + strlen(m_http_url) + 9 /* HTTP/1.0 */ + 2;
+ if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
+ {
+ sendbufferlen+=58+strlen(m_http_proxylpinfo)*2; // being safe here
+ }
+ }
+ sendbufferlen += 5 /* Host: */ + strlen(m_http_host) + 2;
+
+ if (m_http_lpinfo&&m_http_lpinfo[0])
+ {
+ sendbufferlen+=46+strlen(m_http_lpinfo)*2; // being safe here
+ }
+
+ if (m_sendheaders) sendbufferlen+=strlen(m_sendheaders);
+
+ char *str=(char*)malloc(sendbufferlen+1024);
+ if (!str)
+ {
+ seterrstr("error allocating memory");
+ m_http_state=-1;
+ }
+
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_request);
+ }
+ else
+ {
+ wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_url);
+ }
+
+ wsprintf(str+strlen(str),"Host: %s\r\n",m_http_host);
+
+ if (m_http_lpinfo&&m_http_lpinfo[0])
+ {
+ strcat(str,"Authorization: Basic ");
+ do_encode_mimestr(m_http_lpinfo,str+strlen(str));
+ strcat(str,"\r\n");
+ }
+ if (m_http_proxylpinfo&&m_http_proxylpinfo[0])
+ {
+ strcat(str,"Proxy-Authorization: Basic ");
+ do_encode_mimestr(m_http_proxylpinfo,str+strlen(str));
+ strcat(str,"\r\n");
+ }
+
+ if (m_sendheaders) strcat(str,m_sendheaders);
+ strcat(str,"\r\n");
+
+ int a=m_recvbufsize;
+ if (a < 4096) a=4096;
+ m_con=new JNL_Connection(m_dns,strlen(str)+4,a);
+ if (m_con)
+ {
+ if (!m_http_proxyhost || !m_http_proxyhost[0])
+ {
+ m_con->connect(m_http_host,m_http_port);
+ }
+ else
+ {
+ m_con->connect(m_http_proxyhost,m_http_proxyport);
+ }
+ m_con->send_string(str);
+ }
+ else
+ {
+ m_http_state=-1;
+ seterrstr("could not create connection object");
+ }
+ free(str);
+
+}
+
+static int my_strnicmp(char *b1, char *b2, int l)
+{
+ while (l-- && *b1 && *b2)
+ {
+ char bb1=*b1++;
+ char bb2=*b2++;
+ if (bb1>='a' && bb1 <= 'z') bb1+='A'-'a';
+ if (bb2>='a' && bb2 <= 'z') bb2+='A'-'a';
+ if (bb1 != bb2) return bb1-bb2;
+ }
+ return 0;
+}
+
+char *_strstr(char *i, char *s)
+{
+ if (strlen(i)>=strlen(s)) while (i[strlen(s)-1])
+ {
+ int l=strlen(s)+1;
+ char *ii=i;
+ char *is=s;
+ while (--l>0)
+ {
+ if (*ii != *is) break;
+ ii++;
+ is++;
+ }
+ if (l==0) return i;
+ i++;
+ }
+ return NULL;
+}
+
+#define strstr _strstr
+
+void JNL_HTTPGet::do_parse_url(char *url, char **host, int *port, char **req, char **lp)
+{
+ char *p,*np;
+ free(*host); *host=0;
+ free(*req); *req=0;
+ free(*lp); *lp=0;
+
+ if (strstr(url,"://")) np=p=strstr(url,"://")+3;
+ else np=p=url;
+ while (*np != '/' && *np) np++;
+ if (*np)
+ {
+ *req=(char*)malloc(strlen(np)+1);
+ if (*req) strcpy(*req,np);
+ *np++=0;
+ }
+ else
+ {
+ *req=(char*)malloc(2);
+ if (*req) strcpy(*req,"/");
+ }
+
+ np=p;
+ while (*np != '@' && *np) np++;
+ if (*np)
+ {
+ *np++=0;
+ *lp=(char*)malloc(strlen(p)+1);
+ if (*lp) strcpy(*lp,p);
+ p=np;
+ }
+ else
+ {
+ *lp=(char*)malloc(1);
+ if (*lp) strcpy(*lp,"");
+ }
+ np=p;
+ while (*np != ':' && *np) np++;
+ if (*np)
+ {
+ *np++=0;
+ *port=my_atoi(np);
+ } else *port=80;
+ *host=(char*)malloc(strlen(p)+1);
+ if (*host) strcpy(*host,p);
+}
+
+
+char *JNL_HTTPGet::getallheaders()
+{ // double null terminated, null delimited list
+ if (m_recvheaders) return m_recvheaders;
+ else return "\0\0";
+}
+
+char *JNL_HTTPGet::getheader(char *headername)
+{
+ char *ret=NULL;
+ if (strlen(headername)<1||!m_recvheaders) return NULL;
+ char *p=m_recvheaders;
+ while (*p)
+ {
+ if (!my_strnicmp(headername,p,strlen(headername)))
+ {
+ ret=p+strlen(headername);
+ while (*ret == ' ') ret++;
+ break;
+ }
+ p+=strlen(p)+1;
+ }
+ return ret;
+}
+
+int JNL_HTTPGet::run()
+{
+ int cnt=0;
+ if (m_http_state==-1||!m_con) return -1; // error
+
+
+run_again:
+ static char main_buf[4096];
+ char *buf = main_buf;
+ m_con->run();
+
+ if (m_con->get_state()==JNL_Connection::STATE_ERROR)
+ {
+ seterrstr(m_con->get_errstr());
+ return -1;
+ }
+ if (m_con->get_state()==JNL_Connection::STATE_CLOSED) return 1;
+
+ if (m_http_state==0) // connected, waiting for reply
+ {
+ if (m_con->recv_lines_available()>0)
+ {
+ m_con->recv_line(buf,4095);
+ buf[4095]=0;
+ m_reply=(char*)malloc(strlen(buf)+1);
+ strcpy(m_reply,buf);
+
+ if (strstr(buf,"200")) m_http_state=2; // proceed to read headers normally
+ else if (strstr(buf,"301") || strstr(buf,"302"))
+ {
+ m_http_state=1; // redirect city
+ }
+ else
+ {
+ seterrstr(buf);
+ m_http_state=-1;
+ return -1;
+ }
+ cnt=0;
+ }
+ else if (!cnt++) goto run_again;
+ }
+ if (m_http_state == 1) // redirect
+ {
+ while (m_con->recv_lines_available() > 0)
+ {
+ m_con->recv_line(buf,4096);
+ if (!buf[0])
+ {
+ m_http_state=-1;
+ return -1;
+ }
+ if (!my_strnicmp(buf,"Location:",9))
+ {
+ char *p=buf+9; while (*p== ' ') p++;
+ if (*p)
+ {
+ connect(p);
+ return 0;
+ }
+ }
+ }
+ }
+ if (m_http_state==2)
+ {
+ if (!cnt++ && m_con->recv_lines_available() < 1) goto run_again;
+ while (m_con->recv_lines_available() > 0)
+ {
+ m_con->recv_line(buf,4096);
+ if (!buf[0]) { m_http_state=3; break; }
+
+ char *h = buf;
+
+ // workaround for bug #1445735
+ //
+ // some proxies, like WinProxy, prefix headers with tabs
+ // or spaces. to make sure headers are detected properly,
+ // this removes up to 128 useless white spaces.
+
+ while ((h - buf < 128) && (*h == ' ' || *h == '\t')) h++;
+
+ if (!m_recvheaders)
+ {
+ m_recvheaders_size=strlen(h)+1;
+ m_recvheaders=(char*)malloc(m_recvheaders_size+1);
+ if (m_recvheaders)
+ {
+ strcpy(m_recvheaders,h);
+ m_recvheaders[m_recvheaders_size]=0;
+ }
+ }
+ else
+ {
+ int oldsize=m_recvheaders_size;
+ m_recvheaders_size+=strlen(h)+1;
+ char *n=(char*)malloc(m_recvheaders_size+1);
+ if (n)
+ {
+ memcpy(n,m_recvheaders,oldsize);
+ strcpy(n+oldsize,h);
+ n[m_recvheaders_size]=0;
+ free(m_recvheaders);
+ m_recvheaders=n;
+ }
+ }
+ }
+ }
+ if (m_http_state==3)
+ {
+ }
+ return 0;
+}
+
+int JNL_HTTPGet::get_status() // returns 0 if connecting, 1 if reading headers,
+ // 2 if reading content, -1 if error.
+{
+ if (m_http_state < 0) return -1;
+ if (m_http_state < 2) return 0;
+ if (m_http_state == 2) return 1;
+ if (m_http_state == 3) return 2;
+ return -1;
+}
+
+int JNL_HTTPGet::getreplycode()// returns 0 if none yet, otherwise returns http reply code.
+{
+ if (!m_reply) return 0;
+ char *p=m_reply;
+ while (*p && *p != ' ') p++; // skip over HTTP/x.x
+ if (!*p) return 0;
+ return my_atoi(++p);
+}
+
+int JNL_HTTPGet::bytes_available()
+{
+ if (m_con && m_http_state==3) return m_con->recv_bytes_available();
+ return 0;
+}
+int JNL_HTTPGet::get_bytes(char *buf, int len)
+{
+ if (m_con && m_http_state==3) return m_con->recv_bytes(buf,len);
+ return 0;
+}
+int JNL_HTTPGet::peek_bytes(char *buf, int len)
+{
+ if (m_con && m_http_state==3) return m_con->peek_bytes(buf,len);
+ return 0;
+}
+
+__int64 JNL_HTTPGet::content_length()
+{
+ char *p=getheader("content-length:");
+ if (!p) return 0;
+ __int64 cl = myatoi64(p);
+ if (cl > 0) return cl;
+
+ // workaround for bug #1744091
+ // some buggy apache servers return negative values for sizes
+ // over 2gb - fix it for them
+ if (cl < 0)
+ return (__int64)((unsigned int)(cl));
+
+ return 0;
+}
diff --git a/Contrib/NSISdl/httpget.h b/Contrib/NSISdl/httpget.h
index ccb012b..c87e181 100755
--- a/Contrib/NSISdl/httpget.h
+++ b/Contrib/NSISdl/httpget.h
@@ -1,109 +1,109 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: httpget.h - JNL interface for doing HTTP GETs.
-** License: see jnetlib.h
-**
-** Usage:
-** 1. Create a JNL_HTTPGet object, optionally specifying a JNL_AsyncDNS
-** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
-** and the receive buffer size, and a string specifying proxy (or NULL
-** for none). See note on proxy string below.
-** 2. call addheader() to add whatever headers you want. It is recommended to
-** add at least the following two:
-** addheader("User-Agent:MyApp (Mozilla)");
-*/// addheader("Accept:*/*");
-/* ( the comment weirdness is there so I Can do the star-slash :)
-** 3. Call connect() with the URL you wish to GET (see URL string note below)
-** 4. Call run() once in a while, checking to see if it returns -1
-** (if it does return -1, call geterrorstr() to see what the error is).
-** (if it returns 1, no big deal, the connection has closed).
-** 5. While you're at it, you can call bytes_available() to see if any data
-** from the http stream is available, or getheader() to see if any headers
-** are available, or getreply() to see the HTTP reply, or getallheaders()
-** to get a double null terminated, null delimited list of headers returned.
-** 6. If you want to read from the stream, call get_bytes (which returns how much
-** was actually read).
-** 7. content_length() is a helper function that uses getheader() to check the
-** content-length header.
-** 8. Delete ye' ol' object when done.
-**
-** Proxy String:
-** should be in the format of host:port, or user@host:port, or
-** user:password@host:port. if port is not specified, 80 is assumed.
-** URL String:
-** should be in the format of http://user:pass@host:port/requestwhatever
-** note that user, pass, port, and /requestwhatever are all optional :)
-** note that also, http:// is really not important. if you do poo://
-** or even leave out the http:// altogether, it will still work.
-*/
-
-#ifndef _HTTPGET_H_
-#define _HTTPGET_H_
-
-#include "connection.h"
-
-class JNL_HTTPGet
-{
- public:
- JNL_HTTPGet(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int recvbufsize=16384, char *proxy=NULL);
- ~JNL_HTTPGet();
-
- void addheader(char *header);
-
- void connect(char *url);
-
- int run(); // returns: 0 if all is OK. -1 if error (call geterrorstr()). 1 if connection closed.
-
- int get_status(); // returns 0 if connecting, 1 if reading headers,
- // 2 if reading content, -1 if error.
-
- char *getallheaders(); // double null terminated, null delimited list
- char *getheader(char *headername);
- char *getreply() { return m_reply; }
- int getreplycode(); // returns 0 if none yet, otherwise returns http reply code.
-
- char *geterrorstr() { return m_errstr;}
-
- int bytes_available();
- int get_bytes(char *buf, int len);
- int peek_bytes(char *buf, int len);
-
- __int64 content_length();
-
- JNL_Connection *get_con() { return m_con; }
-
- public:
- void reinit();
- void deinit();
- void seterrstr(char *str) { if (m_errstr) free(m_errstr); m_errstr=(char*)malloc(strlen(str)+1); strcpy(m_errstr,str); }
-
- void do_parse_url(char *url, char **host, int *port, char **req, char **lp);
- void do_encode_mimestr(char *in, char *out);
-
- JNL_AsyncDNS *m_dns;
- JNL_Connection *m_con;
- int m_recvbufsize;
-
- int m_http_state;
-
- int m_http_port;
- char *m_http_url;
- char *m_http_host;
- char *m_http_lpinfo;
- char *m_http_request;
-
- char *m_http_proxylpinfo;
- char *m_http_proxyhost;
- int m_http_proxyport;
-
- char *m_sendheaders;
- char *m_recvheaders;
- int m_recvheaders_size;
- char *m_reply;
-
- char *m_errstr;
-};
-
-#endif // _HTTPGET_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: httpget.h - JNL interface for doing HTTP GETs.
+** License: see jnetlib.h
+**
+** Usage:
+** 1. Create a JNL_HTTPGet object, optionally specifying a JNL_AsyncDNS
+** object to use (or NULL for none, or JNL_CONNECTION_AUTODNS for auto),
+** and the receive buffer size, and a string specifying proxy (or NULL
+** for none). See note on proxy string below.
+** 2. call addheader() to add whatever headers you want. It is recommended to
+** add at least the following two:
+** addheader("User-Agent:MyApp (Mozilla)");
+*/// addheader("Accept:*/*");
+/* ( the comment weirdness is there so I Can do the star-slash :)
+** 3. Call connect() with the URL you wish to GET (see URL string note below)
+** 4. Call run() once in a while, checking to see if it returns -1
+** (if it does return -1, call geterrorstr() to see what the error is).
+** (if it returns 1, no big deal, the connection has closed).
+** 5. While you're at it, you can call bytes_available() to see if any data
+** from the http stream is available, or getheader() to see if any headers
+** are available, or getreply() to see the HTTP reply, or getallheaders()
+** to get a double null terminated, null delimited list of headers returned.
+** 6. If you want to read from the stream, call get_bytes (which returns how much
+** was actually read).
+** 7. content_length() is a helper function that uses getheader() to check the
+** content-length header.
+** 8. Delete ye' ol' object when done.
+**
+** Proxy String:
+** should be in the format of host:port, or user@host:port, or
+** user:password@host:port. if port is not specified, 80 is assumed.
+** URL String:
+** should be in the format of http://user:pass@host:port/requestwhatever
+** note that user, pass, port, and /requestwhatever are all optional :)
+** note that also, http:// is really not important. if you do poo://
+** or even leave out the http:// altogether, it will still work.
+*/
+
+#ifndef _HTTPGET_H_
+#define _HTTPGET_H_
+
+#include "connection.h"
+
+class JNL_HTTPGet
+{
+ public:
+ JNL_HTTPGet(JNL_AsyncDNS *dns=JNL_CONNECTION_AUTODNS, int recvbufsize=16384, char *proxy=NULL);
+ ~JNL_HTTPGet();
+
+ void addheader(char *header);
+
+ void connect(char *url);
+
+ int run(); // returns: 0 if all is OK. -1 if error (call geterrorstr()). 1 if connection closed.
+
+ int get_status(); // returns 0 if connecting, 1 if reading headers,
+ // 2 if reading content, -1 if error.
+
+ char *getallheaders(); // double null terminated, null delimited list
+ char *getheader(char *headername);
+ char *getreply() { return m_reply; }
+ int getreplycode(); // returns 0 if none yet, otherwise returns http reply code.
+
+ char *geterrorstr() { return m_errstr;}
+
+ int bytes_available();
+ int get_bytes(char *buf, int len);
+ int peek_bytes(char *buf, int len);
+
+ __int64 content_length();
+
+ JNL_Connection *get_con() { return m_con; }
+
+ public:
+ void reinit();
+ void deinit();
+ void seterrstr(char *str) { if (m_errstr) free(m_errstr); m_errstr=(char*)malloc(strlen(str)+1); strcpy(m_errstr,str); }
+
+ void do_parse_url(char *url, char **host, int *port, char **req, char **lp);
+ void do_encode_mimestr(char *in, char *out);
+
+ JNL_AsyncDNS *m_dns;
+ JNL_Connection *m_con;
+ int m_recvbufsize;
+
+ int m_http_state;
+
+ int m_http_port;
+ char *m_http_url;
+ char *m_http_host;
+ char *m_http_lpinfo;
+ char *m_http_request;
+
+ char *m_http_proxylpinfo;
+ char *m_http_proxyhost;
+ int m_http_proxyport;
+
+ char *m_sendheaders;
+ char *m_recvheaders;
+ int m_recvheaders_size;
+ char *m_reply;
+
+ char *m_errstr;
+};
+
+#endif // _HTTPGET_H_
diff --git a/Contrib/NSISdl/netinc.h b/Contrib/NSISdl/netinc.h
index b2bf45b..ed8bd00 100755
--- a/Contrib/NSISdl/netinc.h
+++ b/Contrib/NSISdl/netinc.h
@@ -1,42 +1,42 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: netinc.h - network includes and portability defines (used internally)
-** License: see jnetlib.h
-*/
-
-#ifndef _NETINC_H_
-#define _NETINC_H_
-
-#include <windows.h>
-#include "util.h"
-
-#define strcasecmp(x,y) stricmp(x,y)
-#define ERRNO (WSAGetLastError())
-#define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); }
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINPROGRESS WSAEWOULDBLOCK
-#define memset mini_memset
-#define memcpy mini_memcpy
-#define strcpy lstrcpy
-#define strncpy lstrcpyn
-#define strcat lstrcat
-#define strlen lstrlen
-#define malloc(x) (new char[x])
-#define free(x) {delete [] x;}
-typedef int socklen_t;
-
-#ifndef INADDR_NONE
-#define INADDR_NONE 0xffffffff
-#endif
-
-#ifndef INADDR_ANY
-#define INADDR_ANY 0
-#endif
-
-#ifndef SHUT_RDWR
-#define SHUT_RDWR 2
-#endif
-
-#endif //_NETINC_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: netinc.h - network includes and portability defines (used internally)
+** License: see jnetlib.h
+*/
+
+#ifndef _NETINC_H_
+#define _NETINC_H_
+
+#include <windows.h>
+#include "util.h"
+
+#define strcasecmp(x,y) stricmp(x,y)
+#define ERRNO (WSAGetLastError())
+#define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); }
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EINPROGRESS WSAEWOULDBLOCK
+#define memset mini_memset
+#define memcpy mini_memcpy
+#define strcpy lstrcpy
+#define strncpy lstrcpyn
+#define strcat lstrcat
+#define strlen lstrlen
+#define malloc(x) (new char[x])
+#define free(x) {delete [] x;}
+typedef int socklen_t;
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+#ifndef INADDR_ANY
+#define INADDR_ANY 0
+#endif
+
+#ifndef SHUT_RDWR
+#define SHUT_RDWR 2
+#endif
+
+#endif //_NETINC_H_
diff --git a/Contrib/NSISdl/nsisdl.cpp b/Contrib/NSISdl/nsisdl.cpp
index 00f5070..60c18d7 100755
--- a/Contrib/NSISdl/nsisdl.cpp
+++ b/Contrib/NSISdl/nsisdl.cpp
@@ -1,596 +1,596 @@
-/*
- NSIS-DL 1.3 - http downloading DLL for NSIS
- Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
-
- 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.
-*/
-#include <windows.h>
-#include <stdio.h>
-#include <commctrl.h>
-
-#include "netinc.h"
-#include "util.h"
-#include "httpget.h"
-#include "../ExDLL/exdll.h"
-
-void *operator new( unsigned int num_bytes )
-{
- return GlobalAlloc(GPTR,num_bytes);
-}
-void operator delete( void *p ) { if (p) GlobalFree(p); }
-
-
-HMODULE hModule;
-HWND g_hwndProgressBar;
-HWND g_hwndStatic;
-static int g_cancelled;
-static void *lpWndProcOld;
-
-static UINT uMsgCreate;
-
-HWND childwnd;
-HWND hwndL;
-HWND hwndB;
-
-static LRESULT CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- if (uMsgCreate && message == uMsgCreate)
- {
- static HWND hwndPrevFocus;
- static BOOL fCancelDisabled;
-
- if (wParam)
- {
- childwnd = FindWindowEx((HWND) lParam, NULL, "#32770", NULL);
- hwndL = GetDlgItem(childwnd, 1016);
- hwndB = GetDlgItem(childwnd, 1027);
- HWND hwndP = GetDlgItem(childwnd, 1004);
- HWND hwndS = GetDlgItem(childwnd, 1006);
- if (childwnd && hwndP && hwndS)
- {
- // Where to restore focus to before we disable the cancel button
- hwndPrevFocus = GetFocus();
- if (!hwndPrevFocus)
- hwndPrevFocus = hwndP;
-
- if (IsWindowVisible(hwndL))
- ShowWindow(hwndL, SW_HIDE);
- else
- hwndL = NULL;
- if (IsWindowVisible(hwndB))
- ShowWindow(hwndB, SW_HIDE);
- else
- hwndB = NULL;
-
- RECT wndRect, ctlRect;
-
- GetClientRect(childwnd, &wndRect);
-
- GetWindowRect(hwndS, &ctlRect);
-
- HWND s = g_hwndStatic = CreateWindow(
- "STATIC",
- "",
- WS_CHILD | WS_CLIPSIBLINGS | SS_CENTER,
- 0,
- wndRect.bottom / 2 - (ctlRect.bottom - ctlRect.top) / 2,
- wndRect.right,
- ctlRect.bottom - ctlRect.top,
- childwnd,
- NULL,
- hModule,
- NULL
- );
-
- DWORD dwStyle = WS_CHILD | WS_CLIPSIBLINGS;
- dwStyle |= GetWindowLong(hwndP, GWL_STYLE) & PBS_SMOOTH;
-
- GetWindowRect(hwndP, &ctlRect);
-
- HWND pb = g_hwndProgressBar = CreateWindow(
- "msctls_progress32",
- "",
- dwStyle,
- 0,
- wndRect.bottom / 2 + (ctlRect.bottom - ctlRect.top) / 2,
- wndRect.right,
- ctlRect.bottom - ctlRect.top,
- childwnd,
- NULL,
- hModule,
- NULL
- );
-
- long c;
-
- c = SendMessage(hwndP, PBM_SETBARCOLOR, 0, 0);
- SendMessage(hwndP, PBM_SETBARCOLOR, 0, c);
- SendMessage(pb, PBM_SETBARCOLOR, 0, c);
-
- c = SendMessage(hwndP, PBM_SETBKCOLOR, 0, 0);
- SendMessage(hwndP, PBM_SETBKCOLOR, 0, c);
- SendMessage(pb, PBM_SETBKCOLOR, 0, c);
-
- // set font
- long hFont = SendMessage((HWND) lParam, WM_GETFONT, 0, 0);
- SendMessage(pb, WM_SETFONT, hFont, 0);
- SendMessage(s, WM_SETFONT, hFont, 0);
-
- ShowWindow(pb, SW_SHOWNA);
- ShowWindow(s, SW_SHOWNA);
-
- fCancelDisabled = EnableWindow(GetDlgItem(hwnd, IDCANCEL), TRUE);
- SendMessage(hwnd, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hwnd, IDCANCEL), TRUE);
- }
- else
- childwnd = NULL;
- }
- else if (childwnd)
- {
- if (hwndB)
- {
- ShowWindow(hwndB, SW_SHOWNA);
- hwndB = NULL;
- }
- if (hwndL)
- {
- ShowWindow(hwndL, SW_SHOWNA);
- hwndL = NULL;
- }
-
- // Prevent wierd stuff happening if the cancel button happens to be
- // pressed at the moment we are finishing and restore the previous focus
- // and cancel button states
- SendMessage(hwnd, WM_NEXTDLGCTL, (WPARAM)hwndPrevFocus, TRUE);
- SendMessage(GetDlgItem(hwnd, IDCANCEL), BM_SETSTATE, FALSE, 0);
- if (fCancelDisabled)
- EnableWindow(GetDlgItem(hwnd, IDCANCEL), FALSE);
-
- if (g_hwndStatic)
- {
- DestroyWindow(g_hwndStatic);
- g_hwndStatic = NULL;
- }
- if (g_hwndProgressBar)
- {
- DestroyWindow(g_hwndProgressBar);
- g_hwndProgressBar = NULL;
- }
- childwnd = NULL;
- }
- }
- else if (message == WM_COMMAND && LOWORD(wParam) == IDCANCEL)
- {
- g_cancelled = 1;
- }
- else
- {
- return CallWindowProc(
- (WNDPROC) lpWndProcOld,
- hwnd,
- message,
- wParam,
- lParam
- );
- }
- return 0;
-}
-
-extern "C" BOOL APIENTRY DllMain(HINSTANCE _hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
-{
- hModule = _hModule;
- return TRUE;
-}
-
-#define INT32_MAX 0x7fffffff
-
-int MulDiv64(int nNumber, __int64 nNumerator, __int64 nDenominator)
-{
- // ok, a complete implementation would handle negatives too,
- // but this method is probably not generally useful.
- while (nNumerator > INT32_MAX || nDenominator > INT32_MAX)
- {
- nNumerator = Int64ShraMod32(nNumerator, 1);
- nDenominator = Int64ShraMod32(nDenominator, 1);
- }
- return MulDiv(nNumber, (int)nNumerator, (int)nDenominator);
-}
-
-
-static __int64 g_file_size;
-static DWORD g_dwLastTick = 0;
-void progress_callback(char *msg, __int64 read_bytes)
-{
- // flicker reduction by A. Schiffler
- DWORD dwLastTick = g_dwLastTick;
- DWORD dwThisTick = GetTickCount();
- if (childwnd)
- {
- if (dwThisTick - dwLastTick > 500)
- {
- SetWindowText(g_hwndStatic, msg);
- dwLastTick = dwThisTick;
- }
- if (g_file_size)
- SendMessage(g_hwndProgressBar, PBM_SETPOS, (WPARAM) MulDiv64(30000, read_bytes, g_file_size), 0);
- g_dwLastTick = dwLastTick;
- }
-}
-
-extern char *_strstr(char *i, char *s);
-#define strstr _strstr
-
-extern "C"
-{
-
-__declspec(dllexport) void download (HWND parent,
- int string_size,
- char *variables,
- stack_t **stacktop)
-{
- char buf[1024];
- char url[1024];
- char filename[1024];
- static char proxy[1024];
- BOOL bSuccess=FALSE;
- int timeout_ms=30000;
- int getieproxy=1;
- int manualproxy=0;
- int translation_version;
-
- char *error=NULL;
-
- // translation version 2 & 1
- static char szDownloading[1024]; // "Downloading %s"
- static char szConnecting[1024]; // "Connecting ..."
- static char szSecond[1024]; // " (1 second remaining)" for v2
- // "second" for v1
- static char szMinute[1024]; // " (1 minute remaining)" for v2
- // "minute" for v1
- static char szHour[1024]; // " (1 hour remaining)" for v2
- // "hour" for v1
- static char szProgress[1024]; // "%skB (%d%%) of %skB at %u.%01ukB/s" for v2
- // "%dkB (%d%%) of %dkB at %d.%01dkB/s" for v1
-
- // translation version 2 only
- static char szSeconds[1024]; // " (%u seconds remaining)"
- static char szMinutes[1024]; // " (%u minutes remaining)"
- static char szHours[1024]; // " (%u hours remaining)"
-
- // translation version 1 only
- static char szPlural[1024]; // "s";
- static char szRemaining[1024]; // " (%d %s%s remaining)";
-
- EXDLL_INIT();
-
- popstring(url);
- if (!lstrcmpi(url, "/TRANSLATE2")) {
- popstring(szDownloading);
- popstring(szConnecting);
- popstring(szSecond);
- popstring(szMinute);
- popstring(szHour);
- popstring(szSeconds);
- popstring(szMinutes);
- popstring(szHours);
- popstring(szProgress);
- popstring(url);
- translation_version=2;
- } else if (!lstrcmpi(url, "/TRANSLATE")) {
- popstring(szDownloading);
- popstring(szConnecting);
- popstring(szSecond);
- popstring(szMinute);
- popstring(szHour);
- popstring(szPlural);
- popstring(szProgress);
- popstring(szRemaining);
- popstring(url);
- translation_version=1;
- } else {
- lstrcpy(szDownloading, "Downloading %s");
- lstrcpy(szConnecting, "Connecting ...");
- lstrcpy(szSecond, " (1 second remaining)");
- lstrcpy(szMinute, " (1 minute remaining)");
- lstrcpy(szHour, " (1 hour remaining)");
- lstrcpy(szSeconds, " (%u seconds remaining)");
- lstrcpy(szMinutes, " (%u minutes remaining)");
- lstrcpy(szHours, " (%u hours remaining)");
- lstrcpy(szProgress, "%skB (%d%%) of %skB at %u.%01ukB/s");
- translation_version=2;
- }
- lstrcpyn(buf, url, 10);
- if (!lstrcmpi(buf, "/TIMEOUT=")) {
- timeout_ms=my_atoi(url+9);
- popstring(url);
- }
- if (!lstrcmpi(url, "/PROXY")) {
- getieproxy=0;
- manualproxy=1;
- popstring(proxy);
- popstring(url);
- }
- if (!lstrcmpi(url, "/NOIEPROXY")) {
- getieproxy=0;
- popstring(url);
- }
- popstring(filename);
-
- HANDLE hFile = CreateFile(filename,GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
-
- if (hFile == INVALID_HANDLE_VALUE)
- {
- wsprintf(buf, "Unable to open %s", filename);
- error = buf;
- }
- else
- {
- if (parent)
- {
- uMsgCreate = RegisterWindowMessage("nsisdl create");
-
- lpWndProcOld = (void *)SetWindowLong(parent,GWL_WNDPROC,(long)ParentWndProc);
-
- SendMessage(parent, uMsgCreate, TRUE, (LPARAM) parent);
-
- // set initial text
- char *p = filename;
- while (*p) p++;
- while (*p != '\\' && p != filename) p = CharPrev(filename, p);
- wsprintf(buf, szDownloading, p != filename ? p + 1 : p);
- SetDlgItemText(childwnd, 1006, buf);
- SetWindowText(g_hwndStatic, szConnecting);
- }
- {
- WSADATA wsaData;
- WSAStartup(MAKEWORD(1, 1), &wsaData);
-
- JNL_HTTPGet *get = 0;
-
- static char main_buf[8192];
- char *buf=main_buf;
- char *p=NULL;
-
- HKEY hKey;
- if (getieproxy && RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS)
- {
- DWORD l = 4;
- DWORD t;
- DWORD v;
- if (RegQueryValueEx(hKey,"ProxyEnable",NULL,&t,(unsigned char *)&v,&l) == ERROR_SUCCESS && t == REG_DWORD && v)
- {
- l=8192;
- if (RegQueryValueEx(hKey,"ProxyServer",NULL,&t,(unsigned char *)buf,&l ) == ERROR_SUCCESS && t == REG_SZ)
- {
- p=strstr(buf,"http=");
- if (!p) p=buf;
- else {
- p+=5;
- }
- char *tp=strstr(p,";");
- if (tp) *tp=0;
- char *p2=strstr(p,"=");
- if (p2) p=0; // we found the wrong proxy
- }
- }
- buf[8192-1]=0;
- RegCloseKey(hKey);
- }
- if (manualproxy == 1) {
- p = proxy;
- }
-
- DWORD start_time=GetTickCount();
- get=new JNL_HTTPGet(JNL_CONNECTION_AUTODNS,16384,(p&&p[0])?p:NULL);
- int st;
- int has_printed_headers = 0;
- __int64 cl = 0;
- int len;
- __int64 sofar = 0;
- DWORD last_recv_time=start_time;
-
- get->addheader ("User-Agent: NSISDL/1.2 (Mozilla)");
- get->addheader ("Accept: */*");
-
- get->connect (url);
-
- while (1) {
- if (g_cancelled)
- error = "cancel";
-
- if (error)
- {
- if (parent)
- {
- SendMessage(parent, uMsgCreate, FALSE, (LPARAM) parent);
- SetWindowLong(parent, GWL_WNDPROC, (long)lpWndProcOld);
- }
- break;
- }
-
- st = get->run ();
-
- if (st == -1) {
- lstrcpyn(url, get->geterrorstr(), sizeof(url));
- error = url;
- } else if (st == 1) {
- if (sofar < cl || get->get_status () != 2)
- error="download incomplete";
- else
- {
- bSuccess=TRUE;
- error = "success";
- }
- } else {
-
- if (get->get_status () == 0) {
- // progressFunc ("Connecting ...", 0);
- if (last_recv_time+timeout_ms < GetTickCount())
- error = "Timed out on connecting.";
- else
- Sleep(10); // don't busy-loop while connecting
-
- } else if (get->get_status () == 1) {
-
- progress_callback("Reading headers", 0);
- if (last_recv_time+timeout_ms < GetTickCount())
- error = "Timed out on getting headers.";
- else
- Sleep(10); // don't busy-loop while reading headers
-
- } else if (get->get_status () == 2) {
-
- if (! has_printed_headers) {
- has_printed_headers = 1;
- last_recv_time=GetTickCount();
-
- cl = get->content_length ();
- if (cl == 0)
- error = "Server did not specify content length.";
- else if (g_hwndProgressBar) {
- SendMessage(g_hwndProgressBar, PBM_SETRANGE, 0, MAKELPARAM(0, 30000));
- g_file_size = cl;
- }
- }
-
- int data_downloaded = 0;
- while ((len = get->bytes_available ()) > 0) {
- data_downloaded++;
- if (len > 8192)
- len = 8192;
- len = get->get_bytes (buf, len);
- if (len > 0) {
- last_recv_time=GetTickCount();
- DWORD dw;
- WriteFile(hFile,buf,len,&dw,NULL);
- sofar += len;
- int time_sofar=(GetTickCount()-start_time)/1000;
- int bps = (int)(sofar/(time_sofar?time_sofar:1));
- int remain = MulDiv64(time_sofar, cl, sofar) - time_sofar;
-
- if (translation_version == 2) {
- char *rtext=remain==1?szSecond:szSeconds;;
- if (remain >= 60)
- {
- remain/=60;
- rtext=remain==1?szMinute:szMinutes;
- if (remain >= 60)
- {
- remain/=60;
- rtext=remain==1?szHour:szHours;
- }
- }
-
- char sofar_str[128];
- char cl_str[128];
- myitoa64(sofar/1024, sofar_str);
- myitoa64(cl/1024, cl_str);
-
- wsprintf (buf,
- szProgress, //%skB (%d%%) of %skB @ %u.%01ukB/s
- sofar_str,
- MulDiv64(100, sofar, cl),
- cl_str,
- bps/1024,((bps*10)/1024)%10
- );
- if (remain) wsprintf(buf+lstrlen(buf),rtext,
- remain
- );
- } else if (translation_version == 1) {
- char *rtext=szSecond;
- if (remain >= 60)
- {
- remain/=60;
- rtext=szMinute;
- if (remain >= 60)
- {
- remain/=60;
- rtext=szHour;
- }
- }
-
- wsprintf (buf,
- szProgress, //%dkB (%d%%) of %dkB @ %d.%01dkB/s
- int(sofar/1024),
- MulDiv64(100, sofar, cl),
- int(cl/1024),
- bps/1024,((bps*10)/1024)%10
- );
- if (remain) wsprintf(buf+lstrlen(buf),szRemaining,
- remain,
- rtext,
- remain==1?"":szPlural
- );
- }
- progress_callback(buf, sofar);
- } else {
- if (sofar < cl)
- error = "Server aborted.";
- }
- }
- if (GetTickCount() > last_recv_time+timeout_ms)
- {
- if (sofar != cl)
- {
- error = "Downloading timed out.";
- }
- else
- {
- // workaround for bug #1713562
- // buggy servers that wait for the client to close the connection.
- // another solution would be manually stopping when cl == sofar,
- // but then buggy servers that return wrong content-length will fail.
- bSuccess = TRUE;
- error = "success";
- }
- }
- else if (!data_downloaded)
- Sleep(10);
-
- } else {
- error = "Bad response status.";
- }
- }
-
- }
-
- // Clean up the connection then release winsock
- if (get) delete get;
- WSACleanup();
- }
-
- CloseHandle(hFile);
- }
-
- if (g_cancelled || !bSuccess) {
- DeleteFile(filename);
- }
-
- pushstring(error);
-}
-
-
-__declspec(dllexport) void download_quiet(HWND parent,
- int stringsize,
- char *variables,
- stack_t **stacktop)
-{
- g_hwndProgressBar=0;
- download(NULL,stringsize,variables,stacktop);
-}
-
-} //extern "C"
+/*
+ NSIS-DL 1.3 - http downloading DLL for NSIS
+ Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
+
+ 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.
+*/
+#include <windows.h>
+#include <stdio.h>
+#include <commctrl.h>
+
+#include "netinc.h"
+#include "util.h"
+#include "httpget.h"
+#include "../ExDLL/exdll.h"
+
+void *operator new( unsigned int num_bytes )
+{
+ return GlobalAlloc(GPTR,num_bytes);
+}
+void operator delete( void *p ) { if (p) GlobalFree(p); }
+
+
+HMODULE hModule;
+HWND g_hwndProgressBar;
+HWND g_hwndStatic;
+static int g_cancelled;
+static void *lpWndProcOld;
+
+static UINT uMsgCreate;
+
+HWND childwnd;
+HWND hwndL;
+HWND hwndB;
+
+static LRESULT CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsgCreate && message == uMsgCreate)
+ {
+ static HWND hwndPrevFocus;
+ static BOOL fCancelDisabled;
+
+ if (wParam)
+ {
+ childwnd = FindWindowEx((HWND) lParam, NULL, "#32770", NULL);
+ hwndL = GetDlgItem(childwnd, 1016);
+ hwndB = GetDlgItem(childwnd, 1027);
+ HWND hwndP = GetDlgItem(childwnd, 1004);
+ HWND hwndS = GetDlgItem(childwnd, 1006);
+ if (childwnd && hwndP && hwndS)
+ {
+ // Where to restore focus to before we disable the cancel button
+ hwndPrevFocus = GetFocus();
+ if (!hwndPrevFocus)
+ hwndPrevFocus = hwndP;
+
+ if (IsWindowVisible(hwndL))
+ ShowWindow(hwndL, SW_HIDE);
+ else
+ hwndL = NULL;
+ if (IsWindowVisible(hwndB))
+ ShowWindow(hwndB, SW_HIDE);
+ else
+ hwndB = NULL;
+
+ RECT wndRect, ctlRect;
+
+ GetClientRect(childwnd, &wndRect);
+
+ GetWindowRect(hwndS, &ctlRect);
+
+ HWND s = g_hwndStatic = CreateWindow(
+ "STATIC",
+ "",
+ WS_CHILD | WS_CLIPSIBLINGS | SS_CENTER,
+ 0,
+ wndRect.bottom / 2 - (ctlRect.bottom - ctlRect.top) / 2,
+ wndRect.right,
+ ctlRect.bottom - ctlRect.top,
+ childwnd,
+ NULL,
+ hModule,
+ NULL
+ );
+
+ DWORD dwStyle = WS_CHILD | WS_CLIPSIBLINGS;
+ dwStyle |= GetWindowLong(hwndP, GWL_STYLE) & PBS_SMOOTH;
+
+ GetWindowRect(hwndP, &ctlRect);
+
+ HWND pb = g_hwndProgressBar = CreateWindow(
+ "msctls_progress32",
+ "",
+ dwStyle,
+ 0,
+ wndRect.bottom / 2 + (ctlRect.bottom - ctlRect.top) / 2,
+ wndRect.right,
+ ctlRect.bottom - ctlRect.top,
+ childwnd,
+ NULL,
+ hModule,
+ NULL
+ );
+
+ long c;
+
+ c = SendMessage(hwndP, PBM_SETBARCOLOR, 0, 0);
+ SendMessage(hwndP, PBM_SETBARCOLOR, 0, c);
+ SendMessage(pb, PBM_SETBARCOLOR, 0, c);
+
+ c = SendMessage(hwndP, PBM_SETBKCOLOR, 0, 0);
+ SendMessage(hwndP, PBM_SETBKCOLOR, 0, c);
+ SendMessage(pb, PBM_SETBKCOLOR, 0, c);
+
+ // set font
+ long hFont = SendMessage((HWND) lParam, WM_GETFONT, 0, 0);
+ SendMessage(pb, WM_SETFONT, hFont, 0);
+ SendMessage(s, WM_SETFONT, hFont, 0);
+
+ ShowWindow(pb, SW_SHOWNA);
+ ShowWindow(s, SW_SHOWNA);
+
+ fCancelDisabled = EnableWindow(GetDlgItem(hwnd, IDCANCEL), TRUE);
+ SendMessage(hwnd, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hwnd, IDCANCEL), TRUE);
+ }
+ else
+ childwnd = NULL;
+ }
+ else if (childwnd)
+ {
+ if (hwndB)
+ {
+ ShowWindow(hwndB, SW_SHOWNA);
+ hwndB = NULL;
+ }
+ if (hwndL)
+ {
+ ShowWindow(hwndL, SW_SHOWNA);
+ hwndL = NULL;
+ }
+
+ // Prevent wierd stuff happening if the cancel button happens to be
+ // pressed at the moment we are finishing and restore the previous focus
+ // and cancel button states
+ SendMessage(hwnd, WM_NEXTDLGCTL, (WPARAM)hwndPrevFocus, TRUE);
+ SendMessage(GetDlgItem(hwnd, IDCANCEL), BM_SETSTATE, FALSE, 0);
+ if (fCancelDisabled)
+ EnableWindow(GetDlgItem(hwnd, IDCANCEL), FALSE);
+
+ if (g_hwndStatic)
+ {
+ DestroyWindow(g_hwndStatic);
+ g_hwndStatic = NULL;
+ }
+ if (g_hwndProgressBar)
+ {
+ DestroyWindow(g_hwndProgressBar);
+ g_hwndProgressBar = NULL;
+ }
+ childwnd = NULL;
+ }
+ }
+ else if (message == WM_COMMAND && LOWORD(wParam) == IDCANCEL)
+ {
+ g_cancelled = 1;
+ }
+ else
+ {
+ return CallWindowProc(
+ (WNDPROC) lpWndProcOld,
+ hwnd,
+ message,
+ wParam,
+ lParam
+ );
+ }
+ return 0;
+}
+
+extern "C" BOOL APIENTRY DllMain(HINSTANCE _hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
+{
+ hModule = _hModule;
+ return TRUE;
+}
+
+#define INT32_MAX 0x7fffffff
+
+int MulDiv64(int nNumber, __int64 nNumerator, __int64 nDenominator)
+{
+ // ok, a complete implementation would handle negatives too,
+ // but this method is probably not generally useful.
+ while (nNumerator > INT32_MAX || nDenominator > INT32_MAX)
+ {
+ nNumerator = Int64ShraMod32(nNumerator, 1);
+ nDenominator = Int64ShraMod32(nDenominator, 1);
+ }
+ return MulDiv(nNumber, (int)nNumerator, (int)nDenominator);
+}
+
+
+static __int64 g_file_size;
+static DWORD g_dwLastTick = 0;
+void progress_callback(char *msg, __int64 read_bytes)
+{
+ // flicker reduction by A. Schiffler
+ DWORD dwLastTick = g_dwLastTick;
+ DWORD dwThisTick = GetTickCount();
+ if (childwnd)
+ {
+ if (dwThisTick - dwLastTick > 500)
+ {
+ SetWindowText(g_hwndStatic, msg);
+ dwLastTick = dwThisTick;
+ }
+ if (g_file_size)
+ SendMessage(g_hwndProgressBar, PBM_SETPOS, (WPARAM) MulDiv64(30000, read_bytes, g_file_size), 0);
+ g_dwLastTick = dwLastTick;
+ }
+}
+
+extern char *_strstr(char *i, char *s);
+#define strstr _strstr
+
+extern "C"
+{
+
+__declspec(dllexport) void download (HWND parent,
+ int string_size,
+ char *variables,
+ stack_t **stacktop)
+{
+ char buf[1024];
+ char url[1024];
+ char filename[1024];
+ static char proxy[1024];
+ BOOL bSuccess=FALSE;
+ int timeout_ms=30000;
+ int getieproxy=1;
+ int manualproxy=0;
+ int translation_version;
+
+ char *error=NULL;
+
+ // translation version 2 & 1
+ static char szDownloading[1024]; // "Downloading %s"
+ static char szConnecting[1024]; // "Connecting ..."
+ static char szSecond[1024]; // " (1 second remaining)" for v2
+ // "second" for v1
+ static char szMinute[1024]; // " (1 minute remaining)" for v2
+ // "minute" for v1
+ static char szHour[1024]; // " (1 hour remaining)" for v2
+ // "hour" for v1
+ static char szProgress[1024]; // "%skB (%d%%) of %skB at %u.%01ukB/s" for v2
+ // "%dkB (%d%%) of %dkB at %d.%01dkB/s" for v1
+
+ // translation version 2 only
+ static char szSeconds[1024]; // " (%u seconds remaining)"
+ static char szMinutes[1024]; // " (%u minutes remaining)"
+ static char szHours[1024]; // " (%u hours remaining)"
+
+ // translation version 1 only
+ static char szPlural[1024]; // "s";
+ static char szRemaining[1024]; // " (%d %s%s remaining)";
+
+ EXDLL_INIT();
+
+ popstring(url);
+ if (!lstrcmpi(url, "/TRANSLATE2")) {
+ popstring(szDownloading);
+ popstring(szConnecting);
+ popstring(szSecond);
+ popstring(szMinute);
+ popstring(szHour);
+ popstring(szSeconds);
+ popstring(szMinutes);
+ popstring(szHours);
+ popstring(szProgress);
+ popstring(url);
+ translation_version=2;
+ } else if (!lstrcmpi(url, "/TRANSLATE")) {
+ popstring(szDownloading);
+ popstring(szConnecting);
+ popstring(szSecond);
+ popstring(szMinute);
+ popstring(szHour);
+ popstring(szPlural);
+ popstring(szProgress);
+ popstring(szRemaining);
+ popstring(url);
+ translation_version=1;
+ } else {
+ lstrcpy(szDownloading, "Downloading %s");
+ lstrcpy(szConnecting, "Connecting ...");
+ lstrcpy(szSecond, " (1 second remaining)");
+ lstrcpy(szMinute, " (1 minute remaining)");
+ lstrcpy(szHour, " (1 hour remaining)");
+ lstrcpy(szSeconds, " (%u seconds remaining)");
+ lstrcpy(szMinutes, " (%u minutes remaining)");
+ lstrcpy(szHours, " (%u hours remaining)");
+ lstrcpy(szProgress, "%skB (%d%%) of %skB at %u.%01ukB/s");
+ translation_version=2;
+ }
+ lstrcpyn(buf, url, 10);
+ if (!lstrcmpi(buf, "/TIMEOUT=")) {
+ timeout_ms=my_atoi(url+9);
+ popstring(url);
+ }
+ if (!lstrcmpi(url, "/PROXY")) {
+ getieproxy=0;
+ manualproxy=1;
+ popstring(proxy);
+ popstring(url);
+ }
+ if (!lstrcmpi(url, "/NOIEPROXY")) {
+ getieproxy=0;
+ popstring(url);
+ }
+ popstring(filename);
+
+ HANDLE hFile = CreateFile(filename,GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ {
+ wsprintf(buf, "Unable to open %s", filename);
+ error = buf;
+ }
+ else
+ {
+ if (parent)
+ {
+ uMsgCreate = RegisterWindowMessage("nsisdl create");
+
+ lpWndProcOld = (void *)SetWindowLong(parent,GWL_WNDPROC,(long)ParentWndProc);
+
+ SendMessage(parent, uMsgCreate, TRUE, (LPARAM) parent);
+
+ // set initial text
+ char *p = filename;
+ while (*p) p++;
+ while (*p != '\\' && p != filename) p = CharPrev(filename, p);
+ wsprintf(buf, szDownloading, p != filename ? p + 1 : p);
+ SetDlgItemText(childwnd, 1006, buf);
+ SetWindowText(g_hwndStatic, szConnecting);
+ }
+ {
+ WSADATA wsaData;
+ WSAStartup(MAKEWORD(1, 1), &wsaData);
+
+ JNL_HTTPGet *get = 0;
+
+ static char main_buf[8192];
+ char *buf=main_buf;
+ char *p=NULL;
+
+ HKEY hKey;
+ if (getieproxy && RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS)
+ {
+ DWORD l = 4;
+ DWORD t;
+ DWORD v;
+ if (RegQueryValueEx(hKey,"ProxyEnable",NULL,&t,(unsigned char *)&v,&l) == ERROR_SUCCESS && t == REG_DWORD && v)
+ {
+ l=8192;
+ if (RegQueryValueEx(hKey,"ProxyServer",NULL,&t,(unsigned char *)buf,&l ) == ERROR_SUCCESS && t == REG_SZ)
+ {
+ p=strstr(buf,"http=");
+ if (!p) p=buf;
+ else {
+ p+=5;
+ }
+ char *tp=strstr(p,";");
+ if (tp) *tp=0;
+ char *p2=strstr(p,"=");
+ if (p2) p=0; // we found the wrong proxy
+ }
+ }
+ buf[8192-1]=0;
+ RegCloseKey(hKey);
+ }
+ if (manualproxy == 1) {
+ p = proxy;
+ }
+
+ DWORD start_time=GetTickCount();
+ get=new JNL_HTTPGet(JNL_CONNECTION_AUTODNS,16384,(p&&p[0])?p:NULL);
+ int st;
+ int has_printed_headers = 0;
+ __int64 cl = 0;
+ int len;
+ __int64 sofar = 0;
+ DWORD last_recv_time=start_time;
+
+ get->addheader ("User-Agent: NSISDL/1.2 (Mozilla)");
+ get->addheader ("Accept: */*");
+
+ get->connect (url);
+
+ while (1) {
+ if (g_cancelled)
+ error = "cancel";
+
+ if (error)
+ {
+ if (parent)
+ {
+ SendMessage(parent, uMsgCreate, FALSE, (LPARAM) parent);
+ SetWindowLong(parent, GWL_WNDPROC, (long)lpWndProcOld);
+ }
+ break;
+ }
+
+ st = get->run ();
+
+ if (st == -1) {
+ lstrcpyn(url, get->geterrorstr(), sizeof(url));
+ error = url;
+ } else if (st == 1) {
+ if (sofar < cl || get->get_status () != 2)
+ error="download incomplete";
+ else
+ {
+ bSuccess=TRUE;
+ error = "success";
+ }
+ } else {
+
+ if (get->get_status () == 0) {
+ // progressFunc ("Connecting ...", 0);
+ if (last_recv_time+timeout_ms < GetTickCount())
+ error = "Timed out on connecting.";
+ else
+ Sleep(10); // don't busy-loop while connecting
+
+ } else if (get->get_status () == 1) {
+
+ progress_callback("Reading headers", 0);
+ if (last_recv_time+timeout_ms < GetTickCount())
+ error = "Timed out on getting headers.";
+ else
+ Sleep(10); // don't busy-loop while reading headers
+
+ } else if (get->get_status () == 2) {
+
+ if (! has_printed_headers) {
+ has_printed_headers = 1;
+ last_recv_time=GetTickCount();
+
+ cl = get->content_length ();
+ if (cl == 0)
+ error = "Server did not specify content length.";
+ else if (g_hwndProgressBar) {
+ SendMessage(g_hwndProgressBar, PBM_SETRANGE, 0, MAKELPARAM(0, 30000));
+ g_file_size = cl;
+ }
+ }
+
+ int data_downloaded = 0;
+ while ((len = get->bytes_available ()) > 0) {
+ data_downloaded++;
+ if (len > 8192)
+ len = 8192;
+ len = get->get_bytes (buf, len);
+ if (len > 0) {
+ last_recv_time=GetTickCount();
+ DWORD dw;
+ WriteFile(hFile,buf,len,&dw,NULL);
+ sofar += len;
+ int time_sofar=(GetTickCount()-start_time)/1000;
+ int bps = (int)(sofar/(time_sofar?time_sofar:1));
+ int remain = MulDiv64(time_sofar, cl, sofar) - time_sofar;
+
+ if (translation_version == 2) {
+ char *rtext=remain==1?szSecond:szSeconds;;
+ if (remain >= 60)
+ {
+ remain/=60;
+ rtext=remain==1?szMinute:szMinutes;
+ if (remain >= 60)
+ {
+ remain/=60;
+ rtext=remain==1?szHour:szHours;
+ }
+ }
+
+ char sofar_str[128];
+ char cl_str[128];
+ myitoa64(sofar/1024, sofar_str);
+ myitoa64(cl/1024, cl_str);
+
+ wsprintf (buf,
+ szProgress, //%skB (%d%%) of %skB @ %u.%01ukB/s
+ sofar_str,
+ MulDiv64(100, sofar, cl),
+ cl_str,
+ bps/1024,((bps*10)/1024)%10
+ );
+ if (remain) wsprintf(buf+lstrlen(buf),rtext,
+ remain
+ );
+ } else if (translation_version == 1) {
+ char *rtext=szSecond;
+ if (remain >= 60)
+ {
+ remain/=60;
+ rtext=szMinute;
+ if (remain >= 60)
+ {
+ remain/=60;
+ rtext=szHour;
+ }
+ }
+
+ wsprintf (buf,
+ szProgress, //%dkB (%d%%) of %dkB @ %d.%01dkB/s
+ int(sofar/1024),
+ MulDiv64(100, sofar, cl),
+ int(cl/1024),
+ bps/1024,((bps*10)/1024)%10
+ );
+ if (remain) wsprintf(buf+lstrlen(buf),szRemaining,
+ remain,
+ rtext,
+ remain==1?"":szPlural
+ );
+ }
+ progress_callback(buf, sofar);
+ } else {
+ if (sofar < cl)
+ error = "Server aborted.";
+ }
+ }
+ if (GetTickCount() > last_recv_time+timeout_ms)
+ {
+ if (sofar != cl)
+ {
+ error = "Downloading timed out.";
+ }
+ else
+ {
+ // workaround for bug #1713562
+ // buggy servers that wait for the client to close the connection.
+ // another solution would be manually stopping when cl == sofar,
+ // but then buggy servers that return wrong content-length will fail.
+ bSuccess = TRUE;
+ error = "success";
+ }
+ }
+ else if (!data_downloaded)
+ Sleep(10);
+
+ } else {
+ error = "Bad response status.";
+ }
+ }
+
+ }
+
+ // Clean up the connection then release winsock
+ if (get) delete get;
+ WSACleanup();
+ }
+
+ CloseHandle(hFile);
+ }
+
+ if (g_cancelled || !bSuccess) {
+ DeleteFile(filename);
+ }
+
+ pushstring(error);
+}
+
+
+__declspec(dllexport) void download_quiet(HWND parent,
+ int stringsize,
+ char *variables,
+ stack_t **stacktop)
+{
+ g_hwndProgressBar=0;
+ download(NULL,stringsize,variables,stacktop);
+}
+
+} //extern "C"
diff --git a/Contrib/NSISdl/util.cpp b/Contrib/NSISdl/util.cpp
index 416c1b2..e81b649 100755
--- a/Contrib/NSISdl/util.cpp
+++ b/Contrib/NSISdl/util.cpp
@@ -1,85 +1,85 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: util.cpp - JNL implementation of basic network utilities
-** License: see jnetlib.h
-*/
-
-#include "netinc.h"
-
-#include "util.h"
-
-int my_atoi(char *s)
-{
- int sign=0;
- int v=0;
- if (*s == '-') { s++; sign++; }
- for (;;)
- {
- int c=*s++ - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- if (sign) return -(int) v;
- return (int)v;
-}
-
-__int64 myatoi64(char *s)
-{
- __int64 v=0;
- int sign=0;
-
- if (*s == '-')
- sign++;
- else
- s--;
-
- for (;;)
- {
- int c=*(++s) - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
-
- if (sign)
- v = -v;
-
- return v;
-}
-
-void myitoa64(__int64 i, char *buffer)
-{
- char buf[128], *b = buf;
-
- if (i < 0)
- {
- *(buffer++) = '-';
- i = -i;
- }
- if (i == 0) *(buffer++) = '0';
- else
- {
- while (i > 0)
- {
- *(b++) = '0' + ((char) (i%10));
- i /= 10;
- }
- while (b > buf) *(buffer++) = *(--b);
- }
- *buffer = 0;
-}
-
-void mini_memset(void *o,char i,int l)
-{
- char *oo=(char*)o;
- while (l-- > 0) *oo++=i;
-}
-void mini_memcpy(void *o,void*i,int l)
-{
- char *oo=(char*)o;
- char *ii=(char*)i;
- while (l-- > 0) *oo++=*ii++;
-}
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: util.cpp - JNL implementation of basic network utilities
+** License: see jnetlib.h
+*/
+
+#include "netinc.h"
+
+#include "util.h"
+
+int my_atoi(char *s)
+{
+ int sign=0;
+ int v=0;
+ if (*s == '-') { s++; sign++; }
+ for (;;)
+ {
+ int c=*s++ - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ if (sign) return -(int) v;
+ return (int)v;
+}
+
+__int64 myatoi64(char *s)
+{
+ __int64 v=0;
+ int sign=0;
+
+ if (*s == '-')
+ sign++;
+ else
+ s--;
+
+ for (;;)
+ {
+ int c=*(++s) - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+
+ if (sign)
+ v = -v;
+
+ return v;
+}
+
+void myitoa64(__int64 i, char *buffer)
+{
+ char buf[128], *b = buf;
+
+ if (i < 0)
+ {
+ *(buffer++) = '-';
+ i = -i;
+ }
+ if (i == 0) *(buffer++) = '0';
+ else
+ {
+ while (i > 0)
+ {
+ *(b++) = '0' + ((char) (i%10));
+ i /= 10;
+ }
+ while (b > buf) *(buffer++) = *(--b);
+ }
+ *buffer = 0;
+}
+
+void mini_memset(void *o,char i,int l)
+{
+ char *oo=(char*)o;
+ while (l-- > 0) *oo++=i;
+}
+void mini_memcpy(void *o,void*i,int l)
+{
+ char *oo=(char*)o;
+ char *ii=(char*)i;
+ while (l-- > 0) *oo++=*ii++;
+}
diff --git a/Contrib/NSISdl/util.h b/Contrib/NSISdl/util.h
index 32ab1ed..6be0704 100755
--- a/Contrib/NSISdl/util.h
+++ b/Contrib/NSISdl/util.h
@@ -1,36 +1,36 @@
-/*
-** JNetLib
-** Copyright (C) 2000-2001 Nullsoft, Inc.
-** Author: Justin Frankel
-** File: util.h - JNL interface for basic network utilities
-** License: see jnetlib.h
-**
-** routines you may be interested in:
-** JNL::open_socketlib();
-** opens the socket library. Call this once before using any network
-** code. If you create a new thread, call this again. Only really an
-** issue for Win32 support, but use it anyway for portability/
-**
-** JNL::close_Socketlib();
-** closes the socketlib. Call this when you're done with the network,
-** after all your JNetLib objects have been destroyed.
-**
-** unsigned long JNL::ipstr_to_addr(const char *cp);
-** gives you the integer representation of a ip address in dotted
-** decimal form.
-**
-** JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
-** gives you the dotted decimal notation of an integer ip address.
-**
-*/
-
-#ifndef _UTIL_H_
-#define _UTIL_H_
-
-int my_atoi(char *p);
-__int64 myatoi64(char *s);
-void myitoa64(__int64 i, char *buffer);
-void mini_memset(void *,char,int);
-void mini_memcpy(void *,void*,int);
-
-#endif //_UTIL_H_
+/*
+** JNetLib
+** Copyright (C) 2000-2001 Nullsoft, Inc.
+** Author: Justin Frankel
+** File: util.h - JNL interface for basic network utilities
+** License: see jnetlib.h
+**
+** routines you may be interested in:
+** JNL::open_socketlib();
+** opens the socket library. Call this once before using any network
+** code. If you create a new thread, call this again. Only really an
+** issue for Win32 support, but use it anyway for portability/
+**
+** JNL::close_Socketlib();
+** closes the socketlib. Call this when you're done with the network,
+** after all your JNetLib objects have been destroyed.
+**
+** unsigned long JNL::ipstr_to_addr(const char *cp);
+** gives you the integer representation of a ip address in dotted
+** decimal form.
+**
+** JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
+** gives you the dotted decimal notation of an integer ip address.
+**
+*/
+
+#ifndef _UTIL_H_
+#define _UTIL_H_
+
+int my_atoi(char *p);
+__int64 myatoi64(char *s);
+void myitoa64(__int64 i, char *buffer);
+void mini_memset(void *,char,int);
+void mini_memcpy(void *,void*,int);
+
+#endif //_UTIL_H_
diff --git a/Contrib/Splash/Example.nsi b/Contrib/Splash/Example.nsi
index 9967780..2cc62b5 100755
--- a/Contrib/Splash/Example.nsi
+++ b/Contrib/Splash/Example.nsi
@@ -1,21 +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
+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/Contrib/Splash/SConscript b/Contrib/Splash/SConscript
index 0ac5a7d..9ef895d 100755
--- a/Contrib/Splash/SConscript
+++ b/Contrib/Splash/SConscript
@@ -1,24 +1,24 @@
-target = 'Splash'
-
-files = Split("""
- splash.c
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- winmm
-""")
-
-examples = Split("""
- Example.nsi
-""")
-
-docs = Split("""
- splash.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples, docs)
+target = 'Splash'
+
+files = Split("""
+ splash.c
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ winmm
+""")
+
+examples = Split("""
+ Example.nsi
+""")
+
+docs = Split("""
+ splash.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples, docs)
diff --git a/Contrib/Splash/splash.c b/Contrib/Splash/splash.c
index a7bb3ab..20588bf 100755
--- a/Contrib/Splash/splash.c
+++ b/Contrib/Splash/splash.c
@@ -1,119 +1,119 @@
-#include <windows.h>
-#include "../ExDLL/exdll.h"
-
-HINSTANCE g_hInstance;
-
-HBITMAP g_hbm;
-int sleep_val;
-int g_rv=-1;
-
-static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if (uMsg == WM_CREATE)
- {
- BITMAP bm;
- RECT vp;
- GetObject(g_hbm, sizeof(bm), (LPSTR)&bm);
- SystemParametersInfo(SPI_GETWORKAREA, 0, &vp, 0);
- SetWindowLong(hwnd,GWL_STYLE,0);
- SetWindowPos(hwnd,NULL,
- vp.left+(vp.right-vp.left-bm.bmWidth)/2,
- vp.top+(vp.bottom-vp.top-bm.bmHeight)/2,
- bm.bmWidth,bm.bmHeight,
- SWP_NOZORDER);
- ShowWindow(hwnd,SW_SHOW);
- SetTimer(hwnd,1,sleep_val,NULL);
- return 0;
- }
- if (uMsg == WM_PAINT)
- {
- PAINTSTRUCT ps;
- RECT r;
- HDC curdc=BeginPaint(hwnd,&ps);
- HDC hdc=CreateCompatibleDC(curdc);
- HBITMAP oldbm;
- GetClientRect(hwnd,&r);
- oldbm=(HBITMAP)SelectObject(hdc,g_hbm);
- BitBlt(curdc,r.left,r.top,r.right-r.left,r.bottom-r.top,hdc,0,0,SRCCOPY);
- SelectObject(hdc,oldbm);
- DeleteDC(hdc);
- EndPaint(hwnd,&ps);
- return 0;
- }
- if (uMsg == WM_CLOSE) return 0;
- if (uMsg == WM_TIMER || uMsg == WM_LBUTTONDOWN)
- {
- g_rv=(uMsg == WM_LBUTTONDOWN);
- DestroyWindow(hwnd);
- }
- return DefWindowProc(hwnd,uMsg,wParam,lParam);
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- g_hInstance=hInst;
- return TRUE;
-}
-
-void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-{
- char fn[MAX_PATH];
- char temp[64];
- char *sleep=temp;
-
-
- EXDLL_INIT();
-
- popstring(sleep);
- popstring(fn);
-
- sleep_val=0;
- while (*sleep >= '0' && *sleep <= '9')
- {
- sleep_val*=10;
- sleep_val+=*sleep++-'0';
- }
-
- if (fn[0] && sleep_val>0)
- {
- MSG msg;
- char classname[4]="_sp";
- static WNDCLASS wc;
- wc.lpfnWndProc = WndProc;
- wc.hInstance = g_hInstance;
- wc.hCursor = LoadCursor(NULL,IDC_ARROW);
- wc.lpszClassName = classname;
- if (RegisterClass(&wc))
- {
- char fn2[MAX_PATH];
- lstrcpy(fn2,fn);
- lstrcat(fn,".bmp");
- lstrcat(fn2,".wav");
- g_hbm=LoadImage(NULL,fn,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE);
- if (g_hbm)
- {
- HWND myWnd;
-
- PlaySound(fn2,NULL,SND_ASYNC|SND_FILENAME|SND_NODEFAULT);
-
- myWnd = CreateWindowEx(WS_EX_TOOLWINDOW,classname,classname,
- 0,0,0,0,0,(HWND)hwndParent,NULL,g_hInstance,NULL);
-
- while (IsWindow(myWnd) && GetMessage(&msg,myWnd,0,0))
- {
- DispatchMessage(&msg);
- }
-
- // Stop currently playing wave, we want to exit
- PlaySound(0,0,0);
-
- DeleteObject(g_hbm);
-
- UnregisterClass(classname, g_hInstance);
-
- }
- }
- }
- wsprintf(temp,"%d",g_rv);
- pushstring(temp);
-}
+#include <windows.h>
+#include "../ExDLL/exdll.h"
+
+HINSTANCE g_hInstance;
+
+HBITMAP g_hbm;
+int sleep_val;
+int g_rv=-1;
+
+static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_CREATE)
+ {
+ BITMAP bm;
+ RECT vp;
+ GetObject(g_hbm, sizeof(bm), (LPSTR)&bm);
+ SystemParametersInfo(SPI_GETWORKAREA, 0, &vp, 0);
+ SetWindowLong(hwnd,GWL_STYLE,0);
+ SetWindowPos(hwnd,NULL,
+ vp.left+(vp.right-vp.left-bm.bmWidth)/2,
+ vp.top+(vp.bottom-vp.top-bm.bmHeight)/2,
+ bm.bmWidth,bm.bmHeight,
+ SWP_NOZORDER);
+ ShowWindow(hwnd,SW_SHOW);
+ SetTimer(hwnd,1,sleep_val,NULL);
+ return 0;
+ }
+ if (uMsg == WM_PAINT)
+ {
+ PAINTSTRUCT ps;
+ RECT r;
+ HDC curdc=BeginPaint(hwnd,&ps);
+ HDC hdc=CreateCompatibleDC(curdc);
+ HBITMAP oldbm;
+ GetClientRect(hwnd,&r);
+ oldbm=(HBITMAP)SelectObject(hdc,g_hbm);
+ BitBlt(curdc,r.left,r.top,r.right-r.left,r.bottom-r.top,hdc,0,0,SRCCOPY);
+ SelectObject(hdc,oldbm);
+ DeleteDC(hdc);
+ EndPaint(hwnd,&ps);
+ return 0;
+ }
+ if (uMsg == WM_CLOSE) return 0;
+ if (uMsg == WM_TIMER || uMsg == WM_LBUTTONDOWN)
+ {
+ g_rv=(uMsg == WM_LBUTTONDOWN);
+ DestroyWindow(hwnd);
+ }
+ return DefWindowProc(hwnd,uMsg,wParam,lParam);
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance=hInst;
+ return TRUE;
+}
+
+void __declspec(dllexport) show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+{
+ char fn[MAX_PATH];
+ char temp[64];
+ char *sleep=temp;
+
+
+ EXDLL_INIT();
+
+ popstring(sleep);
+ popstring(fn);
+
+ sleep_val=0;
+ while (*sleep >= '0' && *sleep <= '9')
+ {
+ sleep_val*=10;
+ sleep_val+=*sleep++-'0';
+ }
+
+ if (fn[0] && sleep_val>0)
+ {
+ MSG msg;
+ char classname[4]="_sp";
+ static WNDCLASS wc;
+ wc.lpfnWndProc = WndProc;
+ wc.hInstance = g_hInstance;
+ wc.hCursor = LoadCursor(NULL,IDC_ARROW);
+ wc.lpszClassName = classname;
+ if (RegisterClass(&wc))
+ {
+ char fn2[MAX_PATH];
+ lstrcpy(fn2,fn);
+ lstrcat(fn,".bmp");
+ lstrcat(fn2,".wav");
+ g_hbm=LoadImage(NULL,fn,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION|LR_LOADFROMFILE);
+ if (g_hbm)
+ {
+ HWND myWnd;
+
+ PlaySound(fn2,NULL,SND_ASYNC|SND_FILENAME|SND_NODEFAULT);
+
+ myWnd = CreateWindowEx(WS_EX_TOOLWINDOW,classname,classname,
+ 0,0,0,0,0,(HWND)hwndParent,NULL,g_hInstance,NULL);
+
+ while (IsWindow(myWnd) && GetMessage(&msg,myWnd,0,0))
+ {
+ DispatchMessage(&msg);
+ }
+
+ // Stop currently playing wave, we want to exit
+ PlaySound(0,0,0);
+
+ DeleteObject(g_hbm);
+
+ UnregisterClass(classname, g_hInstance);
+
+ }
+ }
+ }
+ wsprintf(temp,"%d",g_rv);
+ pushstring(temp);
+}
diff --git a/Contrib/Splash/splash.txt b/Contrib/Splash/splash.txt
index a8db32d..e69e073 100755
--- a/Contrib/Splash/splash.txt
+++ b/Contrib/Splash/splash.txt
@@ -1,41 +1,41 @@
-Splash.dll - small (4k), simple plugin that lets you throw
-up a splash screen in NSIS installers.
-
---- UPDATED in 2.0b0 - will break old scripts ---
-
-To use:
-
-Create a .BMP file of your splash screen.
-(optional) Create a .WAV file to play while your splash screen shows.
-
-Add the following lines to your .NSI file:
-
-Function .onInit
- SetOutPath $TEMP
- File /oname=spltmp.bmp "my_splash.bmp"
-
-; optional
-; File /oname=spltmp.wav "my_splashshit.wav"
-
- splash::show 1000 $TEMP\spltmp
-
- Pop $0 ; $0 has '1' if the user closed the splash screen early,
- ; '0' if everything closed normally, and '-1' if some error occurred.
-
- Delete $TEMP\spltmp.bmp
-; Delete $TEMP\spltmp.wav
-FunctionEnd
-
-Note that the first parameter to splash.exe is the length to show the
-screen for (in milliseconds), and the second is the splash bitmap filename (without
-the .bmp). The BMP file used will be this parameter.bmp, and the wave file used
-(if present) will be this parameter.wav.
-
-(If you already have an .onInit function, put that in it)
-
-Note: the return value of splash is 1 if the user closed the splash
-screen early (pop it from the stack)
-
--Justin
-
-Converted to a plugin DLL by Amir Szekely (kichik)
+Splash.dll - small (4k), simple plugin that lets you throw
+up a splash screen in NSIS installers.
+
+--- UPDATED in 2.0b0 - will break old scripts ---
+
+To use:
+
+Create a .BMP file of your splash screen.
+(optional) Create a .WAV file to play while your splash screen shows.
+
+Add the following lines to your .NSI file:
+
+Function .onInit
+ SetOutPath $TEMP
+ File /oname=spltmp.bmp "my_splash.bmp"
+
+; optional
+; File /oname=spltmp.wav "my_splashshit.wav"
+
+ splash::show 1000 $TEMP\spltmp
+
+ Pop $0 ; $0 has '1' if the user closed the splash screen early,
+ ; '0' if everything closed normally, and '-1' if some error occurred.
+
+ Delete $TEMP\spltmp.bmp
+; Delete $TEMP\spltmp.wav
+FunctionEnd
+
+Note that the first parameter to splash.exe is the length to show the
+screen for (in milliseconds), and the second is the splash bitmap filename (without
+the .bmp). The BMP file used will be this parameter.bmp, and the wave file used
+(if present) will be this parameter.wav.
+
+(If you already have an .onInit function, put that in it)
+
+Note: the return value of splash is 1 if the user closed the splash
+screen early (pop it from the stack)
+
+-Justin
+
+Converted to a plugin DLL by Amir Szekely (kichik)
diff --git a/Contrib/StartMenu/Example.nsi b/Contrib/StartMenu/Example.nsi
index 82db84d..9a9a82e 100755
--- a/Contrib/StartMenu/Example.nsi
+++ b/Contrib/StartMenu/Example.nsi
@@ -1,50 +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:
+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/Contrib/StartMenu/Readme.txt b/Contrib/StartMenu/Readme.txt
index c3d635b..74f39fa 100755
--- a/Contrib/StartMenu/Readme.txt
+++ b/Contrib/StartMenu/Readme.txt
@@ -1,47 +1,47 @@
-StartMenu.dll shows a custom page that lets the user select a start menu program
-folder to put shortcuts in.
-
-To show the dialog use the Select function. This function has one required parameter
-which is the program group default name, and some more optional switches:
- /autoadd - automatically adds the program name to the selected folder
- /noicon - doesn't show the icon in the top left corner
- /text [please select...] - sets the top text to something else than
- "Select the Start Menu folder in which..."
- /lastused [folder] - sets the edit box to a specific value folder.
- Use this to make this plug-in remember the last
- folder selected by the user
- /checknoshortcuts text - Shows a check box with the text "text". If
- the user checks this box, the return value
- will have > as its first character and you
- should not create the program group.
- /rtl - sets the direction of every control on the selection dialog
- to RTL. This means every text shown on the page will be
- justified to the right.
-
-The order of the switches doesn't matter but the required parameter must come after
-all of them. Every switch after the required parameter will be ignored and left
-on the stack.
-
-The function pushes "success", "cancel" or an error to the stack. If there was no
-error and the user didn't press on cancel it will push the selected folder name
-after "success". If the user checked the no shortcuts checkbox the result will be
-prefixed with '>'. The function does not push the full path but only the selected
-sub-folder. It's up to you to decide if to put it in the current user or all
-users start menu.
-
-To set properties of the controls on the page, such as colors and fonts use Init
-and Show instead of Select. Init will push the HWND of the page on the stack,
-or an error string. For example:
-
-StartMenu::Init /NOUNLOAD "Test"
-Pop $0
-IntCmp $0 0 failed
-GetDlgItem $0 $0 1003
-SetCtlColors $0 "" FF0000
-StartMenu::Show
-# continue as with Select here
-failed:
-
-Look at Example.nsi for a full example (without Init and Select).
-
+StartMenu.dll shows a custom page that lets the user select a start menu program
+folder to put shortcuts in.
+
+To show the dialog use the Select function. This function has one required parameter
+which is the program group default name, and some more optional switches:
+ /autoadd - automatically adds the program name to the selected folder
+ /noicon - doesn't show the icon in the top left corner
+ /text [please select...] - sets the top text to something else than
+ "Select the Start Menu folder in which..."
+ /lastused [folder] - sets the edit box to a specific value folder.
+ Use this to make this plug-in remember the last
+ folder selected by the user
+ /checknoshortcuts text - Shows a check box with the text "text". If
+ the user checks this box, the return value
+ will have > as its first character and you
+ should not create the program group.
+ /rtl - sets the direction of every control on the selection dialog
+ to RTL. This means every text shown on the page will be
+ justified to the right.
+
+The order of the switches doesn't matter but the required parameter must come after
+all of them. Every switch after the required parameter will be ignored and left
+on the stack.
+
+The function pushes "success", "cancel" or an error to the stack. If there was no
+error and the user didn't press on cancel it will push the selected folder name
+after "success". If the user checked the no shortcuts checkbox the result will be
+prefixed with '>'. The function does not push the full path but only the selected
+sub-folder. It's up to you to decide if to put it in the current user or all
+users start menu.
+
+To set properties of the controls on the page, such as colors and fonts use Init
+and Show instead of Select. Init will push the HWND of the page on the stack,
+or an error string. For example:
+
+StartMenu::Init /NOUNLOAD "Test"
+Pop $0
+IntCmp $0 0 failed
+GetDlgItem $0 $0 1003
+SetCtlColors $0 "" FF0000
+StartMenu::Show
+# continue as with Select here
+failed:
+
+Look at Example.nsi for a full example (without Init and Select).
+
Created by Amir Szekely (aka KiCHiK) \ No newline at end of file
diff --git a/Contrib/StartMenu/SConscript b/Contrib/StartMenu/SConscript
index 0ac09a2..5a1c86f 100755
--- a/Contrib/StartMenu/SConscript
+++ b/Contrib/StartMenu/SConscript
@@ -1,29 +1,29 @@
-target = 'StartMenu'
-
-files = Split("""
- StartMenu.c
-""")
-
-resources = Split("""
- StartMenu.rc
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- shell32
- ole32
-""")
-
-examples = Split("""
- Example.nsi
-""")
-
-docs = Split("""
- Readme.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples, docs, res = resources)
+target = 'StartMenu'
+
+files = Split("""
+ StartMenu.c
+""")
+
+resources = Split("""
+ StartMenu.rc
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ shell32
+ ole32
+""")
+
+examples = Split("""
+ Example.nsi
+""")
+
+docs = Split("""
+ Readme.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples, docs, res = resources)
diff --git a/Contrib/StartMenu/StartMenu.c b/Contrib/StartMenu/StartMenu.c
index 0f6fa35..9acd5cf 100755
--- a/Contrib/StartMenu/StartMenu.c
+++ b/Contrib/StartMenu/StartMenu.c
@@ -1,447 +1,447 @@
-#include <windows.h>
-#include <shlobj.h>
-#include "../ExDLL/exdll.h"
-#include "resource.h"
-
-HINSTANCE g_hInstance;
-
-HWND hwParent;
-HWND hwChild;
-HWND g_hwStartMenuSelect;
-HWND g_hwDirList;
-
-char buf[1024];
-char text[1024];
-char progname[1024];
-char lastused[1024];
-char checkbox[1024];
-
-int autoadd = 0;
-int g_done = 0;
-int noicon = 0;
-int rtl = 0;
-
-void *lpWndProcOld;
-
-void (__stdcall *validate_filename)(char *);
-
-BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-static BOOL CALLBACK ParentWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-void AddFolderFromReg(int nFolder);
-
-void __declspec(dllexport) Init(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- HWND hwStartMenuSelect;
-
- hwParent = hwndParent;
-
- validate_filename = extra->validate_filename;
-
- EXDLL_INIT();
-
- {
- hwChild = GetDlgItem(hwndParent, 1018);
- if (!hwChild)
- {
- pushstring("error finding childwnd");
- return;
- }
-
- popstring(buf);
-
- while (buf[0] == '/')
- {
- if (!lstrcmpi(buf+1, "noicon"))
- {
- noicon = 1;
- }
- else if (!lstrcmpi(buf+1, "rtl"))
- {
- rtl = 1;
- }
- else if (!lstrcmpi(buf+1, "text"))
- {
- popstring(text);
- }
- else if (!lstrcmpi(buf+1, "autoadd"))
- {
- autoadd = 1;
- }
- else if (!lstrcmpi(buf+1, "lastused"))
- {
- popstring(lastused);
- }
- else if (!lstrcmpi(buf+1, "checknoshortcuts"))
- {
- popstring(checkbox);
- }
-
- if (popstring(buf))
- {
- *buf = 0;
- }
- }
-
- if (*buf)
- {
- lstrcpy(progname, buf);
- }
- else
- {
- pushstring("error reading parameters");
- return;
- }
-
- hwStartMenuSelect = CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_DIALOG), hwndParent, dlgProc);
- g_hwStartMenuSelect = hwStartMenuSelect;
- if (!hwStartMenuSelect)
- {
- pushstring("error creating dialog");
- return;
- }
- else
- {
- lpWndProcOld = (void *) SetWindowLong(hwndParent, DWL_DLGPROC, (long) ParentWndProc);
- wsprintf(buf, "%u", hwStartMenuSelect);
- pushstring(buf);
- }
- }
-}
-
-void __declspec(dllexport) Show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
-{
- HWND hwStartMenuSelect = g_hwStartMenuSelect;
-
- if (!hwStartMenuSelect)
- {
- return;
- }
-
- while (!g_done)
- {
- MSG msg;
- GetMessage(&msg, NULL, 0, 0);
- if (!IsDialogMessage(hwStartMenuSelect,&msg) && !IsDialogMessage(hwndParent,&msg) && !TranslateMessage(&msg))
- DispatchMessage(&msg);
- }
- DestroyWindow(hwStartMenuSelect);
-
- SetWindowLong(hwndParent, DWL_DLGPROC, (long) lpWndProcOld);
-}
-
-void __declspec(dllexport) Select(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- Init(hwndParent, string_size, variables, stacktop, extra);
- if (g_hwStartMenuSelect)
- {
- popstring(buf);
- Show(hwndParent, string_size, variables, stacktop);
- }
-}
-
-static BOOL CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- BOOL bRes = CallWindowProc((long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long))lpWndProcOld,hwnd,message,wParam,lParam);
- if (message == WM_NOTIFY_OUTER_NEXT && !bRes)
- {
- // if leave function didn't abort (lRes != 0 in that case)
- PostMessage(g_hwStartMenuSelect,WM_USER+666,wParam,0);
- }
- return bRes;
-}
-
-void AddRTLStyle(HWND hWnd, long dwStyle)
-{
- long s;
-
- s = GetWindowLong(hWnd, GWL_STYLE);
- SetWindowLong(hWnd, GWL_STYLE, s | dwStyle);
- s = GetWindowLong(hWnd, GWL_EXSTYLE);
- SetWindowLong(hWnd, GWL_EXSTYLE, s | WS_EX_RIGHT | WS_EX_RTLREADING);
-}
-
-#define ProgressiveSetWindowPos(hwWindow, x, cx, cy) \
- MoveWindow( \
- hwWindow, \
- x, \
- y_offset, \
- cx, \
- cy, \
- FALSE \
- ); \
- \
- y_offset += cy + 3;
-
-BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- HWND hwLocation = GetDlgItem(hwndDlg, IDC_LOCATION);
- HWND hwDirList = GetDlgItem(hwndDlg, IDC_DIRLIST);
- HWND hwCheckBox = GetDlgItem(hwndDlg, IDC_CHECK);
-
- switch (uMsg)
- {
- case WM_INITDIALOG:
- {
- HWND hwIcon;
- HWND hwText;
-
- RECT dialog_r, temp_r;
-
- HFONT hFont = (HFONT) SendMessage(hwParent, WM_GETFONT, 0, 0);
-
- int y_offset = 0;
-
- int width, height;
-
- int baseUnitY;
-
- // Init dialog unit conversion
-
- {
- TEXTMETRIC tm;
- HDC hDC;
-
- hDC = GetDC(hwndDlg);
- SelectObject(hDC, hFont);
-
- GetTextMetrics(hDC, &tm);
- baseUnitY = tm.tmHeight;
-
- ReleaseDC(hwndDlg, hDC);
- }
-
- GetWindowRect(hwChild, &dialog_r);
- ScreenToClient(hwParent, (LPPOINT) &dialog_r);
- ScreenToClient(hwParent, ((LPPOINT) &dialog_r) + 1);
-
- width = dialog_r.right - dialog_r.left;
- height = dialog_r.bottom - dialog_r.top;
-
- MoveWindow(
- hwndDlg,
- dialog_r.left,
- dialog_r.top,
- width,
- height,
- FALSE
- );
-
- hwIcon = GetDlgItem(hwndDlg, IDC_NSISICON);
- hwText = GetDlgItem(hwndDlg, IDC_TEXT);
- g_hwDirList = hwDirList;
-
- SendMessage(hwndDlg, WM_SETFONT, (WPARAM) hFont, TRUE);
- SendMessage(hwIcon, WM_SETFONT, (WPARAM) hFont, TRUE);
- SendMessage(hwText, WM_SETFONT, (WPARAM) hFont, TRUE);
- SendMessage(hwLocation, WM_SETFONT, (WPARAM) hFont, TRUE);
- SendMessage(hwDirList, WM_SETFONT, (WPARAM) hFont, TRUE);
- SendMessage(hwCheckBox, WM_SETFONT, (WPARAM) hFont, TRUE);
-
- if (rtl)
- {
- AddRTLStyle(hwText, SS_RIGHT);
- AddRTLStyle(hwLocation, ES_RIGHT);
- AddRTLStyle(hwDirList, 0);
- AddRTLStyle(hwCheckBox, BS_RIGHT | BS_LEFTTEXT);
- }
-
- GetClientRect(hwIcon, &temp_r);
-
- if (!noicon)
- {
- SendMessage(
- hwIcon,
- STM_SETIMAGE,
- IMAGE_ICON,
- (LPARAM)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(103))
- );
-
- MoveWindow(
- hwIcon,
- rtl ? width - temp_r.right : 0,
- 0,
- temp_r.right,
- temp_r.bottom,
- FALSE
- );
-
- temp_r.right += 3;
- }
- else
- {
- ShowWindow(hwIcon, SW_HIDE);
-
- temp_r.right = 0;
- }
-
- if (rtl)
- {
- ProgressiveSetWindowPos(
- hwText,
- 0,
- width - temp_r.right,
- 3 * baseUnitY //MulDiv(24, baseUnitY, 8);
- );
- }
- else
- {
- ProgressiveSetWindowPos(
- hwText,
- temp_r.right,
- width - temp_r.right + 3,
- 3 * baseUnitY //MulDiv(24, baseUnitY, 8);
- );
- }
-
- SetWindowText(hwText, *text ? text : "Select the Start Menu folder in which you would like to create the program's shortcuts:");
-
- ProgressiveSetWindowPos(
- hwLocation,
- 0,
- width,
- MulDiv(12, baseUnitY, 8)
- );
-
- if (*lastused == '>')
- {
- CheckDlgButton(hwndDlg, IDC_CHECK, BST_CHECKED);
- lstrcpy(lastused, lstrcpy(buf, lastused) + 1);
- EnableWindow(hwDirList, FALSE);
- EnableWindow(hwLocation, FALSE);
- }
-
- SetWindowText(hwLocation, *lastused ? lastused : progname);
-
- temp_r.bottom = MulDiv(8, baseUnitY, 8);
-
- ProgressiveSetWindowPos(
- hwDirList,
- 0,
- width,
- height - y_offset - (*checkbox ? temp_r.bottom + 3 : 0)
- );
-
- if (*checkbox)
- {
- ProgressiveSetWindowPos(
- hwCheckBox,
- 0,
- width,
- temp_r.bottom
- );
-
- ShowWindow(hwCheckBox, SW_SHOWNA);
- SetWindowText(hwCheckBox, checkbox);
- }
-
- AddFolderFromReg(CSIDL_COMMON_PROGRAMS);
- AddFolderFromReg(CSIDL_PROGRAMS);
-
- // Tell NSIS to remove old inner dialog and pass handle of the new inner dialog
- SendMessage(hwParent, WM_NOTIFY_CUSTOM_READY, (WPARAM)hwndDlg, 0);
- ShowWindow(hwndDlg, SW_SHOWNA);
- if (IsDlgButtonChecked(hwndDlg, IDC_CHECK) == BST_CHECKED)
- SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) hwCheckBox, TRUE);
- else
- SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) hwLocation, TRUE);
- }
- break;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_DIRLIST && HIWORD(wParam) == LBN_SELCHANGE)
- {
- SendMessage(hwDirList, LB_GETTEXT, SendMessage(hwDirList, LB_GETCURSEL, 0, 0), (WPARAM)buf);
- if (autoadd)
- lstrcat(lstrcat(buf, "\\"), progname);
- SetWindowText(hwLocation, buf);
- }
- else if (LOWORD(wParam) == IDC_CHECK && HIWORD(wParam) == BN_CLICKED)
- {
- BOOL bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHECK) != BST_CHECKED;
- EnableWindow(hwDirList, bEnable);
- EnableWindow(hwLocation, bEnable);
- }
- else if (LOWORD(wParam) == IDC_LOCATION && HIWORD(wParam) == EN_CHANGE)
- {
- GetWindowText(hwLocation, buf, MAX_PATH);
- validate_filename(buf);
- EnableWindow(GetDlgItem(hwParent, IDOK), *buf != '\0');
- }
- break;
- case WM_USER+666:
- g_done = 1;
- if (wParam == NOTIFY_BYE_BYE)
- pushstring("cancel");
- else
- {
- GetWindowText(hwLocation, buf + 1, MAX_PATH);
- validate_filename(buf);
- if (IsDlgButtonChecked(hwndDlg, IDC_CHECK) == BST_CHECKED)
- {
- buf[0] = '>';
- pushstring(buf);
- }
- else
- {
- pushstring(buf + 1);
- }
- pushstring("success");
- }
- case WM_CTLCOLORSTATIC:
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORDLG:
- case WM_CTLCOLORBTN:
- case WM_CTLCOLORLISTBOX:
- // let the NSIS window handle colors, it knows best
- return SendMessage(hwParent, uMsg, wParam, lParam);
- break;
- }
- return 0;
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- g_hInstance=hInst;
- return TRUE;
-}
-
-void AddFolderFromReg(int nFolder)
-{
- //DWORD idx;
- WIN32_FIND_DATA FileData;
- HANDLE hSearch;
- LPITEMIDLIST ppidl;
-
- buf[0] = 0;
- if (SHGetSpecialFolderLocation(hwParent, nFolder, &ppidl) == S_OK)
- {
- SHGetPathFromIDList(ppidl, buf);
- CoTaskMemFree(ppidl);
- }
-
- if (!buf[0])
- return;
-
- lstrcat(buf, "\\*.*");
- hSearch = FindFirstFile(buf, &FileData);
- if (hSearch != INVALID_HANDLE_VALUE)
- {
- do
- {
- if (FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- if (*(WORD*)FileData.cFileName != *(WORD*)".")
- {
- if (*(WORD*)FileData.cFileName != *(WORD*)".." || FileData.cFileName[2])
- {
- if (SendMessage(g_hwDirList, LB_FINDSTRINGEXACT, (WPARAM) -1, (LPARAM)FileData.cFileName) == LB_ERR)
- SendMessage(g_hwDirList, LB_ADDSTRING, 0, (LPARAM)FileData.cFileName);
- /*idx = */
- /*SendMessage(hwDirList, LB_SETITEMDATA, (WPARAM)idx,
- (LPARAM)ExtractAssociatedIcon(g_hInstance, FileData.cFileName, (WORD*)&idx));*/
- }
- }
- }
- } while (FindNextFile(hSearch, &FileData));
- FindClose(hSearch);
- }
-}
+#include <windows.h>
+#include <shlobj.h>
+#include "../ExDLL/exdll.h"
+#include "resource.h"
+
+HINSTANCE g_hInstance;
+
+HWND hwParent;
+HWND hwChild;
+HWND g_hwStartMenuSelect;
+HWND g_hwDirList;
+
+char buf[1024];
+char text[1024];
+char progname[1024];
+char lastused[1024];
+char checkbox[1024];
+
+int autoadd = 0;
+int g_done = 0;
+int noicon = 0;
+int rtl = 0;
+
+void *lpWndProcOld;
+
+void (__stdcall *validate_filename)(char *);
+
+BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+static BOOL CALLBACK ParentWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+void AddFolderFromReg(int nFolder);
+
+void __declspec(dllexport) Init(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ HWND hwStartMenuSelect;
+
+ hwParent = hwndParent;
+
+ validate_filename = extra->validate_filename;
+
+ EXDLL_INIT();
+
+ {
+ hwChild = GetDlgItem(hwndParent, 1018);
+ if (!hwChild)
+ {
+ pushstring("error finding childwnd");
+ return;
+ }
+
+ popstring(buf);
+
+ while (buf[0] == '/')
+ {
+ if (!lstrcmpi(buf+1, "noicon"))
+ {
+ noicon = 1;
+ }
+ else if (!lstrcmpi(buf+1, "rtl"))
+ {
+ rtl = 1;
+ }
+ else if (!lstrcmpi(buf+1, "text"))
+ {
+ popstring(text);
+ }
+ else if (!lstrcmpi(buf+1, "autoadd"))
+ {
+ autoadd = 1;
+ }
+ else if (!lstrcmpi(buf+1, "lastused"))
+ {
+ popstring(lastused);
+ }
+ else if (!lstrcmpi(buf+1, "checknoshortcuts"))
+ {
+ popstring(checkbox);
+ }
+
+ if (popstring(buf))
+ {
+ *buf = 0;
+ }
+ }
+
+ if (*buf)
+ {
+ lstrcpy(progname, buf);
+ }
+ else
+ {
+ pushstring("error reading parameters");
+ return;
+ }
+
+ hwStartMenuSelect = CreateDialog(g_hInstance, MAKEINTRESOURCE(IDD_DIALOG), hwndParent, dlgProc);
+ g_hwStartMenuSelect = hwStartMenuSelect;
+ if (!hwStartMenuSelect)
+ {
+ pushstring("error creating dialog");
+ return;
+ }
+ else
+ {
+ lpWndProcOld = (void *) SetWindowLong(hwndParent, DWL_DLGPROC, (long) ParentWndProc);
+ wsprintf(buf, "%u", hwStartMenuSelect);
+ pushstring(buf);
+ }
+ }
+}
+
+void __declspec(dllexport) Show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop)
+{
+ HWND hwStartMenuSelect = g_hwStartMenuSelect;
+
+ if (!hwStartMenuSelect)
+ {
+ return;
+ }
+
+ while (!g_done)
+ {
+ MSG msg;
+ GetMessage(&msg, NULL, 0, 0);
+ if (!IsDialogMessage(hwStartMenuSelect,&msg) && !IsDialogMessage(hwndParent,&msg) && !TranslateMessage(&msg))
+ DispatchMessage(&msg);
+ }
+ DestroyWindow(hwStartMenuSelect);
+
+ SetWindowLong(hwndParent, DWL_DLGPROC, (long) lpWndProcOld);
+}
+
+void __declspec(dllexport) Select(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ Init(hwndParent, string_size, variables, stacktop, extra);
+ if (g_hwStartMenuSelect)
+ {
+ popstring(buf);
+ Show(hwndParent, string_size, variables, stacktop);
+ }
+}
+
+static BOOL CALLBACK ParentWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ BOOL bRes = CallWindowProc((long (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long))lpWndProcOld,hwnd,message,wParam,lParam);
+ if (message == WM_NOTIFY_OUTER_NEXT && !bRes)
+ {
+ // if leave function didn't abort (lRes != 0 in that case)
+ PostMessage(g_hwStartMenuSelect,WM_USER+666,wParam,0);
+ }
+ return bRes;
+}
+
+void AddRTLStyle(HWND hWnd, long dwStyle)
+{
+ long s;
+
+ s = GetWindowLong(hWnd, GWL_STYLE);
+ SetWindowLong(hWnd, GWL_STYLE, s | dwStyle);
+ s = GetWindowLong(hWnd, GWL_EXSTYLE);
+ SetWindowLong(hWnd, GWL_EXSTYLE, s | WS_EX_RIGHT | WS_EX_RTLREADING);
+}
+
+#define ProgressiveSetWindowPos(hwWindow, x, cx, cy) \
+ MoveWindow( \
+ hwWindow, \
+ x, \
+ y_offset, \
+ cx, \
+ cy, \
+ FALSE \
+ ); \
+ \
+ y_offset += cy + 3;
+
+BOOL CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ HWND hwLocation = GetDlgItem(hwndDlg, IDC_LOCATION);
+ HWND hwDirList = GetDlgItem(hwndDlg, IDC_DIRLIST);
+ HWND hwCheckBox = GetDlgItem(hwndDlg, IDC_CHECK);
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwIcon;
+ HWND hwText;
+
+ RECT dialog_r, temp_r;
+
+ HFONT hFont = (HFONT) SendMessage(hwParent, WM_GETFONT, 0, 0);
+
+ int y_offset = 0;
+
+ int width, height;
+
+ int baseUnitY;
+
+ // Init dialog unit conversion
+
+ {
+ TEXTMETRIC tm;
+ HDC hDC;
+
+ hDC = GetDC(hwndDlg);
+ SelectObject(hDC, hFont);
+
+ GetTextMetrics(hDC, &tm);
+ baseUnitY = tm.tmHeight;
+
+ ReleaseDC(hwndDlg, hDC);
+ }
+
+ GetWindowRect(hwChild, &dialog_r);
+ ScreenToClient(hwParent, (LPPOINT) &dialog_r);
+ ScreenToClient(hwParent, ((LPPOINT) &dialog_r) + 1);
+
+ width = dialog_r.right - dialog_r.left;
+ height = dialog_r.bottom - dialog_r.top;
+
+ MoveWindow(
+ hwndDlg,
+ dialog_r.left,
+ dialog_r.top,
+ width,
+ height,
+ FALSE
+ );
+
+ hwIcon = GetDlgItem(hwndDlg, IDC_NSISICON);
+ hwText = GetDlgItem(hwndDlg, IDC_TEXT);
+ g_hwDirList = hwDirList;
+
+ SendMessage(hwndDlg, WM_SETFONT, (WPARAM) hFont, TRUE);
+ SendMessage(hwIcon, WM_SETFONT, (WPARAM) hFont, TRUE);
+ SendMessage(hwText, WM_SETFONT, (WPARAM) hFont, TRUE);
+ SendMessage(hwLocation, WM_SETFONT, (WPARAM) hFont, TRUE);
+ SendMessage(hwDirList, WM_SETFONT, (WPARAM) hFont, TRUE);
+ SendMessage(hwCheckBox, WM_SETFONT, (WPARAM) hFont, TRUE);
+
+ if (rtl)
+ {
+ AddRTLStyle(hwText, SS_RIGHT);
+ AddRTLStyle(hwLocation, ES_RIGHT);
+ AddRTLStyle(hwDirList, 0);
+ AddRTLStyle(hwCheckBox, BS_RIGHT | BS_LEFTTEXT);
+ }
+
+ GetClientRect(hwIcon, &temp_r);
+
+ if (!noicon)
+ {
+ SendMessage(
+ hwIcon,
+ STM_SETIMAGE,
+ IMAGE_ICON,
+ (LPARAM)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(103))
+ );
+
+ MoveWindow(
+ hwIcon,
+ rtl ? width - temp_r.right : 0,
+ 0,
+ temp_r.right,
+ temp_r.bottom,
+ FALSE
+ );
+
+ temp_r.right += 3;
+ }
+ else
+ {
+ ShowWindow(hwIcon, SW_HIDE);
+
+ temp_r.right = 0;
+ }
+
+ if (rtl)
+ {
+ ProgressiveSetWindowPos(
+ hwText,
+ 0,
+ width - temp_r.right,
+ 3 * baseUnitY //MulDiv(24, baseUnitY, 8);
+ );
+ }
+ else
+ {
+ ProgressiveSetWindowPos(
+ hwText,
+ temp_r.right,
+ width - temp_r.right + 3,
+ 3 * baseUnitY //MulDiv(24, baseUnitY, 8);
+ );
+ }
+
+ SetWindowText(hwText, *text ? text : "Select the Start Menu folder in which you would like to create the program's shortcuts:");
+
+ ProgressiveSetWindowPos(
+ hwLocation,
+ 0,
+ width,
+ MulDiv(12, baseUnitY, 8)
+ );
+
+ if (*lastused == '>')
+ {
+ CheckDlgButton(hwndDlg, IDC_CHECK, BST_CHECKED);
+ lstrcpy(lastused, lstrcpy(buf, lastused) + 1);
+ EnableWindow(hwDirList, FALSE);
+ EnableWindow(hwLocation, FALSE);
+ }
+
+ SetWindowText(hwLocation, *lastused ? lastused : progname);
+
+ temp_r.bottom = MulDiv(8, baseUnitY, 8);
+
+ ProgressiveSetWindowPos(
+ hwDirList,
+ 0,
+ width,
+ height - y_offset - (*checkbox ? temp_r.bottom + 3 : 0)
+ );
+
+ if (*checkbox)
+ {
+ ProgressiveSetWindowPos(
+ hwCheckBox,
+ 0,
+ width,
+ temp_r.bottom
+ );
+
+ ShowWindow(hwCheckBox, SW_SHOWNA);
+ SetWindowText(hwCheckBox, checkbox);
+ }
+
+ AddFolderFromReg(CSIDL_COMMON_PROGRAMS);
+ AddFolderFromReg(CSIDL_PROGRAMS);
+
+ // Tell NSIS to remove old inner dialog and pass handle of the new inner dialog
+ SendMessage(hwParent, WM_NOTIFY_CUSTOM_READY, (WPARAM)hwndDlg, 0);
+ ShowWindow(hwndDlg, SW_SHOWNA);
+ if (IsDlgButtonChecked(hwndDlg, IDC_CHECK) == BST_CHECKED)
+ SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) hwCheckBox, TRUE);
+ else
+ SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) hwLocation, TRUE);
+ }
+ break;
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDC_DIRLIST && HIWORD(wParam) == LBN_SELCHANGE)
+ {
+ SendMessage(hwDirList, LB_GETTEXT, SendMessage(hwDirList, LB_GETCURSEL, 0, 0), (WPARAM)buf);
+ if (autoadd)
+ lstrcat(lstrcat(buf, "\\"), progname);
+ SetWindowText(hwLocation, buf);
+ }
+ else if (LOWORD(wParam) == IDC_CHECK && HIWORD(wParam) == BN_CLICKED)
+ {
+ BOOL bEnable = IsDlgButtonChecked(hwndDlg, IDC_CHECK) != BST_CHECKED;
+ EnableWindow(hwDirList, bEnable);
+ EnableWindow(hwLocation, bEnable);
+ }
+ else if (LOWORD(wParam) == IDC_LOCATION && HIWORD(wParam) == EN_CHANGE)
+ {
+ GetWindowText(hwLocation, buf, MAX_PATH);
+ validate_filename(buf);
+ EnableWindow(GetDlgItem(hwParent, IDOK), *buf != '\0');
+ }
+ break;
+ case WM_USER+666:
+ g_done = 1;
+ if (wParam == NOTIFY_BYE_BYE)
+ pushstring("cancel");
+ else
+ {
+ GetWindowText(hwLocation, buf + 1, MAX_PATH);
+ validate_filename(buf);
+ if (IsDlgButtonChecked(hwndDlg, IDC_CHECK) == BST_CHECKED)
+ {
+ buf[0] = '>';
+ pushstring(buf);
+ }
+ else
+ {
+ pushstring(buf + 1);
+ }
+ pushstring("success");
+ }
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLOREDIT:
+ case WM_CTLCOLORDLG:
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORLISTBOX:
+ // let the NSIS window handle colors, it knows best
+ return SendMessage(hwParent, uMsg, wParam, lParam);
+ break;
+ }
+ return 0;
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance=hInst;
+ return TRUE;
+}
+
+void AddFolderFromReg(int nFolder)
+{
+ //DWORD idx;
+ WIN32_FIND_DATA FileData;
+ HANDLE hSearch;
+ LPITEMIDLIST ppidl;
+
+ buf[0] = 0;
+ if (SHGetSpecialFolderLocation(hwParent, nFolder, &ppidl) == S_OK)
+ {
+ SHGetPathFromIDList(ppidl, buf);
+ CoTaskMemFree(ppidl);
+ }
+
+ if (!buf[0])
+ return;
+
+ lstrcat(buf, "\\*.*");
+ hSearch = FindFirstFile(buf, &FileData);
+ if (hSearch != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ if (FileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ if (*(WORD*)FileData.cFileName != *(WORD*)".")
+ {
+ if (*(WORD*)FileData.cFileName != *(WORD*)".." || FileData.cFileName[2])
+ {
+ if (SendMessage(g_hwDirList, LB_FINDSTRINGEXACT, (WPARAM) -1, (LPARAM)FileData.cFileName) == LB_ERR)
+ SendMessage(g_hwDirList, LB_ADDSTRING, 0, (LPARAM)FileData.cFileName);
+ /*idx = */
+ /*SendMessage(hwDirList, LB_SETITEMDATA, (WPARAM)idx,
+ (LPARAM)ExtractAssociatedIcon(g_hInstance, FileData.cFileName, (WORD*)&idx));*/
+ }
+ }
+ }
+ } while (FindNextFile(hSearch, &FileData));
+ FindClose(hSearch);
+ }
+}
diff --git a/Contrib/StartMenu/StartMenu.rc b/Contrib/StartMenu/StartMenu.rc
index fe5e53e..ab20e5c 100755
--- a/Contrib/StartMenu/StartMenu.rc
+++ b/Contrib/StartMenu/StartMenu.rc
@@ -1,102 +1,102 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <windows.h>
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG DIALOG DISCARDABLE 0, 0, 137, 98
-STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "MS Sans Serif"
-BEGIN
- EDITTEXT IDC_LOCATION,59,20,40,12,ES_AUTOHSCROLL |
- WS_CLIPSIBLINGS
- LISTBOX IDC_DIRLIST,76,42,48,40,LBS_SORT | LBS_NOINTEGRALHEIGHT |
- WS_CLIPSIBLINGS | WS_VSCROLL | WS_TABSTOP
- CONTROL "",IDC_CHECK,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
- WS_TABSTOP,21,44,16,8
- ICON "",IDC_NSISICON,21,18,20,20,WS_CLIPSIBLINGS
- LTEXT "",IDC_TEXT,17,65,55,11,WS_CLIPSIBLINGS
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 130
- TOPMARGIN, 7
- BOTTOMMARGIN, 91
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG DIALOG DISCARDABLE 0, 0, 137, 98
+STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
+FONT 8, "MS Sans Serif"
+BEGIN
+ EDITTEXT IDC_LOCATION,59,20,40,12,ES_AUTOHSCROLL |
+ WS_CLIPSIBLINGS
+ LISTBOX IDC_DIRLIST,76,42,48,40,LBS_SORT | LBS_NOINTEGRALHEIGHT |
+ WS_CLIPSIBLINGS | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_CHECK,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
+ WS_TABSTOP,21,44,16,8
+ ICON "",IDC_NSISICON,21,18,20,20,WS_CLIPSIBLINGS
+ LTEXT "",IDC_TEXT,17,65,55,11,WS_CLIPSIBLINGS
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 130
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 91
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/StartMenu/resource.h b/Contrib/StartMenu/resource.h
index 72840eb..b59e92e 100755
--- a/Contrib/StartMenu/resource.h
+++ b/Contrib/StartMenu/resource.h
@@ -1,21 +1,21 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by StartMenu.rc
-//
-#define IDD_DIALOG 101
-#define IDC_NSISICON 1001
-#define IDC_LOCATION 1002
-#define IDC_TEXT 1003
-#define IDC_DIRLIST 1004
-#define IDC_CHECK 1005
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 102
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1006
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by StartMenu.rc
+//
+#define IDD_DIALOG 101
+#define IDC_NSISICON 1001
+#define IDC_LOCATION 1002
+#define IDC_TEXT 1003
+#define IDC_DIRLIST 1004
+#define IDC_CHECK 1005
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1006
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/System/SConscript b/Contrib/System/SConscript
index 03c91fc..58731de 100755
--- a/Contrib/System/SConscript
+++ b/Contrib/System/SConscript
@@ -1,38 +1,38 @@
-target = 'System'
-
-files = Split("""
- Source/Buffers.c
- Source/Plugin.c
- Source/System.c
-""")
-
-libs = Split("""
- kernel32
- user32
- ole32
-""")
-
-examples = Split("""
- Resource.dll
- System.nsi
- System.nsh
- SysFunc.nsh
-""")
-
-docs = Split("""
- System.html
- WhatsNew.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(
- target,
- files,
- libs,
- examples,
- docs,
- entry = '_DllMainCRTStartup',
- nodeflib = False,
- defines = ['SYSTEM_EXPORTS']
-)
+target = 'System'
+
+files = Split("""
+ Source/Buffers.c
+ Source/Plugin.c
+ Source/System.c
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ ole32
+""")
+
+examples = Split("""
+ Resource.dll
+ System.nsi
+ System.nsh
+ SysFunc.nsh
+""")
+
+docs = Split("""
+ System.html
+ WhatsNew.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(
+ target,
+ files,
+ libs,
+ examples,
+ docs,
+ entry = '_DllMainCRTStartup',
+ nodeflib = False,
+ defines = ['SYSTEM_EXPORTS']
+)
diff --git a/Contrib/System/Source/Buffers.c b/Contrib/System/Source/Buffers.c
index f69aaba..1f65c11 100755
--- a/Contrib/System/Source/Buffers.c
+++ b/Contrib/System/Source/Buffers.c
@@ -1,112 +1,112 @@
-#include "stdafx.h"
-#include "Plugin.h"
-#include "System.h"
-#include "Buffers.h"
-
-typedef struct tagTempStack TempStack;
-struct tagTempStack
-{
- TempStack *Next;
- char Data[0];
-};
-TempStack *tempstack = NULL;
-
-PLUGINFUNCTIONSHORT(Alloc)
-{
- int size;
- if ((size = popint()) == 0)
- {
- pushint(0);
- return;
- }
- pushint((int) GlobalAlloc(GPTR, size));
-}
-PLUGINFUNCTIONEND
-
-PLUGINFUNCTIONSHORT(Copy)
-{
- int size = 0;
- HANDLE source, dest;
- char *str;
- // Get the string
- if ((str = popstring()) == NULL) return;
-
- // Check for size option
- if (str[0] == '/')
- {
- size = (int) myatoi(str+1);
- dest = (HANDLE) popint();
- }
- else dest = (HANDLE) myatoi(str);
- source = (HANDLE) popint();
-
- // Ok, check the size
- if (size == 0) size = (int) GlobalSize(source);
- // and the destinantion
- if ((int) dest == 0)
- {
- dest = GlobalAlloc((GPTR), size);
- pushint((int) dest);
- }
-
- // COPY!
- copymem(dest, source, size);
-
- GlobalFree(str);
-}
-PLUGINFUNCTIONEND
-
-PLUGINFUNCTIONSHORT(Free)
-{
- GlobalFree((HANDLE) popint());
-}
-PLUGINFUNCTIONEND
-
-PLUGINFUNCTION(Store)
-{
- TempStack *tmp;
- int size = ((INST_R9+1)*g_stringsize);
-
- char *command, *cmd = command = popstring();
- while (*cmd != 0)
- {
- switch (*(cmd++))
- {
- case 's':
- case 'S':
- // Store the whole variables range
- tmp = (TempStack*) GlobalAlloc(GPTR, sizeof(TempStack)+size);
- tmp->Next = tempstack;
- tempstack = tmp;
-
- // Fill with data
- copymem(tempstack->Data, g_variables, size);
- break;
- case 'l':
- case 'L':
- if (tempstack == NULL) break;
-
- // Fill with data
- copymem(g_variables, tempstack->Data, size);
-
- // Restore stack
- tmp = tempstack->Next;
- GlobalFree((HANDLE) tempstack);
- tempstack = tmp;
- break;
- case 'P':
- *cmd += 10;
- case 'p':
- GlobalFree((HANDLE) pushstring(getuservariable(*(cmd++)-'0')));
- break;
- case 'R':
- *cmd += 10;
- case 'r':
- GlobalFree((HANDLE) setuservariable(*(cmd++)-'0', popstring()));
- break;
- }
- }
-
- GlobalFree((HANDLE) command);
-}
-PLUGINFUNCTIONEND
+#include "stdafx.h"
+#include "Plugin.h"
+#include "System.h"
+#include "Buffers.h"
+
+typedef struct tagTempStack TempStack;
+struct tagTempStack
+{
+ TempStack *Next;
+ char Data[0];
+};
+TempStack *tempstack = NULL;
+
+PLUGINFUNCTIONSHORT(Alloc)
+{
+ int size;
+ if ((size = popint()) == 0)
+ {
+ pushint(0);
+ return;
+ }
+ pushint((int) GlobalAlloc(GPTR, size));
+}
+PLUGINFUNCTIONEND
+
+PLUGINFUNCTIONSHORT(Copy)
+{
+ int size = 0;
+ HANDLE source, dest;
+ char *str;
+ // Get the string
+ if ((str = popstring()) == NULL) return;
+
+ // Check for size option
+ if (str[0] == '/')
+ {
+ size = (int) myatoi(str+1);
+ dest = (HANDLE) popint();
+ }
+ else dest = (HANDLE) myatoi(str);
+ source = (HANDLE) popint();
+
+ // Ok, check the size
+ if (size == 0) size = (int) GlobalSize(source);
+ // and the destinantion
+ if ((int) dest == 0)
+ {
+ dest = GlobalAlloc((GPTR), size);
+ pushint((int) dest);
+ }
+
+ // COPY!
+ copymem(dest, source, size);
+
+ GlobalFree(str);
+}
+PLUGINFUNCTIONEND
+
+PLUGINFUNCTIONSHORT(Free)
+{
+ GlobalFree((HANDLE) popint());
+}
+PLUGINFUNCTIONEND
+
+PLUGINFUNCTION(Store)
+{
+ TempStack *tmp;
+ int size = ((INST_R9+1)*g_stringsize);
+
+ char *command, *cmd = command = popstring();
+ while (*cmd != 0)
+ {
+ switch (*(cmd++))
+ {
+ case 's':
+ case 'S':
+ // Store the whole variables range
+ tmp = (TempStack*) GlobalAlloc(GPTR, sizeof(TempStack)+size);
+ tmp->Next = tempstack;
+ tempstack = tmp;
+
+ // Fill with data
+ copymem(tempstack->Data, g_variables, size);
+ break;
+ case 'l':
+ case 'L':
+ if (tempstack == NULL) break;
+
+ // Fill with data
+ copymem(g_variables, tempstack->Data, size);
+
+ // Restore stack
+ tmp = tempstack->Next;
+ GlobalFree((HANDLE) tempstack);
+ tempstack = tmp;
+ break;
+ case 'P':
+ *cmd += 10;
+ case 'p':
+ GlobalFree((HANDLE) pushstring(getuservariable(*(cmd++)-'0')));
+ break;
+ case 'R':
+ *cmd += 10;
+ case 'r':
+ GlobalFree((HANDLE) setuservariable(*(cmd++)-'0', popstring()));
+ break;
+ }
+ }
+
+ GlobalFree((HANDLE) command);
+}
+PLUGINFUNCTIONEND
diff --git a/Contrib/System/Source/Buffers.h b/Contrib/System/Source/Buffers.h
index 77e8145..3f59c93 100755
--- a/Contrib/System/Source/Buffers.h
+++ b/Contrib/System/Source/Buffers.h
@@ -1,2 +1,2 @@
-#pragma once
-
+#pragma once
+
diff --git a/Contrib/System/Source/Plugin.c b/Contrib/System/Source/Plugin.c
index 39a7054..45e1e17 100755
--- a/Contrib/System/Source/Plugin.c
+++ b/Contrib/System/Source/Plugin.c
@@ -1,173 +1,173 @@
-#include "stdafx.h"
-#include "Plugin.h"
-#include "Buffers.h"
-#include "System.h"
-
-HWND g_hwndParent;
-int g_stringsize;
-stack_t **g_stacktop;
-char *g_variables;
-
-char *AllocString()
-{
- return (char*) GlobalAlloc(GPTR,g_stringsize);
-}
-
-char *AllocStr(char *str)
-{
- return lstrcpy(AllocString(), str);
-}
-
-char* popstring()
-{
- char *str;
- stack_t *th;
-
- if (!g_stacktop || !*g_stacktop) return NULL;
- th=(*g_stacktop);
-
- str = AllocString();
- lstrcpy(str,th->text);
-
- *g_stacktop = th->next;
- GlobalFree((HGLOBAL)th);
- return str;
-}
-
-char *pushstring(char *str)
-{
- stack_t *th;
- if (!g_stacktop) return str;
- th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
- lstrcpyn(th->text,str,g_stringsize);
- th->next=*g_stacktop;
- *g_stacktop=th;
- return str;
-}
-
-char *getuservariable(int varnum)
-{
- if (varnum < 0 || varnum >= __INST_LAST) return AllocString();
- return AllocStr(g_variables+varnum*g_stringsize);
-}
-
-char *setuservariable(int varnum, char *var)
-{
- if (var != NULL && varnum >= 0 && varnum < __INST_LAST) {
- lstrcpy (g_variables + varnum*g_stringsize, var);
- }
- return var;
-}
-
-// Updated for int64 and simple bitwise operations
-__int64 myatoi(char *s)
-{
- __int64 v=0;
- // Check for right input
- if (!s) return 0;
- if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
- {
- s++;
- for (;;)
- {
- int c=*(++s);
- if (c >= '0' && c <= '9') c-='0';
- else if (c >= 'a' && c <= 'f') c-='a'-10;
- else if (c >= 'A' && c <= 'F') c-='A'-10;
- else break;
- v<<=4;
- v+=c;
- }
- }
- else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
- {
- for (;;)
- {
- int c=*(++s);
- if (c >= '0' && c <= '7') c-='0';
- else break;
- v<<=3;
- v+=c;
- }
- }
- else
- {
- int sign=0;
- if (*s == '-') sign++; else s--;
- for (;;)
- {
- int c=*(++s) - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- if (sign) v = -v;
- }
-
- // Support for simple ORed expressions
- if (*s == '|')
- {
- v |= myatoi(s+1);
- }
-
- return v;
-}
-
-void myitoa64(__int64 i, char *buffer)
-{
- char buf[128], *b = buf;
-
- if (i < 0)
- {
- *(buffer++) = '-';
- i = -i;
- }
- if (i == 0) *(buffer++) = '0';
- else
- {
- while (i > 0)
- {
- *(b++) = '0' + ((char) (i%10));
- i /= 10;
- }
- while (b > buf) *(buffer++) = *(--b);
- }
- *buffer = 0;
-}
-
-int popint()
-{
- int value;
- char *str;
- if ((str = popstring()) == NULL) return -1;
- value = (int) myatoi(str);
- GlobalFree(str);
- return value;
-}
-
-void pushint(int value)
-{
- char buffer[1024];
- wsprintf(buffer, "%d", value);
- pushstring(buffer);
-}
-
-char *copymem(char *output, char *input, int size)
-{
- char *out = output;
- if ((input != NULL) && (output != NULL))
- while (size-- > 0) *(out++) = *(input++);
- return output;
-}
-
-HANDLE GlobalCopy(HANDLE Old)
-{
- SIZE_T size = GlobalSize(Old);
- return copymem(GlobalAlloc(GPTR, size), Old, (int) size);
-}
-
-#ifdef _DEBUG
-void main()
-{
-}
-#endif
+#include "stdafx.h"
+#include "Plugin.h"
+#include "Buffers.h"
+#include "System.h"
+
+HWND g_hwndParent;
+int g_stringsize;
+stack_t **g_stacktop;
+char *g_variables;
+
+char *AllocString()
+{
+ return (char*) GlobalAlloc(GPTR,g_stringsize);
+}
+
+char *AllocStr(char *str)
+{
+ return lstrcpy(AllocString(), str);
+}
+
+char* popstring()
+{
+ char *str;
+ stack_t *th;
+
+ if (!g_stacktop || !*g_stacktop) return NULL;
+ th=(*g_stacktop);
+
+ str = AllocString();
+ lstrcpy(str,th->text);
+
+ *g_stacktop = th->next;
+ GlobalFree((HGLOBAL)th);
+ return str;
+}
+
+char *pushstring(char *str)
+{
+ stack_t *th;
+ if (!g_stacktop) return str;
+ th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
+ lstrcpyn(th->text,str,g_stringsize);
+ th->next=*g_stacktop;
+ *g_stacktop=th;
+ return str;
+}
+
+char *getuservariable(int varnum)
+{
+ if (varnum < 0 || varnum >= __INST_LAST) return AllocString();
+ return AllocStr(g_variables+varnum*g_stringsize);
+}
+
+char *setuservariable(int varnum, char *var)
+{
+ if (var != NULL && varnum >= 0 && varnum < __INST_LAST) {
+ lstrcpy (g_variables + varnum*g_stringsize, var);
+ }
+ return var;
+}
+
+// Updated for int64 and simple bitwise operations
+__int64 myatoi(char *s)
+{
+ __int64 v=0;
+ // Check for right input
+ if (!s) return 0;
+ if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
+ {
+ s++;
+ for (;;)
+ {
+ int c=*(++s);
+ if (c >= '0' && c <= '9') c-='0';
+ else if (c >= 'a' && c <= 'f') c-='a'-10;
+ else if (c >= 'A' && c <= 'F') c-='A'-10;
+ else break;
+ v<<=4;
+ v+=c;
+ }
+ }
+ else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
+ {
+ for (;;)
+ {
+ int c=*(++s);
+ if (c >= '0' && c <= '7') c-='0';
+ else break;
+ v<<=3;
+ v+=c;
+ }
+ }
+ else
+ {
+ int sign=0;
+ if (*s == '-') sign++; else s--;
+ for (;;)
+ {
+ int c=*(++s) - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ if (sign) v = -v;
+ }
+
+ // Support for simple ORed expressions
+ if (*s == '|')
+ {
+ v |= myatoi(s+1);
+ }
+
+ return v;
+}
+
+void myitoa64(__int64 i, char *buffer)
+{
+ char buf[128], *b = buf;
+
+ if (i < 0)
+ {
+ *(buffer++) = '-';
+ i = -i;
+ }
+ if (i == 0) *(buffer++) = '0';
+ else
+ {
+ while (i > 0)
+ {
+ *(b++) = '0' + ((char) (i%10));
+ i /= 10;
+ }
+ while (b > buf) *(buffer++) = *(--b);
+ }
+ *buffer = 0;
+}
+
+int popint()
+{
+ int value;
+ char *str;
+ if ((str = popstring()) == NULL) return -1;
+ value = (int) myatoi(str);
+ GlobalFree(str);
+ return value;
+}
+
+void pushint(int value)
+{
+ char buffer[1024];
+ wsprintf(buffer, "%d", value);
+ pushstring(buffer);
+}
+
+char *copymem(char *output, char *input, int size)
+{
+ char *out = output;
+ if ((input != NULL) && (output != NULL))
+ while (size-- > 0) *(out++) = *(input++);
+ return output;
+}
+
+HANDLE GlobalCopy(HANDLE Old)
+{
+ SIZE_T size = GlobalSize(Old);
+ return copymem(GlobalAlloc(GPTR, size), Old, (int) size);
+}
+
+#ifdef _DEBUG
+void main()
+{
+}
+#endif
diff --git a/Contrib/System/Source/Plugin.h b/Contrib/System/Source/Plugin.h
index ebe95ba..b6ffb3d 100755
--- a/Contrib/System/Source/Plugin.h
+++ b/Contrib/System/Source/Plugin.h
@@ -1,69 +1,69 @@
-#ifndef ___PLUGIN__H___
-#define ___PLUGIN__H___
-
-typedef struct _stack_t {
- struct _stack_t *next;
- char text[1]; // this should be the length of string_size
-} 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
-};
-
-#define PLUGINFUNCTION(name) void __declspec(dllexport) name(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) { \
-/* g_hwndParent=hwndParent; */\
- g_stringsize=string_size; \
- g_stacktop=stacktop; \
- g_variables=variables;
-#define PLUGINFUNCTIONEND }
-
-#define PLUGINFUNCTIONSHORT(name) void __declspec(dllexport) name(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) { \
- g_stringsize=string_size; \
- g_stacktop=stacktop;
-
-extern char *AllocStr(char *str);
-extern void myitoa64(__int64 i, char *buffer);
-extern char *AllocString();
-extern char *getuservariable(int varnum);
-extern char *setuservariable(int varnum, char *var);
-extern char* popstring(); // NULL - stack empty
-extern char* pushstring(char *str);
-extern __int64 myatoi(char *s);
-extern int popint(); // -1 -> stack empty
-extern void pushint(int value);
-
-extern HANDLE GlobalCopy(HANDLE Old);
-extern char *copymem(char *output, char *input, int size);
-
-extern HWND g_hwndParent;
-extern int g_stringsize;
-extern stack_t **g_stacktop;
-extern char *g_variables;
-
-#endif
+#ifndef ___PLUGIN__H___
+#define ___PLUGIN__H___
+
+typedef struct _stack_t {
+ struct _stack_t *next;
+ char text[1]; // this should be the length of string_size
+} 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
+};
+
+#define PLUGINFUNCTION(name) void __declspec(dllexport) name(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) { \
+/* g_hwndParent=hwndParent; */\
+ g_stringsize=string_size; \
+ g_stacktop=stacktop; \
+ g_variables=variables;
+#define PLUGINFUNCTIONEND }
+
+#define PLUGINFUNCTIONSHORT(name) void __declspec(dllexport) name(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) { \
+ g_stringsize=string_size; \
+ g_stacktop=stacktop;
+
+extern char *AllocStr(char *str);
+extern void myitoa64(__int64 i, char *buffer);
+extern char *AllocString();
+extern char *getuservariable(int varnum);
+extern char *setuservariable(int varnum, char *var);
+extern char* popstring(); // NULL - stack empty
+extern char* pushstring(char *str);
+extern __int64 myatoi(char *s);
+extern int popint(); // -1 -> stack empty
+extern void pushint(int value);
+
+extern HANDLE GlobalCopy(HANDLE Old);
+extern char *copymem(char *output, char *input, int size);
+
+extern HWND g_hwndParent;
+extern int g_stringsize;
+extern stack_t **g_stacktop;
+extern char *g_variables;
+
+#endif
diff --git a/Contrib/System/Source/System.c b/Contrib/System/Source/System.c
index 3596297..e983c37 100755
--- a/Contrib/System/Source/System.c
+++ b/Contrib/System/Source/System.c
@@ -1,1411 +1,1411 @@
-// System.cpp : Defines the entry point for the DLL application.
-//
-
-#include "stdafx.h"
-#include "Plugin.h"
-#include "Buffers.h"
-#include "System.h"
-#ifndef __GNUC__
-#include <crtdbg.h>
-#endif /* __GNUC__ */
-#include <objbase.h>
-
-// Parse Section Type
-#define PST_PROC 0
-#define PST_PARAMS 1
-#define PST_RETURN 2
-#define PST_OPTIONS 3
-
-#define PCD_NONE 0
-#define PCD_PROC 1
-#define PCD_PARAMS 2
-#define PCD_DONE 3 // Just Continue
-
-const int ParamSizeByType[7] = {0, // PAT_VOID (Size will be equal to 1)
- 1, // PAT_INT
- 2, // PAT_LONG
- 1, // PAT_STRING
- 1, // PAT_WSTRING
- 1, // PAT_GUID
- 0}; // PAT_CALLBACK (Size will be equal to 1)
-
-int z1, z2; // I've made them static for easier use at callback procs
-int LastStackPlace;
-int LastStackReal;
-DWORD LastError;
-volatile SystemProc *LastProc;
-int CallbackIndex;
-HINSTANCE g_hInstance;
-
-// Return to callback caller with stack restore
-char retexpr[4];
-HANDLE retaddr;
-
-#ifndef __GNUC__
-
-/*
-FIXME:
-GCC cannot compile the inline assembly used by System::Call and
-System::Get, so those functions and their supporting functions
-are disabled when using GCC.
-*/
-
-char *GetResultStr(SystemProc *proc)
-{
- char *buf = AllocString();
- if (proc->ProcResult == PR_OK) lstrcpy(buf, "ok");
- else if (proc->ProcResult == PR_ERROR) lstrcpy(buf, "error");
- else if (proc->ProcResult == PR_CALLBACK) wsprintf(buf, "callback%d", proc->CallbackIndex);
- return buf;
-}
-
-#ifdef SYSTEM_LOG_DEBUG
-
-// System log debuggin turned on
-#define SYSTEM_EVENT(a) { _asm { mov logespsave, esp }; LogEvent(a); }
-#define SYSTEM_LOG_ADD(a) { lstrcat(syslogbuf, a); }
-#define SYSTEM_LOG_POST { lstrcat(syslogbuf, "\n"); WriteToLog(syslogbuf); *syslogbuf = 0; }
-
-HANDLE logfile = NULL;
-char syslogbuf[4096] = "";
-int logop = 0, logespsave;
-
-void WriteToLog(char *buffer)
-{
- DWORD written;
- char timebuffer[128];
-
- GetTickCount();
-
- if (logfile == NULL) return;
-
- SetFilePointer(logfile, 0, 0, FILE_END);
-
- wsprintf(timebuffer, "%04d %04d.%03d ", (++logop)%10000, (GetTickCount() / 1000) % 10000,
- GetTickCount() % 1000);
-
- _RPT0(_CRT_WARN, timebuffer);
- _RPT0(_CRT_WARN, buffer);
-
- WriteFile(logfile, timebuffer, lstrlen(timebuffer), &written, NULL);
- WriteFile(logfile, buffer, lstrlen(buffer), &written, NULL);
-// FlushFileBuffers(logfile);
-}
-
-void LogEvent(char *a)
-{
- char buffer[1024];
- wsprintf(buffer, "%s ESP = 0x%08X Stack = 0x%08X Real = 0x%08X", a,
- logespsave, LastStackPlace, LastStackReal);
- SYSTEM_LOG_ADD(buffer);
-}
-
-PLUGINFUNCTION(Debug)
-{
- char *o1;
- o1 = popstring();
-
- if (logfile == NULL)
- if (lstrlen(o1) > 0)
- {
- SYSTEMTIME t;
- char buffer[1024], buftime[1024], bufdate[1024];
-
- // Init debugging
- logfile = CreateFile(o1, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
- OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
- SetFilePointer(logfile, 0, 0, FILE_END);
-
- logop = 0;
- GetLocalTime(&t);
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT, LOCALE_NOUSEROVERRIDE, &t, NULL, buftime, 1024);
- GetDateFormat(LOCALE_SYSTEM_DEFAULT, LOCALE_NOUSEROVERRIDE, &t, NULL, bufdate, 1024);
- wsprintf(buffer, "System, %s %s [build "__TIME__" "__DATE__"]\n", buftime, bufdate);
- WriteToLog(buffer);
- } else ;
- else
- if (lstrlen(o1) > 0)
- {
- // Log in to log file
- WriteToLog(o1);
- } else
- {
- // Stop debugging
- WriteToLog("Debug stopped.\n\n\n");
- CloseHandle(logfile);
- logfile = NULL;
- }
-} PLUGINFUNCTIONEND
-
-#else
-
-// System log debugging turned off
-#define SYSTEM_EVENT(a)
-#define SYSTEM_LOG_ADD(a)
-#define SYSTEM_LOG_POST
-
-#endif
-
-PLUGINFUNCTION(Get)
-{
- SystemProc *proc = PrepareProc(FALSE);
- if (proc == NULL)
- {
- pushstring("error");
- return;
- }
-
- SYSTEM_LOG_ADD("Get ");
- SYSTEM_LOG_ADD(proc->DllName);
- SYSTEM_LOG_ADD("::");
- SYSTEM_LOG_ADD(proc->ProcName);
- SYSTEM_LOG_ADD("\n");
- SYSTEM_LOG_POST;
- if ((proc->Options & POPT_ALWRETURN) != 0)
- {
- // Always return flag set -> return separate proc and result
- pushint((int) proc);
- GlobalFree(pushstring(GetResultStr(proc)));
- } else
- {
- if (proc->ProcResult != PR_OK)
- {
- // No always return flag and error result - return result
- GlobalFree(pushstring(GetResultStr(proc)));
- // If proc is permanent?
- if ((proc->Options & POPT_PERMANENT) == 0)
- GlobalFree((HANDLE) proc); // No, free it
- }
- else // Ok result, return proc
- pushint((int) proc);
- }
-} PLUGINFUNCTIONEND
-
-PLUGINFUNCTION(Call)
-{
- // Prepare input
- SystemProc *proc = PrepareProc(TRUE);
- if (proc == NULL)
- return;
-
- SYSTEM_LOG_ADD("Call ");
- SYSTEM_LOG_ADD(proc->DllName);
- SYSTEM_LOG_ADD("::");
- SYSTEM_LOG_ADD(proc->ProcName);
- SYSTEM_LOG_ADD("\n");
- if (proc->ProcResult != PR_CALLBACK)
- ParamAllocate(proc);
- ParamsIn(proc);
-
- // Make the call
- if (proc->ProcResult != PR_ERROR)
- {
- switch (proc->ProcType)
- {
- case PT_NOTHING:
- if (proc->ProcResult == PR_CALLBACK)
- proc = CallBack(proc);
- break;
- case PT_PROC:
- case PT_VTABLEPROC:
- proc = CallProc(proc); break;
- case PT_STRUCT:
- CallStruct(proc); break;
- }
- }
-
- // Process output
- if ((proc->Options & POPT_ALWRETURN) != 0)
- {
- // Always return flag set - return separate return and result
- ParamsOut(proc);
- GlobalFree(pushstring(GetResultStr(proc)));
- } else
- {
- if (proc->ProcResult != PR_OK)
- {
- ProcParameter pp;
- // Save old return param
- pp = proc->Params[0];
-
- // Return result instead of return value
- proc->Params[0].Value = (int) GetResultStr(proc);
- proc->Params[0].Type = PAT_STRING;
- // Return all params
- ParamsOut(proc);
-
- // Restore old return param
- proc->Params[0] = pp;
- } else
- ParamsOut(proc);
- }
-
- if (proc->ProcResult != PR_CALLBACK)
- {
- // Deallocate params if not callback
- ParamsDeAllocate(proc);
-
- // if not callback - check for unload library option
- if ((proc->Options & POPT_UNLOAD)
- && (proc->ProcType == PT_PROC)
- && (proc->Dll != NULL))
- FreeLibrary(proc->Dll); // and unload it :)
-
- // In case of POPT_ERROR - first pop will be proc error
- if ((proc->Options & POPT_ERROR) != 0) pushint(LastError);
- }
-
- // If proc is permanent?
- if ((proc->Options & POPT_PERMANENT) == 0)
- GlobalFree((HANDLE) proc); // No, free it
-} PLUGINFUNCTIONEND
-
-#endif /* __GNUC__ */
-
-PLUGINFUNCTIONSHORT(Int64Op)
-{
- __int64 i1, i2 = 0, i3, i4;
- char *op, *o1, *o2;
- char buf[128];
-
- // Get strings
- o1 = popstring(); op = popstring();
- i1 = myatoi(o1); // convert first arg to int64
- if ((*op != '~') && (*op != '!'))
- {
- // get second arg, convert it, free it
- o2 = popstring();
- i2 = myatoi(o2);
- GlobalFree(o2);
- }
-
- // operation
- switch (*op)
- {
- case '+': i1 += i2; break;
- case '-': i1 -= i2; break;
- case '*': i1 *= i2; break;
- case '/':
- case '%':
- // It's unclear, but in this case compiler will use DivMod rountine
- // instead of two separate Div and Mod rountines.
- if (i2 == 0) { i3 = 0; i4 = i1; }
- else {i3 = i1 / i2; i4 = i1 % i2; }
- if (*op == '/') i1 = i3; else i1 = i4;
- break;
- case '|': if (op[1] == '|') i1 = i1 || i2; else i1 |= i2; break;
- case '&': if (op[1] == '&') i1 = i1 && i2; else i1 &= i2; break;
- case '^': i1 ^= i2; break;
- case '~': i1 = ~i1; break;
- case '!': i1 = !i1; break;
- case '<': if (op[1] == '<') i1 = i1 << i2; else i1 = i1 < i2; break;
- case '>': if (op[1] == '>') i1 = i1 >> i2; else i1 = i1 > i2; break;
- case '=': i1 = (i1 == i2); break;
- }
-
- // Output and freedom
- myitoa64(i1, buf);
- pushstring(buf);
- GlobalFree(o1); GlobalFree(op);
-} PLUGINFUNCTIONEND
-
-__int64 GetIntFromString(char **p)
-{
- char buffer[128], *b = buffer;
- (*p)++; // First character should be skipped
- while (((**p >= 'a') && (**p <= 'f')) || ((**p >= 'A') && (**p <= 'F')) || ((**p >= '0') && (**p <= '9')) || (**p == 'X') || (**p == '-') || (**p == 'x') || (**p == '|')) *(b++) = *((*p)++);
- *b = 0;
- (*p)--; // We should point at last digit
- return myatoi(buffer);
-}
-
-#ifndef __GNUC__
-
-SystemProc *PrepareProc(BOOL NeedForCall)
-{
- int SectionType = PST_PROC, // First section is always proc spec
- ProcType = PT_NOTHING, // Default proc spec
- ChangesDone = 0,
- ParamIndex = 0,
- temp = 0, temp2, temp3, temp4;
- BOOL param_defined = FALSE;
- SystemProc *proc = NULL;
- char *ibuf, *ib, *sbuf, *cbuf, *cb;
-
- // Retrieve proc specs
- cb = (cbuf = AllocString()); // Current String buffer
- sbuf = AllocString(); // Safe String buffer
- ib = ibuf = popstring(); // Input string
-
- // Parse the string
- while (SectionType != -1)
- {
- // Check for Section Change
- BOOL changed = TRUE;
- ChangesDone = SectionType;
-
- if (SectionType != PST_PROC && proc == NULL)
- // no proc after PST_PROC is done means something is wrong with
- // the call syntax and we'll get a crash because everything needs
- // proc from here on.
- break;
-
- switch (*ib)
- {
- case 0x0: SectionType = -1; break;
- case '#': SectionType = PST_PROC; ProcType = PT_NOTHING; break;
- case '(':
- SectionType = PST_PARAMS;
- // fake-real parameter: for COM interfaces first param is Interface Pointer
- ParamIndex = ((ProcType == PT_VTABLEPROC)?(2):(1));
- temp3 = temp = 0;
- param_defined = FALSE;
- break;
- case ')': SectionType = PST_RETURN; temp3 = temp = 0; break;
- case '?': SectionType = PST_OPTIONS; temp = 1; break;
- default:
- changed = FALSE;
- }
-
- // Check for changes
- if (changed)
- {
- switch (ChangesDone)
- {
- case PST_PROC:
- *cb = 0;
- // Adopt proc
- if (proc == NULL)
- {
- proc = (SystemProc *) GlobalAlloc(GPTR, sizeof(SystemProc));
- proc->Options = 0;
- proc->ParamCount = 0;
- }
- // Default parameters
- *proc->DllName = 0;
- *proc->ProcName = 0;
- proc->Dll = NULL;
- proc->Proc = NULL;
- proc->ProcType = ProcType;
- proc->ProcResult = PR_OK;
-
- // Section changed and previos section was Proc
- switch (ProcType)
- {
- case PT_NOTHING:
- // Is it previous proc or just unknown proc?
- if (cb != cbuf)
- {
- // Previous proc (for clear up)
- SystemProc *pr = NULL;
-
- if (proc != NULL) GlobalFree(proc);
- // Get already defined proc
- proc = (SystemProc *) myatoi(cbuf);
- if (!proc) break;
-
- // Find the last clone at proc queue
- while (proc && (proc->Clone != NULL)) proc = (pr = proc)->Clone;
-
- // Clear parents record for child callback proc
- if (pr != NULL) pr->Clone = NULL;
-
- // Never Redefine?
- if ((proc->Options & POPT_NEVERREDEF) != 0)
- {
- // Create new proc as copy
- proc = GlobalCopy(proc);
- // NeverRedef options is never inherited
- proc->Options &= (~POPT_NEVERREDEF) & (~POPT_PERMANENT);
- } else proc->Options |= POPT_PERMANENT; // Proc is old -> permanent
- }
- break;
- case PT_PROC:
- case PT_VTABLEPROC:
- lstrcpy(proc->DllName, sbuf);
- case PT_STRUCT:
- lstrcpy(proc->ProcName, cbuf);
- break;
- }
- break;
- case PST_PARAMS:
- if (param_defined)
- proc->ParamCount = ParamIndex;
- else
- // not simply zero because of vtable calls
- proc->ParamCount = ParamIndex - 1;
- case PST_RETURN:
- case PST_OPTIONS:
- break;
- }
- ib++;
- cb = cbuf;
- continue;
- }
-
- // Parse the section
- ChangesDone = PCD_NONE;
- switch (SectionType)
- {
- // Proc sections parser
- case PST_PROC:
- switch (*ib)
- {
- case ':':
- case '-':
- // Is it '::'
- if ((*(ib) == '-') && (*(ib+1) == '>'))
- {
- ProcType = PT_VTABLEPROC;
- } else
- {
- if ((*(ib+1) != ':') || (*(ib) == '-')) break;
- ProcType = PT_PROC;
- }
- ib++; // Skip next ':'
-
- if (cb > cbuf)
- {
- *cb = 0;
- lstrcpy(sbuf, cbuf);
- } else *sbuf = 0; // No dll - system proc
-
- // Ok
- ChangesDone = PCD_DONE;
- break;
- case '*':
- // Structure defenition
- ProcType = PT_STRUCT;
- ChangesDone = PCD_DONE;
- break;
- }
- break;
-
- // Params and return sections parser
- case PST_RETURN:
- ParamIndex = 0; // Uses the same logic as PST_PARAMS section
- case PST_PARAMS:
- temp2 = -1; temp4 = 0; // Our type placeholder
- switch (*ib)
- {
- case ' ':
- break;
- case '_': // No param cutting specifier
- if (proc->ParamCount > ParamIndex) ParamIndex = proc->ParamCount;
- temp3 = temp = 0; // Clear parameter options
- if (proc->ParamCount != ((ProcType == PT_VTABLEPROC) ? 1 : 0))
- {
- // only define params if the last count wasn't zero
- // this prevents errornous param count for:
- // 'user32::CloseClipboard()(_)'
- // for vtable calls, param count should not be one
- param_defined = TRUE;
- }
- break;
- case ',': // Next param
- temp3 = temp = 0; // Clear parameter options
- ParamIndex++;
- param_defined = TRUE;
- break;
- case '&':
- temp = 1; break; // Special parameter option
- case '*':
- temp = -1; break; // Pointer parameter option
-
- // Types
- case 'v':
- case 'V': temp2 = PAT_VOID; break;
- case 'i':
- case 'I': temp2 = PAT_INT; break;
- case 'l':
- case 'L': temp2 = PAT_LONG; break;
- case 't':
- case 'T': temp2 = PAT_STRING; break;
- case 'g':
- case 'G': temp2 = PAT_GUID; break;
- case 'w':
- case 'W': temp2 = PAT_WSTRING; break;
- case 'k':
- case 'K': temp2 = PAT_CALLBACK; break;
-
- // Input output specifiers
- case '.': temp3++; break; // skip specifier
-
- case 'R':
- temp4 = ((int) GetIntFromString(&ib))+1;
- if (temp4 < 11) temp4 += 10;
- break;
- case 'r': temp4 = ((int) GetIntFromString(&ib))+1; break; // Register
-
- case '-':
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- // Numeric inline
- if (temp3 == 0)
- {
- ib--;
- // It's stupid, I know, but I'm too laze to do another thing
- myitoa64(GetIntFromString(&(ib)),(char *)(temp4 = (int) AllocString()));
- }
- break;
-
- case '\"': case '\'': case '`':
- // Character inline
- {
- char start = *ib;
- cb = cbuf;
- // copy inline
- while (!((*(++ib) == start) && (*(ib+1) != start)) && (*ib))
- {
- if ((*ib) == start) ++ib;
- *(cb++) = *(ib);
- }
- // finish and save
- *cb = 0;
- temp4 = (int) AllocStr(cbuf);
- }
- break;
-
- case 's':
- case 'S': temp4 = -1; break; // Stack
- case 'c':
- case 'C': temp4 = INST_CMDLINE+1; break;
- case 'd':
- case 'D': temp4 = INST_INSTDIR+1; break;
- case 'o':
- case 'O': temp4 = INST_OUTDIR+1; break;
- case 'e':
- case 'E': temp4 = INST_EXEDIR+1; break;
- case 'a':
- case 'A': temp4 = INST_LANG+1; break;
- }
-
- // Param type changed?
- if (temp2 != -1)
- {
- param_defined = TRUE;
- proc->Params[ParamIndex].Type = temp2;
- proc->Params[ParamIndex].Size = // If pointer, then 1, else by type
- (temp == -1)?(1):((ParamSizeByType[temp2]>0)?(ParamSizeByType[temp2]):(1));
- // Get the parameter real special option value
- if (temp == 1) temp = ((int) GetIntFromString(&ib)) + 1;
- proc->Params[ParamIndex].Option = temp;
- proc->Params[ParamIndex].Value = 0;
- proc->Params[ParamIndex].Input = IOT_NONE;
- proc->Params[ParamIndex].Output = IOT_NONE;
- }
-
- // Param source/dest changed?
- if (temp4 != 0)
- {
- param_defined = TRUE;
- if (temp3 == 0)
- {
- // it may contain previous inline input
- if (!((proc->Params[ParamIndex].Input > -1) && (proc->Params[ParamIndex].Input <= __INST_LAST)))
- GlobalFree((HANDLE) proc->Params[ParamIndex].Input);
- proc->Params[ParamIndex].Input = temp4;
- }
- if (temp3 == 1)
- proc->Params[ParamIndex].Output = temp4;
- // Next parameter is output or something else
- temp3++;
- }
-
- ChangesDone = PCD_DONE;
- break;
-
- // Options sections parser
- case PST_OPTIONS:
- temp2 = 0;
- switch (*ib)
- {
- case ' ':
- break;
- case '!': temp = -temp; break;
- case 'c':
- temp2 = POPT_CDECL;
- break;
- case 'r':
- temp2 = POPT_ALWRETURN;
- break;
- case 'n':
- temp2 = POPT_NEVERREDEF;
- break;
- case 's':
- temp2 = POPT_GENSTACK;
- break;
- case 'e':
- temp2 = POPT_ERROR;
- break;
- case 'u':
- temp2 = POPT_UNLOAD;
- break;
- }
-
- // New Options
- if (temp2 != 0)
- {
- if (temp == 1) proc->Options |= temp2;
- else proc->Options &= ~temp2;
- // Back to default (turn on nothing) state
- temp = 1; temp2 = 0;
- }
-
- ChangesDone = PCD_DONE;
- break;
- }
-
- // Nothing done, just copy char to buffer
- if (ChangesDone == PCD_NONE) *(cb++) = *(ib);
- // Something done, buffer = ""
- else cb = cbuf;
-
- // Increase input pointer
- ib++;
- }
-
- GlobalFree(ibuf);
- GlobalFree(cbuf);
- GlobalFree(sbuf);
-
- // Ok, the final step: check proc for existance
- if (proc != NULL && proc->Proc == NULL)
- {
- switch (proc->ProcType)
- {
- case PT_NOTHING: break;
- case PT_VTABLEPROC:
- {
- // Use direct system proc address
- int addr;
-
- proc->Dll = (HANDLE) myatoi(proc->DllName);
-
- if (proc->Dll == 0)
- {
- proc->ProcResult = PR_ERROR;
- break;
- }
-
- addr = (int) proc->Dll;
-
- // fake-real parameter: for COM interfaces first param is Interface Pointer
- proc->Params[1].Output = IOT_NONE;
- proc->Params[1].Input = (int) AllocStr(proc->DllName);
- proc->Params[1].Size = 1;
- proc->Params[1].Type = PAT_INT;
- proc->Params[1].Option = 0;
-
- // addr - pointer to interface vtable
- addr = *((int *)addr);
- // now addr contains the pointer to first item at VTABLE
- // add the index of proc
- addr = addr + (int)(myatoi(proc->ProcName)*4);
- proc->Proc = *((HANDLE*)addr);
- }
- break;
- case PT_PROC:
- if (*proc->DllName == 0)
- {
- // Use direct system proc address
- if ((proc->Proc = (HANDLE) myatoi(proc->ProcName)) == 0)
- proc->ProcResult = PR_ERROR;
- } else
- {
- // Get DLL address
- if ((proc->Dll = GetModuleHandle(proc->DllName)) == NULL)
- if ((proc->Dll = LoadLibrary(proc->DllName)) == NULL)
- {
- proc->ProcResult = PR_ERROR;
- break;
- }
-
- // Get proc address
- if ((proc->Proc = GetProcAddress(proc->Dll, proc->ProcName)) == NULL)
- {
- // automatic A discover
- lstrcat(proc->ProcName, "A");
- if ((proc->Proc = GetProcAddress(proc->Dll, proc->ProcName)) == NULL)
- proc->ProcResult = PR_ERROR;
- }
- }
- break;
- case PT_STRUCT:
- if (*(proc->ProcName) != 0) proc->Proc = (HANDLE) myatoi(proc->ProcName);
- break;
- }
- }
-
- return proc;
-}
-
-void ParamAllocate(SystemProc *proc)
-{
- int i;
-
- for (i = 0; i <= proc->ParamCount; i++)
- if (((HANDLE) proc->Params[i].Value == NULL) && (proc->Params[i].Option == -1))
- {
- proc->Params[i].Value = (int) GlobalAlloc(GPTR, 4*ParamSizeByType[proc->Params[i].Type]);
- }
-}
-
-void ParamsIn(SystemProc *proc)
-{
- int i, *place;
- char *realbuf;
- LPWSTR wstr;
-
- i = (proc->ParamCount > 0)?(1):(0);
- while (TRUE)
- {
- ProcParameter *par = &proc->Params[i];
- // Step 1: retrive value
- if ((par->Input == IOT_NONE) || (par->Input == IOT_INLINE))
- realbuf = AllocStr("");
- else if (par->Input == IOT_STACK) realbuf = popstring();
- else if ((par->Input > 0) && (par->Input <= __INST_LAST))
- realbuf = getuservariable(par->Input - 1);
- else
- {
- // Inline input, will be freed as realbuf
- realbuf = (char*) par->Input;
- par->Input = IOT_INLINE;
- }
-
- // Retreive pointer to place
- if (par->Option == -1) place = (int*) par->Value;
- else place = (int*) &(par->Value);
-
- // by default no blocks are allocated
- par->allocatedBlock = NULL;
-
- // Step 2: place it
- switch (par->Type)
- {
- case PAT_VOID:
- par->Value = 0;
- break;
- case PAT_INT:
- *((int*) place) = (int) myatoi(realbuf);
- break;
- case PAT_LONG:
- *((__int64*) place) = myatoi(realbuf);
- break;
- case PAT_STRING:
-/* if (par->Input == IOT_NONE)
- *((int*) place) = (int) NULL;
- else*/
- *((int*) place) = (int) (par->allocatedBlock = AllocStr(realbuf));
- break;
- case PAT_WSTRING:
- case PAT_GUID:
- wstr = (LPWSTR) (par->allocatedBlock = GlobalAlloc(GPTR, g_stringsize*2));
- MultiByteToWideChar(CP_ACP, 0, realbuf, g_stringsize, wstr, g_stringsize);
- if (par->Type == PAT_GUID)
- {
- *((HGLOBAL*)place) = (par->allocatedBlock = GlobalAlloc(GPTR, 16));
- CLSIDFromString(wstr, *((LPCLSID*)place));
- GlobalFree((HGLOBAL) wstr);
- } else
- *((LPWSTR*)place) = wstr;
- break;
- case PAT_CALLBACK:
- // Generate new or use old callback
- if (lstrlen(realbuf) > 0)
- par->Value = (int) CreateCallback((SystemProc*) myatoi(realbuf));
- break;
- }
- GlobalFree(realbuf);
-
-#ifdef SYSTEM_LOG_DEBUG
- {
- char buf[1024];
- wsprintf(buf, "\t\t\tParam In %d: type %d value 0x%08X value2 0x%08X\n", i,
- par->Type, par->Value, par->_value);
- SYSTEM_LOG_ADD(buf);
- }
-#endif
-
- if (i == 0) break;
- if (i == proc->ParamCount) i = 0;
- else i++;
- }
-}
-
-void ParamsDeAllocate(SystemProc *proc)
-{
- int i;
-
- for (i = proc->ParamCount; i >= 0; i--)
- if (((HANDLE) proc->Params[i].Value != NULL) && (proc->Params[i].Option == -1))
- {
- GlobalFree((HANDLE) (proc->Params[i].Value));
- proc->Params[i].Value = (int) NULL;
- }
-}
-
-void ParamsOut(SystemProc *proc)
-{
- int i, *place;
- char *realbuf;
- LPWSTR wstr;
-
- i = proc->ParamCount;
- do
- {
- // Retreive pointer to place
- if (proc->Params[i].Option == -1) place = (int*) proc->Params[i].Value;
- else place = (int*) &(proc->Params[i].Value);
-
- realbuf = AllocString();
-
- // Step 1: retrive value
- switch (proc->Params[i].Type)
- {
- case PAT_VOID:
- lstrcpy(realbuf,"");
- break;
- case PAT_INT:
- wsprintf(realbuf, "%d", *((int*) place));
- break;
- case PAT_LONG:
- myitoa64(*((__int64*) place), realbuf);
- break;
- case PAT_STRING:
- {
- int num = lstrlen(*((char**) place));
- if (num >= g_stringsize) num = g_stringsize-1;
- lstrcpyn(realbuf,*((char**) place), num+1);
- realbuf[num] = 0;
- }
- break;
- case PAT_GUID:
- wstr = (LPWSTR) GlobalAlloc(GPTR, g_stringsize*2);
- StringFromGUID2(*((REFGUID*)place), wstr, g_stringsize*2);
- WideCharToMultiByte(CP_ACP, 0, wstr, g_stringsize, realbuf, g_stringsize, NULL, NULL);
- GlobalFree((HGLOBAL)wstr);
- break;
- case PAT_WSTRING:
- wstr = *((LPWSTR*)place);
- WideCharToMultiByte(CP_ACP, 0, wstr, g_stringsize, realbuf, g_stringsize, NULL, NULL);
- break;
- case PAT_CALLBACK:
- wsprintf(realbuf, "%d", proc->Params[i].Value);
- break;
- }
-
- // memory cleanup
- if ((proc->Params[i].allocatedBlock != NULL) && ((proc->ProcType != PT_STRUCT)
- || (proc->Params[i].Option > 0)))
- GlobalFree(proc->Params[i].allocatedBlock);
-
- // Step 2: place it
- if (proc->Params[i].Output == IOT_NONE);
- else if (proc->Params[i].Output == IOT_STACK) pushstring(realbuf);
- else if (proc->Params[i].Output > 0) setuservariable(proc->Params[i].Output - 1, realbuf);
-
- GlobalFree(realbuf);
-
- i--;
- }
- while (i >= 0);
-}
-
-void _alloca_probe();
-
-SystemProc __declspec(naked) *CallProc(SystemProc *proc)
-{
- int z3;
-
- _asm
- {
- // Save stack
- push ebp
- mov ebp, esp
- // Stack space for local variables
- sub esp, __LOCAL_SIZE
- // Save all usable registers to free our hands
- push ebx
- push edi
- push esi
- }
-
- SYSTEM_LOG_ADD("\t\tCall:\n");
- SYSTEM_EVENT("\t\t\tBefore call ")
-
- if (CallbackIndex && (!(proc->Options & POPT_GENSTACK)))
- {
- _asm
- {
- push ebp
- // Save previous stack location
- mov LastStackReal, esp
- }
-
- if (LastStackPlace == 0)
- {
- _asm
- {
- // Create new stack
- mov eax, NEW_STACK_SIZE
- call _alloca_probe
- mov LastStackPlace, esp
- }
- } else
- _asm
- {
- // Move stack pointer
- mov esp, LastStackPlace
- }
- }
-
- // Push arguments to stack
- for (z1 = proc->ParamCount; z1 > 0; z1--)
- {
- // Long types
- if (proc->Params[z1].Size == 2)
- {
- z2 = proc->Params[z1]._value;
- _asm push z2;
- }
- // Default
- z2 = proc->Params[z1].Value;
- _asm push z2;
- }
-
- // Call the proc and save return
- z1 = (int) proc->Proc;
-
- // Save proc
- proc->Clone = (SystemProc *) LastProc;
- _asm
- {
- mov eax, proc
- mov LastProc, eax
- }
- //LastProc = proc;
-
- SYSTEM_EVENT("\n\t\t\tNear call ")
- SYSTEM_LOG_POST;
-
- // workaround for bug #1535007
- // http://sf.net/tracker/index.php?func=detail&aid=1535007&group_id=22049&atid=373085
- //
- // If a function returns short and doesn't clear eax in the process,
- // it will only set 2 bytes of eax, and the other 2 bytes remain
- // "random". In this case, they'll be part of the proc pointer.
- //
- // To avoid this, eax is cleared before the function is called. This
- // makes sure the value eax will contain is only what the function
- // actually sets.
- _asm xor eax, eax
-
- _asm
- {
- // Call
- call z1
- // Return
- mov z1, eax
- mov z2, edx
- }
-
- SYSTEM_LOG_ADD("Back from ");
- SYSTEM_LOG_ADD(LastProc->ProcName);
- SYSTEM_EVENT("\n\t\t\tShort-After call ")
-
- if ((CallbackIndex) && (!(LastProc->Options & POPT_GENSTACK)))
- {
- _asm
- {
- // Restore real stack location
- mov LastStackPlace, esp
- mov esp, LastStackReal
- pop ebp
- }
- }
-
- // Restore proc
- _asm
- {
- mov eax, LastProc
- mov proc, eax
- }
-// proc = LastProc;
- LastProc = proc->Clone;
-
- // In case of cdecl convention we should clear stack
- if ((proc->Options & POPT_CDECL) != 0)
- {
- if ((CallbackIndex > 0) && ((proc->Options & POPT_GENSTACK) == 0))
- {
- // In case of temporary stack
- for (z3 = 1; z3 <= proc->ParamCount; z3++)
- LastStackPlace += 4*proc->Params[z3].Size;
- } else
- {
- // in case of real stack
- for (z3 = 1; z3 <= proc->ParamCount; z3++)
- {
- if (proc->Params[z3].Size == 2)
- _asm pop edx;
- _asm pop edx;
- }
- }
- }
-
- // In case of cleared call-proc-queue -> clear allocated stack place (more flexible)
- if (LastProc == NULL) LastStackPlace = (int) NULL;
-
- // Save return
- proc->Params[0].Value = z1;
-// if (proc->Params[0].Size == 2)
- proc->Params[0]._value = z2;
- // Proc result: OK
- proc->ProcResult = PR_OK;
-
- // In case of POPT_ERROR -> GetLastError
- if ((proc->Options & POPT_ERROR) != 0)
- {
- LastError = GetLastError();
- }
-
- SYSTEM_EVENT("\n\t\t\tAfter call ")
-#ifdef SYSTEM_LOG_DEBUG
- {
- char buf[1024];
- wsprintf(buf, "\n\t\t\tReturn 0x%08X 0x%08X", z1, z2);
- SYSTEM_LOG_ADD(buf);
- }
-#endif
- SYSTEM_LOG_POST;
-
- _asm
- {
- // Return
- mov eax, proc
- // Restore registers
- pop esi
- pop edi
- pop ebx
- // Restore stack pointer
- mov esp, ebp
- pop ebp
- // Return
- ret
- }
-}
-
-SystemProc __declspec(naked) *RealCallBack()
-{
- SystemProc *proc;
-
- _asm
- {
- // Save stack
- push ebp
- mov ebp, esp
- // Stack space for local variables
- sub esp, __LOCAL_SIZE
- // Save all usable registers to free our hands
- push ebx
- push edi
- push esi
-
- // Arguments pointer
- mov z2, esp // 1-st arg - 4*4 (pushes) - 4 (return) - __LOCAL_SIZE
- add z2, __LOCAL_SIZE
- add z2, 5*4
- // Our callback proc
- mov proc, eax
- }
-
- SYSTEM_LOG_ADD("Called callback from ");
- SYSTEM_LOG_ADD(LastProc->ProcName);
- SYSTEM_EVENT("\n\t\t\tShort-After call ")
- SYSTEM_LOG_POST;
-
- // Find last unused clone
- while ((proc->Clone != NULL)) proc = proc->Clone;
- // 2. Create new clone
- proc = (proc->Clone = GlobalCopy(proc));
- // 3. Set clone option
- proc->Options |= POPT_CLONE;
-
- // Read arguments
- proc->ArgsSize = 0;
- for (z1 = 1; z1 <= proc->ParamCount; z1++)
- {
- // Default
- proc->Params[z1].Value = *(((int*)z2)++);
- proc->ArgsSize += 4;
- // Long only
- if (proc->Params[z1].Size == 2)
- {
- proc->Params[z1]._value = *(((int*)z2)++);
- proc->ArgsSize += 4;
- }
- }
- proc->ProcResult = PR_CALLBACK;
-
- _asm
- {
- // Return
- mov eax, proc
-
- // Save temporary stack info
- push ebp
-// push LastStackPlace
- mov LastStackPlace, esp
- // Restore real stack
- mov esp, LastStackReal
- pop ebp
-// pop LastStackReal
- }
-
- _asm
- {
- // Fake return from System::Call
-
- // Restore registers
- pop esi
- pop edi
- pop ebx
- // Restore stack pointer
- mov esp, ebp
- pop ebp
- // Return
- ret
- }
-}
-
-
-SystemProc __declspec(naked) *CallBack(SystemProc *proc)
-{
- _asm
- {
- // Save stack
- push ebp
- mov ebp, esp
- // Stack space for local variables
- sub esp, __LOCAL_SIZE
- // Save all usable registers to free our hands
- push ebx
- push edi
- push esi
- }
-
- // MessageBox(NULL, "cool1", "Cool", MB_OK);
-
- SYSTEM_LOG_ADD("\t\tReturn from callback:\n");
- SYSTEM_EVENT("\t\t\tBefore call-back ");
- SYSTEM_LOG_POST;
-
- //z1 = proc->Params[0].Value;
- //z2 = proc->Params[0]._value;
- //z1 = &(proc->Params[0].Value);
- _asm
- {
- mov eax, proc
- add eax, SYSTEM_ZERO_PARAM_VALUE_OFFSET
- push [eax]
- push [eax+4]
- }
-
- // Adjust return statement
- if ((proc->Options & POPT_CDECL) == 0) retexpr[1] = proc->ArgsSize;
- else retexpr[1] = 0x0;
-
- // Right return statement address
- retaddr = (HANDLE) retexpr;
-
- // Remove unneeded callback proc
- GlobalFree((HANDLE) proc);
-
-// MessageBox(NULL, "cool2", "Cool", MB_OK);
-
- _asm
- {
- // Prepare return
- // callback proc result
- pop edx
- pop eax
-
- // Restore temporary stack and return
-
- // Save real stack info
- // Save previous stack location
-// push LastStackReal
- push ebp
- mov LastStackReal, esp
- // Move stack pointer
- mov esp, LastStackPlace
-// pop LastStackPlace
- pop ebp
- }
-
-#ifdef SYSTEM_LOG_DEBUG
- _asm
- {
- push eax
- push edx
- }
- SYSTEM_EVENT("\n\t\t\tSh-Before call-back");
- SYSTEM_LOG_POST;
- _asm
- {
- // callback proc result
- pop edx
- pop eax
- }
-#endif
-
- // Fake return from Callback
- _asm {
- // Restore registers
- pop esi
- pop edi
- pop ebx
- // Restore stack pointer
- mov esp, ebp
- pop ebp
- // Return
- jmp retaddr
- }
-}
-
-HANDLE CreateCallback(SystemProc *cbproc)
-{
- char *mem;
-
- if (cbproc->Proc == NULL)
- {
- // Set callback index
- cbproc->CallbackIndex = ++(CallbackIndex);
- cbproc->Options |= POPT_PERMANENT;
-
- mem = (char *) (cbproc->Proc = VirtualAlloc(NULL, 10, MEM_COMMIT, PAGE_EXECUTE_READWRITE));
- *(mem++) = (char) 0xB8; // Mov eax, const
- *(((int *)mem)++) = (int) cbproc;
- *(mem++) = (char) 0xe9; // Jmp relative
- *((int *)mem) = (int) RealCallBack;
- *((int *)mem) -= ((int) mem) + 4;
- }
-
- // Return proc address
- return cbproc->Proc;
-}
-
-void CallStruct(SystemProc *proc)
-{
- BOOL ssflag;
- int i, structsize = 0, size = 0;
- char *st, *ptr;
-
- SYSTEM_LOG_ADD("\t\tStruct...");
-
- // Calculate the structure size
- for (i = 1; i <= proc->ParamCount; i++)
- if (proc->Params[i].Option < 1)
- structsize += proc->Params[i].Size * 4;
- else
- structsize += proc->Params[i].Option-1;
-
- // Struct exists?
- if (proc->Proc == NULL)
- // No. Allocate struct memory
- proc->Proc = (HANDLE) GlobalAlloc(GPTR, structsize);
- else // In case of zero size defined structure use mapped size
- if (structsize == 0) structsize = (int) GlobalSize((HANDLE) proc->Proc);
-
- // Pointer to current data
- st = (char*) proc->Proc;
-
- for (i = 1; i <= proc->ParamCount; i++)
- {
- ssflag = FALSE;
-
- // Normal or special block?
- if (proc->Params[i].Option < 1)
- {
- // Normal
- size = proc->Params[i].Size*4;
- ptr = (char*) &(proc->Params[i].Value);
- }
- else
- {
- int intmask[4] = {0xFFFFFFFF, 0x000000FF, 0x0000FFFF, 0x00FFFFFF};
-
- // Special
- size = proc->Params[i].Option-1;
-
- switch (proc->Params[i].Type)
- {
- case PAT_VOID: ptr = NULL; break;
- case PAT_LONG:
- // real structure size
- proc->Params[i].Value = structsize;
- proc->Params[i]._value = 0;
- ssflag = TRUE;
- case PAT_INT:
- // clear unused value bits
- proc->Params[i].Value &= intmask[((size >= 0) && (size < 4))?(size):(0)];
- // pointer
- ptr = (char*) &(proc->Params[i].Value);
- break;
-
- case PAT_STRING:
- case PAT_GUID:
- case PAT_WSTRING:
- ptr = (char*) proc->Params[i].Value; break;
- }
- }
-
- // Process them!
- if (ptr != NULL)
- {
- // Input
- if ((proc->Params[i].Input != IOT_NONE) || (ssflag))
- copymem(st, ptr, size);
-
- // Output
- if (proc->Params[i].Output != IOT_NONE)
- copymem(ptr, st, size);
- }
-
- // Skip to next data block
- st += size;
- }
-
- SYSTEM_LOG_POST;
-
- // Proc virtual return - pointer to memory struct
- proc->Params[0].Value = (int) proc->Proc;
-}
-
-#endif /* __GNUC__ */
-
-BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- g_hInstance=hInst;
-
- if (ul_reason_for_call == DLL_PROCESS_ATTACH)
- {
- // change the protection of return command
- VirtualProtect(&retexpr, sizeof(retexpr), PAGE_EXECUTE_READWRITE, &LastStackPlace);
-
- // initialize some variables
- LastStackPlace = 0;
- LastStackReal = 0;
- LastError = 0;
- LastProc = NULL;
- CallbackIndex = 0;
- retexpr[0] = (char) 0xC2;
- retexpr[2] = 0x00;
- }
-
- return TRUE;
-}
-
+// System.cpp : Defines the entry point for the DLL application.
+//
+
+#include "stdafx.h"
+#include "Plugin.h"
+#include "Buffers.h"
+#include "System.h"
+#ifndef __GNUC__
+#include <crtdbg.h>
+#endif /* __GNUC__ */
+#include <objbase.h>
+
+// Parse Section Type
+#define PST_PROC 0
+#define PST_PARAMS 1
+#define PST_RETURN 2
+#define PST_OPTIONS 3
+
+#define PCD_NONE 0
+#define PCD_PROC 1
+#define PCD_PARAMS 2
+#define PCD_DONE 3 // Just Continue
+
+const int ParamSizeByType[7] = {0, // PAT_VOID (Size will be equal to 1)
+ 1, // PAT_INT
+ 2, // PAT_LONG
+ 1, // PAT_STRING
+ 1, // PAT_WSTRING
+ 1, // PAT_GUID
+ 0}; // PAT_CALLBACK (Size will be equal to 1)
+
+int z1, z2; // I've made them static for easier use at callback procs
+int LastStackPlace;
+int LastStackReal;
+DWORD LastError;
+volatile SystemProc *LastProc;
+int CallbackIndex;
+HINSTANCE g_hInstance;
+
+// Return to callback caller with stack restore
+char retexpr[4];
+HANDLE retaddr;
+
+#ifndef __GNUC__
+
+/*
+FIXME:
+GCC cannot compile the inline assembly used by System::Call and
+System::Get, so those functions and their supporting functions
+are disabled when using GCC.
+*/
+
+char *GetResultStr(SystemProc *proc)
+{
+ char *buf = AllocString();
+ if (proc->ProcResult == PR_OK) lstrcpy(buf, "ok");
+ else if (proc->ProcResult == PR_ERROR) lstrcpy(buf, "error");
+ else if (proc->ProcResult == PR_CALLBACK) wsprintf(buf, "callback%d", proc->CallbackIndex);
+ return buf;
+}
+
+#ifdef SYSTEM_LOG_DEBUG
+
+// System log debuggin turned on
+#define SYSTEM_EVENT(a) { _asm { mov logespsave, esp }; LogEvent(a); }
+#define SYSTEM_LOG_ADD(a) { lstrcat(syslogbuf, a); }
+#define SYSTEM_LOG_POST { lstrcat(syslogbuf, "\n"); WriteToLog(syslogbuf); *syslogbuf = 0; }
+
+HANDLE logfile = NULL;
+char syslogbuf[4096] = "";
+int logop = 0, logespsave;
+
+void WriteToLog(char *buffer)
+{
+ DWORD written;
+ char timebuffer[128];
+
+ GetTickCount();
+
+ if (logfile == NULL) return;
+
+ SetFilePointer(logfile, 0, 0, FILE_END);
+
+ wsprintf(timebuffer, "%04d %04d.%03d ", (++logop)%10000, (GetTickCount() / 1000) % 10000,
+ GetTickCount() % 1000);
+
+ _RPT0(_CRT_WARN, timebuffer);
+ _RPT0(_CRT_WARN, buffer);
+
+ WriteFile(logfile, timebuffer, lstrlen(timebuffer), &written, NULL);
+ WriteFile(logfile, buffer, lstrlen(buffer), &written, NULL);
+// FlushFileBuffers(logfile);
+}
+
+void LogEvent(char *a)
+{
+ char buffer[1024];
+ wsprintf(buffer, "%s ESP = 0x%08X Stack = 0x%08X Real = 0x%08X", a,
+ logespsave, LastStackPlace, LastStackReal);
+ SYSTEM_LOG_ADD(buffer);
+}
+
+PLUGINFUNCTION(Debug)
+{
+ char *o1;
+ o1 = popstring();
+
+ if (logfile == NULL)
+ if (lstrlen(o1) > 0)
+ {
+ SYSTEMTIME t;
+ char buffer[1024], buftime[1024], bufdate[1024];
+
+ // Init debugging
+ logfile = CreateFile(o1, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+ OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
+ SetFilePointer(logfile, 0, 0, FILE_END);
+
+ logop = 0;
+ GetLocalTime(&t);
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT, LOCALE_NOUSEROVERRIDE, &t, NULL, buftime, 1024);
+ GetDateFormat(LOCALE_SYSTEM_DEFAULT, LOCALE_NOUSEROVERRIDE, &t, NULL, bufdate, 1024);
+ wsprintf(buffer, "System, %s %s [build "__TIME__" "__DATE__"]\n", buftime, bufdate);
+ WriteToLog(buffer);
+ } else ;
+ else
+ if (lstrlen(o1) > 0)
+ {
+ // Log in to log file
+ WriteToLog(o1);
+ } else
+ {
+ // Stop debugging
+ WriteToLog("Debug stopped.\n\n\n");
+ CloseHandle(logfile);
+ logfile = NULL;
+ }
+} PLUGINFUNCTIONEND
+
+#else
+
+// System log debugging turned off
+#define SYSTEM_EVENT(a)
+#define SYSTEM_LOG_ADD(a)
+#define SYSTEM_LOG_POST
+
+#endif
+
+PLUGINFUNCTION(Get)
+{
+ SystemProc *proc = PrepareProc(FALSE);
+ if (proc == NULL)
+ {
+ pushstring("error");
+ return;
+ }
+
+ SYSTEM_LOG_ADD("Get ");
+ SYSTEM_LOG_ADD(proc->DllName);
+ SYSTEM_LOG_ADD("::");
+ SYSTEM_LOG_ADD(proc->ProcName);
+ SYSTEM_LOG_ADD("\n");
+ SYSTEM_LOG_POST;
+ if ((proc->Options & POPT_ALWRETURN) != 0)
+ {
+ // Always return flag set -> return separate proc and result
+ pushint((int) proc);
+ GlobalFree(pushstring(GetResultStr(proc)));
+ } else
+ {
+ if (proc->ProcResult != PR_OK)
+ {
+ // No always return flag and error result - return result
+ GlobalFree(pushstring(GetResultStr(proc)));
+ // If proc is permanent?
+ if ((proc->Options & POPT_PERMANENT) == 0)
+ GlobalFree((HANDLE) proc); // No, free it
+ }
+ else // Ok result, return proc
+ pushint((int) proc);
+ }
+} PLUGINFUNCTIONEND
+
+PLUGINFUNCTION(Call)
+{
+ // Prepare input
+ SystemProc *proc = PrepareProc(TRUE);
+ if (proc == NULL)
+ return;
+
+ SYSTEM_LOG_ADD("Call ");
+ SYSTEM_LOG_ADD(proc->DllName);
+ SYSTEM_LOG_ADD("::");
+ SYSTEM_LOG_ADD(proc->ProcName);
+ SYSTEM_LOG_ADD("\n");
+ if (proc->ProcResult != PR_CALLBACK)
+ ParamAllocate(proc);
+ ParamsIn(proc);
+
+ // Make the call
+ if (proc->ProcResult != PR_ERROR)
+ {
+ switch (proc->ProcType)
+ {
+ case PT_NOTHING:
+ if (proc->ProcResult == PR_CALLBACK)
+ proc = CallBack(proc);
+ break;
+ case PT_PROC:
+ case PT_VTABLEPROC:
+ proc = CallProc(proc); break;
+ case PT_STRUCT:
+ CallStruct(proc); break;
+ }
+ }
+
+ // Process output
+ if ((proc->Options & POPT_ALWRETURN) != 0)
+ {
+ // Always return flag set - return separate return and result
+ ParamsOut(proc);
+ GlobalFree(pushstring(GetResultStr(proc)));
+ } else
+ {
+ if (proc->ProcResult != PR_OK)
+ {
+ ProcParameter pp;
+ // Save old return param
+ pp = proc->Params[0];
+
+ // Return result instead of return value
+ proc->Params[0].Value = (int) GetResultStr(proc);
+ proc->Params[0].Type = PAT_STRING;
+ // Return all params
+ ParamsOut(proc);
+
+ // Restore old return param
+ proc->Params[0] = pp;
+ } else
+ ParamsOut(proc);
+ }
+
+ if (proc->ProcResult != PR_CALLBACK)
+ {
+ // Deallocate params if not callback
+ ParamsDeAllocate(proc);
+
+ // if not callback - check for unload library option
+ if ((proc->Options & POPT_UNLOAD)
+ && (proc->ProcType == PT_PROC)
+ && (proc->Dll != NULL))
+ FreeLibrary(proc->Dll); // and unload it :)
+
+ // In case of POPT_ERROR - first pop will be proc error
+ if ((proc->Options & POPT_ERROR) != 0) pushint(LastError);
+ }
+
+ // If proc is permanent?
+ if ((proc->Options & POPT_PERMANENT) == 0)
+ GlobalFree((HANDLE) proc); // No, free it
+} PLUGINFUNCTIONEND
+
+#endif /* __GNUC__ */
+
+PLUGINFUNCTIONSHORT(Int64Op)
+{
+ __int64 i1, i2 = 0, i3, i4;
+ char *op, *o1, *o2;
+ char buf[128];
+
+ // Get strings
+ o1 = popstring(); op = popstring();
+ i1 = myatoi(o1); // convert first arg to int64
+ if ((*op != '~') && (*op != '!'))
+ {
+ // get second arg, convert it, free it
+ o2 = popstring();
+ i2 = myatoi(o2);
+ GlobalFree(o2);
+ }
+
+ // operation
+ switch (*op)
+ {
+ case '+': i1 += i2; break;
+ case '-': i1 -= i2; break;
+ case '*': i1 *= i2; break;
+ case '/':
+ case '%':
+ // It's unclear, but in this case compiler will use DivMod rountine
+ // instead of two separate Div and Mod rountines.
+ if (i2 == 0) { i3 = 0; i4 = i1; }
+ else {i3 = i1 / i2; i4 = i1 % i2; }
+ if (*op == '/') i1 = i3; else i1 = i4;
+ break;
+ case '|': if (op[1] == '|') i1 = i1 || i2; else i1 |= i2; break;
+ case '&': if (op[1] == '&') i1 = i1 && i2; else i1 &= i2; break;
+ case '^': i1 ^= i2; break;
+ case '~': i1 = ~i1; break;
+ case '!': i1 = !i1; break;
+ case '<': if (op[1] == '<') i1 = i1 << i2; else i1 = i1 < i2; break;
+ case '>': if (op[1] == '>') i1 = i1 >> i2; else i1 = i1 > i2; break;
+ case '=': i1 = (i1 == i2); break;
+ }
+
+ // Output and freedom
+ myitoa64(i1, buf);
+ pushstring(buf);
+ GlobalFree(o1); GlobalFree(op);
+} PLUGINFUNCTIONEND
+
+__int64 GetIntFromString(char **p)
+{
+ char buffer[128], *b = buffer;
+ (*p)++; // First character should be skipped
+ while (((**p >= 'a') && (**p <= 'f')) || ((**p >= 'A') && (**p <= 'F')) || ((**p >= '0') && (**p <= '9')) || (**p == 'X') || (**p == '-') || (**p == 'x') || (**p == '|')) *(b++) = *((*p)++);
+ *b = 0;
+ (*p)--; // We should point at last digit
+ return myatoi(buffer);
+}
+
+#ifndef __GNUC__
+
+SystemProc *PrepareProc(BOOL NeedForCall)
+{
+ int SectionType = PST_PROC, // First section is always proc spec
+ ProcType = PT_NOTHING, // Default proc spec
+ ChangesDone = 0,
+ ParamIndex = 0,
+ temp = 0, temp2, temp3, temp4;
+ BOOL param_defined = FALSE;
+ SystemProc *proc = NULL;
+ char *ibuf, *ib, *sbuf, *cbuf, *cb;
+
+ // Retrieve proc specs
+ cb = (cbuf = AllocString()); // Current String buffer
+ sbuf = AllocString(); // Safe String buffer
+ ib = ibuf = popstring(); // Input string
+
+ // Parse the string
+ while (SectionType != -1)
+ {
+ // Check for Section Change
+ BOOL changed = TRUE;
+ ChangesDone = SectionType;
+
+ if (SectionType != PST_PROC && proc == NULL)
+ // no proc after PST_PROC is done means something is wrong with
+ // the call syntax and we'll get a crash because everything needs
+ // proc from here on.
+ break;
+
+ switch (*ib)
+ {
+ case 0x0: SectionType = -1; break;
+ case '#': SectionType = PST_PROC; ProcType = PT_NOTHING; break;
+ case '(':
+ SectionType = PST_PARAMS;
+ // fake-real parameter: for COM interfaces first param is Interface Pointer
+ ParamIndex = ((ProcType == PT_VTABLEPROC)?(2):(1));
+ temp3 = temp = 0;
+ param_defined = FALSE;
+ break;
+ case ')': SectionType = PST_RETURN; temp3 = temp = 0; break;
+ case '?': SectionType = PST_OPTIONS; temp = 1; break;
+ default:
+ changed = FALSE;
+ }
+
+ // Check for changes
+ if (changed)
+ {
+ switch (ChangesDone)
+ {
+ case PST_PROC:
+ *cb = 0;
+ // Adopt proc
+ if (proc == NULL)
+ {
+ proc = (SystemProc *) GlobalAlloc(GPTR, sizeof(SystemProc));
+ proc->Options = 0;
+ proc->ParamCount = 0;
+ }
+ // Default parameters
+ *proc->DllName = 0;
+ *proc->ProcName = 0;
+ proc->Dll = NULL;
+ proc->Proc = NULL;
+ proc->ProcType = ProcType;
+ proc->ProcResult = PR_OK;
+
+ // Section changed and previos section was Proc
+ switch (ProcType)
+ {
+ case PT_NOTHING:
+ // Is it previous proc or just unknown proc?
+ if (cb != cbuf)
+ {
+ // Previous proc (for clear up)
+ SystemProc *pr = NULL;
+
+ if (proc != NULL) GlobalFree(proc);
+ // Get already defined proc
+ proc = (SystemProc *) myatoi(cbuf);
+ if (!proc) break;
+
+ // Find the last clone at proc queue
+ while (proc && (proc->Clone != NULL)) proc = (pr = proc)->Clone;
+
+ // Clear parents record for child callback proc
+ if (pr != NULL) pr->Clone = NULL;
+
+ // Never Redefine?
+ if ((proc->Options & POPT_NEVERREDEF) != 0)
+ {
+ // Create new proc as copy
+ proc = GlobalCopy(proc);
+ // NeverRedef options is never inherited
+ proc->Options &= (~POPT_NEVERREDEF) & (~POPT_PERMANENT);
+ } else proc->Options |= POPT_PERMANENT; // Proc is old -> permanent
+ }
+ break;
+ case PT_PROC:
+ case PT_VTABLEPROC:
+ lstrcpy(proc->DllName, sbuf);
+ case PT_STRUCT:
+ lstrcpy(proc->ProcName, cbuf);
+ break;
+ }
+ break;
+ case PST_PARAMS:
+ if (param_defined)
+ proc->ParamCount = ParamIndex;
+ else
+ // not simply zero because of vtable calls
+ proc->ParamCount = ParamIndex - 1;
+ case PST_RETURN:
+ case PST_OPTIONS:
+ break;
+ }
+ ib++;
+ cb = cbuf;
+ continue;
+ }
+
+ // Parse the section
+ ChangesDone = PCD_NONE;
+ switch (SectionType)
+ {
+ // Proc sections parser
+ case PST_PROC:
+ switch (*ib)
+ {
+ case ':':
+ case '-':
+ // Is it '::'
+ if ((*(ib) == '-') && (*(ib+1) == '>'))
+ {
+ ProcType = PT_VTABLEPROC;
+ } else
+ {
+ if ((*(ib+1) != ':') || (*(ib) == '-')) break;
+ ProcType = PT_PROC;
+ }
+ ib++; // Skip next ':'
+
+ if (cb > cbuf)
+ {
+ *cb = 0;
+ lstrcpy(sbuf, cbuf);
+ } else *sbuf = 0; // No dll - system proc
+
+ // Ok
+ ChangesDone = PCD_DONE;
+ break;
+ case '*':
+ // Structure defenition
+ ProcType = PT_STRUCT;
+ ChangesDone = PCD_DONE;
+ break;
+ }
+ break;
+
+ // Params and return sections parser
+ case PST_RETURN:
+ ParamIndex = 0; // Uses the same logic as PST_PARAMS section
+ case PST_PARAMS:
+ temp2 = -1; temp4 = 0; // Our type placeholder
+ switch (*ib)
+ {
+ case ' ':
+ break;
+ case '_': // No param cutting specifier
+ if (proc->ParamCount > ParamIndex) ParamIndex = proc->ParamCount;
+ temp3 = temp = 0; // Clear parameter options
+ if (proc->ParamCount != ((ProcType == PT_VTABLEPROC) ? 1 : 0))
+ {
+ // only define params if the last count wasn't zero
+ // this prevents errornous param count for:
+ // 'user32::CloseClipboard()(_)'
+ // for vtable calls, param count should not be one
+ param_defined = TRUE;
+ }
+ break;
+ case ',': // Next param
+ temp3 = temp = 0; // Clear parameter options
+ ParamIndex++;
+ param_defined = TRUE;
+ break;
+ case '&':
+ temp = 1; break; // Special parameter option
+ case '*':
+ temp = -1; break; // Pointer parameter option
+
+ // Types
+ case 'v':
+ case 'V': temp2 = PAT_VOID; break;
+ case 'i':
+ case 'I': temp2 = PAT_INT; break;
+ case 'l':
+ case 'L': temp2 = PAT_LONG; break;
+ case 't':
+ case 'T': temp2 = PAT_STRING; break;
+ case 'g':
+ case 'G': temp2 = PAT_GUID; break;
+ case 'w':
+ case 'W': temp2 = PAT_WSTRING; break;
+ case 'k':
+ case 'K': temp2 = PAT_CALLBACK; break;
+
+ // Input output specifiers
+ case '.': temp3++; break; // skip specifier
+
+ case 'R':
+ temp4 = ((int) GetIntFromString(&ib))+1;
+ if (temp4 < 11) temp4 += 10;
+ break;
+ case 'r': temp4 = ((int) GetIntFromString(&ib))+1; break; // Register
+
+ case '-':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ // Numeric inline
+ if (temp3 == 0)
+ {
+ ib--;
+ // It's stupid, I know, but I'm too laze to do another thing
+ myitoa64(GetIntFromString(&(ib)),(char *)(temp4 = (int) AllocString()));
+ }
+ break;
+
+ case '\"': case '\'': case '`':
+ // Character inline
+ {
+ char start = *ib;
+ cb = cbuf;
+ // copy inline
+ while (!((*(++ib) == start) && (*(ib+1) != start)) && (*ib))
+ {
+ if ((*ib) == start) ++ib;
+ *(cb++) = *(ib);
+ }
+ // finish and save
+ *cb = 0;
+ temp4 = (int) AllocStr(cbuf);
+ }
+ break;
+
+ case 's':
+ case 'S': temp4 = -1; break; // Stack
+ case 'c':
+ case 'C': temp4 = INST_CMDLINE+1; break;
+ case 'd':
+ case 'D': temp4 = INST_INSTDIR+1; break;
+ case 'o':
+ case 'O': temp4 = INST_OUTDIR+1; break;
+ case 'e':
+ case 'E': temp4 = INST_EXEDIR+1; break;
+ case 'a':
+ case 'A': temp4 = INST_LANG+1; break;
+ }
+
+ // Param type changed?
+ if (temp2 != -1)
+ {
+ param_defined = TRUE;
+ proc->Params[ParamIndex].Type = temp2;
+ proc->Params[ParamIndex].Size = // If pointer, then 1, else by type
+ (temp == -1)?(1):((ParamSizeByType[temp2]>0)?(ParamSizeByType[temp2]):(1));
+ // Get the parameter real special option value
+ if (temp == 1) temp = ((int) GetIntFromString(&ib)) + 1;
+ proc->Params[ParamIndex].Option = temp;
+ proc->Params[ParamIndex].Value = 0;
+ proc->Params[ParamIndex].Input = IOT_NONE;
+ proc->Params[ParamIndex].Output = IOT_NONE;
+ }
+
+ // Param source/dest changed?
+ if (temp4 != 0)
+ {
+ param_defined = TRUE;
+ if (temp3 == 0)
+ {
+ // it may contain previous inline input
+ if (!((proc->Params[ParamIndex].Input > -1) && (proc->Params[ParamIndex].Input <= __INST_LAST)))
+ GlobalFree((HANDLE) proc->Params[ParamIndex].Input);
+ proc->Params[ParamIndex].Input = temp4;
+ }
+ if (temp3 == 1)
+ proc->Params[ParamIndex].Output = temp4;
+ // Next parameter is output or something else
+ temp3++;
+ }
+
+ ChangesDone = PCD_DONE;
+ break;
+
+ // Options sections parser
+ case PST_OPTIONS:
+ temp2 = 0;
+ switch (*ib)
+ {
+ case ' ':
+ break;
+ case '!': temp = -temp; break;
+ case 'c':
+ temp2 = POPT_CDECL;
+ break;
+ case 'r':
+ temp2 = POPT_ALWRETURN;
+ break;
+ case 'n':
+ temp2 = POPT_NEVERREDEF;
+ break;
+ case 's':
+ temp2 = POPT_GENSTACK;
+ break;
+ case 'e':
+ temp2 = POPT_ERROR;
+ break;
+ case 'u':
+ temp2 = POPT_UNLOAD;
+ break;
+ }
+
+ // New Options
+ if (temp2 != 0)
+ {
+ if (temp == 1) proc->Options |= temp2;
+ else proc->Options &= ~temp2;
+ // Back to default (turn on nothing) state
+ temp = 1; temp2 = 0;
+ }
+
+ ChangesDone = PCD_DONE;
+ break;
+ }
+
+ // Nothing done, just copy char to buffer
+ if (ChangesDone == PCD_NONE) *(cb++) = *(ib);
+ // Something done, buffer = ""
+ else cb = cbuf;
+
+ // Increase input pointer
+ ib++;
+ }
+
+ GlobalFree(ibuf);
+ GlobalFree(cbuf);
+ GlobalFree(sbuf);
+
+ // Ok, the final step: check proc for existance
+ if (proc != NULL && proc->Proc == NULL)
+ {
+ switch (proc->ProcType)
+ {
+ case PT_NOTHING: break;
+ case PT_VTABLEPROC:
+ {
+ // Use direct system proc address
+ int addr;
+
+ proc->Dll = (HANDLE) myatoi(proc->DllName);
+
+ if (proc->Dll == 0)
+ {
+ proc->ProcResult = PR_ERROR;
+ break;
+ }
+
+ addr = (int) proc->Dll;
+
+ // fake-real parameter: for COM interfaces first param is Interface Pointer
+ proc->Params[1].Output = IOT_NONE;
+ proc->Params[1].Input = (int) AllocStr(proc->DllName);
+ proc->Params[1].Size = 1;
+ proc->Params[1].Type = PAT_INT;
+ proc->Params[1].Option = 0;
+
+ // addr - pointer to interface vtable
+ addr = *((int *)addr);
+ // now addr contains the pointer to first item at VTABLE
+ // add the index of proc
+ addr = addr + (int)(myatoi(proc->ProcName)*4);
+ proc->Proc = *((HANDLE*)addr);
+ }
+ break;
+ case PT_PROC:
+ if (*proc->DllName == 0)
+ {
+ // Use direct system proc address
+ if ((proc->Proc = (HANDLE) myatoi(proc->ProcName)) == 0)
+ proc->ProcResult = PR_ERROR;
+ } else
+ {
+ // Get DLL address
+ if ((proc->Dll = GetModuleHandle(proc->DllName)) == NULL)
+ if ((proc->Dll = LoadLibrary(proc->DllName)) == NULL)
+ {
+ proc->ProcResult = PR_ERROR;
+ break;
+ }
+
+ // Get proc address
+ if ((proc->Proc = GetProcAddress(proc->Dll, proc->ProcName)) == NULL)
+ {
+ // automatic A discover
+ lstrcat(proc->ProcName, "A");
+ if ((proc->Proc = GetProcAddress(proc->Dll, proc->ProcName)) == NULL)
+ proc->ProcResult = PR_ERROR;
+ }
+ }
+ break;
+ case PT_STRUCT:
+ if (*(proc->ProcName) != 0) proc->Proc = (HANDLE) myatoi(proc->ProcName);
+ break;
+ }
+ }
+
+ return proc;
+}
+
+void ParamAllocate(SystemProc *proc)
+{
+ int i;
+
+ for (i = 0; i <= proc->ParamCount; i++)
+ if (((HANDLE) proc->Params[i].Value == NULL) && (proc->Params[i].Option == -1))
+ {
+ proc->Params[i].Value = (int) GlobalAlloc(GPTR, 4*ParamSizeByType[proc->Params[i].Type]);
+ }
+}
+
+void ParamsIn(SystemProc *proc)
+{
+ int i, *place;
+ char *realbuf;
+ LPWSTR wstr;
+
+ i = (proc->ParamCount > 0)?(1):(0);
+ while (TRUE)
+ {
+ ProcParameter *par = &proc->Params[i];
+ // Step 1: retrive value
+ if ((par->Input == IOT_NONE) || (par->Input == IOT_INLINE))
+ realbuf = AllocStr("");
+ else if (par->Input == IOT_STACK) realbuf = popstring();
+ else if ((par->Input > 0) && (par->Input <= __INST_LAST))
+ realbuf = getuservariable(par->Input - 1);
+ else
+ {
+ // Inline input, will be freed as realbuf
+ realbuf = (char*) par->Input;
+ par->Input = IOT_INLINE;
+ }
+
+ // Retreive pointer to place
+ if (par->Option == -1) place = (int*) par->Value;
+ else place = (int*) &(par->Value);
+
+ // by default no blocks are allocated
+ par->allocatedBlock = NULL;
+
+ // Step 2: place it
+ switch (par->Type)
+ {
+ case PAT_VOID:
+ par->Value = 0;
+ break;
+ case PAT_INT:
+ *((int*) place) = (int) myatoi(realbuf);
+ break;
+ case PAT_LONG:
+ *((__int64*) place) = myatoi(realbuf);
+ break;
+ case PAT_STRING:
+/* if (par->Input == IOT_NONE)
+ *((int*) place) = (int) NULL;
+ else*/
+ *((int*) place) = (int) (par->allocatedBlock = AllocStr(realbuf));
+ break;
+ case PAT_WSTRING:
+ case PAT_GUID:
+ wstr = (LPWSTR) (par->allocatedBlock = GlobalAlloc(GPTR, g_stringsize*2));
+ MultiByteToWideChar(CP_ACP, 0, realbuf, g_stringsize, wstr, g_stringsize);
+ if (par->Type == PAT_GUID)
+ {
+ *((HGLOBAL*)place) = (par->allocatedBlock = GlobalAlloc(GPTR, 16));
+ CLSIDFromString(wstr, *((LPCLSID*)place));
+ GlobalFree((HGLOBAL) wstr);
+ } else
+ *((LPWSTR*)place) = wstr;
+ break;
+ case PAT_CALLBACK:
+ // Generate new or use old callback
+ if (lstrlen(realbuf) > 0)
+ par->Value = (int) CreateCallback((SystemProc*) myatoi(realbuf));
+ break;
+ }
+ GlobalFree(realbuf);
+
+#ifdef SYSTEM_LOG_DEBUG
+ {
+ char buf[1024];
+ wsprintf(buf, "\t\t\tParam In %d: type %d value 0x%08X value2 0x%08X\n", i,
+ par->Type, par->Value, par->_value);
+ SYSTEM_LOG_ADD(buf);
+ }
+#endif
+
+ if (i == 0) break;
+ if (i == proc->ParamCount) i = 0;
+ else i++;
+ }
+}
+
+void ParamsDeAllocate(SystemProc *proc)
+{
+ int i;
+
+ for (i = proc->ParamCount; i >= 0; i--)
+ if (((HANDLE) proc->Params[i].Value != NULL) && (proc->Params[i].Option == -1))
+ {
+ GlobalFree((HANDLE) (proc->Params[i].Value));
+ proc->Params[i].Value = (int) NULL;
+ }
+}
+
+void ParamsOut(SystemProc *proc)
+{
+ int i, *place;
+ char *realbuf;
+ LPWSTR wstr;
+
+ i = proc->ParamCount;
+ do
+ {
+ // Retreive pointer to place
+ if (proc->Params[i].Option == -1) place = (int*) proc->Params[i].Value;
+ else place = (int*) &(proc->Params[i].Value);
+
+ realbuf = AllocString();
+
+ // Step 1: retrive value
+ switch (proc->Params[i].Type)
+ {
+ case PAT_VOID:
+ lstrcpy(realbuf,"");
+ break;
+ case PAT_INT:
+ wsprintf(realbuf, "%d", *((int*) place));
+ break;
+ case PAT_LONG:
+ myitoa64(*((__int64*) place), realbuf);
+ break;
+ case PAT_STRING:
+ {
+ int num = lstrlen(*((char**) place));
+ if (num >= g_stringsize) num = g_stringsize-1;
+ lstrcpyn(realbuf,*((char**) place), num+1);
+ realbuf[num] = 0;
+ }
+ break;
+ case PAT_GUID:
+ wstr = (LPWSTR) GlobalAlloc(GPTR, g_stringsize*2);
+ StringFromGUID2(*((REFGUID*)place), wstr, g_stringsize*2);
+ WideCharToMultiByte(CP_ACP, 0, wstr, g_stringsize, realbuf, g_stringsize, NULL, NULL);
+ GlobalFree((HGLOBAL)wstr);
+ break;
+ case PAT_WSTRING:
+ wstr = *((LPWSTR*)place);
+ WideCharToMultiByte(CP_ACP, 0, wstr, g_stringsize, realbuf, g_stringsize, NULL, NULL);
+ break;
+ case PAT_CALLBACK:
+ wsprintf(realbuf, "%d", proc->Params[i].Value);
+ break;
+ }
+
+ // memory cleanup
+ if ((proc->Params[i].allocatedBlock != NULL) && ((proc->ProcType != PT_STRUCT)
+ || (proc->Params[i].Option > 0)))
+ GlobalFree(proc->Params[i].allocatedBlock);
+
+ // Step 2: place it
+ if (proc->Params[i].Output == IOT_NONE);
+ else if (proc->Params[i].Output == IOT_STACK) pushstring(realbuf);
+ else if (proc->Params[i].Output > 0) setuservariable(proc->Params[i].Output - 1, realbuf);
+
+ GlobalFree(realbuf);
+
+ i--;
+ }
+ while (i >= 0);
+}
+
+void _alloca_probe();
+
+SystemProc __declspec(naked) *CallProc(SystemProc *proc)
+{
+ int z3;
+
+ _asm
+ {
+ // Save stack
+ push ebp
+ mov ebp, esp
+ // Stack space for local variables
+ sub esp, __LOCAL_SIZE
+ // Save all usable registers to free our hands
+ push ebx
+ push edi
+ push esi
+ }
+
+ SYSTEM_LOG_ADD("\t\tCall:\n");
+ SYSTEM_EVENT("\t\t\tBefore call ")
+
+ if (CallbackIndex && (!(proc->Options & POPT_GENSTACK)))
+ {
+ _asm
+ {
+ push ebp
+ // Save previous stack location
+ mov LastStackReal, esp
+ }
+
+ if (LastStackPlace == 0)
+ {
+ _asm
+ {
+ // Create new stack
+ mov eax, NEW_STACK_SIZE
+ call _alloca_probe
+ mov LastStackPlace, esp
+ }
+ } else
+ _asm
+ {
+ // Move stack pointer
+ mov esp, LastStackPlace
+ }
+ }
+
+ // Push arguments to stack
+ for (z1 = proc->ParamCount; z1 > 0; z1--)
+ {
+ // Long types
+ if (proc->Params[z1].Size == 2)
+ {
+ z2 = proc->Params[z1]._value;
+ _asm push z2;
+ }
+ // Default
+ z2 = proc->Params[z1].Value;
+ _asm push z2;
+ }
+
+ // Call the proc and save return
+ z1 = (int) proc->Proc;
+
+ // Save proc
+ proc->Clone = (SystemProc *) LastProc;
+ _asm
+ {
+ mov eax, proc
+ mov LastProc, eax
+ }
+ //LastProc = proc;
+
+ SYSTEM_EVENT("\n\t\t\tNear call ")
+ SYSTEM_LOG_POST;
+
+ // workaround for bug #1535007
+ // http://sf.net/tracker/index.php?func=detail&aid=1535007&group_id=22049&atid=373085
+ //
+ // If a function returns short and doesn't clear eax in the process,
+ // it will only set 2 bytes of eax, and the other 2 bytes remain
+ // "random". In this case, they'll be part of the proc pointer.
+ //
+ // To avoid this, eax is cleared before the function is called. This
+ // makes sure the value eax will contain is only what the function
+ // actually sets.
+ _asm xor eax, eax
+
+ _asm
+ {
+ // Call
+ call z1
+ // Return
+ mov z1, eax
+ mov z2, edx
+ }
+
+ SYSTEM_LOG_ADD("Back from ");
+ SYSTEM_LOG_ADD(LastProc->ProcName);
+ SYSTEM_EVENT("\n\t\t\tShort-After call ")
+
+ if ((CallbackIndex) && (!(LastProc->Options & POPT_GENSTACK)))
+ {
+ _asm
+ {
+ // Restore real stack location
+ mov LastStackPlace, esp
+ mov esp, LastStackReal
+ pop ebp
+ }
+ }
+
+ // Restore proc
+ _asm
+ {
+ mov eax, LastProc
+ mov proc, eax
+ }
+// proc = LastProc;
+ LastProc = proc->Clone;
+
+ // In case of cdecl convention we should clear stack
+ if ((proc->Options & POPT_CDECL) != 0)
+ {
+ if ((CallbackIndex > 0) && ((proc->Options & POPT_GENSTACK) == 0))
+ {
+ // In case of temporary stack
+ for (z3 = 1; z3 <= proc->ParamCount; z3++)
+ LastStackPlace += 4*proc->Params[z3].Size;
+ } else
+ {
+ // in case of real stack
+ for (z3 = 1; z3 <= proc->ParamCount; z3++)
+ {
+ if (proc->Params[z3].Size == 2)
+ _asm pop edx;
+ _asm pop edx;
+ }
+ }
+ }
+
+ // In case of cleared call-proc-queue -> clear allocated stack place (more flexible)
+ if (LastProc == NULL) LastStackPlace = (int) NULL;
+
+ // Save return
+ proc->Params[0].Value = z1;
+// if (proc->Params[0].Size == 2)
+ proc->Params[0]._value = z2;
+ // Proc result: OK
+ proc->ProcResult = PR_OK;
+
+ // In case of POPT_ERROR -> GetLastError
+ if ((proc->Options & POPT_ERROR) != 0)
+ {
+ LastError = GetLastError();
+ }
+
+ SYSTEM_EVENT("\n\t\t\tAfter call ")
+#ifdef SYSTEM_LOG_DEBUG
+ {
+ char buf[1024];
+ wsprintf(buf, "\n\t\t\tReturn 0x%08X 0x%08X", z1, z2);
+ SYSTEM_LOG_ADD(buf);
+ }
+#endif
+ SYSTEM_LOG_POST;
+
+ _asm
+ {
+ // Return
+ mov eax, proc
+ // Restore registers
+ pop esi
+ pop edi
+ pop ebx
+ // Restore stack pointer
+ mov esp, ebp
+ pop ebp
+ // Return
+ ret
+ }
+}
+
+SystemProc __declspec(naked) *RealCallBack()
+{
+ SystemProc *proc;
+
+ _asm
+ {
+ // Save stack
+ push ebp
+ mov ebp, esp
+ // Stack space for local variables
+ sub esp, __LOCAL_SIZE
+ // Save all usable registers to free our hands
+ push ebx
+ push edi
+ push esi
+
+ // Arguments pointer
+ mov z2, esp // 1-st arg - 4*4 (pushes) - 4 (return) - __LOCAL_SIZE
+ add z2, __LOCAL_SIZE
+ add z2, 5*4
+ // Our callback proc
+ mov proc, eax
+ }
+
+ SYSTEM_LOG_ADD("Called callback from ");
+ SYSTEM_LOG_ADD(LastProc->ProcName);
+ SYSTEM_EVENT("\n\t\t\tShort-After call ")
+ SYSTEM_LOG_POST;
+
+ // Find last unused clone
+ while ((proc->Clone != NULL)) proc = proc->Clone;
+ // 2. Create new clone
+ proc = (proc->Clone = GlobalCopy(proc));
+ // 3. Set clone option
+ proc->Options |= POPT_CLONE;
+
+ // Read arguments
+ proc->ArgsSize = 0;
+ for (z1 = 1; z1 <= proc->ParamCount; z1++)
+ {
+ // Default
+ proc->Params[z1].Value = *(((int*)z2)++);
+ proc->ArgsSize += 4;
+ // Long only
+ if (proc->Params[z1].Size == 2)
+ {
+ proc->Params[z1]._value = *(((int*)z2)++);
+ proc->ArgsSize += 4;
+ }
+ }
+ proc->ProcResult = PR_CALLBACK;
+
+ _asm
+ {
+ // Return
+ mov eax, proc
+
+ // Save temporary stack info
+ push ebp
+// push LastStackPlace
+ mov LastStackPlace, esp
+ // Restore real stack
+ mov esp, LastStackReal
+ pop ebp
+// pop LastStackReal
+ }
+
+ _asm
+ {
+ // Fake return from System::Call
+
+ // Restore registers
+ pop esi
+ pop edi
+ pop ebx
+ // Restore stack pointer
+ mov esp, ebp
+ pop ebp
+ // Return
+ ret
+ }
+}
+
+
+SystemProc __declspec(naked) *CallBack(SystemProc *proc)
+{
+ _asm
+ {
+ // Save stack
+ push ebp
+ mov ebp, esp
+ // Stack space for local variables
+ sub esp, __LOCAL_SIZE
+ // Save all usable registers to free our hands
+ push ebx
+ push edi
+ push esi
+ }
+
+ // MessageBox(NULL, "cool1", "Cool", MB_OK);
+
+ SYSTEM_LOG_ADD("\t\tReturn from callback:\n");
+ SYSTEM_EVENT("\t\t\tBefore call-back ");
+ SYSTEM_LOG_POST;
+
+ //z1 = proc->Params[0].Value;
+ //z2 = proc->Params[0]._value;
+ //z1 = &(proc->Params[0].Value);
+ _asm
+ {
+ mov eax, proc
+ add eax, SYSTEM_ZERO_PARAM_VALUE_OFFSET
+ push [eax]
+ push [eax+4]
+ }
+
+ // Adjust return statement
+ if ((proc->Options & POPT_CDECL) == 0) retexpr[1] = proc->ArgsSize;
+ else retexpr[1] = 0x0;
+
+ // Right return statement address
+ retaddr = (HANDLE) retexpr;
+
+ // Remove unneeded callback proc
+ GlobalFree((HANDLE) proc);
+
+// MessageBox(NULL, "cool2", "Cool", MB_OK);
+
+ _asm
+ {
+ // Prepare return
+ // callback proc result
+ pop edx
+ pop eax
+
+ // Restore temporary stack and return
+
+ // Save real stack info
+ // Save previous stack location
+// push LastStackReal
+ push ebp
+ mov LastStackReal, esp
+ // Move stack pointer
+ mov esp, LastStackPlace
+// pop LastStackPlace
+ pop ebp
+ }
+
+#ifdef SYSTEM_LOG_DEBUG
+ _asm
+ {
+ push eax
+ push edx
+ }
+ SYSTEM_EVENT("\n\t\t\tSh-Before call-back");
+ SYSTEM_LOG_POST;
+ _asm
+ {
+ // callback proc result
+ pop edx
+ pop eax
+ }
+#endif
+
+ // Fake return from Callback
+ _asm {
+ // Restore registers
+ pop esi
+ pop edi
+ pop ebx
+ // Restore stack pointer
+ mov esp, ebp
+ pop ebp
+ // Return
+ jmp retaddr
+ }
+}
+
+HANDLE CreateCallback(SystemProc *cbproc)
+{
+ char *mem;
+
+ if (cbproc->Proc == NULL)
+ {
+ // Set callback index
+ cbproc->CallbackIndex = ++(CallbackIndex);
+ cbproc->Options |= POPT_PERMANENT;
+
+ mem = (char *) (cbproc->Proc = VirtualAlloc(NULL, 10, MEM_COMMIT, PAGE_EXECUTE_READWRITE));
+ *(mem++) = (char) 0xB8; // Mov eax, const
+ *(((int *)mem)++) = (int) cbproc;
+ *(mem++) = (char) 0xe9; // Jmp relative
+ *((int *)mem) = (int) RealCallBack;
+ *((int *)mem) -= ((int) mem) + 4;
+ }
+
+ // Return proc address
+ return cbproc->Proc;
+}
+
+void CallStruct(SystemProc *proc)
+{
+ BOOL ssflag;
+ int i, structsize = 0, size = 0;
+ char *st, *ptr;
+
+ SYSTEM_LOG_ADD("\t\tStruct...");
+
+ // Calculate the structure size
+ for (i = 1; i <= proc->ParamCount; i++)
+ if (proc->Params[i].Option < 1)
+ structsize += proc->Params[i].Size * 4;
+ else
+ structsize += proc->Params[i].Option-1;
+
+ // Struct exists?
+ if (proc->Proc == NULL)
+ // No. Allocate struct memory
+ proc->Proc = (HANDLE) GlobalAlloc(GPTR, structsize);
+ else // In case of zero size defined structure use mapped size
+ if (structsize == 0) structsize = (int) GlobalSize((HANDLE) proc->Proc);
+
+ // Pointer to current data
+ st = (char*) proc->Proc;
+
+ for (i = 1; i <= proc->ParamCount; i++)
+ {
+ ssflag = FALSE;
+
+ // Normal or special block?
+ if (proc->Params[i].Option < 1)
+ {
+ // Normal
+ size = proc->Params[i].Size*4;
+ ptr = (char*) &(proc->Params[i].Value);
+ }
+ else
+ {
+ int intmask[4] = {0xFFFFFFFF, 0x000000FF, 0x0000FFFF, 0x00FFFFFF};
+
+ // Special
+ size = proc->Params[i].Option-1;
+
+ switch (proc->Params[i].Type)
+ {
+ case PAT_VOID: ptr = NULL; break;
+ case PAT_LONG:
+ // real structure size
+ proc->Params[i].Value = structsize;
+ proc->Params[i]._value = 0;
+ ssflag = TRUE;
+ case PAT_INT:
+ // clear unused value bits
+ proc->Params[i].Value &= intmask[((size >= 0) && (size < 4))?(size):(0)];
+ // pointer
+ ptr = (char*) &(proc->Params[i].Value);
+ break;
+
+ case PAT_STRING:
+ case PAT_GUID:
+ case PAT_WSTRING:
+ ptr = (char*) proc->Params[i].Value; break;
+ }
+ }
+
+ // Process them!
+ if (ptr != NULL)
+ {
+ // Input
+ if ((proc->Params[i].Input != IOT_NONE) || (ssflag))
+ copymem(st, ptr, size);
+
+ // Output
+ if (proc->Params[i].Output != IOT_NONE)
+ copymem(ptr, st, size);
+ }
+
+ // Skip to next data block
+ st += size;
+ }
+
+ SYSTEM_LOG_POST;
+
+ // Proc virtual return - pointer to memory struct
+ proc->Params[0].Value = (int) proc->Proc;
+}
+
+#endif /* __GNUC__ */
+
+BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance=hInst;
+
+ if (ul_reason_for_call == DLL_PROCESS_ATTACH)
+ {
+ // change the protection of return command
+ VirtualProtect(&retexpr, sizeof(retexpr), PAGE_EXECUTE_READWRITE, &LastStackPlace);
+
+ // initialize some variables
+ LastStackPlace = 0;
+ LastStackReal = 0;
+ LastError = 0;
+ LastProc = NULL;
+ CallbackIndex = 0;
+ retexpr[0] = (char) 0xC2;
+ retexpr[2] = 0x00;
+ }
+
+ return TRUE;
+}
+
diff --git a/Contrib/System/Source/System.h b/Contrib/System/Source/System.h
index 28a1752..ec34e31 100755
--- a/Contrib/System/Source/System.h
+++ b/Contrib/System/Source/System.h
@@ -1,109 +1,109 @@
-#ifndef ___SYSTEM__H___
-#define ___SYSTEM__H___
-
-// The following ifdef block is the standard way of creating macros which make exporting
-// from a DLL simpler. All files within this DLL are compiled with the SYSTEM_EXPORTS
-// symbol defined on the command line. this symbol should not be defined on any project
-// that uses this DLL. This way any other project whose source files include this file see
-// SYSTEM_API functions as being imported from a DLL, whereas this DLL sees symbols
-// defined with this macro as being exported.
-
-#ifdef SYSTEM_EXPORTS
-#define SYSTEM_API __declspec(dllexport)
-#else
-#define SYSTEM_API __declspec(dllimport)
-#endif
-
-#define NEW_STACK_SIZE 256*256
-
-// Proc types:
-#define PT_NOTHING 0
-#define PT_PROC 1
-#define PT_STRUCT 2
-#define PT_VTABLEPROC 3
-
-// Proc results:
-#define PR_OK 0
-#define PR_ERROR -1
-#define PR_CALLBACK 1
-
-// Real world argument types
-#define PAT_VOID 0
-#define PAT_INT 1
-#define PAT_LONG 2
-#define PAT_STRING 3
-#define PAT_WSTRING 4
-#define PAT_GUID 5
-#define PAT_CALLBACK 6
-
-// Input/Output Source/Destination
-#define IOT_NONE 0
-#define IOT_STACK -1
-#define IOT_REG 1
-#define IOT_INLINE (__INST_LAST+1) // should replace pointer to inline input
-// #define INLINE_INPUT -> any other value, will contain pointer to input string
-
-// Options
-#define POPT_CDECL 0x1 // (Option & 0x1) == 0x1 -> cdecl, otherwise stdcall
-#define POPT_PERMANENT 0x2 // Permanent proc, will not be destroyed after calling
-#define POPT_ALWRETURN 0x4 // Always return
-#define POPT_NEVERREDEF 0x8 // Never redefine
-#define POPT_GENSTACK 0x10 // Use general stack (non temporary for callback)
-#define POPT_ERROR 0x20 // Call GetLastError after proc and push it to stack
-#define POPT_UNLOAD 0x40 // unload dll after call
-#define POPT_CLONE 0x80 // This is clone callback
-
-// Our single proc parameter
-typedef struct
-{
- int Type;
- int Option; // -1 -> Pointer, 1-... -> Special+1
-
- // if you'll change ProcParameter or SystemProc structure - update this value
-#define SYSTEM_ZERO_PARAM_VALUE_OFFSET 0x820
-
- int Value; // it can hold any 4 byte value
- int _value; // value buffer for structures > 4 bytes (I hope 8 bytes will be enough)
- int Size; // Value real size (should be either 1 or 2 (the number of pushes))
- int Input;
- int Output;
- HGLOBAL allocatedBlock; // block allocated for passing string, wstring or guid param
-} ProcParameter;
-
-// Our single proc (Since the user will free proc with GlobalFree,
-// I've declared all variables as statics)
-typedef struct tag_SystemProc SystemProc;
-struct tag_SystemProc
-{
- int ProcType;
- int ProcResult;
- char DllName[1024];
- char ProcName[1024];
- HANDLE Dll;
- HANDLE Proc;
- int Options;
- int ParamCount;
- // if you'll change ProcParameter or SystemProc structure - update SYSTEM_ZERO_PARAM_VALUE_OFFSET value
- ProcParameter Params[100]; // I hope nobody will use more than 100 params
-
- // Callback specific
- int CallbackIndex;
- int ArgsSize;
- // Clone of current element (used for multi-level callbacks)
- SystemProc *Clone;
-};
-
-extern const int ParamSizeByType[]; // Size of every parameter type (*4 bytes)
-
-extern HANDLE CreateCallback(SystemProc *cbproc);
-extern SystemProc *PrepareProc(BOOL NeedForCall);
-extern void ParamAllocate(SystemProc *proc);
-extern void ParamsDeAllocate(SystemProc *proc);
-extern void ParamsIn(SystemProc *proc);
-extern void ParamsOut(SystemProc *proc);
-extern SystemProc *CallProc(SystemProc *proc);
-extern SystemProc *CallBack(SystemProc *proc);
-extern SystemProc *RealCallBack();
-extern void CallStruct(SystemProc *proc);
-
-#endif
+#ifndef ___SYSTEM__H___
+#define ___SYSTEM__H___
+
+// The following ifdef block is the standard way of creating macros which make exporting
+// from a DLL simpler. All files within this DLL are compiled with the SYSTEM_EXPORTS
+// symbol defined on the command line. this symbol should not be defined on any project
+// that uses this DLL. This way any other project whose source files include this file see
+// SYSTEM_API functions as being imported from a DLL, whereas this DLL sees symbols
+// defined with this macro as being exported.
+
+#ifdef SYSTEM_EXPORTS
+#define SYSTEM_API __declspec(dllexport)
+#else
+#define SYSTEM_API __declspec(dllimport)
+#endif
+
+#define NEW_STACK_SIZE 256*256
+
+// Proc types:
+#define PT_NOTHING 0
+#define PT_PROC 1
+#define PT_STRUCT 2
+#define PT_VTABLEPROC 3
+
+// Proc results:
+#define PR_OK 0
+#define PR_ERROR -1
+#define PR_CALLBACK 1
+
+// Real world argument types
+#define PAT_VOID 0
+#define PAT_INT 1
+#define PAT_LONG 2
+#define PAT_STRING 3
+#define PAT_WSTRING 4
+#define PAT_GUID 5
+#define PAT_CALLBACK 6
+
+// Input/Output Source/Destination
+#define IOT_NONE 0
+#define IOT_STACK -1
+#define IOT_REG 1
+#define IOT_INLINE (__INST_LAST+1) // should replace pointer to inline input
+// #define INLINE_INPUT -> any other value, will contain pointer to input string
+
+// Options
+#define POPT_CDECL 0x1 // (Option & 0x1) == 0x1 -> cdecl, otherwise stdcall
+#define POPT_PERMANENT 0x2 // Permanent proc, will not be destroyed after calling
+#define POPT_ALWRETURN 0x4 // Always return
+#define POPT_NEVERREDEF 0x8 // Never redefine
+#define POPT_GENSTACK 0x10 // Use general stack (non temporary for callback)
+#define POPT_ERROR 0x20 // Call GetLastError after proc and push it to stack
+#define POPT_UNLOAD 0x40 // unload dll after call
+#define POPT_CLONE 0x80 // This is clone callback
+
+// Our single proc parameter
+typedef struct
+{
+ int Type;
+ int Option; // -1 -> Pointer, 1-... -> Special+1
+
+ // if you'll change ProcParameter or SystemProc structure - update this value
+#define SYSTEM_ZERO_PARAM_VALUE_OFFSET 0x820
+
+ int Value; // it can hold any 4 byte value
+ int _value; // value buffer for structures > 4 bytes (I hope 8 bytes will be enough)
+ int Size; // Value real size (should be either 1 or 2 (the number of pushes))
+ int Input;
+ int Output;
+ HGLOBAL allocatedBlock; // block allocated for passing string, wstring or guid param
+} ProcParameter;
+
+// Our single proc (Since the user will free proc with GlobalFree,
+// I've declared all variables as statics)
+typedef struct tag_SystemProc SystemProc;
+struct tag_SystemProc
+{
+ int ProcType;
+ int ProcResult;
+ char DllName[1024];
+ char ProcName[1024];
+ HANDLE Dll;
+ HANDLE Proc;
+ int Options;
+ int ParamCount;
+ // if you'll change ProcParameter or SystemProc structure - update SYSTEM_ZERO_PARAM_VALUE_OFFSET value
+ ProcParameter Params[100]; // I hope nobody will use more than 100 params
+
+ // Callback specific
+ int CallbackIndex;
+ int ArgsSize;
+ // Clone of current element (used for multi-level callbacks)
+ SystemProc *Clone;
+};
+
+extern const int ParamSizeByType[]; // Size of every parameter type (*4 bytes)
+
+extern HANDLE CreateCallback(SystemProc *cbproc);
+extern SystemProc *PrepareProc(BOOL NeedForCall);
+extern void ParamAllocate(SystemProc *proc);
+extern void ParamsDeAllocate(SystemProc *proc);
+extern void ParamsIn(SystemProc *proc);
+extern void ParamsOut(SystemProc *proc);
+extern SystemProc *CallProc(SystemProc *proc);
+extern SystemProc *CallBack(SystemProc *proc);
+extern SystemProc *RealCallBack();
+extern void CallStruct(SystemProc *proc);
+
+#endif
diff --git a/Contrib/System/Source/stdafx.c b/Contrib/System/Source/stdafx.c
index d9e220d..5c6abfe 100755
--- a/Contrib/System/Source/stdafx.c
+++ b/Contrib/System/Source/stdafx.c
@@ -1,8 +1,8 @@
-// stdafx.cpp : source file that includes just the standard includes
-// AnyDLL.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
+// stdafx.cpp : source file that includes just the standard includes
+// AnyDLL.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/Contrib/System/Source/stdafx.h b/Contrib/System/Source/stdafx.h
index 3dac94d..058fd20 100755
--- a/Contrib/System/Source/stdafx.h
+++ b/Contrib/System/Source/stdafx.h
@@ -1,13 +1,13 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#pragma once
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-// Windows Header Files:
-#include <windows.h>
-
-// TODO: reference additional headers your program requires here
-//#define SYSTEM_LOG_DEBUG
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+// TODO: reference additional headers your program requires here
+//#define SYSTEM_LOG_DEBUG
diff --git a/Contrib/System/SysFunc.nsh b/Contrib/System/SysFunc.nsh
index 9b0dee6..57c2016 100755
--- a/Contrib/System/SysFunc.nsh
+++ b/Contrib/System/SysFunc.nsh
@@ -1,398 +1,398 @@
-; Some useful functions based on System plugin
-;
-; (c) brainsucker, 2002
-; (r) BSForce
-
-; Check for double includes
-!ifndef SysFunc.NSH.Included
-!define SysFunc.NSH.Included
-
-!include "${NSISDIR}\Examples\System\System.nsh"
-
-!verbose 3 ; For WinMessages especially
- !include "WinMessages.nsh"
-!verbose 4
-
-; ================= 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} (i) .r7"
-
- ; Get arrow cursor
- System::Call "${sysLoadCursor} (0, i ${IDC_ARROW}) .R9"
-
- ; Get callback
- System::Get "${sysWNDPROC}"
- Pop $3
-
- ; Create window class
- System::Call "*${stWNDCLASS} (0,r3,0,0,r7,0,R9,0,i 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} (_) i.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} (i 0, i 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
-
-!verbose 4
-
+; Some useful functions based on System plugin
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+; Check for double includes
+!ifndef SysFunc.NSH.Included
+!define SysFunc.NSH.Included
+
+!include "${NSISDIR}\Examples\System\System.nsh"
+
+!verbose 3 ; For WinMessages especially
+ !include "WinMessages.nsh"
+!verbose 4
+
+; ================= 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} (i) .r7"
+
+ ; Get arrow cursor
+ System::Call "${sysLoadCursor} (0, i ${IDC_ARROW}) .R9"
+
+ ; Get callback
+ System::Get "${sysWNDPROC}"
+ Pop $3
+
+ ; Create window class
+ System::Call "*${stWNDCLASS} (0,r3,0,0,r7,0,R9,0,i 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} (_) i.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} (i 0, i 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
+
+!verbose 4
+
!endif \ No newline at end of file
diff --git a/Contrib/System/System.html b/Contrib/System/System.html
index 78626dd..966c1d0 100755
--- a/Contrib/System/System.html
+++ b/Contrib/System/System.html
@@ -1,788 +1,788 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>NSIS System Plug-in</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-</head>
-<body>
-<h1>NSIS System Plug-in</h1>
-<p><i>&copy; brainsucker (Nik Medved), 2002</i></p>
-
-<h2>Table of Contents</h2>
-
-<ul>
-<li><a href="#intro">Introduction</a></li>
-<li>
-<a href="#funcs">Available Functions</a>
-<ul>
-<li><a href="#memfuncs">Memory Related Functions</a></li>
-<li><a href="#callfuncs">Calling Functions</a></li>
-<li><a href="#64bitfuncs">64-bit Functions</a></li>
-</ul>
-</li>
-<li><a href="#faq">FAQ</a></li>
-</ul>
-
-<h2><a name="intro"></a>Introduction</h2>
-
-<p>The System plug-in gives developers the ability to call any exported function from any DLL. For example, you can use it to call <a href="http://msdn.microsoft.com/library/en-us/fileio/base/getlogicaldrivestrings.asp">GetLogicalDriveStrings</a> to get a list of available drives on the user's computer.</p>
-
-<p>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.</p>
-
-<p>Programming knowledge is highly recommended for good understanding of the System plug-in.</p>
-
-<p>The most useful System plug-in functions (Call, Get and Debug) are not available when compiling with GCC. To work around this, either download a MSVC-compiled version or write your own plugin that calls the functions you need.</p>
-
-<h4>Usage Examples From The Wiki</h4>
-
-<ul>
-<li><a href="http://nsis.sourceforge.net/wiki/Get_Local_Time">Get local time</a></li>
-<li><a href="http://nsis.sourceforge.net/wiki/Registering_a_Palm_Com_Conduit">Register conduits with Palm HotSync</a></li>
-<li><a href="http://nsis.sourceforge.net/wiki/Determining_free_memory_using_the_System_plugin">Get free memory</a></li>
-<li><a href="http://nsis.sourceforge.net/wiki/REG_MULTI_SZ_Reader">Read REG_MULTI_SZ</a></li>
-<li><a href="http://nsis.sourceforge.net/wiki/Get_Disk_Volume_Serial_Number">Get disk serial number</a></li>
-<li><i><a href="http://nsis.sourceforge.net/Special:Search?search=System%3A%3ACall">Search all...</a></i></li>
-</ul>
-
-<h2><a name="funcs"></a>Available Functions</h2>
-
-<h3><a name="memfuncs"></a>Memory Related Functions</h3>
-
-<div>
-<ul>
-
-<li>
-<b>Alloc</b> <i>SIZE</i>
-<blockquote>
-<p>Allocates <i>SIZE</i> bytes and returns a memory address on the stack.</p>
-<h4>Usage Example</h4>
-<blockquote><pre>
-System::<b>Alloc</b> 64
-Pop $0
-DetailPrint "64 bytes allocated at $0"
-System::Free $0
-</pre></blockquote>
-</blockquote>
-</li>
-
-<li>
-<b>Copy</b> [/<i>SIZE</i>] <i>DESTINATION</i> <i>SOURCE</i>
-<blockquote>
-<p>Copies <i>SIZE</i> bytes from <i>SOURCE</i> to <i>DESTINATION</i>. If <i>SIZE</i> is not specified, <i>SOURCE</i>'s size will queried using GlobalSize. This means that if you don't allocate <i>SOURCE</i> using System::Alloc, System::Call or GlobalAlloc, you must specify <i>SIZE</i>. If <i>DESTINATION</i> is zero it will be allocated and its address will be pushed on the stack.</p>
-<h4>Usage example</h4>
-<blockquote><pre>
-# allocate a buffer and put 'test string' and an int in it
-System::Call "*(&amp;t1024 'test string', i 5) i .s"
-Pop $0
-# copy to an automatically created buffer
-System::<b>Copy</b> 0 $0
-Pop $1
-# get string and int in $1 buffer
-System::Call "*$1(&amp;t1024 .r2, i .r3)"
-# free buffer
-System::Free $1
-# print result
-DetailPrint $2
-DetailPrint $3
-# copy to our own buffer
-System::Alloc 1028
-Pop $1
-System::<b>Copy</b> $1 $0
-# get string and int in $1 buffer
-System::Call "*$1(&amp;t1024 .r2, i .r3)"
-# free
-System::Free $0
-System::Free $1
-# print result
-DetailPrint $2
-DetailPrint $3
-</pre></blockquote>
-</blockquote>
-
-</li>
-
-<li>
-<b>Free</b> <i>ADDRESS</i>
-<blockquote>
-<p>Frees <i>ADDRESS</i>.</p>
-<h4>Usage Example</h4>
-<blockquote><pre>
-System::Alloc 64
-Pop $0
-DetailPrint "64 bytes allocated at $0"
-System::<b>Free</b> $0
-</pre></blockquote>
-</blockquote>
-</li>
-
-<li>
-<b>Store</b> "<i>OPERATION</i> [<i>OPERATION</i> [<i>OPERATION</i> ...]]"
-<blockquote>
-<p>Performs stack operations. An operation can be pushing or popping a single register from the NSIS stack or pushing or popping all of the registers ($0-$9 and $R0-$R9) from System's private stack. Operations can be separated by any character.</p>
-<h4>Available Operations</h4>
-<ul>
-<li>To push $<i>#</i>, use p<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
-<li>To pop $<i>#</i>, use r<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
-<li>To push $R<i>#</i>, use P<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
-<li>To pop $R<i>#</i>, use R<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
-<li>To push $0-$9 and $R0-$R9 to System's private stack, use s or S.</li>
-<li>To pop $0-$9 and $R0-$R9 from System's private stack, use l or L.</li>
-</ul>
-<p>Note that the System's private stack will be lost when the System plug-in is unloaded from NSIS. If you want to use it, you must keep the System plug-in loaded into NSIS. To do that, use SetPluginUnload or the /NOUNLOAD flag in the NSIS script.</p>
-<h4>Usage Examples</h4>
-<blockquote><pre>
-StrCpy $0 "test"
-System::<b>Store</b> "p0"
-Pop $1
-DetailPrint "$0 = $1"
-</pre></blockquote>
-<blockquote><pre>
-StrCpy $2 "test"
-System::<b>Store</b> "p2 R2"
-DetailPrint "$2 = $R2"
-</pre></blockquote>
-<blockquote><pre>
-StrCpy $3 "test"
-System::<b>Store</b> /NOUNLOAD "s"
-StrCpy $3 "another test"
-System::<b>Store</b> "l"
-DetailPrint $3
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Store</b> "r4" "test"
-DetailPrint $4
-</pre></blockquote>
-</blockquote>
-</li>
-</ul>
-
-</div>
-
-<h3><a name="callfuncs"></a>Calling Functions</h3>
-
-<div>
-
-<ul>
-<li><b>Call</b> <i>PROC</i> [( <i>PARAMS</i> ) [<i>RETURN</i> [? <i>OPTIONS</i>]]]</li>
-<li><b>Get</b> <i>PROC</i> [( <i>PARAMS</i> ) [<i>RETURN</i> [? <i>OPTIONS</i>]]]
-<blockquote>
-<p>Call and get both share a common syntax. As the names suggest, Call calls and Get gets. What does it call or get? It depends on <i>PROC</i>'s value.</p>
-
-<p><i>PARAMS</i> is a list of parameters and what do to with them. You can pass data in the parameters and you can also get data from them. The parameters list is separated by commas. Each parameter is combined of three values: <i>type</i>, <i>source</i> and <i>destination</i>. <i>Type</i> can be an integer, a string, etc. <i>Source</i>, which is the source of the parameter value, can be a NSIS register ($0, $1, $INSTDIR), the NSIS stack, a concrete value (5, "test", etc.) or nothing (null). <i>Destination</i>, which is the destination of the parameter value after the call returns, can be a NSIS register, the NSIS stack or nothing which means no output is required. Either one of <i>source</i> or <i>destination</i> can also be a dot (`.') if it is not needed.</p>
-
-<p><i>RETURN</i> is like a single parameter definition, but <i>source</i> is only used when creating callback functions. Normally <i>source</i> is a dot.</p>
-
-<p><i>OPTIONS</i> is a list of options which control the way System plug-in behaves. Each option can be turned off by prefixing with an exclamation mark. For example: <b>?!e</b>.</p>
-
-<p><i>PARAMS</i>, <i>RETURN</i> and <i>OPTIONS</i> can be repeated many times in one Get/Call line. When repeating, a lot can be omitted, and only what you wish to change can be used. <i>Type</i>, <i>source</i> and/or <i>destination</i> can be omitted for each parameter, even the return value. Options can be added or removed. This allows you to define function prototypes and save on some typing. The <a href="#repeat">last two examples</a> show this.</p>
-
-<p><i>PROC</i> can also be repeated but must be prefixed with a hash sign (`#').</p>
-
-<h4>Possible <i>PROC</i> Values and Meanings</h4>
-
-<blockquote>
-<table>
-<tr>
-<th>Value</th>
-<th>Meaning</th>
-<th>Example</th>
-</tr>
-<tr>
-<th><i>DLL</i>::<i>FUNC</i></th>
-<td><i>FUNC</i> exported from <i>DLL</i></td>
-<td><a href="#func">user32::MessageBox</a></td>
-</tr>
-<tr>
-<th>::<i>ADDR</i></th>
-<td>Function located at <i>ADDR</i></td>
-<td><a href="#funcaddr">see below</a></td>
-</tr>
-<tr>
-<th>*<i>ADDR</i></th>
-<td>Structure located at <i>ADDR</i></td>
-<td><a href="#structaddr">see below</a></td>
-</tr>
-<tr>
-<th>*</th>
-<td>New structure</td>
-<td><a href="#newstruct">see below</a></td>
-</tr>
-<tr>
-<th><i>IPTR</i>-><i>IDX</i></th>
-<td>Member indexed <i>IDX</i> from<br/>interface pointed by <i>IPTR</i></td>
-<td><a href="#com">see below</a></td>
-</tr>
-<tr>
-<th>&lt;nothing&gt;</th>
-<td>New callback function</td>
-<td><a href="#callback">see below</a></td>
-</tr>
-<tr>
-<th><i>PROC</i></th>
-<td><i>PROC</i> returned by Get</td>
-<td><a href="#get">see below</a></td>
-</tr>
-</table>
-</blockquote>
-
-<h4>Available Parameter Types</h4>
-
-<blockquote>
-<table>
-<tr>
-<th>Type</th>
-<th>Meaning</th>
-</tr>
-<tr>
-<th>v</th>
-<td>void (generally for return)</td>
-<td></td>
-</tr>
-<tr>
-<th>i</th>
-<td>int (includes char, byte, short, handles, pointers and so on)</td>
-</tr>
-<tr>
-<th>l</th>
-<td>large integer, int64</td>
-</tr>
-<tr>
-<th>t</th>
-<td>text, string (pointer to first character)</td>
-</tr>
-<tr>
-<th>w</th>
-<td>WCHAR text, Unicode string</td>
-</tr>
-<tr>
-<th>g</th>
-<td>GUID</td>
-</tr>
-<tr>
-<th>k</th>
-<td>callback</td>
-</tr>
-<tr>
-<th>&amp;v<i>N</i></th>
-<td><i>N</i> bytes padding (structures only)</td>
-</tr>
-<tr>
-<th>&amp;i<i>N</i></th>
-<td>integer of <i>N</i> bytes (structures only)</td>
-</tr>
-<tr>
-<th>&amp;l</th>
-<td>structure size (structures only)</td>
-</tr>
-<tr>
-<th>&amp;t<i>N</i></th>
-<td><i>N</i> bytes of text (structures only)</td>
-</tr>
-<tr>
-<th>&amp;w<i>N</i></th>
-<td><i>N</i> bytes of Unicode text (structures only)</td>
-</tr>
-<tr>
-<th>&amp;g<i>N</i></th>
-<td><i>N</i> bytes of GUID (structures only)</td>
-</tr>
-</table>
-<p>Additionally, each type can be prefixed with an asterisk to denote a pointer. When using an asterisk, the System plug-in still expects the value of the parameter, rather than the pointer's address. To pass a direct address, use `i' with no asterisk. A <a href="#pointer">usage example</a> is available. <a href="#memfuncs">Alloc</a> returns addresses and its return value should therefore be used with `i', without an asterisk.</p>
-</blockquote>
-
-<h4>Available Sources and Destinations</h4>
-
-<blockquote>
-<table>
-<tr>
-<th>Type</th>
-<th>Meaning</th>
-</tr>
-<tr>
-<th>.</th>
-<td>ignored</td>
-<td></td>
-</tr>
-<tr>
-<th><i>number</i></th>
-<td>concrete hex, decimal or octal integer value. several integers can be or'ed using the pipe symbol (`|')</td>
-</tr>
-<tr>
-<th>'<i>string</i>'<br/>"<i>string</i>"<br/>`<i>string</i>`</th>
-<td>concrete string value</td>
-</tr>
-<tr>
-<th><i>r0</i> through <i>r9</i></th>
-<td>$0 through $9 respectively</td>
-</tr>
-<tr>
-<th><i>r10</i> through <i>r19</i><br/><i>R0</i> through <i>R9</i></th>
-<td>$R0 through $R9 respectively</td>
-</tr>
-<tr>
-<th>c</th>
-<td>$CMDLINE</td>
-</tr>
-<tr>
-<th>d</th>
-<td>$INSTDIR</td>
-</tr>
-<tr>
-<th>o</th>
-<td>$OUTDIR</td>
-</tr>
-<tr>
-<th>e</th>
-<td>$EXEDIR</td>
-</tr>
-<tr>
-<th>a</th>
-<td>$LANGUAGE</td>
-</tr>
-<tr>
-<th>s</th>
-<td>NSIS stack</td>
-</tr>
-<tr>
-<th>n</th>
-<td>null for source, no output required for destination</td>
-</tr>
-</table>
-</blockquote>
-
-<h4>Callbacks</h4>
-
-<blockquote>
-<p>Callback functions are simply functions which are passed to a function and called back by it. They are frequently used to pass a possibly large set of data item by item. For example, <a href="http://msdn.microsoft.com/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/EnumChildWindows.asp">EnumChildWindows</a> uses a <a href="http://msdn.microsoft.com/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/EnumChildProc.asp">callback function</a>. As NSIS functions are not quite regular functions, the System plug-in provides its own mechanism to support callback functions. It allows you to create callback functions and notifies you each time a callback function was called.</p>
-
-<p>Creation of callback functions is done using <a href="#callfuncs">Get</a> and the callback creation syntax. As you will not call the callbacks yourself, the source of the parameters should be omitted using a dot. When the callback is called, the destination of the parameters will be filled with the values passed on to the callback. The value the callback will return is set by the source of the return "parameter". The destination of the return "parameter" should always be set as that's where System will notify you the callback was called.</p>
-
-<blockquote><pre>System::Get "(i .r0, i .r1) iss"</pre></blockquote>
-
-<p>To pass a callback to a function, use the k type.</p>
-
-<blockquote><pre>System::Get "(i .r0, i .r1) isR0"
-Pop $0
-System::Call "dll::UseCallback(k r0)"</pre></blockquote>
-
-<p>Each time the callback is called, the string callback#, where # is the number of the callback, will be placed in the destination of the return "parameter". The number of the first callback created is 1, the second's is 2, the third's is 3 and so on. As System is single threaded, a callback can only be called while calling another function. For example, EnumChildWindows's callback can only be called when EnumChildWindows is being called. You should therefore check for callback# after each function call that might call your callback.</p>
-
-<blockquote><pre>System::Get "(i .r0, i .r1) isR0"
-Pop $0
-System::Call "dll::UseCallback(k r0)"
-StrCmp $R0 "callback1" 0 +2
-DetailPrint "UseCallback passed ($0, $1) to the callback"
-</pre></blockquote>
-
-<p>After you've processed the callback call, you should use <a href="#callfuncs">Call</a>, passing it the value returned by <a href="#callfuncs">Get</a> - the callback. This tells System to return from the callback. Destination of the return "parameter" must be cleared prior to calling a function, to avoid false detection of a callback call. If you've specified a source for the return "parameter" when the callback was created, you should fill that source with the appropriate return value. Callbacks are not automatically freed, don't forget to free it after you've finished using it.</p>
-
-<blockquote><pre>SetPluginUnload alwaysoff
-System::Get "(i .r0, i .r1) isR0"
-Pop $0
-System::Call "dll::UseCallback(k r0)"
-loop:
- StrCmp $R0 "callback1" 0 done
- DetailPrint "UseCallback passed ($0, $1) to the callback"
- Push 1 # return value of the callback
- StrCpy $R0 "" # clear $R0 in case there are no more callback calls
- System::Call $0 # tell system to return from the callback
- Goto loop
-done:
-SetPluginUnload manual
-System::Free $0
-</pre></blockquote>
-
-<p>A complete working <a href="#callback">example</a> is available in the usage examples section.</p>
-
-</blockquote>
-
-<h4>Notes</h4>
-
-<blockquote>
-<ul>
-<li>To find out the index of a member in a COM interface, you need to search for the definition of this COM interface in the header files that come with Visual C/C++ or the Platform SDK. Remember the index is zero based.</li>
-<li>Always remember to use NSIS's /NOUNLOAD switch or SetPluginUnload when working with callbacks. The System plug-in will not be able to process the callback calls right if it's unloaded.</li>
-<li>If a function can't be found, an `A' will be appended to its name and it will be looked up again. This is done because a lot of Windows API functions have two versions, one for ANSI strings and one for Unicode strings. The ANSI version of the function is marked with `A' and the Unicode version is marked with `W'. For example: lstrcpyA and lstrcpyW.</li>
-</ul>
-</blockquote>
-
-<h4>Available Options</h4>
-
-<blockquote>
-<table>
-<tr>
-<th>Option</th>
-<th>Meaning</th>
-</tr>
-<tr>
-<th>c</th>
-<td>cdecl calling convention (the stack restored by caller). By default stdcall calling convention is used (the stack restored by callee).</td>
-<td></td>
-</tr>
-<tr>
-<th>r</th>
-<td>Always return (for GET means you should pop result and proc, for CALL means you should pop result (at least)). By default result is returned for errors only (for GET you will pop either error result or right proc, and for CALL you will get either your return or result at defined return place).</td>
-</tr>
-<tr>
-<th>n</th>
-<td>No redefine. Whenever this proc will be used it will never be redefined either by GET or CALL. This options is never inherited to children.</td>
-</tr>
-<tr>
-<th>s</th>
-<td>Use general Stack. Whenever the first callback defined the system starts using the temporary stacks for function calls.</td>
-</tr>
-<tr>
-<th>e</th>
-<td>Call GetLastError() after procedure end and push result on stack.</td>
-</tr>
-<tr>
-<th>u</th>
-<td>Unload DLL after call (using FreeLibrary, so you'll be able to delete it for example).</td>
-</tr>
-</table>
-</blockquote>
-
-<h4>Usage Examples</h4>
-
-<blockquote><pre>
-<a name="func"></a>System::<b>Call</b> "user32::MessageBox(i $HWNDPARENT, t 'NSIS System Plug-in', t 'Test', i 0)"
-</pre></blockquote>
-<blockquote><pre>
-<a name="funcaddr"></a>System::<b>Call</b> "kernel32::GetModuleHandle(t 'user32.dll') i .s"
-System::<b>Call</b> "kernel32::GetProcAddress(i s, t 'MessageBoxA') i .r0"
-System::<b>Call</b> "::$0(i $HWNDPARENT, t 'GetProcAddress test', t 'NSIS System Plug-in', i 0)"
-</pre></blockquote>
-<blockquote><pre>
-<a name="get"></a>System::<b>Get</b> "user32::MessageBox(i $HWNDPARENT, t 'This is a default text', t 'Default', i 0)"
-Pop $0
-System::<b>Call</b> "$0"
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Get</b> "user32::MessageBox(i $HWNDPARENT, t 'This is a default text', \
- t 'Default', i 0x1|0x10)"
-Pop $0
-System::<b>Call</b> "$0(, 'This is a System::Get test', 'NSIS System Plug-in',)"
-</pre></blockquote>
-<blockquote><pre>
-<a name="pointer"></a>System::<b>Call</b> "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
-DetailPrint "User name - $0"
-DetailPrint "String length - $1"
-DetailPrint "Return value - $2"
-</pre></blockquote>
-<blockquote><pre>
-<a name="structaddr"></a>System::Alloc 4
-Pop $0
-System::<b>Call</b> "*$0(i 5)"
-System::<b>Call</b> "*$0(i .r1)"
-DetailPrint $1
-</pre></blockquote>
-<blockquote><pre>
-<a name="newstruct"></a>System::<b>Call</b> "*(i 5) i .r0"
-System::<b>Call</b> "*$0(i .r1)"
-DetailPrint $1
-</pre></blockquote>
-<blockquote><pre>
-<a name="com"></a># defines
-!define CLSCTX_INPROC_SERVER 1
-!define CLSID_ActiveDesktop {75048700-EF1F-11D0-9888-006097DEACF9}
-!define IID_IActiveDesktop {F490EB00-1240-11D1-9888-006097DEACF9}
-# create IActiveDesktop interface
-System::<b>Call</b> "ole32::CoCreateInstance( \
- g '${CLSID_ActiveDesktop}', i 0, \
- i ${CLSCTX_INPROC_SERVER}, \
- g '${IID_IActiveDesktop}', *i .r0) i.r1"
-StrCmp $1 0 0 end
-# call IActiveDesktop->GetWallpaper
-System::<b>Call</b> "$0->4(w .r2, i ${NSIS_MAX_STRLEN}, i 0)"
-# call IActiveDesktop->Release
-System::<b>Call</b> "$0->2()"
-# print result
-DetailPrint $2
-end:
-</pre></blockquote>
-<blockquote><pre>
-InitPluginsDir
-SetOutPath $PLUGINSDIR
-File MyDLL.dll
-System::<b>Call</b> "MyDLL::MyFunc(i 5) ? u"
-Delete $PLUGINSDIR\MyDLL.dll
-</pre></blockquote>
-<blockquote><pre>
-<a name="callback"></a>SetPluginUnload alwaysoff
-System::<b>Get</b> "(i.r1, i) iss"
-Pop $R0
-System::<b>Call</b> "user32::EnumChildWindows(i $HWNDPARENT, k R0, i) i.s"
-loop:
- Pop $0
- StrCmp $0 "callback1" 0 done
- System::<b>Call</b> "user32::GetWindowText(ir1,t.r2,i${NSIS_MAX_STRLEN})"
- System::<b>Call</b> "user32::GetClassName(ir1,t.r3,i${NSIS_MAX_STRLEN})"
- IntFmt $1 "0x%X" $1
- DetailPrint "$1 - [$3] $2"
- Push 1 # callback's return value
- System::<b>Call</b> "$R0"
- Goto loop
-done:
-SetPluginUnload manual
-System::Free $R0
-</pre></blockquote>
-<blockquote><pre>
-<a name="repeat"></a>!define MB "user32::MessageBox(i$HWNDPARENT,t,t'NSIS System Plug-in',i0)"
-System::<b>Call</b> "${MB}(,'my message',,)"
-System::<b>Call</b> "${MB}(,'another message',,) i.r0"
-MessageBox MB_OK "last call returned $0"
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Call</b> "user32::SendMessage(i $HWNDPARENT, t 'test', t 'test', i 0) i.s ? \
- e (,t'test replacement',,) i.r0 ? !e #user32::MessageBox"
-DetailPrint $0
-ClearErrors
-Pop $0
-IfErrors good
-MessageBox MB_OK "this message box will never be reached"
-good:
-</pre></blockquote>
-</blockquote>
-</li>
-</ul>
-
-</div>
-
-<h3><a name="64bitfuncs"></a>64-bit Functions</h3>
-
-<div>
-
-<ul>
-
-<li>
-<b>Int64Op</b> <i>ARG1</i> <i>OP</i> [<i>ARG2</i>]
-<blockquote>
-<p>Performs <i>OP</i> on <i>ARG1</i> and optionally <i>ARG2</i> and returns the result on the stack. Both <i>ARG1</i> and <i>ARG2</i> are 64-bit integers. This means they can range between -2^63 and 2^63 - 1.</p>
-<h4>Available Operations</h4>
-<ul>
-<li>Addition -- <b>+</b></li>
-<li>Subtraction -- <b>-</b></li>
-<li>Multiplication -- <b>*</b></li>
-<li>Division -- <b>/</b></li>
-<li>Modulo -- <b>%</b></li>
-<li>Shift right -- <b>&gt;&gt;</b></li>
-<li>Shift left -- <b>&lt;&lt;</b></li>
-<li>Bitwise or -- <b>|</b></li>
-<li>Bitwise and -- <b>&amp;</b></li>
-<li>Bitwise xor -- <b>^</b></li>
-<li>Logical or -- <b>||</b></li>
-<li>Logical and -- <b>&amp;&amp;</b></li>
-<li>Less than -- <b>&lt;</b></li>
-<li>Equals -- <b>=</b></li>
-<li>Greater than -- <b>&gt;</b></li>
-<li>Bitwise not (one argument) -- <b>~</b></li>
-<li>Logical not (one argument) -- <b>!</b></li>
-</ul>
-
-<h4>Usage Examples</h4>
-
-<blockquote><pre>
-System::<b>Int64Op</b> 5 + 5
-Pop $0
-DetailPrint "5 + 5 = $0" # 10
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 64 - 25
-Pop $0
-DetailPrint "64 - 25 = $0" # 39
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 526355 * 1565487
-Pop $0
-DetailPrint "526355 * 1565487 = $0" # 824001909885
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 5498449498849818 / 3
-Pop $0
-DetailPrint "5498449498849818 / 3 = $0" # 1832816499616606
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 0x89498A198E4566C % 157
-Pop $0
-DetailPrint "0x89498A198E4566C % 157 = $0" # 118
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 1 &lt;&lt; 62
-Pop $0
-DetailPrint "1 &lt;&lt; 62 = $0" # 4611686018427387904
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 0x4000000000000000 &gt;&gt; 62
-Pop $0
-DetailPrint "0x4000000000000000 &gt;&gt; 62 = $0" # 1
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 0xF0F0F0F | 0xF0F0FFF
-Pop $0
-# IntFmt is 32-bit, this is just for the example
-IntFmt $0 "0x%X" $0
-DetailPrint "0xF0F0F0F | 0xF0F0FFF = $0" # 0xF0F0FFF
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 0x12345678 &amp; 0xF0F0F0F0
-Pop $0
-# IntFmt is 32-bit, this is just for the example
-IntFmt $0 "0x%X" $0
-DetailPrint "0x12345678 &amp; 0xF0F0F0F0 = $0" # 0x10305070
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 1 ^ 0
-Pop $0
-DetailPrint "1 ^ 0 = $0" # 1
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 1 || 0
-Pop $0
-DetailPrint "1 || 0 = $0" # 1
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 1 &amp;&amp; 0
-Pop $0
-DetailPrint "1 &amp;&amp; 0 = $0" # 0
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 9302157012375 &lt; 570197509190760
-Pop $0
-DetailPrint "9302157012375 &lt; 570197509190760 = $0" # 1
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 5168 &gt; 89873
-Pop $0
-DetailPrint "5168 &gt; 89873 = $0" # 0
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 189189 = 189189
-Pop $0
-DetailPrint "189189 = 189189 = $0" # 1
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 156545668489 ~
-Pop $0
-DetailPrint "1 ~ = $0" # -156545668490
-</pre></blockquote>
-<blockquote><pre>
-System::<b>Int64Op</b> 1 !
-Pop $0
-DetailPrint "1 ! = $0" # 0
-</pre></blockquote>
-</blockquote>
-</li>
-
-</ul>
-
-</div>
-
-<h2><a name="faq"></a>FAQ</h2>
-
-<div>
-
-<ul>
-
-<li>
-<b>Q:</b> How can I pass structs to functions?
-<blockquote>
-<p><b>A:</b> First of all, you must allocate the struct. This can be done in two ways. You can either use <a href="#memfuncs">Alloc</a> or <a href="#callfuncs">Call</a> with the special struct allocation syntax. Next, if you need to pass data in the struct, you must fill it with data. Then you call the function with a pointer to the struct. Finally, if you want to read data from the struct which might have been written by the called function, you must use <a href="#callfuncs">Call</a> with the struct handling syntax. After all is done, it's important to remember to free the struct.</p>
-
-<h4>Allocation</h4>
-
-<blockquote><p>To allocate the struct using <a href="#memfuncs">Alloc</a>, you must know the size of the struct in bytes. Therefore, it would normally be easier to use <a href="#callfuncs">Call</a>. In this case it's easy to see the required size is 16 bytes, but other cases might not be that trivial. In both cases, the struct address will be located on the top of the stack and should be retrieved using Pop.</p>
-
-<blockquote><pre>
-System::Alloc 16
-</pre></blockquote>
-
-<blockquote><pre>
-System::Call "*(i, i, i, t)i.s"
-</pre></blockquote>
-
-</blockquote>
-
-<h4>Setting Data</h4>
-
-<blockquote><p>Setting data can be done using <a href="#callfuncs">Call</a>. It can be done in the allocation stage, or in another stage using the struct handling syntax.</p>
-
-<blockquote><pre>
-System::Call "*(i 5, i 2, i 513, t 'test')i.s"
-</pre></blockquote>
-
-<blockquote><pre>
-# assuming the struct's memory address is kept in $0
-System::Call "*$0(i 5, i 2, i 513, t 'test')"
-</pre></blockquote>
-
-</blockquote>
-
-<h4>Passing to the Function</h4>
-
-<blockquote><p>As all allocation methods return an address, the type of the passed data should be an integer, an address in memory.</p>
-
-<blockquote><pre>
-# assuming the struct's memory address is kept in $0
-System::Call "dll::func(i r0)"
-</pre></blockquote>
-
-</blockquote>
-
-<h4>Reading Data</h4>
-
-<blockquote><p>Reading data from the struct can be done using the same syntax as setting it. The only difference is that the destination part of the parameter will be set and the source part will be omitted using a dot.</p>
-
-<blockquote><pre>
-# assuming the struct's memory address is kept in $0
-System::Call "*$0(i .r0, i .r1, i .r2, t .r3)"
-DetailPrint "first int = $0"
-DetailPrint "second int = $1"
-DetailPrint "third int = $2"
-DetailPrint "string = $3"
-</pre></blockquote>
-
-</blockquote>
-
-<h4>Freeing Memory</h4>
-
-<blockquote><p>Memory is freed using <a href="#memfuncs">Free</a>.</p>
-
-<blockquote><pre>
-# assuming the struct's memory address is kept in $0
-System::Free $0
-</pre></blockquote>
-
-</blockquote>
-
-<h4>A Complete Example</h4>
-
-<blockquote><pre>
-# allocate
-System::Alloc 32
-Pop $1
-# call
-System::Call "Kernel32::GlobalMemoryStatus(i r1)"
-# get
-System::Call "*$1(i.r2, i.r3, i.r4, i.r5, i.r6, i.r7, i.r8, i.r9)"
-# free
-System::Free $1
-# print
-DetailPrint "Structure size: $2 bytes"
-DetailPrint "Memory load: $3%"
-DetailPrint "Total physical memory: $4 bytes"
-DetailPrint "Free physical memory: $5 bytes"
-DetailPrint "Total page file: $6 bytes"
-DetailPrint "Free page file: $7 bytes"
-DetailPrint "Total virtual: $8 bytes"
-DetailPrint "Free virtual: $9 bytes"
-</pre></blockquote>
-
-</blockquote>
-</li>
-
-</ul>
-
-</div>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<title>NSIS System Plug-in</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+</head>
+<body>
+<h1>NSIS System Plug-in</h1>
+<p><i>&copy; brainsucker (Nik Medved), 2002</i></p>
+
+<h2>Table of Contents</h2>
+
+<ul>
+<li><a href="#intro">Introduction</a></li>
+<li>
+<a href="#funcs">Available Functions</a>
+<ul>
+<li><a href="#memfuncs">Memory Related Functions</a></li>
+<li><a href="#callfuncs">Calling Functions</a></li>
+<li><a href="#64bitfuncs">64-bit Functions</a></li>
+</ul>
+</li>
+<li><a href="#faq">FAQ</a></li>
+</ul>
+
+<h2><a name="intro"></a>Introduction</h2>
+
+<p>The System plug-in gives developers the ability to call any exported function from any DLL. For example, you can use it to call <a href="http://msdn.microsoft.com/library/en-us/fileio/base/getlogicaldrivestrings.asp">GetLogicalDriveStrings</a> to get a list of available drives on the user's computer.</p>
+
+<p>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.</p>
+
+<p>Programming knowledge is highly recommended for good understanding of the System plug-in.</p>
+
+<p>The most useful System plug-in functions (Call, Get and Debug) are not available when compiling with GCC. To work around this, either download a MSVC-compiled version or write your own plugin that calls the functions you need.</p>
+
+<h4>Usage Examples From The Wiki</h4>
+
+<ul>
+<li><a href="http://nsis.sourceforge.net/wiki/Get_Local_Time">Get local time</a></li>
+<li><a href="http://nsis.sourceforge.net/wiki/Registering_a_Palm_Com_Conduit">Register conduits with Palm HotSync</a></li>
+<li><a href="http://nsis.sourceforge.net/wiki/Determining_free_memory_using_the_System_plugin">Get free memory</a></li>
+<li><a href="http://nsis.sourceforge.net/wiki/REG_MULTI_SZ_Reader">Read REG_MULTI_SZ</a></li>
+<li><a href="http://nsis.sourceforge.net/wiki/Get_Disk_Volume_Serial_Number">Get disk serial number</a></li>
+<li><i><a href="http://nsis.sourceforge.net/Special:Search?search=System%3A%3ACall">Search all...</a></i></li>
+</ul>
+
+<h2><a name="funcs"></a>Available Functions</h2>
+
+<h3><a name="memfuncs"></a>Memory Related Functions</h3>
+
+<div>
+<ul>
+
+<li>
+<b>Alloc</b> <i>SIZE</i>
+<blockquote>
+<p>Allocates <i>SIZE</i> bytes and returns a memory address on the stack.</p>
+<h4>Usage Example</h4>
+<blockquote><pre>
+System::<b>Alloc</b> 64
+Pop $0
+DetailPrint "64 bytes allocated at $0"
+System::Free $0
+</pre></blockquote>
+</blockquote>
+</li>
+
+<li>
+<b>Copy</b> [/<i>SIZE</i>] <i>DESTINATION</i> <i>SOURCE</i>
+<blockquote>
+<p>Copies <i>SIZE</i> bytes from <i>SOURCE</i> to <i>DESTINATION</i>. If <i>SIZE</i> is not specified, <i>SOURCE</i>'s size will queried using GlobalSize. This means that if you don't allocate <i>SOURCE</i> using System::Alloc, System::Call or GlobalAlloc, you must specify <i>SIZE</i>. If <i>DESTINATION</i> is zero it will be allocated and its address will be pushed on the stack.</p>
+<h4>Usage example</h4>
+<blockquote><pre>
+# allocate a buffer and put 'test string' and an int in it
+System::Call "*(&amp;t1024 'test string', i 5) i .s"
+Pop $0
+# copy to an automatically created buffer
+System::<b>Copy</b> 0 $0
+Pop $1
+# get string and int in $1 buffer
+System::Call "*$1(&amp;t1024 .r2, i .r3)"
+# free buffer
+System::Free $1
+# print result
+DetailPrint $2
+DetailPrint $3
+# copy to our own buffer
+System::Alloc 1028
+Pop $1
+System::<b>Copy</b> $1 $0
+# get string and int in $1 buffer
+System::Call "*$1(&amp;t1024 .r2, i .r3)"
+# free
+System::Free $0
+System::Free $1
+# print result
+DetailPrint $2
+DetailPrint $3
+</pre></blockquote>
+</blockquote>
+
+</li>
+
+<li>
+<b>Free</b> <i>ADDRESS</i>
+<blockquote>
+<p>Frees <i>ADDRESS</i>.</p>
+<h4>Usage Example</h4>
+<blockquote><pre>
+System::Alloc 64
+Pop $0
+DetailPrint "64 bytes allocated at $0"
+System::<b>Free</b> $0
+</pre></blockquote>
+</blockquote>
+</li>
+
+<li>
+<b>Store</b> "<i>OPERATION</i> [<i>OPERATION</i> [<i>OPERATION</i> ...]]"
+<blockquote>
+<p>Performs stack operations. An operation can be pushing or popping a single register from the NSIS stack or pushing or popping all of the registers ($0-$9 and $R0-$R9) from System's private stack. Operations can be separated by any character.</p>
+<h4>Available Operations</h4>
+<ul>
+<li>To push $<i>#</i>, use p<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
+<li>To pop $<i>#</i>, use r<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
+<li>To push $R<i>#</i>, use P<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
+<li>To pop $R<i>#</i>, use R<i>#</i>, where <i>#</i> is a digit from 0 to 9.</li>
+<li>To push $0-$9 and $R0-$R9 to System's private stack, use s or S.</li>
+<li>To pop $0-$9 and $R0-$R9 from System's private stack, use l or L.</li>
+</ul>
+<p>Note that the System's private stack will be lost when the System plug-in is unloaded from NSIS. If you want to use it, you must keep the System plug-in loaded into NSIS. To do that, use SetPluginUnload or the /NOUNLOAD flag in the NSIS script.</p>
+<h4>Usage Examples</h4>
+<blockquote><pre>
+StrCpy $0 "test"
+System::<b>Store</b> "p0"
+Pop $1
+DetailPrint "$0 = $1"
+</pre></blockquote>
+<blockquote><pre>
+StrCpy $2 "test"
+System::<b>Store</b> "p2 R2"
+DetailPrint "$2 = $R2"
+</pre></blockquote>
+<blockquote><pre>
+StrCpy $3 "test"
+System::<b>Store</b> /NOUNLOAD "s"
+StrCpy $3 "another test"
+System::<b>Store</b> "l"
+DetailPrint $3
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Store</b> "r4" "test"
+DetailPrint $4
+</pre></blockquote>
+</blockquote>
+</li>
+</ul>
+
+</div>
+
+<h3><a name="callfuncs"></a>Calling Functions</h3>
+
+<div>
+
+<ul>
+<li><b>Call</b> <i>PROC</i> [( <i>PARAMS</i> ) [<i>RETURN</i> [? <i>OPTIONS</i>]]]</li>
+<li><b>Get</b> <i>PROC</i> [( <i>PARAMS</i> ) [<i>RETURN</i> [? <i>OPTIONS</i>]]]
+<blockquote>
+<p>Call and get both share a common syntax. As the names suggest, Call calls and Get gets. What does it call or get? It depends on <i>PROC</i>'s value.</p>
+
+<p><i>PARAMS</i> is a list of parameters and what do to with them. You can pass data in the parameters and you can also get data from them. The parameters list is separated by commas. Each parameter is combined of three values: <i>type</i>, <i>source</i> and <i>destination</i>. <i>Type</i> can be an integer, a string, etc. <i>Source</i>, which is the source of the parameter value, can be a NSIS register ($0, $1, $INSTDIR), the NSIS stack, a concrete value (5, "test", etc.) or nothing (null). <i>Destination</i>, which is the destination of the parameter value after the call returns, can be a NSIS register, the NSIS stack or nothing which means no output is required. Either one of <i>source</i> or <i>destination</i> can also be a dot (`.') if it is not needed.</p>
+
+<p><i>RETURN</i> is like a single parameter definition, but <i>source</i> is only used when creating callback functions. Normally <i>source</i> is a dot.</p>
+
+<p><i>OPTIONS</i> is a list of options which control the way System plug-in behaves. Each option can be turned off by prefixing with an exclamation mark. For example: <b>?!e</b>.</p>
+
+<p><i>PARAMS</i>, <i>RETURN</i> and <i>OPTIONS</i> can be repeated many times in one Get/Call line. When repeating, a lot can be omitted, and only what you wish to change can be used. <i>Type</i>, <i>source</i> and/or <i>destination</i> can be omitted for each parameter, even the return value. Options can be added or removed. This allows you to define function prototypes and save on some typing. The <a href="#repeat">last two examples</a> show this.</p>
+
+<p><i>PROC</i> can also be repeated but must be prefixed with a hash sign (`#').</p>
+
+<h4>Possible <i>PROC</i> Values and Meanings</h4>
+
+<blockquote>
+<table>
+<tr>
+<th>Value</th>
+<th>Meaning</th>
+<th>Example</th>
+</tr>
+<tr>
+<th><i>DLL</i>::<i>FUNC</i></th>
+<td><i>FUNC</i> exported from <i>DLL</i></td>
+<td><a href="#func">user32::MessageBox</a></td>
+</tr>
+<tr>
+<th>::<i>ADDR</i></th>
+<td>Function located at <i>ADDR</i></td>
+<td><a href="#funcaddr">see below</a></td>
+</tr>
+<tr>
+<th>*<i>ADDR</i></th>
+<td>Structure located at <i>ADDR</i></td>
+<td><a href="#structaddr">see below</a></td>
+</tr>
+<tr>
+<th>*</th>
+<td>New structure</td>
+<td><a href="#newstruct">see below</a></td>
+</tr>
+<tr>
+<th><i>IPTR</i>-><i>IDX</i></th>
+<td>Member indexed <i>IDX</i> from<br/>interface pointed by <i>IPTR</i></td>
+<td><a href="#com">see below</a></td>
+</tr>
+<tr>
+<th>&lt;nothing&gt;</th>
+<td>New callback function</td>
+<td><a href="#callback">see below</a></td>
+</tr>
+<tr>
+<th><i>PROC</i></th>
+<td><i>PROC</i> returned by Get</td>
+<td><a href="#get">see below</a></td>
+</tr>
+</table>
+</blockquote>
+
+<h4>Available Parameter Types</h4>
+
+<blockquote>
+<table>
+<tr>
+<th>Type</th>
+<th>Meaning</th>
+</tr>
+<tr>
+<th>v</th>
+<td>void (generally for return)</td>
+<td></td>
+</tr>
+<tr>
+<th>i</th>
+<td>int (includes char, byte, short, handles, pointers and so on)</td>
+</tr>
+<tr>
+<th>l</th>
+<td>large integer, int64</td>
+</tr>
+<tr>
+<th>t</th>
+<td>text, string (pointer to first character)</td>
+</tr>
+<tr>
+<th>w</th>
+<td>WCHAR text, Unicode string</td>
+</tr>
+<tr>
+<th>g</th>
+<td>GUID</td>
+</tr>
+<tr>
+<th>k</th>
+<td>callback</td>
+</tr>
+<tr>
+<th>&amp;v<i>N</i></th>
+<td><i>N</i> bytes padding (structures only)</td>
+</tr>
+<tr>
+<th>&amp;i<i>N</i></th>
+<td>integer of <i>N</i> bytes (structures only)</td>
+</tr>
+<tr>
+<th>&amp;l</th>
+<td>structure size (structures only)</td>
+</tr>
+<tr>
+<th>&amp;t<i>N</i></th>
+<td><i>N</i> bytes of text (structures only)</td>
+</tr>
+<tr>
+<th>&amp;w<i>N</i></th>
+<td><i>N</i> bytes of Unicode text (structures only)</td>
+</tr>
+<tr>
+<th>&amp;g<i>N</i></th>
+<td><i>N</i> bytes of GUID (structures only)</td>
+</tr>
+</table>
+<p>Additionally, each type can be prefixed with an asterisk to denote a pointer. When using an asterisk, the System plug-in still expects the value of the parameter, rather than the pointer's address. To pass a direct address, use `i' with no asterisk. A <a href="#pointer">usage example</a> is available. <a href="#memfuncs">Alloc</a> returns addresses and its return value should therefore be used with `i', without an asterisk.</p>
+</blockquote>
+
+<h4>Available Sources and Destinations</h4>
+
+<blockquote>
+<table>
+<tr>
+<th>Type</th>
+<th>Meaning</th>
+</tr>
+<tr>
+<th>.</th>
+<td>ignored</td>
+<td></td>
+</tr>
+<tr>
+<th><i>number</i></th>
+<td>concrete hex, decimal or octal integer value. several integers can be or'ed using the pipe symbol (`|')</td>
+</tr>
+<tr>
+<th>'<i>string</i>'<br/>"<i>string</i>"<br/>`<i>string</i>`</th>
+<td>concrete string value</td>
+</tr>
+<tr>
+<th><i>r0</i> through <i>r9</i></th>
+<td>$0 through $9 respectively</td>
+</tr>
+<tr>
+<th><i>r10</i> through <i>r19</i><br/><i>R0</i> through <i>R9</i></th>
+<td>$R0 through $R9 respectively</td>
+</tr>
+<tr>
+<th>c</th>
+<td>$CMDLINE</td>
+</tr>
+<tr>
+<th>d</th>
+<td>$INSTDIR</td>
+</tr>
+<tr>
+<th>o</th>
+<td>$OUTDIR</td>
+</tr>
+<tr>
+<th>e</th>
+<td>$EXEDIR</td>
+</tr>
+<tr>
+<th>a</th>
+<td>$LANGUAGE</td>
+</tr>
+<tr>
+<th>s</th>
+<td>NSIS stack</td>
+</tr>
+<tr>
+<th>n</th>
+<td>null for source, no output required for destination</td>
+</tr>
+</table>
+</blockquote>
+
+<h4>Callbacks</h4>
+
+<blockquote>
+<p>Callback functions are simply functions which are passed to a function and called back by it. They are frequently used to pass a possibly large set of data item by item. For example, <a href="http://msdn.microsoft.com/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/EnumChildWindows.asp">EnumChildWindows</a> uses a <a href="http://msdn.microsoft.com/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/EnumChildProc.asp">callback function</a>. As NSIS functions are not quite regular functions, the System plug-in provides its own mechanism to support callback functions. It allows you to create callback functions and notifies you each time a callback function was called.</p>
+
+<p>Creation of callback functions is done using <a href="#callfuncs">Get</a> and the callback creation syntax. As you will not call the callbacks yourself, the source of the parameters should be omitted using a dot. When the callback is called, the destination of the parameters will be filled with the values passed on to the callback. The value the callback will return is set by the source of the return "parameter". The destination of the return "parameter" should always be set as that's where System will notify you the callback was called.</p>
+
+<blockquote><pre>System::Get "(i .r0, i .r1) iss"</pre></blockquote>
+
+<p>To pass a callback to a function, use the k type.</p>
+
+<blockquote><pre>System::Get "(i .r0, i .r1) isR0"
+Pop $0
+System::Call "dll::UseCallback(k r0)"</pre></blockquote>
+
+<p>Each time the callback is called, the string callback#, where # is the number of the callback, will be placed in the destination of the return "parameter". The number of the first callback created is 1, the second's is 2, the third's is 3 and so on. As System is single threaded, a callback can only be called while calling another function. For example, EnumChildWindows's callback can only be called when EnumChildWindows is being called. You should therefore check for callback# after each function call that might call your callback.</p>
+
+<blockquote><pre>System::Get "(i .r0, i .r1) isR0"
+Pop $0
+System::Call "dll::UseCallback(k r0)"
+StrCmp $R0 "callback1" 0 +2
+DetailPrint "UseCallback passed ($0, $1) to the callback"
+</pre></blockquote>
+
+<p>After you've processed the callback call, you should use <a href="#callfuncs">Call</a>, passing it the value returned by <a href="#callfuncs">Get</a> - the callback. This tells System to return from the callback. Destination of the return "parameter" must be cleared prior to calling a function, to avoid false detection of a callback call. If you've specified a source for the return "parameter" when the callback was created, you should fill that source with the appropriate return value. Callbacks are not automatically freed, don't forget to free it after you've finished using it.</p>
+
+<blockquote><pre>SetPluginUnload alwaysoff
+System::Get "(i .r0, i .r1) isR0"
+Pop $0
+System::Call "dll::UseCallback(k r0)"
+loop:
+ StrCmp $R0 "callback1" 0 done
+ DetailPrint "UseCallback passed ($0, $1) to the callback"
+ Push 1 # return value of the callback
+ StrCpy $R0 "" # clear $R0 in case there are no more callback calls
+ System::Call $0 # tell system to return from the callback
+ Goto loop
+done:
+SetPluginUnload manual
+System::Free $0
+</pre></blockquote>
+
+<p>A complete working <a href="#callback">example</a> is available in the usage examples section.</p>
+
+</blockquote>
+
+<h4>Notes</h4>
+
+<blockquote>
+<ul>
+<li>To find out the index of a member in a COM interface, you need to search for the definition of this COM interface in the header files that come with Visual C/C++ or the Platform SDK. Remember the index is zero based.</li>
+<li>Always remember to use NSIS's /NOUNLOAD switch or SetPluginUnload when working with callbacks. The System plug-in will not be able to process the callback calls right if it's unloaded.</li>
+<li>If a function can't be found, an `A' will be appended to its name and it will be looked up again. This is done because a lot of Windows API functions have two versions, one for ANSI strings and one for Unicode strings. The ANSI version of the function is marked with `A' and the Unicode version is marked with `W'. For example: lstrcpyA and lstrcpyW.</li>
+</ul>
+</blockquote>
+
+<h4>Available Options</h4>
+
+<blockquote>
+<table>
+<tr>
+<th>Option</th>
+<th>Meaning</th>
+</tr>
+<tr>
+<th>c</th>
+<td>cdecl calling convention (the stack restored by caller). By default stdcall calling convention is used (the stack restored by callee).</td>
+<td></td>
+</tr>
+<tr>
+<th>r</th>
+<td>Always return (for GET means you should pop result and proc, for CALL means you should pop result (at least)). By default result is returned for errors only (for GET you will pop either error result or right proc, and for CALL you will get either your return or result at defined return place).</td>
+</tr>
+<tr>
+<th>n</th>
+<td>No redefine. Whenever this proc will be used it will never be redefined either by GET or CALL. This options is never inherited to children.</td>
+</tr>
+<tr>
+<th>s</th>
+<td>Use general Stack. Whenever the first callback defined the system starts using the temporary stacks for function calls.</td>
+</tr>
+<tr>
+<th>e</th>
+<td>Call GetLastError() after procedure end and push result on stack.</td>
+</tr>
+<tr>
+<th>u</th>
+<td>Unload DLL after call (using FreeLibrary, so you'll be able to delete it for example).</td>
+</tr>
+</table>
+</blockquote>
+
+<h4>Usage Examples</h4>
+
+<blockquote><pre>
+<a name="func"></a>System::<b>Call</b> "user32::MessageBox(i $HWNDPARENT, t 'NSIS System Plug-in', t 'Test', i 0)"
+</pre></blockquote>
+<blockquote><pre>
+<a name="funcaddr"></a>System::<b>Call</b> "kernel32::GetModuleHandle(t 'user32.dll') i .s"
+System::<b>Call</b> "kernel32::GetProcAddress(i s, t 'MessageBoxA') i .r0"
+System::<b>Call</b> "::$0(i $HWNDPARENT, t 'GetProcAddress test', t 'NSIS System Plug-in', i 0)"
+</pre></blockquote>
+<blockquote><pre>
+<a name="get"></a>System::<b>Get</b> "user32::MessageBox(i $HWNDPARENT, t 'This is a default text', t 'Default', i 0)"
+Pop $0
+System::<b>Call</b> "$0"
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Get</b> "user32::MessageBox(i $HWNDPARENT, t 'This is a default text', \
+ t 'Default', i 0x1|0x10)"
+Pop $0
+System::<b>Call</b> "$0(, 'This is a System::Get test', 'NSIS System Plug-in',)"
+</pre></blockquote>
+<blockquote><pre>
+<a name="pointer"></a>System::<b>Call</b> "advapi32::GetUserName(t .r0, *i ${NSIS_MAX_STRLEN} r1) i.r2"
+DetailPrint "User name - $0"
+DetailPrint "String length - $1"
+DetailPrint "Return value - $2"
+</pre></blockquote>
+<blockquote><pre>
+<a name="structaddr"></a>System::Alloc 4
+Pop $0
+System::<b>Call</b> "*$0(i 5)"
+System::<b>Call</b> "*$0(i .r1)"
+DetailPrint $1
+</pre></blockquote>
+<blockquote><pre>
+<a name="newstruct"></a>System::<b>Call</b> "*(i 5) i .r0"
+System::<b>Call</b> "*$0(i .r1)"
+DetailPrint $1
+</pre></blockquote>
+<blockquote><pre>
+<a name="com"></a># defines
+!define CLSCTX_INPROC_SERVER 1
+!define CLSID_ActiveDesktop {75048700-EF1F-11D0-9888-006097DEACF9}
+!define IID_IActiveDesktop {F490EB00-1240-11D1-9888-006097DEACF9}
+# create IActiveDesktop interface
+System::<b>Call</b> "ole32::CoCreateInstance( \
+ g '${CLSID_ActiveDesktop}', i 0, \
+ i ${CLSCTX_INPROC_SERVER}, \
+ g '${IID_IActiveDesktop}', *i .r0) i.r1"
+StrCmp $1 0 0 end
+# call IActiveDesktop->GetWallpaper
+System::<b>Call</b> "$0->4(w .r2, i ${NSIS_MAX_STRLEN}, i 0)"
+# call IActiveDesktop->Release
+System::<b>Call</b> "$0->2()"
+# print result
+DetailPrint $2
+end:
+</pre></blockquote>
+<blockquote><pre>
+InitPluginsDir
+SetOutPath $PLUGINSDIR
+File MyDLL.dll
+System::<b>Call</b> "MyDLL::MyFunc(i 5) ? u"
+Delete $PLUGINSDIR\MyDLL.dll
+</pre></blockquote>
+<blockquote><pre>
+<a name="callback"></a>SetPluginUnload alwaysoff
+System::<b>Get</b> "(i.r1, i) iss"
+Pop $R0
+System::<b>Call</b> "user32::EnumChildWindows(i $HWNDPARENT, k R0, i) i.s"
+loop:
+ Pop $0
+ StrCmp $0 "callback1" 0 done
+ System::<b>Call</b> "user32::GetWindowText(ir1,t.r2,i${NSIS_MAX_STRLEN})"
+ System::<b>Call</b> "user32::GetClassName(ir1,t.r3,i${NSIS_MAX_STRLEN})"
+ IntFmt $1 "0x%X" $1
+ DetailPrint "$1 - [$3] $2"
+ Push 1 # callback's return value
+ System::<b>Call</b> "$R0"
+ Goto loop
+done:
+SetPluginUnload manual
+System::Free $R0
+</pre></blockquote>
+<blockquote><pre>
+<a name="repeat"></a>!define MB "user32::MessageBox(i$HWNDPARENT,t,t'NSIS System Plug-in',i0)"
+System::<b>Call</b> "${MB}(,'my message',,)"
+System::<b>Call</b> "${MB}(,'another message',,) i.r0"
+MessageBox MB_OK "last call returned $0"
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Call</b> "user32::SendMessage(i $HWNDPARENT, t 'test', t 'test', i 0) i.s ? \
+ e (,t'test replacement',,) i.r0 ? !e #user32::MessageBox"
+DetailPrint $0
+ClearErrors
+Pop $0
+IfErrors good
+MessageBox MB_OK "this message box will never be reached"
+good:
+</pre></blockquote>
+</blockquote>
+</li>
+</ul>
+
+</div>
+
+<h3><a name="64bitfuncs"></a>64-bit Functions</h3>
+
+<div>
+
+<ul>
+
+<li>
+<b>Int64Op</b> <i>ARG1</i> <i>OP</i> [<i>ARG2</i>]
+<blockquote>
+<p>Performs <i>OP</i> on <i>ARG1</i> and optionally <i>ARG2</i> and returns the result on the stack. Both <i>ARG1</i> and <i>ARG2</i> are 64-bit integers. This means they can range between -2^63 and 2^63 - 1.</p>
+<h4>Available Operations</h4>
+<ul>
+<li>Addition -- <b>+</b></li>
+<li>Subtraction -- <b>-</b></li>
+<li>Multiplication -- <b>*</b></li>
+<li>Division -- <b>/</b></li>
+<li>Modulo -- <b>%</b></li>
+<li>Shift right -- <b>&gt;&gt;</b></li>
+<li>Shift left -- <b>&lt;&lt;</b></li>
+<li>Bitwise or -- <b>|</b></li>
+<li>Bitwise and -- <b>&amp;</b></li>
+<li>Bitwise xor -- <b>^</b></li>
+<li>Logical or -- <b>||</b></li>
+<li>Logical and -- <b>&amp;&amp;</b></li>
+<li>Less than -- <b>&lt;</b></li>
+<li>Equals -- <b>=</b></li>
+<li>Greater than -- <b>&gt;</b></li>
+<li>Bitwise not (one argument) -- <b>~</b></li>
+<li>Logical not (one argument) -- <b>!</b></li>
+</ul>
+
+<h4>Usage Examples</h4>
+
+<blockquote><pre>
+System::<b>Int64Op</b> 5 + 5
+Pop $0
+DetailPrint "5 + 5 = $0" # 10
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 64 - 25
+Pop $0
+DetailPrint "64 - 25 = $0" # 39
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 526355 * 1565487
+Pop $0
+DetailPrint "526355 * 1565487 = $0" # 824001909885
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 5498449498849818 / 3
+Pop $0
+DetailPrint "5498449498849818 / 3 = $0" # 1832816499616606
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 0x89498A198E4566C % 157
+Pop $0
+DetailPrint "0x89498A198E4566C % 157 = $0" # 118
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 1 &lt;&lt; 62
+Pop $0
+DetailPrint "1 &lt;&lt; 62 = $0" # 4611686018427387904
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 0x4000000000000000 &gt;&gt; 62
+Pop $0
+DetailPrint "0x4000000000000000 &gt;&gt; 62 = $0" # 1
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 0xF0F0F0F | 0xF0F0FFF
+Pop $0
+# IntFmt is 32-bit, this is just for the example
+IntFmt $0 "0x%X" $0
+DetailPrint "0xF0F0F0F | 0xF0F0FFF = $0" # 0xF0F0FFF
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 0x12345678 &amp; 0xF0F0F0F0
+Pop $0
+# IntFmt is 32-bit, this is just for the example
+IntFmt $0 "0x%X" $0
+DetailPrint "0x12345678 &amp; 0xF0F0F0F0 = $0" # 0x10305070
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 1 ^ 0
+Pop $0
+DetailPrint "1 ^ 0 = $0" # 1
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 1 || 0
+Pop $0
+DetailPrint "1 || 0 = $0" # 1
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 1 &amp;&amp; 0
+Pop $0
+DetailPrint "1 &amp;&amp; 0 = $0" # 0
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 9302157012375 &lt; 570197509190760
+Pop $0
+DetailPrint "9302157012375 &lt; 570197509190760 = $0" # 1
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 5168 &gt; 89873
+Pop $0
+DetailPrint "5168 &gt; 89873 = $0" # 0
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 189189 = 189189
+Pop $0
+DetailPrint "189189 = 189189 = $0" # 1
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 156545668489 ~
+Pop $0
+DetailPrint "1 ~ = $0" # -156545668490
+</pre></blockquote>
+<blockquote><pre>
+System::<b>Int64Op</b> 1 !
+Pop $0
+DetailPrint "1 ! = $0" # 0
+</pre></blockquote>
+</blockquote>
+</li>
+
+</ul>
+
+</div>
+
+<h2><a name="faq"></a>FAQ</h2>
+
+<div>
+
+<ul>
+
+<li>
+<b>Q:</b> How can I pass structs to functions?
+<blockquote>
+<p><b>A:</b> First of all, you must allocate the struct. This can be done in two ways. You can either use <a href="#memfuncs">Alloc</a> or <a href="#callfuncs">Call</a> with the special struct allocation syntax. Next, if you need to pass data in the struct, you must fill it with data. Then you call the function with a pointer to the struct. Finally, if you want to read data from the struct which might have been written by the called function, you must use <a href="#callfuncs">Call</a> with the struct handling syntax. After all is done, it's important to remember to free the struct.</p>
+
+<h4>Allocation</h4>
+
+<blockquote><p>To allocate the struct using <a href="#memfuncs">Alloc</a>, you must know the size of the struct in bytes. Therefore, it would normally be easier to use <a href="#callfuncs">Call</a>. In this case it's easy to see the required size is 16 bytes, but other cases might not be that trivial. In both cases, the struct address will be located on the top of the stack and should be retrieved using Pop.</p>
+
+<blockquote><pre>
+System::Alloc 16
+</pre></blockquote>
+
+<blockquote><pre>
+System::Call "*(i, i, i, t)i.s"
+</pre></blockquote>
+
+</blockquote>
+
+<h4>Setting Data</h4>
+
+<blockquote><p>Setting data can be done using <a href="#callfuncs">Call</a>. It can be done in the allocation stage, or in another stage using the struct handling syntax.</p>
+
+<blockquote><pre>
+System::Call "*(i 5, i 2, i 513, t 'test')i.s"
+</pre></blockquote>
+
+<blockquote><pre>
+# assuming the struct's memory address is kept in $0
+System::Call "*$0(i 5, i 2, i 513, t 'test')"
+</pre></blockquote>
+
+</blockquote>
+
+<h4>Passing to the Function</h4>
+
+<blockquote><p>As all allocation methods return an address, the type of the passed data should be an integer, an address in memory.</p>
+
+<blockquote><pre>
+# assuming the struct's memory address is kept in $0
+System::Call "dll::func(i r0)"
+</pre></blockquote>
+
+</blockquote>
+
+<h4>Reading Data</h4>
+
+<blockquote><p>Reading data from the struct can be done using the same syntax as setting it. The only difference is that the destination part of the parameter will be set and the source part will be omitted using a dot.</p>
+
+<blockquote><pre>
+# assuming the struct's memory address is kept in $0
+System::Call "*$0(i .r0, i .r1, i .r2, t .r3)"
+DetailPrint "first int = $0"
+DetailPrint "second int = $1"
+DetailPrint "third int = $2"
+DetailPrint "string = $3"
+</pre></blockquote>
+
+</blockquote>
+
+<h4>Freeing Memory</h4>
+
+<blockquote><p>Memory is freed using <a href="#memfuncs">Free</a>.</p>
+
+<blockquote><pre>
+# assuming the struct's memory address is kept in $0
+System::Free $0
+</pre></blockquote>
+
+</blockquote>
+
+<h4>A Complete Example</h4>
+
+<blockquote><pre>
+# allocate
+System::Alloc 32
+Pop $1
+# call
+System::Call "Kernel32::GlobalMemoryStatus(i r1)"
+# get
+System::Call "*$1(i.r2, i.r3, i.r4, i.r5, i.r6, i.r7, i.r8, i.r9)"
+# free
+System::Free $1
+# print
+DetailPrint "Structure size: $2 bytes"
+DetailPrint "Memory load: $3%"
+DetailPrint "Total physical memory: $4 bytes"
+DetailPrint "Free physical memory: $5 bytes"
+DetailPrint "Total page file: $6 bytes"
+DetailPrint "Free page file: $7 bytes"
+DetailPrint "Total virtual: $8 bytes"
+DetailPrint "Free virtual: $9 bytes"
+</pre></blockquote>
+
+</blockquote>
+</li>
+
+</ul>
+
+</div>
+
+</body>
</html> \ No newline at end of file
diff --git a/Contrib/System/System.nsh b/Contrib/System/System.nsh
index fe90c41..b550d19 100755
--- a/Contrib/System/System.nsh
+++ b/Contrib/System/System.nsh
@@ -1,472 +1,472 @@
-; Some useful functions, structures, constants
-;
-; (c) brainsucker, 2002
-; (r) BSForce
-
-; Check for double includes
-!ifndef System.NSH.Included
-!define System.NSH.Included
-
-!verbose 3
-
-; ------------- Functions --------------
-
-; LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
-!define sysWNDPROC "(i.s, i.s, i.s, i.s) iss"
-
-; LRESULT DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
-!define sysDefWindowProc "user32::DefWindowProcA(i, i, i, i) i"
-
-!define sysMessageBox "user32::MessageBoxA(i, t, t, i) i"
-
-!define sysMessageBeep "user32::MessageBeep(i) i"
-
-!define sysMessageBoxIndirect 'user32::MessageBoxIndirectA(i) i'
-
-; HMODULE GetModuleHandle(LPCTSTR lpModuleName);
-!define sysGetModuleHandle "kernel32::GetModuleHandleA(t) i"
-
-; HMODULE LoadLibrary(LPCTSTR lpFileName);
-!define sysLoadLibrary "kernel32::LoadLibraryA(t) i"
-
-; BOOL FreeLibrary(HMODULE hModule);
-!define sysFreeLibrary "kernel32::FreeLibrary(i) i"
-
-; HCURSOR LoadCursor(HINSTANCE hInstance, LPCTSTR lpCursorName);
-!define sysLoadCursor "user32::LoadCursorA(i, t) i"
-
-; ATOM RegisterClass(CONST WNDCLASS *lpWndClass);
-!define sysRegisterClass "user32::RegisterClassA(i) i"
-
-; HANDLE LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType,
-; int cxDesired, int cyDesired, UINT fuLoad);
-!define sysLoadImage "user32::LoadImageA(i, t, i, i, i, i) i"
-
-; BOOL PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
-!define sysPlaySound "winmm.dll::PlaySoundA(t, i, 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::CreateWindowExA(i, t, t, i, i, i, i, i, i, i, i, i) i"
-
-; BOOL IsWindow(HWND hWnd);
-!define sysIsWindow "user32::IsWindow(i) i"
-
-; LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong);
-!define sysSetWindowLong "user32::SetWindowLongA(i, i, i) i"
-
-; BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
-!define sysSetWindowPos "user32::SetWindowPos(i, i, i, i, i, i, i) i"
-
-; BOOL ShowWindow(HWND hWnd, int nCmdShow);
-!define sysShowWindow "user32::ShowWindow(i, i) i"
-
-; BOOL DestroyWindow(HWND hWnd);
-!define sysDestroyWindow "user32::DestroyWindow(i) i"
-
-; BOOL GetClientRect(HWND hWnd, LPRECT lpRect);
-!define sysGetClientRect "user32::GetClientRect(i, i) i"
-
-; BOOL GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
-!define sysGetMessage "user32::GetMessageA(i, i, i, i) i"
-
-; LRESULT DispatchMessage(CONST MSG *lpmsg);
-!define sysDispatchMessage "user32::DispatchMessageA(i) i"
-
-; BOOL DeleteObject(HGDIOBJ hObject);
-!define sysDeleteObject "gdi32::DeleteObject(i) i"
-
-; int GetObject(HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
-!define sysGetObject "gdi32::GetObjectA(i, i, i) i"
-
-; HGDIOBJ SelectObject(HDC hdc, HGDIOBJ hgdiobj);
-!define sysSelectObject "gdi32::SelectObject(i, i) i"
-
-; HDC CreateCompatibleDC(HDC hdc);
-!define sysCreateCompatibleDC "gdi32::CreateCompatibleDC(i) i"
-
-; BOOL DeleteDC(HDC hdc);
-!define sysDeleteDC "gdi32::DeleteDC(i) 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(i, i, i, i, i, i, i, i, i) i"
-
-; proposed by abgandar
-; int AddFontResource(LPCTSTR lpszFilename);
-!define sysAddFontResource "gdi32::AddFontResourceA(t) i"
-
-; HDC BeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint);
-!define sysBeginPaint "user32::BeginPaint(i, i) i"
-
-; BOOL EndPaint(HWND hWnd, CONST PAINTSTRUCT *lpPaint);
-!define sysEndPaint "user32::EndPaint(i, i) i"
-
-; BOOL SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
-!define sysSystemParametersInfo "user32::SystemParametersInfoA(i, i, i, i) i"
-
-; UINT_PTR SetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
-!define sysSetTimer "user32::SetTimer(i, i, i, k) i"
-
-!define sysGetLogicalDriveStrings 'kernel32::GetLogicalDriveStringsA(i, i) i'
-
-!define sysGetDiskFreeSpaceEx 'kernel32::GetDiskFreeSpaceExA(t, *l, *l, *l) i'
-
-; UINT GetDriveType(LPCTSTR lpRootPathName);
-!define sysGetDriveType 'kernel32::GetDriveTypeA(t) i'
-
-; HANDLE FindFirstFile(LPCTSTR lpFileName,LPWIN32_FIND_DATA lpFindFileData);
-!define sysFindFirstFile 'kernel32::FindFirstFileA(t, i) i'
-
-; BOOL FindClose(HANDLE hFindFile);
-!define sysFindClose 'kernel32::FindClose(i) i'
-
-; BOOL FileTimeToSystemTime(CONST FILETIME *lpFileTime,
-; LPSYSTEMTIME lpSystemTime);
-!define sysFileTimeToSystemTime 'kernel32::FileTimeToSystemTime(*l, i) 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(i, i, i) i'
-
-!define syslstrlen 'kernel32::lstrlenA(t) i'
-
-; int wsprintf(LPTSTR lpOut, LPCTSTR lpFmt, ...);
-!define syswsprintf "user32::wsprintfA(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, i, i, i, i, t, t) i"
-
-; 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 "(i, i, i, i, i, i, i) i"
-
-; 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, i) i"
-
-; typedef struct _RECT {
-; LONG left;
-; LONG top;
-; LONG right;
-; LONG bottom;
-; } RECT, *PRECT;
-!define stRECT "(i, i, i, i) i"
-
-; typedef struct tagPAINTSTRUCT {
-; HDC hdc;
-; BOOL fErase;
-; RECT rcPaint; (rcl, rct, rcr, rcb)
-; BOOL fRestore;
-; BOOL fIncUpdate;
-; BYTE rgbReserved[32];
-; } PAINTSTRUCT, *PPAINTSTRUCT;
-!define stPAINTSTRUCT "(i, i, i, i, i, i, i, i, &v32) i"
-
-; 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, i, i, t, t, i, t, i, k, i) i'
-
-; 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) i'
-
-; Maximal windows path
-!define 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) i'
-
-; ------------- Constants --------------
-
-; == Other ==
-!define INVALID_HANDLE_VALUE -1
-
-; == Cursors ==
-
-!define IDC_ARROW 32512
-!define IDC_IBEAM 32513
-!define IDC_WAIT 32514
-!define IDC_CROSS 32515
-!define IDC_UPARROW 32516
-!define IDC_SIZE 32640
-!define IDC_ICON 32641
-!define IDC_SIZENWSE 32642
-!define IDC_SIZENESW 32643
-!define IDC_SIZEWE 32644
-!define IDC_SIZENS 32645
-!define IDC_SIZEALL 32646
-!define IDC_NO 32648
-!define IDC_HAND 32649
-!define IDC_APPSTARTING 32650
-!define IDC_HELP 32651
-
-; == Images ==
-
-!define IMAGE_BITMAP 0
-!define IMAGE_ICON 1
-!define IMAGE_CURSOR 2
-!define IMAGE_ENHMETAFILE 3
-
-!define LR_DEFAULTCOLOR 0x0000
-!define LR_MONOCHROME 0x0001
-!define LR_COLOR 0x0002
-!define LR_COPYRETURNORG 0x0004
-!define LR_COPYDELETEORG 0x0008
-!define LR_LOADFROMFILE 0x0010
-!define LR_LOADTRANSPARENT 0x0020
-!define LR_DEFAULTSIZE 0x0040
-!define LR_VGACOLOR 0x0080
-!define LR_LOADMAP3DCOLORS 0x1000
-!define LR_CREATEDIBSECTION 0x2000
-!define LR_COPYFROMRESOURCE 0x4000
-!define LR_SHARED 0x8000
-
-; == 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 WS_OVERLAPPED 0x00000000
-!define WS_POPUP 0x80000000
-!define WS_CHILD 0x40000000
-!define WS_MINIMIZE 0x20000000
-!define WS_VISIBLE 0x10000000
-!define WS_DISABLED 0x08000000
-!define WS_CLIPSIBLINGS 0x04000000
-!define WS_CLIPCHILDREN 0x02000000
-!define WS_MAXIMIZE 0x01000000
-!define WS_CAPTION 0x00C00000
-!define WS_BORDER 0x00800000
-!define WS_DLGFRAME 0x00400000
-!define WS_VSCROLL 0x00200000
-!define WS_HSCROLL 0x00100000
-!define WS_SYSMENU 0x00080000
-!define WS_THICKFRAME 0x00040000
-!define WS_GROUP 0x00020000
-!define WS_TABSTOP 0x00010000
-!define WS_MINIMIZEBOX 0x00020000
-!define WS_MAXIMIZEBOX 0x00010000
-!define WS_TILED ${WS_OVERLAPPED}
-!define WS_ICONIC ${WS_MINIMIZE}
-!define WS_SIZEBOX ${WS_THICKFRAME}
-!define WS_OVERLAPPEDWINDOW 0x00CF0000
-!define WS_TILEDWINDOW ${WS_OVERLAPPEDWINDOW}
-!define WS_POPUPWINDOW 0x80880000
-!define WS_CHILDWINDOW ${WS_CHILD}
-!define WS_EX_DLGMODALFRAME 0x00000001
-!define WS_EX_NOPARENTNOTIFY 0x00000004
-!define WS_EX_TOPMOST 0x00000008
-!define WS_EX_ACCEPTFILES 0x00000010
-!define WS_EX_TRANSPARENT 0x00000020
-!define WS_EX_MDICHILD 0x00000040
-!define WS_EX_TOOLWINDOW 0x00000080
-!define WS_EX_WINDOWEDGE 0x00000100
-!define WS_EX_CLIENTEDGE 0x00000200
-!define WS_EX_CONTEXTHELP 0x00000400
-!define WS_EX_RIGHT 0x00001000
-!define WS_EX_LEFT 0x00000000
-!define WS_EX_RTLREADING 0x00002000
-!define WS_EX_LTRREADING 0x00000000
-!define WS_EX_LEFTSCROLLBAR 0x00004000
-!define WS_EX_RIGHTSCROLLBAR 0x00000000
-!define WS_EX_CONTROLPARENT 0x00010000
-!define WS_EX_STATICEDGE 0x00020000
-!define WS_EX_APPWINDOW 0x00040000
-!define WS_EX_OVERLAPPEDWINDOW 0x00000300
-!define WS_EX_PALETTEWINDOW 0x00000188
-!define WS_EX_LAYERED 0x00080000
-!define WS_EX_NOINHERITLAYOUT 0x00100000
-!define WS_EX_LAYOUTRTL 0x00400000
-!define WS_EX_COMPOSITED 0x02000000
-!define WS_EX_NOACTIVATE 0x08000000
-
-
-; == System Parameters Info ==
-
-!define SPI_GETWORKAREA 0x0030
-
-; == Window Long Offsets ==
-
-!define GWL_WNDPROC -4
-!define GWL_HINSTANCE -6
-!define GWL_HWNDPARENT -8
-!define GWL_STYLE -16
-!define GWL_EXSTYLE -20
-!define GWL_USERDATA -21
-!define GWL_ID -12
-
-; == 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
-
-; == Drive type constants ==
-
-!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
-
-; == 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
-
-!verbose 4
-
+; Some useful functions, structures, constants
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+; Check for double includes
+!ifndef System.NSH.Included
+!define System.NSH.Included
+
+!verbose 3
+
+; ------------- Functions --------------
+
+; LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+!define sysWNDPROC "(i.s, i.s, i.s, i.s) iss"
+
+; LRESULT DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
+!define sysDefWindowProc "user32::DefWindowProcA(i, i, i, i) i"
+
+!define sysMessageBox "user32::MessageBoxA(i, t, t, i) i"
+
+!define sysMessageBeep "user32::MessageBeep(i) i"
+
+!define sysMessageBoxIndirect 'user32::MessageBoxIndirectA(i) i'
+
+; HMODULE GetModuleHandle(LPCTSTR lpModuleName);
+!define sysGetModuleHandle "kernel32::GetModuleHandleA(t) i"
+
+; HMODULE LoadLibrary(LPCTSTR lpFileName);
+!define sysLoadLibrary "kernel32::LoadLibraryA(t) i"
+
+; BOOL FreeLibrary(HMODULE hModule);
+!define sysFreeLibrary "kernel32::FreeLibrary(i) i"
+
+; HCURSOR LoadCursor(HINSTANCE hInstance, LPCTSTR lpCursorName);
+!define sysLoadCursor "user32::LoadCursorA(i, t) i"
+
+; ATOM RegisterClass(CONST WNDCLASS *lpWndClass);
+!define sysRegisterClass "user32::RegisterClassA(i) i"
+
+; HANDLE LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType,
+; int cxDesired, int cyDesired, UINT fuLoad);
+!define sysLoadImage "user32::LoadImageA(i, t, i, i, i, i) i"
+
+; BOOL PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
+!define sysPlaySound "winmm.dll::PlaySoundA(t, i, 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::CreateWindowExA(i, t, t, i, i, i, i, i, i, i, i, i) i"
+
+; BOOL IsWindow(HWND hWnd);
+!define sysIsWindow "user32::IsWindow(i) i"
+
+; LONG SetWindowLong(HWND hWnd, int nIndex, LONG dwNewLong);
+!define sysSetWindowLong "user32::SetWindowLongA(i, i, i) i"
+
+; BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
+!define sysSetWindowPos "user32::SetWindowPos(i, i, i, i, i, i, i) i"
+
+; BOOL ShowWindow(HWND hWnd, int nCmdShow);
+!define sysShowWindow "user32::ShowWindow(i, i) i"
+
+; BOOL DestroyWindow(HWND hWnd);
+!define sysDestroyWindow "user32::DestroyWindow(i) i"
+
+; BOOL GetClientRect(HWND hWnd, LPRECT lpRect);
+!define sysGetClientRect "user32::GetClientRect(i, i) i"
+
+; BOOL GetMessage(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
+!define sysGetMessage "user32::GetMessageA(i, i, i, i) i"
+
+; LRESULT DispatchMessage(CONST MSG *lpmsg);
+!define sysDispatchMessage "user32::DispatchMessageA(i) i"
+
+; BOOL DeleteObject(HGDIOBJ hObject);
+!define sysDeleteObject "gdi32::DeleteObject(i) i"
+
+; int GetObject(HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
+!define sysGetObject "gdi32::GetObjectA(i, i, i) i"
+
+; HGDIOBJ SelectObject(HDC hdc, HGDIOBJ hgdiobj);
+!define sysSelectObject "gdi32::SelectObject(i, i) i"
+
+; HDC CreateCompatibleDC(HDC hdc);
+!define sysCreateCompatibleDC "gdi32::CreateCompatibleDC(i) i"
+
+; BOOL DeleteDC(HDC hdc);
+!define sysDeleteDC "gdi32::DeleteDC(i) 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(i, i, i, i, i, i, i, i, i) i"
+
+; proposed by abgandar
+; int AddFontResource(LPCTSTR lpszFilename);
+!define sysAddFontResource "gdi32::AddFontResourceA(t) i"
+
+; HDC BeginPaint(HWND hwnd, LPPAINTSTRUCT lpPaint);
+!define sysBeginPaint "user32::BeginPaint(i, i) i"
+
+; BOOL EndPaint(HWND hWnd, CONST PAINTSTRUCT *lpPaint);
+!define sysEndPaint "user32::EndPaint(i, i) i"
+
+; BOOL SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
+!define sysSystemParametersInfo "user32::SystemParametersInfoA(i, i, i, i) i"
+
+; UINT_PTR SetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
+!define sysSetTimer "user32::SetTimer(i, i, i, k) i"
+
+!define sysGetLogicalDriveStrings 'kernel32::GetLogicalDriveStringsA(i, i) i'
+
+!define sysGetDiskFreeSpaceEx 'kernel32::GetDiskFreeSpaceExA(t, *l, *l, *l) i'
+
+; UINT GetDriveType(LPCTSTR lpRootPathName);
+!define sysGetDriveType 'kernel32::GetDriveTypeA(t) i'
+
+; HANDLE FindFirstFile(LPCTSTR lpFileName,LPWIN32_FIND_DATA lpFindFileData);
+!define sysFindFirstFile 'kernel32::FindFirstFileA(t, i) i'
+
+; BOOL FindClose(HANDLE hFindFile);
+!define sysFindClose 'kernel32::FindClose(i) i'
+
+; BOOL FileTimeToSystemTime(CONST FILETIME *lpFileTime,
+; LPSYSTEMTIME lpSystemTime);
+!define sysFileTimeToSystemTime 'kernel32::FileTimeToSystemTime(*l, i) 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(i, i, i) i'
+
+!define syslstrlen 'kernel32::lstrlenA(t) i'
+
+; int wsprintf(LPTSTR lpOut, LPCTSTR lpFmt, ...);
+!define syswsprintf "user32::wsprintfA(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, i, i, i, i, t, t) i"
+
+; 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 "(i, i, i, i, i, i, i) i"
+
+; 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, i) i"
+
+; typedef struct _RECT {
+; LONG left;
+; LONG top;
+; LONG right;
+; LONG bottom;
+; } RECT, *PRECT;
+!define stRECT "(i, i, i, i) i"
+
+; typedef struct tagPAINTSTRUCT {
+; HDC hdc;
+; BOOL fErase;
+; RECT rcPaint; (rcl, rct, rcr, rcb)
+; BOOL fRestore;
+; BOOL fIncUpdate;
+; BYTE rgbReserved[32];
+; } PAINTSTRUCT, *PPAINTSTRUCT;
+!define stPAINTSTRUCT "(i, i, i, i, i, i, i, i, &v32) i"
+
+; 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, i, i, t, t, i, t, i, k, i) i'
+
+; 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) i'
+
+; Maximal windows path
+!define 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) i'
+
+; ------------- Constants --------------
+
+; == Other ==
+!define INVALID_HANDLE_VALUE -1
+
+; == Cursors ==
+
+!define IDC_ARROW 32512
+!define IDC_IBEAM 32513
+!define IDC_WAIT 32514
+!define IDC_CROSS 32515
+!define IDC_UPARROW 32516
+!define IDC_SIZE 32640
+!define IDC_ICON 32641
+!define IDC_SIZENWSE 32642
+!define IDC_SIZENESW 32643
+!define IDC_SIZEWE 32644
+!define IDC_SIZENS 32645
+!define IDC_SIZEALL 32646
+!define IDC_NO 32648
+!define IDC_HAND 32649
+!define IDC_APPSTARTING 32650
+!define IDC_HELP 32651
+
+; == Images ==
+
+!define IMAGE_BITMAP 0
+!define IMAGE_ICON 1
+!define IMAGE_CURSOR 2
+!define IMAGE_ENHMETAFILE 3
+
+!define LR_DEFAULTCOLOR 0x0000
+!define LR_MONOCHROME 0x0001
+!define LR_COLOR 0x0002
+!define LR_COPYRETURNORG 0x0004
+!define LR_COPYDELETEORG 0x0008
+!define LR_LOADFROMFILE 0x0010
+!define LR_LOADTRANSPARENT 0x0020
+!define LR_DEFAULTSIZE 0x0040
+!define LR_VGACOLOR 0x0080
+!define LR_LOADMAP3DCOLORS 0x1000
+!define LR_CREATEDIBSECTION 0x2000
+!define LR_COPYFROMRESOURCE 0x4000
+!define LR_SHARED 0x8000
+
+; == 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 WS_OVERLAPPED 0x00000000
+!define WS_POPUP 0x80000000
+!define WS_CHILD 0x40000000
+!define WS_MINIMIZE 0x20000000
+!define WS_VISIBLE 0x10000000
+!define WS_DISABLED 0x08000000
+!define WS_CLIPSIBLINGS 0x04000000
+!define WS_CLIPCHILDREN 0x02000000
+!define WS_MAXIMIZE 0x01000000
+!define WS_CAPTION 0x00C00000
+!define WS_BORDER 0x00800000
+!define WS_DLGFRAME 0x00400000
+!define WS_VSCROLL 0x00200000
+!define WS_HSCROLL 0x00100000
+!define WS_SYSMENU 0x00080000
+!define WS_THICKFRAME 0x00040000
+!define WS_GROUP 0x00020000
+!define WS_TABSTOP 0x00010000
+!define WS_MINIMIZEBOX 0x00020000
+!define WS_MAXIMIZEBOX 0x00010000
+!define WS_TILED ${WS_OVERLAPPED}
+!define WS_ICONIC ${WS_MINIMIZE}
+!define WS_SIZEBOX ${WS_THICKFRAME}
+!define WS_OVERLAPPEDWINDOW 0x00CF0000
+!define WS_TILEDWINDOW ${WS_OVERLAPPEDWINDOW}
+!define WS_POPUPWINDOW 0x80880000
+!define WS_CHILDWINDOW ${WS_CHILD}
+!define WS_EX_DLGMODALFRAME 0x00000001
+!define WS_EX_NOPARENTNOTIFY 0x00000004
+!define WS_EX_TOPMOST 0x00000008
+!define WS_EX_ACCEPTFILES 0x00000010
+!define WS_EX_TRANSPARENT 0x00000020
+!define WS_EX_MDICHILD 0x00000040
+!define WS_EX_TOOLWINDOW 0x00000080
+!define WS_EX_WINDOWEDGE 0x00000100
+!define WS_EX_CLIENTEDGE 0x00000200
+!define WS_EX_CONTEXTHELP 0x00000400
+!define WS_EX_RIGHT 0x00001000
+!define WS_EX_LEFT 0x00000000
+!define WS_EX_RTLREADING 0x00002000
+!define WS_EX_LTRREADING 0x00000000
+!define WS_EX_LEFTSCROLLBAR 0x00004000
+!define WS_EX_RIGHTSCROLLBAR 0x00000000
+!define WS_EX_CONTROLPARENT 0x00010000
+!define WS_EX_STATICEDGE 0x00020000
+!define WS_EX_APPWINDOW 0x00040000
+!define WS_EX_OVERLAPPEDWINDOW 0x00000300
+!define WS_EX_PALETTEWINDOW 0x00000188
+!define WS_EX_LAYERED 0x00080000
+!define WS_EX_NOINHERITLAYOUT 0x00100000
+!define WS_EX_LAYOUTRTL 0x00400000
+!define WS_EX_COMPOSITED 0x02000000
+!define WS_EX_NOACTIVATE 0x08000000
+
+
+; == System Parameters Info ==
+
+!define SPI_GETWORKAREA 0x0030
+
+; == Window Long Offsets ==
+
+!define GWL_WNDPROC -4
+!define GWL_HINSTANCE -6
+!define GWL_HWNDPARENT -8
+!define GWL_STYLE -16
+!define GWL_EXSTYLE -20
+!define GWL_USERDATA -21
+!define GWL_ID -12
+
+; == 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
+
+; == Drive type constants ==
+
+!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
+
+; == 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
+
+!verbose 4
+
!endif \ No newline at end of file
diff --git a/Contrib/System/System.nsi b/Contrib/System/System.nsi
index e3172a0..906a8a1 100755
--- a/Contrib/System/System.nsi
+++ b/Contrib/System/System.nsi
@@ -1,142 +1,142 @@
-; This is just an example of System Plugin
-;
-; (c) brainsucker, 2002
-; (r) BSForce
-
-Name "System Plugin Example"
-OutFile "System.exe"
-SetPluginUnload alwaysoff
-
-!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::Alloc 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 $1 $1 + $2
- IntOp $1 $1 + 1
- 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::MessageBoxA(i $HWNDPARENT, t "Just direct MessageBoxA 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"
-
- ; last plugin call must not have /NOUNLOAD so NSIS will be able to delete the temporary DLL
- SetPluginUnload manual
- ; do nothing
- System::Free 0
-
-SectionEnd
-
-; eof
+; This is just an example of System Plugin
+;
+; (c) brainsucker, 2002
+; (r) BSForce
+
+Name "System Plugin Example"
+OutFile "System.exe"
+SetPluginUnload alwaysoff
+
+!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::Alloc 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 $1 $1 + $2
+ IntOp $1 $1 + 1
+ 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::MessageBoxA(i $HWNDPARENT, t "Just direct MessageBoxA 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"
+
+ ; last plugin call must not have /NOUNLOAD so NSIS will be able to delete the temporary DLL
+ SetPluginUnload manual
+ ; do nothing
+ System::Free 0
+
+SectionEnd
+
+; eof
diff --git a/Contrib/System/WhatsNew.txt b/Contrib/System/WhatsNew.txt
index 4d124f6..959c734 100755
--- a/Contrib/System/WhatsNew.txt
+++ b/Contrib/System/WhatsNew.txt
@@ -1,46 +1,46 @@
-release 2.
-1. Syntax, with inline input
-2. Int64 full support (conversion/operations/comparison)
-3. Structures support
-4. Callbacks support, including multilevel callbacks
-5. Some useful routines (Alloc, Free, Copy)
-6. CDecl and StdCall calling conventions
-
-release 3, 22 march 2003.
-1. Custom Message Boxes (with icons etc) -> bug in case of GetModuleHandle and
-call to FreeLibrary (sysfunc.nsh)
-2. GetFileSysTime -> No SystemTimeToTzSpecificLocalTime at win9x bug,
-changed to use FileTimeToLocalFileTime (sysfunc.nsh)
-3. Incorrect automatic structure size (&l) bug, value actually never filled
-into the structure (strange -> winxp takes no care of the structure size
-members, such as cbSize, and win98 does...) (system.c)
-4. Changed Secondary Stack Allocation behavior - now we just leave 65kb of the
-stack NSIS give to us to the NSIS itself, and use the other part as the stack
-for our calls. (system.c)
-5. Secondary Stack Optimization - in case of no more pending callback procs -
-"free" the secondary stack pointer. (system.c)
-6. PlaySound("", 0, 0) plays the default windows sound at win9x, so changed to
-PlaySound(NULL, 0, 0) for effective sound stopping after splash (sysfunc.nsh).
-
-release 4, 3 september 2003.
-1. Division by zero fatal error at Int64Op killed.
-2. bool type removed (use int instead).
-3. GUID (g) and LPWSTR (w) types added.
-4. Memory cleanup after using t (string), g (guid) and w (unicode string) added.
-5. Automatic A-letter at proc name discovery.
-6. COM optimized: new proc specification "x->y", where x is interface ptr, and
-y is vtable member index. For such procs Interface pointer passed as first arg
-automatically.
-
-release 5, 11 september 2003.
-1. u flag - unload dll after procedure call.
-2. some changes to asm to turn on Whole Program Optimization.
-3. Dll shrunk by 1 kb.
-
-bug-fix-release, 4.06.2004
-1. System::Copy /SIZE fixed (Kichik).
-2. System::Copy with destination auto-allocation now pushes destination
-address on stack.
-3. Callbacks fixed (Kichik's kick is awesome).
-4. Bug with proc call parts redefinition, # for example (pointed by Kichik).
+release 2.
+1. Syntax, with inline input
+2. Int64 full support (conversion/operations/comparison)
+3. Structures support
+4. Callbacks support, including multilevel callbacks
+5. Some useful routines (Alloc, Free, Copy)
+6. CDecl and StdCall calling conventions
+
+release 3, 22 march 2003.
+1. Custom Message Boxes (with icons etc) -> bug in case of GetModuleHandle and
+call to FreeLibrary (sysfunc.nsh)
+2. GetFileSysTime -> No SystemTimeToTzSpecificLocalTime at win9x bug,
+changed to use FileTimeToLocalFileTime (sysfunc.nsh)
+3. Incorrect automatic structure size (&l) bug, value actually never filled
+into the structure (strange -> winxp takes no care of the structure size
+members, such as cbSize, and win98 does...) (system.c)
+4. Changed Secondary Stack Allocation behavior - now we just leave 65kb of the
+stack NSIS give to us to the NSIS itself, and use the other part as the stack
+for our calls. (system.c)
+5. Secondary Stack Optimization - in case of no more pending callback procs -
+"free" the secondary stack pointer. (system.c)
+6. PlaySound("", 0, 0) plays the default windows sound at win9x, so changed to
+PlaySound(NULL, 0, 0) for effective sound stopping after splash (sysfunc.nsh).
+
+release 4, 3 september 2003.
+1. Division by zero fatal error at Int64Op killed.
+2. bool type removed (use int instead).
+3. GUID (g) and LPWSTR (w) types added.
+4. Memory cleanup after using t (string), g (guid) and w (unicode string) added.
+5. Automatic A-letter at proc name discovery.
+6. COM optimized: new proc specification "x->y", where x is interface ptr, and
+y is vtable member index. For such procs Interface pointer passed as first arg
+automatically.
+
+release 5, 11 september 2003.
+1. u flag - unload dll after procedure call.
+2. some changes to asm to turn on Whole Program Optimization.
+3. Dll shrunk by 1 kb.
+
+bug-fix-release, 4.06.2004
+1. System::Copy /SIZE fixed (Kichik).
+2. System::Copy with destination auto-allocation now pushes destination
+address on stack.
+3. Callbacks fixed (Kichik's kick is awesome).
+4. Bug with proc call parts redefinition, # for example (pointed by Kichik).
5. Bug with memory protection during callback processing (Kichik). \ No newline at end of file
diff --git a/Contrib/UIs/SConscript b/Contrib/UIs/SConscript
index 7602eff..2e598ab 100755
--- a/Contrib/UIs/SConscript
+++ b/Contrib/UIs/SConscript
@@ -1,26 +1,26 @@
-code = 'ui.c'
-
-uis = Split("""
- default
- modern
- modern_headerbmp
- modern_headerbmpr
- modern_nodesc
- modern_smalldesc
- sdbarker_tiny
-""")
-
-libs = Split("""
- kernel32
- comctl32
- user32
- gdi32
-""")
-
-Import('BuildUtil env')
-
-code = env.Object(code)
-
-for ui in uis:
- ui = BuildUtil(ui, [code], libs, entry = 'WinMain', res = ui + '.rc', contrib = True, path = 'UIs')
- env.Alias('UIs', ui)
+code = 'ui.c'
+
+uis = Split("""
+ default
+ modern
+ modern_headerbmp
+ modern_headerbmpr
+ modern_nodesc
+ modern_smalldesc
+ sdbarker_tiny
+""")
+
+libs = Split("""
+ kernel32
+ comctl32
+ user32
+ gdi32
+""")
+
+Import('BuildUtil env')
+
+code = env.Object(code)
+
+for ui in uis:
+ ui = BuildUtil(ui, [code], libs, entry = 'WinMain', res = ui + '.rc', contrib = True, path = 'UIs')
+ env.Alias('UIs', ui)
diff --git a/Contrib/UIs/default.rc b/Contrib/UIs/default.rc
index 97a15f5..7e3f34f 100755
--- a/Contrib/UIs/default.rc
+++ b/Contrib/UIs/default.rc
@@ -1,120 +1,120 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_LICENSE DIALOGEX 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,105
-END
-
-IDD_LICENSE_FSRB DIALOG DISCARDABLE 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg"
-BEGIN
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,85
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,110,266,9
- CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,120,266,9
-END
-
-IDD_LICENSE_FSCB DIALOG DISCARDABLE 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg"
-BEGIN
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,95
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,0,120,266,9
-END
-
-IDD_DIR DIALOGEX 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- EDITTEXT IDC_DIR,8,49,187,12,ES_AUTOHSCROLL
- PUSHBUTTON "",IDC_BROWSE,202,48,55,14
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
-
- CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,122,
- 265,8
- CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
- WS_TABSTOP,8,71,118,10
- CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,111,
- 265,8
- LTEXT "",IDC_INTROTEXT,25,0,241,34
- GROUPBOX "",IDC_SELDIRTEXT,1,38,264,30
-END
-
-IDD_SELCOM DIALOGEX 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_COMBO1,114,25,152,102,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- LTEXT "",IDC_TEXT2,0,40,108,65
- CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,108,8
- LTEXT "",IDC_SPACEREQUIRED,0,111,111,18,NOT WS_GROUP
- LTEXT "",IDC_INTROTEXT,25,0,241,25
- CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
- WS_BORDER | WS_TABSTOP,114,39,151,90
-END
-
-IDD_INST DIALOGEX 0, 0, 280, 162
-STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",IDC_BACK,171,142,50,14,NOT WS_VISIBLE | WS_GROUP
- PUSHBUTTON "",IDOK,223,142,50,14
- PUSHBUTTON "",IDCANCEL,7,142,50,14
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | WS_GROUP,7,138,
- 267,1
- CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,7,6,266,130
- CTEXT "",IDC_VERSTR,59,145,108,8,WS_DISABLED
-END
-
-IDD_INSTFILES DIALOGEX 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
- 11
- CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX,
- 24,0,241,8
- CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
- LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
- WS_TABSTOP,0,25,265,104
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
-END
-
-IDD_UNINST DIALOGEX 0, 0, 266, 130
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON IDI_ICON2,IDC_ULICON,0,1,22,20
- LTEXT "",IDC_UNINSTFROM,0,45,55,8
- EDITTEXT IDC_EDIT1,56,43,209,12,ES_AUTOHSCROLL | ES_READONLY
- LTEXT "",IDC_INTROTEXT,25,0,241,34
-END
-
-IDD_VERIFY DIALOGEX 0, 0, 162, 22
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CTEXT "",IDC_STR,7,7,148,8
-END
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_LICENSE DIALOGEX 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,105
+END
+
+IDD_LICENSE_FSRB DIALOG DISCARDABLE 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,85
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,110,266,9
+ CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,120,266,9
+END
+
+IDD_LICENSE_FSCB DIALOG DISCARDABLE 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,95
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,0,120,266,9
+END
+
+IDD_DIR DIALOGEX 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ EDITTEXT IDC_DIR,8,49,187,12,ES_AUTOHSCROLL
+ PUSHBUTTON "",IDC_BROWSE,202,48,55,14
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+
+ CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,122,
+ 265,8
+ CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
+ WS_TABSTOP,8,71,118,10
+ CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,111,
+ 265,8
+ LTEXT "",IDC_INTROTEXT,25,0,241,34
+ GROUPBOX "",IDC_SELDIRTEXT,1,38,264,30
+END
+
+IDD_SELCOM DIALOGEX 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_COMBO1,114,25,152,102,CBS_DROPDOWNLIST | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ LTEXT "",IDC_TEXT2,0,40,108,65
+ CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,108,8
+ LTEXT "",IDC_SPACEREQUIRED,0,111,111,18,NOT WS_GROUP
+ LTEXT "",IDC_INTROTEXT,25,0,241,25
+ CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
+ WS_BORDER | WS_TABSTOP,114,39,151,90
+END
+
+IDD_INST DIALOGEX 0, 0, 280, 162
+STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",IDC_BACK,171,142,50,14,NOT WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "",IDOK,223,142,50,14
+ PUSHBUTTON "",IDCANCEL,7,142,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | WS_GROUP,7,138,
+ 267,1
+ CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,7,6,266,130
+ CTEXT "",IDC_VERSTR,59,145,108,8,WS_DISABLED
+END
+
+IDD_INSTFILES DIALOGEX 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
+ 11
+ CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX,
+ 24,0,241,8
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
+ LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
+ WS_TABSTOP,0,25,265,104
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
+END
+
+IDD_UNINST DIALOGEX 0, 0, 266, 130
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON IDI_ICON2,IDC_ULICON,0,1,22,20
+ LTEXT "",IDC_UNINSTFROM,0,45,55,8
+ EDITTEXT IDC_EDIT1,56,43,209,12,ES_AUTOHSCROLL | ES_READONLY
+ LTEXT "",IDC_INTROTEXT,25,0,241,34
+END
+
+IDD_VERIFY DIALOGEX 0, 0, 162, 22
+STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CTEXT "",IDC_STR,7,7,148,8
+END
diff --git a/Contrib/UIs/modern.rc b/Contrib/UIs/modern.rc
index 78db711..82b3d8a 100755
--- a/Contrib/UIs/modern.rc
+++ b/Contrib/UIs/modern.rc
@@ -1,131 +1,131 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_LICENSE DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "",1040,0,0,300,15,NOT WS_GROUP
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,15,300,93
- LTEXT "",IDC_INTROTEXT,0,113,300,26,NOT WS_GROUP
-END
-
-IDD_DIR DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- EDITTEXT IDC_DIR,10,85,210,12,ES_AUTOHSCROLL
- PUSHBUTTON "",IDC_BROWSE,228,83,60,15
- CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,125,
- 150,8
- CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
- WS_TABSTOP,180,110,118,10
- CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,115,
- 150,8
- LTEXT "",IDC_INTROTEXT,0,0,300,60,NOT WS_GROUP
- GROUPBOX "",IDC_SELDIRTEXT,0,70,300,35
-END
-
-IDD_SELCOM DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_COMBO1,102,25,98,107,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP
- CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,95,8
- LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP
- LTEXT "",IDC_INTROTEXT,0,0,300,20,NOT WS_GROUP
- CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
- WS_BORDER | WS_TABSTOP,102,40,98,95
- GROUPBOX "",1042,210,36,89,99
- LTEXT "",1043,215,46,78,84,NOT WS_GROUP
-END
-
-IDD_INST DIALOGEX 0, 0, 331, 222
-STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",3,166,201,50,14,WS_GROUP
- PUSHBUTTON "",1,216,201,50,14
- PUSHBUTTON "",2,273,201,50,14
- CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,15,45,300,140
- CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,0,0,331,193
- CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP,
- 5,193,321,1
- CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1
- CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE |
- WS_GROUP,0,193,340,1
- LTEXT "",1256,5,188,322,8
- LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED
- LTEXT "",IDC_LICENSEAGREE,0,0,332,35
- LTEXT "",1037,10,5,280,10
- LTEXT "",1038,15,16,275,16
- ICON 103,1039,300,8,21,20,WS_GROUP
-END
-
-IDD_INSTFILES DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",IDC_SHOWDETAILS,1,26,60,14,NOT WS_TABSTOP
- CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,0,10,300,
- 11
- CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP |
- SS_NOPREFIX,0,0,300,10
- CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
- LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
- WS_TABSTOP,0,25,300,110
-END
-
-IDD_UNINST DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "",IDC_UNINSTFROM,0,42,60,8,NOT WS_GROUP
- EDITTEXT IDC_EDIT1,65,40,234,12,ES_AUTOHSCROLL | ES_READONLY
- LTEXT "",IDC_INTROTEXT,0,0,300,30,NOT WS_GROUP
-END
-
-IDD_LICENSE_FSRB DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "",1040,0,0,300,15,NOT WS_GROUP
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,15,300,73
- LTEXT "",IDC_INTROTEXT,0,93,300,26,NOT WS_GROUP
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,120,300,9
- CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,130,300,9
-END
-
-IDD_LICENSE_FSCB DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "",1040,0,0,300,15,NOT WS_GROUP
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,15,300,83
- LTEXT "",IDC_INTROTEXT,0,103,300,26,NOT WS_GROUP
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,0,130,300,9
-END
-
-IDD_VERIFY DIALOGEX 0, 0, 167, 42
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CTEXT "",IDC_STR,40,25,120,10,NOT WS_GROUP
- ICON 103,-1,10,10,21,20
- CTEXT "Please wait while Setup is loading...",76,40,10,120,10,
- NOT WS_GROUP
-END
-
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_LICENSE DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "",1040,0,0,300,15,NOT WS_GROUP
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,15,300,93
+ LTEXT "",IDC_INTROTEXT,0,113,300,26,NOT WS_GROUP
+END
+
+IDD_DIR DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ EDITTEXT IDC_DIR,10,85,210,12,ES_AUTOHSCROLL
+ PUSHBUTTON "",IDC_BROWSE,228,83,60,15
+ CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,125,
+ 150,8
+ CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
+ WS_TABSTOP,180,110,118,10
+ CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,115,
+ 150,8
+ LTEXT "",IDC_INTROTEXT,0,0,300,60,NOT WS_GROUP
+ GROUPBOX "",IDC_SELDIRTEXT,0,70,300,35
+END
+
+IDD_SELCOM DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_COMBO1,102,25,98,107,CBS_DROPDOWNLIST | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP
+ CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,95,8
+ LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP
+ LTEXT "",IDC_INTROTEXT,0,0,300,20,NOT WS_GROUP
+ CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
+ WS_BORDER | WS_TABSTOP,102,40,98,95
+ GROUPBOX "",1042,210,36,89,99
+ LTEXT "",1043,215,46,78,84,NOT WS_GROUP
+END
+
+IDD_INST DIALOGEX 0, 0, 331, 222
+STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",3,166,201,50,14,WS_GROUP
+ PUSHBUTTON "",1,216,201,50,14
+ PUSHBUTTON "",2,273,201,50,14
+ CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,15,45,300,140
+ CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,0,0,331,193
+ CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP,
+ 5,193,321,1
+ CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1
+ CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE |
+ WS_GROUP,0,193,340,1
+ LTEXT "",1256,5,188,322,8
+ LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED
+ LTEXT "",IDC_LICENSEAGREE,0,0,332,35
+ LTEXT "",1037,10,5,280,10
+ LTEXT "",1038,15,16,275,16
+ ICON 103,1039,300,8,21,20,WS_GROUP
+END
+
+IDD_INSTFILES DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",IDC_SHOWDETAILS,1,26,60,14,NOT WS_TABSTOP
+ CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,0,10,300,
+ 11
+ CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP |
+ SS_NOPREFIX,0,0,300,10
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
+ LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
+ WS_TABSTOP,0,25,300,110
+END
+
+IDD_UNINST DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "",IDC_UNINSTFROM,0,42,60,8,NOT WS_GROUP
+ EDITTEXT IDC_EDIT1,65,40,234,12,ES_AUTOHSCROLL | ES_READONLY
+ LTEXT "",IDC_INTROTEXT,0,0,300,30,NOT WS_GROUP
+END
+
+IDD_LICENSE_FSRB DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "",1040,0,0,300,15,NOT WS_GROUP
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,15,300,73
+ LTEXT "",IDC_INTROTEXT,0,93,300,26,NOT WS_GROUP
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,120,300,9
+ CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,130,300,9
+END
+
+IDD_LICENSE_FSCB DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "",1040,0,0,300,15,NOT WS_GROUP
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,15,300,83
+ LTEXT "",IDC_INTROTEXT,0,103,300,26,NOT WS_GROUP
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,0,130,300,9
+END
+
+IDD_VERIFY DIALOGEX 0, 0, 167, 42
+STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CTEXT "",IDC_STR,40,25,120,10,NOT WS_GROUP
+ ICON 103,-1,10,10,21,20
+ CTEXT "Please wait while Setup is loading...",76,40,10,120,10,
+ NOT WS_GROUP
+END
+
diff --git a/Contrib/UIs/modern_headerbmp.rc b/Contrib/UIs/modern_headerbmp.rc
index 82a8120..ccc8c62 100755
--- a/Contrib/UIs/modern_headerbmp.rc
+++ b/Contrib/UIs/modern_headerbmp.rc
@@ -1,28 +1,28 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_INST DIALOGEX 0, 0, 331, 222
-STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",3,166,201,50,14,WS_GROUP
- PUSHBUTTON "",1,216,201,50,14
- PUSHBUTTON "",2,273,201,50,14
- CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,15,45,300,140
- CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,0,0,331,193
- CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP,
- 5,193,321,1
- CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1
- CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE |
- WS_GROUP,0,193,340,1
- LTEXT "",1256,5,188,322,8
- LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED
- LTEXT "",IDC_LICENSEAGREE,0,0,332,35
- LTEXT "",1037,105,5,215,10
- LTEXT "",1038,110,16,210,16
- CONTROL "",1046,"Static",SS_BITMAP,0,0,100,35
-END
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_INST DIALOGEX 0, 0, 331, 222
+STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",3,166,201,50,14,WS_GROUP
+ PUSHBUTTON "",1,216,201,50,14
+ PUSHBUTTON "",2,273,201,50,14
+ CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,15,45,300,140
+ CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,0,0,331,193
+ CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP,
+ 5,193,321,1
+ CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1
+ CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE |
+ WS_GROUP,0,193,340,1
+ LTEXT "",1256,5,188,322,8
+ LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED
+ LTEXT "",IDC_LICENSEAGREE,0,0,332,35
+ LTEXT "",1037,105,5,215,10
+ LTEXT "",1038,110,16,210,16
+ CONTROL "",1046,"Static",SS_BITMAP,0,0,100,35
+END
diff --git a/Contrib/UIs/modern_headerbmpr.rc b/Contrib/UIs/modern_headerbmpr.rc
index c611cc8..ca7ec54 100755
--- a/Contrib/UIs/modern_headerbmpr.rc
+++ b/Contrib/UIs/modern_headerbmpr.rc
@@ -1,28 +1,28 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_INST DIALOGEX 0, 0, 331, 222
-STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",3,166,201,50,14,WS_GROUP
- PUSHBUTTON "",1,216,201,50,14
- PUSHBUTTON "",2,273,201,50,14
- CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,15,45,300,140
- CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,0,0,331,193
- CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP,
- 5,193,321,1
- CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1
- CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE |
- WS_GROUP,0,193,340,1
- LTEXT "",1256,5,188,322,8
- LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED
- LTEXT "",IDC_LICENSEAGREE,0,0,332,35
- LTEXT "",1037,10,5,215,10
- LTEXT "",1038,15,16,210,16
- CONTROL "",1046,"Static",SS_BITMAP,231,0,100,35
-END
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_INST DIALOGEX 0, 0, 331, 222
+STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",3,166,201,50,14,WS_GROUP
+ PUSHBUTTON "",1,216,201,50,14
+ PUSHBUTTON "",2,273,201,50,14
+ CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,15,45,300,140
+ CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,0,0,331,193
+ CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP,
+ 5,193,321,1
+ CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1
+ CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE |
+ WS_GROUP,0,193,340,1
+ LTEXT "",1256,5,188,322,8
+ LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED
+ LTEXT "",IDC_LICENSEAGREE,0,0,332,35
+ LTEXT "",1037,10,5,215,10
+ LTEXT "",1038,15,16,210,16
+ CONTROL "",1046,"Static",SS_BITMAP,231,0,100,35
+END
diff --git a/Contrib/UIs/modern_nodesc.rc b/Contrib/UIs/modern_nodesc.rc
index 1cd3d00..b61b5bf 100755
--- a/Contrib/UIs/modern_nodesc.rc
+++ b/Contrib/UIs/modern_nodesc.rc
@@ -1,18 +1,18 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_SELCOM DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_COMBO1,102,25,195,104,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP
- CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,95,8
- LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP
- LTEXT "",IDC_INTROTEXT,0,0,300,20,NOT WS_GROUP
- CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
- WS_BORDER | WS_TABSTOP,102,40,195,95
-END
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_SELCOM DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_COMBO1,102,25,195,104,CBS_DROPDOWNLIST | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP
+ CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,95,8
+ LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP
+ LTEXT "",IDC_INTROTEXT,0,0,300,20,NOT WS_GROUP
+ CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
+ WS_BORDER | WS_TABSTOP,102,40,195,95
+END
diff --git a/Contrib/UIs/modern_smalldesc.rc b/Contrib/UIs/modern_smalldesc.rc
index 655d791..9b09a52 100755
--- a/Contrib/UIs/modern_smalldesc.rc
+++ b/Contrib/UIs/modern_smalldesc.rc
@@ -1,20 +1,20 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_SELCOM DIALOGEX 0, 0, 300, 140
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_COMBO1,102,25,195,74,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP
- CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,95,8
- LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP
- LTEXT "",IDC_INTROTEXT,0,0,300,20,NOT WS_GROUP
- CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
- WS_BORDER | WS_TABSTOP,102,40,195,65
- GROUPBOX "",1042,102,105,195,35
- LTEXT "",1043,108,117,183,18,NOT WS_GROUP
-END
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_SELCOM DIALOGEX 0, 0, 300, 140
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_COMBO1,102,25,195,74,CBS_DROPDOWNLIST | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP
+ CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,95,8
+ LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP
+ LTEXT "",IDC_INTROTEXT,0,0,300,20,NOT WS_GROUP
+ CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
+ WS_BORDER | WS_TABSTOP,102,40,195,65
+ GROUPBOX "",1042,102,105,195,35
+ LTEXT "",1043,108,117,183,18,NOT WS_GROUP
+END
diff --git a/Contrib/UIs/resource.h b/Contrib/UIs/resource.h
index 26dac5d..baeee93 100755
--- a/Contrib/UIs/resource.h
+++ b/Contrib/UIs/resource.h
@@ -1,45 +1,45 @@
-#include <windows.h>
-
-#ifndef IDC_STATIC
-#define IDC_STATIC (-1)
-#endif
-
-#ifndef DS_SHELLFONT
-#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
-#endif
-
-#define IDC_BACK 3
-#define IDD_LICENSE 102
-#define IDD_LICENSE_FSRB 108
-#define IDD_LICENSE_FSCB 109
-#define IDI_ICON2 103
-#define IDD_DIR 103
-#define IDD_SELCOM 104
-#define IDD_INST 105
-#define IDD_INSTFILES 106
-#define IDD_UNINST 107
-#define IDD_VERIFY 111
-#define IDB_BITMAP1 110
-#define IDC_EDIT1 1000
-#define IDC_BROWSE 1001
-#define IDC_PROGRESS 1004
-#define IDC_INTROTEXT 1006
-#define IDC_CHECK1 1008
-#define IDC_LIST1 1016
-#define IDC_COMBO1 1017
-#define IDC_CHILDRECT 1018
-#define IDC_DIR 1019
-#define IDC_SELDIRTEXT 1020
-#define IDC_TEXT1 1021
-#define IDC_TEXT2 1022
-#define IDC_SPACEREQUIRED 1023
-#define IDC_SPACEAVAILABLE 1024
-#define IDC_SHOWDETAILS 1027
-#define IDC_VERSTR 1028
-#define IDC_UNINSTFROM 1029
-#define IDC_STR 1030
-#define IDC_ULICON 1031
-#define IDC_TREE1 1032
-#define IDC_BRANDIMAGE 1033
-#define IDC_LICENSEAGREE 1034
-#define IDC_LICENSEDISAGREE 1035
+#include <windows.h>
+
+#ifndef IDC_STATIC
+#define IDC_STATIC (-1)
+#endif
+
+#ifndef DS_SHELLFONT
+#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
+#endif
+
+#define IDC_BACK 3
+#define IDD_LICENSE 102
+#define IDD_LICENSE_FSRB 108
+#define IDD_LICENSE_FSCB 109
+#define IDI_ICON2 103
+#define IDD_DIR 103
+#define IDD_SELCOM 104
+#define IDD_INST 105
+#define IDD_INSTFILES 106
+#define IDD_UNINST 107
+#define IDD_VERIFY 111
+#define IDB_BITMAP1 110
+#define IDC_EDIT1 1000
+#define IDC_BROWSE 1001
+#define IDC_PROGRESS 1004
+#define IDC_INTROTEXT 1006
+#define IDC_CHECK1 1008
+#define IDC_LIST1 1016
+#define IDC_COMBO1 1017
+#define IDC_CHILDRECT 1018
+#define IDC_DIR 1019
+#define IDC_SELDIRTEXT 1020
+#define IDC_TEXT1 1021
+#define IDC_TEXT2 1022
+#define IDC_SPACEREQUIRED 1023
+#define IDC_SPACEAVAILABLE 1024
+#define IDC_SHOWDETAILS 1027
+#define IDC_VERSTR 1028
+#define IDC_UNINSTFROM 1029
+#define IDC_STR 1030
+#define IDC_ULICON 1031
+#define IDC_TREE1 1032
+#define IDC_BRANDIMAGE 1033
+#define IDC_LICENSEAGREE 1034
+#define IDC_LICENSEDISAGREE 1035
diff --git a/Contrib/UIs/sdbarker_tiny.rc b/Contrib/UIs/sdbarker_tiny.rc
index e5e622f..d870b21 100755
--- a/Contrib/UIs/sdbarker_tiny.rc
+++ b/Contrib/UIs/sdbarker_tiny.rc
@@ -1,119 +1,119 @@
-#include "resource.h"
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-IDD_LICENSE DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON 103,IDC_ULICON,0,0,20,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23,NOT WS_GROUP
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,47
-END
-
-IDD_DIR DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- EDITTEXT IDC_DIR,8,35,187,12,ES_AUTOHSCROLL
- PUSHBUTTON "",IDC_BROWSE,202,34,55,14
- ICON 103,IDC_ULICON,0,0,20,20
- CONTROL "",IDC_SELDIRTEXT,"Static",SS_LEFTNOWORDWRAP,0,22,265,8
- CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
- WS_TABSTOP,187,54,78,10
- CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,1,63,
- 185,8
- CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,1,54,185,
- 8
- LTEXT "",IDC_INTROTEXT,25,0,241,18,NOT WS_GROUP
-END
-
-IDD_SELCOM DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_COMBO1,114,15,152,94,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- ICON 103,IDC_ULICON,0,0,21,20
- LTEXT "",IDC_TEXT2,0,33,108,29,NOT WS_GROUP
- CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,20,108,8
- CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,60,111,
- 8
- LTEXT "",IDC_INTROTEXT,25,0,241,15,NOT WS_GROUP
- CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
- WS_BORDER | WS_TABSTOP,114,28,151,42
-END
-
-IDD_INST DIALOGEX 0, 0, 280, 105
-STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",3,171,84,50,14,NOT WS_VISIBLE | WS_GROUP
- PUSHBUTTON "",1,223,84,50,14
- PUSHBUTTON "",2,7,84,50,14
- CONTROL "",-1,"Static",SS_ETCHEDHORZ | WS_GROUP,7,79,265,1
- CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,7,6,266,70
- CTEXT "",IDC_VERSTR,59,86,108,8,WS_DISABLED
-END
-
-IDD_INSTFILES DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
- 11
- CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP |
- SS_NOPREFIX,24,0,241,8
- CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
- LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
- WS_TABSTOP,0,22,265,48
- ICON 103,IDC_ULICON,0,0,20,20
- PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
-END
-
-IDD_UNINST DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON 103,IDC_ULICON,0,1,20,20
- LTEXT "",IDC_UNINSTFROM,0,47,55,8,NOT WS_GROUP
- EDITTEXT IDC_EDIT1,56,45,209,12,ES_AUTOHSCROLL | ES_READONLY
- LTEXT "",IDC_INTROTEXT,25,0,241,34,NOT WS_GROUP
-END
-
-IDD_LICENSE_FSRB DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON 103,IDC_ULICON,0,0,20,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23,NOT WS_GROUP
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,27
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,50,266,9
- CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,60,266,9
-END
-
-IDD_LICENSE_FSCB DIALOGEX 0, 0, 266, 70
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON 103,IDC_ULICON,0,0,20,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23,NOT WS_GROUP
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,37
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,0,60,266,9
-END
-
-IDD_VERIFY DIALOGEX 0, 0, 162, 22
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CTEXT "",IDC_STR,7,7,148,8,NOT WS_GROUP
-END
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_LICENSE DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON 103,IDC_ULICON,0,0,20,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23,NOT WS_GROUP
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,47
+END
+
+IDD_DIR DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ EDITTEXT IDC_DIR,8,35,187,12,ES_AUTOHSCROLL
+ PUSHBUTTON "",IDC_BROWSE,202,34,55,14
+ ICON 103,IDC_ULICON,0,0,20,20
+ CONTROL "",IDC_SELDIRTEXT,"Static",SS_LEFTNOWORDWRAP,0,22,265,8
+ CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
+ WS_TABSTOP,187,54,78,10
+ CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,1,63,
+ 185,8
+ CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,1,54,185,
+ 8
+ LTEXT "",IDC_INTROTEXT,25,0,241,18,NOT WS_GROUP
+END
+
+IDD_SELCOM DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_COMBO1,114,15,152,94,CBS_DROPDOWNLIST | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ ICON 103,IDC_ULICON,0,0,21,20
+ LTEXT "",IDC_TEXT2,0,33,108,29,NOT WS_GROUP
+ CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,20,108,8
+ CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,60,111,
+ 8
+ LTEXT "",IDC_INTROTEXT,25,0,241,15,NOT WS_GROUP
+ CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
+ WS_BORDER | WS_TABSTOP,114,28,151,42
+END
+
+IDD_INST DIALOGEX 0, 0, 280, 105
+STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",3,171,84,50,14,NOT WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "",1,223,84,50,14
+ PUSHBUTTON "",2,7,84,50,14
+ CONTROL "",-1,"Static",SS_ETCHEDHORZ | WS_GROUP,7,79,265,1
+ CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,7,6,266,70
+ CTEXT "",IDC_VERSTR,59,86,108,8,WS_DISABLED
+END
+
+IDD_INSTFILES DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
+ 11
+ CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP |
+ SS_NOPREFIX,24,0,241,8
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
+ LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
+ WS_TABSTOP,0,22,265,48
+ ICON 103,IDC_ULICON,0,0,20,20
+ PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
+END
+
+IDD_UNINST DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON 103,IDC_ULICON,0,1,20,20
+ LTEXT "",IDC_UNINSTFROM,0,47,55,8,NOT WS_GROUP
+ EDITTEXT IDC_EDIT1,56,45,209,12,ES_AUTOHSCROLL | ES_READONLY
+ LTEXT "",IDC_INTROTEXT,25,0,241,34,NOT WS_GROUP
+END
+
+IDD_LICENSE_FSRB DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON 103,IDC_ULICON,0,0,20,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23,NOT WS_GROUP
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,27
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,50,266,9
+ CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,60,266,9
+END
+
+IDD_LICENSE_FSCB DIALOGEX 0, 0, 266, 70
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON 103,IDC_ULICON,0,0,20,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23,NOT WS_GROUP
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,37
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,0,60,266,9
+END
+
+IDD_VERIFY DIALOGEX 0, 0, 162, 22
+STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CTEXT "",IDC_STR,7,7,148,8,NOT WS_GROUP
+END
diff --git a/Contrib/UIs/ui.c b/Contrib/UIs/ui.c
index 286c448..91a7c7b 100755
--- a/Contrib/UIs/ui.c
+++ b/Contrib/UIs/ui.c
@@ -1,102 +1,102 @@
-// ui.cpp : Defines the entry point for the application.
-//
-
-#include <windows.h>
-#include <commctrl.h>
-#include "resource.h"
-
-HINSTANCE g_hInstance;
-HWND m_curwnd;
-
-char* windows[] = {
- MAKEINTRESOURCE(IDD_LICENSE),
- MAKEINTRESOURCE(IDD_SELCOM),
- MAKEINTRESOURCE(IDD_DIR),
- MAKEINTRESOURCE(IDD_INSTFILES),
- MAKEINTRESOURCE(IDD_UNINST)
-};
-
-BOOL CALLBACK GenericProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
- static LOGBRUSH b = {BS_SOLID, RGB(255,0,0), 0};
- static HBRUSH red;
-
- if (!red)
- red = CreateBrushIndirect(&b);
-
- switch (uMsg) {
- case WM_CTLCOLORSTATIC:
- return (int)red;
- }
- return 0;
-}
-
-BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
- static int i = -1;
- switch (uMsg) {
- case WM_INITDIALOG:
- SetWindowText(hwndDlg, "NSIS User Interface - Testing");
- SetWindowText(GetDlgItem(hwndDlg, IDC_VERSTR), "NSIS version");
- SetWindowText(GetDlgItem(hwndDlg, IDC_BACK), "< Back");
- SetWindowText(GetDlgItem(hwndDlg, IDOK), "Next >");
- SetWindowText(GetDlgItem(hwndDlg, IDCANCEL), "Cancel");
- ShowWindow(GetDlgItem(hwndDlg, IDC_BACK), SW_SHOW);
- ShowWindow(GetDlgItem(hwndDlg, IDC_CHILDRECT), SW_SHOW);
- SendMessage(hwndDlg, WM_COMMAND, MAKEWORD(IDOK, 0), 0);
- ShowWindow(hwndDlg, SW_SHOW);
- break;
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDOK:
- case IDC_BACK:
- i+=(LOWORD(wParam)==IDOK)?1:-1;
- if (i < 0) {
- i++;
- break;
- }
- if (i >= (int)sizeof(windows)/sizeof(char*)) {
- i--;
- break;
- }
- if (m_curwnd) DestroyWindow(m_curwnd);
- m_curwnd=CreateDialog(g_hInstance,windows[i],hwndDlg,GenericProc);
- if (m_curwnd)
- {
- RECT r;
- GetWindowRect(GetDlgItem(hwndDlg,IDC_CHILDRECT),&r);
- ScreenToClient(hwndDlg,(LPPOINT)&r);
- SetWindowPos(m_curwnd,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
- ShowWindow(m_curwnd,SW_SHOWNA);
- }
- break;
- default:
- EndDialog(hwndDlg, 0);
- PostQuitMessage(0);
- break;
- }
- break;
- }
- return 0;
-}
-
-int APIENTRY WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
-{
- InitCommonControls();
-
- LoadLibrary("RichEd32.dll");
-
- g_hInstance = GetModuleHandle(0);
-
- DialogBox(
- GetModuleHandle(0),
- MAKEINTRESOURCE(IDD_INST),
- 0,
- DialogProc
- );
-
- ExitProcess(0);
-
- return 0;
-}
+// ui.cpp : Defines the entry point for the application.
+//
+
+#include <windows.h>
+#include <commctrl.h>
+#include "resource.h"
+
+HINSTANCE g_hInstance;
+HWND m_curwnd;
+
+char* windows[] = {
+ MAKEINTRESOURCE(IDD_LICENSE),
+ MAKEINTRESOURCE(IDD_SELCOM),
+ MAKEINTRESOURCE(IDD_DIR),
+ MAKEINTRESOURCE(IDD_INSTFILES),
+ MAKEINTRESOURCE(IDD_UNINST)
+};
+
+BOOL CALLBACK GenericProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
+ static LOGBRUSH b = {BS_SOLID, RGB(255,0,0), 0};
+ static HBRUSH red;
+
+ if (!red)
+ red = CreateBrushIndirect(&b);
+
+ switch (uMsg) {
+ case WM_CTLCOLORSTATIC:
+ return (int)red;
+ }
+ return 0;
+}
+
+BOOL CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) {
+ static int i = -1;
+ switch (uMsg) {
+ case WM_INITDIALOG:
+ SetWindowText(hwndDlg, "NSIS User Interface - Testing");
+ SetWindowText(GetDlgItem(hwndDlg, IDC_VERSTR), "NSIS version");
+ SetWindowText(GetDlgItem(hwndDlg, IDC_BACK), "< Back");
+ SetWindowText(GetDlgItem(hwndDlg, IDOK), "Next >");
+ SetWindowText(GetDlgItem(hwndDlg, IDCANCEL), "Cancel");
+ ShowWindow(GetDlgItem(hwndDlg, IDC_BACK), SW_SHOW);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_CHILDRECT), SW_SHOW);
+ SendMessage(hwndDlg, WM_COMMAND, MAKEWORD(IDOK, 0), 0);
+ ShowWindow(hwndDlg, SW_SHOW);
+ break;
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ case IDC_BACK:
+ i+=(LOWORD(wParam)==IDOK)?1:-1;
+ if (i < 0) {
+ i++;
+ break;
+ }
+ if (i >= (int)sizeof(windows)/sizeof(char*)) {
+ i--;
+ break;
+ }
+ if (m_curwnd) DestroyWindow(m_curwnd);
+ m_curwnd=CreateDialog(g_hInstance,windows[i],hwndDlg,GenericProc);
+ if (m_curwnd)
+ {
+ RECT r;
+ GetWindowRect(GetDlgItem(hwndDlg,IDC_CHILDRECT),&r);
+ ScreenToClient(hwndDlg,(LPPOINT)&r);
+ SetWindowPos(m_curwnd,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
+ ShowWindow(m_curwnd,SW_SHOWNA);
+ }
+ break;
+ default:
+ EndDialog(hwndDlg, 0);
+ PostQuitMessage(0);
+ break;
+ }
+ break;
+ }
+ return 0;
+}
+
+int APIENTRY WinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
+{
+ InitCommonControls();
+
+ LoadLibrary("RichEd32.dll");
+
+ g_hInstance = GetModuleHandle(0);
+
+ DialogBox(
+ GetModuleHandle(0),
+ MAKEINTRESOURCE(IDD_INST),
+ 0,
+ DialogProc
+ );
+
+ ExitProcess(0);
+
+ return 0;
+}
diff --git a/Contrib/UserInfo/SConscript b/Contrib/UserInfo/SConscript
index a8d3d1f..b0645a6 100755
--- a/Contrib/UserInfo/SConscript
+++ b/Contrib/UserInfo/SConscript
@@ -1,18 +1,18 @@
-target = 'UserInfo'
-
-files = Split("""
- UserInfo.c
-""")
-
-libs = Split("""
- kernel32
- advapi32
-""")
-
-examples = Split("""
- UserInfo.nsi
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples)
+target = 'UserInfo'
+
+files = Split("""
+ UserInfo.c
+""")
+
+libs = Split("""
+ kernel32
+ advapi32
+""")
+
+examples = Split("""
+ UserInfo.nsi
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples)
diff --git a/Contrib/UserInfo/UserInfo.c b/Contrib/UserInfo/UserInfo.c
index 9aa3282..74874ee 100755
--- a/Contrib/UserInfo/UserInfo.c
+++ b/Contrib/UserInfo/UserInfo.c
@@ -1,145 +1,145 @@
-#include <windows.h>
-#include "../ExDLL/exdll.h"
-typedef BOOL (WINAPI*CHECKTOKENMEMBERSHIP)(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember);
-CHECKTOKENMEMBERSHIP _CheckTokenMembership=NULL;
-
-void __declspec(dllexport) GetName(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- EXDLL_INIT();
-
- {
- DWORD dwStringSize = g_stringsize;
- stack_t *th;
- if (!g_stacktop) return;
- th = (stack_t*) GlobalAlloc(GPTR, sizeof(stack_t) + g_stringsize);
- GetUserName(th->text, &dwStringSize);
- th->next = *g_stacktop;
- *g_stacktop = th;
- }
-}
-
-char* GetAccountTypeHelper(BOOL CheckTokenForGroupDeny)
-{
- char *group = NULL;
- HANDLE hToken = NULL;
- struct group
- {
- DWORD auth_id;
- char *name;
- };
-
- struct group groups[] =
- {
- {DOMAIN_ALIAS_RID_USERS, "User"},
- // every user belongs to the users group, hence users come before guests
- {DOMAIN_ALIAS_RID_GUESTS, "Guest"},
- {DOMAIN_ALIAS_RID_POWER_USERS, "Power"},
- {DOMAIN_ALIAS_RID_ADMINS, "Admin"}
- };
-
- if (GetVersion() & 0x80000000) // Not NT
- {
- return "Admin";
- }
-
- // First we must open a handle to the access token for this thread.
- if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken) ||
- OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
- {
- SID_IDENTIFIER_AUTHORITY SystemSidAuthority = {SECURITY_NT_AUTHORITY};
- TOKEN_GROUPS *ptg = NULL;
- BOOL ValidTokenGroups = FALSE;
- DWORD cbTokenGroups;
- DWORD i, j;
-
-
- if (CheckTokenForGroupDeny)
- // GetUserName is in advapi32.dll so we can avoid Load/Freelibrary
- _CheckTokenMembership=
- (CHECKTOKENMEMBERSHIP) GetProcAddress(
- GetModuleHandle("ADVAPI32"), "CheckTokenMembership");
-
- // Use "old school" membership check?
- if (!CheckTokenForGroupDeny || _CheckTokenMembership == NULL)
- {
- // We must query the size of the group information associated with
- // the token. Note that we expect a FALSE result from GetTokenInformation
- // because we've given it a NULL buffer. On exit cbTokenGroups will tell
- // the size of the group information.
- if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &cbTokenGroups) &&
- GetLastError() == ERROR_INSUFFICIENT_BUFFER)
- {
- // Allocate buffer and ask for the group information again.
- // This may fail if an administrator has added this account
- // to an additional group between our first call to
- // GetTokenInformation and this one.
- if ((ptg = GlobalAlloc(GPTR, cbTokenGroups)) &&
- GetTokenInformation(hToken, TokenGroups, ptg, cbTokenGroups, &cbTokenGroups))
- {
- ValidTokenGroups=TRUE;
- }
- }
- }
-
- if (ValidTokenGroups || (CheckTokenForGroupDeny && _CheckTokenMembership))
- {
- PSID psid;
- for (i = 0; i < sizeof(groups)/sizeof(struct group); i++)
- {
- // Create a SID for the local group and then check if it exists in our token
- if (AllocateAndInitializeSid(
- &SystemSidAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID,
- groups[i].auth_id, 0, 0, 0, 0, 0, 0,&psid))
- {
- BOOL IsMember = FALSE;
- if (CheckTokenForGroupDeny && _CheckTokenMembership)
- {
- _CheckTokenMembership(0, psid, &IsMember);
- }
- else if (ValidTokenGroups)
- {
- for (j = 0; j < ptg->GroupCount; j++)
- {
- if (EqualSid(ptg->Groups[j].Sid, psid))
- {
- IsMember = TRUE;
- }
- }
- }
-
- if (IsMember) group=groups[i].name;
- FreeSid(psid);
- }
- }
- }
-
- if (ptg)
- GlobalFree(ptg);
- CloseHandle(hToken);
-
- return group;
- }
-
- return "";
-}
-
-void __declspec(dllexport) GetAccountType(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- EXDLL_INIT();
- pushstring(GetAccountTypeHelper(TRUE));
-}
-
-void __declspec(dllexport) GetOriginalAccountType(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop)
-{
- EXDLL_INIT();
- pushstring(GetAccountTypeHelper(FALSE));
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- return TRUE;
-}
-
+#include <windows.h>
+#include "../ExDLL/exdll.h"
+typedef BOOL (WINAPI*CHECKTOKENMEMBERSHIP)(HANDLE TokenHandle,PSID SidToCheck,PBOOL IsMember);
+CHECKTOKENMEMBERSHIP _CheckTokenMembership=NULL;
+
+void __declspec(dllexport) GetName(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ EXDLL_INIT();
+
+ {
+ DWORD dwStringSize = g_stringsize;
+ stack_t *th;
+ if (!g_stacktop) return;
+ th = (stack_t*) GlobalAlloc(GPTR, sizeof(stack_t) + g_stringsize);
+ GetUserName(th->text, &dwStringSize);
+ th->next = *g_stacktop;
+ *g_stacktop = th;
+ }
+}
+
+char* GetAccountTypeHelper(BOOL CheckTokenForGroupDeny)
+{
+ char *group = NULL;
+ HANDLE hToken = NULL;
+ struct group
+ {
+ DWORD auth_id;
+ char *name;
+ };
+
+ struct group groups[] =
+ {
+ {DOMAIN_ALIAS_RID_USERS, "User"},
+ // every user belongs to the users group, hence users come before guests
+ {DOMAIN_ALIAS_RID_GUESTS, "Guest"},
+ {DOMAIN_ALIAS_RID_POWER_USERS, "Power"},
+ {DOMAIN_ALIAS_RID_ADMINS, "Admin"}
+ };
+
+ if (GetVersion() & 0x80000000) // Not NT
+ {
+ return "Admin";
+ }
+
+ // First we must open a handle to the access token for this thread.
+ if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &hToken) ||
+ OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
+ {
+ SID_IDENTIFIER_AUTHORITY SystemSidAuthority = {SECURITY_NT_AUTHORITY};
+ TOKEN_GROUPS *ptg = NULL;
+ BOOL ValidTokenGroups = FALSE;
+ DWORD cbTokenGroups;
+ DWORD i, j;
+
+
+ if (CheckTokenForGroupDeny)
+ // GetUserName is in advapi32.dll so we can avoid Load/Freelibrary
+ _CheckTokenMembership=
+ (CHECKTOKENMEMBERSHIP) GetProcAddress(
+ GetModuleHandle("ADVAPI32"), "CheckTokenMembership");
+
+ // Use "old school" membership check?
+ if (!CheckTokenForGroupDeny || _CheckTokenMembership == NULL)
+ {
+ // We must query the size of the group information associated with
+ // the token. Note that we expect a FALSE result from GetTokenInformation
+ // because we've given it a NULL buffer. On exit cbTokenGroups will tell
+ // the size of the group information.
+ if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &cbTokenGroups) &&
+ GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ {
+ // Allocate buffer and ask for the group information again.
+ // This may fail if an administrator has added this account
+ // to an additional group between our first call to
+ // GetTokenInformation and this one.
+ if ((ptg = GlobalAlloc(GPTR, cbTokenGroups)) &&
+ GetTokenInformation(hToken, TokenGroups, ptg, cbTokenGroups, &cbTokenGroups))
+ {
+ ValidTokenGroups=TRUE;
+ }
+ }
+ }
+
+ if (ValidTokenGroups || (CheckTokenForGroupDeny && _CheckTokenMembership))
+ {
+ PSID psid;
+ for (i = 0; i < sizeof(groups)/sizeof(struct group); i++)
+ {
+ // Create a SID for the local group and then check if it exists in our token
+ if (AllocateAndInitializeSid(
+ &SystemSidAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID,
+ groups[i].auth_id, 0, 0, 0, 0, 0, 0,&psid))
+ {
+ BOOL IsMember = FALSE;
+ if (CheckTokenForGroupDeny && _CheckTokenMembership)
+ {
+ _CheckTokenMembership(0, psid, &IsMember);
+ }
+ else if (ValidTokenGroups)
+ {
+ for (j = 0; j < ptg->GroupCount; j++)
+ {
+ if (EqualSid(ptg->Groups[j].Sid, psid))
+ {
+ IsMember = TRUE;
+ }
+ }
+ }
+
+ if (IsMember) group=groups[i].name;
+ FreeSid(psid);
+ }
+ }
+ }
+
+ if (ptg)
+ GlobalFree(ptg);
+ CloseHandle(hToken);
+
+ return group;
+ }
+
+ return "";
+}
+
+void __declspec(dllexport) GetAccountType(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ EXDLL_INIT();
+ pushstring(GetAccountTypeHelper(TRUE));
+}
+
+void __declspec(dllexport) GetOriginalAccountType(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop)
+{
+ EXDLL_INIT();
+ pushstring(GetAccountTypeHelper(FALSE));
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ return TRUE;
+}
+
diff --git a/Contrib/UserInfo/UserInfo.nsi b/Contrib/UserInfo/UserInfo.nsi
index 3503eee..e05a161 100755
--- a/Contrib/UserInfo/UserInfo.nsi
+++ b/Contrib/UserInfo/UserInfo.nsi
@@ -1,44 +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
-
+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/Contrib/VPatch/Readme.html b/Contrib/VPatch/Readme.html
index 609481d..d977479 100755
--- a/Contrib/VPatch/Readme.html
+++ b/Contrib/VPatch/Readme.html
@@ -1,341 +1,341 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>VPatch 3</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-<style type="text/css">
-/*<![CDATA[*/
-
-body
- {
- padding: 10px;
- background-color: #F0F0F0;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 13px;
- font-weight: normal;
- text-align: left;
- }
-
-p, li
- {
- font-size: 13px;
- }
-
-.center
- {
- text-align: center;
- }
-
-table
- {
- margin: auto;
- font-size: 13px;
- background-color: #FFFFFF;
- }
-
-.maintable
- {
- border: 2px solid #376EAB;
- }
-
-.parameter
- {
- font-weight: bold;
- color: #6586AC;
- }
-
-
-h1
- {
- font-size: 30px;
- color: #333333;
- font-weight: normal;
- text-align: center;
- margin-top: 20px;
- }
-
-h2
- {
- font-size: 20px;
- color: #7A7272;
- font-weight: normal;
- }
-
-h3
- {
- font-size: 17px;
- font-weight: bold;
- color: #303030;
- }
-
-pre {
- font-size: 13px;
- }
-
-div
- {
- margin: 20px;
- }
-
-a:link, a:visited, a:active
- {
- color: #294F75;
- text-decoration: none;
- }
-
-a:hover
- {
- color: #182634;
- text-decoration: underline;
- }
-
-/*]]>*/
-</style>
-</head>
-<body>
-<table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
- <tr>
- <td>
-
- <h1>VPatch 3.1</h1>
- <div>
- <h2>Introduction</h2>
- <div>
- <p>VPatch allows to create a patch file to update previous versions
- of your software. The GenPat utility generates the patch file. The
- plug-in can use the patch to update a file. Using a patch, you can
- reduce the download size of your updates, because only the differences
- between the files are included in the patch file.</p>
- </div>
- <h2>How to use</h2>
- <div>
- <h3>Generate the patch file</h3>
- <div>
- <p>Make sure you have the source file (original version) and the target
- file (version to update to). For example, DATA.DTA (currently on user
- system) and DATA_20.DTA (version 2.0 of this data file). Now call
- the command line tool GenPat.exe:</p>
- <pre>
-GENPAT oldfile.txt newfile.txt patch.pat
-</pre>
- <p>Now, the patch will be generated, this will take some time.</p>
- <p>Using the /B=(BlockSize) parameter of the GenPat utility (put it
- after the filenames), you can use a different block size. A smaller
- block size may result in a smaller patch, but the generation will
- take more time (the default blocksize is 64).</p>
- <p>If you have trouble using this command-line utility, you can download
- a GUI (graphical user interface) for VPatch from its own website:
- <a href="http://www.tibed.net/vpatch">http://www.tibed.net/vpatch</a>.</p>
- </div>
- <h3>Update the file during installation</h3>
- <div>
- <p>Use the VPatch plug-in to update a file using a patch file:</p>
- <pre>
-vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"
-</pre>
- <p>The result of the patch operating will be added to the stack and
- can be one of the following texts:</p>
- <ul>
- <li>OK</li>
- <li>OK, new version already installed</li>
- <li>An error occurred while patching</li>
- <li>Patch data is invalid or corrupt</li>
- <li>No suitable patches were found</li>
- </ul>
- <p>Check <a href="../../Examples/VPatch/example.nsi">example.nsi</a> for an example. You
- should check whether the stack string starts with &quot;OK&quot;
- because then the patch has succeeded and you can rename &quot;temporary_newfile.txt&quot;
- to &quot;oldfile.txt&quot; to replace the original, if you want.</p>
- </div>
- <h3>Multiple patches in one file</h3>
- <div>
- <p>GenPat appends a patch to the file you specified. If there is already
- a patch for the same original file, with the same CRC, in the patch file,
- the patch will be replaced. For example, if you want to be able to upgrade
- version 1 and 2 to version 3, you can put a 1 &gt; 3 and 2 &gt; 3 patch in
- one file.</p>
- <p>You can also put patches for different files in one patch file, for
- example, a patch from file A version 1 to file A version 2 and a patch
- from file B version 1 to file B version 2. Just call the plug-in multiple
- times with the same patch file. It will automatically select the right
- patch (based on the file CRC).</p>
- </div>
- <h3>Patch generator (GenPat) exit codes</h3>
- <div>
- <p>In version 3 the following exit codes (known as error levels in
- the DOS period) can be returned by GenPat. GenPat will return an
- exit code based on success of the patch generation. Here is a list
- of the possible exit codes:</p>
- <table width="547" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><b>Exit code</b></td>
- <td><b>Description</b></td>
- </tr>
- <tr>
- <td>0</td>
- <td>Success</td>
- </tr>
- <tr>
- <td>1</td>
- <td>Arguments missing</td>
- </tr>
- <tr>
- <td>2</td>
- <td>Other error</td>
- </tr>
- <tr>
- <td>3</td>
- <td>Source file already has a patch in specified patch file (ERROR),
- use /R switch to override</td>
- </tr>
- </table>
- <p>These exit codes can be useful when you generate patch files through
- a NSIS script.</p>
- </div>
- </div>
- </div>
- <div>
- <h2>Source code</h2>
- <div>
- <p>Source code is available in the original package and in the CVS repository of NSIS.</p>
- <h3>NSIS plug-in (C++)</h3>
- <div>
- <p>The source of the NSIS plug-in that applies patches can be found
- in the Source\Plugin folder.</p>
- </div>
- <h3>Patch Generator (C++)</h3>
- <div>
- <p>The most interesting part of VPatch, the actual patch generation
- algorithm, can be found in Source\GenPat\PatchGenerator.cpp. The
- header of that file contains a brief explanation of the algorithm
- as well.</p>
- </div>
- <h3>User interface (Delphi)</h3>
- <div>
- <p>A user interface is included as well, which you will have to build
- yourself because the GUI executable was too large to include. Besides
- Borland Delphi 6 or higher (you can use the freely available Personal
- edition), you will also need to install the <a href=
-"http://www.delphi-gems.com">VirtualTreeView</a> component by Mike Lischke.</p>
- </div>
- <h3>Test framework (Python)</h3>
- <div>
- <p>Run the <i>VPatch_tests.py</i> script (if you have <a href="http://www.python.org">Python</a>
- installed) to perform basic functionality tests on VPatch. The <i>testExtended</i>
- test is known to fail if a set of big test files is not installed,
- you can safely ignore this.</p>
- </div>
- </div>
- <h2>Version history</h2>
- <div>
- <ul>
- <li>3.1
- <ul>
- <li>GenPat now compiles on POSIX platforms (MinGW/GCC), Visual
- C++ 6 and Borland C++.</li>
- <li>More test cases to verify functionality of GenPat.</li>
- </ul>
- </li>
- <li>3.0
- <ul>
- <li><b>Final</b>: Updates to the GUI, installer</li>
- <li><b>RC8</b>: GenPat will now flag replacement of a patch (e.g.
- the source file has the same contents as a previous patch inside
- a patch file) as an error. You can specifically allow it using
- the /R switch. Added license to source files.</li>
- <li><b>RC7</b>: Fixed critical bug in GenPat with multiple patches
- in a single file. Fixed serious bug in stand-alone EXE runtime:
- process kept on running forever. Included case testing through
- a Python script to test common usage (and prevent bugs like
- the one in GenPat in the future).</li>
- <li><b>RC6</b>: Upgraded to non-beta compiler. Added /A switch
- to change block match limit and /O to deactivate the limit.
- Updated GUI to support the /O switch.</li>
- <li><b>RC4a to RC5a</b>: input block size is now checked for power
- of 2 and fixed if incorrect. When patch file does not yet exist,
- no longer forgets to create the header. No longer tries to allocate
- memory when there are no chunks. Fixed memory leaks.</li>
- <li>Target file date is now preserved inside a patch and restored
- on the user system.</li>
- <li>MD5 checksums are now used instead of CRC32 checksums, unless
- existing patches in a file already are in CRC32 mode.</li>
- <li>The patch generator, GenPat, has been completely rewritten
- in C++. It no longer needs to keep the entire files in memory,
- instead memory usage is a certain percentage of the source file
- size. The percentage is based on the block size, larger block
- sizes will reduce memory usage.</li>
- <li>All runtimes now share a common codebase, perform proper error
- checking and don't leave behind files if the input file was
- already up to date.</li>
- <li>Bug Fix: The patch generator algorithm no longer reduces to
- a quadratic runtime if there are many blocks with the same content
- in the files to patch.</li>
- <li>Bug Fix: The documentation of the command-line utilities was
- incorrect and no warnings would be given by the runtimes, causing
- the patch not to work (this does not apply to NSIS patches).</li>
- </ul>
- </li>
- <li>2.1
- <ul>
- <li>Added argument checking and error handling to GenPat. Now
- returns exit codes as well to indicate success/failure (and
- the reason for failure). Only GenPat has changed in this version
- compared to 2.0 final.</li>
- <li>Bug Fix: GenPat no longer gives an Access Violation when attempting
- to patch a file smaller than 64 bytes into a file larger than
- 64 bytes.</li>
- </ul>
- </li>
- <li>2.0 final
- <ul>
- <li>Cleaned up source code for the patch generator, which is now
- included (this code is written in Borland Delphi 6 and compiles
- with the freely available Personal edition).</li>
- </ul>
- </li>
- <li>2.0 beta 2
- <ul>
- <li>All new algorithm used in the patch generator: much faster
- (up to 90%) while using smaller block sizes (higher compression)</li>
- <li>Created a NSIS 2 plugin</li>
- <li>Works with small files</li>
- <li>Replaces existing patch in file if original file CRC is identical</li>
- </ul>
- </li>
- </ul>
- </div>
- <h2>Credits</h2>
- <div>
- <p>Written by Koen van de Sande<br />
- C plug-in initially by Edgewize, updated by Koen van de Sande<br />
- New documentation and example by Joost Verburg and Koen van de Sande</p>
- </div>
- <h2>License</h2>
- <div>
- <pre>
-Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-
-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 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 distribution.
-</pre>
-</div>
- </div>
- </td>
-</tr>
-</table>
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>VPatch 3</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+<style type="text/css">
+/*<![CDATA[*/
+
+body
+ {
+ padding: 10px;
+ background-color: #F0F0F0;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ text-align: left;
+ }
+
+p, li
+ {
+ font-size: 13px;
+ }
+
+.center
+ {
+ text-align: center;
+ }
+
+table
+ {
+ margin: auto;
+ font-size: 13px;
+ background-color: #FFFFFF;
+ }
+
+.maintable
+ {
+ border: 2px solid #376EAB;
+ }
+
+.parameter
+ {
+ font-weight: bold;
+ color: #6586AC;
+ }
+
+
+h1
+ {
+ font-size: 30px;
+ color: #333333;
+ font-weight: normal;
+ text-align: center;
+ margin-top: 20px;
+ }
+
+h2
+ {
+ font-size: 20px;
+ color: #7A7272;
+ font-weight: normal;
+ }
+
+h3
+ {
+ font-size: 17px;
+ font-weight: bold;
+ color: #303030;
+ }
+
+pre {
+ font-size: 13px;
+ }
+
+div
+ {
+ margin: 20px;
+ }
+
+a:link, a:visited, a:active
+ {
+ color: #294F75;
+ text-decoration: none;
+ }
+
+a:hover
+ {
+ color: #182634;
+ text-decoration: underline;
+ }
+
+/*]]>*/
+</style>
+</head>
+<body>
+<table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
+ <tr>
+ <td>
+
+ <h1>VPatch 3.1</h1>
+ <div>
+ <h2>Introduction</h2>
+ <div>
+ <p>VPatch allows to create a patch file to update previous versions
+ of your software. The GenPat utility generates the patch file. The
+ plug-in can use the patch to update a file. Using a patch, you can
+ reduce the download size of your updates, because only the differences
+ between the files are included in the patch file.</p>
+ </div>
+ <h2>How to use</h2>
+ <div>
+ <h3>Generate the patch file</h3>
+ <div>
+ <p>Make sure you have the source file (original version) and the target
+ file (version to update to). For example, DATA.DTA (currently on user
+ system) and DATA_20.DTA (version 2.0 of this data file). Now call
+ the command line tool GenPat.exe:</p>
+ <pre>
+GENPAT oldfile.txt newfile.txt patch.pat
+</pre>
+ <p>Now, the patch will be generated, this will take some time.</p>
+ <p>Using the /B=(BlockSize) parameter of the GenPat utility (put it
+ after the filenames), you can use a different block size. A smaller
+ block size may result in a smaller patch, but the generation will
+ take more time (the default blocksize is 64).</p>
+ <p>If you have trouble using this command-line utility, you can download
+ a GUI (graphical user interface) for VPatch from its own website:
+ <a href="http://www.tibed.net/vpatch">http://www.tibed.net/vpatch</a>.</p>
+ </div>
+ <h3>Update the file during installation</h3>
+ <div>
+ <p>Use the VPatch plug-in to update a file using a patch file:</p>
+ <pre>
+vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"
+</pre>
+ <p>The result of the patch operating will be added to the stack and
+ can be one of the following texts:</p>
+ <ul>
+ <li>OK</li>
+ <li>OK, new version already installed</li>
+ <li>An error occurred while patching</li>
+ <li>Patch data is invalid or corrupt</li>
+ <li>No suitable patches were found</li>
+ </ul>
+ <p>Check <a href="../../Examples/VPatch/example.nsi">example.nsi</a> for an example. You
+ should check whether the stack string starts with &quot;OK&quot;
+ because then the patch has succeeded and you can rename &quot;temporary_newfile.txt&quot;
+ to &quot;oldfile.txt&quot; to replace the original, if you want.</p>
+ </div>
+ <h3>Multiple patches in one file</h3>
+ <div>
+ <p>GenPat appends a patch to the file you specified. If there is already
+ a patch for the same original file, with the same CRC, in the patch file,
+ the patch will be replaced. For example, if you want to be able to upgrade
+ version 1 and 2 to version 3, you can put a 1 &gt; 3 and 2 &gt; 3 patch in
+ one file.</p>
+ <p>You can also put patches for different files in one patch file, for
+ example, a patch from file A version 1 to file A version 2 and a patch
+ from file B version 1 to file B version 2. Just call the plug-in multiple
+ times with the same patch file. It will automatically select the right
+ patch (based on the file CRC).</p>
+ </div>
+ <h3>Patch generator (GenPat) exit codes</h3>
+ <div>
+ <p>In version 3 the following exit codes (known as error levels in
+ the DOS period) can be returned by GenPat. GenPat will return an
+ exit code based on success of the patch generation. Here is a list
+ of the possible exit codes:</p>
+ <table width="547" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><b>Exit code</b></td>
+ <td><b>Description</b></td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>Success</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Arguments missing</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Other error</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Source file already has a patch in specified patch file (ERROR),
+ use /R switch to override</td>
+ </tr>
+ </table>
+ <p>These exit codes can be useful when you generate patch files through
+ a NSIS script.</p>
+ </div>
+ </div>
+ </div>
+ <div>
+ <h2>Source code</h2>
+ <div>
+ <p>Source code is available in the original package and in the SVN repository of NSIS.</p>
+ <h3>NSIS plug-in (C++)</h3>
+ <div>
+ <p>The source of the NSIS plug-in that applies patches can be found
+ in the Source\Plugin folder.</p>
+ </div>
+ <h3>Patch Generator (C++)</h3>
+ <div>
+ <p>The most interesting part of VPatch, the actual patch generation
+ algorithm, can be found in Source\GenPat\PatchGenerator.cpp. The
+ header of that file contains a brief explanation of the algorithm
+ as well.</p>
+ </div>
+ <h3>User interface (Delphi)</h3>
+ <div>
+ <p>A user interface is included as well, which you will have to build
+ yourself because the GUI executable was too large to include. Besides
+ Borland Delphi 6 or higher (you can use the freely available Personal
+ edition), you will also need to install the <a href=
+"http://www.delphi-gems.com">VirtualTreeView</a> component by Mike Lischke.</p>
+ </div>
+ <h3>Test framework (Python)</h3>
+ <div>
+ <p>Run the <i>VPatch_tests.py</i> script (if you have <a href="http://www.python.org">Python</a>
+ installed) to perform basic functionality tests on VPatch. The <i>testExtended</i>
+ test is known to fail if a set of big test files is not installed,
+ you can safely ignore this.</p>
+ </div>
+ </div>
+ <h2>Version history</h2>
+ <div>
+ <ul>
+ <li>3.1
+ <ul>
+ <li>GenPat now compiles on POSIX platforms (MinGW/GCC), Visual
+ C++ 6 and Borland C++.</li>
+ <li>More test cases to verify functionality of GenPat.</li>
+ </ul>
+ </li>
+ <li>3.0
+ <ul>
+ <li><b>Final</b>: Updates to the GUI, installer</li>
+ <li><b>RC8</b>: GenPat will now flag replacement of a patch (e.g.
+ the source file has the same contents as a previous patch inside
+ a patch file) as an error. You can specifically allow it using
+ the /R switch. Added license to source files.</li>
+ <li><b>RC7</b>: Fixed critical bug in GenPat with multiple patches
+ in a single file. Fixed serious bug in stand-alone EXE runtime:
+ process kept on running forever. Included case testing through
+ a Python script to test common usage (and prevent bugs like
+ the one in GenPat in the future).</li>
+ <li><b>RC6</b>: Upgraded to non-beta compiler. Added /A switch
+ to change block match limit and /O to deactivate the limit.
+ Updated GUI to support the /O switch.</li>
+ <li><b>RC4a to RC5a</b>: input block size is now checked for power
+ of 2 and fixed if incorrect. When patch file does not yet exist,
+ no longer forgets to create the header. No longer tries to allocate
+ memory when there are no chunks. Fixed memory leaks.</li>
+ <li>Target file date is now preserved inside a patch and restored
+ on the user system.</li>
+ <li>MD5 checksums are now used instead of CRC32 checksums, unless
+ existing patches in a file already are in CRC32 mode.</li>
+ <li>The patch generator, GenPat, has been completely rewritten
+ in C++. It no longer needs to keep the entire files in memory,
+ instead memory usage is a certain percentage of the source file
+ size. The percentage is based on the block size, larger block
+ sizes will reduce memory usage.</li>
+ <li>All runtimes now share a common codebase, perform proper error
+ checking and don't leave behind files if the input file was
+ already up to date.</li>
+ <li>Bug Fix: The patch generator algorithm no longer reduces to
+ a quadratic runtime if there are many blocks with the same content
+ in the files to patch.</li>
+ <li>Bug Fix: The documentation of the command-line utilities was
+ incorrect and no warnings would be given by the runtimes, causing
+ the patch not to work (this does not apply to NSIS patches).</li>
+ </ul>
+ </li>
+ <li>2.1
+ <ul>
+ <li>Added argument checking and error handling to GenPat. Now
+ returns exit codes as well to indicate success/failure (and
+ the reason for failure). Only GenPat has changed in this version
+ compared to 2.0 final.</li>
+ <li>Bug Fix: GenPat no longer gives an Access Violation when attempting
+ to patch a file smaller than 64 bytes into a file larger than
+ 64 bytes.</li>
+ </ul>
+ </li>
+ <li>2.0 final
+ <ul>
+ <li>Cleaned up source code for the patch generator, which is now
+ included (this code is written in Borland Delphi 6 and compiles
+ with the freely available Personal edition).</li>
+ </ul>
+ </li>
+ <li>2.0 beta 2
+ <ul>
+ <li>All new algorithm used in the patch generator: much faster
+ (up to 90%) while using smaller block sizes (higher compression)</li>
+ <li>Created a NSIS 2 plugin</li>
+ <li>Works with small files</li>
+ <li>Replaces existing patch in file if original file CRC is identical</li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <h2>Credits</h2>
+ <div>
+ <p>Written by Koen van de Sande<br />
+ C plug-in initially by Edgewize, updated by Koen van de Sande<br />
+ New documentation and example by Joost Verburg and Koen van de Sande</p>
+ </div>
+ <h2>License</h2>
+ <div>
+ <pre>
+Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+
+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 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 distribution.
+</pre>
+</div>
+ </div>
+ </td>
+</tr>
+</table>
+</body>
+</html>
diff --git a/Contrib/VPatch/SConscript b/Contrib/VPatch/SConscript
index 4659f90..2bca278 100755
--- a/Contrib/VPatch/SConscript
+++ b/Contrib/VPatch/SConscript
@@ -1,22 +1,22 @@
-target = 'VPatch'
-
-examples = Split("""
- example.nsi
- newfile.txt
- oldfile.txt
- patch.pat
-""")
-
-docs = Split("""
- Readme.html
-""")
-
-includes = Split("""
- VPatchLib.nsh
-""")
-
-Import('defenv')
-
-defenv.DistributeExamples(examples, path=target)
-defenv.DistributeDocs(docs, path=target)
-defenv.DistributeInclude(includes)
+target = 'VPatch'
+
+examples = Split("""
+ example.nsi
+ newfile.txt
+ oldfile.txt
+ patch.pat
+""")
+
+docs = Split("""
+ Readme.html
+""")
+
+includes = Split("""
+ VPatchLib.nsh
+""")
+
+Import('defenv')
+
+defenv.DistributeExamples(examples, path=target)
+defenv.DistributeDocs(docs, path=target)
+defenv.DistributeInclude(includes)
diff --git a/Contrib/VPatch/Source/GUI/AboutForm.pas b/Contrib/VPatch/Source/GUI/AboutForm.pas
index 4fd1c42..3328a61 100755
--- a/Contrib/VPatch/Source/GUI/AboutForm.pas
+++ b/Contrib/VPatch/Source/GUI/AboutForm.pas
@@ -1,31 +1,31 @@
-unit AboutForm;
-
-interface
-
-uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
- Buttons, ExtCtrls;
-
-type
- TfrmAbout = class(TForm)
- Panel1: TPanel;
- ProgramIcon: TImage;
- ProductName: TLabel;
- Version: TLabel;
- Copyright: TLabel;
- Comments: TLabel;
- OKButton: TButton;
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- frmAbout: TfrmAbout;
-
-implementation
-
-{$R *.dfm}
-
-end.
-
+unit AboutForm;
+
+interface
+
+uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
+ Buttons, ExtCtrls;
+
+type
+ TfrmAbout = class(TForm)
+ Panel1: TPanel;
+ ProgramIcon: TImage;
+ ProductName: TLabel;
+ Version: TLabel;
+ Copyright: TLabel;
+ Comments: TLabel;
+ OKButton: TButton;
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ frmAbout: TfrmAbout;
+
+implementation
+
+{$R *.dfm}
+
+end.
+
diff --git a/Contrib/VPatch/Source/GUI/DLLWrapper.pas b/Contrib/VPatch/Source/GUI/DLLWrapper.pas
index 629475b..2d3ea73 100755
--- a/Contrib/VPatch/Source/GUI/DLLWrapper.pas
+++ b/Contrib/VPatch/Source/GUI/DLLWrapper.pas
@@ -1,51 +1,51 @@
-unit DLLWrapper;
-
-interface
-
-uses Classes, SysUtils;
-
- function DoGenerate(const Source, Target: String; Stream: TStream; Config: String): Integer; forward;
-
-var
- WaitAfterGenerate: Boolean = False;
- OptimalPatches: Boolean = False;
-
-implementation
-
-uses
- OSUtil, Forms;
-
-function DoGenerate(const Source, Target: String; Stream: TStream; Config: String): Integer;
-var
- F: TextFile;
- Temp, BatchFile: String;
- fs: TFileStream;
-begin
- BatchFile:=ExcludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) + PathDelim +'~generate_patch.bat';
- AssignFile(F,BatchFile);
- Rewrite(F);
- Temp:=GetTempFile;
- WriteLn(F,'@cls');
- WriteLn(F,'@echo Generating '+ExtractFileName(Source)+' to '+ExtractFileName(Target)+'...');
- Write(F,'genpat.exe "', Source, '" "', Target, '" "', Temp, '" /b='+Config);
- if OptimalPatches then begin
- Write(F,' /o');
- end;
- WriteLn(F,'');
- if WaitAfterGenerate then begin
- WriteLn(F,'@echo.');
- WriteLn(F,'@pause');
- end;
- CloseFile(F);
-
- ExecWaitBatchFile(ExtractFilePath(BatchFile),BatchFile);
-
- fs:=TFileStream.Create(Temp,fmOpenRead);
- Stream.CopyFrom(fs,fs.Size);
- Result:=fs.Size;
- fs.Free;
- DeleteFile(Temp);
- DeleteFile(BatchFile);
-end;
-
-end.
+unit DLLWrapper;
+
+interface
+
+uses Classes, SysUtils;
+
+ function DoGenerate(const Source, Target: String; Stream: TStream; Config: String): Integer; forward;
+
+var
+ WaitAfterGenerate: Boolean = False;
+ OptimalPatches: Boolean = False;
+
+implementation
+
+uses
+ OSUtil, Forms;
+
+function DoGenerate(const Source, Target: String; Stream: TStream; Config: String): Integer;
+var
+ F: TextFile;
+ Temp, BatchFile: String;
+ fs: TFileStream;
+begin
+ BatchFile:=ExcludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) + PathDelim +'~generate_patch.bat';
+ AssignFile(F,BatchFile);
+ Rewrite(F);
+ Temp:=GetTempFile;
+ WriteLn(F,'@cls');
+ WriteLn(F,'@echo Generating '+ExtractFileName(Source)+' to '+ExtractFileName(Target)+'...');
+ Write(F,'genpat.exe "', Source, '" "', Target, '" "', Temp, '" /b='+Config);
+ if OptimalPatches then begin
+ Write(F,' /o');
+ end;
+ WriteLn(F,'');
+ if WaitAfterGenerate then begin
+ WriteLn(F,'@echo.');
+ WriteLn(F,'@pause');
+ end;
+ CloseFile(F);
+
+ ExecWaitBatchFile(ExtractFilePath(BatchFile),BatchFile);
+
+ fs:=TFileStream.Create(Temp,fmOpenRead);
+ Stream.CopyFrom(fs,fs.Size);
+ Result:=fs.Size;
+ fs.Free;
+ DeleteFile(Temp);
+ DeleteFile(BatchFile);
+end;
+
+end.
diff --git a/Contrib/VPatch/Source/GUI/MainForm.dfm b/Contrib/VPatch/Source/GUI/MainForm.dfm
index b1f05b7..3e26a80 100755
--- a/Contrib/VPatch/Source/GUI/MainForm.dfm
+++ b/Contrib/VPatch/Source/GUI/MainForm.dfm
@@ -1,992 +1,992 @@
-object frmMain: TfrmMain
- Left = 195
- Top = 93
- BorderIcons = [biSystemMenu, biMinimize]
- BorderStyle = bsSingle
- Caption = 'VG - VPatch GUI'
- ClientHeight = 385
- ClientWidth = 689
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- Icon.Data = {
- 000001000200101000000100080068050000260000002020000001000800A808
- 00008E0500002800000010000000200000000100080000000000000100000000
- 0000000000000001000000010000000000000000800000800000008080008000
- 00008000800080800000C0C0C000C0DCC000F0CAA60000003E0000005D000000
- 7C0000009B000000BA000000D9000000F0002424FF004848FF006C6CFF009090
- FF00B4B4FF0000143E00001E5D0000287C0000329B00003CBA000046D9000055
- F000246DFF004885FF006C9DFF0090B5FF00B4CDFF00002A3E00003F5D000054
- 7C0000699B00007EBA000093D90000AAF00024B6FF0048C2FF006CCEFF0090DA
- FF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BABA0000D9D90000F0
- F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E2A00005D3F00007C
- 5400009B690000BA7E0000D9930000F0AA0024FFB60048FFC2006CFFCE0090FF
- DA00B4FFE600003E1400005D1E00007C2800009B320000BA3C0000D9460000F0
- 550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E0000005D0000007C
- 0000009B000000BA000000D9000000F0000024FF240048FF48006CFF6C0090FF
- 9000B4FFB400143E00001E5D0000287C0000329B00003CBA000046D9000055F0
- 00006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E00003F5D0000547C
- 0000699B00007EBA000093D90000AAF00000B6FF2400C2FF4800CEFF6C00DAFF
- 9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA0000D9D90000F0F0
- 0000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A00005D3F00007C54
- 00009B690000BA7E0000D9930000F0AA0000FFB62400FFC24800FFCE6C00FFDA
- 9000FFE6B4003E1400005D1E00007C2800009B320000BA3C0000D9460000F055
- 0000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E0000005D0000007C00
- 00009B000000BA000000D9000000F0000000FF242400FF484800FF6C6C00FF90
- 9000FFB4B4003E0014005D001E007C0028009B003200BA003C00D9004600F000
- 5500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E002A005D003F007C00
- 54009B006900BA007E00D9009300F000AA00FF24B600FF48C200FF6CCE00FF90
- DA00FFB4E6003E003E005D005D007C007C009B009B00BA00BA00D900D900F000
- F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A003E003F005D005400
- 7C0069009B007E00BA009300D900AA00F000B624FF00C248FF00CE6CFF00DA90
- FF00E6B4FF0014003E001E005D0028007C0032009B003C00BA004600D9005500
- F0006D24FF008548FF009D6CFF00B590FF00CDB4FF0006060600121212001F1F
- 1F002C2C2C003939390045454500525252005F5F5F006C6C6C00787878008585
- 8500929292009F9F9F00ABABAB00B8B8B800C5C5C500D2D2D200DEDEDE00EBEB
- EB00F8F8F800F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00
- 0000FF00FF00FFFF0000FFFFFF00000000000000000000000000000000000000
- EAE7858586868796ECEBEA00000000919185858686868787888B8DF8000000E9
- 99858586868687878B8B8C8A000000F8FF968686878787878D8B8B97000000EB
- F4F48B8A888887879809870000000000EFFF8B8A8888878A9796850000000000
- EDF48D8B8A8A8A09099800000000000000F7F4EFF2F2F2F20700000000000000
- 00EDF3F0F0F0079800000000000000000000EBF307F0F7970000000000000000
- 0000EAF5FFF4F78600000000000000000000F8F4FFF4F7960000000000000000
- 0000EAF3F4F379F80000000000000000008D868585858585EA00000000000000
- 009996EF07F19896980000000000FFFF0000C007000080030000800300008003
- 000080070000C0070000C00F0000E01F0000E03F0000F03F0000F03F0000F03F
- 0000F03F0000E01F0000E01F0000280000002000000040000000010008000000
- 0000000400000000000000000000000100000001000000000000000080000080
- 000000808000800000008000800080800000C0C0C000C0DCC000F0CAA6000000
- 3E0000005D0000007C0000009B000000BA000000D9000000F0002424FF004848
- FF006C6CFF009090FF00B4B4FF0000143E00001E5D0000287C0000329B00003C
- BA000046D9000055F000246DFF004885FF006C9DFF0090B5FF00B4CDFF00002A
- 3E00003F5D0000547C0000699B00007EBA000093D90000AAF00024B6FF0048C2
- FF006CCEFF0090DAFF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BA
- BA0000D9D90000F0F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E
- 2A00005D3F00007C5400009B690000BA7E0000D9930000F0AA0024FFB60048FF
- C2006CFFCE0090FFDA00B4FFE600003E1400005D1E00007C2800009B320000BA
- 3C0000D9460000F0550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E
- 0000005D0000007C0000009B000000BA000000D9000000F0000024FF240048FF
- 48006CFF6C0090FF9000B4FFB400143E00001E5D0000287C0000329B00003CBA
- 000046D9000055F000006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E
- 00003F5D0000547C0000699B00007EBA000093D90000AAF00000B6FF2400C2FF
- 4800CEFF6C00DAFF9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA
- 0000D9D90000F0F00000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A
- 00005D3F00007C5400009B690000BA7E0000D9930000F0AA0000FFB62400FFC2
- 4800FFCE6C00FFDA9000FFE6B4003E1400005D1E00007C2800009B320000BA3C
- 0000D9460000F0550000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E00
- 00005D0000007C0000009B000000BA000000D9000000F0000000FF242400FF48
- 4800FF6C6C00FF909000FFB4B4003E0014005D001E007C0028009B003200BA00
- 3C00D9004600F0005500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E00
- 2A005D003F007C0054009B006900BA007E00D9009300F000AA00FF24B600FF48
- C200FF6CCE00FF90DA00FFB4E6003E003E005D005D007C007C009B009B00BA00
- BA00D900D900F000F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A00
- 3E003F005D0054007C0069009B007E00BA009300D900AA00F000B624FF00C248
- FF00CE6CFF00DA90FF00E6B4FF0014003E001E005D0028007C0032009B003C00
- BA004600D9005500F0006D24FF008548FF009D6CFF00B590FF00CDB4FF000606
- 0600121212001F1F1F002C2C2C003939390045454500525252005F5F5F006C6C
- 6C007878780085858500929292009F9F9F00ABABAB00B8B8B800C5C5C500D2D2
- D200DEDEDE00EBEBEB00F8F8F800F0FBFF00A4A0A000808080000000FF0000FF
- 000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000ED
- EBEBEAEAEAEAEAEAEAEBF8ED000000000000000000000000000000ECE9E7E791
- 85858586868686868585E7E7E8EAEBED000000000000000000EAE79191918585
- 8686868687878788898A8B8C98A3E8E8EA00000000000000E791919185858585
- 8586868686868787878787898C8DF409E9E90000000000E99191918585858585
- 8686868686868787878788888A8B8BF5F484EB00000000919191989785858585
- 868686868687878787878A8B8C8B898A8A8AEA00000000919109FFF485858585
- 868686868687878787878B8C88F5FF8D8A8AF800000000EA91F3FFFF97858585
- 868686868687878787888AFF888DF58B8C96EF00000000009198FFFF99858586
- 868787878787878787878C8D88F58B898AEA000000000000EA85F4FFFF098B8B
- 8A898888888887878786F58A8A8D898A85F0000000000000009109FFFF8D8B8B
- 8A89888888888787878AF4868D968686EB0000000000000000F8A4F5FFF58B8B
- 8A8988888888878787090996F38585E700000000000000000000918DFFFF8C8B
- 8A89888888888787878D86098686EAED00000000000000000000F8EDF4FFF48B
- 8A89888888888787878D8AF3EFF7EC00000000000000000000000091F1FFFFF0
- 0709098B8B98090909F1F307F0EB00000000000000000000000000F8EBF4FFF2
- F707F2F2F2F2F2F20807F3F0EDEB00000000000000000000000000009107FFF5
- EEF0F1F2F2F2F2F109F107EFE9000000000000000000000000000000F7EAF3FF
- F0F707F1F1F1F109F009EFEAEC0000000000000000000000000000000091F7F5
- F3EDF7EFEFEFEF8B989886E80000000000000000000000000000000000F7E909
- FFED79797979798B979791ED00000000000000000000000000000000000091F8
- FFF2FFFFFFF379979785E900000000000000000000000000000000000000EA85
- FFFFFFFFFFF379979791EB00000000000000000000000000000000000000EAEA
- FFF4FFFFFFF379979791ED00000000000000000000000000000000000000EDEA
- FFF3FFFFFFF379979791EE00000000000000000000000000000000000000ED85
- FFF3FFFFFFF379979785EF00000000000000000000000000000000000000ED85
- F3F3FFFFFFF379979785F700000000000000000000000000000000000000EC85
- F3F2F3F3F20906797985EB00000000000000000000000000000000000000EB85
- 86858585858585858585E8F800000000000000000000000000000000008A8786
- 858585F8EC868585858585EB00000000000000000000000000000000008685F7
- EF07F1F1F1F1F107EF8686EF0000000000000000000000000000000000F29797
- 97979809090997979796090000000000000000000000FFFFFFFFFF8003FFF800
- 003FE000001FC000000F80000007800000078000000780000007C000000FC000
- 000FE000001FE000003FF000003FF000007FF80000FFF80000FFFC0001FFFC00
- 01FFFE0003FFFE0003FFFF0007FFFF0007FFFF0007FFFF0007FFFF0007FFFF00
- 07FFFF0007FFFF0003FFFE0003FFFE0003FFFE0007FF}
- Menu = MainMenu
- OldCreateOrder = False
- Position = poScreenCenter
- ShowHint = True
- OnCreate = FormCreate
- OnDestroy = FormDestroy
- PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 8
- Top = 32
- Width = 77
- Height = 13
- Caption = 'New versions'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object butAdd: TSpeedButton
- Left = 24
- Top = 328
- Width = 193
- Height = 25
- Caption = 'Add &new version'
- Glyph.Data = {
- 36050000424D3605000000000000360400002800000010000000100000000100
- 08000000000000010000000000000000000000010000000100004A004A006200
- 6200780178009F019F00BC01BC00D301D300E200E200EF00EF00F700F700FB00
- FB00FD00FD00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
- FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
- FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
- FE00FE00FE00FE00FE00FD00FD00FC00FC00FA00FA00F701F700F202F200EC03
- EC00E305E300D708D700C60BC600AF11AF008F188F007E1D7E006C226C006125
- 6100572857004C2C4C0040304000353535003636360037373700383838003939
- 39003A3A3A003B3B3B003C3C3C003D3D3D003E3E3E003F3F3F00404040004141
- 4100424242004343430044444400454545004646460047474700484848004949
- 49004A4A4A004B4B4B004C4C4C004D4D4D004E4E4E004F4F4F00505050005151
- 5100525252005353530054545400555555005656560057575700585858005959
- 59005A5A5A005B5B5B005C5C5C005D5D5D005E5E5E005F5F5F00606060006161
- 6100626262006363630064646400656565006666660067676700686868006969
- 69006A6A6A006B6B6B006C6C6C006D6D6D006E6E6E006F6F6F00707070007171
- 7100727272007373730074747400757575007676760077777700787878007979
- 79007A7A7A007B7B7B007C7C7C007D7D7D007E7E7E007F7F7F00808080008181
- 8100828282008383830084848400858585008686860087878700888888008989
- 89008A8A8A008B8B8B008C8C8C008D8D8D008E8E8E008F8F8F00909090009191
- 9100929292009393930094949400959595009696960097979700989898009999
- 99009A9A9A009B9B9B009C9C9C009D9D9D009E9E9E009F9F9F00A0A0A000A1A1
- A100A2A2A200A3A3A300A4A4A400A5A5A500A6A6A600A7A7A700A8A8A800A9A9
- A900AAAAAA00ABABAB00ACACAC00ADADAD00AEAEAE00B3B3B300BFC1BF00C8CC
- C900D0D5D200D7DDD900DEE6E100E6EDE800ECF3EE00F1F7F300F5FAF600F7FB
- F900F9FCFA00FBFDFB00FBFDFC00FBFDFC00F9FDFA00F6FCF800F4FBF600F0FA
- F300ECFAF100E9F9EF00E6F8ED00E2F7EA00DDF6E700D7F4E300D3F3E000D0F2
- DD00CEF1DB00CCF1D900C9EFD600C0EDCF00B9EBC900ADE7C000A3E4B80098E0
- AF008DDDA50085DAA0007DD89A0075D694006DD38F0067D18B0060CF84005BCE
- 800055CC7B004DCA780047C8750042C672003DC46E0039C36B0036C2680033C0
- 640030BE61002EBC5C002CBA590029B9550027B8510027B74E0025B5490023B5
- 440023B3420022B13D0020B03B001EB1360019B2310016B32D0012B327000EB4
- 21000BB41D000AB41B0009B31A0009B0190009AD19000AA318000A9717000A8C
- 1700097D14000872120007680E0006640D0006650D0007690F001515151515FD
- FDFFFFFDFD1515151515151515FDFDF9F5F4F4F5F8FCFC1515151515FFFAF2F4
- F4F5F4F4F4F4FAFD151515FFF9EFF0F2F5F5F5F5F5F4F4FAFE1515FFE8E9EFF2
- EDC6C2D9F5F5F4F4FE15FBECE3E9F1F3F1D1BCBFDAF5F5F4F8FDFBE4E1E7F1F4
- F2F5D2BCBFDAF5F4F6FDFADFDFCACCCCCCCDCDBEBCC1D6F4F4FEF9D9DCBCBCBC
- BCBCBCBCBCBCCEF3F4FFF9D6D7D6D5D5D5D7D2BBBCD0E7F0F5FDF9D8D0DEE0DE
- DED5C4BCD1E8EBF0F7FD15ECCDD3E1E0DAB9BCD1E8E9EEEFF91515ECD6C8D3DF
- DECDCFE1E5E7E9EEF9151515ECD3C6CFD6DADCDBDBDFE8FA1515151515ECECCF
- C9CDCFD1D6E4E41515151515151515E7ECECECECEA1515151515}
- OnClick = butAddClick
- end
- object grpConfig: TGroupBox
- Left = 232
- Top = 51
- Width = 441
- Height = 270
- Enabled = False
- TabOrder = 0
- object Label2: TLabel
- Left = 16
- Top = 24
- Width = 71
- Height = 13
- Caption = 'New version'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object Label3: TLabel
- Left = 16
- Top = 80
- Width = 71
- Height = 13
- Caption = 'Old versions'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object butOldAdd: TSpeedButton
- Left = 368
- Top = 96
- Width = 49
- Height = 25
- Caption = '&Add'
- Flat = True
- OnClick = butOldAddClick
- end
- object butOldRemove: TSpeedButton
- Left = 368
- Top = 160
- Width = 49
- Height = 25
- Caption = '&Remove'
- Flat = True
- OnClick = butOldRemoveClick
- end
- object butNewEdit: TSpeedButton
- Left = 368
- Top = 40
- Width = 49
- Height = 25
- Caption = '&Edit'
- Flat = True
- OnClick = butNewEditClick
- end
- object Label4: TLabel
- Left = 16
- Top = 200
- Width = 176
- Height = 13
- Caption = 'Patch generation configuration'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object Label5: TLabel
- Left = 32
- Top = 224
- Width = 48
- Height = 13
- Hint = 'Smaller gives smaller patch files, but decreased speed'
- Caption = 'Block size'
- end
- object Label7: TLabel
- Left = 232
- Top = 224
- Width = 61
- Height = 13
- Caption = 'Block divider'
- Visible = False
- end
- object txtStartBlockSize: TLabel
- Left = 136
- Top = 224
- Width = 65
- Height = 17
- Alignment = taCenter
- AutoSize = False
- end
- object txtNew: TEdit
- Left = 32
- Top = 42
- Width = 321
- Height = 21
- ReadOnly = True
- TabOrder = 0
- end
- object lstOld: TListBox
- Left = 32
- Top = 96
- Width = 321
- Height = 89
- ItemHeight = 13
- TabOrder = 1
- end
- object tbBlockSize: TTrackBar
- Left = 200
- Top = 224
- Width = 161
- Height = 25
- Max = 12
- Min = 4
- Position = 6
- TabOrder = 2
- OnChange = tbBlockSizeChange
- end
- end
- object lstNew: TVirtualStringTree
- Left = 24
- Top = 56
- Width = 193
- Height = 265
- Header.AutoSizeIndex = 0
- Header.Font.Charset = DEFAULT_CHARSET
- Header.Font.Color = clWindowText
- Header.Font.Height = -11
- Header.Font.Name = 'MS Sans Serif'
- Header.Font.Style = []
- Header.MainColumn = -1
- Header.Options = [hoColumnResize, hoDrag]
- HintAnimation = hatNone
- Indent = 0
- TabOrder = 1
- TreeOptions.PaintOptions = [toHotTrack, toShowBackground, toShowButtons, toShowDropmark, toShowRoot, toThemeAware, toUseBlendedImages]
- TreeOptions.SelectionOptions = [toFullRowSelect]
- OnChange = lstNewChange
- OnGetText = lstNewGetText
- Columns = <>
- end
- object barCool: TCoolBar
- Left = 0
- Top = 0
- Width = 689
- Height = 44
- AutoSize = True
- Bands = <
- item
- BorderStyle = bsSingle
- Control = barTool
- ImageIndex = -1
- MinHeight = 36
- Width = 689
- end>
- EdgeBorders = [ebTop, ebBottom]
- object barTool: TToolBar
- Left = 9
- Top = 2
- Width = 676
- Height = 36
- AutoSize = True
- ButtonHeight = 36
- ButtonWidth = 90
- Caption = 'barTool'
- EdgeBorders = []
- Flat = True
- Images = IL
- ShowCaptions = True
- TabOrder = 0
- object toolNew: TToolButton
- Left = 0
- Top = 0
- Caption = '&New'
- ImageIndex = 0
- MenuItem = mnuNew
- end
- object toolOpen: TToolButton
- Left = 90
- Top = 0
- Caption = '&Open'
- ImageIndex = 1
- MenuItem = mnuOpen
- end
- object toolSave: TToolButton
- Left = 180
- Top = 0
- Caption = '&Save'
- ImageIndex = 2
- MenuItem = mnuSave
- end
- object ToolButton1: TToolButton
- Left = 270
- Top = 0
- Width = 8
- Caption = 'ToolButton1'
- ImageIndex = 7
- Style = tbsSeparator
- end
- object toolGenGo: TToolButton
- Left = 278
- Top = 0
- Caption = '&Generate'
- ImageIndex = 3
- MenuItem = mnuGenGo
- end
- object toolCreateEXE: TToolButton
- Left = 368
- Top = 0
- Caption = 'Create &EXE'
- ImageIndex = 5
- MenuItem = mnuCreateEXE
- end
- object toolCreateDLL: TToolButton
- Left = 458
- Top = 0
- Caption = 'Create &DLL'
- ImageIndex = 6
- MenuItem = mnuCreateDLL
- end
- object toolCreatePAT: TToolButton
- Left = 548
- Top = 0
- Caption = 'Create &patch file'
- ImageIndex = 7
- MenuItem = mnuCreatePAT
- end
- end
- end
- object chkOutputWait: TCheckBox
- Left = 232
- Top = 336
- Width = 305
- Height = 17
- Caption = 'Leave console window open after generating patches'
- TabOrder = 3
- OnClick = chkOutputWaitClick
- end
- object chkOptimal: TCheckBox
- Left = 232
- Top = 360
- Width = 441
- Height = 17
- Caption =
- '"Optimal" patch generation (can be very slow when generating pat' +
- 'ches for big files)'
- TabOrder = 4
- OnClick = chkOptimalClick
- end
- object MainMenu: TMainMenu
- Images = IL
- Left = 160
- Top = 328
- object mnuFile: TMenuItem
- Caption = '&File'
- object mnuNew: TMenuItem
- Caption = '&New'
- ImageIndex = 0
- ShortCut = 16462
- OnClick = mnuNewClick
- end
- object mnuOpen: TMenuItem
- Caption = '&Open'
- ImageIndex = 1
- ShortCut = 16463
- OnClick = mnuOpenClick
- end
- object mnuSave: TMenuItem
- Caption = '&Save'
- ImageIndex = 2
- ShortCut = 16467
- OnClick = mnuSaveClick
- end
- object mnuSaveas: TMenuItem
- Caption = 'Save &as...'
- OnClick = mnuSaveasClick
- end
- object N1: TMenuItem
- Caption = '-'
- end
- object mnuExit: TMenuItem
- Caption = 'E&xit'
- OnClick = mnuExitClick
- end
- end
- object mnuAction: TMenuItem
- Caption = '&Action'
- object mnuClearcachedpatches: TMenuItem
- Caption = 'Empty &cache'
- ImageIndex = 4
- OnClick = mnuClearcachedpatchesClick
- end
- object mnuGenGo: TMenuItem
- Caption = '&Generate'
- ImageIndex = 3
- OnClick = mnuGenGoClick
- end
- object mnuCreateEXE: TMenuItem
- Caption = 'Create &EXE'
- ImageIndex = 5
- OnClick = mnuCreateEXEClick
- end
- object mnuCreateDLL: TMenuItem
- Caption = 'Create &DLL'
- ImageIndex = 6
- OnClick = mnuCreateDLLClick
- end
- object mnuCreatePAT: TMenuItem
- Caption = 'Create &patch file'
- ImageIndex = 7
- OnClick = mnuCreatePATClick
- end
- end
- object mnuHelp: TMenuItem
- Caption = '&Help'
- object mnuWebsite: TMenuItem
- Caption = '&Website'
- OnClick = mnuWebsiteClick
- end
- object Readme1: TMenuItem
- Caption = '&Readme'
- OnClick = Readme1Click
- end
- object ReadmeincludedwithNSIS1: TMenuItem
- Caption = 'Readme included with NSIS'
- OnClick = ReadmeincludedwithNSIS1Click
- end
- object N2: TMenuItem
- Caption = '-'
- end
- object mnuAbout: TMenuItem
- Caption = '&About'
- OnClick = mnuAboutClick
- end
- end
- end
- object OD: TOpenDialog
- Filter = 'All files (*.*)|*.*'
- Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofDontAddToRecent]
- Left = 128
- Top = 328
- end
- object dlgOpen: TOpenDialog
- DefaultExt = '.vpj'
- Filter = 'VPatch ProJects (*.vpj)|*.vpj|All files (*.*)|*.*'
- Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
- Left = 104
- Top = 24
- end
- object dlgSave: TSaveDialog
- DefaultExt = '.vpj'
- Filter = 'VPatch ProJects (*.vpj)|*.vpj|All files (*.*)|*.*'
- Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing]
- Left = 136
- Top = 24
- end
- object IL: TImageList
- Left = 168
- Top = 24
- Bitmap = {
- 494C010108000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
- 0000000000003600000028000000400000003000000001002000000000000030
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000000000FF
- FF00000000000000000000000000000000000000000000000000000000000000
- 000000FFFF000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 000000000000000000000000000000000000000000000000000000FFFF0000FF
- FF0000FFFF0000000000000000000000000000000000000000000000000000FF
- FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
- 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
- 0000FF000000FF000000FF00000000000000000000000000FF000000FF000000
- FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
- FF000000FF000000FF000000FF00000000000000000000000000008000000080
- 0000008000000080000000800000008000000080000000800000008000000080
- 00000080000000800000008000000000000000000000007F7F0000FFFF0000FF
- FF0000FFFF0000FFFF000000000000000000000000000000000000FFFF0000FF
- FF0000FFFF0000FFFF00007F7F00000000000000000000000000FF000000FFFF
- FF00FFFFFF00FFFFFF00FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
- FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF00FFFF
- FF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FFFFFF000000FF00FFFF
- FF00FFFFFF00FFFFFF000000FF0000000000000000000000000000800000FFFF
- FF00008000000080000000800000FFFFFF0000800000FFFFFF00008000000080
- 0000FFFFFF000080000000800000000000000000000000FFFF0000FFFF0000FF
- FF0000FFFF0000FFFF00007F7F000000000000000000007F7F0000FFFF0000FF
- FF0000FFFF0000FFFF0000FFFF00000000000000000000000000FF000000FFFF
- FF00FF000000FF000000FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
- FF00FF000000FF000000FF00000000000000000000000000FF00FFFFFF000000
- FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
- FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
- FF00008000000080000000800000FFFFFF0000800000FFFFFF00008000000080
- 0000FFFFFF000080000000800000000000000000000000FFFF0000FFFF0000FF
- FF0000FFFF0000FFFF0000FFFF00000000000000000000FFFF0000FFFF0000FF
- FF0000FFFF0000FFFF0000FFFF00000000000000000000000000FF000000FFFF
- FF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00FF000000FF000000FFFF
- FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF000000
- FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
- FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
- FF00FFFFFF00FFFFFF0000800000FFFFFF00FFFFFF00FFFFFF00008000000080
- 0000FFFFFF000080000000800000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000FF000000FFFF
- FF00FF000000FF000000FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
- FF00FF000000FF000000FF00000000000000000000000000FF00FFFFFF000000
- FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
- FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
- FF0000800000FFFFFF0000800000FFFFFF0000800000FFFFFF00008000000080
- 0000FFFFFF000080000000800000000000000000000000000000000000000000
- 000000000000000000000000000000FFFF0000FFFF0000000000000000000000
- 0000000000000000000000000000000000000000000000000000FF000000FFFF
- FF00FFFFFF00FFFFFF00FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
- FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF00FFFF
- FF00FFFFFF000000FF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
- FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
- FF00FFFFFF00FFFFFF0000800000FFFFFF00FFFFFF00FFFFFF0000800000FFFF
- FF00FFFFFF00FFFFFF0000800000000000000000000000000000000000000000
- 000000000000000000000000000000FFFF0000FFFF0000000000000000000000
- 0000000000000000000000000000000000000000000000000000FF000000FF00
- 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
- 0000FF000000FF000000FF00000000000000000000000000FF000000FF000000
- FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
- FF000000FF000000FF000000FF00000000000000000000000000008000000080
- 0000008000000080000000800000008000000080000000800000008000000080
- 0000008000000080000000800000000000000000000000000000000000000000
- 00000000000000000000007F7F0000FFFF0000FFFF00007F7F00000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000FFFF0000FFFF0000FFFF0000FFFF00000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
- 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000000000000000000000
- 000000000000007F7F0000FFFF0000FFFF0000FFFF0000FFFF00007F7F000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000008080000080
- 8000000000000000000000000000000000000000000000000000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000000000008080000080
- 8000008080000080800000808000008080000080800000808000008080000000
- 0000000000000000000000000000000000000000000000000000008080000080
- 8000000000000000000000000000000000000000000000000000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000FFFF00000000000080
- 8000008080000080800000808000008080000080800000808000008080000080
- 8000000000000000000000000000000000000000000000000000008080000080
- 8000000000000000000000000000000000000000000000000000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF000000
- 0000008080000080800000808000008080000080800000808000008080000080
- 8000008080000000000000000000000000000000000000000000008080000080
- 8000000000000000000000000000000000000000000000000000000000000000
- 0000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
- FF00000000000080800000808000008080000080800000808000008080000080
- 8000008080000080800000000000000000000000000000000000008080000080
- 8000008080000080800000808000008080000080800000808000008080000080
- 8000008080000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
- FF0000FFFF000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000008080000080
- 8000000000000000000000000000000000000000000000000000000000000000
- 0000008080000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
- FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
- 0000000000000000000000000000000000000000000000000000008080000000
- 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
- FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
- 0000000000000000000000000000000000000000000000000000008080000000
- 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
- FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
- FF00000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000008080000000
- 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000008080000000
- 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
- C000000000000080800000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
- FF00000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000008080000000
- 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
- C000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000008080000000
- 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
- C00000000000C0C0C00000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 000000000000000000000000000000000000424D3E000000000000003E000000
- 2800000040000000300000000100010000000000800100000000000000000000
- 000000000000000000000000FFFFFF0000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 0000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000F81FE000E000E000E007E000E000E000
- C003E000E000E000800180000000800080018000000080000000800000008000
- 0000800000008000000080000000800000008000000080000000800000008000
- 000080000000800080018000000080008001E000E000E000C003E000E000E000
- E007E001E001E001F81FE003E003E003FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF
- E003001F8001FFFFE003000F8001FFFFE00300078001FDFFE00300038001FCFF
- E00300018001FC7FE00300008001FC3FE003001F8001FC1FE003001F8001FC3F
- E003001F8001FC7FE0038FF18001FCFFE007FFF98001FDFFE00FFF758001FFFF
- E01FFF8F8001FFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
- 000000000000}
- end
- object dlgSaveExe: TSaveDialog
- DefaultExt = '.exe'
- Filter = 'Executable files (*.exe)|*.exe|All files (*.*)|*.*'
- Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
- Left = 384
- Top = 56
- end
- object dlgSaveDLL: TSaveDialog
- DefaultExt = '.dll'
- Filter = 'DLL files (*.dll)|*.dll|All files (*.*)|*.*'
- Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
- Left = 416
- Top = 56
- end
- object dlgSavePAT: TSaveDialog
- DefaultExt = '.pat'
- Filter = 'Patch files (*.pat)|*.pat|All files (*.*)|*.*'
- Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
- Left = 448
- Top = 56
- end
-end
+object frmMain: TfrmMain
+ Left = 195
+ Top = 93
+ BorderIcons = [biSystemMenu, biMinimize]
+ BorderStyle = bsSingle
+ Caption = 'VG - VPatch GUI'
+ ClientHeight = 385
+ ClientWidth = 689
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ Icon.Data = {
+ 000001000200101000000100080068050000260000002020000001000800A808
+ 00008E0500002800000010000000200000000100080000000000000100000000
+ 0000000000000001000000010000000000000000800000800000008080008000
+ 00008000800080800000C0C0C000C0DCC000F0CAA60000003E0000005D000000
+ 7C0000009B000000BA000000D9000000F0002424FF004848FF006C6CFF009090
+ FF00B4B4FF0000143E00001E5D0000287C0000329B00003CBA000046D9000055
+ F000246DFF004885FF006C9DFF0090B5FF00B4CDFF00002A3E00003F5D000054
+ 7C0000699B00007EBA000093D90000AAF00024B6FF0048C2FF006CCEFF0090DA
+ FF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BABA0000D9D90000F0
+ F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E2A00005D3F00007C
+ 5400009B690000BA7E0000D9930000F0AA0024FFB60048FFC2006CFFCE0090FF
+ DA00B4FFE600003E1400005D1E00007C2800009B320000BA3C0000D9460000F0
+ 550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E0000005D0000007C
+ 0000009B000000BA000000D9000000F0000024FF240048FF48006CFF6C0090FF
+ 9000B4FFB400143E00001E5D0000287C0000329B00003CBA000046D9000055F0
+ 00006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E00003F5D0000547C
+ 0000699B00007EBA000093D90000AAF00000B6FF2400C2FF4800CEFF6C00DAFF
+ 9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA0000D9D90000F0F0
+ 0000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A00005D3F00007C54
+ 00009B690000BA7E0000D9930000F0AA0000FFB62400FFC24800FFCE6C00FFDA
+ 9000FFE6B4003E1400005D1E00007C2800009B320000BA3C0000D9460000F055
+ 0000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E0000005D0000007C00
+ 00009B000000BA000000D9000000F0000000FF242400FF484800FF6C6C00FF90
+ 9000FFB4B4003E0014005D001E007C0028009B003200BA003C00D9004600F000
+ 5500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E002A005D003F007C00
+ 54009B006900BA007E00D9009300F000AA00FF24B600FF48C200FF6CCE00FF90
+ DA00FFB4E6003E003E005D005D007C007C009B009B00BA00BA00D900D900F000
+ F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A003E003F005D005400
+ 7C0069009B007E00BA009300D900AA00F000B624FF00C248FF00CE6CFF00DA90
+ FF00E6B4FF0014003E001E005D0028007C0032009B003C00BA004600D9005500
+ F0006D24FF008548FF009D6CFF00B590FF00CDB4FF0006060600121212001F1F
+ 1F002C2C2C003939390045454500525252005F5F5F006C6C6C00787878008585
+ 8500929292009F9F9F00ABABAB00B8B8B800C5C5C500D2D2D200DEDEDE00EBEB
+ EB00F8F8F800F0FBFF00A4A0A000808080000000FF0000FF000000FFFF00FF00
+ 0000FF00FF00FFFF0000FFFFFF00000000000000000000000000000000000000
+ EAE7858586868796ECEBEA00000000919185858686868787888B8DF8000000E9
+ 99858586868687878B8B8C8A000000F8FF968686878787878D8B8B97000000EB
+ F4F48B8A888887879809870000000000EFFF8B8A8888878A9796850000000000
+ EDF48D8B8A8A8A09099800000000000000F7F4EFF2F2F2F20700000000000000
+ 00EDF3F0F0F0079800000000000000000000EBF307F0F7970000000000000000
+ 0000EAF5FFF4F78600000000000000000000F8F4FFF4F7960000000000000000
+ 0000EAF3F4F379F80000000000000000008D868585858585EA00000000000000
+ 009996EF07F19896980000000000FFFF0000C007000080030000800300008003
+ 000080070000C0070000C00F0000E01F0000E03F0000F03F0000F03F0000F03F
+ 0000F03F0000E01F0000E01F0000280000002000000040000000010008000000
+ 0000000400000000000000000000000100000001000000000000000080000080
+ 000000808000800000008000800080800000C0C0C000C0DCC000F0CAA6000000
+ 3E0000005D0000007C0000009B000000BA000000D9000000F0002424FF004848
+ FF006C6CFF009090FF00B4B4FF0000143E00001E5D0000287C0000329B00003C
+ BA000046D9000055F000246DFF004885FF006C9DFF0090B5FF00B4CDFF00002A
+ 3E00003F5D0000547C0000699B00007EBA000093D90000AAF00024B6FF0048C2
+ FF006CCEFF0090DAFF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BA
+ BA0000D9D90000F0F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E
+ 2A00005D3F00007C5400009B690000BA7E0000D9930000F0AA0024FFB60048FF
+ C2006CFFCE0090FFDA00B4FFE600003E1400005D1E00007C2800009B320000BA
+ 3C0000D9460000F0550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E
+ 0000005D0000007C0000009B000000BA000000D9000000F0000024FF240048FF
+ 48006CFF6C0090FF9000B4FFB400143E00001E5D0000287C0000329B00003CBA
+ 000046D9000055F000006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E
+ 00003F5D0000547C0000699B00007EBA000093D90000AAF00000B6FF2400C2FF
+ 4800CEFF6C00DAFF9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA
+ 0000D9D90000F0F00000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A
+ 00005D3F00007C5400009B690000BA7E0000D9930000F0AA0000FFB62400FFC2
+ 4800FFCE6C00FFDA9000FFE6B4003E1400005D1E00007C2800009B320000BA3C
+ 0000D9460000F0550000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E00
+ 00005D0000007C0000009B000000BA000000D9000000F0000000FF242400FF48
+ 4800FF6C6C00FF909000FFB4B4003E0014005D001E007C0028009B003200BA00
+ 3C00D9004600F0005500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E00
+ 2A005D003F007C0054009B006900BA007E00D9009300F000AA00FF24B600FF48
+ C200FF6CCE00FF90DA00FFB4E6003E003E005D005D007C007C009B009B00BA00
+ BA00D900D900F000F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A00
+ 3E003F005D0054007C0069009B007E00BA009300D900AA00F000B624FF00C248
+ FF00CE6CFF00DA90FF00E6B4FF0014003E001E005D0028007C0032009B003C00
+ BA004600D9005500F0006D24FF008548FF009D6CFF00B590FF00CDB4FF000606
+ 0600121212001F1F1F002C2C2C003939390045454500525252005F5F5F006C6C
+ 6C007878780085858500929292009F9F9F00ABABAB00B8B8B800C5C5C500D2D2
+ D200DEDEDE00EBEBEB00F8F8F800F0FBFF00A4A0A000808080000000FF0000FF
+ 000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0000000000000000000000
+ 00000000000000000000000000000000000000000000000000000000000000ED
+ EBEBEAEAEAEAEAEAEAEBF8ED000000000000000000000000000000ECE9E7E791
+ 85858586868686868585E7E7E8EAEBED000000000000000000EAE79191918585
+ 8686868687878788898A8B8C98A3E8E8EA00000000000000E791919185858585
+ 8586868686868787878787898C8DF409E9E90000000000E99191918585858585
+ 8686868686868787878788888A8B8BF5F484EB00000000919191989785858585
+ 868686868687878787878A8B8C8B898A8A8AEA00000000919109FFF485858585
+ 868686868687878787878B8C88F5FF8D8A8AF800000000EA91F3FFFF97858585
+ 868686868687878787888AFF888DF58B8C96EF00000000009198FFFF99858586
+ 868787878787878787878C8D88F58B898AEA000000000000EA85F4FFFF098B8B
+ 8A898888888887878786F58A8A8D898A85F0000000000000009109FFFF8D8B8B
+ 8A89888888888787878AF4868D968686EB0000000000000000F8A4F5FFF58B8B
+ 8A8988888888878787090996F38585E700000000000000000000918DFFFF8C8B
+ 8A89888888888787878D86098686EAED00000000000000000000F8EDF4FFF48B
+ 8A89888888888787878D8AF3EFF7EC00000000000000000000000091F1FFFFF0
+ 0709098B8B98090909F1F307F0EB00000000000000000000000000F8EBF4FFF2
+ F707F2F2F2F2F2F20807F3F0EDEB00000000000000000000000000009107FFF5
+ EEF0F1F2F2F2F2F109F107EFE9000000000000000000000000000000F7EAF3FF
+ F0F707F1F1F1F109F009EFEAEC0000000000000000000000000000000091F7F5
+ F3EDF7EFEFEFEF8B989886E80000000000000000000000000000000000F7E909
+ FFED79797979798B979791ED00000000000000000000000000000000000091F8
+ FFF2FFFFFFF379979785E900000000000000000000000000000000000000EA85
+ FFFFFFFFFFF379979791EB00000000000000000000000000000000000000EAEA
+ FFF4FFFFFFF379979791ED00000000000000000000000000000000000000EDEA
+ FFF3FFFFFFF379979791EE00000000000000000000000000000000000000ED85
+ FFF3FFFFFFF379979785EF00000000000000000000000000000000000000ED85
+ F3F3FFFFFFF379979785F700000000000000000000000000000000000000EC85
+ F3F2F3F3F20906797985EB00000000000000000000000000000000000000EB85
+ 86858585858585858585E8F800000000000000000000000000000000008A8786
+ 858585F8EC868585858585EB00000000000000000000000000000000008685F7
+ EF07F1F1F1F1F107EF8686EF0000000000000000000000000000000000F29797
+ 97979809090997979796090000000000000000000000FFFFFFFFFF8003FFF800
+ 003FE000001FC000000F80000007800000078000000780000007C000000FC000
+ 000FE000001FE000003FF000003FF000007FF80000FFF80000FFFC0001FFFC00
+ 01FFFE0003FFFE0003FFFF0007FFFF0007FFFF0007FFFF0007FFFF0007FFFF00
+ 07FFFF0007FFFF0003FFFE0003FFFE0003FFFE0007FF}
+ Menu = MainMenu
+ OldCreateOrder = False
+ Position = poScreenCenter
+ ShowHint = True
+ OnCreate = FormCreate
+ OnDestroy = FormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Label1: TLabel
+ Left = 8
+ Top = 32
+ Width = 77
+ Height = 13
+ Caption = 'New versions'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object butAdd: TSpeedButton
+ Left = 24
+ Top = 328
+ Width = 193
+ Height = 25
+ Caption = 'Add &new version'
+ Glyph.Data = {
+ 36050000424D3605000000000000360400002800000010000000100000000100
+ 08000000000000010000000000000000000000010000000100004A004A006200
+ 6200780178009F019F00BC01BC00D301D300E200E200EF00EF00F700F700FB00
+ FB00FD00FD00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
+ FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
+ FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00FE00
+ FE00FE00FE00FE00FE00FD00FD00FC00FC00FA00FA00F701F700F202F200EC03
+ EC00E305E300D708D700C60BC600AF11AF008F188F007E1D7E006C226C006125
+ 6100572857004C2C4C0040304000353535003636360037373700383838003939
+ 39003A3A3A003B3B3B003C3C3C003D3D3D003E3E3E003F3F3F00404040004141
+ 4100424242004343430044444400454545004646460047474700484848004949
+ 49004A4A4A004B4B4B004C4C4C004D4D4D004E4E4E004F4F4F00505050005151
+ 5100525252005353530054545400555555005656560057575700585858005959
+ 59005A5A5A005B5B5B005C5C5C005D5D5D005E5E5E005F5F5F00606060006161
+ 6100626262006363630064646400656565006666660067676700686868006969
+ 69006A6A6A006B6B6B006C6C6C006D6D6D006E6E6E006F6F6F00707070007171
+ 7100727272007373730074747400757575007676760077777700787878007979
+ 79007A7A7A007B7B7B007C7C7C007D7D7D007E7E7E007F7F7F00808080008181
+ 8100828282008383830084848400858585008686860087878700888888008989
+ 89008A8A8A008B8B8B008C8C8C008D8D8D008E8E8E008F8F8F00909090009191
+ 9100929292009393930094949400959595009696960097979700989898009999
+ 99009A9A9A009B9B9B009C9C9C009D9D9D009E9E9E009F9F9F00A0A0A000A1A1
+ A100A2A2A200A3A3A300A4A4A400A5A5A500A6A6A600A7A7A700A8A8A800A9A9
+ A900AAAAAA00ABABAB00ACACAC00ADADAD00AEAEAE00B3B3B300BFC1BF00C8CC
+ C900D0D5D200D7DDD900DEE6E100E6EDE800ECF3EE00F1F7F300F5FAF600F7FB
+ F900F9FCFA00FBFDFB00FBFDFC00FBFDFC00F9FDFA00F6FCF800F4FBF600F0FA
+ F300ECFAF100E9F9EF00E6F8ED00E2F7EA00DDF6E700D7F4E300D3F3E000D0F2
+ DD00CEF1DB00CCF1D900C9EFD600C0EDCF00B9EBC900ADE7C000A3E4B80098E0
+ AF008DDDA50085DAA0007DD89A0075D694006DD38F0067D18B0060CF84005BCE
+ 800055CC7B004DCA780047C8750042C672003DC46E0039C36B0036C2680033C0
+ 640030BE61002EBC5C002CBA590029B9550027B8510027B74E0025B5490023B5
+ 440023B3420022B13D0020B03B001EB1360019B2310016B32D0012B327000EB4
+ 21000BB41D000AB41B0009B31A0009B0190009AD19000AA318000A9717000A8C
+ 1700097D14000872120007680E0006640D0006650D0007690F001515151515FD
+ FDFFFFFDFD1515151515151515FDFDF9F5F4F4F5F8FCFC1515151515FFFAF2F4
+ F4F5F4F4F4F4FAFD151515FFF9EFF0F2F5F5F5F5F5F4F4FAFE1515FFE8E9EFF2
+ EDC6C2D9F5F5F4F4FE15FBECE3E9F1F3F1D1BCBFDAF5F5F4F8FDFBE4E1E7F1F4
+ F2F5D2BCBFDAF5F4F6FDFADFDFCACCCCCCCDCDBEBCC1D6F4F4FEF9D9DCBCBCBC
+ BCBCBCBCBCBCCEF3F4FFF9D6D7D6D5D5D5D7D2BBBCD0E7F0F5FDF9D8D0DEE0DE
+ DED5C4BCD1E8EBF0F7FD15ECCDD3E1E0DAB9BCD1E8E9EEEFF91515ECD6C8D3DF
+ DECDCFE1E5E7E9EEF9151515ECD3C6CFD6DADCDBDBDFE8FA1515151515ECECCF
+ C9CDCFD1D6E4E41515151515151515E7ECECECECEA1515151515}
+ OnClick = butAddClick
+ end
+ object grpConfig: TGroupBox
+ Left = 232
+ Top = 51
+ Width = 441
+ Height = 270
+ Enabled = False
+ TabOrder = 0
+ object Label2: TLabel
+ Left = 16
+ Top = 24
+ Width = 71
+ Height = 13
+ Caption = 'New version'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label3: TLabel
+ Left = 16
+ Top = 80
+ Width = 71
+ Height = 13
+ Caption = 'Old versions'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object butOldAdd: TSpeedButton
+ Left = 368
+ Top = 96
+ Width = 49
+ Height = 25
+ Caption = '&Add'
+ Flat = True
+ OnClick = butOldAddClick
+ end
+ object butOldRemove: TSpeedButton
+ Left = 368
+ Top = 160
+ Width = 49
+ Height = 25
+ Caption = '&Remove'
+ Flat = True
+ OnClick = butOldRemoveClick
+ end
+ object butNewEdit: TSpeedButton
+ Left = 368
+ Top = 40
+ Width = 49
+ Height = 25
+ Caption = '&Edit'
+ Flat = True
+ OnClick = butNewEditClick
+ end
+ object Label4: TLabel
+ Left = 16
+ Top = 200
+ Width = 176
+ Height = 13
+ Caption = 'Patch generation configuration'
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = [fsBold]
+ ParentFont = False
+ end
+ object Label5: TLabel
+ Left = 32
+ Top = 224
+ Width = 48
+ Height = 13
+ Hint = 'Smaller gives smaller patch files, but decreased speed'
+ Caption = 'Block size'
+ end
+ object Label7: TLabel
+ Left = 232
+ Top = 224
+ Width = 61
+ Height = 13
+ Caption = 'Block divider'
+ Visible = False
+ end
+ object txtStartBlockSize: TLabel
+ Left = 136
+ Top = 224
+ Width = 65
+ Height = 17
+ Alignment = taCenter
+ AutoSize = False
+ end
+ object txtNew: TEdit
+ Left = 32
+ Top = 42
+ Width = 321
+ Height = 21
+ ReadOnly = True
+ TabOrder = 0
+ end
+ object lstOld: TListBox
+ Left = 32
+ Top = 96
+ Width = 321
+ Height = 89
+ ItemHeight = 13
+ TabOrder = 1
+ end
+ object tbBlockSize: TTrackBar
+ Left = 200
+ Top = 224
+ Width = 161
+ Height = 25
+ Max = 12
+ Min = 4
+ Position = 6
+ TabOrder = 2
+ OnChange = tbBlockSizeChange
+ end
+ end
+ object lstNew: TVirtualStringTree
+ Left = 24
+ Top = 56
+ Width = 193
+ Height = 265
+ Header.AutoSizeIndex = 0
+ Header.Font.Charset = DEFAULT_CHARSET
+ Header.Font.Color = clWindowText
+ Header.Font.Height = -11
+ Header.Font.Name = 'MS Sans Serif'
+ Header.Font.Style = []
+ Header.MainColumn = -1
+ Header.Options = [hoColumnResize, hoDrag]
+ HintAnimation = hatNone
+ Indent = 0
+ TabOrder = 1
+ TreeOptions.PaintOptions = [toHotTrack, toShowBackground, toShowButtons, toShowDropmark, toShowRoot, toThemeAware, toUseBlendedImages]
+ TreeOptions.SelectionOptions = [toFullRowSelect]
+ OnChange = lstNewChange
+ OnGetText = lstNewGetText
+ Columns = <>
+ end
+ object barCool: TCoolBar
+ Left = 0
+ Top = 0
+ Width = 689
+ Height = 44
+ AutoSize = True
+ Bands = <
+ item
+ BorderStyle = bsSingle
+ Control = barTool
+ ImageIndex = -1
+ MinHeight = 36
+ Width = 689
+ end>
+ EdgeBorders = [ebTop, ebBottom]
+ object barTool: TToolBar
+ Left = 9
+ Top = 2
+ Width = 676
+ Height = 36
+ AutoSize = True
+ ButtonHeight = 36
+ ButtonWidth = 90
+ Caption = 'barTool'
+ EdgeBorders = []
+ Flat = True
+ Images = IL
+ ShowCaptions = True
+ TabOrder = 0
+ object toolNew: TToolButton
+ Left = 0
+ Top = 0
+ Caption = '&New'
+ ImageIndex = 0
+ MenuItem = mnuNew
+ end
+ object toolOpen: TToolButton
+ Left = 90
+ Top = 0
+ Caption = '&Open'
+ ImageIndex = 1
+ MenuItem = mnuOpen
+ end
+ object toolSave: TToolButton
+ Left = 180
+ Top = 0
+ Caption = '&Save'
+ ImageIndex = 2
+ MenuItem = mnuSave
+ end
+ object ToolButton1: TToolButton
+ Left = 270
+ Top = 0
+ Width = 8
+ Caption = 'ToolButton1'
+ ImageIndex = 7
+ Style = tbsSeparator
+ end
+ object toolGenGo: TToolButton
+ Left = 278
+ Top = 0
+ Caption = '&Generate'
+ ImageIndex = 3
+ MenuItem = mnuGenGo
+ end
+ object toolCreateEXE: TToolButton
+ Left = 368
+ Top = 0
+ Caption = 'Create &EXE'
+ ImageIndex = 5
+ MenuItem = mnuCreateEXE
+ end
+ object toolCreateDLL: TToolButton
+ Left = 458
+ Top = 0
+ Caption = 'Create &DLL'
+ ImageIndex = 6
+ MenuItem = mnuCreateDLL
+ end
+ object toolCreatePAT: TToolButton
+ Left = 548
+ Top = 0
+ Caption = 'Create &patch file'
+ ImageIndex = 7
+ MenuItem = mnuCreatePAT
+ end
+ end
+ end
+ object chkOutputWait: TCheckBox
+ Left = 232
+ Top = 336
+ Width = 305
+ Height = 17
+ Caption = 'Leave console window open after generating patches'
+ TabOrder = 3
+ OnClick = chkOutputWaitClick
+ end
+ object chkOptimal: TCheckBox
+ Left = 232
+ Top = 360
+ Width = 441
+ Height = 17
+ Caption =
+ '"Optimal" patch generation (can be very slow when generating pat' +
+ 'ches for big files)'
+ TabOrder = 4
+ OnClick = chkOptimalClick
+ end
+ object MainMenu: TMainMenu
+ Images = IL
+ Left = 160
+ Top = 328
+ object mnuFile: TMenuItem
+ Caption = '&File'
+ object mnuNew: TMenuItem
+ Caption = '&New'
+ ImageIndex = 0
+ ShortCut = 16462
+ OnClick = mnuNewClick
+ end
+ object mnuOpen: TMenuItem
+ Caption = '&Open'
+ ImageIndex = 1
+ ShortCut = 16463
+ OnClick = mnuOpenClick
+ end
+ object mnuSave: TMenuItem
+ Caption = '&Save'
+ ImageIndex = 2
+ ShortCut = 16467
+ OnClick = mnuSaveClick
+ end
+ object mnuSaveas: TMenuItem
+ Caption = 'Save &as...'
+ OnClick = mnuSaveasClick
+ end
+ object N1: TMenuItem
+ Caption = '-'
+ end
+ object mnuExit: TMenuItem
+ Caption = 'E&xit'
+ OnClick = mnuExitClick
+ end
+ end
+ object mnuAction: TMenuItem
+ Caption = '&Action'
+ object mnuClearcachedpatches: TMenuItem
+ Caption = 'Empty &cache'
+ ImageIndex = 4
+ OnClick = mnuClearcachedpatchesClick
+ end
+ object mnuGenGo: TMenuItem
+ Caption = '&Generate'
+ ImageIndex = 3
+ OnClick = mnuGenGoClick
+ end
+ object mnuCreateEXE: TMenuItem
+ Caption = 'Create &EXE'
+ ImageIndex = 5
+ OnClick = mnuCreateEXEClick
+ end
+ object mnuCreateDLL: TMenuItem
+ Caption = 'Create &DLL'
+ ImageIndex = 6
+ OnClick = mnuCreateDLLClick
+ end
+ object mnuCreatePAT: TMenuItem
+ Caption = 'Create &patch file'
+ ImageIndex = 7
+ OnClick = mnuCreatePATClick
+ end
+ end
+ object mnuHelp: TMenuItem
+ Caption = '&Help'
+ object mnuWebsite: TMenuItem
+ Caption = '&Website'
+ OnClick = mnuWebsiteClick
+ end
+ object Readme1: TMenuItem
+ Caption = '&Readme'
+ OnClick = Readme1Click
+ end
+ object ReadmeincludedwithNSIS1: TMenuItem
+ Caption = 'Readme included with NSIS'
+ OnClick = ReadmeincludedwithNSIS1Click
+ end
+ object N2: TMenuItem
+ Caption = '-'
+ end
+ object mnuAbout: TMenuItem
+ Caption = '&About'
+ OnClick = mnuAboutClick
+ end
+ end
+ end
+ object OD: TOpenDialog
+ Filter = 'All files (*.*)|*.*'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofDontAddToRecent]
+ Left = 128
+ Top = 328
+ end
+ object dlgOpen: TOpenDialog
+ DefaultExt = '.vpj'
+ Filter = 'VPatch ProJects (*.vpj)|*.vpj|All files (*.*)|*.*'
+ Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
+ Left = 104
+ Top = 24
+ end
+ object dlgSave: TSaveDialog
+ DefaultExt = '.vpj'
+ Filter = 'VPatch ProJects (*.vpj)|*.vpj|All files (*.*)|*.*'
+ Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing]
+ Left = 136
+ Top = 24
+ end
+ object IL: TImageList
+ Left = 168
+ Top = 24
+ Bitmap = {
+ 494C010108000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+ 0000000000003600000028000000400000003000000001002000000000000030
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000000000FF
+ FF00000000000000000000000000000000000000000000000000000000000000
+ 000000FFFF000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000FFFF0000FF
+ FF0000FFFF0000000000000000000000000000000000000000000000000000FF
+ FF0000FFFF0000FFFF0000000000000000000000000000000000FF000000FF00
+ 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+ 0000FF000000FF000000FF00000000000000000000000000FF000000FF000000
+ FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+ FF000000FF000000FF000000FF00000000000000000000000000008000000080
+ 0000008000000080000000800000008000000080000000800000008000000080
+ 00000080000000800000008000000000000000000000007F7F0000FFFF0000FF
+ FF0000FFFF0000FFFF000000000000000000000000000000000000FFFF0000FF
+ FF0000FFFF0000FFFF00007F7F00000000000000000000000000FF000000FFFF
+ FF00FFFFFF00FFFFFF00FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
+ FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF00FFFF
+ FF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FFFFFF000000FF00FFFF
+ FF00FFFFFF00FFFFFF000000FF0000000000000000000000000000800000FFFF
+ FF00008000000080000000800000FFFFFF0000800000FFFFFF00008000000080
+ 0000FFFFFF000080000000800000000000000000000000FFFF0000FFFF0000FF
+ FF0000FFFF0000FFFF00007F7F000000000000000000007F7F0000FFFF0000FF
+ FF0000FFFF0000FFFF0000FFFF00000000000000000000000000FF000000FFFF
+ FF00FF000000FF000000FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
+ FF00FF000000FF000000FF00000000000000000000000000FF00FFFFFF000000
+ FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
+ FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
+ FF00008000000080000000800000FFFFFF0000800000FFFFFF00008000000080
+ 0000FFFFFF000080000000800000000000000000000000FFFF0000FFFF0000FF
+ FF0000FFFF0000FFFF0000FFFF00000000000000000000FFFF0000FFFF0000FF
+ FF0000FFFF0000FFFF0000FFFF00000000000000000000000000FF000000FFFF
+ FF00FFFFFF00FFFFFF00FF000000FF000000FFFFFF00FF000000FF000000FFFF
+ FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF000000
+ FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
+ FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
+ FF00FFFFFF00FFFFFF0000800000FFFFFF00FFFFFF00FFFFFF00008000000080
+ 0000FFFFFF000080000000800000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000FF000000FFFF
+ FF00FF000000FF000000FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
+ FF00FF000000FF000000FF00000000000000000000000000FF00FFFFFF000000
+ FF000000FF00FFFFFF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
+ FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
+ FF0000800000FFFFFF0000800000FFFFFF0000800000FFFFFF00008000000080
+ 0000FFFFFF000080000000800000000000000000000000000000000000000000
+ 000000000000000000000000000000FFFF0000FFFF0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000FF000000FFFF
+ FF00FFFFFF00FFFFFF00FF000000FFFFFF00FF000000FFFFFF00FF000000FFFF
+ FF00FFFFFF00FFFFFF00FF00000000000000000000000000FF00FFFFFF00FFFF
+ FF00FFFFFF000000FF000000FF00FFFFFF000000FF000000FF000000FF00FFFF
+ FF000000FF000000FF000000FF0000000000000000000000000000800000FFFF
+ FF00FFFFFF00FFFFFF0000800000FFFFFF00FFFFFF00FFFFFF0000800000FFFF
+ FF00FFFFFF00FFFFFF0000800000000000000000000000000000000000000000
+ 000000000000000000000000000000FFFF0000FFFF0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000FF000000FF00
+ 0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+ 0000FF000000FF000000FF00000000000000000000000000FF000000FF000000
+ FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+ FF000000FF000000FF000000FF00000000000000000000000000008000000080
+ 0000008000000080000000800000008000000080000000800000008000000080
+ 0000008000000080000000800000000000000000000000000000000000000000
+ 00000000000000000000007F7F0000FFFF0000FFFF00007F7F00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000FFFF0000FFFF0000FFFF0000FFFF00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000000000000000000000
+ 000000000000007F7F0000FFFF0000FFFF0000FFFF0000FFFF00007F7F000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF0000000000C0C0C000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000008080000080
+ 8000000000000000000000000000000000000000000000000000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000000000008080000080
+ 8000008080000080800000808000008080000080800000808000008080000000
+ 0000000000000000000000000000000000000000000000000000008080000080
+ 8000000000000000000000000000000000000000000000000000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000FFFF00000000000080
+ 8000008080000080800000808000008080000080800000808000008080000080
+ 8000000000000000000000000000000000000000000000000000008080000080
+ 8000000000000000000000000000000000000000000000000000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF000000
+ 0000008080000080800000808000008080000080800000808000008080000080
+ 8000008080000000000000000000000000000000000000000000008080000080
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
+ FF00000000000080800000808000008080000080800000808000008080000080
+ 8000008080000080800000000000000000000000000000000000008080000080
+ 8000008080000080800000808000008080000080800000808000008080000080
+ 8000008080000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
+ FF0000FFFF000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000008080000080
+ 8000000000000000000000000000000000000000000000000000000000000000
+ 0000008080000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
+ FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+ 0000000000000000000000000000000000000000000000000000008080000000
+ 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
+ FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+ 0000000000000000000000000000000000000000000000000000008080000000
+ 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+ FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
+ FF00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000008080000000
+ 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000008080000000
+ 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
+ C000000000000080800000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+ FF00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000008080000000
+ 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
+ C000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000008080000000
+ 0000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0C000C0C0
+ C00000000000C0C0C00000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000424D3E000000000000003E000000
+ 2800000040000000300000000100010000000000800100000000000000000000
+ 000000000000000000000000FFFFFF0000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000F81FE000E000E000E007E000E000E000
+ C003E000E000E000800180000000800080018000000080000000800000008000
+ 0000800000008000000080000000800000008000000080000000800000008000
+ 000080000000800080018000000080008001E000E000E000C003E000E000E000
+ E007E001E001E001F81FE003E003E003FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF
+ E003001F8001FFFFE003000F8001FFFFE00300078001FDFFE00300038001FCFF
+ E00300018001FC7FE00300008001FC3FE003001F8001FC1FE003001F8001FC3F
+ E003001F8001FC7FE0038FF18001FCFFE007FFF98001FDFFE00FFF758001FFFF
+ E01FFF8F8001FFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
+ 000000000000}
+ end
+ object dlgSaveExe: TSaveDialog
+ DefaultExt = '.exe'
+ Filter = 'Executable files (*.exe)|*.exe|All files (*.*)|*.*'
+ Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
+ Left = 384
+ Top = 56
+ end
+ object dlgSaveDLL: TSaveDialog
+ DefaultExt = '.dll'
+ Filter = 'DLL files (*.dll)|*.dll|All files (*.*)|*.*'
+ Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
+ Left = 416
+ Top = 56
+ end
+ object dlgSavePAT: TSaveDialog
+ DefaultExt = '.pat'
+ Filter = 'Patch files (*.pat)|*.pat|All files (*.*)|*.*'
+ Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofNoReadOnlyReturn, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
+ Left = 448
+ Top = 56
+ end
+end
diff --git a/Contrib/VPatch/Source/GUI/MainForm.pas b/Contrib/VPatch/Source/GUI/MainForm.pas
index 242df44..fda49fc 100755
--- a/Contrib/VPatch/Source/GUI/MainForm.pas
+++ b/Contrib/VPatch/Source/GUI/MainForm.pas
@@ -1,539 +1,539 @@
-unit MainForm;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, Buttons, StdCtrls, Menus, PatchClasses, VirtualTrees, VDSP_CRC,
- ToolWin, ComCtrls, ImgList, ExtCtrls, Math, OSUtil;
-
-const
- UntitledFile='Untitled.vpj';
-
-type
- TfrmMain = class(TForm)
- MainMenu: TMainMenu;
- mnuFile: TMenuItem;
- mnuNew: TMenuItem;
- mnuOpen: TMenuItem;
- mnuSave: TMenuItem;
- mnuSaveas: TMenuItem;
- N1: TMenuItem;
- mnuExit: TMenuItem;
- Label1: TLabel;
- grpConfig: TGroupBox;
- butAdd: TSpeedButton;
- OD: TOpenDialog;
- Label2: TLabel;
- txtNew: TEdit;
- Label3: TLabel;
- mnuHelp: TMenuItem;
- mnuAbout: TMenuItem;
- lstOld: TListBox;
- butOldAdd: TSpeedButton;
- butOldRemove: TSpeedButton;
- butNewEdit: TSpeedButton;
- Label4: TLabel;
- lstNew: TVirtualStringTree;
- dlgOpen: TOpenDialog;
- dlgSave: TSaveDialog;
- IL: TImageList;
- mnuAction: TMenuItem;
- mnuGenGo: TMenuItem;
- barTool: TToolBar;
- toolNew: TToolButton;
- toolOpen: TToolButton;
- toolSave: TToolButton;
- toolGenGo: TToolButton;
- mnuCreateEXE: TMenuItem;
- dlgSaveExe: TSaveDialog;
- toolCreateEXE: TToolButton;
- barCool: TCoolBar;
- Label5: TLabel;
- Label7: TLabel;
- tbBlockSize: TTrackBar;
- txtStartBlockSize: TLabel;
- mnuClearcachedpatches: TMenuItem;
- mnuCreateDLL: TMenuItem;
- mnuCreatePAT: TMenuItem;
- toolCreateDLL: TToolButton;
- ToolButton1: TToolButton;
- toolCreatePAT: TToolButton;
- dlgSaveDLL: TSaveDialog;
- dlgSavePAT: TSaveDialog;
- chkOutputWait: TCheckBox;
- mnuWebsite: TMenuItem;
- Readme1: TMenuItem;
- N2: TMenuItem;
- ReadmeincludedwithNSIS1: TMenuItem;
- chkOptimal: TCheckBox;
- procedure butAddClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormDestroy(Sender: TObject);
- procedure mnuExitClick(Sender: TObject);
- procedure UpdateStates;
- procedure ReloadNewTree;
- procedure SelectInNewTree(PatchIndex: Integer);
- procedure butNewEditClick(Sender: TObject);
- procedure lstNewChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
- procedure butOldAddClick(Sender: TObject);
- procedure butOldRemoveClick(Sender: TObject);
- procedure mnuNewClick(Sender: TObject);
- procedure mnuOpenClick(Sender: TObject);
- procedure mnuSaveClick(Sender: TObject);
- procedure mnuSaveasClick(Sender: TObject);
- procedure mnuGenGoClick(Sender: TObject);
- procedure mnuAboutClick(Sender: TObject);
- procedure mnuCreateEXEClick(Sender: TObject);
- procedure lstNewGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
- Column: TColumnIndex; TextType: TVSTTextType;
- var CellText: WideString);
- procedure txtStartBlockSizeChange(Sender: TObject);
- procedure txtMinimumBlockSizeChange(Sender: TObject);
- procedure txtBlockDividerChange(Sender: TObject);
- procedure txtStepSizeChange(Sender: TObject);
- procedure tbBlockSizeChange(Sender: TObject);
- procedure mnuClearcachedpatchesClick(Sender: TObject);
- procedure mnuCreateDLLClick(Sender: TObject);
- procedure mnuCreatePATClick(Sender: TObject);
- procedure chkOutputWaitClick(Sender: TObject);
- procedure mnuWebsiteClick(Sender: TObject);
- procedure Readme1Click(Sender: TObject);
- procedure ReadmeincludedwithNSIS1Click(Sender: TObject);
- procedure chkOptimalClick(Sender: TObject);
- private
- { Private declarations }
-// MS: TModeSelector;
- dskName: String;
- function DoSave(const FileName: String; const Prompt: Boolean): String;
- procedure OpenAFile(FileName: String; AskSave: Boolean=True; PromptNew: Boolean=False);
- function CollectConfig: String;
- procedure SetConfigTextBoxes(Config: String);
- public
- { Public declarations }
- end;
-
-var
- frmMain: TfrmMain;
- PP: TPatchProject = nil;
-
-implementation
-
-uses AboutForm, DLLWrapper;
-
-{$R *.dfm}
-
-procedure TfrmMain.butAddClick(Sender: TObject);
-begin
- OD.Options:=OD.Options-[ofAllowMultiSelect];
- OD.Title:='Open the latest (new) version of a file...';
- OD.FileName:='';
- if OD.Execute then begin
- PP.AddNewVersion(OD.FileName);
- ReloadNewTree;
- SelectInNewTree(PP.PatchFile(OD.FileName).Index);
- butOldAdd.Click;
- end;
-end;
-
-procedure TfrmMain.FormCreate(Sender: TObject);
-begin
- grpConfig.Tag:=-1;
- dskName:=UntitledFile;
- lstNew.NodeDataSize:=SizeOf(Integer);
- OpenAFile('',False,False); //don't prompt for New! that'll bug things
- ReloadNewTree;
- UpdateStates;
-end;
-
-procedure TfrmMain.FormDestroy(Sender: TObject);
-begin
- PP.Free;
-end;
-
-procedure TfrmMain.mnuExitClick(Sender: TObject);
-begin
- Close;
-end;
-
-procedure TfrmMain.UpdateStates;
-begin
- Self.Caption:='VG - VPatch GUI - '+dskName;
-// grpConfig.Enabled:=not (lstNew.Tag=-1);
-// if not grpConfig.Enabled then grpConfig.Caption:='Select a file first';
- grpConfig.Enabled:=(lstNew.SelectedCount>0);
- if grpConfig.Tag=-1 then begin
- txtNew.Enabled:=False;
- butNewEdit.Enabled:=False;
- butNewEdit.Font.Color:=clInactiveCaption;
- butOldAdd.Enabled:=False;
- butOldAdd.Font.Color:=clInactiveCaption;
- butOldRemove.Enabled:=False;
- butOldRemove.Font.Color:=clInactiveCaption;
- end else begin
- txtNew.Enabled:=True;
- butNewEdit.Enabled:=True;
- butNewEdit.Font.Color:=clWindowText;
- butOldAdd.Enabled:=True;
- butOldAdd.Font.Color:=clWindowText;
-// butOldEdit.Enabled:=True;
- butOldRemove.Enabled:=True;
- butOldRemove.Font.Color:=clWindowText;
- end;
-end;
-
-procedure TfrmMain.ReloadNewTree;
-var
- i: Integer;
- Node: PVirtualNode;
-begin
- lstNew.BeginUpdate;
- lstNew.Clear;
- for i:=0 to PP.GetPatchCount - 1 do begin
- Node:=lstNew.AddChild(nil);
- PInteger(lstNew.GetNodeData(Node))^:=i;
- end;
- lstNew.EndUpdate;
-end;
-
-procedure TfrmMain.butNewEditClick(Sender: TObject);
-var
- i: Integer;
-begin
- OD.Options:=OD.Options-[ofAllowMultiSelect];
- OD.Title:='Select new version of file...';
- OD.FileName:=txtNew.Text;
- if OD.Execute then begin
- i:=grpConfig.Tag;
- PP.PatchFile(i).NewVersion:=OD.FileName;
- ReloadNewTree;
- lstNew.Selected[lstNew.GetFirstVisible]:=True;
- end;
-end;
-
-procedure TfrmMain.lstNewChange(Sender: TBaseVirtualTree;
- Node: PVirtualNode);
-var
- i,j: Integer;
-begin
- case lstNew.SelectedCount of
- 0: Exit;
- 1: begin
- if lstNew.Selected[Node] then begin
- i:=PInteger(lstNew.GetNodeData(Node))^;
- grpConfig.Caption:=ExtractFileName(PP.PatchFile(i).NewVersion);
- grpConfig.Tag:=i;
- txtNew.Text:=PP.PatchFile(i).NewVersion;
- lstOld.Clear;
- for j:=0 to PP.PatchFile(i).OldVersionCount - 1 do begin
- lstOld.Items.Add(PP.PatchFile(i).OldVersions[j]);
- end;
- SetConfigTextBoxes(PP.PatchFile(i).Config);
- end;
- end;
- else begin
- grpConfig.Tag:=-1; //multiple files selected - only allow config changes
- txtNew.Text:='(multiple files selected)';
- lstOld.Clear;
- end;
- end;
- UpdateStates;
-end;
-
-procedure TfrmMain.butOldAddClick(Sender: TObject);
-var
- i,j: Integer;
-begin
- OD.Options:=OD.Options+[ofAllowMultiSelect];
- OD.Title:='Select old versions of '+grpConfig.Caption+'...';
- OD.FileName:='';
- if OD.Execute then begin
- i:=grpConfig.Tag;
- for j:=0 to OD.Files.Count - 1 do begin
- PP.PatchFile(i).AddOldVersion(OD.Files[j]);
- lstOld.Items.Add(OD.Files.Strings[j]);
- end;
- end;
-end;
-
-procedure TfrmMain.SelectInNewTree(PatchIndex: Integer);
-var
- Node: PVirtualNode;
-begin
- Node:=lstNew.GetFirstSelected;
- while Node<>nil do begin
- lstNew.Selected[Node]:=False;
- Node:=lstNew.GetNextSelected(Node);
- end;
- Node:=lstNew.GetFirst;
- while Node<>nil do begin
- if PInteger(lstNew.GetNodeData(Node))^=PatchIndex then begin
- lstNew.Selected[Node]:=True;
- lstNewChange(lstNew,Node);
- Exit;
- end;
- Node:=lstNew.GetNext(Node);
- end;
-end;
-
-procedure TfrmMain.butOldRemoveClick(Sender: TObject);
-begin
- if lstOld.ItemIndex>=0 then begin
- PP.PatchFile(grpConfig.Tag).RemoveOldVersion(lstOld.ItemIndex);
- lstOld.Items.Delete(lstOld.ItemIndex);
- end;
-end;
-
-procedure TfrmMain.OpenAFile(FileName: String; AskSave: Boolean=True; PromptNew: Boolean=False);
-var
- fs: TFileStream;
-begin
- PP.Free; //confirm saving first?
- PP:=TPatchProject.Create;
- ReloadNewTree;
- if FileName<>'' then begin
- fs:=TFileStream.Create(FileName,fmOpenRead);
- try
- PP.LoadFromStream(fs);
- except
- on E: Exception do ShowMessage(E.Message);
- end;
- dskName:=FileName;
- ReloadNewTree;
- fs.Free;
- end else begin
- dskName:=UntitledFile;
- if PromptNew then butAddClick(Self);
- end;
-
- UpdateStates;
-end;
-
-procedure TfrmMain.mnuNewClick(Sender: TObject);
-begin
- OpenAFile('',True,True);
-end;
-
-procedure TfrmMain.mnuOpenClick(Sender: TObject);
-begin
- if dlgOpen.Execute then begin
- OpenAFile(dlgOpen.FileName,True);
- if lstNew.GetFirst <> nil then
- lstNew.Selected[lstNew.GetFirst]:=True;
- end;
-end;
-
-procedure TfrmMain.mnuSaveClick(Sender: TObject);
-begin
- dskName:=DoSave(dskName,False);
- UpdateStates;
-end;
-
-procedure TfrmMain.mnuSaveasClick(Sender: TObject);
-begin
- dskName:=DoSave(dskName,True);
- UpdateStates;
-end;
-
-function TfrmMain.DoSave(const FileName: String; const Prompt: Boolean): String;
-var
- FN: String;
- fs: TFileStream;
-begin
- DoSave:='';
- FN:=FileName;
- if Prompt or (CompareText(FileName,UntitledFile)=0) then begin
- if dlgSave.Execute then begin
- FN:=dlgSave.FileName;
- if ExtractFileExt(FN)='' then
- FN:=FN+'.vpj';
- end else begin
- DoSave:=FileName;
- Exit;
- end;
- end;
- //do actual saving to this file...
- fs:=TFileStream.Create(FN,fmCreate);
- PP.SaveToStream(fs);
- fs.Free;
- DoSave:=FN;
-end;
-
-procedure TfrmMain.mnuGenGoClick(Sender: TObject);
-begin
- Self.Visible:=False;
- Cursor:=crHourGlass;
- PP.Generate;
- Cursor:=crDefault;
- Self.Visible:=True;
- SelectInNewTree(0);
-end;
-
-procedure TfrmMain.mnuAboutClick(Sender: TObject);
-var
- frmAbout: TfrmAbout;
-begin
- frmAbout:=TfrmAbout.Create(Self);
- frmAbout.ShowModal;
- frmAbout.Free;
-end;
-
-procedure TfrmMain.mnuCreateEXEClick(Sender: TObject);
-var
- fs: TFileStream;
- fr: TFileStream;
-begin
- //first, select it on disk (where should the exe go?)
- if dlgSaveExe.FileName='' then dlgSaveExe.FileName:='VPatch.exe';
- if dlgSaveExe.Execute then begin
- fs:=nil;
- try
- fs:=TFileStream.Create(dlgSaveExe.FileName,fmCreate);
- fr:=nil;
- try
- fr:=TFileStream.Create(ExtractFilePath(Application.ExeName)+'vpatch.bin',fmOpenRead);
- fs.CopyFrom(fr,fr.Size);
- finally
- fr.Free;
- end;
- PP.WritePatches(fs);
- finally
- fs.Free;
- end;
- end;
-end;
-
-procedure TfrmMain.mnuCreateDLLClick(Sender: TObject);
-var
- fs: TFileStream;
- fr: TFileStream;
-begin
- //first, select it on disk (where should the exe go?)
- if dlgSaveDLL.FileName='' then dlgSaveDLL.FileName:='VPatch.DLL';
- if dlgSaveDLL.Execute then begin
- fs:=nil;
- try
- fs:=TFileStream.Create(dlgSaveDLL.FileName,fmCreate);
- fr:=nil;
- try
- fr:=TFileStream.Create(ExtractFilePath(Application.ExeName)+'vpatchdll.bin',fmOpenRead);
- fs.CopyFrom(fr,fr.Size);
- finally
- fr.Free;
- end;
- PP.WritePatches(fs);
- finally
- fs.Free;
- end;
- end;
-end;
-
-procedure TfrmMain.mnuCreatePATClick(Sender: TObject);
-var
- fs: TFileStream;
-begin
- //first, select it on disk (where should the exe go?)
- if dlgSavePAT.FileName='' then dlgSavePAT.FileName:='PatchData.pat';
- if dlgSavePAT.Execute then begin
- fs:=nil;
- try
- fs:=TFileStream.Create(dlgSavePAT.FileName,fmCreate);
- PP.WritePatches(fs);
- finally
- fs.Free;
- end;
- end;
-end;
-
-procedure TfrmMain.lstNewGetText(Sender: TBaseVirtualTree;
- Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
- var CellText: WideString);
-var
- i: Integer;
-begin
- i:=PInteger(lstNew.GetNodeData(Node))^;
- CellText:=ExtractFileName(PP.PatchFile(i).NewVersion);
-end;
-
-procedure TfrmMain.txtStartBlockSizeChange(Sender: TObject);
-begin
- PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
-end;
-
-function TfrmMain.CollectConfig: String;
-begin
- Result:=txtStartBlockSize.Caption;
-end;
-
-procedure TfrmMain.txtMinimumBlockSizeChange(Sender: TObject);
-begin
- PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
-end;
-
-procedure TfrmMain.txtBlockDividerChange(Sender: TObject);
-begin
- PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
-end;
-
-procedure TfrmMain.txtStepSizeChange(Sender: TObject);
-begin
- PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
-end;
-
-procedure TfrmMain.SetConfigTextBoxes(Config: String);
-var
- a,i: Integer;
-begin
- a:=Pos(',',Config);
- if(a=0) then a:=Length(Config)+1;
- txtStartBlockSize.Caption:=Copy(Config,1,a-1);
- Config:=Copy(Config,a+1,Length(Config));
-
- a:=StrToInt(txtStartBlockSize.Caption);
- i:=-1;
- while not (a=0) do begin
- a:=a shr 1;
- Inc(i);
- end;
- tbBlockSize.Position := i;
-end;
-
-procedure TfrmMain.tbBlockSizeChange(Sender: TObject);
-begin
- txtStartBlockSize.Caption:=IntToStr(1 shl tbBlockSize.Position);
- PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
-end;
-
-procedure TfrmMain.mnuClearcachedpatchesClick(Sender: TObject);
-begin
- PP.ResetCache;
-end;
-
-procedure TfrmMain.chkOutputWaitClick(Sender: TObject);
-begin
- WaitAfterGenerate:=chkOutputWait.Checked;
-end;
-
-procedure TfrmMain.mnuWebsiteClick(Sender: TObject);
-begin
- OpenLink('http://www.tibed.net/vpatch');
-end;
-
-procedure TfrmMain.Readme1Click(Sender: TObject);
-begin
- OpenLink('VPatch.htm');
-end;
-
-procedure TfrmMain.ReadmeincludedwithNSIS1Click(Sender: TObject);
-begin
- OpenLink('Readme.html');
-end;
-
-procedure TfrmMain.chkOptimalClick(Sender: TObject);
-begin
- OptimalPatches:=chkOptimal.Checked;
-end;
-
-initialization
- PP:=TPatchProject.Create;
-end.
+unit MainForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, Buttons, StdCtrls, Menus, PatchClasses, VirtualTrees, VDSP_CRC,
+ ToolWin, ComCtrls, ImgList, ExtCtrls, Math, OSUtil;
+
+const
+ UntitledFile='Untitled.vpj';
+
+type
+ TfrmMain = class(TForm)
+ MainMenu: TMainMenu;
+ mnuFile: TMenuItem;
+ mnuNew: TMenuItem;
+ mnuOpen: TMenuItem;
+ mnuSave: TMenuItem;
+ mnuSaveas: TMenuItem;
+ N1: TMenuItem;
+ mnuExit: TMenuItem;
+ Label1: TLabel;
+ grpConfig: TGroupBox;
+ butAdd: TSpeedButton;
+ OD: TOpenDialog;
+ Label2: TLabel;
+ txtNew: TEdit;
+ Label3: TLabel;
+ mnuHelp: TMenuItem;
+ mnuAbout: TMenuItem;
+ lstOld: TListBox;
+ butOldAdd: TSpeedButton;
+ butOldRemove: TSpeedButton;
+ butNewEdit: TSpeedButton;
+ Label4: TLabel;
+ lstNew: TVirtualStringTree;
+ dlgOpen: TOpenDialog;
+ dlgSave: TSaveDialog;
+ IL: TImageList;
+ mnuAction: TMenuItem;
+ mnuGenGo: TMenuItem;
+ barTool: TToolBar;
+ toolNew: TToolButton;
+ toolOpen: TToolButton;
+ toolSave: TToolButton;
+ toolGenGo: TToolButton;
+ mnuCreateEXE: TMenuItem;
+ dlgSaveExe: TSaveDialog;
+ toolCreateEXE: TToolButton;
+ barCool: TCoolBar;
+ Label5: TLabel;
+ Label7: TLabel;
+ tbBlockSize: TTrackBar;
+ txtStartBlockSize: TLabel;
+ mnuClearcachedpatches: TMenuItem;
+ mnuCreateDLL: TMenuItem;
+ mnuCreatePAT: TMenuItem;
+ toolCreateDLL: TToolButton;
+ ToolButton1: TToolButton;
+ toolCreatePAT: TToolButton;
+ dlgSaveDLL: TSaveDialog;
+ dlgSavePAT: TSaveDialog;
+ chkOutputWait: TCheckBox;
+ mnuWebsite: TMenuItem;
+ Readme1: TMenuItem;
+ N2: TMenuItem;
+ ReadmeincludedwithNSIS1: TMenuItem;
+ chkOptimal: TCheckBox;
+ procedure butAddClick(Sender: TObject);
+ procedure FormCreate(Sender: TObject);
+ procedure FormDestroy(Sender: TObject);
+ procedure mnuExitClick(Sender: TObject);
+ procedure UpdateStates;
+ procedure ReloadNewTree;
+ procedure SelectInNewTree(PatchIndex: Integer);
+ procedure butNewEditClick(Sender: TObject);
+ procedure lstNewChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
+ procedure butOldAddClick(Sender: TObject);
+ procedure butOldRemoveClick(Sender: TObject);
+ procedure mnuNewClick(Sender: TObject);
+ procedure mnuOpenClick(Sender: TObject);
+ procedure mnuSaveClick(Sender: TObject);
+ procedure mnuSaveasClick(Sender: TObject);
+ procedure mnuGenGoClick(Sender: TObject);
+ procedure mnuAboutClick(Sender: TObject);
+ procedure mnuCreateEXEClick(Sender: TObject);
+ procedure lstNewGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
+ Column: TColumnIndex; TextType: TVSTTextType;
+ var CellText: WideString);
+ procedure txtStartBlockSizeChange(Sender: TObject);
+ procedure txtMinimumBlockSizeChange(Sender: TObject);
+ procedure txtBlockDividerChange(Sender: TObject);
+ procedure txtStepSizeChange(Sender: TObject);
+ procedure tbBlockSizeChange(Sender: TObject);
+ procedure mnuClearcachedpatchesClick(Sender: TObject);
+ procedure mnuCreateDLLClick(Sender: TObject);
+ procedure mnuCreatePATClick(Sender: TObject);
+ procedure chkOutputWaitClick(Sender: TObject);
+ procedure mnuWebsiteClick(Sender: TObject);
+ procedure Readme1Click(Sender: TObject);
+ procedure ReadmeincludedwithNSIS1Click(Sender: TObject);
+ procedure chkOptimalClick(Sender: TObject);
+ private
+ { Private declarations }
+// MS: TModeSelector;
+ dskName: String;
+ function DoSave(const FileName: String; const Prompt: Boolean): String;
+ procedure OpenAFile(FileName: String; AskSave: Boolean=True; PromptNew: Boolean=False);
+ function CollectConfig: String;
+ procedure SetConfigTextBoxes(Config: String);
+ public
+ { Public declarations }
+ end;
+
+var
+ frmMain: TfrmMain;
+ PP: TPatchProject = nil;
+
+implementation
+
+uses AboutForm, DLLWrapper;
+
+{$R *.dfm}
+
+procedure TfrmMain.butAddClick(Sender: TObject);
+begin
+ OD.Options:=OD.Options-[ofAllowMultiSelect];
+ OD.Title:='Open the latest (new) version of a file...';
+ OD.FileName:='';
+ if OD.Execute then begin
+ PP.AddNewVersion(OD.FileName);
+ ReloadNewTree;
+ SelectInNewTree(PP.PatchFile(OD.FileName).Index);
+ butOldAdd.Click;
+ end;
+end;
+
+procedure TfrmMain.FormCreate(Sender: TObject);
+begin
+ grpConfig.Tag:=-1;
+ dskName:=UntitledFile;
+ lstNew.NodeDataSize:=SizeOf(Integer);
+ OpenAFile('',False,False); //don't prompt for New! that'll bug things
+ ReloadNewTree;
+ UpdateStates;
+end;
+
+procedure TfrmMain.FormDestroy(Sender: TObject);
+begin
+ PP.Free;
+end;
+
+procedure TfrmMain.mnuExitClick(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmMain.UpdateStates;
+begin
+ Self.Caption:='VG - VPatch GUI - '+dskName;
+// grpConfig.Enabled:=not (lstNew.Tag=-1);
+// if not grpConfig.Enabled then grpConfig.Caption:='Select a file first';
+ grpConfig.Enabled:=(lstNew.SelectedCount>0);
+ if grpConfig.Tag=-1 then begin
+ txtNew.Enabled:=False;
+ butNewEdit.Enabled:=False;
+ butNewEdit.Font.Color:=clInactiveCaption;
+ butOldAdd.Enabled:=False;
+ butOldAdd.Font.Color:=clInactiveCaption;
+ butOldRemove.Enabled:=False;
+ butOldRemove.Font.Color:=clInactiveCaption;
+ end else begin
+ txtNew.Enabled:=True;
+ butNewEdit.Enabled:=True;
+ butNewEdit.Font.Color:=clWindowText;
+ butOldAdd.Enabled:=True;
+ butOldAdd.Font.Color:=clWindowText;
+// butOldEdit.Enabled:=True;
+ butOldRemove.Enabled:=True;
+ butOldRemove.Font.Color:=clWindowText;
+ end;
+end;
+
+procedure TfrmMain.ReloadNewTree;
+var
+ i: Integer;
+ Node: PVirtualNode;
+begin
+ lstNew.BeginUpdate;
+ lstNew.Clear;
+ for i:=0 to PP.GetPatchCount - 1 do begin
+ Node:=lstNew.AddChild(nil);
+ PInteger(lstNew.GetNodeData(Node))^:=i;
+ end;
+ lstNew.EndUpdate;
+end;
+
+procedure TfrmMain.butNewEditClick(Sender: TObject);
+var
+ i: Integer;
+begin
+ OD.Options:=OD.Options-[ofAllowMultiSelect];
+ OD.Title:='Select new version of file...';
+ OD.FileName:=txtNew.Text;
+ if OD.Execute then begin
+ i:=grpConfig.Tag;
+ PP.PatchFile(i).NewVersion:=OD.FileName;
+ ReloadNewTree;
+ lstNew.Selected[lstNew.GetFirstVisible]:=True;
+ end;
+end;
+
+procedure TfrmMain.lstNewChange(Sender: TBaseVirtualTree;
+ Node: PVirtualNode);
+var
+ i,j: Integer;
+begin
+ case lstNew.SelectedCount of
+ 0: Exit;
+ 1: begin
+ if lstNew.Selected[Node] then begin
+ i:=PInteger(lstNew.GetNodeData(Node))^;
+ grpConfig.Caption:=ExtractFileName(PP.PatchFile(i).NewVersion);
+ grpConfig.Tag:=i;
+ txtNew.Text:=PP.PatchFile(i).NewVersion;
+ lstOld.Clear;
+ for j:=0 to PP.PatchFile(i).OldVersionCount - 1 do begin
+ lstOld.Items.Add(PP.PatchFile(i).OldVersions[j]);
+ end;
+ SetConfigTextBoxes(PP.PatchFile(i).Config);
+ end;
+ end;
+ else begin
+ grpConfig.Tag:=-1; //multiple files selected - only allow config changes
+ txtNew.Text:='(multiple files selected)';
+ lstOld.Clear;
+ end;
+ end;
+ UpdateStates;
+end;
+
+procedure TfrmMain.butOldAddClick(Sender: TObject);
+var
+ i,j: Integer;
+begin
+ OD.Options:=OD.Options+[ofAllowMultiSelect];
+ OD.Title:='Select old versions of '+grpConfig.Caption+'...';
+ OD.FileName:='';
+ if OD.Execute then begin
+ i:=grpConfig.Tag;
+ for j:=0 to OD.Files.Count - 1 do begin
+ PP.PatchFile(i).AddOldVersion(OD.Files[j]);
+ lstOld.Items.Add(OD.Files.Strings[j]);
+ end;
+ end;
+end;
+
+procedure TfrmMain.SelectInNewTree(PatchIndex: Integer);
+var
+ Node: PVirtualNode;
+begin
+ Node:=lstNew.GetFirstSelected;
+ while Node<>nil do begin
+ lstNew.Selected[Node]:=False;
+ Node:=lstNew.GetNextSelected(Node);
+ end;
+ Node:=lstNew.GetFirst;
+ while Node<>nil do begin
+ if PInteger(lstNew.GetNodeData(Node))^=PatchIndex then begin
+ lstNew.Selected[Node]:=True;
+ lstNewChange(lstNew,Node);
+ Exit;
+ end;
+ Node:=lstNew.GetNext(Node);
+ end;
+end;
+
+procedure TfrmMain.butOldRemoveClick(Sender: TObject);
+begin
+ if lstOld.ItemIndex>=0 then begin
+ PP.PatchFile(grpConfig.Tag).RemoveOldVersion(lstOld.ItemIndex);
+ lstOld.Items.Delete(lstOld.ItemIndex);
+ end;
+end;
+
+procedure TfrmMain.OpenAFile(FileName: String; AskSave: Boolean=True; PromptNew: Boolean=False);
+var
+ fs: TFileStream;
+begin
+ PP.Free; //confirm saving first?
+ PP:=TPatchProject.Create;
+ ReloadNewTree;
+ if FileName<>'' then begin
+ fs:=TFileStream.Create(FileName,fmOpenRead);
+ try
+ PP.LoadFromStream(fs);
+ except
+ on E: Exception do ShowMessage(E.Message);
+ end;
+ dskName:=FileName;
+ ReloadNewTree;
+ fs.Free;
+ end else begin
+ dskName:=UntitledFile;
+ if PromptNew then butAddClick(Self);
+ end;
+
+ UpdateStates;
+end;
+
+procedure TfrmMain.mnuNewClick(Sender: TObject);
+begin
+ OpenAFile('',True,True);
+end;
+
+procedure TfrmMain.mnuOpenClick(Sender: TObject);
+begin
+ if dlgOpen.Execute then begin
+ OpenAFile(dlgOpen.FileName,True);
+ if lstNew.GetFirst <> nil then
+ lstNew.Selected[lstNew.GetFirst]:=True;
+ end;
+end;
+
+procedure TfrmMain.mnuSaveClick(Sender: TObject);
+begin
+ dskName:=DoSave(dskName,False);
+ UpdateStates;
+end;
+
+procedure TfrmMain.mnuSaveasClick(Sender: TObject);
+begin
+ dskName:=DoSave(dskName,True);
+ UpdateStates;
+end;
+
+function TfrmMain.DoSave(const FileName: String; const Prompt: Boolean): String;
+var
+ FN: String;
+ fs: TFileStream;
+begin
+ DoSave:='';
+ FN:=FileName;
+ if Prompt or (CompareText(FileName,UntitledFile)=0) then begin
+ if dlgSave.Execute then begin
+ FN:=dlgSave.FileName;
+ if ExtractFileExt(FN)='' then
+ FN:=FN+'.vpj';
+ end else begin
+ DoSave:=FileName;
+ Exit;
+ end;
+ end;
+ //do actual saving to this file...
+ fs:=TFileStream.Create(FN,fmCreate);
+ PP.SaveToStream(fs);
+ fs.Free;
+ DoSave:=FN;
+end;
+
+procedure TfrmMain.mnuGenGoClick(Sender: TObject);
+begin
+ Self.Visible:=False;
+ Cursor:=crHourGlass;
+ PP.Generate;
+ Cursor:=crDefault;
+ Self.Visible:=True;
+ SelectInNewTree(0);
+end;
+
+procedure TfrmMain.mnuAboutClick(Sender: TObject);
+var
+ frmAbout: TfrmAbout;
+begin
+ frmAbout:=TfrmAbout.Create(Self);
+ frmAbout.ShowModal;
+ frmAbout.Free;
+end;
+
+procedure TfrmMain.mnuCreateEXEClick(Sender: TObject);
+var
+ fs: TFileStream;
+ fr: TFileStream;
+begin
+ //first, select it on disk (where should the exe go?)
+ if dlgSaveExe.FileName='' then dlgSaveExe.FileName:='VPatch.exe';
+ if dlgSaveExe.Execute then begin
+ fs:=nil;
+ try
+ fs:=TFileStream.Create(dlgSaveExe.FileName,fmCreate);
+ fr:=nil;
+ try
+ fr:=TFileStream.Create(ExtractFilePath(Application.ExeName)+'vpatch.bin',fmOpenRead);
+ fs.CopyFrom(fr,fr.Size);
+ finally
+ fr.Free;
+ end;
+ PP.WritePatches(fs);
+ finally
+ fs.Free;
+ end;
+ end;
+end;
+
+procedure TfrmMain.mnuCreateDLLClick(Sender: TObject);
+var
+ fs: TFileStream;
+ fr: TFileStream;
+begin
+ //first, select it on disk (where should the exe go?)
+ if dlgSaveDLL.FileName='' then dlgSaveDLL.FileName:='VPatch.DLL';
+ if dlgSaveDLL.Execute then begin
+ fs:=nil;
+ try
+ fs:=TFileStream.Create(dlgSaveDLL.FileName,fmCreate);
+ fr:=nil;
+ try
+ fr:=TFileStream.Create(ExtractFilePath(Application.ExeName)+'vpatchdll.bin',fmOpenRead);
+ fs.CopyFrom(fr,fr.Size);
+ finally
+ fr.Free;
+ end;
+ PP.WritePatches(fs);
+ finally
+ fs.Free;
+ end;
+ end;
+end;
+
+procedure TfrmMain.mnuCreatePATClick(Sender: TObject);
+var
+ fs: TFileStream;
+begin
+ //first, select it on disk (where should the exe go?)
+ if dlgSavePAT.FileName='' then dlgSavePAT.FileName:='PatchData.pat';
+ if dlgSavePAT.Execute then begin
+ fs:=nil;
+ try
+ fs:=TFileStream.Create(dlgSavePAT.FileName,fmCreate);
+ PP.WritePatches(fs);
+ finally
+ fs.Free;
+ end;
+ end;
+end;
+
+procedure TfrmMain.lstNewGetText(Sender: TBaseVirtualTree;
+ Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
+ var CellText: WideString);
+var
+ i: Integer;
+begin
+ i:=PInteger(lstNew.GetNodeData(Node))^;
+ CellText:=ExtractFileName(PP.PatchFile(i).NewVersion);
+end;
+
+procedure TfrmMain.txtStartBlockSizeChange(Sender: TObject);
+begin
+ PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
+end;
+
+function TfrmMain.CollectConfig: String;
+begin
+ Result:=txtStartBlockSize.Caption;
+end;
+
+procedure TfrmMain.txtMinimumBlockSizeChange(Sender: TObject);
+begin
+ PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
+end;
+
+procedure TfrmMain.txtBlockDividerChange(Sender: TObject);
+begin
+ PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
+end;
+
+procedure TfrmMain.txtStepSizeChange(Sender: TObject);
+begin
+ PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
+end;
+
+procedure TfrmMain.SetConfigTextBoxes(Config: String);
+var
+ a,i: Integer;
+begin
+ a:=Pos(',',Config);
+ if(a=0) then a:=Length(Config)+1;
+ txtStartBlockSize.Caption:=Copy(Config,1,a-1);
+ Config:=Copy(Config,a+1,Length(Config));
+
+ a:=StrToInt(txtStartBlockSize.Caption);
+ i:=-1;
+ while not (a=0) do begin
+ a:=a shr 1;
+ Inc(i);
+ end;
+ tbBlockSize.Position := i;
+end;
+
+procedure TfrmMain.tbBlockSizeChange(Sender: TObject);
+begin
+ txtStartBlockSize.Caption:=IntToStr(1 shl tbBlockSize.Position);
+ PP.PatchFile(grpConfig.Tag).Config:=CollectConfig;
+end;
+
+procedure TfrmMain.mnuClearcachedpatchesClick(Sender: TObject);
+begin
+ PP.ResetCache;
+end;
+
+procedure TfrmMain.chkOutputWaitClick(Sender: TObject);
+begin
+ WaitAfterGenerate:=chkOutputWait.Checked;
+end;
+
+procedure TfrmMain.mnuWebsiteClick(Sender: TObject);
+begin
+ OpenLink('http://www.tibed.net/vpatch');
+end;
+
+procedure TfrmMain.Readme1Click(Sender: TObject);
+begin
+ OpenLink('VPatch.htm');
+end;
+
+procedure TfrmMain.ReadmeincludedwithNSIS1Click(Sender: TObject);
+begin
+ OpenLink('Readme.html');
+end;
+
+procedure TfrmMain.chkOptimalClick(Sender: TObject);
+begin
+ OptimalPatches:=chkOptimal.Checked;
+end;
+
+initialization
+ PP:=TPatchProject.Create;
+end.
diff --git a/Contrib/VPatch/Source/GUI/OSUtil.pas b/Contrib/VPatch/Source/GUI/OSUtil.pas
index 2801038..fb63c40 100755
--- a/Contrib/VPatch/Source/GUI/OSUtil.pas
+++ b/Contrib/VPatch/Source/GUI/OSUtil.pas
@@ -1,114 +1,114 @@
-unit OSUtil;
-
-interface
-
-procedure OpenLink(ALink: String); forward;
-function GetTempDir: String; forward;
-function GetTempFile: String; forward;
-procedure ExecProgram(GameFolder: String; S: String; JustEXE: String; AWaitUntilFinish: Boolean); forward;
-procedure ExecWaitBatchFile(AFolder: String; AName: String); forward;
-procedure OSMoveFile(ASource,ADest: String); forward;
-
-implementation
-
-uses
- Windows, SysUtils, ShellAPI, Forms, Dialogs;
-
-// does not support command-line arguments right now
-procedure ExecWaitBatchFile(AFolder: String; AName: String);
-var
- S, JustEXE: String;
- StartUp: STARTUPINFO;
- ProcInfo: PROCESS_INFORMATION;
-begin
- S:='"'+AName+'"';
- JustExe:=AName;
- StartUp.lpReserved:=nil;
- StartUp.lpDesktop:=nil;
- StartUp.lpTitle:=nil;
- StartUp.dwFlags:=STARTF_USESHOWWINDOW;
- StartUp.wShowWindow:=SW_SHOWMAXIMIZED;
- StartUp.cbReserved2:=0;
- StartUp.lpReserved2:=nil;
-
- //it works now... but don't ask me how - it's taken me hours just to get this working :)
- if not CreateProcess(PChar(JustEXE),PChar(S),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,PChar(AFolder),StartUp,ProcInfo) then
- raise Exception.Create('CreateProcess error:'+IntToStr(GetLastError));
- if not (ProcInfo.hThread=0) then CloseHandle(ProcInfo.hThread);
- if not (ProcInfo.hProcess=0) then begin
- WaitForSingleObject(ProcInfo.hProcess,INFINITE);
- CloseHandle(ProcInfo.hProcess);
- end;
-end;
-
-
-procedure OSMoveFile(ASource,ADest: String);
-begin
- if not MoveFileEx(@ASource[1],@ADest[1],MOVEFILE_COPY_ALLOWED+MOVEFILE_REPLACE_EXISTING+MOVEFILE_WRITE_THROUGH) then
- raise Exception.Create('File movement failed in OSMoveFile: '+ASource+'; '+ADest);
-end;
-
-procedure OpenLink(ALink: String);
-var
- StartDoc: Integer;
-begin
- StartDoc:=ShellExecute(Application.Handle, 'open', PChar(ALink), nil, nil, SW_SHOWNORMAL);
- If StartDoc <= 32 Then begin
- MessageDlg('Error occured while opening link: '+ALink,mtWarning,[mbOK],0);
- end;
-end;
-
-procedure ExecProgram(GameFolder: String; S: String; JustEXE: String; AWaitUntilFinish: Boolean);
-var
- StartUp: STARTUPINFO;
- ProcInfo: PROCESS_INFORMATION;
-begin
- StartUp.lpReserved:=nil;
- StartUp.lpDesktop:=nil;
- StartUp.lpTitle:=nil;
- StartUp.dwFlags:=STARTF_USESHOWWINDOW;
- StartUp.wShowWindow:=SW_SHOWMAXIMIZED;
- StartUp.cbReserved2:=0;
- StartUp.lpReserved2:=nil;
-
- //it works now... but don't ask me how - it's taken me hours just to get this working :)
- if not CreateProcess(PChar(JustEXE),PChar(S),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,PChar(GameFolder),StartUp,ProcInfo) then
- raise Exception.Create('CreateProcess error:'+IntToStr(GetLastError));
- if not (ProcInfo.hThread=0) then CloseHandle(ProcInfo.hThread);
- if not (ProcInfo.hProcess=0) then begin
- if AWaitUntilFinish then
- WaitForSingleObject(ProcInfo.hProcess,INFINITE);
- CloseHandle(ProcInfo.hProcess);
- end;
-end;
-
-var
- TempDir: String;
- strBuffer: Array[0..1024] of Char;
- nBufferLength: Cardinal;
-
- function GetTempFile;
- var
- Prefix: String;
- lngLength: Integer;
- begin
- PreFix:='TMP';
- strBuffer:='';
- lngLength:=GetTempFileName(PChar(TempDir),PChar(PreFix),0,strBuffer);
- if not (lngLength=0) then begin
- GetTempFile:=strBuffer;
- end;
- end;
-
-function GetTempDir: String;
-begin
- GetTempDir:=TempDir;
-end;
-
-begin
- // get temporary folder
- nBufferLength:=1024;
- strBuffer:='';
- GetTempPath(nBufferLength,strBuffer);
- TempDir:=strBuffer;
-end.
+unit OSUtil;
+
+interface
+
+procedure OpenLink(ALink: String); forward;
+function GetTempDir: String; forward;
+function GetTempFile: String; forward;
+procedure ExecProgram(GameFolder: String; S: String; JustEXE: String; AWaitUntilFinish: Boolean); forward;
+procedure ExecWaitBatchFile(AFolder: String; AName: String); forward;
+procedure OSMoveFile(ASource,ADest: String); forward;
+
+implementation
+
+uses
+ Windows, SysUtils, ShellAPI, Forms, Dialogs;
+
+// does not support command-line arguments right now
+procedure ExecWaitBatchFile(AFolder: String; AName: String);
+var
+ S, JustEXE: String;
+ StartUp: STARTUPINFO;
+ ProcInfo: PROCESS_INFORMATION;
+begin
+ S:='"'+AName+'"';
+ JustExe:=AName;
+ StartUp.lpReserved:=nil;
+ StartUp.lpDesktop:=nil;
+ StartUp.lpTitle:=nil;
+ StartUp.dwFlags:=STARTF_USESHOWWINDOW;
+ StartUp.wShowWindow:=SW_SHOWMAXIMIZED;
+ StartUp.cbReserved2:=0;
+ StartUp.lpReserved2:=nil;
+
+ //it works now... but don't ask me how - it's taken me hours just to get this working :)
+ if not CreateProcess(PChar(JustEXE),PChar(S),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,PChar(AFolder),StartUp,ProcInfo) then
+ raise Exception.Create('CreateProcess error:'+IntToStr(GetLastError));
+ if not (ProcInfo.hThread=0) then CloseHandle(ProcInfo.hThread);
+ if not (ProcInfo.hProcess=0) then begin
+ WaitForSingleObject(ProcInfo.hProcess,INFINITE);
+ CloseHandle(ProcInfo.hProcess);
+ end;
+end;
+
+
+procedure OSMoveFile(ASource,ADest: String);
+begin
+ if not MoveFileEx(@ASource[1],@ADest[1],MOVEFILE_COPY_ALLOWED+MOVEFILE_REPLACE_EXISTING+MOVEFILE_WRITE_THROUGH) then
+ raise Exception.Create('File movement failed in OSMoveFile: '+ASource+'; '+ADest);
+end;
+
+procedure OpenLink(ALink: String);
+var
+ StartDoc: Integer;
+begin
+ StartDoc:=ShellExecute(Application.Handle, 'open', PChar(ALink), nil, nil, SW_SHOWNORMAL);
+ If StartDoc <= 32 Then begin
+ MessageDlg('Error occured while opening link: '+ALink,mtWarning,[mbOK],0);
+ end;
+end;
+
+procedure ExecProgram(GameFolder: String; S: String; JustEXE: String; AWaitUntilFinish: Boolean);
+var
+ StartUp: STARTUPINFO;
+ ProcInfo: PROCESS_INFORMATION;
+begin
+ StartUp.lpReserved:=nil;
+ StartUp.lpDesktop:=nil;
+ StartUp.lpTitle:=nil;
+ StartUp.dwFlags:=STARTF_USESHOWWINDOW;
+ StartUp.wShowWindow:=SW_SHOWMAXIMIZED;
+ StartUp.cbReserved2:=0;
+ StartUp.lpReserved2:=nil;
+
+ //it works now... but don't ask me how - it's taken me hours just to get this working :)
+ if not CreateProcess(PChar(JustEXE),PChar(S),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,PChar(GameFolder),StartUp,ProcInfo) then
+ raise Exception.Create('CreateProcess error:'+IntToStr(GetLastError));
+ if not (ProcInfo.hThread=0) then CloseHandle(ProcInfo.hThread);
+ if not (ProcInfo.hProcess=0) then begin
+ if AWaitUntilFinish then
+ WaitForSingleObject(ProcInfo.hProcess,INFINITE);
+ CloseHandle(ProcInfo.hProcess);
+ end;
+end;
+
+var
+ TempDir: String;
+ strBuffer: Array[0..1024] of Char;
+ nBufferLength: Cardinal;
+
+ function GetTempFile;
+ var
+ Prefix: String;
+ lngLength: Integer;
+ begin
+ PreFix:='TMP';
+ strBuffer:='';
+ lngLength:=GetTempFileName(PChar(TempDir),PChar(PreFix),0,strBuffer);
+ if not (lngLength=0) then begin
+ GetTempFile:=strBuffer;
+ end;
+ end;
+
+function GetTempDir: String;
+begin
+ GetTempDir:=TempDir;
+end;
+
+begin
+ // get temporary folder
+ nBufferLength:=1024;
+ strBuffer:='';
+ GetTempPath(nBufferLength,strBuffer);
+ TempDir:=strBuffer;
+end.
diff --git a/Contrib/VPatch/Source/GUI/PatchClasses.pas b/Contrib/VPatch/Source/GUI/PatchClasses.pas
index 67db661..b56ec8f 100755
--- a/Contrib/VPatch/Source/GUI/PatchClasses.pas
+++ b/Contrib/VPatch/Source/GUI/PatchClasses.pas
@@ -1,548 +1,548 @@
-unit PatchClasses;
-
-interface
-
-uses Classes, sysutils, VDSP_CRC, DLLWrapper, Dialogs;
-
-const
- DEFAULT_CONFIG = '64';
-
-type
- TAbstractFile = record
- FileName: String;
- FriendlyName: String;
- CRC32: LongWord; //the longword/integer sign is going to give problems again...
- Size: Integer;
- //not sure about this one yet...
- Cached: Boolean; //True: we have cached the patch, using latest config
- //False: a) we have nothing cached (size and start are -1)
- // b) we still have cache (start>0 and size too), but it's not generated using the latest config (we can keep it of course because the new config might be worse)
- Cache: TMemoryStream;
- end;
-
- TPatchFile = class (TObject)
- private
- FIndex: Integer;
- ConfigID: String;
- FNew: TAbstractFile;
- FOld: Array of TAbstractFile;
- protected
- procedure SetNewFN(Value: String);
- function GetNewFN: String;
- procedure SetOldFN(i: Integer; FileName: String);
- function GetOldFN(Index: Integer): String;
- function GetOldVersionCount: Integer;
- procedure ResetCache; overload;
- procedure ResetCache(OldIndex: Integer); overload;
- procedure InvalidateCache; overload;
- procedure InvalidateCache(Index: Integer); overload;
- function GetCached(Index: Integer): Boolean;
- function GetConfig: String;
- procedure SetConfig(Value: String);
- public
- constructor Create(Index: Integer; FileName: String); overload;
- constructor Create(Index: Integer; Stream: TStream); overload;
- destructor Destroy(); override;
-
- procedure AddOldVersion(const FileName: String);
- procedure RemoveOldVersion(const Index: Integer);
- property OldVersions[Index: Integer]: String read GetOldFN write SetOldFN;
-
- procedure Generate; overload;
- procedure Generate(const Index: Integer); overload;
- property Generated[Index: Integer]: Boolean read GetCached;
- function GetPatchSize(Index: Integer): Integer;
-
- procedure WritePatch(Index: Integer; Stream: TStream);
-
-// LoadFromStream not supported: Use Create(Index,Stream) instead!
-// procedure LoadFromStream(Stream: TStream);
- procedure SaveToStream(Stream: TStream);
- published
- property NewVersion: String read GetNewFN write SetNewFN;
- property OldVersionCount: Integer read GetOldVersionCount;
- property Index: Integer read FIndex;
- property Config: String read GetConfig write SetConfig;
- end;
-
- TPatchProject = class (TObject)
- private
- FPat: Array of TPatchFile;
- public
- procedure LoadFromStream(Stream: TStream);
- procedure SaveToStream(Stream: TStream);
- constructor Create();
- destructor Destroy(); override;
- procedure AddNewVersion(FileName: String);
- function PatchFile(FileName: String): TPatchFile; overload;
- function PatchFile(Index: Integer): TPatchFile; overload;
- function GetPatchCount: Integer;
- procedure WritePatches(Stream: TStream);
- procedure Generate;
- procedure ResetCache;
- end;
-
-implementation
-
- function ReadStreamString(Stream: TStream): String;
- var
- Buf: Array[0..512] of Char;
- i: LongInt;
- S: String;
- j: Integer;
- begin
- Stream.Read(i,SizeOf(i));
- if i>512 then raise Exception.Create('VPJ damaged: String too long (>512)');
- Stream.Read(Buf,i);
- for j:=1 to i do
- S:=S+Buf[j-1];
- ReadStreamString:=S;
- end;
-
-//a private wrapper for the FileCRC function
-function CalcCRC(FileName: String): Integer;
-var
- fs: TFileStream;
-begin
- CalcCRC:=0;
- fs:=nil;
- try
- fs:=TFileStream.Create(FileName,fmOpenRead);
- CalcCRC:=FileCRC(fs);
- finally
- fs.Free;
- end;
-end;
-
-function GetFileSize(FileName: String): Integer;
-var
- fs: TFileStream;
-begin
- GetFileSize:=0;
- fs:=nil;
- try
- fs:=TFileStream.Create(FileName,fmOpenRead);
- GetFileSize:=fs.Size;
- finally
- fs.Free;
- end;
-end;
-
-{ TPatchFile }
-
-procedure TPatchFile.AddOldVersion(const FileName: String);
-var
- i: Integer;
-// fs: TFileStream;
-begin
- i:=Length(FOld);
- SetLength(FOld,i+1);
- FOld[i].Cache:=TMemoryStream.Create;
- SetOldFN(i,FileName);
-end;
-
-constructor TPatchFile.Create(Index: Integer; FileName: String);
-//var
-// fs: TFileStream;
-begin
- inherited Create();
- FIndex:=Index;
- SetLength(FOld,0);
- FNew.CRC32:=0;
- FNew.Size:=-1;
- SetNewFN(FileName);
- ConfigID:=DEFAULT_CONFIG;
- //just to be on the safe side
- //following is now done by SetNewFN :)
- //no it's not - because that one resets the cache!!!
- //doesn't matter, because we're not loading from stream!!!
-{ FNew.FileName:=FileName;
- FNew.FriendlyName:=ExtractFileName(FileName);
- FNew.CRC32:=CalcCRC(FileName);
- FNew.Size:=GetFileSize(FileName);}
-end;
-
-constructor TPatchFile.Create(Index: Integer; Stream: TStream);
-var
- i,q: LongInt;
- CSize: Integer;
- j: Integer;
-begin
- inherited Create();
- FIndex:=Index;
- SetLength(FOld,0);
- FNew.CRC32:=0;
- FNew.Size:=-1; //just to be on the safe side
-
- //read configuration
- ConfigID:=ReadStreamString(Stream);
-
- //now load everything...
- FNew.FileName:=ReadStreamString(Stream);
- FNew.FriendlyName:=ReadStreamString(Stream);
- Stream.Read(FNew.CRC32,SizeOf(FNew.CRC32));
- Stream.Read(FNew.Size,SizeOf(FNew.Size));
- Stream.Read(i,SizeOf(i));
- SetLength(FOld,i);
- for j:=0 to i - 1 do begin
- FOld[j].FileName:=ReadStreamString(Stream);
- FOld[j].FriendlyName:=ReadStreamString(Stream);
- Stream.Read(FOld[j].CRC32,SizeOf(FOld[j].CRC32));
- Stream.Read(FOld[j].Size,SizeOf(FOld[j].Size));
- Stream.Read(q,SizeOf(q));
- FOld[j].Cached:=not (q=0);
- if FOld[j].Cached then begin
- Stream.Read(CSize,SizeOf(CSize));
- FOld[j].Cache:=TMemoryStream.Create;
- FOld[j].Cache.CopyFrom(Stream,CSize);
- end;
- end;
-end;
-
-destructor TPatchFile.Destroy;
-begin
- SetLength(FOld,0);
- inherited;
-end;
-
-function TPatchFile.GetNewFN: String;
-begin
- GetNewFN:=FNew.FileName;
-end;
-
-function TPatchFile.GetOldFN(Index: Integer): String;
-begin
- Result:=FOld[Index].FileName;
- if FOld[Index].Cached then
- if FOld[Index].Cache.Size>0 then begin
- Result:=Result + ' ('+IntToStr(FOld[Index].Cache.Size)+' bytes to patch)';
- end;
-end;
-
-function TPatchFile.GetOldVersionCount: Integer;
-begin
- GetOldVersionCount:=Length(FOld);
-end;
-
-procedure TPatchFile.ResetCache;
-var
- i: Integer;
-begin
- for i:=0 to Length(FOld)-1 do
- ResetCache(i);
-end;
-
-procedure TPatchFile.RemoveOldVersion(const Index: Integer);
-var
- i: Integer;
-begin
- FOld[Index].Cache.Free;
- for i:=Index to Length(FOld)-2 do begin
- FOld[i]:=FOld[i+1];
- end;
- SetLength(FOld,Length(FOld)-1);
-end;
-
-procedure TPatchFile.ResetCache(OldIndex: Integer);
-begin
- FOld[OldIndex].Cached:=False;
- FOld[OldIndex].Size:=-1;
- FOld[OldIndex].Cache.Clear;
-end;
-
-procedure TPatchFile.SaveToStream(Stream: TStream);
- procedure WriteStreamString(Stream: TStream; const S: String);
- var
- i: LongInt;
- j: Integer;
- Buf: Array[0..512] of Char;
- begin
- i:=Length(S);
- Stream.Write(i,SizeOf(i));
- for j:=1 to i do
- Buf[j-1]:=S[j];
- Buf[i]:=#0;
- Stream.Write(Buf,i);
- end;
-var
- i,q: LongInt;
- j: Integer;
- tmp: Integer;
-begin
- //write config ID
- WriteStreamString(Stream,ConfigID);
-
- WriteStreamString(Stream,FNew.FileName);
- WriteStreamString(Stream,FNew.FriendlyName);
- Stream.Write(FNew.CRC32,SizeOf(FNew.CRC32));
- Stream.Write(FNew.Size,SizeOf(FNew.Size));
-
- i:=Length(FOld);
- Stream.Write(i,SizeOf(i));
-
- for j:=0 to i - 1 do begin
- WriteStreamString(Stream,FOld[j].FileName);
- WriteStreamString(Stream,FOld[j].FriendlyName);
- Stream.Write(FOld[j].CRC32,SizeOf(FOld[j].CRC32));
- Stream.Write(FOld[j].Size,SizeOf(FOld[j].Size));
- if FOld[j].Cached then q:=1 else q:=0;
- Stream.Write(q,SizeOf(q));
- if FOld[j].Cached then begin
- tmp:=FOld[j].Cache.Size;
- Stream.Write(tmp,SizeOf(tmp));
- FOld[j].Cache.Seek(0,soFromBeginning);
- Stream.CopyFrom(FOld[j].Cache,tmp);
- end;
- end;
-end;
-
-procedure TPatchFile.SetNewFN(Value: String);
-var
- NewSize: Integer;
- NewCRC: LongWord;
-begin
- FNew.FileName:=Value;
- FNew.Friendlyname:=ExtractFileName(Value);
- NewCRC:=CalcCRC(Value);
- NewSize:=GetFileSize(Value);
- //if any changes, then reset cache :)
- if not ((FNew.CRC32=NewCRC) and (FNew.Size=NewSize)) then begin
- FNew.CRC32:=NewCRC;
- FNew.Size:=NewSize;
- ResetCache;
- end;
-end;
-
-procedure TPatchFile.SetOldFN(i: Integer; FileName: String);
-begin
- if((i>=0) and (i<Length(FOld))) then begin
- FOld[i].FileName:=FileName;
- FOld[i].FriendlyName:=ExtractFileName(FileName);
- FOld[i].CRC32:=CalcCRC(FileName);
- FOld[i].Size:=GetFileSize(FileName);
- ResetCache(i);
- end;
-end;
-
-procedure TPatchFile.Generate;
-var
- i: Integer;
-begin
- //generate all of them into the cache?
- for i:=0 to OldVersionCount - 1 do
- Generate(i);
-end;
-
-procedure TPatchFile.Generate(const Index: Integer);
-var
- Size: Integer;
- fm: TMemoryStream;
-begin
- fm:=TMemoryStream.Create;
- Size:=DoGenerate(FOld[Index].FileName,FNew.FileName,fm,ConfigID);
- if not (Size=-1) then begin
- if (FOld[Index].Cache.Size>Size) or (not FOld[Index].Cached) then begin //the new one is better
- FOld[Index].Cache.Clear;
- fm.Seek(8,soFromBeginning);
- FOld[Index].Cache.CopyFrom(fm,fm.Size-8);
- end;
- FOld[Index].Cached:=True;
- end;
- fm.Free;
-end;
-
-function TPatchFile.GetCached(Index: Integer): Boolean;
-begin
- GetCached:=FOld[Index].Cached;
-end;
-
-function TPatchFile.GetConfig: String;
-begin
- GetConfig:=ConfigID;
-end;
-
-procedure TPatchFile.SetConfig(Value: String);
-begin
- if not Assigned(Self) then Exit;
- if not SameText(Value,ConfigID) then begin
- InvalidateCache; //configuration changed, invalidate cache
- end;
- ConfigID:=Value;
-end;
-
-function TPatchFile.GetPatchSize(Index: Integer): Integer;
-begin
- if Generated[Index] then begin
- GetPatchSize:=FOld[Index].Cache.Size;
- end else
- GetPatchSize:=-1;
-end;
-
-procedure TPatchFile.InvalidateCache;
-var
- i: Integer;
-begin
- for i:=0 to Length(FOld)-1 do
- InvalidateCache(i);
-end;
-
-procedure TPatchFile.InvalidateCache(Index: Integer);
-begin
- FOld[Index].Cached:=False;
-end;
-
-procedure TPatchFile.WritePatch(Index: Integer; Stream: TStream);
-begin
- if not FOld[Index].Cached then
- Generate(Index);
- if not FOld[Index].Cached then
- raise Exception.Create('Writing of patch failed: Could not generate all patches');
- FOld[Index].Cache.Seek(0,soFromBeginning);
- Stream.CopyFrom(FOld[Index].Cache,FOld[Index].Cache.Size);
-end;
-
-{ TPatchProject }
-
-procedure TPatchProject.AddNewVersion(FileName: String);
-var
- i: Integer;
-begin
- i:=Length(FPat);
- SetLength(FPat,i+1);
- FPat[i]:=TPatchFile.Create(i,FileName);
- FPat[i].SetConfig(DEFAULT_CONFIG);
-end;
-
-constructor TPatchProject.Create;
-begin
- inherited;
- SetLength(FPat,0);
-end;
-
-destructor TPatchProject.Destroy;
-var
- i: Integer;
-begin
- for i:=0 to Length(FPat)-1 do begin
- FPat[i].Free;
- end;
- SetLength(FPat,0);
- inherited;
-end;
-
-procedure TPatchProject.Generate;
-var
- i: Integer;
-begin
- for i:=0 to GetPatchCount - 1 do
- FPat[i].Generate;
-end;
-
-function TPatchProject.GetPatchCount: Integer;
-begin
- GetPatchCount:=Length(FPat);
-end;
-
-procedure TPatchProject.LoadFromStream(Stream: TStream);
-var
- MagicWord: Array[0..15] of Char;
- i: LongInt;
- j: Integer;
-begin
- //first free all patchfiles
- for j:=0 to Length(FPat)-1 do begin
- FPat[j].Free;
- FPat[j]:=nil;
- end;
- Stream.Read(MagicWord,SizeOf(MagicWord));
- if SameText('VPatchProject 3'#26,MagicWord) then begin
- Stream.Read(i,SizeOf(i)); //4 dummy bytes
- end else
- raise Exception.Create('Error: file format incompatible (only version 3 and newer are supported).');
-
- Stream.Read(i,SizeOf(i)); // file count
- SetLength(FPat,i);
- for j:=0 to i - 1 do begin
- FPat[j]:=TPatchFile.Create(j,Stream);
- end;
-end;
-
-function TPatchProject.PatchFile(FileName: String): TPatchFile;
-var
- i: Integer;
-begin
- PatchFile:=nil;
- for i:=0 to Length(FPat) - 1 do begin
- if(CompareText(FPat[i].FNew.FileName,FileName)=0) then begin
- PatchFile:=FPat[i];
- end;
- end;
- for i:=0 to Length(FPat) - 1 do begin
- if(CompareText(FPat[i].FNew.FriendlyName,FileName)=0) then begin
- PatchFile:=FPat[i];
- end;
- end;
-end;
-
-function TPatchProject.PatchFile(Index: Integer): TPatchFile;
-begin
- if (Index<Length(FPat)) and (Index>=0) then
- PatchFile:=FPat[Index]
- else
- PatchFile:=nil;
-end;
-
-procedure TPatchProject.ResetCache;
-var
- i: Integer;
-begin
- for i:=0 to Pred(Length(FPat)) do
- FPat[i].ResetCache;
-end;
-
-procedure TPatchProject.SaveToStream(Stream: TStream);
-var
- HeadID: Array[0..15] of Char;
- i: LongInt;
- j: Integer;
-begin
- HeadID:='VPatchProject 3'+#26;
- Stream.Write(HeadID,SizeOf(HeadID));
- //4 dummy bytes left
- i:=0;
- Stream.Write(i,SizeOf(i));
- i:=Length(FPat);
- Stream.Write(i,SizeOf(i));
- for j:=0 to i - 1 do begin
- FPat[j].SaveToStream(Stream);
- end;
-end;
-
-procedure TPatchProject.WritePatches(Stream: TStream);
-var
- i,j,k,o: LongInt;
- q: LongWord;
-begin
- k:=$54415056;
- o:=Stream.Position;
- Stream.Write(k,SizeOf(k));
- k:=0;
- Stream.Write(k,SizeOf(k));
- k:=0;
- for i:=0 to Length(FPat)-1 do begin
- for j:=0 to FPat[i].GetOldVersionCount - 1 do begin
- FPat[i].WritePatch(j,Stream);
- Inc(k);
- end;
- end;
- Stream.Seek(o+4,soFromBeginning);
- q:=k;
- // set the MD5 flag
- q:=q or $80000000;
- Stream.Write(q,SizeOf(q));
- Stream.Seek(Stream.Size,soFromBeginning);
- Stream.Write(o,SizeOf(o));
-end;
-
-end.
+unit PatchClasses;
+
+interface
+
+uses Classes, sysutils, VDSP_CRC, DLLWrapper, Dialogs;
+
+const
+ DEFAULT_CONFIG = '64';
+
+type
+ TAbstractFile = record
+ FileName: String;
+ FriendlyName: String;
+ CRC32: LongWord; //the longword/integer sign is going to give problems again...
+ Size: Integer;
+ //not sure about this one yet...
+ Cached: Boolean; //True: we have cached the patch, using latest config
+ //False: a) we have nothing cached (size and start are -1)
+ // b) we still have cache (start>0 and size too), but it's not generated using the latest config (we can keep it of course because the new config might be worse)
+ Cache: TMemoryStream;
+ end;
+
+ TPatchFile = class (TObject)
+ private
+ FIndex: Integer;
+ ConfigID: String;
+ FNew: TAbstractFile;
+ FOld: Array of TAbstractFile;
+ protected
+ procedure SetNewFN(Value: String);
+ function GetNewFN: String;
+ procedure SetOldFN(i: Integer; FileName: String);
+ function GetOldFN(Index: Integer): String;
+ function GetOldVersionCount: Integer;
+ procedure ResetCache; overload;
+ procedure ResetCache(OldIndex: Integer); overload;
+ procedure InvalidateCache; overload;
+ procedure InvalidateCache(Index: Integer); overload;
+ function GetCached(Index: Integer): Boolean;
+ function GetConfig: String;
+ procedure SetConfig(Value: String);
+ public
+ constructor Create(Index: Integer; FileName: String); overload;
+ constructor Create(Index: Integer; Stream: TStream); overload;
+ destructor Destroy(); override;
+
+ procedure AddOldVersion(const FileName: String);
+ procedure RemoveOldVersion(const Index: Integer);
+ property OldVersions[Index: Integer]: String read GetOldFN write SetOldFN;
+
+ procedure Generate; overload;
+ procedure Generate(const Index: Integer); overload;
+ property Generated[Index: Integer]: Boolean read GetCached;
+ function GetPatchSize(Index: Integer): Integer;
+
+ procedure WritePatch(Index: Integer; Stream: TStream);
+
+// LoadFromStream not supported: Use Create(Index,Stream) instead!
+// procedure LoadFromStream(Stream: TStream);
+ procedure SaveToStream(Stream: TStream);
+ published
+ property NewVersion: String read GetNewFN write SetNewFN;
+ property OldVersionCount: Integer read GetOldVersionCount;
+ property Index: Integer read FIndex;
+ property Config: String read GetConfig write SetConfig;
+ end;
+
+ TPatchProject = class (TObject)
+ private
+ FPat: Array of TPatchFile;
+ public
+ procedure LoadFromStream(Stream: TStream);
+ procedure SaveToStream(Stream: TStream);
+ constructor Create();
+ destructor Destroy(); override;
+ procedure AddNewVersion(FileName: String);
+ function PatchFile(FileName: String): TPatchFile; overload;
+ function PatchFile(Index: Integer): TPatchFile; overload;
+ function GetPatchCount: Integer;
+ procedure WritePatches(Stream: TStream);
+ procedure Generate;
+ procedure ResetCache;
+ end;
+
+implementation
+
+ function ReadStreamString(Stream: TStream): String;
+ var
+ Buf: Array[0..512] of Char;
+ i: LongInt;
+ S: String;
+ j: Integer;
+ begin
+ Stream.Read(i,SizeOf(i));
+ if i>512 then raise Exception.Create('VPJ damaged: String too long (>512)');
+ Stream.Read(Buf,i);
+ for j:=1 to i do
+ S:=S+Buf[j-1];
+ ReadStreamString:=S;
+ end;
+
+//a private wrapper for the FileCRC function
+function CalcCRC(FileName: String): Integer;
+var
+ fs: TFileStream;
+begin
+ CalcCRC:=0;
+ fs:=nil;
+ try
+ fs:=TFileStream.Create(FileName,fmOpenRead);
+ CalcCRC:=FileCRC(fs);
+ finally
+ fs.Free;
+ end;
+end;
+
+function GetFileSize(FileName: String): Integer;
+var
+ fs: TFileStream;
+begin
+ GetFileSize:=0;
+ fs:=nil;
+ try
+ fs:=TFileStream.Create(FileName,fmOpenRead);
+ GetFileSize:=fs.Size;
+ finally
+ fs.Free;
+ end;
+end;
+
+{ TPatchFile }
+
+procedure TPatchFile.AddOldVersion(const FileName: String);
+var
+ i: Integer;
+// fs: TFileStream;
+begin
+ i:=Length(FOld);
+ SetLength(FOld,i+1);
+ FOld[i].Cache:=TMemoryStream.Create;
+ SetOldFN(i,FileName);
+end;
+
+constructor TPatchFile.Create(Index: Integer; FileName: String);
+//var
+// fs: TFileStream;
+begin
+ inherited Create();
+ FIndex:=Index;
+ SetLength(FOld,0);
+ FNew.CRC32:=0;
+ FNew.Size:=-1;
+ SetNewFN(FileName);
+ ConfigID:=DEFAULT_CONFIG;
+ //just to be on the safe side
+ //following is now done by SetNewFN :)
+ //no it's not - because that one resets the cache!!!
+ //doesn't matter, because we're not loading from stream!!!
+{ FNew.FileName:=FileName;
+ FNew.FriendlyName:=ExtractFileName(FileName);
+ FNew.CRC32:=CalcCRC(FileName);
+ FNew.Size:=GetFileSize(FileName);}
+end;
+
+constructor TPatchFile.Create(Index: Integer; Stream: TStream);
+var
+ i,q: LongInt;
+ CSize: Integer;
+ j: Integer;
+begin
+ inherited Create();
+ FIndex:=Index;
+ SetLength(FOld,0);
+ FNew.CRC32:=0;
+ FNew.Size:=-1; //just to be on the safe side
+
+ //read configuration
+ ConfigID:=ReadStreamString(Stream);
+
+ //now load everything...
+ FNew.FileName:=ReadStreamString(Stream);
+ FNew.FriendlyName:=ReadStreamString(Stream);
+ Stream.Read(FNew.CRC32,SizeOf(FNew.CRC32));
+ Stream.Read(FNew.Size,SizeOf(FNew.Size));
+ Stream.Read(i,SizeOf(i));
+ SetLength(FOld,i);
+ for j:=0 to i - 1 do begin
+ FOld[j].FileName:=ReadStreamString(Stream);
+ FOld[j].FriendlyName:=ReadStreamString(Stream);
+ Stream.Read(FOld[j].CRC32,SizeOf(FOld[j].CRC32));
+ Stream.Read(FOld[j].Size,SizeOf(FOld[j].Size));
+ Stream.Read(q,SizeOf(q));
+ FOld[j].Cached:=not (q=0);
+ if FOld[j].Cached then begin
+ Stream.Read(CSize,SizeOf(CSize));
+ FOld[j].Cache:=TMemoryStream.Create;
+ FOld[j].Cache.CopyFrom(Stream,CSize);
+ end;
+ end;
+end;
+
+destructor TPatchFile.Destroy;
+begin
+ SetLength(FOld,0);
+ inherited;
+end;
+
+function TPatchFile.GetNewFN: String;
+begin
+ GetNewFN:=FNew.FileName;
+end;
+
+function TPatchFile.GetOldFN(Index: Integer): String;
+begin
+ Result:=FOld[Index].FileName;
+ if FOld[Index].Cached then
+ if FOld[Index].Cache.Size>0 then begin
+ Result:=Result + ' ('+IntToStr(FOld[Index].Cache.Size)+' bytes to patch)';
+ end;
+end;
+
+function TPatchFile.GetOldVersionCount: Integer;
+begin
+ GetOldVersionCount:=Length(FOld);
+end;
+
+procedure TPatchFile.ResetCache;
+var
+ i: Integer;
+begin
+ for i:=0 to Length(FOld)-1 do
+ ResetCache(i);
+end;
+
+procedure TPatchFile.RemoveOldVersion(const Index: Integer);
+var
+ i: Integer;
+begin
+ FOld[Index].Cache.Free;
+ for i:=Index to Length(FOld)-2 do begin
+ FOld[i]:=FOld[i+1];
+ end;
+ SetLength(FOld,Length(FOld)-1);
+end;
+
+procedure TPatchFile.ResetCache(OldIndex: Integer);
+begin
+ FOld[OldIndex].Cached:=False;
+ FOld[OldIndex].Size:=-1;
+ FOld[OldIndex].Cache.Clear;
+end;
+
+procedure TPatchFile.SaveToStream(Stream: TStream);
+ procedure WriteStreamString(Stream: TStream; const S: String);
+ var
+ i: LongInt;
+ j: Integer;
+ Buf: Array[0..512] of Char;
+ begin
+ i:=Length(S);
+ Stream.Write(i,SizeOf(i));
+ for j:=1 to i do
+ Buf[j-1]:=S[j];
+ Buf[i]:=#0;
+ Stream.Write(Buf,i);
+ end;
+var
+ i,q: LongInt;
+ j: Integer;
+ tmp: Integer;
+begin
+ //write config ID
+ WriteStreamString(Stream,ConfigID);
+
+ WriteStreamString(Stream,FNew.FileName);
+ WriteStreamString(Stream,FNew.FriendlyName);
+ Stream.Write(FNew.CRC32,SizeOf(FNew.CRC32));
+ Stream.Write(FNew.Size,SizeOf(FNew.Size));
+
+ i:=Length(FOld);
+ Stream.Write(i,SizeOf(i));
+
+ for j:=0 to i - 1 do begin
+ WriteStreamString(Stream,FOld[j].FileName);
+ WriteStreamString(Stream,FOld[j].FriendlyName);
+ Stream.Write(FOld[j].CRC32,SizeOf(FOld[j].CRC32));
+ Stream.Write(FOld[j].Size,SizeOf(FOld[j].Size));
+ if FOld[j].Cached then q:=1 else q:=0;
+ Stream.Write(q,SizeOf(q));
+ if FOld[j].Cached then begin
+ tmp:=FOld[j].Cache.Size;
+ Stream.Write(tmp,SizeOf(tmp));
+ FOld[j].Cache.Seek(0,soFromBeginning);
+ Stream.CopyFrom(FOld[j].Cache,tmp);
+ end;
+ end;
+end;
+
+procedure TPatchFile.SetNewFN(Value: String);
+var
+ NewSize: Integer;
+ NewCRC: LongWord;
+begin
+ FNew.FileName:=Value;
+ FNew.Friendlyname:=ExtractFileName(Value);
+ NewCRC:=CalcCRC(Value);
+ NewSize:=GetFileSize(Value);
+ //if any changes, then reset cache :)
+ if not ((FNew.CRC32=NewCRC) and (FNew.Size=NewSize)) then begin
+ FNew.CRC32:=NewCRC;
+ FNew.Size:=NewSize;
+ ResetCache;
+ end;
+end;
+
+procedure TPatchFile.SetOldFN(i: Integer; FileName: String);
+begin
+ if((i>=0) and (i<Length(FOld))) then begin
+ FOld[i].FileName:=FileName;
+ FOld[i].FriendlyName:=ExtractFileName(FileName);
+ FOld[i].CRC32:=CalcCRC(FileName);
+ FOld[i].Size:=GetFileSize(FileName);
+ ResetCache(i);
+ end;
+end;
+
+procedure TPatchFile.Generate;
+var
+ i: Integer;
+begin
+ //generate all of them into the cache?
+ for i:=0 to OldVersionCount - 1 do
+ Generate(i);
+end;
+
+procedure TPatchFile.Generate(const Index: Integer);
+var
+ Size: Integer;
+ fm: TMemoryStream;
+begin
+ fm:=TMemoryStream.Create;
+ Size:=DoGenerate(FOld[Index].FileName,FNew.FileName,fm,ConfigID);
+ if not (Size=-1) then begin
+ if (FOld[Index].Cache.Size>Size) or (not FOld[Index].Cached) then begin //the new one is better
+ FOld[Index].Cache.Clear;
+ fm.Seek(8,soFromBeginning);
+ FOld[Index].Cache.CopyFrom(fm,fm.Size-8);
+ end;
+ FOld[Index].Cached:=True;
+ end;
+ fm.Free;
+end;
+
+function TPatchFile.GetCached(Index: Integer): Boolean;
+begin
+ GetCached:=FOld[Index].Cached;
+end;
+
+function TPatchFile.GetConfig: String;
+begin
+ GetConfig:=ConfigID;
+end;
+
+procedure TPatchFile.SetConfig(Value: String);
+begin
+ if not Assigned(Self) then Exit;
+ if not SameText(Value,ConfigID) then begin
+ InvalidateCache; //configuration changed, invalidate cache
+ end;
+ ConfigID:=Value;
+end;
+
+function TPatchFile.GetPatchSize(Index: Integer): Integer;
+begin
+ if Generated[Index] then begin
+ GetPatchSize:=FOld[Index].Cache.Size;
+ end else
+ GetPatchSize:=-1;
+end;
+
+procedure TPatchFile.InvalidateCache;
+var
+ i: Integer;
+begin
+ for i:=0 to Length(FOld)-1 do
+ InvalidateCache(i);
+end;
+
+procedure TPatchFile.InvalidateCache(Index: Integer);
+begin
+ FOld[Index].Cached:=False;
+end;
+
+procedure TPatchFile.WritePatch(Index: Integer; Stream: TStream);
+begin
+ if not FOld[Index].Cached then
+ Generate(Index);
+ if not FOld[Index].Cached then
+ raise Exception.Create('Writing of patch failed: Could not generate all patches');
+ FOld[Index].Cache.Seek(0,soFromBeginning);
+ Stream.CopyFrom(FOld[Index].Cache,FOld[Index].Cache.Size);
+end;
+
+{ TPatchProject }
+
+procedure TPatchProject.AddNewVersion(FileName: String);
+var
+ i: Integer;
+begin
+ i:=Length(FPat);
+ SetLength(FPat,i+1);
+ FPat[i]:=TPatchFile.Create(i,FileName);
+ FPat[i].SetConfig(DEFAULT_CONFIG);
+end;
+
+constructor TPatchProject.Create;
+begin
+ inherited;
+ SetLength(FPat,0);
+end;
+
+destructor TPatchProject.Destroy;
+var
+ i: Integer;
+begin
+ for i:=0 to Length(FPat)-1 do begin
+ FPat[i].Free;
+ end;
+ SetLength(FPat,0);
+ inherited;
+end;
+
+procedure TPatchProject.Generate;
+var
+ i: Integer;
+begin
+ for i:=0 to GetPatchCount - 1 do
+ FPat[i].Generate;
+end;
+
+function TPatchProject.GetPatchCount: Integer;
+begin
+ GetPatchCount:=Length(FPat);
+end;
+
+procedure TPatchProject.LoadFromStream(Stream: TStream);
+var
+ MagicWord: Array[0..15] of Char;
+ i: LongInt;
+ j: Integer;
+begin
+ //first free all patchfiles
+ for j:=0 to Length(FPat)-1 do begin
+ FPat[j].Free;
+ FPat[j]:=nil;
+ end;
+ Stream.Read(MagicWord,SizeOf(MagicWord));
+ if SameText('VPatchProject 3'#26,MagicWord) then begin
+ Stream.Read(i,SizeOf(i)); //4 dummy bytes
+ end else
+ raise Exception.Create('Error: file format incompatible (only version 3 and newer are supported).');
+
+ Stream.Read(i,SizeOf(i)); // file count
+ SetLength(FPat,i);
+ for j:=0 to i - 1 do begin
+ FPat[j]:=TPatchFile.Create(j,Stream);
+ end;
+end;
+
+function TPatchProject.PatchFile(FileName: String): TPatchFile;
+var
+ i: Integer;
+begin
+ PatchFile:=nil;
+ for i:=0 to Length(FPat) - 1 do begin
+ if(CompareText(FPat[i].FNew.FileName,FileName)=0) then begin
+ PatchFile:=FPat[i];
+ end;
+ end;
+ for i:=0 to Length(FPat) - 1 do begin
+ if(CompareText(FPat[i].FNew.FriendlyName,FileName)=0) then begin
+ PatchFile:=FPat[i];
+ end;
+ end;
+end;
+
+function TPatchProject.PatchFile(Index: Integer): TPatchFile;
+begin
+ if (Index<Length(FPat)) and (Index>=0) then
+ PatchFile:=FPat[Index]
+ else
+ PatchFile:=nil;
+end;
+
+procedure TPatchProject.ResetCache;
+var
+ i: Integer;
+begin
+ for i:=0 to Pred(Length(FPat)) do
+ FPat[i].ResetCache;
+end;
+
+procedure TPatchProject.SaveToStream(Stream: TStream);
+var
+ HeadID: Array[0..15] of Char;
+ i: LongInt;
+ j: Integer;
+begin
+ HeadID:='VPatchProject 3'+#26;
+ Stream.Write(HeadID,SizeOf(HeadID));
+ //4 dummy bytes left
+ i:=0;
+ Stream.Write(i,SizeOf(i));
+ i:=Length(FPat);
+ Stream.Write(i,SizeOf(i));
+ for j:=0 to i - 1 do begin
+ FPat[j].SaveToStream(Stream);
+ end;
+end;
+
+procedure TPatchProject.WritePatches(Stream: TStream);
+var
+ i,j,k,o: LongInt;
+ q: LongWord;
+begin
+ k:=$54415056;
+ o:=Stream.Position;
+ Stream.Write(k,SizeOf(k));
+ k:=0;
+ Stream.Write(k,SizeOf(k));
+ k:=0;
+ for i:=0 to Length(FPat)-1 do begin
+ for j:=0 to FPat[i].GetOldVersionCount - 1 do begin
+ FPat[i].WritePatch(j,Stream);
+ Inc(k);
+ end;
+ end;
+ Stream.Seek(o+4,soFromBeginning);
+ q:=k;
+ // set the MD5 flag
+ q:=q or $80000000;
+ Stream.Write(q,SizeOf(q));
+ Stream.Seek(Stream.Size,soFromBeginning);
+ Stream.Write(o,SizeOf(o));
+end;
+
+end.
\ No newline at end of file
diff --git a/Contrib/VPatch/Source/GUI/ProgressForm.dfm b/Contrib/VPatch/Source/GUI/ProgressForm.dfm
index 90b87ea..787fec9 100755
--- a/Contrib/VPatch/Source/GUI/ProgressForm.dfm
+++ b/Contrib/VPatch/Source/GUI/ProgressForm.dfm
@@ -1,102 +1,102 @@
-object frmProg: TfrmProg
- Left = 328
- Top = 266
- BorderIcons = [biSystemMenu, biMinimize]
- BorderStyle = bsSingle
- Caption = 'Progress...'
- ClientHeight = 193
- ClientWidth = 385
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- OnCreate = FormCreate
- PixelsPerInch = 96
- TextHeight = 13
- object lblStatus: TLabel
- Left = 8
- Top = 8
- Width = 369
- Height = 17
- AutoSize = False
- Transparent = True
- end
- object lblSize: TLabel
- Left = 152
- Top = 8
- Width = 225
- Height = 17
- Alignment = taRightJustify
- AutoSize = False
- Transparent = True
- end
- object lblFile: TLabel
- Left = 8
- Top = 48
- Width = 369
- Height = 17
- AutoSize = False
- Caption = '(filename)'
- end
- object lblNewFile: TLabel
- Left = 8
- Top = 96
- Width = 369
- Height = 17
- AutoSize = False
- Caption = '(filename)'
- end
- object lblTotal: TLabel
- Left = 8
- Top = 144
- Width = 369
- Height = 17
- AutoSize = False
- Caption = 'Total progress'
- end
- object shpFull: TShape
- Left = 8
- Top = 24
- Width = 369
- Height = 17
- Brush.Color = clGray
- end
- object shpLeft: TShape
- Left = 8
- Top = 24
- Width = 369
- Height = 17
- Brush.Color = clRed
- end
- object prgFile: TProgressBar
- Left = 8
- Top = 64
- Width = 369
- Height = 25
- Min = 0
- Max = 100
- TabOrder = 0
- end
- object prgNewFile: TProgressBar
- Left = 8
- Top = 112
- Width = 369
- Height = 25
- Min = 0
- Max = 100
- TabOrder = 1
- end
- object prgAll: TProgressBar
- Left = 8
- Top = 160
- Width = 369
- Height = 25
- Min = 0
- Max = 100
- TabOrder = 2
- end
-end
+object frmProg: TfrmProg
+ Left = 328
+ Top = 266
+ BorderIcons = [biSystemMenu, biMinimize]
+ BorderStyle = bsSingle
+ Caption = 'Progress...'
+ ClientHeight = 193
+ ClientWidth = 385
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ Position = poScreenCenter
+ OnCreate = FormCreate
+ PixelsPerInch = 96
+ TextHeight = 13
+ object lblStatus: TLabel
+ Left = 8
+ Top = 8
+ Width = 369
+ Height = 17
+ AutoSize = False
+ Transparent = True
+ end
+ object lblSize: TLabel
+ Left = 152
+ Top = 8
+ Width = 225
+ Height = 17
+ Alignment = taRightJustify
+ AutoSize = False
+ Transparent = True
+ end
+ object lblFile: TLabel
+ Left = 8
+ Top = 48
+ Width = 369
+ Height = 17
+ AutoSize = False
+ Caption = '(filename)'
+ end
+ object lblNewFile: TLabel
+ Left = 8
+ Top = 96
+ Width = 369
+ Height = 17
+ AutoSize = False
+ Caption = '(filename)'
+ end
+ object lblTotal: TLabel
+ Left = 8
+ Top = 144
+ Width = 369
+ Height = 17
+ AutoSize = False
+ Caption = 'Total progress'
+ end
+ object shpFull: TShape
+ Left = 8
+ Top = 24
+ Width = 369
+ Height = 17
+ Brush.Color = clGray
+ end
+ object shpLeft: TShape
+ Left = 8
+ Top = 24
+ Width = 369
+ Height = 17
+ Brush.Color = clRed
+ end
+ object prgFile: TProgressBar
+ Left = 8
+ Top = 64
+ Width = 369
+ Height = 25
+ Min = 0
+ Max = 100
+ TabOrder = 0
+ end
+ object prgNewFile: TProgressBar
+ Left = 8
+ Top = 112
+ Width = 369
+ Height = 25
+ Min = 0
+ Max = 100
+ TabOrder = 1
+ end
+ object prgAll: TProgressBar
+ Left = 8
+ Top = 160
+ Width = 369
+ Height = 25
+ Min = 0
+ Max = 100
+ TabOrder = 2
+ end
+end
diff --git a/Contrib/VPatch/Source/GUI/ProgressForm.pas b/Contrib/VPatch/Source/GUI/ProgressForm.pas
index 92823ef..b2fca0a 100755
--- a/Contrib/VPatch/Source/GUI/ProgressForm.pas
+++ b/Contrib/VPatch/Source/GUI/ProgressForm.pas
@@ -1,74 +1,74 @@
-unit ProgressForm;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ComCtrls, ExtCtrls, Math;
-
-type
- TfrmProg = class(TForm)
- prgFile: TProgressBar;
- lblFile: TLabel;
- lblNewFile: TLabel;
- prgNewFile: TProgressBar;
- lblTotal: TLabel;
- prgAll: TProgressBar;
- lblStatus: TLabel;
- shpFull: TShape;
- shpLeft: TShape;
- lblSize: TLabel;
- procedure GetStatusProc(S: PChar; Point, Total,
- CurrentSavings: Integer); stdcall;
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- FilePos,FileRange,AllPos,AllRange: Byte;
- CTotal: Integer;
- t2: TDateTime;
- end;
-
-var
- frmProg: TfrmProg;
-
-implementation
-
-{$R *.dfm}
-
-procedure TfrmProg.GetStatusProc(S: PChar; Point, Total, CurrentSavings: Integer); stdcall;
-var
- a,b: Integer;
- j: Single;
-begin
- if Length(S)>0 then
- lblStatus.Caption:=S;
- if (Total<0) then begin
- Total:=CTotal;
- if (Now-t2)*24*3600*10<8 then Exit; //update only every 800 milliseconds
- end;
- if (Total>=0) then CTotal:=Total;
- if (Total>=0) and (Point>=0) then begin
- a:=(Point*100) div Total;
- prgFile.Position:=a;
- b:=FilePos+(a*FileRange) div 100;
- prgNewFile.Position:=b;
- prgAll.Position:=AllPos+(b*AllRange) div 100;
- end;
- if (CurrentSavings>=0) and (Total>=0) then begin
- j:=(Total-CurrentSavings)*shpFull.Width/Total;
- shpLeft.Width:=Max(Round(j),3);
- lblSize.Caption:=IntToStr(Total-CurrentSavings)+' of '+IntToStr(Total)+' ('+IntToStr(CurrentSavings*100 div Total)+'%)';
- end;
- Refresh;
- t2:=Now;
-end;
-
-procedure TfrmProg.FormCreate(Sender: TObject);
-begin
- FilePos:=0; FileRange:=100; AllPos:=0; AllRange:=100; CTotal:=-1;
- t2:=0;
-end;
-
-end.
+unit ProgressForm;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, StdCtrls, ComCtrls, ExtCtrls, Math;
+
+type
+ TfrmProg = class(TForm)
+ prgFile: TProgressBar;
+ lblFile: TLabel;
+ lblNewFile: TLabel;
+ prgNewFile: TProgressBar;
+ lblTotal: TLabel;
+ prgAll: TProgressBar;
+ lblStatus: TLabel;
+ shpFull: TShape;
+ shpLeft: TShape;
+ lblSize: TLabel;
+ procedure GetStatusProc(S: PChar; Point, Total,
+ CurrentSavings: Integer); stdcall;
+ procedure FormCreate(Sender: TObject);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ FilePos,FileRange,AllPos,AllRange: Byte;
+ CTotal: Integer;
+ t2: TDateTime;
+ end;
+
+var
+ frmProg: TfrmProg;
+
+implementation
+
+{$R *.dfm}
+
+procedure TfrmProg.GetStatusProc(S: PChar; Point, Total, CurrentSavings: Integer); stdcall;
+var
+ a,b: Integer;
+ j: Single;
+begin
+ if Length(S)>0 then
+ lblStatus.Caption:=S;
+ if (Total<0) then begin
+ Total:=CTotal;
+ if (Now-t2)*24*3600*10<8 then Exit; //update only every 800 milliseconds
+ end;
+ if (Total>=0) then CTotal:=Total;
+ if (Total>=0) and (Point>=0) then begin
+ a:=(Point*100) div Total;
+ prgFile.Position:=a;
+ b:=FilePos+(a*FileRange) div 100;
+ prgNewFile.Position:=b;
+ prgAll.Position:=AllPos+(b*AllRange) div 100;
+ end;
+ if (CurrentSavings>=0) and (Total>=0) then begin
+ j:=(Total-CurrentSavings)*shpFull.Width/Total;
+ shpLeft.Width:=Max(Round(j),3);
+ lblSize.Caption:=IntToStr(Total-CurrentSavings)+' of '+IntToStr(Total)+' ('+IntToStr(CurrentSavings*100 div Total)+'%)';
+ end;
+ Refresh;
+ t2:=Now;
+end;
+
+procedure TfrmProg.FormCreate(Sender: TObject);
+begin
+ FilePos:=0; FileRange:=100; AllPos:=0; AllRange:=100; CTotal:=-1;
+ t2:=0;
+end;
+
+end.
diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj b/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj
index 9dcdd54..4a4fb02 100755
--- a/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj
+++ b/Contrib/VPatch/Source/GUI/VPatchGUI.bdsproj
@@ -1,163 +1,163 @@
-<?xml version="1.0" encoding="utf-8"?>
-<BorlandProject>
- <PersonalityInfo>
- <Option>
- <Option Name="Personality">Delphi.Personality</Option>
- <Option Name="ProjectType"></Option>
- <Option Name="Version">1.0</Option>
- <Option Name="GUID">{F68A969B-E8BB-4D72-9FB4-216CA54EACE0}</Option>
- </Option>
- </PersonalityInfo>
- <Delphi.Personality>
- <Source>
- <Source Name="MainSource">VPatchGUI.dpr</Source>
- </Source>
- <FileVersion>
- <FileVersion Name="Version">7.0</FileVersion>
- </FileVersion>
- <Compiler>
- <Compiler Name="A">8</Compiler>
- <Compiler Name="B">0</Compiler>
- <Compiler Name="C">1</Compiler>
- <Compiler Name="D">1</Compiler>
- <Compiler Name="E">0</Compiler>
- <Compiler Name="F">0</Compiler>
- <Compiler Name="G">1</Compiler>
- <Compiler Name="H">1</Compiler>
- <Compiler Name="I">1</Compiler>
- <Compiler Name="J">0</Compiler>
- <Compiler Name="K">0</Compiler>
- <Compiler Name="L">1</Compiler>
- <Compiler Name="M">0</Compiler>
- <Compiler Name="N">1</Compiler>
- <Compiler Name="O">1</Compiler>
- <Compiler Name="P">1</Compiler>
- <Compiler Name="Q">0</Compiler>
- <Compiler Name="R">0</Compiler>
- <Compiler Name="S">0</Compiler>
- <Compiler Name="T">0</Compiler>
- <Compiler Name="U">0</Compiler>
- <Compiler Name="V">1</Compiler>
- <Compiler Name="W">0</Compiler>
- <Compiler Name="X">1</Compiler>
- <Compiler Name="Y">1</Compiler>
- <Compiler Name="Z">1</Compiler>
- <Compiler Name="ShowHints">True</Compiler>
- <Compiler Name="ShowWarnings">True</Compiler>
- <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
- <Compiler Name="NamespacePrefix"></Compiler>
- <Compiler Name="GenerateDocumentation">False</Compiler>
- <Compiler Name="DefaultNamespace"></Compiler>
- <Compiler Name="SymbolDeprecated">True</Compiler>
- <Compiler Name="SymbolLibrary">True</Compiler>
- <Compiler Name="SymbolPlatform">True</Compiler>
- <Compiler Name="SymbolExperimental">True</Compiler>
- <Compiler Name="UnitLibrary">True</Compiler>
- <Compiler Name="UnitPlatform">True</Compiler>
- <Compiler Name="UnitDeprecated">True</Compiler>
- <Compiler Name="UnitExperimental">True</Compiler>
- <Compiler Name="HResultCompat">True</Compiler>
- <Compiler Name="HidingMember">True</Compiler>
- <Compiler Name="HiddenVirtual">True</Compiler>
- <Compiler Name="Garbage">True</Compiler>
- <Compiler Name="BoundsError">True</Compiler>
- <Compiler Name="ZeroNilCompat">True</Compiler>
- <Compiler Name="StringConstTruncated">True</Compiler>
- <Compiler Name="ForLoopVarVarPar">True</Compiler>
- <Compiler Name="TypedConstVarPar">True</Compiler>
- <Compiler Name="AsgToTypedConst">True</Compiler>
- <Compiler Name="CaseLabelRange">True</Compiler>
- <Compiler Name="ForVariable">True</Compiler>
- <Compiler Name="ConstructingAbstract">True</Compiler>
- <Compiler Name="ComparisonFalse">True</Compiler>
- <Compiler Name="ComparisonTrue">True</Compiler>
- <Compiler Name="ComparingSignedUnsigned">True</Compiler>
- <Compiler Name="CombiningSignedUnsigned">True</Compiler>
- <Compiler Name="UnsupportedConstruct">True</Compiler>
- <Compiler Name="FileOpen">True</Compiler>
- <Compiler Name="FileOpenUnitSrc">True</Compiler>
- <Compiler Name="BadGlobalSymbol">True</Compiler>
- <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
- <Compiler Name="InvalidDirective">True</Compiler>
- <Compiler Name="PackageNoLink">True</Compiler>
- <Compiler Name="PackageThreadVar">True</Compiler>
- <Compiler Name="ImplicitImport">True</Compiler>
- <Compiler Name="HPPEMITIgnored">True</Compiler>
- <Compiler Name="NoRetVal">True</Compiler>
- <Compiler Name="UseBeforeDef">True</Compiler>
- <Compiler Name="ForLoopVarUndef">True</Compiler>
- <Compiler Name="UnitNameMismatch">True</Compiler>
- <Compiler Name="NoCFGFileFound">True</Compiler>
- <Compiler Name="MessageDirective">True</Compiler>
- <Compiler Name="ImplicitVariants">True</Compiler>
- <Compiler Name="UnicodeToLocale">True</Compiler>
- <Compiler Name="LocaleToUnicode">True</Compiler>
- <Compiler Name="ImagebaseMultiple">True</Compiler>
- <Compiler Name="SuspiciousTypecast">True</Compiler>
- <Compiler Name="PrivatePropAccessor">True</Compiler>
- <Compiler Name="UnsafeType">False</Compiler>
- <Compiler Name="UnsafeCode">False</Compiler>
- <Compiler Name="UnsafeCast">False</Compiler>
- <Compiler Name="OptionTruncated">True</Compiler>
- <Compiler Name="WideCharReduced">True</Compiler>
- <Compiler Name="DuplicatesIgnored">True</Compiler>
- </Compiler>
- <Linker>
- <Linker Name="MapFile">0</Linker>
- <Linker Name="OutputObjs">0</Linker>
- <Linker Name="ConsoleApp">1</Linker>
- <Linker Name="DebugInfo">False</Linker>
- <Linker Name="RemoteSymbols">False</Linker>
- <Linker Name="GenerateDRC">False</Linker>
- <Linker Name="MinStackSize">16384</Linker>
- <Linker Name="MaxStackSize">1048576</Linker>
- <Linker Name="ImageBase">4194304</Linker>
- <Linker Name="ExeDescription"></Linker>
- </Linker>
- <Directories>
- <Directories Name="OutputDir">..\..</Directories>
- <Directories Name="UnitOutputDir"></Directories>
- <Directories Name="PackageDLLOutputDir"></Directories>
- <Directories Name="PackageDCPOutputDir"></Directories>
- <Directories Name="SearchPath"></Directories>
- <Directories Name="Packages">vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;qrpt;teeui;teedb;tee;dss;teeqr;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;nmfast;webdsnap;websnap;dbexpress;dbxcds;indy;dclOffice2k;VirtualTreesD6;packageTib;inetdb</Directories>
- <Directories Name="Conditionals"></Directories>
- <Directories Name="DebugSourceDirs"></Directories>
- <Directories Name="UsePackages">False</Directories>
- </Directories>
- <Parameters>
- <Parameters Name="RunParams"></Parameters>
- <Parameters Name="HostApplication"></Parameters>
- <Parameters Name="Launcher"></Parameters>
- <Parameters Name="UseLauncher">False</Parameters>
- <Parameters Name="DebugCWD"></Parameters>
- </Parameters>
- <VersionInfo>
- <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
- <VersionInfo Name="AutoIncBuild">True</VersionInfo>
- <VersionInfo Name="MajorVer">3</VersionInfo>
- <VersionInfo Name="MinorVer">0</VersionInfo>
- <VersionInfo Name="Release">0</VersionInfo>
- <VersionInfo Name="Build">28</VersionInfo>
- <VersionInfo Name="Debug">False</VersionInfo>
- <VersionInfo Name="PreRelease">False</VersionInfo>
- <VersionInfo Name="Special">False</VersionInfo>
- <VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">False</VersionInfo>
- <VersionInfo Name="Locale">1043</VersionInfo>
- <VersionInfo Name="CodePage">1252</VersionInfo>
- </VersionInfo>
- <VersionInfoKeys>
- <VersionInfoKeys Name="CompanyName">Van de Sande Productions</VersionInfoKeys>
- <VersionInfoKeys Name="FileDescription">VG - VPatch GUI</VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">3.0.0.28</VersionInfoKeys>
- <VersionInfoKeys Name="InternalName">VPatchGUI</VersionInfoKeys>
- <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename">VPatchGUI.exe</VersionInfoKeys>
- <VersionInfoKeys Name="ProductName">VPatch Graphical User Interface</VersionInfoKeys>
- <VersionInfoKeys Name="ProductVersion">3.0</VersionInfoKeys>
- <VersionInfoKeys Name="Comments">Official website: http://www.tibed.net/vpatch</VersionInfoKeys>
- </VersionInfoKeys>
- </Delphi.Personality>
-</BorlandProject>
+<?xml version="1.0" encoding="utf-8"?>
+<BorlandProject>
+ <PersonalityInfo>
+ <Option>
+ <Option Name="Personality">Delphi.Personality</Option>
+ <Option Name="ProjectType"></Option>
+ <Option Name="Version">1.0</Option>
+ <Option Name="GUID">{F68A969B-E8BB-4D72-9FB4-216CA54EACE0}</Option>
+ </Option>
+ </PersonalityInfo>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">VPatchGUI.dpr</Source>
+ </Source>
+ <FileVersion>
+ <FileVersion Name="Version">7.0</FileVersion>
+ </FileVersion>
+ <Compiler>
+ <Compiler Name="A">8</Compiler>
+ <Compiler Name="B">0</Compiler>
+ <Compiler Name="C">1</Compiler>
+ <Compiler Name="D">1</Compiler>
+ <Compiler Name="E">0</Compiler>
+ <Compiler Name="F">0</Compiler>
+ <Compiler Name="G">1</Compiler>
+ <Compiler Name="H">1</Compiler>
+ <Compiler Name="I">1</Compiler>
+ <Compiler Name="J">0</Compiler>
+ <Compiler Name="K">0</Compiler>
+ <Compiler Name="L">1</Compiler>
+ <Compiler Name="M">0</Compiler>
+ <Compiler Name="N">1</Compiler>
+ <Compiler Name="O">1</Compiler>
+ <Compiler Name="P">1</Compiler>
+ <Compiler Name="Q">0</Compiler>
+ <Compiler Name="R">0</Compiler>
+ <Compiler Name="S">0</Compiler>
+ <Compiler Name="T">0</Compiler>
+ <Compiler Name="U">0</Compiler>
+ <Compiler Name="V">1</Compiler>
+ <Compiler Name="W">0</Compiler>
+ <Compiler Name="X">1</Compiler>
+ <Compiler Name="Y">1</Compiler>
+ <Compiler Name="Z">1</Compiler>
+ <Compiler Name="ShowHints">True</Compiler>
+ <Compiler Name="ShowWarnings">True</Compiler>
+ <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
+ <Compiler Name="NamespacePrefix"></Compiler>
+ <Compiler Name="GenerateDocumentation">False</Compiler>
+ <Compiler Name="DefaultNamespace"></Compiler>
+ <Compiler Name="SymbolDeprecated">True</Compiler>
+ <Compiler Name="SymbolLibrary">True</Compiler>
+ <Compiler Name="SymbolPlatform">True</Compiler>
+ <Compiler Name="SymbolExperimental">True</Compiler>
+ <Compiler Name="UnitLibrary">True</Compiler>
+ <Compiler Name="UnitPlatform">True</Compiler>
+ <Compiler Name="UnitDeprecated">True</Compiler>
+ <Compiler Name="UnitExperimental">True</Compiler>
+ <Compiler Name="HResultCompat">True</Compiler>
+ <Compiler Name="HidingMember">True</Compiler>
+ <Compiler Name="HiddenVirtual">True</Compiler>
+ <Compiler Name="Garbage">True</Compiler>
+ <Compiler Name="BoundsError">True</Compiler>
+ <Compiler Name="ZeroNilCompat">True</Compiler>
+ <Compiler Name="StringConstTruncated">True</Compiler>
+ <Compiler Name="ForLoopVarVarPar">True</Compiler>
+ <Compiler Name="TypedConstVarPar">True</Compiler>
+ <Compiler Name="AsgToTypedConst">True</Compiler>
+ <Compiler Name="CaseLabelRange">True</Compiler>
+ <Compiler Name="ForVariable">True</Compiler>
+ <Compiler Name="ConstructingAbstract">True</Compiler>
+ <Compiler Name="ComparisonFalse">True</Compiler>
+ <Compiler Name="ComparisonTrue">True</Compiler>
+ <Compiler Name="ComparingSignedUnsigned">True</Compiler>
+ <Compiler Name="CombiningSignedUnsigned">True</Compiler>
+ <Compiler Name="UnsupportedConstruct">True</Compiler>
+ <Compiler Name="FileOpen">True</Compiler>
+ <Compiler Name="FileOpenUnitSrc">True</Compiler>
+ <Compiler Name="BadGlobalSymbol">True</Compiler>
+ <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
+ <Compiler Name="InvalidDirective">True</Compiler>
+ <Compiler Name="PackageNoLink">True</Compiler>
+ <Compiler Name="PackageThreadVar">True</Compiler>
+ <Compiler Name="ImplicitImport">True</Compiler>
+ <Compiler Name="HPPEMITIgnored">True</Compiler>
+ <Compiler Name="NoRetVal">True</Compiler>
+ <Compiler Name="UseBeforeDef">True</Compiler>
+ <Compiler Name="ForLoopVarUndef">True</Compiler>
+ <Compiler Name="UnitNameMismatch">True</Compiler>
+ <Compiler Name="NoCFGFileFound">True</Compiler>
+ <Compiler Name="MessageDirective">True</Compiler>
+ <Compiler Name="ImplicitVariants">True</Compiler>
+ <Compiler Name="UnicodeToLocale">True</Compiler>
+ <Compiler Name="LocaleToUnicode">True</Compiler>
+ <Compiler Name="ImagebaseMultiple">True</Compiler>
+ <Compiler Name="SuspiciousTypecast">True</Compiler>
+ <Compiler Name="PrivatePropAccessor">True</Compiler>
+ <Compiler Name="UnsafeType">False</Compiler>
+ <Compiler Name="UnsafeCode">False</Compiler>
+ <Compiler Name="UnsafeCast">False</Compiler>
+ <Compiler Name="OptionTruncated">True</Compiler>
+ <Compiler Name="WideCharReduced">True</Compiler>
+ <Compiler Name="DuplicatesIgnored">True</Compiler>
+ </Compiler>
+ <Linker>
+ <Linker Name="MapFile">0</Linker>
+ <Linker Name="OutputObjs">0</Linker>
+ <Linker Name="ConsoleApp">1</Linker>
+ <Linker Name="DebugInfo">False</Linker>
+ <Linker Name="RemoteSymbols">False</Linker>
+ <Linker Name="GenerateDRC">False</Linker>
+ <Linker Name="MinStackSize">16384</Linker>
+ <Linker Name="MaxStackSize">1048576</Linker>
+ <Linker Name="ImageBase">4194304</Linker>
+ <Linker Name="ExeDescription"></Linker>
+ </Linker>
+ <Directories>
+ <Directories Name="OutputDir">..\..</Directories>
+ <Directories Name="UnitOutputDir"></Directories>
+ <Directories Name="PackageDLLOutputDir"></Directories>
+ <Directories Name="PackageDCPOutputDir"></Directories>
+ <Directories Name="SearchPath"></Directories>
+ <Directories Name="Packages">vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;qrpt;teeui;teedb;tee;dss;teeqr;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;nmfast;webdsnap;websnap;dbexpress;dbxcds;indy;dclOffice2k;VirtualTreesD6;packageTib;inetdb</Directories>
+ <Directories Name="Conditionals"></Directories>
+ <Directories Name="DebugSourceDirs"></Directories>
+ <Directories Name="UsePackages">False</Directories>
+ </Directories>
+ <Parameters>
+ <Parameters Name="RunParams"></Parameters>
+ <Parameters Name="HostApplication"></Parameters>
+ <Parameters Name="Launcher"></Parameters>
+ <Parameters Name="UseLauncher">False</Parameters>
+ <Parameters Name="DebugCWD"></Parameters>
+ </Parameters>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">True</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">True</VersionInfo>
+ <VersionInfo Name="MajorVer">3</VersionInfo>
+ <VersionInfo Name="MinorVer">0</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">28</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1043</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName">Van de Sande Productions</VersionInfoKeys>
+ <VersionInfoKeys Name="FileDescription">VG - VPatch GUI</VersionInfoKeys>
+ <VersionInfoKeys Name="FileVersion">3.0.0.28</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName">VPatchGUI</VersionInfoKeys>
+ <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
+ <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename">VPatchGUI.exe</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductName">VPatch Graphical User Interface</VersionInfoKeys>
+ <VersionInfoKeys Name="ProductVersion">3.0</VersionInfoKeys>
+ <VersionInfoKeys Name="Comments">Official website: http://www.tibed.net/vpatch</VersionInfoKeys>
+ </VersionInfoKeys>
+ </Delphi.Personality>
+</BorlandProject>
diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.cfg b/Contrib/VPatch/Source/GUI/VPatchGUI.cfg
index bea780c..4a37710 100755
--- a/Contrib/VPatch/Source/GUI/VPatchGUI.cfg
+++ b/Contrib/VPatch/Source/GUI/VPatchGUI.cfg
@@ -1,39 +1,39 @@
--$A8
--$B-
--$C+
--$D+
--$E-
--$F-
--$G+
--$H+
--$I+
--$J-
--$K-
--$L+
--$M-
--$N+
--$O+
--$P+
--$Q-
--$R-
--$S-
--$T-
--$U-
--$V+
--$W-
--$X+
--$YD
--$Z1
--cg
--AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
--H+
--W+
--M
--$M16384,1048576
--K$00400000
--E"..\.."
--LE"K:\Documents and Settings\Koen van de Sande\My Documents\Borland Studio Projects\Bpl"
--LN"K:\Documents and Settings\Koen van de Sande\My Documents\Borland Studio Projects\Bpl"
--w-UNSAFE_TYPE
--w-UNSAFE_CODE
--w-UNSAFE_CAST
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-E"..\.."
+-LE"K:\Documents and Settings\Koen van de Sande\My Documents\Borland Studio Projects\Bpl"
+-LN"K:\Documents and Settings\Koen van de Sande\My Documents\Borland Studio Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/Contrib/VPatch/Source/GUI/VPatchGUI.dpr b/Contrib/VPatch/Source/GUI/VPatchGUI.dpr
index cf91a81..11ad0e9 100755
--- a/Contrib/VPatch/Source/GUI/VPatchGUI.dpr
+++ b/Contrib/VPatch/Source/GUI/VPatchGUI.dpr
@@ -1,19 +1,19 @@
-program VPatchGUI;
-
-uses
- Forms,
- MainForm in 'MainForm.pas' {frmMain},
- PatchClasses in 'PatchClasses.pas',
- DLLWrapper in 'DLLWrapper.pas',
- AboutForm in 'AboutForm.pas' {frmAbout},
- VDSP_CRC in 'vdsp_crc.pas',
- OSUtil in 'OSUtil.pas';
-
-{$R *.res}
-
-begin
- Application.Initialize;
- Application.Title := 'VPatch GUI';
- Application.CreateForm(TfrmMain, frmMain);
- Application.Run;
-end.
+program VPatchGUI;
+
+uses
+ Forms,
+ MainForm in 'MainForm.pas' {frmMain},
+ PatchClasses in 'PatchClasses.pas',
+ DLLWrapper in 'DLLWrapper.pas',
+ AboutForm in 'AboutForm.pas' {frmAbout},
+ VDSP_CRC in 'vdsp_crc.pas',
+ OSUtil in 'OSUtil.pas';
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'VPatch GUI';
+ Application.CreateForm(TfrmMain, frmMain);
+ Application.Run;
+end.
diff --git a/Contrib/VPatch/Source/GUI/clean.bat b/Contrib/VPatch/Source/GUI/clean.bat
index 2cfbee4..b7d06cf 100755
--- a/Contrib/VPatch/Source/GUI/clean.bat
+++ b/Contrib/VPatch/Source/GUI/clean.bat
@@ -1,5 +1,5 @@
-@echo off
-echo Cleaning up all non-source files
-del /S *.~*
-del /S *.dcu
+@echo off
+echo Cleaning up all non-source files
+del /S *.~*
+del /S *.dcu
echo done. \ No newline at end of file
diff --git a/Contrib/VPatch/Source/GUI/vdsp_crc.pas b/Contrib/VPatch/Source/GUI/vdsp_crc.pas
index 7a5ad9d..209b709 100755
--- a/Contrib/VPatch/Source/GUI/vdsp_crc.pas
+++ b/Contrib/VPatch/Source/GUI/vdsp_crc.pas
@@ -1,115 +1,115 @@
-unit VDSP_CRC;
-
-{
- VPatch 2 - CRC
- ==============
-
- (c) 2002-2003 Van de Sande Productions
-
- This unit can calculate the standard ZIP CRC32 for a filestream.
-
- What's new
- ----------
- 2.0 20030811 Koen Initial documentation
-}
-
-interface
-
-uses Classes;
-
-//var
-//this is the CRC32 table
-// CRCTable: Array[0..255] of LongWord;
- {= (
-//this table used to be inside the exe, but now it has been replaced by a calculation routine which saves 1 KB
-$0,$77073096,$EE0E612C,$990951BA,$76DC419,
-$706AF48F,$E963A535,$9E6495A3,$EDB8832,$79DCB8A4,
-$E0D5E91E,$97D2D988,$9B64C2B,$7EB17CBD,$E7B82D07,
-$90BF1D91,$1DB71064,$6AB020F2,$F3B97148,$84BE41DE,
-$1ADAD47D,$6DDDE4EB,$F4D4B551,$83D385C7,$136C9856,
-$646BA8C0,$FD62F97A,$8A65C9EC,$14015C4F,$63066CD9,
-$FA0F3D63,$8D080DF5,$3B6E20C8,$4C69105E,$D56041E4,
-$A2677172,$3C03E4D1,$4B04D447,$D20D85FD,$A50AB56B,
-$35B5A8FA,$42B2986C,$DBBBC9D6,$ACBCF940,$32D86CE3,
-$45DF5C75,$DCD60DCF,$ABD13D59,$26D930AC,$51DE003A,
-$C8D75180,$BFD06116,$21B4F4B5,$56B3C423,$CFBA9599,
-$B8BDA50F,$2802B89E,$5F058808,$C60CD9B2,$B10BE924,
-$2F6F7C87,$58684C11,$C1611DAB,$B6662D3D,$76DC4190,
-$1DB7106,$98D220BC,$EFD5102A,$71B18589,$6B6B51F,
-$9FBFE4A5,$E8B8D433,$7807C9A2,$F00F934,$9609A88E,
-$E10E9818,$7F6A0DBB,$86D3D2D,$91646C97,$E6635C01,
-$6B6B51F4,$1C6C6162,$856530D8,$F262004E,$6C0695ED,
-$1B01A57B,$8208F4C1,$F50FC457,$65B0D9C6,$12B7E950,
-$8BBEB8EA,$FCB9887C,$62DD1DDF,$15DA2D49,$8CD37CF3,
-$FBD44C65,$4DB26158,$3AB551CE,$A3BC0074,$D4BB30E2,
-$4ADFA541,$3DD895D7,$A4D1C46D,$D3D6F4FB,$4369E96A,
-$346ED9FC,$AD678846,$DA60B8D0,$44042D73,$33031DE5,
-$AA0A4C5F,$DD0D7CC9,$5005713C,$270241AA,$BE0B1010,
-$C90C2086,$5768B525,$206F85B3,$B966D409,$CE61E49F,
-$5EDEF90E,$29D9C998,$B0D09822,$C7D7A8B4,$59B33D17,
-$2EB40D81,$B7BD5C3B,$C0BA6CAD,$EDB88320,$9ABFB3B6,
-$3B6E20C,$74B1D29A,$EAD54739,$9DD277AF,$4DB2615,
-$73DC1683,$E3630B12,$94643B84,$D6D6A3E,$7A6A5AA8,
-$E40ECF0B,$9309FF9D,$A00AE27,$7D079EB1,$F00F9344,
-$8708A3D2,$1E01F268,$6906C2FE,$F762575D,$806567CB,
-$196C3671,$6E6B06E7,$FED41B76,$89D32BE0,$10DA7A5A,
-$67DD4ACC,$F9B9DF6F,$8EBEEFF9,$17B7BE43,$60B08ED5,
-$D6D6A3E8,$A1D1937E,$38D8C2C4,$4FDFF252,$D1BB67F1,
-$A6BC5767,$3FB506DD,$48B2364B,$D80D2BDA,$AF0A1B4C,
-$36034AF6,$41047A60,$DF60EFC3,$A867DF55,$316E8EEF,
-$4669BE79,$CB61B38C,$BC66831A,$256FD2A0,$5268E236,
-$CC0C7795,$BB0B4703,$220216B9,$5505262F,$C5BA3BBE,
-$B2BD0B28,$2BB45A92,$5CB36A04,$C2D7FFA7,$B5D0CF31,
-$2CD99E8B,$5BDEAE1D,$9B64C2B0,$EC63F226,$756AA39C,
-$26D930A,$9C0906A9,$EB0E363F,$72076785,$5005713,
-$95BF4A82,$E2B87A14,$7BB12BAE,$CB61B38,$92D28E9B,
-$E5D5BE0D,$7CDCEFB7,$BDBDF21,$86D3D2D4,$F1D4E242,
-$68DDB3F8,$1FDA836E,$81BE16CD,$F6B9265B,$6FB077E1,
-$18B74777,$88085AE6,$FF0F6A70,$66063BCA,$11010B5C,
-$8F659EFF,$F862AE69,$616BFFD3,$166CCF45,$A00AE278,
-$D70DD2EE,$4E048354,$3903B3C2,$A7672661,$D06016F7,
-$4969474D,$3E6E77DB,$AED16A4A,$D9D65ADC,$40DF0B66,
-$37D83BF0,$A9BCAE53,$DEBB9EC5,$47B2CF7F,$30B5FFE9,
-$BDBDF21C,$CABAC28A,$53B39330,$24B4A3A6,$BAD03605,
-$CDD70693,$54DE5729,$23D967BF,$B3667A2E,$C4614AB8,
-$5D681B02,$2A6F2B94,$B40BBE37,$C30C8EA1,$5A05DF1B,
-$2D02EF8D}
-
-function FileCRC(fs: TFileStream): Integer;
-
-implementation
-
-function FileCRC(fs: TFileStream): Integer;
-const
- CRCBlock = 4096;
-var
- CRCTable: Array[0..255] of LongWord;
- c: LongWord; //!!! this must be an unsigned 32-bits var!
- Block: Array[0..CRCBlock-1] of Byte;
- i,j,bytesread: Integer;
-begin
- //this used to be the InitCRC procedure
- For i:= 0 To 255 do begin
- c:= i;
- For j:= 0 To 7 do begin
- If (c And 1)=0 Then begin
- c:= (c div 2);
- end Else begin
- c:= (c div 2) Xor $EDB88320;
- End;
- end;
- CRCTable[i]:= c;
- end;
-// InitCRC procedure end;
- c:=$FFFFFFFF;
- fs.Seek(0,soFromBeginning);
- for i:=0 to (fs.Size div CRCBlock)+1 do begin
- bytesread:=fs.Read(Block,CRCBlock);
- for j:=0 to bytesread-1 do begin
- c:=CRCTable[(c and $FF) xor Block[j]] xor (((c and $FFFFFF00) div 256) and $FFFFFF);
- end;
- end;
- FileCRC:=c xor $FFFFFFFF;
-end;
-
-end.
+unit VDSP_CRC;
+
+{
+ VPatch 2 - CRC
+ ==============
+
+ (c) 2002-2003 Van de Sande Productions
+
+ This unit can calculate the standard ZIP CRC32 for a filestream.
+
+ What's new
+ ----------
+ 2.0 20030811 Koen Initial documentation
+}
+
+interface
+
+uses Classes;
+
+//var
+//this is the CRC32 table
+// CRCTable: Array[0..255] of LongWord;
+ {= (
+//this table used to be inside the exe, but now it has been replaced by a calculation routine which saves 1 KB
+$0,$77073096,$EE0E612C,$990951BA,$76DC419,
+$706AF48F,$E963A535,$9E6495A3,$EDB8832,$79DCB8A4,
+$E0D5E91E,$97D2D988,$9B64C2B,$7EB17CBD,$E7B82D07,
+$90BF1D91,$1DB71064,$6AB020F2,$F3B97148,$84BE41DE,
+$1ADAD47D,$6DDDE4EB,$F4D4B551,$83D385C7,$136C9856,
+$646BA8C0,$FD62F97A,$8A65C9EC,$14015C4F,$63066CD9,
+$FA0F3D63,$8D080DF5,$3B6E20C8,$4C69105E,$D56041E4,
+$A2677172,$3C03E4D1,$4B04D447,$D20D85FD,$A50AB56B,
+$35B5A8FA,$42B2986C,$DBBBC9D6,$ACBCF940,$32D86CE3,
+$45DF5C75,$DCD60DCF,$ABD13D59,$26D930AC,$51DE003A,
+$C8D75180,$BFD06116,$21B4F4B5,$56B3C423,$CFBA9599,
+$B8BDA50F,$2802B89E,$5F058808,$C60CD9B2,$B10BE924,
+$2F6F7C87,$58684C11,$C1611DAB,$B6662D3D,$76DC4190,
+$1DB7106,$98D220BC,$EFD5102A,$71B18589,$6B6B51F,
+$9FBFE4A5,$E8B8D433,$7807C9A2,$F00F934,$9609A88E,
+$E10E9818,$7F6A0DBB,$86D3D2D,$91646C97,$E6635C01,
+$6B6B51F4,$1C6C6162,$856530D8,$F262004E,$6C0695ED,
+$1B01A57B,$8208F4C1,$F50FC457,$65B0D9C6,$12B7E950,
+$8BBEB8EA,$FCB9887C,$62DD1DDF,$15DA2D49,$8CD37CF3,
+$FBD44C65,$4DB26158,$3AB551CE,$A3BC0074,$D4BB30E2,
+$4ADFA541,$3DD895D7,$A4D1C46D,$D3D6F4FB,$4369E96A,
+$346ED9FC,$AD678846,$DA60B8D0,$44042D73,$33031DE5,
+$AA0A4C5F,$DD0D7CC9,$5005713C,$270241AA,$BE0B1010,
+$C90C2086,$5768B525,$206F85B3,$B966D409,$CE61E49F,
+$5EDEF90E,$29D9C998,$B0D09822,$C7D7A8B4,$59B33D17,
+$2EB40D81,$B7BD5C3B,$C0BA6CAD,$EDB88320,$9ABFB3B6,
+$3B6E20C,$74B1D29A,$EAD54739,$9DD277AF,$4DB2615,
+$73DC1683,$E3630B12,$94643B84,$D6D6A3E,$7A6A5AA8,
+$E40ECF0B,$9309FF9D,$A00AE27,$7D079EB1,$F00F9344,
+$8708A3D2,$1E01F268,$6906C2FE,$F762575D,$806567CB,
+$196C3671,$6E6B06E7,$FED41B76,$89D32BE0,$10DA7A5A,
+$67DD4ACC,$F9B9DF6F,$8EBEEFF9,$17B7BE43,$60B08ED5,
+$D6D6A3E8,$A1D1937E,$38D8C2C4,$4FDFF252,$D1BB67F1,
+$A6BC5767,$3FB506DD,$48B2364B,$D80D2BDA,$AF0A1B4C,
+$36034AF6,$41047A60,$DF60EFC3,$A867DF55,$316E8EEF,
+$4669BE79,$CB61B38C,$BC66831A,$256FD2A0,$5268E236,
+$CC0C7795,$BB0B4703,$220216B9,$5505262F,$C5BA3BBE,
+$B2BD0B28,$2BB45A92,$5CB36A04,$C2D7FFA7,$B5D0CF31,
+$2CD99E8B,$5BDEAE1D,$9B64C2B0,$EC63F226,$756AA39C,
+$26D930A,$9C0906A9,$EB0E363F,$72076785,$5005713,
+$95BF4A82,$E2B87A14,$7BB12BAE,$CB61B38,$92D28E9B,
+$E5D5BE0D,$7CDCEFB7,$BDBDF21,$86D3D2D4,$F1D4E242,
+$68DDB3F8,$1FDA836E,$81BE16CD,$F6B9265B,$6FB077E1,
+$18B74777,$88085AE6,$FF0F6A70,$66063BCA,$11010B5C,
+$8F659EFF,$F862AE69,$616BFFD3,$166CCF45,$A00AE278,
+$D70DD2EE,$4E048354,$3903B3C2,$A7672661,$D06016F7,
+$4969474D,$3E6E77DB,$AED16A4A,$D9D65ADC,$40DF0B66,
+$37D83BF0,$A9BCAE53,$DEBB9EC5,$47B2CF7F,$30B5FFE9,
+$BDBDF21C,$CABAC28A,$53B39330,$24B4A3A6,$BAD03605,
+$CDD70693,$54DE5729,$23D967BF,$B3667A2E,$C4614AB8,
+$5D681B02,$2A6F2B94,$B40BBE37,$C30C8EA1,$5A05DF1B,
+$2D02EF8D}
+
+function FileCRC(fs: TFileStream): Integer;
+
+implementation
+
+function FileCRC(fs: TFileStream): Integer;
+const
+ CRCBlock = 4096;
+var
+ CRCTable: Array[0..255] of LongWord;
+ c: LongWord; //!!! this must be an unsigned 32-bits var!
+ Block: Array[0..CRCBlock-1] of Byte;
+ i,j,bytesread: Integer;
+begin
+ //this used to be the InitCRC procedure
+ For i:= 0 To 255 do begin
+ c:= i;
+ For j:= 0 To 7 do begin
+ If (c And 1)=0 Then begin
+ c:= (c div 2);
+ end Else begin
+ c:= (c div 2) Xor $EDB88320;
+ End;
+ end;
+ CRCTable[i]:= c;
+ end;
+// InitCRC procedure end;
+ c:=$FFFFFFFF;
+ fs.Seek(0,soFromBeginning);
+ for i:=0 to (fs.Size div CRCBlock)+1 do begin
+ bytesread:=fs.Read(Block,CRCBlock);
+ for j:=0 to bytesread-1 do begin
+ c:=CRCTable[(c and $FF) xor Block[j]] xor (((c and $FFFFFF00) div 256) and $FFFFFF);
+ end;
+ end;
+ FileCRC:=c xor $FFFFFFFF;
+end;
+
+end.
diff --git a/Contrib/VPatch/Source/GenPat/Checksums.cpp b/Contrib/VPatch/Source/GenPat/Checksums.cpp
index 03c190e..387e4b9 100755
--- a/Contrib/VPatch/Source/GenPat/Checksums.cpp
+++ b/Contrib/VPatch/Source/GenPat/Checksums.cpp
@@ -1,120 +1,120 @@
-//---------------------------------------------------------------------------
-// Checksums.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#include "Checksums.h"
-
-/* ------------------------ CRC32 checksum calculation ----------------- */
-
-uint32_t CRCTable[256];
-bool bInitCRC = false;
-
-void InitCRC() {
- int i, j; unsigned long c;
- for (c = i = 0; i < 256; c = ++i) {
- for (j = 0; j < 8; j++) {
- if (c & 1) c = (c>>1) ^ 0xEDB88320;
- else c >>= 1;
- }
- CRCTable[i] = c;
- }
- bInitCRC = true;
-}
-
-crc32_t streamCRC32(bistream& data) {
- if(!bInitCRC) InitCRC();
-
- const int CRCBLOCKSIZE = 16384;
-
- uint8_t block[CRCBLOCKSIZE];
- unsigned int read;
- uint8_t *p;
-
- crc32_t crc = 0xFFFFFFFF;
- while(data.good()) {
- data.read(reinterpret_cast<char*>(block), CRCBLOCKSIZE);
- read = data.gcount();
- for (p = block; p < block + read; p++)
- crc = CRCTable[(crc & 0xFF) ^ *p] ^ (crc >> 8);
- }
- crc = (crc ^ 0xFFFFFFFF);
- return crc;
-}
-
-/* ------------------------ MD5 checksum calculation ----------------- */
-
-void streamMD5(bistream& data, md5_byte_t digest[16]) {
- const int MD5BLOCKSIZE = 16384;
- uint8_t md5block[MD5BLOCKSIZE];
- unsigned int read;
-
- md5_state_t state;
-
- md5_init(&state);
-
- while(data.good()) {
- data.read(reinterpret_cast<char*>(md5block), MD5BLOCKSIZE);
- read = data.gcount();
- md5_append(&state, md5block, read);
- }
-
- md5_finish(&state, digest);
-}
-
-TChecksum::TChecksum(std::string& fileName) : mode(MD5) {
- bifstream data;
- data.open(fileName.c_str(), ios::binary | ios::in);
- data.seekg(0, ios::beg);
- crc = streamCRC32(data);
- data.close();
-
- bifstream data2;
- data2.open(fileName.c_str(), ios::binary | ios::in);
- data2.seekg(0, ios::beg);
- streamMD5(data2, digest);
- data2.close();
-}
-
-void TChecksum::loadMD5(md5_byte_t newdigest[16]) {
- mode = MD5;
- for(int i = 0; i < 16; i++) {
- digest[i] = newdigest[i];
- }
-}
-void TChecksum::loadCRC32(crc32_t newcrc) {
- mode = CRC32;
- crc = newcrc;
-}
-bool TChecksum::operator==(const TChecksum& b) {
- if(mode != b.mode) throw "Checksums in different mode: MD5/CRC32";
- if(mode == MD5) {
- for(int md5index = 0; md5index < 16; md5index++) {
- if(digest[md5index] != b.digest[md5index]) break;
- if(md5index == 15) return true;
- }
- return false;
- } else {
- return (crc == b.crc);
- }
-}
+//---------------------------------------------------------------------------
+// Checksums.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#include "Checksums.h"
+
+/* ------------------------ CRC32 checksum calculation ----------------- */
+
+uint32_t CRCTable[256];
+bool bInitCRC = false;
+
+void InitCRC() {
+ int i, j; unsigned long c;
+ for (c = i = 0; i < 256; c = ++i) {
+ for (j = 0; j < 8; j++) {
+ if (c & 1) c = (c>>1) ^ 0xEDB88320;
+ else c >>= 1;
+ }
+ CRCTable[i] = c;
+ }
+ bInitCRC = true;
+}
+
+crc32_t streamCRC32(bistream& data) {
+ if(!bInitCRC) InitCRC();
+
+ const int CRCBLOCKSIZE = 16384;
+
+ uint8_t block[CRCBLOCKSIZE];
+ unsigned int read;
+ uint8_t *p;
+
+ crc32_t crc = 0xFFFFFFFF;
+ while(data.good()) {
+ data.read(reinterpret_cast<char*>(block), CRCBLOCKSIZE);
+ read = data.gcount();
+ for (p = block; p < block + read; p++)
+ crc = CRCTable[(crc & 0xFF) ^ *p] ^ (crc >> 8);
+ }
+ crc = (crc ^ 0xFFFFFFFF);
+ return crc;
+}
+
+/* ------------------------ MD5 checksum calculation ----------------- */
+
+void streamMD5(bistream& data, md5_byte_t digest[16]) {
+ const int MD5BLOCKSIZE = 16384;
+ uint8_t md5block[MD5BLOCKSIZE];
+ unsigned int read;
+
+ md5_state_t state;
+
+ md5_init(&state);
+
+ while(data.good()) {
+ data.read(reinterpret_cast<char*>(md5block), MD5BLOCKSIZE);
+ read = data.gcount();
+ md5_append(&state, md5block, read);
+ }
+
+ md5_finish(&state, digest);
+}
+
+TChecksum::TChecksum(std::string& fileName) : mode(MD5) {
+ bifstream data;
+ data.open(fileName.c_str(), ios::binary | ios::in);
+ data.seekg(0, ios::beg);
+ crc = streamCRC32(data);
+ data.close();
+
+ bifstream data2;
+ data2.open(fileName.c_str(), ios::binary | ios::in);
+ data2.seekg(0, ios::beg);
+ streamMD5(data2, digest);
+ data2.close();
+}
+
+void TChecksum::loadMD5(md5_byte_t newdigest[16]) {
+ mode = MD5;
+ for(int i = 0; i < 16; i++) {
+ digest[i] = newdigest[i];
+ }
+}
+void TChecksum::loadCRC32(crc32_t newcrc) {
+ mode = CRC32;
+ crc = newcrc;
+}
+bool TChecksum::operator==(const TChecksum& b) {
+ if(mode != b.mode) throw "Checksums in different mode: MD5/CRC32";
+ if(mode == MD5) {
+ for(int md5index = 0; md5index < 16; md5index++) {
+ if(digest[md5index] != b.digest[md5index]) break;
+ if(md5index == 15) return true;
+ }
+ return false;
+ } else {
+ return (crc == b.crc);
+ }
+}
diff --git a/Contrib/VPatch/Source/GenPat/Checksums.h b/Contrib/VPatch/Source/GenPat/Checksums.h
index e2cf265..d019639 100755
--- a/Contrib/VPatch/Source/GenPat/Checksums.h
+++ b/Contrib/VPatch/Source/GenPat/Checksums.h
@@ -1,50 +1,50 @@
-//---------------------------------------------------------------------------
-// Checksums.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#if !defined(Checksums_H)
- #define Checksums_H
-
- #include "md5.h"
- #include <string>
- #include "GlobalTypes.h"
-
- typedef uint32_t crc32_t;
-
- class TChecksum {
- public:
- md5_byte_t digest[16];
- crc32_t crc;
- enum { CRC32, MD5 } mode;
-
- TChecksum() : mode(MD5) { }
- TChecksum(std::string& fileName);
-
- void loadMD5(md5_byte_t newdigest[16]);
- void loadCRC32(crc32_t newcrc);
-
- bool operator==(const TChecksum& b);
- };
-
-#endif // Checksums_H
+//---------------------------------------------------------------------------
+// Checksums.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#if !defined(Checksums_H)
+ #define Checksums_H
+
+ #include "md5.h"
+ #include <string>
+ #include "GlobalTypes.h"
+
+ typedef uint32_t crc32_t;
+
+ class TChecksum {
+ public:
+ md5_byte_t digest[16];
+ crc32_t crc;
+ enum { CRC32, MD5 } mode;
+
+ TChecksum() : mode(MD5) { }
+ TChecksum(std::string& fileName);
+
+ void loadMD5(md5_byte_t newdigest[16]);
+ void loadCRC32(crc32_t newcrc);
+
+ bool operator==(const TChecksum& b);
+ };
+
+#endif // Checksums_H
diff --git a/Contrib/VPatch/Source/GenPat/ChunkedFile.cpp b/Contrib/VPatch/Source/GenPat/ChunkedFile.cpp
index 3151e17..29f9916 100755
--- a/Contrib/VPatch/Source/GenPat/ChunkedFile.cpp
+++ b/Contrib/VPatch/Source/GenPat/ChunkedFile.cpp
@@ -1,95 +1,95 @@
-//---------------------------------------------------------------------------
-// ChunkedFile.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-
-#include "ChunkedFile.h"
-
-using namespace std;
-
- ChunkedFile::ChunkedFile(bistream& f, TFileOffset fSize, TFileOffset chunkSize) :
- chunks(NULL) {
-
- chunkCount = fSize / chunkSize;
- cout << "[ChunkedFile] Filesize of " << static_cast<unsigned int>(fSize) << " gives " << static_cast<unsigned int>(chunkCount) << " chunks.\n";
-
- cout << "[ChunkedFile] Memory to be used by those chunks: " << sizeof(FileChunk) * chunkCount << " bytes...";
- if(chunkCount == 0) {
- chunks = NULL;
- return;
- }
- chunks = new FileChunk[chunkCount];
- cout << " allocated.\n";
-
- unsigned char* data = new unsigned char[chunkSize];
- for(TFileOffset i = 0; i < chunkCount; i++) {
- f.read(reinterpret_cast<char*>(data),chunkSize);
- chunks[i].offset = i * chunkSize;
- calculateChecksum(data,chunkSize,chunks[i].checksum);
- }
- delete[] data;
-
- cout << "[ChunkedFile] Sorting chunks... ";
- std::sort(chunks,chunks + chunkCount);
- cout << "done.\n";
- }
-
-
-bool ChunkedFile::search(TChunkChecksum key, TFileOffset* start) {
- // function:
- // Searches sortedArray[first]..sortedArray[last] for key.
- // returns: index of the matching element if it finds key,
- // otherwise -(index where it could be inserted)-1.
- // parameters:
- // sortedArray in array of sorted (ascending) values.
- // first, last in lower and upper subscript bounds
- // key in value to search for.
- // returns:
- // index of key, or -insertion_position -1 if key is not
- // in the array. This value can easily be
- // transformed into the position to insert it.
- if(chunkCount == 0) return false;
- int first = 0;
- int last = chunkCount - 1;
- while (first <= last) {
- int mid = (first + last) / 2; // compute mid point.
- if(key == chunks[mid].checksum) {
- while(true) {
- if(mid == 0) break;
- mid--;
- if(!(key == chunks[mid].checksum)) {
- mid++;
- break;
- }
- }
- *start = mid;
- return true; // found it. return position
- }
- if (key < chunks[mid].checksum)
- last = mid - 1; // repeat search in bottom half.
- else
- first = mid + 1; // repeat search in top half.
- }
- return false; // failed to find key
-}
+//---------------------------------------------------------------------------
+// ChunkedFile.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+
+#include "ChunkedFile.h"
+
+using namespace std;
+
+ ChunkedFile::ChunkedFile(bistream& f, TFileOffset fSize, TFileOffset chunkSize) :
+ chunks(NULL) {
+
+ chunkCount = fSize / chunkSize;
+ cout << "[ChunkedFile] Filesize of " << static_cast<unsigned int>(fSize) << " gives " << static_cast<unsigned int>(chunkCount) << " chunks.\n";
+
+ cout << "[ChunkedFile] Memory to be used by those chunks: " << sizeof(FileChunk) * chunkCount << " bytes...";
+ if(chunkCount == 0) {
+ chunks = NULL;
+ return;
+ }
+ chunks = new FileChunk[chunkCount];
+ cout << " allocated.\n";
+
+ unsigned char* data = new unsigned char[chunkSize];
+ for(TFileOffset i = 0; i < chunkCount; i++) {
+ f.read(reinterpret_cast<char*>(data),chunkSize);
+ chunks[i].offset = i * chunkSize;
+ calculateChecksum(data,chunkSize,chunks[i].checksum);
+ }
+ delete[] data;
+
+ cout << "[ChunkedFile] Sorting chunks... ";
+ std::sort(chunks,chunks + chunkCount);
+ cout << "done.\n";
+ }
+
+
+bool ChunkedFile::search(TChunkChecksum key, TFileOffset* start) {
+ // function:
+ // Searches sortedArray[first]..sortedArray[last] for key.
+ // returns: index of the matching element if it finds key,
+ // otherwise -(index where it could be inserted)-1.
+ // parameters:
+ // sortedArray in array of sorted (ascending) values.
+ // first, last in lower and upper subscript bounds
+ // key in value to search for.
+ // returns:
+ // index of key, or -insertion_position -1 if key is not
+ // in the array. This value can easily be
+ // transformed into the position to insert it.
+ if(chunkCount == 0) return false;
+ int first = 0;
+ int last = chunkCount - 1;
+ while (first <= last) {
+ int mid = (first + last) / 2; // compute mid point.
+ if(key == chunks[mid].checksum) {
+ while(true) {
+ if(mid == 0) break;
+ mid--;
+ if(!(key == chunks[mid].checksum)) {
+ mid++;
+ break;
+ }
+ }
+ *start = mid;
+ return true; // found it. return position
+ }
+ if (key < chunks[mid].checksum)
+ last = mid - 1; // repeat search in bottom half.
+ else
+ first = mid + 1; // repeat search in top half.
+ }
+ return false; // failed to find key
+}
diff --git a/Contrib/VPatch/Source/GenPat/ChunkedFile.h b/Contrib/VPatch/Source/GenPat/ChunkedFile.h
index ccb60a4..4c617fc 100755
--- a/Contrib/VPatch/Source/GenPat/ChunkedFile.h
+++ b/Contrib/VPatch/Source/GenPat/ChunkedFile.h
@@ -1,77 +1,77 @@
-//---------------------------------------------------------------------------
-// ChunkedFile.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#if !defined(ChunkedFile_H)
- #define ChunkedFile_H
-
- #include "GlobalTypes.h"
- #include "adler32.h"
- #include <iostream>
- #include <algorithm>
-
- // private data type: the data tree information
- typedef struct TChunkChecksum {
- Checksum::uLong adler32;
- CHECKSUM_BLOCK v;
- } TChunkChecksum;
-
- inline bool operator<(const TChunkChecksum& a, const TChunkChecksum& b) {
- return (a.adler32 < b.adler32) ? true : (
- (a.adler32 == b.adler32) ? (a.v < b.v) : false
- );
- }
- inline bool operator==(const TChunkChecksum& a, const TChunkChecksum& b) {
- return (a.v == b.v) && (a.adler32 == b.adler32);
- }
-
- typedef struct FileChunk {
- TFileOffset offset;
- TChunkChecksum checksum;
- } FileChunk;
-
- inline bool operator<(const FileChunk& a, const FileChunk& b) {
- return a.checksum < b.checksum;
- }
-
- class ChunkedFile {
- public:
- TFileOffset chunkCount;
- FileChunk* chunks;
-
- ChunkedFile(bistream& f, TFileOffset fSize, TFileOffset chunkSize);
-
- ~ChunkedFile() {
- if(chunks != NULL) delete[] chunks;
- }
-
- bool search(TChunkChecksum key, TFileOffset* start);
-
- inline void calculateChecksum(unsigned char* data, TFileOffset size, TChunkChecksum& K) {
- K.v = *reinterpret_cast<CHECKSUM_BLOCK*>(data);
- K.adler32 = Checksum::adler32(1L,data,size);
- }
- };
-
-#endif // ChunkedFile_H
+//---------------------------------------------------------------------------
+// ChunkedFile.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#if !defined(ChunkedFile_H)
+ #define ChunkedFile_H
+
+ #include "GlobalTypes.h"
+ #include "adler32.h"
+ #include <iostream>
+ #include <algorithm>
+
+ // private data type: the data tree information
+ typedef struct TChunkChecksum {
+ Checksum::uLong adler32;
+ CHECKSUM_BLOCK v;
+ } TChunkChecksum;
+
+ inline bool operator<(const TChunkChecksum& a, const TChunkChecksum& b) {
+ return (a.adler32 < b.adler32) ? true : (
+ (a.adler32 == b.adler32) ? (a.v < b.v) : false
+ );
+ }
+ inline bool operator==(const TChunkChecksum& a, const TChunkChecksum& b) {
+ return (a.v == b.v) && (a.adler32 == b.adler32);
+ }
+
+ typedef struct FileChunk {
+ TFileOffset offset;
+ TChunkChecksum checksum;
+ } FileChunk;
+
+ inline bool operator<(const FileChunk& a, const FileChunk& b) {
+ return a.checksum < b.checksum;
+ }
+
+ class ChunkedFile {
+ public:
+ TFileOffset chunkCount;
+ FileChunk* chunks;
+
+ ChunkedFile(bistream& f, TFileOffset fSize, TFileOffset chunkSize);
+
+ ~ChunkedFile() {
+ if(chunks != NULL) delete[] chunks;
+ }
+
+ bool search(TChunkChecksum key, TFileOffset* start);
+
+ inline void calculateChecksum(unsigned char* data, TFileOffset size, TChunkChecksum& K) {
+ K.v = *reinterpret_cast<CHECKSUM_BLOCK*>(data);
+ K.adler32 = Checksum::adler32(1L,data,size);
+ }
+ };
+
+#endif // ChunkedFile_H
diff --git a/Contrib/VPatch/Source/GenPat/FileFormat1.cpp b/Contrib/VPatch/Source/GenPat/FileFormat1.cpp
index 05795c9..8e85b7b 100755
--- a/Contrib/VPatch/Source/GenPat/FileFormat1.cpp
+++ b/Contrib/VPatch/Source/GenPat/FileFormat1.cpp
@@ -1,243 +1,243 @@
-//---------------------------------------------------------------------------
-// FileFormat1.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#include "FileFormat1.h"
-#include "GlobalTypes.h"
-
-#define MAGIC_VPAT 0x54415056
-
-namespace FileFormat1 {
- void writeByte(bostream& patch, TFileOffset dw) {
- unsigned char b = dw & 0xFF;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- }
- void writeWord(bostream& patch, TFileOffset dw) {
- unsigned char b = dw & 0xFF;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- b = (dw & 0xFF00) >> 8;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- }
- void writeDword(bostream& patch, TFileOffset dw) {
- unsigned char b = dw & 0xFF;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- b = (dw & 0xFF00) >> 8;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- b = (dw & 0xFF0000) >> 16;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- b = (dw & 0xFF000000) >> 24;
- patch.write(reinterpret_cast<char*>(&b),sizeof(b));
- }
-
- void writeMD5(bostream& patch, md5_byte_t digest[16]) {
- for(int i = 0; i < 16; i++) {
- writeByte(patch, digest[i]);
- }
- }
-
- TFileOffset readDword(bistream& patch) {
- unsigned char b;
- patch.read(reinterpret_cast<char*>(&b),sizeof(b));
- TFileOffset dw = b;
- patch.read(reinterpret_cast<char*>(&b),sizeof(b));
- dw = dw | (b << 8);
- patch.read(reinterpret_cast<char*>(&b),sizeof(b));
- dw = dw | (b << 16);
- patch.read(reinterpret_cast<char*>(&b),sizeof(b));
- dw = dw | (b << 24);
- return dw;
- }
-
- void readMD5(bistream& patch, md5_byte_t digest[16]) {
- unsigned char b;
- for(int i = 0; i < 16; i++) {
- patch.read(reinterpret_cast<char*>(&b),sizeof(b));
- digest[i] = b;
- }
- }
-
- void writeFileCount(bostream& f, TFileOffset currentCount) {
- f.seekp(4,ios::beg);
- writeDword(f,currentCount);
- }
-
- TFileOffset removeExistingPatch(bistream& in, TFileOffset inSize, bostream& out, TChecksum* removeCRC, bool existanceIsError) {
- TFileOffset fileCount = 0x80000000; // MD5 mode
- if(in.bad() || in.eof() || (inSize == 0)) { // empty file/does not yet exist
- writeDword(out,MAGIC_VPAT);
- writeDword(out,fileCount); // noFiles
- return fileCount;
- }
- // copy and do stuff
- if(readDword(in) != MAGIC_VPAT) {
- writeDword(out,MAGIC_VPAT);
- writeDword(out,fileCount); // noFiles
- return fileCount;
- }
- fileCount = readDword(in);
- writeDword(out,MAGIC_VPAT);
- writeDword(out,fileCount); // noFiles
- bool MD5Mode = (fileCount & 0x80000000) != 0;
-
- if(MD5Mode) removeCRC->mode = TChecksum::MD5;
- if(!MD5Mode) removeCRC->mode = TChecksum::CRC32;
-
- // top byte is reserved for extensions
- fileCount = fileCount & 0x00FFFFFF;
-
- TFileOffset tempCount = fileCount;
- for(TFileOffset i = 0; i < tempCount; i++) {
- TFileOffset startOffset = in.tellg();
- readDword(in); // noBlocks
- TChecksum sourceChecksum;
- if(!MD5Mode) {
- crc32_t sourceCRC = readDword(in); // SourceCRC
- readDword(in); // TargetCRC
- sourceChecksum.loadCRC32(sourceCRC);
- } else {
- md5_byte_t digest[16];
- readMD5(in, digest); // SourceCRC
- sourceChecksum.loadMD5(digest);
- readMD5(in, digest); // TargetCRC
- }
- TFileOffset bodySize = readDword(in); // bodySize
- in.seekg(bodySize,ios::cur);
- TFileOffset endOffset = in.tellg();
- if(sourceChecksum == *removeCRC) {
- if(existanceIsError) {
- throw "Source file with the exact same contents already exists in patch!\nUse /R option (replace) to replace it with this patch!";
- }
- fileCount--;
- } else {
- // copy this patch to out
- in.seekg(startOffset,ios::beg);
- TFileOffset size = endOffset-startOffset;
- char* buffer = new char[size];
- in.read(buffer,size);
- out.write(buffer,size);
- delete[] buffer;
- }
- }
- TFileOffset curPos = out.tellp();
- if(MD5Mode) fileCount = fileCount | 0x80000000;
- writeFileCount(out,fileCount);
- out.seekp(curPos,ios::beg);
- return fileCount;
- }
-
- void writePatch(bostream& patch, bistream& target, vector<SameBlock*>& sameBlocks, TChecksum* sourceCRC, TChecksum* targetCRC, TFileOffset currentFileCount, POSIX::ALT_FILETIME targetTime) {
- TFileOffset bodySize = 0;
- TFileOffset noBlocks = 0;
- TFileOffset noBlocksOffset = patch.tellp();
- writeDword(patch,noBlocks);
- if(sourceCRC->mode == TChecksum::MD5) {
- writeMD5(patch,sourceCRC->digest); // sourceCRC
- writeMD5(patch,targetCRC->digest); // targetCRC
- } else {
- writeDword(patch,sourceCRC->crc); // sourceCRC
- writeDword(patch,targetCRC->crc); // targetCRC
- }
- TFileOffset bodySizeOffset = patch.tellp();
- writeDword(patch,bodySize);
-
- for(vector<SameBlock*>::iterator iter = sameBlocks.begin(); iter != sameBlocks.end(); iter++) {
- SameBlock* current = *iter;
-
- // store current block
- if(current->size > 0) {
- // copy block from sourceFile
- if(current->size < 256) {
- writeByte(patch,1);
- writeByte(patch,current->size);
- bodySize += 2;
- } else if(current->size < 65536) {
- writeByte(patch,2);
- writeWord(patch,current->size);
- bodySize += 3;
- } else {
- writeByte(patch,3);
- writeDword(patch,current->size);
- bodySize += 5;
- }
- writeDword(patch,current->sourceOffset);
- bodySize += 4;
- noBlocks++;
- }
- iter++;
- if(iter == sameBlocks.end()) break;
- SameBlock* next = *iter;
- iter--;
-
- // calculate area inbetween this block and the next
- TFileOffset notFoundStart = current->targetOffset+current->size;
- if(notFoundStart > next->targetOffset) {
- throw "makeBinaryPatch input problem: there was overlap";
- }
- TFileOffset notFoundSize = next->targetOffset - notFoundStart;
- if(notFoundSize > 0) {
- // we need to include this area in the patch directly
- if(notFoundSize < 256) {
- writeByte(patch,5);
- writeByte(patch,notFoundSize);
- bodySize += 2;
- } else if(notFoundSize < 65536) {
- writeByte(patch,6);
- writeWord(patch,notFoundSize);
- bodySize += 3;
- } else {
- writeByte(patch,7);
- writeDword(patch,notFoundSize);
- bodySize += 5;
- }
- // copy from target...
- target.seekg(notFoundStart,ios::beg);
-#define COPY_BUF_SIZE 4096
- char copyBuffer[COPY_BUF_SIZE];
- for(TFileOffset i = 0; i < notFoundSize; i += COPY_BUF_SIZE) {
- TFileOffset j = notFoundSize - i;
- if(j > COPY_BUF_SIZE) j = COPY_BUF_SIZE;
- target.read(copyBuffer,j);
- patch.write(copyBuffer,j);
- }
- bodySize += notFoundSize;
- noBlocks++;
- }
- }
- // we are done, now add just one extra block with the target file time
- writeByte(patch,255);
- writeDword(patch,targetTime.dwLowDateTime);
- writeDword(patch,targetTime.dwHighDateTime);
- noBlocks++;
- bodySize += 9;
-
- TFileOffset curPos = patch.tellp();
- patch.seekp(noBlocksOffset,ios::beg);
- writeDword(patch,noBlocks);
- patch.seekp(bodySizeOffset,ios::beg);
- writeDword(patch,bodySize);
- // do this at the end because it messes up file position
- writeFileCount(patch,++currentFileCount);
- patch.seekp(curPos,ios::beg);
- }
-}
+//---------------------------------------------------------------------------
+// FileFormat1.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#include "FileFormat1.h"
+#include "GlobalTypes.h"
+
+#define MAGIC_VPAT 0x54415056
+
+namespace FileFormat1 {
+ void writeByte(bostream& patch, TFileOffset dw) {
+ unsigned char b = dw & 0xFF;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ }
+ void writeWord(bostream& patch, TFileOffset dw) {
+ unsigned char b = dw & 0xFF;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ b = (dw & 0xFF00) >> 8;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ }
+ void writeDword(bostream& patch, TFileOffset dw) {
+ unsigned char b = dw & 0xFF;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ b = (dw & 0xFF00) >> 8;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ b = (dw & 0xFF0000) >> 16;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ b = (dw & 0xFF000000) >> 24;
+ patch.write(reinterpret_cast<char*>(&b),sizeof(b));
+ }
+
+ void writeMD5(bostream& patch, md5_byte_t digest[16]) {
+ for(int i = 0; i < 16; i++) {
+ writeByte(patch, digest[i]);
+ }
+ }
+
+ TFileOffset readDword(bistream& patch) {
+ unsigned char b;
+ patch.read(reinterpret_cast<char*>(&b),sizeof(b));
+ TFileOffset dw = b;
+ patch.read(reinterpret_cast<char*>(&b),sizeof(b));
+ dw = dw | (b << 8);
+ patch.read(reinterpret_cast<char*>(&b),sizeof(b));
+ dw = dw | (b << 16);
+ patch.read(reinterpret_cast<char*>(&b),sizeof(b));
+ dw = dw | (b << 24);
+ return dw;
+ }
+
+ void readMD5(bistream& patch, md5_byte_t digest[16]) {
+ unsigned char b;
+ for(int i = 0; i < 16; i++) {
+ patch.read(reinterpret_cast<char*>(&b),sizeof(b));
+ digest[i] = b;
+ }
+ }
+
+ void writeFileCount(bostream& f, TFileOffset currentCount) {
+ f.seekp(4,ios::beg);
+ writeDword(f,currentCount);
+ }
+
+ TFileOffset removeExistingPatch(bistream& in, TFileOffset inSize, bostream& out, TChecksum* removeCRC, bool existanceIsError) {
+ TFileOffset fileCount = 0x80000000; // MD5 mode
+ if(in.bad() || in.eof() || (inSize == 0)) { // empty file/does not yet exist
+ writeDword(out,MAGIC_VPAT);
+ writeDword(out,fileCount); // noFiles
+ return fileCount;
+ }
+ // copy and do stuff
+ if(readDword(in) != MAGIC_VPAT) {
+ writeDword(out,MAGIC_VPAT);
+ writeDword(out,fileCount); // noFiles
+ return fileCount;
+ }
+ fileCount = readDword(in);
+ writeDword(out,MAGIC_VPAT);
+ writeDword(out,fileCount); // noFiles
+ bool MD5Mode = (fileCount & 0x80000000) != 0;
+
+ if(MD5Mode) removeCRC->mode = TChecksum::MD5;
+ if(!MD5Mode) removeCRC->mode = TChecksum::CRC32;
+
+ // top byte is reserved for extensions
+ fileCount = fileCount & 0x00FFFFFF;
+
+ TFileOffset tempCount = fileCount;
+ for(TFileOffset i = 0; i < tempCount; i++) {
+ TFileOffset startOffset = in.tellg();
+ readDword(in); // noBlocks
+ TChecksum sourceChecksum;
+ if(!MD5Mode) {
+ crc32_t sourceCRC = readDword(in); // SourceCRC
+ readDword(in); // TargetCRC
+ sourceChecksum.loadCRC32(sourceCRC);
+ } else {
+ md5_byte_t digest[16];
+ readMD5(in, digest); // SourceCRC
+ sourceChecksum.loadMD5(digest);
+ readMD5(in, digest); // TargetCRC
+ }
+ TFileOffset bodySize = readDword(in); // bodySize
+ in.seekg(bodySize,ios::cur);
+ TFileOffset endOffset = in.tellg();
+ if(sourceChecksum == *removeCRC) {
+ if(existanceIsError) {
+ throw "Source file with the exact same contents already exists in patch!\nUse /R option (replace) to replace it with this patch!";
+ }
+ fileCount--;
+ } else {
+ // copy this patch to out
+ in.seekg(startOffset,ios::beg);
+ TFileOffset size = endOffset-startOffset;
+ char* buffer = new char[size];
+ in.read(buffer,size);
+ out.write(buffer,size);
+ delete[] buffer;
+ }
+ }
+ TFileOffset curPos = out.tellp();
+ if(MD5Mode) fileCount = fileCount | 0x80000000;
+ writeFileCount(out,fileCount);
+ out.seekp(curPos,ios::beg);
+ return fileCount;
+ }
+
+ void writePatch(bostream& patch, bistream& target, vector<SameBlock*>& sameBlocks, TChecksum* sourceCRC, TChecksum* targetCRC, TFileOffset currentFileCount, POSIX::ALT_FILETIME targetTime) {
+ TFileOffset bodySize = 0;
+ TFileOffset noBlocks = 0;
+ TFileOffset noBlocksOffset = patch.tellp();
+ writeDword(patch,noBlocks);
+ if(sourceCRC->mode == TChecksum::MD5) {
+ writeMD5(patch,sourceCRC->digest); // sourceCRC
+ writeMD5(patch,targetCRC->digest); // targetCRC
+ } else {
+ writeDword(patch,sourceCRC->crc); // sourceCRC
+ writeDword(patch,targetCRC->crc); // targetCRC
+ }
+ TFileOffset bodySizeOffset = patch.tellp();
+ writeDword(patch,bodySize);
+
+ for(vector<SameBlock*>::iterator iter = sameBlocks.begin(); iter != sameBlocks.end(); iter++) {
+ SameBlock* current = *iter;
+
+ // store current block
+ if(current->size > 0) {
+ // copy block from sourceFile
+ if(current->size < 256) {
+ writeByte(patch,1);
+ writeByte(patch,current->size);
+ bodySize += 2;
+ } else if(current->size < 65536) {
+ writeByte(patch,2);
+ writeWord(patch,current->size);
+ bodySize += 3;
+ } else {
+ writeByte(patch,3);
+ writeDword(patch,current->size);
+ bodySize += 5;
+ }
+ writeDword(patch,current->sourceOffset);
+ bodySize += 4;
+ noBlocks++;
+ }
+ iter++;
+ if(iter == sameBlocks.end()) break;
+ SameBlock* next = *iter;
+ iter--;
+
+ // calculate area inbetween this block and the next
+ TFileOffset notFoundStart = current->targetOffset+current->size;
+ if(notFoundStart > next->targetOffset) {
+ throw "makeBinaryPatch input problem: there was overlap";
+ }
+ TFileOffset notFoundSize = next->targetOffset - notFoundStart;
+ if(notFoundSize > 0) {
+ // we need to include this area in the patch directly
+ if(notFoundSize < 256) {
+ writeByte(patch,5);
+ writeByte(patch,notFoundSize);
+ bodySize += 2;
+ } else if(notFoundSize < 65536) {
+ writeByte(patch,6);
+ writeWord(patch,notFoundSize);
+ bodySize += 3;
+ } else {
+ writeByte(patch,7);
+ writeDword(patch,notFoundSize);
+ bodySize += 5;
+ }
+ // copy from target...
+ target.seekg(notFoundStart,ios::beg);
+#define COPY_BUF_SIZE 4096
+ char copyBuffer[COPY_BUF_SIZE];
+ for(TFileOffset i = 0; i < notFoundSize; i += COPY_BUF_SIZE) {
+ TFileOffset j = notFoundSize - i;
+ if(j > COPY_BUF_SIZE) j = COPY_BUF_SIZE;
+ target.read(copyBuffer,j);
+ patch.write(copyBuffer,j);
+ }
+ bodySize += notFoundSize;
+ noBlocks++;
+ }
+ }
+ // we are done, now add just one extra block with the target file time
+ writeByte(patch,255);
+ writeDword(patch,targetTime.dwLowDateTime);
+ writeDword(patch,targetTime.dwHighDateTime);
+ noBlocks++;
+ bodySize += 9;
+
+ TFileOffset curPos = patch.tellp();
+ patch.seekp(noBlocksOffset,ios::beg);
+ writeDword(patch,noBlocks);
+ patch.seekp(bodySizeOffset,ios::beg);
+ writeDword(patch,bodySize);
+ // do this at the end because it messes up file position
+ writeFileCount(patch,++currentFileCount);
+ patch.seekp(curPos,ios::beg);
+ }
+}
diff --git a/Contrib/VPatch/Source/GenPat/FileFormat1.h b/Contrib/VPatch/Source/GenPat/FileFormat1.h
index 0045c83..b8d791f 100755
--- a/Contrib/VPatch/Source/GenPat/FileFormat1.h
+++ b/Contrib/VPatch/Source/GenPat/FileFormat1.h
@@ -1,41 +1,41 @@
-//---------------------------------------------------------------------------
-// FileFormat1
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#if !defined(FileFormat1_H)
- #define FileFormat1_H
- #include <iostream>
- #include <vector>
- #include "Checksums.h"
- #include "PatchGenerator.h"
- #include "POSIXUtil.h"
-
- using namespace std;
-
- namespace FileFormat1 {
- TFileOffset removeExistingPatch(bistream& in, TFileOffset inSize, bostream& out, TChecksum* removeCRC, bool existanceIsError);
- void writePatch(bostream& patch, bistream& target, vector<SameBlock*>& sameBlocks, TChecksum* sourceCRC, TChecksum* targetCRC, TFileOffset currentFileCount, POSIX::ALT_FILETIME targetTime);
- }
-
-#endif // FileFormat1_H
+//---------------------------------------------------------------------------
+// FileFormat1
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#if !defined(FileFormat1_H)
+ #define FileFormat1_H
+ #include <iostream>
+ #include <vector>
+ #include "Checksums.h"
+ #include "PatchGenerator.h"
+ #include "POSIXUtil.h"
+
+ using namespace std;
+
+ namespace FileFormat1 {
+ TFileOffset removeExistingPatch(bistream& in, TFileOffset inSize, bostream& out, TChecksum* removeCRC, bool existanceIsError);
+ void writePatch(bostream& patch, bistream& target, vector<SameBlock*>& sameBlocks, TChecksum* sourceCRC, TChecksum* targetCRC, TFileOffset currentFileCount, POSIX::ALT_FILETIME targetTime);
+ }
+
+#endif // FileFormat1_H
diff --git a/Contrib/VPatch/Source/GenPat/GlobalTypes.cpp b/Contrib/VPatch/Source/GenPat/GlobalTypes.cpp
index 8ff1250..99e1b77 100755
--- a/Contrib/VPatch/Source/GenPat/GlobalTypes.cpp
+++ b/Contrib/VPatch/Source/GenPat/GlobalTypes.cpp
@@ -1,28 +1,28 @@
-//---------------------------------------------------------------------------
-// GlobalTypes.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-
-#include "GlobalTypes.h"
-
+//---------------------------------------------------------------------------
+// GlobalTypes.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+
+#include "GlobalTypes.h"
+
diff --git a/Contrib/VPatch/Source/GenPat/GlobalTypes.h b/Contrib/VPatch/Source/GenPat/GlobalTypes.h
index a070788..aafb1c5 100755
--- a/Contrib/VPatch/Source/GenPat/GlobalTypes.h
+++ b/Contrib/VPatch/Source/GenPat/GlobalTypes.h
@@ -1,54 +1,54 @@
-//---------------------------------------------------------------------------
-// GlobalTypes.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#if !defined(GlobalTypes_H)
- #define GlobalTypes_H
-
- #ifndef _MSC_VER
- #include <stdint.h>
- #endif
- #include <iostream>
- #include <fstream>
- #include <ios>
- #include <string>
-
- using namespace std;
-
- #ifdef _MSC_VER
- typedef unsigned char uint8_t;
- typedef unsigned __int32 uint32_t;
- typedef unsigned __int64 uint64_t;
- #define CHECKSUM_BLOCK unsigned __int64
- #define __WIN32__
- #else
- #define CHECKSUM_BLOCK unsigned long long
- #endif
-
- typedef uint32_t TFileOffset;
- typedef ifstream bifstream;
- typedef istream bistream;
- typedef ofstream bofstream;
- typedef ostream bostream;
-#endif // GlobalTypes_H
+//---------------------------------------------------------------------------
+// GlobalTypes.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#if !defined(GlobalTypes_H)
+ #define GlobalTypes_H
+
+ #ifndef _MSC_VER
+ #include <stdint.h>
+ #endif
+ #include <iostream>
+ #include <fstream>
+ #include <ios>
+ #include <string>
+
+ using namespace std;
+
+ #ifdef _MSC_VER
+ typedef unsigned char uint8_t;
+ typedef unsigned __int32 uint32_t;
+ typedef unsigned __int64 uint64_t;
+ #define CHECKSUM_BLOCK unsigned __int64
+ #define __WIN32__
+ #else
+ #define CHECKSUM_BLOCK unsigned long long
+ #endif
+
+ typedef uint32_t TFileOffset;
+ typedef ifstream bifstream;
+ typedef istream bistream;
+ typedef ofstream bofstream;
+ typedef ostream bostream;
+#endif // GlobalTypes_H
diff --git a/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp b/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp
index 408a671..111a87e 100755
--- a/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp
+++ b/Contrib/VPatch/Source/GenPat/POSIXUtil.cpp
@@ -1,130 +1,130 @@
-//---------------------------------------------------------------------------
-// POSIXUtil.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-
-#include "POSIXUtil.h"
-#include <iostream>
-#include <fstream>
-
-#include <time.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* My Borland/VC++ compiler do not have this file */
-#if !defined(__BORLANDC__) && !defined(_MSC_VER)
- #include <unistd.h>
-#endif
-
-#ifdef __WIN32__ /* The Windows way of getting a temp file needs windows.h*/
- #include <windows.h>
-#endif
-
-using namespace std;
-
-namespace POSIX {
-
- void TimeT_To_FILETIME(time_t t, ALT_FILETIME *pft ) {
- uint64_t ll = (((uint64_t)t) *10000000L) + (((uint64_t)116444736L) * 1000000000L);
- pft->dwLowDateTime = (uint32_t)(ll & 0xFFFFFFFF);
- pft->dwHighDateTime = (uint32_t)((ll>>32)&0xFFFFFFFF);
- }
-
-#ifdef __WIN32__
- /* do it the old way on Win32, because POSIX does not get timezone stuff right */
- ALT_FILETIME getFileTime(const char* sFileName) {
- FILETIME temp;
- GetSystemTimeAsFileTime(&temp);
- HANDLE h = CreateFile(sFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (h == INVALID_HANDLE_VALUE) {
- cerr << "Cannot read file time of " << sFileName << "\n";
- } else {
- GetFileTime(h, NULL, NULL, &temp);
- CloseHandle(h);
- }
- ALT_FILETIME result;
- result.dwHighDateTime = temp.dwHighDateTime;
- result.dwLowDateTime = temp.dwLowDateTime;
- return result;
- }
-#else
- ALT_FILETIME getFileTime(const char* sFileName) {
- struct stat buf;
- /* get current time first as a fall-back */
- time_t currentTime = time(NULL);
-
- if(stat(sFileName, &buf)) {
- cerr << "Cannot read file time of " << sFileName << "\n";
- } else {
- /* get the time from the file */
- currentTime = buf.st_mtime;
- }
- ALT_FILETIME result;
- TimeT_To_FILETIME(currentTime, &result);
- return result;
- }
-#endif
-
- uint32_t getFileSize(const char* sFileName) {
- std::ifstream f;
- f.open(sFileName, std::ios_base::binary | std::ios_base::in);
- if (!f.good() || f.eof() || !f.is_open()) {
- throw "File could not be read (getFileSize)";
- }
- f.seekg(0, std::ios_base::beg);
- std::ifstream::pos_type begin_pos = f.tellg();
- f.seekg(0, std::ios_base::end);
- return static_cast<int>(f.tellg() - begin_pos);
- }
-
-#ifdef __WIN32__
- string getTempFile() {
- char buffer[MAX_PATH];
- if(GetTempFileName(".","vpatch",0,buffer) == 0) {
- cerr << "Cannot create temporary filename";
- }
- return string(buffer);
- }
-#else
- string getTempFile() {
- char t[] = "/tmp/genpatXXXXXX";
-
- mode_t old_umask = umask(0077);
-
- int fd = mkstemp(t);
- if (fd == -1) {
- cerr << "Cannot create temporary filename";
- return "";
- }
- close(fd);
-
- umask(old_umask);
-
- return string(t);
- }
-#endif
-
-}
+//---------------------------------------------------------------------------
+// POSIXUtil.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+
+#include "POSIXUtil.h"
+#include <iostream>
+#include <fstream>
+
+#include <time.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+/* My Borland/VC++ compiler do not have this file */
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
+ #include <unistd.h>
+#endif
+
+#ifdef __WIN32__ /* The Windows way of getting a temp file needs windows.h*/
+ #include <windows.h>
+#endif
+
+using namespace std;
+
+namespace POSIX {
+
+ void TimeT_To_FILETIME(time_t t, ALT_FILETIME *pft ) {
+ uint64_t ll = (((uint64_t)t) *10000000L) + (((uint64_t)116444736L) * 1000000000L);
+ pft->dwLowDateTime = (uint32_t)(ll & 0xFFFFFFFF);
+ pft->dwHighDateTime = (uint32_t)((ll>>32)&0xFFFFFFFF);
+ }
+
+#ifdef __WIN32__
+ /* do it the old way on Win32, because POSIX does not get timezone stuff right */
+ ALT_FILETIME getFileTime(const char* sFileName) {
+ FILETIME temp;
+ GetSystemTimeAsFileTime(&temp);
+ HANDLE h = CreateFile(sFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ if (h == INVALID_HANDLE_VALUE) {
+ cerr << "Cannot read file time of " << sFileName << "\n";
+ } else {
+ GetFileTime(h, NULL, NULL, &temp);
+ CloseHandle(h);
+ }
+ ALT_FILETIME result;
+ result.dwHighDateTime = temp.dwHighDateTime;
+ result.dwLowDateTime = temp.dwLowDateTime;
+ return result;
+ }
+#else
+ ALT_FILETIME getFileTime(const char* sFileName) {
+ struct stat buf;
+ /* get current time first as a fall-back */
+ time_t currentTime = time(NULL);
+
+ if(stat(sFileName, &buf)) {
+ cerr << "Cannot read file time of " << sFileName << "\n";
+ } else {
+ /* get the time from the file */
+ currentTime = buf.st_mtime;
+ }
+ ALT_FILETIME result;
+ TimeT_To_FILETIME(currentTime, &result);
+ return result;
+ }
+#endif
+
+ uint32_t getFileSize(const char* sFileName) {
+ std::ifstream f;
+ f.open(sFileName, std::ios_base::binary | std::ios_base::in);
+ if (!f.good() || f.eof() || !f.is_open()) {
+ throw "File could not be read (getFileSize)";
+ }
+ f.seekg(0, std::ios_base::beg);
+ std::ifstream::pos_type begin_pos = f.tellg();
+ f.seekg(0, std::ios_base::end);
+ return static_cast<int>(f.tellg() - begin_pos);
+ }
+
+#ifdef __WIN32__
+ string getTempFile() {
+ char buffer[MAX_PATH];
+ if(GetTempFileName(".","vpatch",0,buffer) == 0) {
+ cerr << "Cannot create temporary filename";
+ }
+ return string(buffer);
+ }
+#else
+ string getTempFile() {
+ char t[] = "/tmp/genpatXXXXXX";
+
+ mode_t old_umask = umask(0077);
+
+ int fd = mkstemp(t);
+ if (fd == -1) {
+ cerr << "Cannot create temporary filename";
+ return "";
+ }
+ close(fd);
+
+ umask(old_umask);
+
+ return string(t);
+ }
+#endif
+
+}
diff --git a/Contrib/VPatch/Source/GenPat/POSIXUtil.h b/Contrib/VPatch/Source/GenPat/POSIXUtil.h
index 5409575..20529f1 100755
--- a/Contrib/VPatch/Source/GenPat/POSIXUtil.h
+++ b/Contrib/VPatch/Source/GenPat/POSIXUtil.h
@@ -1,44 +1,44 @@
-//---------------------------------------------------------------------------
-// POSIXUtil.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#if !defined(POSIXUtil_H)
- #define POSIXUtil_H
- #include "GlobalTypes.h"
- #include <string>
-
- using namespace std;
-
- namespace POSIX {
- typedef struct ALT_FILETIME {
- uint32_t dwLowDateTime;
- uint32_t dwHighDateTime;
- } ALT_FILETIME;
-
- ALT_FILETIME getFileTime(const char* sFileName);
- uint32_t getFileSize(const char* sFileName);
- string getTempFile();
- }
-
-#endif // POSIXUtil_H
+//---------------------------------------------------------------------------
+// POSIXUtil.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#if !defined(POSIXUtil_H)
+ #define POSIXUtil_H
+ #include "GlobalTypes.h"
+ #include <string>
+
+ using namespace std;
+
+ namespace POSIX {
+ typedef struct ALT_FILETIME {
+ uint32_t dwLowDateTime;
+ uint32_t dwHighDateTime;
+ } ALT_FILETIME;
+
+ ALT_FILETIME getFileTime(const char* sFileName);
+ uint32_t getFileSize(const char* sFileName);
+ string getTempFile();
+ }
+
+#endif // POSIXUtil_H
diff --git a/Contrib/VPatch/Source/GenPat/PatchGenerator.cpp b/Contrib/VPatch/Source/GenPat/PatchGenerator.cpp
index 07c4c13..445f2e5 100755
--- a/Contrib/VPatch/Source/GenPat/PatchGenerator.cpp
+++ b/Contrib/VPatch/Source/GenPat/PatchGenerator.cpp
@@ -1,247 +1,247 @@
-//---------------------------------------------------------------------------
-// PatchGenerator.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#include "PatchGenerator.h"
-#include <algorithm>
-
-#define TARGET_BUFFER_SIZE 65536
-#define TARGET_LOOKAHEAD_SIZE 4096
-#define MAX_BLOCK_SIZE 16384
-#define DEFAULT_MAX_MATCHES 500
-
-PatchGenerator::PatchGenerator(bistream& source, TFileOffset sourceSize, bistream& target, TFileOffset targetSize, bostream& patch) :
- source(source), sourceSize(sourceSize), target(target), targetSize(targetSize), patch(patch),
- targetCData(NULL), targetCDataBaseOffset(0), targetCDataSize(0), blockSize(64), maxMatches(DEFAULT_MAX_MATCHES), beVerbose(false) {
- targetCData = new unsigned char[TARGET_BUFFER_SIZE];
-}
-
-PatchGenerator::~PatchGenerator() {
- if(targetCData != NULL) delete[] targetCData;
-}
-
-void PatchGenerator::execute(vector<SameBlock*>& sameBlocks) {
- ChunkedFile* sourceTree = new ChunkedFile(source,sourceSize,blockSize);
-
- // sameBlocks: this vector will store blocks that have been found to be the same
- // between files
-
- // the vector needs an 'empty' first block so checking for overlap with the
- // 'previous' block never fails
- SameBlock* firstBlock = new SameBlock;
- firstBlock->sourceOffset = 0;
- firstBlock->targetOffset = 0;
- firstBlock->size = 0;
- sameBlocks.push_back(firstBlock);
-
- targetCDataBaseOffset = 0;
- targetCDataSize = 0;
- bool firstRun = true;
-
- // currentOffset is in the target file
- for(TFileOffset currentOffset = 0; currentOffset < targetSize; ) {
- bool reloadTargetCData = true;
- if((currentOffset >= targetCDataBaseOffset) &&
- (currentOffset + TARGET_LOOKAHEAD_SIZE < targetCDataBaseOffset + TARGET_BUFFER_SIZE)) {
-
- if(firstRun) {
- firstRun = false;
- } else {
- reloadTargetCData = false;
- }
- }
- if(reloadTargetCData) {
- // at least support looking back blockSize, if possible (findBlock relies on this!)
- targetCDataBaseOffset = currentOffset - blockSize;
-
- // handle start of file correctly
- if(currentOffset < blockSize) targetCDataBaseOffset = 0;
-
- targetCDataSize = TARGET_BUFFER_SIZE;
- // check if this does not extend beyond EOF
- if(targetCDataBaseOffset + targetCDataSize > targetSize) {
- targetCDataSize = targetSize - targetCDataBaseOffset;
- }
-
- // we need to update the memory cache of target
- cout << "[CacheReload] File position = " << static_cast<unsigned int>(targetCDataBaseOffset) << "\n";
-
- target.seekg(targetCDataBaseOffset,ios::beg);
- target.read(reinterpret_cast<char*>(targetCData),targetCDataSize);
- }
- //cout << currentOffset << " ";
-
- SameBlock* currentSameBlock = findBlock(sourceTree,currentOffset);
-
- if(currentSameBlock) {
- // we have a match
- SameBlock* previousBlock = sameBlocks.back();
- if(previousBlock->targetOffset + previousBlock->size > currentSameBlock->targetOffset) {
- // there is overlap, resolve it
- TFileOffset difference = previousBlock->targetOffset + previousBlock->size - currentSameBlock->targetOffset;
- currentSameBlock->sourceOffset += difference;
- currentSameBlock->targetOffset += difference;
- currentSameBlock->size -= difference;
- }
- sameBlocks.push_back(currentSameBlock);
-
- // debug info
- if(beVerbose) {
- cout << "Block found: " << static_cast<unsigned int>(currentSameBlock->targetOffset)
- << " " << static_cast<unsigned int>(currentSameBlock->size)
- << " (source offset=" << static_cast<unsigned int>(currentSameBlock->sourceOffset) << ")\n";
- }
-
- currentOffset = currentSameBlock->targetOffset + currentSameBlock->size;
- } else {
- // no match, advance one byte
- currentOffset++;
- }
- }
-
- // add a block at the end, again to prevent bounds checking hassle
- SameBlock* lastBlock = new SameBlock;
- lastBlock->sourceOffset = 0;
- lastBlock->targetOffset = targetSize;
- lastBlock->size = 0;
- sameBlocks.push_back(lastBlock);
- delete sourceTree;
-}
-
-SameBlock* PatchGenerator::findBlock(ChunkedFile* sourceTree,
- TFileOffset targetFileStartOffset) {
- if(targetSize - targetFileStartOffset < blockSize) return NULL;
-
- TFileOffset preDataSize = targetFileStartOffset - targetCDataBaseOffset;
- //unsigned char* p = &(targetCData[preDataSize]);
-// SameBlock* currentSameBlock = findBlock(sourceTree,p,preDataSize,
-// targetCDataSize - preDataSize,
-// currentOffset);
- //unsigned char* targetData, // target data contains a memory part of target stream
- //TFileOffset targetDataPreSize, // this specifies how many bytes we can access in front (required to be at least blockSize)
- //TFileOffset targetDataSize, // this specifies how many bytes we can acces in the pointer (must be at least blockSize)
-
- // read the current data part into memory
- TChunkChecksum checksum;
- sourceTree->calculateChecksum(&(targetCData[preDataSize]),blockSize,checksum);
-
- TFileOffset foundIndex; // location into sourceTree chunks array of found chunk
- if(sourceTree->search(checksum,&foundIndex)) {
- // we found something
- SameBlock* bestMatch = new SameBlock;
- bestMatch->sourceOffset = sourceTree->chunks[foundIndex].offset;
- bestMatch->targetOffset = targetFileStartOffset;
- bestMatch->size = 0; // default to 0, because they can all be mismatches as well
-
- // increase match size if possible, also check if it is a match at all
- int matchCount = 0;
- while((sourceTree->chunks[foundIndex].checksum == checksum) && ((maxMatches == 0) || (matchCount < maxMatches))) {
- // check if this one is better than the current match
- SameBlock match;
- match.sourceOffset = sourceTree->chunks[foundIndex].offset;
- match.targetOffset = targetFileStartOffset;
- match.size = 0; // default to 0, could be a mismatch with the same key
- improveSameBlockMatch(match,bestMatch->size);
- if(match.size > bestMatch->size) {
- *bestMatch = match;
- }
- foundIndex++;
- matchCount++;
- }
- if(beVerbose) {
- if(maxMatches != 0) {
- if(matchCount == maxMatches) {
- cout << "[FindBlock] Abort due to >" << static_cast<unsigned int>(maxMatches)
- << " matches; file position = " << static_cast<unsigned int>(targetFileStartOffset) << "\n";
- }
- }
- }
- if(bestMatch->size == 0)
- return NULL;
- else
- return bestMatch;
- } else {
- return NULL;
- }
-}
-
-#define COMPARISON_SIZE 2048
-
-void PatchGenerator::improveSameBlockMatch(SameBlock& match, TFileOffset currentBest) {
- // we should now try to make the match longer by reading big chunks of the
- // files to come
- source.seekg(match.sourceOffset + match.size,ios::beg);
- target.seekg(match.targetOffset + match.size,ios::beg);
-
- while(true) {
- unsigned char sourceData[COMPARISON_SIZE];
- unsigned char targetData[COMPARISON_SIZE];
-
- TFileOffset startTarget = match.targetOffset + match.size;
- TFileOffset startSource = match.sourceOffset + match.size;
- TFileOffset checkSize = COMPARISON_SIZE;
- if(checkSize > targetSize - startTarget) checkSize = targetSize - startTarget;
- if(checkSize > sourceSize - startSource) checkSize = sourceSize - startSource;
- if(checkSize == 0) break;
- source.read(reinterpret_cast<char*>(sourceData),checkSize);
- target.read(reinterpret_cast<char*>(targetData),checkSize);
- TFileOffset i = 0;
- while((sourceData[i] == targetData[i]) && (i < checkSize )) {
- match.size++;
- i++;
- }
- // check if we stopped because we had a mismatch
- if(i < checkSize) break;
- }
- if(match.size < blockSize) {
- match.size = 0;
- } else {
- // try to improve before match if this is useful
- if(match.size + blockSize <= currentBest) return;
- // do not do if there is no more data in the target...
- if(match.targetOffset == 0) return;
-
- // we know it is stored in the cache... so we just need the source one
- unsigned char sourceData[MAX_BLOCK_SIZE];
-
- TFileOffset startSource = match.sourceOffset - blockSize;
- TFileOffset checkSize = blockSize;
- if(checkSize > match.sourceOffset) {
- checkSize = match.sourceOffset;
- startSource = 0;
- }
- if(checkSize == 0) return;
- source.seekg(startSource,ios::beg);
- source.read(reinterpret_cast<char*>(sourceData),checkSize);
- checkSize--;
- while(sourceData[checkSize] == targetCData[match.targetOffset - targetCDataBaseOffset - 1]) {
- match.targetOffset--;
- match.sourceOffset--;
- match.size++;
- checkSize--;
- if(checkSize == 0) break;
- if(match.targetOffset == 0) break;
- }
- }
-}
+//---------------------------------------------------------------------------
+// PatchGenerator.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#include "PatchGenerator.h"
+#include <algorithm>
+
+#define TARGET_BUFFER_SIZE 65536
+#define TARGET_LOOKAHEAD_SIZE 4096
+#define MAX_BLOCK_SIZE 16384
+#define DEFAULT_MAX_MATCHES 500
+
+PatchGenerator::PatchGenerator(bistream& source, TFileOffset sourceSize, bistream& target, TFileOffset targetSize, bostream& patch) :
+ source(source), sourceSize(sourceSize), target(target), targetSize(targetSize), patch(patch),
+ targetCData(NULL), targetCDataBaseOffset(0), targetCDataSize(0), blockSize(64), maxMatches(DEFAULT_MAX_MATCHES), beVerbose(false) {
+ targetCData = new unsigned char[TARGET_BUFFER_SIZE];
+}
+
+PatchGenerator::~PatchGenerator() {
+ if(targetCData != NULL) delete[] targetCData;
+}
+
+void PatchGenerator::execute(vector<SameBlock*>& sameBlocks) {
+ ChunkedFile* sourceTree = new ChunkedFile(source,sourceSize,blockSize);
+
+ // sameBlocks: this vector will store blocks that have been found to be the same
+ // between files
+
+ // the vector needs an 'empty' first block so checking for overlap with the
+ // 'previous' block never fails
+ SameBlock* firstBlock = new SameBlock;
+ firstBlock->sourceOffset = 0;
+ firstBlock->targetOffset = 0;
+ firstBlock->size = 0;
+ sameBlocks.push_back(firstBlock);
+
+ targetCDataBaseOffset = 0;
+ targetCDataSize = 0;
+ bool firstRun = true;
+
+ // currentOffset is in the target file
+ for(TFileOffset currentOffset = 0; currentOffset < targetSize; ) {
+ bool reloadTargetCData = true;
+ if((currentOffset >= targetCDataBaseOffset) &&
+ (currentOffset + TARGET_LOOKAHEAD_SIZE < targetCDataBaseOffset + TARGET_BUFFER_SIZE)) {
+
+ if(firstRun) {
+ firstRun = false;
+ } else {
+ reloadTargetCData = false;
+ }
+ }
+ if(reloadTargetCData) {
+ // at least support looking back blockSize, if possible (findBlock relies on this!)
+ targetCDataBaseOffset = currentOffset - blockSize;
+
+ // handle start of file correctly
+ if(currentOffset < blockSize) targetCDataBaseOffset = 0;
+
+ targetCDataSize = TARGET_BUFFER_SIZE;
+ // check if this does not extend beyond EOF
+ if(targetCDataBaseOffset + targetCDataSize > targetSize) {
+ targetCDataSize = targetSize - targetCDataBaseOffset;
+ }
+
+ // we need to update the memory cache of target
+ cout << "[CacheReload] File position = " << static_cast<unsigned int>(targetCDataBaseOffset) << "\n";
+
+ target.seekg(targetCDataBaseOffset,ios::beg);
+ target.read(reinterpret_cast<char*>(targetCData),targetCDataSize);
+ }
+ //cout << currentOffset << " ";
+
+ SameBlock* currentSameBlock = findBlock(sourceTree,currentOffset);
+
+ if(currentSameBlock) {
+ // we have a match
+ SameBlock* previousBlock = sameBlocks.back();
+ if(previousBlock->targetOffset + previousBlock->size > currentSameBlock->targetOffset) {
+ // there is overlap, resolve it
+ TFileOffset difference = previousBlock->targetOffset + previousBlock->size - currentSameBlock->targetOffset;
+ currentSameBlock->sourceOffset += difference;
+ currentSameBlock->targetOffset += difference;
+ currentSameBlock->size -= difference;
+ }
+ sameBlocks.push_back(currentSameBlock);
+
+ // debug info
+ if(beVerbose) {
+ cout << "Block found: " << static_cast<unsigned int>(currentSameBlock->targetOffset)
+ << " " << static_cast<unsigned int>(currentSameBlock->size)
+ << " (source offset=" << static_cast<unsigned int>(currentSameBlock->sourceOffset) << ")\n";
+ }
+
+ currentOffset = currentSameBlock->targetOffset + currentSameBlock->size;
+ } else {
+ // no match, advance one byte
+ currentOffset++;
+ }
+ }
+
+ // add a block at the end, again to prevent bounds checking hassle
+ SameBlock* lastBlock = new SameBlock;
+ lastBlock->sourceOffset = 0;
+ lastBlock->targetOffset = targetSize;
+ lastBlock->size = 0;
+ sameBlocks.push_back(lastBlock);
+ delete sourceTree;
+}
+
+SameBlock* PatchGenerator::findBlock(ChunkedFile* sourceTree,
+ TFileOffset targetFileStartOffset) {
+ if(targetSize - targetFileStartOffset < blockSize) return NULL;
+
+ TFileOffset preDataSize = targetFileStartOffset - targetCDataBaseOffset;
+ //unsigned char* p = &(targetCData[preDataSize]);
+// SameBlock* currentSameBlock = findBlock(sourceTree,p,preDataSize,
+// targetCDataSize - preDataSize,
+// currentOffset);
+ //unsigned char* targetData, // target data contains a memory part of target stream
+ //TFileOffset targetDataPreSize, // this specifies how many bytes we can access in front (required to be at least blockSize)
+ //TFileOffset targetDataSize, // this specifies how many bytes we can acces in the pointer (must be at least blockSize)
+
+ // read the current data part into memory
+ TChunkChecksum checksum;
+ sourceTree->calculateChecksum(&(targetCData[preDataSize]),blockSize,checksum);
+
+ TFileOffset foundIndex; // location into sourceTree chunks array of found chunk
+ if(sourceTree->search(checksum,&foundIndex)) {
+ // we found something
+ SameBlock* bestMatch = new SameBlock;
+ bestMatch->sourceOffset = sourceTree->chunks[foundIndex].offset;
+ bestMatch->targetOffset = targetFileStartOffset;
+ bestMatch->size = 0; // default to 0, because they can all be mismatches as well
+
+ // increase match size if possible, also check if it is a match at all
+ int matchCount = 0;
+ while((sourceTree->chunks[foundIndex].checksum == checksum) && ((maxMatches == 0) || (matchCount < maxMatches))) {
+ // check if this one is better than the current match
+ SameBlock match;
+ match.sourceOffset = sourceTree->chunks[foundIndex].offset;
+ match.targetOffset = targetFileStartOffset;
+ match.size = 0; // default to 0, could be a mismatch with the same key
+ improveSameBlockMatch(match,bestMatch->size);
+ if(match.size > bestMatch->size) {
+ *bestMatch = match;
+ }
+ foundIndex++;
+ matchCount++;
+ }
+ if(beVerbose) {
+ if(maxMatches != 0) {
+ if(matchCount == maxMatches) {
+ cout << "[FindBlock] Abort due to >" << static_cast<unsigned int>(maxMatches)
+ << " matches; file position = " << static_cast<unsigned int>(targetFileStartOffset) << "\n";
+ }
+ }
+ }
+ if(bestMatch->size == 0)
+ return NULL;
+ else
+ return bestMatch;
+ } else {
+ return NULL;
+ }
+}
+
+#define COMPARISON_SIZE 2048
+
+void PatchGenerator::improveSameBlockMatch(SameBlock& match, TFileOffset currentBest) {
+ // we should now try to make the match longer by reading big chunks of the
+ // files to come
+ source.seekg(match.sourceOffset + match.size,ios::beg);
+ target.seekg(match.targetOffset + match.size,ios::beg);
+
+ while(true) {
+ unsigned char sourceData[COMPARISON_SIZE];
+ unsigned char targetData[COMPARISON_SIZE];
+
+ TFileOffset startTarget = match.targetOffset + match.size;
+ TFileOffset startSource = match.sourceOffset + match.size;
+ TFileOffset checkSize = COMPARISON_SIZE;
+ if(checkSize > targetSize - startTarget) checkSize = targetSize - startTarget;
+ if(checkSize > sourceSize - startSource) checkSize = sourceSize - startSource;
+ if(checkSize == 0) break;
+ source.read(reinterpret_cast<char*>(sourceData),checkSize);
+ target.read(reinterpret_cast<char*>(targetData),checkSize);
+ TFileOffset i = 0;
+ while((sourceData[i] == targetData[i]) && (i < checkSize )) {
+ match.size++;
+ i++;
+ }
+ // check if we stopped because we had a mismatch
+ if(i < checkSize) break;
+ }
+ if(match.size < blockSize) {
+ match.size = 0;
+ } else {
+ // try to improve before match if this is useful
+ if(match.size + blockSize <= currentBest) return;
+ // do not do if there is no more data in the target...
+ if(match.targetOffset == 0) return;
+
+ // we know it is stored in the cache... so we just need the source one
+ unsigned char sourceData[MAX_BLOCK_SIZE];
+
+ TFileOffset startSource = match.sourceOffset - blockSize;
+ TFileOffset checkSize = blockSize;
+ if(checkSize > match.sourceOffset) {
+ checkSize = match.sourceOffset;
+ startSource = 0;
+ }
+ if(checkSize == 0) return;
+ source.seekg(startSource,ios::beg);
+ source.read(reinterpret_cast<char*>(sourceData),checkSize);
+ checkSize--;
+ while(sourceData[checkSize] == targetCData[match.targetOffset - targetCDataBaseOffset - 1]) {
+ match.targetOffset--;
+ match.sourceOffset--;
+ match.size++;
+ checkSize--;
+ if(checkSize == 0) break;
+ if(match.targetOffset == 0) break;
+ }
+ }
+}
diff --git a/Contrib/VPatch/Source/GenPat/PatchGenerator.h b/Contrib/VPatch/Source/GenPat/PatchGenerator.h
index ef91bf1..03df9f4 100755
--- a/Contrib/VPatch/Source/GenPat/PatchGenerator.h
+++ b/Contrib/VPatch/Source/GenPat/PatchGenerator.h
@@ -1,72 +1,72 @@
-//---------------------------------------------------------------------------
-// PatchGenerator.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#if !defined(PatchGenerator_H)
- #define PatchGenerator_H
-
- #include <iostream>
- #include <vector>
- #include "GlobalTypes.h"
- #include "ChunkedFile.h"
-
- using namespace std;
-
- typedef struct SameBlock {
- TFileOffset sourceOffset;
- TFileOffset targetOffset;
- TFileOffset size;
- } SameBlock;
-
- class PatchGenerator {
- protected:
- bistream& source;
- TFileOffset sourceSize;
- bistream& target;
- TFileOffset targetSize;
- bostream& patch;
-
- // cache
- unsigned char* targetCData;
- TFileOffset targetCDataBaseOffset;
- TFileOffset targetCDataSize;
-
- SameBlock* findBlock(ChunkedFile* sourceTree,
- TFileOffset targetFileStartOffset);
-// SameBlock* findBlock(ChunkedFile* sourceTree, unsigned char* targetData, TFileOffset targetStartOffset);
- void improveSameBlockMatch(SameBlock& match, TFileOffset currentBest = 0);
- public:
- TFileOffset blockSize;
- int maxMatches;
- bool beVerbose;
-
- // load in the source, target streams
- PatchGenerator(bistream& source, TFileOffset sourceSize, bistream& target, TFileOffset targetSize, bostream& patch);
- ~PatchGenerator();
-
- // construct the actual patch
- void execute(vector<SameBlock*>& sameBlocks);
- };
-
-#endif // PatchGenerator_H
+//---------------------------------------------------------------------------
+// PatchGenerator.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#if !defined(PatchGenerator_H)
+ #define PatchGenerator_H
+
+ #include <iostream>
+ #include <vector>
+ #include "GlobalTypes.h"
+ #include "ChunkedFile.h"
+
+ using namespace std;
+
+ typedef struct SameBlock {
+ TFileOffset sourceOffset;
+ TFileOffset targetOffset;
+ TFileOffset size;
+ } SameBlock;
+
+ class PatchGenerator {
+ protected:
+ bistream& source;
+ TFileOffset sourceSize;
+ bistream& target;
+ TFileOffset targetSize;
+ bostream& patch;
+
+ // cache
+ unsigned char* targetCData;
+ TFileOffset targetCDataBaseOffset;
+ TFileOffset targetCDataSize;
+
+ SameBlock* findBlock(ChunkedFile* sourceTree,
+ TFileOffset targetFileStartOffset);
+// SameBlock* findBlock(ChunkedFile* sourceTree, unsigned char* targetData, TFileOffset targetStartOffset);
+ void improveSameBlockMatch(SameBlock& match, TFileOffset currentBest = 0);
+ public:
+ TFileOffset blockSize;
+ int maxMatches;
+ bool beVerbose;
+
+ // load in the source, target streams
+ PatchGenerator(bistream& source, TFileOffset sourceSize, bistream& target, TFileOffset targetSize, bostream& patch);
+ ~PatchGenerator();
+
+ // construct the actual patch
+ void execute(vector<SameBlock*>& sameBlocks);
+ };
+
+#endif // PatchGenerator_H
diff --git a/Contrib/VPatch/Source/GenPat/SConscript b/Contrib/VPatch/Source/GenPat/SConscript
index c2709a2..b51b098 100755
--- a/Contrib/VPatch/Source/GenPat/SConscript
+++ b/Contrib/VPatch/Source/GenPat/SConscript
@@ -1,20 +1,20 @@
-target = "GenPat"
-
-files = Split("""
- adler32.cpp
- Checksums.cpp
- ChunkedFile.cpp
- FileFormat1.cpp
- GlobalTypes.cpp
- main.cpp
- md5.c
- PatchGenerator.cpp
- POSIXUtil.cpp
-""")
-
-libs = Split("""
-""")
-
-Import('BuildUtil')
-
-BuildUtil(target, files, libs, flags = ['$EXCEPTION_FLAG'], cross_platform = True)
+target = "GenPat"
+
+files = Split("""
+ adler32.cpp
+ Checksums.cpp
+ ChunkedFile.cpp
+ FileFormat1.cpp
+ GlobalTypes.cpp
+ main.cpp
+ md5.c
+ PatchGenerator.cpp
+ POSIXUtil.cpp
+""")
+
+libs = Split("""
+""")
+
+Import('BuildUtil')
+
+BuildUtil(target, files, libs, flags = ['$EXCEPTION_FLAG'], cross_platform = True)
diff --git a/Contrib/VPatch/Source/GenPat/adler32.cpp b/Contrib/VPatch/Source/GenPat/adler32.cpp
index 4f7be22..150929a 100755
--- a/Contrib/VPatch/Source/GenPat/adler32.cpp
+++ b/Contrib/VPatch/Source/GenPat/adler32.cpp
@@ -1,92 +1,92 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2003 Mark Adler
-
- THIS IS A MODIFIED VERSION OF THE ORIGINAL ZLIB adler32.c!
-
- The following was copied from zlib.h:
-
- 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.
-
- */
-
-#include "adler32.h"
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-#define BASE 65521UL /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
-#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf) DO8(buf,0); DO8(buf,8);
-
-#ifdef NO_DIVIDE
-# define MOD(a) \
- do { \
- if (a >= (BASE << 16)) a -= (BASE << 16); \
- if (a >= (BASE << 15)) a -= (BASE << 15); \
- if (a >= (BASE << 14)) a -= (BASE << 14); \
- if (a >= (BASE << 13)) a -= (BASE << 13); \
- if (a >= (BASE << 12)) a -= (BASE << 12); \
- if (a >= (BASE << 11)) a -= (BASE << 11); \
- if (a >= (BASE << 10)) a -= (BASE << 10); \
- if (a >= (BASE << 9)) a -= (BASE << 9); \
- if (a >= (BASE << 8)) a -= (BASE << 8); \
- if (a >= (BASE << 7)) a -= (BASE << 7); \
- if (a >= (BASE << 6)) a -= (BASE << 6); \
- if (a >= (BASE << 5)) a -= (BASE << 5); \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
- if (a >= BASE) a -= BASE; \
- } while (0)
-#else
-# define MOD(a) a %= BASE
-#endif
-
-namespace Checksum {
-
- /* ========================================================================= */
- uLong adler32(uLong adler, const Byte *buf, uInt len) {
- unsigned long s1 = adler & 0xffff;
- unsigned long s2 = (adler >> 16) & 0xffff;
- int k;
-
- if (buf == Z_NULL) return 1L;
-
- while (len > 0) {
- k = len < NMAX ? (int)len : NMAX;
- len -= k;
- while (k >= 16) {
- DO16(buf);
- buf += 16;
- k -= 16;
- }
- if (k != 0) do {
- s1 += *buf++;
- s2 += s1;
- } while (--k);
- MOD(s1);
- MOD(s2);
- }
- return (s2 << 16) | s1;
- }
-}
+/* adler32.c -- compute the Adler-32 checksum of a data stream
+ * Copyright (C) 1995-2003 Mark Adler
+
+ THIS IS A MODIFIED VERSION OF THE ORIGINAL ZLIB adler32.c!
+
+ The following was copied from zlib.h:
+
+ 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.
+
+ */
+
+#include "adler32.h"
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define BASE 65521UL /* largest prime smaller than 65536 */
+#define NMAX 5552
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+
+#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
+#define DO16(buf) DO8(buf,0); DO8(buf,8);
+
+#ifdef NO_DIVIDE
+# define MOD(a) \
+ do { \
+ if (a >= (BASE << 16)) a -= (BASE << 16); \
+ if (a >= (BASE << 15)) a -= (BASE << 15); \
+ if (a >= (BASE << 14)) a -= (BASE << 14); \
+ if (a >= (BASE << 13)) a -= (BASE << 13); \
+ if (a >= (BASE << 12)) a -= (BASE << 12); \
+ if (a >= (BASE << 11)) a -= (BASE << 11); \
+ if (a >= (BASE << 10)) a -= (BASE << 10); \
+ if (a >= (BASE << 9)) a -= (BASE << 9); \
+ if (a >= (BASE << 8)) a -= (BASE << 8); \
+ if (a >= (BASE << 7)) a -= (BASE << 7); \
+ if (a >= (BASE << 6)) a -= (BASE << 6); \
+ if (a >= (BASE << 5)) a -= (BASE << 5); \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+#else
+# define MOD(a) a %= BASE
+#endif
+
+namespace Checksum {
+
+ /* ========================================================================= */
+ uLong adler32(uLong adler, const Byte *buf, uInt len) {
+ unsigned long s1 = adler & 0xffff;
+ unsigned long s2 = (adler >> 16) & 0xffff;
+ int k;
+
+ if (buf == Z_NULL) return 1L;
+
+ while (len > 0) {
+ k = len < NMAX ? (int)len : NMAX;
+ len -= k;
+ while (k >= 16) {
+ DO16(buf);
+ buf += 16;
+ k -= 16;
+ }
+ if (k != 0) do {
+ s1 += *buf++;
+ s2 += s1;
+ } while (--k);
+ MOD(s1);
+ MOD(s2);
+ }
+ return (s2 << 16) | s1;
+ }
+}
diff --git a/Contrib/VPatch/Source/GenPat/adler32.h b/Contrib/VPatch/Source/GenPat/adler32.h
index ca6236b..d5c2507 100755
--- a/Contrib/VPatch/Source/GenPat/adler32.h
+++ b/Contrib/VPatch/Source/GenPat/adler32.h
@@ -1,18 +1,18 @@
-//---------------------------------------------------------------------------
-// Adler32
-//---------------------------------------------------------------------------
-
-#if !defined(Adler32_H)
- #define Adler32_H
-
- namespace Checksum {
- typedef unsigned int uInt; /* 16 bits or more */
- typedef unsigned long uLong; /* 32 bits or more */
- typedef unsigned char Byte; /* 8 bits */
-
- uLong adler32(uLong adler, const Byte *buf, uInt len);
- }
-
-#endif // Adler32_H
-
-
+//---------------------------------------------------------------------------
+// Adler32
+//---------------------------------------------------------------------------
+
+#if !defined(Adler32_H)
+ #define Adler32_H
+
+ namespace Checksum {
+ typedef unsigned int uInt; /* 16 bits or more */
+ typedef unsigned long uLong; /* 32 bits or more */
+ typedef unsigned char Byte; /* 8 bits */
+
+ uLong adler32(uLong adler, const Byte *buf, uInt len);
+ }
+
+#endif // Adler32_H
+
+
diff --git a/Contrib/VPatch/Source/GenPat/main.cpp b/Contrib/VPatch/Source/GenPat/main.cpp
index 7d07ff9..a62ccf0 100755
--- a/Contrib/VPatch/Source/GenPat/main.cpp
+++ b/Contrib/VPatch/Source/GenPat/main.cpp
@@ -1,300 +1,300 @@
-//---------------------------------------------------------------------------
-// main.cpp
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#ifdef __BORLANDC__
- #pragma argsused
-#endif
-
-#if !defined(__BORLANDC__) && !defined(_MSC_VER)
- #include <unistd.h>
-#endif
-
-#ifdef __WIN32__
- #define OPT_CHAR '/'
-#else
- #define OPT_CHAR '-'
-#endif
-
-#include "GlobalTypes.h"
-#include "POSIXUtil.h"
-#include "Checksums.h"
-#include "PatchGenerator.h"
-#include "FileFormat1.h"
-
-#include <fstream>
-#include <sstream>
-
-int main( int argc, char * argv[] ) {
- cout << "GenPat v3.1\n";
- cout << "===========\n\n(c) 2001-2005 Van de Sande Productions\n";
- cout << "Website: http://www.tibed.net/vpatch\n\n";
-
- string sourceFileName;
- string targetFileName;
- string patchFileName;
-
- bool showHelp = true;
-
- int blockSize = 64;
- int maxMatches = 500;
- bool beVerbose = false;
- bool beOptimal = false;
- bool existanceIsError = true; // flag error if patch already has source's MD5/CRC32?
- int fileNameArgument = 0;
- if(argc > 1) {
- for(int i = 1; i < argc; i++) {
- string s(argv[i]);
- if(s.size() > 0) {
- if(s[0] == OPT_CHAR) {
- if(s.size() > 1) {
- if((s[1] == 'v') || (s[1] == 'V')) {
- beVerbose = true;
- }
- if((s[1] == 'o') || (s[1] == 'O')) {
- beOptimal = true;
- }
- if((s[1] == 'r') || (s[1] == 'R')) {
- existanceIsError = false;
- }
- }
- if(s.size() > 2) {
- if((s[1] == 'b') || (s[1] == 'B')) {
- if(s[2] == '=') {
- istringstream ss(s.substr(3));
- ss >> blockSize;
- }
- }
- if((s[1] == 'a') || (s[1] == 'A')) {
- if(s[2] == '=') {
- istringstream ss(s.substr(3));
- ss >> maxMatches;
- }
- }
- }
- } else {
- switch (fileNameArgument) {
- case 0:
- sourceFileName = s;
- break;
- case 1:
- targetFileName = s;
- break;
- case 2:
- patchFileName = s;
- showHelp = false;
- break;
- default:
- cerr << "WARNING: extra filename argument not used: " << s << "\n";
- }
- fileNameArgument++;
- }
- }
- }
- }
- if(beOptimal) {
- maxMatches = 0;
- }
- if(showHelp) {
- cout << "This program will take (sourcefile) as input and create a (patchfile).\n";
- cout << "With this patchfile, you can convert a (sourcefile) into (targetfile).\n\n";
- cout << "Command line info:\n";
- cout << " GENPAT (sourcefile) (targetfile) (patchfile)\n\n";
-
- cout << "Command line option (optional):\n";
- cout << OPT_CHAR << "R Replace a patch with same contents as source silently if it\n already exists.\n";
- cout << OPT_CHAR << "B=64 Set blocksize (default=64), multiple of 2 is required.\n";
- cout << OPT_CHAR << "V More verbose information during patch creation.\n";
- cout << OPT_CHAR << "O Deactivate match limit of the " << OPT_CHAR << "A switch (sometimes smaller patches).\n";
- cout << OPT_CHAR << "A=500 Maximum number of block matches per block (improves performance).\n";
- cout << " Default is 500, larger is slower. Use " << OPT_CHAR << "V to see the cut-off aborts.\n\n";
- cout << "Note: filenames should never start with " << OPT_CHAR << " character!\n\n";
- cout << "Possible exit codes:\n";
- cout << " 0 Success\n";
- cout << " 1 Arguments missing\n";
- cout << " 2 Other error\n";
- cout << " 3 Source file already has a patch in specified patch file (=error)\n";
- return 1;
- }
-
- cout << "[Source] " << sourceFileName.c_str() << "\n";
- cout << "[Target] " << targetFileName.c_str() << "\n[PatchFile] " << patchFileName.c_str() << "\n";
-
- // get the file sizes
- TFileOffset sourceSize = 0;
- try {
- sourceSize = POSIX::getFileSize(sourceFileName.c_str());
- }
- catch(char* s) {
- cerr << "Source file size reading failed: " << s << "\n";
- return 2;
- }
- TFileOffset targetSize;
- try {
- targetSize = POSIX::getFileSize(targetFileName.c_str());
- }
- catch(const char* s) {
- cerr << "Target file size reading failed: " << s << "\n";
- return 2;
- }
-
- // calculate CRCs
- TChecksum* sourceCRC = new TChecksum(sourceFileName);
- sourceCRC->mode = TChecksum::MD5; // default
- TChecksum* targetCRC = new TChecksum(targetFileName);
- targetCRC->mode = TChecksum::MD5; // default
-
- string tempFileName = POSIX::getTempFile();
- if (tempFileName == "")
- return 2;
-
- // open the files
- bifstream source;
- source.open(sourceFileName.c_str(), std::ios_base::binary | std::ios_base::in);
- bifstream target;
- target.open(targetFileName.c_str(), std::ios_base::binary | std::ios_base::in);
- bofstream patch;
- patch.open(tempFileName.c_str(), std::ios_base::binary | std::ios_base::out);
-
- // remove existing patch with sourceCRC
- TFileOffset fileCount = 0;
- while(true) {
- TFileOffset previousPatchSize = 0;
- try {
- previousPatchSize = POSIX::getFileSize(patchFileName.c_str());
- } catch(const char* s) {
- cout << "Patch file does not yet exist: " << s << ", it will be created.\n";
- std::ofstream newfile;
- newfile.open(patchFileName.c_str(), std::ios_base::binary | std::ios_base::out);
- newfile.close();
- }
- bifstream previousPatch;
- previousPatch.open(patchFileName.c_str(), std::ios_base::binary | std::ios_base::in);
-
- try {
- // this will copy the contents of previousPatch to patch, but without sourceCRC
- fileCount = FileFormat1::removeExistingPatch(previousPatch,previousPatchSize,patch,sourceCRC,existanceIsError);
- } catch(const char* s) {
- cerr << "ERROR: " << s << "\n";
- patch.close();
- unlink(tempFileName.c_str());
- return 3;
- }
-
- // set them to the same checksum mode
- targetCRC->mode = sourceCRC->mode;
- cout << "[Checksum] Kind of checksums used: ";
- if(targetCRC->mode == TChecksum::MD5) cout << "MD5\n";
- if(targetCRC->mode == TChecksum::CRC32) cout << "CRC32\n";
- break;
- }
-
- if(source.good() && target.good() && patch.good()) {
- PatchGenerator* gen = new PatchGenerator(source,sourceSize,target,targetSize,patch);
- try {
- // clean up the blocksize to be a multiple of 2
- int orgBlockSize = blockSize;
- int bs_counter = 0;
- while(blockSize != 0) {
- bs_counter++;
- blockSize >>= 1;
- }
- blockSize = 1;
- while(bs_counter != 0) {
- blockSize <<= 1;
- bs_counter--;
- }
- if((blockSize >> 1) == orgBlockSize) blockSize = orgBlockSize;
- if(blockSize != orgBlockSize) {
- cout << "[BlockSizeFix] Your blocksize had to be fixed since it is not a multiple of 2\n";
- }
- if(blockSize < 16) {
- blockSize = 16;
- cout << "[BlockSizeFix] Your blocksize had to be fixed since it is smaller than 16\n";
- }
-
- gen->blockSize = blockSize;
- cout << "[BlockSize] " << static_cast<unsigned int>(gen->blockSize) << " bytes\n";
-
- gen->maxMatches = maxMatches;
- if(gen->maxMatches == 0) {
- cout << "[FindBlockMatchLimit] Unlimited matches\n";
- } else {
- cout << "[FindBlockMatchLimit] " << gen->maxMatches << " matches\n";
- }
-
- gen->beVerbose = beVerbose;
- if(beVerbose) {
- cout << "[Debug] Verbose output during patch generation activated.\n";
- }
-
- // create sameBlock storage
- vector<SameBlock*> sameBlocks;
- // run the patch generator to find similar blocks
- gen->execute(sameBlocks);
- // construct the actual patch in FileFormat1
- FileFormat1::writePatch(patch,target,sameBlocks,sourceCRC,targetCRC,fileCount,POSIX::getFileTime(targetFileName.c_str()));
- // cleanup sameblocks
- for(vector<SameBlock*>::iterator iter = sameBlocks.begin(); iter != sameBlocks.end(); iter++) {
- delete *iter;
- *iter = NULL;
- }
-
- patch.close();
- TFileOffset patchSize = POSIX::getFileSize(tempFileName.c_str());
-
- // finally: copy the temporary file to the actual patch
- bifstream tempF;
- tempF.open(tempFileName.c_str(), std::ios_base::binary | std::ios_base::in);
- bofstream patchF;
- patchF.open(patchFileName.c_str(), std::ios_base::binary | std::ios_base::out);
- char* buf = new char[patchSize];
- tempF.read(buf,patchSize);
- patchF.write(buf,patchSize);
- delete[] buf;
- tempF.close();
-
- // now empty the temporary file
- std::ofstream clearF;
- clearF.open(tempFileName.c_str(), std::ios_base::binary | std::ios_base::out);
- }
- catch(string s) {
- cerr << "Error thrown: " << s.c_str();
- return 2;
- }
- catch(const char* s) {
- cerr << "Error thrown: " << s;
- return 2;
- }
- } else {
- cerr << "There was a problem opening the files.\n";
- return 2;
- }
- if(*sourceCRC == *targetCRC)
- cerr << "WARNING: source and target file have equal CRCs!";
- delete sourceCRC;
- delete targetCRC;
- unlink(tempFileName.c_str());
- return 0;
-}
+//---------------------------------------------------------------------------
+// main.cpp
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#ifdef __BORLANDC__
+ #pragma argsused
+#endif
+
+#if !defined(__BORLANDC__) && !defined(_MSC_VER)
+ #include <unistd.h>
+#endif
+
+#ifdef __WIN32__
+ #define OPT_CHAR '/'
+#else
+ #define OPT_CHAR '-'
+#endif
+
+#include "GlobalTypes.h"
+#include "POSIXUtil.h"
+#include "Checksums.h"
+#include "PatchGenerator.h"
+#include "FileFormat1.h"
+
+#include <fstream>
+#include <sstream>
+
+int main( int argc, char * argv[] ) {
+ cout << "GenPat v3.1\n";
+ cout << "===========\n\n(c) 2001-2005 Van de Sande Productions\n";
+ cout << "Website: http://www.tibed.net/vpatch\n\n";
+
+ string sourceFileName;
+ string targetFileName;
+ string patchFileName;
+
+ bool showHelp = true;
+
+ int blockSize = 64;
+ int maxMatches = 500;
+ bool beVerbose = false;
+ bool beOptimal = false;
+ bool existanceIsError = true; // flag error if patch already has source's MD5/CRC32?
+ int fileNameArgument = 0;
+ if(argc > 1) {
+ for(int i = 1; i < argc; i++) {
+ string s(argv[i]);
+ if(s.size() > 0) {
+ if(s[0] == OPT_CHAR) {
+ if(s.size() > 1) {
+ if((s[1] == 'v') || (s[1] == 'V')) {
+ beVerbose = true;
+ }
+ if((s[1] == 'o') || (s[1] == 'O')) {
+ beOptimal = true;
+ }
+ if((s[1] == 'r') || (s[1] == 'R')) {
+ existanceIsError = false;
+ }
+ }
+ if(s.size() > 2) {
+ if((s[1] == 'b') || (s[1] == 'B')) {
+ if(s[2] == '=') {
+ istringstream ss(s.substr(3));
+ ss >> blockSize;
+ }
+ }
+ if((s[1] == 'a') || (s[1] == 'A')) {
+ if(s[2] == '=') {
+ istringstream ss(s.substr(3));
+ ss >> maxMatches;
+ }
+ }
+ }
+ } else {
+ switch (fileNameArgument) {
+ case 0:
+ sourceFileName = s;
+ break;
+ case 1:
+ targetFileName = s;
+ break;
+ case 2:
+ patchFileName = s;
+ showHelp = false;
+ break;
+ default:
+ cerr << "WARNING: extra filename argument not used: " << s << "\n";
+ }
+ fileNameArgument++;
+ }
+ }
+ }
+ }
+ if(beOptimal) {
+ maxMatches = 0;
+ }
+ if(showHelp) {
+ cout << "This program will take (sourcefile) as input and create a (patchfile).\n";
+ cout << "With this patchfile, you can convert a (sourcefile) into (targetfile).\n\n";
+ cout << "Command line info:\n";
+ cout << " GENPAT (sourcefile) (targetfile) (patchfile)\n\n";
+
+ cout << "Command line option (optional):\n";
+ cout << OPT_CHAR << "R Replace a patch with same contents as source silently if it\n already exists.\n";
+ cout << OPT_CHAR << "B=64 Set blocksize (default=64), multiple of 2 is required.\n";
+ cout << OPT_CHAR << "V More verbose information during patch creation.\n";
+ cout << OPT_CHAR << "O Deactivate match limit of the " << OPT_CHAR << "A switch (sometimes smaller patches).\n";
+ cout << OPT_CHAR << "A=500 Maximum number of block matches per block (improves performance).\n";
+ cout << " Default is 500, larger is slower. Use " << OPT_CHAR << "V to see the cut-off aborts.\n\n";
+ cout << "Note: filenames should never start with " << OPT_CHAR << " character!\n\n";
+ cout << "Possible exit codes:\n";
+ cout << " 0 Success\n";
+ cout << " 1 Arguments missing\n";
+ cout << " 2 Other error\n";
+ cout << " 3 Source file already has a patch in specified patch file (=error)\n";
+ return 1;
+ }
+
+ cout << "[Source] " << sourceFileName.c_str() << "\n";
+ cout << "[Target] " << targetFileName.c_str() << "\n[PatchFile] " << patchFileName.c_str() << "\n";
+
+ // get the file sizes
+ TFileOffset sourceSize = 0;
+ try {
+ sourceSize = POSIX::getFileSize(sourceFileName.c_str());
+ }
+ catch(char* s) {
+ cerr << "Source file size reading failed: " << s << "\n";
+ return 2;
+ }
+ TFileOffset targetSize;
+ try {
+ targetSize = POSIX::getFileSize(targetFileName.c_str());
+ }
+ catch(const char* s) {
+ cerr << "Target file size reading failed: " << s << "\n";
+ return 2;
+ }
+
+ // calculate CRCs
+ TChecksum* sourceCRC = new TChecksum(sourceFileName);
+ sourceCRC->mode = TChecksum::MD5; // default
+ TChecksum* targetCRC = new TChecksum(targetFileName);
+ targetCRC->mode = TChecksum::MD5; // default
+
+ string tempFileName = POSIX::getTempFile();
+ if (tempFileName == "")
+ return 2;
+
+ // open the files
+ bifstream source;
+ source.open(sourceFileName.c_str(), std::ios_base::binary | std::ios_base::in);
+ bifstream target;
+ target.open(targetFileName.c_str(), std::ios_base::binary | std::ios_base::in);
+ bofstream patch;
+ patch.open(tempFileName.c_str(), std::ios_base::binary | std::ios_base::out);
+
+ // remove existing patch with sourceCRC
+ TFileOffset fileCount = 0;
+ while(true) {
+ TFileOffset previousPatchSize = 0;
+ try {
+ previousPatchSize = POSIX::getFileSize(patchFileName.c_str());
+ } catch(const char* s) {
+ cout << "Patch file does not yet exist: " << s << ", it will be created.\n";
+ std::ofstream newfile;
+ newfile.open(patchFileName.c_str(), std::ios_base::binary | std::ios_base::out);
+ newfile.close();
+ }
+ bifstream previousPatch;
+ previousPatch.open(patchFileName.c_str(), std::ios_base::binary | std::ios_base::in);
+
+ try {
+ // this will copy the contents of previousPatch to patch, but without sourceCRC
+ fileCount = FileFormat1::removeExistingPatch(previousPatch,previousPatchSize,patch,sourceCRC,existanceIsError);
+ } catch(const char* s) {
+ cerr << "ERROR: " << s << "\n";
+ patch.close();
+ unlink(tempFileName.c_str());
+ return 3;
+ }
+
+ // set them to the same checksum mode
+ targetCRC->mode = sourceCRC->mode;
+ cout << "[Checksum] Kind of checksums used: ";
+ if(targetCRC->mode == TChecksum::MD5) cout << "MD5\n";
+ if(targetCRC->mode == TChecksum::CRC32) cout << "CRC32\n";
+ break;
+ }
+
+ if(source.good() && target.good() && patch.good()) {
+ PatchGenerator* gen = new PatchGenerator(source,sourceSize,target,targetSize,patch);
+ try {
+ // clean up the blocksize to be a multiple of 2
+ int orgBlockSize = blockSize;
+ int bs_counter = 0;
+ while(blockSize != 0) {
+ bs_counter++;
+ blockSize >>= 1;
+ }
+ blockSize = 1;
+ while(bs_counter != 0) {
+ blockSize <<= 1;
+ bs_counter--;
+ }
+ if((blockSize >> 1) == orgBlockSize) blockSize = orgBlockSize;
+ if(blockSize != orgBlockSize) {
+ cout << "[BlockSizeFix] Your blocksize had to be fixed since it is not a multiple of 2\n";
+ }
+ if(blockSize < 16) {
+ blockSize = 16;
+ cout << "[BlockSizeFix] Your blocksize had to be fixed since it is smaller than 16\n";
+ }
+
+ gen->blockSize = blockSize;
+ cout << "[BlockSize] " << static_cast<unsigned int>(gen->blockSize) << " bytes\n";
+
+ gen->maxMatches = maxMatches;
+ if(gen->maxMatches == 0) {
+ cout << "[FindBlockMatchLimit] Unlimited matches\n";
+ } else {
+ cout << "[FindBlockMatchLimit] " << gen->maxMatches << " matches\n";
+ }
+
+ gen->beVerbose = beVerbose;
+ if(beVerbose) {
+ cout << "[Debug] Verbose output during patch generation activated.\n";
+ }
+
+ // create sameBlock storage
+ vector<SameBlock*> sameBlocks;
+ // run the patch generator to find similar blocks
+ gen->execute(sameBlocks);
+ // construct the actual patch in FileFormat1
+ FileFormat1::writePatch(patch,target,sameBlocks,sourceCRC,targetCRC,fileCount,POSIX::getFileTime(targetFileName.c_str()));
+ // cleanup sameblocks
+ for(vector<SameBlock*>::iterator iter = sameBlocks.begin(); iter != sameBlocks.end(); iter++) {
+ delete *iter;
+ *iter = NULL;
+ }
+
+ patch.close();
+ TFileOffset patchSize = POSIX::getFileSize(tempFileName.c_str());
+
+ // finally: copy the temporary file to the actual patch
+ bifstream tempF;
+ tempF.open(tempFileName.c_str(), std::ios_base::binary | std::ios_base::in);
+ bofstream patchF;
+ patchF.open(patchFileName.c_str(), std::ios_base::binary | std::ios_base::out);
+ char* buf = new char[patchSize];
+ tempF.read(buf,patchSize);
+ patchF.write(buf,patchSize);
+ delete[] buf;
+ tempF.close();
+
+ // now empty the temporary file
+ std::ofstream clearF;
+ clearF.open(tempFileName.c_str(), std::ios_base::binary | std::ios_base::out);
+ }
+ catch(string s) {
+ cerr << "Error thrown: " << s.c_str();
+ return 2;
+ }
+ catch(const char* s) {
+ cerr << "Error thrown: " << s;
+ return 2;
+ }
+ } else {
+ cerr << "There was a problem opening the files.\n";
+ return 2;
+ }
+ if(*sourceCRC == *targetCRC)
+ cerr << "WARNING: source and target file have equal CRCs!";
+ delete sourceCRC;
+ delete targetCRC;
+ unlink(tempFileName.c_str());
+ return 0;
+}
diff --git a/Contrib/VPatch/Source/GenPat/md5.c b/Contrib/VPatch/Source/GenPat/md5.c
index e1e9f2c..0ededbf 100755
--- a/Contrib/VPatch/Source/GenPat/md5.c
+++ b/Contrib/VPatch/Source/GenPat/md5.c
@@ -1,389 +1,389 @@
-/*
- Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
-
- 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.
-
- L. Peter Deutsch
- ghost@aladdin.com
-
- */
-/* $Id: md5.c,v 1.1 2005/09/17 09:25:44 kichik Exp $ */
-/*
- Independent implementation of MD5 (RFC 1321).
-
- This code implements the MD5 Algorithm defined in RFC 1321, whose
- text is available at
- http://www.ietf.org/rfc/rfc1321.txt
- The code is derived from the text of the RFC, including the test suite
- (section A.5) but excluding the rest of Appendix A. It does not include
- any code or documentation that is identified in the RFC as being
- copyrighted.
-
- The original and principal author of md5.c is L. Peter Deutsch
- <ghost@aladdin.com>. Other authors are noted in the change history
- that follows (in reverse chronological order):
-
- 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
- either statically or dynamically; added missing #include <string.h>
- in library.
- 2002-03-11 lpd Corrected argument list for main(), and added int return
- type, in test program and T value program.
- 2002-02-21 lpd Added missing #include <stdio.h> in test program.
- 2000-07-03 lpd Patched to eliminate warnings about "constant is
- unsigned in ANSI C, signed in traditional"; made test program
- self-checking.
- 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
- 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
- 1999-05-03 lpd Original version.
- */
-
-#include "md5.h"
-
-void memcpy2( void *dest, const void *src, int count ) {
- md5_byte_t* bDest = (md5_byte_t*)dest;
- md5_byte_t* bSrc = (md5_byte_t*)src;
- int i = 0;
- for(; i < count; i++) {
- bDest[i] = bSrc[i];
- }
-}
-
-#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
-#ifdef ARCH_IS_BIG_ENDIAN
-# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
-#else
-# define BYTE_ORDER 0
-#endif
-
-#define T_MASK ((md5_word_t)~0)
-#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
-#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
-#define T3 0x242070db
-#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
-#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
-#define T6 0x4787c62a
-#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
-#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
-#define T9 0x698098d8
-#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
-#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
-#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
-#define T13 0x6b901122
-#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
-#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
-#define T16 0x49b40821
-#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
-#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
-#define T19 0x265e5a51
-#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
-#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
-#define T22 0x02441453
-#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
-#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
-#define T25 0x21e1cde6
-#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
-#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
-#define T28 0x455a14ed
-#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
-#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
-#define T31 0x676f02d9
-#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
-#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
-#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
-#define T35 0x6d9d6122
-#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
-#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
-#define T38 0x4bdecfa9
-#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
-#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
-#define T41 0x289b7ec6
-#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
-#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
-#define T44 0x04881d05
-#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
-#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
-#define T47 0x1fa27cf8
-#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
-#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
-#define T50 0x432aff97
-#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
-#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
-#define T53 0x655b59c3
-#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
-#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
-#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
-#define T57 0x6fa87e4f
-#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
-#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
-#define T60 0x4e0811a1
-#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
-#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
-#define T63 0x2ad7d2bb
-#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
-
-
-static void
-md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
-{
- md5_word_t
- a = pms->abcd[0], b = pms->abcd[1],
- c = pms->abcd[2], d = pms->abcd[3];
- md5_word_t t;
-#if BYTE_ORDER > 0
- /* Define storage only for big-endian CPUs. */
- md5_word_t X[16];
-#else
- /* Define storage for little-endian or both types of CPUs. */
- md5_word_t xbuf[16];
- const md5_word_t *X;
-#endif
-
- {
-#if BYTE_ORDER == 0
- /*
- * Determine dynamically whether this is a big-endian or
- * little-endian machine, since we can use a more efficient
- * algorithm on the latter.
- */
- static const int w = 1;
-
- if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
-#endif
-#if BYTE_ORDER <= 0 /* little-endian */
- {
- /*
- * On little-endian machines, we can process properly aligned
- * data without copying it.
- */
- if (!((data - (const md5_byte_t *)0) & 3)) {
- /* data are properly aligned */
- X = (const md5_word_t *)data;
- } else {
- /* not aligned */
- memcpy2(xbuf, data, 64);
- X = xbuf;
- }
- }
-#endif
-#if BYTE_ORDER == 0
- else /* dynamic big-endian */
-#endif
-#if BYTE_ORDER >= 0 /* big-endian */
- {
- /*
- * On big-endian machines, we must arrange the bytes in the
- * right order.
- */
- const md5_byte_t *xp = data;
- int i;
-
-# if BYTE_ORDER == 0
- X = xbuf; /* (dynamic only) */
-# else
-# define xbuf X /* (static only) */
-# endif
- for (i = 0; i < 16; ++i, xp += 4)
- xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
- }
-#endif
- }
-
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
-
- /* Round 1. */
- /* Let [abcd k s i] denote the operation
- a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
-#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + F(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 0, 7, T1);
- SET(d, a, b, c, 1, 12, T2);
- SET(c, d, a, b, 2, 17, T3);
- SET(b, c, d, a, 3, 22, T4);
- SET(a, b, c, d, 4, 7, T5);
- SET(d, a, b, c, 5, 12, T6);
- SET(c, d, a, b, 6, 17, T7);
- SET(b, c, d, a, 7, 22, T8);
- SET(a, b, c, d, 8, 7, T9);
- SET(d, a, b, c, 9, 12, T10);
- SET(c, d, a, b, 10, 17, T11);
- SET(b, c, d, a, 11, 22, T12);
- SET(a, b, c, d, 12, 7, T13);
- SET(d, a, b, c, 13, 12, T14);
- SET(c, d, a, b, 14, 17, T15);
- SET(b, c, d, a, 15, 22, T16);
-#undef SET
-
- /* Round 2. */
- /* Let [abcd k s i] denote the operation
- a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
-#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + G(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 1, 5, T17);
- SET(d, a, b, c, 6, 9, T18);
- SET(c, d, a, b, 11, 14, T19);
- SET(b, c, d, a, 0, 20, T20);
- SET(a, b, c, d, 5, 5, T21);
- SET(d, a, b, c, 10, 9, T22);
- SET(c, d, a, b, 15, 14, T23);
- SET(b, c, d, a, 4, 20, T24);
- SET(a, b, c, d, 9, 5, T25);
- SET(d, a, b, c, 14, 9, T26);
- SET(c, d, a, b, 3, 14, T27);
- SET(b, c, d, a, 8, 20, T28);
- SET(a, b, c, d, 13, 5, T29);
- SET(d, a, b, c, 2, 9, T30);
- SET(c, d, a, b, 7, 14, T31);
- SET(b, c, d, a, 12, 20, T32);
-#undef SET
-
- /* Round 3. */
- /* Let [abcd k s t] denote the operation
- a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + H(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 5, 4, T33);
- SET(d, a, b, c, 8, 11, T34);
- SET(c, d, a, b, 11, 16, T35);
- SET(b, c, d, a, 14, 23, T36);
- SET(a, b, c, d, 1, 4, T37);
- SET(d, a, b, c, 4, 11, T38);
- SET(c, d, a, b, 7, 16, T39);
- SET(b, c, d, a, 10, 23, T40);
- SET(a, b, c, d, 13, 4, T41);
- SET(d, a, b, c, 0, 11, T42);
- SET(c, d, a, b, 3, 16, T43);
- SET(b, c, d, a, 6, 23, T44);
- SET(a, b, c, d, 9, 4, T45);
- SET(d, a, b, c, 12, 11, T46);
- SET(c, d, a, b, 15, 16, T47);
- SET(b, c, d, a, 2, 23, T48);
-#undef SET
-
- /* Round 4. */
- /* Let [abcd k s t] denote the operation
- a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
-#define I(x, y, z) ((y) ^ ((x) | ~(z)))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + I(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 0, 6, T49);
- SET(d, a, b, c, 7, 10, T50);
- SET(c, d, a, b, 14, 15, T51);
- SET(b, c, d, a, 5, 21, T52);
- SET(a, b, c, d, 12, 6, T53);
- SET(d, a, b, c, 3, 10, T54);
- SET(c, d, a, b, 10, 15, T55);
- SET(b, c, d, a, 1, 21, T56);
- SET(a, b, c, d, 8, 6, T57);
- SET(d, a, b, c, 15, 10, T58);
- SET(c, d, a, b, 6, 15, T59);
- SET(b, c, d, a, 13, 21, T60);
- SET(a, b, c, d, 4, 6, T61);
- SET(d, a, b, c, 11, 10, T62);
- SET(c, d, a, b, 2, 15, T63);
- SET(b, c, d, a, 9, 21, T64);
-#undef SET
-
- /* Then perform the following additions. (That is increment each
- of the four registers by the value it had before this block
- was started.) */
- pms->abcd[0] += a;
- pms->abcd[1] += b;
- pms->abcd[2] += c;
- pms->abcd[3] += d;
-}
-
-void
-md5_init(md5_state_t *pms)
-{
- pms->count[0] = pms->count[1] = 0;
- pms->abcd[0] = 0x67452301;
- pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
- pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
- pms->abcd[3] = 0x10325476;
-}
-
-void
-md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
-{
- const md5_byte_t *p = data;
- int left = nbytes;
- int offset = (pms->count[0] >> 3) & 63;
- md5_word_t nbits = (md5_word_t)(nbytes << 3);
-
- if (nbytes <= 0)
- return;
-
- /* Update the message length. */
- pms->count[1] += nbytes >> 29;
- pms->count[0] += nbits;
- if (pms->count[0] < nbits)
- pms->count[1]++;
-
- /* Process an initial partial block. */
- if (offset) {
- int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
-
- memcpy2(pms->buf + offset, p, copy);
- if (offset + copy < 64)
- return;
- p += copy;
- left -= copy;
- md5_process(pms, pms->buf);
- }
-
- /* Process full blocks. */
- for (; left >= 64; p += 64, left -= 64)
- md5_process(pms, p);
-
- /* Process a final partial block. */
- if (left)
- memcpy2(pms->buf, p, left);
-}
-
-void
-md5_finish(md5_state_t *pms, md5_byte_t digest[16])
-{
- static const md5_byte_t pad[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
- md5_byte_t data[8];
- int i;
-
- /* Save the length before padding. */
- for (i = 0; i < 8; ++i)
- data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
- /* Pad to 56 bytes mod 64. */
- md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
- /* Append the length. */
- md5_append(pms, data, 8);
- for (i = 0; i < 16; ++i)
- digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
-}
+/*
+ Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
+
+ 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.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.c is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
+ either statically or dynamically; added missing #include <string.h>
+ in library.
+ 2002-03-11 lpd Corrected argument list for main(), and added int return
+ type, in test program and T value program.
+ 2002-02-21 lpd Added missing #include <stdio.h> in test program.
+ 2000-07-03 lpd Patched to eliminate warnings about "constant is
+ unsigned in ANSI C, signed in traditional"; made test program
+ self-checking.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
+ 1999-05-03 lpd Original version.
+ */
+
+#include "md5.h"
+
+void memcpy2( void *dest, const void *src, int count ) {
+ md5_byte_t* bDest = (md5_byte_t*)dest;
+ md5_byte_t* bSrc = (md5_byte_t*)src;
+ int i = 0;
+ for(; i < count; i++) {
+ bDest[i] = bSrc[i];
+ }
+}
+
+#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
+#ifdef ARCH_IS_BIG_ENDIAN
+# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
+#else
+# define BYTE_ORDER 0
+#endif
+
+#define T_MASK ((md5_word_t)~0)
+#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
+#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
+#define T3 0x242070db
+#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
+#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
+#define T6 0x4787c62a
+#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
+#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
+#define T9 0x698098d8
+#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
+#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
+#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
+#define T13 0x6b901122
+#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
+#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
+#define T16 0x49b40821
+#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
+#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
+#define T19 0x265e5a51
+#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
+#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
+#define T22 0x02441453
+#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
+#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
+#define T25 0x21e1cde6
+#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
+#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
+#define T28 0x455a14ed
+#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
+#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
+#define T31 0x676f02d9
+#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
+#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
+#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
+#define T35 0x6d9d6122
+#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
+#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
+#define T38 0x4bdecfa9
+#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
+#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
+#define T41 0x289b7ec6
+#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
+#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
+#define T44 0x04881d05
+#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
+#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
+#define T47 0x1fa27cf8
+#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
+#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
+#define T50 0x432aff97
+#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
+#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
+#define T53 0x655b59c3
+#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
+#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
+#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
+#define T57 0x6fa87e4f
+#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
+#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
+#define T60 0x4e0811a1
+#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
+#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
+#define T63 0x2ad7d2bb
+#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
+
+
+static void
+md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
+{
+ md5_word_t
+ a = pms->abcd[0], b = pms->abcd[1],
+ c = pms->abcd[2], d = pms->abcd[3];
+ md5_word_t t;
+#if BYTE_ORDER > 0
+ /* Define storage only for big-endian CPUs. */
+ md5_word_t X[16];
+#else
+ /* Define storage for little-endian or both types of CPUs. */
+ md5_word_t xbuf[16];
+ const md5_word_t *X;
+#endif
+
+ {
+#if BYTE_ORDER == 0
+ /*
+ * Determine dynamically whether this is a big-endian or
+ * little-endian machine, since we can use a more efficient
+ * algorithm on the latter.
+ */
+ static const int w = 1;
+
+ if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
+#endif
+#if BYTE_ORDER <= 0 /* little-endian */
+ {
+ /*
+ * On little-endian machines, we can process properly aligned
+ * data without copying it.
+ */
+ if (!((data - (const md5_byte_t *)0) & 3)) {
+ /* data are properly aligned */
+ X = (const md5_word_t *)data;
+ } else {
+ /* not aligned */
+ memcpy2(xbuf, data, 64);
+ X = xbuf;
+ }
+ }
+#endif
+#if BYTE_ORDER == 0
+ else /* dynamic big-endian */
+#endif
+#if BYTE_ORDER >= 0 /* big-endian */
+ {
+ /*
+ * On big-endian machines, we must arrange the bytes in the
+ * right order.
+ */
+ const md5_byte_t *xp = data;
+ int i;
+
+# if BYTE_ORDER == 0
+ X = xbuf; /* (dynamic only) */
+# else
+# define xbuf X /* (static only) */
+# endif
+ for (i = 0; i < 16; ++i, xp += 4)
+ xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
+ }
+#endif
+ }
+
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
+
+ /* Round 1. */
+ /* Let [abcd k s i] denote the operation
+ a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
+#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + F(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 0, 7, T1);
+ SET(d, a, b, c, 1, 12, T2);
+ SET(c, d, a, b, 2, 17, T3);
+ SET(b, c, d, a, 3, 22, T4);
+ SET(a, b, c, d, 4, 7, T5);
+ SET(d, a, b, c, 5, 12, T6);
+ SET(c, d, a, b, 6, 17, T7);
+ SET(b, c, d, a, 7, 22, T8);
+ SET(a, b, c, d, 8, 7, T9);
+ SET(d, a, b, c, 9, 12, T10);
+ SET(c, d, a, b, 10, 17, T11);
+ SET(b, c, d, a, 11, 22, T12);
+ SET(a, b, c, d, 12, 7, T13);
+ SET(d, a, b, c, 13, 12, T14);
+ SET(c, d, a, b, 14, 17, T15);
+ SET(b, c, d, a, 15, 22, T16);
+#undef SET
+
+ /* Round 2. */
+ /* Let [abcd k s i] denote the operation
+ a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
+#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + G(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 1, 5, T17);
+ SET(d, a, b, c, 6, 9, T18);
+ SET(c, d, a, b, 11, 14, T19);
+ SET(b, c, d, a, 0, 20, T20);
+ SET(a, b, c, d, 5, 5, T21);
+ SET(d, a, b, c, 10, 9, T22);
+ SET(c, d, a, b, 15, 14, T23);
+ SET(b, c, d, a, 4, 20, T24);
+ SET(a, b, c, d, 9, 5, T25);
+ SET(d, a, b, c, 14, 9, T26);
+ SET(c, d, a, b, 3, 14, T27);
+ SET(b, c, d, a, 8, 20, T28);
+ SET(a, b, c, d, 13, 5, T29);
+ SET(d, a, b, c, 2, 9, T30);
+ SET(c, d, a, b, 7, 14, T31);
+ SET(b, c, d, a, 12, 20, T32);
+#undef SET
+
+ /* Round 3. */
+ /* Let [abcd k s t] denote the operation
+ a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + H(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 5, 4, T33);
+ SET(d, a, b, c, 8, 11, T34);
+ SET(c, d, a, b, 11, 16, T35);
+ SET(b, c, d, a, 14, 23, T36);
+ SET(a, b, c, d, 1, 4, T37);
+ SET(d, a, b, c, 4, 11, T38);
+ SET(c, d, a, b, 7, 16, T39);
+ SET(b, c, d, a, 10, 23, T40);
+ SET(a, b, c, d, 13, 4, T41);
+ SET(d, a, b, c, 0, 11, T42);
+ SET(c, d, a, b, 3, 16, T43);
+ SET(b, c, d, a, 6, 23, T44);
+ SET(a, b, c, d, 9, 4, T45);
+ SET(d, a, b, c, 12, 11, T46);
+ SET(c, d, a, b, 15, 16, T47);
+ SET(b, c, d, a, 2, 23, T48);
+#undef SET
+
+ /* Round 4. */
+ /* Let [abcd k s t] denote the operation
+ a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
+#define I(x, y, z) ((y) ^ ((x) | ~(z)))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + I(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 0, 6, T49);
+ SET(d, a, b, c, 7, 10, T50);
+ SET(c, d, a, b, 14, 15, T51);
+ SET(b, c, d, a, 5, 21, T52);
+ SET(a, b, c, d, 12, 6, T53);
+ SET(d, a, b, c, 3, 10, T54);
+ SET(c, d, a, b, 10, 15, T55);
+ SET(b, c, d, a, 1, 21, T56);
+ SET(a, b, c, d, 8, 6, T57);
+ SET(d, a, b, c, 15, 10, T58);
+ SET(c, d, a, b, 6, 15, T59);
+ SET(b, c, d, a, 13, 21, T60);
+ SET(a, b, c, d, 4, 6, T61);
+ SET(d, a, b, c, 11, 10, T62);
+ SET(c, d, a, b, 2, 15, T63);
+ SET(b, c, d, a, 9, 21, T64);
+#undef SET
+
+ /* Then perform the following additions. (That is increment each
+ of the four registers by the value it had before this block
+ was started.) */
+ pms->abcd[0] += a;
+ pms->abcd[1] += b;
+ pms->abcd[2] += c;
+ pms->abcd[3] += d;
+}
+
+void
+md5_init(md5_state_t *pms)
+{
+ pms->count[0] = pms->count[1] = 0;
+ pms->abcd[0] = 0x67452301;
+ pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
+ pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
+ pms->abcd[3] = 0x10325476;
+}
+
+void
+md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
+{
+ const md5_byte_t *p = data;
+ int left = nbytes;
+ int offset = (pms->count[0] >> 3) & 63;
+ md5_word_t nbits = (md5_word_t)(nbytes << 3);
+
+ if (nbytes <= 0)
+ return;
+
+ /* Update the message length. */
+ pms->count[1] += nbytes >> 29;
+ pms->count[0] += nbits;
+ if (pms->count[0] < nbits)
+ pms->count[1]++;
+
+ /* Process an initial partial block. */
+ if (offset) {
+ int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
+
+ memcpy2(pms->buf + offset, p, copy);
+ if (offset + copy < 64)
+ return;
+ p += copy;
+ left -= copy;
+ md5_process(pms, pms->buf);
+ }
+
+ /* Process full blocks. */
+ for (; left >= 64; p += 64, left -= 64)
+ md5_process(pms, p);
+
+ /* Process a final partial block. */
+ if (left)
+ memcpy2(pms->buf, p, left);
+}
+
+void
+md5_finish(md5_state_t *pms, md5_byte_t digest[16])
+{
+ static const md5_byte_t pad[64] = {
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ md5_byte_t data[8];
+ int i;
+
+ /* Save the length before padding. */
+ for (i = 0; i < 8; ++i)
+ data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
+ /* Pad to 56 bytes mod 64. */
+ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
+ /* Append the length. */
+ md5_append(pms, data, 8);
+ for (i = 0; i < 16; ++i)
+ digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
+}
diff --git a/Contrib/VPatch/Source/GenPat/md5.h b/Contrib/VPatch/Source/GenPat/md5.h
index 829150e..698c995 100755
--- a/Contrib/VPatch/Source/GenPat/md5.h
+++ b/Contrib/VPatch/Source/GenPat/md5.h
@@ -1,91 +1,91 @@
-/*
- Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
-
- 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.
-
- L. Peter Deutsch
- ghost@aladdin.com
-
- */
-/* $Id: md5.h,v 1.1 2005/09/17 09:25:44 kichik Exp $ */
-/*
- Independent implementation of MD5 (RFC 1321).
-
- This code implements the MD5 Algorithm defined in RFC 1321, whose
- text is available at
- http://www.ietf.org/rfc/rfc1321.txt
- The code is derived from the text of the RFC, including the test suite
- (section A.5) but excluding the rest of Appendix A. It does not include
- any code or documentation that is identified in the RFC as being
- copyrighted.
-
- The original and principal author of md5.h is L. Peter Deutsch
- <ghost@aladdin.com>. Other authors are noted in the change history
- that follows (in reverse chronological order):
-
- 2002-04-13 lpd Removed support for non-ANSI compilers; removed
- references to Ghostscript; clarified derivation from RFC 1321;
- now handles byte order either statically or dynamically.
- 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
- 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
- added conditionalization for C++ compilation from Martin
- Purschke <purschke@bnl.gov>.
- 1999-05-03 lpd Original version.
- */
-
-#ifndef md5_INCLUDED
-# define md5_INCLUDED
-
-/*
- * This package supports both compile-time and run-time determination of CPU
- * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
- * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
- * defined as non-zero, the code will be compiled to run only on big-endian
- * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
- * run on either big- or little-endian CPUs, but will run slightly less
- * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
- */
-
-typedef unsigned char md5_byte_t; /* 8-bit byte */
-typedef unsigned int md5_word_t; /* 32-bit word */
-
-/* Define the state of the MD5 Algorithm. */
-typedef struct md5_state_s {
- md5_word_t count[2]; /* message length in bits, lsw first */
- md5_word_t abcd[4]; /* digest buffer */
- md5_byte_t buf[64]; /* accumulate block */
-} md5_state_t;
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Initialize the algorithm. */
-void md5_init(md5_state_t *pms);
-
-/* Append a string to the message. */
-void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
-
-/* Finish the message and return the digest. */
-void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif
-
-#endif /* md5_INCLUDED */
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ 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.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+#ifndef md5_INCLUDED
+# define md5_INCLUDED
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char md5_byte_t; /* 8-bit byte */
+typedef unsigned int md5_word_t; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct md5_state_s {
+ md5_word_t count[2]; /* message length in bits, lsw first */
+ md5_word_t abcd[4]; /* digest buffer */
+ md5_byte_t buf[64]; /* accumulate block */
+} md5_state_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Initialize the algorithm. */
+void md5_init(md5_state_t *pms);
+
+/* Append a string to the message. */
+void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
+
+/* Finish the message and return the digest. */
+void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
diff --git a/Contrib/VPatch/Source/Plugin/SConscript b/Contrib/VPatch/Source/Plugin/SConscript
index e61d078..007fe0e 100755
--- a/Contrib/VPatch/Source/Plugin/SConscript
+++ b/Contrib/VPatch/Source/Plugin/SConscript
@@ -1,16 +1,16 @@
-target = 'VPatch'
-
-files = Split("""
- apply_patch.c
- checksum.c
- md5.c
- vpatchdll.c
-""")
-
-libs = Split("""
- kernel32
-""")
-
-Import('BuildPlugin env')
-
-BuildPlugin(target, files, libs)
+target = 'VPatch'
+
+files = Split("""
+ apply_patch.c
+ checksum.c
+ md5.c
+ vpatchdll.c
+""")
+
+libs = Split("""
+ kernel32
+""")
+
+Import('BuildPlugin env')
+
+BuildPlugin(target, files, libs)
diff --git a/Contrib/VPatch/Source/Plugin/apply_patch.c b/Contrib/VPatch/Source/Plugin/apply_patch.c
index e916232..1384dcd 100755
--- a/Contrib/VPatch/Source/Plugin/apply_patch.c
+++ b/Contrib/VPatch/Source/Plugin/apply_patch.c
@@ -1,239 +1,239 @@
-//---------------------------------------------------------------------------
-// apply_patch.c
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#include "apply_patch.h"
-#include "checksum.h"
-
-/* ------------------------ patch application ----------------- */
-
-#define BLOCKSIZE 16384
-
-int DoPatch(HANDLE hPatch, HANDLE hSource, HANDLE hDest) {
-
- static char block[BLOCKSIZE];
-
- unsigned long temp = 0;
- unsigned long read;
- unsigned long source_crc = 0;
- md5_byte_t source_md5[16];
- unsigned long patch_dest_crc = 0;
- md5_byte_t patch_dest_md5[16];
- int MD5Mode = 0;
- unsigned long patches = 0;
- int already_uptodate = 0;
-
- FILETIME targetModifiedTime;
-
- // special 'addition' for the dll: since the patch file is now
- // in a seperate file, the VPAT header might be right at the start
- // of the file, and a pointer at the end of the file is probably missing
- // (because all patch generator versions don't append it, the linker/gui
- // does this).
- SetFilePointer(hPatch, 0, NULL, FILE_BEGIN);
- ReadFile(hPatch, &temp, 4, &read, NULL);
- // it's not at the start of file -> there must be a pointer at the end of
- // file then
- if (temp != 0x54415056) {
- SetFilePointer(hPatch, -4, NULL, FILE_END);
- ReadFile(hPatch, &temp, 4, &read, NULL);
-
- SetFilePointer(hPatch, temp, NULL, FILE_BEGIN);
- ReadFile(hPatch, &temp, 4, &read, NULL);
- if (temp != 0x54415056)
- return PATCH_CORRUPT;
- }
-
- // target file date is by default the current system time
- GetSystemTimeAsFileTime(&targetModifiedTime);
-
- // read the number of patches in the file
- ReadFile(hPatch, &patches, 4, &read, NULL);
- if(patches & 0x80000000) MD5Mode = 1;
- // MSB is now reserved for future extensions, anyone wanting more than
- // 16 million patches in a single file is nuts anyway
- patches = patches & 0x00FFFFFF;
-
- if(!MD5Mode) {
- if (!FileCRC(hSource, &source_crc))
- return PATCH_ERROR;
- } else {
- if (!FileMD5(hSource, source_md5))
- return PATCH_ERROR;
- }
-
- while (patches--) {
- long patch_blocks = 0, patch_size = 0;
-
- // flag which needs to be set by one of the checksum checks
- int currentPatchMatchesChecksum = 0;
-
- // read the number of blocks this patch has
- if(!ReadFile(hPatch, &patch_blocks, 4, &read, NULL)) {
- return PATCH_CORRUPT;
- }
-
- // read checksums
- if(!MD5Mode) {
- unsigned long patch_source_crc = 0;
- if(!ReadFile(hPatch, &patch_source_crc, 4, &read, NULL)) {
- return PATCH_CORRUPT;
- }
- if(!ReadFile(hPatch, &patch_dest_crc, 4, &read, NULL)) {
- return PATCH_CORRUPT;
- }
- // check to see if it's already up-to-date for some patch
- if (source_crc == patch_dest_crc) {
- already_uptodate = 1;
- }
- if (source_crc == patch_source_crc) {
- currentPatchMatchesChecksum = 1;
- }
- } else {
- int md5index;
- md5_byte_t patch_source_md5[16];
- if(!ReadFile(hPatch, patch_source_md5, 16, &read, NULL)) {
- return PATCH_CORRUPT;
- }
- if(!ReadFile(hPatch, patch_dest_md5, 16, &read, NULL)) {
- return PATCH_CORRUPT;
- }
- // check to see if it's already up-to-date for some patch
- for(md5index = 0; md5index < 16; md5index++) {
- if(source_md5[md5index] != patch_dest_md5[md5index]) break;
- if(md5index == 15) already_uptodate = 1;
- }
- for(md5index = 0; md5index < 16; md5index++) {
- if(source_md5[md5index] != patch_source_md5[md5index]) break;
- if(md5index == 15) currentPatchMatchesChecksum = 1;
- }
- }
- // read the size of the patch, we can use this to skip over it
- if(!ReadFile(hPatch, &patch_size, 4, &read, NULL)) {
- return PATCH_CORRUPT;
- }
-
- if(currentPatchMatchesChecksum) {
- while (patch_blocks--) {
- unsigned char blocktype = 0;
- unsigned long blocksize = 0;
- if(!ReadFile(hPatch, &blocktype, 1, &read, NULL)) {
- return PATCH_CORRUPT;
- }
- switch (blocktype) {
- case 1:
- case 2:
- case 3:
- if (blocktype == 1)
- { unsigned char x; blocksize = ReadFile(hPatch,&x,1,&read,NULL)? x: 0; }
- else if (blocktype == 2)
- { unsigned short x; blocksize = ReadFile(hPatch,&x,2,&read,NULL)? x: 0; }
- else
- { unsigned long x; blocksize = ReadFile(hPatch,&x,4,&read,NULL)? x:0; }
-
- if (!blocksize || !ReadFile(hPatch, &temp, 4, &read, NULL) || read != 4)
- return PATCH_CORRUPT;
-
- SetFilePointer(hSource, temp, 0, FILE_BEGIN);
-
- do {
- if(!ReadFile(hSource, block, min(BLOCKSIZE, blocksize), &read, NULL)) {
- return PATCH_ERROR;
- }
- WriteFile(hDest, block, read, &temp, NULL);
- if (temp != min(BLOCKSIZE, blocksize))
- return PATCH_ERROR;
- blocksize -= temp;
- } while (temp);
-
- break;
-
- case 5:
- case 6:
- case 7:
- if (blocktype == 5)
- { unsigned char x; blocksize = ReadFile(hPatch,&x,1,&read,NULL)? x:0; }
- else if (blocktype == 6)
- { unsigned short x; blocksize = ReadFile(hPatch,&x,2,&read,NULL)? x:0; }
- else
- { unsigned long x; blocksize = ReadFile(hPatch,&x,4,&read,NULL)? x:0; }
-
- if (!blocksize)
- return PATCH_CORRUPT;
-
- do {
- if(!ReadFile(hPatch, block, min(BLOCKSIZE, blocksize), &read, NULL)) {
- return PATCH_CORRUPT;
- }
- WriteFile(hDest, block, read, &temp, NULL);
- if (temp != min(BLOCKSIZE, blocksize))
- return PATCH_ERROR;
- blocksize -= temp;
- } while (temp);
-
- break;
-
- case 255: // read the file modified time from the patch
- if(!ReadFile(hPatch,&targetModifiedTime,sizeof(targetModifiedTime),&read,NULL)) {
- return PATCH_CORRUPT;
- }
- break;
-
- default:
- return PATCH_CORRUPT;
- }
- }
- if(!MD5Mode) {
- unsigned long dest_crc = 0;
- if(!FileCRC(hDest, &dest_crc)) {
- return PATCH_ERROR;
- }
- if (dest_crc != patch_dest_crc)
- return PATCH_ERROR;
- } else {
- int md5index;
- md5_byte_t dest_md5[16];
- if(!FileMD5(hDest, dest_md5)) {
- return PATCH_ERROR;
- }
- for(md5index = 0; md5index < 16; md5index++) {
- if(dest_md5[md5index] != patch_dest_md5[md5index]) return PATCH_ERROR;
- }
- }
- // set file time
- SetFileTime(hDest, NULL, NULL, &targetModifiedTime);
-
- return PATCH_SUCCESS;
- } else {
- SetFilePointer(hPatch, patch_size, NULL, FILE_CURRENT);
- }
- }
-
- // if already up to date, it doesn't matter that we didn't match
- if(already_uptodate) {
- return PATCH_UPTODATE;
- } else {
- return PATCH_NOMATCH;
- }
-}
+//---------------------------------------------------------------------------
+// apply_patch.c
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#include "apply_patch.h"
+#include "checksum.h"
+
+/* ------------------------ patch application ----------------- */
+
+#define BLOCKSIZE 16384
+
+int DoPatch(HANDLE hPatch, HANDLE hSource, HANDLE hDest) {
+
+ static char block[BLOCKSIZE];
+
+ unsigned long temp = 0;
+ unsigned long read;
+ unsigned long source_crc = 0;
+ md5_byte_t source_md5[16];
+ unsigned long patch_dest_crc = 0;
+ md5_byte_t patch_dest_md5[16];
+ int MD5Mode = 0;
+ unsigned long patches = 0;
+ int already_uptodate = 0;
+
+ FILETIME targetModifiedTime;
+
+ // special 'addition' for the dll: since the patch file is now
+ // in a seperate file, the VPAT header might be right at the start
+ // of the file, and a pointer at the end of the file is probably missing
+ // (because all patch generator versions don't append it, the linker/gui
+ // does this).
+ SetFilePointer(hPatch, 0, NULL, FILE_BEGIN);
+ ReadFile(hPatch, &temp, 4, &read, NULL);
+ // it's not at the start of file -> there must be a pointer at the end of
+ // file then
+ if (temp != 0x54415056) {
+ SetFilePointer(hPatch, -4, NULL, FILE_END);
+ ReadFile(hPatch, &temp, 4, &read, NULL);
+
+ SetFilePointer(hPatch, temp, NULL, FILE_BEGIN);
+ ReadFile(hPatch, &temp, 4, &read, NULL);
+ if (temp != 0x54415056)
+ return PATCH_CORRUPT;
+ }
+
+ // target file date is by default the current system time
+ GetSystemTimeAsFileTime(&targetModifiedTime);
+
+ // read the number of patches in the file
+ ReadFile(hPatch, &patches, 4, &read, NULL);
+ if(patches & 0x80000000) MD5Mode = 1;
+ // MSB is now reserved for future extensions, anyone wanting more than
+ // 16 million patches in a single file is nuts anyway
+ patches = patches & 0x00FFFFFF;
+
+ if(!MD5Mode) {
+ if (!FileCRC(hSource, &source_crc))
+ return PATCH_ERROR;
+ } else {
+ if (!FileMD5(hSource, source_md5))
+ return PATCH_ERROR;
+ }
+
+ while (patches--) {
+ long patch_blocks = 0, patch_size = 0;
+
+ // flag which needs to be set by one of the checksum checks
+ int currentPatchMatchesChecksum = 0;
+
+ // read the number of blocks this patch has
+ if(!ReadFile(hPatch, &patch_blocks, 4, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+
+ // read checksums
+ if(!MD5Mode) {
+ unsigned long patch_source_crc = 0;
+ if(!ReadFile(hPatch, &patch_source_crc, 4, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+ if(!ReadFile(hPatch, &patch_dest_crc, 4, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+ // check to see if it's already up-to-date for some patch
+ if (source_crc == patch_dest_crc) {
+ already_uptodate = 1;
+ }
+ if (source_crc == patch_source_crc) {
+ currentPatchMatchesChecksum = 1;
+ }
+ } else {
+ int md5index;
+ md5_byte_t patch_source_md5[16];
+ if(!ReadFile(hPatch, patch_source_md5, 16, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+ if(!ReadFile(hPatch, patch_dest_md5, 16, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+ // check to see if it's already up-to-date for some patch
+ for(md5index = 0; md5index < 16; md5index++) {
+ if(source_md5[md5index] != patch_dest_md5[md5index]) break;
+ if(md5index == 15) already_uptodate = 1;
+ }
+ for(md5index = 0; md5index < 16; md5index++) {
+ if(source_md5[md5index] != patch_source_md5[md5index]) break;
+ if(md5index == 15) currentPatchMatchesChecksum = 1;
+ }
+ }
+ // read the size of the patch, we can use this to skip over it
+ if(!ReadFile(hPatch, &patch_size, 4, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+
+ if(currentPatchMatchesChecksum) {
+ while (patch_blocks--) {
+ unsigned char blocktype = 0;
+ unsigned long blocksize = 0;
+ if(!ReadFile(hPatch, &blocktype, 1, &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+ switch (blocktype) {
+ case 1:
+ case 2:
+ case 3:
+ if (blocktype == 1)
+ { unsigned char x; blocksize = ReadFile(hPatch,&x,1,&read,NULL)? x: 0; }
+ else if (blocktype == 2)
+ { unsigned short x; blocksize = ReadFile(hPatch,&x,2,&read,NULL)? x: 0; }
+ else
+ { unsigned long x; blocksize = ReadFile(hPatch,&x,4,&read,NULL)? x:0; }
+
+ if (!blocksize || !ReadFile(hPatch, &temp, 4, &read, NULL) || read != 4)
+ return PATCH_CORRUPT;
+
+ SetFilePointer(hSource, temp, 0, FILE_BEGIN);
+
+ do {
+ if(!ReadFile(hSource, block, min(BLOCKSIZE, blocksize), &read, NULL)) {
+ return PATCH_ERROR;
+ }
+ WriteFile(hDest, block, read, &temp, NULL);
+ if (temp != min(BLOCKSIZE, blocksize))
+ return PATCH_ERROR;
+ blocksize -= temp;
+ } while (temp);
+
+ break;
+
+ case 5:
+ case 6:
+ case 7:
+ if (blocktype == 5)
+ { unsigned char x; blocksize = ReadFile(hPatch,&x,1,&read,NULL)? x:0; }
+ else if (blocktype == 6)
+ { unsigned short x; blocksize = ReadFile(hPatch,&x,2,&read,NULL)? x:0; }
+ else
+ { unsigned long x; blocksize = ReadFile(hPatch,&x,4,&read,NULL)? x:0; }
+
+ if (!blocksize)
+ return PATCH_CORRUPT;
+
+ do {
+ if(!ReadFile(hPatch, block, min(BLOCKSIZE, blocksize), &read, NULL)) {
+ return PATCH_CORRUPT;
+ }
+ WriteFile(hDest, block, read, &temp, NULL);
+ if (temp != min(BLOCKSIZE, blocksize))
+ return PATCH_ERROR;
+ blocksize -= temp;
+ } while (temp);
+
+ break;
+
+ case 255: // read the file modified time from the patch
+ if(!ReadFile(hPatch,&targetModifiedTime,sizeof(targetModifiedTime),&read,NULL)) {
+ return PATCH_CORRUPT;
+ }
+ break;
+
+ default:
+ return PATCH_CORRUPT;
+ }
+ }
+ if(!MD5Mode) {
+ unsigned long dest_crc = 0;
+ if(!FileCRC(hDest, &dest_crc)) {
+ return PATCH_ERROR;
+ }
+ if (dest_crc != patch_dest_crc)
+ return PATCH_ERROR;
+ } else {
+ int md5index;
+ md5_byte_t dest_md5[16];
+ if(!FileMD5(hDest, dest_md5)) {
+ return PATCH_ERROR;
+ }
+ for(md5index = 0; md5index < 16; md5index++) {
+ if(dest_md5[md5index] != patch_dest_md5[md5index]) return PATCH_ERROR;
+ }
+ }
+ // set file time
+ SetFileTime(hDest, NULL, NULL, &targetModifiedTime);
+
+ return PATCH_SUCCESS;
+ } else {
+ SetFilePointer(hPatch, patch_size, NULL, FILE_CURRENT);
+ }
+ }
+
+ // if already up to date, it doesn't matter that we didn't match
+ if(already_uptodate) {
+ return PATCH_UPTODATE;
+ } else {
+ return PATCH_NOMATCH;
+ }
+}
diff --git a/Contrib/VPatch/Source/Plugin/apply_patch.h b/Contrib/VPatch/Source/Plugin/apply_patch.h
index f2e8bb1..7716175 100755
--- a/Contrib/VPatch/Source/Plugin/apply_patch.h
+++ b/Contrib/VPatch/Source/Plugin/apply_patch.h
@@ -1,45 +1,45 @@
-//---------------------------------------------------------------------------
-// apply_patch.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#ifndef apply_patch_INCLUDED
-#define apply_patch_INCLUDED
-
-#include <windows.h>
-
-/* ------------------------ patch application ----------------- */
-
-// possible return values
-#define PATCH_SUCCESS 0
-#define PATCH_ERROR 1
-#define PATCH_CORRUPT 2
-#define PATCH_NOMATCH 3
-#define PATCH_UPTODATE 4
-#define FILE_ERR_PATCH 5
-#define FILE_ERR_SOURCE 6
-#define FILE_ERR_DEST 7
-
-int DoPatch(HANDLE hPatch, HANDLE hSource, HANDLE hDest);
-
-#endif
+//---------------------------------------------------------------------------
+// apply_patch.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#ifndef apply_patch_INCLUDED
+#define apply_patch_INCLUDED
+
+#include <windows.h>
+
+/* ------------------------ patch application ----------------- */
+
+// possible return values
+#define PATCH_SUCCESS 0
+#define PATCH_ERROR 1
+#define PATCH_CORRUPT 2
+#define PATCH_NOMATCH 3
+#define PATCH_UPTODATE 4
+#define FILE_ERR_PATCH 5
+#define FILE_ERR_SOURCE 6
+#define FILE_ERR_DEST 7
+
+int DoPatch(HANDLE hPatch, HANDLE hSource, HANDLE hDest);
+
+#endif
diff --git a/Contrib/VPatch/Source/Plugin/checksum.c b/Contrib/VPatch/Source/Plugin/checksum.c
index 4e83bf5..81b1d27 100755
--- a/Contrib/VPatch/Source/Plugin/checksum.c
+++ b/Contrib/VPatch/Source/Plugin/checksum.c
@@ -1,129 +1,129 @@
-//---------------------------------------------------------------------------
-// checksum.c
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#include "checksum.h"
-
-#ifdef _MSC_VER
-# define FORCE_INLINE __forceinline
-#else
-# ifdef __GNUC__
-# if __GNUC__ < 3
-# define FORCE_INLINE inline
-# else
-# define FORCE_INLINE inline __attribute__ ((always_inline))
-# endif
-# else
-# define FORCE_INLINE inline
-# endif
-#endif
-
-/* ------------------------ CRC32 checksum calculation ----------------- */
-
-UINT CRCTable[256];
-BOOL bInitCRC = FALSE;
-
-FORCE_INLINE void InitCRC() {
- int i, j; unsigned long c;
- for (c = i = 0; i < 256; c = ++i) {
- for (j = 0; j < 8; j++) {
- if (c & 1) c = (c>>1) ^ 0xEDB88320;
- else c >>= 1;
- }
- CRCTable[i] = c;
- }
- bInitCRC = TRUE;
-}
-
-#define CRCBLOCKSIZE 4096
-
-BOOL FileCRC(HANDLE hFile, DWORD *crc) {
- static BYTE crcblock[CRCBLOCKSIZE];
- DWORD read;
- BYTE *p;
-
- UINT c = 0xFFFFFFFF;
- if (bInitCRC == FALSE)
- InitCRC();
-
- SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
- do {
- if (ReadFile(hFile, crcblock, CRCBLOCKSIZE, &read, NULL) == FALSE)
- return FALSE;
- for (p = crcblock; p < crcblock + read; p++)
- c = CRCTable[(c & 0xFF) ^ *p] ^ (c >> 8);
- } while (read);
-
- *crc = (c ^ 0xFFFFFFFF);
-
- return TRUE;
-}
-
-void CRC32ToString(char* string, DWORD crc) {
- int i = 0;
- int j = 7;
- int a1, a2;
- for(i = 0; i < 4; i++) {
- a1 = (crc >> 4) % 16;
- a2 = crc % 16;
- string[j--] = a2 < 10 ? ('0' + a2) : ('A' + a2 - 10);
- string[j--] = a1 < 10 ? ('0' + a1) : ('A' + a1 - 10);
- crc = crc >> 8;
- }
-}
-
-/* ------------------------ MD5 checksum calculation ----------------- */
-
-#define MD5BLOCKSIZE 16384
-
-BOOL FileMD5(HANDLE hFile, md5_byte_t digest[16]) {
- static BYTE md5block[MD5BLOCKSIZE];
- DWORD read;
-
- md5_state_t state;
-
- md5_init(&state);
-
- SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
- do {
- if (ReadFile(hFile, md5block, MD5BLOCKSIZE, &read, NULL) == FALSE)
- return FALSE;
- md5_append(&state, md5block, read);
- } while (read);
-
- md5_finish(&state, digest);
- return TRUE;
-}
-
-void MD5ToString(char* string, md5_byte_t checksum[16]) {
- int i = 0;
- int j = 0;
- int a1, a2;
- for(i = 0; i < 16; i++) {
- a1 = (checksum[i] >> 4) % 16;
- a2 = checksum[i] % 16;
- string[j++] = a1 < 10 ? ('0' + a1) : ('A' + a1 - 10);
- string[j++] = a2 < 10 ? ('0' + a2) : ('A' + a2 - 10);
- }
-}
+//---------------------------------------------------------------------------
+// checksum.c
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#include "checksum.h"
+
+#ifdef _MSC_VER
+# define FORCE_INLINE __forceinline
+#else
+# ifdef __GNUC__
+# if __GNUC__ < 3
+# define FORCE_INLINE inline
+# else
+# define FORCE_INLINE inline __attribute__ ((always_inline))
+# endif
+# else
+# define FORCE_INLINE inline
+# endif
+#endif
+
+/* ------------------------ CRC32 checksum calculation ----------------- */
+
+UINT CRCTable[256];
+BOOL bInitCRC = FALSE;
+
+FORCE_INLINE void InitCRC() {
+ int i, j; unsigned long c;
+ for (c = i = 0; i < 256; c = ++i) {
+ for (j = 0; j < 8; j++) {
+ if (c & 1) c = (c>>1) ^ 0xEDB88320;
+ else c >>= 1;
+ }
+ CRCTable[i] = c;
+ }
+ bInitCRC = TRUE;
+}
+
+#define CRCBLOCKSIZE 4096
+
+BOOL FileCRC(HANDLE hFile, DWORD *crc) {
+ static BYTE crcblock[CRCBLOCKSIZE];
+ DWORD read;
+ BYTE *p;
+
+ UINT c = 0xFFFFFFFF;
+ if (bInitCRC == FALSE)
+ InitCRC();
+
+ SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
+ do {
+ if (ReadFile(hFile, crcblock, CRCBLOCKSIZE, &read, NULL) == FALSE)
+ return FALSE;
+ for (p = crcblock; p < crcblock + read; p++)
+ c = CRCTable[(c & 0xFF) ^ *p] ^ (c >> 8);
+ } while (read);
+
+ *crc = (c ^ 0xFFFFFFFF);
+
+ return TRUE;
+}
+
+void CRC32ToString(char* string, DWORD crc) {
+ int i = 0;
+ int j = 7;
+ int a1, a2;
+ for(i = 0; i < 4; i++) {
+ a1 = (crc >> 4) % 16;
+ a2 = crc % 16;
+ string[j--] = a2 < 10 ? ('0' + a2) : ('A' + a2 - 10);
+ string[j--] = a1 < 10 ? ('0' + a1) : ('A' + a1 - 10);
+ crc = crc >> 8;
+ }
+}
+
+/* ------------------------ MD5 checksum calculation ----------------- */
+
+#define MD5BLOCKSIZE 16384
+
+BOOL FileMD5(HANDLE hFile, md5_byte_t digest[16]) {
+ static BYTE md5block[MD5BLOCKSIZE];
+ DWORD read;
+
+ md5_state_t state;
+
+ md5_init(&state);
+
+ SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
+ do {
+ if (ReadFile(hFile, md5block, MD5BLOCKSIZE, &read, NULL) == FALSE)
+ return FALSE;
+ md5_append(&state, md5block, read);
+ } while (read);
+
+ md5_finish(&state, digest);
+ return TRUE;
+}
+
+void MD5ToString(char* string, md5_byte_t checksum[16]) {
+ int i = 0;
+ int j = 0;
+ int a1, a2;
+ for(i = 0; i < 16; i++) {
+ a1 = (checksum[i] >> 4) % 16;
+ a2 = checksum[i] % 16;
+ string[j++] = a1 < 10 ? ('0' + a1) : ('A' + a1 - 10);
+ string[j++] = a2 < 10 ? ('0' + a2) : ('A' + a2 - 10);
+ }
+}
diff --git a/Contrib/VPatch/Source/Plugin/checksum.h b/Contrib/VPatch/Source/Plugin/checksum.h
index 7d54951..4817f5f 100755
--- a/Contrib/VPatch/Source/Plugin/checksum.h
+++ b/Contrib/VPatch/Source/Plugin/checksum.h
@@ -1,42 +1,42 @@
-//---------------------------------------------------------------------------
-// checksum.h
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#ifndef checksum_INCLUDED
-#define checksum_INCLUDED
-
-#include <windows.h>
-#include "md5.h"
-
-/* ------------------------ CRC32 checksum calculation ----------------- */
-
-BOOL FileCRC(HANDLE hFile, DWORD *crc);
-void CRC32ToString(char* string, DWORD crc);
-
-/* ------------------------ MD5 checksum calculation ----------------- */
-
-BOOL FileMD5(HANDLE hFile, md5_byte_t digest[16]);
-void MD5ToString(char* string, md5_byte_t checksum[16]);
-
-#endif
+//---------------------------------------------------------------------------
+// checksum.h
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#ifndef checksum_INCLUDED
+#define checksum_INCLUDED
+
+#include <windows.h>
+#include "md5.h"
+
+/* ------------------------ CRC32 checksum calculation ----------------- */
+
+BOOL FileCRC(HANDLE hFile, DWORD *crc);
+void CRC32ToString(char* string, DWORD crc);
+
+/* ------------------------ MD5 checksum calculation ----------------- */
+
+BOOL FileMD5(HANDLE hFile, md5_byte_t digest[16]);
+void MD5ToString(char* string, md5_byte_t checksum[16]);
+
+#endif
diff --git a/Contrib/VPatch/Source/Plugin/md5.c b/Contrib/VPatch/Source/Plugin/md5.c
index 03332c4..0c9f7ce 100755
--- a/Contrib/VPatch/Source/Plugin/md5.c
+++ b/Contrib/VPatch/Source/Plugin/md5.c
@@ -1,389 +1,389 @@
-/*
- Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
-
- 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.
-
- L. Peter Deutsch
- ghost@aladdin.com
-
- */
-/* $Id: md5.c,v 1.2 2005/09/20 17:42:28 kichik Exp $ */
-/*
- Independent implementation of MD5 (RFC 1321).
-
- This code implements the MD5 Algorithm defined in RFC 1321, whose
- text is available at
- http://www.ietf.org/rfc/rfc1321.txt
- The code is derived from the text of the RFC, including the test suite
- (section A.5) but excluding the rest of Appendix A. It does not include
- any code or documentation that is identified in the RFC as being
- copyrighted.
-
- The original and principal author of md5.c is L. Peter Deutsch
- <ghost@aladdin.com>. Other authors are noted in the change history
- that follows (in reverse chronological order):
-
- 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
- either statically or dynamically; added missing #include <string.h>
- in library.
- 2002-03-11 lpd Corrected argument list for main(), and added int return
- type, in test program and T value program.
- 2002-02-21 lpd Added missing #include <stdio.h> in test program.
- 2000-07-03 lpd Patched to eliminate warnings about "constant is
- unsigned in ANSI C, signed in traditional"; made test program
- self-checking.
- 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
- 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
- 1999-05-03 lpd Original version.
- */
-
-#include "md5.h"
-
-void md5_memcpy( void *dest, const void *src, int count ) {
- md5_byte_t* bDest = (md5_byte_t*)dest;
- md5_byte_t* bSrc = (md5_byte_t*)src;
- int i = 0;
- for(; i < count; i++) {
- bDest[i] = bSrc[i];
- }
-}
-
-#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
-#ifdef ARCH_IS_BIG_ENDIAN
-# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
-#else
-# define BYTE_ORDER 0
-#endif
-
-#define T_MASK ((md5_word_t)~0)
-#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
-#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
-#define T3 0x242070db
-#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
-#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
-#define T6 0x4787c62a
-#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
-#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
-#define T9 0x698098d8
-#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
-#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
-#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
-#define T13 0x6b901122
-#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
-#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
-#define T16 0x49b40821
-#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
-#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
-#define T19 0x265e5a51
-#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
-#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
-#define T22 0x02441453
-#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
-#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
-#define T25 0x21e1cde6
-#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
-#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
-#define T28 0x455a14ed
-#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
-#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
-#define T31 0x676f02d9
-#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
-#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
-#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
-#define T35 0x6d9d6122
-#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
-#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
-#define T38 0x4bdecfa9
-#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
-#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
-#define T41 0x289b7ec6
-#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
-#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
-#define T44 0x04881d05
-#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
-#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
-#define T47 0x1fa27cf8
-#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
-#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
-#define T50 0x432aff97
-#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
-#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
-#define T53 0x655b59c3
-#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
-#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
-#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
-#define T57 0x6fa87e4f
-#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
-#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
-#define T60 0x4e0811a1
-#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
-#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
-#define T63 0x2ad7d2bb
-#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
-
-
-static void
-md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
-{
- md5_word_t
- a = pms->abcd[0], b = pms->abcd[1],
- c = pms->abcd[2], d = pms->abcd[3];
- md5_word_t t;
-#if BYTE_ORDER > 0
- /* Define storage only for big-endian CPUs. */
- md5_word_t X[16];
-#else
- /* Define storage for little-endian or both types of CPUs. */
- md5_word_t xbuf[16];
- const md5_word_t *X;
-#endif
-
- {
-#if BYTE_ORDER == 0
- /*
- * Determine dynamically whether this is a big-endian or
- * little-endian machine, since we can use a more efficient
- * algorithm on the latter.
- */
- static const int w = 1;
-
- if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
-#endif
-#if BYTE_ORDER <= 0 /* little-endian */
- {
- /*
- * On little-endian machines, we can process properly aligned
- * data without copying it.
- */
- if (!((data - (const md5_byte_t *)0) & 3)) {
- /* data are properly aligned */
- X = (const md5_word_t *)data;
- } else {
- /* not aligned */
- md5_memcpy(xbuf, data, 64);
- X = xbuf;
- }
- }
-#endif
-#if BYTE_ORDER == 0
- else /* dynamic big-endian */
-#endif
-#if BYTE_ORDER >= 0 /* big-endian */
- {
- /*
- * On big-endian machines, we must arrange the bytes in the
- * right order.
- */
- const md5_byte_t *xp = data;
- int i;
-
-# if BYTE_ORDER == 0
- X = xbuf; /* (dynamic only) */
-# else
-# define xbuf X /* (static only) */
-# endif
- for (i = 0; i < 16; ++i, xp += 4)
- xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
- }
-#endif
- }
-
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
-
- /* Round 1. */
- /* Let [abcd k s i] denote the operation
- a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
-#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + F(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 0, 7, T1);
- SET(d, a, b, c, 1, 12, T2);
- SET(c, d, a, b, 2, 17, T3);
- SET(b, c, d, a, 3, 22, T4);
- SET(a, b, c, d, 4, 7, T5);
- SET(d, a, b, c, 5, 12, T6);
- SET(c, d, a, b, 6, 17, T7);
- SET(b, c, d, a, 7, 22, T8);
- SET(a, b, c, d, 8, 7, T9);
- SET(d, a, b, c, 9, 12, T10);
- SET(c, d, a, b, 10, 17, T11);
- SET(b, c, d, a, 11, 22, T12);
- SET(a, b, c, d, 12, 7, T13);
- SET(d, a, b, c, 13, 12, T14);
- SET(c, d, a, b, 14, 17, T15);
- SET(b, c, d, a, 15, 22, T16);
-#undef SET
-
- /* Round 2. */
- /* Let [abcd k s i] denote the operation
- a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
-#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + G(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 1, 5, T17);
- SET(d, a, b, c, 6, 9, T18);
- SET(c, d, a, b, 11, 14, T19);
- SET(b, c, d, a, 0, 20, T20);
- SET(a, b, c, d, 5, 5, T21);
- SET(d, a, b, c, 10, 9, T22);
- SET(c, d, a, b, 15, 14, T23);
- SET(b, c, d, a, 4, 20, T24);
- SET(a, b, c, d, 9, 5, T25);
- SET(d, a, b, c, 14, 9, T26);
- SET(c, d, a, b, 3, 14, T27);
- SET(b, c, d, a, 8, 20, T28);
- SET(a, b, c, d, 13, 5, T29);
- SET(d, a, b, c, 2, 9, T30);
- SET(c, d, a, b, 7, 14, T31);
- SET(b, c, d, a, 12, 20, T32);
-#undef SET
-
- /* Round 3. */
- /* Let [abcd k s t] denote the operation
- a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + H(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 5, 4, T33);
- SET(d, a, b, c, 8, 11, T34);
- SET(c, d, a, b, 11, 16, T35);
- SET(b, c, d, a, 14, 23, T36);
- SET(a, b, c, d, 1, 4, T37);
- SET(d, a, b, c, 4, 11, T38);
- SET(c, d, a, b, 7, 16, T39);
- SET(b, c, d, a, 10, 23, T40);
- SET(a, b, c, d, 13, 4, T41);
- SET(d, a, b, c, 0, 11, T42);
- SET(c, d, a, b, 3, 16, T43);
- SET(b, c, d, a, 6, 23, T44);
- SET(a, b, c, d, 9, 4, T45);
- SET(d, a, b, c, 12, 11, T46);
- SET(c, d, a, b, 15, 16, T47);
- SET(b, c, d, a, 2, 23, T48);
-#undef SET
-
- /* Round 4. */
- /* Let [abcd k s t] denote the operation
- a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
-#define I(x, y, z) ((y) ^ ((x) | ~(z)))
-#define SET(a, b, c, d, k, s, Ti)\
- t = a + I(b,c,d) + X[k] + Ti;\
- a = ROTATE_LEFT(t, s) + b
- /* Do the following 16 operations. */
- SET(a, b, c, d, 0, 6, T49);
- SET(d, a, b, c, 7, 10, T50);
- SET(c, d, a, b, 14, 15, T51);
- SET(b, c, d, a, 5, 21, T52);
- SET(a, b, c, d, 12, 6, T53);
- SET(d, a, b, c, 3, 10, T54);
- SET(c, d, a, b, 10, 15, T55);
- SET(b, c, d, a, 1, 21, T56);
- SET(a, b, c, d, 8, 6, T57);
- SET(d, a, b, c, 15, 10, T58);
- SET(c, d, a, b, 6, 15, T59);
- SET(b, c, d, a, 13, 21, T60);
- SET(a, b, c, d, 4, 6, T61);
- SET(d, a, b, c, 11, 10, T62);
- SET(c, d, a, b, 2, 15, T63);
- SET(b, c, d, a, 9, 21, T64);
-#undef SET
-
- /* Then perform the following additions. (That is increment each
- of the four registers by the value it had before this block
- was started.) */
- pms->abcd[0] += a;
- pms->abcd[1] += b;
- pms->abcd[2] += c;
- pms->abcd[3] += d;
-}
-
-void
-md5_init(md5_state_t *pms)
-{
- pms->count[0] = pms->count[1] = 0;
- pms->abcd[0] = 0x67452301;
- pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
- pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
- pms->abcd[3] = 0x10325476;
-}
-
-void
-md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
-{
- const md5_byte_t *p = data;
- int left = nbytes;
- int offset = (pms->count[0] >> 3) & 63;
- md5_word_t nbits = (md5_word_t)(nbytes << 3);
-
- if (nbytes <= 0)
- return;
-
- /* Update the message length. */
- pms->count[1] += nbytes >> 29;
- pms->count[0] += nbits;
- if (pms->count[0] < nbits)
- pms->count[1]++;
-
- /* Process an initial partial block. */
- if (offset) {
- int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
-
- md5_memcpy(pms->buf + offset, p, copy);
- if (offset + copy < 64)
- return;
- p += copy;
- left -= copy;
- md5_process(pms, pms->buf);
- }
-
- /* Process full blocks. */
- for (; left >= 64; p += 64, left -= 64)
- md5_process(pms, p);
-
- /* Process a final partial block. */
- if (left)
- md5_memcpy(pms->buf, p, left);
-}
-
-void
-md5_finish(md5_state_t *pms, md5_byte_t digest[16])
-{
- static const md5_byte_t pad[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
- md5_byte_t data[8];
- int i;
-
- /* Save the length before padding. */
- for (i = 0; i < 8; ++i)
- data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
- /* Pad to 56 bytes mod 64. */
- md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
- /* Append the length. */
- md5_append(pms, data, 8);
- for (i = 0; i < 16; ++i)
- digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
-}
+/*
+ Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
+
+ 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.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: md5.c,v 1.1 2005/09/17 09:25:44 kichik Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.c is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
+ either statically or dynamically; added missing #include <string.h>
+ in library.
+ 2002-03-11 lpd Corrected argument list for main(), and added int return
+ type, in test program and T value program.
+ 2002-02-21 lpd Added missing #include <stdio.h> in test program.
+ 2000-07-03 lpd Patched to eliminate warnings about "constant is
+ unsigned in ANSI C, signed in traditional"; made test program
+ self-checking.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
+ 1999-05-03 lpd Original version.
+ */
+
+#include "md5.h"
+
+void md5_memcpy( void *dest, const void *src, int count ) {
+ md5_byte_t* bDest = (md5_byte_t*)dest;
+ md5_byte_t* bSrc = (md5_byte_t*)src;
+ int i = 0;
+ for(; i < count; i++) {
+ bDest[i] = bSrc[i];
+ }
+}
+
+#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
+#ifdef ARCH_IS_BIG_ENDIAN
+# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
+#else
+# define BYTE_ORDER 0
+#endif
+
+#define T_MASK ((md5_word_t)~0)
+#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
+#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
+#define T3 0x242070db
+#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
+#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
+#define T6 0x4787c62a
+#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
+#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
+#define T9 0x698098d8
+#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
+#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
+#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
+#define T13 0x6b901122
+#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
+#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
+#define T16 0x49b40821
+#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
+#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
+#define T19 0x265e5a51
+#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
+#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
+#define T22 0x02441453
+#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
+#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
+#define T25 0x21e1cde6
+#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
+#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
+#define T28 0x455a14ed
+#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
+#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
+#define T31 0x676f02d9
+#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
+#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
+#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
+#define T35 0x6d9d6122
+#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
+#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
+#define T38 0x4bdecfa9
+#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
+#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
+#define T41 0x289b7ec6
+#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
+#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
+#define T44 0x04881d05
+#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
+#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
+#define T47 0x1fa27cf8
+#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
+#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
+#define T50 0x432aff97
+#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
+#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
+#define T53 0x655b59c3
+#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
+#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
+#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
+#define T57 0x6fa87e4f
+#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
+#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
+#define T60 0x4e0811a1
+#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
+#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
+#define T63 0x2ad7d2bb
+#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
+
+
+static void
+md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
+{
+ md5_word_t
+ a = pms->abcd[0], b = pms->abcd[1],
+ c = pms->abcd[2], d = pms->abcd[3];
+ md5_word_t t;
+#if BYTE_ORDER > 0
+ /* Define storage only for big-endian CPUs. */
+ md5_word_t X[16];
+#else
+ /* Define storage for little-endian or both types of CPUs. */
+ md5_word_t xbuf[16];
+ const md5_word_t *X;
+#endif
+
+ {
+#if BYTE_ORDER == 0
+ /*
+ * Determine dynamically whether this is a big-endian or
+ * little-endian machine, since we can use a more efficient
+ * algorithm on the latter.
+ */
+ static const int w = 1;
+
+ if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
+#endif
+#if BYTE_ORDER <= 0 /* little-endian */
+ {
+ /*
+ * On little-endian machines, we can process properly aligned
+ * data without copying it.
+ */
+ if (!((data - (const md5_byte_t *)0) & 3)) {
+ /* data are properly aligned */
+ X = (const md5_word_t *)data;
+ } else {
+ /* not aligned */
+ md5_memcpy(xbuf, data, 64);
+ X = xbuf;
+ }
+ }
+#endif
+#if BYTE_ORDER == 0
+ else /* dynamic big-endian */
+#endif
+#if BYTE_ORDER >= 0 /* big-endian */
+ {
+ /*
+ * On big-endian machines, we must arrange the bytes in the
+ * right order.
+ */
+ const md5_byte_t *xp = data;
+ int i;
+
+# if BYTE_ORDER == 0
+ X = xbuf; /* (dynamic only) */
+# else
+# define xbuf X /* (static only) */
+# endif
+ for (i = 0; i < 16; ++i, xp += 4)
+ xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
+ }
+#endif
+ }
+
+#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
+
+ /* Round 1. */
+ /* Let [abcd k s i] denote the operation
+ a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
+#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + F(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 0, 7, T1);
+ SET(d, a, b, c, 1, 12, T2);
+ SET(c, d, a, b, 2, 17, T3);
+ SET(b, c, d, a, 3, 22, T4);
+ SET(a, b, c, d, 4, 7, T5);
+ SET(d, a, b, c, 5, 12, T6);
+ SET(c, d, a, b, 6, 17, T7);
+ SET(b, c, d, a, 7, 22, T8);
+ SET(a, b, c, d, 8, 7, T9);
+ SET(d, a, b, c, 9, 12, T10);
+ SET(c, d, a, b, 10, 17, T11);
+ SET(b, c, d, a, 11, 22, T12);
+ SET(a, b, c, d, 12, 7, T13);
+ SET(d, a, b, c, 13, 12, T14);
+ SET(c, d, a, b, 14, 17, T15);
+ SET(b, c, d, a, 15, 22, T16);
+#undef SET
+
+ /* Round 2. */
+ /* Let [abcd k s i] denote the operation
+ a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
+#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + G(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 1, 5, T17);
+ SET(d, a, b, c, 6, 9, T18);
+ SET(c, d, a, b, 11, 14, T19);
+ SET(b, c, d, a, 0, 20, T20);
+ SET(a, b, c, d, 5, 5, T21);
+ SET(d, a, b, c, 10, 9, T22);
+ SET(c, d, a, b, 15, 14, T23);
+ SET(b, c, d, a, 4, 20, T24);
+ SET(a, b, c, d, 9, 5, T25);
+ SET(d, a, b, c, 14, 9, T26);
+ SET(c, d, a, b, 3, 14, T27);
+ SET(b, c, d, a, 8, 20, T28);
+ SET(a, b, c, d, 13, 5, T29);
+ SET(d, a, b, c, 2, 9, T30);
+ SET(c, d, a, b, 7, 14, T31);
+ SET(b, c, d, a, 12, 20, T32);
+#undef SET
+
+ /* Round 3. */
+ /* Let [abcd k s t] denote the operation
+ a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
+#define H(x, y, z) ((x) ^ (y) ^ (z))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + H(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 5, 4, T33);
+ SET(d, a, b, c, 8, 11, T34);
+ SET(c, d, a, b, 11, 16, T35);
+ SET(b, c, d, a, 14, 23, T36);
+ SET(a, b, c, d, 1, 4, T37);
+ SET(d, a, b, c, 4, 11, T38);
+ SET(c, d, a, b, 7, 16, T39);
+ SET(b, c, d, a, 10, 23, T40);
+ SET(a, b, c, d, 13, 4, T41);
+ SET(d, a, b, c, 0, 11, T42);
+ SET(c, d, a, b, 3, 16, T43);
+ SET(b, c, d, a, 6, 23, T44);
+ SET(a, b, c, d, 9, 4, T45);
+ SET(d, a, b, c, 12, 11, T46);
+ SET(c, d, a, b, 15, 16, T47);
+ SET(b, c, d, a, 2, 23, T48);
+#undef SET
+
+ /* Round 4. */
+ /* Let [abcd k s t] denote the operation
+ a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
+#define I(x, y, z) ((y) ^ ((x) | ~(z)))
+#define SET(a, b, c, d, k, s, Ti)\
+ t = a + I(b,c,d) + X[k] + Ti;\
+ a = ROTATE_LEFT(t, s) + b
+ /* Do the following 16 operations. */
+ SET(a, b, c, d, 0, 6, T49);
+ SET(d, a, b, c, 7, 10, T50);
+ SET(c, d, a, b, 14, 15, T51);
+ SET(b, c, d, a, 5, 21, T52);
+ SET(a, b, c, d, 12, 6, T53);
+ SET(d, a, b, c, 3, 10, T54);
+ SET(c, d, a, b, 10, 15, T55);
+ SET(b, c, d, a, 1, 21, T56);
+ SET(a, b, c, d, 8, 6, T57);
+ SET(d, a, b, c, 15, 10, T58);
+ SET(c, d, a, b, 6, 15, T59);
+ SET(b, c, d, a, 13, 21, T60);
+ SET(a, b, c, d, 4, 6, T61);
+ SET(d, a, b, c, 11, 10, T62);
+ SET(c, d, a, b, 2, 15, T63);
+ SET(b, c, d, a, 9, 21, T64);
+#undef SET
+
+ /* Then perform the following additions. (That is increment each
+ of the four registers by the value it had before this block
+ was started.) */
+ pms->abcd[0] += a;
+ pms->abcd[1] += b;
+ pms->abcd[2] += c;
+ pms->abcd[3] += d;
+}
+
+void
+md5_init(md5_state_t *pms)
+{
+ pms->count[0] = pms->count[1] = 0;
+ pms->abcd[0] = 0x67452301;
+ pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
+ pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
+ pms->abcd[3] = 0x10325476;
+}
+
+void
+md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
+{
+ const md5_byte_t *p = data;
+ int left = nbytes;
+ int offset = (pms->count[0] >> 3) & 63;
+ md5_word_t nbits = (md5_word_t)(nbytes << 3);
+
+ if (nbytes <= 0)
+ return;
+
+ /* Update the message length. */
+ pms->count[1] += nbytes >> 29;
+ pms->count[0] += nbits;
+ if (pms->count[0] < nbits)
+ pms->count[1]++;
+
+ /* Process an initial partial block. */
+ if (offset) {
+ int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
+
+ md5_memcpy(pms->buf + offset, p, copy);
+ if (offset + copy < 64)
+ return;
+ p += copy;
+ left -= copy;
+ md5_process(pms, pms->buf);
+ }
+
+ /* Process full blocks. */
+ for (; left >= 64; p += 64, left -= 64)
+ md5_process(pms, p);
+
+ /* Process a final partial block. */
+ if (left)
+ md5_memcpy(pms->buf, p, left);
+}
+
+void
+md5_finish(md5_state_t *pms, md5_byte_t digest[16])
+{
+ static const md5_byte_t pad[64] = {
+ 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ md5_byte_t data[8];
+ int i;
+
+ /* Save the length before padding. */
+ for (i = 0; i < 8; ++i)
+ data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
+ /* Pad to 56 bytes mod 64. */
+ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
+ /* Append the length. */
+ md5_append(pms, data, 8);
+ for (i = 0; i < 16; ++i)
+ digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
+}
diff --git a/Contrib/VPatch/Source/Plugin/md5.h b/Contrib/VPatch/Source/Plugin/md5.h
index 829150e..698c995 100755
--- a/Contrib/VPatch/Source/Plugin/md5.h
+++ b/Contrib/VPatch/Source/Plugin/md5.h
@@ -1,91 +1,91 @@
-/*
- Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
-
- 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.
-
- L. Peter Deutsch
- ghost@aladdin.com
-
- */
-/* $Id: md5.h,v 1.1 2005/09/17 09:25:44 kichik Exp $ */
-/*
- Independent implementation of MD5 (RFC 1321).
-
- This code implements the MD5 Algorithm defined in RFC 1321, whose
- text is available at
- http://www.ietf.org/rfc/rfc1321.txt
- The code is derived from the text of the RFC, including the test suite
- (section A.5) but excluding the rest of Appendix A. It does not include
- any code or documentation that is identified in the RFC as being
- copyrighted.
-
- The original and principal author of md5.h is L. Peter Deutsch
- <ghost@aladdin.com>. Other authors are noted in the change history
- that follows (in reverse chronological order):
-
- 2002-04-13 lpd Removed support for non-ANSI compilers; removed
- references to Ghostscript; clarified derivation from RFC 1321;
- now handles byte order either statically or dynamically.
- 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
- 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
- added conditionalization for C++ compilation from Martin
- Purschke <purschke@bnl.gov>.
- 1999-05-03 lpd Original version.
- */
-
-#ifndef md5_INCLUDED
-# define md5_INCLUDED
-
-/*
- * This package supports both compile-time and run-time determination of CPU
- * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
- * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
- * defined as non-zero, the code will be compiled to run only on big-endian
- * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
- * run on either big- or little-endian CPUs, but will run slightly less
- * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
- */
-
-typedef unsigned char md5_byte_t; /* 8-bit byte */
-typedef unsigned int md5_word_t; /* 32-bit word */
-
-/* Define the state of the MD5 Algorithm. */
-typedef struct md5_state_s {
- md5_word_t count[2]; /* message length in bits, lsw first */
- md5_word_t abcd[4]; /* digest buffer */
- md5_byte_t buf[64]; /* accumulate block */
-} md5_state_t;
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Initialize the algorithm. */
-void md5_init(md5_state_t *pms);
-
-/* Append a string to the message. */
-void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
-
-/* Finish the message and return the digest. */
-void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif
-
-#endif /* md5_INCLUDED */
+/*
+ Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
+
+ 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.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ */
+/* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */
+/*
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321, whose
+ text is available at
+ http://www.ietf.org/rfc/rfc1321.txt
+ The code is derived from the text of the RFC, including the test suite
+ (section A.5) but excluding the rest of Appendix A. It does not include
+ any code or documentation that is identified in the RFC as being
+ copyrighted.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ <ghost@aladdin.com>. Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 2002-04-13 lpd Removed support for non-ANSI compilers; removed
+ references to Ghostscript; clarified derivation from RFC 1321;
+ now handles byte order either statically or dynamically.
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke <purschke@bnl.gov>.
+ 1999-05-03 lpd Original version.
+ */
+
+#ifndef md5_INCLUDED
+# define md5_INCLUDED
+
+/*
+ * This package supports both compile-time and run-time determination of CPU
+ * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
+ * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
+ * defined as non-zero, the code will be compiled to run only on big-endian
+ * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
+ * run on either big- or little-endian CPUs, but will run slightly less
+ * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
+ */
+
+typedef unsigned char md5_byte_t; /* 8-bit byte */
+typedef unsigned int md5_word_t; /* 32-bit word */
+
+/* Define the state of the MD5 Algorithm. */
+typedef struct md5_state_s {
+ md5_word_t count[2]; /* message length in bits, lsw first */
+ md5_word_t abcd[4]; /* digest buffer */
+ md5_byte_t buf[64]; /* accumulate block */
+} md5_state_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Initialize the algorithm. */
+void md5_init(md5_state_t *pms);
+
+/* Append a string to the message. */
+void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
+
+/* Finish the message and return the digest. */
+void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
+
+#ifdef __cplusplus
+} /* end extern "C" */
+#endif
+
+#endif /* md5_INCLUDED */
diff --git a/Contrib/VPatch/Source/Plugin/vpatchdll.c b/Contrib/VPatch/Source/Plugin/vpatchdll.c
index 60a9863..11b863f 100755
--- a/Contrib/VPatch/Source/Plugin/vpatchdll.c
+++ b/Contrib/VPatch/Source/Plugin/vpatchdll.c
@@ -1,178 +1,178 @@
-//---------------------------------------------------------------------------
-// vpatchdll.c: NSIS plug-in version of the VPatch runtime
-//---------------------------------------------------------------------------
-// -=* VPatch *=-
-//---------------------------------------------------------------------------
-// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
-//---------------------------------------------------------------------------
-// Website: http://www.tibed.net/vpatch
-//
-// 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.
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include "apply_patch.h"
-#include "checksum.h"
-#include "../../../ExDLL/exdll.h"
-
-/* ------------------------ Plug-in code ------------------------- */
-
-HINSTANCE g_hInstance;
-
-HWND g_hwndParent;
-
-void __declspec(dllexport) vpatchfile(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop) {
- g_hwndParent=hwndParent;
-
- EXDLL_INIT();
-
- {
- char source[MAX_PATH];
- char dest[MAX_PATH];
- char exename[MAX_PATH];
- HANDLE hPatch, hSource, hDest;
- int result;
-
- popstring(exename);
- popstring(source);
- popstring(dest);
-
- hPatch = CreateFile(exename, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (hPatch == INVALID_HANDLE_VALUE) {
- pushstring("Unable to open patch file");
- return;
- }
-
- hSource = CreateFile(source, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (hSource == INVALID_HANDLE_VALUE) {
- CloseHandle(hPatch);
- pushstring("Unable to open source file");
- return;
- }
-
- hDest = CreateFile(dest, GENERIC_READ | GENERIC_WRITE, 0, NULL,
- CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
- if (hDest == INVALID_HANDLE_VALUE) {
- CloseHandle(hPatch);
- CloseHandle(hSource);
- pushstring("Unable to open output file");
- return;
- }
-
- result = DoPatch(hPatch, hSource, hDest);
-
- CloseHandle(hDest);
- CloseHandle(hSource);
- CloseHandle(hPatch);
-
- if ((result != PATCH_SUCCESS)) {
- if (result == PATCH_ERROR)
- pushstring("An error occured while patching");
- else if (result == PATCH_CORRUPT)
- pushstring("Patch data is invalid or corrupt");
- else if (result == PATCH_NOMATCH)
- pushstring("No suitable patches were found");
- else if (result == PATCH_UPTODATE)
- pushstring("OK, new version already installed");
- DeleteFile(dest);
- } else {
- pushstring("OK");
- }
-
- return;
- }
-}
-
-#ifdef DLL_CHECKSUMS
-void __declspec(dllexport) GetFileCRC32(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop) {
- g_hwndParent=hwndParent;
-
- EXDLL_INIT();
-
- {
- char filename[MAX_PATH];
- char crc_string[9];
- HANDLE hFile;
- unsigned long crc;
-
- popstring(filename);
-
- hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (hFile == INVALID_HANDLE_VALUE) {
- //pushstring("ERROR: Unable to open file for CRC32 calculation");
- pushstring("");
- return;
- }
-
- if (!FileCRC(hFile, &crc)) {
- //pushstring("ERROR: Unable to calculate CRC32");
- pushstring("");
- } else {
- crc_string[8] = '\0';
- CRC32ToString(crc_string,crc);
- pushstring(crc_string);
- }
-
- CloseHandle(hFile);
- }
-}
-
-void __declspec(dllexport) GetFileMD5(HWND hwndParent, int string_size,
- char *variables, stack_t **stacktop) {
- g_hwndParent=hwndParent;
-
- EXDLL_INIT();
-
- {
- char filename[MAX_PATH];
- char md5_string[33];
- HANDLE hFile;
- md5_byte_t digest[16];
-
- popstring(filename);
-
- hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
- OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
- if (hFile == INVALID_HANDLE_VALUE) {
- //pushstring("ERROR: Unable to open file for MD5 calculation");
- pushstring("");
- return;
- }
-
- if (!FileMD5(hFile, digest)) {
- //pushstring("ERROR: Unable to calculate MD5");
- pushstring("");
- } else {
- md5_string[32] = '\0';
- MD5ToString(md5_string,digest);
- pushstring(md5_string);
- }
-
- CloseHandle(hFile);
- }
-}
-#endif
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
- g_hInstance=hInst;
- return TRUE;
-}
+//---------------------------------------------------------------------------
+// vpatchdll.c: NSIS plug-in version of the VPatch runtime
+//---------------------------------------------------------------------------
+// -=* VPatch *=-
+//---------------------------------------------------------------------------
+// Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
+//---------------------------------------------------------------------------
+// Website: http://www.tibed.net/vpatch
+//
+// 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.
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include "apply_patch.h"
+#include "checksum.h"
+#include "../../../ExDLL/exdll.h"
+
+/* ------------------------ Plug-in code ------------------------- */
+
+HINSTANCE g_hInstance;
+
+HWND g_hwndParent;
+
+void __declspec(dllexport) vpatchfile(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop) {
+ g_hwndParent=hwndParent;
+
+ EXDLL_INIT();
+
+ {
+ char source[MAX_PATH];
+ char dest[MAX_PATH];
+ char exename[MAX_PATH];
+ HANDLE hPatch, hSource, hDest;
+ int result;
+
+ popstring(exename);
+ popstring(source);
+ popstring(dest);
+
+ hPatch = CreateFile(exename, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ if (hPatch == INVALID_HANDLE_VALUE) {
+ pushstring("Unable to open patch file");
+ return;
+ }
+
+ hSource = CreateFile(source, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ if (hSource == INVALID_HANDLE_VALUE) {
+ CloseHandle(hPatch);
+ pushstring("Unable to open source file");
+ return;
+ }
+
+ hDest = CreateFile(dest, GENERIC_READ | GENERIC_WRITE, 0, NULL,
+ CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
+ if (hDest == INVALID_HANDLE_VALUE) {
+ CloseHandle(hPatch);
+ CloseHandle(hSource);
+ pushstring("Unable to open output file");
+ return;
+ }
+
+ result = DoPatch(hPatch, hSource, hDest);
+
+ CloseHandle(hDest);
+ CloseHandle(hSource);
+ CloseHandle(hPatch);
+
+ if ((result != PATCH_SUCCESS)) {
+ if (result == PATCH_ERROR)
+ pushstring("An error occured while patching");
+ else if (result == PATCH_CORRUPT)
+ pushstring("Patch data is invalid or corrupt");
+ else if (result == PATCH_NOMATCH)
+ pushstring("No suitable patches were found");
+ else if (result == PATCH_UPTODATE)
+ pushstring("OK, new version already installed");
+ DeleteFile(dest);
+ } else {
+ pushstring("OK");
+ }
+
+ return;
+ }
+}
+
+#ifdef DLL_CHECKSUMS
+void __declspec(dllexport) GetFileCRC32(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop) {
+ g_hwndParent=hwndParent;
+
+ EXDLL_INIT();
+
+ {
+ char filename[MAX_PATH];
+ char crc_string[9];
+ HANDLE hFile;
+ unsigned long crc;
+
+ popstring(filename);
+
+ hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ if (hFile == INVALID_HANDLE_VALUE) {
+ //pushstring("ERROR: Unable to open file for CRC32 calculation");
+ pushstring("");
+ return;
+ }
+
+ if (!FileCRC(hFile, &crc)) {
+ //pushstring("ERROR: Unable to calculate CRC32");
+ pushstring("");
+ } else {
+ crc_string[8] = '\0';
+ CRC32ToString(crc_string,crc);
+ pushstring(crc_string);
+ }
+
+ CloseHandle(hFile);
+ }
+}
+
+void __declspec(dllexport) GetFileMD5(HWND hwndParent, int string_size,
+ char *variables, stack_t **stacktop) {
+ g_hwndParent=hwndParent;
+
+ EXDLL_INIT();
+
+ {
+ char filename[MAX_PATH];
+ char md5_string[33];
+ HANDLE hFile;
+ md5_byte_t digest[16];
+
+ popstring(filename);
+
+ hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
+ OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ if (hFile == INVALID_HANDLE_VALUE) {
+ //pushstring("ERROR: Unable to open file for MD5 calculation");
+ pushstring("");
+ return;
+ }
+
+ if (!FileMD5(hFile, digest)) {
+ //pushstring("ERROR: Unable to calculate MD5");
+ pushstring("");
+ } else {
+ md5_string[32] = '\0';
+ MD5ToString(md5_string,digest);
+ pushstring(md5_string);
+ }
+
+ CloseHandle(hFile);
+ }
+}
+#endif
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
+ g_hInstance=hInst;
+ return TRUE;
+}
diff --git a/Contrib/VPatch/VPatchLib.nsh b/Contrib/VPatch/VPatchLib.nsh
index ae44ab6..516b86d 100755
--- a/Contrib/VPatch/VPatchLib.nsh
+++ b/Contrib/VPatch/VPatchLib.nsh
@@ -1,22 +1,22 @@
-; PatchLib v3.0
-; =============
-;
-; Library with macro for use with VPatch (DLL version) in NSIS 2.0.5+
-; Created by Koen van de Sande
-
-!macro VPatchFile PATCHDATA SOURCEFILE TEMPFILE
- InitPluginsDir
- File /oname=$PLUGINSDIR\${PATCHDATA} ${PATCHDATA}
- vpatch::vpatchfile "$PLUGINSDIR\${PATCHDATA}" "${SOURCEFILE}" "${TEMPFILE}"
- Pop $1
- DetailPrint $1
- StrCpy $1 $1 2
- StrCmp $1 "OK" ok_${SOURCEFILE}
- SetErrors
-ok_${SOURCEFILE}:
- IfFileExists "${TEMPFILE}" +1 end_${SOURCEFILE}
- Delete "${SOURCEFILE}"
- Rename /REBOOTOK "${TEMPFILE}" "${SOURCEFILE}"
-end_${SOURCEFILE}:
- Delete "$PLUGINSDIR\${PATCHDATA}"
-!macroend
+; PatchLib v3.0
+; =============
+;
+; Library with macro for use with VPatch (DLL version) in NSIS 2.0.5+
+; Created by Koen van de Sande
+
+!macro VPatchFile PATCHDATA SOURCEFILE TEMPFILE
+ InitPluginsDir
+ File /oname=$PLUGINSDIR\${PATCHDATA} ${PATCHDATA}
+ vpatch::vpatchfile "$PLUGINSDIR\${PATCHDATA}" "${SOURCEFILE}" "${TEMPFILE}"
+ Pop $1
+ DetailPrint $1
+ StrCpy $1 $1 2
+ StrCmp $1 "OK" ok_${SOURCEFILE}
+ SetErrors
+ok_${SOURCEFILE}:
+ IfFileExists "${TEMPFILE}" +1 end_${SOURCEFILE}
+ Delete "${SOURCEFILE}"
+ Rename /REBOOTOK "${TEMPFILE}" "${SOURCEFILE}"
+end_${SOURCEFILE}:
+ Delete "$PLUGINSDIR\${PATCHDATA}"
+!macroend
diff --git a/Contrib/VPatch/example.nsi b/Contrib/VPatch/example.nsi
index 4619204..081420e 100755
--- a/Contrib/VPatch/example.nsi
+++ b/Contrib/VPatch/example.nsi
@@ -1,62 +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"
-
+;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/Contrib/nsDialogs/InstallOptions.nsi b/Contrib/nsDialogs/InstallOptions.nsi
index b2bd7e5..9fe173c 100755
--- a/Contrib/nsDialogs/InstallOptions.nsi
+++ b/Contrib/nsDialogs/InstallOptions.nsi
@@ -1,47 +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 "${NSISDIR}\Examples\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
+!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 "${NSISDIR}\Examples\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/Contrib/nsDialogs/Readme.html b/Contrib/nsDialogs/Readme.html
index a955edd..31f2e95 100755
--- a/Contrib/nsDialogs/Readme.html
+++ b/Contrib/nsDialogs/Readme.html
@@ -1,495 +1,495 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>nsDialogs</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
-<style>
-b
-{
- color: red;
-}
-code
-{
- margin-left: 20px;
- padding: 7px;
- background-color: rgb(240,240,240);
-}
-</style>
-</head>
-<body>
-
-<h1>NSIS nsDialogs Plug-in</h1>
-<p><i>Next generation of user interface design</i></p>
-
-<h2>Table of Contents</h2>
-
-<ul>
-<li><a href="#intro">Introduction</a></li>
-<li>
-<a href="#step">Step-by-Step Tutorial</a>
-<ul>
-<li><a href="#step-basic">Basic Script</a></li>
-<li><a href="#step-page">Custom Page</a></li>
-<li><a href="#step-create">Creating Page</a></li>
-<li><a href="#step-show">Showing Page</a></li>
-<li><a href="#step-add">Adding Controls</a></li>
-<li><a href="#step-state">Control State</a></li>
-<li><a href="#step-notify">Real-time Notification</a></li>
-</ul>
-</li>
-<li>
-<a href="#ref">Function Reference</a>
-<ul>
-<li><a href="#ref-create">Create</a></li>
-<li><a href="#ref-createcontrol">CreateControl</a></li>
-<li><a href="#ref-show">Show</a></li>
-<li><a href="#ref-selectfiledialog">SelectFileDialog</a></li>
-<li><a href="#ref-selectfolderdialog">SelectFolderDialog</a></li>
-<li><a href="#ref-setrtl">SetRTL</a></li>
-<li><a href="#ref-getuserdata">GetUserData</a></li>
-<li><a href="#ref-setuserdata">SetUserData</a></li>
-<li><a href="#ref-onback">OnBack</a></li>
-<li><a href="#ref-onchange">OnChange</a></li>
-<li><a href="#ref-onclick">OnClick</a></li>
-<li><a href="#ref-onnotify">OnNotify</a></li>
-</ul>
-</li>
-<li><a href="#faq">FAQ</a></li>
-</ul>
-
-<h2><a name="intro"></a>Introduction</h2>
-
-<p>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. <a href="../Modern UI 2/Readme.html">Modern UI 2</a>, for example, uses nsDialogs to create the welcome and finish pages.</p>
-
-<p>nsDialogs is a new NSIS plug-in, introduced in version 2.29 as a replacement for <a href="../InstallOptions/Readme.html">InstallOptions</a>. 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.</p>
-
-<p>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.</p>
-
-<h2><a name="step"></a>Step-by-Step Tutorial</h2>
-
-<h3><a name="step-basic"></a>Basic Script</h3>
-
-<p>Before using nsDialogs, lets first create a basic script as our skeleton.</p>
-
-<blockquote><pre>Name nsDialogs
-OutFile nsDialogs.exe
-
-XPStyle on
-
-Page instfiles
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<h3><a name="step-page"></a>Custom Page</h3>
-
-<p>Next, we'll add a custom page where we can use nsDialogs. nsDialogs cannot be used in sections or any other function but a custom page's function.</p>
-
-<blockquote><pre>Name nsDialogs
-OutFile nsDialogs.exe
-
-XPStyle on
-
-<b>Page custom nsDialogsPage</b>
-Page instfiles
-
-<b>Function nsDialogsPage
-FunctionEnd</b>
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<h3><a name="step-create"></a>Creating Page</h3>
-
-<p>Now that the foundations are laid, it's time to use nsDialogs. The first call must always be to nsDialogs::Create. It will create a new dialog in the page and return its <i>HWND</i> on the stack. The result must be popped from the stack to prevent stack corruption. If the result is <i>error</i>, the dialog couldn't be created.</p>
-
-<p>nsDialogs::Create, like every other nsDialogs function but nsDialogs::Show, must always be called with /NOUNLOAD.</p>
-
-<p>nsDialogs::Create accepts one parameter. It has a very specific function, but to keep things simple for this tutorial, it must always be 1018.</p>
-
-<p><i>HWND</i> is a number that uniquely identifies the dialog and can be used with SendMessage, SetCtlColors and Win32 API.</p>
-
-<blockquote><pre><b>!include LogicLib.nsh</b>
-
-Name nsDialogs
-OutFile nsDialogs.exe
-
-XPStyle on
-
-<b>Var Dialog</b>
-
-Page custom nsDialogsPage
-Page instfiles
-
-Function nsDialogsPage
-<b>
- nsDialogs::Create /NOUNLOAD 1018
- Pop $Dialog
-
- ${If} $Dialog == error
- Abort
- ${EndIf}
-</b>
-FunctionEnd
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<h3><a name="step-show"></a>Showing Page</h3>
-
-<p>Now that the page is created, it's time to show it. This is done with nsDialogs::Show. This function will not return until the user clicks Next, Back or Cancel.</p>
-
-<blockquote><pre>!include LogicLib.nsh
-
-Name nsDialogs
-OutFile nsDialogs.exe
-
-XPStyle on
-
-Var Dialog
-
-Page custom nsDialogsPage
-Page instfiles
-
-Function nsDialogsPage
- nsDialogs::Create /NOUNLOAD 1018
- Pop $Dialog
-
- ${If} $Dialog == error
- Abort
- ${EndIf}
-<b>
- nsDialogs::Show
-</b>
-FunctionEnd
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<h3><a name="step-add"></a>Adding Controls</h3>
-
-<p>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.</p>
-
-<p>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 <i>u</i>. To use percentage, the measurement must be suffixed with the percentage sign - <i>%</i>. Any other suffix, or no suffix, means pixels.</p>
-
-<p>Dialog units allow creation of dialogs that scale well when different fonts or DPI is used. Its size in pixels is determined on 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.</p>
-
-<blockquote><pre><b>!include nsDialogs.nsh</b>
-!include LogicLib.nsh
-
-Name nsDialogs
-OutFile nsDialogs.exe
-
-XPStyle on
-
-Var Dialog
-<b>Var Label
-Var Text</b>
-
-Page custom nsDialogsPage
-Page instfiles
-
-Function nsDialogsPage
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $Dialog
-
- ${If} $Dialog == error
- Abort
- ${EndIf}
-<b>
- ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
- Pop $Label
-
- ${NSD_CreateText} 0 13u 100% -13u "Type something here..."
- Pop $Text
-</b>
- nsDialogs::Show
-
-FunctionEnd
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<p>Available control types that can be created with ${NSD_Create*} are:</p>
-
-<ul>
-<li>HLine</li>
-<li>VLine</li>
-<li>Label</li>
-<li>Icon</li>
-<li>Bitmap</li>
-<li>BrowseButton</li>
-<li>Link</li>
-<li>Button</li>
-<li>GroupBox</li>
-<li>CheckBox</li>
-<li>RadioButton</li>
-<li>Text</li>
-<li>FileRequest</li>
-<li>DirRequest</li>
-<li>ComboBox</li>
-<li>ListBox</li>
-</ul>
-
-<h3><a name="step-state"></a>Control State</h3>
-
-<p>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 <i>leave callback</i> 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.</p>
-
-<p>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 <i>LB_GETCURSEL</i> and <i>LB_GETTEXT</i>. With time, the library of macros in nsDialogs.nsh will fill with more and more macros that'll handle more cases like this.</p>
-
-<blockquote><pre>!include nsDialogs.nsh
-!include LogicLib.nsh
-
-Name nsDialogs
-OutFile nsDialogs.exe
-
-XPStyle on
-
-Var Dialog
-Var Label
-Var Text
-
-Page custom nsDialogsPage <b>nsDialogsPageLeave</b>
-Page instfiles
-
-Function nsDialogsPage
-
- nsDialogs::Create /NOUNLOAD 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
-
-<b>Function nsDialogsPageLeave
-
- ${NSD_GetText} $Text $0
- MessageBox MB_OK "You typed:$\n$\n$0"
-
-FunctionEnd</b>
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<h3><a name="step-notify"></a>Real-time Notification</h3>
-
-<p>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's nothing to notify about labels.</p>
-
-<p>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.</p>
-
-<p>The new example will respond to the user type <i>hello</i> in the text box.</p>
-
-<blockquote><pre>!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 /NOUNLOAD 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
- <b>${NSD_OnChange} $Text nsDialogsPageTextChange</b>
-
- nsDialogs::Show
-
-FunctionEnd
-
-Function nsDialogsPageLeave
-
- ${NSD_GetText} $Text $0
- MessageBox MB_OK "You typed:$\n$\n$0"
-
-FunctionEnd
-
-<b>Function nsDialogsPageTextChange
-
- Pop $1 # $1 == $ Text
-
- ${NSD_GetText} $Text $0
-
- ${If} $0 == "hello"
-
- MessageBox MB_OK "right back at ya!"
-
- ${EndIf}
-
-FunctionEnd</b>
-
-Section
-
- DetailPrint "hello world"
-
-SectionEnd</pre></blockquote>
-
-<h2><a name="ref"></a>Function Reference</h2>
-
-<h3><a name="ref-create"></a>Create</h3>
-
-<p><code>nsDialogs::Create /NOUNLOAD <i>rect</i></code></p>
-
-<p>Creates a new dialog. <i>rect</i> 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 1040 for the welcome and the finish page.</p>
-
-<p>Returns the new dialog's HWND on the stack or <i>error</i>.</p>
-
-<h3><a name="ref-createcontrol"></a>CreateControl</h3>
-
-<p><code>nsDialogs::CreateControl /NOUNLOAD <i>class</i> <i>style</i> <i>extended_style</i> <i>x</i> <i>y</i> <i>width</i> <i>height</i> <i>text</i> </code></p>
-
-<p>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.</p>
-
-<p>Returns the new dialog's HWND on the stack or <i>error</i>.</p>
-
-<h3><a name="ref-show"></a>Show</h3>
-
-<p><code>nsDialogs::Show</code></p>
-
-<p>Displays the page. Call this once finished with nsDialogs::Create, nsDialogs::CreateControl and the rest.</p>
-
-<p>Returns nothing.</p>
-
-<h3><a name="ref-selectfiledialog"></a>SelectFileDialog</h3>
-
-<p><code>nsDialogs::SelectFileDialog /NOUNLOAD <i>mode</i> <i>initial_selection</i> <i>filter</i></code></p>
-
-<p>Displays a file selection dialog to the user. If <i>mode</i> is set to <i>save</i>, displays a file save dialog. If <i>mode</i> is set to <i>open</i>, displays a file open dialog. <i>filter</i> is a list of available file filters separated by pipes. If an empty string is passed, the default is used - <i>All Files|*.*</i>.</p>
-
-<p>Returns the selected file on the stack or an empty string if the user canceled the operation.</p>
-
-<h3><a name="ref-selectfolderdialog"></a>SelectFolderDialog</h3>
-
-<p><code>nsDialogs::SelectFolderDialog /NOUNLOAD <i>title</i> <i>initial_selection</i></code></p>
-
-<p>Displays a directory selection dialog to the user.</p>
-
-<p>Returns the selected directory on the stack or an empty string if the user canceled the operation.</p>
-
-<h3><a name="ref-setrtl"></a>SetRTL</h3>
-
-<p><code>nsDialogs::SetRTL /NOUNLOAD <i>rtl_setting</i></code></p>
-
-<p>Sets right-to-left mode on or off. If <i>rtl_setting</i> is 0, it's set to off. If <i>rtl_setting</i> is 1, it's set to on. This function must be called before any calls to nsDialogs::CreateControl.</p>
-
-<p>Returns nothing.</p>
-
-<h3><a name="ref-getuserdata"></a>GetUserData</h3>
-
-<p><code>nsDialogs::GetUserData /NOUNLOAD <i>control_HWND</i></code></p>
-
-<p>Returns user data associated with the control on the stack. Use nsDialogs::SetUserData to set this data.</p>
-
-<h3><a name="ref-setuserdata"></a>SetUserData</h3>
-
-<p><code>nsDialogs::SetUserData /NOUNLOAD <i>control_HWND</i> <i>data</i></code></p>
-
-<p>Associates <i>data</i> with the control. Use nsDialogs::GetUserData to get this data.</p>
-
-<p>Returns nothing.</p>
-
-<h3><a name="ref-onback"></a>OnBack</h3>
-
-<p><code>nsDialogs::OnBack /NOUNLOAD <i>function_address</i></code></p>
-
-<p>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.</p>
-
-<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
-
-<p>Returns nothing.</p>
-
-<h3><a name="ref-onchange"></a>OnChange</h3>
-
-<p><code>nsDialogs::OnChange /NOUNLOAD <i>control_HWND</i> <i>function_address</i></code></p>
-
-<p>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.</p>
-
-<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
-
-<p>Returns nothing.</p>
-
-<h3><a name="ref-onclick"></a>OnClick</h3>
-
-<p><code>nsDialogs::OnClick /NOUNLOAD <i>control_HWND</i> <i>function_address</i></code></p>
-
-<p>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.</p>
-
-<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
-
-<p>Returns nothing.</p>
-
-<h3><a name="ref-onnotify"></a>OnNotify</h3>
-
-<p><code>nsDialogs::OnNotify /NOUNLOAD <i>control_HWND</i> <i>function_address</i></code></p>
-
-<p>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 MNHDR structure will be waiting on its stack.</p>
-
-<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
-
-<p>Returns nothing.</p>
-
-<h2><a name="faq"></a>FAQ</h2>
-
-<div>
-
-<ul>
-
-<li>
-<b>Q:</b> Can nsDialogs handle InstallOptions INI files?
-<blockquote>
-<p><b>A:</b> nsDialogs.nsh contains a function called <i>CreateDialogFromINI</i> 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 notification yet. <i>Examples\nsDialogs\InstallOptions.nsi</i> shows a usage example of this function.</p><p>In the future there'll also be a function that creates the script itself.
-
-</li>
-
-</ul>
-
-</div>
-
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<head>
+<title>nsDialogs</title>
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
+<style>
+b
+{
+ color: red;
+}
+code
+{
+ margin-left: 20px;
+ padding: 7px;
+ background-color: rgb(240,240,240);
+}
+</style>
+</head>
+<body>
+
+<h1>NSIS nsDialogs Plug-in</h1>
+<p><i>Next generation of user interface design</i></p>
+
+<h2>Table of Contents</h2>
+
+<ul>
+<li><a href="#intro">Introduction</a></li>
+<li>
+<a href="#step">Step-by-Step Tutorial</a>
+<ul>
+<li><a href="#step-basic">Basic Script</a></li>
+<li><a href="#step-page">Custom Page</a></li>
+<li><a href="#step-create">Creating Page</a></li>
+<li><a href="#step-show">Showing Page</a></li>
+<li><a href="#step-add">Adding Controls</a></li>
+<li><a href="#step-state">Control State</a></li>
+<li><a href="#step-notify">Real-time Notification</a></li>
+</ul>
+</li>
+<li>
+<a href="#ref">Function Reference</a>
+<ul>
+<li><a href="#ref-create">Create</a></li>
+<li><a href="#ref-createcontrol">CreateControl</a></li>
+<li><a href="#ref-show">Show</a></li>
+<li><a href="#ref-selectfiledialog">SelectFileDialog</a></li>
+<li><a href="#ref-selectfolderdialog">SelectFolderDialog</a></li>
+<li><a href="#ref-setrtl">SetRTL</a></li>
+<li><a href="#ref-getuserdata">GetUserData</a></li>
+<li><a href="#ref-setuserdata">SetUserData</a></li>
+<li><a href="#ref-onback">OnBack</a></li>
+<li><a href="#ref-onchange">OnChange</a></li>
+<li><a href="#ref-onclick">OnClick</a></li>
+<li><a href="#ref-onnotify">OnNotify</a></li>
+</ul>
+</li>
+<li><a href="#faq">FAQ</a></li>
+</ul>
+
+<h2><a name="intro"></a>Introduction</h2>
+
+<p>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. <a href="../Modern UI 2/Readme.html">Modern UI 2</a>, for example, uses nsDialogs to create the welcome and finish pages.</p>
+
+<p>nsDialogs is a new NSIS plug-in, introduced in version 2.29 as a replacement for <a href="../InstallOptions/Readme.html">InstallOptions</a>. 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.</p>
+
+<p>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.</p>
+
+<h2><a name="step"></a>Step-by-Step Tutorial</h2>
+
+<h3><a name="step-basic"></a>Basic Script</h3>
+
+<p>Before using nsDialogs, lets first create a basic script as our skeleton.</p>
+
+<blockquote><pre>Name nsDialogs
+OutFile nsDialogs.exe
+
+XPStyle on
+
+Page instfiles
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<h3><a name="step-page"></a>Custom Page</h3>
+
+<p>Next, we'll add a custom page where we can use nsDialogs. nsDialogs cannot be used in sections or any other function but a custom page's function.</p>
+
+<blockquote><pre>Name nsDialogs
+OutFile nsDialogs.exe
+
+XPStyle on
+
+<b>Page custom nsDialogsPage</b>
+Page instfiles
+
+<b>Function nsDialogsPage
+FunctionEnd</b>
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<h3><a name="step-create"></a>Creating Page</h3>
+
+<p>Now that the foundations are laid, it's time to use nsDialogs. The first call must always be to nsDialogs::Create. It will create a new dialog in the page and return its <i>HWND</i> on the stack. The result must be popped from the stack to prevent stack corruption. If the result is <i>error</i>, the dialog couldn't be created.</p>
+
+<p>nsDialogs::Create, like every other nsDialogs function but nsDialogs::Show, must always be called with /NOUNLOAD.</p>
+
+<p>nsDialogs::Create accepts one parameter. It has a very specific function, but to keep things simple for this tutorial, it must always be 1018.</p>
+
+<p><i>HWND</i> is a number that uniquely identifies the dialog and can be used with SendMessage, SetCtlColors and Win32 API.</p>
+
+<blockquote><pre><b>!include LogicLib.nsh</b>
+
+Name nsDialogs
+OutFile nsDialogs.exe
+
+XPStyle on
+
+<b>Var Dialog</b>
+
+Page custom nsDialogsPage
+Page instfiles
+
+Function nsDialogsPage
+<b>
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+</b>
+FunctionEnd
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<h3><a name="step-show"></a>Showing Page</h3>
+
+<p>Now that the page is created, it's time to show it. This is done with nsDialogs::Show. This function will not return until the user clicks Next, Back or Cancel.</p>
+
+<blockquote><pre>!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+
+XPStyle on
+
+Var Dialog
+
+Page custom nsDialogsPage
+Page instfiles
+
+Function nsDialogsPage
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+<b>
+ nsDialogs::Show
+</b>
+FunctionEnd
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<h3><a name="step-add"></a>Adding Controls</h3>
+
+<p>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.</p>
+
+<p>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 <i>u</i>. To use percentage, the measurement must be suffixed with the percentage sign - <i>%</i>. Any other suffix, or no suffix, means pixels.</p>
+
+<p>Dialog units allow creation of dialogs that scale well when different fonts or DPI is used. Its size in pixels is determined on 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.</p>
+
+<blockquote><pre><b>!include nsDialogs.nsh</b>
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+
+XPStyle on
+
+Var Dialog
+<b>Var Label
+Var Text</b>
+
+Page custom nsDialogsPage
+Page instfiles
+
+Function nsDialogsPage
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $Dialog
+
+ ${If} $Dialog == error
+ Abort
+ ${EndIf}
+<b>
+ ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!"
+ Pop $Label
+
+ ${NSD_CreateText} 0 13u 100% -13u "Type something here..."
+ Pop $Text
+</b>
+ nsDialogs::Show
+
+FunctionEnd
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<p>Available control types that can be created with ${NSD_Create*} are:</p>
+
+<ul>
+<li>HLine</li>
+<li>VLine</li>
+<li>Label</li>
+<li>Icon</li>
+<li>Bitmap</li>
+<li>BrowseButton</li>
+<li>Link</li>
+<li>Button</li>
+<li>GroupBox</li>
+<li>CheckBox</li>
+<li>RadioButton</li>
+<li>Text</li>
+<li>FileRequest</li>
+<li>DirRequest</li>
+<li>ComboBox</li>
+<li>ListBox</li>
+</ul>
+
+<h3><a name="step-state"></a>Control State</h3>
+
+<p>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 <i>leave callback</i> 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.</p>
+
+<p>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 <i>LB_GETCURSEL</i> and <i>LB_GETTEXT</i>. With time, the library of macros in nsDialogs.nsh will fill with more and more macros that'll handle more cases like this.</p>
+
+<blockquote><pre>!include nsDialogs.nsh
+!include LogicLib.nsh
+
+Name nsDialogs
+OutFile nsDialogs.exe
+
+XPStyle on
+
+Var Dialog
+Var Label
+Var Text
+
+Page custom nsDialogsPage <b>nsDialogsPageLeave</b>
+Page instfiles
+
+Function nsDialogsPage
+
+ nsDialogs::Create /NOUNLOAD 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
+
+<b>Function nsDialogsPageLeave
+
+ ${NSD_GetText} $Text $0
+ MessageBox MB_OK "You typed:$\n$\n$0"
+
+FunctionEnd</b>
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<h3><a name="step-notify"></a>Real-time Notification</h3>
+
+<p>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's nothing to notify about labels.</p>
+
+<p>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.</p>
+
+<p>The new example will respond to the user type <i>hello</i> in the text box.</p>
+
+<blockquote><pre>!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 /NOUNLOAD 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
+ <b>${NSD_OnChange} $Text nsDialogsPageTextChange</b>
+
+ nsDialogs::Show
+
+FunctionEnd
+
+Function nsDialogsPageLeave
+
+ ${NSD_GetText} $Text $0
+ MessageBox MB_OK "You typed:$\n$\n$0"
+
+FunctionEnd
+
+<b>Function nsDialogsPageTextChange
+
+ Pop $1 # $1 == $ Text
+
+ ${NSD_GetText} $Text $0
+
+ ${If} $0 == "hello"
+
+ MessageBox MB_OK "right back at ya!"
+
+ ${EndIf}
+
+FunctionEnd</b>
+
+Section
+
+ DetailPrint "hello world"
+
+SectionEnd</pre></blockquote>
+
+<h2><a name="ref"></a>Function Reference</h2>
+
+<h3><a name="ref-create"></a>Create</h3>
+
+<p><code>nsDialogs::Create /NOUNLOAD <i>rect</i></code></p>
+
+<p>Creates a new dialog. <i>rect</i> 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 1040 for the welcome and the finish page.</p>
+
+<p>Returns the new dialog's HWND on the stack or <i>error</i>.</p>
+
+<h3><a name="ref-createcontrol"></a>CreateControl</h3>
+
+<p><code>nsDialogs::CreateControl /NOUNLOAD <i>class</i> <i>style</i> <i>extended_style</i> <i>x</i> <i>y</i> <i>width</i> <i>height</i> <i>text</i> </code></p>
+
+<p>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.</p>
+
+<p>Returns the new dialog's HWND on the stack or <i>error</i>.</p>
+
+<h3><a name="ref-show"></a>Show</h3>
+
+<p><code>nsDialogs::Show</code></p>
+
+<p>Displays the page. Call this once finished with nsDialogs::Create, nsDialogs::CreateControl and the rest.</p>
+
+<p>Returns nothing.</p>
+
+<h3><a name="ref-selectfiledialog"></a>SelectFileDialog</h3>
+
+<p><code>nsDialogs::SelectFileDialog /NOUNLOAD <i>mode</i> <i>initial_selection</i> <i>filter</i></code></p>
+
+<p>Displays a file selection dialog to the user. If <i>mode</i> is set to <i>save</i>, displays a file save dialog. If <i>mode</i> is set to <i>open</i>, displays a file open dialog. <i>filter</i> is a list of available file filters separated by pipes. If an empty string is passed, the default is used - <i>All Files|*.*</i>.</p>
+
+<p>Returns the selected file on the stack or an empty string if the user canceled the operation.</p>
+
+<h3><a name="ref-selectfolderdialog"></a>SelectFolderDialog</h3>
+
+<p><code>nsDialogs::SelectFolderDialog /NOUNLOAD <i>title</i> <i>initial_selection</i></code></p>
+
+<p>Displays a directory selection dialog to the user.</p>
+
+<p>Returns the selected directory on the stack or an empty string if the user canceled the operation.</p>
+
+<h3><a name="ref-setrtl"></a>SetRTL</h3>
+
+<p><code>nsDialogs::SetRTL /NOUNLOAD <i>rtl_setting</i></code></p>
+
+<p>Sets right-to-left mode on or off. If <i>rtl_setting</i> is 0, it's set to off. If <i>rtl_setting</i> is 1, it's set to on. This function must be called before any calls to nsDialogs::CreateControl.</p>
+
+<p>Returns nothing.</p>
+
+<h3><a name="ref-getuserdata"></a>GetUserData</h3>
+
+<p><code>nsDialogs::GetUserData /NOUNLOAD <i>control_HWND</i></code></p>
+
+<p>Returns user data associated with the control on the stack. Use nsDialogs::SetUserData to set this data.</p>
+
+<h3><a name="ref-setuserdata"></a>SetUserData</h3>
+
+<p><code>nsDialogs::SetUserData /NOUNLOAD <i>control_HWND</i> <i>data</i></code></p>
+
+<p>Associates <i>data</i> with the control. Use nsDialogs::GetUserData to get this data.</p>
+
+<p>Returns nothing.</p>
+
+<h3><a name="ref-onback"></a>OnBack</h3>
+
+<p><code>nsDialogs::OnBack /NOUNLOAD <i>function_address</i></code></p>
+
+<p>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.</p>
+
+<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
+
+<p>Returns nothing.</p>
+
+<h3><a name="ref-onchange"></a>OnChange</h3>
+
+<p><code>nsDialogs::OnChange /NOUNLOAD <i>control_HWND</i> <i>function_address</i></code></p>
+
+<p>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.</p>
+
+<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
+
+<p>Returns nothing.</p>
+
+<h3><a name="ref-onclick"></a>OnClick</h3>
+
+<p><code>nsDialogs::OnClick /NOUNLOAD <i>control_HWND</i> <i>function_address</i></code></p>
+
+<p>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.</p>
+
+<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
+
+<p>Returns nothing.</p>
+
+<h3><a name="ref-onnotify"></a>OnNotify</h3>
+
+<p><code>nsDialogs::OnNotify /NOUNLOAD <i>control_HWND</i> <i>function_address</i></code></p>
+
+<p>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 MNHDR structure will be waiting on its stack.</p>
+
+<p>Use GetFunctionAddress to get the address of the desired callback function.</p>
+
+<p>Returns nothing.</p>
+
+<h2><a name="faq"></a>FAQ</h2>
+
+<div>
+
+<ul>
+
+<li>
+<b>Q:</b> Can nsDialogs handle InstallOptions INI files?
+<blockquote>
+<p><b>A:</b> nsDialogs.nsh contains a function called <i>CreateDialogFromINI</i> 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 notification yet. <i>Examples\nsDialogs\InstallOptions.nsi</i> shows a usage example of this function.</p><p>In the future there'll also be a function that creates the script itself.
+
+</li>
+
+</ul>
+
+</div>
+
+</body>
</html> \ No newline at end of file
diff --git a/Contrib/nsDialogs/SConscript b/Contrib/nsDialogs/SConscript
index bd58a4b..44f9c47 100755
--- a/Contrib/nsDialogs/SConscript
+++ b/Contrib/nsDialogs/SConscript
@@ -1,41 +1,41 @@
-target = 'nsDialogs'
-
-files = Split("""
- browse.c
- input.c
- nsDialogs.c
- nsis.c
- rtl.c
-""")
-
-resources = Split("""
- dialog.rc
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- shell32
- comdlg32
- ole32
-""")
-
-docs = Split("""
- Readme.html
-""")
-
-examples = Split("""
- example.nsi
- InstallOptions.nsi
- welcome.nsi
-""")
-
-includes = Split("""
- nsDialogs.nsh
-""")
-
-Import('BuildPlugin env')
-
-BuildPlugin(target, files, libs, examples, docs, res = resources)
-env.DistributeInclude(includes)
+target = 'nsDialogs'
+
+files = Split("""
+ browse.c
+ input.c
+ nsDialogs.c
+ nsis.c
+ rtl.c
+""")
+
+resources = Split("""
+ dialog.rc
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ shell32
+ comdlg32
+ ole32
+""")
+
+docs = Split("""
+ Readme.html
+""")
+
+examples = Split("""
+ example.nsi
+ InstallOptions.nsi
+ welcome.nsi
+""")
+
+includes = Split("""
+ nsDialogs.nsh
+""")
+
+Import('BuildPlugin env')
+
+BuildPlugin(target, files, libs, examples, docs, res = resources)
+env.DistributeInclude(includes)
diff --git a/Contrib/nsDialogs/browse.c b/Contrib/nsDialogs/browse.c
index dbb7696..7fc6e49 100755
--- a/Contrib/nsDialogs/browse.c
+++ b/Contrib/nsDialogs/browse.c
@@ -1,153 +1,153 @@
-#include <windows.h>
-#include <shlobj.h>
-
-#include "defs.h"
-#include "nsis.h"
-
-int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) {
- if (uMsg == BFFM_INITIALIZED)
- SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData);
-
- return 0;
-}
-
-void __declspec(dllexport) SelectFolderDialog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- BROWSEINFO bi;
-
- char result[MAX_PATH];
- char initial[MAX_PATH];
- char title[1024];
- LPITEMIDLIST resultPIDL;
-
- EXDLL_INIT();
-
- if (popstring(title, sizeof(initial)))
- {
- pushstring("error");
- return;
- }
-
- if (popstring(initial, sizeof(title)))
- {
- pushstring("error");
- return;
- }
-
- bi.hwndOwner = hwndParent;
- bi.pidlRoot = NULL;
- bi.pszDisplayName = result;
- bi.lpszTitle = title;
-#ifndef BIF_NEWDIALOGSTYLE
-#define BIF_NEWDIALOGSTYLE 0x0040
-#endif
- bi.ulFlags = BIF_STATUSTEXT | BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
- bi.lpfn = BrowseCallbackProc;
- bi.lParam = (LPARAM) initial;
- bi.iImage = 0;
-
- /*if (pField->pszRoot) {
- LPSHELLFOLDER sf;
- ULONG eaten;
- LPITEMIDLIST root;
- int ccRoot = (lstrlen(pField->pszRoot) * 2) + 2;
- LPWSTR pwszRoot = (LPWSTR) MALLOC(ccRoot);
- MultiByteToWideChar(CP_ACP, 0, pField->pszRoot, -1, pwszRoot, ccRoot);
- SHGetDesktopFolder(&sf);
- sf->ParseDisplayName(hConfigWindow, NULL, pwszRoot, &eaten, &root, NULL);
- bi.pidlRoot = root;
- sf->Release();
- FREE(pwszRoot);
- }*/
-
- resultPIDL = SHBrowseForFolder(&bi);
- if (!resultPIDL)
- {
- pushstring("error");
- return;
- }
-
- if (SHGetPathFromIDList(resultPIDL, result))
- {
- pushstring(result);
- }
- else
- {
- pushstring("error");
- }
-
- CoTaskMemFree(resultPIDL);
-}
-
-void __declspec(dllexport) SelectFileDialog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- OPENFILENAME ofn={0,}; // XXX WTF
- int save;
- char type[5];
- char path[1024];
- char filter[1024];
- char currentDirectory[1024];
-
- EXDLL_INIT();
-
- ofn.lStructSize = sizeof(OPENFILENAME);
- ofn.hwndOwner = hwndParent;
- ofn.lpstrFilter = filter;
- ofn.lpstrFile = path;
- ofn.nMaxFile = sizeof(path);
- //ofn.Flags = pField->nFlags & (OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_CREATEPROMPT | OFN_EXPLORER);
- ofn.Flags = OFN_CREATEPROMPT | OFN_EXPLORER;
-
- popstring(type, sizeof(type));
- popstring(path, sizeof(path));
- popstring(filter, sizeof(filter));
-
- save = !lstrcmpi(type, "save");
-
- if (!filter[0])
- {
- lstrcpy(filter, "All Files|*.*");
- }
-
- {
- // Convert the filter to the format required by Windows: NULL after each
- // item followed by a terminating NULL
- char *p = filter;
- while (*p) // XXX take care for 1024
- {
- if (*p == '|')
- {
- *p++ = 0;
- }
- else
- {
- p = CharNext(p);
- }
- }
- p++;
- *p = 0;
- }
-
- GetCurrentDirectory(sizeof(currentDirectory), currentDirectory); // save working dir
-
- if ((save ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)))
- {
- pushstring(path);
- }
- else if (CommDlgExtendedError() == FNERR_INVALIDFILENAME)
- {
- *path = '\0';
- if ((save ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)))
- {
- pushstring(path);
- }
- else
- {
- pushstring("");
- }
- }
-
- // restore working dir
- // OFN_NOCHANGEDIR doesn't always work (see MSDN)
- SetCurrentDirectory(currentDirectory);
+#include <windows.h>
+#include <shlobj.h>
+
+#include "defs.h"
+#include "nsis.h"
+
+int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData) {
+ if (uMsg == BFFM_INITIALIZED)
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, pData);
+
+ return 0;
+}
+
+void __declspec(dllexport) SelectFolderDialog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ BROWSEINFO bi;
+
+ char result[MAX_PATH];
+ char initial[MAX_PATH];
+ char title[1024];
+ LPITEMIDLIST resultPIDL;
+
+ EXDLL_INIT();
+
+ if (popstring(title, sizeof(initial)))
+ {
+ pushstring("error");
+ return;
+ }
+
+ if (popstring(initial, sizeof(title)))
+ {
+ pushstring("error");
+ return;
+ }
+
+ bi.hwndOwner = hwndParent;
+ bi.pidlRoot = NULL;
+ bi.pszDisplayName = result;
+ bi.lpszTitle = title;
+#ifndef BIF_NEWDIALOGSTYLE
+#define BIF_NEWDIALOGSTYLE 0x0040
+#endif
+ bi.ulFlags = BIF_STATUSTEXT | BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
+ bi.lpfn = BrowseCallbackProc;
+ bi.lParam = (LPARAM) initial;
+ bi.iImage = 0;
+
+ /*if (pField->pszRoot) {
+ LPSHELLFOLDER sf;
+ ULONG eaten;
+ LPITEMIDLIST root;
+ int ccRoot = (lstrlen(pField->pszRoot) * 2) + 2;
+ LPWSTR pwszRoot = (LPWSTR) MALLOC(ccRoot);
+ MultiByteToWideChar(CP_ACP, 0, pField->pszRoot, -1, pwszRoot, ccRoot);
+ SHGetDesktopFolder(&sf);
+ sf->ParseDisplayName(hConfigWindow, NULL, pwszRoot, &eaten, &root, NULL);
+ bi.pidlRoot = root;
+ sf->Release();
+ FREE(pwszRoot);
+ }*/
+
+ resultPIDL = SHBrowseForFolder(&bi);
+ if (!resultPIDL)
+ {
+ pushstring("error");
+ return;
+ }
+
+ if (SHGetPathFromIDList(resultPIDL, result))
+ {
+ pushstring(result);
+ }
+ else
+ {
+ pushstring("error");
+ }
+
+ CoTaskMemFree(resultPIDL);
+}
+
+void __declspec(dllexport) SelectFileDialog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ OPENFILENAME ofn={0,}; // XXX WTF
+ int save;
+ char type[5];
+ char path[1024];
+ char filter[1024];
+ char currentDirectory[1024];
+
+ EXDLL_INIT();
+
+ ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.hwndOwner = hwndParent;
+ ofn.lpstrFilter = filter;
+ ofn.lpstrFile = path;
+ ofn.nMaxFile = sizeof(path);
+ //ofn.Flags = pField->nFlags & (OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_CREATEPROMPT | OFN_EXPLORER);
+ ofn.Flags = OFN_CREATEPROMPT | OFN_EXPLORER;
+
+ popstring(type, sizeof(type));
+ popstring(path, sizeof(path));
+ popstring(filter, sizeof(filter));
+
+ save = !lstrcmpi(type, "save");
+
+ if (!filter[0])
+ {
+ lstrcpy(filter, "All Files|*.*");
+ }
+
+ {
+ // Convert the filter to the format required by Windows: NULL after each
+ // item followed by a terminating NULL
+ char *p = filter;
+ while (*p) // XXX take care for 1024
+ {
+ if (*p == '|')
+ {
+ *p++ = 0;
+ }
+ else
+ {
+ p = CharNext(p);
+ }
+ }
+ p++;
+ *p = 0;
+ }
+
+ GetCurrentDirectory(sizeof(currentDirectory), currentDirectory); // save working dir
+
+ if ((save ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)))
+ {
+ pushstring(path);
+ }
+ else if (CommDlgExtendedError() == FNERR_INVALIDFILENAME)
+ {
+ *path = '\0';
+ if ((save ? GetSaveFileName(&ofn) : GetOpenFileName(&ofn)))
+ {
+ pushstring(path);
+ }
+ else
+ {
+ pushstring("");
+ }
+ }
+
+ // restore working dir
+ // OFN_NOCHANGEDIR doesn't always work (see MSDN)
+ SetCurrentDirectory(currentDirectory);
} \ No newline at end of file
diff --git a/Contrib/nsDialogs/defs.h b/Contrib/nsDialogs/defs.h
index 1bf3929..e322644 100755
--- a/Contrib/nsDialogs/defs.h
+++ b/Contrib/nsDialogs/defs.h
@@ -1,67 +1,67 @@
-#ifndef __NS_DIALOGS__DEFS_H__
-#define __NS_DIALOGS__DEFS_H__
-
-#include <windows.h>
-
-#define NSDFUNC __stdcall
-
-typedef int nsFunction;
-
-enum nsControlType
-{
- NSCTL_UNKNOWN,
- NSCTL_BUTTON,
- NSCTL_EDIT,
- NSCTL_COMBOBOX,
- NSCTL_LISTBOX,
- NSCTL_RICHEDIT,
- NSCTL_RICHEDIT2,
- NSCTL_STATIC,
- NSCTL_TREE
-};
-
-struct nsDialogCallbacks
-{
- nsFunction onBack;
-};
-
-#define DLG_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsDialogCallbacks, x)/sizeof(nsFunction))
-
-struct nsControlCallbacks
-{
- nsFunction onClick;
- nsFunction onChange;
- nsFunction onNotify;
-};
-
-#define CTL_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsControlCallbacks, x)/sizeof(nsFunction))
-
-#define USERDATA_SIZE 1024
-
-struct nsControl
-{
- HWND window;
- enum nsControlType type;
- char userData[USERDATA_SIZE];
- struct nsControlCallbacks callbacks;
-};
-
-struct nsDialog
-{
- HWND hwDialog;
- HWND hwParent;
-
- WNDPROC parentOriginalWndproc;
-
- BOOL rtl;
-
- struct nsDialogCallbacks callbacks;
-
- unsigned controlCount;
-
- struct nsControl* controls;
-};
-
-#define NSCONTROL_ID_PROP "NSIS: nsControl pointer property"
-
-#endif//__NS_DIALOGS__DEFS_H__
+#ifndef __NS_DIALOGS__DEFS_H__
+#define __NS_DIALOGS__DEFS_H__
+
+#include <windows.h>
+
+#define NSDFUNC __stdcall
+
+typedef int nsFunction;
+
+enum nsControlType
+{
+ NSCTL_UNKNOWN,
+ NSCTL_BUTTON,
+ NSCTL_EDIT,
+ NSCTL_COMBOBOX,
+ NSCTL_LISTBOX,
+ NSCTL_RICHEDIT,
+ NSCTL_RICHEDIT2,
+ NSCTL_STATIC,
+ NSCTL_TREE
+};
+
+struct nsDialogCallbacks
+{
+ nsFunction onBack;
+};
+
+#define DLG_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsDialogCallbacks, x)/sizeof(nsFunction))
+
+struct nsControlCallbacks
+{
+ nsFunction onClick;
+ nsFunction onChange;
+ nsFunction onNotify;
+};
+
+#define CTL_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsControlCallbacks, x)/sizeof(nsFunction))
+
+#define USERDATA_SIZE 1024
+
+struct nsControl
+{
+ HWND window;
+ enum nsControlType type;
+ char userData[USERDATA_SIZE];
+ struct nsControlCallbacks callbacks;
+};
+
+struct nsDialog
+{
+ HWND hwDialog;
+ HWND hwParent;
+
+ WNDPROC parentOriginalWndproc;
+
+ BOOL rtl;
+
+ struct nsDialogCallbacks callbacks;
+
+ unsigned controlCount;
+
+ struct nsControl* controls;
+};
+
+#define NSCONTROL_ID_PROP "NSIS: nsControl pointer property"
+
+#endif//__NS_DIALOGS__DEFS_H__
diff --git a/Contrib/nsDialogs/dialog.rc b/Contrib/nsDialogs/dialog.rc
index bb0d135..90e9849 100755
--- a/Contrib/nsDialogs/dialog.rc
+++ b/Contrib/nsDialogs/dialog.rc
@@ -1,91 +1,91 @@
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <winresrc.h>
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-1 DIALOG DISCARDABLE 0, 0, 57, 41
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg"
-BEGIN
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_DIALOG1, DIALOG
- STYLE DS_CONTROL | WS_CHILD
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 50
- TOPMARGIN, 7
- BOTTOMMARGIN, 34
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winresrc.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+1 DIALOG DISCARDABLE 0, 0, 57, 41
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_DIALOG1, DIALOG
+ STYLE DS_CONTROL | WS_CHILD
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 50
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 34
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/nsDialogs/example.nsi b/Contrib/nsDialogs/example.nsi
index 3854c88..39ccaa5 100755
--- a/Contrib/nsDialogs/example.nsi
+++ b/Contrib/nsDialogs/example.nsi
@@ -1,76 +1,76 @@
-!include nsDialogs.nsh
-!include LogicLib.nsh
-
-Name "nsDialogs Example"
-OutFile "nsDialogs Example.exe"
-
-XPStyle on
-
-Page license
-Page custom nsDialogsPage
-
-Var BUTTON
-Var EDIT
-Var CHECKBOX
-
-Function nsDialogsPage
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $0
-
- GetFunctionAddress $0 OnBack
- nsDialogs::OnBack /NOUNLOAD $0
-
- ${NSD_CreateButton} 0 0 100% 12u Test
- Pop $BUTTON
- GetFunctionAddress $0 OnClick
- nsDialogs::OnClick /NOUNLOAD $BUTTON $0
-
- ${NSD_CreateText} 0 35 100% 12u hello
- Pop $EDIT
- GetFunctionAddress $0 OnChange
- nsDialogs::OnChange /NOUNLOAD $EDIT $0
-
- ${NSD_CreateCheckbox} 0 -50 100% 8u Test
- Pop $CHECKBOX
- GetFunctionAddress $0 OnCheckbox
- nsDialogs::OnClick /NOUNLOAD $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
-
- MessageBox MB_OK clicky
-
-FunctionEnd
-
-Function OnChange
-
- System::Call user32::GetWindowText(i$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
-
- MessageBox MB_OK "checkbox clicked"
-
-FunctionEnd
-
-Section
-SectionEnd
+!include nsDialogs.nsh
+!include LogicLib.nsh
+
+Name "nsDialogs Example"
+OutFile "nsDialogs Example.exe"
+
+XPStyle on
+
+Page license
+Page custom nsDialogsPage
+
+Var BUTTON
+Var EDIT
+Var CHECKBOX
+
+Function nsDialogsPage
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $0
+
+ GetFunctionAddress $0 OnBack
+ nsDialogs::OnBack /NOUNLOAD $0
+
+ ${NSD_CreateButton} 0 0 100% 12u Test
+ Pop $BUTTON
+ GetFunctionAddress $0 OnClick
+ nsDialogs::OnClick /NOUNLOAD $BUTTON $0
+
+ ${NSD_CreateText} 0 35 100% 12u hello
+ Pop $EDIT
+ GetFunctionAddress $0 OnChange
+ nsDialogs::OnChange /NOUNLOAD $EDIT $0
+
+ ${NSD_CreateCheckbox} 0 -50 100% 8u Test
+ Pop $CHECKBOX
+ GetFunctionAddress $0 OnCheckbox
+ nsDialogs::OnClick /NOUNLOAD $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
+
+ MessageBox MB_OK clicky
+
+FunctionEnd
+
+Function OnChange
+
+ System::Call user32::GetWindowText(i$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
+
+ MessageBox MB_OK "checkbox clicked"
+
+FunctionEnd
+
+Section
+SectionEnd
diff --git a/Contrib/nsDialogs/input.c b/Contrib/nsDialogs/input.c
index 4129e0e..bfda3dc 100755
--- a/Contrib/nsDialogs/input.c
+++ b/Contrib/nsDialogs/input.c
@@ -1,80 +1,80 @@
-#include <windows.h>
-
-#include "input.h"
-#include "defs.h"
-#include "nsis.h"
-#include "rtl.h"
-
-extern struct nsDialog g_dialog;
-
-static int NSDFUNC ConvertPlacement(char *str, int total, int height)
-{
- char unit = *CharPrev(str, str + lstrlen(str));
- int x = myatoi(str);
-
- if (unit == '%')
- {
- if (x < 0)
- {
- return MulDiv(total, 100 + x, 100);
- }
-
- return MulDiv(total, x, 100);
- }
- else if (unit == 'u')
- {
- RECT r;
-
- r.left = r.top = x;
-
- MapDialogRect(g_dialog.hwParent, &r);
-
- if (height)
- return x >= 0 ? r.top : total + r.top;
- else
- return x >= 0 ? r.left : total + r.left;
- }
-
- if (x < 0)
- {
- return total + x;
- }
-
- return x;
-}
-
-int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height)
-{
- RECT dialogRect;
- int dialogWidth;
- int dialogHeight;
- char buf[1024];
-
- GetClientRect(g_dialog.hwDialog, &dialogRect);
- dialogWidth = dialogRect.right;
- dialogHeight = dialogRect.bottom;
-
- if (popstring(buf, 1024))
- return 1;
-
- *x = ConvertPlacement(buf, dialogWidth, 0);
-
- if (popstring(buf, 1024))
- return 1;
-
- *y = ConvertPlacement(buf, dialogHeight, 1);
-
- if (popstring(buf, 1024))
- return 1;
-
- *width = ConvertPlacement(buf, dialogWidth, 0);
-
- if (popstring(buf, 1024))
- return 1;
-
- *height = ConvertPlacement(buf, dialogHeight, 1);
-
- ConvertPosToRTL(x, *width, dialogWidth);
-
- return 0;
-}
+#include <windows.h>
+
+#include "input.h"
+#include "defs.h"
+#include "nsis.h"
+#include "rtl.h"
+
+extern struct nsDialog g_dialog;
+
+static int NSDFUNC ConvertPlacement(char *str, int total, int height)
+{
+ char unit = *CharPrev(str, str + lstrlen(str));
+ int x = myatoi(str);
+
+ if (unit == '%')
+ {
+ if (x < 0)
+ {
+ return MulDiv(total, 100 + x, 100);
+ }
+
+ return MulDiv(total, x, 100);
+ }
+ else if (unit == 'u')
+ {
+ RECT r;
+
+ r.left = r.top = x;
+
+ MapDialogRect(g_dialog.hwParent, &r);
+
+ if (height)
+ return x >= 0 ? r.top : total + r.top;
+ else
+ return x >= 0 ? r.left : total + r.left;
+ }
+
+ if (x < 0)
+ {
+ return total + x;
+ }
+
+ return x;
+}
+
+int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height)
+{
+ RECT dialogRect;
+ int dialogWidth;
+ int dialogHeight;
+ char buf[1024];
+
+ GetClientRect(g_dialog.hwDialog, &dialogRect);
+ dialogWidth = dialogRect.right;
+ dialogHeight = dialogRect.bottom;
+
+ if (popstring(buf, 1024))
+ return 1;
+
+ *x = ConvertPlacement(buf, dialogWidth, 0);
+
+ if (popstring(buf, 1024))
+ return 1;
+
+ *y = ConvertPlacement(buf, dialogHeight, 1);
+
+ if (popstring(buf, 1024))
+ return 1;
+
+ *width = ConvertPlacement(buf, dialogWidth, 0);
+
+ if (popstring(buf, 1024))
+ return 1;
+
+ *height = ConvertPlacement(buf, dialogHeight, 1);
+
+ ConvertPosToRTL(x, *width, dialogWidth);
+
+ return 0;
+}
diff --git a/Contrib/nsDialogs/input.h b/Contrib/nsDialogs/input.h
index b4ae2cd..d37d809 100755
--- a/Contrib/nsDialogs/input.h
+++ b/Contrib/nsDialogs/input.h
@@ -1,8 +1,8 @@
-#ifndef __NS_DIALOGS__INPUT_H__
-#define __NS_DIALOGS__INPUT_H__
-
-#include "defs.h"
-
-int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height);
-
-#endif//__NS_DIALOGS__INPUT_H__
+#ifndef __NS_DIALOGS__INPUT_H__
+#define __NS_DIALOGS__INPUT_H__
+
+#include "defs.h"
+
+int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height);
+
+#endif//__NS_DIALOGS__INPUT_H__
diff --git a/Contrib/nsDialogs/nsDialogs.c b/Contrib/nsDialogs/nsDialogs.c
index 7533c8b..10d4cf7 100755
--- a/Contrib/nsDialogs/nsDialogs.c
+++ b/Contrib/nsDialogs/nsDialogs.c
@@ -1,420 +1,472 @@
-#include <windows.h>
-
-#include "defs.h"
-#include "nsis.h"
-#include "input.h"
-#include "rtl.h"
-
-HINSTANCE g_hInstance;
-struct nsDialog g_dialog;
-extra_parameters* g_pluginParms;
-
-struct nsControl* NSDFUNC GetControl(HWND hwCtl)
-{
- unsigned id = (unsigned) GetProp(hwCtl, NSCONTROL_ID_PROP);
-
- if (id == 0 || id > g_dialog.controlCount)
- {
- return NULL;
- }
-
- return &g_dialog.controls[id - 1];
-}
-
-BOOL CALLBACK ParentProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- BOOL res;
-
- if (message == WM_NOTIFY_OUTER_NEXT)
- {
- if (wParam == (WPARAM)-1)
- {
- if (g_pluginParms->ExecuteCodeSegment(g_dialog.callbacks.onBack - 1, 0))
- {
- return 0;
- }
- }
- }
-
- res = CallWindowProc(g_dialog.parentOriginalWndproc, hwnd, message, wParam, lParam);
-
- if (message == WM_NOTIFY_OUTER_NEXT && !res)
- {
- DestroyWindow(g_dialog.hwDialog);
- HeapFree(GetProcessHeap(), 0, g_dialog.controls);
- g_dialog.hwDialog = NULL;
- g_dialog.controls = NULL;
- }
-
- return res;
-}
-
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch (uMsg)
- {
- // handle notifications
- case WM_COMMAND:
- {
- HWND hwCtl = GetDlgItem(hwndDlg, LOWORD(wParam));
- struct nsControl* ctl = GetControl(hwCtl);
-
- if (ctl == NULL)
- break;
-
- if (HIWORD(wParam) == BN_CLICKED && ctl->type == NSCTL_BUTTON)
- {
- pushint((int) hwCtl);
- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onClick - 1, 0);
- }
- else if (HIWORD(wParam) == EN_CHANGE && ctl->type == NSCTL_EDIT)
- {
- pushint((int) hwCtl);
- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0);
- }
- else if (HIWORD(wParam) == LBN_SELCHANGE && ctl->type == NSCTL_LISTBOX)
- {
- pushint((int) hwCtl);
- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0);
- }
- else if (HIWORD(wParam) == CBN_SELCHANGE && ctl->type == NSCTL_COMBOBOX)
- {
- pushint((int) hwCtl);
- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0);
- }
-
- break;
- }
-
- case WM_NOTIFY:
- {
- LPNMHDR nmhdr = (LPNMHDR) lParam;
- struct nsControl* ctl = GetControl(nmhdr->hwndFrom);
-
- if (ctl == NULL)
- break;
-
- if (!ctl->callbacks.onNotify)
- break;
-
- pushint((int) nmhdr);
- pushint(nmhdr->code);
- pushint((int) nmhdr->hwndFrom);
- g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onNotify - 1, 0);
- }
-
- // handle colors
- case WM_CTLCOLORSTATIC:
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORDLG:
- case WM_CTLCOLORBTN:
- case WM_CTLCOLORLISTBOX:
- // let the NSIS window handle colors, it knows best
- return SendMessage(g_dialog.hwParent, uMsg, wParam, lParam);
- }
-
- return FALSE;
-}
-
-void __declspec(dllexport) Create(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- HWND hwPlacementRect;
- RECT rcPlacement;
-
- EXDLL_INIT();
-
- g_dialog.hwParent = hwndParent;
- g_pluginParms = extra;
-
- hwPlacementRect = GetDlgItem(hwndParent, popint());
- GetWindowRect(hwPlacementRect, &rcPlacement);
- MapWindowPoints(NULL, hwndParent, (LPPOINT) &rcPlacement, 2);
-
- g_dialog.hwDialog = CreateDialog(g_hInstance, MAKEINTRESOURCE(1), hwndParent, DialogProc);
-
- if (g_dialog.hwDialog == NULL)
- {
- pushstring("error");
- return;
- }
-
- SetWindowPos(
- g_dialog.hwDialog,
- 0,
- rcPlacement.left,
- rcPlacement.top,
- rcPlacement.right - rcPlacement.left,
- rcPlacement.bottom - rcPlacement.top,
- SWP_NOZORDER | SWP_NOACTIVATE
- );
-
- g_dialog.parentOriginalWndproc = (WNDPROC) SetWindowLong(hwndParent, DWL_DLGPROC, (long) ParentProc);
-
- g_dialog.rtl = FALSE;
-
- g_dialog.controlCount = 0;
- g_dialog.controls = (struct nsControl*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 0);
-
- pushint((int) g_dialog.hwDialog);
-}
-
-void __declspec(dllexport) CreateControl(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- char *className;
- char *text;
-
- HWND hwItem;
- int x, y, width, height;
- DWORD style, exStyle;
- size_t id;
-
- // get info from stack
-
- className = (char *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, g_stringsize * 2);
- text = &className[g_stringsize];
-
- if (!className)
- {
- pushstring("error");
- return;
- }
-
- if (popstring(className, 0))
- {
- pushstring("error");
- HeapFree(GetProcessHeap(), 0, className);
- return;
- }
-
- style = (DWORD) popint();
- exStyle = (DWORD) popint();
-
- PopPlacement(&x, &y, &width, &height);
-
- if (popstring(text, 0))
- {
- pushstring("error");
- HeapFree(GetProcessHeap(), 0, className);
- return;
- }
-
- // create item descriptor
-
- id = g_dialog.controlCount;
- g_dialog.controlCount++;
- g_dialog.controls = (struct nsControl*) HeapReAlloc(
- GetProcessHeap(),
- HEAP_ZERO_MEMORY,
- g_dialog.controls,
- g_dialog.controlCount * sizeof(struct nsControl));
-
- if (!lstrcmpi(className, "BUTTON"))
- g_dialog.controls[id].type = NSCTL_BUTTON;
- else if (!lstrcmpi(className, "EDIT"))
- g_dialog.controls[id].type = NSCTL_EDIT;
- else if (!lstrcmpi(className, "COMBOBOX"))
- g_dialog.controls[id].type = NSCTL_COMBOBOX;
- else if (!lstrcmpi(className, "LISTBOX"))
- g_dialog.controls[id].type = NSCTL_LISTBOX;
- else if (!lstrcmpi(className, "RichEdit"))
- g_dialog.controls[id].type = NSCTL_RICHEDIT;
- else if (!lstrcmpi(className, "RICHEDIT_CLASS"))
- g_dialog.controls[id].type = NSCTL_RICHEDIT2;
- else if (!lstrcmpi(className, "STATIC"))
- g_dialog.controls[id].type = NSCTL_STATIC;
- else
- g_dialog.controls[id].type = NSCTL_UNKNOWN;
-
- // apply rtl to style
-
- ConvertStyleToRTL(g_dialog.controls[id].type, &style, &exStyle);
-
- // create item's window
-
- hwItem = CreateWindowEx(
- exStyle,
- className,
- text,
- style,
- x, y, width, height,
- g_dialog.hwDialog,
- (HMENU) (1200 + id),
- g_hInstance,
- NULL);
-
- g_dialog.controls[id].window = hwItem;
-
- // remember id
-
- SetProp(hwItem, NSCONTROL_ID_PROP, (HANDLE) (id + 1));
-
- // set font
-
- SendMessage(hwItem, WM_SETFONT, SendMessage(g_dialog.hwParent, WM_GETFONT, 0, 0), TRUE);
-
- // push back result
-
- pushint((int) hwItem);
-
- // done
-
- HeapFree(GetProcessHeap(), 0, className);
-}
-
-// for backward compatibility (2.29 had CreateItem)
-void __declspec(dllexport) CreateItem(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- CreateControl(hwndParent, string_size, variables, stacktop, extra);
-}
-
-void __declspec(dllexport) SetUserData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- HWND hwCtl;
- struct nsControl* ctl;
-
- // get info from stack
-
- hwCtl = (HWND) popint();
-
- if (!IsWindow(hwCtl))
- {
- popint(); // remove user data from stack
- return;
- }
-
- // get descriptor
-
- ctl = GetControl(hwCtl);
-
- if (ctl == NULL)
- return;
-
- // set user data
-
- popstring(ctl->userData, USERDATA_SIZE);
-}
-
-void __declspec(dllexport) GetUserData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- HWND hwCtl;
- struct nsControl* ctl;
-
- // get info from stack
-
- hwCtl = (HWND) popint();
-
- if (!IsWindow(hwCtl))
- {
- pushstring("");
- return;
- }
-
- // get descriptor
-
- ctl = GetControl(hwCtl);
-
- if (ctl == NULL)
- {
- pushstring("");
- return;
- }
-
- // return user data
-
- pushstring(ctl->userData);
-}
-
-void NSDFUNC SetControlCallback(size_t callbackIdx)
-{
- HWND hwCtl;
- nsFunction callback;
- nsFunction* callbacks;
- struct nsControl* ctl;
-
- // get info from stack
-
- hwCtl = (HWND) popint();
- callback = (nsFunction) popint();
-
- if (!IsWindow(hwCtl))
- return;
-
- // get descriptor
-
- ctl = GetControl(hwCtl);
-
- if (ctl == NULL)
- return;
-
- // set callback
-
- callbacks = (nsFunction*) &ctl->callbacks;
- callbacks[callbackIdx] = callback;
-}
-
-void NSDFUNC SetDialogCallback(size_t callbackIdx)
-{
- nsFunction callback;
- nsFunction* callbacks;
-
- // get info from stack
-
- callback = (nsFunction) popint();
-
- // set callback
-
- callbacks = (nsFunction*) &g_dialog.callbacks;
- callbacks[callbackIdx] = callback;
-}
-
-
-void __declspec(dllexport) OnClick(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- SetControlCallback(CTL_CALLBACK_IDX(onClick));
-}
-
-void __declspec(dllexport) OnChange(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- SetControlCallback(CTL_CALLBACK_IDX(onChange));
-}
-
-void __declspec(dllexport) OnNotify(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- SetControlCallback(CTL_CALLBACK_IDX(onNotify));
-}
-
-void __declspec(dllexport) OnBack(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- SetDialogCallback(DLG_CALLBACK_IDX(onBack));
-}
-
-void __declspec(dllexport) Show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- // tell NSIS to remove old inner dialog and pass handle of the new inner dialog
-
- SendMessage(hwndParent, WM_NOTIFY_CUSTOM_READY, (WPARAM) g_dialog.hwDialog, 0);
- ShowWindow(g_dialog.hwDialog, SW_SHOWNA);
-
- // message loop
-
- while (g_dialog.hwDialog)
- {
- MSG msg;
- GetMessage(&msg, NULL, 0, 0);
- if (!IsDialogMessage(g_dialog.hwDialog, &msg) && !IsDialogMessage(g_dialog.hwParent, &msg))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
-
- // reset wndproc
-
- SetWindowLong(hwndParent, DWL_DLGPROC, (long) g_dialog.parentOriginalWndproc);
-}
-
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
-{
- g_hInstance = (HINSTANCE) hInst;
- return TRUE;
-}
+#include <windows.h>
+
+#include "defs.h"
+#include "nsis.h"
+#include "input.h"
+#include "rtl.h"
+
+HINSTANCE g_hInstance;
+struct nsDialog g_dialog;
+extra_parameters* g_pluginParms;
+
+struct nsControl* NSDFUNC GetControl(HWND hwCtl)
+{
+ unsigned id = (unsigned) GetProp(hwCtl, NSCONTROL_ID_PROP);
+
+ if (id == 0 || id > g_dialog.controlCount)
+ {
+ return NULL;
+ }
+
+ return &g_dialog.controls[id - 1];
+}
+
+BOOL CALLBACK ParentProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ BOOL res;
+
+ if (message == WM_NOTIFY_OUTER_NEXT)
+ {
+ if (wParam == (WPARAM)-1)
+ {
+ if (g_pluginParms->ExecuteCodeSegment(g_dialog.callbacks.onBack - 1, 0))
+ {
+ return 0;
+ }
+ }
+ }
+
+ res = CallWindowProc(g_dialog.parentOriginalWndproc, hwnd, message, wParam, lParam);
+
+ if (message == WM_NOTIFY_OUTER_NEXT && !res)
+ {
+ DestroyWindow(g_dialog.hwDialog);
+ HeapFree(GetProcessHeap(), 0, g_dialog.controls);
+ g_dialog.hwDialog = NULL;
+ g_dialog.controls = NULL;
+ }
+
+ return res;
+}
+
+BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ // handle notifications
+ case WM_COMMAND:
+ {
+ HWND hwCtl = GetDlgItem(hwndDlg, LOWORD(wParam));
+ struct nsControl* ctl = GetControl(hwCtl);
+
+ if (ctl == NULL)
+ break;
+
+ if (HIWORD(wParam) == BN_CLICKED && ctl->type == NSCTL_BUTTON)
+ {
+ pushint((int) hwCtl);
+ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onClick - 1, 0);
+ }
+ else if (HIWORD(wParam) == EN_CHANGE && ctl->type == NSCTL_EDIT)
+ {
+ pushint((int) hwCtl);
+ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0);
+ }
+ else if (HIWORD(wParam) == LBN_SELCHANGE && ctl->type == NSCTL_LISTBOX)
+ {
+ pushint((int) hwCtl);
+ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0);
+ }
+ else if (HIWORD(wParam) == CBN_SELCHANGE && ctl->type == NSCTL_COMBOBOX)
+ {
+ pushint((int) hwCtl);
+ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onChange - 1, 0);
+ }
+
+ break;
+ }
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR nmhdr = (LPNMHDR) lParam;
+ struct nsControl* ctl = GetControl(nmhdr->hwndFrom);
+
+ if (ctl == NULL)
+ break;
+
+ if (!ctl->callbacks.onNotify)
+ break;
+
+ pushint((int) nmhdr);
+ pushint(nmhdr->code);
+ pushint((int) nmhdr->hwndFrom);
+ g_pluginParms->ExecuteCodeSegment(ctl->callbacks.onNotify - 1, 0);
+ }
+
+ // handle links
+ case WM_DRAWITEM:
+ {
+ DRAWITEMSTRUCT* lpdis = (DRAWITEMSTRUCT*)lParam;
+ RECT rc;
+ char text[1024];
+
+ struct nsControl* ctl = GetControl(lpdis->hwndItem);
+ if (ctl == NULL)
+ break;
+
+ // We need lpdis->rcItem later
+ rc = lpdis->rcItem;
+
+ // Get button's text
+ text[0] = '\0';
+ GetWindowText(lpdis->hwndItem, text, 1024);
+
+ // Calculate needed size of the control
+ DrawText(lpdis->hDC, text, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT);
+
+ // Make some more room so the focus rect won't cut letters off
+ rc.right = min(rc.right + 2, lpdis->rcItem.right);
+
+ // Move rect to right if in RTL mode
+ if (g_dialog.rtl)
+ {
+ rc.left += lpdis->rcItem.right - rc.right;
+ rc.right += lpdis->rcItem.right - rc.right;
+ }
+
+ if (lpdis->itemAction & ODA_DRAWENTIRE)
+ {
+ // Get TxtColor unless the user has set another using SetCtlColors
+ if (!GetWindowLong(lpdis->hwndItem, GWL_USERDATA))
+ SetTextColor(lpdis->hDC, RGB(0,0,255));
+
+ // Draw the text
+ DrawText(lpdis->hDC, text, -1, &rc, DT_CENTER | DT_VCENTER | DT_WORDBREAK | (g_dialog.rtl ? DT_RTLREADING : 0));
+ }
+
+ // Draw the focus rect if needed
+ if (((lpdis->itemState & ODS_FOCUS) && (lpdis->itemAction & ODA_DRAWENTIRE)) || (lpdis->itemAction & ODA_FOCUS))
+ {
+ // NB: when not in DRAWENTIRE mode, this will actually toggle the focus
+ // rectangle since it's drawn in a XOR way
+ DrawFocusRect(lpdis->hDC, &rc);
+ }
+
+ return TRUE;
+ }
+
+ // handle colors
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLOREDIT:
+ case WM_CTLCOLORDLG:
+ case WM_CTLCOLORBTN:
+ case WM_CTLCOLORLISTBOX:
+ // let the NSIS window handle colors, it knows best
+ return SendMessage(g_dialog.hwParent, uMsg, wParam, lParam);
+ }
+
+ return FALSE;
+}
+
+void __declspec(dllexport) Create(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ HWND hwPlacementRect;
+ RECT rcPlacement;
+
+ EXDLL_INIT();
+
+ g_dialog.hwParent = hwndParent;
+ g_pluginParms = extra;
+
+ hwPlacementRect = GetDlgItem(hwndParent, popint());
+ GetWindowRect(hwPlacementRect, &rcPlacement);
+ MapWindowPoints(NULL, hwndParent, (LPPOINT) &rcPlacement, 2);
+
+ g_dialog.hwDialog = CreateDialog(g_hInstance, MAKEINTRESOURCE(1), hwndParent, DialogProc);
+
+ if (g_dialog.hwDialog == NULL)
+ {
+ pushstring("error");
+ return;
+ }
+
+ SetWindowPos(
+ g_dialog.hwDialog,
+ 0,
+ rcPlacement.left,
+ rcPlacement.top,
+ rcPlacement.right - rcPlacement.left,
+ rcPlacement.bottom - rcPlacement.top,
+ SWP_NOZORDER | SWP_NOACTIVATE
+ );
+
+ g_dialog.parentOriginalWndproc = (WNDPROC) SetWindowLong(hwndParent, DWL_DLGPROC, (long) ParentProc);
+
+ g_dialog.rtl = FALSE;
+
+ g_dialog.controlCount = 0;
+ g_dialog.controls = (struct nsControl*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 0);
+
+ pushint((int) g_dialog.hwDialog);
+}
+
+void __declspec(dllexport) CreateControl(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ char *className;
+ char *text;
+
+ HWND hwItem;
+ int x, y, width, height;
+ DWORD style, exStyle;
+ size_t id;
+
+ // get info from stack
+
+ className = (char *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, g_stringsize * 2);
+ text = &className[g_stringsize];
+
+ if (!className)
+ {
+ pushstring("error");
+ return;
+ }
+
+ if (popstring(className, 0))
+ {
+ pushstring("error");
+ HeapFree(GetProcessHeap(), 0, className);
+ return;
+ }
+
+ style = (DWORD) popint();
+ exStyle = (DWORD) popint();
+
+ PopPlacement(&x, &y, &width, &height);
+
+ if (popstring(text, 0))
+ {
+ pushstring("error");
+ HeapFree(GetProcessHeap(), 0, className);
+ return;
+ }
+
+ // create item descriptor
+
+ id = g_dialog.controlCount;
+ g_dialog.controlCount++;
+ g_dialog.controls = (struct nsControl*) HeapReAlloc(
+ GetProcessHeap(),
+ HEAP_ZERO_MEMORY,
+ g_dialog.controls,
+ g_dialog.controlCount * sizeof(struct nsControl));
+
+ if (!lstrcmpi(className, "BUTTON"))
+ g_dialog.controls[id].type = NSCTL_BUTTON;
+ else if (!lstrcmpi(className, "EDIT"))
+ g_dialog.controls[id].type = NSCTL_EDIT;
+ else if (!lstrcmpi(className, "COMBOBOX"))
+ g_dialog.controls[id].type = NSCTL_COMBOBOX;
+ else if (!lstrcmpi(className, "LISTBOX"))
+ g_dialog.controls[id].type = NSCTL_LISTBOX;
+ else if (!lstrcmpi(className, "RichEdit"))
+ g_dialog.controls[id].type = NSCTL_RICHEDIT;
+ else if (!lstrcmpi(className, "RICHEDIT_CLASS"))
+ g_dialog.controls[id].type = NSCTL_RICHEDIT2;
+ else if (!lstrcmpi(className, "STATIC"))
+ g_dialog.controls[id].type = NSCTL_STATIC;
+ else
+ g_dialog.controls[id].type = NSCTL_UNKNOWN;
+
+ // apply rtl to style
+
+ ConvertStyleToRTL(g_dialog.controls[id].type, &style, &exStyle);
+
+ // create item's window
+
+ hwItem = CreateWindowEx(
+ exStyle,
+ className,
+ text,
+ style,
+ x, y, width, height,
+ g_dialog.hwDialog,
+ (HMENU) (1200 + id),
+ g_hInstance,
+ NULL);
+
+ g_dialog.controls[id].window = hwItem;
+
+ // remember id
+
+ SetProp(hwItem, NSCONTROL_ID_PROP, (HANDLE) (id + 1));
+
+ // set font
+
+ SendMessage(hwItem, WM_SETFONT, SendMessage(g_dialog.hwParent, WM_GETFONT, 0, 0), TRUE);
+
+ // push back result
+
+ pushint((int) hwItem);
+
+ // done
+
+ HeapFree(GetProcessHeap(), 0, className);
+}
+
+// for backward compatibility (2.29 had CreateItem)
+void __declspec(dllexport) CreateItem(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ CreateControl(hwndParent, string_size, variables, stacktop, extra);
+}
+
+void __declspec(dllexport) SetUserData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ HWND hwCtl;
+ struct nsControl* ctl;
+
+ // get info from stack
+
+ hwCtl = (HWND) popint();
+
+ if (!IsWindow(hwCtl))
+ {
+ popint(); // remove user data from stack
+ return;
+ }
+
+ // get descriptor
+
+ ctl = GetControl(hwCtl);
+
+ if (ctl == NULL)
+ return;
+
+ // set user data
+
+ popstring(ctl->userData, USERDATA_SIZE);
+}
+
+void __declspec(dllexport) GetUserData(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ HWND hwCtl;
+ struct nsControl* ctl;
+
+ // get info from stack
+
+ hwCtl = (HWND) popint();
+
+ if (!IsWindow(hwCtl))
+ {
+ pushstring("");
+ return;
+ }
+
+ // get descriptor
+
+ ctl = GetControl(hwCtl);
+
+ if (ctl == NULL)
+ {
+ pushstring("");
+ return;
+ }
+
+ // return user data
+
+ pushstring(ctl->userData);
+}
+
+void NSDFUNC SetControlCallback(size_t callbackIdx)
+{
+ HWND hwCtl;
+ nsFunction callback;
+ nsFunction* callbacks;
+ struct nsControl* ctl;
+
+ // get info from stack
+
+ hwCtl = (HWND) popint();
+ callback = (nsFunction) popint();
+
+ if (!IsWindow(hwCtl))
+ return;
+
+ // get descriptor
+
+ ctl = GetControl(hwCtl);
+
+ if (ctl == NULL)
+ return;
+
+ // set callback
+
+ callbacks = (nsFunction*) &ctl->callbacks;
+ callbacks[callbackIdx] = callback;
+}
+
+void NSDFUNC SetDialogCallback(size_t callbackIdx)
+{
+ nsFunction callback;
+ nsFunction* callbacks;
+
+ // get info from stack
+
+ callback = (nsFunction) popint();
+
+ // set callback
+
+ callbacks = (nsFunction*) &g_dialog.callbacks;
+ callbacks[callbackIdx] = callback;
+}
+
+
+void __declspec(dllexport) OnClick(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ SetControlCallback(CTL_CALLBACK_IDX(onClick));
+}
+
+void __declspec(dllexport) OnChange(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ SetControlCallback(CTL_CALLBACK_IDX(onChange));
+}
+
+void __declspec(dllexport) OnNotify(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ SetControlCallback(CTL_CALLBACK_IDX(onNotify));
+}
+
+void __declspec(dllexport) OnBack(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ SetDialogCallback(DLG_CALLBACK_IDX(onBack));
+}
+
+void __declspec(dllexport) Show(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ // tell NSIS to remove old inner dialog and pass handle of the new inner dialog
+
+ SendMessage(hwndParent, WM_NOTIFY_CUSTOM_READY, (WPARAM) g_dialog.hwDialog, 0);
+ ShowWindow(g_dialog.hwDialog, SW_SHOWNA);
+
+ // message loop
+
+ while (g_dialog.hwDialog)
+ {
+ MSG msg;
+ GetMessage(&msg, NULL, 0, 0);
+ if (!IsDialogMessage(g_dialog.hwDialog, &msg) && !IsDialogMessage(g_dialog.hwParent, &msg))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+
+ // reset wndproc
+
+ SetWindowLong(hwndParent, DWL_DLGPROC, (long) g_dialog.parentOriginalWndproc);
+}
+
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
+{
+ g_hInstance = (HINSTANCE) hInst;
+ return TRUE;
+}
diff --git a/Contrib/nsDialogs/nsDialogs.nsh b/Contrib/nsDialogs/nsDialogs.nsh
index fe4a6e6..bb663ac 100755
--- a/Contrib/nsDialogs/nsDialogs.nsh
+++ b/Contrib/nsDialogs/nsDialogs.nsh
@@ -1,488 +1,516 @@
-/*
-
-nsDialogs.nsh
-Header file for creating custom installer pages with nsDialogs
-
-*/
-
-!include LogicLib.nsh
-!include WinMessages.nsh
-
-!define WS_EX_DLGMODALFRAME 0x00000001
-!define WS_EX_NOPARENTNOTIFY 0x00000004
-!define WS_EX_TOPMOST 0x00000008
-!define WS_EX_ACCEPTFILES 0x00000010
-!define WS_EX_TRANSPARENT 0x00000020
-!define WS_EX_MDICHILD 0x00000040
-!define WS_EX_TOOLWINDOW 0x00000080
-!define WS_EX_WINDOWEDGE 0x00000100
-!define WS_EX_CLIENTEDGE 0x00000200
-!define WS_EX_CONTEXTHELP 0x00000400
-!define WS_EX_RIGHT 0x00001000
-!define WS_EX_LEFT 0x00000000
-!define WS_EX_RTLREADING 0x00002000
-!define WS_EX_LTRREADING 0x00000000
-!define WS_EX_LEFTSCROLLBAR 0x00004000
-!define WS_EX_RIGHTSCROLLBAR 0x00000000
-!define WS_EX_CONTROLPARENT 0x00010000
-!define WS_EX_STATICEDGE 0x00020000
-!define WS_EX_APPWINDOW 0x00040000
-
-!define WS_CHILD 0x40000000
-!define WS_VISIBLE 0x10000000
-!define WS_DISABLED 0x08000000
-!define WS_CLIPSIBLINGS 0x04000000
-!define WS_CLIPCHILDREN 0x02000000
-!define WS_MAXIMIZE 0x01000000
-!define WS_VSCROLL 0x00200000
-!define WS_HSCROLL 0x00100000
-!define WS_GROUP 0x00020000
-!define 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 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 LR_DEFAULTCOLOR 0x0000
-!define LR_MONOCHROME 0x0001
-!define LR_COLOR 0x0002
-!define LR_COPYRETURNORG 0x0004
-!define LR_COPYDELETEORG 0x0008
-!define LR_LOADFROMFILE 0x0010
-!define LR_LOADTRANSPARENT 0x0020
-!define LR_DEFAULTSIZE 0x0040
-!define LR_VGACOLOR 0x0080
-!define LR_LOADMAP3DCOLORS 0x1000
-!define LR_CREATEDIBSECTION 0x2000
-!define LR_COPYFROMRESOURCE 0x4000
-!define LR_SHARED 0x8000
-
-!define IMAGE_BITMAP 0
-!define IMAGE_ICON 1
-!define IMAGE_CURSOR 2
-!define IMAGE_ENHMETAFILE 3
-
-!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}
-!define __NSD_Label_EXSTYLE ${WS_EX_TRANSPARENT}
-
-!define __NSD_Icon_CLASS STATIC
-!define __NSD_Icon_STYLE ${DEFAULT_STYLES}|${SS_ICON}
-!define __NSD_Icon_EXSTYLE 0
-
-!define __NSD_Bitmap_CLASS STATIC
-!define __NSD_Bitmap_STYLE ${DEFAULT_STYLES}|${SS_BITMAP}
-!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 BUTTON
-!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_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_ComboBox_CLASS COMBOBOX
-!define __NSD_ComboBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}
-!define __NSD_ComboBox_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}
-
-!macro __NSD_DefineControl NAME
-
- !define NSD_Create${NAME} "nsDialogs::CreateControl /NOUNLOAD ${__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 FileRequest
-!insertmacro __NSD_DefineControl DirRequest
-!insertmacro __NSD_DefineControl ComboBox
-!insertmacro __NSD_DefineControl ListBox
-
-!macro __NSD_OnEvent EVENT HWND FUNCTION
-
- Push $0
- Push $1
-
- StrCpy $1 "${HWND}"
-
- GetFunctionAddress $0 "${FUNCTION}"
- nsDialogs::On${EVENT} /NOUNLOAD $1 $0
-
- Pop $1
- Pop $0
-
-!macroend
-
-!macro __NSD_DefineCallback EVENT
-
- !define NSD_On${EVENT} `!insertmacro __NSD_OnEvent ${EVENT}`
-
-!macroend
-
-!insertmacro __NSD_DefineCallback Click
-!insertmacro __NSD_DefineCallback Change
-!insertmacro __NSD_DefineCallback Notify
-!insertmacro __NSD_DefineCallback Back
-
-!macro __NSD_GetText CONTROL VAR
-
- System::Call user32::GetWindowText(i${CONTROL},t.s,i${NSIS_MAX_STRLEN})
- Pop ${VAR}
-
-!macroend
-
-!define NSD_GetText `!insertmacro __NSD_GetText`
-
-!define 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 /NOUNLOAD $R0
- Pop $R9
-
- ReadINIStr $R0 $0 Settings RTL
- nsDialogs::SetRTL /NOUNLOAD $R0
-
- ReadINIStr $R0 $0 Settings NumFields
-
- ${DEBUG} "NumFields = $R0"
-
- ${For} $R1 1 $R0
- ${DEBUG} "Creating field $R1"
- ReadINIStr $R2 $0 "Field $R1" Type
- ${DEBUG} " Type = $R2"
- ReadINIStr $R3 $0 "Field $R1" Left
- ${DEBUG} " Left = $R3"
- ReadINIStr $R4 $0 "Field $R1" Top
- ${DEBUG} " Top = $R4"
- ReadINIStr $R5 $0 "Field $R1" Right
- ${DEBUG} " Right = $R5"
- ReadINIStr $R6 $0 "Field $R1" Bottom
- ${DEBUG} " Bottom = $R6"
- IntOp $R5 $R5 - $R3
- ${DEBUG} " Width = $R5"
- IntOp $R6 $R6 - $R4
- ${DEBUG} " Height = $R6"
- ReadINIStr $R7 $0 "Field $R1" Text
- ${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_ControlCase Link
- !insertmacro __NSD_ControlCase Button
- !insertmacro __NSD_ControlCase GroupBox
- !insertmacro __NSD_ControlCase CheckBox
- !insertmacro __NSD_ControlCase RadioButton
- !insertmacro __NSD_ControlCase Text
- !insertmacro __NSD_ControlCaseEx FileRequest
- !insertmacro __NSD_ControlCaseEx DirRequest
- !insertmacro __NSD_ControlCase ComboBox
- !insertmacro __NSD_ControlCase ListBox
- ${EndSwitch}
-
- WriteINIStr $0 "Field $R1" HWND $R9
- ${Next}
-
- nsDialogs::Show
-
- FunctionEnd
-
- Function ${UNINSTALLER_FUNCPREFIX}UpdateINIState
-
- ${DEBUG} "Updating INI state"
-
- ReadINIStr $R0 $0 Settings NumFields
-
- ${DEBUG} "NumField = $R0"
-
- ${For} $R1 1 $R0
- ReadINIStr $R2 $0 "Field $R1" HWND
- ${DEBUG} " HWND = $R2"
- System::Call user32::GetWindowText(iR2,t.R2,i${NSIS_MAX_STRLEN})
- ${DEBUG} " Window text = $R2"
- 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 /NOUNLOAD $R8 $R1 # remember field id
-
- WriteINIStr $0 "Field $R1" HWND2 $R8
-
- ${NSD_OnClick} $R8 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 /NOUNLOAD $R8 $R1 # remember field id
-
- WriteINIStr $0 "Field $R1" HWND2 $R8
-
- ${NSD_OnClick} $R8 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 /NOUNLOAD $R0
- Pop $R1
-
- ReadINIStr $R2 $0 "Field $R1" HWND
- ReadINIStr $R4 $0 "Field $R1" Filter
-
- System::Call user32::GetWindowText(iR2,t.R3,i${NSIS_MAX_STRLEN})
-
- nsDialogs::SelectFileDialog /NOUNLOAD save $R3 $R4
- Pop $R3
-
- ${If} $R3 != ""
- SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3
- ${EndIf}
-
- FunctionEnd
-
- Function ${UNINSTALLER_FUNCPREFIX}OnDirBrowseButton
-
- Pop $R0
-
- nsDialogs::GetUserData /NOUNLOAD $R0
- Pop $R1
-
- ReadINIStr $R2 $0 "Field $R1" HWND
- ReadINIStr $R3 $0 "Field $R1" Text
-
- System::Call user32::GetWindowText(iR2,t.R4,i${NSIS_MAX_STRLEN})
-
- nsDialogs::SelectFolderDialog /NOUNLOAD $R3 $R4
- Pop $R3
-
- ${If} $R3 != error
- SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3
- ${EndIf}
-
- FunctionEnd
-
-!macroend
+/*
+
+nsDialogs.nsh
+Header file for creating custom installer pages with nsDialogs
+
+*/
+
+!include LogicLib.nsh
+!include WinMessages.nsh
+
+!define WS_EX_DLGMODALFRAME 0x00000001
+!define WS_EX_NOPARENTNOTIFY 0x00000004
+!define WS_EX_TOPMOST 0x00000008
+!define WS_EX_ACCEPTFILES 0x00000010
+!define WS_EX_TRANSPARENT 0x00000020
+!define WS_EX_MDICHILD 0x00000040
+!define WS_EX_TOOLWINDOW 0x00000080
+!define WS_EX_WINDOWEDGE 0x00000100
+!define WS_EX_CLIENTEDGE 0x00000200
+!define WS_EX_CONTEXTHELP 0x00000400
+!define WS_EX_RIGHT 0x00001000
+!define WS_EX_LEFT 0x00000000
+!define WS_EX_RTLREADING 0x00002000
+!define WS_EX_LTRREADING 0x00000000
+!define WS_EX_LEFTSCROLLBAR 0x00004000
+!define WS_EX_RIGHTSCROLLBAR 0x00000000
+!define WS_EX_CONTROLPARENT 0x00010000
+!define WS_EX_STATICEDGE 0x00020000
+!define WS_EX_APPWINDOW 0x00040000
+
+!define WS_CHILD 0x40000000
+!define WS_VISIBLE 0x10000000
+!define WS_DISABLED 0x08000000
+!define WS_CLIPSIBLINGS 0x04000000
+!define WS_CLIPCHILDREN 0x02000000
+!define WS_MAXIMIZE 0x01000000
+!define WS_VSCROLL 0x00200000
+!define WS_HSCROLL 0x00100000
+!define WS_GROUP 0x00020000
+!define 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 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 LR_DEFAULTCOLOR 0x0000
+!define LR_MONOCHROME 0x0001
+!define LR_COLOR 0x0002
+!define LR_COPYRETURNORG 0x0004
+!define LR_COPYDELETEORG 0x0008
+!define LR_LOADFROMFILE 0x0010
+!define LR_LOADTRANSPARENT 0x0020
+!define LR_DEFAULTSIZE 0x0040
+!define LR_VGACOLOR 0x0080
+!define LR_LOADMAP3DCOLORS 0x1000
+!define LR_CREATEDIBSECTION 0x2000
+!define LR_COPYFROMRESOURCE 0x4000
+!define LR_SHARED 0x8000
+
+!define IMAGE_BITMAP 0
+!define IMAGE_ICON 1
+!define IMAGE_CURSOR 2
+!define IMAGE_ENHMETAFILE 3
+
+!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}
+!define __NSD_Label_EXSTYLE ${WS_EX_TRANSPARENT}
+
+!define __NSD_Icon_CLASS STATIC
+!define __NSD_Icon_STYLE ${DEFAULT_STYLES}|${SS_ICON}
+!define __NSD_Icon_EXSTYLE 0
+
+!define __NSD_Bitmap_CLASS STATIC
+!define __NSD_Bitmap_STYLE ${DEFAULT_STYLES}|${SS_BITMAP}
+!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 BUTTON
+!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_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_ComboBox_CLASS COMBOBOX
+!define __NSD_ComboBox_STYLE ${DEFAULT_STYLES}|${WS_TABSTOP}|${WS_VSCROLL}|${WS_CLIPCHILDREN}|${CBS_AUTOHSCROLL}|${CBS_HASSTRINGS}
+!define __NSD_ComboBox_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}
+
+!macro __NSD_DefineControl NAME
+
+ !define NSD_Create${NAME} "nsDialogs::CreateControl /NOUNLOAD ${__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 FileRequest
+!insertmacro __NSD_DefineControl DirRequest
+!insertmacro __NSD_DefineControl ComboBox
+!insertmacro __NSD_DefineControl ListBox
+
+!macro __NSD_OnEvent EVENT HWND FUNCTION
+
+ Push $0
+ Push $1
+
+ StrCpy $1 "${HWND}"
+
+ GetFunctionAddress $0 "${FUNCTION}"
+ nsDialogs::On${EVENT} /NOUNLOAD $1 $0
+
+ Pop $1
+ Pop $0
+
+!macroend
+
+!macro __NSD_DefineCallback EVENT
+
+ !define NSD_On${EVENT} `!insertmacro __NSD_OnEvent ${EVENT}`
+
+!macroend
+
+!insertmacro __NSD_DefineCallback Click
+!insertmacro __NSD_DefineCallback Change
+!insertmacro __NSD_DefineCallback Notify
+!insertmacro __NSD_DefineCallback Back
+
+!macro __NSD_GetText CONTROL VAR
+
+ System::Call user32::GetWindowText(i${CONTROL},t.s,i${NSIS_MAX_STRLEN})
+ Pop ${VAR}
+
+!macroend
+
+!define NSD_GetText `!insertmacro __NSD_GetText`
+
+!define 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 /NOUNLOAD $R0
+ Pop $R9
+
+ ReadINIStr $R0 $0 Settings RTL
+ nsDialogs::SetRTL /NOUNLOAD $R0
+
+ ReadINIStr $R0 $0 Settings NumFields
+
+ ${DEBUG} "NumFields = $R0"
+
+ ${For} $R1 1 $R0
+ ${DEBUG} "Creating field $R1"
+ ReadINIStr $R2 $0 "Field $R1" Type
+ ${DEBUG} " Type = $R2"
+ ReadINIStr $R3 $0 "Field $R1" Left
+ ${DEBUG} " Left = $R3"
+ ReadINIStr $R4 $0 "Field $R1" Top
+ ${DEBUG} " Top = $R4"
+ ReadINIStr $R5 $0 "Field $R1" Right
+ ${DEBUG} " Right = $R5"
+ ReadINIStr $R6 $0 "Field $R1" Bottom
+ ${DEBUG} " Bottom = $R6"
+ IntOp $R5 $R5 - $R3
+ ${DEBUG} " Width = $R5"
+ IntOp $R6 $R6 - $R4
+ ${DEBUG} " Height = $R6"
+ ReadINIStr $R7 $0 "Field $R1" Text
+ ${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_ControlCaseEx FileRequest
+ !insertmacro __NSD_ControlCaseEx DirRequest
+ !insertmacro __NSD_ControlCase ComboBox
+ !insertmacro __NSD_ControlCase ListBox
+ ${EndSwitch}
+
+ WriteINIStr $0 "Field $R1" HWND $R9
+ ${Next}
+
+ nsDialogs::Show
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}UpdateINIState
+
+ ${DEBUG} "Updating INI state"
+
+ ReadINIStr $R0 $0 Settings NumFields
+
+ ${DEBUG} "NumField = $R0"
+
+ ${For} $R1 1 $R0
+ ReadINIStr $R2 $0 "Field $R1" HWND
+ ${DEBUG} " HWND = $R2"
+ ${NSD_GetText} $R2 $R2
+ ${DEBUG} " Window text = $R2"
+ 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 /NOUNLOAD $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 /NOUNLOAD $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 /NOUNLOAD $R0
+ Pop $R1
+
+ ReadINIStr $R2 $0 "Field $R1" HWND
+ ReadINIStr $R4 $0 "Field $R1" Filter
+
+ ${NSD_GetText} $R2 $R3
+
+ nsDialogs::SelectFileDialog /NOUNLOAD save $R3 $R4
+ Pop $R3
+
+ ${If} $R3 != ""
+ SendMessage $R2 ${WM_SETTEXT} 0 STR:$R3
+ ${EndIf}
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}OnDirBrowseButton
+
+ Pop $R0
+
+ nsDialogs::GetUserData /NOUNLOAD $R0
+ Pop $R1
+
+ ReadINIStr $R2 $0 "Field $R1" HWND
+ ReadINIStr $R3 $0 "Field $R1" Text
+
+ ${NSD_GetText} $R2 $R4
+
+ nsDialogs::SelectFolderDialog /NOUNLOAD $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 /NOUNLOAD $R9 $R1 # remember field id
+
+ ${NSD_OnClick} $R9 ${UNINSTALLER_FUNCPREFIX}OnLink
+
+ FunctionEnd
+
+ Function ${UNINSTALLER_FUNCPREFIX}OnLink
+
+ Pop $R0
+
+ nsDialogs::GetUserData /NOUNLOAD $R0
+ Pop $R1
+
+ ReadINIStr $R1 $0 "Field $R1" STATE
+
+ ExecShell "" $R1
+
+ FunctionEnd
+
+!macroend
diff --git a/Contrib/nsDialogs/nsis.c b/Contrib/nsDialogs/nsis.c
index d7a8823..fdda41a 100755
--- a/Contrib/nsDialogs/nsis.c
+++ b/Contrib/nsDialogs/nsis.c
@@ -1,95 +1,95 @@
-#include <windows.h>
-
-#include "nsis.h"
-
-int g_stringsize;
-stack_t **g_stacktop;
-char *g_variables;
-
-int NSDFUNC myatoi(const char *s)
-{
- int v=0;
- if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
- {
- s++;
- for (;;)
- {
- int c=*(++s);
- if (c >= '0' && c <= '9') c-='0';
- else if (c >= 'a' && c <= 'f') c-='a'-10;
- else if (c >= 'A' && c <= 'F') c-='A'-10;
- else break;
- v<<=4;
- v+=c;
- }
- }
- else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
- {
- for (;;)
- {
- int c=*(++s);
- if (c >= '0' && c <= '7') c-='0';
- else break;
- v<<=3;
- v+=c;
- }
- }
- else
- {
- int sign=0;
- if (*s == '-') sign++; else s--;
- for (;;)
- {
- int c=*(++s) - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- if (sign) v = -v;
- }
-
- // Support for simple ORed expressions
- if (*s == '|')
- {
- v |= myatoi(s+1);
- }
-
- return v;
-}
-
-int NSDFUNC popstring(char *str, int size)
-{
- stack_t *th;
- if (!g_stacktop || !*g_stacktop) return 1;
- th=(*g_stacktop);
- lstrcpyn(str,th->text,size?size:g_stringsize);
- *g_stacktop = th->next;
- GlobalFree((HGLOBAL)th);
- return 0;
-}
-
-void NSDFUNC pushstring(const char *str)
-{
- stack_t *th;
- if (!g_stacktop) return;
- th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
- lstrcpyn(th->text,str,g_stringsize);
- th->next=*g_stacktop;
- *g_stacktop=th;
-}
-
-int NSDFUNC popint()
-{
- char buf[1024];
- if (popstring(buf,sizeof(buf)))
- return 0;
-
- return myatoi(buf);
-}
-
-void NSDFUNC pushint(int value)
-{
- char buffer[1024];
- wsprintf(buffer, "%d", value);
- pushstring(buffer);
-}
+#include <windows.h>
+
+#include "nsis.h"
+
+int g_stringsize;
+stack_t **g_stacktop;
+char *g_variables;
+
+int NSDFUNC myatoi(const char *s)
+{
+ int v=0;
+ if (*s == '0' && (s[1] == 'x' || s[1] == 'X'))
+ {
+ s++;
+ for (;;)
+ {
+ int c=*(++s);
+ if (c >= '0' && c <= '9') c-='0';
+ else if (c >= 'a' && c <= 'f') c-='a'-10;
+ else if (c >= 'A' && c <= 'F') c-='A'-10;
+ else break;
+ v<<=4;
+ v+=c;
+ }
+ }
+ else if (*s == '0' && s[1] <= '7' && s[1] >= '0')
+ {
+ for (;;)
+ {
+ int c=*(++s);
+ if (c >= '0' && c <= '7') c-='0';
+ else break;
+ v<<=3;
+ v+=c;
+ }
+ }
+ else
+ {
+ int sign=0;
+ if (*s == '-') sign++; else s--;
+ for (;;)
+ {
+ int c=*(++s) - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ if (sign) v = -v;
+ }
+
+ // Support for simple ORed expressions
+ if (*s == '|')
+ {
+ v |= myatoi(s+1);
+ }
+
+ return v;
+}
+
+int NSDFUNC popstring(char *str, int size)
+{
+ stack_t *th;
+ if (!g_stacktop || !*g_stacktop) return 1;
+ th=(*g_stacktop);
+ lstrcpyn(str,th->text,size?size:g_stringsize);
+ *g_stacktop = th->next;
+ GlobalFree((HGLOBAL)th);
+ return 0;
+}
+
+void NSDFUNC pushstring(const char *str)
+{
+ stack_t *th;
+ if (!g_stacktop) return;
+ th=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)+g_stringsize);
+ lstrcpyn(th->text,str,g_stringsize);
+ th->next=*g_stacktop;
+ *g_stacktop=th;
+}
+
+int NSDFUNC popint()
+{
+ char buf[1024];
+ if (popstring(buf,sizeof(buf)))
+ return 0;
+
+ return myatoi(buf);
+}
+
+void NSDFUNC pushint(int value)
+{
+ char buffer[1024];
+ wsprintf(buffer, "%d", value);
+ pushstring(buffer);
+}
diff --git a/Contrib/nsDialogs/nsis.h b/Contrib/nsDialogs/nsis.h
index 574000c..83ca75d 100755
--- a/Contrib/nsDialogs/nsis.h
+++ b/Contrib/nsDialogs/nsis.h
@@ -1,55 +1,55 @@
-#ifndef __NS_DIALOGS__NSIS_H__
-#define __NS_DIALOGS__NSIS_H__
-
-#include <windows.h>
-#include "defs.h"
-
-#define EXDLL_INIT() { \
- g_stringsize=string_size; \
- g_stacktop=stacktop; \
- g_variables=variables; }
-
-// For page showing plug-ins
-#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
-#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
-#define NOTIFY_BYE_BYE 'x'
-
-typedef struct _stack_t {
- struct _stack_t *next;
- char text[1]; // this should be the length of string_size
-} stack_t;
-
-extern int g_stringsize;
-extern stack_t **g_stacktop;
-extern char *g_variables;
-
-int NSDFUNC myatoi(const char *s);
-int NSDFUNC popstring(char *str, int size);
-void NSDFUNC pushstring(const char *str);
-int NSDFUNC popint();
-void NSDFUNC pushint(int value);
-
-typedef struct {
- int autoclose;
- int all_user_var;
- int exec_error;
- int abort;
- int exec_reboot;
- int reboot_called;
- int XXX_cur_insttype; // deprecated
- int XXX_insttype_changed; // deprecated
- int silent;
- int instdir_error;
- int rtl;
- int errlvl;
- int alter_reg_view;
-} exec_flags_type;
-
-typedef struct {
- exec_flags_type *exec_flags;
- int (__stdcall *ExecuteCodeSegment)(int, HWND);
- void (__stdcall *validate_filename)(char *);
-} extra_parameters;
-
-
-#endif//__NS_DIALOGS__NSIS_H__
+#ifndef __NS_DIALOGS__NSIS_H__
+#define __NS_DIALOGS__NSIS_H__
+
+#include <windows.h>
+#include "defs.h"
+
+#define EXDLL_INIT() { \
+ g_stringsize=string_size; \
+ g_stacktop=stacktop; \
+ g_variables=variables; }
+
+// For page showing plug-ins
+#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
+#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
+#define NOTIFY_BYE_BYE 'x'
+
+typedef struct _stack_t {
+ struct _stack_t *next;
+ char text[1]; // this should be the length of string_size
+} stack_t;
+
+extern int g_stringsize;
+extern stack_t **g_stacktop;
+extern char *g_variables;
+
+int NSDFUNC myatoi(const char *s);
+int NSDFUNC popstring(char *str, int size);
+void NSDFUNC pushstring(const char *str);
+int NSDFUNC popint();
+void NSDFUNC pushint(int value);
+
+typedef struct {
+ int autoclose;
+ int all_user_var;
+ int exec_error;
+ int abort;
+ int exec_reboot;
+ int reboot_called;
+ int XXX_cur_insttype; // deprecated
+ int XXX_insttype_changed; // deprecated
+ int silent;
+ int instdir_error;
+ int rtl;
+ int errlvl;
+ int alter_reg_view;
+} exec_flags_type;
+
+typedef struct {
+ exec_flags_type *exec_flags;
+ int (__stdcall *ExecuteCodeSegment)(int, HWND);
+ void (__stdcall *validate_filename)(char *);
+} extra_parameters;
+
+
+#endif//__NS_DIALOGS__NSIS_H__
diff --git a/Contrib/nsDialogs/rtl.c b/Contrib/nsDialogs/rtl.c
index e68ba32..8850c55 100755
--- a/Contrib/nsDialogs/rtl.c
+++ b/Contrib/nsDialogs/rtl.c
@@ -1,95 +1,95 @@
-#include <windows.h>
-#include <commctrl.h>
-
-#include "defs.h"
-#include "nsis.h"
-
-#ifndef WS_EX_RIGHT
-# define WS_EX_RIGHT 0x1000
-#endif
-
-#ifndef WS_EX_RTLREADING
-# define WS_EX_RTLREADING 0x2000
-#endif
-
-#ifndef WS_EX_LEFTSCROLLBAR
-# define WS_EX_LEFTSCROLLBAR 0x4000
-#endif
-
-#ifndef TVS_RTLREADING
-# define TVS_RTLREADING 64
-#endif
-
-extern struct nsDialog g_dialog;
-
-void __declspec(dllexport) SetRTL(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
-{
- g_dialog.rtl = (BOOL) popint();
-}
-
-void NSDFUNC ConvertStyleToRTL(enum nsControlType type, LPDWORD style, LPDWORD exStyle)
-{
- if (!g_dialog.rtl)
- return;
-
- switch (type)
- {
- case NSCTL_BUTTON:
- *style ^= BS_LEFTTEXT | BS_RIGHT | BS_LEFT;
-
- if ((*style & (BS_LEFT|BS_RIGHT)) == (BS_LEFT|BS_RIGHT))
- {
- *style ^= BS_LEFT | BS_RIGHT;
- if (*style & (BS_RADIOBUTTON | BS_CHECKBOX | BS_USERBUTTON))
- {
- *style |= BS_RIGHT;
- }
- }
- break;
-
- case NSCTL_EDIT:
- if ((*style & ES_CENTER) == 0)
- {
- *style ^= ES_RIGHT;
- }
- break;
-
- case NSCTL_STATIC:
- if ((*style & SS_TYPEMASK) == SS_LEFT || (*style & SS_TYPEMASK) == SS_LEFTNOWORDWRAP)
- {
- *style &= ~SS_TYPEMASK;
- *style |= SS_RIGHT;
- }
- else if ((*style & SS_TYPEMASK) == SS_ICON) {
- *style |= SS_CENTERIMAGE;
- }
- break;
-
- case NSCTL_RICHEDIT:
- case NSCTL_RICHEDIT2:
- if ((*style & ES_CENTER) == 0)
- {
- *style ^= ES_RIGHT;
- }
- break;
-
- case NSCTL_TREE:
- *style |= TVS_RTLREADING;
- *exStyle |= WS_EX_RIGHT;
- break;
-
- default:
- *exStyle |= WS_EX_RIGHT;
- break;
- }
-
- *exStyle |= WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR;
-}
-
-void NSDFUNC ConvertPosToRTL(int *x, int width, int dialogWidth)
-{
- if (!g_dialog.rtl)
- return;
-
- *x = dialogWidth - width - *x;
-}
+#include <windows.h>
+#include <commctrl.h>
+
+#include "defs.h"
+#include "nsis.h"
+
+#ifndef WS_EX_RIGHT
+# define WS_EX_RIGHT 0x1000
+#endif
+
+#ifndef WS_EX_RTLREADING
+# define WS_EX_RTLREADING 0x2000
+#endif
+
+#ifndef WS_EX_LEFTSCROLLBAR
+# define WS_EX_LEFTSCROLLBAR 0x4000
+#endif
+
+#ifndef TVS_RTLREADING
+# define TVS_RTLREADING 64
+#endif
+
+extern struct nsDialog g_dialog;
+
+void __declspec(dllexport) SetRTL(HWND hwndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
+{
+ g_dialog.rtl = (BOOL) popint();
+}
+
+void NSDFUNC ConvertStyleToRTL(enum nsControlType type, LPDWORD style, LPDWORD exStyle)
+{
+ if (!g_dialog.rtl)
+ return;
+
+ switch (type)
+ {
+ case NSCTL_BUTTON:
+ *style ^= BS_LEFTTEXT | BS_RIGHT | BS_LEFT;
+
+ if ((*style & (BS_LEFT|BS_RIGHT)) == (BS_LEFT|BS_RIGHT))
+ {
+ *style ^= BS_LEFT | BS_RIGHT;
+ if (*style & (BS_RADIOBUTTON | BS_CHECKBOX | BS_USERBUTTON))
+ {
+ *style |= BS_RIGHT;
+ }
+ }
+ break;
+
+ case NSCTL_EDIT:
+ if ((*style & ES_CENTER) == 0)
+ {
+ *style ^= ES_RIGHT;
+ }
+ break;
+
+ case NSCTL_STATIC:
+ if ((*style & SS_TYPEMASK) == SS_LEFT || (*style & SS_TYPEMASK) == SS_LEFTNOWORDWRAP)
+ {
+ *style &= ~SS_TYPEMASK;
+ *style |= SS_RIGHT;
+ }
+ else if ((*style & SS_TYPEMASK) == SS_ICON) {
+ *style |= SS_CENTERIMAGE;
+ }
+ break;
+
+ case NSCTL_RICHEDIT:
+ case NSCTL_RICHEDIT2:
+ if ((*style & ES_CENTER) == 0)
+ {
+ *style ^= ES_RIGHT;
+ }
+ break;
+
+ case NSCTL_TREE:
+ *style |= TVS_RTLREADING;
+ *exStyle |= WS_EX_RIGHT;
+ break;
+
+ default:
+ *exStyle |= WS_EX_RIGHT;
+ break;
+ }
+
+ *exStyle |= WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR;
+}
+
+void NSDFUNC ConvertPosToRTL(int *x, int width, int dialogWidth)
+{
+ if (!g_dialog.rtl)
+ return;
+
+ *x = dialogWidth - width - *x;
+}
diff --git a/Contrib/nsDialogs/rtl.h b/Contrib/nsDialogs/rtl.h
index 7c36e64..b6e920c 100755
--- a/Contrib/nsDialogs/rtl.h
+++ b/Contrib/nsDialogs/rtl.h
@@ -1,9 +1,9 @@
-#ifndef __NS_DIALOGS__RTL_H__
-#define __NS_DIALOGS__RTL_H__
-
-#include "defs.h"
-
-void NSDFUNC ConvertStyleToRTL(enum nsControlType type, LPDWORD style, LPDWORD exStyle);
-void NSDFUNC ConvertPosToRTL(int *x, int width, int dialogWidth);
-
-#endif//__NS_DIALOGS__RTL_H__
+#ifndef __NS_DIALOGS__RTL_H__
+#define __NS_DIALOGS__RTL_H__
+
+#include "defs.h"
+
+void NSDFUNC ConvertStyleToRTL(enum nsControlType type, LPDWORD style, LPDWORD exStyle);
+void NSDFUNC ConvertPosToRTL(int *x, int width, int dialogWidth);
+
+#endif//__NS_DIALOGS__RTL_H__
diff --git a/Contrib/nsDialogs/welcome.nsi b/Contrib/nsDialogs/welcome.nsi
index c2d741f..3559056 100755
--- a/Contrib/nsDialogs/welcome.nsi
+++ b/Contrib/nsDialogs/welcome.nsi
@@ -1,320 +1,320 @@
-!include MUI.nsh
-!include LogicLib.nsh
-!include WinMessages.nsh
-!include FileFunc.nsh
-
-!insertmacro GetRoot
-
-Name "nsDialogs Welcome"
-OutFile "nsDialogs Welcome.exe"
-
-Page custom nsDialogsWelcome
-Page custom nsDialogsDirectory
-!insertmacro MUI_PAGE_INSTFILES
-
-!insertmacro MUI_LANGUAGE English
-
-!define WS_EX_CLIENTEDGE 0x00000200
-
-!define WS_CHILD 0x40000000
-!define WS_VISIBLE 0x10000000
-!define WS_DISABLED 0x08000000
-!define WS_CLIPSIBLINGS 0x04000000
-!define WS_MAXIMIZE 0x01000000
-!define WS_VSCROLL 0x00200000
-!define WS_HSCROLL 0x00100000
-!define WS_GROUP 0x00020000
-!define 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 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 LR_DEFAULTCOLOR 0x0000
-!define LR_MONOCHROME 0x0001
-!define LR_COLOR 0x0002
-!define LR_COPYRETURNORG 0x0004
-!define LR_COPYDELETEORG 0x0008
-!define LR_LOADFROMFILE 0x0010
-!define LR_LOADTRANSPARENT 0x0020
-!define LR_DEFAULTSIZE 0x0040
-!define LR_VGACOLOR 0x0080
-!define LR_LOADMAP3DCOLORS 0x1000
-!define LR_CREATEDIBSECTION 0x2000
-!define LR_COPYFROMRESOURCE 0x4000
-!define LR_SHARED 0x8000
-
-!define IMAGE_BITMAP 0
-!define IMAGE_ICON 1
-!define IMAGE_CURSOR 2
-!define IMAGE_ENHMETAFILE 3
-
-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 /NOUNLOAD 1044
- Pop $DIALOG
-
- nsDialogs::CreateControl /NOUNLOAD 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(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
- Pop $IMAGE
-
- SendMessage $IMAGECTL ${STM_SETIMAGE} ${IMAGE_BITMAP} $IMAGE
-
- nsDialogs::CreateControl /NOUNLOAD 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 /NOUNLOAD 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 "" 0xffffff
- SetCtlColors $HEADLINE "" 0xffffff
- SetCtlColors $TEXT "" 0xffffff
-
- Call HideControls
-
- nsDialogs::Show
-
- Call ShowControls
-
- System::Call gdi32::DeleteObject(i$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 /NOUNLOAD 1018
- Pop $DIALOG
-
- nsDialogs::CreateControl /NOUNLOAD 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 /NOUNLOAD 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 /NOUNLOAD 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 /NOUNLOAD $DIRECTORY $0
-
- System::Call shlwapi::SHAutoComplete(i$DIRECTORY,i${SHACF_FILESYSTEM})
-
- nsDialogs::CreateControl /NOUNLOAD 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
-
- GetDlgItem $0 $HWNDPARENT 1
-
- System::Call user32::GetWindowText(i$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
+!include MUI.nsh
+!include LogicLib.nsh
+!include WinMessages.nsh
+!include FileFunc.nsh
+
+!insertmacro GetRoot
+
+Name "nsDialogs Welcome"
+OutFile "nsDialogs Welcome.exe"
+
+Page custom nsDialogsWelcome
+Page custom nsDialogsDirectory
+!insertmacro MUI_PAGE_INSTFILES
+
+!insertmacro MUI_LANGUAGE English
+
+!define WS_EX_CLIENTEDGE 0x00000200
+
+!define WS_CHILD 0x40000000
+!define WS_VISIBLE 0x10000000
+!define WS_DISABLED 0x08000000
+!define WS_CLIPSIBLINGS 0x04000000
+!define WS_MAXIMIZE 0x01000000
+!define WS_VSCROLL 0x00200000
+!define WS_HSCROLL 0x00100000
+!define WS_GROUP 0x00020000
+!define 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 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 LR_DEFAULTCOLOR 0x0000
+!define LR_MONOCHROME 0x0001
+!define LR_COLOR 0x0002
+!define LR_COPYRETURNORG 0x0004
+!define LR_COPYDELETEORG 0x0008
+!define LR_LOADFROMFILE 0x0010
+!define LR_LOADTRANSPARENT 0x0020
+!define LR_DEFAULTSIZE 0x0040
+!define LR_VGACOLOR 0x0080
+!define LR_LOADMAP3DCOLORS 0x1000
+!define LR_CREATEDIBSECTION 0x2000
+!define LR_COPYFROMRESOURCE 0x4000
+!define LR_SHARED 0x8000
+
+!define IMAGE_BITMAP 0
+!define IMAGE_ICON 1
+!define IMAGE_CURSOR 2
+!define IMAGE_ENHMETAFILE 3
+
+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 /NOUNLOAD 1044
+ Pop $DIALOG
+
+ nsDialogs::CreateControl /NOUNLOAD 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(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
+ Pop $IMAGE
+
+ SendMessage $IMAGECTL ${STM_SETIMAGE} ${IMAGE_BITMAP} $IMAGE
+
+ nsDialogs::CreateControl /NOUNLOAD 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 /NOUNLOAD 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 "" 0xffffff
+ SetCtlColors $HEADLINE "" 0xffffff
+ SetCtlColors $TEXT "" 0xffffff
+
+ Call HideControls
+
+ nsDialogs::Show
+
+ Call ShowControls
+
+ System::Call gdi32::DeleteObject(i$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 /NOUNLOAD 1018
+ Pop $DIALOG
+
+ nsDialogs::CreateControl /NOUNLOAD 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 /NOUNLOAD 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 /NOUNLOAD 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 /NOUNLOAD $DIRECTORY $0
+
+ System::Call shlwapi::SHAutoComplete(i$DIRECTORY,i${SHACF_FILESYSTEM})
+
+ nsDialogs::CreateControl /NOUNLOAD 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
+
+ GetDlgItem $0 $HWNDPARENT 1
+
+ System::Call user32::GetWindowText(i$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/Contrib/nsExec/SConscript b/Contrib/nsExec/SConscript
index ffc7315..044094b 100755
--- a/Contrib/nsExec/SConscript
+++ b/Contrib/nsExec/SConscript
@@ -1,24 +1,24 @@
-target = 'nsExec'
-
-files = Split("""
- nsexec.c
-""")
-
-libs = Split("""
- kernel32
- user32
- advapi32
-""")
-
-examples = Split("""
- test.nsi
-""")
-
-docs = Split("""
- nsExec.txt
-""")
-
-Import('BuildPlugin')
-
-BuildPlugin(target, files, libs, examples, docs)
-
+target = 'nsExec'
+
+files = Split("""
+ nsexec.c
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ advapi32
+""")
+
+examples = Split("""
+ test.nsi
+""")
+
+docs = Split("""
+ nsExec.txt
+""")
+
+Import('BuildPlugin')
+
+BuildPlugin(target, files, libs, examples, docs)
+
diff --git a/Contrib/nsExec/nsExec.txt b/Contrib/nsExec/nsExec.txt
index c98113f..3fcb5cf 100755
--- a/Contrib/nsExec/nsExec.txt
+++ b/Contrib/nsExec/nsExec.txt
@@ -1,49 +1,49 @@
-nsExec
-------
-nsExec will execute command-line based programs and capture the output
-without opening a dos box.
-
-
-Usage
------
-nsExec::Exec [/OEM] [/TIMEOUT=x] path
-
--or-
-
-nsExec::ExecToLog [/OEM] [/TIMEOUT=x] path
-
--or-
-
-nsExec::ExecToStack [/OEM] [/TIMEOUT=x] path
-
-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
+nsExec
+------
+nsExec will execute command-line based programs and capture the output
+without opening a dos box.
+
+
+Usage
+-----
+nsExec::Exec [/OEM] [/TIMEOUT=x] path
+
+-or-
+
+nsExec::ExecToLog [/OEM] [/TIMEOUT=x] path
+
+-or-
+
+nsExec::ExecToStack [/OEM] [/TIMEOUT=x] path
+
+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/Contrib/nsExec/nsexec.c b/Contrib/nsExec/nsexec.c
index 84848cf..e53c45e 100755
--- a/Contrib/nsExec/nsexec.c
+++ b/Contrib/nsExec/nsexec.c
@@ -1,453 +1,453 @@
-/*
-Copyright (c) 2002 Robert Rainwater <rrainwater@yahoo.com>
-
-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.
-
-*/
-#include <windows.h>
-#include <commctrl.h>
-#include <winnt.h>
-#include "../ExDLL/exdll.h"
-
-#ifndef true
-#define true TRUE
-#endif
-#ifndef false
-#define false FALSE
-#endif
-#define LOOPTIMEOUT 100
-
-HWND g_hwndParent;
-HWND g_hwndList;
-
-void ExecScript(BOOL log);
-void LogMessage(const char *pStr, BOOL bOEM);
-char *my_strstr(char *a, char *b);
-unsigned int my_atoi(char *s);
-
-void __declspec(dllexport) Exec(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) {
- g_hwndParent=hwndParent;
- EXDLL_INIT();
- {
- ExecScript(0);
- }
-}
-
-void __declspec(dllexport) ExecToLog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) {
- g_hwndParent=hwndParent;
- EXDLL_INIT();
- {
- ExecScript(1);
- }
-}
-
-void __declspec(dllexport) ExecToStack(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) {
- g_hwndParent=hwndParent;
- EXDLL_INIT();
- {
- ExecScript(2);
- }
-}
-
-HINSTANCE g_hInst;
-BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
- g_hInst = hInst;
- return TRUE;
-}
-
-#define TAB_REPLACE " "
-#define TAB_REPLACE_SIZE (sizeof(TAB_REPLACE)-1)
-
-// Turn a pair of chars into a word
-// Turn four chars into a dword
-#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
-#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
-#else
-#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
-#endif
-
-void ExecScript(int log) {
- char szRet[128] = "";
- char *pExec;
- int nComSpecSize;
- char meDLLPath[MAX_PATH];
- char *p;
- char *executor;
- char *g_exec;
- unsigned int g_to;
- BOOL bOEM;
-
- nComSpecSize = GetModuleFileName(g_hInst, meDLLPath, MAX_PATH) + 2; // 2 chars for quotes
- p = meDLLPath + nComSpecSize - 2; // point p at null char of meDLLPath
- g_exec = (char *)GlobalAlloc(GPTR, sizeof(char)*g_stringsize+nComSpecSize+2); // 1 for space, 1 for null
- *g_exec = '"';
- executor = g_exec + 1;
-
- do
- {
- if (*p == '\\')
- break;
- p = CharPrev(meDLLPath, p);
- }
- while (p > meDLLPath);
- if (p == meDLLPath)
- {
- // bad path
- pushstring("error");
- GlobalFree(g_exec);
- return;
- }
-
- *p = 0;
- GetTempFileName(meDLLPath, "ns", 0, executor);
- *p = '\\';
- if (CopyFile(meDLLPath, executor, FALSE))
- {
- HANDLE hFile, hMapping;
- LPBYTE pMapView;
- PIMAGE_NT_HEADERS pNTHeaders;
- hFile = CreateFile(executor, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING,0, 0);
- hMapping = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, 0, NULL);
- pMapView = MapViewOfFile(hMapping, FILE_MAP_WRITE, 0, 0, 0);
- if (pMapView)
- {
- pNTHeaders = (PIMAGE_NT_HEADERS)(pMapView + ((PIMAGE_DOS_HEADER)pMapView)->e_lfanew);
- pNTHeaders->FileHeader.Characteristics = IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_LOCAL_SYMS_STRIPPED |
- IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE;
- pNTHeaders->OptionalHeader.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI;
- pNTHeaders->OptionalHeader.AddressOfEntryPoint = (DWORD)WinMain - (DWORD)g_hInst;
- UnmapViewOfFile(pMapView);
- }
- CloseHandle(hMapping);
- CloseHandle(hFile);
- }
-
- lstrcat(g_exec, "\"");
-
- g_to = 0; // default is no timeout
- bOEM = FALSE; // default is no OEM->ANSI conversion
-
- g_hwndList = NULL;
- if (g_hwndParent)
- g_hwndList = FindWindowEx(FindWindowEx(g_hwndParent,NULL,"#32770",NULL),NULL,"SysListView32",NULL);
-
- // add space
- pExec = g_exec + lstrlen(g_exec);
- *pExec = ' ';
- pExec++;
-
-params:
- popstring(pExec);
- if (my_strstr(pExec, "/TIMEOUT=") == pExec) {
- char *szTimeout = pExec + 9;
- g_to = my_atoi(szTimeout);
- *pExec = 0;
- goto params;
- }
- if (!lstrcmpi(pExec, "/OEM")) {
- bOEM = TRUE;
- *pExec = 0;
- goto params;
- }
-
- if (!pExec[0])
- {
- pushstring("error");
- *(pExec-2) = '\0'; // skip space and quote
- DeleteFile(executor);
- GlobalFree(g_exec);
- return;
- }
-
- {
- STARTUPINFO si={sizeof(si),};
- SECURITY_ATTRIBUTES sa={sizeof(sa),};
- SECURITY_DESCRIPTOR sd={0,};
- PROCESS_INFORMATION pi={0,};
- OSVERSIONINFO osv={sizeof(osv)};
- HANDLE newstdout=0,read_stdout=0;
- HANDLE newstdin=0,read_stdin=0;
- DWORD dwRead = 1;
- DWORD dwExit = !STILL_ACTIVE;
- DWORD dwLastOutput;
- static char szBuf[1024];
- HGLOBAL hUnusedBuf = NULL;
- char *szUnusedBuf = 0;
-
- if (log) {
- hUnusedBuf = GlobalAlloc(GHND, log & 2 ? g_stringsize : sizeof(szBuf)*4);
- if (!hUnusedBuf) {
- lstrcpy(szRet, "error");
- goto done;
- }
- szUnusedBuf = (char *)GlobalLock(hUnusedBuf);
- }
-
- GetVersionEx(&osv);
- if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl(&sd,true,NULL,false);
- sa.lpSecurityDescriptor = &sd;
- }
- else
- sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = true;
- if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) {
- lstrcpy(szRet, "error");
- goto done;
- }
- if (!CreatePipe(&read_stdin,&newstdin,&sa,0)) {
- lstrcpy(szRet, "error");
- goto done;
- }
-
- GetStartupInfo(&si);
- si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
- si.hStdInput = newstdin;
- si.hStdOutput = newstdout;
- si.hStdError = newstdout;
- if (!CreateProcess(NULL,g_exec,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
- lstrcpy(szRet, "error");
- goto done;
- }
-
- dwLastOutput = GetTickCount();
-
- while (dwExit == STILL_ACTIVE || dwRead) {
- PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
- if (dwRead) {
- dwLastOutput = GetTickCount();
- ReadFile(read_stdout, szBuf, sizeof(szBuf)-1, &dwRead, NULL);
- szBuf[dwRead] = 0;
- if (log) {
- char *p, *p2;
- SIZE_T iReqLen = lstrlen(szBuf) + lstrlen(szUnusedBuf);
- if (GlobalSize(hUnusedBuf) < iReqLen && (iReqLen < g_stringsize || !(log & 2))) {
- GlobalUnlock(hUnusedBuf);
- hUnusedBuf = GlobalReAlloc(hUnusedBuf, iReqLen+sizeof(szBuf), GHND);
- if (!hUnusedBuf) {
- lstrcpy(szRet, "error");
- break;
- }
- szUnusedBuf = (char *)GlobalLock(hUnusedBuf);
- }
- p = szUnusedBuf; // get the old left overs
- if (iReqLen < g_stringsize || !(log & 2)) lstrcat(p, szBuf);
- else {
- lstrcpyn(p + lstrlen(p), szBuf, g_stringsize - lstrlen(p));
- }
-
- if (!(log & 2)) {
- while ((p = my_strstr(p, "\t"))) {
- if ((int)(p - szUnusedBuf) > (int)(GlobalSize(hUnusedBuf) - TAB_REPLACE_SIZE - 1))
- {
- *p++ = ' ';
- }
- else
- {
- int len = lstrlen(p);
- char *c_out=(char*)p+TAB_REPLACE_SIZE+len;
- char *c_in=(char *)p+len;
- while (len-- > 0) {
- *c_out--=*c_in--;
- }
-
- lstrcpy(p, TAB_REPLACE);
- p += TAB_REPLACE_SIZE;
- *p = ' ';
- }
- }
-
- p = szUnusedBuf; // get the old left overs
- for (p2 = p; *p2;) {
- if (*p2 == '\r') {
- *p2++ = 0;
- continue;
- }
- if (*p2 == '\n') {
- *p2 = 0;
- while (!*p && p != p2) p++;
- LogMessage(p, bOEM);
- p = ++p2;
- continue;
- }
- p2 = CharNext(p2);
- }
-
- // If data was taken out from the unused buffer, move p contents to the start of szUnusedBuf
- if (p != szUnusedBuf) {
- char *p2 = szUnusedBuf;
- while (*p) *p2++ = *p++;
- *p2 = 0;
- }
- }
- }
- }
- else {
- if (g_to && GetTickCount() > dwLastOutput+g_to) {
- TerminateProcess(pi.hProcess, -1);
- lstrcpy(szRet, "timeout");
- }
- else Sleep(LOOPTIMEOUT);
- }
- GetExitCodeProcess(pi.hProcess, &dwExit);
- if (dwExit != STILL_ACTIVE) {
- PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
- }
- }
-done:
- if (log & 2) pushstring(szUnusedBuf);
- if (log & 1 && *szUnusedBuf) LogMessage(szUnusedBuf, bOEM);
- if ( dwExit == STATUS_ILLEGAL_INSTRUCTION )
- lstrcpy(szRet, "error");
- if (!szRet[0]) wsprintf(szRet,"%d",dwExit);
- pushstring(szRet);
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
- CloseHandle(newstdout);
- CloseHandle(read_stdout);
- CloseHandle(newstdin);
- CloseHandle(read_stdin);
- *(pExec-2) = '\0'; // skip space and quote
- DeleteFile(executor);
- GlobalFree(g_exec);
- if (log) {
- GlobalUnlock(hUnusedBuf);
- GlobalFree(hUnusedBuf);
- }
- }
-}
-
-// Tim Kosse's LogMessage
-void LogMessage(const char *pStr, BOOL bOEM) {
- LVITEM item={0};
- int nItemCount;
- if (!g_hwndList) return;
- //if (!lstrlen(pStr)) return;
- if (bOEM == TRUE) OemToCharBuff(pStr, (char *)pStr, lstrlen(pStr));
- nItemCount=SendMessage(g_hwndList, LVM_GETITEMCOUNT, 0, 0);
- item.mask=LVIF_TEXT;
- item.pszText=(char *)pStr;
- item.cchTextMax=0;
- item.iItem=nItemCount;
- ListView_InsertItem(g_hwndList, &item);
- ListView_EnsureVisible(g_hwndList, item.iItem, 0);
-}
-
-char *my_strstr(char *a, char *b)
-{
- int l = lstrlen(b);
- while (lstrlen(a) >= l)
- {
- char c = a[l];
- a[l] = 0;
- if (!lstrcmpi(a, b))
- {
- a[l] = c;
- return a;
- }
- a[l] = c;
- a = CharNext(a);
- }
- return NULL;
-}
-
-unsigned int my_atoi(char *s) {
- unsigned int v=0;
- if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) {
- s+=2;
- for (;;) {
- int c=*s++;
- if (c >= '0' && c <= '9') c-='0';
- else if (c >= 'a' && c <= 'f') c-='a'-10;
- else if (c >= 'A' && c <= 'F') c-='A'-10;
- else break;
- v<<=4;
- v+=c;
- }
- }
- else if (*s == '0' && s[1] <= '7' && s[1] >= '0') {
- s++;
- for (;;) {
- int c=*s++;
- if (c >= '0' && c <= '7') c-='0';
- else break;
- v<<=3;
- v+=c;
- }
- }
- else {
- for (;;) {
- int c=*s++ - '0';
- if (c < 0 || c > 9) break;
- v*=10;
- v+=c;
- }
- }
- return (int)v;
-}
-
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
-{
- DWORD Ret;
- STARTUPINFO si = {0};
- PROCESS_INFORMATION pi = {0};
- char command_line[1024];
- char seekchar=' ';
- char *cmdline;
-
- si.cb = sizeof(si);
- // Make child process use this app's standard files. Not needed because the handles
- // we created when executing this process were inheritable.
- //si.dwFlags = STARTF_USESTDHANDLES;
- //si.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
- //si.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
- //si.hStdError = GetStdHandle (STD_ERROR_HANDLE);
- lstrcpyn(command_line, GetCommandLine(), 1024);
-
- cmdline = command_line;
- if (*cmdline == '\"') seekchar = *cmdline++;
-
- while (*cmdline && *cmdline != seekchar) cmdline=CharNext(cmdline);
- cmdline=CharNext(cmdline);
- // skip any spaces before the arguments
- while (*cmdline && *cmdline == ' ') cmdline++;
-
- Ret = CreateProcess (NULL, cmdline,
- NULL, NULL,
- TRUE, 0,
- NULL, NULL,
- &si, &pi
- );
-
- if (Ret)
- {
- do
- {
- GetExitCodeProcess(pi.hProcess, &Ret);
- Sleep(LOOPTIMEOUT);
- } while ( Ret == STILL_ACTIVE );
- CloseHandle (pi.hProcess);
- CloseHandle (pi.hThread);
- return Ret;
- }
- else
- return STATUS_ILLEGAL_INSTRUCTION;
-}
+/*
+Copyright (c) 2002 Robert Rainwater <rrainwater@yahoo.com>
+
+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.
+
+*/
+#include <windows.h>
+#include <commctrl.h>
+#include <winnt.h>
+#include "../ExDLL/exdll.h"
+
+#ifndef true
+#define true TRUE
+#endif
+#ifndef false
+#define false FALSE
+#endif
+#define LOOPTIMEOUT 100
+
+HWND g_hwndParent;
+HWND g_hwndList;
+
+void ExecScript(BOOL log);
+void LogMessage(const char *pStr, BOOL bOEM);
+char *my_strstr(char *a, char *b);
+unsigned int my_atoi(char *s);
+
+void __declspec(dllexport) Exec(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) {
+ g_hwndParent=hwndParent;
+ EXDLL_INIT();
+ {
+ ExecScript(0);
+ }
+}
+
+void __declspec(dllexport) ExecToLog(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) {
+ g_hwndParent=hwndParent;
+ EXDLL_INIT();
+ {
+ ExecScript(1);
+ }
+}
+
+void __declspec(dllexport) ExecToStack(HWND hwndParent, int string_size, char *variables, stack_t **stacktop) {
+ g_hwndParent=hwndParent;
+ EXDLL_INIT();
+ {
+ ExecScript(2);
+ }
+}
+
+HINSTANCE g_hInst;
+BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) {
+ g_hInst = hInst;
+ return TRUE;
+}
+
+#define TAB_REPLACE " "
+#define TAB_REPLACE_SIZE (sizeof(TAB_REPLACE)-1)
+
+// Turn a pair of chars into a word
+// Turn four chars into a dword
+#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
+#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
+#else
+#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
+#endif
+
+void ExecScript(int log) {
+ char szRet[128] = "";
+ char *pExec;
+ int nComSpecSize;
+ char meDLLPath[MAX_PATH];
+ char *p;
+ char *executor;
+ char *g_exec;
+ unsigned int g_to;
+ BOOL bOEM;
+
+ nComSpecSize = GetModuleFileName(g_hInst, meDLLPath, MAX_PATH) + 2; // 2 chars for quotes
+ p = meDLLPath + nComSpecSize - 2; // point p at null char of meDLLPath
+ g_exec = (char *)GlobalAlloc(GPTR, sizeof(char)*g_stringsize+nComSpecSize+2); // 1 for space, 1 for null
+ *g_exec = '"';
+ executor = g_exec + 1;
+
+ do
+ {
+ if (*p == '\\')
+ break;
+ p = CharPrev(meDLLPath, p);
+ }
+ while (p > meDLLPath);
+ if (p == meDLLPath)
+ {
+ // bad path
+ pushstring("error");
+ GlobalFree(g_exec);
+ return;
+ }
+
+ *p = 0;
+ GetTempFileName(meDLLPath, "ns", 0, executor);
+ *p = '\\';
+ if (CopyFile(meDLLPath, executor, FALSE))
+ {
+ HANDLE hFile, hMapping;
+ LPBYTE pMapView;
+ PIMAGE_NT_HEADERS pNTHeaders;
+ hFile = CreateFile(executor, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING,0, 0);
+ hMapping = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, 0, NULL);
+ pMapView = MapViewOfFile(hMapping, FILE_MAP_WRITE, 0, 0, 0);
+ if (pMapView)
+ {
+ pNTHeaders = (PIMAGE_NT_HEADERS)(pMapView + ((PIMAGE_DOS_HEADER)pMapView)->e_lfanew);
+ pNTHeaders->FileHeader.Characteristics = IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_LOCAL_SYMS_STRIPPED |
+ IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE;
+ pNTHeaders->OptionalHeader.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI;
+ pNTHeaders->OptionalHeader.AddressOfEntryPoint = (DWORD)WinMain - (DWORD)g_hInst;
+ UnmapViewOfFile(pMapView);
+ }
+ CloseHandle(hMapping);
+ CloseHandle(hFile);
+ }
+
+ lstrcat(g_exec, "\"");
+
+ g_to = 0; // default is no timeout
+ bOEM = FALSE; // default is no OEM->ANSI conversion
+
+ g_hwndList = NULL;
+ if (g_hwndParent)
+ g_hwndList = FindWindowEx(FindWindowEx(g_hwndParent,NULL,"#32770",NULL),NULL,"SysListView32",NULL);
+
+ // add space
+ pExec = g_exec + lstrlen(g_exec);
+ *pExec = ' ';
+ pExec++;
+
+params:
+ popstring(pExec);
+ if (my_strstr(pExec, "/TIMEOUT=") == pExec) {
+ char *szTimeout = pExec + 9;
+ g_to = my_atoi(szTimeout);
+ *pExec = 0;
+ goto params;
+ }
+ if (!lstrcmpi(pExec, "/OEM")) {
+ bOEM = TRUE;
+ *pExec = 0;
+ goto params;
+ }
+
+ if (!pExec[0])
+ {
+ pushstring("error");
+ *(pExec-2) = '\0'; // skip space and quote
+ DeleteFile(executor);
+ GlobalFree(g_exec);
+ return;
+ }
+
+ {
+ STARTUPINFO si={sizeof(si),};
+ SECURITY_ATTRIBUTES sa={sizeof(sa),};
+ SECURITY_DESCRIPTOR sd={0,};
+ PROCESS_INFORMATION pi={0,};
+ OSVERSIONINFO osv={sizeof(osv)};
+ HANDLE newstdout=0,read_stdout=0;
+ HANDLE newstdin=0,read_stdin=0;
+ DWORD dwRead = 1;
+ DWORD dwExit = !STILL_ACTIVE;
+ DWORD dwLastOutput;
+ static char szBuf[1024];
+ HGLOBAL hUnusedBuf = NULL;
+ char *szUnusedBuf = 0;
+
+ if (log) {
+ hUnusedBuf = GlobalAlloc(GHND, log & 2 ? g_stringsize : sizeof(szBuf)*4);
+ if (!hUnusedBuf) {
+ lstrcpy(szRet, "error");
+ goto done;
+ }
+ szUnusedBuf = (char *)GlobalLock(hUnusedBuf);
+ }
+
+ GetVersionEx(&osv);
+ if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
+ SetSecurityDescriptorDacl(&sd,true,NULL,false);
+ sa.lpSecurityDescriptor = &sd;
+ }
+ else
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = true;
+ if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) {
+ lstrcpy(szRet, "error");
+ goto done;
+ }
+ if (!CreatePipe(&read_stdin,&newstdin,&sa,0)) {
+ lstrcpy(szRet, "error");
+ goto done;
+ }
+
+ GetStartupInfo(&si);
+ si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ si.wShowWindow = SW_HIDE;
+ si.hStdInput = newstdin;
+ si.hStdOutput = newstdout;
+ si.hStdError = newstdout;
+ if (!CreateProcess(NULL,g_exec,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,NULL,NULL,&si,&pi)) {
+ lstrcpy(szRet, "error");
+ goto done;
+ }
+
+ dwLastOutput = GetTickCount();
+
+ while (dwExit == STILL_ACTIVE || dwRead) {
+ PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
+ if (dwRead) {
+ dwLastOutput = GetTickCount();
+ ReadFile(read_stdout, szBuf, sizeof(szBuf)-1, &dwRead, NULL);
+ szBuf[dwRead] = 0;
+ if (log) {
+ char *p, *p2;
+ SIZE_T iReqLen = lstrlen(szBuf) + lstrlen(szUnusedBuf);
+ if (GlobalSize(hUnusedBuf) < iReqLen && (iReqLen < g_stringsize || !(log & 2))) {
+ GlobalUnlock(hUnusedBuf);
+ hUnusedBuf = GlobalReAlloc(hUnusedBuf, iReqLen+sizeof(szBuf), GHND);
+ if (!hUnusedBuf) {
+ lstrcpy(szRet, "error");
+ break;
+ }
+ szUnusedBuf = (char *)GlobalLock(hUnusedBuf);
+ }
+ p = szUnusedBuf; // get the old left overs
+ if (iReqLen < g_stringsize || !(log & 2)) lstrcat(p, szBuf);
+ else {
+ lstrcpyn(p + lstrlen(p), szBuf, g_stringsize - lstrlen(p));
+ }
+
+ if (!(log & 2)) {
+ while ((p = my_strstr(p, "\t"))) {
+ if ((int)(p - szUnusedBuf) > (int)(GlobalSize(hUnusedBuf) - TAB_REPLACE_SIZE - 1))
+ {
+ *p++ = ' ';
+ }
+ else
+ {
+ int len = lstrlen(p);
+ char *c_out=(char*)p+TAB_REPLACE_SIZE+len;
+ char *c_in=(char *)p+len;
+ while (len-- > 0) {
+ *c_out--=*c_in--;
+ }
+
+ lstrcpy(p, TAB_REPLACE);
+ p += TAB_REPLACE_SIZE;
+ *p = ' ';
+ }
+ }
+
+ p = szUnusedBuf; // get the old left overs
+ for (p2 = p; *p2;) {
+ if (*p2 == '\r') {
+ *p2++ = 0;
+ continue;
+ }
+ if (*p2 == '\n') {
+ *p2 = 0;
+ while (!*p && p != p2) p++;
+ LogMessage(p, bOEM);
+ p = ++p2;
+ continue;
+ }
+ p2 = CharNext(p2);
+ }
+
+ // If data was taken out from the unused buffer, move p contents to the start of szUnusedBuf
+ if (p != szUnusedBuf) {
+ char *p2 = szUnusedBuf;
+ while (*p) *p2++ = *p++;
+ *p2 = 0;
+ }
+ }
+ }
+ }
+ else {
+ if (g_to && GetTickCount() > dwLastOutput+g_to) {
+ TerminateProcess(pi.hProcess, -1);
+ lstrcpy(szRet, "timeout");
+ }
+ else Sleep(LOOPTIMEOUT);
+ }
+ GetExitCodeProcess(pi.hProcess, &dwExit);
+ if (dwExit != STILL_ACTIVE) {
+ PeekNamedPipe(read_stdout, 0, 0, 0, &dwRead, NULL);
+ }
+ }
+done:
+ if (log & 2) pushstring(szUnusedBuf);
+ if (log & 1 && *szUnusedBuf) LogMessage(szUnusedBuf, bOEM);
+ if ( dwExit == STATUS_ILLEGAL_INSTRUCTION )
+ lstrcpy(szRet, "error");
+ if (!szRet[0]) wsprintf(szRet,"%d",dwExit);
+ pushstring(szRet);
+ CloseHandle(pi.hThread);
+ CloseHandle(pi.hProcess);
+ CloseHandle(newstdout);
+ CloseHandle(read_stdout);
+ CloseHandle(newstdin);
+ CloseHandle(read_stdin);
+ *(pExec-2) = '\0'; // skip space and quote
+ DeleteFile(executor);
+ GlobalFree(g_exec);
+ if (log) {
+ GlobalUnlock(hUnusedBuf);
+ GlobalFree(hUnusedBuf);
+ }
+ }
+}
+
+// Tim Kosse's LogMessage
+void LogMessage(const char *pStr, BOOL bOEM) {
+ LVITEM item={0};
+ int nItemCount;
+ if (!g_hwndList) return;
+ //if (!lstrlen(pStr)) return;
+ if (bOEM == TRUE) OemToCharBuff(pStr, (char *)pStr, lstrlen(pStr));
+ nItemCount=SendMessage(g_hwndList, LVM_GETITEMCOUNT, 0, 0);
+ item.mask=LVIF_TEXT;
+ item.pszText=(char *)pStr;
+ item.cchTextMax=0;
+ item.iItem=nItemCount;
+ ListView_InsertItem(g_hwndList, &item);
+ ListView_EnsureVisible(g_hwndList, item.iItem, 0);
+}
+
+char *my_strstr(char *a, char *b)
+{
+ int l = lstrlen(b);
+ while (lstrlen(a) >= l)
+ {
+ char c = a[l];
+ a[l] = 0;
+ if (!lstrcmpi(a, b))
+ {
+ a[l] = c;
+ return a;
+ }
+ a[l] = c;
+ a = CharNext(a);
+ }
+ return NULL;
+}
+
+unsigned int my_atoi(char *s) {
+ unsigned int v=0;
+ if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) {
+ s+=2;
+ for (;;) {
+ int c=*s++;
+ if (c >= '0' && c <= '9') c-='0';
+ else if (c >= 'a' && c <= 'f') c-='a'-10;
+ else if (c >= 'A' && c <= 'F') c-='A'-10;
+ else break;
+ v<<=4;
+ v+=c;
+ }
+ }
+ else if (*s == '0' && s[1] <= '7' && s[1] >= '0') {
+ s++;
+ for (;;) {
+ int c=*s++;
+ if (c >= '0' && c <= '7') c-='0';
+ else break;
+ v<<=3;
+ v+=c;
+ }
+ }
+ else {
+ for (;;) {
+ int c=*s++ - '0';
+ if (c < 0 || c > 9) break;
+ v*=10;
+ v+=c;
+ }
+ }
+ return (int)v;
+}
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+ DWORD Ret;
+ STARTUPINFO si = {0};
+ PROCESS_INFORMATION pi = {0};
+ char command_line[1024];
+ char seekchar=' ';
+ char *cmdline;
+
+ si.cb = sizeof(si);
+ // Make child process use this app's standard files. Not needed because the handles
+ // we created when executing this process were inheritable.
+ //si.dwFlags = STARTF_USESTDHANDLES;
+ //si.hStdInput = GetStdHandle (STD_INPUT_HANDLE);
+ //si.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE);
+ //si.hStdError = GetStdHandle (STD_ERROR_HANDLE);
+ lstrcpyn(command_line, GetCommandLine(), 1024);
+
+ cmdline = command_line;
+ if (*cmdline == '\"') seekchar = *cmdline++;
+
+ while (*cmdline && *cmdline != seekchar) cmdline=CharNext(cmdline);
+ cmdline=CharNext(cmdline);
+ // skip any spaces before the arguments
+ while (*cmdline && *cmdline == ' ') cmdline++;
+
+ Ret = CreateProcess (NULL, cmdline,
+ NULL, NULL,
+ TRUE, 0,
+ NULL, NULL,
+ &si, &pi
+ );
+
+ if (Ret)
+ {
+ do
+ {
+ GetExitCodeProcess(pi.hProcess, &Ret);
+ Sleep(LOOPTIMEOUT);
+ } while ( Ret == STILL_ACTIVE );
+ CloseHandle (pi.hProcess);
+ CloseHandle (pi.hThread);
+ return Ret;
+ }
+ else
+ return STATUS_ILLEGAL_INSTRUCTION;
+}
diff --git a/Contrib/nsExec/test.nsi b/Contrib/nsExec/test.nsi
index 4a8c931..5a0c931 100755
--- a/Contrib/nsExec/test.nsi
+++ b/Contrib/nsExec/test.nsi
@@ -1,31 +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 ""
+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/Contrib/zip2exe/Base.nsh b/Contrib/zip2exe/Base.nsh
index ca780a9..7739d20 100755
--- a/Contrib/zip2exe/Base.nsh
+++ b/Contrib/zip2exe/Base.nsh
@@ -1,87 +1,87 @@
-;Change this file to customize zip2exe generated installers
-
-Name "${ZIP2EXE_NAME}"
-OutFile "${ZIP2EXE_OUTFILE}"
-
-AllowRootDirInstall true
-
-
-!ifdef ZIP2EXE_COMPRESSOR_SOLID
- !define SETCOMPRESSOR_SWITCH /SOLID
-!else
- !define SETCOMPRESSOR_SWITCH
-!endif
-
-!ifdef ZIP2EXE_COMPRESSOR_ZLIB
- SetCompressor ${SETCOMPRESSOR_SWITCH} zlib
-!else ifdef ZIP2EXE_COMPRESSOR_BZIP2
- SetCompressor ${SETCOMPRESSOR_SWITCH} bzip2
-!else ifdef ZIP2EXE_COMPRESSOR_LZMA
- SetCompressor ${SETCOMPRESSOR_SWITCH} lzma
-!endif
-
-!ifdef ZIP2EXE_INSTALLDIR
-
- InstallDir "${ZIP2EXE_INSTALLDIR}"
-
- Function zip2exe.SetOutPath
- SetOutPath "$INSTDIR"
- FunctionEnd
-
-!else ifdef ZIP2EXE_INSTALLDIR_WINAMP
-
- InstallDir "$PROGRAMFILES\Winamp"
- InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" "UninstallString"
-
- Function .onVerifyInstDir
- IfFileExists $INSTDIR\winamp.exe WinampInstalled
- Abort
- WinampInstalled:
- FunctionEnd
-
- !ifdef ZIP2EXE_INSTALLDIR_WINAMPMODE
-
- Var ZIP2EXE_TEMP1
- Var ZIP2EXE_TEMP2
-
- Function zip2exe.SetOutPath
- !ifdef ZIP2EXE_INSTALLDIR_SKINS
- StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Skins"
- !else
- StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Plugins"
- !endif
- ReadINIStr $ZIP2EXE_TEMP2 "$INSTDIR\winamp.ini" "Winamp" "${ZIP2EXE_INSTALLDIR_WINAMPMODE}"
- StrCmp $ZIP2EXE_TEMP2 "" End
- IfFileExists $ZIP2EXE_TEMP2 0 End
- StrCpy $ZIP2EXE_TEMP1 $ZIP2EXE_TEMP2
- End:
- SetOutPath $ZIP2EXE_TEMP1
- FunctionEnd
-
- !else
-
- Function zip2exe.SetOutPath
- !ifdef ZIP2EXE_INSTALLDIR_PLUGINS
- SetOutPath "$INSTDIR\Plugins"
- !else
- SetOutPath "$INSTDIR"
- !endif
- FunctionEnd
-
- !endif
-
-!endif
-
-!macro SECTION_BEGIN
-
- Section ""
-
- Call zip2exe.SetOutPath
-
-!macroend
-
-!macro SECTION_END
-
- SectionEnd
-
+;Change this file to customize zip2exe generated installers
+
+Name "${ZIP2EXE_NAME}"
+OutFile "${ZIP2EXE_OUTFILE}"
+
+AllowRootDirInstall true
+
+
+!ifdef ZIP2EXE_COMPRESSOR_SOLID
+ !define SETCOMPRESSOR_SWITCH /SOLID
+!else
+ !define SETCOMPRESSOR_SWITCH
+!endif
+
+!ifdef ZIP2EXE_COMPRESSOR_ZLIB
+ SetCompressor ${SETCOMPRESSOR_SWITCH} zlib
+!else ifdef ZIP2EXE_COMPRESSOR_BZIP2
+ SetCompressor ${SETCOMPRESSOR_SWITCH} bzip2
+!else ifdef ZIP2EXE_COMPRESSOR_LZMA
+ SetCompressor ${SETCOMPRESSOR_SWITCH} lzma
+!endif
+
+!ifdef ZIP2EXE_INSTALLDIR
+
+ InstallDir "${ZIP2EXE_INSTALLDIR}"
+
+ Function zip2exe.SetOutPath
+ SetOutPath "$INSTDIR"
+ FunctionEnd
+
+!else ifdef ZIP2EXE_INSTALLDIR_WINAMP
+
+ InstallDir "$PROGRAMFILES\Winamp"
+ InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" "UninstallString"
+
+ Function .onVerifyInstDir
+ IfFileExists $INSTDIR\winamp.exe WinampInstalled
+ Abort
+ WinampInstalled:
+ FunctionEnd
+
+ !ifdef ZIP2EXE_INSTALLDIR_WINAMPMODE
+
+ Var ZIP2EXE_TEMP1
+ Var ZIP2EXE_TEMP2
+
+ Function zip2exe.SetOutPath
+ !ifdef ZIP2EXE_INSTALLDIR_SKINS
+ StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Skins"
+ !else
+ StrCpy $ZIP2EXE_TEMP1 "$INSTDIR\Plugins"
+ !endif
+ ReadINIStr $ZIP2EXE_TEMP2 "$INSTDIR\winamp.ini" "Winamp" "${ZIP2EXE_INSTALLDIR_WINAMPMODE}"
+ StrCmp $ZIP2EXE_TEMP2 "" End
+ IfFileExists $ZIP2EXE_TEMP2 0 End
+ StrCpy $ZIP2EXE_TEMP1 $ZIP2EXE_TEMP2
+ End:
+ SetOutPath $ZIP2EXE_TEMP1
+ FunctionEnd
+
+ !else
+
+ Function zip2exe.SetOutPath
+ !ifdef ZIP2EXE_INSTALLDIR_PLUGINS
+ SetOutPath "$INSTDIR\Plugins"
+ !else
+ SetOutPath "$INSTDIR"
+ !endif
+ FunctionEnd
+
+ !endif
+
+!endif
+
+!macro SECTION_BEGIN
+
+ Section ""
+
+ Call zip2exe.SetOutPath
+
+!macroend
+
+!macro SECTION_END
+
+ SectionEnd
+
!macroend \ No newline at end of file
diff --git a/Contrib/zip2exe/Classic.nsh b/Contrib/zip2exe/Classic.nsh
index 75faf84..de86c49 100755
--- a/Contrib/zip2exe/Classic.nsh
+++ b/Contrib/zip2exe/Classic.nsh
@@ -1,4 +1,4 @@
-;Change this file to customize zip2exe generated installers with a classic interface
-
-Page directory
+;Change this file to customize zip2exe generated installers with a classic interface
+
+Page directory
Page instfiles \ No newline at end of file
diff --git a/Contrib/zip2exe/Modern.nsh b/Contrib/zip2exe/Modern.nsh
index c07989c..b015906 100755
--- a/Contrib/zip2exe/Modern.nsh
+++ b/Contrib/zip2exe/Modern.nsh
@@ -1,8 +1,8 @@
-;Change this file to customize zip2exe generated installers with a modern interface
-
-!include "MUI.nsh"
-
-!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
-
+;Change this file to customize zip2exe generated installers with a modern interface
+
+!include "MUI.nsh"
+
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+
!insertmacro MUI_LANGUAGE "English" \ No newline at end of file
diff --git a/Contrib/zip2exe/SConscript b/Contrib/zip2exe/SConscript
index b725fc9..a623832 100755
--- a/Contrib/zip2exe/SConscript
+++ b/Contrib/zip2exe/SConscript
@@ -1,41 +1,41 @@
-target = "zip2exe"
-
-files = Split("""
- main.cpp
- zlib/adler32.c
- zlib/crc32.c
- zlib/inffast.c
- zlib/inflate.c
- zlib/inftrees.c
- zlib/ioapi.c
- zlib/unzip.c
- zlib/zutil.c
-""")
-
-resources = Split("""
- zip2exe.xml
- icon.ico
-""")
-
-rc = 'res.rc'
-
-libs = Split("""
- user32
- gdi32
- comctl32
- comdlg32
- advapi32
- shell32
-""")
-
-headers = Split("""
- Base.nsh
- Classic.nsh
- Modern.nsh
-""")
-
-Import('BuildUtil defenv')
-
-BuildUtil(target, files, libs, res = rc, resources = resources)
-
-defenv.DistributeContrib(headers,path=target)
+target = "zip2exe"
+
+files = Split("""
+ main.cpp
+ zlib/adler32.c
+ zlib/crc32.c
+ zlib/inffast.c
+ zlib/inflate.c
+ zlib/inftrees.c
+ zlib/ioapi.c
+ zlib/unzip.c
+ zlib/zutil.c
+""")
+
+resources = Split("""
+ zip2exe.xml
+ icon.ico
+""")
+
+rc = 'res.rc'
+
+libs = Split("""
+ user32
+ gdi32
+ comctl32
+ comdlg32
+ advapi32
+ shell32
+""")
+
+headers = Split("""
+ Base.nsh
+ Classic.nsh
+ Modern.nsh
+""")
+
+Import('BuildUtil defenv')
+
+BuildUtil(target, files, libs, res = rc, resources = resources)
+
+defenv.DistributeContrib(headers,path=target)
diff --git a/Contrib/zip2exe/main.cpp b/Contrib/zip2exe/main.cpp
index d70454f..eb0ad14 100755
--- a/Contrib/zip2exe/main.cpp
+++ b/Contrib/zip2exe/main.cpp
@@ -1,784 +1,784 @@
-#include <windows.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <commctrl.h>
-
-/*
-
-version 0.35
-* drag & drop support
-
-version 0.34
-* preserve zip timestamps
-
-version 0.33
-* Added solid compression checkbox
-
-version 0.32
-* Fixed codepage problems
-
-version 0.31 (by Joost Verburg)
-* LZMA compression support
-* Fixed compression setting
-
-version 0.31 (by Joost Verburg)
-* Based on header files
-* Improved interface
-* Modern UI support
-* New script code
-* Immproved folder detection
-
-portions Copyright © 1999-2001 Miguel Garrido (mgarrido01@hotmail.com)
-
-*/
-
-extern "C"
-{
-#include "zlib/unzip.h"
-};
-#include "resource.h"
-
-const char *g_errcaption="Zip2Exe Error";
-
-HINSTANCE g_hInstance;
-HWND g_hwnd;
-HANDLE g_hThread;
-char g_cmdline[1024];
-int g_extracting;
-int g_compressor;
-int g_compressor_solid;
-int g_mui;
-int g_zipfile_size;
-
-char *g_options="";//"/V3";
-
-static BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-
-
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,
- LPSTR lpszCmdParam, int nCmdShow)
-{
- g_hInstance=hInstance;
-
- InitCommonControls();
- return DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG1),GetDesktopWindow(),DlgProc);
-}
-char tempzip_path[1024];
-
-
-int made;
-
-static void doRMDir(char *buf)
-{
- HANDLE h;
- WIN32_FIND_DATA fd;
- char *p=buf;
- while (*p) p++;
- lstrcpy(p,"\\*.*");
- h = FindFirstFile(buf,&fd);
- if (h != INVALID_HANDLE_VALUE)
- {
- do
- {
- if (fd.cFileName[0] != '.' ||
- (fd.cFileName[1] != '.' && fd.cFileName[1]))
- {
- lstrcpy(p+1,fd.cFileName);
- if (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
- SetFileAttributes(buf,fd.dwFileAttributes^FILE_ATTRIBUTE_READONLY);
- if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) doRMDir(buf);
- else
- {
- DeleteFile(buf);
- }
- }
- } while (FindNextFile(h,&fd));
- FindClose(h);
- }
- p[0]=0; // fix buffer
- RemoveDirectory(buf);
-}
-
-static void doMKDir(char *directory)
-{
- char *p, *p2;
- char buf[MAX_PATH];
- if (!*directory) return;
- lstrcpy(buf,directory);
- p=buf; while (*p) p++;
- while (p >= buf && *p != '\\') p--;
- p2 = buf;
- if (p2[1] == ':') p2+=4;
- else if (p2[0] == '\\' && p2[1] == '\\')
- {
- p2+=2;
- while (*p2 && *p2 != '\\') p2++;
- if (*p2) p2++;
- while (*p2 && *p2 != '\\') p2++;
- if (*p2) p2++;
- }
- if (p >= p2)
- {
- *p=0;
- doMKDir(buf);
- }
- CreateDirectory(directory,NULL);
-}
-
-
-
-void tempzip_cleanup(HWND hwndDlg, int err)
-{
- if (tempzip_path[0]) doRMDir(tempzip_path);
- tempzip_path[0]=0;
- if (err)
- {
- SendDlgItemMessage(hwndDlg,IDC_ZIPINFO_FILES,LB_RESETCONTENT,0,0);
- EnableWindow(GetDlgItem(hwndDlg,IDOK),0);
- SetDlgItemText(hwndDlg,IDC_ZIPINFO_SUMMARY,"");
- SetDlgItemText(hwndDlg,IDC_ZIPFILE,"");
- SetDlgItemText(hwndDlg,IDC_OUTFILE,"");
- }
-}
-
-int tempzip_make(HWND hwndDlg, char *fn)
-{
- char buf[MAX_PATH];
- GetTempPath(MAX_PATH,buf);
- GetTempFileName(buf,"z2e",GetTickCount(),tempzip_path);
- if (!CreateDirectory(tempzip_path,NULL))
- {
- GetTempPath(MAX_PATH,tempzip_path);
- strcat(tempzip_path,"\\nsi");
- if (!CreateDirectory(tempzip_path,NULL))
- {
- tempzip_path[0]=0;
- MessageBox(hwndDlg,"Error creating temporary directory",g_errcaption,MB_OK|MB_ICONSTOP);
- return 1;
- }
- }
- FILE *fp=fopen(fn,"rb");
- if (fp)
- {
- fseek(fp,0,SEEK_END);
- g_zipfile_size=ftell(fp);
- fclose(fp);
- }
- else g_zipfile_size=0;
- unzFile f;
- f = unzOpen(fn);
- if (!f || unzGoToFirstFile(f) != UNZ_OK)
- {
- if (f) unzClose(f);
- MessageBox(hwndDlg,"Error opening ZIP file",g_errcaption,MB_OK|MB_ICONSTOP);
- return 1;
- }
-
- int nf=0, nkb=0;
- g_extracting=1;
- do {
- char filename[MAX_PATH];
- unz_file_info info;
-
- unzGetCurrentFileInfo(f,&info,filename,sizeof(filename),NULL,0,NULL,0);
-
- // was zip created on MS-DOS/Windows?
- if ((info.version & 0xFF00) == 0)
- {
- OemToCharBuff(filename, filename, strlen(filename));
- }
-
- if (filename[0] &&
- filename[strlen(filename)-1] != '\\' &&
- filename[strlen(filename)-1] != '/')
- {
- char *pfn=filename;
- while (*pfn)
- {
- if (*pfn == '/') *pfn='\\';
- pfn++;
- }
- pfn=filename;
- if (pfn[1] == ':' && pfn[2] == '\\') pfn+=3;
- while (*pfn == '\\') pfn++;
-
- char out_filename[1024];
- lstrcpy(out_filename,tempzip_path);
- lstrcat(out_filename,"\\");
- lstrcat(out_filename,pfn);
- if (strstr(pfn,"\\"))
- {
- char buf[1024];
- lstrcpy(buf,out_filename);
- char *p=buf+strlen(buf);
- while (p > buf && *p != '\\') p--;
- *p=0;
- if (buf[0]) doMKDir(buf);
- }
-
- if (unzOpenCurrentFile(f) == UNZ_OK)
- {
- SendDlgItemMessage(hwndDlg,IDC_ZIPINFO_FILES,LB_ADDSTRING,0,(LPARAM)pfn);
- FILE *fp;
- int l;
- fp = fopen(out_filename,"wb");
- if (fp)
- {
- do
- {
- char buf[1024];
- l=unzReadCurrentFile(f,buf,sizeof(buf));
- if (l > 0)
- {
- if (fwrite(buf,1,l,fp) != (unsigned int)l)
- {
- unzClose(f);
- fclose(fp);
- MessageBox(hwndDlg,"Error writing output file(s)",g_errcaption,MB_OK|MB_ICONSTOP);
- g_extracting=0;
- return 1;
- }
- nkb++;
- }
- } while (l > 0);
-
- fclose(fp);
-
- {
- // set file time
- HANDLE hf = CreateFile(out_filename, GENERIC_WRITE, 0, 0, OPEN_ALWAYS, 0, 0);
- if (hf != INVALID_HANDLE_VALUE)
- {
- FILETIME ft, lft;
- DosDateTimeToFileTime(HIWORD(info.dosDate), LOWORD(info.dosDate), &ft);
- LocalFileTimeToFileTime(&ft, &lft);
- SetFileTime(hf, 0, 0, &lft);
- CloseHandle(hf);
- }
- }
- }
- else
- {
- unzClose(f);
- MessageBox(hwndDlg,"Error opening output file(s)",g_errcaption,MB_OK|MB_ICONSTOP);
- g_extracting=0;
- return 1;
- }
- nf++;
- wsprintf(buf,"Extracting: %d files, %dKB",nf,nkb);
- SetDlgItemText(hwndDlg,IDC_ZIPINFO_SUMMARY,buf);
- MSG msg;
- int quit=0;
- while (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
- {
- if (msg.message == WM_DESTROY && msg.hwnd == g_hwnd)
- {
- quit++;
- break;
- }
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- unzCloseCurrentFile(f);
- if (quit) break;
- }
- else
- {
- unzClose(f);
- MessageBox(hwndDlg,"Error extracting from ZIP file",g_errcaption,MB_OK|MB_ICONSTOP);
- g_extracting=0;
- return 1;
- }
- }
- } while (unzGoToNextFile(f) == UNZ_OK);
-
- g_extracting=0;
- wsprintf(buf,"Extracted: %d files, %dKB",nf,nkb);
- SetDlgItemText(hwndDlg,IDC_ZIPINFO_SUMMARY,buf);
- unzClose(f);
- return 0;
-}
-
-char *gp_winamp = "(WINAMP DIRECTORY)";
-char *gp_winamp_plugins = "(WINAMP PLUG-INS DIRECTORY)";
-char *gp_winamp_vis = "(WINAMP VIS PLUG-INS DIRECTORY)";
-char *gp_winamp_dsp = "(WINAMP DSP PLUG-INS DIRECTORY)";
-char *gp_winamp_skins = "(WINAMP SKINS DIRECTORY)";
-char *gp_poi = "(PATH OF INSTALLER)";
-
-
-void wnd_printf(const char *str)
-{
- if (!*str) return;
- char existing_text[32000];
- existing_text[0]=0;
- UINT l=GetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, existing_text, 32000);
- l+=strlen(str);
-
- char *p=existing_text;
- existing_text[31000]=0;
- while (l > 31000 && *p)
- {
- while (*p != '\r' && *p != '\n' && *p)
- {
- p++;
- l--;
- }
- while (*p == '\r' || *p == '\n')
- {
- p++;
- l--;
- }
- }
-
- char buf[31000];
- lstrcpy(buf,p);
- lstrcpy(existing_text,buf);
- lstrcat(existing_text,str);
-
- SetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, existing_text);
- SendDlgItemMessage(g_hwnd, IDC_OUTPUTTEXT, EM_LINESCROLL, 0, SendDlgItemMessage(g_hwnd, IDC_OUTPUTTEXT, EM_GETLINECOUNT, 0, 0)); // scroll to the last line of the textbox
-
-}
-
-void ErrorMessage(char *str) //display detailed error info
-{
- LPVOID msg;
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR) &msg,
- 0,
- NULL
- );
- wnd_printf(str);
- wnd_printf(": ");
- wnd_printf((char*)msg);
- LocalFree(msg);
-}
-
-DWORD WINAPI ThreadProc(LPVOID p) // thread that will start & monitor wwwinamp
-{
- char buf[1024]; //i/o buffer
- STARTUPINFO si={sizeof(si),};
- SECURITY_ATTRIBUTES sa={sizeof(sa),};
- SECURITY_DESCRIPTOR sd={0,}; //security information for pipes
- PROCESS_INFORMATION pi={0,};
- HANDLE newstdout=0,read_stdout=0; //pipe handles
-
- OSVERSIONINFO osv={sizeof(osv)};
- GetVersionEx(&osv);
- if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) //initialize security descriptor (Windows NT)
- {
- InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl(&sd, true, NULL, false);
- sa.lpSecurityDescriptor = &sd;
- }
- else sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = true; //allow inheritable handles
-
- if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) //create stdout pipe
- {
- ErrorMessage("CreatePipe");
- PostMessage(g_hwnd,WM_USER+1203,0,1);
- return 1;
- }
-
- GetStartupInfo(&si); //set startupinfo for the spawned process
- /*
- The dwFlags member tells CreateProcess how to make the process.
- STARTF_USESTDHANDLES validates the hStd* members. STARTF_USESHOWWINDOW
- validates the wShowWindow member.
- */
- si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
- si.hStdOutput = newstdout;
- si.hStdError = newstdout; //set the new handles for the child process
-
- // *******************************************************************
- // If there is a command line in the config file, use it for create process
-
- //spawn the child process
- if (!CreateProcess(NULL,g_cmdline,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,
- NULL,tempzip_path,&si,&pi))
- {
- ErrorMessage("CreateProcess");
- wnd_printf("\r\nPlease make sure the path to makensis.exe is correct.");
- CloseHandle(newstdout);
- CloseHandle(read_stdout);
- PostMessage(g_hwnd,WM_USER+1203,0,1);
- return 1;
- }
-
- DWORD exit=0; //process exit code
- DWORD bread; //bytes read
- DWORD avail; //bytes available
-
- memset(buf,0,sizeof(buf));
- while (1) //main program loop
- {
- PeekNamedPipe(read_stdout,buf,1023,&bread,&avail,NULL);
- //check to see if there is any data to read from stdout
- if (bread != 0)
- {
- memset(buf,0,sizeof(buf));
- if (avail > 1023)
- {
- while (bread >= 1023)
- {
- ReadFile(read_stdout,buf,1023,&bread,NULL); //read the stdout pipe
- wnd_printf(buf);
- memset(buf,0,sizeof(buf));
- }
- }
- else
- {
- ReadFile(read_stdout,buf,1023,&bread,NULL);
- wnd_printf(buf);
- }
- }
-
- GetExitCodeProcess(pi.hProcess,&exit); //while the process is running
- if (exit != STILL_ACTIVE)
- break;
-
- Sleep(100);
- }
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
- CloseHandle(newstdout);
- CloseHandle(read_stdout);
-
-
- wsprintf(buf,"(source ZIP size was %d bytes)\r\n",g_zipfile_size);
- wnd_printf(buf);
-
- PostMessage(g_hwnd,WM_USER+1203,0,0);
- return 0;
-}
-
-
-char nsifilename[MAX_PATH];
-
-
-
-void makeEXE(HWND hwndDlg)
-{
- char buf[2048];
- GetTempPath(MAX_PATH,buf);
- GetTempFileName(buf,"zne",0,nsifilename);
- FILE *fp=fopen(nsifilename,"w");
- if (!fp)
- {
- MessageBox(hwndDlg,"Error writing .NSI file",g_errcaption,MB_OK|MB_ICONSTOP);
- PostMessage(g_hwnd,WM_USER+1203,0,0);
- return;
- }
- GetDlgItemText(hwndDlg,IDC_INSTNAME,buf,sizeof(buf));
- fprintf(fp,"!define ZIP2EXE_NAME `%s`\n",buf);
- GetDlgItemText(hwndDlg,IDC_OUTFILE,buf,sizeof(buf));
- fprintf(fp,"!define ZIP2EXE_OUTFILE `%s`\n",buf);
- if (g_compressor == 1)
- fprintf(fp,"!define ZIP2EXE_COMPRESSOR_ZLIB\n");
- if (g_compressor == 2)
- fprintf(fp,"!define ZIP2EXE_COMPRESSOR_BZIP2\n");
- if (g_compressor == 3)
- fprintf(fp,"!define ZIP2EXE_COMPRESSOR_LZMA\n");
- if (g_compressor_solid == 1)
- fprintf(fp,"!define ZIP2EXE_COMPRESSOR_SOLID\n");
- GetDlgItemText(hwndDlg,IDC_INSTPATH,buf,sizeof(buf));
- int iswinamp=0;
- char *iswinampmode=NULL;
- if (!strcmp(buf,gp_poi)) lstrcpy(buf,"$EXEDIR");
-
- if (!strcmp(buf,gp_winamp))
- {
- iswinamp=1;
- }
- if (!strcmp(buf,gp_winamp_plugins))
- {
- iswinamp=1;
- fprintf(fp,"!define ZIP2EXE_INSTALLDIR_PLUGINS\n");
- }
- if (!strcmp(buf,gp_winamp_vis))
- {
- iswinamp=1;
- iswinampmode="VisDir";
- }
- if (!strcmp(buf,gp_winamp_dsp))
- {
- iswinamp=1;
- iswinampmode="DSPDir";
- }
- if (!strcmp(buf,gp_winamp_skins))
- {
- iswinamp=1;
- iswinampmode="SkinDir";
- fprintf(fp,"!define ZIP2EXE_INSTALLDIR_SKINS\n");
- }
-
- if (iswinamp)
- {
- fprintf(fp,"!define ZIP2EXE_INSTALLDIR_WINAMP\n");
-
- if (iswinampmode)
- {
- fprintf(fp,"!define ZIP2EXE_INSTALLDIR_WINAMPMODE `%s`\n",iswinampmode);
- }
- }
- else // set out path to $INSTDIR
- {
- fprintf(fp,"!define ZIP2EXE_INSTALLDIR `%s`\n",buf);
- }
-
- fprintf(fp,"!include `${NSISDIR}\\Contrib\\zip2exe\\Base.nsh`\n");
- fprintf(fp,"!include `${NSISDIR}\\Contrib\\zip2exe\\%s.nsh`\n",g_mui?"Modern":"Classic");
-
- fprintf(fp,"!insertmacro SECTION_BEGIN\n");
- fprintf(fp,"File /r `%s\\*.*`\n",tempzip_path);
- fprintf(fp,"!insertmacro SECTION_END\n");
-
- fclose(fp);
-
- char g_makensis_path[MAX_PATH];
- char *p=g_makensis_path;
- GetModuleFileName(g_hInstance,g_makensis_path,sizeof(g_makensis_path));
- while (*p) p++;
- while (p >= g_makensis_path && *p != '\\') p--;
- strcpy(p+1,"makensis.exe");
-
- WIN32_FIND_DATA fd;
- HANDLE h=FindFirstFile(g_makensis_path,&fd);
- if (h==INVALID_HANDLE_VALUE)
- {
- if ((p-g_makensis_path>4)&&(tolower(*(p-1))=='n')&&(tolower(*(p-2))=='i')&&(tolower(*(p-3))=='b')&&(*(p-4)=='\\'))
- {
- p -= 4;
- strcpy(p+1,"makensis.exe");
- h=FindFirstFile(g_makensis_path,&fd);
- if (h==INVALID_HANDLE_VALUE)
- {
- MessageBox(hwndDlg,"Error finding makensis.exe.",g_errcaption,MB_OK|MB_ICONSTOP);
- PostMessage(g_hwnd,WM_USER+1203,0,0);
- return;
- }
- }
- }
- if (h!=INVALID_HANDLE_VALUE) FindClose(h);
-
-
-
- wsprintf(g_cmdline,"\"%s\" %s \"%s\"",g_makensis_path,g_options,nsifilename);
-
- DWORD id;
- g_hThread=CreateThread(NULL,0,ThreadProc,0,0,&id);
-
-}
-
-void SetZip(HWND hwndDlg, char *path)
-{
- char buf2[1024];
- lstrcpy(buf2,path);
- tempzip_cleanup(hwndDlg,1);
- SetDlgItemText(hwndDlg,IDC_ZIPFILE,path);
- char *t=path+lstrlen(path);
- while (t > path && *t != '\\' && *t != '.') t--;
- {
- char *p=t;
- while (p >= path && *p != '\\') p--;
- p++;
- *t=0;
- SetDlgItemText(hwndDlg,IDC_INSTNAME,p[0]?p:"Stuff");
- }
- strcpy(t,".exe");
- SetDlgItemText(hwndDlg,IDC_OUTFILE,path);
- if (tempzip_make(hwndDlg,buf2)) tempzip_cleanup(hwndDlg,1);
- else
- {
- EnableWindow(GetDlgItem(hwndDlg,IDOK),1);
- }
-}
-
-BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- static int ids[]={IDC_INFO,IDC_NSISICON,IDC_SZIPFRAME,IDC_BROWSE,IDC_ZIPFILE,IDC_ZIPINFO_SUMMARY,IDC_ZIPINFO_FILES,IDC_OFRAME,IDC_INAMEST,
- IDC_INSTNAME,IDC_INSTPATH,IDC_OEFST,IDC_OUTFILE,IDC_BROWSE2,IDC_COMPRESSOR,IDC_ZLIB,IDC_BZIP2,IDC_LZMA,IDC_SOLID,IDC_INTERFACE,IDC_MODERNUI,IDC_CLASSICUI};
- static HICON hIcon;
- static HFONT hFont;
- if (uMsg == WM_DESTROY) { if (hIcon) DeleteObject(hIcon); hIcon=0; if (hFont) DeleteObject(hFont); hFont=0; }
- switch (uMsg)
- {
- case WM_INITDIALOG:
- g_hwnd=hwndDlg;
- CheckDlgButton(hwndDlg,IDC_LZMA,BST_CHECKED);
- CheckDlgButton(hwndDlg,IDC_MODERNUI,BST_CHECKED);
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_poi);
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$TEMP");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$SYSDIR");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$WINDIR");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$DESKTOP");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$DESKTOP\\YourNameHere");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$PROGRAMFILES\\YourNameHere");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$STARTMENU");
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$SMPROGRAMS");
-
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp);
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_plugins);
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_vis);
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_dsp);
- SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_skins);
-
- SetDlgItemText(hwndDlg,IDC_INSTPATH,gp_poi);
-
- hIcon=LoadIcon(g_hInstance,MAKEINTRESOURCE(IDI_ICON1));
- SetClassLong(hwndDlg,GCL_HICON,(long)hIcon);
-
- hFont=CreateFont(15,0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
- OUT_CHARACTER_PRECIS,
- CLIP_DEFAULT_PRECIS,
- DEFAULT_QUALITY,FIXED_PITCH|FF_DONTCARE,"Courier New");
- SendDlgItemMessage(hwndDlg,IDC_OUTPUTTEXT,WM_SETFONT,(WPARAM)hFont,0);
-
- DragAcceptFiles(hwndDlg,TRUE);
- return 1;
- case WM_CLOSE:
- if (!g_hThread)
- {
- tempzip_cleanup(hwndDlg,0);
- EndDialog(hwndDlg,1);
- }
- break;
- case WM_USER+1203:
-
- if (g_hThread)
- {
- if (!lParam) ShowWindow(GetDlgItem(hwndDlg,IDC_TEST),SW_SHOWNA);
- CloseHandle(g_hThread);
- g_hThread=0;
- }
- made=1;
- ShowWindow(GetDlgItem(hwndDlg,IDC_BACK),SW_SHOWNA);
- EnableWindow(GetDlgItem(hwndDlg,IDOK),1);
- if (nsifilename[0]) DeleteFile(nsifilename);
- nsifilename[0]=0;
- break;
- case WM_DROPFILES:
- {
- char dropped_file[MAX_PATH]="";
- if (DragQueryFile((HDROP)wParam,(UINT)-1,NULL,0)==1)
- {
- DragQueryFile((HDROP)wParam,0,dropped_file,MAX_PATH);
- if (lstrlen(dropped_file)>0)
- {
- SetZip(hwndDlg,dropped_file);
- }
- }
- else
- {
- MessageBox(hwndDlg,"Dropping more than one zip file at a time is not supported",g_errcaption,MB_OK|MB_ICONSTOP);
- }
- DragFinish((HDROP)wParam);
- return TRUE;
- }
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDC_BROWSE:
- if (!g_extracting) {
- OPENFILENAME l={sizeof(l),};
- char buf[1024];
- l.hwndOwner = hwndDlg;
- l.lpstrFilter = "ZIP Files\0*.zip\0All Files\0*.*\0";
- l.lpstrFile = buf;
- l.nMaxFile = 1023;
- l.lpstrTitle = "Open ZIP File";
- l.lpstrDefExt = "zip";
- l.lpstrInitialDir = NULL;
- l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER|OFN_PATHMUSTEXIST;
- buf[0]=0;
- if (GetOpenFileName(&l))
- {
- SetZip(hwndDlg,buf);
- }
- }
- break;
- case IDC_BROWSE2:
- {
- OPENFILENAME l={sizeof(l),};
- char buf[1024];
- l.hwndOwner = hwndDlg;
- l.lpstrFilter = "Executables\0*.exe\0All Files\0*.*\0";
- l.lpstrFile = buf;
- l.nMaxFile = 1023;
- l.lpstrTitle = "Select Output EXE File";
- l.lpstrDefExt = "exe";
- l.lpstrInitialDir = NULL;
- l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER;
- GetDlgItemText(hwndDlg,IDC_OUTFILE,buf,sizeof(buf));
- if (GetSaveFileName(&l))
- {
- SetDlgItemText(hwndDlg,IDC_OUTFILE,buf);
- }
- }
- break;
- case IDC_BACK:
- if (!g_hThread)
- {
- made=0;
- ShowWindow(GetDlgItem(hwndDlg,IDC_BACK),SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg,IDC_TEST),SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg,IDC_OUTPUTTEXT),SW_HIDE);
- {
- for (size_t x = 0; x < sizeof(ids)/sizeof(ids[0]); x ++)
- ShowWindow(GetDlgItem(hwndDlg,ids[x]),SW_SHOWNA);
- SetDlgItemText(hwndDlg,IDOK,"&Generate");
- EnableWindow(GetDlgItem(hwndDlg,IDOK),1);
- }
- }
- break;
- case IDC_TEST:
- if (!g_hThread) {
- char buf[1024];
- GetDlgItemText(hwndDlg,IDC_OUTFILE,buf,sizeof(buf));
- ShellExecute(hwndDlg,"open",buf,"","",SW_SHOW);
- }
- break;
- case IDOK:
- if (!g_hThread)
- {
- if (!made)
- {
- if (IsDlgButtonChecked(hwndDlg,IDC_ZLIB))
- g_compressor = 1;
- if (IsDlgButtonChecked(hwndDlg,IDC_BZIP2))
- g_compressor = 2;
- if (IsDlgButtonChecked(hwndDlg,IDC_LZMA))
- g_compressor = 3;
- if (IsDlgButtonChecked(hwndDlg,IDC_SOLID))
- g_compressor_solid = 1;
- else
- g_compressor_solid = 0;
- g_mui=!IsDlgButtonChecked(hwndDlg,IDC_CLASSICUI);
- SetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, "");
- for (size_t x = 0; x < sizeof(ids)/sizeof(ids[0]); x ++)
- ShowWindow(GetDlgItem(hwndDlg,ids[x]),SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg,IDC_OUTPUTTEXT),SW_SHOWNA);
- SetDlgItemText(hwndDlg,IDOK,"&Close");
- EnableWindow(GetDlgItem(hwndDlg,IDOK),0);
-
- makeEXE(hwndDlg);
- }
- else
- {
- tempzip_cleanup(hwndDlg,0);
- EndDialog(hwndDlg,0);
- }
- }
- break;
- }
- break;
- }
- return 0;
-}
+#include <windows.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <commctrl.h>
+
+/*
+
+version 0.35
+* drag & drop support
+
+version 0.34
+* preserve zip timestamps
+
+version 0.33
+* Added solid compression checkbox
+
+version 0.32
+* Fixed codepage problems
+
+version 0.31 (by Joost Verburg)
+* LZMA compression support
+* Fixed compression setting
+
+version 0.31 (by Joost Verburg)
+* Based on header files
+* Improved interface
+* Modern UI support
+* New script code
+* Immproved folder detection
+
+portions Copyright © 1999-2001 Miguel Garrido (mgarrido01@hotmail.com)
+
+*/
+
+extern "C"
+{
+#include "zlib/unzip.h"
+};
+#include "resource.h"
+
+const char *g_errcaption="Zip2Exe Error";
+
+HINSTANCE g_hInstance;
+HWND g_hwnd;
+HANDLE g_hThread;
+char g_cmdline[1024];
+int g_extracting;
+int g_compressor;
+int g_compressor_solid;
+int g_mui;
+int g_zipfile_size;
+
+char *g_options="";//"/V3";
+
+static BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,
+ LPSTR lpszCmdParam, int nCmdShow)
+{
+ g_hInstance=hInstance;
+
+ InitCommonControls();
+ return DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG1),GetDesktopWindow(),DlgProc);
+}
+char tempzip_path[1024];
+
+
+int made;
+
+static void doRMDir(char *buf)
+{
+ HANDLE h;
+ WIN32_FIND_DATA fd;
+ char *p=buf;
+ while (*p) p++;
+ lstrcpy(p,"\\*.*");
+ h = FindFirstFile(buf,&fd);
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ if (fd.cFileName[0] != '.' ||
+ (fd.cFileName[1] != '.' && fd.cFileName[1]))
+ {
+ lstrcpy(p+1,fd.cFileName);
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
+ SetFileAttributes(buf,fd.dwFileAttributes^FILE_ATTRIBUTE_READONLY);
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) doRMDir(buf);
+ else
+ {
+ DeleteFile(buf);
+ }
+ }
+ } while (FindNextFile(h,&fd));
+ FindClose(h);
+ }
+ p[0]=0; // fix buffer
+ RemoveDirectory(buf);
+}
+
+static void doMKDir(char *directory)
+{
+ char *p, *p2;
+ char buf[MAX_PATH];
+ if (!*directory) return;
+ lstrcpy(buf,directory);
+ p=buf; while (*p) p++;
+ while (p >= buf && *p != '\\') p--;
+ p2 = buf;
+ if (p2[1] == ':') p2+=4;
+ else if (p2[0] == '\\' && p2[1] == '\\')
+ {
+ p2+=2;
+ while (*p2 && *p2 != '\\') p2++;
+ if (*p2) p2++;
+ while (*p2 && *p2 != '\\') p2++;
+ if (*p2) p2++;
+ }
+ if (p >= p2)
+ {
+ *p=0;
+ doMKDir(buf);
+ }
+ CreateDirectory(directory,NULL);
+}
+
+
+
+void tempzip_cleanup(HWND hwndDlg, int err)
+{
+ if (tempzip_path[0]) doRMDir(tempzip_path);
+ tempzip_path[0]=0;
+ if (err)
+ {
+ SendDlgItemMessage(hwndDlg,IDC_ZIPINFO_FILES,LB_RESETCONTENT,0,0);
+ EnableWindow(GetDlgItem(hwndDlg,IDOK),0);
+ SetDlgItemText(hwndDlg,IDC_ZIPINFO_SUMMARY,"");
+ SetDlgItemText(hwndDlg,IDC_ZIPFILE,"");
+ SetDlgItemText(hwndDlg,IDC_OUTFILE,"");
+ }
+}
+
+int tempzip_make(HWND hwndDlg, char *fn)
+{
+ char buf[MAX_PATH];
+ GetTempPath(MAX_PATH,buf);
+ GetTempFileName(buf,"z2e",GetTickCount(),tempzip_path);
+ if (!CreateDirectory(tempzip_path,NULL))
+ {
+ GetTempPath(MAX_PATH,tempzip_path);
+ strcat(tempzip_path,"\\nsi");
+ if (!CreateDirectory(tempzip_path,NULL))
+ {
+ tempzip_path[0]=0;
+ MessageBox(hwndDlg,"Error creating temporary directory",g_errcaption,MB_OK|MB_ICONSTOP);
+ return 1;
+ }
+ }
+ FILE *fp=fopen(fn,"rb");
+ if (fp)
+ {
+ fseek(fp,0,SEEK_END);
+ g_zipfile_size=ftell(fp);
+ fclose(fp);
+ }
+ else g_zipfile_size=0;
+ unzFile f;
+ f = unzOpen(fn);
+ if (!f || unzGoToFirstFile(f) != UNZ_OK)
+ {
+ if (f) unzClose(f);
+ MessageBox(hwndDlg,"Error opening ZIP file",g_errcaption,MB_OK|MB_ICONSTOP);
+ return 1;
+ }
+
+ int nf=0, nkb=0;
+ g_extracting=1;
+ do {
+ char filename[MAX_PATH];
+ unz_file_info info;
+
+ unzGetCurrentFileInfo(f,&info,filename,sizeof(filename),NULL,0,NULL,0);
+
+ // was zip created on MS-DOS/Windows?
+ if ((info.version & 0xFF00) == 0)
+ {
+ OemToCharBuff(filename, filename, strlen(filename));
+ }
+
+ if (filename[0] &&
+ filename[strlen(filename)-1] != '\\' &&
+ filename[strlen(filename)-1] != '/')
+ {
+ char *pfn=filename;
+ while (*pfn)
+ {
+ if (*pfn == '/') *pfn='\\';
+ pfn++;
+ }
+ pfn=filename;
+ if (pfn[1] == ':' && pfn[2] == '\\') pfn+=3;
+ while (*pfn == '\\') pfn++;
+
+ char out_filename[1024];
+ lstrcpy(out_filename,tempzip_path);
+ lstrcat(out_filename,"\\");
+ lstrcat(out_filename,pfn);
+ if (strstr(pfn,"\\"))
+ {
+ char buf[1024];
+ lstrcpy(buf,out_filename);
+ char *p=buf+strlen(buf);
+ while (p > buf && *p != '\\') p--;
+ *p=0;
+ if (buf[0]) doMKDir(buf);
+ }
+
+ if (unzOpenCurrentFile(f) == UNZ_OK)
+ {
+ SendDlgItemMessage(hwndDlg,IDC_ZIPINFO_FILES,LB_ADDSTRING,0,(LPARAM)pfn);
+ FILE *fp;
+ int l;
+ fp = fopen(out_filename,"wb");
+ if (fp)
+ {
+ do
+ {
+ char buf[1024];
+ l=unzReadCurrentFile(f,buf,sizeof(buf));
+ if (l > 0)
+ {
+ if (fwrite(buf,1,l,fp) != (unsigned int)l)
+ {
+ unzClose(f);
+ fclose(fp);
+ MessageBox(hwndDlg,"Error writing output file(s)",g_errcaption,MB_OK|MB_ICONSTOP);
+ g_extracting=0;
+ return 1;
+ }
+ nkb++;
+ }
+ } while (l > 0);
+
+ fclose(fp);
+
+ {
+ // set file time
+ HANDLE hf = CreateFile(out_filename, GENERIC_WRITE, 0, 0, OPEN_ALWAYS, 0, 0);
+ if (hf != INVALID_HANDLE_VALUE)
+ {
+ FILETIME ft, lft;
+ DosDateTimeToFileTime(HIWORD(info.dosDate), LOWORD(info.dosDate), &ft);
+ LocalFileTimeToFileTime(&ft, &lft);
+ SetFileTime(hf, 0, 0, &lft);
+ CloseHandle(hf);
+ }
+ }
+ }
+ else
+ {
+ unzClose(f);
+ MessageBox(hwndDlg,"Error opening output file(s)",g_errcaption,MB_OK|MB_ICONSTOP);
+ g_extracting=0;
+ return 1;
+ }
+ nf++;
+ wsprintf(buf,"Extracting: %d files, %dKB",nf,nkb);
+ SetDlgItemText(hwndDlg,IDC_ZIPINFO_SUMMARY,buf);
+ MSG msg;
+ int quit=0;
+ while (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
+ {
+ if (msg.message == WM_DESTROY && msg.hwnd == g_hwnd)
+ {
+ quit++;
+ break;
+ }
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ unzCloseCurrentFile(f);
+ if (quit) break;
+ }
+ else
+ {
+ unzClose(f);
+ MessageBox(hwndDlg,"Error extracting from ZIP file",g_errcaption,MB_OK|MB_ICONSTOP);
+ g_extracting=0;
+ return 1;
+ }
+ }
+ } while (unzGoToNextFile(f) == UNZ_OK);
+
+ g_extracting=0;
+ wsprintf(buf,"Extracted: %d files, %dKB",nf,nkb);
+ SetDlgItemText(hwndDlg,IDC_ZIPINFO_SUMMARY,buf);
+ unzClose(f);
+ return 0;
+}
+
+char *gp_winamp = "(WINAMP DIRECTORY)";
+char *gp_winamp_plugins = "(WINAMP PLUG-INS DIRECTORY)";
+char *gp_winamp_vis = "(WINAMP VIS PLUG-INS DIRECTORY)";
+char *gp_winamp_dsp = "(WINAMP DSP PLUG-INS DIRECTORY)";
+char *gp_winamp_skins = "(WINAMP SKINS DIRECTORY)";
+char *gp_poi = "(PATH OF INSTALLER)";
+
+
+void wnd_printf(const char *str)
+{
+ if (!*str) return;
+ char existing_text[32000];
+ existing_text[0]=0;
+ UINT l=GetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, existing_text, 32000);
+ l+=strlen(str);
+
+ char *p=existing_text;
+ existing_text[31000]=0;
+ while (l > 31000 && *p)
+ {
+ while (*p != '\r' && *p != '\n' && *p)
+ {
+ p++;
+ l--;
+ }
+ while (*p == '\r' || *p == '\n')
+ {
+ p++;
+ l--;
+ }
+ }
+
+ char buf[31000];
+ lstrcpy(buf,p);
+ lstrcpy(existing_text,buf);
+ lstrcat(existing_text,str);
+
+ SetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, existing_text);
+ SendDlgItemMessage(g_hwnd, IDC_OUTPUTTEXT, EM_LINESCROLL, 0, SendDlgItemMessage(g_hwnd, IDC_OUTPUTTEXT, EM_GETLINECOUNT, 0, 0)); // scroll to the last line of the textbox
+
+}
+
+void ErrorMessage(char *str) //display detailed error info
+{
+ LPVOID msg;
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+ (LPTSTR) &msg,
+ 0,
+ NULL
+ );
+ wnd_printf(str);
+ wnd_printf(": ");
+ wnd_printf((char*)msg);
+ LocalFree(msg);
+}
+
+DWORD WINAPI ThreadProc(LPVOID p) // thread that will start & monitor wwwinamp
+{
+ char buf[1024]; //i/o buffer
+ STARTUPINFO si={sizeof(si),};
+ SECURITY_ATTRIBUTES sa={sizeof(sa),};
+ SECURITY_DESCRIPTOR sd={0,}; //security information for pipes
+ PROCESS_INFORMATION pi={0,};
+ HANDLE newstdout=0,read_stdout=0; //pipe handles
+
+ OSVERSIONINFO osv={sizeof(osv)};
+ GetVersionEx(&osv);
+ if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) //initialize security descriptor (Windows NT)
+ {
+ InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
+ SetSecurityDescriptorDacl(&sd, true, NULL, false);
+ sa.lpSecurityDescriptor = &sd;
+ }
+ else sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = true; //allow inheritable handles
+
+ if (!CreatePipe(&read_stdout,&newstdout,&sa,0)) //create stdout pipe
+ {
+ ErrorMessage("CreatePipe");
+ PostMessage(g_hwnd,WM_USER+1203,0,1);
+ return 1;
+ }
+
+ GetStartupInfo(&si); //set startupinfo for the spawned process
+ /*
+ The dwFlags member tells CreateProcess how to make the process.
+ STARTF_USESTDHANDLES validates the hStd* members. STARTF_USESHOWWINDOW
+ validates the wShowWindow member.
+ */
+ si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
+ si.wShowWindow = SW_HIDE;
+ si.hStdOutput = newstdout;
+ si.hStdError = newstdout; //set the new handles for the child process
+
+ // *******************************************************************
+ // If there is a command line in the config file, use it for create process
+
+ //spawn the child process
+ if (!CreateProcess(NULL,g_cmdline,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,
+ NULL,tempzip_path,&si,&pi))
+ {
+ ErrorMessage("CreateProcess");
+ wnd_printf("\r\nPlease make sure the path to makensis.exe is correct.");
+ CloseHandle(newstdout);
+ CloseHandle(read_stdout);
+ PostMessage(g_hwnd,WM_USER+1203,0,1);
+ return 1;
+ }
+
+ DWORD exit=0; //process exit code
+ DWORD bread; //bytes read
+ DWORD avail; //bytes available
+
+ memset(buf,0,sizeof(buf));
+ while (1) //main program loop
+ {
+ PeekNamedPipe(read_stdout,buf,1023,&bread,&avail,NULL);
+ //check to see if there is any data to read from stdout
+ if (bread != 0)
+ {
+ memset(buf,0,sizeof(buf));
+ if (avail > 1023)
+ {
+ while (bread >= 1023)
+ {
+ ReadFile(read_stdout,buf,1023,&bread,NULL); //read the stdout pipe
+ wnd_printf(buf);
+ memset(buf,0,sizeof(buf));
+ }
+ }
+ else
+ {
+ ReadFile(read_stdout,buf,1023,&bread,NULL);
+ wnd_printf(buf);
+ }
+ }
+
+ GetExitCodeProcess(pi.hProcess,&exit); //while the process is running
+ if (exit != STILL_ACTIVE)
+ break;
+
+ Sleep(100);
+ }
+ CloseHandle(pi.hThread);
+ CloseHandle(pi.hProcess);
+ CloseHandle(newstdout);
+ CloseHandle(read_stdout);
+
+
+ wsprintf(buf,"(source ZIP size was %d bytes)\r\n",g_zipfile_size);
+ wnd_printf(buf);
+
+ PostMessage(g_hwnd,WM_USER+1203,0,0);
+ return 0;
+}
+
+
+char nsifilename[MAX_PATH];
+
+
+
+void makeEXE(HWND hwndDlg)
+{
+ char buf[2048];
+ GetTempPath(MAX_PATH,buf);
+ GetTempFileName(buf,"zne",0,nsifilename);
+ FILE *fp=fopen(nsifilename,"w");
+ if (!fp)
+ {
+ MessageBox(hwndDlg,"Error writing .NSI file",g_errcaption,MB_OK|MB_ICONSTOP);
+ PostMessage(g_hwnd,WM_USER+1203,0,0);
+ return;
+ }
+ GetDlgItemText(hwndDlg,IDC_INSTNAME,buf,sizeof(buf));
+ fprintf(fp,"!define ZIP2EXE_NAME `%s`\n",buf);
+ GetDlgItemText(hwndDlg,IDC_OUTFILE,buf,sizeof(buf));
+ fprintf(fp,"!define ZIP2EXE_OUTFILE `%s`\n",buf);
+ if (g_compressor == 1)
+ fprintf(fp,"!define ZIP2EXE_COMPRESSOR_ZLIB\n");
+ if (g_compressor == 2)
+ fprintf(fp,"!define ZIP2EXE_COMPRESSOR_BZIP2\n");
+ if (g_compressor == 3)
+ fprintf(fp,"!define ZIP2EXE_COMPRESSOR_LZMA\n");
+ if (g_compressor_solid == 1)
+ fprintf(fp,"!define ZIP2EXE_COMPRESSOR_SOLID\n");
+ GetDlgItemText(hwndDlg,IDC_INSTPATH,buf,sizeof(buf));
+ int iswinamp=0;
+ char *iswinampmode=NULL;
+ if (!strcmp(buf,gp_poi)) lstrcpy(buf,"$EXEDIR");
+
+ if (!strcmp(buf,gp_winamp))
+ {
+ iswinamp=1;
+ }
+ if (!strcmp(buf,gp_winamp_plugins))
+ {
+ iswinamp=1;
+ fprintf(fp,"!define ZIP2EXE_INSTALLDIR_PLUGINS\n");
+ }
+ if (!strcmp(buf,gp_winamp_vis))
+ {
+ iswinamp=1;
+ iswinampmode="VisDir";
+ }
+ if (!strcmp(buf,gp_winamp_dsp))
+ {
+ iswinamp=1;
+ iswinampmode="DSPDir";
+ }
+ if (!strcmp(buf,gp_winamp_skins))
+ {
+ iswinamp=1;
+ iswinampmode="SkinDir";
+ fprintf(fp,"!define ZIP2EXE_INSTALLDIR_SKINS\n");
+ }
+
+ if (iswinamp)
+ {
+ fprintf(fp,"!define ZIP2EXE_INSTALLDIR_WINAMP\n");
+
+ if (iswinampmode)
+ {
+ fprintf(fp,"!define ZIP2EXE_INSTALLDIR_WINAMPMODE `%s`\n",iswinampmode);
+ }
+ }
+ else // set out path to $INSTDIR
+ {
+ fprintf(fp,"!define ZIP2EXE_INSTALLDIR `%s`\n",buf);
+ }
+
+ fprintf(fp,"!include `${NSISDIR}\\Contrib\\zip2exe\\Base.nsh`\n");
+ fprintf(fp,"!include `${NSISDIR}\\Contrib\\zip2exe\\%s.nsh`\n",g_mui?"Modern":"Classic");
+
+ fprintf(fp,"!insertmacro SECTION_BEGIN\n");
+ fprintf(fp,"File /r `%s\\*.*`\n",tempzip_path);
+ fprintf(fp,"!insertmacro SECTION_END\n");
+
+ fclose(fp);
+
+ char g_makensis_path[MAX_PATH];
+ char *p=g_makensis_path;
+ GetModuleFileName(g_hInstance,g_makensis_path,sizeof(g_makensis_path));
+ while (*p) p++;
+ while (p >= g_makensis_path && *p != '\\') p--;
+ strcpy(p+1,"makensis.exe");
+
+ WIN32_FIND_DATA fd;
+ HANDLE h=FindFirstFile(g_makensis_path,&fd);
+ if (h==INVALID_HANDLE_VALUE)
+ {
+ if ((p-g_makensis_path>4)&&(tolower(*(p-1))=='n')&&(tolower(*(p-2))=='i')&&(tolower(*(p-3))=='b')&&(*(p-4)=='\\'))
+ {
+ p -= 4;
+ strcpy(p+1,"makensis.exe");
+ h=FindFirstFile(g_makensis_path,&fd);
+ if (h==INVALID_HANDLE_VALUE)
+ {
+ MessageBox(hwndDlg,"Error finding makensis.exe.",g_errcaption,MB_OK|MB_ICONSTOP);
+ PostMessage(g_hwnd,WM_USER+1203,0,0);
+ return;
+ }
+ }
+ }
+ if (h!=INVALID_HANDLE_VALUE) FindClose(h);
+
+
+
+ wsprintf(g_cmdline,"\"%s\" %s \"%s\"",g_makensis_path,g_options,nsifilename);
+
+ DWORD id;
+ g_hThread=CreateThread(NULL,0,ThreadProc,0,0,&id);
+
+}
+
+void SetZip(HWND hwndDlg, char *path)
+{
+ char buf2[1024];
+ lstrcpy(buf2,path);
+ tempzip_cleanup(hwndDlg,1);
+ SetDlgItemText(hwndDlg,IDC_ZIPFILE,path);
+ char *t=path+lstrlen(path);
+ while (t > path && *t != '\\' && *t != '.') t--;
+ {
+ char *p=t;
+ while (p >= path && *p != '\\') p--;
+ p++;
+ *t=0;
+ SetDlgItemText(hwndDlg,IDC_INSTNAME,p[0]?p:"Stuff");
+ }
+ strcpy(t,".exe");
+ SetDlgItemText(hwndDlg,IDC_OUTFILE,path);
+ if (tempzip_make(hwndDlg,buf2)) tempzip_cleanup(hwndDlg,1);
+ else
+ {
+ EnableWindow(GetDlgItem(hwndDlg,IDOK),1);
+ }
+}
+
+BOOL CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ static int ids[]={IDC_INFO,IDC_NSISICON,IDC_SZIPFRAME,IDC_BROWSE,IDC_ZIPFILE,IDC_ZIPINFO_SUMMARY,IDC_ZIPINFO_FILES,IDC_OFRAME,IDC_INAMEST,
+ IDC_INSTNAME,IDC_INSTPATH,IDC_OEFST,IDC_OUTFILE,IDC_BROWSE2,IDC_COMPRESSOR,IDC_ZLIB,IDC_BZIP2,IDC_LZMA,IDC_SOLID,IDC_INTERFACE,IDC_MODERNUI,IDC_CLASSICUI};
+ static HICON hIcon;
+ static HFONT hFont;
+ if (uMsg == WM_DESTROY) { if (hIcon) DeleteObject(hIcon); hIcon=0; if (hFont) DeleteObject(hFont); hFont=0; }
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ g_hwnd=hwndDlg;
+ CheckDlgButton(hwndDlg,IDC_LZMA,BST_CHECKED);
+ CheckDlgButton(hwndDlg,IDC_MODERNUI,BST_CHECKED);
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_poi);
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$TEMP");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$SYSDIR");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$WINDIR");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$DESKTOP");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$DESKTOP\\YourNameHere");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$PROGRAMFILES\\YourNameHere");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$STARTMENU");
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)"$SMPROGRAMS");
+
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp);
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_plugins);
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_vis);
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_dsp);
+ SendDlgItemMessage(hwndDlg,IDC_INSTPATH,CB_ADDSTRING,0,(LPARAM)gp_winamp_skins);
+
+ SetDlgItemText(hwndDlg,IDC_INSTPATH,gp_poi);
+
+ hIcon=LoadIcon(g_hInstance,MAKEINTRESOURCE(IDI_ICON1));
+ SetClassLong(hwndDlg,GCL_HICON,(long)hIcon);
+
+ hFont=CreateFont(15,0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
+ OUT_CHARACTER_PRECIS,
+ CLIP_DEFAULT_PRECIS,
+ DEFAULT_QUALITY,FIXED_PITCH|FF_DONTCARE,"Courier New");
+ SendDlgItemMessage(hwndDlg,IDC_OUTPUTTEXT,WM_SETFONT,(WPARAM)hFont,0);
+
+ DragAcceptFiles(hwndDlg,TRUE);
+ return 1;
+ case WM_CLOSE:
+ if (!g_hThread)
+ {
+ tempzip_cleanup(hwndDlg,0);
+ EndDialog(hwndDlg,1);
+ }
+ break;
+ case WM_USER+1203:
+
+ if (g_hThread)
+ {
+ if (!lParam) ShowWindow(GetDlgItem(hwndDlg,IDC_TEST),SW_SHOWNA);
+ CloseHandle(g_hThread);
+ g_hThread=0;
+ }
+ made=1;
+ ShowWindow(GetDlgItem(hwndDlg,IDC_BACK),SW_SHOWNA);
+ EnableWindow(GetDlgItem(hwndDlg,IDOK),1);
+ if (nsifilename[0]) DeleteFile(nsifilename);
+ nsifilename[0]=0;
+ break;
+ case WM_DROPFILES:
+ {
+ char dropped_file[MAX_PATH]="";
+ if (DragQueryFile((HDROP)wParam,(UINT)-1,NULL,0)==1)
+ {
+ DragQueryFile((HDROP)wParam,0,dropped_file,MAX_PATH);
+ if (lstrlen(dropped_file)>0)
+ {
+ SetZip(hwndDlg,dropped_file);
+ }
+ }
+ else
+ {
+ MessageBox(hwndDlg,"Dropping more than one zip file at a time is not supported",g_errcaption,MB_OK|MB_ICONSTOP);
+ }
+ DragFinish((HDROP)wParam);
+ return TRUE;
+ }
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDC_BROWSE:
+ if (!g_extracting) {
+ OPENFILENAME l={sizeof(l),};
+ char buf[1024];
+ l.hwndOwner = hwndDlg;
+ l.lpstrFilter = "ZIP Files\0*.zip\0All Files\0*.*\0";
+ l.lpstrFile = buf;
+ l.nMaxFile = 1023;
+ l.lpstrTitle = "Open ZIP File";
+ l.lpstrDefExt = "zip";
+ l.lpstrInitialDir = NULL;
+ l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER|OFN_PATHMUSTEXIST;
+ buf[0]=0;
+ if (GetOpenFileName(&l))
+ {
+ SetZip(hwndDlg,buf);
+ }
+ }
+ break;
+ case IDC_BROWSE2:
+ {
+ OPENFILENAME l={sizeof(l),};
+ char buf[1024];
+ l.hwndOwner = hwndDlg;
+ l.lpstrFilter = "Executables\0*.exe\0All Files\0*.*\0";
+ l.lpstrFile = buf;
+ l.nMaxFile = 1023;
+ l.lpstrTitle = "Select Output EXE File";
+ l.lpstrDefExt = "exe";
+ l.lpstrInitialDir = NULL;
+ l.Flags = OFN_HIDEREADONLY|OFN_EXPLORER;
+ GetDlgItemText(hwndDlg,IDC_OUTFILE,buf,sizeof(buf));
+ if (GetSaveFileName(&l))
+ {
+ SetDlgItemText(hwndDlg,IDC_OUTFILE,buf);
+ }
+ }
+ break;
+ case IDC_BACK:
+ if (!g_hThread)
+ {
+ made=0;
+ ShowWindow(GetDlgItem(hwndDlg,IDC_BACK),SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg,IDC_TEST),SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg,IDC_OUTPUTTEXT),SW_HIDE);
+ {
+ for (size_t x = 0; x < sizeof(ids)/sizeof(ids[0]); x ++)
+ ShowWindow(GetDlgItem(hwndDlg,ids[x]),SW_SHOWNA);
+ SetDlgItemText(hwndDlg,IDOK,"&Generate");
+ EnableWindow(GetDlgItem(hwndDlg,IDOK),1);
+ }
+ }
+ break;
+ case IDC_TEST:
+ if (!g_hThread) {
+ char buf[1024];
+ GetDlgItemText(hwndDlg,IDC_OUTFILE,buf,sizeof(buf));
+ ShellExecute(hwndDlg,"open",buf,"","",SW_SHOW);
+ }
+ break;
+ case IDOK:
+ if (!g_hThread)
+ {
+ if (!made)
+ {
+ if (IsDlgButtonChecked(hwndDlg,IDC_ZLIB))
+ g_compressor = 1;
+ if (IsDlgButtonChecked(hwndDlg,IDC_BZIP2))
+ g_compressor = 2;
+ if (IsDlgButtonChecked(hwndDlg,IDC_LZMA))
+ g_compressor = 3;
+ if (IsDlgButtonChecked(hwndDlg,IDC_SOLID))
+ g_compressor_solid = 1;
+ else
+ g_compressor_solid = 0;
+ g_mui=!IsDlgButtonChecked(hwndDlg,IDC_CLASSICUI);
+ SetDlgItemText(g_hwnd, IDC_OUTPUTTEXT, "");
+ for (size_t x = 0; x < sizeof(ids)/sizeof(ids[0]); x ++)
+ ShowWindow(GetDlgItem(hwndDlg,ids[x]),SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg,IDC_OUTPUTTEXT),SW_SHOWNA);
+ SetDlgItemText(hwndDlg,IDOK,"&Close");
+ EnableWindow(GetDlgItem(hwndDlg,IDOK),0);
+
+ makeEXE(hwndDlg);
+ }
+ else
+ {
+ tempzip_cleanup(hwndDlg,0);
+ EndDialog(hwndDlg,0);
+ }
+ }
+ break;
+ }
+ break;
+ }
+ return 0;
+}
diff --git a/Contrib/zip2exe/res.rc b/Contrib/zip2exe/res.rc
index 23744a9..02d641a 100755
--- a/Contrib/zip2exe/res.rc
+++ b/Contrib/zip2exe/res.rc
@@ -1,150 +1,150 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include <winresrc.h>
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_DIALOG1 DIALOGEX 0, 0, 360, 271
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-CAPTION "Zip2Exe 0.35"
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- ICON IDI_ICON1,IDC_NSISICON,6,6,20,20
- LTEXT "Zip2Exe converts a ZIP file to a self extracting archive (a simple NSIS installer). To customize the NSIS script code, modify the header files in the 'Contrib\\zip2exe' folder.",
- IDC_INFO,36,6,312,18
- GROUPBOX "Source ZIP File",IDC_SZIPFRAME,7,31,347,101
- PUSHBUTTON "&Open...",IDC_BROWSE,18,48,54,13
- EDITTEXT IDC_ZIPFILE,78,48,264,12,ES_AUTOHSCROLL | ES_READONLY |
- NOT WS_TABSTOP
- LTEXT "",IDC_ZIPINFO_SUMMARY,18,66,324,8
- LISTBOX IDC_ZIPINFO_FILES,18,78,324,45,LBS_NOINTEGRALHEIGHT |
- LBS_NOSEL | WS_VSCROLL
- GROUPBOX "Output Installer Options",IDC_OFRAME,6,138,347,108
- LTEXT "Installer Name",IDC_INAMEST,18,156,48,8
- EDITTEXT IDC_INSTNAME,78,156,264,12,ES_AUTOHSCROLL
- LTEXT "Interface",IDC_INTERFACE,18,174,30,8
- CONTROL "Modern",IDC_MODERNUI,"Button",BS_AUTORADIOBUTTON,78,174,
- 42,12
- CONTROL "Classic",IDC_CLASSICUI,"Button",BS_AUTORADIOBUTTON,132,
- 174,42,12
- LTEXT "Default Folder",IDC_DEPST,18,192,48,8
- COMBOBOX IDC_INSTPATH,78,192,264,126,CBS_DROPDOWN | WS_VSCROLL |
- WS_TABSTOP | CBS_AUTOHSCROLL
- LTEXT "Output EXE File",IDC_OEFST,18,210,54,8
- EDITTEXT IDC_OUTFILE,78,210,204,12,ES_AUTOHSCROLL
- PUSHBUTTON "&Browse...",IDC_BROWSE2,288,210,54,13
- LTEXT "Compression",IDC_COMPRESSOR,18,228,42,8
- CONTROL "LZMA",IDC_LZMA,"Button",BS_AUTORADIOBUTTON,78,228,36,10
- CONTROL "BZip2",IDC_BZIP2,"Button",BS_AUTORADIOBUTTON,132,228,36,
- 10
- CONTROL "ZLib",IDC_ZLIB,"Button",BS_AUTORADIOBUTTON,186,228,30,
- 10
- CONTROL "Solid",IDC_SOLID,"Button",BS_AUTOCHECKBOX,240,228,30,
- 10
- DEFPUSHBUTTON "&Generate",IDOK,306,252,48,14,WS_DISABLED
- PUSHBUTTON "&Test",IDC_TEST,246,252,49,14,NOT WS_VISIBLE
- PUSHBUTTON "< &Back",IDC_BACK,6,252,48,14,NOT WS_VISIBLE
- EDITTEXT IDC_OUTPUTTEXT,0,0,359,246,ES_MULTILINE | ES_AUTOVSCROLL |
- ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE |
- WS_VSCROLL | WS_HSCROLL
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_DIALOG1, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 353
- TOPMARGIN, 7
- BOTTOMMARGIN, 264
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON1 ICON "icon.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// RT_MANIFEST
-//
-
-1 RT_MANIFEST "zip2exe.xml"
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winresrc.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG1 DIALOGEX 0, 0, 360, 271
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "Zip2Exe 0.35"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ ICON IDI_ICON1,IDC_NSISICON,6,6,20,20
+ LTEXT "Zip2Exe converts a ZIP file to a self extracting archive (a simple NSIS installer). To customize the NSIS script code, modify the header files in the 'Contrib\\zip2exe' folder.",
+ IDC_INFO,36,6,312,18
+ GROUPBOX "Source ZIP File",IDC_SZIPFRAME,7,31,347,101
+ PUSHBUTTON "&Open...",IDC_BROWSE,18,48,54,13
+ EDITTEXT IDC_ZIPFILE,78,48,264,12,ES_AUTOHSCROLL | ES_READONLY |
+ NOT WS_TABSTOP
+ LTEXT "",IDC_ZIPINFO_SUMMARY,18,66,324,8
+ LISTBOX IDC_ZIPINFO_FILES,18,78,324,45,LBS_NOINTEGRALHEIGHT |
+ LBS_NOSEL | WS_VSCROLL
+ GROUPBOX "Output Installer Options",IDC_OFRAME,6,138,347,108
+ LTEXT "Installer Name",IDC_INAMEST,18,156,48,8
+ EDITTEXT IDC_INSTNAME,78,156,264,12,ES_AUTOHSCROLL
+ LTEXT "Interface",IDC_INTERFACE,18,174,30,8
+ CONTROL "Modern",IDC_MODERNUI,"Button",BS_AUTORADIOBUTTON,78,174,
+ 42,12
+ CONTROL "Classic",IDC_CLASSICUI,"Button",BS_AUTORADIOBUTTON,132,
+ 174,42,12
+ LTEXT "Default Folder",IDC_DEPST,18,192,48,8
+ COMBOBOX IDC_INSTPATH,78,192,264,126,CBS_DROPDOWN | WS_VSCROLL |
+ WS_TABSTOP | CBS_AUTOHSCROLL
+ LTEXT "Output EXE File",IDC_OEFST,18,210,54,8
+ EDITTEXT IDC_OUTFILE,78,210,204,12,ES_AUTOHSCROLL
+ PUSHBUTTON "&Browse...",IDC_BROWSE2,288,210,54,13
+ LTEXT "Compression",IDC_COMPRESSOR,18,228,42,8
+ CONTROL "LZMA",IDC_LZMA,"Button",BS_AUTORADIOBUTTON,78,228,36,10
+ CONTROL "BZip2",IDC_BZIP2,"Button",BS_AUTORADIOBUTTON,132,228,36,
+ 10
+ CONTROL "ZLib",IDC_ZLIB,"Button",BS_AUTORADIOBUTTON,186,228,30,
+ 10
+ CONTROL "Solid",IDC_SOLID,"Button",BS_AUTOCHECKBOX,240,228,30,
+ 10
+ DEFPUSHBUTTON "&Generate",IDOK,306,252,48,14,WS_DISABLED
+ PUSHBUTTON "&Test",IDC_TEST,246,252,49,14,NOT WS_VISIBLE
+ PUSHBUTTON "< &Back",IDC_BACK,6,252,48,14,NOT WS_VISIBLE
+ EDITTEXT IDC_OUTPUTTEXT,0,0,359,246,ES_MULTILINE | ES_AUTOVSCROLL |
+ ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE |
+ WS_VSCROLL | WS_HSCROLL
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 353
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 264
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "icon.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+1 RT_MANIFEST "zip2exe.xml"
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Contrib/zip2exe/resource.h b/Contrib/zip2exe/resource.h
index 5ca952b..9b0dd8c 100755
--- a/Contrib/zip2exe/resource.h
+++ b/Contrib/zip2exe/resource.h
@@ -1,45 +1,45 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by res.rc
-//
-#define IDD_DIALOG1 101
-#define IDI_ICON1 102
-#define IDC_ZIPFILE 1000
-#define IDC_BROWSE 1001
-#define IDC_ZIPINFO_SUMMARY 1002
-#define IDC_ZIPINFO_FILES 1004
-#define IDC_INSTPATH 1005
-#define IDC_DESCTEXT 1006
-#define IDC_OUTFILE 1007
-#define IDC_BROWSE2 1008
-#define IDC_INSTNAME 1009
-#define IDC_SZIPFRAME 1010
-#define IDC_OFRAME 1011
-#define IDC_INAMEST 1012
-#define IDC_DEPST 1014
-#define IDC_OEFST 1015
-#define IDC_OUTPUTTEXT 1016
-#define IDC_TEST 1017
-#define IDC_BACK 1018
-#define IDC_COMPILER 1019
-#define IDC_ZLIB 1020
-#define IDC_MODERNUI 1021
-#define IDC_COMPRESSOR 1022
-#define IDC_INTERFACE 1023
-#define IDC_BZIP2 1024
-#define IDC_CLASSICUI 1025
-#define IDC_INFO 1026
-#define IDC_NSISICON 1027
-#define IDC_LZMA 1028
-#define IDC_SOLID 1029
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 103
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1030
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by res.rc
+//
+#define IDD_DIALOG1 101
+#define IDI_ICON1 102
+#define IDC_ZIPFILE 1000
+#define IDC_BROWSE 1001
+#define IDC_ZIPINFO_SUMMARY 1002
+#define IDC_ZIPINFO_FILES 1004
+#define IDC_INSTPATH 1005
+#define IDC_DESCTEXT 1006
+#define IDC_OUTFILE 1007
+#define IDC_BROWSE2 1008
+#define IDC_INSTNAME 1009
+#define IDC_SZIPFRAME 1010
+#define IDC_OFRAME 1011
+#define IDC_INAMEST 1012
+#define IDC_DEPST 1014
+#define IDC_OEFST 1015
+#define IDC_OUTPUTTEXT 1016
+#define IDC_TEST 1017
+#define IDC_BACK 1018
+#define IDC_COMPILER 1019
+#define IDC_ZLIB 1020
+#define IDC_MODERNUI 1021
+#define IDC_COMPRESSOR 1022
+#define IDC_INTERFACE 1023
+#define IDC_BZIP2 1024
+#define IDC_CLASSICUI 1025
+#define IDC_INFO 1026
+#define IDC_NSISICON 1027
+#define IDC_LZMA 1028
+#define IDC_SOLID 1029
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 103
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1030
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Contrib/zip2exe/zip2exe.xml b/Contrib/zip2exe/zip2exe.xml
index 97c5b9c..c905437 100755
--- a/Contrib/zip2exe/zip2exe.xml
+++ b/Contrib/zip2exe/zip2exe.xml
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Nullsoft.NSIS.Zip2Exe" type="win32"/>
-<description>Zip2Exe</description>
-<dependency>
-<dependentAssembly>
-<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
-</dependentAssembly>
-</dependency>
-<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
-<security>
-<requestedPrivileges>
-<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
-</requestedPrivileges>
-</security>
-</trustInfo>
-</assembly>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Nullsoft.NSIS.Zip2Exe" type="win32"/>
+<description>Zip2Exe</description>
+<dependency>
+<dependentAssembly>
+<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
+</dependentAssembly>
+</dependency>
+<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+<security>
+<requestedPrivileges>
+<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+</requestedPrivileges>
+</security>
+</trustInfo>
+</assembly>
diff --git a/Contrib/zip2exe/zlib/adler32.c b/Contrib/zip2exe/zlib/adler32.c
index 24957fd..007ba26 100755
--- a/Contrib/zip2exe/zlib/adler32.c
+++ b/Contrib/zip2exe/zlib/adler32.c
@@ -1,149 +1,149 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: adler32.c,v 1.2 2005/07/22 17:42:47 kichik Exp $ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#define BASE 65521UL /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
-#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf) DO8(buf,0); DO8(buf,8);
-
-/* use NO_DIVIDE if your processor does not do division in hardware */
-#ifdef NO_DIVIDE
-# define MOD(a) \
- do { \
- if (a >= (BASE << 16)) a -= (BASE << 16); \
- if (a >= (BASE << 15)) a -= (BASE << 15); \
- if (a >= (BASE << 14)) a -= (BASE << 14); \
- if (a >= (BASE << 13)) a -= (BASE << 13); \
- if (a >= (BASE << 12)) a -= (BASE << 12); \
- if (a >= (BASE << 11)) a -= (BASE << 11); \
- if (a >= (BASE << 10)) a -= (BASE << 10); \
- if (a >= (BASE << 9)) a -= (BASE << 9); \
- if (a >= (BASE << 8)) a -= (BASE << 8); \
- if (a >= (BASE << 7)) a -= (BASE << 7); \
- if (a >= (BASE << 6)) a -= (BASE << 6); \
- if (a >= (BASE << 5)) a -= (BASE << 5); \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
- if (a >= BASE) a -= BASE; \
- } while (0)
-# define MOD4(a) \
- do { \
- if (a >= (BASE << 4)) a -= (BASE << 4); \
- if (a >= (BASE << 3)) a -= (BASE << 3); \
- if (a >= (BASE << 2)) a -= (BASE << 2); \
- if (a >= (BASE << 1)) a -= (BASE << 1); \
- if (a >= BASE) a -= BASE; \
- } while (0)
-#else
-# define MOD(a) a %= BASE
-# define MOD4(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
- uLong adler;
- const Bytef *buf;
- uInt len;
-{
- unsigned long sum2;
- unsigned n;
-
- /* split Adler-32 into component sums */
- sum2 = (adler >> 16) & 0xffff;
- adler &= 0xffff;
-
- /* in case user likes doing a byte at a time, keep it fast */
- if (len == 1) {
- adler += buf[0];
- if (adler >= BASE)
- adler -= BASE;
- sum2 += adler;
- if (sum2 >= BASE)
- sum2 -= BASE;
- return adler | (sum2 << 16);
- }
-
- /* initial Adler-32 value (deferred check for len == 1 speed) */
- if (buf == Z_NULL)
- return 1L;
-
- /* in case short lengths are provided, keep it somewhat fast */
- if (len < 16) {
- while (len--) {
- adler += *buf++;
- sum2 += adler;
- }
- if (adler >= BASE)
- adler -= BASE;
- MOD4(sum2); /* only added so many BASE's */
- return adler | (sum2 << 16);
- }
-
- /* do length NMAX blocks -- requires just one modulo operation */
- while (len >= NMAX) {
- len -= NMAX;
- n = NMAX / 16; /* NMAX is divisible by 16 */
- do {
- DO16(buf); /* 16 sums unrolled */
- buf += 16;
- } while (--n);
- MOD(adler);
- MOD(sum2);
- }
-
- /* do remaining bytes (less than NMAX, still just one modulo) */
- if (len) { /* avoid modulos if none remaining */
- while (len >= 16) {
- len -= 16;
- DO16(buf);
- buf += 16;
- }
- while (len--) {
- adler += *buf++;
- sum2 += adler;
- }
- MOD(adler);
- MOD(sum2);
- }
-
- /* return recombined sums */
- return adler | (sum2 << 16);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
- uLong adler1;
- uLong adler2;
- z_off_t len2;
-{
- unsigned long sum1;
- unsigned long sum2;
- unsigned rem;
-
- /* the derivation of this formula is left as an exercise for the reader */
- rem = (unsigned)(len2 % BASE);
- sum1 = adler1 & 0xffff;
- sum2 = rem * sum1;
- MOD(sum2);
- sum1 += (adler2 & 0xffff) + BASE - 1;
- sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
- if (sum2 > BASE) sum2 -= BASE;
- return sum1 | (sum2 << 16);
-}
+/* adler32.c -- compute the Adler-32 checksum of a data stream
+ * Copyright (C) 1995-2004 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+#define BASE 65521UL /* largest prime smaller than 65536 */
+#define NMAX 5552
+/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
+
+#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
+#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
+#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
+#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
+#define DO16(buf) DO8(buf,0); DO8(buf,8);
+
+/* use NO_DIVIDE if your processor does not do division in hardware */
+#ifdef NO_DIVIDE
+# define MOD(a) \
+ do { \
+ if (a >= (BASE << 16)) a -= (BASE << 16); \
+ if (a >= (BASE << 15)) a -= (BASE << 15); \
+ if (a >= (BASE << 14)) a -= (BASE << 14); \
+ if (a >= (BASE << 13)) a -= (BASE << 13); \
+ if (a >= (BASE << 12)) a -= (BASE << 12); \
+ if (a >= (BASE << 11)) a -= (BASE << 11); \
+ if (a >= (BASE << 10)) a -= (BASE << 10); \
+ if (a >= (BASE << 9)) a -= (BASE << 9); \
+ if (a >= (BASE << 8)) a -= (BASE << 8); \
+ if (a >= (BASE << 7)) a -= (BASE << 7); \
+ if (a >= (BASE << 6)) a -= (BASE << 6); \
+ if (a >= (BASE << 5)) a -= (BASE << 5); \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+# define MOD4(a) \
+ do { \
+ if (a >= (BASE << 4)) a -= (BASE << 4); \
+ if (a >= (BASE << 3)) a -= (BASE << 3); \
+ if (a >= (BASE << 2)) a -= (BASE << 2); \
+ if (a >= (BASE << 1)) a -= (BASE << 1); \
+ if (a >= BASE) a -= BASE; \
+ } while (0)
+#else
+# define MOD(a) a %= BASE
+# define MOD4(a) a %= BASE
+#endif
+
+/* ========================================================================= */
+uLong ZEXPORT adler32(adler, buf, len)
+ uLong adler;
+ const Bytef *buf;
+ uInt len;
+{
+ unsigned long sum2;
+ unsigned n;
+
+ /* split Adler-32 into component sums */
+ sum2 = (adler >> 16) & 0xffff;
+ adler &= 0xffff;
+
+ /* in case user likes doing a byte at a time, keep it fast */
+ if (len == 1) {
+ adler += buf[0];
+ if (adler >= BASE)
+ adler -= BASE;
+ sum2 += adler;
+ if (sum2 >= BASE)
+ sum2 -= BASE;
+ return adler | (sum2 << 16);
+ }
+
+ /* initial Adler-32 value (deferred check for len == 1 speed) */
+ if (buf == Z_NULL)
+ return 1L;
+
+ /* in case short lengths are provided, keep it somewhat fast */
+ if (len < 16) {
+ while (len--) {
+ adler += *buf++;
+ sum2 += adler;
+ }
+ if (adler >= BASE)
+ adler -= BASE;
+ MOD4(sum2); /* only added so many BASE's */
+ return adler | (sum2 << 16);
+ }
+
+ /* do length NMAX blocks -- requires just one modulo operation */
+ while (len >= NMAX) {
+ len -= NMAX;
+ n = NMAX / 16; /* NMAX is divisible by 16 */
+ do {
+ DO16(buf); /* 16 sums unrolled */
+ buf += 16;
+ } while (--n);
+ MOD(adler);
+ MOD(sum2);
+ }
+
+ /* do remaining bytes (less than NMAX, still just one modulo) */
+ if (len) { /* avoid modulos if none remaining */
+ while (len >= 16) {
+ len -= 16;
+ DO16(buf);
+ buf += 16;
+ }
+ while (len--) {
+ adler += *buf++;
+ sum2 += adler;
+ }
+ MOD(adler);
+ MOD(sum2);
+ }
+
+ /* return recombined sums */
+ return adler | (sum2 << 16);
+}
+
+/* ========================================================================= */
+uLong ZEXPORT adler32_combine(adler1, adler2, len2)
+ uLong adler1;
+ uLong adler2;
+ z_off_t len2;
+{
+ unsigned long sum1;
+ unsigned long sum2;
+ unsigned rem;
+
+ /* the derivation of this formula is left as an exercise for the reader */
+ rem = (unsigned)(len2 % BASE);
+ sum1 = adler1 & 0xffff;
+ sum2 = rem * sum1;
+ MOD(sum2);
+ sum1 += (adler2 & 0xffff) + BASE - 1;
+ sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
+ if (sum1 > BASE) sum1 -= BASE;
+ if (sum1 > BASE) sum1 -= BASE;
+ if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
+ if (sum2 > BASE) sum2 -= BASE;
+ return sum1 | (sum2 << 16);
+}
diff --git a/Contrib/zip2exe/zlib/crc32.c b/Contrib/zip2exe/zlib/crc32.c
index d0abbd6..f658a9e 100755
--- a/Contrib/zip2exe/zlib/crc32.c
+++ b/Contrib/zip2exe/zlib/crc32.c
@@ -1,423 +1,423 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
- * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
- * tables for updating the shift register in one step with three exclusive-ors
- * instead of four steps with four exclusive-ors. This results in about a
- * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
- */
-
-/* @(#) $Id: crc32.c,v 1.2 2005/07/22 17:42:47 kichik Exp $ */
-
-/*
- Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
- protection on the static variables used to control the first-use generation
- of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
- first call get_crc_table() to initialize the tables before allowing more than
- one thread to use crc32().
- */
-
-#ifdef MAKECRCH
-# include <stdio.h>
-# ifndef DYNAMIC_CRC_TABLE
-# define DYNAMIC_CRC_TABLE
-# endif /* !DYNAMIC_CRC_TABLE */
-#endif /* MAKECRCH */
-
-#include "zutil.h" /* for STDC and FAR definitions */
-
-#define local static
-
-/* Find a four-byte integer type for crc32_little() and crc32_big(). */
-#ifndef NOBYFOUR
-# ifdef STDC /* need ANSI C limits.h to determine sizes */
-# include <limits.h>
-# define BYFOUR
-# if (UINT_MAX == 0xffffffffUL)
- typedef unsigned int u4;
-# else
-# if (ULONG_MAX == 0xffffffffUL)
- typedef unsigned long u4;
-# else
-# if (USHRT_MAX == 0xffffffffUL)
- typedef unsigned short u4;
-# else
-# undef BYFOUR /* can't find a four-byte integer type! */
-# endif
-# endif
-# endif
-# endif /* STDC */
-#endif /* !NOBYFOUR */
-
-/* Definitions for doing the crc four data bytes at a time. */
-#ifdef BYFOUR
-# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
- (((w)&0xff00)<<8)+(((w)&0xff)<<24))
- local unsigned long crc32_little OF((unsigned long,
- const unsigned char FAR *, unsigned));
- local unsigned long crc32_big OF((unsigned long,
- const unsigned char FAR *, unsigned));
-# define TBLS 8
-#else
-# define TBLS 1
-#endif /* BYFOUR */
-
-/* Local functions for crc concatenation */
-local unsigned long gf2_matrix_times OF((unsigned long *mat,
- unsigned long vec));
-local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local volatile int crc_table_empty = 1;
-local unsigned long FAR crc_table[TBLS][256];
-local void make_crc_table OF((void));
-#ifdef MAKECRCH
- local void write_table OF((FILE *, const unsigned long FAR *));
-#endif /* MAKECRCH */
-/*
- Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
- x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
- Polynomials over GF(2) are represented in binary, one bit per coefficient,
- with the lowest powers in the most significant bit. Then adding polynomials
- is just exclusive-or, and multiplying a polynomial by x is a right shift by
- one. If we call the above polynomial p, and represent a byte as the
- polynomial q, also with the lowest power in the most significant bit (so the
- byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
- where a mod b means the remainder after dividing a by b.
-
- This calculation is done using the shift-register method of multiplying and
- taking the remainder. The register is initialized to zero, and for each
- incoming bit, x^32 is added mod p to the register if the bit is a one (where
- x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
- x (which is shifting right by one and adding x^32 mod p if the bit shifted
- out is a one). We start with the highest power (least significant bit) of
- q and repeat for all eight bits of q.
-
- The first table is simply the CRC of all possible eight bit values. This is
- all the information needed to generate CRCs on data a byte at a time for all
- combinations of CRC register values and incoming bytes. The remaining tables
- allow for word-at-a-time CRC calculation for both big-endian and little-
- endian machines, where a word is four bytes.
-*/
-local void make_crc_table()
-{
- unsigned long c;
- int n, k;
- unsigned long poly; /* polynomial exclusive-or pattern */
- /* terms of polynomial defining this crc (except x^32): */
- static volatile int first = 1; /* flag to limit concurrent making */
- static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
- /* See if another task is already doing this (not thread-safe, but better
- than nothing -- significantly reduces duration of vulnerability in
- case the advice about DYNAMIC_CRC_TABLE is ignored) */
- if (first) {
- first = 0;
-
- /* make exclusive-or pattern from polynomial (0xedb88320UL) */
- poly = 0UL;
- for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
- poly |= 1UL << (31 - p[n]);
-
- /* generate a crc for every 8-bit value */
- for (n = 0; n < 256; n++) {
- c = (unsigned long)n;
- for (k = 0; k < 8; k++)
- c = c & 1 ? poly ^ (c >> 1) : c >> 1;
- crc_table[0][n] = c;
- }
-
-#ifdef BYFOUR
- /* generate crc for each value followed by one, two, and three zeros,
- and then the byte reversal of those as well as the first table */
- for (n = 0; n < 256; n++) {
- c = crc_table[0][n];
- crc_table[4][n] = REV(c);
- for (k = 1; k < 4; k++) {
- c = crc_table[0][c & 0xff] ^ (c >> 8);
- crc_table[k][n] = c;
- crc_table[k + 4][n] = REV(c);
- }
- }
-#endif /* BYFOUR */
-
- crc_table_empty = 0;
- }
- else { /* not first */
- /* wait for the other guy to finish (not efficient, but rare) */
- while (crc_table_empty)
- ;
- }
-
-#ifdef MAKECRCH
- /* write out CRC tables to crc32.h */
- {
- FILE *out;
-
- out = fopen("crc32.h", "w");
- if (out == NULL) return;
- fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
- fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
- fprintf(out, "local const unsigned long FAR ");
- fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
- write_table(out, crc_table[0]);
-# ifdef BYFOUR
- fprintf(out, "#ifdef BYFOUR\n");
- for (k = 1; k < 8; k++) {
- fprintf(out, " },\n {\n");
- write_table(out, crc_table[k]);
- }
- fprintf(out, "#endif\n");
-# endif /* BYFOUR */
- fprintf(out, " }\n};\n");
- fclose(out);
- }
-#endif /* MAKECRCH */
-}
-
-#ifdef MAKECRCH
-local void write_table(out, table)
- FILE *out;
- const unsigned long FAR *table;
-{
- int n;
-
- for (n = 0; n < 256; n++)
- fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
- n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
-}
-#endif /* MAKECRCH */
-
-#else /* !DYNAMIC_CRC_TABLE */
-/* ========================================================================
- * Tables of CRC-32s of all single-byte values, made by make_crc_table().
- */
-#include "crc32.h"
-#endif /* DYNAMIC_CRC_TABLE */
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const unsigned long FAR * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty)
- make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
- return (const unsigned long FAR *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
-#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
-
-/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
-{
- if (buf == Z_NULL) return 0UL;
-
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty)
- make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-
-#ifdef BYFOUR
- if (sizeof(void *) == sizeof(ptrdiff_t)) {
- u4 endian;
-
- endian = 1;
- if (*((unsigned char *)(&endian)))
- return crc32_little(crc, buf, len);
- else
- return crc32_big(crc, buf, len);
- }
-#endif /* BYFOUR */
- crc = crc ^ 0xffffffffUL;
- while (len >= 8) {
- DO8;
- len -= 8;
- }
- if (len) do {
- DO1;
- } while (--len);
- return crc ^ 0xffffffffUL;
-}
-
-#ifdef BYFOUR
-
-/* ========================================================================= */
-#define DOLIT4 c ^= *buf4++; \
- c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
- crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-
-/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
-{
- register u4 c;
- register const u4 FAR *buf4;
-
- c = (u4)crc;
- c = ~c;
- while (len && ((ptrdiff_t)buf & 3)) {
- c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
- len--;
- }
-
- buf4 = (const u4 FAR *)(const void FAR *)buf;
- while (len >= 32) {
- DOLIT32;
- len -= 32;
- }
- while (len >= 4) {
- DOLIT4;
- len -= 4;
- }
- buf = (const unsigned char FAR *)buf4;
-
- if (len) do {
- c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
- } while (--len);
- c = ~c;
- return (unsigned long)c;
-}
-
-/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
- c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
- crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-
-/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
-{
- register u4 c;
- register const u4 FAR *buf4;
-
- c = REV((u4)crc);
- c = ~c;
- while (len && ((ptrdiff_t)buf & 3)) {
- c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
- len--;
- }
-
- buf4 = (const u4 FAR *)(const void FAR *)buf;
- buf4--;
- while (len >= 32) {
- DOBIG32;
- len -= 32;
- }
- while (len >= 4) {
- DOBIG4;
- len -= 4;
- }
- buf4++;
- buf = (const unsigned char FAR *)buf4;
-
- if (len) do {
- c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
- } while (--len);
- c = ~c;
- return (unsigned long)(REV(c));
-}
-
-#endif /* BYFOUR */
-
-#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
-
-/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
- unsigned long *mat;
- unsigned long vec;
-{
- unsigned long sum;
-
- sum = 0;
- while (vec) {
- if (vec & 1)
- sum ^= *mat;
- vec >>= 1;
- mat++;
- }
- return sum;
-}
-
-/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
- unsigned long *square;
- unsigned long *mat;
-{
- int n;
-
- for (n = 0; n < GF2_DIM; n++)
- square[n] = gf2_matrix_times(mat, mat[n]);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
- uLong crc1;
- uLong crc2;
- z_off_t len2;
-{
- int n;
- unsigned long row;
- unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */
- unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */
-
- /* degenerate case */
- if (len2 == 0)
- return crc1;
-
- /* put operator for one zero bit in odd */
- odd[0] = 0xedb88320L; /* CRC-32 polynomial */
- row = 1;
- for (n = 1; n < GF2_DIM; n++) {
- odd[n] = row;
- row <<= 1;
- }
-
- /* put operator for two zero bits in even */
- gf2_matrix_square(even, odd);
-
- /* put operator for four zero bits in odd */
- gf2_matrix_square(odd, even);
-
- /* apply len2 zeros to crc1 (first square will put the operator for one
- zero byte, eight zero bits, in even) */
- do {
- /* apply zeros operator for this bit of len2 */
- gf2_matrix_square(even, odd);
- if (len2 & 1)
- crc1 = gf2_matrix_times(even, crc1);
- len2 >>= 1;
-
- /* if no more bits set, then done */
- if (len2 == 0)
- break;
-
- /* another iteration of the loop with odd and even swapped */
- gf2_matrix_square(odd, even);
- if (len2 & 1)
- crc1 = gf2_matrix_times(odd, crc1);
- len2 >>= 1;
-
- /* if no more bits set, then done */
- } while (len2 != 0);
-
- /* return combined crc */
- crc1 ^= crc2;
- return crc1;
-}
+/* crc32.c -- compute the CRC-32 of a data stream
+ * Copyright (C) 1995-2005 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ *
+ * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
+ * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
+ * tables for updating the shift register in one step with three exclusive-ors
+ * instead of four steps with four exclusive-ors. This results in about a
+ * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
+ */
+
+/* @(#) $Id$ */
+
+/*
+ Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
+ protection on the static variables used to control the first-use generation
+ of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
+ first call get_crc_table() to initialize the tables before allowing more than
+ one thread to use crc32().
+ */
+
+#ifdef MAKECRCH
+# include <stdio.h>
+# ifndef DYNAMIC_CRC_TABLE
+# define DYNAMIC_CRC_TABLE
+# endif /* !DYNAMIC_CRC_TABLE */
+#endif /* MAKECRCH */
+
+#include "zutil.h" /* for STDC and FAR definitions */
+
+#define local static
+
+/* Find a four-byte integer type for crc32_little() and crc32_big(). */
+#ifndef NOBYFOUR
+# ifdef STDC /* need ANSI C limits.h to determine sizes */
+# include <limits.h>
+# define BYFOUR
+# if (UINT_MAX == 0xffffffffUL)
+ typedef unsigned int u4;
+# else
+# if (ULONG_MAX == 0xffffffffUL)
+ typedef unsigned long u4;
+# else
+# if (USHRT_MAX == 0xffffffffUL)
+ typedef unsigned short u4;
+# else
+# undef BYFOUR /* can't find a four-byte integer type! */
+# endif
+# endif
+# endif
+# endif /* STDC */
+#endif /* !NOBYFOUR */
+
+/* Definitions for doing the crc four data bytes at a time. */
+#ifdef BYFOUR
+# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
+ (((w)&0xff00)<<8)+(((w)&0xff)<<24))
+ local unsigned long crc32_little OF((unsigned long,
+ const unsigned char FAR *, unsigned));
+ local unsigned long crc32_big OF((unsigned long,
+ const unsigned char FAR *, unsigned));
+# define TBLS 8
+#else
+# define TBLS 1
+#endif /* BYFOUR */
+
+/* Local functions for crc concatenation */
+local unsigned long gf2_matrix_times OF((unsigned long *mat,
+ unsigned long vec));
+local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
+
+#ifdef DYNAMIC_CRC_TABLE
+
+local volatile int crc_table_empty = 1;
+local unsigned long FAR crc_table[TBLS][256];
+local void make_crc_table OF((void));
+#ifdef MAKECRCH
+ local void write_table OF((FILE *, const unsigned long FAR *));
+#endif /* MAKECRCH */
+/*
+ Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
+ x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
+
+ Polynomials over GF(2) are represented in binary, one bit per coefficient,
+ with the lowest powers in the most significant bit. Then adding polynomials
+ is just exclusive-or, and multiplying a polynomial by x is a right shift by
+ one. If we call the above polynomial p, and represent a byte as the
+ polynomial q, also with the lowest power in the most significant bit (so the
+ byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
+ where a mod b means the remainder after dividing a by b.
+
+ This calculation is done using the shift-register method of multiplying and
+ taking the remainder. The register is initialized to zero, and for each
+ incoming bit, x^32 is added mod p to the register if the bit is a one (where
+ x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
+ x (which is shifting right by one and adding x^32 mod p if the bit shifted
+ out is a one). We start with the highest power (least significant bit) of
+ q and repeat for all eight bits of q.
+
+ The first table is simply the CRC of all possible eight bit values. This is
+ all the information needed to generate CRCs on data a byte at a time for all
+ combinations of CRC register values and incoming bytes. The remaining tables
+ allow for word-at-a-time CRC calculation for both big-endian and little-
+ endian machines, where a word is four bytes.
+*/
+local void make_crc_table()
+{
+ unsigned long c;
+ int n, k;
+ unsigned long poly; /* polynomial exclusive-or pattern */
+ /* terms of polynomial defining this crc (except x^32): */
+ static volatile int first = 1; /* flag to limit concurrent making */
+ static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
+
+ /* See if another task is already doing this (not thread-safe, but better
+ than nothing -- significantly reduces duration of vulnerability in
+ case the advice about DYNAMIC_CRC_TABLE is ignored) */
+ if (first) {
+ first = 0;
+
+ /* make exclusive-or pattern from polynomial (0xedb88320UL) */
+ poly = 0UL;
+ for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
+ poly |= 1UL << (31 - p[n]);
+
+ /* generate a crc for every 8-bit value */
+ for (n = 0; n < 256; n++) {
+ c = (unsigned long)n;
+ for (k = 0; k < 8; k++)
+ c = c & 1 ? poly ^ (c >> 1) : c >> 1;
+ crc_table[0][n] = c;
+ }
+
+#ifdef BYFOUR
+ /* generate crc for each value followed by one, two, and three zeros,
+ and then the byte reversal of those as well as the first table */
+ for (n = 0; n < 256; n++) {
+ c = crc_table[0][n];
+ crc_table[4][n] = REV(c);
+ for (k = 1; k < 4; k++) {
+ c = crc_table[0][c & 0xff] ^ (c >> 8);
+ crc_table[k][n] = c;
+ crc_table[k + 4][n] = REV(c);
+ }
+ }
+#endif /* BYFOUR */
+
+ crc_table_empty = 0;
+ }
+ else { /* not first */
+ /* wait for the other guy to finish (not efficient, but rare) */
+ while (crc_table_empty)
+ ;
+ }
+
+#ifdef MAKECRCH
+ /* write out CRC tables to crc32.h */
+ {
+ FILE *out;
+
+ out = fopen("crc32.h", "w");
+ if (out == NULL) return;
+ fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
+ fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
+ fprintf(out, "local const unsigned long FAR ");
+ fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
+ write_table(out, crc_table[0]);
+# ifdef BYFOUR
+ fprintf(out, "#ifdef BYFOUR\n");
+ for (k = 1; k < 8; k++) {
+ fprintf(out, " },\n {\n");
+ write_table(out, crc_table[k]);
+ }
+ fprintf(out, "#endif\n");
+# endif /* BYFOUR */
+ fprintf(out, " }\n};\n");
+ fclose(out);
+ }
+#endif /* MAKECRCH */
+}
+
+#ifdef MAKECRCH
+local void write_table(out, table)
+ FILE *out;
+ const unsigned long FAR *table;
+{
+ int n;
+
+ for (n = 0; n < 256; n++)
+ fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
+ n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
+}
+#endif /* MAKECRCH */
+
+#else /* !DYNAMIC_CRC_TABLE */
+/* ========================================================================
+ * Tables of CRC-32s of all single-byte values, made by make_crc_table().
+ */
+#include "crc32.h"
+#endif /* DYNAMIC_CRC_TABLE */
+
+/* =========================================================================
+ * This function can be used by asm versions of crc32()
+ */
+const unsigned long FAR * ZEXPORT get_crc_table()
+{
+#ifdef DYNAMIC_CRC_TABLE
+ if (crc_table_empty)
+ make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+ return (const unsigned long FAR *)crc_table;
+}
+
+/* ========================================================================= */
+#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
+#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
+
+/* ========================================================================= */
+unsigned long ZEXPORT crc32(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ if (buf == Z_NULL) return 0UL;
+
+#ifdef DYNAMIC_CRC_TABLE
+ if (crc_table_empty)
+ make_crc_table();
+#endif /* DYNAMIC_CRC_TABLE */
+
+#ifdef BYFOUR
+ if (sizeof(void *) == sizeof(ptrdiff_t)) {
+ u4 endian;
+
+ endian = 1;
+ if (*((unsigned char *)(&endian)))
+ return crc32_little(crc, buf, len);
+ else
+ return crc32_big(crc, buf, len);
+ }
+#endif /* BYFOUR */
+ crc = crc ^ 0xffffffffUL;
+ while (len >= 8) {
+ DO8;
+ len -= 8;
+ }
+ if (len) do {
+ DO1;
+ } while (--len);
+ return crc ^ 0xffffffffUL;
+}
+
+#ifdef BYFOUR
+
+/* ========================================================================= */
+#define DOLIT4 c ^= *buf4++; \
+ c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
+ crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
+#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
+
+/* ========================================================================= */
+local unsigned long crc32_little(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ register u4 c;
+ register const u4 FAR *buf4;
+
+ c = (u4)crc;
+ c = ~c;
+ while (len && ((ptrdiff_t)buf & 3)) {
+ c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
+ len--;
+ }
+
+ buf4 = (const u4 FAR *)(const void FAR *)buf;
+ while (len >= 32) {
+ DOLIT32;
+ len -= 32;
+ }
+ while (len >= 4) {
+ DOLIT4;
+ len -= 4;
+ }
+ buf = (const unsigned char FAR *)buf4;
+
+ if (len) do {
+ c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
+ } while (--len);
+ c = ~c;
+ return (unsigned long)c;
+}
+
+/* ========================================================================= */
+#define DOBIG4 c ^= *++buf4; \
+ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
+ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
+#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
+
+/* ========================================================================= */
+local unsigned long crc32_big(crc, buf, len)
+ unsigned long crc;
+ const unsigned char FAR *buf;
+ unsigned len;
+{
+ register u4 c;
+ register const u4 FAR *buf4;
+
+ c = REV((u4)crc);
+ c = ~c;
+ while (len && ((ptrdiff_t)buf & 3)) {
+ c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
+ len--;
+ }
+
+ buf4 = (const u4 FAR *)(const void FAR *)buf;
+ buf4--;
+ while (len >= 32) {
+ DOBIG32;
+ len -= 32;
+ }
+ while (len >= 4) {
+ DOBIG4;
+ len -= 4;
+ }
+ buf4++;
+ buf = (const unsigned char FAR *)buf4;
+
+ if (len) do {
+ c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
+ } while (--len);
+ c = ~c;
+ return (unsigned long)(REV(c));
+}
+
+#endif /* BYFOUR */
+
+#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
+
+/* ========================================================================= */
+local unsigned long gf2_matrix_times(mat, vec)
+ unsigned long *mat;
+ unsigned long vec;
+{
+ unsigned long sum;
+
+ sum = 0;
+ while (vec) {
+ if (vec & 1)
+ sum ^= *mat;
+ vec >>= 1;
+ mat++;
+ }
+ return sum;
+}
+
+/* ========================================================================= */
+local void gf2_matrix_square(square, mat)
+ unsigned long *square;
+ unsigned long *mat;
+{
+ int n;
+
+ for (n = 0; n < GF2_DIM; n++)
+ square[n] = gf2_matrix_times(mat, mat[n]);
+}
+
+/* ========================================================================= */
+uLong ZEXPORT crc32_combine(crc1, crc2, len2)
+ uLong crc1;
+ uLong crc2;
+ z_off_t len2;
+{
+ int n;
+ unsigned long row;
+ unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */
+ unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */
+
+ /* degenerate case */
+ if (len2 == 0)
+ return crc1;
+
+ /* put operator for one zero bit in odd */
+ odd[0] = 0xedb88320L; /* CRC-32 polynomial */
+ row = 1;
+ for (n = 1; n < GF2_DIM; n++) {
+ odd[n] = row;
+ row <<= 1;
+ }
+
+ /* put operator for two zero bits in even */
+ gf2_matrix_square(even, odd);
+
+ /* put operator for four zero bits in odd */
+ gf2_matrix_square(odd, even);
+
+ /* apply len2 zeros to crc1 (first square will put the operator for one
+ zero byte, eight zero bits, in even) */
+ do {
+ /* apply zeros operator for this bit of len2 */
+ gf2_matrix_square(even, odd);
+ if (len2 & 1)
+ crc1 = gf2_matrix_times(even, crc1);
+ len2 >>= 1;
+
+ /* if no more bits set, then done */
+ if (len2 == 0)
+ break;
+
+ /* another iteration of the loop with odd and even swapped */
+ gf2_matrix_square(odd, even);
+ if (len2 & 1)
+ crc1 = gf2_matrix_times(odd, crc1);
+ len2 >>= 1;
+
+ /* if no more bits set, then done */
+ } while (len2 != 0);
+
+ /* return combined crc */
+ crc1 ^= crc2;
+ return crc1;
+}
diff --git a/Contrib/zip2exe/zlib/crc32.h b/Contrib/zip2exe/zlib/crc32.h
index 5de49bc..8053b61 100755
--- a/Contrib/zip2exe/zlib/crc32.h
+++ b/Contrib/zip2exe/zlib/crc32.h
@@ -1,441 +1,441 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const unsigned long FAR crc_table[TBLS][256] =
-{
- {
- 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
- 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
- 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
- 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
- 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
- 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
- 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
- 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
- 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
- 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
- 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
- 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
- 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
- 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
- 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
- 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
- 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
- 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
- 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
- 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
- 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
- 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
- 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
- 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
- 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
- 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
- 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
- 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
- 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
- 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
- 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
- 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
- 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
- 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
- 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
- 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
- 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
- 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
- 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
- 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
- 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
- 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
- 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
- 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
- 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
- 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
- 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
- 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
- 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
- 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
- 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
- 0x2d02ef8dUL
-#ifdef BYFOUR
- },
- {
- 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
- 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
- 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
- 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
- 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
- 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
- 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
- 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
- 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
- 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
- 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
- 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
- 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
- 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
- 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
- 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
- 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
- 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
- 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
- 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
- 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
- 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
- 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
- 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
- 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
- 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
- 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
- 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
- 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
- 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
- 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
- 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
- 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
- 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
- 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
- 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
- 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
- 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
- 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
- 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
- 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
- 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
- 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
- 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
- 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
- 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
- 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
- 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
- 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
- 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
- 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
- 0x9324fd72UL
- },
- {
- 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
- 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
- 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
- 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
- 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
- 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
- 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
- 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
- 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
- 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
- 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
- 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
- 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
- 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
- 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
- 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
- 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
- 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
- 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
- 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
- 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
- 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
- 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
- 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
- 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
- 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
- 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
- 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
- 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
- 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
- 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
- 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
- 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
- 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
- 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
- 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
- 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
- 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
- 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
- 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
- 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
- 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
- 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
- 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
- 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
- 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
- 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
- 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
- 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
- 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
- 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
- 0xbe9834edUL
- },
- {
- 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
- 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
- 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
- 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
- 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
- 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
- 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
- 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
- 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
- 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
- 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
- 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
- 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
- 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
- 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
- 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
- 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
- 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
- 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
- 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
- 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
- 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
- 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
- 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
- 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
- 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
- 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
- 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
- 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
- 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
- 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
- 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
- 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
- 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
- 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
- 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
- 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
- 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
- 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
- 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
- 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
- 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
- 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
- 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
- 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
- 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
- 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
- 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
- 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
- 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
- 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
- 0xde0506f1UL
- },
- {
- 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
- 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
- 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
- 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
- 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
- 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
- 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
- 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
- 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
- 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
- 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
- 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
- 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
- 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
- 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
- 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
- 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
- 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
- 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
- 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
- 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
- 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
- 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
- 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
- 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
- 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
- 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
- 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
- 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
- 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
- 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
- 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
- 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
- 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
- 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
- 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
- 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
- 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
- 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
- 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
- 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
- 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
- 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
- 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
- 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
- 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
- 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
- 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
- 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
- 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
- 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
- 0x8def022dUL
- },
- {
- 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
- 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
- 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
- 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
- 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
- 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
- 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
- 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
- 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
- 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
- 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
- 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
- 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
- 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
- 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
- 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
- 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
- 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
- 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
- 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
- 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
- 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
- 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
- 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
- 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
- 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
- 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
- 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
- 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
- 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
- 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
- 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
- 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
- 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
- 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
- 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
- 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
- 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
- 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
- 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
- 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
- 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
- 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
- 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
- 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
- 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
- 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
- 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
- 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
- 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
- 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
- 0x72fd2493UL
- },
- {
- 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
- 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
- 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
- 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
- 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
- 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
- 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
- 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
- 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
- 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
- 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
- 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
- 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
- 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
- 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
- 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
- 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
- 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
- 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
- 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
- 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
- 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
- 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
- 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
- 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
- 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
- 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
- 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
- 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
- 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
- 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
- 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
- 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
- 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
- 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
- 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
- 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
- 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
- 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
- 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
- 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
- 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
- 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
- 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
- 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
- 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
- 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
- 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
- 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
- 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
- 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
- 0xed3498beUL
- },
- {
- 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
- 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
- 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
- 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
- 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
- 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
- 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
- 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
- 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
- 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
- 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
- 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
- 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
- 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
- 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
- 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
- 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
- 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
- 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
- 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
- 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
- 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
- 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
- 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
- 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
- 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
- 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
- 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
- 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
- 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
- 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
- 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
- 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
- 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
- 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
- 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
- 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
- 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
- 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
- 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
- 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
- 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
- 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
- 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
- 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
- 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
- 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
- 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
- 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
- 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
- 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
- 0xf10605deUL
-#endif
- }
-};
+/* crc32.h -- tables for rapid CRC calculation
+ * Generated automatically by crc32.c
+ */
+
+local const unsigned long FAR crc_table[TBLS][256] =
+{
+ {
+ 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
+ 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
+ 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
+ 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
+ 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
+ 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
+ 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
+ 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
+ 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
+ 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
+ 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
+ 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
+ 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
+ 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
+ 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
+ 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
+ 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
+ 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
+ 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
+ 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
+ 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
+ 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
+ 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
+ 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
+ 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
+ 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
+ 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
+ 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
+ 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
+ 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
+ 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
+ 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
+ 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
+ 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
+ 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
+ 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
+ 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
+ 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
+ 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
+ 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
+ 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
+ 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
+ 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
+ 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
+ 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
+ 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
+ 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
+ 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
+ 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
+ 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
+ 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
+ 0x2d02ef8dUL
+#ifdef BYFOUR
+ },
+ {
+ 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
+ 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
+ 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
+ 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
+ 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
+ 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
+ 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
+ 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
+ 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
+ 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
+ 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
+ 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
+ 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
+ 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
+ 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
+ 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
+ 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
+ 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
+ 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
+ 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
+ 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
+ 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
+ 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
+ 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
+ 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
+ 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
+ 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
+ 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
+ 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
+ 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
+ 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
+ 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
+ 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
+ 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
+ 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
+ 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
+ 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
+ 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
+ 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
+ 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
+ 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
+ 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
+ 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
+ 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
+ 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
+ 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
+ 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
+ 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
+ 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
+ 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
+ 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
+ 0x9324fd72UL
+ },
+ {
+ 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
+ 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
+ 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
+ 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
+ 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
+ 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
+ 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
+ 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
+ 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
+ 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
+ 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
+ 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
+ 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
+ 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
+ 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
+ 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
+ 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
+ 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
+ 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
+ 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
+ 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
+ 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
+ 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
+ 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
+ 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
+ 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
+ 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
+ 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
+ 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
+ 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
+ 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
+ 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
+ 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
+ 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
+ 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
+ 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
+ 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
+ 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
+ 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
+ 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
+ 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
+ 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
+ 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
+ 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
+ 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
+ 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
+ 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
+ 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
+ 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
+ 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
+ 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
+ 0xbe9834edUL
+ },
+ {
+ 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
+ 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
+ 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
+ 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
+ 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
+ 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
+ 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
+ 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
+ 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
+ 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
+ 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
+ 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
+ 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
+ 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
+ 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
+ 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
+ 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
+ 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
+ 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
+ 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
+ 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
+ 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
+ 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
+ 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
+ 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
+ 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
+ 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
+ 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
+ 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
+ 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
+ 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
+ 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
+ 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
+ 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
+ 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
+ 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
+ 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
+ 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
+ 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
+ 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
+ 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
+ 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
+ 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
+ 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
+ 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
+ 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
+ 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
+ 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
+ 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
+ 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
+ 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
+ 0xde0506f1UL
+ },
+ {
+ 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
+ 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
+ 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
+ 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
+ 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
+ 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
+ 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
+ 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
+ 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
+ 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
+ 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
+ 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
+ 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
+ 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
+ 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
+ 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
+ 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
+ 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
+ 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
+ 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
+ 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
+ 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
+ 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
+ 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
+ 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
+ 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
+ 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
+ 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
+ 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
+ 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
+ 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
+ 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
+ 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
+ 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
+ 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
+ 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
+ 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
+ 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
+ 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
+ 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
+ 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
+ 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
+ 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
+ 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
+ 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
+ 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
+ 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
+ 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
+ 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
+ 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
+ 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
+ 0x8def022dUL
+ },
+ {
+ 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
+ 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
+ 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
+ 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
+ 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
+ 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
+ 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
+ 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
+ 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
+ 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
+ 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
+ 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
+ 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
+ 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
+ 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
+ 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
+ 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
+ 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
+ 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
+ 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
+ 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
+ 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
+ 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
+ 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
+ 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
+ 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
+ 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
+ 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
+ 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
+ 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
+ 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
+ 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
+ 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
+ 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
+ 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
+ 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
+ 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
+ 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
+ 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
+ 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
+ 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
+ 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
+ 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
+ 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
+ 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
+ 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
+ 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
+ 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
+ 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
+ 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
+ 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
+ 0x72fd2493UL
+ },
+ {
+ 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
+ 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
+ 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
+ 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
+ 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
+ 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
+ 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
+ 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
+ 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
+ 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
+ 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
+ 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
+ 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
+ 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
+ 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
+ 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
+ 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
+ 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
+ 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
+ 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
+ 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
+ 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
+ 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
+ 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
+ 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
+ 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
+ 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
+ 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
+ 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
+ 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
+ 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
+ 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
+ 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
+ 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
+ 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
+ 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
+ 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
+ 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
+ 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
+ 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
+ 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
+ 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
+ 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
+ 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
+ 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
+ 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
+ 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
+ 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
+ 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
+ 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
+ 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
+ 0xed3498beUL
+ },
+ {
+ 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
+ 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
+ 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
+ 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
+ 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
+ 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
+ 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
+ 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
+ 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
+ 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
+ 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
+ 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
+ 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
+ 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
+ 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
+ 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
+ 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
+ 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
+ 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
+ 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
+ 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
+ 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
+ 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
+ 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
+ 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
+ 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
+ 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
+ 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
+ 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
+ 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
+ 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
+ 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
+ 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
+ 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
+ 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
+ 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
+ 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
+ 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
+ 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
+ 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
+ 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
+ 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
+ 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
+ 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
+ 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
+ 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
+ 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
+ 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
+ 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
+ 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
+ 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
+ 0xf10605deUL
+#endif
+ }
+};
diff --git a/Contrib/zip2exe/zlib/crypt.h b/Contrib/zip2exe/zlib/crypt.h
index f14a628..622f4bc 100755
--- a/Contrib/zip2exe/zlib/crypt.h
+++ b/Contrib/zip2exe/zlib/crypt.h
@@ -1,132 +1,132 @@
-/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- This code is a modified version of crypting code in Infozip distribution
-
- The encryption/decryption parts of this source code (as opposed to the
- non-echoing password parts) were originally written in Europe. The
- whole source package can be freely distributed, including from the USA.
- (Prior to January 2000, re-export from the US was a violation of US law.)
-
- This encryption code is a direct transcription of the algorithm from
- Roger Schlafly, described by Phil Katz in the file appnote.txt. This
- file (appnote.txt) is distributed with the PKZIP program (even in the
- version without encryption capabilities).
-
- If you don't need crypting in your application, just define symbols
- NOCRYPT and NOUNCRYPT.
-
- This code support the "Traditional PKWARE Encryption".
-
- The new AES encryption added on Zip format by Winzip (see the page
- http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
- Encryption is not supported.
-*/
-
-#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
-
-/***********************************************************************
- * Return the next byte in the pseudo-random sequence
- */
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
-{
- unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
- * unpredictable manner on 16-bit systems; not a problem
- * with any known compiler so far, though */
-
- temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
- return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
-}
-
-/***********************************************************************
- * Update the encryption keys with the next byte of plain text
- */
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
-{
- (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
- (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
- (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
- {
- register int keyshift = (int)((*(pkeys+1)) >> 24);
- (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
- }
- return c;
-}
-
-
-/***********************************************************************
- * Initialize the encryption keys and the random header according to
- * the given password.
- */
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
-{
- *(pkeys+0) = 305419896L;
- *(pkeys+1) = 591751049L;
- *(pkeys+2) = 878082192L;
- while (*passwd != '\0') {
- update_keys(pkeys,pcrc_32_tab,(int)*passwd);
- passwd++;
- }
-}
-
-#define zdecode(pkeys,pcrc_32_tab,c) \
- (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
-
-#define zencode(pkeys,pcrc_32_tab,c,t) \
- (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
-
-#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-
-#define RAND_HEAD_LEN 12
- /* "last resort" source for second part of crypt seed pattern */
-# ifndef ZCR_SEED2
-# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
-# endif
-
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
- const char *passwd; /* password string */
- unsigned char *buf; /* where to write header */
- int bufSize;
- unsigned long* pkeys;
- const unsigned long* pcrc_32_tab;
- unsigned long crcForCrypting;
-{
- int n; /* index in random header */
- int t; /* temporary */
- int c; /* random byte */
- unsigned char header[RAND_HEAD_LEN-2]; /* random header */
- static unsigned calls = 0; /* ensure different random header each time */
-
- if (bufSize<RAND_HEAD_LEN)
- return 0;
-
- /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
- * output of rand() to get less predictability, since rand() is
- * often poorly implemented.
- */
- if (++calls == 1)
- {
- srand((unsigned)(time(NULL) ^ ZCR_SEED2));
- }
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- c = (rand() >> 7) & 0xff;
- header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
- }
- /* Encrypt random header (last two bytes is high word of crc) */
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
- }
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
- return n;
-}
-
-#endif
+/* crypt.h -- base code for crypt/uncrypt ZIPfile
+
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ This code is a modified version of crypting code in Infozip distribution
+
+ The encryption/decryption parts of this source code (as opposed to the
+ non-echoing password parts) were originally written in Europe. The
+ whole source package can be freely distributed, including from the USA.
+ (Prior to January 2000, re-export from the US was a violation of US law.)
+
+ This encryption code is a direct transcription of the algorithm from
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
+ file (appnote.txt) is distributed with the PKZIP program (even in the
+ version without encryption capabilities).
+
+ If you don't need crypting in your application, just define symbols
+ NOCRYPT and NOUNCRYPT.
+
+ This code support the "Traditional PKWARE Encryption".
+
+ The new AES encryption added on Zip format by Winzip (see the page
+ http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
+ Encryption is not supported.
+*/
+
+#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
+
+/***********************************************************************
+ * Return the next byte in the pseudo-random sequence
+ */
+static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
+{
+ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
+ * unpredictable manner on 16-bit systems; not a problem
+ * with any known compiler so far, though */
+
+ temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
+ return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
+}
+
+/***********************************************************************
+ * Update the encryption keys with the next byte of plain text
+ */
+static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
+{
+ (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
+ (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
+ (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
+ {
+ register int keyshift = (int)((*(pkeys+1)) >> 24);
+ (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
+ }
+ return c;
+}
+
+
+/***********************************************************************
+ * Initialize the encryption keys and the random header according to
+ * the given password.
+ */
+static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
+{
+ *(pkeys+0) = 305419896L;
+ *(pkeys+1) = 591751049L;
+ *(pkeys+2) = 878082192L;
+ while (*passwd != '\0') {
+ update_keys(pkeys,pcrc_32_tab,(int)*passwd);
+ passwd++;
+ }
+}
+
+#define zdecode(pkeys,pcrc_32_tab,c) \
+ (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
+
+#define zencode(pkeys,pcrc_32_tab,c,t) \
+ (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
+
+#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
+
+#define RAND_HEAD_LEN 12
+ /* "last resort" source for second part of crypt seed pattern */
+# ifndef ZCR_SEED2
+# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
+# endif
+
+static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
+ const char *passwd; /* password string */
+ unsigned char *buf; /* where to write header */
+ int bufSize;
+ unsigned long* pkeys;
+ const unsigned long* pcrc_32_tab;
+ unsigned long crcForCrypting;
+{
+ int n; /* index in random header */
+ int t; /* temporary */
+ int c; /* random byte */
+ unsigned char header[RAND_HEAD_LEN-2]; /* random header */
+ static unsigned calls = 0; /* ensure different random header each time */
+
+ if (bufSize<RAND_HEAD_LEN)
+ return 0;
+
+ /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
+ * output of rand() to get less predictability, since rand() is
+ * often poorly implemented.
+ */
+ if (++calls == 1)
+ {
+ srand((unsigned)(time(NULL) ^ ZCR_SEED2));
+ }
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ c = (rand() >> 7) & 0xff;
+ header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
+ }
+ /* Encrypt random header (last two bytes is high word of crc) */
+ init_keys(passwd, pkeys, pcrc_32_tab);
+ for (n = 0; n < RAND_HEAD_LEN-2; n++)
+ {
+ buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
+ }
+ buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
+ buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
+ return n;
+}
+
+#endif
diff --git a/Contrib/zip2exe/zlib/inffast.c b/Contrib/zip2exe/zlib/inffast.c
index fa31cad..bbee92e 100755
--- a/Contrib/zip2exe/zlib/inffast.c
+++ b/Contrib/zip2exe/zlib/inffast.c
@@ -1,318 +1,318 @@
-/* inffast.c -- fast decoding
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
- Based on testing to date,
- Pre-increment preferred for:
- - PowerPC G3 (Adler)
- - MIPS R5000 (Randers-Pehrson)
- Post-increment preferred for:
- - none
- No measurable difference:
- - Pentium III (Anderson)
- - M68060 (Nikl)
- */
-#ifdef POSTINC
-# define OFF 0
-# define PUP(a) *(a)++
-#else
-# define OFF 1
-# define PUP(a) *++(a)
-#endif
-
-/*
- Decode literal, length, and distance codes and write out the resulting
- literal and match bytes until either not enough input or output is
- available, an end-of-block is encountered, or a data error is encountered.
- When large enough input and output buffers are supplied to inflate(), for
- example, a 16K input buffer and a 64K output buffer, more than 95% of the
- inflate execution time is spent in this routine.
-
- Entry assumptions:
-
- state->mode == LEN
- strm->avail_in >= 6
- strm->avail_out >= 258
- start >= strm->avail_out
- state->bits < 8
-
- On return, state->mode is one of:
-
- LEN -- ran out of enough output space or enough available input
- TYPE -- reached end of block code, inflate() to interpret next block
- BAD -- error in block data
-
- Notes:
-
- - The maximum input bits used by a length/distance pair is 15 bits for the
- length code, 5 bits for the length extra, 15 bits for the distance code,
- and 13 bits for the distance extra. This totals 48 bits, or six bytes.
- Therefore if strm->avail_in >= 6, then there is enough input to avoid
- checking for available input while decoding.
-
- - The maximum bytes that a single length/distance pair can output is 258
- bytes, which is the maximum length that can be coded. inflate_fast()
- requires strm->avail_out >= 258 for each loop to avoid checking for
- output space.
- */
-void inflate_fast(strm, start)
-z_streamp strm;
-unsigned start; /* inflate()'s starting value for strm->avail_out */
-{
- struct inflate_state FAR *state;
- unsigned char FAR *in; /* local strm->next_in */
- unsigned char FAR *last; /* while in < last, enough input available */
- unsigned char FAR *out; /* local strm->next_out */
- unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
- unsigned char FAR *end; /* while out < end, enough space available */
-#ifdef INFLATE_STRICT
- unsigned dmax; /* maximum distance from zlib header */
-#endif
- unsigned wsize; /* window size or zero if not using window */
- unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
- unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
- unsigned long hold; /* local strm->hold */
- unsigned bits; /* local strm->bits */
- code const FAR *lcode; /* local strm->lencode */
- code const FAR *dcode; /* local strm->distcode */
- unsigned lmask; /* mask for first level of length codes */
- unsigned dmask; /* mask for first level of distance codes */
- code this; /* retrieved table entry */
- unsigned op; /* code bits, operation, extra bits, or */
- /* window position, window bytes to copy */
- unsigned len; /* match length, unused bytes */
- unsigned dist; /* match distance */
- unsigned char FAR *from; /* where to copy match from */
-
- /* copy state to local variables */
- state = (struct inflate_state FAR *)strm->state;
- in = strm->next_in - OFF;
- last = in + (strm->avail_in - 5);
- out = strm->next_out - OFF;
- beg = out - (start - strm->avail_out);
- end = out + (strm->avail_out - 257);
-#ifdef INFLATE_STRICT
- dmax = state->dmax;
-#endif
- wsize = state->wsize;
- whave = state->whave;
- write = state->write;
- window = state->window;
- hold = state->hold;
- bits = state->bits;
- lcode = state->lencode;
- dcode = state->distcode;
- lmask = (1U << state->lenbits) - 1;
- dmask = (1U << state->distbits) - 1;
-
- /* decode literals and length/distances until end-of-block or not enough
- input data or output space */
- do {
- if (bits < 15) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- this = lcode[hold & lmask];
- dolen:
- op = (unsigned)(this.bits);
- hold >>= op;
- bits -= op;
- op = (unsigned)(this.op);
- if (op == 0) { /* literal */
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- PUP(out) = (unsigned char)(this.val);
- }
- else if (op & 16) { /* length base */
- len = (unsigned)(this.val);
- op &= 15; /* number of extra bits */
- if (op) {
- if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- len += (unsigned)hold & ((1U << op) - 1);
- hold >>= op;
- bits -= op;
- }
- Tracevv((stderr, "inflate: length %u\n", len));
- if (bits < 15) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- this = dcode[hold & dmask];
- dodist:
- op = (unsigned)(this.bits);
- hold >>= op;
- bits -= op;
- op = (unsigned)(this.op);
- if (op & 16) { /* distance base */
- dist = (unsigned)(this.val);
- op &= 15; /* number of extra bits */
- if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- if (bits < op) {
- hold += (unsigned long)(PUP(in)) << bits;
- bits += 8;
- }
- }
- dist += (unsigned)hold & ((1U << op) - 1);
-#ifdef INFLATE_STRICT
- if (dist > dmax) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
-#endif
- hold >>= op;
- bits -= op;
- Tracevv((stderr, "inflate: distance %u\n", dist));
- op = (unsigned)(out - beg); /* max distance in output */
- if (dist > op) { /* see if copy from window */
- op = dist - op; /* distance back in window */
- if (op > whave) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
- from = window - OFF;
- if (write == 0) { /* very common case */
- from += wsize - op;
- if (op < len) { /* some from window */
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = out - dist; /* rest from output */
- }
- }
- else if (write < op) { /* wrap around window */
- from += wsize + write - op;
- op -= write;
- if (op < len) { /* some from end of window */
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = window - OFF;
- if (write < len) { /* some from start of window */
- op = write;
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = out - dist; /* rest from output */
- }
- }
- }
- else { /* contiguous in window */
- from += write - op;
- if (op < len) { /* some from window */
- len -= op;
- do {
- PUP(out) = PUP(from);
- } while (--op);
- from = out - dist; /* rest from output */
- }
- }
- while (len > 2) {
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- len -= 3;
- }
- if (len) {
- PUP(out) = PUP(from);
- if (len > 1)
- PUP(out) = PUP(from);
- }
- }
- else {
- from = out - dist; /* copy direct from output */
- do { /* minimum length is three */
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- PUP(out) = PUP(from);
- len -= 3;
- } while (len > 2);
- if (len) {
- PUP(out) = PUP(from);
- if (len > 1)
- PUP(out) = PUP(from);
- }
- }
- }
- else if ((op & 64) == 0) { /* 2nd level distance code */
- this = dcode[this.val + (hold & ((1U << op) - 1))];
- goto dodist;
- }
- else {
- strm->msg = (char *)"invalid distance code";
- state->mode = BAD;
- break;
- }
- }
- else if ((op & 64) == 0) { /* 2nd level length code */
- this = lcode[this.val + (hold & ((1U << op) - 1))];
- goto dolen;
- }
- else if (op & 32) { /* end-of-block */
- Tracevv((stderr, "inflate: end of block\n"));
- state->mode = TYPE;
- break;
- }
- else {
- strm->msg = (char *)"invalid literal/length code";
- state->mode = BAD;
- break;
- }
- } while (in < last && out < end);
-
- /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
- len = bits >> 3;
- in -= len;
- bits -= len << 3;
- hold &= (1U << bits) - 1;
-
- /* update state and return */
- strm->next_in = in + OFF;
- strm->next_out = out + OFF;
- strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
- strm->avail_out = (unsigned)(out < end ?
- 257 + (end - out) : 257 - (out - end));
- state->hold = hold;
- state->bits = bits;
- return;
-}
-
-/*
- inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
- - Using bit fields for code structure
- - Different op definition to avoid & for extra bits (do & for table bits)
- - Three separate decoding do-loops for direct, window, and write == 0
- - Special case for distance > 1 copies to do overlapped load and store copy
- - Explicit branch predictions (based on measured branch probabilities)
- - Deferring match copy and interspersed it with decoding subsequent codes
- - Swapping literal/length else
- - Swapping window/direct else
- - Larger unrolled copy loops (three is about right)
- - Moving len -= 3 statement into middle of loop
- */
-
-#endif /* !ASMINF */
+/* inffast.c -- fast decoding
+ * Copyright (C) 1995-2004 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+#include "inflate.h"
+#include "inffast.h"
+
+#ifndef ASMINF
+
+/* Allow machine dependent optimization for post-increment or pre-increment.
+ Based on testing to date,
+ Pre-increment preferred for:
+ - PowerPC G3 (Adler)
+ - MIPS R5000 (Randers-Pehrson)
+ Post-increment preferred for:
+ - none
+ No measurable difference:
+ - Pentium III (Anderson)
+ - M68060 (Nikl)
+ */
+#ifdef POSTINC
+# define OFF 0
+# define PUP(a) *(a)++
+#else
+# define OFF 1
+# define PUP(a) *++(a)
+#endif
+
+/*
+ Decode literal, length, and distance codes and write out the resulting
+ literal and match bytes until either not enough input or output is
+ available, an end-of-block is encountered, or a data error is encountered.
+ When large enough input and output buffers are supplied to inflate(), for
+ example, a 16K input buffer and a 64K output buffer, more than 95% of the
+ inflate execution time is spent in this routine.
+
+ Entry assumptions:
+
+ state->mode == LEN
+ strm->avail_in >= 6
+ strm->avail_out >= 258
+ start >= strm->avail_out
+ state->bits < 8
+
+ On return, state->mode is one of:
+
+ LEN -- ran out of enough output space or enough available input
+ TYPE -- reached end of block code, inflate() to interpret next block
+ BAD -- error in block data
+
+ Notes:
+
+ - The maximum input bits used by a length/distance pair is 15 bits for the
+ length code, 5 bits for the length extra, 15 bits for the distance code,
+ and 13 bits for the distance extra. This totals 48 bits, or six bytes.
+ Therefore if strm->avail_in >= 6, then there is enough input to avoid
+ checking for available input while decoding.
+
+ - The maximum bytes that a single length/distance pair can output is 258
+ bytes, which is the maximum length that can be coded. inflate_fast()
+ requires strm->avail_out >= 258 for each loop to avoid checking for
+ output space.
+ */
+void inflate_fast(strm, start)
+z_streamp strm;
+unsigned start; /* inflate()'s starting value for strm->avail_out */
+{
+ struct inflate_state FAR *state;
+ unsigned char FAR *in; /* local strm->next_in */
+ unsigned char FAR *last; /* while in < last, enough input available */
+ unsigned char FAR *out; /* local strm->next_out */
+ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
+ unsigned char FAR *end; /* while out < end, enough space available */
+#ifdef INFLATE_STRICT
+ unsigned dmax; /* maximum distance from zlib header */
+#endif
+ unsigned wsize; /* window size or zero if not using window */
+ unsigned whave; /* valid bytes in the window */
+ unsigned write; /* window write index */
+ unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
+ unsigned long hold; /* local strm->hold */
+ unsigned bits; /* local strm->bits */
+ code const FAR *lcode; /* local strm->lencode */
+ code const FAR *dcode; /* local strm->distcode */
+ unsigned lmask; /* mask for first level of length codes */
+ unsigned dmask; /* mask for first level of distance codes */
+ code this; /* retrieved table entry */
+ unsigned op; /* code bits, operation, extra bits, or */
+ /* window position, window bytes to copy */
+ unsigned len; /* match length, unused bytes */
+ unsigned dist; /* match distance */
+ unsigned char FAR *from; /* where to copy match from */
+
+ /* copy state to local variables */
+ state = (struct inflate_state FAR *)strm->state;
+ in = strm->next_in - OFF;
+ last = in + (strm->avail_in - 5);
+ out = strm->next_out - OFF;
+ beg = out - (start - strm->avail_out);
+ end = out + (strm->avail_out - 257);
+#ifdef INFLATE_STRICT
+ dmax = state->dmax;
+#endif
+ wsize = state->wsize;
+ whave = state->whave;
+ write = state->write;
+ window = state->window;
+ hold = state->hold;
+ bits = state->bits;
+ lcode = state->lencode;
+ dcode = state->distcode;
+ lmask = (1U << state->lenbits) - 1;
+ dmask = (1U << state->distbits) - 1;
+
+ /* decode literals and length/distances until end-of-block or not enough
+ input data or output space */
+ do {
+ if (bits < 15) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ this = lcode[hold & lmask];
+ dolen:
+ op = (unsigned)(this.bits);
+ hold >>= op;
+ bits -= op;
+ op = (unsigned)(this.op);
+ if (op == 0) { /* literal */
+ Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", this.val));
+ PUP(out) = (unsigned char)(this.val);
+ }
+ else if (op & 16) { /* length base */
+ len = (unsigned)(this.val);
+ op &= 15; /* number of extra bits */
+ if (op) {
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ len += (unsigned)hold & ((1U << op) - 1);
+ hold >>= op;
+ bits -= op;
+ }
+ Tracevv((stderr, "inflate: length %u\n", len));
+ if (bits < 15) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ this = dcode[hold & dmask];
+ dodist:
+ op = (unsigned)(this.bits);
+ hold >>= op;
+ bits -= op;
+ op = (unsigned)(this.op);
+ if (op & 16) { /* distance base */
+ dist = (unsigned)(this.val);
+ op &= 15; /* number of extra bits */
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ if (bits < op) {
+ hold += (unsigned long)(PUP(in)) << bits;
+ bits += 8;
+ }
+ }
+ dist += (unsigned)hold & ((1U << op) - 1);
+#ifdef INFLATE_STRICT
+ if (dist > dmax) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ hold >>= op;
+ bits -= op;
+ Tracevv((stderr, "inflate: distance %u\n", dist));
+ op = (unsigned)(out - beg); /* max distance in output */
+ if (dist > op) { /* see if copy from window */
+ op = dist - op; /* distance back in window */
+ if (op > whave) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+ from = window - OFF;
+ if (write == 0) { /* very common case */
+ from += wsize - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ else if (write < op) { /* wrap around window */
+ from += wsize + write - op;
+ op -= write;
+ if (op < len) { /* some from end of window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = window - OFF;
+ if (write < len) { /* some from start of window */
+ op = write;
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ }
+ else { /* contiguous in window */
+ from += write - op;
+ if (op < len) { /* some from window */
+ len -= op;
+ do {
+ PUP(out) = PUP(from);
+ } while (--op);
+ from = out - dist; /* rest from output */
+ }
+ }
+ while (len > 2) {
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ len -= 3;
+ }
+ if (len) {
+ PUP(out) = PUP(from);
+ if (len > 1)
+ PUP(out) = PUP(from);
+ }
+ }
+ else {
+ from = out - dist; /* copy direct from output */
+ do { /* minimum length is three */
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ PUP(out) = PUP(from);
+ len -= 3;
+ } while (len > 2);
+ if (len) {
+ PUP(out) = PUP(from);
+ if (len > 1)
+ PUP(out) = PUP(from);
+ }
+ }
+ }
+ else if ((op & 64) == 0) { /* 2nd level distance code */
+ this = dcode[this.val + (hold & ((1U << op) - 1))];
+ goto dodist;
+ }
+ else {
+ strm->msg = (char *)"invalid distance code";
+ state->mode = BAD;
+ break;
+ }
+ }
+ else if ((op & 64) == 0) { /* 2nd level length code */
+ this = lcode[this.val + (hold & ((1U << op) - 1))];
+ goto dolen;
+ }
+ else if (op & 32) { /* end-of-block */
+ Tracevv((stderr, "inflate: end of block\n"));
+ state->mode = TYPE;
+ break;
+ }
+ else {
+ strm->msg = (char *)"invalid literal/length code";
+ state->mode = BAD;
+ break;
+ }
+ } while (in < last && out < end);
+
+ /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+ len = bits >> 3;
+ in -= len;
+ bits -= len << 3;
+ hold &= (1U << bits) - 1;
+
+ /* update state and return */
+ strm->next_in = in + OFF;
+ strm->next_out = out + OFF;
+ strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
+ strm->avail_out = (unsigned)(out < end ?
+ 257 + (end - out) : 257 - (out - end));
+ state->hold = hold;
+ state->bits = bits;
+ return;
+}
+
+/*
+ inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
+ - Using bit fields for code structure
+ - Different op definition to avoid & for extra bits (do & for table bits)
+ - Three separate decoding do-loops for direct, window, and write == 0
+ - Special case for distance > 1 copies to do overlapped load and store copy
+ - Explicit branch predictions (based on measured branch probabilities)
+ - Deferring match copy and interspersed it with decoding subsequent codes
+ - Swapping literal/length else
+ - Swapping window/direct else
+ - Larger unrolled copy loops (three is about right)
+ - Moving len -= 3 statement into middle of loop
+ */
+
+#endif /* !ASMINF */
diff --git a/Contrib/zip2exe/zlib/inffast.h b/Contrib/zip2exe/zlib/inffast.h
index 614fa78..1e88d2d 100755
--- a/Contrib/zip2exe/zlib/inffast.h
+++ b/Contrib/zip2exe/zlib/inffast.h
@@ -1,11 +1,11 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-void inflate_fast OF((z_streamp strm, unsigned start));
+/* inffast.h -- header to use inffast.c
+ * Copyright (C) 1995-2003 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+void inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/Contrib/zip2exe/zlib/inffixed.h b/Contrib/zip2exe/zlib/inffixed.h
index 423d5c5..75ed4b5 100755
--- a/Contrib/zip2exe/zlib/inffixed.h
+++ b/Contrib/zip2exe/zlib/inffixed.h
@@ -1,94 +1,94 @@
- /* inffixed.h -- table for decoding fixed codes
- * Generated automatically by makefixed().
- */
-
- /* WARNING: this file should *not* be used by applications. It
- is part of the implementation of the compression library and
- is subject to change. Applications should only use zlib.h.
- */
-
- static const code lenfix[512] = {
- {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
- {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
- {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
- {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
- {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
- {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
- {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
- {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
- {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
- {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
- {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
- {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
- {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
- {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
- {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
- {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
- {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
- {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
- {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
- {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
- {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
- {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
- {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
- {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
- {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
- {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
- {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
- {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
- {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
- {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
- {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
- {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
- {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
- {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
- {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
- {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
- {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
- {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
- {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
- {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
- {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
- {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
- {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
- {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
- {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
- {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
- {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
- {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
- {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
- {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
- {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
- {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
- {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
- {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
- {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
- {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
- {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
- {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
- {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
- {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
- {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
- {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
- {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
- {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
- {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
- {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
- {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
- {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
- {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
- {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
- {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
- {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
- {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
- {0,9,255}
- };
-
- static const code distfix[32] = {
- {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
- {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
- {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
- {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
- {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
- {22,5,193},{64,5,0}
- };
+ /* inffixed.h -- table for decoding fixed codes
+ * Generated automatically by makefixed().
+ */
+
+ /* WARNING: this file should *not* be used by applications. It
+ is part of the implementation of the compression library and
+ is subject to change. Applications should only use zlib.h.
+ */
+
+ static const code lenfix[512] = {
+ {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
+ {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
+ {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
+ {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
+ {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
+ {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
+ {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
+ {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
+ {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
+ {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
+ {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
+ {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
+ {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
+ {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
+ {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
+ {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
+ {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
+ {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
+ {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
+ {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
+ {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
+ {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
+ {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
+ {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
+ {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
+ {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
+ {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
+ {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
+ {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
+ {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
+ {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
+ {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
+ {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
+ {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
+ {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
+ {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
+ {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
+ {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
+ {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
+ {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
+ {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
+ {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
+ {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
+ {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
+ {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
+ {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
+ {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
+ {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
+ {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
+ {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
+ {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
+ {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
+ {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
+ {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
+ {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
+ {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
+ {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
+ {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
+ {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
+ {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
+ {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
+ {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
+ {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
+ {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
+ {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
+ {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
+ {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
+ {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
+ {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
+ {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
+ {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
+ {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
+ {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
+ {0,9,255}
+ };
+
+ static const code distfix[32] = {
+ {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
+ {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
+ {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
+ {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
+ {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
+ {22,5,193},{64,5,0}
+ };
diff --git a/Contrib/zip2exe/zlib/inflate.c b/Contrib/zip2exe/zlib/inflate.c
index 33ea902..792fdee 100755
--- a/Contrib/zip2exe/zlib/inflate.c
+++ b/Contrib/zip2exe/zlib/inflate.c
@@ -1,1368 +1,1368 @@
-/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * Change history:
- *
- * 1.2.beta0 24 Nov 2002
- * - First version -- complete rewrite of inflate to simplify code, avoid
- * creation of window when not needed, minimize use of window when it is
- * needed, make inffast.c even faster, implement gzip decoding, and to
- * improve code readability and style over the previous zlib inflate code
- *
- * 1.2.beta1 25 Nov 2002
- * - Use pointers for available input and output checking in inffast.c
- * - Remove input and output counters in inffast.c
- * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
- * - Remove unnecessary second byte pull from length extra in inffast.c
- * - Unroll direct copy to three copies per loop in inffast.c
- *
- * 1.2.beta2 4 Dec 2002
- * - Change external routine names to reduce potential conflicts
- * - Correct filename to inffixed.h for fixed tables in inflate.c
- * - Make hbuf[] unsigned char to match parameter type in inflate.c
- * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
- * to avoid negation problem on Alphas (64 bit) in inflate.c
- *
- * 1.2.beta3 22 Dec 2002
- * - Add comments on state->bits assertion in inffast.c
- * - Add comments on op field in inftrees.h
- * - Fix bug in reuse of allocated window after inflateReset()
- * - Remove bit fields--back to byte structure for speed
- * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
- * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
- * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
- * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
- * - Use local copies of stream next and avail values, as well as local bit
- * buffer and bit count in inflate()--for speed when inflate_fast() not used
- *
- * 1.2.beta4 1 Jan 2003
- * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
- * - Move a comment on output buffer sizes from inffast.c to inflate.c
- * - Add comments in inffast.c to introduce the inflate_fast() routine
- * - Rearrange window copies in inflate_fast() for speed and simplification
- * - Unroll last copy for window match in inflate_fast()
- * - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
- * - Make op and len in inflate_fast() unsigned for consistency
- * - Add FAR to lcode and dcode declarations in inflate_fast()
- * - Simplified bad distance check in inflate_fast()
- * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
- * source file infback.c to provide a call-back interface to inflate for
- * programs like gzip and unzip -- uses window as output buffer to avoid
- * window copying
- *
- * 1.2.beta5 1 Jan 2003
- * - Improved inflateBack() interface to allow the caller to provide initial
- * input in strm.
- * - Fixed stored blocks bug in inflateBack()
- *
- * 1.2.beta6 4 Jan 2003
- * - Added comments in inffast.c on effectiveness of POSTINC
- * - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
- * make compilers happy
- * - Changed type of window in inflateBackInit() to unsigned char *
- *
- * 1.2.beta7 27 Jan 2003
- * - Changed many types to unsigned or unsigned short to avoid warnings
- * - Added inflateCopy() function
- *
- * 1.2.0 9 Mar 2003
- * - Changed inflateBack() interface to provide separate opaque descriptors
- * for the in() and out() functions
- * - Changed inflateBack() argument and in_func typedef to swap the length
- * and buffer address return values for the input function
- * - Check next_in and next_out for Z_NULL on entry to inflate()
- *
- * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifdef MAKEFIXED
-# ifndef BUILDFIXED
-# define BUILDFIXED
-# endif
-#endif
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, unsigned out));
-#ifdef BUILDFIXED
- void makefixed OF((void));
-#endif
-local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
- unsigned len));
-
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
-{
- struct inflate_state FAR *state;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- strm->total_in = strm->total_out = state->total = 0;
- strm->msg = Z_NULL;
- strm->adler = 1; /* to support ill-conceived Java test suite */
- state->mode = HEAD;
- state->last = 0;
- state->havedict = 0;
- state->dmax = 32768U;
- state->head = Z_NULL;
- state->wsize = 0;
- state->whave = 0;
- state->write = 0;
- state->hold = 0;
- state->bits = 0;
- state->lencode = state->distcode = state->next = state->codes;
- Tracev((stderr, "inflate: reset\n"));
- return Z_OK;
-}
-
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
-{
- struct inflate_state FAR *state;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
- value &= (1L << bits) - 1;
- state->hold += value << state->bits;
- state->bits += bits;
- return Z_OK;
-}
-
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
-{
- struct inflate_state FAR *state;
-
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != (int)(sizeof(z_stream)))
- return Z_VERSION_ERROR;
- if (strm == Z_NULL) return Z_STREAM_ERROR;
- strm->msg = Z_NULL; /* in case we return an error */
- if (strm->zalloc == (alloc_func)0) {
- strm->zalloc = zcalloc;
- strm->opaque = (voidpf)0;
- }
- if (strm->zfree == (free_func)0) strm->zfree = zcfree;
- state = (struct inflate_state FAR *)
- ZALLOC(strm, 1, sizeof(struct inflate_state));
- if (state == Z_NULL) return Z_MEM_ERROR;
- Tracev((stderr, "inflate: allocated\n"));
- strm->state = (struct internal_state FAR *)state;
- if (windowBits < 0) {
- state->wrap = 0;
- windowBits = -windowBits;
- }
- else {
- state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
- if (windowBits < 48) windowBits &= 15;
-#endif
- }
- if (windowBits < 8 || windowBits > 15) {
- ZFREE(strm, state);
- strm->state = Z_NULL;
- return Z_STREAM_ERROR;
- }
- state->wbits = (unsigned)windowBits;
- state->window = Z_NULL;
- return inflateReset(strm);
-}
-
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
-{
- return inflateInit2_(strm, DEF_WBITS, version, stream_size);
-}
-
-/*
- Return state with length and distance decoding tables and index sizes set to
- fixed code decoding. Normally this returns fixed tables from inffixed.h.
- If BUILDFIXED is defined, then instead this routine builds the tables the
- first time it's called, and returns those tables the first time and
- thereafter. This reduces the size of the code by about 2K bytes, in
- exchange for a little execution time. However, BUILDFIXED should not be
- used for threaded applications, since the rewriting of the tables and virgin
- may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
- static int virgin = 1;
- static code *lenfix, *distfix;
- static code fixed[544];
-
- /* build fixed huffman tables if first call (may not be thread safe) */
- if (virgin) {
- unsigned sym, bits;
- static code *next;
-
- /* literal/length table */
- sym = 0;
- while (sym < 144) state->lens[sym++] = 8;
- while (sym < 256) state->lens[sym++] = 9;
- while (sym < 280) state->lens[sym++] = 7;
- while (sym < 288) state->lens[sym++] = 8;
- next = fixed;
- lenfix = next;
- bits = 9;
- inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
- /* distance table */
- sym = 0;
- while (sym < 32) state->lens[sym++] = 5;
- distfix = next;
- bits = 5;
- inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
- /* do this just once */
- virgin = 0;
- }
-#else /* !BUILDFIXED */
-# include "inffixed.h"
-#endif /* BUILDFIXED */
- state->lencode = lenfix;
- state->lenbits = 9;
- state->distcode = distfix;
- state->distbits = 5;
-}
-
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-/*
- Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also
- defines BUILDFIXED, so the tables are built on the fly. makefixed() writes
- those tables to stdout, which would be piped to inffixed.h. A small program
- can simply call makefixed to do this:
-
- void makefixed(void);
-
- int main(void)
- {
- makefixed();
- return 0;
- }
-
- Then that can be linked with zlib built with MAKEFIXED defined and run:
-
- a.out > inffixed.h
- */
-void makefixed()
-{
- unsigned low, size;
- struct inflate_state state;
-
- fixedtables(&state);
- puts(" /* inffixed.h -- table for decoding fixed codes");
- puts(" * Generated automatically by makefixed().");
- puts(" */");
- puts("");
- puts(" /* WARNING: this file should *not* be used by applications.");
- puts(" It is part of the implementation of this library and is");
- puts(" subject to change. Applications should only use zlib.h.");
- puts(" */");
- puts("");
- size = 1U << 9;
- printf(" static const code lenfix[%u] = {", size);
- low = 0;
- for (;;) {
- if ((low % 7) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
- state.lencode[low].val);
- if (++low == size) break;
- putchar(',');
- }
- puts("\n };");
- size = 1U << 5;
- printf("\n static const code distfix[%u] = {", size);
- low = 0;
- for (;;) {
- if ((low % 6) == 0) printf("\n ");
- printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
- state.distcode[low].val);
- if (++low == size) break;
- putchar(',');
- }
- puts("\n };");
-}
-#endif /* MAKEFIXED */
-
-/*
- Update the window with the last wsize (normally 32K) bytes written before
- returning. If window does not exist yet, create it. This is only called
- when a window is already in use, or when output has been written during this
- inflate call, but the end of the deflate stream has not been reached yet.
- It is also called to create a window for dictionary data when a dictionary
- is loaded.
-
- Providing output buffers larger than 32K to inflate() should provide a speed
- advantage, since only the last 32K of output is copied to the sliding window
- upon return from inflate(), and since all distances after the first 32K of
- output will fall in the output data, making match copies simpler and faster.
- The advantage may be dependent on the size of the processor's data caches.
- */
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
-{
- struct inflate_state FAR *state;
- unsigned copy, dist;
-
- state = (struct inflate_state FAR *)strm->state;
-
- /* if it hasn't been done already, allocate space for the window */
- if (state->window == Z_NULL) {
- state->window = (unsigned char FAR *)
- ZALLOC(strm, 1U << state->wbits,
- sizeof(unsigned char));
- if (state->window == Z_NULL) return 1;
- }
-
- /* if window not in use yet, initialize */
- if (state->wsize == 0) {
- state->wsize = 1U << state->wbits;
- state->write = 0;
- state->whave = 0;
- }
-
- /* copy state->wsize or less output bytes into the circular window */
- copy = out - strm->avail_out;
- if (copy >= state->wsize) {
- zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
- state->write = 0;
- state->whave = state->wsize;
- }
- else {
- dist = state->wsize - state->write;
- if (dist > copy) dist = copy;
- zmemcpy(state->window + state->write, strm->next_out - copy, dist);
- copy -= dist;
- if (copy) {
- zmemcpy(state->window, strm->next_out - copy, copy);
- state->write = copy;
- state->whave = state->wsize;
- }
- else {
- state->write += dist;
- if (state->write == state->wsize) state->write = 0;
- if (state->whave < state->wsize) state->whave += dist;
- }
- }
- return 0;
-}
-
-/* Macros for inflate(): */
-
-/* check function to use adler32() for zlib or crc32() for gzip */
-#ifdef GUNZIP
-# define UPDATE(check, buf, len) \
- (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
-#else
-# define UPDATE(check, buf, len) adler32(check, buf, len)
-#endif
-
-/* check macros for header crc */
-#ifdef GUNZIP
-# define CRC2(check, word) \
- do { \
- hbuf[0] = (unsigned char)(word); \
- hbuf[1] = (unsigned char)((word) >> 8); \
- check = crc32(check, hbuf, 2); \
- } while (0)
-
-# define CRC4(check, word) \
- do { \
- hbuf[0] = (unsigned char)(word); \
- hbuf[1] = (unsigned char)((word) >> 8); \
- hbuf[2] = (unsigned char)((word) >> 16); \
- hbuf[3] = (unsigned char)((word) >> 24); \
- check = crc32(check, hbuf, 4); \
- } while (0)
-#endif
-
-/* Load registers with state in inflate() for speed */
-#define LOAD() \
- do { \
- put = strm->next_out; \
- left = strm->avail_out; \
- next = strm->next_in; \
- have = strm->avail_in; \
- hold = state->hold; \
- bits = state->bits; \
- } while (0)
-
-/* Restore state from registers in inflate() */
-#define RESTORE() \
- do { \
- strm->next_out = put; \
- strm->avail_out = left; \
- strm->next_in = next; \
- strm->avail_in = have; \
- state->hold = hold; \
- state->bits = bits; \
- } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
- do { \
- hold = 0; \
- bits = 0; \
- } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflate()
- if there is no input available. */
-#define PULLBYTE() \
- do { \
- if (have == 0) goto inf_leave; \
- have--; \
- hold += (unsigned long)(*next++) << bits; \
- bits += 8; \
- } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator. If there is
- not enough available input to do that, then return from inflate(). */
-#define NEEDBITS(n) \
- do { \
- while (bits < (unsigned)(n)) \
- PULLBYTE(); \
- } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
- ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
- do { \
- hold >>= (n); \
- bits -= (unsigned)(n); \
- } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
- do { \
- hold >>= bits & 7; \
- bits -= bits & 7; \
- } while (0)
-
-/* Reverse the bytes in a 32-bit value */
-#define REVERSE(q) \
- ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
- (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-/*
- inflate() uses a state machine to process as much input data and generate as
- much output data as possible before returning. The state machine is
- structured roughly as follows:
-
- for (;;) switch (state) {
- ...
- case STATEn:
- if (not enough input data or output space to make progress)
- return;
- ... make progress ...
- state = STATEm;
- break;
- ...
- }
-
- so when inflate() is called again, the same case is attempted again, and
- if the appropriate resources are provided, the machine proceeds to the
- next state. The NEEDBITS() macro is usually the way the state evaluates
- whether it can proceed or should return. NEEDBITS() does the return if
- the requested bits are not available. The typical use of the BITS macros
- is:
-
- NEEDBITS(n);
- ... do something with BITS(n) ...
- DROPBITS(n);
-
- where NEEDBITS(n) either returns from inflate() if there isn't enough
- input left to load n bits into the accumulator, or it continues. BITS(n)
- gives the low n bits in the accumulator. When done, DROPBITS(n) drops
- the low n bits off the accumulator. INITBITS() clears the accumulator
- and sets the number of available bits to zero. BYTEBITS() discards just
- enough bits to put the accumulator on a byte boundary. After BYTEBITS()
- and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
-
- NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
- if there is no input available. The decoding of variable length codes uses
- PULLBYTE() directly in order to pull just enough bytes to decode the next
- code, and no more.
-
- Some states loop until they get enough input, making sure that enough
- state information is maintained to continue the loop where it left off
- if NEEDBITS() returns in the loop. For example, want, need, and keep
- would all have to actually be part of the saved state in case NEEDBITS()
- returns:
-
- case STATEw:
- while (want < need) {
- NEEDBITS(n);
- keep[want++] = BITS(n);
- DROPBITS(n);
- }
- state = STATEx;
- case STATEx:
-
- As shown above, if the next state is also the next case, then the break
- is omitted.
-
- A state may also return if there is not enough output space available to
- complete that state. Those states are copying stored data, writing a
- literal byte, and copying a matching string.
-
- When returning, a "goto inf_leave" is used to update the total counters,
- update the check value, and determine whether any progress has been made
- during that inflate() call in order to return the proper return code.
- Progress is defined as a change in either strm->avail_in or strm->avail_out.
- When there is a window, goto inf_leave will update the window with the last
- output written. If a goto inf_leave occurs in the middle of decompression
- and there is no window currently, goto inf_leave will create one and copy
- output to the window for the next call of inflate().
-
- In this implementation, the flush parameter of inflate() only affects the
- return code (per zlib.h). inflate() always writes as much as possible to
- strm->next_out, given the space available and the provided input--the effect
- documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers
- the allocation of and copying into a sliding window until necessary, which
- provides the effect documented in zlib.h for Z_FINISH when the entire input
- stream available. So the only thing the flush parameter actually does is:
- when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it
- will return Z_BUF_ERROR if it has not reached the end of the stream.
- */
-
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
-{
- struct inflate_state FAR *state;
- unsigned char FAR *next; /* next input */
- unsigned char FAR *put; /* next output */
- unsigned have, left; /* available input and output */
- unsigned long hold; /* bit buffer */
- unsigned bits; /* bits in bit buffer */
- unsigned in, out; /* save starting available input and output */
- unsigned copy; /* number of stored or match bytes to copy */
- unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
- code last; /* parent table entry */
- unsigned len; /* length to copy for repeats, bits to drop */
- int ret; /* return code */
-#ifdef GUNZIP
- unsigned char hbuf[4]; /* buffer for gzip header crc calculation */
-#endif
- static const unsigned short order[19] = /* permutation of code lengths */
- {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
- if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0))
- return Z_STREAM_ERROR;
-
- state = (struct inflate_state FAR *)strm->state;
- if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
- LOAD();
- in = have;
- out = left;
- ret = Z_OK;
- for (;;)
- switch (state->mode) {
- case HEAD:
- if (state->wrap == 0) {
- state->mode = TYPEDO;
- break;
- }
- NEEDBITS(16);
-#ifdef GUNZIP
- if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
- state->check = crc32(0L, Z_NULL, 0);
- CRC2(state->check, hold);
- INITBITS();
- state->mode = FLAGS;
- break;
- }
- state->flags = 0; /* expect zlib header */
- if (state->head != Z_NULL)
- state->head->done = -1;
- if (!(state->wrap & 1) || /* check if zlib header allowed */
-#else
- if (
-#endif
- ((BITS(8) << 8) + (hold >> 8)) % 31) {
- strm->msg = (char *)"incorrect header check";
- state->mode = BAD;
- break;
- }
- if (BITS(4) != Z_DEFLATED) {
- strm->msg = (char *)"unknown compression method";
- state->mode = BAD;
- break;
- }
- DROPBITS(4);
- len = BITS(4) + 8;
- if (len > state->wbits) {
- strm->msg = (char *)"invalid window size";
- state->mode = BAD;
- break;
- }
- state->dmax = 1U << len;
- Tracev((stderr, "inflate: zlib header ok\n"));
- strm->adler = state->check = adler32(0L, Z_NULL, 0);
- state->mode = hold & 0x200 ? DICTID : TYPE;
- INITBITS();
- break;
-#ifdef GUNZIP
- case FLAGS:
- NEEDBITS(16);
- state->flags = (int)(hold);
- if ((state->flags & 0xff) != Z_DEFLATED) {
- strm->msg = (char *)"unknown compression method";
- state->mode = BAD;
- break;
- }
- if (state->flags & 0xe000) {
- strm->msg = (char *)"unknown header flags set";
- state->mode = BAD;
- break;
- }
- if (state->head != Z_NULL)
- state->head->text = (int)((hold >> 8) & 1);
- if (state->flags & 0x0200) CRC2(state->check, hold);
- INITBITS();
- state->mode = TIME;
- case TIME:
- NEEDBITS(32);
- if (state->head != Z_NULL)
- state->head->time = hold;
- if (state->flags & 0x0200) CRC4(state->check, hold);
- INITBITS();
- state->mode = OS;
- case OS:
- NEEDBITS(16);
- if (state->head != Z_NULL) {
- state->head->xflags = (int)(hold & 0xff);
- state->head->os = (int)(hold >> 8);
- }
- if (state->flags & 0x0200) CRC2(state->check, hold);
- INITBITS();
- state->mode = EXLEN;
- case EXLEN:
- if (state->flags & 0x0400) {
- NEEDBITS(16);
- state->length = (unsigned)(hold);
- if (state->head != Z_NULL)
- state->head->extra_len = (unsigned)hold;
- if (state->flags & 0x0200) CRC2(state->check, hold);
- INITBITS();
- }
- else if (state->head != Z_NULL)
- state->head->extra = Z_NULL;
- state->mode = EXTRA;
- case EXTRA:
- if (state->flags & 0x0400) {
- copy = state->length;
- if (copy > have) copy = have;
- if (copy) {
- if (state->head != Z_NULL &&
- state->head->extra != Z_NULL) {
- len = state->head->extra_len - state->length;
- zmemcpy(state->head->extra + len, next,
- len + copy > state->head->extra_max ?
- state->head->extra_max - len : copy);
- }
- if (state->flags & 0x0200)
- state->check = crc32(state->check, next, copy);
- have -= copy;
- next += copy;
- state->length -= copy;
- }
- if (state->length) goto inf_leave;
- }
- state->length = 0;
- state->mode = NAME;
- case NAME:
- if (state->flags & 0x0800) {
- if (have == 0) goto inf_leave;
- copy = 0;
- do {
- len = (unsigned)(next[copy++]);
- if (state->head != Z_NULL &&
- state->head->name != Z_NULL &&
- state->length < state->head->name_max)
- state->head->name[state->length++] = len;
- } while (len && copy < have);
- if (state->flags & 0x0200)
- state->check = crc32(state->check, next, copy);
- have -= copy;
- next += copy;
- if (len) goto inf_leave;
- }
- else if (state->head != Z_NULL)
- state->head->name = Z_NULL;
- state->length = 0;
- state->mode = COMMENT;
- case COMMENT:
- if (state->flags & 0x1000) {
- if (have == 0) goto inf_leave;
- copy = 0;
- do {
- len = (unsigned)(next[copy++]);
- if (state->head != Z_NULL &&
- state->head->comment != Z_NULL &&
- state->length < state->head->comm_max)
- state->head->comment[state->length++] = len;
- } while (len && copy < have);
- if (state->flags & 0x0200)
- state->check = crc32(state->check, next, copy);
- have -= copy;
- next += copy;
- if (len) goto inf_leave;
- }
- else if (state->head != Z_NULL)
- state->head->comment = Z_NULL;
- state->mode = HCRC;
- case HCRC:
- if (state->flags & 0x0200) {
- NEEDBITS(16);
- if (hold != (state->check & 0xffff)) {
- strm->msg = (char *)"header crc mismatch";
- state->mode = BAD;
- break;
- }
- INITBITS();
- }
- if (state->head != Z_NULL) {
- state->head->hcrc = (int)((state->flags >> 9) & 1);
- state->head->done = 1;
- }
- strm->adler = state->check = crc32(0L, Z_NULL, 0);
- state->mode = TYPE;
- break;
-#endif
- case DICTID:
- NEEDBITS(32);
- strm->adler = state->check = REVERSE(hold);
- INITBITS();
- state->mode = DICT;
- case DICT:
- if (state->havedict == 0) {
- RESTORE();
- return Z_NEED_DICT;
- }
- strm->adler = state->check = adler32(0L, Z_NULL, 0);
- state->mode = TYPE;
- case TYPE:
- if (flush == Z_BLOCK) goto inf_leave;
- case TYPEDO:
- if (state->last) {
- BYTEBITS();
- state->mode = CHECK;
- break;
- }
- NEEDBITS(3);
- state->last = BITS(1);
- DROPBITS(1);
- switch (BITS(2)) {
- case 0: /* stored block */
- Tracev((stderr, "inflate: stored block%s\n",
- state->last ? " (last)" : ""));
- state->mode = STORED;
- break;
- case 1: /* fixed block */
- fixedtables(state);
- Tracev((stderr, "inflate: fixed codes block%s\n",
- state->last ? " (last)" : ""));
- state->mode = LEN; /* decode codes */
- break;
- case 2: /* dynamic block */
- Tracev((stderr, "inflate: dynamic codes block%s\n",
- state->last ? " (last)" : ""));
- state->mode = TABLE;
- break;
- case 3:
- strm->msg = (char *)"invalid block type";
- state->mode = BAD;
- }
- DROPBITS(2);
- break;
- case STORED:
- BYTEBITS(); /* go to byte boundary */
- NEEDBITS(32);
- if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
- strm->msg = (char *)"invalid stored block lengths";
- state->mode = BAD;
- break;
- }
- state->length = (unsigned)hold & 0xffff;
- Tracev((stderr, "inflate: stored length %u\n",
- state->length));
- INITBITS();
- state->mode = COPY;
- case COPY:
- copy = state->length;
- if (copy) {
- if (copy > have) copy = have;
- if (copy > left) copy = left;
- if (copy == 0) goto inf_leave;
- zmemcpy(put, next, copy);
- have -= copy;
- next += copy;
- left -= copy;
- put += copy;
- state->length -= copy;
- break;
- }
- Tracev((stderr, "inflate: stored end\n"));
- state->mode = TYPE;
- break;
- case TABLE:
- NEEDBITS(14);
- state->nlen = BITS(5) + 257;
- DROPBITS(5);
- state->ndist = BITS(5) + 1;
- DROPBITS(5);
- state->ncode = BITS(4) + 4;
- DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
- if (state->nlen > 286 || state->ndist > 30) {
- strm->msg = (char *)"too many length or distance symbols";
- state->mode = BAD;
- break;
- }
-#endif
- Tracev((stderr, "inflate: table sizes ok\n"));
- state->have = 0;
- state->mode = LENLENS;
- case LENLENS:
- while (state->have < state->ncode) {
- NEEDBITS(3);
- state->lens[order[state->have++]] = (unsigned short)BITS(3);
- DROPBITS(3);
- }
- while (state->have < 19)
- state->lens[order[state->have++]] = 0;
- state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
- state->lenbits = 7;
- ret = inflate_table(CODES, state->lens, 19, &(state->next),
- &(state->lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid code lengths set";
- state->mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: code lengths ok\n"));
- state->have = 0;
- state->mode = CODELENS;
- case CODELENS:
- while (state->have < state->nlen + state->ndist) {
- for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
- }
- else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
- if (state->have == 0) {
- strm->msg = (char *)"invalid bit length repeat";
- state->mode = BAD;
- break;
- }
- len = state->lens[state->have - 1];
- copy = 3 + BITS(2);
- DROPBITS(2);
- }
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
- len = 0;
- copy = 3 + BITS(3);
- DROPBITS(3);
- }
- else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
- len = 0;
- copy = 11 + BITS(7);
- DROPBITS(7);
- }
- if (state->have + copy > state->nlen + state->ndist) {
- strm->msg = (char *)"invalid bit length repeat";
- state->mode = BAD;
- break;
- }
- while (copy--)
- state->lens[state->have++] = (unsigned short)len;
- }
- }
-
- /* handle error breaks in while */
- if (state->mode == BAD) break;
-
- /* build code tables */
- state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
- state->lenbits = 9;
- ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
- &(state->lenbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid literal/lengths set";
- state->mode = BAD;
- break;
- }
- state->distcode = (code const FAR *)(state->next);
- state->distbits = 6;
- ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
- &(state->next), &(state->distbits), state->work);
- if (ret) {
- strm->msg = (char *)"invalid distances set";
- state->mode = BAD;
- break;
- }
- Tracev((stderr, "inflate: codes ok\n"));
- state->mode = LEN;
- case LEN:
- if (have >= 6 && left >= 258) {
- RESTORE();
- inflate_fast(strm, out);
- LOAD();
- break;
- }
- for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
- for (;;) {
- this = state->lencode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
- if ((int)(this.op) == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- state->mode = LIT;
- break;
- }
- if (this.op & 32) {
- Tracevv((stderr, "inflate: end of block\n"));
- state->mode = TYPE;
- break;
- }
- if (this.op & 64) {
- strm->msg = (char *)"invalid literal/length code";
- state->mode = BAD;
- break;
- }
- state->extra = (unsigned)(this.op) & 15;
- state->mode = LENEXT;
- case LENEXT:
- if (state->extra) {
- NEEDBITS(state->extra);
- state->length += BITS(state->extra);
- DROPBITS(state->extra);
- }
- Tracevv((stderr, "inflate: length %u\n", state->length));
- state->mode = DIST;
- case DIST:
- for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
- PULLBYTE();
- }
- if ((this.op & 0xf0) == 0) {
- last = this;
- for (;;) {
- this = state->distcode[last.val +
- (BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
- PULLBYTE();
- }
- DROPBITS(last.bits);
- }
- DROPBITS(this.bits);
- if (this.op & 64) {
- strm->msg = (char *)"invalid distance code";
- state->mode = BAD;
- break;
- }
- state->offset = (unsigned)this.val;
- state->extra = (unsigned)(this.op) & 15;
- state->mode = DISTEXT;
- case DISTEXT:
- if (state->extra) {
- NEEDBITS(state->extra);
- state->offset += BITS(state->extra);
- DROPBITS(state->extra);
- }
-#ifdef INFLATE_STRICT
- if (state->offset > state->dmax) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
-#endif
- if (state->offset > state->whave + out - left) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
- Tracevv((stderr, "inflate: distance %u\n", state->offset));
- state->mode = MATCH;
- case MATCH:
- if (left == 0) goto inf_leave;
- copy = out - left;
- if (state->offset > copy) { /* copy from window */
- copy = state->offset - copy;
- if (copy > state->write) {
- copy -= state->write;
- from = state->window + (state->wsize - copy);
- }
- else
- from = state->window + (state->write - copy);
- if (copy > state->length) copy = state->length;
- }
- else { /* copy from output */
- from = put - state->offset;
- copy = state->length;
- }
- if (copy > left) copy = left;
- left -= copy;
- state->length -= copy;
- do {
- *put++ = *from++;
- } while (--copy);
- if (state->length == 0) state->mode = LEN;
- break;
- case LIT:
- if (left == 0) goto inf_leave;
- *put++ = (unsigned char)(state->length);
- left--;
- state->mode = LEN;
- break;
- case CHECK:
- if (state->wrap) {
- NEEDBITS(32);
- out -= left;
- strm->total_out += out;
- state->total += out;
- if (out)
- strm->adler = state->check =
- UPDATE(state->check, put - out, out);
- out = left;
- if ((
-#ifdef GUNZIP
- state->flags ? hold :
-#endif
- REVERSE(hold)) != state->check) {
- strm->msg = (char *)"incorrect data check";
- state->mode = BAD;
- break;
- }
- INITBITS();
- Tracev((stderr, "inflate: check matches trailer\n"));
- }
-#ifdef GUNZIP
- state->mode = LENGTH;
- case LENGTH:
- if (state->wrap && state->flags) {
- NEEDBITS(32);
- if (hold != (state->total & 0xffffffffUL)) {
- strm->msg = (char *)"incorrect length check";
- state->mode = BAD;
- break;
- }
- INITBITS();
- Tracev((stderr, "inflate: length matches trailer\n"));
- }
-#endif
- state->mode = DONE;
- case DONE:
- ret = Z_STREAM_END;
- goto inf_leave;
- case BAD:
- ret = Z_DATA_ERROR;
- goto inf_leave;
- case MEM:
- return Z_MEM_ERROR;
- case SYNC:
- default:
- return Z_STREAM_ERROR;
- }
-
- /*
- Return from inflate(), updating the total counts and the check value.
- If there was no progress during the inflate() call, return a buffer
- error. Call updatewindow() to create and/or update the window state.
- Note: a memory error from inflate() is non-recoverable.
- */
- inf_leave:
- RESTORE();
- if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
- if (updatewindow(strm, out)) {
- state->mode = MEM;
- return Z_MEM_ERROR;
- }
- in -= strm->avail_in;
- out -= strm->avail_out;
- strm->total_in += in;
- strm->total_out += out;
- state->total += out;
- if (state->wrap && out)
- strm->adler = state->check =
- UPDATE(state->check, strm->next_out - out, out);
- strm->data_type = state->bits + (state->last ? 64 : 0) +
- (state->mode == TYPE ? 128 : 0);
- if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
- ret = Z_BUF_ERROR;
- return ret;
-}
-
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
-{
- struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
- return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (state->window != Z_NULL) ZFREE(strm, state->window);
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
- Tracev((stderr, "inflate: end\n"));
- return Z_OK;
-}
-
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
-{
- struct inflate_state FAR *state;
- unsigned long id;
-
- /* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (state->wrap != 0 && state->mode != DICT)
- return Z_STREAM_ERROR;
-
- /* check for correct dictionary id */
- if (state->mode == DICT) {
- id = adler32(0L, Z_NULL, 0);
- id = adler32(id, dictionary, dictLength);
- if (id != state->check)
- return Z_DATA_ERROR;
- }
-
- /* copy dictionary to window */
- if (updatewindow(strm, strm->avail_out)) {
- state->mode = MEM;
- return Z_MEM_ERROR;
- }
- if (dictLength > state->wsize) {
- zmemcpy(state->window, dictionary + dictLength - state->wsize,
- state->wsize);
- state->whave = state->wsize;
- }
- else {
- zmemcpy(state->window + state->wsize - dictLength, dictionary,
- dictLength);
- state->whave = dictLength;
- }
- state->havedict = 1;
- Tracev((stderr, "inflate: dictionary set\n"));
- return Z_OK;
-}
-
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
-{
- struct inflate_state FAR *state;
-
- /* check state */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
-
- /* save header structure */
- state->head = head;
- head->done = 0;
- return Z_OK;
-}
-
-/*
- Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found
- or when out of input. When called, *have is the number of pattern bytes
- found in order so far, in 0..3. On return *have is updated to the new
- state. If on return *have equals four, then the pattern was found and the
- return value is how many bytes were read including the last byte of the
- pattern. If *have is less than four, then the pattern has not been found
- yet and the return value is len. In the latter case, syncsearch() can be
- called again with more data and the *have state. *have is initialized to
- zero for the first call.
- */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
-{
- unsigned got;
- unsigned next;
-
- got = *have;
- next = 0;
- while (next < len && got < 4) {
- if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
- got++;
- else if (buf[next])
- got = 0;
- else
- got = 4 - got;
- next++;
- }
- *have = got;
- return next;
-}
-
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
-{
- unsigned len; /* number of bytes to look at or looked at */
- unsigned long in, out; /* temporary to save total_in and total_out */
- unsigned char buf[4]; /* to restore bit buffer to byte string */
- struct inflate_state FAR *state;
-
- /* check parameters */
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
-
- /* if first time, start search in bit buffer */
- if (state->mode != SYNC) {
- state->mode = SYNC;
- state->hold <<= state->bits & 7;
- state->bits -= state->bits & 7;
- len = 0;
- while (state->bits >= 8) {
- buf[len++] = (unsigned char)(state->hold);
- state->hold >>= 8;
- state->bits -= 8;
- }
- state->have = 0;
- syncsearch(&(state->have), buf, len);
- }
-
- /* search available input */
- len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
- strm->avail_in -= len;
- strm->next_in += len;
- strm->total_in += len;
-
- /* return no joy or set up to restart inflate() on a new block */
- if (state->have != 4) return Z_DATA_ERROR;
- in = strm->total_in; out = strm->total_out;
- inflateReset(strm);
- strm->total_in = in; strm->total_out = out;
- state->mode = TYPE;
- return Z_OK;
-}
-
-/*
- Returns true if inflate is currently at the end of a block generated by
- Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
- implementation to provide an additional safety check. PPP uses
- Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
- block. When decompressing, PPP checks that at the end of input packet,
- inflate is waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
-{
- struct inflate_state FAR *state;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
- return state->mode == STORED && state->bits == 0;
-}
-
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
-{
- struct inflate_state FAR *state;
- struct inflate_state FAR *copy;
- unsigned char FAR *window;
- unsigned wsize;
-
- /* check input */
- if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
- source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
- return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)source->state;
-
- /* allocate space */
- copy = (struct inflate_state FAR *)
- ZALLOC(source, 1, sizeof(struct inflate_state));
- if (copy == Z_NULL) return Z_MEM_ERROR;
- window = Z_NULL;
- if (state->window != Z_NULL) {
- window = (unsigned char FAR *)
- ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
- if (window == Z_NULL) {
- ZFREE(source, copy);
- return Z_MEM_ERROR;
- }
- }
-
- /* copy state */
- zmemcpy(dest, source, sizeof(z_stream));
- zmemcpy(copy, state, sizeof(struct inflate_state));
- if (state->lencode >= state->codes &&
- state->lencode <= state->codes + ENOUGH - 1) {
- copy->lencode = copy->codes + (state->lencode - state->codes);
- copy->distcode = copy->codes + (state->distcode - state->codes);
- }
- copy->next = copy->codes + (state->next - state->codes);
- if (window != Z_NULL) {
- wsize = 1U << state->wbits;
- zmemcpy(window, state->window, wsize);
- }
- copy->window = window;
- dest->state = (struct internal_state FAR *)copy;
- return Z_OK;
-}
+/* inflate.c -- zlib decompression
+ * Copyright (C) 1995-2005 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/*
+ * Change history:
+ *
+ * 1.2.beta0 24 Nov 2002
+ * - First version -- complete rewrite of inflate to simplify code, avoid
+ * creation of window when not needed, minimize use of window when it is
+ * needed, make inffast.c even faster, implement gzip decoding, and to
+ * improve code readability and style over the previous zlib inflate code
+ *
+ * 1.2.beta1 25 Nov 2002
+ * - Use pointers for available input and output checking in inffast.c
+ * - Remove input and output counters in inffast.c
+ * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
+ * - Remove unnecessary second byte pull from length extra in inffast.c
+ * - Unroll direct copy to three copies per loop in inffast.c
+ *
+ * 1.2.beta2 4 Dec 2002
+ * - Change external routine names to reduce potential conflicts
+ * - Correct filename to inffixed.h for fixed tables in inflate.c
+ * - Make hbuf[] unsigned char to match parameter type in inflate.c
+ * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
+ * to avoid negation problem on Alphas (64 bit) in inflate.c
+ *
+ * 1.2.beta3 22 Dec 2002
+ * - Add comments on state->bits assertion in inffast.c
+ * - Add comments on op field in inftrees.h
+ * - Fix bug in reuse of allocated window after inflateReset()
+ * - Remove bit fields--back to byte structure for speed
+ * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
+ * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
+ * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
+ * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
+ * - Use local copies of stream next and avail values, as well as local bit
+ * buffer and bit count in inflate()--for speed when inflate_fast() not used
+ *
+ * 1.2.beta4 1 Jan 2003
+ * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
+ * - Move a comment on output buffer sizes from inffast.c to inflate.c
+ * - Add comments in inffast.c to introduce the inflate_fast() routine
+ * - Rearrange window copies in inflate_fast() for speed and simplification
+ * - Unroll last copy for window match in inflate_fast()
+ * - Use local copies of window variables in inflate_fast() for speed
+ * - Pull out common write == 0 case for speed in inflate_fast()
+ * - Make op and len in inflate_fast() unsigned for consistency
+ * - Add FAR to lcode and dcode declarations in inflate_fast()
+ * - Simplified bad distance check in inflate_fast()
+ * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
+ * source file infback.c to provide a call-back interface to inflate for
+ * programs like gzip and unzip -- uses window as output buffer to avoid
+ * window copying
+ *
+ * 1.2.beta5 1 Jan 2003
+ * - Improved inflateBack() interface to allow the caller to provide initial
+ * input in strm.
+ * - Fixed stored blocks bug in inflateBack()
+ *
+ * 1.2.beta6 4 Jan 2003
+ * - Added comments in inffast.c on effectiveness of POSTINC
+ * - Typecasting all around to reduce compiler warnings
+ * - Changed loops from while (1) or do {} while (1) to for (;;), again to
+ * make compilers happy
+ * - Changed type of window in inflateBackInit() to unsigned char *
+ *
+ * 1.2.beta7 27 Jan 2003
+ * - Changed many types to unsigned or unsigned short to avoid warnings
+ * - Added inflateCopy() function
+ *
+ * 1.2.0 9 Mar 2003
+ * - Changed inflateBack() interface to provide separate opaque descriptors
+ * for the in() and out() functions
+ * - Changed inflateBack() argument and in_func typedef to swap the length
+ * and buffer address return values for the input function
+ * - Check next_in and next_out for Z_NULL on entry to inflate()
+ *
+ * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+#include "inflate.h"
+#include "inffast.h"
+
+#ifdef MAKEFIXED
+# ifndef BUILDFIXED
+# define BUILDFIXED
+# endif
+#endif
+
+/* function prototypes */
+local void fixedtables OF((struct inflate_state FAR *state));
+local int updatewindow OF((z_streamp strm, unsigned out));
+#ifdef BUILDFIXED
+ void makefixed OF((void));
+#endif
+local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
+ unsigned len));
+
+int ZEXPORT inflateReset(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ strm->total_in = strm->total_out = state->total = 0;
+ strm->msg = Z_NULL;
+ strm->adler = 1; /* to support ill-conceived Java test suite */
+ state->mode = HEAD;
+ state->last = 0;
+ state->havedict = 0;
+ state->dmax = 32768U;
+ state->head = Z_NULL;
+ state->wsize = 0;
+ state->whave = 0;
+ state->write = 0;
+ state->hold = 0;
+ state->bits = 0;
+ state->lencode = state->distcode = state->next = state->codes;
+ Tracev((stderr, "inflate: reset\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflatePrime(strm, bits, value)
+z_streamp strm;
+int bits;
+int value;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
+ value &= (1L << bits) - 1;
+ state->hold += value << state->bits;
+ state->bits += bits;
+ return Z_OK;
+}
+
+int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
+z_streamp strm;
+int windowBits;
+const char *version;
+int stream_size;
+{
+ struct inflate_state FAR *state;
+
+ if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
+ stream_size != (int)(sizeof(z_stream)))
+ return Z_VERSION_ERROR;
+ if (strm == Z_NULL) return Z_STREAM_ERROR;
+ strm->msg = Z_NULL; /* in case we return an error */
+ if (strm->zalloc == (alloc_func)0) {
+ strm->zalloc = zcalloc;
+ strm->opaque = (voidpf)0;
+ }
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
+ state = (struct inflate_state FAR *)
+ ZALLOC(strm, 1, sizeof(struct inflate_state));
+ if (state == Z_NULL) return Z_MEM_ERROR;
+ Tracev((stderr, "inflate: allocated\n"));
+ strm->state = (struct internal_state FAR *)state;
+ if (windowBits < 0) {
+ state->wrap = 0;
+ windowBits = -windowBits;
+ }
+ else {
+ state->wrap = (windowBits >> 4) + 1;
+#ifdef GUNZIP
+ if (windowBits < 48) windowBits &= 15;
+#endif
+ }
+ if (windowBits < 8 || windowBits > 15) {
+ ZFREE(strm, state);
+ strm->state = Z_NULL;
+ return Z_STREAM_ERROR;
+ }
+ state->wbits = (unsigned)windowBits;
+ state->window = Z_NULL;
+ return inflateReset(strm);
+}
+
+int ZEXPORT inflateInit_(strm, version, stream_size)
+z_streamp strm;
+const char *version;
+int stream_size;
+{
+ return inflateInit2_(strm, DEF_WBITS, version, stream_size);
+}
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding. Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter. This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time. However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+local void fixedtables(state)
+struct inflate_state FAR *state;
+{
+#ifdef BUILDFIXED
+ static int virgin = 1;
+ static code *lenfix, *distfix;
+ static code fixed[544];
+
+ /* build fixed huffman tables if first call (may not be thread safe) */
+ if (virgin) {
+ unsigned sym, bits;
+ static code *next;
+
+ /* literal/length table */
+ sym = 0;
+ while (sym < 144) state->lens[sym++] = 8;
+ while (sym < 256) state->lens[sym++] = 9;
+ while (sym < 280) state->lens[sym++] = 7;
+ while (sym < 288) state->lens[sym++] = 8;
+ next = fixed;
+ lenfix = next;
+ bits = 9;
+ inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
+
+ /* distance table */
+ sym = 0;
+ while (sym < 32) state->lens[sym++] = 5;
+ distfix = next;
+ bits = 5;
+ inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
+
+ /* do this just once */
+ virgin = 0;
+ }
+#else /* !BUILDFIXED */
+# include "inffixed.h"
+#endif /* BUILDFIXED */
+ state->lencode = lenfix;
+ state->lenbits = 9;
+ state->distcode = distfix;
+ state->distbits = 5;
+}
+
+#ifdef MAKEFIXED
+#include <stdio.h>
+
+/*
+ Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also
+ defines BUILDFIXED, so the tables are built on the fly. makefixed() writes
+ those tables to stdout, which would be piped to inffixed.h. A small program
+ can simply call makefixed to do this:
+
+ void makefixed(void);
+
+ int main(void)
+ {
+ makefixed();
+ return 0;
+ }
+
+ Then that can be linked with zlib built with MAKEFIXED defined and run:
+
+ a.out > inffixed.h
+ */
+void makefixed()
+{
+ unsigned low, size;
+ struct inflate_state state;
+
+ fixedtables(&state);
+ puts(" /* inffixed.h -- table for decoding fixed codes");
+ puts(" * Generated automatically by makefixed().");
+ puts(" */");
+ puts("");
+ puts(" /* WARNING: this file should *not* be used by applications.");
+ puts(" It is part of the implementation of this library and is");
+ puts(" subject to change. Applications should only use zlib.h.");
+ puts(" */");
+ puts("");
+ size = 1U << 9;
+ printf(" static const code lenfix[%u] = {", size);
+ low = 0;
+ for (;;) {
+ if ((low % 7) == 0) printf("\n ");
+ printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
+ state.lencode[low].val);
+ if (++low == size) break;
+ putchar(',');
+ }
+ puts("\n };");
+ size = 1U << 5;
+ printf("\n static const code distfix[%u] = {", size);
+ low = 0;
+ for (;;) {
+ if ((low % 6) == 0) printf("\n ");
+ printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
+ state.distcode[low].val);
+ if (++low == size) break;
+ putchar(',');
+ }
+ puts("\n };");
+}
+#endif /* MAKEFIXED */
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning. If window does not exist yet, create it. This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+local int updatewindow(strm, out)
+z_streamp strm;
+unsigned out;
+{
+ struct inflate_state FAR *state;
+ unsigned copy, dist;
+
+ state = (struct inflate_state FAR *)strm->state;
+
+ /* if it hasn't been done already, allocate space for the window */
+ if (state->window == Z_NULL) {
+ state->window = (unsigned char FAR *)
+ ZALLOC(strm, 1U << state->wbits,
+ sizeof(unsigned char));
+ if (state->window == Z_NULL) return 1;
+ }
+
+ /* if window not in use yet, initialize */
+ if (state->wsize == 0) {
+ state->wsize = 1U << state->wbits;
+ state->write = 0;
+ state->whave = 0;
+ }
+
+ /* copy state->wsize or less output bytes into the circular window */
+ copy = out - strm->avail_out;
+ if (copy >= state->wsize) {
+ zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
+ state->write = 0;
+ state->whave = state->wsize;
+ }
+ else {
+ dist = state->wsize - state->write;
+ if (dist > copy) dist = copy;
+ zmemcpy(state->window + state->write, strm->next_out - copy, dist);
+ copy -= dist;
+ if (copy) {
+ zmemcpy(state->window, strm->next_out - copy, copy);
+ state->write = copy;
+ state->whave = state->wsize;
+ }
+ else {
+ state->write += dist;
+ if (state->write == state->wsize) state->write = 0;
+ if (state->whave < state->wsize) state->whave += dist;
+ }
+ }
+ return 0;
+}
+
+/* Macros for inflate(): */
+
+/* check function to use adler32() for zlib or crc32() for gzip */
+#ifdef GUNZIP
+# define UPDATE(check, buf, len) \
+ (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
+#else
+# define UPDATE(check, buf, len) adler32(check, buf, len)
+#endif
+
+/* check macros for header crc */
+#ifdef GUNZIP
+# define CRC2(check, word) \
+ do { \
+ hbuf[0] = (unsigned char)(word); \
+ hbuf[1] = (unsigned char)((word) >> 8); \
+ check = crc32(check, hbuf, 2); \
+ } while (0)
+
+# define CRC4(check, word) \
+ do { \
+ hbuf[0] = (unsigned char)(word); \
+ hbuf[1] = (unsigned char)((word) >> 8); \
+ hbuf[2] = (unsigned char)((word) >> 16); \
+ hbuf[3] = (unsigned char)((word) >> 24); \
+ check = crc32(check, hbuf, 4); \
+ } while (0)
+#endif
+
+/* Load registers with state in inflate() for speed */
+#define LOAD() \
+ do { \
+ put = strm->next_out; \
+ left = strm->avail_out; \
+ next = strm->next_in; \
+ have = strm->avail_in; \
+ hold = state->hold; \
+ bits = state->bits; \
+ } while (0)
+
+/* Restore state from registers in inflate() */
+#define RESTORE() \
+ do { \
+ strm->next_out = put; \
+ strm->avail_out = left; \
+ strm->next_in = next; \
+ strm->avail_in = have; \
+ state->hold = hold; \
+ state->bits = bits; \
+ } while (0)
+
+/* Clear the input bit accumulator */
+#define INITBITS() \
+ do { \
+ hold = 0; \
+ bits = 0; \
+ } while (0)
+
+/* Get a byte of input into the bit accumulator, or return from inflate()
+ if there is no input available. */
+#define PULLBYTE() \
+ do { \
+ if (have == 0) goto inf_leave; \
+ have--; \
+ hold += (unsigned long)(*next++) << bits; \
+ bits += 8; \
+ } while (0)
+
+/* Assure that there are at least n bits in the bit accumulator. If there is
+ not enough available input to do that, then return from inflate(). */
+#define NEEDBITS(n) \
+ do { \
+ while (bits < (unsigned)(n)) \
+ PULLBYTE(); \
+ } while (0)
+
+/* Return the low n bits of the bit accumulator (n < 16) */
+#define BITS(n) \
+ ((unsigned)hold & ((1U << (n)) - 1))
+
+/* Remove n bits from the bit accumulator */
+#define DROPBITS(n) \
+ do { \
+ hold >>= (n); \
+ bits -= (unsigned)(n); \
+ } while (0)
+
+/* Remove zero to seven bits as needed to go to a byte boundary */
+#define BYTEBITS() \
+ do { \
+ hold >>= bits & 7; \
+ bits -= bits & 7; \
+ } while (0)
+
+/* Reverse the bytes in a 32-bit value */
+#define REVERSE(q) \
+ ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
+ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
+
+/*
+ inflate() uses a state machine to process as much input data and generate as
+ much output data as possible before returning. The state machine is
+ structured roughly as follows:
+
+ for (;;) switch (state) {
+ ...
+ case STATEn:
+ if (not enough input data or output space to make progress)
+ return;
+ ... make progress ...
+ state = STATEm;
+ break;
+ ...
+ }
+
+ so when inflate() is called again, the same case is attempted again, and
+ if the appropriate resources are provided, the machine proceeds to the
+ next state. The NEEDBITS() macro is usually the way the state evaluates
+ whether it can proceed or should return. NEEDBITS() does the return if
+ the requested bits are not available. The typical use of the BITS macros
+ is:
+
+ NEEDBITS(n);
+ ... do something with BITS(n) ...
+ DROPBITS(n);
+
+ where NEEDBITS(n) either returns from inflate() if there isn't enough
+ input left to load n bits into the accumulator, or it continues. BITS(n)
+ gives the low n bits in the accumulator. When done, DROPBITS(n) drops
+ the low n bits off the accumulator. INITBITS() clears the accumulator
+ and sets the number of available bits to zero. BYTEBITS() discards just
+ enough bits to put the accumulator on a byte boundary. After BYTEBITS()
+ and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
+
+ NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
+ if there is no input available. The decoding of variable length codes uses
+ PULLBYTE() directly in order to pull just enough bytes to decode the next
+ code, and no more.
+
+ Some states loop until they get enough input, making sure that enough
+ state information is maintained to continue the loop where it left off
+ if NEEDBITS() returns in the loop. For example, want, need, and keep
+ would all have to actually be part of the saved state in case NEEDBITS()
+ returns:
+
+ case STATEw:
+ while (want < need) {
+ NEEDBITS(n);
+ keep[want++] = BITS(n);
+ DROPBITS(n);
+ }
+ state = STATEx;
+ case STATEx:
+
+ As shown above, if the next state is also the next case, then the break
+ is omitted.
+
+ A state may also return if there is not enough output space available to
+ complete that state. Those states are copying stored data, writing a
+ literal byte, and copying a matching string.
+
+ When returning, a "goto inf_leave" is used to update the total counters,
+ update the check value, and determine whether any progress has been made
+ during that inflate() call in order to return the proper return code.
+ Progress is defined as a change in either strm->avail_in or strm->avail_out.
+ When there is a window, goto inf_leave will update the window with the last
+ output written. If a goto inf_leave occurs in the middle of decompression
+ and there is no window currently, goto inf_leave will create one and copy
+ output to the window for the next call of inflate().
+
+ In this implementation, the flush parameter of inflate() only affects the
+ return code (per zlib.h). inflate() always writes as much as possible to
+ strm->next_out, given the space available and the provided input--the effect
+ documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers
+ the allocation of and copying into a sliding window until necessary, which
+ provides the effect documented in zlib.h for Z_FINISH when the entire input
+ stream available. So the only thing the flush parameter actually does is:
+ when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it
+ will return Z_BUF_ERROR if it has not reached the end of the stream.
+ */
+
+int ZEXPORT inflate(strm, flush)
+z_streamp strm;
+int flush;
+{
+ struct inflate_state FAR *state;
+ unsigned char FAR *next; /* next input */
+ unsigned char FAR *put; /* next output */
+ unsigned have, left; /* available input and output */
+ unsigned long hold; /* bit buffer */
+ unsigned bits; /* bits in bit buffer */
+ unsigned in, out; /* save starting available input and output */
+ unsigned copy; /* number of stored or match bytes to copy */
+ unsigned char FAR *from; /* where to copy match bytes from */
+ code this; /* current decoding table entry */
+ code last; /* parent table entry */
+ unsigned len; /* length to copy for repeats, bits to drop */
+ int ret; /* return code */
+#ifdef GUNZIP
+ unsigned char hbuf[4]; /* buffer for gzip header crc calculation */
+#endif
+ static const unsigned short order[19] = /* permutation of code lengths */
+ {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
+ (strm->next_in == Z_NULL && strm->avail_in != 0))
+ return Z_STREAM_ERROR;
+
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
+ LOAD();
+ in = have;
+ out = left;
+ ret = Z_OK;
+ for (;;)
+ switch (state->mode) {
+ case HEAD:
+ if (state->wrap == 0) {
+ state->mode = TYPEDO;
+ break;
+ }
+ NEEDBITS(16);
+#ifdef GUNZIP
+ if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
+ state->check = crc32(0L, Z_NULL, 0);
+ CRC2(state->check, hold);
+ INITBITS();
+ state->mode = FLAGS;
+ break;
+ }
+ state->flags = 0; /* expect zlib header */
+ if (state->head != Z_NULL)
+ state->head->done = -1;
+ if (!(state->wrap & 1) || /* check if zlib header allowed */
+#else
+ if (
+#endif
+ ((BITS(8) << 8) + (hold >> 8)) % 31) {
+ strm->msg = (char *)"incorrect header check";
+ state->mode = BAD;
+ break;
+ }
+ if (BITS(4) != Z_DEFLATED) {
+ strm->msg = (char *)"unknown compression method";
+ state->mode = BAD;
+ break;
+ }
+ DROPBITS(4);
+ len = BITS(4) + 8;
+ if (len > state->wbits) {
+ strm->msg = (char *)"invalid window size";
+ state->mode = BAD;
+ break;
+ }
+ state->dmax = 1U << len;
+ Tracev((stderr, "inflate: zlib header ok\n"));
+ strm->adler = state->check = adler32(0L, Z_NULL, 0);
+ state->mode = hold & 0x200 ? DICTID : TYPE;
+ INITBITS();
+ break;
+#ifdef GUNZIP
+ case FLAGS:
+ NEEDBITS(16);
+ state->flags = (int)(hold);
+ if ((state->flags & 0xff) != Z_DEFLATED) {
+ strm->msg = (char *)"unknown compression method";
+ state->mode = BAD;
+ break;
+ }
+ if (state->flags & 0xe000) {
+ strm->msg = (char *)"unknown header flags set";
+ state->mode = BAD;
+ break;
+ }
+ if (state->head != Z_NULL)
+ state->head->text = (int)((hold >> 8) & 1);
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ state->mode = TIME;
+ case TIME:
+ NEEDBITS(32);
+ if (state->head != Z_NULL)
+ state->head->time = hold;
+ if (state->flags & 0x0200) CRC4(state->check, hold);
+ INITBITS();
+ state->mode = OS;
+ case OS:
+ NEEDBITS(16);
+ if (state->head != Z_NULL) {
+ state->head->xflags = (int)(hold & 0xff);
+ state->head->os = (int)(hold >> 8);
+ }
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ state->mode = EXLEN;
+ case EXLEN:
+ if (state->flags & 0x0400) {
+ NEEDBITS(16);
+ state->length = (unsigned)(hold);
+ if (state->head != Z_NULL)
+ state->head->extra_len = (unsigned)hold;
+ if (state->flags & 0x0200) CRC2(state->check, hold);
+ INITBITS();
+ }
+ else if (state->head != Z_NULL)
+ state->head->extra = Z_NULL;
+ state->mode = EXTRA;
+ case EXTRA:
+ if (state->flags & 0x0400) {
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
+ if (state->head != Z_NULL &&
+ state->head->extra != Z_NULL) {
+ len = state->head->extra_len - state->length;
+ zmemcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);
+ }
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ state->length -= copy;
+ }
+ if (state->length) goto inf_leave;
+ }
+ state->length = 0;
+ state->mode = NAME;
+ case NAME:
+ if (state->flags & 0x0800) {
+ if (have == 0) goto inf_leave;
+ copy = 0;
+ do {
+ len = (unsigned)(next[copy++]);
+ if (state->head != Z_NULL &&
+ state->head->name != Z_NULL &&
+ state->length < state->head->name_max)
+ state->head->name[state->length++] = len;
+ } while (len && copy < have);
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ if (len) goto inf_leave;
+ }
+ else if (state->head != Z_NULL)
+ state->head->name = Z_NULL;
+ state->length = 0;
+ state->mode = COMMENT;
+ case COMMENT:
+ if (state->flags & 0x1000) {
+ if (have == 0) goto inf_leave;
+ copy = 0;
+ do {
+ len = (unsigned)(next[copy++]);
+ if (state->head != Z_NULL &&
+ state->head->comment != Z_NULL &&
+ state->length < state->head->comm_max)
+ state->head->comment[state->length++] = len;
+ } while (len && copy < have);
+ if (state->flags & 0x0200)
+ state->check = crc32(state->check, next, copy);
+ have -= copy;
+ next += copy;
+ if (len) goto inf_leave;
+ }
+ else if (state->head != Z_NULL)
+ state->head->comment = Z_NULL;
+ state->mode = HCRC;
+ case HCRC:
+ if (state->flags & 0x0200) {
+ NEEDBITS(16);
+ if (hold != (state->check & 0xffff)) {
+ strm->msg = (char *)"header crc mismatch";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ }
+ if (state->head != Z_NULL) {
+ state->head->hcrc = (int)((state->flags >> 9) & 1);
+ state->head->done = 1;
+ }
+ strm->adler = state->check = crc32(0L, Z_NULL, 0);
+ state->mode = TYPE;
+ break;
+#endif
+ case DICTID:
+ NEEDBITS(32);
+ strm->adler = state->check = REVERSE(hold);
+ INITBITS();
+ state->mode = DICT;
+ case DICT:
+ if (state->havedict == 0) {
+ RESTORE();
+ return Z_NEED_DICT;
+ }
+ strm->adler = state->check = adler32(0L, Z_NULL, 0);
+ state->mode = TYPE;
+ case TYPE:
+ if (flush == Z_BLOCK) goto inf_leave;
+ case TYPEDO:
+ if (state->last) {
+ BYTEBITS();
+ state->mode = CHECK;
+ break;
+ }
+ NEEDBITS(3);
+ state->last = BITS(1);
+ DROPBITS(1);
+ switch (BITS(2)) {
+ case 0: /* stored block */
+ Tracev((stderr, "inflate: stored block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = STORED;
+ break;
+ case 1: /* fixed block */
+ fixedtables(state);
+ Tracev((stderr, "inflate: fixed codes block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = LEN; /* decode codes */
+ break;
+ case 2: /* dynamic block */
+ Tracev((stderr, "inflate: dynamic codes block%s\n",
+ state->last ? " (last)" : ""));
+ state->mode = TABLE;
+ break;
+ case 3:
+ strm->msg = (char *)"invalid block type";
+ state->mode = BAD;
+ }
+ DROPBITS(2);
+ break;
+ case STORED:
+ BYTEBITS(); /* go to byte boundary */
+ NEEDBITS(32);
+ if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
+ strm->msg = (char *)"invalid stored block lengths";
+ state->mode = BAD;
+ break;
+ }
+ state->length = (unsigned)hold & 0xffff;
+ Tracev((stderr, "inflate: stored length %u\n",
+ state->length));
+ INITBITS();
+ state->mode = COPY;
+ case COPY:
+ copy = state->length;
+ if (copy) {
+ if (copy > have) copy = have;
+ if (copy > left) copy = left;
+ if (copy == 0) goto inf_leave;
+ zmemcpy(put, next, copy);
+ have -= copy;
+ next += copy;
+ left -= copy;
+ put += copy;
+ state->length -= copy;
+ break;
+ }
+ Tracev((stderr, "inflate: stored end\n"));
+ state->mode = TYPE;
+ break;
+ case TABLE:
+ NEEDBITS(14);
+ state->nlen = BITS(5) + 257;
+ DROPBITS(5);
+ state->ndist = BITS(5) + 1;
+ DROPBITS(5);
+ state->ncode = BITS(4) + 4;
+ DROPBITS(4);
+#ifndef PKZIP_BUG_WORKAROUND
+ if (state->nlen > 286 || state->ndist > 30) {
+ strm->msg = (char *)"too many length or distance symbols";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ Tracev((stderr, "inflate: table sizes ok\n"));
+ state->have = 0;
+ state->mode = LENLENS;
+ case LENLENS:
+ while (state->have < state->ncode) {
+ NEEDBITS(3);
+ state->lens[order[state->have++]] = (unsigned short)BITS(3);
+ DROPBITS(3);
+ }
+ while (state->have < 19)
+ state->lens[order[state->have++]] = 0;
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+ state->lenbits = 7;
+ ret = inflate_table(CODES, state->lens, 19, &(state->next),
+ &(state->lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid code lengths set";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: code lengths ok\n"));
+ state->have = 0;
+ state->mode = CODELENS;
+ case CODELENS:
+ while (state->have < state->nlen + state->ndist) {
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (this.val < 16) {
+ NEEDBITS(this.bits);
+ DROPBITS(this.bits);
+ state->lens[state->have++] = this.val;
+ }
+ else {
+ if (this.val == 16) {
+ NEEDBITS(this.bits + 2);
+ DROPBITS(this.bits);
+ if (state->have == 0) {
+ strm->msg = (char *)"invalid bit length repeat";
+ state->mode = BAD;
+ break;
+ }
+ len = state->lens[state->have - 1];
+ copy = 3 + BITS(2);
+ DROPBITS(2);
+ }
+ else if (this.val == 17) {
+ NEEDBITS(this.bits + 3);
+ DROPBITS(this.bits);
+ len = 0;
+ copy = 3 + BITS(3);
+ DROPBITS(3);
+ }
+ else {
+ NEEDBITS(this.bits + 7);
+ DROPBITS(this.bits);
+ len = 0;
+ copy = 11 + BITS(7);
+ DROPBITS(7);
+ }
+ if (state->have + copy > state->nlen + state->ndist) {
+ strm->msg = (char *)"invalid bit length repeat";
+ state->mode = BAD;
+ break;
+ }
+ while (copy--)
+ state->lens[state->have++] = (unsigned short)len;
+ }
+ }
+
+ /* handle error breaks in while */
+ if (state->mode == BAD) break;
+
+ /* build code tables */
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+ state->lenbits = 9;
+ ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
+ &(state->lenbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid literal/lengths set";
+ state->mode = BAD;
+ break;
+ }
+ state->distcode = (code const FAR *)(state->next);
+ state->distbits = 6;
+ ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
+ &(state->next), &(state->distbits), state->work);
+ if (ret) {
+ strm->msg = (char *)"invalid distances set";
+ state->mode = BAD;
+ break;
+ }
+ Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN;
+ case LEN:
+ if (have >= 6 && left >= 258) {
+ RESTORE();
+ inflate_fast(strm, out);
+ LOAD();
+ break;
+ }
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if (this.op && (this.op & 0xf0) == 0) {
+ last = this;
+ for (;;) {
+ this = state->lencode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(this.bits);
+ state->length = (unsigned)this.val;
+ if ((int)(this.op) == 0) {
+ Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ "inflate: literal '%c'\n" :
+ "inflate: literal 0x%02x\n", this.val));
+ state->mode = LIT;
+ break;
+ }
+ if (this.op & 32) {
+ Tracevv((stderr, "inflate: end of block\n"));
+ state->mode = TYPE;
+ break;
+ }
+ if (this.op & 64) {
+ strm->msg = (char *)"invalid literal/length code";
+ state->mode = BAD;
+ break;
+ }
+ state->extra = (unsigned)(this.op) & 15;
+ state->mode = LENEXT;
+ case LENEXT:
+ if (state->extra) {
+ NEEDBITS(state->extra);
+ state->length += BITS(state->extra);
+ DROPBITS(state->extra);
+ }
+ Tracevv((stderr, "inflate: length %u\n", state->length));
+ state->mode = DIST;
+ case DIST:
+ for (;;) {
+ this = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ if ((this.op & 0xf0) == 0) {
+ last = this;
+ for (;;) {
+ this = state->distcode[last.val +
+ (BITS(last.bits + last.op) >> last.bits)];
+ if ((unsigned)(last.bits + this.bits) <= bits) break;
+ PULLBYTE();
+ }
+ DROPBITS(last.bits);
+ }
+ DROPBITS(this.bits);
+ if (this.op & 64) {
+ strm->msg = (char *)"invalid distance code";
+ state->mode = BAD;
+ break;
+ }
+ state->offset = (unsigned)this.val;
+ state->extra = (unsigned)(this.op) & 15;
+ state->mode = DISTEXT;
+ case DISTEXT:
+ if (state->extra) {
+ NEEDBITS(state->extra);
+ state->offset += BITS(state->extra);
+ DROPBITS(state->extra);
+ }
+#ifdef INFLATE_STRICT
+ if (state->offset > state->dmax) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#endif
+ if (state->offset > state->whave + out - left) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+ Tracevv((stderr, "inflate: distance %u\n", state->offset));
+ state->mode = MATCH;
+ case MATCH:
+ if (left == 0) goto inf_leave;
+ copy = out - left;
+ if (state->offset > copy) { /* copy from window */
+ copy = state->offset - copy;
+ if (copy > state->write) {
+ copy -= state->write;
+ from = state->window + (state->wsize - copy);
+ }
+ else
+ from = state->window + (state->write - copy);
+ if (copy > state->length) copy = state->length;
+ }
+ else { /* copy from output */
+ from = put - state->offset;
+ copy = state->length;
+ }
+ if (copy > left) copy = left;
+ left -= copy;
+ state->length -= copy;
+ do {
+ *put++ = *from++;
+ } while (--copy);
+ if (state->length == 0) state->mode = LEN;
+ break;
+ case LIT:
+ if (left == 0) goto inf_leave;
+ *put++ = (unsigned char)(state->length);
+ left--;
+ state->mode = LEN;
+ break;
+ case CHECK:
+ if (state->wrap) {
+ NEEDBITS(32);
+ out -= left;
+ strm->total_out += out;
+ state->total += out;
+ if (out)
+ strm->adler = state->check =
+ UPDATE(state->check, put - out, out);
+ out = left;
+ if ((
+#ifdef GUNZIP
+ state->flags ? hold :
+#endif
+ REVERSE(hold)) != state->check) {
+ strm->msg = (char *)"incorrect data check";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ Tracev((stderr, "inflate: check matches trailer\n"));
+ }
+#ifdef GUNZIP
+ state->mode = LENGTH;
+ case LENGTH:
+ if (state->wrap && state->flags) {
+ NEEDBITS(32);
+ if (hold != (state->total & 0xffffffffUL)) {
+ strm->msg = (char *)"incorrect length check";
+ state->mode = BAD;
+ break;
+ }
+ INITBITS();
+ Tracev((stderr, "inflate: length matches trailer\n"));
+ }
+#endif
+ state->mode = DONE;
+ case DONE:
+ ret = Z_STREAM_END;
+ goto inf_leave;
+ case BAD:
+ ret = Z_DATA_ERROR;
+ goto inf_leave;
+ case MEM:
+ return Z_MEM_ERROR;
+ case SYNC:
+ default:
+ return Z_STREAM_ERROR;
+ }
+
+ /*
+ Return from inflate(), updating the total counts and the check value.
+ If there was no progress during the inflate() call, return a buffer
+ error. Call updatewindow() to create and/or update the window state.
+ Note: a memory error from inflate() is non-recoverable.
+ */
+ inf_leave:
+ RESTORE();
+ if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
+ if (updatewindow(strm, out)) {
+ state->mode = MEM;
+ return Z_MEM_ERROR;
+ }
+ in -= strm->avail_in;
+ out -= strm->avail_out;
+ strm->total_in += in;
+ strm->total_out += out;
+ state->total += out;
+ if (state->wrap && out)
+ strm->adler = state->check =
+ UPDATE(state->check, strm->next_out - out, out);
+ strm->data_type = state->bits + (state->last ? 64 : 0) +
+ (state->mode == TYPE ? 128 : 0);
+ if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
+ ret = Z_BUF_ERROR;
+ return ret;
+}
+
+int ZEXPORT inflateEnd(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+ if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->window != Z_NULL) ZFREE(strm, state->window);
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+ Tracev((stderr, "inflate: end\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
+z_streamp strm;
+const Bytef *dictionary;
+uInt dictLength;
+{
+ struct inflate_state FAR *state;
+ unsigned long id;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (state->wrap != 0 && state->mode != DICT)
+ return Z_STREAM_ERROR;
+
+ /* check for correct dictionary id */
+ if (state->mode == DICT) {
+ id = adler32(0L, Z_NULL, 0);
+ id = adler32(id, dictionary, dictLength);
+ if (id != state->check)
+ return Z_DATA_ERROR;
+ }
+
+ /* copy dictionary to window */
+ if (updatewindow(strm, strm->avail_out)) {
+ state->mode = MEM;
+ return Z_MEM_ERROR;
+ }
+ if (dictLength > state->wsize) {
+ zmemcpy(state->window, dictionary + dictLength - state->wsize,
+ state->wsize);
+ state->whave = state->wsize;
+ }
+ else {
+ zmemcpy(state->window + state->wsize - dictLength, dictionary,
+ dictLength);
+ state->whave = dictLength;
+ }
+ state->havedict = 1;
+ Tracev((stderr, "inflate: dictionary set\n"));
+ return Z_OK;
+}
+
+int ZEXPORT inflateGetHeader(strm, head)
+z_streamp strm;
+gz_headerp head;
+{
+ struct inflate_state FAR *state;
+
+ /* check state */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
+
+ /* save header structure */
+ state->head = head;
+ head->done = 0;
+ return Z_OK;
+}
+
+/*
+ Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found
+ or when out of input. When called, *have is the number of pattern bytes
+ found in order so far, in 0..3. On return *have is updated to the new
+ state. If on return *have equals four, then the pattern was found and the
+ return value is how many bytes were read including the last byte of the
+ pattern. If *have is less than four, then the pattern has not been found
+ yet and the return value is len. In the latter case, syncsearch() can be
+ called again with more data and the *have state. *have is initialized to
+ zero for the first call.
+ */
+local unsigned syncsearch(have, buf, len)
+unsigned FAR *have;
+unsigned char FAR *buf;
+unsigned len;
+{
+ unsigned got;
+ unsigned next;
+
+ got = *have;
+ next = 0;
+ while (next < len && got < 4) {
+ if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
+ got++;
+ else if (buf[next])
+ got = 0;
+ else
+ got = 4 - got;
+ next++;
+ }
+ *have = got;
+ return next;
+}
+
+int ZEXPORT inflateSync(strm)
+z_streamp strm;
+{
+ unsigned len; /* number of bytes to look at or looked at */
+ unsigned long in, out; /* temporary to save total_in and total_out */
+ unsigned char buf[4]; /* to restore bit buffer to byte string */
+ struct inflate_state FAR *state;
+
+ /* check parameters */
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
+
+ /* if first time, start search in bit buffer */
+ if (state->mode != SYNC) {
+ state->mode = SYNC;
+ state->hold <<= state->bits & 7;
+ state->bits -= state->bits & 7;
+ len = 0;
+ while (state->bits >= 8) {
+ buf[len++] = (unsigned char)(state->hold);
+ state->hold >>= 8;
+ state->bits -= 8;
+ }
+ state->have = 0;
+ syncsearch(&(state->have), buf, len);
+ }
+
+ /* search available input */
+ len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
+ strm->avail_in -= len;
+ strm->next_in += len;
+ strm->total_in += len;
+
+ /* return no joy or set up to restart inflate() on a new block */
+ if (state->have != 4) return Z_DATA_ERROR;
+ in = strm->total_in; out = strm->total_out;
+ inflateReset(strm);
+ strm->total_in = in; strm->total_out = out;
+ state->mode = TYPE;
+ return Z_OK;
+}
+
+/*
+ Returns true if inflate is currently at the end of a block generated by
+ Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
+ implementation to provide an additional safety check. PPP uses
+ Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
+ block. When decompressing, PPP checks that at the end of input packet,
+ inflate is waiting for these length bytes.
+ */
+int ZEXPORT inflateSyncPoint(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ return state->mode == STORED && state->bits == 0;
+}
+
+int ZEXPORT inflateCopy(dest, source)
+z_streamp dest;
+z_streamp source;
+{
+ struct inflate_state FAR *state;
+ struct inflate_state FAR *copy;
+ unsigned char FAR *window;
+ unsigned wsize;
+
+ /* check input */
+ if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
+ source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
+ return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)source->state;
+
+ /* allocate space */
+ copy = (struct inflate_state FAR *)
+ ZALLOC(source, 1, sizeof(struct inflate_state));
+ if (copy == Z_NULL) return Z_MEM_ERROR;
+ window = Z_NULL;
+ if (state->window != Z_NULL) {
+ window = (unsigned char FAR *)
+ ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
+ if (window == Z_NULL) {
+ ZFREE(source, copy);
+ return Z_MEM_ERROR;
+ }
+ }
+
+ /* copy state */
+ zmemcpy(dest, source, sizeof(z_stream));
+ zmemcpy(copy, state, sizeof(struct inflate_state));
+ if (state->lencode >= state->codes &&
+ state->lencode <= state->codes + ENOUGH - 1) {
+ copy->lencode = copy->codes + (state->lencode - state->codes);
+ copy->distcode = copy->codes + (state->distcode - state->codes);
+ }
+ copy->next = copy->codes + (state->next - state->codes);
+ if (window != Z_NULL) {
+ wsize = 1U << state->wbits;
+ zmemcpy(window, state->window, wsize);
+ }
+ copy->window = window;
+ dest->state = (struct internal_state FAR *)copy;
+ return Z_OK;
+}
diff --git a/Contrib/zip2exe/zlib/inflate.h b/Contrib/zip2exe/zlib/inflate.h
index fbbc871..07bd3e7 100755
--- a/Contrib/zip2exe/zlib/inflate.h
+++ b/Contrib/zip2exe/zlib/inflate.h
@@ -1,115 +1,115 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
- trailer decoding by inflate(). NO_GZIP would be used to avoid linking in
- the crc code when it is not needed. For shared libraries, gzip decoding
- should be left enabled. */
-#ifndef NO_GZIP
-# define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
- HEAD, /* i: waiting for magic header */
- FLAGS, /* i: waiting for method and flags (gzip) */
- TIME, /* i: waiting for modification time (gzip) */
- OS, /* i: waiting for extra flags and operating system (gzip) */
- EXLEN, /* i: waiting for extra length (gzip) */
- EXTRA, /* i: waiting for extra bytes (gzip) */
- NAME, /* i: waiting for end of file name (gzip) */
- COMMENT, /* i: waiting for end of comment (gzip) */
- HCRC, /* i: waiting for header crc (gzip) */
- DICTID, /* i: waiting for dictionary check value */
- DICT, /* waiting for inflateSetDictionary() call */
- TYPE, /* i: waiting for type bits, including last-flag bit */
- TYPEDO, /* i: same, but skip check to exit inflate on new block */
- STORED, /* i: waiting for stored size (length and complement) */
- COPY, /* i/o: waiting for input or output to copy stored block */
- TABLE, /* i: waiting for dynamic block table lengths */
- LENLENS, /* i: waiting for code length code lengths */
- CODELENS, /* i: waiting for length/lit and distance code lengths */
- LEN, /* i: waiting for length/lit code */
- LENEXT, /* i: waiting for length extra bits */
- DIST, /* i: waiting for distance code */
- DISTEXT, /* i: waiting for distance extra bits */
- MATCH, /* o: waiting for output space to copy string */
- LIT, /* o: waiting for output space to write literal */
- CHECK, /* i: waiting for 32-bit check value */
- LENGTH, /* i: waiting for 32-bit length (gzip) */
- DONE, /* finished check, done -- remain here until reset */
- BAD, /* got a data error -- remain here until reset */
- MEM, /* got an inflate() memory error -- remain here until reset */
- SYNC /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
- State transitions between above modes -
-
- (most modes can go to the BAD or MEM mode -- not shown for clarity)
-
- Process header:
- HEAD -> (gzip) or (zlib)
- (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
- NAME -> COMMENT -> HCRC -> TYPE
- (zlib) -> DICTID or TYPE
- DICTID -> DICT -> TYPE
- Read deflate blocks:
- TYPE -> STORED or TABLE or LEN or CHECK
- STORED -> COPY -> TYPE
- TABLE -> LENLENS -> CODELENS -> LEN
- Read deflate codes:
- LEN -> LENEXT or LIT or TYPE
- LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
- LIT -> LEN
- Process trailer:
- CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls. Approximately 7K bytes. */
-struct inflate_state {
- inflate_mode mode; /* current inflate mode */
- int last; /* true if processing last block */
- int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
- int havedict; /* true if dictionary provided */
- int flags; /* gzip header method and flags (0 if zlib) */
- unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
- unsigned long check; /* protected copy of check value */
- unsigned long total; /* protected copy of output count */
- gz_headerp head; /* where to save gzip header information */
- /* sliding window */
- unsigned wbits; /* log base 2 of requested window size */
- unsigned wsize; /* window size or zero if not using window */
- unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
- unsigned char FAR *window; /* allocated sliding window, if needed */
- /* bit accumulator */
- unsigned long hold; /* input bit accumulator */
- unsigned bits; /* number of bits in "in" */
- /* for string and stored block copying */
- unsigned length; /* literal or length of data to copy */
- unsigned offset; /* distance back to copy string from */
- /* for table and code decoding */
- unsigned extra; /* extra bits needed */
- /* fixed and dynamic code tables */
- code const FAR *lencode; /* starting table for length/literal codes */
- code const FAR *distcode; /* starting table for distance codes */
- unsigned lenbits; /* index bits for lencode */
- unsigned distbits; /* index bits for distcode */
- /* dynamic table building */
- unsigned ncode; /* number of code length code lengths */
- unsigned nlen; /* number of length code lengths */
- unsigned ndist; /* number of distance code lengths */
- unsigned have; /* number of code lengths in lens[] */
- code FAR *next; /* next available space in codes[] */
- unsigned short lens[320]; /* temporary storage for code lengths */
- unsigned short work[288]; /* work area for code table building */
- code codes[ENOUGH]; /* space for code tables */
-};
+/* inflate.h -- internal inflate state definition
+ * Copyright (C) 1995-2004 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* define NO_GZIP when compiling if you want to disable gzip header and
+ trailer decoding by inflate(). NO_GZIP would be used to avoid linking in
+ the crc code when it is not needed. For shared libraries, gzip decoding
+ should be left enabled. */
+#ifndef NO_GZIP
+# define GUNZIP
+#endif
+
+/* Possible inflate modes between inflate() calls */
+typedef enum {
+ HEAD, /* i: waiting for magic header */
+ FLAGS, /* i: waiting for method and flags (gzip) */
+ TIME, /* i: waiting for modification time (gzip) */
+ OS, /* i: waiting for extra flags and operating system (gzip) */
+ EXLEN, /* i: waiting for extra length (gzip) */
+ EXTRA, /* i: waiting for extra bytes (gzip) */
+ NAME, /* i: waiting for end of file name (gzip) */
+ COMMENT, /* i: waiting for end of comment (gzip) */
+ HCRC, /* i: waiting for header crc (gzip) */
+ DICTID, /* i: waiting for dictionary check value */
+ DICT, /* waiting for inflateSetDictionary() call */
+ TYPE, /* i: waiting for type bits, including last-flag bit */
+ TYPEDO, /* i: same, but skip check to exit inflate on new block */
+ STORED, /* i: waiting for stored size (length and complement) */
+ COPY, /* i/o: waiting for input or output to copy stored block */
+ TABLE, /* i: waiting for dynamic block table lengths */
+ LENLENS, /* i: waiting for code length code lengths */
+ CODELENS, /* i: waiting for length/lit and distance code lengths */
+ LEN, /* i: waiting for length/lit code */
+ LENEXT, /* i: waiting for length extra bits */
+ DIST, /* i: waiting for distance code */
+ DISTEXT, /* i: waiting for distance extra bits */
+ MATCH, /* o: waiting for output space to copy string */
+ LIT, /* o: waiting for output space to write literal */
+ CHECK, /* i: waiting for 32-bit check value */
+ LENGTH, /* i: waiting for 32-bit length (gzip) */
+ DONE, /* finished check, done -- remain here until reset */
+ BAD, /* got a data error -- remain here until reset */
+ MEM, /* got an inflate() memory error -- remain here until reset */
+ SYNC /* looking for synchronization bytes to restart inflate() */
+} inflate_mode;
+
+/*
+ State transitions between above modes -
+
+ (most modes can go to the BAD or MEM mode -- not shown for clarity)
+
+ Process header:
+ HEAD -> (gzip) or (zlib)
+ (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
+ NAME -> COMMENT -> HCRC -> TYPE
+ (zlib) -> DICTID or TYPE
+ DICTID -> DICT -> TYPE
+ Read deflate blocks:
+ TYPE -> STORED or TABLE or LEN or CHECK
+ STORED -> COPY -> TYPE
+ TABLE -> LENLENS -> CODELENS -> LEN
+ Read deflate codes:
+ LEN -> LENEXT or LIT or TYPE
+ LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
+ LIT -> LEN
+ Process trailer:
+ CHECK -> LENGTH -> DONE
+ */
+
+/* state maintained between inflate() calls. Approximately 7K bytes. */
+struct inflate_state {
+ inflate_mode mode; /* current inflate mode */
+ int last; /* true if processing last block */
+ int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
+ int havedict; /* true if dictionary provided */
+ int flags; /* gzip header method and flags (0 if zlib) */
+ unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */
+ unsigned long check; /* protected copy of check value */
+ unsigned long total; /* protected copy of output count */
+ gz_headerp head; /* where to save gzip header information */
+ /* sliding window */
+ unsigned wbits; /* log base 2 of requested window size */
+ unsigned wsize; /* window size or zero if not using window */
+ unsigned whave; /* valid bytes in the window */
+ unsigned write; /* window write index */
+ unsigned char FAR *window; /* allocated sliding window, if needed */
+ /* bit accumulator */
+ unsigned long hold; /* input bit accumulator */
+ unsigned bits; /* number of bits in "in" */
+ /* for string and stored block copying */
+ unsigned length; /* literal or length of data to copy */
+ unsigned offset; /* distance back to copy string from */
+ /* for table and code decoding */
+ unsigned extra; /* extra bits needed */
+ /* fixed and dynamic code tables */
+ code const FAR *lencode; /* starting table for length/literal codes */
+ code const FAR *distcode; /* starting table for distance codes */
+ unsigned lenbits; /* index bits for lencode */
+ unsigned distbits; /* index bits for distcode */
+ /* dynamic table building */
+ unsigned ncode; /* number of code length code lengths */
+ unsigned nlen; /* number of length code lengths */
+ unsigned ndist; /* number of distance code lengths */
+ unsigned have; /* number of code lengths in lens[] */
+ code FAR *next; /* next available space in codes[] */
+ unsigned short lens[320]; /* temporary storage for code lengths */
+ unsigned short work[288]; /* work area for code table building */
+ code codes[ENOUGH]; /* space for code tables */
+};
diff --git a/Contrib/zip2exe/zlib/inftrees.c b/Contrib/zip2exe/zlib/inftrees.c
index 38ded81..8a9c13f 100755
--- a/Contrib/zip2exe/zlib/inftrees.c
+++ b/Contrib/zip2exe/zlib/inftrees.c
@@ -1,329 +1,329 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#define MAXBITS 15
-
-const char inflate_copyright[] =
- " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-
-/*
- Build a set of tables to decode the provided canonical Huffman code.
- The code lengths are lens[0..codes-1]. The result starts at *table,
- whose indices are 0..2^bits-1. work is a writable array of at least
- lens shorts, which is used as a work area. type is the type of code
- to be generated, CODES, LENS, or DISTS. On return, zero is success,
- -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
- on return points to the next available entry's address. bits is the
- requested root table index bits, and on return it is the actual root
- table index bits. It will differ if the request is greater than the
- longest code or if it is less than the shortest code.
- */
-int inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
- unsigned len; /* a code's length in bits */
- unsigned sym; /* index of code symbols */
- unsigned min, max; /* minimum and maximum code lengths */
- unsigned root; /* number of index bits for root table */
- unsigned curr; /* number of index bits for current table */
- unsigned drop; /* code bits to drop for sub-table */
- int left; /* number of prefix codes available */
- unsigned used; /* code entries in table used */
- unsigned huff; /* Huffman code */
- unsigned incr; /* for incrementing code, index */
- unsigned fill; /* index for replicating entries */
- unsigned low; /* low bits for current root entry */
- unsigned mask; /* mask for low root bits */
- code this; /* table entry for duplication */
- code FAR *next; /* next available space in table */
- const unsigned short FAR *base; /* base value table to use */
- const unsigned short FAR *extra; /* extra bits table to use */
- int end; /* use base and extra for symbol > end */
- unsigned short count[MAXBITS+1]; /* number of codes of each length */
- unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
- static const unsigned short lbase[31] = { /* Length codes 257..285 base */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
- static const unsigned short lext[31] = { /* Length codes 257..285 extra */
- 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
- static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577, 0, 0};
- static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
- 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
- 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
- 28, 28, 29, 29, 64, 64};
-
- /*
- Process a set of code lengths to create a canonical Huffman code. The
- code lengths are lens[0..codes-1]. Each length corresponds to the
- symbols 0..codes-1. The Huffman code is generated by first sorting the
- symbols by length from short to long, and retaining the symbol order
- for codes with equal lengths. Then the code starts with all zero bits
- for the first code of the shortest length, and the codes are integer
- increments for the same length, and zeros are appended as the length
- increases. For the deflate format, these bits are stored backwards
- from their more natural integer increment ordering, and so when the
- decoding tables are built in the large loop below, the integer codes
- are incremented backwards.
-
- This routine assumes, but does not check, that all of the entries in
- lens[] are in the range 0..MAXBITS. The caller must assure this.
- 1..MAXBITS is interpreted as that code length. zero means that that
- symbol does not occur in this code.
-
- The codes are sorted by computing a count of codes for each length,
- creating from that a table of starting indices for each length in the
- sorted table, and then entering the symbols in order in the sorted
- table. The sorted table is work[], with that space being provided by
- the caller.
-
- The length counts are used for other purposes as well, i.e. finding
- the minimum and maximum length codes, determining if there are any
- codes at all, checking for a valid set of lengths, and looking ahead
- at length counts to determine sub-table sizes when building the
- decoding tables.
- */
-
- /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
- for (len = 0; len <= MAXBITS; len++)
- count[len] = 0;
- for (sym = 0; sym < codes; sym++)
- count[lens[sym]]++;
-
- /* bound code lengths, force root to be within code lengths */
- root = *bits;
- for (max = MAXBITS; max >= 1; max--)
- if (count[max] != 0) break;
- if (root > max) root = max;
- if (max == 0) { /* no symbols to code at all */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)1;
- this.val = (unsigned short)0;
- *(*table)++ = this; /* make a table to force an error */
- *(*table)++ = this;
- *bits = 1;
- return 0; /* no symbols, but wait for decoding to report error */
- }
- for (min = 1; min <= MAXBITS; min++)
- if (count[min] != 0) break;
- if (root < min) root = min;
-
- /* check for an over-subscribed or incomplete set of lengths */
- left = 1;
- for (len = 1; len <= MAXBITS; len++) {
- left <<= 1;
- left -= count[len];
- if (left < 0) return -1; /* over-subscribed */
- }
- if (left > 0 && (type == CODES || max != 1))
- return -1; /* incomplete set */
-
- /* generate offsets into symbol table for each length for sorting */
- offs[1] = 0;
- for (len = 1; len < MAXBITS; len++)
- offs[len + 1] = offs[len] + count[len];
-
- /* sort symbols by length, by symbol order within each length */
- for (sym = 0; sym < codes; sym++)
- if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
- /*
- Create and fill in decoding tables. In this loop, the table being
- filled is at next and has curr index bits. The code being used is huff
- with length len. That code is converted to an index by dropping drop
- bits off of the bottom. For codes where len is less than drop + curr,
- those top drop + curr - len bits are incremented through all values to
- fill the table with replicated entries.
-
- root is the number of index bits for the root table. When len exceeds
- root, sub-tables are created pointed to by the root entry with an index
- of the low root bits of huff. This is saved in low to check for when a
- new sub-table should be started. drop is zero when the root table is
- being filled, and drop is root when sub-tables are being filled.
-
- When a new sub-table is needed, it is necessary to look ahead in the
- code lengths to determine what size sub-table is needed. The length
- counts are used for this, and so count[] is decremented as codes are
- entered in the tables.
-
- used keeps track of how many table entries have been allocated from the
- provided *table space. It is checked when a LENS table is being made
- against the space in *table, ENOUGH, minus the maximum space needed by
- the worst case distance code, MAXD. This should never happen, but the
- sufficiency of ENOUGH has not been proven exhaustively, hence the check.
- This assumes that when type == LENS, bits == 9.
-
- sym increments through all symbols, and the loop terminates when
- all codes of length max, i.e. all codes, have been processed. This
- routine permits incomplete codes, so another loop after this one fills
- in the rest of the decoding tables with invalid code markers.
- */
-
- /* set up for code type */
- switch (type) {
- case CODES:
- base = extra = work; /* dummy value--not used */
- end = 19;
- break;
- case LENS:
- base = lbase;
- base -= 257;
- extra = lext;
- extra -= 257;
- end = 256;
- break;
- default: /* DISTS */
- base = dbase;
- extra = dext;
- end = -1;
- }
-
- /* initialize state for loop */
- huff = 0; /* starting code */
- sym = 0; /* starting code symbol */
- len = min; /* starting code length */
- next = *table; /* current table to fill in */
- curr = root; /* current table index bits */
- drop = 0; /* current bits to drop from code for index */
- low = (unsigned)(-1); /* trigger new sub-table when len > root */
- used = 1U << root; /* use root table entries */
- mask = used - 1; /* mask for comparing low */
-
- /* check available table space */
- if (type == LENS && used >= ENOUGH - MAXD)
- return 1;
-
- /* process all codes and make table entries */
- for (;;) {
- /* create table entry */
- this.bits = (unsigned char)(len - drop);
- if ((int)(work[sym]) < end) {
- this.op = (unsigned char)0;
- this.val = work[sym];
- }
- else if ((int)(work[sym]) > end) {
- this.op = (unsigned char)(extra[work[sym]]);
- this.val = base[work[sym]];
- }
- else {
- this.op = (unsigned char)(32 + 64); /* end of block */
- this.val = 0;
- }
-
- /* replicate for those indices with low len bits equal to huff */
- incr = 1U << (len - drop);
- fill = 1U << curr;
- min = fill; /* save offset to next table */
- do {
- fill -= incr;
- next[(huff >> drop) + fill] = this;
- } while (fill != 0);
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
-
- /* go to next symbol, update count, len */
- sym++;
- if (--(count[len]) == 0) {
- if (len == max) break;
- len = lens[work[sym]];
- }
-
- /* create new sub-table if needed */
- if (len > root && (huff & mask) != low) {
- /* if first time, transition to sub-tables */
- if (drop == 0)
- drop = root;
-
- /* increment past last table */
- next += min; /* here min is 1 << curr */
-
- /* determine length of next table */
- curr = len - drop;
- left = (int)(1 << curr);
- while (curr + drop < max) {
- left -= count[curr + drop];
- if (left <= 0) break;
- curr++;
- left <<= 1;
- }
-
- /* check for enough space */
- used += 1U << curr;
- if (type == LENS && used >= ENOUGH - MAXD)
- return 1;
-
- /* point entry in root table to sub-table */
- low = huff & mask;
- (*table)[low].op = (unsigned char)curr;
- (*table)[low].bits = (unsigned char)root;
- (*table)[low].val = (unsigned short)(next - *table);
- }
- }
-
- /*
- Fill in rest of table for incomplete codes. This loop is similar to the
- loop above in incrementing huff for table indices. It is assumed that
- len is equal to curr + drop, so there is no loop needed to increment
- through high index bits. When the current sub-table is filled, the loop
- drops back to the root table to fill in any remaining entries there.
- */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)(len - drop);
- this.val = (unsigned short)0;
- while (huff != 0) {
- /* when done with sub-table, drop back to root table */
- if (drop != 0 && (huff & mask) != low) {
- drop = 0;
- len = root;
- next = *table;
- this.bits = (unsigned char)len;
- }
-
- /* put invalid code marker in table */
- next[huff >> drop] = this;
-
- /* backwards increment the len-bit code huff */
- incr = 1U << (len - 1);
- while (huff & incr)
- incr >>= 1;
- if (incr != 0) {
- huff &= incr - 1;
- huff += incr;
- }
- else
- huff = 0;
- }
-
- /* set return parameters */
- *table += used;
- *bits = root;
- return 0;
-}
+/* inftrees.c -- generate Huffman trees for efficient decoding
+ * Copyright (C) 1995-2005 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "zutil.h"
+#include "inftrees.h"
+
+#define MAXBITS 15
+
+const char inflate_copyright[] =
+ " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/*
+ Build a set of tables to decode the provided canonical Huffman code.
+ The code lengths are lens[0..codes-1]. The result starts at *table,
+ whose indices are 0..2^bits-1. work is a writable array of at least
+ lens shorts, which is used as a work area. type is the type of code
+ to be generated, CODES, LENS, or DISTS. On return, zero is success,
+ -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
+ on return points to the next available entry's address. bits is the
+ requested root table index bits, and on return it is the actual root
+ table index bits. It will differ if the request is greater than the
+ longest code or if it is less than the shortest code.
+ */
+int inflate_table(type, lens, codes, table, bits, work)
+codetype type;
+unsigned short FAR *lens;
+unsigned codes;
+code FAR * FAR *table;
+unsigned FAR *bits;
+unsigned short FAR *work;
+{
+ unsigned len; /* a code's length in bits */
+ unsigned sym; /* index of code symbols */
+ unsigned min, max; /* minimum and maximum code lengths */
+ unsigned root; /* number of index bits for root table */
+ unsigned curr; /* number of index bits for current table */
+ unsigned drop; /* code bits to drop for sub-table */
+ int left; /* number of prefix codes available */
+ unsigned used; /* code entries in table used */
+ unsigned huff; /* Huffman code */
+ unsigned incr; /* for incrementing code, index */
+ unsigned fill; /* index for replicating entries */
+ unsigned low; /* low bits for current root entry */
+ unsigned mask; /* mask for low root bits */
+ code this; /* table entry for duplication */
+ code FAR *next; /* next available space in table */
+ const unsigned short FAR *base; /* base value table to use */
+ const unsigned short FAR *extra; /* extra bits table to use */
+ int end; /* use base and extra for symbol > end */
+ unsigned short count[MAXBITS+1]; /* number of codes of each length */
+ unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
+ static const unsigned short lbase[31] = { /* Length codes 257..285 base */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
+ static const unsigned short lext[31] = { /* Length codes 257..285 extra */
+ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
+ static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577, 0, 0};
+ static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
+ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
+ 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+ 28, 28, 29, 29, 64, 64};
+
+ /*
+ Process a set of code lengths to create a canonical Huffman code. The
+ code lengths are lens[0..codes-1]. Each length corresponds to the
+ symbols 0..codes-1. The Huffman code is generated by first sorting the
+ symbols by length from short to long, and retaining the symbol order
+ for codes with equal lengths. Then the code starts with all zero bits
+ for the first code of the shortest length, and the codes are integer
+ increments for the same length, and zeros are appended as the length
+ increases. For the deflate format, these bits are stored backwards
+ from their more natural integer increment ordering, and so when the
+ decoding tables are built in the large loop below, the integer codes
+ are incremented backwards.
+
+ This routine assumes, but does not check, that all of the entries in
+ lens[] are in the range 0..MAXBITS. The caller must assure this.
+ 1..MAXBITS is interpreted as that code length. zero means that that
+ symbol does not occur in this code.
+
+ The codes are sorted by computing a count of codes for each length,
+ creating from that a table of starting indices for each length in the
+ sorted table, and then entering the symbols in order in the sorted
+ table. The sorted table is work[], with that space being provided by
+ the caller.
+
+ The length counts are used for other purposes as well, i.e. finding
+ the minimum and maximum length codes, determining if there are any
+ codes at all, checking for a valid set of lengths, and looking ahead
+ at length counts to determine sub-table sizes when building the
+ decoding tables.
+ */
+
+ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+ for (len = 0; len <= MAXBITS; len++)
+ count[len] = 0;
+ for (sym = 0; sym < codes; sym++)
+ count[lens[sym]]++;
+
+ /* bound code lengths, force root to be within code lengths */
+ root = *bits;
+ for (max = MAXBITS; max >= 1; max--)
+ if (count[max] != 0) break;
+ if (root > max) root = max;
+ if (max == 0) { /* no symbols to code at all */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)1;
+ this.val = (unsigned short)0;
+ *(*table)++ = this; /* make a table to force an error */
+ *(*table)++ = this;
+ *bits = 1;
+ return 0; /* no symbols, but wait for decoding to report error */
+ }
+ for (min = 1; min <= MAXBITS; min++)
+ if (count[min] != 0) break;
+ if (root < min) root = min;
+
+ /* check for an over-subscribed or incomplete set of lengths */
+ left = 1;
+ for (len = 1; len <= MAXBITS; len++) {
+ left <<= 1;
+ left -= count[len];
+ if (left < 0) return -1; /* over-subscribed */
+ }
+ if (left > 0 && (type == CODES || max != 1))
+ return -1; /* incomplete set */
+
+ /* generate offsets into symbol table for each length for sorting */
+ offs[1] = 0;
+ for (len = 1; len < MAXBITS; len++)
+ offs[len + 1] = offs[len] + count[len];
+
+ /* sort symbols by length, by symbol order within each length */
+ for (sym = 0; sym < codes; sym++)
+ if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
+
+ /*
+ Create and fill in decoding tables. In this loop, the table being
+ filled is at next and has curr index bits. The code being used is huff
+ with length len. That code is converted to an index by dropping drop
+ bits off of the bottom. For codes where len is less than drop + curr,
+ those top drop + curr - len bits are incremented through all values to
+ fill the table with replicated entries.
+
+ root is the number of index bits for the root table. When len exceeds
+ root, sub-tables are created pointed to by the root entry with an index
+ of the low root bits of huff. This is saved in low to check for when a
+ new sub-table should be started. drop is zero when the root table is
+ being filled, and drop is root when sub-tables are being filled.
+
+ When a new sub-table is needed, it is necessary to look ahead in the
+ code lengths to determine what size sub-table is needed. The length
+ counts are used for this, and so count[] is decremented as codes are
+ entered in the tables.
+
+ used keeps track of how many table entries have been allocated from the
+ provided *table space. It is checked when a LENS table is being made
+ against the space in *table, ENOUGH, minus the maximum space needed by
+ the worst case distance code, MAXD. This should never happen, but the
+ sufficiency of ENOUGH has not been proven exhaustively, hence the check.
+ This assumes that when type == LENS, bits == 9.
+
+ sym increments through all symbols, and the loop terminates when
+ all codes of length max, i.e. all codes, have been processed. This
+ routine permits incomplete codes, so another loop after this one fills
+ in the rest of the decoding tables with invalid code markers.
+ */
+
+ /* set up for code type */
+ switch (type) {
+ case CODES:
+ base = extra = work; /* dummy value--not used */
+ end = 19;
+ break;
+ case LENS:
+ base = lbase;
+ base -= 257;
+ extra = lext;
+ extra -= 257;
+ end = 256;
+ break;
+ default: /* DISTS */
+ base = dbase;
+ extra = dext;
+ end = -1;
+ }
+
+ /* initialize state for loop */
+ huff = 0; /* starting code */
+ sym = 0; /* starting code symbol */
+ len = min; /* starting code length */
+ next = *table; /* current table to fill in */
+ curr = root; /* current table index bits */
+ drop = 0; /* current bits to drop from code for index */
+ low = (unsigned)(-1); /* trigger new sub-table when len > root */
+ used = 1U << root; /* use root table entries */
+ mask = used - 1; /* mask for comparing low */
+
+ /* check available table space */
+ if (type == LENS && used >= ENOUGH - MAXD)
+ return 1;
+
+ /* process all codes and make table entries */
+ for (;;) {
+ /* create table entry */
+ this.bits = (unsigned char)(len - drop);
+ if ((int)(work[sym]) < end) {
+ this.op = (unsigned char)0;
+ this.val = work[sym];
+ }
+ else if ((int)(work[sym]) > end) {
+ this.op = (unsigned char)(extra[work[sym]]);
+ this.val = base[work[sym]];
+ }
+ else {
+ this.op = (unsigned char)(32 + 64); /* end of block */
+ this.val = 0;
+ }
+
+ /* replicate for those indices with low len bits equal to huff */
+ incr = 1U << (len - drop);
+ fill = 1U << curr;
+ min = fill; /* save offset to next table */
+ do {
+ fill -= incr;
+ next[(huff >> drop) + fill] = this;
+ } while (fill != 0);
+
+ /* backwards increment the len-bit code huff */
+ incr = 1U << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+
+ /* go to next symbol, update count, len */
+ sym++;
+ if (--(count[len]) == 0) {
+ if (len == max) break;
+ len = lens[work[sym]];
+ }
+
+ /* create new sub-table if needed */
+ if (len > root && (huff & mask) != low) {
+ /* if first time, transition to sub-tables */
+ if (drop == 0)
+ drop = root;
+
+ /* increment past last table */
+ next += min; /* here min is 1 << curr */
+
+ /* determine length of next table */
+ curr = len - drop;
+ left = (int)(1 << curr);
+ while (curr + drop < max) {
+ left -= count[curr + drop];
+ if (left <= 0) break;
+ curr++;
+ left <<= 1;
+ }
+
+ /* check for enough space */
+ used += 1U << curr;
+ if (type == LENS && used >= ENOUGH - MAXD)
+ return 1;
+
+ /* point entry in root table to sub-table */
+ low = huff & mask;
+ (*table)[low].op = (unsigned char)curr;
+ (*table)[low].bits = (unsigned char)root;
+ (*table)[low].val = (unsigned short)(next - *table);
+ }
+ }
+
+ /*
+ Fill in rest of table for incomplete codes. This loop is similar to the
+ loop above in incrementing huff for table indices. It is assumed that
+ len is equal to curr + drop, so there is no loop needed to increment
+ through high index bits. When the current sub-table is filled, the loop
+ drops back to the root table to fill in any remaining entries there.
+ */
+ this.op = (unsigned char)64; /* invalid code marker */
+ this.bits = (unsigned char)(len - drop);
+ this.val = (unsigned short)0;
+ while (huff != 0) {
+ /* when done with sub-table, drop back to root table */
+ if (drop != 0 && (huff & mask) != low) {
+ drop = 0;
+ len = root;
+ next = *table;
+ this.bits = (unsigned char)len;
+ }
+
+ /* put invalid code marker in table */
+ next[huff >> drop] = this;
+
+ /* backwards increment the len-bit code huff */
+ incr = 1U << (len - 1);
+ while (huff & incr)
+ incr >>= 1;
+ if (incr != 0) {
+ huff &= incr - 1;
+ huff += incr;
+ }
+ else
+ huff = 0;
+ }
+
+ /* set return parameters */
+ *table += used;
+ *bits = root;
+ return 0;
+}
diff --git a/Contrib/zip2exe/zlib/inftrees.h b/Contrib/zip2exe/zlib/inftrees.h
index dc0fd56..b1104c8 100755
--- a/Contrib/zip2exe/zlib/inftrees.h
+++ b/Contrib/zip2exe/zlib/inftrees.h
@@ -1,55 +1,55 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables. Each entry provides either the
- information needed to do the operation requested by the code that
- indexed that table entry, or it provides a pointer to another
- table that indexes more bits of the code. op indicates whether
- the entry is a pointer to another table, a literal, a length or
- distance, an end-of-block, or an invalid code. For a table
- pointer, the low four bits of op is the number of index bits of
- that table. For a length or distance, the low four bits of op
- is the number of extra bits to get after the code. bits is
- the number of bits in this code or part of the code to drop off
- of the bit buffer. val is the actual byte to output in the case
- of a literal, the base length or distance, or the offset from
- the current table to the next table. Each entry is four bytes. */
-typedef struct {
- unsigned char op; /* operation, extra bits, table bits */
- unsigned char bits; /* bits in this part of the code */
- unsigned short val; /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
- 00000000 - literal
- 0000tttt - table link, tttt != 0 is the number of table index bits
- 0001eeee - length or distance, eeee is the number of extra bits
- 01100000 - end of block
- 01000000 - invalid code
- */
-
-/* Maximum size of dynamic tree. The maximum found in a long but non-
- exhaustive search was 1444 code structures (852 for length/literals
- and 592 for distances, the latter actually the result of an
- exhaustive search). The true maximum is not known, but the value
- below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
-
-/* Type of code to build for inftable() */
-typedef enum {
- CODES,
- LENS,
- DISTS
-} codetype;
-
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
- unsigned codes, code FAR * FAR *table,
- unsigned FAR *bits, unsigned short FAR *work));
+/* inftrees.h -- header to use inftrees.c
+ * Copyright (C) 1995-2005 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* Structure for decoding tables. Each entry provides either the
+ information needed to do the operation requested by the code that
+ indexed that table entry, or it provides a pointer to another
+ table that indexes more bits of the code. op indicates whether
+ the entry is a pointer to another table, a literal, a length or
+ distance, an end-of-block, or an invalid code. For a table
+ pointer, the low four bits of op is the number of index bits of
+ that table. For a length or distance, the low four bits of op
+ is the number of extra bits to get after the code. bits is
+ the number of bits in this code or part of the code to drop off
+ of the bit buffer. val is the actual byte to output in the case
+ of a literal, the base length or distance, or the offset from
+ the current table to the next table. Each entry is four bytes. */
+typedef struct {
+ unsigned char op; /* operation, extra bits, table bits */
+ unsigned char bits; /* bits in this part of the code */
+ unsigned short val; /* offset in table or code value */
+} code;
+
+/* op values as set by inflate_table():
+ 00000000 - literal
+ 0000tttt - table link, tttt != 0 is the number of table index bits
+ 0001eeee - length or distance, eeee is the number of extra bits
+ 01100000 - end of block
+ 01000000 - invalid code
+ */
+
+/* Maximum size of dynamic tree. The maximum found in a long but non-
+ exhaustive search was 1444 code structures (852 for length/literals
+ and 592 for distances, the latter actually the result of an
+ exhaustive search). The true maximum is not known, but the value
+ below is more than safe. */
+#define ENOUGH 2048
+#define MAXD 592
+
+/* Type of code to build for inftable() */
+typedef enum {
+ CODES,
+ LENS,
+ DISTS
+} codetype;
+
+extern int inflate_table OF((codetype type, unsigned short FAR *lens,
+ unsigned codes, code FAR * FAR *table,
+ unsigned FAR *bits, unsigned short FAR *work));
diff --git a/Contrib/zip2exe/zlib/ioapi.c b/Contrib/zip2exe/zlib/ioapi.c
index 7f20c18..f1bee23 100755
--- a/Contrib/zip2exe/zlib/ioapi.c
+++ b/Contrib/zip2exe/zlib/ioapi.c
@@ -1,177 +1,177 @@
-/* ioapi.c -- IO base function header for compress/uncompress .zip
- files using zlib + zip or unzip API
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-
-
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-voidpf ZCALLBACK fopen_file_func OF((
- voidpf opaque,
- const char* filename,
- int mode));
-
-uLong ZCALLBACK fread_file_func OF((
- voidpf opaque,
- voidpf stream,
- void* buf,
- uLong size));
-
-uLong ZCALLBACK fwrite_file_func OF((
- voidpf opaque,
- voidpf stream,
- const void* buf,
- uLong size));
-
-long ZCALLBACK ftell_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-long ZCALLBACK fseek_file_func OF((
- voidpf opaque,
- voidpf stream,
- uLong offset,
- int origin));
-
-int ZCALLBACK fclose_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-int ZCALLBACK ferror_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
- voidpf opaque;
- const char* filename;
- int mode;
-{
- FILE* file = NULL;
- const char* mode_fopen = NULL;
- if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
- else
- if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
- else
- if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
-
- if ((filename!=NULL) && (mode_fopen != NULL))
- file = fopen(filename, mode_fopen);
- return file;
-}
-
-
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- void* buf;
- uLong size;
-{
- uLong ret;
- ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- const void* buf;
- uLong size;
-{
- uLong ret;
- ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-long ZCALLBACK ftell_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- long ret;
- ret = ftell((FILE *)stream);
- return ret;
-}
-
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
- voidpf opaque;
- voidpf stream;
- uLong offset;
- int origin;
-{
- int fseek_origin=0;
- long ret;
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- fseek_origin = SEEK_CUR;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- fseek_origin = SEEK_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- fseek_origin = SEEK_SET;
- break;
- default: return -1;
- }
- ret = 0;
- fseek((FILE *)stream, offset, fseek_origin);
- return ret;
-}
-
-int ZCALLBACK fclose_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- int ret;
- ret = fclose((FILE *)stream);
- return ret;
-}
-
-int ZCALLBACK ferror_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- int ret;
- ret = ferror((FILE *)stream);
- return ret;
-}
-
-void fill_fopen_filefunc (pzlib_filefunc_def)
- zlib_filefunc_def* pzlib_filefunc_def;
-{
- pzlib_filefunc_def->zopen_file = fopen_file_func;
- pzlib_filefunc_def->zread_file = fread_file_func;
- pzlib_filefunc_def->zwrite_file = fwrite_file_func;
- pzlib_filefunc_def->ztell_file = ftell_file_func;
- pzlib_filefunc_def->zseek_file = fseek_file_func;
- pzlib_filefunc_def->zclose_file = fclose_file_func;
- pzlib_filefunc_def->zerror_file = ferror_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
+/* ioapi.c -- IO base function header for compress/uncompress .zip
+ files using zlib + zip or unzip API
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "zlib.h"
+#include "ioapi.h"
+
+
+
+/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
+
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+
+voidpf ZCALLBACK fopen_file_func OF((
+ voidpf opaque,
+ const char* filename,
+ int mode));
+
+uLong ZCALLBACK fread_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ void* buf,
+ uLong size));
+
+uLong ZCALLBACK fwrite_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ const void* buf,
+ uLong size));
+
+long ZCALLBACK ftell_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+long ZCALLBACK fseek_file_func OF((
+ voidpf opaque,
+ voidpf stream,
+ uLong offset,
+ int origin));
+
+int ZCALLBACK fclose_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+int ZCALLBACK ferror_file_func OF((
+ voidpf opaque,
+ voidpf stream));
+
+
+voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
+ voidpf opaque;
+ const char* filename;
+ int mode;
+{
+ FILE* file = NULL;
+ const char* mode_fopen = NULL;
+ if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+ mode_fopen = "rb";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+ mode_fopen = "r+b";
+ else
+ if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+ mode_fopen = "wb";
+
+ if ((filename!=NULL) && (mode_fopen != NULL))
+ file = fopen(filename, mode_fopen);
+ return file;
+}
+
+
+uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ void* buf;
+ uLong size;
+{
+ uLong ret;
+ ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
+ return ret;
+}
+
+
+uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ const void* buf;
+ uLong size;
+{
+ uLong ret;
+ ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
+ return ret;
+}
+
+long ZCALLBACK ftell_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ long ret;
+ ret = ftell((FILE *)stream);
+ return ret;
+}
+
+long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
+ voidpf opaque;
+ voidpf stream;
+ uLong offset;
+ int origin;
+{
+ int fseek_origin=0;
+ long ret;
+ switch (origin)
+ {
+ case ZLIB_FILEFUNC_SEEK_CUR :
+ fseek_origin = SEEK_CUR;
+ break;
+ case ZLIB_FILEFUNC_SEEK_END :
+ fseek_origin = SEEK_END;
+ break;
+ case ZLIB_FILEFUNC_SEEK_SET :
+ fseek_origin = SEEK_SET;
+ break;
+ default: return -1;
+ }
+ ret = 0;
+ fseek((FILE *)stream, offset, fseek_origin);
+ return ret;
+}
+
+int ZCALLBACK fclose_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ int ret;
+ ret = fclose((FILE *)stream);
+ return ret;
+}
+
+int ZCALLBACK ferror_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
+{
+ int ret;
+ ret = ferror((FILE *)stream);
+ return ret;
+}
+
+void fill_fopen_filefunc (pzlib_filefunc_def)
+ zlib_filefunc_def* pzlib_filefunc_def;
+{
+ pzlib_filefunc_def->zopen_file = fopen_file_func;
+ pzlib_filefunc_def->zread_file = fread_file_func;
+ pzlib_filefunc_def->zwrite_file = fwrite_file_func;
+ pzlib_filefunc_def->ztell_file = ftell_file_func;
+ pzlib_filefunc_def->zseek_file = fseek_file_func;
+ pzlib_filefunc_def->zclose_file = fclose_file_func;
+ pzlib_filefunc_def->zerror_file = ferror_file_func;
+ pzlib_filefunc_def->opaque = NULL;
+}
diff --git a/Contrib/zip2exe/zlib/ioapi.h b/Contrib/zip2exe/zlib/ioapi.h
index e73a3b2..7d457ba 100755
--- a/Contrib/zip2exe/zlib/ioapi.h
+++ b/Contrib/zip2exe/zlib/ioapi.h
@@ -1,75 +1,75 @@
-/* ioapi.h -- IO base function header for compress/uncompress .zip
- files using zlib + zip or unzip API
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#ifndef _ZLIBIOAPI_H
-#define _ZLIBIOAPI_H
-
-
-#define ZLIB_FILEFUNC_SEEK_CUR (1)
-#define ZLIB_FILEFUNC_SEEK_END (2)
-#define ZLIB_FILEFUNC_SEEK_SET (0)
-
-#define ZLIB_FILEFUNC_MODE_READ (1)
-#define ZLIB_FILEFUNC_MODE_WRITE (2)
-#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
-
-#define ZLIB_FILEFUNC_MODE_EXISTING (4)
-#define ZLIB_FILEFUNC_MODE_CREATE (8)
-
-
-#ifndef ZCALLBACK
-
-#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
-#define ZCALLBACK CALLBACK
-#else
-#define ZCALLBACK
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-
-typedef struct zlib_filefunc_def_s
-{
- open_file_func zopen_file;
- read_file_func zread_file;
- write_file_func zwrite_file;
- tell_file_func ztell_file;
- seek_file_func zseek_file;
- close_file_func zclose_file;
- testerror_file_func zerror_file;
- voidpf opaque;
-} zlib_filefunc_def;
-
-
-
-void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
-#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
-#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
-#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
-#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
-#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+ files using zlib + zip or unzip API
+
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+*/
+
+#ifndef _ZLIBIOAPI_H
+#define _ZLIBIOAPI_H
+
+
+#define ZLIB_FILEFUNC_SEEK_CUR (1)
+#define ZLIB_FILEFUNC_SEEK_END (2)
+#define ZLIB_FILEFUNC_SEEK_SET (0)
+
+#define ZLIB_FILEFUNC_MODE_READ (1)
+#define ZLIB_FILEFUNC_MODE_WRITE (2)
+#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
+
+#define ZLIB_FILEFUNC_MODE_EXISTING (4)
+#define ZLIB_FILEFUNC_MODE_CREATE (8)
+
+
+#ifndef ZCALLBACK
+
+#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
+#define ZCALLBACK CALLBACK
+#else
+#define ZCALLBACK
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
+typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
+typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
+typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
+
+typedef struct zlib_filefunc_def_s
+{
+ open_file_func zopen_file;
+ read_file_func zread_file;
+ write_file_func zwrite_file;
+ tell_file_func ztell_file;
+ seek_file_func zseek_file;
+ close_file_func zclose_file;
+ testerror_file_func zerror_file;
+ voidpf opaque;
+} zlib_filefunc_def;
+
+
+
+void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+
+#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
+#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
+#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
+#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
+#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
+#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/Contrib/zip2exe/zlib/unzip.c b/Contrib/zip2exe/zlib/unzip.c
index 3a70629..9ad4766 100755
--- a/Contrib/zip2exe/zlib/unzip.c
+++ b/Contrib/zip2exe/zlib/unzip.c
@@ -1,1598 +1,1598 @@
-/* unzip.c -- IO for uncompress .zip files using zlib
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- Read unzip.h for more info
-*/
-
-/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
-compatibility with older software. The following is from the original crypt.c. Code
-woven in by Terry Thorsen 1/2003.
-*/
-/*
- Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
-
- See the accompanying file LICENSE, version 2000-Apr-09 or later
- (the contents of which are also included in zip.h) for terms of use.
- If, for some reason, all these files are missing, the Info-ZIP license
- also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
-*/
-/*
- crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h]
-
- The encryption/decryption parts of this source code (as opposed to the
- non-echoing password parts) were originally written in Europe. The
- whole source package can be freely distributed, including from the USA.
- (Prior to January 2000, re-export from the US was a violation of US law.)
- */
-
-/*
- This encryption code is a direct transcription of the algorithm from
- Roger Schlafly, described by Phil Katz in the file appnote.txt. This
- file (appnote.txt) is distributed with the PKZIP program (even in the
- version without encryption capabilities).
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-#include "unzip.h"
-
-#ifdef STDC
-# include <stddef.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
- extern int errno;
-#else
-# include <errno.h>
-#endif
-
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-
-#ifndef CASESENSITIVITYDEFAULT_NO
-# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
-# define CASESENSITIVITYDEFAULT_NO
-# endif
-#endif
-
-
-#ifndef UNZ_BUFSIZE
-#define UNZ_BUFSIZE (16384)
-#endif
-
-#ifndef UNZ_MAXFILENAMEINZIP
-#define UNZ_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-
-
-
-
-const char unz_copyright[] =
- " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-/* unz_file_info_interntal contain internal info about a file in zipfile*/
-typedef struct unz_file_info_internal_s
-{
- uLong offset_curfile;/* relative offset of local header 4 bytes */
-} unz_file_info_internal;
-
-
-/* file_in_zip_read_info_s contain internal information about a file in zipfile,
- when reading and decompress it */
-typedef struct
-{
- char *read_buffer; /* internal buffer for compressed data */
- z_stream stream; /* zLib stream structure for inflate */
-
- uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/
- uLong stream_initialised; /* flag set if stream structure is initialised*/
-
- uLong offset_local_extrafield;/* offset of the local extra field */
- uInt size_local_extrafield;/* size of the local extra field */
- uLong pos_local_extrafield; /* position in the local extra field in read*/
-
- uLong crc32; /* crc32 of all data uncompressed */
- uLong crc32_wait; /* crc32 we must obtain after decompress all */
- uLong rest_read_compressed; /* number of byte to be decompressed */
- uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
- zlib_filefunc_def z_filefunc;
- voidpf filestream; /* io structore of the zipfile */
- uLong compression_method; /* compression method (0==store) */
- uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
- int raw;
-} file_in_zip_read_info_s;
-
-
-/* unz_s contain internal information about the zipfile
-*/
-typedef struct
-{
- zlib_filefunc_def z_filefunc;
- voidpf filestream; /* io structore of the zipfile */
- unz_global_info gi; /* public global information */
- uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
- uLong num_file; /* number of the current file in the zipfile*/
- uLong pos_in_central_dir; /* pos of the current file in the central dir*/
- uLong current_file_ok; /* flag about the usability of the current file*/
- uLong central_pos; /* position of the beginning of the central dir*/
-
- uLong size_central_dir; /* size of the central directory */
- uLong offset_central_dir; /* offset of start of central directory with
- respect to the starting disk number */
-
- unz_file_info cur_file_info; /* public info about the current file in zip*/
- unz_file_info_internal cur_file_info_internal; /* private info about it*/
- file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
- file if we are decompressing it */
- int encrypted;
-# ifndef NOUNCRYPT
- unsigned long keys[3]; /* keys defining the pseudo-random sequence */
- const unsigned long* pcrc_32_tab;
-# endif
-} unz_s;
-
-
-#ifndef NOUNCRYPT
-#include "crypt.h"
-#endif
-
-/* ===========================================================================
- Read a byte from a gz_stream; update next_in and avail_in. Return EOF
- for end of file.
- IN assertion: the stream s has been sucessfully opened for reading.
-*/
-
-
-local int unzlocal_getByte OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream,
- int *pi));
-
-local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
- int *pi;
-{
- unsigned char c;
- int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
- if (err==1)
- {
- *pi = (int)c;
- return UNZ_OK;
- }
- else
- {
- if (ZERROR(*pzlib_filefunc_def,filestream))
- return UNZ_ERRNO;
- else
- return UNZ_EOF;
- }
-}
-
-
-/* ===========================================================================
- Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int unzlocal_getShort OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream,
- uLong *pX));
-
-local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
- uLong *pX;
-{
- uLong x ;
- int i;
- int err;
-
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x = (uLong)i;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<8;
-
- if (err==UNZ_OK)
- *pX = x;
- else
- *pX = 0;
- return err;
-}
-
-local int unzlocal_getLong OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream,
- uLong *pX));
-
-local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
- uLong *pX;
-{
- uLong x ;
- int i;
- int err;
-
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x = (uLong)i;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<8;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<16;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<24;
-
- if (err==UNZ_OK)
- *pX = x;
- else
- *pX = 0;
- return err;
-}
-
-
-/* My own strcmpi / strcasecmp */
-local int strcmpcasenosensitive_internal (fileName1,fileName2)
- const char* fileName1;
- const char* fileName2;
-{
- for (;;)
- {
- char c1=*(fileName1++);
- char c2=*(fileName2++);
- if ((c1>='a') && (c1<='z'))
- c1 -= 0x20;
- if ((c2>='a') && (c2<='z'))
- c2 -= 0x20;
- if (c1=='\0')
- return ((c2=='\0') ? 0 : -1);
- if (c2=='\0')
- return 1;
- if (c1<c2)
- return -1;
- if (c1>c2)
- return 1;
- }
-}
-
-
-#ifdef CASESENSITIVITYDEFAULT_NO
-#define CASESENSITIVITYDEFAULTVALUE 2
-#else
-#define CASESENSITIVITYDEFAULTVALUE 1
-#endif
-
-#ifndef STRCMPCASENOSENTIVEFUNCTION
-#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
-#endif
-
-/*
- Compare two filename (fileName1,fileName2).
- If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
- If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
- or strcasecmp)
- If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
- (like 1 on Unix, 2 on Windows)
-
-*/
-extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
- const char* fileName1;
- const char* fileName2;
- int iCaseSensitivity;
-{
- if (iCaseSensitivity==0)
- iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
-
- if (iCaseSensitivity==1)
- return strcmp(fileName1,fileName2);
-
- return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-
-/*
- Locate the Central directory of a zipfile (at the end, just before
- the global comment)
-*/
-local uLong unzlocal_SearchCentralDir OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream));
-
-local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
-{
- unsigned char* buf;
- uLong uSizeFile;
- uLong uBackRead;
- uLong uMaxBack=0xffff; /* maximum size of global comment */
- uLong uPosFound=0;
-
- if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
- return 0;
-
-
- uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
-
- if (uMaxBack>uSizeFile)
- uMaxBack = uSizeFile;
-
- buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
- if (buf==NULL)
- return 0;
-
- uBackRead = 4;
- while (uBackRead<uMaxBack)
- {
- uLong uReadSize,uReadPos ;
- int i;
- if (uBackRead+BUFREADCOMMENT>uMaxBack)
- uBackRead = uMaxBack;
- else
- uBackRead+=BUFREADCOMMENT;
- uReadPos = uSizeFile-uBackRead ;
-
- uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
- (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
- if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- break;
-
- if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
- break;
-
- for (i=(int)uReadSize-3; (i--)>0;)
- if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
- ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
- {
- uPosFound = uReadPos+i;
- break;
- }
-
- if (uPosFound!=0)
- break;
- }
- TRYFREE(buf);
- return uPosFound;
-}
-
-/*
- Open a Zip file. path contain the full pathname (by example,
- on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
- "zlib/zlib114.zip".
- If the zipfile cannot be opened (file doesn't exist or in not valid), the
- return value is NULL.
- Else, the return value is a unzFile Handle, usable with other function
- of this unzip package.
-*/
-extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
- const char *path;
- zlib_filefunc_def* pzlib_filefunc_def;
-{
- unz_s us;
- unz_s *s;
- uLong central_pos,uL;
-
- uLong number_disk; /* number of the current dist, used for
- spaning ZIP, unsupported, always 0*/
- uLong number_disk_with_CD; /* number the the disk with central dir, used
- for spaning ZIP, unsupported, always 0*/
- uLong number_entry_CD; /* total number of entries in
- the central dir
- (same than number_entry on nospan) */
-
- int err=UNZ_OK;
-
- if (unz_copyright[0]!=' ')
- return NULL;
-
- if (pzlib_filefunc_def==NULL)
- fill_fopen_filefunc(&us.z_filefunc);
- else
- us.z_filefunc = *pzlib_filefunc_def;
-
- us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
- path,
- ZLIB_FILEFUNC_MODE_READ |
- ZLIB_FILEFUNC_MODE_EXISTING);
- if (us.filestream==NULL)
- return NULL;
-
- central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
- if (central_pos==0)
- err=UNZ_ERRNO;
-
- if (ZSEEK(us.z_filefunc, us.filestream,
- central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- err=UNZ_ERRNO;
-
- /* the signature, already checked */
- if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* number of this disk */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* number of the disk with the start of the central directory */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* total number of entries in the central dir on this disk */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* total number of entries in the central dir */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- if ((number_entry_CD!=us.gi.number_entry) ||
- (number_disk_with_CD!=0) ||
- (number_disk!=0))
- err=UNZ_BADZIPFILE;
-
- /* size of the central directory */
- if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* offset of start of central directory with respect to the
- starting disk number */
- if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* zipfile comment length */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
- (err==UNZ_OK))
- err=UNZ_BADZIPFILE;
-
- if (err!=UNZ_OK)
- {
- ZCLOSE(us.z_filefunc, us.filestream);
- return NULL;
- }
-
- us.byte_before_the_zipfile = central_pos -
- (us.offset_central_dir+us.size_central_dir);
- us.central_pos = central_pos;
- us.pfile_in_zip_read = NULL;
- us.encrypted = 0;
-
-
- s=(unz_s*)ALLOC(sizeof(unz_s));
- *s=us;
- unzGoToFirstFile((unzFile)s);
- return (unzFile)s;
-}
-
-
-extern unzFile ZEXPORT unzOpen (path)
- const char *path;
-{
- return unzOpen2(path, NULL);
-}
-
-/*
- Close a ZipFile opened with unzipOpen.
- If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
- these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
- return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzClose (file)
- unzFile file;
-{
- unz_s* s;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- if (s->pfile_in_zip_read!=NULL)
- unzCloseCurrentFile(file);
-
- ZCLOSE(s->z_filefunc, s->filestream);
- TRYFREE(s);
- return UNZ_OK;
-}
-
-
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
- unzFile file;
- unz_global_info *pglobal_info;
-{
- unz_s* s;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- *pglobal_info=s->gi;
- return UNZ_OK;
-}
-
-
-/*
- Translate date/time from Dos format to tm_unz (readable more easilty)
-*/
-local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
- uLong ulDosDate;
- tm_unz* ptm;
-{
- uLong uDate;
- uDate = (uLong)(ulDosDate>>16);
- ptm->tm_mday = (uInt)(uDate&0x1f) ;
- ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
- ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
-
- ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
- ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
- ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
-}
-
-/*
- Get Info about the current file in the zipfile, with internal only info
-*/
-local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
- unz_file_info *pfile_info,
- unz_file_info_internal
- *pfile_info_internal,
- char *szFileName,
- uLong fileNameBufferSize,
- void *extraField,
- uLong extraFieldBufferSize,
- char *szComment,
- uLong commentBufferSize));
-
-local int unzlocal_GetCurrentFileInfoInternal (file,
- pfile_info,
- pfile_info_internal,
- szFileName, fileNameBufferSize,
- extraField, extraFieldBufferSize,
- szComment, commentBufferSize)
- unzFile file;
- unz_file_info *pfile_info;
- unz_file_info_internal *pfile_info_internal;
- char *szFileName;
- uLong fileNameBufferSize;
- void *extraField;
- uLong extraFieldBufferSize;
- char *szComment;
- uLong commentBufferSize;
-{
- unz_s* s;
- unz_file_info file_info;
- unz_file_info_internal file_info_internal;
- int err=UNZ_OK;
- uLong uMagic;
- long lSeek=0;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (ZSEEK(s->z_filefunc, s->filestream,
- s->pos_in_central_dir+s->byte_before_the_zipfile,
- ZLIB_FILEFUNC_SEEK_SET)!=0)
- err=UNZ_ERRNO;
-
-
- /* we check the magic */
- if (err==UNZ_OK)
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
- err=UNZ_ERRNO;
- else if (uMagic!=0x02014b50)
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
- err=UNZ_ERRNO;
-
- unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
- err=UNZ_ERRNO;
-
- lSeek+=file_info.size_filename;
- if ((err==UNZ_OK) && (szFileName!=NULL))
- {
- uLong uSizeRead ;
- if (file_info.size_filename<fileNameBufferSize)
- {
- *(szFileName+file_info.size_filename)='\0';
- uSizeRead = file_info.size_filename;
- }
- else
- uSizeRead = fileNameBufferSize;
-
- if ((file_info.size_filename>0) && (fileNameBufferSize>0))
- if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
- err=UNZ_ERRNO;
- lSeek -= uSizeRead;
- }
-
-
- if ((err==UNZ_OK) && (extraField!=NULL))
- {
- uLong uSizeRead ;
- if (file_info.size_file_extra<extraFieldBufferSize)
- uSizeRead = file_info.size_file_extra;
- else
- uSizeRead = extraFieldBufferSize;
-
- if (lSeek!=0)
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
- lSeek=0;
- else
- err=UNZ_ERRNO;
- if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
- if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
- err=UNZ_ERRNO;
- lSeek += file_info.size_file_extra - uSizeRead;
- }
- else
- lSeek+=file_info.size_file_extra;
-
-
- if ((err==UNZ_OK) && (szComment!=NULL))
- {
- uLong uSizeRead ;
- if (file_info.size_file_comment<commentBufferSize)
- {
- *(szComment+file_info.size_file_comment)='\0';
- uSizeRead = file_info.size_file_comment;
- }
- else
- uSizeRead = commentBufferSize;
-
- if (lSeek!=0)
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
- lSeek=0;
- else
- err=UNZ_ERRNO;
- if ((file_info.size_file_comment>0) && (commentBufferSize>0))
- if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
- err=UNZ_ERRNO;
- lSeek+=file_info.size_file_comment - uSizeRead;
- }
- else
- lSeek+=file_info.size_file_comment;
-
- if ((err==UNZ_OK) && (pfile_info!=NULL))
- *pfile_info=file_info;
-
- if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
- *pfile_info_internal=file_info_internal;
-
- return err;
-}
-
-
-
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem.
-*/
-extern int ZEXPORT unzGetCurrentFileInfo (file,
- pfile_info,
- szFileName, fileNameBufferSize,
- extraField, extraFieldBufferSize,
- szComment, commentBufferSize)
- unzFile file;
- unz_file_info *pfile_info;
- char *szFileName;
- uLong fileNameBufferSize;
- void *extraField;
- uLong extraFieldBufferSize;
- char *szComment;
- uLong commentBufferSize;
-{
- return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
- szFileName,fileNameBufferSize,
- extraField,extraFieldBufferSize,
- szComment,commentBufferSize);
-}
-
-/*
- Set the current file of the zipfile to the first file.
- return UNZ_OK if there is no problem
-*/
-extern int ZEXPORT unzGoToFirstFile (file)
- unzFile file;
-{
- int err=UNZ_OK;
- unz_s* s;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- s->pos_in_central_dir=s->offset_central_dir;
- s->num_file=0;
- err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
-
-/*
- Set the current file of the zipfile to the next file.
- return UNZ_OK if there is no problem
- return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-extern int ZEXPORT unzGoToNextFile (file)
- unzFile file;
-{
- unz_s* s;
- int err;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_END_OF_LIST_OF_FILE;
- if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
- if (s->num_file+1==s->gi.number_entry)
- return UNZ_END_OF_LIST_OF_FILE;
-
- s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
- s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
- s->num_file++;
- err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
-
-
-/*
- Try locate the file szFileName in the zipfile.
- For the iCaseSensitivity signification, see unzipStringFileNameCompare
-
- return value :
- UNZ_OK if the file is found. It becomes the current file.
- UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
- unzFile file;
- const char *szFileName;
- int iCaseSensitivity;
-{
- unz_s* s;
- int err;
-
- /* We remember the 'current' position in the file so that we can jump
- * back there if we fail.
- */
- unz_file_info cur_file_infoSaved;
- unz_file_info_internal cur_file_info_internalSaved;
- uLong num_fileSaved;
- uLong pos_in_central_dirSaved;
-
-
- if (file==NULL)
- return UNZ_PARAMERROR;
-
- if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
- return UNZ_PARAMERROR;
-
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_END_OF_LIST_OF_FILE;
-
- /* Save the current state */
- num_fileSaved = s->num_file;
- pos_in_central_dirSaved = s->pos_in_central_dir;
- cur_file_infoSaved = s->cur_file_info;
- cur_file_info_internalSaved = s->cur_file_info_internal;
-
- err = unzGoToFirstFile(file);
-
- while (err == UNZ_OK)
- {
- char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
- err = unzGetCurrentFileInfo(file,NULL,
- szCurrentFileName,sizeof(szCurrentFileName)-1,
- NULL,0,NULL,0);
- if (err == UNZ_OK)
- {
- if (unzStringFileNameCompare(szCurrentFileName,
- szFileName,iCaseSensitivity)==0)
- return UNZ_OK;
- err = unzGoToNextFile(file);
- }
- }
-
- /* We failed, so restore the state of the 'current file' to where we
- * were.
- */
- s->num_file = num_fileSaved ;
- s->pos_in_central_dir = pos_in_central_dirSaved ;
- s->cur_file_info = cur_file_infoSaved;
- s->cur_file_info_internal = cur_file_info_internalSaved;
- return err;
-}
-
-
-/*
-///////////////////////////////////////////
-// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
-// I need random access
-//
-// Further optimization could be realized by adding an ability
-// to cache the directory in memory. The goal being a single
-// comprehensive file read to put the file I need in a memory.
-*/
-
-/*
-typedef struct unz_file_pos_s
-{
- uLong pos_in_zip_directory; // offset in file
- uLong num_of_file; // # of file
-} unz_file_pos;
-*/
-
-extern int ZEXPORT unzGetFilePos(file, file_pos)
- unzFile file;
- unz_file_pos* file_pos;
-{
- unz_s* s;
-
- if (file==NULL || file_pos==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_END_OF_LIST_OF_FILE;
-
- file_pos->pos_in_zip_directory = s->pos_in_central_dir;
- file_pos->num_of_file = s->num_file;
-
- return UNZ_OK;
-}
-
-extern int ZEXPORT unzGoToFilePos(file, file_pos)
- unzFile file;
- unz_file_pos* file_pos;
-{
- unz_s* s;
- int err;
-
- if (file==NULL || file_pos==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- /* jump to the right spot */
- s->pos_in_central_dir = file_pos->pos_in_zip_directory;
- s->num_file = file_pos->num_of_file;
-
- /* set the current file */
- err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- /* return results */
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
-
-/*
-// Unzip Helper Functions - should be here?
-///////////////////////////////////////////
-*/
-
-/*
- Read the local header of the current zipfile
- Check the coherency of the local header and info in the end of central
- directory about this file
- store in *piSizeVar the size of extra info in local header
- (filename and size of extra field data)
-*/
-local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
- poffset_local_extrafield,
- psize_local_extrafield)
- unz_s* s;
- uInt* piSizeVar;
- uLong *poffset_local_extrafield;
- uInt *psize_local_extrafield;
-{
- uLong uMagic,uData,uFlags;
- uLong size_filename;
- uLong size_extra_field;
- int err=UNZ_OK;
-
- *piSizeVar = 0;
- *poffset_local_extrafield = 0;
- *psize_local_extrafield = 0;
-
- if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
- s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
-
-
- if (err==UNZ_OK)
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
- err=UNZ_ERRNO;
- else if (uMagic!=0x04034b50)
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
- err=UNZ_ERRNO;
-/*
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
- err=UNZ_BADZIPFILE;
-*/
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
- err=UNZ_BADZIPFILE;
-
- if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
- (s->cur_file_info.compression_method!=Z_DEFLATED))
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
- ((uFlags & 8)==0))
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
- ((uFlags & 8)==0))
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
- ((uFlags & 8)==0))
- err=UNZ_BADZIPFILE;
-
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
- err=UNZ_BADZIPFILE;
-
- *piSizeVar += (uInt)size_filename;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
- err=UNZ_ERRNO;
- *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
- SIZEZIPLOCALHEADER + size_filename;
- *psize_local_extrafield = (uInt)size_extra_field;
-
- *piSizeVar += (uInt)size_extra_field;
-
- return err;
-}
-
-/*
- Open for reading data the current file in the zipfile.
- If there is no error and the file is opened, the return value is UNZ_OK.
-*/
-extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
- unzFile file;
- int* method;
- int* level;
- int raw;
- const char* password;
-{
- int err=UNZ_OK;
- uInt iSizeVar;
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- uLong offset_local_extrafield; /* offset of the local extra field */
- uInt size_local_extrafield; /* size of the local extra field */
-# ifndef NOUNCRYPT
- char source[12];
-# else
- if (password != NULL)
- return UNZ_PARAMERROR;
-# endif
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_PARAMERROR;
-
- if (s->pfile_in_zip_read != NULL)
- unzCloseCurrentFile(file);
-
- if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
- &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
- return UNZ_BADZIPFILE;
-
- pfile_in_zip_read_info = (file_in_zip_read_info_s*)
- ALLOC(sizeof(file_in_zip_read_info_s));
- if (pfile_in_zip_read_info==NULL)
- return UNZ_INTERNALERROR;
-
- pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
- pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
- pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
- pfile_in_zip_read_info->pos_local_extrafield=0;
- pfile_in_zip_read_info->raw=raw;
-
- if (pfile_in_zip_read_info->read_buffer==NULL)
- {
- TRYFREE(pfile_in_zip_read_info);
- return UNZ_INTERNALERROR;
- }
-
- pfile_in_zip_read_info->stream_initialised=0;
-
- if (method!=NULL)
- *method = (int)s->cur_file_info.compression_method;
-
- if (level!=NULL)
- {
- *level = 6;
- switch (s->cur_file_info.flag & 0x06)
- {
- case 6 : *level = 1; break;
- case 4 : *level = 2; break;
- case 2 : *level = 9; break;
- }
- }
-
- if ((s->cur_file_info.compression_method!=0) &&
- (s->cur_file_info.compression_method!=Z_DEFLATED))
- err=UNZ_BADZIPFILE;
-
- pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
- pfile_in_zip_read_info->crc32=0;
- pfile_in_zip_read_info->compression_method =
- s->cur_file_info.compression_method;
- pfile_in_zip_read_info->filestream=s->filestream;
- pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
- pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
-
- pfile_in_zip_read_info->stream.total_out = 0;
-
- if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
- (!raw))
- {
- pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
- pfile_in_zip_read_info->stream.zfree = (free_func)0;
- pfile_in_zip_read_info->stream.opaque = (voidpf)0;
- pfile_in_zip_read_info->stream.next_in = (voidpf)0;
- pfile_in_zip_read_info->stream.avail_in = 0;
-
- err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
- if (err == Z_OK)
- pfile_in_zip_read_info->stream_initialised=1;
- else
- {
- TRYFREE(pfile_in_zip_read_info);
- return err;
- }
- /* windowBits is passed < 0 to tell that there is no zlib header.
- * Note that in this case inflate *requires* an extra "dummy" byte
- * after the compressed stream in order to complete decompression and
- * return Z_STREAM_END.
- * In unzip, i don't wait absolutely Z_STREAM_END because I known the
- * size of both compressed and uncompressed data
- */
- }
- pfile_in_zip_read_info->rest_read_compressed =
- s->cur_file_info.compressed_size ;
- pfile_in_zip_read_info->rest_read_uncompressed =
- s->cur_file_info.uncompressed_size ;
-
-
- pfile_in_zip_read_info->pos_in_zipfile =
- s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
- iSizeVar;
-
- pfile_in_zip_read_info->stream.avail_in = (uInt)0;
-
- s->pfile_in_zip_read = pfile_in_zip_read_info;
-
-# ifndef NOUNCRYPT
- if (password != NULL)
- {
- int i;
- s->pcrc_32_tab = get_crc_table();
- init_keys(password,s->keys,s->pcrc_32_tab);
- if (ZSEEK(s->z_filefunc, s->filestream,
- s->pfile_in_zip_read->pos_in_zipfile +
- s->pfile_in_zip_read->byte_before_the_zipfile,
- SEEK_SET)!=0)
- return UNZ_INTERNALERROR;
- if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
- return UNZ_INTERNALERROR;
-
- for (i = 0; i<12; i++)
- zdecode(s->keys,s->pcrc_32_tab,source[i]);
-
- s->pfile_in_zip_read->pos_in_zipfile+=12;
- s->encrypted=1;
- }
-# endif
-
-
- return UNZ_OK;
-}
-
-extern int ZEXPORT unzOpenCurrentFile (file)
- unzFile file;
-{
- return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
-}
-
-extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
- unzFile file;
- const char* password;
-{
- return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
-}
-
-extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
- unzFile file;
- int* method;
- int* level;
- int raw;
-{
- return unzOpenCurrentFile3(file, method, level, raw, NULL);
-}
-
-/*
- Read bytes from the current file.
- buf contain buffer where data must be copied
- len the size of buf.
-
- return the number of byte copied if somes bytes are copied
- return 0 if the end of file was reached
- return <0 with error code if there is an error
- (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-extern int ZEXPORT unzReadCurrentFile (file, buf, len)
- unzFile file;
- voidp buf;
- unsigned len;
-{
- int err=UNZ_OK;
- uInt iRead = 0;
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
-
- if ((pfile_in_zip_read_info->read_buffer == NULL))
- return UNZ_END_OF_LIST_OF_FILE;
- if (len==0)
- return 0;
-
- pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
-
- pfile_in_zip_read_info->stream.avail_out = (uInt)len;
-
- if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
- (!(pfile_in_zip_read_info->raw)))
- pfile_in_zip_read_info->stream.avail_out =
- (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
-
- if ((len>pfile_in_zip_read_info->rest_read_compressed+
- pfile_in_zip_read_info->stream.avail_in) &&
- (pfile_in_zip_read_info->raw))
- pfile_in_zip_read_info->stream.avail_out =
- (uInt)pfile_in_zip_read_info->rest_read_compressed+
- pfile_in_zip_read_info->stream.avail_in;
-
- while (pfile_in_zip_read_info->stream.avail_out>0)
- {
- if ((pfile_in_zip_read_info->stream.avail_in==0) &&
- (pfile_in_zip_read_info->rest_read_compressed>0))
- {
- uInt uReadThis = UNZ_BUFSIZE;
- if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
- uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
- if (uReadThis == 0)
- return UNZ_EOF;
- if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- pfile_in_zip_read_info->pos_in_zipfile +
- pfile_in_zip_read_info->byte_before_the_zipfile,
- ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
- if (ZREAD(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- pfile_in_zip_read_info->read_buffer,
- uReadThis)!=uReadThis)
- return UNZ_ERRNO;
-
-
-# ifndef NOUNCRYPT
- if(s->encrypted)
- {
- uInt i;
- for(i=0;i<uReadThis;i++)
- pfile_in_zip_read_info->read_buffer[i] =
- zdecode(s->keys,s->pcrc_32_tab,
- pfile_in_zip_read_info->read_buffer[i]);
- }
-# endif
-
-
- pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
-
- pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
-
- pfile_in_zip_read_info->stream.next_in =
- (Bytef*)pfile_in_zip_read_info->read_buffer;
- pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
- }
-
- if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
- {
- uInt uDoCopy,i ;
-
- if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
- (pfile_in_zip_read_info->rest_read_compressed == 0))
- return (iRead==0) ? UNZ_EOF : iRead;
-
- if (pfile_in_zip_read_info->stream.avail_out <
- pfile_in_zip_read_info->stream.avail_in)
- uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
- else
- uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
-
- for (i=0;i<uDoCopy;i++)
- *(pfile_in_zip_read_info->stream.next_out+i) =
- *(pfile_in_zip_read_info->stream.next_in+i);
-
- pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
- pfile_in_zip_read_info->stream.next_out,
- uDoCopy);
- pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
- pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
- pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
- pfile_in_zip_read_info->stream.next_out += uDoCopy;
- pfile_in_zip_read_info->stream.next_in += uDoCopy;
- pfile_in_zip_read_info->stream.total_out += uDoCopy;
- iRead += uDoCopy;
- }
- else
- {
- uLong uTotalOutBefore,uTotalOutAfter;
- const Bytef *bufBefore;
- uLong uOutThis;
- int flush=Z_SYNC_FLUSH;
-
- uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
- bufBefore = pfile_in_zip_read_info->stream.next_out;
-
- /*
- if ((pfile_in_zip_read_info->rest_read_uncompressed ==
- pfile_in_zip_read_info->stream.avail_out) &&
- (pfile_in_zip_read_info->rest_read_compressed == 0))
- flush = Z_FINISH;
- */
- err=inflate(&pfile_in_zip_read_info->stream,flush);
-
- if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
- err = Z_DATA_ERROR;
-
- uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
- uOutThis = uTotalOutAfter-uTotalOutBefore;
-
- pfile_in_zip_read_info->crc32 =
- crc32(pfile_in_zip_read_info->crc32,bufBefore,
- (uInt)(uOutThis));
-
- pfile_in_zip_read_info->rest_read_uncompressed -=
- uOutThis;
-
- iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
-
- if (err==Z_STREAM_END)
- return (iRead==0) ? UNZ_EOF : iRead;
- if (err!=Z_OK)
- break;
- }
- }
-
- if (err==Z_OK)
- return iRead;
- return err;
-}
-
-
-/*
- Give the current position in uncompressed data
-*/
-extern z_off_t ZEXPORT unztell (file)
- unzFile file;
-{
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
- return (z_off_t)pfile_in_zip_read_info->stream.total_out;
-}
-
-
-/*
- return 1 if the end of file was reached, 0 elsewhere
-*/
-extern int ZEXPORT unzeof (file)
- unzFile file;
-{
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
- if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
- return 1;
- else
- return 0;
-}
-
-
-
-/*
- Read extra field from the current file (opened by unzOpenCurrentFile)
- This is the local-header version of the extra field (sometimes, there is
- more info in the local-header version than in the central-header)
-
- if buf==NULL, it return the size of the local extra field that can be read
-
- if buf!=NULL, len is the size of the buffer, the extra header is copied in
- buf.
- the return value is the number of bytes copied in buf, or (if <0)
- the error code
-*/
-extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
- unzFile file;
- voidp buf;
- unsigned len;
-{
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- uInt read_now;
- uLong size_to_read;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
- size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
- pfile_in_zip_read_info->pos_local_extrafield);
-
- if (buf==NULL)
- return (int)size_to_read;
-
- if (len>size_to_read)
- read_now = (uInt)size_to_read;
- else
- read_now = (uInt)len ;
-
- if (read_now==0)
- return 0;
-
- if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- pfile_in_zip_read_info->offset_local_extrafield +
- pfile_in_zip_read_info->pos_local_extrafield,
- ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
-
- if (ZREAD(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- buf,read_now)!=read_now)
- return UNZ_ERRNO;
-
- return (int)read_now;
-}
-
-/*
- Close the file in zip opened with unzipOpenCurrentFile
- Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-extern int ZEXPORT unzCloseCurrentFile (file)
- unzFile file;
-{
- int err=UNZ_OK;
-
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
-
- if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
- (!pfile_in_zip_read_info->raw))
- {
- if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
- err=UNZ_CRCERROR;
- }
-
-
- TRYFREE(pfile_in_zip_read_info->read_buffer);
- pfile_in_zip_read_info->read_buffer = NULL;
- if (pfile_in_zip_read_info->stream_initialised)
- inflateEnd(&pfile_in_zip_read_info->stream);
-
- pfile_in_zip_read_info->stream_initialised = 0;
- TRYFREE(pfile_in_zip_read_info);
-
- s->pfile_in_zip_read=NULL;
-
- return err;
-}
-
-
-/*
- Get the global comment string of the ZipFile, in the szComment buffer.
- uSizeBuf is the size of the szComment buffer.
- return the number of byte copied or an error code <0
-*/
-extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
- unzFile file;
- char *szComment;
- uLong uSizeBuf;
-{
- int err=UNZ_OK;
- unz_s* s;
- uLong uReadThis ;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- uReadThis = uSizeBuf;
- if (uReadThis>s->gi.size_comment)
- uReadThis = s->gi.size_comment;
-
- if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
-
- if (uReadThis>0)
- {
- *szComment='\0';
- if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
- return UNZ_ERRNO;
- }
-
- if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
- *(szComment+s->gi.size_comment)='\0';
- return (int)uReadThis;
-}
-
-/* Additions by RX '2004 */
-extern uLong ZEXPORT unzGetOffset (file)
- unzFile file;
-{
- unz_s* s;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return 0;
- if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
- if (s->num_file==s->gi.number_entry)
- return 0;
- return s->pos_in_central_dir;
-}
-
-extern int ZEXPORT unzSetOffset (file, pos)
- unzFile file;
- uLong pos;
-{
- unz_s* s;
- int err;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- s->pos_in_central_dir = pos;
- s->num_file = s->gi.number_entry; /* hack */
- err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
+/* unzip.c -- IO for uncompress .zip files using zlib
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ Read unzip.h for more info
+*/
+
+/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
+compatibility with older software. The following is from the original crypt.c. Code
+woven in by Terry Thorsen 1/2003.
+*/
+/*
+ Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
+
+ See the accompanying file LICENSE, version 2000-Apr-09 or later
+ (the contents of which are also included in zip.h) for terms of use.
+ If, for some reason, all these files are missing, the Info-ZIP license
+ also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
+*/
+/*
+ crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h]
+
+ The encryption/decryption parts of this source code (as opposed to the
+ non-echoing password parts) were originally written in Europe. The
+ whole source package can be freely distributed, including from the USA.
+ (Prior to January 2000, re-export from the US was a violation of US law.)
+ */
+
+/*
+ This encryption code is a direct transcription of the algorithm from
+ Roger Schlafly, described by Phil Katz in the file appnote.txt. This
+ file (appnote.txt) is distributed with the PKZIP program (even in the
+ version without encryption capabilities).
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "zlib.h"
+#include "unzip.h"
+
+#ifdef STDC
+# include <stddef.h>
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+ extern int errno;
+#else
+# include <errno.h>
+#endif
+
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+
+#ifndef CASESENSITIVITYDEFAULT_NO
+# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
+# define CASESENSITIVITYDEFAULT_NO
+# endif
+#endif
+
+
+#ifndef UNZ_BUFSIZE
+#define UNZ_BUFSIZE (16384)
+#endif
+
+#ifndef UNZ_MAXFILENAMEINZIP
+#define UNZ_MAXFILENAMEINZIP (256)
+#endif
+
+#ifndef ALLOC
+# define ALLOC(size) (malloc(size))
+#endif
+#ifndef TRYFREE
+# define TRYFREE(p) {if (p) free(p);}
+#endif
+
+#define SIZECENTRALDIRITEM (0x2e)
+#define SIZEZIPLOCALHEADER (0x1e)
+
+
+
+
+const char unz_copyright[] =
+ " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
+
+/* unz_file_info_interntal contain internal info about a file in zipfile*/
+typedef struct unz_file_info_internal_s
+{
+ uLong offset_curfile;/* relative offset of local header 4 bytes */
+} unz_file_info_internal;
+
+
+/* file_in_zip_read_info_s contain internal information about a file in zipfile,
+ when reading and decompress it */
+typedef struct
+{
+ char *read_buffer; /* internal buffer for compressed data */
+ z_stream stream; /* zLib stream structure for inflate */
+
+ uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/
+ uLong stream_initialised; /* flag set if stream structure is initialised*/
+
+ uLong offset_local_extrafield;/* offset of the local extra field */
+ uInt size_local_extrafield;/* size of the local extra field */
+ uLong pos_local_extrafield; /* position in the local extra field in read*/
+
+ uLong crc32; /* crc32 of all data uncompressed */
+ uLong crc32_wait; /* crc32 we must obtain after decompress all */
+ uLong rest_read_compressed; /* number of byte to be decompressed */
+ uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
+ zlib_filefunc_def z_filefunc;
+ voidpf filestream; /* io structore of the zipfile */
+ uLong compression_method; /* compression method (0==store) */
+ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+ int raw;
+} file_in_zip_read_info_s;
+
+
+/* unz_s contain internal information about the zipfile
+*/
+typedef struct
+{
+ zlib_filefunc_def z_filefunc;
+ voidpf filestream; /* io structore of the zipfile */
+ unz_global_info gi; /* public global information */
+ uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
+ uLong num_file; /* number of the current file in the zipfile*/
+ uLong pos_in_central_dir; /* pos of the current file in the central dir*/
+ uLong current_file_ok; /* flag about the usability of the current file*/
+ uLong central_pos; /* position of the beginning of the central dir*/
+
+ uLong size_central_dir; /* size of the central directory */
+ uLong offset_central_dir; /* offset of start of central directory with
+ respect to the starting disk number */
+
+ unz_file_info cur_file_info; /* public info about the current file in zip*/
+ unz_file_info_internal cur_file_info_internal; /* private info about it*/
+ file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
+ file if we are decompressing it */
+ int encrypted;
+# ifndef NOUNCRYPT
+ unsigned long keys[3]; /* keys defining the pseudo-random sequence */
+ const unsigned long* pcrc_32_tab;
+# endif
+} unz_s;
+
+
+#ifndef NOUNCRYPT
+#include "crypt.h"
+#endif
+
+/* ===========================================================================
+ Read a byte from a gz_stream; update next_in and avail_in. Return EOF
+ for end of file.
+ IN assertion: the stream s has been sucessfully opened for reading.
+*/
+
+
+local int unzlocal_getByte OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream,
+ int *pi));
+
+local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+ int *pi;
+{
+ unsigned char c;
+ int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
+ if (err==1)
+ {
+ *pi = (int)c;
+ return UNZ_OK;
+ }
+ else
+ {
+ if (ZERROR(*pzlib_filefunc_def,filestream))
+ return UNZ_ERRNO;
+ else
+ return UNZ_EOF;
+ }
+}
+
+
+/* ===========================================================================
+ Reads a long in LSB order from the given gz_stream. Sets
+*/
+local int unzlocal_getShort OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX));
+
+local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+ uLong *pX;
+{
+ uLong x ;
+ int i;
+ int err;
+
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<8;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+local int unzlocal_getLong OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream,
+ uLong *pX));
+
+local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+ uLong *pX;
+{
+ uLong x ;
+ int i;
+ int err;
+
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x = (uLong)i;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<8;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<16;
+
+ if (err==UNZ_OK)
+ err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
+ x += ((uLong)i)<<24;
+
+ if (err==UNZ_OK)
+ *pX = x;
+ else
+ *pX = 0;
+ return err;
+}
+
+
+/* My own strcmpi / strcasecmp */
+local int strcmpcasenosensitive_internal (fileName1,fileName2)
+ const char* fileName1;
+ const char* fileName2;
+{
+ for (;;)
+ {
+ char c1=*(fileName1++);
+ char c2=*(fileName2++);
+ if ((c1>='a') && (c1<='z'))
+ c1 -= 0x20;
+ if ((c2>='a') && (c2<='z'))
+ c2 -= 0x20;
+ if (c1=='\0')
+ return ((c2=='\0') ? 0 : -1);
+ if (c2=='\0')
+ return 1;
+ if (c1<c2)
+ return -1;
+ if (c1>c2)
+ return 1;
+ }
+}
+
+
+#ifdef CASESENSITIVITYDEFAULT_NO
+#define CASESENSITIVITYDEFAULTVALUE 2
+#else
+#define CASESENSITIVITYDEFAULTVALUE 1
+#endif
+
+#ifndef STRCMPCASENOSENTIVEFUNCTION
+#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
+#endif
+
+/*
+ Compare two filename (fileName1,fileName2).
+ If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+ If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+ or strcasecmp)
+ If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+ (like 1 on Unix, 2 on Windows)
+
+*/
+extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
+ const char* fileName1;
+ const char* fileName2;
+ int iCaseSensitivity;
+{
+ if (iCaseSensitivity==0)
+ iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
+
+ if (iCaseSensitivity==1)
+ return strcmp(fileName1,fileName2);
+
+ return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
+}
+
+#ifndef BUFREADCOMMENT
+#define BUFREADCOMMENT (0x400)
+#endif
+
+/*
+ Locate the Central directory of a zipfile (at the end, just before
+ the global comment)
+*/
+local uLong unzlocal_SearchCentralDir OF((
+ const zlib_filefunc_def* pzlib_filefunc_def,
+ voidpf filestream));
+
+local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
+ const zlib_filefunc_def* pzlib_filefunc_def;
+ voidpf filestream;
+{
+ unsigned char* buf;
+ uLong uSizeFile;
+ uLong uBackRead;
+ uLong uMaxBack=0xffff; /* maximum size of global comment */
+ uLong uPosFound=0;
+
+ if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
+ return 0;
+
+
+ uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
+
+ if (uMaxBack>uSizeFile)
+ uMaxBack = uSizeFile;
+
+ buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
+ if (buf==NULL)
+ return 0;
+
+ uBackRead = 4;
+ while (uBackRead<uMaxBack)
+ {
+ uLong uReadSize,uReadPos ;
+ int i;
+ if (uBackRead+BUFREADCOMMENT>uMaxBack)
+ uBackRead = uMaxBack;
+ else
+ uBackRead+=BUFREADCOMMENT;
+ uReadPos = uSizeFile-uBackRead ;
+
+ uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+ (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
+ if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ break;
+
+ if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
+ break;
+
+ for (i=(int)uReadSize-3; (i--)>0;)
+ if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
+ ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
+ {
+ uPosFound = uReadPos+i;
+ break;
+ }
+
+ if (uPosFound!=0)
+ break;
+ }
+ TRYFREE(buf);
+ return uPosFound;
+}
+
+/*
+ Open a Zip file. path contain the full pathname (by example,
+ on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
+ "zlib/zlib114.zip".
+ If the zipfile cannot be opened (file doesn't exist or in not valid), the
+ return value is NULL.
+ Else, the return value is a unzFile Handle, usable with other function
+ of this unzip package.
+*/
+extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
+ const char *path;
+ zlib_filefunc_def* pzlib_filefunc_def;
+{
+ unz_s us;
+ unz_s *s;
+ uLong central_pos,uL;
+
+ uLong number_disk; /* number of the current dist, used for
+ spaning ZIP, unsupported, always 0*/
+ uLong number_disk_with_CD; /* number the the disk with central dir, used
+ for spaning ZIP, unsupported, always 0*/
+ uLong number_entry_CD; /* total number of entries in
+ the central dir
+ (same than number_entry on nospan) */
+
+ int err=UNZ_OK;
+
+ if (unz_copyright[0]!=' ')
+ return NULL;
+
+ if (pzlib_filefunc_def==NULL)
+ fill_fopen_filefunc(&us.z_filefunc);
+ else
+ us.z_filefunc = *pzlib_filefunc_def;
+
+ us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
+ path,
+ ZLIB_FILEFUNC_MODE_READ |
+ ZLIB_FILEFUNC_MODE_EXISTING);
+ if (us.filestream==NULL)
+ return NULL;
+
+ central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
+ if (central_pos==0)
+ err=UNZ_ERRNO;
+
+ if (ZSEEK(us.z_filefunc, us.filestream,
+ central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+ /* the signature, already checked */
+ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of this disk */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* number of the disk with the start of the central directory */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central dir on this disk */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* total number of entries in the central dir */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if ((number_entry_CD!=us.gi.number_entry) ||
+ (number_disk_with_CD!=0) ||
+ (number_disk!=0))
+ err=UNZ_BADZIPFILE;
+
+ /* size of the central directory */
+ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* offset of start of central directory with respect to the
+ starting disk number */
+ if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ /* zipfile comment length */
+ if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
+ (err==UNZ_OK))
+ err=UNZ_BADZIPFILE;
+
+ if (err!=UNZ_OK)
+ {
+ ZCLOSE(us.z_filefunc, us.filestream);
+ return NULL;
+ }
+
+ us.byte_before_the_zipfile = central_pos -
+ (us.offset_central_dir+us.size_central_dir);
+ us.central_pos = central_pos;
+ us.pfile_in_zip_read = NULL;
+ us.encrypted = 0;
+
+
+ s=(unz_s*)ALLOC(sizeof(unz_s));
+ *s=us;
+ unzGoToFirstFile((unzFile)s);
+ return (unzFile)s;
+}
+
+
+extern unzFile ZEXPORT unzOpen (path)
+ const char *path;
+{
+ return unzOpen2(path, NULL);
+}
+
+/*
+ Close a ZipFile opened with unzipOpen.
+ If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
+ these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
+ return UNZ_OK if there is no problem. */
+extern int ZEXPORT unzClose (file)
+ unzFile file;
+{
+ unz_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ if (s->pfile_in_zip_read!=NULL)
+ unzCloseCurrentFile(file);
+
+ ZCLOSE(s->z_filefunc, s->filestream);
+ TRYFREE(s);
+ return UNZ_OK;
+}
+
+
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem. */
+extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
+ unzFile file;
+ unz_global_info *pglobal_info;
+{
+ unz_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ *pglobal_info=s->gi;
+ return UNZ_OK;
+}
+
+
+/*
+ Translate date/time from Dos format to tm_unz (readable more easilty)
+*/
+local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
+ uLong ulDosDate;
+ tm_unz* ptm;
+{
+ uLong uDate;
+ uDate = (uLong)(ulDosDate>>16);
+ ptm->tm_mday = (uInt)(uDate&0x1f) ;
+ ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
+ ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
+
+ ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
+ ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
+ ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
+}
+
+/*
+ Get Info about the current file in the zipfile, with internal only info
+*/
+local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
+ unz_file_info *pfile_info,
+ unz_file_info_internal
+ *pfile_info_internal,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+
+local int unzlocal_GetCurrentFileInfoInternal (file,
+ pfile_info,
+ pfile_info_internal,
+ szFileName, fileNameBufferSize,
+ extraField, extraFieldBufferSize,
+ szComment, commentBufferSize)
+ unzFile file;
+ unz_file_info *pfile_info;
+ unz_file_info_internal *pfile_info_internal;
+ char *szFileName;
+ uLong fileNameBufferSize;
+ void *extraField;
+ uLong extraFieldBufferSize;
+ char *szComment;
+ uLong commentBufferSize;
+{
+ unz_s* s;
+ unz_file_info file_info;
+ unz_file_info_internal file_info_internal;
+ int err=UNZ_OK;
+ uLong uMagic;
+ long lSeek=0;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (ZSEEK(s->z_filefunc, s->filestream,
+ s->pos_in_central_dir+s->byte_before_the_zipfile,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ err=UNZ_ERRNO;
+
+
+ /* we check the magic */
+ if (err==UNZ_OK)
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if (uMagic!=0x02014b50)
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ lSeek+=file_info.size_filename;
+ if ((err==UNZ_OK) && (szFileName!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_filename<fileNameBufferSize)
+ {
+ *(szFileName+file_info.size_filename)='\0';
+ uSizeRead = file_info.size_filename;
+ }
+ else
+ uSizeRead = fileNameBufferSize;
+
+ if ((file_info.size_filename>0) && (fileNameBufferSize>0))
+ if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek -= uSizeRead;
+ }
+
+
+ if ((err==UNZ_OK) && (extraField!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_file_extra<extraFieldBufferSize)
+ uSizeRead = file_info.size_file_extra;
+ else
+ uSizeRead = extraFieldBufferSize;
+
+ if (lSeek!=0)
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
+ if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek += file_info.size_file_extra - uSizeRead;
+ }
+ else
+ lSeek+=file_info.size_file_extra;
+
+
+ if ((err==UNZ_OK) && (szComment!=NULL))
+ {
+ uLong uSizeRead ;
+ if (file_info.size_file_comment<commentBufferSize)
+ {
+ *(szComment+file_info.size_file_comment)='\0';
+ uSizeRead = file_info.size_file_comment;
+ }
+ else
+ uSizeRead = commentBufferSize;
+
+ if (lSeek!=0)
+ if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
+ lSeek=0;
+ else
+ err=UNZ_ERRNO;
+ if ((file_info.size_file_comment>0) && (commentBufferSize>0))
+ if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
+ err=UNZ_ERRNO;
+ lSeek+=file_info.size_file_comment - uSizeRead;
+ }
+ else
+ lSeek+=file_info.size_file_comment;
+
+ if ((err==UNZ_OK) && (pfile_info!=NULL))
+ *pfile_info=file_info;
+
+ if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
+ *pfile_info_internal=file_info_internal;
+
+ return err;
+}
+
+
+
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem.
+*/
+extern int ZEXPORT unzGetCurrentFileInfo (file,
+ pfile_info,
+ szFileName, fileNameBufferSize,
+ extraField, extraFieldBufferSize,
+ szComment, commentBufferSize)
+ unzFile file;
+ unz_file_info *pfile_info;
+ char *szFileName;
+ uLong fileNameBufferSize;
+ void *extraField;
+ uLong extraFieldBufferSize;
+ char *szComment;
+ uLong commentBufferSize;
+{
+ return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
+ szFileName,fileNameBufferSize,
+ extraField,extraFieldBufferSize,
+ szComment,commentBufferSize);
+}
+
+/*
+ Set the current file of the zipfile to the first file.
+ return UNZ_OK if there is no problem
+*/
+extern int ZEXPORT unzGoToFirstFile (file)
+ unzFile file;
+{
+ int err=UNZ_OK;
+ unz_s* s;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ s->pos_in_central_dir=s->offset_central_dir;
+ s->num_file=0;
+ err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+/*
+ Set the current file of the zipfile to the next file.
+ return UNZ_OK if there is no problem
+ return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+*/
+extern int ZEXPORT unzGoToNextFile (file)
+ unzFile file;
+{
+ unz_s* s;
+ int err;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+ if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
+ if (s->num_file+1==s->gi.number_entry)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
+ s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
+ s->num_file++;
+ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+
+/*
+ Try locate the file szFileName in the zipfile.
+ For the iCaseSensitivity signification, see unzipStringFileNameCompare
+
+ return value :
+ UNZ_OK if the file is found. It becomes the current file.
+ UNZ_END_OF_LIST_OF_FILE if the file is not found
+*/
+extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
+ unzFile file;
+ const char *szFileName;
+ int iCaseSensitivity;
+{
+ unz_s* s;
+ int err;
+
+ /* We remember the 'current' position in the file so that we can jump
+ * back there if we fail.
+ */
+ unz_file_info cur_file_infoSaved;
+ unz_file_info_internal cur_file_info_internalSaved;
+ uLong num_fileSaved;
+ uLong pos_in_central_dirSaved;
+
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+
+ if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
+ return UNZ_PARAMERROR;
+
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ /* Save the current state */
+ num_fileSaved = s->num_file;
+ pos_in_central_dirSaved = s->pos_in_central_dir;
+ cur_file_infoSaved = s->cur_file_info;
+ cur_file_info_internalSaved = s->cur_file_info_internal;
+
+ err = unzGoToFirstFile(file);
+
+ while (err == UNZ_OK)
+ {
+ char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
+ err = unzGetCurrentFileInfo(file,NULL,
+ szCurrentFileName,sizeof(szCurrentFileName)-1,
+ NULL,0,NULL,0);
+ if (err == UNZ_OK)
+ {
+ if (unzStringFileNameCompare(szCurrentFileName,
+ szFileName,iCaseSensitivity)==0)
+ return UNZ_OK;
+ err = unzGoToNextFile(file);
+ }
+ }
+
+ /* We failed, so restore the state of the 'current file' to where we
+ * were.
+ */
+ s->num_file = num_fileSaved ;
+ s->pos_in_central_dir = pos_in_central_dirSaved ;
+ s->cur_file_info = cur_file_infoSaved;
+ s->cur_file_info_internal = cur_file_info_internalSaved;
+ return err;
+}
+
+
+/*
+///////////////////////////////////////////
+// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
+// I need random access
+//
+// Further optimization could be realized by adding an ability
+// to cache the directory in memory. The goal being a single
+// comprehensive file read to put the file I need in a memory.
+*/
+
+/*
+typedef struct unz_file_pos_s
+{
+ uLong pos_in_zip_directory; // offset in file
+ uLong num_of_file; // # of file
+} unz_file_pos;
+*/
+
+extern int ZEXPORT unzGetFilePos(file, file_pos)
+ unzFile file;
+ unz_file_pos* file_pos;
+{
+ unz_s* s;
+
+ if (file==NULL || file_pos==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_END_OF_LIST_OF_FILE;
+
+ file_pos->pos_in_zip_directory = s->pos_in_central_dir;
+ file_pos->num_of_file = s->num_file;
+
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzGoToFilePos(file, file_pos)
+ unzFile file;
+ unz_file_pos* file_pos;
+{
+ unz_s* s;
+ int err;
+
+ if (file==NULL || file_pos==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ /* jump to the right spot */
+ s->pos_in_central_dir = file_pos->pos_in_zip_directory;
+ s->num_file = file_pos->num_of_file;
+
+ /* set the current file */
+ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ /* return results */
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
+
+/*
+// Unzip Helper Functions - should be here?
+///////////////////////////////////////////
+*/
+
+/*
+ Read the local header of the current zipfile
+ Check the coherency of the local header and info in the end of central
+ directory about this file
+ store in *piSizeVar the size of extra info in local header
+ (filename and size of extra field data)
+*/
+local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
+ poffset_local_extrafield,
+ psize_local_extrafield)
+ unz_s* s;
+ uInt* piSizeVar;
+ uLong *poffset_local_extrafield;
+ uInt *psize_local_extrafield;
+{
+ uLong uMagic,uData,uFlags;
+ uLong size_filename;
+ uLong size_extra_field;
+ int err=UNZ_OK;
+
+ *piSizeVar = 0;
+ *poffset_local_extrafield = 0;
+ *psize_local_extrafield = 0;
+
+ if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
+ s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+
+ if (err==UNZ_OK)
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if (uMagic!=0x04034b50)
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+ err=UNZ_ERRNO;
+/*
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
+ err=UNZ_BADZIPFILE;
+*/
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
+ err=UNZ_BADZIPFILE;
+
+ if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
+ (s->cur_file_info.compression_method!=Z_DEFLATED))
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
+ err=UNZ_ERRNO;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
+ ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
+ ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+ if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
+ ((uFlags & 8)==0))
+ err=UNZ_BADZIPFILE;
+
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
+ err=UNZ_ERRNO;
+ else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
+ err=UNZ_BADZIPFILE;
+
+ *piSizeVar += (uInt)size_filename;
+
+ if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
+ err=UNZ_ERRNO;
+ *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
+ SIZEZIPLOCALHEADER + size_filename;
+ *psize_local_extrafield = (uInt)size_extra_field;
+
+ *piSizeVar += (uInt)size_extra_field;
+
+ return err;
+}
+
+/*
+ Open for reading data the current file in the zipfile.
+ If there is no error and the file is opened, the return value is UNZ_OK.
+*/
+extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
+ unzFile file;
+ int* method;
+ int* level;
+ int raw;
+ const char* password;
+{
+ int err=UNZ_OK;
+ uInt iSizeVar;
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ uLong offset_local_extrafield; /* offset of the local extra field */
+ uInt size_local_extrafield; /* size of the local extra field */
+# ifndef NOUNCRYPT
+ char source[12];
+# else
+ if (password != NULL)
+ return UNZ_PARAMERROR;
+# endif
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return UNZ_PARAMERROR;
+
+ if (s->pfile_in_zip_read != NULL)
+ unzCloseCurrentFile(file);
+
+ if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
+ &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
+ return UNZ_BADZIPFILE;
+
+ pfile_in_zip_read_info = (file_in_zip_read_info_s*)
+ ALLOC(sizeof(file_in_zip_read_info_s));
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_INTERNALERROR;
+
+ pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
+ pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
+ pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
+ pfile_in_zip_read_info->pos_local_extrafield=0;
+ pfile_in_zip_read_info->raw=raw;
+
+ if (pfile_in_zip_read_info->read_buffer==NULL)
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return UNZ_INTERNALERROR;
+ }
+
+ pfile_in_zip_read_info->stream_initialised=0;
+
+ if (method!=NULL)
+ *method = (int)s->cur_file_info.compression_method;
+
+ if (level!=NULL)
+ {
+ *level = 6;
+ switch (s->cur_file_info.flag & 0x06)
+ {
+ case 6 : *level = 1; break;
+ case 4 : *level = 2; break;
+ case 2 : *level = 9; break;
+ }
+ }
+
+ if ((s->cur_file_info.compression_method!=0) &&
+ (s->cur_file_info.compression_method!=Z_DEFLATED))
+ err=UNZ_BADZIPFILE;
+
+ pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
+ pfile_in_zip_read_info->crc32=0;
+ pfile_in_zip_read_info->compression_method =
+ s->cur_file_info.compression_method;
+ pfile_in_zip_read_info->filestream=s->filestream;
+ pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
+ pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
+
+ pfile_in_zip_read_info->stream.total_out = 0;
+
+ if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
+ (!raw))
+ {
+ pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
+ pfile_in_zip_read_info->stream.zfree = (free_func)0;
+ pfile_in_zip_read_info->stream.opaque = (voidpf)0;
+ pfile_in_zip_read_info->stream.next_in = (voidpf)0;
+ pfile_in_zip_read_info->stream.avail_in = 0;
+
+ err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
+ if (err == Z_OK)
+ pfile_in_zip_read_info->stream_initialised=1;
+ else
+ {
+ TRYFREE(pfile_in_zip_read_info);
+ return err;
+ }
+ /* windowBits is passed < 0 to tell that there is no zlib header.
+ * Note that in this case inflate *requires* an extra "dummy" byte
+ * after the compressed stream in order to complete decompression and
+ * return Z_STREAM_END.
+ * In unzip, i don't wait absolutely Z_STREAM_END because I known the
+ * size of both compressed and uncompressed data
+ */
+ }
+ pfile_in_zip_read_info->rest_read_compressed =
+ s->cur_file_info.compressed_size ;
+ pfile_in_zip_read_info->rest_read_uncompressed =
+ s->cur_file_info.uncompressed_size ;
+
+
+ pfile_in_zip_read_info->pos_in_zipfile =
+ s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
+ iSizeVar;
+
+ pfile_in_zip_read_info->stream.avail_in = (uInt)0;
+
+ s->pfile_in_zip_read = pfile_in_zip_read_info;
+
+# ifndef NOUNCRYPT
+ if (password != NULL)
+ {
+ int i;
+ s->pcrc_32_tab = get_crc_table();
+ init_keys(password,s->keys,s->pcrc_32_tab);
+ if (ZSEEK(s->z_filefunc, s->filestream,
+ s->pfile_in_zip_read->pos_in_zipfile +
+ s->pfile_in_zip_read->byte_before_the_zipfile,
+ SEEK_SET)!=0)
+ return UNZ_INTERNALERROR;
+ if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
+ return UNZ_INTERNALERROR;
+
+ for (i = 0; i<12; i++)
+ zdecode(s->keys,s->pcrc_32_tab,source[i]);
+
+ s->pfile_in_zip_read->pos_in_zipfile+=12;
+ s->encrypted=1;
+ }
+# endif
+
+
+ return UNZ_OK;
+}
+
+extern int ZEXPORT unzOpenCurrentFile (file)
+ unzFile file;
+{
+ return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
+}
+
+extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
+ unzFile file;
+ const char* password;
+{
+ return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
+}
+
+extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
+ unzFile file;
+ int* method;
+ int* level;
+ int raw;
+{
+ return unzOpenCurrentFile3(file, method, level, raw, NULL);
+}
+
+/*
+ Read bytes from the current file.
+ buf contain buffer where data must be copied
+ len the size of buf.
+
+ return the number of byte copied if somes bytes are copied
+ return 0 if the end of file was reached
+ return <0 with error code if there is an error
+ (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+*/
+extern int ZEXPORT unzReadCurrentFile (file, buf, len)
+ unzFile file;
+ voidp buf;
+ unsigned len;
+{
+ int err=UNZ_OK;
+ uInt iRead = 0;
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+
+ if ((pfile_in_zip_read_info->read_buffer == NULL))
+ return UNZ_END_OF_LIST_OF_FILE;
+ if (len==0)
+ return 0;
+
+ pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
+
+ pfile_in_zip_read_info->stream.avail_out = (uInt)len;
+
+ if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
+ (!(pfile_in_zip_read_info->raw)))
+ pfile_in_zip_read_info->stream.avail_out =
+ (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
+
+ if ((len>pfile_in_zip_read_info->rest_read_compressed+
+ pfile_in_zip_read_info->stream.avail_in) &&
+ (pfile_in_zip_read_info->raw))
+ pfile_in_zip_read_info->stream.avail_out =
+ (uInt)pfile_in_zip_read_info->rest_read_compressed+
+ pfile_in_zip_read_info->stream.avail_in;
+
+ while (pfile_in_zip_read_info->stream.avail_out>0)
+ {
+ if ((pfile_in_zip_read_info->stream.avail_in==0) &&
+ (pfile_in_zip_read_info->rest_read_compressed>0))
+ {
+ uInt uReadThis = UNZ_BUFSIZE;
+ if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
+ uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
+ if (uReadThis == 0)
+ return UNZ_EOF;
+ if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->pos_in_zipfile +
+ pfile_in_zip_read_info->byte_before_the_zipfile,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+ if (ZREAD(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->read_buffer,
+ uReadThis)!=uReadThis)
+ return UNZ_ERRNO;
+
+
+# ifndef NOUNCRYPT
+ if(s->encrypted)
+ {
+ uInt i;
+ for(i=0;i<uReadThis;i++)
+ pfile_in_zip_read_info->read_buffer[i] =
+ zdecode(s->keys,s->pcrc_32_tab,
+ pfile_in_zip_read_info->read_buffer[i]);
+ }
+# endif
+
+
+ pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
+
+ pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
+
+ pfile_in_zip_read_info->stream.next_in =
+ (Bytef*)pfile_in_zip_read_info->read_buffer;
+ pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
+ }
+
+ if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
+ {
+ uInt uDoCopy,i ;
+
+ if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
+ (pfile_in_zip_read_info->rest_read_compressed == 0))
+ return (iRead==0) ? UNZ_EOF : iRead;
+
+ if (pfile_in_zip_read_info->stream.avail_out <
+ pfile_in_zip_read_info->stream.avail_in)
+ uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
+ else
+ uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
+
+ for (i=0;i<uDoCopy;i++)
+ *(pfile_in_zip_read_info->stream.next_out+i) =
+ *(pfile_in_zip_read_info->stream.next_in+i);
+
+ pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
+ pfile_in_zip_read_info->stream.next_out,
+ uDoCopy);
+ pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
+ pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
+ pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
+ pfile_in_zip_read_info->stream.next_out += uDoCopy;
+ pfile_in_zip_read_info->stream.next_in += uDoCopy;
+ pfile_in_zip_read_info->stream.total_out += uDoCopy;
+ iRead += uDoCopy;
+ }
+ else
+ {
+ uLong uTotalOutBefore,uTotalOutAfter;
+ const Bytef *bufBefore;
+ uLong uOutThis;
+ int flush=Z_SYNC_FLUSH;
+
+ uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
+ bufBefore = pfile_in_zip_read_info->stream.next_out;
+
+ /*
+ if ((pfile_in_zip_read_info->rest_read_uncompressed ==
+ pfile_in_zip_read_info->stream.avail_out) &&
+ (pfile_in_zip_read_info->rest_read_compressed == 0))
+ flush = Z_FINISH;
+ */
+ err=inflate(&pfile_in_zip_read_info->stream,flush);
+
+ if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
+ err = Z_DATA_ERROR;
+
+ uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
+ uOutThis = uTotalOutAfter-uTotalOutBefore;
+
+ pfile_in_zip_read_info->crc32 =
+ crc32(pfile_in_zip_read_info->crc32,bufBefore,
+ (uInt)(uOutThis));
+
+ pfile_in_zip_read_info->rest_read_uncompressed -=
+ uOutThis;
+
+ iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+
+ if (err==Z_STREAM_END)
+ return (iRead==0) ? UNZ_EOF : iRead;
+ if (err!=Z_OK)
+ break;
+ }
+ }
+
+ if (err==Z_OK)
+ return iRead;
+ return err;
+}
+
+
+/*
+ Give the current position in uncompressed data
+*/
+extern z_off_t ZEXPORT unztell (file)
+ unzFile file;
+{
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ return (z_off_t)pfile_in_zip_read_info->stream.total_out;
+}
+
+
+/*
+ return 1 if the end of file was reached, 0 elsewhere
+*/
+extern int ZEXPORT unzeof (file)
+ unzFile file;
+{
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
+ return 1;
+ else
+ return 0;
+}
+
+
+
+/*
+ Read extra field from the current file (opened by unzOpenCurrentFile)
+ This is the local-header version of the extra field (sometimes, there is
+ more info in the local-header version than in the central-header)
+
+ if buf==NULL, it return the size of the local extra field that can be read
+
+ if buf!=NULL, len is the size of the buffer, the extra header is copied in
+ buf.
+ the return value is the number of bytes copied in buf, or (if <0)
+ the error code
+*/
+extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
+ unzFile file;
+ voidp buf;
+ unsigned len;
+{
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ uInt read_now;
+ uLong size_to_read;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+ size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
+ pfile_in_zip_read_info->pos_local_extrafield);
+
+ if (buf==NULL)
+ return (int)size_to_read;
+
+ if (len>size_to_read)
+ read_now = (uInt)size_to_read;
+ else
+ read_now = (uInt)len ;
+
+ if (read_now==0)
+ return 0;
+
+ if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ pfile_in_zip_read_info->offset_local_extrafield +
+ pfile_in_zip_read_info->pos_local_extrafield,
+ ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+ if (ZREAD(pfile_in_zip_read_info->z_filefunc,
+ pfile_in_zip_read_info->filestream,
+ buf,read_now)!=read_now)
+ return UNZ_ERRNO;
+
+ return (int)read_now;
+}
+
+/*
+ Close the file in zip opened with unzipOpenCurrentFile
+ Return UNZ_CRCERROR if all the file was read but the CRC is not good
+*/
+extern int ZEXPORT unzCloseCurrentFile (file)
+ unzFile file;
+{
+ int err=UNZ_OK;
+
+ unz_s* s;
+ file_in_zip_read_info_s* pfile_in_zip_read_info;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ pfile_in_zip_read_info=s->pfile_in_zip_read;
+
+ if (pfile_in_zip_read_info==NULL)
+ return UNZ_PARAMERROR;
+
+
+ if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
+ (!pfile_in_zip_read_info->raw))
+ {
+ if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
+ err=UNZ_CRCERROR;
+ }
+
+
+ TRYFREE(pfile_in_zip_read_info->read_buffer);
+ pfile_in_zip_read_info->read_buffer = NULL;
+ if (pfile_in_zip_read_info->stream_initialised)
+ inflateEnd(&pfile_in_zip_read_info->stream);
+
+ pfile_in_zip_read_info->stream_initialised = 0;
+ TRYFREE(pfile_in_zip_read_info);
+
+ s->pfile_in_zip_read=NULL;
+
+ return err;
+}
+
+
+/*
+ Get the global comment string of the ZipFile, in the szComment buffer.
+ uSizeBuf is the size of the szComment buffer.
+ return the number of byte copied or an error code <0
+*/
+extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
+ unzFile file;
+ char *szComment;
+ uLong uSizeBuf;
+{
+ int err=UNZ_OK;
+ unz_s* s;
+ uLong uReadThis ;
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ uReadThis = uSizeBuf;
+ if (uReadThis>s->gi.size_comment)
+ uReadThis = s->gi.size_comment;
+
+ if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
+ return UNZ_ERRNO;
+
+ if (uReadThis>0)
+ {
+ *szComment='\0';
+ if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
+ return UNZ_ERRNO;
+ }
+
+ if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
+ *(szComment+s->gi.size_comment)='\0';
+ return (int)uReadThis;
+}
+
+/* Additions by RX '2004 */
+extern uLong ZEXPORT unzGetOffset (file)
+ unzFile file;
+{
+ unz_s* s;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+ if (!s->current_file_ok)
+ return 0;
+ if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
+ if (s->num_file==s->gi.number_entry)
+ return 0;
+ return s->pos_in_central_dir;
+}
+
+extern int ZEXPORT unzSetOffset (file, pos)
+ unzFile file;
+ uLong pos;
+{
+ unz_s* s;
+ int err;
+
+ if (file==NULL)
+ return UNZ_PARAMERROR;
+ s=(unz_s*)file;
+
+ s->pos_in_central_dir = pos;
+ s->num_file = s->gi.number_entry; /* hack */
+ err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
+ &s->cur_file_info_internal,
+ NULL,0,NULL,0,NULL,0);
+ s->current_file_ok = (err == UNZ_OK);
+ return err;
+}
diff --git a/Contrib/zip2exe/zlib/unzip.h b/Contrib/zip2exe/zlib/unzip.h
index c3206a0..b247937 100755
--- a/Contrib/zip2exe/zlib/unzip.h
+++ b/Contrib/zip2exe/zlib/unzip.h
@@ -1,354 +1,354 @@
-/* unzip.h -- IO for uncompress .zip files using zlib
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
- WinZip, InfoZip tools and compatible.
-
- Multi volume ZipFile (span) are not supported.
- Encryption compatible with pkzip 2.04g only supported
- Old compressions used by old PKZip 1.x are not supported
-
-
- I WAIT FEEDBACK at mail info@winimage.com
- Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
-
- Condition of use and distribution are the same than zlib :
-
- 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.
-
-
-*/
-
-/* for more info about .ZIP format, see
- http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
- http://www.info-zip.org/pub/infozip/doc/
- PkWare has also a specification at :
- ftp://ftp.pkware.com/probdesc.zip
-*/
-
-#ifndef _unz_H
-#define _unz_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
- from (void*) without cast */
-typedef struct TagunzFile__ { int unused; } unzFile__;
-typedef unzFile__ *unzFile;
-#else
-typedef voidp unzFile;
-#endif
-
-
-#define UNZ_OK (0)
-#define UNZ_END_OF_LIST_OF_FILE (-100)
-#define UNZ_ERRNO (Z_ERRNO)
-#define UNZ_EOF (0)
-#define UNZ_PARAMERROR (-102)
-#define UNZ_BADZIPFILE (-103)
-#define UNZ_INTERNALERROR (-104)
-#define UNZ_CRCERROR (-105)
-
-/* tm_unz contain date/time info */
-typedef struct tm_unz_s
-{
- uInt tm_sec; /* seconds after the minute - [0,59] */
- uInt tm_min; /* minutes after the hour - [0,59] */
- uInt tm_hour; /* hours since midnight - [0,23] */
- uInt tm_mday; /* day of the month - [1,31] */
- uInt tm_mon; /* months since January - [0,11] */
- uInt tm_year; /* years - [1980..2044] */
-} tm_unz;
-
-/* unz_global_info structure contain global data about the ZIPfile
- These data comes from the end of central dir */
-typedef struct unz_global_info_s
-{
- uLong number_entry; /* total number of entries in
- the central dir on this disk */
- uLong size_comment; /* size of the global comment of the zipfile */
-} unz_global_info;
-
-
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_info_s
-{
- uLong version; /* version made by 2 bytes */
- uLong version_needed; /* version needed to extract 2 bytes */
- uLong flag; /* general purpose bit flag 2 bytes */
- uLong compression_method; /* compression method 2 bytes */
- uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
- uLong crc; /* crc-32 4 bytes */
- uLong compressed_size; /* compressed size 4 bytes */
- uLong uncompressed_size; /* uncompressed size 4 bytes */
- uLong size_filename; /* filename length 2 bytes */
- uLong size_file_extra; /* extra field length 2 bytes */
- uLong size_file_comment; /* file comment length 2 bytes */
-
- uLong disk_num_start; /* disk number start 2 bytes */
- uLong internal_fa; /* internal file attributes 2 bytes */
- uLong external_fa; /* external file attributes 4 bytes */
-
- tm_unz tmu_date;
-} unz_file_info;
-
-extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
- const char* fileName2,
- int iCaseSensitivity));
-/*
- Compare two filename (fileName1,fileName2).
- If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
- If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
- or strcasecmp)
- If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
- (like 1 on Unix, 2 on Windows)
-*/
-
-
-extern unzFile ZEXPORT unzOpen OF((const char *path));
-/*
- Open a Zip file. path contain the full pathname (by example,
- on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
- "zlib/zlib113.zip".
- If the zipfile cannot be opened (file don't exist or in not valid), the
- return value is NULL.
- Else, the return value is a unzFile Handle, usable with other function
- of this unzip package.
-*/
-
-extern unzFile ZEXPORT unzOpen2 OF((const char *path,
- zlib_filefunc_def* pzlib_filefunc_def));
-/*
- Open a Zip file, like unzOpen, but provide a set of file low level API
- for read/write the zip file (see ioapi.h)
-*/
-
-extern int ZEXPORT unzClose OF((unzFile file));
-/*
- Close a ZipFile opened with unzipOpen.
- If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
- these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
- return UNZ_OK if there is no problem. */
-
-extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
- unz_global_info *pglobal_info));
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem. */
-
-
-extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
- char *szComment,
- uLong uSizeBuf));
-/*
- Get the global comment string of the ZipFile, in the szComment buffer.
- uSizeBuf is the size of the szComment buffer.
- return the number of byte copied or an error code <0
-*/
-
-
-/***************************************************************************/
-/* Unzip package allow you browse the directory of the zipfile */
-
-extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
-/*
- Set the current file of the zipfile to the first file.
- return UNZ_OK if there is no problem
-*/
-
-extern int ZEXPORT unzGoToNextFile OF((unzFile file));
-/*
- Set the current file of the zipfile to the next file.
- return UNZ_OK if there is no problem
- return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-
-extern int ZEXPORT unzLocateFile OF((unzFile file,
- const char *szFileName,
- int iCaseSensitivity));
-/*
- Try locate the file szFileName in the zipfile.
- For the iCaseSensitivity signification, see unzStringFileNameCompare
-
- return value :
- UNZ_OK if the file is found. It becomes the current file.
- UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-
-
-/* ****************************************** */
-/* Ryan supplied functions */
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_pos_s
-{
- uLong pos_in_zip_directory; /* offset in zip file directory */
- uLong num_of_file; /* # of file */
-} unz_file_pos;
-
-extern int ZEXPORT unzGetFilePos(
- unzFile file,
- unz_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos(
- unzFile file,
- unz_file_pos* file_pos);
-
-/* ****************************************** */
-
-extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
- unz_file_info *pfile_info,
- char *szFileName,
- uLong fileNameBufferSize,
- void *extraField,
- uLong extraFieldBufferSize,
- char *szComment,
- uLong commentBufferSize));
-/*
- Get Info about the current file
- if pfile_info!=NULL, the *pfile_info structure will contain somes info about
- the current file
- if szFileName!=NULL, the filemane string will be copied in szFileName
- (fileNameBufferSize is the size of the buffer)
- if extraField!=NULL, the extra field information will be copied in extraField
- (extraFieldBufferSize is the size of the buffer).
- This is the Central-header version of the extra field
- if szComment!=NULL, the comment string of the file will be copied in szComment
- (commentBufferSize is the size of the buffer)
-*/
-
-/***************************************************************************/
-/* for reading the content of the current zipfile, you can open it, read data
- from it, and close it (you can close it before reading all the file)
- */
-
-extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
-/*
- Open for reading data the current file in the zipfile.
- If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
- const char* password));
-/*
- Open for reading data the current file in the zipfile.
- password is a crypting password
- If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
- int* method,
- int* level,
- int raw));
-/*
- Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
- if raw==1
- *method will receive method of compression, *level will receive level of
- compression
- note : you can set level parameter as NULL (if you did not want known level,
- but you CANNOT set method parameter as NULL
-*/
-
-extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
- int* method,
- int* level,
- int raw,
- const char* password));
-/*
- Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
- if raw==1
- *method will receive method of compression, *level will receive level of
- compression
- note : you can set level parameter as NULL (if you did not want known level,
- but you CANNOT set method parameter as NULL
-*/
-
-
-extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
-/*
- Close the file in zip opened with unzOpenCurrentFile
- Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-
-extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
- voidp buf,
- unsigned len));
-/*
- Read bytes from the current file (opened by unzOpenCurrentFile)
- buf contain buffer where data must be copied
- len the size of buf.
-
- return the number of byte copied if somes bytes are copied
- return 0 if the end of file was reached
- return <0 with error code if there is an error
- (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-
-extern z_off_t ZEXPORT unztell OF((unzFile file));
-/*
- Give the current position in uncompressed data
-*/
-
-extern int ZEXPORT unzeof OF((unzFile file));
-/*
- return 1 if the end of file was reached, 0 elsewhere
-*/
-
-extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
- voidp buf,
- unsigned len));
-/*
- Read extra field from the current file (opened by unzOpenCurrentFile)
- This is the local-header version of the extra field (sometimes, there is
- more info in the local-header version than in the central-header)
-
- if buf==NULL, it return the size of the local extra field
-
- if buf!=NULL, len is the size of the buffer, the extra header is copied in
- buf.
- the return value is the number of bytes copied in buf, or (if <0)
- the error code
-*/
-
-/***************************************************************************/
-
-/* Get the current file offset */
-extern uLong ZEXPORT unzGetOffset (unzFile file);
-
-/* Set the current file offset */
-extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _unz_H */
+/* unzip.h -- IO for uncompress .zip files using zlib
+ Version 1.01e, February 12th, 2005
+
+ Copyright (C) 1998-2005 Gilles Vollant
+
+ This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
+ WinZip, InfoZip tools and compatible.
+
+ Multi volume ZipFile (span) are not supported.
+ Encryption compatible with pkzip 2.04g only supported
+ Old compressions used by old PKZip 1.x are not supported
+
+
+ I WAIT FEEDBACK at mail info@winimage.com
+ Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
+
+ Condition of use and distribution are the same than zlib :
+
+ 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.
+
+
+*/
+
+/* for more info about .ZIP format, see
+ http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
+ http://www.info-zip.org/pub/infozip/doc/
+ PkWare has also a specification at :
+ ftp://ftp.pkware.com/probdesc.zip
+*/
+
+#ifndef _unz_H
+#define _unz_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _ZLIB_H
+#include "zlib.h"
+#endif
+
+#ifndef _ZLIBIOAPI_H
+#include "ioapi.h"
+#endif
+
+#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
+/* like the STRICT of WIN32, we define a pointer that cannot be converted
+ from (void*) without cast */
+typedef struct TagunzFile__ { int unused; } unzFile__;
+typedef unzFile__ *unzFile;
+#else
+typedef voidp unzFile;
+#endif
+
+
+#define UNZ_OK (0)
+#define UNZ_END_OF_LIST_OF_FILE (-100)
+#define UNZ_ERRNO (Z_ERRNO)
+#define UNZ_EOF (0)
+#define UNZ_PARAMERROR (-102)
+#define UNZ_BADZIPFILE (-103)
+#define UNZ_INTERNALERROR (-104)
+#define UNZ_CRCERROR (-105)
+
+/* tm_unz contain date/time info */
+typedef struct tm_unz_s
+{
+ uInt tm_sec; /* seconds after the minute - [0,59] */
+ uInt tm_min; /* minutes after the hour - [0,59] */
+ uInt tm_hour; /* hours since midnight - [0,23] */
+ uInt tm_mday; /* day of the month - [1,31] */
+ uInt tm_mon; /* months since January - [0,11] */
+ uInt tm_year; /* years - [1980..2044] */
+} tm_unz;
+
+/* unz_global_info structure contain global data about the ZIPfile
+ These data comes from the end of central dir */
+typedef struct unz_global_info_s
+{
+ uLong number_entry; /* total number of entries in
+ the central dir on this disk */
+ uLong size_comment; /* size of the global comment of the zipfile */
+} unz_global_info;
+
+
+/* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_info_s
+{
+ uLong version; /* version made by 2 bytes */
+ uLong version_needed; /* version needed to extract 2 bytes */
+ uLong flag; /* general purpose bit flag 2 bytes */
+ uLong compression_method; /* compression method 2 bytes */
+ uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
+ uLong crc; /* crc-32 4 bytes */
+ uLong compressed_size; /* compressed size 4 bytes */
+ uLong uncompressed_size; /* uncompressed size 4 bytes */
+ uLong size_filename; /* filename length 2 bytes */
+ uLong size_file_extra; /* extra field length 2 bytes */
+ uLong size_file_comment; /* file comment length 2 bytes */
+
+ uLong disk_num_start; /* disk number start 2 bytes */
+ uLong internal_fa; /* internal file attributes 2 bytes */
+ uLong external_fa; /* external file attributes 4 bytes */
+
+ tm_unz tmu_date;
+} unz_file_info;
+
+extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
+ const char* fileName2,
+ int iCaseSensitivity));
+/*
+ Compare two filename (fileName1,fileName2).
+ If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
+ If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
+ or strcasecmp)
+ If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
+ (like 1 on Unix, 2 on Windows)
+*/
+
+
+extern unzFile ZEXPORT unzOpen OF((const char *path));
+/*
+ Open a Zip file. path contain the full pathname (by example,
+ on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
+ "zlib/zlib113.zip".
+ If the zipfile cannot be opened (file don't exist or in not valid), the
+ return value is NULL.
+ Else, the return value is a unzFile Handle, usable with other function
+ of this unzip package.
+*/
+
+extern unzFile ZEXPORT unzOpen2 OF((const char *path,
+ zlib_filefunc_def* pzlib_filefunc_def));
+/*
+ Open a Zip file, like unzOpen, but provide a set of file low level API
+ for read/write the zip file (see ioapi.h)
+*/
+
+extern int ZEXPORT unzClose OF((unzFile file));
+/*
+ Close a ZipFile opened with unzipOpen.
+ If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
+ these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
+ return UNZ_OK if there is no problem. */
+
+extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
+ unz_global_info *pglobal_info));
+/*
+ Write info about the ZipFile in the *pglobal_info structure.
+ No preparation of the structure is needed
+ return UNZ_OK if there is no problem. */
+
+
+extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
+ char *szComment,
+ uLong uSizeBuf));
+/*
+ Get the global comment string of the ZipFile, in the szComment buffer.
+ uSizeBuf is the size of the szComment buffer.
+ return the number of byte copied or an error code <0
+*/
+
+
+/***************************************************************************/
+/* Unzip package allow you browse the directory of the zipfile */
+
+extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
+/*
+ Set the current file of the zipfile to the first file.
+ return UNZ_OK if there is no problem
+*/
+
+extern int ZEXPORT unzGoToNextFile OF((unzFile file));
+/*
+ Set the current file of the zipfile to the next file.
+ return UNZ_OK if there is no problem
+ return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
+*/
+
+extern int ZEXPORT unzLocateFile OF((unzFile file,
+ const char *szFileName,
+ int iCaseSensitivity));
+/*
+ Try locate the file szFileName in the zipfile.
+ For the iCaseSensitivity signification, see unzStringFileNameCompare
+
+ return value :
+ UNZ_OK if the file is found. It becomes the current file.
+ UNZ_END_OF_LIST_OF_FILE if the file is not found
+*/
+
+
+/* ****************************************** */
+/* Ryan supplied functions */
+/* unz_file_info contain information about a file in the zipfile */
+typedef struct unz_file_pos_s
+{
+ uLong pos_in_zip_directory; /* offset in zip file directory */
+ uLong num_of_file; /* # of file */
+} unz_file_pos;
+
+extern int ZEXPORT unzGetFilePos(
+ unzFile file,
+ unz_file_pos* file_pos);
+
+extern int ZEXPORT unzGoToFilePos(
+ unzFile file,
+ unz_file_pos* file_pos);
+
+/* ****************************************** */
+
+extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
+ unz_file_info *pfile_info,
+ char *szFileName,
+ uLong fileNameBufferSize,
+ void *extraField,
+ uLong extraFieldBufferSize,
+ char *szComment,
+ uLong commentBufferSize));
+/*
+ Get Info about the current file
+ if pfile_info!=NULL, the *pfile_info structure will contain somes info about
+ the current file
+ if szFileName!=NULL, the filemane string will be copied in szFileName
+ (fileNameBufferSize is the size of the buffer)
+ if extraField!=NULL, the extra field information will be copied in extraField
+ (extraFieldBufferSize is the size of the buffer).
+ This is the Central-header version of the extra field
+ if szComment!=NULL, the comment string of the file will be copied in szComment
+ (commentBufferSize is the size of the buffer)
+*/
+
+/***************************************************************************/
+/* for reading the content of the current zipfile, you can open it, read data
+ from it, and close it (you can close it before reading all the file)
+ */
+
+extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
+/*
+ Open for reading data the current file in the zipfile.
+ If there is no error, the return value is UNZ_OK.
+*/
+
+extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
+ const char* password));
+/*
+ Open for reading data the current file in the zipfile.
+ password is a crypting password
+ If there is no error, the return value is UNZ_OK.
+*/
+
+extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
+ int* method,
+ int* level,
+ int raw));
+/*
+ Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+ if raw==1
+ *method will receive method of compression, *level will receive level of
+ compression
+ note : you can set level parameter as NULL (if you did not want known level,
+ but you CANNOT set method parameter as NULL
+*/
+
+extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
+ int* method,
+ int* level,
+ int raw,
+ const char* password));
+/*
+ Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
+ if raw==1
+ *method will receive method of compression, *level will receive level of
+ compression
+ note : you can set level parameter as NULL (if you did not want known level,
+ but you CANNOT set method parameter as NULL
+*/
+
+
+extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
+/*
+ Close the file in zip opened with unzOpenCurrentFile
+ Return UNZ_CRCERROR if all the file was read but the CRC is not good
+*/
+
+extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
+ voidp buf,
+ unsigned len));
+/*
+ Read bytes from the current file (opened by unzOpenCurrentFile)
+ buf contain buffer where data must be copied
+ len the size of buf.
+
+ return the number of byte copied if somes bytes are copied
+ return 0 if the end of file was reached
+ return <0 with error code if there is an error
+ (UNZ_ERRNO for IO error, or zLib error for uncompress error)
+*/
+
+extern z_off_t ZEXPORT unztell OF((unzFile file));
+/*
+ Give the current position in uncompressed data
+*/
+
+extern int ZEXPORT unzeof OF((unzFile file));
+/*
+ return 1 if the end of file was reached, 0 elsewhere
+*/
+
+extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
+ voidp buf,
+ unsigned len));
+/*
+ Read extra field from the current file (opened by unzOpenCurrentFile)
+ This is the local-header version of the extra field (sometimes, there is
+ more info in the local-header version than in the central-header)
+
+ if buf==NULL, it return the size of the local extra field
+
+ if buf!=NULL, len is the size of the buffer, the extra header is copied in
+ buf.
+ the return value is the number of bytes copied in buf, or (if <0)
+ the error code
+*/
+
+/***************************************************************************/
+
+/* Get the current file offset */
+extern uLong ZEXPORT unzGetOffset (unzFile file);
+
+/* Set the current file offset */
+extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _unz_H */
diff --git a/Contrib/zip2exe/zlib/zconf.h b/Contrib/zip2exe/zlib/zconf.h
index 122c526..03a9431 100755
--- a/Contrib/zip2exe/zlib/zconf.h
+++ b/Contrib/zip2exe/zlib/zconf.h
@@ -1,332 +1,332 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zconf.h,v 1.2 2005/07/22 17:42:47 kichik Exp $ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
-# define deflate z_deflate
-# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
-# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
-# define deflateParams z_deflateParams
-# define deflateBound z_deflateBound
-# define deflatePrime z_deflatePrime
-# define inflateInit2_ z_inflateInit2_
-# define inflateSetDictionary z_inflateSetDictionary
-# define inflateSync z_inflateSync
-# define inflateSyncPoint z_inflateSyncPoint
-# define inflateCopy z_inflateCopy
-# define inflateReset z_inflateReset
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
-# define zError z_zError
-
-# define alloc_func z_alloc_func
-# define free_func z_free_func
-# define in_func z_in_func
-# define out_func z_out_func
-# define Byte z_Byte
-# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
-# define uIntf z_uIntf
-# define uLongf z_uLongf
-# define voidpf z_voidpf
-# define voidp z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-# define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-# define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-# define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-# ifndef WIN32
-# define WIN32
-# endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-# ifndef SYS16BIT
-# define SYS16BIT
-# endif
-# endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-# define MAXSEG_64K
-#endif
-#ifdef MSDOS
-# define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-# ifndef STDC
-# define STDC
-# endif
-# if __STDC_VERSION__ >= 199901L
-# ifndef STDC99
-# define STDC99
-# endif
-# endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-# define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-# define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
-# define STDC
-#endif
-
-#ifndef STDC
-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-# define const /* note: need a more gentle solution here */
-# endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-# define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- (1 << (windowBits+2)) + (1 << (memLevel+9))
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(args) ()
-# endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-# if defined(M_I86SM) || defined(M_I86MM)
- /* MSC small or medium model */
-# define SMALL_MEDIUM
-# ifdef _MSC_VER
-# define FAR _far
-# else
-# define FAR far
-# endif
-# endif
-# if (defined(__SMALL__) || defined(__MEDIUM__))
- /* Turbo C small or medium model */
-# define SMALL_MEDIUM
-# ifdef __BORLANDC__
-# define FAR _far
-# else
-# define FAR far
-# endif
-# endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
- /* If building or using zlib as a DLL, define ZLIB_DLL.
- * This is not mandatory, but it offers a little performance increase.
- */
-# ifdef ZLIB_DLL
-# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-# ifdef ZLIB_INTERNAL
-# define ZEXTERN extern __declspec(dllexport)
-# else
-# define ZEXTERN extern __declspec(dllimport)
-# endif
-# endif
-# endif /* ZLIB_DLL */
- /* If building or using zlib with the WINAPI/WINAPIV calling convention,
- * define ZLIB_WINAPI.
- * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
- */
-# ifdef ZLIB_WINAPI
-# ifdef FAR
-# undef FAR
-# endif
-# include <windows.h>
- /* No need for _export, use ZLIB.DEF instead. */
- /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-# define ZEXPORT WINAPI
-# ifdef WIN32
-# define ZEXPORTVA WINAPIV
-# else
-# define ZEXPORTVA FAR CDECL
-# endif
-# endif
-#endif
-
-#if defined (__BEOS__)
-# ifdef ZLIB_DLL
-# ifdef ZLIB_INTERNAL
-# define ZEXPORT __declspec(dllexport)
-# define ZEXPORTVA __declspec(dllexport)
-# else
-# define ZEXPORT __declspec(dllimport)
-# define ZEXPORTVA __declspec(dllimport)
-# endif
-# endif
-#endif
-
-#ifndef ZEXTERN
-# define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-# define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-# define ZEXPORTVA
-#endif
-
-#ifndef FAR
-# define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char Byte; /* 8 bits */
-#endif
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
- typedef void const *voidpc;
- typedef void FAR *voidpf;
- typedef void *voidp;
-#else
- typedef Byte const *voidpc;
- typedef Byte FAR *voidpf;
- typedef Byte *voidp;
-#endif
-
-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
-# include <sys/types.h> /* for off_t */
-# include <unistd.h> /* for SEEK_* and off_t */
-# ifdef VMS
-# include <unixio.h> /* for off_t */
-# endif
-# define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-# define SEEK_SET 0 /* Seek from beginning of file. */
-# define SEEK_CUR 1 /* Seek from current position. */
-# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-# define z_off_t long
-#endif
-
-#if defined(__OS400__)
-# define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-# define NO_vsnprintf
-# ifdef FAR
-# undef FAR
-# endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-# pragma map(deflateInit_,"DEIN")
-# pragma map(deflateInit2_,"DEIN2")
-# pragma map(deflateEnd,"DEEND")
-# pragma map(deflateBound,"DEBND")
-# pragma map(inflateInit_,"ININ")
-# pragma map(inflateInit2_,"ININ2")
-# pragma map(inflateEnd,"INEND")
-# pragma map(inflateSync,"INSY")
-# pragma map(inflateSetDictionary,"INSEDI")
-# pragma map(compressBound,"CMBND")
-# pragma map(inflate_table,"INTABL")
-# pragma map(inflate_fast,"INFA")
-# pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ */
+#ifdef Z_PREFIX
+# define deflateInit_ z_deflateInit_
+# define deflate z_deflate
+# define deflateEnd z_deflateEnd
+# define inflateInit_ z_inflateInit_
+# define inflate z_inflate
+# define inflateEnd z_inflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateCopy z_deflateCopy
+# define deflateReset z_deflateReset
+# define deflateParams z_deflateParams
+# define deflateBound z_deflateBound
+# define deflatePrime z_deflatePrime
+# define inflateInit2_ z_inflateInit2_
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateCopy z_inflateCopy
+# define inflateReset z_inflateReset
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define uncompress z_uncompress
+# define adler32 z_adler32
+# define crc32 z_crc32
+# define get_crc_table z_get_crc_table
+# define zError z_zError
+
+# define alloc_func z_alloc_func
+# define free_func z_free_func
+# define in_func z_in_func
+# define out_func z_out_func
+# define Byte z_Byte
+# define uInt z_uInt
+# define uLong z_uLong
+# define Bytef z_Bytef
+# define charf z_charf
+# define intf z_intf
+# define uIntf z_uIntf
+# define uLongf z_uLongf
+# define voidpf z_voidpf
+# define voidp z_voidp
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+# include <sys/types.h> /* for off_t */
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# define z_off_t off_t
+#endif
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+# ifdef FAR
+# undef FAR
+# endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+# pragma map(deflateInit_,"DEIN")
+# pragma map(deflateInit2_,"DEIN2")
+# pragma map(deflateEnd,"DEEND")
+# pragma map(deflateBound,"DEBND")
+# pragma map(inflateInit_,"ININ")
+# pragma map(inflateInit2_,"ININ2")
+# pragma map(inflateEnd,"INEND")
+# pragma map(inflateSync,"INSY")
+# pragma map(inflateSetDictionary,"INSEDI")
+# pragma map(compressBound,"CMBND")
+# pragma map(inflate_table,"INTABL")
+# pragma map(inflate_fast,"INFA")
+# pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/Contrib/zip2exe/zlib/zlib.h b/Contrib/zip2exe/zlib/zlib.h
index 62d0e46..0228179 100755
--- a/Contrib/zip2exe/zlib/zlib.h
+++ b/Contrib/zip2exe/zlib/zlib.h
@@ -1,1357 +1,1357 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.3, July 18th, 2005
-
- Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
- 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.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
-
- The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms will be added later and will have the same
- stream interface.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-
- The compressed data format used by default by the in-memory functions is
- the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
- around a deflate stream, which is itself documented in RFC 1951.
-
- The library also supports reading and writing files in gzip (.gz) format
- with an interface similar to that of stdio using the functions that start
- with "gz". The gzip format is different from the zlib format. gzip is a
- gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
- This library can optionally read and write gzip streams in memory as well.
-
- The zlib format was designed to be compact and fast for use in memory
- and on communications channels. The gzip format was designed for single-
- file compression on file systems, has a larger header than zlib to maintain
- directory information, and uses a different, slower check method than zlib.
-
- The library does not install any signal handler. The decoder checks
- the consistency of the compressed data, so the library should never
- crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void (*free_func) OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
- uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
-
- Bytef *next_out; /* next output byte should be put there */
- uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
-
- char *msg; /* last error message, NULL if no error */
- struct internal_state FAR *state; /* not visible by applications */
-
- alloc_func zalloc; /* used to allocate the internal state */
- free_func zfree; /* used to free the internal state */
- voidpf opaque; /* private data object passed to zalloc and zfree */
-
- int data_type; /* best guess about the data type: binary or text */
- uLong adler; /* adler32 value of the uncompressed data */
- uLong reserved; /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
- gzip header information passed to and from zlib routines. See RFC 1952
- for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
- int text; /* true if compressed data believed to be text */
- uLong time; /* modification time */
- int xflags; /* extra flags (not used when writing a gzip file) */
- int os; /* operating system */
- Bytef *extra; /* pointer to extra field or Z_NULL if none */
- uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
- uInt extra_max; /* space at extra (only when reading header) */
- Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
- uInt name_max; /* space at name (only when reading header) */
- Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
- uInt comm_max; /* space at comment (only when reading header) */
- int hcrc; /* true if there was or will be a header crc */
- int done; /* true when done reading gzip header (not used
- when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return Z_NULL if there is not enough memory for the object.
- If zlib is used in a multi-threaded application, zalloc and zfree must be
- thread safe.
-
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH 2
-#define Z_FULL_FLUSH 3
-#define Z_FINISH 4
-#define Z_BLOCK 5
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_RLE 3
-#define Z_FIXED 4
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_TEXT 1
-#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
- /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
-
- The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
-
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
- Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
- deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
- output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. deflate performs one or both of the
- following actions:
-
- - Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in and avail_in are updated and
- processing will resume at this point for the next call of deflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
- Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
-
- Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
- decide how much data to accumualte before producing output, in order to
- maximize compression.
-
- If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
- flushed to the output buffer and the output is aligned on a byte boundary, so
- that the decompressor can get all input data available so far. (In particular
- avail_in is zero after the call if enough output space has been provided
- before the call.) Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
-
- If flush is set to Z_FULL_FLUSH, all output is flushed as with
- Z_SYNC_FLUSH, and the compression state is reset so that decompression can
- restart from this point if previous compressed data has been damaged or if
- random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
- compression.
-
- If deflate returns with avail_out == 0, this function must be called again
- with the same value of the flush parameter and more output space (updated
- avail_out), until the flush is complete (deflate returns with non-zero
- avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
- avail_out is greater than six to avoid repeated flush markers due to
- avail_out == 0 on return.
-
- If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
-
- Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- the value returned by deflateBound (see below). If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
-
- deflate() sets strm->adler to the adler32 checksum of all input read
- so far (that is, total_in bytes).
-
- deflate() may update strm->data_type if it can make a good guess about
- the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
-
- deflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if all input has been
- consumed and all output has been produced (only when flush is set to
- Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
- fatal, and deflate() can be called again with more input and more output
- space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
- stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
- deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
- Initializes the internal stream state for decompression. The fields
- next_in, avail_in, zalloc, zfree and opaque must be initialized before by
- the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
- value depends on the compression method), inflateInit determines the
- compression method from the zlib header and allocates all data structures
- accordingly; otherwise the allocation will be deferred to the first call of
- inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
- use default allocation functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
- version assumed by the caller. msg is set to null if there is no error
- message. inflateInit does not perform any decompression apart from reading
- the zlib header if present: this will be done by inflate(). (So next_in and
- avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
- inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce
- some output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. inflate performs one or both of the
- following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
- Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
- output as possible to the output buffer. Z_BLOCK requests that inflate() stop
- if and when it gets to the next deflate block boundary. When decoding the
- zlib or gzip format, this will cause inflate() to return immediately after
- the header and before the first block. When doing a raw inflate, inflate()
- will go ahead and process the first block, and will return when it gets to
- the end of that block, or when it runs out of data.
-
- The Z_BLOCK option assists in appending to or combining deflate streams.
- Also to assist in this, on return inflate() will set strm->data_type to the
- number of unused bits in the last byte taken from strm->next_in, plus 64
- if inflate() is currently decoding the last block in the deflate stream,
- plus 128 if inflate() returned immediately after decoding an end-of-block
- code or decoding the complete header up to just before the first byte of the
- deflate stream. The end-of-block will not be indicated until all of the
- uncompressed data from that block has been written to strm->next_out. The
- number of unused bits may in general be greater than seven, except when
- bit 7 of data_type is set, in which case the number of unused bits will be
- less than eight.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster approach
- may be used for the single inflate() call.
-
- In this implementation, inflate() always flushes as much output as
- possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
- is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK is used.
-
- If a preset dictionary is needed after this call (see inflateSetDictionary
- below), inflate sets strm->adler to the adler32 checksum of the dictionary
- chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
- strm->adler to the adler32 checksum of all output produced so far (that is,
- total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
- below. At the end of the stream, inflate() checks that its computed adler32
- checksum is equal to that saved by the compressor and returns Z_STREAM_END
- only if the checksum is correct.
-
- inflate() will decompress and check either zlib-wrapped or gzip-wrapped
- deflate data. The header type is detected automatically. Any information
- contained in the gzip header is not retained, so applications that need that
- information should instead use raw inflate, see inflateInit2() below, or
- inflateBack() and perform their own processing of the gzip header and
- trailer.
-
- inflate() returns Z_OK if some progress has been made (more input processed
- or more output produced), Z_STREAM_END if the end of the compressed data has
- been reached and all uncompressed output has been produced, Z_NEED_DICT if a
- preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
- corrupted (input stream not conforming to the zlib format or incorrect check
- value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
- if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
- Z_BUF_ERROR if no progress is possible or if there was not enough room in the
- output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
- inflate() can be called again with more input and more output space to
- continue decompressing. If Z_DATA_ERROR is returned, the application may then
- call inflateSync() to look for a good compression block if a partial recovery
- of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* Advanced functions */
-
-/*
- The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy));
-
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The method parameter is the compression method. It must be Z_DEFLATED in
- this version of the library.
-
- The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library. Larger values of this parameter result in better
- compression at the expense of memory usage. The default value is 15 if
- deflateInit is used instead.
-
- windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
- determines the window size. deflate() will then generate raw deflate data
- with no zlib header or trailer, and will not compute an adler32 check value.
-
- windowBits can also be greater than 15 for optional gzip encoding. Add
- 16 to windowBits to write a simple gzip header and trailer around the
- compressed data instead of a zlib wrapper. The gzip header will have no
- file name, no extra data, no comment, no modification time (set to zero),
- no header crc, and the operating system will be set to 255 (unknown). If a
- gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
- The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
-
- The strategy parameter is used to tune the compression algorithm. Use the
- value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
- filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
- string match), or Z_RLE to limit match distances to one (run-length
- encoding). Filtered data consists mostly of small values with a somewhat
- random distribution. In this case, the compression algorithm is tuned to
- compress them better. The effect of Z_FILTERED is to force more Huffman
- coding and less string matching; it is somewhat intermediate between
- Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
- Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
- parameter only affects the compression ratio but not the correctness of the
- compressed output even if it is not set appropriately. Z_FIXED prevents the
- use of dynamic Huffman codes, allowing for a simpler decoder for special
- applications.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
- method). msg is set to null if there is no error message. deflateInit2 does
- not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any
- call of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
-
- The dictionary should consist of strings (byte sequences) that are likely
- to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
- dictionary is most useful when the data to be compressed is short and can be
- predicted with good accuracy; the data can then be compressed better than
- with the default empty dictionary.
-
- Depending on the size of the compression data structures selected by
- deflateInit or deflateInit2, a part of the dictionary may in effect be
- discarded, for example if the dictionary is larger than the window size in
- deflate or deflate2. Thus the strings most likely to be useful should be
- put at the end of the dictionary, not at the front. In addition, the
- current implementation of deflate will use at most the window size minus
- 262 bytes of the provided dictionary.
-
- Upon return of this function, strm->adler is set to the adler32 value
- of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The adler32 value
- applies to the whole dictionary even if only a subset of the dictionary is
- actually used by the compressor.) If a raw deflate was requested, then the
- adler32 value is not computed and strm->adler is not set.
-
- deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream.
-
- This function can be useful when several compression strategies will be
- tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
- by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
-
- deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
-
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
- int level,
- int strategy));
-/*
- Dynamically update the compression level and compression strategy. The
- interpretation of level and strategy is as in deflateInit2. This can be
- used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different
- strategy. If the compression level is changed, the input available so far
- is compressed with the old level (and may be flushed); the new level will
- take effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
- int good_length,
- int max_lazy,
- int nice_length,
- int max_chain));
-/*
- Fine tune deflate's internal compression parameters. This should only be
- used by someone who understands the algorithm used by zlib's deflate for
- searching for the best matching string, and even then only by the most
- fanatic optimizer trying to squeeze out the last compressed bit for their
- specific input data. Read the deflate.c source code for the meaning of the
- max_lazy, good_length, nice_length, and max_chain parameters.
-
- deflateTune() can be called after deflateInit() or deflateInit2(), and
- returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
- uLong sourceLen));
-/*
- deflateBound() returns an upper bound on the compressed size after
- deflation of sourceLen bytes. It must be called after deflateInit()
- or deflateInit2(). This would be used to allocate an output buffer
- for deflation in a single pass, and so would be called before deflate().
-*/
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
- int bits,
- int value));
-/*
- deflatePrime() inserts bits in the deflate output stream. The intent
- is that this function is used to start off the deflate output with the
- bits leftover from a previous deflate stream when appending to it. As such,
- this function can only be used for raw deflate, and must be used before the
- first deflate() call after a deflateInit2() or deflateReset(). bits must be
- less than or equal to 16, and that many of the least significant bits of
- value will be inserted in the output.
-
- deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
- gz_headerp head));
-/*
- deflateSetHeader() provides gzip header information for when a gzip
- stream is requested by deflateInit2(). deflateSetHeader() may be called
- after deflateInit2() or deflateReset() and before the first call of
- deflate(). The text, time, os, extra field, name, and comment information
- in the provided gz_header structure are written to the gzip header (xflag is
- ignored -- the extra flags are set according to the compression level). The
- caller must assure that, if not Z_NULL, name and comment are terminated with
- a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
- available there. If hcrc is true, a gzip header crc is included. Note that
- the current versions of the command-line version of gzip (up through version
- 1.3.x) do not support header crc's, and will report that it is a "multi-part
- gzip file" and give up.
-
- If deflateSetHeader is not used, the default gzip header has text false,
- the time set to zero, and os set to 255, with no extra, name, or comment
- fields. The gzip header is returned to the default state by deflateReset().
-
- deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
- int windowBits));
-
- This is another version of inflateInit with an extra parameter. The
- fields next_in, avail_in, zalloc, zfree and opaque must be initialized
- before by the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library. The default value is 15 if inflateInit is used
- instead. windowBits must be greater than or equal to the windowBits value
- provided to deflateInit2() while compressing, or it must be equal to 15 if
- deflateInit2() was not used. If a compressed stream with a larger window
- size is given as input, inflate() will return with the error code
- Z_DATA_ERROR instead of trying to allocate a larger window.
-
- windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
- determines the window size. inflate() will then process raw deflate data,
- not looking for a zlib or gzip header, not generating a check value, and not
- looking for any check values for comparison at the end of the stream. This
- is for use with other formats that use the deflate compressed data format
- such as zip. Those formats provide their own check values. If a custom
- format is developed using the raw deflate format for compressed data, it is
- recommended that a check value such as an adler32 or a crc32 be applied to
- the uncompressed data as is done in the zlib, gzip, and zip formats. For
- most applications, the zlib format should be used as is. Note that comments
- above on the use in deflateInit2() applies to the magnitude of windowBits.
-
- windowBits can also be greater than 15 for optional gzip decoding. Add
- 32 to windowBits to enable zlib and gzip decoding with automatic header
- detection, or add 16 to decode only the gzip format (the zlib format will
- return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
- a crc32 instead of an adler32.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
- is set to null if there is no error message. inflateInit2 does not perform
- any decompression apart from reading the zlib header if present: this will
- be done by inflate(). (So next_in and avail_in may be modified, but next_out
- and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the decompression dictionary from the given uncompressed byte
- sequence. This function must be called immediately after a call of inflate,
- if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
- can be determined from the adler32 value returned by that call of inflate.
- The compressor and decompressor must use exactly the same dictionary (see
- deflateSetDictionary). For raw inflate, this function can be called
- immediately after inflateInit2() or inflateReset() and before any call of
- inflate() to set the dictionary. The application must insure that the
- dictionary that was used for compression is provided.
-
- inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect adler32 value). inflateSetDictionary does not
- perform any decompression: this will be done by subsequent calls of
- inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
- available input is skipped. No output is provided.
-
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream.
-
- This function can be useful when randomly accessing a large stream. The
- first pass through the stream can periodically record the inflate state,
- allowing restarting inflate at those points when randomly accessing the
- stream.
-
- inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
- int bits,
- int value));
-/*
- This function inserts bits in the inflate input stream. The intent is
- that this function is used to start inflating at a bit position in the
- middle of a byte. The provided bits will be used before any bytes are used
- from next_in. This function should only be used with raw inflate, and
- should be used before the first inflate() call after inflateInit2() or
- inflateReset(). bits must be less than or equal to 16, and that many of the
- least significant bits of value will be inserted in the input.
-
- inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
- gz_headerp head));
-/*
- inflateGetHeader() requests that gzip header information be stored in the
- provided gz_header structure. inflateGetHeader() may be called after
- inflateInit2() or inflateReset(), and before the first call of inflate().
- As inflate() processes the gzip stream, head->done is zero until the header
- is completed, at which time head->done is set to one. If a zlib stream is
- being decoded, then head->done is set to -1 to indicate that there will be
- no gzip header information forthcoming. Note that Z_BLOCK can be used to
- force inflate() to return immediately after header processing is complete
- and before any actual data is decompressed.
-
- The text, time, xflags, and os fields are filled in with the gzip header
- contents. hcrc is set to true if there is a header CRC. (The header CRC
- was valid if done is set to one.) If extra is not Z_NULL, then extra_max
- contains the maximum number of bytes to write to extra. Once done is true,
- extra_len contains the actual extra field length, and extra contains the
- extra field, or that field truncated if extra_max is less than extra_len.
- If name is not Z_NULL, then up to name_max characters are written there,
- terminated with a zero unless the length is greater than name_max. If
- comment is not Z_NULL, then up to comm_max characters are written there,
- terminated with a zero unless the length is greater than comm_max. When
- any of extra, name, or comment are not Z_NULL and the respective field is
- not present in the header, then that field is set to Z_NULL to signal its
- absence. This allows the use of deflateSetHeader() with the returned
- structure to duplicate the header. However if those fields are set to
- allocated memory, then the application will need to save those pointers
- elsewhere so that they can be eventually freed.
-
- If inflateGetHeader is not used, then the header information is simply
- discarded. The header is always checked for validity, including the header
- CRC if present. inflateReset() will reset the process to discard the header
- information. The application would need to call inflateGetHeader() again to
- retrieve the header from the next gzip stream.
-
- inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
- unsigned char FAR *window));
-
- Initialize the internal stream state for decompression using inflateBack()
- calls. The fields zalloc, zfree and opaque in strm must be initialized
- before the call. If zalloc and zfree are Z_NULL, then the default library-
- derived memory allocation routines are used. windowBits is the base two
- logarithm of the window size, in the range 8..15. window is a caller
- supplied buffer of that size. Except for special applications where it is
- assured that deflate was used with small window sizes, windowBits must be 15
- and a 32K byte window must be supplied to be able to decompress general
- deflate streams.
-
- See inflateBack() for the usage of these routines.
-
- inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
- the paramaters are invalid, Z_MEM_ERROR if the internal state could not
- be allocated, or Z_VERSION_ERROR if the version of the library does not
- match the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
- in_func in, void FAR *in_desc,
- out_func out, void FAR *out_desc));
-/*
- inflateBack() does a raw inflate with a single call using a call-back
- interface for input and output. This is more efficient than inflate() for
- file i/o applications in that it avoids copying between the output and the
- sliding window by simply making the window itself the output buffer. This
- function trusts the application to not change the output buffer passed by
- the output function, at least until inflateBack() returns.
-
- inflateBackInit() must be called first to allocate the internal state
- and to initialize the state with the user-provided window buffer.
- inflateBack() may then be used multiple times to inflate a complete, raw
- deflate stream with each call. inflateBackEnd() is then called to free
- the allocated state.
-
- A raw deflate stream is one with no zlib or gzip header or trailer.
- This routine would normally be used in a utility that reads zip or gzip
- files and writes out uncompressed files. The utility would decode the
- header and process the trailer on its own, hence this routine expects
- only the raw deflate stream to decompress. This is different from the
- normal behavior of inflate(), which expects either a zlib or gzip header and
- trailer around the deflate stream.
-
- inflateBack() uses two subroutines supplied by the caller that are then
- called by inflateBack() for input and output. inflateBack() calls those
- routines until it reads a complete deflate stream and writes out all of the
- uncompressed data, or until it encounters an error. The function's
- parameters and return types are defined above in the in_func and out_func
- typedefs. inflateBack() will call in(in_desc, &buf) which should return the
- number of bytes of provided input, and a pointer to that input in buf. If
- there is no input available, in() must return zero--buf is ignored in that
- case--and inflateBack() will return a buffer error. inflateBack() will call
- out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
- should return zero on success, or non-zero on failure. If out() returns
- non-zero, inflateBack() will return with an error. Neither in() nor out()
- are permitted to change the contents of the window provided to
- inflateBackInit(), which is also the buffer that out() uses to write from.
- The length written by out() will be at most the window size. Any non-zero
- amount of input may be provided by in().
-
- For convenience, inflateBack() can be provided input on the first call by
- setting strm->next_in and strm->avail_in. If that input is exhausted, then
- in() will be called. Therefore strm->next_in must be initialized before
- calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
- immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
- must also be initialized, and then if strm->avail_in is not zero, input will
- initially be taken from strm->next_in[0 .. strm->avail_in - 1].
-
- The in_desc and out_desc parameters of inflateBack() is passed as the
- first parameter of in() and out() respectively when they are called. These
- descriptors can be optionally used to pass any information that the caller-
- supplied in() and out() functions need to do their job.
-
- On return, inflateBack() will set strm->next_in and strm->avail_in to
- pass back any unused input that was provided by the last in() call. The
- return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
- if in() or out() returned an error, Z_DATA_ERROR if there was a format
- error in the deflate stream (in which case strm->msg is set to indicate the
- nature of the error), or Z_STREAM_ERROR if the stream was not properly
- initialized. In the case of Z_BUF_ERROR, an input or output error can be
- distinguished using strm->next_in which will be Z_NULL only if in() returned
- an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
- out() returning non-zero. (in() will always be called before out(), so
- strm->next_in is assured to be defined if out() returns non-zero.) Note
- that inflateBack() cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
- All memory allocated by inflateBackInit() is freed.
-
- inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
- state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
- Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
- 1.0: size of uInt
- 3.2: size of uLong
- 5.4: size of voidpf (pointer)
- 7.6: size of z_off_t
-
- Compiler, assembler, and debug options:
- 8: DEBUG
- 9: ASMV or ASMINF -- use ASM code
- 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
- 11: 0 (reserved)
-
- One-time table building (smaller code, but not thread-safe if true):
- 12: BUILDFIXED -- build static block decoding tables when needed
- 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
- 14,15: 0 (reserved)
-
- Library content (indicates missing functionality):
- 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
- deflate code when not needed)
- 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
- and decode gzip streams (to avoid linking crc code)
- 18-19: 0 (reserved)
-
- Operation variations (changes in library functionality):
- 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
- 21: FASTEST -- deflate algorithm with only one, lowest compression level
- 22,23: 0 (reserved)
-
- The sprintf variant used by gzprintf (zero is best):
- 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
- 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
- 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
- Remainder:
- 27-31: 0 (reserved)
- */
-
-
- /* utility functions */
-
-/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level and memory usage,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least the value returned
- by compressBound(sourceLen). Upon exit, destLen is the actual size of the
- compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
- compress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen,
- int level));
-/*
- Compresses the source buffer into the destination buffer. The level
- parameter has the same meaning as in deflateInit. sourceLen is the byte
- length of the source buffer. Upon entry, destLen is the total size of the
- destination buffer, which must be at least the value returned by
- compressBound(sourceLen). Upon exit, destLen is the actual size of the
- compressed buffer.
-
- compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_BUF_ERROR if there was not enough room in the output buffer,
- Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
- compressBound() returns an upper bound on the compressed size after
- compress() or compress2() on sourceLen bytes. It would be used before
- a compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
-/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
- Huffman only compression as in "wb1h", or 'R' for run-length encoding
- as in "wb1R". (See the description of deflateInit2 for more information
- about the strategy parameter.)
-
- gzopen can be used to read a file which is not in gzip format; in this
- case gzread will directly read from the file without decompression.
-
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR). */
-
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
-/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
- Dynamically update the compression level or strategy. See the description
- of deflateInit2 for the meaning of these parameters.
- gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
- opened for writing.
-*/
-
-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-/*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
- of bytes into the buffer.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
- voidpc buf, unsigned len));
-/*
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
-/*
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error). The number of
- uncompressed bytes written is limited to 4095. The caller should assure that
- this limit is not exceeded. If it is exceeded, then gzprintf() will return
- return an error (0) with nothing written. In this case, there may also be a
- buffer overflow with unpredictable consequences, which is possible only if
- zlib was compiled with the insecure functions sprintf() or vsprintf()
- because the secure snprintf() or vsnprintf() functions were not available.
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
- Writes the given null-terminated string to the compressed file, excluding
- the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
- Reads bytes from the compressed file until len-1 characters are read, or
- a newline character is read and transferred to buf, or an end-of-file
- condition is encountered. The string is then terminated with a null
- character.
- gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
-/*
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
-/*
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
-/*
- Push one character back onto the stream to be read again later.
- Only one character of push-back is allowed. gzungetc() returns the
- character pushed, or -1 on failure. gzungetc() will fail if a
- character has been pushed but not read yet, or if c is -1. The pushed
- character will be discarded if the stream is repositioned with gzseek()
- or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
-/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
- z_off_t offset, int whence));
-/*
- Sets the starting position for the next gzread or gzwrite on the
- given compressed file. The offset represents a number of bytes in the
- uncompressed data stream. The whence parameter is defined as in lseek(2);
- the value SEEK_END is not supported.
- If the file is opened for reading, this function is emulated but can be
- extremely slow. If the file is opened for writing, only forward seeks are
- supported; gzseek then compresses a sequence of zeroes up to the new
- starting position.
-
- gzseek returns the resulting offset location as measured in bytes from
- the beginning of the uncompressed stream, or -1 in case of error, in
- particular if the file is opened for writing and the new starting position
- would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
-/*
- Rewinds the given file. This function is supported only for reading.
-
- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
-/*
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
-
- gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
- Returns 1 if file is being read directly without decompression, otherwise
- zero.
-*/
-
-ZEXTERN int ZEXPORT gzclose OF((gzFile file));
-/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
- Clears the error and end-of-file flags for file. This is analogous to the
- clearerr() function in stdio. This is useful for continuing to read a gzip
- file that is being written concurrently.
-*/
-
- /* checksum functions */
-
-/*
- These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
-
- uLong adler = adler32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- adler = adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
- z_off_t len2));
-/*
- Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
- and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
- each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
- seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
-*/
-
-ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
-/*
- Update a running CRC-32 with the bytes buf[0..len-1] and return the
- updated CRC-32. If buf is NULL, this function returns the required initial
- value for the for the crc. Pre- and post-conditioning (one's complement) is
- performed within this function so it shouldn't be done by the application.
- Usage example:
-
- uLong crc = crc32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- crc = crc32(crc, buffer, length);
- }
- if (crc != original_crc) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-/*
- Combine two CRC-32 check values into one. For two sequences of bytes,
- seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
- calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
- check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
- len2.
-*/
-
-
- /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel,
- int strategy, const char *version,
- int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
- unsigned char FAR *window,
- const char *version,
- int stream_size));
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
- inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char * ZEXPORT zError OF((int));
-ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.3, July 18th, 2005
+
+ Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+
+ 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.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.3"
+#define ZLIB_VERNUM 0x1230
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+ data. This version of the library supports only one compression method
+ (deflation) but other algorithms will be added later and will have the same
+ stream interface.
+
+ Compression can be done in a single step if the buffers are large
+ enough (for example if an input file is mmap'ed), or can be done by
+ repeated calls of the compression function. In the latter case, the
+ application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never
+ crash even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has
+ dropped to zero. It must update next_out and avail_out when avail_out
+ has dropped to zero. The application must initialize zalloc, zfree and
+ opaque before calling the init function. All other fields are set by the
+ compression library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe.
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this
+ if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
+ pointers returned by zalloc for objects of exactly 65536 bytes *must*
+ have their offset normalized to zero. The default allocation function
+ provided by this library ensures this (see zutil.c). To reduce memory
+ requirements and avoid any allocation of 64K objects, at the expense of
+ compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or
+ progress reports. After compression, total_in holds the total size of
+ the uncompressed data and may be saved for use in the decompressor
+ (particularly if the decompressor wants to decompress everything in
+ a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is
+ not compatible with the zlib.h header file used by the application.
+ This check is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller.
+ If zalloc and zfree are set to Z_NULL, deflateInit updates them to
+ use default allocation functions.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at
+ all (the input data is simply copied a block at a time).
+ Z_DEFAULT_COMPRESSION requests a default compromise between speed and
+ compression (currently equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION).
+ msg is set to null if there is no error message. deflateInit does not
+ perform any compression: this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce some
+ output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary (in interactive applications).
+ Some output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating avail_in or avail_out accordingly; avail_out
+ should never be zero before the call. The application can consume the
+ compressed output when it wants, for example when the output buffer is full
+ (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
+ and with zero avail_out, it must be called again after making room in the
+ output buffer because there might be more output pending.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumualte before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In particular
+ avail_in is zero after the call if enough output space has been provided
+ before the call.) Flushing may degrade compression for some compression
+ algorithms and so it should be used only when necessary.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six to avoid repeated flush markers due to
+ avail_out == 0 on return.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there
+ was enough output space; if deflate returns with Z_OK, this function must be
+ called again with Z_FINISH and more output space (updated avail_out) but no
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the
+ stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used immediately after deflateInit if all the compression
+ is to be done in a single step. In this case, avail_out must be at least
+ the value returned by deflateBound (see below). If deflate does not return
+ Z_STREAM_END, then it must be called again as described above.
+
+ deflate() sets strm->adler to the adler32 checksum of all input read
+ so far (that is, total_in bytes).
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect
+ the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ fatal, and deflate() can be called again with more input and more output
+ space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case,
+ msg may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
+ value depends on the compression method), inflateInit determines the
+ compression method from the zlib header and allocates all data structures
+ accordingly; otherwise the allocation will be deferred to the first call of
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+ use default allocation functions.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller. msg is set to null if there is no error
+ message. inflateInit does not perform any decompression apart from reading
+ the zlib header if present: this will be done by inflate(). (So next_in and
+ avail_in may be modified, but next_out and avail_out are unchanged.)
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing
+ will resume at this point for the next call of inflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there
+ is no more input data or no more space in the output buffer (see below
+ about the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming
+ more output, and updating the next_* and avail_* values accordingly.
+ The application can consume the uncompressed output when it wants, for
+ example when the output buffer is full (avail_out == 0), or after each
+ call of inflate(). If inflate returns Z_OK and with zero avail_out, it
+ must be called again after making room in the output buffer because there
+ might be more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
+ Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate() stop
+ if and when it gets to the next deflate block boundary. When decoding the
+ zlib or gzip format, this will cause inflate() to return immediately after
+ the header and before the first block. When doing a raw inflate, inflate()
+ will go ahead and process the first block, and will return when it gets to
+ the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ Also to assist in this, on return inflate() will set strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64
+ if inflate() is currently decoding the last block in the deflate stream,
+ plus 128 if inflate() returned immediately after decoding an end-of-block
+ code or decoding the complete header up to just before the first byte of the
+ deflate stream. The end-of-block will not be indicated until all of the
+ uncompressed data from that block has been written to strm->next_out. The
+ number of unused bits may in general be greater than seven, except when
+ bit 7 of data_type is set, in which case the number of unused bits will be
+ less than eight.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step
+ (a single call of inflate), the parameter flush should be set to
+ Z_FINISH. In this case all pending input is processed and all pending
+ output is flushed; avail_out must be large enough to hold all the
+ uncompressed data. (The size of the uncompressed data may have been saved
+ by the compressor for this purpose.) The next operation on this stream must
+ be inflateEnd to deallocate the decompression state. The use of Z_FINISH
+ is never required, but can be used to inform inflate that a faster approach
+ may be used for the single inflate() call.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the only effect of the flush parameter in this implementation
+ is on the return value of inflate(), as noted below, or when it returns early
+ because Z_BLOCK is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the adler32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed adler32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() will decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically. Any information
+ contained in the gzip header is not retained, so applications that need that
+ information should instead use raw inflate, see inflateInit2() below, or
+ inflateBack() and perform their own processing of the gzip header and
+ trailer.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may then
+ call inflateSync() to look for a good compression block if a partial recovery
+ of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+ pending output.
+
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+ was inconsistent. In the error case, msg may be set but then points to a
+ static string (which must not be deallocated).
+*/
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by
+ the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute an adler32 check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero),
+ no header crc, and the operating system will be set to 255 (unknown). If a
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but
+ is slow and reduces compression ratio; memLevel=9 uses maximum memory
+ for optimal speed. The default value is 8. See zconf.h for total memory
+ usage as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
+ Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
+ parameter only affects the compression ratio but not the correctness of the
+ compressed output even if it is not set appropriately. Z_FIXED prevents the
+ use of dynamic Huffman codes, allowing for a simpler decoder for special
+ applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
+ method). msg is set to null if there is no error message. deflateInit2 does
+ not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any
+ call of deflate. The compressor and decompressor must use exactly the same
+ dictionary (see inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size in
+ deflate or deflate2. Thus the strings most likely to be useful should be
+ put at the end of the dictionary, not at the front. In addition, the
+ current implementation of deflate will use at most the window size minus
+ 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the adler32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The adler32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ adler32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if the compression method is bsort). deflateSetDictionary does not
+ perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and
+ can consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state.
+ The stream will keep the same compression level and any other attributes
+ that may have been set by deflateInit2.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2. This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different
+ strategy. If the compression level is changed, the input available so far
+ is compressed with the old level (and may be flushed); the new level will
+ take effect only at the next call of deflate().
+
+ Before the call of deflateParams, the stream state must be set as for
+ a call of deflate(), since the currently available input may have to
+ be compressed and flushed. In particular, strm->avail_out must be non-zero.
+
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
+ if strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain));
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+ uLong sourceLen));
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit()
+ or deflateInit2(). This would be used to allocate an output buffer
+ for deflation in a single pass, and so would be called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the
+ bits leftover from a previous deflate stream when appending to it. As such,
+ this function can only be used for raw deflate, and must be used before the
+ first deflate() call after a deflateInit2() or deflateReset(). bits must be
+ less than or equal to 16, and that many of the least significant bits of
+ value will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to 255, with no extra, name, or comment
+ fields. The gzip header is returned to the default state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+ int windowBits));
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an adler32 or a crc32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
+ a crc32 instead of an adler32.
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
+ is set to null if there is no error message. inflateInit2 does not perform
+ any decompression apart from reading the zlib header if present: this will
+ be done by inflate(). (So next_in and avail_in may be modified, but next_out
+ and avail_out are unchanged.)
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called
+ immediately after inflateInit2() or inflateReset() and before any call of
+ inflate() to set the dictionary. The application must insure that the
+ dictionary that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (such as NULL dictionary) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect adler32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been found,
+ or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
+ case, the application may save the current current value of total_in which
+ indicates where valid compressed data was found. In the error case, the
+ application may repeatedly call inflateSync, providing more input each time,
+ until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state.
+ The stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being NULL).
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK can be used to
+ force inflate() to return immediately after header processing is complete
+ and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When
+ any of extra, name, or comment are not Z_NULL and the respective field is
+ not present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window));
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not
+ be allocated, or Z_VERSION_ERROR if the version of the library does not
+ match the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is more efficient than inflate() for
+ file i/o applications in that it avoids copying between the output and the
+ sliding window by simply making the window itself the output buffer. This
+ function trusts the application to not change the output buffer passed by
+ the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free
+ the allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects
+ only the raw deflate stream to decompress. This is different from the
+ normal behavior of inflate(), which expects either a zlib or gzip header and
+ trailer around the deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero--buf is ignored in that
+ case--and inflateBack() will return a buffer error. inflateBack() will call
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
+ should return zero on success, or non-zero on failure. If out() returns
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
+ are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format
+ error in the deflate stream (in which case strm->msg is set to indicate the
+ nature of the error), or Z_STREAM_ERROR if the stream was not properly
+ initialized. In the case of Z_BUF_ERROR, an input or output error can be
+ distinguished using strm->next_in which will be Z_NULL only if in() returned
+ an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
+ out() returning non-zero. (in() will always be called before out(), so
+ strm->next_in is assured to be defined if out() returns non-zero.) Note
+ that inflateBack() cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the
+ basic stream-oriented functions. To simplify the interface, some
+ default options are assumed (compression level and memory usage,
+ standard memory allocation functions). The source code of these
+ utility functions can easily be modified if you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be at least the value returned
+ by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+ This function can be used to compress a whole file at once if the
+ input file is mmap'ed.
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before
+ a compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total
+ size of the destination buffer, which must be large enough to hold the
+ entire uncompressed data. (The size of the uncompressed data must have
+ been saved previously by the compressor and transmitted to the decompressor
+ by some mechanism outside the scope of this compression library.)
+ Upon exit, destLen is the actual size of the compressed buffer.
+ This function can be used to decompress a whole file at once if the
+ input file is mmap'ed.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+typedef voidp gzFile;
+
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+/*
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb") but can also include a compression level
+ ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
+ Huffman only compression as in "wb1h", or 'R' for run-length encoding
+ as in "wb1R". (See the description of deflateInit2 for more information
+ about the strategy parameter.)
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression.
+
+ gzopen returns NULL if the file could not be opened or if there was
+ insufficient memory to allocate the (de)compression state; errno
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR). */
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen() associates a gzFile with the file descriptor fd. File
+ descriptors are obtained from calls like open, dup, creat, pipe or
+ fileno (in the file has been previously opened with fopen).
+ The mode parameter is as in gzopen.
+ The next call of gzclose on the returned gzFile will also close the
+ file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
+ descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
+ gzdopen returns NULL if there was insufficient memory to allocate
+ the (de)compression state.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+ opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+ Reads the given number of uncompressed bytes from the compressed file.
+ If the input file was not in gzip format, gzread copies the given number
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+/*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+ (0 in case of error).
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+ Converts, formats, and writes the args to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written (0 in case of error). The number of
+ uncompressed bytes written is limited to 4095. The caller should assure that
+ this limit is not exceeded. If it is exceeded, then gzprintf() will return
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf()
+ because the secure snprintf() or vsnprintf() functions were not available.
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+ Reads bytes from the compressed file until len-1 characters are read, or
+ a newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. The string is then terminated with a null
+ character.
+ gzgets returns buf, or Z_NULL in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+ Push one character back onto the stream to be read again later.
+ Only one character of push-back is allowed. gzungetc() returns the
+ character pushed, or -1 on failure. gzungetc() will fail if a
+ character has been pushed but not read yet, or if c is -1. The pushed
+ character will be discarded if the stream is repositioned with gzseek()
+ or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+ Flushes all pending output into the compressed file. The parameter
+ flush is as in the deflate() function. The return value is the zlib
+ error number (see function gzerror below). gzflush returns Z_OK if
+ the flush parameter is Z_FINISH and all output could be flushed.
+ gzflush should be called only when strictly necessary because it can
+ degrade compression.
+*/
+
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+/*
+ Sets the starting position for the next gzread or gzwrite on the
+ given compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
+/*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+/*
+ Returns the starting position for the next gzread or gzwrite on the
+ given compressed file. This position represents a number of bytes in the
+ uncompressed data stream.
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+ Returns 1 if file is being read directly without decompression, otherwise
+ zero.
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state. The return value is the zlib
+ error number (see function gzerror below).
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+ Returns the error message for the last error which occurred on the
+ given compressed file. errnum is set to zlib error number. If an
+ error occurred in the file system and not in the compression library,
+ errnum is set to Z_ERRNO and the application may consult errno
+ to get the exact error code.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the
+ compression library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+ the required initial value for the checksum.
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster. Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+ z_off_t len2));
+/*
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is NULL, this function returns the required initial
+ value for the for the crc. Pre- and post-conditioning (one's complement) is
+ performed within this function so it shouldn't be done by the application.
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+/*
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+#endif
+
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/Contrib/zip2exe/zlib/zutil.c b/Contrib/zip2exe/zlib/zutil.c
index 909ef78..d55f594 100755
--- a/Contrib/zip2exe/zlib/zutil.c
+++ b/Contrib/zip2exe/zlib/zutil.c
@@ -1,318 +1,318 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: zutil.c,v 1.2 2005/07/22 17:42:47 kichik Exp $ */
-
-#include "zutil.h"
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-const char * const z_errmsg[10] = {
-"need dictionary", /* Z_NEED_DICT 2 */
-"stream end", /* Z_STREAM_END 1 */
-"", /* Z_OK 0 */
-"file error", /* Z_ERRNO (-1) */
-"stream error", /* Z_STREAM_ERROR (-2) */
-"data error", /* Z_DATA_ERROR (-3) */
-"insufficient memory", /* Z_MEM_ERROR (-4) */
-"buffer error", /* Z_BUF_ERROR (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
- return ZLIB_VERSION;
-}
-
-uLong ZEXPORT zlibCompileFlags()
-{
- uLong flags;
-
- flags = 0;
- switch (sizeof(uInt)) {
- case 2: break;
- case 4: flags += 1; break;
- case 8: flags += 2; break;
- default: flags += 3;
- }
- switch (sizeof(uLong)) {
- case 2: break;
- case 4: flags += 1 << 2; break;
- case 8: flags += 2 << 2; break;
- default: flags += 3 << 2;
- }
- switch (sizeof(voidpf)) {
- case 2: break;
- case 4: flags += 1 << 4; break;
- case 8: flags += 2 << 4; break;
- default: flags += 3 << 4;
- }
- switch (sizeof(z_off_t)) {
- case 2: break;
- case 4: flags += 1 << 6; break;
- case 8: flags += 2 << 6; break;
- default: flags += 3 << 6;
- }
-#ifdef DEBUG
- flags += 1 << 8;
-#endif
-#if defined(ASMV) || defined(ASMINF)
- flags += 1 << 9;
-#endif
-#ifdef ZLIB_WINAPI
- flags += 1 << 10;
-#endif
-#ifdef BUILDFIXED
- flags += 1 << 12;
-#endif
-#ifdef DYNAMIC_CRC_TABLE
- flags += 1 << 13;
-#endif
-#ifdef NO_GZCOMPRESS
- flags += 1L << 16;
-#endif
-#ifdef NO_GZIP
- flags += 1L << 17;
-#endif
-#ifdef PKZIP_BUG_WORKAROUND
- flags += 1L << 20;
-#endif
-#ifdef FASTEST
- flags += 1L << 21;
-#endif
-#ifdef STDC
-# ifdef NO_vsnprintf
- flags += 1L << 25;
-# ifdef HAS_vsprintf_void
- flags += 1L << 26;
-# endif
-# else
-# ifdef HAS_vsnprintf_void
- flags += 1L << 26;
-# endif
-# endif
-#else
- flags += 1L << 24;
-# ifdef NO_snprintf
- flags += 1L << 25;
-# ifdef HAS_sprintf_void
- flags += 1L << 26;
-# endif
-# else
-# ifdef HAS_snprintf_void
- flags += 1L << 26;
-# endif
-# endif
-#endif
- return flags;
-}
-
-#ifdef DEBUG
-
-# ifndef verbose
-# define verbose 0
-# endif
-int z_verbose = verbose;
-
-void z_error (m)
- char *m;
-{
- fprintf(stderr, "%s\n", m);
- exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
- int err;
-{
- return ERR_MSG(err);
-}
-
-#if defined(_WIN32_WCE)
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
- * errno. We define it as a global variable to simplify porting.
- * Its value is always 0 and should not be used.
- */
- int errno = 0;
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
- Bytef* dest;
- const Bytef* source;
- uInt len;
-{
- if (len == 0) return;
- do {
- *dest++ = *source++; /* ??? to be unrolled */
- } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
- const Bytef* s1;
- const Bytef* s2;
- uInt len;
-{
- uInt j;
-
- for (j = 0; j < len; j++) {
- if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
- }
- return 0;
-}
-
-void zmemzero(dest, len)
- Bytef* dest;
- uInt len;
-{
- if (len == 0) return;
- do {
- *dest++ = 0; /* ??? to be unrolled */
- } while (--len != 0);
-}
-#endif
-
-
-#ifdef SYS16BIT
-
-#ifdef __TURBOC__
-/* Turbo C in 16-bit mode */
-
-# define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
- voidpf org_ptr;
- voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
- voidpf buf = opaque; /* just to make some compilers happy */
- ulg bsize = (ulg)items*size;
-
- /* If we allocate less than 65520 bytes, we assume that farmalloc
- * will return a usable pointer which doesn't have to be normalized.
- */
- if (bsize < 65520L) {
- buf = farmalloc(bsize);
- if (*(ush*)&buf != 0) return buf;
- } else {
- buf = farmalloc(bsize + 16L);
- }
- if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
- table[next_ptr].org_ptr = buf;
-
- /* Normalize the pointer to seg:0 */
- *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
- *(ush*)&buf = 0;
- table[next_ptr++].new_ptr = buf;
- return buf;
-}
-
-void zcfree (voidpf opaque, voidpf ptr)
-{
- int n;
- if (*(ush*)&ptr != 0) { /* object < 64K */
- farfree(ptr);
- return;
- }
- /* Find the original pointer */
- for (n = 0; n < next_ptr; n++) {
- if (ptr != table[n].new_ptr) continue;
-
- farfree(table[n].org_ptr);
- while (++n < next_ptr) {
- table[n-1] = table[n];
- }
- next_ptr--;
- return;
- }
- ptr = opaque; /* just to make some compilers happy */
- Assert(0, "zcfree: ptr not found");
-}
-
-#endif /* __TURBOC__ */
-
-
-#ifdef M_I86
-/* Microsoft C in 16-bit mode */
-
-# define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-# define _halloc halloc
-# define _hfree hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
- if (opaque) opaque = 0; /* to make compiler happy */
- return _halloc((long)items, size);
-}
-
-void zcfree (voidpf opaque, voidpf ptr)
-{
- if (opaque) opaque = 0; /* to make compiler happy */
- _hfree(ptr);
-}
-
-#endif /* M_I86 */
-
-#endif /* SYS16BIT */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp malloc OF((uInt size));
-extern voidp calloc OF((uInt items, uInt size));
-extern void free OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
- voidpf opaque;
- unsigned items;
- unsigned size;
-{
- if (opaque) items += size - size; /* make compiler happy */
- return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
- (voidpf)calloc(items, size);
-}
-
-void zcfree (opaque, ptr)
- voidpf opaque;
- voidpf ptr;
-{
- free(ptr);
- if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
+/* zutil.c -- target dependent utility functions for the compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#include "zutil.h"
+
+#ifndef NO_DUMMY_DECL
+struct internal_state {int dummy;}; /* for buggy compilers */
+#endif
+
+const char * const z_errmsg[10] = {
+"need dictionary", /* Z_NEED_DICT 2 */
+"stream end", /* Z_STREAM_END 1 */
+"", /* Z_OK 0 */
+"file error", /* Z_ERRNO (-1) */
+"stream error", /* Z_STREAM_ERROR (-2) */
+"data error", /* Z_DATA_ERROR (-3) */
+"insufficient memory", /* Z_MEM_ERROR (-4) */
+"buffer error", /* Z_BUF_ERROR (-5) */
+"incompatible version",/* Z_VERSION_ERROR (-6) */
+""};
+
+
+const char * ZEXPORT zlibVersion()
+{
+ return ZLIB_VERSION;
+}
+
+uLong ZEXPORT zlibCompileFlags()
+{
+ uLong flags;
+
+ flags = 0;
+ switch (sizeof(uInt)) {
+ case 2: break;
+ case 4: flags += 1; break;
+ case 8: flags += 2; break;
+ default: flags += 3;
+ }
+ switch (sizeof(uLong)) {
+ case 2: break;
+ case 4: flags += 1 << 2; break;
+ case 8: flags += 2 << 2; break;
+ default: flags += 3 << 2;
+ }
+ switch (sizeof(voidpf)) {
+ case 2: break;
+ case 4: flags += 1 << 4; break;
+ case 8: flags += 2 << 4; break;
+ default: flags += 3 << 4;
+ }
+ switch (sizeof(z_off_t)) {
+ case 2: break;
+ case 4: flags += 1 << 6; break;
+ case 8: flags += 2 << 6; break;
+ default: flags += 3 << 6;
+ }
+#ifdef DEBUG
+ flags += 1 << 8;
+#endif
+#if defined(ASMV) || defined(ASMINF)
+ flags += 1 << 9;
+#endif
+#ifdef ZLIB_WINAPI
+ flags += 1 << 10;
+#endif
+#ifdef BUILDFIXED
+ flags += 1 << 12;
+#endif
+#ifdef DYNAMIC_CRC_TABLE
+ flags += 1 << 13;
+#endif
+#ifdef NO_GZCOMPRESS
+ flags += 1L << 16;
+#endif
+#ifdef NO_GZIP
+ flags += 1L << 17;
+#endif
+#ifdef PKZIP_BUG_WORKAROUND
+ flags += 1L << 20;
+#endif
+#ifdef FASTEST
+ flags += 1L << 21;
+#endif
+#ifdef STDC
+# ifdef NO_vsnprintf
+ flags += 1L << 25;
+# ifdef HAS_vsprintf_void
+ flags += 1L << 26;
+# endif
+# else
+# ifdef HAS_vsnprintf_void
+ flags += 1L << 26;
+# endif
+# endif
+#else
+ flags += 1L << 24;
+# ifdef NO_snprintf
+ flags += 1L << 25;
+# ifdef HAS_sprintf_void
+ flags += 1L << 26;
+# endif
+# else
+# ifdef HAS_snprintf_void
+ flags += 1L << 26;
+# endif
+# endif
+#endif
+ return flags;
+}
+
+#ifdef DEBUG
+
+# ifndef verbose
+# define verbose 0
+# endif
+int z_verbose = verbose;
+
+void z_error (m)
+ char *m;
+{
+ fprintf(stderr, "%s\n", m);
+ exit(1);
+}
+#endif
+
+/* exported to allow conversion of error code to string for compress() and
+ * uncompress()
+ */
+const char * ZEXPORT zError(err)
+ int err;
+{
+ return ERR_MSG(err);
+}
+
+#if defined(_WIN32_WCE)
+ /* The Microsoft C Run-Time Library for Windows CE doesn't have
+ * errno. We define it as a global variable to simplify porting.
+ * Its value is always 0 and should not be used.
+ */
+ int errno = 0;
+#endif
+
+#ifndef HAVE_MEMCPY
+
+void zmemcpy(dest, source, len)
+ Bytef* dest;
+ const Bytef* source;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = *source++; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+
+int zmemcmp(s1, s2, len)
+ const Bytef* s1;
+ const Bytef* s2;
+ uInt len;
+{
+ uInt j;
+
+ for (j = 0; j < len; j++) {
+ if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
+ }
+ return 0;
+}
+
+void zmemzero(dest, len)
+ Bytef* dest;
+ uInt len;
+{
+ if (len == 0) return;
+ do {
+ *dest++ = 0; /* ??? to be unrolled */
+ } while (--len != 0);
+}
+#endif
+
+
+#ifdef SYS16BIT
+
+#ifdef __TURBOC__
+/* Turbo C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
+ * and farmalloc(64K) returns a pointer with an offset of 8, so we
+ * must fix the pointer. Warning: the pointer must be put back to its
+ * original form in order to free it, use zcfree().
+ */
+
+#define MAX_PTR 10
+/* 10*64K = 640K */
+
+local int next_ptr = 0;
+
+typedef struct ptr_table_s {
+ voidpf org_ptr;
+ voidpf new_ptr;
+} ptr_table;
+
+local ptr_table table[MAX_PTR];
+/* This table is used to remember the original form of pointers
+ * to large buffers (64K). Such pointers are normalized with a zero offset.
+ * Since MSDOS is not a preemptive multitasking OS, this table is not
+ * protected from concurrent access. This hack doesn't work anyway on
+ * a protected system like OS/2. Use Microsoft C instead.
+ */
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ voidpf buf = opaque; /* just to make some compilers happy */
+ ulg bsize = (ulg)items*size;
+
+ /* If we allocate less than 65520 bytes, we assume that farmalloc
+ * will return a usable pointer which doesn't have to be normalized.
+ */
+ if (bsize < 65520L) {
+ buf = farmalloc(bsize);
+ if (*(ush*)&buf != 0) return buf;
+ } else {
+ buf = farmalloc(bsize + 16L);
+ }
+ if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
+ table[next_ptr].org_ptr = buf;
+
+ /* Normalize the pointer to seg:0 */
+ *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
+ *(ush*)&buf = 0;
+ table[next_ptr++].new_ptr = buf;
+ return buf;
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ int n;
+ if (*(ush*)&ptr != 0) { /* object < 64K */
+ farfree(ptr);
+ return;
+ }
+ /* Find the original pointer */
+ for (n = 0; n < next_ptr; n++) {
+ if (ptr != table[n].new_ptr) continue;
+
+ farfree(table[n].org_ptr);
+ while (++n < next_ptr) {
+ table[n-1] = table[n];
+ }
+ next_ptr--;
+ return;
+ }
+ ptr = opaque; /* just to make some compilers happy */
+ Assert(0, "zcfree: ptr not found");
+}
+
+#endif /* __TURBOC__ */
+
+
+#ifdef M_I86
+/* Microsoft C in 16-bit mode */
+
+# define MY_ZCALLOC
+
+#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
+# define _halloc halloc
+# define _hfree hfree
+#endif
+
+voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ return _halloc((long)items, size);
+}
+
+void zcfree (voidpf opaque, voidpf ptr)
+{
+ if (opaque) opaque = 0; /* to make compiler happy */
+ _hfree(ptr);
+}
+
+#endif /* M_I86 */
+
+#endif /* SYS16BIT */
+
+
+#ifndef MY_ZCALLOC /* Any system without a special alloc function */
+
+#ifndef STDC
+extern voidp malloc OF((uInt size));
+extern voidp calloc OF((uInt items, uInt size));
+extern void free OF((voidpf ptr));
+#endif
+
+voidpf zcalloc (opaque, items, size)
+ voidpf opaque;
+ unsigned items;
+ unsigned size;
+{
+ if (opaque) items += size - size; /* make compiler happy */
+ return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
+ (voidpf)calloc(items, size);
+}
+
+void zcfree (opaque, ptr)
+ voidpf opaque;
+ voidpf ptr;
+{
+ free(ptr);
+ if (opaque) return; /* make compiler happy */
+}
+
+#endif /* MY_ZCALLOC */
diff --git a/Contrib/zip2exe/zlib/zutil.h b/Contrib/zip2exe/zlib/zutil.h
index 23e85b0..b7d5eff 100755
--- a/Contrib/zip2exe/zlib/zutil.h
+++ b/Contrib/zip2exe/zlib/zutil.h
@@ -1,269 +1,269 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: zutil.h,v 1.2 2005/07/22 17:42:47 kichik Exp $ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-#ifdef STDC
-# ifndef _WIN32_WCE
-# include <stddef.h>
-# endif
-# include <string.h>
-# include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
-# ifdef _WIN32_WCE
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
- * errno. We define it as a global variable to simplify porting.
- * Its value is always 0 and should not be used. We rename it to
- * avoid conflict with other libraries that use the same workaround.
- */
-# define errno z_errno
-# endif
- extern int errno;
-#else
-# ifndef _WIN32_WCE
-# include <errno.h>
-# endif
-#endif
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long ulg;
-
-extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
- /* common constants */
-
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES 2
-/* The three kinds of block type */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
- /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-# define OS_CODE 0x00
-# if defined(__TURBOC__) || defined(__BORLANDC__)
-# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
- /* Allow compilation with ANSI keywords only enabled */
- void _Cdecl farfree( void *block );
- void *_Cdecl farmalloc( unsigned long nbytes );
-# else
-# include <alloc.h>
-# endif
-# else /* MSC or DJGPP */
-# include <malloc.h>
-# endif
-#endif
-
-#ifdef AMIGA
-# define OS_CODE 0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-# define OS_CODE 0x02
-# define F_OPEN(name, mode) \
- fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-# define OS_CODE 0x05
-#endif
-
-#ifdef OS2
-# define OS_CODE 0x06
-# ifdef M_I86
- #include <malloc.h>
-# endif
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-# define OS_CODE 0x07
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fdopen */
-# else
-# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# endif
-# endif
-#endif
-
-#ifdef TOPS20
-# define OS_CODE 0x0a
-#endif
-
-#ifdef WIN32
-# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
-# define OS_CODE 0x0b
-# endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-# define OS_CODE 0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
-# if defined(_WIN32_WCE)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# ifndef _PTRDIFF_T_DEFINED
- typedef int ptrdiff_t;
-# define _PTRDIFF_T_DEFINED
-# endif
-# else
-# define fdopen(fd,type) _fdopen(fd,type)
-# endif
-#endif
-
- /* common defaults */
-
-#ifndef OS_CODE
-# define OS_CODE 0x03 /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-# define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
- /* functions */
-
-#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#if defined(__CYGWIN__)
-# ifndef HAVE_VSNPRINTF
-# define HAVE_VSNPRINTF
-# endif
-#endif
-#ifndef HAVE_VSNPRINTF
-# ifdef MSDOS
- /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
- but for now we just assume it doesn't. */
-# define NO_vsnprintf
-# endif
-# ifdef __TURBOC__
-# define NO_vsnprintf
-# endif
-# ifdef WIN32
- /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
-# if !defined(vsnprintf) && !defined(NO_vsnprintf)
-# define vsnprintf _vsnprintf
-# endif
-# endif
-# ifdef __SASC
-# define NO_vsnprintf
-# endif
-#endif
-#ifdef VMS
-# define NO_vsnprintf
-#endif
-
-#if defined(pyr)
-# define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
- * You may have to use the same strategy for Borland C (untested).
- * The __SC__ check is for Symantec.
- */
-# define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-# define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-# define zmemcpy _fmemcpy
-# define zmemcmp _fmemcmp
-# define zmemzero(dest, len) _fmemset(dest, 0, len)
-# else
-# define zmemcpy memcpy
-# define zmemcmp memcmp
-# define zmemzero(dest, len) memset(dest, 0, len)
-# endif
-#else
- extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
- extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
- extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-# include <stdio.h>
- extern int z_verbose;
- extern void z_error OF((char *m));
-# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-# define Trace(x) {if (z_verbose>=0) fprintf x ;}
-# define Tracev(x) {if (z_verbose>0) fprintf x ;}
-# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-#endif
-
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void zcfree OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
- (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* ZUTIL_H */
+/* zutil.h -- internal interface and configuration of the compression library
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZUTIL_H
+#define ZUTIL_H
+
+#define ZLIB_INTERNAL
+#include "zlib.h"
+
+#ifdef STDC
+# ifndef _WIN32_WCE
+# include <stddef.h>
+# endif
+# include <string.h>
+# include <stdlib.h>
+#endif
+#ifdef NO_ERRNO_H
+# ifdef _WIN32_WCE
+ /* The Microsoft C Run-Time Library for Windows CE doesn't have
+ * errno. We define it as a global variable to simplify porting.
+ * Its value is always 0 and should not be used. We rename it to
+ * avoid conflict with other libraries that use the same workaround.
+ */
+# define errno z_errno
+# endif
+ extern int errno;
+#else
+# ifndef _WIN32_WCE
+# include <errno.h>
+# endif
+#endif
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+typedef unsigned char uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long ulg;
+
+extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+/* (size given to avoid silly warnings with Visual C++) */
+
+#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
+
+#define ERR_RETURN(strm,err) \
+ return (strm->msg = (char*)ERR_MSG(err), (err))
+/* To be used only when the state is known to be valid */
+
+ /* common constants */
+
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#if MAX_MEM_LEVEL >= 8
+# define DEF_MEM_LEVEL 8
+#else
+# define DEF_MEM_LEVEL MAX_MEM_LEVEL
+#endif
+/* default memLevel */
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES 2
+/* The three kinds of block type */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+ /* target dependencies */
+
+#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
+# define OS_CODE 0x00
+# if defined(__TURBOC__) || defined(__BORLANDC__)
+# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+ /* Allow compilation with ANSI keywords only enabled */
+ void _Cdecl farfree( void *block );
+ void *_Cdecl farmalloc( unsigned long nbytes );
+# else
+# include <alloc.h>
+# endif
+# else /* MSC or DJGPP */
+# include <malloc.h>
+# endif
+#endif
+
+#ifdef AMIGA
+# define OS_CODE 0x01
+#endif
+
+#if defined(VAXC) || defined(VMS)
+# define OS_CODE 0x02
+# define F_OPEN(name, mode) \
+ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
+#endif
+
+#if defined(ATARI) || defined(atarist)
+# define OS_CODE 0x05
+#endif
+
+#ifdef OS2
+# define OS_CODE 0x06
+# ifdef M_I86
+ #include <malloc.h>
+# endif
+#endif
+
+#if defined(MACOS) || defined(TARGET_OS_MAC)
+# define OS_CODE 0x07
+# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
+# include <unix.h> /* for fdopen */
+# else
+# ifndef fdopen
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# endif
+# endif
+#endif
+
+#ifdef TOPS20
+# define OS_CODE 0x0a
+#endif
+
+#ifdef WIN32
+# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
+# define OS_CODE 0x0b
+# endif
+#endif
+
+#ifdef __50SERIES /* Prime/PRIMOS */
+# define OS_CODE 0x0f
+#endif
+
+#if defined(_BEOS_) || defined(RISCOS)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+#endif
+
+#if (defined(_MSC_VER) && (_MSC_VER > 600))
+# if defined(_WIN32_WCE)
+# define fdopen(fd,mode) NULL /* No fdopen() */
+# ifndef _PTRDIFF_T_DEFINED
+ typedef int ptrdiff_t;
+# define _PTRDIFF_T_DEFINED
+# endif
+# else
+# define fdopen(fd,type) _fdopen(fd,type)
+# endif
+#endif
+
+ /* common defaults */
+
+#ifndef OS_CODE
+# define OS_CODE 0x03 /* assume Unix */
+#endif
+
+#ifndef F_OPEN
+# define F_OPEN(name, mode) fopen((name), (mode))
+#endif
+
+ /* functions */
+
+#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#if defined(__CYGWIN__)
+# ifndef HAVE_VSNPRINTF
+# define HAVE_VSNPRINTF
+# endif
+#endif
+#ifndef HAVE_VSNPRINTF
+# ifdef MSDOS
+ /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
+ but for now we just assume it doesn't. */
+# define NO_vsnprintf
+# endif
+# ifdef __TURBOC__
+# define NO_vsnprintf
+# endif
+# ifdef WIN32
+ /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
+# if !defined(vsnprintf) && !defined(NO_vsnprintf)
+# define vsnprintf _vsnprintf
+# endif
+# endif
+# ifdef __SASC
+# define NO_vsnprintf
+# endif
+#endif
+#ifdef VMS
+# define NO_vsnprintf
+#endif
+
+#if defined(pyr)
+# define NO_MEMCPY
+#endif
+#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
+ /* Use our own functions for small and medium model with MSC <= 5.0.
+ * You may have to use the same strategy for Borland C (untested).
+ * The __SC__ check is for Symantec.
+ */
+# define NO_MEMCPY
+#endif
+#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
+# define HAVE_MEMCPY
+#endif
+#ifdef HAVE_MEMCPY
+# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
+# define zmemcpy _fmemcpy
+# define zmemcmp _fmemcmp
+# define zmemzero(dest, len) _fmemset(dest, 0, len)
+# else
+# define zmemcpy memcpy
+# define zmemcmp memcmp
+# define zmemzero(dest, len) memset(dest, 0, len)
+# endif
+#else
+ extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+ extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+ extern void zmemzero OF((Bytef* dest, uInt len));
+#endif
+
+/* Diagnostic functions */
+#ifdef DEBUG
+# include <stdio.h>
+ extern int z_verbose;
+ extern void z_error OF((char *m));
+# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
+# define Trace(x) {if (z_verbose>=0) fprintf x ;}
+# define Tracev(x) {if (z_verbose>0) fprintf x ;}
+# define Tracevv(x) {if (z_verbose>1) fprintf x ;}
+# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
+# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
+#else
+# define Assert(cond,msg)
+# define Trace(x)
+# define Tracev(x)
+# define Tracevv(x)
+# define Tracec(c,x)
+# define Tracecv(c,x)
+#endif
+
+
+voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
+void zcfree OF((voidpf opaque, voidpf ptr));
+
+#define ZALLOC(strm, items, size) \
+ (*((strm)->zalloc))((strm)->opaque, (items), (size))
+#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
+#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
+
+#endif /* ZUTIL_H */
diff --git a/Docs/src/SConscript b/Docs/src/SConscript
index 0e370f9..6b289b8 100755
--- a/Docs/src/SConscript
+++ b/Docs/src/SConscript
@@ -1,122 +1,122 @@
-config_but = 'config.but'
-
-chapters = 5
-appendices = 9
-
-htmls = Split('IndexPage.html Contents.html') \
- + map(lambda ch: 'Chapter' + str(ch + 1) + '.html', range(chapters)) \
- + map(lambda ap: 'Appendix' + chr(ord('A') + ap) + '.html', range(appendices))
-fixed_htmls = map(lambda fn: 'fixed/'+fn, htmls)
-
-chm_config_but = 'chm_config.but'
-
-buts = Split("""
- intro.but
- tutorial.but
- usage.but
- script.but
- var.but
- labels.but
- jumps.but
- pages.but
- sections.but
- usection.but
- functions.but
- callback.but
- attributes.but
- compilerflags.but
- basic.but
- registry.but
- generalpurpose.but
- flowcontrol.but
- file.but
- uninstall.but
- misc.but
- string.but
- stack.but
- int.but
- reboot.but
- log.but
- sec.but
- ui.but
- langs.but
- plugin.but
- silent.but
- compiler.but
- defines.but
- modernui.but
- library.but
- usefulfunc.but
- usefulinfos.but
- headers.but
- history.but
- build.but
- credits.but
- license.but
-""")
-
-import os
-import re
-
-Import('halibut env build_chm')
-
-env.Append(ENV = {'PATH' : os.environ['PATH']})
-
-build_dir = Dir(GetBuildPath('.')).abspath
-
-replacement = '<a href="%s/\\1/' % env.subst('$PREFIX_DATA')
-
-def fix_html(target, source, env):
- for i in range(len(source)):
- data = open(source[i].path,'rb').read()
- data = re.sub('<a href="../(Include|Stubs|Plugins|Contrib)/', replacement, data)
- open(target[i].path,'wb').write(data)
- return None
-
-if build_chm:
- hhc_action = Action(r'cd \ && hhc "%s\nsis.hhp"' % (build_dir))
- execute = hhc_action.execute
- def rexecute(*args):
- return execute(*args) != 1 # hhc returns 1 on success
- hhc_action.execute = rexecute
-
- chm_builder = Builder(
- action = [
- Copy(build_dir, '${SOURCE.dir}/../style.css'),
- Copy(build_dir, '${SOURCE.dir}/chmlink.js'),
- Copy(build_dir, '${SOURCE.dir}/nsis.hhp'),
- Action('cd "%s" && "%s" ${SOURCES.abspath}' % (build_dir, halibut[0].abspath)),
- hhc_action
- ]
- )
-
- env.Append(BUILDERS = {'HalibutCHM' : chm_builder})
-
- chm = env.HalibutCHM('NSIS.chm', [chm_config_but] + buts)
- env.Depends(chm, halibut)
- env.Depends(chm, '#Docs/style.css')
- env.Depends(chm, 'chmlink.js')
- env.Depends(chm, 'nsis.hhp')
- env.DistributeDoc(chm)
-
-else:
- html_builder = Builder(
- action = [
- Copy(build_dir, '${SOURCE.dir}/../style.css'),
- Action('cd "%s" && "%s" ${SOURCES.abspath}' % (build_dir, halibut[0].abspath))
- ]
- )
-
- html_fixer = Builder(action = fix_html, suffix = '.html', src_suffix = '.html')
-
- env.Append(BUILDERS = {'Halibut' : html_builder, 'FixHTML': html_fixer})
-
- html = env.Halibut(htmls, [config_but] + buts)
- env.Depends(html, halibut)
- env.DistributeDocs('#Docs/style.css')
-
- if env['PLATFORM'] == 'win32':
- env.DistributeDocs(html)
- else:
- fixed_html = env.FixHTML(fixed_htmls, htmls)
- env.DistributeDocs(fixed_html)
+config_but = 'config.but'
+
+chapters = 5
+appendices = 9
+
+htmls = Split('IndexPage.html Contents.html') \
+ + map(lambda ch: 'Chapter' + str(ch + 1) + '.html', range(chapters)) \
+ + map(lambda ap: 'Appendix' + chr(ord('A') + ap) + '.html', range(appendices))
+fixed_htmls = map(lambda fn: 'fixed/'+fn, htmls)
+
+chm_config_but = 'chm_config.but'
+
+buts = Split("""
+ intro.but
+ tutorial.but
+ usage.but
+ script.but
+ var.but
+ labels.but
+ jumps.but
+ pages.but
+ sections.but
+ usection.but
+ functions.but
+ callback.but
+ attributes.but
+ compilerflags.but
+ basic.but
+ registry.but
+ generalpurpose.but
+ flowcontrol.but
+ file.but
+ uninstall.but
+ misc.but
+ string.but
+ stack.but
+ int.but
+ reboot.but
+ log.but
+ sec.but
+ ui.but
+ langs.but
+ plugin.but
+ silent.but
+ compiler.but
+ defines.but
+ modernui.but
+ library.but
+ usefulfunc.but
+ usefulinfos.but
+ headers.but
+ history.but
+ build.but
+ credits.but
+ license.but
+""")
+
+import os
+import re
+
+Import('halibut env build_chm')
+
+env.Append(ENV = {'PATH' : os.environ['PATH']})
+
+build_dir = Dir(GetBuildPath('.')).abspath
+
+replacement = '<a href="%s/\\1/' % env.subst('$PREFIX_DATA')
+
+def fix_html(target, source, env):
+ for i in range(len(source)):
+ data = open(source[i].path,'rb').read()
+ data = re.sub('<a href="../(Include|Stubs|Plugins|Contrib)/', replacement, data)
+ open(target[i].path,'wb').write(data)
+ return None
+
+if build_chm:
+ hhc_action = Action(r'cd \ && hhc "%s\nsis.hhp"' % (build_dir))
+ execute = hhc_action.execute
+ def rexecute(*args):
+ return execute(*args) != 1 # hhc returns 1 on success
+ hhc_action.execute = rexecute
+
+ chm_builder = Builder(
+ action = [
+ Copy(build_dir, '${SOURCE.dir}/../style.css'),
+ Copy(build_dir, '${SOURCE.dir}/chmlink.js'),
+ Copy(build_dir, '${SOURCE.dir}/nsis.hhp'),
+ Action('cd "%s" && "%s" ${SOURCES.abspath}' % (build_dir, halibut[0].abspath)),
+ hhc_action
+ ]
+ )
+
+ env.Append(BUILDERS = {'HalibutCHM' : chm_builder})
+
+ chm = env.HalibutCHM('NSIS.chm', [chm_config_but] + buts)
+ env.Depends(chm, halibut)
+ env.Depends(chm, '#Docs/style.css')
+ env.Depends(chm, 'chmlink.js')
+ env.Depends(chm, 'nsis.hhp')
+ env.DistributeDoc(chm)
+
+else:
+ html_builder = Builder(
+ action = [
+ Copy(build_dir, '${SOURCE.dir}/../style.css'),
+ Action('cd "%s" && "%s" ${SOURCES.abspath}' % (build_dir, halibut[0].abspath))
+ ]
+ )
+
+ html_fixer = Builder(action = fix_html, suffix = '.html', src_suffix = '.html')
+
+ env.Append(BUILDERS = {'Halibut' : html_builder, 'FixHTML': html_fixer})
+
+ html = env.Halibut(htmls, [config_but] + buts)
+ env.Depends(html, halibut)
+ env.DistributeDocs('#Docs/style.css')
+
+ if env['PLATFORM'] == 'win32':
+ env.DistributeDocs(html)
+ else:
+ fixed_html = env.FixHTML(fixed_htmls, htmls)
+ env.DistributeDocs(fixed_html)
diff --git a/Docs/src/attributes.but b/Docs/src/attributes.but
index 6bcbac6..9b7c5a3 100755
--- a/Docs/src/attributes.but
+++ b/Docs/src/attributes.but
@@ -1,432 +1,432 @@
-\H{instattribs} Installer Attributes
-
-\S1{attribgen} General Attributes
-
-The commands below all adjust attributes of the installer. These attributes control how the installer looks and functions, including which pages are present in the installer, as what text is displayed in each part of each page, how the installer is named, what icon the installer uses, the default installation directory, what file it writes out, and more. Note that these attributes can be set anywhere in the file except in a Section or Function.
-
-\\<b\\>\\<u\\>Defaults are bold and underlined\\</u\\>\\</b\\>
-
-\S2{aaddbrandingimage} AddBrandingImage
-
-\c (left|right|top|bottom) (width|height) [padding]
-
-Adds a branding image on the top, bottom, left, or right of the installer. Its size will be set according to the width/height specified, the installer width/height and the installer font. The final size will not always be what you requested; have a look at the output of the command for the actual size. Because this depends on the installer font, you should use SetFont before AddBrandingImage. The default padding value is 2.
-
-AddBrandingImage only adds a placeholder for an image. To set the image itself on runtime, use \R{setbrandingimage}{SetBrandingImage}.
-
-\c AddBrandingImage left 100
-\c AddBrandingImage right 50
-\c AddBrandingImage top 20
-\c AddBrandingImage bottom 35
-\c AddBrandingImage left 100 5
-
-\S2{aallowrootdirinstall} AllowRootDirInstall
-
-\c true|\\<b\\>false\\</b\\>
-
-Controls whether or not installs are enabled to the root directory of a drive, or directly into a network share. Set to 'true' to change the safe behavior, which prevents users from selecting C:\\ or \\\\Server\\Share as an install (and later on, uninstall) directory. For additional directory selection page customizability, see \R{onverifyinstdir}{.onVerifyInstDir}.
-
-\S2{aautoclosewindow} AutoCloseWindow
-
-\c true|\\<b\\>false\\</b\\>
-
-Sets whether or not the install window automatically closes when completed. This is overrideable from a section using \R{setautoclose}{SetAutoClose}.
-
-\S2{abgfont} BGFont
-
-\c [font_face [height [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]]]
-
-Specifies the font used to show the text on the background gradient. To set the color use \R{abggradient}{BGGradient}. If no parameters are specified, the default font will be used. The default font is bold and italic Times New Roman.
-
-\S2{abggradient} BGGradient
-
-\c [\\<b\\>off\\</b\\>|(topc botc [textcolor|notext])]
-
-Specifies whether or not to use a gradient background window. If 'off', the installer will not show a background window, if no parameters are specified, the default black to blue gradient is used, and otherwise the top_color or bottom_color are used to make a gradient. Top_color and bottom_color are specified using the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). 'textcolor' can be specified as well, or 'notext' can be specified to turn the big background text off.
-
-\S2{abrandingtext} BrandingText
-
-\c /TRIM(LEFT|RIGHT|CENTER) text
-
-Sets the text that is shown (by default it is 'Nullsoft Install System vX.XX') at the bottom of the install window. Setting this to an empty string ("") uses the default; to set the string to blank, use " " (a space). If it doesn't matter to you, leave it the default so that everybody can know why the installer didn't suck. heh. Use /TRIMLEFT, /TRIMRIGHT or /TRIMCENTER to trim down the size of the control to the size of the string.
-
-Accepts variables. If variables are used, they must be initialized on \R{oninit}{.onInit}.
-
-\S2{acaption} Caption
-
-\c caption
-
-When used outside a \R{pageex}{PageEx} block: Sets the text for the titlebar of the installer. the By default, it is 'Name Setup', where Name is specified with the \R{aname}{Name} instruction. You can, however, override it with 'MyApp Installer' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
-
-When used inside a \R{pageex}{PageEx} block: Sets the subcaption of the current page.
-
-Accepts variables. If variables are used, they must be initialized on \R{oninit}{.onInit}.
-
-\S2{achangeui} ChangeUI
-
-\c dialog ui_file.exe
-
-Replaces dialog (\e{IDD_LICENSE}, \e{IDD_DIR}, \e{IDD_SELCOM}, \e{IDD_INST}, \e{IDD_INSTFILES}, \e{IDD_UNINST} or \e{IDD_VERIFY}) by a dialog with the same resource ID in ui_file.exe. You can also specify 'all' as the dialog if you wish to replace all 7 of the dialogs at once from the same UI file. For some example UIs look at Contrib\\UIs under your NSIS directory.
-
-\b \e{IDD_LICENSE} must contain \e{IDC_EDIT1} (RICHEDIT control).
-
-\b \e{IDD_DIR} must contain \e{IDC_DIR} (edit box), \e{IDC_BROWSE} (button) and \e{IDC_CHECK1} (checkbox).
-
-\b \e{IDD_SELCOM} must contain \e{IDC_TREE1} (SysTreeView32 control), and \e{IDC_COMBO1} (combo box).
-
-\b \e{IDD_INST} must contain \e{IDC_BACK} (button), \e{IDC_CHILDRECT} (static control the size of all other dialogs), \e{IDC_VERSTR} (static), \e{IDOK} (button), and \e{IDCANCEL} (button). If an image control (static with \e{SS_BITMAP} style) will be found in this dialog it will be used as the default for \R{setbrandingimage}{SetBrandingImage}.
-
-\b \e{IDD_INSTFILES} must contain \e{IDC_LIST1} (SysListView32 control), \e{IDC_PROGRESS} (msctls_progress32 control), and \e{IDC_SHOWDETAILS} (button).
-
-\b \e{IDD_UNINST} must contain \e{IDC_EDIT1} (edit box).
-
-\b \e{IDD_VERIFY} must contain \e{IDC_STR} (static).
-
-\c ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe"
-
-\S2{acheckbitmap} CheckBitmap
-
-\c bitmap.bmp
-
-Specifies the bitmap with the images used for the checks of the component-selection page treeview.
-
-This bitmap should have a size of 96x16 pixels, no more than 8bpp (256 colors) and contain six 16x16 images for the different states (in order: selection mask, not checked, checked, greyed out, unchecked & read-only, checked & read-only). Use magenta as mask color (this area will be transparent).
-
-\S2{acompletedtext} CompletedText
-
-\c text
-
-Replaces the default text ("Completed") that is printed at the end of the install if parameter is specified. Otherwise, the default is used.
-
-Accepts variables. If variables are used, they must be initialized before the message is printed.
-
-\S2{acomponenttext} ComponentText
-
-\c [text [subtext] [subtext2]]
-
-Used to change the default text on the component page.
-
-text: Text above the controls, to the right of the installation icon.
-
-subtext: Text next to the installation type selection.
-
-subtext2: Text to the left of the components list and below the installation type.
-
-The default string will be used if a string is empty ("").
-
-Accepts variables. If variables are used, they must be initialized before the components page is created.
-
-\S2{acrccheck} CRCCheck
-
-\c \\<b\\>on\\</b\\>|off|force
-
-Specifies whether or not the installer will perform a CRC on itself before allowing an install. Note that if the user uses /NCRC on the command line when executing the installer, and you didn't specify 'force', the CRC will not occur, and the user will be allowed to install a (potentially) corrupted installer.
-
-\S2{adetailsbuttontext} DetailsButtonText
-
-\c show details text
-
-Replaces the default details button text of "Show details", if parameter is specified (otherwise the default is used).
-
-Accepts variables. If variables are used, they must be initialized before the install log (instfiles) page is created.
-
-\S2{adirtext} DirText
-
-\c [text] [subtext] [browse_button_text] [browse_dlg_text]
-
-Used to change the default text on the directory page.
-
-text: Text above the controls, to the right of the installation icon.
-
-subtext: Text on the directory selection frame.
-
-browse_button_text: Text on the Browse button.
-
-browse_dlg_text: Text on the "Browse For Folder" dialog, appears after clicking on "Browse" button.
-
-The default string will be used if a string is empty ("").
-
-Accepts variables. If variables are used, they must be initialized before the directory page is created.
-
-\S2{adirvar} DirVar
-
-\c user_var(dir input/output)
-
-Specifies which variable is to be used to contain the directory selected. This variable should contain the default value too. This allows to easily create two different directory pages that will not require you to move values in and out of $INSTDIR. The default variable is $INSTDIR. This can only be used in \R{pageex}{PageEx} and for directory and uninstConfirm pages.
-
-\c Var ANOTHER_DIR
-\c PageEx directory
-\c DirVar $ANOTHER_DIR
-\c PageExEnd
-\c
-\c Section
-\c SetOutPath $INSTDIR
-\c File "a file.dat"
-\c SetOutPath $ANOTHER_DIR
-\c File "another file.dat"
-\c SectionEnd
-
-\S2{adirverify} DirVerify
-
-\c \\<b\\>auto\\</b\\>|leave
-
-If `DirVerify leave' is used, the Next button will not be disabled if the installation directory is not valid or there is not enough space. A flag that you can read in the leave function using \R{getinstdirerror}{GetInstDirError} will be set instead.
-
-\c PageEx directory
-\c DirVerify leave
-\c PageCallbacks "" "" dirLeave
-\c PageExEnd
-
-\S2{a} FileErrorText
-
-\c file error text
-
-Replaces the default text that comes up when a file cannot be written to. This string can contain a reference to $0, which is the filename ($0 is temporarily changed to this value). Example: "Can not write to file $\\r$\\n$0$\\r$\\ngood luck, bitch.".
-
-Accepts variables. If variables are used, they must be initialized before \R{file}{File} is used.
-
-\S2{aicon} Icon
-
-\c [path\]icon.ico
-
-Sets the icon of the installer. Every icon in the icon file will be included in the installer. Note that if you use an uninstaller, each icon in the icon file must have the same size and color depth as its matching icon in the uninstaller icon file. The order of the icons in the icon file also matters. For example, if the installer icon file has three icons, first icon sized 32x32 pixels with 8bpp, second icon sized 16x16 pixels with 8bpp and third icon sized 8x8 with 8bpp; then the uninstaller icon file must have three icons with the same sizes and color depths, in the same order. Use \R{auninstallicon}{UninstallIcon} to set the uninstaller icon.
-
-\S2{ainstallbuttontext} InstallButtonText
-
-\c install button text
-
-If parameter is specified, overrides the default install button text (of "Install") with the specified text.
-
-Accepts variables. If variables are used, they must be initialized before the install button shows.
-
-\S2{ainstallcolors} InstallColors
-
-\c /windows | (foreground_color background_color)
-
-Sets the colors to use for the install info screen (the default is 00FF00 000000. Use the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Note that if "/windows" is specified as the only parameter, the default windows colors will be used.
-
-\S2{ainstalldir} InstallDir
-
-\c definstdir
-
-Sets the default installation directory. See the \R{variables}{variables section} for variables that can be used to make this string (especially $PROGRAMFILES). Note that the part of this string following the last \\ will be used if the user selects 'browse', and may be appended back on to the string at install time (to disable this, end the directory with a \\ (which will require the entire parameter to be enclosed with quotes). If this doesn't make any sense, play around with the browse button a bit.
-
-\S2{ainstalldirregkey} InstallDirRegKey
-
-\c root_key subkey key_name
-
-This attribute tells the installer to check a string in the registry, and use it for the install dir if that string is valid. If this attribute is present, it will override the InstallDir attribute if the registry key is valid, otherwise it will fall back to the InstallDir default. When querying the registry, this command will automatically remove any quotes. If the string ends in ".exe", it will automatically remove the filename component of the string (i.e. if the string is "C:\\program files\\poop\\poop.exe", it will know to use "C:\\program files\\poop"). For more advanced install directory configuration, set $INSTDIR in .onInit.
-
-Language strings and variables cannot be used with InstallDirRegKey.
-
-\c InstallDirRegKey HKLM Software\NSIS ""
-\c InstallDirRegKey HKLM Software\ACME\Thingy InstallLocation
-
-\S2{ainstprogressflags} InstProgressFlags
-
-\c [flag [...]]
-
-Valid values for flag are "smooth" (smooth the progress bar) or "colored" (color the progress bar with the colors set by InstallColors. Examples: "InstProgressFlags" (default old-school windows look), "InstProgressFlags smooth" (new smooth look), "InstProgressFlags smooth colored" (colored smooth look whee). Note: neither "smooth" or "colored" work with \R{axpstyle}{XPStyle} on when the installer runs on Windows XP with a modern theme.
-
-\S2{ainsttype} InstType
-
-\c install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM
-
-Adds an install type to the install type list, or disables the custom install type. There can be as many as 32 types, each one specifying the name of the install type. If the name is prefixed with 'un.' it is an uninstaller install type. The name can contain variables which will be processed at runtime before the components page shows. Another way of changing the InstType name during runtime is the \R{sinsttypesettext}{InstTypeSetText} command. The difference is that with \R{sinsttypesettext}{InstTypeSetText} you are saving your precious user variables. The first type is the default (generally 'Typical'). If the /NOCUSTOM switch is specified, then the "custom" install type is disabled, and the user has to choose one of the pre-defined install types. Alternatively, if the /CUSTOMSTRING switch is specified, the parameter will override the "Custom" install type text. Alternatively, if the /COMPONENTSONLYONCUSTOM flag is specified, the component list will only be shown if the "Custom" install type is selected.
-
-Accepts variables for type names. If variables are used, they must be initialized before the components page is created.
-
-\S2{alicensebkcolor} LicenseBkColor
-
-\c color | \\<b\\>/gray\\</b\\> | /windows
-
-Sets the background color of the license data. Color is specified using the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Default is '/gray'. You can also use the Windows OS defined color by using '/windows'.
-
-\S2{alicensedata} LicenseData
-
-\c licdata.(txt|rtf)
-
-Specifies a text file or a RTF file to use for the license that the user can read. Omit this to not have a license displayed. Note that the file must be in the evil DOS text format (\\r\\n, yeah!). To define a multilingual license data use \R{licenselangstring}{LicenseLangString}.
-
-If you make your license file a RTF file it is recommended you edit it with WordPad and not MS Word. Using WordPad will result in a much smaller file.
-
-Use \R{licenselangstring}{LicenseLangString} to show a different license for every language.
-
-\S2{alicenseforceselection} LicenseForceSelection
-
-\c (checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | \\<b\\>off\\</b\\>)
-
-Specifies if the displayed license must be accept explicit or not. This can be done either by a checkbox or by radiobuttons. By default the "next button" is disabled and will only be enabled if the checkbox is enabled or the right radio button is selected. If off is specified the "next button" is enabled by default.
-
-\c LicenseForceSelection checkbox
-\c LicenseForceSelection checkbox "i accept"
-\c LicenseForceSelection radiobuttons
-\c LicenseForceSelection radiobuttons "i accept"
-\c LicenseForceSelection radiobuttons "i accept" "i decline"
-\c LicenseForceSelection radiobuttons "" "i decline"
-\c LicenseForceSelection off
-
-\S2{alicensetext} LicenseText
-
-\c [text [button_text]]
-
-Used to change the default text on the license page.
-
-text: Text above the controls, to the right of the installation icon.
-
-button_text: Text on the "I Agree" button.
-
-The default string will be used if a string is empty ("").
-
-Accepts variables. If variables are used, they must be initialized before the license page is created.
-
-\S2{amiscbuttontext} MiscButtonText
-
-\c [back button text [next button text] [cancel button text] [close button text]]
-
-Replaces the default text strings for the four buttons (< Back, Next >, Cancel and Close). If parameters are omitted, the defaults are used.
-
-Accepts variables. If variables are used, they must be initialized in \R{oninit}{.onInit}.
-
-\S2{aname} Name
-
-\c name [name_doubled_ampersands]
-
-Sets the name of the installer. The name is usually simply the product name such as 'MyApp' or 'CrapSoft MyApp'. If you have one or more ampersands (&) in the name, set the second parameter to the same name, only with doubled ampersands. For example, if your product's name is "Foo & Bar", use:
-
-\c Name "Foo & Bar" "Foo && Bar"
-
-If you have ampersands in the name and use a \R{langstring}{LangString} for the name, you will have to create another one with doubled ampersands to use as the second parameter.
-
-Accepts variables. If variables are used, they must be initialized in \R{oninit}{.onInit}.
-
-\S2{aoutfile} OutFile
-
-\c [path\]install.exe
-
-Specifies the output file that the MakeNSIS should write the installer to. This is just the file that MakeNSIS writes, it doesn't affect the contents of the installer.
-
-\S2{requestexecutionlevel} RequestExecutionLevel
-
-\c \\<b\\>none\\</b\\>|user|highest|admin
-
-Specifies the requested execution level for Windows Vista. The value is embedded in the installer and uninstaller's XML manifest and tells Vista, and probably future versions of Windows, what privileges level the installer requires. \e{user} requests the a normal user's level with no administrative privileges. \e{highest} will request the highest execution level available for the current user and will cause Windows to prompt the user to verify privilege escalation. The prompt might request for the user's password. \e{admin} requests administrator level and will cause Windows to prompt the user as well. Specifying \e{none}, which is also the default, will keep the manifest empty and let Windows decide which execution level is required. Windows Vista automatically identifies NSIS installers and decides administrator privileges are required. Because of this, \e{none} and \e{admin} have virtually the same effect.
-
-It's recommended, at least by Microsoft, that every application will be marked with the required execution level. Unmarked installers are subject to compatibility mode. Workarounds of this mode include automatically moving any shortcuts created in the user's start menu to all users' start menu. Installers that need not install anything into system folders or write to the local machine registry (HKLM) should specify \e{user} execution level.
-
-More information about this topic can be found at MSDN. Keywords include "UAC", "requested execution level", "vista manifest" and "vista security".
-
-\S2{asetfont} SetFont
-
-\c [/LANG=lang_id] font_face_name font_size
-
-Sets the installer font. Please remember that the font you choose must be present on the user's machine as well. Don't use rare fonts that only you have.
-
-Use the /LANG switch if you wish to set a different font for each language. For example:
-
-\c SetFont /LANG=${LANG_ENGLISH} "English Font" 9
-\c SetFont /LANG=${LANG_FRENCH} "French Font" 10
-
-There are two \R{langstring}{LangString}s named ^Font and ^FontSize which contain the font and font size for every language.
-
-\S2{ashowinstdetails} ShowInstDetails
-
-\c \\<b\\>hide\\</b\\>|show|nevershow
-
-Sets whether or not the details of the install are shown. Can be 'hide' to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. Note that sections can override this using SetDetailsView.
-
-\S2{ashowuninstdetails} ShowUninstDetails
-
-\c \\<b\\>hide\\</b\\>|show|nevershow
-
-Sets whether or not the details of the uninstall are shown. Can be 'hide' to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. Note that sections can override this using SetDetailsView.
-
-\S2{asilentinstall} SilentInstall
-
-\c \\<b\\>normal\\</b\\>|silent|silentlog
-
-Specifies whether or not the installer should be silent. If it is 'silent' or 'silentlog', all sections that have the SF_SELECTED flag are installed quietly (you can set this flag using \R{sectionsetflags}{SectionSetFlags}), with no screen output from the installer itself (the script can still display whatever it wants, use \R{messagebox}{MessageBox}'s /SD to specify a default for silent installers). Note that if this is set to 'normal' and the user runs the installer with /S (case sensitive) on the command line, it will behave as if SilentInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
-
-See \k{silent} for more information.
-
-\S2{asilentuninstall} SilentUnInstall
-
-\c \\<b\\>normal\\</b\\>|silent
-
-Specifies whether or not the uninstaller should be silent. If it is 'silent' or 'silentlog', the uninstall section will run quietly, with no screen output from the uninstaller itself (the script can still display whatever it wants, use \R{messagebox}{MessageBox}'s /SD to specify a default for silent installers). Note that if this is set to 'normal' and the user runs the uninstaller with /S on the command line, it will behave as if SilentUnInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
-
-See \k{silent} for more information.
-
-\S2{aspacetexts} SpaceTexts
-
-\c [req text [avail text]]
-
-If parameters are specified, overrides the space required and space available text ("Space required: " and "Space available: " by default). If 'none' is specified as the required text no space texts will be shown.
-
-Accepts variables. If variables are used, they must be initialized before the components page is created.
-
-\S2{asubcaption} SubCaption
-
-\c [page_number subcaption]
-
-Overrides the subcaptions for each of the installer pages (0=": License Agreement",1=": Installation Options",2=": Installation Directory", 3=": Installing Files", 4=": Completed"). If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
-
-You can also set a subcaption (or override the default) using \R{acaption}{Caption} inside a \R{pageex}{PageEx} block.
-
-Accepts variables. If variables are used, they must be initialized before the relevant page is created.
-
-\S2{auninstallbuttontext} UninstallButtonText
-
-\c text
-
-Changes the text of the button that by default says "Uninstall" in the uninstaller. If no parameter is specified, the default text is used. See also \R{writeuninstaller}{WriteUninstaller} (replaces UninstallEXEName).
-
-Accepts variables. If variables are used, they must be initialized before the uninstall button shows.
-
-\S2{auninstallcaption} UninstallCaption
-
-\c caption
-
-Sets what the titlebars of the uninstaller will display. By default, it is 'Name Uninstall', where Name is specified with the Name command. You can, however, override it with 'MyApp uninstaller' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
-
-Accepts variables. If variables are used, they must be initialized in \R{unonInit}{un.onInit}.
-
-\S2{auninstallicon} UninstallIcon
-
-\c [path\]icon.ico
-
-Sets the icon of the uninstaller. This icon file \e{must} have the exact same structure as the installer icon file. See \R{aicon}{Icon} for more information about this limit.
-
-\S2{auninstallsubcaption} UninstallSubCaption
-
-\c page_number subcaption
-
-Sets the default subcaptions for the uninstaller pages (0=": Confirmation",1=": Uninstalling Files",2=": Completed"). If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
-
-You can also set a subcaption (or override the default) using \R{acaption}{Caption} inside a \R{pageex}{PageEx} block.
-
-Accepts variables. If variables are used, they must be initialized before the relevant page is created.
-
-\S2{auninstalltext} UninstallText
-
-\c text [subtext]
-
-Specifies the texts on the uninstaller confirm page.
-
-text: Text above the controls
-
-subtext: Text next to the uninstall location
-
-Accepts variables. If variables are used, they must be initialized before the uninstaller confirm page is created.
-
-\S2{awindowicon} WindowIcon
-
-\c \\<b\\>on\\</b\\>|off
-
-Sets whether or not the installer's icon is being displayed.
-
-\S2{axpstyle} XPStyle
-
-\c on|\\<b\\>off\\</b\\>
-
-Sets whether or not an XP manifest will be added to the installer. An XP manifest makes the installer controls use the new XP style when running on Windows XP. This affects the uninstaller too.
+\H{instattribs} Installer Attributes
+
+\S1{attribgen} General Attributes
+
+The commands below all adjust attributes of the installer. These attributes control how the installer looks and functions, including which pages are present in the installer, as what text is displayed in each part of each page, how the installer is named, what icon the installer uses, the default installation directory, what file it writes out, and more. Note that these attributes can be set anywhere in the file except in a Section or Function.
+
+\\<b\\>\\<u\\>Defaults are bold and underlined\\</u\\>\\</b\\>
+
+\S2{aaddbrandingimage} AddBrandingImage
+
+\c (left|right|top|bottom) (width|height) [padding]
+
+Adds a branding image on the top, bottom, left, or right of the installer. Its size will be set according to the width/height specified, the installer width/height and the installer font. The final size will not always be what you requested; have a look at the output of the command for the actual size. Because this depends on the installer font, you should use SetFont before AddBrandingImage. The default padding value is 2.
+
+AddBrandingImage only adds a placeholder for an image. To set the image itself on runtime, use \R{setbrandingimage}{SetBrandingImage}.
+
+\c AddBrandingImage left 100
+\c AddBrandingImage right 50
+\c AddBrandingImage top 20
+\c AddBrandingImage bottom 35
+\c AddBrandingImage left 100 5
+
+\S2{aallowrootdirinstall} AllowRootDirInstall
+
+\c true|\\<b\\>false\\</b\\>
+
+Controls whether or not installs are enabled to the root directory of a drive, or directly into a network share. Set to 'true' to change the safe behavior, which prevents users from selecting C:\\ or \\\\Server\\Share as an install (and later on, uninstall) directory. For additional directory selection page customizability, see \R{onverifyinstdir}{.onVerifyInstDir}.
+
+\S2{aautoclosewindow} AutoCloseWindow
+
+\c true|\\<b\\>false\\</b\\>
+
+Sets whether or not the install window automatically closes when completed. This is overrideable from a section using \R{setautoclose}{SetAutoClose}.
+
+\S2{abgfont} BGFont
+
+\c [font_face [height [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]]]
+
+Specifies the font used to show the text on the background gradient. To set the color use \R{abggradient}{BGGradient}. If no parameters are specified, the default font will be used. The default font is bold and italic Times New Roman.
+
+\S2{abggradient} BGGradient
+
+\c [\\<b\\>off\\</b\\>|(topc botc [textcolor|notext])]
+
+Specifies whether or not to use a gradient background window. If 'off', the installer will not show a background window, if no parameters are specified, the default black to blue gradient is used, and otherwise the top_color or bottom_color are used to make a gradient. Top_color and bottom_color are specified using the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). 'textcolor' can be specified as well, or 'notext' can be specified to turn the big background text off.
+
+\S2{abrandingtext} BrandingText
+
+\c /TRIM(LEFT|RIGHT|CENTER) text
+
+Sets the text that is shown (by default it is 'Nullsoft Install System vX.XX') at the bottom of the install window. Setting this to an empty string ("") uses the default; to set the string to blank, use " " (a space). If it doesn't matter to you, leave it the default so that everybody can know why the installer didn't suck. heh. Use /TRIMLEFT, /TRIMRIGHT or /TRIMCENTER to trim down the size of the control to the size of the string.
+
+Accepts variables. If variables are used, they must be initialized on \R{oninit}{.onInit}.
+
+\S2{acaption} Caption
+
+\c caption
+
+When used outside a \R{pageex}{PageEx} block: Sets the text for the titlebar of the installer. the By default, it is 'Name Setup', where Name is specified with the \R{aname}{Name} instruction. You can, however, override it with 'MyApp Installer' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
+
+When used inside a \R{pageex}{PageEx} block: Sets the subcaption of the current page.
+
+Accepts variables. If variables are used, they must be initialized on \R{oninit}{.onInit}.
+
+\S2{achangeui} ChangeUI
+
+\c dialog ui_file.exe
+
+Replaces dialog (\e{IDD_LICENSE}, \e{IDD_DIR}, \e{IDD_SELCOM}, \e{IDD_INST}, \e{IDD_INSTFILES}, \e{IDD_UNINST} or \e{IDD_VERIFY}) by a dialog with the same resource ID in ui_file.exe. You can also specify 'all' as the dialog if you wish to replace all 7 of the dialogs at once from the same UI file. For some example UIs look at Contrib\\UIs under your NSIS directory.
+
+\b \e{IDD_LICENSE} must contain \e{IDC_EDIT1} (RICHEDIT control).
+
+\b \e{IDD_DIR} must contain \e{IDC_DIR} (edit box), \e{IDC_BROWSE} (button) and \e{IDC_CHECK1} (checkbox).
+
+\b \e{IDD_SELCOM} must contain \e{IDC_TREE1} (SysTreeView32 control), and \e{IDC_COMBO1} (combo box).
+
+\b \e{IDD_INST} must contain \e{IDC_BACK} (button), \e{IDC_CHILDRECT} (static control the size of all other dialogs), \e{IDC_VERSTR} (static), \e{IDOK} (button), and \e{IDCANCEL} (button). If an image control (static with \e{SS_BITMAP} style) will be found in this dialog it will be used as the default for \R{setbrandingimage}{SetBrandingImage}.
+
+\b \e{IDD_INSTFILES} must contain \e{IDC_LIST1} (SysListView32 control), \e{IDC_PROGRESS} (msctls_progress32 control), and \e{IDC_SHOWDETAILS} (button).
+
+\b \e{IDD_UNINST} must contain \e{IDC_EDIT1} (edit box).
+
+\b \e{IDD_VERIFY} must contain \e{IDC_STR} (static).
+
+\c ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe"
+
+\S2{acheckbitmap} CheckBitmap
+
+\c bitmap.bmp
+
+Specifies the bitmap with the images used for the checks of the component-selection page treeview.
+
+This bitmap should have a size of 96x16 pixels, no more than 8bpp (256 colors) and contain six 16x16 images for the different states (in order: selection mask, not checked, checked, greyed out, unchecked & read-only, checked & read-only). Use magenta as mask color (this area will be transparent).
+
+\S2{acompletedtext} CompletedText
+
+\c text
+
+Replaces the default text ("Completed") that is printed at the end of the install if parameter is specified. Otherwise, the default is used.
+
+Accepts variables. If variables are used, they must be initialized before the message is printed.
+
+\S2{acomponenttext} ComponentText
+
+\c [text [subtext] [subtext2]]
+
+Used to change the default text on the component page.
+
+text: Text above the controls, to the right of the installation icon.
+
+subtext: Text next to the installation type selection.
+
+subtext2: Text to the left of the components list and below the installation type.
+
+The default string will be used if a string is empty ("").
+
+Accepts variables. If variables are used, they must be initialized before the components page is created.
+
+\S2{acrccheck} CRCCheck
+
+\c \\<b\\>on\\</b\\>|off|force
+
+Specifies whether or not the installer will perform a CRC on itself before allowing an install. Note that if the user uses /NCRC on the command line when executing the installer, and you didn't specify 'force', the CRC will not occur, and the user will be allowed to install a (potentially) corrupted installer.
+
+\S2{adetailsbuttontext} DetailsButtonText
+
+\c show details text
+
+Replaces the default details button text of "Show details", if parameter is specified (otherwise the default is used).
+
+Accepts variables. If variables are used, they must be initialized before the install log (instfiles) page is created.
+
+\S2{adirtext} DirText
+
+\c [text] [subtext] [browse_button_text] [browse_dlg_text]
+
+Used to change the default text on the directory page.
+
+text: Text above the controls, to the right of the installation icon.
+
+subtext: Text on the directory selection frame.
+
+browse_button_text: Text on the Browse button.
+
+browse_dlg_text: Text on the "Browse For Folder" dialog, appears after clicking on "Browse" button.
+
+The default string will be used if a string is empty ("").
+
+Accepts variables. If variables are used, they must be initialized before the directory page is created.
+
+\S2{adirvar} DirVar
+
+\c user_var(dir input/output)
+
+Specifies which variable is to be used to contain the directory selected. This variable should contain the default value too. This allows to easily create two different directory pages that will not require you to move values in and out of $INSTDIR. The default variable is $INSTDIR. This can only be used in \R{pageex}{PageEx} and for directory and uninstConfirm pages.
+
+\c Var ANOTHER_DIR
+\c PageEx directory
+\c DirVar $ANOTHER_DIR
+\c PageExEnd
+\c
+\c Section
+\c SetOutPath $INSTDIR
+\c File "a file.dat"
+\c SetOutPath $ANOTHER_DIR
+\c File "another file.dat"
+\c SectionEnd
+
+\S2{adirverify} DirVerify
+
+\c \\<b\\>auto\\</b\\>|leave
+
+If `DirVerify leave' is used, the Next button will not be disabled if the installation directory is not valid or there is not enough space. A flag that you can read in the leave function using \R{getinstdirerror}{GetInstDirError} will be set instead.
+
+\c PageEx directory
+\c DirVerify leave
+\c PageCallbacks "" "" dirLeave
+\c PageExEnd
+
+\S2{a} FileErrorText
+
+\c file error text
+
+Replaces the default text that comes up when a file cannot be written to. This string can contain a reference to $0, which is the filename ($0 is temporarily changed to this value). Example: "Can not write to file $\\r$\\n$0$\\r$\\ngood luck, bitch.".
+
+Accepts variables. If variables are used, they must be initialized before \R{file}{File} is used.
+
+\S2{aicon} Icon
+
+\c [path\]icon.ico
+
+Sets the icon of the installer. Every icon in the icon file will be included in the installer. Use \R{auninstallicon}{UninstallIcon} to set the uninstaller icon.
+
+\S2{ainstallbuttontext} InstallButtonText
+
+\c install button text
+
+If parameter is specified, overrides the default install button text (of "Install") with the specified text.
+
+Accepts variables. If variables are used, they must be initialized before the install button shows.
+
+\S2{ainstallcolors} InstallColors
+
+\c /windows | (foreground_color background_color)
+
+Sets the colors to use for the install info screen (the default is 00FF00 000000. Use the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Note that if "/windows" is specified as the only parameter, the default windows colors will be used.
+
+\S2{ainstalldir} InstallDir
+
+\c definstdir
+
+Sets the default installation directory. See the \R{variables}{variables section} for variables that can be used to make this string (especially $PROGRAMFILES). Note that the part of this string following the last \\ will be used if the user selects 'browse', and may be appended back on to the string at install time (to disable this, end the directory with a \\ (which will require the entire parameter to be enclosed with quotes). If this doesn't make any sense, play around with the browse button a bit.
+
+\S2{ainstalldirregkey} InstallDirRegKey
+
+\c root_key subkey key_name
+
+This attribute tells the installer to check a string in the registry, and use it for the install dir if that string is valid. If this attribute is present, it will override the InstallDir attribute if the registry key is valid, otherwise it will fall back to the InstallDir default. When querying the registry, this command will automatically remove any quotes. If the string ends in ".exe", it will automatically remove the filename component of the string (i.e. if the string is "C:\\program files\\poop\\poop.exe", it will know to use "C:\\program files\\poop"). For more advanced install directory configuration, set $INSTDIR in .onInit.
+
+Language strings and variables cannot be used with InstallDirRegKey.
+
+\c InstallDirRegKey HKLM Software\NSIS ""
+\c InstallDirRegKey HKLM Software\ACME\Thingy InstallLocation
+
+\S2{ainstprogressflags} InstProgressFlags
+
+\c [flag [...]]
+
+Valid values for flag are "smooth" (smooth the progress bar) or "colored" (color the progress bar with the colors set by InstallColors. Examples: "InstProgressFlags" (default old-school windows look), "InstProgressFlags smooth" (new smooth look), "InstProgressFlags smooth colored" (colored smooth look whee). Note: neither "smooth" or "colored" work with \R{axpstyle}{XPStyle} on when the installer runs on Windows XP with a modern theme.
+
+\S2{ainsttype} InstType
+
+\c install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM
+
+Adds an install type to the install type list, or disables the custom install type. There can be as many as 32 types, each one specifying the name of the install type. If the name is prefixed with 'un.' it is an uninstaller install type. The name can contain variables which will be processed at runtime before the components page shows. Another way of changing the InstType name during runtime is the \R{sinsttypesettext}{InstTypeSetText} command. The difference is that with \R{sinsttypesettext}{InstTypeSetText} you are saving your precious user variables. The first type is the default (generally 'Typical'). If the /NOCUSTOM switch is specified, then the "custom" install type is disabled, and the user has to choose one of the pre-defined install types. Alternatively, if the /CUSTOMSTRING switch is specified, the parameter will override the "Custom" install type text. Alternatively, if the /COMPONENTSONLYONCUSTOM flag is specified, the component list will only be shown if the "Custom" install type is selected.
+
+Accepts variables for type names. If variables are used, they must be initialized before the components page is created.
+
+\S2{alicensebkcolor} LicenseBkColor
+
+\c color | \\<b\\>/gray\\</b\\> | /windows
+
+Sets the background color of the license data. Color is specified using the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Default is '/gray'. You can also use the Windows OS defined color by using '/windows'.
+
+\S2{alicensedata} LicenseData
+
+\c licdata.(txt|rtf)
+
+Specifies a text file or a RTF file to use for the license that the user can read. Omit this to not have a license displayed. Note that the file must be in the evil DOS text format (\\r\\n, yeah!). To define a multilingual license data use \R{licenselangstring}{LicenseLangString}.
+
+If you make your license file a RTF file it is recommended you edit it with WordPad and not MS Word. Using WordPad will result in a much smaller file.
+
+Use \R{licenselangstring}{LicenseLangString} to show a different license for every language.
+
+\S2{alicenseforceselection} LicenseForceSelection
+
+\c (checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | \\<b\\>off\\</b\\>)
+
+Specifies if the displayed license must be accept explicit or not. This can be done either by a checkbox or by radiobuttons. By default the "next button" is disabled and will only be enabled if the checkbox is enabled or the right radio button is selected. If off is specified the "next button" is enabled by default.
+
+\c LicenseForceSelection checkbox
+\c LicenseForceSelection checkbox "i accept"
+\c LicenseForceSelection radiobuttons
+\c LicenseForceSelection radiobuttons "i accept"
+\c LicenseForceSelection radiobuttons "i accept" "i decline"
+\c LicenseForceSelection radiobuttons "" "i decline"
+\c LicenseForceSelection off
+
+\S2{alicensetext} LicenseText
+
+\c [text [button_text]]
+
+Used to change the default text on the license page.
+
+text: Text above the controls, to the right of the installation icon.
+
+button_text: Text on the "I Agree" button.
+
+The default string will be used if a string is empty ("").
+
+Accepts variables. If variables are used, they must be initialized before the license page is created.
+
+\S2{amiscbuttontext} MiscButtonText
+
+\c [back button text [next button text] [cancel button text] [close button text]]
+
+Replaces the default text strings for the four buttons (< Back, Next >, Cancel and Close). If parameters are omitted, the defaults are used.
+
+Accepts variables. If variables are used, they must be initialized in \R{oninit}{.onInit}.
+
+\S2{aname} Name
+
+\c name [name_doubled_ampersands]
+
+Sets the name of the installer. The name is usually simply the product name such as 'MyApp' or 'CrapSoft MyApp'. If you have one or more ampersands (&) in the name, set the second parameter to the same name, only with doubled ampersands. For example, if your product's name is "Foo & Bar", use:
+
+\c Name "Foo & Bar" "Foo && Bar"
+
+If you have ampersands in the name and use a \R{langstring}{LangString} for the name, you will have to create another one with doubled ampersands to use as the second parameter.
+
+Accepts variables. If variables are used, they must be initialized in \R{oninit}{.onInit}.
+
+\S2{aoutfile} OutFile
+
+\c [path\]install.exe
+
+Specifies the output file that the MakeNSIS should write the installer to. This is just the file that MakeNSIS writes, it doesn't affect the contents of the installer.
+
+\S2{requestexecutionlevel} RequestExecutionLevel
+
+\c \\<b\\>none\\</b\\>|user|highest|admin
+
+Specifies the requested execution level for Windows Vista. The value is embedded in the installer and uninstaller's XML manifest and tells Vista, and probably future versions of Windows, what privileges level the installer requires. \e{user} requests the a normal user's level with no administrative privileges. \e{highest} will request the highest execution level available for the current user and will cause Windows to prompt the user to verify privilege escalation. The prompt might request for the user's password. \e{admin} requests administrator level and will cause Windows to prompt the user as well. Specifying \e{none}, which is also the default, will keep the manifest empty and let Windows decide which execution level is required. Windows Vista automatically identifies NSIS installers and decides administrator privileges are required. Because of this, \e{none} and \e{admin} have virtually the same effect.
+
+It's recommended, at least by Microsoft, that every application will be marked with the required execution level. Unmarked installers are subject to compatibility mode. Workarounds of this mode include automatically moving any shortcuts created in the user's start menu to all users' start menu. Installers that need not install anything into system folders or write to the local machine registry (HKLM) should specify \e{user} execution level.
+
+More information about this topic can be found at MSDN. Keywords include "UAC", "requested execution level", "vista manifest" and "vista security".
+
+\S2{asetfont} SetFont
+
+\c [/LANG=lang_id] font_face_name font_size
+
+Sets the installer font. Please remember that the font you choose must be present on the user's machine as well. Don't use rare fonts that only you have.
+
+Use the /LANG switch if you wish to set a different font for each language. For example:
+
+\c SetFont /LANG=${LANG_ENGLISH} "English Font" 9
+\c SetFont /LANG=${LANG_FRENCH} "French Font" 10
+
+There are two \R{langstring}{LangString}s named ^Font and ^FontSize which contain the font and font size for every language.
+
+\S2{ashowinstdetails} ShowInstDetails
+
+\c \\<b\\>hide\\</b\\>|show|nevershow
+
+Sets whether or not the details of the install are shown. Can be 'hide' to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. Note that sections can override this using SetDetailsView.
+
+\S2{ashowuninstdetails} ShowUninstDetails
+
+\c \\<b\\>hide\\</b\\>|show|nevershow
+
+Sets whether or not the details of the uninstall are shown. Can be 'hide' to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them. Note that sections can override this using SetDetailsView.
+
+\S2{asilentinstall} SilentInstall
+
+\c \\<b\\>normal\\</b\\>|silent|silentlog
+
+Specifies whether or not the installer should be silent. If it is 'silent' or 'silentlog', all sections that have the SF_SELECTED flag are installed quietly (you can set this flag using \R{sectionsetflags}{SectionSetFlags}), with no screen output from the installer itself (the script can still display whatever it wants, use \R{messagebox}{MessageBox}'s /SD to specify a default for silent installers). Note that if this is set to 'normal' and the user runs the installer with /S (case sensitive) on the command line, it will behave as if SilentInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
+
+See \k{silent} for more information.
+
+\S2{asilentuninstall} SilentUnInstall
+
+\c \\<b\\>normal\\</b\\>|silent
+
+Specifies whether or not the uninstaller should be silent. If it is 'silent' or 'silentlog', the uninstall section will run quietly, with no screen output from the uninstaller itself (the script can still display whatever it wants, use \R{messagebox}{MessageBox}'s /SD to specify a default for silent installers). Note that if this is set to 'normal' and the user runs the uninstaller with /S on the command line, it will behave as if SilentUnInstall 'silent' was used. Note: see also \R{logset}{LogSet}.
+
+See \k{silent} for more information.
+
+\S2{aspacetexts} SpaceTexts
+
+\c [req text [avail text]]
+
+If parameters are specified, overrides the space required and space available text ("Space required: " and "Space available: " by default). If 'none' is specified as the required text no space texts will be shown.
+
+Accepts variables. If variables are used, they must be initialized before the components page is created.
+
+\S2{asubcaption} SubCaption
+
+\c [page_number subcaption]
+
+Overrides the subcaptions for each of the installer pages (0=": License Agreement",1=": Installation Options",2=": Installation Directory", 3=": Installing Files", 4=": Completed"). If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
+
+You can also set a subcaption (or override the default) using \R{acaption}{Caption} inside a \R{pageex}{PageEx} block.
+
+Accepts variables. If variables are used, they must be initialized before the relevant page is created.
+
+\S2{auninstallbuttontext} UninstallButtonText
+
+\c text
+
+Changes the text of the button that by default says "Uninstall" in the uninstaller. If no parameter is specified, the default text is used. See also \R{writeuninstaller}{WriteUninstaller} (replaces UninstallEXEName).
+
+Accepts variables. If variables are used, they must be initialized before the uninstall button shows.
+
+\S2{auninstallcaption} UninstallCaption
+
+\c caption
+
+Sets what the titlebars of the uninstaller will display. By default, it is 'Name Uninstall', where Name is specified with the Name command. You can, however, override it with 'MyApp uninstaller' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
+
+Accepts variables. If variables are used, they must be initialized in \R{unonInit}{un.onInit}.
+
+\S2{auninstallicon} UninstallIcon
+
+\c [path\]icon.ico
+
+Sets the icon of the uninstaller.
+
+\S2{auninstallsubcaption} UninstallSubCaption
+
+\c page_number subcaption
+
+Sets the default subcaptions for the uninstaller pages (0=": Confirmation",1=": Uninstalling Files",2=": Completed"). If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string).
+
+You can also set a subcaption (or override the default) using \R{acaption}{Caption} inside a \R{pageex}{PageEx} block.
+
+Accepts variables. If variables are used, they must be initialized before the relevant page is created.
+
+\S2{auninstalltext} UninstallText
+
+\c text [subtext]
+
+Specifies the texts on the uninstaller confirm page.
+
+text: Text above the controls
+
+subtext: Text next to the uninstall location
+
+Accepts variables. If variables are used, they must be initialized before the uninstaller confirm page is created.
+
+\S2{awindowicon} WindowIcon
+
+\c \\<b\\>on\\</b\\>|off
+
+Sets whether or not the installer's icon is being displayed.
+
+\S2{axpstyle} XPStyle
+
+\c on|\\<b\\>off\\</b\\>
+
+Sets whether or not an XP manifest will be added to the installer. An XP manifest makes the installer controls use the new XP style when running on Windows XP. This affects the uninstaller too.
diff --git a/Docs/src/basic.but b/Docs/src/basic.but
index a5d2df8..2b561cf 100755
--- a/Docs/src/basic.but
+++ b/Docs/src/basic.but
@@ -1,149 +1,149 @@
-\H{instr} Instructions
-
-\S1{basicinstructions} Basic Instructions
-
-The instructions that NSIS uses for scripting are sort of a cross between PHP and assembly. There are no real high level language constructs, but the instructions themselves are (for the most part) high level, and you have handy string capability (i.e. you don't have to worry about concatenating strings, etc). You essentially have 25 registers (20 general purpose, 5 special purpose), and a stack.
-
-\S2{delete} Delete
-
-\c [/REBOOTOK] file
-
-Delete file (which can be a file or wildcard, but should be specified with a full path) from the target system. If /REBOOTOK is specified and the file cannot be deleted then the file is deleted when the system reboots -- if the file will be deleted on a reboot, the reboot flag will be set. The error flag is set if files are found and cannot be deleted. The error flag is not set from trying to delete a file that does not exist.
-
-\c Delete $INSTDIR\somefile.dat
-
-\S2{exec} Exec
-
-\c command
-
-Execute the specified program and continue immediately. Note that the file specified must exist on the target system, not the compiling system. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched. Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: Exec '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
-
-\c Exec '"$INSTDIR\someprogram.exe"'
-\c Exec '"$INSTDIR\someprogram.exe" some parameters'
-
-\S2{execshell} ExecShell
-
-\c action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED | SW_HIDE]
-
-Execute the specified program using ShellExecute. Note that action is usually "open", "print", etc, but can be an empty string to use the default action. Parameters and the show type are optional. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched.
-
-\c ExecShell "open" "http://nsis.sf.net/"
-\c ExecShell "open" "$INSTDIR\readme.txt"
-\c ExecShell "print" "$INSTDIR\readme.txt"
-
-\S2{execwait} ExecWait
-
-\c command [user_var(exit code)]
-
-Execute the specified program and wait for the executed process to quit. See Exec for more information. If no output variable is specified ExecWait sets the error flag if the program executed returns a nonzero error code, or if there is an error. If an output variable is specified, ExecWait sets the variable with the exit code (and only sets the error flag if an error occurs; if an error occurs the contents of the user variable are undefined). Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: ExecWait '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
-
-\c ExecWait '"$INSTDIR\someprogram.exe"'
-\c ExecWait '"$INSTDIR\someprogram.exe"' $0
-\c DetailPrint "some program returned $0"
-
-\S2{file} File
-
-\c [/nonfatal] [/a] ([/r] [/x file|wildcard [...]] (file|wildcard) [...] | /oname=file.dat infile.dat)
-
-Adds file(s) to be extracted to the current output path ($OUTDIR).
-
-\b Note that the output file name is $OUTDIR\\filename_portion_of_file.
-
-\b If the /oname=X switch is used, the output name becomes $OUTDIR\\X. When using the /oname= switch, only one file can be specified, and the file name can contain variables (or a fully qualified path, e.g. $SYSDIR\\whatever.dll). If the output name contains spaces, quote the entire parameter, including /oname, as shown in the examples below.
-
-\b Wildcards are supported.
-
-\b If the /r switch is used, matching files and directories are recursively searched for in subdirectories. If just one path segment is specified (e.g. \c{File /r something}), the current directory will be recursively searched. If more than one segment is specified (e.g. \c{File /r something\\*.*}), the last path segment will be used as the matching condition and the rest for the directory to search recursively. If a directory name matches, all of its contents is added recursively. Directory structure is preserved.
-
-\b Use the /x switch to exclude files or directories.
-
-\b If the /a switch is used, the attributes of the file(s) added will be preserved.
-
-\b The File command sets the error flag if overwrite mode is set to 'try' and the file could not be overwritten, or if the overwrite mode is set to 'on' and the file could not be overwritten and the user selects ignore.
-
-\b If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
-
-\c File something.exe
-\c File /a something.exe
-\c File *.exe
-\c File /r *.dat
-\c File /r data
-\c File /oname=$TEMP\temp.dat somefile.ext
-\c File "/oname=$TEMP\name with spaces.dat" somefile.ext
-\c File /nonfatal "a file that might not exist"
-\c File /r /x CVS myproject\*.*
-\c File /r /x *.res /x *.obj /x *.pch source\*.*
-
-\\<b\\>Note:\\</b\\> when using the \e{/r} switch, both matching directories and files will be searched. This is always done with or without the use of wildcards, even if the given path perfectly matches one directory. That means, the following directory structure:
-
-\c <DIR> something
-\c file.dat
-\c another.dat
-\c <DIR> dir
-\c something
-\c <DIR> dir2
-\c file2.dat
-\c <DIR> another
-\c <DIR> something
-\c readme.txt
-
-with the following \e{File} usage:
-
-\c File /r something
-
-will match the directory named \e{something} on the root directory, the file named \e{something} in the directory named \e{dir} and the directory named \e{something} in the directory named \e{another}. To match only the directory named \e{something} on the root directory, use the following:
-
-\c File /r something\*.*
-
-When adding \e{\\*.*}, it will be used as the matching condition and \e{something} will be used as the directory to search. When only \e{something} is specified, the current directory will be recursively searched for every and directory named \e{something} and \e{another\\something} will be matched.
-
-\S2{rename} Rename
-
-\c [/REBOOTOK] source_file dest_file
-
-Rename source_file to dest_file. You can use it to move a file from anywhere on the system to anywhere else and you can move a directory to somewhere else on the same drive. The destination file must not exist or the move will fail (unless you are using /REBOOTOK). If /REBOOTOK is specified, and the file cannot be moved (if, for example, the destination exists), then the file is moved when the system reboots. If the file will be moved on a reboot, the reboot flag will be set. The error flag is set if the file cannot be renamed (and /REBOOTOK is not used) or if the source file does not exist.
-
-If no absolute path is specified the current folder will be used. The current folder is the folder set using the last \R{setoutpath}{SetOutPath} instruction. If you have not used \R{setoutpath}{SetOutPath} the current folder is \R{varother}{$EXEDIR}.
-
-\c Rename $INSTDIR\file.ext $INSTDIR\file.dat
-
-\S2{reservefile} ReserveFile
-
-\c [/nonfatal] [/r] [/x file|wildcard [...]] file [file...]
-
-Reserves a file in the data block for later use. Files are added to the compressed data block in the order they appear in the script. Functions, however, are not necessarily called in the order they appear in the script. Therefore, if you add a file in a function called early but put the function at the end of the script, all of the files added earlier will have to be decompressed to get to the required file. This process can take a long time if there a lot of files. \R{oninit}{.onInit} is one such function. It is called at the very beginning, before anything else appears. If you put it at the very end of the script, extract some files in it and have lots of files added before it, the installer might take a very long time to load. This is where this command comes useful, allowing you to speed up the loading process by including the file at the top of the data block instead of letting NSIS seek all the way down to the bottom of the \e{compressed} data block.
-
-See \R{file}{File} for more information about the parameters.
-
-\S2{rmdir} RMDir
-
-\c [/r] [/REBOOTOK] directory_name
-
-Remove the specified directory (fully qualified path with no wildcards). Without /r, the directory will only be removed if it is completely empty. If /r is specified, the directory will be removed recursively, so all directories and files in the specified directory will be removed. If /REBOOTOK is specified, any file or directory which could not have been removed during the process will be removed on reboot -- if any file or directory will be removed on a reboot, the reboot flag will be set. The error flag is set if any file or directory cannot be removed.
-
-\c RMDir $INSTDIR
-\c RMDir $INSTDIR\data
-\c RMDir /r /REBOOTOK $INSTDIR
-\c RMDir /REBOOTOK $INSTDIR\DLLs
-
-Note that the current working directory can not be deleted. The current working directory is set by \R{setoutpath}{SetOutPath}. For example, the following example will not delete the directory.
-
-\c SetOutPath $TEMP\dir
-\c RMDir $TEMP\dir
-
-The next example will succeed in deleting the directory.
-
-\c SetOutPath $TEMP\dir
-\c SetOutPath $TEMP
-\c RMDir $TEMP\dir
-
-\\<b\\>Warning:\\</b\\> using \e{RMDir /r $INSTDIR} in the uninstaller is not safe. Though it is unlikely, the user might select to install to the Program Files folder and so this command will wipe out the entire Program Files folder, including other programs that has nothing to do with the uninstaller. The user can also put other files but the program's files and would expect them to get deleted with the program. Solutions are \W{http://nsis.sourceforge.net/Uninstall_only_installed_files}{available} for easily uninstalling only files which were installed by the installer.
-
-\S2{setoutpath} SetOutPath
-
-\c outpath
-
-Sets the output path ($OUTDIR) and creates it (recursively if necessary), if it does not exist. Must be a full pathname, usually is just $INSTDIR (you can specify $INSTDIR if you are lazy with a single "-").
-
-\c SetOutPath $INSTDIR
-\c File program.exe
+\H{instr} Instructions
+
+\S1{basicinstructions} Basic Instructions
+
+The instructions that NSIS uses for scripting are sort of a cross between PHP and assembly. There are no real high level language constructs, but the instructions themselves are (for the most part) high level, and you have handy string capability (i.e. you don't have to worry about concatenating strings, etc). You essentially have 25 registers (20 general purpose, 5 special purpose), and a stack.
+
+\S2{delete} Delete
+
+\c [/REBOOTOK] file
+
+Delete file (which can be a file or wildcard, but should be specified with a full path) from the target system. If /REBOOTOK is specified and the file cannot be deleted then the file is deleted when the system reboots -- if the file will be deleted on a reboot, the reboot flag will be set. The error flag is set if files are found and cannot be deleted. The error flag is not set from trying to delete a file that does not exist.
+
+\c Delete $INSTDIR\somefile.dat
+
+\S2{exec} Exec
+
+\c command
+
+Execute the specified program and continue immediately. Note that the file specified must exist on the target system, not the compiling system. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched. Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: Exec '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
+
+\c Exec '"$INSTDIR\someprogram.exe"'
+\c Exec '"$INSTDIR\someprogram.exe" some parameters'
+
+\S2{execshell} ExecShell
+
+\c action command [parameters] [SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED | SW_HIDE]
+
+Execute the specified program using ShellExecute. Note that action is usually "open", "print", etc, but can be an empty string to use the default action. Parameters and the show type are optional. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched.
+
+\c ExecShell "open" "http://nsis.sf.net/"
+\c ExecShell "open" "$INSTDIR\readme.txt"
+\c ExecShell "print" "$INSTDIR\readme.txt"
+
+\S2{execwait} ExecWait
+
+\c command [user_var(exit code)]
+
+Execute the specified program and wait for the executed process to quit. See Exec for more information. If no output variable is specified ExecWait sets the error flag if the program executed returns a nonzero error code, or if there is an error. If an output variable is specified, ExecWait sets the variable with the exit code (and only sets the error flag if an error occurs; if an error occurs the contents of the user variable are undefined). Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: ExecWait '"$INSTDIR\\command.exe" parameters'. If you don't put it in quotes it will \e{not} work on Windows 9x with or without parameters.
+
+\c ExecWait '"$INSTDIR\someprogram.exe"'
+\c ExecWait '"$INSTDIR\someprogram.exe"' $0
+\c DetailPrint "some program returned $0"
+
+\S2{file} File
+
+\c [/nonfatal] [/a] ([/r] [/x file|wildcard [...]] (file|wildcard) [...] | /oname=file.dat infile.dat)
+
+Adds file(s) to be extracted to the current output path ($OUTDIR).
+
+\b Note that the output file name is $OUTDIR\\filename_portion_of_file.
+
+\b If the /oname=X switch is used, the output name becomes $OUTDIR\\X. When using the /oname= switch, only one file can be specified, and the file name can contain variables (or a fully qualified path, e.g. $SYSDIR\\whatever.dll). If the output name contains spaces, quote the entire parameter, including /oname, as shown in the examples below.
+
+\b Wildcards are supported.
+
+\b If the /r switch is used, matching files and directories are recursively searched for in subdirectories. If just one path segment is specified (e.g. \c{File /r something}), the current directory will be recursively searched. If more than one segment is specified (e.g. \c{File /r something\\*.*}), the last path segment will be used as the matching condition and the rest for the directory to search recursively. If a directory name matches, all of its contents is added recursively. Directory structure is preserved.
+
+\b Use the /x switch to exclude files or directories.
+
+\b If the /a switch is used, the attributes of the file(s) added will be preserved.
+
+\b The File command sets the error flag if overwrite mode is set to 'try' and the file could not be overwritten, or if the overwrite mode is set to 'on' and the file could not be overwritten and the user selects ignore.
+
+\b If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
+
+\c File something.exe
+\c File /a something.exe
+\c File *.exe
+\c File /r *.dat
+\c File /r data
+\c File /oname=$TEMP\temp.dat somefile.ext
+\c File "/oname=$TEMP\name with spaces.dat" somefile.ext
+\c File /nonfatal "a file that might not exist"
+\c File /r /x CVS myproject\*.*
+\c File /r /x *.res /x *.obj /x *.pch source\*.*
+
+\\<b\\>Note:\\</b\\> when using the \e{/r} switch, both matching directories and files will be searched. This is always done with or without the use of wildcards, even if the given path perfectly matches one directory. That means, the following directory structure:
+
+\c <DIR> something
+\c file.dat
+\c another.dat
+\c <DIR> dir
+\c something
+\c <DIR> dir2
+\c file2.dat
+\c <DIR> another
+\c <DIR> something
+\c readme.txt
+
+with the following \e{File} usage:
+
+\c File /r something
+
+will match the directory named \e{something} on the root directory, the file named \e{something} in the directory named \e{dir} and the directory named \e{something} in the directory named \e{another}. To match only the directory named \e{something} on the root directory, use the following:
+
+\c File /r something\*.*
+
+When adding \e{\\*.*}, it will be used as the matching condition and \e{something} will be used as the directory to search. When only \e{something} is specified, the current directory will be recursively searched for every and directory named \e{something} and \e{another\\something} will be matched.
+
+\S2{rename} Rename
+
+\c [/REBOOTOK] source_file dest_file
+
+Rename source_file to dest_file. You can use it to move a file from anywhere on the system to anywhere else and you can move a directory to somewhere else on the same drive. The destination file must not exist or the move will fail (unless you are using /REBOOTOK). If /REBOOTOK is specified, and the file cannot be moved (if, for example, the destination exists), then the file is moved when the system reboots. If the file will be moved on a reboot, the reboot flag will be set. The error flag is set if the file cannot be renamed (and /REBOOTOK is not used) or if the source file does not exist.
+
+If no absolute path is specified the current folder will be used. The current folder is the folder set using the last \R{setoutpath}{SetOutPath} instruction. If you have not used \R{setoutpath}{SetOutPath} the current folder is \R{varother}{$EXEDIR}.
+
+\c Rename $INSTDIR\file.ext $INSTDIR\file.dat
+
+\S2{reservefile} ReserveFile
+
+\c [/nonfatal] [/r] [/x file|wildcard [...]] file [file...]
+
+Reserves a file in the data block for later use. Files are added to the compressed data block in the order they appear in the script. Functions, however, are not necessarily called in the order they appear in the script. Therefore, if you add a file in a function called early but put the function at the end of the script, all of the files added earlier will have to be decompressed to get to the required file. This process can take a long time if there a lot of files. \R{oninit}{.onInit} is one such function. It is called at the very beginning, before anything else appears. If you put it at the very end of the script, extract some files in it and have lots of files added before it, the installer might take a very long time to load. This is where this command comes useful, allowing you to speed up the loading process by including the file at the top of the data block instead of letting NSIS seek all the way down to the bottom of the \e{compressed} data block.
+
+See \R{file}{File} for more information about the parameters.
+
+\S2{rmdir} RMDir
+
+\c [/r] [/REBOOTOK] directory_name
+
+Remove the specified directory (fully qualified path with no wildcards). Without /r, the directory will only be removed if it is completely empty. If /r is specified, the directory will be removed recursively, so all directories and files in the specified directory will be removed. If /REBOOTOK is specified, any file or directory which could not have been removed during the process will be removed on reboot -- if any file or directory will be removed on a reboot, the reboot flag will be set. The error flag is set if any file or directory cannot be removed.
+
+\c RMDir $INSTDIR
+\c RMDir $INSTDIR\data
+\c RMDir /r /REBOOTOK $INSTDIR
+\c RMDir /REBOOTOK $INSTDIR\DLLs
+
+Note that the current working directory can not be deleted. The current working directory is set by \R{setoutpath}{SetOutPath}. For example, the following example will not delete the directory.
+
+\c SetOutPath $TEMP\dir
+\c RMDir $TEMP\dir
+
+The next example will succeed in deleting the directory.
+
+\c SetOutPath $TEMP\dir
+\c SetOutPath $TEMP
+\c RMDir $TEMP\dir
+
+\\<b\\>Warning:\\</b\\> using \e{RMDir /r $INSTDIR} in the uninstaller is not safe. Though it is unlikely, the user might select to install to the Program Files folder and so this command will wipe out the entire Program Files folder, including other programs that has nothing to do with the uninstaller. The user can also put other files but the program's files and would expect them to get deleted with the program. Solutions are \W{http://nsis.sourceforge.net/Uninstall_only_installed_files}{available} for easily uninstalling only files which were installed by the installer.
+
+\S2{setoutpath} SetOutPath
+
+\c outpath
+
+Sets the output path ($OUTDIR) and creates it (recursively if necessary), if it does not exist. Must be a full pathname, usually is just $INSTDIR (you can specify $INSTDIR if you are lazy with a single "-").
+
+\c SetOutPath $INSTDIR
+\c File program.exe
diff --git a/Docs/src/bin/halibut/LICENSE b/Docs/src/bin/halibut/LICENSE
index 7a6b724..bb28bf3 100755
--- a/Docs/src/bin/halibut/LICENSE
+++ b/Docs/src/bin/halibut/LICENSE
@@ -1,23 +1,23 @@
-Halibut is copyright (c) 1999-2001 Simon Tatham and James Aylett.
-
-Note: This version is modified by Robert Rainwater and Amir Szekely
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation files
-(the "Software"), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of the Software,
-and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+Halibut is copyright (c) 1999-2001 Simon Tatham and James Aylett.
+
+Note: This version is modified by Robert Rainwater and Amir Szekely
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Docs/src/bin/halibut/SConscript b/Docs/src/bin/halibut/SConscript
index 24ecfcb..5c606ca 100755
--- a/Docs/src/bin/halibut/SConscript
+++ b/Docs/src/bin/halibut/SConscript
@@ -1,26 +1,26 @@
-target = 'halibut'
-
-files = Split("""
- biblio.c
- bk_xhtml.c
- contents.c
- error.c
- help.c
- index.c
- input.c
- keywords.c
- licence.c
- main.c
- malloc.c
- misc.c
- style.c
- tree234.c
- ustring.c
- version.c
-""")
-
-Import('env')
-
-halibut = env.Program(target, files)
-
-Return('halibut')
+target = 'halibut'
+
+files = Split("""
+ biblio.c
+ bk_xhtml.c
+ contents.c
+ error.c
+ help.c
+ index.c
+ input.c
+ keywords.c
+ licence.c
+ main.c
+ malloc.c
+ misc.c
+ style.c
+ tree234.c
+ ustring.c
+ version.c
+""")
+
+Import('env')
+
+halibut = env.Program(target, files)
+
+Return('halibut')
diff --git a/Docs/src/bin/halibut/biblio.c b/Docs/src/bin/halibut/biblio.c
index 0b67105..ff0910c 100755
--- a/Docs/src/bin/halibut/biblio.c
+++ b/Docs/src/bin/halibut/biblio.c
@@ -1,122 +1,122 @@
-/*
- * biblio.c: process the bibliography
- */
-
-#include <assert.h>
-#include "halibut.h"
-
-static wchar_t *gentext(int num)
-{
- wchar_t text[22];
- wchar_t *p = text + sizeof(text);
- *--p = L'\0';
- *--p = L']';
- while (num != 0)
- {
- assert(p > text);
- *--p = L"0123456789"[num % 10];
- num /= 10;
- }
- assert(p > text);
- *--p = L'[';
- return ustrdup(p);
-}
-
-static void cite_biblio(keywordlist * kl, wchar_t * key, filepos fpos)
-{
- keyword *kw = kw_lookup(kl, key);
- if (!kw)
- error(err_nosuchkw, &fpos, key);
- else
- {
- /*
- * We've found a \k reference. If it's a
- * bibliography entry ...
- */
- if (kw->para->type == para_Biblio)
- {
- /*
- * ... then mark the paragraph as cited.
- */
- kw->para->type = para_BiblioCited;
- }
- }
-}
-
-/*
- * Make a pass through the source form, generating citation formats
- * for bibliography entries and also marking which bibliography
- * entries are actually cited (or \nocite-ed).
- */
-
-void gen_citations(paragraph * source, keywordlist * kl)
-{
- paragraph *para;
- int bibnum = 0;
-
- for (para = source; para; para = para->next)
- {
- word *ptr;
-
- /*
- * \BR and \nocite paragraphs get special processing here.
- */
- if (para->type == para_BR)
- {
- keyword *kw = kw_lookup(kl, para->keyword);
- if (!kw)
- {
- error(err_nosuchkw, &para->fpos, para->keyword);
- } else if (kw->text)
- {
- error(err_multiBR, &para->fpos, para->keyword);
- } else
- {
- kw->text = dup_word_list(para->words);
- }
- } else if (para->type == para_NoCite)
- {
- wchar_t *wp = para->keyword;
- while (*wp)
- {
- cite_biblio(kl, wp, para->fpos);
- wp = uadv(wp);
- }
- }
-
- /*
- * Scan for keyword references.
- */
- for (ptr = para->words; ptr; ptr = ptr->next)
- {
- if (ptr->type == word_UpperXref || ptr->type == word_LowerXref
- || ptr->type == word_FreeTextXref)
- cite_biblio(kl, ptr->text, ptr->fpos);
- }
- }
-
- /*
- * We're now almost done; all that remains is to scan through
- * the cited bibliography entries and invent default citation
- * texts for the ones that don't already have explicitly
- * provided \BR text.
- */
- for (para = source; para; para = para->next)
- {
- if (para->type == para_BiblioCited)
- {
- keyword *kw = kw_lookup(kl, para->keyword);
- assert(kw != NULL);
- if (!kw->text)
- {
- word *wd = smalloc(sizeof(word));
- wd->text = gentext(++bibnum);
- wd->type = word_Normal;
- wd->alt = NULL;
- wd->next = NULL;
- kw->text = wd;
- }
- para->kwtext = kw->text;
- }
- }
-}
+/*
+ * biblio.c: process the bibliography
+ */
+
+#include <assert.h>
+#include "halibut.h"
+
+static wchar_t *gentext(int num)
+{
+ wchar_t text[22];
+ wchar_t *p = text + sizeof(text);
+ *--p = L'\0';
+ *--p = L']';
+ while (num != 0)
+ {
+ assert(p > text);
+ *--p = L"0123456789"[num % 10];
+ num /= 10;
+ }
+ assert(p > text);
+ *--p = L'[';
+ return ustrdup(p);
+}
+
+static void cite_biblio(keywordlist * kl, wchar_t * key, filepos fpos)
+{
+ keyword *kw = kw_lookup(kl, key);
+ if (!kw)
+ error(err_nosuchkw, &fpos, key);
+ else
+ {
+ /*
+ * We've found a \k reference. If it's a
+ * bibliography entry ...
+ */
+ if (kw->para->type == para_Biblio)
+ {
+ /*
+ * ... then mark the paragraph as cited.
+ */
+ kw->para->type = para_BiblioCited;
+ }
+ }
+}
+
+/*
+ * Make a pass through the source form, generating citation formats
+ * for bibliography entries and also marking which bibliography
+ * entries are actually cited (or \nocite-ed).
+ */
+
+void gen_citations(paragraph * source, keywordlist * kl)
+{
+ paragraph *para;
+ int bibnum = 0;
+
+ for (para = source; para; para = para->next)
+ {
+ word *ptr;
+
+ /*
+ * \BR and \nocite paragraphs get special processing here.
+ */
+ if (para->type == para_BR)
+ {
+ keyword *kw = kw_lookup(kl, para->keyword);
+ if (!kw)
+ {
+ error(err_nosuchkw, &para->fpos, para->keyword);
+ } else if (kw->text)
+ {
+ error(err_multiBR, &para->fpos, para->keyword);
+ } else
+ {
+ kw->text = dup_word_list(para->words);
+ }
+ } else if (para->type == para_NoCite)
+ {
+ wchar_t *wp = para->keyword;
+ while (*wp)
+ {
+ cite_biblio(kl, wp, para->fpos);
+ wp = uadv(wp);
+ }
+ }
+
+ /*
+ * Scan for keyword references.
+ */
+ for (ptr = para->words; ptr; ptr = ptr->next)
+ {
+ if (ptr->type == word_UpperXref || ptr->type == word_LowerXref
+ || ptr->type == word_FreeTextXref)
+ cite_biblio(kl, ptr->text, ptr->fpos);
+ }
+ }
+
+ /*
+ * We're now almost done; all that remains is to scan through
+ * the cited bibliography entries and invent default citation
+ * texts for the ones that don't already have explicitly
+ * provided \BR text.
+ */
+ for (para = source; para; para = para->next)
+ {
+ if (para->type == para_BiblioCited)
+ {
+ keyword *kw = kw_lookup(kl, para->keyword);
+ assert(kw != NULL);
+ if (!kw->text)
+ {
+ word *wd = smalloc(sizeof(word));
+ wd->text = gentext(++bibnum);
+ wd->type = word_Normal;
+ wd->alt = NULL;
+ wd->next = NULL;
+ kw->text = wd;
+ }
+ para->kwtext = kw->text;
+ }
+ }
+}
diff --git a/Docs/src/bin/halibut/bk_xhtml.c b/Docs/src/bin/halibut/bk_xhtml.c
index 5b1bb7b..431c04b 100755
--- a/Docs/src/bin/halibut/bk_xhtml.c
+++ b/Docs/src/bin/halibut/bk_xhtml.c
@@ -1,1962 +1,1962 @@
-/*
- * xhtml backend for Halibut
- * (initial implementation by James Aylett)
- *
- * Still to do:
- *
- * +++ doesn't handle non-breaking hyphens. Not sure how to yet.
- * +++ entity names (from a file -- ideally supply normal SGML files)
- * +++ configuration directive to file split where the current layout
- * code wouldn't. Needs changes to _ponder_layout() and _do_paras(),
- * perhaps others.
- *
- * Limitations:
- *
- * +++ biblio/index references target the nearest section marker, rather
- * than having a dedicated target themselves. In large bibliographies
- * this will cause problems. (The solution is to fake up a response
- * from xhtml_find_section(), probably linking it into the sections
- * chain just in case we need it again, and to make freeing it up
- * easier.) docsrc.pl used to work as we do, however, and SGT agrees that
- * this is acceptable for now.
- * +++ can't cope with leaf-level == 0. It's all to do with the
- * top-level file not being normal, probably not even having a valid
- * section level, and stuff like that. I question whether this is an
- * issue, frankly; small manuals that fit on one page should probably
- * not be written in halibut at all.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include "halibut.h"
-
-struct xhtmlsection_Struct {
- struct xhtmlsection_Struct *next; /* next sibling (NULL if split across files) */
- struct xhtmlsection_Struct *child; /* NULL if split across files */
- struct xhtmlsection_Struct *parent; /* NULL if split across files */
- struct xhtmlsection_Struct *chain; /* single structure independent of weird trees */
- paragraph *para;
- struct xhtmlfile_Struct *file; /* which file is this a part of? */
- char *fragment; /* fragment id within the file */
- int level;
-};
-
-struct xhtmlfile_Struct {
- struct xhtmlfile_Struct *next;
- struct xhtmlfile_Struct *child;
- struct xhtmlfile_Struct *parent;
- char *filename;
- struct xhtmlsection_Struct *sections; /* sections within this file (only one for non-leaf) */
- int is_leaf; /* is this file a leaf file, ie does it not have any children? */
-};
-
-typedef struct xhtmlsection_Struct xhtmlsection;
-typedef struct xhtmlfile_Struct xhtmlfile;
-typedef struct xhtmlindex_Struct xhtmlindex;
-
-struct xhtmlindex_Struct {
- int nsection;
- int size;
- xhtmlsection **sections;
-};
-
-typedef struct {
- int just_numbers;
- wchar_t *number_suffix;
-} xhtmlheadfmt;
-
-typedef struct {
- int contents_depth[6];
- int leaf_contains_contents;
- int leaf_level;
- int leaf_smallest_contents;
- int include_version_id;
- wchar_t *author, *description;
- wchar_t *head_end, *body, *body_start, *body_end, *address_start,
- *address_end, *nav_attrs;
- wchar_t *rlink_prefix, *rlink_suffix;
- wchar_t *chm_toc_file, *chm_ind_file;
- int suppress_address;
- xhtmlheadfmt fchapter, *fsect;
- int nfsect;
-} xhtmlconfig;
-
-/*static void xhtml_level(paragraph *, int);
-static void xhtml_level_0(paragraph *);
-static void xhtml_docontents(FILE *, paragraph *, int);
-static void xhtml_dosections(FILE *, paragraph *, int);
-static void xhtml_dobody(FILE *, paragraph *, int);*/
-
-static void xhtml_doheader(FILE *, word *);
-static void xhtml_dofooter(FILE *);
-static void xhtml_versionid(FILE *, word *, int);
-
-static void xhtml_utostr(wchar_t *, char **);
-static int xhtml_para_level(paragraph *);
-static int xhtml_reservedchar(int);
-
-static int xhtml_convert(wchar_t *, char **, int);
-static void xhtml_rdaddwc(rdstringc *, word *, word *);
-static void xhtml_para(FILE *, word *);
-static void xhtml_codepara(FILE *, word *);
-static void xhtml_heading(FILE *, paragraph *);
-
-static void chm_doheader(FILE *, word *);
-static void chm_dofooter(FILE *);
-/* File-global variables are much easier than passing these things
- * all over the place. Evil, but easier. We can replace this with a single
- * structure at some point.
- */
-static xhtmlconfig conf;
-static keywordlist *keywords;
-static indexdata *idx;
-static xhtmlfile *topfile;
-static xhtmlsection *topsection;
-static paragraph *sourceparas;
-static xhtmlfile *lastfile;
-static xhtmlfile *xhtml_last_file = NULL;
-static int last_level = -1;
-static xhtmlsection *currentsection;
-static FILE* chm_toc = NULL;
-static FILE* chm_ind = NULL;
-
-
-static xhtmlconfig xhtml_configure(paragraph * source)
-{
- xhtmlconfig ret;
-
- /*
- * Defaults.
- */
- ret.contents_depth[0] = 2;
- ret.contents_depth[1] = 3;
- ret.contents_depth[2] = 4;
- ret.contents_depth[3] = 5;
- ret.contents_depth[4] = 6;
- ret.contents_depth[5] = 7;
- ret.leaf_level = 2;
- ret.leaf_smallest_contents = 4;
- ret.leaf_contains_contents = FALSE;
- ret.include_version_id = TRUE;
- ret.author = NULL;
- ret.description = NULL;
- ret.head_end = NULL;
- ret.body = NULL;
- ret.body_start = NULL;
- ret.body_end = NULL;
- ret.address_start = NULL;
- ret.address_end = NULL;
- ret.nav_attrs = NULL;
- ret.suppress_address = FALSE;
- ret.chm_toc_file = NULL;
- ret.chm_ind_file = NULL;
- chm_toc = NULL;
- chm_ind = NULL;
- ret.fchapter.just_numbers = FALSE;
- ret.fchapter.number_suffix = ustrdup(L": ");
- ret.nfsect = 2;
- ret.fsect = mknewa(xhtmlheadfmt, ret.nfsect);
- ret.fsect[0].just_numbers = FALSE;
- ret.fsect[0].number_suffix = ustrdup(L": ");
- ret.fsect[1].just_numbers = TRUE;
- ret.fsect[1].number_suffix = ustrdup(L" ");
- ret.rlink_prefix = NULL;
- ret.rlink_suffix = NULL;
-
- for (; source; source = source->next)
- {
- if (source->type == para_Config)
- {
- if (!ustricmp(source->keyword, L"xhtml-contents-depth-0"))
- {
- ret.contents_depth[0] = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-1"))
- {
- ret.contents_depth[1] = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-2"))
- {
- ret.contents_depth[2] = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-3"))
- {
- ret.contents_depth[3] = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-4"))
- {
- ret.contents_depth[4] = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-5"))
- {
- ret.contents_depth[5] = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-leaf-level"))
- {
- ret.leaf_level = utoi(uadv(source->keyword));
- } else
- if (!ustricmp(source->keyword, L"xhtml-leaf-smallest-contents"))
- {
- ret.leaf_smallest_contents = utoi(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-versionid"))
- {
- ret.include_version_id = utob(uadv(source->keyword));
- } else
- if (!ustricmp(source->keyword, L"xhtml-leaf-contains-contents"))
- {
- ret.leaf_contains_contents = utob(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-suppress-address"))
- {
- ret.suppress_address = utob(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-author"))
- {
- ret.author = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"chm-toc-file"))
- {
- ret.chm_toc_file = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"chm-ind-file"))
- {
- ret.chm_ind_file = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-description"))
- {
- ret.description = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-head-end"))
- {
- ret.head_end = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-body-start"))
- {
- ret.body_start = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-body-tag"))
- {
- ret.body = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-body-end"))
- {
- ret.body_end = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-address-start"))
- {
- ret.address_start = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-address-end"))
- {
- ret.address_end = uadv(source->keyword);
- } else
- if (!ustricmp(source->keyword, L"xhtml-navigation-attributes"))
- {
- ret.nav_attrs = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-chapter-numeric"))
- {
- ret.fchapter.just_numbers = utob(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-chapter-suffix"))
- {
- ret.fchapter.number_suffix = ustrdup(uadv(source->keyword));
- } else if (!ustricmp(source->keyword, L"xhtml-rlink-prefix"))
- {
- ret.rlink_prefix = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-rlink-suffix"))
- {
- ret.rlink_suffix = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"xhtml-section-numeric"))
- {
- wchar_t *p = uadv(source->keyword);
- int n = 0;
- if (uisdigit(*p))
- {
- n = utoi(p);
- p = uadv(p);
- }
- if (n >= ret.nfsect)
- {
- int i;
- ret.fsect = resize(ret.fsect, n + 1);
- for (i = ret.nfsect; i <= n; i++)
- ret.fsect[i] = ret.fsect[ret.nfsect - 1];
- ret.nfsect = n + 1;
- }
- ret.fsect[n].just_numbers = utob(p);
- } else if (!ustricmp(source->keyword, L"xhtml-section-suffix"))
- {
- wchar_t *p = uadv(source->keyword);
- int n = 0;
- if (uisdigit(*p))
- {
- n = utoi(p);
- p = uadv(p);
- }
- if (n >= ret.nfsect)
- {
- int i;
- ret.fsect = resize(ret.fsect, n + 1);
- for (i = ret.nfsect; i <= n; i++)
- ret.fsect[i] = ret.fsect[ret.nfsect - 1];
- ret.nfsect = n + 1;
- }
- ret.fsect[n].number_suffix = ustrdup(p);
- }
- }
- }
-
- /* printf(" !!! leaf_level = %i\n", ret.leaf_level);
- printf(" !!! contentdepth-0 = %i\n", ret.contents_depth[0]);
- printf(" !!! contentdepth-1 = %i\n", ret.contents_depth[1]);
- printf(" !!! contentdepth-2 = %i\n", ret.contents_depth[2]);
- printf(" !!! contentdepth-3 = %i\n", ret.contents_depth[3]);
- printf(" !!! contentdepth-4 = %i\n", ret.contents_depth[4]);
- printf(" !!! contentdepth-5 = %i\n", ret.contents_depth[5]);
- printf(" !!! leaf_contains_contents = %i\n", ret.leaf_contains_contents); */
- return ret;
-}
-
-static xhtmlsection *xhtml_new_section(xhtmlsection * last)
-{
- xhtmlsection *ret = mknew(xhtmlsection);
- ret->next = NULL;
- ret->child = NULL;
- ret->parent = NULL;
- ret->chain = last;
- ret->para = NULL;
- ret->file = NULL;
- ret->fragment = NULL;
- ret->level = -1; /* marker: end of chain */
- return ret;
-}
-
-/* Returns NULL or the section that marks that paragraph */
-static xhtmlsection *xhtml_find_section(paragraph * p)
-{
- xhtmlsection *ret = topsection;
- if (xhtml_para_level(p) == -1)
- { /* first, we back-track to a section paragraph */
- paragraph *p2 = sourceparas;
- paragraph *p3 = NULL;
- while (p2 && p2 != p)
- {
- if (xhtml_para_level(p2) != -1)
- {
- p3 = p2;
- }
- p2 = p2->next;
- }
- if (p3 == NULL)
- { /* for some reason, we couldn't find a section before this paragraph ... ? */
- /* Note that this can happen, if you have a cross-reference to before the first chapter starts.
- * So don't do that, then.
- */
- return NULL;
- }
- p = p3;
- }
- while (ret && ret->para != p)
- {
-/* printf(" xhtml_find_section(): checking %s for para @ %p\n", ret->fragment, p);*/
- ret = ret->chain;
- }
- return ret;
-}
-
-static xhtmlfile *xhtml_new_file(xhtmlsection * sect)
-{
- xhtmlfile *ret = mknew(xhtmlfile);
-
- ret->next = NULL;
- ret->child = NULL;
- ret->parent = NULL;
- ret->filename = NULL;
- ret->sections = sect;
- ret->is_leaf = (sect != NULL && sect->level == conf.leaf_level);
- if (sect == NULL)
- {
- if (conf.leaf_level == 0)
- { /* currently unused */
-#define FILENAME_MANUAL "Manual.html"
-#define FILENAME_CONTENTS "Contents.html"
- ret->filename = smalloc(strlen(FILENAME_MANUAL) + 1);
- sprintf(ret->filename, FILENAME_MANUAL);
- } else
- {
- ret->filename = smalloc(strlen(FILENAME_CONTENTS) + 1);
- sprintf(ret->filename, FILENAME_CONTENTS);
- }
- } else
- {
- paragraph *p = sect->para;
- rdstringc fname_c = { 0, 0, NULL };
- char *c;
- word *w;
- for (w = (p->kwtext) ? (p->kwtext) : (p->words); w; w = w->next)
- {
- switch (removeattr(w->type))
- {
- case word_Normal:
- /*case word_Emph:
- case word_Code:
- case word_WeakCode: */
- xhtml_utostr(w->text, &c);
- rdaddsc(&fname_c, c);
- sfree(c);
- break;
- }
- }
- rdaddsc(&fname_c, ".html");
- ret->filename = rdtrimc(&fname_c);
- }
- /* printf(" ! new file '%s', is_leaf == %s\n", ret->filename, (ret->is_leaf)?("true"):("false")); */
- return ret;
-}
-
-/*
- * Walk the tree fixing up files which are actually leaf (ie
- * have no children) but aren't at leaf level, so they have the
- * leaf flag set.
- */
-void xhtml_fixup_layout(xhtmlfile * file)
-{
- if (file->child == NULL)
- {
- file->is_leaf = TRUE;
- } else
- {
- xhtml_fixup_layout(file->child);
- }
- if (file->next)
- xhtml_fixup_layout(file->next);
-}
-
-/*
- * Create the tree structure so we know where everything goes.
- * Method:
- *
- * Ignoring file splitting, we have three choices with each new section:
- *
- * +-----------------+-----------------+
- * | | |
- * X +----X----+ (1)
- * | |
- * Y (2)
- * |
- * (3)
- *
- * Y is the last section we added (currentsect).
- * If sect is the section we want to add, then:
- *
- * (1) if sect->level < currentsect->level
- * (2) if sect->level == currentsect->level
- * (3) if sect->level > currentsect->level
- *
- * This requires the constraint that you never skip section numbers
- * (so you can't have a.b.c.d without all of a, a.b and a.b.c existing).
- *
- * Note that you _can_ have 1.1.1.1 followed by 1.2 - you can change
- * more than one level at a time. Lots of asserts, and probably part of
- * the algorithm here, rely on this being true. (It currently isn't
- * enforced by halibut, however.)
- *
- * File splitting makes this harder. For instance, say we added at (3)
- * above and now need to add another section. We are splitting at level
- * 2, ie the level of Y. Z is the last section we added:
- *
- * +-----------------+-----------------+
- * | | |
- * X +----X----+ (1)
- * | |
- * +----Y----+ (1)
- * | |
- * Z (2)
- * |
- * (3)
- *
- * The (1) case is now split; we need to search upwards to find where
- * to actually link in. The other two cases remain the same (and will
- * always be like this).
- *
- * File splitting makes this harder, however. The decision of whether
- * to split to a new file is always on the same condition, however (is
- * the level of this section higher than the leaf_level configuration
- * value or not).
- *
- * Treating the cases backwards:
- *
- * (3) same file if sect->level > conf.leaf_level, otherwise new file
- *
- * if in the same file, currentsect->child points to sect
- * otherwise the linking is done through the file tree (which works
- * in more or less the same way, ie currentfile->child points to
- * the new file)
- *
- * (2) same file if sect->level > conf.leaf_level, otherwise new file
- *
- * if in the same file, currentsect->next points to sect
- * otherwise file linking and currentfile->next points to the new
- * file (we know that Z must have caused a new file to be created)
- *
- * (1) same file if sect->level > conf.leaf_level, otherwise new file
- *
- * this is actually effectively the same case as (2) here,
- * except that we first have to travel up the sections to figure
- * out which section this new one will be a sibling of. In doing
- * so, we may disappear off the top of a file and have to go up
- * to its parent in the file tree.
- *
- */
-static void xhtml_ponder_layout(paragraph * p)
-{
- xhtmlsection *lastsection;
- xhtmlsection *currentsect;
- xhtmlfile *currentfile;
-
- lastfile = NULL;
- topsection = xhtml_new_section(NULL);
- topfile = xhtml_new_file(NULL);
- lastsection = topsection;
- currentfile = topfile;
- currentsect = topsection;
-
- if (conf.leaf_level == 0)
- {
- topfile->is_leaf = 1;
- topfile->sections = topsection;
- topsection->file = topfile;
- }
-
- for (; p; p = p->next)
- {
- int level = xhtml_para_level(p);
- if (level > 0)
- { /* actually a section */
- xhtmlsection *sect;
- word *w;
- char *c;
- rdstringc fname_c = { 0, 0, NULL };
-
- sect = xhtml_new_section(lastsection);
- lastsection = sect;
- sect->para = p;
- for (w = (p->kwtext2) ? (p->kwtext2) : (p->words); w; w = w->next)
- { /* kwtext2 because we want numbers only! */
- switch (removeattr(w->type))
- {
- case word_Normal:
- /*case word_Emph:
- case word_Code:
- case word_WeakCode: */
- xhtml_utostr(w->text, &c);
- rdaddsc(&fname_c, c);
- sfree(c);
- break;
- }
- }
-/* rdaddsc(&fname_c, ".html");*/
- sect->fragment = rdtrimc(&fname_c);
- sect->level = level;
- /* printf(" ! adding para @ %p as sect %s, level %i\n", sect->para, sect->fragment, level); */
-
- if (level > currentsect->level)
- { /* case (3) */
- if (level > conf.leaf_level)
- { /* same file */
- assert(currentfile->is_leaf);
- currentsect->child = sect;
- sect->parent = currentsect;
- sect->file = currentfile;
- /* printf("connected '%s' to existing file '%s' [I]\n", sect->fragment, currentfile->filename); */
- currentsect = sect;
- } else
- { /* new file */
- xhtmlfile *file = xhtml_new_file(sect);
- assert(!currentfile->is_leaf);
- currentfile->child = file;
- sect->file = file;
- file->parent = currentfile;
- /* printf("connected '%s' to new file '%s' [I]\n", sect->fragment, file->filename); */
- currentfile = file;
- currentsect = sect;
- }
- } else if (level >= currentsect->file->sections->level)
- {
- /* Case (1) or (2) *AND* still under the section that starts
- * the current file.
- *
- * I'm not convinced that this couldn't be rolled in with the
- * final else {} leg further down. It seems a lot of effort
- * this way.
- */
- if (level > conf.leaf_level)
- { /* stick within the same file */
- assert(currentfile->is_leaf);
- sect->file = currentfile;
- while (currentsect && currentsect->level > level &&
- currentsect->file == currentsect->parent->file)
- {
- currentsect = currentsect->parent;
- }
- assert(currentsect);
- currentsect->next = sect;
- assert(currentsect->level == sect->level);
- sect->parent = currentsect->parent;
- currentsect = sect;
- /* printf("connected '%s' to existing file '%s' [II]\n", sect->fragment, currentfile->filename); */
- } else
- { /* new file */
- xhtmlfile *file = xhtml_new_file(sect);
- sect->file = file;
- currentfile->next = file;
- file->parent = currentfile->parent;
- file->is_leaf = (level == conf.leaf_level);
- file->sections = sect;
- /* printf("connected '%s' to new file '%s' [II]\n", sect->fragment, file->filename); */
- currentfile = file;
- currentsect = sect;
- }
- } else
- { /* Case (1) or (2) and we must move up the file tree first */
- /* this loop is now probably irrelevant - we know we can't connect
- * to anything in the current file */
- while (currentsect && level < currentsect->level)
- {
- currentsect = currentsect->parent;
- if (currentsect)
- {
- /* printf(" * up one level to '%s'\n", currentsect->fragment); */
- } else
- {
- /* printf(" * up one level (off top of current file)\n"); */
- }
- }
- if (currentsect)
- {
- /* I'm pretty sure this can now never fire */
- assert(currentfile->is_leaf);
- /* printf("connected '%s' to existing file '%s' [III]\n", sect->fragment, currentfile->filename); */
- sect->file = currentfile;
- currentsect->next = sect;
- currentsect = sect;
- } else
- { /* find a file we can attach to */
- while (currentfile && currentfile->sections
- && level < currentfile->sections->level)
- {
- currentfile = currentfile->parent;
- if (currentfile)
- {
- /* printf(" * up one file level to '%s'\n", currentfile->filename); */
- } else
- {
- /* printf(" * up one file level (off top of tree)\n"); */
- }
- }
- if (currentfile)
- { /* new file (we had to skip up a file to
- get here, so we must be dealing with a
- level no lower than the configured
- leaf_level */
- xhtmlfile *file = xhtml_new_file(sect);
- currentfile->next = file;
- sect->file = file;
- file->parent = currentfile->parent;
- file->is_leaf = (level == conf.leaf_level);
- file->sections = sect;
- /* printf("connected '%s' to new file '%s' [III]\n", sect->fragment, file->filename); */
- currentfile = file;
- currentsect = sect;
- } else
- {
- fatal(err_whatever,
- "Ran off the top trying to connect sibling: strange document.");
- }
- }
- }
- }
- }
- topsection = lastsection; /* get correct end of the chain */
- xhtml_fixup_layout(topfile); /* leaf files not at leaf level marked as such */
-}
-
-static void xhtml_do_index();
-static void xhtml_do_file(xhtmlfile * file);
-static void xhtml_do_top_file(xhtmlfile * file, paragraph * sourceform);
-static void xhtml_do_paras(FILE * fp, paragraph * p);
-static int xhtml_do_contents_limit(FILE * fp, xhtmlfile * file, int limit);
-static int xhtml_do_contents_section_limit(FILE * fp, xhtmlsection * section, int limit);
-static int xhtml_add_contents_entry(FILE * fp, xhtmlsection * section, int limit);
-static int xhtml_do_contents(FILE * fp, xhtmlfile * file);
-static int xhtml_do_naked_contents(FILE * fp, xhtmlfile * file);
-static void xhtml_do_sections(FILE * fp, xhtmlsection * sections);
-
-/*
- * Do all the files in this structure.
- */
-static void xhtml_do_files(xhtmlfile * file)
-{
- xhtml_do_file(file);
- if (file->child)
- xhtml_do_files(file->child);
- if (file->next)
- xhtml_do_files(file->next);
-}
-
-/*
- * Free up all memory used by the file tree from 'xfile' downwards
- */
-static void xhtml_free_file(xhtmlfile * xfile)
-{
- if (xfile == NULL)
- {
- return;
- }
-
- if (xfile->filename)
- {
- sfree(xfile->filename);
- }
- xhtml_free_file(xfile->child);
- xhtml_free_file(xfile->next);
- sfree(xfile);
-}
-
-/*
- * Main function.
- */
-void
-xhtml_backend(paragraph * sourceform, keywordlist * in_keywords,
- indexdata * in_idx)
-{
-/* int i;*/
- indexentry *ientry;
- int ti;
- xhtmlsection *xsect;
-
- sourceparas = sourceform;
- conf = xhtml_configure(sourceform);
- keywords = in_keywords;
- idx = in_idx;
-
- /* Clear up the index entries backend data pointers */
- for (ti = 0;
- (ientry = (indexentry *) index234(idx->entries, ti)) != NULL; ti++)
- {
- ientry->backend_data = NULL;
- }
-
- xhtml_ponder_layout(sourceform);
-
- /* old system ... (writes to *.alt, but gets some stuff wrong and is ugly) */
-/* xhtml_level_0(sourceform);
- for (i=1; i<=conf.leaf_level; i++)
- {
- xhtml_level(sourceform, i);
- }*/
-
- /* new system ... (writes to *.html, but isn't fully trusted) */
- xhtml_do_top_file(topfile, sourceform);
- assert(!topfile->next); /* shouldn't have a sibling at all */
- if (topfile->child)
- {
- xhtml_do_files(topfile->child);
- xhtml_do_index();
- }
-
- /* release file, section, index data structures */
- xsect = topsection;
- while (xsect)
- {
- xhtmlsection *tmp = xsect->chain;
- if (xsect->fragment)
- {
- sfree(xsect->fragment);
- }
- sfree(xsect);
- xsect = tmp;
- }
- xhtml_free_file(topfile);
- for (ti = 0;
- (ientry = (indexentry *) index234(idx->entries, ti)) != NULL; ti++)
- {
- if (ientry->backend_data != NULL)
- {
- xhtmlindex *xi = (xhtmlindex *) ientry->backend_data;
- if (xi->sections != NULL)
- {
- sfree(xi->sections);
- }
- sfree(xi);
- }
- ientry->backend_data = NULL;
- }
- {
- int i;
- sfree(conf.fchapter.number_suffix);
- for (i = 0; i < conf.nfsect; i++)
- sfree(conf.fsect[i].number_suffix);
- sfree(conf.fsect);
- }
-}
-
-static int xhtml_para_level(paragraph * p)
-{
- switch (p->type)
- {
- case para_Title:
- return 0;
- break;
- case para_UnnumberedChapter:
- case para_Chapter:
- case para_Appendix:
- return 1;
- break;
-/* case para_BiblioCited:
- return 2;
- break;*/
- case para_Heading:
- case para_Subsect:
- return p->aux + 2;
- break;
- default:
- return -1;
- break;
- }
-}
-
-static char *xhtml_index_filename = "IndexPage.html";
-
-/* Output the nav links for the current file.
- * file == NULL means we're doing the index
- */
-static void xhtml_donavlinks(FILE * fp, xhtmlfile * file)
-{
- xhtmlfile *xhtml_next_file = NULL;
- fprintf(fp, "<p");
- if (conf.nav_attrs != NULL)
- {
- fprintf(fp, " %ls>", conf.nav_attrs);
- } else
- {
- fprintf(fp, ">");
- }
- if (xhtml_last_file == NULL)
- {
- fprintf(fp, "Previous | ");
- } else
- {
- fprintf(fp, "<a href='%s'>Previous</a> | ", xhtml_last_file->filename);
- }
- fprintf(fp, "<a href='Contents.html'>Contents</a> | ");
- if (file != NULL)
- { /* otherwise we're doing nav links for the index */
- if (xhtml_next_file == NULL)
- xhtml_next_file = file->child;
- if (xhtml_next_file == NULL)
- xhtml_next_file = file->next;
- if (xhtml_next_file == NULL)
- xhtml_next_file = file->parent->next;
- }
- if (xhtml_next_file == NULL)
- {
- if (file == NULL)
- { /* index, so no next file */
- fprintf(fp, "Next ");
- } else
- {
- fprintf(fp, "<a href='%s'>Next</a>", xhtml_index_filename);
- }
- } else
- {
- fprintf(fp, "<a href='%s'>Next</a>", xhtml_next_file->filename);
- }
- fprintf(fp, "</p>\n");
-}
-
-/* Write out the index file */
-static void xhtml_do_index_body(FILE * fp)
-{
- indexentry *y;
- int ti;
-
- if (count234(idx->entries) == 0)
- return; /* don't write anything at all */
-
- fprintf(fp, "<dl>\n");
- /* iterate over idx->entries using the tree functions and display everything */
- for (ti = 0; (y = (indexentry *) index234(idx->entries, ti)) != NULL;
- ti++)
- {
- if (y->backend_data)
- {
- int i;
- xhtmlindex *xi;
-
- fprintf(fp, "<dt>");
- xhtml_para(fp, y->text);
- fprintf(fp, "</dt>\n<dd>");
-
- xi = (xhtmlindex *) y->backend_data;
- for (i = 0; i < xi->nsection; i++)
- {
- xhtmlsection *sect = xi->sections[i];
- if (sect)
- {
- fprintf(fp, "<a href='%s#%s'>", sect->file->filename,
- sect->fragment);
- if (sect->para->kwtext)
- {
- xhtml_para(fp, sect->para->kwtext);
- } else if (sect->para->words)
- {
- xhtml_para(fp, sect->para->words);
- }
- fprintf(fp, "</a>");
- if (i + 1 < xi->nsection)
- {
- fprintf(fp, ", ");
- }
- }
- }
- fprintf(fp, "</dd>\n");
- }
- }
- fprintf(fp, "</dl>\n");
-}
-static void xhtml_do_index()
-{
- word temp_word =
- { NULL, NULL, word_Normal, 0, 0, L"Index", {NULL, 0, 0} };
- FILE *fp = fopen(xhtml_index_filename, "w");
-
- if (fp == NULL)
- fatal(err_cantopenw, xhtml_index_filename);
- xhtml_doheader(fp, &temp_word);
- xhtml_donavlinks(fp, NULL);
-
- xhtml_do_index_body(fp);
-
- xhtml_donavlinks(fp, NULL);
- xhtml_dofooter(fp);
- fclose(fp);
-}
-
-/* Output the given file. This includes whatever contents at beginning and end, etc. etc. */
-static void xhtml_do_file(xhtmlfile * file)
-{
- FILE *fp = fopen(file->filename, "w");
- if (fp == NULL)
- fatal(err_cantopenw, file->filename);
-
- if (file->sections->para->words)
- {
- xhtml_doheader(fp, file->sections->para->words);
- } else if (file->sections->para->kwtext)
- {
- xhtml_doheader(fp, file->sections->para->kwtext);
- } else
- {
- xhtml_doheader(fp, NULL);
- }
-
- xhtml_donavlinks(fp, file);
-
- if (file->is_leaf && conf.leaf_contains_contents &&
- xhtml_do_contents(NULL, file) >= conf.leaf_smallest_contents)
- xhtml_do_contents(fp, file);
- xhtml_do_sections(fp, file->sections);
- if (!file->is_leaf)
- xhtml_do_naked_contents(fp, file);
-
- xhtml_donavlinks(fp, file);
-
- xhtml_dofooter(fp);
- fclose(fp);
-
- xhtml_last_file = file;
-}
-
-/* Output the top-level file. */
-static void xhtml_do_top_file(xhtmlfile * file, paragraph * sourceform)
-{
- paragraph *p;
- char fname[4096];
- int done = FALSE;
-
- FILE *fp = fopen(file->filename, "w");
- if (fp == NULL)
- fatal(err_cantopenw, file->filename);
-
- ustrtoa(conf.chm_toc_file, fname, 4096);
- if(*fname)
- {
- chm_toc = fopen(fname, "w");
- if (chm_toc == NULL)
- fatal(err_cantopenw, fname);
- }
- else
- chm_toc = NULL;
-
- ustrtoa(conf.chm_ind_file, fname, 4096);
- if(*fname){
- chm_ind = fopen(fname, "w");
- if (chm_ind == NULL)
- fatal(err_cantopenw, fname);
- }
- else
- chm_ind = NULL;
-
- /* Do the title -- only one allowed */
- for (p = sourceform; p && !done; p = p->next)
- {
- if (p->type == para_Title)
- {
- xhtml_doheader(fp, p->words);
- if(chm_toc)chm_doheader(chm_toc, p->words);
- if(chm_ind)chm_doheader(chm_ind, p->words);
- done = TRUE;
- }
- }
- if (!done)
- xhtml_doheader(fp, NULL /* Eek! */ );
-
- /*
- * Display the title.
- */
- for (p = sourceform; p; p = p->next)
- {
- if (p->type == para_Title)
- {
- xhtml_heading(fp, p);
- break;
- }
- }
-
- /* Do the preamble and copyright */
- for (p = sourceform; p; p = p->next)
- {
- if (p->type == para_Preamble)
- {
- fprintf(fp, "<p>");
- xhtml_para(fp, p->words);
- fprintf(fp, "</p>\n");
- }
- }
- for (p = sourceform; p; p = p->next)
- {
- if (p->type == para_Copyright)
- {
- fprintf(fp, "<p>");
- xhtml_para(fp, p->words);
- fprintf(fp, "</p>\n");
- }
- }
-
- xhtml_do_contents(fp, file);
- xhtml_do_sections(fp, file->sections);
-
- /*
- * Put the index in the top file if we're in single-file mode
- * (leaf-level 0).
- */
- if (conf.leaf_level == 0 && count234(idx->entries) > 0)
- {
- fprintf(fp, "<a name=\"index\"></a><h1>Index</h1>\n");
- xhtml_do_index_body(fp);
- }
-
- xhtml_dofooter(fp);
- if(chm_toc)chm_dofooter(chm_toc);
- if(chm_ind)chm_dofooter(chm_ind);
- fclose(fp);
- if(chm_toc)
- {
- fclose(chm_toc);
- chm_toc = NULL;
- }
- if(chm_ind)
- {
- fclose(chm_ind);
- chm_ind = NULL;
- }
-}
-
-/* Convert a Unicode string to an ASCII one. '?' is
- * used for unmappable characters.
- */
-static void xhtml_utostr(wchar_t * in, char **out)
-{
- int l = ustrlen(in);
- int i;
- *out = smalloc(l + 1);
- for (i = 0; i < l; i++)
- {
- if (in[i] >= 32 && in[i] <= 126)
- (*out)[i] = (char) in[i];
- else
- (*out)[i] = '?';
- }
- (*out)[i] = 0;
-}
-
-/*
- * Write contents for the given file, and subfiles, down to
- * the appropriate contents depth. Returns the number of
- * entries written.
- */
-static int xhtml_do_contents(FILE * fp, xhtmlfile * file)
-{
- int level, limit, start_level, count = 0;
- if (!file)
- return 0;
-
- level = (file->sections) ? (file->sections->level) : (0);
- limit = conf.contents_depth[(level > 5) ? (5) : (level)];
- start_level = (file->is_leaf) ? (level - 1) : (level);
- last_level = start_level;
-
- count += xhtml_do_contents_section_limit(fp, file->sections, limit);
- count += xhtml_do_contents_limit(fp, file->child, limit);
- if (fp != NULL)
- {
- while (last_level > start_level)
- {
- last_level--;
- fprintf(fp, "</ul>\n");
- if(chm_toc)fprintf(chm_toc, "</ul>\n");
- }
- }
- return count;
-}
-
-/* As above, but doesn't do anything in the current file */
-static int xhtml_do_naked_contents(FILE * fp, xhtmlfile * file)
-{
- int level, limit, start_level, count = 0;
- if (!file)
- return 0;
-
- level = (file->sections) ? (file->sections->level) : (0);
- limit = conf.contents_depth[(level > 5) ? (5) : (level)];
- start_level = (file->is_leaf) ? (level - 1) : (level);
- last_level = start_level;
-
- count = xhtml_do_contents_limit(fp, file->child, limit);
- if (fp != NULL)
- {
- while (last_level > start_level)
- {
- last_level--;
- fprintf(fp, "</ul>\n");
- if(chm_toc)fprintf(chm_toc, "</ul>\n");
- }
- }
- return count;
-}
-
-/*
- * Write contents for the given file, children, and siblings, down to
- * given limit contents depth.
- */
-static int xhtml_do_contents_limit(FILE * fp, xhtmlfile * file, int limit)
-{
- int count = 0;
- while (file)
- {
- count += xhtml_do_contents_section_limit(fp, file->sections, limit);
- count += xhtml_do_contents_limit(fp, file->child, limit);
- file = file->next;
- }
- return count;
-}
-
-/*
- * Write contents entries for the given section tree, down to the
- * limit contents depth.
- */
-static int
-xhtml_do_contents_section_deep_limit(FILE * fp, xhtmlsection * section,
- int limit)
-{
- int count = 0;
- while (section)
- {
- if (!xhtml_add_contents_entry(fp, section, limit))
- return 0;
- else
- count++;
- count +=
- xhtml_do_contents_section_deep_limit(fp, section->child, limit);
- section = section->next;
- }
- return count;
-}
-
-/*
- * Write contents entries for the given section tree, down to the
- * limit contents depth.
- */
-static int
-xhtml_do_contents_section_limit(FILE * fp, xhtmlsection * section, int limit)
-{
- int count = 0;
- if (!section)
- return 0;
- xhtml_add_contents_entry(fp, section, limit);
- count = 1;
- count += xhtml_do_contents_section_deep_limit(fp, section->child, limit);
- /* section=section->child;
- while (section && xhtml_add_contents_entry(fp, section, limit)) {
- section = section->next;
- } */
- return count;
-}
-
-/*
- * Add a section entry, unless we're exceeding the limit, in which
- * case return FALSE (otherwise return TRUE).
- */
-static int
-xhtml_add_contents_entry(FILE * fp, xhtmlsection * section, int limit)
-{
- if (!section || section->level > limit)
- return FALSE;
- if (fp == NULL || section->level < 0)
- return TRUE;
- while (last_level > section->level)
- {
- last_level--;
- fprintf(fp, "</ul>\n");
- if(chm_toc)fprintf(chm_toc, "</ul>\n");
- }
- while (last_level < section->level)
- {
- last_level++;
- fprintf(fp, "<ul>\n");
- if(chm_toc)fprintf(chm_toc, "<ul>\n");
- }
- fprintf(fp, "<li>");
- fprintf(fp, "<a %shref=\"%s#%s\">",
- (section->para->type == para_Chapter|| section->para->type == para_Appendix) ? "class=\"btitle\" " : "",
- section->file->filename,
- (section->para->type == para_Chapter) ? "" : section->fragment);
- if(chm_toc)fprintf(chm_toc, "<li><OBJECT type=\"text/sitemap\"><param name=\"Local\" value=\"%s#%s\"><param name=\"Name\" value=\"",
- section->file->filename,
- (section->para->type == para_Chapter) ? "" : section->fragment);
- if(chm_ind)fprintf(chm_ind, "<li><OBJECT type=\"text/sitemap\"><param name=\"Local\" value=\"%s#%s\"><param name=\"Name\" value=\"",
- section->file->filename,
- (section->para->type == para_Chapter) ? "" : section->fragment);
- //%s
- if (section->para->type == para_Chapter
- || section->para->type == para_Appendix)
- fprintf(fp, "<b>");
- if ((section->para->type != para_Heading
- && section->para->type != para_Subsect) || (section->para->kwtext
- && !section->para->
- words))
- {
- xhtml_para(fp, section->para->kwtext);
- if(chm_toc)xhtml_para(chm_toc, section->para->kwtext);
- if (section->para->words){
- fprintf(fp, ": ");
- if(chm_toc)fprintf(chm_toc, ": ");
- }
- }
- if (section->para->type == para_Chapter
- || section->para->type == para_Appendix)
- fprintf(fp, "</b>");
- if (section->para->words)
- {
- xhtml_para(fp, section->para->words);
- if(chm_toc)xhtml_para(chm_toc, section->para->words);
- if(chm_ind)xhtml_para(chm_ind, section->para->words);
- }
- fprintf(fp, "</a></li>\n");
- if(chm_toc)fprintf(chm_toc,"\"></OBJECT></li>\n");
- if(chm_ind)fprintf(chm_ind,"\"></OBJECT></li>\n");
- return TRUE;
-}
-
-/*
- * Write all the sections in this file. Do all paragraphs in this section, then all
- * children (recursively), then go on to the next one (tail recursively).
- */
-static void xhtml_do_sections(FILE * fp, xhtmlsection * sections)
-{
- while (sections)
- {
- currentsection = sections;
- xhtml_do_paras(fp, sections->para);
- xhtml_do_sections(fp, sections->child);
- sections = sections->next;
- }
-}
-
-/* Write this list of paragraphs. Close off all lists at the end. */
-static void xhtml_do_paras(FILE * fp, paragraph * p)
-{
- int last_type = -1, first = TRUE;
- if (!p)
- return;
-
-/* for (; p && (xhtml_para_level(p)>limit || xhtml_para_level(p)==-1 || first); p=p->next) {*/
- for (; p && (xhtml_para_level(p) == -1 || first); p = p->next)
- {
- first = FALSE;
- switch (p->type)
- {
- /*
- * Things we ignore because we've already processed them or
- * aren't going to touch them in this pass.
- */
- case para_IM:
- case para_BR:
- case para_Biblio: /* only touch BiblioCited */
- case para_VersionID:
- case para_Copyright:
- case para_Preamble:
- case para_NoCite:
- case para_Title:
- break;
-
- /*
- * Chapter titles.
- */
- case para_Chapter:
- case para_Appendix:
- case para_UnnumberedChapter:
- xhtml_heading(fp, p);
- break;
-
- case para_Heading:
- case para_Subsect:
- xhtml_heading(fp, p);
- break;
-
- case para_Rule:
- fprintf(fp, "\n<hr />\n");
- break;
-
- case para_Normal:
- fprintf(fp, "\n<p>");
- xhtml_para(fp, p->words);
- fprintf(fp, "</p>\n");
- break;
-
- case para_Bullet:
- case para_NumberedList:
- case para_BiblioCited:
- if (last_type != p->type)
- {
- /* start up list if necessary */
- if (p->type == para_Bullet)
- {
- fprintf(fp, "<ul>\n");
- } else if (p->type == para_NumberedList)
- {
- fprintf(fp, "<ol>\n");
- } else if (p->type == para_BiblioCited)
- {
- fprintf(fp, "<dl>\n");
- }
- }
- if (p->type == para_Bullet || p->type == para_NumberedList)
- fprintf(fp, "<li>");
- else if (p->type == para_BiblioCited)
- {
- fprintf(fp, "<dt>");
- xhtml_para(fp, p->kwtext);
- fprintf(fp, "</dt>\n<dd>");
- }
- xhtml_para(fp, p->words);
- if (p->type == para_BiblioCited)
- {
- fprintf(fp, "</dd>\n");
- } else if (p->type == para_Bullet || p->type == para_NumberedList)
- {
- fprintf(fp, "</li>");
- }
- if (p->type == para_Bullet || p->type == para_NumberedList
- || p->type == para_BiblioCited)
- /* close off list if necessary */
- {
- paragraph *p2 = p->next;
- int close_off = FALSE;
-/* if (p2 && (xhtml_para_level(p2)>limit || xhtml_para_level(p2)==-1)) {*/
- if (p2 && xhtml_para_level(p2) == -1)
- {
- if (p2->type != p->type)
- close_off = TRUE;
- } else
- {
- close_off = TRUE;
- }
- if (close_off)
- {
- if (p->type == para_Bullet)
- {
- fprintf(fp, "</ul>\n");
- } else if (p->type == para_NumberedList)
- {
- fprintf(fp, "</ol>\n");
- } else if (p->type == para_BiblioCited)
- {
- fprintf(fp, "</dl>\n");
- }
- }
- }
- break;
-
- case para_Code:
- xhtml_codepara(fp, p->words);
- break;
- }
- last_type = p->type;
- }
-}
-
-/*
- * Output a header for this XHTML file.
- */
-static void xhtml_doheader(FILE * fp, word * title)
-{
- fprintf(fp,
- "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n");
- fprintf(fp,
- "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
- fprintf(fp,
- "<html xmlns='http://www.w3.org/1999/xhtml'>\n\n<head>\n<title>");
- if (title == NULL)
- fprintf(fp, "Documentation");
- else
- xhtml_para(fp, title);
- fprintf(fp, "</title>\n");
- fprintf(fp,
- "<meta name=\"generator\" content=\"Halibut %s xhtml-backend\" />\n",
- version);
- if (conf.author)
- fprintf(fp, "<meta name=\"author\" content=\"%ls\" />\n", conf.author);
- if (conf.description)
- fprintf(fp, "<meta name=\"description\" content=\"%ls\" />\n",
- conf.description);
- if (conf.head_end)
- fprintf(fp, "%ls\n", conf.head_end);
- fprintf(fp, "</head>\n\n");
- if (conf.body)
- fprintf(fp, "%ls\n", conf.body);
- else
- fprintf(fp, "<body>\n");
- if (conf.body_start)
- fprintf(fp, "%ls\n", conf.body_start);
-}
-
-static void chm_doheader(FILE * fp, word * title)
-{
- fprintf(fp, "<HTML><BODY><UL><LI><OBJECT type=\"text/sitemap\"><param name=\"Name\" value=\"");
- xhtml_para(fp, title);
- fprintf(fp,"\"><param name=\"Local\" value=\"Contents.html\"></OBJECT></li>\n");
-}
-
-/*
- * Output a footer for this XHTML file.
- */
-static void xhtml_dofooter(FILE * fp)
-{
- fprintf(fp, "\n<hr />\n\n");
- if (conf.body_end)
- fprintf(fp, "%ls\n", conf.body_end);
- if (!conf.suppress_address)
- {
- fprintf(fp, "<address>\n");
- if (conf.address_start)
- fprintf(fp, "%ls\n", conf.address_start);
- /* Do the version ID */
- if (conf.include_version_id)
- {
- paragraph *p;
- int started = 0;
- for (p = sourceparas; p; p = p->next)
- if (p->type == para_VersionID)
- {
- xhtml_versionid(fp, p->words, started);
- started = 1;
- }
- }
- if (conf.address_end)
- fprintf(fp, "%ls\n", conf.address_end);
- fprintf(fp, "</address>\n");
- }
- fprintf(fp, "</body>\n\n</html>\n");
-}
-static void chm_dofooter(FILE * fp)
-{
- fprintf(fp, "</ul></BODY></HTML>\n");
-}
-
-/*
- * Output the versionid paragraph. Typically this is a version control
- * ID string (such as $Id...$ in RCS).
- */
-static void xhtml_versionid(FILE * fp, word * text, int started)
-{
- rdstringc t = { 0, 0, NULL };
-
- rdaddc(&t, '['); /* FIXME: configurability */
- xhtml_rdaddwc(&t, text, NULL);
- rdaddc(&t, ']'); /* FIXME: configurability */
-
- if (started)
- fprintf(fp, "<br>\n");
- fprintf(fp, "%s\n", t.text);
- sfree(t.text);
-}
-
-/* Is this an XHTML reserved character? */
-static int xhtml_reservedchar(int c)
-{
- if (c == '&' || c == '<' || c == '>' || c == '"')
- return TRUE;
- else
- return FALSE;
-}
-
-/*
- * Convert a wide string into valid XHTML: Anything outside ASCII will
- * be fixed up as an entity. Currently we don't worry about constraining the
- * encoded character set, which we should probably do at some point (we can
- * still fix up and return FALSE - see the last comment here). We also don't
- * currently
- *
- * Because this is only used for words, spaces are HARD spaces (any other
- * spaces will be word_Whitespace not word_Normal). So they become &nbsp;
- * Unless hard_spaces is FALSE, of course (code paragraphs break the above
- * rule).
- *
- * If `result' is non-NULL, mallocs the resulting string and stores a pointer to
- * it in `*result'. If `result' is NULL, merely checks whether all
- * characters in the string are feasible.
- *
- * Return is nonzero if all characters are OK. If not all
- * characters are OK but `result' is non-NULL, a result _will_
- * still be generated!
- */
-static int xhtml_convert(wchar_t * s, char **result, int hard_spaces)
-{
- int doing = (result != 0);
- int ok = TRUE;
- char *p = NULL;
- int plen = 0, psize = 0;
-
- for (; *s; s++)
- {
- wchar_t c = *s;
-
-#define ensure_size(i) if (i>=psize) { psize = i+256; p = resize(p, psize); }
-
- if (((c == 32 && !hard_spaces)
- || (c > 32 && c <= 126 && !xhtml_reservedchar(c))))
- {
- /* Char is OK. */
- if (doing)
- {
- ensure_size(plen);
- p[plen++] = (char) c;
- }
- } else
- {
- /* Char needs fixing up. */
- /* ok = FALSE; -- currently we never return FALSE; we
- * might want to when considering a character set for the
- * encoded document.
- */
- if (doing)
- {
- if (c == 32)
- { /* a space in a word is a hard space */
- ensure_size(plen + 7); /* includes space for the NUL, which is subsequently stomped on */
- sprintf(p + plen, "&nbsp;");
- plen += 6;
- } else
- {
- switch (c)
- {
- case '&':
- ensure_size(plen + 6); /* includes space for the NUL, which is subsequently stomped on */
- plen += sprintf(p + plen, "&amp;");
- break;
- case '"':
- ensure_size(plen + 7); /* includes space for the NUL, which is subsequently stomped on */
- plen += sprintf(p + plen, "&quot;");
- break;
- case '<':
- if (plen > 1 && *(s - 1) == '\\' && *(s - 2) == '\\')
- {
- ensure_size(--plen);
- p[plen - 1] = (char) c;
- p[plen] = 0;
- } else
- {
- ensure_size(plen + 5); /* includes space for the NUL, which is subsequently stomped on */
- plen += sprintf(p + plen, "&lt;");
- }
- break;
- case '>':
- if (plen > 1 && *(s - 1) == '\\' && *(s - 2) == '\\')
- {
- ensure_size(--plen);
- p[plen - 1] = (char) c;
- p[plen] = 0;
- } else
- {
- ensure_size(plen + 5); /* includes space for the NUL, which is subsequently stomped on */
- plen += sprintf(p + plen, "&gt;");
- }
- break;
- default:
- ensure_size(plen + 8); /* includes space for the NUL, which is subsequently stomped on */
- plen += sprintf(p + plen, "&#%04i;", (int) c);
- break;
- }
- }
- }
- }
- }
- if (doing)
- {
- p = resize(p, plen + 1);
- p[plen] = '\0';
- *result = p;
- }
-
- return ok;
-}
-
-/*
- * This formats the given words as XHTML.
- */
-static void xhtml_rdaddwc(rdstringc * rs, word * text, word * end)
-{
- char *c;
- keyword *kwl;
- xhtmlsection *sect;
- indextag *itag;
- int ti;
- wchar_t *s;
-
- for (; text && text != end; text = text->next)
- {
- switch (text->type)
- {
- case word_HyperLink:
- xhtml_utostr(text->text, &c);
- rdaddsc(rs, "<a href=\"");
- if(chm_toc && *c == '.' && *(c+1) == '.')
- rdaddsc(rs, c + 1);
- else
- rdaddsc(rs, c);
- rdaddsc(rs, "\">");
- sfree(c);
- break;
-
- case word_LocalHyperLink:
- xhtml_utostr(text->text, &c);
- rdaddsc(rs, "<a href=\"");
- if (conf.rlink_prefix)
- {
- char *c2;
- xhtml_utostr(conf.rlink_prefix, &c2);
- rdaddsc(rs, c2);
- sfree(c2);
- }
- rdaddsc(rs, c);
- if (conf.rlink_suffix)
- {
- char *c2;
- xhtml_utostr(conf.rlink_suffix, &c2);
- rdaddsc(rs, c2);
- sfree(c2);
- }
- rdaddsc(rs, "\">");
- sfree(c);
- break;
-
- case word_UpperXref:
- case word_LowerXref:
- case word_FreeTextXref:
- kwl = kw_lookup(keywords, text->text);
- if (kwl)
- {
- sect = xhtml_find_section(kwl->para);
- if (sect)
- {
- rdaddsc(rs, "<a href=\"");
- rdaddsc(rs, sect->file->filename);
- rdaddc(rs, '#');
- rdaddsc(rs, sect->fragment);
- rdaddsc(rs, "\">");
- } else
- {
- rdaddsc(rs,
- "<a href=\"Apologies.html\"><!-- probably a bibliography cross reference -->");
- error(err_whatever,
- "Couldn't locate cross-reference! (Probably a bibliography entry.)");
- }
- } else
- {
- rdaddsc(rs,
- "<a href=\"Apologies.html\"><!-- unknown cross-reference -->");
- error(err_whatever,
- "Couldn't locate cross-reference! (Wasn't in source file.)");
- }
- break;
-
- case word_IndexRef: /* in theory we could make an index target here */
-/* rdaddsc(rs, "<a name=\"idx-");
- xhtml_utostr(text->text, &c);
- rdaddsc(rs, c);
- sfree(c);
- rdaddsc(rs, "\"></a>");*/
- /* what we _do_ need to do is to fix up the backend data
- * for any indexentry this points to.
- */
- for (ti = 0;
- (itag = (indextag *) index234(idx->tags, ti)) != NULL; ti++)
- {
- /* FIXME: really ustricmp() and not ustrcmp()? */
- if (ustricmp(itag->name, text->text) == 0)
- {
- break;
- }
- }
- if (itag != NULL)
- {
- if (itag->refs != NULL)
- {
- int i;
- for (i = 0; i < itag->nrefs; i++)
- {
- xhtmlindex *idx_ref;
- indexentry *ientry;
-
- ientry = itag->refs[i];
- if (ientry->backend_data == NULL)
- {
- idx_ref = (xhtmlindex *) smalloc(sizeof(xhtmlindex));
- if (idx_ref == NULL)
- fatal(err_nomemory);
- idx_ref->nsection = 0;
- idx_ref->size = 4;
- idx_ref->sections =
- (xhtmlsection **) smalloc(idx_ref->size *
- sizeof(xhtmlsection *));
- if (idx_ref->sections == NULL)
- fatal(err_nomemory);
- ientry->backend_data = idx_ref;
- } else
- {
- idx_ref = ientry->backend_data;
- if (idx_ref->nsection + 1 > idx_ref->size)
- {
- int new_size = idx_ref->size * 2;
- idx_ref->sections =
- srealloc(idx_ref->sections,
- new_size * sizeof(xhtmlsection));
- if (idx_ref->sections == NULL)
- {
- fatal(err_nomemory);
- }
- idx_ref->size = new_size;
- }
- }
- idx_ref->sections[idx_ref->nsection++] = currentsection;
-#if 0
-#endif
- }
- } else
- {
- fatal(err_whatever, "Index tag had no entries!");
- }
- } else
- {
- fprintf(stderr, "Looking for index entry '%ls'\n", text->text);
- fatal(err_whatever,
- "Couldn't locate index entry! (Wasn't in index.)");
- }
- break;
-
- case word_HyperEnd:
- case word_XrefEnd:
- rdaddsc(rs, "</a>");
- break;
-
- case word_Normal:
- case word_Emph:
- case word_Code:
- case word_WeakCode:
- case word_WhiteSpace:
- case word_EmphSpace:
- case word_CodeSpace:
- case word_WkCodeSpace:
- case word_Quote:
- case word_EmphQuote:
- case word_CodeQuote:
- case word_WkCodeQuote:
- assert(text->type != word_CodeQuote &&
- text->type != word_WkCodeQuote);
- if (towordstyle(text->type) == word_Emph &&
- (attraux(text->aux) == attr_First ||
- attraux(text->aux) == attr_Only))
- rdaddsc(rs, "<em>");
- else if ((towordstyle(text->type) == word_Code
- || towordstyle(text->type) == word_WeakCode)
- && (attraux(text->aux) == attr_First
- || attraux(text->aux) == attr_Only))
- rdaddsc(rs, "<code>");
-
- if (removeattr(text->type) == word_Normal)
- {
- static int dont_convert = 0;
- if (dont_convert)
- {
- char buf[2] = " ";
- dont_convert = 0;
- s = text->text;
- for (; *s; s++)
- {
- buf[0] = (char) *s;
- rdaddsc(rs, buf);
- }
- buf[0] = 0;
- rdaddsc(rs, buf);
- } else
- {
- if (*text->text == '\\' && text->next
- && text->next->text && (*text->next->text == '&'
- || *text->next->text == '<'
- || *text->next->text == '>'
- || *text->next->text == '"'))
- dont_convert = 1;
- else
- {
- if (xhtml_convert(text->text, &c, TRUE)) /* spaces in the word are hard */
- rdaddsc(rs, c);
- else
- xhtml_rdaddwc(rs, text->alt, NULL);
- sfree(c);
- }
- }
- } else if (removeattr(text->type) == word_WhiteSpace)
- {
- rdaddc(rs, ' ');
- } else if (removeattr(text->type) == word_Quote)
- {
- rdaddsc(rs, "&quot;");
- }
-
- if (towordstyle(text->type) == word_Emph &&
- (attraux(text->aux) == attr_Last ||
- attraux(text->aux) == attr_Only))
- rdaddsc(rs, "</em>");
- else if ((towordstyle(text->type) == word_Code
- || towordstyle(text->type) == word_WeakCode)
- && (attraux(text->aux) == attr_Last
- || attraux(text->aux) == attr_Only))
- rdaddsc(rs, "</code>");
- break;
- }
- }
-}
-
-/* Output a heading, formatted as XHTML.
- */
-static void xhtml_heading(FILE * fp, paragraph * p)
-{
- rdstringc t = { 0, 0, NULL };
- word *tprefix = p->kwtext;
- word *nprefix = p->kwtext2;
- word *text = p->words;
- int level = xhtml_para_level(p);
- xhtmlsection *sect = xhtml_find_section(p);
- xhtmlheadfmt *fmt;
- char *fragment;
- if (sect)
- {
- fragment = sect->fragment;
- } else
- {
- if (p->type == para_Title)
- fragment = "title";
- else
- {
- fragment = ""; /* FIXME: what else can we do? */
- error(err_whatever, "Couldn't locate heading cross-reference!");
- }
- }
-
- if (p->type == para_Title)
- fmt = NULL;
- else if (level == 1)
- fmt = &conf.fchapter;
- else if (level - 1 < conf.nfsect)
- fmt = &conf.fsect[level - 1];
- else
- fmt = &conf.fsect[conf.nfsect - 1];
-
- if (fmt && fmt->just_numbers && nprefix)
- {
- xhtml_rdaddwc(&t, nprefix, NULL);
- if (fmt)
- {
- char *c;
- if (xhtml_convert(fmt->number_suffix, &c, FALSE))
- {
- rdaddsc(&t, c);
- sfree(c);
- }
- }
- } else if (fmt && !fmt->just_numbers && tprefix)
- {
- xhtml_rdaddwc(&t, tprefix, NULL);
- if (fmt)
- {
- char *c;
- if (xhtml_convert(fmt->number_suffix, &c, FALSE))
- {
- rdaddsc(&t, c);
- sfree(c);
- }
- }
- }
- xhtml_rdaddwc(&t, text, NULL);
- /*
- * If we're outputting in single-file mode, we need to lower
- * the level of each heading by one, because the overall
- * document title will be sitting right at the top as an <h1>
- * and so chapters and sections should start at <h2>.
- *
- * Even if not, the document title will come back from
- * xhtml_para_level() as level zero, so we must increment that
- * no matter what leaf_level is set to.
- */
- if (conf.leaf_level == 0 || level == 0)
- level++;
- fprintf(fp, "<a name=\"%s\"></a><h%i>%s</h%i>\n", fragment, level,
- t.text, level);
- sfree(t.text);
-}
-
-/* Output a paragraph. Styles are handled by xhtml_rdaddwc().
- * This looks pretty simple; I may have missed something ...
- */
-static void xhtml_para(FILE * fp, word * text)
-{
- rdstringc out = { 0, 0, NULL };
- xhtml_rdaddwc(&out, text, NULL);
- fprintf(fp, "%s", out.text);
- sfree(out.text);
-}
-
-/* Output a code paragraph. I'm treating this as preformatted, which
- * may not be entirely correct. See xhtml_para() for my worries about
- * this being overly-simple; however I think that most of the complexity
- * of the text backend came entirely out of word wrapping anyway.
- */
-static void xhtml_codepara(FILE * fp, word * text)
-{
- fprintf(fp, "<pre>");
- for (; text; text = text->next)
- if (text->type == word_WeakCode)
- {
- char *c;
- xhtml_convert(text->text, &c, FALSE);
- fprintf(fp, "%s\n", c);
- sfree(c);
- }
- fprintf(fp, "</pre>\n");
-}
+/*
+ * xhtml backend for Halibut
+ * (initial implementation by James Aylett)
+ *
+ * Still to do:
+ *
+ * +++ doesn't handle non-breaking hyphens. Not sure how to yet.
+ * +++ entity names (from a file -- ideally supply normal SGML files)
+ * +++ configuration directive to file split where the current layout
+ * code wouldn't. Needs changes to _ponder_layout() and _do_paras(),
+ * perhaps others.
+ *
+ * Limitations:
+ *
+ * +++ biblio/index references target the nearest section marker, rather
+ * than having a dedicated target themselves. In large bibliographies
+ * this will cause problems. (The solution is to fake up a response
+ * from xhtml_find_section(), probably linking it into the sections
+ * chain just in case we need it again, and to make freeing it up
+ * easier.) docsrc.pl used to work as we do, however, and SGT agrees that
+ * this is acceptable for now.
+ * +++ can't cope with leaf-level == 0. It's all to do with the
+ * top-level file not being normal, probably not even having a valid
+ * section level, and stuff like that. I question whether this is an
+ * issue, frankly; small manuals that fit on one page should probably
+ * not be written in halibut at all.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "halibut.h"
+
+struct xhtmlsection_Struct {
+ struct xhtmlsection_Struct *next; /* next sibling (NULL if split across files) */
+ struct xhtmlsection_Struct *child; /* NULL if split across files */
+ struct xhtmlsection_Struct *parent; /* NULL if split across files */
+ struct xhtmlsection_Struct *chain; /* single structure independent of weird trees */
+ paragraph *para;
+ struct xhtmlfile_Struct *file; /* which file is this a part of? */
+ char *fragment; /* fragment id within the file */
+ int level;
+};
+
+struct xhtmlfile_Struct {
+ struct xhtmlfile_Struct *next;
+ struct xhtmlfile_Struct *child;
+ struct xhtmlfile_Struct *parent;
+ char *filename;
+ struct xhtmlsection_Struct *sections; /* sections within this file (only one for non-leaf) */
+ int is_leaf; /* is this file a leaf file, ie does it not have any children? */
+};
+
+typedef struct xhtmlsection_Struct xhtmlsection;
+typedef struct xhtmlfile_Struct xhtmlfile;
+typedef struct xhtmlindex_Struct xhtmlindex;
+
+struct xhtmlindex_Struct {
+ int nsection;
+ int size;
+ xhtmlsection **sections;
+};
+
+typedef struct {
+ int just_numbers;
+ wchar_t *number_suffix;
+} xhtmlheadfmt;
+
+typedef struct {
+ int contents_depth[6];
+ int leaf_contains_contents;
+ int leaf_level;
+ int leaf_smallest_contents;
+ int include_version_id;
+ wchar_t *author, *description;
+ wchar_t *head_end, *body, *body_start, *body_end, *address_start,
+ *address_end, *nav_attrs;
+ wchar_t *rlink_prefix, *rlink_suffix;
+ wchar_t *chm_toc_file, *chm_ind_file;
+ int suppress_address;
+ xhtmlheadfmt fchapter, *fsect;
+ int nfsect;
+} xhtmlconfig;
+
+/*static void xhtml_level(paragraph *, int);
+static void xhtml_level_0(paragraph *);
+static void xhtml_docontents(FILE *, paragraph *, int);
+static void xhtml_dosections(FILE *, paragraph *, int);
+static void xhtml_dobody(FILE *, paragraph *, int);*/
+
+static void xhtml_doheader(FILE *, word *);
+static void xhtml_dofooter(FILE *);
+static void xhtml_versionid(FILE *, word *, int);
+
+static void xhtml_utostr(wchar_t *, char **);
+static int xhtml_para_level(paragraph *);
+static int xhtml_reservedchar(int);
+
+static int xhtml_convert(wchar_t *, char **, int);
+static void xhtml_rdaddwc(rdstringc *, word *, word *);
+static void xhtml_para(FILE *, word *);
+static void xhtml_codepara(FILE *, word *);
+static void xhtml_heading(FILE *, paragraph *);
+
+static void chm_doheader(FILE *, word *);
+static void chm_dofooter(FILE *);
+/* File-global variables are much easier than passing these things
+ * all over the place. Evil, but easier. We can replace this with a single
+ * structure at some point.
+ */
+static xhtmlconfig conf;
+static keywordlist *keywords;
+static indexdata *idx;
+static xhtmlfile *topfile;
+static xhtmlsection *topsection;
+static paragraph *sourceparas;
+static xhtmlfile *lastfile;
+static xhtmlfile *xhtml_last_file = NULL;
+static int last_level = -1;
+static xhtmlsection *currentsection;
+static FILE* chm_toc = NULL;
+static FILE* chm_ind = NULL;
+
+
+static xhtmlconfig xhtml_configure(paragraph * source)
+{
+ xhtmlconfig ret;
+
+ /*
+ * Defaults.
+ */
+ ret.contents_depth[0] = 2;
+ ret.contents_depth[1] = 3;
+ ret.contents_depth[2] = 4;
+ ret.contents_depth[3] = 5;
+ ret.contents_depth[4] = 6;
+ ret.contents_depth[5] = 7;
+ ret.leaf_level = 2;
+ ret.leaf_smallest_contents = 4;
+ ret.leaf_contains_contents = FALSE;
+ ret.include_version_id = TRUE;
+ ret.author = NULL;
+ ret.description = NULL;
+ ret.head_end = NULL;
+ ret.body = NULL;
+ ret.body_start = NULL;
+ ret.body_end = NULL;
+ ret.address_start = NULL;
+ ret.address_end = NULL;
+ ret.nav_attrs = NULL;
+ ret.suppress_address = FALSE;
+ ret.chm_toc_file = NULL;
+ ret.chm_ind_file = NULL;
+ chm_toc = NULL;
+ chm_ind = NULL;
+ ret.fchapter.just_numbers = FALSE;
+ ret.fchapter.number_suffix = ustrdup(L": ");
+ ret.nfsect = 2;
+ ret.fsect = mknewa(xhtmlheadfmt, ret.nfsect);
+ ret.fsect[0].just_numbers = FALSE;
+ ret.fsect[0].number_suffix = ustrdup(L": ");
+ ret.fsect[1].just_numbers = TRUE;
+ ret.fsect[1].number_suffix = ustrdup(L" ");
+ ret.rlink_prefix = NULL;
+ ret.rlink_suffix = NULL;
+
+ for (; source; source = source->next)
+ {
+ if (source->type == para_Config)
+ {
+ if (!ustricmp(source->keyword, L"xhtml-contents-depth-0"))
+ {
+ ret.contents_depth[0] = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-1"))
+ {
+ ret.contents_depth[1] = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-2"))
+ {
+ ret.contents_depth[2] = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-3"))
+ {
+ ret.contents_depth[3] = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-4"))
+ {
+ ret.contents_depth[4] = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-contents-depth-5"))
+ {
+ ret.contents_depth[5] = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-leaf-level"))
+ {
+ ret.leaf_level = utoi(uadv(source->keyword));
+ } else
+ if (!ustricmp(source->keyword, L"xhtml-leaf-smallest-contents"))
+ {
+ ret.leaf_smallest_contents = utoi(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-versionid"))
+ {
+ ret.include_version_id = utob(uadv(source->keyword));
+ } else
+ if (!ustricmp(source->keyword, L"xhtml-leaf-contains-contents"))
+ {
+ ret.leaf_contains_contents = utob(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-suppress-address"))
+ {
+ ret.suppress_address = utob(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-author"))
+ {
+ ret.author = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"chm-toc-file"))
+ {
+ ret.chm_toc_file = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"chm-ind-file"))
+ {
+ ret.chm_ind_file = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-description"))
+ {
+ ret.description = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-head-end"))
+ {
+ ret.head_end = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-body-start"))
+ {
+ ret.body_start = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-body-tag"))
+ {
+ ret.body = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-body-end"))
+ {
+ ret.body_end = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-address-start"))
+ {
+ ret.address_start = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-address-end"))
+ {
+ ret.address_end = uadv(source->keyword);
+ } else
+ if (!ustricmp(source->keyword, L"xhtml-navigation-attributes"))
+ {
+ ret.nav_attrs = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-chapter-numeric"))
+ {
+ ret.fchapter.just_numbers = utob(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-chapter-suffix"))
+ {
+ ret.fchapter.number_suffix = ustrdup(uadv(source->keyword));
+ } else if (!ustricmp(source->keyword, L"xhtml-rlink-prefix"))
+ {
+ ret.rlink_prefix = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-rlink-suffix"))
+ {
+ ret.rlink_suffix = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"xhtml-section-numeric"))
+ {
+ wchar_t *p = uadv(source->keyword);
+ int n = 0;
+ if (uisdigit(*p))
+ {
+ n = utoi(p);
+ p = uadv(p);
+ }
+ if (n >= ret.nfsect)
+ {
+ int i;
+ ret.fsect = resize(ret.fsect, n + 1);
+ for (i = ret.nfsect; i <= n; i++)
+ ret.fsect[i] = ret.fsect[ret.nfsect - 1];
+ ret.nfsect = n + 1;
+ }
+ ret.fsect[n].just_numbers = utob(p);
+ } else if (!ustricmp(source->keyword, L"xhtml-section-suffix"))
+ {
+ wchar_t *p = uadv(source->keyword);
+ int n = 0;
+ if (uisdigit(*p))
+ {
+ n = utoi(p);
+ p = uadv(p);
+ }
+ if (n >= ret.nfsect)
+ {
+ int i;
+ ret.fsect = resize(ret.fsect, n + 1);
+ for (i = ret.nfsect; i <= n; i++)
+ ret.fsect[i] = ret.fsect[ret.nfsect - 1];
+ ret.nfsect = n + 1;
+ }
+ ret.fsect[n].number_suffix = ustrdup(p);
+ }
+ }
+ }
+
+ /* printf(" !!! leaf_level = %i\n", ret.leaf_level);
+ printf(" !!! contentdepth-0 = %i\n", ret.contents_depth[0]);
+ printf(" !!! contentdepth-1 = %i\n", ret.contents_depth[1]);
+ printf(" !!! contentdepth-2 = %i\n", ret.contents_depth[2]);
+ printf(" !!! contentdepth-3 = %i\n", ret.contents_depth[3]);
+ printf(" !!! contentdepth-4 = %i\n", ret.contents_depth[4]);
+ printf(" !!! contentdepth-5 = %i\n", ret.contents_depth[5]);
+ printf(" !!! leaf_contains_contents = %i\n", ret.leaf_contains_contents); */
+ return ret;
+}
+
+static xhtmlsection *xhtml_new_section(xhtmlsection * last)
+{
+ xhtmlsection *ret = mknew(xhtmlsection);
+ ret->next = NULL;
+ ret->child = NULL;
+ ret->parent = NULL;
+ ret->chain = last;
+ ret->para = NULL;
+ ret->file = NULL;
+ ret->fragment = NULL;
+ ret->level = -1; /* marker: end of chain */
+ return ret;
+}
+
+/* Returns NULL or the section that marks that paragraph */
+static xhtmlsection *xhtml_find_section(paragraph * p)
+{
+ xhtmlsection *ret = topsection;
+ if (xhtml_para_level(p) == -1)
+ { /* first, we back-track to a section paragraph */
+ paragraph *p2 = sourceparas;
+ paragraph *p3 = NULL;
+ while (p2 && p2 != p)
+ {
+ if (xhtml_para_level(p2) != -1)
+ {
+ p3 = p2;
+ }
+ p2 = p2->next;
+ }
+ if (p3 == NULL)
+ { /* for some reason, we couldn't find a section before this paragraph ... ? */
+ /* Note that this can happen, if you have a cross-reference to before the first chapter starts.
+ * So don't do that, then.
+ */
+ return NULL;
+ }
+ p = p3;
+ }
+ while (ret && ret->para != p)
+ {
+/* printf(" xhtml_find_section(): checking %s for para @ %p\n", ret->fragment, p);*/
+ ret = ret->chain;
+ }
+ return ret;
+}
+
+static xhtmlfile *xhtml_new_file(xhtmlsection * sect)
+{
+ xhtmlfile *ret = mknew(xhtmlfile);
+
+ ret->next = NULL;
+ ret->child = NULL;
+ ret->parent = NULL;
+ ret->filename = NULL;
+ ret->sections = sect;
+ ret->is_leaf = (sect != NULL && sect->level == conf.leaf_level);
+ if (sect == NULL)
+ {
+ if (conf.leaf_level == 0)
+ { /* currently unused */
+#define FILENAME_MANUAL "Manual.html"
+#define FILENAME_CONTENTS "Contents.html"
+ ret->filename = smalloc(strlen(FILENAME_MANUAL) + 1);
+ sprintf(ret->filename, FILENAME_MANUAL);
+ } else
+ {
+ ret->filename = smalloc(strlen(FILENAME_CONTENTS) + 1);
+ sprintf(ret->filename, FILENAME_CONTENTS);
+ }
+ } else
+ {
+ paragraph *p = sect->para;
+ rdstringc fname_c = { 0, 0, NULL };
+ char *c;
+ word *w;
+ for (w = (p->kwtext) ? (p->kwtext) : (p->words); w; w = w->next)
+ {
+ switch (removeattr(w->type))
+ {
+ case word_Normal:
+ /*case word_Emph:
+ case word_Code:
+ case word_WeakCode: */
+ xhtml_utostr(w->text, &c);
+ rdaddsc(&fname_c, c);
+ sfree(c);
+ break;
+ }
+ }
+ rdaddsc(&fname_c, ".html");
+ ret->filename = rdtrimc(&fname_c);
+ }
+ /* printf(" ! new file '%s', is_leaf == %s\n", ret->filename, (ret->is_leaf)?("true"):("false")); */
+ return ret;
+}
+
+/*
+ * Walk the tree fixing up files which are actually leaf (ie
+ * have no children) but aren't at leaf level, so they have the
+ * leaf flag set.
+ */
+void xhtml_fixup_layout(xhtmlfile * file)
+{
+ if (file->child == NULL)
+ {
+ file->is_leaf = TRUE;
+ } else
+ {
+ xhtml_fixup_layout(file->child);
+ }
+ if (file->next)
+ xhtml_fixup_layout(file->next);
+}
+
+/*
+ * Create the tree structure so we know where everything goes.
+ * Method:
+ *
+ * Ignoring file splitting, we have three choices with each new section:
+ *
+ * +-----------------+-----------------+
+ * | | |
+ * X +----X----+ (1)
+ * | |
+ * Y (2)
+ * |
+ * (3)
+ *
+ * Y is the last section we added (currentsect).
+ * If sect is the section we want to add, then:
+ *
+ * (1) if sect->level < currentsect->level
+ * (2) if sect->level == currentsect->level
+ * (3) if sect->level > currentsect->level
+ *
+ * This requires the constraint that you never skip section numbers
+ * (so you can't have a.b.c.d without all of a, a.b and a.b.c existing).
+ *
+ * Note that you _can_ have 1.1.1.1 followed by 1.2 - you can change
+ * more than one level at a time. Lots of asserts, and probably part of
+ * the algorithm here, rely on this being true. (It currently isn't
+ * enforced by halibut, however.)
+ *
+ * File splitting makes this harder. For instance, say we added at (3)
+ * above and now need to add another section. We are splitting at level
+ * 2, ie the level of Y. Z is the last section we added:
+ *
+ * +-----------------+-----------------+
+ * | | |
+ * X +----X----+ (1)
+ * | |
+ * +----Y----+ (1)
+ * | |
+ * Z (2)
+ * |
+ * (3)
+ *
+ * The (1) case is now split; we need to search upwards to find where
+ * to actually link in. The other two cases remain the same (and will
+ * always be like this).
+ *
+ * File splitting makes this harder, however. The decision of whether
+ * to split to a new file is always on the same condition, however (is
+ * the level of this section higher than the leaf_level configuration
+ * value or not).
+ *
+ * Treating the cases backwards:
+ *
+ * (3) same file if sect->level > conf.leaf_level, otherwise new file
+ *
+ * if in the same file, currentsect->child points to sect
+ * otherwise the linking is done through the file tree (which works
+ * in more or less the same way, ie currentfile->child points to
+ * the new file)
+ *
+ * (2) same file if sect->level > conf.leaf_level, otherwise new file
+ *
+ * if in the same file, currentsect->next points to sect
+ * otherwise file linking and currentfile->next points to the new
+ * file (we know that Z must have caused a new file to be created)
+ *
+ * (1) same file if sect->level > conf.leaf_level, otherwise new file
+ *
+ * this is actually effectively the same case as (2) here,
+ * except that we first have to travel up the sections to figure
+ * out which section this new one will be a sibling of. In doing
+ * so, we may disappear off the top of a file and have to go up
+ * to its parent in the file tree.
+ *
+ */
+static void xhtml_ponder_layout(paragraph * p)
+{
+ xhtmlsection *lastsection;
+ xhtmlsection *currentsect;
+ xhtmlfile *currentfile;
+
+ lastfile = NULL;
+ topsection = xhtml_new_section(NULL);
+ topfile = xhtml_new_file(NULL);
+ lastsection = topsection;
+ currentfile = topfile;
+ currentsect = topsection;
+
+ if (conf.leaf_level == 0)
+ {
+ topfile->is_leaf = 1;
+ topfile->sections = topsection;
+ topsection->file = topfile;
+ }
+
+ for (; p; p = p->next)
+ {
+ int level = xhtml_para_level(p);
+ if (level > 0)
+ { /* actually a section */
+ xhtmlsection *sect;
+ word *w;
+ char *c;
+ rdstringc fname_c = { 0, 0, NULL };
+
+ sect = xhtml_new_section(lastsection);
+ lastsection = sect;
+ sect->para = p;
+ for (w = (p->kwtext2) ? (p->kwtext2) : (p->words); w; w = w->next)
+ { /* kwtext2 because we want numbers only! */
+ switch (removeattr(w->type))
+ {
+ case word_Normal:
+ /*case word_Emph:
+ case word_Code:
+ case word_WeakCode: */
+ xhtml_utostr(w->text, &c);
+ rdaddsc(&fname_c, c);
+ sfree(c);
+ break;
+ }
+ }
+/* rdaddsc(&fname_c, ".html");*/
+ sect->fragment = rdtrimc(&fname_c);
+ sect->level = level;
+ /* printf(" ! adding para @ %p as sect %s, level %i\n", sect->para, sect->fragment, level); */
+
+ if (level > currentsect->level)
+ { /* case (3) */
+ if (level > conf.leaf_level)
+ { /* same file */
+ assert(currentfile->is_leaf);
+ currentsect->child = sect;
+ sect->parent = currentsect;
+ sect->file = currentfile;
+ /* printf("connected '%s' to existing file '%s' [I]\n", sect->fragment, currentfile->filename); */
+ currentsect = sect;
+ } else
+ { /* new file */
+ xhtmlfile *file = xhtml_new_file(sect);
+ assert(!currentfile->is_leaf);
+ currentfile->child = file;
+ sect->file = file;
+ file->parent = currentfile;
+ /* printf("connected '%s' to new file '%s' [I]\n", sect->fragment, file->filename); */
+ currentfile = file;
+ currentsect = sect;
+ }
+ } else if (level >= currentsect->file->sections->level)
+ {
+ /* Case (1) or (2) *AND* still under the section that starts
+ * the current file.
+ *
+ * I'm not convinced that this couldn't be rolled in with the
+ * final else {} leg further down. It seems a lot of effort
+ * this way.
+ */
+ if (level > conf.leaf_level)
+ { /* stick within the same file */
+ assert(currentfile->is_leaf);
+ sect->file = currentfile;
+ while (currentsect && currentsect->level > level &&
+ currentsect->file == currentsect->parent->file)
+ {
+ currentsect = currentsect->parent;
+ }
+ assert(currentsect);
+ currentsect->next = sect;
+ assert(currentsect->level == sect->level);
+ sect->parent = currentsect->parent;
+ currentsect = sect;
+ /* printf("connected '%s' to existing file '%s' [II]\n", sect->fragment, currentfile->filename); */
+ } else
+ { /* new file */
+ xhtmlfile *file = xhtml_new_file(sect);
+ sect->file = file;
+ currentfile->next = file;
+ file->parent = currentfile->parent;
+ file->is_leaf = (level == conf.leaf_level);
+ file->sections = sect;
+ /* printf("connected '%s' to new file '%s' [II]\n", sect->fragment, file->filename); */
+ currentfile = file;
+ currentsect = sect;
+ }
+ } else
+ { /* Case (1) or (2) and we must move up the file tree first */
+ /* this loop is now probably irrelevant - we know we can't connect
+ * to anything in the current file */
+ while (currentsect && level < currentsect->level)
+ {
+ currentsect = currentsect->parent;
+ if (currentsect)
+ {
+ /* printf(" * up one level to '%s'\n", currentsect->fragment); */
+ } else
+ {
+ /* printf(" * up one level (off top of current file)\n"); */
+ }
+ }
+ if (currentsect)
+ {
+ /* I'm pretty sure this can now never fire */
+ assert(currentfile->is_leaf);
+ /* printf("connected '%s' to existing file '%s' [III]\n", sect->fragment, currentfile->filename); */
+ sect->file = currentfile;
+ currentsect->next = sect;
+ currentsect = sect;
+ } else
+ { /* find a file we can attach to */
+ while (currentfile && currentfile->sections
+ && level < currentfile->sections->level)
+ {
+ currentfile = currentfile->parent;
+ if (currentfile)
+ {
+ /* printf(" * up one file level to '%s'\n", currentfile->filename); */
+ } else
+ {
+ /* printf(" * up one file level (off top of tree)\n"); */
+ }
+ }
+ if (currentfile)
+ { /* new file (we had to skip up a file to
+ get here, so we must be dealing with a
+ level no lower than the configured
+ leaf_level */
+ xhtmlfile *file = xhtml_new_file(sect);
+ currentfile->next = file;
+ sect->file = file;
+ file->parent = currentfile->parent;
+ file->is_leaf = (level == conf.leaf_level);
+ file->sections = sect;
+ /* printf("connected '%s' to new file '%s' [III]\n", sect->fragment, file->filename); */
+ currentfile = file;
+ currentsect = sect;
+ } else
+ {
+ fatal(err_whatever,
+ "Ran off the top trying to connect sibling: strange document.");
+ }
+ }
+ }
+ }
+ }
+ topsection = lastsection; /* get correct end of the chain */
+ xhtml_fixup_layout(topfile); /* leaf files not at leaf level marked as such */
+}
+
+static void xhtml_do_index();
+static void xhtml_do_file(xhtmlfile * file);
+static void xhtml_do_top_file(xhtmlfile * file, paragraph * sourceform);
+static void xhtml_do_paras(FILE * fp, paragraph * p);
+static int xhtml_do_contents_limit(FILE * fp, xhtmlfile * file, int limit);
+static int xhtml_do_contents_section_limit(FILE * fp, xhtmlsection * section, int limit);
+static int xhtml_add_contents_entry(FILE * fp, xhtmlsection * section, int limit);
+static int xhtml_do_contents(FILE * fp, xhtmlfile * file);
+static int xhtml_do_naked_contents(FILE * fp, xhtmlfile * file);
+static void xhtml_do_sections(FILE * fp, xhtmlsection * sections);
+
+/*
+ * Do all the files in this structure.
+ */
+static void xhtml_do_files(xhtmlfile * file)
+{
+ xhtml_do_file(file);
+ if (file->child)
+ xhtml_do_files(file->child);
+ if (file->next)
+ xhtml_do_files(file->next);
+}
+
+/*
+ * Free up all memory used by the file tree from 'xfile' downwards
+ */
+static void xhtml_free_file(xhtmlfile * xfile)
+{
+ if (xfile == NULL)
+ {
+ return;
+ }
+
+ if (xfile->filename)
+ {
+ sfree(xfile->filename);
+ }
+ xhtml_free_file(xfile->child);
+ xhtml_free_file(xfile->next);
+ sfree(xfile);
+}
+
+/*
+ * Main function.
+ */
+void
+xhtml_backend(paragraph * sourceform, keywordlist * in_keywords,
+ indexdata * in_idx)
+{
+/* int i;*/
+ indexentry *ientry;
+ int ti;
+ xhtmlsection *xsect;
+
+ sourceparas = sourceform;
+ conf = xhtml_configure(sourceform);
+ keywords = in_keywords;
+ idx = in_idx;
+
+ /* Clear up the index entries backend data pointers */
+ for (ti = 0;
+ (ientry = (indexentry *) index234(idx->entries, ti)) != NULL; ti++)
+ {
+ ientry->backend_data = NULL;
+ }
+
+ xhtml_ponder_layout(sourceform);
+
+ /* old system ... (writes to *.alt, but gets some stuff wrong and is ugly) */
+/* xhtml_level_0(sourceform);
+ for (i=1; i<=conf.leaf_level; i++)
+ {
+ xhtml_level(sourceform, i);
+ }*/
+
+ /* new system ... (writes to *.html, but isn't fully trusted) */
+ xhtml_do_top_file(topfile, sourceform);
+ assert(!topfile->next); /* shouldn't have a sibling at all */
+ if (topfile->child)
+ {
+ xhtml_do_files(topfile->child);
+ xhtml_do_index();
+ }
+
+ /* release file, section, index data structures */
+ xsect = topsection;
+ while (xsect)
+ {
+ xhtmlsection *tmp = xsect->chain;
+ if (xsect->fragment)
+ {
+ sfree(xsect->fragment);
+ }
+ sfree(xsect);
+ xsect = tmp;
+ }
+ xhtml_free_file(topfile);
+ for (ti = 0;
+ (ientry = (indexentry *) index234(idx->entries, ti)) != NULL; ti++)
+ {
+ if (ientry->backend_data != NULL)
+ {
+ xhtmlindex *xi = (xhtmlindex *) ientry->backend_data;
+ if (xi->sections != NULL)
+ {
+ sfree(xi->sections);
+ }
+ sfree(xi);
+ }
+ ientry->backend_data = NULL;
+ }
+ {
+ int i;
+ sfree(conf.fchapter.number_suffix);
+ for (i = 0; i < conf.nfsect; i++)
+ sfree(conf.fsect[i].number_suffix);
+ sfree(conf.fsect);
+ }
+}
+
+static int xhtml_para_level(paragraph * p)
+{
+ switch (p->type)
+ {
+ case para_Title:
+ return 0;
+ break;
+ case para_UnnumberedChapter:
+ case para_Chapter:
+ case para_Appendix:
+ return 1;
+ break;
+/* case para_BiblioCited:
+ return 2;
+ break;*/
+ case para_Heading:
+ case para_Subsect:
+ return p->aux + 2;
+ break;
+ default:
+ return -1;
+ break;
+ }
+}
+
+static char *xhtml_index_filename = "IndexPage.html";
+
+/* Output the nav links for the current file.
+ * file == NULL means we're doing the index
+ */
+static void xhtml_donavlinks(FILE * fp, xhtmlfile * file)
+{
+ xhtmlfile *xhtml_next_file = NULL;
+ fprintf(fp, "<p");
+ if (conf.nav_attrs != NULL)
+ {
+ fprintf(fp, " %ls>", conf.nav_attrs);
+ } else
+ {
+ fprintf(fp, ">");
+ }
+ if (xhtml_last_file == NULL)
+ {
+ fprintf(fp, "Previous | ");
+ } else
+ {
+ fprintf(fp, "<a href='%s'>Previous</a> | ", xhtml_last_file->filename);
+ }
+ fprintf(fp, "<a href='Contents.html'>Contents</a> | ");
+ if (file != NULL)
+ { /* otherwise we're doing nav links for the index */
+ if (xhtml_next_file == NULL)
+ xhtml_next_file = file->child;
+ if (xhtml_next_file == NULL)
+ xhtml_next_file = file->next;
+ if (xhtml_next_file == NULL)
+ xhtml_next_file = file->parent->next;
+ }
+ if (xhtml_next_file == NULL)
+ {
+ if (file == NULL)
+ { /* index, so no next file */
+ fprintf(fp, "Next ");
+ } else
+ {
+ fprintf(fp, "<a href='%s'>Next</a>", xhtml_index_filename);
+ }
+ } else
+ {
+ fprintf(fp, "<a href='%s'>Next</a>", xhtml_next_file->filename);
+ }
+ fprintf(fp, "</p>\n");
+}
+
+/* Write out the index file */
+static void xhtml_do_index_body(FILE * fp)
+{
+ indexentry *y;
+ int ti;
+
+ if (count234(idx->entries) == 0)
+ return; /* don't write anything at all */
+
+ fprintf(fp, "<dl>\n");
+ /* iterate over idx->entries using the tree functions and display everything */
+ for (ti = 0; (y = (indexentry *) index234(idx->entries, ti)) != NULL;
+ ti++)
+ {
+ if (y->backend_data)
+ {
+ int i;
+ xhtmlindex *xi;
+
+ fprintf(fp, "<dt>");
+ xhtml_para(fp, y->text);
+ fprintf(fp, "</dt>\n<dd>");
+
+ xi = (xhtmlindex *) y->backend_data;
+ for (i = 0; i < xi->nsection; i++)
+ {
+ xhtmlsection *sect = xi->sections[i];
+ if (sect)
+ {
+ fprintf(fp, "<a href='%s#%s'>", sect->file->filename,
+ sect->fragment);
+ if (sect->para->kwtext)
+ {
+ xhtml_para(fp, sect->para->kwtext);
+ } else if (sect->para->words)
+ {
+ xhtml_para(fp, sect->para->words);
+ }
+ fprintf(fp, "</a>");
+ if (i + 1 < xi->nsection)
+ {
+ fprintf(fp, ", ");
+ }
+ }
+ }
+ fprintf(fp, "</dd>\n");
+ }
+ }
+ fprintf(fp, "</dl>\n");
+}
+static void xhtml_do_index()
+{
+ word temp_word =
+ { NULL, NULL, word_Normal, 0, 0, L"Index", {NULL, 0, 0} };
+ FILE *fp = fopen(xhtml_index_filename, "w");
+
+ if (fp == NULL)
+ fatal(err_cantopenw, xhtml_index_filename);
+ xhtml_doheader(fp, &temp_word);
+ xhtml_donavlinks(fp, NULL);
+
+ xhtml_do_index_body(fp);
+
+ xhtml_donavlinks(fp, NULL);
+ xhtml_dofooter(fp);
+ fclose(fp);
+}
+
+/* Output the given file. This includes whatever contents at beginning and end, etc. etc. */
+static void xhtml_do_file(xhtmlfile * file)
+{
+ FILE *fp = fopen(file->filename, "w");
+ if (fp == NULL)
+ fatal(err_cantopenw, file->filename);
+
+ if (file->sections->para->words)
+ {
+ xhtml_doheader(fp, file->sections->para->words);
+ } else if (file->sections->para->kwtext)
+ {
+ xhtml_doheader(fp, file->sections->para->kwtext);
+ } else
+ {
+ xhtml_doheader(fp, NULL);
+ }
+
+ xhtml_donavlinks(fp, file);
+
+ if (file->is_leaf && conf.leaf_contains_contents &&
+ xhtml_do_contents(NULL, file) >= conf.leaf_smallest_contents)
+ xhtml_do_contents(fp, file);
+ xhtml_do_sections(fp, file->sections);
+ if (!file->is_leaf)
+ xhtml_do_naked_contents(fp, file);
+
+ xhtml_donavlinks(fp, file);
+
+ xhtml_dofooter(fp);
+ fclose(fp);
+
+ xhtml_last_file = file;
+}
+
+/* Output the top-level file. */
+static void xhtml_do_top_file(xhtmlfile * file, paragraph * sourceform)
+{
+ paragraph *p;
+ char fname[4096];
+ int done = FALSE;
+
+ FILE *fp = fopen(file->filename, "w");
+ if (fp == NULL)
+ fatal(err_cantopenw, file->filename);
+
+ ustrtoa(conf.chm_toc_file, fname, 4096);
+ if(*fname)
+ {
+ chm_toc = fopen(fname, "w");
+ if (chm_toc == NULL)
+ fatal(err_cantopenw, fname);
+ }
+ else
+ chm_toc = NULL;
+
+ ustrtoa(conf.chm_ind_file, fname, 4096);
+ if(*fname){
+ chm_ind = fopen(fname, "w");
+ if (chm_ind == NULL)
+ fatal(err_cantopenw, fname);
+ }
+ else
+ chm_ind = NULL;
+
+ /* Do the title -- only one allowed */
+ for (p = sourceform; p && !done; p = p->next)
+ {
+ if (p->type == para_Title)
+ {
+ xhtml_doheader(fp, p->words);
+ if(chm_toc)chm_doheader(chm_toc, p->words);
+ if(chm_ind)chm_doheader(chm_ind, p->words);
+ done = TRUE;
+ }
+ }
+ if (!done)
+ xhtml_doheader(fp, NULL /* Eek! */ );
+
+ /*
+ * Display the title.
+ */
+ for (p = sourceform; p; p = p->next)
+ {
+ if (p->type == para_Title)
+ {
+ xhtml_heading(fp, p);
+ break;
+ }
+ }
+
+ /* Do the preamble and copyright */
+ for (p = sourceform; p; p = p->next)
+ {
+ if (p->type == para_Preamble)
+ {
+ fprintf(fp, "<p>");
+ xhtml_para(fp, p->words);
+ fprintf(fp, "</p>\n");
+ }
+ }
+ for (p = sourceform; p; p = p->next)
+ {
+ if (p->type == para_Copyright)
+ {
+ fprintf(fp, "<p>");
+ xhtml_para(fp, p->words);
+ fprintf(fp, "</p>\n");
+ }
+ }
+
+ xhtml_do_contents(fp, file);
+ xhtml_do_sections(fp, file->sections);
+
+ /*
+ * Put the index in the top file if we're in single-file mode
+ * (leaf-level 0).
+ */
+ if (conf.leaf_level == 0 && count234(idx->entries) > 0)
+ {
+ fprintf(fp, "<a name=\"index\"></a><h1>Index</h1>\n");
+ xhtml_do_index_body(fp);
+ }
+
+ xhtml_dofooter(fp);
+ if(chm_toc)chm_dofooter(chm_toc);
+ if(chm_ind)chm_dofooter(chm_ind);
+ fclose(fp);
+ if(chm_toc)
+ {
+ fclose(chm_toc);
+ chm_toc = NULL;
+ }
+ if(chm_ind)
+ {
+ fclose(chm_ind);
+ chm_ind = NULL;
+ }
+}
+
+/* Convert a Unicode string to an ASCII one. '?' is
+ * used for unmappable characters.
+ */
+static void xhtml_utostr(wchar_t * in, char **out)
+{
+ int l = ustrlen(in);
+ int i;
+ *out = smalloc(l + 1);
+ for (i = 0; i < l; i++)
+ {
+ if (in[i] >= 32 && in[i] <= 126)
+ (*out)[i] = (char) in[i];
+ else
+ (*out)[i] = '?';
+ }
+ (*out)[i] = 0;
+}
+
+/*
+ * Write contents for the given file, and subfiles, down to
+ * the appropriate contents depth. Returns the number of
+ * entries written.
+ */
+static int xhtml_do_contents(FILE * fp, xhtmlfile * file)
+{
+ int level, limit, start_level, count = 0;
+ if (!file)
+ return 0;
+
+ level = (file->sections) ? (file->sections->level) : (0);
+ limit = conf.contents_depth[(level > 5) ? (5) : (level)];
+ start_level = (file->is_leaf) ? (level - 1) : (level);
+ last_level = start_level;
+
+ count += xhtml_do_contents_section_limit(fp, file->sections, limit);
+ count += xhtml_do_contents_limit(fp, file->child, limit);
+ if (fp != NULL)
+ {
+ while (last_level > start_level)
+ {
+ last_level--;
+ fprintf(fp, "</ul>\n");
+ if(chm_toc)fprintf(chm_toc, "</ul>\n");
+ }
+ }
+ return count;
+}
+
+/* As above, but doesn't do anything in the current file */
+static int xhtml_do_naked_contents(FILE * fp, xhtmlfile * file)
+{
+ int level, limit, start_level, count = 0;
+ if (!file)
+ return 0;
+
+ level = (file->sections) ? (file->sections->level) : (0);
+ limit = conf.contents_depth[(level > 5) ? (5) : (level)];
+ start_level = (file->is_leaf) ? (level - 1) : (level);
+ last_level = start_level;
+
+ count = xhtml_do_contents_limit(fp, file->child, limit);
+ if (fp != NULL)
+ {
+ while (last_level > start_level)
+ {
+ last_level--;
+ fprintf(fp, "</ul>\n");
+ if(chm_toc)fprintf(chm_toc, "</ul>\n");
+ }
+ }
+ return count;
+}
+
+/*
+ * Write contents for the given file, children, and siblings, down to
+ * given limit contents depth.
+ */
+static int xhtml_do_contents_limit(FILE * fp, xhtmlfile * file, int limit)
+{
+ int count = 0;
+ while (file)
+ {
+ count += xhtml_do_contents_section_limit(fp, file->sections, limit);
+ count += xhtml_do_contents_limit(fp, file->child, limit);
+ file = file->next;
+ }
+ return count;
+}
+
+/*
+ * Write contents entries for the given section tree, down to the
+ * limit contents depth.
+ */
+static int
+xhtml_do_contents_section_deep_limit(FILE * fp, xhtmlsection * section,
+ int limit)
+{
+ int count = 0;
+ while (section)
+ {
+ if (!xhtml_add_contents_entry(fp, section, limit))
+ return 0;
+ else
+ count++;
+ count +=
+ xhtml_do_contents_section_deep_limit(fp, section->child, limit);
+ section = section->next;
+ }
+ return count;
+}
+
+/*
+ * Write contents entries for the given section tree, down to the
+ * limit contents depth.
+ */
+static int
+xhtml_do_contents_section_limit(FILE * fp, xhtmlsection * section, int limit)
+{
+ int count = 0;
+ if (!section)
+ return 0;
+ xhtml_add_contents_entry(fp, section, limit);
+ count = 1;
+ count += xhtml_do_contents_section_deep_limit(fp, section->child, limit);
+ /* section=section->child;
+ while (section && xhtml_add_contents_entry(fp, section, limit)) {
+ section = section->next;
+ } */
+ return count;
+}
+
+/*
+ * Add a section entry, unless we're exceeding the limit, in which
+ * case return FALSE (otherwise return TRUE).
+ */
+static int
+xhtml_add_contents_entry(FILE * fp, xhtmlsection * section, int limit)
+{
+ if (!section || section->level > limit)
+ return FALSE;
+ if (fp == NULL || section->level < 0)
+ return TRUE;
+ while (last_level > section->level)
+ {
+ last_level--;
+ fprintf(fp, "</ul>\n");
+ if(chm_toc)fprintf(chm_toc, "</ul>\n");
+ }
+ while (last_level < section->level)
+ {
+ last_level++;
+ fprintf(fp, "<ul>\n");
+ if(chm_toc)fprintf(chm_toc, "<ul>\n");
+ }
+ fprintf(fp, "<li>");
+ fprintf(fp, "<a %shref=\"%s#%s\">",
+ (section->para->type == para_Chapter|| section->para->type == para_Appendix) ? "class=\"btitle\" " : "",
+ section->file->filename,
+ (section->para->type == para_Chapter) ? "" : section->fragment);
+ if(chm_toc)fprintf(chm_toc, "<li><OBJECT type=\"text/sitemap\"><param name=\"Local\" value=\"%s#%s\"><param name=\"Name\" value=\"",
+ section->file->filename,
+ (section->para->type == para_Chapter) ? "" : section->fragment);
+ if(chm_ind)fprintf(chm_ind, "<li><OBJECT type=\"text/sitemap\"><param name=\"Local\" value=\"%s#%s\"><param name=\"Name\" value=\"",
+ section->file->filename,
+ (section->para->type == para_Chapter) ? "" : section->fragment);
+ //%s
+ if (section->para->type == para_Chapter
+ || section->para->type == para_Appendix)
+ fprintf(fp, "<b>");
+ if ((section->para->type != para_Heading
+ && section->para->type != para_Subsect) || (section->para->kwtext
+ && !section->para->
+ words))
+ {
+ xhtml_para(fp, section->para->kwtext);
+ if(chm_toc)xhtml_para(chm_toc, section->para->kwtext);
+ if (section->para->words){
+ fprintf(fp, ": ");
+ if(chm_toc)fprintf(chm_toc, ": ");
+ }
+ }
+ if (section->para->type == para_Chapter
+ || section->para->type == para_Appendix)
+ fprintf(fp, "</b>");
+ if (section->para->words)
+ {
+ xhtml_para(fp, section->para->words);
+ if(chm_toc)xhtml_para(chm_toc, section->para->words);
+ if(chm_ind)xhtml_para(chm_ind, section->para->words);
+ }
+ fprintf(fp, "</a></li>\n");
+ if(chm_toc)fprintf(chm_toc,"\"></OBJECT></li>\n");
+ if(chm_ind)fprintf(chm_ind,"\"></OBJECT></li>\n");
+ return TRUE;
+}
+
+/*
+ * Write all the sections in this file. Do all paragraphs in this section, then all
+ * children (recursively), then go on to the next one (tail recursively).
+ */
+static void xhtml_do_sections(FILE * fp, xhtmlsection * sections)
+{
+ while (sections)
+ {
+ currentsection = sections;
+ xhtml_do_paras(fp, sections->para);
+ xhtml_do_sections(fp, sections->child);
+ sections = sections->next;
+ }
+}
+
+/* Write this list of paragraphs. Close off all lists at the end. */
+static void xhtml_do_paras(FILE * fp, paragraph * p)
+{
+ int last_type = -1, first = TRUE;
+ if (!p)
+ return;
+
+/* for (; p && (xhtml_para_level(p)>limit || xhtml_para_level(p)==-1 || first); p=p->next) {*/
+ for (; p && (xhtml_para_level(p) == -1 || first); p = p->next)
+ {
+ first = FALSE;
+ switch (p->type)
+ {
+ /*
+ * Things we ignore because we've already processed them or
+ * aren't going to touch them in this pass.
+ */
+ case para_IM:
+ case para_BR:
+ case para_Biblio: /* only touch BiblioCited */
+ case para_VersionID:
+ case para_Copyright:
+ case para_Preamble:
+ case para_NoCite:
+ case para_Title:
+ break;
+
+ /*
+ * Chapter titles.
+ */
+ case para_Chapter:
+ case para_Appendix:
+ case para_UnnumberedChapter:
+ xhtml_heading(fp, p);
+ break;
+
+ case para_Heading:
+ case para_Subsect:
+ xhtml_heading(fp, p);
+ break;
+
+ case para_Rule:
+ fprintf(fp, "\n<hr />\n");
+ break;
+
+ case para_Normal:
+ fprintf(fp, "\n<p>");
+ xhtml_para(fp, p->words);
+ fprintf(fp, "</p>\n");
+ break;
+
+ case para_Bullet:
+ case para_NumberedList:
+ case para_BiblioCited:
+ if (last_type != p->type)
+ {
+ /* start up list if necessary */
+ if (p->type == para_Bullet)
+ {
+ fprintf(fp, "<ul>\n");
+ } else if (p->type == para_NumberedList)
+ {
+ fprintf(fp, "<ol>\n");
+ } else if (p->type == para_BiblioCited)
+ {
+ fprintf(fp, "<dl>\n");
+ }
+ }
+ if (p->type == para_Bullet || p->type == para_NumberedList)
+ fprintf(fp, "<li>");
+ else if (p->type == para_BiblioCited)
+ {
+ fprintf(fp, "<dt>");
+ xhtml_para(fp, p->kwtext);
+ fprintf(fp, "</dt>\n<dd>");
+ }
+ xhtml_para(fp, p->words);
+ if (p->type == para_BiblioCited)
+ {
+ fprintf(fp, "</dd>\n");
+ } else if (p->type == para_Bullet || p->type == para_NumberedList)
+ {
+ fprintf(fp, "</li>");
+ }
+ if (p->type == para_Bullet || p->type == para_NumberedList
+ || p->type == para_BiblioCited)
+ /* close off list if necessary */
+ {
+ paragraph *p2 = p->next;
+ int close_off = FALSE;
+/* if (p2 && (xhtml_para_level(p2)>limit || xhtml_para_level(p2)==-1)) {*/
+ if (p2 && xhtml_para_level(p2) == -1)
+ {
+ if (p2->type != p->type)
+ close_off = TRUE;
+ } else
+ {
+ close_off = TRUE;
+ }
+ if (close_off)
+ {
+ if (p->type == para_Bullet)
+ {
+ fprintf(fp, "</ul>\n");
+ } else if (p->type == para_NumberedList)
+ {
+ fprintf(fp, "</ol>\n");
+ } else if (p->type == para_BiblioCited)
+ {
+ fprintf(fp, "</dl>\n");
+ }
+ }
+ }
+ break;
+
+ case para_Code:
+ xhtml_codepara(fp, p->words);
+ break;
+ }
+ last_type = p->type;
+ }
+}
+
+/*
+ * Output a header for this XHTML file.
+ */
+static void xhtml_doheader(FILE * fp, word * title)
+{
+ fprintf(fp,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n");
+ fprintf(fp,
+ "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
+ fprintf(fp,
+ "<html xmlns='http://www.w3.org/1999/xhtml'>\n\n<head>\n<title>");
+ if (title == NULL)
+ fprintf(fp, "Documentation");
+ else
+ xhtml_para(fp, title);
+ fprintf(fp, "</title>\n");
+ fprintf(fp,
+ "<meta name=\"generator\" content=\"Halibut %s xhtml-backend\" />\n",
+ version);
+ if (conf.author)
+ fprintf(fp, "<meta name=\"author\" content=\"%ls\" />\n", conf.author);
+ if (conf.description)
+ fprintf(fp, "<meta name=\"description\" content=\"%ls\" />\n",
+ conf.description);
+ if (conf.head_end)
+ fprintf(fp, "%ls\n", conf.head_end);
+ fprintf(fp, "</head>\n\n");
+ if (conf.body)
+ fprintf(fp, "%ls\n", conf.body);
+ else
+ fprintf(fp, "<body>\n");
+ if (conf.body_start)
+ fprintf(fp, "%ls\n", conf.body_start);
+}
+
+static void chm_doheader(FILE * fp, word * title)
+{
+ fprintf(fp, "<HTML><BODY><UL><LI><OBJECT type=\"text/sitemap\"><param name=\"Name\" value=\"");
+ xhtml_para(fp, title);
+ fprintf(fp,"\"><param name=\"Local\" value=\"Contents.html\"></OBJECT></li>\n");
+}
+
+/*
+ * Output a footer for this XHTML file.
+ */
+static void xhtml_dofooter(FILE * fp)
+{
+ fprintf(fp, "\n<hr />\n\n");
+ if (conf.body_end)
+ fprintf(fp, "%ls\n", conf.body_end);
+ if (!conf.suppress_address)
+ {
+ fprintf(fp, "<address>\n");
+ if (conf.address_start)
+ fprintf(fp, "%ls\n", conf.address_start);
+ /* Do the version ID */
+ if (conf.include_version_id)
+ {
+ paragraph *p;
+ int started = 0;
+ for (p = sourceparas; p; p = p->next)
+ if (p->type == para_VersionID)
+ {
+ xhtml_versionid(fp, p->words, started);
+ started = 1;
+ }
+ }
+ if (conf.address_end)
+ fprintf(fp, "%ls\n", conf.address_end);
+ fprintf(fp, "</address>\n");
+ }
+ fprintf(fp, "</body>\n\n</html>\n");
+}
+static void chm_dofooter(FILE * fp)
+{
+ fprintf(fp, "</ul></BODY></HTML>\n");
+}
+
+/*
+ * Output the versionid paragraph. Typically this is a version control
+ * ID string (such as $Id...$ in RCS).
+ */
+static void xhtml_versionid(FILE * fp, word * text, int started)
+{
+ rdstringc t = { 0, 0, NULL };
+
+ rdaddc(&t, '['); /* FIXME: configurability */
+ xhtml_rdaddwc(&t, text, NULL);
+ rdaddc(&t, ']'); /* FIXME: configurability */
+
+ if (started)
+ fprintf(fp, "<br>\n");
+ fprintf(fp, "%s\n", t.text);
+ sfree(t.text);
+}
+
+/* Is this an XHTML reserved character? */
+static int xhtml_reservedchar(int c)
+{
+ if (c == '&' || c == '<' || c == '>' || c == '"')
+ return TRUE;
+ else
+ return FALSE;
+}
+
+/*
+ * Convert a wide string into valid XHTML: Anything outside ASCII will
+ * be fixed up as an entity. Currently we don't worry about constraining the
+ * encoded character set, which we should probably do at some point (we can
+ * still fix up and return FALSE - see the last comment here). We also don't
+ * currently
+ *
+ * Because this is only used for words, spaces are HARD spaces (any other
+ * spaces will be word_Whitespace not word_Normal). So they become &nbsp;
+ * Unless hard_spaces is FALSE, of course (code paragraphs break the above
+ * rule).
+ *
+ * If `result' is non-NULL, mallocs the resulting string and stores a pointer to
+ * it in `*result'. If `result' is NULL, merely checks whether all
+ * characters in the string are feasible.
+ *
+ * Return is nonzero if all characters are OK. If not all
+ * characters are OK but `result' is non-NULL, a result _will_
+ * still be generated!
+ */
+static int xhtml_convert(wchar_t * s, char **result, int hard_spaces)
+{
+ int doing = (result != 0);
+ int ok = TRUE;
+ char *p = NULL;
+ int plen = 0, psize = 0;
+
+ for (; *s; s++)
+ {
+ wchar_t c = *s;
+
+#define ensure_size(i) if (i>=psize) { psize = i+256; p = resize(p, psize); }
+
+ if (((c == 32 && !hard_spaces)
+ || (c > 32 && c <= 126 && !xhtml_reservedchar(c))))
+ {
+ /* Char is OK. */
+ if (doing)
+ {
+ ensure_size(plen);
+ p[plen++] = (char) c;
+ }
+ } else
+ {
+ /* Char needs fixing up. */
+ /* ok = FALSE; -- currently we never return FALSE; we
+ * might want to when considering a character set for the
+ * encoded document.
+ */
+ if (doing)
+ {
+ if (c == 32)
+ { /* a space in a word is a hard space */
+ ensure_size(plen + 7); /* includes space for the NUL, which is subsequently stomped on */
+ sprintf(p + plen, "&nbsp;");
+ plen += 6;
+ } else
+ {
+ switch (c)
+ {
+ case '&':
+ ensure_size(plen + 6); /* includes space for the NUL, which is subsequently stomped on */
+ plen += sprintf(p + plen, "&amp;");
+ break;
+ case '"':
+ ensure_size(plen + 7); /* includes space for the NUL, which is subsequently stomped on */
+ plen += sprintf(p + plen, "&quot;");
+ break;
+ case '<':
+ if (plen > 1 && *(s - 1) == '\\' && *(s - 2) == '\\')
+ {
+ ensure_size(--plen);
+ p[plen - 1] = (char) c;
+ p[plen] = 0;
+ } else
+ {
+ ensure_size(plen + 5); /* includes space for the NUL, which is subsequently stomped on */
+ plen += sprintf(p + plen, "&lt;");
+ }
+ break;
+ case '>':
+ if (plen > 1 && *(s - 1) == '\\' && *(s - 2) == '\\')
+ {
+ ensure_size(--plen);
+ p[plen - 1] = (char) c;
+ p[plen] = 0;
+ } else
+ {
+ ensure_size(plen + 5); /* includes space for the NUL, which is subsequently stomped on */
+ plen += sprintf(p + plen, "&gt;");
+ }
+ break;
+ default:
+ ensure_size(plen + 8); /* includes space for the NUL, which is subsequently stomped on */
+ plen += sprintf(p + plen, "&#%04i;", (int) c);
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (doing)
+ {
+ p = resize(p, plen + 1);
+ p[plen] = '\0';
+ *result = p;
+ }
+
+ return ok;
+}
+
+/*
+ * This formats the given words as XHTML.
+ */
+static void xhtml_rdaddwc(rdstringc * rs, word * text, word * end)
+{
+ char *c;
+ keyword *kwl;
+ xhtmlsection *sect;
+ indextag *itag;
+ int ti;
+ wchar_t *s;
+
+ for (; text && text != end; text = text->next)
+ {
+ switch (text->type)
+ {
+ case word_HyperLink:
+ xhtml_utostr(text->text, &c);
+ rdaddsc(rs, "<a href=\"");
+ if(chm_toc && *c == '.' && *(c+1) == '.')
+ rdaddsc(rs, c + 1);
+ else
+ rdaddsc(rs, c);
+ rdaddsc(rs, "\">");
+ sfree(c);
+ break;
+
+ case word_LocalHyperLink:
+ xhtml_utostr(text->text, &c);
+ rdaddsc(rs, "<a href=\"");
+ if (conf.rlink_prefix)
+ {
+ char *c2;
+ xhtml_utostr(conf.rlink_prefix, &c2);
+ rdaddsc(rs, c2);
+ sfree(c2);
+ }
+ rdaddsc(rs, c);
+ if (conf.rlink_suffix)
+ {
+ char *c2;
+ xhtml_utostr(conf.rlink_suffix, &c2);
+ rdaddsc(rs, c2);
+ sfree(c2);
+ }
+ rdaddsc(rs, "\">");
+ sfree(c);
+ break;
+
+ case word_UpperXref:
+ case word_LowerXref:
+ case word_FreeTextXref:
+ kwl = kw_lookup(keywords, text->text);
+ if (kwl)
+ {
+ sect = xhtml_find_section(kwl->para);
+ if (sect)
+ {
+ rdaddsc(rs, "<a href=\"");
+ rdaddsc(rs, sect->file->filename);
+ rdaddc(rs, '#');
+ rdaddsc(rs, sect->fragment);
+ rdaddsc(rs, "\">");
+ } else
+ {
+ rdaddsc(rs,
+ "<a href=\"Apologies.html\"><!-- probably a bibliography cross reference -->");
+ error(err_whatever,
+ "Couldn't locate cross-reference! (Probably a bibliography entry.)");
+ }
+ } else
+ {
+ rdaddsc(rs,
+ "<a href=\"Apologies.html\"><!-- unknown cross-reference -->");
+ error(err_whatever,
+ "Couldn't locate cross-reference! (Wasn't in source file.)");
+ }
+ break;
+
+ case word_IndexRef: /* in theory we could make an index target here */
+/* rdaddsc(rs, "<a name=\"idx-");
+ xhtml_utostr(text->text, &c);
+ rdaddsc(rs, c);
+ sfree(c);
+ rdaddsc(rs, "\"></a>");*/
+ /* what we _do_ need to do is to fix up the backend data
+ * for any indexentry this points to.
+ */
+ for (ti = 0;
+ (itag = (indextag *) index234(idx->tags, ti)) != NULL; ti++)
+ {
+ /* FIXME: really ustricmp() and not ustrcmp()? */
+ if (ustricmp(itag->name, text->text) == 0)
+ {
+ break;
+ }
+ }
+ if (itag != NULL)
+ {
+ if (itag->refs != NULL)
+ {
+ int i;
+ for (i = 0; i < itag->nrefs; i++)
+ {
+ xhtmlindex *idx_ref;
+ indexentry *ientry;
+
+ ientry = itag->refs[i];
+ if (ientry->backend_data == NULL)
+ {
+ idx_ref = (xhtmlindex *) smalloc(sizeof(xhtmlindex));
+ if (idx_ref == NULL)
+ fatal(err_nomemory);
+ idx_ref->nsection = 0;
+ idx_ref->size = 4;
+ idx_ref->sections =
+ (xhtmlsection **) smalloc(idx_ref->size *
+ sizeof(xhtmlsection *));
+ if (idx_ref->sections == NULL)
+ fatal(err_nomemory);
+ ientry->backend_data = idx_ref;
+ } else
+ {
+ idx_ref = ientry->backend_data;
+ if (idx_ref->nsection + 1 > idx_ref->size)
+ {
+ int new_size = idx_ref->size * 2;
+ idx_ref->sections =
+ srealloc(idx_ref->sections,
+ new_size * sizeof(xhtmlsection));
+ if (idx_ref->sections == NULL)
+ {
+ fatal(err_nomemory);
+ }
+ idx_ref->size = new_size;
+ }
+ }
+ idx_ref->sections[idx_ref->nsection++] = currentsection;
+#if 0
+#endif
+ }
+ } else
+ {
+ fatal(err_whatever, "Index tag had no entries!");
+ }
+ } else
+ {
+ fprintf(stderr, "Looking for index entry '%ls'\n", text->text);
+ fatal(err_whatever,
+ "Couldn't locate index entry! (Wasn't in index.)");
+ }
+ break;
+
+ case word_HyperEnd:
+ case word_XrefEnd:
+ rdaddsc(rs, "</a>");
+ break;
+
+ case word_Normal:
+ case word_Emph:
+ case word_Code:
+ case word_WeakCode:
+ case word_WhiteSpace:
+ case word_EmphSpace:
+ case word_CodeSpace:
+ case word_WkCodeSpace:
+ case word_Quote:
+ case word_EmphQuote:
+ case word_CodeQuote:
+ case word_WkCodeQuote:
+ assert(text->type != word_CodeQuote &&
+ text->type != word_WkCodeQuote);
+ if (towordstyle(text->type) == word_Emph &&
+ (attraux(text->aux) == attr_First ||
+ attraux(text->aux) == attr_Only))
+ rdaddsc(rs, "<em>");
+ else if ((towordstyle(text->type) == word_Code
+ || towordstyle(text->type) == word_WeakCode)
+ && (attraux(text->aux) == attr_First
+ || attraux(text->aux) == attr_Only))
+ rdaddsc(rs, "<code>");
+
+ if (removeattr(text->type) == word_Normal)
+ {
+ static int dont_convert = 0;
+ if (dont_convert)
+ {
+ char buf[2] = " ";
+ dont_convert = 0;
+ s = text->text;
+ for (; *s; s++)
+ {
+ buf[0] = (char) *s;
+ rdaddsc(rs, buf);
+ }
+ buf[0] = 0;
+ rdaddsc(rs, buf);
+ } else
+ {
+ if (*text->text == '\\' && text->next
+ && text->next->text && (*text->next->text == '&'
+ || *text->next->text == '<'
+ || *text->next->text == '>'
+ || *text->next->text == '"'))
+ dont_convert = 1;
+ else
+ {
+ if (xhtml_convert(text->text, &c, TRUE)) /* spaces in the word are hard */
+ rdaddsc(rs, c);
+ else
+ xhtml_rdaddwc(rs, text->alt, NULL);
+ sfree(c);
+ }
+ }
+ } else if (removeattr(text->type) == word_WhiteSpace)
+ {
+ rdaddc(rs, ' ');
+ } else if (removeattr(text->type) == word_Quote)
+ {
+ rdaddsc(rs, "&quot;");
+ }
+
+ if (towordstyle(text->type) == word_Emph &&
+ (attraux(text->aux) == attr_Last ||
+ attraux(text->aux) == attr_Only))
+ rdaddsc(rs, "</em>");
+ else if ((towordstyle(text->type) == word_Code
+ || towordstyle(text->type) == word_WeakCode)
+ && (attraux(text->aux) == attr_Last
+ || attraux(text->aux) == attr_Only))
+ rdaddsc(rs, "</code>");
+ break;
+ }
+ }
+}
+
+/* Output a heading, formatted as XHTML.
+ */
+static void xhtml_heading(FILE * fp, paragraph * p)
+{
+ rdstringc t = { 0, 0, NULL };
+ word *tprefix = p->kwtext;
+ word *nprefix = p->kwtext2;
+ word *text = p->words;
+ int level = xhtml_para_level(p);
+ xhtmlsection *sect = xhtml_find_section(p);
+ xhtmlheadfmt *fmt;
+ char *fragment;
+ if (sect)
+ {
+ fragment = sect->fragment;
+ } else
+ {
+ if (p->type == para_Title)
+ fragment = "title";
+ else
+ {
+ fragment = ""; /* FIXME: what else can we do? */
+ error(err_whatever, "Couldn't locate heading cross-reference!");
+ }
+ }
+
+ if (p->type == para_Title)
+ fmt = NULL;
+ else if (level == 1)
+ fmt = &conf.fchapter;
+ else if (level - 1 < conf.nfsect)
+ fmt = &conf.fsect[level - 1];
+ else
+ fmt = &conf.fsect[conf.nfsect - 1];
+
+ if (fmt && fmt->just_numbers && nprefix)
+ {
+ xhtml_rdaddwc(&t, nprefix, NULL);
+ if (fmt)
+ {
+ char *c;
+ if (xhtml_convert(fmt->number_suffix, &c, FALSE))
+ {
+ rdaddsc(&t, c);
+ sfree(c);
+ }
+ }
+ } else if (fmt && !fmt->just_numbers && tprefix)
+ {
+ xhtml_rdaddwc(&t, tprefix, NULL);
+ if (fmt)
+ {
+ char *c;
+ if (xhtml_convert(fmt->number_suffix, &c, FALSE))
+ {
+ rdaddsc(&t, c);
+ sfree(c);
+ }
+ }
+ }
+ xhtml_rdaddwc(&t, text, NULL);
+ /*
+ * If we're outputting in single-file mode, we need to lower
+ * the level of each heading by one, because the overall
+ * document title will be sitting right at the top as an <h1>
+ * and so chapters and sections should start at <h2>.
+ *
+ * Even if not, the document title will come back from
+ * xhtml_para_level() as level zero, so we must increment that
+ * no matter what leaf_level is set to.
+ */
+ if (conf.leaf_level == 0 || level == 0)
+ level++;
+ fprintf(fp, "<a name=\"%s\"></a><h%i>%s</h%i>\n", fragment, level,
+ t.text, level);
+ sfree(t.text);
+}
+
+/* Output a paragraph. Styles are handled by xhtml_rdaddwc().
+ * This looks pretty simple; I may have missed something ...
+ */
+static void xhtml_para(FILE * fp, word * text)
+{
+ rdstringc out = { 0, 0, NULL };
+ xhtml_rdaddwc(&out, text, NULL);
+ fprintf(fp, "%s", out.text);
+ sfree(out.text);
+}
+
+/* Output a code paragraph. I'm treating this as preformatted, which
+ * may not be entirely correct. See xhtml_para() for my worries about
+ * this being overly-simple; however I think that most of the complexity
+ * of the text backend came entirely out of word wrapping anyway.
+ */
+static void xhtml_codepara(FILE * fp, word * text)
+{
+ fprintf(fp, "<pre>");
+ for (; text; text = text->next)
+ if (text->type == word_WeakCode)
+ {
+ char *c;
+ xhtml_convert(text->text, &c, FALSE);
+ fprintf(fp, "%s\n", c);
+ sfree(c);
+ }
+ fprintf(fp, "</pre>\n");
+}
diff --git a/Docs/src/bin/halibut/contents.c b/Docs/src/bin/halibut/contents.c
index 28bc1f6..27215fe 100755
--- a/Docs/src/bin/halibut/contents.c
+++ b/Docs/src/bin/halibut/contents.c
@@ -1,246 +1,246 @@
-/*
- * contents.c: build a table of contents
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <limits.h>
-#include <string.h>
-#include "halibut.h"
-
-struct numberstate_Tag {
- int chapternum;
- int appendixnum;
- int ischapter;
- int *sectionlevels;
- paragraph **currentsects;
- paragraph *lastsect;
- int oklevel;
- int maxsectlevel;
- int listitem;
- wchar_t *chaptertext; /* the word for a chapter */
- wchar_t *sectiontext; /* the word for a section */
- wchar_t *apptext; /* the word for an appendix */
-};
-
-numberstate *number_init(void)
-{
- numberstate *ret = mknew(numberstate);
- ret->chapternum = 0;
- ret->appendixnum = -1;
- ret->ischapter = 1;
- ret->oklevel = -1; /* not even in a chapter yet */
- ret->maxsectlevel = 32;
- ret->sectionlevels = mknewa(int, ret->maxsectlevel);
- ret->currentsects = mknewa(paragraph *, ret->maxsectlevel + 1);
- memset(ret->currentsects, 0,
- (ret->maxsectlevel + 1) * sizeof(paragraph *));
- ret->lastsect = NULL;
- ret->listitem = -1;
- return ret;
-}
-
-void number_free(numberstate * state)
-{
- sfree(state->sectionlevels);
- sfree(state->currentsects);
- sfree(state);
-}
-
-static void dotext(word *** wret, wchar_t * text)
-{
- word *mnewword = mknew(word);
- mnewword->text = ustrdup(text);
- mnewword->type = word_Normal;
- mnewword->alt = NULL;
- mnewword->next = NULL;
- **wret = mnewword;
- *wret = &mnewword->next;
-}
-
-static void dospace(word *** wret)
-{
- word *mnewword = mknew(word);
- mnewword->text = NULL;
- mnewword->type = word_WhiteSpace;
- mnewword->alt = NULL;
- mnewword->next = NULL;
- **wret = mnewword;
- *wret = &mnewword->next;
-}
-
-static void donumber(word *** wret, int num)
-{
- wchar_t text[20];
- int i = 19;
- text[i] = L'\0';
- while (num != 0)
- {
- assert(i >= 0);
- i--; text[i] = L"0123456789"[num % 10];
- num /= 10;
- }
- dotext(wret, &text[i]);
-}
-
-static void doanumber(word *** wret, int num)
-{
- wchar_t text[20];
- int i = 19;
- int nletters, aton;
- nletters = 1;
- aton = 25;
- while (num > aton)
- {
- nletters++;
- num -= aton + 1;
- if (aton < INT_MAX / 26)
- aton = (aton + 1) * 26 - 1;
- else
- aton = INT_MAX;
- }
- text[i] = L'\0';
- while (nletters--)
- {
- assert(i >= 0);
- i--; text[i] = L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[num % 26];
- num /= 26;
- }
- dotext(wret, &text[i]);
-}
-
-void number_cfg(numberstate * state, paragraph * source)
-{
- /*
- * Defaults
- */
- state->chaptertext = L"Chapter";
- state->sectiontext = L"Section";
- state->apptext = L"Appendix";
-
- for (; source; source = source->next)
- {
- if (source->type == para_Config)
- {
- if (!ustricmp(source->keyword, L"chapter"))
- {
- state->chaptertext = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"section"))
- {
- state->sectiontext = uadv(source->keyword);
- } else if (!ustricmp(source->keyword, L"appendix"))
- {
- state->apptext = uadv(source->keyword);
- }
- }
- }
-}
-
-word *number_mktext(numberstate * state, paragraph * p, wchar_t * category,
- int prev, int *errflag)
-{
- word *ret = NULL;
- word **ret2 = &ret;
- word **pret = &ret;
- int i, level;
-
- level = -2; /* default for non-section-heading */
- switch (p->type)
- {
- case para_Chapter:
- state->chapternum++;
- for (i = 0; i < state->maxsectlevel; i++)
- state->sectionlevels[i] = 0;
- dotext(&pret, category ? category : state->chaptertext);
- dospace(&pret);
- ret2 = pret;
- donumber(&pret, state->chapternum);
- state->ischapter = 1;
- state->oklevel = 0;
- level = -1;
- break;
- case para_Heading:
- case para_Subsect:
- level = (p->type == para_Heading ? 0 : p->aux);
- if (level > state->oklevel)
- {
- error(err_sectjump, &p->fpos);
- *errflag = TRUE;
- ret = NULL;
- break;
- }
- state->oklevel = level + 1;
- if (state->maxsectlevel <= level)
- {
- state->maxsectlevel = level + 32;
- state->sectionlevels = resize(state->sectionlevels,
- state->maxsectlevel);
- }
- state->sectionlevels[level]++;
- for (i = level + 1; i < state->maxsectlevel; i++)
- state->sectionlevels[i] = 0;
- dotext(&pret, category ? category : state->sectiontext);
- dospace(&pret);
- ret2 = pret;
- if (state->ischapter)
- donumber(&pret, state->chapternum);
- else
- doanumber(&pret, state->appendixnum);
- for (i = 0; i <= level; i++)
- {
- dotext(&pret, L".");
- if (state->sectionlevels[i] == 0)
- state->sectionlevels[i] = 1;
- donumber(&pret, state->sectionlevels[i]);
- }
- break;
- case para_Appendix:
- state->appendixnum++;
- for (i = 0; i < state->maxsectlevel; i++)
- state->sectionlevels[i] = 0;
- dotext(&pret, category ? category : state->apptext);
- dospace(&pret);
- ret2 = pret;
- doanumber(&pret, state->appendixnum);
- state->ischapter = 0;
- state->oklevel = 0;
- level = -1;
- break;
- case para_UnnumberedChapter:
- level = -1;
- break;
- case para_NumberedList:
- ret2 = pret;
- if (prev != para_NumberedList)
- state->listitem = 0;
- state->listitem++;
- donumber(&pret, state->listitem);
- break;
- }
-
- /*
- * Now set up parent, child and sibling links.
- */
- p->parent = p->child = p->sibling = NULL;
- if (level != -2)
- {
- if (state->currentsects[level + 1])
- state->currentsects[level + 1]->sibling = p;
- if (level >= 0 && state->currentsects[level])
- {
- p->parent = state->currentsects[level];
- if (!state->currentsects[level]->child)
- state->currentsects[level]->child = p;
- }
- state->currentsects[level + 1] = state->lastsect = p;
- for (i = level + 2; i < state->maxsectlevel + 1; i++)
- state->currentsects[i] = NULL;
- } else
- {
- p->parent = state->lastsect;
- }
-
- p->kwtext2 = *ret2;
- return ret;
-}
+/*
+ * contents.c: build a table of contents
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <limits.h>
+#include <string.h>
+#include "halibut.h"
+
+struct numberstate_Tag {
+ int chapternum;
+ int appendixnum;
+ int ischapter;
+ int *sectionlevels;
+ paragraph **currentsects;
+ paragraph *lastsect;
+ int oklevel;
+ int maxsectlevel;
+ int listitem;
+ wchar_t *chaptertext; /* the word for a chapter */
+ wchar_t *sectiontext; /* the word for a section */
+ wchar_t *apptext; /* the word for an appendix */
+};
+
+numberstate *number_init(void)
+{
+ numberstate *ret = mknew(numberstate);
+ ret->chapternum = 0;
+ ret->appendixnum = -1;
+ ret->ischapter = 1;
+ ret->oklevel = -1; /* not even in a chapter yet */
+ ret->maxsectlevel = 32;
+ ret->sectionlevels = mknewa(int, ret->maxsectlevel);
+ ret->currentsects = mknewa(paragraph *, ret->maxsectlevel + 1);
+ memset(ret->currentsects, 0,
+ (ret->maxsectlevel + 1) * sizeof(paragraph *));
+ ret->lastsect = NULL;
+ ret->listitem = -1;
+ return ret;
+}
+
+void number_free(numberstate * state)
+{
+ sfree(state->sectionlevels);
+ sfree(state->currentsects);
+ sfree(state);
+}
+
+static void dotext(word *** wret, wchar_t * text)
+{
+ word *mnewword = mknew(word);
+ mnewword->text = ustrdup(text);
+ mnewword->type = word_Normal;
+ mnewword->alt = NULL;
+ mnewword->next = NULL;
+ **wret = mnewword;
+ *wret = &mnewword->next;
+}
+
+static void dospace(word *** wret)
+{
+ word *mnewword = mknew(word);
+ mnewword->text = NULL;
+ mnewword->type = word_WhiteSpace;
+ mnewword->alt = NULL;
+ mnewword->next = NULL;
+ **wret = mnewword;
+ *wret = &mnewword->next;
+}
+
+static void donumber(word *** wret, int num)
+{
+ wchar_t text[20];
+ int i = 19;
+ text[i] = L'\0';
+ while (num != 0)
+ {
+ assert(i >= 0);
+ i--; text[i] = L"0123456789"[num % 10];
+ num /= 10;
+ }
+ dotext(wret, &text[i]);
+}
+
+static void doanumber(word *** wret, int num)
+{
+ wchar_t text[20];
+ int i = 19;
+ int nletters, aton;
+ nletters = 1;
+ aton = 25;
+ while (num > aton)
+ {
+ nletters++;
+ num -= aton + 1;
+ if (aton < INT_MAX / 26)
+ aton = (aton + 1) * 26 - 1;
+ else
+ aton = INT_MAX;
+ }
+ text[i] = L'\0';
+ while (nletters--)
+ {
+ assert(i >= 0);
+ i--; text[i] = L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[num % 26];
+ num /= 26;
+ }
+ dotext(wret, &text[i]);
+}
+
+void number_cfg(numberstate * state, paragraph * source)
+{
+ /*
+ * Defaults
+ */
+ state->chaptertext = L"Chapter";
+ state->sectiontext = L"Section";
+ state->apptext = L"Appendix";
+
+ for (; source; source = source->next)
+ {
+ if (source->type == para_Config)
+ {
+ if (!ustricmp(source->keyword, L"chapter"))
+ {
+ state->chaptertext = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"section"))
+ {
+ state->sectiontext = uadv(source->keyword);
+ } else if (!ustricmp(source->keyword, L"appendix"))
+ {
+ state->apptext = uadv(source->keyword);
+ }
+ }
+ }
+}
+
+word *number_mktext(numberstate * state, paragraph * p, wchar_t * category,
+ int prev, int *errflag)
+{
+ word *ret = NULL;
+ word **ret2 = &ret;
+ word **pret = &ret;
+ int i, level;
+
+ level = -2; /* default for non-section-heading */
+ switch (p->type)
+ {
+ case para_Chapter:
+ state->chapternum++;
+ for (i = 0; i < state->maxsectlevel; i++)
+ state->sectionlevels[i] = 0;
+ dotext(&pret, category ? category : state->chaptertext);
+ dospace(&pret);
+ ret2 = pret;
+ donumber(&pret, state->chapternum);
+ state->ischapter = 1;
+ state->oklevel = 0;
+ level = -1;
+ break;
+ case para_Heading:
+ case para_Subsect:
+ level = (p->type == para_Heading ? 0 : p->aux);
+ if (level > state->oklevel)
+ {
+ error(err_sectjump, &p->fpos);
+ *errflag = TRUE;
+ ret = NULL;
+ break;
+ }
+ state->oklevel = level + 1;
+ if (state->maxsectlevel <= level)
+ {
+ state->maxsectlevel = level + 32;
+ state->sectionlevels = resize(state->sectionlevels,
+ state->maxsectlevel);
+ }
+ state->sectionlevels[level]++;
+ for (i = level + 1; i < state->maxsectlevel; i++)
+ state->sectionlevels[i] = 0;
+ dotext(&pret, category ? category : state->sectiontext);
+ dospace(&pret);
+ ret2 = pret;
+ if (state->ischapter)
+ donumber(&pret, state->chapternum);
+ else
+ doanumber(&pret, state->appendixnum);
+ for (i = 0; i <= level; i++)
+ {
+ dotext(&pret, L".");
+ if (state->sectionlevels[i] == 0)
+ state->sectionlevels[i] = 1;
+ donumber(&pret, state->sectionlevels[i]);
+ }
+ break;
+ case para_Appendix:
+ state->appendixnum++;
+ for (i = 0; i < state->maxsectlevel; i++)
+ state->sectionlevels[i] = 0;
+ dotext(&pret, category ? category : state->apptext);
+ dospace(&pret);
+ ret2 = pret;
+ doanumber(&pret, state->appendixnum);
+ state->ischapter = 0;
+ state->oklevel = 0;
+ level = -1;
+ break;
+ case para_UnnumberedChapter:
+ level = -1;
+ break;
+ case para_NumberedList:
+ ret2 = pret;
+ if (prev != para_NumberedList)
+ state->listitem = 0;
+ state->listitem++;
+ donumber(&pret, state->listitem);
+ break;
+ }
+
+ /*
+ * Now set up parent, child and sibling links.
+ */
+ p->parent = p->child = p->sibling = NULL;
+ if (level != -2)
+ {
+ if (state->currentsects[level + 1])
+ state->currentsects[level + 1]->sibling = p;
+ if (level >= 0 && state->currentsects[level])
+ {
+ p->parent = state->currentsects[level];
+ if (!state->currentsects[level]->child)
+ state->currentsects[level]->child = p;
+ }
+ state->currentsects[level + 1] = state->lastsect = p;
+ for (i = level + 2; i < state->maxsectlevel + 1; i++)
+ state->currentsects[i] = NULL;
+ } else
+ {
+ p->parent = state->lastsect;
+ }
+
+ p->kwtext2 = *ret2;
+ return ret;
+}
diff --git a/Docs/src/bin/halibut/error.c b/Docs/src/bin/halibut/error.c
index 9d45e82..8c08e3a 100755
--- a/Docs/src/bin/halibut/error.c
+++ b/Docs/src/bin/halibut/error.c
@@ -1,225 +1,225 @@
-/*
- * error.c: Halibut error handling
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include "halibut.h"
-
-/*
- * Error flags
- */
-#define PREFIX 0x0001 /* give `halibut:' prefix */
-#define FILEPOS 0x0002 /* give file position prefix */
-
-static void do_error(int code, va_list ap)
-{
- char error[1024];
- char auxbuf[256];
- char *sp, *sp2;
- wchar_t *wsp;
- filepos fpos, fpos2;
- int flags=0;
-
- switch (code)
- {
- case err_nomemory: /* no arguments */
- sprintf(error, "out of memory");
- flags = PREFIX;
- break;
- case err_optnoarg:
- sp = va_arg(ap, char *);
- sprintf(error, "option `-%.200s' requires an argument", sp);
- flags = PREFIX;
- break;
- case err_nosuchopt:
- sp = va_arg(ap, char *);
- sprintf(error, "unrecognised option `-%.200s'", sp);
- flags = PREFIX;
- break;
- case err_noinput: /* no arguments */
- sprintf(error, "no input files");
- flags = PREFIX;
- break;
- case err_cantopen:
- sp = va_arg(ap, char *);
- sprintf(error, "unable to open input file `%.200s'", sp);
- flags = PREFIX;
- break;
- case err_nodata: /* no arguments */
- sprintf(error, "no data in input files");
- flags = PREFIX;
- break;
- case err_brokencodepara:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "every line of a code paragraph should begin `\\c'");
- flags = FILEPOS;
- break;
- case err_kwunclosed:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected `}' after paragraph keyword");
- flags = FILEPOS;
- break;
- case err_kwexpected:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected a paragraph keyword");
- flags = FILEPOS;
- break;
- case err_kwillegal:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected no paragraph keyword");
- flags = FILEPOS;
- break;
- case err_kwtoomany:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected only one paragraph keyword");
- flags = FILEPOS;
- break;
- case err_bodyillegal:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected no text after paragraph keyword");
- flags = FILEPOS;
- break;
- case err_badparatype:
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "command `%.200s' unrecognised at start of"
- " paragraph", sp);
- flags = FILEPOS;
- break;
- case err_badmidcmd:
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "command `%.200s' unexpected in mid-paragraph", sp);
- flags = FILEPOS;
- break;
- case err_unexbrace:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "brace character unexpected in mid-paragraph");
- flags = FILEPOS;
- break;
- case err_explbr:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected `{' after command");
- flags = FILEPOS;
- break;
- case err_commenteof:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "end of file unexpected inside `\\#{...}' comment");
- flags = FILEPOS;
- break;
- case err_kwexprbr:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected `}' after cross-reference");
- flags = FILEPOS;
- break;
- case err_missingrbrace:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "unclosed braces at end of paragraph");
- flags = FILEPOS;
- break;
- case err_nestedstyles:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "unable to nest text styles");
- flags = FILEPOS;
- break;
- case err_nestedindex:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "unable to nest index markings");
- flags = FILEPOS;
- break;
- case err_nosuchkw:
- fpos = *va_arg(ap, filepos *);
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- sprintf(error, "unable to resolve cross-reference to `%.200s'", sp);
- flags = FILEPOS;
- break;
- case err_multiBR:
- fpos = *va_arg(ap, filepos *);
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- sprintf(error, "multiple `\\BR' entries given for `%.200s'", sp);
- flags = FILEPOS;
- break;
- case err_nosuchidxtag:
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- sprintf(error, "`\\IM' on unknown index tag `%.200s'", sp);
- flags = 0;
- /* FIXME: need to get a filepos to here somehow */
- break;
- case err_cantopenw:
- sp = va_arg(ap, char *);
- sprintf(error, "unable to open output file `%.200s'", sp);
- flags = PREFIX;
- break;
- case err_macroexists:
- fpos = *va_arg(ap, filepos *);
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- sprintf(error, "macro `%.200s' already defined", sp);
- flags = FILEPOS;
- break;
- case err_sectjump:
- fpos = *va_arg(ap, filepos *);
- sprintf(error, "expected higher heading levels before this one");
- flags = FILEPOS;
- break;
- case err_winhelp_ctxclash:
- fpos = *va_arg(ap, filepos *);
- sp = va_arg(ap, char *);
- sp2 = va_arg(ap, char *);
- sprintf(error, "Windows Help context id `%.200s' clashes with "
- "previously defined `%.200s'", sp, sp2);
- flags = FILEPOS;
- break;
- case err_multikw:
- fpos = *va_arg(ap, filepos *);
- fpos2 = *va_arg(ap, filepos *);
- wsp = va_arg(ap, wchar_t *);
- sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
- sprintf(error, "paragraph keyword `%.200s' already defined at ", sp);
- sprintf(error + strlen(error), "%s:%d", fpos2.filename, fpos2.line);
- flags = FILEPOS;
- break;
- case err_whatever:
- sp = va_arg(ap, char *);
- vsprintf(error, sp, ap);
- flags = PREFIX;
- break;
- }
-
- if (flags & PREFIX)
- fputs("halibut: ", stderr);
- if (flags & FILEPOS)
- {
- fprintf(stderr, "%s:%d:", fpos.filename, fpos.line);
- if (fpos.col > 0)
- fprintf(stderr, "%d:", fpos.col);
- fputc(' ', stderr);
- }
- fputs(error, stderr);
- fputc('\n', stderr);
-}
-
-void fatal(int code, ...)
-{
- va_list ap;
- va_start(ap, code);
- do_error(code, ap);
- va_end(ap);
- exit(EXIT_FAILURE);
-}
-
-void error(int code, ...)
-{
- va_list ap;
- va_start(ap, code);
- do_error(code, ap);
- va_end(ap);
-}
+/*
+ * error.c: Halibut error handling
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include "halibut.h"
+
+/*
+ * Error flags
+ */
+#define PREFIX 0x0001 /* give `halibut:' prefix */
+#define FILEPOS 0x0002 /* give file position prefix */
+
+static void do_error(int code, va_list ap)
+{
+ char error[1024];
+ char auxbuf[256];
+ char *sp, *sp2;
+ wchar_t *wsp;
+ filepos fpos, fpos2;
+ int flags=0;
+
+ switch (code)
+ {
+ case err_nomemory: /* no arguments */
+ sprintf(error, "out of memory");
+ flags = PREFIX;
+ break;
+ case err_optnoarg:
+ sp = va_arg(ap, char *);
+ sprintf(error, "option `-%.200s' requires an argument", sp);
+ flags = PREFIX;
+ break;
+ case err_nosuchopt:
+ sp = va_arg(ap, char *);
+ sprintf(error, "unrecognised option `-%.200s'", sp);
+ flags = PREFIX;
+ break;
+ case err_noinput: /* no arguments */
+ sprintf(error, "no input files");
+ flags = PREFIX;
+ break;
+ case err_cantopen:
+ sp = va_arg(ap, char *);
+ sprintf(error, "unable to open input file `%.200s'", sp);
+ flags = PREFIX;
+ break;
+ case err_nodata: /* no arguments */
+ sprintf(error, "no data in input files");
+ flags = PREFIX;
+ break;
+ case err_brokencodepara:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "every line of a code paragraph should begin `\\c'");
+ flags = FILEPOS;
+ break;
+ case err_kwunclosed:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected `}' after paragraph keyword");
+ flags = FILEPOS;
+ break;
+ case err_kwexpected:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected a paragraph keyword");
+ flags = FILEPOS;
+ break;
+ case err_kwillegal:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected no paragraph keyword");
+ flags = FILEPOS;
+ break;
+ case err_kwtoomany:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected only one paragraph keyword");
+ flags = FILEPOS;
+ break;
+ case err_bodyillegal:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected no text after paragraph keyword");
+ flags = FILEPOS;
+ break;
+ case err_badparatype:
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "command `%.200s' unrecognised at start of"
+ " paragraph", sp);
+ flags = FILEPOS;
+ break;
+ case err_badmidcmd:
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "command `%.200s' unexpected in mid-paragraph", sp);
+ flags = FILEPOS;
+ break;
+ case err_unexbrace:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "brace character unexpected in mid-paragraph");
+ flags = FILEPOS;
+ break;
+ case err_explbr:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected `{' after command");
+ flags = FILEPOS;
+ break;
+ case err_commenteof:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "end of file unexpected inside `\\#{...}' comment");
+ flags = FILEPOS;
+ break;
+ case err_kwexprbr:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected `}' after cross-reference");
+ flags = FILEPOS;
+ break;
+ case err_missingrbrace:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "unclosed braces at end of paragraph");
+ flags = FILEPOS;
+ break;
+ case err_nestedstyles:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "unable to nest text styles");
+ flags = FILEPOS;
+ break;
+ case err_nestedindex:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "unable to nest index markings");
+ flags = FILEPOS;
+ break;
+ case err_nosuchkw:
+ fpos = *va_arg(ap, filepos *);
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ sprintf(error, "unable to resolve cross-reference to `%.200s'", sp);
+ flags = FILEPOS;
+ break;
+ case err_multiBR:
+ fpos = *va_arg(ap, filepos *);
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ sprintf(error, "multiple `\\BR' entries given for `%.200s'", sp);
+ flags = FILEPOS;
+ break;
+ case err_nosuchidxtag:
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ sprintf(error, "`\\IM' on unknown index tag `%.200s'", sp);
+ flags = 0;
+ /* FIXME: need to get a filepos to here somehow */
+ break;
+ case err_cantopenw:
+ sp = va_arg(ap, char *);
+ sprintf(error, "unable to open output file `%.200s'", sp);
+ flags = PREFIX;
+ break;
+ case err_macroexists:
+ fpos = *va_arg(ap, filepos *);
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ sprintf(error, "macro `%.200s' already defined", sp);
+ flags = FILEPOS;
+ break;
+ case err_sectjump:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected higher heading levels before this one");
+ flags = FILEPOS;
+ break;
+ case err_winhelp_ctxclash:
+ fpos = *va_arg(ap, filepos *);
+ sp = va_arg(ap, char *);
+ sp2 = va_arg(ap, char *);
+ sprintf(error, "Windows Help context id `%.200s' clashes with "
+ "previously defined `%.200s'", sp, sp2);
+ flags = FILEPOS;
+ break;
+ case err_multikw:
+ fpos = *va_arg(ap, filepos *);
+ fpos2 = *va_arg(ap, filepos *);
+ wsp = va_arg(ap, wchar_t *);
+ sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf));
+ sprintf(error, "paragraph keyword `%.200s' already defined at ", sp);
+ sprintf(error + strlen(error), "%s:%d", fpos2.filename, fpos2.line);
+ flags = FILEPOS;
+ break;
+ case err_whatever:
+ sp = va_arg(ap, char *);
+ vsprintf(error, sp, ap);
+ flags = PREFIX;
+ break;
+ }
+
+ if (flags & PREFIX)
+ fputs("halibut: ", stderr);
+ if (flags & FILEPOS)
+ {
+ fprintf(stderr, "%s:%d:", fpos.filename, fpos.line);
+ if (fpos.col > 0)
+ fprintf(stderr, "%d:", fpos.col);
+ fputc(' ', stderr);
+ }
+ fputs(error, stderr);
+ fputc('\n', stderr);
+}
+
+void fatal(int code, ...)
+{
+ va_list ap;
+ va_start(ap, code);
+ do_error(code, ap);
+ va_end(ap);
+ exit(EXIT_FAILURE);
+}
+
+void error(int code, ...)
+{
+ va_list ap;
+ va_start(ap, code);
+ do_error(code, ap);
+ va_end(ap);
+}
diff --git a/Docs/src/bin/halibut/halibut.h b/Docs/src/bin/halibut/halibut.h
index 43cd7da..dfbbe2b 100755
--- a/Docs/src/bin/halibut/halibut.h
+++ b/Docs/src/bin/halibut/halibut.h
@@ -1,408 +1,408 @@
-#ifndef HALIBUT_HALIBUT_H
-#define HALIBUT_HALIBUT_H
-
-#include <stdio.h>
-#include <wchar.h>
-#include <time.h>
-
-#ifdef __GNUC__
-#define NORETURN __attribute__((__noreturn__))
-#else
-#define NORETURN /* nothing */
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-/* For suppressing unused-parameter warnings */
-#define IGNORE(x) ( (x) = (x) )
-
-#include "tree234.h"
-
-/*
- * Structure tags
- */
-typedef struct input_Tag input;
-typedef struct filepos_Tag filepos;
-typedef struct paragraph_Tag paragraph;
-typedef struct word_Tag word;
-typedef struct keywordlist_Tag keywordlist;
-typedef struct keyword_Tag keyword;
-typedef struct userstyle_Tag userstyle;
-typedef struct numberstate_Tag numberstate;
-typedef struct indexdata_Tag indexdata;
-typedef struct indextag_Tag indextag;
-typedef struct indexentry_Tag indexentry;
-typedef struct macrostack_Tag macrostack;
-
-/*
- * Data structure to hold a file name and index, a line and a
- * column number, for reporting errors
- */
-struct filepos_Tag {
- char *filename;
- int line, col;
-};
-
-/*
- * Data structure to hold all the file names etc for input
- */
-typedef struct pushback_Tag {
- int chr;
- filepos pos;
-} pushback;
-struct input_Tag {
- char **filenames; /* complete list of input files */
- int nfiles; /* how many in the list */
- FILE *currfp; /* the currently open one */
- int currindex; /* which one is that in the list */
- pushback *pushback; /* pushed-back input characters */
- int npushback, pushbacksize;
- filepos pos;
- int reportcols; /* report column numbers in errors */
- macrostack *stack; /* macro expansions in force */
-};
-
-/*
- * Data structure to hold the input form of the source, ie a linked
- * list of paragraphs
- */
-struct paragraph_Tag {
- paragraph *next;
- int type;
- wchar_t *keyword; /* for most special paragraphs */
- word *words; /* list of words in paragraph */
- int aux; /* number, in a numbered paragraph
- * or subsection level
- */
- word *kwtext; /* chapter/section indication */
- word *kwtext2; /* numeric-only form of kwtext */
- filepos fpos;
-
- paragraph *parent, *child, *sibling; /* for hierarchy navigation */
-
- void *private_data; /* for temp use in backends */
-};
-enum {
- para_IM, /* index merge */
- para_BR, /* bibliography rewrite */
- para_Rule, /* random horizontal rule */
- para_Chapter,
- para_Appendix,
- para_UnnumberedChapter,
- para_Heading,
- para_Subsect,
- para_Normal,
- para_Biblio, /* causes no output unless turned ... */
- para_BiblioCited, /* ... into this paragraph type */
- para_Bullet,
- para_NumberedList,
- para_Code,
- para_Copyright,
- para_Preamble,
- para_NoCite,
- para_Title,
- para_VersionID,
- para_Config, /* configuration directive */
- para_NotParaType /* placeholder value */
-};
-
-/*
- * Data structure to hold an individual word
- */
-struct word_Tag {
- word *next, *alt;
- int type;
- int aux;
- int breaks; /* can a line break after it? */
- wchar_t *text;
- filepos fpos;
-};
-enum {
- /* ORDERING CONSTRAINT: these normal-word types ... */
- word_Normal,
- word_Emph,
- word_Code, /* monospaced; `quoted' in text */
- word_WeakCode, /* monospaced, normal in text */
- /* ... must be in the same order as these space types ... */
- word_WhiteSpace, /* text is NULL or ignorable */
- word_EmphSpace, /* WhiteSpace when emphasised */
- word_CodeSpace, /* WhiteSpace when code */
- word_WkCodeSpace, /* WhiteSpace when weak code */
- /* ... and must be in the same order as these quote types ... */
- word_Quote, /* text is NULL or ignorable */
- word_EmphQuote, /* Quote when emphasised */
- word_CodeQuote, /* (can't happen) */
- word_WkCodeQuote, /* (can't happen) */
- /* END ORDERING CONSTRAINT */
- word_internal_endattrs,
- word_UpperXref, /* \K */
- word_LowerXref, /* \k */
- word_XrefEnd, /* (invisible; no text) */
- word_IndexRef, /* (always an invisible one) */
- word_HyperLink, /* (invisible) */
- word_HyperEnd, /* (also invisible; no text) */
- word_LocalHyperLink, /* (invisible) */
- word_FreeTextXref /* \R */
-};
-/* aux values for attributed words */
-enum {
- attr_Only = 0x0000, /* a lone word with the attribute */
- attr_First = 0x0001, /* the first of a series */
- attr_Last = 0x0002, /* the last of a series */
- attr_Always = 0x0003, /* any other part of a series */
- attr_mask = 0x0003,
-};
-/* aux values for quote-type words */
-enum {
- quote_Open = 0x0010,
- quote_Close = 0x0020,
- quote_mask = 0x0030,
-};
-#define isattr(x) ( ( (x) > word_Normal && (x) < word_WhiteSpace ) || \
- ( (x) > word_WhiteSpace && (x) < word_internal_endattrs ) )
-#define sameattr(x,y) ( (((x)-(y)) & 3) == 0 )
-#define towordstyle(x) ( word_Normal + ((x) & 3) )
-#define tospacestyle(x) ( word_WhiteSpace + ((x) & 3) )
-#define toquotestyle(x) ( word_Quote + ((x) & 3) )
-#define removeattr(x) ( word_Normal + ((x) &~ 3) )
-
-#define attraux(x) ( (x) & attr_mask )
-#define quoteaux(x) ( (x) & quote_mask )
-
-/*
- * error.c
- */
-void fatal(int code, ...) NORETURN;
-void error(int code, ...);
-enum {
- err_nomemory, /* out of memory */
- err_optnoarg, /* option `-%s' requires an argument */
- err_nosuchopt, /* unrecognised option `-%s' */
- err_noinput, /* no input files */
- err_cantopen, /* unable to open input file `%s' */
- err_nodata, /* no data in input files */
- err_brokencodepara, /* line in codepara didn't begin `\c' */
- err_kwunclosed, /* expected `}' after keyword */
- err_kwillegal, /* paragraph type expects no keyword */
- err_kwexpected, /* paragraph type expects a keyword */
- err_kwtoomany, /* paragraph type expects only 1 */
- err_bodyillegal, /* paragraph type expects only kws! */
- err_badparatype, /* invalid command at start of para */
- err_badmidcmd, /* invalid command in mid-para */
- err_unexbrace, /* unexpected brace */
- err_explbr, /* expected `{' after command */
- err_commenteof, /* EOF inside braced comment */
- err_kwexprbr, /* expected `}' after cross-ref */
- err_missingrbrace, /* unclosed braces at end of para */
- err_nestedstyles, /* unable to nest text styles */
- err_nestedindex, /* unable to nest `\i' thingys */
- err_nosuchkw, /* unresolved cross-reference */
- err_multiBR, /* multiple \BRs on same keyword */
- err_nosuchidxtag, /* \IM on unknown index tag (warning) */
- err_cantopenw, /* can't open output file for write */
- err_macroexists, /* this macro already exists */
- err_sectjump, /* jump a heading level, eg \C -> \S */
- err_winhelp_ctxclash, /* WinHelp context ID hash clash */
- err_multikw, /* keyword clash in sections */
- err_whatever /* random error of another type */
-};
-
-/*
- * malloc.c
- */
-#ifdef LOGALLOC
-void *smalloc(char *file, int line, int size);
-void *srealloc(char *file, int line, void *p, int size);
-void sfree(char *file, int line, void *p);
-#define smalloc(x) smalloc(__FILE__, __LINE__, x)
-#define srealloc(x, y) srealloc(__FILE__, __LINE__, x, y)
-#define sfree(x) sfree(__FILE__, __LINE__, x)
-#else
-void *smalloc(int size);
-void *srealloc(void *p, int size);
-void sfree(void *p);
-#endif
-void free_word_list(word * w);
-void free_para_list(paragraph * p);
-word *dup_word_list(word * w);
-char *dupstr(char *s);
-
-#define mknew(type) ( (type *) smalloc (sizeof (type)) )
-#define mknewa(type, number) ( (type *) smalloc ((number) * sizeof (type)) )
-#define resize(array, len) ( srealloc ((array), (len) * sizeof (*(array))) )
-#define lenof(array) ( sizeof(array) / sizeof(*(array)) )
-
-/*
- * ustring.c
- */
-wchar_t *ustrdup(wchar_t * s);
-char *ustrtoa(wchar_t * s, char *outbuf, int size);
-int ustrlen(wchar_t * s);
-wchar_t *uadv(wchar_t * s);
-wchar_t *ustrcpy(wchar_t * dest, wchar_t * source);
-wchar_t utolower(wchar_t);
-int ustrcmp(wchar_t * lhs, wchar_t * rhs);
-int ustricmp(wchar_t * lhs, wchar_t * rhs);
-int utoi(wchar_t *);
-int utob(wchar_t *);
-int uisdigit(wchar_t);
-wchar_t *ustrlow(wchar_t * s);
-wchar_t *ustrftime(wchar_t * fmt, struct tm *timespec);
-
-/*
- * help.c
- */
-void usage(void);
-void showversion(void);
-
-/*
- * licence.c
- */
-void licence(void);
-
-/*
- * version.c
- */
-const char *const version;
-
-/*
- * misc.c
- */
-typedef struct stackTag *stack;
-stack stk_new(void);
-void stk_free(stack);
-void stk_push(stack, void *);
-void *stk_pop(stack);
-
-typedef struct tagRdstring rdstring;
-struct tagRdstring {
- int pos, size;
- wchar_t *text;
-};
-typedef struct tagRdstringc rdstringc;
-struct tagRdstringc {
- int pos, size;
- char *text;
-};
-extern const rdstring empty_rdstring;
-extern const rdstringc empty_rdstringc;
-void rdadd(rdstring * rs, wchar_t c);
-void rdadds(rdstring * rs, wchar_t * p);
-wchar_t *rdtrim(rdstring * rs);
-void rdaddc(rdstringc * rs, char c);
-void rdaddsc(rdstringc * rs, char *p);
-char *rdtrimc(rdstringc * rs);
-
-int compare_wordlists(word * a, word * b);
-
-void mark_attr_ends(paragraph * sourceform);
-
-typedef struct tagWrappedLine wrappedline;
-struct tagWrappedLine {
- wrappedline *next;
- word *begin, *end; /* first & last words of line */
- int nspaces; /* number of whitespaces in line */
- int shortfall; /* how much shorter than max width */
-};
-wrappedline *wrap_para(word *, int, int, int (*)(word *));
-void wrap_free(wrappedline *);
-
-/*
- * input.c
- */
-paragraph *read_input(input * in, indexdata * idx);
-
-/*
- * keywords.c
- */
-struct keywordlist_Tag {
- int nkeywords;
- int size;
- tree234 *keys; /* sorted by `key' field */
- word **looseends; /* non-keyword list element numbers */
- int nlooseends;
- int looseendssize;
-};
-struct keyword_Tag {
- wchar_t *key; /* the keyword itself */
- word *text; /* "Chapter 2", "Appendix Q"... */
- /* (NB: filepos are not set) */
- paragraph *para; /* the paragraph referenced */
-};
-keyword *kw_lookup(keywordlist *, wchar_t *);
-keywordlist *get_keywords(paragraph *);
-void free_keywords(keywordlist *);
-void subst_keywords(paragraph *, keywordlist *);
-
-/*
- * index.c
- */
-
-/*
- * Data structure to hold both sides of the index.
- */
-struct indexdata_Tag {
- tree234 *tags; /* holds type `indextag' */
- tree234 *entries; /* holds type `indexentry' */
-};
-
-/*
- * Data structure to hold an index tag (LHS of index).
- */
-struct indextag_Tag {
- wchar_t *name;
- word *implicit_text;
- word **explicit_texts;
- int nexplicit, explicit_size;
- int nrefs;
- indexentry **refs; /* array of entries referenced by tag */
-};
-
-/*
- * Data structure to hold an index entry (RHS of index).
- */
-struct indexentry_Tag {
- word *text;
- void *backend_data; /* private to back end */
-};
-
-indexdata *make_index(void);
-void cleanup_index(indexdata *);
-/* index_merge takes responsibility for freeing arg 3 iff implicit; never
- * takes responsibility for arg 2 */
-void index_merge(indexdata *, int is_explicit, wchar_t *, word *);
-void build_index(indexdata *);
-void index_debug(indexdata *);
-indextag *index_findtag(indexdata * idx, wchar_t * name);
-
-/*
- * contents.c
- */
-numberstate *number_init(void);
-void number_cfg(numberstate *, paragraph *);
-word *number_mktext(numberstate *, paragraph *, wchar_t *, int, int *);
-void number_free(numberstate *);
-
-/*
- * biblio.c
- */
-void gen_citations(paragraph *, keywordlist *);
-
-/*
- * style.c
- */
-struct userstyle_Tag {
- void* empty;
-};
-
-/*
- * bk_xhtml.c
- */
-void xhtml_backend(paragraph *, keywordlist *, indexdata *);
-
-#endif
+#ifndef HALIBUT_HALIBUT_H
+#define HALIBUT_HALIBUT_H
+
+#include <stdio.h>
+#include <wchar.h>
+#include <time.h>
+
+#ifdef __GNUC__
+#define NORETURN __attribute__((__noreturn__))
+#else
+#define NORETURN /* nothing */
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+/* For suppressing unused-parameter warnings */
+#define IGNORE(x) ( (x) = (x) )
+
+#include "tree234.h"
+
+/*
+ * Structure tags
+ */
+typedef struct input_Tag input;
+typedef struct filepos_Tag filepos;
+typedef struct paragraph_Tag paragraph;
+typedef struct word_Tag word;
+typedef struct keywordlist_Tag keywordlist;
+typedef struct keyword_Tag keyword;
+typedef struct userstyle_Tag userstyle;
+typedef struct numberstate_Tag numberstate;
+typedef struct indexdata_Tag indexdata;
+typedef struct indextag_Tag indextag;
+typedef struct indexentry_Tag indexentry;
+typedef struct macrostack_Tag macrostack;
+
+/*
+ * Data structure to hold a file name and index, a line and a
+ * column number, for reporting errors
+ */
+struct filepos_Tag {
+ char *filename;
+ int line, col;
+};
+
+/*
+ * Data structure to hold all the file names etc for input
+ */
+typedef struct pushback_Tag {
+ int chr;
+ filepos pos;
+} pushback;
+struct input_Tag {
+ char **filenames; /* complete list of input files */
+ int nfiles; /* how many in the list */
+ FILE *currfp; /* the currently open one */
+ int currindex; /* which one is that in the list */
+ pushback *pushback; /* pushed-back input characters */
+ int npushback, pushbacksize;
+ filepos pos;
+ int reportcols; /* report column numbers in errors */
+ macrostack *stack; /* macro expansions in force */
+};
+
+/*
+ * Data structure to hold the input form of the source, ie a linked
+ * list of paragraphs
+ */
+struct paragraph_Tag {
+ paragraph *next;
+ int type;
+ wchar_t *keyword; /* for most special paragraphs */
+ word *words; /* list of words in paragraph */
+ int aux; /* number, in a numbered paragraph
+ * or subsection level
+ */
+ word *kwtext; /* chapter/section indication */
+ word *kwtext2; /* numeric-only form of kwtext */
+ filepos fpos;
+
+ paragraph *parent, *child, *sibling; /* for hierarchy navigation */
+
+ void *private_data; /* for temp use in backends */
+};
+enum {
+ para_IM, /* index merge */
+ para_BR, /* bibliography rewrite */
+ para_Rule, /* random horizontal rule */
+ para_Chapter,
+ para_Appendix,
+ para_UnnumberedChapter,
+ para_Heading,
+ para_Subsect,
+ para_Normal,
+ para_Biblio, /* causes no output unless turned ... */
+ para_BiblioCited, /* ... into this paragraph type */
+ para_Bullet,
+ para_NumberedList,
+ para_Code,
+ para_Copyright,
+ para_Preamble,
+ para_NoCite,
+ para_Title,
+ para_VersionID,
+ para_Config, /* configuration directive */
+ para_NotParaType /* placeholder value */
+};
+
+/*
+ * Data structure to hold an individual word
+ */
+struct word_Tag {
+ word *next, *alt;
+ int type;
+ int aux;
+ int breaks; /* can a line break after it? */
+ wchar_t *text;
+ filepos fpos;
+};
+enum {
+ /* ORDERING CONSTRAINT: these normal-word types ... */
+ word_Normal,
+ word_Emph,
+ word_Code, /* monospaced; `quoted' in text */
+ word_WeakCode, /* monospaced, normal in text */
+ /* ... must be in the same order as these space types ... */
+ word_WhiteSpace, /* text is NULL or ignorable */
+ word_EmphSpace, /* WhiteSpace when emphasised */
+ word_CodeSpace, /* WhiteSpace when code */
+ word_WkCodeSpace, /* WhiteSpace when weak code */
+ /* ... and must be in the same order as these quote types ... */
+ word_Quote, /* text is NULL or ignorable */
+ word_EmphQuote, /* Quote when emphasised */
+ word_CodeQuote, /* (can't happen) */
+ word_WkCodeQuote, /* (can't happen) */
+ /* END ORDERING CONSTRAINT */
+ word_internal_endattrs,
+ word_UpperXref, /* \K */
+ word_LowerXref, /* \k */
+ word_XrefEnd, /* (invisible; no text) */
+ word_IndexRef, /* (always an invisible one) */
+ word_HyperLink, /* (invisible) */
+ word_HyperEnd, /* (also invisible; no text) */
+ word_LocalHyperLink, /* (invisible) */
+ word_FreeTextXref /* \R */
+};
+/* aux values for attributed words */
+enum {
+ attr_Only = 0x0000, /* a lone word with the attribute */
+ attr_First = 0x0001, /* the first of a series */
+ attr_Last = 0x0002, /* the last of a series */
+ attr_Always = 0x0003, /* any other part of a series */
+ attr_mask = 0x0003,
+};
+/* aux values for quote-type words */
+enum {
+ quote_Open = 0x0010,
+ quote_Close = 0x0020,
+ quote_mask = 0x0030,
+};
+#define isattr(x) ( ( (x) > word_Normal && (x) < word_WhiteSpace ) || \
+ ( (x) > word_WhiteSpace && (x) < word_internal_endattrs ) )
+#define sameattr(x,y) ( (((x)-(y)) & 3) == 0 )
+#define towordstyle(x) ( word_Normal + ((x) & 3) )
+#define tospacestyle(x) ( word_WhiteSpace + ((x) & 3) )
+#define toquotestyle(x) ( word_Quote + ((x) & 3) )
+#define removeattr(x) ( word_Normal + ((x) &~ 3) )
+
+#define attraux(x) ( (x) & attr_mask )
+#define quoteaux(x) ( (x) & quote_mask )
+
+/*
+ * error.c
+ */
+void fatal(int code, ...) NORETURN;
+void error(int code, ...);
+enum {
+ err_nomemory, /* out of memory */
+ err_optnoarg, /* option `-%s' requires an argument */
+ err_nosuchopt, /* unrecognised option `-%s' */
+ err_noinput, /* no input files */
+ err_cantopen, /* unable to open input file `%s' */
+ err_nodata, /* no data in input files */
+ err_brokencodepara, /* line in codepara didn't begin `\c' */
+ err_kwunclosed, /* expected `}' after keyword */
+ err_kwillegal, /* paragraph type expects no keyword */
+ err_kwexpected, /* paragraph type expects a keyword */
+ err_kwtoomany, /* paragraph type expects only 1 */
+ err_bodyillegal, /* paragraph type expects only kws! */
+ err_badparatype, /* invalid command at start of para */
+ err_badmidcmd, /* invalid command in mid-para */
+ err_unexbrace, /* unexpected brace */
+ err_explbr, /* expected `{' after command */
+ err_commenteof, /* EOF inside braced comment */
+ err_kwexprbr, /* expected `}' after cross-ref */
+ err_missingrbrace, /* unclosed braces at end of para */
+ err_nestedstyles, /* unable to nest text styles */
+ err_nestedindex, /* unable to nest `\i' thingys */
+ err_nosuchkw, /* unresolved cross-reference */
+ err_multiBR, /* multiple \BRs on same keyword */
+ err_nosuchidxtag, /* \IM on unknown index tag (warning) */
+ err_cantopenw, /* can't open output file for write */
+ err_macroexists, /* this macro already exists */
+ err_sectjump, /* jump a heading level, eg \C -> \S */
+ err_winhelp_ctxclash, /* WinHelp context ID hash clash */
+ err_multikw, /* keyword clash in sections */
+ err_whatever /* random error of another type */
+};
+
+/*
+ * malloc.c
+ */
+#ifdef LOGALLOC
+void *smalloc(char *file, int line, int size);
+void *srealloc(char *file, int line, void *p, int size);
+void sfree(char *file, int line, void *p);
+#define smalloc(x) smalloc(__FILE__, __LINE__, x)
+#define srealloc(x, y) srealloc(__FILE__, __LINE__, x, y)
+#define sfree(x) sfree(__FILE__, __LINE__, x)
+#else
+void *smalloc(int size);
+void *srealloc(void *p, int size);
+void sfree(void *p);
+#endif
+void free_word_list(word * w);
+void free_para_list(paragraph * p);
+word *dup_word_list(word * w);
+char *dupstr(char *s);
+
+#define mknew(type) ( (type *) smalloc (sizeof (type)) )
+#define mknewa(type, number) ( (type *) smalloc ((number) * sizeof (type)) )
+#define resize(array, len) ( srealloc ((array), (len) * sizeof (*(array))) )
+#define lenof(array) ( sizeof(array) / sizeof(*(array)) )
+
+/*
+ * ustring.c
+ */
+wchar_t *ustrdup(wchar_t * s);
+char *ustrtoa(wchar_t * s, char *outbuf, int size);
+int ustrlen(wchar_t * s);
+wchar_t *uadv(wchar_t * s);
+wchar_t *ustrcpy(wchar_t * dest, wchar_t * source);
+wchar_t utolower(wchar_t);
+int ustrcmp(wchar_t * lhs, wchar_t * rhs);
+int ustricmp(wchar_t * lhs, wchar_t * rhs);
+int utoi(wchar_t *);
+int utob(wchar_t *);
+int uisdigit(wchar_t);
+wchar_t *ustrlow(wchar_t * s);
+wchar_t *ustrftime(wchar_t * fmt, struct tm *timespec);
+
+/*
+ * help.c
+ */
+void usage(void);
+void showversion(void);
+
+/*
+ * licence.c
+ */
+void licence(void);
+
+/*
+ * version.c
+ */
+const char *const version;
+
+/*
+ * misc.c
+ */
+typedef struct stackTag *stack;
+stack stk_new(void);
+void stk_free(stack);
+void stk_push(stack, void *);
+void *stk_pop(stack);
+
+typedef struct tagRdstring rdstring;
+struct tagRdstring {
+ int pos, size;
+ wchar_t *text;
+};
+typedef struct tagRdstringc rdstringc;
+struct tagRdstringc {
+ int pos, size;
+ char *text;
+};
+extern const rdstring empty_rdstring;
+extern const rdstringc empty_rdstringc;
+void rdadd(rdstring * rs, wchar_t c);
+void rdadds(rdstring * rs, wchar_t * p);
+wchar_t *rdtrim(rdstring * rs);
+void rdaddc(rdstringc * rs, char c);
+void rdaddsc(rdstringc * rs, char *p);
+char *rdtrimc(rdstringc * rs);
+
+int compare_wordlists(word * a, word * b);
+
+void mark_attr_ends(paragraph * sourceform);
+
+typedef struct tagWrappedLine wrappedline;
+struct tagWrappedLine {
+ wrappedline *next;
+ word *begin, *end; /* first & last words of line */
+ int nspaces; /* number of whitespaces in line */
+ int shortfall; /* how much shorter than max width */
+};
+wrappedline *wrap_para(word *, int, int, int (*)(word *));
+void wrap_free(wrappedline *);
+
+/*
+ * input.c
+ */
+paragraph *read_input(input * in, indexdata * idx);
+
+/*
+ * keywords.c
+ */
+struct keywordlist_Tag {
+ int nkeywords;
+ int size;
+ tree234 *keys; /* sorted by `key' field */
+ word **looseends; /* non-keyword list element numbers */
+ int nlooseends;
+ int looseendssize;
+};
+struct keyword_Tag {
+ wchar_t *key; /* the keyword itself */
+ word *text; /* "Chapter 2", "Appendix Q"... */
+ /* (NB: filepos are not set) */
+ paragraph *para; /* the paragraph referenced */
+};
+keyword *kw_lookup(keywordlist *, wchar_t *);
+keywordlist *get_keywords(paragraph *);
+void free_keywords(keywordlist *);
+void subst_keywords(paragraph *, keywordlist *);
+
+/*
+ * index.c
+ */
+
+/*
+ * Data structure to hold both sides of the index.
+ */
+struct indexdata_Tag {
+ tree234 *tags; /* holds type `indextag' */
+ tree234 *entries; /* holds type `indexentry' */
+};
+
+/*
+ * Data structure to hold an index tag (LHS of index).
+ */
+struct indextag_Tag {
+ wchar_t *name;
+ word *implicit_text;
+ word **explicit_texts;
+ int nexplicit, explicit_size;
+ int nrefs;
+ indexentry **refs; /* array of entries referenced by tag */
+};
+
+/*
+ * Data structure to hold an index entry (RHS of index).
+ */
+struct indexentry_Tag {
+ word *text;
+ void *backend_data; /* private to back end */
+};
+
+indexdata *make_index(void);
+void cleanup_index(indexdata *);
+/* index_merge takes responsibility for freeing arg 3 iff implicit; never
+ * takes responsibility for arg 2 */
+void index_merge(indexdata *, int is_explicit, wchar_t *, word *);
+void build_index(indexdata *);
+void index_debug(indexdata *);
+indextag *index_findtag(indexdata * idx, wchar_t * name);
+
+/*
+ * contents.c
+ */
+numberstate *number_init(void);
+void number_cfg(numberstate *, paragraph *);
+word *number_mktext(numberstate *, paragraph *, wchar_t *, int, int *);
+void number_free(numberstate *);
+
+/*
+ * biblio.c
+ */
+void gen_citations(paragraph *, keywordlist *);
+
+/*
+ * style.c
+ */
+struct userstyle_Tag {
+ void* empty;
+};
+
+/*
+ * bk_xhtml.c
+ */
+void xhtml_backend(paragraph *, keywordlist *, indexdata *);
+
+#endif
diff --git a/Docs/src/bin/halibut/help.c b/Docs/src/bin/halibut/help.c
index bcb3701..7329494 100755
--- a/Docs/src/bin/halibut/help.c
+++ b/Docs/src/bin/halibut/help.c
@@ -1,23 +1,23 @@
-/*
- * help.c: usage instructions
- */
-
-#include <stdio.h>
-#include "halibut.h"
-
-static char *usagetext[] = {
- "halibut.exe file1 [file2 ...]",
- NULL
-};
-
-void usage(void)
-{
- char **p;
- for (p = usagetext; *p; p++)
- puts(*p);
-}
-
-void showversion(void)
-{
- printf("Halibut, %s\n", version);
-}
+/*
+ * help.c: usage instructions
+ */
+
+#include <stdio.h>
+#include "halibut.h"
+
+static char *usagetext[] = {
+ "halibut.exe file1 [file2 ...]",
+ NULL
+};
+
+void usage(void)
+{
+ char **p;
+ for (p = usagetext; *p; p++)
+ puts(*p);
+}
+
+void showversion(void)
+{
+ printf("Halibut, %s\n", version);
+}
diff --git a/Docs/src/bin/halibut/index.c b/Docs/src/bin/halibut/index.c
index 94ccf52..e95d67a 100755
--- a/Docs/src/bin/halibut/index.c
+++ b/Docs/src/bin/halibut/index.c
@@ -1,263 +1,263 @@
-/*
- * index.c: create and collate index data structures
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "halibut.h"
-
-static int compare_tags(void *av, void *bv);
-static int compare_entries(void *av, void *bv);
-
-indexdata *make_index(void)
-{
- indexdata *ret = mknew(indexdata);
- ret->tags = newtree234(compare_tags);
- ret->entries = newtree234(compare_entries);
- return ret;
-}
-
-static indextag *make_indextag(void)
-{
- indextag *ret = mknew(indextag);
- ret->name = NULL;
- ret->implicit_text = NULL;
- ret->explicit_texts = NULL;
- ret->nexplicit = ret->explicit_size = ret->nrefs = 0;
- ret->refs = NULL;
- return ret;
-}
-
-static int compare_tags(void *av, void *bv)
-{
- indextag *a = (indextag *) av, *b = (indextag *) bv;
- return ustricmp(a->name, b->name);
-}
-
-static int compare_to_find_tag(void *av, void *bv)
-{
- wchar_t *a = (wchar_t *) av;
- indextag *b = (indextag *) bv;
- return ustricmp(a, b->name);
-}
-
-static int compare_entries(void *av, void *bv)
-{
- indexentry *a = (indexentry *) av, *b = (indexentry *) bv;
- return compare_wordlists(a->text, b->text);
-}
-
-/*
- * Back-end utility: find the indextag with a given name.
- */
-indextag *index_findtag(indexdata * idx, wchar_t * name)
-{
- return find234(idx->tags, name, compare_to_find_tag);
-}
-
-/*
- * Add a \IM. `tags' points to a zero-terminated chain of
- * zero-terminated strings ("first\0second\0thirdandlast\0\0").
- * `text' points to a word list.
- *
- * Guarantee on calling sequence: all implicit merges are given
- * before the explicit ones.
- */
-void
-index_merge(indexdata * idx, int is_explicit, wchar_t * tags, word * text)
-{
- indextag *t, *existing;
-
- /*
- * FIXME: want to warn on overlapping source sets.
- */
- for (; *tags; tags = uadv(tags))
- {
- t = make_indextag();
- t->name = tags;
- existing = add234(idx->tags, t);
- if (existing == t)
- {
- /*
- * Duplicate this so we can free it independently.
- */
- t->name = ustrdup(tags);
-
- /*
- * Every tag has an implicit \IM. So if this tag
- * doesn't exist and we're explicit, then we should
- * warn (and drop it, since it won't be referenced).
- */
- if (is_explicit)
- {
- error(err_nosuchidxtag, tags);
- continue;
- }
-
- /*
- * Otherwise, this is a new tag with an implicit \IM.
- */
- t->implicit_text = text;
- } else
- {
- sfree(t);
- t = existing;
- if (!is_explicit)
- {
- /*
- * An implicit \IM for a tag that's had an implicit
- * \IM before. FIXME: we should check the text
- * against the existing text and warn on
- * differences. And check the tag for case match
- * against the existing tag, likewise.
- */
- } else
- {
- /*
- * An explicit \IM added to a valid tag. In
- * particular, this removes the implicit \IM if
- * present.
- */
- if (t->implicit_text)
- {
- free_word_list(t->implicit_text);
- t->implicit_text = NULL;
- }
- if (t->nexplicit >= t->explicit_size)
- {
- t->explicit_size = t->nexplicit + 8;
- t->explicit_texts = resize(t->explicit_texts, t->explicit_size);
- }
- t->explicit_texts[t->nexplicit++] = text;
- }
- }
- }
-}
-
-/*
- * Build the final-form index. We now have every tag, with every
- * \IM, set up in a 2-3 tree indexed by tag. We now want to collate
- * the RHSes of the \IMs, and sort by final form, and decorate the
- * entries in the original 2-3 tree with pointers to the RHS
- * entries.
- */
-void build_index(indexdata * i)
-{
- indextag *t;
- word **ta;
- int ti;
- int j;
-
- for (ti = 0; (t = (indextag *) index234(i->tags, ti)) != NULL; ti++)
- {
- if (t->implicit_text)
- {
- t->nrefs = 1;
- ta = &t->implicit_text;
- } else
- {
- t->nrefs = t->nexplicit;
- ta = t->explicit_texts;
- }
- if (t->nrefs)
- {
- t->refs = mknewa(indexentry *, t->nrefs);
- for (j = 0; j < t->nrefs; j++)
- {
- indexentry *ent = mknew(indexentry);
- ent->text = *ta++;
- t->refs[j] = add234(i->entries, ent);
- if (t->refs[j] != ent) /* duplicate */
- sfree(ent);
- }
- }
- }
-}
-
-void cleanup_index(indexdata * i)
-{
- indextag *t;
- indexentry *ent;
- int ti;
-
- for (ti = 0; (t = (indextag *) index234(i->tags, ti)) != NULL; ti++)
- {
- sfree(t->name);
- free_word_list(t->implicit_text);
- sfree(t->explicit_texts);
- sfree(t->refs);
- sfree(t);
- }
- freetree234(i->tags);
- for (ti = 0; (ent = (indexentry *) index234(i->entries, ti)) != NULL;
- ti++)
- {
- sfree(ent);
- }
- freetree234(i->entries);
- sfree(i);
-}
-
-static void dbg_prtwordlist(int level, word * w);
-static void dbg_prtmerge(int is_explicit, wchar_t * tag, word * text);
-
-void index_debug(indexdata * i)
-{
- indextag *t;
- indexentry *y;
- int ti;
- int j;
-
- printf("\nINDEX TAGS\n==========\n\n");
- for (ti = 0; (t = (indextag *) index234(i->tags, ti)) != NULL; ti++)
- {
- printf("\n");
- if (t->implicit_text)
- dbg_prtmerge(0, t->name, t->implicit_text);
- for (j = 0; j < t->nexplicit; j++)
- dbg_prtmerge(1, t->name, t->explicit_texts[j]);
- }
-
- printf("\nINDEX ENTRIES\n=============\n\n");
- for (ti = 0; (y = (indexentry *) index234(i->entries, ti)) != NULL; ti++)
- {
- printf("\n");
- printf("{\n");
- dbg_prtwordlist(1, y->text);
- printf("}\n");
- }
-}
-
-static void dbg_prtmerge(int is_explicit, wchar_t * tag, word * text)
-{
- printf("\\IM: %splicit: \"", is_explicit ? "ex" : "im");
- for (; *tag; tag++)
- putchar(*tag);
- printf("\" {\n");
- dbg_prtwordlist(1, text);
- printf("}\n");
-}
-
-static void dbg_prtwordlist(int level, word * w)
-{
- for (; w; w = w->next)
- {
- wchar_t *wp;
- printf("%*sword %d ", level * 4, "", w->type);
- if (w->text)
- {
- printf("\"");
- for (wp = w->text; *wp; wp++)
- putchar(*wp);
- printf("\"");
- } else
- printf("(no text)");
- if (w->alt)
- {
- printf(" alt = {\n");
- dbg_prtwordlist(level + 1, w->alt);
- printf("%*s}", level * 4, "");
- }
- printf("\n");
- }
-}
+/*
+ * index.c: create and collate index data structures
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "halibut.h"
+
+static int compare_tags(void *av, void *bv);
+static int compare_entries(void *av, void *bv);
+
+indexdata *make_index(void)
+{
+ indexdata *ret = mknew(indexdata);
+ ret->tags = newtree234(compare_tags);
+ ret->entries = newtree234(compare_entries);
+ return ret;
+}
+
+static indextag *make_indextag(void)
+{
+ indextag *ret = mknew(indextag);
+ ret->name = NULL;
+ ret->implicit_text = NULL;
+ ret->explicit_texts = NULL;
+ ret->nexplicit = ret->explicit_size = ret->nrefs = 0;
+ ret->refs = NULL;
+ return ret;
+}
+
+static int compare_tags(void *av, void *bv)
+{
+ indextag *a = (indextag *) av, *b = (indextag *) bv;
+ return ustricmp(a->name, b->name);
+}
+
+static int compare_to_find_tag(void *av, void *bv)
+{
+ wchar_t *a = (wchar_t *) av;
+ indextag *b = (indextag *) bv;
+ return ustricmp(a, b->name);
+}
+
+static int compare_entries(void *av, void *bv)
+{
+ indexentry *a = (indexentry *) av, *b = (indexentry *) bv;
+ return compare_wordlists(a->text, b->text);
+}
+
+/*
+ * Back-end utility: find the indextag with a given name.
+ */
+indextag *index_findtag(indexdata * idx, wchar_t * name)
+{
+ return find234(idx->tags, name, compare_to_find_tag);
+}
+
+/*
+ * Add a \IM. `tags' points to a zero-terminated chain of
+ * zero-terminated strings ("first\0second\0thirdandlast\0\0").
+ * `text' points to a word list.
+ *
+ * Guarantee on calling sequence: all implicit merges are given
+ * before the explicit ones.
+ */
+void
+index_merge(indexdata * idx, int is_explicit, wchar_t * tags, word * text)
+{
+ indextag *t, *existing;
+
+ /*
+ * FIXME: want to warn on overlapping source sets.
+ */
+ for (; *tags; tags = uadv(tags))
+ {
+ t = make_indextag();
+ t->name = tags;
+ existing = add234(idx->tags, t);
+ if (existing == t)
+ {
+ /*
+ * Duplicate this so we can free it independently.
+ */
+ t->name = ustrdup(tags);
+
+ /*
+ * Every tag has an implicit \IM. So if this tag
+ * doesn't exist and we're explicit, then we should
+ * warn (and drop it, since it won't be referenced).
+ */
+ if (is_explicit)
+ {
+ error(err_nosuchidxtag, tags);
+ continue;
+ }
+
+ /*
+ * Otherwise, this is a new tag with an implicit \IM.
+ */
+ t->implicit_text = text;
+ } else
+ {
+ sfree(t);
+ t = existing;
+ if (!is_explicit)
+ {
+ /*
+ * An implicit \IM for a tag that's had an implicit
+ * \IM before. FIXME: we should check the text
+ * against the existing text and warn on
+ * differences. And check the tag for case match
+ * against the existing tag, likewise.
+ */
+ } else
+ {
+ /*
+ * An explicit \IM added to a valid tag. In
+ * particular, this removes the implicit \IM if
+ * present.
+ */
+ if (t->implicit_text)
+ {
+ free_word_list(t->implicit_text);
+ t->implicit_text = NULL;
+ }
+ if (t->nexplicit >= t->explicit_size)
+ {
+ t->explicit_size = t->nexplicit + 8;
+ t->explicit_texts = resize(t->explicit_texts, t->explicit_size);
+ }
+ t->explicit_texts[t->nexplicit++] = text;
+ }
+ }
+ }
+}
+
+/*
+ * Build the final-form index. We now have every tag, with every
+ * \IM, set up in a 2-3 tree indexed by tag. We now want to collate
+ * the RHSes of the \IMs, and sort by final form, and decorate the
+ * entries in the original 2-3 tree with pointers to the RHS
+ * entries.
+ */
+void build_index(indexdata * i)
+{
+ indextag *t;
+ word **ta;
+ int ti;
+ int j;
+
+ for (ti = 0; (t = (indextag *) index234(i->tags, ti)) != NULL; ti++)
+ {
+ if (t->implicit_text)
+ {
+ t->nrefs = 1;
+ ta = &t->implicit_text;
+ } else
+ {
+ t->nrefs = t->nexplicit;
+ ta = t->explicit_texts;
+ }
+ if (t->nrefs)
+ {
+ t->refs = mknewa(indexentry *, t->nrefs);
+ for (j = 0; j < t->nrefs; j++)
+ {
+ indexentry *ent = mknew(indexentry);
+ ent->text = *ta++;
+ t->refs[j] = add234(i->entries, ent);
+ if (t->refs[j] != ent) /* duplicate */
+ sfree(ent);
+ }
+ }
+ }
+}
+
+void cleanup_index(indexdata * i)
+{
+ indextag *t;
+ indexentry *ent;
+ int ti;
+
+ for (ti = 0; (t = (indextag *) index234(i->tags, ti)) != NULL; ti++)
+ {
+ sfree(t->name);
+ free_word_list(t->implicit_text);
+ sfree(t->explicit_texts);
+ sfree(t->refs);
+ sfree(t);
+ }
+ freetree234(i->tags);
+ for (ti = 0; (ent = (indexentry *) index234(i->entries, ti)) != NULL;
+ ti++)
+ {
+ sfree(ent);
+ }
+ freetree234(i->entries);
+ sfree(i);
+}
+
+static void dbg_prtwordlist(int level, word * w);
+static void dbg_prtmerge(int is_explicit, wchar_t * tag, word * text);
+
+void index_debug(indexdata * i)
+{
+ indextag *t;
+ indexentry *y;
+ int ti;
+ int j;
+
+ printf("\nINDEX TAGS\n==========\n\n");
+ for (ti = 0; (t = (indextag *) index234(i->tags, ti)) != NULL; ti++)
+ {
+ printf("\n");
+ if (t->implicit_text)
+ dbg_prtmerge(0, t->name, t->implicit_text);
+ for (j = 0; j < t->nexplicit; j++)
+ dbg_prtmerge(1, t->name, t->explicit_texts[j]);
+ }
+
+ printf("\nINDEX ENTRIES\n=============\n\n");
+ for (ti = 0; (y = (indexentry *) index234(i->entries, ti)) != NULL; ti++)
+ {
+ printf("\n");
+ printf("{\n");
+ dbg_prtwordlist(1, y->text);
+ printf("}\n");
+ }
+}
+
+static void dbg_prtmerge(int is_explicit, wchar_t * tag, word * text)
+{
+ printf("\\IM: %splicit: \"", is_explicit ? "ex" : "im");
+ for (; *tag; tag++)
+ putchar(*tag);
+ printf("\" {\n");
+ dbg_prtwordlist(1, text);
+ printf("}\n");
+}
+
+static void dbg_prtwordlist(int level, word * w)
+{
+ for (; w; w = w->next)
+ {
+ wchar_t *wp;
+ printf("%*sword %d ", level * 4, "", w->type);
+ if (w->text)
+ {
+ printf("\"");
+ for (wp = w->text; *wp; wp++)
+ putchar(*wp);
+ printf("\"");
+ } else
+ printf("(no text)");
+ if (w->alt)
+ {
+ printf(" alt = {\n");
+ dbg_prtwordlist(level + 1, w->alt);
+ printf("%*s}", level * 4, "");
+ }
+ printf("\n");
+ }
+}
diff --git a/Docs/src/bin/halibut/input.c b/Docs/src/bin/halibut/input.c
index f8e4f71..c14f10e 100755
--- a/Docs/src/bin/halibut/input.c
+++ b/Docs/src/bin/halibut/input.c
@@ -1,1488 +1,1488 @@
-/*
- * input.c: read the source form
- */
-
-#include <stdio.h>
-#include <assert.h>
-#include <time.h>
-#include "halibut.h"
-
-#define TAB_STOP 8 /* for column number tracking */
-
-static void setpos(input * in, char *fname)
-{
- in->pos.filename = fname;
- in->pos.line = 1;
- in->pos.col = (in->reportcols ? 1 : -1);
-}
-
-static void unget(input * in, int c, filepos * pos)
-{
- if (in->npushback >= in->pushbacksize)
- {
- in->pushbacksize = in->npushback + 16;
- in->pushback = resize(in->pushback, in->pushbacksize);
- }
- in->pushback[in->npushback].chr = c;
- in->pushback[in->npushback].pos = *pos; /* structure copy */
- in->npushback++;
-}
-
-/* ---------------------------------------------------------------------- */
-/*
- * Macro subsystem
- */
-typedef struct macro_Tag macro;
-struct macro_Tag {
- wchar_t *name, *text;
-};
-struct macrostack_Tag {
- macrostack *next;
- wchar_t *text;
- int ptr, npushback;
- filepos pos;
-};
-static int macrocmp(void *av, void *bv)
-{
- macro *a = (macro *) av, *b = (macro *) bv;
- return ustrcmp(a->name, b->name);
-}
-static void
-macrodef(tree234 * macros, wchar_t * name, wchar_t * text, filepos fpos)
-{
- macro *m = mknew(macro);
- m->name = name;
- m->text = text;
- if (add234(macros, m) != m)
- {
- error(err_macroexists, &fpos, name);
- sfree(name);
- sfree(text);
- }
-}
-static int
-macrolookup(tree234 * macros, input * in, wchar_t * name, filepos * pos)
-{
- macro m, *gotit;
- m.name = name;
- gotit = find234(macros, &m, NULL);
- if (gotit)
- {
- macrostack *expansion = mknew(macrostack);
- expansion->next = in->stack;
- expansion->text = gotit->text;
- expansion->pos = *pos; /* structure copy */
- expansion->ptr = 0;
- expansion->npushback = in->npushback;
- in->stack = expansion;
- return TRUE;
- } else
- return FALSE;
-}
-static void macrocleanup(tree234 * macros)
-{
- int ti;
- macro *m;
- for (ti = 0; (m = (macro *) index234(macros, ti)) != NULL; ti++)
- {
- sfree(m->name);
- sfree(m->text);
- sfree(m);
- }
- freetree234(macros);
-}
-
-/*
- * Can return EOF
- */
-static int get(input * in, filepos * pos)
-{
- int pushbackpt = in->stack ? in->stack->npushback : 0;
- if (in->npushback > pushbackpt)
- {
- --in->npushback;
- if (pos)
- *pos = in->pushback[in->npushback].pos; /* structure copy */
- return in->pushback[in->npushback].chr;
- } else if (in->stack)
- {
- wchar_t c = in->stack->text[in->stack->ptr];
- if (in->stack->text[++in->stack->ptr] == L'\0')
- {
- macrostack *tmp = in->stack;
- in->stack = tmp->next;
- sfree(tmp);
- }
- return c;
- } else if (in->currfp)
- {
- int c = getc(in->currfp);
-
- if (c == EOF)
- {
- fclose(in->currfp);
- in->currfp = NULL;
- }
- /* Track line numbers, for error reporting */
- if (pos)
- *pos = in->pos;
- if (in->reportcols)
- {
- switch (c)
- {
- case '\t':
- in->pos.col = 1 + (in->pos.col + TAB_STOP - 1) % TAB_STOP;
- break;
- case '\n':
- in->pos.col = 1;
- in->pos.line++;
- break;
- default:
- in->pos.col++;
- break;
- }
- } else
- {
- in->pos.col = -1;
- if (c == '\n')
- in->pos.line++;
- }
- /* FIXME: do input charmap translation. We should be returning
- * Unicode here. */
- return c;
- } else
- return EOF;
-}
-
-/*
- * Lexical analysis of source files.
- */
-typedef struct token_Tag token;
-struct token_Tag {
- int type;
- int cmd, aux;
- wchar_t *text;
- filepos pos;
-};
-enum {
- tok_eof, /* end of file */
- tok_eop, /* end of paragraph */
- tok_white, /* whitespace */
- tok_word, /* a word or word fragment */
- tok_cmd, /* \command */
- tok_lbrace, /* { */
- tok_rbrace /* } */
-};
-
-/* Halibut command keywords. */
-enum {
- c__invalid, /* invalid command */
- c__comment, /* comment command (\#) */
- c__escaped, /* escaped character */
- c__nbsp, /* nonbreaking space */
- c_A, /* appendix heading */
- c_B, /* bibliography entry */
- c_BR, /* bibliography rewrite */
- c_C, /* chapter heading */
- c_H, /* heading */
- c_I, /* invisible index mark */
- c_IM, /* index merge/rewrite */
- c_K, /* capitalised cross-reference */
- c_S, /* aux field is 0, 1, 2, ... */
- c_U, /* unnumbered-chapter heading */
- c_W, /* Web hyperlink */
- c_L, /* Relative/local hyperlink */
- c_b, /* bulletted list */
- c_c, /* code */
- c_cfg, /* configuration directive */
- c_copyright, /* copyright statement */
- c_cw, /* weak code */
- c_date, /* document processing date */
- c_define, /* macro definition */
- c_e, /* emphasis */
- c_i, /* visible index mark */
- c_ii, /* uncapitalised visible index mark */
- c_k, /* uncapitalised cross-reference */
- c_R, /* free text cross-reference */
- c_n, /* numbered list */
- c_nocite, /* bibliography trickery */
- c_preamble, /* document preamble text */
- c_q, /* quote marks */
- c_rule, /* horizontal rule */
- c_title, /* document title */
- c_u, /* aux field is char code */
- c_versionid /* document RCS id */
-};
-
-/* Perhaps whitespace should be defined in a more Unicode-friendly way? */
-#define iswhite(c) ( (c)==32 || (c)==9 || (c)==13 || (c)==10 )
-#define isnl(c) ( (c)==10 )
-#define isdec(c) ( ((c)>='0'&&(c)<='9') )
-#define fromdec(c) ( (c)-'0' )
-#define ishex(c) ( ((c)>='0'&&(c)<='9') || ((c)>='A'&&(c)<='F') || ((c)>='a'&&(c)<='f'))
-#define fromhex(c) ( (c)<='9' ? (c)-'0' : ((c)&0xDF) - ('A'-10) )
-#define iscmd(c) ( ((c)>='0'&&(c)<='9') || ((c)>='A'&&(c)<='Z') || ((c)>='a'&&(c)<='z'))
-
-/*
- * Keyword comparison function. Like strcmp, but between a wchar_t *
- * and a char *.
- */
-static int kwcmp(wchar_t const *p, char const *q)
-{
- int i;
- do
- {
- i = *p - *q;
- }
- while (*p++ && *q++ && !i);
- return i;
-}
-
-/*
- * Match a keyword.
- */
-static void match_kw(token * tok)
-{
- /*
- * FIXME. The ids are explicit in here so as to allow long-name
- * equivalents to the various very short keywords.
- *
- * This list must be sorted, it's searched using binary search.
- */
- static const struct {
- char const *name;
- int id;
- } keywords[] = {
- {
- "#", c__comment}
- , /* comment command (\#) */
- {
- "-", c__escaped}
- , /* nonbreaking hyphen */
- {
- "A", c_A}
- , /* appendix heading */
- {
- "B", c_B}
- , /* bibliography entry */
- {
- "BR", c_BR}
- , /* bibliography rewrite */
- {
- "C", c_C}
- , /* chapter heading */
- {
- "H", c_H}
- , /* heading */
- {
- "I", c_I}
- , /* invisible index mark */
- {
- "IM", c_IM}
- , /* index merge/rewrite */
- {
- "K", c_K}
- , /* capitalised cross-reference */
- {
- "L", c_L}
- , /* Relative/local hyperlink */
- {
- "R", c_R}
- , /* free text cross-reference */
- {
- "U", c_U}
- , /* unnumbered-chapter heading */
- {
- "W", c_W}
- , /* Web hyperlink */
- {
- "\\", c__escaped}
- , /* escaped backslash (\\) */
- {
- "_", c__nbsp}
- , /* nonbreaking space (\_) */
- {
- "b", c_b}
- , /* bulletted list */
- {
- "c", c_c}
- , /* code */
- {
- "cfg", c_cfg}
- , /* configuration directive */
- {
- "copyright", c_copyright}
- , /* copyright statement */
- {
- "cw", c_cw}
- , /* weak code */
- {
- "date", c_date}
- , /* document processing date */
- {
- "define", c_define}
- , /* macro definition */
- {
- "e", c_e}
- , /* emphasis */
- {
- "i", c_i}
- , /* visible index mark */
- {
- "ii", c_ii}
- , /* uncapitalised visible index mark */
- {
- "k", c_k}
- , /* uncapitalised cross-reference */
- {
- "n", c_n}
- , /* numbered list */
- {
- "nocite", c_nocite}
- , /* bibliography trickery */
- {
- "preamble", c_preamble}
- , /* document preamble text */
- {
- "q", c_q}
- , /* quote marks */
- {
- "rule", c_rule}
- , /* horizontal rule */
- {
- "title", c_title}
- , /* document title */
- {
- "versionid", c_versionid}
- , /* document RCS id */
- {
- "{", c__escaped}
- , /* escaped lbrace (\{) */
- {
- "}", c__escaped}
- , /* escaped rbrace (\}) */
- };
- int i, j, k, c;
-
- /*
- * Special cases: \S{0,1,2,...} and \uABCD. If the syntax
- * doesn't match correctly, we just fall through to the
- * binary-search phase.
- */
- if (tok->text[0] == 'S')
- {
- /* We expect numeric characters thereafter. */
- wchar_t *p = tok->text + 1;
- int n;
- if (!*p)
- n = 1;
- else
- {
- n = 0;
- while (*p && isdec(*p))
- {
- n = 10 * n + fromdec(*p);
- p++;
- }
- }
- if (!*p)
- {
- tok->cmd = c_S;
- tok->aux = n;
- return;
- }
- } else if (tok->text[0] == 'u')
- {
- /* We expect hex characters thereafter. */
- wchar_t *p = tok->text + 1;
- int n = 0;
- while (*p && ishex(*p))
- {
- n = 16 * n + fromhex(*p);
- p++;
- }
- if (!*p)
- {
- tok->cmd = c_u;
- tok->aux = n;
- return;
- }
- }
-
- i = -1;
- j = sizeof(keywords) / sizeof(*keywords);
- while (j - i > 1)
- {
- k = (i + j) / 2;
- c = kwcmp(tok->text, keywords[k].name);
- if (c < 0)
- j = k;
- else if (c > 0)
- i = k;
- else
- { /* c == 0 */
-
- tok->cmd = keywords[k].id;
- return;
- }
- }
-
- tok->cmd = c__invalid;
-}
-
-
-/*
- * Read a token from the input file, in the normal way (`normal' in
- * the sense that code paragraphs work a different way).
- */
-token get_token(input * in)
-{
- int c;
- int nls;
- token ret;
- rdstring rs = { 0, 0, NULL };
- filepos cpos;
-
- ret.cmd = c__invalid;
- ret.aux = FALSE;
- ret.text = NULL; /* default */
- c = get(in, &cpos);
- ret.pos = cpos;
- if (iswhite(c))
- { /* tok_white or tok_eop */
- nls = 0;
- do
- {
- if (isnl(c))
- nls++;
- }
- while ((c = get(in, &cpos)) != EOF && iswhite(c));
- if (c == EOF)
- {
- ret.type = tok_eof;
- return ret;
- }
- unget(in, c, &cpos);
- ret.type = (nls > 1 ? tok_eop : tok_white);
- return ret;
- } else if (c == EOF)
- { /* tok_eof */
- ret.type = tok_eof;
- return ret;
- } else if (c == '\\')
- { /* tok_cmd */
- c = get(in, &cpos);
- if (c == '-' || c == '\\' || c == '_' ||
- c == '#' || c == '{' || c == '}')
- {
- /* single-char command */
- rdadd(&rs, (wchar_t)c);
- } else if (c == 'u')
- {
- int len = 0;
- do
- {
- rdadd(&rs, (wchar_t)c);
- len++;
- c = get(in, &cpos);
- }
- while (ishex(c) && len < 5);
- unget(in, c, &cpos);
- } else if (iscmd(c))
- {
- do
- {
- rdadd(&rs, (wchar_t)c);
- c = get(in, &cpos);
- }
- while (iscmd(c));
- unget(in, c, &cpos);
- }
- /*
- * Now match the command against the list of available
- * ones.
- */
- ret.type = tok_cmd;
- ret.text = ustrdup(rs.text);
- match_kw(&ret);
- sfree(rs.text);
- return ret;
- } else if (c == '{')
- { /* tok_lbrace */
- ret.type = tok_lbrace;
- return ret;
- } else if (c == '}')
- { /* tok_rbrace */
- ret.type = tok_rbrace;
- return ret;
- } else
- { /* tok_word */
- /*
- * Read a word: the longest possible contiguous sequence of
- * things other than whitespace, backslash, braces and
- * hyphen. A hyphen terminates the word but is returned as
- * part of it; everything else is pushed back for the next
- * token. The `aux' field contains TRUE if the word ends in
- * a hyphen.
- */
- ret.aux = FALSE; /* assumed for now */
- while (1)
- {
- if (iswhite(c) || c == '{' || c == '}' || c == '\\' || c == EOF)
- {
- /* Put back the character that caused termination */
- unget(in, c, &cpos);
- break;
- } else
- {
- rdadd(&rs, (wchar_t)c);
- if (c == '-')
- {
- ret.aux = TRUE;
- break; /* hyphen terminates word */
- }
- }
- c = get(in, &cpos);
- }
- ret.type = tok_word;
- ret.text = ustrdup(rs.text);
- sfree(rs.text);
- return ret;
- }
-}
-
-/*
- * Determine whether the next input character is an open brace (for
- * telling code paragraphs from paragraphs which merely start with
- * code).
- */
-int isbrace(input * in)
-{
- int c;
- filepos cpos;
-
- c = get(in, &cpos);
- unget(in, c, &cpos);
- return (c == '{');
-}
-
-/*
- * Read the rest of a line that starts `\c'. Including nothing at
- * all (tok_word with empty text).
- */
-token get_codepar_token(input * in)
-{
- int c;
- token ret;
- rdstring rs = { 0, 0, NULL };
- filepos cpos;
-
- ret.type = tok_word;
- c = get(in, &cpos); /* expect (and discard) one space */
- ret.pos = cpos;
- if (c == ' ')
- {
- c = get(in, &cpos);
- ret.pos = cpos;
- }
- while (!isnl(c) && c != EOF)
- {
- int c2 = c;
- c = get(in, &cpos);
- /* Discard \r just before \n. */
- if (c2 != 13 || !isnl(c))
- rdadd(&rs, (wchar_t)c2);
- }
- unget(in, c, &cpos);
- ret.text = ustrdup(rs.text);
- sfree(rs.text);
- return ret;
-}
-
-/*
- * Adds a new word to a linked list
- */
-static word *addword(word newword, word *** hptrptr)
-{
- word *mnewword;
- if (!hptrptr)
- return NULL;
- mnewword = mknew(word);
- *mnewword = newword; /* structure copy */
- mnewword->next = NULL;
- **hptrptr = mnewword;
- *hptrptr = &mnewword->next;
- return mnewword;
-}
-
-/*
- * Adds a new paragraph to a linked list
- */
-static paragraph *addpara(paragraph newpara, paragraph *** hptrptr)
-{
- paragraph *mnewpara = mknew(paragraph);
- *mnewpara = newpara; /* structure copy */
- mnewpara->next = NULL;
- **hptrptr = mnewpara;
- *hptrptr = &mnewpara->next;
- return mnewpara;
-}
-
-/*
- * Destructor before token is reassigned; should catch most memory
- * leaks
- */
-#define dtor(t) ( sfree(t.text) )
-
-/*
- * Reads a single file (ie until get() returns EOF)
- */
-static void read_file(paragraph *** ret, input * in, indexdata * idx)
-{
- token t;
- paragraph par;
- word wd, **whptr, **idximplicit;
- tree234 *macros;
- wchar_t utext[2], *wdtext;
- int style, spcstyle;
- int already;
- int iswhite, seenwhite;
- int type;
- struct stack_item {
- enum {
- stack_nop = 0, /* do nothing (for error recovery) */
- stack_ualt = 1, /* \u alternative */
- stack_style = 2, /* \e, \c, \cw */
- stack_idx = 4, /* \I, \i, \ii */
- stack_hyper = 8, /* \W */
- stack_quote = 16, /* \q */
- } type;
- word **whptr; /* to restore from \u alternatives */
- word **idximplicit; /* to restore from \u alternatives */
- } *sitem;
- stack parsestk;
- word *indexword=NULL, *uword=NULL, *iword=NULL;
- word *idxwordlist;
- rdstring indexstr;
- int index_downcase=0, index_visible=0, indexing=0;
- const rdstring nullrs = { 0, 0, NULL };
- wchar_t uchr;
-
- t.text = NULL;
- macros = newtree234(macrocmp);
- already = FALSE;
-
- /*
- * Loop on each paragraph.
- */
- while (1)
- {
- int start_cmd = c__invalid;
- par.words = NULL;
- par.keyword = NULL;
- whptr = &par.words;
-
- /*
- * Get a token.
- */
- if (!already)
- {
- dtor(t), t = get_token(in);
- }
- already = FALSE;
- if (t.type == tok_eof)
- break;
-
- /*
- * Parse code paragraphs separately.
- */
- if (t.type == tok_cmd && t.cmd == c_c && !isbrace(in))
- {
- par.type = para_Code;
- par.fpos = t.pos;
- while (1)
- {
- dtor(t), t = get_codepar_token(in);
- wd.type = word_WeakCode;
- wd.breaks = FALSE; /* shouldn't need this... */
- wd.text = ustrdup(t.text);
- wd.alt = NULL;
- wd.fpos = t.pos;
- addword(wd, &whptr);
- dtor(t), t = get_token(in);
- if (t.type == tok_white)
- {
- /*
- * The newline after a code-paragraph line
- */
- dtor(t), t = get_token(in);
- }
- if (t.type == tok_eop || t.type == tok_eof)
- break;
- else if (t.type != tok_cmd || t.cmd != c_c)
- {
- error(err_brokencodepara, &t.pos);
- addpara(par, ret);
- while (t.type != tok_eop) /* error recovery: */
- dtor(t), t = get_token(in); /* eat rest of paragraph */
- goto codeparabroken; /* ick, but such is life */
- }
- }
- addpara(par, ret);
- codeparabroken:
- continue;
- }
-
- while (t.type == tok_cmd && macrolookup(macros, in, t.text, &t.pos))
- {
- dtor(t), t = get_token(in);
- }
-
-
- /*
- * This token begins a paragraph. See if it's one of the
- * special commands that define a paragraph type.
- *
- * (note that \# is special in a way, and \nocite takes no
- * text)
- */
- par.type = para_Normal;
- if (t.type == tok_cmd)
- {
- int needkw=0;
- int is_macro = FALSE;
-
- par.fpos = t.pos;
- switch (t.cmd)
- {
- default:
- needkw = -1;
- break;
- case c__invalid:
- error(err_badparatype, t.text, &t.pos);
- needkw = 4;
- break;
- case c__comment:
- if (isbrace(in))
- break; /* `\#{': isn't a comment para */
- do
- {
- dtor(t), t = get_token(in);
- }
- while (t.type != tok_eop && t.type != tok_eof);
- continue; /* next paragraph */
- /*
- * `needkw' values:
- *
- * 1 -- exactly one keyword
- * 2 -- at least one keyword
- * 4 -- any number of keywords including zero
- * 8 -- at least one keyword and then nothing else
- * 16 -- nothing at all! no keywords, no body
- * 32 -- no keywords at all
- */
- case c_A:
- needkw = 2;
- par.type = para_Appendix;
- break;
- case c_B:
- needkw = 2;
- par.type = para_Biblio;
- break;
- case c_BR:
- needkw = 1;
- par.type = para_BR;
- start_cmd = c_BR;
- break;
- case c_C:
- needkw = 2;
- par.type = para_Chapter;
- break;
- case c_H:
- needkw = 2;
- par.type = para_Heading;
- par.aux = 0;
- break;
- case c_IM:
- needkw = 2;
- par.type = para_IM;
- start_cmd = c_IM;
- break;
- case c_S:
- needkw = 2;
- par.type = para_Subsect;
- par.aux = t.aux;
- break;
- case c_U:
- needkw = 32;
- par.type = para_UnnumberedChapter;
- break;
- /* For \b and \n the keyword is optional */
- case c_b:
- needkw = 4;
- par.type = para_Bullet;
- break;
- case c_n:
- needkw = 4;
- par.type = para_NumberedList;
- break;
- case c_cfg:
- needkw = 8;
- par.type = para_Config;
- start_cmd = c_cfg;
- break;
- case c_copyright:
- needkw = 32;
- par.type = para_Copyright;
- break;
- case c_define:
- is_macro = TRUE;
- needkw = 1;
- break;
- /* For \nocite the keyword is _everything_ */
- case c_nocite:
- needkw = 8;
- par.type = para_NoCite;
- break;
- case c_preamble:
- needkw = 32;
- par.type = para_Preamble;
- break;
- case c_rule:
- needkw = 16;
- par.type = para_Rule;
- break;
- case c_title:
- needkw = 32;
- par.type = para_Title;
- break;
- case c_versionid:
- needkw = 32;
- par.type = para_VersionID;
- break;
- }
-
- if (needkw > 0)
- {
- rdstring rs = { 0, 0, NULL };
- int nkeys = 0;
- filepos fp;
-
- /* Get keywords. */
- dtor(t), t = get_token(in);
- fp = t.pos;
- while (t.type == tok_lbrace)
- {
- /* This is a keyword. */
- nkeys++;
- /* FIXME: there will be bugs if anyone specifies an
- * empty keyword (\foo{}), so trap this case. */
- while (dtor(t), t = get_token(in),
- t.type == tok_word ||
- t.type == tok_white ||
- (t.type == tok_cmd && t.cmd == c__nbsp) ||
- (t.type == tok_cmd && t.cmd == c__escaped))
- {
- if (t.type == tok_white ||
- (t.type == tok_cmd && t.cmd == c__nbsp))
- rdadd(&rs, ' ');
- else
- rdadds(&rs, t.text);
- }
- if (t.type != tok_rbrace)
- {
- error(err_kwunclosed, &t.pos);
- continue;
- }
- rdadd(&rs, 0); /* add string terminator */
- dtor(t), t = get_token(in); /* eat right brace */
- }
-
- rdadd(&rs, 0); /* add string terminator */
-
- /* See whether we have the right number of keywords. */
- if ((needkw & 48) && nkeys > 0)
- error(err_kwillegal, &fp);
- if ((needkw & 11) && nkeys == 0)
- error(err_kwexpected, &fp);
- if ((needkw & 5) && nkeys > 1)
- error(err_kwtoomany, &fp);
-
- if (is_macro)
- {
- /*
- * Macro definition. Get the rest of the line
- * as a code-paragraph token, repeatedly until
- * there's nothing more left of it. Separate
- * with newlines.
- */
- rdstring macrotext = { 0, 0, NULL };
- while (1)
- {
- dtor(t), t = get_codepar_token(in);
- if (macrotext.pos > 0)
- rdadd(&macrotext, L'\n');
- rdadds(&macrotext, t.text);
- dtor(t), t = get_token(in);
- if (t.type == tok_eop)
- break;
- }
- macrodef(macros, rs.text, macrotext.text, fp);
- continue; /* next paragraph */
- }
-
- par.keyword = rdtrim(&rs);
-
- /* Move to EOP in case of needkw==8 or 16 (no body) */
- if (needkw & 24)
- {
- /* We allow whitespace even when we expect no para body */
- while (t.type == tok_white)
- dtor(t), t = get_token(in);
- if (t.type != tok_eop && t.type != tok_eof &&
- (start_cmd == c__invalid ||
- t.type != tok_cmd || t.cmd != start_cmd))
- {
- error(err_bodyillegal, &t.pos);
- /* Error recovery: eat the rest of the paragraph */
- while (t.type != tok_eop && t.type != tok_eof &&
- (start_cmd == c__invalid ||
- t.type != tok_cmd || t.cmd != start_cmd))
- dtor(t), t = get_token(in);
- }
- if (t.type == tok_cmd)
- already = TRUE; /* inhibit get_token at top of loop */
- addpara(par, ret);
- continue; /* next paragraph */
- }
- }
- }
-
- /*
- * Now read the actual paragraph, word by word, adding to
- * the paragraph list.
- *
- * Mid-paragraph commands:
- *
- * \K \k
- * \c \cw
- * \e
- * \i \ii
- * \I
- * \u
- * \W
- * \date
- * \\ \{ \}
- */
- parsestk = stk_new();
- style = word_Normal;
- spcstyle = word_WhiteSpace;
- indexing = FALSE;
- seenwhite = TRUE;
- while (t.type != tok_eop && t.type != tok_eof)
- {
- iswhite = FALSE;
- already = FALSE;
-
- /* Handle implicit paragraph breaks after \IM, \BR etc */
- if (start_cmd != c__invalid &&
- t.type == tok_cmd && t.cmd == start_cmd)
- {
- already = TRUE; /* inhibit get_token at top of loop */
- break;
- }
-
- if (t.type == tok_cmd && t.cmd == c__escaped)
- {
- t.type = tok_word; /* nice and simple */
- t.aux = 0; /* even if `\-' - nonbreaking! */
- }
- if (t.type == tok_cmd && t.cmd == c__nbsp)
- {
- t.type = tok_word; /* nice and simple */
- sfree(t.text);
- t.text = ustrdup(L" "); /* text is ` ' not `_' */
- t.aux = 0; /* (nonbreaking) */
- }
- switch (t.type)
- {
- case tok_white:
- if (whptr == &par.words)
- break; /* strip whitespace at start of para */
- wd.text = NULL;
- wd.type = spcstyle;
- wd.alt = NULL;
- wd.aux = 0;
- wd.fpos = t.pos;
- wd.breaks = FALSE;
-
- /*
- * Inhibit use of whitespace if it's (probably the
- * newline) before a repeat \IM / \BR type
- * directive.
- */
- if (start_cmd != c__invalid)
- {
- dtor(t), t = get_token(in);
- already = TRUE;
- if (t.type == tok_cmd && t.cmd == start_cmd)
- break;
- }
-
- if (indexing)
- rdadd(&indexstr, ' ');
- if (!indexing || index_visible)
- addword(wd, &whptr);
- if (indexing)
- addword(wd, &idximplicit);
- iswhite = TRUE;
- break;
- case tok_word:
- if (indexing)
- rdadds(&indexstr, t.text);
- wd.type = style;
- wd.alt = NULL;
- wd.aux = 0;
- wd.fpos = t.pos;
- wd.breaks = t.aux;
- if (!indexing || index_visible)
- {
- wd.text = ustrdup(t.text);
- addword(wd, &whptr);
- }
- if (indexing)
- {
- wd.text = ustrdup(t.text);
- addword(wd, &idximplicit);
- }
- break;
- case tok_lbrace:
- error(err_unexbrace, &t.pos);
- /* Error recovery: push nop */
- sitem = mknew(struct stack_item);
- sitem->type = stack_nop;
- stk_push(parsestk, sitem);
- break;
- case tok_rbrace:
- sitem = stk_pop(parsestk);
- if (!sitem)
- error(err_unexbrace, &t.pos);
- else
- {
- if (sitem->type & stack_ualt)
- {
- whptr = sitem->whptr;
- idximplicit = sitem->idximplicit;
- }
- if (sitem->type & stack_style)
- {
- style = word_Normal;
- spcstyle = word_WhiteSpace;
- }
- if (sitem->type & stack_idx ) {
- indexword->text = ustrdup(indexstr.text);
- if (index_downcase)
- ustrlow(indexword->text);
- indexing = FALSE;
- rdadd(&indexstr, L'\0');
- index_merge(idx, FALSE, indexstr.text, idxwordlist);
- sfree(indexstr.text);
- }
- if (sitem->type & stack_hyper)
- {
- wd.text = NULL;
- wd.type = word_HyperEnd;
- wd.alt = NULL;
- wd.aux = 0;
- wd.fpos = t.pos;
- wd.breaks = FALSE;
- if (!indexing || index_visible)
- addword(wd, &whptr);
- if (indexing)
- addword(wd, &idximplicit);
- }
- if (sitem->type & stack_quote)
- {
- wd.text = NULL;
- wd.type = toquotestyle(style);
- wd.alt = NULL;
- wd.aux = quote_Close;
- wd.fpos = t.pos;
- wd.breaks = FALSE;
- if (!indexing || index_visible)
- addword(wd, &whptr);
- if (indexing)
- {
- rdadd(&indexstr, L'"');
- addword(wd, &idximplicit);
- }
- }
- }
- sfree(sitem);
- break;
- case tok_cmd:
- switch (t.cmd)
- {
- case c__comment:
- /*
- * In-paragraph comment: \#{ balanced braces }
- *
- * Anything goes here; even tok_eop. We should
- * eat whitespace after the close brace _if_
- * there was whitespace before the \#.
- */
- dtor(t), t = get_token(in);
- if (t.type != tok_lbrace)
- {
- error(err_explbr, &t.pos);
- } else
- {
- int braces = 1;
- while (braces > 0)
- {
- dtor(t), t = get_token(in);
- if (t.type == tok_lbrace)
- braces++;
- else if (t.type == tok_rbrace)
- braces--;
- else if (t.type == tok_eof)
- {
- error(err_commenteof, &t.pos);
- break;
- }
- }
- }
- if (seenwhite)
- {
- already = TRUE;
- dtor(t), t = get_token(in);
- if (t.type == tok_white)
- {
- iswhite = TRUE;
- already = FALSE;
- }
- }
- break;
- case c_q:
- dtor(t), t = get_token(in);
- if (t.type != tok_lbrace)
- {
- error(err_explbr, &t.pos);
- } else
- {
- wd.text = NULL;
- wd.type = toquotestyle(style);
- wd.alt = NULL;
- wd.aux = quote_Open;
- wd.fpos = t.pos;
- wd.breaks = FALSE;
- if (!indexing || index_visible)
- addword(wd, &whptr);
- if (indexing)
- {
- rdadd(&indexstr, L'"');
- addword(wd, &idximplicit);
- }
- sitem = mknew(struct stack_item);
- sitem->type = stack_quote;
- stk_push(parsestk, sitem);
- }
- break;
- case c_K:
- case c_k:
- case c_R:
- case c_W:
- case c_L:
- case c_date:
- /*
- * Keyword, hyperlink, or \date. We expect a
- * left brace, some text, and then a right
- * brace. No nesting; no arguments.
- */
- wd.fpos = t.pos;
- wd.breaks = FALSE;
- if (t.cmd == c_K)
- wd.type = word_UpperXref;
- else if (t.cmd == c_k)
- wd.type = word_LowerXref;
- else if (t.cmd == c_R)
- wd.type = word_FreeTextXref;
- else if (t.cmd == c_W)
- wd.type = word_HyperLink;
- else if (t.cmd == c_L)
- wd.type = word_LocalHyperLink;
- else
- wd.type = word_Normal;
- dtor(t), t = get_token(in);
- if (t.type != tok_lbrace)
- {
- if (wd.type == word_Normal)
- {
- time_t thetime = time(NULL);
- struct tm *broken = localtime(&thetime);
- already = TRUE;
- wdtext = ustrftime(NULL, broken);
- wd.type = style;
- } else
- {
- error(err_explbr, &t.pos);
- wdtext = NULL;
- }
- } else
- {
- rdstring rs = { 0, 0, NULL };
- while (dtor(t), t = get_token(in),
- t.type == tok_word || t.type == tok_white)
- {
- if (t.type == tok_white)
- rdadd(&rs, ' ');
- else
- rdadds(&rs, t.text);
- }
- if (wd.type == word_Normal)
- {
- time_t thetime = time(NULL);
- struct tm *broken = localtime(&thetime);
- wdtext = ustrftime(rs.text, broken);
- wd.type = style;
- } else
- {
- wdtext = ustrdup(rs.text);
- }
- sfree(rs.text);
- if (t.type != tok_rbrace)
- {
- error(err_kwexprbr, &t.pos);
- }
- }
- wd.alt = NULL;
- wd.aux = 0;
- if (!indexing || index_visible)
- {
- wd.text = ustrdup(wdtext);
- addword(wd, &whptr);
- }
- if (indexing)
- {
- wd.text = ustrdup(wdtext);
- addword(wd, &idximplicit);
- }
- sfree(wdtext);
- if (wd.type == word_FreeTextXref || wd.type == word_HyperLink || wd.type == word_LocalHyperLink)
- {
- /*
- * Hyperlinks are different: they then
- * expect another left brace, to begin
- * delimiting the text marked by the link.
- */
- dtor(t), t = get_token(in);
- /*
- * Special cases: \W{}\c, \W{}\e, \W{}\cw
- */
- sitem = mknew(struct stack_item);
- sitem->type = stack_hyper;
- if (t.type == tok_cmd &&
- (t.cmd == c_e || t.cmd == c_c || t.cmd == c_cw))
- {
- if (style != word_Normal)
- error(err_nestedstyles, &t.pos);
- else
- {
- style = (t.cmd == c_c ? word_Code :
- t.cmd == c_cw ? word_WeakCode : word_Emph);
- spcstyle = tospacestyle(style);
- sitem->type |= stack_style;
- }
- dtor(t), t = get_token(in);
- }
- if (t.type != tok_lbrace)
- {
- error(err_explbr, &t.pos);
- sfree(sitem);
- } else
- {
- stk_push(parsestk, sitem);
- }
- }
- break;
- case c_c:
- case c_cw:
- case c_e:
- type = t.cmd;
- if (style != word_Normal)
- {
- error(err_nestedstyles, &t.pos);
- /* Error recovery: eat lbrace, push nop. */
- dtor(t), t = get_token(in);
- sitem = mknew(struct stack_item);
- sitem->type = stack_nop;
- stk_push(parsestk, sitem);
- }
- dtor(t), t = get_token(in);
- if (t.type != tok_lbrace)
- {
- error(err_explbr, &t.pos);
- } else
- {
- style = (type == c_c ? word_Code :
- type == c_cw ? word_WeakCode : word_Emph);
- spcstyle = tospacestyle(style);
- sitem = mknew(struct stack_item);
- sitem->type = stack_style;
- stk_push(parsestk, sitem);
- }
- break;
- case c_i:
- case c_ii:
- case c_I:
- type = t.cmd;
- if (indexing)
- {
- error(err_nestedindex, &t.pos);
- /* Error recovery: eat lbrace, push nop. */
- dtor(t), t = get_token(in);
- sitem = mknew(struct stack_item);
- sitem->type = stack_nop;
- stk_push(parsestk, sitem);
- }
- sitem = mknew(struct stack_item);
- sitem->type = stack_idx;
- dtor(t), t = get_token(in);
- /*
- * Special cases: \i\c, \i\e, \i\cw
- */
- wd.fpos = t.pos;
- if (t.type == tok_cmd &&
- (t.cmd == c_e || t.cmd == c_c || t.cmd == c_cw))
- {
- if (style != word_Normal)
- error(err_nestedstyles, &t.pos);
- else
- {
- style = (t.cmd == c_c ? word_Code :
- t.cmd == c_cw ? word_WeakCode : word_Emph);
- spcstyle = tospacestyle(style);
- sitem->type |= stack_style;
- }
- dtor(t), t = get_token(in);
- }
- if (t.type != tok_lbrace)
- {
- sfree(sitem);
- error(err_explbr, &t.pos);
- } else
- {
- /* Add an index-reference word with no text as yet */
- wd.type = word_IndexRef;
- wd.text = NULL;
- wd.alt = NULL;
- wd.aux = 0;
- wd.breaks = FALSE;
- indexword = addword(wd, &whptr);
- /* Set up a rdstring to read the index text */
- indexstr = nullrs;
- /* Flags so that we do the Right Things with text */
- index_visible = (type != c_I);
- index_downcase = (type == c_ii);
- indexing = TRUE;
- idxwordlist = NULL;
- idximplicit = &idxwordlist;
- /* Stack item to close the indexing on exit */
- stk_push(parsestk, sitem);
- }
- break;
- case c_u:
- uchr = t.aux;
- utext[0] = uchr;
- utext[1] = 0;
- wd.type = style;
- wd.breaks = FALSE;
- wd.alt = NULL;
- wd.aux = 0;
- wd.fpos = t.pos;
- if (!indexing || index_visible)
- {
- wd.text = ustrdup(utext);
- uword = addword(wd, &whptr);
- } else
- uword = NULL;
- if (indexing)
- {
- wd.text = ustrdup(utext);
- iword = addword(wd, &idximplicit);
- } else
- iword = NULL;
- dtor(t), t = get_token(in);
- if (t.type == tok_lbrace)
- {
- /*
- * \u with a left brace. Until the brace
- * closes, all further words go on a
- * sidetrack from the main thread of the
- * paragraph.
- */
- sitem = mknew(struct stack_item);
- sitem->type = stack_ualt;
- sitem->whptr = whptr;
- sitem->idximplicit = idximplicit;
- stk_push(parsestk, sitem);
- whptr = uword ? &uword->alt : NULL;
- idximplicit = iword ? &iword->alt : NULL;
- } else
- {
- if (indexing)
- rdadd(&indexstr, uchr);
- already = TRUE;
- }
- break;
- default:
- if (!macrolookup(macros, in, t.text, &t.pos))
- error(err_badmidcmd, t.text, &t.pos);
- break;
- }
- }
- if (!already)
- dtor(t), t = get_token(in);
- seenwhite = iswhite;
- }
- /* Check the stack is empty */
- if (NULL != (sitem = stk_pop(parsestk)))
- {
- do
- {
- sfree(sitem);
- sitem = stk_pop(parsestk);
- }
- while (sitem);
- error(err_missingrbrace, &t.pos);
- }
- stk_free(parsestk);
- addpara(par, ret);
- }
-
- /*
- * We break to here rather than returning, because otherwise
- * this cleanup doesn't happen.
- */
- dtor(t);
- macrocleanup(macros);
-}
-
-paragraph *read_input(input * in, indexdata * idx)
-{
- paragraph *head = NULL;
- paragraph **hptr = &head;
-
- while (in->currindex < in->nfiles)
- {
- in->currfp = fopen(in->filenames[in->currindex], "r");
- if (in->currfp)
- {
- setpos(in, in->filenames[in->currindex]);
- read_file(&hptr, in, idx);
- }
- in->currindex++;
- }
-
- return head;
-}
+/*
+ * input.c: read the source form
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <time.h>
+#include "halibut.h"
+
+#define TAB_STOP 8 /* for column number tracking */
+
+static void setpos(input * in, char *fname)
+{
+ in->pos.filename = fname;
+ in->pos.line = 1;
+ in->pos.col = (in->reportcols ? 1 : -1);
+}
+
+static void unget(input * in, int c, filepos * pos)
+{
+ if (in->npushback >= in->pushbacksize)
+ {
+ in->pushbacksize = in->npushback + 16;
+ in->pushback = resize(in->pushback, in->pushbacksize);
+ }
+ in->pushback[in->npushback].chr = c;
+ in->pushback[in->npushback].pos = *pos; /* structure copy */
+ in->npushback++;
+}
+
+/* ---------------------------------------------------------------------- */
+/*
+ * Macro subsystem
+ */
+typedef struct macro_Tag macro;
+struct macro_Tag {
+ wchar_t *name, *text;
+};
+struct macrostack_Tag {
+ macrostack *next;
+ wchar_t *text;
+ int ptr, npushback;
+ filepos pos;
+};
+static int macrocmp(void *av, void *bv)
+{
+ macro *a = (macro *) av, *b = (macro *) bv;
+ return ustrcmp(a->name, b->name);
+}
+static void
+macrodef(tree234 * macros, wchar_t * name, wchar_t * text, filepos fpos)
+{
+ macro *m = mknew(macro);
+ m->name = name;
+ m->text = text;
+ if (add234(macros, m) != m)
+ {
+ error(err_macroexists, &fpos, name);
+ sfree(name);
+ sfree(text);
+ }
+}
+static int
+macrolookup(tree234 * macros, input * in, wchar_t * name, filepos * pos)
+{
+ macro m, *gotit;
+ m.name = name;
+ gotit = find234(macros, &m, NULL);
+ if (gotit)
+ {
+ macrostack *expansion = mknew(macrostack);
+ expansion->next = in->stack;
+ expansion->text = gotit->text;
+ expansion->pos = *pos; /* structure copy */
+ expansion->ptr = 0;
+ expansion->npushback = in->npushback;
+ in->stack = expansion;
+ return TRUE;
+ } else
+ return FALSE;
+}
+static void macrocleanup(tree234 * macros)
+{
+ int ti;
+ macro *m;
+ for (ti = 0; (m = (macro *) index234(macros, ti)) != NULL; ti++)
+ {
+ sfree(m->name);
+ sfree(m->text);
+ sfree(m);
+ }
+ freetree234(macros);
+}
+
+/*
+ * Can return EOF
+ */
+static int get(input * in, filepos * pos)
+{
+ int pushbackpt = in->stack ? in->stack->npushback : 0;
+ if (in->npushback > pushbackpt)
+ {
+ --in->npushback;
+ if (pos)
+ *pos = in->pushback[in->npushback].pos; /* structure copy */
+ return in->pushback[in->npushback].chr;
+ } else if (in->stack)
+ {
+ wchar_t c = in->stack->text[in->stack->ptr];
+ if (in->stack->text[++in->stack->ptr] == L'\0')
+ {
+ macrostack *tmp = in->stack;
+ in->stack = tmp->next;
+ sfree(tmp);
+ }
+ return c;
+ } else if (in->currfp)
+ {
+ int c = getc(in->currfp);
+
+ if (c == EOF)
+ {
+ fclose(in->currfp);
+ in->currfp = NULL;
+ }
+ /* Track line numbers, for error reporting */
+ if (pos)
+ *pos = in->pos;
+ if (in->reportcols)
+ {
+ switch (c)
+ {
+ case '\t':
+ in->pos.col = 1 + (in->pos.col + TAB_STOP - 1) % TAB_STOP;
+ break;
+ case '\n':
+ in->pos.col = 1;
+ in->pos.line++;
+ break;
+ default:
+ in->pos.col++;
+ break;
+ }
+ } else
+ {
+ in->pos.col = -1;
+ if (c == '\n')
+ in->pos.line++;
+ }
+ /* FIXME: do input charmap translation. We should be returning
+ * Unicode here. */
+ return c;
+ } else
+ return EOF;
+}
+
+/*
+ * Lexical analysis of source files.
+ */
+typedef struct token_Tag token;
+struct token_Tag {
+ int type;
+ int cmd, aux;
+ wchar_t *text;
+ filepos pos;
+};
+enum {
+ tok_eof, /* end of file */
+ tok_eop, /* end of paragraph */
+ tok_white, /* whitespace */
+ tok_word, /* a word or word fragment */
+ tok_cmd, /* \command */
+ tok_lbrace, /* { */
+ tok_rbrace /* } */
+};
+
+/* Halibut command keywords. */
+enum {
+ c__invalid, /* invalid command */
+ c__comment, /* comment command (\#) */
+ c__escaped, /* escaped character */
+ c__nbsp, /* nonbreaking space */
+ c_A, /* appendix heading */
+ c_B, /* bibliography entry */
+ c_BR, /* bibliography rewrite */
+ c_C, /* chapter heading */
+ c_H, /* heading */
+ c_I, /* invisible index mark */
+ c_IM, /* index merge/rewrite */
+ c_K, /* capitalised cross-reference */
+ c_S, /* aux field is 0, 1, 2, ... */
+ c_U, /* unnumbered-chapter heading */
+ c_W, /* Web hyperlink */
+ c_L, /* Relative/local hyperlink */
+ c_b, /* bulletted list */
+ c_c, /* code */
+ c_cfg, /* configuration directive */
+ c_copyright, /* copyright statement */
+ c_cw, /* weak code */
+ c_date, /* document processing date */
+ c_define, /* macro definition */
+ c_e, /* emphasis */
+ c_i, /* visible index mark */
+ c_ii, /* uncapitalised visible index mark */
+ c_k, /* uncapitalised cross-reference */
+ c_R, /* free text cross-reference */
+ c_n, /* numbered list */
+ c_nocite, /* bibliography trickery */
+ c_preamble, /* document preamble text */
+ c_q, /* quote marks */
+ c_rule, /* horizontal rule */
+ c_title, /* document title */
+ c_u, /* aux field is char code */
+ c_versionid /* document RCS id */
+};
+
+/* Perhaps whitespace should be defined in a more Unicode-friendly way? */
+#define iswhite(c) ( (c)==32 || (c)==9 || (c)==13 || (c)==10 )
+#define isnl(c) ( (c)==10 )
+#define isdec(c) ( ((c)>='0'&&(c)<='9') )
+#define fromdec(c) ( (c)-'0' )
+#define ishex(c) ( ((c)>='0'&&(c)<='9') || ((c)>='A'&&(c)<='F') || ((c)>='a'&&(c)<='f'))
+#define fromhex(c) ( (c)<='9' ? (c)-'0' : ((c)&0xDF) - ('A'-10) )
+#define iscmd(c) ( ((c)>='0'&&(c)<='9') || ((c)>='A'&&(c)<='Z') || ((c)>='a'&&(c)<='z'))
+
+/*
+ * Keyword comparison function. Like strcmp, but between a wchar_t *
+ * and a char *.
+ */
+static int kwcmp(wchar_t const *p, char const *q)
+{
+ int i;
+ do
+ {
+ i = *p - *q;
+ }
+ while (*p++ && *q++ && !i);
+ return i;
+}
+
+/*
+ * Match a keyword.
+ */
+static void match_kw(token * tok)
+{
+ /*
+ * FIXME. The ids are explicit in here so as to allow long-name
+ * equivalents to the various very short keywords.
+ *
+ * This list must be sorted, it's searched using binary search.
+ */
+ static const struct {
+ char const *name;
+ int id;
+ } keywords[] = {
+ {
+ "#", c__comment}
+ , /* comment command (\#) */
+ {
+ "-", c__escaped}
+ , /* nonbreaking hyphen */
+ {
+ "A", c_A}
+ , /* appendix heading */
+ {
+ "B", c_B}
+ , /* bibliography entry */
+ {
+ "BR", c_BR}
+ , /* bibliography rewrite */
+ {
+ "C", c_C}
+ , /* chapter heading */
+ {
+ "H", c_H}
+ , /* heading */
+ {
+ "I", c_I}
+ , /* invisible index mark */
+ {
+ "IM", c_IM}
+ , /* index merge/rewrite */
+ {
+ "K", c_K}
+ , /* capitalised cross-reference */
+ {
+ "L", c_L}
+ , /* Relative/local hyperlink */
+ {
+ "R", c_R}
+ , /* free text cross-reference */
+ {
+ "U", c_U}
+ , /* unnumbered-chapter heading */
+ {
+ "W", c_W}
+ , /* Web hyperlink */
+ {
+ "\\", c__escaped}
+ , /* escaped backslash (\\) */
+ {
+ "_", c__nbsp}
+ , /* nonbreaking space (\_) */
+ {
+ "b", c_b}
+ , /* bulletted list */
+ {
+ "c", c_c}
+ , /* code */
+ {
+ "cfg", c_cfg}
+ , /* configuration directive */
+ {
+ "copyright", c_copyright}
+ , /* copyright statement */
+ {
+ "cw", c_cw}
+ , /* weak code */
+ {
+ "date", c_date}
+ , /* document processing date */
+ {
+ "define", c_define}
+ , /* macro definition */
+ {
+ "e", c_e}
+ , /* emphasis */
+ {
+ "i", c_i}
+ , /* visible index mark */
+ {
+ "ii", c_ii}
+ , /* uncapitalised visible index mark */
+ {
+ "k", c_k}
+ , /* uncapitalised cross-reference */
+ {
+ "n", c_n}
+ , /* numbered list */
+ {
+ "nocite", c_nocite}
+ , /* bibliography trickery */
+ {
+ "preamble", c_preamble}
+ , /* document preamble text */
+ {
+ "q", c_q}
+ , /* quote marks */
+ {
+ "rule", c_rule}
+ , /* horizontal rule */
+ {
+ "title", c_title}
+ , /* document title */
+ {
+ "versionid", c_versionid}
+ , /* document RCS id */
+ {
+ "{", c__escaped}
+ , /* escaped lbrace (\{) */
+ {
+ "}", c__escaped}
+ , /* escaped rbrace (\}) */
+ };
+ int i, j, k, c;
+
+ /*
+ * Special cases: \S{0,1,2,...} and \uABCD. If the syntax
+ * doesn't match correctly, we just fall through to the
+ * binary-search phase.
+ */
+ if (tok->text[0] == 'S')
+ {
+ /* We expect numeric characters thereafter. */
+ wchar_t *p = tok->text + 1;
+ int n;
+ if (!*p)
+ n = 1;
+ else
+ {
+ n = 0;
+ while (*p && isdec(*p))
+ {
+ n = 10 * n + fromdec(*p);
+ p++;
+ }
+ }
+ if (!*p)
+ {
+ tok->cmd = c_S;
+ tok->aux = n;
+ return;
+ }
+ } else if (tok->text[0] == 'u')
+ {
+ /* We expect hex characters thereafter. */
+ wchar_t *p = tok->text + 1;
+ int n = 0;
+ while (*p && ishex(*p))
+ {
+ n = 16 * n + fromhex(*p);
+ p++;
+ }
+ if (!*p)
+ {
+ tok->cmd = c_u;
+ tok->aux = n;
+ return;
+ }
+ }
+
+ i = -1;
+ j = sizeof(keywords) / sizeof(*keywords);
+ while (j - i > 1)
+ {
+ k = (i + j) / 2;
+ c = kwcmp(tok->text, keywords[k].name);
+ if (c < 0)
+ j = k;
+ else if (c > 0)
+ i = k;
+ else
+ { /* c == 0 */
+
+ tok->cmd = keywords[k].id;
+ return;
+ }
+ }
+
+ tok->cmd = c__invalid;
+}
+
+
+/*
+ * Read a token from the input file, in the normal way (`normal' in
+ * the sense that code paragraphs work a different way).
+ */
+token get_token(input * in)
+{
+ int c;
+ int nls;
+ token ret;
+ rdstring rs = { 0, 0, NULL };
+ filepos cpos;
+
+ ret.cmd = c__invalid;
+ ret.aux = FALSE;
+ ret.text = NULL; /* default */
+ c = get(in, &cpos);
+ ret.pos = cpos;
+ if (iswhite(c))
+ { /* tok_white or tok_eop */
+ nls = 0;
+ do
+ {
+ if (isnl(c))
+ nls++;
+ }
+ while ((c = get(in, &cpos)) != EOF && iswhite(c));
+ if (c == EOF)
+ {
+ ret.type = tok_eof;
+ return ret;
+ }
+ unget(in, c, &cpos);
+ ret.type = (nls > 1 ? tok_eop : tok_white);
+ return ret;
+ } else if (c == EOF)
+ { /* tok_eof */
+ ret.type = tok_eof;
+ return ret;
+ } else if (c == '\\')
+ { /* tok_cmd */
+ c = get(in, &cpos);
+ if (c == '-' || c == '\\' || c == '_' ||
+ c == '#' || c == '{' || c == '}')
+ {
+ /* single-char command */
+ rdadd(&rs, (wchar_t)c);
+ } else if (c == 'u')
+ {
+ int len = 0;
+ do
+ {
+ rdadd(&rs, (wchar_t)c);
+ len++;
+ c = get(in, &cpos);
+ }
+ while (ishex(c) && len < 5);
+ unget(in, c, &cpos);
+ } else if (iscmd(c))
+ {
+ do
+ {
+ rdadd(&rs, (wchar_t)c);
+ c = get(in, &cpos);
+ }
+ while (iscmd(c));
+ unget(in, c, &cpos);
+ }
+ /*
+ * Now match the command against the list of available
+ * ones.
+ */
+ ret.type = tok_cmd;
+ ret.text = ustrdup(rs.text);
+ match_kw(&ret);
+ sfree(rs.text);
+ return ret;
+ } else if (c == '{')
+ { /* tok_lbrace */
+ ret.type = tok_lbrace;
+ return ret;
+ } else if (c == '}')
+ { /* tok_rbrace */
+ ret.type = tok_rbrace;
+ return ret;
+ } else
+ { /* tok_word */
+ /*
+ * Read a word: the longest possible contiguous sequence of
+ * things other than whitespace, backslash, braces and
+ * hyphen. A hyphen terminates the word but is returned as
+ * part of it; everything else is pushed back for the next
+ * token. The `aux' field contains TRUE if the word ends in
+ * a hyphen.
+ */
+ ret.aux = FALSE; /* assumed for now */
+ while (1)
+ {
+ if (iswhite(c) || c == '{' || c == '}' || c == '\\' || c == EOF)
+ {
+ /* Put back the character that caused termination */
+ unget(in, c, &cpos);
+ break;
+ } else
+ {
+ rdadd(&rs, (wchar_t)c);
+ if (c == '-')
+ {
+ ret.aux = TRUE;
+ break; /* hyphen terminates word */
+ }
+ }
+ c = get(in, &cpos);
+ }
+ ret.type = tok_word;
+ ret.text = ustrdup(rs.text);
+ sfree(rs.text);
+ return ret;
+ }
+}
+
+/*
+ * Determine whether the next input character is an open brace (for
+ * telling code paragraphs from paragraphs which merely start with
+ * code).
+ */
+int isbrace(input * in)
+{
+ int c;
+ filepos cpos;
+
+ c = get(in, &cpos);
+ unget(in, c, &cpos);
+ return (c == '{');
+}
+
+/*
+ * Read the rest of a line that starts `\c'. Including nothing at
+ * all (tok_word with empty text).
+ */
+token get_codepar_token(input * in)
+{
+ int c;
+ token ret;
+ rdstring rs = { 0, 0, NULL };
+ filepos cpos;
+
+ ret.type = tok_word;
+ c = get(in, &cpos); /* expect (and discard) one space */
+ ret.pos = cpos;
+ if (c == ' ')
+ {
+ c = get(in, &cpos);
+ ret.pos = cpos;
+ }
+ while (!isnl(c) && c != EOF)
+ {
+ int c2 = c;
+ c = get(in, &cpos);
+ /* Discard \r just before \n. */
+ if (c2 != 13 || !isnl(c))
+ rdadd(&rs, (wchar_t)c2);
+ }
+ unget(in, c, &cpos);
+ ret.text = ustrdup(rs.text);
+ sfree(rs.text);
+ return ret;
+}
+
+/*
+ * Adds a new word to a linked list
+ */
+static word *addword(word newword, word *** hptrptr)
+{
+ word *mnewword;
+ if (!hptrptr)
+ return NULL;
+ mnewword = mknew(word);
+ *mnewword = newword; /* structure copy */
+ mnewword->next = NULL;
+ **hptrptr = mnewword;
+ *hptrptr = &mnewword->next;
+ return mnewword;
+}
+
+/*
+ * Adds a new paragraph to a linked list
+ */
+static paragraph *addpara(paragraph newpara, paragraph *** hptrptr)
+{
+ paragraph *mnewpara = mknew(paragraph);
+ *mnewpara = newpara; /* structure copy */
+ mnewpara->next = NULL;
+ **hptrptr = mnewpara;
+ *hptrptr = &mnewpara->next;
+ return mnewpara;
+}
+
+/*
+ * Destructor before token is reassigned; should catch most memory
+ * leaks
+ */
+#define dtor(t) ( sfree(t.text) )
+
+/*
+ * Reads a single file (ie until get() returns EOF)
+ */
+static void read_file(paragraph *** ret, input * in, indexdata * idx)
+{
+ token t;
+ paragraph par;
+ word wd, **whptr, **idximplicit;
+ tree234 *macros;
+ wchar_t utext[2], *wdtext;
+ int style, spcstyle;
+ int already;
+ int iswhite, seenwhite;
+ int type;
+ struct stack_item {
+ enum {
+ stack_nop = 0, /* do nothing (for error recovery) */
+ stack_ualt = 1, /* \u alternative */
+ stack_style = 2, /* \e, \c, \cw */
+ stack_idx = 4, /* \I, \i, \ii */
+ stack_hyper = 8, /* \W */
+ stack_quote = 16, /* \q */
+ } type;
+ word **whptr; /* to restore from \u alternatives */
+ word **idximplicit; /* to restore from \u alternatives */
+ } *sitem;
+ stack parsestk;
+ word *indexword=NULL, *uword=NULL, *iword=NULL;
+ word *idxwordlist;
+ rdstring indexstr;
+ int index_downcase=0, index_visible=0, indexing=0;
+ const rdstring nullrs = { 0, 0, NULL };
+ wchar_t uchr;
+
+ t.text = NULL;
+ macros = newtree234(macrocmp);
+ already = FALSE;
+
+ /*
+ * Loop on each paragraph.
+ */
+ while (1)
+ {
+ int start_cmd = c__invalid;
+ par.words = NULL;
+ par.keyword = NULL;
+ whptr = &par.words;
+
+ /*
+ * Get a token.
+ */
+ if (!already)
+ {
+ dtor(t), t = get_token(in);
+ }
+ already = FALSE;
+ if (t.type == tok_eof)
+ break;
+
+ /*
+ * Parse code paragraphs separately.
+ */
+ if (t.type == tok_cmd && t.cmd == c_c && !isbrace(in))
+ {
+ par.type = para_Code;
+ par.fpos = t.pos;
+ while (1)
+ {
+ dtor(t), t = get_codepar_token(in);
+ wd.type = word_WeakCode;
+ wd.breaks = FALSE; /* shouldn't need this... */
+ wd.text = ustrdup(t.text);
+ wd.alt = NULL;
+ wd.fpos = t.pos;
+ addword(wd, &whptr);
+ dtor(t), t = get_token(in);
+ if (t.type == tok_white)
+ {
+ /*
+ * The newline after a code-paragraph line
+ */
+ dtor(t), t = get_token(in);
+ }
+ if (t.type == tok_eop || t.type == tok_eof)
+ break;
+ else if (t.type != tok_cmd || t.cmd != c_c)
+ {
+ error(err_brokencodepara, &t.pos);
+ addpara(par, ret);
+ while (t.type != tok_eop) /* error recovery: */
+ dtor(t), t = get_token(in); /* eat rest of paragraph */
+ goto codeparabroken; /* ick, but such is life */
+ }
+ }
+ addpara(par, ret);
+ codeparabroken:
+ continue;
+ }
+
+ while (t.type == tok_cmd && macrolookup(macros, in, t.text, &t.pos))
+ {
+ dtor(t), t = get_token(in);
+ }
+
+
+ /*
+ * This token begins a paragraph. See if it's one of the
+ * special commands that define a paragraph type.
+ *
+ * (note that \# is special in a way, and \nocite takes no
+ * text)
+ */
+ par.type = para_Normal;
+ if (t.type == tok_cmd)
+ {
+ int needkw=0;
+ int is_macro = FALSE;
+
+ par.fpos = t.pos;
+ switch (t.cmd)
+ {
+ default:
+ needkw = -1;
+ break;
+ case c__invalid:
+ error(err_badparatype, t.text, &t.pos);
+ needkw = 4;
+ break;
+ case c__comment:
+ if (isbrace(in))
+ break; /* `\#{': isn't a comment para */
+ do
+ {
+ dtor(t), t = get_token(in);
+ }
+ while (t.type != tok_eop && t.type != tok_eof);
+ continue; /* next paragraph */
+ /*
+ * `needkw' values:
+ *
+ * 1 -- exactly one keyword
+ * 2 -- at least one keyword
+ * 4 -- any number of keywords including zero
+ * 8 -- at least one keyword and then nothing else
+ * 16 -- nothing at all! no keywords, no body
+ * 32 -- no keywords at all
+ */
+ case c_A:
+ needkw = 2;
+ par.type = para_Appendix;
+ break;
+ case c_B:
+ needkw = 2;
+ par.type = para_Biblio;
+ break;
+ case c_BR:
+ needkw = 1;
+ par.type = para_BR;
+ start_cmd = c_BR;
+ break;
+ case c_C:
+ needkw = 2;
+ par.type = para_Chapter;
+ break;
+ case c_H:
+ needkw = 2;
+ par.type = para_Heading;
+ par.aux = 0;
+ break;
+ case c_IM:
+ needkw = 2;
+ par.type = para_IM;
+ start_cmd = c_IM;
+ break;
+ case c_S:
+ needkw = 2;
+ par.type = para_Subsect;
+ par.aux = t.aux;
+ break;
+ case c_U:
+ needkw = 32;
+ par.type = para_UnnumberedChapter;
+ break;
+ /* For \b and \n the keyword is optional */
+ case c_b:
+ needkw = 4;
+ par.type = para_Bullet;
+ break;
+ case c_n:
+ needkw = 4;
+ par.type = para_NumberedList;
+ break;
+ case c_cfg:
+ needkw = 8;
+ par.type = para_Config;
+ start_cmd = c_cfg;
+ break;
+ case c_copyright:
+ needkw = 32;
+ par.type = para_Copyright;
+ break;
+ case c_define:
+ is_macro = TRUE;
+ needkw = 1;
+ break;
+ /* For \nocite the keyword is _everything_ */
+ case c_nocite:
+ needkw = 8;
+ par.type = para_NoCite;
+ break;
+ case c_preamble:
+ needkw = 32;
+ par.type = para_Preamble;
+ break;
+ case c_rule:
+ needkw = 16;
+ par.type = para_Rule;
+ break;
+ case c_title:
+ needkw = 32;
+ par.type = para_Title;
+ break;
+ case c_versionid:
+ needkw = 32;
+ par.type = para_VersionID;
+ break;
+ }
+
+ if (needkw > 0)
+ {
+ rdstring rs = { 0, 0, NULL };
+ int nkeys = 0;
+ filepos fp;
+
+ /* Get keywords. */
+ dtor(t), t = get_token(in);
+ fp = t.pos;
+ while (t.type == tok_lbrace)
+ {
+ /* This is a keyword. */
+ nkeys++;
+ /* FIXME: there will be bugs if anyone specifies an
+ * empty keyword (\foo{}), so trap this case. */
+ while (dtor(t), t = get_token(in),
+ t.type == tok_word ||
+ t.type == tok_white ||
+ (t.type == tok_cmd && t.cmd == c__nbsp) ||
+ (t.type == tok_cmd && t.cmd == c__escaped))
+ {
+ if (t.type == tok_white ||
+ (t.type == tok_cmd && t.cmd == c__nbsp))
+ rdadd(&rs, ' ');
+ else
+ rdadds(&rs, t.text);
+ }
+ if (t.type != tok_rbrace)
+ {
+ error(err_kwunclosed, &t.pos);
+ continue;
+ }
+ rdadd(&rs, 0); /* add string terminator */
+ dtor(t), t = get_token(in); /* eat right brace */
+ }
+
+ rdadd(&rs, 0); /* add string terminator */
+
+ /* See whether we have the right number of keywords. */
+ if ((needkw & 48) && nkeys > 0)
+ error(err_kwillegal, &fp);
+ if ((needkw & 11) && nkeys == 0)
+ error(err_kwexpected, &fp);
+ if ((needkw & 5) && nkeys > 1)
+ error(err_kwtoomany, &fp);
+
+ if (is_macro)
+ {
+ /*
+ * Macro definition. Get the rest of the line
+ * as a code-paragraph token, repeatedly until
+ * there's nothing more left of it. Separate
+ * with newlines.
+ */
+ rdstring macrotext = { 0, 0, NULL };
+ while (1)
+ {
+ dtor(t), t = get_codepar_token(in);
+ if (macrotext.pos > 0)
+ rdadd(&macrotext, L'\n');
+ rdadds(&macrotext, t.text);
+ dtor(t), t = get_token(in);
+ if (t.type == tok_eop)
+ break;
+ }
+ macrodef(macros, rs.text, macrotext.text, fp);
+ continue; /* next paragraph */
+ }
+
+ par.keyword = rdtrim(&rs);
+
+ /* Move to EOP in case of needkw==8 or 16 (no body) */
+ if (needkw & 24)
+ {
+ /* We allow whitespace even when we expect no para body */
+ while (t.type == tok_white)
+ dtor(t), t = get_token(in);
+ if (t.type != tok_eop && t.type != tok_eof &&
+ (start_cmd == c__invalid ||
+ t.type != tok_cmd || t.cmd != start_cmd))
+ {
+ error(err_bodyillegal, &t.pos);
+ /* Error recovery: eat the rest of the paragraph */
+ while (t.type != tok_eop && t.type != tok_eof &&
+ (start_cmd == c__invalid ||
+ t.type != tok_cmd || t.cmd != start_cmd))
+ dtor(t), t = get_token(in);
+ }
+ if (t.type == tok_cmd)
+ already = TRUE; /* inhibit get_token at top of loop */
+ addpara(par, ret);
+ continue; /* next paragraph */
+ }
+ }
+ }
+
+ /*
+ * Now read the actual paragraph, word by word, adding to
+ * the paragraph list.
+ *
+ * Mid-paragraph commands:
+ *
+ * \K \k
+ * \c \cw
+ * \e
+ * \i \ii
+ * \I
+ * \u
+ * \W
+ * \date
+ * \\ \{ \}
+ */
+ parsestk = stk_new();
+ style = word_Normal;
+ spcstyle = word_WhiteSpace;
+ indexing = FALSE;
+ seenwhite = TRUE;
+ while (t.type != tok_eop && t.type != tok_eof)
+ {
+ iswhite = FALSE;
+ already = FALSE;
+
+ /* Handle implicit paragraph breaks after \IM, \BR etc */
+ if (start_cmd != c__invalid &&
+ t.type == tok_cmd && t.cmd == start_cmd)
+ {
+ already = TRUE; /* inhibit get_token at top of loop */
+ break;
+ }
+
+ if (t.type == tok_cmd && t.cmd == c__escaped)
+ {
+ t.type = tok_word; /* nice and simple */
+ t.aux = 0; /* even if `\-' - nonbreaking! */
+ }
+ if (t.type == tok_cmd && t.cmd == c__nbsp)
+ {
+ t.type = tok_word; /* nice and simple */
+ sfree(t.text);
+ t.text = ustrdup(L" "); /* text is ` ' not `_' */
+ t.aux = 0; /* (nonbreaking) */
+ }
+ switch (t.type)
+ {
+ case tok_white:
+ if (whptr == &par.words)
+ break; /* strip whitespace at start of para */
+ wd.text = NULL;
+ wd.type = spcstyle;
+ wd.alt = NULL;
+ wd.aux = 0;
+ wd.fpos = t.pos;
+ wd.breaks = FALSE;
+
+ /*
+ * Inhibit use of whitespace if it's (probably the
+ * newline) before a repeat \IM / \BR type
+ * directive.
+ */
+ if (start_cmd != c__invalid)
+ {
+ dtor(t), t = get_token(in);
+ already = TRUE;
+ if (t.type == tok_cmd && t.cmd == start_cmd)
+ break;
+ }
+
+ if (indexing)
+ rdadd(&indexstr, ' ');
+ if (!indexing || index_visible)
+ addword(wd, &whptr);
+ if (indexing)
+ addword(wd, &idximplicit);
+ iswhite = TRUE;
+ break;
+ case tok_word:
+ if (indexing)
+ rdadds(&indexstr, t.text);
+ wd.type = style;
+ wd.alt = NULL;
+ wd.aux = 0;
+ wd.fpos = t.pos;
+ wd.breaks = t.aux;
+ if (!indexing || index_visible)
+ {
+ wd.text = ustrdup(t.text);
+ addword(wd, &whptr);
+ }
+ if (indexing)
+ {
+ wd.text = ustrdup(t.text);
+ addword(wd, &idximplicit);
+ }
+ break;
+ case tok_lbrace:
+ error(err_unexbrace, &t.pos);
+ /* Error recovery: push nop */
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_nop;
+ stk_push(parsestk, sitem);
+ break;
+ case tok_rbrace:
+ sitem = stk_pop(parsestk);
+ if (!sitem)
+ error(err_unexbrace, &t.pos);
+ else
+ {
+ if (sitem->type & stack_ualt)
+ {
+ whptr = sitem->whptr;
+ idximplicit = sitem->idximplicit;
+ }
+ if (sitem->type & stack_style)
+ {
+ style = word_Normal;
+ spcstyle = word_WhiteSpace;
+ }
+ if (sitem->type & stack_idx ) {
+ indexword->text = ustrdup(indexstr.text);
+ if (index_downcase)
+ ustrlow(indexword->text);
+ indexing = FALSE;
+ rdadd(&indexstr, L'\0');
+ index_merge(idx, FALSE, indexstr.text, idxwordlist);
+ sfree(indexstr.text);
+ }
+ if (sitem->type & stack_hyper)
+ {
+ wd.text = NULL;
+ wd.type = word_HyperEnd;
+ wd.alt = NULL;
+ wd.aux = 0;
+ wd.fpos = t.pos;
+ wd.breaks = FALSE;
+ if (!indexing || index_visible)
+ addword(wd, &whptr);
+ if (indexing)
+ addword(wd, &idximplicit);
+ }
+ if (sitem->type & stack_quote)
+ {
+ wd.text = NULL;
+ wd.type = toquotestyle(style);
+ wd.alt = NULL;
+ wd.aux = quote_Close;
+ wd.fpos = t.pos;
+ wd.breaks = FALSE;
+ if (!indexing || index_visible)
+ addword(wd, &whptr);
+ if (indexing)
+ {
+ rdadd(&indexstr, L'"');
+ addword(wd, &idximplicit);
+ }
+ }
+ }
+ sfree(sitem);
+ break;
+ case tok_cmd:
+ switch (t.cmd)
+ {
+ case c__comment:
+ /*
+ * In-paragraph comment: \#{ balanced braces }
+ *
+ * Anything goes here; even tok_eop. We should
+ * eat whitespace after the close brace _if_
+ * there was whitespace before the \#.
+ */
+ dtor(t), t = get_token(in);
+ if (t.type != tok_lbrace)
+ {
+ error(err_explbr, &t.pos);
+ } else
+ {
+ int braces = 1;
+ while (braces > 0)
+ {
+ dtor(t), t = get_token(in);
+ if (t.type == tok_lbrace)
+ braces++;
+ else if (t.type == tok_rbrace)
+ braces--;
+ else if (t.type == tok_eof)
+ {
+ error(err_commenteof, &t.pos);
+ break;
+ }
+ }
+ }
+ if (seenwhite)
+ {
+ already = TRUE;
+ dtor(t), t = get_token(in);
+ if (t.type == tok_white)
+ {
+ iswhite = TRUE;
+ already = FALSE;
+ }
+ }
+ break;
+ case c_q:
+ dtor(t), t = get_token(in);
+ if (t.type != tok_lbrace)
+ {
+ error(err_explbr, &t.pos);
+ } else
+ {
+ wd.text = NULL;
+ wd.type = toquotestyle(style);
+ wd.alt = NULL;
+ wd.aux = quote_Open;
+ wd.fpos = t.pos;
+ wd.breaks = FALSE;
+ if (!indexing || index_visible)
+ addword(wd, &whptr);
+ if (indexing)
+ {
+ rdadd(&indexstr, L'"');
+ addword(wd, &idximplicit);
+ }
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_quote;
+ stk_push(parsestk, sitem);
+ }
+ break;
+ case c_K:
+ case c_k:
+ case c_R:
+ case c_W:
+ case c_L:
+ case c_date:
+ /*
+ * Keyword, hyperlink, or \date. We expect a
+ * left brace, some text, and then a right
+ * brace. No nesting; no arguments.
+ */
+ wd.fpos = t.pos;
+ wd.breaks = FALSE;
+ if (t.cmd == c_K)
+ wd.type = word_UpperXref;
+ else if (t.cmd == c_k)
+ wd.type = word_LowerXref;
+ else if (t.cmd == c_R)
+ wd.type = word_FreeTextXref;
+ else if (t.cmd == c_W)
+ wd.type = word_HyperLink;
+ else if (t.cmd == c_L)
+ wd.type = word_LocalHyperLink;
+ else
+ wd.type = word_Normal;
+ dtor(t), t = get_token(in);
+ if (t.type != tok_lbrace)
+ {
+ if (wd.type == word_Normal)
+ {
+ time_t thetime = time(NULL);
+ struct tm *broken = localtime(&thetime);
+ already = TRUE;
+ wdtext = ustrftime(NULL, broken);
+ wd.type = style;
+ } else
+ {
+ error(err_explbr, &t.pos);
+ wdtext = NULL;
+ }
+ } else
+ {
+ rdstring rs = { 0, 0, NULL };
+ while (dtor(t), t = get_token(in),
+ t.type == tok_word || t.type == tok_white)
+ {
+ if (t.type == tok_white)
+ rdadd(&rs, ' ');
+ else
+ rdadds(&rs, t.text);
+ }
+ if (wd.type == word_Normal)
+ {
+ time_t thetime = time(NULL);
+ struct tm *broken = localtime(&thetime);
+ wdtext = ustrftime(rs.text, broken);
+ wd.type = style;
+ } else
+ {
+ wdtext = ustrdup(rs.text);
+ }
+ sfree(rs.text);
+ if (t.type != tok_rbrace)
+ {
+ error(err_kwexprbr, &t.pos);
+ }
+ }
+ wd.alt = NULL;
+ wd.aux = 0;
+ if (!indexing || index_visible)
+ {
+ wd.text = ustrdup(wdtext);
+ addword(wd, &whptr);
+ }
+ if (indexing)
+ {
+ wd.text = ustrdup(wdtext);
+ addword(wd, &idximplicit);
+ }
+ sfree(wdtext);
+ if (wd.type == word_FreeTextXref || wd.type == word_HyperLink || wd.type == word_LocalHyperLink)
+ {
+ /*
+ * Hyperlinks are different: they then
+ * expect another left brace, to begin
+ * delimiting the text marked by the link.
+ */
+ dtor(t), t = get_token(in);
+ /*
+ * Special cases: \W{}\c, \W{}\e, \W{}\cw
+ */
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_hyper;
+ if (t.type == tok_cmd &&
+ (t.cmd == c_e || t.cmd == c_c || t.cmd == c_cw))
+ {
+ if (style != word_Normal)
+ error(err_nestedstyles, &t.pos);
+ else
+ {
+ style = (t.cmd == c_c ? word_Code :
+ t.cmd == c_cw ? word_WeakCode : word_Emph);
+ spcstyle = tospacestyle(style);
+ sitem->type |= stack_style;
+ }
+ dtor(t), t = get_token(in);
+ }
+ if (t.type != tok_lbrace)
+ {
+ error(err_explbr, &t.pos);
+ sfree(sitem);
+ } else
+ {
+ stk_push(parsestk, sitem);
+ }
+ }
+ break;
+ case c_c:
+ case c_cw:
+ case c_e:
+ type = t.cmd;
+ if (style != word_Normal)
+ {
+ error(err_nestedstyles, &t.pos);
+ /* Error recovery: eat lbrace, push nop. */
+ dtor(t), t = get_token(in);
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_nop;
+ stk_push(parsestk, sitem);
+ }
+ dtor(t), t = get_token(in);
+ if (t.type != tok_lbrace)
+ {
+ error(err_explbr, &t.pos);
+ } else
+ {
+ style = (type == c_c ? word_Code :
+ type == c_cw ? word_WeakCode : word_Emph);
+ spcstyle = tospacestyle(style);
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_style;
+ stk_push(parsestk, sitem);
+ }
+ break;
+ case c_i:
+ case c_ii:
+ case c_I:
+ type = t.cmd;
+ if (indexing)
+ {
+ error(err_nestedindex, &t.pos);
+ /* Error recovery: eat lbrace, push nop. */
+ dtor(t), t = get_token(in);
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_nop;
+ stk_push(parsestk, sitem);
+ }
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_idx;
+ dtor(t), t = get_token(in);
+ /*
+ * Special cases: \i\c, \i\e, \i\cw
+ */
+ wd.fpos = t.pos;
+ if (t.type == tok_cmd &&
+ (t.cmd == c_e || t.cmd == c_c || t.cmd == c_cw))
+ {
+ if (style != word_Normal)
+ error(err_nestedstyles, &t.pos);
+ else
+ {
+ style = (t.cmd == c_c ? word_Code :
+ t.cmd == c_cw ? word_WeakCode : word_Emph);
+ spcstyle = tospacestyle(style);
+ sitem->type |= stack_style;
+ }
+ dtor(t), t = get_token(in);
+ }
+ if (t.type != tok_lbrace)
+ {
+ sfree(sitem);
+ error(err_explbr, &t.pos);
+ } else
+ {
+ /* Add an index-reference word with no text as yet */
+ wd.type = word_IndexRef;
+ wd.text = NULL;
+ wd.alt = NULL;
+ wd.aux = 0;
+ wd.breaks = FALSE;
+ indexword = addword(wd, &whptr);
+ /* Set up a rdstring to read the index text */
+ indexstr = nullrs;
+ /* Flags so that we do the Right Things with text */
+ index_visible = (type != c_I);
+ index_downcase = (type == c_ii);
+ indexing = TRUE;
+ idxwordlist = NULL;
+ idximplicit = &idxwordlist;
+ /* Stack item to close the indexing on exit */
+ stk_push(parsestk, sitem);
+ }
+ break;
+ case c_u:
+ uchr = t.aux;
+ utext[0] = uchr;
+ utext[1] = 0;
+ wd.type = style;
+ wd.breaks = FALSE;
+ wd.alt = NULL;
+ wd.aux = 0;
+ wd.fpos = t.pos;
+ if (!indexing || index_visible)
+ {
+ wd.text = ustrdup(utext);
+ uword = addword(wd, &whptr);
+ } else
+ uword = NULL;
+ if (indexing)
+ {
+ wd.text = ustrdup(utext);
+ iword = addword(wd, &idximplicit);
+ } else
+ iword = NULL;
+ dtor(t), t = get_token(in);
+ if (t.type == tok_lbrace)
+ {
+ /*
+ * \u with a left brace. Until the brace
+ * closes, all further words go on a
+ * sidetrack from the main thread of the
+ * paragraph.
+ */
+ sitem = mknew(struct stack_item);
+ sitem->type = stack_ualt;
+ sitem->whptr = whptr;
+ sitem->idximplicit = idximplicit;
+ stk_push(parsestk, sitem);
+ whptr = uword ? &uword->alt : NULL;
+ idximplicit = iword ? &iword->alt : NULL;
+ } else
+ {
+ if (indexing)
+ rdadd(&indexstr, uchr);
+ already = TRUE;
+ }
+ break;
+ default:
+ if (!macrolookup(macros, in, t.text, &t.pos))
+ error(err_badmidcmd, t.text, &t.pos);
+ break;
+ }
+ }
+ if (!already)
+ dtor(t), t = get_token(in);
+ seenwhite = iswhite;
+ }
+ /* Check the stack is empty */
+ if (NULL != (sitem = stk_pop(parsestk)))
+ {
+ do
+ {
+ sfree(sitem);
+ sitem = stk_pop(parsestk);
+ }
+ while (sitem);
+ error(err_missingrbrace, &t.pos);
+ }
+ stk_free(parsestk);
+ addpara(par, ret);
+ }
+
+ /*
+ * We break to here rather than returning, because otherwise
+ * this cleanup doesn't happen.
+ */
+ dtor(t);
+ macrocleanup(macros);
+}
+
+paragraph *read_input(input * in, indexdata * idx)
+{
+ paragraph *head = NULL;
+ paragraph **hptr = &head;
+
+ while (in->currindex < in->nfiles)
+ {
+ in->currfp = fopen(in->filenames[in->currindex], "r");
+ if (in->currfp)
+ {
+ setpos(in, in->filenames[in->currindex]);
+ read_file(&hptr, in, idx);
+ }
+ in->currindex++;
+ }
+
+ return head;
+}
diff --git a/Docs/src/bin/halibut/keywords.c b/Docs/src/bin/halibut/keywords.c
index 0c9ba17..cb7c59e 100755
--- a/Docs/src/bin/halibut/keywords.c
+++ b/Docs/src/bin/halibut/keywords.c
@@ -1,171 +1,171 @@
-/*
- * keywords.c: keep track of all cross-reference keywords
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "halibut.h"
-
-static int kwcmp(void *av, void *bv)
-{
- const keyword *a = (const keyword *) av;
- const keyword *b = (const keyword *) bv;
- return ustrcmp(a->key, b->key);
-}
-
-static int kwfind(void *av, void *bv)
-{
- wchar_t *a = (wchar_t *) av;
- const keyword *b = (const keyword *) bv;
- return ustrcmp(a, b->key);
-}
-
-keyword *kw_lookup(keywordlist * kl, wchar_t * str)
-{
- return find234(kl->keys, str, kwfind);
-}
-
-/*
- * This function reads through source form and collects the
- * keywords. They get collected in a heap, sorted by Unicode
- * collation, last at the top (so that we can Heapsort them when we
- * finish).
- */
-keywordlist *get_keywords(paragraph * source)
-{
- int errors = FALSE;
- keywordlist *kl = mknew(keywordlist);
- numberstate *n = number_init();
- int prevpara = para_NotParaType;
-
- number_cfg(n, source);
-
- kl->size = 0;
- kl->keys = newtree234(kwcmp);
- kl->nlooseends = kl->looseendssize = 0;
- kl->looseends = NULL;
- for (; source; source = source->next)
- {
- wchar_t *p, *q;
- p = q = source->keyword;
-
- /*
- * Look for the section type override (`example',
- * `question' or whatever - to replace `chapter' or
- * `section' on a per-section basis).
- */
- if (q)
- {
- q = uadv(q); /* point q at the word beyond */
- if (!*q)
- q = NULL;
- }
-
- /*
- * Number the chapter / section / list-item / whatever.
- * This also sets up the `parent', `child' and `sibling'
- * links.
- */
- source->kwtext = number_mktext(n, source, q, prevpara, &errors);
- prevpara = source->type;
-
- if (p && *p)
- {
- if (source->kwtext || source->type == para_Biblio)
- {
- keyword *kw, *ret;
-
- kw = mknew(keyword);
- kw->key = p;
- kw->text = source->kwtext;
- kw->para = source;
- ret = add234(kl->keys, kw);
- if (ret != kw)
- {
- error(err_multikw, &source->fpos, &ret->para->fpos, p);
- sfree(kw);
- /* FIXME: what happens to kw->text? Does it leak? */
- }
- }
- } else
- {
- if (kl->nlooseends >= kl->looseendssize)
- {
- kl->looseendssize = kl->nlooseends + 32;
- kl->looseends = resize(kl->looseends, kl->looseendssize);
- }
- kl->looseends[kl->nlooseends++] = source->kwtext;
- }
- }
-
- number_free(n);
-
- if (errors)
- {
- free_keywords(kl);
- return NULL;
- }
-
- return kl;
-}
-
-void free_keywords(keywordlist * kl)
-{
- keyword *kw;
- while (kl->nlooseends)
- free_word_list(kl->looseends[--kl->nlooseends]);
- sfree(kl->looseends);
- while ((kw = index234(kl->keys, 0)) != NULL)
- {
- delpos234(kl->keys, 0);
- free_word_list(kw->text);
- sfree(kw);
- }
- freetree234(kl->keys);
- sfree(kl);
-}
-
-void subst_keywords(paragraph * source, keywordlist * kl)
-{
- for (; source; source = source->next)
- {
- word *ptr;
- for (ptr = source->words; ptr; ptr = ptr->next)
- {
- if (ptr->type == word_UpperXref || ptr->type == word_LowerXref)
- {
- keyword *kw;
- word **endptr, *close, *subst;
-
- kw = kw_lookup(kl, ptr->text);
- if (!kw)
- {
- error(err_nosuchkw, &ptr->fpos, ptr->text);
- subst = NULL;
- } else
- subst = dup_word_list(kw->text);
-
- if (subst && ptr->type == word_LowerXref &&
- kw->para->type != para_Biblio &&
- kw->para->type != para_BiblioCited)
- ustrlow(subst->text);
-
- close = mknew(word);
- close->text = NULL;
- close->alt = NULL;
- close->type = word_XrefEnd;
- close->fpos = ptr->fpos;
-
- close->next = ptr->next;
- ptr->next = subst;
-
- for (endptr = &ptr->next; *endptr; endptr = &(*endptr)->next)
- (*endptr)->fpos = ptr->fpos;
-
- *endptr = close;
- ptr = close;
- }
- }
- }
-}
+/*
+ * keywords.c: keep track of all cross-reference keywords
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include "halibut.h"
+
+static int kwcmp(void *av, void *bv)
+{
+ const keyword *a = (const keyword *) av;
+ const keyword *b = (const keyword *) bv;
+ return ustrcmp(a->key, b->key);
+}
+
+static int kwfind(void *av, void *bv)
+{
+ wchar_t *a = (wchar_t *) av;
+ const keyword *b = (const keyword *) bv;
+ return ustrcmp(a, b->key);
+}
+
+keyword *kw_lookup(keywordlist * kl, wchar_t * str)
+{
+ return find234(kl->keys, str, kwfind);
+}
+
+/*
+ * This function reads through source form and collects the
+ * keywords. They get collected in a heap, sorted by Unicode
+ * collation, last at the top (so that we can Heapsort them when we
+ * finish).
+ */
+keywordlist *get_keywords(paragraph * source)
+{
+ int errors = FALSE;
+ keywordlist *kl = mknew(keywordlist);
+ numberstate *n = number_init();
+ int prevpara = para_NotParaType;
+
+ number_cfg(n, source);
+
+ kl->size = 0;
+ kl->keys = newtree234(kwcmp);
+ kl->nlooseends = kl->looseendssize = 0;
+ kl->looseends = NULL;
+ for (; source; source = source->next)
+ {
+ wchar_t *p, *q;
+ p = q = source->keyword;
+
+ /*
+ * Look for the section type override (`example',
+ * `question' or whatever - to replace `chapter' or
+ * `section' on a per-section basis).
+ */
+ if (q)
+ {
+ q = uadv(q); /* point q at the word beyond */
+ if (!*q)
+ q = NULL;
+ }
+
+ /*
+ * Number the chapter / section / list-item / whatever.
+ * This also sets up the `parent', `child' and `sibling'
+ * links.
+ */
+ source->kwtext = number_mktext(n, source, q, prevpara, &errors);
+ prevpara = source->type;
+
+ if (p && *p)
+ {
+ if (source->kwtext || source->type == para_Biblio)
+ {
+ keyword *kw, *ret;
+
+ kw = mknew(keyword);
+ kw->key = p;
+ kw->text = source->kwtext;
+ kw->para = source;
+ ret = add234(kl->keys, kw);
+ if (ret != kw)
+ {
+ error(err_multikw, &source->fpos, &ret->para->fpos, p);
+ sfree(kw);
+ /* FIXME: what happens to kw->text? Does it leak? */
+ }
+ }
+ } else
+ {
+ if (kl->nlooseends >= kl->looseendssize)
+ {
+ kl->looseendssize = kl->nlooseends + 32;
+ kl->looseends = resize(kl->looseends, kl->looseendssize);
+ }
+ kl->looseends[kl->nlooseends++] = source->kwtext;
+ }
+ }
+
+ number_free(n);
+
+ if (errors)
+ {
+ free_keywords(kl);
+ return NULL;
+ }
+
+ return kl;
+}
+
+void free_keywords(keywordlist * kl)
+{
+ keyword *kw;
+ while (kl->nlooseends)
+ free_word_list(kl->looseends[--kl->nlooseends]);
+ sfree(kl->looseends);
+ while ((kw = index234(kl->keys, 0)) != NULL)
+ {
+ delpos234(kl->keys, 0);
+ free_word_list(kw->text);
+ sfree(kw);
+ }
+ freetree234(kl->keys);
+ sfree(kl);
+}
+
+void subst_keywords(paragraph * source, keywordlist * kl)
+{
+ for (; source; source = source->next)
+ {
+ word *ptr;
+ for (ptr = source->words; ptr; ptr = ptr->next)
+ {
+ if (ptr->type == word_UpperXref || ptr->type == word_LowerXref)
+ {
+ keyword *kw;
+ word **endptr, *close, *subst;
+
+ kw = kw_lookup(kl, ptr->text);
+ if (!kw)
+ {
+ error(err_nosuchkw, &ptr->fpos, ptr->text);
+ subst = NULL;
+ } else
+ subst = dup_word_list(kw->text);
+
+ if (subst && ptr->type == word_LowerXref &&
+ kw->para->type != para_Biblio &&
+ kw->para->type != para_BiblioCited)
+ ustrlow(subst->text);
+
+ close = mknew(word);
+ close->text = NULL;
+ close->alt = NULL;
+ close->type = word_XrefEnd;
+ close->fpos = ptr->fpos;
+
+ close->next = ptr->next;
+ ptr->next = subst;
+
+ for (endptr = &ptr->next; *endptr; endptr = &(*endptr)->next)
+ (*endptr)->fpos = ptr->fpos;
+
+ *endptr = close;
+ ptr = close;
+ }
+ }
+ }
+}
diff --git a/Docs/src/bin/halibut/licence.c b/Docs/src/bin/halibut/licence.c
index b48e0f1..4dd137b 100755
--- a/Docs/src/bin/halibut/licence.c
+++ b/Docs/src/bin/halibut/licence.c
@@ -1,17 +1,17 @@
-/*
- * licence.c: licence text
- */
-
-#include <stdio.h>
-
-static char *licencetext[] = {
- "FIXME: licence text goes here",
- NULL
-};
-
-void licence(void)
-{
- char **p;
- for (p = licencetext; *p; p++)
- puts(*p);
-}
+/*
+ * licence.c: licence text
+ */
+
+#include <stdio.h>
+
+static char *licencetext[] = {
+ "FIXME: licence text goes here",
+ NULL
+};
+
+void licence(void)
+{
+ char **p;
+ for (p = licencetext; *p; p++)
+ puts(*p);
+}
diff --git a/Docs/src/bin/halibut/main.c b/Docs/src/bin/halibut/main.c
index 18c136c..f82414f 100755
--- a/Docs/src/bin/halibut/main.c
+++ b/Docs/src/bin/halibut/main.c
@@ -1,321 +1,321 @@
-/*
- * main.c: command line parsing and top level
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "halibut.h"
-
-static void dbg_prtsource(paragraph * sourceform);
-static void dbg_prtwordlist(int level, word * w);
-static void dbg_prtkws(keywordlist * kws);
-
-int main(int argc, char **argv)
-{
- char **infiles;
- char *outfile;
- int nfiles;
- int nogo;
- int errs;
- int reportcols;
- int debug;
-
- /*
- * Set up initial (default) parameters.
- */
- infiles = mknewa(char *, argc);
- outfile = NULL;
- nfiles = 0;
- nogo = errs = FALSE;
- reportcols = 0;
- debug = 0;
-
- if (argc == 1)
- {
- usage();
- exit(EXIT_SUCCESS);
- }
-
- /*
- * Parse command line arguments.
- */
- while (--argc)
- {
- char *p = *++argv;
- if (*p == '-')
- {
- /*
- * An option.
- */
- while (p && *++p)
- {
- char c = *p;
- switch (c)
- {
- case '-':
- /*
- * Long option.
- */
- {
- char *opt, *val;
- opt = p++; /* opt will have _one_ leading - */
- while (*p && *p != '=')
- p++; /* find end of option */
- if (*p == '=')
- {
- *p++ = '\0';
- val = p;
- } else
- val = NULL;
- if (!strcmp(opt, "-version"))
- {
- showversion();
- nogo = TRUE;
- } else if (!strcmp(opt, "-licence") ||
- !strcmp(opt, "-license"))
- {
- licence();
- nogo = TRUE;
- } else if (!strcmp(opt, "-output"))
- {
- if (!val)
- errs = TRUE, error(err_optnoarg, opt);
- else
- outfile = val;
- } else if (!strcmp(opt, "-precise"))
- {
- reportcols = 1;
- } else
- {
- errs = TRUE, error(err_nosuchopt, opt);
- }
- }
- p = NULL;
- break;
- case 'V':
- case 'L':
- case 'P':
- case 'd':
- /*
- * Option requiring no parameter.
- */
- switch (c)
- {
- case 'V':
- showversion();
- nogo = TRUE;
- break;
- case 'L':
- licence();
- nogo = TRUE;
- break;
- case 'P':
- reportcols = 1;
- break;
- case 'd':
- debug = TRUE;
- break;
- }
- break;
- case 'o':
- /*
- * Option requiring parameter.
- */
- p++;
- if (!*p && argc > 1)
- --argc, p = *++argv;
- else if (!*p)
- {
- char opt[2];
- opt[0] = c;
- opt[1] = '\0';
- errs = TRUE, error(err_optnoarg, opt);
- }
- /*
- * Now c is the option and p is the parameter.
- */
- switch (c)
- {
- case 'o':
- outfile = p;
- break;
- }
- p = NULL; /* prevent continued processing */
- break;
- default:
- /*
- * Unrecognised option.
- */
- {
- char opt[2];
- opt[0] = c;
- opt[1] = '\0';
- errs = TRUE, error(err_nosuchopt, opt);
- }
- }
- }
- } else
- {
- /*
- * A non-option argument.
- */
- infiles[nfiles++] = p;
- }
- }
-
- if (errs)
- exit(EXIT_FAILURE);
- if (nogo)
- exit(EXIT_SUCCESS);
-
- /*
- * Do the work.
- */
- if (nfiles == 0)
- {
- error(err_noinput);
- usage();
- exit(EXIT_FAILURE);
- }
-
- {
- input in;
- paragraph *sourceform, *p;
- indexdata *idx;
- keywordlist *keywords;
-
- in.filenames = infiles;
- in.nfiles = nfiles;
- in.currfp = NULL;
- in.currindex = 0;
- in.npushback = in.pushbacksize = 0;
- in.pushback = NULL;
- in.reportcols = reportcols;
- in.stack = NULL;
-
- idx = make_index();
-
- sourceform = read_input(&in, idx);
- if (!sourceform)
- exit(EXIT_FAILURE);
-
- sfree(in.pushback);
-
- mark_attr_ends(sourceform);
-
- sfree(infiles);
-
- keywords = get_keywords(sourceform);
- if (!keywords)
- exit(EXIT_FAILURE);
- gen_citations(sourceform, keywords);
- subst_keywords(sourceform, keywords);
-
- for (p = sourceform; p; p = p->next)
- if (p->type == para_IM)
- index_merge(idx, TRUE, p->keyword, p->words);
-
- build_index(idx);
-
-
- if (debug)
- {
- index_debug(idx);
- dbg_prtkws(keywords);
- dbg_prtsource(sourceform);
- }
-
- xhtml_backend(sourceform, keywords, idx);
-
- free_para_list(sourceform);
- free_keywords(keywords);
- cleanup_index(idx);
- }
-
- return 0;
-}
-
-static void dbg_prtsource(paragraph * sourceform)
-{
- /*
- * Output source form in debugging format.
- */
-
- paragraph *p;
- for (p = sourceform; p; p = p->next)
- {
- wchar_t *wp;
- printf("para %d ", p->type);
- if (p->keyword)
- {
- wp = p->keyword;
- while (*wp)
- {
- putchar('\"');
- for (; *wp; wp++)
- putchar(*wp);
- putchar('\"');
- if (*++wp)
- printf(", ");
- }
- } else
- printf("(no keyword)");
- printf(" {\n");
- dbg_prtwordlist(1, p->words);
- printf("}\n");
- }
-}
-
-static void dbg_prtkws(keywordlist * kws)
-{
- /*
- * Output keywords in debugging format.
- */
-
- int i;
- keyword *kw;
-
- for (i = 0; (kw = index234(kws->keys, i)) != NULL; i++)
- {
- wchar_t *wp;
- printf("keyword ");
- wp = kw->key;
- while (*wp)
- {
- putchar('\"');
- for (; *wp; wp++)
- putchar(*wp);
- putchar('\"');
- if (*++wp)
- printf(", ");
- }
- printf(" {\n");
- dbg_prtwordlist(1, kw->text);
- printf("}\n");
- }
-}
-
-static void dbg_prtwordlist(int level, word * w)
-{
- for (; w; w = w->next)
- {
- wchar_t *wp;
- printf("%*sword %d ", level * 4, "", w->type);
- if (w->text)
- {
- printf("\"");
- for (wp = w->text; *wp; wp++)
- putchar(*wp);
- printf("\"");
- } else
- printf("(no text)");
- if (w->alt)
- {
- printf(" alt = {\n");
- dbg_prtwordlist(level + 1, w->alt);
- printf("%*s}", level * 4, "");
- }
- printf("\n");
- }
-}
+/*
+ * main.c: command line parsing and top level
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "halibut.h"
+
+static void dbg_prtsource(paragraph * sourceform);
+static void dbg_prtwordlist(int level, word * w);
+static void dbg_prtkws(keywordlist * kws);
+
+int main(int argc, char **argv)
+{
+ char **infiles;
+ char *outfile;
+ int nfiles;
+ int nogo;
+ int errs;
+ int reportcols;
+ int debug;
+
+ /*
+ * Set up initial (default) parameters.
+ */
+ infiles = mknewa(char *, argc);
+ outfile = NULL;
+ nfiles = 0;
+ nogo = errs = FALSE;
+ reportcols = 0;
+ debug = 0;
+
+ if (argc == 1)
+ {
+ usage();
+ exit(EXIT_SUCCESS);
+ }
+
+ /*
+ * Parse command line arguments.
+ */
+ while (--argc)
+ {
+ char *p = *++argv;
+ if (*p == '-')
+ {
+ /*
+ * An option.
+ */
+ while (p && *++p)
+ {
+ char c = *p;
+ switch (c)
+ {
+ case '-':
+ /*
+ * Long option.
+ */
+ {
+ char *opt, *val;
+ opt = p++; /* opt will have _one_ leading - */
+ while (*p && *p != '=')
+ p++; /* find end of option */
+ if (*p == '=')
+ {
+ *p++ = '\0';
+ val = p;
+ } else
+ val = NULL;
+ if (!strcmp(opt, "-version"))
+ {
+ showversion();
+ nogo = TRUE;
+ } else if (!strcmp(opt, "-licence") ||
+ !strcmp(opt, "-license"))
+ {
+ licence();
+ nogo = TRUE;
+ } else if (!strcmp(opt, "-output"))
+ {
+ if (!val)
+ errs = TRUE, error(err_optnoarg, opt);
+ else
+ outfile = val;
+ } else if (!strcmp(opt, "-precise"))
+ {
+ reportcols = 1;
+ } else
+ {
+ errs = TRUE, error(err_nosuchopt, opt);
+ }
+ }
+ p = NULL;
+ break;
+ case 'V':
+ case 'L':
+ case 'P':
+ case 'd':
+ /*
+ * Option requiring no parameter.
+ */
+ switch (c)
+ {
+ case 'V':
+ showversion();
+ nogo = TRUE;
+ break;
+ case 'L':
+ licence();
+ nogo = TRUE;
+ break;
+ case 'P':
+ reportcols = 1;
+ break;
+ case 'd':
+ debug = TRUE;
+ break;
+ }
+ break;
+ case 'o':
+ /*
+ * Option requiring parameter.
+ */
+ p++;
+ if (!*p && argc > 1)
+ --argc, p = *++argv;
+ else if (!*p)
+ {
+ char opt[2];
+ opt[0] = c;
+ opt[1] = '\0';
+ errs = TRUE, error(err_optnoarg, opt);
+ }
+ /*
+ * Now c is the option and p is the parameter.
+ */
+ switch (c)
+ {
+ case 'o':
+ outfile = p;
+ break;
+ }
+ p = NULL; /* prevent continued processing */
+ break;
+ default:
+ /*
+ * Unrecognised option.
+ */
+ {
+ char opt[2];
+ opt[0] = c;
+ opt[1] = '\0';
+ errs = TRUE, error(err_nosuchopt, opt);
+ }
+ }
+ }
+ } else
+ {
+ /*
+ * A non-option argument.
+ */
+ infiles[nfiles++] = p;
+ }
+ }
+
+ if (errs)
+ exit(EXIT_FAILURE);
+ if (nogo)
+ exit(EXIT_SUCCESS);
+
+ /*
+ * Do the work.
+ */
+ if (nfiles == 0)
+ {
+ error(err_noinput);
+ usage();
+ exit(EXIT_FAILURE);
+ }
+
+ {
+ input in;
+ paragraph *sourceform, *p;
+ indexdata *idx;
+ keywordlist *keywords;
+
+ in.filenames = infiles;
+ in.nfiles = nfiles;
+ in.currfp = NULL;
+ in.currindex = 0;
+ in.npushback = in.pushbacksize = 0;
+ in.pushback = NULL;
+ in.reportcols = reportcols;
+ in.stack = NULL;
+
+ idx = make_index();
+
+ sourceform = read_input(&in, idx);
+ if (!sourceform)
+ exit(EXIT_FAILURE);
+
+ sfree(in.pushback);
+
+ mark_attr_ends(sourceform);
+
+ sfree(infiles);
+
+ keywords = get_keywords(sourceform);
+ if (!keywords)
+ exit(EXIT_FAILURE);
+ gen_citations(sourceform, keywords);
+ subst_keywords(sourceform, keywords);
+
+ for (p = sourceform; p; p = p->next)
+ if (p->type == para_IM)
+ index_merge(idx, TRUE, p->keyword, p->words);
+
+ build_index(idx);
+
+
+ if (debug)
+ {
+ index_debug(idx);
+ dbg_prtkws(keywords);
+ dbg_prtsource(sourceform);
+ }
+
+ xhtml_backend(sourceform, keywords, idx);
+
+ free_para_list(sourceform);
+ free_keywords(keywords);
+ cleanup_index(idx);
+ }
+
+ return 0;
+}
+
+static void dbg_prtsource(paragraph * sourceform)
+{
+ /*
+ * Output source form in debugging format.
+ */
+
+ paragraph *p;
+ for (p = sourceform; p; p = p->next)
+ {
+ wchar_t *wp;
+ printf("para %d ", p->type);
+ if (p->keyword)
+ {
+ wp = p->keyword;
+ while (*wp)
+ {
+ putchar('\"');
+ for (; *wp; wp++)
+ putchar(*wp);
+ putchar('\"');
+ if (*++wp)
+ printf(", ");
+ }
+ } else
+ printf("(no keyword)");
+ printf(" {\n");
+ dbg_prtwordlist(1, p->words);
+ printf("}\n");
+ }
+}
+
+static void dbg_prtkws(keywordlist * kws)
+{
+ /*
+ * Output keywords in debugging format.
+ */
+
+ int i;
+ keyword *kw;
+
+ for (i = 0; (kw = index234(kws->keys, i)) != NULL; i++)
+ {
+ wchar_t *wp;
+ printf("keyword ");
+ wp = kw->key;
+ while (*wp)
+ {
+ putchar('\"');
+ for (; *wp; wp++)
+ putchar(*wp);
+ putchar('\"');
+ if (*++wp)
+ printf(", ");
+ }
+ printf(" {\n");
+ dbg_prtwordlist(1, kw->text);
+ printf("}\n");
+ }
+}
+
+static void dbg_prtwordlist(int level, word * w)
+{
+ for (; w; w = w->next)
+ {
+ wchar_t *wp;
+ printf("%*sword %d ", level * 4, "", w->type);
+ if (w->text)
+ {
+ printf("\"");
+ for (wp = w->text; *wp; wp++)
+ putchar(*wp);
+ printf("\"");
+ } else
+ printf("(no text)");
+ if (w->alt)
+ {
+ printf(" alt = {\n");
+ dbg_prtwordlist(level + 1, w->alt);
+ printf("%*s}", level * 4, "");
+ }
+ printf("\n");
+ }
+}
diff --git a/Docs/src/bin/halibut/malloc.c b/Docs/src/bin/halibut/malloc.c
index 07c8519..24cb676 100755
--- a/Docs/src/bin/halibut/malloc.c
+++ b/Docs/src/bin/halibut/malloc.c
@@ -1,163 +1,163 @@
-/*
- * malloc.c: safe wrappers around malloc, realloc, free, strdup
- */
-
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include "halibut.h"
-
-#ifdef LOGALLOC
-#define LOGPARAMS char *file, int line,
-static FILE *logallocfp = NULL;
-static int logline = 2; /* off by 1: `null pointer is' */
-static void loginc(void)
-{
-}
-static void logallocinit(void)
-{
- if (!logallocfp)
- {
- logallocfp = fopen("malloc.log", "w");
- if (!logallocfp)
- {
- fprintf(stderr, "panic: unable to open malloc.log\n");
- exit(10);
- }
- setvbuf(logallocfp, NULL, _IOLBF, BUFSIZ);
- fprintf(logallocfp, "null pointer is %p\n", NULL);
- }
-}
-static void logprintf(char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- vfprintf(logallocfp, fmt, ap);
- va_end(ap);
-}
-
-#define LOGPRINT(x) ( logallocinit(), logprintf x )
-#define LOGINC do { loginc(); logline++; } while (0)
-#else
-#define LOGPARAMS
-#define LOGPRINT(x)
-#define LOGINC ((void)0)
-#endif
-
-/*
- * smalloc should guarantee to return a useful pointer - Halibut
- * can do nothing except die when it's out of memory anyway.
- */
-void *(smalloc) (LOGPARAMS int size) {
- void *p;
- LOGINC;
- LOGPRINT(("%s %d malloc(%ld)", file, line, (long) size));
- p = malloc(size);
- if (!p)
- fatal(err_nomemory);
- LOGPRINT((" returns %p\n", p));
- return p;
-}
-
-/*
- * sfree should guaranteeably deal gracefully with freeing NULL
- */
-void (sfree) (LOGPARAMS void *p) {
- if (p)
- {
- LOGINC;
- LOGPRINT(("%s %d free(%p)\n", file, line, p));
- free(p);
- }
-}
-
-/*
- * srealloc should guaranteeably be able to realloc NULL
- */
-void *(srealloc) (LOGPARAMS void *p, int size) {
- void *q;
- if (p)
- {
- LOGINC;
- LOGPRINT(("%s %d realloc(%p,%ld)", file, line, p, (long) size));
- q = realloc(p, size);
- LOGPRINT((" returns %p\n", q));
- } else
- {
- LOGINC;
- LOGPRINT(("%s %d malloc(%ld)", file, line, (long) size));
- q = malloc(size);
- LOGPRINT((" returns %p\n", q));
- }
- if (!q)
- fatal(err_nomemory);
- return q;
-}
-
-/*
- * dupstr is like strdup, but with the never-return-NULL property
- * of smalloc (and also reliably defined in all environments :-)
- */
-char *dupstr(char *s)
-{
- char *r = smalloc(1 + strlen(s));
- strcpy(r, s);
- return r;
-}
-
-/*
- * Duplicate a linked list of words
- */
-word *dup_word_list(word * w)
-{
- word *head, **eptr = &head;
-
- while (w)
- {
- word *newwd = mknew(word);
- *newwd = *w; /* structure copy */
- newwd->text = ustrdup(w->text);
- if (w->alt)
- newwd->alt = dup_word_list(w->alt);
- *eptr = newwd;
- newwd->next = NULL;
- eptr = &newwd->next;
-
- w = w->next;
- }
-
- return head;
-}
-
-/*
- * Free a linked list of words
- */
-void free_word_list(word * w)
-{
- word *t;
- while (w)
- {
- t = w;
- w = w->next;
- sfree(t->text);
- if (t->alt)
- free_word_list(t->alt);
- sfree(t);
- }
-}
-
-/*
- * Free a linked list of paragraphs
- */
-void free_para_list(paragraph * p)
-{
- paragraph *t;
- while (p)
- {
- t = p;
- p = p->next;
- sfree(t->keyword);
- free_word_list(t->words);
- sfree(t);
- }
-}
+/*
+ * malloc.c: safe wrappers around malloc, realloc, free, strdup
+ */
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include "halibut.h"
+
+#ifdef LOGALLOC
+#define LOGPARAMS char *file, int line,
+static FILE *logallocfp = NULL;
+static int logline = 2; /* off by 1: `null pointer is' */
+static void loginc(void)
+{
+}
+static void logallocinit(void)
+{
+ if (!logallocfp)
+ {
+ logallocfp = fopen("malloc.log", "w");
+ if (!logallocfp)
+ {
+ fprintf(stderr, "panic: unable to open malloc.log\n");
+ exit(10);
+ }
+ setvbuf(logallocfp, NULL, _IOLBF, BUFSIZ);
+ fprintf(logallocfp, "null pointer is %p\n", NULL);
+ }
+}
+static void logprintf(char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(logallocfp, fmt, ap);
+ va_end(ap);
+}
+
+#define LOGPRINT(x) ( logallocinit(), logprintf x )
+#define LOGINC do { loginc(); logline++; } while (0)
+#else
+#define LOGPARAMS
+#define LOGPRINT(x)
+#define LOGINC ((void)0)
+#endif
+
+/*
+ * smalloc should guarantee to return a useful pointer - Halibut
+ * can do nothing except die when it's out of memory anyway.
+ */
+void *(smalloc) (LOGPARAMS int size) {
+ void *p;
+ LOGINC;
+ LOGPRINT(("%s %d malloc(%ld)", file, line, (long) size));
+ p = malloc(size);
+ if (!p)
+ fatal(err_nomemory);
+ LOGPRINT((" returns %p\n", p));
+ return p;
+}
+
+/*
+ * sfree should guaranteeably deal gracefully with freeing NULL
+ */
+void (sfree) (LOGPARAMS void *p) {
+ if (p)
+ {
+ LOGINC;
+ LOGPRINT(("%s %d free(%p)\n", file, line, p));
+ free(p);
+ }
+}
+
+/*
+ * srealloc should guaranteeably be able to realloc NULL
+ */
+void *(srealloc) (LOGPARAMS void *p, int size) {
+ void *q;
+ if (p)
+ {
+ LOGINC;
+ LOGPRINT(("%s %d realloc(%p,%ld)", file, line, p, (long) size));
+ q = realloc(p, size);
+ LOGPRINT((" returns %p\n", q));
+ } else
+ {
+ LOGINC;
+ LOGPRINT(("%s %d malloc(%ld)", file, line, (long) size));
+ q = malloc(size);
+ LOGPRINT((" returns %p\n", q));
+ }
+ if (!q)
+ fatal(err_nomemory);
+ return q;
+}
+
+/*
+ * dupstr is like strdup, but with the never-return-NULL property
+ * of smalloc (and also reliably defined in all environments :-)
+ */
+char *dupstr(char *s)
+{
+ char *r = smalloc(1 + strlen(s));
+ strcpy(r, s);
+ return r;
+}
+
+/*
+ * Duplicate a linked list of words
+ */
+word *dup_word_list(word * w)
+{
+ word *head, **eptr = &head;
+
+ while (w)
+ {
+ word *newwd = mknew(word);
+ *newwd = *w; /* structure copy */
+ newwd->text = ustrdup(w->text);
+ if (w->alt)
+ newwd->alt = dup_word_list(w->alt);
+ *eptr = newwd;
+ newwd->next = NULL;
+ eptr = &newwd->next;
+
+ w = w->next;
+ }
+
+ return head;
+}
+
+/*
+ * Free a linked list of words
+ */
+void free_word_list(word * w)
+{
+ word *t;
+ while (w)
+ {
+ t = w;
+ w = w->next;
+ sfree(t->text);
+ if (t->alt)
+ free_word_list(t->alt);
+ sfree(t);
+ }
+}
+
+/*
+ * Free a linked list of paragraphs
+ */
+void free_para_list(paragraph * p)
+{
+ paragraph *t;
+ while (p)
+ {
+ t = p;
+ p = p->next;
+ sfree(t->keyword);
+ free_word_list(t->words);
+ sfree(t);
+ }
+}
diff --git a/Docs/src/bin/halibut/misc.c b/Docs/src/bin/halibut/misc.c
index e1818ad..5fad528 100755
--- a/Docs/src/bin/halibut/misc.c
+++ b/Docs/src/bin/halibut/misc.c
@@ -1,357 +1,357 @@
-/*
- * misc.c: miscellaneous useful items
- */
-#include <string.h>
-#include "halibut.h"
-
-struct stackTag {
- void **data;
- int sp;
- int size;
-};
-
-stack stk_new(void)
-{
- stack s;
-
- s = mknew(struct stackTag);
- s->sp = 0;
- s->size = 0;
- s->data = NULL;
-
- return s;
-}
-
-void stk_free(stack s)
-{
- sfree(s->data);
- sfree(s);
-}
-
-void stk_push(stack s, void *item)
-{
- if (s->size <= s->sp)
- {
- s->size = s->sp + 32;
- s->data = resize(s->data, s->size);
- }
- s->data[s->sp++] = item;
-}
-
-void *stk_pop(stack s)
-{
- if (s->sp > 0)
- return s->data[--s->sp];
- else
- return NULL;
-}
-
-/*
- * Small routines to amalgamate a string from an input source.
- */
-const rdstring empty_rdstring = { 0, 0, NULL };
-const rdstringc empty_rdstringc = { 0, 0, NULL };
-
-void rdadd(rdstring * rs, wchar_t c)
-{
- if (rs->pos >= rs->size - 1)
- {
- rs->size = rs->pos + 128;
- rs->text = resize(rs->text, rs->size);
- }
- rs->text[rs->pos++] = c;
- rs->text[rs->pos] = 0;
-}
-
-void rdadds(rdstring * rs, wchar_t * p)
-{
- int len = ustrlen(p);
- if (rs->pos >= rs->size - len)
- {
- rs->size = rs->pos + len + 128;
- rs->text = resize(rs->text, rs->size);
- }
- ustrcpy(rs->text + rs->pos, p);
- rs->pos += len;
-}
-
-wchar_t *rdtrim(rdstring * rs)
-{
- rs->text = resize(rs->text, rs->pos + 1);
- return rs->text;
-}
-
-void rdaddc(rdstringc * rs, char c)
-{
- if (rs->pos >= rs->size - 1)
- {
- rs->size = rs->pos + 128;
- rs->text = resize(rs->text, rs->size);
- }
- rs->text[rs->pos++] = c;
- rs->text[rs->pos] = 0;
-}
-
-void rdaddsc(rdstringc * rs, char *p)
-{
- int len = strlen(p);
- if (rs->pos >= rs->size - len)
- {
- rs->size = rs->pos + len + 128;
- rs->text = resize(rs->text, rs->size);
- }
- strcpy(rs->text + rs->pos, p);
- rs->pos += len;
-}
-
-char *rdtrimc(rdstringc * rs)
-{
- rs->text = resize(rs->text, rs->pos + 1);
- return rs->text;
-}
-
-int compare_wordlists(word * a, word * b)
-{
- int t;
- while (a && b)
- {
- if (a->type != b->type)
- return (a->type < b->type ? -1 : +1); /* FIXME? */
- t = a->type;
- if ((t != word_Normal && t != word_Code &&
- t != word_WeakCode && t != word_Emph) || a->alt || b->alt)
- {
- int c;
- if (a->text && b->text)
- {
- c = ustricmp(a->text, b->text);
- if (c)
- return c;
- }
- c = compare_wordlists(a->alt, b->alt);
- if (c)
- return c;
- a = a->next;
- b = b->next;
- } else
- {
- wchar_t *ap = a->text, *bp = b->text;
- while (*ap && *bp)
- {
- wchar_t ac = utolower(*ap), bc = utolower(*bp);
- if (ac != bc)
- return (ac < bc ? -1 : +1);
- if (!*++ap && a->next && a->next->type == t && !a->next->alt)
- a = a->next, ap = a->text;
- if (!*++bp && b->next && b->next->type == t && !b->next->alt)
- b = b->next, bp = b->text;
- }
- if (*ap || *bp)
- return (*ap ? +1 : -1);
- a = a->next;
- b = b->next;
- }
- }
-
- if (a || b)
- return (a ? +1 : -1);
- else
- return 0;
-}
-
-void mark_attr_ends(paragraph * sourceform)
-{
- paragraph *p;
- word *w, *wp;
- for (p = sourceform; p; p = p->next)
- {
- wp = NULL;
- for (w = p->words; w; w = w->next)
- {
- if (isattr(w->type))
- {
- int before = (wp && isattr(wp->type) &&
- sameattr(wp->type, w->type));
- int after = (w->next && isattr(w->next->type) &&
- sameattr(w->next->type, w->type));
- w->aux |= (before ?
- (after ? attr_Always : attr_Last) :
- (after ? attr_First : attr_Only));
- }
- wp = w;
- }
- }
-}
-
-wrappedline *wrap_para(word * text, int width, int subsequentwidth,
- int (*widthfn) (word *))
-{
- wrappedline *head = NULL, **ptr = &head;
- int nwords, wordsize;
- struct wrapword {
- word *begin, *end;
- int width;
- int spacewidth;
- int cost;
- int nwords;
- } *wrapwords;
- int i, j, n;
-
- /*
- * Break the line up into wrappable components.
- */
- nwords = wordsize = 0;
- wrapwords = NULL;
- while (text)
- {
- if (nwords >= wordsize)
- {
- wordsize = nwords + 64;
- wrapwords = srealloc(wrapwords, wordsize * sizeof(*wrapwords));
- }
- wrapwords[nwords].width = 0;
- wrapwords[nwords].begin = text;
- while (text)
- {
- wrapwords[nwords].width += widthfn(text);
- wrapwords[nwords].end = text->next;
- if (text->next && (text->next->type == word_WhiteSpace ||
- text->next->type == word_EmphSpace ||
- text->breaks))
- break;
- text = text->next;
- }
- if (text && text->next && (text->next->type == word_WhiteSpace ||
- text->next->type == word_EmphSpace))
- {
- wrapwords[nwords].spacewidth = widthfn(text->next);
- text = text->next;
- } else
- {
- wrapwords[nwords].spacewidth = 0;
- }
- nwords++;
- if (text)
- text = text->next;
- }
-
- /*
- * Perform the dynamic wrapping algorithm: work backwards from
- * nwords-1, determining the optimal wrapping for each terminal
- * subsequence of the paragraph.
- */
- for (i = nwords; i--;)
- {
- int best = -1;
- int bestcost = 0;
- int cost;
- int linelen = 0, spacewidth = 0;
- int seenspace;
- int thiswidth = (i == 0 ? width : subsequentwidth);
-
- j = 0;
- seenspace = 0;
- while (i + j < nwords)
- {
- /*
- * See what happens if we put j+1 words on this line.
- */
- if (spacewidth)
- seenspace = 1;
- linelen += spacewidth + wrapwords[i + j].width;
- spacewidth = wrapwords[i + j].spacewidth;
- j++;
- if (linelen > thiswidth)
- {
- /*
- * If we're over the width limit, abandon ship,
- * _unless_ there is no best-effort yet (which will
- * only happen if the first word is too long all by
- * itself).
- */
- if (best > 0)
- break;
- }
- if (i + j == nwords)
- {
- /*
- * Special case: if we're at the very end of the
- * paragraph, we don't score penalty points for the
- * white space left on the line.
- */
- cost = 0;
- } else
- {
- cost = (thiswidth - linelen) * (thiswidth - linelen);
- cost += wrapwords[i + j].cost;
- }
- /*
- * We compare bestcost >= cost, not bestcost > cost,
- * because in cases where the costs are identical we
- * want to try to look like the greedy algorithm,
- * because readers are likely to have spent a lot of
- * time looking at greedy-wrapped paragraphs and
- * there's no point violating the Principle of Least
- * Surprise if it doesn't actually gain anything.
- */
- if (best < 0 || bestcost >= cost)
- {
- bestcost = cost;
- best = j;
- }
- }
- /*
- * Now we know the optimal answer for this terminal
- * subsequence, so put it in wrapwords.
- */
- wrapwords[i].cost = bestcost;
- wrapwords[i].nwords = best;
- }
-
- /*
- * We've wrapped the paragraph. Now build the output
- * `wrappedline' list.
- */
- i = 0;
- while (i < nwords)
- {
- wrappedline *w = mknew(wrappedline);
- *ptr = w;
- ptr = &w->next;
- w->next = NULL;
-
- n = wrapwords[i].nwords;
- w->begin = wrapwords[i].begin;
- w->end = wrapwords[i + n - 1].end;
-
- /*
- * Count along the words to find nspaces and shortfall.
- */
- w->nspaces = 0;
- w->shortfall = width;
- for (j = 0; j < n; j++)
- {
- w->shortfall -= wrapwords[i + j].width;
- if (j < n - 1 && wrapwords[i + j].spacewidth)
- {
- w->nspaces++;
- w->shortfall -= wrapwords[i + j].spacewidth;
- }
- }
- i += n;
- }
-
- sfree(wrapwords);
-
- return head;
-}
-
-void wrap_free(wrappedline * w)
-{
- while (w)
- {
- wrappedline *t = w->next;
- sfree(w);
- w = t;
- }
-}
+/*
+ * misc.c: miscellaneous useful items
+ */
+#include <string.h>
+#include "halibut.h"
+
+struct stackTag {
+ void **data;
+ int sp;
+ int size;
+};
+
+stack stk_new(void)
+{
+ stack s;
+
+ s = mknew(struct stackTag);
+ s->sp = 0;
+ s->size = 0;
+ s->data = NULL;
+
+ return s;
+}
+
+void stk_free(stack s)
+{
+ sfree(s->data);
+ sfree(s);
+}
+
+void stk_push(stack s, void *item)
+{
+ if (s->size <= s->sp)
+ {
+ s->size = s->sp + 32;
+ s->data = resize(s->data, s->size);
+ }
+ s->data[s->sp++] = item;
+}
+
+void *stk_pop(stack s)
+{
+ if (s->sp > 0)
+ return s->data[--s->sp];
+ else
+ return NULL;
+}
+
+/*
+ * Small routines to amalgamate a string from an input source.
+ */
+const rdstring empty_rdstring = { 0, 0, NULL };
+const rdstringc empty_rdstringc = { 0, 0, NULL };
+
+void rdadd(rdstring * rs, wchar_t c)
+{
+ if (rs->pos >= rs->size - 1)
+ {
+ rs->size = rs->pos + 128;
+ rs->text = resize(rs->text, rs->size);
+ }
+ rs->text[rs->pos++] = c;
+ rs->text[rs->pos] = 0;
+}
+
+void rdadds(rdstring * rs, wchar_t * p)
+{
+ int len = ustrlen(p);
+ if (rs->pos >= rs->size - len)
+ {
+ rs->size = rs->pos + len + 128;
+ rs->text = resize(rs->text, rs->size);
+ }
+ ustrcpy(rs->text + rs->pos, p);
+ rs->pos += len;
+}
+
+wchar_t *rdtrim(rdstring * rs)
+{
+ rs->text = resize(rs->text, rs->pos + 1);
+ return rs->text;
+}
+
+void rdaddc(rdstringc * rs, char c)
+{
+ if (rs->pos >= rs->size - 1)
+ {
+ rs->size = rs->pos + 128;
+ rs->text = resize(rs->text, rs->size);
+ }
+ rs->text[rs->pos++] = c;
+ rs->text[rs->pos] = 0;
+}
+
+void rdaddsc(rdstringc * rs, char *p)
+{
+ int len = strlen(p);
+ if (rs->pos >= rs->size - len)
+ {
+ rs->size = rs->pos + len + 128;
+ rs->text = resize(rs->text, rs->size);
+ }
+ strcpy(rs->text + rs->pos, p);
+ rs->pos += len;
+}
+
+char *rdtrimc(rdstringc * rs)
+{
+ rs->text = resize(rs->text, rs->pos + 1);
+ return rs->text;
+}
+
+int compare_wordlists(word * a, word * b)
+{
+ int t;
+ while (a && b)
+ {
+ if (a->type != b->type)
+ return (a->type < b->type ? -1 : +1); /* FIXME? */
+ t = a->type;
+ if ((t != word_Normal && t != word_Code &&
+ t != word_WeakCode && t != word_Emph) || a->alt || b->alt)
+ {
+ int c;
+ if (a->text && b->text)
+ {
+ c = ustricmp(a->text, b->text);
+ if (c)
+ return c;
+ }
+ c = compare_wordlists(a->alt, b->alt);
+ if (c)
+ return c;
+ a = a->next;
+ b = b->next;
+ } else
+ {
+ wchar_t *ap = a->text, *bp = b->text;
+ while (*ap && *bp)
+ {
+ wchar_t ac = utolower(*ap), bc = utolower(*bp);
+ if (ac != bc)
+ return (ac < bc ? -1 : +1);
+ if (!*++ap && a->next && a->next->type == t && !a->next->alt)
+ a = a->next, ap = a->text;
+ if (!*++bp && b->next && b->next->type == t && !b->next->alt)
+ b = b->next, bp = b->text;
+ }
+ if (*ap || *bp)
+ return (*ap ? +1 : -1);
+ a = a->next;
+ b = b->next;
+ }
+ }
+
+ if (a || b)
+ return (a ? +1 : -1);
+ else
+ return 0;
+}
+
+void mark_attr_ends(paragraph * sourceform)
+{
+ paragraph *p;
+ word *w, *wp;
+ for (p = sourceform; p; p = p->next)
+ {
+ wp = NULL;
+ for (w = p->words; w; w = w->next)
+ {
+ if (isattr(w->type))
+ {
+ int before = (wp && isattr(wp->type) &&
+ sameattr(wp->type, w->type));
+ int after = (w->next && isattr(w->next->type) &&
+ sameattr(w->next->type, w->type));
+ w->aux |= (before ?
+ (after ? attr_Always : attr_Last) :
+ (after ? attr_First : attr_Only));
+ }
+ wp = w;
+ }
+ }
+}
+
+wrappedline *wrap_para(word * text, int width, int subsequentwidth,
+ int (*widthfn) (word *))
+{
+ wrappedline *head = NULL, **ptr = &head;
+ int nwords, wordsize;
+ struct wrapword {
+ word *begin, *end;
+ int width;
+ int spacewidth;
+ int cost;
+ int nwords;
+ } *wrapwords;
+ int i, j, n;
+
+ /*
+ * Break the line up into wrappable components.
+ */
+ nwords = wordsize = 0;
+ wrapwords = NULL;
+ while (text)
+ {
+ if (nwords >= wordsize)
+ {
+ wordsize = nwords + 64;
+ wrapwords = srealloc(wrapwords, wordsize * sizeof(*wrapwords));
+ }
+ wrapwords[nwords].width = 0;
+ wrapwords[nwords].begin = text;
+ while (text)
+ {
+ wrapwords[nwords].width += widthfn(text);
+ wrapwords[nwords].end = text->next;
+ if (text->next && (text->next->type == word_WhiteSpace ||
+ text->next->type == word_EmphSpace ||
+ text->breaks))
+ break;
+ text = text->next;
+ }
+ if (text && text->next && (text->next->type == word_WhiteSpace ||
+ text->next->type == word_EmphSpace))
+ {
+ wrapwords[nwords].spacewidth = widthfn(text->next);
+ text = text->next;
+ } else
+ {
+ wrapwords[nwords].spacewidth = 0;
+ }
+ nwords++;
+ if (text)
+ text = text->next;
+ }
+
+ /*
+ * Perform the dynamic wrapping algorithm: work backwards from
+ * nwords-1, determining the optimal wrapping for each terminal
+ * subsequence of the paragraph.
+ */
+ for (i = nwords; i--;)
+ {
+ int best = -1;
+ int bestcost = 0;
+ int cost;
+ int linelen = 0, spacewidth = 0;
+ int seenspace;
+ int thiswidth = (i == 0 ? width : subsequentwidth);
+
+ j = 0;
+ seenspace = 0;
+ while (i + j < nwords)
+ {
+ /*
+ * See what happens if we put j+1 words on this line.
+ */
+ if (spacewidth)
+ seenspace = 1;
+ linelen += spacewidth + wrapwords[i + j].width;
+ spacewidth = wrapwords[i + j].spacewidth;
+ j++;
+ if (linelen > thiswidth)
+ {
+ /*
+ * If we're over the width limit, abandon ship,
+ * _unless_ there is no best-effort yet (which will
+ * only happen if the first word is too long all by
+ * itself).
+ */
+ if (best > 0)
+ break;
+ }
+ if (i + j == nwords)
+ {
+ /*
+ * Special case: if we're at the very end of the
+ * paragraph, we don't score penalty points for the
+ * white space left on the line.
+ */
+ cost = 0;
+ } else
+ {
+ cost = (thiswidth - linelen) * (thiswidth - linelen);
+ cost += wrapwords[i + j].cost;
+ }
+ /*
+ * We compare bestcost >= cost, not bestcost > cost,
+ * because in cases where the costs are identical we
+ * want to try to look like the greedy algorithm,
+ * because readers are likely to have spent a lot of
+ * time looking at greedy-wrapped paragraphs and
+ * there's no point violating the Principle of Least
+ * Surprise if it doesn't actually gain anything.
+ */
+ if (best < 0 || bestcost >= cost)
+ {
+ bestcost = cost;
+ best = j;
+ }
+ }
+ /*
+ * Now we know the optimal answer for this terminal
+ * subsequence, so put it in wrapwords.
+ */
+ wrapwords[i].cost = bestcost;
+ wrapwords[i].nwords = best;
+ }
+
+ /*
+ * We've wrapped the paragraph. Now build the output
+ * `wrappedline' list.
+ */
+ i = 0;
+ while (i < nwords)
+ {
+ wrappedline *w = mknew(wrappedline);
+ *ptr = w;
+ ptr = &w->next;
+ w->next = NULL;
+
+ n = wrapwords[i].nwords;
+ w->begin = wrapwords[i].begin;
+ w->end = wrapwords[i + n - 1].end;
+
+ /*
+ * Count along the words to find nspaces and shortfall.
+ */
+ w->nspaces = 0;
+ w->shortfall = width;
+ for (j = 0; j < n; j++)
+ {
+ w->shortfall -= wrapwords[i + j].width;
+ if (j < n - 1 && wrapwords[i + j].spacewidth)
+ {
+ w->nspaces++;
+ w->shortfall -= wrapwords[i + j].spacewidth;
+ }
+ }
+ i += n;
+ }
+
+ sfree(wrapwords);
+
+ return head;
+}
+
+void wrap_free(wrappedline * w)
+{
+ while (w)
+ {
+ wrappedline *t = w->next;
+ sfree(w);
+ w = t;
+ }
+}
diff --git a/Docs/src/bin/halibut/style.c b/Docs/src/bin/halibut/style.c
index 2e92b41..8a3f3e6 100755
--- a/Docs/src/bin/halibut/style.c
+++ b/Docs/src/bin/halibut/style.c
@@ -1,7 +1,7 @@
-/*
- * style.c: load and keep track of user style preferences
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "halibut.h"
+/*
+ * style.c: load and keep track of user style preferences
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "halibut.h"
diff --git a/Docs/src/bin/halibut/tree234.c b/Docs/src/bin/halibut/tree234.c
index 7a72a3f..71ce298 100755
--- a/Docs/src/bin/halibut/tree234.c
+++ b/Docs/src/bin/halibut/tree234.c
@@ -1,2460 +1,2460 @@
-/*
- * tree234.c: reasonably generic counted 2-3-4 tree routines.
- *
- * This file is copyright 1999-2001 Simon Tatham.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "tree234.h"
-
-#define smalloc malloc
-#define sfree free
-
-#define mknew(typ) ( (typ *) smalloc (sizeof (typ)) )
-
-#ifdef TEST
-#define LOG(x) (printf x)
-#else
-#define LOG(x)
-#endif
-
-typedef struct node234_Tag node234;
-
-struct tree234_Tag {
- node234 *root;
- cmpfn234 cmp;
-};
-
-struct node234_Tag {
- node234 *parent;
- node234 *kids[4];
- int counts[4];
- void *elems[3];
-};
-
-/*
- * Create a 2-3-4 tree.
- */
-tree234 *newtree234(cmpfn234 cmp)
-{
- tree234 *ret = mknew(tree234);
- LOG(("created tree %p\n", ret));
- ret->root = NULL;
- ret->cmp = cmp;
- return ret;
-}
-
-/*
- * Free a 2-3-4 tree (not including freeing the elements).
- */
-static void freenode234(node234 * n)
-{
- if (!n)
- return;
- freenode234(n->kids[0]);
- freenode234(n->kids[1]);
- freenode234(n->kids[2]);
- freenode234(n->kids[3]);
- sfree(n);
-}
-
-void freetree234(tree234 * t)
-{
- freenode234(t->root);
- sfree(t);
-}
-
-/*
- * Internal function to count a node.
- */
-static int countnode234(node234 * n)
-{
- int count = 0;
- int i;
- if (!n)
- return 0;
- for (i = 0; i < 4; i++)
- count += n->counts[i];
- for (i = 0; i < 3; i++)
- if (n->elems[i])
- count++;
- return count;
-}
-
-/*
- * Count the elements in a tree.
- */
-int count234(tree234 * t)
-{
- if (t->root)
- return countnode234(t->root);
- else
- return 0;
-}
-
-/*
- * Propagate a node overflow up a tree until it stops. Returns 0 or
- * 1, depending on whether the root had to be split or not.
- */
-static int
-add234_insert(node234 * left, void *e, node234 * right,
- node234 ** root, node234 * n, int ki)
-{
- int lcount, rcount;
- /*
- * We need to insert the new left/element/right set in n at
- * child position ki.
- */
- lcount = countnode234(left);
- rcount = countnode234(right);
- while (n)
- {
- LOG((" at %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" need to insert %p/%d \"%s\" %p/%d at position %d\n", left,
- lcount, e, right, rcount, ki));
- if (n->elems[1] == NULL)
- {
- /*
- * Insert in a 2-node; simple.
- */
- if (ki == 0)
- {
- LOG((" inserting on left of 2-node\n"));
- n->kids[2] = n->kids[1];
- n->counts[2] = n->counts[1];
- n->elems[1] = n->elems[0];
- n->kids[1] = right;
- n->counts[1] = rcount;
- n->elems[0] = e;
- n->kids[0] = left;
- n->counts[0] = lcount;
- } else
- { /* ki == 1 */
- LOG((" inserting on right of 2-node\n"));
- n->kids[2] = right;
- n->counts[2] = rcount;
- n->elems[1] = e;
- n->kids[1] = left;
- n->counts[1] = lcount;
- }
- if (n->kids[0])
- n->kids[0]->parent = n;
- if (n->kids[1])
- n->kids[1]->parent = n;
- if (n->kids[2])
- n->kids[2]->parent = n;
- LOG((" done\n"));
- break;
- } else if (n->elems[2] == NULL)
- {
- /*
- * Insert in a 3-node; simple.
- */
- if (ki == 0)
- {
- LOG((" inserting on left of 3-node\n"));
- n->kids[3] = n->kids[2];
- n->counts[3] = n->counts[2];
- n->elems[2] = n->elems[1];
- n->kids[2] = n->kids[1];
- n->counts[2] = n->counts[1];
- n->elems[1] = n->elems[0];
- n->kids[1] = right;
- n->counts[1] = rcount;
- n->elems[0] = e;
- n->kids[0] = left;
- n->counts[0] = lcount;
- } else if (ki == 1)
- {
- LOG((" inserting in middle of 3-node\n"));
- n->kids[3] = n->kids[2];
- n->counts[3] = n->counts[2];
- n->elems[2] = n->elems[1];
- n->kids[2] = right;
- n->counts[2] = rcount;
- n->elems[1] = e;
- n->kids[1] = left;
- n->counts[1] = lcount;
- } else
- { /* ki == 2 */
- LOG((" inserting on right of 3-node\n"));
- n->kids[3] = right;
- n->counts[3] = rcount;
- n->elems[2] = e;
- n->kids[2] = left;
- n->counts[2] = lcount;
- }
- if (n->kids[0])
- n->kids[0]->parent = n;
- if (n->kids[1])
- n->kids[1]->parent = n;
- if (n->kids[2])
- n->kids[2]->parent = n;
- if (n->kids[3])
- n->kids[3]->parent = n;
- LOG((" done\n"));
- break;
- } else
- {
- node234 *m = mknew(node234);
- m->parent = n->parent;
- LOG((" splitting a 4-node; created new node %p\n", m));
- /*
- * Insert in a 4-node; split into a 2-node and a
- * 3-node, and move focus up a level.
- *
- * I don't think it matters which way round we put the
- * 2 and the 3. For simplicity, we'll put the 3 first
- * always.
- */
- if (ki == 0)
- {
- m->kids[0] = left;
- m->counts[0] = lcount;
- m->elems[0] = e;
- m->kids[1] = right;
- m->counts[1] = rcount;
- m->elems[1] = n->elems[0];
- m->kids[2] = n->kids[1];
- m->counts[2] = n->counts[1];
- e = n->elems[1];
- n->kids[0] = n->kids[2];
- n->counts[0] = n->counts[2];
- n->elems[0] = n->elems[2];
- n->kids[1] = n->kids[3];
- n->counts[1] = n->counts[3];
- } else if (ki == 1)
- {
- m->kids[0] = n->kids[0];
- m->counts[0] = n->counts[0];
- m->elems[0] = n->elems[0];
- m->kids[1] = left;
- m->counts[1] = lcount;
- m->elems[1] = e;
- m->kids[2] = right;
- m->counts[2] = rcount;
- e = n->elems[1];
- n->kids[0] = n->kids[2];
- n->counts[0] = n->counts[2];
- n->elems[0] = n->elems[2];
- n->kids[1] = n->kids[3];
- n->counts[1] = n->counts[3];
- } else if (ki == 2)
- {
- m->kids[0] = n->kids[0];
- m->counts[0] = n->counts[0];
- m->elems[0] = n->elems[0];
- m->kids[1] = n->kids[1];
- m->counts[1] = n->counts[1];
- m->elems[1] = n->elems[1];
- m->kids[2] = left;
- m->counts[2] = lcount;
- /* e = e; */
- n->kids[0] = right;
- n->counts[0] = rcount;
- n->elems[0] = n->elems[2];
- n->kids[1] = n->kids[3];
- n->counts[1] = n->counts[3];
- } else
- { /* ki == 3 */
- m->kids[0] = n->kids[0];
- m->counts[0] = n->counts[0];
- m->elems[0] = n->elems[0];
- m->kids[1] = n->kids[1];
- m->counts[1] = n->counts[1];
- m->elems[1] = n->elems[1];
- m->kids[2] = n->kids[2];
- m->counts[2] = n->counts[2];
- n->kids[0] = left;
- n->counts[0] = lcount;
- n->elems[0] = e;
- n->kids[1] = right;
- n->counts[1] = rcount;
- e = n->elems[2];
- }
- m->kids[3] = n->kids[3] = n->kids[2] = NULL;
- m->counts[3] = n->counts[3] = n->counts[2] = 0;
- m->elems[2] = n->elems[2] = n->elems[1] = NULL;
- if (m->kids[0])
- m->kids[0]->parent = m;
- if (m->kids[1])
- m->kids[1]->parent = m;
- if (m->kids[2])
- m->kids[2]->parent = m;
- if (n->kids[0])
- n->kids[0]->parent = n;
- if (n->kids[1])
- n->kids[1]->parent = n;
- LOG((" left (%p): %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", m,
- m->kids[0], m->counts[0], m->elems[0],
- m->kids[1], m->counts[1], m->elems[1],
- m->kids[2], m->counts[2]));
- LOG((" right (%p): %p/%d \"%s\" %p/%d\n", n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1]));
- left = m;
- lcount = countnode234(left);
- right = n;
- rcount = countnode234(right);
- }
- if (n->parent)
- ki = (n->parent->kids[0] == n ? 0 :
- n->parent->kids[1] == n ? 1 : n->parent->kids[2] == n ? 2 : 3);
- n = n->parent;
- }
-
- /*
- * If we've come out of here by `break', n will still be
- * non-NULL and all we need to do is go back up the tree
- * updating counts. If we've come here because n is NULL, we
- * need to create a new root for the tree because the old one
- * has just split into two. */
- if (n)
- {
- while (n->parent)
- {
- int count = countnode234(n);
- int childnum;
- childnum = (n->parent->kids[0] == n ? 0 :
- n->parent->kids[1] == n ? 1 :
- n->parent->kids[2] == n ? 2 : 3);
- n->parent->counts[childnum] = count;
- n = n->parent;
- }
- return 0; /* root unchanged */
- } else
- {
- LOG((" root is overloaded, split into two\n"));
- (*root) = mknew(node234);
- (*root)->kids[0] = left;
- (*root)->counts[0] = lcount;
- (*root)->elems[0] = e;
- (*root)->kids[1] = right;
- (*root)->counts[1] = rcount;
- (*root)->elems[1] = NULL;
- (*root)->kids[2] = NULL;
- (*root)->counts[2] = 0;
- (*root)->elems[2] = NULL;
- (*root)->kids[3] = NULL;
- (*root)->counts[3] = 0;
- (*root)->parent = NULL;
- if ((*root)->kids[0])
- (*root)->kids[0]->parent = (*root);
- if ((*root)->kids[1])
- (*root)->kids[1]->parent = (*root);
- LOG((" new root is %p/%d \"%s\" %p/%d\n",
- (*root)->kids[0], (*root)->counts[0],
- (*root)->elems[0], (*root)->kids[1], (*root)->counts[1]));
- return 1; /* root moved */
- }
-}
-
-/*
- * Add an element e to a 2-3-4 tree t. Returns e on success, or if
- * an existing element compares equal, returns that.
- */
-static void *add234_internal(tree234 * t, void *e, int index)
-{
- node234 *n;
- int ki;
- void *orig_e = e;
- int c;
-
- LOG(("adding element \"%s\" to tree %p\n", e, t));
- if (t->root == NULL)
- {
- t->root = mknew(node234);
- t->root->elems[1] = t->root->elems[2] = NULL;
- t->root->kids[0] = t->root->kids[1] = NULL;
- t->root->kids[2] = t->root->kids[3] = NULL;
- t->root->counts[0] = t->root->counts[1] = 0;
- t->root->counts[2] = t->root->counts[3] = 0;
- t->root->parent = NULL;
- t->root->elems[0] = e;
- LOG((" created root %p\n", t->root));
- return orig_e;
- }
-
- n = t->root;
- while (n)
- {
- LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- if (index >= 0)
- {
- if (!n->kids[0])
- {
- /*
- * Leaf node. We want to insert at kid position
- * equal to the index:
- *
- * 0 A 1 B 2 C 3
- */
- ki = index;
- } else
- {
- /*
- * Internal node. We always descend through it (add
- * always starts at the bottom, never in the
- * middle).
- */
- if (index <= n->counts[0])
- {
- ki = 0;
- } else if (index -= n->counts[0] + 1, index <= n->counts[1])
- {
- ki = 1;
- } else if (index -= n->counts[1] + 1, index <= n->counts[2])
- {
- ki = 2;
- } else if (index -= n->counts[2] + 1, index <= n->counts[3])
- {
- ki = 3;
- } else
- return NULL; /* error: index out of range */
- }
- } else
- {
- if ((c = t->cmp(e, n->elems[0])) < 0)
- ki = 0;
- else if (c == 0)
- return n->elems[0]; /* already exists */
- else if (n->elems[1] == NULL || (c = t->cmp(e, n->elems[1])) < 0)
- ki = 1;
- else if (c == 0)
- return n->elems[1]; /* already exists */
- else if (n->elems[2] == NULL || (c = t->cmp(e, n->elems[2])) < 0)
- ki = 2;
- else if (c == 0)
- return n->elems[2]; /* already exists */
- else
- ki = 3;
- }
- LOG((" moving to child %d (%p)\n", ki, n->kids[ki]));
- if (!n->kids[ki])
- break;
- n = n->kids[ki];
- }
-
- add234_insert(NULL, e, NULL, &t->root, n, ki);
-
- return orig_e;
-}
-
-void *add234(tree234 * t, void *e)
-{
- if (!t->cmp) /* tree is unsorted */
- return NULL;
-
- return add234_internal(t, e, -1);
-}
-
-void *addpos234(tree234 * t, void *e, int index)
-{
- if (index < 0 || /* index out of range */
- t->cmp) /* tree is sorted */
- return NULL; /* return failure */
-
- return add234_internal(t, e, index); /* this checks the upper bound */
-}
-
-/*
- * Look up the element at a given numeric index in a 2-3-4 tree.
- * Returns NULL if the index is out of range.
- */
-void *index234(tree234 * t, int index)
-{
- node234 *n;
-
- if (!t->root)
- return NULL; /* tree is empty */
-
- if (index < 0 || index >= countnode234(t->root))
- return NULL; /* out of range */
-
- n = t->root;
-
- while (n)
- {
- if (index < n->counts[0])
- n = n->kids[0];
- else if (index -= n->counts[0] + 1, index < 0)
- return n->elems[0];
- else if (index < n->counts[1])
- n = n->kids[1];
- else if (index -= n->counts[1] + 1, index < 0)
- return n->elems[1];
- else if (index < n->counts[2])
- n = n->kids[2];
- else if (index -= n->counts[2] + 1, index < 0)
- return n->elems[2];
- else
- n = n->kids[3];
- }
-
- /* We shouldn't ever get here. I wonder how we did. */
- return NULL;
-}
-
-/*
- * Find an element e in a sorted 2-3-4 tree t. Returns NULL if not
- * found. e is always passed as the first argument to cmp, so cmp
- * can be an asymmetric function if desired. cmp can also be passed
- * as NULL, in which case the compare function from the tree proper
- * will be used.
- */
-void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp, int relation,
- int *index)
-{
- node234 *n;
- void *ret;
- int c;
- int idx, ecount, kcount, cmpret;
-
- if (t->root == NULL)
- return NULL;
-
- if (cmp == NULL)
- cmp = t->cmp;
-
- n = t->root;
- /*
- * Attempt to find the element itself.
- */
- idx = 0;
- ecount = -1;
- /*
- * Prepare a fake `cmp' result if e is NULL.
- */
- cmpret = 0;
- if (e == NULL)
- {
- assert(relation == REL234_LT || relation == REL234_GT);
- if (relation == REL234_LT)
- cmpret = +1; /* e is a max: always greater */
- else if (relation == REL234_GT)
- cmpret = -1; /* e is a min: always smaller */
- }
- while (1)
- {
- for (kcount = 0; kcount < 4; kcount++)
- {
- if (kcount >= 3 || n->elems[kcount] == NULL ||
- (c = cmpret ? cmpret : cmp(e, n->elems[kcount])) < 0)
- {
- break;
- }
- if (n->kids[kcount])
- idx += n->counts[kcount];
- if (c == 0)
- {
- ecount = kcount;
- break;
- }
- idx++;
- }
- if (ecount >= 0)
- break;
- if (n->kids[kcount])
- n = n->kids[kcount];
- else
- break;
- }
-
- if (ecount >= 0)
- {
- /*
- * We have found the element we're looking for. It's
- * n->elems[ecount], at tree index idx. If our search
- * relation is EQ, LE or GE we can now go home.
- */
- if (relation != REL234_LT && relation != REL234_GT)
- {
- if (index)
- *index = idx;
- return n->elems[ecount];
- }
-
- /*
- * Otherwise, we'll do an indexed lookup for the previous
- * or next element. (It would be perfectly possible to
- * implement these search types in a non-counted tree by
- * going back up from where we are, but far more fiddly.)
- */
- if (relation == REL234_LT)
- idx--;
- else
- idx++;
- } else
- {
- /*
- * We've found our way to the bottom of the tree and we
- * know where we would insert this node if we wanted to:
- * we'd put it in in place of the (empty) subtree
- * n->kids[kcount], and it would have index idx
- *
- * But the actual element isn't there. So if our search
- * relation is EQ, we're doomed.
- */
- if (relation == REL234_EQ)
- return NULL;
-
- /*
- * Otherwise, we must do an index lookup for index idx-1
- * (if we're going left - LE or LT) or index idx (if we're
- * going right - GE or GT).
- */
- if (relation == REL234_LT || relation == REL234_LE)
- {
- idx--;
- }
- }
-
- /*
- * We know the index of the element we want; just call index234
- * to do the rest. This will return NULL if the index is out of
- * bounds, which is exactly what we want.
- */
- ret = index234(t, idx);
- if (ret && index)
- *index = idx;
- return ret;
-}
-
-void *find234(tree234 * t, void *e, cmpfn234 cmp)
-{
- return findrelpos234(t, e, cmp, REL234_EQ, NULL);
-}
-
-void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation)
-{
- return findrelpos234(t, e, cmp, relation, NULL);
-}
-
-void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index)
-{
- return findrelpos234(t, e, cmp, REL234_EQ, index);
-}
-
-/*
- * Tree transformation used in delete and split: move a subtree
- * right, from child ki of a node to the next child. Update k and
- * index so that they still point to the same place in the
- * transformed tree. Assumes the destination child is not full, and
- * that the source child does have a subtree to spare. Can cope if
- * the destination child is undersized.
- *
- * . C . . B .
- * / \ -> / \
- * [more] a A b B c d D e [more] a A b c C d D e
- *
- * . C . . B .
- * / \ -> / \
- * [more] a A b B c d [more] a A b c C d
- */
-static void trans234_subtree_right(node234 * n, int ki, int *k, int *index)
-{
- node234 *src, *dest;
- int i, srclen, adjust;
-
- src = n->kids[ki];
- dest = n->kids[ki + 1];
-
- LOG((" trans234_subtree_right(%p, %d):\n", n, ki));
- LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- src,
- src->kids[0], src->counts[0], src->elems[0],
- src->kids[1], src->counts[1], src->elems[1],
- src->kids[2], src->counts[2], src->elems[2],
- src->kids[3], src->counts[3]));
- LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- dest,
- dest->kids[0], dest->counts[0], dest->elems[0],
- dest->kids[1], dest->counts[1], dest->elems[1],
- dest->kids[2], dest->counts[2], dest->elems[2],
- dest->kids[3], dest->counts[3]));
- /*
- * Move over the rest of the destination node to make space.
- */
- dest->kids[3] = dest->kids[2];
- dest->counts[3] = dest->counts[2];
- dest->elems[2] = dest->elems[1];
- dest->kids[2] = dest->kids[1];
- dest->counts[2] = dest->counts[1];
- dest->elems[1] = dest->elems[0];
- dest->kids[1] = dest->kids[0];
- dest->counts[1] = dest->counts[0];
-
- /* which element to move over */
- i = (src->elems[2] ? 2 : src->elems[1] ? 1 : 0);
-
- dest->elems[0] = n->elems[ki];
- n->elems[ki] = src->elems[i];
- src->elems[i] = NULL;
-
- dest->kids[0] = src->kids[i + 1];
- dest->counts[0] = src->counts[i + 1];
- src->kids[i + 1] = NULL;
- src->counts[i + 1] = 0;
-
- if (dest->kids[0])
- dest->kids[0]->parent = dest;
-
- adjust = dest->counts[0] + 1;
-
- n->counts[ki] -= adjust;
- n->counts[ki + 1] += adjust;
-
- srclen = n->counts[ki];
-
- if (k)
- {
- LOG((" before: k,index = %d,%d\n", (*k), (*index)));
- if ((*k) == ki && (*index) > srclen)
- {
- (*index) -= srclen + 1;
- (*k)++;
- } else if ((*k) == ki + 1)
- {
- (*index) += adjust;
- }
- LOG((" after: k,index = %d,%d\n", (*k), (*index)));
- }
-
- LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- src,
- src->kids[0], src->counts[0], src->elems[0],
- src->kids[1], src->counts[1], src->elems[1],
- src->kids[2], src->counts[2], src->elems[2],
- src->kids[3], src->counts[3]));
- LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- dest,
- dest->kids[0], dest->counts[0], dest->elems[0],
- dest->kids[1], dest->counts[1], dest->elems[1],
- dest->kids[2], dest->counts[2], dest->elems[2],
- dest->kids[3], dest->counts[3]));
-}
-
-/*
- * Tree transformation used in delete and split: move a subtree
- * left, from child ki of a node to the previous child. Update k
- * and index so that they still point to the same place in the
- * transformed tree. Assumes the destination child is not full, and
- * that the source child does have a subtree to spare. Can cope if
- * the destination child is undersized.
- *
- * . B . . C .
- * / \ -> / \
- * a A b c C d D e [more] a A b B c d D e [more]
- *
- * . A . . B .
- * / \ -> / \
- * a b B c C d [more] a A b c C d [more]
- */
-static void trans234_subtree_left(node234 * n, int ki, int *k, int *index)
-{
- node234 *src, *dest;
- int i, adjust;
-
- src = n->kids[ki];
- dest = n->kids[ki - 1];
-
- LOG((" trans234_subtree_left(%p, %d):\n", n, ki));
- LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- dest,
- dest->kids[0], dest->counts[0], dest->elems[0],
- dest->kids[1], dest->counts[1], dest->elems[1],
- dest->kids[2], dest->counts[2], dest->elems[2],
- dest->kids[3], dest->counts[3]));
- LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- src,
- src->kids[0], src->counts[0], src->elems[0],
- src->kids[1], src->counts[1], src->elems[1],
- src->kids[2], src->counts[2], src->elems[2],
- src->kids[3], src->counts[3]));
-
- /* where in dest to put it */
- i = (dest->elems[1] ? 2 : dest->elems[0] ? 1 : 0);
- dest->elems[i] = n->elems[ki - 1];
- n->elems[ki - 1] = src->elems[0];
-
- dest->kids[i + 1] = src->kids[0];
- dest->counts[i + 1] = src->counts[0];
-
- if (dest->kids[i + 1])
- dest->kids[i + 1]->parent = dest;
-
- /*
- * Move over the rest of the source node.
- */
- src->kids[0] = src->kids[1];
- src->counts[0] = src->counts[1];
- src->elems[0] = src->elems[1];
- src->kids[1] = src->kids[2];
- src->counts[1] = src->counts[2];
- src->elems[1] = src->elems[2];
- src->kids[2] = src->kids[3];
- src->counts[2] = src->counts[3];
- src->elems[2] = NULL;
- src->kids[3] = NULL;
- src->counts[3] = 0;
-
- adjust = dest->counts[i + 1] + 1;
-
- n->counts[ki] -= adjust;
- n->counts[ki - 1] += adjust;
-
- if (k)
- {
- LOG((" before: k,index = %d,%d\n", (*k), (*index)));
- if ((*k) == ki)
- {
- (*index) -= adjust;
- if ((*index) < 0)
- {
- (*index) += n->counts[ki - 1] + 1;
- (*k)--;
- }
- }
- LOG((" after: k,index = %d,%d\n", (*k), (*index)));
- }
-
- LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- dest,
- dest->kids[0], dest->counts[0], dest->elems[0],
- dest->kids[1], dest->counts[1], dest->elems[1],
- dest->kids[2], dest->counts[2], dest->elems[2],
- dest->kids[3], dest->counts[3]));
- LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- src,
- src->kids[0], src->counts[0], src->elems[0],
- src->kids[1], src->counts[1], src->elems[1],
- src->kids[2], src->counts[2], src->elems[2],
- src->kids[3], src->counts[3]));
-}
-
-/*
- * Tree transformation used in delete and split: merge child nodes
- * ki and ki+1 of a node. Update k and index so that they still
- * point to the same place in the transformed tree. Assumes both
- * children _are_ sufficiently small.
- *
- * . B . .
- * / \ -> |
- * a A b c C d a A b B c C d
- *
- * This routine can also cope with either child being undersized:
- *
- * . A . .
- * / \ -> |
- * a b B c a A b B c
- *
- * . A . .
- * / \ -> |
- * a b B c C d a A b B c C d
- */
-static void trans234_subtree_merge(node234 * n, int ki, int *k, int *index)
-{
- node234 *left, *right;
- int i, leftlen, rightlen, lsize, rsize;
-
- left = n->kids[ki];
- leftlen = n->counts[ki];
- right = n->kids[ki + 1];
- rightlen = n->counts[ki + 1];
-
- LOG((" trans234_subtree_merge(%p, %d):\n", n, ki));
- LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" left %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- left,
- left->kids[0], left->counts[0], left->elems[0],
- left->kids[1], left->counts[1], left->elems[1],
- left->kids[2], left->counts[2], left->elems[2],
- left->kids[3], left->counts[3]));
- LOG((" right %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- right,
- right->kids[0], right->counts[0], right->elems[0],
- right->kids[1], right->counts[1], right->elems[1],
- right->kids[2], right->counts[2], right->elems[2],
- right->kids[3], right->counts[3]));
-
- assert(!left->elems[2] && !right->elems[2]); /* neither is large! */
- lsize = (left->elems[1] ? 2 : left->elems[0] ? 1 : 0);
- rsize = (right->elems[1] ? 2 : right->elems[0] ? 1 : 0);
-
- left->elems[lsize] = n->elems[ki];
-
- for (i = 0; i < rsize + 1; i++)
- {
- left->kids[lsize + 1 + i] = right->kids[i];
- left->counts[lsize + 1 + i] = right->counts[i];
- if (left->kids[lsize + 1 + i])
- left->kids[lsize + 1 + i]->parent = left;
- if (i < rsize)
- left->elems[lsize + 1 + i] = right->elems[i];
- }
-
- n->counts[ki] += rightlen + 1;
-
- sfree(right);
-
- /*
- * Move the rest of n up by one.
- */
- for (i = ki + 1; i < 3; i++)
- {
- n->kids[i] = n->kids[i + 1];
- n->counts[i] = n->counts[i + 1];
- }
- for (i = ki; i < 2; i++)
- {
- n->elems[i] = n->elems[i + 1];
- }
- n->kids[3] = NULL;
- n->counts[3] = 0;
- n->elems[2] = NULL;
-
- if (k)
- {
- LOG((" before: k,index = %d,%d\n", (*k), (*index)));
- if ((*k) == ki + 1)
- {
- (*k)--;
- (*index) += leftlen + 1;
- } else if ((*k) > ki + 1)
- {
- (*k)--;
- }
- LOG((" after: k,index = %d,%d\n", (*k), (*index)));
- }
-
- LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n,
- n->kids[0], n->counts[0], n->elems[0],
- n->kids[1], n->counts[1], n->elems[1],
- n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
- LOG((" merged %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- left,
- left->kids[0], left->counts[0], left->elems[0],
- left->kids[1], left->counts[1], left->elems[1],
- left->kids[2], left->counts[2], left->elems[2],
- left->kids[3], left->counts[3]));
-
-}
-
-/*
- * Delete an element e in a 2-3-4 tree. Does not free the element,
- * merely removes all links to it from the tree nodes.
- */
-static void *delpos234_internal(tree234 * t, int index)
-{
- node234 *n;
- void *retval;
- int ki, i;
-
- retval = NULL;
-
- n = t->root; /* by assumption this is non-NULL */
- LOG(("deleting item %d from tree %p\n", index, t));
- while (1)
- {
- node234 *sub;
-
- LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d index=%d\n", n, n->kids[0], n->counts[0], n->elems[0], n->kids[1], n->counts[1], n->elems[1], n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3], index));
- if (index <= n->counts[0])
- {
- ki = 0;
- } else if (index -= n->counts[0] + 1, index <= n->counts[1])
- {
- ki = 1;
- } else if (index -= n->counts[1] + 1, index <= n->counts[2])
- {
- ki = 2;
- } else if (index -= n->counts[2] + 1, index <= n->counts[3])
- {
- ki = 3;
- } else
- {
- assert(0); /* can't happen */
- }
-
- if (!n->kids[0])
- break; /* n is a leaf node; we're here! */
-
- /*
- * Check to see if we've found our target element. If so,
- * we must choose a new target (we'll use the old target's
- * successor, which will be in a leaf), move it into the
- * place of the old one, continue down to the leaf and
- * delete the old copy of the new target.
- */
- if (index == n->counts[ki])
- {
- node234 *m;
- LOG((" found element in internal node, index %d\n", ki));
- assert(n->elems[ki]); /* must be a kid _before_ an element */
- ki++;
- index = 0;
- for (m = n->kids[ki]; m->kids[0]; m = m->kids[0])
- continue;
- LOG((" replacing with element \"%s\" from leaf node %p\n",
- m->elems[0], m));
- retval = n->elems[ki - 1];
- n->elems[ki - 1] = m->elems[0];
- }
-
- /*
- * Recurse down to subtree ki. If it has only one element,
- * we have to do some transformation to start with.
- */
- LOG((" moving to subtree %d\n", ki));
- sub = n->kids[ki];
- if (!sub->elems[1])
- {
- LOG((" subtree has only one element!\n"));
- if (ki > 0 && n->kids[ki - 1]->elems[1])
- {
- /*
- * Child ki has only one element, but child
- * ki-1 has two or more. So we need to move a
- * subtree from ki-1 to ki.
- */
- trans234_subtree_right(n, ki - 1, &ki, &index);
- } else if (ki < 3 && n->kids[ki + 1] && n->kids[ki + 1]->elems[1])
- {
- /*
- * Child ki has only one element, but ki+1 has
- * two or more. Move a subtree from ki+1 to ki.
- */
- trans234_subtree_left(n, ki + 1, &ki, &index);
- } else
- {
- /*
- * ki is small with only small neighbours. Pick a
- * neighbour and merge with it.
- */
- trans234_subtree_merge(n, ki > 0 ? ki - 1 : ki, &ki, &index);
- sub = n->kids[ki];
-
- if (!n->elems[0])
- {
- /*
- * The root is empty and needs to be
- * removed.
- */
- LOG((" shifting root!\n"));
- t->root = sub;
- sub->parent = NULL;
- sfree(n);
- n = NULL;
- }
- }
- }
-
- if (n)
- n->counts[ki]--;
- n = sub;
- }
-
- /*
- * Now n is a leaf node, and ki marks the element number we
- * want to delete. We've already arranged for the leaf to be
- * bigger than minimum size, so let's just go to it.
- */
- assert(!n->kids[0]);
- if (!retval)
- retval = n->elems[ki];
-
- for (i = ki; i < 2 && n->elems[i + 1]; i++)
- n->elems[i] = n->elems[i + 1];
- n->elems[i] = NULL;
-
- /*
- * It's just possible that we have reduced the leaf to zero
- * size. This can only happen if it was the root - so destroy
- * it and make the tree empty.
- */
- if (!n->elems[0])
- {
- LOG((" removed last element in tree, destroying empty root\n"));
- assert(n == t->root);
- sfree(n);
- t->root = NULL;
- }
-
- return retval; /* finished! */
-}
-
-void *delpos234(tree234 * t, int index)
-{
- if (index < 0 || index >= countnode234(t->root))
- return NULL;
- return delpos234_internal(t, index);
-}
-
-void *del234(tree234 * t, void *e)
-{
- int index;
- if (!findrelpos234(t, e, NULL, REL234_EQ, &index))
- return NULL; /* it wasn't in there anyway */
- return delpos234_internal(t, index); /* it's there; delete it. */
-}
-
-/*
- * Join two subtrees together with a separator element between
- * them, given their relative height.
- *
- * (Height<0 means the left tree is shorter, >0 means the right
- * tree is shorter, =0 means (duh) they're equal.)
- *
- * It is assumed that any checks needed on the ordering criterion
- * have _already_ been done.
- *
- * The value returned in `height' is 0 or 1 depending on whether the
- * resulting tree is the same height as the original larger one, or
- * one higher.
- */
-static node234 *join234_internal(node234 * left, void *sep,
- node234 * right, int *height)
-{
- node234 *root, *node;
- int relht = *height;
- int ki;
-
- LOG((" join: joining %p \"%s\" %p, relative height is %d\n",
- left, sep, right, relht));
- if (relht == 0)
- {
- /*
- * The trees are the same height. Create a new one-element
- * root containing the separator and pointers to the two
- * nodes.
- */
- node234 *newroot;
- newroot = mknew(node234);
- newroot->kids[0] = left;
- newroot->counts[0] = countnode234(left);
- newroot->elems[0] = sep;
- newroot->kids[1] = right;
- newroot->counts[1] = countnode234(right);
- newroot->elems[1] = NULL;
- newroot->kids[2] = NULL;
- newroot->counts[2] = 0;
- newroot->elems[2] = NULL;
- newroot->kids[3] = NULL;
- newroot->counts[3] = 0;
- newroot->parent = NULL;
- if (left)
- left->parent = newroot;
- if (right)
- right->parent = newroot;
- *height = 1;
- LOG((" join: same height, brand new root\n"));
- return newroot;
- }
-
- /*
- * This now works like the addition algorithm on the larger
- * tree. We're replacing a single kid pointer with two kid
- * pointers separated by an element; if that causes the node to
- * overload, we split it in two, move a separator element up to
- * the next node, and repeat.
- */
- if (relht < 0)
- {
- /*
- * Left tree is shorter. Search down the right tree to find
- * the pointer we're inserting at.
- */
- node = root = right;
- while (++relht < 0)
- {
- node = node->kids[0];
- }
- ki = 0;
- right = node->kids[ki];
- } else
- {
- /*
- * Right tree is shorter; search down the left to find the
- * pointer we're inserting at.
- */
- node = root = left;
- while (--relht > 0)
- {
- if (node->elems[2])
- node = node->kids[3];
- else if (node->elems[1])
- node = node->kids[2];
- else
- node = node->kids[1];
- }
- if (node->elems[2])
- ki = 3;
- else if (node->elems[1])
- ki = 2;
- else
- ki = 1;
- left = node->kids[ki];
- }
-
- /*
- * Now proceed as for addition.
- */
- *height = add234_insert(left, sep, right, &root, node, ki);
-
- return root;
-}
-static int height234(tree234 * t)
-{
- int level = 0;
- node234 *n = t->root;
- while (n)
- {
- level++;
- n = n->kids[0];
- }
- return level;
-}
-
-tree234 *join234(tree234 * t1, tree234 * t2)
-{
- int size2 = countnode234(t2->root);
- if (size2 > 0)
- {
- void *element;
- int relht;
-
- if (t1->cmp)
- {
- element = index234(t2, 0);
- element = findrelpos234(t1, element, NULL, REL234_GE, NULL);
- if (element)
- return NULL;
- }
-
- element = delpos234(t2, 0);
- relht = height234(t1) - height234(t2);
- t1->root = join234_internal(t1->root, element, t2->root, &relht);
- t2->root = NULL;
- }
- return t1;
-}
-
-tree234 *join234r(tree234 * t1, tree234 * t2)
-{
- int size1 = countnode234(t1->root);
- if (size1 > 0)
- {
- void *element;
- int relht;
-
- if (t2->cmp)
- {
- element = index234(t1, size1 - 1);
- element = findrelpos234(t2, element, NULL, REL234_LE, NULL);
- if (element)
- return NULL;
- }
-
- element = delpos234(t1, size1 - 1);
- relht = height234(t1) - height234(t2);
- t2->root = join234_internal(t1->root, element, t2->root, &relht);
- t1->root = NULL;
- }
- return t2;
-}
-
-/*
- * Split out the first <index> elements in a tree and return a
- * pointer to the root node. Leave the root node of the remainder
- * in t.
- */
-static node234 *split234_internal(tree234 * t, int index)
-{
- node234 *halves[2], *n, *sib, *sub;
- node234 *lparent, *rparent;
- int ki, pki=0, i, half, lcount, rcount;
-
- n = t->root;
- LOG(("splitting tree %p at point %d\n", t, index));
-
- /*
- * Easy special cases. After this we have also dealt completely
- * with the empty-tree case and we can assume the root exists.
- */
- if (index == 0) /* return nothing */
- return NULL;
- if (index == countnode234(t->root))
- { /* return the whole tree */
- node234 *ret = t->root;
- t->root = NULL;
- return ret;
- }
-
- /*
- * Search down the tree to find the split point.
- */
- lparent = rparent = NULL;
- while (n)
- {
- LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d index=%d\n", n, n->kids[0], n->counts[0], n->elems[0], n->kids[1], n->counts[1], n->elems[1], n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3], index));
- lcount = index;
- rcount = countnode234(n) - lcount;
- if (index <= n->counts[0])
- {
- ki = 0;
- } else if (index -= n->counts[0] + 1, index <= n->counts[1])
- {
- ki = 1;
- } else if (index -= n->counts[1] + 1, index <= n->counts[2])
- {
- ki = 2;
- } else
- {
- index -= n->counts[2] + 1;
- ki = 3;
- }
-
- LOG((" splitting at subtree %d\n", ki));
- sub = n->kids[ki];
-
- LOG((" splitting at child index %d\n", ki));
-
- /*
- * Split the node, put halves[0] on the right of the left
- * one and halves[1] on the left of the right one, put the
- * new node pointers in halves[0] and halves[1], and go up
- * a level.
- */
- sib = mknew(node234);
- for (i = 0; i < 3; i++)
- {
- if (i + ki < 3 && n->elems[i + ki])
- {
- sib->elems[i] = n->elems[i + ki];
- sib->kids[i + 1] = n->kids[i + ki + 1];
- if (sib->kids[i + 1])
- sib->kids[i + 1]->parent = sib;
- sib->counts[i + 1] = n->counts[i + ki + 1];
- n->elems[i + ki] = NULL;
- n->kids[i + ki + 1] = NULL;
- n->counts[i + ki + 1] = 0;
- } else
- {
- sib->elems[i] = NULL;
- sib->kids[i + 1] = NULL;
- sib->counts[i + 1] = 0;
- }
- }
- if (lparent)
- {
- lparent->kids[pki] = n;
- lparent->counts[pki] = lcount;
- n->parent = lparent;
- rparent->kids[0] = sib;
- rparent->counts[0] = rcount;
- sib->parent = rparent;
- } else
- {
- halves[0] = n;
- n->parent = NULL;
- halves[1] = sib;
- sib->parent = NULL;
- }
- lparent = n;
- rparent = sib;
- pki = ki;
- LOG((" left node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- n, n->kids[0], n->counts[0], n->elems[0], n->kids[1],
- n->counts[1], n->elems[1], n->kids[2], n->counts[2], n->elems[2],
- n->kids[3], n->counts[3]));
- LOG((" right node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
- sib, sib->kids[0], sib->counts[0], sib->elems[0], sib->kids[1],
- sib->counts[1], sib->elems[1], sib->kids[2], sib->counts[2],
- sib->elems[2], sib->kids[3], sib->counts[3]));
-
- n = sub;
- }
-
- /*
- * We've come off the bottom here, so we've successfully split
- * the tree into two equally high subtrees. The only problem is
- * that some of the nodes down the fault line will be smaller
- * than the minimum permitted size. (Since this is a 2-3-4
- * tree, that means they'll be zero-element one-child nodes.)
- */
- LOG((" fell off bottom, lroot is %p, rroot is %p\n",
- halves[0], halves[1]));
- lparent->counts[pki] = rparent->counts[0] = 0;
- lparent->kids[pki] = rparent->kids[0] = NULL;
-
- /*
- * So now we go back down the tree from each of the two roots,
- * fixing up undersize nodes.
- */
- for (half = 0; half < 2; half++)
- {
- /*
- * Remove the root if it's undersize (it will contain only
- * one child pointer, so just throw it away and replace it
- * with its child). This might happen several times.
- */
- while (halves[half] && !halves[half]->elems[0])
- {
- LOG((" root %p is undersize, throwing away\n", halves[half]));
- halves[half] = halves[half]->kids[0];
- sfree(halves[half]->parent);
- halves[half]->parent = NULL;
- LOG((" new root is %p\n", halves[half]));
- }
-
- n = halves[half];
- while (n)
- {
- void (*toward) (node234 * n, int ki, int *k, int *index);
- int ni, merge;
-
- /*
- * Now we have a potentially undersize node on the
- * right (if half==0) or left (if half==1). Sort it
- * out, by merging with a neighbour or by transferring
- * subtrees over. At this time we must also ensure that
- * nodes are bigger than minimum, in case we need an
- * element to merge two nodes below.
- */
- LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", n,
- n->kids[0], n->counts[0], n->elems[0], n->kids[1], n->counts[1],
- n->elems[1], n->kids[2], n->counts[2], n->elems[2], n->kids[3],
- n->counts[3]));
- if (half == 1)
- {
- ki = 0; /* the kid we're interested in */
- ni = 1; /* the neighbour */
- merge = 0; /* for merge: leftmost of the two */
- toward = trans234_subtree_left;
- } else
- {
- ki = (n->kids[3] ? 3 : n->kids[2] ? 2 : 1);
- ni = ki - 1;
- merge = ni;
- toward = trans234_subtree_right;
- }
-
- sub = n->kids[ki];
- if (sub && !sub->elems[1])
- {
- /*
- * This node is undersized or minimum-size. If we
- * can merge it with its neighbour, we do so;
- * otherwise we must be able to transfer subtrees
- * over to it until it is greater than minimum
- * size.
- */
- int undersized = (!sub->elems[0]);
- LOG((" child %d is %ssize\n", ki,
- undersized ? "under" : "minimum-"));
- LOG((" neighbour is %s\n",
- n->kids[ni]->elems[2] ? "large" :
- n->kids[ni]->elems[1] ? "medium" : "small"));
- if (!n->kids[ni]->elems[1] ||
- (undersized && !n->kids[ni]->elems[2]))
- {
- /*
- * Neighbour is small, or possibly neighbour is
- * medium and we are undersize.
- */
- trans234_subtree_merge(n, merge, NULL, NULL);
- sub = n->kids[merge];
- if (!n->elems[0])
- {
- /*
- * n is empty, and hence must have been the
- * root and needs to be removed.
- */
- assert(!n->parent);
- LOG((" shifting root!\n"));
- halves[half] = sub;
- halves[half]->parent = NULL;
- sfree(n);
- }
- } else
- {
- /* Neighbour is big enough to move trees over. */
- toward(n, ni, NULL, NULL);
- if (undersized)
- toward(n, ni, NULL, NULL);
- }
- }
- n = sub;
- }
- }
-
- t->root = halves[1];
- return halves[0];
-}
-
-tree234 *splitpos234(tree234 * t, int index, int before)
-{
- tree234 *ret;
- node234 *n;
- int count;
-
- count = countnode234(t->root);
- if (index < 0 || index > count)
- return NULL; /* error */
- ret = newtree234(t->cmp);
- n = split234_internal(t, index);
- if (before)
- {
- /* We want to return the ones before the index. */
- ret->root = n;
- } else
- {
- /*
- * We want to keep the ones before the index and return the
- * ones after.
- */
- ret->root = t->root;
- t->root = n;
- }
- return ret;
-}
-
-tree234 *split234(tree234 * t, void *e, cmpfn234 cmp, int rel)
-{
- int before;
- int index;
-
- assert(rel != REL234_EQ);
-
- if (rel == REL234_GT || rel == REL234_GE)
- {
- before = 1;
- rel = (rel == REL234_GT ? REL234_LE : REL234_LT);
- } else
- {
- before = 0;
- }
- if (!findrelpos234(t, e, cmp, rel, &index))
- index = 0;
-
- return splitpos234(t, index + 1, before);
-}
-
-static node234 *copynode234(node234 * n, copyfn234 copyfn,
- void *copyfnstate)
-{
- int i;
- node234 *n2 = mknew(node234);
-
- for (i = 0; i < 3; i++)
- {
- if (n->elems[i] && copyfn)
- n2->elems[i] = copyfn(copyfnstate, n->elems[i]);
- else
- n2->elems[i] = n->elems[i];
- }
-
- for (i = 0; i < 4; i++)
- {
- if (n->kids[i])
- {
- n2->kids[i] = copynode234(n->kids[i], copyfn, copyfnstate);
- n2->kids[i]->parent = n2;
- } else
- {
- n2->kids[i] = NULL;
- }
- n2->counts[i] = n->counts[i];
- }
-
- return n2;
-}
-
-tree234 *copytree234(tree234 * t, copyfn234 copyfn, void *copyfnstate)
-{
- tree234 *t2;
-
- t2 = newtree234(t->cmp);
- t2->root = copynode234(t->root, copyfn, copyfnstate);
- t2->root->parent = NULL;
-
- return t2;
-}
-
-#ifdef TEST
-
-/*
- * Test code for the 2-3-4 tree. This code maintains an alternative
- * representation of the data in the tree, in an array (using the
- * obvious and slow insert and delete functions). After each tree
- * operation, the verify() function is called, which ensures all
- * the tree properties are preserved:
- * - node->child->parent always equals node
- * - tree->root->parent always equals NULL
- * - number of kids == 0 or number of elements + 1;
- * - tree has the same depth everywhere
- * - every node has at least one element
- * - subtree element counts are accurate
- * - any NULL kid pointer is accompanied by a zero count
- * - in a sorted tree: ordering property between elements of a
- * node and elements of its children is preserved
- * and also ensures the list represented by the tree is the same
- * list it should be. (This last check also doubly verifies the
- * ordering properties, because the `same list it should be' is by
- * definition correctly ordered. It also ensures all nodes are
- * distinct, because the enum functions would get caught in a loop
- * if not.)
- */
-
-#include <stdarg.h>
-
-#define srealloc realloc
-
-/*
- * Error reporting function.
- */
-void error(char *fmt, ...)
-{
- va_list ap;
- printf("ERROR: ");
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
- printf("\n");
-}
-
-/* The array representation of the data. */
-void **array;
-int arraylen, arraysize;
-cmpfn234 cmp;
-
-/* The tree representation of the same data. */
-tree234 *tree;
-
-/*
- * Routines to provide a diagnostic printout of a tree. Currently
- * relies on every element in the tree being a one-character string
- * :-)
- */
-typedef struct {
- char **levels;
-} dispctx;
-
-int dispnode(node234 * n, int level, dispctx * ctx)
-{
- if (level == 0)
- {
- int xpos = strlen(ctx->levels[0]);
- int len;
-
- if (n->elems[2])
- len = sprintf(ctx->levels[0] + xpos, " %s%s%s",
- n->elems[0], n->elems[1], n->elems[2]);
- else if (n->elems[1])
- len = sprintf(ctx->levels[0] + xpos, " %s%s",
- n->elems[0], n->elems[1]);
- else
- len = sprintf(ctx->levels[0] + xpos, " %s", n->elems[0]);
- return xpos + 1 + (len - 1) / 2;
- } else
- {
- int xpos[4], nkids;
- int nodelen, mypos, myleft, x, i;
-
- xpos[0] = dispnode(n->kids[0], level - 3, ctx);
- xpos[1] = dispnode(n->kids[1], level - 3, ctx);
- nkids = 2;
- if (n->kids[2])
- {
- xpos[2] = dispnode(n->kids[2], level - 3, ctx);
- nkids = 3;
- }
- if (n->kids[3])
- {
- xpos[3] = dispnode(n->kids[3], level - 3, ctx);
- nkids = 4;
- }
-
- if (nkids == 4)
- mypos = (xpos[1] + xpos[2]) / 2;
- else if (nkids == 3)
- mypos = xpos[1];
- else
- mypos = (xpos[0] + xpos[1]) / 2;
- nodelen = nkids * 2 - 1;
- myleft = mypos - ((nodelen - 1) / 2);
- assert(myleft >= xpos[0]);
- assert(myleft + nodelen - 1 <= xpos[nkids - 1]);
-
- x = strlen(ctx->levels[level]);
- while (x <= xpos[0] && x < myleft)
- ctx->levels[level][x++] = ' ';
- while (x < myleft)
- ctx->levels[level][x++] = '_';
- if (nkids == 4)
- x += sprintf(ctx->levels[level] + x, ".%s.%s.%s.",
- n->elems[0], n->elems[1], n->elems[2]);
- else if (nkids == 3)
- x += sprintf(ctx->levels[level] + x, ".%s.%s.",
- n->elems[0], n->elems[1]);
- else
- x += sprintf(ctx->levels[level] + x, ".%s.", n->elems[0]);
- while (x < xpos[nkids - 1])
- ctx->levels[level][x++] = '_';
- ctx->levels[level][x] = '\0';
-
- x = strlen(ctx->levels[level - 1]);
- for (i = 0; i < nkids; i++)
- {
- int rpos, pos;
- rpos = xpos[i];
- if (i > 0 && i < nkids - 1)
- pos = myleft + 2 * i;
- else
- pos = rpos;
- if (rpos < pos)
- rpos++;
- while (x < pos && x < rpos)
- ctx->levels[level - 1][x++] = ' ';
- if (x == pos)
- ctx->levels[level - 1][x++] = '|';
- while (x < pos || x < rpos)
- ctx->levels[level - 1][x++] = '_';
- if (x == pos)
- ctx->levels[level - 1][x++] = '|';
- }
- ctx->levels[level - 1][x] = '\0';
-
- x = strlen(ctx->levels[level - 2]);
- for (i = 0; i < nkids; i++)
- {
- int rpos = xpos[i];
-
- while (x < rpos)
- ctx->levels[level - 2][x++] = ' ';
- ctx->levels[level - 2][x++] = '|';
- }
- ctx->levels[level - 2][x] = '\0';
-
- return mypos;
- }
-}
-
-void disptree(tree234 * t)
-{
- dispctx ctx;
- char *leveldata;
- int width = count234(t);
- int ht = height234(t) * 3 - 2;
- int i;
-
- if (!t->root)
- {
- printf("[empty tree]\n");
- }
-
- leveldata = smalloc(ht * (width + 2));
- ctx.levels = smalloc(ht * sizeof(char *));
- for (i = 0; i < ht; i++)
- {
- ctx.levels[i] = leveldata + i * (width + 2);
- ctx.levels[i][0] = '\0';
- }
-
- (void) dispnode(t->root, ht - 1, &ctx);
-
- for (i = ht; i--;)
- printf("%s\n", ctx.levels[i]);
-
- sfree(ctx.levels);
- sfree(leveldata);
-}
-
-typedef struct {
- int treedepth;
- int elemcount;
-} chkctx;
-
-int
-chknode(chkctx * ctx, int level, node234 * node,
- void *lowbound, void *highbound)
-{
- int nkids, nelems;
- int i;
- int count;
-
- /* Count the non-NULL kids. */
- for (nkids = 0; nkids < 4 && node->kids[nkids]; nkids++);
- /* Ensure no kids beyond the first NULL are non-NULL. */
- for (i = nkids; i < 4; i++)
- if (node->kids[i])
- {
- error("node %p: nkids=%d but kids[%d] non-NULL", node, nkids, i);
- } else if (node->counts[i])
- {
- error("node %p: kids[%d] NULL but count[%d]=%d nonzero",
- node, i, i, node->counts[i]);
- }
-
- /* Count the non-NULL elements. */
- for (nelems = 0; nelems < 3 && node->elems[nelems]; nelems++);
- /* Ensure no elements beyond the first NULL are non-NULL. */
- for (i = nelems; i < 3; i++)
- if (node->elems[i])
- {
- error("node %p: nelems=%d but elems[%d] non-NULL", node, nelems, i);
- }
-
- if (nkids == 0)
- {
- /*
- * If nkids==0, this is a leaf node; verify that the tree
- * depth is the same everywhere.
- */
- if (ctx->treedepth < 0)
- ctx->treedepth = level; /* we didn't know the depth yet */
- else if (ctx->treedepth != level)
- error("node %p: leaf at depth %d, previously seen depth %d",
- node, level, ctx->treedepth);
- } else
- {
- /*
- * If nkids != 0, then it should be nelems+1, unless nelems
- * is 0 in which case nkids should also be 0 (and so we
- * shouldn't be in this condition at all).
- */
- int shouldkids = (nelems ? nelems + 1 : 0);
- if (nkids != shouldkids)
- {
- error("node %p: %d elems should mean %d kids but has %d",
- node, nelems, shouldkids, nkids);
- }
- }
-
- /*
- * nelems should be at least 1.
- */
- if (nelems == 0)
- {
- error("node %p: no elems", node, nkids);
- }
-
- /*
- * Add nelems to the running element count of the whole tree.
- */
- ctx->elemcount += nelems;
-
- /*
- * Check ordering property: all elements should be strictly >
- * lowbound, strictly < highbound, and strictly < each other in
- * sequence. (lowbound and highbound are NULL at edges of tree
- * - both NULL at root node - and NULL is considered to be <
- * everything and > everything. IYSWIM.)
- */
- if (cmp)
- {
- for (i = -1; i < nelems; i++)
- {
- void *lower = (i == -1 ? lowbound : node->elems[i]);
- void *higher = (i + 1 == nelems ? highbound : node->elems[i + 1]);
- if (lower && higher && cmp(lower, higher) >= 0)
- {
- error("node %p: kid comparison [%d=%s,%d=%s] failed",
- node, i, lower, i + 1, higher);
- }
- }
- }
-
- /*
- * Check parent pointers: all non-NULL kids should have a
- * parent pointer coming back to this node.
- */
- for (i = 0; i < nkids; i++)
- if (node->kids[i]->parent != node)
- {
- error("node %p kid %d: parent ptr is %p not %p",
- node, i, node->kids[i]->parent, node);
- }
-
-
- /*
- * Now (finally!) recurse into subtrees.
- */
- count = nelems;
-
- for (i = 0; i < nkids; i++)
- {
- void *lower = (i == 0 ? lowbound : node->elems[i - 1]);
- void *higher = (i >= nelems ? highbound : node->elems[i]);
- int subcount = chknode(ctx, level + 1, node->kids[i], lower, higher);
- if (node->counts[i] != subcount)
- {
- error("node %p kid %d: count says %d, subtree really has %d",
- node, i, node->counts[i], subcount);
- }
- count += subcount;
- }
-
- return count;
-}
-
-void verifytree(tree234 * tree, void **array, int arraylen)
-{
- chkctx ctx;
- int i;
- void *p;
-
- ctx.treedepth = -1; /* depth unknown yet */
- ctx.elemcount = 0; /* no elements seen yet */
- /*
- * Verify validity of tree properties.
- */
- if (tree->root)
- {
- if (tree->root->parent != NULL)
- error("root->parent is %p should be null", tree->root->parent);
- chknode(&ctx, 0, tree->root, NULL, NULL);
- }
- printf("tree depth: %d\n", ctx.treedepth);
- /*
- * Enumerate the tree and ensure it matches up to the array.
- */
- for (i = 0; NULL != (p = index234(tree, i)); i++)
- {
- if (i >= arraylen)
- error("tree contains more than %d elements", arraylen);
- if (array[i] != p)
- error("enum at position %d: array says %s, tree says %s",
- i, array[i], p);
- }
- if (ctx.elemcount != i)
- {
- error("tree really contains %d elements, enum gave %d",
- ctx.elemcount, i);
- }
- if (i < arraylen)
- {
- error("enum gave only %d elements, array has %d", i, arraylen);
- }
- i = count234(tree);
- if (ctx.elemcount != i)
- {
- error("tree really contains %d elements, count234 gave %d",
- ctx.elemcount, i);
- }
-}
-void verify(void)
-{
- verifytree(tree, array, arraylen);
-}
-
-void internal_addtest(void *elem, int index, void *realret)
-{
- int i, j;
- void *retval;
-
- if (arraysize < arraylen + 1)
- {
- arraysize = arraylen + 1 + 256;
- array = (array == NULL ? smalloc(arraysize * sizeof(*array)) :
- srealloc(array, arraysize * sizeof(*array)));
- }
-
- i = index;
- /* now i points to the first element >= elem */
- retval = elem; /* expect elem returned (success) */
- for (j = arraylen; j > i; j--)
- array[j] = array[j - 1];
- array[i] = elem; /* add elem to array */
- arraylen++;
-
- if (realret != retval)
- {
- error("add: retval was %p expected %p", realret, retval);
- }
-
- verify();
-}
-
-void addtest(void *elem)
-{
- int i;
- void *realret;
-
- realret = add234(tree, elem);
-
- i = 0;
- while (i < arraylen && cmp(elem, array[i]) > 0)
- i++;
- if (i < arraylen && !cmp(elem, array[i]))
- {
- void *retval = array[i]; /* expect that returned not elem */
- if (realret != retval)
- {
- error("add: retval was %p expected %p", realret, retval);
- }
- } else
- internal_addtest(elem, i, realret);
-}
-
-void addpostest(void *elem, int i)
-{
- void *realret;
-
- realret = addpos234(tree, elem, i);
-
- internal_addtest(elem, i, realret);
-}
-
-void delpostest(int i)
-{
- int index = i;
- void *elem = array[i], *ret;
-
- /* i points to the right element */
- while (i < arraylen - 1)
- {
- array[i] = array[i + 1];
- i++;
- }
- arraylen--; /* delete elem from array */
-
- if (tree->cmp)
- ret = del234(tree, elem);
- else
- ret = delpos234(tree, index);
-
- if (ret != elem)
- {
- error("del returned %p, expected %p", ret, elem);
- }
-
- verify();
-}
-
-void deltest(void *elem)
-{
- int i;
-
- i = 0;
- while (i < arraylen && cmp(elem, array[i]) > 0)
- i++;
- if (i >= arraylen || cmp(elem, array[i]) != 0)
- return; /* don't do it! */
- delpostest(i);
-}
-
-/* A sample data set and test utility. Designed for pseudo-randomness,
- * and yet repeatability. */
-
-/*
- * This random number generator uses the `portable implementation'
- * given in ANSI C99 draft N869. It assumes `unsigned' is 32 bits;
- * change it if not.
- */
-int randomnumber(unsigned *seed)
-{
- *seed *= 1103515245;
- *seed += 12345;
- return ((*seed) / 65536) % 32768;
-}
-
-int mycmp(void *av, void *bv)
-{
- char const *a = (char const *) av;
- char const *b = (char const *) bv;
- return strcmp(a, b);
-}
-
-#define lenof(x) ( sizeof((x)) / sizeof(*(x)) )
-
-char *strings[] = {
- "0", "2", "3", "I", "K", "d", "H", "J", "Q", "N", "n", "q", "j", "i",
- "7", "G", "F", "D", "b", "x", "g", "B", "e", "v", "V", "T", "f", "E",
- "S", "8", "A", "k", "X", "p", "C", "R", "a", "o", "r", "O", "Z", "u",
- "6", "1", "w", "L", "P", "M", "c", "U", "h", "9", "t", "5", "W", "Y",
- "m", "s", "l", "4",
-#if 0
- "a", "ab", "absque", "coram", "de",
- "palam", "clam", "cum", "ex", "e",
- "sine", "tenus", "pro", "prae",
- "banana", "carrot", "cabbage", "broccoli", "onion", "zebra",
- "penguin", "blancmange", "pangolin", "whale", "hedgehog",
- "giraffe", "peanut", "bungee", "foo", "bar", "baz", "quux",
- "murfl", "spoo", "breen", "flarn", "octothorpe",
- "snail", "tiger", "elephant", "octopus", "warthog", "armadillo",
- "aardvark", "wyvern", "dragon", "elf", "dwarf", "orc", "goblin",
- "pixie", "basilisk", "warg", "ape", "lizard", "newt", "shopkeeper",
- "wand", "ring", "amulet"
-#endif
-};
-
-#define NSTR lenof(strings)
-
-void findtest(void)
-{
- static const int rels[] = {
- REL234_EQ, REL234_GE, REL234_LE, REL234_LT, REL234_GT
- };
- static const char *const relnames[] = {
- "EQ", "GE", "LE", "LT", "GT"
- };
- int i, j, rel, index;
- char *p, *ret, *realret, *realret2;
- int lo, hi, mid, c;
-
- for (i = 0; i < (int) NSTR; i++)
- {
- p = strings[i];
- for (j = 0; j < (int) (sizeof(rels) / sizeof(*rels)); j++)
- {
- rel = rels[j];
-
- lo = 0;
- hi = arraylen - 1;
- while (lo <= hi)
- {
- mid = (lo + hi) / 2;
- c = strcmp(p, array[mid]);
- if (c < 0)
- hi = mid - 1;
- else if (c > 0)
- lo = mid + 1;
- else
- break;
- }
-
- if (c == 0)
- {
- if (rel == REL234_LT)
- ret = (mid > 0 ? array[--mid] : NULL);
- else if (rel == REL234_GT)
- ret = (mid < arraylen - 1 ? array[++mid] : NULL);
- else
- ret = array[mid];
- } else
- {
- assert(lo == hi + 1);
- if (rel == REL234_LT || rel == REL234_LE)
- {
- mid = hi;
- ret = (hi >= 0 ? array[hi] : NULL);
- } else if (rel == REL234_GT || rel == REL234_GE)
- {
- mid = lo;
- ret = (lo < arraylen ? array[lo] : NULL);
- } else
- ret = NULL;
- }
-
- realret = findrelpos234(tree, p, NULL, rel, &index);
- if (realret != ret)
- {
- error("find(\"%s\",%s) gave %s should be %s",
- p, relnames[j], realret, ret);
- }
- if (realret && index != mid)
- {
- error("find(\"%s\",%s) gave %d should be %d",
- p, relnames[j], index, mid);
- }
- if (realret && rel == REL234_EQ)
- {
- realret2 = index234(tree, index);
- if (realret2 != realret)
- {
- error("find(\"%s\",%s) gave %s(%d) but %d -> %s",
- p, relnames[j], realret, index, index, realret2);
- }
- }
-#if 0
- printf("find(\"%s\",%s) gave %s(%d)\n", p, relnames[j],
- realret, index);
-#endif
- }
- }
-
- realret = findrelpos234(tree, NULL, NULL, REL234_GT, &index);
- if (arraylen && (realret != array[0] || index != 0))
- {
- error("find(NULL,GT) gave %s(%d) should be %s(0)",
- realret, index, array[0]);
- } else if (!arraylen && (realret != NULL))
- {
- error("find(NULL,GT) gave %s(%d) should be NULL", realret, index);
- }
-
- realret = findrelpos234(tree, NULL, NULL, REL234_LT, &index);
- if (arraylen
- && (realret != array[arraylen - 1] || index != arraylen - 1))
- {
- error("find(NULL,LT) gave %s(%d) should be %s(0)", realret, index,
- array[arraylen - 1]);
- } else if (!arraylen && (realret != NULL))
- {
- error("find(NULL,LT) gave %s(%d) should be NULL", realret, index);
- }
-}
-
-void splittest(tree234 * tree, void **array, int arraylen)
-{
- int i;
- tree234 *tree3, *tree4;
- for (i = 0; i <= arraylen; i++)
- {
- tree3 = copytree234(tree, NULL, NULL);
- tree4 = splitpos234(tree3, i, 0);
- verifytree(tree3, array, i);
- verifytree(tree4, array + i, arraylen - i);
- join234(tree3, tree4);
- freetree234(tree4); /* left empty by join */
- verifytree(tree3, array, arraylen);
- freetree234(tree3);
- }
-}
-
-int main(void)
-{
- int in[NSTR];
- int i, j, k;
- int tworoot, tmplen;
- unsigned seed = 0;
- tree234 *tree2, *tree3, *tree4;
- int c;
-
- setvbuf(stdout, NULL, _IOLBF, 0);
-
- for (i = 0; i < (int) NSTR; i++)
- in[i] = 0;
- array = NULL;
- arraylen = arraysize = 0;
- tree = newtree234(mycmp);
- cmp = mycmp;
-
- verify();
- for (i = 0; i < 10000; i++)
- {
- j = randomnumber(&seed);
- j %= NSTR;
- printf("trial: %d\n", i);
- if (in[j])
- {
- printf("deleting %s (%d)\n", strings[j], j);
- deltest(strings[j]);
- in[j] = 0;
- } else
- {
- printf("adding %s (%d)\n", strings[j], j);
- addtest(strings[j]);
- in[j] = 1;
- }
- disptree(tree);
- findtest();
- }
-
- while (arraylen > 0)
- {
- j = randomnumber(&seed);
- j %= arraylen;
- deltest(array[j]);
- }
-
- freetree234(tree);
-
- /*
- * Now try an unsorted tree. We don't really need to test
- * delpos234 because we know del234 is based on it, so it's
- * already been tested in the above sorted-tree code; but for
- * completeness we'll use it to tear down our unsorted tree
- * once we've built it.
- */
- tree = newtree234(NULL);
- cmp = NULL;
- verify();
- for (i = 0; i < 1000; i++)
- {
- printf("trial: %d\n", i);
- j = randomnumber(&seed);
- j %= NSTR;
- k = randomnumber(&seed);
- k %= count234(tree) + 1;
- printf("adding string %s at index %d\n", strings[j], k);
- addpostest(strings[j], k);
- }
-
- /*
- * While we have this tree in its full form, we'll take a copy
- * of it to use in split and join testing.
- */
- tree2 = copytree234(tree, NULL, NULL);
- verifytree(tree2, array, arraylen); /* check the copy is accurate */
- /*
- * Split tests. Split the tree at every possible point and
- * check the resulting subtrees.
- */
- tworoot = (!tree2->root->elems[1]); /* see if it has a 2-root */
- splittest(tree2, array, arraylen);
- /*
- * Now do the split test again, but on a tree that has a 2-root
- * (if the previous one didn't) or doesn't (if the previous one
- * did).
- */
- tmplen = arraylen;
- while ((!tree2->root->elems[1]) == tworoot)
- {
- delpos234(tree2, --tmplen);
- }
- printf("now trying splits on second tree\n");
- splittest(tree2, array, tmplen);
- freetree234(tree2);
-
- /*
- * Back to the main testing of uncounted trees.
- */
- while (count234(tree) > 0)
- {
- printf("cleanup: tree size %d\n", count234(tree));
- j = randomnumber(&seed);
- j %= count234(tree);
- printf("deleting string %s from index %d\n", (char *) array[j], j);
- delpostest(j);
- }
- freetree234(tree);
-
- /*
- * Finally, do some testing on split/join on _sorted_ trees. At
- * the same time, we'll be testing split on very small trees.
- */
- tree = newtree234(mycmp);
- cmp = mycmp;
- arraylen = 0;
- for (i = 0; i < 16; i++)
- {
- addtest(strings[i]);
- tree2 = copytree234(tree, NULL, NULL);
- splittest(tree2, array, arraylen);
- freetree234(tree2);
- }
- freetree234(tree);
-
- /*
- * Test silly cases of join: join(emptytree, emptytree), and
- * also ensure join correctly spots when sorted trees fail the
- * ordering constraint.
- */
- tree = newtree234(mycmp);
- tree2 = newtree234(mycmp);
- tree3 = newtree234(mycmp);
- tree4 = newtree234(mycmp);
- assert(mycmp(strings[0], strings[1]) < 0); /* just in case :-) */
- add234(tree2, strings[1]);
- add234(tree4, strings[0]);
- array[0] = strings[0];
- array[1] = strings[1];
- verifytree(tree, array, 0);
- verifytree(tree2, array + 1, 1);
- verifytree(tree3, array, 0);
- verifytree(tree4, array, 1);
-
- /*
- * So:
- * - join(tree,tree3) should leave both tree and tree3 unchanged.
- * - joinr(tree,tree2) should leave both tree and tree2 unchanged.
- * - join(tree4,tree3) should leave both tree3 and tree4 unchanged.
- * - join(tree, tree2) should move the element from tree2 to tree.
- * - joinr(tree4, tree3) should move the element from tree4 to tree3.
- * - join(tree,tree3) should return NULL and leave both unchanged.
- * - join(tree3,tree) should work and create a bigger tree in tree3.
- */
- assert(tree == join234(tree, tree3));
- verifytree(tree, array, 0);
- verifytree(tree3, array, 0);
- assert(tree2 == join234r(tree, tree2));
- verifytree(tree, array, 0);
- verifytree(tree2, array + 1, 1);
- assert(tree4 == join234(tree4, tree3));
- verifytree(tree3, array, 0);
- verifytree(tree4, array, 1);
- assert(tree == join234(tree, tree2));
- verifytree(tree, array + 1, 1);
- verifytree(tree2, array, 0);
- assert(tree3 == join234r(tree4, tree3));
- verifytree(tree3, array, 1);
- verifytree(tree4, array, 0);
- assert(NULL == join234(tree, tree3));
- verifytree(tree, array + 1, 1);
- verifytree(tree3, array, 1);
- assert(tree3 == join234(tree3, tree));
- verifytree(tree3, array, 2);
- verifytree(tree, array, 0);
-
- return 0;
-}
-
-#endif
-
-#if 0 /* sorted list of strings might be useful */
-{
-"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D",
- "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
- "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b",
- "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
- "o", "p", "q", "r", "s", "t", "u", "v", "w", "x",}
-#endif
+/*
+ * tree234.c: reasonably generic counted 2-3-4 tree routines.
+ *
+ * This file is copyright 1999-2001 Simon Tatham.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#include "tree234.h"
+
+#define smalloc malloc
+#define sfree free
+
+#define mknew(typ) ( (typ *) smalloc (sizeof (typ)) )
+
+#ifdef TEST
+#define LOG(x) (printf x)
+#else
+#define LOG(x)
+#endif
+
+typedef struct node234_Tag node234;
+
+struct tree234_Tag {
+ node234 *root;
+ cmpfn234 cmp;
+};
+
+struct node234_Tag {
+ node234 *parent;
+ node234 *kids[4];
+ int counts[4];
+ void *elems[3];
+};
+
+/*
+ * Create a 2-3-4 tree.
+ */
+tree234 *newtree234(cmpfn234 cmp)
+{
+ tree234 *ret = mknew(tree234);
+ LOG(("created tree %p\n", ret));
+ ret->root = NULL;
+ ret->cmp = cmp;
+ return ret;
+}
+
+/*
+ * Free a 2-3-4 tree (not including freeing the elements).
+ */
+static void freenode234(node234 * n)
+{
+ if (!n)
+ return;
+ freenode234(n->kids[0]);
+ freenode234(n->kids[1]);
+ freenode234(n->kids[2]);
+ freenode234(n->kids[3]);
+ sfree(n);
+}
+
+void freetree234(tree234 * t)
+{
+ freenode234(t->root);
+ sfree(t);
+}
+
+/*
+ * Internal function to count a node.
+ */
+static int countnode234(node234 * n)
+{
+ int count = 0;
+ int i;
+ if (!n)
+ return 0;
+ for (i = 0; i < 4; i++)
+ count += n->counts[i];
+ for (i = 0; i < 3; i++)
+ if (n->elems[i])
+ count++;
+ return count;
+}
+
+/*
+ * Count the elements in a tree.
+ */
+int count234(tree234 * t)
+{
+ if (t->root)
+ return countnode234(t->root);
+ else
+ return 0;
+}
+
+/*
+ * Propagate a node overflow up a tree until it stops. Returns 0 or
+ * 1, depending on whether the root had to be split or not.
+ */
+static int
+add234_insert(node234 * left, void *e, node234 * right,
+ node234 ** root, node234 * n, int ki)
+{
+ int lcount, rcount;
+ /*
+ * We need to insert the new left/element/right set in n at
+ * child position ki.
+ */
+ lcount = countnode234(left);
+ rcount = countnode234(right);
+ while (n)
+ {
+ LOG((" at %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" need to insert %p/%d \"%s\" %p/%d at position %d\n", left,
+ lcount, e, right, rcount, ki));
+ if (n->elems[1] == NULL)
+ {
+ /*
+ * Insert in a 2-node; simple.
+ */
+ if (ki == 0)
+ {
+ LOG((" inserting on left of 2-node\n"));
+ n->kids[2] = n->kids[1];
+ n->counts[2] = n->counts[1];
+ n->elems[1] = n->elems[0];
+ n->kids[1] = right;
+ n->counts[1] = rcount;
+ n->elems[0] = e;
+ n->kids[0] = left;
+ n->counts[0] = lcount;
+ } else
+ { /* ki == 1 */
+ LOG((" inserting on right of 2-node\n"));
+ n->kids[2] = right;
+ n->counts[2] = rcount;
+ n->elems[1] = e;
+ n->kids[1] = left;
+ n->counts[1] = lcount;
+ }
+ if (n->kids[0])
+ n->kids[0]->parent = n;
+ if (n->kids[1])
+ n->kids[1]->parent = n;
+ if (n->kids[2])
+ n->kids[2]->parent = n;
+ LOG((" done\n"));
+ break;
+ } else if (n->elems[2] == NULL)
+ {
+ /*
+ * Insert in a 3-node; simple.
+ */
+ if (ki == 0)
+ {
+ LOG((" inserting on left of 3-node\n"));
+ n->kids[3] = n->kids[2];
+ n->counts[3] = n->counts[2];
+ n->elems[2] = n->elems[1];
+ n->kids[2] = n->kids[1];
+ n->counts[2] = n->counts[1];
+ n->elems[1] = n->elems[0];
+ n->kids[1] = right;
+ n->counts[1] = rcount;
+ n->elems[0] = e;
+ n->kids[0] = left;
+ n->counts[0] = lcount;
+ } else if (ki == 1)
+ {
+ LOG((" inserting in middle of 3-node\n"));
+ n->kids[3] = n->kids[2];
+ n->counts[3] = n->counts[2];
+ n->elems[2] = n->elems[1];
+ n->kids[2] = right;
+ n->counts[2] = rcount;
+ n->elems[1] = e;
+ n->kids[1] = left;
+ n->counts[1] = lcount;
+ } else
+ { /* ki == 2 */
+ LOG((" inserting on right of 3-node\n"));
+ n->kids[3] = right;
+ n->counts[3] = rcount;
+ n->elems[2] = e;
+ n->kids[2] = left;
+ n->counts[2] = lcount;
+ }
+ if (n->kids[0])
+ n->kids[0]->parent = n;
+ if (n->kids[1])
+ n->kids[1]->parent = n;
+ if (n->kids[2])
+ n->kids[2]->parent = n;
+ if (n->kids[3])
+ n->kids[3]->parent = n;
+ LOG((" done\n"));
+ break;
+ } else
+ {
+ node234 *m = mknew(node234);
+ m->parent = n->parent;
+ LOG((" splitting a 4-node; created new node %p\n", m));
+ /*
+ * Insert in a 4-node; split into a 2-node and a
+ * 3-node, and move focus up a level.
+ *
+ * I don't think it matters which way round we put the
+ * 2 and the 3. For simplicity, we'll put the 3 first
+ * always.
+ */
+ if (ki == 0)
+ {
+ m->kids[0] = left;
+ m->counts[0] = lcount;
+ m->elems[0] = e;
+ m->kids[1] = right;
+ m->counts[1] = rcount;
+ m->elems[1] = n->elems[0];
+ m->kids[2] = n->kids[1];
+ m->counts[2] = n->counts[1];
+ e = n->elems[1];
+ n->kids[0] = n->kids[2];
+ n->counts[0] = n->counts[2];
+ n->elems[0] = n->elems[2];
+ n->kids[1] = n->kids[3];
+ n->counts[1] = n->counts[3];
+ } else if (ki == 1)
+ {
+ m->kids[0] = n->kids[0];
+ m->counts[0] = n->counts[0];
+ m->elems[0] = n->elems[0];
+ m->kids[1] = left;
+ m->counts[1] = lcount;
+ m->elems[1] = e;
+ m->kids[2] = right;
+ m->counts[2] = rcount;
+ e = n->elems[1];
+ n->kids[0] = n->kids[2];
+ n->counts[0] = n->counts[2];
+ n->elems[0] = n->elems[2];
+ n->kids[1] = n->kids[3];
+ n->counts[1] = n->counts[3];
+ } else if (ki == 2)
+ {
+ m->kids[0] = n->kids[0];
+ m->counts[0] = n->counts[0];
+ m->elems[0] = n->elems[0];
+ m->kids[1] = n->kids[1];
+ m->counts[1] = n->counts[1];
+ m->elems[1] = n->elems[1];
+ m->kids[2] = left;
+ m->counts[2] = lcount;
+ /* e = e; */
+ n->kids[0] = right;
+ n->counts[0] = rcount;
+ n->elems[0] = n->elems[2];
+ n->kids[1] = n->kids[3];
+ n->counts[1] = n->counts[3];
+ } else
+ { /* ki == 3 */
+ m->kids[0] = n->kids[0];
+ m->counts[0] = n->counts[0];
+ m->elems[0] = n->elems[0];
+ m->kids[1] = n->kids[1];
+ m->counts[1] = n->counts[1];
+ m->elems[1] = n->elems[1];
+ m->kids[2] = n->kids[2];
+ m->counts[2] = n->counts[2];
+ n->kids[0] = left;
+ n->counts[0] = lcount;
+ n->elems[0] = e;
+ n->kids[1] = right;
+ n->counts[1] = rcount;
+ e = n->elems[2];
+ }
+ m->kids[3] = n->kids[3] = n->kids[2] = NULL;
+ m->counts[3] = n->counts[3] = n->counts[2] = 0;
+ m->elems[2] = n->elems[2] = n->elems[1] = NULL;
+ if (m->kids[0])
+ m->kids[0]->parent = m;
+ if (m->kids[1])
+ m->kids[1]->parent = m;
+ if (m->kids[2])
+ m->kids[2]->parent = m;
+ if (n->kids[0])
+ n->kids[0]->parent = n;
+ if (n->kids[1])
+ n->kids[1]->parent = n;
+ LOG((" left (%p): %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", m,
+ m->kids[0], m->counts[0], m->elems[0],
+ m->kids[1], m->counts[1], m->elems[1],
+ m->kids[2], m->counts[2]));
+ LOG((" right (%p): %p/%d \"%s\" %p/%d\n", n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1]));
+ left = m;
+ lcount = countnode234(left);
+ right = n;
+ rcount = countnode234(right);
+ }
+ if (n->parent)
+ ki = (n->parent->kids[0] == n ? 0 :
+ n->parent->kids[1] == n ? 1 : n->parent->kids[2] == n ? 2 : 3);
+ n = n->parent;
+ }
+
+ /*
+ * If we've come out of here by `break', n will still be
+ * non-NULL and all we need to do is go back up the tree
+ * updating counts. If we've come here because n is NULL, we
+ * need to create a new root for the tree because the old one
+ * has just split into two. */
+ if (n)
+ {
+ while (n->parent)
+ {
+ int count = countnode234(n);
+ int childnum;
+ childnum = (n->parent->kids[0] == n ? 0 :
+ n->parent->kids[1] == n ? 1 :
+ n->parent->kids[2] == n ? 2 : 3);
+ n->parent->counts[childnum] = count;
+ n = n->parent;
+ }
+ return 0; /* root unchanged */
+ } else
+ {
+ LOG((" root is overloaded, split into two\n"));
+ (*root) = mknew(node234);
+ (*root)->kids[0] = left;
+ (*root)->counts[0] = lcount;
+ (*root)->elems[0] = e;
+ (*root)->kids[1] = right;
+ (*root)->counts[1] = rcount;
+ (*root)->elems[1] = NULL;
+ (*root)->kids[2] = NULL;
+ (*root)->counts[2] = 0;
+ (*root)->elems[2] = NULL;
+ (*root)->kids[3] = NULL;
+ (*root)->counts[3] = 0;
+ (*root)->parent = NULL;
+ if ((*root)->kids[0])
+ (*root)->kids[0]->parent = (*root);
+ if ((*root)->kids[1])
+ (*root)->kids[1]->parent = (*root);
+ LOG((" new root is %p/%d \"%s\" %p/%d\n",
+ (*root)->kids[0], (*root)->counts[0],
+ (*root)->elems[0], (*root)->kids[1], (*root)->counts[1]));
+ return 1; /* root moved */
+ }
+}
+
+/*
+ * Add an element e to a 2-3-4 tree t. Returns e on success, or if
+ * an existing element compares equal, returns that.
+ */
+static void *add234_internal(tree234 * t, void *e, int index)
+{
+ node234 *n;
+ int ki;
+ void *orig_e = e;
+ int c;
+
+ LOG(("adding element \"%s\" to tree %p\n", e, t));
+ if (t->root == NULL)
+ {
+ t->root = mknew(node234);
+ t->root->elems[1] = t->root->elems[2] = NULL;
+ t->root->kids[0] = t->root->kids[1] = NULL;
+ t->root->kids[2] = t->root->kids[3] = NULL;
+ t->root->counts[0] = t->root->counts[1] = 0;
+ t->root->counts[2] = t->root->counts[3] = 0;
+ t->root->parent = NULL;
+ t->root->elems[0] = e;
+ LOG((" created root %p\n", t->root));
+ return orig_e;
+ }
+
+ n = t->root;
+ while (n)
+ {
+ LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ if (index >= 0)
+ {
+ if (!n->kids[0])
+ {
+ /*
+ * Leaf node. We want to insert at kid position
+ * equal to the index:
+ *
+ * 0 A 1 B 2 C 3
+ */
+ ki = index;
+ } else
+ {
+ /*
+ * Internal node. We always descend through it (add
+ * always starts at the bottom, never in the
+ * middle).
+ */
+ if (index <= n->counts[0])
+ {
+ ki = 0;
+ } else if (index -= n->counts[0] + 1, index <= n->counts[1])
+ {
+ ki = 1;
+ } else if (index -= n->counts[1] + 1, index <= n->counts[2])
+ {
+ ki = 2;
+ } else if (index -= n->counts[2] + 1, index <= n->counts[3])
+ {
+ ki = 3;
+ } else
+ return NULL; /* error: index out of range */
+ }
+ } else
+ {
+ if ((c = t->cmp(e, n->elems[0])) < 0)
+ ki = 0;
+ else if (c == 0)
+ return n->elems[0]; /* already exists */
+ else if (n->elems[1] == NULL || (c = t->cmp(e, n->elems[1])) < 0)
+ ki = 1;
+ else if (c == 0)
+ return n->elems[1]; /* already exists */
+ else if (n->elems[2] == NULL || (c = t->cmp(e, n->elems[2])) < 0)
+ ki = 2;
+ else if (c == 0)
+ return n->elems[2]; /* already exists */
+ else
+ ki = 3;
+ }
+ LOG((" moving to child %d (%p)\n", ki, n->kids[ki]));
+ if (!n->kids[ki])
+ break;
+ n = n->kids[ki];
+ }
+
+ add234_insert(NULL, e, NULL, &t->root, n, ki);
+
+ return orig_e;
+}
+
+void *add234(tree234 * t, void *e)
+{
+ if (!t->cmp) /* tree is unsorted */
+ return NULL;
+
+ return add234_internal(t, e, -1);
+}
+
+void *addpos234(tree234 * t, void *e, int index)
+{
+ if (index < 0 || /* index out of range */
+ t->cmp) /* tree is sorted */
+ return NULL; /* return failure */
+
+ return add234_internal(t, e, index); /* this checks the upper bound */
+}
+
+/*
+ * Look up the element at a given numeric index in a 2-3-4 tree.
+ * Returns NULL if the index is out of range.
+ */
+void *index234(tree234 * t, int index)
+{
+ node234 *n;
+
+ if (!t->root)
+ return NULL; /* tree is empty */
+
+ if (index < 0 || index >= countnode234(t->root))
+ return NULL; /* out of range */
+
+ n = t->root;
+
+ while (n)
+ {
+ if (index < n->counts[0])
+ n = n->kids[0];
+ else if (index -= n->counts[0] + 1, index < 0)
+ return n->elems[0];
+ else if (index < n->counts[1])
+ n = n->kids[1];
+ else if (index -= n->counts[1] + 1, index < 0)
+ return n->elems[1];
+ else if (index < n->counts[2])
+ n = n->kids[2];
+ else if (index -= n->counts[2] + 1, index < 0)
+ return n->elems[2];
+ else
+ n = n->kids[3];
+ }
+
+ /* We shouldn't ever get here. I wonder how we did. */
+ return NULL;
+}
+
+/*
+ * Find an element e in a sorted 2-3-4 tree t. Returns NULL if not
+ * found. e is always passed as the first argument to cmp, so cmp
+ * can be an asymmetric function if desired. cmp can also be passed
+ * as NULL, in which case the compare function from the tree proper
+ * will be used.
+ */
+void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp, int relation,
+ int *index)
+{
+ node234 *n;
+ void *ret;
+ int c;
+ int idx, ecount, kcount, cmpret;
+
+ if (t->root == NULL)
+ return NULL;
+
+ if (cmp == NULL)
+ cmp = t->cmp;
+
+ n = t->root;
+ /*
+ * Attempt to find the element itself.
+ */
+ idx = 0;
+ ecount = -1;
+ /*
+ * Prepare a fake `cmp' result if e is NULL.
+ */
+ cmpret = 0;
+ if (e == NULL)
+ {
+ assert(relation == REL234_LT || relation == REL234_GT);
+ if (relation == REL234_LT)
+ cmpret = +1; /* e is a max: always greater */
+ else if (relation == REL234_GT)
+ cmpret = -1; /* e is a min: always smaller */
+ }
+ while (1)
+ {
+ for (kcount = 0; kcount < 4; kcount++)
+ {
+ if (kcount >= 3 || n->elems[kcount] == NULL ||
+ (c = cmpret ? cmpret : cmp(e, n->elems[kcount])) < 0)
+ {
+ break;
+ }
+ if (n->kids[kcount])
+ idx += n->counts[kcount];
+ if (c == 0)
+ {
+ ecount = kcount;
+ break;
+ }
+ idx++;
+ }
+ if (ecount >= 0)
+ break;
+ if (n->kids[kcount])
+ n = n->kids[kcount];
+ else
+ break;
+ }
+
+ if (ecount >= 0)
+ {
+ /*
+ * We have found the element we're looking for. It's
+ * n->elems[ecount], at tree index idx. If our search
+ * relation is EQ, LE or GE we can now go home.
+ */
+ if (relation != REL234_LT && relation != REL234_GT)
+ {
+ if (index)
+ *index = idx;
+ return n->elems[ecount];
+ }
+
+ /*
+ * Otherwise, we'll do an indexed lookup for the previous
+ * or next element. (It would be perfectly possible to
+ * implement these search types in a non-counted tree by
+ * going back up from where we are, but far more fiddly.)
+ */
+ if (relation == REL234_LT)
+ idx--;
+ else
+ idx++;
+ } else
+ {
+ /*
+ * We've found our way to the bottom of the tree and we
+ * know where we would insert this node if we wanted to:
+ * we'd put it in in place of the (empty) subtree
+ * n->kids[kcount], and it would have index idx
+ *
+ * But the actual element isn't there. So if our search
+ * relation is EQ, we're doomed.
+ */
+ if (relation == REL234_EQ)
+ return NULL;
+
+ /*
+ * Otherwise, we must do an index lookup for index idx-1
+ * (if we're going left - LE or LT) or index idx (if we're
+ * going right - GE or GT).
+ */
+ if (relation == REL234_LT || relation == REL234_LE)
+ {
+ idx--;
+ }
+ }
+
+ /*
+ * We know the index of the element we want; just call index234
+ * to do the rest. This will return NULL if the index is out of
+ * bounds, which is exactly what we want.
+ */
+ ret = index234(t, idx);
+ if (ret && index)
+ *index = idx;
+ return ret;
+}
+
+void *find234(tree234 * t, void *e, cmpfn234 cmp)
+{
+ return findrelpos234(t, e, cmp, REL234_EQ, NULL);
+}
+
+void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation)
+{
+ return findrelpos234(t, e, cmp, relation, NULL);
+}
+
+void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index)
+{
+ return findrelpos234(t, e, cmp, REL234_EQ, index);
+}
+
+/*
+ * Tree transformation used in delete and split: move a subtree
+ * right, from child ki of a node to the next child. Update k and
+ * index so that they still point to the same place in the
+ * transformed tree. Assumes the destination child is not full, and
+ * that the source child does have a subtree to spare. Can cope if
+ * the destination child is undersized.
+ *
+ * . C . . B .
+ * / \ -> / \
+ * [more] a A b B c d D e [more] a A b c C d D e
+ *
+ * . C . . B .
+ * / \ -> / \
+ * [more] a A b B c d [more] a A b c C d
+ */
+static void trans234_subtree_right(node234 * n, int ki, int *k, int *index)
+{
+ node234 *src, *dest;
+ int i, srclen, adjust;
+
+ src = n->kids[ki];
+ dest = n->kids[ki + 1];
+
+ LOG((" trans234_subtree_right(%p, %d):\n", n, ki));
+ LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ src,
+ src->kids[0], src->counts[0], src->elems[0],
+ src->kids[1], src->counts[1], src->elems[1],
+ src->kids[2], src->counts[2], src->elems[2],
+ src->kids[3], src->counts[3]));
+ LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ dest,
+ dest->kids[0], dest->counts[0], dest->elems[0],
+ dest->kids[1], dest->counts[1], dest->elems[1],
+ dest->kids[2], dest->counts[2], dest->elems[2],
+ dest->kids[3], dest->counts[3]));
+ /*
+ * Move over the rest of the destination node to make space.
+ */
+ dest->kids[3] = dest->kids[2];
+ dest->counts[3] = dest->counts[2];
+ dest->elems[2] = dest->elems[1];
+ dest->kids[2] = dest->kids[1];
+ dest->counts[2] = dest->counts[1];
+ dest->elems[1] = dest->elems[0];
+ dest->kids[1] = dest->kids[0];
+ dest->counts[1] = dest->counts[0];
+
+ /* which element to move over */
+ i = (src->elems[2] ? 2 : src->elems[1] ? 1 : 0);
+
+ dest->elems[0] = n->elems[ki];
+ n->elems[ki] = src->elems[i];
+ src->elems[i] = NULL;
+
+ dest->kids[0] = src->kids[i + 1];
+ dest->counts[0] = src->counts[i + 1];
+ src->kids[i + 1] = NULL;
+ src->counts[i + 1] = 0;
+
+ if (dest->kids[0])
+ dest->kids[0]->parent = dest;
+
+ adjust = dest->counts[0] + 1;
+
+ n->counts[ki] -= adjust;
+ n->counts[ki + 1] += adjust;
+
+ srclen = n->counts[ki];
+
+ if (k)
+ {
+ LOG((" before: k,index = %d,%d\n", (*k), (*index)));
+ if ((*k) == ki && (*index) > srclen)
+ {
+ (*index) -= srclen + 1;
+ (*k)++;
+ } else if ((*k) == ki + 1)
+ {
+ (*index) += adjust;
+ }
+ LOG((" after: k,index = %d,%d\n", (*k), (*index)));
+ }
+
+ LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ src,
+ src->kids[0], src->counts[0], src->elems[0],
+ src->kids[1], src->counts[1], src->elems[1],
+ src->kids[2], src->counts[2], src->elems[2],
+ src->kids[3], src->counts[3]));
+ LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ dest,
+ dest->kids[0], dest->counts[0], dest->elems[0],
+ dest->kids[1], dest->counts[1], dest->elems[1],
+ dest->kids[2], dest->counts[2], dest->elems[2],
+ dest->kids[3], dest->counts[3]));
+}
+
+/*
+ * Tree transformation used in delete and split: move a subtree
+ * left, from child ki of a node to the previous child. Update k
+ * and index so that they still point to the same place in the
+ * transformed tree. Assumes the destination child is not full, and
+ * that the source child does have a subtree to spare. Can cope if
+ * the destination child is undersized.
+ *
+ * . B . . C .
+ * / \ -> / \
+ * a A b c C d D e [more] a A b B c d D e [more]
+ *
+ * . A . . B .
+ * / \ -> / \
+ * a b B c C d [more] a A b c C d [more]
+ */
+static void trans234_subtree_left(node234 * n, int ki, int *k, int *index)
+{
+ node234 *src, *dest;
+ int i, adjust;
+
+ src = n->kids[ki];
+ dest = n->kids[ki - 1];
+
+ LOG((" trans234_subtree_left(%p, %d):\n", n, ki));
+ LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ dest,
+ dest->kids[0], dest->counts[0], dest->elems[0],
+ dest->kids[1], dest->counts[1], dest->elems[1],
+ dest->kids[2], dest->counts[2], dest->elems[2],
+ dest->kids[3], dest->counts[3]));
+ LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ src,
+ src->kids[0], src->counts[0], src->elems[0],
+ src->kids[1], src->counts[1], src->elems[1],
+ src->kids[2], src->counts[2], src->elems[2],
+ src->kids[3], src->counts[3]));
+
+ /* where in dest to put it */
+ i = (dest->elems[1] ? 2 : dest->elems[0] ? 1 : 0);
+ dest->elems[i] = n->elems[ki - 1];
+ n->elems[ki - 1] = src->elems[0];
+
+ dest->kids[i + 1] = src->kids[0];
+ dest->counts[i + 1] = src->counts[0];
+
+ if (dest->kids[i + 1])
+ dest->kids[i + 1]->parent = dest;
+
+ /*
+ * Move over the rest of the source node.
+ */
+ src->kids[0] = src->kids[1];
+ src->counts[0] = src->counts[1];
+ src->elems[0] = src->elems[1];
+ src->kids[1] = src->kids[2];
+ src->counts[1] = src->counts[2];
+ src->elems[1] = src->elems[2];
+ src->kids[2] = src->kids[3];
+ src->counts[2] = src->counts[3];
+ src->elems[2] = NULL;
+ src->kids[3] = NULL;
+ src->counts[3] = 0;
+
+ adjust = dest->counts[i + 1] + 1;
+
+ n->counts[ki] -= adjust;
+ n->counts[ki - 1] += adjust;
+
+ if (k)
+ {
+ LOG((" before: k,index = %d,%d\n", (*k), (*index)));
+ if ((*k) == ki)
+ {
+ (*index) -= adjust;
+ if ((*index) < 0)
+ {
+ (*index) += n->counts[ki - 1] + 1;
+ (*k)--;
+ }
+ }
+ LOG((" after: k,index = %d,%d\n", (*k), (*index)));
+ }
+
+ LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" dest %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ dest,
+ dest->kids[0], dest->counts[0], dest->elems[0],
+ dest->kids[1], dest->counts[1], dest->elems[1],
+ dest->kids[2], dest->counts[2], dest->elems[2],
+ dest->kids[3], dest->counts[3]));
+ LOG((" src %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ src,
+ src->kids[0], src->counts[0], src->elems[0],
+ src->kids[1], src->counts[1], src->elems[1],
+ src->kids[2], src->counts[2], src->elems[2],
+ src->kids[3], src->counts[3]));
+}
+
+/*
+ * Tree transformation used in delete and split: merge child nodes
+ * ki and ki+1 of a node. Update k and index so that they still
+ * point to the same place in the transformed tree. Assumes both
+ * children _are_ sufficiently small.
+ *
+ * . B . .
+ * / \ -> |
+ * a A b c C d a A b B c C d
+ *
+ * This routine can also cope with either child being undersized:
+ *
+ * . A . .
+ * / \ -> |
+ * a b B c a A b B c
+ *
+ * . A . .
+ * / \ -> |
+ * a b B c C d a A b B c C d
+ */
+static void trans234_subtree_merge(node234 * n, int ki, int *k, int *index)
+{
+ node234 *left, *right;
+ int i, leftlen, rightlen, lsize, rsize;
+
+ left = n->kids[ki];
+ leftlen = n->counts[ki];
+ right = n->kids[ki + 1];
+ rightlen = n->counts[ki + 1];
+
+ LOG((" trans234_subtree_merge(%p, %d):\n", n, ki));
+ LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" left %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ left,
+ left->kids[0], left->counts[0], left->elems[0],
+ left->kids[1], left->counts[1], left->elems[1],
+ left->kids[2], left->counts[2], left->elems[2],
+ left->kids[3], left->counts[3]));
+ LOG((" right %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ right,
+ right->kids[0], right->counts[0], right->elems[0],
+ right->kids[1], right->counts[1], right->elems[1],
+ right->kids[2], right->counts[2], right->elems[2],
+ right->kids[3], right->counts[3]));
+
+ assert(!left->elems[2] && !right->elems[2]); /* neither is large! */
+ lsize = (left->elems[1] ? 2 : left->elems[0] ? 1 : 0);
+ rsize = (right->elems[1] ? 2 : right->elems[0] ? 1 : 0);
+
+ left->elems[lsize] = n->elems[ki];
+
+ for (i = 0; i < rsize + 1; i++)
+ {
+ left->kids[lsize + 1 + i] = right->kids[i];
+ left->counts[lsize + 1 + i] = right->counts[i];
+ if (left->kids[lsize + 1 + i])
+ left->kids[lsize + 1 + i]->parent = left;
+ if (i < rsize)
+ left->elems[lsize + 1 + i] = right->elems[i];
+ }
+
+ n->counts[ki] += rightlen + 1;
+
+ sfree(right);
+
+ /*
+ * Move the rest of n up by one.
+ */
+ for (i = ki + 1; i < 3; i++)
+ {
+ n->kids[i] = n->kids[i + 1];
+ n->counts[i] = n->counts[i + 1];
+ }
+ for (i = ki; i < 2; i++)
+ {
+ n->elems[i] = n->elems[i + 1];
+ }
+ n->kids[3] = NULL;
+ n->counts[3] = 0;
+ n->elems[2] = NULL;
+
+ if (k)
+ {
+ LOG((" before: k,index = %d,%d\n", (*k), (*index)));
+ if ((*k) == ki + 1)
+ {
+ (*k)--;
+ (*index) += leftlen + 1;
+ } else if ((*k) > ki + 1)
+ {
+ (*k)--;
+ }
+ LOG((" after: k,index = %d,%d\n", (*k), (*index)));
+ }
+
+ LOG((" parent %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n,
+ n->kids[0], n->counts[0], n->elems[0],
+ n->kids[1], n->counts[1], n->elems[1],
+ n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3]));
+ LOG((" merged %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ left,
+ left->kids[0], left->counts[0], left->elems[0],
+ left->kids[1], left->counts[1], left->elems[1],
+ left->kids[2], left->counts[2], left->elems[2],
+ left->kids[3], left->counts[3]));
+
+}
+
+/*
+ * Delete an element e in a 2-3-4 tree. Does not free the element,
+ * merely removes all links to it from the tree nodes.
+ */
+static void *delpos234_internal(tree234 * t, int index)
+{
+ node234 *n;
+ void *retval;
+ int ki, i;
+
+ retval = NULL;
+
+ n = t->root; /* by assumption this is non-NULL */
+ LOG(("deleting item %d from tree %p\n", index, t));
+ while (1)
+ {
+ node234 *sub;
+
+ LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d index=%d\n", n, n->kids[0], n->counts[0], n->elems[0], n->kids[1], n->counts[1], n->elems[1], n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3], index));
+ if (index <= n->counts[0])
+ {
+ ki = 0;
+ } else if (index -= n->counts[0] + 1, index <= n->counts[1])
+ {
+ ki = 1;
+ } else if (index -= n->counts[1] + 1, index <= n->counts[2])
+ {
+ ki = 2;
+ } else if (index -= n->counts[2] + 1, index <= n->counts[3])
+ {
+ ki = 3;
+ } else
+ {
+ assert(0); /* can't happen */
+ }
+
+ if (!n->kids[0])
+ break; /* n is a leaf node; we're here! */
+
+ /*
+ * Check to see if we've found our target element. If so,
+ * we must choose a new target (we'll use the old target's
+ * successor, which will be in a leaf), move it into the
+ * place of the old one, continue down to the leaf and
+ * delete the old copy of the new target.
+ */
+ if (index == n->counts[ki])
+ {
+ node234 *m;
+ LOG((" found element in internal node, index %d\n", ki));
+ assert(n->elems[ki]); /* must be a kid _before_ an element */
+ ki++;
+ index = 0;
+ for (m = n->kids[ki]; m->kids[0]; m = m->kids[0])
+ continue;
+ LOG((" replacing with element \"%s\" from leaf node %p\n",
+ m->elems[0], m));
+ retval = n->elems[ki - 1];
+ n->elems[ki - 1] = m->elems[0];
+ }
+
+ /*
+ * Recurse down to subtree ki. If it has only one element,
+ * we have to do some transformation to start with.
+ */
+ LOG((" moving to subtree %d\n", ki));
+ sub = n->kids[ki];
+ if (!sub->elems[1])
+ {
+ LOG((" subtree has only one element!\n"));
+ if (ki > 0 && n->kids[ki - 1]->elems[1])
+ {
+ /*
+ * Child ki has only one element, but child
+ * ki-1 has two or more. So we need to move a
+ * subtree from ki-1 to ki.
+ */
+ trans234_subtree_right(n, ki - 1, &ki, &index);
+ } else if (ki < 3 && n->kids[ki + 1] && n->kids[ki + 1]->elems[1])
+ {
+ /*
+ * Child ki has only one element, but ki+1 has
+ * two or more. Move a subtree from ki+1 to ki.
+ */
+ trans234_subtree_left(n, ki + 1, &ki, &index);
+ } else
+ {
+ /*
+ * ki is small with only small neighbours. Pick a
+ * neighbour and merge with it.
+ */
+ trans234_subtree_merge(n, ki > 0 ? ki - 1 : ki, &ki, &index);
+ sub = n->kids[ki];
+
+ if (!n->elems[0])
+ {
+ /*
+ * The root is empty and needs to be
+ * removed.
+ */
+ LOG((" shifting root!\n"));
+ t->root = sub;
+ sub->parent = NULL;
+ sfree(n);
+ n = NULL;
+ }
+ }
+ }
+
+ if (n)
+ n->counts[ki]--;
+ n = sub;
+ }
+
+ /*
+ * Now n is a leaf node, and ki marks the element number we
+ * want to delete. We've already arranged for the leaf to be
+ * bigger than minimum size, so let's just go to it.
+ */
+ assert(!n->kids[0]);
+ if (!retval)
+ retval = n->elems[ki];
+
+ for (i = ki; i < 2 && n->elems[i + 1]; i++)
+ n->elems[i] = n->elems[i + 1];
+ n->elems[i] = NULL;
+
+ /*
+ * It's just possible that we have reduced the leaf to zero
+ * size. This can only happen if it was the root - so destroy
+ * it and make the tree empty.
+ */
+ if (!n->elems[0])
+ {
+ LOG((" removed last element in tree, destroying empty root\n"));
+ assert(n == t->root);
+ sfree(n);
+ t->root = NULL;
+ }
+
+ return retval; /* finished! */
+}
+
+void *delpos234(tree234 * t, int index)
+{
+ if (index < 0 || index >= countnode234(t->root))
+ return NULL;
+ return delpos234_internal(t, index);
+}
+
+void *del234(tree234 * t, void *e)
+{
+ int index;
+ if (!findrelpos234(t, e, NULL, REL234_EQ, &index))
+ return NULL; /* it wasn't in there anyway */
+ return delpos234_internal(t, index); /* it's there; delete it. */
+}
+
+/*
+ * Join two subtrees together with a separator element between
+ * them, given their relative height.
+ *
+ * (Height<0 means the left tree is shorter, >0 means the right
+ * tree is shorter, =0 means (duh) they're equal.)
+ *
+ * It is assumed that any checks needed on the ordering criterion
+ * have _already_ been done.
+ *
+ * The value returned in `height' is 0 or 1 depending on whether the
+ * resulting tree is the same height as the original larger one, or
+ * one higher.
+ */
+static node234 *join234_internal(node234 * left, void *sep,
+ node234 * right, int *height)
+{
+ node234 *root, *node;
+ int relht = *height;
+ int ki;
+
+ LOG((" join: joining %p \"%s\" %p, relative height is %d\n",
+ left, sep, right, relht));
+ if (relht == 0)
+ {
+ /*
+ * The trees are the same height. Create a new one-element
+ * root containing the separator and pointers to the two
+ * nodes.
+ */
+ node234 *newroot;
+ newroot = mknew(node234);
+ newroot->kids[0] = left;
+ newroot->counts[0] = countnode234(left);
+ newroot->elems[0] = sep;
+ newroot->kids[1] = right;
+ newroot->counts[1] = countnode234(right);
+ newroot->elems[1] = NULL;
+ newroot->kids[2] = NULL;
+ newroot->counts[2] = 0;
+ newroot->elems[2] = NULL;
+ newroot->kids[3] = NULL;
+ newroot->counts[3] = 0;
+ newroot->parent = NULL;
+ if (left)
+ left->parent = newroot;
+ if (right)
+ right->parent = newroot;
+ *height = 1;
+ LOG((" join: same height, brand new root\n"));
+ return newroot;
+ }
+
+ /*
+ * This now works like the addition algorithm on the larger
+ * tree. We're replacing a single kid pointer with two kid
+ * pointers separated by an element; if that causes the node to
+ * overload, we split it in two, move a separator element up to
+ * the next node, and repeat.
+ */
+ if (relht < 0)
+ {
+ /*
+ * Left tree is shorter. Search down the right tree to find
+ * the pointer we're inserting at.
+ */
+ node = root = right;
+ while (++relht < 0)
+ {
+ node = node->kids[0];
+ }
+ ki = 0;
+ right = node->kids[ki];
+ } else
+ {
+ /*
+ * Right tree is shorter; search down the left to find the
+ * pointer we're inserting at.
+ */
+ node = root = left;
+ while (--relht > 0)
+ {
+ if (node->elems[2])
+ node = node->kids[3];
+ else if (node->elems[1])
+ node = node->kids[2];
+ else
+ node = node->kids[1];
+ }
+ if (node->elems[2])
+ ki = 3;
+ else if (node->elems[1])
+ ki = 2;
+ else
+ ki = 1;
+ left = node->kids[ki];
+ }
+
+ /*
+ * Now proceed as for addition.
+ */
+ *height = add234_insert(left, sep, right, &root, node, ki);
+
+ return root;
+}
+static int height234(tree234 * t)
+{
+ int level = 0;
+ node234 *n = t->root;
+ while (n)
+ {
+ level++;
+ n = n->kids[0];
+ }
+ return level;
+}
+
+tree234 *join234(tree234 * t1, tree234 * t2)
+{
+ int size2 = countnode234(t2->root);
+ if (size2 > 0)
+ {
+ void *element;
+ int relht;
+
+ if (t1->cmp)
+ {
+ element = index234(t2, 0);
+ element = findrelpos234(t1, element, NULL, REL234_GE, NULL);
+ if (element)
+ return NULL;
+ }
+
+ element = delpos234(t2, 0);
+ relht = height234(t1) - height234(t2);
+ t1->root = join234_internal(t1->root, element, t2->root, &relht);
+ t2->root = NULL;
+ }
+ return t1;
+}
+
+tree234 *join234r(tree234 * t1, tree234 * t2)
+{
+ int size1 = countnode234(t1->root);
+ if (size1 > 0)
+ {
+ void *element;
+ int relht;
+
+ if (t2->cmp)
+ {
+ element = index234(t1, size1 - 1);
+ element = findrelpos234(t2, element, NULL, REL234_LE, NULL);
+ if (element)
+ return NULL;
+ }
+
+ element = delpos234(t1, size1 - 1);
+ relht = height234(t1) - height234(t2);
+ t2->root = join234_internal(t1->root, element, t2->root, &relht);
+ t1->root = NULL;
+ }
+ return t2;
+}
+
+/*
+ * Split out the first <index> elements in a tree and return a
+ * pointer to the root node. Leave the root node of the remainder
+ * in t.
+ */
+static node234 *split234_internal(tree234 * t, int index)
+{
+ node234 *halves[2], *n, *sib, *sub;
+ node234 *lparent, *rparent;
+ int ki, pki=0, i, half, lcount, rcount;
+
+ n = t->root;
+ LOG(("splitting tree %p at point %d\n", t, index));
+
+ /*
+ * Easy special cases. After this we have also dealt completely
+ * with the empty-tree case and we can assume the root exists.
+ */
+ if (index == 0) /* return nothing */
+ return NULL;
+ if (index == countnode234(t->root))
+ { /* return the whole tree */
+ node234 *ret = t->root;
+ t->root = NULL;
+ return ret;
+ }
+
+ /*
+ * Search down the tree to find the split point.
+ */
+ lparent = rparent = NULL;
+ while (n)
+ {
+ LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d index=%d\n", n, n->kids[0], n->counts[0], n->elems[0], n->kids[1], n->counts[1], n->elems[1], n->kids[2], n->counts[2], n->elems[2], n->kids[3], n->counts[3], index));
+ lcount = index;
+ rcount = countnode234(n) - lcount;
+ if (index <= n->counts[0])
+ {
+ ki = 0;
+ } else if (index -= n->counts[0] + 1, index <= n->counts[1])
+ {
+ ki = 1;
+ } else if (index -= n->counts[1] + 1, index <= n->counts[2])
+ {
+ ki = 2;
+ } else
+ {
+ index -= n->counts[2] + 1;
+ ki = 3;
+ }
+
+ LOG((" splitting at subtree %d\n", ki));
+ sub = n->kids[ki];
+
+ LOG((" splitting at child index %d\n", ki));
+
+ /*
+ * Split the node, put halves[0] on the right of the left
+ * one and halves[1] on the left of the right one, put the
+ * new node pointers in halves[0] and halves[1], and go up
+ * a level.
+ */
+ sib = mknew(node234);
+ for (i = 0; i < 3; i++)
+ {
+ if (i + ki < 3 && n->elems[i + ki])
+ {
+ sib->elems[i] = n->elems[i + ki];
+ sib->kids[i + 1] = n->kids[i + ki + 1];
+ if (sib->kids[i + 1])
+ sib->kids[i + 1]->parent = sib;
+ sib->counts[i + 1] = n->counts[i + ki + 1];
+ n->elems[i + ki] = NULL;
+ n->kids[i + ki + 1] = NULL;
+ n->counts[i + ki + 1] = 0;
+ } else
+ {
+ sib->elems[i] = NULL;
+ sib->kids[i + 1] = NULL;
+ sib->counts[i + 1] = 0;
+ }
+ }
+ if (lparent)
+ {
+ lparent->kids[pki] = n;
+ lparent->counts[pki] = lcount;
+ n->parent = lparent;
+ rparent->kids[0] = sib;
+ rparent->counts[0] = rcount;
+ sib->parent = rparent;
+ } else
+ {
+ halves[0] = n;
+ n->parent = NULL;
+ halves[1] = sib;
+ sib->parent = NULL;
+ }
+ lparent = n;
+ rparent = sib;
+ pki = ki;
+ LOG((" left node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ n, n->kids[0], n->counts[0], n->elems[0], n->kids[1],
+ n->counts[1], n->elems[1], n->kids[2], n->counts[2], n->elems[2],
+ n->kids[3], n->counts[3]));
+ LOG((" right node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n",
+ sib, sib->kids[0], sib->counts[0], sib->elems[0], sib->kids[1],
+ sib->counts[1], sib->elems[1], sib->kids[2], sib->counts[2],
+ sib->elems[2], sib->kids[3], sib->counts[3]));
+
+ n = sub;
+ }
+
+ /*
+ * We've come off the bottom here, so we've successfully split
+ * the tree into two equally high subtrees. The only problem is
+ * that some of the nodes down the fault line will be smaller
+ * than the minimum permitted size. (Since this is a 2-3-4
+ * tree, that means they'll be zero-element one-child nodes.)
+ */
+ LOG((" fell off bottom, lroot is %p, rroot is %p\n",
+ halves[0], halves[1]));
+ lparent->counts[pki] = rparent->counts[0] = 0;
+ lparent->kids[pki] = rparent->kids[0] = NULL;
+
+ /*
+ * So now we go back down the tree from each of the two roots,
+ * fixing up undersize nodes.
+ */
+ for (half = 0; half < 2; half++)
+ {
+ /*
+ * Remove the root if it's undersize (it will contain only
+ * one child pointer, so just throw it away and replace it
+ * with its child). This might happen several times.
+ */
+ while (halves[half] && !halves[half]->elems[0])
+ {
+ LOG((" root %p is undersize, throwing away\n", halves[half]));
+ halves[half] = halves[half]->kids[0];
+ sfree(halves[half]->parent);
+ halves[half]->parent = NULL;
+ LOG((" new root is %p\n", halves[half]));
+ }
+
+ n = halves[half];
+ while (n)
+ {
+ void (*toward) (node234 * n, int ki, int *k, int *index);
+ int ni, merge;
+
+ /*
+ * Now we have a potentially undersize node on the
+ * right (if half==0) or left (if half==1). Sort it
+ * out, by merging with a neighbour or by transferring
+ * subtrees over. At this time we must also ensure that
+ * nodes are bigger than minimum, in case we need an
+ * element to merge two nodes below.
+ */
+ LOG((" node %p: %p/%d \"%s\" %p/%d \"%s\" %p/%d \"%s\" %p/%d\n", n,
+ n->kids[0], n->counts[0], n->elems[0], n->kids[1], n->counts[1],
+ n->elems[1], n->kids[2], n->counts[2], n->elems[2], n->kids[3],
+ n->counts[3]));
+ if (half == 1)
+ {
+ ki = 0; /* the kid we're interested in */
+ ni = 1; /* the neighbour */
+ merge = 0; /* for merge: leftmost of the two */
+ toward = trans234_subtree_left;
+ } else
+ {
+ ki = (n->kids[3] ? 3 : n->kids[2] ? 2 : 1);
+ ni = ki - 1;
+ merge = ni;
+ toward = trans234_subtree_right;
+ }
+
+ sub = n->kids[ki];
+ if (sub && !sub->elems[1])
+ {
+ /*
+ * This node is undersized or minimum-size. If we
+ * can merge it with its neighbour, we do so;
+ * otherwise we must be able to transfer subtrees
+ * over to it until it is greater than minimum
+ * size.
+ */
+ int undersized = (!sub->elems[0]);
+ LOG((" child %d is %ssize\n", ki,
+ undersized ? "under" : "minimum-"));
+ LOG((" neighbour is %s\n",
+ n->kids[ni]->elems[2] ? "large" :
+ n->kids[ni]->elems[1] ? "medium" : "small"));
+ if (!n->kids[ni]->elems[1] ||
+ (undersized && !n->kids[ni]->elems[2]))
+ {
+ /*
+ * Neighbour is small, or possibly neighbour is
+ * medium and we are undersize.
+ */
+ trans234_subtree_merge(n, merge, NULL, NULL);
+ sub = n->kids[merge];
+ if (!n->elems[0])
+ {
+ /*
+ * n is empty, and hence must have been the
+ * root and needs to be removed.
+ */
+ assert(!n->parent);
+ LOG((" shifting root!\n"));
+ halves[half] = sub;
+ halves[half]->parent = NULL;
+ sfree(n);
+ }
+ } else
+ {
+ /* Neighbour is big enough to move trees over. */
+ toward(n, ni, NULL, NULL);
+ if (undersized)
+ toward(n, ni, NULL, NULL);
+ }
+ }
+ n = sub;
+ }
+ }
+
+ t->root = halves[1];
+ return halves[0];
+}
+
+tree234 *splitpos234(tree234 * t, int index, int before)
+{
+ tree234 *ret;
+ node234 *n;
+ int count;
+
+ count = countnode234(t->root);
+ if (index < 0 || index > count)
+ return NULL; /* error */
+ ret = newtree234(t->cmp);
+ n = split234_internal(t, index);
+ if (before)
+ {
+ /* We want to return the ones before the index. */
+ ret->root = n;
+ } else
+ {
+ /*
+ * We want to keep the ones before the index and return the
+ * ones after.
+ */
+ ret->root = t->root;
+ t->root = n;
+ }
+ return ret;
+}
+
+tree234 *split234(tree234 * t, void *e, cmpfn234 cmp, int rel)
+{
+ int before;
+ int index;
+
+ assert(rel != REL234_EQ);
+
+ if (rel == REL234_GT || rel == REL234_GE)
+ {
+ before = 1;
+ rel = (rel == REL234_GT ? REL234_LE : REL234_LT);
+ } else
+ {
+ before = 0;
+ }
+ if (!findrelpos234(t, e, cmp, rel, &index))
+ index = 0;
+
+ return splitpos234(t, index + 1, before);
+}
+
+static node234 *copynode234(node234 * n, copyfn234 copyfn,
+ void *copyfnstate)
+{
+ int i;
+ node234 *n2 = mknew(node234);
+
+ for (i = 0; i < 3; i++)
+ {
+ if (n->elems[i] && copyfn)
+ n2->elems[i] = copyfn(copyfnstate, n->elems[i]);
+ else
+ n2->elems[i] = n->elems[i];
+ }
+
+ for (i = 0; i < 4; i++)
+ {
+ if (n->kids[i])
+ {
+ n2->kids[i] = copynode234(n->kids[i], copyfn, copyfnstate);
+ n2->kids[i]->parent = n2;
+ } else
+ {
+ n2->kids[i] = NULL;
+ }
+ n2->counts[i] = n->counts[i];
+ }
+
+ return n2;
+}
+
+tree234 *copytree234(tree234 * t, copyfn234 copyfn, void *copyfnstate)
+{
+ tree234 *t2;
+
+ t2 = newtree234(t->cmp);
+ t2->root = copynode234(t->root, copyfn, copyfnstate);
+ t2->root->parent = NULL;
+
+ return t2;
+}
+
+#ifdef TEST
+
+/*
+ * Test code for the 2-3-4 tree. This code maintains an alternative
+ * representation of the data in the tree, in an array (using the
+ * obvious and slow insert and delete functions). After each tree
+ * operation, the verify() function is called, which ensures all
+ * the tree properties are preserved:
+ * - node->child->parent always equals node
+ * - tree->root->parent always equals NULL
+ * - number of kids == 0 or number of elements + 1;
+ * - tree has the same depth everywhere
+ * - every node has at least one element
+ * - subtree element counts are accurate
+ * - any NULL kid pointer is accompanied by a zero count
+ * - in a sorted tree: ordering property between elements of a
+ * node and elements of its children is preserved
+ * and also ensures the list represented by the tree is the same
+ * list it should be. (This last check also doubly verifies the
+ * ordering properties, because the `same list it should be' is by
+ * definition correctly ordered. It also ensures all nodes are
+ * distinct, because the enum functions would get caught in a loop
+ * if not.)
+ */
+
+#include <stdarg.h>
+
+#define srealloc realloc
+
+/*
+ * Error reporting function.
+ */
+void error(char *fmt, ...)
+{
+ va_list ap;
+ printf("ERROR: ");
+ va_start(ap, fmt);
+ vfprintf(stdout, fmt, ap);
+ va_end(ap);
+ printf("\n");
+}
+
+/* The array representation of the data. */
+void **array;
+int arraylen, arraysize;
+cmpfn234 cmp;
+
+/* The tree representation of the same data. */
+tree234 *tree;
+
+/*
+ * Routines to provide a diagnostic printout of a tree. Currently
+ * relies on every element in the tree being a one-character string
+ * :-)
+ */
+typedef struct {
+ char **levels;
+} dispctx;
+
+int dispnode(node234 * n, int level, dispctx * ctx)
+{
+ if (level == 0)
+ {
+ int xpos = strlen(ctx->levels[0]);
+ int len;
+
+ if (n->elems[2])
+ len = sprintf(ctx->levels[0] + xpos, " %s%s%s",
+ n->elems[0], n->elems[1], n->elems[2]);
+ else if (n->elems[1])
+ len = sprintf(ctx->levels[0] + xpos, " %s%s",
+ n->elems[0], n->elems[1]);
+ else
+ len = sprintf(ctx->levels[0] + xpos, " %s", n->elems[0]);
+ return xpos + 1 + (len - 1) / 2;
+ } else
+ {
+ int xpos[4], nkids;
+ int nodelen, mypos, myleft, x, i;
+
+ xpos[0] = dispnode(n->kids[0], level - 3, ctx);
+ xpos[1] = dispnode(n->kids[1], level - 3, ctx);
+ nkids = 2;
+ if (n->kids[2])
+ {
+ xpos[2] = dispnode(n->kids[2], level - 3, ctx);
+ nkids = 3;
+ }
+ if (n->kids[3])
+ {
+ xpos[3] = dispnode(n->kids[3], level - 3, ctx);
+ nkids = 4;
+ }
+
+ if (nkids == 4)
+ mypos = (xpos[1] + xpos[2]) / 2;
+ else if (nkids == 3)
+ mypos = xpos[1];
+ else
+ mypos = (xpos[0] + xpos[1]) / 2;
+ nodelen = nkids * 2 - 1;
+ myleft = mypos - ((nodelen - 1) / 2);
+ assert(myleft >= xpos[0]);
+ assert(myleft + nodelen - 1 <= xpos[nkids - 1]);
+
+ x = strlen(ctx->levels[level]);
+ while (x <= xpos[0] && x < myleft)
+ ctx->levels[level][x++] = ' ';
+ while (x < myleft)
+ ctx->levels[level][x++] = '_';
+ if (nkids == 4)
+ x += sprintf(ctx->levels[level] + x, ".%s.%s.%s.",
+ n->elems[0], n->elems[1], n->elems[2]);
+ else if (nkids == 3)
+ x += sprintf(ctx->levels[level] + x, ".%s.%s.",
+ n->elems[0], n->elems[1]);
+ else
+ x += sprintf(ctx->levels[level] + x, ".%s.", n->elems[0]);
+ while (x < xpos[nkids - 1])
+ ctx->levels[level][x++] = '_';
+ ctx->levels[level][x] = '\0';
+
+ x = strlen(ctx->levels[level - 1]);
+ for (i = 0; i < nkids; i++)
+ {
+ int rpos, pos;
+ rpos = xpos[i];
+ if (i > 0 && i < nkids - 1)
+ pos = myleft + 2 * i;
+ else
+ pos = rpos;
+ if (rpos < pos)
+ rpos++;
+ while (x < pos && x < rpos)
+ ctx->levels[level - 1][x++] = ' ';
+ if (x == pos)
+ ctx->levels[level - 1][x++] = '|';
+ while (x < pos || x < rpos)
+ ctx->levels[level - 1][x++] = '_';
+ if (x == pos)
+ ctx->levels[level - 1][x++] = '|';
+ }
+ ctx->levels[level - 1][x] = '\0';
+
+ x = strlen(ctx->levels[level - 2]);
+ for (i = 0; i < nkids; i++)
+ {
+ int rpos = xpos[i];
+
+ while (x < rpos)
+ ctx->levels[level - 2][x++] = ' ';
+ ctx->levels[level - 2][x++] = '|';
+ }
+ ctx->levels[level - 2][x] = '\0';
+
+ return mypos;
+ }
+}
+
+void disptree(tree234 * t)
+{
+ dispctx ctx;
+ char *leveldata;
+ int width = count234(t);
+ int ht = height234(t) * 3 - 2;
+ int i;
+
+ if (!t->root)
+ {
+ printf("[empty tree]\n");
+ }
+
+ leveldata = smalloc(ht * (width + 2));
+ ctx.levels = smalloc(ht * sizeof(char *));
+ for (i = 0; i < ht; i++)
+ {
+ ctx.levels[i] = leveldata + i * (width + 2);
+ ctx.levels[i][0] = '\0';
+ }
+
+ (void) dispnode(t->root, ht - 1, &ctx);
+
+ for (i = ht; i--;)
+ printf("%s\n", ctx.levels[i]);
+
+ sfree(ctx.levels);
+ sfree(leveldata);
+}
+
+typedef struct {
+ int treedepth;
+ int elemcount;
+} chkctx;
+
+int
+chknode(chkctx * ctx, int level, node234 * node,
+ void *lowbound, void *highbound)
+{
+ int nkids, nelems;
+ int i;
+ int count;
+
+ /* Count the non-NULL kids. */
+ for (nkids = 0; nkids < 4 && node->kids[nkids]; nkids++);
+ /* Ensure no kids beyond the first NULL are non-NULL. */
+ for (i = nkids; i < 4; i++)
+ if (node->kids[i])
+ {
+ error("node %p: nkids=%d but kids[%d] non-NULL", node, nkids, i);
+ } else if (node->counts[i])
+ {
+ error("node %p: kids[%d] NULL but count[%d]=%d nonzero",
+ node, i, i, node->counts[i]);
+ }
+
+ /* Count the non-NULL elements. */
+ for (nelems = 0; nelems < 3 && node->elems[nelems]; nelems++);
+ /* Ensure no elements beyond the first NULL are non-NULL. */
+ for (i = nelems; i < 3; i++)
+ if (node->elems[i])
+ {
+ error("node %p: nelems=%d but elems[%d] non-NULL", node, nelems, i);
+ }
+
+ if (nkids == 0)
+ {
+ /*
+ * If nkids==0, this is a leaf node; verify that the tree
+ * depth is the same everywhere.
+ */
+ if (ctx->treedepth < 0)
+ ctx->treedepth = level; /* we didn't know the depth yet */
+ else if (ctx->treedepth != level)
+ error("node %p: leaf at depth %d, previously seen depth %d",
+ node, level, ctx->treedepth);
+ } else
+ {
+ /*
+ * If nkids != 0, then it should be nelems+1, unless nelems
+ * is 0 in which case nkids should also be 0 (and so we
+ * shouldn't be in this condition at all).
+ */
+ int shouldkids = (nelems ? nelems + 1 : 0);
+ if (nkids != shouldkids)
+ {
+ error("node %p: %d elems should mean %d kids but has %d",
+ node, nelems, shouldkids, nkids);
+ }
+ }
+
+ /*
+ * nelems should be at least 1.
+ */
+ if (nelems == 0)
+ {
+ error("node %p: no elems", node, nkids);
+ }
+
+ /*
+ * Add nelems to the running element count of the whole tree.
+ */
+ ctx->elemcount += nelems;
+
+ /*
+ * Check ordering property: all elements should be strictly >
+ * lowbound, strictly < highbound, and strictly < each other in
+ * sequence. (lowbound and highbound are NULL at edges of tree
+ * - both NULL at root node - and NULL is considered to be <
+ * everything and > everything. IYSWIM.)
+ */
+ if (cmp)
+ {
+ for (i = -1; i < nelems; i++)
+ {
+ void *lower = (i == -1 ? lowbound : node->elems[i]);
+ void *higher = (i + 1 == nelems ? highbound : node->elems[i + 1]);
+ if (lower && higher && cmp(lower, higher) >= 0)
+ {
+ error("node %p: kid comparison [%d=%s,%d=%s] failed",
+ node, i, lower, i + 1, higher);
+ }
+ }
+ }
+
+ /*
+ * Check parent pointers: all non-NULL kids should have a
+ * parent pointer coming back to this node.
+ */
+ for (i = 0; i < nkids; i++)
+ if (node->kids[i]->parent != node)
+ {
+ error("node %p kid %d: parent ptr is %p not %p",
+ node, i, node->kids[i]->parent, node);
+ }
+
+
+ /*
+ * Now (finally!) recurse into subtrees.
+ */
+ count = nelems;
+
+ for (i = 0; i < nkids; i++)
+ {
+ void *lower = (i == 0 ? lowbound : node->elems[i - 1]);
+ void *higher = (i >= nelems ? highbound : node->elems[i]);
+ int subcount = chknode(ctx, level + 1, node->kids[i], lower, higher);
+ if (node->counts[i] != subcount)
+ {
+ error("node %p kid %d: count says %d, subtree really has %d",
+ node, i, node->counts[i], subcount);
+ }
+ count += subcount;
+ }
+
+ return count;
+}
+
+void verifytree(tree234 * tree, void **array, int arraylen)
+{
+ chkctx ctx;
+ int i;
+ void *p;
+
+ ctx.treedepth = -1; /* depth unknown yet */
+ ctx.elemcount = 0; /* no elements seen yet */
+ /*
+ * Verify validity of tree properties.
+ */
+ if (tree->root)
+ {
+ if (tree->root->parent != NULL)
+ error("root->parent is %p should be null", tree->root->parent);
+ chknode(&ctx, 0, tree->root, NULL, NULL);
+ }
+ printf("tree depth: %d\n", ctx.treedepth);
+ /*
+ * Enumerate the tree and ensure it matches up to the array.
+ */
+ for (i = 0; NULL != (p = index234(tree, i)); i++)
+ {
+ if (i >= arraylen)
+ error("tree contains more than %d elements", arraylen);
+ if (array[i] != p)
+ error("enum at position %d: array says %s, tree says %s",
+ i, array[i], p);
+ }
+ if (ctx.elemcount != i)
+ {
+ error("tree really contains %d elements, enum gave %d",
+ ctx.elemcount, i);
+ }
+ if (i < arraylen)
+ {
+ error("enum gave only %d elements, array has %d", i, arraylen);
+ }
+ i = count234(tree);
+ if (ctx.elemcount != i)
+ {
+ error("tree really contains %d elements, count234 gave %d",
+ ctx.elemcount, i);
+ }
+}
+void verify(void)
+{
+ verifytree(tree, array, arraylen);
+}
+
+void internal_addtest(void *elem, int index, void *realret)
+{
+ int i, j;
+ void *retval;
+
+ if (arraysize < arraylen + 1)
+ {
+ arraysize = arraylen + 1 + 256;
+ array = (array == NULL ? smalloc(arraysize * sizeof(*array)) :
+ srealloc(array, arraysize * sizeof(*array)));
+ }
+
+ i = index;
+ /* now i points to the first element >= elem */
+ retval = elem; /* expect elem returned (success) */
+ for (j = arraylen; j > i; j--)
+ array[j] = array[j - 1];
+ array[i] = elem; /* add elem to array */
+ arraylen++;
+
+ if (realret != retval)
+ {
+ error("add: retval was %p expected %p", realret, retval);
+ }
+
+ verify();
+}
+
+void addtest(void *elem)
+{
+ int i;
+ void *realret;
+
+ realret = add234(tree, elem);
+
+ i = 0;
+ while (i < arraylen && cmp(elem, array[i]) > 0)
+ i++;
+ if (i < arraylen && !cmp(elem, array[i]))
+ {
+ void *retval = array[i]; /* expect that returned not elem */
+ if (realret != retval)
+ {
+ error("add: retval was %p expected %p", realret, retval);
+ }
+ } else
+ internal_addtest(elem, i, realret);
+}
+
+void addpostest(void *elem, int i)
+{
+ void *realret;
+
+ realret = addpos234(tree, elem, i);
+
+ internal_addtest(elem, i, realret);
+}
+
+void delpostest(int i)
+{
+ int index = i;
+ void *elem = array[i], *ret;
+
+ /* i points to the right element */
+ while (i < arraylen - 1)
+ {
+ array[i] = array[i + 1];
+ i++;
+ }
+ arraylen--; /* delete elem from array */
+
+ if (tree->cmp)
+ ret = del234(tree, elem);
+ else
+ ret = delpos234(tree, index);
+
+ if (ret != elem)
+ {
+ error("del returned %p, expected %p", ret, elem);
+ }
+
+ verify();
+}
+
+void deltest(void *elem)
+{
+ int i;
+
+ i = 0;
+ while (i < arraylen && cmp(elem, array[i]) > 0)
+ i++;
+ if (i >= arraylen || cmp(elem, array[i]) != 0)
+ return; /* don't do it! */
+ delpostest(i);
+}
+
+/* A sample data set and test utility. Designed for pseudo-randomness,
+ * and yet repeatability. */
+
+/*
+ * This random number generator uses the `portable implementation'
+ * given in ANSI C99 draft N869. It assumes `unsigned' is 32 bits;
+ * change it if not.
+ */
+int randomnumber(unsigned *seed)
+{
+ *seed *= 1103515245;
+ *seed += 12345;
+ return ((*seed) / 65536) % 32768;
+}
+
+int mycmp(void *av, void *bv)
+{
+ char const *a = (char const *) av;
+ char const *b = (char const *) bv;
+ return strcmp(a, b);
+}
+
+#define lenof(x) ( sizeof((x)) / sizeof(*(x)) )
+
+char *strings[] = {
+ "0", "2", "3", "I", "K", "d", "H", "J", "Q", "N", "n", "q", "j", "i",
+ "7", "G", "F", "D", "b", "x", "g", "B", "e", "v", "V", "T", "f", "E",
+ "S", "8", "A", "k", "X", "p", "C", "R", "a", "o", "r", "O", "Z", "u",
+ "6", "1", "w", "L", "P", "M", "c", "U", "h", "9", "t", "5", "W", "Y",
+ "m", "s", "l", "4",
+#if 0
+ "a", "ab", "absque", "coram", "de",
+ "palam", "clam", "cum", "ex", "e",
+ "sine", "tenus", "pro", "prae",
+ "banana", "carrot", "cabbage", "broccoli", "onion", "zebra",
+ "penguin", "blancmange", "pangolin", "whale", "hedgehog",
+ "giraffe", "peanut", "bungee", "foo", "bar", "baz", "quux",
+ "murfl", "spoo", "breen", "flarn", "octothorpe",
+ "snail", "tiger", "elephant", "octopus", "warthog", "armadillo",
+ "aardvark", "wyvern", "dragon", "elf", "dwarf", "orc", "goblin",
+ "pixie", "basilisk", "warg", "ape", "lizard", "newt", "shopkeeper",
+ "wand", "ring", "amulet"
+#endif
+};
+
+#define NSTR lenof(strings)
+
+void findtest(void)
+{
+ static const int rels[] = {
+ REL234_EQ, REL234_GE, REL234_LE, REL234_LT, REL234_GT
+ };
+ static const char *const relnames[] = {
+ "EQ", "GE", "LE", "LT", "GT"
+ };
+ int i, j, rel, index;
+ char *p, *ret, *realret, *realret2;
+ int lo, hi, mid, c;
+
+ for (i = 0; i < (int) NSTR; i++)
+ {
+ p = strings[i];
+ for (j = 0; j < (int) (sizeof(rels) / sizeof(*rels)); j++)
+ {
+ rel = rels[j];
+
+ lo = 0;
+ hi = arraylen - 1;
+ while (lo <= hi)
+ {
+ mid = (lo + hi) / 2;
+ c = strcmp(p, array[mid]);
+ if (c < 0)
+ hi = mid - 1;
+ else if (c > 0)
+ lo = mid + 1;
+ else
+ break;
+ }
+
+ if (c == 0)
+ {
+ if (rel == REL234_LT)
+ ret = (mid > 0 ? array[--mid] : NULL);
+ else if (rel == REL234_GT)
+ ret = (mid < arraylen - 1 ? array[++mid] : NULL);
+ else
+ ret = array[mid];
+ } else
+ {
+ assert(lo == hi + 1);
+ if (rel == REL234_LT || rel == REL234_LE)
+ {
+ mid = hi;
+ ret = (hi >= 0 ? array[hi] : NULL);
+ } else if (rel == REL234_GT || rel == REL234_GE)
+ {
+ mid = lo;
+ ret = (lo < arraylen ? array[lo] : NULL);
+ } else
+ ret = NULL;
+ }
+
+ realret = findrelpos234(tree, p, NULL, rel, &index);
+ if (realret != ret)
+ {
+ error("find(\"%s\",%s) gave %s should be %s",
+ p, relnames[j], realret, ret);
+ }
+ if (realret && index != mid)
+ {
+ error("find(\"%s\",%s) gave %d should be %d",
+ p, relnames[j], index, mid);
+ }
+ if (realret && rel == REL234_EQ)
+ {
+ realret2 = index234(tree, index);
+ if (realret2 != realret)
+ {
+ error("find(\"%s\",%s) gave %s(%d) but %d -> %s",
+ p, relnames[j], realret, index, index, realret2);
+ }
+ }
+#if 0
+ printf("find(\"%s\",%s) gave %s(%d)\n", p, relnames[j],
+ realret, index);
+#endif
+ }
+ }
+
+ realret = findrelpos234(tree, NULL, NULL, REL234_GT, &index);
+ if (arraylen && (realret != array[0] || index != 0))
+ {
+ error("find(NULL,GT) gave %s(%d) should be %s(0)",
+ realret, index, array[0]);
+ } else if (!arraylen && (realret != NULL))
+ {
+ error("find(NULL,GT) gave %s(%d) should be NULL", realret, index);
+ }
+
+ realret = findrelpos234(tree, NULL, NULL, REL234_LT, &index);
+ if (arraylen
+ && (realret != array[arraylen - 1] || index != arraylen - 1))
+ {
+ error("find(NULL,LT) gave %s(%d) should be %s(0)", realret, index,
+ array[arraylen - 1]);
+ } else if (!arraylen && (realret != NULL))
+ {
+ error("find(NULL,LT) gave %s(%d) should be NULL", realret, index);
+ }
+}
+
+void splittest(tree234 * tree, void **array, int arraylen)
+{
+ int i;
+ tree234 *tree3, *tree4;
+ for (i = 0; i <= arraylen; i++)
+ {
+ tree3 = copytree234(tree, NULL, NULL);
+ tree4 = splitpos234(tree3, i, 0);
+ verifytree(tree3, array, i);
+ verifytree(tree4, array + i, arraylen - i);
+ join234(tree3, tree4);
+ freetree234(tree4); /* left empty by join */
+ verifytree(tree3, array, arraylen);
+ freetree234(tree3);
+ }
+}
+
+int main(void)
+{
+ int in[NSTR];
+ int i, j, k;
+ int tworoot, tmplen;
+ unsigned seed = 0;
+ tree234 *tree2, *tree3, *tree4;
+ int c;
+
+ setvbuf(stdout, NULL, _IOLBF, 0);
+
+ for (i = 0; i < (int) NSTR; i++)
+ in[i] = 0;
+ array = NULL;
+ arraylen = arraysize = 0;
+ tree = newtree234(mycmp);
+ cmp = mycmp;
+
+ verify();
+ for (i = 0; i < 10000; i++)
+ {
+ j = randomnumber(&seed);
+ j %= NSTR;
+ printf("trial: %d\n", i);
+ if (in[j])
+ {
+ printf("deleting %s (%d)\n", strings[j], j);
+ deltest(strings[j]);
+ in[j] = 0;
+ } else
+ {
+ printf("adding %s (%d)\n", strings[j], j);
+ addtest(strings[j]);
+ in[j] = 1;
+ }
+ disptree(tree);
+ findtest();
+ }
+
+ while (arraylen > 0)
+ {
+ j = randomnumber(&seed);
+ j %= arraylen;
+ deltest(array[j]);
+ }
+
+ freetree234(tree);
+
+ /*
+ * Now try an unsorted tree. We don't really need to test
+ * delpos234 because we know del234 is based on it, so it's
+ * already been tested in the above sorted-tree code; but for
+ * completeness we'll use it to tear down our unsorted tree
+ * once we've built it.
+ */
+ tree = newtree234(NULL);
+ cmp = NULL;
+ verify();
+ for (i = 0; i < 1000; i++)
+ {
+ printf("trial: %d\n", i);
+ j = randomnumber(&seed);
+ j %= NSTR;
+ k = randomnumber(&seed);
+ k %= count234(tree) + 1;
+ printf("adding string %s at index %d\n", strings[j], k);
+ addpostest(strings[j], k);
+ }
+
+ /*
+ * While we have this tree in its full form, we'll take a copy
+ * of it to use in split and join testing.
+ */
+ tree2 = copytree234(tree, NULL, NULL);
+ verifytree(tree2, array, arraylen); /* check the copy is accurate */
+ /*
+ * Split tests. Split the tree at every possible point and
+ * check the resulting subtrees.
+ */
+ tworoot = (!tree2->root->elems[1]); /* see if it has a 2-root */
+ splittest(tree2, array, arraylen);
+ /*
+ * Now do the split test again, but on a tree that has a 2-root
+ * (if the previous one didn't) or doesn't (if the previous one
+ * did).
+ */
+ tmplen = arraylen;
+ while ((!tree2->root->elems[1]) == tworoot)
+ {
+ delpos234(tree2, --tmplen);
+ }
+ printf("now trying splits on second tree\n");
+ splittest(tree2, array, tmplen);
+ freetree234(tree2);
+
+ /*
+ * Back to the main testing of uncounted trees.
+ */
+ while (count234(tree) > 0)
+ {
+ printf("cleanup: tree size %d\n", count234(tree));
+ j = randomnumber(&seed);
+ j %= count234(tree);
+ printf("deleting string %s from index %d\n", (char *) array[j], j);
+ delpostest(j);
+ }
+ freetree234(tree);
+
+ /*
+ * Finally, do some testing on split/join on _sorted_ trees. At
+ * the same time, we'll be testing split on very small trees.
+ */
+ tree = newtree234(mycmp);
+ cmp = mycmp;
+ arraylen = 0;
+ for (i = 0; i < 16; i++)
+ {
+ addtest(strings[i]);
+ tree2 = copytree234(tree, NULL, NULL);
+ splittest(tree2, array, arraylen);
+ freetree234(tree2);
+ }
+ freetree234(tree);
+
+ /*
+ * Test silly cases of join: join(emptytree, emptytree), and
+ * also ensure join correctly spots when sorted trees fail the
+ * ordering constraint.
+ */
+ tree = newtree234(mycmp);
+ tree2 = newtree234(mycmp);
+ tree3 = newtree234(mycmp);
+ tree4 = newtree234(mycmp);
+ assert(mycmp(strings[0], strings[1]) < 0); /* just in case :-) */
+ add234(tree2, strings[1]);
+ add234(tree4, strings[0]);
+ array[0] = strings[0];
+ array[1] = strings[1];
+ verifytree(tree, array, 0);
+ verifytree(tree2, array + 1, 1);
+ verifytree(tree3, array, 0);
+ verifytree(tree4, array, 1);
+
+ /*
+ * So:
+ * - join(tree,tree3) should leave both tree and tree3 unchanged.
+ * - joinr(tree,tree2) should leave both tree and tree2 unchanged.
+ * - join(tree4,tree3) should leave both tree3 and tree4 unchanged.
+ * - join(tree, tree2) should move the element from tree2 to tree.
+ * - joinr(tree4, tree3) should move the element from tree4 to tree3.
+ * - join(tree,tree3) should return NULL and leave both unchanged.
+ * - join(tree3,tree) should work and create a bigger tree in tree3.
+ */
+ assert(tree == join234(tree, tree3));
+ verifytree(tree, array, 0);
+ verifytree(tree3, array, 0);
+ assert(tree2 == join234r(tree, tree2));
+ verifytree(tree, array, 0);
+ verifytree(tree2, array + 1, 1);
+ assert(tree4 == join234(tree4, tree3));
+ verifytree(tree3, array, 0);
+ verifytree(tree4, array, 1);
+ assert(tree == join234(tree, tree2));
+ verifytree(tree, array + 1, 1);
+ verifytree(tree2, array, 0);
+ assert(tree3 == join234r(tree4, tree3));
+ verifytree(tree3, array, 1);
+ verifytree(tree4, array, 0);
+ assert(NULL == join234(tree, tree3));
+ verifytree(tree, array + 1, 1);
+ verifytree(tree3, array, 1);
+ assert(tree3 == join234(tree3, tree));
+ verifytree(tree3, array, 2);
+ verifytree(tree, array, 0);
+
+ return 0;
+}
+
+#endif
+
+#if 0 /* sorted list of strings might be useful */
+{
+"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D",
+ "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
+ "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b",
+ "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
+ "o", "p", "q", "r", "s", "t", "u", "v", "w", "x",}
+#endif
diff --git a/Docs/src/bin/halibut/tree234.h b/Docs/src/bin/halibut/tree234.h
index ff80ea6..9a636da 100755
--- a/Docs/src/bin/halibut/tree234.h
+++ b/Docs/src/bin/halibut/tree234.h
@@ -1,202 +1,202 @@
-/*
- * tree234.h: header defining functions in tree234.c.
- *
- * This file is copyright 1999-2001 Simon Tatham.
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef TREE234_H
-#define TREE234_H
-
-/*
- * This typedef is opaque outside tree234.c itself.
- */
-typedef struct tree234_Tag tree234;
-
-typedef int (*cmpfn234) (void *, void *);
-
-typedef void *(*copyfn234) (void *state, void *element);
-
-/*
- * Create a 2-3-4 tree. If `cmp' is NULL, the tree is unsorted, and
- * lookups by key will fail: you can only look things up by numeric
- * index, and you have to use addpos234() and delpos234().
- */
-tree234 *newtree234(cmpfn234 cmp);
-
-/*
- * Free a 2-3-4 tree (not including freeing the elements).
- */
-void freetree234(tree234 * t);
-
-/*
- * Add an element e to a sorted 2-3-4 tree t. Returns e on success,
- * or if an existing element compares equal, returns that.
- */
-void *add234(tree234 * t, void *e);
-
-/*
- * Add an element e to an unsorted 2-3-4 tree t. Returns e on
- * success, NULL on failure. (Failure should only occur if the
- * index is out of range or the tree is sorted.)
- *
- * Index range can be from 0 to the tree's current element count,
- * inclusive.
- */
-void *addpos234(tree234 * t, void *e, int index);
-
-/*
- * Look up the element at a given numeric index in a 2-3-4 tree.
- * Returns NULL if the index is out of range.
- *
- * One obvious use for this function is in iterating over the whole
- * of a tree (sorted or unsorted):
- *
- * for (i = 0; (p = index234(tree, i)) != NULL; i++) consume(p);
- *
- * or
- *
- * int maxcount = count234(tree);
- * for (i = 0; i < maxcount; i++) {
- * p = index234(tree, i);
- * assert(p != NULL);
- * consume(p);
- * }
- */
-void *index234(tree234 * t, int index);
-
-/*
- * Find an element e in a sorted 2-3-4 tree t. Returns NULL if not
- * found. e is always passed as the first argument to cmp, so cmp
- * can be an asymmetric function if desired. cmp can also be passed
- * as NULL, in which case the compare function from the tree proper
- * will be used.
- *
- * Three of these functions are special cases of findrelpos234. The
- * non-`pos' variants lack the `index' parameter: if the parameter
- * is present and non-NULL, it must point to an integer variable
- * which will be filled with the numeric index of the returned
- * element.
- *
- * The non-`rel' variants lack the `relation' parameter. This
- * parameter allows you to specify what relation the element you
- * provide has to the element you're looking for. This parameter
- * can be:
- *
- * REL234_EQ - find only an element that compares equal to e
- * REL234_LT - find the greatest element that compares < e
- * REL234_LE - find the greatest element that compares <= e
- * REL234_GT - find the smallest element that compares > e
- * REL234_GE - find the smallest element that compares >= e
- *
- * Non-`rel' variants assume REL234_EQ.
- *
- * If `rel' is REL234_GT or REL234_LT, the `e' parameter may be
- * NULL. In this case, REL234_GT will return the smallest element
- * in the tree, and REL234_LT will return the greatest. This gives
- * an alternative means of iterating over a sorted tree, instead of
- * using index234:
- *
- * // to loop forwards
- * for (p = NULL; (p = findrel234(tree, p, NULL, REL234_GT)) != NULL ;)
- * consume(p);
- *
- * // to loop backwards
- * for (p = NULL; (p = findrel234(tree, p, NULL, REL234_LT)) != NULL ;)
- * consume(p);
- */
-enum {
- REL234_EQ, REL234_LT, REL234_LE, REL234_GT, REL234_GE
-};
-void *find234(tree234 * t, void *e, cmpfn234 cmp);
-void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation);
-void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index);
-void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp, int relation,
- int *index);
-
-/*
- * Delete an element e in a 2-3-4 tree. Does not free the element,
- * merely removes all links to it from the tree nodes.
- *
- * delpos234 deletes the element at a particular tree index: it
- * works on both sorted and unsorted trees.
- *
- * del234 deletes the element passed to it, so it only works on
- * sorted trees. (It's equivalent to using findpos234 to determine
- * the index of an element, and then passing that index to
- * delpos234.)
- *
- * Both functions return a pointer to the element they delete, for
- * the user to free or pass on elsewhere or whatever. If the index
- * is out of range (delpos234) or the element is already not in the
- * tree (del234) then they return NULL.
- */
-void *del234(tree234 * t, void *e);
-void *delpos234(tree234 * t, int index);
-
-/*
- * Return the total element count of a tree234.
- */
-int count234(tree234 * t);
-
-/*
- * Split a tree234 into two valid tree234s.
- *
- * splitpos234 splits at a given index. If `before' is TRUE, the
- * items at and after that index are left in t and the ones before
- * are returned; if `before' is FALSE, the items before that index
- * are left in t and the rest are returned.
- *
- * split234 splits at a given key. You can pass any of the
- * relations used with findrel234, except for REL234_EQ. The items
- * in the tree that satisfy the relation are returned; the
- * remainder are left.
- */
-tree234 *splitpos234(tree234 * t, int index, int before);
-tree234 *split234(tree234 * t, void *e, cmpfn234 cmp, int rel);
-
-/*
- * Join two tree234s together into a single one.
- *
- * All the elements in t1 are placed to the left of all the
- * elements in t2. If the trees are sorted, there will be a test to
- * ensure that this satisfies the ordering criterion, and NULL will
- * be returned otherwise. If the trees are unsorted, there is no
- * restriction on the use of join234.
- *
- * The tree returned is t1 (join234) or t2 (join234r), if the
- * operation is successful.
- */
-tree234 *join234(tree234 * t1, tree234 * t2);
-tree234 *join234r(tree234 * t1, tree234 * t2);
-
-/*
- * Make a complete copy of a tree234. Element pointers will be
- * reused unless copyfn is non-NULL, in which case it will be used
- * to copy each element. (copyfn takes two `void *' parameters; the
- * first is private state and the second is the element. A simple
- * copy routine probably won't need private state.)
- */
-tree234 *copytree234(tree234 * t, copyfn234 copyfn, void *copyfnstate);
-
-#endif /* TREE234_H */
+/*
+ * tree234.h: header defining functions in tree234.c.
+ *
+ * This file is copyright 1999-2001 Simon Tatham.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef TREE234_H
+#define TREE234_H
+
+/*
+ * This typedef is opaque outside tree234.c itself.
+ */
+typedef struct tree234_Tag tree234;
+
+typedef int (*cmpfn234) (void *, void *);
+
+typedef void *(*copyfn234) (void *state, void *element);
+
+/*
+ * Create a 2-3-4 tree. If `cmp' is NULL, the tree is unsorted, and
+ * lookups by key will fail: you can only look things up by numeric
+ * index, and you have to use addpos234() and delpos234().
+ */
+tree234 *newtree234(cmpfn234 cmp);
+
+/*
+ * Free a 2-3-4 tree (not including freeing the elements).
+ */
+void freetree234(tree234 * t);
+
+/*
+ * Add an element e to a sorted 2-3-4 tree t. Returns e on success,
+ * or if an existing element compares equal, returns that.
+ */
+void *add234(tree234 * t, void *e);
+
+/*
+ * Add an element e to an unsorted 2-3-4 tree t. Returns e on
+ * success, NULL on failure. (Failure should only occur if the
+ * index is out of range or the tree is sorted.)
+ *
+ * Index range can be from 0 to the tree's current element count,
+ * inclusive.
+ */
+void *addpos234(tree234 * t, void *e, int index);
+
+/*
+ * Look up the element at a given numeric index in a 2-3-4 tree.
+ * Returns NULL if the index is out of range.
+ *
+ * One obvious use for this function is in iterating over the whole
+ * of a tree (sorted or unsorted):
+ *
+ * for (i = 0; (p = index234(tree, i)) != NULL; i++) consume(p);
+ *
+ * or
+ *
+ * int maxcount = count234(tree);
+ * for (i = 0; i < maxcount; i++) {
+ * p = index234(tree, i);
+ * assert(p != NULL);
+ * consume(p);
+ * }
+ */
+void *index234(tree234 * t, int index);
+
+/*
+ * Find an element e in a sorted 2-3-4 tree t. Returns NULL if not
+ * found. e is always passed as the first argument to cmp, so cmp
+ * can be an asymmetric function if desired. cmp can also be passed
+ * as NULL, in which case the compare function from the tree proper
+ * will be used.
+ *
+ * Three of these functions are special cases of findrelpos234. The
+ * non-`pos' variants lack the `index' parameter: if the parameter
+ * is present and non-NULL, it must point to an integer variable
+ * which will be filled with the numeric index of the returned
+ * element.
+ *
+ * The non-`rel' variants lack the `relation' parameter. This
+ * parameter allows you to specify what relation the element you
+ * provide has to the element you're looking for. This parameter
+ * can be:
+ *
+ * REL234_EQ - find only an element that compares equal to e
+ * REL234_LT - find the greatest element that compares < e
+ * REL234_LE - find the greatest element that compares <= e
+ * REL234_GT - find the smallest element that compares > e
+ * REL234_GE - find the smallest element that compares >= e
+ *
+ * Non-`rel' variants assume REL234_EQ.
+ *
+ * If `rel' is REL234_GT or REL234_LT, the `e' parameter may be
+ * NULL. In this case, REL234_GT will return the smallest element
+ * in the tree, and REL234_LT will return the greatest. This gives
+ * an alternative means of iterating over a sorted tree, instead of
+ * using index234:
+ *
+ * // to loop forwards
+ * for (p = NULL; (p = findrel234(tree, p, NULL, REL234_GT)) != NULL ;)
+ * consume(p);
+ *
+ * // to loop backwards
+ * for (p = NULL; (p = findrel234(tree, p, NULL, REL234_LT)) != NULL ;)
+ * consume(p);
+ */
+enum {
+ REL234_EQ, REL234_LT, REL234_LE, REL234_GT, REL234_GE
+};
+void *find234(tree234 * t, void *e, cmpfn234 cmp);
+void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation);
+void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index);
+void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp, int relation,
+ int *index);
+
+/*
+ * Delete an element e in a 2-3-4 tree. Does not free the element,
+ * merely removes all links to it from the tree nodes.
+ *
+ * delpos234 deletes the element at a particular tree index: it
+ * works on both sorted and unsorted trees.
+ *
+ * del234 deletes the element passed to it, so it only works on
+ * sorted trees. (It's equivalent to using findpos234 to determine
+ * the index of an element, and then passing that index to
+ * delpos234.)
+ *
+ * Both functions return a pointer to the element they delete, for
+ * the user to free or pass on elsewhere or whatever. If the index
+ * is out of range (delpos234) or the element is already not in the
+ * tree (del234) then they return NULL.
+ */
+void *del234(tree234 * t, void *e);
+void *delpos234(tree234 * t, int index);
+
+/*
+ * Return the total element count of a tree234.
+ */
+int count234(tree234 * t);
+
+/*
+ * Split a tree234 into two valid tree234s.
+ *
+ * splitpos234 splits at a given index. If `before' is TRUE, the
+ * items at and after that index are left in t and the ones before
+ * are returned; if `before' is FALSE, the items before that index
+ * are left in t and the rest are returned.
+ *
+ * split234 splits at a given key. You can pass any of the
+ * relations used with findrel234, except for REL234_EQ. The items
+ * in the tree that satisfy the relation are returned; the
+ * remainder are left.
+ */
+tree234 *splitpos234(tree234 * t, int index, int before);
+tree234 *split234(tree234 * t, void *e, cmpfn234 cmp, int rel);
+
+/*
+ * Join two tree234s together into a single one.
+ *
+ * All the elements in t1 are placed to the left of all the
+ * elements in t2. If the trees are sorted, there will be a test to
+ * ensure that this satisfies the ordering criterion, and NULL will
+ * be returned otherwise. If the trees are unsorted, there is no
+ * restriction on the use of join234.
+ *
+ * The tree returned is t1 (join234) or t2 (join234r), if the
+ * operation is successful.
+ */
+tree234 *join234(tree234 * t1, tree234 * t2);
+tree234 *join234r(tree234 * t1, tree234 * t2);
+
+/*
+ * Make a complete copy of a tree234. Element pointers will be
+ * reused unless copyfn is non-NULL, in which case it will be used
+ * to copy each element. (copyfn takes two `void *' parameters; the
+ * first is private state and the second is the element. A simple
+ * copy routine probably won't need private state.)
+ */
+tree234 *copytree234(tree234 * t, copyfn234 copyfn, void *copyfnstate);
+
+#endif /* TREE234_H */
diff --git a/Docs/src/bin/halibut/ustring.c b/Docs/src/bin/halibut/ustring.c
index 8811546..9ab4ba6 100755
--- a/Docs/src/bin/halibut/ustring.c
+++ b/Docs/src/bin/halibut/ustring.c
@@ -1,201 +1,201 @@
-/*
- * ustring.c: Unicode string routines
- */
-
-#include <wchar.h>
-#include <time.h>
-#include "halibut.h"
-
-wchar_t *ustrdup(wchar_t * s)
-{
- wchar_t *r;
- if (s)
- {
- r = mknewa(wchar_t, 1 + ustrlen(s));
- ustrcpy(r, s);
- } else
- {
- r = mknew(wchar_t);
- *r = 0;
- }
- return r;
-}
-
-char *ustrtoa(wchar_t * s, char *outbuf, int size)
-{
- char *p;
- if (!s)
- {
- *outbuf = '\0';
- return outbuf;
- }
- for (p = outbuf; *s && p < outbuf + size; p++, s++)
- *p = *(char*)s;
- if (p < outbuf + size)
- *p = '\0';
- else
- outbuf[size - 1] = '\0';
- return outbuf;
-}
-
-int ustrlen(wchar_t * s)
-{
- int len = 0;
- while (*s++)
- len++;
- return len;
-}
-
-wchar_t *uadv(wchar_t * s)
-{
- return s + 1 + ustrlen(s);
-}
-
-wchar_t *ustrcpy(wchar_t * dest, wchar_t * source)
-{
- wchar_t *ret = dest;
- do
- {
- *dest++ = *source;
- }
- while (*source++);
- return ret;
-}
-
-int ustrcmp(wchar_t * lhs, wchar_t * rhs)
-{
- if (!lhs && !rhs)
- return 0;
- if (!lhs)
- return -1;
- if (!rhs)
- return +1;
- while (*lhs && *rhs && *lhs == *rhs)
- lhs++, rhs++;
- if (*lhs < *rhs)
- return -1;
- else if (*lhs > *rhs)
- return 1;
- return 0;
-}
-
-wchar_t utolower(wchar_t c)
-{
- if (c == L'\0')
- return c; /* this property needed by ustricmp */
- /* FIXME: this doesn't even come close */
- if (c >= 'A' && c <= 'Z')
- c += 'a' - 'A';
- return c;
-}
-
-int ustricmp(wchar_t * lhs, wchar_t * rhs)
-{
- wchar_t lc, rc;
- while ((lc = utolower(*lhs)) == (rc = utolower(*rhs)) && lc && rc)
- lhs++, rhs++;
- if (!lc && !rc)
- return 0;
- if (lc < rc)
- return -1;
- else
- return 1;
-}
-
-wchar_t *ustrlow(wchar_t * s)
-{
- wchar_t *p = s;
- while (*p)
- {
- *p = utolower(*p);
- p++;
- }
- return s;
-}
-
-int utoi(wchar_t * s)
-{
- int sign = +1;
- int n;
-
- if (*s == L'-')
- {
- s++;
- sign = -1;
- }
-
- n = 0;
- while (*s && *s >= L'0' && *s <= L'9')
- {
- n *= 10;
- n += (*s - '0');
- s++;
- }
-
- return n;
-}
-
-int utob(wchar_t * s)
-{
- if (!ustricmp(s, L"yes") || !ustricmp(s, L"y") ||
- !ustricmp(s, L"true") || !ustricmp(s, L"t"))
- return TRUE;
- return FALSE;
-}
-
-int uisdigit(wchar_t c)
-{
- return c >= L'0' && c <= L'9';
-}
-
-#define USTRFTIME_DELTA 128
-wchar_t *ustrftime(wchar_t * wfmt, struct tm * timespec)
-{
- void *blk = NULL;
- wchar_t *wblk, *wp;
- char *fmt, *text, *p;
- size_t size = 0;
- size_t len;
-
- /*
- * strftime has the entertaining property that it returns 0
- * _either_ on out-of-space _or_ on successful generation of
- * the empty string. Hence we must ensure our format can never
- * generate the empty string. Somebody throw a custard pie at
- * whoever was responsible for that. Please?
- */
- if (wfmt)
- {
- len = ustrlen(wfmt);
- fmt = mknewa(char, 2 + len);
- ustrtoa(wfmt, fmt + 1, len + 1);
- fmt[0] = ' ';
- } else
- fmt = " %c";
-
- while (1)
- {
- size += USTRFTIME_DELTA;
- blk = resize((char *) blk, size);
- len = strftime((char *) blk, size - 1, fmt, timespec);
- if (len > 0)
- break;
- }
-
- /* Note: +1 for the terminating 0, -1 for the initial space in fmt */
- wblk = resize((wchar_t *) blk, len);
- text = mknewa(char, len);
- strftime(text, len, fmt + 1, timespec);
- /*
- * We operate in the C locale, so this all ought to be kosher
- * ASCII. If we ever move outside ASCII machines, we may need
- * to make this more portable...
- */
- for (wp = wblk, p = text; *p; p++, wp++)
- *wp = *p;
- *wp = 0;
- if (wfmt)
- sfree(fmt);
- sfree(text);
- return wblk;
-}
+/*
+ * ustring.c: Unicode string routines
+ */
+
+#include <wchar.h>
+#include <time.h>
+#include "halibut.h"
+
+wchar_t *ustrdup(wchar_t * s)
+{
+ wchar_t *r;
+ if (s)
+ {
+ r = mknewa(wchar_t, 1 + ustrlen(s));
+ ustrcpy(r, s);
+ } else
+ {
+ r = mknew(wchar_t);
+ *r = 0;
+ }
+ return r;
+}
+
+char *ustrtoa(wchar_t * s, char *outbuf, int size)
+{
+ char *p;
+ if (!s)
+ {
+ *outbuf = '\0';
+ return outbuf;
+ }
+ for (p = outbuf; *s && p < outbuf + size; p++, s++)
+ *p = *(char*)s;
+ if (p < outbuf + size)
+ *p = '\0';
+ else
+ outbuf[size - 1] = '\0';
+ return outbuf;
+}
+
+int ustrlen(wchar_t * s)
+{
+ int len = 0;
+ while (*s++)
+ len++;
+ return len;
+}
+
+wchar_t *uadv(wchar_t * s)
+{
+ return s + 1 + ustrlen(s);
+}
+
+wchar_t *ustrcpy(wchar_t * dest, wchar_t * source)
+{
+ wchar_t *ret = dest;
+ do
+ {
+ *dest++ = *source;
+ }
+ while (*source++);
+ return ret;
+}
+
+int ustrcmp(wchar_t * lhs, wchar_t * rhs)
+{
+ if (!lhs && !rhs)
+ return 0;
+ if (!lhs)
+ return -1;
+ if (!rhs)
+ return +1;
+ while (*lhs && *rhs && *lhs == *rhs)
+ lhs++, rhs++;
+ if (*lhs < *rhs)
+ return -1;
+ else if (*lhs > *rhs)
+ return 1;
+ return 0;
+}
+
+wchar_t utolower(wchar_t c)
+{
+ if (c == L'\0')
+ return c; /* this property needed by ustricmp */
+ /* FIXME: this doesn't even come close */
+ if (c >= 'A' && c <= 'Z')
+ c += 'a' - 'A';
+ return c;
+}
+
+int ustricmp(wchar_t * lhs, wchar_t * rhs)
+{
+ wchar_t lc, rc;
+ while ((lc = utolower(*lhs)) == (rc = utolower(*rhs)) && lc && rc)
+ lhs++, rhs++;
+ if (!lc && !rc)
+ return 0;
+ if (lc < rc)
+ return -1;
+ else
+ return 1;
+}
+
+wchar_t *ustrlow(wchar_t * s)
+{
+ wchar_t *p = s;
+ while (*p)
+ {
+ *p = utolower(*p);
+ p++;
+ }
+ return s;
+}
+
+int utoi(wchar_t * s)
+{
+ int sign = +1;
+ int n;
+
+ if (*s == L'-')
+ {
+ s++;
+ sign = -1;
+ }
+
+ n = 0;
+ while (*s && *s >= L'0' && *s <= L'9')
+ {
+ n *= 10;
+ n += (*s - '0');
+ s++;
+ }
+
+ return n;
+}
+
+int utob(wchar_t * s)
+{
+ if (!ustricmp(s, L"yes") || !ustricmp(s, L"y") ||
+ !ustricmp(s, L"true") || !ustricmp(s, L"t"))
+ return TRUE;
+ return FALSE;
+}
+
+int uisdigit(wchar_t c)
+{
+ return c >= L'0' && c <= L'9';
+}
+
+#define USTRFTIME_DELTA 128
+wchar_t *ustrftime(wchar_t * wfmt, struct tm * timespec)
+{
+ void *blk = NULL;
+ wchar_t *wblk, *wp;
+ char *fmt, *text, *p;
+ size_t size = 0;
+ size_t len;
+
+ /*
+ * strftime has the entertaining property that it returns 0
+ * _either_ on out-of-space _or_ on successful generation of
+ * the empty string. Hence we must ensure our format can never
+ * generate the empty string. Somebody throw a custard pie at
+ * whoever was responsible for that. Please?
+ */
+ if (wfmt)
+ {
+ len = ustrlen(wfmt);
+ fmt = mknewa(char, 2 + len);
+ ustrtoa(wfmt, fmt + 1, len + 1);
+ fmt[0] = ' ';
+ } else
+ fmt = " %c";
+
+ while (1)
+ {
+ size += USTRFTIME_DELTA;
+ blk = resize((char *) blk, size);
+ len = strftime((char *) blk, size - 1, fmt, timespec);
+ if (len > 0)
+ break;
+ }
+
+ /* Note: +1 for the terminating 0, -1 for the initial space in fmt */
+ wblk = resize((wchar_t *) blk, len);
+ text = mknewa(char, len);
+ strftime(text, len, fmt + 1, timespec);
+ /*
+ * We operate in the C locale, so this all ought to be kosher
+ * ASCII. If we ever move outside ASCII machines, we may need
+ * to make this more portable...
+ */
+ for (wp = wblk, p = text; *p; p++, wp++)
+ *wp = *p;
+ *wp = 0;
+ if (wfmt)
+ sfree(fmt);
+ sfree(text);
+ return wblk;
+}
diff --git a/Docs/src/bin/halibut/version.c b/Docs/src/bin/halibut/version.c
index e59e97c..634bedc 100755
--- a/Docs/src/bin/halibut/version.c
+++ b/Docs/src/bin/halibut/version.c
@@ -1,13 +1,13 @@
-/*
- * version.c: version string
- */
-
-#include <stdio.h>
-
-#ifndef VERSION
-#define VER "anonymous build (" __DATE__ " " __TIME__ ")"
-#else
-#define VER "version " VERSION
-#endif
-
-const char *const version = "version 1.0 (NSIS Custom Build)";
+/*
+ * version.c: version string
+ */
+
+#include <stdio.h>
+
+#ifndef VERSION
+#define VER "anonymous build (" __DATE__ " " __TIME__ ")"
+#else
+#define VER "version " VERSION
+#endif
+
+const char *const version = "version 1.0 (NSIS Custom Build)";
diff --git a/Docs/src/build.but b/Docs/src/build.but
index 7f8c319..40cdb92 100755
--- a/Docs/src/build.but
+++ b/Docs/src/build.but
@@ -1,97 +1,97 @@
-\A{build} Building NSIS
-
-NSIS version 2.07 introduced a new build system, based on \W{http://www.scons.org/}{SCons}. The build system can build the entire NSIS package so there is no longer need to build it project by project. It allows building using several simultaneous jobs, installation without an installer on both Windows and POSIX and easy compilation with debugging symbols.
-
-\H{build_general} Building in General
-
-Source code is available in \W{http://nsis.cvs.sourceforge.net/nsis}{CVS} and as a separate package with every \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{NSIS distribution}.
-
-To build NSIS \W{http://www.python.org/}{Python} and \W{http://www.scons.org/}{SCons} must be installed. Currently, the supported version of SCons is version 0.96.93. Any version of Python above 1.6 is supported.
-
-To build, open a console, change the working directory to the root directory of NSIS and type \c{scons}. That's it. For example:
-
-\c C:\>cd dev\nsis
-\c C:\dev\nsis>scons
-\c scons: Reading SConscript files ...
-\c Using Microsoft tools configuration
-\c Checking for main() in C library gdi32... (cached) yes
-\c Checking for main() in C library user32... (cached) yes
-\c Checking for main() in C library version... (cached) yes
-\c Checking for main() in C library pthread... (cached) no
-\c Checking for main() in C library stdc++... (cached) no
-\c Checking for main() in C library iconv... (cached) no
-\c Checking for main() in C library libiconv... (cached) no
-\c scons: done reading SConscript files.
-\c scons: Building targets ...
-\c ...
-
-To install the built files, type:
-
-\c scons PREFIX="C:\Program Files\NSIS" install
-
-To create an installer (only on Windows), type:
-
-\c scons dist-installer
-
-To create a distribution zip file, type:
-
-\c scons dist-zip
-
-To create both, type:
-
-\c scons dist
-
-To get a complete list of options that the build system has to offer, type:
-
-\c scons -h
-
-To get a complete list of options SCons has to offer, type:
-
-\c scons -H
-
-\H{build_windows} Building on Windows
-
-SCons will automatically detect Microsoft Visual C++. If you are looking for a free compiler to compile NSIS, we recommend \W{http://msdn.microsoft.com/vstudio/express/visualc/download/}{Microsoft Visual C++ 2005 Express Edition}.
-
-When using the Microsoft Visual C++ Toolkit 2003, add MSTOOLKIT=yes to the build command line:
-
-\c scons MSTOOLKIT=yes
-
-In case of errors about the compiler or the Platform SDK not being found, use:
-
-\c set MSSDK=C:\Path\To\Platform SDK
-\c set VCToolkitInstallDir=C:\Path\To\VCToolkit
-\c scons MSTOOLKIT=yes
-
-The open-source \W{http://www.mingw.org/}{MinGW} can also be used to for building, but this results in noticeably larger installers. Borland C++ or Open Watcom C/C++ might also work, but haven't been tested.
-
-To compile the documentation as a CHM file, hhc.exe must be in the PATH. It is available as part of \W{http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp}{HTML Help Workshop}.
-
-To build NSIS Menu, install \W{http://www.wxwidgets.org/}{wxWidgets 2.8}, create an environment variable named \c{WXWIN} containing the path to the installation directory of wxWidgets, run \c{Contrib\\NSIS Menu\\wx\\wxbuild.bat} and build NSIS as usual.
-
-\\<b\\>Important notes for Microsoft Visual C++ 6.0 users:\\</b\\> The latest \W{http://www.microsoft.com/msdownload/platformsdk/sdkupdate/}{Platform SDK} must be installed before building. Because of flaws in the libraries distributed with Microsoft Visual C++ 6.0, not installing the Platform SDK will result in crashes when using the \R{copyfiles}{CopyFiles} command. See \W{http://forums.winamp.com/showthread.php?s=&threadid=131964}{this forum topic} for more information. Installing the \W{http://msdn.microsoft.com/vstudio/downloads/tools/ppack/download.aspx}{Processor Pack} is highly recommended to decrease the size of the installer overhead.
-
-\H{build_posix} Building on POSIX
-
-As of NSIS 2.01, the compiler, makensis, also compiles on POSIX platforms. POSIX platforms include Linux, *BSD, Mac OS X and others. Since the generated installer will eventually run on Windows, a \W{http://www.libsdl.org/extras/win32/cross/README.txt}{cross-compiler} is needed in order to compile them.
-
-If no cross-compiler is available, use the following:
-
-\c scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
-\c NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
-\c install-compiler
-\c
-\c scons NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
-\c /path/to/extracted/zip/LibraryLocal
-
-This should only build makensis and install it to the directory where a precompiled package, such as the \R{build_nightly}{nightly build} or a \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{zipped release version} (nsis-x.xx.zip), is extracted. Note that the in order for this to work, the precompiled package must be compiled using the exact same sources as makensis. In particular, \c{Source\\exehead\\config.h}, the options passed to scons and \c{Source\\exehead\\fileform.h} must be identical. Nightly builds and zipped release versions are built with the default options.
-
-Currently, the Call, Get and Debug functions of the System plug-in \W{http://forums.winamp.com/showthread.php?s=&threadid=227304}{can't be built} using GCC, but only with MSVC. When building with GCC, either download a MSVC-compiled version or write your own plugin that calls the functions you need. You can skip building the System plugin using the following flags:
-
-\c scons SKIPPLUGINS=System
-
-To build a native version of NSIS Menu, install \W{http://www.wxwidgets.org/}{wxWidgets 2.8} and build as usual. \c{wx-config} must be in the path.
-
-\H{build_nightly} Nightly Builds
-
-There is no need to manually build the latest CVS version for Windows. A \W{http://nsis.sourceforge.net/nightly/nsis.zip}{nightly build} is available. The nightly build is automatically generated every night, using the latest version of the source code from CVS. There is no official nightly build for other platforms.
+\A{build} Building NSIS
+
+NSIS version 2.07 introduced a new build system, based on \W{http://www.scons.org/}{SCons}. The build system can build the entire NSIS package so there is no longer need to build it project by project. It allows building using several simultaneous jobs, installation without an installer on both Windows and POSIX and easy compilation with debugging symbols.
+
+\H{build_general} Building in General
+
+Source code is available in \W{http://nsis.svn.sourceforge.net/viewvc/nsis/}{SVN} and as a separate package with every \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{NSIS distribution}.
+
+To build NSIS \W{http://www.python.org/}{Python} and \W{http://www.scons.org/}{SCons} must be installed. Currently, the supported version of SCons is version 0.96.93. Any version of Python above 1.6 is supported.
+
+To build, open a console, change the working directory to the root directory of NSIS and type \c{scons}. That's it. For example:
+
+\c C:\>cd dev\nsis
+\c C:\dev\nsis>scons
+\c scons: Reading SConscript files ...
+\c Using Microsoft tools configuration
+\c Checking for main() in C library gdi32... (cached) yes
+\c Checking for main() in C library user32... (cached) yes
+\c Checking for main() in C library version... (cached) yes
+\c Checking for main() in C library pthread... (cached) no
+\c Checking for main() in C library stdc++... (cached) no
+\c Checking for main() in C library iconv... (cached) no
+\c Checking for main() in C library libiconv... (cached) no
+\c scons: done reading SConscript files.
+\c scons: Building targets ...
+\c ...
+
+To install the built files, type:
+
+\c scons PREFIX="C:\Program Files\NSIS" install
+
+To create an installer (only on Windows), type:
+
+\c scons dist-installer
+
+To create a distribution zip file, type:
+
+\c scons dist-zip
+
+To create both, type:
+
+\c scons dist
+
+To get a complete list of options that the build system has to offer, type:
+
+\c scons -h
+
+To get a complete list of options SCons has to offer, type:
+
+\c scons -H
+
+\H{build_windows} Building on Windows
+
+SCons will automatically detect Microsoft Visual C++. If you are looking for a free compiler to compile NSIS, we recommend \W{http://msdn.microsoft.com/vstudio/express/visualc/download/}{Microsoft Visual C++ 2005 Express Edition}.
+
+When using the Microsoft Visual C++ Toolkit 2003, add MSTOOLKIT=yes to the build command line:
+
+\c scons MSTOOLKIT=yes
+
+In case of errors about the compiler or the Platform SDK not being found, use:
+
+\c set MSSDK=C:\Path\To\Platform SDK
+\c set VCToolkitInstallDir=C:\Path\To\VCToolkit
+\c scons MSTOOLKIT=yes
+
+The open-source \W{http://www.mingw.org/}{MinGW} can also be used to for building, but this results in noticeably larger installers. Borland C++ or Open Watcom C/C++ might also work, but haven't been tested.
+
+To compile the documentation as a CHM file, hhc.exe must be in the PATH. It is available as part of \W{http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp}{HTML Help Workshop}.
+
+To build NSIS Menu, install \W{http://www.wxwidgets.org/}{wxWidgets 2.8}, create an environment variable named \c{WXWIN} containing the path to the installation directory of wxWidgets, run \c{Contrib\\NSIS Menu\\wx\\wxbuild.bat} and build NSIS as usual.
+
+\\<b\\>Important notes for Microsoft Visual C++ 6.0 users:\\</b\\> The latest \W{http://www.microsoft.com/msdownload/platformsdk/sdkupdate/}{Platform SDK} must be installed before building. Because of flaws in the libraries distributed with Microsoft Visual C++ 6.0, not installing the Platform SDK will result in crashes when using the \R{copyfiles}{CopyFiles} command. See \W{http://forums.winamp.com/showthread.php?s=&threadid=131964}{this forum topic} for more information. Installing the \W{http://msdn.microsoft.com/vstudio/downloads/tools/ppack/download.aspx}{Processor Pack} is highly recommended to decrease the size of the installer overhead.
+
+\H{build_posix} Building on POSIX
+
+As of NSIS 2.01, the compiler, makensis, also compiles on POSIX platforms. POSIX platforms include Linux, *BSD, Mac OS X and others. Since the generated installer will eventually run on Windows, a \W{http://www.libsdl.org/extras/win32/cross/README.txt}{cross-compiler} is needed in order to compile them.
+
+If no cross-compiler is available, use the following:
+
+\c scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
+\c NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
+\c install-compiler
+\c
+\c scons NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
+\c /path/to/extracted/zip/LibraryLocal
+
+This should only build makensis and install it to the directory where a precompiled package, such as the \R{build_nightly}{nightly build} or a \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{zipped release version} (nsis-x.xx.zip), is extracted. Note that the in order for this to work, the precompiled package must be compiled using the exact same sources as makensis. In particular, \c{Source\\exehead\\config.h}, the options passed to scons and \c{Source\\exehead\\fileform.h} must be identical. Nightly builds and zipped release versions are built with the default options.
+
+Currently, the Call, Get and Debug functions of the System plug-in \W{http://forums.winamp.com/showthread.php?s=&threadid=227304}{can't be built} using GCC, but only with MSVC. When building with GCC, either download a MSVC-compiled version or write your own plugin that calls the functions you need. You can skip building the System plugin using the following flags:
+
+\c scons SKIPPLUGINS=System
+
+To build a native version of NSIS Menu, install \W{http://www.wxwidgets.org/}{wxWidgets 2.8} and build as usual. \c{wx-config} must be in the path.
+
+\H{build_nightly} Nightly Builds
+
+There is no need to manually build the latest SVN version for Windows. A \W{http://nsis.sourceforge.net/nightly/nsis.zip}{nightly build} is available. The nightly build is automatically generated every night, using the latest version of the source code from SVN. There is no official nightly build for other platforms.
diff --git a/Docs/src/callback.but b/Docs/src/callback.but
index f744948..b326393 100755
--- a/Docs/src/callback.but
+++ b/Docs/src/callback.but
@@ -1,208 +1,208 @@
-\S1{callbacks} Callback Functions
-
-You can create callback functions which have special names, that will be called by the installer at certain points in the install. Below is a list of currently available callbacks:
-
-\S2{instcallbacks} Install Callbacks
-
-\S3{onguiinit} .onGUIInit
-
-This callback will be called just before the first page is loaded and the installer dialog is shown, allowing you to tweak the user interface.
-
-Example:
-
-\c !include "WinMessages.nsh"
-\c
-\c Function .onGUIInit
-\c # 1028 is the id of the branding text control
-\c GetDlgItem $R0 $HWNDPARENT 1028
-\c CreateFont $R1 "Tahoma" 10 700
-\c SendMessage $R0 ${WM_SETFONT} $R1 0
-\c # set background color to white and text color to red
-\c SetCtlColors $R0 FFFFFF FF0000
-\c FunctionEnd
-
-\S3{oninit} .onInit
-
-This callback will be called when the installer is nearly finished initializing. If the '.onInit' function calls \R{abort}{Abort}, the installer will quit instantly.
-
-Here are two examples of how this might be used:
-
-\c Function .onInit
-\c MessageBox MB_YESNO "This will install. Continue?" IDYES NoAbort
-\c Abort ; causes installer to quit.
-\c NoAbort:
-\c FunctionEnd
-
-or:
-
-\c Function .onInit
-\c ReadINIStr $INSTDIR $WINDIR\wincmd.ini Configuration InstallDir
-\c StrCmp $INSTDIR "" 0 NoAbort
-\c MessageBox MB_OK "Windows Commander not found. Unable to get install path."
-\c Abort ; causes installer to quit.
-\c NoAbort:
-\c FunctionEnd
-
-\S3{oninstfailed} .onInstFailed
-
-This callback is called when the user hits the 'cancel' button after the install has failed (if it could not extract a file, or the install script used the \R{abort}{Abort} command).
-
-Example:
-
-\c Function .onInstFailed
-\c MessageBox MB_OK "Better luck next time."
-\c FunctionEnd
-
-\S3{oninstsuccess} .onInstSuccess
-
-This callback is called when the install was successful, right before the install window closes (which may be after the user clicks 'Close' if \R{aautoclosewindow}{AutoCloseWindow} or \R{setautoclose}{SetAutoClose} is set to false).
-
-Example:
-
-\c Function .onInstSuccess
-\c MessageBox MB_YESNO "Congrats, it worked. View readme?" IDNO NoReadme
-\c Exec notepad.exe ; view readme or whatever, if you want.
-\c NoReadme:
-\c FunctionEnd
-
-\S3{onguiend} .onGUIEnd
-
-This callback is called right after the installer window closes. Use it to free any user interface related plug-ins if needed.
-
-\S3{onmouseoversection} .onMouseOverSection
-
-This callback is called whenever the mouse position over the sections tree has changed. This allows you to set a description for each section for example. The section id on which the mouse is over currently is stored, temporarily, in $0.
-
-Example:
-
-\c Function .onMouseOverSection
-\c FindWindow $R0 "#32770" "" $HWNDPARENT
-\c GetDlgItem $R0 $R0 1043 ; description item (must be added to the UI)
-\c
-\c StrCmp $0 0 "" +2
-\c SendMessage $R0 ${WM_SETTEXT} 0 "STR:first section description"
-\c
-\c StrCmp $0 1 "" +2
-\c SendMessage $R0 ${WM_SETTEXT} 0 "STR:second section description"
-\c FunctionEnd
-
-\S3{onrebootfailed} .onRebootFailed
-
-This callback is called if \R{reboot}{Reboot} fails. \R{writeuninstaller}{WriteUninstaller}, \R{plugindlls}{plug-ins}, \R{file}{File} and \R{writeregbin}{WriteRegBin} should not be used in this callback.
-
-Example:
-
-\c Function .onRebootFailed
-\c MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
-\c FunctionEnd
-
-\S3{onselchange} .onSelChange
-
-Called when the selection changes on the \R{pages}{component page}. Useful for using with \R{sectionsetflags}{SectionSetFlags} and \R{sectiongetflags}{SectionGetFlags}.
-
-Selection changes include both section selection and installation type change.
-
-\S3{onuserabort} .onUserAbort
-
-This callback is called when the user hits the 'cancel' button, and the install hasn't already failed. If this function calls \R{abort}{Abort}, the install will not be aborted.
-
-Example:
-
-\c Function .onUserAbort
-\c MessageBox MB_YESNO "Abort install?" IDYES NoCancelAbort
-\c Abort ; causes installer to not quit.
-\c NoCancelAbort:
-\c FunctionEnd
-
-\S3{onverifyinstdir} .onVerifyInstDir
-
-This callback enables control over whether or not an installation path is valid for your installer. This code will be called every time the user changes the install directory, so it shouldn't do anything crazy with \R{messagebox}{MessageBox} or the likes. If this function calls \R{abort}{Abort}, the installation path in $INSTDIR is deemed invalid.
-
-Example:
-
-\c Function .onVerifyInstDir
-\c IfFileExists $INSTDIR\Winamp.exe PathGood
-\c Abort ; if $INSTDIR is not a winamp directory, don't let us install there
-\c PathGood:
-\c FunctionEnd
-
-\S2{uninstcallbacks} Uninstall Callbacks
-
-\S3{unonguiinit} un.onGUIInit
-
-This callback will be called just before the first page is loaded and the installer dialog is shown, allowing you to tweak the user interface.
-
-Have a look at \R{onguiinit}{.onGUIInit} for an example.
-
-\S3{unonInit} un.onInit
-
-This callback will be called when the uninstaller is nearly finished initializing. If the 'un.onInit' function calls Abort, the uninstaller will quit instantly. Note that this function can verify and/or modify $INSTDIR if necessary.
-
-Here are two examples of how this might be used:
-
-\c Function un.onInit
-\c MessageBox MB_YESNO "This will uninstall. Continue?" IDYES NoAbort
-\c Abort ; causes uninstaller to quit.
-\c NoAbort:
-\c FunctionEnd
-
-or:
-
-\c Function un.onInit
-\c IfFileExists $INSTDIR\myfile.exe found
-\c Messagebox MB_OK "Uninstall path incorrect"
-\c Abort
-\c found:
-\c FunctionEnd
-
-\S3{unonuninstfailed} un.onUninstFailed
-
-This callback is called when the user hits the 'cancel' button after the uninstall has failed (if it used the \R{abort}{Abort command} or otherwise failed).
-
-Example:
-
-\c Function un.onUninstFailed
-\c MessageBox MB_OK "Better luck next time."
-\c FunctionEnd
-
-\S3{unonuninstsuccess} un.onUninstSuccess
-
-This callback is called when the uninstall was successful, right before the install window closes (which may be after the user clicks 'Close' if \R{setautoclose}{SetAutoClose} is set to false)..
-
-Example:
-
-\c Function un.onUninstSuccess
-\c MessageBox MB_OK "Congrats, it's gone."
-\c FunctionEnd
-
-\S3{unonguiend} un.onGUIEnd
-
-This callback is called right after the uninstaller window closes. Use it to free any user interface related plug-ins if needed.
-
-\S3{unonrebootfailed} un.onRebootFailed
-
-This callback is called if \R{reboot}{Reboot} fails. \R{writeuninstaller}{WriteUninstaller}, \R{plugindlls}{plug-ins}, \R{file}{File} and \R{writeregbin}{WriteRegBin} should not be used in this callback.
-
-Example:
-
-\c Function un.onRebootFailed
-\c MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
-\c FunctionEnd
-
-\S3{unonselchange} un.onSelChange
-
-Called when the selection changes on the \R{pages}{component page}. Useful for using with \R{sectionsetflags}{SectionSetFlags} and \R{sectiongetflags}{SectionGetFlags}.
-
-Selection changes include both section selection and installation type change.
-
-\S3{unonuserabort} un.onUserAbort
-
-This callback is called when the user hits the 'cancel' button and the uninstall hasn't already failed. If this function calls Abort, the install will not be aborted.
-
-Example:
-
-\c Function un.onUserAbort
-\c MessageBox MB_YESNO "Abort uninstall?" IDYES NoCancelAbort
-\c Abort ; causes uninstaller to not quit.
-\c NoCancelAbort:
+\S1{callbacks} Callback Functions
+
+You can create callback functions which have special names, that will be called by the installer at certain points in the install. Below is a list of currently available callbacks:
+
+\S2{instcallbacks} Install Callbacks
+
+\S3{onguiinit} .onGUIInit
+
+This callback will be called just before the first page is loaded and the installer dialog is shown, allowing you to tweak the user interface.
+
+Example:
+
+\c !include "WinMessages.nsh"
+\c
+\c Function .onGUIInit
+\c # 1028 is the id of the branding text control
+\c GetDlgItem $R0 $HWNDPARENT 1028
+\c CreateFont $R1 "Tahoma" 10 700
+\c SendMessage $R0 ${WM_SETFONT} $R1 0
+\c # set background color to white and text color to red
+\c SetCtlColors $R0 FFFFFF FF0000
+\c FunctionEnd
+
+\S3{oninit} .onInit
+
+This callback will be called when the installer is nearly finished initializing. If the '.onInit' function calls \R{abort}{Abort}, the installer will quit instantly.
+
+Here are two examples of how this might be used:
+
+\c Function .onInit
+\c MessageBox MB_YESNO "This will install. Continue?" IDYES NoAbort
+\c Abort ; causes installer to quit.
+\c NoAbort:
+\c FunctionEnd
+
+or:
+
+\c Function .onInit
+\c ReadINIStr $INSTDIR $WINDIR\wincmd.ini Configuration InstallDir
+\c StrCmp $INSTDIR "" 0 NoAbort
+\c MessageBox MB_OK "Windows Commander not found. Unable to get install path."
+\c Abort ; causes installer to quit.
+\c NoAbort:
+\c FunctionEnd
+
+\S3{oninstfailed} .onInstFailed
+
+This callback is called when the user hits the 'cancel' button after the install has failed (if it could not extract a file, or the install script used the \R{abort}{Abort} command).
+
+Example:
+
+\c Function .onInstFailed
+\c MessageBox MB_OK "Better luck next time."
+\c FunctionEnd
+
+\S3{oninstsuccess} .onInstSuccess
+
+This callback is called when the install was successful, right before the install window closes (which may be after the user clicks 'Close' if \R{aautoclosewindow}{AutoCloseWindow} or \R{setautoclose}{SetAutoClose} is set to false).
+
+Example:
+
+\c Function .onInstSuccess
+\c MessageBox MB_YESNO "Congrats, it worked. View readme?" IDNO NoReadme
+\c Exec notepad.exe ; view readme or whatever, if you want.
+\c NoReadme:
+\c FunctionEnd
+
+\S3{onguiend} .onGUIEnd
+
+This callback is called right after the installer window closes. Use it to free any user interface related plug-ins if needed.
+
+\S3{onmouseoversection} .onMouseOverSection
+
+This callback is called whenever the mouse position over the sections tree has changed. This allows you to set a description for each section for example. The section id on which the mouse is over currently is stored, temporarily, in $0.
+
+Example:
+
+\c Function .onMouseOverSection
+\c FindWindow $R0 "#32770" "" $HWNDPARENT
+\c GetDlgItem $R0 $R0 1043 ; description item (must be added to the UI)
+\c
+\c StrCmp $0 0 "" +2
+\c SendMessage $R0 ${WM_SETTEXT} 0 "STR:first section description"
+\c
+\c StrCmp $0 1 "" +2
+\c SendMessage $R0 ${WM_SETTEXT} 0 "STR:second section description"
+\c FunctionEnd
+
+\S3{onrebootfailed} .onRebootFailed
+
+This callback is called if \R{reboot}{Reboot} fails. \R{writeuninstaller}{WriteUninstaller}, \R{plugindlls}{plug-ins}, \R{file}{File} and \R{writeregbin}{WriteRegBin} should not be used in this callback.
+
+Example:
+
+\c Function .onRebootFailed
+\c MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
+\c FunctionEnd
+
+\S3{onselchange} .onSelChange
+
+Called when the selection changes on the \R{pages}{component page}. Useful for using with \R{sectionsetflags}{SectionSetFlags} and \R{sectiongetflags}{SectionGetFlags}.
+
+Selection changes include both section selection and installation type change.
+
+\S3{onuserabort} .onUserAbort
+
+This callback is called when the user hits the 'cancel' button, and the install hasn't already failed. If this function calls \R{abort}{Abort}, the install will not be aborted.
+
+Example:
+
+\c Function .onUserAbort
+\c MessageBox MB_YESNO "Abort install?" IDYES NoCancelAbort
+\c Abort ; causes installer to not quit.
+\c NoCancelAbort:
+\c FunctionEnd
+
+\S3{onverifyinstdir} .onVerifyInstDir
+
+This callback enables control over whether or not an installation path is valid for your installer. This code will be called every time the user changes the install directory, so it shouldn't do anything crazy with \R{messagebox}{MessageBox} or the likes. If this function calls \R{abort}{Abort}, the installation path in $INSTDIR is deemed invalid.
+
+Example:
+
+\c Function .onVerifyInstDir
+\c IfFileExists $INSTDIR\Winamp.exe PathGood
+\c Abort ; if $INSTDIR is not a winamp directory, don't let us install there
+\c PathGood:
+\c FunctionEnd
+
+\S2{uninstcallbacks} Uninstall Callbacks
+
+\S3{unonguiinit} un.onGUIInit
+
+This callback will be called just before the first page is loaded and the installer dialog is shown, allowing you to tweak the user interface.
+
+Have a look at \R{onguiinit}{.onGUIInit} for an example.
+
+\S3{unonInit} un.onInit
+
+This callback will be called when the uninstaller is nearly finished initializing. If the 'un.onInit' function calls Abort, the uninstaller will quit instantly. Note that this function can verify and/or modify $INSTDIR if necessary.
+
+Here are two examples of how this might be used:
+
+\c Function un.onInit
+\c MessageBox MB_YESNO "This will uninstall. Continue?" IDYES NoAbort
+\c Abort ; causes uninstaller to quit.
+\c NoAbort:
+\c FunctionEnd
+
+or:
+
+\c Function un.onInit
+\c IfFileExists $INSTDIR\myfile.exe found
+\c Messagebox MB_OK "Uninstall path incorrect"
+\c Abort
+\c found:
+\c FunctionEnd
+
+\S3{unonuninstfailed} un.onUninstFailed
+
+This callback is called when the user hits the 'cancel' button after the uninstall has failed (if it used the \R{abort}{Abort command} or otherwise failed).
+
+Example:
+
+\c Function un.onUninstFailed
+\c MessageBox MB_OK "Better luck next time."
+\c FunctionEnd
+
+\S3{unonuninstsuccess} un.onUninstSuccess
+
+This callback is called when the uninstall was successful, right before the install window closes (which may be after the user clicks 'Close' if \R{setautoclose}{SetAutoClose} is set to false)..
+
+Example:
+
+\c Function un.onUninstSuccess
+\c MessageBox MB_OK "Congrats, it's gone."
+\c FunctionEnd
+
+\S3{unonguiend} un.onGUIEnd
+
+This callback is called right after the uninstaller window closes. Use it to free any user interface related plug-ins if needed.
+
+\S3{unonrebootfailed} un.onRebootFailed
+
+This callback is called if \R{reboot}{Reboot} fails. \R{writeuninstaller}{WriteUninstaller}, \R{plugindlls}{plug-ins}, \R{file}{File} and \R{writeregbin}{WriteRegBin} should not be used in this callback.
+
+Example:
+
+\c Function un.onRebootFailed
+\c MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
+\c FunctionEnd
+
+\S3{unonselchange} un.onSelChange
+
+Called when the selection changes on the \R{pages}{component page}. Useful for using with \R{sectionsetflags}{SectionSetFlags} and \R{sectiongetflags}{SectionGetFlags}.
+
+Selection changes include both section selection and installation type change.
+
+\S3{unonuserabort} un.onUserAbort
+
+This callback is called when the user hits the 'cancel' button and the uninstall hasn't already failed. If this function calls Abort, the install will not be aborted.
+
+Example:
+
+\c Function un.onUserAbort
+\c MessageBox MB_YESNO "Abort uninstall?" IDYES NoCancelAbort
+\c Abort ; causes uninstaller to not quit.
+\c NoCancelAbort:
\c FunctionEnd \ No newline at end of file
diff --git a/Docs/src/chm_config.but b/Docs/src/chm_config.but
index acd1815..ebe4d85 100755
--- a/Docs/src/chm_config.but
+++ b/Docs/src/chm_config.but
@@ -1,24 +1,24 @@
-\title NSIS Users Manual
-
-\cfg{xhtml-leaf-level}{2}
-
-\cfg{xhtml-leaf-contains-contents}{false}
-
-\cfg{xhtml-contents-depth-0}{5}
-
-\cfg{xhtml-head-end}{<link rel="stylesheet" href="style.css" type='text/css' /><script language="JavaScript" type="text/javascript" src="chmlink.js"></script>}
-
-\cfg{xhtml-rlink-prefix}{#" onclick="parser('}
-
-\cfg{xhtml-rlink-suffix}{')}
-
-\cfg{chm-toc-file}{toc.hhc}
-
-\cfg{chm-ind-file}{ind.hhk}
-
-\preamble Check \W{http://nsis.sourceforge.net/}{http://nsis.sf.net} for news, information, support, examples, tutorials and more.
-
-\preamble Quick links:\\<br\\>\W{http://nsis.sourceforge.net/support/faq/}{FAQ} - A list of frequently asked questions\\<br\\>\W{http://nsis.sourceforge.net/wiki/}{NSIS Wiki} - Examples, functions, tutorials, plug-ins, software and more\\<br\\>\W{http://forums.winamp.com/forumdisplay.php?forumid=65}{Forum} - Post questions or discuss NSIS features
-
-\copyright Copyright (C) 1999-2007 Contributors
-
+\title NSIS Users Manual
+
+\cfg{xhtml-leaf-level}{2}
+
+\cfg{xhtml-leaf-contains-contents}{false}
+
+\cfg{xhtml-contents-depth-0}{5}
+
+\cfg{xhtml-head-end}{<link rel="stylesheet" href="style.css" type='text/css' /><script language="JavaScript" type="text/javascript" src="chmlink.js"></script>}
+
+\cfg{xhtml-rlink-prefix}{#" onclick="parser('}
+
+\cfg{xhtml-rlink-suffix}{')}
+
+\cfg{chm-toc-file}{toc.hhc}
+
+\cfg{chm-ind-file}{ind.hhk}
+
+\preamble Check \W{http://nsis.sourceforge.net/}{http://nsis.sf.net} for news, information, support, examples, tutorials and more.
+
+\preamble Quick links:\\<br\\>\W{http://nsis.sourceforge.net/support/faq/}{FAQ} - A list of frequently asked questions\\<br\\>\W{http://nsis.sourceforge.net/wiki/}{NSIS Wiki} - Examples, functions, tutorials, plug-ins, software and more\\<br\\>\W{http://forums.winamp.com/forumdisplay.php?forumid=65}{Forum} - Post questions or discuss NSIS features
+
+\copyright Copyright (C) 1999-2007 Contributors
+
diff --git a/Docs/src/chmlink.js b/Docs/src/chmlink.js
index 098d331..b81b6ea 100755
--- a/Docs/src/chmlink.js
+++ b/Docs/src/chmlink.js
@@ -1,115 +1,115 @@
-function FolderExists(fn)
-{
-/*@cc_on @*/
-/*@if (@_jscript_version >= 5)
- try
- {
- var objShell = new ActiveXObject("Shell.Application");
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- return fso.FolderExists(fn);
- }
- catch(e) { }
-/*@end @*/
- return false;
-}
-
-function FileExists(fn)
-{
-/*@cc_on @*/
-/*@if (@_jscript_version >= 5)
- try
- {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- return fso.FileExists(fn);
- }
- catch(e) { }
-/*@end @*/
- return true;
-}
-
-function TryShellExec(fn)
-{
-/*@cc_on @*/
-/*@if (@_jscript_version >= 5)
- try
- {
- var objShell = new ActiveXObject("Shell.Application");
- objShell.ShellExecute(fn, "", "", "open", 1);
- return true;
- }
- catch(e) { }
-/*@end @*/
- return false;
-}
-
-function parser(fn)
-{
- var X, Y, sl, a, ra, re;
- ra = /:/;
- a = location.href.search(ra);
- if (a == 2)
- X = 14;
- else
- X = 7;
- sl = "\\";
- Y = location.href.lastIndexOf(sl) + 1;
-/*@cc_on @*/
-/*@if (@_jscript_version >= 5)
- try
- {
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- }
- catch(e)
- {
- if (fn.substring(0, 3) == "../")
- {
- fn = fn.substring(3);
- }
- }
- @else @*/
- if (fn.substring(0, 3) == "../")
- {
- fn = fn.substring(3);
- }
-/*@end @*/
- lfn = location.href.substring(X, Y) + fn;
- re = /%20/g;
- lfn = lfn.replace(re, " ");
- re = /\//g;
- lfn = lfn.replace(re, "\\");
-
- if (FolderExists(lfn))
- {
- if (!TryShellExec(lfn))
- {
- var objShell = new ActiveXObject("Shell.Application");
- objShell.Open(lfn);
- }
- }
- else if (FileExists(lfn))
- {
- execed = false;
- htmlre = /\.html?$/;
- txtre = /\.txt$/;
- if (!lfn.match(htmlre) && !lfn.match(txtre))
- {
- execed = TryShellExec(lfn);
- }
- if (!execed)
- {
- re = /\\/g;
- lfn = lfn.replace(re, "/");
- re = /\ /g;
- lfn = lfn.replace(re, "%20");
- location.href = 'file:///' + lfn;
- }
- }
- else if (fn.substring(0, 3) == "../")
- {
- parser(fn.substring(3));
- }
- else
- {
- alert(fn + " doesn't exist");
- }
+function FolderExists(fn)
+{
+/*@cc_on @*/
+/*@if (@_jscript_version >= 5)
+ try
+ {
+ var objShell = new ActiveXObject("Shell.Application");
+ var fso = new ActiveXObject("Scripting.FileSystemObject");
+ return fso.FolderExists(fn);
+ }
+ catch(e) { }
+/*@end @*/
+ return false;
+}
+
+function FileExists(fn)
+{
+/*@cc_on @*/
+/*@if (@_jscript_version >= 5)
+ try
+ {
+ var fso = new ActiveXObject("Scripting.FileSystemObject");
+ return fso.FileExists(fn);
+ }
+ catch(e) { }
+/*@end @*/
+ return true;
+}
+
+function TryShellExec(fn)
+{
+/*@cc_on @*/
+/*@if (@_jscript_version >= 5)
+ try
+ {
+ var objShell = new ActiveXObject("Shell.Application");
+ objShell.ShellExecute(fn, "", "", "open", 1);
+ return true;
+ }
+ catch(e) { }
+/*@end @*/
+ return false;
+}
+
+function parser(fn)
+{
+ var X, Y, sl, a, ra, re;
+ ra = /:/;
+ a = location.href.search(ra);
+ if (a == 2)
+ X = 14;
+ else
+ X = 7;
+ sl = "\\";
+ Y = location.href.lastIndexOf(sl) + 1;
+/*@cc_on @*/
+/*@if (@_jscript_version >= 5)
+ try
+ {
+ var fso = new ActiveXObject("Scripting.FileSystemObject");
+ }
+ catch(e)
+ {
+ if (fn.substring(0, 3) == "../")
+ {
+ fn = fn.substring(3);
+ }
+ }
+ @else @*/
+ if (fn.substring(0, 3) == "../")
+ {
+ fn = fn.substring(3);
+ }
+/*@end @*/
+ lfn = location.href.substring(X, Y) + fn;
+ re = /%20/g;
+ lfn = lfn.replace(re, " ");
+ re = /\//g;
+ lfn = lfn.replace(re, "\\");
+
+ if (FolderExists(lfn))
+ {
+ if (!TryShellExec(lfn))
+ {
+ var objShell = new ActiveXObject("Shell.Application");
+ objShell.Open(lfn);
+ }
+ }
+ else if (FileExists(lfn))
+ {
+ execed = false;
+ htmlre = /\.html?$/;
+ txtre = /\.txt$/;
+ if (!lfn.match(htmlre) && !lfn.match(txtre))
+ {
+ execed = TryShellExec(lfn);
+ }
+ if (!execed)
+ {
+ re = /\\/g;
+ lfn = lfn.replace(re, "/");
+ re = /\ /g;
+ lfn = lfn.replace(re, "%20");
+ location.href = 'file:///' + lfn;
+ }
+ }
+ else if (fn.substring(0, 3) == "../")
+ {
+ parser(fn.substring(3));
+ }
+ else
+ {
+ alert(fn + " doesn't exist");
+ }
} \ No newline at end of file
diff --git a/Docs/src/compiler.but b/Docs/src/compiler.but
index dd35af2..e344105 100755
--- a/Docs/src/compiler.but
+++ b/Docs/src/compiler.but
@@ -1,325 +1,325 @@
-\C{comptime} Compile Time Commands
-
-\S0{compcommands} Compiler Utility Commands
-
-These commands are similar to the C preprocessor in terms of purpose and functionality. They allow file inclusion, conditional compilation, executable header packing, and processes execution during the build process. Note: none of these commands allow use of variables.
-
-\S1{include} !include
-
-\c [/NONFATAL] file
-
-This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See \R{addincludedir}{!addincludedir} for more information. If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
-
-\c !include WinMessages.nsh
-\c !include Library.nsh
-\c !include C:\MyConfig.nsi
-\c !include ..\MyConfig.nsh
-\c !include /NONFATAL file_that_may_exist_or_not.nsh
-
-\S1{addincludedir} !addincludedir
-
-\c directory
-
-Adds another include directory to the include directories list. This list is searched when !include is used. This list's initial value is $\{NSISDIR\}\\Include alone.
-
-\c !addincludedir ..\include
-\c !include something.nsh
-
-\S1{addplugindir} !addplugindir
-
-\c directory
-
-Causes the NSIS compiler to scan the given directory for plug-in DLLs.
-
-\c !addplugindir myplugin
-\c MyPlugin::SomeFunction
-
-\S1{appendfile} !appendfile
-
-\c file text
-
-Appends \e{text} to \e{file}.
-
-\c !tempfile FILE
-\c !appendfile "${FILE}" "XPStyle on$\n"
-\c !appendfile "${FILE}" "Name 'test'$\n"
-\c !include "${FILE}"
-\c !delfile "${FILE}"
-\c !undef FILE
-
-\S1{cd} !cd
-
-\c new_path
-
-This command will change the compiler to the new directory, new_path. new_path can be relative or absolute.
-
-\c !cd ..\more-scripts\new
-
-\S1{delfile} !delfile
-
-\c file
-
-This command deletes a file.
-
-\c !tempfile FILE
-\c !delfile "${FILE}"
-\c !undef FILE
-
-\S1{echo} !echo
-
-\c message
-
-This command will echo a message to the user compiling the script.
-
-\c !echo "hello world"
-
-\S1{error} !error
-
-\c [message]
-
-This command will issue an error to the script compiler and will stop execution of the script. You can also add a message to this error.
-
-\c !ifdef VERSION & NOVERSION
-\c !error "both VERSION and NOVERSION are defined"
-\c !endif
-
-\S1{execute} !execute
-
-\c command
-
-This command will execute 'command' using a call to CreateProcess(). Unlike \R{system}{!system}, it does not use the command line processor, so input/output redirection and commands like 'cd', 'dir' and 'type' can not be used. !execute also ignores the return value of the executed command. Currently, the only known advantage of !execute over \R{system}{!system} is that it does not give trouble when the current working directory is specified using UNC.
-
-On POSIX platforms, !execute will use system() just like \R{system}{!system}.
-
-\c !execute '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'
-
-\S1{packhdr} !packhdr
-
-\c tempfile command
-
-This option makes the compiler use an external EXE packer (such as \W{http://www.un4seen.com/petite/}{Petite} or \W{http://upx.sourceforge.net/}{UPX}) to compress the executable header. Specify a temporary file name (such as "temp.dat") and a command line (such as "C:\\program files\\upx\\upx -9 temp.dat") to compress the header.
-
-\c !packhdr "$%TEMP%\exehead.tmp" '"C:\Program Files\UPX\upx.exe" "$%TEMP%\exehead.tmp"'
-
-\S1{system} !system
-
-\c command [compare comparevalue]
-
-This command will execute 'command' using a call to system(), and if the return value compared (using 'compare') to 'comparevalue' is false, execution will halt. 'compare' can be '<' or '>' or '<>' or '='.
-
-\c !system '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'
-\c !system 'echo !define something > newinclude.nsh'
-\c !include newinclude.nsh
-\c !ifdef something
-\c !echo "something is defined"
-\c !endif
-
-\S1{tempfile} !tempfile
-
-\c symbol
-
-This command creates a temporary file. It puts its path into a define, named \e{symbol}.
-
-\c !tempfile PACKHDRTEMP
-\c !packhdr "${PACKHDRTEMP}" '"C:\Program Files\UPX\upx.exe" "${PACKHDRTEMP}"'
-
-\c !tempfile FILE
-\c !define /date DATE "%H:%M:%S %d %b, %Y"
-\c !system 'echo built on ${DATE} > "${FILE}"'
-\c File /oname=build.txt "${FILE}"
-\c !delfile "${FILE}"
-\c !undef FILE
-\c !undef DATE
-
-\S1{warning} !warning
-
-\c [message]
-
-This command will issue a warning to the script compiler. You can also add a message to this warning.
-
-\c !ifdef USE_DANGEROUS_STUFF
-\c !warning "using dangerous stuff"
-\c !endif
-
-\S1{verbose} !verbose
-
-\c level | push | pop
-
-This command will set the level of verbosity. 4=all, 3=no script, 2=no info, 1=no warnings, 0=none.
-
-Passing push will cause !verbose to push the current verbosity level on a special stack. Passing pop will cause !verbose to pop the current verbosity level from the same stack and use it.
-
-\c !verbose push
-\c !verbose 1
-\c !include WinMessages.nsh
-\c !verbose pop
-
-\S0{comppredefines} Predefines
-
-You can use these standard predefines to automatically add the build time to the title of development versions, add the date to the version number, etc.
-
-\S1{prefile} $\{__FILE__\}
-
-Current script name.
-
-\S1{preline} $\{__LINE__\}
-
-Current line number.
-
-\S1{predate} $\{__DATE__\}
-
-Date when the script started compiling according to the current locale.
-
-\S1{pretime} $\{__TIME__\}
-
-Time when the script started compiling according to the current locale.
-
-\S1{pretimestamp} $\{__TIMESTAMP__\}
-
-Date & time of the last modification to the script file according to the current locale.
-
-\S1{scopepredefines} Scope Predefines
-
-Standard predefines that contain information of the current code scope.
-
-\S2{} $\{__GLOBAL__\}
-
-Defined in the global scope.
-
-\c Section test
-\c
-\c !ifdef ${__GLOBAL__}
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c SectionEnd
-\c
-\c Function test
-\c
-\c !ifdef ${__GLOBAL__}
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c FunctionEnd
-\c
-\c PageEx instfiles
-\c
-\c !ifdef ${__GLOBAL__}
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c PageExEnd
-
-\S2{} $\{__SECTION__\}
-
-Defined as the section name, without any prefixes, in \R{ssection}{section} scope.
-
-\c !ifdef __SECTION__
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c Section test
-\c
-\c !ifndef __SECTION__
-\c !error "missing predefine!"
-\c !endif
-\c
-\c !if ${__SECTION__} != test
-\c !error "wrong predefine value!"
-\c !endif
-\c
-\c SectionEnd
-\c
-\c Section !test
-\c
-\c !if ${__SECTION__} != test
-\c !error "wrong predefine value!"
-\c !endif
-\c
-\c SectionEnd
-\c
-\c Section un.test
-\c
-\c !if ${__SECTION__} != test
-\c !error "wrong predefine value!"
-\c !endif
-\c
-\c SectionEnd
-
-\S2{} $\{__FUNCTION__\}
-
-Defined as the function name, without any prefixes, in \R{ffunction}{function} scope.
-
-\c !ifdef __FUNCTION__
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c Function test
-\c
-\c !ifndef __FUNCTION__
-\c !error "missing predefine!"
-\c !endif
-\c
-\c !if ${__FUNCTION__} != test
-\c !error "wrong predefine value!"
-\c !endif
-\c
-\c FunctionEnd
-\c
-\c Function un.test
-\c
-\c !if ${__FUNCTION__} != test
-\c !error "wrong predefine value!"
-\c !endif
-\c
-\c FunctionEnd
-
-\S2{} $\{__PAGEEX__\}
-
-Defined as the page type in \R{pageex}{PageEx} scope.
-
-\c !ifdef __PAGEEX__
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c PageEx instfiles
-\c
-\c !ifndef __PAGEEX__
-\c !error "missing predefine!"
-\c !endif
-\c
-\c !if ${__PAGEEX__} != instfiles
-\c !error "wrong page type"
-\c !endif
-\c
-\c PageExEnd
-
-\S2{} $\{__UNINSTALL__\}
-
-Defined in \R{ssection}{section}, \R{ffunction}{function} or \R{pageex}{PageEx} scopes of the uninstaller.
-
-\c !ifdef __UNINSTALL__
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c Function test
-\c
-\c !ifdef __UNINSTALL__
-\c !error "this shouldn't be here!"
-\c !endif
-\c
-\c FunctionEnd
-\c
-\c Function un.test
-\c
-\c !ifndef __UNINSTALL__
-\c !error "missing predefine!"
-\c !endif
-\c
-\c FunctionEnd
-
-\S0{compenvvarread} Read environment variables
-
-\S1{compenvvar} $%envVarName%
-
-$%envVarName% will be replaced on compile time by the environment variable envVarName.
+\C{comptime} Compile Time Commands
+
+\S0{compcommands} Compiler Utility Commands
+
+These commands are similar to the C preprocessor in terms of purpose and functionality. They allow file inclusion, conditional compilation, executable header packing, and processes execution during the build process. Note: none of these commands allow use of variables.
+
+\S1{include} !include
+
+\c [/NONFATAL] file
+
+This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See \R{addincludedir}{!addincludedir} for more information. If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error.
+
+\c !include WinMessages.nsh
+\c !include Library.nsh
+\c !include C:\MyConfig.nsi
+\c !include ..\MyConfig.nsh
+\c !include /NONFATAL file_that_may_exist_or_not.nsh
+
+\S1{addincludedir} !addincludedir
+
+\c directory
+
+Adds another include directory to the include directories list. This list is searched when !include is used. This list's initial value is $\{NSISDIR\}\\Include alone.
+
+\c !addincludedir ..\include
+\c !include something.nsh
+
+\S1{addplugindir} !addplugindir
+
+\c directory
+
+Causes the NSIS compiler to scan the given directory for plug-in DLLs.
+
+\c !addplugindir myplugin
+\c MyPlugin::SomeFunction
+
+\S1{appendfile} !appendfile
+
+\c file text
+
+Appends \e{text} to \e{file}.
+
+\c !tempfile FILE
+\c !appendfile "${FILE}" "XPStyle on$\n"
+\c !appendfile "${FILE}" "Name 'test'$\n"
+\c !include "${FILE}"
+\c !delfile "${FILE}"
+\c !undef FILE
+
+\S1{cd} !cd
+
+\c new_path
+
+This command will change the compiler to the new directory, new_path. new_path can be relative or absolute.
+
+\c !cd ..\more-scripts\new
+
+\S1{delfile} !delfile
+
+\c file
+
+This command deletes a file.
+
+\c !tempfile FILE
+\c !delfile "${FILE}"
+\c !undef FILE
+
+\S1{echo} !echo
+
+\c message
+
+This command will echo a message to the user compiling the script.
+
+\c !echo "hello world"
+
+\S1{error} !error
+
+\c [message]
+
+This command will issue an error to the script compiler and will stop execution of the script. You can also add a message to this error.
+
+\c !ifdef VERSION & NOVERSION
+\c !error "both VERSION and NOVERSION are defined"
+\c !endif
+
+\S1{execute} !execute
+
+\c command
+
+This command will execute 'command' using a call to CreateProcess(). Unlike \R{system}{!system}, it does not use the command line processor, so input/output redirection and commands like 'cd', 'dir' and 'type' can not be used. !execute also ignores the return value of the executed command. Currently, the only known advantage of !execute over \R{system}{!system} is that it does not give trouble when the current working directory is specified using UNC.
+
+On POSIX platforms, !execute will use system() just like \R{system}{!system}.
+
+\c !execute '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'
+
+\S1{packhdr} !packhdr
+
+\c tempfile command
+
+This option makes the compiler use an external EXE packer (such as \W{http://www.un4seen.com/petite/}{Petite} or \W{http://upx.sourceforge.net/}{UPX}) to compress the executable header. Specify a temporary file name (such as "temp.dat") and a command line (such as "C:\\program files\\upx\\upx -9 temp.dat") to compress the header.
+
+\c !packhdr "$%TEMP%\exehead.tmp" '"C:\Program Files\UPX\upx.exe" "$%TEMP%\exehead.tmp"'
+
+\S1{system} !system
+
+\c command [compare comparevalue]
+
+This command will execute 'command' using a call to system(), and if the return value compared (using 'compare') to 'comparevalue' is false, execution will halt. 'compare' can be '<' or '>' or '<>' or '='.
+
+\c !system '"%WINDIR%\notepad.exe" "${NSISDIR}\license.txt"'
+\c !system 'echo !define something > newinclude.nsh'
+\c !include newinclude.nsh
+\c !ifdef something
+\c !echo "something is defined"
+\c !endif
+
+\S1{tempfile} !tempfile
+
+\c symbol
+
+This command creates a temporary file. It puts its path into a define, named \e{symbol}.
+
+\c !tempfile PACKHDRTEMP
+\c !packhdr "${PACKHDRTEMP}" '"C:\Program Files\UPX\upx.exe" "${PACKHDRTEMP}"'
+
+\c !tempfile FILE
+\c !define /date DATE "%H:%M:%S %d %b, %Y"
+\c !system 'echo built on ${DATE} > "${FILE}"'
+\c File /oname=build.txt "${FILE}"
+\c !delfile "${FILE}"
+\c !undef FILE
+\c !undef DATE
+
+\S1{warning} !warning
+
+\c [message]
+
+This command will issue a warning to the script compiler. You can also add a message to this warning.
+
+\c !ifdef USE_DANGEROUS_STUFF
+\c !warning "using dangerous stuff"
+\c !endif
+
+\S1{verbose} !verbose
+
+\c level | push | pop
+
+This command will set the level of verbosity. 4=all, 3=no script, 2=no info, 1=no warnings, 0=none.
+
+Passing push will cause !verbose to push the current verbosity level on a special stack. Passing pop will cause !verbose to pop the current verbosity level from the same stack and use it.
+
+\c !verbose push
+\c !verbose 1
+\c !include WinMessages.nsh
+\c !verbose pop
+
+\S0{comppredefines} Predefines
+
+You can use these standard predefines to automatically add the build time to the title of development versions, add the date to the version number, etc.
+
+\S1{prefile} $\{__FILE__\}
+
+Current script name.
+
+\S1{preline} $\{__LINE__\}
+
+Current line number.
+
+\S1{predate} $\{__DATE__\}
+
+Date when the script started compiling according to the current locale.
+
+\S1{pretime} $\{__TIME__\}
+
+Time when the script started compiling according to the current locale.
+
+\S1{pretimestamp} $\{__TIMESTAMP__\}
+
+Date & time of the last modification to the script file according to the current locale.
+
+\S1{scopepredefines} Scope Predefines
+
+Standard predefines that contain information of the current code scope.
+
+\S2{} $\{__GLOBAL__\}
+
+Defined in the global scope.
+
+\c Section test
+\c
+\c !ifdef ${__GLOBAL__}
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c SectionEnd
+\c
+\c Function test
+\c
+\c !ifdef ${__GLOBAL__}
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c FunctionEnd
+\c
+\c PageEx instfiles
+\c
+\c !ifdef ${__GLOBAL__}
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c PageExEnd
+
+\S2{} $\{__SECTION__\}
+
+Defined as the section name, without any prefixes, in \R{ssection}{section} scope.
+
+\c !ifdef __SECTION__
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c Section test
+\c
+\c !ifndef __SECTION__
+\c !error "missing predefine!"
+\c !endif
+\c
+\c !if ${__SECTION__} != test
+\c !error "wrong predefine value!"
+\c !endif
+\c
+\c SectionEnd
+\c
+\c Section !test
+\c
+\c !if ${__SECTION__} != test
+\c !error "wrong predefine value!"
+\c !endif
+\c
+\c SectionEnd
+\c
+\c Section un.test
+\c
+\c !if ${__SECTION__} != test
+\c !error "wrong predefine value!"
+\c !endif
+\c
+\c SectionEnd
+
+\S2{} $\{__FUNCTION__\}
+
+Defined as the function name, without any prefixes, in \R{ffunction}{function} scope.
+
+\c !ifdef __FUNCTION__
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c Function test
+\c
+\c !ifndef __FUNCTION__
+\c !error "missing predefine!"
+\c !endif
+\c
+\c !if ${__FUNCTION__} != test
+\c !error "wrong predefine value!"
+\c !endif
+\c
+\c FunctionEnd
+\c
+\c Function un.test
+\c
+\c !if ${__FUNCTION__} != test
+\c !error "wrong predefine value!"
+\c !endif
+\c
+\c FunctionEnd
+
+\S2{} $\{__PAGEEX__\}
+
+Defined as the page type in \R{pageex}{PageEx} scope.
+
+\c !ifdef __PAGEEX__
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c PageEx instfiles
+\c
+\c !ifndef __PAGEEX__
+\c !error "missing predefine!"
+\c !endif
+\c
+\c !if ${__PAGEEX__} != instfiles
+\c !error "wrong page type"
+\c !endif
+\c
+\c PageExEnd
+
+\S2{} $\{__UNINSTALL__\}
+
+Defined in \R{ssection}{section}, \R{ffunction}{function} or \R{pageex}{PageEx} scopes of the uninstaller.
+
+\c !ifdef __UNINSTALL__
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c Function test
+\c
+\c !ifdef __UNINSTALL__
+\c !error "this shouldn't be here!"
+\c !endif
+\c
+\c FunctionEnd
+\c
+\c Function un.test
+\c
+\c !ifndef __UNINSTALL__
+\c !error "missing predefine!"
+\c !endif
+\c
+\c FunctionEnd
+
+\S0{compenvvarread} Read environment variables
+
+\S1{compenvvar} $%envVarName%
+
+$%envVarName% will be replaced on compile time by the environment variable envVarName.
diff --git a/Docs/src/compilerflags.but b/Docs/src/compilerflags.but
index fb3b33e..91ffdd5 100755
--- a/Docs/src/compilerflags.but
+++ b/Docs/src/compilerflags.but
@@ -1,145 +1,145 @@
-\S1{flags} Compiler Flags
-
-The following commands affect how the compiler generates code and compresses data. Unless otherwise noted, these commands are valid anywhere in the script, and effect every line below where each one is placed (until overridden by another command). They cannot be jumped over using \R{flowcontrol}{flow control insutrctions}.
-
-For example, in the following script, blah.dat will never be overwritten.
-
-\c ${If} $0 == 0
-\c SetOverwrite on
-\c ${Else}
-\c SetOverwrite off
-\c ${EndIf}
-\c File blah.dat # overwrite is always off here!
-
-Instead, the following should be used.
-
-\c ${If} $0 == 0
-\c SetOverwrite on
-\c File blah.dat
-\c ${Else}
-\c SetOverwrite off
-\c File blah.dat
-\c ${EndIf}
-
-\S2{asetallowskipfiles} AllowSkipFiles
-
-\c \\<b\\>on\\</b\\>|off
-
-This command specifies whether the user should be able to skip a file or not. A user has an option to skip a file if \R{asetoverwrite}{SetOverwrite} is set to on (default) and the installer fails to open a file for writing when trying to extract a file. If \e{off} is used the ignore button which allows the user to skip the file will not show and the user will only have an option to abort the installation (Cancel button) or retry opening the file for writing (Retry button). If \e{on} is used the user will have an option to skip the file (error flag will be set - see \R{asetoverwrite}{SetOverwrite}).
-
-\S2{afilebufsize} FileBufSize
-
-\c buffer_size_in_mb
-
-This command sets the size of the compiler's internal file buffers. This command allows you to control the compiler's memory usage by limiting how much of a given file it will load into memory at once. Since the compiler needs both input and output, twice the memory size specified could be used at any given time for file buffers. This command does not limit the compression buffers which could take another couple of MB, neither does it limit the compiler's other internal buffers, but those shouldn't normally top 1MB anyway. Specifying a very small number could decrease performance. Specifying a very large number could exhaust system resources and force the compiler to cancel the compilation process. The default value is 32MB.
-
-\S2{asetcompress} SetCompress
-
-\c \\<b\\>auto\\</b\\>|force|off
-
-This command sets the compress flag which is used by the installer to determine whether or not data should be compressed. Typically the SetCompress flag will affect the commands after it, and the last SetCompress command in the file also determines whether or not the install info section and uninstall data of the installer is compressed. If compressflag is 'auto', then files are compressed if the compressed size is smaller than the uncompressed size. If compressflag is set to 'force', then the compressed version is always used. If compressflag is 'off' then compression is not used (which can be faster).
-
-Note that this option has no effect when solid compression is used.
-
-\S2{asetcompressor} SetCompressor
-
-\c [/SOLID] [/FINAL] \\<b\\>zlib\\</b\\>|bzip2|lzma
-
-This command sets the compression algorithm used to compress files/data in the installer. It can only be used outside of sections and functions and before any data is compressed. Different compression methods can not be used for different files in the same installer. It is recommended to use it on the very top of the script to avoid compilation errors.
-
-Three compression methods are supported: ZLIB, BZIP2 and LZMA.
-
-ZLIB (the default) uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.
-
-BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.
-
-LZMA is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.
-
-If \e{/FINAL} is used, subsequent calls to SetCompressor will be ignored.
-
-If \e{/SOLID} is used, all of the installer data is compressed in one block. This results in greater compression ratios.
-
-\S2{asetcompressordictsize} SetCompressorDictSize
-
-\c dict_size_mb
-
-Sets the dictionary size in megabytes (MB) used by the LZMA compressor (default is 8 MB).
-
-\S2{asetdatablockoptimize} SetDatablockOptimize
-
-\c \\<b\\>on\\</b\\>|off
-
-This command tells the compiler whether or not to do datablock optimizations. Datablock optimizations have the compiler check to see if any data being added to the data block is already in the data block, and if so, it is simply referenced as opposed to added (can save a little bit of size). It is highly recommended to leave this option on.
-
-\S2{asetdatesave} SetDateSave
-
-\c \\<b\\>on\\</b\\>|off
-
-This command sets the file date/time saving flag which is used by the File command to determine whether or not to save the last write date and time of the file, so that it can be restored on installation. Valid flags are 'on' and 'off'. 'on' is the default.
-
-\S2{asetoverwrite} SetOverwrite
-
-\c \\<b\\>on\\</b\\>|off|try|ifnewer|ifdiff|lastused
-
-This command sets the overwrite flag which is used by the \R{file}{File} command to determine whether or not the file should overwrite any existing files that are present. If overwriteflag is 'on', files are overwritten (this is the default). If overwriteflag is 'off', files that are already present are not overwritten. If overwriteflag is 'try', files are overwritten if possible (meaning that if the file is not able to be written to, it is skipped without any user interaction). If overwriteflag is 'ifnewer', then files are only overwritten if the existing file is older than the new file. If overwriteflag is 'ifdiff', then files are only overwritten if the existing file is older or newer than the new file. Note that when in 'ifnewer' or 'ifdiff' mode, the destination file's date is set, regardless of what SetDateSave is set to.
-
-\c SetOverwrite off
-\c File program.cfg # config file we don't want to overwrite
-\c SetOverwrite on
-
-\S2{setpluginunload} SetPluginUnload
-
-\c \\<b\\>manual\\</b\\>|alwaysoff
-
-This command sets the unload plug-in flag which is by \R{callinstdll}{CallInstDLL} and \R{plugindlls}{plug-in calls}. Setting this to always off will behave as if you have added the /NOUNLOAD to every CallInstDLL and plug-in call. Setting this to manual will only not unload if you specifically use /NOUNLOAD.
-
-\S1{versioninfo} Version Information
-
-\S2{viaddversionkey} VIAddVersionKey
-
-\c [/LANG=lang_id] keyname value
-
-Adds a field in the Version Tab of the File Properties. This can either be a field provided by the system or a user defined field.
-The following fields are provided by the System:
-
-\b ProductName
-
-\b Comments
-
-\b CompanyName
-
-\b LegalCopyright
-
-\b FileDescription
-
-\b FileVersion
-
-\b ProductVersion
-
-\b InternalName
-
-\b LegalTrademarks
-
-\b OriginalFilename
-
-\b PrivateBuild
-
-\b SpecialBuild
-
-The name of these fields are translated on the target system, whereas user defined fields remain untranslated.
-
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Test Application"
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment"
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Fake company"
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Test Application is a trademark of Fake company"
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© Fake company"
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application"
-\c VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3"
-
-\S2{viproductversion} VIProductVersion
-
-\c [version_string_X.X.X.X]
-
-Adds the Product Version on top of the Version Tab in the Properties of the file.
-
-\c VIProductVersion "1.2.3.4"
+\S1{flags} Compiler Flags
+
+The following commands affect how the compiler generates code and compresses data. Unless otherwise noted, these commands are valid anywhere in the script, and effect every line below where each one is placed (until overridden by another command). They cannot be jumped over using \R{flowcontrol}{flow control insutrctions}.
+
+For example, in the following script, blah.dat will never be overwritten.
+
+\c ${If} $0 == 0
+\c SetOverwrite on
+\c ${Else}
+\c SetOverwrite off
+\c ${EndIf}
+\c File blah.dat # overwrite is always off here!
+
+Instead, the following should be used.
+
+\c ${If} $0 == 0
+\c SetOverwrite on
+\c File blah.dat
+\c ${Else}
+\c SetOverwrite off
+\c File blah.dat
+\c ${EndIf}
+
+\S2{asetallowskipfiles} AllowSkipFiles
+
+\c \\<b\\>on\\</b\\>|off
+
+This command specifies whether the user should be able to skip a file or not. A user has an option to skip a file if \R{asetoverwrite}{SetOverwrite} is set to on (default) and the installer fails to open a file for writing when trying to extract a file. If \e{off} is used the ignore button which allows the user to skip the file will not show and the user will only have an option to abort the installation (Cancel button) or retry opening the file for writing (Retry button). If \e{on} is used the user will have an option to skip the file (error flag will be set - see \R{asetoverwrite}{SetOverwrite}).
+
+\S2{afilebufsize} FileBufSize
+
+\c buffer_size_in_mb
+
+This command sets the size of the compiler's internal file buffers. This command allows you to control the compiler's memory usage by limiting how much of a given file it will load into memory at once. Since the compiler needs both input and output, twice the memory size specified could be used at any given time for file buffers. This command does not limit the compression buffers which could take another couple of MB, neither does it limit the compiler's other internal buffers, but those shouldn't normally top 1MB anyway. Specifying a very small number could decrease performance. Specifying a very large number could exhaust system resources and force the compiler to cancel the compilation process. The default value is 32MB.
+
+\S2{asetcompress} SetCompress
+
+\c \\<b\\>auto\\</b\\>|force|off
+
+This command sets the compress flag which is used by the installer to determine whether or not data should be compressed. Typically the SetCompress flag will affect the commands after it, and the last SetCompress command in the file also determines whether or not the install info section and uninstall data of the installer is compressed. If compressflag is 'auto', then files are compressed if the compressed size is smaller than the uncompressed size. If compressflag is set to 'force', then the compressed version is always used. If compressflag is 'off' then compression is not used (which can be faster).
+
+Note that this option has no effect when solid compression is used.
+
+\S2{asetcompressor} SetCompressor
+
+\c [/SOLID] [/FINAL] \\<b\\>zlib\\</b\\>|bzip2|lzma
+
+This command sets the compression algorithm used to compress files/data in the installer. It can only be used outside of sections and functions and before any data is compressed. Different compression methods can not be used for different files in the same installer. It is recommended to use it on the very top of the script to avoid compilation errors.
+
+Three compression methods are supported: ZLIB, BZIP2 and LZMA.
+
+ZLIB (the default) uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.
+
+BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.
+
+LZMA is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.
+
+If \e{/FINAL} is used, subsequent calls to SetCompressor will be ignored.
+
+If \e{/SOLID} is used, all of the installer data is compressed in one block. This results in greater compression ratios.
+
+\S2{asetcompressordictsize} SetCompressorDictSize
+
+\c dict_size_mb
+
+Sets the dictionary size in megabytes (MB) used by the LZMA compressor (default is 8 MB).
+
+\S2{asetdatablockoptimize} SetDatablockOptimize
+
+\c \\<b\\>on\\</b\\>|off
+
+This command tells the compiler whether or not to do datablock optimizations. Datablock optimizations have the compiler check to see if any data being added to the data block is already in the data block, and if so, it is simply referenced as opposed to added (can save a little bit of size). It is highly recommended to leave this option on.
+
+\S2{asetdatesave} SetDateSave
+
+\c \\<b\\>on\\</b\\>|off
+
+This command sets the file date/time saving flag which is used by the File command to determine whether or not to save the last write date and time of the file, so that it can be restored on installation. Valid flags are 'on' and 'off'. 'on' is the default.
+
+\S2{asetoverwrite} SetOverwrite
+
+\c \\<b\\>on\\</b\\>|off|try|ifnewer|ifdiff|lastused
+
+This command sets the overwrite flag which is used by the \R{file}{File} command to determine whether or not the file should overwrite any existing files that are present. If overwriteflag is 'on', files are overwritten (this is the default). If overwriteflag is 'off', files that are already present are not overwritten. If overwriteflag is 'try', files are overwritten if possible (meaning that if the file is not able to be written to, it is skipped without any user interaction). If overwriteflag is 'ifnewer', then files are only overwritten if the existing file is older than the new file. If overwriteflag is 'ifdiff', then files are only overwritten if the existing file is older or newer than the new file. Note that when in 'ifnewer' or 'ifdiff' mode, the destination file's date is set, regardless of what SetDateSave is set to.
+
+\c SetOverwrite off
+\c File program.cfg # config file we don't want to overwrite
+\c SetOverwrite on
+
+\S2{setpluginunload} SetPluginUnload
+
+\c \\<b\\>manual\\</b\\>|alwaysoff
+
+This command sets the unload plug-in flag which is by \R{callinstdll}{CallInstDLL} and \R{plugindlls}{plug-in calls}. Setting this to always off will behave as if you have added the /NOUNLOAD to every CallInstDLL and plug-in call. Setting this to manual will only not unload if you specifically use /NOUNLOAD.
+
+\S1{versioninfo} Version Information
+
+\S2{viaddversionkey} VIAddVersionKey
+
+\c [/LANG=lang_id] keyname value
+
+Adds a field in the Version Tab of the File Properties. This can either be a field provided by the system or a user defined field.
+The following fields are provided by the System:
+
+\b ProductName
+
+\b Comments
+
+\b CompanyName
+
+\b LegalCopyright
+
+\b FileDescription
+
+\b FileVersion
+
+\b ProductVersion
+
+\b InternalName
+
+\b LegalTrademarks
+
+\b OriginalFilename
+
+\b PrivateBuild
+
+\b SpecialBuild
+
+The name of these fields are translated on the target system, whereas user defined fields remain untranslated.
+
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Test Application"
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment"
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Fake company"
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Test Application is a trademark of Fake company"
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© Fake company"
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application"
+\c VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3"
+
+\S2{viproductversion} VIProductVersion
+
+\c [version_string_X.X.X.X]
+
+Adds the Product Version on top of the Version Tab in the Properties of the file.
+
+\c VIProductVersion "1.2.3.4"
diff --git a/Docs/src/config.but b/Docs/src/config.but
index 188732a..92f2708 100755
--- a/Docs/src/config.but
+++ b/Docs/src/config.but
@@ -1,19 +1,19 @@
-\title NSIS Users Manual
-
-\cfg{xhtml-leaf-level}{1}
-
-\cfg{xhtml-leaf-smallest-contents}{3}
-
-\cfg{xhtml-leaf-contains-contents}{true}
-
-\cfg{xhtml-contents-depth-0}{3}
-
-\cfg{xhtml-head-end}{<link rel="stylesheet" href="style.css" type='text/css' />}
-
-\preamble NSIS is a free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge.
-
-\preamble Check \W{http://nsis.sourceforge.net/}{http://nsis.sf.net} for news, information, support, examples, tutorials and more.
-
-\preamble Quick links:\\<br\\>\W{http://nsis.sourceforge.net/support/faq/}{FAQ} - A list of frequently asked questions\\<br\\>\W{http://nsis.sourceforge.net/wiki/}{NSIS Wiki} - Examples, functions, tutorials, plug-ins, software and more\\<br\\>\W{http://forums.winamp.com/forumdisplay.php?forumid=65}{Forum} - Post questions or discuss NSIS features
-
+\title NSIS Users Manual
+
+\cfg{xhtml-leaf-level}{1}
+
+\cfg{xhtml-leaf-smallest-contents}{3}
+
+\cfg{xhtml-leaf-contains-contents}{true}
+
+\cfg{xhtml-contents-depth-0}{3}
+
+\cfg{xhtml-head-end}{<link rel="stylesheet" href="style.css" type='text/css' />}
+
+\preamble NSIS is a free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge.
+
+\preamble Check \W{http://nsis.sourceforge.net/}{http://nsis.sf.net} for news, information, support, examples, tutorials and more.
+
+\preamble Quick links:\\<br\\>\W{http://nsis.sourceforge.net/support/faq/}{FAQ} - A list of frequently asked questions\\<br\\>\W{http://nsis.sourceforge.net/wiki/}{NSIS Wiki} - Examples, functions, tutorials, plug-ins, software and more\\<br\\>\W{http://forums.winamp.com/forumdisplay.php?forumid=65}{Forum} - Post questions or discuss NSIS features
+
\copyright Copyright (C) 1999-2007 Contributors \ No newline at end of file
diff --git a/Docs/src/credits.but b/Docs/src/credits.but
index d9a402c..9e39cc1 100755
--- a/Docs/src/credits.but
+++ b/Docs/src/credits.but
@@ -1,221 +1,221 @@
-\A{credits} Credits
-
-\H{programmers} Programmers
-
-\e{Justin Frankel aka 0xDEADBEEF}
-
-\b Creating the all mighty NSIS
-
-\e{Amir "make me stop" Szekely aka KiCHiK}
-
-\b Multilingual NSIS
-
-\b RTF license text
-
-\b The new paging system
-
-\b Full color support for icons and bitmaps
-
-\b Branding image
-
-\b Customizable UI
-
-\b One makensis.exe for both zlib and bzip2
-
-\e{Joost Verburg}
-
-\b Modern User Interface
-
-\b NSIS website
-
-\b NSIS Menu
-
-\b System for DLL/TLB library setup
-
-\b NSIS Update for NSIS distribution (original version by Nathan Purciful)
-
-\e{Robert Rainwater}
-
-\b MakeNSISW
-
-\b New documentation format
-
-\b Enhancing the TreeView
-
-\b Reorganizing NSIS directory structure
-
-\e{Dave "bit-by-bit" Laundon aka eccles}
-
-\b Massive optimizing
-
-\e{Ximon Eighteen aka Sunjammer}
-
-\b The new plug-ins system
-
-\b "Copy to clipboard" context menu for the Details window
-
-\b License text initial focus
-
-\e{Ramon aka Ramon18}
-
-\b Version information resource commands
-
-\b Named user variables
-
-\b Lots of UI fixes
-
-\b InstallOptions improvements
-
-\e{nnop@newmail.ru}
-
-\e{Ryan Geiss}
-
-\e{Andras Varga}
-
-\e{Drew Davidson}
-
-\e{Peter Windridge}
-
-\e{Yaroslav Faybishenko}
-
-\e{Jeff Doozan}
-
-\b NSIS 2's new TreeView
-
-\e{Nike (nike@sendmail.ru)}
-
-\b HTML Help support for Halibut
-
-\e{Diego Pedroso aka deguix}
-
-\b New NSIS Wiki
-
-\e{Shengalts Aleksander aka Instructor}
-
-\e{Stuart Welch aka Afrow UK}
-
-\e{David Weiss aka Comm@nder21}
-
-\H{designers} Designers
-
-\e{Nikos Adamamas}
-
-\b The new modern icons
-
-\e{Jan T. Sott / whyEye.org}
-
-\b Lots of icons and check marks
-
-\H{translators} Translators
-
-Albanian - \e{Besnik Bleta}
-
-Afrikaans - \e{Friedel Wolff}
-
-Arabic - \e{asdfuae, Rami Kattan}
-
-Basque - \e{I\u00F1aki San Vicente}
-
-Belarusian - \e{Sitnikov Vjacheslav}
-
-Bosnian - \e{Salih CAVKIC}
-
-Breton - \e{Korvigello\uF9 An Drouizig}
-
-Bulgarian - \e{Asparouh Kalyandjiev, Plamen Penkov}
-
-Catalan - \e{falanko}
-
-Croatian - \e{Igor Ostriz, Vedran "RIV@NVX" Miletic}
-
-Czech - \e{T.V. Zuggy, SELiCE}
-
-Danish - \e{Christopher, Casper Bergenstoff, Claus Futtrup}
-
-Dutch - \e{Hendri Adriaens, Joost Verburg}
-
-Estonian - \e{izzo}
-
-Farsi - \e{Masoud Alinaqian, FzerorubigD, Elnaz Sarbar}
-
-Finnish - \e{AKX, Eclipser}
-
-French - \e{veekee, Sebastien Delahaye, Jerome Charaoui}
-
-Galician - \e{Ramon Flores}
-
-German - \e{L.King, K. Windszus, R. Bisswanger, M. Simmack, Tim Kosse}
-
-Greek - \e{Makidis N. Michael}
-
-Hebrew - \e{Amir Szekely (aka KiCHiK), Yaron Shahrabani}
-
-Hungarian - \e{Soft-Trans Bt., Jozsef Tamas Herczeg, Lajos Molnar (Orfanik)}
-
-Icelandic - \e{Gretar Orri Kristinsson}
-
-Indonesian - \e{ariel825010106}
-
-Italian - \e{Orfanik, sanface, Alessandro Staltari, Lorenzo Bevilacqua}
-
-Japanese - \e{Dnanako, Takahiro Yoshimura}
-
-Korean - \e{dTomoyo, linak, koder}
-
-Kurdish - \e{Erdal Ronahi}
-
-Latvian - \e{Valdis Griíis, Kristaps Meòìelis}
-
-Lithuanian - \e{NorCis, Vytautas Krivickas, Danielius Scepanskis}
-
-Luxembourgish - \e{Jo Hoeser}
-
-Macedonian - \e{Sasko Zdravkin}
-
-Mongolian - \e{Bayarsaikhan Enkhtaivan}
-
-Norwegian - \e{Jonas Christoffer Lindstrom, Jan Ivar Beddari}
-
-Norwegian Nynorsk - \e{Vebj\u00F8rn Sture}
-
-Polish - \e{Piotr Murawski, Rafa³ Lampe, cube, SYSTEMsoft Group}
-
-Portuguese - \e{DragonSoull, Dre', Ramon}
-
-Portuguese Brasil - \e{Layout do Brasil, deguix}
-
-Romanian - \e{Sorin Sbarnea, Cristian Pirvu, George Radu, Vlad Rusu}
-
-Russian - \e{Sergey `Timon` Kusnetsov, Nik Medved, Scam, THRaSH, Dmitry Yerokhin}
-
-Serbian - \e{Srdjan Obucina}
-
-Serbian Latin - \e{Srdjan Obucina, Vladan Obradovic}
-
-Slovak - \e{trace, Kypec, Mari\u00e1n Hikan\u00edk}
-
-Slovenian - \e{Janez Dolinar, Martin Sebotnjak}
-
-Spanish - \e{MoNKi, Lobo Lunar, Darwin Rodrigo Toledo C\u00e1ceres}
-
-Swedish - \e{Peter Gustafsson, Magnus Bonnevier, Rickard Angbratt}
-
-Thai - \e{SoKoOLz, TuW@nNu (asdfuae)}
-
-Traditional & Simplified Chinese - \e{Kii Ali}
-
-Turkish - \e{Bertan Kodamanoglu, Cagatay Dilsiz, Fatih BOY}
-
-Ukrainian - \e{Yuri Holubow, Nash-Soft}
-
-Uzbek - \e{Emil Garipov (emil.garipov@gmail.com)}
-
-Valencian - \e{Bernardo Arlandis Ma\uF1\uF3}
-
-Welsh - \e{Rhoslyn Prys, Meddal.com}
-
-\H{writers} Writers
-
-\e{Sebastian Armbrust aka flizebogen}
-
-\b Tutorial
+\A{credits} Credits
+
+\H{programmers} Programmers
+
+\e{Justin Frankel aka 0xDEADBEEF}
+
+\b Creating the all mighty NSIS
+
+\e{Amir "make me stop" Szekely aka KiCHiK}
+
+\b Multilingual NSIS
+
+\b RTF license text
+
+\b The new paging system
+
+\b Full color support for icons and bitmaps
+
+\b Branding image
+
+\b Customizable UI
+
+\b One makensis.exe for both zlib and bzip2
+
+\e{Joost Verburg}
+
+\b Modern User Interface
+
+\b NSIS website
+
+\b NSIS Menu
+
+\b System for DLL/TLB library setup
+
+\b NSIS Update for NSIS distribution (original version by Nathan Purciful)
+
+\e{Robert Rainwater}
+
+\b MakeNSISW
+
+\b New documentation format
+
+\b Enhancing the TreeView
+
+\b Reorganizing NSIS directory structure
+
+\e{Dave "bit-by-bit" Laundon aka eccles}
+
+\b Massive optimizing
+
+\e{Ximon Eighteen aka Sunjammer}
+
+\b The new plug-ins system
+
+\b "Copy to clipboard" context menu for the Details window
+
+\b License text initial focus
+
+\e{Ramon aka Ramon18}
+
+\b Version information resource commands
+
+\b Named user variables
+
+\b Lots of UI fixes
+
+\b InstallOptions improvements
+
+\e{nnop@newmail.ru}
+
+\e{Ryan Geiss}
+
+\e{Andras Varga}
+
+\e{Drew Davidson}
+
+\e{Peter Windridge}
+
+\e{Yaroslav Faybishenko}
+
+\e{Jeff Doozan}
+
+\b NSIS 2's new TreeView
+
+\e{Nike (nike@sendmail.ru)}
+
+\b HTML Help support for Halibut
+
+\e{Diego Pedroso aka deguix}
+
+\b New NSIS Wiki
+
+\e{Shengalts Aleksander aka Instructor}
+
+\e{Stuart Welch aka Afrow UK}
+
+\e{David Weiss aka Comm@nder21}
+
+\H{designers} Designers
+
+\e{Nikos Adamamas}
+
+\b The new modern icons
+
+\e{Jan T. Sott / whyEye.org}
+
+\b Lots of icons and check marks
+
+\H{translators} Translators
+
+Albanian - \e{Besnik Bleta}
+
+Afrikaans - \e{Friedel Wolff}
+
+Arabic - \e{asdfuae, Rami Kattan}
+
+Basque - \e{I\u00F1aki San Vicente}
+
+Belarusian - \e{Sitnikov Vjacheslav}
+
+Bosnian - \e{Salih CAVKIC}
+
+Breton - \e{Korvigello\uF9 An Drouizig}
+
+Bulgarian - \e{Asparouh Kalyandjiev, Plamen Penkov}
+
+Catalan - \e{falanko}
+
+Croatian - \e{Igor Ostriz, Vedran "RIV@NVX" Miletic}
+
+Czech - \e{T.V. Zuggy, SELiCE}
+
+Danish - \e{Christopher, Casper Bergenstoff, Claus Futtrup}
+
+Dutch - \e{Hendri Adriaens, Joost Verburg}
+
+Estonian - \e{izzo}
+
+Farsi - \e{Masoud Alinaqian, FzerorubigD, Elnaz Sarbar}
+
+Finnish - \e{AKX, Eclipser}
+
+French - \e{veekee, Sebastien Delahaye, Jerome Charaoui}
+
+Galician - \e{Ramon Flores}
+
+German - \e{L.King, K. Windszus, R. Bisswanger, M. Simmack, Tim Kosse}
+
+Greek - \e{Makidis N. Michael}
+
+Hebrew - \e{Amir Szekely (aka KiCHiK), Yaron Shahrabani}
+
+Hungarian - \e{Soft-Trans Bt., Jozsef Tamas Herczeg, Lajos Molnar (Orfanik)}
+
+Icelandic - \e{Gretar Orri Kristinsson}
+
+Indonesian - \e{ariel825010106}
+
+Italian - \e{Orfanik, sanface, Alessandro Staltari, Lorenzo Bevilacqua}
+
+Japanese - \e{Dnanako, Takahiro Yoshimura}
+
+Korean - \e{dTomoyo, linak, koder}
+
+Kurdish - \e{Erdal Ronahi}
+
+Latvian - \e{Valdis Griíis, Kristaps Meòìelis}
+
+Lithuanian - \e{NorCis, Vytautas Krivickas, Danielius Scepanskis}
+
+Luxembourgish - \e{Jo Hoeser}
+
+Macedonian - \e{Sasko Zdravkin}
+
+Mongolian - \e{Bayarsaikhan Enkhtaivan}
+
+Norwegian - \e{Jonas Christoffer Lindstrom, Jan Ivar Beddari}
+
+Norwegian Nynorsk - \e{Vebj\u00F8rn Sture}
+
+Polish - \e{Piotr Murawski, Rafa³ Lampe, cube, SYSTEMsoft Group}
+
+Portuguese - \e{DragonSoull, Dre', Ramon}
+
+Portuguese Brasil - \e{Layout do Brasil, deguix}
+
+Romanian - \e{Sorin Sbarnea, Cristian Pirvu, George Radu, Vlad Rusu}
+
+Russian - \e{Sergey `Timon` Kusnetsov, Nik Medved, Scam, THRaSH, Dmitry Yerokhin}
+
+Serbian - \e{Srdjan Obucina}
+
+Serbian Latin - \e{Srdjan Obucina, Vladan Obradovic}
+
+Slovak - \e{trace, Kypec, Mari\u00e1n Hikan\u00edk}
+
+Slovenian - \e{Janez Dolinar, Martin Sebotnjak}
+
+Spanish - \e{MoNKi, Lobo Lunar, Darwin Rodrigo Toledo C\u00e1ceres}
+
+Swedish - \e{Peter Gustafsson, Magnus Bonnevier, Rickard Angbratt}
+
+Thai - \e{SoKoOLz, TuW@nNu (asdfuae)}
+
+Traditional & Simplified Chinese - \e{Kii Ali}
+
+Turkish - \e{Bertan Kodamanoglu, Cagatay Dilsiz, Fatih BOY}
+
+Ukrainian - \e{Yuri Holubow, Nash-Soft}
+
+Uzbek - \e{Emil Garipov (emil.garipov@gmail.com)}
+
+Valencian - \e{Bernardo Arlandis Ma\uF1\uF3}
+
+Welsh - \e{Rhoslyn Prys, Meddal.com}
+
+\H{writers} Writers
+
+\e{Sebastian Armbrust aka flizebogen}
+
+\b Tutorial
diff --git a/Docs/src/defines.but b/Docs/src/defines.but
index 948ff2e..8d8ed4e 100755
--- a/Docs/src/defines.but
+++ b/Docs/src/defines.but
@@ -1,133 +1,133 @@
-\S0{compdefines} Conditional Compilation
-
-The compiler maintains a list of defined symbols, which can be defined using !define or the /D command line switch. These defined symbols can be used for conditional compilation (using !ifdef) or for symbol replacement (a simple form of macros). To replace a symbol with its value, use $\{SYMBOL\} (if SYMBOL is not defined, no translation will occur). The translation is first-come-first-served, meaning if you do:
-
-\c !define symbol_one ${symbol_two}
-
-If symbol_two is defined when that line occurs, it will be replaced. Otherwise, any replacing will occur when $\{symbol_one\} is referenced.
-
-Define/conditional compilation related commands:
-
-\S1{define} !define
-
-\c ([/date|/utcdate] gflag [value]) | (/math gflag val1 OP val2)
-
-This command will add \e{gflag} to the global define list. This will have a similar effect as using the /D switch on the command line (only the define only becomes effective after the !define command).
-
-If \e{/date} or \e{/utcdate} are used, \e{value} will be passed into strftime and the result will be used as the value of \e{gflag}. strftime converts special symbols into certain parts of the current time or date. For example, %H will be converted into the current hour in 24-hour format. For a complete list of available symbols, search for strftime on \W{http://msdn.microsoft.com/}{MSDN}. On POSIX, you can get the list by using \c{man strftime}.
-
-If \e{/math} is used, the result of 'val1 OP val2', where OP may be +,-,*,&,|,^,/ or % , will be used as the value of \e{gflag}. Note that val1 AND val2 MUST be integer values!
-
-\c !define USE_SOMETHING
-\c !define VERSION 1.2
-\c !define /date NOW "%H:%M:%S %d %b, %Y"
-\c !define /math RESULT 3 + 10
-\c !define /math REST 15 % ${RESULT}
-
-\S1{undef} !undef
-
-\c gflag
-
-Removes an item from the global define list. Note that $\{SYMBOL\} where SYMBOL is undefined will be translated to "$\{SYMBOL\}".
-
-\c !define SOMETHING
-\c !undef SOMETHING
-
-\S1{ifdef} !ifdef
-
-\c gflag [bcheck gflag [...]]]
-
-This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If gflag is globally defined (using !define or the /D switch), then the contained lines will be compiled. Otherwise, they will be skipped. 'bcheck' can be specified as & (boolean and) or | (boolean or) along with more gflags -- precedence is simple, left to right.
-
-\c !define SOMETHING
-\c !ifdef SOMETHING
-\c !echo "SOMETHING is defined"
-\c !endif
-\c !undef SOMETHING
-\c !ifdef SOMETHING
-\c !echo "SOMETHING is defined" # will never be printed
-\c !endif
-
-\S1{ifndef} !ifndef
-
-\c gflag [bcheck gflag [...]]]
-
-The opposite of !ifdef. The lines will be compiled when the gflag has not been defined.
-
-\S1{if} !if
-
-\c [!] value [op value2]
-
-This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If value is non-zero, or the comparison of value and value2 depending on the operator results in true, the contained lines will be compiled. Otherwise, they will be skipped.
-op can be either == or != (string comparison), <=, < > or >= (float comparison), && or || (boolean comparison).
-If [!] is set, return value will be switched from true to false and vice versa.
-
-\c !if 1 < 2
-\c !echo "1 is smaller than 2!!"
-\c !else if ! 3.1 > 1.99
-\c !error "this line should never appear"
-\c !else
-\c !error "neither should this"
-\c !endif
-
-\S1{ifmacrodef} !ifmacrodef
-
-\c gflag [bcheck gflag [...]]]
-
-This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If the macro gflag exists, then the contained lines will be compiled. Otherwise, they will be skipped. 'bcheck' can be specified as & (boolean and) or | (boolean or) along with more gflags -- precedence is simple, left to right.
-
-\c !macro SomeMacro
-\c !macroend
-\c !ifmacrodef SomeMacro
-\c !echo "SomeMacro is defined"
-\c !endif
-
-\S1{ifmacrondef} !ifmacrondef
-
-\c gflag [bcheck gflag [...]]]
-
-The opposite of !ifmacrodef. The lines will be compiled when the macro gflag does not exist.
-
-\S1{else} !else
-
-\c [if|ifdef|ifndef|ifmacrodef|ifmacrondef [...]]
-
-This command allows to easily insert different code when different defines or macros are set. You can create blocks like !ifdef/!else/!endif, !ifdef/!else ifdef/!else/!endif etc.
-
-\c !ifdef VERSION
-\c OutFile installer-${VERSION}.exe
-\c !else
-\c OutFile installer.exe
-\c !endif
-
-\S1{endif} !endif
-
-This command closes a block started with !if, !ifdef, !ifndef, !ifmacrodef or !ifmacrondef.
-
-\S1{insertmacro} !insertmacro
-
-\c macro_name [parameter] [...]
-
-Inserts the contents of a macro that was created with !macro. If the macro was created with parameters, then you must pass as many parameters to the macro as it requires.
-
-\c !macro Print text
-\c DetailPrint "${text}"
-\c !macroend
-\c !insertmacro Print "some text"
-\c !insertmacro Print "some more text"
-
-\S1{macro} !macro
-
-\c macro_name [parameter][...]
-
-Creates a macro named 'macro_name'. All lines between the !macro and the !macroend will be saved. To insert the macro later on, use !insertmacro. !macro definitions can have one or more parameters defined. The parameters may be accessed the same way a !define would (e.g. $\{PARMNAME\}) from inside the macro.
-
-\c !macro SomeMacro parm1 parm2 parm3
-\c DetailPrint "${parm1}"
-\c MessageBox MB_OK "${parm2}"
-\c File "${parm3}"
-\c !macroend
-
-\S1{macroend} !macroend
-
-Ends a macro that was started with !macro.
+\S0{compdefines} Conditional Compilation
+
+The compiler maintains a list of defined symbols, which can be defined using !define or the /D command line switch. These defined symbols can be used for conditional compilation (using !ifdef) or for symbol replacement (a simple form of macros). To replace a symbol with its value, use $\{SYMBOL\} (if SYMBOL is not defined, no translation will occur). The translation is first-come-first-served, meaning if you do:
+
+\c !define symbol_one ${symbol_two}
+
+If symbol_two is defined when that line occurs, it will be replaced. Otherwise, any replacing will occur when $\{symbol_one\} is referenced.
+
+Define/conditional compilation related commands:
+
+\S1{define} !define
+
+\c ([/date|/utcdate] gflag [value]) | (/math gflag val1 OP val2)
+
+This command will add \e{gflag} to the global define list. This will have a similar effect as using the /D switch on the command line (only the define only becomes effective after the !define command).
+
+If \e{/date} or \e{/utcdate} are used, \e{value} will be passed into strftime and the result will be used as the value of \e{gflag}. strftime converts special symbols into certain parts of the current time or date. For example, %H will be converted into the current hour in 24-hour format. For a complete list of available symbols, search for strftime on \W{http://msdn.microsoft.com/}{MSDN}. On POSIX, you can get the list by using \c{man strftime}.
+
+If \e{/math} is used, the result of 'val1 OP val2', where OP may be +,-,*,&,|,^,/ or % , will be used as the value of \e{gflag}. Note that val1 AND val2 MUST be integer values!
+
+\c !define USE_SOMETHING
+\c !define VERSION 1.2
+\c !define /date NOW "%H:%M:%S %d %b, %Y"
+\c !define /math RESULT 3 + 10
+\c !define /math REST 15 % ${RESULT}
+
+\S1{undef} !undef
+
+\c gflag
+
+Removes an item from the global define list. Note that $\{SYMBOL\} where SYMBOL is undefined will be translated to "$\{SYMBOL\}".
+
+\c !define SOMETHING
+\c !undef SOMETHING
+
+\S1{ifdef} !ifdef
+
+\c gflag [bcheck gflag [...]]]
+
+This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If gflag is globally defined (using !define or the /D switch), then the contained lines will be compiled. Otherwise, they will be skipped. 'bcheck' can be specified as & (boolean and) or | (boolean or) along with more gflags -- precedence is simple, left to right.
+
+\c !define SOMETHING
+\c !ifdef SOMETHING
+\c !echo "SOMETHING is defined"
+\c !endif
+\c !undef SOMETHING
+\c !ifdef SOMETHING
+\c !echo "SOMETHING is defined" # will never be printed
+\c !endif
+
+\S1{ifndef} !ifndef
+
+\c gflag [bcheck gflag [...]]]
+
+The opposite of !ifdef. The lines will be compiled when the gflag has not been defined.
+
+\S1{if} !if
+
+\c [!] value [op value2]
+
+This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If value is non-zero, or the comparison of value and value2 depending on the operator results in true, the contained lines will be compiled. Otherwise, they will be skipped.
+op can be either == or != (string comparison), <=, < > or >= (float comparison), && or || (boolean comparison).
+If [!] is set, return value will be switched from true to false and vice versa.
+
+\c !if 1 < 2
+\c !echo "1 is smaller than 2!!"
+\c !else if ! 3.1 > 1.99
+\c !error "this line should never appear"
+\c !else
+\c !error "neither should this"
+\c !endif
+
+\S1{ifmacrodef} !ifmacrodef
+
+\c gflag [bcheck gflag [...]]]
+
+This command, when paired with an !endif command, will tell the compiler whether or not to compile the lines in between the two lines. If the macro gflag exists, then the contained lines will be compiled. Otherwise, they will be skipped. 'bcheck' can be specified as & (boolean and) or | (boolean or) along with more gflags -- precedence is simple, left to right.
+
+\c !macro SomeMacro
+\c !macroend
+\c !ifmacrodef SomeMacro
+\c !echo "SomeMacro is defined"
+\c !endif
+
+\S1{ifmacrondef} !ifmacrondef
+
+\c gflag [bcheck gflag [...]]]
+
+The opposite of !ifmacrodef. The lines will be compiled when the macro gflag does not exist.
+
+\S1{else} !else
+
+\c [if|ifdef|ifndef|ifmacrodef|ifmacrondef [...]]
+
+This command allows to easily insert different code when different defines or macros are set. You can create blocks like !ifdef/!else/!endif, !ifdef/!else ifdef/!else/!endif etc.
+
+\c !ifdef VERSION
+\c OutFile installer-${VERSION}.exe
+\c !else
+\c OutFile installer.exe
+\c !endif
+
+\S1{endif} !endif
+
+This command closes a block started with !if, !ifdef, !ifndef, !ifmacrodef or !ifmacrondef.
+
+\S1{insertmacro} !insertmacro
+
+\c macro_name [parameter] [...]
+
+Inserts the contents of a macro that was created with !macro. If the macro was created with parameters, then you must pass as many parameters to the macro as it requires.
+
+\c !macro Print text
+\c DetailPrint "${text}"
+\c !macroend
+\c !insertmacro Print "some text"
+\c !insertmacro Print "some more text"
+
+\S1{macro} !macro
+
+\c macro_name [parameter][...]
+
+Creates a macro named 'macro_name'. All lines between the !macro and the !macroend will be saved. To insert the macro later on, use !insertmacro. !macro definitions can have one or more parameters defined. The parameters may be accessed the same way a !define would (e.g. $\{PARMNAME\}) from inside the macro.
+
+\c !macro SomeMacro parm1 parm2 parm3
+\c DetailPrint "${parm1}"
+\c MessageBox MB_OK "${parm2}"
+\c File "${parm3}"
+\c !macroend
+
+\S1{macroend} !macroend
+
+Ends a macro that was started with !macro.
diff --git a/Docs/src/file.but b/Docs/src/file.but
index 349bcea..5194899 100755
--- a/Docs/src/file.but
+++ b/Docs/src/file.but
@@ -1,112 +1,112 @@
-\S1{fileinst} File Instructions
-
-\S2{FileClose} FileClose
-
-\c handle
-
-Closes a file handle opened with FileOpen.
-
-\S2{FileOpen} FileOpen
-
-\c user_var(handle output) filename openmode
-
-Opens a file named "filename", and sets the handle output variable with the handle. The openmode should be one of "r" (read) "w" (write, all contents of file are destroyed) or "a" (append, meaning opened for both read and write, contents preserved). In all open modes, the file pointer is placed at the beginning of the file. If the file cannot be opened, the handle output is set to empty, and the error flag is set.
-
-If no absolute path is specified the current folder will be used. The current folder is the folder set using the last \R{setoutpath}{SetOutPath} instruction. If you have not used \R{setoutpath}{SetOutPath} the current folder is \R{varother}{$EXEDIR}.
-
-\c FileOpen $0 $INSTDIR\file.dat r
-\c FileClose $0
-
-\S2{FileRead} FileRead
-
-\c handle user_var(output) [maxlen]
-
-Reads a string from a file opened with FileOpen. The string is read until either a newline (or carriage return newline pair) occurs, or until a null byte is read, or until maxlen is met (if specified). By default, strings are limited to 1024 characters (a special build with larger NSIS_MAX_STRLEN can be compiled or downloaded). If the end of file is read and no more data is available, the output string will be empty, and the error flag will be set.
-
-\c ClearErrors
-\c FileOpen $0 $INSTDIR\file.dat r
-\c IfErrors done
-\c FileRead $0 $1
-\c DetailPrint $1
-\c FileClose $0
-\c done:
-
-\S2{FileReadByte} FileReadByte
-
-\c handle user_var(output)
-
-Reads a byte from a file opened with FileOpen. The byte is stored in the output as an integer (0-255). If the end of file is read and no more data is available, the output will be empty, and the error flag will be set.
-
-\c ClearErrors
-\c FileOpen $0 $INSTDIR\file.dat r
-\c IfErrors done
-\c FileReadByte $0 $1
-\c FileReadByte $0 $2
-\c DetailPrint "$1 $2"
-\c FileClose $0
-\c done:
-
-\S2{FileSeek} FileSeek
-
-\c handle offset [mode] [user_var(new position)]
-
-Seeks a file opened with FileOpen. If mode is omitted or specified as SET, the file is positioned to "offset", relative to the beginning of the file. If mode is specified as CUR, then the file is positioned to "offset", relative to the current file position. If mode is specified as END, then the file is positioned to "offset", relative to the end of the file. If the final parameter "new position" is specified, the new file position will be stored to that variable.
-
-\c ClearErrors
-\c FileOpen $0 $INSTDIR\file.dat r
-\c IfErrors done
-\c FileSeek $0 -5 END
-\c FileRead $0 $1
-\c DetailPrint $1
-\c FileClose $0
-\c done:
-
-\S2{FileWrite} FileWrite
-
-\c handle string
-
-Writes a string to a file opened with FileOpen. If an error occurs writing, the error flag will be set.
-
-\c ClearErrors
-\c FileOpen $0 $INSTDIR\file.dat w
-\c IfErrors done
-\c FileWrite $0 "some text"
-\c FileClose $0
-\c done:
-
-\S2{FileWriteByte} FileWriteByte
-
-\c handle string
-
-Writes the integer interpretation of 'string' to a file opened with FileOpen. Of course you can enter the integer value directly. The following code writes a "Carriage Return / Line Feed" - Enter to the file.
-
-\c FileWriteByte file_handle "13"
-\c FileWriteByte file_handle "10"
-
-If an error occurs while writing, the error flag will be set. Note that the low byte of the integer is used, i.e. writing 256 is the same as writing 0, etc.
-
-\S2{FindClose} FindClose
-
-\c handle
-
-Closes a search opened with FindFirst.
-
-\S2{FindFirst} FindFirst
-
-\c user_var(handle output) user_var(filename output) filespec
-
-Performs a search for 'filespec', placing the first file found in filename_output (a user variable). It also puts the handle of the search into handle_output (also a user variable). If no files are found, both outputs are set to empty, and the error flag is set. Best used with FindNext and FindClose. Note that the filename output is without path.
-
-\c FindFirst $0 $1 $INSTDIR\*.txt
-\c loop:
-\c StrCmp $1 "" done
-\c DetailPrint $1
-\c FindNext $0 $1
-\c Goto loop
-\c done:
-
-\S2{FindNext} FindNext
-
-\c handle user_var(filename_output)
-
-Continues a search began with FindFirst. handle should be the handle_output_variable returned by FindFirst. If the search is completed (there are no more files), filename_output is set to empty, and the error flag is set. Note that the filename output is without path.
+\S1{fileinst} File Instructions
+
+\S2{FileClose} FileClose
+
+\c handle
+
+Closes a file handle opened with FileOpen.
+
+\S2{FileOpen} FileOpen
+
+\c user_var(handle output) filename openmode
+
+Opens a file named "filename", and sets the handle output variable with the handle. The openmode should be one of "r" (read) "w" (write, all contents of file are destroyed) or "a" (append, meaning opened for both read and write, contents preserved). In all open modes, the file pointer is placed at the beginning of the file. If the file cannot be opened, the handle output is set to empty, and the error flag is set.
+
+If no absolute path is specified the current folder will be used. The current folder is the folder set using the last \R{setoutpath}{SetOutPath} instruction. If you have not used \R{setoutpath}{SetOutPath} the current folder is \R{varother}{$EXEDIR}.
+
+\c FileOpen $0 $INSTDIR\file.dat r
+\c FileClose $0
+
+\S2{FileRead} FileRead
+
+\c handle user_var(output) [maxlen]
+
+Reads a string from a file opened with FileOpen. The string is read until either a newline (or carriage return newline pair) occurs, or until a null byte is read, or until maxlen is met (if specified). By default, strings are limited to 1024 characters (a special build with larger NSIS_MAX_STRLEN can be compiled or downloaded). If the end of file is read and no more data is available, the output string will be empty, and the error flag will be set.
+
+\c ClearErrors
+\c FileOpen $0 $INSTDIR\file.dat r
+\c IfErrors done
+\c FileRead $0 $1
+\c DetailPrint $1
+\c FileClose $0
+\c done:
+
+\S2{FileReadByte} FileReadByte
+
+\c handle user_var(output)
+
+Reads a byte from a file opened with FileOpen. The byte is stored in the output as an integer (0-255). If the end of file is read and no more data is available, the output will be empty, and the error flag will be set.
+
+\c ClearErrors
+\c FileOpen $0 $INSTDIR\file.dat r
+\c IfErrors done
+\c FileReadByte $0 $1
+\c FileReadByte $0 $2
+\c DetailPrint "$1 $2"
+\c FileClose $0
+\c done:
+
+\S2{FileSeek} FileSeek
+
+\c handle offset [mode] [user_var(new position)]
+
+Seeks a file opened with FileOpen. If mode is omitted or specified as SET, the file is positioned to "offset", relative to the beginning of the file. If mode is specified as CUR, then the file is positioned to "offset", relative to the current file position. If mode is specified as END, then the file is positioned to "offset", relative to the end of the file. If the final parameter "new position" is specified, the new file position will be stored to that variable.
+
+\c ClearErrors
+\c FileOpen $0 $INSTDIR\file.dat r
+\c IfErrors done
+\c FileSeek $0 -5 END
+\c FileRead $0 $1
+\c DetailPrint $1
+\c FileClose $0
+\c done:
+
+\S2{FileWrite} FileWrite
+
+\c handle string
+
+Writes a string to a file opened with FileOpen. If an error occurs writing, the error flag will be set.
+
+\c ClearErrors
+\c FileOpen $0 $INSTDIR\file.dat w
+\c IfErrors done
+\c FileWrite $0 "some text"
+\c FileClose $0
+\c done:
+
+\S2{FileWriteByte} FileWriteByte
+
+\c handle string
+
+Writes the integer interpretation of 'string' to a file opened with FileOpen. Of course you can enter the integer value directly. The following code writes a "Carriage Return / Line Feed" - Enter to the file.
+
+\c FileWriteByte file_handle "13"
+\c FileWriteByte file_handle "10"
+
+If an error occurs while writing, the error flag will be set. Note that the low byte of the integer is used, i.e. writing 256 is the same as writing 0, etc.
+
+\S2{FindClose} FindClose
+
+\c handle
+
+Closes a search opened with FindFirst.
+
+\S2{FindFirst} FindFirst
+
+\c user_var(handle output) user_var(filename output) filespec
+
+Performs a search for 'filespec', placing the first file found in filename_output (a user variable). It also puts the handle of the search into handle_output (also a user variable). If no files are found, both outputs are set to empty, and the error flag is set. Best used with FindNext and FindClose. Note that the filename output is without path.
+
+\c FindFirst $0 $1 $INSTDIR\*.txt
+\c loop:
+\c StrCmp $1 "" done
+\c DetailPrint $1
+\c FindNext $0 $1
+\c Goto loop
+\c done:
+
+\S2{FindNext} FindNext
+
+\c handle user_var(filename_output)
+
+Continues a search began with FindFirst. handle should be the handle_output_variable returned by FindFirst. If the search is completed (there are no more files), filename_output is set to empty, and the error flag is set. Note that the filename output is without path.
diff --git a/Docs/src/flowcontrol.but b/Docs/src/flowcontrol.but
index 041b1e7..86224eb 100755
--- a/Docs/src/flowcontrol.but
+++ b/Docs/src/flowcontrol.but
@@ -1,310 +1,310 @@
-\S1{flowcontrol} Flow Control Instructions
-
-\S2{abort} Abort
-
-\c user_message
-
-Cancels the install, stops execution of script, and displays user_message in the status display. Note: you can use this from \R{callbacks}{Callback functions} to do special things. \R{pages}{Page callbacks} also uses Abort for special purposes.
-
-\c Abort
-\c Abort "can't install"
-
-\S2{call} Call
-
-\c function_name | :label_name | user_var(input)
-
-Calls the function named \e{function_name}, the label named \e{label_name}, or a variable that specifies an address. An address is returned by \R{getcurrentaddress}{GetCurrentAddress}, \R{getfunctionaddress}{GetFunctionAddress} or \R{getlabeladdress}{GetLabelAddress}. A call returns when it encounters a \R{return}{Return} instruction. Sections and functions are automatically ended with a \R{return}{Return} instruction. Uninstall functions cannot be called from installer functions and sections, and vice-versa.
-
-\c Function func
-\c Call :label
-\c DetailPrint "#1: This will only appear 1 time."
-\c label:
-\c DetailPrint "#2: This will appear before and after message #1."
-\c Call :.global_label
-\c FunctionEnd
-\c
-\c Section
-\c Call func
-\c Return
-\c
-\c .global_label:
-\c DetailPrint "#3: The global label was called"
-\c SectionEnd
-
-\S2{clearerrors} ClearErrors
-
-Clears the error flag.
-
-\c ClearErrors
-\c IfErrors 0 +2
-\c MessageBox MB_OK "this message box will never show"
-
-\S2{getcurrentaddress} GetCurrentAddress
-
-\c user_var(output)
-
-Gets the address of the current instruction (the GetCurrentAddress) and stores it in the output user variable. This user variable then can be passed to Call or Goto.
-
-\c Function func
-\c DetailPrint "function"
-\c IntOp $0 $0 + 2
-\c Call $0
-\c DetailPrint "function end"
-\c FunctionEnd
-\c
-\c Section
-\c DetailPrint "section"
-\c DetailPrint "section"
-\c GetCurrentAddress $0
-\c Goto callFunc
-\c
-\c DetailPrint "back to section"
-\c Return
-\c
-\c callFunc:
-\c Call func
-\c DetailPrint "section end"
-\c SectionEnd
-
-\S2{getfunctionaddress} GetFunctionAddress
-
-\c user_var(output) function_name
-
-Gets the address of the function and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that if you Goto an address which is the output of GetFunctionAddress, your function will never be returned to (when the function you Goto'd to returns, you return instantly).
-
-\c Function func
-\c DetailPrint "function"
-\c FunctionEnd
-\c
-\c Section
-\c GetFunctionAddress $0 func
-\c Call $0
-\c SectionEnd
-
-\S2{getlabeladdress} GetLabelAddress
-
-\c user_var(output) label
-
-Gets the address of the label and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that you may only call this with labels accessible from your function, but you can call it from anywhere (which is potentially dangerous). Note that if you Call the output of GetLabelAddress, code will be executed until it Return's (explicitly or implicitly at the end of a function), and then you will be returned to the statement after the Call.
-
-\c label:
-\c DetailPrint "label"
-\c GetLabelAddress $0 label
-\c IntOp $0 $0 + 4
-\c Goto $0
-\c DetailPrint "done"
-
-\S2{goto} Goto
-
-\c label_to_jump_to | +offset| -offset| user_var(target)
-
-If label is specified, goto the label 'label_to_jump_to:'.
-
-If +offset or -offset is specified, jump is relative by offset instructions. Goto +1 goes to the next instruction, Goto -1 goes to the previous instruction, etc.
-
-If a user variable is specified, jumps to absolute address (generally you will want to get this value from a function like GetLabelAddress). Compiler flag commands and SectionIn aren't instructions so jumping over them has no effect.
-
-\c Goto label
-\c Goto +2
-\c Goto -2
-\c Goto $0
-
-\S2{ifabort} IfAbort
-
-\c label_to_goto_if_abort [label_to_goto_if_no_abort]
-
-If abort is called it will "return" true. This can happen if the user chose abort on a file that failed to create (or overwrite) or if the user aborted by hand. This function can only be called from the leave function of the instfiles \R{page}{page}.
-
-\c Page instfiles "" "" instfilesLeave
-\c
-\c Function instfilesLeave
-\c IfAbort 0 +2
-\c MessageBox MB_OK "user aborted"
-\c FunctionEnd
-
-\S2{iferrors} IfErrors
-
-\c jumpto_iferror [jumpto_ifnoerror]
-
-Checks and clears the error flag, and if it is set, it will goto jumpto_iferror, otherwise it will goto jumpto_ifnoerror. The error flag is set by other instructions when a recoverable error (such as trying to delete a file that is in use) occurs.
-
-\c ClearErrors
-\c File file.dat
-\c IfErrors 0 +2
-\c Call ErrorHandler
-
-\S2{iffileexists} IfFileExists
-
-\c file_to_check_for jump_if_present [jump_otherwise]
-
-Checks for existence of file(s) file_to_check_for (which can be a wildcard, or a directory), and Gotos jump_if_present if the file exists, otherwise Gotos jump_otherwise. If you want to check to see if a file is a directory, use IfFileExists DIRECTORY\\*.*
-
-\c IfFileExists $WINDIR\notepad.exe 0 +2
-\c MessageBox MB_OK "notepad is installed"
-
-\S2{ifrebootflag} IfRebootFlag
-
-\c jump_if_set [jump_if_not_set]
-
-Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag can be set by Delete and Rename, or manually with \R{setrebootflag}{SetRebootFlag}.
-
-\c IfRebootFlag 0 noreboot
-\c MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
-\c Reboot
-\c noreboot:
-
-\S2{ifsilent} IfSilent
-
-\c jump_if_silent [jump_if_not]
-
-Checks the silent flag, and jumps to jump_if_silent if the installer is silent, otherwise jumps to jump_if_not. The silent flag can be set by \R{asilentinstall}{SilentInstall}, \R{asilentuninstall}{SilentUninstall}, \R{setsilent}{SetSilent} and by the user passing /S on the command line.
-
-\c IfSilent +2
-\c ExecWait '"$INSTDIR\nonsilentprogram.exe"'
-
-\S2{intcmp} IntCmp
-
-\c val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]
-
-Compares two integers val1 and val2. If val1 and val2 are equal, Gotos jump_if_equal, otherwise if val1 < val2, Gotos jump_if_val1_less, otherwise if val1 > val2, Gotos jump_if_val1_more.
-
-\c IntCmp $0 5 is5 lessthan5 morethan5
-\c is5:
-\c DetailPrint "$$0 == 5"
-\c Goto done
-\c lessthan5:
-\c DetailPrint "$$0 < 5"
-\c Goto done
-\c morethan5:
-\c DetailPrint "$$0 > 5"
-\c Goto done
-\c done:
-
-\S2{intcmpu} IntCmpU
-
-\c val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]
-
-Compares two unsigned integers val1 and val2. If val1 and val2 are equal, Gotos jump_if_equal, otherwise if val1 < val2, Gotos jump_if_val1_less, otherwise if val1 > val2, Gotos jump_if_val1_more. Performs the comparison as unsigned integers.
-
-\S2{messagebox} MessageBox
-
-\c mb_option_list messagebox_text [/SD return] [return_check jumpto] [return_check_2 jumpto_2]
-
-Displays a MessageBox containing the text "messagebox_text". mb_option_list must be one or more of the following, delimited by |s (e.g. MB_YESNO|MB_ICONSTOP).
-
-\b \e{MB_OK} - Display with an OK button
-
-\b \e{MB_OKCANCEL} - Display with an OK and a cancel button
-
-\b \e{MB_ABORTRETRYIGNORE} - Display with abort, retry, ignore buttons
-
-\b \e{MB_RETRYCANCEL} - Display with retry and cancel buttons
-
-\b \e{MB_YESNO} - Display with yes and no buttons
-
-\b \e{MB_YESNOCANCEL} - Display with yes, no, cancel buttons
-
-\b \e{MB_ICONEXCLAMATION} - Display with exclamation icon
-
-\b \e{MB_ICONINFORMATION} - Display with information icon
-
-\b \e{MB_ICONQUESTION} - Display with question mark icon
-
-\b \e{MB_ICONSTOP} - Display with stop icon
-
-\b \e{MB_USERICON} - Display with installer's icon
-
-\b \e{MB_TOPMOST} - Make messagebox topmost
-
-\b \e{MB_SETFOREGROUND} - Set foreground
-
-\b \e{MB_RIGHT} - Right align text
-
-\b \e{MB_RTLREADING} - RTL reading order
-
-\b \e{MB_DEFBUTTON1} - Button 1 is default
-
-\b \e{MB_DEFBUTTON2} - Button 2 is default
-
-\b \e{MB_DEFBUTTON3} - Button 3 is default
-
-\b \e{MB_DEFBUTTON4} - Button 4 is default
-
-Return_check can be 0 (or empty, or left off), or one of the following:
-
-\b \e{IDABORT} - Abort button
-
-\b \e{IDCANCEL} - Cancel button
-
-\b \e{IDIGNORE} - Ignore button
-
-\b \e{IDNO} - No button
-
-\b \e{IDOK} - OK button
-
-\b \e{IDRETRY} - Retry button
-
-\b \e{IDYES} - Yes button
-
-If the return value of the MessageBox is return_check, the installer will Goto jumpto.
-
-Use the /SD parameter with one of the return_check values above to specify the option that will be used when the installer is silent. See \k{silent} for more information.
-
-\c MessageBox MB_OK "simple message box"
-\c MessageBox MB_YESNO "is it true?" IDYES true IDNO false
-\c true:
-\c DetailPrint "it's true!"
-\c Goto next
-\c false:
-\c DetailPrint "it's false"
-\c next:
-\c MessageBox MB_YESNO "is it true? (defaults to yes on silent installations)" /SD IDYES IDNO false2
-\c DetailPrint "it's true (or silent)!"
-\c Goto next2
-\c false2:
-\c DetailPrint "it's false"
-\c next2:
-
-\S2{return} Return
-
-Returns from a function or section.
-
-\c Function func
-\c StrCmp $0 "return now" 0 +2
-\c Return
-\c # do stuff
-\c FunctionEnd
-\c
-\c Section
-\c Call func
-\c ;"Return" will return here
-\c SectionEnd
-
-\S2{quit} Quit
-
-Causes the installer to exit as soon as possible. After Quit is called, the installer will exit (no callback functions will get a chance to run).
-
-\S2{seterrors} SetErrors
-
-Sets the error flag.
-
-\c SetErrors
-\c IfErrors 0 +2
-\c MessageBox MB_OK "this message box will always show"
-
-\S2{strcmp} StrCmp
-
-\c str1 str2 jump_if_equal [jump_if_not_equal]
-
-Compares (case insensitively) str1 to str2. If str1 and str2 are equal, Gotos jump_if_equal, otherwise Gotos jump_if_not_equal.
-
-\c StrCmp $0 "a string" 0 +3
-\c DetailPrint '$$0 == "a string"'
-\c Goto +2
-\c DetailPrint '$$0 != "a string"'
-
-\S2{strcmps} StrCmpS
-
-\c str1 str2 jump_if_equal [jump_if_not_equal]
-
-Same as \R{strcmp}{StrCmp}, but case sensitive.
+\S1{flowcontrol} Flow Control Instructions
+
+\S2{abort} Abort
+
+\c user_message
+
+Cancels the install, stops execution of script, and displays user_message in the status display. Note: you can use this from \R{callbacks}{Callback functions} to do special things. \R{pages}{Page callbacks} also uses Abort for special purposes.
+
+\c Abort
+\c Abort "can't install"
+
+\S2{call} Call
+
+\c function_name | :label_name | user_var(input)
+
+Calls the function named \e{function_name}, the label named \e{label_name}, or a variable that specifies an address. An address is returned by \R{getcurrentaddress}{GetCurrentAddress}, \R{getfunctionaddress}{GetFunctionAddress} or \R{getlabeladdress}{GetLabelAddress}. A call returns when it encounters a \R{return}{Return} instruction. Sections and functions are automatically ended with a \R{return}{Return} instruction. Uninstall functions cannot be called from installer functions and sections, and vice-versa.
+
+\c Function func
+\c Call :label
+\c DetailPrint "#1: This will only appear 1 time."
+\c label:
+\c DetailPrint "#2: This will appear before and after message #1."
+\c Call :.global_label
+\c FunctionEnd
+\c
+\c Section
+\c Call func
+\c Return
+\c
+\c .global_label:
+\c DetailPrint "#3: The global label was called"
+\c SectionEnd
+
+\S2{clearerrors} ClearErrors
+
+Clears the error flag.
+
+\c ClearErrors
+\c IfErrors 0 +2
+\c MessageBox MB_OK "this message box will never show"
+
+\S2{getcurrentaddress} GetCurrentAddress
+
+\c user_var(output)
+
+Gets the address of the current instruction (the GetCurrentAddress) and stores it in the output user variable. This user variable then can be passed to Call or Goto.
+
+\c Function func
+\c DetailPrint "function"
+\c IntOp $0 $0 + 2
+\c Call $0
+\c DetailPrint "function end"
+\c FunctionEnd
+\c
+\c Section
+\c DetailPrint "section"
+\c DetailPrint "section"
+\c GetCurrentAddress $0
+\c Goto callFunc
+\c
+\c DetailPrint "back to section"
+\c Return
+\c
+\c callFunc:
+\c Call func
+\c DetailPrint "section end"
+\c SectionEnd
+
+\S2{getfunctionaddress} GetFunctionAddress
+
+\c user_var(output) function_name
+
+Gets the address of the function and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that if you Goto an address which is the output of GetFunctionAddress, your function will never be returned to (when the function you Goto'd to returns, you return instantly).
+
+\c Function func
+\c DetailPrint "function"
+\c FunctionEnd
+\c
+\c Section
+\c GetFunctionAddress $0 func
+\c Call $0
+\c SectionEnd
+
+\S2{getlabeladdress} GetLabelAddress
+
+\c user_var(output) label
+
+Gets the address of the label and stores it in the output user variable. This user variable then can be passed to Call or Goto. Note that you may only call this with labels accessible from your function, but you can call it from anywhere (which is potentially dangerous). Note that if you Call the output of GetLabelAddress, code will be executed until it Return's (explicitly or implicitly at the end of a function), and then you will be returned to the statement after the Call.
+
+\c label:
+\c DetailPrint "label"
+\c GetLabelAddress $0 label
+\c IntOp $0 $0 + 4
+\c Goto $0
+\c DetailPrint "done"
+
+\S2{goto} Goto
+
+\c label_to_jump_to | +offset| -offset| user_var(target)
+
+If label is specified, goto the label 'label_to_jump_to:'.
+
+If +offset or -offset is specified, jump is relative by offset instructions. Goto +1 goes to the next instruction, Goto -1 goes to the previous instruction, etc.
+
+If a user variable is specified, jumps to absolute address (generally you will want to get this value from a function like GetLabelAddress). Compiler flag commands and SectionIn aren't instructions so jumping over them has no effect.
+
+\c Goto label
+\c Goto +2
+\c Goto -2
+\c Goto $0
+
+\S2{ifabort} IfAbort
+
+\c label_to_goto_if_abort [label_to_goto_if_no_abort]
+
+If abort is called it will "return" true. This can happen if the user chose abort on a file that failed to create (or overwrite) or if the user aborted by hand. This function can only be called from the leave function of the instfiles \R{page}{page}.
+
+\c Page instfiles "" "" instfilesLeave
+\c
+\c Function instfilesLeave
+\c IfAbort 0 +2
+\c MessageBox MB_OK "user aborted"
+\c FunctionEnd
+
+\S2{iferrors} IfErrors
+
+\c jumpto_iferror [jumpto_ifnoerror]
+
+Checks and clears the error flag, and if it is set, it will goto jumpto_iferror, otherwise it will goto jumpto_ifnoerror. The error flag is set by other instructions when a recoverable error (such as trying to delete a file that is in use) occurs.
+
+\c ClearErrors
+\c File file.dat
+\c IfErrors 0 +2
+\c Call ErrorHandler
+
+\S2{iffileexists} IfFileExists
+
+\c file_to_check_for jump_if_present [jump_otherwise]
+
+Checks for existence of file(s) file_to_check_for (which can be a wildcard, or a directory), and Gotos jump_if_present if the file exists, otherwise Gotos jump_otherwise. If you want to check to see if a file is a directory, use IfFileExists DIRECTORY\\*.*
+
+\c IfFileExists $WINDIR\notepad.exe 0 +2
+\c MessageBox MB_OK "notepad is installed"
+
+\S2{ifrebootflag} IfRebootFlag
+
+\c jump_if_set [jump_if_not_set]
+
+Checks the reboot flag, and jumps to jump_if_set if the reboot flag is set, otherwise jumps to jump_if_not_set. The reboot flag can be set by Delete and Rename, or manually with \R{setrebootflag}{SetRebootFlag}.
+
+\c IfRebootFlag 0 noreboot
+\c MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" IDNO noreboot
+\c Reboot
+\c noreboot:
+
+\S2{ifsilent} IfSilent
+
+\c jump_if_silent [jump_if_not]
+
+Checks the silent flag, and jumps to jump_if_silent if the installer is silent, otherwise jumps to jump_if_not. The silent flag can be set by \R{asilentinstall}{SilentInstall}, \R{asilentuninstall}{SilentUninstall}, \R{setsilent}{SetSilent} and by the user passing /S on the command line.
+
+\c IfSilent +2
+\c ExecWait '"$INSTDIR\nonsilentprogram.exe"'
+
+\S2{intcmp} IntCmp
+
+\c val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]
+
+Compares two integers val1 and val2. If val1 and val2 are equal, Gotos jump_if_equal, otherwise if val1 < val2, Gotos jump_if_val1_less, otherwise if val1 > val2, Gotos jump_if_val1_more.
+
+\c IntCmp $0 5 is5 lessthan5 morethan5
+\c is5:
+\c DetailPrint "$$0 == 5"
+\c Goto done
+\c lessthan5:
+\c DetailPrint "$$0 < 5"
+\c Goto done
+\c morethan5:
+\c DetailPrint "$$0 > 5"
+\c Goto done
+\c done:
+
+\S2{intcmpu} IntCmpU
+
+\c val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]
+
+Compares two unsigned integers val1 and val2. If val1 and val2 are equal, Gotos jump_if_equal, otherwise if val1 < val2, Gotos jump_if_val1_less, otherwise if val1 > val2, Gotos jump_if_val1_more. Performs the comparison as unsigned integers.
+
+\S2{messagebox} MessageBox
+
+\c mb_option_list messagebox_text [/SD return] [return_check jumpto] [return_check_2 jumpto_2]
+
+Displays a MessageBox containing the text "messagebox_text". mb_option_list must be one or more of the following, delimited by |s (e.g. MB_YESNO|MB_ICONSTOP).
+
+\b \e{MB_OK} - Display with an OK button
+
+\b \e{MB_OKCANCEL} - Display with an OK and a cancel button
+
+\b \e{MB_ABORTRETRYIGNORE} - Display with abort, retry, ignore buttons
+
+\b \e{MB_RETRYCANCEL} - Display with retry and cancel buttons
+
+\b \e{MB_YESNO} - Display with yes and no buttons
+
+\b \e{MB_YESNOCANCEL} - Display with yes, no, cancel buttons
+
+\b \e{MB_ICONEXCLAMATION} - Display with exclamation icon
+
+\b \e{MB_ICONINFORMATION} - Display with information icon
+
+\b \e{MB_ICONQUESTION} - Display with question mark icon
+
+\b \e{MB_ICONSTOP} - Display with stop icon
+
+\b \e{MB_USERICON} - Display with installer's icon
+
+\b \e{MB_TOPMOST} - Make messagebox topmost
+
+\b \e{MB_SETFOREGROUND} - Set foreground
+
+\b \e{MB_RIGHT} - Right align text
+
+\b \e{MB_RTLREADING} - RTL reading order
+
+\b \e{MB_DEFBUTTON1} - Button 1 is default
+
+\b \e{MB_DEFBUTTON2} - Button 2 is default
+
+\b \e{MB_DEFBUTTON3} - Button 3 is default
+
+\b \e{MB_DEFBUTTON4} - Button 4 is default
+
+Return_check can be 0 (or empty, or left off), or one of the following:
+
+\b \e{IDABORT} - Abort button
+
+\b \e{IDCANCEL} - Cancel button
+
+\b \e{IDIGNORE} - Ignore button
+
+\b \e{IDNO} - No button
+
+\b \e{IDOK} - OK button
+
+\b \e{IDRETRY} - Retry button
+
+\b \e{IDYES} - Yes button
+
+If the return value of the MessageBox is return_check, the installer will Goto jumpto.
+
+Use the /SD parameter with one of the return_check values above to specify the option that will be used when the installer is silent. See \k{silent} for more information.
+
+\c MessageBox MB_OK "simple message box"
+\c MessageBox MB_YESNO "is it true?" IDYES true IDNO false
+\c true:
+\c DetailPrint "it's true!"
+\c Goto next
+\c false:
+\c DetailPrint "it's false"
+\c next:
+\c MessageBox MB_YESNO "is it true? (defaults to yes on silent installations)" /SD IDYES IDNO false2
+\c DetailPrint "it's true (or silent)!"
+\c Goto next2
+\c false2:
+\c DetailPrint "it's false"
+\c next2:
+
+\S2{return} Return
+
+Returns from a function or section.
+
+\c Function func
+\c StrCmp $0 "return now" 0 +2
+\c Return
+\c # do stuff
+\c FunctionEnd
+\c
+\c Section
+\c Call func
+\c ;"Return" will return here
+\c SectionEnd
+
+\S2{quit} Quit
+
+Causes the installer to exit as soon as possible. After Quit is called, the installer will exit (no callback functions will get a chance to run).
+
+\S2{seterrors} SetErrors
+
+Sets the error flag.
+
+\c SetErrors
+\c IfErrors 0 +2
+\c MessageBox MB_OK "this message box will always show"
+
+\S2{strcmp} StrCmp
+
+\c str1 str2 jump_if_equal [jump_if_not_equal]
+
+Compares (case insensitively) str1 to str2. If str1 and str2 are equal, Gotos jump_if_equal, otherwise Gotos jump_if_not_equal.
+
+\c StrCmp $0 "a string" 0 +3
+\c DetailPrint '$$0 == "a string"'
+\c Goto +2
+\c DetailPrint '$$0 != "a string"'
+
+\S2{strcmps} StrCmpS
+
+\c str1 str2 jump_if_equal [jump_if_not_equal]
+
+Same as \R{strcmp}{StrCmp}, but case sensitive.
diff --git a/Docs/src/functions.but b/Docs/src/functions.but
index c1c54fd..db2cc8d 100755
--- a/Docs/src/functions.but
+++ b/Docs/src/functions.but
@@ -1,25 +1,25 @@
-\H{functions} Functions
-
-Functions are similar to Sections in that they contain zero or more instructions. User functions are not called by the installer directly, instead they are called from Sections using the Call instruction. Callback functions will be called by the installer when a certain event occurs.
-
-Functions must be declared outside of Sections or other Functions.
-
-\S1{ffunctioncommands} Function Commands
-
-\S2{ffunction} Function
-
-\c [function_name]
-
-Begins and opens a new function. Function names beginning with "." (e.g. ".Whatever") are generally reserved for callback functions. Function names beginning with "un." are functions that will be generated in the Uninstaller. Hence, normal install Sections and functions cannot call uninstall functions, and the Uninstall Section and uninstall functions cannot call normal functions.
-
-\c Function func
-\c # some commands
-\c FunctionEnd
-\c
-\c Section
-\c Call func
-\c SectionEnd
-
-\S2{ffunctionend} FunctionEnd
-
+\H{functions} Functions
+
+Functions are similar to Sections in that they contain zero or more instructions. User functions are not called by the installer directly, instead they are called from Sections using the Call instruction. Callback functions will be called by the installer when a certain event occurs.
+
+Functions must be declared outside of Sections or other Functions.
+
+\S1{ffunctioncommands} Function Commands
+
+\S2{ffunction} Function
+
+\c [function_name]
+
+Begins and opens a new function. Function names beginning with "." (e.g. ".Whatever") are generally reserved for callback functions. Function names beginning with "un." are functions that will be generated in the Uninstaller. Hence, normal install Sections and functions cannot call uninstall functions, and the Uninstall Section and uninstall functions cannot call normal functions.
+
+\c Function func
+\c # some commands
+\c FunctionEnd
+\c
+\c Section
+\c Call func
+\c SectionEnd
+
+\S2{ffunctionend} FunctionEnd
+
This command closes the current open function. \ No newline at end of file
diff --git a/Docs/src/generalpurpose.but b/Docs/src/generalpurpose.but
index ba5bc59..08f22fc 100755
--- a/Docs/src/generalpurpose.but
+++ b/Docs/src/generalpurpose.but
@@ -1,156 +1,156 @@
-\S1{generalpurpose} General Purpose Instructions
-
-\S2{callinstdll} CallInstDLL
-
-\c dllfile [/NOUNLOAD] function_name
-
-Calls a function named \e{function_name} inside a NSIS extension DLL, a plug-in. See the \L{../Examples/Plugin/}{example plugin} for how to make one. Extension DLLs can access the stack and variables. Use /NOUNLOAD to force the installer to leave the DLL loaded. Note: To automatically extract and call plug-in DLLs, use a plug-in command instead of CallInstDLL.
-
-\c Push "a parameter"
-\c Push "another parameter"
-\c CallInstDLL $INSTDIR\somedll.dll somefunction
-
-For easier plug-in handling, use the new \R{plugindlls}{plug-in call syntax}.
-
-\S2{copyfiles} CopyFiles
-
-\c [/SILENT] [/FILESONLY] filespec_on_destsys destination_path [size_of_files_in_kb]
-
-Copies files from the source to the destination on the installing system. Useful with $EXEDIR if you want to copy from installation media, or to copy from one place to another on the system. You might see a Windows status window of the copy operation if the operation takes a lot of time (to disable this, use /SILENT). The last parameter can be used to specify the size of the files that will be copied (in kilobytes), so that the installer can approximate the disk space requirements. On error, or if the user cancels the copy (only possible when /SILENT was omitted), the error flag is set. If /FILESONLY is specified, only files are copied.
-
-Fully-qualified path names should always be used with this instruction. Using relative paths will have unpredictable results.
-
-\c CreateDirectory $INSTDIR\backup
-\c CopyFiles $INSTDIR\*.dat $INSTDIR\backup
-
-\S2{createdirectory} CreateDirectory
-
-\c path_to_create
-
-Creates (recursively if necessary) the specified directory. The error flag is set if the directory couldn't be created.
-
-You should always specify an absolute path.
-
-\c CreateDirectory $INSTDIR\some\directory
-
-\S2{createshortcut} CreateShortCut
-
-\c link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]
-
-Creates a shortcut 'link.lnk' that links to 'target.file', with optional parameters 'parameters'.
-The icon used for the shortcut is 'icon.file,icon_index_number'; for default icon settings use empty strings for both icon.file and icon_index_number.
-start_options should be one of: \e{SW_SHOWNORMAL}, \e{SW_SHOWMAXIMIZED}, \e{SW_SHOWMINIMIZED}, or an empty string.
-keyboard_shortcut should be in the form of 'flag|c' where flag can be a combination (using |) of: \e{ALT}, \e{CONTROL}, \e{EXT}, or \e{SHIFT}. c is the character to use (a-z, A-Z, 0-9, F1-F24, etc). Note that no spaces are allowed in this string. A good example is "ALT|CONTROL|F8". $OUTDIR is used for the working directory. You can change it by using \R{setoutpath}{SetOutPath} before creating the Shortcut.
-description should be the description of the shortcut, or comment as it is called under XP.
-The error flag is set if the shortcut cannot be created (i.e. either of the paths (link or target) does not exist, or some other error).
-
-\c CreateDirectory "$SMPROGRAMS\My Company"
-\c CreateShortCut "$SMPROGRAMS\My Company\My Program.lnk" "$INSTDIR\My Program.exe" \
-\c "some command line parameters" "$INSTDIR\My Program.exe" 2 SW_SHOWNORMAL \
-\c ALT|CTRL|SHIFT|F5 "a description"
-
-\S2{getdllversion} GetDLLVersion
-
-\c filename user_var(high dword output) user_var(low dword output)
-
-Gets the version information from the DLL (or any other executable containing version information) in "filename". Sets the user output variables with the high and low dwords of version information on success; on failure the outputs are empty and the error flag is set. The following example reads the DLL version and copies a human readable version of it into $0:
-
-\c GetDllVersion "$INSTDIR\MyDLL.dll" $R0 $R1
-\c IntOp $R2 $R0 / 0x00010000
-\c IntOp $R3 $R0 & 0x0000FFFF
-\c IntOp $R4 $R1 / 0x00010000
-\c IntOp $R5 $R1 & 0x0000FFFF
-\c StrCpy $0 "$R2.$R3.$R4.$R5"
-
-\S2{getdllversionlocal} GetDLLVersionLocal
-
-\c localfilename user_var(high dword output) user_var(low dword output)
-
-This is similar to GetDLLVersion, only it acts on the system building the installer (it actually compiles into two StrCpy commands). Sets the two output variables with the DLL version information of the DLL on the build system.
-
-\S2{getfiletime} GetFileTime
-
-\c filename user_var(high dword output) user_var(low dword output)
-
-Gets the last write time of "filename". Sets the user output variables with the high and low dwords of the timestamp on success; on failure the outputs are empty and the error flag is set.
-
-\S2{getfiletimelocal} GetFileTimeLocal
-
-\c localfilename user_var(high dword output) user_var(low dword output)
-
-This is similar to GetFileTime, only it acts on the system building the installer (it actually compiles into two StrCpy commands). Sets the two output variables with the file timestamp of the file on the build system.
-
-\S2{getfullpathname} GetFullPathName
-
-\c [/SHORT] user_var(output) path_or_file
-
-Assign to the user variable $x, the full path of the file specified. If the path portion of the parameter is not found, the error flag will be set and $x will be empty. If /SHORT is specified, the path is converted to the short filename form. However, if /SHORT is not specified, the path isn't converted to its long filename form. To get the long filename, call GetLongPathName using the System plug-in. Note that GetLongPathName is only available on Windows 98, Windows 2000 and above.
-
-\c StrCpy $INSTDIR $PROGRAMFILES\NSIS
-\c SetOutPath $INSTDIR
-\c GetFullPathName $0 ..
-\c DetailPrint $0 # will print C:\Program Files
-\c GetFullPathName /SHORT $0 $INSTDIR
-\c DetailPrint $0 # will print C:\Progra~1\NSIS
-
-\c StrCpy $0 C:\Progra~1\NSIS
-\c System::Call 'kernel32::GetLongPathName(t r0, t .r1, i ${NSIS_MAX_STRLEN}) i .r2'
-\c StrCmp $2 error +2
-\c StrCpy $0 $1
-\c DetailPrint $0 # will print C:\Program Files\NSIS, where supported
-
-\S2{gettempfilename} GetTempFileName
-
-\c user_var(output) base_dir
-
-Assign to the user variable $x, the name of a temporary file. The file will have been created, so you can then overwrite it with what you please. The name of the temporary file is guaranteed to be unique. If to want the temporary file to be created in another directory than the Windows temp directory, specify a base_dir. Delete the file when done with it.
-
-\c GetTempFileName $0
-\c File /oname=$0 something.dat
-\c # do something with something.dat
-\c Delete $0
-
-\S2{searchpath} SearchPath
-
-\c user_var(output) filename
-
-Assign to the user variable $x, the full path of the file named by the second parameter. The error flag will be set and $x will be empty if the file cannot be found. Uses SearchPath() to search the system paths for the file.
-
-\S2{setfileattributes} SetFileAttributes
-
-\c filename attribute1|attribute2|...
-
-Sets the file attributes of 'filename'. Valid attributes can be combined with | and are:
-
-\b \e{NORMAL} or \e{FILE_ATTRIBUTE_NORMAL} (you can use 0 to abbreviate this)
-
-\b \e{ARCHIVE} or \e{FILE_ATTRIBUTE_ARCHIVE}
-
-\b \e{HIDDEN} or \e{FILE_ATTRIBUTE_HIDDEN}
-
-\b \e{OFFLINE} or \e{FILE_ATTRIBUTE_OFFLINE}
-
-\b \e{READONLY} or \e{FILE_ATTRIBUTE_READONLY}
-
-\b \e{SYSTEM} or \e{FILE_ATTRIBUTE_SYSTEM}
-
-\b \e{TEMPORARY} or \e{FILE_ATTRIBUTE_TEMPORARY}
-
-The error flag will be set if the file's attributes cannot be set (i.e. the file doesn't exist, or you don't have the right permissions). You can only set attributes. It's not possible to unset them. If you want to remove an attribute use NORMAL. This way all attributes are erased. This command doesn't support wildcards.
-
-\S2{regdll} RegDLL
-
-\c dllfile [entrypoint_name]
-
-Loads the specified DLL and calls DllRegisterServer (or entrypoint_name if specified). The error flag is set if an error occurs (i.e. it can't load the DLL, initialize OLE, find the entry point, or the function returned anything other than ERROR_SUCCESS (=0)).
-
-Use \R{setoutpath}{SetOutPath} to set the current directory for DLLs that depend on other DLLs that are now in the path or in the Windows directory. For example, if foo.dll depends on bar.dll which is located in $INSTDIR use:
-
-\c SetOutPath $INSTDIR
-\c RegDLL $INSTDIR\foo.dll
-
-\S2{unregdll} UnRegDLL
-
-\c dllfile
-
-Loads the specified DLL and calls DllUnregisterServer. The error flag is set if an error occurs (i.e. it can't load the DLL, initialize OLE, find the entry point, or the function returned anything other than ERROR_SUCCESS (=0)).
+\S1{generalpurpose} General Purpose Instructions
+
+\S2{callinstdll} CallInstDLL
+
+\c dllfile [/NOUNLOAD] function_name
+
+Calls a function named \e{function_name} inside a NSIS extension DLL, a plug-in. See the \L{../Examples/Plugin/}{example plugin} for how to make one. Extension DLLs can access the stack and variables. Use /NOUNLOAD to force the installer to leave the DLL loaded. Note: To automatically extract and call plug-in DLLs, use a plug-in command instead of CallInstDLL.
+
+\c Push "a parameter"
+\c Push "another parameter"
+\c CallInstDLL $INSTDIR\somedll.dll somefunction
+
+For easier plug-in handling, use the new \R{plugindlls}{plug-in call syntax}.
+
+\S2{copyfiles} CopyFiles
+
+\c [/SILENT] [/FILESONLY] filespec_on_destsys destination_path [size_of_files_in_kb]
+
+Copies files from the source to the destination on the installing system. Useful with $EXEDIR if you want to copy from installation media, or to copy from one place to another on the system. You might see a Windows status window of the copy operation if the operation takes a lot of time (to disable this, use /SILENT). The last parameter can be used to specify the size of the files that will be copied (in kilobytes), so that the installer can approximate the disk space requirements. On error, or if the user cancels the copy (only possible when /SILENT was omitted), the error flag is set. If /FILESONLY is specified, only files are copied.
+
+Fully-qualified path names should always be used with this instruction. Using relative paths will have unpredictable results.
+
+\c CreateDirectory $INSTDIR\backup
+\c CopyFiles $INSTDIR\*.dat $INSTDIR\backup
+
+\S2{createdirectory} CreateDirectory
+
+\c path_to_create
+
+Creates (recursively if necessary) the specified directory. The error flag is set if the directory couldn't be created.
+
+You should always specify an absolute path.
+
+\c CreateDirectory $INSTDIR\some\directory
+
+\S2{createshortcut} CreateShortCut
+
+\c link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]
+
+Creates a shortcut 'link.lnk' that links to 'target.file', with optional parameters 'parameters'.
+The icon used for the shortcut is 'icon.file,icon_index_number'; for default icon settings use empty strings for both icon.file and icon_index_number.
+start_options should be one of: \e{SW_SHOWNORMAL}, \e{SW_SHOWMAXIMIZED}, \e{SW_SHOWMINIMIZED}, or an empty string.
+keyboard_shortcut should be in the form of 'flag|c' where flag can be a combination (using |) of: \e{ALT}, \e{CONTROL}, \e{EXT}, or \e{SHIFT}. c is the character to use (a-z, A-Z, 0-9, F1-F24, etc). Note that no spaces are allowed in this string. A good example is "ALT|CONTROL|F8". $OUTDIR is used for the working directory. You can change it by using \R{setoutpath}{SetOutPath} before creating the Shortcut.
+description should be the description of the shortcut, or comment as it is called under XP.
+The error flag is set if the shortcut cannot be created (i.e. either of the paths (link or target) does not exist, or some other error).
+
+\c CreateDirectory "$SMPROGRAMS\My Company"
+\c CreateShortCut "$SMPROGRAMS\My Company\My Program.lnk" "$INSTDIR\My Program.exe" \
+\c "some command line parameters" "$INSTDIR\My Program.exe" 2 SW_SHOWNORMAL \
+\c ALT|CTRL|SHIFT|F5 "a description"
+
+\S2{getdllversion} GetDLLVersion
+
+\c filename user_var(high dword output) user_var(low dword output)
+
+Gets the version information from the DLL (or any other executable containing version information) in "filename". Sets the user output variables with the high and low dwords of version information on success; on failure the outputs are empty and the error flag is set. The following example reads the DLL version and copies a human readable version of it into $0:
+
+\c GetDllVersion "$INSTDIR\MyDLL.dll" $R0 $R1
+\c IntOp $R2 $R0 / 0x00010000
+\c IntOp $R3 $R0 & 0x0000FFFF
+\c IntOp $R4 $R1 / 0x00010000
+\c IntOp $R5 $R1 & 0x0000FFFF
+\c StrCpy $0 "$R2.$R3.$R4.$R5"
+
+\S2{getdllversionlocal} GetDLLVersionLocal
+
+\c localfilename user_var(high dword output) user_var(low dword output)
+
+This is similar to GetDLLVersion, only it acts on the system building the installer (it actually compiles into two StrCpy commands). Sets the two output variables with the DLL version information of the DLL on the build system.
+
+\S2{getfiletime} GetFileTime
+
+\c filename user_var(high dword output) user_var(low dword output)
+
+Gets the last write time of "filename". Sets the user output variables with the high and low dwords of the timestamp on success; on failure the outputs are empty and the error flag is set.
+
+\S2{getfiletimelocal} GetFileTimeLocal
+
+\c localfilename user_var(high dword output) user_var(low dword output)
+
+This is similar to GetFileTime, only it acts on the system building the installer (it actually compiles into two StrCpy commands). Sets the two output variables with the file timestamp of the file on the build system.
+
+\S2{getfullpathname} GetFullPathName
+
+\c [/SHORT] user_var(output) path_or_file
+
+Assign to the user variable $x, the full path of the file specified. If the path portion of the parameter is not found, the error flag will be set and $x will be empty. If /SHORT is specified, the path is converted to the short filename form. However, if /SHORT is not specified, the path isn't converted to its long filename form. To get the long filename, call GetLongPathName using the System plug-in. Note that GetLongPathName is only available on Windows 98, Windows 2000 and above.
+
+\c StrCpy $INSTDIR $PROGRAMFILES\NSIS
+\c SetOutPath $INSTDIR
+\c GetFullPathName $0 ..
+\c DetailPrint $0 # will print C:\Program Files
+\c GetFullPathName /SHORT $0 $INSTDIR
+\c DetailPrint $0 # will print C:\Progra~1\NSIS
+
+\c StrCpy $0 C:\Progra~1\NSIS
+\c System::Call 'kernel32::GetLongPathName(t r0, t .r1, i ${NSIS_MAX_STRLEN}) i .r2'
+\c StrCmp $2 error +2
+\c StrCpy $0 $1
+\c DetailPrint $0 # will print C:\Program Files\NSIS, where supported
+
+\S2{gettempfilename} GetTempFileName
+
+\c user_var(output) base_dir
+
+Assign to the user variable $x, the name of a temporary file. The file will have been created, so you can then overwrite it with what you please. The name of the temporary file is guaranteed to be unique. If to want the temporary file to be created in another directory than the Windows temp directory, specify a base_dir. Delete the file when done with it.
+
+\c GetTempFileName $0
+\c File /oname=$0 something.dat
+\c # do something with something.dat
+\c Delete $0
+
+\S2{searchpath} SearchPath
+
+\c user_var(output) filename
+
+Assign to the user variable $x, the full path of the file named by the second parameter. The error flag will be set and $x will be empty if the file cannot be found. Uses SearchPath() to search the system paths for the file.
+
+\S2{setfileattributes} SetFileAttributes
+
+\c filename attribute1|attribute2|...
+
+Sets the file attributes of 'filename'. Valid attributes can be combined with | and are:
+
+\b \e{NORMAL} or \e{FILE_ATTRIBUTE_NORMAL} (you can use 0 to abbreviate this)
+
+\b \e{ARCHIVE} or \e{FILE_ATTRIBUTE_ARCHIVE}
+
+\b \e{HIDDEN} or \e{FILE_ATTRIBUTE_HIDDEN}
+
+\b \e{OFFLINE} or \e{FILE_ATTRIBUTE_OFFLINE}
+
+\b \e{READONLY} or \e{FILE_ATTRIBUTE_READONLY}
+
+\b \e{SYSTEM} or \e{FILE_ATTRIBUTE_SYSTEM}
+
+\b \e{TEMPORARY} or \e{FILE_ATTRIBUTE_TEMPORARY}
+
+The error flag will be set if the file's attributes cannot be set (i.e. the file doesn't exist, or you don't have the right permissions). You can only set attributes. It's not possible to unset them. If you want to remove an attribute use NORMAL. This way all attributes are erased. This command doesn't support wildcards.
+
+\S2{regdll} RegDLL
+
+\c dllfile [entrypoint_name]
+
+Loads the specified DLL and calls DllRegisterServer (or entrypoint_name if specified). The error flag is set if an error occurs (i.e. it can't load the DLL, initialize OLE, find the entry point, or the function returned anything other than ERROR_SUCCESS (=0)).
+
+Use \R{setoutpath}{SetOutPath} to set the current directory for DLLs that depend on other DLLs that are now in the path or in the Windows directory. For example, if foo.dll depends on bar.dll which is located in $INSTDIR use:
+
+\c SetOutPath $INSTDIR
+\c RegDLL $INSTDIR\foo.dll
+
+\S2{unregdll} UnRegDLL
+
+\c dllfile
+
+Loads the specified DLL and calls DllUnregisterServer. The error flag is set if an error occurs (i.e. it can't load the DLL, initialize OLE, find the entry point, or the function returned anything other than ERROR_SUCCESS (=0)).
diff --git a/Docs/src/headers.but b/Docs/src/headers.but
index 4425eb7..72640f7 100755
--- a/Docs/src/headers.but
+++ b/Docs/src/headers.but
@@ -1,2605 +1,2605 @@
-\A{headers} Useful Headers
-
-
-\H{filefunc} File Functions Header
-
-
-\S1{} Introduction
-
-Include header:
-
-\c !include "FileFunc.nsh"
-
-
-Include function "GetFileExt" for install and "GetParent" for uninstall:
-
-\c !insertmacro GetFileExt
-\c !insertmacro un.GetParent
-
-
-Call functions:
-
-\c Section Install
-\c ${GetFileExt} "C:\My Downloads\Index.html" $R0
-\c ; $R0="html"
-\c SectionEnd
-
-\c Section un.Install
-\c ${un.GetParent} "C:\My Downloads\Index.html" $R0
-\c ; $R0="C:\My Downloads"
-\c SectionEnd
-
-
-\S1{locate} Locate
-
-\b Find files, directories and empty directories with mask and size options.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${Locate} "[Path]" "[Options]" "Function"
-
-\c "[Path]" ; Disk or Directory
-\c ;
-\c "[Options]" ; /L=[FD|F|D|DE|FDE]
-\c ; /L=FD - Locate Files and Directories (default)
-\c ; /L=F - Locate Files only
-\c ; /L=D - Locate Directories only
-\c ; /L=DE - Locate Empty Directories only
-\c ; /L=FDE - Locate Files and Empty Directories
-\c ; /M=[mask]
-\c ; /M=*.* - Locate all (default)
-\c ; /M=*.doc - Locate Work.doc, 1.doc ...
-\c ; /M=Pho* - Locate PHOTOS, phone.txt ...
-\c ; /M=win???.exe - Locate winamp.exe, winver.exe ...
-\c ; /M=winamp.exe - Locate winamp.exe only
-\c ; /S=No:No[B|K|M|G]
-\c ; /S= - Don't locate file size (faster) (default)
-\c ; /S=0:0B - Locate only files of 0 Bytes exactly
-\c ; /S=5:9K - Locate only files of 5 to 9 Kilobytes
-\c ; /S=:10M - Locate only files of 10 Megabyte or less
-\c ; /S=1G - Locate only files of 1 Gigabyte or more
-\c ; /G=[1|0]
-\c ; /G=1 - Locate with subdirectories (default)
-\c ; /G=0 - Locate without subdirectories
-\c ; /B=[0|1]
-\c ; /B=0 - Banner isn't used (default)
-\c ; /B=1 - Banner is used. Callback when function
-\c ; start to search in new directory
-\c "Function" ; Callback function when found
-\c
-\c Function "Function"
-\c ; $R9 "path\name"
-\c ; $R8 "path"
-\c ; $R7 "name"
-\c ; $R6 "size" ($R6="" if directory, $R6="0" if file with /S=)
-\c
-\c ; $R0-$R5 are not used (save data in them).
-\c ; ...
-\c
-\c Push $var ; If $var="StopLocate" Then exit from function
-\c FunctionEnd
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if disk or directory isn't exist
-\\<br\\>- Error flag if syntax error
-\\<br\\>- See also \W{http://nsis.sourceforge.net/Locate_plugin}{Locate plugin}
-
-
-\\<b\\>Example (Find one file):\\</b\\>
-
-\c Section
-\c ${Locate} "C:\ftp" "/L=F /M=RPC DCOM.rar /S=1K" "Example1"
-\c ; 'RPC DCOM.rar' file in 'C:\ftp' with size 1 Kb or more
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c MessageBox MB_OK "$$R0=$R0"
-\c SectionEnd
-\c
-\c Function Example1
-\c StrCpy $R0 $R9
-\c ; $R0="C:\ftp\files\RPC DCOM.rar"
-\c
-\c MessageBox MB_YESNO '$R0$\n$\nFind next?' IDYES +2
-\c StrCpy $0 StopLocate
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Write results to a text file):\\</b\\>
-
-\c Section
-\c GetTempFileName $R0
-\c FileOpen $R1 $R0 w
-\c ${Locate} "C:\ftp" "/S=:2M /G=0" "Example2"
-\c ; folders and all files with size 2 Mb or less
-\c ; don't scan subdirectories
-\c FileClose $R1
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c Exec '"notepad.exe" "$R0"'
-\c SectionEnd
-\c
-\c Function Example2
-\c StrCmp $R6 '' 0 +3
-\c FileWrite $R1 "Directory=$R9$\r$\n"
-\c goto +2
-\c FileWrite $R1 "File=$R9 Size=$R6 Mb$\r$\n"
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Write results to an INI file):\\</b\\>
-
-\c Section
-\c GetTempFileName $R0
-\c ${Locate} "C:\ftp" "/L=F /S=0K" "Example3"
-\c ; all files in 'C:\ftp' with size detect in Kb
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c Exec '"notepad.exe" "$R0"'
-\c SectionEnd
-\c
-\c Function Example3
-\c WriteINIStr $R0 "$R8" "$R7" "$R6 Kb"
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Delete empty directories):\\</b\\>
-
-\c Section
-\c StrCpy $R2 0
-\c StrCpy $R3 0
-\c
-\c loop:
-\c StrCpy $R1 0
-\c ${Locate} "C:\ftp" "/L=DE" "Example4"
-\c IntOp $R3 $R3 + 1
-\c IntOp $R2 $R2 + $R1
-\c StrCmp $R0 StopLocate +2
-\c StrCmp $R1 0 0 loop
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK 'error' IDOK +2
-\c MessageBox MB_OK '$R2 directories were removed$\n$R3 loops'
-\c SectionEnd
-\c
-\c Function Example4
-\c MessageBox MB_YESNOCANCEL 'Delete empty "$R9"?' IDNO end IDCANCEL cancel
-\c RMDir $R9
-\c IntOp $R1 $R1 + 1
-\c goto end
-\c
-\c cancel:
-\c StrCpy $R0 StopLocate
-\c
-\c end:
-\c Push $R0
-\c FunctionEnd
-
-\\<b\\>Example (Move all files into one folder):\\</b\\>
-
-\c Section
-\c StrCpy $R0 "C:\ftp" ;Directory move from
-\c StrCpy $R1 "C:\ftp2" ;Directory move into
-\c
-\c StrCpy $R2 0
-\c StrCpy $R3 0
-\c ${Locate} "$R0" "/L=F" "Example5"
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK 'error' IDOK +4
-\c StrCmp $R3 0 0 +2
-\c MessageBox MB_OK '$R2 files were moved' IDOK +2
-\c MessageBox MB_OK '$R2 files were moved$\n$R3 files were NOT moved'
-\c SectionEnd
-\c
-\c Function Example5
-\c StrCmp $R8 $R1 +6
-\c IfFileExists '$R1\$R7' +4
-\c Rename $R9 '$R1\$R7'
-\c IntOp $R2 $R2 + 1
-\c goto +2
-\c IntOp $R3 $R3 + 1
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Copy files with log):\\</b\\>
-
-\c Section
-\c StrCpy $R0 "C:\ftp" ;Directory copy from
-\c StrCpy $R1 "C:\ftp2" ;Directory copy into
-\c StrLen $R2 $R0
-\c
-\c GetTempFileName $0
-\c FileOpen $R3 $0 w
-\c ${Locate} "$R0" "/L=FDE" "Example6"
-\c FileClose $R3
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK 'error'
-\c
-\c Exec '"notepad.exe" "$0"' ;view log
-\c SectionEnd
-\c
-\c Function Example6
-\c StrCpy $1 $R8 '' $R2
-\c
-\c StrCmp $R6 '' 0 +3
-\c CreateDirectory '$R1$1\$R7'
-\c goto end
-\c CreateDirectory '$R1$1'
-\c CopyFiles /SILENT $R9 '$R1$1'
-\c
-\c IfFileExists '$R1$1\$R7' 0 +3
-\c FileWrite $R3 "-old:$R9 -new:$R1$1\$R7 -success$\r$\n"
-\c goto +2
-\c FileWrite $R3 "-old:$R9 -new:$R1$1\$R7 -failed$\r$\n"
-\c
-\c end:
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Recreate directory structure):\\</b\\>
-
-\c Section
-\c StrCpy $R0 "C:\ftp" ;Directory structure from
-\c StrCpy $R1 "C:\ftp2" ;Directory structure into
-\c StrLen $R2 $R0
-\c
-\c ${Locate} "$R0" "/L=D" "Example7"
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK 'error'
-\c SectionEnd
-\c
-\c Function Example7
-\c StrCpy $1 $R9 '' $R2
-\c CreateDirectory '$R1$1'
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Locate with banner - \W{http://nsis.sourceforge.net/Nxs_plug-in}{NxS plugin} required):\\</b\\>
-
-\c Section
-\c nxs::Show /NOUNLOAD `$(^Name) Setup` /top `Setup searching something$\r$\nPlease wait... If you can..` /h 1 /can 1 /end
-\c ${Locate} "C:\WINDOWS" "/L=F /M=*.inf /B=1" "Example8"
-\c nxs::Destroy
-\c SectionEnd
-\c
-\c Function Example8
-\c StrCmp $R0 $R8 abortcheck
-\c StrCpy $R0 $R8
-\c nxs::Update /NOUNLOAD /sub "$R8" /pos 78 /end
-\c
-\c abortcheck:
-\c nxs::HasUserAborted /NOUNLOAD
-\c Pop $0
-\c StrCmp $0 1 0 +2
-\c StrCpy $0 StopLocate
-\c
-\c StrCmp $R9 '' end
-\c ;...
-\c
-\c end:
-\c Push $0
-\c FunctionEnd
-
-\S1{getsize} GetSize
-
-\b Find the size of a file, files mask or directory.
-
-\b Find the sum of the files, directories and subdirectories.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetSize} "[Path]" "[Options]" $var1 $var2 $var3
-
-\c "[Path]" ; Disk or Directory
-\c ;
-\c "[Options]" ; /M=[mask]
-\c ; /M=*.* - Find all (default)
-\c ; /M=*.doc - Find Work.doc, 1.doc ...
-\c ; /M=Pho* - Find PHOTOS, phone.txt ...
-\c ; /M=win???.exe - Find winamp.exe, winver.exe ...
-\c ; /M=winamp.exe - Find winamp.exe only
-\c ; /S=No:No[B|K|M|G]
-\c ; /S= - Don't find file size (faster) (default)
-\c ; /S=0:0B - Find only files of 0 Bytes exactly
-\c ; /S=5:9K - Find only files of 5 to 9 Kilobytes
-\c ; /S=:10M - Find only files of 10 Megabyte or less
-\c ; /S=1G - Find only files of 1 Gigabyte or more
-\c ; /G=[1|0]
-\c ; /G=1 - Find with subdirectories (default)
-\c ; /G=0 - Find without subdirectories
-\c ;
-\c $var1 ; Result1: Size
-\c $var2 ; Result2: Sum of files
-\c $var3 ; Result3: Sum of directories
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if disk or directory isn't exist
-\\<br\\>- Error flag if syntax error
-\\<br\\>- See also \W{http://nsis.sourceforge.net/Locate_plugin}{Locate plugin}
-
-
-\\<b\\>Example (1):\\</b\\>
-
-\c Section
-\c ; Find file size "C:\WINDOWS\Explorer.exe" in kilobytes
-\c
-\c ${GetSize} "C:\WINDOWS" "/M=Explorer.exe /S=0K /G=0" $0 $1 $2
-\c ; $0="220" Kb
-\c ; $1="1" files
-\c ; $2="" directories
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-
-\\<b\\>Example (2):\\</b\\>
-
-\c Section
-\c ; Find folder size "C:\Installs\Reanimator\Drivers" in megabytes
-\c
-\c ${GetSize} "C:\Installs\Reanimator\Drivers" "/S=0M" $0 $1 $2
-\c ; $0="132" Mb
-\c ; $1="555" files
-\c ; $2="55" directories
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-
-\\<b\\>Example (3):\\</b\\>
-
-\c Section
-\c ; Find sum of files and folders "C:\WINDOWS" (no subfolders)
-\c
-\c ${GetSize} "C:\WINDOWS" "/G=0" $0 $1 $2
-\c ; $0="" size
-\c ; $1="253" files
-\c ; $2="46" directories
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-
-\S1{drivespace} DriveSpace
-
-\b Get total, occupied or free space of the drive.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${DriveSpace} "[Drive]" "[Options]" $var
-
-\c "[Drive]" ; Disk to check
-\c ;
-\c "[Options]" ; /D=[T|O|F]
-\c ; /D=T - Total space (default)
-\c ; /D=O - Occupied space
-\c ; /D=F - Free space
-\c ; /S=[B|K|M|G]
-\c ; /S=B - size in Bytes (default)
-\c ; /S=K - size in Kilobytes
-\c ; /S=M - size in Megabytes
-\c ; /S=G - size in Gigabytes
-\c ;
-\c $var ; Result: Size
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if disk isn't exist or not ready
-\\<br\\>- Error flag if syntax error
-
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${DriveSpace} "C:\" "/D=F /S=M" $R0
-\c ; $R0="2530" megabytes free on drive C:
-\c SectionEnd
-
-\S1{getdrives} GetDrives
-
-\b Find all available drives in the system.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetDrives} "[Option]" "Function"
-
-\c "[Option]" ; [FDD+HDD+CDROM+NET+RAM]
-\c ; FDD Floppy Disk Drives
-\c ; HDD Hard Disk Drives
-\c ; CDROM CD-ROM Drives
-\c ; NET Network Drives
-\c ; RAM RAM Disk Drives
-\c ;
-\c ; [ALL]
-\c ; Find all drives by letter (default)
-\c ;
-\c "Function" ; Callback function when found
-\c
-\c Function "Function"
-\c ; $9 "drive letter" (a:\ c:\ ...)
-\c ; $8 "drive type" (FDD HDD ...)
-\c
-\c ; $R0-$R9 are not used (save data in them).
-\c ; ...
-\c
-\c Push $var ; If $var="StopGetDrives" Then exit from function
-\c FunctionEnd
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${GetDrives} "FDD+CDROM" "Example1"
-\c SectionEnd
-\c
-\c Function Example1
-\c MessageBox MB_OK "$9 ($8 Drive)"
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${GetDrives} "ALL" "Example2"
-\c SectionEnd
-\c
-\c Function Example2
-\c MessageBox MB_OK "$9 ($8 Drive)"
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example3 (Get type of drive):\\</b\\>
-
-\c Section
-\c StrCpy $R0 "D:\" ;Drive letter
-\c StrCpy $R1 "invalid"
-\c
-\c ${GetDrives} "ALL" "Example3"
-\c
-\c MessageBox MB_OK "Type of drive $R0 is $R1"
-\c SectionEnd
-\c
-\c Function Example3
-\c StrCmp $9 $R0 0 +3
-\c StrCpy $R1 $8
-\c StrCpy $0 StopGetDrives
-\c
-\c Push $0
-\c FunctionEnd
-
-\S1{gettime} GetTime
-
-\b Get local or system time.
-
-\b Get file time (access, creation and modification).
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetTime} "[File]" "[Option]" $var1 $var2 $var3 $var4 $var5 $var6 $var7
-
-\c "[File]" ; Ignored if "L" or "LS"
-\c ;
-\c "[Option]" ; [Options]
-\c ; L Local time
-\c ; A last Access file time
-\c ; C Creation file time
-\c ; M Modification file time
-\c ; LS System time (UTC)
-\c ; AS last Access file time (UTC)
-\c ; CS Creation file time (UTC)
-\c ; MS Modification file time (UTC)
-\c ;
-\c $var1 ; Result1: day
-\c $var2 ; Result2: month
-\c $var3 ; Result3: year
-\c $var4 ; Result4: day of week name
-\c $var5 ; Result5: hour
-\c $var6 ; Result6: minute
-\c $var7 ; Result7: seconds
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if file isn't exist
-\\<br\\>- Error flag if syntax error
-\\<br\\>- See also \W{http://nsis.sourceforge.net/Time_plugin}{Time plugin}
-
-
-\\<b\\>Example (Get local time):\\</b\\>
-
-\c Section
-\c ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6
-\c ; $0="01" day
-\c ; $1="04" month
-\c ; $2="2005" year
-\c ; $3="Friday" day of week name
-\c ; $4="16" hour
-\c ; $5="05" minute
-\c ; $6="50" seconds
-\c
-\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6'
-\c SectionEnd
-
-\\<b\\>Example (Get file time):\\</b\\>
-
-\c Section
-\c ${GetTime} "$WINDIR\Explorer.exe" "C" $0 $1 $2 $3 $4 $5 $6
-\c ; $0="12" day
-\c ; $1="10" month
-\c ; $2="2004" year
-\c ; $3="Tuesday" day of week name
-\c ; $4="2" hour
-\c ; $5="32" minute
-\c ; $6="03" seconds
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6'
-\c SectionEnd
-
-\\<b\\>Example (Get system time):\\</b\\>
-
-\c Section
-\c ${GetTime} "" "LS" $0 $1 $2 $3 $4 $5 $6
-\c ; $0="01" day
-\c ; $1="04" month
-\c ; $2="2005" year
-\c ; $3="Friday" day of week name
-\c ; $4="11" hour
-\c ; $5="05" minute
-\c ; $6="50" seconds
-\c
-\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6'
-\c SectionEnd
-
-\\<b\\>Example (Convert time to 12-hour format AM/PM):\\</b\\>
-
-\c Section
-\c ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6
-\c
-\c StrCmp $4 0 0 +3
-\c StrCpy $4 12
-\c goto +3
-\c StrCmp $4 12 +5
-\c IntCmp $4 12 0 0 +3
-\c StrCpy $7 AM
-\c goto +3
-\c IntOp $4 $4 - 12
-\c StrCpy $7 PM
-\c
-\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6 $7'
-\c SectionEnd
-
-\S1{getfileattributes} GetFileAttributes
-
-\b Get attributes of file or directory.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetFileAttributes} "[File]" "[Attributes]" $var
-
-\c "[File]" ; File or directory
-\c ;
-\c "[Attributes]" ; "ALL" (default)
-\c ; -all attributes of file combined with "|" to output
-\c ;
-\c ; "READONLY|HIDDEN|SYSTEM|DIRECTORY|ARCHIVE|
-\c ; DEVICE|NORMAL|TEMPORARY|SPARSE_FILE|REPARSE_POINT|
-\c ; COMPRESSED|OFFLINE|NOT_CONTENT_INDEXED|ENCRYPTED"
-\c ; -file must have specified attributes
-\c ;
-\c $var ; Result:
-\c ; $var=attr1|attr2|... (if used "ALL")
-\c ; $var=1 file has specified attributes
-\c ; $var=0 file has no specified attributes
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if file doesn't exist
-
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${GetFileAttributes} "C:\MSDOS.SYS" "ALL" $R0
-\c ; $R0=READONLY|HIDDEN|SYSTEM|ARCHIVE
-\c SectionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${GetFileAttributes} "C:\MSDOS.SYS" "SYSTEM|HIDDEN" $R0
-\c ; $R0=1
-\c SectionEnd
-
-\\<b\\>Example3:\\</b\\>
-
-\c Section
-\c ${GetFileAttributes} "C:\MSDOS.SYS" "NORMAL" $R0
-\c ; $R0=0
-\c SectionEnd
-
-\S1{getfileversion} GetFileVersion
-
-\b Get version information from executable file.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetFileVersion} "[Executable]" $var
-
-\c "[Executable]" ; Executable file (*.exe *.dll ...)
-\c $var ; Result: Version number
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if file doesn't exist
-\\<br\\>- Error flag if file doesn't contain version information
-
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetFileVersion} "C:\ftp\program.exe" $R0
-\c ; $R0="1.1.0.12"
-\c SectionEnd
-
-\S1{getexename} GetExeName
-
-\b Get installer filename (with valid case for Windows 98/Me).
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetExeName} $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetExeName} $R0
-\c ; $R0="C:\ftp\program.exe"
-\c SectionEnd
-
-\S1{getexepath} GetExePath
-
-\b Get installer pathname ($EXEDIR with valid case for Windows 98/Me).
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetExePath} $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetExePath} $R0
-\c ; $R0="C:\ftp"
-\c SectionEnd
-
-\S1{headers_getparameters} GetParameters
-
-\b Get command line parameters.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetParameters} $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetParameters} $R0
-\c ; $R0="[parameters]"
-\c SectionEnd
-
-\S1{getoptions} GetOptions
-
-\b Get options from command line parameters.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetOptions} "[Parameters]" "[Option]" $var
-
-\c "[Parameters]" ; command line parameters
-\c ;
-\c "[Option]" ; option name
-\c ;
-\c $var ; Result: option string
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if option not found
-\\<br\\>- First option symbol it is delimiter
-
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${GetOptions} "/S /T" "/T" $R0
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Not found" IDOK +2
-\c MessageBox MB_OK "Found"
-\c SectionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${GetOptions} "-INSTDIR=C:\Program Files\Common Files -SILENT=yes" "-INSTDIR=" $R0
-\c ;$R0=C:\Program Files\Common Files
-\c SectionEnd
-
-\\<b\\>Example3:\\</b\\>
-
-\c Section
-\c ${GetOptions} '/SILENT=yes /INSTDIR="C:/Program Files/Common Files" /ADMIN=password' "/INSTDIR=" $R0
-\c ;$R0=C:/Program Files/Common Files
-\c SectionEnd
-
-\\<b\\>Example4:\\</b\\>
-
-\c Section
-\c ${GetOptions} `-SILENT=yes -INSTDIR='"C:/Program Files/Common Files"' -ADMIN=password` "-INSTDIR=" $R0
-\c ;$R0="C:/Program Files/Common Files"
-\c SectionEnd
-
-\S1{getoptionss} GetOptionsS
-
-\b Same as \R{getoptions}{GetOptions}, but case sensitive.
-
-\S1{getroot} GetRoot
-
-\b Get root directory.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetRoot} "[FullPath]" $var
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${GetRoot} "C:\Program Files\NSIS" $R0
-\c ; $R0="C:"
-\c SectionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${GetRoot} "\\SuperPimp\NSIS\Source\exehead\Ui.c" $R0
-\c ; $R0="\\SuperPimp\NSIS"
-\c SectionEnd
-
-\S1{headers_getparent} GetParent
-
-\b Get parent directory.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetParent} "[PathString]" $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetParent} "C:\Program Files\Winamp\uninstwa.exe" $R0
-\c ; $R0="C:\Program Files\Winamp"
-\c SectionEnd
-
-\S1{getfilename} GetFileName
-
-\b Get last part from directory path.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetFileName} "[PathString]" $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetFileName} "C:\Program Files\Winamp\uninstwa.exe" $R0
-\c ; $R0="uninstwa.exe"
-\c SectionEnd
-
-\S1{getbasename} GetBaseName
-
-\b Get file name without extension.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetBaseName} "[FileString]" $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetBaseName} "C:\ftp\program.exe" $R0
-\c ; $R0="program"
-\c SectionEnd
-
-\S1{getfileext} GetFileExt
-
-\b Get extension of file.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${GetFileExt} "[FileString]" $var
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${GetFileExt} "C:\ftp\program.exe" $R0
-\c ; $R0="exe"
-\c SectionEnd
-
-\S1{bannertrimpath} BannerTrimPath
-
-\b Trim string path for banner.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${BannerTrimPath} "[PathString]" "[Option]" $var
-
-\c "[PathString]" ;
-\c ;
-\c "[Option]" ; [Length][A|B|C|D]
-\c ;
-\c ; Length -Maximum string length
-\c ; A -Trim center path (default)
-\c ; (C:\root\...\third path)
-\c ; If A mode not possible Then will be used B mode
-\c ; B -Trim right path
-\c ; (C:\root\second path\...)
-\c ; If B mode not possible Then will be used C mode
-\c ; C -Trim right string
-\c ; (C:\root\second path\third p...)
-\c ; D -Trim right string + filename
-\c ; (C:\root\second p...\third path)
-\c ; If D mode not possible Then will be used C mode
-\c ;
-\c $var ; Result: Trimmed path
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${BannerTrimPath} "C:\Server\Documents\Terminal\license.htm" "35A" $R0
-\c ;$R0=C:\Server\...\Terminal\license.htm
-\c SectionEnd
-
-\\<b\\>Example (Banner plugin):\\</b\\>
-
-\c !include "WinMessages.nsh"
-\c !include "FileFunc.nsh"
-\c !insertmacro Locate
-\c
-\c Section
-\c Banner::show /NOUNLOAD "Starting..."
-\c Banner::getWindow /NOUNLOAD
-\c Pop $R1
-\c ${Locate} "$WINDIR" "/L=F /M=*.* /B=1" "LocateCallback"
-\c Banner::destroy
-\c SectionEnd
-\c
-\c Function LocateCallback
-\c StrCmp $R0 $R8 code
-\c StrCpy $R0 $R8
-\c ${BannerTrimPath} "$R8" "38B" $R8
-\c GetDlgItem $1 $R1 1030
-\c SendMessage $1 ${WM_SETTEXT} 0 "STR:$R8"
-\c
-\c code:
-\c StrCmp $R9 '' end
-\c ;...
-\c
-\c end:
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (\W{http://nsis.sourceforge.net/Nxs_plug-in}{NxS plugin}):\\</b\\>
-
-\c !include "FileFunc.nsh"
-\c !insertmacro Locate
-\c
-\c Section
-\c nxs::Show /NOUNLOAD `$(^Name) Setup`\
-\c /top `Setup searching something$\nPlease wait$\nIf you can...`\
-\c /h 1 /can 1 /end
-\c ${Locate} "$WINDIR" "/L=F /M=*.* /B=1" "LocateCallback"
-\c nxs::Destroy
-\c SectionEnd
-\c
-\c Function LocateCallback
-\c StrCmp $R0 $R8 abortcheck
-\c StrCpy $R0 $R8
-\c ${BannerTrimPath} "$R8" "55A" $R8
-\c nxs::Update /NOUNLOAD /sub "$R8" /pos 78 /end
-\c
-\c abortcheck:
-\c nxs::HasUserAborted /NOUNLOAD
-\c Pop $0
-\c StrCmp $0 1 0 +2
-\c StrCpy $0 StopLocate
-\c
-\c StrCmp $R9 '' end
-\c ;...
-\c
-\c end:
-\c Push $0
-\c FunctionEnd
-
-\S1{dirstate} DirState
-
-\b Check directory full, empty or not exist.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${DirState} "[path]" $var
-
-\c "[path]" ; Directory
-\c $var ; Result:
-\c ; $var=0 (empty)
-\c ; $var=1 (full)
-\c ; $var=-1 (directory not found)
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${DirState} "$TEMP" $R0
-\c ; $R0="1" directory is full
-\c SectionEnd
-
-\S1{refreshshellicons} RefreshShellIcons
-
-\b After changing file associations, you can call this function to refresh the shell immediately.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${RefreshShellIcons}
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c WriteRegStr HKCR "Winamp.File\DefaultIcon" "" "$PROGRAMFILES\Winamp\WINAMP.EXE,2"
-\c
-\c ${RefreshShellIcons}
-\c SectionEnd
-
-
-\H{textfunc} Text Functions Header
-
-
-\S1{} Introduction
-
-Include header:
-
-\c !include "TextFunc.nsh"
-
-
-Include function "LineRead" for install and "TrimNewLines" for uninstall:
-
-\c !insertmacro LineRead
-\c !insertmacro un.TrimNewLines
-
-
-Call functions:
-
-\c Section Install
-\c ${LineRead} "C:\a.log" "-1" $R0
-\c ; $R0="Last line$\r$\n"
-\c SectionEnd
-
-\c Section un.Install
-\c ${un.TrimNewLines} "Last line$\r$\n" $R0
-\c ; $R0="Last line"
-\c SectionEnd
-
-
-\S1{linefind} LineFind
-
-\b Find specified lines in text file, and edit or view these lines in callback function.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${LineFind} "[File1]" "[File2|/NUL]" "[LineNumbers]" "Function"
-
-\c "[File1]" ; Input text file
-\c ;
-\c "[File2|/NUL]" ; [File2]
-\c ; Output text file
-\c ; If empty then File2=File1
-\c ; [/NUL]
-\c ; No output text file (only read File1)
-\c ;
-\c "[LineNumbers]" ; [No|-No|No:No|{No}|{-No}|{No:No}]
-\c ; 1:-1 all lines to change (default)
-\c ; 2 second line from start
-\c ; -3 third line from end
-\c ; 5:9 range of lines from 5 to 9
-\c ; {2} only second line from start to output
-\c ; {-3} only third line from end to output
-\c ; {5:9} only range of lines from 5 to 9 to output
-\c ;
-\c "Function" ; Callback function for specified lines
-\c
-\c Function "Function"
-\c ; $R9 current line
-\c ; $R8 current line number
-\c ; $R7 current line negative number
-\c ; $R6 current range of lines
-\c ; $R5 handle of a file opened to read
-\c ; $R4 handle of a file opened to write ($R4="" if "/NUL")
-\c
-\c ; you can use any string functions
-\c ; $R0-$R3 are not used (save data in them).
-\c ; ...
-\c
-\c Push $var ; If $var="StopLineFind" Then exit from function
-\c ; If $var="SkipWrite" Then skip current line (ignored if "/NUL")
-\c FunctionEnd
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if input file doesn't exist
-\\<br\\>- Error flag if output file path doesn't exist
-\\<br\\>- Ranges must be specified on growth (2 4:5 9:-8 -5:-4 -2:-1)
-\\<br\\>- Output file will not be updated if no changes made.
-
-\\<b\\>Example1 (delete first two symbols):\\</b\\>
-
-\c Section
-\c ${LineFind} "C:\a.log" "C:\a-edited.log" "3:-1" "Example1"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example1
-\c ${TrimNewLines} '$R9' $R9
-\c StrCpy $R9 $R9 '' 2
-\c StrCpy $R9 '$R9$\r$\n'
-\c ;start from 3 line and delete first two symbols
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example2 (show changed lines):\\</b\\>
-
-\c Section
-\c ${LineFind} "C:\a.log" "a.log" "{5:12 15 -6:-5 -1}" "Example2"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example2
-\c ${TrimNewLines} '$R9' $R9
-\c StrCpy $R9 "$R9 ~Changed line ($R8)~$\r$\n"
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example3 (delete lines):\\</b\\>
-
-\c Section
-\c ${LineFind} "C:\a.log" "\logs\a.log" "2:3 10:-5 -3:-2" "Example3"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example3
-\c StrCpy $0 SkipWrite
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example4 (insert lines):\\</b\\>
-
-\c Section
-\c ${LineFind} "C:\a.log" "" "10" "Example4
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example4
-\c FileWrite $R4 "---First Line---$\r$\n"
-\c FileWrite $R4 "---Second Line ...---$\r$\n"
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example5 (replace in file with count of changes - "WordFunc.nsh" required):\\</b\\>
-
-\c !include "WordFunc.nsh"
-\c !insertmacro WordReplace
-\c
-\c Section
-\c StrCpy $R0 0
-\c ${LineFind} "C:\a.log" "C:\logs\a.log" "1:-1" "Example5"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c MessageBox MB_OK "Changed lines=$R0"
-\c SectionEnd
-\c
-\c Function Example5
-\c StrCpy $1 $R9
-\c
-\c ${WordReplace} '$R9' ' ' '_' '+*' $R9
-\c
-\c StrCmp $1 $R9 +2
-\c IntOp $R0 $R0 + 1
-\c ;$R0 count of changed lines
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example6 (line string to cut or delete):\\</b\\>
-
-\c Section
-\c ${LineFind} "\a.log" "C:\logs\a.log" "" "Example6"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c MessageBox MB_OK "Processed lines=$R1:$R2"
-\c SectionEnd
-\c
-\c Function Example6
-\c ;(Cut lines from a line to another line (also including that line))
-\c StrCmp $R0 finish stop
-\c StrCmp $R0 start finish
-\c StrCmp $R9 'Start Line$\r$\n' 0 skip
-\c StrCpy $R0 start
-\c StrCpy $R1 $R8
-\c goto code
-\c finish:
-\c StrCmp $R9 'Finish Line$\r$\n' 0 code
-\c StrCpy $R0 finish
-\c StrCpy $R2 $R8
-\c goto code
-\c skip:
-\c StrCpy $0 SkipWrite
-\c goto output
-\c stop:
-\c StrCpy $0 StopLineFind
-\c goto output
-\c
-\c ;;(Delete lines from a line to another line (also including that line))
-\c ; StrCmp $R0 finish code
-\c ; StrCmp $R0 start finish
-\c ; StrCmp $R9 'Start Line$\r$\n' 0 code
-\c ; StrCpy $R0 start
-\c ; StrCpy $R1 $R8
-\c ; goto skip
-\c ; finish:
-\c ; StrCmp $R9 'Finish Line$\r$\n' 0 skip
-\c ; StrCpy $R0 finish
-\c ; StrCpy $R2 $R8
-\c ; skip:
-\c ; StrCpy $0 SkipWrite
-\c ; goto output
-\c
-\c code:
-\c ;...
-\c
-\c output:
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example7 (read lines):\\</b\\>
-
-\c Section
-\c ${LineFind} "C:\a.log" "/NUL" "1:-1" "Example7"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example7
-\c MessageBox MB_OKCANCEL '$$R9 "Line"=[$R9]$\n$$R8 "#" =[$R8]' IDOK +2
-\c StrCpy $0 StopLineFind
-\c
-\c Push $0
-\c FunctionEnd
-
-\S1{lineread} LineRead
-
-\b Get line in file specified with number.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${LineRead} "[File]" "[LineNumber]" $var
-
-\c "[File]" ; Input text file
-\c ;
-\c "[LineNumber]" ; [No|-No]
-\c ; 3 line number from start
-\c ; -5 line number from end
-\c ;
-\c $var ; Result: Line
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if input file doesn't exist
-\\<br\\>- Error flag if line number not found
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${LineRead} "C:\a.log" "-1" $R0
-\c ; $R0="Last line$\r$\n"
-\c SectionEnd
-
-\S1{filereadfromend} FileReadFromEnd
-
-\b Read text file from end line by line.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${FileReadFromEnd} "[File]" "Function"
-
-\c "[File]" ; Input text file
-\c "Function" ; Callback function
-\c
-\c Function "Function"
-\c ; $9 current line
-\c ; $8 current line number
-\c ; $7 current line negative number
-\c
-\c ; $R0-$R9 are not used (save data in them).
-\c ; ...
-\c
-\c Push $var ; If $var="StopFileReadFromEnd" Then exit from function
-\c FunctionEnd
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if input file doesn't exist
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${FileReadFromEnd} "C:\a.log" "Example1"
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example1
-\c MessageBox MB_OKCANCEL '"Line"=[$9]$\n "#"=[$8]$\n "-#"=[$7]' IDOK +2
-\c StrCpy $0 StopFileReadFromEnd
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example2 (Reverse text file):\\</b\\>
-
-\c Section
-\c GetTempFileName $R0
-\c FileOpen $R1 $R0 w
-\c ${FileReadFromEnd} "C:\a.log" "Example2"
-\c FileClose $R1
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c Exec '"notepad.exe" "$R0"'
-\c SectionEnd
-\c
-\c Function Example2
-\c StrCmp $7 -1 0 +5
-\c StrCpy $1 $9 1 -1
-\c StrCmp $1 '$\n' +3
-\c StrCmp $1 '$\r' +2
-\c StrCpy $9 '$9$\r$\n'
-\c
-\c FileWrite $R1 "$9"
-\c
-\c Push $0
-\c FunctionEnd
-
-\S1{linesum} LineSum
-
-\b Get sum of lines in text file.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${LineSum} "[File]" $var
-
-\c "[File]" ; Input file
-\c $var ; Result: Sum of lines
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if input file doesn't exist
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${LineSum} "C:\a.log" $R0
-\c ; $R0="54"
-\c SectionEnd
-
-\S1{filejoin} FileJoin
-
-\b Join two files in one (File1 + File2 = File3).
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${FileJoin} "[File1]" "[File2]" "[File3]"
-
-\c "[File1]" ; Input File1
-\c "[File2]" ; Input File2
-\c "[File3]" ; Output File3
-\c ; If [File3]="" Then add [File2] to [File1]
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if input files don't exist
-\\<br\\>- Error flag if output file path doesn't exist
-
-\\<b\\>Example1 (Join: a.log + b.log = Z.log):\\</b\\>
-
-\c Section
-\c ${FileJoin} "C:\a.log" "C:\logs\b.log" "C:\Z.log"
-\c SectionEnd
-
-\\<b\\>Example2 (Add: a.log + b.log = a.log):\\</b\\>
-
-\c Section
-\c ${FileJoin} "C:\a.log" "C:\logs\b.log" "C:\a.log"
-\c SectionEnd
-
-\S1{textcompare} TextCompare
-
-\b Compare two text files.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${TextCompare} "[File1]" "[File2]" "[Option]" "Function"
-
-\c "[File1]" ; File1 Compare these lines
-\c "[File2]" ; File2 Compare with these lines
-\c "[Options]" ; (line-by-line):
-\c ; FastDiff Compare line N (File1) with line N (File2)
-\c ; Call function if Different lines found
-\c ; FastEqual Compare line N (File1) with line N (File2)
-\c ; Call function if Equal lines found
-\c ; (line number independent):
-\c ; SlowDiff Compare line N (File1) with all lines (File2)
-\c ; Call function if line N (File1) Different
-\c ; SlowEqual Compare line N (File1) with all lines (File2)
-\c ; Call function if line N (File1) Equal
-\c "Function" ; Callback function
-\c
-\c Function "Function"
-\c ; $9 "Line File1"
-\c ; $8 "Line number"
-\c ; $7 "Line File2" (empty if SlowDiff)
-\c ; $6 "Line number" (empty if SlowDiff)
-\c
-\c ; $R0-$R9 are not used (save data in them).
-\c ; ...
-\c
-\c Push $var ; If $var="StopTextCompare" Then exit from function
-\c FunctionEnd
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if File1 or File2 doesn't exist
-\\<br\\>- Error flag if syntax error
-
-\\<b\\>Example (Different or Equal):\\</b\\>
-
-\c Section
-\c StrCpy $R0 ''
-\c ${TextCompare} "C:\1.txt" "C:\2.txt" "FastDiff" "Example1"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +4
-\c
-\c StrCmp $R0 NotEqual 0 +2
-\c MessageBox MB_OK "Files differ" IDOK +2
-\c MessageBox MB_OK "Files identical"
-\c SectionEnd
-\c
-\c Function Example1
-\c StrCpy $R0 NotEqual
-\c StrCpy $0 StopTextCompare
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Compare line-by-line - Different):\\</b\\>
-
-\c Section
-\c StrCpy $R0 'Text1.txt'
-\c StrCpy $R1 'Text2.txt'
-\c
-\c GetTempFileName $R2
-\c FileOpen $R3 $R2 w
-\c FileWrite $R3 "$R0 | $R1$\r$\n"
-\c ${TextCompare} "$R0" "$R1" "FastDiff" "Example2"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c
-\c Exec "notepad.exe $R2"
-\c FunctionEnd
-\c
-\c Function Example2
-\c FileWrite $R3 '$8=$9'
-\c FileWrite $R3 '$6=$7$\r$\n'
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Compare line-by-line - Equal):\\</b\\>
-
-\c Section
-\c StrCpy $R0 'Text1.txt'
-\c StrCpy $R1 'Text2.txt'
-\c
-\c GetTempFileName $R2
-\c FileOpen $R3 $R2 w
-\c FileWrite $R3 "$R0 | $R1$\r$\n"
-\c ${TextCompare} "$R0" "$R1" "FastEqual" "Example3"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c
-\c Exec "notepad.exe $R2"
-\c FunctionEnd
-\c
-\c Function Example3
-\c FileWrite $R3 '$8|$6=$9'
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Compare all lines - Different):\\</b\\>
-
-\c Section
-\c StrCpy $R0 'Text1.txt'
-\c StrCpy $R1 'Text2.txt'
-\c
-\c GetTempFileName $R2
-\c FileOpen $R3 $R2 w
-\c FileWrite $R3 "$R0 | $R1$\r$\n"
-\c ${TextCompare} "$R0" "$R1" "SlowDiff" "Example4"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK end
-\c
-\c FileWrite $R3 "$\r$\n$R1 | $R0$\r$\n"
-\c ${TextCompare} "$R1" "$R0" "SlowDiff" "Example4"
-\c FileClose $R3
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK end
-\c
-\c Exec "notepad.exe $R2"
-\c
-\c end:
-\c FunctionEnd
-\c
-\c Function Example4
-\c FileWrite $R3 '$8=$9'
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Compare all lines - Equal):\\</b\\>
-
-\c Section
-\c StrCpy $R0 'Text1.txt'
-\c StrCpy $R1 'Text2.txt'
-\c
-\c GetTempFileName $R2
-\c FileOpen $R3 $R2 w
-\c FileWrite $R3 "$R0 | $R1$\r$\n"
-\c ${TextCompare} "$R0" "$R1" "SlowEqual" "Example5"
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error" IDOK +2
-\c
-\c Exec "notepad.exe $R2"
-\c FunctionEnd
-\c
-\c Function Example5
-\c FileWrite $R3 '$8|$6=$9'
-\c
-\c Push $0
-\c FunctionEnd
-
-\\<b\\>Example (Show variables):\\</b\\>
-
-\c Section
-\c ${TextCompare} "C:\1.txt" "C:\2.txt" "FastDiff" "Example6"
-\c
-\c IfErrors 0 +2
-\c MessageBox MB_OK "Error"
-\c SectionEnd
-\c
-\c Function Example6
-\c MessageBox MB_OKCANCEL '$$9 "Line File1" =[$9]$\n$$8 "Line #" =[$8]$\n$$7 "Line File2" =[$7]$\n$$6 "Line #" =[$6]' IDOK +2
-\c StrCpy $0 StopTextCompare
-\c
-\c Push $0
-\c FunctionEnd
-
-\S1{textcompares} TextCompareS
-
-\b Same as \R{textcompare}{TextCompare}, but case sensitive.
-
-\S1{configread} ConfigRead
-
-\b Read value from entry name in config file.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${ConfigRead} "[File]" "[Entry]" $var
-
-\c "[File]" ; config file
-\c ;
-\c "[Entry]" ; entry name
-\c ;
-\c $var ; Result: Value
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if entry not found
-\\<br\\>- Error flag if file doesn't exist
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${ConfigRead} "C:\AUTOEXEC.BAT" "SET winbootdir=" $R0
-\c ;$R0=C:\WINDOWS
-\c SectionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${ConfigRead} "C:\apache\conf\httpd.conf" "Timeout " $R0
-\c ;$R0=30
-\c SectionEnd
-
-\S1{configreads} ConfigReadS
-
-\b Same as \R{configread}{ConfigRead}, but case sensitive.
-
-\S1{configwrite} ConfigWrite
-
-\b Write value from entry name in config file.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${ConfigWrite} "[File]" "[Entry]" "[Value]" $var
-
-\c "[File]" ; config file
-\c ;
-\c "[Entry]" ; entry name
-\c ;
-\c "[Value]" ; value name
-\c ; if "" then delete Entry
-\c ;
-\c $var ; Result:
-\c ; $var=CHANGED Value is written
-\c ; $var=DELETED Entry is deleted
-\c ; $var=ADDED Entry and Value are added
-\c ; $var=SAME Entry and Value already exist
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if file doesn't exist
-\\<br\\>- Error flag if file can't be opened
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${ConfigWrite} "C:\AUTOEXEC.BAT" "SET winbootdir=" "D:\WINDOWS" $R0
-\c ;$R0=CHANGED
-\c SectionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${ConfigWrite} "C:\apache\conf\httpd.conf" "Timeout " "30" $R0
-\c ;$R0=SAME
-\c SectionEnd
-
-\\<b\\>Example3:\\</b\\>
-
-\c Section
-\c ${ConfigWrite} "C:\apache\conf\httpd.conf" "Timeout " "" $R0
-\c ;$R0=DELETED
-\c SectionEnd
-
-\S1{configwrites} ConfigWriteS
-
-\b Same as \R{configwrite}{ConfigWrite}, but case sensitive.
-
-\S1{filerecode} FileRecode
-
-\b Recode text file from DOS to Windows format and vice-versa.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${FileRecode} "[File]" "[Format]"
-
-\c "[File]" ;
-\c ;
-\c "[Format]" ; OemToChar -from DOS to Windows
-\c ; CharToOem -from Windows to DOS
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if file doesn't exist
-\\<br\\>- Error flag if syntax error
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${FileRecode} "C:\SCANDISK.LOG" "CharToOem"
-\c SectionEnd
-
-\S1{headers_trimnewlines} TrimNewLines
-
-\b Trim newlines in a string.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${TrimNewLines} "[string]" $var
-
-\c "[string]" ; Input string
-\c $var ; Result: String without '$\r' and '$\n' at the end
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${TrimNewLines} "Text line$\r$\n" $R0
-\c ; $R0="Text line"
-\c SectionEnd
-
-
-\H{wordfunc} Word Functions Header
-
-
-\S1{} Introduction
-
-Include header:
-
-\c !include "WordFunc.nsh"
-
-
-Include function "WordFind" for install and "WordReplace" for uninstall:
-
-\c !insertmacro WordFind
-\c !insertmacro un.WordReplace
-
-
-Call functions:
-
-\c Section Install
-\c ${WordFind} "A--H---S" "-" "+2" $R0
-\c ; $R0="H"
-\c SectionEnd
-
-\c Section un.Install
-\c ${un.WordReplace} "A--H---S" "-" "x" "+3*" $R0
-\c ; $R0="A--HxS"
-\c SectionEnd
-
-
-\S1{wordfind} WordFind
-
-\b Multi-features string function.
-
-\c Strings:
-\c "[word+1][delimiter][word+2][delimiter][word+3]..."
-\c "[delimiter][word+1][delimiter][word+2][delimiter]..."
-\c "[delimiter][delimiter][word+1][delimiter][delimiter][delimiter]..."
-\c "...[word-3][delimiter][word-2][delimiter][word-1]"
-\c "...[delimiter][word-2][delimiter][word-1][delimiter]"
-\c "...[delimiter][delimiter][word-1][delimiter][delimiter][delimiter]"
-
-\\<b\\>Syntax: \\</b\\>
-
-\c ${WordFind} "[string]" "[delimiter]" "[E][options]" $var
-
-\c "[string]" ;[string]
-\c ; input string
-\c "[delimiter]" ;[delimiter]
-\c ; one or several symbols
-\c "[E][options]" ;[options]
-\c ; +number : word number from start
-\c ; -number : word number from end
-\c ; +number} : delimiter number from start
-\c ; all space after this
-\c ; delimiter to output
-\c ; +number{ : delimiter number from start
-\c ; all space before this
-\c ; delimiter to output
-\c ; +number}} : word number from start
-\c ; all space after this word
-\c ; to output
-\c ; +number{{ : word number from start
-\c ; all space before this word
-\c ; to output
-\c ; +number{} : word number from start
-\c ; all space before and after
-\c ; this word (word exclude)
-\c ; +number*} : word number from start
-\c ; all space after this
-\c ; word to output with word
-\c ; +number{* : word number from start
-\c ; all space before this
-\c ; word to output with word
-\c ; # : sum of words to output
-\c ; * : sum of delimiters to output
-\c ; /word : number of word to output
-\c ;
-\c ;[E]
-\c ; with errorlevel output
-\c ; IfErrors:
-\c ; $var=1 delimiter not found
-\c ; $var=2 no such word number
-\c ; $var=3 syntax error (Use: +1,-1},#,*,/word,...)
-\c ;[]
-\c ; no errorlevel output (default)
-\c ; If some errors found then (result=input string)
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Accepted numbers 1,01,001,...
-
-\\<b\\>Example (Find word by number):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\Program Files C:\WINDOWS" " C:\" "-02" $R0
-\c ; $R0="Program Files"
-\c SectionEnd
-
-\\<b\\>Example (Delimiter exclude):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" "sys" "-2}" $R0
-\c ; $R0=" C:\logo.sys C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (Sum of words):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " C:\" "#" $R0
-\c ; $R0="3"
-\c SectionEnd
-
-\\<b\\>Example (Sum of delimiters):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" "sys" "*" $R0
-\c ; $R0="2"
-\c SectionEnd
-
-\\<b\\>Example (Find word number):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\Program Files C:\WINDOWS" " " "/Files" $R0
-\c ; $R0="3"
-\c SectionEnd
-
-\\<b\\>Example ( \}\} ):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "+2}}" $R0
-\c ; $R0=" C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example ( \{\} ):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "+2{}" $R0
-\c ; $R0="C:\io.sys C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example ( *\} ):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "+2*}" $R0
-\c ; $R0="C:\logo.sys C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (Get parent directory):\\</b\\>
-
-\c Section
-\c StrCpy $R0 "C:\Program Files\NSIS\NSIS.chm"
-\c ; "C:\Program Files\NSIS\Include\"
-\c ; "C:\\Program Files\\NSIS\\NSIS.chm"
-\c
-\c ${WordFind} "$R0" "\" "-2{*" $R0
-\c ; $R0="C:\Program Files\NSIS"
-\c ; "C:\\Program Files\\NSIS"
-\c SectionEnd
-
-\\<b\\>Example (Coordinates):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" ":\lo" "E+1{" $R0
-\c ; $R0="C:\io.sys C"
-\c IfErrors end
-\c
-\c StrLen $0 $R0 ; $0 = Start position of word (11)
-\c StrLen $1 ':\lo' ; $1 = Word length (4)
-\c ; StrCpy $R0 $R1 $1 $0 ; $R0 = :\lo
-\c
-\c end:
-\c SectionEnd
-
-\\<b\\>Example (With errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordFind} "[string]" "[delimiter]" "E[options]" $R0
-\c
-\c IfErrors 0 end
-\c StrCmp $R0 1 0 +2 ; errorlevel 1?
-\c MessageBox MB_OK 'delimiter not found' IDOK end
-\c StrCmp $R0 2 0 +2 ; errorlevel 2?
-\c MessageBox MB_OK 'no such word number' IDOK end
-\c StrCmp $R0 3 0 +2 ; errorlevel 3?
-\c MessageBox MB_OK 'syntax error'
-\c
-\c end:
-\c SectionEnd
-
-\\<b\\>Example (Without errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys" "_" "+1" $R0
-\c
-\c ; $R0="C:\io.sys C:\logo.sys" (error: delimiter "_" not found)
-\c SectionEnd
-
-\\<b\\>Example (If found):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys" ":\lo" "E+1{" $R0
-\c
-\c IfErrors notfound found
-\c found:
-\c MessageBox MB_OK 'Found' IDOK end
-\c notfound:
-\c MessageBox MB_OK 'Not found'
-\c
-\c end:
-\c SectionEnd
-
-\\<b\\>Example (If found 2):\\</b\\>
-
-\c Section
-\c ${WordFind} "C:\io.sys C:\logo.sys" ":\lo" "+1{" $R0
-\c
-\c StrCmp $R0 "C:\io.sys C:\logo.sys" notfound found ; error?
-\c found:
-\c MessageBox MB_OK 'Found' IDOK end
-\c notfound:
-\c MessageBox MB_OK 'Not found'
-\c
-\c end:
-\c SectionEnd
-
-\\<b\\>Example (To accept one word in string if delimiter not found):\\</b\\>
-
-\c Section
-\c StrCpy $0 'OneWord'
-\c StrCpy $1 1
-\c
-\c loop:
-\c ${WordFind} "$0" " " "E+$1" $R0
-\c IfErrors 0 code
-\c StrCmp $1$R0 11 0 error
-\c StrCpy $R0 $0
-\c goto end
-\c
-\c code:
-\c ; ...
-\c IntOp $1 $1 + 1
-\c goto loop
-\c
-\c error:
-\c StrCpy $1 ''
-\c StrCpy $R0 ''
-\c
-\c end:
-\c ; $R0="OneWord"
-\c SectionEnd
-
-\S1{wordfinds} WordFindS
-
-\b Same as \R{wordfind}{WordFind}, but case sensitive.
-
-\S1{wordfind2x} WordFind2X
-
-\b Find word between two delimiters.
-
-\c Strings:
-\c "[delimiter1][word+1][delimiter2][delimiter1][word+2][delimiter2]..."
-\c "[text][delimiter1][text][delimiter1][word+1][delimiter2][text]..."
-\c "...[delimiter1][word-2][delimiter2][delimiter1][word-1][delimiter2]"
-\c "...[text][delimiter1][text][delimiter1][word-1][delimiter2][text]"
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${WordFind2X} "[string]" "[delimiter1]" "[delimiter2]" "[E][options]" $var
-
-\c "[string]" ;[string]
-\c ; input string
-\c "[delimiter1]" ;[delimiter1]
-\c ; first delimiter
-\c "[delimiter2]" ;[delimiter2]
-\c ; second delimiter
-\c "[E][options]" ;[options]
-\c ; +number : word number from start
-\c ; -number : word number from end
-\c ; +number}} : word number from start all space
-\c ; after this word to output
-\c ; +number{{ : word number from end all space
-\c ; before this word to output
-\c ; +number{} : word number from start
-\c ; all space before and after
-\c ; this word (word exclude)
-\c ; +number*} : word number from start
-\c ; all space after this
-\c ; word to output with word
-\c ; +number{* : word number from start
-\c ; all space before this
-\c ; word to output with word
-\c ; # : sum of words to output
-\c ; /word : number of word to output
-\c ;
-\c ;[E]
-\c ; with errorlevel output
-\c ; IfErrors:
-\c ; $var=1 no words found
-\c ; $var=2 no such word number
-\c ; $var=3 syntax error (Use: +1,-1,#)
-\c ;[]
-\c ; no errorlevel output (default)
-\c ; If some errors found then (result=input string)
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Example (1):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]" "[C:\" "];" "+2" $R0
-\c ; $R0="logo.sys"
-\c SectionEnd
-
-\\<b\\>Example (2):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1" $R0
-\c ; $R0="logo"
-\c SectionEnd
-
-\\<b\\>Example (3):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1{{" $R0
-\c ; $R0="C:\WINDOWS C:\io.sys C:"
-\c SectionEnd
-
-\\<b\\>Example (4):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1{}" $R0
-\c ; $R0="C:\WINDOWS C:\io.sys C:sys"
-\c SectionEnd
-
-\\<b\\>Example (5):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1{*" $R0
-\c ; $R0="C:\WINDOWS C:\io.sys C:\logo."
-\c SectionEnd
-
-\\<b\\>Example (6):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "/logo" $R0
-\c ; $R0="2"
-\c SectionEnd
-
-\\<b\\>Example (With errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordFind2X} "[io.sys];[C:\logo.sys]" "\" "];" "E+1" $R0
-\c ; $R0="1" ("\...];" not found)
-\c
-\c IfErrors 0 noerrors
-\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
-\c
-\c noerrors:
-\c MessageBox MB_OK 'No errors'
-\c
-\c end:
-\c SectionEnd
-
-\S1{wordfind2xs} WordFind2XS
-
-\b Same as \R{wordfind2x}{WordFind2X}, but case sensitive.
-
-\S1{wordfind3x} WordFind3X
-
-\b Find a word that contains a string, between two delimiters.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${WordFind3X} "[string]" "[delimiter1]" "[center]" "[delimiter2]" "[E][options]" $var
-
-\c "[string]" ;[string]
-\c ; input string
-\c "[delimiter1]" ;[delimiter1]
-\c ; first delimiter
-\c "[center]" ;[center]
-\c ; center string
-\c "[delimiter2]" ;[delimiter2]
-\c ; second delimiter
-\c "[E][options]" ;[options]
-\c ; +number : word number from start
-\c ; -number : word number from end
-\c ; +number}} : word number from start all space
-\c ; after this word to output
-\c ; +number{{ : word number from end all space
-\c ; before this word to output
-\c ; +number{} : word number from start
-\c ; all space before and after
-\c ; this word (word exclude)
-\c ; +number*} : word number from start
-\c ; all space after this
-\c ; word to output with word
-\c ; +number{* : word number from start
-\c ; all space before this
-\c ; word to output with word
-\c ; # : sum of words to output
-\c ; /word : number of word to output
-\c ;
-\c ;[E]
-\c ; with errorlevel output
-\c ; IfErrors:
-\c ; $var=1 no words found
-\c ; $var=2 no such word number
-\c ; $var=3 syntax error (Use: +1,-1,#)
-\c ;[]
-\c ; no errorlevel output (default)
-\c ; If some errors found then (result=input string)
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Example (1):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "+1" $R0
-\c ; $R0="1.AAB"
-\c SectionEnd
-
-\\<b\\>Example (2):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1" $R0
-\c ; $R0="2.BAA"
-\c SectionEnd
-
-\\<b\\>Example (3):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1{{" $R0
-\c ; $R0="[1.AAB];"
-\c SectionEnd
-
-\\<b\\>Example (4):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1{}" $R0
-\c ; $R0="[1.AAB];[3.BBB];"
-\c SectionEnd
-
-\\<b\\>Example (5):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1{*" $R0
-\c ; $R0="[1.AAB];[2.BAA];"
-\c SectionEnd
-
-\\<b\\>Example (6):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "/2.BAA" $R0
-\c ; $R0="2"
-\c SectionEnd
-
-\\<b\\>Example (With errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "XX" "];" "E+1" $R0
-\c ; $R0="1" ("[...XX...];" not found)
-\c
-\c IfErrors 0 noerrors
-\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
-\c
-\c noerrors:
-\c MessageBox MB_OK 'No errors'
-\c
-\c end:
-\c SectionEnd
-
-\S1{wordfind3xs} WordFind3XS
-
-\b Same as \R{wordfind3x}{WordFind3X}, but case sensitive.
-
-\S1{wordreplace} WordReplace
-
-\b Replace or delete word from string.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${WordReplace} "[string]" "[word1]" "[word2]" "[E][options]" $var
-
-\c "[string]" ;[string]
-\c ; input string
-\c "[word1]" ;[word1]
-\c ; word to replace or delete
-\c "[word2]" ;[word2]
-\c ; replace with (if empty delete)
-\c "[E][options]" ;[options]
-\c ; +number : word number from start
-\c ; -number : word number from end
-\c ; +number* : word number from start multiple-replace
-\c ; -number* : word number from end multiple-replace
-\c ; + : replace all results
-\c ; +* : multiple-replace all results
-\c ; { : if exists replace all delimiters
-\c ; from left edge
-\c ; } : if exists replace all delimiters
-\c ; from right edge
-\c ; {} : if exists replace all delimiters
-\c ; from edges
-\c ; {* : if exists multiple-replace all
-\c ; delimiters from left edge
-\c ; }* : if exists multiple-replace all
-\c ; delimiters from right edge
-\c ; {}* : if exists multiple-replace all
-\c ; delimiters from edges
-\c ;
-\c ;[E]
-\c ; with errorlevel output
-\c ; IfErrors:
-\c ; $var=1 word to replace not found
-\c ; $var=2 no such word number
-\c ; $var=3 syntax error (Use: +1,-1,+1*,-1*,+,+*,{},{}*)
-\c ;[]
-\c ; no errorlevel output (default)
-\c ; If some errors found then (result=input string)
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Example (replace):\\</b\\>
-
-\c Section
-\c ${WordReplace} "C:\io.sys C:\logo.sys C:\WINDOWS" "SYS" "bmp" "+2" $R0
-\c ; $R0="C:\io.sys C:\logo.bmp C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (delete):\\</b\\>
-
-\c Section
-\c ${WordReplace} "C:\io.sys C:\logo.sys C:\WINDOWS" "SYS" "" "+" $R0
-\c ; $R0="C:\io. C:\logo. C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (multiple-replace 1):\\</b\\>
-
-\c Section
-\c ${WordReplace} "C:\io.sys C:\logo.sys C:\WINDOWS" " " " " "+1*" $R0
-\c ; +1* or +2* or +3* or +4* or +5* or +6*
-\c ; $R0="C:\io.sys C:\logo.sys C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (multiple-replace 2):\\</b\\>
-
-\c Section
-\c ${WordReplace} "C:\io.sys C:\logo.sysSYSsys C:\WINDOWS" "sys" "bmp" "+*" $R0
-\c ; $R0="C:\io.bmp C:\logo.bmp C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (multiple-replace 3):\\</b\\>
-
-\c Section
-\c ${WordReplace} "sysSYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys" "sys" "|" "{}*" $R0
-\c ; $R0="|C:\io.sys C:\logo.sys C:\WINDOWS|"
-\c SectionEnd
-
-\\<b\\>Example (With errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordReplace} "C:\io.sys C:\logo.sys" "sys" "bmp" "E+3" $R0
-\c ; $R0="2" (no such word number "+3")
-\c
-\c IfErrors 0 noerrors
-\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
-\c
-\c noerrors:
-\c MessageBox MB_OK 'No errors'
-\c
-\c end:
-\c SectionEnd
-
-\S1{wordreplaces} WordReplaceS
-
-\b Same as \R{wordreplace}{WordReplace}, but case sensitive.
-
-\S1{wordadd} WordAdd
-
-\b Add words to string1 from string2 if not exist or delete words if exist.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${WordAdd} "[string1]" "[delimiter]" "[E][options]" $var
-
-\c "[string1]" ;[string1]
-\c ; string for addition or removing
-\c "[delimiter]" ;[delimiter]
-\c ; one or several symbols
-\c "[E][options]" ;[options]
-\c ; +string2 : words to add
-\c ; -string2 : words to delete
-\c ;
-\c ;[E]
-\c ; with errorlevel output
-\c ; IfErrors:
-\c ; $var=1 delimiter is empty
-\c ; $var=3 syntax error (use: +text,-text)
-\c ;[]
-\c ; no errorlevel output (default)
-\c ; If some errors found then (result=input string)
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Example (add):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys C:\WINDOWS" " " "+C:\WINDOWS C:\config.sys" $R0
-\c ; $R0="C:\io.sys C:\WINDOWS C:\config.sys"
-\c SectionEnd
-
-\\<b\\>Example (delete):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "-C:\WINDOWS C:\config.sys C:\IO.SYS" $R0
-\c ; $R0="C:\logo.sys"
-\c SectionEnd
-
-\\<b\\>Example (add to one):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys" " " "+C:\WINDOWS C:\config.sys C:\IO.SYS" $R0
-\c ; $R0="C:\io.sys C:\WINDOWS C:\config.sys"
-\c SectionEnd
-
-\\<b\\>Example (delete one):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "-C:\WINDOWS" $R0
-\c ; $R0="C:\io.sys C:\logo.sys"
-\c SectionEnd
-
-\\<b\\>Example (No new words found):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys C:\logo.sys" " " "+C:\logo.sys" $R0
-\c StrCmp $R0 "C:\io.sys C:\logo.sys" 0 +2
-\c MessageBox MB_OK "No new words found to add"
-\c SectionEnd
-
-\\<b\\>Example (No words deleted):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys C:\logo.sys" " " "-C:\config.sys" $R0
-\c StrCmp $R0 "C:\io.sys C:\logo.sys" 0 +2
-\c MessageBox MB_OK "No words found to delete"
-\c SectionEnd
-
-\\<b\\>Example (With errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordAdd} "C:\io.sys C:\logo.sys" "" "E-C:\logo.sys" $R0
-\c ; $R0="1" (delimiter is empty "")
-\c
-\c IfErrors 0 noerrors
-\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
-\c
-\c noerrors:
-\c MessageBox MB_OK 'No errors'
-\c
-\c end:
-\c SectionEnd
-
-\S1{wordadds} WordAddS
-
-\b Same as \R{wordadd}{WordAdd}, but case sensitive.
-
-\S1{wordinsert} WordInsert
-
-\b Insert word in string.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${WordInsert} "[string]" "[delimiter]" "[word]" "[E][options]" $var
-
-\c "[string]" ;[string]
-\c ; input string
-\c "[delimiter]" ;[delimiter]
-\c ; one or several symbols
-\c "[word]" ;[word]
-\c ; word to insert
-\c "[E][options]" ;[options]
-\c ; +number : word number from start
-\c ; -number : word number from end
-\c ;
-\c ;[E]
-\c ; with errorlevel output
-\c ; IfErrors:
-\c ; $var=1 delimiter is empty
-\c ; $var=2 wrong word number
-\c ; $var=3 syntax error (Use: +1,-1)
-\c ;[]
-\c ; no errorlevel output (default)
-\c ; If some errors found then (result=input string)
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Example (1):\\</b\\>
-
-\c Section
-\c ${WordInsert} "C:\io.sys C:\WINDOWS" " " "C:\logo.sys" "-2" $R0
-\c ; $R0="C:\io.sys C:\logo.sys C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (2):\\</b\\>
-
-\c Section
-\c ${WordInsert} "C:\io.sys" " " "C:\WINDOWS" "+2" $R0
-\c ; $R0="C:\io.sys C:\WINDOWS"
-\c SectionEnd
-
-\\<b\\>Example (3):\\</b\\>
-
-\c Section
-\c ${WordInsert} "" " " "C:\WINDOWS" "+1" $R0
-\c ; $R0="C:\WINDOWS "
-\c SectionEnd
-
-\\<b\\>Example (With errorlevel output):\\</b\\>
-
-\c Section
-\c ${WordInsert} "C:\io.sys C:\logo.sys" " " "C:\logo.sys" "E+4" $R0
-\c ; $R0="2" (wrong word number "+4")
-\c
-\c IfErrors 0 noerrors
-\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
-\c
-\c noerrors:
-\c MessageBox MB_OK 'No errors'
-\c
-\c end:
-\c SectionEnd
-
-\S1{wordinserts} WordInsertS
-
-\b Same as \R{wordinsert}{WordInsert}, but case sensitive.
-
-\S1{strfilter} StrFilter
-
-\b Convert string to uppercase or lowercase.
-
-\b Set symbol filter.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${StrFilter} "[string]" "[options]" "[symbols1]" "[symbols2]" $var
-
-\c "[string]" ;[string]
-\c ; input string
-\c ;
-\c "[options]" ;[+|-][1|2|3|12|23|31][eng|rus]
-\c ; + : convert string to uppercase
-\c ; - : convert string to lowercase
-\c ; 1 : only Digits
-\c ; 2 : only Letters
-\c ; 3 : only Special
-\c ; 12 : only Digits + Letters
-\c ; 23 : only Letters + Special
-\c ; 31 : only Special + Digits
-\c ; eng : English symbols (default)
-\c ; rus : Russian symbols
-\c ;
-\c "[symbols1]" ;[symbols1]
-\c ; symbols include (not changeable)
-\c ;
-\c "[symbols2]" ;[symbols2]
-\c ; symbols exclude
-\c ;
-\c $var ;output (result)
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Error flag if syntax error
-\\<br\\>- Same symbol to include & to exclude = to exclude
-
-\\<b\\>Example (UpperCase):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abc 456DEF 7890|%#" "+" "" "" $R0
-\c ; $R0="123ABC 456DEF 7890|%#"
-\c SectionEnd
-
-\\<b\\>Example (LowerCase):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abc 456DEF 7890|%#" "-" "ef" "" $R0
-\c ; $R0="123abc 456dEF 7890|%#"
-\c SectionEnd
-
-\\<b\\>Example (Filter1):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abc 456DEF 7890|%#" "2" "|%" "" $R0
-\c ; $R0="abcDEF|%" ;only Letters + |%
-\c SectionEnd
-
-\\<b\\>Example (Filter2):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abc 456DEF 7890|%#" "13" "af" "4590" $R0
-\c ; $R0="123a 6F 78|%#" ;only Digits + Special + af - 4590
-\c SectionEnd
-
-\\<b\\>Example (Filter3):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abc 456DEF 7890|%#" "+12" "b" "def" $R0
-\c ; $R0="123AbC4567890" ;only Digits + Letters + b - def
-\c SectionEnd
-
-\\<b\\>Example (Filter4):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abcÀÁÂ 456DEFãäå 7890|%#" "+12rus" "ä" "ãå" $R0
-\c ; $R0="123ÀÁÂ456ä7890" ;only Digits + Letters + ä - ãå
-\c SectionEnd
-
-\\<b\\>Example (English + Russian Letters):\\</b\\>
-
-\c Section
-\c ${StrFilter} "123abcÀÁÂ 456DEFãäå 7890|%#" "2rus" "" "" $R0
-\c ; $R0="ÀÁÂãäå" ;only Russian Letters
-\c ${StrFilter} "123abcÀÁÂ 456DEFãäå 7890|%#" "2" "$R0" "" $R0
-\c ; $R0="abcÀÁÂDEFãäå" ;only English + Russian Letters
-\c SectionEnd
-
-\\<b\\>Example (Word Capitalize):\\</b\\>
-
-\c Section
-\c Push "_01-PERPETUOUS_DREAMER__-__THE_SOUND_OF_GOODBYE_(ORIG._MIX).MP3_"
-\c Call Capitalize
-\c Pop $R0
-\c ; $R0="_01-Perpetuous_Dreamer__-__The_Sound_Of_Goodbye_(Orig._Mix).mp3_"
-\c
-\c ${WordReplace} "$R0" "_" " " "+*" $R0
-\c ; $R0=" 01-Perpetuous Dreamer - The Sound Of Goodbye (Orig. Mix).mp3 "
-\c
-\c ${WordReplace} "$R0" " " "" "{}" $R0
-\c ; $R0="01-Perpetuous Dreamer - The Sound Of Goodbye (Orig. Mix).mp3"
-\c SectionEnd
-\c
-\c Function Capitalize
-\c Exch $R0
-\c Push $0
-\c Push $1
-\c Push $2
-\c
-\c ${StrFilter} '$R0' '-eng' '' '' $R0
-\c ${StrFilter} '$R0' '-rus' '' '' $R0
-\c
-\c StrCpy $0 0
-\c
-\c loop:
-\c IntOp $0 $0 + 1
-\c StrCpy $1 $R0 1 $0
-\c StrCmp $1 '' end
-\c StrCmp $1 ' ' +5
-\c StrCmp $1 '_' +4
-\c StrCmp $1 '-' +3
-\c StrCmp $1 '(' +2
-\c StrCmp $1 '[' 0 loop
-\c IntOp $0 $0 + 1
-\c StrCpy $1 $R0 1 $0
-\c StrCmp $1 '' end
-\c
-\c ${StrFilter} '$1' '+eng' '' '' $1
-\c ${StrFilter} '$1' '+rus' '' '' $1
-\c
-\c StrCpy $2 $R0 $0
-\c IntOp $0 $0 + 1
-\c StrCpy $R0 $R0 '' $0
-\c IntOp $0 $0 - 2
-\c StrCpy $R0 '$2$1$R0'
-\c goto loop
-\c
-\c end:
-\c Pop $2
-\c Pop $1
-\c Pop $0
-\c Exch $R0
-\c FunctionEnd
-
-\S1{strfilters} StrFilterS
-
-\b Same as \R{strfilter}{StrFilter}, but case sensitive.
-
-\S1{versioncompare} VersionCompare
-
-\b Compare version numbers.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${VersionCompare} "[Version1]" "[Version2]" $var
-
-\c "[Version1]" ; First version
-\c "[Version2]" ; Second version
-\c $var ; Result:
-\c ; $var=0 Versions are equal
-\c ; $var=1 Version1 is newer
-\c ; $var=2 Version2 is newer
-
-\\<b\\>Example:\\</b\\>
-
-\c Section
-\c ${VersionCompare} "1.1.1.9" "1.1.1.01" $R0
-\c ; $R0="1"
-\c SectionEnd
-
-\S1{versionconvert} VersionConvert
-
-\b Convert version in the numerical format which can be compared.
-
-\\<b\\>Syntax:\\</b\\>
-
-\c ${VersionConvert} "[Version]" "[CharList]" $var
-
-\c "[Version]" ; Version
-\c ;
-\c "[CharList]" ; List of characters, which will be replaced by numbers
-\c ; "abcdefghijklmnopqrstuvwxyz" (default)
-\c ;
-\c $var ; Result: converted version
-
-\\<b\\>Note:\\</b\\>
-\\<br\\>- Converted letters are separated with dot
-\\<br\\>- If character is non-digit and not in list then it will be converted to dot
-
-\\<b\\>Example1:\\</b\\>
-
-\c Section
-\c ${VersionConvert} "9.0a" "" $R0
-\c ; $R0="9.0.01"
-\c
-\c ${VersionConvert} "9.0c" "" $R1
-\c ; $R1="9.0.03"
-\c
-\c ${VersionCompare} "$R0" "$R1" $R2
-\c ; $R2="2" version2 is newer
-\c SectionEnd
-
-\\<b\\>Example2:\\</b\\>
-
-\c Section
-\c ${VersionConvert} "0.15c-9m" "" $R0
-\c ; $R0="0.15.03.9.13"
-\c
-\c ${VersionConvert} "0.15c-1n" "" $R1
-\c ; $R1="0.15.03.1.14"
-\c
-\c ${VersionCompare} "$R0" "$R1" $R2
-\c ; $R2="1" version1 is newer
-\c SectionEnd
-
-\\<b\\>Example3:\\</b\\>
-
-\c Section
-\c ${VersionConvert} "0.15c+" "abcdefghijklmnopqrstuvwxyz+" $R0
-\c ; $R0="0.15.0327"
-\c
-\c ${VersionConvert} "0.15c" "abcdefghijklmnopqrstuvwxyz+" $R1
-\c ; $R1="0.15.03"
-\c
-\c ${VersionCompare} "$R0" "$R1" $R2
-\c ; $R2="1" version1 is newer
-\c SectionEnd
+\A{headers} Useful Headers
+
+
+\H{filefunc} File Functions Header
+
+
+\S1{} Introduction
+
+Include header:
+
+\c !include "FileFunc.nsh"
+
+
+Include function "GetFileExt" for install and "GetParent" for uninstall:
+
+\c !insertmacro GetFileExt
+\c !insertmacro un.GetParent
+
+
+Call functions:
+
+\c Section Install
+\c ${GetFileExt} "C:\My Downloads\Index.html" $R0
+\c ; $R0="html"
+\c SectionEnd
+
+\c Section un.Install
+\c ${un.GetParent} "C:\My Downloads\Index.html" $R0
+\c ; $R0="C:\My Downloads"
+\c SectionEnd
+
+
+\S1{locate} Locate
+
+\b Find files, directories and empty directories with mask and size options.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${Locate} "[Path]" "[Options]" "Function"
+
+\c "[Path]" ; Disk or Directory
+\c ;
+\c "[Options]" ; /L=[FD|F|D|DE|FDE]
+\c ; /L=FD - Locate Files and Directories (default)
+\c ; /L=F - Locate Files only
+\c ; /L=D - Locate Directories only
+\c ; /L=DE - Locate Empty Directories only
+\c ; /L=FDE - Locate Files and Empty Directories
+\c ; /M=[mask]
+\c ; /M=*.* - Locate all (default)
+\c ; /M=*.doc - Locate Work.doc, 1.doc ...
+\c ; /M=Pho* - Locate PHOTOS, phone.txt ...
+\c ; /M=win???.exe - Locate winamp.exe, winver.exe ...
+\c ; /M=winamp.exe - Locate winamp.exe only
+\c ; /S=No:No[B|K|M|G]
+\c ; /S= - Don't locate file size (faster) (default)
+\c ; /S=0:0B - Locate only files of 0 Bytes exactly
+\c ; /S=5:9K - Locate only files of 5 to 9 Kilobytes
+\c ; /S=:10M - Locate only files of 10 Megabyte or less
+\c ; /S=1G - Locate only files of 1 Gigabyte or more
+\c ; /G=[1|0]
+\c ; /G=1 - Locate with subdirectories (default)
+\c ; /G=0 - Locate without subdirectories
+\c ; /B=[0|1]
+\c ; /B=0 - Banner isn't used (default)
+\c ; /B=1 - Banner is used. Callback when function
+\c ; start to search in new directory
+\c "Function" ; Callback function when found
+\c
+\c Function "Function"
+\c ; $R9 "path\name"
+\c ; $R8 "path"
+\c ; $R7 "name"
+\c ; $R6 "size" ($R6="" if directory, $R6="0" if file with /S=)
+\c
+\c ; $R0-$R5 are not used (save data in them).
+\c ; ...
+\c
+\c Push $var ; If $var="StopLocate" Then exit from function
+\c FunctionEnd
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if disk or directory isn't exist
+\\<br\\>- Error flag if syntax error
+\\<br\\>- See also \W{http://nsis.sourceforge.net/Locate_plugin}{Locate plugin}
+
+
+\\<b\\>Example (Find one file):\\</b\\>
+
+\c Section
+\c ${Locate} "C:\ftp" "/L=F /M=RPC DCOM.rar /S=1K" "Example1"
+\c ; 'RPC DCOM.rar' file in 'C:\ftp' with size 1 Kb or more
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c MessageBox MB_OK "$$R0=$R0"
+\c SectionEnd
+\c
+\c Function Example1
+\c StrCpy $R0 $R9
+\c ; $R0="C:\ftp\files\RPC DCOM.rar"
+\c
+\c MessageBox MB_YESNO '$R0$\n$\nFind next?' IDYES +2
+\c StrCpy $0 StopLocate
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Write results to a text file):\\</b\\>
+
+\c Section
+\c GetTempFileName $R0
+\c FileOpen $R1 $R0 w
+\c ${Locate} "C:\ftp" "/S=:2M /G=0" "Example2"
+\c ; folders and all files with size 2 Mb or less
+\c ; don't scan subdirectories
+\c FileClose $R1
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c Exec '"notepad.exe" "$R0"'
+\c SectionEnd
+\c
+\c Function Example2
+\c StrCmp $R6 '' 0 +3
+\c FileWrite $R1 "Directory=$R9$\r$\n"
+\c goto +2
+\c FileWrite $R1 "File=$R9 Size=$R6 Mb$\r$\n"
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Write results to an INI file):\\</b\\>
+
+\c Section
+\c GetTempFileName $R0
+\c ${Locate} "C:\ftp" "/L=F /S=0K" "Example3"
+\c ; all files in 'C:\ftp' with size detect in Kb
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c Exec '"notepad.exe" "$R0"'
+\c SectionEnd
+\c
+\c Function Example3
+\c WriteINIStr $R0 "$R8" "$R7" "$R6 Kb"
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Delete empty directories):\\</b\\>
+
+\c Section
+\c StrCpy $R2 0
+\c StrCpy $R3 0
+\c
+\c loop:
+\c StrCpy $R1 0
+\c ${Locate} "C:\ftp" "/L=DE" "Example4"
+\c IntOp $R3 $R3 + 1
+\c IntOp $R2 $R2 + $R1
+\c StrCmp $R0 StopLocate +2
+\c StrCmp $R1 0 0 loop
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK 'error' IDOK +2
+\c MessageBox MB_OK '$R2 directories were removed$\n$R3 loops'
+\c SectionEnd
+\c
+\c Function Example4
+\c MessageBox MB_YESNOCANCEL 'Delete empty "$R9"?' IDNO end IDCANCEL cancel
+\c RMDir $R9
+\c IntOp $R1 $R1 + 1
+\c goto end
+\c
+\c cancel:
+\c StrCpy $R0 StopLocate
+\c
+\c end:
+\c Push $R0
+\c FunctionEnd
+
+\\<b\\>Example (Move all files into one folder):\\</b\\>
+
+\c Section
+\c StrCpy $R0 "C:\ftp" ;Directory move from
+\c StrCpy $R1 "C:\ftp2" ;Directory move into
+\c
+\c StrCpy $R2 0
+\c StrCpy $R3 0
+\c ${Locate} "$R0" "/L=F" "Example5"
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK 'error' IDOK +4
+\c StrCmp $R3 0 0 +2
+\c MessageBox MB_OK '$R2 files were moved' IDOK +2
+\c MessageBox MB_OK '$R2 files were moved$\n$R3 files were NOT moved'
+\c SectionEnd
+\c
+\c Function Example5
+\c StrCmp $R8 $R1 +6
+\c IfFileExists '$R1\$R7' +4
+\c Rename $R9 '$R1\$R7'
+\c IntOp $R2 $R2 + 1
+\c goto +2
+\c IntOp $R3 $R3 + 1
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Copy files with log):\\</b\\>
+
+\c Section
+\c StrCpy $R0 "C:\ftp" ;Directory copy from
+\c StrCpy $R1 "C:\ftp2" ;Directory copy into
+\c StrLen $R2 $R0
+\c
+\c GetTempFileName $0
+\c FileOpen $R3 $0 w
+\c ${Locate} "$R0" "/L=FDE" "Example6"
+\c FileClose $R3
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK 'error'
+\c
+\c Exec '"notepad.exe" "$0"' ;view log
+\c SectionEnd
+\c
+\c Function Example6
+\c StrCpy $1 $R8 '' $R2
+\c
+\c StrCmp $R6 '' 0 +3
+\c CreateDirectory '$R1$1\$R7'
+\c goto end
+\c CreateDirectory '$R1$1'
+\c CopyFiles /SILENT $R9 '$R1$1'
+\c
+\c IfFileExists '$R1$1\$R7' 0 +3
+\c FileWrite $R3 "-old:$R9 -new:$R1$1\$R7 -success$\r$\n"
+\c goto +2
+\c FileWrite $R3 "-old:$R9 -new:$R1$1\$R7 -failed$\r$\n"
+\c
+\c end:
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Recreate directory structure):\\</b\\>
+
+\c Section
+\c StrCpy $R0 "C:\ftp" ;Directory structure from
+\c StrCpy $R1 "C:\ftp2" ;Directory structure into
+\c StrLen $R2 $R0
+\c
+\c ${Locate} "$R0" "/L=D" "Example7"
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK 'error'
+\c SectionEnd
+\c
+\c Function Example7
+\c StrCpy $1 $R9 '' $R2
+\c CreateDirectory '$R1$1'
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Locate with banner - \W{http://nsis.sourceforge.net/Nxs_plug-in}{NxS plugin} required):\\</b\\>
+
+\c Section
+\c nxs::Show /NOUNLOAD `$(^Name) Setup` /top `Setup searching something$\r$\nPlease wait... If you can..` /h 1 /can 1 /end
+\c ${Locate} "C:\WINDOWS" "/L=F /M=*.inf /B=1" "Example8"
+\c nxs::Destroy
+\c SectionEnd
+\c
+\c Function Example8
+\c StrCmp $R0 $R8 abortcheck
+\c StrCpy $R0 $R8
+\c nxs::Update /NOUNLOAD /sub "$R8" /pos 78 /end
+\c
+\c abortcheck:
+\c nxs::HasUserAborted /NOUNLOAD
+\c Pop $0
+\c StrCmp $0 1 0 +2
+\c StrCpy $0 StopLocate
+\c
+\c StrCmp $R9 '' end
+\c ;...
+\c
+\c end:
+\c Push $0
+\c FunctionEnd
+
+\S1{getsize} GetSize
+
+\b Find the size of a file, files mask or directory.
+
+\b Find the sum of the files, directories and subdirectories.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetSize} "[Path]" "[Options]" $var1 $var2 $var3
+
+\c "[Path]" ; Disk or Directory
+\c ;
+\c "[Options]" ; /M=[mask]
+\c ; /M=*.* - Find all (default)
+\c ; /M=*.doc - Find Work.doc, 1.doc ...
+\c ; /M=Pho* - Find PHOTOS, phone.txt ...
+\c ; /M=win???.exe - Find winamp.exe, winver.exe ...
+\c ; /M=winamp.exe - Find winamp.exe only
+\c ; /S=No:No[B|K|M|G]
+\c ; /S= - Don't find file size (faster) (default)
+\c ; /S=0:0B - Find only files of 0 Bytes exactly
+\c ; /S=5:9K - Find only files of 5 to 9 Kilobytes
+\c ; /S=:10M - Find only files of 10 Megabyte or less
+\c ; /S=1G - Find only files of 1 Gigabyte or more
+\c ; /G=[1|0]
+\c ; /G=1 - Find with subdirectories (default)
+\c ; /G=0 - Find without subdirectories
+\c ;
+\c $var1 ; Result1: Size
+\c $var2 ; Result2: Sum of files
+\c $var3 ; Result3: Sum of directories
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if disk or directory isn't exist
+\\<br\\>- Error flag if syntax error
+\\<br\\>- See also \W{http://nsis.sourceforge.net/Locate_plugin}{Locate plugin}
+
+
+\\<b\\>Example (1):\\</b\\>
+
+\c Section
+\c ; Find file size "C:\WINDOWS\Explorer.exe" in kilobytes
+\c
+\c ${GetSize} "C:\WINDOWS" "/M=Explorer.exe /S=0K /G=0" $0 $1 $2
+\c ; $0="220" Kb
+\c ; $1="1" files
+\c ; $2="" directories
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+
+\\<b\\>Example (2):\\</b\\>
+
+\c Section
+\c ; Find folder size "C:\Installs\Reanimator\Drivers" in megabytes
+\c
+\c ${GetSize} "C:\Installs\Reanimator\Drivers" "/S=0M" $0 $1 $2
+\c ; $0="132" Mb
+\c ; $1="555" files
+\c ; $2="55" directories
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+
+\\<b\\>Example (3):\\</b\\>
+
+\c Section
+\c ; Find sum of files and folders "C:\WINDOWS" (no subfolders)
+\c
+\c ${GetSize} "C:\WINDOWS" "/G=0" $0 $1 $2
+\c ; $0="" size
+\c ; $1="253" files
+\c ; $2="46" directories
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+
+\S1{drivespace} DriveSpace
+
+\b Get total, occupied or free space of the drive.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${DriveSpace} "[Drive]" "[Options]" $var
+
+\c "[Drive]" ; Disk to check
+\c ;
+\c "[Options]" ; /D=[T|O|F]
+\c ; /D=T - Total space (default)
+\c ; /D=O - Occupied space
+\c ; /D=F - Free space
+\c ; /S=[B|K|M|G]
+\c ; /S=B - size in Bytes (default)
+\c ; /S=K - size in Kilobytes
+\c ; /S=M - size in Megabytes
+\c ; /S=G - size in Gigabytes
+\c ;
+\c $var ; Result: Size
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if disk isn't exist or not ready
+\\<br\\>- Error flag if syntax error
+
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${DriveSpace} "C:\" "/D=F /S=M" $R0
+\c ; $R0="2530" megabytes free on drive C:
+\c SectionEnd
+
+\S1{getdrives} GetDrives
+
+\b Find all available drives in the system.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetDrives} "[Option]" "Function"
+
+\c "[Option]" ; [FDD+HDD+CDROM+NET+RAM]
+\c ; FDD Floppy Disk Drives
+\c ; HDD Hard Disk Drives
+\c ; CDROM CD-ROM Drives
+\c ; NET Network Drives
+\c ; RAM RAM Disk Drives
+\c ;
+\c ; [ALL]
+\c ; Find all drives by letter (default)
+\c ;
+\c "Function" ; Callback function when found
+\c
+\c Function "Function"
+\c ; $9 "drive letter" (a:\ c:\ ...)
+\c ; $8 "drive type" (FDD HDD ...)
+\c
+\c ; $R0-$R9 are not used (save data in them).
+\c ; ...
+\c
+\c Push $var ; If $var="StopGetDrives" Then exit from function
+\c FunctionEnd
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${GetDrives} "FDD+CDROM" "Example1"
+\c SectionEnd
+\c
+\c Function Example1
+\c MessageBox MB_OK "$9 ($8 Drive)"
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${GetDrives} "ALL" "Example2"
+\c SectionEnd
+\c
+\c Function Example2
+\c MessageBox MB_OK "$9 ($8 Drive)"
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example3 (Get type of drive):\\</b\\>
+
+\c Section
+\c StrCpy $R0 "D:\" ;Drive letter
+\c StrCpy $R1 "invalid"
+\c
+\c ${GetDrives} "ALL" "Example3"
+\c
+\c MessageBox MB_OK "Type of drive $R0 is $R1"
+\c SectionEnd
+\c
+\c Function Example3
+\c StrCmp $9 $R0 0 +3
+\c StrCpy $R1 $8
+\c StrCpy $0 StopGetDrives
+\c
+\c Push $0
+\c FunctionEnd
+
+\S1{gettime} GetTime
+
+\b Get local or system time.
+
+\b Get file time (access, creation and modification).
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetTime} "[File]" "[Option]" $var1 $var2 $var3 $var4 $var5 $var6 $var7
+
+\c "[File]" ; Ignored if "L" or "LS"
+\c ;
+\c "[Option]" ; [Options]
+\c ; L Local time
+\c ; A last Access file time
+\c ; C Creation file time
+\c ; M Modification file time
+\c ; LS System time (UTC)
+\c ; AS last Access file time (UTC)
+\c ; CS Creation file time (UTC)
+\c ; MS Modification file time (UTC)
+\c ;
+\c $var1 ; Result1: day
+\c $var2 ; Result2: month
+\c $var3 ; Result3: year
+\c $var4 ; Result4: day of week name
+\c $var5 ; Result5: hour
+\c $var6 ; Result6: minute
+\c $var7 ; Result7: seconds
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if file isn't exist
+\\<br\\>- Error flag if syntax error
+\\<br\\>- See also \W{http://nsis.sourceforge.net/Time_plugin}{Time plugin}
+
+
+\\<b\\>Example (Get local time):\\</b\\>
+
+\c Section
+\c ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6
+\c ; $0="01" day
+\c ; $1="04" month
+\c ; $2="2005" year
+\c ; $3="Friday" day of week name
+\c ; $4="16" hour
+\c ; $5="05" minute
+\c ; $6="50" seconds
+\c
+\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6'
+\c SectionEnd
+
+\\<b\\>Example (Get file time):\\</b\\>
+
+\c Section
+\c ${GetTime} "$WINDIR\Explorer.exe" "C" $0 $1 $2 $3 $4 $5 $6
+\c ; $0="12" day
+\c ; $1="10" month
+\c ; $2="2004" year
+\c ; $3="Tuesday" day of week name
+\c ; $4="2" hour
+\c ; $5="32" minute
+\c ; $6="03" seconds
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6'
+\c SectionEnd
+
+\\<b\\>Example (Get system time):\\</b\\>
+
+\c Section
+\c ${GetTime} "" "LS" $0 $1 $2 $3 $4 $5 $6
+\c ; $0="01" day
+\c ; $1="04" month
+\c ; $2="2005" year
+\c ; $3="Friday" day of week name
+\c ; $4="11" hour
+\c ; $5="05" minute
+\c ; $6="50" seconds
+\c
+\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6'
+\c SectionEnd
+
+\\<b\\>Example (Convert time to 12-hour format AM/PM):\\</b\\>
+
+\c Section
+\c ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6
+\c
+\c StrCmp $4 0 0 +3
+\c StrCpy $4 12
+\c goto +3
+\c StrCmp $4 12 +5
+\c IntCmp $4 12 0 0 +3
+\c StrCpy $7 AM
+\c goto +3
+\c IntOp $4 $4 - 12
+\c StrCpy $7 PM
+\c
+\c MessageBox MB_OK 'Date=$0/$1/$2 ($3)$\nTime=$4:$5:$6 $7'
+\c SectionEnd
+
+\S1{getfileattributes} GetFileAttributes
+
+\b Get attributes of file or directory.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetFileAttributes} "[File]" "[Attributes]" $var
+
+\c "[File]" ; File or directory
+\c ;
+\c "[Attributes]" ; "ALL" (default)
+\c ; -all attributes of file combined with "|" to output
+\c ;
+\c ; "READONLY|HIDDEN|SYSTEM|DIRECTORY|ARCHIVE|
+\c ; DEVICE|NORMAL|TEMPORARY|SPARSE_FILE|REPARSE_POINT|
+\c ; COMPRESSED|OFFLINE|NOT_CONTENT_INDEXED|ENCRYPTED"
+\c ; -file must have specified attributes
+\c ;
+\c $var ; Result:
+\c ; $var=attr1|attr2|... (if used "ALL")
+\c ; $var=1 file has specified attributes
+\c ; $var=0 file has no specified attributes
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if file doesn't exist
+
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${GetFileAttributes} "C:\MSDOS.SYS" "ALL" $R0
+\c ; $R0=READONLY|HIDDEN|SYSTEM|ARCHIVE
+\c SectionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${GetFileAttributes} "C:\MSDOS.SYS" "SYSTEM|HIDDEN" $R0
+\c ; $R0=1
+\c SectionEnd
+
+\\<b\\>Example3:\\</b\\>
+
+\c Section
+\c ${GetFileAttributes} "C:\MSDOS.SYS" "NORMAL" $R0
+\c ; $R0=0
+\c SectionEnd
+
+\S1{getfileversion} GetFileVersion
+
+\b Get version information from executable file.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetFileVersion} "[Executable]" $var
+
+\c "[Executable]" ; Executable file (*.exe *.dll ...)
+\c $var ; Result: Version number
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if file doesn't exist
+\\<br\\>- Error flag if file doesn't contain version information
+
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetFileVersion} "C:\ftp\program.exe" $R0
+\c ; $R0="1.1.0.12"
+\c SectionEnd
+
+\S1{getexename} GetExeName
+
+\b Get installer filename (with valid case for Windows 98/Me).
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetExeName} $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetExeName} $R0
+\c ; $R0="C:\ftp\program.exe"
+\c SectionEnd
+
+\S1{getexepath} GetExePath
+
+\b Get installer pathname ($EXEDIR with valid case for Windows 98/Me).
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetExePath} $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetExePath} $R0
+\c ; $R0="C:\ftp"
+\c SectionEnd
+
+\S1{headers_getparameters} GetParameters
+
+\b Get command line parameters.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetParameters} $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetParameters} $R0
+\c ; $R0="[parameters]"
+\c SectionEnd
+
+\S1{getoptions} GetOptions
+
+\b Get options from command line parameters.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetOptions} "[Parameters]" "[Option]" $var
+
+\c "[Parameters]" ; command line parameters
+\c ;
+\c "[Option]" ; option name
+\c ;
+\c $var ; Result: option string
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if option not found
+\\<br\\>- First option symbol it is delimiter
+
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${GetOptions} "/S /T" "/T" $R0
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Not found" IDOK +2
+\c MessageBox MB_OK "Found"
+\c SectionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${GetOptions} "-INSTDIR=C:\Program Files\Common Files -SILENT=yes" "-INSTDIR=" $R0
+\c ;$R0=C:\Program Files\Common Files
+\c SectionEnd
+
+\\<b\\>Example3:\\</b\\>
+
+\c Section
+\c ${GetOptions} '/SILENT=yes /INSTDIR="C:/Program Files/Common Files" /ADMIN=password' "/INSTDIR=" $R0
+\c ;$R0=C:/Program Files/Common Files
+\c SectionEnd
+
+\\<b\\>Example4:\\</b\\>
+
+\c Section
+\c ${GetOptions} `-SILENT=yes -INSTDIR='"C:/Program Files/Common Files"' -ADMIN=password` "-INSTDIR=" $R0
+\c ;$R0="C:/Program Files/Common Files"
+\c SectionEnd
+
+\S1{getoptionss} GetOptionsS
+
+\b Same as \R{getoptions}{GetOptions}, but case sensitive.
+
+\S1{getroot} GetRoot
+
+\b Get root directory.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetRoot} "[FullPath]" $var
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${GetRoot} "C:\Program Files\NSIS" $R0
+\c ; $R0="C:"
+\c SectionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${GetRoot} "\\SuperPimp\NSIS\Source\exehead\Ui.c" $R0
+\c ; $R0="\\SuperPimp\NSIS"
+\c SectionEnd
+
+\S1{headers_getparent} GetParent
+
+\b Get parent directory.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetParent} "[PathString]" $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetParent} "C:\Program Files\Winamp\uninstwa.exe" $R0
+\c ; $R0="C:\Program Files\Winamp"
+\c SectionEnd
+
+\S1{getfilename} GetFileName
+
+\b Get last part from directory path.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetFileName} "[PathString]" $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetFileName} "C:\Program Files\Winamp\uninstwa.exe" $R0
+\c ; $R0="uninstwa.exe"
+\c SectionEnd
+
+\S1{getbasename} GetBaseName
+
+\b Get file name without extension.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetBaseName} "[FileString]" $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetBaseName} "C:\ftp\program.exe" $R0
+\c ; $R0="program"
+\c SectionEnd
+
+\S1{getfileext} GetFileExt
+
+\b Get extension of file.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${GetFileExt} "[FileString]" $var
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${GetFileExt} "C:\ftp\program.exe" $R0
+\c ; $R0="exe"
+\c SectionEnd
+
+\S1{bannertrimpath} BannerTrimPath
+
+\b Trim string path for banner.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${BannerTrimPath} "[PathString]" "[Option]" $var
+
+\c "[PathString]" ;
+\c ;
+\c "[Option]" ; [Length][A|B|C|D]
+\c ;
+\c ; Length -Maximum string length
+\c ; A -Trim center path (default)
+\c ; (C:\root\...\third path)
+\c ; If A mode not possible Then will be used B mode
+\c ; B -Trim right path
+\c ; (C:\root\second path\...)
+\c ; If B mode not possible Then will be used C mode
+\c ; C -Trim right string
+\c ; (C:\root\second path\third p...)
+\c ; D -Trim right string + filename
+\c ; (C:\root\second p...\third path)
+\c ; If D mode not possible Then will be used C mode
+\c ;
+\c $var ; Result: Trimmed path
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${BannerTrimPath} "C:\Server\Documents\Terminal\license.htm" "35A" $R0
+\c ;$R0=C:\Server\...\Terminal\license.htm
+\c SectionEnd
+
+\\<b\\>Example (Banner plugin):\\</b\\>
+
+\c !include "WinMessages.nsh"
+\c !include "FileFunc.nsh"
+\c !insertmacro Locate
+\c
+\c Section
+\c Banner::show /NOUNLOAD "Starting..."
+\c Banner::getWindow /NOUNLOAD
+\c Pop $R1
+\c ${Locate} "$WINDIR" "/L=F /M=*.* /B=1" "LocateCallback"
+\c Banner::destroy
+\c SectionEnd
+\c
+\c Function LocateCallback
+\c StrCmp $R0 $R8 code
+\c StrCpy $R0 $R8
+\c ${BannerTrimPath} "$R8" "38B" $R8
+\c GetDlgItem $1 $R1 1030
+\c SendMessage $1 ${WM_SETTEXT} 0 "STR:$R8"
+\c
+\c code:
+\c StrCmp $R9 '' end
+\c ;...
+\c
+\c end:
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (\W{http://nsis.sourceforge.net/Nxs_plug-in}{NxS plugin}):\\</b\\>
+
+\c !include "FileFunc.nsh"
+\c !insertmacro Locate
+\c
+\c Section
+\c nxs::Show /NOUNLOAD `$(^Name) Setup`\
+\c /top `Setup searching something$\nPlease wait$\nIf you can...`\
+\c /h 1 /can 1 /end
+\c ${Locate} "$WINDIR" "/L=F /M=*.* /B=1" "LocateCallback"
+\c nxs::Destroy
+\c SectionEnd
+\c
+\c Function LocateCallback
+\c StrCmp $R0 $R8 abortcheck
+\c StrCpy $R0 $R8
+\c ${BannerTrimPath} "$R8" "55A" $R8
+\c nxs::Update /NOUNLOAD /sub "$R8" /pos 78 /end
+\c
+\c abortcheck:
+\c nxs::HasUserAborted /NOUNLOAD
+\c Pop $0
+\c StrCmp $0 1 0 +2
+\c StrCpy $0 StopLocate
+\c
+\c StrCmp $R9 '' end
+\c ;...
+\c
+\c end:
+\c Push $0
+\c FunctionEnd
+
+\S1{dirstate} DirState
+
+\b Check directory full, empty or not exist.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${DirState} "[path]" $var
+
+\c "[path]" ; Directory
+\c $var ; Result:
+\c ; $var=0 (empty)
+\c ; $var=1 (full)
+\c ; $var=-1 (directory not found)
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${DirState} "$TEMP" $R0
+\c ; $R0="1" directory is full
+\c SectionEnd
+
+\S1{refreshshellicons} RefreshShellIcons
+
+\b After changing file associations, you can call this function to refresh the shell immediately.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${RefreshShellIcons}
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c WriteRegStr HKCR "Winamp.File\DefaultIcon" "" "$PROGRAMFILES\Winamp\WINAMP.EXE,2"
+\c
+\c ${RefreshShellIcons}
+\c SectionEnd
+
+
+\H{textfunc} Text Functions Header
+
+
+\S1{} Introduction
+
+Include header:
+
+\c !include "TextFunc.nsh"
+
+
+Include function "LineRead" for install and "TrimNewLines" for uninstall:
+
+\c !insertmacro LineRead
+\c !insertmacro un.TrimNewLines
+
+
+Call functions:
+
+\c Section Install
+\c ${LineRead} "C:\a.log" "-1" $R0
+\c ; $R0="Last line$\r$\n"
+\c SectionEnd
+
+\c Section un.Install
+\c ${un.TrimNewLines} "Last line$\r$\n" $R0
+\c ; $R0="Last line"
+\c SectionEnd
+
+
+\S1{linefind} LineFind
+
+\b Find specified lines in text file, and edit or view these lines in callback function.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${LineFind} "[File1]" "[File2|/NUL]" "[LineNumbers]" "Function"
+
+\c "[File1]" ; Input text file
+\c ;
+\c "[File2|/NUL]" ; [File2]
+\c ; Output text file
+\c ; If empty then File2=File1
+\c ; [/NUL]
+\c ; No output text file (only read File1)
+\c ;
+\c "[LineNumbers]" ; [No|-No|No:No|{No}|{-No}|{No:No}]
+\c ; 1:-1 all lines to change (default)
+\c ; 2 second line from start
+\c ; -3 third line from end
+\c ; 5:9 range of lines from 5 to 9
+\c ; {2} only second line from start to output
+\c ; {-3} only third line from end to output
+\c ; {5:9} only range of lines from 5 to 9 to output
+\c ;
+\c "Function" ; Callback function for specified lines
+\c
+\c Function "Function"
+\c ; $R9 current line
+\c ; $R8 current line number
+\c ; $R7 current line negative number
+\c ; $R6 current range of lines
+\c ; $R5 handle of a file opened to read
+\c ; $R4 handle of a file opened to write ($R4="" if "/NUL")
+\c
+\c ; you can use any string functions
+\c ; $R0-$R3 are not used (save data in them).
+\c ; ...
+\c
+\c Push $var ; If $var="StopLineFind" Then exit from function
+\c ; If $var="SkipWrite" Then skip current line (ignored if "/NUL")
+\c FunctionEnd
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if input file doesn't exist
+\\<br\\>- Error flag if output file path doesn't exist
+\\<br\\>- Ranges must be specified on growth (2 4:5 9:-8 -5:-4 -2:-1)
+\\<br\\>- Output file will not be updated if no changes made.
+
+\\<b\\>Example1 (delete first two symbols):\\</b\\>
+
+\c Section
+\c ${LineFind} "C:\a.log" "C:\a-edited.log" "3:-1" "Example1"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example1
+\c ${TrimNewLines} '$R9' $R9
+\c StrCpy $R9 $R9 '' 2
+\c StrCpy $R9 '$R9$\r$\n'
+\c ;start from 3 line and delete first two symbols
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example2 (show changed lines):\\</b\\>
+
+\c Section
+\c ${LineFind} "C:\a.log" "a.log" "{5:12 15 -6:-5 -1}" "Example2"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example2
+\c ${TrimNewLines} '$R9' $R9
+\c StrCpy $R9 "$R9 ~Changed line ($R8)~$\r$\n"
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example3 (delete lines):\\</b\\>
+
+\c Section
+\c ${LineFind} "C:\a.log" "\logs\a.log" "2:3 10:-5 -3:-2" "Example3"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example3
+\c StrCpy $0 SkipWrite
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example4 (insert lines):\\</b\\>
+
+\c Section
+\c ${LineFind} "C:\a.log" "" "10" "Example4
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example4
+\c FileWrite $R4 "---First Line---$\r$\n"
+\c FileWrite $R4 "---Second Line ...---$\r$\n"
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example5 (replace in file with count of changes - "WordFunc.nsh" required):\\</b\\>
+
+\c !include "WordFunc.nsh"
+\c !insertmacro WordReplace
+\c
+\c Section
+\c StrCpy $R0 0
+\c ${LineFind} "C:\a.log" "C:\logs\a.log" "1:-1" "Example5"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c MessageBox MB_OK "Changed lines=$R0"
+\c SectionEnd
+\c
+\c Function Example5
+\c StrCpy $1 $R9
+\c
+\c ${WordReplace} '$R9' ' ' '_' '+*' $R9
+\c
+\c StrCmp $1 $R9 +2
+\c IntOp $R0 $R0 + 1
+\c ;$R0 count of changed lines
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example6 (line string to cut or delete):\\</b\\>
+
+\c Section
+\c ${LineFind} "\a.log" "C:\logs\a.log" "" "Example6"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c MessageBox MB_OK "Processed lines=$R1:$R2"
+\c SectionEnd
+\c
+\c Function Example6
+\c ;(Cut lines from a line to another line (also including that line))
+\c StrCmp $R0 finish stop
+\c StrCmp $R0 start finish
+\c StrCmp $R9 'Start Line$\r$\n' 0 skip
+\c StrCpy $R0 start
+\c StrCpy $R1 $R8
+\c goto code
+\c finish:
+\c StrCmp $R9 'Finish Line$\r$\n' 0 code
+\c StrCpy $R0 finish
+\c StrCpy $R2 $R8
+\c goto code
+\c skip:
+\c StrCpy $0 SkipWrite
+\c goto output
+\c stop:
+\c StrCpy $0 StopLineFind
+\c goto output
+\c
+\c ;;(Delete lines from a line to another line (also including that line))
+\c ; StrCmp $R0 finish code
+\c ; StrCmp $R0 start finish
+\c ; StrCmp $R9 'Start Line$\r$\n' 0 code
+\c ; StrCpy $R0 start
+\c ; StrCpy $R1 $R8
+\c ; goto skip
+\c ; finish:
+\c ; StrCmp $R9 'Finish Line$\r$\n' 0 skip
+\c ; StrCpy $R0 finish
+\c ; StrCpy $R2 $R8
+\c ; skip:
+\c ; StrCpy $0 SkipWrite
+\c ; goto output
+\c
+\c code:
+\c ;...
+\c
+\c output:
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example7 (read lines):\\</b\\>
+
+\c Section
+\c ${LineFind} "C:\a.log" "/NUL" "1:-1" "Example7"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example7
+\c MessageBox MB_OKCANCEL '$$R9 "Line"=[$R9]$\n$$R8 "#" =[$R8]' IDOK +2
+\c StrCpy $0 StopLineFind
+\c
+\c Push $0
+\c FunctionEnd
+
+\S1{lineread} LineRead
+
+\b Get line in file specified with number.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${LineRead} "[File]" "[LineNumber]" $var
+
+\c "[File]" ; Input text file
+\c ;
+\c "[LineNumber]" ; [No|-No]
+\c ; 3 line number from start
+\c ; -5 line number from end
+\c ;
+\c $var ; Result: Line
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if input file doesn't exist
+\\<br\\>- Error flag if line number not found
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${LineRead} "C:\a.log" "-1" $R0
+\c ; $R0="Last line$\r$\n"
+\c SectionEnd
+
+\S1{filereadfromend} FileReadFromEnd
+
+\b Read text file from end line by line.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${FileReadFromEnd} "[File]" "Function"
+
+\c "[File]" ; Input text file
+\c "Function" ; Callback function
+\c
+\c Function "Function"
+\c ; $9 current line
+\c ; $8 current line number
+\c ; $7 current line negative number
+\c
+\c ; $R0-$R9 are not used (save data in them).
+\c ; ...
+\c
+\c Push $var ; If $var="StopFileReadFromEnd" Then exit from function
+\c FunctionEnd
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if input file doesn't exist
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${FileReadFromEnd} "C:\a.log" "Example1"
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example1
+\c MessageBox MB_OKCANCEL '"Line"=[$9]$\n "#"=[$8]$\n "-#"=[$7]' IDOK +2
+\c StrCpy $0 StopFileReadFromEnd
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example2 (Reverse text file):\\</b\\>
+
+\c Section
+\c GetTempFileName $R0
+\c FileOpen $R1 $R0 w
+\c ${FileReadFromEnd} "C:\a.log" "Example2"
+\c FileClose $R1
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c Exec '"notepad.exe" "$R0"'
+\c SectionEnd
+\c
+\c Function Example2
+\c StrCmp $7 -1 0 +5
+\c StrCpy $1 $9 1 -1
+\c StrCmp $1 '$\n' +3
+\c StrCmp $1 '$\r' +2
+\c StrCpy $9 '$9$\r$\n'
+\c
+\c FileWrite $R1 "$9"
+\c
+\c Push $0
+\c FunctionEnd
+
+\S1{linesum} LineSum
+
+\b Get sum of lines in text file.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${LineSum} "[File]" $var
+
+\c "[File]" ; Input file
+\c $var ; Result: Sum of lines
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if input file doesn't exist
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${LineSum} "C:\a.log" $R0
+\c ; $R0="54"
+\c SectionEnd
+
+\S1{filejoin} FileJoin
+
+\b Join two files in one (File1 + File2 = File3).
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${FileJoin} "[File1]" "[File2]" "[File3]"
+
+\c "[File1]" ; Input File1
+\c "[File2]" ; Input File2
+\c "[File3]" ; Output File3
+\c ; If [File3]="" Then add [File2] to [File1]
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if input files don't exist
+\\<br\\>- Error flag if output file path doesn't exist
+
+\\<b\\>Example1 (Join: a.log + b.log = Z.log):\\</b\\>
+
+\c Section
+\c ${FileJoin} "C:\a.log" "C:\logs\b.log" "C:\Z.log"
+\c SectionEnd
+
+\\<b\\>Example2 (Add: a.log + b.log = a.log):\\</b\\>
+
+\c Section
+\c ${FileJoin} "C:\a.log" "C:\logs\b.log" "C:\a.log"
+\c SectionEnd
+
+\S1{textcompare} TextCompare
+
+\b Compare two text files.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${TextCompare} "[File1]" "[File2]" "[Option]" "Function"
+
+\c "[File1]" ; File1 Compare these lines
+\c "[File2]" ; File2 Compare with these lines
+\c "[Options]" ; (line-by-line):
+\c ; FastDiff Compare line N (File1) with line N (File2)
+\c ; Call function if Different lines found
+\c ; FastEqual Compare line N (File1) with line N (File2)
+\c ; Call function if Equal lines found
+\c ; (line number independent):
+\c ; SlowDiff Compare line N (File1) with all lines (File2)
+\c ; Call function if line N (File1) Different
+\c ; SlowEqual Compare line N (File1) with all lines (File2)
+\c ; Call function if line N (File1) Equal
+\c "Function" ; Callback function
+\c
+\c Function "Function"
+\c ; $9 "Line File1"
+\c ; $8 "Line number"
+\c ; $7 "Line File2" (empty if SlowDiff)
+\c ; $6 "Line number" (empty if SlowDiff)
+\c
+\c ; $R0-$R9 are not used (save data in them).
+\c ; ...
+\c
+\c Push $var ; If $var="StopTextCompare" Then exit from function
+\c FunctionEnd
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if File1 or File2 doesn't exist
+\\<br\\>- Error flag if syntax error
+
+\\<b\\>Example (Different or Equal):\\</b\\>
+
+\c Section
+\c StrCpy $R0 ''
+\c ${TextCompare} "C:\1.txt" "C:\2.txt" "FastDiff" "Example1"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +4
+\c
+\c StrCmp $R0 NotEqual 0 +2
+\c MessageBox MB_OK "Files differ" IDOK +2
+\c MessageBox MB_OK "Files identical"
+\c SectionEnd
+\c
+\c Function Example1
+\c StrCpy $R0 NotEqual
+\c StrCpy $0 StopTextCompare
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Compare line-by-line - Different):\\</b\\>
+
+\c Section
+\c StrCpy $R0 'Text1.txt'
+\c StrCpy $R1 'Text2.txt'
+\c
+\c GetTempFileName $R2
+\c FileOpen $R3 $R2 w
+\c FileWrite $R3 "$R0 | $R1$\r$\n"
+\c ${TextCompare} "$R0" "$R1" "FastDiff" "Example2"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c
+\c Exec "notepad.exe $R2"
+\c FunctionEnd
+\c
+\c Function Example2
+\c FileWrite $R3 '$8=$9'
+\c FileWrite $R3 '$6=$7$\r$\n'
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Compare line-by-line - Equal):\\</b\\>
+
+\c Section
+\c StrCpy $R0 'Text1.txt'
+\c StrCpy $R1 'Text2.txt'
+\c
+\c GetTempFileName $R2
+\c FileOpen $R3 $R2 w
+\c FileWrite $R3 "$R0 | $R1$\r$\n"
+\c ${TextCompare} "$R0" "$R1" "FastEqual" "Example3"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c
+\c Exec "notepad.exe $R2"
+\c FunctionEnd
+\c
+\c Function Example3
+\c FileWrite $R3 '$8|$6=$9'
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Compare all lines - Different):\\</b\\>
+
+\c Section
+\c StrCpy $R0 'Text1.txt'
+\c StrCpy $R1 'Text2.txt'
+\c
+\c GetTempFileName $R2
+\c FileOpen $R3 $R2 w
+\c FileWrite $R3 "$R0 | $R1$\r$\n"
+\c ${TextCompare} "$R0" "$R1" "SlowDiff" "Example4"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK end
+\c
+\c FileWrite $R3 "$\r$\n$R1 | $R0$\r$\n"
+\c ${TextCompare} "$R1" "$R0" "SlowDiff" "Example4"
+\c FileClose $R3
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK end
+\c
+\c Exec "notepad.exe $R2"
+\c
+\c end:
+\c FunctionEnd
+\c
+\c Function Example4
+\c FileWrite $R3 '$8=$9'
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Compare all lines - Equal):\\</b\\>
+
+\c Section
+\c StrCpy $R0 'Text1.txt'
+\c StrCpy $R1 'Text2.txt'
+\c
+\c GetTempFileName $R2
+\c FileOpen $R3 $R2 w
+\c FileWrite $R3 "$R0 | $R1$\r$\n"
+\c ${TextCompare} "$R0" "$R1" "SlowEqual" "Example5"
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error" IDOK +2
+\c
+\c Exec "notepad.exe $R2"
+\c FunctionEnd
+\c
+\c Function Example5
+\c FileWrite $R3 '$8|$6=$9'
+\c
+\c Push $0
+\c FunctionEnd
+
+\\<b\\>Example (Show variables):\\</b\\>
+
+\c Section
+\c ${TextCompare} "C:\1.txt" "C:\2.txt" "FastDiff" "Example6"
+\c
+\c IfErrors 0 +2
+\c MessageBox MB_OK "Error"
+\c SectionEnd
+\c
+\c Function Example6
+\c MessageBox MB_OKCANCEL '$$9 "Line File1" =[$9]$\n$$8 "Line #" =[$8]$\n$$7 "Line File2" =[$7]$\n$$6 "Line #" =[$6]' IDOK +2
+\c StrCpy $0 StopTextCompare
+\c
+\c Push $0
+\c FunctionEnd
+
+\S1{textcompares} TextCompareS
+
+\b Same as \R{textcompare}{TextCompare}, but case sensitive.
+
+\S1{configread} ConfigRead
+
+\b Read value from entry name in config file.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${ConfigRead} "[File]" "[Entry]" $var
+
+\c "[File]" ; config file
+\c ;
+\c "[Entry]" ; entry name
+\c ;
+\c $var ; Result: Value
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if entry not found
+\\<br\\>- Error flag if file doesn't exist
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${ConfigRead} "C:\AUTOEXEC.BAT" "SET winbootdir=" $R0
+\c ;$R0=C:\WINDOWS
+\c SectionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${ConfigRead} "C:\apache\conf\httpd.conf" "Timeout " $R0
+\c ;$R0=30
+\c SectionEnd
+
+\S1{configreads} ConfigReadS
+
+\b Same as \R{configread}{ConfigRead}, but case sensitive.
+
+\S1{configwrite} ConfigWrite
+
+\b Write value from entry name in config file.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${ConfigWrite} "[File]" "[Entry]" "[Value]" $var
+
+\c "[File]" ; config file
+\c ;
+\c "[Entry]" ; entry name
+\c ;
+\c "[Value]" ; value name
+\c ; if "" then delete Entry
+\c ;
+\c $var ; Result:
+\c ; $var=CHANGED Value is written
+\c ; $var=DELETED Entry is deleted
+\c ; $var=ADDED Entry and Value are added
+\c ; $var=SAME Entry and Value already exist
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if file doesn't exist
+\\<br\\>- Error flag if file can't be opened
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${ConfigWrite} "C:\AUTOEXEC.BAT" "SET winbootdir=" "D:\WINDOWS" $R0
+\c ;$R0=CHANGED
+\c SectionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${ConfigWrite} "C:\apache\conf\httpd.conf" "Timeout " "30" $R0
+\c ;$R0=SAME
+\c SectionEnd
+
+\\<b\\>Example3:\\</b\\>
+
+\c Section
+\c ${ConfigWrite} "C:\apache\conf\httpd.conf" "Timeout " "" $R0
+\c ;$R0=DELETED
+\c SectionEnd
+
+\S1{configwrites} ConfigWriteS
+
+\b Same as \R{configwrite}{ConfigWrite}, but case sensitive.
+
+\S1{filerecode} FileRecode
+
+\b Recode text file from DOS to Windows format and vice-versa.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${FileRecode} "[File]" "[Format]"
+
+\c "[File]" ;
+\c ;
+\c "[Format]" ; OemToChar -from DOS to Windows
+\c ; CharToOem -from Windows to DOS
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if file doesn't exist
+\\<br\\>- Error flag if syntax error
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${FileRecode} "C:\SCANDISK.LOG" "CharToOem"
+\c SectionEnd
+
+\S1{headers_trimnewlines} TrimNewLines
+
+\b Trim newlines in a string.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${TrimNewLines} "[string]" $var
+
+\c "[string]" ; Input string
+\c $var ; Result: String without '$\r' and '$\n' at the end
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${TrimNewLines} "Text line$\r$\n" $R0
+\c ; $R0="Text line"
+\c SectionEnd
+
+
+\H{wordfunc} Word Functions Header
+
+
+\S1{} Introduction
+
+Include header:
+
+\c !include "WordFunc.nsh"
+
+
+Include function "WordFind" for install and "WordReplace" for uninstall:
+
+\c !insertmacro WordFind
+\c !insertmacro un.WordReplace
+
+
+Call functions:
+
+\c Section Install
+\c ${WordFind} "A--H---S" "-" "+2" $R0
+\c ; $R0="H"
+\c SectionEnd
+
+\c Section un.Install
+\c ${un.WordReplace} "A--H---S" "-" "x" "+3*" $R0
+\c ; $R0="A--HxS"
+\c SectionEnd
+
+
+\S1{wordfind} WordFind
+
+\b Multi-features string function.
+
+\c Strings:
+\c "[word+1][delimiter][word+2][delimiter][word+3]..."
+\c "[delimiter][word+1][delimiter][word+2][delimiter]..."
+\c "[delimiter][delimiter][word+1][delimiter][delimiter][delimiter]..."
+\c "...[word-3][delimiter][word-2][delimiter][word-1]"
+\c "...[delimiter][word-2][delimiter][word-1][delimiter]"
+\c "...[delimiter][delimiter][word-1][delimiter][delimiter][delimiter]"
+
+\\<b\\>Syntax: \\</b\\>
+
+\c ${WordFind} "[string]" "[delimiter]" "[E][options]" $var
+
+\c "[string]" ;[string]
+\c ; input string
+\c "[delimiter]" ;[delimiter]
+\c ; one or several symbols
+\c "[E][options]" ;[options]
+\c ; +number : word number from start
+\c ; -number : word number from end
+\c ; +number} : delimiter number from start
+\c ; all space after this
+\c ; delimiter to output
+\c ; +number{ : delimiter number from start
+\c ; all space before this
+\c ; delimiter to output
+\c ; +number}} : word number from start
+\c ; all space after this word
+\c ; to output
+\c ; +number{{ : word number from start
+\c ; all space before this word
+\c ; to output
+\c ; +number{} : word number from start
+\c ; all space before and after
+\c ; this word (word exclude)
+\c ; +number*} : word number from start
+\c ; all space after this
+\c ; word to output with word
+\c ; +number{* : word number from start
+\c ; all space before this
+\c ; word to output with word
+\c ; # : sum of words to output
+\c ; * : sum of delimiters to output
+\c ; /word : number of word to output
+\c ;
+\c ;[E]
+\c ; with errorlevel output
+\c ; IfErrors:
+\c ; $var=1 delimiter not found
+\c ; $var=2 no such word number
+\c ; $var=3 syntax error (Use: +1,-1},#,*,/word,...)
+\c ;[]
+\c ; no errorlevel output (default)
+\c ; If some errors found then (result=input string)
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Accepted numbers 1,01,001,...
+
+\\<b\\>Example (Find word by number):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\Program Files C:\WINDOWS" " C:\" "-02" $R0
+\c ; $R0="Program Files"
+\c SectionEnd
+
+\\<b\\>Example (Delimiter exclude):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" "sys" "-2}" $R0
+\c ; $R0=" C:\logo.sys C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (Sum of words):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " C:\" "#" $R0
+\c ; $R0="3"
+\c SectionEnd
+
+\\<b\\>Example (Sum of delimiters):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" "sys" "*" $R0
+\c ; $R0="2"
+\c SectionEnd
+
+\\<b\\>Example (Find word number):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\Program Files C:\WINDOWS" " " "/Files" $R0
+\c ; $R0="3"
+\c SectionEnd
+
+\\<b\\>Example ( \}\} ):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "+2}}" $R0
+\c ; $R0=" C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example ( \{\} ):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "+2{}" $R0
+\c ; $R0="C:\io.sys C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example ( *\} ):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "+2*}" $R0
+\c ; $R0="C:\logo.sys C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (Get parent directory):\\</b\\>
+
+\c Section
+\c StrCpy $R0 "C:\Program Files\NSIS\NSIS.chm"
+\c ; "C:\Program Files\NSIS\Include\"
+\c ; "C:\\Program Files\\NSIS\\NSIS.chm"
+\c
+\c ${WordFind} "$R0" "\" "-2{*" $R0
+\c ; $R0="C:\Program Files\NSIS"
+\c ; "C:\\Program Files\\NSIS"
+\c SectionEnd
+
+\\<b\\>Example (Coordinates):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys C:\WINDOWS" ":\lo" "E+1{" $R0
+\c ; $R0="C:\io.sys C"
+\c IfErrors end
+\c
+\c StrLen $0 $R0 ; $0 = Start position of word (11)
+\c StrLen $1 ':\lo' ; $1 = Word length (4)
+\c ; StrCpy $R0 $R1 $1 $0 ; $R0 = :\lo
+\c
+\c end:
+\c SectionEnd
+
+\\<b\\>Example (With errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordFind} "[string]" "[delimiter]" "E[options]" $R0
+\c
+\c IfErrors 0 end
+\c StrCmp $R0 1 0 +2 ; errorlevel 1?
+\c MessageBox MB_OK 'delimiter not found' IDOK end
+\c StrCmp $R0 2 0 +2 ; errorlevel 2?
+\c MessageBox MB_OK 'no such word number' IDOK end
+\c StrCmp $R0 3 0 +2 ; errorlevel 3?
+\c MessageBox MB_OK 'syntax error'
+\c
+\c end:
+\c SectionEnd
+
+\\<b\\>Example (Without errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys" "_" "+1" $R0
+\c
+\c ; $R0="C:\io.sys C:\logo.sys" (error: delimiter "_" not found)
+\c SectionEnd
+
+\\<b\\>Example (If found):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys" ":\lo" "E+1{" $R0
+\c
+\c IfErrors notfound found
+\c found:
+\c MessageBox MB_OK 'Found' IDOK end
+\c notfound:
+\c MessageBox MB_OK 'Not found'
+\c
+\c end:
+\c SectionEnd
+
+\\<b\\>Example (If found 2):\\</b\\>
+
+\c Section
+\c ${WordFind} "C:\io.sys C:\logo.sys" ":\lo" "+1{" $R0
+\c
+\c StrCmp $R0 "C:\io.sys C:\logo.sys" notfound found ; error?
+\c found:
+\c MessageBox MB_OK 'Found' IDOK end
+\c notfound:
+\c MessageBox MB_OK 'Not found'
+\c
+\c end:
+\c SectionEnd
+
+\\<b\\>Example (To accept one word in string if delimiter not found):\\</b\\>
+
+\c Section
+\c StrCpy $0 'OneWord'
+\c StrCpy $1 1
+\c
+\c loop:
+\c ${WordFind} "$0" " " "E+$1" $R0
+\c IfErrors 0 code
+\c StrCmp $1$R0 11 0 error
+\c StrCpy $R0 $0
+\c goto end
+\c
+\c code:
+\c ; ...
+\c IntOp $1 $1 + 1
+\c goto loop
+\c
+\c error:
+\c StrCpy $1 ''
+\c StrCpy $R0 ''
+\c
+\c end:
+\c ; $R0="OneWord"
+\c SectionEnd
+
+\S1{wordfinds} WordFindS
+
+\b Same as \R{wordfind}{WordFind}, but case sensitive.
+
+\S1{wordfind2x} WordFind2X
+
+\b Find word between two delimiters.
+
+\c Strings:
+\c "[delimiter1][word+1][delimiter2][delimiter1][word+2][delimiter2]..."
+\c "[text][delimiter1][text][delimiter1][word+1][delimiter2][text]..."
+\c "...[delimiter1][word-2][delimiter2][delimiter1][word-1][delimiter2]"
+\c "...[text][delimiter1][text][delimiter1][word-1][delimiter2][text]"
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${WordFind2X} "[string]" "[delimiter1]" "[delimiter2]" "[E][options]" $var
+
+\c "[string]" ;[string]
+\c ; input string
+\c "[delimiter1]" ;[delimiter1]
+\c ; first delimiter
+\c "[delimiter2]" ;[delimiter2]
+\c ; second delimiter
+\c "[E][options]" ;[options]
+\c ; +number : word number from start
+\c ; -number : word number from end
+\c ; +number}} : word number from start all space
+\c ; after this word to output
+\c ; +number{{ : word number from end all space
+\c ; before this word to output
+\c ; +number{} : word number from start
+\c ; all space before and after
+\c ; this word (word exclude)
+\c ; +number*} : word number from start
+\c ; all space after this
+\c ; word to output with word
+\c ; +number{* : word number from start
+\c ; all space before this
+\c ; word to output with word
+\c ; # : sum of words to output
+\c ; /word : number of word to output
+\c ;
+\c ;[E]
+\c ; with errorlevel output
+\c ; IfErrors:
+\c ; $var=1 no words found
+\c ; $var=2 no such word number
+\c ; $var=3 syntax error (Use: +1,-1,#)
+\c ;[]
+\c ; no errorlevel output (default)
+\c ; If some errors found then (result=input string)
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Example (1):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]" "[C:\" "];" "+2" $R0
+\c ; $R0="logo.sys"
+\c SectionEnd
+
+\\<b\\>Example (2):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1" $R0
+\c ; $R0="logo"
+\c SectionEnd
+
+\\<b\\>Example (3):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1{{" $R0
+\c ; $R0="C:\WINDOWS C:\io.sys C:"
+\c SectionEnd
+
+\\<b\\>Example (4):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1{}" $R0
+\c ; $R0="C:\WINDOWS C:\io.sys C:sys"
+\c SectionEnd
+
+\\<b\\>Example (5):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "-1{*" $R0
+\c ; $R0="C:\WINDOWS C:\io.sys C:\logo."
+\c SectionEnd
+
+\\<b\\>Example (6):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "C:\WINDOWS C:\io.sys C:\logo.sys" "\" "." "/logo" $R0
+\c ; $R0="2"
+\c SectionEnd
+
+\\<b\\>Example (With errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordFind2X} "[io.sys];[C:\logo.sys]" "\" "];" "E+1" $R0
+\c ; $R0="1" ("\...];" not found)
+\c
+\c IfErrors 0 noerrors
+\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
+\c
+\c noerrors:
+\c MessageBox MB_OK 'No errors'
+\c
+\c end:
+\c SectionEnd
+
+\S1{wordfind2xs} WordFind2XS
+
+\b Same as \R{wordfind2x}{WordFind2X}, but case sensitive.
+
+\S1{wordfind3x} WordFind3X
+
+\b Find a word that contains a string, between two delimiters.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${WordFind3X} "[string]" "[delimiter1]" "[center]" "[delimiter2]" "[E][options]" $var
+
+\c "[string]" ;[string]
+\c ; input string
+\c "[delimiter1]" ;[delimiter1]
+\c ; first delimiter
+\c "[center]" ;[center]
+\c ; center string
+\c "[delimiter2]" ;[delimiter2]
+\c ; second delimiter
+\c "[E][options]" ;[options]
+\c ; +number : word number from start
+\c ; -number : word number from end
+\c ; +number}} : word number from start all space
+\c ; after this word to output
+\c ; +number{{ : word number from end all space
+\c ; before this word to output
+\c ; +number{} : word number from start
+\c ; all space before and after
+\c ; this word (word exclude)
+\c ; +number*} : word number from start
+\c ; all space after this
+\c ; word to output with word
+\c ; +number{* : word number from start
+\c ; all space before this
+\c ; word to output with word
+\c ; # : sum of words to output
+\c ; /word : number of word to output
+\c ;
+\c ;[E]
+\c ; with errorlevel output
+\c ; IfErrors:
+\c ; $var=1 no words found
+\c ; $var=2 no such word number
+\c ; $var=3 syntax error (Use: +1,-1,#)
+\c ;[]
+\c ; no errorlevel output (default)
+\c ; If some errors found then (result=input string)
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Example (1):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "+1" $R0
+\c ; $R0="1.AAB"
+\c SectionEnd
+
+\\<b\\>Example (2):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1" $R0
+\c ; $R0="2.BAA"
+\c SectionEnd
+
+\\<b\\>Example (3):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1{{" $R0
+\c ; $R0="[1.AAB];"
+\c SectionEnd
+
+\\<b\\>Example (4):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1{}" $R0
+\c ; $R0="[1.AAB];[3.BBB];"
+\c SectionEnd
+
+\\<b\\>Example (5):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "-1{*" $R0
+\c ; $R0="[1.AAB];[2.BAA];"
+\c SectionEnd
+
+\\<b\\>Example (6):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "AA" "];" "/2.BAA" $R0
+\c ; $R0="2"
+\c SectionEnd
+
+\\<b\\>Example (With errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordFind3X} "[1.AAB];[2.BAA];[3.BBB];" "[" "XX" "];" "E+1" $R0
+\c ; $R0="1" ("[...XX...];" not found)
+\c
+\c IfErrors 0 noerrors
+\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
+\c
+\c noerrors:
+\c MessageBox MB_OK 'No errors'
+\c
+\c end:
+\c SectionEnd
+
+\S1{wordfind3xs} WordFind3XS
+
+\b Same as \R{wordfind3x}{WordFind3X}, but case sensitive.
+
+\S1{wordreplace} WordReplace
+
+\b Replace or delete word from string.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${WordReplace} "[string]" "[word1]" "[word2]" "[E][options]" $var
+
+\c "[string]" ;[string]
+\c ; input string
+\c "[word1]" ;[word1]
+\c ; word to replace or delete
+\c "[word2]" ;[word2]
+\c ; replace with (if empty delete)
+\c "[E][options]" ;[options]
+\c ; +number : word number from start
+\c ; -number : word number from end
+\c ; +number* : word number from start multiple-replace
+\c ; -number* : word number from end multiple-replace
+\c ; + : replace all results
+\c ; +* : multiple-replace all results
+\c ; { : if exists replace all delimiters
+\c ; from left edge
+\c ; } : if exists replace all delimiters
+\c ; from right edge
+\c ; {} : if exists replace all delimiters
+\c ; from edges
+\c ; {* : if exists multiple-replace all
+\c ; delimiters from left edge
+\c ; }* : if exists multiple-replace all
+\c ; delimiters from right edge
+\c ; {}* : if exists multiple-replace all
+\c ; delimiters from edges
+\c ;
+\c ;[E]
+\c ; with errorlevel output
+\c ; IfErrors:
+\c ; $var=1 word to replace not found
+\c ; $var=2 no such word number
+\c ; $var=3 syntax error (Use: +1,-1,+1*,-1*,+,+*,{},{}*)
+\c ;[]
+\c ; no errorlevel output (default)
+\c ; If some errors found then (result=input string)
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Example (replace):\\</b\\>
+
+\c Section
+\c ${WordReplace} "C:\io.sys C:\logo.sys C:\WINDOWS" "SYS" "bmp" "+2" $R0
+\c ; $R0="C:\io.sys C:\logo.bmp C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (delete):\\</b\\>
+
+\c Section
+\c ${WordReplace} "C:\io.sys C:\logo.sys C:\WINDOWS" "SYS" "" "+" $R0
+\c ; $R0="C:\io. C:\logo. C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (multiple-replace 1):\\</b\\>
+
+\c Section
+\c ${WordReplace} "C:\io.sys C:\logo.sys C:\WINDOWS" " " " " "+1*" $R0
+\c ; +1* or +2* or +3* or +4* or +5* or +6*
+\c ; $R0="C:\io.sys C:\logo.sys C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (multiple-replace 2):\\</b\\>
+
+\c Section
+\c ${WordReplace} "C:\io.sys C:\logo.sysSYSsys C:\WINDOWS" "sys" "bmp" "+*" $R0
+\c ; $R0="C:\io.bmp C:\logo.bmp C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (multiple-replace 3):\\</b\\>
+
+\c Section
+\c ${WordReplace} "sysSYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys" "sys" "|" "{}*" $R0
+\c ; $R0="|C:\io.sys C:\logo.sys C:\WINDOWS|"
+\c SectionEnd
+
+\\<b\\>Example (With errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordReplace} "C:\io.sys C:\logo.sys" "sys" "bmp" "E+3" $R0
+\c ; $R0="2" (no such word number "+3")
+\c
+\c IfErrors 0 noerrors
+\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
+\c
+\c noerrors:
+\c MessageBox MB_OK 'No errors'
+\c
+\c end:
+\c SectionEnd
+
+\S1{wordreplaces} WordReplaceS
+
+\b Same as \R{wordreplace}{WordReplace}, but case sensitive.
+
+\S1{wordadd} WordAdd
+
+\b Add words to string1 from string2 if not exist or delete words if exist.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${WordAdd} "[string1]" "[delimiter]" "[E][options]" $var
+
+\c "[string1]" ;[string1]
+\c ; string for addition or removing
+\c "[delimiter]" ;[delimiter]
+\c ; one or several symbols
+\c "[E][options]" ;[options]
+\c ; +string2 : words to add
+\c ; -string2 : words to delete
+\c ;
+\c ;[E]
+\c ; with errorlevel output
+\c ; IfErrors:
+\c ; $var=1 delimiter is empty
+\c ; $var=3 syntax error (use: +text,-text)
+\c ;[]
+\c ; no errorlevel output (default)
+\c ; If some errors found then (result=input string)
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Example (add):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys C:\WINDOWS" " " "+C:\WINDOWS C:\config.sys" $R0
+\c ; $R0="C:\io.sys C:\WINDOWS C:\config.sys"
+\c SectionEnd
+
+\\<b\\>Example (delete):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "-C:\WINDOWS C:\config.sys C:\IO.SYS" $R0
+\c ; $R0="C:\logo.sys"
+\c SectionEnd
+
+\\<b\\>Example (add to one):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys" " " "+C:\WINDOWS C:\config.sys C:\IO.SYS" $R0
+\c ; $R0="C:\io.sys C:\WINDOWS C:\config.sys"
+\c SectionEnd
+
+\\<b\\>Example (delete one):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys C:\logo.sys C:\WINDOWS" " " "-C:\WINDOWS" $R0
+\c ; $R0="C:\io.sys C:\logo.sys"
+\c SectionEnd
+
+\\<b\\>Example (No new words found):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys C:\logo.sys" " " "+C:\logo.sys" $R0
+\c StrCmp $R0 "C:\io.sys C:\logo.sys" 0 +2
+\c MessageBox MB_OK "No new words found to add"
+\c SectionEnd
+
+\\<b\\>Example (No words deleted):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys C:\logo.sys" " " "-C:\config.sys" $R0
+\c StrCmp $R0 "C:\io.sys C:\logo.sys" 0 +2
+\c MessageBox MB_OK "No words found to delete"
+\c SectionEnd
+
+\\<b\\>Example (With errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordAdd} "C:\io.sys C:\logo.sys" "" "E-C:\logo.sys" $R0
+\c ; $R0="1" (delimiter is empty "")
+\c
+\c IfErrors 0 noerrors
+\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
+\c
+\c noerrors:
+\c MessageBox MB_OK 'No errors'
+\c
+\c end:
+\c SectionEnd
+
+\S1{wordadds} WordAddS
+
+\b Same as \R{wordadd}{WordAdd}, but case sensitive.
+
+\S1{wordinsert} WordInsert
+
+\b Insert word in string.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${WordInsert} "[string]" "[delimiter]" "[word]" "[E][options]" $var
+
+\c "[string]" ;[string]
+\c ; input string
+\c "[delimiter]" ;[delimiter]
+\c ; one or several symbols
+\c "[word]" ;[word]
+\c ; word to insert
+\c "[E][options]" ;[options]
+\c ; +number : word number from start
+\c ; -number : word number from end
+\c ;
+\c ;[E]
+\c ; with errorlevel output
+\c ; IfErrors:
+\c ; $var=1 delimiter is empty
+\c ; $var=2 wrong word number
+\c ; $var=3 syntax error (Use: +1,-1)
+\c ;[]
+\c ; no errorlevel output (default)
+\c ; If some errors found then (result=input string)
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Example (1):\\</b\\>
+
+\c Section
+\c ${WordInsert} "C:\io.sys C:\WINDOWS" " " "C:\logo.sys" "-2" $R0
+\c ; $R0="C:\io.sys C:\logo.sys C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (2):\\</b\\>
+
+\c Section
+\c ${WordInsert} "C:\io.sys" " " "C:\WINDOWS" "+2" $R0
+\c ; $R0="C:\io.sys C:\WINDOWS"
+\c SectionEnd
+
+\\<b\\>Example (3):\\</b\\>
+
+\c Section
+\c ${WordInsert} "" " " "C:\WINDOWS" "+1" $R0
+\c ; $R0="C:\WINDOWS "
+\c SectionEnd
+
+\\<b\\>Example (With errorlevel output):\\</b\\>
+
+\c Section
+\c ${WordInsert} "C:\io.sys C:\logo.sys" " " "C:\logo.sys" "E+4" $R0
+\c ; $R0="2" (wrong word number "+4")
+\c
+\c IfErrors 0 noerrors
+\c MessageBox MB_OK 'Errorlevel=$R0' IDOK end
+\c
+\c noerrors:
+\c MessageBox MB_OK 'No errors'
+\c
+\c end:
+\c SectionEnd
+
+\S1{wordinserts} WordInsertS
+
+\b Same as \R{wordinsert}{WordInsert}, but case sensitive.
+
+\S1{strfilter} StrFilter
+
+\b Convert string to uppercase or lowercase.
+
+\b Set symbol filter.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${StrFilter} "[string]" "[options]" "[symbols1]" "[symbols2]" $var
+
+\c "[string]" ;[string]
+\c ; input string
+\c ;
+\c "[options]" ;[+|-][1|2|3|12|23|31][eng|rus]
+\c ; + : convert string to uppercase
+\c ; - : convert string to lowercase
+\c ; 1 : only Digits
+\c ; 2 : only Letters
+\c ; 3 : only Special
+\c ; 12 : only Digits + Letters
+\c ; 23 : only Letters + Special
+\c ; 31 : only Special + Digits
+\c ; eng : English symbols (default)
+\c ; rus : Russian symbols
+\c ;
+\c "[symbols1]" ;[symbols1]
+\c ; symbols include (not changeable)
+\c ;
+\c "[symbols2]" ;[symbols2]
+\c ; symbols exclude
+\c ;
+\c $var ;output (result)
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Error flag if syntax error
+\\<br\\>- Same symbol to include & to exclude = to exclude
+
+\\<b\\>Example (UpperCase):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abc 456DEF 7890|%#" "+" "" "" $R0
+\c ; $R0="123ABC 456DEF 7890|%#"
+\c SectionEnd
+
+\\<b\\>Example (LowerCase):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abc 456DEF 7890|%#" "-" "ef" "" $R0
+\c ; $R0="123abc 456dEF 7890|%#"
+\c SectionEnd
+
+\\<b\\>Example (Filter1):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abc 456DEF 7890|%#" "2" "|%" "" $R0
+\c ; $R0="abcDEF|%" ;only Letters + |%
+\c SectionEnd
+
+\\<b\\>Example (Filter2):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abc 456DEF 7890|%#" "13" "af" "4590" $R0
+\c ; $R0="123a 6F 78|%#" ;only Digits + Special + af - 4590
+\c SectionEnd
+
+\\<b\\>Example (Filter3):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abc 456DEF 7890|%#" "+12" "b" "def" $R0
+\c ; $R0="123AbC4567890" ;only Digits + Letters + b - def
+\c SectionEnd
+
+\\<b\\>Example (Filter4):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abcÀÁÂ 456DEFãäå 7890|%#" "+12rus" "ä" "ãå" $R0
+\c ; $R0="123ÀÁÂ456ä7890" ;only Digits + Letters + ä - ãå
+\c SectionEnd
+
+\\<b\\>Example (English + Russian Letters):\\</b\\>
+
+\c Section
+\c ${StrFilter} "123abcÀÁÂ 456DEFãäå 7890|%#" "2rus" "" "" $R0
+\c ; $R0="ÀÁÂãäå" ;only Russian Letters
+\c ${StrFilter} "123abcÀÁÂ 456DEFãäå 7890|%#" "2" "$R0" "" $R0
+\c ; $R0="abcÀÁÂDEFãäå" ;only English + Russian Letters
+\c SectionEnd
+
+\\<b\\>Example (Word Capitalize):\\</b\\>
+
+\c Section
+\c Push "_01-PERPETUOUS_DREAMER__-__THE_SOUND_OF_GOODBYE_(ORIG._MIX).MP3_"
+\c Call Capitalize
+\c Pop $R0
+\c ; $R0="_01-Perpetuous_Dreamer__-__The_Sound_Of_Goodbye_(Orig._Mix).mp3_"
+\c
+\c ${WordReplace} "$R0" "_" " " "+*" $R0
+\c ; $R0=" 01-Perpetuous Dreamer - The Sound Of Goodbye (Orig. Mix).mp3 "
+\c
+\c ${WordReplace} "$R0" " " "" "{}" $R0
+\c ; $R0="01-Perpetuous Dreamer - The Sound Of Goodbye (Orig. Mix).mp3"
+\c SectionEnd
+\c
+\c Function Capitalize
+\c Exch $R0
+\c Push $0
+\c Push $1
+\c Push $2
+\c
+\c ${StrFilter} '$R0' '-eng' '' '' $R0
+\c ${StrFilter} '$R0' '-rus' '' '' $R0
+\c
+\c StrCpy $0 0
+\c
+\c loop:
+\c IntOp $0 $0 + 1
+\c StrCpy $1 $R0 1 $0
+\c StrCmp $1 '' end
+\c StrCmp $1 ' ' +5
+\c StrCmp $1 '_' +4
+\c StrCmp $1 '-' +3
+\c StrCmp $1 '(' +2
+\c StrCmp $1 '[' 0 loop
+\c IntOp $0 $0 + 1
+\c StrCpy $1 $R0 1 $0
+\c StrCmp $1 '' end
+\c
+\c ${StrFilter} '$1' '+eng' '' '' $1
+\c ${StrFilter} '$1' '+rus' '' '' $1
+\c
+\c StrCpy $2 $R0 $0
+\c IntOp $0 $0 + 1
+\c StrCpy $R0 $R0 '' $0
+\c IntOp $0 $0 - 2
+\c StrCpy $R0 '$2$1$R0'
+\c goto loop
+\c
+\c end:
+\c Pop $2
+\c Pop $1
+\c Pop $0
+\c Exch $R0
+\c FunctionEnd
+
+\S1{strfilters} StrFilterS
+
+\b Same as \R{strfilter}{StrFilter}, but case sensitive.
+
+\S1{versioncompare} VersionCompare
+
+\b Compare version numbers.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${VersionCompare} "[Version1]" "[Version2]" $var
+
+\c "[Version1]" ; First version
+\c "[Version2]" ; Second version
+\c $var ; Result:
+\c ; $var=0 Versions are equal
+\c ; $var=1 Version1 is newer
+\c ; $var=2 Version2 is newer
+
+\\<b\\>Example:\\</b\\>
+
+\c Section
+\c ${VersionCompare} "1.1.1.9" "1.1.1.01" $R0
+\c ; $R0="1"
+\c SectionEnd
+
+\S1{versionconvert} VersionConvert
+
+\b Convert version in the numerical format which can be compared.
+
+\\<b\\>Syntax:\\</b\\>
+
+\c ${VersionConvert} "[Version]" "[CharList]" $var
+
+\c "[Version]" ; Version
+\c ;
+\c "[CharList]" ; List of characters, which will be replaced by numbers
+\c ; "abcdefghijklmnopqrstuvwxyz" (default)
+\c ;
+\c $var ; Result: converted version
+
+\\<b\\>Note:\\</b\\>
+\\<br\\>- Converted letters are separated with dot
+\\<br\\>- If character is non-digit and not in list then it will be converted to dot
+
+\\<b\\>Example1:\\</b\\>
+
+\c Section
+\c ${VersionConvert} "9.0a" "" $R0
+\c ; $R0="9.0.01"
+\c
+\c ${VersionConvert} "9.0c" "" $R1
+\c ; $R1="9.0.03"
+\c
+\c ${VersionCompare} "$R0" "$R1" $R2
+\c ; $R2="2" version2 is newer
+\c SectionEnd
+
+\\<b\\>Example2:\\</b\\>
+
+\c Section
+\c ${VersionConvert} "0.15c-9m" "" $R0
+\c ; $R0="0.15.03.9.13"
+\c
+\c ${VersionConvert} "0.15c-1n" "" $R1
+\c ; $R1="0.15.03.1.14"
+\c
+\c ${VersionCompare} "$R0" "$R1" $R2
+\c ; $R2="1" version1 is newer
+\c SectionEnd
+
+\\<b\\>Example3:\\</b\\>
+
+\c Section
+\c ${VersionConvert} "0.15c+" "abcdefghijklmnopqrstuvwxyz+" $R0
+\c ; $R0="0.15.0327"
+\c
+\c ${VersionConvert} "0.15c" "abcdefghijklmnopqrstuvwxyz+" $R1
+\c ; $R1="0.15.03"
+\c
+\c ${VersionCompare} "$R0" "$R1" $R2
+\c ; $R2="1" version1 is newer
+\c SectionEnd
diff --git a/Docs/src/history.but b/Docs/src/history.but
index 0420bd1..63c3acc 100755
--- a/Docs/src/history.but
+++ b/Docs/src/history.but
@@ -1,2390 +1,2436 @@
-\A{history} Changelog and Release Notes
-
-\H{v2.31} 2.31
-
-Released on September 29th, 2007
-
-\S1{v2.31-rl} Release Notes
-
-\b Please continue to report any issues and suggestions regarding \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2}. Input for the previous version was very helpful in improving MUI2.
-
-\S1{v2.31-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Added BST_* definitions to WinMessages.nsh (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1792422}{bug #1792422})
-
-\b Added \R{setregview}{SetRegView} \e{lastused}
-
-\b Minor documentation improvements
-
-\b \R{library}{Library} will now revert registry view settings (\R{setregview}{SetRegView}) after it's finished
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed empty welcome page with Chinese (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1786899}{bug #1786899})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed finish button text (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1789492}{bug #1789492})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed uninstaller comportments page text (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1793811}{bug #1793811})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed unused function warnings
-
-\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed header bitmap issues, including NOSTRETCH and compilation errors
-
-\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed language selection dialog
-
-\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed reboot finish page
-
-\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed unloading of nsDialogs on finish page
-
-\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed unused variable warnings
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Fixed command line parsing error (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1796053}{bug #1796053})
-
-\S2{} Translations
-
-\b Korean corrections
-
-\b Persian improvements (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1776386}{patch #1776386})
-
-\b Romanian improvements (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1783853}{patch #1783853})
-
-\S2{} Build System
-
-\b Fixed build failures with MinGW's GCC 4 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1800834}{bug #1800834})
-
-\H{v2.30} 2.30
-
-Released on August 25th, 2007
-
-\S1{v2.30-rl} Release Notes
-
-\b This release includes a beta of \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2}. Please report any issues and suggestions.
-
-\b The format of Modern UI language files has been modified to better support external strings. Private language files should be converted (and submitted as a \W{http://sourceforge.net/tracker/?group_id=22049&atid=373087}{patch} in the spirit of open source).
-
-\S1{v2.30-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed a bug introduced in version 2.29 that caused invalid $SMPROGRAMS value on Windows 98 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1766268}{bug #1766268})
-
-\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Simpler code, easier to extend and makes use of nsDialogs
-
-\S2{} Minor Changes
-
-\b Added InstallOptions.nsh with relevant usage macros, based on the old Modern UI macros
-
-\b Added LangFile.nsh allowing creation of langauge files that can be included with a single command with defaults for missing strings (when LANGFILE_DEFAULT is set)
-
-\b Added LB_ERR and CB_ERR to WinMessages.nsh (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1771644}{bug #1771644})
-
-\b Fixed \R{createdirectory}{CreateDirectory} logging (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1768584}{patch #1768584})
-
-\b Fixed escaping of quotes with $\\ in macros (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1713708}{bug #1713708})
-
-\b Minor documentation improvements
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.80}: New language files structure based on LangFile.nsh
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.80}: MUI_LANGDLL_DISPLAY now reads previous settings on silent installations as well
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.80}: Added MUI_CUSTOMFUNCTION_MOUSEOVERSECTION (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1762003}{patch #1762003})
-
-\S2{} Utilities and Plug-ins
-
-\b Various nsDialogs improvements including RTL support, more macros in nsDialogs.nsh and \L{../Docs/nsDialogs/Readme.html}{initial documentation}
-
-\S2{} Translations
-
-\b Catalan returns
-
-\b Danish corrections
-
-\b Slovak corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1762627}{patch #1762627})
-
-\S2{} Build System
-
-\b More HPUX fixes (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1755148}{bug #1755148}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1753063}{bug #1753063}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1758873}{bug #1758873}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1758863}{patch #1758863})
-
-\b Ignore known failing tests by default on POSIX
-
-\H{v2.29} 2.29
-
-Released on July 14th, 2007
-
-\S1{v2.29-rl} Release Notes
-
-\b The most notable addition in this release is nsDialogs - a faster and far more capable replacement for InstallOptions. It allows creating controls of any type directly from the script and removes the need to mess with slow INI files. It integrates directly into the script by calling functions for notification, including change notification for edit boxes. \W{http://nsis.sourceforge.net/Community}{Speak up} if you have any suggestions/comments/patches for it.
-
-\S1{v2.29-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added \L{../Examples/nsDialogs}{nsDialogs} - a replacement for InstallOptions
-
-\S2{} Minor Changes
-
-\b Disable Windows error messages for the entire installer and not just for an incomplete list of fail-points (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1741061}{bug #1741061})
-
-\b Fixed incorrect large version handling of \R{getfileversion}{GetFileVersion} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1742255}{bug #1742255}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1742562}{patch #1742562})
-
-\b Fixed the ReverseSection macro in Sections.nsh (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1742793}{bug #1742793})
-
-\b Minor documentation improvements
-
-\b Simplified \R{readreg_multi_sz}{REG_MULTI_SZ reader}
-
-\b Use SHGetFolderPath where available to better support all users' folders
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/Banner/Readme.txt}{Banner}: Avoid possible hangs when called from page callbacks (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1743801}{bug #1743801})
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: added /TRANSLATE2 for more "translator-friendly" strings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1656076}{patch #1656076})
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: support downloads over 2gb (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1723131}{patch #1723131})
-
-\S2{} Translations
-
-\b Added International Spanish
-
-\S2{} Build System
-
-\b Added support for HPUX (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1714416}{patch #1714416})
-
-\H{v2.28} 2.28
-
-Released on June 8th, 2007
-
-\S1{v2.28-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added a workaround for a Windows 2000 bug that caused infinite loops when hitting a key in the instilfes page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1733692}{bug #1733692})
-
-\S2{} Minor Changes
-
-\b Improved compiler error strings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1722147}{patch #1722147})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_STARTMENUPAGE_BGCOLOR and MUI_DIRECTORYPAGE_BGCOLOR (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1706187}{patch #1706187})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_LANGDLL_ALLLANGUAGES that forces the language selection dialog to display all languages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1724876}{patch #1724876})
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions}: corrected documentation of TxtColor (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1716614}{bug #1716614})
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: added compatibility with some buggy servers that don't close the connection (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1713562}{bug #1713562})
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: fixed 100% CPU usage during domain resolution (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1713560}{bug #1713560})
-
-\S2{} Translations
-
-\b Valencian and Catalan are no longer installed (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1558822}{patch #1558822})
-
-\S2{} Build System
-
-\b Added IGNORETESTS for ignoring certain test files
-
-\b Added wxWidgets to the requirement list
-
-\b \L{../Docs/System/System.html}{System} now builds with GCC, but without System::Get and System::Call (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1711089}{patch #1711089})
-
-\H{v2.27} 2.27
-
-Released on May 5th, 2007
-
-\S1{v2.27-rl} Release Notes
-
-\b This is a quick-fix release that addresses a bug introduced in the last version, 2.26, that caused $PROGRAMFILES and $COMMONFILES to translate into random strings in the uninstaller.
-
-\S1{v2.27-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed a bug introduced in 2.26 that made $PROGRAMFILES and $COMMONFILES unavailable in the uninstaller
-
-\S2{} Minor Changes
-
-\b Disable the X button on InstallOptions pages when CancelEnabled is 0
-
-\b Fixed incomplete MessageBox usage line (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1709460}{bug #1709460})
-
-\S2{} Build System
-
-\b Added \c{TOOLSET} option to allow selection of specific build tools (e.g. \c{scons TOOLSET=mingw})
-
-\H{v2.26} 2.26
-
-Released on April 27th, 2007
-
-\S1{v2.26-rl} Release Notes
-
-\b Installation on x64 systems is now fully supported with $PROGRAMFILES64, \R{setregview}{SetRegView} and \R{library}{Library}'s LIBRARY_X64 option.
-
-\S1{v2.26-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added LIBRARY_X64 option for \R{library_install}{InstallLib} and \R{library_uninstall}{UnInstallLib} for installing and uninstalling x64 libraries
-
-\b Added \R{varconstant}{$PROGRAMFILES32}, \R{varconstant}{$PROGRAMFILES64}, \R{varconstant}{$COMMONFILES32} and \R{varconstant}{$COMMONFILES64}
-
-\S2{} Minor Changes
-
-\b Added \R{varconstant}{$EXEPATH} and \R{varconstant}{$EXEFILE}
-
-\b Added $(^Language) language string which holds the language name (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1235616}{RFE #1235616})
-
-\b Added LIBRARY_IGNORE_VERSION option for \R{library_install}{InstallLib} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1699435}{patch #1699435})
-
-\b Added VXD support for \R{getdllversionlocal}{GetDLLVersionLocal} on Windows NT/2000/XP/Vista (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1706624}{patch #1706624})
-
-\b Avoid \R{library}{Library} warning when UnInstallLib is unused (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1692761}{bug #1692761})
-
-\b Fixed error handling of \R{copyfiles}{CopyFiles} on Windows NT4 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=774966}{bug #774966})
-
-\b Fixed font name encoding broken since 2.24
-
-\b Fixed \L{../Examples/LogicLib.nsi}{LogicLib} duplicate labels across included files
-
-\b Fixed preservation of folder attributes with \c{\R{file}{File} /a} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1699474}{bug #1699474})
-
-\b Improved unused variable warning (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1701050}{bug #1701050})
-
-\b \R{library}{Library} macros no longer require version information for DLL files on POSIX
-
-\b Minor documentation improvements (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=971467}{RFE #971467})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_FINISHPAGE_CANCEL_ENABLED
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_FINISHPAGE_REBOOTLATER_DEFAULT (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1143843}{RFE #1143843})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: block unsupported languages in the language selection dialog (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1564986}{RFE #1564986})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: disable Cancel button on the finish page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1267491}{bug #1267491})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: reduce flicker caused by MUI_HEADER_TRANSPARENT_TEXT (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1696610}{patch #1696610})
-
-\b Support \R{quit}{Quit} in \R{pagecallbacks_explain}{show page functions}
-
-\S2{} New/Changed Commands
-
-\b Added \R{setregview}{SetRegView} to allow access to the x64 registry view
-
-\b Installer icon support for \R{messagebox}{MessageBox} using MB_USERICON (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1682748}{patch #1682748}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1530388}{RFE #1530388})
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.47}: line breaks support in Link controls (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1683186}{patch #1683186}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1495949}{RFE #1495949}), added HLine and VLine controls (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1683189}{patch #1683189})
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: fixed broken command line parameter handling introduced in the last version (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1696534}{bug #1696534})
-
-\b \L{../Examples/UserInfo/UserInfo.nsi}{UserInfo}: return effective user group on Vista, added GetOriginalAccountType (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1687456}{patch #1687456}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1684777}{bug #1684777})
-
-\S2{} Translations
-
-\b Added Afrikaans translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1699558}{patch #1699558})
-
-\b French corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1676101}{patch #1676101})
-
-\b German corrections
-
-\S2{} Build System
-
-\b Added SKIPTESTS option
-
-\b Avoid a lot of code warnings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1676243}{bug #1676243})
-
-\b Detect wxWidgets instead of assuming its existence on POSIX (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1672315}{bug #1672315})
-
-\b Fixed big-endian platform support broken since 2.24
-
-\H{v2.25} 2.25
-
-Released on March 31st, 2007
-
-\S1{v2.25-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added \L{../Include/Memento.nsh}{Memento.nsh} for easy persistency of user selections across different runs of the installer (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1677624}{RFE #1677624})
-
-\b Fixed a bug introduced in 2.24 that allowed the license page to be skipped even with agreement check box or radio buttons (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1664428}{bug #1664428})
-
-\S2{} Minor Changes
-
-\b Added Vista manifest to StartMenu.nsi example to avoid backward compatibility mode that moves shortcuts (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1664957}{bug #1664957})
-
-\b Both dashes and slashes are supported as switch prefixes on makensis.exe (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1661503}{bug #1661503})
-
-\b Delete uninstaller temporary directory on reboot (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1660626}{patch #1660626})
-
-\b Distribute \L{../Examples/Plugin}{Plug-in example} with the NSIS package and not only with the source code
-
-\b Fixed lossy Unicode conversion of dialog template strings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1662190}{bug #1662190})
-
-\b Fixed \L{../Include/Sections.nsh}{Sections.nsh} macros support for $0 as input (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1664648}{bug #1664648})
-
-\b Fixed uninstallers support for the /D= command line switch
-
-\b Improved logging of WriteReg commands
-
-\b Minor documentation updates and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1662419}{patch #1662419})
-
-\S2{} New/Changed Commands
-
-\b Added bitwise operators support for \R{define}{!define} /math (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1669513}{RFE #1669513})
-
-\b \R{scopepredefines}{__PAGEEX__} contains the page type (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1644712}{patch #1644712})
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.46}: Use installer's name for message boxes (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1661677}{bug #1661677})
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Use Escape button to close (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1666501}{RFE #1666501})
-
-\b \L{../Docs/Math/Math.txt}{Math}: Removed mathcrt.lib
-
-\b \L{../Docs/StartMenu/Readme.txt}{StartMenu}: Refuse empty paths (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1684751}{bug #1684751})
-
-\S2{} Translations
-
-\b Fixed Galician language files (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1663795}{bug #1663795})
-
-\S2{} Build System
-
-\b Added APPEND_LIBPATH and APPEND_CPPATH instead of the malfunctioning CPPPATH and LIBPATH
-
-\b Added ChangeLog to source code package (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1680508}{patch #1680508})
-
-\b Avoid some warnings on VS2005 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1667950}{patch #1667950})
-
-\b Fixed lzma test segfault on POSIX (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1666873}{bug #1666873})
-
-\b More strict-aliasing compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1635841}{bug #1635841})
-
-\b NSIS Menu finally built from source
-
-\H{v2.24} 2.24
-
-Released on February 17th, 2007
-
-\S1{v2.24-cl} Changelog
-
-\S2{} Major Changes
-
-\b \R{library}{Library} uninstall-reinstall-reboot problems workaround (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1097642}{bug #1097642})
-
-\b Minimized number of cases where an error message appears in silent mode
-
-\b New compiler predefines for \R{scopepredefines}{code scope} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1644712}{patch #1644712})
-
-\S2{} Minor Changes
-
-\b Added \R{usagereference}{/P command line option} for setting process priority of makensis (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1638974}{patch #1638974})
-
-\b Added support for 64-bit PE on POSIX to \R{getdllversionlocal}{GetDLLVersionLocal} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1643633}{patch #1643633})
-
-\b Append last part of \R{ainstalldir}{InstallDir} only to $INSTDIR on directory pages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1174184}{bug #1174184})
-
-\b Avoid permissions change of output files for \R{linefind}{LineFind} and \R{filejoin}{FileJoin} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1631773}{bug #1631773})
-
-\b Fixed erroneous warnings on uninstall sections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1631889}{bug #1631889})
-
-\b Fixed lossy Unicode conversion in resource editor (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1083492}{bug #1083492})
-
-\b Ignore invalid preprocessor commands in ignored block or comments
-
-\b Made \R{viaddversionkey}{VIAddVersionKey} only query language tables instead of creating them and generating warnings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1626504}{bug #1626504})
-
-\b Minor documentation updates and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1642107}{bug #1642107}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1649187}{patch #1649187})
-
-\b Warn when continuing a comment line using backslash (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1554178}{bug #1554178})
-
-\S2{} New/Changed Commands
-
-\b \R{regdll}{RegDLL} and \R{unregdll}{UnregDLL} now use LOAD_WITH_ALTERED_SEARCH_PATH, so there's no need to use \R{setoutpath}{SetOutPath} to set the working directory (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1638191}{bug #1638191})
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.45}: Added FOCUS flag (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1634704}{patch #1634704}) and fixed paste with ONLY_NUMBERS flag (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1652075}{bug #1652075})
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: settings in HKCU instead of HKLM (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1411970}{bug #1411970}) and MRU menu accelerators
-
-\S2{} Translations
-
-\b Added Galician translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1631765}{patch #1631765})
-
-\S2{} Build System
-
-\b Added a workaround for building on x64 POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1646170}{bug #1646170})
-
-\b Added a workaround for strict-aliasing compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1635841}{bug #1635841})
-
-\b Added compression tests
-
-\b Added STRIP, APPEND_CCFLAGS and APPEND_LINKFLAGS build options
-
-\b Fixed SCons 0.96.94 compatibility
-
-\H{v2.23} 2.23
-
-Released on January 13th, 2007
-
-\S1{v2.23-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Fixed compiler crash on Mac OS X (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1611866}{patch #1611866})
-
-\b Fixed deletion of start menu icons in NSIS installer on Vista (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1611251}{bug #1611251})
-
-\S2{} Utilities and Plug-ins
-
-\b Fixed incorrect \L{../Docs/nsExec/nsExec.txt}{nsExec} message handling in silent mode (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1605581}{bug #1605581})
-
-\b Fixed \L{../Docs/System/System.html}{System} crash when System::Store is called on an empty private stack (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1620178}{bug #1620178})
-
-\b Fixed \L{../Docs/System/System.html}{System} crash with parenthesis in filename (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1616267}{bug #1616267})
-
-\b Minor VPatch documentation enhancements (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1624292}{patch #1624292})
-
-\S2{} Build System
-
-\b Fixed build failures on mingw32 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1610773}{bug #1610773})
-
-\b Fixed build problems with MSTOOLKIT=yes
-
-\H{v2.22} 2.22
-
-Released on November 27th, 2006
-
-\S1{v2.22-rl} Release Notes
-
-\b Some changes have been made to the credit and license files in order to avoid copyrights and license related confusions. This does not change in any way how NSIS should or could be used. NSIS itself is still licensed with the permissive BSD-like \W{http://nsis.sourceforge.net/License}{zlib license}.
-
-\b Upgrade is recommended for early adopters of WinVer.nsh, due to a bug in Windows 98 and ME detection.
-
-\S1{v2.22-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Fixed context menu not disappearing when moving from instfiles page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1115825}{bug #1115825})
-
-\b Fixed \L{../Include/WinVer.nsh}{WinVer.nsh}'s detection of Windows 98 and ME (reported on the \W{http://forums.winamp.com/showthread.php?s=&threadid=257994&highlight=winver.nsh}{forum})
-
-\b Fixed WriteUninstaller failure to overwrite read-only uninstallers (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1542530}{bug #1542530})
-
-\b Licensed lzma under \R{cpl-license}{CPL} with a \R{lzma-special-exception}{special exception}, instead of LGPL
-
-\b Minor documentation updates and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1584618}{bug #1584618}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1589877}{bug #1589877})
-
-\b Updated comments in MUI examples (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1595500}{bug #1595500})
-
-\S2{} New/Changed Commands
-
-\b Added `highest` option for \R{requestexecutionlevel}{RequestExecutionLevel}
-
-\S2{} Translations
-
-\b Added Uzbek translation
-
-\b Fixed corruption in Lithuanian (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1602673}{bug #1602673})
-
-\b Minor Breton fixes
-
-\b Slovenian corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1590108}{patch #1590108})
-
-\S2{} Build System
-
-\b Added \W{http://msdn.microsoft.com/vstudio/express/visualc/}{Microsoft Visual C++ 2005 Express} support
-
-\b SCons requirement upgraded to 0.96.93
-
-\H{v2.21} 2.21
-
-Released on October 20th, 2006
-
-\S1{v2.21-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added \L{../Include/WinVer.nsh}{WinVer.nsh} for easy Windows version comparisons
-
-\b Upgraded to lzma sdk 4.43 for faster compression
-
-\S2{} Minor Changes
-
-\b Added Vista support to \R{getwindowsversion}{GetWindowsVersion}
-
-\b Added \L{../Include/x64.nsh}{x64.nsh} including a few simple macros for handling x64 installations
-
-\b Fixed a handle leak in \R{locate}{Locate}
-
-\b Minor documentation updates and fixes
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.76}: Added MUI_ABORTWARNING_CANCEL_DEFAULT (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1547844}{RFE #1547844})
-
-\S2{} New/Changed Commands
-
-\b Added \R{requestexecutionlevel}{RequestExecutionLevel} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1524709}{RFE #1524709})
-
-\S2{} Translations
-
-\b Added Valencian translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1558822}{patch #1558822})
-
-\b Bulgarian corrections
-
-\b Slovenian corrections
-
-\S2{} Build System
-
-\b SCons requirement upgraded to 0.96.92
-
-\H{v2.20} 2.20
-
-Released on September 9th, 2006
-
-\S1{v2.20-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Better LogicLib errors (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1537976}{bug #1537976})
-
-\b Fixed incomplete plug-in call error messages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535995}{bug #1535995})
-
-\b Fixed incorrect file timestamp querying on big-endian platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1536377}{bug #1536377})
-
-\b Minor documentation updates and fixes
-
-\S2{} Translations
-
-\b Danish corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1548190}{bug #1548190})
-
-\b Fixed incorrectly encoded Turkish translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1542765}{bug #1542765})
-
-\b French corrections
-
-\b Italian corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1546183}{bug #1546183})
-
-\b Spanish corrections
-
-\b Swedish corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1542680}{bug #1542680})
-
-\b Ukrainian corrections
-
-\S2{} Build System
-
-\b Fixed NSIS_CONFIG_CONST_DATA_PATH being ignored on POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1515592}{bug #1515592})
-
-\H{v2.19} 2.19
-
-Released on August 6th, 2006
-
-\S1{v2.19-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Fixed \R{system}{!system} and \R{packhdr}{!packhdr} failure with quoted long file names (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1509909}{bug #1509909})
-
-\b Fixed build problems on 64bit platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504772}{bug #1504772})
-
-\b Fixed negative total size for data larger than 2GB in script compilation summary (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1468852}{bug #1468852})
-
-\b Minor documentation updates and fixes
-
-\b Replaced \R{detect.netframework}{IsDotNETInstalled} with a simpler and better version
-
-\S2{} New/Changed Commands
-
-\b Made \R{if}{!if} compare strings case insensitively, like \R{strcmp}{StrCmp} and \R{ifdef}{!ifdef}
-
-\S2{} Plug-ins
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: fixed random DNS errors (\W{http://forums.winamp.com/showthread.php?s=&threadid=247723}{reported in the forums})
-
-\b \L{../Docs/System/System.html}{System}: fixed a bug that caused stack corruption and stopped the installer from deleting System.dll when a function with no arguments was called (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535005}{bug #1535005})
-
-\b \L{../Docs/System/System.html}{System}: fixed wrong return values for functions that return \c{short} or \c{char} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535007}{bug #1535007})
-
-\S2{} Translations
-
-\b Added Norwegian Nynorsk translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1503208}{patch #1503208})
-
-\b Fixed typos in the French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1531874}{bug #1531874})
-
-\H{v2.18} 2.18
-
-Released on July 1st, 2006
-
-\S1{v2.18-cl} Changelog
-
-\S2{} Minor Changes
-
-\b CRC32 implementation used potentially non-32bit types (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504758}{bug #1504758})
-
-\b Fixed errors on multiple inclusion of \R{headers}{useful headers}
-
-\b Fixed \R{getfileattributes}{GetFileAttributes}
-
-\b Fixed incorrect text on browse dialog with \R{onverifyinstdir}{.onVerifyInstDir} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504297}{bug #1504297})
-
-\b Fixed \R{library}{Library}'s implementation on POSIX
-
-\b Minor documentation updates and fixes
-
-\S2{} Translations
-
-\b Added Irish translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1503639}{patch #1503639})
-
-\b Catalan corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504104}{bug #1504104})
-
-\b Dutch corrections
-
-\b Finnish corrections (Mozilla bug #341643)
-
-\b Fixed Serbian grammar and typos
-
-\b Italian corrections (Mozilla bug #340450)
-
-\b Polish corrections (Mozilla bug #224532)
-
-\b Portuguese (Brazil) corrections (Mozilla bug #340885)
-
-\b Romanian corrections (Mozilla bug #340645)
-
-\b Thai corrections
-
-\b Turkish corrections (Mozilla bug #340511)
-
-\H{v2.17} 2.17
-
-Released on May 19th, 2006
-
-\S1{v2.17-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Fixed build failures and segfaults on PowerPC Mac OS X (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1474597}{bug #1474597}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1481044}{bug #1481044})
-
-\b Fixed \R{library}{Library}'s TLB version interpretation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1471341}{bug #1471341})
-
-\b Fixed possible stack corruption when using TypeLib.dll on an invalid TLB
-
-\b Fixed RMDir deletion failure of read-only folders (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1481664}{bug #1481664})
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Fixed toolbar compressor selection menu, broken in the previous version (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1466486}{bug #1466486})
-
-\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1469306}{bug #1469306}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1491616}{bug #1491616})
-
-\S2{} Translations
-
-\b Added missing Basque and Welsh files (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1469471}{bug #1469471})
-
-\b Brazilian Portuguese updates
-
-\b Bulgarian fixes
-
-\b Fixed a typo in Hebrew translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1474587 }{bug #1474587})
-
-\b Icelandic fixes and improvements
-
-\H{v2.16} 2.16
-
-Released on April 7th, 2006
-
-\S1{v2.16-rn} Release Notes
-
-\b The script compiler, makensis, builds and works on big-endian platforms. This change enlarges the portability range of NSIS to theoretically every POSIX platform. Please \W{http://sourceforge.net/tracker/?group_id=22049&atid=373085}{report} any incompatibility with specific platforms or build-tools.
-
-\b The internal changes made to support big-endian platforms also pave the road to x64 installers. There is now a central function which writes data to disk. This function currently only converts the endianity of integers, but it can be changed to selectively write 64-bit integers. Hopefully, there'll soon be a simple method of compiling a script to both x86 and x64 installers.
-
-\b Changing Source/exehead/fileform.h to alter the internal structure of installers is no longer enough. The compiler has its own definitions of the structures which must also be changed in Source/fileform.cpp. In the future, fileform.cpp should be automatically generated from fileform.h, but for now, the synchronization must be done manually.
-
-\S1{v2.16-cl} Changelog
-
-\S2{} Major Changes
-
-\b Big-endian platforms are now fully supported by makensis
-
-\b \R{library}{Library} now available on non-Windows platforms as well, although it requires the installed DLL to have version information
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW 2.1}: added "Cancel compilation" menu item
-
-\S2{} New/Changed Commands
-
-\b Added /utcdate switch to \R{define}{!define} for UTC dates (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1459210}{RFE #1459210})
-
-\S2{} Minor Changes
-
-\b Added an optional timestamp in the log - NSIS_CONFIG_LOG_TIMESTAMP build setting (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1460586}{RFE #1460586})
-
-\b Added NSIS_WIN32_MAKENSIS define, defined only when compiling on Windows
-
-\b Exported validate_filename to plug-ins
-
-\b Fixed a crash in CResourceEditor when adding resources to a PE that already contains named resources
-
-\b Fixed a small resource leak in the TypeLib::GetLibVersion plug-in function
-
-\b Fixed CResourceEditor input sanity checks
-
-\b Fixed incorrect \R{FileOpen}{FileOpen} input validation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1459789}{bug #1459789})
-
-\b Fixed \R{library}{Library} failure with DLLs marked as read-only
-
-\b Fixed lzma's POSIX implemention thread synchronization issues and resource leaks
-
-\b Fixed makensis self-path detection on non-Windows platforms (NSIS_CONFIG_CONST_DATA_PATH=no)
-
-\b Fixed replace_icon and and generate_uninstall_icon_data icon validation
-
-\b Made external CHM links safer to script exceptions (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1449879}{bug #1449879})
-
-\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1077439}{bug #1077439}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1448374}{bug #1448374}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1464446}{RFE #1464446})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.75}: added show function for the start menu page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1448176}{RFE #1448176}), added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1447766}{RFE #1447766})
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: better header detection for better compatibility with proxies like WinProxy (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1445735}{bug #1445735}), fail if no headers are sent, faster downloads (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1465378}{patch #1465378})
-
-\b \L{../Docs/StartMenu/Readme.txt}{StartMenu}: validate user input (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1440636}{bug #1440636})
-
-\S2{} Translations
-
-\b Added Basque translation
-
-\b Minor Slovenian fixes
-
-\S2{} Build System
-
-\b Added code tests for CResourceEditor and CDialogTemplate
-
-\b Automatically pass build settings to script, eliminating the need to edit build.cpp for new settings
-
-\b Fixed $PREFIX expansion during installation on POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1456943}{bug #1456943})
-
-\b Fixed CHM dependencies
-
-\b Fixed compatibility issue with EclipseNSIS (version wasn't prefixed with 'v')
-
-\b Fixed GCC 4.1 compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1456861}{patch #1456861})
-
-\b Test for -Wl,-Map availability
-
-\H{v2.15} 2.15
-
-Released on March 4th, 2006
-
-\S1{v2.15-cl} Changelog
-
-\S2{} New/Changed Commands
-
-\b Added \R{if}{!if} for more complex compile-time flow control (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1412982}{patch #1412982})
-
-\b Added /math switch to \R{define}{!define} for simple compile-time mathematical operations (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1372561}{patch #1372561})
-
-\S2{} Minor Changes
-
-\b Added more replacement options to \R{wordreplace}{WordReplace}
-
-\b Added NSIS_CONFIG_LOG_STDOUT configuration option for logging to stdout
-
-\b Added path translation for \R{addincludedir}{!addincludedir} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1431958}{bug #1431958})
-
-\b \R{configread}{ConfigRead} now sets the error flag, if the entry wasn't found
-
-\b Documented \R{nop}{Nop}
-
-\b Edit box in the installation directory selection page is now always LTR, even for RTL languages
-
-\b Fixed improper iterator usage in dir_reader (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1431593}{bug #1431593})
-
-\b Fixed \c{\R{messagebox}{MessageBox} MB_TOPMOST} not showing up, if used as the first sections' instruction (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1400995}{bug #1400995})
-
-\b Fixed \R{rmdir}{RMDir} skipping files with names starting with two dots (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1420657}{bug #1420657})
-
-\b \R{getoptions}{GetOptions} now sets the error flag, if the option wasn't found
-
-\b Made \R{include}{!include} stop searching the include directories after a match is found (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1441877}{bug #1441877})
-
-\b Made \R{headers}{header functions} use /NOUNLOAD for faster plug-in calls
-
-\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1420352}{bug #1420352}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1432423}{bug #1432423})
-
-\b More informative \R{aicon}{Icon} error messages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1174742}{bug #1174742})
-
-\b New case sesnsitive functions in headers: \R{wordfinds}{WordFindS}, \R{wordfind2xs}{WordFind2XS}, \R{wordfind3xs}{WordFind3XS}, \R{wordreplaces}{WordReplaceS}, \R{wordadds}{WordAddS}, \R{wordinserts}{WordInsertS}, \R{strfilters}{StrFilterS}, \R{textcompares}{TextCompareS}, \R{configreads}{ConfigReadS}, \R{configwrites}{ConfigWriteS}, \R{getoptionss}{GetOptionsS}
-
-\S2{} Translations
-
-\b Added proper language identifier for Breton
-
-\b Breton translation improvements
-
-\b Bulgarian translation improvements
-
-\b Fixed Czech grammer mistakes (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1427189}{patch #1427189})
-
-\b Fixed Italian typo (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1416988}{patch #1416988})
-
-\b Updated Mongolian
-
-\S2{} Build System
-
-\b Fixed __BIG_ENDIAN__ definition
-
-\b Fixed improper handling of paths passed to the compiler (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1434215}{bug #1434215})
-
-\b Improved GCC 4.2 compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1434174}{patch #1434174})
-
-\b Moved NSIS_VARS_SECTION from config.h to scons
-
-\b Write all configuration to sconf.h instead of passing it on the command line
-
-\H{v2.14} 2.14
-
-Released on January 24th, 2006
-
-\S1{v2.14-rn} Release Notes
-
-\b This release fixes a critical bug that caused installers using plug-ins to fail loading on Windows 9x and NT. Upgrading from 2.13 is highly recommended.
-
-\S1{v2.14-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed a bug that corrupted $TEMP under Windows 9x and NT and caused InitPluginsDir to fail (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1412159}{bug #1412159})
-
-\S2{} Minor Changes
-
-\b Fixed a possible buffer overflow caused by long values of $0, when using large NSIS_MAX_STRLEN builds (above 4096)
-
-\H{v2.13} 2.13
-
-Released on January 21st, 2006
-
-\S1{v2.13-rn} Release Notes
-
-\b Language detection has changed. The default language is now set to the user's user-interface language instead of the locale language, as suggested by \W{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_0xrn.asp}{MSDN}. To restore the old behavior, use \c{System::Call "kernel32::GetUserDefaultLangID()i.a"} in \R{oninit}{.onInit}.
-
-\S1{v2.13-cl} Changelog
-
-\S2{} Major Changes
-
-\b Default $LANGUAGE value is now based on user's UI language instead of locale (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1324734}{bug #1324734})
-
-\S2{} New/Changed Commands
-
-\b Added \R{strcmps}{StrCmpS} for case sensitive string comparison (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1381929}{patch #1381929})
-
-\S2{} Minor Changes
-
-\b Added system time support to \R{filefunc}{GetTime}
-
-\b Fixed components page checkbox redraw problem under Windows 95 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1397031}{bug #1397031})
-
-\b Fixed constant maximum string length in \R{FileRead}{FileRead} (changed from 1024 to NSIS_MAX_STRLEN)
-
-\b Fixed empty $INSTDIR value in directory page show callback function (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1209843}{bug #1209843})
-
-\b Fixed relative jumps ignoring \c{\R{file}{File} /nonfatal} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1299100}{bug #1299100})
-
-\b Fixed typo in NSIS Menu (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1387748}{bug #1387748})
-
-\b Issue a warning when \c{\R{abrandingtext}{BrandingText} /TRIM*} actually expands the label (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1362443}{bug #1362443})
-
-\b Made \c{\R{rmdir}{RMDir} /r} remove Unicode paths as well using short names (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1378785}{bug #1378785})
-
-\b Minor documentation improvements and fixes
-
-\S2{} Utilities and Plug-ins
-
-\b Fixed System plug-in \L{../Docs/System/System.html}{documentation} of callback functions (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1403608}{bug #1403608})
-
-\b Fixed System plug-in heap corruption (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1403601}{bug #1403601})
-
-\S2{} Translations
-
-\b Mongolian translation improvements
-
-\S2{} Build System
-
-\b Better installation under POSIX with proper $\{NSISDIR\} detection and appropriate directory paths (/usr/bin, /usr/share/doc, etc.)
-
-\H{v2.12} 2.12
-
-Released on December 17th, 2005
-
-\S1{v2.12-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed compile-time assertion failure for big uninstallers (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1380447}{bug #1380447})
-
-\b \R{tutorial}{Tutorial} enhancements (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1366431}{bug #1366431})
-
-\S2{} New/Changed Commands
-
-\b Added /NONFATAL switch to \R{include}{!include} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1372048}{patch #1372048})
-
-\S2{} Minor Changes
-
-\b Clearer error message for double label definition (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1374675}{patch #1374675})
-
-\b Fixed browsed network root directory not being accepted (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1331292}{bug #1331292})
-
-\b Fixed incorrect \R{acompletedtext}{CompletedText} parsing (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349810}{bug #1349810})
-
-\b Fixed sdbarker_tiny.exe's compatibility with NSIS_CONFIG_LOG (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1365869}{bug #1365869})
-
-\b Implemented nicer registry commands log (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1340255}{patch #1340255})
-
-\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1355653}{patch #1355653}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349810}{bug #1349810})
-
-\b Multi-line comments are no longer ignored inside !ifdef'd block
-
-\S2{} Utilities and Plug-ins
-
-\b Added drag & drop support for zip2exe
-
-\b Better drag & drop error handling in MakeNSISw
-
-\b Fixed Math plug-in array issues (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1235875}{bug #1235875})
-
-\S2{} Translations
-
-\b Added browse button Danish translation
-
-\b Breton translation fixes and improvements
-
-\b Fixed finish button Swedish translation
-
-\S2{} Build System
-
-\b Fixed endianess detection problem on POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1370179}{bug #1370179})
-
-\b Generated installers use nsis-VERSION-setup.exe template
-
-\H{v2.11} 2.11
-
-Released on November 12th, 2005
-
-\S1{v2.11-rl} Release Notes
-
-\b Rebuilding existing installers that use \c{\R{asetoverwrite}{SetOverwrite} ifdiff}, might falsely overwrite files once
-
-\S1{v2.11-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added a workaround for a bug that prevented detection of some special folders (e.g. \R{varother}{$DESKTOP} for all users) on Windows 9x (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1008632}{bug #1008632})
-
-\b Fixed a crash caused by copying very long details to clipboard in the installation log page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1314004}{bug #1314004})
-
-\S2{} New/Changed Commands
-
-\b Added \R{tempfile}{!tempfile}, \R{delfile}{!delfile} and \R{appendfile}{!appendfile} for cross-platform handling of text files during compilation
-
-\b Fixed \R{achangeui}{ChangeUI} input handling (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1348473}{patch #1348473})
-
-\b \R{ssectionin}{SectionIn} RO is no longer case sensitive
-
-\S2{} Minor Changes
-
-\b Added support URL to the NSIS package entry in the Add/Remove control panel (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1349867}{RFE #1349867})
-
-\b Fixed comment handling (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1324898}{patch #1324898})
-
-\b Fixed duplicate RegTool test in \R{library}{Library}
-
-\b Fixed invalid language selection according to \R{varother}{$LANGUAGE} in \R{oninit}{.onInit} when only primary language match is found (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1328629}{bug #1328629})
-
-\b Fixed missing RegTool error after install-reboot-install-reboot sequence with \R{library}{Library}
-
-\b Fixed portability issues with \L{../Examples/LogicLib.nsi}{LogicLib} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1320297}{bug #1320297}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1248336}{patch #1248336})
-
-\b Fixed \c{\R{asetoverwrite}{SetOverwrite} ifdiff} always overwriting on FAT file system (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1338423}{bug #1338423})
-
-\b Fixed wrong size of red.bmp check box image
-
-\b Larger browse button for localized texts (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1314682}{bug #1314682})
-
-\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349810}{bug #1349810})
-
-\b Sort language names in language selection dialog
-
-\b Use the temporary directory for \R{library}{Library} temporary files, instead of the possibly write-protected installation directory
-
-\S2{} Utilities and Plug-ins
-
-\b Added /OEM switch for OEM to ANSI conversion in \L{../Docs/nsExec/nsExec.txt}{nsExec} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1346737}{patch #1346737})
-
-\b Added /PROXY switch for manual proxy configuration in \L{../Docs/NSISdl/ReadMe.txt}{NSISdl} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1334166}{patch #1334166})
-
-\b Added solid compression check box to zip2exe (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1334155}{patch #1334155})
-
-\b Added stdin in MakeNSISw to allow xcopy to run
-
-\b Added timestamp handling to zip2exe (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349853}{bug #1349853})
-
-\b Fixed input validation of \L{../Docs/nsExec/nsExec.txt}{nsExec}
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.44}: Added HWND and HWND2 entries to the INI file to avoid messy calculations of the correct control id
-
-\S2{} Translations
-
-\b Slovenian translation fixes and improvements
-
-\S2{} Build System
-
-\b Added a workaround for linking errors caused by a bad library included in recent Platform SDK versions
-
-\b Check for and use -pthread linker flag
-
-\b Improved FreeBSD portability
-
-\b Nicer error message for SCons version older than 0.96.90
-
-\H{v2.10} 2.10
-
-Released on October 4th, 2005
-
-\S1{v2.10-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added auto completion to the directory page
-
-\b Fixed a bug, introduced in 2.09, that caused \R{aallowrootdirinstall}{AllowRootDirInstall} to fail
-
-\b Fixed a thread leak in the POSIX implementation of LZMA
-
-\b \L{../Docs/VPatch/Readme.html}{VPatch 3.1}: MD5 checksums, better performance, and some bug fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1219806}{bug #1219806})
-
-\S2{} Minor Changes
-
-\b Added rounding of required and available size on the directory page (1.59 => 1.6 instead of 1.5)
-
-\b Added WS_EX_LEFTSCROLLBAR style in RTL mode (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1283528}{bug #1283528})
-
-\b Fixed alteration of the working directory by FileRequest in InstallOptions (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1287731}{bug #1287731})
-
-\b Fixed bad mnemonic key in MakeNSISw menu (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1288159}{bug #1288159})
-
-\b Fixed negative size values showing up after the decimal point in the directory page for very big sizes
-
-\b Minor documentation improvements and fixes
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.74}: Fixed compile error when checkboxes are used on multiple finish pages
-
-\S2{} Translations
-
-\b Fixed a bug in Slovenian translation that caused lots of missing language string warnings
-
-\b Fixed typos in Serbian translation
-
-\b Fixed typos in Thai translation
-
-\b Updated Simple Chinese translation
-
-\S2{} Build System
-
-\b Automatic fix for \W{http://forums.winamp.com/showthread.php?s=&threadid=179848}{VC6 SP6 compile error}
-
-\b Moved most of the configuration from config.h to the build system
-
-\b Removed all optimizations and symbol stripping in debug mode
-
-\b SCons requirement updated to 0.96.91
-
-\b VPatch can be built on POSIX as well
-
-\H{v2.09} 2.09
-
-Released on August 26th, 2005
-
-\S1{v2.09-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed a bug introduced in 2.08, that prevented uninstallers from deleting $INSTDIR
-
-\b Fixed a bug that caused "C:\\ " to be considered a valid installation directory, even without \R{aallowrootdirinstall}{AllowRootDirInstall}
-
-\S2{} New/Changed Commands
-
-\b \R{var}{Var} can now be used in sections and functions, but only with the /GLOBAL flag
-
-\S2{} Minor Changes
-
-\b Applied \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1248335}{patch #1248335} for greater portability of examples
-
-\b \R{filefunc}{FileFunc}: workaround for GetLongPathName which is not available on Windows 95 (Instructor)
-
-\b Fixed an unused label warning in \R{library}{Library}
-
-\b Fixed duplicate label errors in \L{../Examples/LogicLib.nsi}{LogicLib} and \R{library}{Library} when used in different files (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1243865}{bug #1243865})
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.73}: fixed checkboxes on uninstaller finish page or multiple finish pages
-
-\b \R{wordfunc}{WordFunc}: fixed incorrect replacement of first word in WordReplace, under some conditions (Instructor)
-
-\S2{} Translations
-
-\b Renamed Malaysian to Malay
-
-\b Update Thai translation to the latest version
-
-\b Updated Kurdish MUI translation to the latest version
-
-\S2{} Build System
-
-\b Fixed a number of build problems on POSIX platforms which caused plug-ins to malfunction and installers to crash
-
-\H{v2.08} 2.08
-
-Released on July 23rd, 2005
-
-\S1{v2.08-rn} Release Notes
-
-\b The Archive has been replaced with a \W{http://nsis.sourceforge.net/wiki/}{Wiki}. The new Wiki allows everyone to edit all pages so there's no longer need to hunt for the original author. It also allows everyone to upload plug-ins and not just administrators. And as if that's not enough, it looks better and provides easier and more feature-rich syntax.
-
-\S1{v2.08-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added Instructor's \R{headers}{header files of useful functions}
-
-\b \R{library}{Library} improvements: ordered registration after reboot, smaller RegTool and separate process for each registration to avoid conflicts (thanks stb)
-
-\S2{} Minor Changes
-
-\b Added Bosnian and Kurdish translations
-
-\b Added per-user nsisconf.nsh file in %APPDATA% or $HOME, depending on the platform (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1223041}{patch #1223041})
-
-\b Documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1202495}{bug #1202495}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1227610}{bug #1227610},
-\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1238686}{bug #1238686}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1225167}{patch #1225167}, \W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1240601}{RFE #1240601})
-
-\b Fixed _?= being ignored, if the uninstaller path is not quoted and is separated with only space from _?=
-
-\b Fixed \R{library}{Library} failing on paths with spaces (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1234283}{bug #1234283})
-
-\b Fixed UpgradeDLL compilation error (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1230336}{bug #1230336})
-
-\b Improved French, Ukrainian and Luxembourgish translation
-
-\b Made \R{rmdir}{RMDir} set the error flag, if passed an invalid directory path (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1227553}{bug #1227553})
-
-\b Made uninstallers copy themselves into a subdirectory of the temporary directory to avoid DLLs left in the temporary directory from being loaded by the uninstaller (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1214319}{patch #1214319})
-
-\b Missing \R{langstring}{LangString} warning now uses the language name, if possible
-
-\b zip2exe: fixed restriction of extraction path length and updated to \W{http://www.zlib.net/}{zlib} 1.2.3 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1226381}{bug #1226381})
-
-\S2{} Build System
-
-\b Added linker script to assure correct order of sections when building using GNU tools
-
-\b Added \c{test} target
-
-\b UIs are now built from source
-
-\H{v2.07} 2.07
-
-Released on June 20th, 2005
-
-\S1{v2.07-rn} Release Notes
-
-\b NSIS Update was removed and the update check was moved back to MakeNSISw (Help -> NSIS Update). Use the \R{build_nightly}{nightly builds} to get the latest compiled binaries from CVS.
-
-\b Solid compression is no longer the default for bzip2 and lzma, use \c{SetCompressor /SOLID bzip2} or \c{SetCompressor /SOLID lzma} for solid compression.
-
-\b Source code is no longer supplied with the installer package. Source code can be downloaded from CVS or from the \W{http://nsis.sourceforge.net/download/}{download page}.
-
-\b The directory structure of the installation has been changed. All documentation is now in the Docs folder and all examples are in the Examples folder.
-
-\S1{v2.07-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added /SOLID switch for \R{asetcompressor}{SetCompressor}
-
-\b New build system (see \k{build})
-
-\b Stubs (exeheads) are no longer compiled into makensis.exe, but kept in the Stubs folder
-
-\S2{} New/Changed Commands
-
-\b \R{enumregvalue}{EnumRegValue} sets the error flag, if the enumeration index is out of range (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1178756&group_id=22049&atid=373085}{bug #1178756})
-
-\b \R{expandenvstrings}{ExpandEnvStrings} now sets the error flag as the documentation states
-
-\b Made \R{file}{File} /oname throw an error if the first character is a quote
-
-\S2{} Minor Changes
-
-\b Added \R{varconstant}{$LOCALAPPDATA} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1172123}{RFE #1172123})
-
-\b Changed MUI dialogs charset from ANSI_CHARSET to DEFAULT_CHARSET (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1193736&group_id=22049&atid=373085}{bug #1193736}, \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1201712&group_id=22049&atid=373085}{bug #1201712})
-
-\b Fixed \R{varother}{$INSTDIR} changing, even if user clicked Cancel in browse dialog
-
-\b Fixed a crash in makensis when using \R{awindowicon}{WindowIcon} off (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1123353&group_id=22049&atid=373085}{bug #1123353})
-
-\b Fixed \R{call}{Call} :label in uninstall code
-
-\b Fixed compilation error without NSIS_CONFIG_COMPONENTPAGE
-
-\b Fixed compilation errors on various platforms (including \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1179116&group_id=22049&atid=373087}{patch #1179116}, \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1193692&group_id=22049&atid=373087}{patch #1193692})
-
-\b Fixed \R{createdirectory}{CreateDirectory} setting the error flag for directories with two consecutive backslashes (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1119442&group_id=22049&atid=373085}{bug #1119442})
-
-\b Fixed \R{library}{InstallLib} setting the error flag for new shared libraries (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1181951&group_id=22049&atid=373085}{bug #1181951})
-
-\b Fixed letters case in examples (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1184571&group_id=22049&atid=373087}{patch #1184571})
-
-\b Fixed logging state being reset after the directory page (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1168711&group_id=22049&atid=373085}{bug #1168711})
-
-\b Fixed overlapping icon in welcome page (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1221772&group_id=22049&atid=373085}{bug #1221772})
-
-\b Fixed \R{rmdir}{RMDir} /REBOOTOK setting the reboot flag when trying to delete non-existent directory (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1073792&group_id=22049&atid=373085}{bug #1073792})
-
-\b Minor documentation fixes and improvements (including \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1220940&group_id=22049&atid=373085}{bug #1220940})
-
-\b Removed NSIS Update, MakeNSISw checks for new versions again
-
-\S2{} Include Files
-
-\b More messages in \L{../Include/WinMessages.nsh}{WinMessages.nsh} (Shengalts Aleksander)
-
-\b Some more useful macros in \L{../Include/Colors.nsh}{Colors.nsh} (Joel)
-
-\S2{} Utilities and Plug-ins
-
-\b Fixed halibut segfaults on PowerPC (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1180886&group_id=22049&atid=373087}{patch #1180886})
-
-\b \L{../Docs/Math/Math.txt}{Math}: Fixed memory leak (brainsucker)
-
-\b zip2exe: upgraded to zlib 1.2.2
-
-\S2{} Translations
-
-\b Added Malaysian translation (Azwa)
-
-\b Added Welsh translation (Rhoslyn Prys)
-
-\b Fixed Breton NLF file (credits weren't commented)
-
-\b Fixed duplicate accelerator in French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1168652&group_id=22049&atid=373085}{bug #1168652})
-
-\b Improved French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1220277&group_id=22049&atid=373085}{bug #1220277})
-
-\b Updated Russian translation (Dmitry)
-
-\b Updated translation credits (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1223362&group_id=22049&atid=373087}{patch #1223362})
-
-\H{v2.06} 2.06
-
-Released on March 19th, 2005
-
-\S1{v2.06-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed a bug, introduced in 2.05, that made components selection not function properly if the first section in the script was a section group
-
-\b Fixed a bug, introduced in 2.05, that corrupted the state of section groups inside section groups (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155836&group_id=22049&atid=373085}{bug #1155836})
-
-\S2{} New/Changed Commands
-
-\b Added MB_RTLREADING style to \R{messagebox}{MessageBox} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1159701}{RFE #1159701})
-
-\b All registry instructions now accept SHCTX which is replaced with HKLM or HKCU on runtime according to \R{setshellvarcontext}{SetShellVarContext} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1124901}{RFE #1124901})
-
-\S2{} Minor Changes
-
-\b Added Belarusian and Icelandic language files
-
-\b Added components.c to the Makefile (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1123154&group_id=22049&atid=373087}{patch #1123154})
-
-\b Added missing \R{clearerrors}{ClearErrors} in \R{getwindowsversion}{GetWindowsVersion} (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155588&group_id=22049&atid=373085}{bug #1155588})
-
-\b Fixed a bug in install.sh that made it try to install a non existing directory
-
-\b Fixed a bug in the Russian language file distributed with 2.05
-
-\b Fixed a bug that caused SetFont to not function properly with RTL languages on Windows 9x (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1159700&group_id=22049&atid=373085}{bug #1159700})
-
-\b Fixed a bug, introduced in 2.05, that caused problems with \R{ainsttype}{InstType} /COMPONENTSONLYONCUSTOM (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155060&group_id=22049&atid=373085}{bug #1155060})
-
-\b Fixed a crash caused by compiling large uninstallers (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1144763&group_id=22049&atid=373085}{bug #1144763})
-
-\b Fixed compile error without NSIS_CONFIG_CRC_SUPPORT
-
-\b Fixed compile errors of MinGW on POSIX for source code under Contrib (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1164307&group_id=22049&atid=373087}{patch #1164307})
-
-\b Fixed plug-ins directory initialization for extremely restricted guest users with no directory listing access to the temporary directory
-
-\b Made install.sh not use $(tempfile) and install files under /usr/share instead of /lib (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1120399&group_id=22049&atid=373087}{patch #1120399})
-
-\b Minor documentation updates and fixes
-
-\b Updated Slovenian, Serbian and Serbian Latin language files
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/AdvSplash/advsplash.txt}{AdvSplash}: Fixed a small memory leak (Thanks Takhir)
-
-\b \L{../Docs/StartMenu/Readme.txt}{StartMenu}: Added support for \R{setctlcolors}{SetCtlColors} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=711900}{RFE #711900})
-
-\H{v2.05} 2.05
-
-Released on February 4th, 2005
-
-\S1{v2.05-rn} Release Notes
-
-\b A lot of changes were made to the behavior of sections/components and related instructions. The changes were thoroughly tested, but may still cause minor incompatibilities with old scripts. Please let us know if your script no longer functions as expected with these changes.
-
-\S1{v2.05-cl} Changelog
-
-\S2{} New/Changed Commands
-
-\b Renamed SubSection and SubSectionEnd to \R{ssectiongroup}{SectionGroup} and \R{ssectiongroupend}{SectionGroupEnd}
-
-\b \R{sectionsetflags}{SectionSetFlags}, when used on a section group, toggles its children too
-
-\b \R{sectionsettext}{SectionSetText} works better with variables (parses immediately and treats an empty variable as an empty string)
-
-\b \R{ssetcurinsttype}{SetCurInstType} works without the components page
-
-\S2{} Minor Changes
-
-\b Added Breton translation
-
-\b \L{../Docs/AdvSplash/advsplash.txt}{AdvSplash}: Fixed double delay time in some cases
-
-\b Documentation fixes and enhancements (including \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1098454&group_id=22049&atid=373087}{patch #1098454})
-
-\b Fixed case sensitive name comparison with \R{file}{File} /x, when not using wildcards
-
-\b Fixed extraction status ending prior to 100%
-
-\b Fixed negative values of available space in the directory page (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1114876&group_id=22049&atid=373085}{bug #1114876})
-
-\b Fixed system.nsi example crash (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1102255&group_id=22049&atid=373085}{bug #1102255})
-
-\b Fixed unused label warnings with \R{library}{Library macros}
-
-\b Improved some error messages
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.42}: Added an image displaying example, added TRANSPARENT flag for BITMAP fields (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1079715}{RFE #1079715} - funded by Chris Morgan)
-
-\b Invisible sections weren't always affected by a change of the installation type (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1045722&group_id=22049&atid=373085}{bug #1045722})
-
-\b Language file fixes
-
-\b Made pages refresh after an aborted leave function
-
-\b Partially selected section groups can now be toggled
-
-\H{v2.04} 2.04
-
-Released on January 7th, 2005
-
-\S1{v2.04-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed $0 changed by \R{file}{File} /r
-
-\b Fixed empty directory not included by \R{file}{File} /r
-
-\b Fixed invalid directory creation by \R{file}{File} /r on POSIX
-
-\b Fixed Unicode conversion problems on POSIX
-
-\S2{} Minor Changes
-
-\b Added new test for dir_reader::matches
-
-\b Fixed LibraryLocal failure with UNC paths
-
-\b Fixed VC 7.1 and GCC 3.4 compile errors
-
-\b Language file fixes
-
-\H{v2.03} 2.03
-
-Released on December 3rd, 2004
-
-\S1{v2.03-rn} Release Notes
-
-\b If you're using \c{File /r folder} in your script, it's recommended you replace it with \c{File /r folder\\*} for faster compilation and so no other folders named \e{folder} will be included
-
-\b Command line switches prefix on POSIX has changed to a dash
-
-\b The plug-in API change is backward compatible
-
-\S1{v2.03-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added another parameter to plug-in functions with a pointer to exec_flags and ExecuteCodeSegment
-
-\b Fixed handling of absolute paths on POSIX
-
-\b Made RegDLL load and unload a DLL exactly once to fix crashes with COM DLLs registration
-
-\S2{} New/Changed Commands
-
-\b Added /date switch to !define for definition of date and time constants
-
-\b Added /x switch for \R{file}{File} and \R{reservefile}{ReserveFile} to exclude files and directories
-
-\b Made \R{file}{File}'s /r switch always search in subdirectories, even if the given path points to an existing directory
-
-\S2{} Minor Changes
-
-\b Added LIBRARY_SHELL_EXTENSION and LIBRARY_COM to \R{library}{Library}
-
-\b Added missing #include
-
-\b Added NSIS_LZMA_COMPRESS_WHOLE to the script define list
-
-\b Documentation fixes and improvements
-
-\b Fixed an access violation in case of a script jump beyond the last entry
-
-\b Fixed keyboard navigation in the instfiles page while installing
-
-\b Fixed unpacking window not showing when \R{abggradient}{BGGradient} is used
-
-\b Fixed unused label warning in \R{library}{Library.nsh}
-
-\b Language file fixes
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.72}: Fixed state of Cancel button on Finish page when used in installer and uninstaller, added a string for NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
-
-\b nsisconf.nsh was not always parsed when compiling using MakeNSISw
-
-\H{v2.02} 2.02
-
-Released on October 23rd, 2004
-
-\S1{v2.02-cl} Changelog
-
-\S2{} Major Changes
-
-\b Added lots of small usage examples to the documentation
-
-\b Made \R{jumps}{relative jumps} work with instructions that add multiple entries
-
-\b Made the datablock optimizer much faster
-
-\b Made the installer deny reboots while running (\W{http://msdn.microsoft.com/library/en-us/sysinfo/base/wm_queryendsession.asp}{WM_QUERYENDSESSION})
-
-\b Made the \R{reboot}{Reboot} command first quit and then reboot so everything is always cleaned-up
-
-\S2{} New/Changed Commands
-
-\b Added << and >> to \R{intop}{IntOp}
-
-\b Added \R{geterrorlevel}{GetErrorLevel} and \R{seterrorlevel}{SetErrorLevel}
-
-\b Fixed \R{copyfiles}{CopyFiles} usage checking problem
-
-\b Made \R{reboot}{Reboot} call \R{onrebootfailed}{.onRebootFailed} and quit on failure instead of setting the error flag
-
-\S2{} Minor Changes
-
-\b Added Albanian language files
-
-\b Added NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE configuration option which makes components only be toggled when the user clicks on the checkbox and makes .onMouseOverSection only be called when the user selects a component
-
-\b Added some CppUnit tests
-
-\b Both _=? and /D= now require a space before them so they can safely remove the space from $CMDLINE
-
-\b Fixed a bug that caused the uninstaller CRC-check to fail if \R{packhdr}{!packhdr} created a non-512-bytes-aligned exehead
-
-\b Fixed a compiler crash caused by using \R{getcurrentaddress}{GetCurrentAddress}
-
-\b Fixed errors when using '\R{file}{File} /r .' on Windows
-
-\b Fixed gcc 3.4 compile errors
-
-\b Fixed inconsistencies between error levels and the \R{errorlevels}{documentation}
-
-\b Fixed some minor memory leaks
-
-\b Language file fixes
-
-\b Makefile improvements
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.71}: Made the selected language only be saved if the installation was successful
-
-\b Some code refactoring
-
-\b \L{../Docs/StrFunc/StrFunc.txt}{StrFunc}: Rewrote StrSort and fixed StrStrAdv. See the \L{../Docs/StrFunc/StrFunc.txt}{readme} for a complete changelog
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/Banner/Readme.txt}{Banner}: Fixed some cases where the banner would not show on the foreground
-
-\H{v2.01} 2.01
-
-Released on September 24th, 2004
-
-\S1{v2.01-rn} Release Notes
-
-\b See \R{build_posix}{Compiling NSIS Sources} for information about compiling makensis on POSIX platforms
-
-\b NSIS doesn't create installers for Linux/Mac OS X etc., but you can compile Windows installers on these platforms
-
-\b UpgradeDLL is still provided in UpgradeDLL.nsh for backwards compatibility
-
-\S1{v2.01-cl} Changelog
-
-\S2{} Major Changes
-
-\b Compiler (makensis) supports POSIX platforms (Linux, *BSD, Mac OS X, etc.)
-
-\b \R{library}{New system} for DLL/TLB library setup
-
-\S2{} New/Changed Commands
-
-\b Added \R{abgfont}{BGFont} that allows setting the background text font
-
-\b Added SW_HIDE to \R{execshell}{ExecShell}'s accepted show modes
-
-\b \R{rmdir}{RMDir} can now be used with both /r and /REBOOTOK at the same time
-
-\b Extended maximum binary data for \R{writeregbin}{WriteRegBin} to 3 * NSIS_MAX_STRLEN
-
-\b Added \R{execute}{!execute}
-
-\S2{} Minor Changes
-
-\b LZMA exehead is now 34KB and should also decompress faster
-
-\b Windows 95 (OSR2)/98/ME no longer see drive free space capped to 2GB
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern User Interface}: New orange theme by MoNKi
-
-\b Speedup background gradient painting
-
-\b \L{../Examples/LogicLib.nsi}{LogicLib} 2.5: Added AndIf, AndUnless, OrIf, OrUnless. Avoids unused variable warnings by requiring !defines before using certain features.
-
-\b \L{../Docs/StrFunc/StrFunc.txt}{StrFunc}: Added support for uninstaller, some fixes and improvements. See the \L{../Docs/StrFunc/StrFunc.txt}{readme} for a complete changelog
-
-\b The plug-ins folder is properly removed when the system is rebooted
-
-\b \R{setoutpath}{SetOutPath} "-" works again
-
-\b Fixed a bug which made plug-ins that didn't have lower case extension not be found
-
-\b Fixed a bug that caused directories with drives that had their current directory set to an invalid directory to not be accepted in the directory selection page
-
-\b Fixed a crash in makensis caused by defining a macro in a file included by another macro
-
-\b makensis shows meaningful errors for compression errors instead of just magic numbers
-
-\b Fixed a bug with \R{aallowrootdirinstall}{AllowRootDirInstall} used along with \R{ainstalldirregkey}{InstallDirRegKey} that caused the directory in the registry to be ignored
-
-\b Fixed \R{FileRead}{FileRead} setting the error flag when a null character is the first character it reads
-
-\b Fixed a bug which caused the background gradient to paint slowly
-
-\b \R{file}{File} paths relative to the root folder work again
-
-\b Added \L{../Include/Colors.nsh}{Colors.nsh}
-
-\b Made Times New Roman default font for the background text because it should always have support for the locale's language
-
-\b Fixed compilation of NSISdl under VS.NET
-
-\b SetCtlColors /BRANDING wasn't working right, if just one of the background or text color were specified
-
-\b Language file fixes and improvements
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/System/System.html}{System}: New, hopefully more informative, documentation; fixed some bugs
-
-\b \L{../Docs/Banner/Readme.txt}{Banner}: Added getWindow to allow greater control over the banner window
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.41}: Bitmaps are now automatically centered, fixed a bug which prevented enabling the next button from the leave function of InstallOptions pages, fixed a rare freeze
-
-\b Zip2Exe 0.32: Fixed codepage problems
-
-\b \L{../Docs/nsExec/nsExec.txt}{nsExec}: Always create a valid input handle, fixed a problem when called from a path with spaces
-
-\b \L{../Docs/VPatch/Readme.html}{VPatch}: Close all open file handles when one of them fail to open
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: Added /NOIEPROXY (based on memph's code)
-
-\H{v2.0} 2.0
-
-Released on February 7th, 2004
-
-\S1{v2.0-rn} Release Notes
-
-\b Finnish, Bulgarian and Thai language files are outdated and do not contain all needed translations
-
-\S1{v2.0-cl} Changelog
-
-\S2{} Changes from 1.98
-
-\b \R{langs}{Multiple languages in one installer support} (with RTL support)
-
-\b \R{plugindlls}{Easier plug-in system}
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern User Interface} (optional)
-
-\b \W{http://www.7-zip.org/}{LZMA} compression which provides installers 20% smaller than bzip2
-
-\b \R{pages}{Easier paging system} (no more .onNextPage, .onPrevPage)
-
-\b Components are presented as a tree which allows sub components
-
-\b \R{varuser}{User variables} ($VARNAME)
-
-\b \R{aicon}{Icon} and \R{auninstallicon}{UninstallIcon} support any color depth and sizes, not just 32x32x16
-
-\b \R{acheckbitmap}{CheckBitmap} supports any color depth
-
-\b Improved large files handling
-
-\b \R{alicensedata}{License data} can be RTF
-
-\b CHM documentation for easy browsing
-
-\b \R{silent}{Better silent support}
-
-\b New include files for easier scripting: \L{../Examples/LogicLib.nsi}{LogicLib}, \L{../Docs/StrFunc/StrFunc.txt}{StrFunc} and \L{../Include/Sections.nsh}{Sections}
-
-\b Improved plug-ins: \L{../Docs/InstallOptions/Readme.html}{InstallOptions}, \L{../Docs/NSISdl/ReadMe.txt}{NSISdl} and \L{../Docs/Splash/splash.txt}{Splash}
-
-\b New plug-ins: \L{../Docs/AdvSplash/advsplash.txt}{AdvSplash}, \L{../Docs/Banner/Readme.txt}{Banner}, \L{../Docs/BgImage/BgImage.txt}{BgImage}, \L{../Docs/Dialer/Dialer.txt}{Dialer}, \L{../Examples/languages.nsi}{LangDLL}, \L{../Docs/Math/Math.txt}{Math}, \L{../Docs/nsExec/nsExec.txt}{nsExec}, \L{../Docs/StartMenu/Readme.txt}{StartMenu}, \L{../Docs/System/System.html}{System}, \L{../Examples/UserInfo/UserInfo.nsi}{UserInfo} and \L{../Docs/VPatch/Readme.html}{VPatch}
-
-\b New and improved utilities: \L{../Docs/makensisw/Readme.txt}{MakeNSISw}, NSIS Menu (NSIS.exe), NSIS Update (Bin\\NSIS Update.exe) and zip2exe (Bin\\zip2exe.exe)
-
-\b New commands: \R{addplugindir}{!addplugindir}, \R{echo}{!echo}, \R{ifmacrodef}{!ifmacrodef}, \R{ifmacrondef}{!ifmacrondef}, \R{verbose}{!verbose}, \R{aaddbrandingimage}{AddBrandingImage}, \R{asetallowskipfiles}{AllowSkipFiles}, \R{achangeui}{ChangeUI}, \R{acheckbitmap}{CheckBitmap}, \R{createfont}{CreateFont}, \R{adirvar}{DirVar}, \R{adirverify}{DirVerify}, \R{enablewindow}{EnableWindow}, \R{afilebufsize}{FileBufSize}, \R{flushini}{FlushINI}, \R{sgetcurinsttype}{GetCurInstType}, \R{getdlgitem}{GetDlgItem}, \R{getinstdirerror}{GetInstDirError}, \R{ifabort}{IfAbort}, \R{ifsilent}{IfSilent}, \R{initpluginsdir}{InitPluginsDir}, \R{sinsttypegettext}{InstTypeGetText}, \R{sinsttypesettext}{InstTypeSetText}, \R{langstring}{LangString}, \R{alicensebkcolor}{LicenseBkColor}, \R{alicenseforceselection}{LicenseForceSelection}, \R{licenselangstring}{LicenseLangString}, \R{loadlanguagefile}{LoadLanguageFile}, LockWindow, \R{page}{Page}, \R{pageex}{PageEx}, \R{reservefile}{ReserveFile}, \R{sectiongetinsttypes}{SectionGetInstTypes}, \R{ssectiongetsize}{SectionGetSize}, \R{sectionsetinsttypes}{SectionSetInstTypes}, \R{ssectionsetsize}{SectionSetSize}, \R{setbrandingimage}{SetBrandingImage}, SetCompressionLevel, \R{asetcompressor}{SetCompressor}, \R{asetcompressordictsize}{SetCompressorDictSize}, \R{setctlcolors}{SetCtlColors}, \R{ssetcurinsttype}{SetCurInstType}, \R{setpluginunload}{SetPluginUnload}, \R{setsilent}{SetSilent}, \R{showwindow}{ShowWindow}, SubSection (replaced by \R{ssectiongroup}{SectionGroup}), SubSectionEnd (replaced by \R{ssectiongroupend}{SectionGroupEnd}), \R{var}{Var}, \R{viaddversionkey}{VIAddVersionKey}, \R{viproductversion}{VIProductVersion} and \R{axpstyle}{XPStyle}
-
-\b Removed commands: DirShow, DisabledBitmap, EnabledBitmap and SectionDivider
-
-\b All this and a smaller overhead! =)
-
-\b A lot more... See below for more information
-
-\S2{} Changes from RC4
-
-\b Command line parser ignored any switches after tokens that are not switches
-
-\b Last part of the path specified in \R{ainstalldir}{InstallDir} was appended even if selected folder name was the same
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.70}: Improved documentation, new Init custom function for Welcome and Finish page
-
-\b Added \L{../Docs/StrFunc/StrFunc.txt}{StrFunc} by deguix
-
-\b Updated and fixed language files
-
-\b Updated, fixed and improved documentation
-
-\H{v2.0rc4} 2.0 Release Candidate 4
-
-Released on February 2nd, 2004
-
-\S1{v2.0rc4-cl} Changelog
-
-\S2{} Major Changes
-
-\b Fixed MBCS mishandling in exehead, InstallOptions and nsExec
-
-\S2{} Minor Changes
-
-\b Language files updates and fixes
-
-\b Fixed logging (NSIS_CONFIG_LOG)
-
-\b Fixed compile errors caused by removing some config.h options
-
-\b NSIS compiles without PSDK again
-
-\b Documentation fixes
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: All potential and rare crashes should be completely fixed now
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions}: Fixed a rare crash related to ListItems and a small memory leak when using ValidateText
-
-\H{v2.0rc3} 2.0 Release Candidate 3
-
-Released on January 26th, 2004
-
-\S1{v2.0rc3-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Fixed some bugs with LZMA/bzip2 and non-solid compression
-
-\b Fixed a bug that caused escaping not to be ignored on extended !define lines
-
-\b Language files updates and fixes
-
-\b Fixed installer crash when certain language strings were not referenced in all languages
-
-\b Some new and improved graphics
-
-\b Made CreateShortcut case insensitive when parsing hot key
-
-\b Some documentation improvements and fix-ups
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.69}: Made all uninstaller pages work without installer pages and fixed top text on uninstaller license page
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Fixed resize bug, fixed some UI issues in the settings dialog
-
-\b NSIS Update: Improved UI
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions}: Fixed minor problems with the new NOTIFY flag
-
-\H{v2.0rc2} 2.0 Release Candidate 2
-
-Released on January 5th, 2004
-
-\S1{v2.0rc2-cl} Changelog
-
-\S2{} Minor Changes
-
-\b Set focus to the main control in each page to ease keyboard control (plug-ins too)
-
-\b LangStrings and user variables limit is now 16383 and is enforced
-
-\b Fixed control colors set using SetCtlColors not changing when the system colors were changed
-
-\b Log window now responds to the context menu key
-
-\b Fixed a bug which caused beeping when the space key is hit on the components tree
-
-\b Added code to prevent weird usage of WM_COMMAND which can cause weird behavior
-
-\b Fixed compile errors when NSIS_CONFIG_COMPONENTPAGE, NSIS_CONFIG_PLUGIN_SUPPORT or NSIS_SUPPORT_HWNDS are not defined
-
-\b More language files updated to the latest version
-
-\b Fixed CHM's script errors
-
-\b Documentation improvements
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.4}: NOTIFY for link, drop list and list box; UI fixes and improvements. See IO's \L{../Docs/InstallOptions/Changelog.txt}{change log} for a complete list
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Improved user interface, added support for named symbol sets and fixed best compressor selector
-
-\H{v2.0rc1} 2.0 Release Candidate 1
-
-Released on Decemeber 27th, 2003
-
-\S1{v2.0rc1-rn} Release Notes
-
-\b Trying the LZMA compression method for your installer is recommended. It often gives a 20% better compression ratio.
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.68}: The setting to change the title size on the Welcome page and Finish page has been changed
-
-\S1{v2.0rc1-cl} Changelog
-
-\S2{} Major Changes
-
-\b LZMA compression support. Added \R{asetcompressordictsize}{SetCompresssorDictSize}.
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.68}: New settings for extra space for title and text on Welcome page and Finish page, improved handling of verbose settings, language file string for uninstaller reboot information, more
-
-\b Shell folders are now detected using shell API functions and not the registry. This is the recommended method by Microsoft. New constants have been added in the process ($FONTS, $SENDTO and more...). See \k{varconstant} for more details.
-
-\b Added \L{../Examples/LogicLib.nsi}{LogicLib} to distribution (easier conditional execution etc.)
-
-\b Added \R{adirverify}{DirVerify} and \R{getinstdirerror}{GetInstDirError} to allow custom error checking when the installation directory is invalid or the drive does not have enough space
-
-\b Support for reading environmental variables on compile time: \R{compenvvar}{$%envVarName%}
-
-\b Added /SD parameter for \R{messagebox}{MessageBox}. Allows to set default for silent installers.
-
-\b New conditional compilation options: \R{ifmacrodef}{!ifmacrodef} and \R{ifmacrondef}{!ifmacrondef}.
-
-\b New sections macros for mutually exclusive section selection
-
-\b Improved RTL support by adding WS_EX_RTLREADING wherever possible
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.3}: Added new control type "Button", added new flag "NOTIFY", added new flag "NOWORDWRAP" for multi-line text boxes, reduced size down to 12K
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: More options to set the compression method
-
-\b Zip2Exe 0.31: Fixed compression setting, LZMA compression support
-
-\b \L{../Docs/VPatch/Readme.html}{VPatch 2.1}: Better error handling and exit code for GenPat
-
-\H{v2.0b4} 2.0 Beta 4
-
-Released on November 19th, 2003
-
-\S1{v2.0b4-rn} Release Notes
-
-\b The /LANG parameter is no longer available for any text setting instructions. You must use a \R{langstring}{LangString} if you want to make a certain text multilingual. This means you can also set one text for all languages. To make the license data multilingual you should use \R{licenselangstring}{LicenseLangString}.
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.67}: Because of the new syntax for pages, renaming of settings and variable names etc., you have to make some changes to your scripts, see the \L{../Docs/Modern UI/Readme.html}{Modern UI Readme} for details.
-
-\b \R{page}{Custom Pages} now have a leave function. As this parameter is placed before the caption you have to add another "" empty string for the title to work.
-
-\b \R{onselchange}{.onSelChange} is no longer called when the components page is created.
-
-\b The icons folder has been renamed to Graphics and was reorganized. If you were using any files from Contrib\\Icons in your script, you should update it to point to the new image or icon path.
-
-\b UpgradeDLL has been changed, it's \e{highly recommend} that you include the new version in your script using \c{!include "UpgradeDLL.nsh"} instead of the old one.
-
-\S1{v2.0b4-cl} Changelog
-
-\S2{} Major Changes
-
-\b CHM documentation - searchable and comes with an index
-
-\b User variables ($VARNAME) that can be declared with the \R{var}{Var} command
-
-\b Support for all pages in both installer and uninstaller. Components, directory and license pages can be used for the uninstaller
-
-\b Improved large files handling (way lower requirements to compile a 2GB installer now)
-
-\b Full support for RTL languages, including support for LTR and RTL languages in one installer
-
-\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.67}: New system & syntax for pages, settings (support for multiple pages of the same type, page specific settings, more customization options etc.), Welcome/Finish pages for uninstaller, \R{alicenseforceselection}{LicenseForceSelection} support, new options for Finish page / language selection dialog, fixes, more
-
-\b Extraction progress
-
-\b No more unprocessed strings, variables can be used everywhere
-
-\b Leave function for custom \R{pages}{pages}: Input on InstallOptions pages can be validated using script code
-
-\b Interface improvements: Better ClearType support, no more flickering
-
-\b \R{onmouseoversection}{OnMouseOver text} is only displayed when mouse over section
-
-\b NLF language files (v6): language specific fonts, RTL and more strings
-
-\b Inner LangStrings can be used in the script
-
-\b No more /LANG, only LangStrings - easier to set one string to all languages
-
-\b LangStrings are no longer installer/uninstaller specific (no un.)
-
-\S2{} New/Changed Commands
-
-\b Added \R{pageex}{PageEx}, \R{pagecallbacks}{PageCallbacks} and \R{adirvar}{DirVar} - it's now a lot easier to add the same page type twice
-
-\b Added \R{afilebufsize}{FileBufSize}
-
-\b Added \R{viaddversionkey}{VIAddVersionKey}: add version information resource to the installer
-
-\b Added \R{asetallowskipfiles}{AllowSkipFiles}: set whether the user should be able to skip a file when overwriting failed
-
-\b Added \R{alicenseforceselection}{LicenseForceSelection}: checkbox or radio buttons on license page to let user agree with license or not
-
-\b Added \R{ssectionsetsize}{SectionSetSize}, \R{ssectiongetsize}{SectionGetSize}, \R{ssetcurinsttype}{SetCurInstType} and \R{sgetcurinsttype}{GetCurInstType}
-
-\b Replaced SetBkColor with \R{setctlcolors}{SetCtlColors} which can set text color too
-
-\b Added \R{ifsilent}{IfSilent} and \R{setsilent}{SetSilent} to allow better /S interaction
-
-\b Added support for standard predefines: $\{__DATE__\}, $\{__TIME__\}, $\{__TIMESTAMP__\}, $\{__FILE__\}, $\{__LINE__\}
-
-\b Added ifdiff and lastusd for \R{asetoverwrite}{SetOverwrite}
-
-\b /o Switch for \R{ssection}{Section} provides ability to unselect the section by default
-
-\b New parameter for DirText to set the browse dialog text
-
-\b Added \R{rmdir}{RMDir /REBOOTOK}: remove folders on reboot
-
-\b \R{ainsttype}{InstType} /NOCUSTOM and /COMPONENTSONLYONCUSTOM work together
-
-\b Added base_dir for \R{gettempfilename}{GetTempFileName}
-
-\S2{} Minor Changes
-
-\b RO sections can now be in \R{ainsttype}{InstTypes} too (defaults to old behavior)
-
-\b Increased limit of InstTypes to 32
-
-\b Improved macros & functions: UpgradeDLL, GetParent, GetParameters. Using the new versions is recommended.
-
-\b Fixed SetOutPath not setting current directory if the directory didn't exist before
-
-\b Components tree: fixed problems with sub-sections with RO sections as children, SF_EXPAND now refreshes the components tree and added SF_PSELECTED for partially selected sub-sections
-
-\b Improved \R{aaddbrandingimage}{AddBrandingImage}: doesn't depend on the UI, can set image on the bottom and on the right, support for custom padding value
-
-\b Better installation directory verification
-
-\b Fixed all known problems with temporary files and directories
-
-\b Documentation fixes
-
-\b Minor bug fixes
-
-\b Code clean-ups and some more comments
-
-\b More...
-
-\S2{} Utilities and Plug-ins
-
-\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW 2.0}: UI to define symbols, easy access to recent scripts, toolbar and more
-
-\b Zip2Exe 0.3: based on header files, improved interface, Modern UI support, new script code, improved folder detection
-
-\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.2}: added LINK control, added EXTENDEDSELECT flag for list boxes which replaces MULTISELECT that now acts exactly as the real style flag ([double] click turns on or off selection), fixes
-
-\b BgImage plug-in stability fixes
-
-\b Added vPatch: patch generator and plug-in that applies the patches
-
-\b Banner plug-in improvements: responds to messages and some new /set tricks by brainsucker
-
-\b AdvSpalsh plug-in improvements: smaller, better transparency support and a possible bug fix
-
-\b System plug-in improvements: Unicode, GUID and COM support
-
-\b nsExec plug-in improvments: ability to run 16 bit code and tabs to spaces conversion
-
-\b Math plug-in
-
-\b Delphi unit for NSIS plug-ins
-
-\H{v2.0b3} 2.0 Beta 3
-
-Released on March 16th, 2003
-
-\b Modern UI 1.63: Header bitmap support, new defines to change the description area, single macro for language selection dialog, more!
-
-\b New tutorial in the documentation
-
-\b define_if_last in Page command also works when a define has not been specified for all Page commands.\\<br\\>This fixes the problem with the Modern UI "Click Next" / "Click Install" texts.
-
-\b Added SectionSetInstTypes and SectionGetInstTypes
-
-\b Reboot command does not force a reboot anymore (allows the user to save work)
-
-\b !if[n]def/!else fixes
-
-\b LogSet on now really starts logging
-
-\b Cancel button available on all pages after the instfiles page but the last page unless /ENABLECANCEL was used in its Page command
-
-\b License page: No more limit on RTF size
-
-\b LangDLL: Option to auto-count number of languages, shell font support
-
-\b Page and UninstPage can not be used inside sections/functions
-
-\b CreateDirectory now uses the error flag
-
-\b EnumRegKey/Value output_var check fixed
-
-\b Updated translations
-
-\b Dreaded BSOD after plug-ins enumeration finally banished
-
-\b Minimize button and BGGradient and BGImage compatibility fixes
-
-\b WriteINIStr with empty value works again
-
-\b Added FlushINI
-
-\H{v2.0b2} 2.0 Beta 2
-
-Released on February 26th, 2003
-
-\b NSIS Menu: links to all NSIS utilities, documentation and websites
-
-\b NSIS Update: check for new releases, download latest development files
-
-\b Dialer plugin to connect to the internet
-
-\b Improved filename validation
-
-\b VC7 compiler compatibility issues fixed
-
-\b CreateDirectory sets error flag
-
-\b InstallOptions: INI File State value fixed
-
-\b Updated translations
-
-\b Minor fixes
-
-\H{v2.0b1} 2.0 Beta 1
-
-Released on February 9th, 2003
-
-\b User interface improvements: better order/grouping of controls, button selection problems fixed, added minimize box, transparent BrandingText
-
-\b LangString improvements: can be used before they have been defined, warning if not present in all language tables
-
-\b New version of the Modern User Interface with UI improvements, bugfixes and some small new features
-
-\b InstallOptions 2.0 with support for custom font and DPI settings, groupboxes, grouped controls, lots of bugfixes etc.
-
-\b No more random compression ratios
-
-\b SetOutPath now sets the working directory
-
-\b File names are validated, directory given by the user will now always work
-
-\b $QUICKLAUNCH now works with SetShellVarContext all
-
-\b Automatically appended directory name in the directory selection dialog will no longer contain squares if not all characters are ASCII.
-
-\b Fixed a bug with remote drives and available space (\\\\remote\\drive)
-
-\b Plug-in function's names are now case insensitive
-
-\b Fixed a bug with specifying Icon twice
-
-\b Include dirs (!addincludedir)
-
-\b On leave function for pages
-
-\b Installers can now really contain more than one branding image
-
-\b All !if/!else/!endif problems should be solved now
-
-\b SetFont "MS Shell Dlg" adds the DS_SHELLFONT style
-
-\b Win9x rename on reboot now also works when the destination file does not exist
-
-\b DeleteRegKey works on default value
-
-\b nsExec can be called from an installer executed by CreateProcess
-
-\b WriteUninstaller sets error code
-
-\b Banner.dll compatible with Modern UI
-
-\b Fixed focus problems in MakeNSISw
-
-\b Updated and new translations
-
-\b Some new bitmaps for the MUI by Virtlink
-
-\b Faster and better MakeNSISw integration
-
-\b \R{detect.netframework}{New .NET Framework detection function}
-
-\b Minor bugfixes
-
-\b Code clean-ups (compiles on VC7)
-
-\H{v2.0b0} 2.0 Beta 0
-
-Released on December 6th, 2002
-
-\b New paging system
-
-\b Added Page and UninstPage
-
-\b Removed .onNextPage, .onPrevPage, .onInitDialog
-
-\b New easier version of the Modern User Interface with better multilanguage support, InstallOptions integration, welcome and finish page etc.
-
-\b Custom pages no longer flicker when created
-
-\b Added accelerator keys
-
-\b Added LangString and LangStringUP for user defined multilingual strings
-
-\b Added support for transparent check marks
-
-\b Added InitPluginsDir
-
-\b Renamed nsisconf.nsi to nsisconf.nsh
-
-\b Added CreateShortcut comment/description parameter
-
-\b Splash.exe is now a plugin (splash.dll)
-
-\b Added new plugins: System, AdvSplash, nsExec, UserInfo, BgImage, Banner and StartMenu
-
-\b !ifdef and friends can now be used in macros
-
-\b SendMessage can send strings (put STR: before a param) and supports timeouts
-
-\b Right mouse button "Copy to clipboard" context menu for the Details window
-
-\b Plugin syntax now requires dll name, e.g. dll::func not just func
-
-\b Licence text receives initial focus (page up & down work immediately, return key still works)
-
-\b Made win9x move/delete on reboot support proper and function like on win2k
-
-\b Now always loads RichEdit v2 if present (links work on Win9x)
-
-\b DeleteRegKey now complains if given a third parameter (other than /ifempty)
-
-\b RegDLL now works with DLLs dependent on DLLs from the same directory
-
-\b $\{LANG_langName\} defined as the language id when loading a NLF
-
-\b Fixed a few bugs that caused the installer to load slower than before
-
-\b Uninstall can now get command line parameters too
-
-\b Added ReserveFile
-
-\b Added ExDLL.h
-
-\b Included makensisw 1.9 (lots of changes)
-
-\b Updated InstallOptions
-
-\b Updated ZIP2EXE
-
-\b Updated HTTP download plugin, NSIS-dl (timeout added, better proxy detection)
-
-\b A lot of new language files
-
-\b A lot of new icons and check marks
-
-\b Changed section flags values
-
-\b SectionSetFlags can now set bold too
-
-\b SectionSetFlags now works in silent installers too
-
-\b SectionSetName for sub sections doesn't need '-' in front of the name
-
-\b Added SetPluginUnload
-
-\b Hidden section can now use SectionIn too
-
-\b File /nonfatal switch added
-
-\b Plugins no longer add size to their containing section
-
-\b Defines can now be used inside define names ($\{bla$\{blo\}\})
-
-\b New docs format (WOOHA!)
-
-\b EXE header size a lot smaller, 33.5KB for bzip2 and 34KB for zlib
-
-\b Lots of other bugs fixed...
-
-\H{v2.0a7} 2.0 Alpha 7
-
-Released on August 29th, 2002
-
-\b Can now select the language from .onInit ($LANGUAGE is a variable)
-
-\b Added CreateFont
-
-\b Added .onMouseOverSection
-
-\b Added .onInitDialog and un.onInitDialog
-
-\b Added SetStaticBkColor
-
-\b Disabled UseOuterUIItem
-
-\b SendMessage WM_SETTEXT treats lParam as a string and not a number
-
-\b CopyFiles script message no longer always prints (silent)
-
-\b Custom install type text can now be changed
-
-\b ChangeUI can now change IDD_VERIFY
-
-\b Default license color now fits the user system
-
-\b Summary reports the right number of required sections
-
-\b Checkbox is only required in IDD_DIR if logging is enabled
-
-\b Not using /LANG now really causes the script compiler to use the last used language
-
-\b Fixed a bug with MBCS and the uninstaller text
-
-\b MBCS to Unicode and Unicode to MBCS conversion bugs fixed
-
-\b Fixed a bug that caused RTF not to show on Windows 9x
-
-\b Added a dialog that shows up if compress whole is used and initial decompressing lasts longer than a second
-
-\b Updated to InstallOptions 1.3
-
-\b MakeNSISw 1.7 included
-
-\b Added modern UI by Joost Verburg (Examples\\Modern UI)
-
-\b Added new full color icons by adni18
-
-\b Added Dutch, Korean, Russian, Swedish and Traditional Chinese language files
-
-\b Updated Spanish language file version (thanks to LsMoNKi)
-
-\b Added /TRIM(LEFT|RIGHT|CENTER) for BrandingText
-
-\b EXE header size down to 36.5KB
-
-\b Added yi-pixel.ico and yi-pixel-uninstall.ico by Jan T. Sott
-
-\b Fixed a bug with macros at the end of the file
-
-\b Sub-sections can now have defined names too
-
-\b Added LangDLL.dll plugin
-
-\b CallInstDLL /NOUNLOAD added (works on plugin calls too)
-
-\H{v2.0a6} 2.0 Alpha 6
-
-Released on August 10th, 2002
-
-\b Fixed two bugs with the plug-in mechanism
-
-\b Fixed infinite loop bug
-
-\H{v2.0a5} 2.0 Alpha 5
-
-Released on August 9th, 2002
-
-\b Added UseOuterUIItem
-
-\b Enhanced ChangeUI
-
-\b Enhanced SetDlgItemText
-
-\b Added one-section.nsi example file
-
-\b Optimized Ximon's code for plug-in DLLs (back to 37KB)
-
-\b If default user language doesn't fit exactly, will try to find primary language match
-
-\b Fixed some strings that got replaced (space available and required etc.)
-
-\b Compiles without MS Platform SDK
-
-\b Included Spanish.nlf
-
-\b Included MagicLime.exe by snowchyld
-
-\H{v2.0a4} 2.0 Alpha 4
-
-Released on August 5th, 2002
-
-\b Added automatic detection, packing, unpacking and deletion of plugin dlls
-
-\b Added simplified calling syntax for plugin dlls
-
-\b Added PluginDir
-
-\H{v2.0a3} 2.0 Alpha 3
-
-Released on August 4th, 2002
-
-\b Added LoadLanguageFile
-
-\b Added $LANGUAGE
-
-\b Added /LANG option to string setters (Name, Caption, etc.)
-
-\b 'LogSet on' now builds a log file if not already created
-
-\H{v2.0a2} 2.0 Alpha 2
-
-Released on July 31st, 2002
-
-\b Added $\{NSISDIR\}
-
-\b Added XPStyle
-
-\b Added SetFont
-
-\b Added ChangeUI
-
-\b Added AddBrandingImage, and SetBrandingImage
-
-\b Added SetCompressor (no more makensis-bz2.exe)
-
-\b Added LicenseBkColor
-
-\b 'SpaceTexts none' now causes no space texts to appear
-
-\b Icon and UninstallIcon now support icons of any type
-
-\b CheckBitmap now support bitmaps with any color table/depth
-
-\b Unused resources are removed before writing out the installer
-
-\b Documented !error and !warning
-
-\b Added !echo and !verbose
-
-\b Added force option for CRCCheck
-
-\b Updated to Makensisw 1.6
-
-\b Updated to InstallOptions 1.2
-
-\b Installer can now be compressed using UPX
-
-\b A hint is shown if a line is longer than the detail window
-
-\b Modern style folder select dialog
-
-\b License data can now be RTF
-
-\b WindowIcon is now handled in the compiler
-
-\b Removed debug version (it never worked anyway)
-
-\b Faster compile time (WIN32_LEAN_AND_MEAN)
-
-\H{v2.0a1} 2.0 Alpha 1
-
-Released on July 9th, 2002
-
-\b Added expand node option to Section and SubSection
-
-\b Added preserve file attribute option to File command
-
-\b Copy-All bug fix in Makensisw
-
-\b Added NSISDIR to the define list
-
-\b Reorganized NSIS directory structure
-
-\H{v2.0a0} 2.0 Alpha 0
-
-Released on May 22nd, 2002
-
-\b TreeView component list (care of Jeff Doozan)
-
-\b No more SectionDivider, but SubSection and SubSectionEnd.
-
-\b No more EnabledBitmap/DisabledBitmap, just CheckBitmap. (with tons of button states)
-
-\b Bugfixes of brokenness.
-
-\b Added ! for Section/SubSection to make bold.
-
-\b Made config.h have hacks for easier building for me. :)
-
-\H{cl-older} Older Versions
-
-\W{http://nsis.sourceforge.net/download/nsis1/}{NSIS 1.x version history}
+\A{history} Changelog and Release Notes
+
+\H{v2.32} 2.32
+
+Released on November 9th, 2007
+
+\S1{v2.32-rl} Release Notes
+
+\b Vista PNG icons are now supported without the need for any special tricks.
+
+\S1{v2.32-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added support for mismatching installer and uninstaller icons
+
+\b NSIS source code is now hosted on Subversion instead of CVS
+
+\S2{} Minor Changes
+
+\b Fixed synchronization that could allow the user to cause extraction errors in rare cases (reported in the \W{http://forums.winamp.com/showthread.php?s=&threadid=274333}{forum})
+
+\b Fixed syntax validation of \R{var}{Var}
+
+\b Minor documentation improvements (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1811876}{bug #1811876}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1819946}{bug #1819946})
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed 3-line title on welcome/finish page
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed components page description and lock
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed default language selection from registry
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed MUI_DIRECTORYPAGE_BGCOLOR
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/nsDialogs/Readme.html}{nsDialogs}: Added link support
+
+\S2{} Translations
+
+\b Bulgarian corrections
+
+\b Fixed Japanese and Norwegian Nynorsk MUI line breaks (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1817289}{bug #1817289})
+
+\S2{} Build System
+
+\b Check compiler's \e{-m32} flag before the linker's to avoid gcc segfault
+
+\H{v2.31} 2.31
+
+Released on September 29th, 2007
+
+\S1{v2.31-rl} Release Notes
+
+\b Please continue to report any issues and suggestions regarding \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2}. Input for the previous version was very helpful in improving MUI2.
+
+\S1{v2.31-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Added BST_* definitions to WinMessages.nsh (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1792422}{bug #1792422})
+
+\b Added \R{setregview}{SetRegView} \e{lastused}
+
+\b Minor documentation improvements
+
+\b \R{library}{Library} will now revert registry view settings (\R{setregview}{SetRegView}) after it's finished
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed empty welcome page with Chinese (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1786899}{bug #1786899})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed finish button text (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1789492}{bug #1789492})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed uninstaller comportments page text (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1793811}{bug #1793811})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: Fixed unused function warnings
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed header bitmap issues, including NOSTRETCH and compilation errors
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed language selection dialog
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed reboot finish page
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed unloading of nsDialogs on finish page
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Fixed unused variable warnings
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Fixed command line parsing error (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1796053}{bug #1796053})
+
+\S2{} Translations
+
+\b Korean corrections
+
+\b Persian improvements (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1776386}{patch #1776386})
+
+\b Romanian improvements (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1783853}{patch #1783853})
+
+\S2{} Build System
+
+\b Fixed build failures with MinGW's GCC 4 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1800834}{bug #1800834})
+
+\H{v2.30} 2.30
+
+Released on August 25th, 2007
+
+\S1{v2.30-rl} Release Notes
+
+\b This release includes a beta of \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2}. Please report any issues and suggestions.
+
+\b The format of Modern UI language files has been modified to better support external strings. Private language files should be converted (and submitted as a \W{http://sourceforge.net/tracker/?group_id=22049&atid=373087}{patch} in the spirit of open source).
+
+\S1{v2.30-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed a bug introduced in version 2.29 that caused invalid $SMPROGRAMS value on Windows 98 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1766268}{bug #1766268})
+
+\b \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 beta}: Simpler code, easier to extend and makes use of nsDialogs
+
+\S2{} Minor Changes
+
+\b Added InstallOptions.nsh with relevant usage macros, based on the old Modern UI macros
+
+\b Added LangFile.nsh allowing creation of langauge files that can be included with a single command with defaults for missing strings (when LANGFILE_DEFAULT is set)
+
+\b Added LB_ERR and CB_ERR to WinMessages.nsh (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1771644}{bug #1771644})
+
+\b Fixed \R{createdirectory}{CreateDirectory} logging (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1768584}{patch #1768584})
+
+\b Fixed escaping of quotes with $\\ in macros (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1713708}{bug #1713708})
+
+\b Minor documentation improvements
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.80}: New language files structure based on LangFile.nsh
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.80}: MUI_LANGDLL_DISPLAY now reads previous settings on silent installations as well
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.80}: Added MUI_CUSTOMFUNCTION_MOUSEOVERSECTION (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1762003}{patch #1762003})
+
+\S2{} Utilities and Plug-ins
+
+\b Various nsDialogs improvements including RTL support, more macros in nsDialogs.nsh and \L{../Docs/nsDialogs/Readme.html}{initial documentation}
+
+\S2{} Translations
+
+\b Catalan returns
+
+\b Danish corrections
+
+\b Slovak corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1762627}{patch #1762627})
+
+\S2{} Build System
+
+\b More HPUX fixes (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1755148}{bug #1755148}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1753063}{bug #1753063}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1758873}{bug #1758873}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1758863}{patch #1758863})
+
+\b Ignore known failing tests by default on POSIX
+
+\H{v2.29} 2.29
+
+Released on July 14th, 2007
+
+\S1{v2.29-rl} Release Notes
+
+\b The most notable addition in this release is nsDialogs - a faster and far more capable replacement for InstallOptions. It allows creating controls of any type directly from the script and removes the need to mess with slow INI files. It integrates directly into the script by calling functions for notification, including change notification for edit boxes. \W{http://nsis.sourceforge.net/Community}{Speak up} if you have any suggestions/comments/patches for it.
+
+\S1{v2.29-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added \L{../Examples/nsDialogs}{nsDialogs} - a replacement for InstallOptions
+
+\S2{} Minor Changes
+
+\b Disable Windows error messages for the entire installer and not just for an incomplete list of fail-points (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1741061}{bug #1741061})
+
+\b Fixed incorrect large version handling of \R{getfileversion}{GetFileVersion} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1742255}{bug #1742255}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1742562}{patch #1742562})
+
+\b Fixed the ReverseSection macro in Sections.nsh (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1742793}{bug #1742793})
+
+\b Minor documentation improvements
+
+\b Simplified \R{readreg_multi_sz}{REG_MULTI_SZ reader}
+
+\b Use SHGetFolderPath where available to better support all users' folders
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/Banner/Readme.txt}{Banner}: Avoid possible hangs when called from page callbacks (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1743801}{bug #1743801})
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: added /TRANSLATE2 for more "translator-friendly" strings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1656076}{patch #1656076})
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: support downloads over 2gb (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1723131}{patch #1723131})
+
+\S2{} Translations
+
+\b Added International Spanish
+
+\S2{} Build System
+
+\b Added support for HPUX (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1714416}{patch #1714416})
+
+\H{v2.28} 2.28
+
+Released on June 8th, 2007
+
+\S1{v2.28-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added a workaround for a Windows 2000 bug that caused infinite loops when hitting a key in the instilfes page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1733692}{bug #1733692})
+
+\S2{} Minor Changes
+
+\b Improved compiler error strings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1722147}{patch #1722147})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_STARTMENUPAGE_BGCOLOR and MUI_DIRECTORYPAGE_BGCOLOR (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1706187}{patch #1706187})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_LANGDLL_ALLLANGUAGES that forces the language selection dialog to display all languages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1724876}{patch #1724876})
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions}: corrected documentation of TxtColor (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1716614}{bug #1716614})
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: added compatibility with some buggy servers that don't close the connection (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1713562}{bug #1713562})
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: fixed 100% CPU usage during domain resolution (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1713560}{bug #1713560})
+
+\S2{} Translations
+
+\b Valencian and Catalan are no longer installed (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1558822}{patch #1558822})
+
+\S2{} Build System
+
+\b Added IGNORETESTS for ignoring certain test files
+
+\b Added wxWidgets to the requirement list
+
+\b \L{../Docs/System/System.html}{System} now builds with GCC, but without System::Get and System::Call (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1711089}{patch #1711089})
+
+\H{v2.27} 2.27
+
+Released on May 5th, 2007
+
+\S1{v2.27-rl} Release Notes
+
+\b This is a quick-fix release that addresses a bug introduced in the last version, 2.26, that caused $PROGRAMFILES and $COMMONFILES to translate into random strings in the uninstaller.
+
+\S1{v2.27-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed a bug introduced in 2.26 that made $PROGRAMFILES and $COMMONFILES unavailable in the uninstaller
+
+\S2{} Minor Changes
+
+\b Disable the X button on InstallOptions pages when CancelEnabled is 0
+
+\b Fixed incomplete MessageBox usage line (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1709460}{bug #1709460})
+
+\S2{} Build System
+
+\b Added \c{TOOLSET} option to allow selection of specific build tools (e.g. \c{scons TOOLSET=mingw})
+
+\H{v2.26} 2.26
+
+Released on April 27th, 2007
+
+\S1{v2.26-rl} Release Notes
+
+\b Installation on x64 systems is now fully supported with $PROGRAMFILES64, \R{setregview}{SetRegView} and \R{library}{Library}'s LIBRARY_X64 option.
+
+\S1{v2.26-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added LIBRARY_X64 option for \R{library_install}{InstallLib} and \R{library_uninstall}{UnInstallLib} for installing and uninstalling x64 libraries
+
+\b Added \R{varconstant}{$PROGRAMFILES32}, \R{varconstant}{$PROGRAMFILES64}, \R{varconstant}{$COMMONFILES32} and \R{varconstant}{$COMMONFILES64}
+
+\S2{} Minor Changes
+
+\b Added \R{varconstant}{$EXEPATH} and \R{varconstant}{$EXEFILE}
+
+\b Added $(^Language) language string which holds the language name (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1235616}{RFE #1235616})
+
+\b Added LIBRARY_IGNORE_VERSION option for \R{library_install}{InstallLib} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1699435}{patch #1699435})
+
+\b Added VXD support for \R{getdllversionlocal}{GetDLLVersionLocal} on Windows NT/2000/XP/Vista (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1706624}{patch #1706624})
+
+\b Avoid \R{library}{Library} warning when UnInstallLib is unused (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1692761}{bug #1692761})
+
+\b Fixed error handling of \R{copyfiles}{CopyFiles} on Windows NT4 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=774966}{bug #774966})
+
+\b Fixed font name encoding broken since 2.24
+
+\b Fixed \L{../Examples/LogicLib.nsi}{LogicLib} duplicate labels across included files
+
+\b Fixed preservation of folder attributes with \c{\R{file}{File} /a} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1699474}{bug #1699474})
+
+\b Improved unused variable warning (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1701050}{bug #1701050})
+
+\b \R{library}{Library} macros no longer require version information for DLL files on POSIX
+
+\b Minor documentation improvements (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=971467}{RFE #971467})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_FINISHPAGE_CANCEL_ENABLED
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: added MUI_FINISHPAGE_REBOOTLATER_DEFAULT (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1143843}{RFE #1143843})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: block unsupported languages in the language selection dialog (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1564986}{RFE #1564986})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: disable Cancel button on the finish page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1267491}{bug #1267491})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI}: reduce flicker caused by MUI_HEADER_TRANSPARENT_TEXT (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1696610}{patch #1696610})
+
+\b Support \R{quit}{Quit} in \R{pagecallbacks_explain}{show page functions}
+
+\S2{} New/Changed Commands
+
+\b Added \R{setregview}{SetRegView} to allow access to the x64 registry view
+
+\b Installer icon support for \R{messagebox}{MessageBox} using MB_USERICON (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1682748}{patch #1682748}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1530388}{RFE #1530388})
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.47}: line breaks support in Link controls (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1683186}{patch #1683186}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1495949}{RFE #1495949}), added HLine and VLine controls (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1683189}{patch #1683189})
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: fixed broken command line parameter handling introduced in the last version (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1696534}{bug #1696534})
+
+\b \L{../Examples/UserInfo/UserInfo.nsi}{UserInfo}: return effective user group on Vista, added GetOriginalAccountType (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1687456}{patch #1687456}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1684777}{bug #1684777})
+
+\S2{} Translations
+
+\b Added Afrikaans translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1699558}{patch #1699558})
+
+\b French corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1676101}{patch #1676101})
+
+\b German corrections
+
+\S2{} Build System
+
+\b Added SKIPTESTS option
+
+\b Avoid a lot of code warnings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1676243}{bug #1676243})
+
+\b Detect wxWidgets instead of assuming its existence on POSIX (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1672315}{bug #1672315})
+
+\b Fixed big-endian platform support broken since 2.24
+
+\H{v2.25} 2.25
+
+Released on March 31st, 2007
+
+\S1{v2.25-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added \L{../Include/Memento.nsh}{Memento.nsh} for easy persistency of user selections across different runs of the installer (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1677624}{RFE #1677624})
+
+\b Fixed a bug introduced in 2.24 that allowed the license page to be skipped even with agreement check box or radio buttons (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1664428}{bug #1664428})
+
+\S2{} Minor Changes
+
+\b Added Vista manifest to StartMenu.nsi example to avoid backward compatibility mode that moves shortcuts (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1664957}{bug #1664957})
+
+\b Both dashes and slashes are supported as switch prefixes on makensis.exe (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1661503}{bug #1661503})
+
+\b Delete uninstaller temporary directory on reboot (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1660626}{patch #1660626})
+
+\b Distribute \L{../Examples/Plugin}{Plug-in example} with the NSIS package and not only with the source code
+
+\b Fixed lossy Unicode conversion of dialog template strings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1662190}{bug #1662190})
+
+\b Fixed \L{../Include/Sections.nsh}{Sections.nsh} macros support for $0 as input (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1664648}{bug #1664648})
+
+\b Fixed uninstallers support for the /D= command line switch
+
+\b Improved logging of WriteReg commands
+
+\b Minor documentation updates and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1662419}{patch #1662419})
+
+\S2{} New/Changed Commands
+
+\b Added bitwise operators support for \R{define}{!define} /math (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1669513}{RFE #1669513})
+
+\b \R{scopepredefines}{__PAGEEX__} contains the page type (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1644712}{patch #1644712})
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.46}: Use installer's name for message boxes (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1661677}{bug #1661677})
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Use Escape button to close (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1666501}{RFE #1666501})
+
+\b \L{../Docs/Math/Math.txt}{Math}: Removed mathcrt.lib
+
+\b \L{../Docs/StartMenu/Readme.txt}{StartMenu}: Refuse empty paths (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1684751}{bug #1684751})
+
+\S2{} Translations
+
+\b Fixed Galician language files (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1663795}{bug #1663795})
+
+\S2{} Build System
+
+\b Added APPEND_LIBPATH and APPEND_CPPATH instead of the malfunctioning CPPPATH and LIBPATH
+
+\b Added ChangeLog to source code package (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1680508}{patch #1680508})
+
+\b Avoid some warnings on VS2005 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1667950}{patch #1667950})
+
+\b Fixed lzma test segfault on POSIX (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1666873}{bug #1666873})
+
+\b More strict-aliasing compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1635841}{bug #1635841})
+
+\b NSIS Menu finally built from source
+
+\H{v2.24} 2.24
+
+Released on February 17th, 2007
+
+\S1{v2.24-cl} Changelog
+
+\S2{} Major Changes
+
+\b \R{library}{Library} uninstall-reinstall-reboot problems workaround (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1097642}{bug #1097642})
+
+\b Minimized number of cases where an error message appears in silent mode
+
+\b New compiler predefines for \R{scopepredefines}{code scope} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1644712}{patch #1644712})
+
+\S2{} Minor Changes
+
+\b Added \R{usagereference}{/P command line option} for setting process priority of makensis (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1638974}{patch #1638974})
+
+\b Added support for 64-bit PE on POSIX to \R{getdllversionlocal}{GetDLLVersionLocal} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1643633}{patch #1643633})
+
+\b Append last part of \R{ainstalldir}{InstallDir} only to $INSTDIR on directory pages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1174184}{bug #1174184})
+
+\b Avoid permissions change of output files for \R{linefind}{LineFind} and \R{filejoin}{FileJoin} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1631773}{bug #1631773})
+
+\b Fixed erroneous warnings on uninstall sections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1631889}{bug #1631889})
+
+\b Fixed lossy Unicode conversion in resource editor (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1083492}{bug #1083492})
+
+\b Ignore invalid preprocessor commands in ignored block or comments
+
+\b Made \R{viaddversionkey}{VIAddVersionKey} only query language tables instead of creating them and generating warnings (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1626504}{bug #1626504})
+
+\b Minor documentation updates and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1642107}{bug #1642107}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1649187}{patch #1649187})
+
+\b Warn when continuing a comment line using backslash (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1554178}{bug #1554178})
+
+\S2{} New/Changed Commands
+
+\b \R{regdll}{RegDLL} and \R{unregdll}{UnregDLL} now use LOAD_WITH_ALTERED_SEARCH_PATH, so there's no need to use \R{setoutpath}{SetOutPath} to set the working directory (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1638191}{bug #1638191})
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.45}: Added FOCUS flag (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1634704}{patch #1634704}) and fixed paste with ONLY_NUMBERS flag (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1652075}{bug #1652075})
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: settings in HKCU instead of HKLM (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1411970}{bug #1411970}) and MRU menu accelerators
+
+\S2{} Translations
+
+\b Added Galician translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1631765}{patch #1631765})
+
+\S2{} Build System
+
+\b Added a workaround for building on x64 POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1646170}{bug #1646170})
+
+\b Added a workaround for strict-aliasing compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1635841}{bug #1635841})
+
+\b Added compression tests
+
+\b Added STRIP, APPEND_CCFLAGS and APPEND_LINKFLAGS build options
+
+\b Fixed SCons 0.96.94 compatibility
+
+\H{v2.23} 2.23
+
+Released on January 13th, 2007
+
+\S1{v2.23-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Fixed compiler crash on Mac OS X (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1611866}{patch #1611866})
+
+\b Fixed deletion of start menu icons in NSIS installer on Vista (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1611251}{bug #1611251})
+
+\S2{} Utilities and Plug-ins
+
+\b Fixed incorrect \L{../Docs/nsExec/nsExec.txt}{nsExec} message handling in silent mode (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1605581}{bug #1605581})
+
+\b Fixed \L{../Docs/System/System.html}{System} crash when System::Store is called on an empty private stack (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1620178}{bug #1620178})
+
+\b Fixed \L{../Docs/System/System.html}{System} crash with parenthesis in filename (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1616267}{bug #1616267})
+
+\b Minor VPatch documentation enhancements (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1624292}{patch #1624292})
+
+\S2{} Build System
+
+\b Fixed build failures on mingw32 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1610773}{bug #1610773})
+
+\b Fixed build problems with MSTOOLKIT=yes
+
+\H{v2.22} 2.22
+
+Released on November 27th, 2006
+
+\S1{v2.22-rl} Release Notes
+
+\b Some changes have been made to the credit and license files in order to avoid copyrights and license related confusions. This does not change in any way how NSIS should or could be used. NSIS itself is still licensed with the permissive BSD-like \W{http://nsis.sourceforge.net/License}{zlib license}.
+
+\b Upgrade is recommended for early adopters of WinVer.nsh, due to a bug in Windows 98 and ME detection.
+
+\S1{v2.22-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Fixed context menu not disappearing when moving from instfiles page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1115825}{bug #1115825})
+
+\b Fixed \L{../Include/WinVer.nsh}{WinVer.nsh}'s detection of Windows 98 and ME (reported on the \W{http://forums.winamp.com/showthread.php?s=&threadid=257994&highlight=winver.nsh}{forum})
+
+\b Fixed WriteUninstaller failure to overwrite read-only uninstallers (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1542530}{bug #1542530})
+
+\b Licensed lzma under \R{cpl-license}{CPL} with a \R{lzma-special-exception}{special exception}, instead of LGPL
+
+\b Minor documentation updates and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1584618}{bug #1584618}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1589877}{bug #1589877})
+
+\b Updated comments in MUI examples (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1595500}{bug #1595500})
+
+\S2{} New/Changed Commands
+
+\b Added `highest` option for \R{requestexecutionlevel}{RequestExecutionLevel}
+
+\S2{} Translations
+
+\b Added Uzbek translation
+
+\b Fixed corruption in Lithuanian (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1602673}{bug #1602673})
+
+\b Minor Breton fixes
+
+\b Slovenian corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1590108}{patch #1590108})
+
+\S2{} Build System
+
+\b Added \W{http://msdn.microsoft.com/vstudio/express/visualc/}{Microsoft Visual C++ 2005 Express} support
+
+\b SCons requirement upgraded to 0.96.93
+
+\H{v2.21} 2.21
+
+Released on October 20th, 2006
+
+\S1{v2.21-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added \L{../Include/WinVer.nsh}{WinVer.nsh} for easy Windows version comparisons
+
+\b Upgraded to lzma sdk 4.43 for faster compression
+
+\S2{} Minor Changes
+
+\b Added Vista support to \R{getwindowsversion}{GetWindowsVersion}
+
+\b Added \L{../Include/x64.nsh}{x64.nsh} including a few simple macros for handling x64 installations
+
+\b Fixed a handle leak in \R{locate}{Locate}
+
+\b Minor documentation updates and fixes
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.76}: Added MUI_ABORTWARNING_CANCEL_DEFAULT (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1547844}{RFE #1547844})
+
+\S2{} New/Changed Commands
+
+\b Added \R{requestexecutionlevel}{RequestExecutionLevel} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1524709}{RFE #1524709})
+
+\S2{} Translations
+
+\b Added Valencian translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1558822}{patch #1558822})
+
+\b Bulgarian corrections
+
+\b Slovenian corrections
+
+\S2{} Build System
+
+\b SCons requirement upgraded to 0.96.92
+
+\H{v2.20} 2.20
+
+Released on September 9th, 2006
+
+\S1{v2.20-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Better LogicLib errors (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1537976}{bug #1537976})
+
+\b Fixed incomplete plug-in call error messages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535995}{bug #1535995})
+
+\b Fixed incorrect file timestamp querying on big-endian platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1536377}{bug #1536377})
+
+\b Minor documentation updates and fixes
+
+\S2{} Translations
+
+\b Danish corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1548190}{bug #1548190})
+
+\b Fixed incorrectly encoded Turkish translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1542765}{bug #1542765})
+
+\b French corrections
+
+\b Italian corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1546183}{bug #1546183})
+
+\b Spanish corrections
+
+\b Swedish corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1542680}{bug #1542680})
+
+\b Ukrainian corrections
+
+\S2{} Build System
+
+\b Fixed NSIS_CONFIG_CONST_DATA_PATH being ignored on POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1515592}{bug #1515592})
+
+\H{v2.19} 2.19
+
+Released on August 6th, 2006
+
+\S1{v2.19-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Fixed \R{system}{!system} and \R{packhdr}{!packhdr} failure with quoted long file names (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1509909}{bug #1509909})
+
+\b Fixed build problems on 64bit platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504772}{bug #1504772})
+
+\b Fixed negative total size for data larger than 2GB in script compilation summary (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1468852}{bug #1468852})
+
+\b Minor documentation updates and fixes
+
+\b Replaced \R{detect.netframework}{IsDotNETInstalled} with a simpler and better version
+
+\S2{} New/Changed Commands
+
+\b Made \R{if}{!if} compare strings case insensitively, like \R{strcmp}{StrCmp} and \R{ifdef}{!ifdef}
+
+\S2{} Plug-ins
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: fixed random DNS errors (\W{http://forums.winamp.com/showthread.php?s=&threadid=247723}{reported in the forums})
+
+\b \L{../Docs/System/System.html}{System}: fixed a bug that caused stack corruption and stopped the installer from deleting System.dll when a function with no arguments was called (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535005}{bug #1535005})
+
+\b \L{../Docs/System/System.html}{System}: fixed wrong return values for functions that return \c{short} or \c{char} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535007}{bug #1535007})
+
+\S2{} Translations
+
+\b Added Norwegian Nynorsk translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1503208}{patch #1503208})
+
+\b Fixed typos in the French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1531874}{bug #1531874})
+
+\H{v2.18} 2.18
+
+Released on July 1st, 2006
+
+\S1{v2.18-cl} Changelog
+
+\S2{} Minor Changes
+
+\b CRC32 implementation used potentially non-32bit types (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504758}{bug #1504758})
+
+\b Fixed errors on multiple inclusion of \R{headers}{useful headers}
+
+\b Fixed \R{getfileattributes}{GetFileAttributes}
+
+\b Fixed incorrect text on browse dialog with \R{onverifyinstdir}{.onVerifyInstDir} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504297}{bug #1504297})
+
+\b Fixed \R{library}{Library}'s implementation on POSIX
+
+\b Minor documentation updates and fixes
+
+\S2{} Translations
+
+\b Added Irish translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1503639}{patch #1503639})
+
+\b Catalan corrections (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504104}{bug #1504104})
+
+\b Dutch corrections
+
+\b Finnish corrections (Mozilla bug #341643)
+
+\b Fixed Serbian grammar and typos
+
+\b Italian corrections (Mozilla bug #340450)
+
+\b Polish corrections (Mozilla bug #224532)
+
+\b Portuguese (Brazil) corrections (Mozilla bug #340885)
+
+\b Romanian corrections (Mozilla bug #340645)
+
+\b Thai corrections
+
+\b Turkish corrections (Mozilla bug #340511)
+
+\H{v2.17} 2.17
+
+Released on May 19th, 2006
+
+\S1{v2.17-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Fixed build failures and segfaults on PowerPC Mac OS X (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1474597}{bug #1474597}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1481044}{bug #1481044})
+
+\b Fixed \R{library}{Library}'s TLB version interpretation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1471341}{bug #1471341})
+
+\b Fixed possible stack corruption when using TypeLib.dll on an invalid TLB
+
+\b Fixed RMDir deletion failure of read-only folders (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1481664}{bug #1481664})
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Fixed toolbar compressor selection menu, broken in the previous version (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1466486}{bug #1466486})
+
+\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1469306}{bug #1469306}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1491616}{bug #1491616})
+
+\S2{} Translations
+
+\b Added missing Basque and Welsh files (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1469471}{bug #1469471})
+
+\b Brazilian Portuguese updates
+
+\b Bulgarian fixes
+
+\b Fixed a typo in Hebrew translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1474587 }{bug #1474587})
+
+\b Icelandic fixes and improvements
+
+\H{v2.16} 2.16
+
+Released on April 7th, 2006
+
+\S1{v2.16-rn} Release Notes
+
+\b The script compiler, makensis, builds and works on big-endian platforms. This change enlarges the portability range of NSIS to theoretically every POSIX platform. Please \W{http://sourceforge.net/tracker/?group_id=22049&atid=373085}{report} any incompatibility with specific platforms or build-tools.
+
+\b The internal changes made to support big-endian platforms also pave the road to x64 installers. There is now a central function which writes data to disk. This function currently only converts the endianity of integers, but it can be changed to selectively write 64-bit integers. Hopefully, there'll soon be a simple method of compiling a script to both x86 and x64 installers.
+
+\b Changing Source/exehead/fileform.h to alter the internal structure of installers is no longer enough. The compiler has its own definitions of the structures which must also be changed in Source/fileform.cpp. In the future, fileform.cpp should be automatically generated from fileform.h, but for now, the synchronization must be done manually.
+
+\S1{v2.16-cl} Changelog
+
+\S2{} Major Changes
+
+\b Big-endian platforms are now fully supported by makensis
+
+\b \R{library}{Library} now available on non-Windows platforms as well, although it requires the installed DLL to have version information
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW 2.1}: added "Cancel compilation" menu item
+
+\S2{} New/Changed Commands
+
+\b Added /utcdate switch to \R{define}{!define} for UTC dates (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1459210}{RFE #1459210})
+
+\S2{} Minor Changes
+
+\b Added an optional timestamp in the log - NSIS_CONFIG_LOG_TIMESTAMP build setting (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1460586}{RFE #1460586})
+
+\b Added NSIS_WIN32_MAKENSIS define, defined only when compiling on Windows
+
+\b Exported validate_filename to plug-ins
+
+\b Fixed a crash in CResourceEditor when adding resources to a PE that already contains named resources
+
+\b Fixed a small resource leak in the TypeLib::GetLibVersion plug-in function
+
+\b Fixed CResourceEditor input sanity checks
+
+\b Fixed incorrect \R{FileOpen}{FileOpen} input validation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1459789}{bug #1459789})
+
+\b Fixed \R{library}{Library} failure with DLLs marked as read-only
+
+\b Fixed lzma's POSIX implemention thread synchronization issues and resource leaks
+
+\b Fixed makensis self-path detection on non-Windows platforms (NSIS_CONFIG_CONST_DATA_PATH=no)
+
+\b Fixed replace_icon and and generate_uninstall_icon_data icon validation
+
+\b Made external CHM links safer to script exceptions (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1449879}{bug #1449879})
+
+\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1077439}{bug #1077439}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1448374}{bug #1448374}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1464446}{RFE #1464446})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.75}: added show function for the start menu page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1448176}{RFE #1448176}), added MUI_HEADER_TRANSPARENT_TEXT for transparent header texts (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1447766}{RFE #1447766})
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: better header detection for better compatibility with proxies like WinProxy (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1445735}{bug #1445735}), fail if no headers are sent, faster downloads (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1465378}{patch #1465378})
+
+\b \L{../Docs/StartMenu/Readme.txt}{StartMenu}: validate user input (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1440636}{bug #1440636})
+
+\S2{} Translations
+
+\b Added Basque translation
+
+\b Minor Slovenian fixes
+
+\S2{} Build System
+
+\b Added code tests for CResourceEditor and CDialogTemplate
+
+\b Automatically pass build settings to script, eliminating the need to edit build.cpp for new settings
+
+\b Fixed $PREFIX expansion during installation on POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1456943}{bug #1456943})
+
+\b Fixed CHM dependencies
+
+\b Fixed compatibility issue with EclipseNSIS (version wasn't prefixed with 'v')
+
+\b Fixed GCC 4.1 compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1456861}{patch #1456861})
+
+\b Test for -Wl,-Map availability
+
+\H{v2.15} 2.15
+
+Released on March 4th, 2006
+
+\S1{v2.15-cl} Changelog
+
+\S2{} New/Changed Commands
+
+\b Added \R{if}{!if} for more complex compile-time flow control (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1412982}{patch #1412982})
+
+\b Added /math switch to \R{define}{!define} for simple compile-time mathematical operations (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1372561}{patch #1372561})
+
+\S2{} Minor Changes
+
+\b Added more replacement options to \R{wordreplace}{WordReplace}
+
+\b Added NSIS_CONFIG_LOG_STDOUT configuration option for logging to stdout
+
+\b Added path translation for \R{addincludedir}{!addincludedir} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1431958}{bug #1431958})
+
+\b \R{configread}{ConfigRead} now sets the error flag, if the entry wasn't found
+
+\b Documented \R{nop}{Nop}
+
+\b Edit box in the installation directory selection page is now always LTR, even for RTL languages
+
+\b Fixed improper iterator usage in dir_reader (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1431593}{bug #1431593})
+
+\b Fixed \c{\R{messagebox}{MessageBox} MB_TOPMOST} not showing up, if used as the first sections' instruction (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1400995}{bug #1400995})
+
+\b Fixed \R{rmdir}{RMDir} skipping files with names starting with two dots (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1420657}{bug #1420657})
+
+\b \R{getoptions}{GetOptions} now sets the error flag, if the option wasn't found
+
+\b Made \R{include}{!include} stop searching the include directories after a match is found (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1441877}{bug #1441877})
+
+\b Made \R{headers}{header functions} use /NOUNLOAD for faster plug-in calls
+
+\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1420352}{bug #1420352}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1432423}{bug #1432423})
+
+\b More informative \R{aicon}{Icon} error messages (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1174742}{bug #1174742})
+
+\b New case sesnsitive functions in headers: \R{wordfinds}{WordFindS}, \R{wordfind2xs}{WordFind2XS}, \R{wordfind3xs}{WordFind3XS}, \R{wordreplaces}{WordReplaceS}, \R{wordadds}{WordAddS}, \R{wordinserts}{WordInsertS}, \R{strfilters}{StrFilterS}, \R{textcompares}{TextCompareS}, \R{configreads}{ConfigReadS}, \R{configwrites}{ConfigWriteS}, \R{getoptionss}{GetOptionsS}
+
+\S2{} Translations
+
+\b Added proper language identifier for Breton
+
+\b Breton translation improvements
+
+\b Bulgarian translation improvements
+
+\b Fixed Czech grammer mistakes (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1427189}{patch #1427189})
+
+\b Fixed Italian typo (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1416988}{patch #1416988})
+
+\b Updated Mongolian
+
+\S2{} Build System
+
+\b Fixed __BIG_ENDIAN__ definition
+
+\b Fixed improper handling of paths passed to the compiler (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1434215}{bug #1434215})
+
+\b Improved GCC 4.2 compatibility (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1434174}{patch #1434174})
+
+\b Moved NSIS_VARS_SECTION from config.h to scons
+
+\b Write all configuration to sconf.h instead of passing it on the command line
+
+\H{v2.14} 2.14
+
+Released on January 24th, 2006
+
+\S1{v2.14-rn} Release Notes
+
+\b This release fixes a critical bug that caused installers using plug-ins to fail loading on Windows 9x and NT. Upgrading from 2.13 is highly recommended.
+
+\S1{v2.14-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed a bug that corrupted $TEMP under Windows 9x and NT and caused InitPluginsDir to fail (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1412159}{bug #1412159})
+
+\S2{} Minor Changes
+
+\b Fixed a possible buffer overflow caused by long values of $0, when using large NSIS_MAX_STRLEN builds (above 4096)
+
+\H{v2.13} 2.13
+
+Released on January 21st, 2006
+
+\S1{v2.13-rn} Release Notes
+
+\b Language detection has changed. The default language is now set to the user's user-interface language instead of the locale language, as suggested by \W{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_0xrn.asp}{MSDN}. To restore the old behavior, use \c{System::Call "kernel32::GetUserDefaultLangID()i.a"} in \R{oninit}{.onInit}.
+
+\S1{v2.13-cl} Changelog
+
+\S2{} Major Changes
+
+\b Default $LANGUAGE value is now based on user's UI language instead of locale (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1324734}{bug #1324734})
+
+\S2{} New/Changed Commands
+
+\b Added \R{strcmps}{StrCmpS} for case sensitive string comparison (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1381929}{patch #1381929})
+
+\S2{} Minor Changes
+
+\b Added system time support to \R{filefunc}{GetTime}
+
+\b Fixed components page checkbox redraw problem under Windows 95 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1397031}{bug #1397031})
+
+\b Fixed constant maximum string length in \R{FileRead}{FileRead} (changed from 1024 to NSIS_MAX_STRLEN)
+
+\b Fixed empty $INSTDIR value in directory page show callback function (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1209843}{bug #1209843})
+
+\b Fixed relative jumps ignoring \c{\R{file}{File} /nonfatal} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1299100}{bug #1299100})
+
+\b Fixed typo in NSIS Menu (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1387748}{bug #1387748})
+
+\b Issue a warning when \c{\R{abrandingtext}{BrandingText} /TRIM*} actually expands the label (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1362443}{bug #1362443})
+
+\b Made \c{\R{rmdir}{RMDir} /r} remove Unicode paths as well using short names (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1378785}{bug #1378785})
+
+\b Minor documentation improvements and fixes
+
+\S2{} Utilities and Plug-ins
+
+\b Fixed System plug-in \L{../Docs/System/System.html}{documentation} of callback functions (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1403608}{bug #1403608})
+
+\b Fixed System plug-in heap corruption (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1403601}{bug #1403601})
+
+\S2{} Translations
+
+\b Mongolian translation improvements
+
+\S2{} Build System
+
+\b Better installation under POSIX with proper $\{NSISDIR\} detection and appropriate directory paths (/usr/bin, /usr/share/doc, etc.)
+
+\H{v2.12} 2.12
+
+Released on December 17th, 2005
+
+\S1{v2.12-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed compile-time assertion failure for big uninstallers (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1380447}{bug #1380447})
+
+\b \R{tutorial}{Tutorial} enhancements (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1366431}{bug #1366431})
+
+\S2{} New/Changed Commands
+
+\b Added /NONFATAL switch to \R{include}{!include} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1372048}{patch #1372048})
+
+\S2{} Minor Changes
+
+\b Clearer error message for double label definition (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1374675}{patch #1374675})
+
+\b Fixed browsed network root directory not being accepted (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1331292}{bug #1331292})
+
+\b Fixed incorrect \R{acompletedtext}{CompletedText} parsing (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349810}{bug #1349810})
+
+\b Fixed sdbarker_tiny.exe's compatibility with NSIS_CONFIG_LOG (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1365869}{bug #1365869})
+
+\b Implemented nicer registry commands log (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1340255}{patch #1340255})
+
+\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1355653}{patch #1355653}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349810}{bug #1349810})
+
+\b Multi-line comments are no longer ignored inside !ifdef'd block
+
+\S2{} Utilities and Plug-ins
+
+\b Added drag & drop support for zip2exe
+
+\b Better drag & drop error handling in MakeNSISw
+
+\b Fixed Math plug-in array issues (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1235875}{bug #1235875})
+
+\S2{} Translations
+
+\b Added browse button Danish translation
+
+\b Breton translation fixes and improvements
+
+\b Fixed finish button Swedish translation
+
+\S2{} Build System
+
+\b Fixed endianess detection problem on POSIX platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1370179}{bug #1370179})
+
+\b Generated installers use nsis-VERSION-setup.exe template
+
+\H{v2.11} 2.11
+
+Released on November 12th, 2005
+
+\S1{v2.11-rl} Release Notes
+
+\b Rebuilding existing installers that use \c{\R{asetoverwrite}{SetOverwrite} ifdiff}, might falsely overwrite files once
+
+\S1{v2.11-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added a workaround for a bug that prevented detection of some special folders (e.g. \R{varother}{$DESKTOP} for all users) on Windows 9x (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1008632}{bug #1008632})
+
+\b Fixed a crash caused by copying very long details to clipboard in the installation log page (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1314004}{bug #1314004})
+
+\S2{} New/Changed Commands
+
+\b Added \R{tempfile}{!tempfile}, \R{delfile}{!delfile} and \R{appendfile}{!appendfile} for cross-platform handling of text files during compilation
+
+\b Fixed \R{achangeui}{ChangeUI} input handling (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1348473}{patch #1348473})
+
+\b \R{ssectionin}{SectionIn} RO is no longer case sensitive
+
+\S2{} Minor Changes
+
+\b Added support URL to the NSIS package entry in the Add/Remove control panel (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373088&aid=1349867}{RFE #1349867})
+
+\b Fixed comment handling (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1324898}{patch #1324898})
+
+\b Fixed duplicate RegTool test in \R{library}{Library}
+
+\b Fixed invalid language selection according to \R{varother}{$LANGUAGE} in \R{oninit}{.onInit} when only primary language match is found (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1328629}{bug #1328629})
+
+\b Fixed missing RegTool error after install-reboot-install-reboot sequence with \R{library}{Library}
+
+\b Fixed portability issues with \L{../Examples/LogicLib.nsi}{LogicLib} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1320297}{bug #1320297}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1248336}{patch #1248336})
+
+\b Fixed \c{\R{asetoverwrite}{SetOverwrite} ifdiff} always overwriting on FAT file system (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1338423}{bug #1338423})
+
+\b Fixed wrong size of red.bmp check box image
+
+\b Larger browse button for localized texts (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1314682}{bug #1314682})
+
+\b Minor documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349810}{bug #1349810})
+
+\b Sort language names in language selection dialog
+
+\b Use the temporary directory for \R{library}{Library} temporary files, instead of the possibly write-protected installation directory
+
+\S2{} Utilities and Plug-ins
+
+\b Added /OEM switch for OEM to ANSI conversion in \L{../Docs/nsExec/nsExec.txt}{nsExec} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1346737}{patch #1346737})
+
+\b Added /PROXY switch for manual proxy configuration in \L{../Docs/NSISdl/ReadMe.txt}{NSISdl} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1334166}{patch #1334166})
+
+\b Added solid compression check box to zip2exe (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1334155}{patch #1334155})
+
+\b Added stdin in MakeNSISw to allow xcopy to run
+
+\b Added timestamp handling to zip2exe (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1349853}{bug #1349853})
+
+\b Fixed input validation of \L{../Docs/nsExec/nsExec.txt}{nsExec}
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.44}: Added HWND and HWND2 entries to the INI file to avoid messy calculations of the correct control id
+
+\S2{} Translations
+
+\b Slovenian translation fixes and improvements
+
+\S2{} Build System
+
+\b Added a workaround for linking errors caused by a bad library included in recent Platform SDK versions
+
+\b Check for and use -pthread linker flag
+
+\b Improved FreeBSD portability
+
+\b Nicer error message for SCons version older than 0.96.90
+
+\H{v2.10} 2.10
+
+Released on October 4th, 2005
+
+\S1{v2.10-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added auto completion to the directory page
+
+\b Fixed a bug, introduced in 2.09, that caused \R{aallowrootdirinstall}{AllowRootDirInstall} to fail
+
+\b Fixed a thread leak in the POSIX implementation of LZMA
+
+\b \L{../Docs/VPatch/Readme.html}{VPatch 3.1}: MD5 checksums, better performance, and some bug fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1219806}{bug #1219806})
+
+\S2{} Minor Changes
+
+\b Added rounding of required and available size on the directory page (1.59 => 1.6 instead of 1.5)
+
+\b Added WS_EX_LEFTSCROLLBAR style in RTL mode (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1283528}{bug #1283528})
+
+\b Fixed alteration of the working directory by FileRequest in InstallOptions (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1287731}{bug #1287731})
+
+\b Fixed bad mnemonic key in MakeNSISw menu (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1288159}{bug #1288159})
+
+\b Fixed negative size values showing up after the decimal point in the directory page for very big sizes
+
+\b Minor documentation improvements and fixes
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.74}: Fixed compile error when checkboxes are used on multiple finish pages
+
+\S2{} Translations
+
+\b Fixed a bug in Slovenian translation that caused lots of missing language string warnings
+
+\b Fixed typos in Serbian translation
+
+\b Fixed typos in Thai translation
+
+\b Updated Simple Chinese translation
+
+\S2{} Build System
+
+\b Automatic fix for \W{http://forums.winamp.com/showthread.php?s=&threadid=179848}{VC6 SP6 compile error}
+
+\b Moved most of the configuration from config.h to the build system
+
+\b Removed all optimizations and symbol stripping in debug mode
+
+\b SCons requirement updated to 0.96.91
+
+\b VPatch can be built on POSIX as well
+
+\H{v2.09} 2.09
+
+Released on August 26th, 2005
+
+\S1{v2.09-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed a bug introduced in 2.08, that prevented uninstallers from deleting $INSTDIR
+
+\b Fixed a bug that caused "C:\\ " to be considered a valid installation directory, even without \R{aallowrootdirinstall}{AllowRootDirInstall}
+
+\S2{} New/Changed Commands
+
+\b \R{var}{Var} can now be used in sections and functions, but only with the /GLOBAL flag
+
+\S2{} Minor Changes
+
+\b Applied \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1248335}{patch #1248335} for greater portability of examples
+
+\b \R{filefunc}{FileFunc}: workaround for GetLongPathName which is not available on Windows 95 (Instructor)
+
+\b Fixed an unused label warning in \R{library}{Library}
+
+\b Fixed duplicate label errors in \L{../Examples/LogicLib.nsi}{LogicLib} and \R{library}{Library} when used in different files (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1243865}{bug #1243865})
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.73}: fixed checkboxes on uninstaller finish page or multiple finish pages
+
+\b \R{wordfunc}{WordFunc}: fixed incorrect replacement of first word in WordReplace, under some conditions (Instructor)
+
+\S2{} Translations
+
+\b Renamed Malaysian to Malay
+
+\b Update Thai translation to the latest version
+
+\b Updated Kurdish MUI translation to the latest version
+
+\S2{} Build System
+
+\b Fixed a number of build problems on POSIX platforms which caused plug-ins to malfunction and installers to crash
+
+\H{v2.08} 2.08
+
+Released on July 23rd, 2005
+
+\S1{v2.08-rn} Release Notes
+
+\b The Archive has been replaced with a \W{http://nsis.sourceforge.net/wiki/}{Wiki}. The new Wiki allows everyone to edit all pages so there's no longer need to hunt for the original author. It also allows everyone to upload plug-ins and not just administrators. And as if that's not enough, it looks better and provides easier and more feature-rich syntax.
+
+\S1{v2.08-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added Instructor's \R{headers}{header files of useful functions}
+
+\b \R{library}{Library} improvements: ordered registration after reboot, smaller RegTool and separate process for each registration to avoid conflicts (thanks stb)
+
+\S2{} Minor Changes
+
+\b Added Bosnian and Kurdish translations
+
+\b Added per-user nsisconf.nsh file in %APPDATA% or $HOME, depending on the platform (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1223041}{patch #1223041})
+
+\b Documentation improvements and fixes (including \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1202495}{bug #1202495}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1227610}{bug #1227610},
+\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1238686}{bug #1238686}, \W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1225167}{patch #1225167}, \W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1240601}{RFE #1240601})
+
+\b Fixed _?= being ignored, if the uninstaller path is not quoted and is separated with only space from _?=
+
+\b Fixed \R{library}{Library} failing on paths with spaces (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1234283}{bug #1234283})
+
+\b Fixed UpgradeDLL compilation error (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1230336}{bug #1230336})
+
+\b Improved French, Ukrainian and Luxembourgish translation
+
+\b Made \R{rmdir}{RMDir} set the error flag, if passed an invalid directory path (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1227553}{bug #1227553})
+
+\b Made uninstallers copy themselves into a subdirectory of the temporary directory to avoid DLLs left in the temporary directory from being loaded by the uninstaller (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1214319}{patch #1214319})
+
+\b Missing \R{langstring}{LangString} warning now uses the language name, if possible
+
+\b zip2exe: fixed restriction of extraction path length and updated to \W{http://www.zlib.net/}{zlib} 1.2.3 (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1226381}{bug #1226381})
+
+\S2{} Build System
+
+\b Added linker script to assure correct order of sections when building using GNU tools
+
+\b Added \c{test} target
+
+\b UIs are now built from source
+
+\H{v2.07} 2.07
+
+Released on June 20th, 2005
+
+\S1{v2.07-rn} Release Notes
+
+\b NSIS Update was removed and the update check was moved back to MakeNSISw (Help -> NSIS Update). Use the \R{build_nightly}{nightly builds} to get the latest compiled binaries from CVS.
+
+\b Solid compression is no longer the default for bzip2 and lzma, use \c{SetCompressor /SOLID bzip2} or \c{SetCompressor /SOLID lzma} for solid compression.
+
+\b Source code is no longer supplied with the installer package. Source code can be downloaded from CVS or from the \W{http://nsis.sourceforge.net/download/}{download page}.
+
+\b The directory structure of the installation has been changed. All documentation is now in the Docs folder and all examples are in the Examples folder.
+
+\S1{v2.07-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added /SOLID switch for \R{asetcompressor}{SetCompressor}
+
+\b New build system (see \k{build})
+
+\b Stubs (exeheads) are no longer compiled into makensis.exe, but kept in the Stubs folder
+
+\S2{} New/Changed Commands
+
+\b \R{enumregvalue}{EnumRegValue} sets the error flag, if the enumeration index is out of range (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1178756&group_id=22049&atid=373085}{bug #1178756})
+
+\b \R{expandenvstrings}{ExpandEnvStrings} now sets the error flag as the documentation states
+
+\b Made \R{file}{File} /oname throw an error if the first character is a quote
+
+\S2{} Minor Changes
+
+\b Added \R{varconstant}{$LOCALAPPDATA} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1172123}{RFE #1172123})
+
+\b Changed MUI dialogs charset from ANSI_CHARSET to DEFAULT_CHARSET (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1193736&group_id=22049&atid=373085}{bug #1193736}, \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1201712&group_id=22049&atid=373085}{bug #1201712})
+
+\b Fixed \R{varother}{$INSTDIR} changing, even if user clicked Cancel in browse dialog
+
+\b Fixed a crash in makensis when using \R{awindowicon}{WindowIcon} off (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1123353&group_id=22049&atid=373085}{bug #1123353})
+
+\b Fixed \R{call}{Call} :label in uninstall code
+
+\b Fixed compilation error without NSIS_CONFIG_COMPONENTPAGE
+
+\b Fixed compilation errors on various platforms (including \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1179116&group_id=22049&atid=373087}{patch #1179116}, \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1193692&group_id=22049&atid=373087}{patch #1193692})
+
+\b Fixed \R{createdirectory}{CreateDirectory} setting the error flag for directories with two consecutive backslashes (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1119442&group_id=22049&atid=373085}{bug #1119442})
+
+\b Fixed \R{library}{InstallLib} setting the error flag for new shared libraries (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1181951&group_id=22049&atid=373085}{bug #1181951})
+
+\b Fixed letters case in examples (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1184571&group_id=22049&atid=373087}{patch #1184571})
+
+\b Fixed logging state being reset after the directory page (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1168711&group_id=22049&atid=373085}{bug #1168711})
+
+\b Fixed overlapping icon in welcome page (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1221772&group_id=22049&atid=373085}{bug #1221772})
+
+\b Fixed \R{rmdir}{RMDir} /REBOOTOK setting the reboot flag when trying to delete non-existent directory (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1073792&group_id=22049&atid=373085}{bug #1073792})
+
+\b Minor documentation fixes and improvements (including \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1220940&group_id=22049&atid=373085}{bug #1220940})
+
+\b Removed NSIS Update, MakeNSISw checks for new versions again
+
+\S2{} Include Files
+
+\b More messages in \L{../Include/WinMessages.nsh}{WinMessages.nsh} (Shengalts Aleksander)
+
+\b Some more useful macros in \L{../Include/Colors.nsh}{Colors.nsh} (Joel)
+
+\S2{} Utilities and Plug-ins
+
+\b Fixed halibut segfaults on PowerPC (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1180886&group_id=22049&atid=373087}{patch #1180886})
+
+\b \L{../Docs/Math/Math.txt}{Math}: Fixed memory leak (brainsucker)
+
+\b zip2exe: upgraded to zlib 1.2.2
+
+\S2{} Translations
+
+\b Added Malaysian translation (Azwa)
+
+\b Added Welsh translation (Rhoslyn Prys)
+
+\b Fixed Breton NLF file (credits weren't commented)
+
+\b Fixed duplicate accelerator in French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1168652&group_id=22049&atid=373085}{bug #1168652})
+
+\b Improved French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1220277&group_id=22049&atid=373085}{bug #1220277})
+
+\b Updated Russian translation (Dmitry)
+
+\b Updated translation credits (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1223362&group_id=22049&atid=373087}{patch #1223362})
+
+\H{v2.06} 2.06
+
+Released on March 19th, 2005
+
+\S1{v2.06-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed a bug, introduced in 2.05, that made components selection not function properly if the first section in the script was a section group
+
+\b Fixed a bug, introduced in 2.05, that corrupted the state of section groups inside section groups (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155836&group_id=22049&atid=373085}{bug #1155836})
+
+\S2{} New/Changed Commands
+
+\b Added MB_RTLREADING style to \R{messagebox}{MessageBox} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1159701}{RFE #1159701})
+
+\b All registry instructions now accept SHCTX which is replaced with HKLM or HKCU on runtime according to \R{setshellvarcontext}{SetShellVarContext} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1124901}{RFE #1124901})
+
+\S2{} Minor Changes
+
+\b Added Belarusian and Icelandic language files
+
+\b Added components.c to the Makefile (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1123154&group_id=22049&atid=373087}{patch #1123154})
+
+\b Added missing \R{clearerrors}{ClearErrors} in \R{getwindowsversion}{GetWindowsVersion} (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155588&group_id=22049&atid=373085}{bug #1155588})
+
+\b Fixed a bug in install.sh that made it try to install a non existing directory
+
+\b Fixed a bug in the Russian language file distributed with 2.05
+
+\b Fixed a bug that caused SetFont to not function properly with RTL languages on Windows 9x (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1159700&group_id=22049&atid=373085}{bug #1159700})
+
+\b Fixed a bug, introduced in 2.05, that caused problems with \R{ainsttype}{InstType} /COMPONENTSONLYONCUSTOM (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1155060&group_id=22049&atid=373085}{bug #1155060})
+
+\b Fixed a crash caused by compiling large uninstallers (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1144763&group_id=22049&atid=373085}{bug #1144763})
+
+\b Fixed compile error without NSIS_CONFIG_CRC_SUPPORT
+
+\b Fixed compile errors of MinGW on POSIX for source code under Contrib (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1164307&group_id=22049&atid=373087}{patch #1164307})
+
+\b Fixed plug-ins directory initialization for extremely restricted guest users with no directory listing access to the temporary directory
+
+\b Made install.sh not use $(tempfile) and install files under /usr/share instead of /lib (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1120399&group_id=22049&atid=373087}{patch #1120399})
+
+\b Minor documentation updates and fixes
+
+\b Updated Slovenian, Serbian and Serbian Latin language files
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/AdvSplash/advsplash.txt}{AdvSplash}: Fixed a small memory leak (Thanks Takhir)
+
+\b \L{../Docs/StartMenu/Readme.txt}{StartMenu}: Added support for \R{setctlcolors}{SetCtlColors} (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=711900}{RFE #711900})
+
+\H{v2.05} 2.05
+
+Released on February 4th, 2005
+
+\S1{v2.05-rn} Release Notes
+
+\b A lot of changes were made to the behavior of sections/components and related instructions. The changes were thoroughly tested, but may still cause minor incompatibilities with old scripts. Please let us know if your script no longer functions as expected with these changes.
+
+\S1{v2.05-cl} Changelog
+
+\S2{} New/Changed Commands
+
+\b Renamed SubSection and SubSectionEnd to \R{ssectiongroup}{SectionGroup} and \R{ssectiongroupend}{SectionGroupEnd}
+
+\b \R{sectionsetflags}{SectionSetFlags}, when used on a section group, toggles its children too
+
+\b \R{sectionsettext}{SectionSetText} works better with variables (parses immediately and treats an empty variable as an empty string)
+
+\b \R{ssetcurinsttype}{SetCurInstType} works without the components page
+
+\S2{} Minor Changes
+
+\b Added Breton translation
+
+\b \L{../Docs/AdvSplash/advsplash.txt}{AdvSplash}: Fixed double delay time in some cases
+
+\b Documentation fixes and enhancements (including \W{http://sourceforge.net/tracker/index.php?func=detail&aid=1098454&group_id=22049&atid=373087}{patch #1098454})
+
+\b Fixed case sensitive name comparison with \R{file}{File} /x, when not using wildcards
+
+\b Fixed extraction status ending prior to 100%
+
+\b Fixed negative values of available space in the directory page (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1114876&group_id=22049&atid=373085}{bug #1114876})
+
+\b Fixed system.nsi example crash (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1102255&group_id=22049&atid=373085}{bug #1102255})
+
+\b Fixed unused label warnings with \R{library}{Library macros}
+
+\b Improved some error messages
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.42}: Added an image displaying example, added TRANSPARENT flag for BITMAP fields (\W{http://sourceforge.net/tracker/?group_id=22049&atid=373088&func=detail&aid=1079715}{RFE #1079715} - funded by Chris Morgan)
+
+\b Invisible sections weren't always affected by a change of the installation type (\W{http://sourceforge.net/tracker/index.php?func=detail&aid=1045722&group_id=22049&atid=373085}{bug #1045722})
+
+\b Language file fixes
+
+\b Made pages refresh after an aborted leave function
+
+\b Partially selected section groups can now be toggled
+
+\H{v2.04} 2.04
+
+Released on January 7th, 2005
+
+\S1{v2.04-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed $0 changed by \R{file}{File} /r
+
+\b Fixed empty directory not included by \R{file}{File} /r
+
+\b Fixed invalid directory creation by \R{file}{File} /r on POSIX
+
+\b Fixed Unicode conversion problems on POSIX
+
+\S2{} Minor Changes
+
+\b Added new test for dir_reader::matches
+
+\b Fixed LibraryLocal failure with UNC paths
+
+\b Fixed VC 7.1 and GCC 3.4 compile errors
+
+\b Language file fixes
+
+\H{v2.03} 2.03
+
+Released on December 3rd, 2004
+
+\S1{v2.03-rn} Release Notes
+
+\b If you're using \c{File /r folder} in your script, it's recommended you replace it with \c{File /r folder\\*} for faster compilation and so no other folders named \e{folder} will be included
+
+\b Command line switches prefix on POSIX has changed to a dash
+
+\b The plug-in API change is backward compatible
+
+\S1{v2.03-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added another parameter to plug-in functions with a pointer to exec_flags and ExecuteCodeSegment
+
+\b Fixed handling of absolute paths on POSIX
+
+\b Made RegDLL load and unload a DLL exactly once to fix crashes with COM DLLs registration
+
+\S2{} New/Changed Commands
+
+\b Added /date switch to !define for definition of date and time constants
+
+\b Added /x switch for \R{file}{File} and \R{reservefile}{ReserveFile} to exclude files and directories
+
+\b Made \R{file}{File}'s /r switch always search in subdirectories, even if the given path points to an existing directory
+
+\S2{} Minor Changes
+
+\b Added LIBRARY_SHELL_EXTENSION and LIBRARY_COM to \R{library}{Library}
+
+\b Added missing #include
+
+\b Added NSIS_LZMA_COMPRESS_WHOLE to the script define list
+
+\b Documentation fixes and improvements
+
+\b Fixed an access violation in case of a script jump beyond the last entry
+
+\b Fixed keyboard navigation in the instfiles page while installing
+
+\b Fixed unpacking window not showing when \R{abggradient}{BGGradient} is used
+
+\b Fixed unused label warning in \R{library}{Library.nsh}
+
+\b Language file fixes
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.72}: Fixed state of Cancel button on Finish page when used in installer and uninstaller, added a string for NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+
+\b nsisconf.nsh was not always parsed when compiling using MakeNSISw
+
+\H{v2.02} 2.02
+
+Released on October 23rd, 2004
+
+\S1{v2.02-cl} Changelog
+
+\S2{} Major Changes
+
+\b Added lots of small usage examples to the documentation
+
+\b Made \R{jumps}{relative jumps} work with instructions that add multiple entries
+
+\b Made the datablock optimizer much faster
+
+\b Made the installer deny reboots while running (\W{http://msdn.microsoft.com/library/en-us/sysinfo/base/wm_queryendsession.asp}{WM_QUERYENDSESSION})
+
+\b Made the \R{reboot}{Reboot} command first quit and then reboot so everything is always cleaned-up
+
+\S2{} New/Changed Commands
+
+\b Added << and >> to \R{intop}{IntOp}
+
+\b Added \R{geterrorlevel}{GetErrorLevel} and \R{seterrorlevel}{SetErrorLevel}
+
+\b Fixed \R{copyfiles}{CopyFiles} usage checking problem
+
+\b Made \R{reboot}{Reboot} call \R{onrebootfailed}{.onRebootFailed} and quit on failure instead of setting the error flag
+
+\S2{} Minor Changes
+
+\b Added Albanian language files
+
+\b Added NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE configuration option which makes components only be toggled when the user clicks on the checkbox and makes .onMouseOverSection only be called when the user selects a component
+
+\b Added some CppUnit tests
+
+\b Both _=? and /D= now require a space before them so they can safely remove the space from $CMDLINE
+
+\b Fixed a bug that caused the uninstaller CRC-check to fail if \R{packhdr}{!packhdr} created a non-512-bytes-aligned exehead
+
+\b Fixed a compiler crash caused by using \R{getcurrentaddress}{GetCurrentAddress}
+
+\b Fixed errors when using '\R{file}{File} /r .' on Windows
+
+\b Fixed gcc 3.4 compile errors
+
+\b Fixed inconsistencies between error levels and the \R{errorlevels}{documentation}
+
+\b Fixed some minor memory leaks
+
+\b Language file fixes
+
+\b Makefile improvements
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.71}: Made the selected language only be saved if the installation was successful
+
+\b Some code refactoring
+
+\b \L{../Docs/StrFunc/StrFunc.txt}{StrFunc}: Rewrote StrSort and fixed StrStrAdv. See the \L{../Docs/StrFunc/StrFunc.txt}{readme} for a complete changelog
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/Banner/Readme.txt}{Banner}: Fixed some cases where the banner would not show on the foreground
+
+\H{v2.01} 2.01
+
+Released on September 24th, 2004
+
+\S1{v2.01-rn} Release Notes
+
+\b See \R{build_posix}{Compiling NSIS Sources} for information about compiling makensis on POSIX platforms
+
+\b NSIS doesn't create installers for Linux/Mac OS X etc., but you can compile Windows installers on these platforms
+
+\b UpgradeDLL is still provided in UpgradeDLL.nsh for backwards compatibility
+
+\S1{v2.01-cl} Changelog
+
+\S2{} Major Changes
+
+\b Compiler (makensis) supports POSIX platforms (Linux, *BSD, Mac OS X, etc.)
+
+\b \R{library}{New system} for DLL/TLB library setup
+
+\S2{} New/Changed Commands
+
+\b Added \R{abgfont}{BGFont} that allows setting the background text font
+
+\b Added SW_HIDE to \R{execshell}{ExecShell}'s accepted show modes
+
+\b \R{rmdir}{RMDir} can now be used with both /r and /REBOOTOK at the same time
+
+\b Extended maximum binary data for \R{writeregbin}{WriteRegBin} to 3 * NSIS_MAX_STRLEN
+
+\b Added \R{execute}{!execute}
+
+\S2{} Minor Changes
+
+\b LZMA exehead is now 34KB and should also decompress faster
+
+\b Windows 95 (OSR2)/98/ME no longer see drive free space capped to 2GB
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern User Interface}: New orange theme by MoNKi
+
+\b Speedup background gradient painting
+
+\b \L{../Examples/LogicLib.nsi}{LogicLib} 2.5: Added AndIf, AndUnless, OrIf, OrUnless. Avoids unused variable warnings by requiring !defines before using certain features.
+
+\b \L{../Docs/StrFunc/StrFunc.txt}{StrFunc}: Added support for uninstaller, some fixes and improvements. See the \L{../Docs/StrFunc/StrFunc.txt}{readme} for a complete changelog
+
+\b The plug-ins folder is properly removed when the system is rebooted
+
+\b \R{setoutpath}{SetOutPath} "-" works again
+
+\b Fixed a bug which made plug-ins that didn't have lower case extension not be found
+
+\b Fixed a bug that caused directories with drives that had their current directory set to an invalid directory to not be accepted in the directory selection page
+
+\b Fixed a crash in makensis caused by defining a macro in a file included by another macro
+
+\b makensis shows meaningful errors for compression errors instead of just magic numbers
+
+\b Fixed a bug with \R{aallowrootdirinstall}{AllowRootDirInstall} used along with \R{ainstalldirregkey}{InstallDirRegKey} that caused the directory in the registry to be ignored
+
+\b Fixed \R{FileRead}{FileRead} setting the error flag when a null character is the first character it reads
+
+\b Fixed a bug which caused the background gradient to paint slowly
+
+\b \R{file}{File} paths relative to the root folder work again
+
+\b Added \L{../Include/Colors.nsh}{Colors.nsh}
+
+\b Made Times New Roman default font for the background text because it should always have support for the locale's language
+
+\b Fixed compilation of NSISdl under VS.NET
+
+\b SetCtlColors /BRANDING wasn't working right, if just one of the background or text color were specified
+
+\b Language file fixes and improvements
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/System/System.html}{System}: New, hopefully more informative, documentation; fixed some bugs
+
+\b \L{../Docs/Banner/Readme.txt}{Banner}: Added getWindow to allow greater control over the banner window
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.41}: Bitmaps are now automatically centered, fixed a bug which prevented enabling the next button from the leave function of InstallOptions pages, fixed a rare freeze
+
+\b Zip2Exe 0.32: Fixed codepage problems
+
+\b \L{../Docs/nsExec/nsExec.txt}{nsExec}: Always create a valid input handle, fixed a problem when called from a path with spaces
+
+\b \L{../Docs/VPatch/Readme.html}{VPatch}: Close all open file handles when one of them fail to open
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: Added /NOIEPROXY (based on memph's code)
+
+\H{v2.0} 2.0
+
+Released on February 7th, 2004
+
+\S1{v2.0-rn} Release Notes
+
+\b Finnish, Bulgarian and Thai language files are outdated and do not contain all needed translations
+
+\S1{v2.0-cl} Changelog
+
+\S2{} Changes from 1.98
+
+\b \R{langs}{Multiple languages in one installer support} (with RTL support)
+
+\b \R{plugindlls}{Easier plug-in system}
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern User Interface} (optional)
+
+\b \W{http://www.7-zip.org/}{LZMA} compression which provides installers 20% smaller than bzip2
+
+\b \R{pages}{Easier paging system} (no more .onNextPage, .onPrevPage)
+
+\b Components are presented as a tree which allows sub components
+
+\b \R{varuser}{User variables} ($VARNAME)
+
+\b \R{aicon}{Icon} and \R{auninstallicon}{UninstallIcon} support any color depth and sizes, not just 32x32x16
+
+\b \R{acheckbitmap}{CheckBitmap} supports any color depth
+
+\b Improved large files handling
+
+\b \R{alicensedata}{License data} can be RTF
+
+\b CHM documentation for easy browsing
+
+\b \R{silent}{Better silent support}
+
+\b New include files for easier scripting: \L{../Examples/LogicLib.nsi}{LogicLib}, \L{../Docs/StrFunc/StrFunc.txt}{StrFunc} and \L{../Include/Sections.nsh}{Sections}
+
+\b Improved plug-ins: \L{../Docs/InstallOptions/Readme.html}{InstallOptions}, \L{../Docs/NSISdl/ReadMe.txt}{NSISdl} and \L{../Docs/Splash/splash.txt}{Splash}
+
+\b New plug-ins: \L{../Docs/AdvSplash/advsplash.txt}{AdvSplash}, \L{../Docs/Banner/Readme.txt}{Banner}, \L{../Docs/BgImage/BgImage.txt}{BgImage}, \L{../Docs/Dialer/Dialer.txt}{Dialer}, \L{../Examples/languages.nsi}{LangDLL}, \L{../Docs/Math/Math.txt}{Math}, \L{../Docs/nsExec/nsExec.txt}{nsExec}, \L{../Docs/StartMenu/Readme.txt}{StartMenu}, \L{../Docs/System/System.html}{System}, \L{../Examples/UserInfo/UserInfo.nsi}{UserInfo} and \L{../Docs/VPatch/Readme.html}{VPatch}
+
+\b New and improved utilities: \L{../Docs/makensisw/Readme.txt}{MakeNSISw}, NSIS Menu (NSIS.exe), NSIS Update (Bin\\NSIS Update.exe) and zip2exe (Bin\\zip2exe.exe)
+
+\b New commands: \R{addplugindir}{!addplugindir}, \R{echo}{!echo}, \R{ifmacrodef}{!ifmacrodef}, \R{ifmacrondef}{!ifmacrondef}, \R{verbose}{!verbose}, \R{aaddbrandingimage}{AddBrandingImage}, \R{asetallowskipfiles}{AllowSkipFiles}, \R{achangeui}{ChangeUI}, \R{acheckbitmap}{CheckBitmap}, \R{createfont}{CreateFont}, \R{adirvar}{DirVar}, \R{adirverify}{DirVerify}, \R{enablewindow}{EnableWindow}, \R{afilebufsize}{FileBufSize}, \R{flushini}{FlushINI}, \R{sgetcurinsttype}{GetCurInstType}, \R{getdlgitem}{GetDlgItem}, \R{getinstdirerror}{GetInstDirError}, \R{ifabort}{IfAbort}, \R{ifsilent}{IfSilent}, \R{initpluginsdir}{InitPluginsDir}, \R{sinsttypegettext}{InstTypeGetText}, \R{sinsttypesettext}{InstTypeSetText}, \R{langstring}{LangString}, \R{alicensebkcolor}{LicenseBkColor}, \R{alicenseforceselection}{LicenseForceSelection}, \R{licenselangstring}{LicenseLangString}, \R{loadlanguagefile}{LoadLanguageFile}, LockWindow, \R{page}{Page}, \R{pageex}{PageEx}, \R{reservefile}{ReserveFile}, \R{sectiongetinsttypes}{SectionGetInstTypes}, \R{ssectiongetsize}{SectionGetSize}, \R{sectionsetinsttypes}{SectionSetInstTypes}, \R{ssectionsetsize}{SectionSetSize}, \R{setbrandingimage}{SetBrandingImage}, SetCompressionLevel, \R{asetcompressor}{SetCompressor}, \R{asetcompressordictsize}{SetCompressorDictSize}, \R{setctlcolors}{SetCtlColors}, \R{ssetcurinsttype}{SetCurInstType}, \R{setpluginunload}{SetPluginUnload}, \R{setsilent}{SetSilent}, \R{showwindow}{ShowWindow}, SubSection (replaced by \R{ssectiongroup}{SectionGroup}), SubSectionEnd (replaced by \R{ssectiongroupend}{SectionGroupEnd}), \R{var}{Var}, \R{viaddversionkey}{VIAddVersionKey}, \R{viproductversion}{VIProductVersion} and \R{axpstyle}{XPStyle}
+
+\b Removed commands: DirShow, DisabledBitmap, EnabledBitmap and SectionDivider
+
+\b All this and a smaller overhead! =)
+
+\b A lot more... See below for more information
+
+\S2{} Changes from RC4
+
+\b Command line parser ignored any switches after tokens that are not switches
+
+\b Last part of the path specified in \R{ainstalldir}{InstallDir} was appended even if selected folder name was the same
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.70}: Improved documentation, new Init custom function for Welcome and Finish page
+
+\b Added \L{../Docs/StrFunc/StrFunc.txt}{StrFunc} by deguix
+
+\b Updated and fixed language files
+
+\b Updated, fixed and improved documentation
+
+\H{v2.0rc4} 2.0 Release Candidate 4
+
+Released on February 2nd, 2004
+
+\S1{v2.0rc4-cl} Changelog
+
+\S2{} Major Changes
+
+\b Fixed MBCS mishandling in exehead, InstallOptions and nsExec
+
+\S2{} Minor Changes
+
+\b Language files updates and fixes
+
+\b Fixed logging (NSIS_CONFIG_LOG)
+
+\b Fixed compile errors caused by removing some config.h options
+
+\b NSIS compiles without PSDK again
+
+\b Documentation fixes
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: All potential and rare crashes should be completely fixed now
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions}: Fixed a rare crash related to ListItems and a small memory leak when using ValidateText
+
+\H{v2.0rc3} 2.0 Release Candidate 3
+
+Released on January 26th, 2004
+
+\S1{v2.0rc3-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Fixed some bugs with LZMA/bzip2 and non-solid compression
+
+\b Fixed a bug that caused escaping not to be ignored on extended !define lines
+
+\b Language files updates and fixes
+
+\b Fixed installer crash when certain language strings were not referenced in all languages
+
+\b Some new and improved graphics
+
+\b Made CreateShortcut case insensitive when parsing hot key
+
+\b Some documentation improvements and fix-ups
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.69}: Made all uninstaller pages work without installer pages and fixed top text on uninstaller license page
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Fixed resize bug, fixed some UI issues in the settings dialog
+
+\b NSIS Update: Improved UI
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions}: Fixed minor problems with the new NOTIFY flag
+
+\H{v2.0rc2} 2.0 Release Candidate 2
+
+Released on January 5th, 2004
+
+\S1{v2.0rc2-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Set focus to the main control in each page to ease keyboard control (plug-ins too)
+
+\b LangStrings and user variables limit is now 16383 and is enforced
+
+\b Fixed control colors set using SetCtlColors not changing when the system colors were changed
+
+\b Log window now responds to the context menu key
+
+\b Fixed a bug which caused beeping when the space key is hit on the components tree
+
+\b Added code to prevent weird usage of WM_COMMAND which can cause weird behavior
+
+\b Fixed compile errors when NSIS_CONFIG_COMPONENTPAGE, NSIS_CONFIG_PLUGIN_SUPPORT or NSIS_SUPPORT_HWNDS are not defined
+
+\b More language files updated to the latest version
+
+\b Fixed CHM's script errors
+
+\b Documentation improvements
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.4}: NOTIFY for link, drop list and list box; UI fixes and improvements. See IO's \L{../Docs/InstallOptions/Changelog.txt}{change log} for a complete list
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: Improved user interface, added support for named symbol sets and fixed best compressor selector
+
+\H{v2.0rc1} 2.0 Release Candidate 1
+
+Released on Decemeber 27th, 2003
+
+\S1{v2.0rc1-rn} Release Notes
+
+\b Trying the LZMA compression method for your installer is recommended. It often gives a 20% better compression ratio.
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.68}: The setting to change the title size on the Welcome page and Finish page has been changed
+
+\S1{v2.0rc1-cl} Changelog
+
+\S2{} Major Changes
+
+\b LZMA compression support. Added \R{asetcompressordictsize}{SetCompresssorDictSize}.
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.68}: New settings for extra space for title and text on Welcome page and Finish page, improved handling of verbose settings, language file string for uninstaller reboot information, more
+
+\b Shell folders are now detected using shell API functions and not the registry. This is the recommended method by Microsoft. New constants have been added in the process ($FONTS, $SENDTO and more...). See \k{varconstant} for more details.
+
+\b Added \L{../Examples/LogicLib.nsi}{LogicLib} to distribution (easier conditional execution etc.)
+
+\b Added \R{adirverify}{DirVerify} and \R{getinstdirerror}{GetInstDirError} to allow custom error checking when the installation directory is invalid or the drive does not have enough space
+
+\b Support for reading environmental variables on compile time: \R{compenvvar}{$%envVarName%}
+
+\b Added /SD parameter for \R{messagebox}{MessageBox}. Allows to set default for silent installers.
+
+\b New conditional compilation options: \R{ifmacrodef}{!ifmacrodef} and \R{ifmacrondef}{!ifmacrondef}.
+
+\b New sections macros for mutually exclusive section selection
+
+\b Improved RTL support by adding WS_EX_RTLREADING wherever possible
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.3}: Added new control type "Button", added new flag "NOTIFY", added new flag "NOWORDWRAP" for multi-line text boxes, reduced size down to 12K
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW}: More options to set the compression method
+
+\b Zip2Exe 0.31: Fixed compression setting, LZMA compression support
+
+\b \L{../Docs/VPatch/Readme.html}{VPatch 2.1}: Better error handling and exit code for GenPat
+
+\H{v2.0b4} 2.0 Beta 4
+
+Released on November 19th, 2003
+
+\S1{v2.0b4-rn} Release Notes
+
+\b The /LANG parameter is no longer available for any text setting instructions. You must use a \R{langstring}{LangString} if you want to make a certain text multilingual. This means you can also set one text for all languages. To make the license data multilingual you should use \R{licenselangstring}{LicenseLangString}.
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.67}: Because of the new syntax for pages, renaming of settings and variable names etc., you have to make some changes to your scripts, see the \L{../Docs/Modern UI/Readme.html}{Modern UI Readme} for details.
+
+\b \R{page}{Custom Pages} now have a leave function. As this parameter is placed before the caption you have to add another "" empty string for the title to work.
+
+\b \R{onselchange}{.onSelChange} is no longer called when the components page is created.
+
+\b The icons folder has been renamed to Graphics and was reorganized. If you were using any files from Contrib\\Icons in your script, you should update it to point to the new image or icon path.
+
+\b UpgradeDLL has been changed, it's \e{highly recommend} that you include the new version in your script using \c{!include "UpgradeDLL.nsh"} instead of the old one.
+
+\S1{v2.0b4-cl} Changelog
+
+\S2{} Major Changes
+
+\b CHM documentation - searchable and comes with an index
+
+\b User variables ($VARNAME) that can be declared with the \R{var}{Var} command
+
+\b Support for all pages in both installer and uninstaller. Components, directory and license pages can be used for the uninstaller
+
+\b Improved large files handling (way lower requirements to compile a 2GB installer now)
+
+\b Full support for RTL languages, including support for LTR and RTL languages in one installer
+
+\b \L{../Docs/Modern UI/Readme.html}{Modern UI 1.67}: New system & syntax for pages, settings (support for multiple pages of the same type, page specific settings, more customization options etc.), Welcome/Finish pages for uninstaller, \R{alicenseforceselection}{LicenseForceSelection} support, new options for Finish page / language selection dialog, fixes, more
+
+\b Extraction progress
+
+\b No more unprocessed strings, variables can be used everywhere
+
+\b Leave function for custom \R{pages}{pages}: Input on InstallOptions pages can be validated using script code
+
+\b Interface improvements: Better ClearType support, no more flickering
+
+\b \R{onmouseoversection}{OnMouseOver text} is only displayed when mouse over section
+
+\b NLF language files (v6): language specific fonts, RTL and more strings
+
+\b Inner LangStrings can be used in the script
+
+\b No more /LANG, only LangStrings - easier to set one string to all languages
+
+\b LangStrings are no longer installer/uninstaller specific (no un.)
+
+\S2{} New/Changed Commands
+
+\b Added \R{pageex}{PageEx}, \R{pagecallbacks}{PageCallbacks} and \R{adirvar}{DirVar} - it's now a lot easier to add the same page type twice
+
+\b Added \R{afilebufsize}{FileBufSize}
+
+\b Added \R{viaddversionkey}{VIAddVersionKey}: add version information resource to the installer
+
+\b Added \R{asetallowskipfiles}{AllowSkipFiles}: set whether the user should be able to skip a file when overwriting failed
+
+\b Added \R{alicenseforceselection}{LicenseForceSelection}: checkbox or radio buttons on license page to let user agree with license or not
+
+\b Added \R{ssectionsetsize}{SectionSetSize}, \R{ssectiongetsize}{SectionGetSize}, \R{ssetcurinsttype}{SetCurInstType} and \R{sgetcurinsttype}{GetCurInstType}
+
+\b Replaced SetBkColor with \R{setctlcolors}{SetCtlColors} which can set text color too
+
+\b Added \R{ifsilent}{IfSilent} and \R{setsilent}{SetSilent} to allow better /S interaction
+
+\b Added support for standard predefines: $\{__DATE__\}, $\{__TIME__\}, $\{__TIMESTAMP__\}, $\{__FILE__\}, $\{__LINE__\}
+
+\b Added ifdiff and lastusd for \R{asetoverwrite}{SetOverwrite}
+
+\b /o Switch for \R{ssection}{Section} provides ability to unselect the section by default
+
+\b New parameter for DirText to set the browse dialog text
+
+\b Added \R{rmdir}{RMDir /REBOOTOK}: remove folders on reboot
+
+\b \R{ainsttype}{InstType} /NOCUSTOM and /COMPONENTSONLYONCUSTOM work together
+
+\b Added base_dir for \R{gettempfilename}{GetTempFileName}
+
+\S2{} Minor Changes
+
+\b RO sections can now be in \R{ainsttype}{InstTypes} too (defaults to old behavior)
+
+\b Increased limit of InstTypes to 32
+
+\b Improved macros & functions: UpgradeDLL, GetParent, GetParameters. Using the new versions is recommended.
+
+\b Fixed SetOutPath not setting current directory if the directory didn't exist before
+
+\b Components tree: fixed problems with sub-sections with RO sections as children, SF_EXPAND now refreshes the components tree and added SF_PSELECTED for partially selected sub-sections
+
+\b Improved \R{aaddbrandingimage}{AddBrandingImage}: doesn't depend on the UI, can set image on the bottom and on the right, support for custom padding value
+
+\b Better installation directory verification
+
+\b Fixed all known problems with temporary files and directories
+
+\b Documentation fixes
+
+\b Minor bug fixes
+
+\b Code clean-ups and some more comments
+
+\b More...
+
+\S2{} Utilities and Plug-ins
+
+\b \L{../Docs/makensisw/Readme.txt}{MakeNSISW 2.0}: UI to define symbols, easy access to recent scripts, toolbar and more
+
+\b Zip2Exe 0.3: based on header files, improved interface, Modern UI support, new script code, improved folder detection
+
+\b \L{../Docs/InstallOptions/Readme.html}{InstallOptions 2.2}: added LINK control, added EXTENDEDSELECT flag for list boxes which replaces MULTISELECT that now acts exactly as the real style flag ([double] click turns on or off selection), fixes
+
+\b BgImage plug-in stability fixes
+
+\b Added vPatch: patch generator and plug-in that applies the patches
+
+\b Banner plug-in improvements: responds to messages and some new /set tricks by brainsucker
+
+\b AdvSpalsh plug-in improvements: smaller, better transparency support and a possible bug fix
+
+\b System plug-in improvements: Unicode, GUID and COM support
+
+\b nsExec plug-in improvments: ability to run 16 bit code and tabs to spaces conversion
+
+\b Math plug-in
+
+\b Delphi unit for NSIS plug-ins
+
+\H{v2.0b3} 2.0 Beta 3
+
+Released on March 16th, 2003
+
+\b Modern UI 1.63: Header bitmap support, new defines to change the description area, single macro for language selection dialog, more!
+
+\b New tutorial in the documentation
+
+\b define_if_last in Page command also works when a define has not been specified for all Page commands.\\<br\\>This fixes the problem with the Modern UI "Click Next" / "Click Install" texts.
+
+\b Added SectionSetInstTypes and SectionGetInstTypes
+
+\b Reboot command does not force a reboot anymore (allows the user to save work)
+
+\b !if[n]def/!else fixes
+
+\b LogSet on now really starts logging
+
+\b Cancel button available on all pages after the instfiles page but the last page unless /ENABLECANCEL was used in its Page command
+
+\b License page: No more limit on RTF size
+
+\b LangDLL: Option to auto-count number of languages, shell font support
+
+\b Page and UninstPage can not be used inside sections/functions
+
+\b CreateDirectory now uses the error flag
+
+\b EnumRegKey/Value output_var check fixed
+
+\b Updated translations
+
+\b Dreaded BSOD after plug-ins enumeration finally banished
+
+\b Minimize button and BGGradient and BGImage compatibility fixes
+
+\b WriteINIStr with empty value works again
+
+\b Added FlushINI
+
+\H{v2.0b2} 2.0 Beta 2
+
+Released on February 26th, 2003
+
+\b NSIS Menu: links to all NSIS utilities, documentation and websites
+
+\b NSIS Update: check for new releases, download latest development files
+
+\b Dialer plugin to connect to the internet
+
+\b Improved filename validation
+
+\b VC7 compiler compatibility issues fixed
+
+\b CreateDirectory sets error flag
+
+\b InstallOptions: INI File State value fixed
+
+\b Updated translations
+
+\b Minor fixes
+
+\H{v2.0b1} 2.0 Beta 1
+
+Released on February 9th, 2003
+
+\b User interface improvements: better order/grouping of controls, button selection problems fixed, added minimize box, transparent BrandingText
+
+\b LangString improvements: can be used before they have been defined, warning if not present in all language tables
+
+\b New version of the Modern User Interface with UI improvements, bugfixes and some small new features
+
+\b InstallOptions 2.0 with support for custom font and DPI settings, groupboxes, grouped controls, lots of bugfixes etc.
+
+\b No more random compression ratios
+
+\b SetOutPath now sets the working directory
+
+\b File names are validated, directory given by the user will now always work
+
+\b $QUICKLAUNCH now works with SetShellVarContext all
+
+\b Automatically appended directory name in the directory selection dialog will no longer contain squares if not all characters are ASCII.
+
+\b Fixed a bug with remote drives and available space (\\\\remote\\drive)
+
+\b Plug-in function's names are now case insensitive
+
+\b Fixed a bug with specifying Icon twice
+
+\b Include dirs (!addincludedir)
+
+\b On leave function for pages
+
+\b Installers can now really contain more than one branding image
+
+\b All !if/!else/!endif problems should be solved now
+
+\b SetFont "MS Shell Dlg" adds the DS_SHELLFONT style
+
+\b Win9x rename on reboot now also works when the destination file does not exist
+
+\b DeleteRegKey works on default value
+
+\b nsExec can be called from an installer executed by CreateProcess
+
+\b WriteUninstaller sets error code
+
+\b Banner.dll compatible with Modern UI
+
+\b Fixed focus problems in MakeNSISw
+
+\b Updated and new translations
+
+\b Some new bitmaps for the MUI by Virtlink
+
+\b Faster and better MakeNSISw integration
+
+\b \R{detect.netframework}{New .NET Framework detection function}
+
+\b Minor bugfixes
+
+\b Code clean-ups (compiles on VC7)
+
+\H{v2.0b0} 2.0 Beta 0
+
+Released on December 6th, 2002
+
+\b New paging system
+
+\b Added Page and UninstPage
+
+\b Removed .onNextPage, .onPrevPage, .onInitDialog
+
+\b New easier version of the Modern User Interface with better multilanguage support, InstallOptions integration, welcome and finish page etc.
+
+\b Custom pages no longer flicker when created
+
+\b Added accelerator keys
+
+\b Added LangString and LangStringUP for user defined multilingual strings
+
+\b Added support for transparent check marks
+
+\b Added InitPluginsDir
+
+\b Renamed nsisconf.nsi to nsisconf.nsh
+
+\b Added CreateShortcut comment/description parameter
+
+\b Splash.exe is now a plugin (splash.dll)
+
+\b Added new plugins: System, AdvSplash, nsExec, UserInfo, BgImage, Banner and StartMenu
+
+\b !ifdef and friends can now be used in macros
+
+\b SendMessage can send strings (put STR: before a param) and supports timeouts
+
+\b Right mouse button "Copy to clipboard" context menu for the Details window
+
+\b Plugin syntax now requires dll name, e.g. dll::func not just func
+
+\b Licence text receives initial focus (page up & down work immediately, return key still works)
+
+\b Made win9x move/delete on reboot support proper and function like on win2k
+
+\b Now always loads RichEdit v2 if present (links work on Win9x)
+
+\b DeleteRegKey now complains if given a third parameter (other than /ifempty)
+
+\b RegDLL now works with DLLs dependent on DLLs from the same directory
+
+\b $\{LANG_langName\} defined as the language id when loading a NLF
+
+\b Fixed a few bugs that caused the installer to load slower than before
+
+\b Uninstall can now get command line parameters too
+
+\b Added ReserveFile
+
+\b Added ExDLL.h
+
+\b Included makensisw 1.9 (lots of changes)
+
+\b Updated InstallOptions
+
+\b Updated ZIP2EXE
+
+\b Updated HTTP download plugin, NSIS-dl (timeout added, better proxy detection)
+
+\b A lot of new language files
+
+\b A lot of new icons and check marks
+
+\b Changed section flags values
+
+\b SectionSetFlags can now set bold too
+
+\b SectionSetFlags now works in silent installers too
+
+\b SectionSetName for sub sections doesn't need '-' in front of the name
+
+\b Added SetPluginUnload
+
+\b Hidden section can now use SectionIn too
+
+\b File /nonfatal switch added
+
+\b Plugins no longer add size to their containing section
+
+\b Defines can now be used inside define names ($\{bla$\{blo\}\})
+
+\b New docs format (WOOHA!)
+
+\b EXE header size a lot smaller, 33.5KB for bzip2 and 34KB for zlib
+
+\b Lots of other bugs fixed...
+
+\H{v2.0a7} 2.0 Alpha 7
+
+Released on August 29th, 2002
+
+\b Can now select the language from .onInit ($LANGUAGE is a variable)
+
+\b Added CreateFont
+
+\b Added .onMouseOverSection
+
+\b Added .onInitDialog and un.onInitDialog
+
+\b Added SetStaticBkColor
+
+\b Disabled UseOuterUIItem
+
+\b SendMessage WM_SETTEXT treats lParam as a string and not a number
+
+\b CopyFiles script message no longer always prints (silent)
+
+\b Custom install type text can now be changed
+
+\b ChangeUI can now change IDD_VERIFY
+
+\b Default license color now fits the user system
+
+\b Summary reports the right number of required sections
+
+\b Checkbox is only required in IDD_DIR if logging is enabled
+
+\b Not using /LANG now really causes the script compiler to use the last used language
+
+\b Fixed a bug with MBCS and the uninstaller text
+
+\b MBCS to Unicode and Unicode to MBCS conversion bugs fixed
+
+\b Fixed a bug that caused RTF not to show on Windows 9x
+
+\b Added a dialog that shows up if compress whole is used and initial decompressing lasts longer than a second
+
+\b Updated to InstallOptions 1.3
+
+\b MakeNSISw 1.7 included
+
+\b Added modern UI by Joost Verburg (Examples\\Modern UI)
+
+\b Added new full color icons by adni18
+
+\b Added Dutch, Korean, Russian, Swedish and Traditional Chinese language files
+
+\b Updated Spanish language file version (thanks to LsMoNKi)
+
+\b Added /TRIM(LEFT|RIGHT|CENTER) for BrandingText
+
+\b EXE header size down to 36.5KB
+
+\b Added yi-pixel.ico and yi-pixel-uninstall.ico by Jan T. Sott
+
+\b Fixed a bug with macros at the end of the file
+
+\b Sub-sections can now have defined names too
+
+\b Added LangDLL.dll plugin
+
+\b CallInstDLL /NOUNLOAD added (works on plugin calls too)
+
+\H{v2.0a6} 2.0 Alpha 6
+
+Released on August 10th, 2002
+
+\b Fixed two bugs with the plug-in mechanism
+
+\b Fixed infinite loop bug
+
+\H{v2.0a5} 2.0 Alpha 5
+
+Released on August 9th, 2002
+
+\b Added UseOuterUIItem
+
+\b Enhanced ChangeUI
+
+\b Enhanced SetDlgItemText
+
+\b Added one-section.nsi example file
+
+\b Optimized Ximon's code for plug-in DLLs (back to 37KB)
+
+\b If default user language doesn't fit exactly, will try to find primary language match
+
+\b Fixed some strings that got replaced (space available and required etc.)
+
+\b Compiles without MS Platform SDK
+
+\b Included Spanish.nlf
+
+\b Included MagicLime.exe by snowchyld
+
+\H{v2.0a4} 2.0 Alpha 4
+
+Released on August 5th, 2002
+
+\b Added automatic detection, packing, unpacking and deletion of plugin dlls
+
+\b Added simplified calling syntax for plugin dlls
+
+\b Added PluginDir
+
+\H{v2.0a3} 2.0 Alpha 3
+
+Released on August 4th, 2002
+
+\b Added LoadLanguageFile
+
+\b Added $LANGUAGE
+
+\b Added /LANG option to string setters (Name, Caption, etc.)
+
+\b 'LogSet on' now builds a log file if not already created
+
+\H{v2.0a2} 2.0 Alpha 2
+
+Released on July 31st, 2002
+
+\b Added $\{NSISDIR\}
+
+\b Added XPStyle
+
+\b Added SetFont
+
+\b Added ChangeUI
+
+\b Added AddBrandingImage, and SetBrandingImage
+
+\b Added SetCompressor (no more makensis-bz2.exe)
+
+\b Added LicenseBkColor
+
+\b 'SpaceTexts none' now causes no space texts to appear
+
+\b Icon and UninstallIcon now support icons of any type
+
+\b CheckBitmap now support bitmaps with any color table/depth
+
+\b Unused resources are removed before writing out the installer
+
+\b Documented !error and !warning
+
+\b Added !echo and !verbose
+
+\b Added force option for CRCCheck
+
+\b Updated to Makensisw 1.6
+
+\b Updated to InstallOptions 1.2
+
+\b Installer can now be compressed using UPX
+
+\b A hint is shown if a line is longer than the detail window
+
+\b Modern style folder select dialog
+
+\b License data can now be RTF
+
+\b WindowIcon is now handled in the compiler
+
+\b Removed debug version (it never worked anyway)
+
+\b Faster compile time (WIN32_LEAN_AND_MEAN)
+
+\H{v2.0a1} 2.0 Alpha 1
+
+Released on July 9th, 2002
+
+\b Added expand node option to Section and SubSection
+
+\b Added preserve file attribute option to File command
+
+\b Copy-All bug fix in Makensisw
+
+\b Added NSISDIR to the define list
+
+\b Reorganized NSIS directory structure
+
+\H{v2.0a0} 2.0 Alpha 0
+
+Released on May 22nd, 2002
+
+\b TreeView component list (care of Jeff Doozan)
+
+\b No more SectionDivider, but SubSection and SubSectionEnd.
+
+\b No more EnabledBitmap/DisabledBitmap, just CheckBitmap. (with tons of button states)
+
+\b Bugfixes of brokenness.
+
+\b Added ! for Section/SubSection to make bold.
+
+\b Made config.h have hacks for easier building for me. :)
+
+\H{cl-older} Older Versions
+
+\W{http://nsis.sourceforge.net/download/nsis1/}{NSIS 1.x version history}
diff --git a/Docs/src/int.but b/Docs/src/int.but
index 2c63655..4e70ded 100755
--- a/Docs/src/int.but
+++ b/Docs/src/int.but
@@ -1,50 +1,50 @@
-\S1{intinst} Integer Support
-
-\S2{intfmt} IntFmt
-
-\c user_var(output) format numberstring
-
-Formats the number in "numberstring" using the format "format", and sets the output to user variable $x. Example format strings include "%08X" "%u"
-
-\c IntFmt $0 "0x%08X" 195948557
-\c IntFmt $0 "%c" 0x41
-
-\S2{intop} IntOp
-
-\c user_var(output) value1 OP [value2]
-
-Combines value1 and (depending on OP) value2 into the specified user variable (\c{user_var}). OP is defined as one of the following:
-
-\b \e{+} ADDs value1 and value2
-
-\b \e{-} SUBTRACTs value2 from value1
-
-\b \e{*} MULTIPLIEs value1 and value2
-
-\b \e{/} DIVIDEs value1 by value2
-
-\b \e{%} MODULUSs value1 by value2
-
-\b \e{|} BINARY ORs value1 and value2
-
-\b \e{&} BINARY ANDs value1 and value2
-
-\b \e{^} BINARY XORs value1 and value2
-
-\b \e{>>} RIGHT SHIFTs value1 by value2
-
-\b \e{<<} LEFT SHIFTs value1 by value2
-
-\b \e{~} BITWISE NEGATEs value1 (i.e. 7 becomes 4294967288)
-
-\b \e{!} LOGICALLY NEGATEs value1 (i.e. 7 becomes 0)
-
-\b \e{||} LOGICALLY ORs value1 and value2
-
-\b \e{&&} LOGICALLY ANDs value1 and value2
-
-\c IntOp $0 1 + 1
-\c IntOp $0 $0 + 1
-\c IntOp $0 $0 << 2
-\c IntOp $0 $0 ~
-\c IntOp $0 $0 & 0xF
+\S1{intinst} Integer Support
+
+\S2{intfmt} IntFmt
+
+\c user_var(output) format numberstring
+
+Formats the number in "numberstring" using the format "format", and sets the output to user variable $x. Example format strings include "%08X" "%u"
+
+\c IntFmt $0 "0x%08X" 195948557
+\c IntFmt $0 "%c" 0x41
+
+\S2{intop} IntOp
+
+\c user_var(output) value1 OP [value2]
+
+Combines value1 and (depending on OP) value2 into the specified user variable (\c{user_var}). OP is defined as one of the following:
+
+\b \e{+} ADDs value1 and value2
+
+\b \e{-} SUBTRACTs value2 from value1
+
+\b \e{*} MULTIPLIEs value1 and value2
+
+\b \e{/} DIVIDEs value1 by value2
+
+\b \e{%} MODULUSs value1 by value2
+
+\b \e{|} BINARY ORs value1 and value2
+
+\b \e{&} BINARY ANDs value1 and value2
+
+\b \e{^} BINARY XORs value1 and value2
+
+\b \e{>>} RIGHT SHIFTs value1 by value2
+
+\b \e{<<} LEFT SHIFTs value1 by value2
+
+\b \e{~} BITWISE NEGATEs value1 (i.e. 7 becomes 4294967288)
+
+\b \e{!} LOGICALLY NEGATEs value1 (i.e. 7 becomes 0)
+
+\b \e{||} LOGICALLY ORs value1 and value2
+
+\b \e{&&} LOGICALLY ANDs value1 and value2
+
+\c IntOp $0 1 + 1
+\c IntOp $0 $0 + 1
+\c IntOp $0 $0 << 2
+\c IntOp $0 $0 ~
+\c IntOp $0 $0 & 0xF
diff --git a/Docs/src/intro.but b/Docs/src/intro.but
index 3582f5e..b9e7fa4 100755
--- a/Docs/src/intro.but
+++ b/Docs/src/intro.but
@@ -1,149 +1,149 @@
-\C{intro} Introduction to NSIS
-
-\H{intro-about} About NSIS
-
-An installer is the first experience of a user with your application.
-Slow or unsuccessful software installations are the most irritating computer problems.
-A quick and user friendly installer is therefore an essential part of your software product.
-
-NSIS (Nullsoft Scriptable Install System) is a tool that allows programmers to create such installers for Windows.
-It is released under an open source license and is \R{license}{completely free for any use}.
-
-NSIS creates installers that are capable of installing, uninstalling, setting system settings, extracting files, etc.
-Because it's based on script files, you can fully control every part of your installers.
-The script language supports variables, functions, string manipulation, just like a normal programming language - but designed for the creation of installers.
-Even with all these features, NSIS is still the smallest installer system available. With the default options, it has an overhead of only 34 KB.
-
-\H{intro-features} Main Features
-
-\\<b\\>Small overhead size\\</b\\>
-
-NSIS is created to be small, fast and efficient. While other installers often add hundreds of kilobytes or several megabytes to your installer data, a full featured NSIS installer has an overhead of only 34 KB.
-
-\\<b\\>Compatible with all major Windows versions\\</b\\>
-
-You can create a single installer that is compatible with Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Windows Vista.
-
-\\<b\\>Unique compression methods\\</b\\>
-
-You can choose between three different integrated compression method (ZLib, BZip2, LZMA). The new LZMA compression gives better results than any other common compression method. You don't have to use large self-extracting archive modules or other applications. The compression support is included in the 34 KB overhead.
-
-\\<b\\>Script based\\</b\\>
-
-Unlike other systems that can only generate installers based on a list of files and registry keys, NSIS has a powerful scripting language. This script language is designed for installers and has commands that help you to perform many installation tasks. You can easily add custom logic and handle different upgrades, version checks and more. On the \W{http://nsis.sourceforge.net/wiki/}{NSIS Wiki} you can find a lot more.
-
-\\<b\\>Multiple languages in one installer\\</b\\>
-
-One installer can support multiple interface languages. More than 40 translations are already included, but you can also create your own language files. RTL (right-to-left) languages such as Arabic and Hebrew are fully supported.
-
-\\<b\\>Many features and checks for the target system\\</b\\>
-
-The script language provides commands you can use on the target system. From simple features like folder creation and registry editing to text/binary file modification, modification of environment variables and system reboots. Using provided plug-ins you can even use Windows API.
-
-\\<b\\>Custom dialogs and interfaces\\</b\\>
-
-You can create custom wizard pages to get user input or integrate configuration options. NSIS includes a classic and modern wizard interface, but it is even possible to create your own custom interface.
-
-\\<b\\>Plug-in system\\</b\\>
-
-NSIS can be extended with plug-ins that can communicate with the installer. They can be written in C, C++, Delphi or another language and can be used to perform installation tasks or extend the installer interface. You can use the plug-in with a single line of script code. Plug-ins can also be compressed like other installation data and will only be included when you are using the provided features.
-
-\\<b\\>Support for web installation, file patching\\</b\\>
-
-The NSIS distribution includes a set of plug-ins that allow you to download files from the internet, make internet connections, patch existing files and more.
-
-\\<b\\>Project integration, different releases and automatic builds\\</b\\>
-
-The NSIS compiler features a powerful preprocessor. This allows you to easily integrate multiple projects into a single installer or automatically generate installer builds. You can also generate different releases such as lite and full version.
-
-\\<b\\>Easy and human readable file formats\\</b\\>
-
-The NSIS script format and the format used for interface dialogs are easy, documented and humanly readable, so you can edit your files with your favorite editor. This also makes automatic script generation possible.
-
-\H{intro-featurelist} Feature List
-
-\b Generates self contained executable installers
-
-\b Support for ZLIB, BZIP2 and LZMA data compression (files can be compressed individually or together)
-
-\b Uninstall support (installer can generate an uninstaller)
-
-\b Customizable user interface (dialogs, fonts, backgrounds, icons, text, checkmarks, images etc.)
-
-\b Classic and Modern wizard interface
-
-\b Fully multilingual, support for multiple languages in one installer. More than 40 translations are available, but you can also create your own
-
-\b Page system: You can add standard wizard pages or custom pages
-
-\b User selection of installation components, tree for component selection
-
-\b Multiple install configurations (usually Minimal, Typical, Full), and custom configuration
-
-\b Installer self-verification using a CRC32 checksum
-
-\b Small overhead over compressed data size (34 KB with default options)
-
-\b Ability to display a license agreement in text or RTF format
-
-\b Ability to detect destination directory from the registry
-
-\b Easy to use plug-in system (lots of plug-ins for creation of custom dialogs, internet connections, HTTP downloading, file patching, Win32 API calls etc. are included)
-
-\b Installers can be as large as 2GB
-
-\b Optional silent mode for automated installations
-
-\b A preprocessor with support for defined symbols, macro's, conditional compilation, standard predefines
-
-\b A lovely coding experience with elements of PHP and assembly (includes user variables, a stack, real flow control, etc.)
-
-\b Installers have their own VMs that let you write code that can support:
-
-\\<ul\\>
-
-\b File extraction (with configurable overwrite parameters)
-
-\b File/directory copying, renaming, deletion, searching
-
-\b Plug-in DLL calling
-
-\b DLL/ActiveX control registration/deregistration
-
-\b Executable execution (shell execute and wait options)
-
-\b Shortcut creation
-
-\b Registry key reading/setting/enumerating/deleting
-
-\b INI file reading/writing
-
-\b Generic text file reading/writing
-
-\b Powerful string and integer manipulation
-
-\b Window finding based on class name or title
-
-\b User interface manipulation (font/text setting)
-
-\b Window message sending
-
-\b User interaction with message boxes or custom pages
-
-\b Branching, comparisons, etc.
-
-\b Error checking
-
-\b Reboot support, including delete or rename on reboot
-
-\b Installer behaviour commands (such as show/hide/wait/etc)
-
-\b User functions in script
-
-\b Callback functions for user actions
-
-\\</ul\\>
-
-\b Completely free for any use. See \R{license}{license}.
-
-\b More
+\C{intro} Introduction to NSIS
+
+\H{intro-about} About NSIS
+
+An installer is the first experience of a user with your application.
+Slow or unsuccessful software installations are the most irritating computer problems.
+A quick and user friendly installer is therefore an essential part of your software product.
+
+NSIS (Nullsoft Scriptable Install System) is a tool that allows programmers to create such installers for Windows.
+It is released under an open source license and is \R{license}{completely free for any use}.
+
+NSIS creates installers that are capable of installing, uninstalling, setting system settings, extracting files, etc.
+Because it's based on script files, you can fully control every part of your installers.
+The script language supports variables, functions, string manipulation, just like a normal programming language - but designed for the creation of installers.
+Even with all these features, NSIS is still the smallest installer system available. With the default options, it has an overhead of only 34 KB.
+
+\H{intro-features} Main Features
+
+\\<b\\>Small overhead size\\</b\\>
+
+NSIS is created to be small, fast and efficient. While other installers often add hundreds of kilobytes or several megabytes to your installer data, a full featured NSIS installer has an overhead of only 34 KB.
+
+\\<b\\>Compatible with all major Windows versions\\</b\\>
+
+You can create a single installer that is compatible with Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Windows Vista.
+
+\\<b\\>Unique compression methods\\</b\\>
+
+You can choose between three different integrated compression method (ZLib, BZip2, LZMA). The new LZMA compression gives better results than any other common compression method. You don't have to use large self-extracting archive modules or other applications. The compression support is included in the 34 KB overhead.
+
+\\<b\\>Script based\\</b\\>
+
+Unlike other systems that can only generate installers based on a list of files and registry keys, NSIS has a powerful scripting language. This script language is designed for installers and has commands that help you to perform many installation tasks. You can easily add custom logic and handle different upgrades, version checks and more. On the \W{http://nsis.sourceforge.net/wiki/}{NSIS Wiki} you can find a lot more.
+
+\\<b\\>Multiple languages in one installer\\</b\\>
+
+One installer can support multiple interface languages. More than 40 translations are already included, but you can also create your own language files. RTL (right-to-left) languages such as Arabic and Hebrew are fully supported.
+
+\\<b\\>Many features and checks for the target system\\</b\\>
+
+The script language provides commands you can use on the target system. From simple features like folder creation and registry editing to text/binary file modification, modification of environment variables and system reboots. Using provided plug-ins you can even use Windows API.
+
+\\<b\\>Custom dialogs and interfaces\\</b\\>
+
+You can create custom wizard pages to get user input or integrate configuration options. NSIS includes a classic and modern wizard interface, but it is even possible to create your own custom interface.
+
+\\<b\\>Plug-in system\\</b\\>
+
+NSIS can be extended with plug-ins that can communicate with the installer. They can be written in C, C++, Delphi or another language and can be used to perform installation tasks or extend the installer interface. You can use the plug-in with a single line of script code. Plug-ins can also be compressed like other installation data and will only be included when you are using the provided features.
+
+\\<b\\>Support for web installation, file patching\\</b\\>
+
+The NSIS distribution includes a set of plug-ins that allow you to download files from the internet, make internet connections, patch existing files and more.
+
+\\<b\\>Project integration, different releases and automatic builds\\</b\\>
+
+The NSIS compiler features a powerful preprocessor. This allows you to easily integrate multiple projects into a single installer or automatically generate installer builds. You can also generate different releases such as lite and full version.
+
+\\<b\\>Easy and human readable file formats\\</b\\>
+
+The NSIS script format and the format used for interface dialogs are easy, documented and humanly readable, so you can edit your files with your favorite editor. This also makes automatic script generation possible.
+
+\H{intro-featurelist} Feature List
+
+\b Generates self contained executable installers
+
+\b Support for ZLIB, BZIP2 and LZMA data compression (files can be compressed individually or together)
+
+\b Uninstall support (installer can generate an uninstaller)
+
+\b Customizable user interface (dialogs, fonts, backgrounds, icons, text, checkmarks, images etc.)
+
+\b Classic and Modern wizard interface
+
+\b Fully multilingual, support for multiple languages in one installer. More than 40 translations are available, but you can also create your own
+
+\b Page system: You can add standard wizard pages or custom pages
+
+\b User selection of installation components, tree for component selection
+
+\b Multiple install configurations (usually Minimal, Typical, Full), and custom configuration
+
+\b Installer self-verification using a CRC32 checksum
+
+\b Small overhead over compressed data size (34 KB with default options)
+
+\b Ability to display a license agreement in text or RTF format
+
+\b Ability to detect destination directory from the registry
+
+\b Easy to use plug-in system (lots of plug-ins for creation of custom dialogs, internet connections, HTTP downloading, file patching, Win32 API calls etc. are included)
+
+\b Installers can be as large as 2GB
+
+\b Optional silent mode for automated installations
+
+\b A preprocessor with support for defined symbols, macro's, conditional compilation, standard predefines
+
+\b A lovely coding experience with elements of PHP and assembly (includes user variables, a stack, real flow control, etc.)
+
+\b Installers have their own VMs that let you write code that can support:
+
+\\<ul\\>
+
+\b File extraction (with configurable overwrite parameters)
+
+\b File/directory copying, renaming, deletion, searching
+
+\b Plug-in DLL calling
+
+\b DLL/ActiveX control registration/deregistration
+
+\b Executable execution (shell execute and wait options)
+
+\b Shortcut creation
+
+\b Registry key reading/setting/enumerating/deleting
+
+\b INI file reading/writing
+
+\b Generic text file reading/writing
+
+\b Powerful string and integer manipulation
+
+\b Window finding based on class name or title
+
+\b User interface manipulation (font/text setting)
+
+\b Window message sending
+
+\b User interaction with message boxes or custom pages
+
+\b Branching, comparisons, etc.
+
+\b Error checking
+
+\b Reboot support, including delete or rename on reboot
+
+\b Installer behaviour commands (such as show/hide/wait/etc)
+
+\b User functions in script
+
+\b Callback functions for user actions
+
+\\</ul\\>
+
+\b Completely free for any use. See \R{license}{license}.
+
+\b More
diff --git a/Docs/src/jumps.but b/Docs/src/jumps.but
index e8125f8..3c4a6c0 100755
--- a/Docs/src/jumps.but
+++ b/Docs/src/jumps.but
@@ -1,28 +1,28 @@
-\S0{jumps} Relative Jumps
-
-Unlike labels, relative jumps are, as the name suggests, relative to the place they are called from. You can use relative jumps wherever you can use labels. Relative jumps are marked by numbers. +1 jumps to the next instruction (the default advancement), +2 will skip one instruction and go to the second instruction from the current instruction, -2 will jump two instructions backward, and +10 will skip 9 instructions, jumping to the tenth instruction from the current instruction.
-
-An instruction is every command that is executed at run-time, when the installer is running. \R{messagebox}{MessageBox}, \R{goto}{Goto}, \R{getdllversion}{GetDLLVersion}, \R{FileRead}{FileRead}, \R{setshellvarcontext}{SetShellVarContext} are all instructions. \R{saddsize}{AddSize}, \R{ssection}{Section}, \R{ssectiongroup}{SectionGroup}, \R{ssectionend}{SectionEnd}, \R{asetoverwrite}{SetOverwrite} (and everything under \R{flags}{Compiler Flags}), \R{aname}{Name}, \R{asetfont}{SetFont}, \R{langstring}{LangString}, are not instructions because they are executed at compile time.
-
-Examples:
-
-\c Goto +2
-\c MessageBox MB_OK "You will never ever see this message box"
-\c MessageBox MB_OK "The last message was skipped, this one should be shown"
-
-\c Goto +4
-\c MessageBox MB_OK "The following message will be skipped"
-\c Goto +3
-\c MessageBox MB_OK "You will never ever see this message box"
-\c Goto -3
-\c MessageBox MB_OK "Done"
-
-Note that \R{insertmacro}{macro insertion} is not considered as one instruction when it comes to relative jumps. The macro is expanded before relative jumps are applied, and so relative jumps can jump into code inside an inserted macro. The following code, for example, will not skip the macro. It will show a message box.
-
-\c !macro relative_jump_test
-\c MessageBox MB_OK "first macro line"
-\c MessageBox MB_OK "second macro line"
-\c !macroend
-\c
-\c Goto +2
-\c !insertmacro relative_jump_test
+\S0{jumps} Relative Jumps
+
+Unlike labels, relative jumps are, as the name suggests, relative to the place they are called from. You can use relative jumps wherever you can use labels. Relative jumps are marked by numbers. +1 jumps to the next instruction (the default advancement), +2 will skip one instruction and go to the second instruction from the current instruction, -2 will jump two instructions backward, and +10 will skip 9 instructions, jumping to the tenth instruction from the current instruction.
+
+An instruction is every command that is executed at run-time, when the installer is running. \R{messagebox}{MessageBox}, \R{goto}{Goto}, \R{getdllversion}{GetDLLVersion}, \R{FileRead}{FileRead}, \R{setshellvarcontext}{SetShellVarContext} are all instructions. \R{saddsize}{AddSize}, \R{ssection}{Section}, \R{ssectiongroup}{SectionGroup}, \R{ssectionend}{SectionEnd}, \R{asetoverwrite}{SetOverwrite} (and everything under \R{flags}{Compiler Flags}), \R{aname}{Name}, \R{asetfont}{SetFont}, \R{langstring}{LangString}, are not instructions because they are executed at compile time.
+
+Examples:
+
+\c Goto +2
+\c MessageBox MB_OK "You will never ever see this message box"
+\c MessageBox MB_OK "The last message was skipped, this one should be shown"
+
+\c Goto +4
+\c MessageBox MB_OK "The following message will be skipped"
+\c Goto +3
+\c MessageBox MB_OK "You will never ever see this message box"
+\c Goto -3
+\c MessageBox MB_OK "Done"
+
+Note that \R{insertmacro}{macro insertion} is not considered as one instruction when it comes to relative jumps. The macro is expanded before relative jumps are applied, and so relative jumps can jump into code inside an inserted macro. The following code, for example, will not skip the macro. It will show a message box.
+
+\c !macro relative_jump_test
+\c MessageBox MB_OK "first macro line"
+\c MessageBox MB_OK "second macro line"
+\c !macroend
+\c
+\c Goto +2
+\c !insertmacro relative_jump_test
diff --git a/Docs/src/labels.but b/Docs/src/labels.but
index 2888637..4108a1a 100755
--- a/Docs/src/labels.but
+++ b/Docs/src/labels.but
@@ -1,8 +1,8 @@
-\S0{labels} Labels
-
-Labels are the targets of Goto instructions, or of the various branching instructions (such as \R{iferrors}{IfErrors}, \R{messagebox}{MessageBox}, \R{iffileexists}{IfFileExists}, and \R{strcmp}{StrCmp}). Labels must be within a Section or a Function. Labels are local in scope, meaning they are only accessible from within the Section or Function that they reside in.
-To declare a label, simply use:
-
-\e{MyLabel:}
-
+\S0{labels} Labels
+
+Labels are the targets of Goto instructions, or of the various branching instructions (such as \R{iferrors}{IfErrors}, \R{messagebox}{MessageBox}, \R{iffileexists}{IfFileExists}, and \R{strcmp}{StrCmp}). Labels must be within a Section or a Function. Labels are local in scope, meaning they are only accessible from within the Section or Function that they reside in.
+To declare a label, simply use:
+
+\e{MyLabel:}
+
Labels cannot begin with a -, +, !, $, or 0-9. When specifying labels for the various instructions that require them, remember that both an empty string ("") and 0 both represent the next instruction (meaning no Goto will occur). Labels beginning with a period (.) are global, meaning you can jump to them from any function or section (though you cannot jump to an uninstall global label from the installer, and vice versa). \ No newline at end of file
diff --git a/Docs/src/langs.but b/Docs/src/langs.but
index 0eba42b..2ec92f5 100755
--- a/Docs/src/langs.but
+++ b/Docs/src/langs.but
@@ -1,85 +1,85 @@
-\S1{langsinstructions} Multiple Languages Instructions
-
-\S2{loadlanguagefile} LoadLanguageFile
-
-\c language_file.nlf
-
-Loads a language file for the construction of a language table. All of the language files that come with NSIS are in \L{../Contrib/Language files}{Contrib\\Language Files}
-
-After you have inserted the language file $\{LANG_langfile\} will be defined as the language id (for example, $\{LANG_ENGLISH\} will be defined as 1033). Use it with \R{langstring}{LangString}, \R{licenselangstring}{LicenseLangString}, LangDLL and \R{viaddversionkey}{VIAddVersionKey}.
-
-\S2{langstring} LangString
-
-\c name language_id string
-
-Defines a multilingual string. This means its value may be different (or not, it's up to you) for every language. It allows you to easily make your installer multilingual without the need to add massive switches to the script.
-
-Each language string has a name that identifies it and a value for each language used by the installer. They can be used in any runtime string in the script. To use a language string all you need to add to the string is $(LangString_name_here) where you want the LangString to be inserted.
-
-\\<b\\>Notes:\\</b\\>
-
-\b Unlike defines that use curly braces - \{\}, language strings use parenthesis - ().
-
-\b If you change the language in the .onInit function, note that language strings in .onInit will still use the detected language based on the user's default Windows language, because the language is initialized after .onInit.
-
-\b Always set language strings for every language in your script.
-
-\b If you set the language ID to 0 the last used language by LangString or \R{loadlanguagefile}{LoadLanguageFile} will be used.
-
-\\<b\\>Example of usage:\\</b\\>
-
-\c LangString message ${LANG_ENGLISH} "English message"
-\c LangString message ${LANG_FRENCH} "French message"
-\c LangString message ${LANG_KOREAN} "Korean message"
-\c
-\c MessageBox MB_OK "A translated message: $(message)"
-
-\S2{licenselangstring} LicenseLangString
-
-\c name language_id license_path
-
-Does the same as \R{langstring}{LangString} only it loads the string from a text/RTF file and defines a special LangString that can be used only by \R{alicensedata}{LicenseData}.
-
-\c LicenseLangString license ${LANG_ENGLISH} license-english.txt
-\c LicenseLangString license ${LANG_FRENCH} license-french.txt
-\c LicenseLangString license ${LANG_GERMAN} license-german.txt
-
-\c LicenseData $(license)
-
-\S0{langs} Multiple Languages
-
-As of version 2 NSIS fully supports multiple languages. The interface of one installer can support multiple languages.
-
-Use \R{loadlanguagefile}{LoadLanguageFile} for every language to load the default interface texts and language properties.
-
-The default interface texts can easily be changed using instructions like \R{acomponenttext}{ComponentText} etc.
-
-You can also use the contents of the standard language strings in your own strings (for example, $(^Name) contains the installer's name set using the \R{aname}{Name} instruction). The names of all standard language strings are listed as comments just above the strings in the language files. The language files are located in \L{../Contrib/Language files}{Contrib\\Language Files}.
-
-To create your own language strings, use \R{langstring}{LangString}.
-
-For an example of an installer with multiple languages, see \L{../Examples/languages.nsi}{languages.nsi}.
-
-\S1{langselection} Language Selection
-
-When the installer starts up it goes through these steps to select the interface language:
-
-\n Get user's default Windows UI language
-
-\n Find a perfect match for the language
-
-\n If there is no perfect match, find a primary language match
-
-\n If there is no match, use the first language defined in the script (make sure your first language is a common one like English)
-
-\n If the language variable \R{varconstant}{$LANGUAGE} has changed during .onInit, NSIS goes through steps 2 to 4 again.
-
-\S1{langdll} LangDLL Plug-in
-
-The LangDLL plug-in allows you to give the user an option to choose the language of the installer. Just push the language id ($\{LANG_langfile\}) and its name for every language in your installer, then the number of languages pushed, the caption, and the text that tells the user to select the language, call the plug-in function named LangDialog, pop the returned value into $LANGUAGE and you're good to go. If the user clicks on the cancel button the return value will be "cancel".
-
-For an example of usage see \L{../Examples/languages.nsi}{languages.nsi}.
-
-\S1{rtl} RTL Languages
-
-RTL languages are languages that are written from right to left (e.g. Arabic and Hebrew). NSIS fully supports RTL languages. In the language file there is a place to specify if the language is RTL or not. To find out at runtime if the current language is RTL or not, check the value of the $(^RTL) language string. It will be 1 if the language is RTL and 0 otherwise. This can be useful when using plug-ins that create dialogs, they usually have RTL settings too.
+\S1{langsinstructions} Multiple Languages Instructions
+
+\S2{loadlanguagefile} LoadLanguageFile
+
+\c language_file.nlf
+
+Loads a language file for the construction of a language table. All of the language files that come with NSIS are in \L{../Contrib/Language files}{Contrib\\Language Files}
+
+After you have inserted the language file $\{LANG_langfile\} will be defined as the language id (for example, $\{LANG_ENGLISH\} will be defined as 1033). Use it with \R{langstring}{LangString}, \R{licenselangstring}{LicenseLangString}, LangDLL and \R{viaddversionkey}{VIAddVersionKey}.
+
+\S2{langstring} LangString
+
+\c name language_id string
+
+Defines a multilingual string. This means its value may be different (or not, it's up to you) for every language. It allows you to easily make your installer multilingual without the need to add massive switches to the script.
+
+Each language string has a name that identifies it and a value for each language used by the installer. They can be used in any runtime string in the script. To use a language string all you need to add to the string is $(LangString_name_here) where you want the LangString to be inserted.
+
+\\<b\\>Notes:\\</b\\>
+
+\b Unlike defines that use curly braces - \{\}, language strings use parenthesis - ().
+
+\b If you change the language in the .onInit function, note that language strings in .onInit will still use the detected language based on the user's default Windows language, because the language is initialized after .onInit.
+
+\b Always set language strings for every language in your script.
+
+\b If you set the language ID to 0 the last used language by LangString or \R{loadlanguagefile}{LoadLanguageFile} will be used.
+
+\\<b\\>Example of usage:\\</b\\>
+
+\c LangString message ${LANG_ENGLISH} "English message"
+\c LangString message ${LANG_FRENCH} "French message"
+\c LangString message ${LANG_KOREAN} "Korean message"
+\c
+\c MessageBox MB_OK "A translated message: $(message)"
+
+\S2{licenselangstring} LicenseLangString
+
+\c name language_id license_path
+
+Does the same as \R{langstring}{LangString} only it loads the string from a text/RTF file and defines a special LangString that can be used only by \R{alicensedata}{LicenseData}.
+
+\c LicenseLangString license ${LANG_ENGLISH} license-english.txt
+\c LicenseLangString license ${LANG_FRENCH} license-french.txt
+\c LicenseLangString license ${LANG_GERMAN} license-german.txt
+
+\c LicenseData $(license)
+
+\S0{langs} Multiple Languages
+
+As of version 2 NSIS fully supports multiple languages. The interface of one installer can support multiple languages.
+
+Use \R{loadlanguagefile}{LoadLanguageFile} for every language to load the default interface texts and language properties.
+
+The default interface texts can easily be changed using instructions like \R{acomponenttext}{ComponentText} etc.
+
+You can also use the contents of the standard language strings in your own strings (for example, $(^Name) contains the installer's name set using the \R{aname}{Name} instruction). The names of all standard language strings are listed as comments just above the strings in the language files. The language files are located in \L{../Contrib/Language files}{Contrib\\Language Files}.
+
+To create your own language strings, use \R{langstring}{LangString}.
+
+For an example of an installer with multiple languages, see \L{../Examples/languages.nsi}{languages.nsi}.
+
+\S1{langselection} Language Selection
+
+When the installer starts up it goes through these steps to select the interface language:
+
+\n Get user's default Windows UI language
+
+\n Find a perfect match for the language
+
+\n If there is no perfect match, find a primary language match
+
+\n If there is no match, use the first language defined in the script (make sure your first language is a common one like English)
+
+\n If the language variable \R{varconstant}{$LANGUAGE} has changed during .onInit, NSIS goes through steps 2 to 4 again.
+
+\S1{langdll} LangDLL Plug-in
+
+The LangDLL plug-in allows you to give the user an option to choose the language of the installer. Just push the language id ($\{LANG_langfile\}) and its name for every language in your installer, then the number of languages pushed, the caption, and the text that tells the user to select the language, call the plug-in function named LangDialog, pop the returned value into $LANGUAGE and you're good to go. If the user clicks on the cancel button the return value will be "cancel".
+
+For an example of usage see \L{../Examples/languages.nsi}{languages.nsi}.
+
+\S1{rtl} RTL Languages
+
+RTL languages are languages that are written from right to left (e.g. Arabic and Hebrew). NSIS fully supports RTL languages. In the language file there is a place to specify if the language is RTL or not. To find out at runtime if the current language is RTL or not, check the value of the $(^RTL) language string. It will be 1 if the language is RTL and 0 otherwise. This can be useful when using plug-ins that create dialogs, they usually have RTL settings too.
diff --git a/Docs/src/library.but b/Docs/src/library.but
index 536126e..97c61bf 100755
--- a/Docs/src/library.but
+++ b/Docs/src/library.but
@@ -1,302 +1,302 @@
-\A{library} DLL/TLB Library Setup
-
-
-\H{library_intro} Introduction
-
-NSIS 2.01 features a new system for the installation and uninstallation of dynamic link libraries (DLL) and type libraries (TLB).
-Using this new system you can handle the complete setup with one single line of code:
-
-\b File copying
-
-\b File copying on reboot
-
-\b Version checks
-
-\b Registration and unregistration
-
-\b Registration and unregistration on reboot
-
-\b Shared DLL counting
-
-\b Windows File Protection checks
-
-The macros are stored in the header file Library.nsh, which should be included in scripts using this system:
-
-\c !include Library.nsh
-
-Note that the library macros are limited on non-Windows platforms. DLL version information is required when compiling on non-Windows platforms.
-
-
-\H{library_install} Library Installation
-
-\S1{} Introduction
-
-The InstallLib macro allows you to install a library. It sets the error flag if something went wrong during library setup.
-
-To ask the user for a reboot, if required, use the Modern UI with a Finish page or use \R{ifrebootflag}{IfRebootFlag} and make your own page or message box.
-
-\S1{} Parameters
-
-\c libtype shared install localfile destfile tempbasedir
-
-\\<b\\>libtype\\</b\\>
-
-The type of the library
-
-DLL - Dynamic link library (DLL)\\<br\\>
-REGDLL - DLL that has to be registered\\<br\\>
-TLB - Type library or DLL that contains a type LIBRARY\\<br\\>
-REGDLLTLB - DLL that has to be registered and contains a type library\\<br\\>
-
-
-\\<b\\>shared\\</b\\>
-
-Specify whether the library is shared with other applications
-
-NOTSHARED - The library is not shared\\<br\\>
-$VARNAME - Variable that is empty when the application is installed for the first time,
- which is when the shared library count will be increased.\\<br\\>
-
-\\<b\\>install\\</b\\>
-
-Specify the installation method
-
-REBOOT_PROTECTED
-
-\b Upgrade the library on reboot when in use (required for system files).
-
-\b Upgrade the library if the file is not protected by Windows File Protection.
-
-NOREBOOT_PROTECTED
-
-\b Warns the user when the library is in use. The user will have to close applications using the library.
-
-\b Upgrade the library if the file is not protected by Windows File Protection.
-
-REBOOT_NOTPROTECTED
-
-\b Upgrade the library on reboot when in use (required for system files).
-
-\b Upgrade the library without checking for Windows File Protection.
-
-NOREBOOT_NOTPROTECTED
-
-\b Warns the user when the library is in use. The user will have to close applications using the library.
-
-\b Upgrade the library without checking for Windows File Protection.
-
-\\<b\\>localfile\\</b\\>
-
-Location of the library on the compiler system
-
-\\<b\\>destfile\\</b\\>
-
-Location to store the library on the user's system
-
-\\<b\\>tempbasedir\\</b\\>
-
-Directory on the user's system to store a temporary file when the system has to be rebooted.
-
-For Windows 9x/ME support, this directory should be on the same volume as the destination file (destfile).
-The Windows temp directory could be located on any volume, so you cannot use this directory.
-
-\S1{} Options
-
-\R{define}{Define} any of the following before inserting the InstallLib macro to modify its behavior as specified.
-
-\S2{} LIBRARY_X64
-
-\b Installs a DLL built for Windows x64.
-
-\b \\<b\\>Warning:\\</b\\> this resets file system redirection.
-
-\S2{} LIBRARY_SHELL_EXTENSION
-
-\b Define this before inserting InstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after registration.
-
-\b Use this to refresh the shell when installing a shell extension or when changing file associations.
-
-\S2{} LIBRARY_COM
-
-\b Define this before inserting InstallLib macro to call CoFreeUnusedLibraries after registration.
-
-\b Use this for unloading all unnecessary libraries from memory when installing COM libraries.
-
-\S2{} LIBRARY_IGNORE_VERSION
-
-\b Define this before inserting InstallLib macro to ignore version information in the file and always install it, even if it already exists.
-
-\b Use this when an older or specific version is required.
-
-\b Not recommended for DLLs installed to $SYSDIR.
-
-\S1{} Notes
-
-\b If you want to support Windows 9x/ME, you can only use short filenames (8.3).
-
-\b \\<b\\>Warning:\\</b\\> when deploying DLLs, always use redistributable files. Never copy files from your system directory.
-
-\S1{} Example
-
-\S2{} Unshared DLL
-
-\c !insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR
-
-\S2{} Shared DLL
-
-\c ;Add code here that sets $ALREADY_INSTALLED to a non-zero value if the application is
-\c ;already installed. For example:
-\c
-\c IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
-\c StrCpy $ALREADY_INSTALLED 1
-\c new_installation:
-\c
-\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR
-
-\H{library_uninstall} Library Uninstallation
-
-\S1{} Introduction
-
-The UnInstallLib macro allows you to uninstall a library. It sets the error flag if something went wrong during library removal.
-
-\S1{} Parameters
-
-\c libtype shared uninstall file
-
-\\<b\\>libtype\\</b\\>
-
-The type of the library
-
-DLL - Dynamic link library (DLL)\\<br\\>
-REGDLL - DLL that has to be registered\\<br\\>
-TLB - Type library or DLL that contains a type LIBRARY\\<br\\>
-REGDLLTLB - DLL that has to be registered and contains a type library\\<br\\>
-
-
-\\<b\\>shared\\</b\\>
-
-Specify whether the library is shared with other applications
-
-NOTSHARED - The library is not shared\\<br\\>
-SHARED - The library is shared and should be removed if the shared library count
- indicates that the file is not in use anymore..\\<br\\>
-
-\\<b\\>uninstall\\</b\\>
-
-Specify the uninstallation method
-
-NOREMOVE
-
-\b The library should not be removed. You should use this option for common or important
-system files such as the Visual Basic/C++/MFC runtimes.
-
-REBOOT_PROTECTED
-
-\b Remove the library on reboot when in use (required for system files).
-
-\b Remove the library if the file is not protected by Windows File Protection.
-
-NOREBOOT_PROTECTED
-
-\b Warns the user when the library is in use. The user will have to close applications using the library.
-
-\b Remove the library if the file is not protected by Windows File Protection.
-
-REBOOT_NOTPROTECTED
-
-\b Remove the library on reboot when in use (required for system files).
-
-\b Remove the library without checking for Windows File Protection.
-
-NOREBOOT_NOTPROTECTED
-
-\b Warns the user when the library is in use. The user will have to close applications using the library.
-
-\b Remove the library without checking for Windows File Protection.
-
-
-\\<b\\>file\\</b\\>
-
-Location of the library
-
-\S1{} Options
-
-\R{define}{Define} any of the following before inserting the UnInstallLib macro to modify its behavior as specified.
-
-\S2{} LIBRARY_X64
-
-\b Uninstalls a DLL built for Windows x64.
-
-\b \\<b\\>Warning:\\</b\\> this resets \R{setregview}{RegSetView} and file system redirection.
-
-\S2{} LIBRARY_SHELL_EXTENSION
-
-\b Define this before inserting UninstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after unregistration. Use this to refresh the shell when uninstalling a shell extension or when changing file associations.
-
-\S2{} LIBRARY_COM
-
-\b Define this before inserting UninstallLib macro to call CoFreeUnusedLibraries after unregistration. Use this for unloading all unnecessary libraries from memory when uninstalling COM libraries.
-
-\S1{} Example
-
-\c !insertmacro UnInstallLib REGDLL SHARED REBOOT_NOTPROTECTED $SYSDIR\dllname.dll
-
-
-\H{library_vb6} Visual Basic 6 Runtimes
-
-Add this code to your script to install and uninstall the VB6 runtimes.
-
-The correct version of the following files should be stored in your script folder
-(or modify the paths to the local files if you want to use another folder):
-
-\b msvbvm60.dll
-
-\b oleaut32.dll
-
-\b olepro32.dll
-
-\b oleaut32.dll
-
-\b comcat.dll
-
-\b asycfilt.dll
-
-\b stdole2.tlb
-
-A \W{http://support.microsoft.com/default.aspx?scid=kb;en-us;290887}{Microsoft article} that explains how to obtain these files is available.
-
-To ask the user for a reboot, if required, use the Modern UI with a Finish page or use \R{ifrebootflag}{IfRebootFlag} and make your own page or message box.
-
-\c !include Library.nsh
-\c
-\c Var ALREADY_INSTALLED
-\c
-\c Section "-Install VB6 runtimes"
-\c
-\c ;Add code here that sets $ALREADY_INSTALLED to a non-zero value if the application is already installed. For example:
-\c
-\c IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
-\c StrCpy $ALREADY_INSTALLED 1
-\c new_installation:
-\c
-\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
-\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
-\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
-\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR"
-\c !insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
-\c !insertmacro InstallLib TLB $ALREADY_INSTALLED REBOOT_PROTECTED "stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR"
-\c
-\c SectionEnd
-\c
-\c Section "-un.Uninstall VB6 runtimes"
-\c
-\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll"
-\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll"
-\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll"
-\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat.dll"
-\c !insertmacro UnInstallLib DLL SHARED NOREMOVE "$SYSDIR\asycfilt.dll"
-\c !insertmacro UnInstallLib TLB SHARED NOREMOVE "$SYSDIR\stdole2.tlb"
-\c
-\c SectionEnd
-
-You can use similar code to install common VB6 ActiveX controls (such as the controls for Windows Common Controls).
+\A{library} DLL/TLB Library Setup
+
+
+\H{library_intro} Introduction
+
+NSIS 2.01 features a new system for the installation and uninstallation of dynamic link libraries (DLL) and type libraries (TLB).
+Using this new system you can handle the complete setup with one single line of code:
+
+\b File copying
+
+\b File copying on reboot
+
+\b Version checks
+
+\b Registration and unregistration
+
+\b Registration and unregistration on reboot
+
+\b Shared DLL counting
+
+\b Windows File Protection checks
+
+The macros are stored in the header file Library.nsh, which should be included in scripts using this system:
+
+\c !include Library.nsh
+
+Note that the library macros are limited on non-Windows platforms. DLL version information is required when compiling on non-Windows platforms.
+
+
+\H{library_install} Library Installation
+
+\S1{} Introduction
+
+The InstallLib macro allows you to install a library. It sets the error flag if something went wrong during library setup.
+
+To ask the user for a reboot, if required, use the Modern UI with a Finish page or use \R{ifrebootflag}{IfRebootFlag} and make your own page or message box.
+
+\S1{} Parameters
+
+\c libtype shared install localfile destfile tempbasedir
+
+\\<b\\>libtype\\</b\\>
+
+The type of the library
+
+DLL - Dynamic link library (DLL)\\<br\\>
+REGDLL - DLL that has to be registered\\<br\\>
+TLB - Type library or DLL that contains a type LIBRARY\\<br\\>
+REGDLLTLB - DLL that has to be registered and contains a type library\\<br\\>
+
+
+\\<b\\>shared\\</b\\>
+
+Specify whether the library is shared with other applications
+
+NOTSHARED - The library is not shared\\<br\\>
+$VARNAME - Variable that is empty when the application is installed for the first time,
+ which is when the shared library count will be increased.\\<br\\>
+
+\\<b\\>install\\</b\\>
+
+Specify the installation method
+
+REBOOT_PROTECTED
+
+\b Upgrade the library on reboot when in use (required for system files).
+
+\b Upgrade the library if the file is not protected by Windows File Protection.
+
+NOREBOOT_PROTECTED
+
+\b Warns the user when the library is in use. The user will have to close applications using the library.
+
+\b Upgrade the library if the file is not protected by Windows File Protection.
+
+REBOOT_NOTPROTECTED
+
+\b Upgrade the library on reboot when in use (required for system files).
+
+\b Upgrade the library without checking for Windows File Protection.
+
+NOREBOOT_NOTPROTECTED
+
+\b Warns the user when the library is in use. The user will have to close applications using the library.
+
+\b Upgrade the library without checking for Windows File Protection.
+
+\\<b\\>localfile\\</b\\>
+
+Location of the library on the compiler system
+
+\\<b\\>destfile\\</b\\>
+
+Location to store the library on the user's system
+
+\\<b\\>tempbasedir\\</b\\>
+
+Directory on the user's system to store a temporary file when the system has to be rebooted.
+
+For Windows 9x/ME support, this directory should be on the same volume as the destination file (destfile).
+The Windows temp directory could be located on any volume, so you cannot use this directory.
+
+\S1{} Options
+
+\R{define}{Define} any of the following before inserting the InstallLib macro to modify its behavior as specified.
+
+\S2{} LIBRARY_X64
+
+\b Installs a DLL built for Windows x64.
+
+\b \\<b\\>Warning:\\</b\\> this resets file system redirection.
+
+\S2{} LIBRARY_SHELL_EXTENSION
+
+\b Define this before inserting InstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after registration.
+
+\b Use this to refresh the shell when installing a shell extension or when changing file associations.
+
+\S2{} LIBRARY_COM
+
+\b Define this before inserting InstallLib macro to call CoFreeUnusedLibraries after registration.
+
+\b Use this for unloading all unnecessary libraries from memory when installing COM libraries.
+
+\S2{} LIBRARY_IGNORE_VERSION
+
+\b Define this before inserting InstallLib macro to ignore version information in the file and always install it, even if it already exists.
+
+\b Use this when an older or specific version is required.
+
+\b Not recommended for DLLs installed to $SYSDIR.
+
+\S1{} Notes
+
+\b If you want to support Windows 9x/ME, you can only use short filenames (8.3).
+
+\b \\<b\\>Warning:\\</b\\> when deploying DLLs, always use redistributable files. Never copy files from your system directory.
+
+\S1{} Example
+
+\S2{} Unshared DLL
+
+\c !insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR
+
+\S2{} Shared DLL
+
+\c ;Add code here that sets $ALREADY_INSTALLED to a non-zero value if the application is
+\c ;already installed. For example:
+\c
+\c IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
+\c StrCpy $ALREADY_INSTALLED 1
+\c new_installation:
+\c
+\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR
+
+\H{library_uninstall} Library Uninstallation
+
+\S1{} Introduction
+
+The UnInstallLib macro allows you to uninstall a library. It sets the error flag if something went wrong during library removal.
+
+\S1{} Parameters
+
+\c libtype shared uninstall file
+
+\\<b\\>libtype\\</b\\>
+
+The type of the library
+
+DLL - Dynamic link library (DLL)\\<br\\>
+REGDLL - DLL that has to be registered\\<br\\>
+TLB - Type library or DLL that contains a type LIBRARY\\<br\\>
+REGDLLTLB - DLL that has to be registered and contains a type library\\<br\\>
+
+
+\\<b\\>shared\\</b\\>
+
+Specify whether the library is shared with other applications
+
+NOTSHARED - The library is not shared\\<br\\>
+SHARED - The library is shared and should be removed if the shared library count
+ indicates that the file is not in use anymore..\\<br\\>
+
+\\<b\\>uninstall\\</b\\>
+
+Specify the uninstallation method
+
+NOREMOVE
+
+\b The library should not be removed. You should use this option for common or important
+system files such as the Visual Basic/C++/MFC runtimes.
+
+REBOOT_PROTECTED
+
+\b Remove the library on reboot when in use (required for system files).
+
+\b Remove the library if the file is not protected by Windows File Protection.
+
+NOREBOOT_PROTECTED
+
+\b Warns the user when the library is in use. The user will have to close applications using the library.
+
+\b Remove the library if the file is not protected by Windows File Protection.
+
+REBOOT_NOTPROTECTED
+
+\b Remove the library on reboot when in use (required for system files).
+
+\b Remove the library without checking for Windows File Protection.
+
+NOREBOOT_NOTPROTECTED
+
+\b Warns the user when the library is in use. The user will have to close applications using the library.
+
+\b Remove the library without checking for Windows File Protection.
+
+
+\\<b\\>file\\</b\\>
+
+Location of the library
+
+\S1{} Options
+
+\R{define}{Define} any of the following before inserting the UnInstallLib macro to modify its behavior as specified.
+
+\S2{} LIBRARY_X64
+
+\b Uninstalls a DLL built for Windows x64.
+
+\b \\<b\\>Warning:\\</b\\> this resets \R{setregview}{RegSetView} and file system redirection.
+
+\S2{} LIBRARY_SHELL_EXTENSION
+
+\b Define this before inserting UninstallLib macro to call SHChangeNotify with SHCNE_ASSOCCHANGED after unregistration. Use this to refresh the shell when uninstalling a shell extension or when changing file associations.
+
+\S2{} LIBRARY_COM
+
+\b Define this before inserting UninstallLib macro to call CoFreeUnusedLibraries after unregistration. Use this for unloading all unnecessary libraries from memory when uninstalling COM libraries.
+
+\S1{} Example
+
+\c !insertmacro UnInstallLib REGDLL SHARED REBOOT_NOTPROTECTED $SYSDIR\dllname.dll
+
+
+\H{library_vb6} Visual Basic 6 Runtimes
+
+Add this code to your script to install and uninstall the VB6 runtimes.
+
+The correct version of the following files should be stored in your script folder
+(or modify the paths to the local files if you want to use another folder):
+
+\b msvbvm60.dll
+
+\b oleaut32.dll
+
+\b olepro32.dll
+
+\b oleaut32.dll
+
+\b comcat.dll
+
+\b asycfilt.dll
+
+\b stdole2.tlb
+
+A \W{http://support.microsoft.com/default.aspx?scid=kb;en-us;290887}{Microsoft article} that explains how to obtain these files is available.
+
+To ask the user for a reboot, if required, use the Modern UI with a Finish page or use \R{ifrebootflag}{IfRebootFlag} and make your own page or message box.
+
+\c !include Library.nsh
+\c
+\c Var ALREADY_INSTALLED
+\c
+\c Section "-Install VB6 runtimes"
+\c
+\c ;Add code here that sets $ALREADY_INSTALLED to a non-zero value if the application is already installed. For example:
+\c
+\c IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation ;Replace MyApp.exe with your application filename
+\c StrCpy $ALREADY_INSTALLED 1
+\c new_installation:
+\c
+\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "msvbvm60.dll" "$SYSDIR\msvbvm60.dll" "$SYSDIR"
+\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "oleaut32.dll" "$SYSDIR\oleaut32.dll" "$SYSDIR"
+\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "olepro32.dll" "$SYSDIR\olepro32.dll" "$SYSDIR"
+\c !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_PROTECTED "comcat.dll" "$SYSDIR\comcat.dll" "$SYSDIR"
+\c !insertmacro InstallLib DLL $ALREADY_INSTALLED REBOOT_PROTECTED "asycfilt.dll" "$SYSDIR\asycfilt.dll" "$SYSDIR"
+\c !insertmacro InstallLib TLB $ALREADY_INSTALLED REBOOT_PROTECTED "stdole2.tlb" "$SYSDIR\stdole2.tlb" "$SYSDIR"
+\c
+\c SectionEnd
+\c
+\c Section "-un.Uninstall VB6 runtimes"
+\c
+\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\msvbvm60.dll"
+\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\oleaut32.dll"
+\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\olepro32.dll"
+\c !insertmacro UnInstallLib REGDLL SHARED NOREMOVE "$SYSDIR\comcat.dll"
+\c !insertmacro UnInstallLib DLL SHARED NOREMOVE "$SYSDIR\asycfilt.dll"
+\c !insertmacro UnInstallLib TLB SHARED NOREMOVE "$SYSDIR\stdole2.tlb"
+\c
+\c SectionEnd
+
+You can use similar code to install common VB6 ActiveX controls (such as the controls for Windows Common Controls).
diff --git a/Docs/src/license.but b/Docs/src/license.but
index 3817a92..e10dc23 100755
--- a/Docs/src/license.but
+++ b/Docs/src/license.but
@@ -1,138 +1,138 @@
-\A{license} License
-
-\H{copyright} Copyright
-
-Copyright (C) 1995-2007 Contributors
-
-More detailed copyright information can be found in the individual source code files.
-
-\H{licenses} Applicable licenses
-
-\b All NSIS source code, plug-ins, documentation, examples, header files and graphics, with the exception of the compression modules and where otherwise noted, are licensed under the zlib/libpng license.
-
-\b The zlib compression module for NSIS is licensed under the zlib/libpng license.
-
-\b The bzip2 compression module for NSIS is licensed under the bzip2 license.
-
-\b The lzma compression module for NSIS is licensed under the Common Public License version 1.0.
-
-\H{zlib-license} zlib/libpng license
-
-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:
-
-\n 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.
-
-\n Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-
-\n This notice may not be removed or altered from any source distribution.
-
-\H{bzip2-license} bzip2 license
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-\n Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-\n 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.
-
-\n Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-
-\n The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Julian Seward, Cambridge, UK.
-
-\W{mailto:jseward@acm.org}{jseward@acm.org}
-
-\H{cpl-license} Common Public License version 1.0
-
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
-
-1. DEFINITIONS
-
-"Contribution" means:
-
- a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
- b) in the case of each subsequent Contributor:
-
- i) changes to the Program, and
-
- ii) additions to the Program;
-
- where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
-
-"Contributor" means any person or entity that distributes the Program.
-
-"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
-
-"Program" means the Contributions distributed in accordance with this Agreement.
-
-"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
-
-2. GRANT OF RIGHTS
-
- a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
-
- b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-
- c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-
- d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
-
-3. REQUIREMENTS
-
-A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-
- a) it complies with the terms and conditions of this Agreement; and
-
- b) its license agreement:
-
- i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
-
- ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-
- iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-
- iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
-
-When the Program is made available in source code form:
-
- a) it must be made available under this Agreement; and
-
- b) a copy of this Agreement must be included with each copy of the Program.
-
-Contributors may not remove or alter any copyright notices contained within the Program.
-
-Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
-
-4. COMMERCIAL DISTRIBUTION
-
-Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
-
-For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
-
-5. NO WARRANTY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
-
-6. DISCLAIMER OF LIABILITY
-
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. GENERAL
-
-If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
-
-If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
-
-All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
-
-Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
-
-This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
-
-\H{lzma-special-exception} Special exception for LZMA compression module
-
+\A{license} License
+
+\H{copyright} Copyright
+
+Copyright (C) 1995-2007 Contributors
+
+More detailed copyright information can be found in the individual source code files.
+
+\H{licenses} Applicable licenses
+
+\b All NSIS source code, plug-ins, documentation, examples, header files and graphics, with the exception of the compression modules and where otherwise noted, are licensed under the zlib/libpng license.
+
+\b The zlib compression module for NSIS is licensed under the zlib/libpng license.
+
+\b The bzip2 compression module for NSIS is licensed under the bzip2 license.
+
+\b The lzma compression module for NSIS is licensed under the Common Public License version 1.0.
+
+\H{zlib-license} zlib/libpng license
+
+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:
+
+\n 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.
+
+\n Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+
+\n This notice may not be removed or altered from any source distribution.
+
+\H{bzip2-license} bzip2 license
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+\n Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+\n 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.
+
+\n Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+
+\n The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Julian Seward, Cambridge, UK.
+
+\W{mailto:jseward@acm.org}{jseward@acm.org}
+
+\H{cpl-license} Common Public License version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+ b) in the case of each subsequent Contributor:
+
+ i) changes to the Program, and
+
+ ii) additions to the Program;
+
+ where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+ a) it complies with the terms and conditions of this Agreement; and
+
+ b) its license agreement:
+
+ i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+ iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+ iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+ a) it must be made available under this Agreement; and
+
+ b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
+
+\H{lzma-special-exception} Special exception for LZMA compression module
+
Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for NSIS, expressly permit you to statically or dynamically link your code (or bind by name) to the files from the LZMA compression module for NSIS without subjecting your linked code to the terms of the Common Public license version 1.0. Any modifications or additions to files from the LZMA compression module for NSIS, however, are subject to the terms of the Common Public License version 1.0. \ No newline at end of file
diff --git a/Docs/src/log.but b/Docs/src/log.but
index 361d1ee..9a5c1aa 100755
--- a/Docs/src/log.but
+++ b/Docs/src/log.but
@@ -1,16 +1,16 @@
-\S1{installlog} Install Logging Instructions
-
-\S2{logset} LogSet
-
-\c on|\\<b\\>off\\</b\\>
-
-Sets whether install logging to $INSTDIR\\install.log will happen. $INSTDIR must have a value before you call this function or it will not work. Note that the \e{NSIS_CONFIG_LOG} build setting must be set (\c{scons NSIS_CONFIG_LOG=yes}) on compile time (it is not by default) to support this. See \R{build}{Building NSIS} for more information about recompiling NSIS.
-
-\S2{logtext} LogText
-
-\c text
-
-If installer logging is enabled, inserts text "text" into the log file.
-
-\c IfFileExists $WINDIR\notepad.exe 0 +2
-\c LogText "$$WINDIR\notepad.exe exists"
+\S1{installlog} Install Logging Instructions
+
+\S2{logset} LogSet
+
+\c on|\\<b\\>off\\</b\\>
+
+Sets whether install logging to $INSTDIR\\install.log will happen. $INSTDIR must have a value before you call this function or it will not work. Note that the \e{NSIS_CONFIG_LOG} build setting must be set (\c{scons NSIS_CONFIG_LOG=yes}) on compile time (it is not by default) to support this. See \R{build}{Building NSIS} for more information about recompiling NSIS.
+
+\S2{logtext} LogText
+
+\c text
+
+If installer logging is enabled, inserts text "text" into the log file.
+
+\c IfFileExists $WINDIR\notepad.exe 0 +2
+\c LogText "$$WINDIR\notepad.exe exists"
diff --git a/Docs/src/misc.but b/Docs/src/misc.but
index 9b800f9..a42eb97 100755
--- a/Docs/src/misc.but
+++ b/Docs/src/misc.but
@@ -1,113 +1,113 @@
-\S1{miscinst} Miscellaneous Instructions
-
-\S2{geterrorlevel} GetErrorLevel
-
-\c user_var(error level output)
-
-Returns the last error level set by \R{seterrorlevel}{SetErrorLevel} or -1 if it was never used.
-
-\c GetErrorLevel $0
-\c IntOp $0 $0 + 1
-\c SetErrorLevel $0
-
-\S2{getinstdirerror} GetInstDirError
-
-\c user_var(error output)
-
-Use in the leave function of a directory page. Reads the flag set if '\R{adirverify}{DirVerify leave}' is used. Possible values:
-
-0: No error
-
-1: Invalid installation directory
-
-2: Not enough space on installation drive
-
-\c !include LogicLib.nsh
-\c PageEx directory
-\c DirVerify leave
-\c PageCallbacks "" "" dirLeave
-\c PageExEnd
-\c
-\c Function dirLeave
-\c GetInstDirError $0
-\c ${Switch} $0
-\c ${Case} 0
-\c MessageBox MB_OK "valid installation directory"
-\c ${Break}
-\c ${Case} 1
-\c MessageBox MB_OK "invalid installation directory!"
-\c Abort
-\c ${Break}
-\c ${Case} 2
-\c MessageBox MB_OK "not enough free space!"
-\c Abort
-\c ${Break}
-\c ${EndSwitch}
-\c FunctionEnd
-
-\S2{initpluginsdir} InitPluginsDir
-
-Initializes the plug-ins dir (\R{varconstant}{$PLUGINSDIR}) if not already initialized.
-
-\c InitPluginsDir
-\c File /oname=$PLUGINSDIR\image.bmp image.bmp
-
-\S2{nop} Nop
-
-Does nothing.
-
-\S2{seterrorlevel} SetErrorLevel
-
-\c error_level
-
-Sets the error level of the installer or uninstaller to \e{error_level}. See \R{errorlevels}{Error Levels} for more information.
-
-\c IfRebootFlag 0 +2
-\c SetErrorLevel 4
-
-\S2{setregview} SetRegView
-
-\c \\<b\\>32\\</b\\>|64|lastused
-
-Sets the registry view affected by \R{registry}{registry commands}. On Windows x64 there are two views. One for 32-bit applications and one for x64 applications. By default, 32-bit applications running on x64 systems under WOW64 have access only to the 32-bit view. Using \c{SetRegView 64} allows the installer to access keys in the x64 view of the registry.
-
-Affects \R{deleteregkey}{DeleteRegKey}, \R{deleteregvalue}{DeleteRegValue}, \R{enumregkey}{EnumRegKey}, \R{enumregvalue}{EnumRegValue}, \R{readregdword}{ReadRegDWORD}, \R{readregstr}{ReadRegStr}, \R{writeregbin}{WriteRegBin}, \R{writeregdword}{WriteRegDWORD}, \R{writeregstr}{WriteRegStr} and \R{writeregexpandstr}{WriteRegExpandStr}.
-
-Does not affect \R{ainstalldirregkey}{InstallDirRegKey}. Instead, the registry can be read using \R{readregstr}{ReadRegStr} in \R{oninit}{.onInit}.
-
-\c SetRegView 32
-\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
-\c DetailPrit $0 # prints C:\Program Files (x86)
-\c SetRegView 64
-\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
-\c DetailPrit $0 # prints C:\Program Files
-
-\c Function .onInit
-\c SetRegView 64
-\c ReadRegStr $INSTDIR HKLM Software\NSIS ""
-\c SetRegView 32
-\c FunctionEnd
-
-\S2{setshellvarcontext} SetShellVarContext
-
-\c \\<b\\>current\\</b\\>|all
-
-Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo plug-in. See Contrib\\UserInfo\\UserInfo.nsi for an example.
-
-Note that, if used in installer code, this will only affect the installer, and if used in uninstaller code, this will only affect the uninstaller. To affect both, it needs to be used in both.
-
-\c SetShellVarContext current
-\c StrCpy $0 $DESKTOP
-\c SetShellVarContext all
-\c StrCpy $1 $DESKTOP
-\c MessageBox MB_OK $0$\n$1
-
-\S2{sleep} Sleep
-
-\c sleeptime_in_ms
-
-Pauses execution in the installer for sleeptime_in_ms milliseconds. sleeptime_in_ms can be a variable, e.g. "$0" or a number, i.e. "666".
-
-\c DetailPrint "sleeping..."
-\c Sleep 3000
-\c DetailPrint "back to work"
+\S1{miscinst} Miscellaneous Instructions
+
+\S2{geterrorlevel} GetErrorLevel
+
+\c user_var(error level output)
+
+Returns the last error level set by \R{seterrorlevel}{SetErrorLevel} or -1 if it was never used.
+
+\c GetErrorLevel $0
+\c IntOp $0 $0 + 1
+\c SetErrorLevel $0
+
+\S2{getinstdirerror} GetInstDirError
+
+\c user_var(error output)
+
+Use in the leave function of a directory page. Reads the flag set if '\R{adirverify}{DirVerify leave}' is used. Possible values:
+
+0: No error
+
+1: Invalid installation directory
+
+2: Not enough space on installation drive
+
+\c !include LogicLib.nsh
+\c PageEx directory
+\c DirVerify leave
+\c PageCallbacks "" "" dirLeave
+\c PageExEnd
+\c
+\c Function dirLeave
+\c GetInstDirError $0
+\c ${Switch} $0
+\c ${Case} 0
+\c MessageBox MB_OK "valid installation directory"
+\c ${Break}
+\c ${Case} 1
+\c MessageBox MB_OK "invalid installation directory!"
+\c Abort
+\c ${Break}
+\c ${Case} 2
+\c MessageBox MB_OK "not enough free space!"
+\c Abort
+\c ${Break}
+\c ${EndSwitch}
+\c FunctionEnd
+
+\S2{initpluginsdir} InitPluginsDir
+
+Initializes the plug-ins dir (\R{varconstant}{$PLUGINSDIR}) if not already initialized.
+
+\c InitPluginsDir
+\c File /oname=$PLUGINSDIR\image.bmp image.bmp
+
+\S2{nop} Nop
+
+Does nothing.
+
+\S2{seterrorlevel} SetErrorLevel
+
+\c error_level
+
+Sets the error level of the installer or uninstaller to \e{error_level}. See \R{errorlevels}{Error Levels} for more information.
+
+\c IfRebootFlag 0 +2
+\c SetErrorLevel 4
+
+\S2{setregview} SetRegView
+
+\c \\<b\\>32\\</b\\>|64|lastused
+
+Sets the registry view affected by \R{registry}{registry commands}. On Windows x64 there are two views. One for 32-bit applications and one for x64 applications. By default, 32-bit applications running on x64 systems under WOW64 have access only to the 32-bit view. Using \c{SetRegView 64} allows the installer to access keys in the x64 view of the registry.
+
+Affects \R{deleteregkey}{DeleteRegKey}, \R{deleteregvalue}{DeleteRegValue}, \R{enumregkey}{EnumRegKey}, \R{enumregvalue}{EnumRegValue}, \R{readregdword}{ReadRegDWORD}, \R{readregstr}{ReadRegStr}, \R{writeregbin}{WriteRegBin}, \R{writeregdword}{WriteRegDWORD}, \R{writeregstr}{WriteRegStr} and \R{writeregexpandstr}{WriteRegExpandStr}.
+
+Does not affect \R{ainstalldirregkey}{InstallDirRegKey}. Instead, the registry can be read using \R{readregstr}{ReadRegStr} in \R{oninit}{.onInit}.
+
+\c SetRegView 32
+\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
+\c DetailPrit $0 # prints C:\Program Files (x86)
+\c SetRegView 64
+\c ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion ProgramFilesDir
+\c DetailPrit $0 # prints C:\Program Files
+
+\c Function .onInit
+\c SetRegView 64
+\c ReadRegStr $INSTDIR HKLM Software\NSIS ""
+\c SetRegView 32
+\c FunctionEnd
+
+\S2{setshellvarcontext} SetShellVarContext
+
+\c \\<b\\>current\\</b\\>|all
+
+Sets the context of $SMPROGRAMS and other shell folders. If set to 'current' (the default), the current user's shell folders are used. If set to 'all', the 'all users' shell folder is used. The all users folder may not be supported on all OSes. If the all users folder is not found, the current user folder will be used. Please take into consideration that a "normal user" has no rights to write in the all users area. Only admins have full access rights to the all users area. You can check this by using the UserInfo plug-in. See Contrib\\UserInfo\\UserInfo.nsi for an example.
+
+Note that, if used in installer code, this will only affect the installer, and if used in uninstaller code, this will only affect the uninstaller. To affect both, it needs to be used in both.
+
+\c SetShellVarContext current
+\c StrCpy $0 $DESKTOP
+\c SetShellVarContext all
+\c StrCpy $1 $DESKTOP
+\c MessageBox MB_OK $0$\n$1
+
+\S2{sleep} Sleep
+
+\c sleeptime_in_ms
+
+Pauses execution in the installer for sleeptime_in_ms milliseconds. sleeptime_in_ms can be a variable, e.g. "$0" or a number, i.e. "666".
+
+\c DetailPrint "sleeping..."
+\c Sleep 3000
+\c DetailPrint "back to work"
diff --git a/Docs/src/modernui.but b/Docs/src/modernui.but
index ab7db36..96704f2 100755
--- a/Docs/src/modernui.but
+++ b/Docs/src/modernui.but
@@ -1,7 +1,7 @@
-\A{modernui} Modern User Interface
-
-NSIS 2 makes it is possible to create installers with a custom user interface. The Modern UI is an interface with a style like the wizards of recent Windows versions.
-This new interface also features new pages (Welcome, Finish, Start Menu) and a description area on the components page. The interface and the graphics can be customized using the provided settings.
-Using the Modern UI macros and language files, writing scripts with a modern interface is easy.
-
+\A{modernui} Modern User Interface
+
+NSIS 2 makes it is possible to create installers with a custom user interface. The Modern UI is an interface with a style like the wizards of recent Windows versions.
+This new interface also features new pages (Welcome, Finish, Start Menu) and a description area on the components page. The interface and the graphics can be customized using the provided settings.
+Using the Modern UI macros and language files, writing scripts with a modern interface is easy.
+
For more information and documentation see the \L{../Docs/Modern UI/Readme.html}{Modern UI Readme}. \ No newline at end of file
diff --git a/Docs/src/nsis.hhp b/Docs/src/nsis.hhp
index 128d976..7c21480 100755
--- a/Docs/src/nsis.hhp
+++ b/Docs/src/nsis.hhp
@@ -1,21 +1,21 @@
-[OPTIONS]
-Compatibility=1.1 or later
-Compiled file=NSIS.chm
-Contents file=toc.hhc
-Default Window=Main
-Default topic=Contents.html
-Display compile progress=Yes
-Full-text search=Yes
-Index file=ind.hhk
-Language=0x409 English (United States)
-Title=NSIS Users Manual
-
-[WINDOWS]
-Main="NSIS User Manual","toc.hhc","ind.hhk","Contents.html","Contents.html",,,,,0x23520,,0x387e,,0xb0000,,,,,,0
-
-
-[FILES]
-Contents.html
-
-[INFOTYPES]
-
+[OPTIONS]
+Compatibility=1.1 or later
+Compiled file=NSIS.chm
+Contents file=toc.hhc
+Default Window=Main
+Default topic=Contents.html
+Display compile progress=Yes
+Full-text search=Yes
+Index file=ind.hhk
+Language=0x409 English (United States)
+Title=NSIS Users Manual
+
+[WINDOWS]
+Main="NSIS User Manual","toc.hhc","ind.hhk","Contents.html","Contents.html",,,,,0x23520,,0x387e,,0xb0000,,,,,,0
+
+
+[FILES]
+Contents.html
+
+[INFOTYPES]
+
diff --git a/Docs/src/pages.but b/Docs/src/pages.but
index 9235c72..8997a10 100755
--- a/Docs/src/pages.but
+++ b/Docs/src/pages.but
@@ -1,170 +1,170 @@
-\H{pages} Pages
-
-Each (non-silent) NSIS installer has a set of pages. Each page can be a NSIS built-in page or a custom page created by a user's function (with \L{../Docs/InstallOptions/Readme.html}{InstallOptions} for example).
-
-Using the script you can control the pages' order, appearance, and behavior. You can skip pages, paint them white, force the user to stay in a certain page until a certain condition is met, show a readme page, show custom designed pages for input and more. In this section, you will learn how to control all of the above.
-
-There are two basic commands regarding pages, \R{page}{Page} and \R{uninstpage}{UninstPage}. The first adds a page to the installer, the second adds a page to the uninstaller. On top of those two there is the \R{pageex}{PageEx} command which allows you to add a page to either one and with greater amount of options. \R{pageex}{PageEx} allows you to set options to the specific page you are adding instead of using the default that's set outside of \R{pageex}{PageEx}.
-
-\S{pageoreder} Ordering
-
-The page order is set simply by the order \R{page}{Page}, \R{uninstpage}{UninstPage} and \R{pageex}{PageEx} appear in the script. For example:
-
-\c Page license
-\c Page components
-\c Page directory
-\c Page instfiles
-\c UninstPage uninstConfirm
-\c UninstPage instfiles
-
-This code will tell NSIS to first show the license page, then the components selection page, then the directory selection page and finally the install log where sections are executed, just like in old installers. The uninstaller will first show the uninstall confirmation page and then the uninstallation log.
-
-You can specify the same page type more than once.
-
-For backwards compatibility with old NSIS scripts, the following installer pages will be added if no installer page commands are used: license (if \R{alicensetext}{LicenseText} and \R{alicensedata}{LicenseData} were specified), components (if \R{acomponenttext}{ComponentText} was specified and there is more than one visible section), directory (if \R{adirtext}{DirText} was specified) and instfiles. When there are no uninstaller page commands, the following uninstaller pages will be added: uninstall confirmation page (if \R{auninstalltext}{UninstallText} was specified) and instfiles. This method is deprecated, converting scripts to use page commands is highly recommended because you can use the new standard language strings.
-
-\S{pageoptions} Page Options
-
-Each page has its unique set of data that defines how it will look and act. This section describes what data each type of page uses and how you can set it. \R{pagecallbacks_explain}{Callback functions} are described below and are not dealt with in this section.
-
-The list below lists what commands affect the certain page type. Unless mentioned otherwise, these commands can be used both in and out of a \R{pageex}{PageEx} block. If used inside a \R{pageex}{PageEx} block they will only affect the current page being set by \R{pageex}{PageEx}, else they will set the default for every other page.
-
-\e{License page}
-
-\b \R{alicensetext}{LicenseText}
-
-\b \R{alicensedata}{LicenseData}
-
-\b \R{alicenseforceselection}{LicenseForceSelection}
-
-\e{Components selection page}
-
-\b \R{acomponenttext}{ComponentText}
-
-\e{Directory selection page}
-
-\b \R{adirtext}{DirText}
-
-\b \R{adirvar}{DirVar} - can only be used in \R{pageex}{PageEx}
-
-\b \R{adirverify}{DirVerify}
-
-\e{Un/Installation log page}
-
-\b \R{adetailsbuttontext}{DetailsButtonText}
-
-\b \R{acompletedtext}{CompletedText}
-
-\e{Uninstall confirmation page}
-
-\b \R{adirvar}{DirVar} - can only be used in \R{pageex}{PageEx}
-
-\b \R{auninstalltext}{UninstallText}
-
-To set the page caption use \R{acaption}{Caption}.
-
-\S{pagecallbacks_explain} Callbacks
-
-Each built-in page has three callback functions: the pre-function, the show-creation function and the leave-function. The pre-function is called right before the page is created, the show-function is called right after it is created and before it is shown and the leave-function is called right after the user has pressed the next button and before the page is left.
-
-\b The pre-function allows you to skip the page using \R{abort}{Abort}.
-
-\b The show-function allows you to tweak the page's user interface with \R{createfont}{CreateFont}, \R{setctlcolors}{SetCtlColors}, \R{sendmessage}{SendMessage} and others.
-
-\b The leave-function allows you to force the user to stay on the current page using \R{abort}{Abort}.
-
-A custom page only has two callback functions, one that creates it which is mandatory, and one leave-function that acts just like the leave-function for built-in pages.
-
-Examples:
-
-\c Page license skipLicense "" stayInLicense
-\c Page custom customPage "" ": custom page"
-\c Page instfiles
-\c
-\c Function skipLicense
-\c MessageBox MB_YESNO "Do you want to skip the license page?" IDNO no
-\c Abort
-\c no:
-\c FunctionEnd
-\c
-\c Function stayInLicense
-\c MessageBox MB_YESNO "Do you want to stay in the license page?" IDNO no
-\c Abort
-\c no:
-\c FunctionEnd
-\c
-\c Function customPage
-\c GetTempFileName $R0
-\c File /oname=$R0 customPage.ini
-\c InstallOptions::dialog $R0
-\c Pop $R1
-\c StrCmp $R1 "cancel" done
-\c StrCmp $R1 "back" done
-\c StrCmp $R1 "success" done
-\c error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1"
-\c done:
-\c FunctionEnd
-
-\S{page} Page
-
-\c custom [creator_function] [leave_function] [caption] [/ENABLECANCEL]
-\c OR
-\c internal_page_type [pre_function] [show_function] [leave_function] [/ENABLECANCEL]
-
-Adds an installer page. See the above sections for more information about built-in versus custom pages and about callback functions.
-
-\e{internal_page_type} can be:
-
-\b \e{license} - license page
-
-\b \e{components} - components selection page
-
-\b \e{directory} - installation directory selection page
-
-\b \e{instfiles} - installation page where the sections are executed
-
-\b \e{uninstConfirm} - uninstall confirmation page
-
-The last page of the installer has its cancel button disabled to prevent confusion. To enable it anyway, use \e{/ENABLECANCEL}.
-
-\S{uninstpage} UninstPage
-
-\c custom [creator_function] [leave_function] [caption] [/ENABLECANCEL]
-\c OR
-\c internal_page_type [pre_function] [show_function] [leave_function] [/ENABLECANCEL]
-
-Adds an uninstaller page. See the above sections for more information about built-in versus custom pages and about callback functions.
-
-See \R{page}{Page} for possible values of \e{internal_page_type}.
-
-\S{pageex} PageEx
-
-\c [un.](custom|uninstConfirm|license|components|directory|instfiles)
-
-Adds an installer page or an uninstaller page if the un. prefix was used. Every PageEx must have a matching \R{pageexend}{PageExEnd}. In a PageEx block you can set options that are specific to this page and will not be used for other pages. Options that are not set will revert to what was set outside the PageEx block or the default if nothing was set. To set the sub-caption for a page use \R{acaption}{Caption} or \R{asubcaption}{SubCaption} to set the default. To set the callback functions for a page set with PageEx use \R{pagecallbacks}{PageCallbacks}. See the above sections for more information about built-in versus custom pages.
-
-Example usage:
-
-\c PageEx license
-\c LicenseText "Readme"
-\c LicenseData readme.rtf
-\c PageExEnd
-\c
-\c PageEx license
-\c LicenseData license.txt
-\c LicenseForceSelection checkbox
-\c PageExEnd
-
-\S{pageexend} PageExEnd
-
-Ends a \R{pageex}{PageEx} block.
-
-\S{pagecallbacks} PageCallbacks
-
-\c ([creator_function] [leave_function]) | ([pre_function] [show_function] [leave_function])
-
-Sets the callback functions for a page defined using \R{pageex}{PageEx}. Can only be used inside a \R{pageex}{PageEx} block. See the above sections for more information about callback functions.
-
-\c PageEx license
-\c PageCallbacks licensePre licenseShow licenseLeave
-\c PageExEnd
+\H{pages} Pages
+
+Each (non-silent) NSIS installer has a set of pages. Each page can be a NSIS built-in page or a custom page created by a user's function (with \L{../Docs/InstallOptions/Readme.html}{InstallOptions} for example).
+
+Using the script you can control the pages' order, appearance, and behavior. You can skip pages, paint them white, force the user to stay in a certain page until a certain condition is met, show a readme page, show custom designed pages for input and more. In this section, you will learn how to control all of the above.
+
+There are two basic commands regarding pages, \R{page}{Page} and \R{uninstpage}{UninstPage}. The first adds a page to the installer, the second adds a page to the uninstaller. On top of those two there is the \R{pageex}{PageEx} command which allows you to add a page to either one and with greater amount of options. \R{pageex}{PageEx} allows you to set options to the specific page you are adding instead of using the default that's set outside of \R{pageex}{PageEx}.
+
+\S{pageoreder} Ordering
+
+The page order is set simply by the order \R{page}{Page}, \R{uninstpage}{UninstPage} and \R{pageex}{PageEx} appear in the script. For example:
+
+\c Page license
+\c Page components
+\c Page directory
+\c Page instfiles
+\c UninstPage uninstConfirm
+\c UninstPage instfiles
+
+This code will tell NSIS to first show the license page, then the components selection page, then the directory selection page and finally the install log where sections are executed, just like in old installers. The uninstaller will first show the uninstall confirmation page and then the uninstallation log.
+
+You can specify the same page type more than once.
+
+For backwards compatibility with old NSIS scripts, the following installer pages will be added if no installer page commands are used: license (if \R{alicensetext}{LicenseText} and \R{alicensedata}{LicenseData} were specified), components (if \R{acomponenttext}{ComponentText} was specified and there is more than one visible section), directory (if \R{adirtext}{DirText} was specified) and instfiles. When there are no uninstaller page commands, the following uninstaller pages will be added: uninstall confirmation page (if \R{auninstalltext}{UninstallText} was specified) and instfiles. This method is deprecated, converting scripts to use page commands is highly recommended because you can use the new standard language strings.
+
+\S{pageoptions} Page Options
+
+Each page has its unique set of data that defines how it will look and act. This section describes what data each type of page uses and how you can set it. \R{pagecallbacks_explain}{Callback functions} are described below and are not dealt with in this section.
+
+The list below lists what commands affect the certain page type. Unless mentioned otherwise, these commands can be used both in and out of a \R{pageex}{PageEx} block. If used inside a \R{pageex}{PageEx} block they will only affect the current page being set by \R{pageex}{PageEx}, else they will set the default for every other page.
+
+\e{License page}
+
+\b \R{alicensetext}{LicenseText}
+
+\b \R{alicensedata}{LicenseData}
+
+\b \R{alicenseforceselection}{LicenseForceSelection}
+
+\e{Components selection page}
+
+\b \R{acomponenttext}{ComponentText}
+
+\e{Directory selection page}
+
+\b \R{adirtext}{DirText}
+
+\b \R{adirvar}{DirVar} - can only be used in \R{pageex}{PageEx}
+
+\b \R{adirverify}{DirVerify}
+
+\e{Un/Installation log page}
+
+\b \R{adetailsbuttontext}{DetailsButtonText}
+
+\b \R{acompletedtext}{CompletedText}
+
+\e{Uninstall confirmation page}
+
+\b \R{adirvar}{DirVar} - can only be used in \R{pageex}{PageEx}
+
+\b \R{auninstalltext}{UninstallText}
+
+To set the page caption use \R{acaption}{Caption}.
+
+\S{pagecallbacks_explain} Callbacks
+
+Each built-in page has three callback functions: the pre-function, the show-creation function and the leave-function. The pre-function is called right before the page is created, the show-function is called right after it is created and before it is shown and the leave-function is called right after the user has pressed the next button and before the page is left.
+
+\b The pre-function allows you to skip the page using \R{abort}{Abort}.
+
+\b The show-function allows you to tweak the page's user interface with \R{createfont}{CreateFont}, \R{setctlcolors}{SetCtlColors}, \R{sendmessage}{SendMessage} and others.
+
+\b The leave-function allows you to force the user to stay on the current page using \R{abort}{Abort}.
+
+A custom page only has two callback functions, one that creates it which is mandatory, and one leave-function that acts just like the leave-function for built-in pages.
+
+Examples:
+
+\c Page license skipLicense "" stayInLicense
+\c Page custom customPage "" ": custom page"
+\c Page instfiles
+\c
+\c Function skipLicense
+\c MessageBox MB_YESNO "Do you want to skip the license page?" IDNO no
+\c Abort
+\c no:
+\c FunctionEnd
+\c
+\c Function stayInLicense
+\c MessageBox MB_YESNO "Do you want to stay in the license page?" IDNO no
+\c Abort
+\c no:
+\c FunctionEnd
+\c
+\c Function customPage
+\c GetTempFileName $R0
+\c File /oname=$R0 customPage.ini
+\c InstallOptions::dialog $R0
+\c Pop $R1
+\c StrCmp $R1 "cancel" done
+\c StrCmp $R1 "back" done
+\c StrCmp $R1 "success" done
+\c error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1"
+\c done:
+\c FunctionEnd
+
+\S{page} Page
+
+\c custom [creator_function] [leave_function] [caption] [/ENABLECANCEL]
+\c OR
+\c internal_page_type [pre_function] [show_function] [leave_function] [/ENABLECANCEL]
+
+Adds an installer page. See the above sections for more information about built-in versus custom pages and about callback functions.
+
+\e{internal_page_type} can be:
+
+\b \e{license} - license page
+
+\b \e{components} - components selection page
+
+\b \e{directory} - installation directory selection page
+
+\b \e{instfiles} - installation page where the sections are executed
+
+\b \e{uninstConfirm} - uninstall confirmation page
+
+The last page of the installer has its cancel button disabled to prevent confusion. To enable it anyway, use \e{/ENABLECANCEL}.
+
+\S{uninstpage} UninstPage
+
+\c custom [creator_function] [leave_function] [caption] [/ENABLECANCEL]
+\c OR
+\c internal_page_type [pre_function] [show_function] [leave_function] [/ENABLECANCEL]
+
+Adds an uninstaller page. See the above sections for more information about built-in versus custom pages and about callback functions.
+
+See \R{page}{Page} for possible values of \e{internal_page_type}.
+
+\S{pageex} PageEx
+
+\c [un.](custom|uninstConfirm|license|components|directory|instfiles)
+
+Adds an installer page or an uninstaller page if the un. prefix was used. Every PageEx must have a matching \R{pageexend}{PageExEnd}. In a PageEx block you can set options that are specific to this page and will not be used for other pages. Options that are not set will revert to what was set outside the PageEx block or the default if nothing was set. To set the sub-caption for a page use \R{acaption}{Caption} or \R{asubcaption}{SubCaption} to set the default. To set the callback functions for a page set with PageEx use \R{pagecallbacks}{PageCallbacks}. See the above sections for more information about built-in versus custom pages.
+
+Example usage:
+
+\c PageEx license
+\c LicenseText "Readme"
+\c LicenseData readme.rtf
+\c PageExEnd
+\c
+\c PageEx license
+\c LicenseData license.txt
+\c LicenseForceSelection checkbox
+\c PageExEnd
+
+\S{pageexend} PageExEnd
+
+Ends a \R{pageex}{PageEx} block.
+
+\S{pagecallbacks} PageCallbacks
+
+\c ([creator_function] [leave_function]) | ([pre_function] [show_function] [leave_function])
+
+Sets the callback functions for a page defined using \R{pageex}{PageEx}. Can only be used inside a \R{pageex}{PageEx} block. See the above sections for more information about callback functions.
+
+\c PageEx license
+\c PageCallbacks licensePre licenseShow licenseLeave
+\c PageExEnd
diff --git a/Docs/src/plugin.but b/Docs/src/plugin.but
index 80c7e48..aba3654 100755
--- a/Docs/src/plugin.but
+++ b/Docs/src/plugin.but
@@ -1,27 +1,27 @@
-\S0{plugindlls} Plug-in DLLs
-
-The abilities of the NSIS scripting language can be extended by utilising functionality provided in a DLL file. Probably the best known example of this is the InstallOptions.dll bundled with every NSIS release.
-
-When the NSIS compiler starts it scans the plug-ins directory for DLLs and makes a list of the plug-ins found and their exported functions. During compilation if a sequence such as fred::flintstone is encountered where the compiler expected to find a language keyword the compiler will look through this list. If a list entry specifies that fred.dll exports function flintstone NSIS will pack the fred.dll file into the created installer binary.
-
-During execution of a plug-in command NSIS will unpack the necessary DLL to a temporary folder ($PLUGINSDIR), push all of the arguments specified (right-to-left order), and then execute the DLL function. If the /NOUNLOAD option is specified the DLL will not be unloaded until the installer exits or the next time you use the DLL without /NOUNLOAD. Please note that the last call to the plug-in must not have the /NOUNLOAD flag or the plug-in will not be deleted from $PLUGINSDIR, thus garbage will be left on the user's machine.
-
-\S1{usingplug} Using Plug-in Commands
-
-A plug-in call looks like this:
-
-\c InstallOptions::dialog "ini_file_location.ini"
-
-All parameters are pushed onto the stack (in this case, the plug-in function only needs one parameter). Some plug-in commands may not need any parameters on the stack, others might require more of them. To use a plug-in command you will need to read the documentation for the plug-in so that you know what parameters its functions require.
-
-\S1{disablingplug} Disabling Plug-in Unloading
-
-If you don't want to unload the DLL after calling a function, use /NOUNLOAD as the first parameter. For example:
-
-\c dll::function /NOUNLOAD "param"
-
-You can also use \R{setpluginunload}{SetPluginUnload} alwaysoff to avoid writing /NOUNLOAD each and every time you use the same plug-in.
-
-\S1{calldiskplug} Calling plug-ins manually
-
-If you want to call a plug-in that is stored on user's hard drive or somewhere else, use \R{callinstdll}{CallInstDLL}. Almost all plug-ins provide installer functionality, so using plug-in commands is way easier. Using \R{callinstdll}{CallInstDLL} can be useful when you have created plug-ins that should be linked to a certain version of your application and are being copied to the installation folder.
+\S0{plugindlls} Plug-in DLLs
+
+The abilities of the NSIS scripting language can be extended by utilising functionality provided in a DLL file. Probably the best known example of this is the InstallOptions.dll bundled with every NSIS release.
+
+When the NSIS compiler starts it scans the plug-ins directory for DLLs and makes a list of the plug-ins found and their exported functions. During compilation if a sequence such as fred::flintstone is encountered where the compiler expected to find a language keyword the compiler will look through this list. If a list entry specifies that fred.dll exports function flintstone NSIS will pack the fred.dll file into the created installer binary.
+
+During execution of a plug-in command NSIS will unpack the necessary DLL to a temporary folder ($PLUGINSDIR), push all of the arguments specified (right-to-left order), and then execute the DLL function. If the /NOUNLOAD option is specified the DLL will not be unloaded until the installer exits or the next time you use the DLL without /NOUNLOAD. Please note that the last call to the plug-in must not have the /NOUNLOAD flag or the plug-in will not be deleted from $PLUGINSDIR, thus garbage will be left on the user's machine.
+
+\S1{usingplug} Using Plug-in Commands
+
+A plug-in call looks like this:
+
+\c InstallOptions::dialog "ini_file_location.ini"
+
+All parameters are pushed onto the stack (in this case, the plug-in function only needs one parameter). Some plug-in commands may not need any parameters on the stack, others might require more of them. To use a plug-in command you will need to read the documentation for the plug-in so that you know what parameters its functions require.
+
+\S1{disablingplug} Disabling Plug-in Unloading
+
+If you don't want to unload the DLL after calling a function, use /NOUNLOAD as the first parameter. For example:
+
+\c dll::function /NOUNLOAD "param"
+
+You can also use \R{setpluginunload}{SetPluginUnload} alwaysoff to avoid writing /NOUNLOAD each and every time you use the same plug-in.
+
+\S1{calldiskplug} Calling plug-ins manually
+
+If you want to call a plug-in that is stored on user's hard drive or somewhere else, use \R{callinstdll}{CallInstDLL}. Almost all plug-ins provide installer functionality, so using plug-in commands is way easier. Using \R{callinstdll}{CallInstDLL} can be useful when you have created plug-ins that should be linked to a certain version of your application and are being copied to the installation folder.
diff --git a/Docs/src/reboot.but b/Docs/src/reboot.but
index 2388ff5..9cc33f9 100755
--- a/Docs/src/reboot.but
+++ b/Docs/src/reboot.but
@@ -1,18 +1,18 @@
-\S{rebootinst} Reboot Instructions
-
-\S2{reboot} Reboot
-
-Reboots the computer. Be careful with this one. If it fails, \R{onrebootfailed}{.onRebootFailed} is called. In any case, this instruction never returns, just like \R{quit}{Quit}.
-
-\c MessageBox MB_YESNO|MB_ICONQUESTION "Do you wish to reboot the system?" IDNO +2
-\c Reboot
-
-\S2{setrebootflag} SetRebootFlag
-
-\c true|false
-
-Sets the reboot flag to either true or false. The flag's value can be read using \R{ifrebootflag}{IfRebootFlag}.
-
-\c SetRebootFlag true
-\c IfRebootFlag 0 +2
-\c MessageBox MB_OK "this message box will always show"
+\S{rebootinst} Reboot Instructions
+
+\S2{reboot} Reboot
+
+Reboots the computer. Be careful with this one. If it fails, \R{onrebootfailed}{.onRebootFailed} is called. In any case, this instruction never returns, just like \R{quit}{Quit}.
+
+\c MessageBox MB_YESNO|MB_ICONQUESTION "Do you wish to reboot the system?" IDNO +2
+\c Reboot
+
+\S2{setrebootflag} SetRebootFlag
+
+\c true|false
+
+Sets the reboot flag to either true or false. The flag's value can be read using \R{ifrebootflag}{IfRebootFlag}.
+
+\c SetRebootFlag true
+\c IfRebootFlag 0 +2
+\c MessageBox MB_OK "this message box will always show"
diff --git a/Docs/src/registry.but b/Docs/src/registry.but
index 5f1b614..d1a3fcf 100755
--- a/Docs/src/registry.but
+++ b/Docs/src/registry.but
@@ -1,187 +1,187 @@
-\S1{registry} Registry, INI, File Instructions
-
-In all of the below registry instructions use an empty string (just two quotes with nothing between them - "") as the key name to specify the default key which is shown as (Default) in regedit.exe.
-
-If a full path is not specified for any of the INI handling instructions, the Windows directory will be used.
-
-\S2{deleteinisec} DeleteINISec
-
-\c ini_filename section_name
-
-Deletes the entire section [section_name] from ini_filename. If the section could not be removed from the ini file, the error flag is set. It does not set the error flag if the section could not be found.
-
-\c WriteINIStr $TEMP\something.ini section1 something 123
-\c WriteINIStr $TEMP\something.ini section1 somethingelse 1234
-\c WriteINIStr $TEMP\something.ini section2 nsis true
-\c DeleteINISec $TEMP\something.ini section1
-
-\S2{deleteinistr} DeleteINIStr
-
-\c ini_filename section_name str_name
-
-Deletes the string str_name from section [section_name] from ini_filename. If the string could not be removed from the ini file, the error flag is set. It does not set the error flag if the string could not be found.
-
-\c WriteINIStr $TEMP\something.ini section1 something 123
-\c WriteINIStr $TEMP\something.ini section1 somethingelse 1234
-\c DeleteINIStr $TEMP\something.ini section1 somethingelse
-
-\S2{deleteregkey} DeleteRegKey
-
-\c [/ifempty] root_key subkey
-
-Deletes a registry key. If /ifempty is specified, the registry key will only be deleted if it has no subkeys (otherwise, the whole registry tree will be removed). Valid values for root_key are listed under \R{writeregstr}{WriteRegStr}. The error flag is set if the key could not be removed from the registry (or if it didn't exist to begin with).
-
-\c DeleteRegKey HKLM "Software\My Company\My Software"
-\c DeleteRegKey /ifempty HKLM "Software\A key that might have subkeys"
-
-\S2{deleteregvalue} DeleteRegValue
-
-\c root_key subkey key_name
-
-Deletes a registry value. Valid values for root_key are listed under WriteRegStr. The error flag is set if the value could not be removed from the registry (or if it didn't exist to begin with).
-
-\c DeleteRegValue HKLM "Software\My Company\My Software" "some value"
-
-\S2{enumregkey} EnumRegKey
-
-\c user_var(output) root_key subkey index
-
-Set user variable $x with the name of the 'index'th registry key in root_key\\Subkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string if there are no more keys, and returns an empty string and sets the error flag if there is an error.
-
-\c StrCpy $0 0
-\c loop:
-\c EnumRegKey $1 HKLM Software $0
-\c StrCmp $1 "" done
-\c IntOp $0 $0 + 1
-\c MessageBox MB_YESNO|MB_ICONQUESTION "$1$\n$\nMore?" IDYES loop
-\c done:
-
-\S2{enumregvalue} EnumRegValue
-
-\c user_var(output) root_key subkey index
-
-Set user variable $x with the name of the 'index'th registry value in root_key\\Subkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string and sets the error flag if there are no more values or if there is an error.
-
-\c StrCpy $0 0
-\c loop:
-\c ClearErrors
-\c EnumRegValue $1 HKLM Software\Microsoft\Windows\CurrentVersion $0
-\c IfErrors done
-\c IntOp $0 $0 + 1
-\c ReadRegStr $2 HKLM Software\Microsoft\Windows\CurrentVersion $1
-\c MessageBox MB_YESNO|MB_ICONQUESTION "$1 = $2$\n$\nMore?" IDYES loop
-\c done:
-
-\S2{expandenvstrings} ExpandEnvStrings
-
-\c user_var(output) string
-
-Expands environment variables in \e{string} into the user variable \e{$x}. If an environment variable doesn't exist, it will not be replaced. For example, if you use "%var%" and var doesn't exists, the result will be "%var". If there is an error, the variable is set to empty, and the error flag is set.
-
-\c ExpandEnvStrings $0 "WINDIR=%WINDIR%$\nTEMP=%TEMP%"
-
-\S2{flushini} FlushINI
-
-\c ini_filename
-
-Flushes the INI file's buffers. Windows 9x keeps all changes to the INI file in memory. This command causes the changes to be written to the disk immediately. Use it if you edit the INI manually, delete it, move it or copy it right after you change it with \R{writeinistr}{WriteINIStr}, \R{deleteinisec}{DeleteINISec} or \R{deleteinistr}{DeleteINStr}.
-
-\c WriteINIStr $TEMP\something.ini test test test
-\c FlushINI $TEMP\something.ini
-\c Delete $TEMP\something.ini
-
-\S2{readenvstr} ReadEnvStr
-
-\c user_var(output) name
-
-Reads from the environment string "name" and sets the value into the user variable $x. If there is an error reading the string, the user variable is set to empty, and the error flag is set.
-
-\c ReadEnvStr $0 WINDIR
-\c ReadEnvStr $1 TEMP
-
-\S2{readinistr} ReadINIStr
-
-\c user_var(output) ini_filename section_name entry_name
-
-Reads from entry_name in [section_name] of ini_filename and stores the value into user variable $x. The error flag will be set and $x will be assigned to an empty string if the entry is not found.
-
-\c ReadINIStr $0 $INSTDIR\winamp.ini winamp outname
-
-\S2{readregdword} ReadRegDWORD
-
-\c user_var(output) root_key sub_key name
-
-Reads a 32 bit DWORD from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("" which is 0) if the DWORD is not present. If the value is present, but is not a DWORD, it will be read as a string and the error flag will be set.
-
-\c ReadRegDWORD $0 HKLM Software\NSIS VersionBuild
-
-\S2{readregstr} ReadRegStr
-
-\c user_var(output) root_key sub_key name
-
-Reads from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("") if the string is not present. If the value is present, but is of type REG_DWORD, it will be read and converted to a string and the error flag will be set.
-
-\c ReadRegStr $0 HKLM Software\NSIS ""
-\c DetailPrint "NSIS is installed at: $0"
-
-\S2{writeinistr} WriteINIStr
-
-\c ini_filename section_name entry_name value
-
-Writes entry_name=value into [section_name] of ini_filename. The error flag is set if the string could not be written to the ini file.
-
-\c WriteINIStr $TEMP\something.ini section1 something 123
-\c WriteINIStr $TEMP\something.ini section1 somethingelse 1234
-\c WriteINIStr $TEMP\something.ini section2 nsis true
-
-\S2{writeregbin} WriteRegBin
-
-\c root_key subkey key_name valuedata
-
-This command writes a block of binary data to the registry. Valid values for root_key are listed under WriteRegStr. Valuedata is in hexadecimal (e.g. DEADBEEF01223211151). The error flag is set if the binary data could not be written to the registry. If the registry key doesn't exist it will be created.
-
-\c WriteRegBin HKLM "Software\My Company\My Software" "Binary Value" DEADBEEF01223211151
-
-\S2{writeregdword} WriteRegDWORD
-
-\c root_key subkey key_name value
-
-This command writes a dword (32 bit integer) to the registry (a user variable can be specified). Valid values for root_key are listed under WriteRegStr. The error flag is set if the dword could not be written to the registry. If the registry key doesn't exist it will be created.
-
-\c WriteRegDWORD HKLM "Software\My Company\My Software" "DWORD Value" 0xDEADBEEF
-
-\S2{writeregstr} WriteRegStr
-
-\c root_key subkey key_name value
-
-Write a string to the registry. See \R{writeregexpandstr}{WriteRegExpandStr} for more details.
-
-\c WriteRegStr HKLM "Software\My Company\My Software" "String Value" "dead beef"
-
-\S2{writeregexpandstr} WriteRegExpandStr
-
-\c root_key subkey key_name value
-
-Write a string to the registry. \e{root_key} must be one of:
-
-\b \e{HKCR} or \e{HKEY_CLASSES_ROOT}
-
-\b \e{HKLM} or \e{HKEY_LOCAL_MACHINE}
-
-\b \e{HKCU} or \e{HKEY_CURRENT_USER}
-
-\b \e{HKU} or \e{HKEY_USERS}
-
-\b \e{HKCC} or \e{HKEY_CURRENT_CONFIG}
-
-\b \e{HKDD} or \e{HKEY_DYN_DATA}
-
-\b \e{HKPD} or \e{HKEY_PERFORMANCE_DATA}
-
-\b \e{SHCTX} or \e{SHELL_CONTEXT}
-
-If \e{root_key} is \e{SHCTX} or \e{SHELL_CONTEXT}, it will be replaced with \e{HKLM} if \R{setshellvarcontext}{SetShellVarContext} is set to \e{all} and with \e{HKCU} if \R{setshellvarcontext}{SetShellVarContext} is set to \e{current}.
-
-The error flag is set if the string could not be written to the registry. The type of the string will be REG_SZ for WriteRegStr, or REG_EXPAND_STR for WriteRegExpandStr. If the registry key doesn't exist it will be created.
-
-\c WriteRegExpandStr HKLM "Software\My Company\My Software" "Expand String Value" "%WINDIR%\notepad.exe"
+\S1{registry} Registry, INI, File Instructions
+
+In all of the below registry instructions use an empty string (just two quotes with nothing between them - "") as the key name to specify the default key which is shown as (Default) in regedit.exe.
+
+If a full path is not specified for any of the INI handling instructions, the Windows directory will be used.
+
+\S2{deleteinisec} DeleteINISec
+
+\c ini_filename section_name
+
+Deletes the entire section [section_name] from ini_filename. If the section could not be removed from the ini file, the error flag is set. It does not set the error flag if the section could not be found.
+
+\c WriteINIStr $TEMP\something.ini section1 something 123
+\c WriteINIStr $TEMP\something.ini section1 somethingelse 1234
+\c WriteINIStr $TEMP\something.ini section2 nsis true
+\c DeleteINISec $TEMP\something.ini section1
+
+\S2{deleteinistr} DeleteINIStr
+
+\c ini_filename section_name str_name
+
+Deletes the string str_name from section [section_name] from ini_filename. If the string could not be removed from the ini file, the error flag is set. It does not set the error flag if the string could not be found.
+
+\c WriteINIStr $TEMP\something.ini section1 something 123
+\c WriteINIStr $TEMP\something.ini section1 somethingelse 1234
+\c DeleteINIStr $TEMP\something.ini section1 somethingelse
+
+\S2{deleteregkey} DeleteRegKey
+
+\c [/ifempty] root_key subkey
+
+Deletes a registry key. If /ifempty is specified, the registry key will only be deleted if it has no subkeys (otherwise, the whole registry tree will be removed). Valid values for root_key are listed under \R{writeregstr}{WriteRegStr}. The error flag is set if the key could not be removed from the registry (or if it didn't exist to begin with).
+
+\c DeleteRegKey HKLM "Software\My Company\My Software"
+\c DeleteRegKey /ifempty HKLM "Software\A key that might have subkeys"
+
+\S2{deleteregvalue} DeleteRegValue
+
+\c root_key subkey key_name
+
+Deletes a registry value. Valid values for root_key are listed under WriteRegStr. The error flag is set if the value could not be removed from the registry (or if it didn't exist to begin with).
+
+\c DeleteRegValue HKLM "Software\My Company\My Software" "some value"
+
+\S2{enumregkey} EnumRegKey
+
+\c user_var(output) root_key subkey index
+
+Set user variable $x with the name of the 'index'th registry key in root_key\\Subkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string if there are no more keys, and returns an empty string and sets the error flag if there is an error.
+
+\c StrCpy $0 0
+\c loop:
+\c EnumRegKey $1 HKLM Software $0
+\c StrCmp $1 "" done
+\c IntOp $0 $0 + 1
+\c MessageBox MB_YESNO|MB_ICONQUESTION "$1$\n$\nMore?" IDYES loop
+\c done:
+
+\S2{enumregvalue} EnumRegValue
+
+\c user_var(output) root_key subkey index
+
+Set user variable $x with the name of the 'index'th registry value in root_key\\Subkey. Valid values for root_key are listed under WriteRegStr. Returns an empty string and sets the error flag if there are no more values or if there is an error.
+
+\c StrCpy $0 0
+\c loop:
+\c ClearErrors
+\c EnumRegValue $1 HKLM Software\Microsoft\Windows\CurrentVersion $0
+\c IfErrors done
+\c IntOp $0 $0 + 1
+\c ReadRegStr $2 HKLM Software\Microsoft\Windows\CurrentVersion $1
+\c MessageBox MB_YESNO|MB_ICONQUESTION "$1 = $2$\n$\nMore?" IDYES loop
+\c done:
+
+\S2{expandenvstrings} ExpandEnvStrings
+
+\c user_var(output) string
+
+Expands environment variables in \e{string} into the user variable \e{$x}. If an environment variable doesn't exist, it will not be replaced. For example, if you use "%var%" and var doesn't exists, the result will be "%var". If there is an error, the variable is set to empty, and the error flag is set.
+
+\c ExpandEnvStrings $0 "WINDIR=%WINDIR%$\nTEMP=%TEMP%"
+
+\S2{flushini} FlushINI
+
+\c ini_filename
+
+Flushes the INI file's buffers. Windows 9x keeps all changes to the INI file in memory. This command causes the changes to be written to the disk immediately. Use it if you edit the INI manually, delete it, move it or copy it right after you change it with \R{writeinistr}{WriteINIStr}, \R{deleteinisec}{DeleteINISec} or \R{deleteinistr}{DeleteINStr}.
+
+\c WriteINIStr $TEMP\something.ini test test test
+\c FlushINI $TEMP\something.ini
+\c Delete $TEMP\something.ini
+
+\S2{readenvstr} ReadEnvStr
+
+\c user_var(output) name
+
+Reads from the environment string "name" and sets the value into the user variable $x. If there is an error reading the string, the user variable is set to empty, and the error flag is set.
+
+\c ReadEnvStr $0 WINDIR
+\c ReadEnvStr $1 TEMP
+
+\S2{readinistr} ReadINIStr
+
+\c user_var(output) ini_filename section_name entry_name
+
+Reads from entry_name in [section_name] of ini_filename and stores the value into user variable $x. The error flag will be set and $x will be assigned to an empty string if the entry is not found.
+
+\c ReadINIStr $0 $INSTDIR\winamp.ini winamp outname
+
+\S2{readregdword} ReadRegDWORD
+
+\c user_var(output) root_key sub_key name
+
+Reads a 32 bit DWORD from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("" which is 0) if the DWORD is not present. If the value is present, but is not a DWORD, it will be read as a string and the error flag will be set.
+
+\c ReadRegDWORD $0 HKLM Software\NSIS VersionBuild
+
+\S2{readregstr} ReadRegStr
+
+\c user_var(output) root_key sub_key name
+
+Reads from the registry into the user variable $x. Valid values for root_key are listed under WriteRegStr. The error flag will be set and $x will be set to an empty string ("") if the string is not present. If the value is present, but is of type REG_DWORD, it will be read and converted to a string and the error flag will be set.
+
+\c ReadRegStr $0 HKLM Software\NSIS ""
+\c DetailPrint "NSIS is installed at: $0"
+
+\S2{writeinistr} WriteINIStr
+
+\c ini_filename section_name entry_name value
+
+Writes entry_name=value into [section_name] of ini_filename. The error flag is set if the string could not be written to the ini file.
+
+\c WriteINIStr $TEMP\something.ini section1 something 123
+\c WriteINIStr $TEMP\something.ini section1 somethingelse 1234
+\c WriteINIStr $TEMP\something.ini section2 nsis true
+
+\S2{writeregbin} WriteRegBin
+
+\c root_key subkey key_name valuedata
+
+This command writes a block of binary data to the registry. Valid values for root_key are listed under WriteRegStr. Valuedata is in hexadecimal (e.g. DEADBEEF01223211151). The error flag is set if the binary data could not be written to the registry. If the registry key doesn't exist it will be created.
+
+\c WriteRegBin HKLM "Software\My Company\My Software" "Binary Value" DEADBEEF01223211151
+
+\S2{writeregdword} WriteRegDWORD
+
+\c root_key subkey key_name value
+
+This command writes a dword (32 bit integer) to the registry (a user variable can be specified). Valid values for root_key are listed under WriteRegStr. The error flag is set if the dword could not be written to the registry. If the registry key doesn't exist it will be created.
+
+\c WriteRegDWORD HKLM "Software\My Company\My Software" "DWORD Value" 0xDEADBEEF
+
+\S2{writeregstr} WriteRegStr
+
+\c root_key subkey key_name value
+
+Write a string to the registry. See \R{writeregexpandstr}{WriteRegExpandStr} for more details.
+
+\c WriteRegStr HKLM "Software\My Company\My Software" "String Value" "dead beef"
+
+\S2{writeregexpandstr} WriteRegExpandStr
+
+\c root_key subkey key_name value
+
+Write a string to the registry. \e{root_key} must be one of:
+
+\b \e{HKCR} or \e{HKEY_CLASSES_ROOT}
+
+\b \e{HKLM} or \e{HKEY_LOCAL_MACHINE}
+
+\b \e{HKCU} or \e{HKEY_CURRENT_USER}
+
+\b \e{HKU} or \e{HKEY_USERS}
+
+\b \e{HKCC} or \e{HKEY_CURRENT_CONFIG}
+
+\b \e{HKDD} or \e{HKEY_DYN_DATA}
+
+\b \e{HKPD} or \e{HKEY_PERFORMANCE_DATA}
+
+\b \e{SHCTX} or \e{SHELL_CONTEXT}
+
+If \e{root_key} is \e{SHCTX} or \e{SHELL_CONTEXT}, it will be replaced with \e{HKLM} if \R{setshellvarcontext}{SetShellVarContext} is set to \e{all} and with \e{HKCU} if \R{setshellvarcontext}{SetShellVarContext} is set to \e{current}.
+
+The error flag is set if the string could not be written to the registry. The type of the string will be REG_SZ for WriteRegStr, or REG_EXPAND_STR for WriteRegExpandStr. If the registry key doesn't exist it will be created.
+
+\c WriteRegExpandStr HKLM "Software\My Company\My Software" "Expand String Value" "%WINDIR%\notepad.exe"
diff --git a/Docs/src/script.but b/Docs/src/script.but
index 108608c..bcf80ee 100755
--- a/Docs/src/script.but
+++ b/Docs/src/script.but
@@ -1,97 +1,97 @@
-\C{scriptref} Scripting Reference
-
-\H{fileformat} Script File Format
-
-A NSIS Script File (.nsi) is just a text file with script code.
-
-\\<b\\>Commands\\</b\\>
-
-Commands lines are in the format 'command [parameters]'
-
-\c File "myfile"
-
-\\<b\\>Comments\\</b\\>
-
-Lines beginning with ; or # are comments. You can put comments after commands. You can also use C-style comments to comment one or more lines.
-
-\c ; Comment
-\c # Comment
-\c
-\c # Comment \
-\c Another comment line (see `Long commands` section below)
-\c
-\c /*
-\c Comment
-\c Comment
-\c */
-\c
-\c Name /* comment */ mysetup
-\c
-\c File "myfile" ; Comment
-
-If you want a parameter to start with ; or # put it in quotes.
-
-\\<b\\>Plug-ins\\</b\\>
-
-To call a plug-in, use 'plugin::command [parameters]'. For more info see \R{plugindlls}{Plug-in DLLs}.
-
-\c nsExec::Exec "myfile"
-
-\\<b\\>Numbers\\</b\\>
-
-For parameters that are treated as numbers, use decimal (the number) or hexadecimal (with 0x prepended to it, i.e. 0x12345AB), or octal (numbers beginning with a 0 and no x).
-
-Colors should be set in hexadecimal RGB format, like HTML but without the #.
-
-\c IntCmp 1 0x1 lbl_equal
-\c
-\c SetCtlColors $HWND CCCCCC
-
-\\<b\\>Strings\\</b\\>
-
-To represent strings that have spaces, use quotes:
-
-\c MessageBox MB_OK "Hi there!"
-
-Quotes only have the property of containing a parameter if they begin the parameter. They can be either single quotes, double quotes, or the backward single quote.
-
-You can escape quotes using $\\:
-
-\c MessageBox MB_OK "I'll be happy" ; this one puts a ' inside a string
-\c MessageBox MB_OK 'And he said to me "Hi there!"' ; this one puts a " inside a string
-\c MessageBox MB_OK `And he said to me "I'll be happy!"` ; this one puts both ' and "s inside a string
-\c MessageBox MB_OK "$\"A quote from a wise man$\" said the wise man" ; this one shows escaping of quotes
-
-It is also possible to put newlines, tabs etc. in a string using $\\r, $\\n, $\\t etc. \R{varstrings}{More information...}
-
-\\<b\\>Variables\\</b\\>
-
-Variables start with $. User variables should be declared.
-
-\c Var MYVAR
-\c
-\c StrCpy $MYVAR "myvalue"
-
-\R{variables}{More information...}
-
-\\<b\\>Long commands\\</b\\>
-
-To extend a command over multiple lines, use a backslash (\\) at the end of the line. The next line will effectively be concatenated to the end of it. For example:
-
-\c CreateShortCut "$SMPROGRAMS\NSIS\ZIP2EXE project workspace.lnk" \
-\c "$INSTDIR\source\zip2exe\zip2exe.dsw"
-\c
-\c MessageBox MB_YESNO|MB_ICONQUESTION \
-\c "Do you want to remove all files in the folder? \
-\c (If you have anything you created that you want \
-\c to keep, click No)" \
-\c IDNO NoRemoveLabel
-
-Line extension for long commands works for comments as well. It can be a bit confusing, so it should be avoided.
-
-\c # A comment \
-\c still a comment here...
-
-\\<b\\>Configuration file\\</b\\>
-
-If a file named "nsisconf.nsh" in the config directory exists, it will be included by default before any scripts (unless the /NOCONFIG command line parameter is used). The config directory on Windows is the same directory as makensis.exe is in. On other platforms this is set at install time and defaults to $PREFIX/etc/. You can alter this at runtime, see \k{usageenvironment} for more information.
+\C{scriptref} Scripting Reference
+
+\H{fileformat} Script File Format
+
+A NSIS Script File (.nsi) is just a text file with script code.
+
+\\<b\\>Commands\\</b\\>
+
+Commands lines are in the format 'command [parameters]'
+
+\c File "myfile"
+
+\\<b\\>Comments\\</b\\>
+
+Lines beginning with ; or # are comments. You can put comments after commands. You can also use C-style comments to comment one or more lines.
+
+\c ; Comment
+\c # Comment
+\c
+\c # Comment \
+\c Another comment line (see `Long commands` section below)
+\c
+\c /*
+\c Comment
+\c Comment
+\c */
+\c
+\c Name /* comment */ mysetup
+\c
+\c File "myfile" ; Comment
+
+If you want a parameter to start with ; or # put it in quotes.
+
+\\<b\\>Plug-ins\\</b\\>
+
+To call a plug-in, use 'plugin::command [parameters]'. For more info see \R{plugindlls}{Plug-in DLLs}.
+
+\c nsExec::Exec "myfile"
+
+\\<b\\>Numbers\\</b\\>
+
+For parameters that are treated as numbers, use decimal (the number) or hexadecimal (with 0x prepended to it, i.e. 0x12345AB), or octal (numbers beginning with a 0 and no x).
+
+Colors should be set in hexadecimal RGB format, like HTML but without the #.
+
+\c IntCmp 1 0x1 lbl_equal
+\c
+\c SetCtlColors $HWND CCCCCC
+
+\\<b\\>Strings\\</b\\>
+
+To represent strings that have spaces, use quotes:
+
+\c MessageBox MB_OK "Hi there!"
+
+Quotes only have the property of containing a parameter if they begin the parameter. They can be either single quotes, double quotes, or the backward single quote.
+
+You can escape quotes using $\\:
+
+\c MessageBox MB_OK "I'll be happy" ; this one puts a ' inside a string
+\c MessageBox MB_OK 'And he said to me "Hi there!"' ; this one puts a " inside a string
+\c MessageBox MB_OK `And he said to me "I'll be happy!"` ; this one puts both ' and "s inside a string
+\c MessageBox MB_OK "$\"A quote from a wise man$\" said the wise man" ; this one shows escaping of quotes
+
+It is also possible to put newlines, tabs etc. in a string using $\\r, $\\n, $\\t etc. \R{varstrings}{More information...}
+
+\\<b\\>Variables\\</b\\>
+
+Variables start with $. User variables should be declared.
+
+\c Var MYVAR
+\c
+\c StrCpy $MYVAR "myvalue"
+
+\R{variables}{More information...}
+
+\\<b\\>Long commands\\</b\\>
+
+To extend a command over multiple lines, use a backslash (\\) at the end of the line. The next line will effectively be concatenated to the end of it. For example:
+
+\c CreateShortCut "$SMPROGRAMS\NSIS\ZIP2EXE project workspace.lnk" \
+\c "$INSTDIR\source\zip2exe\zip2exe.dsw"
+\c
+\c MessageBox MB_YESNO|MB_ICONQUESTION \
+\c "Do you want to remove all files in the folder? \
+\c (If you have anything you created that you want \
+\c to keep, click No)" \
+\c IDNO NoRemoveLabel
+
+Line extension for long commands works for comments as well. It can be a bit confusing, so it should be avoided.
+
+\c # A comment \
+\c still a comment here...
+
+\\<b\\>Configuration file\\</b\\>
+
+If a file named "nsisconf.nsh" in the config directory exists, it will be included by default before any scripts (unless the /NOCONFIG command line parameter is used). The config directory on Windows is the same directory as makensis.exe is in. On other platforms this is set at install time and defaults to $PREFIX/etc/. You can alter this at runtime, see \k{usageenvironment} for more information.
diff --git a/Docs/src/sec.but b/Docs/src/sec.but
index e44071e..8947571 100755
--- a/Docs/src/sec.but
+++ b/Docs/src/sec.but
@@ -1,184 +1,184 @@
-\S1{secmanage} Section Management
-
-\S2{sectionsetflags} SectionSetFlags
-
-\c section_index section_flags
-
-Sets the section's flags. The flag is a 32 bit integer. The first bit (lowest) represents whether the section is currently selected, the second bit represents whether the section is a section group (don't modify this unless you really know what you are doing), the third bit represents whether the section is a section group end (again, don't modify), the fourth bit represents whether the section is shown in bold or not, the fifth bit represents whether the section is read-only, the sixth bit represents whether the section group is to be automatically expanded, the seventh bit is set for section groups which are partially selected, the eighth bit is internally used for partially selected section group toggling and the ninth bit is used for reflecting section name changes. The error flag will be set if an out of range section is specified.
-
-Each flag has a name, prefixed with `SF_`:
-
-\c !define SF_SELECTED 1
-\c !define SF_SECGRP 2
-\c !define SF_SECGRPEND 4
-\c !define SF_BOLD 8
-\c !define SF_RO 16
-\c !define SF_EXPAND 32
-\c !define SF_PSELECTED 64
-
-For an example of usage please see the \L{../Examples/one-section.nsi}{one-section.nsi} example.
-
-For more useful macros and definitions, see Include\\Sections.nsh.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # set section 'test' as selected and read-only
-\c IntOp $0 ${SF_SELECTED} | ${SF_RO}
-\c SectionSetFlags ${test_section_id} $0
-\c FunctionEnd
-
-\S2{sectiongetflags} SectionGetFlags
-
-\c section_index user_var(output)
-
-Retrieves the section's flags. See above for a description of the flag. The error flag will be set if an out of range section is specified.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onSelChange
-\c # keep section 'test' selected
-\c SectionGetFlags ${test_section_id} $0
-\c IntOp $0 $0 | ${SF_SELECTED}
-\c SectionSetFlags ${test_section_id} $0
-\c FunctionEnd
-
-\S2{sectionsettext} SectionSetText
-
-\c section_index section_text
-
-Sets the description for the section section_index. If the text is set to "" then the section will be hidden. The error flag will be set if an out of range section is specified.
-
-\c Section "" test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # change section's name to $WINDIR
-\c SectionSetText ${test_section_id} $WINDIR
-\c FunctionEnd
-
-\S2{sectiongettext} SectionGetText
-
-\c section_index user_var(output)
-
-Stores the text description of the section section_index into the output. If the section is hidden, stores an empty string. The error flag will be set if an out of range section is specified.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # append $WINDIR to section's name
-\c SectionGetText ${test_section_id} $0
-\c StrCpy $0 "$0 - $WINDIR"
-\c SectionSetText ${test_section_id} $0
-\c FunctionEnd
-
-\S2{sectionsetinsttypes} SectionSetInstTypes
-
-\c section_index inst_types
-
-Sets the install types the section specified by section_index defaults to the enabled state in. Note that the section index starts with zero. Every bit of inst_types is a flag that tells if the section is in that install type or not. For example, if you have 3 install types and you want the first section to be included in install types 1 and 3, then the command should look like this:
-
-\c SectionSetInstTypes 0 5
-
-because the binary value for 5 is "00000101". The error flag will be set if the section index specified is out of range.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # associate section 'test' with installation types 3 and 4
-\c SectionSetInstTypes ${test_section_id} 12
-\c FunctionEnd
-
-\S2{sectiongetinsttypes} SectionGetInstTypes
-
-\c section_index user_var(output)
-
-Retrieves the install types flags array of a section. See above explanation about SectionSetInstTypes for a description of how to deal with the output. The error flag will be set if the section index specified is out of range.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # associate section 'test' with installation types 5, on top of its existing associations
-\c SectionGetInstTypes ${test_section_id} $0
-\c IntOp $0 $0 | 16
-\c SectionSetInstTypes ${test_section_id} $0
-\c FunctionEnd
-
-\S2{ssectionsetsize} SectionSetSize
-
-\c section_index new_size
-
-Sets the Size of the section specified by section_index. Note that the Index starts with Zero. The Value for Size must be entered in KiloByte and supports only whole numbers.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # set required size of section 'test' to 100 bytes
-\c SectionSetSize ${test_section_id} 100
-\c FunctionEnd
-
-\S2{ssectiongetsize} SectionGetSize
-
-\c section_index user_var
-
-Gets the Size of the section specified by section_index and stores the value in the given User Variable. Note that the Index starts with Zero.
-
-\c Section test test_section_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c # increase required size of section 'test' by 100 bytes
-\c SectionGetSize ${test_section_id} $0
-\c IntOp $0 $0 + 100
-\c SectionSetSize ${test_section_id} $0
-\c FunctionEnd
-
-\S2{ssetcurinsttype} SetCurInstType
-
-\c inst_type_idx
-
-Sets the current InstType. inst_type_idx should be between 0 and 31. The Error Flag is \\<b\\>not\\</b\\> set if an out of range InstType was used.
-
-\S2{sgetcurinsttype} GetCurInstType
-
-\c user_var
-
-Get the current InstType and stores it in user_var. If the first install type is selected, 0 will be put in user_var. If the second install type is selected, 1 will be put in user_var, and so on. The value of $\{NSIS_MAX_INST_TYPES\} (32 by default) means that the custom install type was selected.
-
-\S2{sinsttypesettext} InstTypeSetText
-
-\c inst_type_idx text
-
-Sets the Text of the specified InstType. If the Text is empty than the InstType is removed. By using a previously unused inst_type_idx number you can create new InstTypes. To add/remove Sections to this new InstType see \R{sectionsetinsttypes}{SectionSetInstTypes}. Unlike \R{ssectionin}{SectionIn} the index is zero based, which means the first install type's index is 0.
-
-\c InstType a
-\c InstType b
-\c
-\c Function .onInit
-\c # set first installation type's name to $WINDIR
-\c InstTypeSetText 0 $WINDIR
-\c # set second installation type's name to $TEMP
-\c InstTypeSetText 1 $TEMP
-\c FunctionEnd
-
-\S2{sinsttypegettext} InstTypeGetText
-
-\c inst_type_idx user_var
-
-Gets the Text of the specified InstType.
-
-\c InstType a
-\c InstType b
-\c
-\c Function .onInit
-\c InstTypeGetText 0 $0
-\c DetailPrint $0 # prints 'a'
-\c InstTypeGetText 1 $0
-\c DetailPrint $0 # prints 'b'
-\c FunctionEnd
+\S1{secmanage} Section Management
+
+\S2{sectionsetflags} SectionSetFlags
+
+\c section_index section_flags
+
+Sets the section's flags. The flag is a 32 bit integer. The first bit (lowest) represents whether the section is currently selected, the second bit represents whether the section is a section group (don't modify this unless you really know what you are doing), the third bit represents whether the section is a section group end (again, don't modify), the fourth bit represents whether the section is shown in bold or not, the fifth bit represents whether the section is read-only, the sixth bit represents whether the section group is to be automatically expanded, the seventh bit is set for section groups which are partially selected, the eighth bit is internally used for partially selected section group toggling and the ninth bit is used for reflecting section name changes. The error flag will be set if an out of range section is specified.
+
+Each flag has a name, prefixed with `SF_`:
+
+\c !define SF_SELECTED 1
+\c !define SF_SECGRP 2
+\c !define SF_SECGRPEND 4
+\c !define SF_BOLD 8
+\c !define SF_RO 16
+\c !define SF_EXPAND 32
+\c !define SF_PSELECTED 64
+
+For an example of usage please see the \L{../Examples/one-section.nsi}{one-section.nsi} example.
+
+For more useful macros and definitions, see Include\\Sections.nsh.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # set section 'test' as selected and read-only
+\c IntOp $0 ${SF_SELECTED} | ${SF_RO}
+\c SectionSetFlags ${test_section_id} $0
+\c FunctionEnd
+
+\S2{sectiongetflags} SectionGetFlags
+
+\c section_index user_var(output)
+
+Retrieves the section's flags. See above for a description of the flag. The error flag will be set if an out of range section is specified.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onSelChange
+\c # keep section 'test' selected
+\c SectionGetFlags ${test_section_id} $0
+\c IntOp $0 $0 | ${SF_SELECTED}
+\c SectionSetFlags ${test_section_id} $0
+\c FunctionEnd
+
+\S2{sectionsettext} SectionSetText
+
+\c section_index section_text
+
+Sets the description for the section section_index. If the text is set to "" then the section will be hidden. The error flag will be set if an out of range section is specified.
+
+\c Section "" test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # change section's name to $WINDIR
+\c SectionSetText ${test_section_id} $WINDIR
+\c FunctionEnd
+
+\S2{sectiongettext} SectionGetText
+
+\c section_index user_var(output)
+
+Stores the text description of the section section_index into the output. If the section is hidden, stores an empty string. The error flag will be set if an out of range section is specified.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # append $WINDIR to section's name
+\c SectionGetText ${test_section_id} $0
+\c StrCpy $0 "$0 - $WINDIR"
+\c SectionSetText ${test_section_id} $0
+\c FunctionEnd
+
+\S2{sectionsetinsttypes} SectionSetInstTypes
+
+\c section_index inst_types
+
+Sets the install types the section specified by section_index defaults to the enabled state in. Note that the section index starts with zero. Every bit of inst_types is a flag that tells if the section is in that install type or not. For example, if you have 3 install types and you want the first section to be included in install types 1 and 3, then the command should look like this:
+
+\c SectionSetInstTypes 0 5
+
+because the binary value for 5 is "00000101". The error flag will be set if the section index specified is out of range.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # associate section 'test' with installation types 3 and 4
+\c SectionSetInstTypes ${test_section_id} 12
+\c FunctionEnd
+
+\S2{sectiongetinsttypes} SectionGetInstTypes
+
+\c section_index user_var(output)
+
+Retrieves the install types flags array of a section. See above explanation about SectionSetInstTypes for a description of how to deal with the output. The error flag will be set if the section index specified is out of range.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # associate section 'test' with installation types 5, on top of its existing associations
+\c SectionGetInstTypes ${test_section_id} $0
+\c IntOp $0 $0 | 16
+\c SectionSetInstTypes ${test_section_id} $0
+\c FunctionEnd
+
+\S2{ssectionsetsize} SectionSetSize
+
+\c section_index new_size
+
+Sets the Size of the section specified by section_index. Note that the Index starts with Zero. The Value for Size must be entered in KiloByte and supports only whole numbers.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # set required size of section 'test' to 100 bytes
+\c SectionSetSize ${test_section_id} 100
+\c FunctionEnd
+
+\S2{ssectiongetsize} SectionGetSize
+
+\c section_index user_var
+
+Gets the Size of the section specified by section_index and stores the value in the given User Variable. Note that the Index starts with Zero.
+
+\c Section test test_section_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c # increase required size of section 'test' by 100 bytes
+\c SectionGetSize ${test_section_id} $0
+\c IntOp $0 $0 + 100
+\c SectionSetSize ${test_section_id} $0
+\c FunctionEnd
+
+\S2{ssetcurinsttype} SetCurInstType
+
+\c inst_type_idx
+
+Sets the current InstType. inst_type_idx should be between 0 and 31. The Error Flag is \\<b\\>not\\</b\\> set if an out of range InstType was used.
+
+\S2{sgetcurinsttype} GetCurInstType
+
+\c user_var
+
+Get the current InstType and stores it in user_var. If the first install type is selected, 0 will be put in user_var. If the second install type is selected, 1 will be put in user_var, and so on. The value of $\{NSIS_MAX_INST_TYPES\} (32 by default) means that the custom install type was selected.
+
+\S2{sinsttypesettext} InstTypeSetText
+
+\c inst_type_idx text
+
+Sets the Text of the specified InstType. If the Text is empty than the InstType is removed. By using a previously unused inst_type_idx number you can create new InstTypes. To add/remove Sections to this new InstType see \R{sectionsetinsttypes}{SectionSetInstTypes}. Unlike \R{ssectionin}{SectionIn} the index is zero based, which means the first install type's index is 0.
+
+\c InstType a
+\c InstType b
+\c
+\c Function .onInit
+\c # set first installation type's name to $WINDIR
+\c InstTypeSetText 0 $WINDIR
+\c # set second installation type's name to $TEMP
+\c InstTypeSetText 1 $TEMP
+\c FunctionEnd
+
+\S2{sinsttypegettext} InstTypeGetText
+
+\c inst_type_idx user_var
+
+Gets the Text of the specified InstType.
+
+\c InstType a
+\c InstType b
+\c
+\c Function .onInit
+\c InstTypeGetText 0 $0
+\c DetailPrint $0 # prints 'a'
+\c InstTypeGetText 1 $0
+\c DetailPrint $0 # prints 'b'
+\c FunctionEnd
diff --git a/Docs/src/sections.but b/Docs/src/sections.but
index 5fd32f1..eb525ac 100755
--- a/Docs/src/sections.but
+++ b/Docs/src/sections.but
@@ -1,106 +1,106 @@
-\H{sections} Sections
-
-Each NSIS installer contains one or more sections. Each of these sections are created, modified, and ended with the following commands.
-
-\b Each section contains zero or more instructions.
-
-\b Sections are executed in order by the resulting installer, and if ComponentText is set, the user will have the option of disabling/enabling each visible section.
-
-\b If a section's name is 'Uninstall' or is prefixed with 'un.', it's an uninstaller section.
-
-\S1{ssectioncommands} Section Commands
-
-\S2{saddsize} AddSize
-
-\c size_kb
-
-Tells the installer that the current section needs an additional "size_kb" kilobytes of disk space. Only valid within a section (will have no effect outside of a section or in a function).
-
-\c Section
-\c AddSize 500
-\c SectionEnd
-
-\S2{ssection} Section
-
-\c [/o] [([!]|[-])section_name] [section_index_output]
-
-Begins and opens a new section. If section_name is empty, omitted, or begins with a -, then it is a hidden section and the user will not have the option of disabling it. If the section name is 'Uninstall' or is prefixed with 'un.', then it is a an uninstaller section. If \e{section_index_output} is specified, the parameter will be \R{define}{!defined} with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the section name begins with a !, the section will be displayed as bold. If the /o switch is specified, the section will be unselected by default.
-
-\c Section "-hidden section"
-\c SectionEnd
-\c
-\c Section # hidden section
-\c SectionEnd
-\c
-\c Section "!bold section"
-\c SectionEnd
-\c
-\c Section /o "optional"
-\c SectionEnd
-\c
-\c Section "install something" SEC_IDX
-\c SectionEnd
-
-To access the section index, curly brackets must be used and the code must be located below the section in the script.
-
-\c Section test1 sec1_id
-\c SectionEnd
-\c
-\c Section test2 sec2_id
-\c SectionEnd
-\c
-\c Function .onInit
-\c SectionGetText ${sec2_id} $0
-\c MessageBox MB_OK "name of ${sec2_id}:$\n$0" # will correctly display 'name of 1: test2'
-\c FunctionEnd
-
-\c Function .onInit
-\c SectionGetText ${sec2_id} $0
-\c MessageBox MB_OK "name of ${sec2_id}:$\n$0" # will incorrectly display 'name of ${sec2_id}: test1'
-\c # plus a warning stating:
-\c # unknown variable/constant "{sec2_id}" detected, ignoring
-\c FunctionEnd
-\c
-\c Section test1 sec1_id
-\c SectionEnd
-\c
-\c Section test2 sec2_id
-\c SectionEnd
-
-\S2{ssectionend} SectionEnd
-
-This command closes the current open section.
-
-\S2{ssectionin} SectionIn
-
-\c insttype_index [insttype_index] [RO]
-
-This command specifies which install types (see \R{ainsttype}{InstType}) the current section defaults to the enabled state in. Multiple SectionIn commands can be specified (they are combined). If you specify RO as a parameter, then the section will be read-only, meaning the user won't be able to change its state. The first install type defined using \R{ainsttype}{InstType} is indexed 1, the next 2 and so on.
-
-\c InstType "full"
-\c InstType "minimal"
-\c
-\c Section "a section"
-\c SectionIn 1 2
-\c SectionEnd
-\c
-\c Section "another section"
-\c SectionIn 1
-\c SectionEnd
-
-\S2{ssectiongroup} SectionGroup
-
-\c [/e] section_group_name [index_output]
-
-This command inserts a section group. The section group must be closed with \R{ssectiongroupend}{SectionGroupEnd}, and should contain 1 or more sections. If the section group name begins with a !, its name will be displayed with a bold font. If /e is present, the section group will be expanded by default. If \e{index_output} is specified, the parameter will be !defined with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the name is prefixed with 'un.' the section group is an uninstaller section group.
-
-\c SectionGroup "some stuff"
-\c Section "a section"
-\c SectionEnd
-\c Section "another section"
-\c SectionEnd
-\c SectionGroupEnd
-
-\S2{ssectiongroupend} SectionGroupEnd
-
-Closes a section group opened with \R{ssectiongroup}{SectionGroup}.
+\H{sections} Sections
+
+Each NSIS installer contains one or more sections. Each of these sections are created, modified, and ended with the following commands.
+
+\b Each section contains zero or more instructions.
+
+\b Sections are executed in order by the resulting installer, and if ComponentText is set, the user will have the option of disabling/enabling each visible section.
+
+\b If a section's name is 'Uninstall' or is prefixed with 'un.', it's an uninstaller section.
+
+\S1{ssectioncommands} Section Commands
+
+\S2{saddsize} AddSize
+
+\c size_kb
+
+Tells the installer that the current section needs an additional "size_kb" kilobytes of disk space. Only valid within a section (will have no effect outside of a section or in a function).
+
+\c Section
+\c AddSize 500
+\c SectionEnd
+
+\S2{ssection} Section
+
+\c [/o] [([!]|[-])section_name] [section_index_output]
+
+Begins and opens a new section. If section_name is empty, omitted, or begins with a -, then it is a hidden section and the user will not have the option of disabling it. If the section name is 'Uninstall' or is prefixed with 'un.', then it is a an uninstaller section. If \e{section_index_output} is specified, the parameter will be \R{define}{!defined} with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the section name begins with a !, the section will be displayed as bold. If the /o switch is specified, the section will be unselected by default.
+
+\c Section "-hidden section"
+\c SectionEnd
+\c
+\c Section # hidden section
+\c SectionEnd
+\c
+\c Section "!bold section"
+\c SectionEnd
+\c
+\c Section /o "optional"
+\c SectionEnd
+\c
+\c Section "install something" SEC_IDX
+\c SectionEnd
+
+To access the section index, curly brackets must be used and the code must be located below the section in the script.
+
+\c Section test1 sec1_id
+\c SectionEnd
+\c
+\c Section test2 sec2_id
+\c SectionEnd
+\c
+\c Function .onInit
+\c SectionGetText ${sec2_id} $0
+\c MessageBox MB_OK "name of ${sec2_id}:$\n$0" # will correctly display 'name of 1: test2'
+\c FunctionEnd
+
+\c Function .onInit
+\c SectionGetText ${sec2_id} $0
+\c MessageBox MB_OK "name of ${sec2_id}:$\n$0" # will incorrectly display 'name of ${sec2_id}: test1'
+\c # plus a warning stating:
+\c # unknown variable/constant "{sec2_id}" detected, ignoring
+\c FunctionEnd
+\c
+\c Section test1 sec1_id
+\c SectionEnd
+\c
+\c Section test2 sec2_id
+\c SectionEnd
+
+\S2{ssectionend} SectionEnd
+
+This command closes the current open section.
+
+\S2{ssectionin} SectionIn
+
+\c insttype_index [insttype_index] [RO]
+
+This command specifies which install types (see \R{ainsttype}{InstType}) the current section defaults to the enabled state in. Multiple SectionIn commands can be specified (they are combined). If you specify RO as a parameter, then the section will be read-only, meaning the user won't be able to change its state. The first install type defined using \R{ainsttype}{InstType} is indexed 1, the next 2 and so on.
+
+\c InstType "full"
+\c InstType "minimal"
+\c
+\c Section "a section"
+\c SectionIn 1 2
+\c SectionEnd
+\c
+\c Section "another section"
+\c SectionIn 1
+\c SectionEnd
+
+\S2{ssectiongroup} SectionGroup
+
+\c [/e] section_group_name [index_output]
+
+This command inserts a section group. The section group must be closed with \R{ssectiongroupend}{SectionGroupEnd}, and should contain 1 or more sections. If the section group name begins with a !, its name will be displayed with a bold font. If /e is present, the section group will be expanded by default. If \e{index_output} is specified, the parameter will be !defined with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the name is prefixed with 'un.' the section group is an uninstaller section group.
+
+\c SectionGroup "some stuff"
+\c Section "a section"
+\c SectionEnd
+\c Section "another section"
+\c SectionEnd
+\c SectionGroupEnd
+
+\S2{ssectiongroupend} SectionGroupEnd
+
+Closes a section group opened with \R{ssectiongroup}{SectionGroup}.
diff --git a/Docs/src/silent.but b/Docs/src/silent.but
index 785e4a6..b25f23f 100755
--- a/Docs/src/silent.but
+++ b/Docs/src/silent.but
@@ -1,67 +1,67 @@
-\S0{silent} Silent Installers/Uninstallers
-
-Silent installers are installers which require no user intervention and have no user interface. The user doesn't see any dialog and isn't asked any questions. This is useful for network administrators who wish to install or uninstall something without user intervention so they can perform the operation quickly over any number of computers. It is also useful for other developers who wish to embed another installer in their own and collect all of the required information on their installer instead of showing two installers.
-
-NSIS installers and uninstallers can be both silent and not silent. When an installer or an uninstaller is silent, not all callback functions are called. \R{onguiinit}{.onGUIInit}, \R{onguiend}{.onGUIEnd}, their uninstaller equivalents and any callback related to a specific page or page type will not be called.
-
-There are several methods to make an installer or an uninstaller silent:
-
-\n \R{asilentinstall}{SilentInstall} and \R{asilentuninstall}{SilentUninstall}
-
-\n \R{setsilent}{SetSilent}
-
-\n Passing /S on the command line (case sensitive)
-
-To check if the installer/uninstaller is silent use \R{ifsilent}{IfSilent}.
-
-To make sure your installer will be silent when it needs to, you should check with \R{ifsilent}{IfSilent} before each command that might require user intervention or create a window. The \R{messagebox}{MessageBox} command, which is the most common culprit in silent installers, has the /SD switch to set a default answer for silent installers. If you want your installer/uninstaller to be able to be completely silent you should use this switch. All internal NSIS message boxes have defaults for silent installers. The \L{../Examples/silent.nsi}{silent.nsi example} demonstrates all aspects of this topic.
-
-Since the directory page can not be shown on silent installers, the user has an option to specify the installation directory on the command line (this also works on non-silent installers/uninstallers). To do that, the user uses the /D switch as in the following example:
-
-\c foo.exe /S /D=C:\Program Files\Foo
-
-If your installer/uninstaller requires some more information that can not be gathered when silent, you can allow the user to specify that information on the command line and process it in .onInit. You can use \R{getoptions}{GetOptions}, or a variant of the following example:
-
-\c Function .onInit
-\c Call GetParameters
-\c Pop $2
-\c # search for quoted /USERNAME
-\c StrCpy $1 '"'
-\c Push $2
-\c Push '"/USERNAME='
-\c Call StrStr
-\c Pop $0
-\c StrCpy $0 $0 "" 1 # skip quote
-\c StrCmp $0 "" "" next
-\c # search for non quoted /USERNAME
-\c StrCpy $1 ' '
-\c Push $2
-\c Push '/USERNAME='
-\c Call StrStr
-\c Pop $0
-\c next:
-\c StrCmp $0 "" done
-\c # copy the value after /USERNAME=
-\c StrCpy $0 $0 "" 10
-\c # search for the next parameter
-\c Push $0
-\c Push $1
-\c Call StrStr
-\c Pop $1
-\c StrCmp $1 "" done
-\c StrLen $1 $1
-\c StrCpy $0 $0 -$1
-\c done:
-\c FunctionEnd
-
-The above example will copy the value the user passes on after /USERNAME= into $0. This allows the user to specify the required information on the command line instead of using the interactive user interface. The user can use:
-
-\c foo.exe /S /USERNAME=Bar /D=C:\Program Files\Foo
-
-or:
-
-\c foo.exe /S "/USERNAME=string with spaces" /D=C:\Program Files\Foo
-
-\R{getparameters}{GetParameters} and \R{strstr}{StrStr} can be found in \k{usefulfunctions}.
-
+\S0{silent} Silent Installers/Uninstallers
+
+Silent installers are installers which require no user intervention and have no user interface. The user doesn't see any dialog and isn't asked any questions. This is useful for network administrators who wish to install or uninstall something without user intervention so they can perform the operation quickly over any number of computers. It is also useful for other developers who wish to embed another installer in their own and collect all of the required information on their installer instead of showing two installers.
+
+NSIS installers and uninstallers can be both silent and not silent. When an installer or an uninstaller is silent, not all callback functions are called. \R{onguiinit}{.onGUIInit}, \R{onguiend}{.onGUIEnd}, their uninstaller equivalents and any callback related to a specific page or page type will not be called.
+
+There are several methods to make an installer or an uninstaller silent:
+
+\n \R{asilentinstall}{SilentInstall} and \R{asilentuninstall}{SilentUninstall}
+
+\n \R{setsilent}{SetSilent}
+
+\n Passing /S on the command line (case sensitive)
+
+To check if the installer/uninstaller is silent use \R{ifsilent}{IfSilent}.
+
+To make sure your installer will be silent when it needs to, you should check with \R{ifsilent}{IfSilent} before each command that might require user intervention or create a window. The \R{messagebox}{MessageBox} command, which is the most common culprit in silent installers, has the /SD switch to set a default answer for silent installers. If you want your installer/uninstaller to be able to be completely silent you should use this switch. All internal NSIS message boxes have defaults for silent installers. The \L{../Examples/silent.nsi}{silent.nsi example} demonstrates all aspects of this topic.
+
+Since the directory page can not be shown on silent installers, the user has an option to specify the installation directory on the command line (this also works on non-silent installers/uninstallers). To do that, the user uses the /D switch as in the following example:
+
+\c foo.exe /S /D=C:\Program Files\Foo
+
+If your installer/uninstaller requires some more information that can not be gathered when silent, you can allow the user to specify that information on the command line and process it in .onInit. You can use \R{getoptions}{GetOptions}, or a variant of the following example:
+
+\c Function .onInit
+\c Call GetParameters
+\c Pop $2
+\c # search for quoted /USERNAME
+\c StrCpy $1 '"'
+\c Push $2
+\c Push '"/USERNAME='
+\c Call StrStr
+\c Pop $0
+\c StrCpy $0 $0 "" 1 # skip quote
+\c StrCmp $0 "" "" next
+\c # search for non quoted /USERNAME
+\c StrCpy $1 ' '
+\c Push $2
+\c Push '/USERNAME='
+\c Call StrStr
+\c Pop $0
+\c next:
+\c StrCmp $0 "" done
+\c # copy the value after /USERNAME=
+\c StrCpy $0 $0 "" 10
+\c # search for the next parameter
+\c Push $0
+\c Push $1
+\c Call StrStr
+\c Pop $1
+\c StrCmp $1 "" done
+\c StrLen $1 $1
+\c StrCpy $0 $0 -$1
+\c done:
+\c FunctionEnd
+
+The above example will copy the value the user passes on after /USERNAME= into $0. This allows the user to specify the required information on the command line instead of using the interactive user interface. The user can use:
+
+\c foo.exe /S /USERNAME=Bar /D=C:\Program Files\Foo
+
+or:
+
+\c foo.exe /S "/USERNAME=string with spaces" /D=C:\Program Files\Foo
+
+\R{getparameters}{GetParameters} and \R{strstr}{StrStr} can be found in \k{usefulfunctions}.
+
If your installer/uninstaller requires a lot of information and you want it to be able to be silent, you should allow the user to pass on a path to an answers file. This would be much more comfortable than writing all of the information on the command line. \ No newline at end of file
diff --git a/Docs/src/stack.but b/Docs/src/stack.but
index 4d612df..9bb7e02 100755
--- a/Docs/src/stack.but
+++ b/Docs/src/stack.but
@@ -1,40 +1,40 @@
-\S1{stackinst} Stack Support
-
-\S2{Exch} Exch
-
-\c [user_var | stack_index]
-
-When no parameter is specified, exchanges the top two elements of the stack. When a parameter is specified and is a user variable, exchanges the top element of the stack with the parameter. When a parameter is specified and is a positive integer, Exch will swap the item on the top of the stack with the item that is specified by the offset from the top of the stack in the parameter. If there are not enough items on the stack to accomplish the exchange, a fatal error will occur (to help you debug your code :).
-
-\c Push 1
-\c Push 2
-\c Exch
-\c Pop $0 # = 1
-
-\c Push 1
-\c Push 2
-\c Push 3
-\c Exch 2
-\c Pop $0 # = 1
-
-\c StrCpy $0 1
-\c Push 2
-\c Exch $0 # = 2
-\c Pop $1 # = 1
-
-\S2{Pop} Pop
-
-\c user_var(out)
-
-Pops a string off of the stack into user variable $x. If the stack is empty, the error flag will be set.
-
-\c Push 1
-\c Pop $0 # = 1
-
-\S2{Push} Push
-
-\c string
-
-Pushes a string onto the stack. The string can then be Popped off of the stack.
-
-\c Push "a string"
+\S1{stackinst} Stack Support
+
+\S2{Exch} Exch
+
+\c [user_var | stack_index]
+
+When no parameter is specified, exchanges the top two elements of the stack. When a parameter is specified and is a user variable, exchanges the top element of the stack with the parameter. When a parameter is specified and is a positive integer, Exch will swap the item on the top of the stack with the item that is specified by the offset from the top of the stack in the parameter. If there are not enough items on the stack to accomplish the exchange, a fatal error will occur (to help you debug your code :).
+
+\c Push 1
+\c Push 2
+\c Exch
+\c Pop $0 # = 1
+
+\c Push 1
+\c Push 2
+\c Push 3
+\c Exch 2
+\c Pop $0 # = 1
+
+\c StrCpy $0 1
+\c Push 2
+\c Exch $0 # = 2
+\c Pop $1 # = 1
+
+\S2{Pop} Pop
+
+\c user_var(out)
+
+Pops a string off of the stack into user variable $x. If the stack is empty, the error flag will be set.
+
+\c Push 1
+\c Pop $0 # = 1
+
+\S2{Push} Push
+
+\c string
+
+Pushes a string onto the stack. The string can then be Popped off of the stack.
+
+\c Push "a string"
diff --git a/Docs/src/string.but b/Docs/src/string.but
index b87125b..52a194d 100755
--- a/Docs/src/string.but
+++ b/Docs/src/string.but
@@ -1,22 +1,22 @@
-\S1{stringinst} String Manipulation Instructions
-
-\S2{StrCpy} StrCpy
-
-\c user_var(destination) str [maxlen] [start_offset]
-
-Sets the user variable $x with str. Note that str can contain other variables, or the user variable being set (concatenating strings this way is possible, etc). If maxlen is specified, the string will be a maximum of maxlen characters (if maxlen is negative, the string will be truncated abs(maxlen) characters from the end). If start_offset is specified, the source is offset by it (if start_offset is negative, it will start abs(start_offset) from the end of the string).
-
-\c StrCpy $0 "a string" # = "a string"
-\c StrCpy $0 "a string" 3 # = "a s"
-\c StrCpy $0 "a string" -1 # = "a strin"
-\c StrCpy $0 "a string" "" 2 # = "string"
-\c StrCpy $0 "a string" "" -3 # = "ing"
-\c StrCpy $0 "a string" 3 -4 # = "rin"
-
-\S2{StrLen} StrLen
-
-\c user_var(length output) str
-
-Sets user variable $x with the length of str.
-
-\c StrLen $0 "123456" # = 6
+\S1{stringinst} String Manipulation Instructions
+
+\S2{StrCpy} StrCpy
+
+\c user_var(destination) str [maxlen] [start_offset]
+
+Sets the user variable $x with str. Note that str can contain other variables, or the user variable being set (concatenating strings this way is possible, etc). If maxlen is specified, the string will be a maximum of maxlen characters (if maxlen is negative, the string will be truncated abs(maxlen) characters from the end). If start_offset is specified, the source is offset by it (if start_offset is negative, it will start abs(start_offset) from the end of the string).
+
+\c StrCpy $0 "a string" # = "a string"
+\c StrCpy $0 "a string" 3 # = "a s"
+\c StrCpy $0 "a string" -1 # = "a strin"
+\c StrCpy $0 "a string" "" 2 # = "string"
+\c StrCpy $0 "a string" "" -3 # = "ing"
+\c StrCpy $0 "a string" 3 -4 # = "rin"
+
+\S2{StrLen} StrLen
+
+\c user_var(length output) str
+
+Sets user variable $x with the length of str.
+
+\c StrLen $0 "123456" # = 6
diff --git a/Docs/src/tutorial.but b/Docs/src/tutorial.but
index f79f2f8..3b7130a 100755
--- a/Docs/src/tutorial.but
+++ b/Docs/src/tutorial.but
@@ -1,281 +1,281 @@
-\C{tutorial} Tutorial: The Basics
-
-\H{tutintro} Introduction
-
-Most software packages you download or buy come with an installer. The installer copies and/or updates files, writes registry keys, writes configuration, creates shortcuts, etc. All of this is done automatically for the user. All the user needs to do is supply some information and the installer will do the rest. The user goes through a wizard, makes the appropriate choices and waits until the installer finishes. After the installer has finished the user is left only with the simple task of starting the program. The user doesn't have to worry about things he might have forgotten because all of the necessary steps were done by the installer.
-
-NSIS is a tool for developers to create such installers. NSIS allows you to create everything from basic installers that just copy files to very complex installers that handle a lot of advanced tasks such as writing registry keys, settings environment variables, downloading the latest files from the internet, customizing the configuration file and more. NSIS is very flexible and its scripting language is easy to learn.
-
-NSIS compiles all of the files and the installation script into one executable file, so your application will be easy to distribute. NSIS adds only about 34KB of code of its own (for the default configuration) to the data. NSIS boasts the smallest overhead available while still providing a lot of options thanks to its powerful scripting language and support of external plug-ins.
-
-\H{tutscriptfiles} Script Files
-
-To create a NSIS installer, you first have to write a NSIS script. A NSIS script is just a regular text file with a special syntax. You can edit scripts with every text editor. It's recommended you use a text editor that shows line numbers because NSIS uses line numbers to indicate where errors lie, and to warn you about where errors might lie. An editor that supports syntax highlighting is also recommended. You can download editors made especially for NSIS and files for syntax highlighting at the \W{http://nsis.sf.net/wiki/}{NSIS Wiki}.
-
-In a NSIS script every line is treated as a command. If your command is too long for one line you can use a back-slash - '\\' - at the end of the line. The compiler will treat the new line as an addition to the previous line and will not expect a new command. For example:
-
-\c Messagebox MB_OK|MB_ICONINFORMATION \
-\c "This is a sample that shows how to use line breaks for larger commands in NSIS scripts"
-
-If you want to use a double-quote in a string you can either use $\\\\" to escape the quote or quote the string with a different type of quote such as ` or '.
-
-For more details about the script format, see \R{fileformat}{Script File Format}.
-
-The default extension for a script file is .nsi. Header files have the .nsh extension. Header files can help you arrange your script by dividing it to more than one block of code, you can also put functions or macros in header files and include the header files in multiple installers. This makes updating easier and it also makes your scripts easier to read. To include a header file in your script use \R{include}{!include}. Header files that reside in the Include directory under your NSIS directory can be included just by their name. For example:
-
-\c !include Sections.nsh
-
-\H{tutstructure} Scripting structure
-
-A NSIS script can contain Installer Attributes and Sections/Functions. You can also use Compiler Commands for compile-time operations. Required is the \R{aoutfile}{OutFile} instruction, which tells NSIS where to write the installer, and one section.
-
-\S1{installerattributes} Installer Attributes
-
-Installer Attributes determine the behavior and the look and feel of your installer. With these attributes you can change texts that will be shown during the installation, the number of installation types etc. Most of these commands can only be set and are not changeable during runtime.
-
-Other basic instructions are \R{aname}{Name} and \R{ainstalldir}{InstallDir}.
-
-For more information about installer attributes, have a look at \R{instattribs}{Installer Attributes}.
-
-\S1{tut-pages} Pages
-
-A non-silent installer has a set of wizard pages to let the user configure the installer. You can set which pages to display using the \R{page}{Page} command (or \R{pageex}{PageEx} for more advanced settings). A typical set of pages looks like this:
-
-\c Page license
-\c Page components
-\c Page directory
-\c Page instfiles
-\c UninstPage uninstConfirm
-\c UninstPage instfiles
-
-For the installer, this typical set of pages will display a license agreement, allow selection of components to install, allow selection of an installation directory, and finally install the selected components in the instfiles page. For the uninstaller, it will display a confirmation page, and uninstall in the instfiles page.
-
-\S1{tut-sections} Sections
-
-In a common installer there are several things the user can install. For example in the NSIS distribution installer you can choose to install the source code, additional plug-ins, examples and more. Each of these components has its own piece of code. If the user selects to install this component, then the installer will execute that code. In the script, that code is defined in sections. Each section corresponds to one component in the components page. The section's name is the displayed component name, and the section code will be executed if that component is selected. It is possible to build your installer with only one section, but if you want to use the components page and let the user choose what to install, you'll have to use more than one section.
-
-Uninstallers can also have multiple sections. Uninstaller section names are prefixed with 'un.'. For example:
-
-\c Section "Installer Section"
-\c SectionEnd
-\c
-\c Section "un.Uninstaller Section"
-\c SectionEnd
-
-The instructions that can be used in sections are very different from the installer attributes instructions, they are executed at runtime on the user's computer. Those instructions can extract files, read from and write to the registry, INI files or normal files, create directories, create shortcuts and a lot more. You can find out more in \R{instr}{Instructions}.
-
-The most basic instructions are \R{setoutpath}{SetOutPath} which tells the installer where to extract files and \R{file}{File} which extracts files.
-
-Example:
-
-\c Section "My Program"
-\c SetOutPath $INSTDIR
-\c File "My Program.exe"
-\c File "Readme.txt"
-\c SectionEnd
-
-For more information about sections see \R{sections}{Sections}.
-
-\S1{tut-functions} Functions
-
-Functions can contain script code, just like sections. The difference between sections and functions is the way they are called. There are two types of functions, user functions and callback functions.
-
-User functions are called by the user from within sections or other functions using the \R{call}{Call} instruction. User functions will not execute unless you call them. After the code of the function will be executed the installer will continue executing the instructions that came after the Call instruction, unless you have aborted the installation inside the function. User functions are very useful if you have a set of instructions that need to be executed at several locations in the installers. If you put the code into a function you can save the copying time and you can maintain the code more easily.
-
-Callback functions are called by the installer upon certain defined events such as when the installer starts. Callbacks are optional. If for example you want to welcome the user to your installer you will define a function called .onInit. The NSIS compiler will recognize this function as a callback function by the name and will call it when the installer starts.
-
-\c Function .onInit
-\c MessageBox MB_YESNO "This will install My Program. Do you wish to continue?" IDYES gogogo
-\c Abort
-\c gogogo:
-\c FunctionEnd
-
-\R{abort}{Abort} has a special meaning in callback functions. Each callback function has its own meaning for it, have a look at \R{callbacks}{Callback Functions} for more information. In the above example Abort tells the installer to stop initializing the installer and quit immediately.
-
-For more information about functions see \R{functions}{Functions}.
-
-\S1{tut-working-with-scripts} Working with Scripts
-
-\S2{tut-logic} Logical Code Structures
-
-Conditionally executing code, or executing code in a loop can be done using \R{strcmp}{StrCmp}, \R{intcmp}{IntCmp}, \R{iferrors}{IfErrors}, \R{goto}{Goto} and more. However, there's a much easier way do this. The LogicLib provides some very simple macros that allow easy construction of complex logical structures. Its syntax, explained in \L{../Include/LogicLib.nsh}{LogicLib.nsh}, is similar to other programming languages and can prove to be simpler for beginners and advanced users alike.
-
-For example, checking a value of a variable without the LogicLib can be done as followed.
-
-\c StrCmp $0 'some value' 0 +3
-\c MessageBox MB_OK '$$0 is some value'
-\c Goto done
-\c StrCmp $0 'some other value' 0 +3
-\c MessageBox MB_OK '$$0 is some other value'
-\c Goto done
-\c # else
-\c MessageBox MB_OK '$$0 is "$0"'
-\c done:
-
-However, with the LogicLib, the code gets is much more readable and easy to understand, as can be seen in the following example.
-
-\c ${If} $0 == 'some value'
-\c MessageBox MB_OK '$$0 is some value'
-\c ${ElseIf} $0 == 'some other value'
-\c MessageBox MB_OK '$$0 is some other value'
-\c ${Else}
-\c MessageBox MB_OK '$$0 is "$0"'
-\c ${EndIf}
-
-The same can also be done using a switch, as shown in the following example.
-
-\c ${Switch} $0
-\c ${Case} 'some value'
-\c MessageBox MB_OK '$$0 is some value'
-\c ${Break}
-\c ${Case} 'some other value'
-\c MessageBox MB_OK '$$0 is some other value'
-\c ${Break}
-\c ${Default}
-\c MessageBox MB_OK '$$0 is "$0"'
-\c ${Break}
-\c ${EndSwitch}
-
-Multiple conditions are also supported. The following example will notify the user, if both $0 and $1 are empty.
-
-\c ${If} $0 == ''
-\c ${AndIf} $1 == ''
-\c MessageBox MB_OK|MB_ICONSTOP 'both are empty!'
-\c ${EndIf}
-
-The LogicLib removes the need for labels and relative jumps, thus prevents label name conflicts, and removes the need to manually adjust relative jump offsets every time the script is changed.
-
-It also simplifies looping, by supporting the common while, do and for loops. All of the following examples count to five using the LogicLib.
-
-\c StrCpy $R1 0
-\c ${While} $R1 < 5
-\c IntOp $R1 $R1 + 1
-\c DetailPrint $R1
-\c ${EndWhile}
-
-\c ${For} $R1 1 5
-\c DetailPrint $R1
-\c ${Next}
-
-\c StrCpy $R1 0
-\c ${Do}
-\c IntOp $R1 $R1 + 1
-\c DetailPrint $R1
-\c ${LoopUntil} $R1 >= 5
-
-To use the LogicLib, the following line needs to put at the top of the script.
-
-\c !include LogicLib.nsh
-
-More examples can be found in \L{../Examples/LogicLib.nsi}{LogicLib.nsi}.
-
-\S2{tutVariables} Variables
-
-You can declare your own variables ($VARNAME) with the \R{var}{Var} command. Variables are global and can be used in any Section or Function.
-
-Declaring and using a user variable:
-
-\c Var BLA ;Declare the variable
-\c
-\c Section bla
-\c
-\c StrCpy $BLA "123" ;Now you can use the variable $BLA
-\c
-\c SectionEnd
-
-In addition there is a Stack, which can also be used for temporary storage. To access the stack use the commands \R{Push}{Push} and \R{Pop}{Pop}. Push adds a value to the stack, Pop removes one and sets the variable.
-
-For shared code, there are \R{varother}{20 registers available} (like $0 and $R0). These static variables don't have to be declared and you won't get any name conflicts. If you want to use these variables in shared code, store the original values on the stack and restore the original values afterwards.
-
-After calling the function, the variables contain the same value as before. Note the order when using multiple variables (last-in first-out):
-
-\c Function bla
-\c
-\c Push $R0
-\c Push $R1
-\c
-\c ...code...
-\c
-\c Pop $R1
-\c Pop $R0
-\c
-\c FunctionEnd
-
-\S2{tutdebug} Debugging Scripts
-
-The more you work with NSIS the more complex the scripts will become. This will increase the potential of mistakes, especially when dealing with lots of variables. There are a few possibilities to help you debugging the code. To display the contents of variables you should use \R{messagebox}{MessageBoxes} or \R{detailprint}{DetailPrint}. To get a brief overview about all variables you should use the plug-in \W{http://nsis.sourceforge.net/wiki/DumpState}{DumpState}. By default all actions of the Installer are printed out in the Log Window. You can access the log if you right-click in the Log Window and select "Copy Details To Clipboard". There is also a way to write it directly to a file, see \R{dumplogtofile}{here}.
-
-\S1{tutscriptexecution} Script Execution
-
-When a user runs an installer or an uninstaller, pages are displayed in the order they were defined in the script. When the instfiles page is reached, sections, corresponding to the selected components, are executed in the order they were defined in the script. If the components page is not displayed, all sections are executed, assuming they were not unselected or somehow disabled by the script.
-
-Beside code in sections, there's also code in callback functions. If defined, they might be executed before the sections code. For example, the \R{oninit}{.onInit} callback function is executed before anything else in the script. There are also \R{pagecallbacks_explain}{page callback functions} which are executed at certain points of the page display process.
-
-\S1{compilercommands} Compiler Commands
-
-Compiler commands will be executed on compile time on your computer. They can be used for conditional compilation, to include header files, to execute applications, to change the working directory and more. The most common usage is defines. Defines are compile time constants. You can define your product's version number and use it in your script. For example:
-
-\c !define VERSION "1.0.3"
-\c Name "My Program ${VERSION}"
-\c OutFile "My Program Installer - ${VERSION}.exe"
-
-For more information about defines see \R{compdefines}{Conditional Compilation}.
-
-Another common use is macros. Macros are used to insert code on compile time, depending on defines and using the values of the defines. The macro's commands are inserted at compile time. This allows you to write a general code only once and use it a lot of times but with a few changes. For example:
-
-\c !macro MyFunc UN
-\c Function ${UN}MyFunc
-\c Call ${UN}DoRegStuff
-\c ReadRegStr $0 HKLM Software\MyProgram key
-\c DetailPrint $0
-\c FunctionEnd
-\c !macroend
-\c
-\c !insertmacro MyFunc ""
-\c !insertmacro MyFunc "un."
-
-This macro helps you avoid writing the same code for both the installer and the uninstaller. The two !insertmacros insert two functions, one for the installer called MyFunc and one for the uninstaller called un.MyFunc and both do exactly the same thing.
-
-For more information see \R{comptime}{Compile Time Commands}.
-
-\H{tutcompiler} Compiler
-
-The second thing you need to do in order to create your installer after you have created your script is to compile your script. MakeNSIS.exe is the NSIS compiler. It reads your script, parses it and creates an installer for you.
-
-To compile you have to right-click your .nsi file and select Compile NSIS Script. This will cause MakeNSISW, the NSIS Compiler Interface, to launch and call MakeNSIS to compile your script. MakeNSISW will get the output of MakeNSIS and present it to you in a window where you can see it, copy it, test the installer, browse for it and more. Using makensis.exe from the command prompt is also possible.
-
-The compiler will check your script and give you warnings or an error. If an error occurs (i.e. 2 parameters required but only 1 given) the compiler will abort and a short error message including the line number will be displayed. For non-critical errors the compiler will give a warning (i.e. two DirText commands in one script). If your script has no errors the compiler will output an installer for you to distribute.
-
-NSIS supports different compression methods, as explained \R{asetcompressor}{here}. ZLIB is the default compression method, which is fast and uses only a little bit of memory. LZMA is a good method for the creation of small installers for internet distribution. BZIP2 usually compresses better than ZLIB but not as good as LZMA, it is useful if you need lower memory usage or fast script compilation.
-
-It it also possible to compile Windows installer on Linux, BSD or Mac OS X servers. See \R{build}{Building NSIS} for details.
-
-\H{tutmodernui} Modern UI
-
-A popular user interface for NSIS is the Modern User Interface. It has an interface like the wizards of recent Windows versions. The Modern UI is not only a customized resource file, it has a lots of new interface elements. It features a white header to describe the current step, a description area on the component page, a welcome page, a finish page that allows the user to run the application or reboot the system and more.
-
-For more information, check the \L{../Docs/Modern UI/Readme.html}{Modern UI Readme} and the \L{../Examples/Modern UI}{Modern UI Examples}.
-
-\H{tutplugin} Plug-ins
-
-NSIS support plug-ins that can be called from the script. Plug-ins are DLL files written in C, C++, Delphi or another programming language and therefore provide a more powerful code base to NSIS.
-
-A plug-in call looks like this:
-
-\c DLLName::FunctionName "parameter number 1" "parameter number 2" "parameter number 3"
-
-Every plug-in's function has its own requirements when it comes to parameters, some will require none, some will accept as many parameters as you want to send. Examples:
-
-\c nsExec::ExecToLog '"${NSISDIR}\makensis.exe" /CMDHELP'
-\c InstallOptions::dialog "$PLUGINSDIR\test.ini"
-\c NSISdl::download http://download.nullsoft.com/winamp/client/winamp291_lite.exe $R0
-
-The plug-ins that NSIS knows of are listed at the top of the output of the compiler. NSIS searches for plug-ins in the \L{../Plugins/}{Plugins folder} under your NSIS directory and lists all of their available functions. You can use \R{addplugindir}{!addplugindir} to tell NSIS to search in other directories too.
-
-The NSIS distribution already included many plug-ins. \L{../Docs/InstallOptions/Readme.html}{InstallOptions} is a popular plug-in that allows you to create custom pages, in combination with the NSIS Page commands (See \R{pages}{Pages}). The \L{../Docs/StartMenu/Readme.txt}{Startmenu plug-in} provides a page that allows the user to choose a Start Menu folder. There are a lot of plug-ins for different purposes, have a look at the \L{../Docs/}{Docs folder} for help files and examples. You can find additional plug-ins on-line: \W{http://nsis.sf.net/wiki/}{NSIS Wiki}.
-
-You can also create a plug-in yourself. C/C++ and Delphi header files are already available, see the \L{../Examples/Plugin/}{example plugin} for how to do this. Source code of included plug-ins can also be found in the source code package.
-
-\H{tutmore} More
-
-This tutorial has described the basic NSIS features, to learn more about everything NSIS can do, take some time to read this manual.
+\C{tutorial} Tutorial: The Basics
+
+\H{tutintro} Introduction
+
+Most software packages you download or buy come with an installer. The installer copies and/or updates files, writes registry keys, writes configuration, creates shortcuts, etc. All of this is done automatically for the user. All the user needs to do is supply some information and the installer will do the rest. The user goes through a wizard, makes the appropriate choices and waits until the installer finishes. After the installer has finished the user is left only with the simple task of starting the program. The user doesn't have to worry about things he might have forgotten because all of the necessary steps were done by the installer.
+
+NSIS is a tool for developers to create such installers. NSIS allows you to create everything from basic installers that just copy files to very complex installers that handle a lot of advanced tasks such as writing registry keys, settings environment variables, downloading the latest files from the internet, customizing the configuration file and more. NSIS is very flexible and its scripting language is easy to learn.
+
+NSIS compiles all of the files and the installation script into one executable file, so your application will be easy to distribute. NSIS adds only about 34KB of code of its own (for the default configuration) to the data. NSIS boasts the smallest overhead available while still providing a lot of options thanks to its powerful scripting language and support of external plug-ins.
+
+\H{tutscriptfiles} Script Files
+
+To create a NSIS installer, you first have to write a NSIS script. A NSIS script is just a regular text file with a special syntax. You can edit scripts with every text editor. It's recommended you use a text editor that shows line numbers because NSIS uses line numbers to indicate where errors lie, and to warn you about where errors might lie. An editor that supports syntax highlighting is also recommended. You can download editors made especially for NSIS and files for syntax highlighting at the \W{http://nsis.sf.net/wiki/}{NSIS Wiki}.
+
+In a NSIS script every line is treated as a command. If your command is too long for one line you can use a back-slash - '\\' - at the end of the line. The compiler will treat the new line as an addition to the previous line and will not expect a new command. For example:
+
+\c Messagebox MB_OK|MB_ICONINFORMATION \
+\c "This is a sample that shows how to use line breaks for larger commands in NSIS scripts"
+
+If you want to use a double-quote in a string you can either use $\\\\" to escape the quote or quote the string with a different type of quote such as ` or '.
+
+For more details about the script format, see \R{fileformat}{Script File Format}.
+
+The default extension for a script file is .nsi. Header files have the .nsh extension. Header files can help you arrange your script by dividing it to more than one block of code, you can also put functions or macros in header files and include the header files in multiple installers. This makes updating easier and it also makes your scripts easier to read. To include a header file in your script use \R{include}{!include}. Header files that reside in the Include directory under your NSIS directory can be included just by their name. For example:
+
+\c !include Sections.nsh
+
+\H{tutstructure} Scripting structure
+
+A NSIS script can contain Installer Attributes and Sections/Functions. You can also use Compiler Commands for compile-time operations. Required is the \R{aoutfile}{OutFile} instruction, which tells NSIS where to write the installer, and one section.
+
+\S1{installerattributes} Installer Attributes
+
+Installer Attributes determine the behavior and the look and feel of your installer. With these attributes you can change texts that will be shown during the installation, the number of installation types etc. Most of these commands can only be set and are not changeable during runtime.
+
+Other basic instructions are \R{aname}{Name} and \R{ainstalldir}{InstallDir}.
+
+For more information about installer attributes, have a look at \R{instattribs}{Installer Attributes}.
+
+\S1{tut-pages} Pages
+
+A non-silent installer has a set of wizard pages to let the user configure the installer. You can set which pages to display using the \R{page}{Page} command (or \R{pageex}{PageEx} for more advanced settings). A typical set of pages looks like this:
+
+\c Page license
+\c Page components
+\c Page directory
+\c Page instfiles
+\c UninstPage uninstConfirm
+\c UninstPage instfiles
+
+For the installer, this typical set of pages will display a license agreement, allow selection of components to install, allow selection of an installation directory, and finally install the selected components in the instfiles page. For the uninstaller, it will display a confirmation page, and uninstall in the instfiles page.
+
+\S1{tut-sections} Sections
+
+In a common installer there are several things the user can install. For example in the NSIS distribution installer you can choose to install the source code, additional plug-ins, examples and more. Each of these components has its own piece of code. If the user selects to install this component, then the installer will execute that code. In the script, that code is defined in sections. Each section corresponds to one component in the components page. The section's name is the displayed component name, and the section code will be executed if that component is selected. It is possible to build your installer with only one section, but if you want to use the components page and let the user choose what to install, you'll have to use more than one section.
+
+Uninstallers can also have multiple sections. Uninstaller section names are prefixed with 'un.'. For example:
+
+\c Section "Installer Section"
+\c SectionEnd
+\c
+\c Section "un.Uninstaller Section"
+\c SectionEnd
+
+The instructions that can be used in sections are very different from the installer attributes instructions, they are executed at runtime on the user's computer. Those instructions can extract files, read from and write to the registry, INI files or normal files, create directories, create shortcuts and a lot more. You can find out more in \R{instr}{Instructions}.
+
+The most basic instructions are \R{setoutpath}{SetOutPath} which tells the installer where to extract files and \R{file}{File} which extracts files.
+
+Example:
+
+\c Section "My Program"
+\c SetOutPath $INSTDIR
+\c File "My Program.exe"
+\c File "Readme.txt"
+\c SectionEnd
+
+For more information about sections see \R{sections}{Sections}.
+
+\S1{tut-functions} Functions
+
+Functions can contain script code, just like sections. The difference between sections and functions is the way they are called. There are two types of functions, user functions and callback functions.
+
+User functions are called by the user from within sections or other functions using the \R{call}{Call} instruction. User functions will not execute unless you call them. After the code of the function will be executed the installer will continue executing the instructions that came after the Call instruction, unless you have aborted the installation inside the function. User functions are very useful if you have a set of instructions that need to be executed at several locations in the installers. If you put the code into a function you can save the copying time and you can maintain the code more easily.
+
+Callback functions are called by the installer upon certain defined events such as when the installer starts. Callbacks are optional. If for example you want to welcome the user to your installer you will define a function called .onInit. The NSIS compiler will recognize this function as a callback function by the name and will call it when the installer starts.
+
+\c Function .onInit
+\c MessageBox MB_YESNO "This will install My Program. Do you wish to continue?" IDYES gogogo
+\c Abort
+\c gogogo:
+\c FunctionEnd
+
+\R{abort}{Abort} has a special meaning in callback functions. Each callback function has its own meaning for it, have a look at \R{callbacks}{Callback Functions} for more information. In the above example Abort tells the installer to stop initializing the installer and quit immediately.
+
+For more information about functions see \R{functions}{Functions}.
+
+\S1{tut-working-with-scripts} Working with Scripts
+
+\S2{tut-logic} Logical Code Structures
+
+Conditionally executing code, or executing code in a loop can be done using \R{strcmp}{StrCmp}, \R{intcmp}{IntCmp}, \R{iferrors}{IfErrors}, \R{goto}{Goto} and more. However, there's a much easier way do this. The LogicLib provides some very simple macros that allow easy construction of complex logical structures. Its syntax, explained in \L{../Include/LogicLib.nsh}{LogicLib.nsh}, is similar to other programming languages and can prove to be simpler for beginners and advanced users alike.
+
+For example, checking a value of a variable without the LogicLib can be done as followed.
+
+\c StrCmp $0 'some value' 0 +3
+\c MessageBox MB_OK '$$0 is some value'
+\c Goto done
+\c StrCmp $0 'some other value' 0 +3
+\c MessageBox MB_OK '$$0 is some other value'
+\c Goto done
+\c # else
+\c MessageBox MB_OK '$$0 is "$0"'
+\c done:
+
+However, with the LogicLib, the code gets is much more readable and easy to understand, as can be seen in the following example.
+
+\c ${If} $0 == 'some value'
+\c MessageBox MB_OK '$$0 is some value'
+\c ${ElseIf} $0 == 'some other value'
+\c MessageBox MB_OK '$$0 is some other value'
+\c ${Else}
+\c MessageBox MB_OK '$$0 is "$0"'
+\c ${EndIf}
+
+The same can also be done using a switch, as shown in the following example.
+
+\c ${Switch} $0
+\c ${Case} 'some value'
+\c MessageBox MB_OK '$$0 is some value'
+\c ${Break}
+\c ${Case} 'some other value'
+\c MessageBox MB_OK '$$0 is some other value'
+\c ${Break}
+\c ${Default}
+\c MessageBox MB_OK '$$0 is "$0"'
+\c ${Break}
+\c ${EndSwitch}
+
+Multiple conditions are also supported. The following example will notify the user, if both $0 and $1 are empty.
+
+\c ${If} $0 == ''
+\c ${AndIf} $1 == ''
+\c MessageBox MB_OK|MB_ICONSTOP 'both are empty!'
+\c ${EndIf}
+
+The LogicLib removes the need for labels and relative jumps, thus prevents label name conflicts, and removes the need to manually adjust relative jump offsets every time the script is changed.
+
+It also simplifies looping, by supporting the common while, do and for loops. All of the following examples count to five using the LogicLib.
+
+\c StrCpy $R1 0
+\c ${While} $R1 < 5
+\c IntOp $R1 $R1 + 1
+\c DetailPrint $R1
+\c ${EndWhile}
+
+\c ${For} $R1 1 5
+\c DetailPrint $R1
+\c ${Next}
+
+\c StrCpy $R1 0
+\c ${Do}
+\c IntOp $R1 $R1 + 1
+\c DetailPrint $R1
+\c ${LoopUntil} $R1 >= 5
+
+To use the LogicLib, the following line needs to put at the top of the script.
+
+\c !include LogicLib.nsh
+
+More examples can be found in \L{../Examples/LogicLib.nsi}{LogicLib.nsi}.
+
+\S2{tutVariables} Variables
+
+You can declare your own variables ($VARNAME) with the \R{var}{Var} command. Variables are global and can be used in any Section or Function.
+
+Declaring and using a user variable:
+
+\c Var BLA ;Declare the variable
+\c
+\c Section bla
+\c
+\c StrCpy $BLA "123" ;Now you can use the variable $BLA
+\c
+\c SectionEnd
+
+In addition there is a Stack, which can also be used for temporary storage. To access the stack use the commands \R{Push}{Push} and \R{Pop}{Pop}. Push adds a value to the stack, Pop removes one and sets the variable.
+
+For shared code, there are \R{varother}{20 registers available} (like $0 and $R0). These static variables don't have to be declared and you won't get any name conflicts. If you want to use these variables in shared code, store the original values on the stack and restore the original values afterwards.
+
+After calling the function, the variables contain the same value as before. Note the order when using multiple variables (last-in first-out):
+
+\c Function bla
+\c
+\c Push $R0
+\c Push $R1
+\c
+\c ...code...
+\c
+\c Pop $R1
+\c Pop $R0
+\c
+\c FunctionEnd
+
+\S2{tutdebug} Debugging Scripts
+
+The more you work with NSIS the more complex the scripts will become. This will increase the potential of mistakes, especially when dealing with lots of variables. There are a few possibilities to help you debugging the code. To display the contents of variables you should use \R{messagebox}{MessageBoxes} or \R{detailprint}{DetailPrint}. To get a brief overview about all variables you should use the plug-in \W{http://nsis.sourceforge.net/wiki/DumpState}{DumpState}. By default all actions of the Installer are printed out in the Log Window. You can access the log if you right-click in the Log Window and select "Copy Details To Clipboard". There is also a way to write it directly to a file, see \R{dumplogtofile}{here}.
+
+\S1{tutscriptexecution} Script Execution
+
+When a user runs an installer or an uninstaller, pages are displayed in the order they were defined in the script. When the instfiles page is reached, sections, corresponding to the selected components, are executed in the order they were defined in the script. If the components page is not displayed, all sections are executed, assuming they were not unselected or somehow disabled by the script.
+
+Beside code in sections, there's also code in callback functions. If defined, they might be executed before the sections code. For example, the \R{oninit}{.onInit} callback function is executed before anything else in the script. There are also \R{pagecallbacks_explain}{page callback functions} which are executed at certain points of the page display process.
+
+\S1{compilercommands} Compiler Commands
+
+Compiler commands will be executed on compile time on your computer. They can be used for conditional compilation, to include header files, to execute applications, to change the working directory and more. The most common usage is defines. Defines are compile time constants. You can define your product's version number and use it in your script. For example:
+
+\c !define VERSION "1.0.3"
+\c Name "My Program ${VERSION}"
+\c OutFile "My Program Installer - ${VERSION}.exe"
+
+For more information about defines see \R{compdefines}{Conditional Compilation}.
+
+Another common use is macros. Macros are used to insert code on compile time, depending on defines and using the values of the defines. The macro's commands are inserted at compile time. This allows you to write a general code only once and use it a lot of times but with a few changes. For example:
+
+\c !macro MyFunc UN
+\c Function ${UN}MyFunc
+\c Call ${UN}DoRegStuff
+\c ReadRegStr $0 HKLM Software\MyProgram key
+\c DetailPrint $0
+\c FunctionEnd
+\c !macroend
+\c
+\c !insertmacro MyFunc ""
+\c !insertmacro MyFunc "un."
+
+This macro helps you avoid writing the same code for both the installer and the uninstaller. The two !insertmacros insert two functions, one for the installer called MyFunc and one for the uninstaller called un.MyFunc and both do exactly the same thing.
+
+For more information see \R{comptime}{Compile Time Commands}.
+
+\H{tutcompiler} Compiler
+
+The second thing you need to do in order to create your installer after you have created your script is to compile your script. MakeNSIS.exe is the NSIS compiler. It reads your script, parses it and creates an installer for you.
+
+To compile you have to right-click your .nsi file and select Compile NSIS Script. This will cause MakeNSISW, the NSIS Compiler Interface, to launch and call MakeNSIS to compile your script. MakeNSISW will get the output of MakeNSIS and present it to you in a window where you can see it, copy it, test the installer, browse for it and more. Using makensis.exe from the command prompt is also possible.
+
+The compiler will check your script and give you warnings or an error. If an error occurs (i.e. 2 parameters required but only 1 given) the compiler will abort and a short error message including the line number will be displayed. For non-critical errors the compiler will give a warning (i.e. two DirText commands in one script). If your script has no errors the compiler will output an installer for you to distribute.
+
+NSIS supports different compression methods, as explained \R{asetcompressor}{here}. ZLIB is the default compression method, which is fast and uses only a little bit of memory. LZMA is a good method for the creation of small installers for internet distribution. BZIP2 usually compresses better than ZLIB but not as good as LZMA, it is useful if you need lower memory usage or fast script compilation.
+
+It it also possible to compile Windows installer on Linux, BSD or Mac OS X servers. See \R{build}{Building NSIS} for details.
+
+\H{tutmodernui} Modern UI
+
+A popular user interface for NSIS is the Modern User Interface. It has an interface like the wizards of recent Windows versions. The Modern UI is not only a customized resource file, it has a lots of new interface elements. It features a white header to describe the current step, a description area on the component page, a welcome page, a finish page that allows the user to run the application or reboot the system and more.
+
+For more information, check the \L{../Docs/Modern UI/Readme.html}{Modern UI Readme} and the \L{../Examples/Modern UI}{Modern UI Examples}.
+
+\H{tutplugin} Plug-ins
+
+NSIS support plug-ins that can be called from the script. Plug-ins are DLL files written in C, C++, Delphi or another programming language and therefore provide a more powerful code base to NSIS.
+
+A plug-in call looks like this:
+
+\c DLLName::FunctionName "parameter number 1" "parameter number 2" "parameter number 3"
+
+Every plug-in's function has its own requirements when it comes to parameters, some will require none, some will accept as many parameters as you want to send. Examples:
+
+\c nsExec::ExecToLog '"${NSISDIR}\makensis.exe" /CMDHELP'
+\c InstallOptions::dialog "$PLUGINSDIR\test.ini"
+\c NSISdl::download http://download.nullsoft.com/winamp/client/winamp291_lite.exe $R0
+
+The plug-ins that NSIS knows of are listed at the top of the output of the compiler. NSIS searches for plug-ins in the \L{../Plugins/}{Plugins folder} under your NSIS directory and lists all of their available functions. You can use \R{addplugindir}{!addplugindir} to tell NSIS to search in other directories too.
+
+The NSIS distribution already included many plug-ins. \L{../Docs/InstallOptions/Readme.html}{InstallOptions} is a popular plug-in that allows you to create custom pages, in combination with the NSIS Page commands (See \R{pages}{Pages}). The \L{../Docs/StartMenu/Readme.txt}{Startmenu plug-in} provides a page that allows the user to choose a Start Menu folder. There are a lot of plug-ins for different purposes, have a look at the \L{../Docs/}{Docs folder} for help files and examples. You can find additional plug-ins on-line: \W{http://nsis.sf.net/wiki/}{NSIS Wiki}.
+
+You can also create a plug-in yourself. C/C++ and Delphi header files are already available, see the \L{../Examples/Plugin/}{example plugin} for how to do this. Source code of included plug-ins can also be found in the source code package.
+
+\H{tutmore} More
+
+This tutorial has described the basic NSIS features, to learn more about everything NSIS can do, take some time to read this manual.
diff --git a/Docs/src/ui.but b/Docs/src/ui.but
index cbd48dc..8c790ce 100755
--- a/Docs/src/ui.but
+++ b/Docs/src/ui.but
@@ -1,158 +1,158 @@
-\S1{ui} User Interface Instructions
-
-\S2{BringToFront} BringToFront
-
-Makes the installer window visible and brings it to the top of the window list. If an application was executed that shows itself in front of the installer, a BringToFront would bring the installer back in focus.
-
-Recent Windows versions restrict the setting of foreground windows. If the user is working with another application during installation, the user may be notified using a different method.
-
-\S2{createfont} CreateFont
-
-\c user_var(handle output) face_name [height] [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]
-
-Creates a font and puts its handle into user_var. For more information about the different parameters have a look at \W{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_8fp0.asp}{MSDN's page about the Win32 API function CreateFont()}.
-
-You can get the current font used by NSIS using the ^Font and ^FontSize \R{langstring}{LangString}s.
-
-\c !include WinMessages.nsh
-\c GetDlgItem $0 $HWNDPARENT 1
-\c CreateFont $1 "Times New Roman" "7" "700" /UNDERLINE
-\c SendMessage $0 ${WM_SETFONT} $1 1
-
-\S2{detailprint} DetailPrint
-
-\c user_message
-
-Adds the string "user_message" to the details view of the installer.
-
-\c DetailPrint "this message will show on the installation window"
-
-\S2{enablewindow} EnableWindow
-
-\c hwnd (1|0)
-
-Enables or disables mouse and keyboard input to the specified window or control. Possible states are 0 (disabled) or 1 (enabled).
-
-\c GetDlgItem $0 $HWNDPARENT 1
-\c EnableWindow $0 0
-\c Sleep 1000
-\c EnableWindow $0 1
-
-\S2{findwindow} FindWindow
-
-\c user_var(hwnd output) windowclass [windowtitle] [windowparent] [childafter]
-
-Searches for a window. Behaves like the win32 FindWindowEx(). Searches by windowclass (and/or windowtitle if specified). If windowparent or childafter are specified, the search will be restricted as such. If windowclass or windowtitle is specified as "", they will not be used for the search. If the window is not found, the user variable returned is 0. To accomplish old-style FindWindow behavior, use FindWindow with SendMessage.
-
-\c FindWindow $0 "#32770" "" $HWNDPARENT
-\c FindWindow $0 "my window class" "my window title"
-
-\S2{getdlgitem} GetDlgItem
-
-\c user_var(output) dialog item_id
-
-Retrieves the handle of a control identified by item_id in the specified dialog box dialog. If you want to get the handle of a control on the inner dialog, first use FindWindow user_var(output) "#32770" "" $HWNDPARENT to get the handle of the inner dialog.
-
-\c GetDlgItem $0 $HWNDPARENT 1 # next/install button
-
-\S2{hidewindow} HideWindow
-
-Hides the installer.
-
-\S2{iswindow} IsWindow
-
-\c HWND jump_if_window [jump_if_not_window]
-
-If HWND is a window, Gotos jump_if_window, otherwise, Gotos jump_if_not_window (if specified).
-
-\c GetDlgItem $0 $HWNDPARENT 1
-\c IsWindow $0 0 +3
-\c MessageBox MB_OK "found a window"
-\c Goto +2
-\c MessageBox MB_OK "no window"
-
-\S2{lockwindow} LockWindow
-
-\c on|off
-
-\e{LockWindow on} prevents the main window from redrawing itself upon changes. When \e{LockWindow off} is used, all controls that weren't redrawn since \e{LockWindow on} will be redrawn. This makes the pages flickering look nicer because now it flickers a group of controls at the same time, instead of one control at a time. The individual control flickering is more noticeable on old computers.
-
-\S2{sendmessage} SendMessage
-
-\c HWND msg wparam lparam [user_var(return value)] [/TIMEOUT=time_in_ms]
-
-Sends a message to HWND. If a user variable $x is specified as the last parameter (or one before the last if you use /TIMEOUT), the return value of SendMessage will be stored to it. Note that when specifying 'msg' you must just use the integer value of the message. If you wish to send strings use "STR:a string" as wParam or lParam where needed.
-
-\b \e{WM_CLOSE} 16
-
-\b \e{WM_COMMAND} 273
-
-\b \e{WM_USER} 1024
-
-Include WinMessages.nsh to have all of Windows messages defined in your script.
-
-To send a string param, put STR: before the parameter, for example: "STR:Some string".
-
-Use /TIMEOUT=time_in_ms to specify the duration, in milliseconds, of the time-out period.
-
-\c !include WinMessages.nsh
-\c FindWindow $0 "Winamp v1.x"
-\c SendMessage $0 ${WM_CLOSE} 0 0
-
-\S2{setautoclose} SetAutoClose
-
-\c true|false
-
-Overrides the default auto window-closing flag (specified for the installer using \R{aautoclosewindow}{AutoCloseWindow}, and false for the uninstaller). Specify 'true' to have the install window immediately disappear after the install has completed, or 'false' to make it require a manual close.
-
-\S2{setbrandingimage} SetBrandingImage
-
-\c [/IMGID=item_id_in_dialog] [/RESIZETOFIT] path_to_bitmap_file.bmp
-
-Sets the current bitmap file displayed as the branding image. If no IMGID is specified, the first image control found will be used, or the image control created by \R{aaddbrandingimage}{AddBrandingImage}. Note that this bitmap must be present on the user's machine. Use File first to put it there. If /RESIZETOFIT is specified the image will be automatically resized (very poorly) to the image control size. If you used \R{aaddbrandingimage}{AddBrandingImage} you can get this size, by compiling your script and watching for \R{aaddbrandingimage}{AddBrandingImage} output, it will tell you the size. SetBrandingImage will not work when called from .onInit!
-
-\S2{setdetailsview} SetDetailsView
-
-\c show|hide
-
-Shows or hides the details, depending on which parameter you pass. Overrides the default details view, which is set via \R{ashowinstdetails}{ShowInstDetails}.
-
-\S2{setdetailsprint} SetDetailsPrint
-
-\c none|listonly|textonly|both|lastused
-
-Sets mode at which commands print their status. None has commands be quiet, listonly has status text only added to the listbox, textonly has status text only printed to the status bar, and both enables both (the default). For extracting many small files, textonly is recommended (especially on win9x with smooth scrolling enabled).
-
-\c SetDetailsPrint none
-\c File "secret file.dat"
-\c SetDetailsPrint both
-
-\S2{setctlcolors} SetCtlColors
-
-\c hwnd [/BRANDING] [text_color] [transparent|bg_color]
-
-Sets a background color and the text color for a static control, edit control, button or a dialog. \e{text_color} and \e{bg_color} don't accept variables. Use \R{getdlgitem}{GetDlgItem} to get the handle (HWND) of the control. To make the control transparent specify "transparent" as the background color value. You can also specify /BRANDING with or without text color and background color to make the control completely gray (or any other color you choose). This is used by the branding text control in the MUI.
-
-\c FindWindow $0 "#32770" "" $HWNDPARENT
-\c GetDlgItem $0 $0 1006
-\c SetCtlColors $0 0xFF0000 0x00FF00
-
-\\<b\\>Warning:\\</b\\> setting the background color of check boxes to "transparent" may not function properly when using \c{\R{axpstyle}{XPStlye} on}. The background may be completely black, instead of transparent, when using certain Windows themes.
-
-\S2{setsilent} SetSilent
-
-\c silent | normal
-
-Sets the installer to silent mode or normal mode. See \R{asilentinstall}{SilentInstall} for more information about silent installations. Can only be used in \R{oninit}{.onInit}.
-
-\S2{showwindow} ShowWindow
-
-\c hwnd show_state
-
-Sets the visibility of a window. Possible show_states are the same as \W{http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/showwindow.asp}{Windows ShowWindow} function. SW_* constants are defined in \L{../Include/WinMessages.nsh}{Include\\WinMessages.nsh}.
-
-\c !include WinMessages.nsh
-\c GetDlgItem $0 $HWNDPARENT 1
-\c ShowWindow $0 ${SW_HIDE}
-\c Sleep 1000
-\c ShowWindow $0 ${SW_SHOW}
+\S1{ui} User Interface Instructions
+
+\S2{BringToFront} BringToFront
+
+Makes the installer window visible and brings it to the top of the window list. If an application was executed that shows itself in front of the installer, a BringToFront would bring the installer back in focus.
+
+Recent Windows versions restrict the setting of foreground windows. If the user is working with another application during installation, the user may be notified using a different method.
+
+\S2{createfont} CreateFont
+
+\c user_var(handle output) face_name [height] [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]
+
+Creates a font and puts its handle into user_var. For more information about the different parameters have a look at \W{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_8fp0.asp}{MSDN's page about the Win32 API function CreateFont()}.
+
+You can get the current font used by NSIS using the ^Font and ^FontSize \R{langstring}{LangString}s.
+
+\c !include WinMessages.nsh
+\c GetDlgItem $0 $HWNDPARENT 1
+\c CreateFont $1 "Times New Roman" "7" "700" /UNDERLINE
+\c SendMessage $0 ${WM_SETFONT} $1 1
+
+\S2{detailprint} DetailPrint
+
+\c user_message
+
+Adds the string "user_message" to the details view of the installer.
+
+\c DetailPrint "this message will show on the installation window"
+
+\S2{enablewindow} EnableWindow
+
+\c hwnd (1|0)
+
+Enables or disables mouse and keyboard input to the specified window or control. Possible states are 0 (disabled) or 1 (enabled).
+
+\c GetDlgItem $0 $HWNDPARENT 1
+\c EnableWindow $0 0
+\c Sleep 1000
+\c EnableWindow $0 1
+
+\S2{findwindow} FindWindow
+
+\c user_var(hwnd output) windowclass [windowtitle] [windowparent] [childafter]
+
+Searches for a window. Behaves like the win32 FindWindowEx(). Searches by windowclass (and/or windowtitle if specified). If windowparent or childafter are specified, the search will be restricted as such. If windowclass or windowtitle is specified as "", they will not be used for the search. If the window is not found, the user variable returned is 0. To accomplish old-style FindWindow behavior, use FindWindow with SendMessage.
+
+\c FindWindow $0 "#32770" "" $HWNDPARENT
+\c FindWindow $0 "my window class" "my window title"
+
+\S2{getdlgitem} GetDlgItem
+
+\c user_var(output) dialog item_id
+
+Retrieves the handle of a control identified by item_id in the specified dialog box dialog. If you want to get the handle of a control on the inner dialog, first use FindWindow user_var(output) "#32770" "" $HWNDPARENT to get the handle of the inner dialog.
+
+\c GetDlgItem $0 $HWNDPARENT 1 # next/install button
+
+\S2{hidewindow} HideWindow
+
+Hides the installer.
+
+\S2{iswindow} IsWindow
+
+\c HWND jump_if_window [jump_if_not_window]
+
+If HWND is a window, Gotos jump_if_window, otherwise, Gotos jump_if_not_window (if specified).
+
+\c GetDlgItem $0 $HWNDPARENT 1
+\c IsWindow $0 0 +3
+\c MessageBox MB_OK "found a window"
+\c Goto +2
+\c MessageBox MB_OK "no window"
+
+\S2{lockwindow} LockWindow
+
+\c on|off
+
+\e{LockWindow on} prevents the main window from redrawing itself upon changes. When \e{LockWindow off} is used, all controls that weren't redrawn since \e{LockWindow on} will be redrawn. This makes the pages flickering look nicer because now it flickers a group of controls at the same time, instead of one control at a time. The individual control flickering is more noticeable on old computers.
+
+\S2{sendmessage} SendMessage
+
+\c HWND msg wparam lparam [user_var(return value)] [/TIMEOUT=time_in_ms]
+
+Sends a message to HWND. If a user variable $x is specified as the last parameter (or one before the last if you use /TIMEOUT), the return value of SendMessage will be stored to it. Note that when specifying 'msg' you must just use the integer value of the message. If you wish to send strings use "STR:a string" as wParam or lParam where needed.
+
+\b \e{WM_CLOSE} 16
+
+\b \e{WM_COMMAND} 273
+
+\b \e{WM_USER} 1024
+
+Include WinMessages.nsh to have all of Windows messages defined in your script.
+
+To send a string param, put STR: before the parameter, for example: "STR:Some string".
+
+Use /TIMEOUT=time_in_ms to specify the duration, in milliseconds, of the time-out period.
+
+\c !include WinMessages.nsh
+\c FindWindow $0 "Winamp v1.x"
+\c SendMessage $0 ${WM_CLOSE} 0 0
+
+\S2{setautoclose} SetAutoClose
+
+\c true|false
+
+Overrides the default auto window-closing flag (specified for the installer using \R{aautoclosewindow}{AutoCloseWindow}, and false for the uninstaller). Specify 'true' to have the install window immediately disappear after the install has completed, or 'false' to make it require a manual close.
+
+\S2{setbrandingimage} SetBrandingImage
+
+\c [/IMGID=item_id_in_dialog] [/RESIZETOFIT] path_to_bitmap_file.bmp
+
+Sets the current bitmap file displayed as the branding image. If no IMGID is specified, the first image control found will be used, or the image control created by \R{aaddbrandingimage}{AddBrandingImage}. Note that this bitmap must be present on the user's machine. Use File first to put it there. If /RESIZETOFIT is specified the image will be automatically resized (very poorly) to the image control size. If you used \R{aaddbrandingimage}{AddBrandingImage} you can get this size, by compiling your script and watching for \R{aaddbrandingimage}{AddBrandingImage} output, it will tell you the size. SetBrandingImage will not work when called from .onInit!
+
+\S2{setdetailsview} SetDetailsView
+
+\c show|hide
+
+Shows or hides the details, depending on which parameter you pass. Overrides the default details view, which is set via \R{ashowinstdetails}{ShowInstDetails}.
+
+\S2{setdetailsprint} SetDetailsPrint
+
+\c none|listonly|textonly|both|lastused
+
+Sets mode at which commands print their status. None has commands be quiet, listonly has status text only added to the listbox, textonly has status text only printed to the status bar, and both enables both (the default). For extracting many small files, textonly is recommended (especially on win9x with smooth scrolling enabled).
+
+\c SetDetailsPrint none
+\c File "secret file.dat"
+\c SetDetailsPrint both
+
+\S2{setctlcolors} SetCtlColors
+
+\c hwnd [/BRANDING] [text_color] [transparent|bg_color]
+
+Sets a background color and the text color for a static control, edit control, button or a dialog. \e{text_color} and \e{bg_color} don't accept variables. Use \R{getdlgitem}{GetDlgItem} to get the handle (HWND) of the control. To make the control transparent specify "transparent" as the background color value. You can also specify /BRANDING with or without text color and background color to make the control completely gray (or any other color you choose). This is used by the branding text control in the MUI.
+
+\c FindWindow $0 "#32770" "" $HWNDPARENT
+\c GetDlgItem $0 $0 1006
+\c SetCtlColors $0 0xFF0000 0x00FF00
+
+\\<b\\>Warning:\\</b\\> setting the background color of check boxes to "transparent" may not function properly when using \c{\R{axpstyle}{XPStlye} on}. The background may be completely black, instead of transparent, when using certain Windows themes.
+
+\S2{setsilent} SetSilent
+
+\c silent | normal
+
+Sets the installer to silent mode or normal mode. See \R{asilentinstall}{SilentInstall} for more information about silent installations. Can only be used in \R{oninit}{.onInit}.
+
+\S2{showwindow} ShowWindow
+
+\c hwnd show_state
+
+Sets the visibility of a window. Possible show_states are the same as \W{http://msdn2.microsoft.com/en-us/library/ms633548}{Windows ShowWindow} function. SW_* constants are defined in \L{../Include/WinMessages.nsh}{Include\\WinMessages.nsh}.
+
+\c !include WinMessages.nsh
+\c GetDlgItem $0 $HWNDPARENT 1
+\c ShowWindow $0 ${SW_HIDE}
+\c Sleep 1000
+\c ShowWindow $0 ${SW_SHOW}
diff --git a/Docs/src/uninstall.but b/Docs/src/uninstall.but
index af26d39..fe06b4d 100755
--- a/Docs/src/uninstall.but
+++ b/Docs/src/uninstall.but
@@ -1,9 +1,9 @@
-\S1{uninst} Uninstaller Instructions
-
-\S2{writeuninstaller} WriteUninstaller
-
-\c [Path\]exename.exe
-
-Writes the uninstaller to the filename (and optionally path) specified. Only valid from within an install section or function, and requires that you have an uninstall section in your script. See also Uninstall configuration. You can call this one or more times to write out one or more copies of the uninstaller.
-
-\c WriteUninstaller $INSTDIR\uninstaller.exe
+\S1{uninst} Uninstaller Instructions
+
+\S2{writeuninstaller} WriteUninstaller
+
+\c [Path\]exename.exe
+
+Writes the uninstaller to the filename (and optionally path) specified. Only valid from within an install section or function, and requires that you have an uninstall section in your script. See also Uninstall configuration. You can call this one or more times to write out one or more copies of the uninstaller.
+
+\c WriteUninstaller $INSTDIR\uninstaller.exe
diff --git a/Docs/src/usage.but b/Docs/src/usage.but
index 6f7e4fd..0df78ea 100755
--- a/Docs/src/usage.but
+++ b/Docs/src/usage.but
@@ -1,105 +1,105 @@
-\C{cmdlineusage} Command Line Usage
-
-\H{usage} MakeNSIS Usage
-
-NSIS installers are generated by using the 'MakeNSIS' program to compile a NSIS script (.NSI) into an installer executable.
-The NSIS development kit installer sets up your computer so that you can compile a .nsi file by simply right-clicking on it in explorer, and selecting 'compile'.
-
-If you want to use MakeNSIS on the command line, the syntax of the makensis command is:
-
-\c makensis [option | script.nsi | - [...]]
-
-\S1{usagereference} Options
-
-\b /LICENSE displays a keen license page.
-
-\b The /V switch followed by a number between 0 and 4 will set the verbosity of output accordingly. 0=no output, 1=errors only, 2=warnings and errors, 3=info, warnings, and errors, 4=all output.
-
-\b The /P switch followed by a number between 0 and 5 will set the priority of the compiler process accordingly. 0=idle, 1=below normal, 2=normal (default), 3=above normal, 4=high, 5=realtime.
-
-\b The /O switch followed by a filename tells the compiler to print its log to that file (instead of the screen)
-
-\b /PAUSE makes makensis pause before quitting, which is useful when executing directly from Windows.
-
-\b /NOCONFIG disables inclusion of nsisconf.nsh. Without this parameter, installer defaults are set from nsisconf.nsh.
-
-\b /CMDHELP prints basic usage information for command (if specified), or all commands (if command is not specified).
-
-\b /HDRINFO prints out information on what options were used to compile makensis was compiled with.
-
-\b /NOCD disables the current directory change to that of the .nsi file
-
-\b Using the /D switch one or more times will add to symbols to the globally defined list (See !define).
-
-\b Using the /X switch one or more times will execute the code you specify following it. Example: "/XAutoCloseWindow false"
-
-\b Specifying a dash (-) for the script name will tell makensis to use the standard input as a source.
-
-\S1{usagenotes} Notes
-
-\b Parameters are processed by order. \c{makensis /Ddef script.nsi} is not the same as \c{makensis script.nsi /Ddef}.
-
-\b If multiple scripts are specified, they are treated as one concatenated script.
-
-\b On Windows 95, 98 and NT, below normal and above normal process priorities are not available. On those systems, below normal will actually set priority to idle and above normal will set to high.
-
-\S1{usageenvironment} Environment variables
-
-makensis checks a number of environment variables that tell it where to locate the things it needs in order to create installers. These variables include:
-
-\b NSISDIR, NSISCONFDIR - Places where nsis data and config files are installed. NSISDIR alters the script variable $\{NSISDIR\}. See \k{varconstant} for more info.
-
-\b APPDATA (on Windows) or HOME (on other platforms) - Location of the per-user configuration file.
-
-\S1{usageexamples} Examples
-
-Basic usage:
-
-\c makensis.exe myscript.nsi
-
-Quiet mode:
-
-\c makensis.exe /V1 myscript.nsi
-
-Force compressor:
-
-\c makensis.exe /X"SetCompressor /FINAL lzma" myscript.nsi
-
-Change script behavior:
-
-\c makensis.exe /DUSE_UPX /DVERSION=1.337 /DNO_IMAGES myscript.nsi
-
-Parameters order:
-
-\c makensis /XSection sectioncontents.nsi /XSectionEnd
-
-\H{installerusage} Installer Usage
-
-Generated installers and uninstallers accept a few options on the command line. These options give the user a bit more control over the installation process.
-
-\S1{} Common Options
-
-\b /NCRC disables the CRC check, unless \c{\R{acrccheck}{CRCCheck} force} was used in the script.
-
-\b /S runs the installer or uninstaller silently. See \k{silent} for more information.
-
-\b /D sets the default installation directory (\R{varother}{$INSTDIR}), overriding \R{ainstalldir}{InstallDir} and \R{ainstalldirregkey}{InstallDirRegKey}. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces.
-
-\S1{} Uninstaller Specific Options
-
-\b _?= sets $INSTDIR. It also stops the uninstaller from copying itself to the temporary directory and running from there. It can be used along with \R{execwait}{ExecWait} to wait for the uninstaller to finish. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces.
-
-\S1{} Examples
-
-\c installer.exe /NCRC
-
-\c installer.exe /S
-
-\c installer.exe /D=C:\Program Files\NSIS
-
-\c installer.exe /NCRC /S /D=C:\Program Files\NSIS
-
-\c uninstaller.exe /S _?=C:\Program Files\NSIS
-
-\c # uninstall old version
-\c ExecWait '"$INSTDIR\uninstaller.exe" /S _?=$INSTDIR'
+\C{cmdlineusage} Command Line Usage
+
+\H{usage} MakeNSIS Usage
+
+NSIS installers are generated by using the 'MakeNSIS' program to compile a NSIS script (.NSI) into an installer executable.
+The NSIS development kit installer sets up your computer so that you can compile a .nsi file by simply right-clicking on it in explorer, and selecting 'compile'.
+
+If you want to use MakeNSIS on the command line, the syntax of the makensis command is:
+
+\c makensis [option | script.nsi | - [...]]
+
+\S1{usagereference} Options
+
+\b /LICENSE displays a keen license page.
+
+\b The /V switch followed by a number between 0 and 4 will set the verbosity of output accordingly. 0=no output, 1=errors only, 2=warnings and errors, 3=info, warnings, and errors, 4=all output.
+
+\b The /P switch followed by a number between 0 and 5 will set the priority of the compiler process accordingly. 0=idle, 1=below normal, 2=normal (default), 3=above normal, 4=high, 5=realtime.
+
+\b The /O switch followed by a filename tells the compiler to print its log to that file (instead of the screen)
+
+\b /PAUSE makes makensis pause before quitting, which is useful when executing directly from Windows.
+
+\b /NOCONFIG disables inclusion of nsisconf.nsh. Without this parameter, installer defaults are set from nsisconf.nsh.
+
+\b /CMDHELP prints basic usage information for command (if specified), or all commands (if command is not specified).
+
+\b /HDRINFO prints out information on what options were used to compile makensis was compiled with.
+
+\b /NOCD disables the current directory change to that of the .nsi file
+
+\b Using the /D switch one or more times will add to symbols to the globally defined list (See !define).
+
+\b Using the /X switch one or more times will execute the code you specify following it. Example: "/XAutoCloseWindow false"
+
+\b Specifying a dash (-) for the script name will tell makensis to use the standard input as a source.
+
+\S1{usagenotes} Notes
+
+\b Parameters are processed by order. \c{makensis /Ddef script.nsi} is not the same as \c{makensis script.nsi /Ddef}.
+
+\b If multiple scripts are specified, they are treated as one concatenated script.
+
+\b On Windows 95, 98 and NT, below normal and above normal process priorities are not available. On those systems, below normal will actually set priority to idle and above normal will set to high.
+
+\S1{usageenvironment} Environment variables
+
+makensis checks a number of environment variables that tell it where to locate the things it needs in order to create installers. These variables include:
+
+\b NSISDIR, NSISCONFDIR - Places where nsis data and config files are installed. NSISDIR alters the script variable $\{NSISDIR\}. See \k{varconstant} for more info.
+
+\b APPDATA (on Windows) or HOME (on other platforms) - Location of the per-user configuration file.
+
+\S1{usageexamples} Examples
+
+Basic usage:
+
+\c makensis.exe myscript.nsi
+
+Quiet mode:
+
+\c makensis.exe /V1 myscript.nsi
+
+Force compressor:
+
+\c makensis.exe /X"SetCompressor /FINAL lzma" myscript.nsi
+
+Change script behavior:
+
+\c makensis.exe /DUSE_UPX /DVERSION=1.337 /DNO_IMAGES myscript.nsi
+
+Parameters order:
+
+\c makensis /XSection sectioncontents.nsi /XSectionEnd
+
+\H{installerusage} Installer Usage
+
+Generated installers and uninstallers accept a few options on the command line. These options give the user a bit more control over the installation process.
+
+\S1{} Common Options
+
+\b /NCRC disables the CRC check, unless \c{\R{acrccheck}{CRCCheck} force} was used in the script.
+
+\b /S runs the installer or uninstaller silently. See \k{silent} for more information.
+
+\b /D sets the default installation directory (\R{varother}{$INSTDIR}), overriding \R{ainstalldir}{InstallDir} and \R{ainstalldirregkey}{InstallDirRegKey}. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces.
+
+\S1{} Uninstaller Specific Options
+
+\b _?= sets $INSTDIR. It also stops the uninstaller from copying itself to the temporary directory and running from there. It can be used along with \R{execwait}{ExecWait} to wait for the uninstaller to finish. It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces.
+
+\S1{} Examples
+
+\c installer.exe /NCRC
+
+\c installer.exe /S
+
+\c installer.exe /D=C:\Program Files\NSIS
+
+\c installer.exe /NCRC /S /D=C:\Program Files\NSIS
+
+\c uninstaller.exe /S _?=C:\Program Files\NSIS
+
+\c # uninstall old version
+\c ExecWait '"$INSTDIR\uninstaller.exe" /S _?=$INSTDIR'
diff --git a/Docs/src/usection.but b/Docs/src/usection.but
index 55f4490..795b14c 100755
--- a/Docs/src/usection.but
+++ b/Docs/src/usection.but
@@ -1,14 +1,14 @@
-\S1{UninstallSection} Uninstall Section
-
-A special Section named 'Uninstall' must be created in order to generate an uninstaller. This section should remove all files, registry keys etc etc that were installed by the installer, from the system. Here is an example of a simple uninstall section:
-
-\c Section "Uninstall"
-\c Delete $INSTDIR\Uninst.exe ; delete self (see explanation below why this works)
-\c Delete $INSTDIR\myApp.exe
-\c RMDir $INSTDIR
-\c DeleteRegKey HKLM SOFTWARE\myApp
-\c SectionEnd
-
-The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.
-
-Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \\<b\\>not\\</b\\> necessarily contain the same value it contained in the installer.
+\S1{UninstallSection} Uninstall Section
+
+A special Section named 'Uninstall' must be created in order to generate an uninstaller. This section should remove all files, registry keys etc etc that were installed by the installer, from the system. Here is an example of a simple uninstall section:
+
+\c Section "Uninstall"
+\c Delete $INSTDIR\Uninst.exe ; delete self (see explanation below why this works)
+\c Delete $INSTDIR\myApp.exe
+\c RMDir $INSTDIR
+\c DeleteRegKey HKLM SOFTWARE\myApp
+\c SectionEnd
+
+The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.
+
+Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \\<b\\>not\\</b\\> necessarily contain the same value it contained in the installer.
diff --git a/Docs/src/usefulfunc.but b/Docs/src/usefulfunc.but
index e2437d3..f38e344 100755
--- a/Docs/src/usefulfunc.but
+++ b/Docs/src/usefulfunc.but
@@ -1,417 +1,417 @@
-\A{usefulfunctions} Useful Scripts
-
-\H{getparent} Get parent directory
-
-\c ; GetParent
-\c ; input, top of stack (e.g. C:\Program Files\Poop)
-\c ; output, top of stack (replaces, with e.g. C:\Program Files)
-\c ; modifies no other variables.
-\c ;
-\c ; Usage:
-\c ; Push "C:\Program Files\Directory\Whatever"
-\c ; Call GetParent
-\c ; Pop $R0
-\c ; ; at this point $R0 will equal "C:\Program Files\Directory"
-\c
-\c Function GetParent
-\c
-\c Exch $R0
-\c Push $R1
-\c Push $R2
-\c Push $R3
-\c
-\c StrCpy $R1 0
-\c StrLen $R2 $R0
-\c
-\c loop:
-\c IntOp $R1 $R1 + 1
-\c IntCmp $R1 $R2 get 0 get
-\c StrCpy $R3 $R0 1 -$R1
-\c StrCmp $R3 "\" get
-\c Goto loop
-\c
-\c get:
-\c StrCpy $R0 $R0 -$R1
-\c
-\c Pop $R3
-\c Pop $R2
-\c Pop $R1
-\c Exch $R0
-\c
-\c FunctionEnd
-
-\H{trimnewlines} Trim newlines
-
-\c ; TrimNewlines
-\c ; input, top of stack (e.g. whatever$\r$\n)
-\c ; output, top of stack (replaces, with e.g. whatever)
-\c ; modifies no other variables.
-\c
-\c Function TrimNewlines
-\c Exch $R0
-\c Push $R1
-\c Push $R2
-\c StrCpy $R1 0
-\c
-\c loop:
-\c IntOp $R1 $R1 - 1
-\c StrCpy $R2 $R0 1 $R1
-\c StrCmp $R2 "$\r" loop
-\c StrCmp $R2 "$\n" loop
-\c IntOp $R1 $R1 + 1
-\c IntCmp $R1 0 no_trim_needed
-\c StrCpy $R0 $R0 $R1
-\c
-\c no_trim_needed:
-\c Pop $R2
-\c Pop $R1
-\c Exch $R0
-\c FunctionEnd
-
-
-\H{getparameters} Get command line parameters
-
-\c ; GetParameters
-\c ; input, none
-\c ; output, top of stack (replaces, with e.g. whatever)
-\c ; modifies no other variables.
-\c
-\c Function GetParameters
-\c
-\c Push $R0
-\c Push $R1
-\c Push $R2
-\c Push $R3
-\c
-\c StrCpy $R2 1
-\c StrLen $R3 $CMDLINE
-\c
-\c ;Check for quote or space
-\c StrCpy $R0 $CMDLINE $R2
-\c StrCmp $R0 '"' 0 +3
-\c StrCpy $R1 '"'
-\c Goto loop
-\c StrCpy $R1 " "
-\c
-\c loop:
-\c IntOp $R2 $R2 + 1
-\c StrCpy $R0 $CMDLINE 1 $R2
-\c StrCmp $R0 $R1 get
-\c StrCmp $R2 $R3 get
-\c Goto loop
-\c
-\c get:
-\c IntOp $R2 $R2 + 1
-\c StrCpy $R0 $CMDLINE 1 $R2
-\c StrCmp $R0 " " get
-\c StrCpy $R0 $CMDLINE "" $R2
-\c
-\c Pop $R3
-\c Pop $R2
-\c Pop $R1
-\c Exch $R0
-\c
-\c FunctionEnd
-
-\H{strstr} Search in a string
-
-\c ; StrStr
-\c ; input, top of stack = string to search for
-\c ; top of stack-1 = string to search in
-\c ; output, top of stack (replaces with the portion of the string remaining)
-\c ; modifies no other variables.
-\c ;
-\c ; Usage:
-\c ; Push "this is a long ass string"
-\c ; Push "ass"
-\c ; Call StrStr
-\c ; Pop $R0
-\c ; ($R0 at this point is "ass string")
-\c
-\c Function StrStr
-\c Exch $R1 ; st=haystack,old$R1, $R1=needle
-\c Exch ; st=old$R1,haystack
-\c Exch $R2 ; st=old$R1,old$R2, $R2=haystack
-\c Push $R3
-\c Push $R4
-\c Push $R5
-\c StrLen $R3 $R1
-\c StrCpy $R4 0
-\c ; $R1=needle
-\c ; $R2=haystack
-\c ; $R3=len(needle)
-\c ; $R4=cnt
-\c ; $R5=tmp
-\c loop:
-\c StrCpy $R5 $R2 $R3 $R4
-\c StrCmp $R5 $R1 done
-\c StrCmp $R5 "" done
-\c IntOp $R4 $R4 + 1
-\c Goto loop
-\c done:
-\c StrCpy $R1 $R2 "" $R4
-\c Pop $R5
-\c Pop $R4
-\c Pop $R3
-\c Pop $R2
-\c Exch $R1
-\c FunctionEnd
-
-\H{getwindowsversion} Get Windows version
-
-\c ; GetWindowsVersion
-\c ;
-\c ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
-\c ; Updated by Joost Verburg
-\c ;
-\c ; Returns on top of stack
-\c ;
-\c ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, Vista)
-\c ; or
-\c ; '' (Unknown Windows Version)
-\c ;
-\c ; Usage:
-\c ; Call GetWindowsVersion
-\c ; Pop $R0
-\c ; ; at this point $R0 is "NT 4.0" or whatnot
-\c
-\c Function GetWindowsVersion
-\c
-\c Push $R0
-\c Push $R1
-\c
-\c ClearErrors
-\c
-\c ReadRegStr $R0 HKLM \
-\c "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
-\c
-\c IfErrors 0 lbl_winnt
-\c
-\c ; we are not NT
-\c ReadRegStr $R0 HKLM \
-\c "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
-\c
-\c StrCpy $R1 $R0 1
-\c StrCmp $R1 '4' 0 lbl_error
-\c
-\c StrCpy $R1 $R0 3
-\c
-\c StrCmp $R1 '4.0' lbl_win32_95
-\c StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
-\c
-\c lbl_win32_95:
-\c StrCpy $R0 '95'
-\c Goto lbl_done
-\c
-\c lbl_win32_98:
-\c StrCpy $R0 '98'
-\c Goto lbl_done
-\c
-\c lbl_win32_ME:
-\c StrCpy $R0 'ME'
-\c Goto lbl_done
-\c
-\c lbl_winnt:
-\c
-\c StrCpy $R1 $R0 1
-\c
-\c StrCmp $R1 '3' lbl_winnt_x
-\c StrCmp $R1 '4' lbl_winnt_x
-\c
-\c StrCpy $R1 $R0 3
-\c
-\c StrCmp $R1 '5.0' lbl_winnt_2000
-\c StrCmp $R1 '5.1' lbl_winnt_XP
-\c StrCmp $R1 '5.2' lbl_winnt_2003
-\c StrCmp $R1 '6.0' lbl_winnt_vista lbl_error
-\c
-\c lbl_winnt_x:
-\c StrCpy $R0 "NT $R0" 6
-\c Goto lbl_done
-\c
-\c lbl_winnt_2000:
-\c Strcpy $R0 '2000'
-\c Goto lbl_done
-\c
-\c lbl_winnt_XP:
-\c Strcpy $R0 'XP'
-\c Goto lbl_done
-\c
-\c lbl_winnt_2003:
-\c Strcpy $R0 '2003'
-\c Goto lbl_done
-\c
-\c lbl_winnt_vista:
-\c Strcpy $R0 'Vista'
-\c Goto lbl_done
-\c
-\c lbl_error:
-\c Strcpy $R0 ''
-\c lbl_done:
-\c
-\c Pop $R1
-\c Exch $R0
-\c
-\c FunctionEnd
-
-
-\H{getieversion} Get Internet Explorer version
-
-\c ; GetIEVersion
-\c ;
-\c ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
-\c ; Returns on top of stack
-\c ; 1-6 (Installed IE Version)
-\c ; or
-\c ; '' (IE is not installed)
-\c ;
-\c ; Usage:
-\c ; Call GetIEVersion
-\c ; Pop $R0
-\c ; ; at this point $R0 is "5" or whatnot
-\c
-\c Function GetIEVersion
-\c Push $R0
-\c ClearErrors
-\c ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "Version"
-\c IfErrors lbl_123 lbl_456
-\c
-\c lbl_456: ; ie 4+
-\c Strcpy $R0 $R0 1
-\c Goto lbl_done
-\c
-\c lbl_123: ; older ie version
-\c ClearErrors
-\c ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "IVer"
-\c IfErrors lbl_error
-\c
-\c StrCpy $R0 $R0 3
-\c StrCmp $R0 '100' lbl_ie1
-\c StrCmp $R0 '101' lbl_ie2
-\c StrCmp $R0 '102' lbl_ie2
-\c
-\c StrCpy $R0 '3' ; default to ie3 if not 100, 101, or 102.
-\c Goto lbl_done
-\c lbl_ie1:
-\c StrCpy $R0 '1'
-\c Goto lbl_done
-\c lbl_ie2:
-\c StrCpy $R0 '2'
-\c Goto lbl_done
-\c lbl_error:
-\c StrCpy $R0 ''
-\c lbl_done:
-\c Exch $R0
-\c FunctionEnd
-
-\H{detect.netframework} Is .NET Framework installed?
-
-\c ; IsDotNETInstalled
-\c ;
-\c ; Based on GetDotNETVersion
-\c ; http://nsis.sourceforge.net/Get_.NET_Version
-\c ;
-\c ; Usage:
-\c ; Call IsDotNETInstalled
-\c ; Pop $0
-\c ; StrCmp $0 1 found.NETFramework no.NETFramework
-\c
-\c Function IsDotNETInstalled
-\c Push $0
-\c Push $1
-\c
-\c StrCpy $0 1
-\c System::Call "mscoree::GetCORVersion(w, i ${NSIS_MAX_STRLEN}, *i) i .r1"
-\c StrCmp $1 0 +2
-\c StrCpy $0 0
-\c
-\c Pop $1
-\c Exch $0
-\c FunctionEnd
-
-\H{isflashinstalled} Is Macromedia Flash Player installed?
-
-\c ; IsFlashInstalled
-\c ;
-\c ; By Yazno, http://yazno.tripod.com/powerpimpit/
-\c ; Returns on top of stack
-\c ; 0 (Flash is not installed)
-\c ; or
-\c ; 1 (Flash is installed)
-\c ;
-\c ; Usage:
-\c ; Call IsFlashInstalled
-\c ; Pop $R0
-\c ; ; $R0 at this point is "1" or "0"
-\c
-\c Function IsFlashInstalled
-\c Push $R0
-\c ClearErrors
-\c ReadRegStr $R0 HKCR "CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}" ""
-\c IfErrors lbl_na
-\c StrCpy $R0 1
-\c Goto lbl_end
-\c lbl_na:
-\c StrCpy $R0 0
-\c lbl_end:
-\c Exch $R0
-\c FunctionEnd
-
-\H{connectinternet} Connect to the Internet
-
-\c ; ConnectInternet (uses Dialer plug-in)
-\c ; Written by Joost Verburg
-\c ;
-\c ; This function attempts to make a connection to the internet if there is no
-\c ; connection available. If you are not sure that a system using the installer
-\c ; has an active internet connection, call this function before downloading
-\c ; files with NSISdl.
-\c ;
-\c ; The function requires Internet Explorer 3, but asks to connect manually if
-\c ; IE3 is not installed.
-\c
-\c Function ConnectInternet
-\c
-\c Push $R0
-\c
-\c ClearErrors
-\c Dialer::AttemptConnect
-\c IfErrors noie3
-\c
-\c Pop $R0
-\c StrCmp $R0 "online" connected
-\c MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
-\c Quit ;This will quit the installer. You might want to add your own error handling.
-\c
-\c noie3:
-\c
-\c ; IE3 not installed
-\c MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
-\c
-\c connected:
-\c
-\c Pop $R0
-\c
-\c FunctionEnd
-
-\H{installerfilename} Get Installer Filename
-
-\c System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
-\c ;$R0 will contain the installer filename
-
-\H{multipleinstances} Prevent Multiple Instances
-
-Put the following code in your \R{oninit}{.onInit function}:
-
-\c System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
-\c Pop $R0
-\c
-\c StrCmp $R0 0 +3
-\c MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
-\c Abort
-
-'myMutex' should be replaced by a unique value.
-
-\H{morefuncs} More
-
+\A{usefulfunctions} Useful Scripts
+
+\H{getparent} Get parent directory
+
+\c ; GetParent
+\c ; input, top of stack (e.g. C:\Program Files\Poop)
+\c ; output, top of stack (replaces, with e.g. C:\Program Files)
+\c ; modifies no other variables.
+\c ;
+\c ; Usage:
+\c ; Push "C:\Program Files\Directory\Whatever"
+\c ; Call GetParent
+\c ; Pop $R0
+\c ; ; at this point $R0 will equal "C:\Program Files\Directory"
+\c
+\c Function GetParent
+\c
+\c Exch $R0
+\c Push $R1
+\c Push $R2
+\c Push $R3
+\c
+\c StrCpy $R1 0
+\c StrLen $R2 $R0
+\c
+\c loop:
+\c IntOp $R1 $R1 + 1
+\c IntCmp $R1 $R2 get 0 get
+\c StrCpy $R3 $R0 1 -$R1
+\c StrCmp $R3 "\" get
+\c Goto loop
+\c
+\c get:
+\c StrCpy $R0 $R0 -$R1
+\c
+\c Pop $R3
+\c Pop $R2
+\c Pop $R1
+\c Exch $R0
+\c
+\c FunctionEnd
+
+\H{trimnewlines} Trim newlines
+
+\c ; TrimNewlines
+\c ; input, top of stack (e.g. whatever$\r$\n)
+\c ; output, top of stack (replaces, with e.g. whatever)
+\c ; modifies no other variables.
+\c
+\c Function TrimNewlines
+\c Exch $R0
+\c Push $R1
+\c Push $R2
+\c StrCpy $R1 0
+\c
+\c loop:
+\c IntOp $R1 $R1 - 1
+\c StrCpy $R2 $R0 1 $R1
+\c StrCmp $R2 "$\r" loop
+\c StrCmp $R2 "$\n" loop
+\c IntOp $R1 $R1 + 1
+\c IntCmp $R1 0 no_trim_needed
+\c StrCpy $R0 $R0 $R1
+\c
+\c no_trim_needed:
+\c Pop $R2
+\c Pop $R1
+\c Exch $R0
+\c FunctionEnd
+
+
+\H{getparameters} Get command line parameters
+
+\c ; GetParameters
+\c ; input, none
+\c ; output, top of stack (replaces, with e.g. whatever)
+\c ; modifies no other variables.
+\c
+\c Function GetParameters
+\c
+\c Push $R0
+\c Push $R1
+\c Push $R2
+\c Push $R3
+\c
+\c StrCpy $R2 1
+\c StrLen $R3 $CMDLINE
+\c
+\c ;Check for quote or space
+\c StrCpy $R0 $CMDLINE $R2
+\c StrCmp $R0 '"' 0 +3
+\c StrCpy $R1 '"'
+\c Goto loop
+\c StrCpy $R1 " "
+\c
+\c loop:
+\c IntOp $R2 $R2 + 1
+\c StrCpy $R0 $CMDLINE 1 $R2
+\c StrCmp $R0 $R1 get
+\c StrCmp $R2 $R3 get
+\c Goto loop
+\c
+\c get:
+\c IntOp $R2 $R2 + 1
+\c StrCpy $R0 $CMDLINE 1 $R2
+\c StrCmp $R0 " " get
+\c StrCpy $R0 $CMDLINE "" $R2
+\c
+\c Pop $R3
+\c Pop $R2
+\c Pop $R1
+\c Exch $R0
+\c
+\c FunctionEnd
+
+\H{strstr} Search in a string
+
+\c ; StrStr
+\c ; input, top of stack = string to search for
+\c ; top of stack-1 = string to search in
+\c ; output, top of stack (replaces with the portion of the string remaining)
+\c ; modifies no other variables.
+\c ;
+\c ; Usage:
+\c ; Push "this is a long ass string"
+\c ; Push "ass"
+\c ; Call StrStr
+\c ; Pop $R0
+\c ; ($R0 at this point is "ass string")
+\c
+\c Function StrStr
+\c Exch $R1 ; st=haystack,old$R1, $R1=needle
+\c Exch ; st=old$R1,haystack
+\c Exch $R2 ; st=old$R1,old$R2, $R2=haystack
+\c Push $R3
+\c Push $R4
+\c Push $R5
+\c StrLen $R3 $R1
+\c StrCpy $R4 0
+\c ; $R1=needle
+\c ; $R2=haystack
+\c ; $R3=len(needle)
+\c ; $R4=cnt
+\c ; $R5=tmp
+\c loop:
+\c StrCpy $R5 $R2 $R3 $R4
+\c StrCmp $R5 $R1 done
+\c StrCmp $R5 "" done
+\c IntOp $R4 $R4 + 1
+\c Goto loop
+\c done:
+\c StrCpy $R1 $R2 "" $R4
+\c Pop $R5
+\c Pop $R4
+\c Pop $R3
+\c Pop $R2
+\c Exch $R1
+\c FunctionEnd
+
+\H{getwindowsversion} Get Windows version
+
+\c ; GetWindowsVersion
+\c ;
+\c ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
+\c ; Updated by Joost Verburg
+\c ;
+\c ; Returns on top of stack
+\c ;
+\c ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, Vista)
+\c ; or
+\c ; '' (Unknown Windows Version)
+\c ;
+\c ; Usage:
+\c ; Call GetWindowsVersion
+\c ; Pop $R0
+\c ; ; at this point $R0 is "NT 4.0" or whatnot
+\c
+\c Function GetWindowsVersion
+\c
+\c Push $R0
+\c Push $R1
+\c
+\c ClearErrors
+\c
+\c ReadRegStr $R0 HKLM \
+\c "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+\c
+\c IfErrors 0 lbl_winnt
+\c
+\c ; we are not NT
+\c ReadRegStr $R0 HKLM \
+\c "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
+\c
+\c StrCpy $R1 $R0 1
+\c StrCmp $R1 '4' 0 lbl_error
+\c
+\c StrCpy $R1 $R0 3
+\c
+\c StrCmp $R1 '4.0' lbl_win32_95
+\c StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
+\c
+\c lbl_win32_95:
+\c StrCpy $R0 '95'
+\c Goto lbl_done
+\c
+\c lbl_win32_98:
+\c StrCpy $R0 '98'
+\c Goto lbl_done
+\c
+\c lbl_win32_ME:
+\c StrCpy $R0 'ME'
+\c Goto lbl_done
+\c
+\c lbl_winnt:
+\c
+\c StrCpy $R1 $R0 1
+\c
+\c StrCmp $R1 '3' lbl_winnt_x
+\c StrCmp $R1 '4' lbl_winnt_x
+\c
+\c StrCpy $R1 $R0 3
+\c
+\c StrCmp $R1 '5.0' lbl_winnt_2000
+\c StrCmp $R1 '5.1' lbl_winnt_XP
+\c StrCmp $R1 '5.2' lbl_winnt_2003
+\c StrCmp $R1 '6.0' lbl_winnt_vista lbl_error
+\c
+\c lbl_winnt_x:
+\c StrCpy $R0 "NT $R0" 6
+\c Goto lbl_done
+\c
+\c lbl_winnt_2000:
+\c Strcpy $R0 '2000'
+\c Goto lbl_done
+\c
+\c lbl_winnt_XP:
+\c Strcpy $R0 'XP'
+\c Goto lbl_done
+\c
+\c lbl_winnt_2003:
+\c Strcpy $R0 '2003'
+\c Goto lbl_done
+\c
+\c lbl_winnt_vista:
+\c Strcpy $R0 'Vista'
+\c Goto lbl_done
+\c
+\c lbl_error:
+\c Strcpy $R0 ''
+\c lbl_done:
+\c
+\c Pop $R1
+\c Exch $R0
+\c
+\c FunctionEnd
+
+
+\H{getieversion} Get Internet Explorer version
+
+\c ; GetIEVersion
+\c ;
+\c ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
+\c ; Returns on top of stack
+\c ; 1-6 (Installed IE Version)
+\c ; or
+\c ; '' (IE is not installed)
+\c ;
+\c ; Usage:
+\c ; Call GetIEVersion
+\c ; Pop $R0
+\c ; ; at this point $R0 is "5" or whatnot
+\c
+\c Function GetIEVersion
+\c Push $R0
+\c ClearErrors
+\c ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "Version"
+\c IfErrors lbl_123 lbl_456
+\c
+\c lbl_456: ; ie 4+
+\c Strcpy $R0 $R0 1
+\c Goto lbl_done
+\c
+\c lbl_123: ; older ie version
+\c ClearErrors
+\c ReadRegStr $R0 HKLM "Software\Microsoft\Internet Explorer" "IVer"
+\c IfErrors lbl_error
+\c
+\c StrCpy $R0 $R0 3
+\c StrCmp $R0 '100' lbl_ie1
+\c StrCmp $R0 '101' lbl_ie2
+\c StrCmp $R0 '102' lbl_ie2
+\c
+\c StrCpy $R0 '3' ; default to ie3 if not 100, 101, or 102.
+\c Goto lbl_done
+\c lbl_ie1:
+\c StrCpy $R0 '1'
+\c Goto lbl_done
+\c lbl_ie2:
+\c StrCpy $R0 '2'
+\c Goto lbl_done
+\c lbl_error:
+\c StrCpy $R0 ''
+\c lbl_done:
+\c Exch $R0
+\c FunctionEnd
+
+\H{detect.netframework} Is .NET Framework installed?
+
+\c ; IsDotNETInstalled
+\c ;
+\c ; Based on GetDotNETVersion
+\c ; http://nsis.sourceforge.net/Get_.NET_Version
+\c ;
+\c ; Usage:
+\c ; Call IsDotNETInstalled
+\c ; Pop $0
+\c ; StrCmp $0 1 found.NETFramework no.NETFramework
+\c
+\c Function IsDotNETInstalled
+\c Push $0
+\c Push $1
+\c
+\c StrCpy $0 1
+\c System::Call "mscoree::GetCORVersion(w, i ${NSIS_MAX_STRLEN}, *i) i .r1"
+\c StrCmp $1 0 +2
+\c StrCpy $0 0
+\c
+\c Pop $1
+\c Exch $0
+\c FunctionEnd
+
+\H{isflashinstalled} Is Macromedia Flash Player installed?
+
+\c ; IsFlashInstalled
+\c ;
+\c ; By Yazno, http://yazno.tripod.com/powerpimpit/
+\c ; Returns on top of stack
+\c ; 0 (Flash is not installed)
+\c ; or
+\c ; 1 (Flash is installed)
+\c ;
+\c ; Usage:
+\c ; Call IsFlashInstalled
+\c ; Pop $R0
+\c ; ; $R0 at this point is "1" or "0"
+\c
+\c Function IsFlashInstalled
+\c Push $R0
+\c ClearErrors
+\c ReadRegStr $R0 HKCR "CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}" ""
+\c IfErrors lbl_na
+\c StrCpy $R0 1
+\c Goto lbl_end
+\c lbl_na:
+\c StrCpy $R0 0
+\c lbl_end:
+\c Exch $R0
+\c FunctionEnd
+
+\H{connectinternet} Connect to the Internet
+
+\c ; ConnectInternet (uses Dialer plug-in)
+\c ; Written by Joost Verburg
+\c ;
+\c ; This function attempts to make a connection to the internet if there is no
+\c ; connection available. If you are not sure that a system using the installer
+\c ; has an active internet connection, call this function before downloading
+\c ; files with NSISdl.
+\c ;
+\c ; The function requires Internet Explorer 3, but asks to connect manually if
+\c ; IE3 is not installed.
+\c
+\c Function ConnectInternet
+\c
+\c Push $R0
+\c
+\c ClearErrors
+\c Dialer::AttemptConnect
+\c IfErrors noie3
+\c
+\c Pop $R0
+\c StrCmp $R0 "online" connected
+\c MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
+\c Quit ;This will quit the installer. You might want to add your own error handling.
+\c
+\c noie3:
+\c
+\c ; IE3 not installed
+\c MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
+\c
+\c connected:
+\c
+\c Pop $R0
+\c
+\c FunctionEnd
+
+\H{installerfilename} Get Installer Filename
+
+\c System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
+\c ;$R0 will contain the installer filename
+
+\H{multipleinstances} Prevent Multiple Instances
+
+Put the following code in your \R{oninit}{.onInit function}:
+
+\c System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
+\c Pop $R0
+\c
+\c StrCmp $R0 0 +3
+\c MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
+\c Abort
+
+'myMutex' should be replaced by a unique value.
+
+\H{morefuncs} More
+
You can find more useful scripts at \W{http://nsis.sourceforge.net/wiki/}{the NSIS Wiki}, \W{http://forums.winamp.com/forumdisplay.php?s=&forumid=65}{the NSIS forum} and \W{http://nsis.sourceforge.net/}{NSIS development page}. \ No newline at end of file
diff --git a/Docs/src/usefulinfos.but b/Docs/src/usefulinfos.but
index 222ed51..0408222 100755
--- a/Docs/src/usefulinfos.but
+++ b/Docs/src/usefulinfos.but
@@ -1,399 +1,399 @@
-\A{usefulinfos} Useful Information
-
-\H{errorlevels}Error Levels
-
-Like other applications, installers made by NSIS return error levels as a result of their execution. Checking the error level can be useful if you call an NSIS installer from another application or installer.
-
-\b 0 - Normal execution (no error)
-
-\b 1 - Installation aborted by user (cancel button)
-
-\b 2 - Installation aborted by script
-
-As of NSIS 2.01, you can set the error level to other values using \R{seterrorlevel}{SetErrorLevel}.
-
-Note that uninstallers copy themselves to the temporary directory and execute from there so the original uninstaller can be deleted. This means the error level the uninstaller sets is not available to the executing process, unless it simulates this copy process and executes the copied uninstaller. To simulate this process, use:
-
-\c CopyFiles $INSTDIR\uninstaller.exe $TEMP
-\c ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
-\c DetailPrint "uninstaller set error level $0"
-
-If you don't do this, you'll only be able to know if the uninstaller failed copying itself to the temporary directory.
-
-\H{useful_add_uninst_infos}Add uninstall information to Add/Remove Programs
-
-Create a key with your product name under \\<b\\>HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\</b\\> to add entries to the "Add/Remove Programs" section in the Control Panel.
-For Windows NT (NT4/2000/XP), it's also possible to create the key in the HKCU hive, so it will only appear for the current user.
-There are several values you can write to key to give information about your application and the uninstaller.
-Write a value using the WriteRegStr command (for strings) or WriteRegDWORD command (for DWORD values). Example:
-
-
-\c WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Product" "DisplayName" "Application Name"
-
-
-\\<b\\>Required values\\</b\\>
-
-\e{DisplayName} (string) - Name of the application \\<br\\>
-\e{UninstallString} (string) - Path and filename of the uninstaller. You should \\<b\\>always\\</b\\> quote the path to make sure spaces in the path will not disrupt Windows to find the uninstaller.
-
-\\<b\\>Optional values\\</b\\>
-
-Some of the following values will not be used by older Windows versions.
-
-\e{InstallLocation} (string) - Installation directory ($INSTDIR) \\<br\\>
-\e{DisplayIcon} (string) - Path, filename and index of the icon that will be displayed next to your application name
-
-\e{Publisher} (string) - (Company) name of the publisher
-
-\e{ModifyPath} (string) - Path and filename of the application modify program \\<br\\>
-\e{InstallSource} (string) - Location where the application was installed from
-
-\e{ProductID} (string) - Product ID of the application \\<br\\>
-\e{RegOwner} (string) - Registered owner of the application \\<br\\>
-\e{RegCompany} (string) - Registered company of the application
-
-\e{HelpLink} (string) - Link to the support website \\<br\\>
-\e{HelpTelephone} (string) - Telephone number for support
-
-\e{URLUpdateInfo} (string) - Link to the website for application updates \\<br\\>
-\e{URLInfoAbout} (string) - Link to the application home page
-
-\e{DisplayVersion} (string) - Displayed version of the application \\<br\\>
-\e{VersionMajor} (DWORD) - Major version number of the application \\<br\\>
-\e{VersionMinor} (DWORD) - Minor version number of the application
-
-\e{NoModify} (DWORD) - 1 if uninstaller has no option to modify the installed application \\<br\\>
-\e{NoRepair} (DWORD) - 1 if the uninstaller has no option to repair the installation
-
-If both NoModify and NoRepair are set to 1, the button displays "Remove" instead of "Modify/Remove".
-
-
-\H{useful_system_plugin} Calling an external DLL using the System.dll plug-in
-
-\\<b\\>Please note that the Call, Get and Debug functions cannot be compiled with GCC, so download the Windows version of NSIS and extract the System.dll plugin or write your own plugin that calls the functions you need.\\</b\\>
-
-Some install processes are required to call functions contained inside third party DLLs. A prime example of this is when installing a Palm(TM) conduit.
-
-\\<b\\>Some background about System.dll\\</b\\> \\<br\\>
-The System.dll plug-in (by Brainsucker) enables calling of external DLLs by providing the 'Call' function. There are a number of other functions provided by System.dll, but they will not be covered here. For more details about the other functions, lock the doors, take the phone off the hook, screw your head on *real* tight and head on over to the \L{../Docs/System/System.html}{System readme}.
-
-\\<u\\>Data Types\\</u\\> \\<br\\>
-System.dll recognises the following data types:
-
-\b v - void (generally for return)
-
-\b i - int (includes char, byte, short, handles, pointers and so on)
-
-\b l - long & large integer (known as int64)
-
-\b t - text, string (LPCSTR, pointer to first character)
-
-\b b - boolean (needs/returns 'true':'false') - by the fact this type is senseless -> usual integer can be used ('0':'1')
-
-\b k - callback. See Callback section in system.html.
-
-\b * - pointer specifier -> the proc needs the pointer to type, affects next char (parameter) [ex: '*i' - pointer to int]
-
-
-
-\\<u\\>Mapping System.dll variables to NSIS script variables\\</u\\> \\<br\\>
-There's not much point in being able to call an external function if you can't get any data back. System.dll maps function variables to NSIS script variables in the following way:
-
-NSIS $0..$9 become System.dll r0..r9
-NSIS $R0..$R9 become System.dll r10..r19
-
-Each parameter is specified by type, input and output. To skip input or output use a dot. Examples:
-
-String (pointer to a characters array), input is 'happy calling':
-
-\c t 'happy calling'
-
-String (pointer to a characters array), input is taken from $5 and changes to the array made by the call are saved into $R8:
-
-\c t r5R8
-
-Pointer to an integer, value taken from $1 and put into $2:
-
-\c *i r1r2
-
-Pointer to a 64-bit integer, output pushed on stack, no input:
-
-\c *l .s
-
-Using System.dll::Call
-To call a function in a third party DLL, the Call function is used like this:
-
-\c System::Call 'YourDllName::YourDllFunction(i, *i, t) i(r0, .r1, r2) .r3'
-
-The '(r0, .r1, r2) .r3' section at the end are the parameters that are passed between your DLL and your NSIS script. As can be seen in this parameters list type and input/output can be seperated. Each block of "(parms list) return value" overrides and/or adds to the last one. In this case, the first block specifies the types and the second specifies input and output.
-
-\\<b\\>Before starting to code the NSIS script\\</b\\> \\<br\\>
-Before you start to code any NSIS code, you need to know the full prototype of the function you are going to call. For the purposes of this example, we will use the 'CmGetHotSyncExecPath' function from the Palm 'CondMgr.dll'. This function is used to return the full path of 'HotSync.exe'.
-
-\\<u\\>Function Definition\\</u\\> \\<br\\>
-
-
-int CmGetHotSyncExecPath(TCHAR *pPath, int *piSize);
-
-where
-
-\b pPath is a pointer to a character buffer. Upon return, this is the path & file name of the installed HotSync manager.
-
-\b piSize is a pointer to an integer that specifies the size (in TCHAR's), of the buffer referenced by the pPath parameter.
-
-return values:
-
-\b 0: No error
-
-\b -1: A non-specific error occurred
-
-\b ERR_REGISTRY_ACCESS(-1006):Unable to access the Palm configuration entries
-
-\b ERR_BUFFER_TOO_SMALL(-1010): The buffer is too small to hold the requested information
-
-\b ERR_INVALID_POINTER(-1013):The specified pointer is not a valid pointer
-
-
-Also, if the buffer is too small the value in *int is the size (in TCHARs) that the buffer should be.
-
-This function definition maps to the following System.dll definition:
-
-CmGetHotSyncExecPath(t, *i) i
-
-i.e. It takes a text variable, a pointer to int, and returns an int value.
-
-\\<u\\>Using the external dll function\\</u\\> \\<br\\>
-Now that we've sorted out what the function does, and how it maps to the System.dll format, we can use the function in a NSIS script.
-
-First, it is recommended to turn 'PluginUnload' off before making multiple calls to System.dll. According to Brainsucker (and others), this will speed up execution of the installer package.
-
-Second, you have to change the output directory to that where the DLL you want to use is. It may also work if the DLL is on the system path, but this hasn't been tested.
-
-The following code fragment will install 'condmgr.dll' to a temporary directory, execute the CmGetHotSyncExecPath function, display returned data and finally unload the System.dll plug-in.
-Save this script
-
-\c ; **** snip ****
-\c SetPluginUnload alwaysoff
-\c
-\c Function loadDll
-\c
-\c SetOutPath $TEMP\eInspect ; create temp directory
-\c File bin\CondMgr.dll ; copy dll there
-\c StrCpy $1 ${NSIS_MAX_STRLEN} ; assign memory to $0
-\c System::Call 'CondMgr::CmGetHotSyncExecPath(t, *i) i(.r0, r1r1).r2'
-\c DetailPrint 'Path: "$0"'
-\c DetailPrint "Path length: $1"
-\c DetailPrint "Return value: $2"
-\c
-\c ; last plug-in call must not have /NOUNLOAD so NSIS will be able to delete
-\c ; the temporary DLL
-\c
-\c SetPluginUnload manual
-\c ; do nothing (but let the installer unload the System dll)
-\c System::Free 0
-\c FunctionEnd
-\c ; **** snip ****
-
-
-and this function produces the following output in the 'details' page:
-
-Output folder: c:\\windows\\TEMP\\eInspect \\<br\\>
-Extract: CondMgr.dll \\<br\\>
-Path: "C:\\Dave\\palm\\Hotsync.exe" \\<br\\>
-Path length: 24 \\<br\\>
-Return value: 0
-
-
-Written by \W{http://nsis.sourceforge.net/archive/profile.php?userid=78}{djc}
-
-\\<u\\>Acknowledgements & Thanks\\</u\\> \\<br\\>
-Lots of thanks go to \\<b\\>kichik\\</b\\> and \\<b\\>Sunjammer\\</b\\> for spending a lot of time assisting in solving this problem. Also to \\<b\\>brainsucker\\</b\\> for creating the System.dll plug-in in the first place.
-Good Luck!
-
-\H{dumplogtofile} Dump Content of Log Window to File
-
-This function will dump the log of the installer (installer details) to a file of your choice. I created this function for Afrow_UK who requested a way to dump the log to a file in \W{http://forums.winamp.com/showthread.php?s=&threadid=125431}{this forum thread}.
-
-To use it, push a file name and call it. It will dump the log to the file specified. For example:
-
-
-\c GetTempFileName $0
-\c Push $0
-\c Call DumpLog
-
-Here is the function:
-
-
-
-\c !define LVM_GETITEMCOUNT 0x1004
-\c !define LVM_GETITEMTEXT 0x102D
-\c
-\c Function DumpLog
-\c Exch $5
-\c Push $0
-\c Push $1
-\c Push $2
-\c Push $3
-\c Push $4
-\c Push $6
-\c
-\c FindWindow $0 "#32770" "" $HWNDPARENT
-\c GetDlgItem $0 $0 1016
-\c StrCmp $0 0 error
-\c FileOpen $5 $5 "w"
-\c StrCmp $5 0 error
-\c SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6
-\c System::Alloc ${NSIS_MAX_STRLEN}
-\c Pop $3
-\c StrCpy $2 0
-\c System::Call "*(i, i, i, i, i, i, i, i, i) i \
-\c (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1"
-\c loop: StrCmp $2 $6 done
-\c System::Call "User32::SendMessageA(i, i, i, i) i \
-\c ($0, ${LVM_GETITEMTEXT}, $2, r1)"
-\c System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)"
-\c FileWrite $5 "$4$\r$\n"
-\c IntOp $2 $2 + 1
-\c Goto loop
-\c done:
-\c FileClose $5
-\c System::Free $1
-\c System::Free $3
-\c Goto exit
-\c error:
-\c MessageBox MB_OK error
-\c exit:
-\c Pop $6
-\c Pop $4
-\c Pop $3
-\c Pop $2
-\c Pop $1
-\c Pop $0
-\c Exch $5
-\c FunctionEnd
-
-written by KiCHiK
-
-
-\H{readreg_multi_sz} How to Read REG_MULTI_SZ Values
-
-I wrote this script to help rpetges in \W{http://forums.winamp.com/showthread.php?s=&threadid=131154}{this forum thread}. It reads a registry value of the type REG_MULTI_SZ and prints it out. Don't forget to edit where it says "Edit this!" when you test this script. The values must point to a REG_MULTI_SZ value or the example will spit out an error.
-
-
-\c OutFile "REG_MULTI_SZ Reader.exe"
-\c
-\c Name "REG_MULTI_SZ Reader"
-\c
-\c ShowInstDetails show
-\c
-\c !define HKEY_CLASSES_ROOT 0x80000000
-\c !define HKEY_CURRENT_USER 0x80000001
-\c !define HKEY_LOCAL_MACHINE 0x80000002
-\c !define HKEY_USERS 0x80000003
-\c !define HKEY_PERFORMANCE_DATA 0x80000004
-\c !define HKEY_PERFORMANCE_TEXT 0x80000050
-\c !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
-\c !define HKEY_CURRENT_CONFIG 0x80000005
-\c !define HKEY_DYN_DATA 0x80000006
-\c
-\c !define KEY_QUERY_VALUE 0x0001
-\c !define KEY_ENUMERATE_SUB_KEYS 0x0008
-\c
-\c !define REG_NONE 0
-\c !define REG_SZ 1
-\c !define REG_EXPAND_SZ 2
-\c !define REG_BINARY 3
-\c !define REG_DWORD 4
-\c !define REG_DWORD_LITTLE_ENDIAN 4
-\c !define REG_DWORD_BIG_ENDIAN 5
-\c !define REG_LINK 6
-\c !define REG_MULTI_SZ 7
-\c
-\c !define RegOpenKeyEx "Advapi32::RegOpenKeyExA(i, t, i, i, *i) i"
-\c !define RegQueryValueEx "Advapi32::RegQueryValueExA(i, t, i, *i, i, *i) i"
-\c !define RegCloseKey "Advapi32::RegCloseKeyA(i) i"
-\c
-\c ####### Edit this!
-\c
-\c !define ROOT_KEY ${HKEY_CURRENT_USER}
-\c !define SUB_KEY "Software\Joe Software"
-\c !define VALUE "Strings"
-\c
-\c ####### Stop editing
-\c
-\c Section "Read"
-\c StrCpy $0 ""
-\c StrCpy $1 ""
-\c StrCpy $2 ""
-\c StrCpy $3 ""
-\c SetPluginUnload alwaysoff
-\c System::Call "${RegOpenKeyEx}(${ROOT_KEY}, '${SUB_KEY}', \
-\c 0, ${KEY_QUERY_VALUE}|${KEY_ENUMERATE_SUB_KEYS}, .r0) .r3"
-\c
-\c StrCmp $3 0 goon
-\c MessageBox MB_OK|MB_ICONSTOP "Can't open registry key! ($3)"
-\c Goto done
-\c goon:
-\c
-\c System::Call "${RegQueryValueEx}(r0, '${VALUE}', 0, .r1, 0, .r2) .r3"
-\c
-\c StrCmp $3 0 read
-\c MessageBox MB_OK|MB_ICONSTOP "Can't query registry value size! ($3)"
-\c Goto done
-\c
-\c read:
-\c
-\c StrCmp $1 ${REG_MULTI_SZ} multisz
-\c MessageBox MB_OK|MB_ICONSTOP "Registry value no REG_MULTI_SZ! ($3)"
-\c Goto done
-\c
-\c multisz:
-\c
-\c StrCmp $2 0 0 multiszalloc
-\c MessageBox MB_OK|MB_ICONSTOP "Registry value empty! ($3)"
-\c Goto done
-\c
-\c multiszalloc:
-\c
-\c System::Alloc $2
-\c Pop $1
-\c
-\c StrCmp $1 0 0 multiszget
-\c MessageBox MB_OK|MB_ICONSTOP "Can't allocate enough memory! ($3)"
-\c Goto done
-\c
-\c multiszget:
-\c
-\c System::Call "${RegQueryValueEx}(r0, '${VALUE}', 0, n, r1, r2) .r3"
-\c
-\c StrCmp $3 0 multiszprocess
-\c MessageBox MB_OK|MB_ICONSTOP "Can't query registry value data! ($3)"
-\c Goto done
-\c
-\c multiszprocess:
-\c
-\c StrCpy $4 $1
-\c
-\c loop:
-\c
-\c System::Call "*$4(&t${NSIS_MAX_STRLEN} .r3)"
-\c StrCmp $3 "" done
-\c DetailPrint $3
-\c StrLen $5 $3
-\c IntOp $4 $4 + $5
-\c IntOp $4 $4 + 1
-\c Goto loop
-\c
-\c done:
-\c
-\c System::Free $1
-\c
-\c StrCmp $0 0 noClose
-\c System::Call "${RegCloseKey}(r0)"
-\c
-\c noClose:
-\c
-\c SetPluginUnload manual
-\c SectionEnd
-
-written by KiCHiK
+\A{usefulinfos} Useful Information
+
+\H{errorlevels}Error Levels
+
+Like other applications, installers made by NSIS return error levels as a result of their execution. Checking the error level can be useful if you call an NSIS installer from another application or installer.
+
+\b 0 - Normal execution (no error)
+
+\b 1 - Installation aborted by user (cancel button)
+
+\b 2 - Installation aborted by script
+
+As of NSIS 2.01, you can set the error level to other values using \R{seterrorlevel}{SetErrorLevel}.
+
+Note that uninstallers copy themselves to the temporary directory and execute from there so the original uninstaller can be deleted. This means the error level the uninstaller sets is not available to the executing process, unless it simulates this copy process and executes the copied uninstaller. To simulate this process, use:
+
+\c CopyFiles $INSTDIR\uninstaller.exe $TEMP
+\c ExecWait '"$TEMP\uninstaller.exe" _?=$INSTDIR' $0
+\c DetailPrint "uninstaller set error level $0"
+
+If you don't do this, you'll only be able to know if the uninstaller failed copying itself to the temporary directory.
+
+\H{useful_add_uninst_infos}Add uninstall information to Add/Remove Programs
+
+Create a key with your product name under \\<b\\>HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\</b\\> to add entries to the "Add/Remove Programs" section in the Control Panel.
+For Windows NT (NT4/2000/XP), it's also possible to create the key in the HKCU hive, so it will only appear for the current user.
+There are several values you can write to key to give information about your application and the uninstaller.
+Write a value using the WriteRegStr command (for strings) or WriteRegDWORD command (for DWORD values). Example:
+
+
+\c WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Product" "DisplayName" "Application Name"
+
+
+\\<b\\>Required values\\</b\\>
+
+\e{DisplayName} (string) - Name of the application \\<br\\>
+\e{UninstallString} (string) - Path and filename of the uninstaller. You should \\<b\\>always\\</b\\> quote the path to make sure spaces in the path will not disrupt Windows to find the uninstaller.
+
+\\<b\\>Optional values\\</b\\>
+
+Some of the following values will not be used by older Windows versions.
+
+\e{InstallLocation} (string) - Installation directory ($INSTDIR) \\<br\\>
+\e{DisplayIcon} (string) - Path, filename and index of the icon that will be displayed next to your application name
+
+\e{Publisher} (string) - (Company) name of the publisher
+
+\e{ModifyPath} (string) - Path and filename of the application modify program \\<br\\>
+\e{InstallSource} (string) - Location where the application was installed from
+
+\e{ProductID} (string) - Product ID of the application \\<br\\>
+\e{RegOwner} (string) - Registered owner of the application \\<br\\>
+\e{RegCompany} (string) - Registered company of the application
+
+\e{HelpLink} (string) - Link to the support website \\<br\\>
+\e{HelpTelephone} (string) - Telephone number for support
+
+\e{URLUpdateInfo} (string) - Link to the website for application updates \\<br\\>
+\e{URLInfoAbout} (string) - Link to the application home page
+
+\e{DisplayVersion} (string) - Displayed version of the application \\<br\\>
+\e{VersionMajor} (DWORD) - Major version number of the application \\<br\\>
+\e{VersionMinor} (DWORD) - Minor version number of the application
+
+\e{NoModify} (DWORD) - 1 if uninstaller has no option to modify the installed application \\<br\\>
+\e{NoRepair} (DWORD) - 1 if the uninstaller has no option to repair the installation
+
+If both NoModify and NoRepair are set to 1, the button displays "Remove" instead of "Modify/Remove".
+
+
+\H{useful_system_plugin} Calling an external DLL using the System.dll plug-in
+
+\\<b\\>Please note that the Call, Get and Debug functions cannot be compiled with GCC, so download the Windows version of NSIS and extract the System.dll plugin or write your own plugin that calls the functions you need.\\</b\\>
+
+Some install processes are required to call functions contained inside third party DLLs. A prime example of this is when installing a Palm(TM) conduit.
+
+\\<b\\>Some background about System.dll\\</b\\> \\<br\\>
+The System.dll plug-in (by Brainsucker) enables calling of external DLLs by providing the 'Call' function. There are a number of other functions provided by System.dll, but they will not be covered here. For more details about the other functions, lock the doors, take the phone off the hook, screw your head on *real* tight and head on over to the \L{../Docs/System/System.html}{System readme}.
+
+\\<u\\>Data Types\\</u\\> \\<br\\>
+System.dll recognises the following data types:
+
+\b v - void (generally for return)
+
+\b i - int (includes char, byte, short, handles, pointers and so on)
+
+\b l - long & large integer (known as int64)
+
+\b t - text, string (LPCSTR, pointer to first character)
+
+\b b - boolean (needs/returns 'true':'false') - by the fact this type is senseless -> usual integer can be used ('0':'1')
+
+\b k - callback. See Callback section in system.html.
+
+\b * - pointer specifier -> the proc needs the pointer to type, affects next char (parameter) [ex: '*i' - pointer to int]
+
+
+
+\\<u\\>Mapping System.dll variables to NSIS script variables\\</u\\> \\<br\\>
+There's not much point in being able to call an external function if you can't get any data back. System.dll maps function variables to NSIS script variables in the following way:
+
+NSIS $0..$9 become System.dll r0..r9
+NSIS $R0..$R9 become System.dll r10..r19
+
+Each parameter is specified by type, input and output. To skip input or output use a dot. Examples:
+
+String (pointer to a characters array), input is 'happy calling':
+
+\c t 'happy calling'
+
+String (pointer to a characters array), input is taken from $5 and changes to the array made by the call are saved into $R8:
+
+\c t r5R8
+
+Pointer to an integer, value taken from $1 and put into $2:
+
+\c *i r1r2
+
+Pointer to a 64-bit integer, output pushed on stack, no input:
+
+\c *l .s
+
+Using System.dll::Call
+To call a function in a third party DLL, the Call function is used like this:
+
+\c System::Call 'YourDllName::YourDllFunction(i, *i, t) i(r0, .r1, r2) .r3'
+
+The '(r0, .r1, r2) .r3' section at the end are the parameters that are passed between your DLL and your NSIS script. As can be seen in this parameters list type and input/output can be seperated. Each block of "(parms list) return value" overrides and/or adds to the last one. In this case, the first block specifies the types and the second specifies input and output.
+
+\\<b\\>Before starting to code the NSIS script\\</b\\> \\<br\\>
+Before you start to code any NSIS code, you need to know the full prototype of the function you are going to call. For the purposes of this example, we will use the 'CmGetHotSyncExecPath' function from the Palm 'CondMgr.dll'. This function is used to return the full path of 'HotSync.exe'.
+
+\\<u\\>Function Definition\\</u\\> \\<br\\>
+
+
+int CmGetHotSyncExecPath(TCHAR *pPath, int *piSize);
+
+where
+
+\b pPath is a pointer to a character buffer. Upon return, this is the path & file name of the installed HotSync manager.
+
+\b piSize is a pointer to an integer that specifies the size (in TCHAR's), of the buffer referenced by the pPath parameter.
+
+return values:
+
+\b 0: No error
+
+\b -1: A non-specific error occurred
+
+\b ERR_REGISTRY_ACCESS(-1006):Unable to access the Palm configuration entries
+
+\b ERR_BUFFER_TOO_SMALL(-1010): The buffer is too small to hold the requested information
+
+\b ERR_INVALID_POINTER(-1013):The specified pointer is not a valid pointer
+
+
+Also, if the buffer is too small the value in *int is the size (in TCHARs) that the buffer should be.
+
+This function definition maps to the following System.dll definition:
+
+CmGetHotSyncExecPath(t, *i) i
+
+i.e. It takes a text variable, a pointer to int, and returns an int value.
+
+\\<u\\>Using the external dll function\\</u\\> \\<br\\>
+Now that we've sorted out what the function does, and how it maps to the System.dll format, we can use the function in a NSIS script.
+
+First, it is recommended to turn 'PluginUnload' off before making multiple calls to System.dll. According to Brainsucker (and others), this will speed up execution of the installer package.
+
+Second, you have to change the output directory to that where the DLL you want to use is. It may also work if the DLL is on the system path, but this hasn't been tested.
+
+The following code fragment will install 'condmgr.dll' to a temporary directory, execute the CmGetHotSyncExecPath function, display returned data and finally unload the System.dll plug-in.
+Save this script
+
+\c ; **** snip ****
+\c SetPluginUnload alwaysoff
+\c
+\c Function loadDll
+\c
+\c SetOutPath $TEMP\eInspect ; create temp directory
+\c File bin\CondMgr.dll ; copy dll there
+\c StrCpy $1 ${NSIS_MAX_STRLEN} ; assign memory to $0
+\c System::Call 'CondMgr::CmGetHotSyncExecPath(t, *i) i(.r0, r1r1).r2'
+\c DetailPrint 'Path: "$0"'
+\c DetailPrint "Path length: $1"
+\c DetailPrint "Return value: $2"
+\c
+\c ; last plug-in call must not have /NOUNLOAD so NSIS will be able to delete
+\c ; the temporary DLL
+\c
+\c SetPluginUnload manual
+\c ; do nothing (but let the installer unload the System dll)
+\c System::Free 0
+\c FunctionEnd
+\c ; **** snip ****
+
+
+and this function produces the following output in the 'details' page:
+
+Output folder: c:\\windows\\TEMP\\eInspect \\<br\\>
+Extract: CondMgr.dll \\<br\\>
+Path: "C:\\Dave\\palm\\Hotsync.exe" \\<br\\>
+Path length: 24 \\<br\\>
+Return value: 0
+
+
+Written by \W{http://nsis.sourceforge.net/archive/profile.php?userid=78}{djc}
+
+\\<u\\>Acknowledgements & Thanks\\</u\\> \\<br\\>
+Lots of thanks go to \\<b\\>kichik\\</b\\> and \\<b\\>Sunjammer\\</b\\> for spending a lot of time assisting in solving this problem. Also to \\<b\\>brainsucker\\</b\\> for creating the System.dll plug-in in the first place.
+Good Luck!
+
+\H{dumplogtofile} Dump Content of Log Window to File
+
+This function will dump the log of the installer (installer details) to a file of your choice. I created this function for Afrow_UK who requested a way to dump the log to a file in \W{http://forums.winamp.com/showthread.php?s=&threadid=125431}{this forum thread}.
+
+To use it, push a file name and call it. It will dump the log to the file specified. For example:
+
+
+\c GetTempFileName $0
+\c Push $0
+\c Call DumpLog
+
+Here is the function:
+
+
+
+\c !define LVM_GETITEMCOUNT 0x1004
+\c !define LVM_GETITEMTEXT 0x102D
+\c
+\c Function DumpLog
+\c Exch $5
+\c Push $0
+\c Push $1
+\c Push $2
+\c Push $3
+\c Push $4
+\c Push $6
+\c
+\c FindWindow $0 "#32770" "" $HWNDPARENT
+\c GetDlgItem $0 $0 1016
+\c StrCmp $0 0 error
+\c FileOpen $5 $5 "w"
+\c StrCmp $5 0 error
+\c SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6
+\c System::Alloc ${NSIS_MAX_STRLEN}
+\c Pop $3
+\c StrCpy $2 0
+\c System::Call "*(i, i, i, i, i, i, i, i, i) i \
+\c (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1"
+\c loop: StrCmp $2 $6 done
+\c System::Call "User32::SendMessageA(i, i, i, i) i \
+\c ($0, ${LVM_GETITEMTEXT}, $2, r1)"
+\c System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)"
+\c FileWrite $5 "$4$\r$\n"
+\c IntOp $2 $2 + 1
+\c Goto loop
+\c done:
+\c FileClose $5
+\c System::Free $1
+\c System::Free $3
+\c Goto exit
+\c error:
+\c MessageBox MB_OK error
+\c exit:
+\c Pop $6
+\c Pop $4
+\c Pop $3
+\c Pop $2
+\c Pop $1
+\c Pop $0
+\c Exch $5
+\c FunctionEnd
+
+written by KiCHiK
+
+
+\H{readreg_multi_sz} How to Read REG_MULTI_SZ Values
+
+I wrote this script to help rpetges in \W{http://forums.winamp.com/showthread.php?s=&threadid=131154}{this forum thread}. It reads a registry value of the type REG_MULTI_SZ and prints it out. Don't forget to edit where it says "Edit this!" when you test this script. The values must point to a REG_MULTI_SZ value or the example will spit out an error.
+
+
+\c OutFile "REG_MULTI_SZ Reader.exe"
+\c
+\c Name "REG_MULTI_SZ Reader"
+\c
+\c ShowInstDetails show
+\c
+\c !define HKEY_CLASSES_ROOT 0x80000000
+\c !define HKEY_CURRENT_USER 0x80000001
+\c !define HKEY_LOCAL_MACHINE 0x80000002
+\c !define HKEY_USERS 0x80000003
+\c !define HKEY_PERFORMANCE_DATA 0x80000004
+\c !define HKEY_PERFORMANCE_TEXT 0x80000050
+\c !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
+\c !define HKEY_CURRENT_CONFIG 0x80000005
+\c !define HKEY_DYN_DATA 0x80000006
+\c
+\c !define KEY_QUERY_VALUE 0x0001
+\c !define KEY_ENUMERATE_SUB_KEYS 0x0008
+\c
+\c !define REG_NONE 0
+\c !define REG_SZ 1
+\c !define REG_EXPAND_SZ 2
+\c !define REG_BINARY 3
+\c !define REG_DWORD 4
+\c !define REG_DWORD_LITTLE_ENDIAN 4
+\c !define REG_DWORD_BIG_ENDIAN 5
+\c !define REG_LINK 6
+\c !define REG_MULTI_SZ 7
+\c
+\c !define RegOpenKeyEx "Advapi32::RegOpenKeyExA(i, t, i, i, *i) i"
+\c !define RegQueryValueEx "Advapi32::RegQueryValueExA(i, t, i, *i, i, *i) i"
+\c !define RegCloseKey "Advapi32::RegCloseKeyA(i) i"
+\c
+\c ####### Edit this!
+\c
+\c !define ROOT_KEY ${HKEY_CURRENT_USER}
+\c !define SUB_KEY "Software\Joe Software"
+\c !define VALUE "Strings"
+\c
+\c ####### Stop editing
+\c
+\c Section "Read"
+\c StrCpy $0 ""
+\c StrCpy $1 ""
+\c StrCpy $2 ""
+\c StrCpy $3 ""
+\c SetPluginUnload alwaysoff
+\c System::Call "${RegOpenKeyEx}(${ROOT_KEY}, '${SUB_KEY}', \
+\c 0, ${KEY_QUERY_VALUE}|${KEY_ENUMERATE_SUB_KEYS}, .r0) .r3"
+\c
+\c StrCmp $3 0 goon
+\c MessageBox MB_OK|MB_ICONSTOP "Can't open registry key! ($3)"
+\c Goto done
+\c goon:
+\c
+\c System::Call "${RegQueryValueEx}(r0, '${VALUE}', 0, .r1, 0, .r2) .r3"
+\c
+\c StrCmp $3 0 read
+\c MessageBox MB_OK|MB_ICONSTOP "Can't query registry value size! ($3)"
+\c Goto done
+\c
+\c read:
+\c
+\c StrCmp $1 ${REG_MULTI_SZ} multisz
+\c MessageBox MB_OK|MB_ICONSTOP "Registry value no REG_MULTI_SZ! ($3)"
+\c Goto done
+\c
+\c multisz:
+\c
+\c StrCmp $2 0 0 multiszalloc
+\c MessageBox MB_OK|MB_ICONSTOP "Registry value empty! ($3)"
+\c Goto done
+\c
+\c multiszalloc:
+\c
+\c System::Alloc $2
+\c Pop $1
+\c
+\c StrCmp $1 0 0 multiszget
+\c MessageBox MB_OK|MB_ICONSTOP "Can't allocate enough memory! ($3)"
+\c Goto done
+\c
+\c multiszget:
+\c
+\c System::Call "${RegQueryValueEx}(r0, '${VALUE}', 0, n, r1, r2) .r3"
+\c
+\c StrCmp $3 0 multiszprocess
+\c MessageBox MB_OK|MB_ICONSTOP "Can't query registry value data! ($3)"
+\c Goto done
+\c
+\c multiszprocess:
+\c
+\c StrCpy $4 $1
+\c
+\c loop:
+\c
+\c System::Call "*$4(&t${NSIS_MAX_STRLEN} .r3)"
+\c StrCmp $3 "" done
+\c DetailPrint $3
+\c StrLen $5 $3
+\c IntOp $4 $4 + $5
+\c IntOp $4 $4 + 1
+\c Goto loop
+\c
+\c done:
+\c
+\c System::Free $1
+\c
+\c StrCmp $0 0 noClose
+\c System::Call "${RegCloseKey}(r0)"
+\c
+\c noClose:
+\c
+\c SetPluginUnload manual
+\c SectionEnd
+
+written by KiCHiK
diff --git a/Docs/src/var.but b/Docs/src/var.but
index 94bf67a..7adc3ec 100755
--- a/Docs/src/var.but
+++ b/Docs/src/var.but
@@ -1,262 +1,262 @@
-\H{variables} Variables
-
-All variables are global and can be used in Sections or Functions. Note that, by default, variables are limited to 1024 characters. To extend this limit, \R{build}{build NSIS} with a bigger value of the NSIS_MAX_STRLEN build setting or use the \W{http://nsis.sourceforge.net/download/specialbuilds/}{special build}.
-
-\S1{varuser} User Variables
-
-\e{$VARNAME}
-
-User variables can be declared with the \R{var}{Var} command. You can use these variables to store values, work with string manipulation etc.
-
-\S2{var} Var
-
-\c [/GLOBAL] var_name
-
-Declare a user variable. Allowed characters for variables names: [a-z][A-Z][0-9] and '_'. All defined variables are global, even if defined in a section or a function. To make this clear, variables defined in a section or a function must use the /GLOBAL flag. The /GLOBAL flag is not required outside of sections and functions.
-
-\c Var example
-\c
-\c Function testVar
-\c Var /GLOBAL example2
-\c
-\c StrCpy $example "example value"
-\c StrCpy $example2 "another example value"
-\c FunctionEnd
-
-\S1{varother} Other Writable Variables
-
-\e{$0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $R0, $R1, $R2, $R3, $R4, $R5, $R6, $R7, $R8, $R9}
-
-Registers. These variables can be used just like user variables, but are usually used in shared functions or macros. You don't have to declare these variables, so you won't get any name conflicts when using them in shared code. When using these variables in shared code, it's recommended that you use the stack to save and restore their original values. These variables can also be used for communication with plug-ins, because they can be read and written by the plug-in DLLs.
-
-\e{$INSTDIR}
-
-The installation directory ($INSTDIR is modifiable using \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc. - This could be used, for example, in the \R{oninit}{.onInit} function to do a more advanced detection of install location).
-
-Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \\<b\\>not\\</b\\> necessarily contain the same value it contained in the installer. For example, if you write the uninstaller to $WINDIR and the user doesn't move it, $INSTDIR will be $WINDIR in the uninstaller. If you write the uninstaller to another location, you should keep the installer's $INSTDIR in the registry or an alternative storing facility and read it in the uninstaller.
-
-\e{$OUTDIR}
-
-The current output directory (set implicitly via \R{setoutpath}{SetOutPath} or explicitly via \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc)
-
-\e{$CMDLINE}
-
-The command line of the installer. The format of the command line can be one of the following:
-
-\b "full\\path to\\installer.exe" PARAMETER PARAMETER PARAMETER
-
-\b installer.exe PARAMETER PARAMETER PARAMETER
-
-\b For parsing out the PARAMETER portion, see GetParameters on the \R{getparameters}{useful functions appendix}. If /D= is specified on the command line (to override the install directory) it won't show up in $CMDLINE.
-
-\e{$LANGUAGE}
-
-The identifier of the language that is currently used. For example, English is 1033. You can change this variable in \R{oninit}{.onInit}.
-
-\S1{varconstant} Constants
-
-Constants can also be used in the \R{ainstalldir}{InstallDir} attribute.
-
-Note that some of the new constants will not work on every OS. For example, $CDBURN_AREA will only work on Windows XP and above. If it's used on Windows 98, it'll be empty. Unless mentioned otherwise, a constant should be available on every OS.
-
-\e{$PROGRAMFILES}, \e{$PROGRAMFILES32}, \e{$PROGRAMFILES64}
-
-The program files directory (usually \c{C:\\Program Files} but detected at runtime). On Windows x64, $PROGRAMFILES and $PROGRAMFILES32 point to \c{C:\\Program Files (x86)} while $PROGRAMFILES64 points to \c{C:\\Program Files}. Use $PROGRAMFILES64 when installing x64 applications.
-
-\e{$COMMONFILES}, \e{$COMMONFILES32}, \e{$COMMONFILES64}
-
-The common files directory. This is a directory for components that are shared across applications (usually \c{C:\\Program Files\\Common Files} but detected at runtime). On Windows x64, $COMMONFILES and $COMMONFILES32 point to \c{C:\\Program Files (x86)\\Common Files} while $COMMONFILES64 points to \c{C:\\Program Files\\Common Files}. Use $COMMONFILES64 when installing x64 applications.
-
-\e{$DESKTOP}
-
-The Windows desktop directory (usually \c{C:\\Windows\\Desktop} but detected at runtime). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-\e{$EXEDIR}
-
-The directory containing the installer executable (technically you can modify this variable, but it is probably not a good idea).
-
-\e{$EXEFILE}
-
-The base name of the installer executable.
-
-\e{$EXEPATH}
-
-The full path of the installer executable.
-
-\e{$\{NSISDIR\}}
-
-A symbol that contains the path where NSIS is installed. Useful if you want to call resources that are in NSIS directory e.g. Icons, UIs etc.
-
-When compiled with support for keeping makensis and the data in the same place (the default on Windows), it is in the same place as makensis, on other platforms it is set at compile time (See the INSTALL file for info). In both instances you can modify it at runtime by setting the NSISDIR environment variable. See \k{usageenvironment} for more info.
-
-\e{$WINDIR}
-
-The Windows directory (usually \c{C:\\Windows} or \c{C:\\WinNT} but detected at runtime).
-
-\e{$SYSDIR}
-
-The Windows system directory (usually \c{C:\\Windows\\System} or \c{C:\\WinNT\\System32} but detected at runtime).
-
-\e{$TEMP}
-
-The system temporary directory (usually \c{C:\\Windows\\Temp} but detected at runtime).
-
-\e{$STARTMENU}
-
-The start menu folder (useful in adding start menu items using \R{createshortcut}{CreateShortCut}). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-\e{$SMPROGRAMS}
-
-The start menu programs folder (use this whenever you want $STARTMENU\\Programs). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-\e{$SMSTARTUP}
-
-The start menu programs / startup folder. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-\e{$QUICKLAUNCH}
-
-The quick launch folder for IE4 active desktop and above. If quick launch is not available, simply returns the same as $TEMP.
-
-\e{$DOCUMENTS}
-
-The documents directory. A typical path for the current user is \c{C:\\Documents and Settings\\Foo\\My Documents}. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is not available on Windows 95 with Internet Explorer 4 not installed.
-
-\e{$SENDTO}
-
-The directory that contains Send To menu shortcut items.
-
-\e{$RECENT}
-
-The directory that contains shortcuts to the user's recently used documents.
-
-\e{$FAVORITES}
-
-The directory that contains shortcuts to the user's favorite websites, documents, etc. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is not available on Windows 95 with Internet Explorer 4 not installed.
-
-\e{$MUSIC}
-
-The user's music files directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is available on Windows XP, ME and above.
-
-\e{$PICTURES}
-
-The user's picture files directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is available on Windows 2000, XP, ME and above.
-
-\e{$VIDEOS}
-
-The user's video files directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is available on Windows XP, ME and above.
-
-\e{$NETHOOD}
-
-The directory that contains link objects that may exist in the My Network Places/Network Neighborhood folder.
-
-This constant is not available on Windows 95 with Internet Explorer 4 and Active Desktop not installed.
-
-\e{$FONTS}
-
-The system's fonts directory.
-
-\e{$TEMPLATES}
-
-The document templates directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-\e{$APPDATA}
-
-The application data directory. Detection of the current user path requires Internet Explorer 4 and above. Detection of the all users path requires Internet Explorer 5 and above. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is not available on Windows 95 with Internet Explorer 4 and Active Desktop not installed.
-
-\e{$LOCALAPPDATA}
-
-The local (nonroaming) application data directory.
-
-This constant is available on Windows 2000 and above.
-
-\e{$PRINTHOOD}
-
-The directory that contains link objects that may exist in the Printers folder.
-
-This constant is not available on Windows 95 and Windows 98.
-
-\e{$INTERNET_CACHE}
-
-Internet Explorer's temporary internet files directory.
-
-This constant is not available on Windows 95 and Windows NT with Internet Explorer 4 and Active Desktop not installed.
-
-\e{$COOKIES}
-
-Internet Explorer's cookies directory.
-
-This constant is not available on Windows 95 and Windows NT with Internet Explorer 4 and Active Desktop not installed.
-
-\e{$HISTORY}
-
-Internet Explorer's history directory.
-
-This constant is not available on Windows 95 and Windows NT with Internet Explorer 4 and Active Desktop not installed.
-
-\e{$PROFILE}
-
-The user's profile directory. A typical path is \c{C:\\Documents and Settings\\Foo}.
-
-This constant is available on Windows 2000 and above.
-
-\e{$ADMINTOOLS}
-
-A directory where administrative tools are kept. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
-
-This constant is available on Windows 2000, ME and above.
-
-\e{$RESOURCES}
-
-The resources directory that stores themes and other Windows resources (usually \c{C:\\Windows\\Resources} but detected at runtime).
-
-This constant is available on Windows XP and above.
-
-\e{$RESOURCES_LOCALIZED}
-
-The localized resources directory that stores themes and other Windows resources (usually \c{C:\\Windows\\Resources\\1033} but detected at runtime).
-
-This constant is available on Windows XP and above.
-
-\e{$CDBURN_AREA}
-
-A directory where files awaiting to be burned to CD are stored.
-
-This constant is available on Windows XP and above.
-
-\e{$HWNDPARENT}
-
-The decimal HWND of the parent window.
-
-\e{$PLUGINSDIR}
-
-The path to a temporary folder created upon the first usage of a plug-in or a call to \R{initpluginsdir}{InitPluginsDir}. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for \L{../Docs/InstallOptions/Readme.html}{InstallOptions}, bitmaps for the splash plug-in, or any other file that a plug-in needs to work.
-
-\S1{varstrings} Constants Used in Strings
-
-\e{$$}
-
-Use to represent $.
-
-\e{$\\r}
-
-Use to represent a carriage return (\\r).
-
-\e{$\\n}
-
-Use to represent a newline (\\n).
-
-\e{$\\t}
-
-Use to represent a tab (\\t).
+\H{variables} Variables
+
+All variables are global and can be used in Sections or Functions. Note that, by default, variables are limited to 1024 characters. To extend this limit, \R{build}{build NSIS} with a bigger value of the NSIS_MAX_STRLEN build setting or use the \W{http://nsis.sourceforge.net/download/specialbuilds/}{special build}.
+
+\S1{varuser} User Variables
+
+\e{$VARNAME}
+
+User variables can be declared with the \R{var}{Var} command. You can use these variables to store values, work with string manipulation etc.
+
+\S2{var} Var
+
+\c [/GLOBAL] var_name
+
+Declare a user variable. Allowed characters for variables names: [a-z][A-Z][0-9] and '_'. All defined variables are global, even if defined in a section or a function. To make this clear, variables defined in a section or a function must use the /GLOBAL flag. The /GLOBAL flag is not required outside of sections and functions.
+
+\c Var example
+\c
+\c Function testVar
+\c Var /GLOBAL example2
+\c
+\c StrCpy $example "example value"
+\c StrCpy $example2 "another example value"
+\c FunctionEnd
+
+\S1{varother} Other Writable Variables
+
+\e{$0, $1, $2, $3, $4, $5, $6, $7, $8, $9, $R0, $R1, $R2, $R3, $R4, $R5, $R6, $R7, $R8, $R9}
+
+Registers. These variables can be used just like user variables, but are usually used in shared functions or macros. You don't have to declare these variables, so you won't get any name conflicts when using them in shared code. When using these variables in shared code, it's recommended that you use the stack to save and restore their original values. These variables can also be used for communication with plug-ins, because they can be read and written by the plug-in DLLs.
+
+\e{$INSTDIR}
+
+The installation directory ($INSTDIR is modifiable using \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc. - This could be used, for example, in the \R{oninit}{.onInit} function to do a more advanced detection of install location).
+
+Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \\<b\\>not\\</b\\> necessarily contain the same value it contained in the installer. For example, if you write the uninstaller to $WINDIR and the user doesn't move it, $INSTDIR will be $WINDIR in the uninstaller. If you write the uninstaller to another location, you should keep the installer's $INSTDIR in the registry or an alternative storing facility and read it in the uninstaller.
+
+\e{$OUTDIR}
+
+The current output directory (set implicitly via \R{setoutpath}{SetOutPath} or explicitly via \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc)
+
+\e{$CMDLINE}
+
+The command line of the installer. The format of the command line can be one of the following:
+
+\b "full\\path to\\installer.exe" PARAMETER PARAMETER PARAMETER
+
+\b installer.exe PARAMETER PARAMETER PARAMETER
+
+\b For parsing out the PARAMETER portion, see GetParameters on the \R{getparameters}{useful functions appendix}. If /D= is specified on the command line (to override the install directory) it won't show up in $CMDLINE.
+
+\e{$LANGUAGE}
+
+The identifier of the language that is currently used. For example, English is 1033. You can change this variable in \R{oninit}{.onInit}.
+
+\S1{varconstant} Constants
+
+Constants can also be used in the \R{ainstalldir}{InstallDir} attribute.
+
+Note that some of the new constants will not work on every OS. For example, $CDBURN_AREA will only work on Windows XP and above. If it's used on Windows 98, it'll be empty. Unless mentioned otherwise, a constant should be available on every OS.
+
+\e{$PROGRAMFILES}, \e{$PROGRAMFILES32}, \e{$PROGRAMFILES64}
+
+The program files directory (usually \c{C:\\Program Files} but detected at runtime). On Windows x64, $PROGRAMFILES and $PROGRAMFILES32 point to \c{C:\\Program Files (x86)} while $PROGRAMFILES64 points to \c{C:\\Program Files}. Use $PROGRAMFILES64 when installing x64 applications.
+
+\e{$COMMONFILES}, \e{$COMMONFILES32}, \e{$COMMONFILES64}
+
+The common files directory. This is a directory for components that are shared across applications (usually \c{C:\\Program Files\\Common Files} but detected at runtime). On Windows x64, $COMMONFILES and $COMMONFILES32 point to \c{C:\\Program Files (x86)\\Common Files} while $COMMONFILES64 points to \c{C:\\Program Files\\Common Files}. Use $COMMONFILES64 when installing x64 applications.
+
+\e{$DESKTOP}
+
+The Windows desktop directory (usually \c{C:\\Windows\\Desktop} but detected at runtime). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+\e{$EXEDIR}
+
+The directory containing the installer executable (technically you can modify this variable, but it is probably not a good idea).
+
+\e{$EXEFILE}
+
+The base name of the installer executable.
+
+\e{$EXEPATH}
+
+The full path of the installer executable.
+
+\e{$\{NSISDIR\}}
+
+A symbol that contains the path where NSIS is installed. Useful if you want to call resources that are in NSIS directory e.g. Icons, UIs etc.
+
+When compiled with support for keeping makensis and the data in the same place (the default on Windows), it is in the same place as makensis, on other platforms it is set at compile time (See the INSTALL file for info). In both instances you can modify it at runtime by setting the NSISDIR environment variable. See \k{usageenvironment} for more info.
+
+\e{$WINDIR}
+
+The Windows directory (usually \c{C:\\Windows} or \c{C:\\WinNT} but detected at runtime).
+
+\e{$SYSDIR}
+
+The Windows system directory (usually \c{C:\\Windows\\System} or \c{C:\\WinNT\\System32} but detected at runtime).
+
+\e{$TEMP}
+
+The system temporary directory (usually \c{C:\\Windows\\Temp} but detected at runtime).
+
+\e{$STARTMENU}
+
+The start menu folder (useful in adding start menu items using \R{createshortcut}{CreateShortCut}). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+\e{$SMPROGRAMS}
+
+The start menu programs folder (use this whenever you want $STARTMENU\\Programs). The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+\e{$SMSTARTUP}
+
+The start menu programs / startup folder. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+\e{$QUICKLAUNCH}
+
+The quick launch folder for IE4 active desktop and above. If quick launch is not available, simply returns the same as $TEMP.
+
+\e{$DOCUMENTS}
+
+The documents directory. A typical path for the current user is \c{C:\\Documents and Settings\\Foo\\My Documents}. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is not available on Windows 95 with Internet Explorer 4 not installed.
+
+\e{$SENDTO}
+
+The directory that contains Send To menu shortcut items.
+
+\e{$RECENT}
+
+The directory that contains shortcuts to the user's recently used documents.
+
+\e{$FAVORITES}
+
+The directory that contains shortcuts to the user's favorite websites, documents, etc. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is not available on Windows 95 with Internet Explorer 4 not installed.
+
+\e{$MUSIC}
+
+The user's music files directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is available on Windows XP, ME and above.
+
+\e{$PICTURES}
+
+The user's picture files directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is available on Windows 2000, XP, ME and above.
+
+\e{$VIDEOS}
+
+The user's video files directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is available on Windows XP, ME and above.
+
+\e{$NETHOOD}
+
+The directory that contains link objects that may exist in the My Network Places/Network Neighborhood folder.
+
+This constant is not available on Windows 95 with Internet Explorer 4 and Active Desktop not installed.
+
+\e{$FONTS}
+
+The system's fonts directory.
+
+\e{$TEMPLATES}
+
+The document templates directory. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+\e{$APPDATA}
+
+The application data directory. Detection of the current user path requires Internet Explorer 4 and above. Detection of the all users path requires Internet Explorer 5 and above. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is not available on Windows 95 with Internet Explorer 4 and Active Desktop not installed.
+
+\e{$LOCALAPPDATA}
+
+The local (nonroaming) application data directory.
+
+This constant is available on Windows 2000 and above.
+
+\e{$PRINTHOOD}
+
+The directory that contains link objects that may exist in the Printers folder.
+
+This constant is not available on Windows 95 and Windows 98.
+
+\e{$INTERNET_CACHE}
+
+Internet Explorer's temporary internet files directory.
+
+This constant is not available on Windows 95 and Windows NT with Internet Explorer 4 and Active Desktop not installed.
+
+\e{$COOKIES}
+
+Internet Explorer's cookies directory.
+
+This constant is not available on Windows 95 and Windows NT with Internet Explorer 4 and Active Desktop not installed.
+
+\e{$HISTORY}
+
+Internet Explorer's history directory.
+
+This constant is not available on Windows 95 and Windows NT with Internet Explorer 4 and Active Desktop not installed.
+
+\e{$PROFILE}
+
+The user's profile directory. A typical path is \c{C:\\Documents and Settings\\Foo}.
+
+This constant is available on Windows 2000 and above.
+
+\e{$ADMINTOOLS}
+
+A directory where administrative tools are kept. The context of this constant (All Users or Current user) depends on the \R{setshellvarcontext}{SetShellVarContext} setting. The default is the current user.
+
+This constant is available on Windows 2000, ME and above.
+
+\e{$RESOURCES}
+
+The resources directory that stores themes and other Windows resources (usually \c{C:\\Windows\\Resources} but detected at runtime).
+
+This constant is available on Windows XP and above.
+
+\e{$RESOURCES_LOCALIZED}
+
+The localized resources directory that stores themes and other Windows resources (usually \c{C:\\Windows\\Resources\\1033} but detected at runtime).
+
+This constant is available on Windows XP and above.
+
+\e{$CDBURN_AREA}
+
+A directory where files awaiting to be burned to CD are stored.
+
+This constant is available on Windows XP and above.
+
+\e{$HWNDPARENT}
+
+The decimal HWND of the parent window.
+
+\e{$PLUGINSDIR}
+
+The path to a temporary folder created upon the first usage of a plug-in or a call to \R{initpluginsdir}{InitPluginsDir}. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for \L{../Docs/InstallOptions/Readme.html}{InstallOptions}, bitmaps for the splash plug-in, or any other file that a plug-in needs to work.
+
+\S1{varstrings} Constants Used in Strings
+
+\e{$$}
+
+Use to represent $.
+
+\e{$\\r}
+
+Use to represent a carriage return (\\r).
+
+\e{$\\n}
+
+Use to represent a newline (\\n).
+
+\e{$\\t}
+
+Use to represent a tab (\\t).
diff --git a/Docs/style.css b/Docs/style.css
index 04a2f2d..dea58c8 100755
--- a/Docs/style.css
+++ b/Docs/style.css
@@ -1,45 +1,45 @@
-body {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 0.8em;
-}
-p, li {
- font-size: 100%;
-}
-h1 {
- font-size: 170%;
-}
-h2 {
- font-size: 150%;
-}
-h3 {
- font-size: 130%;
-}
-h4 {
- font-size: 120%;
-}
-pre {
- font-family: Courier New, Courier, mono;
- background-color: #F7F7F7;
- padding: 1px;
-}
-pre b {
- text-decoration: underline;
-}
-a {
- color: #567599;
- text-decoration: none;
-}
-a:hover {
- background-color: #F4F4F4;
- color: #303030;
- text-decoration: underline;
-}
-.btitle {
- color: #000000;
- text-decoration: none;
-}
-.btitle:hover {
- background-color: #F4F4F4;
- color: #000000;
- text-decoration: underline;
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 0.8em;
+}
+p, li {
+ font-size: 100%;
+}
+h1 {
+ font-size: 170%;
+}
+h2 {
+ font-size: 150%;
+}
+h3 {
+ font-size: 130%;
+}
+h4 {
+ font-size: 120%;
+}
+pre {
+ font-family: Courier New, Courier, mono;
+ background-color: #F7F7F7;
+ padding: 1px;
+}
+pre b {
+ text-decoration: underline;
+}
+a {
+ color: #567599;
+ text-decoration: none;
+}
+a:hover {
+ background-color: #F4F4F4;
+ color: #303030;
+ text-decoration: underline;
+}
+.btitle {
+ color: #000000;
+ text-decoration: none;
+}
+.btitle:hover {
+ background-color: #F4F4F4;
+ color: #000000;
+ text-decoration: underline;
} \ No newline at end of file
diff --git a/Examples/FileFunc.ini b/Examples/FileFunc.ini
index 891af15..5b227f4 100755
--- a/Examples/FileFunc.ini
+++ b/Examples/FileFunc.ini
@@ -1,91 +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
+[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/Examples/FileFunc.nsi b/Examples/FileFunc.nsi
index 8dec031..0f59e74 100755
--- a/Examples/FileFunc.nsi
+++ b/Examples/FileFunc.nsi
@@ -1,751 +1,751 @@
-;_____________________________________________________________________________
-;
-; File Functions
-;_____________________________________________________________________________
-;
-; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
-
-Name "File Functions"
-OutFile "FileFunc.exe"
-Caption "$(^Name)"
-XPStyle on
-
-!include "WinMessages.nsh"
-!include "FileFunc.nsh"
-
-!insertmacro Locate
-!insertmacro GetSize
-!insertmacro DriveSpace
-!insertmacro GetDrives
-!insertmacro GetTime
-!insertmacro GetFileAttributes
-!insertmacro GetFileVersion
-!insertmacro GetExeName
-!insertmacro GetExePath
-!insertmacro GetParameters
-!insertmacro GetOptions
-!insertmacro GetRoot
-!insertmacro GetParent
-!insertmacro GetFileName
-!insertmacro GetBaseName
-!insertmacro GetFileExt
-!insertmacro BannerTrimPath
-!insertmacro DirState
-!insertmacro RefreshShellIcons
-
-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 /NOUNLOAD "$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
+;_____________________________________________________________________________
+;
+; File Functions
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "File Functions"
+OutFile "FileFunc.exe"
+Caption "$(^Name)"
+XPStyle on
+
+!include "WinMessages.nsh"
+!include "FileFunc.nsh"
+
+!insertmacro Locate
+!insertmacro GetSize
+!insertmacro DriveSpace
+!insertmacro GetDrives
+!insertmacro GetTime
+!insertmacro GetFileAttributes
+!insertmacro GetFileVersion
+!insertmacro GetExeName
+!insertmacro GetExePath
+!insertmacro GetParameters
+!insertmacro GetOptions
+!insertmacro GetRoot
+!insertmacro GetParent
+!insertmacro GetFileName
+!insertmacro GetBaseName
+!insertmacro GetFileExt
+!insertmacro BannerTrimPath
+!insertmacro DirState
+!insertmacro RefreshShellIcons
+
+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 /NOUNLOAD "$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/Examples/FileFuncTest.nsi b/Examples/FileFuncTest.nsi
index 759a959..5e96fa1 100755
--- a/Examples/FileFuncTest.nsi
+++ b/Examples/FileFuncTest.nsi
@@ -1,561 +1,561 @@
-;_____________________________________________________________________________
-;
-; File Functions Test
-;_____________________________________________________________________________
-;
-; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
-
-Name "File Functions Test"
-OutFile "FileFuncTest.exe"
-Caption "$(^Name)"
-ShowInstDetails show
-XPStyle on
-
-Var FUNCTION
-Var OUT1
-Var OUT2
-Var OUT3
-Var OUT4
-Var OUT5
-Var OUT6
-Var OUT7
-
-!include "FileFunc.nsh"
-
-!insertmacro Locate
-!insertmacro GetSize
-!insertmacro DriveSpace
-!insertmacro GetDrives
-!insertmacro GetTime
-!insertmacro GetFileAttributes
-!insertmacro GetFileVersion
-!insertmacro GetExeName
-!insertmacro GetExePath
-!insertmacro GetParameters
-!insertmacro GetOptions
-!insertmacro GetOptionsS
-!insertmacro GetRoot
-!insertmacro GetParent
-!insertmacro GetFileName
-!insertmacro GetBaseName
-!insertmacro GetFileExt
-!insertmacro BannerTrimPath
-!insertmacro DirState
-!insertmacro RefreshShellIcons
-
-!insertmacro un.Locate
-!insertmacro un.GetSize
-!insertmacro un.GetDrives
-!insertmacro un.DriveSpace
-!insertmacro un.GetTime
-!insertmacro un.GetFileAttributes
-!insertmacro un.GetFileVersion
-!insertmacro un.GetExeName
-!insertmacro un.GetExePath
-!insertmacro un.GetParameters
-!insertmacro un.GetOptions
-!insertmacro un.GetOptionsS
-!insertmacro un.GetRoot
-!insertmacro un.GetParent
-!insertmacro un.GetFileName
-!insertmacro un.GetBaseName
-!insertmacro un.GetFileExt
-!insertmacro un.BannerTrimPath
-!insertmacro un.DirState
-!insertmacro un.RefreshShellIcons
-
-
-
-;############### 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
-
- ${GetParameters} $OUT1
-
- ${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
- ${un.Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'un.LocateCallback'
- ${un.GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
- ${un.DriveSpace} 'C:\' '/D=F /S=M' $OUT1
- ${un.GetDrives} 'FDD+CDROM' 'un.GetDrivesCallback'
- ${un.GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
- ${un.GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
- ${un.GetFileVersion} '$WINDIR\explorer.exe' $OUT1
- ${un.GetExeName} $OUT1
- ${un.GetExePath} $OUT1
- ${un.GetParameters} $OUT1
- ${un.GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
- ${un.GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
- ${un.GetRoot} 'C:\Program Files\NSIS' $OUT1
- ${un.GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
- ${un.GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
- ${un.GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
- ${un.GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
- ${un.BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
- ${un.DirState} '$TEMP' $OUT1
- ${un.RefreshShellIcons}
-SectionEnd
-
-Function un.LocateCallback
- Push $0
-FunctionEnd
-
-Function un.GetDrivesCallback
- Push $0
-FunctionEnd
+;_____________________________________________________________________________
+;
+; File Functions Test
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "File Functions Test"
+OutFile "FileFuncTest.exe"
+Caption "$(^Name)"
+ShowInstDetails show
+XPStyle on
+
+Var FUNCTION
+Var OUT1
+Var OUT2
+Var OUT3
+Var OUT4
+Var OUT5
+Var OUT6
+Var OUT7
+
+!include "FileFunc.nsh"
+
+!insertmacro Locate
+!insertmacro GetSize
+!insertmacro DriveSpace
+!insertmacro GetDrives
+!insertmacro GetTime
+!insertmacro GetFileAttributes
+!insertmacro GetFileVersion
+!insertmacro GetExeName
+!insertmacro GetExePath
+!insertmacro GetParameters
+!insertmacro GetOptions
+!insertmacro GetOptionsS
+!insertmacro GetRoot
+!insertmacro GetParent
+!insertmacro GetFileName
+!insertmacro GetBaseName
+!insertmacro GetFileExt
+!insertmacro BannerTrimPath
+!insertmacro DirState
+!insertmacro RefreshShellIcons
+
+!insertmacro un.Locate
+!insertmacro un.GetSize
+!insertmacro un.GetDrives
+!insertmacro un.DriveSpace
+!insertmacro un.GetTime
+!insertmacro un.GetFileAttributes
+!insertmacro un.GetFileVersion
+!insertmacro un.GetExeName
+!insertmacro un.GetExePath
+!insertmacro un.GetParameters
+!insertmacro un.GetOptions
+!insertmacro un.GetOptionsS
+!insertmacro un.GetRoot
+!insertmacro un.GetParent
+!insertmacro un.GetFileName
+!insertmacro un.GetBaseName
+!insertmacro un.GetFileExt
+!insertmacro un.BannerTrimPath
+!insertmacro un.DirState
+!insertmacro un.RefreshShellIcons
+
+
+
+;############### 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
+
+ ${GetParameters} $OUT1
+
+ ${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
+ ${un.Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'un.LocateCallback'
+ ${un.GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
+ ${un.DriveSpace} 'C:\' '/D=F /S=M' $OUT1
+ ${un.GetDrives} 'FDD+CDROM' 'un.GetDrivesCallback'
+ ${un.GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
+ ${un.GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
+ ${un.GetFileVersion} '$WINDIR\explorer.exe' $OUT1
+ ${un.GetExeName} $OUT1
+ ${un.GetExePath} $OUT1
+ ${un.GetParameters} $OUT1
+ ${un.GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
+ ${un.GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
+ ${un.GetRoot} 'C:\Program Files\NSIS' $OUT1
+ ${un.GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${un.GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${un.GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${un.GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
+ ${un.BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
+ ${un.DirState} '$TEMP' $OUT1
+ ${un.RefreshShellIcons}
+SectionEnd
+
+Function un.LocateCallback
+ Push $0
+FunctionEnd
+
+Function un.GetDrivesCallback
+ Push $0
+FunctionEnd
diff --git a/Examples/Library.nsi b/Examples/Library.nsi
index 15b030d..61ca810 100755
--- a/Examples/Library.nsi
+++ b/Examples/Library.nsi
@@ -1,115 +1,115 @@
-# 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
-
-!define TestDLL '"${NSISDIR}\Plugins\LangDLL.dll"'
-
-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
-
-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
-
-SectionEnd
+# 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
+
+!define TestDLL '"${NSISDIR}\Plugins\LangDLL.dll"'
+
+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
+
+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
+
+SectionEnd
diff --git a/Examples/LogicLib.nsi b/Examples/LogicLib.nsi
index a1f17b5..e1cb2b2 100755
--- a/Examples/LogicLib.nsi
+++ b/Examples/LogicLib.nsi
@@ -1,596 +1,596 @@
-!verbose 2
-
-Name "NSIS LogicLib Example"
-OutFile "LogicLib.exe"
-ShowInstDetails show
-
-!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 ${|}
- ${If} $R2 == "A"
- 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..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
-
-!verbose 3
+!verbose 2
+
+Name "NSIS LogicLib Example"
+OutFile "LogicLib.exe"
+ShowInstDetails show
+
+!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 ${|}
+ ${If} $R2 == "A"
+ 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..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
+
+!verbose 3
diff --git a/Examples/Memento.nsi b/Examples/Memento.nsi
index dd716bd..358d323 100755
--- a/Examples/Memento.nsi
+++ b/Examples/Memento.nsi
@@ -1,77 +1,77 @@
-!include LogicLib.nsh
-!include Memento.nsh
-
-Name Memento
-OutFile Memento.exe
-
-XPStyle on
-
-ShowInstDetails show
-
-Page components
-Page instfiles
-
-# 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
+!include LogicLib.nsh
+!include Memento.nsh
+
+Name Memento
+OutFile Memento.exe
+
+XPStyle on
+
+ShowInstDetails show
+
+Page components
+Page instfiles
+
+# 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/Examples/Modern UI/Basic.nsi b/Examples/Modern UI/Basic.nsi
index 561e099..6d97096 100755
--- a/Examples/Modern UI/Basic.nsi
+++ b/Examples/Modern UI/Basic.nsi
@@ -1,85 +1,85 @@
-;NSIS Modern User Interface
-;Basic Example Script
-;Written by Joost Verburg
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "Modern UI Test"
- OutFile "Basic.exe"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\Modern UI Test"
-
- ;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\Modern UI Test" ""
-
-;--------------------------------
-;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"
-
+;NSIS Modern User Interface
+;Basic Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "Basic.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+;--------------------------------
+;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/Examples/Modern UI/HeaderBitmap.nsi b/Examples/Modern UI/HeaderBitmap.nsi
index 99de779..8070201 100755
--- a/Examples/Modern UI/HeaderBitmap.nsi
+++ b/Examples/Modern UI/HeaderBitmap.nsi
@@ -1,87 +1,87 @@
-;NSIS Modern User Interface
-;Header Bitmap Example Script
-;Written by Joost Verburg
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "Modern UI Test"
- OutFile "HeaderBitmap.exe"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\Modern UI Test"
-
- ;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\Modern UI Test" ""
-
-;--------------------------------
-;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"
-
+;NSIS Modern User Interface
+;Header Bitmap Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "HeaderBitmap.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+;--------------------------------
+;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/Examples/Modern UI/InstallOptions.nsi b/Examples/Modern UI/InstallOptions.nsi
index 20c17cc..dddf7c6 100755
--- a/Examples/Modern UI/InstallOptions.nsi
+++ b/Examples/Modern UI/InstallOptions.nsi
@@ -1,148 +1,150 @@
-;NSIS Modern User Interface version 1.70
-;InstallOptions Example Script
-;Written by Joost Verburg
-
-;---------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "Modern UI Test 1.70"
- OutFile "InstallOptions.exe"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\Modern UI Test"
-
- ;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\Modern UI Test" ""
-
-;--------------------------------
-;Pages
-
- !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
- Page custom CustomPageA
- !insertmacro MUI_PAGE_COMPONENTS
- Page custom CustomPageB
- !insertmacro MUI_PAGE_DIRECTORY
- Page custom CustomPageC
- !insertmacro MUI_PAGE_INSTFILES
-
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Interface Settings
-
- !define MUI_ABORTWARNING
-
-;--------------------------------
-;Languages
-
- !insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;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.
-
- ReserveFile "ioA.ini"
- ReserveFile "ioB.ini"
- ReserveFile "ioC.ini"
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-;Variables
-
- Var INI_VALUE
-
-;--------------------------------
-;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"
-
- ;Read a value from an InstallOptions INI file
- !insertmacro MUI_INSTALLOPTIONS_READ $INI_VALUE "ioC.ini" "Field 2" "State"
-
- ;Display a messagebox if check box was checked
- StrCmp $INI_VALUE "1" "" +2
- MessageBox MB_OK "You checked the check box, here is the MessageBox..."
-
-SectionEnd
-
-;--------------------------------
-;Installer Functions
-
-Function .onInit
-
- ;Extract InstallOptions INI files
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioA.ini"
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioB.ini"
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
-
-FunctionEnd
-
-LangString TEXT_IO_TITLE ${LANG_ENGLISH} "InstallOptions page"
-LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "This is a page created using the InstallOptions plug-in."
-
-Function CustomPageA
-
- !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"
-
-FunctionEnd
-
-Function CustomPageB
-
- !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioB.ini"
-
-FunctionEnd
-
-Function CustomPageC
-
- !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioC.ini"
-
-FunctionEnd
-
-;--------------------------------
-;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"
-
+;NSIS Modern User Interface
+;InstallOptions Example Script
+;Written by Joost Verburg
+
+;---------------------
+;Header files
+
+ !include "MUI.nsh"
+ !include "InstallOptions.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "InstallOptions.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
+ Page custom CustomPageA
+ !insertmacro MUI_PAGE_COMPONENTS
+ Page custom CustomPageB
+ !insertmacro MUI_PAGE_DIRECTORY
+ Page custom CustomPageC
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;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.
+
+ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
+
+ ReserveFile "ioA.ini"
+ ReserveFile "ioB.ini"
+ ReserveFile "ioC.ini"
+
+;--------------------------------
+;Variables
+
+ Var IniValue
+
+;--------------------------------
+;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"
+
+ ;Read a value from an InstallOptions INI file
+ !insertmacro INSTALLOPTIONS_READ $IniValue "ioC.ini" "Field 2" "State"
+
+ ;Display a messagebox if check box was checked
+ StrCmp $IniValue "1" "" +2
+ MessageBox MB_OK "You checked the check box, here is the MessageBox..."
+
+SectionEnd
+
+;--------------------------------
+;Installer Functions
+
+Function .onInit
+
+ ;Extract InstallOptions INI files
+ !insertmacro INSTALLOPTIONS_EXTRACT "ioA.ini"
+ !insertmacro INSTALLOPTIONS_EXTRACT "ioB.ini"
+ !insertmacro INSTALLOPTIONS_EXTRACT "ioC.ini"
+
+FunctionEnd
+
+LangString TEXT_IO_TITLE ${LANG_ENGLISH} "InstallOptions page"
+LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "This is a page created using the InstallOptions plug-in."
+
+Function CustomPageA
+
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
+ !insertmacro INSTALLOPTIONS_DISPLAY "ioA.ini"
+
+FunctionEnd
+
+Function CustomPageB
+
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
+ !insertmacro INSTALLOPTIONS_DISPLAY "ioB.ini"
+
+FunctionEnd
+
+Function CustomPageC
+
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
+ !insertmacro INSTALLOPTIONS_DISPLAY "ioC.ini"
+
+FunctionEnd
+
+;--------------------------------
+;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/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi
index f6af1bf..3e1ee7f 100755
--- a/Examples/Modern UI/MultiLanguage.nsi
+++ b/Examples/Modern UI/MultiLanguage.nsi
@@ -1,174 +1,174 @@
-;NSIS Modern User Interface
-;Multilingual Example Script
-;Written by Joost Verburg
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "Modern UI Test"
- OutFile "MultiLanguage.exe"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\Modern UI Test"
-
- ;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\Modern UI Test" ""
-
-;--------------------------------
-;Interface Settings
-
- !define MUI_ABORTWARNING
-
-;--------------------------------
-;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_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" ;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"
-
-;--------------------------------
-;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
-
+;NSIS Modern User Interface
+;Multilingual Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "MultiLanguage.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;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_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" ;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"
+
+;--------------------------------
+;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/Examples/Modern UI/StartMenu.nsi b/Examples/Modern UI/StartMenu.nsi
index 155a621..373d97c 100755
--- a/Examples/Modern UI/StartMenu.nsi
+++ b/Examples/Modern UI/StartMenu.nsi
@@ -1,127 +1,127 @@
-;NSIS Modern User Interface
-;Start Menu Folder Selection Example Script
-;Written by Joost Verburg
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "Modern UI Test"
- OutFile "StartMenu.exe"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\Modern UI Test"
-
- ;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\Modern UI Test" ""
-
- ;Vista redirects $SMPROGRAMS to all users without this
- RequestExecutionLevel admin
-
-;--------------------------------
-;Variables
-
- Var MUI_TEMP
- Var STARTMENU_FOLDER
-
-;--------------------------------
-;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 $STARTMENU_FOLDER
-
- !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\$STARTMENU_FOLDER"
- CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\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 $MUI_TEMP
-
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- startMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors startMenuDeleteLoopDone
-
- StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
- startMenuDeleteLoopDone:
-
- DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
-
+;NSIS Modern User Interface
+;Start Menu Folder Selection Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "StartMenu.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+ ;Vista redirects $SMPROGRAMS to all users without this
+ RequestExecutionLevel admin
+
+;--------------------------------
+;Variables
+
+ Var MUI_TEMP
+ Var STARTMENU_FOLDER
+
+;--------------------------------
+;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 $STARTMENU_FOLDER
+
+ !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\$STARTMENU_FOLDER"
+ CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\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 $MUI_TEMP
+
+ Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
+
+ ;Delete empty start menu parent diretories
+ StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
+
+ startMenuDeleteLoop:
+ ClearErrors
+ RMDir $MUI_TEMP
+ GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
+
+ IfErrors startMenuDeleteLoopDone
+
+ StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
+ startMenuDeleteLoopDone:
+
+ DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
+
SectionEnd \ No newline at end of file
diff --git a/Examples/Modern UI/WelcomeFinish.nsi b/Examples/Modern UI/WelcomeFinish.nsi
index bd0da8a..61e8a3b 100755
--- a/Examples/Modern UI/WelcomeFinish.nsi
+++ b/Examples/Modern UI/WelcomeFinish.nsi
@@ -1,89 +1,89 @@
-;NSIS Modern User Interface
-;Welcome/Finish Page Example Script
-;Written by Joost Verburg
-
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "Modern UI Test"
- OutFile "WelcomeFinish.exe"
-
- ;Default installation folder
- InstallDir "$PROGRAMFILES\Modern UI Test"
-
- ;Get installation folder from registry if available
- InstallDirRegKey HKCU "Software\Modern UI Test" ""
-
-;--------------------------------
-;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
+;NSIS Modern User Interface
+;Welcome/Finish Page Example Script
+;Written by Joost Verburg
+
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "Modern UI Test"
+ OutFile "WelcomeFinish.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\Modern UI Test"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKCU "Software\Modern UI Test" ""
+
+;--------------------------------
+;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/Examples/Modern UI/ioA.ini b/Examples/Modern UI/ioA.ini
index 5a85a77..6643b72 100755
--- a/Examples/Modern UI/ioA.ini
+++ b/Examples/Modern UI/ioA.ini
@@ -1,19 +1,19 @@
-[Settings]
-NumFields=2
-
-[Field 1]
-Type=label
-Text=Install Options Page A
-Left=0
-Right=-1
-Top=0
-Bottom=10
-
-[Field 2]
-Type=text
-Left=0
-Right=-1
-Top=20
-Bottom=100
-flags=MULTILINE|VSCROLL|READONLY
+[Settings]
+NumFields=2
+
+[Field 1]
+Type=label
+Text=Install Options Page A
+Left=0
+Right=-1
+Top=0
+Bottom=10
+
+[Field 2]
+Type=text
+Left=0
+Right=-1
+Top=20
+Bottom=100
+flags=MULTILINE|VSCROLL|READONLY
State="Description:\r\n\r\n1 - Show custom page A (where you are now)\r\n2 - Show the components page\r\n3 - Show custom page B\r\n4 - Show directory page\r\n5 - Show custom page C\r\n6 - Show installation progress" \ No newline at end of file
diff --git a/Examples/Modern UI/ioB.ini b/Examples/Modern UI/ioB.ini
index dd08924..298919f 100755
--- a/Examples/Modern UI/ioB.ini
+++ b/Examples/Modern UI/ioB.ini
@@ -1,10 +1,10 @@
-[Settings]
-NumFields=1
-
-[Field 1]
-Type=label
-Text=Install Options Page B
-Left=0
-Right=-1
-Top=0
+[Settings]
+NumFields=1
+
+[Field 1]
+Type=label
+Text=Install Options Page B
+Left=0
+Right=-1
+Top=0
Bottom=10 \ No newline at end of file
diff --git a/Examples/Modern UI/ioC.ini b/Examples/Modern UI/ioC.ini
index 4d4cdfe..07d4862 100755
--- a/Examples/Modern UI/ioC.ini
+++ b/Examples/Modern UI/ioC.ini
@@ -1,19 +1,19 @@
-[Settings]
-NumFields=2
-
-[Field 1]
-Type=label
-Text=Instal Options Page C
-Left=0
-Right=-1
-Top=0
-Bottom=10
-
-[Field 2]
-Type=checkbox
-Text=Display a MessageBox
-Left=0
-Right=-1
-Top=30
-Bottom=40
+[Settings]
+NumFields=2
+
+[Field 1]
+Type=label
+Text=Instal Options Page C
+Left=0
+Right=-1
+Top=0
+Bottom=10
+
+[Field 2]
+Type=checkbox
+Text=Display a MessageBox
+Left=0
+Right=-1
+Top=30
+Bottom=40
State=1 \ No newline at end of file
diff --git a/Examples/SConscript b/Examples/SConscript
index 5f506bc..2fa2a30 100755
--- a/Examples/SConscript
+++ b/Examples/SConscript
@@ -1,47 +1,47 @@
-examples = Split("""
- bigtest.nsi
- example1.nsi
- example2.nsi
- FileFunc.ini
- FileFunc.nsi
- FileFuncTest.nsi
- gfx.nsi
- languages.nsi
- Library.nsi
- LogicLib.nsi
- makensis.ini
- makensis.nsi
- Memento.nsi
- one-section.nsi
- primes.nsi
- rtest.nsi
- silent.nsi
- StrFunc.nsi
- TextFunc.ini
- TextFunc.nsi
- TextFuncTest.nsi
- UserVars.nsi
- VersionInfo.nsi
- viewhtml.nsi
- waplugin.nsi
- WordFunc.ini
- WordFunc.nsi
- WordFuncTest.nsi
-""")
-
-mui_examples = [
- 'Modern UI/Basic.nsi',
- 'Modern UI/HeaderBitmap.nsi',
- 'Modern UI/InstallOptions.nsi',
- 'Modern UI/MultiLanguage.nsi',
- 'Modern UI/StartMenu.nsi',
- 'Modern UI/WelcomeFinish.nsi',
- 'Modern UI/ioA.ini',
- 'Modern UI/ioB.ini',
- 'Modern UI/ioC.ini'
-]
-
-Import('env')
-
-env.DistributeExamples(examples)
-env.DistributeExamples(mui_examples, path='Modern UI')
+examples = Split("""
+ bigtest.nsi
+ example1.nsi
+ example2.nsi
+ FileFunc.ini
+ FileFunc.nsi
+ FileFuncTest.nsi
+ gfx.nsi
+ languages.nsi
+ Library.nsi
+ LogicLib.nsi
+ makensis.ini
+ makensis.nsi
+ Memento.nsi
+ one-section.nsi
+ primes.nsi
+ rtest.nsi
+ silent.nsi
+ StrFunc.nsi
+ TextFunc.ini
+ TextFunc.nsi
+ TextFuncTest.nsi
+ UserVars.nsi
+ VersionInfo.nsi
+ viewhtml.nsi
+ waplugin.nsi
+ WordFunc.ini
+ WordFunc.nsi
+ WordFuncTest.nsi
+""")
+
+mui_examples = [
+ 'Modern UI/Basic.nsi',
+ 'Modern UI/HeaderBitmap.nsi',
+ 'Modern UI/InstallOptions.nsi',
+ 'Modern UI/MultiLanguage.nsi',
+ 'Modern UI/StartMenu.nsi',
+ 'Modern UI/WelcomeFinish.nsi',
+ 'Modern UI/ioA.ini',
+ 'Modern UI/ioB.ini',
+ 'Modern UI/ioC.ini'
+]
+
+Import('env')
+
+env.DistributeExamples(examples)
+env.DistributeExamples(mui_examples, path='Modern UI')
diff --git a/Examples/StrFunc.nsi b/Examples/StrFunc.nsi
index 8f35237..f711809 100755
--- a/Examples/StrFunc.nsi
+++ b/Examples/StrFunc.nsi
@@ -1,634 +1,634 @@
-Name "NSIS StrFunc Example"
-OutFile "StrFunc.exe"
-ShowInstDetails show
-ShowUninstDetails show
-XPStyle on
-
-!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
+Name "NSIS StrFunc Example"
+OutFile "StrFunc.exe"
+ShowInstDetails show
+ShowUninstDetails show
+XPStyle on
+
+!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/Examples/TextFunc.ini b/Examples/TextFunc.ini
index d2a5f5c..5b9a7bc 100755
--- a/Examples/TextFunc.ini
+++ b/Examples/TextFunc.ini
@@ -1,130 +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
+[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/Examples/TextFunc.nsi b/Examples/TextFunc.nsi
index f66698b..8152625 100755
--- a/Examples/TextFunc.nsi
+++ b/Examples/TextFunc.nsi
@@ -1,842 +1,842 @@
-;_____________________________________________________________________________
-;
-; Text Functions
-;_____________________________________________________________________________
-;
-; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
-
-Name "Text Functions"
-OutFile "TextFunc.exe"
-Caption "$(^Name)"
-XPStyle on
-
-!include "WinMessages.nsh"
-!include "TextFunc.nsh"
-
-!insertmacro LineFind
-!insertmacro LineRead
-!insertmacro FileReadFromEnd
-!insertmacro LineSum
-!insertmacro FileJoin
-!insertmacro ConfigRead
-!insertmacro ConfigWrite
-!insertmacro FileRecode
-
-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 /NOUNLOAD "$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
+;_____________________________________________________________________________
+;
+; Text Functions
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Text Functions"
+OutFile "TextFunc.exe"
+Caption "$(^Name)"
+XPStyle on
+
+!include "WinMessages.nsh"
+!include "TextFunc.nsh"
+
+!insertmacro LineFind
+!insertmacro LineRead
+!insertmacro FileReadFromEnd
+!insertmacro LineSum
+!insertmacro FileJoin
+!insertmacro ConfigRead
+!insertmacro ConfigWrite
+!insertmacro FileRecode
+
+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 /NOUNLOAD "$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/Examples/TextFuncTest.nsi b/Examples/TextFuncTest.nsi
index 3565de2..fa6ae95 100755
--- a/Examples/TextFuncTest.nsi
+++ b/Examples/TextFuncTest.nsi
@@ -1,443 +1,443 @@
-;_____________________________________________________________________________
-;
-; Text Functions Test
-;_____________________________________________________________________________
-;
-; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
-
-Name "Text Functions Test"
-OutFile "TextFuncTest.exe"
-Caption "$(^Name)"
-ShowInstDetails show
-XPStyle on
-
-Var FUNCTION
-Var TEMPFILE1
-Var TEMPFILE2
-Var TEMPFILE3
-Var HANDLE
-Var OUT
-
-!include "TextFunc.nsh"
-
-!insertmacro LineFind
-!insertmacro LineRead
-!insertmacro FileReadFromEnd
-!insertmacro LineSum
-!insertmacro FileJoin
-!insertmacro TextCompare
-!insertmacro TextCompareS
-!insertmacro ConfigRead
-!insertmacro ConfigReadS
-!insertmacro ConfigWrite
-!insertmacro ConfigWriteS
-!insertmacro FileRecode
-!insertmacro TrimNewLines
-
-!insertmacro un.LineFind
-!insertmacro un.LineRead
-!insertmacro un.FileReadFromEnd
-!insertmacro un.LineSum
-!insertmacro un.FileJoin
-!insertmacro un.TextCompare
-!insertmacro un.TextCompareS
-!insertmacro un.ConfigRead
-!insertmacro un.ConfigReadS
-!insertmacro un.ConfigWrite
-!insertmacro un.ConfigWriteS
-!insertmacro un.FileRecode
-!insertmacro un.TrimNewLines
-
-
-
-;############### 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
- ${un.LineFind} '$TEMPFILE1' '/NUL' '1:-1' 'un.LineFindCallback'
- ${un.LineRead} '$TEMPFILE1' '-1' $OUT
- ${un.FileReadFromEnd} '$TEMPFILE1' 'un.FileReadFromEndCallback'
- ${un.LineSum} '$TEMPFILE1' $OUT
- ${un.FileJoin} '$TEMPFILE1' '$TEMPFILE2' '$TEMPFILE3'
- ${un.TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'un.TextCompareCallback'
- ${un.TextCompareS} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'un.TextCompareCallback'
- ${un.ConfigRead} '$TEMPFILE1' '3c=' $OUT
- ${un.ConfigReadS} '$TEMPFILE1' '3c=' $OUT
- ${un.ConfigWrite} '$TEMPFILE1' '5E=' 'e**' $OUT
- ${un.ConfigWriteS} '$TEMPFILE1' '5E=' 'e**' $OUT
- ${un.FileRecode} '$TEMPFILE1' 'CharToOem'
- ${un.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
+;_____________________________________________________________________________
+;
+; Text Functions Test
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Text Functions Test"
+OutFile "TextFuncTest.exe"
+Caption "$(^Name)"
+ShowInstDetails show
+XPStyle on
+
+Var FUNCTION
+Var TEMPFILE1
+Var TEMPFILE2
+Var TEMPFILE3
+Var HANDLE
+Var OUT
+
+!include "TextFunc.nsh"
+
+!insertmacro LineFind
+!insertmacro LineRead
+!insertmacro FileReadFromEnd
+!insertmacro LineSum
+!insertmacro FileJoin
+!insertmacro TextCompare
+!insertmacro TextCompareS
+!insertmacro ConfigRead
+!insertmacro ConfigReadS
+!insertmacro ConfigWrite
+!insertmacro ConfigWriteS
+!insertmacro FileRecode
+!insertmacro TrimNewLines
+
+!insertmacro un.LineFind
+!insertmacro un.LineRead
+!insertmacro un.FileReadFromEnd
+!insertmacro un.LineSum
+!insertmacro un.FileJoin
+!insertmacro un.TextCompare
+!insertmacro un.TextCompareS
+!insertmacro un.ConfigRead
+!insertmacro un.ConfigReadS
+!insertmacro un.ConfigWrite
+!insertmacro un.ConfigWriteS
+!insertmacro un.FileRecode
+!insertmacro un.TrimNewLines
+
+
+
+;############### 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
+ ${un.LineFind} '$TEMPFILE1' '/NUL' '1:-1' 'un.LineFindCallback'
+ ${un.LineRead} '$TEMPFILE1' '-1' $OUT
+ ${un.FileReadFromEnd} '$TEMPFILE1' 'un.FileReadFromEndCallback'
+ ${un.LineSum} '$TEMPFILE1' $OUT
+ ${un.FileJoin} '$TEMPFILE1' '$TEMPFILE2' '$TEMPFILE3'
+ ${un.TextCompare} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'un.TextCompareCallback'
+ ${un.TextCompareS} '$TEMPFILE1' '$TEMPFILE2' 'FastDiff' 'un.TextCompareCallback'
+ ${un.ConfigRead} '$TEMPFILE1' '3c=' $OUT
+ ${un.ConfigReadS} '$TEMPFILE1' '3c=' $OUT
+ ${un.ConfigWrite} '$TEMPFILE1' '5E=' 'e**' $OUT
+ ${un.ConfigWriteS} '$TEMPFILE1' '5E=' 'e**' $OUT
+ ${un.FileRecode} '$TEMPFILE1' 'CharToOem'
+ ${un.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/Examples/UserVars.nsi b/Examples/UserVars.nsi
index c39f7cb..5362dcd 100755
--- a/Examples/UserVars.nsi
+++ b/Examples/UserVars.nsi
@@ -1,67 +1,67 @@
-; UserVars.nsi
-;
-; This script shows you how to declare and user variables.
-
-;--------------------------------
-
- Name "User Variables Text"
- OutFile "UserVars.exe"
-
- InstallDir "$PROGRAMFILES\User Variables Test"
-
-;--------------------------------
-
- ;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
+; UserVars.nsi
+;
+; This script shows you how to declare and user variables.
+
+;--------------------------------
+
+ Name "User Variables Text"
+ OutFile "UserVars.exe"
+
+ InstallDir "$PROGRAMFILES\User Variables Test"
+
+;--------------------------------
+
+ ;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/Examples/VersionInfo.nsi b/Examples/VersionInfo.nsi
index 8d77509..035c5d3 100755
--- a/Examples/VersionInfo.nsi
+++ b/Examples/VersionInfo.nsi
@@ -1,29 +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" "© Fake company"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application"
- VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3"
-
-;--------------------------------
-
-Section ""
-
-SectionEnd
+; 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" "© Fake company"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application"
+ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3"
+
+;--------------------------------
+
+Section ""
+
+SectionEnd
diff --git a/Examples/WordFunc.ini b/Examples/WordFunc.ini
index 38fa8ab..38c748d 100755
--- a/Examples/WordFunc.ini
+++ b/Examples/WordFunc.ini
@@ -1,107 +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
-
+[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/Examples/WordFunc.nsi b/Examples/WordFunc.nsi
index bf38530..67acf29 100755
--- a/Examples/WordFunc.nsi
+++ b/Examples/WordFunc.nsi
@@ -1,543 +1,543 @@
-;_____________________________________________________________________________
-;
-; Word Functions
-;_____________________________________________________________________________
-;
-; 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
-
-Name "Word Functions"
-OutFile "WordFunc.exe"
-Caption "$(^Name)"
-XPStyle on
-
-Var INI
-Var HWND
-Var STATE
-
-!include "WinMessages.nsh"
-!include "WordFunc.nsh"
-
-!insertmacro WordFind
-!insertmacro WordFind2X
-!insertmacro WordReplace
-!insertmacro WordAdd
-!insertmacro WordInsert
-!insertmacro StrFilter
-!insertmacro VersionCompare
-!insertmacro VersionConvert
-
-Page Custom ShowCustom LeaveCustom
-
-Function ShowCustom
- InstallOptions::initDialog /NOUNLOAD "$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
+;_____________________________________________________________________________
+;
+; Word Functions
+;_____________________________________________________________________________
+;
+; 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Word Functions"
+OutFile "WordFunc.exe"
+Caption "$(^Name)"
+XPStyle on
+
+Var INI
+Var HWND
+Var STATE
+
+!include "WinMessages.nsh"
+!include "WordFunc.nsh"
+
+!insertmacro WordFind
+!insertmacro WordFind2X
+!insertmacro WordReplace
+!insertmacro WordAdd
+!insertmacro WordInsert
+!insertmacro StrFilter
+!insertmacro VersionCompare
+!insertmacro VersionConvert
+
+Page Custom ShowCustom LeaveCustom
+
+Function ShowCustom
+ InstallOptions::initDialog /NOUNLOAD "$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/Examples/WordFuncTest.nsi b/Examples/WordFuncTest.nsi
index f3141ba..56faca5 100755
--- a/Examples/WordFuncTest.nsi
+++ b/Examples/WordFuncTest.nsi
@@ -1,645 +1,645 @@
-;_____________________________________________________________________________
-;
-; Word Functions Test
-;_____________________________________________________________________________
-;
-; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
-
-Name "Word Functions Test"
-OutFile "WordFuncTest.exe"
-Caption "$(^Name)"
-ShowInstDetails show
-XPStyle on
-
-Var FUNCTION
-Var OUT
-
-!include "WordFunc.nsh"
-
-!insertmacro WordFind
-!insertmacro WordFindS
-!insertmacro WordFind2X
-!insertmacro WordFind2XS
-!insertmacro WordFind3X
-!insertmacro WordFind3XS
-!insertmacro WordReplace
-!insertmacro WordReplaceS
-!insertmacro WordAdd
-!insertmacro WordAddS
-!insertmacro WordInsert
-!insertmacro WordInsertS
-!insertmacro StrFilter
-!insertmacro StrFilterS
-!insertmacro VersionCompare
-!insertmacro VersionConvert
-
-!insertmacro un.WordFind
-!insertmacro un.WordFindS
-!insertmacro un.WordFind2X
-!insertmacro un.WordFind2XS
-!insertmacro un.WordFind3X
-!insertmacro un.WordFind3XS
-!insertmacro un.WordReplace
-!insertmacro un.WordReplaceS
-!insertmacro un.WordAdd
-!insertmacro un.WordAddS
-!insertmacro un.WordInsert
-!insertmacro un.WordInsertS
-!insertmacro un.StrFilter
-!insertmacro un.StrFilterS
-!insertmacro un.VersionCompare
-!insertmacro un.VersionConvert
-
-
-
-;############### 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
- ${un.WordFind} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT
- ${un.WordFindS} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT
- ${un.WordFind2X} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
- ${un.WordFind2XS} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
- ${un.WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
- ${un.WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
- ${un.WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
- ${un.WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
- ${un.WordAdd} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
- ${un.WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
- ${un.WordInsert} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
- ${un.WordInsertS} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
- ${un.StrFilter} '123abc 456DEF 7890|%#' '+' '' '' $OUT
- ${un.StrFilterS} '123abc 456DEF 7890|%#' '+' '' '' $OUT
- ${un.VersionCompare} '1.1.1.9' '1.1.1.01' $OUT
- ${un.VersionConvert} '9.0a' '' $OUT
-SectionEnd
+;_____________________________________________________________________________
+;
+; Word Functions Test
+;_____________________________________________________________________________
+;
+; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
+
+Name "Word Functions Test"
+OutFile "WordFuncTest.exe"
+Caption "$(^Name)"
+ShowInstDetails show
+XPStyle on
+
+Var FUNCTION
+Var OUT
+
+!include "WordFunc.nsh"
+
+!insertmacro WordFind
+!insertmacro WordFindS
+!insertmacro WordFind2X
+!insertmacro WordFind2XS
+!insertmacro WordFind3X
+!insertmacro WordFind3XS
+!insertmacro WordReplace
+!insertmacro WordReplaceS
+!insertmacro WordAdd
+!insertmacro WordAddS
+!insertmacro WordInsert
+!insertmacro WordInsertS
+!insertmacro StrFilter
+!insertmacro StrFilterS
+!insertmacro VersionCompare
+!insertmacro VersionConvert
+
+!insertmacro un.WordFind
+!insertmacro un.WordFindS
+!insertmacro un.WordFind2X
+!insertmacro un.WordFind2XS
+!insertmacro un.WordFind3X
+!insertmacro un.WordFind3XS
+!insertmacro un.WordReplace
+!insertmacro un.WordReplaceS
+!insertmacro un.WordAdd
+!insertmacro un.WordAddS
+!insertmacro un.WordInsert
+!insertmacro un.WordInsertS
+!insertmacro un.StrFilter
+!insertmacro un.StrFilterS
+!insertmacro un.VersionCompare
+!insertmacro un.VersionConvert
+
+
+
+;############### 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
+ ${un.WordFind} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT
+ ${un.WordFindS} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT
+ ${un.WordFind2X} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
+ ${un.WordFind2XS} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT
+ ${un.WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
+ ${un.WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT
+ ${un.WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
+ ${un.WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT
+ ${un.WordAdd} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
+ ${un.WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT
+ ${un.WordInsert} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
+ ${un.WordInsertS} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT
+ ${un.StrFilter} '123abc 456DEF 7890|%#' '+' '' '' $OUT
+ ${un.StrFilterS} '123abc 456DEF 7890|%#' '+' '' '' $OUT
+ ${un.VersionCompare} '1.1.1.9' '1.1.1.01' $OUT
+ ${un.VersionConvert} '9.0a' '' $OUT
+SectionEnd
diff --git a/Examples/bigtest.nsi b/Examples/bigtest.nsi
index 5ec2db1..aff4b07 100755
--- a/Examples/bigtest.nsi
+++ b/Examples/bigtest.nsi
@@ -1,306 +1,306 @@
-; 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" ""
-
-CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
-
-LicenseText "A test text, make sure it's all there"
-LicenseData "bigtest.nsi"
-
-;--------------------------------
-
-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 "POOOOOOOOOOOP"
- 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 "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_¢¢_does_not_exist
- IfErrors 0 NoError
- MessageBox MB_OK "could not read from HKCR\software\microsoft\xyz_¢¢_does_not_exist"
- Goto ErrorYay
- NoError:
- MessageBox MB_OK "read '$1' from HKCR\software\microsoft\xyz_¢¢_does_not_exist"
- ErrorYay:
-
-SectionEnd
-
-Section "Test CreateShortCut"
-
- SectionIn 1 2 3
-
- Call CSCTest
-
-SectionEnd
-
-SectionGroup Group2
-
-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
+; 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" ""
+
+CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
+
+LicenseText "A test text, make sure it's all there"
+LicenseData "bigtest.nsi"
+
+;--------------------------------
+
+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 "POOOOOOOOOOOP"
+ 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 "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_¢¢_does_not_exist
+ IfErrors 0 NoError
+ MessageBox MB_OK "could not read from HKCR\software\microsoft\xyz_¢¢_does_not_exist"
+ Goto ErrorYay
+ NoError:
+ MessageBox MB_OK "read '$1' from HKCR\software\microsoft\xyz_¢¢_does_not_exist"
+ ErrorYay:
+
+SectionEnd
+
+Section "Test CreateShortCut"
+
+ SectionIn 1 2 3
+
+ Call CSCTest
+
+SectionEnd
+
+SectionGroup Group2
+
+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/Examples/example1.nsi b/Examples/example1.nsi
index 6930262..61a6f3e 100755
--- a/Examples/example1.nsi
+++ b/Examples/example1.nsi
@@ -1,37 +1,37 @@
-; 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 $PROGRAMFILES\Example1
-
-;--------------------------------
-
-; 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
+; 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 $PROGRAMFILES\Example1
+
+;--------------------------------
+
+; 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/Examples/example2.nsi b/Examples/example2.nsi
index 2c4a794..393e0bd 100755
--- a/Examples/example2.nsi
+++ b/Examples/example2.nsi
@@ -1,89 +1,89 @@
-; 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"
-
-;--------------------------------
-
-; 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 "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
+; 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"
+
+;--------------------------------
+
+; 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 "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/Examples/gfx.nsi b/Examples/gfx.nsi
index aeaf624..e59f593 100755
--- a/Examples/gfx.nsi
+++ b/Examples/gfx.nsi
@@ -1,120 +1,120 @@
-; 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 100
-
-; 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"
-
-;--------------------------------
-
-; 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 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/<insert plugin name here> 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/<insert plugin name here> 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
-
+; 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 100
+
+; 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"
+
+;--------------------------------
+
+; 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 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/<insert plugin name here> 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/<insert plugin name here> 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/Examples/languages.nsi b/Examples/languages.nsi
index 18e6b12..9759653 100755
--- a/Examples/languages.nsi
+++ b/Examples/languages.nsi
@@ -1,177 +1,177 @@
-; languages.nsi
-;
-; This is an example of a multilingual installer
-; The user can select the language on startup
-
-;--------------------------------
-
-OutFile languages.exe
-
-XPStyle on
-
-;--------------------------------
-
-Page license
-Page components
-Page instfiles
-
-;--------------------------------
-
-; First is default
-LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.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_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_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_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_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_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_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_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
+; languages.nsi
+;
+; This is an example of a multilingual installer
+; The user can select the language on startup
+
+;--------------------------------
+
+OutFile languages.exe
+
+XPStyle on
+
+;--------------------------------
+
+Page license
+Page components
+Page instfiles
+
+;--------------------------------
+
+; First is default
+LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.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_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_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_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_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_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_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_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/Examples/makensis.ini b/Examples/makensis.ini
index be3933a..0b53bd5 100755
--- a/Examples/makensis.ini
+++ b/Examples/makensis.ini
@@ -1,21 +1,21 @@
-[Settings]
-NumFields=3
-[Field 1]
-Type=Label
-Left=0
-Right=-1
-Top=0
-Bottom=24
-[Field 2]
-Type=RadioButton
-Left=30
-Right=-1
-Top=50
-Bottom=58
-State=1
-[Field 3]
-Type=RadioButton
-Left=30
-Right=-1
-Top=70
+[Settings]
+NumFields=3
+[Field 1]
+Type=Label
+Left=0
+Right=-1
+Top=0
+Bottom=24
+[Field 2]
+Type=RadioButton
+Left=30
+Right=-1
+Top=50
+Bottom=58
+State=1
+[Field 3]
+Type=RadioButton
+Left=30
+Right=-1
+Top=70
Bottom=78 \ No newline at end of file
diff --git a/Examples/makensis.nsi b/Examples/makensis.nsi
index 11281d8..54f0023 100755
--- a/Examples/makensis.nsi
+++ b/Examples/makensis.nsi
@@ -1,1114 +1,1114 @@
-;NSIS Setup Script
-;--------------------------------
-
-!ifndef VERSION
- !define VERSION 'anonymous-build'
-!endif
-
-;--------------------------------
-;Configuration
-
-!ifdef OUTFILE
- OutFile "${OUTFILE}"
-!else
- OutFile ..\nsis-${VERSION}-setup.exe
-!endif
-
-SetCompressor /SOLID lzma
-
-InstType "Full"
-InstType "Lite"
-InstType "Minimal"
-
-InstallDir $PROGRAMFILES\NSIS
-InstallDirRegKey HKLM Software\NSIS ""
-
-RequestExecutionLevel admin
-
-;--------------------------------
-;Header Files
-
-!include "MUI.nsh"
-!include "Sections.nsh"
-!include "LogicLib.nsh"
-!include "Memento.nsh"
-
-;--------------------------------
-;Definitions
-
-!define SHCNE_ASSOCCHANGED 0x8000000
-!define SHCNF_IDLIST 0
-
-;--------------------------------
-;Configuration
-
-;Names
-Name "NSIS"
-Caption "NSIS ${VERSION} Setup"
-
-;Memento Settings
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
-
-;Interface Settings
-!define MUI_ABORTWARNING
-
-!define MUI_HEADERIMAGE
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis.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 2 includes a new 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"
-
-;--------------------------------
-;Reserve Files
-
- ;These files should be inserted before other files in the data block
-
- ReserveFile "makensis.ini"
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-;Installer Sections
-
-${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
-
- SetOverwrite on
- File ..\makensis.exe
- File ..\makensisw.exe
- File ..\COPYING
- File ..\NSIS.chm
- File ..\NSIS.exe
- File /nonfatal ..\NSIS.exe.manifest
-
- IfFileExists $INSTDIR\nsisconf.nsi "" +2
- Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
- SetOverwrite off
- File ..\nsisconf.nsh
- SetOverwrite on
-
- SetOutPath $INSTDIR\Stubs
- File ..\Stubs\bzip2
- File ..\Stubs\bzip2_solid
- File ..\Stubs\lzma
- File ..\Stubs\lzma_solid
- File ..\Stubs\zlib
- File ..\Stubs\zlib_solid
- File ..\Stubs\uninst
-
- 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
-
- SetOutPath $INSTDIR\Docs\StrFunc
- File ..\Docs\StrFunc\StrFunc.txt
-
- SetOutPath $INSTDIR\Docs\makensisw
- File ..\Docs\makensisw\*.txt
-
- SetOutPath $INSTDIR\Menu
- File ..\Menu\*.html
- SetOutPath $INSTDIR\Menu\images
- File ..\Menu\images\clear.gif
- File ..\Menu\images\header.gif
- File ..\Menu\images\line.gif
- File ..\Menu\images\menu.gif
- File ..\Menu\images\menud.gif
- File ..\Menu\images\site.gif
-
- Delete $INSTDIR\makensis.htm
- Delete $INSTDIR\Docs\*.html
- Delete $INSTDIR\Docs\style.css
- RMDir $INSTDIR\Docs
-
- SetOutPath $INSTDIR\Bin
- File ..\Bin\LibraryLocal.exe
- File ..\Bin\RegTool.bin
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\TypeLib.dll
-
- ReadRegStr $R0 HKCR ".nsi" ""
- StrCmp $R0 "NSISFile" 0 +2
- DeleteRegKey HKCR "NSISFile"
-
- WriteRegStr HKCR ".nsi" "" "NSIS.Script"
- WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
- WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
- ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
- StrCmp $R0 "" 0 no_nsiopen
- WriteRegStr HKCR "NSIS.Script\shell" "" "open"
- WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
- no_nsiopen:
- 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 "NSIS.Header" "" "NSIS Header File"
- WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
- ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
- StrCmp $R0 "" 0 no_nshopen
- WriteRegStr HKCR "NSIS.Header\shell" "" "open"
- WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
- no_nshopen:
-
- System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
-
-${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\makensis.ini
- 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
-
- 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.h
- File ..\Examples\Plugin\exdll_with_unit.dpr
- File ..\Examples\Plugin\extdll.inc
- File ..\Examples\Plugin\nsis.pas
-
-${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
- CreateDirectory $SMPROGRAMS\NSIS
-
- CreateShortCut "$SMPROGRAMS\NSIS\NSIS Menu.lnk" "$INSTDIR\NSIS.exe" ""
-
- CreateShortCut "$SMPROGRAMS\NSIS\MakeNSISW (Compiler GUI).lnk" "$INSTDIR\makensisw.exe"
-
- CreateShortCut "$SMPROGRAMS\NSIS\NSIS Documentation.lnk" "$INSTDIR\NSIS.chm"
- WriteINIStr "$SMPROGRAMS\NSIS\NSIS Site.url" "InternetShortcut" "URL" "http://nsis.sourceforge.net/"
- CreateShortCut "$SMPROGRAMS\NSIS\Uninstall NSIS.lnk" "$INSTDIR\uninst-nsis.exe"
-
-!endif
-
- CreateShortCut "$DESKTOP\Nullsoft Install System.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\InstallOptions.nsi"
- File "..\Examples\Modern UI\ioA.ini"
- File "..\Examples\Modern UI\ioB.ini"
- File "..\Examples\Modern UI\ioC.ini"
- 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\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
-
- !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
- mui:
- SetOutPath "$INSTDIR\Contrib\Language files"
- File "..\Contrib\Language files\*.nsh"
- nomui:
-
-${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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\Banner.dll
- 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
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\LangDLL.dll
-${MementoSectionEnd}
-
-${MementoSection} "nsExec" SecPluginsnsExec
-
- SetDetailsPrint textonly
- DetailPrint "Installing Plug-ins | nsExec..."
- SetDetailsPrint listonly
-
- SectionIn 1
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\nsExec.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\splash.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\advsplash.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\BgImage.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\InstallOptions.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\nsDialogs.dll
- SetOutPath $INSTDIR\Examples\nsDialogs
- File ..\Examples\nsDialogs\example.nsi
- File ..\Examples\nsDialogs\InstallOptions.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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\Math.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\nsisdl.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\System.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\StartMenu.dll
- 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
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\UserInfo.dll
- SetOutPath $INSTDIR\Examples\UserInfo
- File ..\Examples\UserInfo\UserInfo.nsi
-${MementoSectionEnd}
-
-${MementoSection} "Dialer" SecPluginsDialer
-
- SetDetailsPrint textonly
- DetailPrint "Installing Plug-ins | Dialer..."
- SetDetailsPrint listonly
-
- SectionIn 1
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\Dialer.dll
- SetOutPath $INSTDIR\Docs\Dialer
- File ..\Docs\Dialer\Dialer.txt
-${MementoSectionEnd}
-
-${MementoSection} "VPatch" SecPluginsVPatch
-
- SetDetailsPrint textonly
- DetailPrint "Installing Plug-ins | VPatch..."
- SetDetailsPrint listonly
-
- SectionIn 1
-
- SetOutPath $INSTDIR\Plugins
- File ..\Plugins\VPatch.dll
- 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
-
- !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
-
- mui:
-
- SetDetailsPrint textonly
- DetailPrint "Configuring Modern UI..."
- SetDetailsPrint listonly
-
- !insertmacro SectionFlagIsSet ${SecLangFiles} ${SF_SELECTED} langfiles nolangfiles
-
- nolangfiles:
-
- SetOutPath "$INSTDIR\Contrib\Language files"
- File "..\Contrib\Language files\English.nlf"
- SetOutPath "$INSTDIR\Contrib\Language files"
- File "..\Contrib\Language files\English.nsh"
-
- langfiles:
-
- !insertmacro SectionFlagIsSet ${SecGraphics} ${SF_SELECTED} graphics nographics
-
- nographics:
-
- SetOutPath $INSTDIR\Contrib\Graphics
- 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"
-
- graphics:
-
- nomui:
-
- 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 "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString" '"$INSTDIR\uninst-nsis.exe"'
- WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "InstallLocation" "$INSTDIR"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayName" "Nullsoft Install System"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayIcon" "$INSTDIR\NSIS.exe,0"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayVersion" "${VERSION}"
-!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMajor" "${VER_MAJOR}"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMinor" "${VER_MINOR}.${VER_REVISION}"
-!endif
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "URLInfoAbout" "http://nsis.sourceforge.net/"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "HelpLink" "http://nsis.sourceforge.net/Support"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoModify" "1"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoRepair" "1"
-
-!ifndef NO_STARTMENUSHORTCUTS
- IfFileExists $SMPROGRAMS\NSIS "" no_startshortcuts
-
- SetDetailsPrint textonly
- DetailPrint "Creating Shortcuts..."
- SetDetailsPrint listonly
-
- IfFileExists $INSTDIR\Examples 0 +2
- CreateShortCut "$SMPROGRAMS\NSIS\NSIS Examples Directory.lnk" "$INSTDIR\Examples"
-
- ; MakeNSISW
- CreateDirectory $SMPROGRAMS\NSIS\Contrib
- CreateShortCut "$SMPROGRAMS\NSIS\Contrib\MakeNSISw Readme.lnk" "$INSTDIR\Docs\makensisw\readme.txt"
-
- ; ZIP2EXE
- IfFileExists "$INSTDIR\Bin\zip2exe.exe" 0 +2
- CreateShortCut "$SMPROGRAMS\NSIS\Contrib\zip2exe (Create SFX).lnk" "$INSTDIR\Bin\zip2exe.exe"
-
- ; Modern UI
- Push "Modern UI"
- Call AddReadmeToStartMenu
-
- ; Splash
- Push Splash
- Call AddReadmeToStartMenu
-
- ; Advanced splash
- Push AdvSplash
- Call AddReadmeToStartMenu
-
- ; Math
- Push Math
- Call AddReadmeToStartMenu
-
- ; NSISdl
- Push NSISdl
- Call AddReadmeToStartMenu
-
- ; nsExec
- Push nsExec
- Call AddReadmeToStartMenu
-
- ; StartMenu
- Push StartMenu
- Call AddReadmeToStartMenu
-
- ; BgImage
- Push BgImage
- Call AddReadmeToStartMenu
-
- ; Banner
- Push Banner
- Call AddReadmeToStartMenu
-
- ; System
- Push System
- Call AddReadmeToStartMenu
-
- ; VPatch
- Push VPatch
- Call AddReadmeToStartMenu
-
- ; InstallOptions
- Push InstallOptions
- Call AddReadmeToStartMenu
-
- no_startshortcuts:
-!endif
-
- 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
-
-!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
-
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "makensis.ini"
-
-!endif
-
- ${MementoSectionRestore}
-
-FunctionEnd
-
-!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
-
-Function PageReinstall
-
- ReadRegStr $R0 HKLM "Software\NSIS" ""
-
- StrCmp $R0 "" 0 +2
- Abort
-
- ;Detect version
- ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMajor"
- IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
- minor_check:
- ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMinor"
- IntCmp $R0 ${VER_MINOR} revision_check new_version older_version
- revision_check:
- ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionRevision"
- IntCmp $R0 ${VER_REVISION} build_check new_version older_version
- build_check:
- ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionBuild"
- IntCmp $R0 ${VER_BUILD} same_version new_version older_version
-
- new_version:
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 1" "Text" "An older 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."
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 2" "Text" "Uninstall before installing"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 3" "Text" "Do not uninstall"
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
- StrCpy $R0 "1"
- Goto reinst_start
-
- older_version:
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 1" "Text" "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."
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 2" "Text" "Uninstall before installing"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 3" "Text" "Do not uninstall"
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
- StrCpy $R0 "1"
- Goto reinst_start
-
- same_version:
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 1" "Text" "NSIS ${VERSION} is already installed. Select the operation you want to perform and click Next to continue."
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 2" "Text" "Add/Reinstall components"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 3" "Text" "Uninstall NSIS"
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
- StrCpy $R0 "2"
-
- reinst_start:
-
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "makensis.ini"
-
-FunctionEnd
-
-Function PageLeaveReinstall
-
- !insertmacro MUI_INSTALLOPTIONS_READ $R1 "makensis.ini" "Field 2" "State"
-
- StrCmp $R0 "1" 0 +2
- StrCmp $R1 "1" reinst_uninstall reinst_done
-
- StrCmp $R0 "2" 0 +3
- StrCmp $R1 "1" reinst_done reinst_uninstall
-
- reinst_uninstall:
- ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString"
-
- ;Run uninstaller
- HideWindow
-
- ClearErrors
- ExecWait '$R1 _?=$INSTDIR'
-
- IfErrors no_remove_uninstaller
- IfFileExists "$INSTDIR\makensis.exe" no_remove_uninstaller
-
- Delete $R1
- RMDir $INSTDIR
-
- no_remove_uninstaller:
-
- StrCmp $R0 "2" 0 +2
- Quit
-
- BringToFront
-
- reinst_done:
-
-FunctionEnd
-
-!endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
-
-!ifndef NO_STARTMENUSHORTCUTS
-Function AddReadmeToStartMenu
- Pop $0
- StrCpy $1 "$0 Readme"
- IfFileExists $INSTDIR\Docs\$0\$0.txt 0 +3
- StrCpy $0 Docs\$0\$0.txt
- Goto create
- IfFileExists $INSTDIR\Docs\$0\$0.html 0 +3
- StrCpy $0 Docs\$0\$0.html
- Goto create
- IfFileExists $INSTDIR\Docs\$0\Readme.txt 0 +3
- StrCpy $0 Docs\$0\Readme.txt
- Goto create
- IfFileExists $INSTDIR\Docs\$0\Readme.html 0 done
- StrCpy $0 Docs\$0\Readme.html
- create:
- CreateShortCut $SMPROGRAMS\NSIS\Contrib\$1.lnk $INSTDIR\$0
- done:
-FunctionEnd
-!endif
-
-Function ShowReleaseNotes
- ${If} ${FileExists} $WINDIR\hh.exe
- StrCpy $0 $WINDIR\hh.exe
- Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
- ${Else}
- SearchPath $0 hh.exe
- ${If} ${FileExists} $0
- Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
- ${Else}
- ExecShell "open" "http://nsis.sourceforge.net/Docs/AppendixF.html#F.1"
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-;--------------------------------
-;Uninstaller Section
-
-Section Uninstall
-
- SetDetailsPrint textonly
- DetailPrint "Uninstalling NSI Development Shell Extensions..."
- SetDetailsPrint listonly
-
- IfFileExists $INSTDIR\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
-
- ReadRegStr $R0 HKCR ".nsi" ""
- StrCmp $R0 "NSIS.Script" 0 +2
- DeleteRegKey HKCR ".nsi"
-
- ReadRegStr $R0 HKCR ".nsh" ""
- StrCmp $R0 "NSIS.Header" 0 +2
- DeleteRegKey HKCR ".nsh"
-
- DeleteRegKey HKCR "NSIS.Script"
- DeleteRegKey HKCR "NSIS.Header"
-
- System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
-
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
- DeleteRegKey HKLM "Software\NSIS"
-
- SetDetailsPrint textonly
- DetailPrint "Deleting Files..."
- SetDetailsPrint listonly
-
- RMDir /r $SMPROGRAMS\NSIS
- Delete "$DESKTOP\Nullsoft Install System.lnk"
- Delete $INSTDIR\makensis.exe
- Delete $INSTDIR\makensisw.exe
- Delete $INSTDIR\NSIS.exe
- 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
+;NSIS Setup Script
+;--------------------------------
+
+!ifndef VERSION
+ !define VERSION 'anonymous-build'
+!endif
+
+;--------------------------------
+;Configuration
+
+!ifdef OUTFILE
+ OutFile "${OUTFILE}"
+!else
+ OutFile ..\nsis-${VERSION}-setup.exe
+!endif
+
+SetCompressor /SOLID lzma
+
+InstType "Full"
+InstType "Lite"
+InstType "Minimal"
+
+InstallDir $PROGRAMFILES\NSIS
+InstallDirRegKey HKLM Software\NSIS ""
+
+RequestExecutionLevel admin
+
+;--------------------------------
+;Header Files
+
+!include "MUI.nsh"
+!include "Sections.nsh"
+!include "LogicLib.nsh"
+!include "Memento.nsh"
+
+;--------------------------------
+;Definitions
+
+!define SHCNE_ASSOCCHANGED 0x8000000
+!define SHCNF_IDLIST 0
+
+;--------------------------------
+;Configuration
+
+;Names
+Name "NSIS"
+Caption "NSIS ${VERSION} Setup"
+
+;Memento Settings
+!define MEMENTO_REGISTRY_ROOT HKLM
+!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
+
+;Interface Settings
+!define MUI_ABORTWARNING
+
+!define MUI_HEADERIMAGE
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis.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 2 includes a new 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"
+
+;--------------------------------
+;Reserve Files
+
+ ;These files should be inserted before other files in the data block
+
+ ReserveFile "makensis.ini"
+ !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
+
+;--------------------------------
+;Installer Sections
+
+${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
+
+ SetOverwrite on
+ File ..\makensis.exe
+ File ..\makensisw.exe
+ File ..\COPYING
+ File ..\NSIS.chm
+ File ..\NSIS.exe
+ File /nonfatal ..\NSIS.exe.manifest
+
+ IfFileExists $INSTDIR\nsisconf.nsi "" +2
+ Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
+ SetOverwrite off
+ File ..\nsisconf.nsh
+ SetOverwrite on
+
+ SetOutPath $INSTDIR\Stubs
+ File ..\Stubs\bzip2
+ File ..\Stubs\bzip2_solid
+ File ..\Stubs\lzma
+ File ..\Stubs\lzma_solid
+ File ..\Stubs\zlib
+ File ..\Stubs\zlib_solid
+ File ..\Stubs\uninst
+
+ 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
+
+ SetOutPath $INSTDIR\Docs\StrFunc
+ File ..\Docs\StrFunc\StrFunc.txt
+
+ SetOutPath $INSTDIR\Docs\makensisw
+ File ..\Docs\makensisw\*.txt
+
+ SetOutPath $INSTDIR\Menu
+ File ..\Menu\*.html
+ SetOutPath $INSTDIR\Menu\images
+ File ..\Menu\images\clear.gif
+ File ..\Menu\images\header.gif
+ File ..\Menu\images\line.gif
+ File ..\Menu\images\menu.gif
+ File ..\Menu\images\menud.gif
+ File ..\Menu\images\site.gif
+
+ Delete $INSTDIR\makensis.htm
+ Delete $INSTDIR\Docs\*.html
+ Delete $INSTDIR\Docs\style.css
+ RMDir $INSTDIR\Docs
+
+ SetOutPath $INSTDIR\Bin
+ File ..\Bin\LibraryLocal.exe
+ File ..\Bin\RegTool.bin
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\TypeLib.dll
+
+ ReadRegStr $R0 HKCR ".nsi" ""
+ StrCmp $R0 "NSISFile" 0 +2
+ DeleteRegKey HKCR "NSISFile"
+
+ WriteRegStr HKCR ".nsi" "" "NSIS.Script"
+ WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
+ WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
+ ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
+ StrCmp $R0 "" 0 no_nsiopen
+ WriteRegStr HKCR "NSIS.Script\shell" "" "open"
+ WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
+ no_nsiopen:
+ 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 "NSIS.Header" "" "NSIS Header File"
+ WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
+ ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
+ StrCmp $R0 "" 0 no_nshopen
+ WriteRegStr HKCR "NSIS.Header\shell" "" "open"
+ WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
+ no_nshopen:
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
+
+${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\makensis.ini
+ 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
+
+ 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.h
+ File ..\Examples\Plugin\exdll_with_unit.dpr
+ File ..\Examples\Plugin\extdll.inc
+ File ..\Examples\Plugin\nsis.pas
+
+${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
+ CreateDirectory $SMPROGRAMS\NSIS
+
+ CreateShortCut "$SMPROGRAMS\NSIS\NSIS Menu.lnk" "$INSTDIR\NSIS.exe" ""
+
+ CreateShortCut "$SMPROGRAMS\NSIS\MakeNSISW (Compiler GUI).lnk" "$INSTDIR\makensisw.exe"
+
+ CreateShortCut "$SMPROGRAMS\NSIS\NSIS Documentation.lnk" "$INSTDIR\NSIS.chm"
+ WriteINIStr "$SMPROGRAMS\NSIS\NSIS Site.url" "InternetShortcut" "URL" "http://nsis.sourceforge.net/"
+ CreateShortCut "$SMPROGRAMS\NSIS\Uninstall NSIS.lnk" "$INSTDIR\uninst-nsis.exe"
+
+!endif
+
+ CreateShortCut "$DESKTOP\Nullsoft Install System.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\InstallOptions.nsi"
+ File "..\Examples\Modern UI\ioA.ini"
+ File "..\Examples\Modern UI\ioB.ini"
+ File "..\Examples\Modern UI\ioC.ini"
+ 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\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
+
+ !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
+ mui:
+ SetOutPath "$INSTDIR\Contrib\Language files"
+ File "..\Contrib\Language files\*.nsh"
+ nomui:
+
+${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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\Banner.dll
+ 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
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\LangDLL.dll
+${MementoSectionEnd}
+
+${MementoSection} "nsExec" SecPluginsnsExec
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | nsExec..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\nsExec.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\splash.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\advsplash.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\BgImage.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\InstallOptions.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\nsDialogs.dll
+ SetOutPath $INSTDIR\Examples\nsDialogs
+ File ..\Examples\nsDialogs\example.nsi
+ File ..\Examples\nsDialogs\InstallOptions.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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\Math.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\nsisdl.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\System.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\StartMenu.dll
+ 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
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\UserInfo.dll
+ SetOutPath $INSTDIR\Examples\UserInfo
+ File ..\Examples\UserInfo\UserInfo.nsi
+${MementoSectionEnd}
+
+${MementoSection} "Dialer" SecPluginsDialer
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | Dialer..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\Dialer.dll
+ SetOutPath $INSTDIR\Docs\Dialer
+ File ..\Docs\Dialer\Dialer.txt
+${MementoSectionEnd}
+
+${MementoSection} "VPatch" SecPluginsVPatch
+
+ SetDetailsPrint textonly
+ DetailPrint "Installing Plug-ins | VPatch..."
+ SetDetailsPrint listonly
+
+ SectionIn 1
+
+ SetOutPath $INSTDIR\Plugins
+ File ..\Plugins\VPatch.dll
+ 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
+
+ !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
+
+ mui:
+
+ SetDetailsPrint textonly
+ DetailPrint "Configuring Modern UI..."
+ SetDetailsPrint listonly
+
+ !insertmacro SectionFlagIsSet ${SecLangFiles} ${SF_SELECTED} langfiles nolangfiles
+
+ nolangfiles:
+
+ SetOutPath "$INSTDIR\Contrib\Language files"
+ File "..\Contrib\Language files\English.nlf"
+ SetOutPath "$INSTDIR\Contrib\Language files"
+ File "..\Contrib\Language files\English.nsh"
+
+ langfiles:
+
+ !insertmacro SectionFlagIsSet ${SecGraphics} ${SF_SELECTED} graphics nographics
+
+ nographics:
+
+ SetOutPath $INSTDIR\Contrib\Graphics
+ 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"
+
+ graphics:
+
+ nomui:
+
+ 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 "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString" '"$INSTDIR\uninst-nsis.exe"'
+ WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "InstallLocation" "$INSTDIR"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayName" "Nullsoft Install System"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayIcon" "$INSTDIR\NSIS.exe,0"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayVersion" "${VERSION}"
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMajor" "${VER_MAJOR}"
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMinor" "${VER_MINOR}.${VER_REVISION}"
+!endif
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "URLInfoAbout" "http://nsis.sourceforge.net/"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "HelpLink" "http://nsis.sourceforge.net/Support"
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoModify" "1"
+ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoRepair" "1"
+
+!ifndef NO_STARTMENUSHORTCUTS
+ IfFileExists $SMPROGRAMS\NSIS "" no_startshortcuts
+
+ SetDetailsPrint textonly
+ DetailPrint "Creating Shortcuts..."
+ SetDetailsPrint listonly
+
+ IfFileExists $INSTDIR\Examples 0 +2
+ CreateShortCut "$SMPROGRAMS\NSIS\NSIS Examples Directory.lnk" "$INSTDIR\Examples"
+
+ ; MakeNSISW
+ CreateDirectory $SMPROGRAMS\NSIS\Contrib
+ CreateShortCut "$SMPROGRAMS\NSIS\Contrib\MakeNSISw Readme.lnk" "$INSTDIR\Docs\makensisw\readme.txt"
+
+ ; ZIP2EXE
+ IfFileExists "$INSTDIR\Bin\zip2exe.exe" 0 +2
+ CreateShortCut "$SMPROGRAMS\NSIS\Contrib\zip2exe (Create SFX).lnk" "$INSTDIR\Bin\zip2exe.exe"
+
+ ; Modern UI
+ Push "Modern UI"
+ Call AddReadmeToStartMenu
+
+ ; Splash
+ Push Splash
+ Call AddReadmeToStartMenu
+
+ ; Advanced splash
+ Push AdvSplash
+ Call AddReadmeToStartMenu
+
+ ; Math
+ Push Math
+ Call AddReadmeToStartMenu
+
+ ; NSISdl
+ Push NSISdl
+ Call AddReadmeToStartMenu
+
+ ; nsExec
+ Push nsExec
+ Call AddReadmeToStartMenu
+
+ ; StartMenu
+ Push StartMenu
+ Call AddReadmeToStartMenu
+
+ ; BgImage
+ Push BgImage
+ Call AddReadmeToStartMenu
+
+ ; Banner
+ Push Banner
+ Call AddReadmeToStartMenu
+
+ ; System
+ Push System
+ Call AddReadmeToStartMenu
+
+ ; VPatch
+ Push VPatch
+ Call AddReadmeToStartMenu
+
+ ; InstallOptions
+ Push InstallOptions
+ Call AddReadmeToStartMenu
+
+ no_startshortcuts:
+!endif
+
+ 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
+
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "makensis.ini"
+
+!endif
+
+ ${MementoSectionRestore}
+
+FunctionEnd
+
+!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+
+Function PageReinstall
+
+ ReadRegStr $R0 HKLM "Software\NSIS" ""
+
+ StrCmp $R0 "" 0 +2
+ Abort
+
+ ;Detect version
+ ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMajor"
+ IntCmp $R0 ${VER_MAJOR} minor_check new_version older_version
+ minor_check:
+ ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMinor"
+ IntCmp $R0 ${VER_MINOR} revision_check new_version older_version
+ revision_check:
+ ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionRevision"
+ IntCmp $R0 ${VER_REVISION} build_check new_version older_version
+ build_check:
+ ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionBuild"
+ IntCmp $R0 ${VER_BUILD} same_version new_version older_version
+
+ new_version:
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 1" "Text" "An older 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."
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 2" "Text" "Uninstall before installing"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 3" "Text" "Do not uninstall"
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
+ StrCpy $R0 "1"
+ Goto reinst_start
+
+ older_version:
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 1" "Text" "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."
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 2" "Text" "Uninstall before installing"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 3" "Text" "Do not uninstall"
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
+ StrCpy $R0 "1"
+ Goto reinst_start
+
+ same_version:
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 1" "Text" "NSIS ${VERSION} is already installed. Select the operation you want to perform and click Next to continue."
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 2" "Text" "Add/Reinstall components"
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "makensis.ini" "Field 3" "Text" "Uninstall NSIS"
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
+ StrCpy $R0 "2"
+
+ reinst_start:
+
+ !insertmacro MUI_INSTALLOPTIONS_DISPLAY "makensis.ini"
+
+FunctionEnd
+
+Function PageLeaveReinstall
+
+ !insertmacro MUI_INSTALLOPTIONS_READ $R1 "makensis.ini" "Field 2" "State"
+
+ StrCmp $R0 "1" 0 +2
+ StrCmp $R1 "1" reinst_uninstall reinst_done
+
+ StrCmp $R0 "2" 0 +3
+ StrCmp $R1 "1" reinst_done reinst_uninstall
+
+ reinst_uninstall:
+ ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString"
+
+ ;Run uninstaller
+ HideWindow
+
+ ClearErrors
+ ExecWait '$R1 _?=$INSTDIR'
+
+ IfErrors no_remove_uninstaller
+ IfFileExists "$INSTDIR\makensis.exe" no_remove_uninstaller
+
+ Delete $R1
+ RMDir $INSTDIR
+
+ no_remove_uninstaller:
+
+ StrCmp $R0 "2" 0 +2
+ Quit
+
+ BringToFront
+
+ reinst_done:
+
+FunctionEnd
+
+!endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
+
+!ifndef NO_STARTMENUSHORTCUTS
+Function AddReadmeToStartMenu
+ Pop $0
+ StrCpy $1 "$0 Readme"
+ IfFileExists $INSTDIR\Docs\$0\$0.txt 0 +3
+ StrCpy $0 Docs\$0\$0.txt
+ Goto create
+ IfFileExists $INSTDIR\Docs\$0\$0.html 0 +3
+ StrCpy $0 Docs\$0\$0.html
+ Goto create
+ IfFileExists $INSTDIR\Docs\$0\Readme.txt 0 +3
+ StrCpy $0 Docs\$0\Readme.txt
+ Goto create
+ IfFileExists $INSTDIR\Docs\$0\Readme.html 0 done
+ StrCpy $0 Docs\$0\Readme.html
+ create:
+ CreateShortCut $SMPROGRAMS\NSIS\Contrib\$1.lnk $INSTDIR\$0
+ done:
+FunctionEnd
+!endif
+
+Function ShowReleaseNotes
+ ${If} ${FileExists} $WINDIR\hh.exe
+ StrCpy $0 $WINDIR\hh.exe
+ Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
+ ${Else}
+ SearchPath $0 hh.exe
+ ${If} ${FileExists} $0
+ Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
+ ${Else}
+ ExecShell "open" "http://nsis.sourceforge.net/Docs/AppendixF.html#F.1"
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+;--------------------------------
+;Uninstaller Section
+
+Section Uninstall
+
+ SetDetailsPrint textonly
+ DetailPrint "Uninstalling NSI Development Shell Extensions..."
+ SetDetailsPrint listonly
+
+ IfFileExists $INSTDIR\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
+
+ ReadRegStr $R0 HKCR ".nsi" ""
+ StrCmp $R0 "NSIS.Script" 0 +2
+ DeleteRegKey HKCR ".nsi"
+
+ ReadRegStr $R0 HKCR ".nsh" ""
+ StrCmp $R0 "NSIS.Header" 0 +2
+ DeleteRegKey HKCR ".nsh"
+
+ DeleteRegKey HKCR "NSIS.Script"
+ DeleteRegKey HKCR "NSIS.Header"
+
+ System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
+ DeleteRegKey HKLM "Software\NSIS"
+
+ SetDetailsPrint textonly
+ DetailPrint "Deleting Files..."
+ SetDetailsPrint listonly
+
+ RMDir /r $SMPROGRAMS\NSIS
+ Delete "$DESKTOP\Nullsoft Install System.lnk"
+ Delete $INSTDIR\makensis.exe
+ Delete $INSTDIR\makensisw.exe
+ Delete $INSTDIR\NSIS.exe
+ 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/Examples/one-section.nsi b/Examples/one-section.nsi
index 7842940..078a918 100755
--- a/Examples/one-section.nsi
+++ b/Examples/one-section.nsi
@@ -1,78 +1,78 @@
-; 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"
-
-;--------------------------------
-
-; Pages
-
-Page components
-
-;--------------------------------
-
-; 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
-
+; 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"
+
+;--------------------------------
+
+; Pages
+
+Page components
+
+;--------------------------------
+
+; 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/Examples/primes.nsi b/Examples/primes.nsi
index 98a12f3..8fad8d4 100755
--- a/Examples/primes.nsi
+++ b/Examples/primes.nsi
@@ -1,69 +1,69 @@
-; 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"
-
-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
-
+; 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"
+
+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/Examples/rtest.nsi b/Examples/rtest.nsi
index fbbca62..9f6be9a 100755
--- a/Examples/rtest.nsi
+++ b/Examples/rtest.nsi
@@ -1,91 +1,91 @@
-; rtest.nsi
-;
-; This script tests some advanced NSIS functions.
-
-;--------------------------------
-
-Name "rtest"
-OutFile "rtest.exe"
-
-ComponentText "Select tests!"
-ShowInstDetails show
-
-;--------------------------------
-
-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 succeded (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 succeded (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"
-
+; rtest.nsi
+;
+; This script tests some advanced NSIS functions.
+
+;--------------------------------
+
+Name "rtest"
+OutFile "rtest.exe"
+
+ComponentText "Select tests!"
+ShowInstDetails show
+
+;--------------------------------
+
+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 succeded (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 succeded (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/Examples/silent.nsi b/Examples/silent.nsi
index 4068a9e..e441025 100755
--- a/Examples/silent.nsi
+++ b/Examples/silent.nsi
@@ -1,62 +1,62 @@
-# 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"
-
-# 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
+# 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"
+
+# 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/Examples/viewhtml.nsi b/Examples/viewhtml.nsi
index 4f65a21..62ebad2 100755
--- a/Examples/viewhtml.nsi
+++ b/Examples/viewhtml.nsi
@@ -1,50 +1,50 @@
-; 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"
-
-;--------------------------------
-
-; 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><BODY><H1>HTML page for viewhtml.nsi</H1></BODY></HTML>"
- 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
-
+; 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"
+
+;--------------------------------
+
+; 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><BODY><H1>HTML page for viewhtml.nsi</H1></BODY></HTML>"
+ 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/Examples/waplugin.nsi b/Examples/waplugin.nsi
index a61f599..2b0929b 100755
--- a/Examples/waplugin.nsi
+++ b/Examples/waplugin.nsi
@@ -1,202 +1,202 @@
-; 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
-
-;--------------------------------
-
-;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\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
-
+; 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
+
+;--------------------------------
+
+;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\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/INSTALL b/INSTALL
index 24f2ff4..9191137 100755
--- a/INSTALL
+++ b/INSTALL
@@ -1,74 +1,74 @@
-INSTALLING NSIS
-~~~~~~~~~~~~~~~
-
-This is a trimmed version of Appendix "Building NSIS" of the documentation.
-
- - Requirements
-
- * Python version 1.6 and above (http://www.python.org/)
- * SCons version 0.96.93 and above (http://www.scons.org/)
- * C compiler
-
- - Optional Tools
-
- * HTML Help Workshop for CHM documentation (http://msdn.microsoft.com/)
- * Cross compiler on POSIX platforms, i.e. MinGW (http://www.mingw.org/)
- * wxWidgets 2.8 for NSIS Menu (http://www.wxwidgets.org)
- WXWIN environment variable must be set to wxWidgets directory on Windows
-
- - Installing
-
- * type:
-
- scons PREFIX="C:\Program Files\NSIS" install
-
- - More options
-
- * For build options, type:
-
- scons -h
-
- * For SCons options, type:
-
- scons -H
-
- - Special cases
-
- * If using the Microsoft Visual C++ Toolkit 2003 and Platform SDK,
- add MSTOOLKIT=yes to the build command line. For example:
-
- scons MSTOOLKIT=yes PREFIX=C:\NSIS install
-
- If path problems occur, try:
-
- set MSSDK=C:\Path\To\Platform SDK
- set VCToolkitInstallDir=C:\Path\To\VCToolkit
- scons MSTOOLKIT=yes
-
- * If a cross compiler is not available on POSIX, use:
-
- scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
- NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
- install-compiler
-
- This should only build makensis and install it to the directory where
- a precompiled package, such as the nightly build or a zipped release
- version (nsis-x.xx.zip), is extracted.
-
- * Options for POSIX installs
-
- PREFIX: defaults to /usr/local
- PREFIX_BIN: Where to put native binaries. Defaults to $PREFIX/bin/
- PREFIX_CONF: Where to put the config file. Defaults to $PREFIX/etc/
- PREFIX_DATA: Where to put the plugins, stubs, etc. Defaults to $PREFIX/share/nsis/
- PREFIX_DOC: Where to put the docs and examples. Defaults to $PREFIX/share/doc/nsis/
- PREFIX_DEST: The install root Useful for packagers. Defaults to the root directory.
- PREFIX_INC_C: Where to put the C headers. Defaults to $PREFIX/include/nsis/
-
- - Problems
-
- * Get help in the forum:
- http://forums.winamp.com/forumdisplay.php?forumid=65
-
- * Report bugs in the bug tracker:
- http://sourceforge.net/tracker/?group_id=22049&atid=373085
+INSTALLING NSIS
+~~~~~~~~~~~~~~~
+
+This is a trimmed version of Appendix "Building NSIS" of the documentation.
+
+ - Requirements
+
+ * Python version 1.6 and above (http://www.python.org/)
+ * SCons version 0.96.93 and above (http://www.scons.org/)
+ * C compiler
+
+ - Optional Tools
+
+ * HTML Help Workshop for CHM documentation (http://msdn.microsoft.com/)
+ * Cross compiler on POSIX platforms, i.e. MinGW (http://www.mingw.org/)
+ * wxWidgets 2.8 for NSIS Menu (http://www.wxwidgets.org)
+ WXWIN environment variable must be set to wxWidgets directory on Windows
+
+ - Installing
+
+ * type:
+
+ scons PREFIX="C:\Program Files\NSIS" install
+
+ - More options
+
+ * For build options, type:
+
+ scons -h
+
+ * For SCons options, type:
+
+ scons -H
+
+ - Special cases
+
+ * If using the Microsoft Visual C++ Toolkit 2003 and Platform SDK,
+ add MSTOOLKIT=yes to the build command line. For example:
+
+ scons MSTOOLKIT=yes PREFIX=C:\NSIS install
+
+ If path problems occur, try:
+
+ set MSSDK=C:\Path\To\Platform SDK
+ set VCToolkitInstallDir=C:\Path\To\VCToolkit
+ scons MSTOOLKIT=yes
+
+ * If a cross compiler is not available on POSIX, use:
+
+ scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
+ NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
+ install-compiler
+
+ This should only build makensis and install it to the directory where
+ a precompiled package, such as the nightly build or a zipped release
+ version (nsis-x.xx.zip), is extracted.
+
+ * Options for POSIX installs
+
+ PREFIX: defaults to /usr/local
+ PREFIX_BIN: Where to put native binaries. Defaults to $PREFIX/bin/
+ PREFIX_CONF: Where to put the config file. Defaults to $PREFIX/etc/
+ PREFIX_DATA: Where to put the plugins, stubs, etc. Defaults to $PREFIX/share/nsis/
+ PREFIX_DOC: Where to put the docs and examples. Defaults to $PREFIX/share/doc/nsis/
+ PREFIX_DEST: The install root Useful for packagers. Defaults to the root directory.
+ PREFIX_INC_C: Where to put the C headers. Defaults to $PREFIX/include/nsis/
+
+ - Problems
+
+ * Get help in the forum:
+ http://forums.winamp.com/forumdisplay.php?forumid=65
+
+ * Report bugs in the bug tracker:
+ http://sourceforge.net/tracker/?group_id=22049&atid=373085
diff --git a/Include/Colors.nsh b/Include/Colors.nsh
index bf09269..64ca3a1 100755
--- a/Include/Colors.nsh
+++ b/Include/Colors.nsh
@@ -1,75 +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
+!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/Include/FileFunc.nsh b/Include/FileFunc.nsh
index 46052f0..745d1e1 100755
--- a/Include/FileFunc.nsh
+++ b/Include/FileFunc.nsh
@@ -1,2435 +1,2435 @@
-/*
-_____________________________________________________________________________
-
- 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. !insertmacro FileFunction
- 3. [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]
-
- un.FileFunction=[un.Locate|un.GetSize|un.DriveSpace|un.GetDrives|un.GetTime|
- un.GetFileAttributes|un.GetFileVersion|un.GetExeName|
- un.GetExePath|un.GetParameters|un.GetOptions|un.GetOptionsS|
- un.GetRoot|un.GetParent|un.GetFileName|un.GetBaseName|
- un.GetFileExt|un.BannerTrimPath|un.DirState|un.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
-!define FILEFUNC_INCLUDED
-
-!verbose push
-!verbose 3
-!ifndef _FILEFUNC_VERBOSE
- !define _FILEFUNC_VERBOSE 3
-!endif
-!verbose ${_FILEFUNC_VERBOSE}
-!define FILEFUNC_VERBOSE `!insertmacro FILEFUNC_VERBOSE`
-!define _FILEFUNC_UN
-!define _FILEFUNC_S
-!verbose pop
-
-!macro FILEFUNC_VERBOSE _VERBOSE
- !verbose push
- !verbose 3
- !undef _FILEFUNC_VERBOSE
- !define _FILEFUNC_VERBOSE ${_VERBOSE}
- !verbose pop
-!macroend
-
-
-# Install. Case insensitive. #
-
-!macro LocateCall _PATH _OPTIONS _FUNC
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push $0
- Push `${_PATH}`
- Push `${_OPTIONS}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call Locate
- Pop $0
- !verbose pop
-!macroend
-
-!macro GetSizeCall _PATH _OPTIONS _RESULT1 _RESULT2 _RESULT3
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Push `${_OPTIONS}`
- Call GetSize
- Pop ${_RESULT1}
- Pop ${_RESULT2}
- Pop ${_RESULT3}
- !verbose pop
-!macroend
-
-!macro DriveSpaceCall _DRIVE _OPTIONS _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_DRIVE}`
- Push `${_OPTIONS}`
- Call DriveSpace
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetDrivesCall _DRV _FUNC
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push $0
- Push `${_DRV}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call 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}`
- Call 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}`
- Call GetFileAttributes
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetFileVersionCall _FILE _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILE}`
- Call GetFileVersion
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetExeNameCall _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call GetExeName
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetExePathCall _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call GetExePath
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetParametersCall _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call GetParameters
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetOptionsCall _PARAMETERS _OPTION _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PARAMETERS}`
- Push `${_OPTION}`
- Call GetOptions
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetRootCall _FULLPATH _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FULLPATH}`
- Call GetRoot
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetParentCall _PATHSTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATHSTRING}`
- Call GetParent
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetFileNameCall _PATHSTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATHSTRING}`
- Call GetFileName
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetBaseNameCall _FILESTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILESTRING}`
- Call GetBaseName
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetFileExtCall _FILESTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILESTRING}`
- Call GetFileExt
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro BannerTrimPathCall _PATH _LENGHT _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Push `${_LENGHT}`
- Call BannerTrimPath
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro DirStateCall _PATH _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Call DirState
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro RefreshShellIconsCall
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call RefreshShellIcons
- !verbose pop
-!macroend
-
-!macro Locate
- !ifndef ${_FILEFUNC_UN}Locate
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}Locate `!insertmacro ${_FILEFUNC_UN}LocateCall`
-
- Function ${_FILEFUNC_UN}Locate
- 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 error
-
- option:
- StrCpy $R9 $1 1
- StrCpy $1 $1 '' 1
- StrCmp $R9 ' ' -2
- StrCmp $R9 '' 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 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 error
- goto option
-
- mask:
- StrCmp $R9 'M=' 0 size
- StrCpy $4 $R8
- goto option
-
- size:
- StrCmp $R9 'S=' 0 gotosubdir
- StrCpy $6 $R8
- goto option
-
- gotosubdir:
- StrCmp $R9 'G=' 0 banner
- StrCpy $7 $R8
- StrCmp $7 '' +3
- StrCmp $7 '1' +2
- StrCmp $7 '0' 0 error
- goto option
-
- banner:
- StrCmp $R9 'B=' 0 error
- StrCpy $R7 $R8
- StrCmp $R7 '' +3
- StrCmp $R7 '1' +2
- StrCmp $R7 '0' 0 error
- goto option
-
- sizeset:
- StrCmp $6 '' 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 default
- StrCmp $1 'K' 0 +3
- StrCpy $1 1024
- goto default
- StrCmp $1 'M' 0 +3
- StrCpy $1 1048576
- goto default
- StrCmp $1 'G' 0 error
- StrCpy $1 1073741824
-
- 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
-
- nextdir:
- IntOp $8 $8 - 1
- Pop $R8
-
- StrCpy $9 $7 2 2
- StrCmp $9 'B0' +3
- GetLabelAddress $9 findfirst
- goto call
- DetailPrint 'Search in: $R8'
-
- findfirst:
- FindFirst $0 $R7 '$R8\$4'
- IfErrors subdir
- StrCmp $R7 '.' 0 dir
- FindNext $0 $R7
- StrCmp $R7 '..' 0 dir
- FindNext $0 $R7
- IfErrors 0 dir
- FindClose $0
- goto subdir
-
- dir:
- IfFileExists '$R8\$R7\*.*' 0 file
- StrCpy $R6 ''
- StrCmp $3 'DE' +4
- StrCmp $3 'FDE' +3
- StrCmp $3 'FD' precall
- StrCmp $3 'F' findnext precall
- FindFirst $9 $R9 '$R8\$R7\*.*'
- StrCmp $R9 '.' 0 +4
- FindNext $9 $R9
- StrCmp $R9 '..' 0 +2
- FindNext $9 $R9
- FindClose $9
- IfErrors precall findnext
-
- file:
- StrCmp $3 'FDE' +3
- StrCmp $3 'FD' +2
- StrCmp $3 'F' 0 findnext
- StrCpy $R6 0
- StrCmp $5$6 '' 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 findnext
- StrCmp $6 '' +2
- IntCmp $R6 $6 0 0 findnext
-
- 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 error
- StrCmp $R9 'StopLocate' 0 +3
- FindClose $0
- goto clearstack
- goto $9
-
- findnext:
- FindNext $0 $R7
- IfErrors 0 dir
- FindClose $0
-
- subdir:
- StrCpy $9 $7 2
- StrCmp $9 'G0' end
- FindFirst $0 $R7 '$R8\*.*'
- StrCmp $R7 '.' 0 pushdir
- FindNext $0 $R7
- StrCmp $R7 '..' 0 pushdir
- FindNext $0 $R7
- IfErrors 0 pushdir
- FindClose $0
- StrCmp $8 0 end nextdir
-
- pushdir:
- IfFileExists '$R8\$R7\*.*' 0 +3
- Push '$R8\$R7'
- IntOp $8 $8 + 1
- FindNext $0 $R7
- IfErrors 0 pushdir
- FindClose $0
- StrCmp $8 0 end nextdir
-
- error:
- SetErrors
-
- clearstack:
- StrCmp $8 0 end
- IntOp $8 $8 - 1
- Pop $R8
- goto clearstack
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetSize
- !ifndef ${_FILEFUNC_UN}GetSize
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetSize `!insertmacro ${_FILEFUNC_UN}GetSizeCall`
-
- Function ${_FILEFUNC_UN}GetSize
- 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 error
-
- StrCpy $3 ''
- StrCpy $4 ''
- StrCpy $5 ''
- StrCpy $6 ''
- StrCpy $8 0
- StrCpy $R3 ''
- StrCpy $R4 ''
- StrCpy $R5 ''
-
- option:
- StrCpy $R9 $1 1
- StrCpy $1 $1 '' 1
- StrCmp $R9 ' ' -2
- StrCmp $R9 '' 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 size
- StrCpy $4 $8
- goto option
-
- size:
- StrCmp $R9 'S=' 0 gotosubdir
- StrCpy $6 $8
- goto option
-
- gotosubdir:
- StrCmp $R9 'G=' 0 error
- StrCpy $7 $8
- StrCmp $7 '' +3
- StrCmp $7 '1' +2
- StrCmp $7 '0' 0 error
- goto option
-
- sizeset:
- StrCmp $6 '' 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 default
- StrCmp $1 'K' 0 +4
- StrCpy $1 1024
- StrCpy $2 Kb
- goto default
- StrCmp $1 'M' 0 +4
- StrCpy $1 1048576
- StrCpy $2 Mb
- goto default
- StrCmp $1 'G' 0 error
- StrCpy $1 1073741824
- StrCpy $2 Gb
-
- default:
- StrCmp $4 '' 0 +2
- StrCpy $4 '*.*'
- StrCmp $7 '' 0 +2
- StrCpy $7 '1'
-
- StrCpy $8 1
- Push $0
- SetDetailsPrint textonly
-
- nextdir:
- IntOp $8 $8 - 1
- Pop $R8
- FindFirst $0 $R7 '$R8\$4'
- IfErrors show
- StrCmp $R7 '.' 0 dir
- FindNext $0 $R7
- StrCmp $R7 '..' 0 dir
- FindNext $0 $R7
- IfErrors 0 dir
- FindClose $0
- goto show
-
- dir:
- IfFileExists '$R8\$R7\*.*' 0 file
- IntOp $R5 $R5 + 1
- goto findnext
-
- file:
- StrCpy $R6 0
- StrCmp $5$6 '' 0 +3
- IntOp $R4 $R4 + 1
- goto findnext
- FileOpen $9 '$R8\$R7' r
- IfErrors +3
- FileSeek $9 0 END $R6
- FileClose $9
- StrCmp $5 '' +2
- IntCmp $R6 $5 0 findnext
- StrCmp $6 '' +2
- IntCmp $R6 $6 0 0 findnext
- IntOp $R4 $R4 + 1
- System::Int64Op /NOUNLOAD $R3 + $R6
- Pop $R3
-
- findnext:
- FindNext $0 $R7
- IfErrors 0 dir
- FindClose $0
-
- show:
- StrCmp $5$6 '' nosize
- System::Int64Op /NOUNLOAD $R3 / $1
- Pop $9
- DetailPrint 'Size:$9 $2 Files:$R4 Folders:$R5'
- goto subdir
- nosize:
- DetailPrint 'Files:$R4 Folders:$R5'
-
- subdir:
- StrCmp $7 0 preend
- FindFirst $0 $R7 '$R8\*.*'
- StrCmp $R7 '.' 0 pushdir
- FindNext $0 $R7
- StrCmp $R7 '..' 0 pushdir
- FindNext $0 $R7
- IfErrors 0 pushdir
- FindClose $0
- StrCmp $8 0 preend nextdir
-
- pushdir:
- IfFileExists '$R8\$R7\*.*' 0 +3
- Push '$R8\$R7'
- IntOp $8 $8 + 1
- FindNext $0 $R7
- IfErrors 0 pushdir
- FindClose $0
- StrCmp $8 0 preend nextdir
-
- preend:
- StrCmp $R3 '' nosizeend
- System::Int64Op $R3 / $1
- Pop $R3
- nosizeend:
- StrCpy $2 $R4
- StrCpy $1 $R5
- StrCpy $0 $R3
- goto end
-
- error:
- SetErrors
- StrCpy $0 ''
- StrCpy $1 ''
- StrCpy $2 ''
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro DriveSpace
- !ifndef ${_FILEFUNC_UN}DriveSpace
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}DriveSpace `!insertmacro ${_FILEFUNC_UN}DriveSpaceCall`
-
- Function ${_FILEFUNC_UN}DriveSpace
- 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 error
-
- StrCpy $5 ''
- StrCpy $6 ''
-
- option:
- StrCpy $2 $1 1
- StrCpy $1 $1 '' 1
- StrCmp $2 ' ' -2
- StrCmp $2 '' 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 unit
- StrCpy $5 $4
- StrCmp $5 '' +4
- StrCmp $5 'T' +3
- StrCmp $5 'O' +2
- StrCmp $5 'F' 0 error
- goto option
-
- unit:
- StrCmp $2 'S=' 0 error
- StrCpy $6 $4
- goto option
-
- default:
- StrCmp $5 '' 0 +2
- StrCpy $5 'T'
- StrCmp $6 '' 0 +3
- StrCpy $6 '1'
- goto getspace
-
- StrCmp $6 'B' 0 +3
- StrCpy $6 1
- goto getspace
- StrCmp $6 'K' 0 +3
- StrCpy $6 1024
- goto getspace
- StrCmp $6 'M' 0 +3
- StrCpy $6 1048576
- goto getspace
- StrCmp $6 'G' 0 error
- StrCpy $6 1073741824
-
- getspace:
- System::Call /NOUNLOAD 'kernel32::GetDiskFreeSpaceExA(t, *l, *l, *l)i(r0,.r2,.r3,.)'
-
- StrCmp $5 T 0 +3
- StrCpy $0 $3
- goto getsize
- StrCmp $5 O 0 +4
- System::Int64Op /NOUNLOAD $3 - $2
- Pop $0
- goto getsize
- StrCmp $5 F 0 +2
- StrCpy $0 $2
-
- getsize:
- System::Int64Op $0 / $6
- Pop $0
- goto end
-
- error:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetDrives
- !ifndef ${_FILEFUNC_UN}GetDrives
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetDrives `!insertmacro ${_FILEFUNC_UN}GetDrivesCall`
-
- Function ${_FILEFUNC_UN}GetDrives
- Exch $1
- Exch
- Exch $0
- Exch
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
- Push $8
- Push $9
-
- System::Alloc /NOUNLOAD 1024
- Pop $2
- System::Call /NOUNLOAD 'kernel32::GetLogicalDriveStringsA(i,i) i(1024, r2)'
-
- StrCmp $0 ALL drivestring
- StrCmp $0 '' 0 typeset
- StrCpy $0 ALL
- goto drivestring
-
- typeset:
- StrCpy $6 -1
- IntOp $6 $6 + 1
- StrCpy $8 $0 1 $6
- StrCmp $8$0 '' 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 drivestring
- StrCmp $8 'HDD' 0 +3
- StrCpy $6 3
- goto drivestring
- StrCmp $8 'NET' 0 +3
- StrCpy $6 4
- goto drivestring
- StrCmp $8 'CDROM' 0 +3
- StrCpy $6 5
- goto drivestring
- StrCmp $8 'RAM' 0 typeset
- StrCpy $6 6
-
- drivestring:
- StrCpy $3 $2
-
- enumok:
- System::Call /NOUNLOAD 'kernel32::lstrlenA(t) i(i r3) .r4'
- StrCmp $4$0 '0ALL' enumex
- StrCmp $4 0 typeset
- System::Call /NOUNLOAD 'kernel32::GetDriveTypeA(t) i(i r3) .r5'
-
- StrCmp $0 ALL +2
- StrCmp $5 $6 letter enumnext
- StrCmp $5 2 0 +3
- StrCpy $8 FDD
- goto letter
- StrCmp $5 3 0 +3
- StrCpy $8 HDD
- goto letter
- StrCmp $5 4 0 +3
- StrCpy $8 NET
- goto letter
- StrCmp $5 5 0 +3
- StrCpy $8 CDROM
- goto letter
- StrCmp $5 6 0 enumex
- StrCpy $8 RAM
-
- letter:
- System::Call /NOUNLOAD '*$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' enumex
-
- enumnext:
- IntOp $3 $3 + $4
- IntOp $3 $3 + 1
- goto enumok
-
- enumex:
- System::Free $2
-
- Pop $9
- Pop $8
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetTime
- !ifndef ${_FILEFUNC_UN}GetTime
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetTime `!insertmacro ${_FILEFUNC_UN}GetTimeCall`
-
- Function ${_FILEFUNC_UN}GetTime
- Exch $1
- Exch
- Exch $0
- Exch
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
- Push $7
- ClearErrors
-
- StrCmp $1 'L' gettime
- StrCmp $1 'A' getfile
- StrCmp $1 'C' getfile
- StrCmp $1 'M' getfile
- StrCmp $1 'LS' gettime
- StrCmp $1 'AS' getfile
- StrCmp $1 'CS' getfile
- StrCmp $1 'MS' getfile
- goto error
-
- getfile:
- IfFileExists $0 0 error
- System::Call /NOUNLOAD '*(i,l,l,l,i,i,i,i,&t260,&t14) i .r6'
- System::Call /NOUNLOAD 'kernel32::FindFirstFileA(t,i)i(r0,r6) .r2'
- System::Call /NOUNLOAD 'kernel32::FindClose(i)i(r2)'
-
- gettime:
- System::Call /NOUNLOAD '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) i .r7'
- StrCmp $1 'L' 0 systemtime
- System::Call /NOUNLOAD 'kernel32::GetLocalTime(i)i(r7)'
- goto convert
- systemtime:
- StrCmp $1 'LS' 0 filetime
- System::Call /NOUNLOAD 'kernel32::GetSystemTime(i)i(r7)'
- goto convert
-
- filetime:
- System::Call /NOUNLOAD '*$6(i,l,l,l,i,i,i,i,&t260,&t14)i(,.r4,.r3,.r2)'
- System::Free /NOUNLOAD $6
- StrCmp $1 'A' 0 +3
- StrCpy $2 $3
- goto tolocal
- StrCmp $1 'C' 0 +3
- StrCpy $2 $4
- goto tolocal
- StrCmp $1 'M' tolocal
-
- StrCmp $1 'AS' tosystem
- StrCmp $1 'CS' 0 +3
- StrCpy $3 $4
- goto tosystem
- StrCmp $1 'MS' 0 +3
- StrCpy $3 $2
- goto tosystem
-
- tolocal:
- System::Call /NOUNLOAD 'kernel32::FileTimeToLocalFileTime(*l,*l)i(r2,.r3)'
- tosystem:
- System::Call /NOUNLOAD 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r7)'
-
- convert:
- System::Call /NOUNLOAD '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.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 end
- StrCmp $4 1 0 +3
- StrCpy $4 Monday
- goto end
- StrCmp $4 2 0 +3
- StrCpy $4 Tuesday
- goto end
- StrCmp $4 3 0 +3
- StrCpy $4 Wednesday
- goto end
- StrCmp $4 4 0 +3
- StrCpy $4 Thursday
- goto end
- StrCmp $4 5 0 +3
- StrCpy $4 Friday
- goto end
- StrCmp $4 6 0 error
- StrCpy $4 Saturday
- goto end
-
- error:
- SetErrors
- StrCpy $0 ''
- StrCpy $1 ''
- StrCpy $2 ''
- StrCpy $3 ''
- StrCpy $4 ''
- StrCpy $5 ''
- StrCpy $6 ''
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetFileAttributes
- !ifndef ${_FILEFUNC_UN}GetFileAttributes
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetFileAttributes `!insertmacro ${_FILEFUNC_UN}GetFileAttributesCall`
-
- Function ${_FILEFUNC_UN}GetFileAttributes
- 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 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 '' end
- StrCmp $1 'ALL' end
-
- 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 '' notfound
- StrCmp $4 $2 0 -3
- StrCmp $1 '' 0 attrcmp
- StrCpy $0 1
- goto end
-
- notfound:
- StrCpy $0 0
- goto end
-
- error:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetFileVersion
- !ifndef ${_FILEFUNC_UN}GetFileVersion
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetFileVersion `!insertmacro ${_FILEFUNC_UN}GetFileVersionCall`
-
- Function ${_FILEFUNC_UN}GetFileVersion
- Exch $0
- Push $1
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
- ClearErrors
-
- GetDllVersion '$0' $1 $2
- IfErrors 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 end
-
- error:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetExeName
- !ifndef ${_FILEFUNC_UN}GetExeName
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetExeName `!insertmacro ${_FILEFUNC_UN}GetExeNameCall`
-
- Function ${_FILEFUNC_UN}GetExeName
- Push $0
- Push $1
- Push $2
- System::Call /NOUNLOAD 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024)'
- System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2'
- StrCmp $2 error +2
- StrCpy $0 $1
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetExePath
- !ifndef ${_FILEFUNC_UN}GetExePath
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetExePath `!insertmacro ${_FILEFUNC_UN}GetExePathCall`
-
- Function ${_FILEFUNC_UN}GetExePath
- Push $0
- Push $1
- Push $2
- StrCpy $0 $EXEDIR
- System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2'
- StrCmp $2 error +2
- StrCpy $0 $1
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetParameters
- !ifndef ${_FILEFUNC_UN}GetParameters
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetParameters `!insertmacro ${_FILEFUNC_UN}GetParametersCall`
-
- Function ${_FILEFUNC_UN}GetParameters
- Push $0
- Push $1
- Push $2
-
- StrCpy $1 1
- StrCpy $0 $CMDLINE 1
- StrCmp $0 '"' 0 +3
- StrCpy $2 '"'
- goto +2
- StrCpy $2 ' '
-
- IntOp $1 $1 + 1
- StrCpy $0 $CMDLINE 1 $1
- StrCmp $0 $2 +2
- StrCmp $0 '' end -3
-
- IntOp $1 $1 + 1
- StrCpy $0 $CMDLINE 1 $1
- StrCmp $0 ' ' -2
- StrCpy $0 $CMDLINE '' $1
-
- StrCpy $1 $0 1 -1
- StrCmp $1 ' ' 0 +3
- StrCpy $0 $0 -1
- goto -3
-
- end:
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetOptions
- !ifndef ${_FILEFUNC_UN}GetOptions${_FILEFUNC_S}
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetOptions${_FILEFUNC_S} `!insertmacro ${_FILEFUNC_UN}GetOptions${_FILEFUNC_S}Call`
-
- Function ${_FILEFUNC_UN}GetOptions${_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
-
- begin:
- StrCpy $4 -1
- StrCpy $6 ''
-
- quote:
- IntOp $4 $4 + 1
- StrCpy $5 $0 1 $4
- StrCmp${_FILEFUNC_S} $5$7 '0' notfound
- StrCmp${_FILEFUNC_S} $5 '' trimright
- StrCmp${_FILEFUNC_S} $5 '"' 0 +7
- StrCmp${_FILEFUNC_S} $6 '' 0 +3
- StrCpy $6 '"'
- goto quote
- StrCmp${_FILEFUNC_S} $6 '"' 0 +3
- StrCpy $6 ''
- goto quote
- StrCmp${_FILEFUNC_S} $5 `'` 0 +7
- StrCmp${_FILEFUNC_S} $6 `` 0 +3
- StrCpy $6 `'`
- goto quote
- StrCmp${_FILEFUNC_S} $6 `'` 0 +3
- StrCpy $6 ``
- goto quote
- StrCmp${_FILEFUNC_S} $5 '`' 0 +7
- StrCmp${_FILEFUNC_S} $6 '' 0 +3
- StrCpy $6 '`'
- goto quote
- StrCmp${_FILEFUNC_S} $6 '`' 0 +3
- StrCpy $6 ''
- goto quote
- StrCmp${_FILEFUNC_S} $6 '"' quote
- StrCmp${_FILEFUNC_S} $6 `'` quote
- StrCmp${_FILEFUNC_S} $6 '`' quote
- StrCmp${_FILEFUNC_S} $5 $1 0 quote
- StrCmp${_FILEFUNC_S} $7 0 trimleft trimright
-
- trimleft:
- IntOp $4 $4 + 1
- StrCpy $5 $0 $3 $4
- StrCmp${_FILEFUNC_S} $5 '' notfound
- StrCmp${_FILEFUNC_S} $5 $2 0 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 begin
-
- 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 end
- StrCmp${_FILEFUNC_S} $3 '"' +3
- StrCmp${_FILEFUNC_S} $3 `'` +2
- StrCmp${_FILEFUNC_S} $3 '`' 0 end
- StrCpy $0 $0 -1 1
- goto end
-
- notfound:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $7
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-
-!macro GetRoot
- !ifndef ${_FILEFUNC_UN}GetRoot
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetRoot `!insertmacro ${_FILEFUNC_UN}GetRootCall`
-
- Function ${_FILEFUNC_UN}GetRoot
- Exch $0
- Push $1
- Push $2
- Push $3
-
- StrCpy $1 $0 2
- StrCmp $1 '\\' UNC
- StrCpy $2 $1 1 1
- StrCmp $2 ':' 0 empty
- StrCpy $0 $1
- goto end
-
- UNC:
- StrCpy $2 1
- StrCpy $3 ''
-
- loop:
- IntOp $2 $2 + 1
- StrCpy $1 $0 1 $2
- StrCmp $1$3 '' empty
- StrCmp $1 '' +5
- StrCmp $1 '\' 0 loop
- StrCmp $3 '1' +3
- StrCpy $3 '1'
- goto loop
- StrCpy $0 $0 $2
- StrCpy $2 $0 1 -1
- StrCmp $2 '\' 0 end
-
- empty:
- StrCpy $0 ''
-
- end:
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetParent
- !ifndef ${_FILEFUNC_UN}GetParent
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetParent `!insertmacro ${_FILEFUNC_UN}GetParentCall`
-
- Function ${_FILEFUNC_UN}GetParent
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetFileName
- !ifndef ${_FILEFUNC_UN}GetFileName
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetFileName `!insertmacro ${_FILEFUNC_UN}GetFileNameCall`
-
- Function ${_FILEFUNC_UN}GetFileName
- 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 '' end
- StrCmp $2 '\' 0 -3
- IntOp $1 $1 + 1
- StrCpy $0 $0 '' $1
-
- end:
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetBaseName
- !ifndef ${_FILEFUNC_UN}GetBaseName
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetBaseName `!insertmacro ${_FILEFUNC_UN}GetBaseNameCall`
-
- Function ${_FILEFUNC_UN}GetBaseName
- Exch $0
- Push $1
- Push $2
- Push $3
-
- StrCpy $1 0
- StrCpy $3 ''
-
- loop:
- IntOp $1 $1 - 1
- StrCpy $2 $0 1 $1
- StrCmp $2 '' trimpath
- StrCmp $2 '\' trimpath
- StrCmp $3 'noext' loop
- StrCmp $2 '.' 0 loop
- StrCpy $0 $0 $1
- StrCpy $3 'noext'
- StrCpy $1 0
- goto loop
-
- trimpath:
- StrCmp $1 -1 empty
- IntOp $1 $1 + 1
- StrCpy $0 $0 '' $1
- goto end
-
- empty:
- StrCpy $0 ''
-
- end:
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro GetFileExt
- !ifndef ${_FILEFUNC_UN}GetFileExt
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}GetFileExt `!insertmacro ${_FILEFUNC_UN}GetFileExtCall`
-
- Function ${_FILEFUNC_UN}GetFileExt
- Exch $0
- Push $1
- Push $2
-
- StrCpy $1 0
-
- loop:
- IntOp $1 $1 - 1
- StrCpy $2 $0 1 $1
- StrCmp $2 '' empty
- StrCmp $2 '\' empty
- StrCmp $2 '.' 0 loop
-
- StrCmp $1 -1 empty
- IntOp $1 $1 + 1
- StrCpy $0 $0 '' $1
- goto end
-
- empty:
- StrCpy $0 ''
-
- end:
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro BannerTrimPath
- !ifndef ${_FILEFUNC_UN}BannerTrimPath
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}BannerTrimPath `!insertmacro ${_FILEFUNC_UN}BannerTrimPathCall`
-
- Function ${_FILEFUNC_UN}BannerTrimPath
- 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 end end
- IntOp $1 $1 - 3
- IntCmp $1 0 empty empty
- StrCmp $3 'A' A-trim
- StrCmp $3 'B' B-trim
- StrCmp $3 'C' C-trim
- StrCmp $3 'D' D-trim
-
- A-trim:
- StrCpy $3 $0 1 1
- StrCpy $2 0
- StrCmp $3 ':' 0 +2
- IntOp $2 $2 + 2
-
- loopleft:
- IntOp $2 $2 + 1
- StrCpy $3 $0 1 $2
- StrCmp $2 $1 C-trim
- StrCmp $3 '\' 0 loopleft
- StrCpy $3 $0 $2
- IntOp $2 $2 - $1
- IntCmp $2 0 B-trim 0 B-trim
-
- loopright:
- IntOp $2 $2 + 1
- StrCpy $4 $0 1 $2
- StrCmp $2 0 B-trim
- StrCmp $4 '\' 0 loopright
- StrCpy $4 $0 '' $2
- StrCpy $0 '$3\...$4'
- goto end
-
- B-trim:
- StrCpy $2 $1
- IntOp $2 $2 - 1
- StrCmp $2 -1 C-trim
- StrCpy $3 $0 1 $2
- StrCmp $3 '\' 0 -3
- StrCpy $0 $0 $2
- StrCpy $0 '$0\...'
- goto end
-
- C-trim:
- StrCpy $0 $0 $1
- StrCpy $0 '$0...'
- goto end
-
- D-trim:
- StrCpy $3 -1
- IntOp $3 $3 - 1
- StrCmp $3 -$2 C-trim
- StrCpy $4 $0 1 $3
- StrCmp $4 '\' 0 -3
- StrCpy $4 $0 '' $3
- IntOp $3 $1 + $3
- IntCmp $3 2 C-trim C-trim
- StrCpy $0 $0 $3
- StrCpy $0 '$0...$4'
- goto end
-
- empty:
- StrCpy $0 ''
-
- end:
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro DirState
- !ifndef ${_FILEFUNC_UN}DirState
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}DirState `!insertmacro ${_FILEFUNC_UN}DirStateCall`
-
- Function ${_FILEFUNC_UN}DirState
- Exch $0
- Push $1
- ClearErrors
-
- FindFirst $1 $0 '$0\*.*'
- IfErrors 0 +3
- StrCpy $0 -1
- goto end
- StrCmp $0 '.' 0 +4
- FindNext $1 $0
- StrCmp $0 '..' 0 +2
- FindNext $1 $0
- FindClose $1
- IfErrors 0 +3
- StrCpy $0 0
- goto end
- StrCpy $0 1
-
- end:
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro RefreshShellIcons
- !ifndef ${_FILEFUNC_UN}RefreshShellIcons
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !define ${_FILEFUNC_UN}RefreshShellIcons `!insertmacro ${_FILEFUNC_UN}RefreshShellIconsCall`
-
- Function ${_FILEFUNC_UN}RefreshShellIcons
- System::Call 'shell32::SHChangeNotify(i 0x08000000, i 0, i 0, i 0)'
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-
-# Uninstall. Case insensitive. #
-
-!macro un.LocateCall _PATH _OPTIONS _FUNC
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push $0
- Push `${_PATH}`
- Push `${_OPTIONS}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call un.Locate
- Pop $0
- !verbose pop
-!macroend
-
-!macro un.GetSizeCall _PATH _OPTIONS _RESULT1 _RESULT2 _RESULT3
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Push `${_OPTIONS}`
- Call un.GetSize
- Pop ${_RESULT1}
- Pop ${_RESULT2}
- Pop ${_RESULT3}
- !verbose pop
-!macroend
-
-!macro un.DriveSpaceCall _DRIVE _OPTIONS _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_DRIVE}`
- Push `${_OPTIONS}`
- Call un.DriveSpace
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetDrivesCall _DRV _FUNC
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push $0
- Push `${_DRV}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call un.GetDrives
- Pop $0
- !verbose pop
-!macroend
-
-!macro un.GetTimeCall _FILE _OPTION _RESULT1 _RESULT2 _RESULT3 _RESULT4 _RESULT5 _RESULT6 _RESULT7
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_OPTION}`
- Call un.GetTime
- Pop ${_RESULT1}
- Pop ${_RESULT2}
- Pop ${_RESULT3}
- Pop ${_RESULT4}
- Pop ${_RESULT5}
- Pop ${_RESULT6}
- Pop ${_RESULT7}
- !verbose pop
-!macroend
-
-!macro un.GetFileAttributesCall _PATH _ATTR _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Push `${_ATTR}`
- Call un.GetFileAttributes
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetFileVersionCall _FILE _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILE}`
- Call un.GetFileVersion
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetExeNameCall _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call un.GetExeName
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetExePathCall _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call un.GetExePath
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetParametersCall _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call un.GetParameters
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetOptionsCall _PARAMETERS _OPTION _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PARAMETERS}`
- Push `${_OPTION}`
- Call un.GetOptions
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetRootCall _FULLPATH _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FULLPATH}`
- Call un.GetRoot
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetParentCall _PATHSTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATHSTRING}`
- Call un.GetParent
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetFileNameCall _PATHSTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATHSTRING}`
- Call un.GetFileName
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetBaseNameCall _FILESTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILESTRING}`
- Call un.GetBaseName
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetFileExtCall _FILESTRING _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_FILESTRING}`
- Call un.GetFileExt
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.BannerTrimPathCall _PATH _LENGHT _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Push `${_LENGHT}`
- Call un.BannerTrimPath
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.DirStateCall _PATH _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PATH}`
- Call un.DirState
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.RefreshShellIconsCall
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Call un.RefreshShellIcons
- !verbose pop
-!macroend
-
-!macro un.Locate
- !ifndef un.Locate
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro Locate
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetSize
- !ifndef un.GetSize
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetSize
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.DriveSpace
- !ifndef un.DriveSpace
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro DriveSpace
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetDrives
- !ifndef un.GetDrives
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetDrives
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetTime
- !ifndef un.GetTime
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetTime
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetFileAttributes
- !ifndef un.GetFileAttributes
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetFileAttributes
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetFileVersion
- !ifndef un.GetFileVersion
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetFileVersion
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetExeName
- !ifndef un.GetExeName
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetExeName
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetExePath
- !ifndef un.GetExePath
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetExePath
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetParameters
- !ifndef un.GetParameters
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetParameters
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetOptions
- !ifndef un.GetOptions
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetOptions
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetRoot
- !ifndef un.GetRoot
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetRoot
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetParent
- !ifndef un.GetParent
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetParent
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetFileName
- !ifndef un.GetFileName
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetFileName
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetBaseName
- !ifndef un.GetBaseName
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetBaseName
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.GetFileExt
- !ifndef un.GetFileExt
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro GetFileExt
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.BannerTrimPath
- !ifndef un.BannerTrimPath
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro BannerTrimPath
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.DirState
- !ifndef un.DirState
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro DirState
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.RefreshShellIcons
- !ifndef un.RefreshShellIcons
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
-
- !insertmacro RefreshShellIcons
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-
-# Install. Case sensitive. #
-
-!macro GetOptionsSCall _PARAMETERS _OPTION _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PARAMETERS}`
- Push `${_OPTION}`
- Call GetOptionsS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro GetOptionsS
- !ifndef GetOptionsS
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_S
- !define _FILEFUNC_S `S`
-
- !insertmacro GetOptions
-
- !undef _FILEFUNC_S
- !define _FILEFUNC_S
- !verbose pop
- !endif
-!macroend
-
-
-# Uninstall. Case sensitive. #
-
-!macro un.GetOptionsSCall _PARAMETERS _OPTION _RESULT
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- Push `${_PARAMETERS}`
- Push `${_OPTION}`
- Call un.GetOptionsS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.GetOptionsS
- !ifndef un.GetOptionsS
- !verbose push
- !verbose ${_FILEFUNC_VERBOSE}
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN `un.`
- !undef _FILEFUNC_S
- !define _FILEFUNC_S `S`
-
- !insertmacro GetOptions
-
- !undef _FILEFUNC_UN
- !define _FILEFUNC_UN
- !undef _FILEFUNC_S
- !define _FILEFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!endif
+/*
+_____________________________________________________________________________
+
+ 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. !insertmacro FileFunction
+ 3. [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]
+
+ un.FileFunction=[un.Locate|un.GetSize|un.DriveSpace|un.GetDrives|un.GetTime|
+ un.GetFileAttributes|un.GetFileVersion|un.GetExeName|
+ un.GetExePath|un.GetParameters|un.GetOptions|un.GetOptionsS|
+ un.GetRoot|un.GetParent|un.GetFileName|un.GetBaseName|
+ un.GetFileExt|un.BannerTrimPath|un.DirState|un.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
+!define FILEFUNC_INCLUDED
+
+!verbose push
+!verbose 3
+!ifndef _FILEFUNC_VERBOSE
+ !define _FILEFUNC_VERBOSE 3
+!endif
+!verbose ${_FILEFUNC_VERBOSE}
+!define FILEFUNC_VERBOSE `!insertmacro FILEFUNC_VERBOSE`
+!define _FILEFUNC_UN
+!define _FILEFUNC_S
+!verbose pop
+
+!macro FILEFUNC_VERBOSE _VERBOSE
+ !verbose push
+ !verbose 3
+ !undef _FILEFUNC_VERBOSE
+ !define _FILEFUNC_VERBOSE ${_VERBOSE}
+ !verbose pop
+!macroend
+
+
+# Install. Case insensitive. #
+
+!macro LocateCall _PATH _OPTIONS _FUNC
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push $0
+ Push `${_PATH}`
+ Push `${_OPTIONS}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call Locate
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro GetSizeCall _PATH _OPTIONS _RESULT1 _RESULT2 _RESULT3
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_OPTIONS}`
+ Call GetSize
+ Pop ${_RESULT1}
+ Pop ${_RESULT2}
+ Pop ${_RESULT3}
+ !verbose pop
+!macroend
+
+!macro DriveSpaceCall _DRIVE _OPTIONS _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_DRIVE}`
+ Push `${_OPTIONS}`
+ Call DriveSpace
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetDrivesCall _DRV _FUNC
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push $0
+ Push `${_DRV}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call 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}`
+ Call 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}`
+ Call GetFileAttributes
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetFileVersionCall _FILE _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILE}`
+ Call GetFileVersion
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetExeNameCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call GetExeName
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetExePathCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call GetExePath
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetParametersCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call GetParameters
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetOptionsCall _PARAMETERS _OPTION _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PARAMETERS}`
+ Push `${_OPTION}`
+ Call GetOptions
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetRootCall _FULLPATH _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FULLPATH}`
+ Call GetRoot
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetParentCall _PATHSTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATHSTRING}`
+ Call GetParent
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetFileNameCall _PATHSTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATHSTRING}`
+ Call GetFileName
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetBaseNameCall _FILESTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILESTRING}`
+ Call GetBaseName
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetFileExtCall _FILESTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILESTRING}`
+ Call GetFileExt
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro BannerTrimPathCall _PATH _LENGHT _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_LENGHT}`
+ Call BannerTrimPath
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro DirStateCall _PATH _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Call DirState
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro RefreshShellIconsCall
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call RefreshShellIcons
+ !verbose pop
+!macroend
+
+!macro Locate
+ !ifndef ${_FILEFUNC_UN}Locate
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}Locate `!insertmacro ${_FILEFUNC_UN}LocateCall`
+
+ Function ${_FILEFUNC_UN}Locate
+ 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 error
+
+ option:
+ StrCpy $R9 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $R9 ' ' -2
+ StrCmp $R9 '' 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 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 error
+ goto option
+
+ mask:
+ StrCmp $R9 'M=' 0 size
+ StrCpy $4 $R8
+ goto option
+
+ size:
+ StrCmp $R9 'S=' 0 gotosubdir
+ StrCpy $6 $R8
+ goto option
+
+ gotosubdir:
+ StrCmp $R9 'G=' 0 banner
+ StrCpy $7 $R8
+ StrCmp $7 '' +3
+ StrCmp $7 '1' +2
+ StrCmp $7 '0' 0 error
+ goto option
+
+ banner:
+ StrCmp $R9 'B=' 0 error
+ StrCpy $R7 $R8
+ StrCmp $R7 '' +3
+ StrCmp $R7 '1' +2
+ StrCmp $R7 '0' 0 error
+ goto option
+
+ sizeset:
+ StrCmp $6 '' 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 default
+ StrCmp $1 'K' 0 +3
+ StrCpy $1 1024
+ goto default
+ StrCmp $1 'M' 0 +3
+ StrCpy $1 1048576
+ goto default
+ StrCmp $1 'G' 0 error
+ StrCpy $1 1073741824
+
+ 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
+
+ nextdir:
+ IntOp $8 $8 - 1
+ Pop $R8
+
+ StrCpy $9 $7 2 2
+ StrCmp $9 'B0' +3
+ GetLabelAddress $9 findfirst
+ goto call
+ DetailPrint 'Search in: $R8'
+
+ findfirst:
+ FindFirst $0 $R7 '$R8\$4'
+ IfErrors subdir
+ StrCmp $R7 '.' 0 dir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 dir
+ FindNext $0 $R7
+ IfErrors 0 dir
+ FindClose $0
+ goto subdir
+
+ dir:
+ IfFileExists '$R8\$R7\*.*' 0 file
+ StrCpy $R6 ''
+ StrCmp $3 'DE' +4
+ StrCmp $3 'FDE' +3
+ StrCmp $3 'FD' precall
+ StrCmp $3 'F' findnext precall
+ FindFirst $9 $R9 '$R8\$R7\*.*'
+ StrCmp $R9 '.' 0 +4
+ FindNext $9 $R9
+ StrCmp $R9 '..' 0 +2
+ FindNext $9 $R9
+ FindClose $9
+ IfErrors precall findnext
+
+ file:
+ StrCmp $3 'FDE' +3
+ StrCmp $3 'FD' +2
+ StrCmp $3 'F' 0 findnext
+ StrCpy $R6 0
+ StrCmp $5$6 '' 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 findnext
+ StrCmp $6 '' +2
+ IntCmp $R6 $6 0 0 findnext
+
+ 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 error
+ StrCmp $R9 'StopLocate' 0 +3
+ FindClose $0
+ goto clearstack
+ goto $9
+
+ findnext:
+ FindNext $0 $R7
+ IfErrors 0 dir
+ FindClose $0
+
+ subdir:
+ StrCpy $9 $7 2
+ StrCmp $9 'G0' end
+ FindFirst $0 $R7 '$R8\*.*'
+ StrCmp $R7 '.' 0 pushdir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 pushdir
+ FindNext $0 $R7
+ IfErrors 0 pushdir
+ FindClose $0
+ StrCmp $8 0 end nextdir
+
+ pushdir:
+ IfFileExists '$R8\$R7\*.*' 0 +3
+ Push '$R8\$R7'
+ IntOp $8 $8 + 1
+ FindNext $0 $R7
+ IfErrors 0 pushdir
+ FindClose $0
+ StrCmp $8 0 end nextdir
+
+ error:
+ SetErrors
+
+ clearstack:
+ StrCmp $8 0 end
+ IntOp $8 $8 - 1
+ Pop $R8
+ goto clearstack
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetSize
+ !ifndef ${_FILEFUNC_UN}GetSize
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetSize `!insertmacro ${_FILEFUNC_UN}GetSizeCall`
+
+ Function ${_FILEFUNC_UN}GetSize
+ 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 error
+
+ StrCpy $3 ''
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCpy $6 ''
+ StrCpy $8 0
+ StrCpy $R3 ''
+ StrCpy $R4 ''
+ StrCpy $R5 ''
+
+ option:
+ StrCpy $R9 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $R9 ' ' -2
+ StrCmp $R9 '' 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 size
+ StrCpy $4 $8
+ goto option
+
+ size:
+ StrCmp $R9 'S=' 0 gotosubdir
+ StrCpy $6 $8
+ goto option
+
+ gotosubdir:
+ StrCmp $R9 'G=' 0 error
+ StrCpy $7 $8
+ StrCmp $7 '' +3
+ StrCmp $7 '1' +2
+ StrCmp $7 '0' 0 error
+ goto option
+
+ sizeset:
+ StrCmp $6 '' 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 default
+ StrCmp $1 'K' 0 +4
+ StrCpy $1 1024
+ StrCpy $2 Kb
+ goto default
+ StrCmp $1 'M' 0 +4
+ StrCpy $1 1048576
+ StrCpy $2 Mb
+ goto default
+ StrCmp $1 'G' 0 error
+ StrCpy $1 1073741824
+ StrCpy $2 Gb
+
+ default:
+ StrCmp $4 '' 0 +2
+ StrCpy $4 '*.*'
+ StrCmp $7 '' 0 +2
+ StrCpy $7 '1'
+
+ StrCpy $8 1
+ Push $0
+ SetDetailsPrint textonly
+
+ nextdir:
+ IntOp $8 $8 - 1
+ Pop $R8
+ FindFirst $0 $R7 '$R8\$4'
+ IfErrors show
+ StrCmp $R7 '.' 0 dir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 dir
+ FindNext $0 $R7
+ IfErrors 0 dir
+ FindClose $0
+ goto show
+
+ dir:
+ IfFileExists '$R8\$R7\*.*' 0 file
+ IntOp $R5 $R5 + 1
+ goto findnext
+
+ file:
+ StrCpy $R6 0
+ StrCmp $5$6 '' 0 +3
+ IntOp $R4 $R4 + 1
+ goto findnext
+ FileOpen $9 '$R8\$R7' r
+ IfErrors +3
+ FileSeek $9 0 END $R6
+ FileClose $9
+ StrCmp $5 '' +2
+ IntCmp $R6 $5 0 findnext
+ StrCmp $6 '' +2
+ IntCmp $R6 $6 0 0 findnext
+ IntOp $R4 $R4 + 1
+ System::Int64Op /NOUNLOAD $R3 + $R6
+ Pop $R3
+
+ findnext:
+ FindNext $0 $R7
+ IfErrors 0 dir
+ FindClose $0
+
+ show:
+ StrCmp $5$6 '' nosize
+ System::Int64Op /NOUNLOAD $R3 / $1
+ Pop $9
+ DetailPrint 'Size:$9 $2 Files:$R4 Folders:$R5'
+ goto subdir
+ nosize:
+ DetailPrint 'Files:$R4 Folders:$R5'
+
+ subdir:
+ StrCmp $7 0 preend
+ FindFirst $0 $R7 '$R8\*.*'
+ StrCmp $R7 '.' 0 pushdir
+ FindNext $0 $R7
+ StrCmp $R7 '..' 0 pushdir
+ FindNext $0 $R7
+ IfErrors 0 pushdir
+ FindClose $0
+ StrCmp $8 0 preend nextdir
+
+ pushdir:
+ IfFileExists '$R8\$R7\*.*' 0 +3
+ Push '$R8\$R7'
+ IntOp $8 $8 + 1
+ FindNext $0 $R7
+ IfErrors 0 pushdir
+ FindClose $0
+ StrCmp $8 0 preend nextdir
+
+ preend:
+ StrCmp $R3 '' nosizeend
+ System::Int64Op $R3 / $1
+ Pop $R3
+ nosizeend:
+ StrCpy $2 $R4
+ StrCpy $1 $R5
+ StrCpy $0 $R3
+ goto end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+ StrCpy $1 ''
+ StrCpy $2 ''
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro DriveSpace
+ !ifndef ${_FILEFUNC_UN}DriveSpace
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}DriveSpace `!insertmacro ${_FILEFUNC_UN}DriveSpaceCall`
+
+ Function ${_FILEFUNC_UN}DriveSpace
+ 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 error
+
+ StrCpy $5 ''
+ StrCpy $6 ''
+
+ option:
+ StrCpy $2 $1 1
+ StrCpy $1 $1 '' 1
+ StrCmp $2 ' ' -2
+ StrCmp $2 '' 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 unit
+ StrCpy $5 $4
+ StrCmp $5 '' +4
+ StrCmp $5 'T' +3
+ StrCmp $5 'O' +2
+ StrCmp $5 'F' 0 error
+ goto option
+
+ unit:
+ StrCmp $2 'S=' 0 error
+ StrCpy $6 $4
+ goto option
+
+ default:
+ StrCmp $5 '' 0 +2
+ StrCpy $5 'T'
+ StrCmp $6 '' 0 +3
+ StrCpy $6 '1'
+ goto getspace
+
+ StrCmp $6 'B' 0 +3
+ StrCpy $6 1
+ goto getspace
+ StrCmp $6 'K' 0 +3
+ StrCpy $6 1024
+ goto getspace
+ StrCmp $6 'M' 0 +3
+ StrCpy $6 1048576
+ goto getspace
+ StrCmp $6 'G' 0 error
+ StrCpy $6 1073741824
+
+ getspace:
+ System::Call /NOUNLOAD 'kernel32::GetDiskFreeSpaceExA(t, *l, *l, *l)i(r0,.r2,.r3,.)'
+
+ StrCmp $5 T 0 +3
+ StrCpy $0 $3
+ goto getsize
+ StrCmp $5 O 0 +4
+ System::Int64Op /NOUNLOAD $3 - $2
+ Pop $0
+ goto getsize
+ StrCmp $5 F 0 +2
+ StrCpy $0 $2
+
+ getsize:
+ System::Int64Op $0 / $6
+ Pop $0
+ goto end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetDrives
+ !ifndef ${_FILEFUNC_UN}GetDrives
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetDrives `!insertmacro ${_FILEFUNC_UN}GetDrivesCall`
+
+ Function ${_FILEFUNC_UN}GetDrives
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $8
+ Push $9
+
+ System::Alloc /NOUNLOAD 1024
+ Pop $2
+ System::Call /NOUNLOAD 'kernel32::GetLogicalDriveStringsA(i,i) i(1024, r2)'
+
+ StrCmp $0 ALL drivestring
+ StrCmp $0 '' 0 typeset
+ StrCpy $0 ALL
+ goto drivestring
+
+ typeset:
+ StrCpy $6 -1
+ IntOp $6 $6 + 1
+ StrCpy $8 $0 1 $6
+ StrCmp $8$0 '' 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 drivestring
+ StrCmp $8 'HDD' 0 +3
+ StrCpy $6 3
+ goto drivestring
+ StrCmp $8 'NET' 0 +3
+ StrCpy $6 4
+ goto drivestring
+ StrCmp $8 'CDROM' 0 +3
+ StrCpy $6 5
+ goto drivestring
+ StrCmp $8 'RAM' 0 typeset
+ StrCpy $6 6
+
+ drivestring:
+ StrCpy $3 $2
+
+ enumok:
+ System::Call /NOUNLOAD 'kernel32::lstrlenA(t) i(i r3) .r4'
+ StrCmp $4$0 '0ALL' enumex
+ StrCmp $4 0 typeset
+ System::Call /NOUNLOAD 'kernel32::GetDriveTypeA(t) i(i r3) .r5'
+
+ StrCmp $0 ALL +2
+ StrCmp $5 $6 letter enumnext
+ StrCmp $5 2 0 +3
+ StrCpy $8 FDD
+ goto letter
+ StrCmp $5 3 0 +3
+ StrCpy $8 HDD
+ goto letter
+ StrCmp $5 4 0 +3
+ StrCpy $8 NET
+ goto letter
+ StrCmp $5 5 0 +3
+ StrCpy $8 CDROM
+ goto letter
+ StrCmp $5 6 0 enumex
+ StrCpy $8 RAM
+
+ letter:
+ System::Call /NOUNLOAD '*$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' enumex
+
+ enumnext:
+ IntOp $3 $3 + $4
+ IntOp $3 $3 + 1
+ goto enumok
+
+ enumex:
+ System::Free $2
+
+ Pop $9
+ Pop $8
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetTime
+ !ifndef ${_FILEFUNC_UN}GetTime
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetTime `!insertmacro ${_FILEFUNC_UN}GetTimeCall`
+
+ Function ${_FILEFUNC_UN}GetTime
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+ ClearErrors
+
+ StrCmp $1 'L' gettime
+ StrCmp $1 'A' getfile
+ StrCmp $1 'C' getfile
+ StrCmp $1 'M' getfile
+ StrCmp $1 'LS' gettime
+ StrCmp $1 'AS' getfile
+ StrCmp $1 'CS' getfile
+ StrCmp $1 'MS' getfile
+ goto error
+
+ getfile:
+ IfFileExists $0 0 error
+ System::Call /NOUNLOAD '*(i,l,l,l,i,i,i,i,&t260,&t14) i .r6'
+ System::Call /NOUNLOAD 'kernel32::FindFirstFileA(t,i)i(r0,r6) .r2'
+ System::Call /NOUNLOAD 'kernel32::FindClose(i)i(r2)'
+
+ gettime:
+ System::Call /NOUNLOAD '*(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2) i .r7'
+ StrCmp $1 'L' 0 systemtime
+ System::Call /NOUNLOAD 'kernel32::GetLocalTime(i)i(r7)'
+ goto convert
+ systemtime:
+ StrCmp $1 'LS' 0 filetime
+ System::Call /NOUNLOAD 'kernel32::GetSystemTime(i)i(r7)'
+ goto convert
+
+ filetime:
+ System::Call /NOUNLOAD '*$6(i,l,l,l,i,i,i,i,&t260,&t14)i(,.r4,.r3,.r2)'
+ System::Free /NOUNLOAD $6
+ StrCmp $1 'A' 0 +3
+ StrCpy $2 $3
+ goto tolocal
+ StrCmp $1 'C' 0 +3
+ StrCpy $2 $4
+ goto tolocal
+ StrCmp $1 'M' tolocal
+
+ StrCmp $1 'AS' tosystem
+ StrCmp $1 'CS' 0 +3
+ StrCpy $3 $4
+ goto tosystem
+ StrCmp $1 'MS' 0 +3
+ StrCpy $3 $2
+ goto tosystem
+
+ tolocal:
+ System::Call /NOUNLOAD 'kernel32::FileTimeToLocalFileTime(*l,*l)i(r2,.r3)'
+ tosystem:
+ System::Call /NOUNLOAD 'kernel32::FileTimeToSystemTime(*l,i)i(r3,r7)'
+
+ convert:
+ System::Call /NOUNLOAD '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.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 end
+ StrCmp $4 1 0 +3
+ StrCpy $4 Monday
+ goto end
+ StrCmp $4 2 0 +3
+ StrCpy $4 Tuesday
+ goto end
+ StrCmp $4 3 0 +3
+ StrCpy $4 Wednesday
+ goto end
+ StrCmp $4 4 0 +3
+ StrCpy $4 Thursday
+ goto end
+ StrCmp $4 5 0 +3
+ StrCpy $4 Friday
+ goto end
+ StrCmp $4 6 0 error
+ StrCpy $4 Saturday
+ goto end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+ StrCpy $1 ''
+ StrCpy $2 ''
+ StrCpy $3 ''
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCpy $6 ''
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetFileAttributes
+ !ifndef ${_FILEFUNC_UN}GetFileAttributes
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetFileAttributes `!insertmacro ${_FILEFUNC_UN}GetFileAttributesCall`
+
+ Function ${_FILEFUNC_UN}GetFileAttributes
+ 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 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 '' end
+ StrCmp $1 'ALL' end
+
+ 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 '' notfound
+ StrCmp $4 $2 0 -3
+ StrCmp $1 '' 0 attrcmp
+ StrCpy $0 1
+ goto end
+
+ notfound:
+ StrCpy $0 0
+ goto end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetFileVersion
+ !ifndef ${_FILEFUNC_UN}GetFileVersion
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetFileVersion `!insertmacro ${_FILEFUNC_UN}GetFileVersionCall`
+
+ Function ${_FILEFUNC_UN}GetFileVersion
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ ClearErrors
+
+ GetDllVersion '$0' $1 $2
+ IfErrors 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 end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetExeName
+ !ifndef ${_FILEFUNC_UN}GetExeName
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetExeName `!insertmacro ${_FILEFUNC_UN}GetExeNameCall`
+
+ Function ${_FILEFUNC_UN}GetExeName
+ Push $0
+ Push $1
+ Push $2
+ System::Call /NOUNLOAD 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024)'
+ System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2'
+ StrCmp $2 error +2
+ StrCpy $0 $1
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetExePath
+ !ifndef ${_FILEFUNC_UN}GetExePath
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetExePath `!insertmacro ${_FILEFUNC_UN}GetExePathCall`
+
+ Function ${_FILEFUNC_UN}GetExePath
+ Push $0
+ Push $1
+ Push $2
+ StrCpy $0 $EXEDIR
+ System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2'
+ StrCmp $2 error +2
+ StrCpy $0 $1
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetParameters
+ !ifndef ${_FILEFUNC_UN}GetParameters
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetParameters `!insertmacro ${_FILEFUNC_UN}GetParametersCall`
+
+ Function ${_FILEFUNC_UN}GetParameters
+ Push $0
+ Push $1
+ Push $2
+
+ StrCpy $1 1
+ StrCpy $0 $CMDLINE 1
+ StrCmp $0 '"' 0 +3
+ StrCpy $2 '"'
+ goto +2
+ StrCpy $2 ' '
+
+ IntOp $1 $1 + 1
+ StrCpy $0 $CMDLINE 1 $1
+ StrCmp $0 $2 +2
+ StrCmp $0 '' end -3
+
+ IntOp $1 $1 + 1
+ StrCpy $0 $CMDLINE 1 $1
+ StrCmp $0 ' ' -2
+ StrCpy $0 $CMDLINE '' $1
+
+ StrCpy $1 $0 1 -1
+ StrCmp $1 ' ' 0 +3
+ StrCpy $0 $0 -1
+ goto -3
+
+ end:
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetOptions
+ !ifndef ${_FILEFUNC_UN}GetOptions${_FILEFUNC_S}
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetOptions${_FILEFUNC_S} `!insertmacro ${_FILEFUNC_UN}GetOptions${_FILEFUNC_S}Call`
+
+ Function ${_FILEFUNC_UN}GetOptions${_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
+
+ begin:
+ StrCpy $4 -1
+ StrCpy $6 ''
+
+ quote:
+ IntOp $4 $4 + 1
+ StrCpy $5 $0 1 $4
+ StrCmp${_FILEFUNC_S} $5$7 '0' notfound
+ StrCmp${_FILEFUNC_S} $5 '' trimright
+ StrCmp${_FILEFUNC_S} $5 '"' 0 +7
+ StrCmp${_FILEFUNC_S} $6 '' 0 +3
+ StrCpy $6 '"'
+ goto quote
+ StrCmp${_FILEFUNC_S} $6 '"' 0 +3
+ StrCpy $6 ''
+ goto quote
+ StrCmp${_FILEFUNC_S} $5 `'` 0 +7
+ StrCmp${_FILEFUNC_S} $6 `` 0 +3
+ StrCpy $6 `'`
+ goto quote
+ StrCmp${_FILEFUNC_S} $6 `'` 0 +3
+ StrCpy $6 ``
+ goto quote
+ StrCmp${_FILEFUNC_S} $5 '`' 0 +7
+ StrCmp${_FILEFUNC_S} $6 '' 0 +3
+ StrCpy $6 '`'
+ goto quote
+ StrCmp${_FILEFUNC_S} $6 '`' 0 +3
+ StrCpy $6 ''
+ goto quote
+ StrCmp${_FILEFUNC_S} $6 '"' quote
+ StrCmp${_FILEFUNC_S} $6 `'` quote
+ StrCmp${_FILEFUNC_S} $6 '`' quote
+ StrCmp${_FILEFUNC_S} $5 $1 0 quote
+ StrCmp${_FILEFUNC_S} $7 0 trimleft trimright
+
+ trimleft:
+ IntOp $4 $4 + 1
+ StrCpy $5 $0 $3 $4
+ StrCmp${_FILEFUNC_S} $5 '' notfound
+ StrCmp${_FILEFUNC_S} $5 $2 0 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 begin
+
+ 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 end
+ StrCmp${_FILEFUNC_S} $3 '"' +3
+ StrCmp${_FILEFUNC_S} $3 `'` +2
+ StrCmp${_FILEFUNC_S} $3 '`' 0 end
+ StrCpy $0 $0 -1 1
+ goto end
+
+ notfound:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+
+!macro GetRoot
+ !ifndef ${_FILEFUNC_UN}GetRoot
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetRoot `!insertmacro ${_FILEFUNC_UN}GetRootCall`
+
+ Function ${_FILEFUNC_UN}GetRoot
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+
+ StrCpy $1 $0 2
+ StrCmp $1 '\\' UNC
+ StrCpy $2 $1 1 1
+ StrCmp $2 ':' 0 empty
+ StrCpy $0 $1
+ goto end
+
+ UNC:
+ StrCpy $2 1
+ StrCpy $3 ''
+
+ loop:
+ IntOp $2 $2 + 1
+ StrCpy $1 $0 1 $2
+ StrCmp $1$3 '' empty
+ StrCmp $1 '' +5
+ StrCmp $1 '\' 0 loop
+ StrCmp $3 '1' +3
+ StrCpy $3 '1'
+ goto loop
+ StrCpy $0 $0 $2
+ StrCpy $2 $0 1 -1
+ StrCmp $2 '\' 0 end
+
+ empty:
+ StrCpy $0 ''
+
+ end:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetParent
+ !ifndef ${_FILEFUNC_UN}GetParent
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetParent `!insertmacro ${_FILEFUNC_UN}GetParentCall`
+
+ Function ${_FILEFUNC_UN}GetParent
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetFileName
+ !ifndef ${_FILEFUNC_UN}GetFileName
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetFileName `!insertmacro ${_FILEFUNC_UN}GetFileNameCall`
+
+ Function ${_FILEFUNC_UN}GetFileName
+ 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 '' end
+ StrCmp $2 '\' 0 -3
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 '' $1
+
+ end:
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetBaseName
+ !ifndef ${_FILEFUNC_UN}GetBaseName
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetBaseName `!insertmacro ${_FILEFUNC_UN}GetBaseNameCall`
+
+ Function ${_FILEFUNC_UN}GetBaseName
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+
+ StrCpy $1 0
+ StrCpy $3 ''
+
+ loop:
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '' trimpath
+ StrCmp $2 '\' trimpath
+ StrCmp $3 'noext' loop
+ StrCmp $2 '.' 0 loop
+ StrCpy $0 $0 $1
+ StrCpy $3 'noext'
+ StrCpy $1 0
+ goto loop
+
+ trimpath:
+ StrCmp $1 -1 empty
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 '' $1
+ goto end
+
+ empty:
+ StrCpy $0 ''
+
+ end:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetFileExt
+ !ifndef ${_FILEFUNC_UN}GetFileExt
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}GetFileExt `!insertmacro ${_FILEFUNC_UN}GetFileExtCall`
+
+ Function ${_FILEFUNC_UN}GetFileExt
+ Exch $0
+ Push $1
+ Push $2
+
+ StrCpy $1 0
+
+ loop:
+ IntOp $1 $1 - 1
+ StrCpy $2 $0 1 $1
+ StrCmp $2 '' empty
+ StrCmp $2 '\' empty
+ StrCmp $2 '.' 0 loop
+
+ StrCmp $1 -1 empty
+ IntOp $1 $1 + 1
+ StrCpy $0 $0 '' $1
+ goto end
+
+ empty:
+ StrCpy $0 ''
+
+ end:
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro BannerTrimPath
+ !ifndef ${_FILEFUNC_UN}BannerTrimPath
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}BannerTrimPath `!insertmacro ${_FILEFUNC_UN}BannerTrimPathCall`
+
+ Function ${_FILEFUNC_UN}BannerTrimPath
+ 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 end end
+ IntOp $1 $1 - 3
+ IntCmp $1 0 empty empty
+ StrCmp $3 'A' A-trim
+ StrCmp $3 'B' B-trim
+ StrCmp $3 'C' C-trim
+ StrCmp $3 'D' D-trim
+
+ A-trim:
+ StrCpy $3 $0 1 1
+ StrCpy $2 0
+ StrCmp $3 ':' 0 +2
+ IntOp $2 $2 + 2
+
+ loopleft:
+ IntOp $2 $2 + 1
+ StrCpy $3 $0 1 $2
+ StrCmp $2 $1 C-trim
+ StrCmp $3 '\' 0 loopleft
+ StrCpy $3 $0 $2
+ IntOp $2 $2 - $1
+ IntCmp $2 0 B-trim 0 B-trim
+
+ loopright:
+ IntOp $2 $2 + 1
+ StrCpy $4 $0 1 $2
+ StrCmp $2 0 B-trim
+ StrCmp $4 '\' 0 loopright
+ StrCpy $4 $0 '' $2
+ StrCpy $0 '$3\...$4'
+ goto end
+
+ B-trim:
+ StrCpy $2 $1
+ IntOp $2 $2 - 1
+ StrCmp $2 -1 C-trim
+ StrCpy $3 $0 1 $2
+ StrCmp $3 '\' 0 -3
+ StrCpy $0 $0 $2
+ StrCpy $0 '$0\...'
+ goto end
+
+ C-trim:
+ StrCpy $0 $0 $1
+ StrCpy $0 '$0...'
+ goto end
+
+ D-trim:
+ StrCpy $3 -1
+ IntOp $3 $3 - 1
+ StrCmp $3 -$2 C-trim
+ StrCpy $4 $0 1 $3
+ StrCmp $4 '\' 0 -3
+ StrCpy $4 $0 '' $3
+ IntOp $3 $1 + $3
+ IntCmp $3 2 C-trim C-trim
+ StrCpy $0 $0 $3
+ StrCpy $0 '$0...$4'
+ goto end
+
+ empty:
+ StrCpy $0 ''
+
+ end:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro DirState
+ !ifndef ${_FILEFUNC_UN}DirState
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}DirState `!insertmacro ${_FILEFUNC_UN}DirStateCall`
+
+ Function ${_FILEFUNC_UN}DirState
+ Exch $0
+ Push $1
+ ClearErrors
+
+ FindFirst $1 $0 '$0\*.*'
+ IfErrors 0 +3
+ StrCpy $0 -1
+ goto end
+ StrCmp $0 '.' 0 +4
+ FindNext $1 $0
+ StrCmp $0 '..' 0 +2
+ FindNext $1 $0
+ FindClose $1
+ IfErrors 0 +3
+ StrCpy $0 0
+ goto end
+ StrCpy $0 1
+
+ end:
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro RefreshShellIcons
+ !ifndef ${_FILEFUNC_UN}RefreshShellIcons
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !define ${_FILEFUNC_UN}RefreshShellIcons `!insertmacro ${_FILEFUNC_UN}RefreshShellIconsCall`
+
+ Function ${_FILEFUNC_UN}RefreshShellIcons
+ System::Call 'shell32::SHChangeNotify(i 0x08000000, i 0, i 0, i 0)'
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+
+# Uninstall. Case insensitive. #
+
+!macro un.LocateCall _PATH _OPTIONS _FUNC
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push $0
+ Push `${_PATH}`
+ Push `${_OPTIONS}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call un.Locate
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro un.GetSizeCall _PATH _OPTIONS _RESULT1 _RESULT2 _RESULT3
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_OPTIONS}`
+ Call un.GetSize
+ Pop ${_RESULT1}
+ Pop ${_RESULT2}
+ Pop ${_RESULT3}
+ !verbose pop
+!macroend
+
+!macro un.DriveSpaceCall _DRIVE _OPTIONS _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_DRIVE}`
+ Push `${_OPTIONS}`
+ Call un.DriveSpace
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetDrivesCall _DRV _FUNC
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push $0
+ Push `${_DRV}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call un.GetDrives
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro un.GetTimeCall _FILE _OPTION _RESULT1 _RESULT2 _RESULT3 _RESULT4 _RESULT5 _RESULT6 _RESULT7
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_OPTION}`
+ Call un.GetTime
+ Pop ${_RESULT1}
+ Pop ${_RESULT2}
+ Pop ${_RESULT3}
+ Pop ${_RESULT4}
+ Pop ${_RESULT5}
+ Pop ${_RESULT6}
+ Pop ${_RESULT7}
+ !verbose pop
+!macroend
+
+!macro un.GetFileAttributesCall _PATH _ATTR _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_ATTR}`
+ Call un.GetFileAttributes
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetFileVersionCall _FILE _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILE}`
+ Call un.GetFileVersion
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetExeNameCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call un.GetExeName
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetExePathCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call un.GetExePath
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetParametersCall _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call un.GetParameters
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetOptionsCall _PARAMETERS _OPTION _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PARAMETERS}`
+ Push `${_OPTION}`
+ Call un.GetOptions
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetRootCall _FULLPATH _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FULLPATH}`
+ Call un.GetRoot
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetParentCall _PATHSTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATHSTRING}`
+ Call un.GetParent
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetFileNameCall _PATHSTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATHSTRING}`
+ Call un.GetFileName
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetBaseNameCall _FILESTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILESTRING}`
+ Call un.GetBaseName
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetFileExtCall _FILESTRING _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_FILESTRING}`
+ Call un.GetFileExt
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.BannerTrimPathCall _PATH _LENGHT _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Push `${_LENGHT}`
+ Call un.BannerTrimPath
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.DirStateCall _PATH _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PATH}`
+ Call un.DirState
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.RefreshShellIconsCall
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Call un.RefreshShellIcons
+ !verbose pop
+!macroend
+
+!macro un.Locate
+ !ifndef un.Locate
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro Locate
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetSize
+ !ifndef un.GetSize
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetSize
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.DriveSpace
+ !ifndef un.DriveSpace
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro DriveSpace
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetDrives
+ !ifndef un.GetDrives
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetDrives
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetTime
+ !ifndef un.GetTime
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetTime
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetFileAttributes
+ !ifndef un.GetFileAttributes
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetFileAttributes
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetFileVersion
+ !ifndef un.GetFileVersion
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetFileVersion
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetExeName
+ !ifndef un.GetExeName
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetExeName
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetExePath
+ !ifndef un.GetExePath
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetExePath
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetParameters
+ !ifndef un.GetParameters
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetParameters
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetOptions
+ !ifndef un.GetOptions
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetOptions
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetRoot
+ !ifndef un.GetRoot
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetRoot
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetParent
+ !ifndef un.GetParent
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetParent
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetFileName
+ !ifndef un.GetFileName
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetFileName
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetBaseName
+ !ifndef un.GetBaseName
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetBaseName
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.GetFileExt
+ !ifndef un.GetFileExt
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro GetFileExt
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.BannerTrimPath
+ !ifndef un.BannerTrimPath
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro BannerTrimPath
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.DirState
+ !ifndef un.DirState
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro DirState
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.RefreshShellIcons
+ !ifndef un.RefreshShellIcons
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+
+ !insertmacro RefreshShellIcons
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+
+# Install. Case sensitive. #
+
+!macro GetOptionsSCall _PARAMETERS _OPTION _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PARAMETERS}`
+ Push `${_OPTION}`
+ Call GetOptionsS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro GetOptionsS
+ !ifndef GetOptionsS
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_S
+ !define _FILEFUNC_S `S`
+
+ !insertmacro GetOptions
+
+ !undef _FILEFUNC_S
+ !define _FILEFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+
+# Uninstall. Case sensitive. #
+
+!macro un.GetOptionsSCall _PARAMETERS _OPTION _RESULT
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ Push `${_PARAMETERS}`
+ Push `${_OPTION}`
+ Call un.GetOptionsS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetOptionsS
+ !ifndef un.GetOptionsS
+ !verbose push
+ !verbose ${_FILEFUNC_VERBOSE}
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN `un.`
+ !undef _FILEFUNC_S
+ !define _FILEFUNC_S `S`
+
+ !insertmacro GetOptions
+
+ !undef _FILEFUNC_UN
+ !define _FILEFUNC_UN
+ !undef _FILEFUNC_S
+ !define _FILEFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!endif
diff --git a/Include/LangFile.nsh b/Include/LangFile.nsh
index 0e22b38..04ac769 100755
--- a/Include/LangFile.nsh
+++ b/Include/LangFile.nsh
@@ -1,86 +1,86 @@
-/*
-
-LangFile.nsh
-
-Header file to create langauge file that can be
-included with a single command.
-
-When LANGFILE_DEFAULT is set, missing strings will
-automatically be loaded from a default file.
-
-Copyright © 2007 Joost Verburg
-
-*/
-
-!macro LANGFILE_INCLUDE FILENAME
-
- ;Called from script: include a langauge 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
-
- !ifdef LANGFILE_DEFAULT
- !include "${LANGFILE_DEFAULT}"
- !endif
-
- ;Create language strings
-
- !undef LangFileString
- !define LangFileString "!insertmacro LANGFILE_LANGSTRING"
-
- !ifdef LANGFILE_DEFAULT
- !include "${LANGFILE_DEFAULT}"
- !else
- !include "${FILENAME}"
- !endif
-
-!macroend
-
-!macro LANGFILE IDNAME NAME
-
- ;Start of langauge file, set names
-
- !ifdef LANGFILE_SETNAMES
-
- !ifdef LANGFILE_IDNAME
- !undef LANGFILE_IDNAME
- !endif
-
- !ifdef "LANGFILE_${IDNAME}_NAME"
- !undef "LANGFILE_${IDNAME}_NAME"
- !endif
-
- !define LANGFILE_IDNAME "${IDNAME}"
- !define "LANGFILE_${IDNAME}_NAME" "${NAME}"
-
- !endif
-
-!macroend
-
-!macro LANGFILE_SETSTRING NAME VALUE
-
- ;Set define with translated string
-
- !ifndef ${NAME}
- !define "${NAME}" "${VALUE}"
- !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
+/*
+
+LangFile.nsh
+
+Header file to create langauge file that can be
+included with a single command.
+
+When LANGFILE_DEFAULT is set, missing strings will
+automatically be loaded from a default file.
+
+Copyright © 2007 Joost Verburg
+
+*/
+
+!macro LANGFILE_INCLUDE FILENAME
+
+ ;Called from script: include a langauge 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
+
+ !ifdef LANGFILE_DEFAULT
+ !include "${LANGFILE_DEFAULT}"
+ !endif
+
+ ;Create language strings
+
+ !undef LangFileString
+ !define LangFileString "!insertmacro LANGFILE_LANGSTRING"
+
+ !ifdef LANGFILE_DEFAULT
+ !include "${LANGFILE_DEFAULT}"
+ !else
+ !include "${FILENAME}"
+ !endif
+
+!macroend
+
+!macro LANGFILE IDNAME NAME
+
+ ;Start of langauge file, set names
+
+ !ifdef LANGFILE_SETNAMES
+
+ !ifdef LANGFILE_IDNAME
+ !undef LANGFILE_IDNAME
+ !endif
+
+ !ifdef "LANGFILE_${IDNAME}_NAME"
+ !undef "LANGFILE_${IDNAME}_NAME"
+ !endif
+
+ !define LANGFILE_IDNAME "${IDNAME}"
+ !define "LANGFILE_${IDNAME}_NAME" "${NAME}"
+
+ !endif
+
+!macroend
+
+!macro LANGFILE_SETSTRING NAME VALUE
+
+ ;Set define with translated string
+
+ !ifndef ${NAME}
+ !define "${NAME}" "${VALUE}"
+ !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
diff --git a/Include/Library.nsh b/Include/Library.nsh
index 2ee9f55..0f6cb19 100755
--- a/Include/Library.nsh
+++ b/Include/Library.nsh
@@ -1,851 +1,851 @@
-#
-# 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
-
-!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\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "count"
- IntOp $R0 $R0 + 1
- WriteRegDWORD HKLM "Software\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "count" "$R0"
-
- ;------------------------
- ;Setup RegTool
-
- ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "NSIS.Library.RegTool.v2"
- StrCpy $R3 $R3 -4 1
- IfFileExists $R3 +3
-
- File /oname=$R2\NSIS.Library.RegTool.v2.$__INSTALLLLIB_SESSIONGUID.exe "${NSISDIR}\Bin\RegTool.bin"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
- "NSIS.Library.RegTool.v2" '"$R2\NSIS.Library.RegTool.v2.$__INSTALLLLIB_SESSIONGUID.exe" /S'
-
- ;------------------------
- ;Add RegTool entry
-
- WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "$R0.file" "$R1"
- WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "$R0.mode" "${mode}"
-
- Pop $R3
- Pop $R2
- Pop $R1
- Pop $R0
-
-!macroend
-
-### Get library version
-!macro __InstallLib_Helper_GetVersion TYPE FILE
-
- !tempfile LIBRARY_TEMP_NSH
-
- !ifdef NSIS_WIN32_MAKENSIS
-
- !execute '"${NSISDIR}\Bin\LibraryLocal.exe" "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
-
- !else
-
- !execute 'LibraryLocal "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
-
- !if ${TYPE} == 'T'
-
- !warning "LibraryLocal currently supports TypeLibs version detection on Windows only"
-
- !endif
-
- !endif
-
- !include "${LIBRARY_TEMP_NSH}"
- !delfile "${LIBRARY_TEMP_NSH}"
- !undef LIBRARY_TEMP_NSH
-
-!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
- !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
-
- IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
- IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
- "installlib.upgrade_${INSTALLLIB_UNIQUE}"
-
- !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
-
- IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
- IntCmpU $R1 $R3 0 "installlib.register_${INSTALLLIB_UNIQUE}" \
- "installlib.upgrade_${INSTALLLIB_UNIQUE}"
-
- !else
-
- IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
- IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
- "installlib.upgrade_${INSTALLLIB_UNIQUE}"
-
- !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
-
- IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
- IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
- "installlib.upgrade_${INSTALLLIB_UNIQUE}"
-
- !undef LIBRARY_VERSION_HIGH
- !undef LIBRARY_VERSION_LOW
-
- !else
-
- !undef LIBRARY_VERSION_NONE
-
- !endif
-
- !endif
-
- !endif
-
- ;------------------------
- ;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
-
- !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_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
-
- 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
- !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_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
+#
+# 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
+
+!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\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "count"
+ IntOp $R0 $R0 + 1
+ WriteRegDWORD HKLM "Software\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "count" "$R0"
+
+ ;------------------------
+ ;Setup RegTool
+
+ ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "NSIS.Library.RegTool.v2"
+ StrCpy $R3 $R3 -4 1
+ IfFileExists $R3 +3
+
+ File /oname=$R2\NSIS.Library.RegTool.v2.$__INSTALLLLIB_SESSIONGUID.exe "${NSISDIR}\Bin\RegTool.bin"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
+ "NSIS.Library.RegTool.v2" '"$R2\NSIS.Library.RegTool.v2.$__INSTALLLLIB_SESSIONGUID.exe" /S'
+
+ ;------------------------
+ ;Add RegTool entry
+
+ WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "$R0.file" "$R1"
+ WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\$__INSTALLLLIB_SESSIONGUID" "$R0.mode" "${mode}"
+
+ Pop $R3
+ Pop $R2
+ Pop $R1
+ Pop $R0
+
+!macroend
+
+### Get library version
+!macro __InstallLib_Helper_GetVersion TYPE FILE
+
+ !tempfile LIBRARY_TEMP_NSH
+
+ !ifdef NSIS_WIN32_MAKENSIS
+
+ !execute '"${NSISDIR}\Bin\LibraryLocal.exe" "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
+
+ !else
+
+ !execute 'LibraryLocal "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
+
+ !if ${TYPE} == 'T'
+
+ !warning "LibraryLocal currently supports TypeLibs version detection on Windows only"
+
+ !endif
+
+ !endif
+
+ !include "${LIBRARY_TEMP_NSH}"
+ !delfile "${LIBRARY_TEMP_NSH}"
+ !undef LIBRARY_TEMP_NSH
+
+!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
+ !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
+
+ IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+ IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
+ "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+
+ !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
+
+ IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+ IntCmpU $R1 $R3 0 "installlib.register_${INSTALLLIB_UNIQUE}" \
+ "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+
+ !else
+
+ IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+ IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
+ "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+
+ !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
+
+ IntCmpU $R0 $R2 0 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+ IntCmpU $R1 $R3 "installlib.register_${INSTALLLIB_UNIQUE}" "installlib.register_${INSTALLLIB_UNIQUE}" \
+ "installlib.upgrade_${INSTALLLIB_UNIQUE}"
+
+ !undef LIBRARY_VERSION_HIGH
+ !undef LIBRARY_VERSION_LOW
+
+ !else
+
+ !undef LIBRARY_VERSION_NONE
+
+ !endif
+
+ !endif
+
+ !endif
+
+ ;------------------------
+ ;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
+
+ !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_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
+
+ 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
+ !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_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/Include/LogicLib.nsh b/Include/LogicLib.nsh
index 49ff986..5566676 100755
--- a/Include/LogicLib.nsh
+++ b/Include/LogicLib.nsh
@@ -1,775 +1,775 @@
-; NSIS LOGIC LIBRARY - LogicLib.nsh
-; Version 2.5 - 23/08/2004
-; By dselkirk@hotmail.com
-; and eccles@users.sf.net
-;
-; 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|Unless..{ElseIf|ElseUnless}..[Else]..EndIf|EndUnless
-; - Conditionally executes a block of statements, depending on the value
-; of an expression.
-; AndIf|AndUnless|OrIf|OrUnless
-; - Adds any number of extra conditions to If, Unless, ElseIf and
-; ElseUnless statements.
-; IfThen..|..|
-; - 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
-; 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
-; 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 _IncreaseCounter
- !define _LOGICLIB_COUNTER ${LOGICLIB_COUNTER}
- !undef LOGICLIB_COUNTER
- !define /math LOGICLIB_COUNTER ${_LOGICLIB_COUNTER} + 1
- !undef _LOGICLIB_COUNTER
- !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::lstrcmpiA(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
-
- ; 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
-
- ; 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_Label_${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`
-
- !macro _And _c _a _o _b
- !verbose push
- !verbose ${LOGICLIB_VERBOSITY}
- !ifndef _Logic | ${_Logic}If
- !error "Cannot use And without a preceding If or 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`
-
- !macro _Or _c _a _o _b
- !verbose push
- !verbose ${LOGICLIB_VERBOSITY}
- !ifndef _Logic | ${_Logic}If
- !error "Cannot use Or without a preceding If or 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_Label_${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`
-
- !macro _Else
- !verbose push
- !verbose ${LOGICLIB_VERBOSITY}
- !ifndef _Logic | ${_Logic}If
- !error "Cannot use Else without a preceding If or 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_Label_${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_Label_${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`
-
- !macro _EndIf _n
- !verbose push
- !verbose ${LOGICLIB_VERBOSITY}
- !ifndef _Logic | ${_Logic}If
- !error "Cannot use End${_n} without a preceding If or 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 _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
- ${_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 the EndSelect
- ${${_Logic}Else}: ; Place the Else label
- !undef ${_Logic}Else ; and remove it
- !else
- !define ${_Logic}EndSelect _LogicLib_Label_${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_Label_${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_Label_${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_Label_${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_Label_${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_Label_${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
- ${${_Logic}EndSelect}: ; Place the EndSelect
- !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
+; NSIS LOGIC LIBRARY - LogicLib.nsh
+; Version 2.5 - 23/08/2004
+; By dselkirk@hotmail.com
+; and eccles@users.sf.net
+;
+; 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|Unless..{ElseIf|ElseUnless}..[Else]..EndIf|EndUnless
+; - Conditionally executes a block of statements, depending on the value
+; of an expression.
+; AndIf|AndUnless|OrIf|OrUnless
+; - Adds any number of extra conditions to If, Unless, ElseIf and
+; ElseUnless statements.
+; IfThen..|..|
+; - 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
+; 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
+; 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 _IncreaseCounter
+ !define _LOGICLIB_COUNTER ${LOGICLIB_COUNTER}
+ !undef LOGICLIB_COUNTER
+ !define /math LOGICLIB_COUNTER ${_LOGICLIB_COUNTER} + 1
+ !undef _LOGICLIB_COUNTER
+ !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::lstrcmpiA(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
+
+ ; 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
+
+ ; 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_Label_${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`
+
+ !macro _And _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use And without a preceding If or 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`
+
+ !macro _Or _c _a _o _b
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use Or without a preceding If or 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_Label_${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`
+
+ !macro _Else
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use Else without a preceding If or 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_Label_${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_Label_${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`
+
+ !macro _EndIf _n
+ !verbose push
+ !verbose ${LOGICLIB_VERBOSITY}
+ !ifndef _Logic | ${_Logic}If
+ !error "Cannot use End${_n} without a preceding If or 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 _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
+ ${_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 the EndSelect
+ ${${_Logic}Else}: ; Place the Else label
+ !undef ${_Logic}Else ; and remove it
+ !else
+ !define ${_Logic}EndSelect _LogicLib_Label_${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_Label_${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_Label_${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_Label_${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_Label_${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_Label_${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
+ ${${_Logic}EndSelect}: ; Place the EndSelect
+ !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/Include/Memento.nsh b/Include/Memento.nsh
index e0e60cc..b86de45 100755
--- a/Include/Memento.nsh
+++ b/Include/Memento.nsh
@@ -1,524 +1,524 @@
-!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. Add a call to ${MementoSectionRestore} to .onInit to restore the state
- of all sections from the registry.
-
- Function .onInit
-
- ${MementoSectionRestore}
-
- FunctionEnd
-
-5. Add a call to ${MementoSectionSave} to .onInstSuccess to save the state
- of all sections to the registry.
-
- Function .onInstSuccess
-
- ${MementoSectionSave}
-
- FunctionEnd
-
-6. 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
+!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. Add a call to ${MementoSectionRestore} to .onInit to restore the state
+ of all sections from the registry.
+
+ Function .onInit
+
+ ${MementoSectionRestore}
+
+ FunctionEnd
+
+5. Add a call to ${MementoSectionSave} to .onInstSuccess to save the state
+ of all sections to the registry.
+
+ Function .onInstSuccess
+
+ ${MementoSectionSave}
+
+ FunctionEnd
+
+6. 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/Include/SConscript b/Include/SConscript
index 0e35f89..f71ab9e 100755
--- a/Include/SConscript
+++ b/Include/SConscript
@@ -1,23 +1,23 @@
-includes = Split("""
- Colors.nsh
- FileFunc.nsh
- LangFile.nsh
- Library.nsh
- LogicLib.nsh
- Memento.nsh
- MUI.nsh
- MUI2.nsh
- Sections.nsh
- StrFunc.nsh
- TextFunc.nsh
- UpgradeDLL.nsh
- WinMessages.nsh
- WinVer.nsh
- WordFunc.nsh
- x64.nsh
-""")
-
-Import('env')
-
-env.DistributeInclude(includes)
-env.DistributeDocs('StrFunc.txt', path='StrFunc')
+includes = Split("""
+ Colors.nsh
+ FileFunc.nsh
+ LangFile.nsh
+ Library.nsh
+ LogicLib.nsh
+ Memento.nsh
+ MUI.nsh
+ MUI2.nsh
+ Sections.nsh
+ StrFunc.nsh
+ TextFunc.nsh
+ UpgradeDLL.nsh
+ WinMessages.nsh
+ WinVer.nsh
+ WordFunc.nsh
+ x64.nsh
+""")
+
+Import('env')
+
+env.DistributeInclude(includes)
+env.DistributeDocs('StrFunc.txt', path='StrFunc')
diff --git a/Include/Sections.nsh b/Include/Sections.nsh
index 1907a1f..07aa47f 100755
--- a/Include/Sections.nsh
+++ b/Include/Sections.nsh
@@ -1,273 +1,273 @@
-; 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 paramter.
-
-!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
-
-;--------------------------------
-
+; 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 paramter.
+
+!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
+
+;--------------------------------
+
!endif \ No newline at end of file
diff --git a/Include/StrFunc.nsh b/Include/StrFunc.nsh
index b369369..2dc46e7 100755
--- a/Include/StrFunc.nsh
+++ b/Include/StrFunc.nsh
@@ -1,1782 +1,1782 @@
-/*
-o-----------------------------------------------------------------------------o
-|String Functions Header File 1.09 |
-(-----------------------------------------------------------------------------)
-| By deguix / A Header file for NSIS 2.01 |
-| <cevo_deguix@yahoo.com.br> -------------------------------|
-| |
-| This header file contains NSIS functions for string manipulation. |
-o-----------------------------------------------------------------------------o
-*/
-
-!verbose push
-!verbose 3
-!ifndef STRFUNC_VERBOSITY
- !define STRFUNC_VERBOSITY 3
-!endif
-!define _STRFUNC_VERBOSITY ${STRFUNC_VERBOSITY}
-!undef STRFUNC_VERBOSITY
-!verbose ${_STRFUNC_VERBOSITY}
-
-!include LogicLib.nsh
-
-!define FALSE 0
-!define TRUE 1
-
-!ifndef STRFUNC
-
- ;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
- !verbose 4
- !echo `${STRFUNC_INITMSGPRE}NSIS ${STRFUNC} ${STRFUNC_VER} - © ${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
- !verbose 4
-
- !ifndef `Un${ShortName}`
- !echo `${STRFUNC_FUNCMSGPRE}$ {Un${ShortName}} - © ${Credits}${STRFUNC_FUNCMSGPOST}`
- !verbose pop
- !define `Un${ShortName}` `!insertmacro FUNCTION_STRING_Un${ShortName}_Call`
- Function `un.${ShortName}`
- !else
- !echo `${STRFUNC_FUNCMSGPRE}$ {${ShortName}} - © ${Credits}${STRFUNC_FUNCMSGPOST}`
- !verbose pop
- !undef `${ShortName}`
- !define `${ShortName}` `!insertmacro FUNCTION_STRING_${ShortName}_Call`
- 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) i .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) i .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(i $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
- System::Call 'kernel32::GlobalAlloc(i 2, i r2) i.r2'
-
- ;Step 3: Lock the handle
- System::Call 'kernel32::GlobalLock(i r2) i.r3'
-
- ;Step 4: Copy the text to locked clipboard buffer
- System::Call 'kernel32::lstrcpyA(i r3, t r0)'
-
- ;Step 5: Unlock the handle again
- System::Call 'kernel32::GlobalUnlock(i r2)'
-
- ;Step 6: Set the information to the clipboard
- System::Call 'user32::SetClipboardData(i 1, i r2)'
-
- StrCpy $0 ""
-
- ${ElseIf} $1 == "<" ;Get
-
- ;Step 1: Get clipboard data
- System::Call 'user32::GetClipboardData(i 1) i .r2'
-
- ;Step 2: Lock and copy data (kichik's fix)
- System::Call 'kernel32::GlobalLock(i r2) t .r0'
-
- ;Step 3: Unlock (kichik's fix)
- System::Call 'kernel32::GlobalUnlock(i r2)'
-
- ${ElseIf} $1 == "<>" ;Swap
-
- ;Step 1: Get clipboard data
- System::Call 'user32::GetClipboardData(i 1) i .r2'
-
- ;Step 2: Lock and copy data (kichik's fix)
- System::Call 'kernel32::GlobalLock(i r2) t .r4'
-
- ;Step 3: Unlock (kichik's fix)
- System::Call 'kernel32::GlobalUnlock(i r2)'
-
- ;Step 4: Clear the clipboard
- System::Call 'user32::EmptyClipboard()'
-
- ;Step 5: Allocate global heap
- StrLen $2 $0
- IntOp $2 $2 + 1
- System::Call 'kernel32::GlobalAlloc(i 2, i r2) i.r2'
-
- ;Step 6: Lock the handle
- System::Call 'kernel32::GlobalLock(i r2) i.r3'
-
- ;Step 7: Copy the text to locked clipboard buffer
- System::Call 'kernel32::lstrcpyA(i r3, t r0)'
-
- ;Step 8: Unlock the handle again
- System::Call 'kernel32::GlobalUnlock(i r2)'
-
- ;Step 9: Set the information to the clipboard
- System::Call 'user32::SetClipboardData(i 1, i 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::lstrcmpA(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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !echo `$ {StrIOToNSIS} "${ResultVar}" "${String}"`
- !verbose pop
-
- Push `${String}`
- Call StrIOToNSIS
- Pop `${ResultVar}`
- !macroend
- !macro FUNCTION_STRING_UnStrIOToNSIS_Call ResultVar String
- !verbose push
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !echo `$ {StrNSISToIO} "${ResultVar}" "${String}"`
- !verbose pop
-
- Push `${String}`
- Call StrNSISToIO
- Pop `${ResultVar}`
- !macroend
- !macro FUNCTION_STRING_UnStrNSISToIO_Call ResultVar String
- !verbose push
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !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
- !verbose 4
- !echo `$ {StrTrimNewLines} "${ResultVar}" "${String}"`
- !verbose pop
-
- Push `${String}`
- Call StrTrimNewLines
- Pop `${ResultVar}`
- !macroend
- !macro FUNCTION_STRING_UnStrTrimNewLines_Call ResultVar String
- !verbose push
- !verbose 4
- !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
+/*
+o-----------------------------------------------------------------------------o
+|String Functions Header File 1.09 |
+(-----------------------------------------------------------------------------)
+| By deguix / A Header file for NSIS 2.01 |
+| <cevo_deguix@yahoo.com.br> -------------------------------|
+| |
+| This header file contains NSIS functions for string manipulation. |
+o-----------------------------------------------------------------------------o
+*/
+
+!verbose push
+!verbose 3
+!ifndef STRFUNC_VERBOSITY
+ !define STRFUNC_VERBOSITY 3
+!endif
+!define _STRFUNC_VERBOSITY ${STRFUNC_VERBOSITY}
+!undef STRFUNC_VERBOSITY
+!verbose ${_STRFUNC_VERBOSITY}
+
+!include LogicLib.nsh
+
+!define FALSE 0
+!define TRUE 1
+
+!ifndef STRFUNC
+
+ ;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
+ !verbose 4
+ !echo `${STRFUNC_INITMSGPRE}NSIS ${STRFUNC} ${STRFUNC_VER} - © ${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
+ !verbose 4
+
+ !ifndef `Un${ShortName}`
+ !echo `${STRFUNC_FUNCMSGPRE}$ {Un${ShortName}} - © ${Credits}${STRFUNC_FUNCMSGPOST}`
+ !verbose pop
+ !define `Un${ShortName}` `!insertmacro FUNCTION_STRING_Un${ShortName}_Call`
+ Function `un.${ShortName}`
+ !else
+ !echo `${STRFUNC_FUNCMSGPRE}$ {${ShortName}} - © ${Credits}${STRFUNC_FUNCMSGPOST}`
+ !verbose pop
+ !undef `${ShortName}`
+ !define `${ShortName}` `!insertmacro FUNCTION_STRING_${ShortName}_Call`
+ 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) i .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) i .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(i $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
+ System::Call 'kernel32::GlobalAlloc(i 2, i r2) i.r2'
+
+ ;Step 3: Lock the handle
+ System::Call 'kernel32::GlobalLock(i r2) i.r3'
+
+ ;Step 4: Copy the text to locked clipboard buffer
+ System::Call 'kernel32::lstrcpyA(i r3, t r0)'
+
+ ;Step 5: Unlock the handle again
+ System::Call 'kernel32::GlobalUnlock(i r2)'
+
+ ;Step 6: Set the information to the clipboard
+ System::Call 'user32::SetClipboardData(i 1, i r2)'
+
+ StrCpy $0 ""
+
+ ${ElseIf} $1 == "<" ;Get
+
+ ;Step 1: Get clipboard data
+ System::Call 'user32::GetClipboardData(i 1) i .r2'
+
+ ;Step 2: Lock and copy data (kichik's fix)
+ System::Call 'kernel32::GlobalLock(i r2) t .r0'
+
+ ;Step 3: Unlock (kichik's fix)
+ System::Call 'kernel32::GlobalUnlock(i r2)'
+
+ ${ElseIf} $1 == "<>" ;Swap
+
+ ;Step 1: Get clipboard data
+ System::Call 'user32::GetClipboardData(i 1) i .r2'
+
+ ;Step 2: Lock and copy data (kichik's fix)
+ System::Call 'kernel32::GlobalLock(i r2) t .r4'
+
+ ;Step 3: Unlock (kichik's fix)
+ System::Call 'kernel32::GlobalUnlock(i r2)'
+
+ ;Step 4: Clear the clipboard
+ System::Call 'user32::EmptyClipboard()'
+
+ ;Step 5: Allocate global heap
+ StrLen $2 $0
+ IntOp $2 $2 + 1
+ System::Call 'kernel32::GlobalAlloc(i 2, i r2) i.r2'
+
+ ;Step 6: Lock the handle
+ System::Call 'kernel32::GlobalLock(i r2) i.r3'
+
+ ;Step 7: Copy the text to locked clipboard buffer
+ System::Call 'kernel32::lstrcpyA(i r3, t r0)'
+
+ ;Step 8: Unlock the handle again
+ System::Call 'kernel32::GlobalUnlock(i r2)'
+
+ ;Step 9: Set the information to the clipboard
+ System::Call 'user32::SetClipboardData(i 1, i 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::lstrcmpA(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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !echo `$ {StrIOToNSIS} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call StrIOToNSIS
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrIOToNSIS_Call ResultVar String
+ !verbose push
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !echo `$ {StrNSISToIO} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call StrNSISToIO
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrNSISToIO_Call ResultVar String
+ !verbose push
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !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
+ !verbose 4
+ !echo `$ {StrTrimNewLines} "${ResultVar}" "${String}"`
+ !verbose pop
+
+ Push `${String}`
+ Call StrTrimNewLines
+ Pop `${ResultVar}`
+ !macroend
+ !macro FUNCTION_STRING_UnStrTrimNewLines_Call ResultVar String
+ !verbose push
+ !verbose 4
+ !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/Include/StrFunc.txt b/Include/StrFunc.txt
index e8da9df..400f383 100755
--- a/Include/StrFunc.txt
+++ b/Include/StrFunc.txt
@@ -1,707 +1,707 @@
-String Functions Header File Readme
------------------------------------
-
-String Functions Header File contains a set of good string manipulation
-functions in a much simpler way to include and call in NSIS scripts.
-
-How to use
-----------
-
- Basic Syntax
- ------------
-
- Parameters are specified in this format:
- required (required) (option1 | option2) [optional or add. options]
- [option1 | option2]
-
- The stars in command titles (*****) are the function usefulness in my
- opinion. The more starts, the more useful it is. 5 stars (*****) is the
- most useful.
-
- Any time when is mentioned "Default is" means that you can use the value
- mentioned or keep it blank, the result is the same.
-
- If you want a certain value (e.g. a text) to be language-specific, set a
- language string (using LangString) and define $(STRINGNAME) as value.
-
- If you want to add ` to a string, you should always escape it using $\`
- because the header file macro functions use ` to separate parameters.
-
- 1. Include Header file
- ----------------------
-
- !include "StrFunc.nsh"
-
- StrFunc.nsh has to be inside Include directory, so you don't have to
- specify a path.
-
- You have to put this command before any command used in this header file.
-
- 2. Defines
- ----------
-
- This header file contains defines that automate the life of some who
- fear a lot of changes sometimes imposed in this header file, or who have
- applications that put it to work at maximum capacity. Before you try
- these, take a look at the information below:
-
- - Every item on a define value is separated by a "|", and every subitem
- (items in an item) is separated by " ".
-
- - Use ${StrTok} $var "${DefineName}" "|" "$counter" "0" to get every
- item inside the define. For subitems, use ${StrTok} $var2 "$var" " "
- "$counter2" "0" after getting the value for a desired item.
-
- - ${StrFunc_List} is automatically made by the header file. The rest
- is manually added to the header.
-
- 2.1 Defines List:
- -----------------
-
- StrFunc_List - Lists all function names currently available on StrFunc
- header file.
-
- *_List - Lists all parameter names currently available for "*"
- function. (* = function name - i.e. StrTok_List).
-
- *_TypeList - Lists the types of all parameters on "*" function.
- (* = function name - i.e. StrTok_List). Possible types
- for each parameter:
-
- - Output - Needs a variable to output a function result.
-
- - Text - Needs text or number to be input.
-
- - Mixed - Needs text, number or option to be inputed.
- Each subitem following the "Mixed" word is an
- option. The first option is ever the default
- one. Two following spaces " " means that
- that subitem is empty.
-
- - Option - Needs an option to be inputed. Each subitem
- following the "Option" word is an option.
- The first option is ever the default one. Two
- following spaces " " means that that subitem
- is empty.
-
- 3. Commands
- -----------
-
- Some commands have special specifications to work. Consult command's
- documentation on "3.3 Commands" section.
-
- 3.1 How To Use Commands In Install Sections and Functions
- ---------------------------------------------------------
-
- Every command used in install sections and functions have to be called
- first before and out of any sections and functions, and without
- parameters.
-
- Example:
- --------
-
- ${StrStr}
-
- 3.2 How To Use Commands In Uninstall Sections and Functions
- -----------------------------------------------------------
-
- Commands with Uninstall Sections and Functions support have "Un" before
- the words inside curly brackets "{}".
-
- Example:
- --------
-
- ${UnStrStr}
-
- A complete example with both Install and Uninstall Commands:
- ------------------------------------------------------------
-
-
- !include "StrFunc.nsh"
-
- ${StrStr} # Supportable for Install Sections and Functions
-
- ${UnStrStr} # Supportable for Uninstall Sections and Functions
-
- Section
-
- ${StrStr} $0 "OK! Now what?" "wh"
-
- SectionEnd
-
- Section Uninstall
-
- ${UnStrStr} $0 "OK! Now what?" "wh"
-
- SectionEnd
-
- 3.3 Commands
- ------------
-
- =========================================================================
- ** ${StrCase}
- -------------------------------------------------------------------------
- ResultVar String Type(|L|U|T|S|<>)
- =========================================================================
- Converts "String" to "Type" Case. Uses LogicLib.
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String to convert to "Type" case.
-
- Type
- Type of string case to convert to:
-
- - "" = Original Case (same as "String")
- - L = Lower Case (this is just an example. a very simple one.)
- - U = Upper Case (THIS IS JUST AN EXAMPLE. A VERY SIMPLE ONE.)
- - T = Title Case (This Is Just An Example. A Very Simple One.)
- - S = Sentence Case (This is just an example. A very simple one.)
- - <> = Switch Case (This is just an example. A very simple one.)
-
- Default value is "" (Original Case).
-
- Result Value -> ResultVar:
-
- "String" in "Type" case.
-
- Example:
-
- ${StrCase} $0 '"Você" is "You" in English.' "U"
- [__(_)__()___()__()__(____)_]
-
- $0 = '"VOCÊ" IS "YOU" IN ENGLISH.'
-
- =========================================================================
- * ${StrClb}
- -------------------------------------------------------------------------
- ResultVar String Action(|>|<|<>)
- =========================================================================
- Makes an action with the clipboard depending on value of parameter
- "Action". Uses LogicLib.
-
- Parameters:
-
- String
- If "Action" = ">" or "<>" - String to put on the clipboard.
-
- Action
- Can be one of the following values:
-
- - "" = Cleans the clipboard.
- - ">" = Set string to clipboard.
- - "<" = Get string from clipboard.
- - "<>" = Swap string with clipboard's.
-
- Result Value -> ResultVar:
-
- If "Action" = "<" or "<>" - String found on the clipboard.
-
- =========================================================================
- *** ${StrIOToNSIS}
- -------------------------------------------------------------------------
- ResultVar String
- =========================================================================
- Convert "String" from Install Options plugin to be supported by NSIS.
- Escape, back-slash, carriage return, line feed and tab characters are
- converted.
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String to convert to be supportable for NSIS.
-
- Result Value -> ResultVar:
-
- "String" supportable for NSIS.
-
- Example:
-
- ${StrIOToNSIS} $0 "\r\n\t\\This is just an example\\"
- [()()()()_______________________()]
-
- $0 = "$\r$\n$\t\This is just an example\"
-
- =========================================================================
- * ${StrLoc}
- -------------------------------------------------------------------------
- ResultVar String StrToSearchFor CounterDirection(>|<)
- =========================================================================
- Searches for "StrToSearchFor" in "String" and returns its location,
- according to "CounterDirection".
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search "StrToSearchFor".
-
- StrToSearchFor
- String to search in "String".
-
- CounterDirection(>|<)
- Direction where the counter increases to. Default is ">".
- (> = increases from left to right, < = increases from right to left)
-
- Result Value -> ResultVar:
-
- Where "StrToSearchFor" is, according to "OffsetDirection".
-
- Example:
-
- ${StrLoc} $0 "This is just an example" "just" "<"
- (__)<<<<<<<<<<<
-
- $0 = "11"
-
- =========================================================================
- *** ${StrNSISToIO}
- -------------------------------------------------------------------------
- ResultVar String
- =========================================================================
- Converts "String" from NSIS to be supported by Install Options plugin.
- Escape, back-slash, carriage return, line feed and tab characters are
- converted.
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String to convert to be supportable for Install Options plugin.
-
- Result Value -> ResultVar:
-
- "String" supportable for Install Options plugin.
-
- Example:
-
- ${StrNSISToIO} $0 "$\r$\n$\t\This is just an example\"
- [(_)(_)(_)^_______________________^]
-
- $0 = "\r\n\t\\This is just an example\\"
-
- =========================================================================
- ***** ${StrRep}
- -------------------------------------------------------------------------
- ResultVar String StrToReplace ReplacementString
- =========================================================================
- Searches for all "StrToReplace" in "String" replacing those with
- "ReplacementString".
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search "StrToReplace".
-
- StrToReplaceFor
- String to search in "String".
-
- StringToBeReplacedWith
- String to replace "StringToReplace" when it is found in "String".
-
- Result Value -> ResultVar:
-
- "String" with all occurrences of "StringToReplace" replaced with
- "ReplacementString".
-
- Example:
-
- ${StrRep} $0 "This is just an example" "an" "one"
- [____________()_______]
-
- $0 = "This is just one example"
-
- =========================================================================
- *** ${StrSort}
- -------------------------------------------------------------------------
- ResultVar String LeftStr CenterStr RightStr IncludeLeftStr(1|0)
- IncludeCenterStr(1|0) IncludeRightStr(1|0)
- =========================================================================
- Searches for "CenterStr" in "String", and returns only the value
- between "LeftStr" and "RightStr", including or not the "CenterStr" using
- "IncludeCenterStr" and/or the "LeftStr" using "IncludeLeftStr" and
- "RightStr" using "IncludeRightStr".
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search "CenterStr".
-
- LeftStr
- The first occurrence of "LeftStr" on the left of "CenterStr".
- If it is an empty value, or was not found, will return
- everything on the left of "CenterStr".
-
- CenterStr
- String to search in "String".
-
- RightStr
- The first occurrence of "RightStr" on the right of "CenterStr".
- If it is an empty value, or was not found, will return
- everything on the right of "CenterStr".
-
- IncludeLeftStr(1|0)
- Include or not the "LeftStr" in the result value. Default is 1
- (True). (1 = True, 0 = False)
-
- IncludeCenterStr(1|0)
- Include or not the "CenterStr" in the result value. Default is 1
- (True). (1 = True, 0 = False)
-
- IncludeRightStr(1|0)
- Include or not the "RightStr" in the result value. Default is 1
- (True). (1 = True, 0 = False)
-
- Result Value -> ResultVar:
-
- String between "LeftStr" and "RightStr" of a found "CenterStr"
- including or not the "LeftStr" and "RightStr" if
- "IncludeLeftRightStr" is 1 and/or the "CenterStr" if
- "IncludeCenterStr" is 1.
-
- Example:
-
- ${StrSort} $0 "This is just an example" " just" "" "ple" "0" "0" "0"
- [_______(___)_______]( )
- C R
-
- $0 = "This is an exam"
-
- =========================================================================
- ***** ${StrStr}
- -------------------------------------------------------------------------
- ResultVar String StrToSearchFor
- =========================================================================
- Searches for "StrToSearchFor" in "String".
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search "StrToSearchFor".
-
- StrToSearchFor
- String to search in "String".
-
- Result Value -> ResultVar:
-
- "StrToSearchFor" + the string after where "StrToSearchFor" was found in
- "String".
-
- Example:
-
- ${StrStr} $0 "This is just an example" "just"
- >>>>>>>>>{_)____________]
-
- $0 = "just an example"
-
- =========================================================================
- ***** ${StrStrAdv}
- -------------------------------------------------------------------------
- ResultVar String StrToSearchFor SearchDirection(>|<)
- ResultStrDirection(>|<) DisplayStrToSearch(1|0) Loops CaseSensitive(0|1)
- =========================================================================
- Searches for "StrToSearchFor" in "String" in the direction specified by
- "SearchDirection" and looping "Loops" times.
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search "StrToSearchFor".
-
- StrToSearchFor
- String to search in "String".
-
- SearchDirection (>|<)
- Where do you want to direct the search. Default is ">" (to right).
- (< = To left, > = To right)
-
- ResultStrDirection (>|<)
- Where the result string will be based on in relation of
- "StrToSearchFor"
- position. Default is ">" (to right). (< = To left, > = To right)
-
- DisplayStrToSearch (1|0)
- Display "StrToSearchFor" in the result. Default is "1" (True).
- (1 = True, 0 = False)
-
- Loops
- Number of times the code will search "StrToSearchFor" in "String" not
- including the original execution. Default is "0" (1 code execution).
-
- CaseSensitive(0|1)
- If "1" the search will be case-sensitive (differentiates between cases).
- If "0" it is case-insensitive (does not differentiate between cases).
- Default is "0" (Case-Insensitive).
-
-
- Result Value -> ResultVar:
-
- "StrToSearchFor" if "DisplayStrToSearch" is 1 + the result string after
- or before "StrToSearchFor", depending on "ResultStrDirection".
-
- Result with Errors:
-
- When "StrToSearchFor" was not found, will return an empty string.
-
- When you put nothing in "StrToSearchFor", will return "String" and set
- error flag.
-
- When you put nothing in "String", will return an empty string and set
- error flag.
-
- Example:
-
- ${StrStrAdv} $0 "This IS really just an example" "IS " ">" ">" "0" "0" "1"
- >>>>>( )[____________________]
-
-
- $0 = "really just an example"
-
- =========================================================================
- **** ${StrTok}
- -------------------------------------------------------------------------
- ResultVar String Separators ResultPart[L] SkipEmptyParts(1|0)
- =========================================================================
- Returns the part "ResultPart" between two "Separators" inside
- "String".
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search for "Separators".
-
- Separators
- Characters to find on "String".
-
- ResultPart[L]
- The part want to be found on "StrToTokenize" between two "Separators".
- Can be any number, starting at 0, and "L" that is the last part.
- Default is L (Last part).
-
- SkipEmptyParts(1|0)
- Skips empty string parts between two "Separators". Default is 1 (True).
- (1 = True, 0 = False)
-
- Result Value -> ResultVar:
-
- "String" part number "Part" between two "Separators".
-
- Examples:
-
- 1) ${StrTok} $0 "This is, or is not, just an example" " ," "4" "1"
- ( ) () () () [_] ( ) () ( )
- 0 1 2 3 4 5 6 7
- $0 = "not"
-
- 2) ${StrTok} $0 "This is, or is not, just an example" " ," "4" "0"
- ( ) () ^() [] ( ) ^( ) () ( )
- 0 1 23 4 5 67 8 9
- $0 = "is"
-
- =========================================================================
- * ${StrTrimNewLines}
- -------------------------------------------------------------------------
- ResultVar String
- =========================================================================
- Deletes unnecessary new lines at end of "String".
-
- Parameters:
-
- ResultVar
- Destination where result is returned.
-
- String
- String where to search unnecessary new lines at end of "String".
-
- Result Value -> ResultVar:
-
- "String" with unnecessary end new lines removed.
-
- Example:
-
- ${StrTrimNewLines} $0 "$\r$\nThis is just an example$\r$\n$\r$\n"
- [_____________________________(_)(_)(_)(_)]
-
- $0 = "$\r$\nThis is just an example"
-
-Functions included and not included
---------------------------------------------------
-
-11 functions have been included
- They are not available on Archive
- They are on LogicLib format
-
-15 functions have not been included
- 12 were not included because of better functions
- 6 were not included because of AdvStrTok (called here as StrTok)
- First String Part Function
- Save on Variables Function
- Sort Strings (1, 2 and 3) Functions
- StrTok Function
- 2 were not included because of StrCase
- StrLower Function
- StrUpper Function
- 2 were not included because of StrClb
- StrClbSet Function
- StrClbGet Function
- 1 was not included because of NSISToIO and IOToNSIS
- Convert / to // in Paths Function
- 1 was not included because of original String Replace Function (called
- here as StrRep)
- Another String Replace Function
- 2 were not included because they aren't useful anymore
- Slash <-> Backslash Converter Function
- Trim Function
- 1 was not included because of bugs
- Number to String Converter Function
-
-Version History
----------------
-
-1.09 - 10/22/2004
-
-- Fixed stack problems involving: StrCase, StrRep, StrSort, StrTok.
-- Fixed StrClb: When "Action" = "<>", handle was wrongly outputed as
- text.
-- Fixed StrSort, StrStrAdv documentation examples.
-- Fixed StrIOToNSIS, StrLoc, StrNSISToIO, StrRep, StrStr: sometimes
- didn't find "StrToSearch" at all.
-
-1.08 - 10/12/2004
-
-- Converted all the functions to LogicLib.
-- StrSort: Totally remade and it can break old scripts. See
- documentation for details.
-- StrTok: "ResultPart" has to start from 0 and it can break old scripts.
- See documentation for details.
-- Added defines: StrFunc_List, *_List and *_TypeList.
-- Fixed StrStrAdv: Variables $R0-$R3 couldn't be used on scripts before
- calling.
-- StrRep: Cut down some variables.
-- Arranged correctly the order of StrSort on the documentation.
-
-1.07 - 09/21/2004
-
-- Removed ${UnStrFunc} command. Now you can just include uninstall
- functions commands like ${UnStrStr} to be supported by uninstall functions
- and sections.
-- Added case-sensitive comparation option for StrStrAdv.
-- StrCase now uses System.dll which makes case conversions effective with
-all latin letters (i.e. ê).
-- Added switch case and original case for StrCase.
-- StrClbSet and StrClbGet removed, added StrClb.
-- Made compact the most usual operations inside the header file. File size
-reduced.
-
-1.06 - 03/26/2004
-
-- StrNumToStr removed due to complex number handling on some languages.
-- Fixed the bug where the old string was attached to string returned by
- StrCase when $R5 variable was used.
-
-1.05 - 03/17/2004
-
-- Fixed a bug with StrCase, Title Case wasn't working as should be.
-- Fixed a bug with StrStrAdv, previous fix created another bug, string not
- returned correctly when using backwards search with "DisplayStrToSearch" as
- "0".
-
-1.04 - 03/07/2004
-
-- Added new StrCase, removed StrLower and StrUpper.
-- Organized by name commands inside header and readme files.
-
-1.03 - 02/12/2004
-
-- Added commands support for uninstall sections and functions.
-- Fixed variables switch in "StrLoc" and "StrTok" after using these.
-
-1.02 - 02/07/2004
-
-- Fixed StrLoc.
-- Fixed Documentation about StrLoc. "Direction" is really "OffsetDirection".
-- Added my new AdvStrSort, and removed the old one.
-
-1.01 - 02/05/2004
-
-- Fixed Documentation about StrSort and StrTok.
-- Fixed StrTok default value for the string part. Now it's "L".
-- Fixed StrStrAdv fixed wrong search when had a combination of same
- substrings one after another in a string.
-- Fixed StrLoc: when a string isn't found, don't return any value at all.
-
-1.00 - 02/01/2004
-
-- Added documentation.
-- Renamed header file to "StrFunc.nsh".
-- Added 1 function, StrLoc.
-- Modified StrStrAdv, removed some lines.
-- Fixed StrTok, 2 simple numbers made it loop everytime.
-- Fixed some small issues on the header file.
-
-0.02 - 01/24/2004
-
-- Completed StrFunc.nsh file. Need some tests and the readme.
-
-0.01 - 01/22/2004
-
-- First version to test ideas...
-
-Credits
--------
-
- Made by Diego Pedroso (aka deguix).
-
-Functions Credits
------------------
-
-- All functions are made by Diego Pedroso on LogicLib format. They
- are based on functions by Amir Szekely, Dave Laundon, Hendri
- Adriaens, Nik Medved, Joost Verburg, Stuart Welch, Ximon Eighteen,
- "bigmac666" and "bluenet". "bluenet"'s version of StrIOToNSIS and
- StrNSISToIO on LogicLib format were included.
-
-License
--------
-
-This header file is provided 'as-is', without any express or implied
-warranty. In no event will the author be held liable for any damages
-arising from the use of this header file.
-
-Permission is granted to anyone to use this header file for any purpose,
-including commercial applications, and to alter it and redistribute
-it freely, subject to the following restrictions:
-
-1. The origin of this header file must not be misrepresented;
- you must not claim that you wrote the original header file.
- If you use this header file in a product, an acknowledgment in the
- product documentation would be appreciated but is not required.
-2. Altered versions must be plainly marked as such,
- and must not be misrepresented as being the original header file.
+String Functions Header File Readme
+-----------------------------------
+
+String Functions Header File contains a set of good string manipulation
+functions in a much simpler way to include and call in NSIS scripts.
+
+How to use
+----------
+
+ Basic Syntax
+ ------------
+
+ Parameters are specified in this format:
+ required (required) (option1 | option2) [optional or add. options]
+ [option1 | option2]
+
+ The stars in command titles (*****) are the function usefulness in my
+ opinion. The more starts, the more useful it is. 5 stars (*****) is the
+ most useful.
+
+ Any time when is mentioned "Default is" means that you can use the value
+ mentioned or keep it blank, the result is the same.
+
+ If you want a certain value (e.g. a text) to be language-specific, set a
+ language string (using LangString) and define $(STRINGNAME) as value.
+
+ If you want to add ` to a string, you should always escape it using $\`
+ because the header file macro functions use ` to separate parameters.
+
+ 1. Include Header file
+ ----------------------
+
+ !include "StrFunc.nsh"
+
+ StrFunc.nsh has to be inside Include directory, so you don't have to
+ specify a path.
+
+ You have to put this command before any command used in this header file.
+
+ 2. Defines
+ ----------
+
+ This header file contains defines that automate the life of some who
+ fear a lot of changes sometimes imposed in this header file, or who have
+ applications that put it to work at maximum capacity. Before you try
+ these, take a look at the information below:
+
+ - Every item on a define value is separated by a "|", and every subitem
+ (items in an item) is separated by " ".
+
+ - Use ${StrTok} $var "${DefineName}" "|" "$counter" "0" to get every
+ item inside the define. For subitems, use ${StrTok} $var2 "$var" " "
+ "$counter2" "0" after getting the value for a desired item.
+
+ - ${StrFunc_List} is automatically made by the header file. The rest
+ is manually added to the header.
+
+ 2.1 Defines List:
+ -----------------
+
+ StrFunc_List - Lists all function names currently available on StrFunc
+ header file.
+
+ *_List - Lists all parameter names currently available for "*"
+ function. (* = function name - i.e. StrTok_List).
+
+ *_TypeList - Lists the types of all parameters on "*" function.
+ (* = function name - i.e. StrTok_List). Possible types
+ for each parameter:
+
+ - Output - Needs a variable to output a function result.
+
+ - Text - Needs text or number to be input.
+
+ - Mixed - Needs text, number or option to be inputed.
+ Each subitem following the "Mixed" word is an
+ option. The first option is ever the default
+ one. Two following spaces " " means that
+ that subitem is empty.
+
+ - Option - Needs an option to be inputed. Each subitem
+ following the "Option" word is an option.
+ The first option is ever the default one. Two
+ following spaces " " means that that subitem
+ is empty.
+
+ 3. Commands
+ -----------
+
+ Some commands have special specifications to work. Consult command's
+ documentation on "3.3 Commands" section.
+
+ 3.1 How To Use Commands In Install Sections and Functions
+ ---------------------------------------------------------
+
+ Every command used in install sections and functions have to be called
+ first before and out of any sections and functions, and without
+ parameters.
+
+ Example:
+ --------
+
+ ${StrStr}
+
+ 3.2 How To Use Commands In Uninstall Sections and Functions
+ -----------------------------------------------------------
+
+ Commands with Uninstall Sections and Functions support have "Un" before
+ the words inside curly brackets "{}".
+
+ Example:
+ --------
+
+ ${UnStrStr}
+
+ A complete example with both Install and Uninstall Commands:
+ ------------------------------------------------------------
+
+
+ !include "StrFunc.nsh"
+
+ ${StrStr} # Supportable for Install Sections and Functions
+
+ ${UnStrStr} # Supportable for Uninstall Sections and Functions
+
+ Section
+
+ ${StrStr} $0 "OK! Now what?" "wh"
+
+ SectionEnd
+
+ Section Uninstall
+
+ ${UnStrStr} $0 "OK! Now what?" "wh"
+
+ SectionEnd
+
+ 3.3 Commands
+ ------------
+
+ =========================================================================
+ ** ${StrCase}
+ -------------------------------------------------------------------------
+ ResultVar String Type(|L|U|T|S|<>)
+ =========================================================================
+ Converts "String" to "Type" Case. Uses LogicLib.
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String to convert to "Type" case.
+
+ Type
+ Type of string case to convert to:
+
+ - "" = Original Case (same as "String")
+ - L = Lower Case (this is just an example. a very simple one.)
+ - U = Upper Case (THIS IS JUST AN EXAMPLE. A VERY SIMPLE ONE.)
+ - T = Title Case (This Is Just An Example. A Very Simple One.)
+ - S = Sentence Case (This is just an example. A very simple one.)
+ - <> = Switch Case (This is just an example. A very simple one.)
+
+ Default value is "" (Original Case).
+
+ Result Value -> ResultVar:
+
+ "String" in "Type" case.
+
+ Example:
+
+ ${StrCase} $0 '"Você" is "You" in English.' "U"
+ [__(_)__()___()__()__(____)_]
+
+ $0 = '"VOCÊ" IS "YOU" IN ENGLISH.'
+
+ =========================================================================
+ * ${StrClb}
+ -------------------------------------------------------------------------
+ ResultVar String Action(|>|<|<>)
+ =========================================================================
+ Makes an action with the clipboard depending on value of parameter
+ "Action". Uses LogicLib.
+
+ Parameters:
+
+ String
+ If "Action" = ">" or "<>" - String to put on the clipboard.
+
+ Action
+ Can be one of the following values:
+
+ - "" = Cleans the clipboard.
+ - ">" = Set string to clipboard.
+ - "<" = Get string from clipboard.
+ - "<>" = Swap string with clipboard's.
+
+ Result Value -> ResultVar:
+
+ If "Action" = "<" or "<>" - String found on the clipboard.
+
+ =========================================================================
+ *** ${StrIOToNSIS}
+ -------------------------------------------------------------------------
+ ResultVar String
+ =========================================================================
+ Convert "String" from Install Options plugin to be supported by NSIS.
+ Escape, back-slash, carriage return, line feed and tab characters are
+ converted.
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String to convert to be supportable for NSIS.
+
+ Result Value -> ResultVar:
+
+ "String" supportable for NSIS.
+
+ Example:
+
+ ${StrIOToNSIS} $0 "\r\n\t\\This is just an example\\"
+ [()()()()_______________________()]
+
+ $0 = "$\r$\n$\t\This is just an example\"
+
+ =========================================================================
+ * ${StrLoc}
+ -------------------------------------------------------------------------
+ ResultVar String StrToSearchFor CounterDirection(>|<)
+ =========================================================================
+ Searches for "StrToSearchFor" in "String" and returns its location,
+ according to "CounterDirection".
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search "StrToSearchFor".
+
+ StrToSearchFor
+ String to search in "String".
+
+ CounterDirection(>|<)
+ Direction where the counter increases to. Default is ">".
+ (> = increases from left to right, < = increases from right to left)
+
+ Result Value -> ResultVar:
+
+ Where "StrToSearchFor" is, according to "OffsetDirection".
+
+ Example:
+
+ ${StrLoc} $0 "This is just an example" "just" "<"
+ (__)<<<<<<<<<<<
+
+ $0 = "11"
+
+ =========================================================================
+ *** ${StrNSISToIO}
+ -------------------------------------------------------------------------
+ ResultVar String
+ =========================================================================
+ Converts "String" from NSIS to be supported by Install Options plugin.
+ Escape, back-slash, carriage return, line feed and tab characters are
+ converted.
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String to convert to be supportable for Install Options plugin.
+
+ Result Value -> ResultVar:
+
+ "String" supportable for Install Options plugin.
+
+ Example:
+
+ ${StrNSISToIO} $0 "$\r$\n$\t\This is just an example\"
+ [(_)(_)(_)^_______________________^]
+
+ $0 = "\r\n\t\\This is just an example\\"
+
+ =========================================================================
+ ***** ${StrRep}
+ -------------------------------------------------------------------------
+ ResultVar String StrToReplace ReplacementString
+ =========================================================================
+ Searches for all "StrToReplace" in "String" replacing those with
+ "ReplacementString".
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search "StrToReplace".
+
+ StrToReplaceFor
+ String to search in "String".
+
+ StringToBeReplacedWith
+ String to replace "StringToReplace" when it is found in "String".
+
+ Result Value -> ResultVar:
+
+ "String" with all occurrences of "StringToReplace" replaced with
+ "ReplacementString".
+
+ Example:
+
+ ${StrRep} $0 "This is just an example" "an" "one"
+ [____________()_______]
+
+ $0 = "This is just one example"
+
+ =========================================================================
+ *** ${StrSort}
+ -------------------------------------------------------------------------
+ ResultVar String LeftStr CenterStr RightStr IncludeLeftStr(1|0)
+ IncludeCenterStr(1|0) IncludeRightStr(1|0)
+ =========================================================================
+ Searches for "CenterStr" in "String", and returns only the value
+ between "LeftStr" and "RightStr", including or not the "CenterStr" using
+ "IncludeCenterStr" and/or the "LeftStr" using "IncludeLeftStr" and
+ "RightStr" using "IncludeRightStr".
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search "CenterStr".
+
+ LeftStr
+ The first occurrence of "LeftStr" on the left of "CenterStr".
+ If it is an empty value, or was not found, will return
+ everything on the left of "CenterStr".
+
+ CenterStr
+ String to search in "String".
+
+ RightStr
+ The first occurrence of "RightStr" on the right of "CenterStr".
+ If it is an empty value, or was not found, will return
+ everything on the right of "CenterStr".
+
+ IncludeLeftStr(1|0)
+ Include or not the "LeftStr" in the result value. Default is 1
+ (True). (1 = True, 0 = False)
+
+ IncludeCenterStr(1|0)
+ Include or not the "CenterStr" in the result value. Default is 1
+ (True). (1 = True, 0 = False)
+
+ IncludeRightStr(1|0)
+ Include or not the "RightStr" in the result value. Default is 1
+ (True). (1 = True, 0 = False)
+
+ Result Value -> ResultVar:
+
+ String between "LeftStr" and "RightStr" of a found "CenterStr"
+ including or not the "LeftStr" and "RightStr" if
+ "IncludeLeftRightStr" is 1 and/or the "CenterStr" if
+ "IncludeCenterStr" is 1.
+
+ Example:
+
+ ${StrSort} $0 "This is just an example" " just" "" "ple" "0" "0" "0"
+ [_______(___)_______]( )
+ C R
+
+ $0 = "This is an exam"
+
+ =========================================================================
+ ***** ${StrStr}
+ -------------------------------------------------------------------------
+ ResultVar String StrToSearchFor
+ =========================================================================
+ Searches for "StrToSearchFor" in "String".
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search "StrToSearchFor".
+
+ StrToSearchFor
+ String to search in "String".
+
+ Result Value -> ResultVar:
+
+ "StrToSearchFor" + the string after where "StrToSearchFor" was found in
+ "String".
+
+ Example:
+
+ ${StrStr} $0 "This is just an example" "just"
+ >>>>>>>>>{_)____________]
+
+ $0 = "just an example"
+
+ =========================================================================
+ ***** ${StrStrAdv}
+ -------------------------------------------------------------------------
+ ResultVar String StrToSearchFor SearchDirection(>|<)
+ ResultStrDirection(>|<) DisplayStrToSearch(1|0) Loops CaseSensitive(0|1)
+ =========================================================================
+ Searches for "StrToSearchFor" in "String" in the direction specified by
+ "SearchDirection" and looping "Loops" times.
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search "StrToSearchFor".
+
+ StrToSearchFor
+ String to search in "String".
+
+ SearchDirection (>|<)
+ Where do you want to direct the search. Default is ">" (to right).
+ (< = To left, > = To right)
+
+ ResultStrDirection (>|<)
+ Where the result string will be based on in relation of
+ "StrToSearchFor"
+ position. Default is ">" (to right). (< = To left, > = To right)
+
+ DisplayStrToSearch (1|0)
+ Display "StrToSearchFor" in the result. Default is "1" (True).
+ (1 = True, 0 = False)
+
+ Loops
+ Number of times the code will search "StrToSearchFor" in "String" not
+ including the original execution. Default is "0" (1 code execution).
+
+ CaseSensitive(0|1)
+ If "1" the search will be case-sensitive (differentiates between cases).
+ If "0" it is case-insensitive (does not differentiate between cases).
+ Default is "0" (Case-Insensitive).
+
+
+ Result Value -> ResultVar:
+
+ "StrToSearchFor" if "DisplayStrToSearch" is 1 + the result string after
+ or before "StrToSearchFor", depending on "ResultStrDirection".
+
+ Result with Errors:
+
+ When "StrToSearchFor" was not found, will return an empty string.
+
+ When you put nothing in "StrToSearchFor", will return "String" and set
+ error flag.
+
+ When you put nothing in "String", will return an empty string and set
+ error flag.
+
+ Example:
+
+ ${StrStrAdv} $0 "This IS really just an example" "IS " ">" ">" "0" "0" "1"
+ >>>>>( )[____________________]
+
+
+ $0 = "really just an example"
+
+ =========================================================================
+ **** ${StrTok}
+ -------------------------------------------------------------------------
+ ResultVar String Separators ResultPart[L] SkipEmptyParts(1|0)
+ =========================================================================
+ Returns the part "ResultPart" between two "Separators" inside
+ "String".
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search for "Separators".
+
+ Separators
+ Characters to find on "String".
+
+ ResultPart[L]
+ The part want to be found on "StrToTokenize" between two "Separators".
+ Can be any number, starting at 0, and "L" that is the last part.
+ Default is L (Last part).
+
+ SkipEmptyParts(1|0)
+ Skips empty string parts between two "Separators". Default is 1 (True).
+ (1 = True, 0 = False)
+
+ Result Value -> ResultVar:
+
+ "String" part number "Part" between two "Separators".
+
+ Examples:
+
+ 1) ${StrTok} $0 "This is, or is not, just an example" " ," "4" "1"
+ ( ) () () () [_] ( ) () ( )
+ 0 1 2 3 4 5 6 7
+ $0 = "not"
+
+ 2) ${StrTok} $0 "This is, or is not, just an example" " ," "4" "0"
+ ( ) () ^() [] ( ) ^( ) () ( )
+ 0 1 23 4 5 67 8 9
+ $0 = "is"
+
+ =========================================================================
+ * ${StrTrimNewLines}
+ -------------------------------------------------------------------------
+ ResultVar String
+ =========================================================================
+ Deletes unnecessary new lines at end of "String".
+
+ Parameters:
+
+ ResultVar
+ Destination where result is returned.
+
+ String
+ String where to search unnecessary new lines at end of "String".
+
+ Result Value -> ResultVar:
+
+ "String" with unnecessary end new lines removed.
+
+ Example:
+
+ ${StrTrimNewLines} $0 "$\r$\nThis is just an example$\r$\n$\r$\n"
+ [_____________________________(_)(_)(_)(_)]
+
+ $0 = "$\r$\nThis is just an example"
+
+Functions included and not included
+--------------------------------------------------
+
+11 functions have been included
+ They are not available on Archive
+ They are on LogicLib format
+
+15 functions have not been included
+ 12 were not included because of better functions
+ 6 were not included because of AdvStrTok (called here as StrTok)
+ First String Part Function
+ Save on Variables Function
+ Sort Strings (1, 2 and 3) Functions
+ StrTok Function
+ 2 were not included because of StrCase
+ StrLower Function
+ StrUpper Function
+ 2 were not included because of StrClb
+ StrClbSet Function
+ StrClbGet Function
+ 1 was not included because of NSISToIO and IOToNSIS
+ Convert / to // in Paths Function
+ 1 was not included because of original String Replace Function (called
+ here as StrRep)
+ Another String Replace Function
+ 2 were not included because they aren't useful anymore
+ Slash <-> Backslash Converter Function
+ Trim Function
+ 1 was not included because of bugs
+ Number to String Converter Function
+
+Version History
+---------------
+
+1.09 - 10/22/2004
+
+- Fixed stack problems involving: StrCase, StrRep, StrSort, StrTok.
+- Fixed StrClb: When "Action" = "<>", handle was wrongly outputed as
+ text.
+- Fixed StrSort, StrStrAdv documentation examples.
+- Fixed StrIOToNSIS, StrLoc, StrNSISToIO, StrRep, StrStr: sometimes
+ didn't find "StrToSearch" at all.
+
+1.08 - 10/12/2004
+
+- Converted all the functions to LogicLib.
+- StrSort: Totally remade and it can break old scripts. See
+ documentation for details.
+- StrTok: "ResultPart" has to start from 0 and it can break old scripts.
+ See documentation for details.
+- Added defines: StrFunc_List, *_List and *_TypeList.
+- Fixed StrStrAdv: Variables $R0-$R3 couldn't be used on scripts before
+ calling.
+- StrRep: Cut down some variables.
+- Arranged correctly the order of StrSort on the documentation.
+
+1.07 - 09/21/2004
+
+- Removed ${UnStrFunc} command. Now you can just include uninstall
+ functions commands like ${UnStrStr} to be supported by uninstall functions
+ and sections.
+- Added case-sensitive comparation option for StrStrAdv.
+- StrCase now uses System.dll which makes case conversions effective with
+all latin letters (i.e. ê).
+- Added switch case and original case for StrCase.
+- StrClbSet and StrClbGet removed, added StrClb.
+- Made compact the most usual operations inside the header file. File size
+reduced.
+
+1.06 - 03/26/2004
+
+- StrNumToStr removed due to complex number handling on some languages.
+- Fixed the bug where the old string was attached to string returned by
+ StrCase when $R5 variable was used.
+
+1.05 - 03/17/2004
+
+- Fixed a bug with StrCase, Title Case wasn't working as should be.
+- Fixed a bug with StrStrAdv, previous fix created another bug, string not
+ returned correctly when using backwards search with "DisplayStrToSearch" as
+ "0".
+
+1.04 - 03/07/2004
+
+- Added new StrCase, removed StrLower and StrUpper.
+- Organized by name commands inside header and readme files.
+
+1.03 - 02/12/2004
+
+- Added commands support for uninstall sections and functions.
+- Fixed variables switch in "StrLoc" and "StrTok" after using these.
+
+1.02 - 02/07/2004
+
+- Fixed StrLoc.
+- Fixed Documentation about StrLoc. "Direction" is really "OffsetDirection".
+- Added my new AdvStrSort, and removed the old one.
+
+1.01 - 02/05/2004
+
+- Fixed Documentation about StrSort and StrTok.
+- Fixed StrTok default value for the string part. Now it's "L".
+- Fixed StrStrAdv fixed wrong search when had a combination of same
+ substrings one after another in a string.
+- Fixed StrLoc: when a string isn't found, don't return any value at all.
+
+1.00 - 02/01/2004
+
+- Added documentation.
+- Renamed header file to "StrFunc.nsh".
+- Added 1 function, StrLoc.
+- Modified StrStrAdv, removed some lines.
+- Fixed StrTok, 2 simple numbers made it loop everytime.
+- Fixed some small issues on the header file.
+
+0.02 - 01/24/2004
+
+- Completed StrFunc.nsh file. Need some tests and the readme.
+
+0.01 - 01/22/2004
+
+- First version to test ideas...
+
+Credits
+-------
+
+ Made by Diego Pedroso (aka deguix).
+
+Functions Credits
+-----------------
+
+- All functions are made by Diego Pedroso on LogicLib format. They
+ are based on functions by Amir Szekely, Dave Laundon, Hendri
+ Adriaens, Nik Medved, Joost Verburg, Stuart Welch, Ximon Eighteen,
+ "bigmac666" and "bluenet". "bluenet"'s version of StrIOToNSIS and
+ StrNSISToIO on LogicLib format were included.
+
+License
+-------
+
+This header file is provided 'as-is', without any express or implied
+warranty. In no event will the author be held liable for any damages
+arising from the use of this header file.
+
+Permission is granted to anyone to use this header file for any purpose,
+including commercial applications, and to alter it and redistribute
+it freely, subject to the following restrictions:
+
+1. The origin of this header file must not be misrepresented;
+ you must not claim that you wrote the original header file.
+ If you use this header file in a product, an acknowledgment in the
+ product documentation would be appreciated but is not required.
+2. Altered versions must be plainly marked as such,
+ and must not be misrepresented as being the original header file.
3. This notice may not be removed or altered from any distribution. \ No newline at end of file
diff --git a/Include/TextFunc.nsh b/Include/TextFunc.nsh
index 248dbca..4069834 100755
--- a/Include/TextFunc.nsh
+++ b/Include/TextFunc.nsh
@@ -1,1504 +1,1504 @@
-/*
-_____________________________________________________________________________
-
- 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. !insertmacro TextFunction
- 3. [Section|Function]
- ${TextFunction} "File" "..." $var
- [SectionEnd|FunctionEnd]
-
-
- TextFunction=[LineFind|LineRead|FileReadFromEnd|LineSum|FileJoin|
- TextCompare|TextCompareS|ConfigRead|ConfigReadS|
- ConfigWrite|ConfigWriteS|FileRecode|TrimNewLines]
-
- un.TextFunction=[un.LineFind|un.LineRead|un.FileReadFromEnd|un.LineSum|
- un.FileJoin|un.TextCompare|un.TextCompareS|un.ConfigRead|
- un.ConfigReadS|un.ConfigWrite|un.ConfigWriteS|un.FileRecode|
- un.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
-!define TEXTFUNC_INCLUDED
-
-!include FileFunc.nsh
-
-!verbose push
-!verbose 3
-!ifndef _TEXTFUNC_VERBOSE
- !define _TEXTFUNC_VERBOSE 3
-!endif
-!verbose ${_TEXTFUNC_VERBOSE}
-!define TEXTFUNC_VERBOSE `!insertmacro TEXTFUNC_VERBOSE`
-!define _TEXTFUNC_UN
-!define _TEXTFUNC_S
-!verbose pop
-
-!macro TEXTFUNC_VERBOSE _VERBOSE
- !verbose push
- !verbose 3
- !undef _TEXTFUNC_VERBOSE
- !define _TEXTFUNC_VERBOSE ${_VERBOSE}
- !verbose pop
-!macroend
-
-
-# Install. Case insensitive. #
-
-!macro LineFindCall _INPUT _OUTPUT _RANGE _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_INPUT}`
- Push `${_OUTPUT}`
- Push `${_RANGE}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call LineFind
- Pop $0
- !verbose pop
-!macroend
-
-!macro LineReadCall _FILE _NUMBER _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_NUMBER}`
- Call LineRead
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro FileReadFromEndCall _FILE _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_FILE}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call FileReadFromEnd
- Pop $0
- !verbose pop
-!macroend
-
-!macro LineSumCall _FILE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Call LineSum
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro FileJoinCall _FILE1 _FILE2 _FILE3
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE1}`
- Push `${_FILE2}`
- Push `${_FILE3}`
- Call 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`
- Call TextCompare
- Pop $0
- !verbose pop
-!macroend
-
-!macro ConfigReadCall _FILE _ENTRY _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Call ConfigRead
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro ConfigWriteCall _FILE _ENTRY _VALUE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Push `${_VALUE}`
- Call ConfigWrite
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro FileRecodeCall _FILE _FORMAT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_FORMAT}`
- Call FileRecode
- !verbose pop
-!macroend
-
-!macro TrimNewLinesCall _FILE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Call TrimNewLines
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro _TextFunc_TempFileForFile _FILE _RESULT
- ${${_TEXTFUNC_UN}GetParent} ${_FILE} ${_RESULT}
- StrCmp ${_RESULT} "" 0 +2
- StrCpy ${_RESULT} $EXEDIR
- GetTempFileName ${_RESULT} ${_RESULT}
- StrCmp ${_RESULT} "" 0 +2
- GetTempFileName ${_RESULT}
- ClearErrors
-!macroend
-
-!macro LineFind
- !ifndef ${_TEXTFUNC_UN}LineFind
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}LineFind `!insertmacro ${_TEXTFUNC_UN}LineFindCall`
-
- !insertmacro ${_TEXTFUNC_UN}GetParent
-
- Function ${_TEXTFUNC_UN}LineFind
- 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 error
- StrCmp $1 '/NUL' 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 error
-
- 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 delspaces
- StrCpy $2 $2 '' 1
- StrCpy $8 $2 1 -1
- StrCmp $8 '}' 0 delspaces
- StrCpy $2 $2 -1
- StrCpy $R6 cut
-
- delspaces:
- StrCpy $8 $2 1
- StrCmp $8 ' ' 0 +3
- StrCpy $2 $2 '' 1
- goto -3
- StrCmp $2$7 '0' file
- StrCpy $4 ''
- StrCpy $5 ''
- StrCmp $2 '' writechk
-
- 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 ':' range
-
- IntCmp $4 0 0 +2
- IntCmp $5 -1 goto 0 growthcmp
- StrCmp $R7 '' 0 minus2plus
- StrCpy $R7 0
- FileOpen $8 $0 r
- FileRead $8 $9
- IfErrors +3
- IntOp $R7 $R7 + 1
- Goto -3
- FileClose $8
-
- 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 goto 0 growthcmp
- IntOp $5 $R7 + $5
- IntOp $5 $5 + 1
- growthcmp:
- IntCmp $4 $5 goto goto
- StrCpy $5 $4
- goto:
- goto $7
-
- file:
- StrCmp $1 '/NUL' notemp
- !insertmacro _TextFunc_TempFileForFile $1 $R4
- Push $R4
- FileOpen $R4 $R4 w
- notemp:
- FileOpen $R5 $0 r
- IfErrors preerror
-
- loop:
- IntOp $R8 $R8 + 1
- FileRead $R5 $R9
- IfErrors handleclose
-
- cmp:
- StrCmp $2$4$5 '' writechk
- IntCmp $4 $R8 call 0 writechk
- StrCmp $5 -1 call
- IntCmp $5 $R8 call 0 call
-
- GetLabelAddress $7 cmp
- goto delspaces
-
- 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 preerror
- StrCmp $9 'StopLineFind' 0 +3
- IntOp $6 $6 + 1
- goto handleclose
- StrCmp $1 '/NUL' loop
- StrCmp $9 'SkipWrite' 0 +3
- IntOp $6 $6 + 1
- goto loop
- StrCmp $7 $R9 write
- IntOp $6 $6 + 1
- goto write
-
- writechk:
- StrCmp $1 '/NUL' loop
- StrCmp $R6 cut 0 write
- IntOp $6 $6 + 1
- goto loop
-
- write:
- FileWrite $R4 $R9
- goto loop
-
- preerror:
- SetErrors
-
- handleclose:
- StrCmp $1 '/NUL' +3
- FileClose $R4
- Pop $R4
- FileClose $R5
- IfErrors error
-
- StrCmp $1 '/NUL' end
- StrCmp $1 '' 0 +2
- StrCpy $1 $0
- StrCmp $6 0 0 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 rename
- Delete $R4
- StrCmp $1 $0 end
- CopyFiles /SILENT $0 $1
- goto end
-
- rename:
- Delete '$EXEDIR\$1'
- Rename $R4 '$EXEDIR\$1'
- IfErrors 0 end
- Delete $1
- Rename $R4 $1
- IfErrors 0 end
-
- error:
- SetErrors
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro LineRead
- !ifndef ${_TEXTFUNC_UN}LineRead
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}LineRead `!insertmacro ${_TEXTFUNC_UN}LineReadCall`
-
- Function ${_TEXTFUNC_UN}LineRead
- Exch $1
- Exch
- Exch $0
- Exch
- Push $2
- Push $3
- Push $4
- ClearErrors
-
- IfFileExists $0 0 error
- IntOp $1 $1 + 0
- IntCmp $1 0 error 0 plus
- StrCpy $4 0
- FileOpen $2 $0 r
- IfErrors 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 error error
-
- plus:
- FileOpen $2 $0 r
- IfErrors error
- StrCpy $3 0
- IntOp $3 $3 + 1
- FileRead $2 $0
- IfErrors +4
- StrCmp $3 $1 0 -3
- FileClose $2
- goto end
- FileClose $2
-
- error:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro FileReadFromEnd
- !ifndef ${_TEXTFUNC_UN}FileReadFromEnd
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}FileReadFromEnd `!insertmacro ${_TEXTFUNC_UN}FileReadFromEndCall`
-
- Function ${_TEXTFUNC_UN}FileReadFromEnd
- Exch $1
- Exch
- Exch $0
- Exch
- Push $7
- Push $8
- Push $9
- ClearErrors
-
- StrCpy $7 -1
- StrCpy $8 0
- IfFileExists $0 0 error
- FileOpen $0 $0 r
- IfErrors error
- FileRead $0 $9
- IfErrors +4
- Push $9
- IntOp $8 $8 + 1
- goto -4
- FileClose $0
-
- nextline:
- StrCmp $8 0 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 error
- StrCmp $0 'StopFileReadFromEnd' clearstack nextline
-
- error:
- SetErrors
-
- clearstack:
- StrCmp $8 0 end
- Pop $9
- IntOp $8 $8 - 1
- goto clearstack
-
- end:
- Pop $9
- Pop $8
- Pop $7
- Pop $1
- Pop $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro LineSum
- !ifndef ${_TEXTFUNC_UN}LineSum
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}LineSum `!insertmacro ${_TEXTFUNC_UN}LineSumCall`
-
- Function ${_TEXTFUNC_UN}LineSum
- Exch $0
- Push $1
- Push $2
- ClearErrors
-
- IfFileExists $0 0 error
- StrCpy $2 0
- FileOpen $0 $0 r
- IfErrors error
- FileRead $0 $1
- IfErrors +3
- IntOp $2 $2 + 1
- Goto -3
- FileClose $0
- StrCpy $0 $2
- goto end
-
- error:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro FileJoin
- !ifndef ${_TEXTFUNC_UN}FileJoin
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}FileJoin `!insertmacro ${_TEXTFUNC_UN}FileJoinCall`
-
- !insertmacro ${_TEXTFUNC_UN}GetParent
-
- Function ${_TEXTFUNC_UN}FileJoin
- Exch $2
- Exch
- Exch $1
- Exch
- Exch 2
- Exch $0
- Exch 2
- Push $3
- Push $4
- Push $5
- ClearErrors
-
- IfFileExists $0 0 error
- IfFileExists $1 0 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 error
-
- StrCmp $2 $0 0 +2
- StrCpy $2 ''
- StrCmp $2 '' 0 +3
- StrCpy $4 $0
- Goto notemp
- !insertmacro _TextFunc_TempFileForFile $2 $4
- CopyFiles /SILENT $0 $4
- notemp:
- FileOpen $3 $4 a
- IfErrors 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 error
- FileRead $0 $5
- IfErrors +3
- FileWrite $3 $5
- goto -3
- FileClose $0
- FileClose $3
- StrCmp $2 '' end
- Delete '$EXEDIR\$2'
- Rename $4 '$EXEDIR\$2'
- IfErrors 0 end
- Delete $2
- Rename $4 $2
- IfErrors 0 end
-
- error:
- SetErrors
-
- end:
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro TextCompare
- !ifndef ${_TEXTFUNC_UN}TextCompare${_TEXTFUNC_S}
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}TextCompare${_TEXTFUNC_S} `!insertmacro ${_TEXTFUNC_UN}TextCompare${_TEXTFUNC_S}Call`
-
- Function ${_TEXTFUNC_UN}TextCompare${_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 error
- IfFileExists $1 0 error
- StrCmp $2 'FastDiff' +5
- StrCmp $2 'FastEqual' +4
- StrCmp $2 'SlowDiff' +3
- StrCmp $2 'SlowEqual' +2
- goto error
-
- FileOpen $4 $0 r
- IfErrors error
- FileOpen $5 $1 r
- IfErrors error
- SetDetailsPrint textonly
-
- StrCpy $6 0
- StrCpy $8 0
-
- nextline:
- StrCmp${_TEXTFUNC_S} $4 '' fast
- IntOp $8 $8 + 1
- FileRead $4 $9
- IfErrors 0 +4
- FileClose $4
- StrCpy $4 ''
- StrCmp${_TEXTFUNC_S} $5 '' end
- StrCmp $2 'FastDiff' fast
- StrCmp $2 'FastEqual' fast slow
-
- fast:
- StrCmp${_TEXTFUNC_S} $5 '' call
- IntOp $6 $6 + 1
- FileRead $5 $7
- IfErrors 0 +5
- FileClose $5
- StrCpy $5 ''
- StrCmp${_TEXTFUNC_S} $4 '' end
- StrCmp $2 'FastDiff' call close
- StrCmp $2 'FastDiff' 0 +2
- StrCmp${_TEXTFUNC_S} $7 $9 nextline call
- StrCmp${_TEXTFUNC_S} $7 $9 call nextline
-
- slow:
- StrCmp${_TEXTFUNC_S} $4 '' close
- StrCpy $6 ''
- DetailPrint '$8. $9'
- FileSeek $5 0
-
- slownext:
- FileRead $5 $7
- IfErrors 0 +2
- StrCmp $2 'SlowDiff' call nextline
- StrCmp $2 'SlowDiff' 0 +2
- StrCmp${_TEXTFUNC_S} $7 $9 nextline slownext
- IntOp $6 $6 + 1
- StrCmp${_TEXTFUNC_S} $7 $9 0 slownext
-
- 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 nextline
-
- close:
- FileClose $4
- FileClose $5
- goto end
-
- error:
- SetErrors
-
- end:
- SetDetailsPrint both
- Pop $9
- Pop $8
- Pop $7
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro ConfigRead
- !ifndef ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S}
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S} `!insertmacro ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S}Call`
-
- Function ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S}
- Exch $1
- Exch
- Exch $0
- Exch
- Push $2
- Push $3
- Push $4
- ClearErrors
-
- FileOpen $2 $0 r
- IfErrors error
- StrLen $0 $1
- StrCmp${_TEXTFUNC_S} $0 0 error
-
- readnext:
- FileRead $2 $3
- IfErrors error
- StrCpy $4 $3 $0
- StrCmp${_TEXTFUNC_S} $4 $1 0 readnext
- StrCpy $0 $3 '' $0
- StrCpy $4 $0 1 -1
- StrCmp${_TEXTFUNC_S} $4 '$\r' +2
- StrCmp${_TEXTFUNC_S} $4 '$\n' 0 close
- StrCpy $0 $0 -1
- goto -4
-
- error:
- SetErrors
- StrCpy $0 ''
-
- close:
- FileClose $2
-
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro ConfigWrite
- !ifndef ${_TEXTFUNC_UN}ConfigWrite${_TEXTFUNC_S}
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}ConfigWrite${_TEXTFUNC_S} `!insertmacro ${_TEXTFUNC_UN}ConfigWrite${_TEXTFUNC_S}Call`
-
- Function ${_TEXTFUNC_UN}ConfigWrite${_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 error
- FileOpen $3 $0 a
- IfErrors error
-
- StrLen $0 $1
- StrCmp${_TEXTFUNC_S} $0 0 0 readnext
- StrCpy $0 ''
- goto close
-
- readnext:
- FileRead $3 $4
- IfErrors add
- StrCpy $5 $4 $0
- StrCmp${_TEXTFUNC_S} $5 $1 0 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 '' change
- StrCmp${_TEXTFUNC_S} $6 '$1$2' 0 change
- StrCpy $0 SAME
- goto close
-
- change:
- FileSeek $3 0 CUR $5
- StrLen $4 $4
- IntOp $4 $5 - $4
- FileSeek $3 0 END $6
- IntOp $6 $6 - $5
-
- System::Alloc /NOUNLOAD $6
- Pop $0
- FileSeek $3 $5 SET
- System::Call /NOUNLOAD 'kernel32::ReadFile(i r3, i r0, i $6, t.,)'
- FileSeek $3 $4 SET
- StrCmp${_TEXTFUNC_S} $2 '' +2
- FileWrite $3 '$1$2$\r$\n'
- System::Call /NOUNLOAD 'kernel32::WriteFile(i r3, i r0, i $6, t.,)'
- System::Call /NOUNLOAD 'kernel32::SetEndOfFile(i r3)'
- System::Free $0
- StrCmp${_TEXTFUNC_S} $2 '' +3
- StrCpy $0 CHANGED
- goto close
- StrCpy $0 DELETED
- goto close
-
- add:
- StrCmp${_TEXTFUNC_S} $2 '' 0 +3
- StrCpy $0 SAME
- goto 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
-
- close:
- FileClose $3
- goto end
-
- error:
- SetErrors
- StrCpy $0 ''
-
- end:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro FileRecode
- !ifndef ${_TEXTFUNC_UN}FileRecode
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}FileRecode `!insertmacro ${_TEXTFUNC_UN}FileRecodeCall`
-
- Function ${_TEXTFUNC_UN}FileRecode
- Exch $1
- Exch
- Exch $0
- Exch
- Push $2
- Push $3
- Push $4
-
- IfFileExists $0 0 error
- StrCmp $1 OemToChar +2
- StrCmp $1 CharToOem 0 error
-
- FileOpen $2 $0 a
- FileSeek $2 0 END $3
- System::Alloc /NOUNLOAD $3
- Pop $4
- FileSeek $2 0 SET
- System::Call /NOUNLOAD 'kernel32::ReadFile(i r2, i r4, i $3, t.,)'
- System::Call /NOUNLOAD 'user32::$1Buff(i r4, i r4, i $3)'
- FileSeek $2 0 SET
- System::Call /NOUNLOAD 'kernel32::WriteFile(i r2, i r4, i $3, t.,)'
- System::Free $4
- FileClose $2
- goto end
-
- error:
- SetErrors
-
- end:
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro TrimNewLines
- !ifndef ${_TEXTFUNC_UN}TrimNewLines
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !define ${_TEXTFUNC_UN}TrimNewLines `!insertmacro ${_TEXTFUNC_UN}TrimNewLinesCall`
-
- Function ${_TEXTFUNC_UN}TrimNewLines
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-
-# Uninstall. Case insensitive. #
-
-!macro un.LineFindCall _INPUT _OUTPUT _RANGE _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_INPUT}`
- Push `${_OUTPUT}`
- Push `${_RANGE}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call un.LineFind
- Pop $0
- !verbose pop
-!macroend
-
-!macro un.LineReadCall _FILE _NUMBER _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_NUMBER}`
- Call un.LineRead
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.FileReadFromEndCall _FILE _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_FILE}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call un.FileReadFromEnd
- Pop $0
- !verbose pop
-!macroend
-
-!macro un.LineSumCall _FILE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Call un.LineSum
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.FileJoinCall _FILE1 _FILE2 _FILE3
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE1}`
- Push `${_FILE2}`
- Push `${_FILE3}`
- Call un.FileJoin
- !verbose pop
-!macroend
-
-!macro un.TextCompareCall _FILE1 _FILE2 _OPTION _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_FILE1}`
- Push `${_FILE2}`
- Push `${_OPTION}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call un.TextCompare
- Pop $0
- !verbose pop
-!macroend
-
-!macro un.ConfigReadCall _FILE _ENTRY _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Call un.ConfigRead
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.ConfigWriteCall _FILE _ENTRY _VALUE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Push `${_VALUE}`
- Call un.ConfigWrite
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.FileRecodeCall _FILE _FORMAT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_FORMAT}`
- Call un.FileRecode
- !verbose pop
-!macroend
-
-!macro un.TrimNewLinesCall _FILE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Call un.TrimNewLines
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.LineFind
- !ifndef un.LineFind
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro LineFind
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.LineRead
- !ifndef un.LineRead
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro LineRead
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.FileReadFromEnd
- !ifndef un.FileReadFromEnd
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro FileReadFromEnd
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.LineSum
- !ifndef un.LineSum
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro LineSum
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.FileJoin
- !ifndef un.FileJoin
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro FileJoin
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.TextCompare
- !ifndef un.TextCompare
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro TextCompare
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.ConfigRead
- !ifndef un.ConfigRead
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro ConfigRead
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.ConfigWrite
- !ifndef un.ConfigWrite
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro ConfigWrite
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.FileRecode
- !ifndef un.FileRecode
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro FileRecode
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.TrimNewLines
- !ifndef un.TrimNewLines
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
-
- !insertmacro TrimNewLines
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-
-# Install. Case sensitive. #
-
-!macro TextCompareSCall _FILE1 _FILE2 _OPTION _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_FILE1}`
- Push `${_FILE2}`
- Push `${_OPTION}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call TextCompareS
- Pop $0
- !verbose pop
-!macroend
-
-!macro ConfigReadSCall _FILE _ENTRY _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Call ConfigReadS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro ConfigWriteSCall _FILE _ENTRY _VALUE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Push `${_VALUE}`
- Call ConfigWriteS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro TextCompareS
- !ifndef TextCompareS
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S `S`
-
- !insertmacro TextCompare
-
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro ConfigReadS
- !ifndef ConfigReadS
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S `S`
-
- !insertmacro ConfigRead
-
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro ConfigWriteS
- !ifndef ConfigWriteS
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S `S`
-
- !insertmacro ConfigWrite
-
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S
- !verbose pop
- !endif
-!macroend
-
-
-# Uninstall. Case sensitive. #
-
-!macro un.TextCompareSCall _FILE1 _FILE2 _OPTION _FUNC
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push $0
- Push `${_FILE1}`
- Push `${_FILE2}`
- Push `${_OPTION}`
- GetFunctionAddress $0 `${_FUNC}`
- Push `$0`
- Call un.TextCompareS
- Pop $0
- !verbose pop
-!macroend
-
-!macro un.ConfigReadSCall _FILE _ENTRY _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Call un.ConfigReadS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.ConfigWriteSCall _FILE _ENTRY _VALUE _RESULT
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- Push `${_FILE}`
- Push `${_ENTRY}`
- Push `${_VALUE}`
- Call un.ConfigWriteS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.TextCompareS
- !ifndef un.TextCompareS
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S `S`
-
- !insertmacro TextCompare
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.ConfigReadS
- !ifndef un.ConfigReadS
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S `S`
-
- !insertmacro ConfigRead
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.ConfigWriteS
- !ifndef un.ConfigWriteS
- !verbose push
- !verbose ${_TEXTFUNC_VERBOSE}
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN `un.`
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S `S`
-
- !insertmacro ConfigWrite
-
- !undef _TEXTFUNC_UN
- !define _TEXTFUNC_UN
- !undef _TEXTFUNC_S
- !define _TEXTFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!endif
+/*
+_____________________________________________________________________________
+
+ 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. !insertmacro TextFunction
+ 3. [Section|Function]
+ ${TextFunction} "File" "..." $var
+ [SectionEnd|FunctionEnd]
+
+
+ TextFunction=[LineFind|LineRead|FileReadFromEnd|LineSum|FileJoin|
+ TextCompare|TextCompareS|ConfigRead|ConfigReadS|
+ ConfigWrite|ConfigWriteS|FileRecode|TrimNewLines]
+
+ un.TextFunction=[un.LineFind|un.LineRead|un.FileReadFromEnd|un.LineSum|
+ un.FileJoin|un.TextCompare|un.TextCompareS|un.ConfigRead|
+ un.ConfigReadS|un.ConfigWrite|un.ConfigWriteS|un.FileRecode|
+ un.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
+!define TEXTFUNC_INCLUDED
+
+!include FileFunc.nsh
+
+!verbose push
+!verbose 3
+!ifndef _TEXTFUNC_VERBOSE
+ !define _TEXTFUNC_VERBOSE 3
+!endif
+!verbose ${_TEXTFUNC_VERBOSE}
+!define TEXTFUNC_VERBOSE `!insertmacro TEXTFUNC_VERBOSE`
+!define _TEXTFUNC_UN
+!define _TEXTFUNC_S
+!verbose pop
+
+!macro TEXTFUNC_VERBOSE _VERBOSE
+ !verbose push
+ !verbose 3
+ !undef _TEXTFUNC_VERBOSE
+ !define _TEXTFUNC_VERBOSE ${_VERBOSE}
+ !verbose pop
+!macroend
+
+
+# Install. Case insensitive. #
+
+!macro LineFindCall _INPUT _OUTPUT _RANGE _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_INPUT}`
+ Push `${_OUTPUT}`
+ Push `${_RANGE}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call LineFind
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro LineReadCall _FILE _NUMBER _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_NUMBER}`
+ Call LineRead
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro FileReadFromEndCall _FILE _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call FileReadFromEnd
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro LineSumCall _FILE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Call LineSum
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro FileJoinCall _FILE1 _FILE2 _FILE3
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_FILE3}`
+ Call 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`
+ Call TextCompare
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro ConfigReadCall _FILE _ENTRY _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Call ConfigRead
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro ConfigWriteCall _FILE _ENTRY _VALUE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Push `${_VALUE}`
+ Call ConfigWrite
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro FileRecodeCall _FILE _FORMAT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_FORMAT}`
+ Call FileRecode
+ !verbose pop
+!macroend
+
+!macro TrimNewLinesCall _FILE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Call TrimNewLines
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro _TextFunc_TempFileForFile _FILE _RESULT
+ ${${_TEXTFUNC_UN}GetParent} ${_FILE} ${_RESULT}
+ StrCmp ${_RESULT} "" 0 +2
+ StrCpy ${_RESULT} $EXEDIR
+ GetTempFileName ${_RESULT} ${_RESULT}
+ StrCmp ${_RESULT} "" 0 +2
+ GetTempFileName ${_RESULT}
+ ClearErrors
+!macroend
+
+!macro LineFind
+ !ifndef ${_TEXTFUNC_UN}LineFind
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}LineFind `!insertmacro ${_TEXTFUNC_UN}LineFindCall`
+
+ !insertmacro ${_TEXTFUNC_UN}GetParent
+
+ Function ${_TEXTFUNC_UN}LineFind
+ 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 error
+ StrCmp $1 '/NUL' 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 error
+
+ 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 delspaces
+ StrCpy $2 $2 '' 1
+ StrCpy $8 $2 1 -1
+ StrCmp $8 '}' 0 delspaces
+ StrCpy $2 $2 -1
+ StrCpy $R6 cut
+
+ delspaces:
+ StrCpy $8 $2 1
+ StrCmp $8 ' ' 0 +3
+ StrCpy $2 $2 '' 1
+ goto -3
+ StrCmp $2$7 '0' file
+ StrCpy $4 ''
+ StrCpy $5 ''
+ StrCmp $2 '' writechk
+
+ 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 ':' range
+
+ IntCmp $4 0 0 +2
+ IntCmp $5 -1 goto 0 growthcmp
+ StrCmp $R7 '' 0 minus2plus
+ StrCpy $R7 0
+ FileOpen $8 $0 r
+ FileRead $8 $9
+ IfErrors +3
+ IntOp $R7 $R7 + 1
+ Goto -3
+ FileClose $8
+
+ 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 goto 0 growthcmp
+ IntOp $5 $R7 + $5
+ IntOp $5 $5 + 1
+ growthcmp:
+ IntCmp $4 $5 goto goto
+ StrCpy $5 $4
+ goto:
+ goto $7
+
+ file:
+ StrCmp $1 '/NUL' notemp
+ !insertmacro _TextFunc_TempFileForFile $1 $R4
+ Push $R4
+ FileOpen $R4 $R4 w
+ notemp:
+ FileOpen $R5 $0 r
+ IfErrors preerror
+
+ loop:
+ IntOp $R8 $R8 + 1
+ FileRead $R5 $R9
+ IfErrors handleclose
+
+ cmp:
+ StrCmp $2$4$5 '' writechk
+ IntCmp $4 $R8 call 0 writechk
+ StrCmp $5 -1 call
+ IntCmp $5 $R8 call 0 call
+
+ GetLabelAddress $7 cmp
+ goto delspaces
+
+ 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 preerror
+ StrCmp $9 'StopLineFind' 0 +3
+ IntOp $6 $6 + 1
+ goto handleclose
+ StrCmp $1 '/NUL' loop
+ StrCmp $9 'SkipWrite' 0 +3
+ IntOp $6 $6 + 1
+ goto loop
+ StrCmp $7 $R9 write
+ IntOp $6 $6 + 1
+ goto write
+
+ writechk:
+ StrCmp $1 '/NUL' loop
+ StrCmp $R6 cut 0 write
+ IntOp $6 $6 + 1
+ goto loop
+
+ write:
+ FileWrite $R4 $R9
+ goto loop
+
+ preerror:
+ SetErrors
+
+ handleclose:
+ StrCmp $1 '/NUL' +3
+ FileClose $R4
+ Pop $R4
+ FileClose $R5
+ IfErrors error
+
+ StrCmp $1 '/NUL' end
+ StrCmp $1 '' 0 +2
+ StrCpy $1 $0
+ StrCmp $6 0 0 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 rename
+ Delete $R4
+ StrCmp $1 $0 end
+ CopyFiles /SILENT $0 $1
+ goto end
+
+ rename:
+ Delete '$EXEDIR\$1'
+ Rename $R4 '$EXEDIR\$1'
+ IfErrors 0 end
+ Delete $1
+ Rename $R4 $1
+ IfErrors 0 end
+
+ error:
+ SetErrors
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro LineRead
+ !ifndef ${_TEXTFUNC_UN}LineRead
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}LineRead `!insertmacro ${_TEXTFUNC_UN}LineReadCall`
+
+ Function ${_TEXTFUNC_UN}LineRead
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ ClearErrors
+
+ IfFileExists $0 0 error
+ IntOp $1 $1 + 0
+ IntCmp $1 0 error 0 plus
+ StrCpy $4 0
+ FileOpen $2 $0 r
+ IfErrors 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 error error
+
+ plus:
+ FileOpen $2 $0 r
+ IfErrors error
+ StrCpy $3 0
+ IntOp $3 $3 + 1
+ FileRead $2 $0
+ IfErrors +4
+ StrCmp $3 $1 0 -3
+ FileClose $2
+ goto end
+ FileClose $2
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro FileReadFromEnd
+ !ifndef ${_TEXTFUNC_UN}FileReadFromEnd
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}FileReadFromEnd `!insertmacro ${_TEXTFUNC_UN}FileReadFromEndCall`
+
+ Function ${_TEXTFUNC_UN}FileReadFromEnd
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $7
+ Push $8
+ Push $9
+ ClearErrors
+
+ StrCpy $7 -1
+ StrCpy $8 0
+ IfFileExists $0 0 error
+ FileOpen $0 $0 r
+ IfErrors error
+ FileRead $0 $9
+ IfErrors +4
+ Push $9
+ IntOp $8 $8 + 1
+ goto -4
+ FileClose $0
+
+ nextline:
+ StrCmp $8 0 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 error
+ StrCmp $0 'StopFileReadFromEnd' clearstack nextline
+
+ error:
+ SetErrors
+
+ clearstack:
+ StrCmp $8 0 end
+ Pop $9
+ IntOp $8 $8 - 1
+ goto clearstack
+
+ end:
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $1
+ Pop $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro LineSum
+ !ifndef ${_TEXTFUNC_UN}LineSum
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}LineSum `!insertmacro ${_TEXTFUNC_UN}LineSumCall`
+
+ Function ${_TEXTFUNC_UN}LineSum
+ Exch $0
+ Push $1
+ Push $2
+ ClearErrors
+
+ IfFileExists $0 0 error
+ StrCpy $2 0
+ FileOpen $0 $0 r
+ IfErrors error
+ FileRead $0 $1
+ IfErrors +3
+ IntOp $2 $2 + 1
+ Goto -3
+ FileClose $0
+ StrCpy $0 $2
+ goto end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro FileJoin
+ !ifndef ${_TEXTFUNC_UN}FileJoin
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}FileJoin `!insertmacro ${_TEXTFUNC_UN}FileJoinCall`
+
+ !insertmacro ${_TEXTFUNC_UN}GetParent
+
+ Function ${_TEXTFUNC_UN}FileJoin
+ Exch $2
+ Exch
+ Exch $1
+ Exch
+ Exch 2
+ Exch $0
+ Exch 2
+ Push $3
+ Push $4
+ Push $5
+ ClearErrors
+
+ IfFileExists $0 0 error
+ IfFileExists $1 0 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 error
+
+ StrCmp $2 $0 0 +2
+ StrCpy $2 ''
+ StrCmp $2 '' 0 +3
+ StrCpy $4 $0
+ Goto notemp
+ !insertmacro _TextFunc_TempFileForFile $2 $4
+ CopyFiles /SILENT $0 $4
+ notemp:
+ FileOpen $3 $4 a
+ IfErrors 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 error
+ FileRead $0 $5
+ IfErrors +3
+ FileWrite $3 $5
+ goto -3
+ FileClose $0
+ FileClose $3
+ StrCmp $2 '' end
+ Delete '$EXEDIR\$2'
+ Rename $4 '$EXEDIR\$2'
+ IfErrors 0 end
+ Delete $2
+ Rename $4 $2
+ IfErrors 0 end
+
+ error:
+ SetErrors
+
+ end:
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro TextCompare
+ !ifndef ${_TEXTFUNC_UN}TextCompare${_TEXTFUNC_S}
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}TextCompare${_TEXTFUNC_S} `!insertmacro ${_TEXTFUNC_UN}TextCompare${_TEXTFUNC_S}Call`
+
+ Function ${_TEXTFUNC_UN}TextCompare${_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 error
+ IfFileExists $1 0 error
+ StrCmp $2 'FastDiff' +5
+ StrCmp $2 'FastEqual' +4
+ StrCmp $2 'SlowDiff' +3
+ StrCmp $2 'SlowEqual' +2
+ goto error
+
+ FileOpen $4 $0 r
+ IfErrors error
+ FileOpen $5 $1 r
+ IfErrors error
+ SetDetailsPrint textonly
+
+ StrCpy $6 0
+ StrCpy $8 0
+
+ nextline:
+ StrCmp${_TEXTFUNC_S} $4 '' fast
+ IntOp $8 $8 + 1
+ FileRead $4 $9
+ IfErrors 0 +4
+ FileClose $4
+ StrCpy $4 ''
+ StrCmp${_TEXTFUNC_S} $5 '' end
+ StrCmp $2 'FastDiff' fast
+ StrCmp $2 'FastEqual' fast slow
+
+ fast:
+ StrCmp${_TEXTFUNC_S} $5 '' call
+ IntOp $6 $6 + 1
+ FileRead $5 $7
+ IfErrors 0 +5
+ FileClose $5
+ StrCpy $5 ''
+ StrCmp${_TEXTFUNC_S} $4 '' end
+ StrCmp $2 'FastDiff' call close
+ StrCmp $2 'FastDiff' 0 +2
+ StrCmp${_TEXTFUNC_S} $7 $9 nextline call
+ StrCmp${_TEXTFUNC_S} $7 $9 call nextline
+
+ slow:
+ StrCmp${_TEXTFUNC_S} $4 '' close
+ StrCpy $6 ''
+ DetailPrint '$8. $9'
+ FileSeek $5 0
+
+ slownext:
+ FileRead $5 $7
+ IfErrors 0 +2
+ StrCmp $2 'SlowDiff' call nextline
+ StrCmp $2 'SlowDiff' 0 +2
+ StrCmp${_TEXTFUNC_S} $7 $9 nextline slownext
+ IntOp $6 $6 + 1
+ StrCmp${_TEXTFUNC_S} $7 $9 0 slownext
+
+ 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 nextline
+
+ close:
+ FileClose $4
+ FileClose $5
+ goto end
+
+ error:
+ SetErrors
+
+ end:
+ SetDetailsPrint both
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro ConfigRead
+ !ifndef ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S}
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S} `!insertmacro ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S}Call`
+
+ Function ${_TEXTFUNC_UN}ConfigRead${_TEXTFUNC_S}
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ ClearErrors
+
+ FileOpen $2 $0 r
+ IfErrors error
+ StrLen $0 $1
+ StrCmp${_TEXTFUNC_S} $0 0 error
+
+ readnext:
+ FileRead $2 $3
+ IfErrors error
+ StrCpy $4 $3 $0
+ StrCmp${_TEXTFUNC_S} $4 $1 0 readnext
+ StrCpy $0 $3 '' $0
+ StrCpy $4 $0 1 -1
+ StrCmp${_TEXTFUNC_S} $4 '$\r' +2
+ StrCmp${_TEXTFUNC_S} $4 '$\n' 0 close
+ StrCpy $0 $0 -1
+ goto -4
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ close:
+ FileClose $2
+
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro ConfigWrite
+ !ifndef ${_TEXTFUNC_UN}ConfigWrite${_TEXTFUNC_S}
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}ConfigWrite${_TEXTFUNC_S} `!insertmacro ${_TEXTFUNC_UN}ConfigWrite${_TEXTFUNC_S}Call`
+
+ Function ${_TEXTFUNC_UN}ConfigWrite${_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 error
+ FileOpen $3 $0 a
+ IfErrors error
+
+ StrLen $0 $1
+ StrCmp${_TEXTFUNC_S} $0 0 0 readnext
+ StrCpy $0 ''
+ goto close
+
+ readnext:
+ FileRead $3 $4
+ IfErrors add
+ StrCpy $5 $4 $0
+ StrCmp${_TEXTFUNC_S} $5 $1 0 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 '' change
+ StrCmp${_TEXTFUNC_S} $6 '$1$2' 0 change
+ StrCpy $0 SAME
+ goto close
+
+ change:
+ FileSeek $3 0 CUR $5
+ StrLen $4 $4
+ IntOp $4 $5 - $4
+ FileSeek $3 0 END $6
+ IntOp $6 $6 - $5
+
+ System::Alloc /NOUNLOAD $6
+ Pop $0
+ FileSeek $3 $5 SET
+ System::Call /NOUNLOAD 'kernel32::ReadFile(i r3, i r0, i $6, t.,)'
+ FileSeek $3 $4 SET
+ StrCmp${_TEXTFUNC_S} $2 '' +2
+ FileWrite $3 '$1$2$\r$\n'
+ System::Call /NOUNLOAD 'kernel32::WriteFile(i r3, i r0, i $6, t.,)'
+ System::Call /NOUNLOAD 'kernel32::SetEndOfFile(i r3)'
+ System::Free $0
+ StrCmp${_TEXTFUNC_S} $2 '' +3
+ StrCpy $0 CHANGED
+ goto close
+ StrCpy $0 DELETED
+ goto close
+
+ add:
+ StrCmp${_TEXTFUNC_S} $2 '' 0 +3
+ StrCpy $0 SAME
+ goto 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
+
+ close:
+ FileClose $3
+ goto end
+
+ error:
+ SetErrors
+ StrCpy $0 ''
+
+ end:
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro FileRecode
+ !ifndef ${_TEXTFUNC_UN}FileRecode
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}FileRecode `!insertmacro ${_TEXTFUNC_UN}FileRecodeCall`
+
+ Function ${_TEXTFUNC_UN}FileRecode
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+
+ IfFileExists $0 0 error
+ StrCmp $1 OemToChar +2
+ StrCmp $1 CharToOem 0 error
+
+ FileOpen $2 $0 a
+ FileSeek $2 0 END $3
+ System::Alloc /NOUNLOAD $3
+ Pop $4
+ FileSeek $2 0 SET
+ System::Call /NOUNLOAD 'kernel32::ReadFile(i r2, i r4, i $3, t.,)'
+ System::Call /NOUNLOAD 'user32::$1Buff(i r4, i r4, i $3)'
+ FileSeek $2 0 SET
+ System::Call /NOUNLOAD 'kernel32::WriteFile(i r2, i r4, i $3, t.,)'
+ System::Free $4
+ FileClose $2
+ goto end
+
+ error:
+ SetErrors
+
+ end:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro TrimNewLines
+ !ifndef ${_TEXTFUNC_UN}TrimNewLines
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !define ${_TEXTFUNC_UN}TrimNewLines `!insertmacro ${_TEXTFUNC_UN}TrimNewLinesCall`
+
+ Function ${_TEXTFUNC_UN}TrimNewLines
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+
+# Uninstall. Case insensitive. #
+
+!macro un.LineFindCall _INPUT _OUTPUT _RANGE _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_INPUT}`
+ Push `${_OUTPUT}`
+ Push `${_RANGE}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call un.LineFind
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro un.LineReadCall _FILE _NUMBER _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_NUMBER}`
+ Call un.LineRead
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.FileReadFromEndCall _FILE _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call un.FileReadFromEnd
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro un.LineSumCall _FILE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Call un.LineSum
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.FileJoinCall _FILE1 _FILE2 _FILE3
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_FILE3}`
+ Call un.FileJoin
+ !verbose pop
+!macroend
+
+!macro un.TextCompareCall _FILE1 _FILE2 _OPTION _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_OPTION}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call un.TextCompare
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro un.ConfigReadCall _FILE _ENTRY _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Call un.ConfigRead
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.ConfigWriteCall _FILE _ENTRY _VALUE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Push `${_VALUE}`
+ Call un.ConfigWrite
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.FileRecodeCall _FILE _FORMAT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_FORMAT}`
+ Call un.FileRecode
+ !verbose pop
+!macroend
+
+!macro un.TrimNewLinesCall _FILE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Call un.TrimNewLines
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.LineFind
+ !ifndef un.LineFind
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro LineFind
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.LineRead
+ !ifndef un.LineRead
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro LineRead
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.FileReadFromEnd
+ !ifndef un.FileReadFromEnd
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro FileReadFromEnd
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.LineSum
+ !ifndef un.LineSum
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro LineSum
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.FileJoin
+ !ifndef un.FileJoin
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro FileJoin
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.TextCompare
+ !ifndef un.TextCompare
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro TextCompare
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.ConfigRead
+ !ifndef un.ConfigRead
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro ConfigRead
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.ConfigWrite
+ !ifndef un.ConfigWrite
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro ConfigWrite
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.FileRecode
+ !ifndef un.FileRecode
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro FileRecode
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.TrimNewLines
+ !ifndef un.TrimNewLines
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+
+ !insertmacro TrimNewLines
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+
+# Install. Case sensitive. #
+
+!macro TextCompareSCall _FILE1 _FILE2 _OPTION _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_OPTION}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call TextCompareS
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro ConfigReadSCall _FILE _ENTRY _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Call ConfigReadS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro ConfigWriteSCall _FILE _ENTRY _VALUE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Push `${_VALUE}`
+ Call ConfigWriteS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro TextCompareS
+ !ifndef TextCompareS
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S `S`
+
+ !insertmacro TextCompare
+
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro ConfigReadS
+ !ifndef ConfigReadS
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S `S`
+
+ !insertmacro ConfigRead
+
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro ConfigWriteS
+ !ifndef ConfigWriteS
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S `S`
+
+ !insertmacro ConfigWrite
+
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+
+# Uninstall. Case sensitive. #
+
+!macro un.TextCompareSCall _FILE1 _FILE2 _OPTION _FUNC
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push $0
+ Push `${_FILE1}`
+ Push `${_FILE2}`
+ Push `${_OPTION}`
+ GetFunctionAddress $0 `${_FUNC}`
+ Push `$0`
+ Call un.TextCompareS
+ Pop $0
+ !verbose pop
+!macroend
+
+!macro un.ConfigReadSCall _FILE _ENTRY _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Call un.ConfigReadS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.ConfigWriteSCall _FILE _ENTRY _VALUE _RESULT
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ Push `${_FILE}`
+ Push `${_ENTRY}`
+ Push `${_VALUE}`
+ Call un.ConfigWriteS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.TextCompareS
+ !ifndef un.TextCompareS
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S `S`
+
+ !insertmacro TextCompare
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.ConfigReadS
+ !ifndef un.ConfigReadS
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S `S`
+
+ !insertmacro ConfigRead
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.ConfigWriteS
+ !ifndef un.ConfigWriteS
+ !verbose push
+ !verbose ${_TEXTFUNC_VERBOSE}
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN `un.`
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S `S`
+
+ !insertmacro ConfigWrite
+
+ !undef _TEXTFUNC_UN
+ !define _TEXTFUNC_UN
+ !undef _TEXTFUNC_S
+ !define _TEXTFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!endif
diff --git a/Include/UpgradeDLL.nsh b/Include/UpgradeDLL.nsh
index ad88dda..ba10674 100755
--- a/Include/UpgradeDLL.nsh
+++ b/Include/UpgradeDLL.nsh
@@ -1,203 +1,203 @@
-/*
-
-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.v2\UpgradeDLLSession" "count"
- IntOp $R0 $R0 + 1
- WriteRegDWORD HKLM "Software\NSIS.Library.RegTool.v2\UpgradeDLLSession" "count" "$R0"
-
- ;------------------------
- ;Setup RegTool
-
- ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "NSIS.Library.RegTool.v2"
- StrCpy $R3 $R3 -4 1
- IfFileExists $R3 +3
-
- File /oname=$R2\NSIS.Library.RegTool.v2.$HWNDPARENT.exe "${NSISDIR}\Bin\RegTool.bin"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
- "NSIS.Library.RegTool.v2" '"$R2\NSIS.Library.RegTool.v2.$HWNDPARENT.exe" /S'
-
- ;------------------------
- ;Add RegTool entry
-
- WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\UpgradeDLLSession" "$R0.file" "$R1"
- WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\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 parameters used on run-time to a variable
- ;This allows the usage of variables as paramter
-
- 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
+/*
+
+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.v2\UpgradeDLLSession" "count"
+ IntOp $R0 $R0 + 1
+ WriteRegDWORD HKLM "Software\NSIS.Library.RegTool.v2\UpgradeDLLSession" "count" "$R0"
+
+ ;------------------------
+ ;Setup RegTool
+
+ ReadRegStr $R3 HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" "NSIS.Library.RegTool.v2"
+ StrCpy $R3 $R3 -4 1
+ IfFileExists $R3 +3
+
+ File /oname=$R2\NSIS.Library.RegTool.v2.$HWNDPARENT.exe "${NSISDIR}\Bin\RegTool.bin"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
+ "NSIS.Library.RegTool.v2" '"$R2\NSIS.Library.RegTool.v2.$HWNDPARENT.exe" /S'
+
+ ;------------------------
+ ;Add RegTool entry
+
+ WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\UpgradeDLLSession" "$R0.file" "$R1"
+ WriteRegStr HKLM "Software\NSIS.Library.RegTool.v2\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 parameters used on run-time to a variable
+ ;This allows the usage of variables as paramter
+
+ 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/Include/WinMessages.nsh b/Include/WinMessages.nsh
index 8b1b640..57dd866 100755
--- a/Include/WinMessages.nsh
+++ b/Include/WinMessages.nsh
@@ -1,582 +1,582 @@
-/*
-_____________________________________________________________________________
-
- 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
-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
------------------------------------
-
-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
-HKM Hot key control
-IPM IP address control
-MCM Month calendar control
-PBM Progress bar
-PGM Pager control
-PSM Property sheet
-RB Rebar control
-TB Toolbar
-TBM Trackbar
-TTM Tooltip control
-TVM Tree-view control
-UDM Up-down control
------------------------------------
-*/
-
-
-!ifndef WINMESSAGES_INCLUDED
-!define WINMESSAGES_INCLUDED
-!verbose push
-!verbose 3
-
-!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
-
-#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 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 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
-
-#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_USER 0x400
-!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 LVM_FIRST 0x1000
-
-#Status bar window#
-!define SB_CONST_ALPHA 0x00000001
-!define SB_GRAD_RECT 0x00000010
-!define SB_GRAD_TRI 0x00000020
-!define SB_NONE 0x00000000
-!define SB_PIXEL_ALPHA 0x00000002
-!define SB_PREMULT_ALPHA 0x00000004
-!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_GETICON 0x0171
-!define STM_GETIMAGE 0x0173
-!define STM_MSGMAX 0x0174
-!define STM_ONLY_THIS_INTERFACE 0x00000001
-!define STM_ONLY_THIS_NAME 0x00000008
-!define STM_ONLY_THIS_PROTOCOL 0x00000002
-!define STM_ONLY_THIS_TYPE 0x00000004
-!define STM_SETICON 0x0170
-!define STM_SETIMAGE 0x0172
-
-#Tab control#
-!define TCM_FIRST 0x1300
-
-!verbose pop
+/*
+_____________________________________________________________________________
+
+ 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
+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
+-----------------------------------
+
+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
+HKM Hot key control
+IPM IP address control
+MCM Month calendar control
+PBM Progress bar
+PGM Pager control
+PSM Property sheet
+RB Rebar control
+TB Toolbar
+TBM Trackbar
+TTM Tooltip control
+TVM Tree-view control
+UDM Up-down control
+-----------------------------------
+*/
+
+
+!ifndef WINMESSAGES_INCLUDED
+!define WINMESSAGES_INCLUDED
+!verbose push
+!verbose 3
+
+!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
+
+#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 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 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
+
+#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_USER 0x400
+!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 LVM_FIRST 0x1000
+
+#Status bar window#
+!define SB_CONST_ALPHA 0x00000001
+!define SB_GRAD_RECT 0x00000010
+!define SB_GRAD_TRI 0x00000020
+!define SB_NONE 0x00000000
+!define SB_PIXEL_ALPHA 0x00000002
+!define SB_PREMULT_ALPHA 0x00000004
+!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_GETICON 0x0171
+!define STM_GETIMAGE 0x0173
+!define STM_MSGMAX 0x0174
+!define STM_ONLY_THIS_INTERFACE 0x00000001
+!define STM_ONLY_THIS_NAME 0x00000008
+!define STM_ONLY_THIS_PROTOCOL 0x00000002
+!define STM_ONLY_THIS_TYPE 0x00000004
+!define STM_SETICON 0x0170
+!define STM_SETIMAGE 0x0172
+
+#Tab control#
+!define TCM_FIRST 0x1300
+
+!verbose pop
!endif \ No newline at end of file
diff --git a/Include/WinVer.nsh b/Include/WinVer.nsh
index e45d4a8..a6d39c7 100755
--- a/Include/WinVer.nsh
+++ b/Include/WinVer.nsh
@@ -1,151 +1,151 @@
-; ---------------------
-; WinVer.nsh
-; ---------------------
-;
-; LogicLib extensions for handling Windows versions.
-;
-; 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}
-;
-; AtLeastWin<version> checks if the installer is running on Windows version at least as specified.
-; IsWin<version> checks if the installer is running on Windows version exactly as specified.
-; AtMostWin<version> checks if the installer is running on Windows version at most as specified.
-;
-; <version> can be replaced with the following values:
-;
-; 95
-; 98
-; ME
-;
-; NT4
-; 2000
-; XP
-; 2003
-; Vista
-;
-; 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} ${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}
-
-!verbose push
-!verbose 3
-
-!ifndef ___WINVER__NSH___
-!define ___WINVER__NSH___
-
-!include LogicLib.nsh
-
-!define WINVER_95 0x400
-!define WINVER_98 0x40A ;4.10
-!define WINVER_ME 0x45A ;4.90
-
-!define WINVER_NT4 0x400
-!define WINVER_2000 0x500
-!define WINVER_XP 0x501
-!define WINVER_2003 0x502
-!define WINVER_VISTA 0x600
-
-!macro __GetWinVer
- !insertmacro _LOGICLIB_TEMP
- System::Call kernel32::GetVersion()i.s
- Pop $_LOGICLIB_TEMP
-!macroend
-
-!macro __ParseWinVer
- !insertmacro __GetWinVer
- Push $0
- IntOp $0 $_LOGICLIB_TEMP & 0xff
- IntOp $0 $0 << 8
- IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & 0xff00
- IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP >> 8
- IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP | $0
- Pop $0
-!macroend
-
-!macro _IsNT _a _b _t _f
- !insertmacro __GetWinVer
- IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & 0x80000000
- !insertmacro _== $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
-!macroend
-!define IsNT `"" IsNT ""`
-
-!macro __WinVer_DefineOSTest Test OS
-
- !define ${Test}Win${OS} `"" WinVer${Test} ${WINVER_${OS}}`
-
-!macroend
-
-!macro __WinVer_DefineOSTests Test
-
- !insertmacro __WinVer_DefineOSTest ${Test} 95
- !insertmacro __WinVer_DefineOSTest ${Test} 98
- !insertmacro __WinVer_DefineOSTest ${Test} ME
- !insertmacro __WinVer_DefineOSTest ${Test} NT4
- !insertmacro __WinVer_DefineOSTest ${Test} 2000
- !insertmacro __WinVer_DefineOSTest ${Test} XP
- !insertmacro __WinVer_DefineOSTest ${Test} 2003
- !insertmacro __WinVer_DefineOSTest ${Test} VISTA
-
-!macroend
-
-!macro _WinVerAtLeast _a _b _t _f
- !insertmacro __ParseWinVer
- !insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
-!macroend
-
-!macro _WinVerIs _a _b _t _f
- !insertmacro __ParseWinVer
- !insertmacro _= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
-!macroend
-
-!macro _WinVerAtMost _a _b _t _f
- !insertmacro __ParseWinVer
- !insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
-!macroend
-
-!insertmacro __WinVer_DefineOSTests AtLeast
-!insertmacro __WinVer_DefineOSTests Is
-!insertmacro __WinVer_DefineOSTests AtMost
-
-!endif # !___WINVER__NSH___
-
-!verbose pop
+; ---------------------
+; WinVer.nsh
+; ---------------------
+;
+; LogicLib extensions for handling Windows versions.
+;
+; 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}
+;
+; AtLeastWin<version> checks if the installer is running on Windows version at least as specified.
+; IsWin<version> checks if the installer is running on Windows version exactly as specified.
+; AtMostWin<version> checks if the installer is running on Windows version at most as specified.
+;
+; <version> can be replaced with the following values:
+;
+; 95
+; 98
+; ME
+;
+; NT4
+; 2000
+; XP
+; 2003
+; Vista
+;
+; 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} ${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}
+
+!verbose push
+!verbose 3
+
+!ifndef ___WINVER__NSH___
+!define ___WINVER__NSH___
+
+!include LogicLib.nsh
+
+!define WINVER_95 0x400
+!define WINVER_98 0x40A ;4.10
+!define WINVER_ME 0x45A ;4.90
+
+!define WINVER_NT4 0x400
+!define WINVER_2000 0x500
+!define WINVER_XP 0x501
+!define WINVER_2003 0x502
+!define WINVER_VISTA 0x600
+
+!macro __GetWinVer
+ !insertmacro _LOGICLIB_TEMP
+ System::Call kernel32::GetVersion()i.s
+ Pop $_LOGICLIB_TEMP
+!macroend
+
+!macro __ParseWinVer
+ !insertmacro __GetWinVer
+ Push $0
+ IntOp $0 $_LOGICLIB_TEMP & 0xff
+ IntOp $0 $0 << 8
+ IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & 0xff00
+ IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP >> 8
+ IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP | $0
+ Pop $0
+!macroend
+
+!macro _IsNT _a _b _t _f
+ !insertmacro __GetWinVer
+ IntOp $_LOGICLIB_TEMP $_LOGICLIB_TEMP & 0x80000000
+ !insertmacro _== $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
+!macroend
+!define IsNT `"" IsNT ""`
+
+!macro __WinVer_DefineOSTest Test OS
+
+ !define ${Test}Win${OS} `"" WinVer${Test} ${WINVER_${OS}}`
+
+!macroend
+
+!macro __WinVer_DefineOSTests Test
+
+ !insertmacro __WinVer_DefineOSTest ${Test} 95
+ !insertmacro __WinVer_DefineOSTest ${Test} 98
+ !insertmacro __WinVer_DefineOSTest ${Test} ME
+ !insertmacro __WinVer_DefineOSTest ${Test} NT4
+ !insertmacro __WinVer_DefineOSTest ${Test} 2000
+ !insertmacro __WinVer_DefineOSTest ${Test} XP
+ !insertmacro __WinVer_DefineOSTest ${Test} 2003
+ !insertmacro __WinVer_DefineOSTest ${Test} VISTA
+
+!macroend
+
+!macro _WinVerAtLeast _a _b _t _f
+ !insertmacro __ParseWinVer
+ !insertmacro _>= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+
+!macro _WinVerIs _a _b _t _f
+ !insertmacro __ParseWinVer
+ !insertmacro _= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+
+!macro _WinVerAtMost _a _b _t _f
+ !insertmacro __ParseWinVer
+ !insertmacro _<= $_LOGICLIB_TEMP `${_b}` `${_t}` `${_f}`
+!macroend
+
+!insertmacro __WinVer_DefineOSTests AtLeast
+!insertmacro __WinVer_DefineOSTests Is
+!insertmacro __WinVer_DefineOSTests AtMost
+
+!endif # !___WINVER__NSH___
+
+!verbose pop
diff --git a/Include/WordFunc.nsh b/Include/WordFunc.nsh
index 87ccfba..62a119b 100755
--- a/Include/WordFunc.nsh
+++ b/Include/WordFunc.nsh
@@ -1,2205 +1,2205 @@
-/*
-_____________________________________________________________________________
-
- 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. !insertmacro WordFunction
- 3. [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]
-
- un.WordFunction=[un.WordFind|un.WordFindS|un.WordFind2X|un.WordFind2XS|
- un.WordFind3X|un.WordFind3XS|un.WordReplace|un.WordReplaceS|
- un.WordAdd|un.WordAddS|un.WordInsert|un.WordInsertS|
- un.StrFilter|un.StrFilterS|un.VersionCompare|un.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
-!define WORDFUNC_INCLUDED
-
-!verbose push
-!verbose 3
-!ifndef _WORDFUNC_VERBOSE
- !define _WORDFUNC_VERBOSE 3
-!endif
-!verbose ${_WORDFUNC_VERBOSE}
-!define WORDFUNC_VERBOSE `!insertmacro WORDFUNC_VERBOSE`
-!define _WORDFUNC_UN
-!define _WORDFUNC_S
-!verbose pop
-
-!macro WORDFUNC_VERBOSE _VERBOSE
- !verbose push
- !verbose 3
- !undef _WORDFUNC_VERBOSE
- !define _WORDFUNC_VERBOSE ${_VERBOSE}
- !verbose pop
-!macroend
-
-
-# Install. Case insensitive. #
-
-!macro WordFindCall _STRING _DELIMITER _OPTION _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER}`
- Push `${_OPTION}`
- Call WordFind
- 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}`
- Call WordFind2X
- 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}`
- Call WordFind3X
- 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}`
- Call WordReplace
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro WordAddCall _STRING1 _DELIMITER _STRING2 _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING1}`
- Push `${_DELIMITER}`
- Push `${_STRING2}`
- Call WordAdd
- 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}`
- Call WordInsert
- 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}`
- Call StrFilter
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro VersionCompareCall _VER1 _VER2 _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_VER1}`
- Push `${_VER2}`
- Call VersionCompare
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro VersionConvertCall _VERSION _CHARLIST _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_VERSION}`
- Push `${_CHARLIST}`
- Call VersionConvert
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro WordFind
- !ifndef ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}WordFind${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}WordFind${_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
- 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 '/' restart
- StrCmp${_WORDFUNC_S} $2 '#' restart
- StrCmp${_WORDFUNC_S} $2 '*' restart
- goto 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 '*' error3
- StrCmp${_WORDFUNC_S} $3 '**' error3
- StrCmp${_WORDFUNC_S} $3 '}{' error3
- IntOp $1 $1 + 0
- StrCmp${_WORDFUNC_S} $1 0 error2
-
- restart:
- StrCmp${_WORDFUNC_S} $R0 '' error1
- StrCpy $4 0
- StrCpy $5 0
- StrCpy $6 0
- StrLen $7 $0
- goto loop
-
- preloop:
- IntOp $6 $6 + 1
-
- loop:
- StrCpy $8 $R0 $7 $6
- StrCmp${_WORDFUNC_S} $8$5 0 error1
- StrCmp${_WORDFUNC_S} $8 '' +2
- StrCmp${_WORDFUNC_S} $8 $0 +5 preloop
- StrCmp${_WORDFUNC_S} $3 '{' minus
- StrCmp${_WORDFUNC_S} $3 '}' minus
- StrCmp${_WORDFUNC_S} $2 '*' minus
- StrCmp${_WORDFUNC_S} $5 $6 minus +5
- StrCmp${_WORDFUNC_S} $3 '{' +4
- StrCmp${_WORDFUNC_S} $3 '}' +3
- StrCmp${_WORDFUNC_S} $2 '*' +2
- StrCmp${_WORDFUNC_S} $5 $6 nextword
- IntOp $4 $4 + 1
- StrCmp${_WORDFUNC_S} $2$4 +$1 plus
- StrCmp${_WORDFUNC_S} $2 '/' 0 nextword
- IntOp $8 $6 - $5
- StrCpy $8 $R0 $8 $5
- StrCmp${_WORDFUNC_S} $1 $8 0 nextword
- StrCpy $R1 $4
- goto end
- nextword:
- IntOp $6 $6 + $7
- StrCpy $5 $6
- goto loop
-
- minus:
- StrCmp${_WORDFUNC_S} $2 '-' 0 sum
- StrCpy $2 '+'
- IntOp $1 $4 - $1
- IntOp $1 $1 + 1
- IntCmp $1 0 error2 error2 restart
- sum:
- StrCmp${_WORDFUNC_S} $2 '#' 0 sumdelim
- StrCpy $R1 $4
- goto end
- sumdelim:
- StrCmp${_WORDFUNC_S} $2 '*' 0 error2
- StrCpy $R1 $4
- goto end
-
- plus:
- StrCmp${_WORDFUNC_S} $3 '' 0 +4
- IntOp $6 $6 - $5
- StrCpy $R1 $R0 $6 $5
- goto end
- StrCmp${_WORDFUNC_S} $3 '{' 0 +3
- StrCpy $R1 $R0 $6
- goto end
- StrCmp${_WORDFUNC_S} $3 '}' 0 +4
- IntOp $6 $6 + $7
- StrCpy $R1 $R0 '' $6
- goto end
- StrCmp${_WORDFUNC_S} $3 '{*' +2
- StrCmp${_WORDFUNC_S} $3 '*{' 0 +3
- StrCpy $R1 $R0 $6
- goto end
- StrCmp${_WORDFUNC_S} $3 '*}' +2
- StrCmp${_WORDFUNC_S} $3 '}*' 0 +3
- StrCpy $R1 $R0 '' $5
- goto end
- StrCmp${_WORDFUNC_S} $3 '}}' 0 +3
- StrCpy $R1 $R0 '' $6
- goto end
- StrCmp${_WORDFUNC_S} $3 '{{' 0 +3
- StrCpy $R1 $R0 $5
- goto end
- StrCmp${_WORDFUNC_S} $3 '{}' 0 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 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 end
-
- error3:
- StrCpy $R1 3
- goto error
- error2:
- StrCpy $R1 2
- goto error
- error1:
- StrCpy $R1 1
- error:
- StrCmp $9 'E' 0 +3
- SetErrors
-
- end:
- StrCpy $R0 $R1
-
- Pop $R1
- Pop $9
- Pop $8
- Pop $7
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
- Exch $R0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro WordFind2X
- !ifndef ${_WORDFUNC_UN}WordFind2X${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}WordFind2X${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordFind2X${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}WordFind2X${_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 '#' restart
- StrCmp${_WORDFUNC_S} $3 '/' restart
- goto 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 error2
-
- restart:
- StrCmp${_WORDFUNC_S} $R0 '' error1
- StrCpy $5 -1
- StrCpy $6 0
- StrCpy $7 ''
- StrLen $8 $0
- StrLen $9 $1
-
- loop:
- IntOp $5 $5 + 1
-
- delim1:
- StrCpy $R1 $R0 $8 $5
- StrCmp${_WORDFUNC_S} $R1$6 0 error1
- StrCmp${_WORDFUNC_S} $R1 '' minus
- StrCmp${_WORDFUNC_S} $R1 $0 +2
- StrCmp${_WORDFUNC_S} $7 '' loop delim2
- StrCmp${_WORDFUNC_S} $0 $1 0 +2
- StrCmp${_WORDFUNC_S} $7 '' 0 delim2
- IntOp $7 $5 + $8
- StrCpy $5 $7
- goto delim1
-
- delim2:
- StrCpy $R1 $R0 $9 $5
- StrCmp${_WORDFUNC_S} $R1 $1 0 loop
- IntOp $6 $6 + 1
- StrCmp${_WORDFUNC_S} $3$6 '+$2' plus
- StrCmp${_WORDFUNC_S} $3 '/' 0 nextword
- IntOp $R1 $5 - $7
- StrCpy $R1 $R0 $R1 $7
- StrCmp${_WORDFUNC_S} $R1 $2 0 +3
- StrCpy $R1 $6
- goto end
- nextword:
- IntOp $5 $5 + $9
- StrCpy $7 ''
- goto delim1
-
- minus:
- StrCmp${_WORDFUNC_S} $3 '-' 0 sum
- StrCpy $3 +
- IntOp $2 $6 - $2
- IntOp $2 $2 + 1
- IntCmp $2 0 error2 error2 restart
- sum:
- StrCmp${_WORDFUNC_S} $3 '#' 0 error2
- StrCpy $R1 $6
- goto end
-
- plus:
- StrCmp${_WORDFUNC_S} $4 '' 0 +4
- IntOp $R1 $5 - $7
- StrCpy $R1 $R0 $R1 $7
- goto 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 end
- StrCmp${_WORDFUNC_S} $4 '*}' +2
- StrCmp${_WORDFUNC_S} $4 '}*' 0 +3
- StrCpy $R1 $R0 '' $7
- goto end
- StrCmp${_WORDFUNC_S} $4 '}}' 0 +3
- StrCpy $R1 $R0 '' $5
- goto end
- StrCmp${_WORDFUNC_S} $4 '{{' 0 +3
- StrCpy $R1 $R0 $7
- goto end
- StrCmp${_WORDFUNC_S} $4 '{}' 0 error3
- StrCpy $5 $R0 '' $5
- StrCpy $7 $R0 $7
- StrCpy $R1 '$7$5'
- goto end
-
- error3:
- StrCpy $R1 3
- goto error
- error2:
- StrCpy $R1 2
- goto error
- error1:
- StrCpy $R1 1
- error:
- StrCmp $R2 'E' 0 +3
- SetErrors
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro WordFind3X
- !ifndef ${_WORDFUNC_UN}WordFind3X${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}WordFind3X${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordFind3X${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}WordFind3X${_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 '#' restart
- StrCmp${_WORDFUNC_S} $4 '/' restart
- goto 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 error2
-
- restart:
- StrCmp${_WORDFUNC_S} $R0 '' error1
- StrCpy $6 -1
- StrCpy $7 0
- StrCpy $8 ''
- StrCpy $9 ''
- StrLen $R1 $0
- StrLen $R2 $1
- StrLen $R3 $2
-
- loop:
- IntOp $6 $6 + 1
-
- delim1:
- StrCpy $R4 $R0 $R1 $6
- StrCmp${_WORDFUNC_S} $R4$7 0 error1
- StrCmp${_WORDFUNC_S} $R4 '' minus
- StrCmp${_WORDFUNC_S} $R4 $0 +2
- StrCmp${_WORDFUNC_S} $8 '' loop center
- StrCmp${_WORDFUNC_S} $0 $1 +2
- StrCmp${_WORDFUNC_S} $0 $2 0 +2
- StrCmp${_WORDFUNC_S} $8 '' 0 center
- IntOp $8 $6 + $R1
- StrCpy $6 $8
- goto delim1
-
- center:
- StrCmp${_WORDFUNC_S} $9 '' 0 delim2
- StrCpy $R4 $R0 $R2 $6
- StrCmp${_WORDFUNC_S} $R4 $1 0 loop
- IntOp $9 $6 + $R2
- StrCpy $6 $9
- goto delim1
-
- delim2:
- StrCpy $R4 $R0 $R3 $6
- StrCmp${_WORDFUNC_S} $R4 $2 0 loop
- IntOp $7 $7 + 1
- StrCmp${_WORDFUNC_S} $4$7 '+$3' plus
- StrCmp${_WORDFUNC_S} $4 '/' 0 nextword
- IntOp $R4 $6 - $8
- StrCpy $R4 $R0 $R4 $8
- StrCmp${_WORDFUNC_S} $R4 $3 0 +3
- StrCpy $R4 $7
- goto end
- nextword:
- IntOp $6 $6 + $R3
- StrCpy $8 ''
- StrCpy $9 ''
- goto delim1
-
- minus:
- StrCmp${_WORDFUNC_S} $4 '-' 0 sum
- StrCpy $4 +
- IntOp $3 $7 - $3
- IntOp $3 $3 + 1
- IntCmp $3 0 error2 error2 restart
- sum:
- StrCmp${_WORDFUNC_S} $4 '#' 0 error2
- StrCpy $R4 $7
- goto end
-
- plus:
- StrCmp${_WORDFUNC_S} $5 '' 0 +4
- IntOp $R4 $6 - $8
- StrCpy $R4 $R0 $R4 $8
- goto 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 end
- StrCmp${_WORDFUNC_S} $5 '*}' +2
- StrCmp${_WORDFUNC_S} $5 '}*' 0 +3
- StrCpy $R4 $R0 '' $8
- goto end
- StrCmp${_WORDFUNC_S} $5 '}}' 0 +3
- StrCpy $R4 $R0 '' $6
- goto end
- StrCmp${_WORDFUNC_S} $5 '{{' 0 +3
- StrCpy $R4 $R0 $8
- goto end
- StrCmp${_WORDFUNC_S} $5 '{}' 0 error3
- StrCpy $6 $R0 '' $6
- StrCpy $8 $R0 $8
- StrCpy $R4 '$8$6'
- goto end
-
- error3:
- StrCpy $R4 3
- goto error
- error2:
- StrCpy $R4 2
- goto error
- error1:
- StrCpy $R4 1
- error:
- StrCmp $R5 'E' 0 +3
- SetErrors
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro WordReplace
- !ifndef ${_WORDFUNC_UN}WordReplace${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}WordReplace${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordReplace${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}WordReplace${_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 error1
- StrCmp${_WORDFUNC_S} $R0 '' error1
- StrCmp${_WORDFUNC_S} $3 '{' beginning
- StrCmp${_WORDFUNC_S} $3 '}' ending errorchk
-
- 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 merge
-
- ending:
- StrCpy $8 $R0 '' -$7
- StrCmp${_WORDFUNC_S} $8 $0 0 +4
- StrCpy $R0 $R0 -$7
- StrCpy $6 '$6$1'
- goto -4
-
- 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 end
-
- errorchk:
- StrCmp${_WORDFUNC_S} $3 '+' +2
- StrCmp${_WORDFUNC_S} $3 '-' 0 error3
-
- StrCpy $5 $2 1
- IntOp $2 $2 + 0
- StrCmp${_WORDFUNC_S} $2 0 0 one
- StrCmp${_WORDFUNC_S} $5 0 error2
- StrCpy $3 ''
-
- 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 error1
- StrCpy $R0 '$3$R0'
- goto 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 all
-
- one:
- StrCpy $5 0
- StrCpy $8 0
- goto loop
-
- preloop:
- IntOp $5 $5 + 1
-
- loop:
- StrCpy $6 $R0 $7 $5
- StrCmp${_WORDFUNC_S} $6$8 0 error1
- StrCmp${_WORDFUNC_S} $6 '' minus
- StrCmp${_WORDFUNC_S} $6 $0 0 preloop
- IntOp $8 $8 + 1
- StrCmp${_WORDFUNC_S} $3$8 +$2 found
- IntOp $5 $5 + $7
- goto loop
-
- minus:
- StrCmp${_WORDFUNC_S} $3 '-' 0 error2
- StrCpy $3 +
- IntOp $2 $8 - $2
- IntOp $2 $2 + 1
- IntCmp $2 0 error2 error2 one
-
- 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 end
-
- error3:
- StrCpy $R0 3
- goto error
- error2:
- StrCpy $R0 2
- goto error
- error1:
- StrCpy $R0 1
- error:
- StrCmp $9 'E' +3
- StrCpy $R0 $R1
- goto +2
- SetErrors
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro WordAdd
- !ifndef ${_WORDFUNC_UN}WordAdd${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !insertmacro WordFind
-
- !define ${_WORDFUNC_UN}WordAdd${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordAdd${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}WordAdd${_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 error3
-
- StrCmp${_WORDFUNC_S} $0 '' error1
- StrCmp${_WORDFUNC_S} $2 '' end
- StrCmp${_WORDFUNC_S} $R0 '' 0 +5
- StrCmp${_WORDFUNC_S} $1 '-' end
- StrCmp${_WORDFUNC_S} $1 '+' 0 +3
- StrCpy $R0 $2
- goto end
-
- loop:
- IntOp $5 $5 + 1
- Push `$2`
- Push `$0`
- Push `E+$5`
- Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
- Pop $3
- IfErrors 0 /word
- StrCmp${_WORDFUNC_S} $3 2 +4
- StrCmp${_WORDFUNC_S} $3$5 11 0 +3
- StrCpy $3 $2
- goto /word
- StrCmp${_WORDFUNC_S} $1 '-' end preend
-
- /word:
- Push `$R0`
- Push `$0`
- Push `E/$3`
- Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
- Pop $4
- IfErrors +2
- StrCmp${_WORDFUNC_S} $1 '-' delete loop
- StrCmp${_WORDFUNC_S} $1$4 '-1' +2
- StrCmp${_WORDFUNC_S} $1 '-' loop +4
- StrCmp${_WORDFUNC_S} $R0 $3 0 loop
- StrCpy $R0 ''
- goto end
- StrCmp${_WORDFUNC_S} $1$4 '+1' 0 +2
- StrCmp${_WORDFUNC_S} $R0 $3 loop
- StrCmp${_WORDFUNC_S} $R0 $R1 +3
- StrCpy $R1 '$R1$0$3'
- goto loop
- StrLen $6 $0
- StrCpy $6 $R0 '' -$6
- StrCmp${_WORDFUNC_S} $6 $0 0 -4
- StrCpy $R1 '$R1$3'
- goto loop
-
- delete:
- Push `$R0`
- Push `$0`
- Push `E+$4{}`
- Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
- Pop $R0
- goto /word
-
- error3:
- StrCpy $R1 3
- goto error
- error1:
- StrCpy $R1 1
- error:
- StrCmp $7 'E' 0 end
- SetErrors
-
- preend:
- StrCpy $R0 $R1
-
- end:
- Pop $R1
- Pop $7
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
- Exch $R0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro WordInsert
- !ifndef ${_WORDFUNC_UN}WordInsert${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !insertmacro WordFind
-
- !define ${_WORDFUNC_UN}WordInsert${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordInsert${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}WordInsert${_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 error3
- IntOp $2 $2 + 0
- StrCmp${_WORDFUNC_S} $2 0 error2
- StrCmp${_WORDFUNC_S} $0 '' error1
-
- StrCmp${_WORDFUNC_S} $2 1 0 two
- GetLabelAddress $8 oneback
- StrCmp${_WORDFUNC_S} $3 '+' call
- StrCpy $7 {
- goto call
- oneback:
- IfErrors 0 +2
- StrCpy $4 $R0
- StrCmp${_WORDFUNC_S} $3 '+' 0 +3
- StrCpy $R0 '$1$0$4'
- goto end
- StrCpy $R0 '$4$0$1'
- goto end
-
- two:
- IntOp $2 $2 - 1
- GetLabelAddress $8 twoback
- StrCmp${_WORDFUNC_S} $3 '+' 0 call
- StrCpy $7 {
- goto call
- twoback:
- IfErrors 0 tree
- StrCmp${_WORDFUNC_S} $2$4 11 0 error2
- StrCmp${_WORDFUNC_S} $3 '+' 0 +3
- StrCpy $R0 '$R0$0$1'
- goto end
- StrCpy $R0 '$1$0$R0'
- goto end
-
- tree:
- StrCpy $7 }
- StrCpy $5 $4
- IntOp $2 $2 + 1
- GetLabelAddress $8 treeback
- StrCmp${_WORDFUNC_S} $3 '+' call
- StrCpy $7 {
- goto call
- treeback:
- IfErrors 0 +3
- StrCpy $4 ''
- StrCpy $6 ''
- StrCmp${_WORDFUNC_S} $3 '+' 0 +3
- StrCpy $R0 '$5$0$1$6$4'
- goto end
- StrCpy $R0 '$4$6$1$0$5'
- goto end
-
- call:
- Push '$R0'
- Push '$0'
- Push 'E$3$2*$7'
- Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
- Pop $4
- goto $8
-
- error3:
- StrCpy $R0 3
- goto error
- error2:
- StrCpy $R0 2
- goto error
- error1:
- StrCpy $R0 1
- error:
- StrCmp $9 'E' +3
- StrCpy $R0 $R1
- goto +2
- SetErrors
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro StrFilter
- !ifndef ${_WORDFUNC_UN}StrFilter${_WORDFUNC_S}
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}StrFilter${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}StrFilter${_WORDFUNC_S}Call`
-
- Function ${_WORDFUNC_UN}StrFilter${_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 eng
- StrCmp $R2 rus rus
- eng:
- StrCpy $4 65
- StrCpy $5 90
- StrCpy $6 97
- StrCpy $7 122
- goto langend
- rus:
- StrCpy $4 192
- StrCpy $5 223
- StrCpy $6 224
- StrCpy $7 255
- goto langend
- ;...
-
- langend:
- StrCpy $R7 ''
- StrCpy $R8 ''
-
- StrCmp${_WORDFUNC_S} $2 '' 0 begin
-
- 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 '' filter error
-
- restart2:
- StrCmp${_WORDFUNC_S} $3 '' end
- StrCpy $R7 ''
- StrCpy $R8 '+-'
- goto begin
-
- filter:
- StrCmp${_WORDFUNC_S} $R7 '1' +3
- StrCmp${_WORDFUNC_S} $R7 '2' +2
- StrCmp${_WORDFUNC_S} $R7 '3' 0 error
-
- StrCmp${_WORDFUNC_S} $R8 '' begin
- StrCmp${_WORDFUNC_S} $R7$R8 '23' +2
- StrCmp${_WORDFUNC_S} $R7$R8 '32' 0 +3
- StrCpy $R7 -1
- goto begin
- StrCmp${_WORDFUNC_S} $R7$R8 '13' +2
- StrCmp${_WORDFUNC_S} $R7$R8 '31' 0 +3
- StrCpy $R7 -2
- goto begin
- StrCmp${_WORDFUNC_S} $R7$R8 '12' +2
- StrCmp${_WORDFUNC_S} $R7$R8 '21' 0 error
- StrCpy $R7 -3
-
- begin:
- StrCpy $R6 0
- StrCpy $R1 ''
-
- loop:
- StrCpy $R2 $R0 1 $R6
- StrCmp${_WORDFUNC_S} $R2 '' restartchk
-
- StrCmp${_WORDFUNC_S} $2 '' +7
- StrCpy $R4 0
- StrCpy $R5 $2 1 $R4
- StrCmp${_WORDFUNC_S} $R5 '' addsymbol
- StrCmp${_WORDFUNC_S} $R5 $R2 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 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 loop2
- StrCmp${_WORDFUNC_S} $R8 '+-' 0 +2
- StrCmp${_WORDFUNC_S} $3 '+' 0 +4
- StrCpy $R4 $4
- StrCpy $R5 $5
- goto loop2
- StrCpy $R4 $6
- StrCpy $R5 $7
-
- loop2:
- IntFmt $R3 '%c' $R4
- StrCmp $R2 $R3 found
- StrCmp $R4 $R5 notfound
- IntOp $R4 $R4 + 1
- goto loop2
-
- found:
- StrCmp${_WORDFUNC_S} $R8 '+-' setcase
- StrCmp${_WORDFUNC_S} $R7 '3' skipsymbol
- StrCmp${_WORDFUNC_S} $R7 '-3' addsymbol
- StrCmp${_WORDFUNC_S} $R8 '' addsymbol skipsymbol
-
- notfound:
- StrCmp${_WORDFUNC_S} $R8 '+-' addsymbol
- StrCmp${_WORDFUNC_S} $R7 '3' 0 +2
- StrCmp${_WORDFUNC_S} $R5 57 addsymbol +3
- StrCmp${_WORDFUNC_S} $R7 '-3' 0 +5
- StrCmp${_WORDFUNC_S} $R5 57 skipsymbol
- StrCpy $R4 48
- StrCpy $R5 57
- goto loop2
- StrCmp${_WORDFUNC_S} $R8 '' skipsymbol addsymbol
-
- setcase:
- StrCpy $R2 $R3
- addsymbol:
- StrCpy $R1 $R1$R2
- skipsymbol:
- IntOp $R6 $R6 + 1
- goto loop
-
- error:
- SetErrors
- StrCpy $R0 ''
- goto end
-
- restartchk:
- StrCpy $R0 $R1
- StrCmp${_WORDFUNC_S} $2 '' 0 restart1
- StrCmp${_WORDFUNC_S} $R8 '+-' 0 restart2
-
- 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
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro VersionCompare
- !ifndef ${_WORDFUNC_UN}VersionCompare
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}VersionCompare `!insertmacro ${_WORDFUNC_UN}VersionCompareCall`
-
- Function ${_WORDFUNC_UN}VersionCompare
- Exch $1
- Exch
- Exch $0
- Exch
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
- Push $7
-
- 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 '' 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 begin newer2
- StrCmp $5 0 newer1
- IntCmp $6 $7 0 newer1 newer2
-
- StrCpy $4 '1$4'
- StrCpy $5 '1$5'
- IntCmp $4 $5 begin newer2 newer1
-
- equal:
- StrCpy $0 0
- goto end
- newer1:
- StrCpy $0 1
- goto end
- newer2:
- StrCpy $0 2
-
- end:
- Pop $7
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro VersionConvert
- !ifndef ${_WORDFUNC_UN}VersionConvert
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !define ${_WORDFUNC_UN}VersionConvert `!insertmacro ${_WORDFUNC_UN}VersionConvertCall`
-
- Function ${_WORDFUNC_UN}VersionConvert
- 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 loop
-
- preloop:
- IntOp $2 $2 + 1
-
- loop:
- StrCpy $3 $0 1 $2
- StrCmp $3 '' endcheck
- StrCmp $3 '.' dot
- StrCmp $3 '0' digit
- IntCmp $3 '0' letter letter digit
-
- dot:
- StrCmp $7 'dot' replacespecial
- StrCpy $7 'dot'
- goto preloop
-
- digit:
- StrCmp $7 'letter' insertdot
- StrCpy $7 'digit'
- goto preloop
-
- letter:
- StrCpy $5 0
- StrCpy $4 $1 1 $5
- IntOp $5 $5 + 1
- StrCmp $4 '' 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 loop
-
- 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 loop
-
- insertdot:
- StrCpy $4 $0 $2
- StrCpy $0 $0 '' $2
- StrCpy $0 '$4.$0'
- StrCpy $7 'dot'
- goto preloop
-
- endcheck:
- StrCpy $4 $0 1 -1
- StrCmp $4 '.' 0 end
- StrCpy $0 $0 -1
- goto -3
-
- end:
- Pop $7
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-
-# Uninstall. Case insensitive. #
-
-!macro un.WordFindCall _STRING _DELIMITER _OPTION _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER}`
- Push `${_OPTION}`
- Call un.WordFind
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordFind2XCall _STRING _DELIMITER1 _DELIMITER2 _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER1}`
- Push `${_DELIMITER2}`
- Push `${_NUMBER}`
- Call un.WordFind2X
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordFind3XCall _STRING _DELIMITER1 _CENTER _DELIMITER2 _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER1}`
- Push `${_CENTER}`
- Push `${_DELIMITER2}`
- Push `${_NUMBER}`
- Call un.WordFind3X
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordReplaceCall _STRING _WORD1 _WORD2 _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_WORD1}`
- Push `${_WORD2}`
- Push `${_NUMBER}`
- Call un.WordReplace
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordAddCall _STRING1 _DELIMITER _STRING2 _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING1}`
- Push `${_DELIMITER}`
- Push `${_STRING2}`
- Call un.WordAdd
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordInsertCall _STRING _DELIMITER _WORD _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER}`
- Push `${_WORD}`
- Push `${_NUMBER}`
- Call un.WordInsert
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.StrFilterCall _STRING _FILTER _INCLUDE _EXCLUDE _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_FILTER}`
- Push `${_INCLUDE}`
- Push `${_EXCLUDE}`
- Call un.StrFilter
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.VersionCompareCall _VER1 _VER2 _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_VER1}`
- Push `${_VER2}`
- Call un.VersionCompare
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.VersionConvertCall _VERSION _CHARLIST _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_VERSION}`
- Push `${_CHARLIST}`
- Call un.VersionConvert
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-
-!macro un.WordFind
- !ifndef un.WordFind
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro WordFind
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordFind2X
- !ifndef un.WordFind2X
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro WordFind2X
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordFind3X
- !ifndef un.WordFind3X
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro WordFind3X
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordReplace
- !ifndef un.WordReplace
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro WordReplace
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordAdd
- !ifndef un.WordAdd
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro WordAdd
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordInsert
- !ifndef un.WordInsert
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro WordInsert
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.StrFilter
- !ifndef un.StrFilter
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro StrFilter
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.VersionCompare
- !ifndef un.VersionCompare
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro VersionCompare
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-!macro un.VersionConvert
- !ifndef un.VersionConvert
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
-
- !insertmacro VersionConvert
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !verbose pop
- !endif
-!macroend
-
-
-# Install. Case sensitive. #
-
-!macro WordFindSCall _STRING _DELIMITER _OPTION _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER}`
- Push `${_OPTION}`
- Call WordFindS
- 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}`
- Call WordFind2XS
- 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}`
- Call WordFind3XS
- 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}`
- Call WordReplaceS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro WordAddSCall _STRING1 _DELIMITER _STRING2 _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING1}`
- Push `${_DELIMITER}`
- Push `${_STRING2}`
- Call WordAddS
- 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}`
- Call WordInsertS
- 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}`
- Call StrFilterS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro WordFindS
- !ifndef WordFindS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordFind
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro WordFind2XS
- !ifndef WordFind2XS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordFind2X
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro WordFind3XS
- !ifndef WordFind3XS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordFind3X
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro WordReplaceS
- !ifndef WordReplaceS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordReplace
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro WordAddS
- !ifndef WordAddS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordAdd
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro WordInsertS
- !ifndef WordInsertS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordInsert
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro StrFilterS
- !ifndef StrFilterS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro StrFilter
-
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-
-# Uninstall. Case sensitive. #
-
-!macro un.WordFindSCall _STRING _DELIMITER _OPTION _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER}`
- Push `${_OPTION}`
- Call un.WordFindS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordFind2XSCall _STRING _DELIMITER1 _DELIMITER2 _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER1}`
- Push `${_DELIMITER2}`
- Push `${_NUMBER}`
- Call un.WordFind2XS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordFind3XSCall _STRING _DELIMITER1 _CENTER _DELIMITER2 _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER1}`
- Push `${_CENTER}`
- Push `${_DELIMITER2}`
- Push `${_NUMBER}`
- Call un.WordFind3XS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordReplaceSCall _STRING _WORD1 _WORD2 _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_WORD1}`
- Push `${_WORD2}`
- Push `${_NUMBER}`
- Call un.WordReplaceS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordAddSCall _STRING1 _DELIMITER _STRING2 _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING1}`
- Push `${_DELIMITER}`
- Push `${_STRING2}`
- Call un.WordAddS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordInsertSCall _STRING _DELIMITER _WORD _NUMBER _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_DELIMITER}`
- Push `${_WORD}`
- Push `${_NUMBER}`
- Call un.WordInsertS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.StrFilterSCall _STRING _FILTER _INCLUDE _EXCLUDE _RESULT
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- Push `${_STRING}`
- Push `${_FILTER}`
- Push `${_INCLUDE}`
- Push `${_EXCLUDE}`
- Call un.StrFilterS
- Pop ${_RESULT}
- !verbose pop
-!macroend
-
-!macro un.WordFindS
- !ifndef un.WordFindS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_S
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !define _WORDFUNC_S `S`
-
- !insertmacro WordFind
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordFind2XS
- !ifndef un.WordFind2XS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordFind2X
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordFind3XS
- !ifndef un.WordFind3XS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordFind3X
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordReplaceS
- !ifndef un.WordReplaceS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordReplace
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordAddS
- !ifndef un.WordAddS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordAdd
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.WordInsertS
- !ifndef un.WordInsertS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro WordInsert
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!macro un.StrFilterS
- !ifndef un.StrFilterS
- !verbose push
- !verbose ${_WORDFUNC_VERBOSE}
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN `un.`
- !undef _WORDFUNC_S
- !define _WORDFUNC_S `S`
-
- !insertmacro StrFilter
-
- !undef _WORDFUNC_UN
- !define _WORDFUNC_UN
- !undef _WORDFUNC_S
- !define _WORDFUNC_S
- !verbose pop
- !endif
-!macroend
-
-!endif
+/*
+_____________________________________________________________________________
+
+ 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. !insertmacro WordFunction
+ 3. [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]
+
+ un.WordFunction=[un.WordFind|un.WordFindS|un.WordFind2X|un.WordFind2XS|
+ un.WordFind3X|un.WordFind3XS|un.WordReplace|un.WordReplaceS|
+ un.WordAdd|un.WordAddS|un.WordInsert|un.WordInsertS|
+ un.StrFilter|un.StrFilterS|un.VersionCompare|un.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
+!define WORDFUNC_INCLUDED
+
+!verbose push
+!verbose 3
+!ifndef _WORDFUNC_VERBOSE
+ !define _WORDFUNC_VERBOSE 3
+!endif
+!verbose ${_WORDFUNC_VERBOSE}
+!define WORDFUNC_VERBOSE `!insertmacro WORDFUNC_VERBOSE`
+!define _WORDFUNC_UN
+!define _WORDFUNC_S
+!verbose pop
+
+!macro WORDFUNC_VERBOSE _VERBOSE
+ !verbose push
+ !verbose 3
+ !undef _WORDFUNC_VERBOSE
+ !define _WORDFUNC_VERBOSE ${_VERBOSE}
+ !verbose pop
+!macroend
+
+
+# Install. Case insensitive. #
+
+!macro WordFindCall _STRING _DELIMITER _OPTION _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_OPTION}`
+ Call WordFind
+ 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}`
+ Call WordFind2X
+ 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}`
+ Call WordFind3X
+ 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}`
+ Call WordReplace
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordAddCall _STRING1 _DELIMITER _STRING2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING1}`
+ Push `${_DELIMITER}`
+ Push `${_STRING2}`
+ Call WordAdd
+ 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}`
+ Call WordInsert
+ 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}`
+ Call StrFilter
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro VersionCompareCall _VER1 _VER2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_VER1}`
+ Push `${_VER2}`
+ Call VersionCompare
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro VersionConvertCall _VERSION _CHARLIST _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_VERSION}`
+ Push `${_CHARLIST}`
+ Call VersionConvert
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFind
+ !ifndef ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}WordFind${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}WordFind${_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
+ 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 '/' restart
+ StrCmp${_WORDFUNC_S} $2 '#' restart
+ StrCmp${_WORDFUNC_S} $2 '*' restart
+ goto 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 '*' error3
+ StrCmp${_WORDFUNC_S} $3 '**' error3
+ StrCmp${_WORDFUNC_S} $3 '}{' error3
+ IntOp $1 $1 + 0
+ StrCmp${_WORDFUNC_S} $1 0 error2
+
+ restart:
+ StrCmp${_WORDFUNC_S} $R0 '' error1
+ StrCpy $4 0
+ StrCpy $5 0
+ StrCpy $6 0
+ StrLen $7 $0
+ goto loop
+
+ preloop:
+ IntOp $6 $6 + 1
+
+ loop:
+ StrCpy $8 $R0 $7 $6
+ StrCmp${_WORDFUNC_S} $8$5 0 error1
+ StrCmp${_WORDFUNC_S} $8 '' +2
+ StrCmp${_WORDFUNC_S} $8 $0 +5 preloop
+ StrCmp${_WORDFUNC_S} $3 '{' minus
+ StrCmp${_WORDFUNC_S} $3 '}' minus
+ StrCmp${_WORDFUNC_S} $2 '*' minus
+ StrCmp${_WORDFUNC_S} $5 $6 minus +5
+ StrCmp${_WORDFUNC_S} $3 '{' +4
+ StrCmp${_WORDFUNC_S} $3 '}' +3
+ StrCmp${_WORDFUNC_S} $2 '*' +2
+ StrCmp${_WORDFUNC_S} $5 $6 nextword
+ IntOp $4 $4 + 1
+ StrCmp${_WORDFUNC_S} $2$4 +$1 plus
+ StrCmp${_WORDFUNC_S} $2 '/' 0 nextword
+ IntOp $8 $6 - $5
+ StrCpy $8 $R0 $8 $5
+ StrCmp${_WORDFUNC_S} $1 $8 0 nextword
+ StrCpy $R1 $4
+ goto end
+ nextword:
+ IntOp $6 $6 + $7
+ StrCpy $5 $6
+ goto loop
+
+ minus:
+ StrCmp${_WORDFUNC_S} $2 '-' 0 sum
+ StrCpy $2 '+'
+ IntOp $1 $4 - $1
+ IntOp $1 $1 + 1
+ IntCmp $1 0 error2 error2 restart
+ sum:
+ StrCmp${_WORDFUNC_S} $2 '#' 0 sumdelim
+ StrCpy $R1 $4
+ goto end
+ sumdelim:
+ StrCmp${_WORDFUNC_S} $2 '*' 0 error2
+ StrCpy $R1 $4
+ goto end
+
+ plus:
+ StrCmp${_WORDFUNC_S} $3 '' 0 +4
+ IntOp $6 $6 - $5
+ StrCpy $R1 $R0 $6 $5
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '{' 0 +3
+ StrCpy $R1 $R0 $6
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '}' 0 +4
+ IntOp $6 $6 + $7
+ StrCpy $R1 $R0 '' $6
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '{*' +2
+ StrCmp${_WORDFUNC_S} $3 '*{' 0 +3
+ StrCpy $R1 $R0 $6
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '*}' +2
+ StrCmp${_WORDFUNC_S} $3 '}*' 0 +3
+ StrCpy $R1 $R0 '' $5
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '}}' 0 +3
+ StrCpy $R1 $R0 '' $6
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '{{' 0 +3
+ StrCpy $R1 $R0 $5
+ goto end
+ StrCmp${_WORDFUNC_S} $3 '{}' 0 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 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 end
+
+ error3:
+ StrCpy $R1 3
+ goto error
+ error2:
+ StrCpy $R1 2
+ goto error
+ error1:
+ StrCpy $R1 1
+ error:
+ StrCmp $9 'E' 0 +3
+ SetErrors
+
+ end:
+ StrCpy $R0 $R1
+
+ Pop $R1
+ Pop $9
+ Pop $8
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordFind2X
+ !ifndef ${_WORDFUNC_UN}WordFind2X${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}WordFind2X${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordFind2X${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}WordFind2X${_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 '#' restart
+ StrCmp${_WORDFUNC_S} $3 '/' restart
+ goto 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 error2
+
+ restart:
+ StrCmp${_WORDFUNC_S} $R0 '' error1
+ StrCpy $5 -1
+ StrCpy $6 0
+ StrCpy $7 ''
+ StrLen $8 $0
+ StrLen $9 $1
+
+ loop:
+ IntOp $5 $5 + 1
+
+ delim1:
+ StrCpy $R1 $R0 $8 $5
+ StrCmp${_WORDFUNC_S} $R1$6 0 error1
+ StrCmp${_WORDFUNC_S} $R1 '' minus
+ StrCmp${_WORDFUNC_S} $R1 $0 +2
+ StrCmp${_WORDFUNC_S} $7 '' loop delim2
+ StrCmp${_WORDFUNC_S} $0 $1 0 +2
+ StrCmp${_WORDFUNC_S} $7 '' 0 delim2
+ IntOp $7 $5 + $8
+ StrCpy $5 $7
+ goto delim1
+
+ delim2:
+ StrCpy $R1 $R0 $9 $5
+ StrCmp${_WORDFUNC_S} $R1 $1 0 loop
+ IntOp $6 $6 + 1
+ StrCmp${_WORDFUNC_S} $3$6 '+$2' plus
+ StrCmp${_WORDFUNC_S} $3 '/' 0 nextword
+ IntOp $R1 $5 - $7
+ StrCpy $R1 $R0 $R1 $7
+ StrCmp${_WORDFUNC_S} $R1 $2 0 +3
+ StrCpy $R1 $6
+ goto end
+ nextword:
+ IntOp $5 $5 + $9
+ StrCpy $7 ''
+ goto delim1
+
+ minus:
+ StrCmp${_WORDFUNC_S} $3 '-' 0 sum
+ StrCpy $3 +
+ IntOp $2 $6 - $2
+ IntOp $2 $2 + 1
+ IntCmp $2 0 error2 error2 restart
+ sum:
+ StrCmp${_WORDFUNC_S} $3 '#' 0 error2
+ StrCpy $R1 $6
+ goto end
+
+ plus:
+ StrCmp${_WORDFUNC_S} $4 '' 0 +4
+ IntOp $R1 $5 - $7
+ StrCpy $R1 $R0 $R1 $7
+ goto 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 end
+ StrCmp${_WORDFUNC_S} $4 '*}' +2
+ StrCmp${_WORDFUNC_S} $4 '}*' 0 +3
+ StrCpy $R1 $R0 '' $7
+ goto end
+ StrCmp${_WORDFUNC_S} $4 '}}' 0 +3
+ StrCpy $R1 $R0 '' $5
+ goto end
+ StrCmp${_WORDFUNC_S} $4 '{{' 0 +3
+ StrCpy $R1 $R0 $7
+ goto end
+ StrCmp${_WORDFUNC_S} $4 '{}' 0 error3
+ StrCpy $5 $R0 '' $5
+ StrCpy $7 $R0 $7
+ StrCpy $R1 '$7$5'
+ goto end
+
+ error3:
+ StrCpy $R1 3
+ goto error
+ error2:
+ StrCpy $R1 2
+ goto error
+ error1:
+ StrCpy $R1 1
+ error:
+ StrCmp $R2 'E' 0 +3
+ SetErrors
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordFind3X
+ !ifndef ${_WORDFUNC_UN}WordFind3X${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}WordFind3X${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordFind3X${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}WordFind3X${_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 '#' restart
+ StrCmp${_WORDFUNC_S} $4 '/' restart
+ goto 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 error2
+
+ restart:
+ StrCmp${_WORDFUNC_S} $R0 '' error1
+ StrCpy $6 -1
+ StrCpy $7 0
+ StrCpy $8 ''
+ StrCpy $9 ''
+ StrLen $R1 $0
+ StrLen $R2 $1
+ StrLen $R3 $2
+
+ loop:
+ IntOp $6 $6 + 1
+
+ delim1:
+ StrCpy $R4 $R0 $R1 $6
+ StrCmp${_WORDFUNC_S} $R4$7 0 error1
+ StrCmp${_WORDFUNC_S} $R4 '' minus
+ StrCmp${_WORDFUNC_S} $R4 $0 +2
+ StrCmp${_WORDFUNC_S} $8 '' loop center
+ StrCmp${_WORDFUNC_S} $0 $1 +2
+ StrCmp${_WORDFUNC_S} $0 $2 0 +2
+ StrCmp${_WORDFUNC_S} $8 '' 0 center
+ IntOp $8 $6 + $R1
+ StrCpy $6 $8
+ goto delim1
+
+ center:
+ StrCmp${_WORDFUNC_S} $9 '' 0 delim2
+ StrCpy $R4 $R0 $R2 $6
+ StrCmp${_WORDFUNC_S} $R4 $1 0 loop
+ IntOp $9 $6 + $R2
+ StrCpy $6 $9
+ goto delim1
+
+ delim2:
+ StrCpy $R4 $R0 $R3 $6
+ StrCmp${_WORDFUNC_S} $R4 $2 0 loop
+ IntOp $7 $7 + 1
+ StrCmp${_WORDFUNC_S} $4$7 '+$3' plus
+ StrCmp${_WORDFUNC_S} $4 '/' 0 nextword
+ IntOp $R4 $6 - $8
+ StrCpy $R4 $R0 $R4 $8
+ StrCmp${_WORDFUNC_S} $R4 $3 0 +3
+ StrCpy $R4 $7
+ goto end
+ nextword:
+ IntOp $6 $6 + $R3
+ StrCpy $8 ''
+ StrCpy $9 ''
+ goto delim1
+
+ minus:
+ StrCmp${_WORDFUNC_S} $4 '-' 0 sum
+ StrCpy $4 +
+ IntOp $3 $7 - $3
+ IntOp $3 $3 + 1
+ IntCmp $3 0 error2 error2 restart
+ sum:
+ StrCmp${_WORDFUNC_S} $4 '#' 0 error2
+ StrCpy $R4 $7
+ goto end
+
+ plus:
+ StrCmp${_WORDFUNC_S} $5 '' 0 +4
+ IntOp $R4 $6 - $8
+ StrCpy $R4 $R0 $R4 $8
+ goto 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 end
+ StrCmp${_WORDFUNC_S} $5 '*}' +2
+ StrCmp${_WORDFUNC_S} $5 '}*' 0 +3
+ StrCpy $R4 $R0 '' $8
+ goto end
+ StrCmp${_WORDFUNC_S} $5 '}}' 0 +3
+ StrCpy $R4 $R0 '' $6
+ goto end
+ StrCmp${_WORDFUNC_S} $5 '{{' 0 +3
+ StrCpy $R4 $R0 $8
+ goto end
+ StrCmp${_WORDFUNC_S} $5 '{}' 0 error3
+ StrCpy $6 $R0 '' $6
+ StrCpy $8 $R0 $8
+ StrCpy $R4 '$8$6'
+ goto end
+
+ error3:
+ StrCpy $R4 3
+ goto error
+ error2:
+ StrCpy $R4 2
+ goto error
+ error1:
+ StrCpy $R4 1
+ error:
+ StrCmp $R5 'E' 0 +3
+ SetErrors
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordReplace
+ !ifndef ${_WORDFUNC_UN}WordReplace${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}WordReplace${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordReplace${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}WordReplace${_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 error1
+ StrCmp${_WORDFUNC_S} $R0 '' error1
+ StrCmp${_WORDFUNC_S} $3 '{' beginning
+ StrCmp${_WORDFUNC_S} $3 '}' ending errorchk
+
+ 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 merge
+
+ ending:
+ StrCpy $8 $R0 '' -$7
+ StrCmp${_WORDFUNC_S} $8 $0 0 +4
+ StrCpy $R0 $R0 -$7
+ StrCpy $6 '$6$1'
+ goto -4
+
+ 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 end
+
+ errorchk:
+ StrCmp${_WORDFUNC_S} $3 '+' +2
+ StrCmp${_WORDFUNC_S} $3 '-' 0 error3
+
+ StrCpy $5 $2 1
+ IntOp $2 $2 + 0
+ StrCmp${_WORDFUNC_S} $2 0 0 one
+ StrCmp${_WORDFUNC_S} $5 0 error2
+ StrCpy $3 ''
+
+ 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 error1
+ StrCpy $R0 '$3$R0'
+ goto 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 all
+
+ one:
+ StrCpy $5 0
+ StrCpy $8 0
+ goto loop
+
+ preloop:
+ IntOp $5 $5 + 1
+
+ loop:
+ StrCpy $6 $R0 $7 $5
+ StrCmp${_WORDFUNC_S} $6$8 0 error1
+ StrCmp${_WORDFUNC_S} $6 '' minus
+ StrCmp${_WORDFUNC_S} $6 $0 0 preloop
+ IntOp $8 $8 + 1
+ StrCmp${_WORDFUNC_S} $3$8 +$2 found
+ IntOp $5 $5 + $7
+ goto loop
+
+ minus:
+ StrCmp${_WORDFUNC_S} $3 '-' 0 error2
+ StrCpy $3 +
+ IntOp $2 $8 - $2
+ IntOp $2 $2 + 1
+ IntCmp $2 0 error2 error2 one
+
+ 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 end
+
+ error3:
+ StrCpy $R0 3
+ goto error
+ error2:
+ StrCpy $R0 2
+ goto error
+ error1:
+ StrCpy $R0 1
+ error:
+ StrCmp $9 'E' +3
+ StrCpy $R0 $R1
+ goto +2
+ SetErrors
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordAdd
+ !ifndef ${_WORDFUNC_UN}WordAdd${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !insertmacro WordFind
+
+ !define ${_WORDFUNC_UN}WordAdd${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordAdd${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}WordAdd${_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 error3
+
+ StrCmp${_WORDFUNC_S} $0 '' error1
+ StrCmp${_WORDFUNC_S} $2 '' end
+ StrCmp${_WORDFUNC_S} $R0 '' 0 +5
+ StrCmp${_WORDFUNC_S} $1 '-' end
+ StrCmp${_WORDFUNC_S} $1 '+' 0 +3
+ StrCpy $R0 $2
+ goto end
+
+ loop:
+ IntOp $5 $5 + 1
+ Push `$2`
+ Push `$0`
+ Push `E+$5`
+ Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
+ Pop $3
+ IfErrors 0 /word
+ StrCmp${_WORDFUNC_S} $3 2 +4
+ StrCmp${_WORDFUNC_S} $3$5 11 0 +3
+ StrCpy $3 $2
+ goto /word
+ StrCmp${_WORDFUNC_S} $1 '-' end preend
+
+ /word:
+ Push `$R0`
+ Push `$0`
+ Push `E/$3`
+ Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
+ Pop $4
+ IfErrors +2
+ StrCmp${_WORDFUNC_S} $1 '-' delete loop
+ StrCmp${_WORDFUNC_S} $1$4 '-1' +2
+ StrCmp${_WORDFUNC_S} $1 '-' loop +4
+ StrCmp${_WORDFUNC_S} $R0 $3 0 loop
+ StrCpy $R0 ''
+ goto end
+ StrCmp${_WORDFUNC_S} $1$4 '+1' 0 +2
+ StrCmp${_WORDFUNC_S} $R0 $3 loop
+ StrCmp${_WORDFUNC_S} $R0 $R1 +3
+ StrCpy $R1 '$R1$0$3'
+ goto loop
+ StrLen $6 $0
+ StrCpy $6 $R0 '' -$6
+ StrCmp${_WORDFUNC_S} $6 $0 0 -4
+ StrCpy $R1 '$R1$3'
+ goto loop
+
+ delete:
+ Push `$R0`
+ Push `$0`
+ Push `E+$4{}`
+ Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
+ Pop $R0
+ goto /word
+
+ error3:
+ StrCpy $R1 3
+ goto error
+ error1:
+ StrCpy $R1 1
+ error:
+ StrCmp $7 'E' 0 end
+ SetErrors
+
+ preend:
+ StrCpy $R0 $R1
+
+ end:
+ Pop $R1
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+ Exch $R0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordInsert
+ !ifndef ${_WORDFUNC_UN}WordInsert${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !insertmacro WordFind
+
+ !define ${_WORDFUNC_UN}WordInsert${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}WordInsert${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}WordInsert${_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 error3
+ IntOp $2 $2 + 0
+ StrCmp${_WORDFUNC_S} $2 0 error2
+ StrCmp${_WORDFUNC_S} $0 '' error1
+
+ StrCmp${_WORDFUNC_S} $2 1 0 two
+ GetLabelAddress $8 oneback
+ StrCmp${_WORDFUNC_S} $3 '+' call
+ StrCpy $7 {
+ goto call
+ oneback:
+ IfErrors 0 +2
+ StrCpy $4 $R0
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +3
+ StrCpy $R0 '$1$0$4'
+ goto end
+ StrCpy $R0 '$4$0$1'
+ goto end
+
+ two:
+ IntOp $2 $2 - 1
+ GetLabelAddress $8 twoback
+ StrCmp${_WORDFUNC_S} $3 '+' 0 call
+ StrCpy $7 {
+ goto call
+ twoback:
+ IfErrors 0 tree
+ StrCmp${_WORDFUNC_S} $2$4 11 0 error2
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +3
+ StrCpy $R0 '$R0$0$1'
+ goto end
+ StrCpy $R0 '$1$0$R0'
+ goto end
+
+ tree:
+ StrCpy $7 }
+ StrCpy $5 $4
+ IntOp $2 $2 + 1
+ GetLabelAddress $8 treeback
+ StrCmp${_WORDFUNC_S} $3 '+' call
+ StrCpy $7 {
+ goto call
+ treeback:
+ IfErrors 0 +3
+ StrCpy $4 ''
+ StrCpy $6 ''
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +3
+ StrCpy $R0 '$5$0$1$6$4'
+ goto end
+ StrCpy $R0 '$4$6$1$0$5'
+ goto end
+
+ call:
+ Push '$R0'
+ Push '$0'
+ Push 'E$3$2*$7'
+ Call ${_WORDFUNC_UN}WordFind${_WORDFUNC_S}
+ Pop $4
+ goto $8
+
+ error3:
+ StrCpy $R0 3
+ goto error
+ error2:
+ StrCpy $R0 2
+ goto error
+ error1:
+ StrCpy $R0 1
+ error:
+ StrCmp $9 'E' +3
+ StrCpy $R0 $R1
+ goto +2
+ SetErrors
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro StrFilter
+ !ifndef ${_WORDFUNC_UN}StrFilter${_WORDFUNC_S}
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}StrFilter${_WORDFUNC_S} `!insertmacro ${_WORDFUNC_UN}StrFilter${_WORDFUNC_S}Call`
+
+ Function ${_WORDFUNC_UN}StrFilter${_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 eng
+ StrCmp $R2 rus rus
+ eng:
+ StrCpy $4 65
+ StrCpy $5 90
+ StrCpy $6 97
+ StrCpy $7 122
+ goto langend
+ rus:
+ StrCpy $4 192
+ StrCpy $5 223
+ StrCpy $6 224
+ StrCpy $7 255
+ goto langend
+ ;...
+
+ langend:
+ StrCpy $R7 ''
+ StrCpy $R8 ''
+
+ StrCmp${_WORDFUNC_S} $2 '' 0 begin
+
+ 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 '' filter error
+
+ restart2:
+ StrCmp${_WORDFUNC_S} $3 '' end
+ StrCpy $R7 ''
+ StrCpy $R8 '+-'
+ goto begin
+
+ filter:
+ StrCmp${_WORDFUNC_S} $R7 '1' +3
+ StrCmp${_WORDFUNC_S} $R7 '2' +2
+ StrCmp${_WORDFUNC_S} $R7 '3' 0 error
+
+ StrCmp${_WORDFUNC_S} $R8 '' begin
+ StrCmp${_WORDFUNC_S} $R7$R8 '23' +2
+ StrCmp${_WORDFUNC_S} $R7$R8 '32' 0 +3
+ StrCpy $R7 -1
+ goto begin
+ StrCmp${_WORDFUNC_S} $R7$R8 '13' +2
+ StrCmp${_WORDFUNC_S} $R7$R8 '31' 0 +3
+ StrCpy $R7 -2
+ goto begin
+ StrCmp${_WORDFUNC_S} $R7$R8 '12' +2
+ StrCmp${_WORDFUNC_S} $R7$R8 '21' 0 error
+ StrCpy $R7 -3
+
+ begin:
+ StrCpy $R6 0
+ StrCpy $R1 ''
+
+ loop:
+ StrCpy $R2 $R0 1 $R6
+ StrCmp${_WORDFUNC_S} $R2 '' restartchk
+
+ StrCmp${_WORDFUNC_S} $2 '' +7
+ StrCpy $R4 0
+ StrCpy $R5 $2 1 $R4
+ StrCmp${_WORDFUNC_S} $R5 '' addsymbol
+ StrCmp${_WORDFUNC_S} $R5 $R2 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 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 loop2
+ StrCmp${_WORDFUNC_S} $R8 '+-' 0 +2
+ StrCmp${_WORDFUNC_S} $3 '+' 0 +4
+ StrCpy $R4 $4
+ StrCpy $R5 $5
+ goto loop2
+ StrCpy $R4 $6
+ StrCpy $R5 $7
+
+ loop2:
+ IntFmt $R3 '%c' $R4
+ StrCmp $R2 $R3 found
+ StrCmp $R4 $R5 notfound
+ IntOp $R4 $R4 + 1
+ goto loop2
+
+ found:
+ StrCmp${_WORDFUNC_S} $R8 '+-' setcase
+ StrCmp${_WORDFUNC_S} $R7 '3' skipsymbol
+ StrCmp${_WORDFUNC_S} $R7 '-3' addsymbol
+ StrCmp${_WORDFUNC_S} $R8 '' addsymbol skipsymbol
+
+ notfound:
+ StrCmp${_WORDFUNC_S} $R8 '+-' addsymbol
+ StrCmp${_WORDFUNC_S} $R7 '3' 0 +2
+ StrCmp${_WORDFUNC_S} $R5 57 addsymbol +3
+ StrCmp${_WORDFUNC_S} $R7 '-3' 0 +5
+ StrCmp${_WORDFUNC_S} $R5 57 skipsymbol
+ StrCpy $R4 48
+ StrCpy $R5 57
+ goto loop2
+ StrCmp${_WORDFUNC_S} $R8 '' skipsymbol addsymbol
+
+ setcase:
+ StrCpy $R2 $R3
+ addsymbol:
+ StrCpy $R1 $R1$R2
+ skipsymbol:
+ IntOp $R6 $R6 + 1
+ goto loop
+
+ error:
+ SetErrors
+ StrCpy $R0 ''
+ goto end
+
+ restartchk:
+ StrCpy $R0 $R1
+ StrCmp${_WORDFUNC_S} $2 '' 0 restart1
+ StrCmp${_WORDFUNC_S} $R8 '+-' 0 restart2
+
+ 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
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro VersionCompare
+ !ifndef ${_WORDFUNC_UN}VersionCompare
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}VersionCompare `!insertmacro ${_WORDFUNC_UN}VersionCompareCall`
+
+ Function ${_WORDFUNC_UN}VersionCompare
+ Exch $1
+ Exch
+ Exch $0
+ Exch
+ Push $2
+ Push $3
+ Push $4
+ Push $5
+ Push $6
+ Push $7
+
+ 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 '' 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 begin newer2
+ StrCmp $5 0 newer1
+ IntCmp $6 $7 0 newer1 newer2
+
+ StrCpy $4 '1$4'
+ StrCpy $5 '1$5'
+ IntCmp $4 $5 begin newer2 newer1
+
+ equal:
+ StrCpy $0 0
+ goto end
+ newer1:
+ StrCpy $0 1
+ goto end
+ newer2:
+ StrCpy $0 2
+
+ end:
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro VersionConvert
+ !ifndef ${_WORDFUNC_UN}VersionConvert
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !define ${_WORDFUNC_UN}VersionConvert `!insertmacro ${_WORDFUNC_UN}VersionConvertCall`
+
+ Function ${_WORDFUNC_UN}VersionConvert
+ 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 loop
+
+ preloop:
+ IntOp $2 $2 + 1
+
+ loop:
+ StrCpy $3 $0 1 $2
+ StrCmp $3 '' endcheck
+ StrCmp $3 '.' dot
+ StrCmp $3 '0' digit
+ IntCmp $3 '0' letter letter digit
+
+ dot:
+ StrCmp $7 'dot' replacespecial
+ StrCpy $7 'dot'
+ goto preloop
+
+ digit:
+ StrCmp $7 'letter' insertdot
+ StrCpy $7 'digit'
+ goto preloop
+
+ letter:
+ StrCpy $5 0
+ StrCpy $4 $1 1 $5
+ IntOp $5 $5 + 1
+ StrCmp $4 '' 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 loop
+
+ 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 loop
+
+ insertdot:
+ StrCpy $4 $0 $2
+ StrCpy $0 $0 '' $2
+ StrCpy $0 '$4.$0'
+ StrCpy $7 'dot'
+ goto preloop
+
+ endcheck:
+ StrCpy $4 $0 1 -1
+ StrCmp $4 '.' 0 end
+ StrCpy $0 $0 -1
+ goto -3
+
+ end:
+ Pop $7
+ Pop $6
+ Pop $5
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+
+# Uninstall. Case insensitive. #
+
+!macro un.WordFindCall _STRING _DELIMITER _OPTION _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_OPTION}`
+ Call un.WordFind
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordFind2XCall _STRING _DELIMITER1 _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ Call un.WordFind2X
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordFind3XCall _STRING _DELIMITER1 _CENTER _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_CENTER}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ Call un.WordFind3X
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordReplaceCall _STRING _WORD1 _WORD2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_WORD1}`
+ Push `${_WORD2}`
+ Push `${_NUMBER}`
+ Call un.WordReplace
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordAddCall _STRING1 _DELIMITER _STRING2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING1}`
+ Push `${_DELIMITER}`
+ Push `${_STRING2}`
+ Call un.WordAdd
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordInsertCall _STRING _DELIMITER _WORD _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_WORD}`
+ Push `${_NUMBER}`
+ Call un.WordInsert
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.StrFilterCall _STRING _FILTER _INCLUDE _EXCLUDE _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_FILTER}`
+ Push `${_INCLUDE}`
+ Push `${_EXCLUDE}`
+ Call un.StrFilter
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.VersionCompareCall _VER1 _VER2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_VER1}`
+ Push `${_VER2}`
+ Call un.VersionCompare
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.VersionConvertCall _VERSION _CHARLIST _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_VERSION}`
+ Push `${_CHARLIST}`
+ Call un.VersionConvert
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+
+!macro un.WordFind
+ !ifndef un.WordFind
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro WordFind
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordFind2X
+ !ifndef un.WordFind2X
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro WordFind2X
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordFind3X
+ !ifndef un.WordFind3X
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro WordFind3X
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordReplace
+ !ifndef un.WordReplace
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro WordReplace
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordAdd
+ !ifndef un.WordAdd
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro WordAdd
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordInsert
+ !ifndef un.WordInsert
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro WordInsert
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.StrFilter
+ !ifndef un.StrFilter
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro StrFilter
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.VersionCompare
+ !ifndef un.VersionCompare
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro VersionCompare
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.VersionConvert
+ !ifndef un.VersionConvert
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+
+ !insertmacro VersionConvert
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
+
+# Install. Case sensitive. #
+
+!macro WordFindSCall _STRING _DELIMITER _OPTION _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_OPTION}`
+ Call WordFindS
+ 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}`
+ Call WordFind2XS
+ 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}`
+ Call WordFind3XS
+ 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}`
+ Call WordReplaceS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordAddSCall _STRING1 _DELIMITER _STRING2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING1}`
+ Push `${_DELIMITER}`
+ Push `${_STRING2}`
+ Call WordAddS
+ 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}`
+ Call WordInsertS
+ 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}`
+ Call StrFilterS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro WordFindS
+ !ifndef WordFindS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordFind
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordFind2XS
+ !ifndef WordFind2XS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordFind2X
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordFind3XS
+ !ifndef WordFind3XS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordFind3X
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordReplaceS
+ !ifndef WordReplaceS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordReplace
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordAddS
+ !ifndef WordAddS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordAdd
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro WordInsertS
+ !ifndef WordInsertS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordInsert
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro StrFilterS
+ !ifndef StrFilterS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro StrFilter
+
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+
+# Uninstall. Case sensitive. #
+
+!macro un.WordFindSCall _STRING _DELIMITER _OPTION _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_OPTION}`
+ Call un.WordFindS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordFind2XSCall _STRING _DELIMITER1 _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ Call un.WordFind2XS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordFind3XSCall _STRING _DELIMITER1 _CENTER _DELIMITER2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER1}`
+ Push `${_CENTER}`
+ Push `${_DELIMITER2}`
+ Push `${_NUMBER}`
+ Call un.WordFind3XS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordReplaceSCall _STRING _WORD1 _WORD2 _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_WORD1}`
+ Push `${_WORD2}`
+ Push `${_NUMBER}`
+ Call un.WordReplaceS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordAddSCall _STRING1 _DELIMITER _STRING2 _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING1}`
+ Push `${_DELIMITER}`
+ Push `${_STRING2}`
+ Call un.WordAddS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordInsertSCall _STRING _DELIMITER _WORD _NUMBER _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_DELIMITER}`
+ Push `${_WORD}`
+ Push `${_NUMBER}`
+ Call un.WordInsertS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.StrFilterSCall _STRING _FILTER _INCLUDE _EXCLUDE _RESULT
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ Push `${_STRING}`
+ Push `${_FILTER}`
+ Push `${_INCLUDE}`
+ Push `${_EXCLUDE}`
+ Call un.StrFilterS
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.WordFindS
+ !ifndef un.WordFindS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_S
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordFind
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordFind2XS
+ !ifndef un.WordFind2XS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordFind2X
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordFind3XS
+ !ifndef un.WordFind3XS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordFind3X
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordReplaceS
+ !ifndef un.WordReplaceS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordReplace
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordAddS
+ !ifndef un.WordAddS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordAdd
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.WordInsertS
+ !ifndef un.WordInsertS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro WordInsert
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!macro un.StrFilterS
+ !ifndef un.StrFilterS
+ !verbose push
+ !verbose ${_WORDFUNC_VERBOSE}
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN `un.`
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S `S`
+
+ !insertmacro StrFilter
+
+ !undef _WORDFUNC_UN
+ !define _WORDFUNC_UN
+ !undef _WORDFUNC_S
+ !define _WORDFUNC_S
+ !verbose pop
+ !endif
+!macroend
+
+!endif
diff --git a/Include/x64.nsh b/Include/x64.nsh
index 5e96636..e694c1e 100755
--- a/Include/x64.nsh
+++ b/Include/x64.nsh
@@ -1,54 +1,54 @@
-; ---------------------
-; x64.nsh
-; ---------------------
-;
-; A few simple macros to handle installations on x64 machines.
-;
-; RunningX64 checks if the installer is running on x64.
-;
-; ${If} ${RunningX64}
-; MessageBox MB_OK "running on x64"
-; ${EndIf}
-;
-; DisableX64FSRedirection disables file system redirection.
-; EnableX64FSRedirection enables file system redirection.
-;
-; SetOutPath $SYSDIR
-; ${DisableX64FSRedirection}
-; File some.dll # extracts to C:\Windows\System32
-; ${EnableX64FSRedirection}
-; File some.dll # extracts to C:\Windows\SysWOW64
-;
-
-!ifndef ___X64__NSH___
-!define ___X64__NSH___
-
-!include LogicLib.nsh
-
-!macro _RunningX64 _a _b _t _f
- !insertmacro _LOGICLIB_TEMP
- System::Call kernel32::GetCurrentProcess()i.s
- System::Call kernel32::IsWow64Process(is,*i.s)
- Pop $_LOGICLIB_TEMP
- !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
-!macroend
-
-!define RunningX64 `"" RunningX64 ""`
-
-!macro DisableX64FSRedirection
-
- System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
-
-!macroend
-
-!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"
-
-!macro EnableX64FSRedirection
-
- System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
-
-!macroend
-
-!define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection"
-
-!endif # !___X64__NSH___
+; ---------------------
+; x64.nsh
+; ---------------------
+;
+; A few simple macros to handle installations on x64 machines.
+;
+; RunningX64 checks if the installer is running on x64.
+;
+; ${If} ${RunningX64}
+; MessageBox MB_OK "running on x64"
+; ${EndIf}
+;
+; DisableX64FSRedirection disables file system redirection.
+; EnableX64FSRedirection enables file system redirection.
+;
+; SetOutPath $SYSDIR
+; ${DisableX64FSRedirection}
+; File some.dll # extracts to C:\Windows\System32
+; ${EnableX64FSRedirection}
+; File some.dll # extracts to C:\Windows\SysWOW64
+;
+
+!ifndef ___X64__NSH___
+!define ___X64__NSH___
+
+!include LogicLib.nsh
+
+!macro _RunningX64 _a _b _t _f
+ !insertmacro _LOGICLIB_TEMP
+ System::Call kernel32::GetCurrentProcess()i.s
+ System::Call kernel32::IsWow64Process(is,*i.s)
+ Pop $_LOGICLIB_TEMP
+ !insertmacro _!= $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
+!macroend
+
+!define RunningX64 `"" RunningX64 ""`
+
+!macro DisableX64FSRedirection
+
+ System::Call kernel32::Wow64EnableWow64FsRedirection(i0)
+
+!macroend
+
+!define DisableX64FSRedirection "!insertmacro DisableX64FSRedirection"
+
+!macro EnableX64FSRedirection
+
+ System::Call kernel32::Wow64EnableWow64FsRedirection(i1)
+
+!macroend
+
+!define EnableX64FSRedirection "!insertmacro EnableX64FSRedirection"
+
+!endif # !___X64__NSH___
diff --git a/Menu/compiler.html b/Menu/compiler.html
index 9d37610..b008398 100755
--- a/Menu/compiler.html
+++ b/Menu/compiler.html
@@ -1,30 +1,30 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
- <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
- <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Compiler</b></font></a></p>
- <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
- <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
- <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
- </td>
- <td width="418" height="100" valign="top">
- <p><font size="+1" color="#0C6E97"><b>Compiler</b></font></p>
- <p>The makensis compiler can compile NSIS scripts to create installer
- executables.<br>MakeNSISW is a graphical interface for this compiler.</p>
- <p>To compile a script, right click on a script file in explorer and
- choose 'Compile NSIS Script'.
- The compiler will be started in the MakeNSISW interface.</p>
- <p>You can also start MakeNSISW and open the script using the File menu
- or drag the script file from explorer into the window.</p>
- <p><a href="EX:makensisw.exe"><b>Start MakeNSISW &gt;</b></a></p>
- </td>
- </tr>
-</table>
-<p><img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
+ <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
+ <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Compiler</b></font></a></p>
+ <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
+ <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
+ <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" height="100" valign="top">
+ <p><font size="+1" color="#0C6E97"><b>Compiler</b></font></p>
+ <p>The makensis compiler can compile NSIS scripts to create installer
+ executables.<br>MakeNSISW is a graphical interface for this compiler.</p>
+ <p>To compile a script, right click on a script file in explorer and
+ choose 'Compile NSIS Script'.
+ The compiler will be started in the MakeNSISW interface.</p>
+ <p>You can also start MakeNSISW and open the script using the File menu
+ or drag the script file from explorer into the window.</p>
+ <p><a href="EX:makensisw.exe"><b>Start MakeNSISW &gt;</b></a></p>
+ </td>
+ </tr>
+</table>
+<p><img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/Menu/docs.html b/Menu/docs.html
index 067ae8f..1eae1af 100755
--- a/Menu/docs.html
+++ b/Menu/docs.html
@@ -1,34 +1,34 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
- <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
- <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
- <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Documentation</b></font></a></p>
- <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
- <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
- </td>
- <td width="418" valign="top">
- <p><font size="+1" color="#0C6E97"><b>Documentation</b></font></p>
- <p>For information about the script format, a tutorial, useful functions,
- version history, credits and a reference of all commands, see the
- <a href="EX:NSIS.chm"><b>Users Manual</b></a> (Win95/NT4: <a href="EX:http://microsoft.com/ie/">IE3</a> and
- <a href="EX:http://go.microsoft.com/fwlink/?LinkId=14498">HTML Help</a> required).</p>
- <p>If you want to create an installer with a modern user interface, check
- the <a href="EX:Docs\Modern UI\Readme.html"><b>Modern UI Readme</b></a>
- for information and reference of settings.</p>
- <p>For example scripts, browse the <a href="EX:Examples"><b>Examples
- folder</b></a>.</p>
- <p>For information about the plugins, browse the <a href="EX:Docs"><b>Docs
- folder</b></a>.</p>
- <p>The <a href="EX:http://nsis.sourceforge.net/Developer_Center"><b>NSIS Developer Center</b></a> contains more examples and tutorials.</p>
- </td>
- </tr>
-</table>
-<p><img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
+ <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
+ <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
+ <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Documentation</b></font></a></p>
+ <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
+ <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" valign="top">
+ <p><font size="+1" color="#0C6E97"><b>Documentation</b></font></p>
+ <p>For information about the script format, a tutorial, useful functions,
+ version history, credits and a reference of all commands, see the
+ <a href="EX:NSIS.chm"><b>Users Manual</b></a> (Win95/NT4: <a href="EX:http://microsoft.com/ie/">IE3</a> and
+ <a href="EX:http://go.microsoft.com/fwlink/?LinkId=14498">HTML Help</a> required).</p>
+ <p>If you want to create an installer with a modern user interface, check
+ the <a href="EX:Docs\Modern UI\Readme.html"><b>Modern UI Readme</b></a>
+ for information and reference of settings.</p>
+ <p>For example scripts, browse the <a href="EX:Examples"><b>Examples
+ folder</b></a>.</p>
+ <p>For information about the plugins, browse the <a href="EX:Docs"><b>Docs
+ folder</b></a>.</p>
+ <p>The <a href="EX:http://nsis.sourceforge.net/Developer_Center"><b>NSIS Developer Center</b></a> contains more examples and tutorials.</p>
+ </td>
+ </tr>
+</table>
+<p><img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/Menu/images/header.gif b/Menu/images/header.gif
index 7634165..c61dd19 100755
--- a/Menu/images/header.gif
+++ b/Menu/images/header.gif
Binary files differ
diff --git a/Menu/index.html b/Menu/index.html
index 99c81ee..a18131c 100755
--- a/Menu/index.html
+++ b/Menu/index.html
@@ -1,47 +1,46 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Quick Launch</b></font></a></p>
- <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
- <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
- <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
- <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
- <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
- </td>
- <td width="418" valign="top">
- <table>
- <tr><td valign="top">
- <p><font size="+1" color="#333333"><b>Utilities</b></font><br>
- <a href="EX:makensisw.exe">MakeNSISW (compiler interface)</a><br>
- <a href="EX:Bin\zip2exe.exe">Zip2Exe (convert ZIP to SFX)</a><br>
- &nbsp;<br><br></p>
- <p><font size="+1" color="#333333"><b>Folders</b></font><br>
- <a href="EX:Examples">Example scripts</a><br>
- <a href="EX:Contrib">Contrib (plug-in info etc.)</a><br>
- <a href="EX:Contrib\Language files">Language files</a><br>
- <a href="EX:Contrib\Modern UI\Language files">Modern UI language files</a></p>
- </td><td valign="top">
- <p><font size="+1" color="#333333"><b>Documentation</b></font><br>
- <a href="EX:NSIS.chm">NSIS Users Manual</a><br>
- <a href="EX:http://nsis.sourceforge.net/FAQ">FAQ (online)</a><br>
- <a href="EX:Docs\Modern UI\Readme.html">Modern UI Readme</a><br>
- <a href="EX:Docs\InstallOptions\Readme.html">InstallOptions (custom pages)</a></p>
- <p><font size="+1" color="#333333"><b>Websites</b></font><br>
- <a href="EX:http://nsis.sourceforge.net/">NSIS Website</a><br>
- <a href="EX:http://forums.winamp.com/forumdisplay.php?s=&forumid=65">Forum</a><br>
- <a href="EX:irc://irc.landoleet.org/nsis">IRC Channel</a><br>
- <a href="EX:http://sourceforge.net/tracker/?group_id=22049&atid=373085">Bug Tracker</a><br>
- <a href="EX:http://nsis.sourceforge.net/Change_Log">Development Change Log</a><br></p>
- </td></tr>
- </table>
- </td>
- </tr>
-</table>
-<p><img src="images/clear.gif" width="598" height="1">
-<img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Quick Launch</b></font></a></p>
+ <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
+ <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
+ <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
+ <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
+ <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" valign="top">
+ <table>
+ <tr><td valign="top">
+ <p><font size="+1" color="#333333"><b>Utilities</b></font><br>
+ <a href="EX:makensisw.exe">MakeNSISW (compiler interface)</a><br>
+ <a href="EX:Bin\zip2exe.exe">Zip2Exe (convert ZIP to SFX)</a><br>
+ &nbsp;<br><br></p>
+ <p><font size="+1" color="#333333"><b>Folders</b></font><br>
+ <a href="EX:Examples">Example scripts</a><br>
+ <a href="EX:Contrib">Contrib (plug-in info etc.)</a><br>
+ <a href="EX:Contrib\Language files">Language files</a></p>
+ </td><td valign="top">
+ <p><font size="+1" color="#333333"><b>Documentation</b></font><br>
+ <a href="EX:NSIS.chm">NSIS Users Manual</a><br>
+ <a href="EX:http://nsis.sourceforge.net/FAQ">FAQ (online)</a><br>
+ <a href="EX:Docs\Modern UI\Readme.html">Modern UI Readme</a><br>
+ <a href="EX:Docs\InstallOptions\Readme.html">InstallOptions (custom pages)</a></p>
+ <p><font size="+1" color="#333333"><b>Websites</b></font><br>
+ <a href="EX:http://nsis.sourceforge.net/">NSIS Website</a><br>
+ <a href="EX:http://forums.winamp.com/forumdisplay.php?s=&forumid=65">Forum</a><br>
+ <a href="EX:irc://irc.landoleet.org/nsis">IRC Channel</a><br>
+ <a href="EX:http://sourceforge.net/tracker/?group_id=22049&atid=373085">Bug Tracker</a><br>
+ <a href="EX:http://nsis.sourceforge.net/Change_Log">Development Change Log</a><br></p>
+ </td></tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p><img src="images/clear.gif" width="598" height="1">
+<img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/Menu/intro.html b/Menu/intro.html
index 25e3ecf..62dcdea 100755
--- a/Menu/intro.html
+++ b/Menu/intro.html
@@ -1,34 +1,34 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<img src="images/clear.gif" width="1" height="3">
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
- <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Introduction</b></font></a></p>
- <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
- <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
- <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
- <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
- </td>
- <td width="418" valign="top">
- <p><font size="+1" color="#0C6E97"><b>Introduction</b></font></p>
- <p>An installer is the first experience of a user with your application.
- Slow or unsuccessful software installations are the most irritating
- computer problems. A quick and user friendly installer is therefore an
- essential part of your software product.
- <p>NSIS is a tool that allows programmers
- to create such installers. It is released under an open source license and is
- completely free for any use.</p>
- <p>NSIS installers are based on NSIS Scripts (.nsi) which can be compiled
- with the makensis compiler. They can also be extended with plug-ins written
- in C, C++, Delphi or another language.</p>
- </td>
- </tr>
-</table>
-<p><img src="images/clear.gif" width="598" height="4">
-<img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<img src="images/clear.gif" width="1" height="3">
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
+ <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Introduction</b></font></a></p>
+ <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
+ <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
+ <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
+ <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" valign="top">
+ <p><font size="+1" color="#0C6E97"><b>Introduction</b></font></p>
+ <p>An installer is the first experience of a user with your application.
+ Slow or unsuccessful software installations are the most irritating
+ computer problems. A quick and user friendly installer is therefore an
+ essential part of your software product.
+ <p>NSIS is a tool that allows programmers
+ to create such installers. It is released under an open source license and is
+ completely free for any use.</p>
+ <p>NSIS installers are based on NSIS Scripts (.nsi) which can be compiled
+ with the makensis compiler. They can also be extended with plug-ins written
+ in C, C++, Delphi or another language.</p>
+ </td>
+ </tr>
+</table>
+<p><img src="images/clear.gif" width="598" height="4">
+<img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/Menu/notinstalled.html b/Menu/notinstalled.html
index 74d27b7..596fc3f 100755
--- a/Menu/notinstalled.html
+++ b/Menu/notinstalled.html
@@ -1,27 +1,27 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
- <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
- <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
- <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
- <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
- <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
- </td>
- <td width="418" valign="top">
- <p><font size="+1" color="#0C6E97"><b>Feature not installed</b></font></p>
- <p>The feature you selected is not installed.</p>
- <p>If you want to use this feature, run NSIS Setup again and do not deselect
- it.</p>
- <br><br><br><br><br><br><br><br>
- </td>
- </tr>
-</table>
-<p><img src="images/clear.gif" width="598" height="3">
-<img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
+ <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
+ <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
+ <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
+ <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
+ <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" valign="top">
+ <p><font size="+1" color="#0C6E97"><b>Feature not installed</b></font></p>
+ <p>The feature you selected is not installed.</p>
+ <p>If you want to use this feature, run NSIS Setup again and do not deselect
+ it.</p>
+ <br><br><br><br><br><br><br><br>
+ </td>
+ </tr>
+</table>
+<p><img src="images/clear.gif" width="598" height="3">
+<img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/Menu/update.html b/Menu/update.html
index 81f385e..f44773e 100755
--- a/Menu/update.html
+++ b/Menu/update.html
@@ -1,33 +1,33 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
- <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
- <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
- <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
- <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Update</b></font></a></p>
- <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
- </td>
- <td width="418" valign="top">
- <p><font size="+1" color="#0C6E97"><b>Update</b></font></p>
- <p><a href="EX:makensisw.exe">MakeNSISW</a> allows you to check whether
- a new release is available. Choose NSIS Update in the Help menu to
- check for a newer version. </p>
- <p>The releases have been tested and provide new features and fixes.</p>
- <p>A nightly build of latest development files is also available on the
- <a href="EX:http://nsis.sourceforge.net/Development_Files">website</a>.
- Using the development files you can try the latest cutting-edge features
- and fixes. These files have not been tested so they should not be used in
- production environments. </p>
- <p>See the <a href="EX:http://nsis.sourceforge.net/Change_Log">
- <b>Change Log</b></a> for the latest changes in the development files.<br></p>
- </td>
- </tr>
-</table>
-<p><img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
+ <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
+ <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
+ <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
+ <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Update</b></font></a></p>
+ <p><a href="websites.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" valign="top">
+ <p><font size="+1" color="#0C6E97"><b>Update</b></font></p>
+ <p><a href="EX:makensisw.exe">MakeNSISW</a> allows you to check whether
+ a new release is available. Choose NSIS Update in the Help menu to
+ check for a newer version. </p>
+ <p>The releases have been tested and provide new features and fixes.</p>
+ <p>A nightly build of latest development files is also available on the
+ <a href="EX:http://nsis.sourceforge.net/Development_Files">website</a>.
+ Using the development files you can try the latest cutting-edge features
+ and fixes. These files have not been tested so they should not be used in
+ production environments. </p>
+ <p>See the <a href="EX:http://nsis.sourceforge.net/Change_Log">
+ <b>Change Log</b></a> for the latest changes in the development files.<br></p>
+ </td>
+ </tr>
+</table>
+<p><img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/Menu/websites.html b/Menu/websites.html
index d1cd91e..d8cfa21 100755
--- a/Menu/websites.html
+++ b/Menu/websites.html
@@ -1,33 +1,33 @@
-<html>
-<body link="#0C6E97">
-<div><img src="images/header.gif" width="598" height="45"></div>
-<table border="0">
- <tr>
- <td width="170">
- <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
- <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
- <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
- <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
- <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
- <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Websites</b></font></a></p>
- </td>
- <td width="418" valign="top">
- <p><font size="+1" color="#0C6E97"><b>Websites</b></font></p>
- <p><a href="EX:http://nsis.sourceforge.net/"><b>NSIS Website</b></a> -
- General NSIS information, news and the <a href="EX:http://nsis.sourceforge.net/Developer_Center">
- NSIS Developer Center</a>, a repository of script examples, plug-ins,
- tutorials, development environments and more.</p>
- <p><a href="EX:http://forums.winamp.com/forumdisplay.php?s=&forumid=65"><b>
- Forum</b></a> - Talk with others in the NSIS community</p>
- <p><a href="EX:irc://irc.landoleet.org/nsis"><b>IRC Channel</b></a> -
- Chat with other NSIS users (IRC client required)</p>
- <p><a href="EX:http://sourceforge.net/tracker/?group_id=22049&atid=373085"><b>
- Bug Tracker</b></a> - Check the list of submitted bugs or submit a new one</p>
- <p><br><br></p>
- </td>
- </tr>
-</table>
-<p><img src="images/line.gif" width="598" height="3"></p>
-<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
-</body>
+<html>
+<body link="#0C6E97">
+<div><img src="images/header.gif" width="598" height="45"></div>
+<table border="0">
+ <tr>
+ <td width="170">
+ <p><a href="index.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Quick Launch</b></font></a></p>
+ <p><a href="intro.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Introduction</b></font></a></p>
+ <p><a href="compiler.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Compiler</b></font></a></p>
+ <p><a href="docs.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Documentation</b></font></a></p>
+ <p><a href="update.html"><img src="images/menu.gif" width="30" height="18"><font size="+1" color="#0C6E97"><b>Update</b></font></a></p>
+ <p><a href="#"><img src="images/menud.gif" width="30" height="18"><font size="+1" color="#808080"><b>Websites</b></font></a></p>
+ </td>
+ <td width="418" valign="top">
+ <p><font size="+1" color="#0C6E97"><b>Websites</b></font></p>
+ <p><a href="EX:http://nsis.sourceforge.net/"><b>NSIS Website</b></a> -
+ General NSIS information, news and the <a href="EX:http://nsis.sourceforge.net/Developer_Center">
+ NSIS Developer Center</a>, a repository of script examples, plug-ins,
+ tutorials, development environments and more.</p>
+ <p><a href="EX:http://forums.winamp.com/forumdisplay.php?s=&forumid=65"><b>
+ Forum</b></a> - Talk with others in the NSIS community</p>
+ <p><a href="EX:irc://irc.landoleet.org/nsis"><b>IRC Channel</b></a> -
+ Chat with other NSIS users (IRC client required)</p>
+ <p><a href="EX:http://sourceforge.net/tracker/?group_id=22049&atid=373085"><b>
+ Bug Tracker</b></a> - Check the list of submitted bugs or submit a new one</p>
+ <p><br><br></p>
+ </td>
+ </tr>
+</table>
+<p><img src="images/line.gif" width="598" height="3"></p>
+<div align="right"><a href="EX:http://nsis.sourceforge.net/"><img src="images/site.gif" width="200" height="25"></a></div>
+</body>
</html> \ No newline at end of file
diff --git a/SCons/Config/default b/SCons/Config/default
index 4db1a0c..709ab3b 100755
--- a/SCons/Config/default
+++ b/SCons/Config/default
@@ -1,43 +1,43 @@
-print "Using default tools configuration"
-
-Import('defenv')
-
-### flags
-
-defenv['ENTRY_FLAG'] = lambda x: ''
-defenv['MAP_FLAG'] = ''
-defenv['EXCEPTION_FLAG'] = ''
-defenv['NODEFLIBS_FLAG'] = ''
-defenv['C_FLAG'] = ''
-defenv['CPP_FLAG'] = ''
-defenv['CPP_REQUIRES_STDLIB'] = 0
-defenv['SUBSYS_CON'] = ''
-defenv['MSVCRT_FLAG'] = ''
-
-### stub environment
-
-stub_env = defenv.Clone()
-
-### makensis environment
-
-makensis_env = defenv.Clone()
-
-### plugin environment
-
-plugin_env = defenv.Clone(no_import_lib = 1)
-
-### util environment
-
-util_env = defenv.Clone()
-
-### cross-platform util environment
-
-cp_util_env = util_env.Clone()
-
-### test environment
-
-test_env = defenv.Clone()
-
-# return
-
-Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
+print "Using default tools configuration"
+
+Import('defenv')
+
+### flags
+
+defenv['ENTRY_FLAG'] = lambda x: ''
+defenv['MAP_FLAG'] = ''
+defenv['EXCEPTION_FLAG'] = ''
+defenv['NODEFLIBS_FLAG'] = ''
+defenv['C_FLAG'] = ''
+defenv['CPP_FLAG'] = ''
+defenv['CPP_REQUIRES_STDLIB'] = 0
+defenv['SUBSYS_CON'] = ''
+defenv['MSVCRT_FLAG'] = ''
+
+### stub environment
+
+stub_env = defenv.Clone()
+
+### makensis environment
+
+makensis_env = defenv.Clone()
+
+### plugin environment
+
+plugin_env = defenv.Clone(no_import_lib = 1)
+
+### util environment
+
+util_env = defenv.Clone()
+
+### cross-platform util environment
+
+cp_util_env = util_env.Clone()
+
+### test environment
+
+test_env = defenv.Clone()
+
+# return
+
+Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
diff --git a/SCons/Config/gnu b/SCons/Config/gnu
index 153bdb5..c1c190c 100755
--- a/SCons/Config/gnu
+++ b/SCons/Config/gnu
@@ -1,288 +1,288 @@
-print "Using GNU tools configuration"
-
-Import('defenv')
-
-### imports
-
-Import('FlagsConfigure')
-
-### cross compiling
-
-def cross_env(env):
- if env['PLATFORM'] != 'win32':
- env.Tool('crossmingw', toolpath = ['../Tools'])
-
-### flags
-
-def entry(x):
- if x == 'WinMain':
- x = '_WinMain@16'
- elif x == 'DllMain':
- x = '_DllMain@12'
- return '-Wl,-e%s' % x
-
-defenv['ENTRY_FLAG'] = entry
-defenv['MAP_FLAG'] = '-Wl,-Map,${TARGET.base}.map'
-defenv['EXCEPTION_FLAG'] = ''
-defenv['NODEFLIBS_FLAG'] = '-nostdlib -Wl,--exclude-libs,msvcrt.a'
-defenv['C_FLAG'] = '-x c'
-defenv['CPP_FLAG'] = '-x c++'
-defenv['ALIGN_FLAG'] = '-Wl,--file-alignment,512'
-defenv['CPP_REQUIRES_STDLIB'] = 1
-defenv['SUBSYS_CON'] = '-Wl,--subsystem,console'
-defenv['MSVCRT_FLAG'] = ''
-
-### helper functions
-
-# on Mac OS X, programs built with g++ 4.0, stl and -s error out:
-# dyld: lazy symbol binding failed: lazy pointer not found
-# dyld: lazy pointer not found
-#
-# to avoid this, this function checks if -s works
-
-def TestStrip(ctx):
- c = """
- #include <vector>
-
- int main() {
- std::vector<int> v;
- return 0;
- }
- """
- ctx.CheckLinkFlag('-s', run = 1, extension = '.cpp', code = c)
-
-### debug
-
-if defenv['DEBUG']:
- defenv.Append(CCFLAGS = '-g')
-
-### stub environment
-
-stub_env = defenv.Clone()
-cross_env(stub_env)
-
-if not defenv['DEBUG']:
- stub_env.Append(CCFLAGS = '-Os') # optimize for size
-stub_env.Append(CCFLAGS = '-Wall') # all warnings
-stub_env.Append(CCFLAGS = '-x c') # force compile as c
-stub_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
-
-if not defenv['DEBUG'] and defenv['STRIP']:
- stub_env.Append(LINKFLAGS = '-s') # strip
-stub_env.Append(LINKFLAGS = '-mwindows') # build windows executables
-stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no standard libraries
-stub_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
-stub_env.Append(LINKFLAGS = '-Wl,-e,_WinMain@16') # entry point
-stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
-
-### makensis environment
-
-makensis_env = defenv.Clone()
-
-if not defenv['DEBUG']:
- makensis_env.Append(CCFLAGS = '-O2') # optimize
-makensis_env.Append(CCFLAGS = '-Wall') # all warnings
-makensis_env.Append(CXXFLAGS = '-Wno-non-virtual-dtor') # ignore virtual dtor warnings
-
-conf = FlagsConfigure(makensis_env)
-conf.CheckLinkFlag('-m32') #
-conf.CheckCompileFlag('-m32') #
-conf.CheckLinkFlag('$MAP_FLAG') # generate map file
-if not defenv['DEBUG'] and defenv['STRIP']:
- TestStrip(conf) # strip
-conf.Finish()
-
-### plugin environment
-
-plugin_env = defenv.Clone()
-cross_env(plugin_env)
-
-if not defenv['DEBUG']:
- plugin_env.Append(CCFLAGS = '-Os') # optimize for size
-plugin_env.Append(CCFLAGS = '-Wall') # level 3 warnings
-plugin_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
-
-if not defenv['DEBUG'] and defenv['STRIP']:
- plugin_env.Append(LINKFLAGS = '-s') # strip
-plugin_env.Append(LINKFLAGS = '-mwindows') # build windows executables
-plugin_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
-plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
-
-### cross-platform util environment
-
-cp_util_env = defenv.Clone()
-
-if not defenv['DEBUG']:
- cp_util_env.Append(CCFLAGS = '-O2') # optimize
-cp_util_env.Append(CCFLAGS = '-Wall') # all warnings
-cp_util_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
-
-conf = FlagsConfigure(cp_util_env)
-conf.CheckLinkFlag('$MAP_FLAG') # generate map file
-if not defenv['DEBUG'] and defenv['STRIP']:
- TestStrip(conf) # strip
-conf.Finish()
-
-### util environment
-
-util_env = cp_util_env.Clone()
-cross_env(util_env)
-
-util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
-util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
-
-### test environment
-
-test_env = defenv.Clone()
-
-### weird GCC requirements
-
-#
-# GCC puts new PE sections, added by code, between other sections.
-# This is not good for the .ndata section because makensis changes
-# its size dynamically. This is not good if RVAs to sections below
-# it are saved in other places. The RVAs will point to garbage.
-#
-# To fix this, a linker script is provided. The linker script makes
-# sure the sections will be written in the correct order.
-#
-
-stub_env.Append(LINKFLAGS = '-T %s' % File('linker_script').abspath)
-
-#
-# GCC requires some functions from the CRT to be present, if certain
-# operations are done. For example, if a small string is assigned to
-# a larger buffer, GCC 3.4+ uses memset to fill the remaining of the
-# buffer with zeros.
-#
-
-def check_requirement(ctx, func, trigger):
- ctx.Message('Checking for %s requirement... ' % func)
-
- flags = ctx.env['LINKFLAGS']
-
- ctx.env.Append(LINKFLAGS = '$NODEFLIBS_FLAG')
- ctx.env.Append(LINKFLAGS = '-Wl,-e,___main')
-
- test = """
- int __main() {
- %s
- return 0;
- }
- """ % trigger
-
- result = not ctx.TryLink(test, '.c')
- ctx.Result(result)
-
- ctx.env['LINKFLAGS'] = flags
-
- return result
-
-def add_file_to_emitter(env, emitter_name, file):
- try:
- original_emitter = env[emitter_name]
- if type(original_emitter) == list:
- original_emitter = original_emitter[0]
- except KeyError:
- original_emitter = None
-
- def emitter(target, source, env):
- if original_emitter:
- target, source = original_emitter(target, source, env)
-
- if '$NODEFLIBS_FLAG' not in env['LINKFLAGS']:
- return target, source
-
- return target, source + [file]
-
- env[emitter_name] = emitter
-
-def add_file(file):
- file = File(file)
- add_file_to_emitter(stub_env, 'PROGEMITTER', file)
- add_file_to_emitter(util_env, 'PROGEMITTER', file)
- add_file_to_emitter(plugin_env, 'SHLIBEMITTER', file)
-
-cenv = defenv.Clone()
-cross_env(cenv)
-conf = cenv.Configure(custom_tests = { 'CheckRequirement' : check_requirement })
-
-memcpy_test = """
-struct s // gcc 3
-{
- char c[128];
-} t = { "test" };
-char a[] = // gcc 4
- {'/', 'F', 'I' ,'L', 'L', 'S', 'C', 'R', 'E', 'E', 'N', 0};
-int i;
-for (i = 0; i < 100; i++) // avoid a and t being optimized out
-{
- i += a[i] ^ t.c[i];
-}
-return i;
-"""
-
-memset_test = """
-char c[128] = "test";
-c[0] = '6'; // avoid c being optimized out
-return c[1]; // avoid c being optimized out
-"""
-
-if conf.CheckRequirement('memcpy', memcpy_test):
- add_file('memcpy.c')
-
-if conf.CheckRequirement('memset', memset_test):
- add_file('memset.c')
-
-conf.Finish()
-
-#
-# Some platforms, like FreeBSD, require -pthread flag to be passed
-# instead of -lpthread.
-#
-
-conf = FlagsConfigure(makensis_env)
-conf.CheckLinkFlag('-pthread')
-conf.Finish()
-
-#
-# GCC doesn't define __BIG_ENDIAN__ or __LITTLE_ENDIAN__, so manually check
-# for the endianess and define __BIG_ENDIAN__ if needed.
-#
-
-def check_big_endian(ctx):
- ctx.Message('Checking for __BIG_ENDIAN__... ')
-
- test = """
- int main() {
- #ifdef __BIG_ENDIAN__
- // already defined, no need to define again
- return 0;
- #else
- int i = 1;
- char *c = (char *) &i;
- return c[0] != 1;
- #endif
- }
- """
-
- result = not ctx.TryRun(test, '.c')[0]
- ctx.Result(result)
- return result
-
-conf = defenv.Configure(custom_tests = { 'CheckBigEndian' : check_big_endian })
-if conf.CheckBigEndian():
- makensis_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
- test_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
-conf.Finish()
-
-if makensis_env['PLATFORM'] == 'hpux':
- makensis_env.Append(CPPDEFINES = ['NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS'])
- makensis_conf = makensis_env.Configure()
- makensis_conf.CheckLib("unalign")
- makensis_conf.CheckLib("hppa")
- makensis_conf.Finish()
-
-### return
-
-Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
+print "Using GNU tools configuration"
+
+Import('defenv')
+
+### imports
+
+Import('FlagsConfigure')
+
+### cross compiling
+
+def cross_env(env):
+ if env['PLATFORM'] != 'win32':
+ env.Tool('crossmingw', toolpath = ['../Tools'])
+
+### flags
+
+def entry(x):
+ if x == 'WinMain':
+ x = '_WinMain@16'
+ elif x == 'DllMain':
+ x = '_DllMain@12'
+ return '-Wl,-e%s' % x
+
+defenv['ENTRY_FLAG'] = entry
+defenv['MAP_FLAG'] = '-Wl,-Map,${TARGET.base}.map'
+defenv['EXCEPTION_FLAG'] = ''
+defenv['NODEFLIBS_FLAG'] = '-nostdlib -Wl,--exclude-libs,msvcrt.a'
+defenv['C_FLAG'] = '-x c'
+defenv['CPP_FLAG'] = '-x c++'
+defenv['ALIGN_FLAG'] = '-Wl,--file-alignment,512'
+defenv['CPP_REQUIRES_STDLIB'] = 1
+defenv['SUBSYS_CON'] = '-Wl,--subsystem,console'
+defenv['MSVCRT_FLAG'] = ''
+
+### helper functions
+
+# on Mac OS X, programs built with g++ 4.0, stl and -s error out:
+# dyld: lazy symbol binding failed: lazy pointer not found
+# dyld: lazy pointer not found
+#
+# to avoid this, this function checks if -s works
+
+def TestStrip(ctx):
+ c = """
+ #include <vector>
+
+ int main() {
+ std::vector<int> v;
+ return 0;
+ }
+ """
+ ctx.CheckLinkFlag('-s', run = 1, extension = '.cpp', code = c)
+
+### debug
+
+if defenv['DEBUG']:
+ defenv.Append(CCFLAGS = '-g')
+
+### stub environment
+
+stub_env = defenv.Clone()
+cross_env(stub_env)
+
+if not defenv['DEBUG']:
+ stub_env.Append(CCFLAGS = '-Os') # optimize for size
+stub_env.Append(CCFLAGS = '-Wall') # all warnings
+stub_env.Append(CCFLAGS = '-x c') # force compile as c
+stub_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
+
+if not defenv['DEBUG'] and defenv['STRIP']:
+ stub_env.Append(LINKFLAGS = '-s') # strip
+stub_env.Append(LINKFLAGS = '-mwindows') # build windows executables
+stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no standard libraries
+stub_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
+stub_env.Append(LINKFLAGS = '-Wl,-e,_WinMain@16') # entry point
+stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
+
+### makensis environment
+
+makensis_env = defenv.Clone()
+
+if not defenv['DEBUG']:
+ makensis_env.Append(CCFLAGS = '-O2') # optimize
+makensis_env.Append(CCFLAGS = '-Wall') # all warnings
+makensis_env.Append(CXXFLAGS = '-Wno-non-virtual-dtor') # ignore virtual dtor warnings
+
+conf = FlagsConfigure(makensis_env)
+conf.CheckCompileFlag('-m32') #
+conf.CheckLinkFlag('-m32') #
+conf.CheckLinkFlag('$MAP_FLAG') # generate map file
+if not defenv['DEBUG'] and defenv['STRIP']:
+ TestStrip(conf) # strip
+conf.Finish()
+
+### plugin environment
+
+plugin_env = defenv.Clone()
+cross_env(plugin_env)
+
+if not defenv['DEBUG']:
+ plugin_env.Append(CCFLAGS = '-Os') # optimize for size
+plugin_env.Append(CCFLAGS = '-Wall') # level 3 warnings
+plugin_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
+
+if not defenv['DEBUG'] and defenv['STRIP']:
+ plugin_env.Append(LINKFLAGS = '-s') # strip
+plugin_env.Append(LINKFLAGS = '-mwindows') # build windows executables
+plugin_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
+plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
+
+### cross-platform util environment
+
+cp_util_env = defenv.Clone()
+
+if not defenv['DEBUG']:
+ cp_util_env.Append(CCFLAGS = '-O2') # optimize
+cp_util_env.Append(CCFLAGS = '-Wall') # all warnings
+cp_util_env.Append(CCFLAGS = '-fno-strict-aliasing') # not safe for strict aliasing
+
+conf = FlagsConfigure(cp_util_env)
+conf.CheckLinkFlag('$MAP_FLAG') # generate map file
+if not defenv['DEBUG'] and defenv['STRIP']:
+ TestStrip(conf) # strip
+conf.Finish()
+
+### util environment
+
+util_env = cp_util_env.Clone()
+cross_env(util_env)
+
+util_env.Append(LINKFLAGS = '-mwindows') # build windows executables
+util_env.Append(LINKFLAGS = '$ALIGN_FLAG') # 512 bytes align
+
+### test environment
+
+test_env = defenv.Clone()
+
+### weird GCC requirements
+
+#
+# GCC puts new PE sections, added by code, between other sections.
+# This is not good for the .ndata section because makensis changes
+# its size dynamically. This is not good if RVAs to sections below
+# it are saved in other places. The RVAs will point to garbage.
+#
+# To fix this, a linker script is provided. The linker script makes
+# sure the sections will be written in the correct order.
+#
+
+stub_env.Append(LINKFLAGS = '-T %s' % File('linker_script').abspath)
+
+#
+# GCC requires some functions from the CRT to be present, if certain
+# operations are done. For example, if a small string is assigned to
+# a larger buffer, GCC 3.4+ uses memset to fill the remaining of the
+# buffer with zeros.
+#
+
+def check_requirement(ctx, func, trigger):
+ ctx.Message('Checking for %s requirement... ' % func)
+
+ flags = ctx.env['LINKFLAGS']
+
+ ctx.env.Append(LINKFLAGS = '$NODEFLIBS_FLAG')
+ ctx.env.Append(LINKFLAGS = '-Wl,-e,___main')
+
+ test = """
+ int __main() {
+ %s
+ return 0;
+ }
+ """ % trigger
+
+ result = not ctx.TryLink(test, '.c')
+ ctx.Result(result)
+
+ ctx.env['LINKFLAGS'] = flags
+
+ return result
+
+def add_file_to_emitter(env, emitter_name, file):
+ try:
+ original_emitter = env[emitter_name]
+ if type(original_emitter) == list:
+ original_emitter = original_emitter[0]
+ except KeyError:
+ original_emitter = None
+
+ def emitter(target, source, env):
+ if original_emitter:
+ target, source = original_emitter(target, source, env)
+
+ if '$NODEFLIBS_FLAG' not in env['LINKFLAGS']:
+ return target, source
+
+ return target, source + [file]
+
+ env[emitter_name] = emitter
+
+def add_file(file):
+ file = File(file)
+ add_file_to_emitter(stub_env, 'PROGEMITTER', file)
+ add_file_to_emitter(util_env, 'PROGEMITTER', file)
+ add_file_to_emitter(plugin_env, 'SHLIBEMITTER', file)
+
+cenv = defenv.Clone()
+cross_env(cenv)
+conf = cenv.Configure(custom_tests = { 'CheckRequirement' : check_requirement })
+
+memcpy_test = """
+struct s // gcc 3
+{
+ char c[128];
+} t = { "test" };
+char a[] = // gcc 4
+ {'/', 'F', 'I' ,'L', 'L', 'S', 'C', 'R', 'E', 'E', 'N', 0};
+int i;
+for (i = 0; i < 100; i++) // avoid a and t being optimized out
+{
+ i += a[i] ^ t.c[i];
+}
+return i;
+"""
+
+memset_test = """
+char c[128] = "test";
+c[0] = '6'; // avoid c being optimized out
+return c[1]; // avoid c being optimized out
+"""
+
+if conf.CheckRequirement('memcpy', memcpy_test):
+ add_file('memcpy.c')
+
+if conf.CheckRequirement('memset', memset_test):
+ add_file('memset.c')
+
+conf.Finish()
+
+#
+# Some platforms, like FreeBSD, require -pthread flag to be passed
+# instead of -lpthread.
+#
+
+conf = FlagsConfigure(makensis_env)
+conf.CheckLinkFlag('-pthread')
+conf.Finish()
+
+#
+# GCC doesn't define __BIG_ENDIAN__ or __LITTLE_ENDIAN__, so manually check
+# for the endianess and define __BIG_ENDIAN__ if needed.
+#
+
+def check_big_endian(ctx):
+ ctx.Message('Checking for __BIG_ENDIAN__... ')
+
+ test = """
+ int main() {
+ #ifdef __BIG_ENDIAN__
+ // already defined, no need to define again
+ return 0;
+ #else
+ int i = 1;
+ char *c = (char *) &i;
+ return c[0] != 1;
+ #endif
+ }
+ """
+
+ result = not ctx.TryRun(test, '.c')[0]
+ ctx.Result(result)
+ return result
+
+conf = defenv.Configure(custom_tests = { 'CheckBigEndian' : check_big_endian })
+if conf.CheckBigEndian():
+ makensis_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
+ test_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
+conf.Finish()
+
+if makensis_env['PLATFORM'] == 'hpux':
+ makensis_env.Append(CPPDEFINES = ['NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS'])
+ makensis_conf = makensis_env.Configure()
+ makensis_conf.CheckLib("unalign")
+ makensis_conf.CheckLib("hppa")
+ makensis_conf.Finish()
+
+### return
+
+Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
diff --git a/SCons/Config/hpc++ b/SCons/Config/hpc++
index 2190834..22d915f 100755
--- a/SCons/Config/hpc++
+++ b/SCons/Config/hpc++
@@ -1,115 +1,115 @@
-print "Using hpc++ tools configuration"
-
-Import('defenv')
-
-### flags
-
-defenv['ENTRY_FLAG'] = lambda x: ''
-defenv['MAP_FLAG'] = ''
-defenv['EXCEPTION_FLAG'] = ''
-defenv['NODEFLIBS_FLAG'] = ''
-defenv['C_FLAG'] = ''
-defenv['CPP_FLAG'] = ''
-defenv['CPP_REQUIRES_STDLIB'] = 0
-defenv['SUBSYS_CON'] = ''
-defenv['MSVCRT_FLAG'] = ''
-
-### stub environment
-
-stub_env = defenv.Clone()
-
-### makensis environment
-
-makensis_env = defenv.Clone()
-
-### use "$CXX -Ae" as the "$CC" compiler to build makensis
-
-makensis_env['CC'] = makensis_env['CXX']
-makensis_env.Append(CFLAGS = '-Ae')
-
-### required to build makensis
-
-makensis_env.Append(LINKFLAGS = '-AA')
-makensis_env.Append(LINKFLAGS = '+DD32')
-makensis_env.Append(LINKFLAGS = '-mt')
-
-makensis_env.Append(CXXFLAGS = '-AA')
-makensis_env.Append(CCFLAGS = '+DD32')
-makensis_env.Append(CCFLAGS = '-mt')
-
-### debug for makensis
-
-if makensis_env['DEBUG']:
- makensis_env.Append(CCFLAGS = '-g')
- makensis_env.Append(LINKFLAGS = '-g')
-
-### strip for makensis
-
-if not makensis_env['DEBUG'] and makensis_env['STRIP']:
- makensis_env.Append(LINKFLAGS = '-s')
-
-#
-# aCC defines _BIG_ENDIAN, but we use __BIG_ENDIAN__ so check and define as
-# needed (is there any HPUX that is NOT big endian?).
-#
-
-def check_big_endian(ctx):
- ctx.Message('Checking for if this is a big endian host... ')
- test = """
- #define LITTLE_ENDIAN 0
- #define BIG_ENDIAN 1
- #define UNKNOWN 2
- int main()
- {
- union {
- short s;
- char c[sizeof(short)];
- } u;
- u.s = 0x0102;
- if (sizeof(short) == 2) {
- if (u.c[0] == 1 && u.c[1] == 2)
- return (BIG_ENDIAN);
- else if (u.c[0] == 2 && u.c[1] == 1)
- return (LITTLE_ENDIAN);
- else
- return(UNKNOWN);
- } else {
- return (sizeof(short));
- }
- }
- """
- result = not ctx.TryRun(test, '.c')[0]
- ctx.Result(result)
- return result
-
-makensis_conf = makensis_env.Configure(custom_tests = { 'CheckBigEndian' : check_big_endian })
-
-if makensis_conf.CheckBigEndian():
- makensis_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
-
-if makensis_env['PLATFORM'] == 'hpux':
- makensis_env.Append(CPPDEFINES = ['NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS'])
- makensis_conf.CheckLib("unalign")
- makensis_conf.CheckLib("hppa")
-
-makensis_conf.Finish()
-
-### plugin environment
-
-plugin_env = defenv.Clone(no_import_lib = 1)
-
-### util environment
-
-util_env = defenv.Clone()
-
-### cross-platform util environment
-
-cp_util_env = util_env.Clone()
-
-### test environment
-
-test_env = defenv.Clone()
-
-# return
-
-Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
+print "Using hpc++ tools configuration"
+
+Import('defenv')
+
+### flags
+
+defenv['ENTRY_FLAG'] = lambda x: ''
+defenv['MAP_FLAG'] = ''
+defenv['EXCEPTION_FLAG'] = ''
+defenv['NODEFLIBS_FLAG'] = ''
+defenv['C_FLAG'] = ''
+defenv['CPP_FLAG'] = ''
+defenv['CPP_REQUIRES_STDLIB'] = 0
+defenv['SUBSYS_CON'] = ''
+defenv['MSVCRT_FLAG'] = ''
+
+### stub environment
+
+stub_env = defenv.Clone()
+
+### makensis environment
+
+makensis_env = defenv.Clone()
+
+### use "$CXX -Ae" as the "$CC" compiler to build makensis
+
+makensis_env['CC'] = makensis_env['CXX']
+makensis_env.Append(CFLAGS = '-Ae')
+
+### required to build makensis
+
+makensis_env.Append(LINKFLAGS = '-AA')
+makensis_env.Append(LINKFLAGS = '+DD32')
+makensis_env.Append(LINKFLAGS = '-mt')
+
+makensis_env.Append(CXXFLAGS = '-AA')
+makensis_env.Append(CCFLAGS = '+DD32')
+makensis_env.Append(CCFLAGS = '-mt')
+
+### debug for makensis
+
+if makensis_env['DEBUG']:
+ makensis_env.Append(CCFLAGS = '-g')
+ makensis_env.Append(LINKFLAGS = '-g')
+
+### strip for makensis
+
+if not makensis_env['DEBUG'] and makensis_env['STRIP']:
+ makensis_env.Append(LINKFLAGS = '-s')
+
+#
+# aCC defines _BIG_ENDIAN, but we use __BIG_ENDIAN__ so check and define as
+# needed (is there any HPUX that is NOT big endian?).
+#
+
+def check_big_endian(ctx):
+ ctx.Message('Checking for if this is a big endian host... ')
+ test = """
+ #define LITTLE_ENDIAN 0
+ #define BIG_ENDIAN 1
+ #define UNKNOWN 2
+ int main()
+ {
+ union {
+ short s;
+ char c[sizeof(short)];
+ } u;
+ u.s = 0x0102;
+ if (sizeof(short) == 2) {
+ if (u.c[0] == 1 && u.c[1] == 2)
+ return (BIG_ENDIAN);
+ else if (u.c[0] == 2 && u.c[1] == 1)
+ return (LITTLE_ENDIAN);
+ else
+ return(UNKNOWN);
+ } else {
+ return (sizeof(short));
+ }
+ }
+ """
+ result = not ctx.TryRun(test, '.c')[0]
+ ctx.Result(result)
+ return result
+
+makensis_conf = makensis_env.Configure(custom_tests = { 'CheckBigEndian' : check_big_endian })
+
+if makensis_conf.CheckBigEndian():
+ makensis_env.Append(CPPDEFINES = ['__BIG_ENDIAN__'])
+
+if makensis_env['PLATFORM'] == 'hpux':
+ makensis_env.Append(CPPDEFINES = ['NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS'])
+ makensis_conf.CheckLib("unalign")
+ makensis_conf.CheckLib("hppa")
+
+makensis_conf.Finish()
+
+### plugin environment
+
+plugin_env = defenv.Clone(no_import_lib = 1)
+
+### util environment
+
+util_env = defenv.Clone()
+
+### cross-platform util environment
+
+cp_util_env = util_env.Clone()
+
+### test environment
+
+test_env = defenv.Clone()
+
+# return
+
+Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
diff --git a/SCons/Config/linker_script b/SCons/Config/linker_script
index d853335..193e047 100755
--- a/SCons/Config/linker_script
+++ b/SCons/Config/linker_script
@@ -1,210 +1,210 @@
-OUTPUT_FORMAT(pei-i386)
-SECTIONS
-{
- .text __image_base__ + __section_alignment__ :
- {
- *(.init)
- *(.text)
- *(SORT(.text$*))
- *(.glue_7t)
- *(.glue_7)
- ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1);
- *(EXCLUDE_FILE (*crtend.o) .ctors);
- *(.ctor);
- *(SORT(.ctors.*));
- *crtend.o (.ctors);
- LONG (0);
- ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1);
- *(EXCLUDE_FILE (*crtend.o) .dtors);
- *(.dtor);
- *(SORT(.dtors.*));
- *crtend.o (.dtors);
- LONG (0);
- *(.fini)
- /* ??? Why is .gcc_exc here? */
- *(.gcc_exc)
- PROVIDE (etext = .);
- *(.gcc_except_table)
- }
- /* The Cygwin32 library uses a section to avoid copying certain data
- on fork. This used to be named ".data". The linker used
- to include this between __data_start__ and __data_end__, but that
- breaks building the cygwin32 dll. Instead, we name the section
- ".data_cygwin_nocopy" and explictly include it after __data_end__. */
- .data BLOCK(__section_alignment__) :
- {
- __data_start__ = . ;
- *(.data)
- *(.data2)
- *(SORT(.data$*))
- __data_end__ = . ;
- *(.data_cygwin_nocopy)
- }
- .rdata BLOCK(__section_alignment__) :
- {
- *(.rdata)
- *(SORT(.rdata$*))
- *(.eh_frame)
- ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
- __RUNTIME_PSEUDO_RELOC_LIST__ = .;
- *(.rdata_runtime_pseudo_reloc)
- ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
- __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
- }
- .pdata BLOCK(__section_alignment__) :
- {
- *(.pdata)
- }
- .bss BLOCK(__section_alignment__) :
- {
- __bss_start__ = . ;
- *(.bss)
- *(COMMON)
- __bss_end__ = . ;
- }
- .edata BLOCK(__section_alignment__) :
- {
- *(.edata)
- }
- /DISCARD/ :
- {
- *(.debug$S)
- *(.debug$T)
- *(.debug$F)
- *(.drectve)
- }
- .idata BLOCK(__section_alignment__) :
- {
- /* This cannot currently be handled with grouped sections.
- See pe.em:sort_sections. */
- SORT(*)(.idata$2)
- SORT(*)(.idata$3)
- /* These zeroes mark the end of the import list. */
- LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
- SORT(*)(.idata$4)
- SORT(*)(.idata$5)
- SORT(*)(.idata$6)
- SORT(*)(.idata$7)
- }
- .CRT BLOCK(__section_alignment__) :
- {
- ___crt_xc_start__ = . ;
- *(SORT(.CRT$XC*)) /* C initialization */
- ___crt_xc_end__ = . ;
- ___crt_xi_start__ = . ;
- *(SORT(.CRT$XI*)) /* C++ initialization */
- ___crt_xi_end__ = . ;
- ___crt_xl_start__ = . ;
- *(SORT(.CRT$XL*)) /* TLS callbacks */
- /* ___crt_xl_end__ is defined in the TLS Directory support code */
- ___crt_xp_start__ = . ;
- *(SORT(.CRT$XP*)) /* Pre-termination */
- ___crt_xp_end__ = . ;
- ___crt_xt_start__ = . ;
- *(SORT(.CRT$XT*)) /* Termination */
- ___crt_xt_end__ = . ;
- }
- .tls BLOCK(__section_alignment__) :
- {
- ___tls_start__ = . ;
- *(.tls)
- *(.tls$)
- *(SORT(.tls$*))
- ___tls_end__ = . ;
- }
- .endjunk BLOCK(__section_alignment__) :
- {
- /* end is deprecated, don't use it */
- PROVIDE (end = .);
- PROVIDE ( _end = .);
- __end__ = .;
- }
- .ndata BLOCK(__section_alignment__) :
- {
- *(.ndata)
- }
- .rsrc BLOCK(__section_alignment__) :
- {
- *(.rsrc)
- *(SORT(.rsrc$*))
- }
- .reloc BLOCK(__section_alignment__) :
- {
- *(.reloc)
- }
- .stab BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.stab)
- }
- .stabstr BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.stabstr)
- }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section. Unlike other targets that fake this by putting the
- section VMA at 0, the PE format will not allow it. */
- /* DWARF 1.1 and DWARF 2. */
- .debug_aranges BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_aranges)
- }
- .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_pubnames)
- }
- /* DWARF 2. */
- .debug_info BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_info) *(.gnu.linkonce.wi.*)
- }
- .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_abbrev)
- }
- .debug_line BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_line)
- }
- .debug_frame BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_frame)
- }
- .debug_str BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_str)
- }
- .debug_loc BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_loc)
- }
- .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_macinfo)
- }
- /* SGI/MIPS DWARF 2 extensions. */
- .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_weaknames)
- }
- .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_funcnames)
- }
- .debug_typenames BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_typenames)
- }
- .debug_varnames BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_varnames)
- }
- /* DWARF 3. */
- .debug_ranges BLOCK(__section_alignment__) (NOLOAD) :
- {
- *(.debug_ranges)
- }
-}
-
+OUTPUT_FORMAT(pei-i386)
+SECTIONS
+{
+ .text __image_base__ + __section_alignment__ :
+ {
+ *(.init)
+ *(.text)
+ *(SORT(.text$*))
+ *(.glue_7t)
+ *(.glue_7)
+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1);
+ *(EXCLUDE_FILE (*crtend.o) .ctors);
+ *(.ctor);
+ *(SORT(.ctors.*));
+ *crtend.o (.ctors);
+ LONG (0);
+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1);
+ *(EXCLUDE_FILE (*crtend.o) .dtors);
+ *(.dtor);
+ *(SORT(.dtors.*));
+ *crtend.o (.dtors);
+ LONG (0);
+ *(.fini)
+ /* ??? Why is .gcc_exc here? */
+ *(.gcc_exc)
+ PROVIDE (etext = .);
+ *(.gcc_except_table)
+ }
+ /* The Cygwin32 library uses a section to avoid copying certain data
+ on fork. This used to be named ".data". The linker used
+ to include this between __data_start__ and __data_end__, but that
+ breaks building the cygwin32 dll. Instead, we name the section
+ ".data_cygwin_nocopy" and explictly include it after __data_end__. */
+ .data BLOCK(__section_alignment__) :
+ {
+ __data_start__ = . ;
+ *(.data)
+ *(.data2)
+ *(SORT(.data$*))
+ __data_end__ = . ;
+ *(.data_cygwin_nocopy)
+ }
+ .rdata BLOCK(__section_alignment__) :
+ {
+ *(.rdata)
+ *(SORT(.rdata$*))
+ *(.eh_frame)
+ ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
+ __RUNTIME_PSEUDO_RELOC_LIST__ = .;
+ *(.rdata_runtime_pseudo_reloc)
+ ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+ __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+ }
+ .pdata BLOCK(__section_alignment__) :
+ {
+ *(.pdata)
+ }
+ .bss BLOCK(__section_alignment__) :
+ {
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ __bss_end__ = . ;
+ }
+ .edata BLOCK(__section_alignment__) :
+ {
+ *(.edata)
+ }
+ /DISCARD/ :
+ {
+ *(.debug$S)
+ *(.debug$T)
+ *(.debug$F)
+ *(.drectve)
+ }
+ .idata BLOCK(__section_alignment__) :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)
+ }
+ .CRT BLOCK(__section_alignment__) :
+ {
+ ___crt_xc_start__ = . ;
+ *(SORT(.CRT$XC*)) /* C initialization */
+ ___crt_xc_end__ = . ;
+ ___crt_xi_start__ = . ;
+ *(SORT(.CRT$XI*)) /* C++ initialization */
+ ___crt_xi_end__ = . ;
+ ___crt_xl_start__ = . ;
+ *(SORT(.CRT$XL*)) /* TLS callbacks */
+ /* ___crt_xl_end__ is defined in the TLS Directory support code */
+ ___crt_xp_start__ = . ;
+ *(SORT(.CRT$XP*)) /* Pre-termination */
+ ___crt_xp_end__ = . ;
+ ___crt_xt_start__ = . ;
+ *(SORT(.CRT$XT*)) /* Termination */
+ ___crt_xt_end__ = . ;
+ }
+ .tls BLOCK(__section_alignment__) :
+ {
+ ___tls_start__ = . ;
+ *(.tls)
+ *(.tls$)
+ *(SORT(.tls$*))
+ ___tls_end__ = . ;
+ }
+ .endjunk BLOCK(__section_alignment__) :
+ {
+ /* end is deprecated, don't use it */
+ PROVIDE (end = .);
+ PROVIDE ( _end = .);
+ __end__ = .;
+ }
+ .ndata BLOCK(__section_alignment__) :
+ {
+ *(.ndata)
+ }
+ .rsrc BLOCK(__section_alignment__) :
+ {
+ *(.rsrc)
+ *(SORT(.rsrc$*))
+ }
+ .reloc BLOCK(__section_alignment__) :
+ {
+ *(.reloc)
+ }
+ .stab BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.stab)
+ }
+ .stabstr BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.stabstr)
+ }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section. Unlike other targets that fake this by putting the
+ section VMA at 0, the PE format will not allow it. */
+ /* DWARF 1.1 and DWARF 2. */
+ .debug_aranges BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_aranges)
+ }
+ .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_pubnames)
+ }
+ /* DWARF 2. */
+ .debug_info BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_info) *(.gnu.linkonce.wi.*)
+ }
+ .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_abbrev)
+ }
+ .debug_line BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_line)
+ }
+ .debug_frame BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_frame)
+ }
+ .debug_str BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_str)
+ }
+ .debug_loc BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_loc)
+ }
+ .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_macinfo)
+ }
+ /* SGI/MIPS DWARF 2 extensions. */
+ .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_weaknames)
+ }
+ .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_funcnames)
+ }
+ .debug_typenames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_typenames)
+ }
+ .debug_varnames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_varnames)
+ }
+ /* DWARF 3. */
+ .debug_ranges BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_ranges)
+ }
+}
+
diff --git a/SCons/Config/memcpy.c b/SCons/Config/memcpy.c
index 68247cb..8a928c1 100755
--- a/SCons/Config/memcpy.c
+++ b/SCons/Config/memcpy.c
@@ -1,11 +1,11 @@
-#include <stdlib.h> // for size_t
-void *memcpy(void *out, const void *in, size_t len)
-{
- char *c_out=(char*)out;
- char *c_in=(char *)in;
- while (len-- > 0)
- {
- *c_out++=*c_in++;
- }
- return out;
-}
+#include <stdlib.h> // for size_t
+void *memcpy(void *out, const void *in, size_t len)
+{
+ char *c_out=(char*)out;
+ char *c_in=(char *)in;
+ while (len-- > 0)
+ {
+ *c_out++=*c_in++;
+ }
+ return out;
+}
diff --git a/SCons/Config/memset.c b/SCons/Config/memset.c
index 2b9cd9d..056e00c 100755
--- a/SCons/Config/memset.c
+++ b/SCons/Config/memset.c
@@ -1,10 +1,10 @@
-#include <stdlib.h> // for size_t
-void *memset(void *mem, int c, size_t len)
-{
- char *p=(char*)mem;
- while (len-- > 0)
- {
- *p++=c;
- }
- return mem;
-}
+#include <stdlib.h> // for size_t
+void *memset(void *mem, int c, size_t len)
+{
+ char *p=(char*)mem;
+ while (len-- > 0)
+ {
+ *p++=c;
+ }
+ return mem;
+}
diff --git a/SCons/Config/ms b/SCons/Config/ms
index b161e3f..1b9a41d 100755
--- a/SCons/Config/ms
+++ b/SCons/Config/ms
@@ -1,212 +1,212 @@
-print "Using Microsoft tools configuration"
-
-Import('defenv')
-
-### flags
-
-defenv['ENTRY_FLAG'] = lambda x: '/entry:' + x
-defenv['MAP_FLAG'] = '/map'
-defenv['NODEFLIBS_FLAG'] = '/NODEFAULTLIB'
-defenv['C_FLAG'] = '/TC'
-defenv['CPP_FLAG'] = '/TP'
-defenv['CPP_REQUIRES_STDLIB'] = 0
-defenv['SUBSYS_CON'] = '/subsystem:console'
-defenv['MSVCRT_FLAG'] = '/MD'
-
-if float(defenv['MSVS_VERSION'].replace('Exp','')) >= 8.0:
- defenv['EXCEPTION_FLAG'] = '/EHsc'
- defenv.Append(CCFLAGS = '/GS-')
- defenv.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_WARNINGS'])
-else:
- defenv['EXCEPTION_FLAG'] = '/GX'
-
-### debug
-
-if defenv['DEBUG']:
- defenv.Append(CCFLAGS = '/Zi')
- defenv.Append(CCFLAGS = '/Fd${TARGET.dir}\\${TARGET.dir.file}.pdb')
- defenv.Append(LINKFLAGS = '/debug')
-
-### workarounds
-
-# Some Platform SDK version includes a bad version of libcp.lib.
-# if stl usage causes link failure, copy the good libcp.lib
-# from one of the other lib folders and use it instead.
-
-confenv = defenv.Clone()
-conf = confenv.Configure()
-
-libcptest = """
-#include <fstream>
-int main() {
- // %s
- std::ofstream header("test", std::ofstream::out);
- return 0;
-}
-"""
-
-conf.env.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath)
-conf.env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
-
-if not conf.TryLink(libcptest % 'no change', '.cpp'):
- import os, shutil
-
- libdirs = defenv['ENV']['LIB'].split(os.pathsep)
-
- for libdir in libdirs:
- try:
- libcp = r'%s\libcp.lib' % libdir
- shutil.copy(libcp, Dir('#/.sconf_temp').abspath)
- if conf.TryLink(libcptest % (r'using %s' % libcp), '.cpp'):
- defenv.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath)
- break
- except IOError:
- continue
- else:
- print "*** Couldn't find a good version of libcp.lib"
- Exit(2)
-
-conf.Finish()
-
-### stub environment
-
-stub_env = defenv.Clone()
-
-if not defenv['DEBUG']:
- stub_env.Append(CCFLAGS = '/O1') # optimize for size
-stub_env.Append(CCFLAGS = '/W3') # level 3 warnings
-
-stub_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
-stub_env.Append(LINKFLAGS = '/entry:WinMain') # entry point
-stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no default libraries
-stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
-stub_env.Append(CCFLAGS = '/FAcs') # full listing files
-stub_env.Append(CCFLAGS = '/Fa${TARGET}.lst') # listing file name
-
-### makensis environment
-
-makensis_env = defenv.Clone()
-
-if not defenv['DEBUG']:
- makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
-makensis_env.Append(CCFLAGS = '$EXCEPTION_FLAG') # enable exceptions
-makensis_env.Append(CCFLAGS = '/W3') # level 3 warnings
-
-makensis_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
-makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
-
-### plugin environment
-
-plugin_env = defenv.Clone(no_import_lib = 1)
-
-if not defenv['DEBUG']:
- plugin_env.Append(CCFLAGS = '/O1') # optimize for size
-plugin_env.Append(CCFLAGS = '/W3') # level 3 warnings
-
-plugin_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
-plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
-
-### util environment
-
-util_env = defenv.Clone()
-
-if not defenv['DEBUG']:
- util_env.Append(CCFLAGS = '/O1') # optimize for speed
-util_env.Append(CCFLAGS = '/W3') # level 3 warnings
-
-util_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
-util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
-
-### cross-platform util environment
-
-cp_util_env = util_env.Clone()
-
-### test environment
-
-test_env = defenv.Clone()
-
-### weird compiler requirements
-
-def check_requirement(ctx, func, trigger):
- ctx.Message('Checking for %s requirement... ' % func)
-
- flags = ctx.env['LINKFLAGS']
-
- ctx.env.Append(LINKFLAGS = '$NODEFLIBS_FLAG')
- ctx.env.Append(LINKFLAGS = '${ENTRY_FLAG("main")}')
-
- test = """
- int main() {
- %s
- return 0;
- }
- """ % trigger
-
- result = not ctx.TryLink(test, '.c')
- ctx.Result(result)
-
- ctx.env['LINKFLAGS'] = flags
-
- return result
-
-def add_file_to_emitter(env, emitter_name, file):
- try:
- original_emitter = env[emitter_name]
- if type(original_emitter) == list:
- original_emitter = original_emitter[0]
- except KeyError:
- original_emitter = None
-
- def emitter(target, source, env):
- if original_emitter:
- target, source = original_emitter(target, source, env)
-
- if '$NODEFLIBS_FLAG' not in env['LINKFLAGS']:
- return target, source
-
- return target, source + env.Object(emitter_name, file)
-
- env[emitter_name] = emitter
-
-def add_file(file):
- file = File(file)
- add_file_to_emitter(stub_env, 'PROGEMITTER', file)
- add_file_to_emitter(util_env, 'PROGEMITTER', file)
- add_file_to_emitter(plugin_env, 'SHLIBEMITTER', file)
-
-#
-# MSVC 6 SP6 doesn't like direct shifting of 64-bit integers.
-# It generates a call to ___aullshr which requires libc, which
-# we don't like. However, it does agree to work properly with
-# a call to Int64ShrlMod32.
-#
-
-conf = stub_env.Configure()
-
-int64test = """
-#include <windows.h>
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow) {
- ULARGE_INTEGER *i = 0;
- return (int)(i->QuadPart >> 10);
-}
-"""
-
-if not conf.TryLink(int64test, '.c'):
- stub_env.Append(CPPDEFINES = ['_NSIS_NO_INT64_SHR'])
-
-conf.Finish()
-
-#
-# MSVC 2005 requires the memset CRT function to be present
-#
-
-conf = defenv.Configure(custom_tests = { 'CheckRequirement' : check_requirement })
-
-if conf.CheckRequirement('memset', 'char c[128] = "test";'):
- add_file('memset.c')
-
-conf.Finish()
-
-### return
-
-Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
+print "Using Microsoft tools configuration"
+
+Import('defenv')
+
+### flags
+
+defenv['ENTRY_FLAG'] = lambda x: '/entry:' + x
+defenv['MAP_FLAG'] = '/map'
+defenv['NODEFLIBS_FLAG'] = '/NODEFAULTLIB'
+defenv['C_FLAG'] = '/TC'
+defenv['CPP_FLAG'] = '/TP'
+defenv['CPP_REQUIRES_STDLIB'] = 0
+defenv['SUBSYS_CON'] = '/subsystem:console'
+defenv['MSVCRT_FLAG'] = '/MD'
+
+if float(defenv['MSVS_VERSION'].replace('Exp','')) >= 8.0:
+ defenv['EXCEPTION_FLAG'] = '/EHsc'
+ defenv.Append(CCFLAGS = '/GS-')
+ defenv.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS', '_CRT_NONSTDC_NO_WARNINGS'])
+else:
+ defenv['EXCEPTION_FLAG'] = '/GX'
+
+### debug
+
+if defenv['DEBUG']:
+ defenv.Append(CCFLAGS = '/Zi')
+ defenv.Append(CCFLAGS = '/Fd${TARGET.dir}\\${TARGET.dir.file}.pdb')
+ defenv.Append(LINKFLAGS = '/debug')
+
+### workarounds
+
+# Some Platform SDK version includes a bad version of libcp.lib.
+# if stl usage causes link failure, copy the good libcp.lib
+# from one of the other lib folders and use it instead.
+
+confenv = defenv.Clone()
+conf = confenv.Configure()
+
+libcptest = """
+#include <fstream>
+int main() {
+ // %s
+ std::ofstream header("test", std::ofstream::out);
+ return 0;
+}
+"""
+
+conf.env.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath)
+conf.env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
+
+if not conf.TryLink(libcptest % 'no change', '.cpp'):
+ import os, shutil
+
+ libdirs = defenv['ENV']['LIB'].split(os.pathsep)
+
+ for libdir in libdirs:
+ try:
+ libcp = r'%s\libcp.lib' % libdir
+ shutil.copy(libcp, Dir('#/.sconf_temp').abspath)
+ if conf.TryLink(libcptest % (r'using %s' % libcp), '.cpp'):
+ defenv.PrependENVPath('LIB', Dir('#/.sconf_temp').abspath)
+ break
+ except IOError:
+ continue
+ else:
+ print "*** Couldn't find a good version of libcp.lib"
+ Exit(2)
+
+conf.Finish()
+
+### stub environment
+
+stub_env = defenv.Clone()
+
+if not defenv['DEBUG']:
+ stub_env.Append(CCFLAGS = '/O1') # optimize for size
+stub_env.Append(CCFLAGS = '/W3') # level 3 warnings
+
+stub_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
+stub_env.Append(LINKFLAGS = '/entry:WinMain') # entry point
+stub_env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no default libraries
+stub_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
+stub_env.Append(CCFLAGS = '/FAcs') # full listing files
+stub_env.Append(CCFLAGS = '/Fa${TARGET}.lst') # listing file name
+
+### makensis environment
+
+makensis_env = defenv.Clone()
+
+if not defenv['DEBUG']:
+ makensis_env.Append(CCFLAGS = '/O2') # optimize for speed
+makensis_env.Append(CCFLAGS = '$EXCEPTION_FLAG') # enable exceptions
+makensis_env.Append(CCFLAGS = '/W3') # level 3 warnings
+
+makensis_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
+makensis_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
+
+### plugin environment
+
+plugin_env = defenv.Clone(no_import_lib = 1)
+
+if not defenv['DEBUG']:
+ plugin_env.Append(CCFLAGS = '/O1') # optimize for size
+plugin_env.Append(CCFLAGS = '/W3') # level 3 warnings
+
+plugin_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
+plugin_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
+
+### util environment
+
+util_env = defenv.Clone()
+
+if not defenv['DEBUG']:
+ util_env.Append(CCFLAGS = '/O1') # optimize for speed
+util_env.Append(CCFLAGS = '/W3') # level 3 warnings
+
+util_env.Append(LINKFLAGS = '/opt:nowin98') # 512 bytes align
+util_env.Append(LINKFLAGS = '$MAP_FLAG') # generate map file
+
+### cross-platform util environment
+
+cp_util_env = util_env.Clone()
+
+### test environment
+
+test_env = defenv.Clone()
+
+### weird compiler requirements
+
+def check_requirement(ctx, func, trigger):
+ ctx.Message('Checking for %s requirement... ' % func)
+
+ flags = ctx.env['LINKFLAGS']
+
+ ctx.env.Append(LINKFLAGS = '$NODEFLIBS_FLAG')
+ ctx.env.Append(LINKFLAGS = '${ENTRY_FLAG("main")}')
+
+ test = """
+ int main() {
+ %s
+ return 0;
+ }
+ """ % trigger
+
+ result = not ctx.TryLink(test, '.c')
+ ctx.Result(result)
+
+ ctx.env['LINKFLAGS'] = flags
+
+ return result
+
+def add_file_to_emitter(env, emitter_name, file):
+ try:
+ original_emitter = env[emitter_name]
+ if type(original_emitter) == list:
+ original_emitter = original_emitter[0]
+ except KeyError:
+ original_emitter = None
+
+ def emitter(target, source, env):
+ if original_emitter:
+ target, source = original_emitter(target, source, env)
+
+ if '$NODEFLIBS_FLAG' not in env['LINKFLAGS']:
+ return target, source
+
+ return target, source + env.Object(emitter_name, file)
+
+ env[emitter_name] = emitter
+
+def add_file(file):
+ file = File(file)
+ add_file_to_emitter(stub_env, 'PROGEMITTER', file)
+ add_file_to_emitter(util_env, 'PROGEMITTER', file)
+ add_file_to_emitter(plugin_env, 'SHLIBEMITTER', file)
+
+#
+# MSVC 6 SP6 doesn't like direct shifting of 64-bit integers.
+# It generates a call to ___aullshr which requires libc, which
+# we don't like. However, it does agree to work properly with
+# a call to Int64ShrlMod32.
+#
+
+conf = stub_env.Configure()
+
+int64test = """
+#include <windows.h>
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow) {
+ ULARGE_INTEGER *i = 0;
+ return (int)(i->QuadPart >> 10);
+}
+"""
+
+if not conf.TryLink(int64test, '.c'):
+ stub_env.Append(CPPDEFINES = ['_NSIS_NO_INT64_SHR'])
+
+conf.Finish()
+
+#
+# MSVC 2005 requires the memset CRT function to be present
+#
+
+conf = defenv.Configure(custom_tests = { 'CheckRequirement' : check_requirement })
+
+if conf.CheckRequirement('memset', 'char c[128] = "test";'):
+ add_file('memset.c')
+
+conf.Finish()
+
+### return
+
+Return('stub_env makensis_env plugin_env util_env cp_util_env test_env')
diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py
index 04e5887..6d4f259 100755
--- a/SCons/Tools/crossmingw.py
+++ b/SCons/Tools/crossmingw.py
@@ -1,177 +1,177 @@
-"""SCons.Tool.gcc
-
-Tool-specific initialization for MinGW (http://www.mingw.org/)
-
-There normally shouldn't be any need to import this module directly.
-It will usually be imported through the generic SCons.Tool.Tool()
-selection method.
-
-"""
-
-#
-# Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "/home/scons/scons/branch.0/branch.96/baseline/src/engine/SCons/Tool/mingw.py 0.96.90.D001 2005/02/15 20:11:37 knight"
-
-import os
-import os.path
-import string
-
-import SCons.Action
-import SCons.Builder
-import SCons.Tool
-import SCons.Util
-
-# This is what we search for to find mingw:
-prefixes = SCons.Util.Split("""
- mingw32-
- mingw32msvc-
- i386-mingw32-
- i486-mingw32-
- i586-mingw32-
- i686-mingw32-
- i386-mingw32msvc-
- i486-mingw32msvc-
- i586-mingw32msvc-
- i686-mingw32msvc-
-""")
-
-def find(env):
- for prefix in prefixes:
- # First search in the SCons path and then the OS path:
- if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
- return prefix
-
- return ''
-
-def shlib_generator(target, source, env, for_signature):
- cmd = SCons.Util.CLVar(['$SHLINK', '$SHLINKFLAGS'])
-
- dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
- if dll: cmd.extend(['-o', dll])
-
- cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
-
- implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
- if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
-
- def_target = env.FindIxes(target, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
- if def_target: cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
-
- return [cmd]
-
-def shlib_emitter(target, source, env):
- dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
- no_import_lib = env.get('no_import_lib', 0)
-
- if not dll:
- raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
-
- if not no_import_lib and \
- not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
-
- # Append an import library to the list of targets.
- target.append(env.ReplaceIxes(dll,
- 'SHLIBPREFIX', 'SHLIBSUFFIX',
- 'LIBPREFIX', 'LIBSUFFIX'))
-
- # Append a def file target if there isn't already a def file target
- # or a def file source. There is no option to disable def file
- # target emitting, because I can't figure out why someone would ever
- # want to turn it off.
- def_source = env.FindIxes(source, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
- def_target = env.FindIxes(target, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
- if not def_source and not def_target:
- target.append(env.ReplaceIxes(dll,
- 'SHLIBPREFIX', 'SHLIBSUFFIX',
- 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX'))
-
- return (target, source)
-
-
-shlib_action = SCons.Action.Action(shlib_generator, generator=1)
-
-res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
-
-res_builder = SCons.Builder.Builder(action=res_action, suffix='.o',
- source_scanner=SCons.Tool.SourceFileScanner)
-SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
-
-def generate(env):
- mingw_prefix = find(env)
-
- if mingw_prefix:
- dir = os.path.dirname(env.WhereIs(mingw_prefix + 'gcc') or SCons.Util.WhereIs(mingw_prefix + 'gcc'))
-
- # The mingw bin directory must be added to the path:
- path = env['ENV'].get('PATH', [])
- if not path:
- path = []
- if SCons.Util.is_String(path):
- path = string.split(path, os.pathsep)
-
- env['ENV']['PATH'] = string.join([dir] + path, os.pathsep)
-
- # Most of mingw is the same as gcc and friends...
- gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas']
- for tool in gnu_tools:
- SCons.Tool.Tool(tool)(env)
-
- #... but a few things differ:
- env['CC'] = mingw_prefix + 'gcc'
- env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
- env['CXX'] = mingw_prefix + 'g++'
- env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
- env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
- env['SHLINKCOM'] = shlib_action
- env.Append(SHLIBEMITTER = [shlib_emitter])
- env['LINK'] = mingw_prefix + 'g++'
- env['AS'] = mingw_prefix + 'as'
- env['WIN32DEFPREFIX'] = ''
- env['WIN32DEFSUFFIX'] = '.def'
- env['SHOBJSUFFIX'] = '.o'
- env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
-
- env['RC'] = mingw_prefix + 'windres'
- env['RCFLAGS'] = SCons.Util.CLVar('')
- env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS ${INCPREFIX}${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
- env['BUILDERS']['RES'] = res_builder
-
- # Some setting from the platform also have to be overridden:
- env['OBJPREFIX'] = ''
- env['OBJSUFFIX'] = '.o'
- env['LIBPREFIX'] = 'lib'
- env['LIBSUFFIX'] = '.a'
- env['SHOBJPREFIX'] = '$OBJPREFIX'
- env['SHOBJSUFFIX'] = '$OBJSUFFIX'
- env['PROGPREFIX'] = ''
- env['PROGSUFFIX'] = '.exe'
- env['LIBPREFIX'] = ''
- env['LIBSUFFIX'] = '.lib'
- env['SHLIBPREFIX'] = ''
- env['SHLIBSUFFIX'] = '.dll'
- env['LIBPREFIXES'] = [ '$LIBPREFIX' ]
- env['LIBSUFFIXES'] = [ '$LIBSUFFIX' ]
-
-def exists(env):
- return find(env)
+"""SCons.Tool.gcc
+
+Tool-specific initialization for MinGW (http://www.mingw.org/)
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+
+#
+# Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "/home/scons/scons/branch.0/branch.96/baseline/src/engine/SCons/Tool/mingw.py 0.96.90.D001 2005/02/15 20:11:37 knight"
+
+import os
+import os.path
+import string
+
+import SCons.Action
+import SCons.Builder
+import SCons.Tool
+import SCons.Util
+
+# This is what we search for to find mingw:
+prefixes = SCons.Util.Split("""
+ mingw32-
+ mingw32msvc-
+ i386-mingw32-
+ i486-mingw32-
+ i586-mingw32-
+ i686-mingw32-
+ i386-mingw32msvc-
+ i486-mingw32msvc-
+ i586-mingw32msvc-
+ i686-mingw32msvc-
+""")
+
+def find(env):
+ for prefix in prefixes:
+ # First search in the SCons path and then the OS path:
+ if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
+ return prefix
+
+ return ''
+
+def shlib_generator(target, source, env, for_signature):
+ cmd = SCons.Util.CLVar(['$SHLINK', '$SHLINKFLAGS'])
+
+ dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+ if dll: cmd.extend(['-o', dll])
+
+ cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
+
+ implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
+ if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
+
+ def_target = env.FindIxes(target, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
+ if def_target: cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
+
+ return [cmd]
+
+def shlib_emitter(target, source, env):
+ dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+ no_import_lib = env.get('no_import_lib', 0)
+
+ if not dll:
+ raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
+
+ if not no_import_lib and \
+ not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
+
+ # Append an import library to the list of targets.
+ target.append(env.ReplaceIxes(dll,
+ 'SHLIBPREFIX', 'SHLIBSUFFIX',
+ 'LIBPREFIX', 'LIBSUFFIX'))
+
+ # Append a def file target if there isn't already a def file target
+ # or a def file source. There is no option to disable def file
+ # target emitting, because I can't figure out why someone would ever
+ # want to turn it off.
+ def_source = env.FindIxes(source, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
+ def_target = env.FindIxes(target, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
+ if not def_source and not def_target:
+ target.append(env.ReplaceIxes(dll,
+ 'SHLIBPREFIX', 'SHLIBSUFFIX',
+ 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX'))
+
+ return (target, source)
+
+
+shlib_action = SCons.Action.Action(shlib_generator, generator=1)
+
+res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
+
+res_builder = SCons.Builder.Builder(action=res_action, suffix='.o',
+ source_scanner=SCons.Tool.SourceFileScanner)
+SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
+
+def generate(env):
+ mingw_prefix = find(env)
+
+ if mingw_prefix:
+ dir = os.path.dirname(env.WhereIs(mingw_prefix + 'gcc') or SCons.Util.WhereIs(mingw_prefix + 'gcc'))
+
+ # The mingw bin directory must be added to the path:
+ path = env['ENV'].get('PATH', [])
+ if not path:
+ path = []
+ if SCons.Util.is_String(path):
+ path = string.split(path, os.pathsep)
+
+ env['ENV']['PATH'] = string.join([dir] + path, os.pathsep)
+
+ # Most of mingw is the same as gcc and friends...
+ gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas']
+ for tool in gnu_tools:
+ SCons.Tool.Tool(tool)(env)
+
+ #... but a few things differ:
+ env['CC'] = mingw_prefix + 'gcc'
+ env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
+ env['CXX'] = mingw_prefix + 'g++'
+ env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
+ env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
+ env['SHLINKCOM'] = shlib_action
+ env.Append(SHLIBEMITTER = [shlib_emitter])
+ env['LINK'] = mingw_prefix + 'g++'
+ env['AS'] = mingw_prefix + 'as'
+ env['WIN32DEFPREFIX'] = ''
+ env['WIN32DEFSUFFIX'] = '.def'
+ env['SHOBJSUFFIX'] = '.o'
+ env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
+
+ env['RC'] = mingw_prefix + 'windres'
+ env['RCFLAGS'] = SCons.Util.CLVar('')
+ env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS ${INCPREFIX}${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
+ env['BUILDERS']['RES'] = res_builder
+
+ # Some setting from the platform also have to be overridden:
+ env['OBJPREFIX'] = ''
+ env['OBJSUFFIX'] = '.o'
+ env['LIBPREFIX'] = 'lib'
+ env['LIBSUFFIX'] = '.a'
+ env['SHOBJPREFIX'] = '$OBJPREFIX'
+ env['SHOBJSUFFIX'] = '$OBJSUFFIX'
+ env['PROGPREFIX'] = ''
+ env['PROGSUFFIX'] = '.exe'
+ env['LIBPREFIX'] = ''
+ env['LIBSUFFIX'] = '.lib'
+ env['SHLIBPREFIX'] = ''
+ env['SHLIBSUFFIX'] = '.dll'
+ env['LIBPREFIXES'] = [ '$LIBPREFIX' ]
+ env['LIBSUFFIXES'] = [ '$LIBSUFFIX' ]
+
+def exists(env):
+ return find(env)
diff --git a/SCons/Tools/mstoolkit.py b/SCons/Tools/mstoolkit.py
index 21e2859..c2c9276 100755
--- a/SCons/Tools/mstoolkit.py
+++ b/SCons/Tools/mstoolkit.py
@@ -1,345 +1,345 @@
-"""engine.SCons.Tool.mstoolkit.py
-
-Tool-specific initialization for Microsoft Visual C/C++ Toolkit Commandline
-
-There normally shouldn't be any need to import this module directly.
-It will usually be imported through the generic SCons.Tool.Tool()
-selection method.
-
-"""
-
-# Based on http://www.scons.org/cgi-bin/wiki/MicrosoftPlatform
-
-#
-# Copyright (c) 2004 John Connors
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-
-import os.path
-import re
-import string
-import types
-
-import SCons.Action
-import SCons.Builder
-import SCons.Errors
-import SCons.Platform.win32
-import SCons.Tool
-import SCons.Util
-import SCons.Warnings
-
-CSuffixes = ['.c', '.C']
-CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
-
-def get_msvctoolkit_paths():
- """Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
- three environment variables that should be set in order to execute
- the MSVC .NET tools properly, if the information wasn't available
- from the registry."""
-
- MSToolkitDir = None
- paths = {}
- exe_path = ''
- lib_path = ''
- include_path = ''
-
- # First, we get the shell folder for this user:
- if not SCons.Util.can_read_reg:
- raise SCons.Errors.InternalError, "No Windows registry module was found"
-
- # look for toolkit
- if os.environ.has_key('VCToolkitInstallDir'):
- MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
- else:
- raise SCons.Errors.InternalError, "Microsoft Visual C++ Toolkit 2003 directory was not found in the `VCToolkitInstallDir` environment variable."
-
- # look for platform sdk
- if os.environ.has_key('MSSdk'):
- PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
- else:
- try:
- PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
- PlatformSDKDir = str(PlatformSDKDir)
- except SCons.Util.RegError:
- try:
- PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3\Install Dir')[0]
- PlatformSDKDir = str(PlatformSDKDir)
- except SCons.Util.RegError:
- raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
-
- include_path = r'%s\include;%s\include' % (PlatformSDKDir, MSToolkitDir)
- lib_path = r'%s\lib;%s\lib' % (PlatformSDKDir, MSToolkitDir)
- exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
- return (include_path, lib_path, exe_path, PlatformSDKDir)
-
-def validate_vars(env):
- """Validate the PDB, PCH, and PCHSTOP construction variables."""
- if env.has_key('PCH') and env['PCH']:
- if not env.has_key('PCHSTOP'):
- raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
- if not SCons.Util.is_String(env['PCHSTOP']):
- raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
-
-def pch_emitter(target, source, env):
- """Sets up the PDB dependencies for a pch file, and adds the object
- file target."""
-
- validate_vars(env)
-
- pch = None
- obj = None
-
- for t in target:
- if SCons.Util.splitext(str(t))[1] == '.pch':
- pch = t
- if SCons.Util.splitext(str(t))[1] == '.obj':
- obj = t
-
- if not obj:
- obj = SCons.Util.splitext(str(pch))[0]+'.obj'
-
- target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
-
- if env.has_key('PDB') and env['PDB']:
- env.SideEffect(env['PDB'], target)
- env.Precious(env['PDB'])
-
- return (target, source)
-
-def object_emitter(target, source, env, parent_emitter):
- """Sets up the PDB and PCH dependencies for an object file."""
-
- validate_vars(env)
-
- parent_emitter(target, source, env)
-
- if env.has_key('PDB') and env['PDB']:
- env.SideEffect(env['PDB'], target)
- env.Precious(env['PDB'])
-
- if env.has_key('PCH') and env['PCH']:
- env.Depends(target, env['PCH'])
-
- return (target, source)
-
-def static_object_emitter(target, source, env):
- return object_emitter(target, source, env,
- SCons.Defaults.StaticObjectEmitter)
-
-def shared_object_emitter(target, source, env):
- return object_emitter(target, source, env,
- SCons.Defaults.SharedObjectEmitter)
-
-pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
-res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
-
-def pdbGenerator(env, target, source, for_signature):
- if target and env.has_key('PDB') and env['PDB']:
- return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
- '/DEBUG']
-
-def win32ShlinkTargets(target, source, env, for_signature):
- listCmd = []
- dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
- if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
-
- implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
- if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature))
-
- return listCmd
-
-def win32ShlinkSources(target, source, env, for_signature):
- listCmd = []
-
- deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
- for src in source:
- if src == deffile:
- # Treat this source as a .def file.
- listCmd.append("/def:%s" % src.get_string(for_signature))
- else:
- # Just treat it as a generic source file.
- listCmd.append(src)
- return listCmd
-
-def win32LibEmitter(target, source, env):
- # SCons.Tool.msvc.validate_vars(env)
-
- dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX")
- no_import_lib = env.get('no_import_lib', 0)
-
- if not dll:
- raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
-
- if env.get("WIN32_INSERT_DEF", 0) and \
- not env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX"):
-
- # append a def file to the list of sources
- source.append(env.ReplaceIxes(dll,
- "SHLIBPREFIX", "SHLIBSUFFIX",
- "WIN32DEFPREFIX", "WIN32DEFSUFFIX"))
-
- if env.has_key('PDB') and env['PDB']:
- env.SideEffect(env['PDB'], target)
- env.Precious(env['PDB'])
-
- if not no_import_lib and \
- not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
- # Append an import library to the list of targets.
- target.append(env.ReplaceIxes(dll,
- "SHLIBPREFIX", "SHLIBSUFFIX",
- "LIBPREFIX", "LIBSUFFIX"))
- # and .exp file is created if there are exports from a DLL
- target.append(env.ReplaceIxes(dll,
- "SHLIBPREFIX", "SHLIBSUFFIX",
- "WIN32EXPPREFIX", "WIN32EXPSUFFIX"))
-
- return (target, source)
-
-def prog_emitter(target, source, env):
- #SCons.Tool.msvc.validate_vars(env)
-
- if env.has_key('PDB') and env['PDB']:
- env.SideEffect(env['PDB'], target)
- env.Precious(env['PDB'])
-
- return (target,source)
-
-def RegServerFunc(target, source, env):
- if env.has_key('register') and env['register']:
- ret = regServerAction([target[0]], [source[0]], env)
- if ret:
- raise SCons.Errors.UserError, "Unable to register %s" % target[0]
- else:
- print "Registered %s sucessfully" % target[0]
- return ret
- return 0
-
-regServerAction = SCons.Action.Action("$REGSVRCOM")
-regServerCheck = SCons.Action.Action(RegServerFunc, None)
-shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')
-compositeLinkAction = shlibLinkAction + regServerCheck
-
-def generate(env):
- """Add Builders and construction variables for MSVC++ to an Environment."""
- static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
-
- for suffix in CSuffixes:
- static_obj.add_action(suffix, SCons.Defaults.CAction)
- shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
-
- for suffix in CXXSuffixes:
- static_obj.add_action(suffix, SCons.Defaults.CXXAction)
- shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)
-
- SCons.Tool.createStaticLibBuilder(env)
- SCons.Tool.createSharedLibBuilder(env)
- SCons.Tool.createProgBuilder(env)
-
- env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s"%File(PDB)) or ""}'])
- env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
- env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo$TARGET $CCPCHFLAGS $CCPDBFLAGS'
- env['CC'] = 'cl'
- env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
- env['CCCOM'] = '$CC $CCFLAGS $CCCOMFLAGS'
- env['SHCC'] = '$CC'
- env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
- env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CCCOMFLAGS'
- env['CXX'] = '$CC'
- env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)')
- env['CXXCOM'] = '$CXX $CXXFLAGS $CCCOMFLAGS'
- env['SHCXX'] = '$CXX'
- env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
- env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS'
- env['CPPDEFPREFIX'] = '/D'
- env['CPPDEFSUFFIX'] = ''
- env['INCPREFIX'] = '/I'
- env['INCSUFFIX'] = ''
- env['OBJEMITTER'] = static_object_emitter
- env['SHOBJEMITTER'] = shared_object_emitter
- env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
-
- env['RC'] = 'rc'
- env['RCFLAGS'] = SCons.Util.CLVar('')
- env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
- CScan = env.get_scanner('.c')
- if CScan:
- CScan.add_skey('.rc')
- env['BUILDERS']['RES'] = res_builder
-
- include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths()
- env.PrependENVPath('INCLUDE', include_path)
- env.PrependENVPath('LIB', lib_path)
- env.PrependENVPath('PATH', exe_path)
-
- env['ENV']['CPU'] = 'i386'
- env['ENV']['MSSDK'] = sdk_path
- env['ENV']['BkOffice'] = sdk_path
- env['ENV']['Basemake'] = sdk_path + "\\Include\\BKOffice.Mak"
- env['ENV']['INETSDK'] = sdk_path
- env['ENV']['MSSDK'] = sdk_path
- env['ENV']['MSTOOLS'] = sdk_path
- env['ENV']['TARGETOS'] = 'WINNT'
- env['ENV']['APPVER'] = '5.0'
-
- env['CFILESUFFIX'] = '.c'
- env['CXXFILESUFFIX'] = '.cc'
-
- env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS'
- env['BUILDERS']['PCH'] = pch_builder
-
- env['AR'] = '"' +sdk_path + '\\bin\\Win64\\lib.exe"'
- env['ARFLAGS'] = SCons.Util.CLVar('/nologo')
- env['ARCOM'] = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
-
- env['SHLINK'] = '$LINK'
- env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll')
- env['_SHLINK_TARGETS'] = win32ShlinkTargets
- env['_SHLINK_SOURCES'] = win32ShlinkSources
- env['SHLINKCOM'] = compositeLinkAction
- env['SHLIBEMITTER']= win32LibEmitter
- env['LINK'] = '"' +sdk_path + '\\bin\\Win64\\' + 'link.exe"'
- env['LINKFLAGS'] = SCons.Util.CLVar('/nologo')
- env['_PDB'] = pdbGenerator
- env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $SOURCES")}'
- env['PROGEMITTER'] = prog_emitter
- env['LIBDIRPREFIX']='/LIBPATH:'
- env['LIBDIRSUFFIX']=''
- env['LIBLINKPREFIX']=''
- env['LIBLINKSUFFIX']='$LIBSUFFIX'
-
- env['WIN32DEFPREFIX'] = ''
- env['WIN32DEFSUFFIX'] = '.def'
- env['WIN32_INSERT_DEF'] = 0
-
- env['WIN32EXPPREFIX'] = ''
- env['WIN32EXPSUFFIX'] = '.exp'
-
- env['REGSVRACTION'] = regServerCheck
- env['REGSVR'] = os.path.join(SCons.Platform.win32.get_system_root(),'System32','regsvr32')
- env['REGSVRFLAGS'] = '/s '
- env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS $TARGET'
-
- env['MSVS_VERSION'] = '7.1'
-
-
-def exists(env):
- return env.Detect('cl')
+"""engine.SCons.Tool.mstoolkit.py
+
+Tool-specific initialization for Microsoft Visual C/C++ Toolkit Commandline
+
+There normally shouldn't be any need to import this module directly.
+It will usually be imported through the generic SCons.Tool.Tool()
+selection method.
+
+"""
+
+# Based on http://www.scons.org/cgi-bin/wiki/MicrosoftPlatform
+
+#
+# Copyright (c) 2004 John Connors
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+
+import os.path
+import re
+import string
+import types
+
+import SCons.Action
+import SCons.Builder
+import SCons.Errors
+import SCons.Platform.win32
+import SCons.Tool
+import SCons.Util
+import SCons.Warnings
+
+CSuffixes = ['.c', '.C']
+CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
+
+def get_msvctoolkit_paths():
+ """Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
+ three environment variables that should be set in order to execute
+ the MSVC .NET tools properly, if the information wasn't available
+ from the registry."""
+
+ MSToolkitDir = None
+ paths = {}
+ exe_path = ''
+ lib_path = ''
+ include_path = ''
+
+ # First, we get the shell folder for this user:
+ if not SCons.Util.can_read_reg:
+ raise SCons.Errors.InternalError, "No Windows registry module was found"
+
+ # look for toolkit
+ if os.environ.has_key('VCToolkitInstallDir'):
+ MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
+ else:
+ raise SCons.Errors.InternalError, "Microsoft Visual C++ Toolkit 2003 directory was not found in the `VCToolkitInstallDir` environment variable."
+
+ # look for platform sdk
+ if os.environ.has_key('MSSdk'):
+ PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
+ else:
+ try:
+ PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
+ PlatformSDKDir = str(PlatformSDKDir)
+ except SCons.Util.RegError:
+ try:
+ PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3\Install Dir')[0]
+ PlatformSDKDir = str(PlatformSDKDir)
+ except SCons.Util.RegError:
+ raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
+
+ include_path = r'%s\include;%s\include' % (PlatformSDKDir, MSToolkitDir)
+ lib_path = r'%s\lib;%s\lib' % (PlatformSDKDir, MSToolkitDir)
+ exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
+ return (include_path, lib_path, exe_path, PlatformSDKDir)
+
+def validate_vars(env):
+ """Validate the PDB, PCH, and PCHSTOP construction variables."""
+ if env.has_key('PCH') and env['PCH']:
+ if not env.has_key('PCHSTOP'):
+ raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
+ if not SCons.Util.is_String(env['PCHSTOP']):
+ raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
+
+def pch_emitter(target, source, env):
+ """Sets up the PDB dependencies for a pch file, and adds the object
+ file target."""
+
+ validate_vars(env)
+
+ pch = None
+ obj = None
+
+ for t in target:
+ if SCons.Util.splitext(str(t))[1] == '.pch':
+ pch = t
+ if SCons.Util.splitext(str(t))[1] == '.obj':
+ obj = t
+
+ if not obj:
+ obj = SCons.Util.splitext(str(pch))[0]+'.obj'
+
+ target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
+
+ if env.has_key('PDB') and env['PDB']:
+ env.SideEffect(env['PDB'], target)
+ env.Precious(env['PDB'])
+
+ return (target, source)
+
+def object_emitter(target, source, env, parent_emitter):
+ """Sets up the PDB and PCH dependencies for an object file."""
+
+ validate_vars(env)
+
+ parent_emitter(target, source, env)
+
+ if env.has_key('PDB') and env['PDB']:
+ env.SideEffect(env['PDB'], target)
+ env.Precious(env['PDB'])
+
+ if env.has_key('PCH') and env['PCH']:
+ env.Depends(target, env['PCH'])
+
+ return (target, source)
+
+def static_object_emitter(target, source, env):
+ return object_emitter(target, source, env,
+ SCons.Defaults.StaticObjectEmitter)
+
+def shared_object_emitter(target, source, env):
+ return object_emitter(target, source, env,
+ SCons.Defaults.SharedObjectEmitter)
+
+pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
+res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
+
+def pdbGenerator(env, target, source, for_signature):
+ if target and env.has_key('PDB') and env['PDB']:
+ return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
+ '/DEBUG']
+
+def win32ShlinkTargets(target, source, env, for_signature):
+ listCmd = []
+ dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+ if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
+
+ implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
+ if implib: listCmd.append("/implib:%s"%implib.get_string(for_signature))
+
+ return listCmd
+
+def win32ShlinkSources(target, source, env, for_signature):
+ listCmd = []
+
+ deffile = env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX")
+ for src in source:
+ if src == deffile:
+ # Treat this source as a .def file.
+ listCmd.append("/def:%s" % src.get_string(for_signature))
+ else:
+ # Just treat it as a generic source file.
+ listCmd.append(src)
+ return listCmd
+
+def win32LibEmitter(target, source, env):
+ # SCons.Tool.msvc.validate_vars(env)
+
+ dll = env.FindIxes(target, "SHLIBPREFIX", "SHLIBSUFFIX")
+ no_import_lib = env.get('no_import_lib', 0)
+
+ if not dll:
+ raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
+
+ if env.get("WIN32_INSERT_DEF", 0) and \
+ not env.FindIxes(source, "WIN32DEFPREFIX", "WIN32DEFSUFFIX"):
+
+ # append a def file to the list of sources
+ source.append(env.ReplaceIxes(dll,
+ "SHLIBPREFIX", "SHLIBSUFFIX",
+ "WIN32DEFPREFIX", "WIN32DEFSUFFIX"))
+
+ if env.has_key('PDB') and env['PDB']:
+ env.SideEffect(env['PDB'], target)
+ env.Precious(env['PDB'])
+
+ if not no_import_lib and \
+ not env.FindIxes(target, "LIBPREFIX", "LIBSUFFIX"):
+ # Append an import library to the list of targets.
+ target.append(env.ReplaceIxes(dll,
+ "SHLIBPREFIX", "SHLIBSUFFIX",
+ "LIBPREFIX", "LIBSUFFIX"))
+ # and .exp file is created if there are exports from a DLL
+ target.append(env.ReplaceIxes(dll,
+ "SHLIBPREFIX", "SHLIBSUFFIX",
+ "WIN32EXPPREFIX", "WIN32EXPSUFFIX"))
+
+ return (target, source)
+
+def prog_emitter(target, source, env):
+ #SCons.Tool.msvc.validate_vars(env)
+
+ if env.has_key('PDB') and env['PDB']:
+ env.SideEffect(env['PDB'], target)
+ env.Precious(env['PDB'])
+
+ return (target,source)
+
+def RegServerFunc(target, source, env):
+ if env.has_key('register') and env['register']:
+ ret = regServerAction([target[0]], [source[0]], env)
+ if ret:
+ raise SCons.Errors.UserError, "Unable to register %s" % target[0]
+ else:
+ print "Registered %s sucessfully" % target[0]
+ return ret
+ return 0
+
+regServerAction = SCons.Action.Action("$REGSVRCOM")
+regServerCheck = SCons.Action.Action(RegServerFunc, None)
+shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')
+compositeLinkAction = shlibLinkAction + regServerCheck
+
+def generate(env):
+ """Add Builders and construction variables for MSVC++ to an Environment."""
+ static_obj, shared_obj = SCons.Tool.createObjBuilders(env)
+
+ for suffix in CSuffixes:
+ static_obj.add_action(suffix, SCons.Defaults.CAction)
+ shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
+
+ for suffix in CXXSuffixes:
+ static_obj.add_action(suffix, SCons.Defaults.CXXAction)
+ shared_obj.add_action(suffix, SCons.Defaults.ShCXXAction)
+
+ SCons.Tool.createStaticLibBuilder(env)
+ SCons.Tool.createSharedLibBuilder(env)
+ SCons.Tool.createProgBuilder(env)
+
+ env['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Zi /Fd%s"%File(PDB)) or ""}'])
+ env['CCPCHFLAGS'] = SCons.Util.CLVar(['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'])
+ env['CCCOMFLAGS'] = '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo$TARGET $CCPCHFLAGS $CCPDBFLAGS'
+ env['CC'] = 'cl'
+ env['CCFLAGS'] = SCons.Util.CLVar('/nologo')
+ env['CCCOM'] = '$CC $CCFLAGS $CCCOMFLAGS'
+ env['SHCC'] = '$CC'
+ env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
+ env['SHCCCOM'] = '$SHCC $SHCCFLAGS $CCCOMFLAGS'
+ env['CXX'] = '$CC'
+ env['CXXFLAGS'] = SCons.Util.CLVar('$CCFLAGS $( /TP $)')
+ env['CXXCOM'] = '$CXX $CXXFLAGS $CCCOMFLAGS'
+ env['SHCXX'] = '$CXX'
+ env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
+ env['SHCXXCOM'] = '$SHCXX $SHCXXFLAGS $CCCOMFLAGS'
+ env['CPPDEFPREFIX'] = '/D'
+ env['CPPDEFSUFFIX'] = ''
+ env['INCPREFIX'] = '/I'
+ env['INCSUFFIX'] = ''
+ env['OBJEMITTER'] = static_object_emitter
+ env['SHOBJEMITTER'] = shared_object_emitter
+ env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
+
+ env['RC'] = 'rc'
+ env['RCFLAGS'] = SCons.Util.CLVar('')
+ env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES'
+ CScan = env.get_scanner('.c')
+ if CScan:
+ CScan.add_skey('.rc')
+ env['BUILDERS']['RES'] = res_builder
+
+ include_path, lib_path, exe_path, sdk_path = get_msvctoolkit_paths()
+ env.PrependENVPath('INCLUDE', include_path)
+ env.PrependENVPath('LIB', lib_path)
+ env.PrependENVPath('PATH', exe_path)
+
+ env['ENV']['CPU'] = 'i386'
+ env['ENV']['MSSDK'] = sdk_path
+ env['ENV']['BkOffice'] = sdk_path
+ env['ENV']['Basemake'] = sdk_path + "\\Include\\BKOffice.Mak"
+ env['ENV']['INETSDK'] = sdk_path
+ env['ENV']['MSSDK'] = sdk_path
+ env['ENV']['MSTOOLS'] = sdk_path
+ env['ENV']['TARGETOS'] = 'WINNT'
+ env['ENV']['APPVER'] = '5.0'
+
+ env['CFILESUFFIX'] = '.c'
+ env['CXXFILESUFFIX'] = '.cc'
+
+ env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS'
+ env['BUILDERS']['PCH'] = pch_builder
+
+ env['AR'] = '"' +sdk_path + '\\bin\\Win64\\lib.exe"'
+ env['ARFLAGS'] = SCons.Util.CLVar('/nologo')
+ env['ARCOM'] = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
+
+ env['SHLINK'] = '$LINK'
+ env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS /dll')
+ env['_SHLINK_TARGETS'] = win32ShlinkTargets
+ env['_SHLINK_SOURCES'] = win32ShlinkSources
+ env['SHLINKCOM'] = compositeLinkAction
+ env['SHLIBEMITTER']= win32LibEmitter
+ env['LINK'] = '"' +sdk_path + '\\bin\\Win64\\' + 'link.exe"'
+ env['LINKFLAGS'] = SCons.Util.CLVar('/nologo')
+ env['_PDB'] = pdbGenerator
+ env['LINKCOM'] = '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET $( $_LIBDIRFLAGS $) $_LIBFLAGS $_PDB $SOURCES")}'
+ env['PROGEMITTER'] = prog_emitter
+ env['LIBDIRPREFIX']='/LIBPATH:'
+ env['LIBDIRSUFFIX']=''
+ env['LIBLINKPREFIX']=''
+ env['LIBLINKSUFFIX']='$LIBSUFFIX'
+
+ env['WIN32DEFPREFIX'] = ''
+ env['WIN32DEFSUFFIX'] = '.def'
+ env['WIN32_INSERT_DEF'] = 0
+
+ env['WIN32EXPPREFIX'] = ''
+ env['WIN32EXPSUFFIX'] = '.exp'
+
+ env['REGSVRACTION'] = regServerCheck
+ env['REGSVR'] = os.path.join(SCons.Platform.win32.get_system_root(),'System32','regsvr32')
+ env['REGSVRFLAGS'] = '/s '
+ env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS $TARGET'
+
+ env['MSVS_VERSION'] = '7.1'
+
+
+def exists(env):
+ return env.Detect('cl')
diff --git a/SCons/config.py b/SCons/config.py
index c525413..111deae 100755
--- a/SCons/config.py
+++ b/SCons/config.py
@@ -1,509 +1,509 @@
-Import('defenv')
-
-### Configuration options
-
-cfg = Options()
-
-cfg.Add(
- (
- 'NSIS_MAX_STRLEN',
- 'defines the maximum string length for internal variables and stack entries. 1024 should be plenty, but if you are doing crazy registry shit, you might want to bump it up. Generally it adds about 16-32x the memory, so setting this to 4096 from 1024 will add around 64k of memory usage (not really a big deal, but not usually needed).',
- 1024
- )
-)
-
-cfg.Add(
- (
- 'NSIS_MAX_INST_TYPES',
- 'defines the maximum install types. Note that this should not exceed 32, ever.',
- 32
- )
-)
-
-cfg.Add(
- (
- 'NSIS_DEFAULT_LANG',
- 'defines the default language id NSIS will use if nothing else is defined in the script. Default value is 1033 which is English.',
- 1033
- )
-)
-
-cfg.Add(
- (
- 'NSIS_VARS_SECTION',
- 'defines the name of the PE section containing the runtime variables',
- '.ndata'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_UNINSTALL_SUPPORT',
- "enables the uninstaller support. Turn it off if your installers don't need uninstallers. Adds less than 1kb.",
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_LICENSEPAGE',
- 'enables support for the installer to present a license page.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_COMPONENTPAGE',
- 'enables support for the installer to present a page where you can select what sections are installed. with this disabled, all sections are installed by default',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE',
- 'enables an alternative components page behavior. Checkboxes will only be toggled when clicking on the checkbox itself and not on its label. .onMouseOverSection will only be called when the user selects the component and not when moving the mouse pointer over it.',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_SILENT_SUPPORT',
- 'enables support for making installers that are completely silent.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_VISIBLE_SUPPORT',
- 'enables support for making installers that are visible.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_ENHANCEDUI_SUPPORT',
- 'enables support for CreateFont, SetCtlColors (used by some UIs), SetBrandingImage, .onGUIInit, etc.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_COMPRESSION_SUPPORT',
- 'enables support for making installers that use compression (recommended).',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_COMPRESS_BZIP2_SMALLMODE',
- "if defined, bzip2's decompressor uses bzip2's alternative decompression method that uses less runtime memory, at the expense of speed (and executable size). not recommended.",
- 'no'
- )
-)
-
-cfg.Add(
- (
- 'NSIS_COMPRESS_BZIP2_LEVEL',
- 'bzip2 compression window size. 1-9 is valid. 9 uses the most memory, but typically compresses best (recommended). 1 uses the least memory, but typically compresses the worst.',
- 9
- )
-)
-
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_CRC_SUPPORT',
- 'enables support for installer verification. HIGHLY recommended.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_CRC_ANAL',
- 'makes the CRC verification extremely careful, meaning extra bytes on the end of file, or the first 512 bytes changing, will give error. Enable this if you are paranoid, otherwise leaving it off seems safe (and is less prone to reporting virii). If you will be digitally signing your installers, leave this off.',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_LOG',
- 'enables the logging facility. turning this on (by uncommenting it) adds about 4kb, but can be useful in debugging your installers.',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_LOG_ODS',
- 'makes the logging facility use OutputDebugString instead of a file.',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_LOG_STDOUT',
- 'makes the logging facility use stdout instead of a file.',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_LOG_TIMESTAMP',
- 'adds a timestamp to each log line.',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_BGBG',
- 'enables support for the blue (well, whatever color you want) gradient background window.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_CODECALLBACKS',
- 'enables support for installer code callbacks. recommended, as it uses a minimum of space and allows for neat functionality.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_MOVEONREBOOT',
- 'enables support for uninstallers that automatically delete themselves from the temp directory, as well as the reboot moving/deleting modes of Delete and Rename. Adds about 512 gay bytes..',
- 'yes'
- )
-)
-
-### Instruction enabling configuration
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_ACTIVEXREG',
- 'enables activeX plug-in registration and deregistration, as well as CallInstDLL',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_INTOPTS',
- 'enables support for IntCmp, IntCmpU, IntOp, and IntFmt.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_STROPTS',
- 'enables support for StrCmp, StrCpy, and StrLen, as well as Get*Local.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_STACK',
- 'enables support for the stack (Push, Pop, Exch)',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_FILEFUNCTIONS',
- 'enables support for FileOpen,FileClose, FileSeek, FileRead, and FileWrite.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_FINDFIRST',
- 'enables support for FindFirst, FindNext, and FindClose.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_CREATESHORTCUT',
- 'enables support for CreateShortCut.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_INIFILES',
- 'enables support for ReadINIStr and WriteINIStr.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_REGISTRYFUNCTIONS',
- 'enables support for ReadRegStr, ReadRegDWORD, WriteRegStr, etc etc etc.',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_COPYFILES',
- 'enables support for CopyFiles',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_REBOOT',
- 'enables support for Reboot, IfRebootFlag, SetRebootFlag',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_FNUTIL',
- 'enables support for GetFullPathName, GetTempFileName, and SearchPath',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_EXECUTE',
- 'enables support for Exec and ExecWait',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_SHELLEXECUTE',
- 'enables support for ExecShell',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_GETDLLVERSION',
- 'enables support for GetDLLVersion',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_GETFILETIME',
- 'enables support for GetFileTime',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_HWNDS',
- 'enables support for FindWindow, SendMessage, and IsWindow',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_ENVIRONMENT',
- 'enables support for ReadEnvStr and ExpandEnvStrings',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_RMDIR',
- 'enables support for RMDir',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_FILE',
- 'enables support for File (extracting files)',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_DELETE',
- 'enables support for Delete (delete files)',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_RENAME',
- 'enables support for Rename (rename files)',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_MESSAGEBOX',
- 'enables support for MessageBox',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_VERSION_INFO',
- 'enables support for version information in the installer',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_FIX_DEFINES_IN_STRINGS',
- 'fixes defines inside defines and handles chars $ perfectly',
- 'no'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_SUPPORT_STANDARD_PREDEFINES',
- 'enables standard predefines - __FILE__, __LINE__, __DATE__, __TIME__ and __TIMESTAMP__',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_LOCKWINDOW_SUPPORT',
- 'enables the LockWindow command',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_PLUGIN_SUPPORT',
- 'enables installer plug-ins support',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_FIX_COMMENT_HANDLING',
- 'fixes comment handling',
- 'yes'
- )
-)
-
-cfg.Add(
- BoolOption(
- 'NSIS_CONFIG_CONST_DATA_PATH',
- 'determines if plugins, includes, stubs etc. are located in a constant path set at build-time',
- defenv['PLATFORM'] != 'win32'
- )
-)
-
-### Generate help
-
-Help(cfg.GenerateHelpText(defenv))
-
-### Apply configuration
-
-env = Environment()
-cfg.Update(env)
-
-def AddValuedDefine(define):
- defenv.Append(NSIS_CPPDEFINES = [(define, env[define])])
-
-def AddBoolDefine(define):
- if env[define]:
- defenv.Append(NSIS_CPPDEFINES = [define])
-
-def AddStringDefine(define):
- defenv.Append(NSIS_CPPDEFINES = [(define, '"%s"' % env[define])])
-
-AddValuedDefine('NSIS_MAX_STRLEN')
-AddValuedDefine('NSIS_MAX_INST_TYPES')
-AddValuedDefine('NSIS_DEFAULT_LANG')
-
-AddBoolDefine('NSIS_CONFIG_UNINSTALL_SUPPORT')
-AddBoolDefine('NSIS_CONFIG_LICENSEPAGE')
-AddBoolDefine('NSIS_CONFIG_COMPONENTPAGE')
-AddBoolDefine('NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE')
-AddBoolDefine('NSIS_CONFIG_SILENT_SUPPORT')
-AddBoolDefine('NSIS_CONFIG_VISIBLE_SUPPORT')
-AddBoolDefine('NSIS_CONFIG_ENHANCEDUI_SUPPORT')
-AddBoolDefine('NSIS_CONFIG_COMPRESSION_SUPPORT')
-AddBoolDefine('NSIS_COMPRESS_BZIP2_SMALLMODE')
-
-AddValuedDefine('NSIS_COMPRESS_BZIP2_LEVEL')
-
-AddBoolDefine('NSIS_CONFIG_CRC_SUPPORT')
-AddBoolDefine('NSIS_CONFIG_CRC_ANAL')
-AddBoolDefine('NSIS_CONFIG_LOG')
-AddBoolDefine('NSIS_CONFIG_LOG_ODS')
-AddBoolDefine('NSIS_CONFIG_LOG_STDOUT')
-AddBoolDefine('NSIS_CONFIG_LOG_TIMESTAMP')
-AddBoolDefine('NSIS_SUPPORT_BGBG')
-AddBoolDefine('NSIS_SUPPORT_CODECALLBACKS')
-AddBoolDefine('NSIS_SUPPORT_MOVEONREBOOT')
-AddBoolDefine('NSIS_SUPPORT_ACTIVEXREG')
-AddBoolDefine('NSIS_SUPPORT_INTOPTS')
-AddBoolDefine('NSIS_SUPPORT_STROPTS')
-AddBoolDefine('NSIS_SUPPORT_STACK')
-AddBoolDefine('NSIS_SUPPORT_FILEFUNCTIONS')
-AddBoolDefine('NSIS_SUPPORT_FINDFIRST')
-AddBoolDefine('NSIS_SUPPORT_CREATESHORTCUT')
-AddBoolDefine('NSIS_SUPPORT_INIFILES')
-AddBoolDefine('NSIS_SUPPORT_REGISTRYFUNCTIONS')
-AddBoolDefine('NSIS_SUPPORT_COPYFILES')
-AddBoolDefine('NSIS_SUPPORT_REBOOT')
-AddBoolDefine('NSIS_SUPPORT_FNUTIL')
-AddBoolDefine('NSIS_SUPPORT_EXECUTE')
-AddBoolDefine('NSIS_SUPPORT_SHELLEXECUTE')
-AddBoolDefine('NSIS_SUPPORT_GETDLLVERSION')
-AddBoolDefine('NSIS_SUPPORT_GETFILETIME')
-AddBoolDefine('NSIS_SUPPORT_HWNDS')
-AddBoolDefine('NSIS_SUPPORT_ENVIRONMENT')
-AddBoolDefine('NSIS_SUPPORT_RMDIR')
-AddBoolDefine('NSIS_SUPPORT_FILE')
-AddBoolDefine('NSIS_SUPPORT_DELETE')
-AddBoolDefine('NSIS_SUPPORT_RENAME')
-AddBoolDefine('NSIS_SUPPORT_MESSAGEBOX')
-AddBoolDefine('NSIS_SUPPORT_VERSION_INFO')
-AddBoolDefine('NSIS_FIX_DEFINES_IN_STRINGS')
-AddBoolDefine('NSIS_SUPPORT_STANDARD_PREDEFINES')
-AddBoolDefine('NSIS_LOCKWINDOW_SUPPORT')
-AddBoolDefine('NSIS_CONFIG_PLUGIN_SUPPORT')
-AddBoolDefine('NSIS_FIX_COMMENT_HANDLING')
-AddBoolDefine('NSIS_CONFIG_CONST_DATA_PATH')
-
-AddStringDefine('NSIS_VARS_SECTION')
+Import('defenv')
+
+### Configuration options
+
+cfg = Options()
+
+cfg.Add(
+ (
+ 'NSIS_MAX_STRLEN',
+ 'defines the maximum string length for internal variables and stack entries. 1024 should be plenty, but if you are doing crazy registry shit, you might want to bump it up. Generally it adds about 16-32x the memory, so setting this to 4096 from 1024 will add around 64k of memory usage (not really a big deal, but not usually needed).',
+ 1024
+ )
+)
+
+cfg.Add(
+ (
+ 'NSIS_MAX_INST_TYPES',
+ 'defines the maximum install types. Note that this should not exceed 32, ever.',
+ 32
+ )
+)
+
+cfg.Add(
+ (
+ 'NSIS_DEFAULT_LANG',
+ 'defines the default language id NSIS will use if nothing else is defined in the script. Default value is 1033 which is English.',
+ 1033
+ )
+)
+
+cfg.Add(
+ (
+ 'NSIS_VARS_SECTION',
+ 'defines the name of the PE section containing the runtime variables',
+ '.ndata'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_UNINSTALL_SUPPORT',
+ "enables the uninstaller support. Turn it off if your installers don't need uninstallers. Adds less than 1kb.",
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_LICENSEPAGE',
+ 'enables support for the installer to present a license page.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_COMPONENTPAGE',
+ 'enables support for the installer to present a page where you can select what sections are installed. with this disabled, all sections are installed by default',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE',
+ 'enables an alternative components page behavior. Checkboxes will only be toggled when clicking on the checkbox itself and not on its label. .onMouseOverSection will only be called when the user selects the component and not when moving the mouse pointer over it.',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_SILENT_SUPPORT',
+ 'enables support for making installers that are completely silent.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_VISIBLE_SUPPORT',
+ 'enables support for making installers that are visible.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_ENHANCEDUI_SUPPORT',
+ 'enables support for CreateFont, SetCtlColors (used by some UIs), SetBrandingImage, .onGUIInit, etc.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_COMPRESSION_SUPPORT',
+ 'enables support for making installers that use compression (recommended).',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_COMPRESS_BZIP2_SMALLMODE',
+ "if defined, bzip2's decompressor uses bzip2's alternative decompression method that uses less runtime memory, at the expense of speed (and executable size). not recommended.",
+ 'no'
+ )
+)
+
+cfg.Add(
+ (
+ 'NSIS_COMPRESS_BZIP2_LEVEL',
+ 'bzip2 compression window size. 1-9 is valid. 9 uses the most memory, but typically compresses best (recommended). 1 uses the least memory, but typically compresses the worst.',
+ 9
+ )
+)
+
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_CRC_SUPPORT',
+ 'enables support for installer verification. HIGHLY recommended.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_CRC_ANAL',
+ 'makes the CRC verification extremely careful, meaning extra bytes on the end of file, or the first 512 bytes changing, will give error. Enable this if you are paranoid, otherwise leaving it off seems safe (and is less prone to reporting virii). If you will be digitally signing your installers, leave this off.',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_LOG',
+ 'enables the logging facility. turning this on (by uncommenting it) adds about 4kb, but can be useful in debugging your installers.',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_LOG_ODS',
+ 'makes the logging facility use OutputDebugString instead of a file.',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_LOG_STDOUT',
+ 'makes the logging facility use stdout instead of a file.',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_LOG_TIMESTAMP',
+ 'adds a timestamp to each log line.',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_BGBG',
+ 'enables support for the blue (well, whatever color you want) gradient background window.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_CODECALLBACKS',
+ 'enables support for installer code callbacks. recommended, as it uses a minimum of space and allows for neat functionality.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_MOVEONREBOOT',
+ 'enables support for uninstallers that automatically delete themselves from the temp directory, as well as the reboot moving/deleting modes of Delete and Rename. Adds about 512 gay bytes..',
+ 'yes'
+ )
+)
+
+### Instruction enabling configuration
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_ACTIVEXREG',
+ 'enables activeX plug-in registration and deregistration, as well as CallInstDLL',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_INTOPTS',
+ 'enables support for IntCmp, IntCmpU, IntOp, and IntFmt.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_STROPTS',
+ 'enables support for StrCmp, StrCpy, and StrLen, as well as Get*Local.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_STACK',
+ 'enables support for the stack (Push, Pop, Exch)',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_FILEFUNCTIONS',
+ 'enables support for FileOpen,FileClose, FileSeek, FileRead, and FileWrite.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_FINDFIRST',
+ 'enables support for FindFirst, FindNext, and FindClose.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_CREATESHORTCUT',
+ 'enables support for CreateShortCut.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_INIFILES',
+ 'enables support for ReadINIStr and WriteINIStr.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_REGISTRYFUNCTIONS',
+ 'enables support for ReadRegStr, ReadRegDWORD, WriteRegStr, etc etc etc.',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_COPYFILES',
+ 'enables support for CopyFiles',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_REBOOT',
+ 'enables support for Reboot, IfRebootFlag, SetRebootFlag',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_FNUTIL',
+ 'enables support for GetFullPathName, GetTempFileName, and SearchPath',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_EXECUTE',
+ 'enables support for Exec and ExecWait',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_SHELLEXECUTE',
+ 'enables support for ExecShell',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_GETDLLVERSION',
+ 'enables support for GetDLLVersion',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_GETFILETIME',
+ 'enables support for GetFileTime',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_HWNDS',
+ 'enables support for FindWindow, SendMessage, and IsWindow',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_ENVIRONMENT',
+ 'enables support for ReadEnvStr and ExpandEnvStrings',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_RMDIR',
+ 'enables support for RMDir',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_FILE',
+ 'enables support for File (extracting files)',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_DELETE',
+ 'enables support for Delete (delete files)',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_RENAME',
+ 'enables support for Rename (rename files)',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_MESSAGEBOX',
+ 'enables support for MessageBox',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_VERSION_INFO',
+ 'enables support for version information in the installer',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_FIX_DEFINES_IN_STRINGS',
+ 'fixes defines inside defines and handles chars $ perfectly',
+ 'no'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_SUPPORT_STANDARD_PREDEFINES',
+ 'enables standard predefines - __FILE__, __LINE__, __DATE__, __TIME__ and __TIMESTAMP__',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_LOCKWINDOW_SUPPORT',
+ 'enables the LockWindow command',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_PLUGIN_SUPPORT',
+ 'enables installer plug-ins support',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_FIX_COMMENT_HANDLING',
+ 'fixes comment handling',
+ 'yes'
+ )
+)
+
+cfg.Add(
+ BoolOption(
+ 'NSIS_CONFIG_CONST_DATA_PATH',
+ 'determines if plugins, includes, stubs etc. are located in a constant path set at build-time',
+ defenv['PLATFORM'] != 'win32'
+ )
+)
+
+### Generate help
+
+Help(cfg.GenerateHelpText(defenv))
+
+### Apply configuration
+
+env = Environment()
+cfg.Update(env)
+
+def AddValuedDefine(define):
+ defenv.Append(NSIS_CPPDEFINES = [(define, env[define])])
+
+def AddBoolDefine(define):
+ if env[define]:
+ defenv.Append(NSIS_CPPDEFINES = [define])
+
+def AddStringDefine(define):
+ defenv.Append(NSIS_CPPDEFINES = [(define, '"%s"' % env[define])])
+
+AddValuedDefine('NSIS_MAX_STRLEN')
+AddValuedDefine('NSIS_MAX_INST_TYPES')
+AddValuedDefine('NSIS_DEFAULT_LANG')
+
+AddBoolDefine('NSIS_CONFIG_UNINSTALL_SUPPORT')
+AddBoolDefine('NSIS_CONFIG_LICENSEPAGE')
+AddBoolDefine('NSIS_CONFIG_COMPONENTPAGE')
+AddBoolDefine('NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE')
+AddBoolDefine('NSIS_CONFIG_SILENT_SUPPORT')
+AddBoolDefine('NSIS_CONFIG_VISIBLE_SUPPORT')
+AddBoolDefine('NSIS_CONFIG_ENHANCEDUI_SUPPORT')
+AddBoolDefine('NSIS_CONFIG_COMPRESSION_SUPPORT')
+AddBoolDefine('NSIS_COMPRESS_BZIP2_SMALLMODE')
+
+AddValuedDefine('NSIS_COMPRESS_BZIP2_LEVEL')
+
+AddBoolDefine('NSIS_CONFIG_CRC_SUPPORT')
+AddBoolDefine('NSIS_CONFIG_CRC_ANAL')
+AddBoolDefine('NSIS_CONFIG_LOG')
+AddBoolDefine('NSIS_CONFIG_LOG_ODS')
+AddBoolDefine('NSIS_CONFIG_LOG_STDOUT')
+AddBoolDefine('NSIS_CONFIG_LOG_TIMESTAMP')
+AddBoolDefine('NSIS_SUPPORT_BGBG')
+AddBoolDefine('NSIS_SUPPORT_CODECALLBACKS')
+AddBoolDefine('NSIS_SUPPORT_MOVEONREBOOT')
+AddBoolDefine('NSIS_SUPPORT_ACTIVEXREG')
+AddBoolDefine('NSIS_SUPPORT_INTOPTS')
+AddBoolDefine('NSIS_SUPPORT_STROPTS')
+AddBoolDefine('NSIS_SUPPORT_STACK')
+AddBoolDefine('NSIS_SUPPORT_FILEFUNCTIONS')
+AddBoolDefine('NSIS_SUPPORT_FINDFIRST')
+AddBoolDefine('NSIS_SUPPORT_CREATESHORTCUT')
+AddBoolDefine('NSIS_SUPPORT_INIFILES')
+AddBoolDefine('NSIS_SUPPORT_REGISTRYFUNCTIONS')
+AddBoolDefine('NSIS_SUPPORT_COPYFILES')
+AddBoolDefine('NSIS_SUPPORT_REBOOT')
+AddBoolDefine('NSIS_SUPPORT_FNUTIL')
+AddBoolDefine('NSIS_SUPPORT_EXECUTE')
+AddBoolDefine('NSIS_SUPPORT_SHELLEXECUTE')
+AddBoolDefine('NSIS_SUPPORT_GETDLLVERSION')
+AddBoolDefine('NSIS_SUPPORT_GETFILETIME')
+AddBoolDefine('NSIS_SUPPORT_HWNDS')
+AddBoolDefine('NSIS_SUPPORT_ENVIRONMENT')
+AddBoolDefine('NSIS_SUPPORT_RMDIR')
+AddBoolDefine('NSIS_SUPPORT_FILE')
+AddBoolDefine('NSIS_SUPPORT_DELETE')
+AddBoolDefine('NSIS_SUPPORT_RENAME')
+AddBoolDefine('NSIS_SUPPORT_MESSAGEBOX')
+AddBoolDefine('NSIS_SUPPORT_VERSION_INFO')
+AddBoolDefine('NSIS_FIX_DEFINES_IN_STRINGS')
+AddBoolDefine('NSIS_SUPPORT_STANDARD_PREDEFINES')
+AddBoolDefine('NSIS_LOCKWINDOW_SUPPORT')
+AddBoolDefine('NSIS_CONFIG_PLUGIN_SUPPORT')
+AddBoolDefine('NSIS_FIX_COMMENT_HANDLING')
+AddBoolDefine('NSIS_CONFIG_CONST_DATA_PATH')
+
+AddStringDefine('NSIS_VARS_SECTION')
diff --git a/SCons/utils.py b/SCons/utils.py
index cf8a38c..feee7ec 100755
--- a/SCons/utils.py
+++ b/SCons/utils.py
@@ -1,74 +1,74 @@
-"""
-Scans through a list list of libraries and adds
-available libraries to the environment.
-"""
-def AddAvailableLibs(env, libs):
- conf = env.Configure()
-
- for lib in libs:
- conf.CheckLib(lib)
-
- conf.Finish()
-
-"""
-Checks if a compiler flag is valid.
-"""
-def check_compile_flag(ctx, flag):
- ctx.Message('Checking for compiler flag %s... ' % flag)
-
- old_flags = ctx.env['CCFLAGS']
- ctx.env.Append(CCFLAGS = flag)
-
- test = """
- int main() {
- return 0;
- }
- """
-
- result = ctx.TryCompile(test, '.c')
- ctx.Result(result)
-
- if not result:
- ctx.env.Replace(CCFLAGS = old_flags)
-
- return result
-
-"""
-Checks if a linker flag is valid.
-"""
-def check_link_flag(ctx, flag, run = 0, extension = '.c', code = None):
- ctx.Message('Checking for linker flag %s... ' % flag)
-
- old_flags = ctx.env['LINKFLAGS']
- ctx.env.Append(LINKFLAGS = flag)
-
- if code:
- test = code
- else:
- test = """
- int main() {
- return 0;
- }
- """
-
- result = ctx.TryLink(test, extension)
-
- if run:
- result = result and ctx.TryRun(test, extension)[0]
-
- ctx.Result(result)
-
- if not result:
- ctx.env.Replace(LINKFLAGS = old_flags)
-
- return result
-
-"""
-Wrapper for env.Configure which adds two new tests:
- CheckCompileFlag - checks for a compiler flag
- CheckLinkFlag - checks for a linker flag
-"""
-def FlagsConfigure(env):
- return env.Configure(custom_tests = { 'CheckCompileFlag' : check_compile_flag, 'CheckLinkFlag': check_link_flag })
-
-Export('AddAvailableLibs FlagsConfigure')
+"""
+Scans through a list list of libraries and adds
+available libraries to the environment.
+"""
+def AddAvailableLibs(env, libs):
+ conf = env.Configure()
+
+ for lib in libs:
+ conf.CheckLib(lib)
+
+ conf.Finish()
+
+"""
+Checks if a compiler flag is valid.
+"""
+def check_compile_flag(ctx, flag):
+ ctx.Message('Checking for compiler flag %s... ' % flag)
+
+ old_flags = ctx.env['CCFLAGS']
+ ctx.env.Append(CCFLAGS = flag)
+
+ test = """
+ int main() {
+ return 0;
+ }
+ """
+
+ result = ctx.TryCompile(test, '.c')
+ ctx.Result(result)
+
+ if not result:
+ ctx.env.Replace(CCFLAGS = old_flags)
+
+ return result
+
+"""
+Checks if a linker flag is valid.
+"""
+def check_link_flag(ctx, flag, run = 0, extension = '.c', code = None):
+ ctx.Message('Checking for linker flag %s... ' % flag)
+
+ old_flags = ctx.env['LINKFLAGS']
+ ctx.env.Append(LINKFLAGS = flag)
+
+ if code:
+ test = code
+ else:
+ test = """
+ int main() {
+ return 0;
+ }
+ """
+
+ result = ctx.TryLink(test, extension)
+
+ if run:
+ result = result and ctx.TryRun(test, extension)[0]
+
+ ctx.Result(result)
+
+ if not result:
+ ctx.env.Replace(LINKFLAGS = old_flags)
+
+ return result
+
+"""
+Wrapper for env.Configure which adds two new tests:
+ CheckCompileFlag - checks for a compiler flag
+ CheckLinkFlag - checks for a linker flag
+"""
+def FlagsConfigure(env):
+ return env.Configure(custom_tests = { 'CheckCompileFlag' : check_compile_flag, 'CheckLinkFlag': check_link_flag })
+
+Export('AddAvailableLibs FlagsConfigure')
diff --git a/SConstruct b/SConstruct
index 4a9492a..6eb528c 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1,729 +1,729 @@
-EnsurePythonVersion(1,6)
-
-try:
- EnsureSConsVersion(0,96,93)
-except TypeError: # EnsureSConsVersion in older versions took only two parameters
- print 'SCons 0.96.93 or greater is required, but you have an older version'
- Exit(2)
-
-stubs = [
- 'bzip2',
- 'lzma',
- 'zlib'
-]
-
-plugins = [
- 'AdvSplash',
- 'Banner',
- 'BgImage',
- 'Dialer',
- 'InstallOptions',
- 'LangDLL',
- 'Library/TypeLib',
- 'Math',
- 'nsDialogs',
- 'nsExec',
- 'NSISdl',
- 'Splash',
- 'StartMenu',
- 'System',
- 'UserInfo',
- 'VPatch/Source/Plugin'
-]
-
-utils = [
- 'Library/LibraryLocal',
- 'Library/RegTool',
- 'MakeLangId',
- 'Makensisw',
- 'NSIS Menu',
- 'UIs',
- 'VPatch/Source/GenPat',
- 'zip2exe'
-]
-
-misc = [
- 'Graphics',
- 'Language files',
- 'Modern UI',
- 'Modern UI 2',
- 'VPatch',
- 'ExDLL'
-]
-
-doc = [
- 'COPYING'
-]
-
-######################################################################
-####### Build Environment ###
-######################################################################
-
-path = ARGUMENTS.get('PATH', '')
-toolset = ARGUMENTS.get('TOOLSET', '')
-
-if toolset and path:
- defenv = Environment(ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip'])
-else:
- if path:
- defenv = Environment(ENV = {'PATH' : path})
- if toolset:
- defenv = Environment(TOOLS = toolset.split(',') + ['zip'])
-if not toolset and not path:
- defenv = Environment()
-
-Export('defenv')
-
-######################################################################
-####### Includes ###
-######################################################################
-
-SConscript('SCons/utils.py')
-
-######################################################################
-####### Options ###
-######################################################################
-
-import os
-hhc = 'no'
-if defenv.WhereIs('hhc', os.environ['PATH']):
- hhc = 'yes'
-
-from time import strftime, gmtime
-cvs_version = strftime('%d-%b-%Y.cvs', gmtime())
-
-opts = Options()
-
-# load configuration options
-# it's important this will be done here so NSIS_CONFIG_CONST_DATA_PATH
-# will be available for the next few lines and so `dirs` can be set
-SConscript('SCons/config.py')
-
-opts.Update(defenv)
-Help(opts.GenerateHelpText(defenv))
-
-install_dirs = {
- 'relocatable': {
- 'dest': '',
- 'prefix': '',
- 'conf': '$PREFIX',
- 'bin': '$PREFIX',
- 'data': '$PREFIX',
- 'doc': '$PREFIX',
- 'inc_c': '$PREFIX',
- },
- 'static': {
- 'dest': '',
- 'prefix': '/usr/local',
- 'conf': '$PREFIX/etc',
- 'bin': '$PREFIX/bin',
- 'data': '$PREFIX/share/nsis',
- 'doc': '$PREFIX/share/doc/nsis',
- 'inc_c': '$PREFIX/include/nsis',
- }
-}
-
-if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
- dirs = install_dirs['static']
-else:
- dirs = install_dirs['relocatable']
-
-if 'msvc' in defenv['TOOLS'] or 'mstoolkit' in defenv['TOOLS']:
- ignore_tests = 'none'
-else:
- ignore_tests = ','.join(Split("""
-Examples/System/System.nsi
-Examples/LogicLib.nsi
-Examples/StrFunc.nsi
-Examples/TextFunc.nsi
-Examples/TextFuncTest.nsi
-Examples/FileFunc.nsi
-Examples/FileFuncTest.nsi
-Examples/Library.nsi
-Examples/makensis.nsi
-Examples/gfx.nsi
-Examples/nsDialogs/example.nsi
-Examples/nsDialogs/InstallOptions.nsi
-Examples/nsDialogs/welcome.nsi
-"""))
-
-# version
-opts.Add(('VERSION', 'Version of NSIS', cvs_version))
-opts.Add(('VER_MAJOR', 'Major version of NSIS (recommended for dist-installer)', None))
-opts.Add(('VER_MINOR', 'Minor version of NSIS (recommended for dist-installer)', None))
-opts.Add(('VER_REVISION', 'Revision of NSIS (recommended for dist-installer)', None))
-opts.Add(('VER_BUILD', 'Build version of NSIS (recommended for dist-installer)', None))
-# installation
-opts.Add(('PREFIX', 'Installation prefix', dirs['prefix']))
-opts.Add(ListOption('SKIPSTUBS', 'A list of stubs that will not be built', 'none', stubs))
-opts.Add(ListOption('SKIPPLUGINS', 'A list of plug-ins that will not be built', 'none', plugins))
-opts.Add(ListOption('SKIPUTILS', 'A list of utilities that will not be built', 'none', utils))
-opts.Add(ListOption('SKIPMISC', 'A list of plug-ins that will not be built', 'none', misc))
-opts.Add(ListOption('SKIPDOC', 'A list of doc files that will not be built/installed', 'none', doc))
-opts.Add(('SKIPTESTS', 'A comma-separated list of test files that will not be ran', 'none'))
-opts.Add(('IGNORETESTS', 'A comma-separated list of test files that will be ran but ignored', ignore_tests))
-# build tools
-opts.Add(('PATH', 'A colon-separated list of system paths instead of the default - TEMPORARY AND MAY DEPRECATE', None))
-opts.Add(('TOOLSET', 'A comma-separated list of specific tools used for building instead of the default', None))
-opts.Add(BoolOption('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no'))
-opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc))
-opts.Add(PathOption('APPEND_CPPPATH', 'Additional paths to search for include files', None))
-opts.Add(PathOption('APPEND_LIBPATH', 'Additional paths to search for libraries', None))
-opts.Add(('APPEND_CCFLAGS', 'Additional C/C++ compiler flags'))
-opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
-# build options
-opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))
-opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))
-opts.Add(BoolOption('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))
-# path related build options
-opts.Add(('PREFIX_DEST', 'Intermediate installation prefix (extra install time prefix)', dirs['dest']))
-opts.Add(('PREFIX_CONF', 'Path to install nsisconf.nsh to', dirs['conf']))
-opts.Add(('PREFIX_BIN', 'Path to install native binaries to', dirs['bin']))
-opts.Add(('PREFIX_DATA', 'Path to install nsis data to (plugins, includes, stubs, contrib, win32 binaries)', dirs['data']))
-opts.Add(('PREFIX_DOC','Path to install nsis README / INSTALL / TODO files to.', dirs['doc']))
-opts.Add(('PREFIX_INC_C','Path to install nsis C header files to.', dirs['inc_c']))
-
-opts.Update(defenv)
-Help(opts.GenerateHelpText(defenv))
-
-# add prefixes defines
-if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
- defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', '"%s"' % defenv.subst('$PREFIX_CONF'))])
- defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv.subst('$PREFIX_DATA'))])
-
-# write configuration into sconf.h and defines.h
-sconf_h = open(File('#Source/exehead/sconf.h').abspath, 'w')
-sconf_h.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
-
-defines_h = open(File('#Source/defines.h').abspath, 'w')
-defines_h.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
-
-for i in defenv['NSIS_CPPDEFINES']:
- if type(i) is not str:
- sconf_h.write('#define %s %s\n' % (i[0], i[1]))
- if str(i[1])[0] != '"':
- defines_h.write('definedlist.add("%s", "%s");\n' % (i[0], i[1]))
- else:
- defines_h.write('definedlist.add("%s", %s);\n' % (i[0], i[1]))
- else:
- sconf_h.write('#define %s\n' % (i))
- defines_h.write('definedlist.add("%s");\n' % (i))
-sconf_h.close()
-defines_h.close()
-
-# write version into version.h
-f = open(File('#Source/version.h').abspath, 'w')
-f.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
-f.write('#define NSIS_VERSION "v%s"\n' % defenv['VERSION'])
-f.close()
-
-######################################################################
-####### Functions ###
-######################################################################
-
-defenv['ZIPDISTDIR'] = defenv.Dir('#nsis-$VERSION')
-defenv['INSTDISTDIR'] = defenv.Dir('#.instdist')
-defenv['TESTDISTDIR'] = defenv.Dir('#.test')
-defenv['DISTSUFFIX'] = ''
-
-if defenv.has_key('CODESIGNER'):
- defenv['DISTSUFFIX'] = '-signed'
-
-defenv.Execute(Delete('$ZIPDISTDIR'))
-defenv.Execute(Delete('$INSTDISTDIR'))
-defenv.Execute(Delete('$TESTDISTDIR'))
-
-def SafeFile(f):
- from types import StringType
-
- if isinstance(f, StringType):
- return File(f)
-
- return f
-
-def MakeFileList(files):
- from types import ListType, TupleType
-
- if isinstance(files, (ListType, TupleType)):
- return map(SafeFile, files)
-
- return Flatten([SafeFile(files)])
-
-def Distribute(files, names, component, path, subpath, alias, install_alias=None):
- from types import StringType
-
- files = MakeFileList(files)
-
- names = names or map(lambda x: x.name, files)
- if isinstance(names, StringType):
- names = [names]
-
- for d in ('$ZIPDISTDIR', '$INSTDISTDIR', '$TESTDISTDIR'):
- paths = map(lambda file: os.path.join(d, path, subpath, file), names)
- defenv.InstallAs(paths, files)
-
- if (defenv.has_key('PREFIX') and defenv['PREFIX']) or (defenv.has_key('PREFIX_DEST') and defenv['PREFIX_DEST']) :
- prefix = '${PREFIX_DEST}${PREFIX_%s}' % component.upper()
- paths = map(lambda file: os.path.join(prefix, path, subpath, file), names)
- ins = defenv.InstallAs(paths, files)
- else:
- ins = []
-
- if ins:
- defenv.Alias('install', ins)
- defenv.Alias('install-%s' % component, ins)
- if alias:
- defenv.Alias(alias, ins)
- if install_alias:
- defenv.Alias('install-%s' % install_alias, ins)
-
- return ins
-
-def DistributeBin(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'bin', '', path, alias)
-
-def DistributeConf(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'conf', '', path, alias)
-
-def DistributeW32Bin(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'data', 'Bin', path, alias, 'w32bin')
-
-def DistributeStubs(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'data', 'Stubs', path, alias, 'stubs')
-
-def DistributePlugin(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'data', 'Plugins', path, alias, 'plugins')
-
-def DistributeContrib(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'data', 'Contrib', path, alias, 'contrib')
-
-def DistributeMenu(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'data', 'Menu', path, alias, 'menu')
-
-def DistributeInclude(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'data', 'Include', path, alias, 'includes')
-
-def DistributeDoc(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'doc', '', path, alias)
-
-def DistributeDocs(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'doc', 'Docs', path, alias, 'docs')
-
-def DistributeExamples(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'doc', 'Examples', path, alias, 'examples')
-
-def DistributeIncC(files, names=[], path='', alias=None):
- return defenv.Distribute(files, names, 'inc_c', '', path, alias, 'inc-c')
-
-def Sign(targets):
- if defenv.has_key('CODESIGNER'):
- for t in targets:
- a = defenv.Action('$CODESIGNER "%s"' % t.path)
- defenv.AddPostAction(t, a)
-
-def TestScript(scripts):
- defenv.Install('$TESTDISTDIR/Tests', scripts)
-
-defenv.Distribute = Distribute
-defenv.DistributeBin = DistributeBin
-defenv.DistributeConf = DistributeConf
-defenv.DistributeW32Bin = DistributeW32Bin
-defenv.DistributeStubs = DistributeStubs
-defenv.DistributePlugin = DistributePlugin
-defenv.DistributeContrib = DistributeContrib
-defenv.DistributeMenu = DistributeMenu
-defenv.DistributeInclude = DistributeInclude
-defenv.DistributeDoc = DistributeDoc
-defenv.DistributeDocs = DistributeDocs
-defenv.DistributeExamples = DistributeExamples
-defenv.DistributeIncC = DistributeIncC
-defenv.Sign = Sign
-defenv.TestScript = TestScript
-
-######################################################################
-####### Environments ###
-######################################################################
-
-if defenv['DEBUG']:
- defenv.Replace(BUILD_PREFIX = 'build/debug')
-else:
- defenv.Replace(BUILD_PREFIX = 'build/release')
-
-if defenv['MSTOOLKIT']:
- defenv.Tool('mstoolkit', toolpath = ['SCons/Tools'])
-
-defenv.Append(CCFLAGS = Split('$APPEND_CCFLAGS'))
-defenv.Append(LINKFLAGS = Split('$APPEND_LINKFLAGS'))
-defenv.Append(CPPPATH = Split('$APPEND_CPPPATH'))
-defenv.Append(LIBPATH = Split('$APPEND_LIBPATH'))
-
-defenv.Default('$BUILD_PREFIX')
-
-tools = defenv['TOOLS']
-
-envs = []
-
-if 'msvc' in tools or 'mstoolkit' in tools:
- envs = SConscript('SCons/Config/ms')
-elif 'gcc' in tools:
- envs = SConscript('SCons/Config/gnu')
-elif 'hpc++' in tools:
- envs = SConscript('SCons/Config/hpc++')
-else:
- envs = SConscript('SCons/Config/default')
-
-stub_env = envs[0]
-makensis_env = envs[1]
-plugin_env = envs[2]
-util_env = envs[3]
-cp_util_env = envs[4]
-test_env = envs[5]
-
-######################################################################
-####### Distribution ###
-######################################################################
-
-dist_zip = 'nsis-${VERSION}${DISTSUFFIX}.zip'
-zip_target = defenv.Zip(dist_zip, '$ZIPDISTDIR')
-defenv.Alias('dist-zip', zip_target)
-
-AlwaysBuild(defenv.AddPostAction(zip_target, Delete('$ZIPDISTDIR')))
-
-if defenv['PLATFORM'] == 'win32':
- optchar = '/'
-else:
- optchar = '-'
-
-defenv['INSTVER'] = '%sDVERSION=$VERSION' % optchar
-if defenv.has_key('VER_MAJOR') and defenv.has_key('VER_MINOR') \
- and defenv.has_key('VER_REVISION') and defenv.has_key('VER_BUILD'):
- defenv['INSTVER'] += ' %sDVER_MAJOR=$VER_MAJOR' % optchar
- defenv['INSTVER'] += ' %sDVER_MINOR=$VER_MINOR' % optchar
- defenv['INSTVER'] += ' %sDVER_REVISION=$VER_REVISION' % optchar
- defenv['INSTVER'] += ' %sDVER_BUILD=$VER_BUILD' % optchar
-
-inst_env = {}
-inst_env['NSISDIR'] = os.path.abspath(str(defenv['INSTDISTDIR']))
-inst_env['NSISCONFDIR'] = os.path.abspath(str(defenv['INSTDISTDIR']))
-
-installer_target = defenv.Command('nsis-${VERSION}-setup${DISTSUFFIX}.exe',
- '$INSTDISTDIR' + os.sep + 'Examples' + os.sep + 'makensis.nsi',
- '$INSTDISTDIR' + os.sep + 'makensis$PROGSUFFIX ' +
- '%sDOUTFILE=$TARGET.abspath $INSTVER $SOURCE' % optchar,
- ENV = inst_env)
-defenv.Depends(installer_target, '$INSTDISTDIR')
-defenv.Sign(installer_target)
-defenv.Alias('dist-installer', installer_target)
-
-AlwaysBuild(defenv.AddPostAction(installer_target, Delete('$INSTDISTDIR')))
-
-defenv.Alias('dist', ['dist-zip', 'dist-installer'])
-
-######################################################################
-####### Distribute Basics ###
-######################################################################
-
-for d in doc:
- if d in defenv['SKIPDOC']:
- continue
- defenv.DistributeDoc(d)
-
-defenv.DistributeConf('nsisconf.nsh')
-
-######################################################################
-####### Stubs ###
-######################################################################
-
-def BuildStub(compression, solid):
- env = stub_env.Clone()
-
- suffix = ''
- if solid:
- suffix = '_solid'
-
- build_dir = '$BUILD_PREFIX/stub_%s%s' % (compression, suffix)
-
- exports = { 'env' : env, 'compression' : compression, 'solid_compression' : solid }
-
- target = defenv.SConscript(dirs = 'Source/exehead', build_dir = build_dir, duplicate = False, exports = exports)
- env.SideEffect('%s/stub_%s.map' % (build_dir, stub), target)
-
- env.DistributeStubs(target, names=compression+suffix)
-
- defenv.Alias(compression, target)
- defenv.Alias('stubs', target)
-
-for stub in stubs:
- if stub in defenv['SKIPSTUBS']:
- continue
-
- BuildStub(stub, False)
- BuildStub(stub, True)
-
-defenv.DistributeStubs('Source/exehead/uninst.ico',names='uninst')
-
-######################################################################
-####### makensis ###
-######################################################################
-
-build_dir = '$BUILD_PREFIX/makensis'
-exports = { 'env' : makensis_env }
-
-makensis = defenv.SConscript(dirs = 'Source', build_dir = build_dir, duplicate = False, exports = exports)
-
-makensis_env.SideEffect('%s/makensis.map' % build_dir, makensis)
-
-defenv.Alias('makensis', makensis)
-
-ins = defenv.DistributeBin(makensis,alias='install-compiler')
-
-######################################################################
-####### Common Functions ###
-######################################################################
-
-def AddEnvStandardFlags(env, defines, flags, entry, nodeflib):
- if defines:
- env.Append(CPPDEFINES = defines)
- if flags:
- env.Append(CCFLAGS = flags)
-
- if entry:
- env.Append(LINKFLAGS = '${ENTRY_FLAG("%s")}' % entry)
-
- if nodeflib:
- env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no default libraries
-
-def AppendRES(env, source, res, resources):
- if res:
- target = MakeFileList(res)[0].name.replace('.rc', '-rc')
- target_res = env.RES(target, res)
- if resources:
- env.Depends(target_res, resources)
- source.append(target_res)
-
-def CleanMap(env, target, target_name):
- env.Clean(target, File(target_name + '.map'))
-
-def DistributeExtras(env, target, examples, docs):
- if examples:
- env.DistributeExamples(examples, path=target)
- if docs:
- env.DistributeDocs(docs, path=target)
-
-######################################################################
-####### Plug-ins ###
-######################################################################
-
-def BuildPlugin(target, source, libs, examples = None, docs = None,
- entry = 'DllMain', res = None, resources = None,
- defines = None, flags = None, nodeflib = True,
- cppused = False):
- env = plugin_env.Clone()
-
- if cppused and env['CPP_REQUIRES_STDLIB']:
- nodeflib = False
-
- AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
-
- AppendRES(env, source, res, resources)
-
- plugin = env.SharedLibrary(target, source, LIBS = libs)
- defenv.Alias(target, plugin)
- defenv.Alias('plugins', plugin)
-
- defenv.Sign(plugin)
-
- CleanMap(env, plugin, target)
-
- for i in plugin:
- if str(i)[-4:].lower() == '.dll':
- plugin = i
- break
- env.DistributePlugin(plugin)
-
- DistributeExtras(env, target, examples, docs)
-
-for plugin in plugins:
- if plugin in defenv['SKIPPLUGINS']:
- continue
-
- path = 'Contrib/' + plugin
- build_dir = '$BUILD_PREFIX/' + plugin
- exports = {'BuildPlugin' : BuildPlugin, 'env' : plugin_env.Clone()}
-
- defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
-
-######################################################################
-####### Utilities ###
-######################################################################
-
-def BuildUtilEnv(defines = None, flags = None, entry = None,
- nodeflib = None, cross_platform = False):
- if not cross_platform:
- env = util_env.Clone()
- else:
- env = cp_util_env.Clone()
-
- AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
-
- return env
-
-def BuildUtil(target, source, libs, entry = None, res = None,
- resources = None, defines = None, flags = None,
- nodeflib = False, file_name = '', path='', contrib = False,
- examples = None, docs = None, cross_platform = False,
- root_util = False):
- env = BuildUtilEnv(defines, flags, entry, nodeflib, cross_platform)
-
- AppendRES(env, source, res, resources)
-
- if file_name != '':
- target = "%s/%s" % (target, file_name)
-
- # make sure the environment suffix fits
- if env['PROGSUFFIX'] not in target:
- if '.' in target:
- env['PROGSUFFIX'] = target[target.rindex('.'):]
-
- util = env.Program(target, source, LIBS = libs)
- defenv.Alias(target, util)
- defenv.Alias('utils', util)
-
- defenv.Sign(util)
-
- CleanMap(env, util, target)
-
- if contrib:
- ins = env.DistributeContrib(util, path=path, alias='install-utils')
- elif cross_platform and not env['PLATFORM'] == 'win32' or root_util and env['PLATFORM'] == 'win32':
- ins = env.DistributeBin(util, path=path, alias='install-utils')
- else:
- ins = env.DistributeW32Bin(util, path=path, alias='install-utils')
-
- DistributeExtras(env, target, examples, docs)
-
- return util
-
-for util in utils:
- if util in defenv['SKIPUTILS']:
- continue
-
- path = 'Contrib/' + util
- build_dir = '$BUILD_PREFIX/' + util
- exports = {'BuildUtil' : BuildUtil, 'BuildUtilEnv' : BuildUtilEnv, 'env' : util_env}
-
- defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
-
-######################################################################
-####### Documentation ###
-######################################################################
-
-halibut = defenv.SConscript(
- dirs = 'Docs/src/bin/halibut',
- build_dir = '$BUILD_PREFIX/halibut',
- duplicate = False,
- exports = {'env' : defenv.Clone()}
-)
-
-if defenv['CHMDOCS']:
- defenv.SConscript(
- dirs = 'Docs/src',
- build_dir = '$BUILD_PREFIX/Docs/chm',
- duplicate = False,
- exports = {'halibut' : halibut, 'env' : defenv.Clone(), 'build_chm' : True}
- )
-else:
- defenv.SConscript(
- dirs = 'Docs/src',
- build_dir = '$BUILD_PREFIX/Docs/html',
- duplicate = False,
- exports = {'halibut' : halibut, 'env' : defenv.Clone(), 'build_chm' : False}
- )
-
-######################################################################
-####### Examples ###
-######################################################################
-
-defenv.SConscript(
- dirs = 'Examples',
- exports = {'env': defenv.Clone()}
-)
-
-######################################################################
-####### Includes ###
-######################################################################
-
-defenv.SConscript(
- dirs = 'Include',
- exports = {'env': defenv.Clone()}
-)
-
-######################################################################
-####### Miscellaneous ###
-######################################################################
-
-for i in misc:
- if i in defenv['SKIPMISC']:
- continue
-
- defenv.SConscript(dirs = 'Contrib/%s' % i)
-
-######################################################################
-####### Tests ###
-######################################################################
-
-# test code
-
-build_dir = '$BUILD_PREFIX/tests'
-exports = {'env' : test_env.Clone()}
-
-defenv.SConscript(
- dirs = 'Source/Tests',
- duplicate = False,
- exports = exports,
- build_dir = build_dir
-)
-
-defenv.Ignore('$BUILD_PREFIX', '$BUILD_PREFIX/tests')
-
-# test scripts
-
-test_scripts_env = defenv.Clone(ENV = os.environ) # env needed for some scripts
-test_scripts_env['ENV']['NSISDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
-test_scripts_env['ENV']['NSISCONFDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
-
-def test_scripts(target, source, env):
- from os import walk, sep
-
- instdir = source[0].path
-
- makensis = instdir + sep + 'makensis'
-
- tdlen = len(env.subst('$TESTDISTDIR'))
- skipped_tests = env['SKIPTESTS'].split(',')
- ignored_tests = env['IGNORETESTS'].split(',')
-
- for root, dirs, files in walk(instdir):
- for file in files:
- if file[-4:] == '.nsi':
- nsi = root + sep + file
- nsif = nsi[tdlen + 1:]
-
- if nsif in skipped_tests:
- continue
-
- if nsif in ignored_tests:
- cmd = env.Command(None, nsi, '-%s $SOURCE' % makensis)
- else:
- cmd = env.Command(None, nsi, '%s $SOURCE' % makensis)
- AlwaysBuild(cmd)
- env.Alias('test-scripts', cmd)
-
- return None
-
-test = test_scripts_env.Command('test-scripts.log', '$TESTDISTDIR', test_scripts)
-test_scripts_env.Alias('test-scripts', test)
-
-# test all
-
-defenv.Alias('test', ['test-code', 'test-scripts'])
+EnsurePythonVersion(1,6)
+
+try:
+ EnsureSConsVersion(0,96,93)
+except TypeError: # EnsureSConsVersion in older versions took only two parameters
+ print 'SCons 0.96.93 or greater is required, but you have an older version'
+ Exit(2)
+
+stubs = [
+ 'bzip2',
+ 'lzma',
+ 'zlib'
+]
+
+plugins = [
+ 'AdvSplash',
+ 'Banner',
+ 'BgImage',
+ 'Dialer',
+ 'InstallOptions',
+ 'LangDLL',
+ 'Library/TypeLib',
+ 'Math',
+ 'nsDialogs',
+ 'nsExec',
+ 'NSISdl',
+ 'Splash',
+ 'StartMenu',
+ 'System',
+ 'UserInfo',
+ 'VPatch/Source/Plugin'
+]
+
+utils = [
+ 'Library/LibraryLocal',
+ 'Library/RegTool',
+ 'MakeLangId',
+ 'Makensisw',
+ 'NSIS Menu',
+ 'UIs',
+ 'VPatch/Source/GenPat',
+ 'zip2exe'
+]
+
+misc = [
+ 'Graphics',
+ 'Language files',
+ 'Modern UI',
+ 'Modern UI 2',
+ 'VPatch',
+ 'ExDLL'
+]
+
+doc = [
+ 'COPYING'
+]
+
+######################################################################
+####### Build Environment ###
+######################################################################
+
+path = ARGUMENTS.get('PATH', '')
+toolset = ARGUMENTS.get('TOOLSET', '')
+
+if toolset and path:
+ defenv = Environment(ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip'])
+else:
+ if path:
+ defenv = Environment(ENV = {'PATH' : path})
+ if toolset:
+ defenv = Environment(TOOLS = toolset.split(',') + ['zip'])
+if not toolset and not path:
+ defenv = Environment()
+
+Export('defenv')
+
+######################################################################
+####### Includes ###
+######################################################################
+
+SConscript('SCons/utils.py')
+
+######################################################################
+####### Options ###
+######################################################################
+
+import os
+hhc = 'no'
+if defenv.WhereIs('hhc', os.environ['PATH']):
+ hhc = 'yes'
+
+from time import strftime, gmtime
+cvs_version = strftime('%d-%b-%Y.cvs', gmtime())
+
+opts = Options()
+
+# load configuration options
+# it's important this will be done here so NSIS_CONFIG_CONST_DATA_PATH
+# will be available for the next few lines and so `dirs` can be set
+SConscript('SCons/config.py')
+
+opts.Update(defenv)
+Help(opts.GenerateHelpText(defenv))
+
+install_dirs = {
+ 'relocatable': {
+ 'dest': '',
+ 'prefix': '',
+ 'conf': '$PREFIX',
+ 'bin': '$PREFIX',
+ 'data': '$PREFIX',
+ 'doc': '$PREFIX',
+ 'inc_c': '$PREFIX',
+ },
+ 'static': {
+ 'dest': '',
+ 'prefix': '/usr/local',
+ 'conf': '$PREFIX/etc',
+ 'bin': '$PREFIX/bin',
+ 'data': '$PREFIX/share/nsis',
+ 'doc': '$PREFIX/share/doc/nsis',
+ 'inc_c': '$PREFIX/include/nsis',
+ }
+}
+
+if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
+ dirs = install_dirs['static']
+else:
+ dirs = install_dirs['relocatable']
+
+if 'msvc' in defenv['TOOLS'] or 'mstoolkit' in defenv['TOOLS']:
+ ignore_tests = 'none'
+else:
+ ignore_tests = ','.join(Split("""
+Examples/System/System.nsi
+Examples/LogicLib.nsi
+Examples/StrFunc.nsi
+Examples/TextFunc.nsi
+Examples/TextFuncTest.nsi
+Examples/FileFunc.nsi
+Examples/FileFuncTest.nsi
+Examples/Library.nsi
+Examples/makensis.nsi
+Examples/gfx.nsi
+Examples/nsDialogs/example.nsi
+Examples/nsDialogs/InstallOptions.nsi
+Examples/nsDialogs/welcome.nsi
+"""))
+
+# version
+opts.Add(('VERSION', 'Version of NSIS', cvs_version))
+opts.Add(('VER_MAJOR', 'Major version of NSIS (recommended for dist-installer)', None))
+opts.Add(('VER_MINOR', 'Minor version of NSIS (recommended for dist-installer)', None))
+opts.Add(('VER_REVISION', 'Revision of NSIS (recommended for dist-installer)', None))
+opts.Add(('VER_BUILD', 'Build version of NSIS (recommended for dist-installer)', None))
+# installation
+opts.Add(('PREFIX', 'Installation prefix', dirs['prefix']))
+opts.Add(ListOption('SKIPSTUBS', 'A list of stubs that will not be built', 'none', stubs))
+opts.Add(ListOption('SKIPPLUGINS', 'A list of plug-ins that will not be built', 'none', plugins))
+opts.Add(ListOption('SKIPUTILS', 'A list of utilities that will not be built', 'none', utils))
+opts.Add(ListOption('SKIPMISC', 'A list of plug-ins that will not be built', 'none', misc))
+opts.Add(ListOption('SKIPDOC', 'A list of doc files that will not be built/installed', 'none', doc))
+opts.Add(('SKIPTESTS', 'A comma-separated list of test files that will not be ran', 'none'))
+opts.Add(('IGNORETESTS', 'A comma-separated list of test files that will be ran but ignored', ignore_tests))
+# build tools
+opts.Add(('PATH', 'A colon-separated list of system paths instead of the default - TEMPORARY AND MAY DEPRECATE', None))
+opts.Add(('TOOLSET', 'A comma-separated list of specific tools used for building instead of the default', None))
+opts.Add(BoolOption('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no'))
+opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc))
+opts.Add(PathOption('APPEND_CPPPATH', 'Additional paths to search for include files', None))
+opts.Add(PathOption('APPEND_LIBPATH', 'Additional paths to search for libraries', None))
+opts.Add(('APPEND_CCFLAGS', 'Additional C/C++ compiler flags'))
+opts.Add(('APPEND_LINKFLAGS', 'Additional linker flags'))
+# build options
+opts.Add(BoolOption('DEBUG', 'Build executables with debugging information', 'no'))
+opts.Add(PathOption('CODESIGNER', 'A program used to sign executables', None))
+opts.Add(BoolOption('STRIP', 'Strips executables of any unrequired data such as symbols', 'yes'))
+# path related build options
+opts.Add(('PREFIX_DEST', 'Intermediate installation prefix (extra install time prefix)', dirs['dest']))
+opts.Add(('PREFIX_CONF', 'Path to install nsisconf.nsh to', dirs['conf']))
+opts.Add(('PREFIX_BIN', 'Path to install native binaries to', dirs['bin']))
+opts.Add(('PREFIX_DATA', 'Path to install nsis data to (plugins, includes, stubs, contrib, win32 binaries)', dirs['data']))
+opts.Add(('PREFIX_DOC','Path to install nsis README / INSTALL / TODO files to.', dirs['doc']))
+opts.Add(('PREFIX_INC_C','Path to install nsis C header files to.', dirs['inc_c']))
+
+opts.Update(defenv)
+Help(opts.GenerateHelpText(defenv))
+
+# add prefixes defines
+if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']:
+ defenv.Append(NSIS_CPPDEFINES = [('PREFIX_CONF', '"%s"' % defenv.subst('$PREFIX_CONF'))])
+ defenv.Append(NSIS_CPPDEFINES = [('PREFIX_DATA', '"%s"' % defenv.subst('$PREFIX_DATA'))])
+
+# write configuration into sconf.h and defines.h
+sconf_h = open(File('#Source/exehead/sconf.h').abspath, 'w')
+sconf_h.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
+
+defines_h = open(File('#Source/defines.h').abspath, 'w')
+defines_h.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
+
+for i in defenv['NSIS_CPPDEFINES']:
+ if type(i) is not str:
+ sconf_h.write('#define %s %s\n' % (i[0], i[1]))
+ if str(i[1])[0] != '"':
+ defines_h.write('definedlist.add("%s", "%s");\n' % (i[0], i[1]))
+ else:
+ defines_h.write('definedlist.add("%s", %s);\n' % (i[0], i[1]))
+ else:
+ sconf_h.write('#define %s\n' % (i))
+ defines_h.write('definedlist.add("%s");\n' % (i))
+sconf_h.close()
+defines_h.close()
+
+# write version into version.h
+f = open(File('#Source/version.h').abspath, 'w')
+f.write('// This file is automatically generated by SCons\n// DO NOT EDIT THIS FILE\n')
+f.write('#define NSIS_VERSION "v%s"\n' % defenv['VERSION'])
+f.close()
+
+######################################################################
+####### Functions ###
+######################################################################
+
+defenv['ZIPDISTDIR'] = defenv.Dir('#nsis-$VERSION')
+defenv['INSTDISTDIR'] = defenv.Dir('#.instdist')
+defenv['TESTDISTDIR'] = defenv.Dir('#.test')
+defenv['DISTSUFFIX'] = ''
+
+if defenv.has_key('CODESIGNER'):
+ defenv['DISTSUFFIX'] = '-signed'
+
+defenv.Execute(Delete('$ZIPDISTDIR'))
+defenv.Execute(Delete('$INSTDISTDIR'))
+defenv.Execute(Delete('$TESTDISTDIR'))
+
+def SafeFile(f):
+ from types import StringType
+
+ if isinstance(f, StringType):
+ return File(f)
+
+ return f
+
+def MakeFileList(files):
+ from types import ListType, TupleType
+
+ if isinstance(files, (ListType, TupleType)):
+ return map(SafeFile, files)
+
+ return Flatten([SafeFile(files)])
+
+def Distribute(files, names, component, path, subpath, alias, install_alias=None):
+ from types import StringType
+
+ files = MakeFileList(files)
+
+ names = names or map(lambda x: x.name, files)
+ if isinstance(names, StringType):
+ names = [names]
+
+ for d in ('$ZIPDISTDIR', '$INSTDISTDIR', '$TESTDISTDIR'):
+ paths = map(lambda file: os.path.join(d, path, subpath, file), names)
+ defenv.InstallAs(paths, files)
+
+ if (defenv.has_key('PREFIX') and defenv['PREFIX']) or (defenv.has_key('PREFIX_DEST') and defenv['PREFIX_DEST']) :
+ prefix = '${PREFIX_DEST}${PREFIX_%s}' % component.upper()
+ paths = map(lambda file: os.path.join(prefix, path, subpath, file), names)
+ ins = defenv.InstallAs(paths, files)
+ else:
+ ins = []
+
+ if ins:
+ defenv.Alias('install', ins)
+ defenv.Alias('install-%s' % component, ins)
+ if alias:
+ defenv.Alias(alias, ins)
+ if install_alias:
+ defenv.Alias('install-%s' % install_alias, ins)
+
+ return ins
+
+def DistributeBin(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'bin', '', path, alias)
+
+def DistributeConf(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'conf', '', path, alias)
+
+def DistributeW32Bin(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'data', 'Bin', path, alias, 'w32bin')
+
+def DistributeStubs(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'data', 'Stubs', path, alias, 'stubs')
+
+def DistributePlugin(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'data', 'Plugins', path, alias, 'plugins')
+
+def DistributeContrib(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'data', 'Contrib', path, alias, 'contrib')
+
+def DistributeMenu(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'data', 'Menu', path, alias, 'menu')
+
+def DistributeInclude(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'data', 'Include', path, alias, 'includes')
+
+def DistributeDoc(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'doc', '', path, alias)
+
+def DistributeDocs(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'doc', 'Docs', path, alias, 'docs')
+
+def DistributeExamples(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'doc', 'Examples', path, alias, 'examples')
+
+def DistributeIncC(files, names=[], path='', alias=None):
+ return defenv.Distribute(files, names, 'inc_c', '', path, alias, 'inc-c')
+
+def Sign(targets):
+ if defenv.has_key('CODESIGNER'):
+ for t in targets:
+ a = defenv.Action('$CODESIGNER "%s"' % t.path)
+ defenv.AddPostAction(t, a)
+
+def TestScript(scripts):
+ defenv.Install('$TESTDISTDIR/Tests', scripts)
+
+defenv.Distribute = Distribute
+defenv.DistributeBin = DistributeBin
+defenv.DistributeConf = DistributeConf
+defenv.DistributeW32Bin = DistributeW32Bin
+defenv.DistributeStubs = DistributeStubs
+defenv.DistributePlugin = DistributePlugin
+defenv.DistributeContrib = DistributeContrib
+defenv.DistributeMenu = DistributeMenu
+defenv.DistributeInclude = DistributeInclude
+defenv.DistributeDoc = DistributeDoc
+defenv.DistributeDocs = DistributeDocs
+defenv.DistributeExamples = DistributeExamples
+defenv.DistributeIncC = DistributeIncC
+defenv.Sign = Sign
+defenv.TestScript = TestScript
+
+######################################################################
+####### Environments ###
+######################################################################
+
+if defenv['DEBUG']:
+ defenv.Replace(BUILD_PREFIX = 'build/debug')
+else:
+ defenv.Replace(BUILD_PREFIX = 'build/release')
+
+if defenv['MSTOOLKIT']:
+ defenv.Tool('mstoolkit', toolpath = ['SCons/Tools'])
+
+defenv.Append(CCFLAGS = Split('$APPEND_CCFLAGS'))
+defenv.Append(LINKFLAGS = Split('$APPEND_LINKFLAGS'))
+defenv.Append(CPPPATH = Split('$APPEND_CPPPATH'))
+defenv.Append(LIBPATH = Split('$APPEND_LIBPATH'))
+
+defenv.Default('$BUILD_PREFIX')
+
+tools = defenv['TOOLS']
+
+envs = []
+
+if 'msvc' in tools or 'mstoolkit' in tools:
+ envs = SConscript('SCons/Config/ms')
+elif 'gcc' in tools:
+ envs = SConscript('SCons/Config/gnu')
+elif 'hpc++' in tools:
+ envs = SConscript('SCons/Config/hpc++')
+else:
+ envs = SConscript('SCons/Config/default')
+
+stub_env = envs[0]
+makensis_env = envs[1]
+plugin_env = envs[2]
+util_env = envs[3]
+cp_util_env = envs[4]
+test_env = envs[5]
+
+######################################################################
+####### Distribution ###
+######################################################################
+
+dist_zip = 'nsis-${VERSION}${DISTSUFFIX}.zip'
+zip_target = defenv.Zip(dist_zip, '$ZIPDISTDIR')
+defenv.Alias('dist-zip', zip_target)
+
+AlwaysBuild(defenv.AddPostAction(zip_target, Delete('$ZIPDISTDIR')))
+
+if defenv['PLATFORM'] == 'win32':
+ optchar = '/'
+else:
+ optchar = '-'
+
+defenv['INSTVER'] = '%sDVERSION=$VERSION' % optchar
+if defenv.has_key('VER_MAJOR') and defenv.has_key('VER_MINOR') \
+ and defenv.has_key('VER_REVISION') and defenv.has_key('VER_BUILD'):
+ defenv['INSTVER'] += ' %sDVER_MAJOR=$VER_MAJOR' % optchar
+ defenv['INSTVER'] += ' %sDVER_MINOR=$VER_MINOR' % optchar
+ defenv['INSTVER'] += ' %sDVER_REVISION=$VER_REVISION' % optchar
+ defenv['INSTVER'] += ' %sDVER_BUILD=$VER_BUILD' % optchar
+
+inst_env = {}
+inst_env['NSISDIR'] = os.path.abspath(str(defenv['INSTDISTDIR']))
+inst_env['NSISCONFDIR'] = os.path.abspath(str(defenv['INSTDISTDIR']))
+
+installer_target = defenv.Command('nsis-${VERSION}-setup${DISTSUFFIX}.exe',
+ '$INSTDISTDIR' + os.sep + 'Examples' + os.sep + 'makensis.nsi',
+ '$INSTDISTDIR' + os.sep + 'makensis$PROGSUFFIX ' +
+ '%sDOUTFILE=$TARGET.abspath $INSTVER $SOURCE' % optchar,
+ ENV = inst_env)
+defenv.Depends(installer_target, '$INSTDISTDIR')
+defenv.Sign(installer_target)
+defenv.Alias('dist-installer', installer_target)
+
+AlwaysBuild(defenv.AddPostAction(installer_target, Delete('$INSTDISTDIR')))
+
+defenv.Alias('dist', ['dist-zip', 'dist-installer'])
+
+######################################################################
+####### Distribute Basics ###
+######################################################################
+
+for d in doc:
+ if d in defenv['SKIPDOC']:
+ continue
+ defenv.DistributeDoc(d)
+
+defenv.DistributeConf('nsisconf.nsh')
+
+######################################################################
+####### Stubs ###
+######################################################################
+
+def BuildStub(compression, solid):
+ env = stub_env.Clone()
+
+ suffix = ''
+ if solid:
+ suffix = '_solid'
+
+ build_dir = '$BUILD_PREFIX/stub_%s%s' % (compression, suffix)
+
+ exports = { 'env' : env, 'compression' : compression, 'solid_compression' : solid }
+
+ target = defenv.SConscript(dirs = 'Source/exehead', build_dir = build_dir, duplicate = False, exports = exports)
+ env.SideEffect('%s/stub_%s.map' % (build_dir, stub), target)
+
+ env.DistributeStubs(target, names=compression+suffix)
+
+ defenv.Alias(compression, target)
+ defenv.Alias('stubs', target)
+
+for stub in stubs:
+ if stub in defenv['SKIPSTUBS']:
+ continue
+
+ BuildStub(stub, False)
+ BuildStub(stub, True)
+
+defenv.DistributeStubs('Source/exehead/uninst.ico',names='uninst')
+
+######################################################################
+####### makensis ###
+######################################################################
+
+build_dir = '$BUILD_PREFIX/makensis'
+exports = { 'env' : makensis_env }
+
+makensis = defenv.SConscript(dirs = 'Source', build_dir = build_dir, duplicate = False, exports = exports)
+
+makensis_env.SideEffect('%s/makensis.map' % build_dir, makensis)
+
+defenv.Alias('makensis', makensis)
+
+ins = defenv.DistributeBin(makensis,alias='install-compiler')
+
+######################################################################
+####### Common Functions ###
+######################################################################
+
+def AddEnvStandardFlags(env, defines, flags, entry, nodeflib):
+ if defines:
+ env.Append(CPPDEFINES = defines)
+ if flags:
+ env.Append(CCFLAGS = flags)
+
+ if entry:
+ env.Append(LINKFLAGS = '${ENTRY_FLAG("%s")}' % entry)
+
+ if nodeflib:
+ env.Append(LINKFLAGS = '$NODEFLIBS_FLAG') # no default libraries
+
+def AppendRES(env, source, res, resources):
+ if res:
+ target = MakeFileList(res)[0].name.replace('.rc', '-rc')
+ target_res = env.RES(target, res)
+ if resources:
+ env.Depends(target_res, resources)
+ source.append(target_res)
+
+def CleanMap(env, target, target_name):
+ env.Clean(target, File(target_name + '.map'))
+
+def DistributeExtras(env, target, examples, docs):
+ if examples:
+ env.DistributeExamples(examples, path=target)
+ if docs:
+ env.DistributeDocs(docs, path=target)
+
+######################################################################
+####### Plug-ins ###
+######################################################################
+
+def BuildPlugin(target, source, libs, examples = None, docs = None,
+ entry = 'DllMain', res = None, resources = None,
+ defines = None, flags = None, nodeflib = True,
+ cppused = False):
+ env = plugin_env.Clone()
+
+ if cppused and env['CPP_REQUIRES_STDLIB']:
+ nodeflib = False
+
+ AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
+
+ AppendRES(env, source, res, resources)
+
+ plugin = env.SharedLibrary(target, source, LIBS = libs)
+ defenv.Alias(target, plugin)
+ defenv.Alias('plugins', plugin)
+
+ defenv.Sign(plugin)
+
+ CleanMap(env, plugin, target)
+
+ for i in plugin:
+ if str(i)[-4:].lower() == '.dll':
+ plugin = i
+ break
+ env.DistributePlugin(plugin)
+
+ DistributeExtras(env, target, examples, docs)
+
+for plugin in plugins:
+ if plugin in defenv['SKIPPLUGINS']:
+ continue
+
+ path = 'Contrib/' + plugin
+ build_dir = '$BUILD_PREFIX/' + plugin
+ exports = {'BuildPlugin' : BuildPlugin, 'env' : plugin_env.Clone()}
+
+ defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
+
+######################################################################
+####### Utilities ###
+######################################################################
+
+def BuildUtilEnv(defines = None, flags = None, entry = None,
+ nodeflib = None, cross_platform = False):
+ if not cross_platform:
+ env = util_env.Clone()
+ else:
+ env = cp_util_env.Clone()
+
+ AddEnvStandardFlags(env, defines, flags, entry, nodeflib)
+
+ return env
+
+def BuildUtil(target, source, libs, entry = None, res = None,
+ resources = None, defines = None, flags = None,
+ nodeflib = False, file_name = '', path='', contrib = False,
+ examples = None, docs = None, cross_platform = False,
+ root_util = False):
+ env = BuildUtilEnv(defines, flags, entry, nodeflib, cross_platform)
+
+ AppendRES(env, source, res, resources)
+
+ if file_name != '':
+ target = "%s/%s" % (target, file_name)
+
+ # make sure the environment suffix fits
+ if env['PROGSUFFIX'] not in target:
+ if '.' in target:
+ env['PROGSUFFIX'] = target[target.rindex('.'):]
+
+ util = env.Program(target, source, LIBS = libs)
+ defenv.Alias(target, util)
+ defenv.Alias('utils', util)
+
+ defenv.Sign(util)
+
+ CleanMap(env, util, target)
+
+ if contrib:
+ ins = env.DistributeContrib(util, path=path, alias='install-utils')
+ elif cross_platform and not env['PLATFORM'] == 'win32' or root_util and env['PLATFORM'] == 'win32':
+ ins = env.DistributeBin(util, path=path, alias='install-utils')
+ else:
+ ins = env.DistributeW32Bin(util, path=path, alias='install-utils')
+
+ DistributeExtras(env, target, examples, docs)
+
+ return util
+
+for util in utils:
+ if util in defenv['SKIPUTILS']:
+ continue
+
+ path = 'Contrib/' + util
+ build_dir = '$BUILD_PREFIX/' + util
+ exports = {'BuildUtil' : BuildUtil, 'BuildUtilEnv' : BuildUtilEnv, 'env' : util_env}
+
+ defenv.SConscript(dirs = path, build_dir = build_dir, duplicate = False, exports = exports)
+
+######################################################################
+####### Documentation ###
+######################################################################
+
+halibut = defenv.SConscript(
+ dirs = 'Docs/src/bin/halibut',
+ build_dir = '$BUILD_PREFIX/halibut',
+ duplicate = False,
+ exports = {'env' : defenv.Clone()}
+)
+
+if defenv['CHMDOCS']:
+ defenv.SConscript(
+ dirs = 'Docs/src',
+ build_dir = '$BUILD_PREFIX/Docs/chm',
+ duplicate = False,
+ exports = {'halibut' : halibut, 'env' : defenv.Clone(), 'build_chm' : True}
+ )
+else:
+ defenv.SConscript(
+ dirs = 'Docs/src',
+ build_dir = '$BUILD_PREFIX/Docs/html',
+ duplicate = False,
+ exports = {'halibut' : halibut, 'env' : defenv.Clone(), 'build_chm' : False}
+ )
+
+######################################################################
+####### Examples ###
+######################################################################
+
+defenv.SConscript(
+ dirs = 'Examples',
+ exports = {'env': defenv.Clone()}
+)
+
+######################################################################
+####### Includes ###
+######################################################################
+
+defenv.SConscript(
+ dirs = 'Include',
+ exports = {'env': defenv.Clone()}
+)
+
+######################################################################
+####### Miscellaneous ###
+######################################################################
+
+for i in misc:
+ if i in defenv['SKIPMISC']:
+ continue
+
+ defenv.SConscript(dirs = 'Contrib/%s' % i)
+
+######################################################################
+####### Tests ###
+######################################################################
+
+# test code
+
+build_dir = '$BUILD_PREFIX/tests'
+exports = {'env' : test_env.Clone()}
+
+defenv.SConscript(
+ dirs = 'Source/Tests',
+ duplicate = False,
+ exports = exports,
+ build_dir = build_dir
+)
+
+defenv.Ignore('$BUILD_PREFIX', '$BUILD_PREFIX/tests')
+
+# test scripts
+
+test_scripts_env = defenv.Clone(ENV = os.environ) # env needed for some scripts
+test_scripts_env['ENV']['NSISDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
+test_scripts_env['ENV']['NSISCONFDIR'] = os.path.abspath(str(defenv['TESTDISTDIR']))
+
+def test_scripts(target, source, env):
+ from os import walk, sep
+
+ instdir = source[0].path
+
+ makensis = instdir + sep + 'makensis'
+
+ tdlen = len(env.subst('$TESTDISTDIR'))
+ skipped_tests = env['SKIPTESTS'].split(',')
+ ignored_tests = env['IGNORETESTS'].split(',')
+
+ for root, dirs, files in walk(instdir):
+ for file in files:
+ if file[-4:] == '.nsi':
+ nsi = root + sep + file
+ nsif = nsi[tdlen + 1:]
+
+ if nsif in skipped_tests:
+ continue
+
+ if nsif in ignored_tests:
+ cmd = env.Command(None, nsi, '-%s $SOURCE' % makensis)
+ else:
+ cmd = env.Command(None, nsi, '%s $SOURCE' % makensis)
+ AlwaysBuild(cmd)
+ env.Alias('test-scripts', cmd)
+
+ return None
+
+test = test_scripts_env.Command('test-scripts.log', '$TESTDISTDIR', test_scripts)
+test_scripts_env.Alias('test-scripts', test)
+
+# test all
+
+defenv.Alias('test', ['test-code', 'test-scripts'])
diff --git a/Scripts/RegRestore.nsi b/Scripts/RegRestore.nsi
new file mode 100755
index 0000000..6cd7301
--- /dev/null
+++ b/Scripts/RegRestore.nsi
@@ -0,0 +1,15 @@
+Name "Restore NSIS Registry"
+OutFile RegRestore.exe
+
+SilentInstall silent
+
+XPStyle on
+
+Section
+WriteRegStr HKLM SOFTWARE\NSIS "" $PROGRAMFILES\NSIS
+WriteRegStr HKCR NSIS.Header\DefaultIcon "" $PROGRAMFILES\NSIS\makensisw.exe,1
+WriteRegStr HKCR NSIS.Script\DefaultIcon "" $PROGRAMFILES\NSIS\makensisw.exe,1
+WriteRegStr HKCR NSIS.Script\shell\compile\command "" '"$PROGRAMFILES\NSIS\makensisw.exe" "%1"'
+WriteRegStr HKCR NSIS.Script\shell\compile-compressor\command "" '"$PROGRAMFILES\NSIS\makensisw.exe" /ChooseCompressor "%1"'
+MessageBox MB_OK Restored!
+SectionEnd
diff --git a/Scripts/release.py b/Scripts/release.py
index 2d497ff..199114a 100755
--- a/Scripts/release.py
+++ b/Scripts/release.py
@@ -1,401 +1,409 @@
-"""
-requires Python Image Library - http://www.pythonware.com/products/pil/
-requires grep and diff - http://www.mingw.org/msys.shtml
-requires command line cvs - http://tortoisecvs.sourceforge.net/
-
-example release.cfg:
-=========================
-[auth]
-USER=kichik
-WIKI_PASSWORD=xxx
-
-[version]
-VERSION=2.10
-VER_MAJOR=2
-VER_MINOR=1
-VER_REVISION=0
-VER_BUILD=0
-
-[cvs]
-CVS="C:\Program Files\TortoiseCVS\cvs.exe" -z9
-CVS_EXT="C:\Program Files\PuTTY\plink.exe" -2 -l "%u" "%h"
-
-[compression]
-TAR_BZ2=7zatarbz2.bat %s %s
-ZIP="C:\Program Files\7-zip\7za.exe" a -tzip %s -mx9 -mfb=255 -mpass=4 %s
-
-[rsh]
-RSH="C:\Program Files\PuTTY\plink.exe" -2 -l kichik nsis.sourceforge.net
-
-[wiki]
-UPDATE_URL=http://nsis.sourceforge.net/Special:Simpleupdate?action=raw
-
-[cvs2cl]
-CVS2CL=cvs2cl.pl
-CVS2CL_PERL="C:\Program Files\Perl\bin\perl.exe"
-CVS2CL_OPTS=--FSF
-=========================
-
-7zatarbz2.bat:
-=========================
-@echo off
-"C:\Program Files\7-zip\7za.exe" a -ttar %2.tar -r %2
-"C:\Program Files\7-zip\7za.exe" a -tbzip2 %1 -mx9 -mpass=7 %2.tar
-=========================
-
-TODO
-~~~~
-
- * Create release on SourceForge automatically
- * Edit update.php
- * http://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&action=edit
- * Update Freshmeat
- * Update BetaNews
-
-"""
-
-import os
-import sys
-import time
-import Image, ImageFont, ImageDraw
-from ConfigParser import ConfigParser
-from ftplib import FTP
-import time
-
-### read config
-
-cfg = ConfigParser()
-cfg.read('release.cfg')
-
-USER = cfg.get('auth', 'USER')
-WIKI_PASSWORD = cfg.get('auth', 'WIKI_PASSWORD')
-
-VERSION = cfg.get('version', 'VERSION')
-VER_MAJOR = cfg.get('version', 'VER_MAJOR')
-VER_MINOR = cfg.get('version', 'VER_MINOR')
-VER_REVISION = cfg.get('version', 'VER_REVISION')
-VER_BUILD = cfg.get('version', 'VER_BUILD')
-
-CVS = cfg.get('cvs', 'CVS')
-CVS_EXT = cfg.get('cvs', 'CVS_EXT')
-
-TAR_BZ2 = cfg.get('compression', 'TAR_BZ2')
-ZIP = cfg.get('compression', 'ZIP')
-
-RSH = cfg.get('rsh', 'RSH')
-
-PURGE_URL = cfg.get('wiki', 'PURGE_URL')
-UPDATE_URL = cfg.get('wiki', 'UPDATE_URL')
-
-CVS2CL = cfg.get('cvs2cl', 'CVS2CL')
-CVS2CL_PERL = cfg.get('cvs2cl', 'CVS2CL_PERL')
-CVS2CL_OPTS = cfg.get('cvs2cl', 'CVS2CL_OPTS')
-
-### config env
-
-os.environ['CVS_EXT'] = CVS_EXT
-os.environ['CVSROOT'] = ':ext:%s@nsis.cvs.sourceforge.net:/cvsroot/nsis' % USER
-
-CVS_TAG = 'v' + ''.join(VERSION.split('.'))
-
-newverdir = 'nsis-%s-src' % VERSION
-scons_line = 'scons -C %s VERSION=%s VER_MAJOR=%s VER_MINOR=%s VER_REVISION=%s VER_BUILD=%s ' \
- % (newverdir, VERSION, VER_MAJOR, VER_MINOR, VER_REVISION, VER_BUILD)
-
-### utility functions
-
-def log(msg, log_dir = '.'):
- open('%s\\release-%s.log' % (log_dir, VERSION), 'a').write(msg + '\n')
-
-def exit(log_dir = '.'):
- log('\nerror occurred, exiting', log_dir)
- sys.exit(3)
-
-LOG_ERRORS = 2
-LOG_ALL = 1
-LOG_NOTHING = 0
-
-def run(command, log_level, err, wanted_ret = 0, log_dir = '.'):
- log('\nrunning %s\n' % command, log_dir)
-
- if log_level == LOG_ERRORS:
- cmd = '%s 2>> %s\\release-%s.log' % (command, log_dir, VERSION)
- elif log_level == LOG_ALL:
- cmd = '%s >> %s\\release-%s.log 2>&1' % (command, log_dir, VERSION)
- elif log_level == LOG_NOTHING:
- cmd = command
- else:
- raise ValueError
-
- ret = os.system(cmd)
-
- # sleep because for some weird reason, running cvs.exe hugs
- # the release log for some time after os.system returns
- import time
- time.sleep(5)
-
- if ret != wanted_ret:
- print '*** ' + err
- log('*** ' + err, log_dir)
- exit(log_dir)
-
-def confirm(question):
- print question
- if raw_input() != 'y':
- sys.exit(2)
-
-### process functions
-
-def Confirm():
- confirm('are you sure you want to release version %s?' % VERSION)
- confirm('did you update history.but?')
-
-def StartLog():
- open('release-%s.log' % VERSION, 'w').write('releasing version %s at %s\n\n' % (VERSION, time.ctime()))
-
-def RunTests():
- print 'running tests...'
-
- run(
- 'scons -C .. test',
- LOG_ALL,
- 'tests failed - see test.log for details'
- )
-
-def CreateMenuImage():
- print 'creating images...'
-
- ## create new header.gif for menu
-
- im = Image.new('RGB', (598, 45), '#000000')
-
- # copy background from header-notext.gif
-
- bim = Image.open(r'..\Menu\images\header-notext.gif')
- im.paste(bim)
-
- # draw new version number
-
- draw = ImageDraw.Draw(im)
- font = ImageFont.truetype('trebuc.ttf', 24)
- text = 'nullsoft scriptable install system %s' % VERSION
- draw.text((85, 7), text, font = font, fill = 'white')
-
- # save
-
- im = im.convert('P', palette = Image.ADAPTIVE)
- im.save(r'..\Menu\images\header.gif')
-
-def CommitMenuImage():
- print 'committing header.gif...'
-
- run(
- '%s commit -m %s ..\\Menu\\images\\header.gif' % (CVS, VERSION),
- LOG_ALL,
- 'failed committing header.gif'
- )
-
-def TestInstaller():
- print 'testing installer...'
-
- os.mkdir('insttestscons')
-
- run(
- 'scons -C .. VERSION=test PREFIX=%s\\insttestscons install dist-installer' % os.getcwd(),
- LOG_ALL,
- 'installer creation failed'
- )
-
- run(
- '..\\nsis-test-setup.exe /S /D=%s\\insttest' % os.getcwd(),
- LOG_NOTHING,
- 'installer failed'
- )
-
- run(
- 'diff -r insttest insttestscons | grep -v uninst-nsis.exe',
- LOG_ALL,
- 'scons and installer installations differ',
- 1
- )
-
-def Tag():
- print 'tagging...'
-
- run(
- '%s tag -R %s ..' % (CVS, CVS_TAG),
- LOG_ALL,
- 'failed creating tag %s' % CVS_TAG
- )
-
-def Export():
- print 'exporting a fresh copy...'
-
- run(
- '%s -z3 export -r %s -d %s NSIS' % (CVS, CVS_TAG, newverdir),
- LOG_ALL,
- 'export failed'
- )
-
-def CreateChangeLog():
- print 'generating ChangeLog...'
-
- global CVS2CL
- if not os.path.isfile(CVS2CL):
- import urllib
- CVS2CL = urllib.urlretrieve('http://www.red-bean.com/cvs2cl/cvs2cl.pl','cvs2cl.pl')[0]
-
- changelog = os.path.join(newverdir,'ChangeLog')
-
- os.chdir('..')
- run(
- '%s log > Scripts\cvs.log' % CVS,
- LOG_ERRORS,
- 'cvs log failed',
- log_dir = 'Scripts'
- )
- os.chdir('Scripts')
-
- run(
- '%s -x %s %s --file %s --stdin < cvs.log' % (CVS2CL_PERL, CVS2CL, CVS2CL_OPTS, changelog),
- LOG_ALL,
- 'changelog failed'
- )
-
- # Just in case the script is run twice or something
- try: os.remove(changelog+'.bak')
- except: pass
-
-def CreateSourceTarball():
- print 'creating source tarball...'
-
- run(
- TAR_BZ2 % (newverdir + '.tar.bz2', newverdir),
- LOG_ALL,
- 'source tarball creation failed'
- )
-
-def BuildRelease():
- print 'creating distribution files...'
-
- run(
- scons_line + 'dist',
- LOG_ALL,
- 'creation of distribution files failed'
- )
-
-def CreateSpecialBuilds():
- def create_special_build(name, option):
- print 'creating %s special build...' % name
-
- os.mkdir(name)
-
- run(
- scons_line + 'PREFIX=%s\\%s %s install-compiler install-stubs' % (os.getcwd(), name, option),
- LOG_ALL,
- 'creation of %s special build failed' % name
- )
-
- os.chdir(name)
- run(
- ZIP % ('..\\nsis-%s-%s.zip' % (VERSION, name), '*'),
- LOG_ALL,
- 'copmression of %s special build failed' % name,
- log_dir = '..'
- )
- os.chdir('..')
-
- create_special_build('strlen_8192', 'NSIS_MAX_STRLEN=8192')
- create_special_build('log', 'NSIS_CONFIG_LOG=yes')
-
-def UploadFiles():
- print 'uploading files to SourceForge...'
-
- def upload(ftp, file):
- print ' uploading %s...' % file
- ftp.storbinary('STOR /incoming/%s' % file.split('\\')[-1], open(file, 'rb'))
-
- ftp = FTP('upload.sourceforge.net')
- ftp.login()
-
- upload(ftp, newverdir + '.tar.bz2')
- upload(ftp, newverdir + '\\nsis-%s-setup.exe' % VERSION)
- upload(ftp, newverdir + '\\nsis-%s.zip' % VERSION)
- upload(ftp, 'nsis-%s-log.zip' % VERSION)
- upload(ftp, 'nsis-%s-strlen_8192.zip' % VERSION)
-
- ftp.quit()
-
-def ManualRelease():
- print 'release url:'
- print ' http://sourceforge.net/project/admin/qrs.php?package_id=0&group_id=22049'
- print
-
- sys.stdout.write('What\'s the SF release id of the new version? ')
- release_id = raw_input()
-
- return release_id
-
-def UpdateWiki(release_id):
- print 'updating wiki...'
-
- def update_wiki_page(page, data, summary):
- print ' updating `%s` to `%s`' % (page, data)
-
- import urllib
-
- post = 'su_user=' + urllib.quote(USER)
- post += '&su_password=' + urllib.quote(WIKI_PASSWORD)
- post += '&su_title=' + urllib.quote(page)
- post += '&su_data=' + urllib.quote(data)
- post += '&su_summary=' + urllib.quote(summary)
-
- if urllib.urlopen(UPDATE_URL, post).read() != 'success':
- log('*** failed updating `%s` wiki page' % page)
- print ' *** failed updating `%s` wiki page' % page
-
- update_wiki_page('Template:NSISVersion', VERSION, 'new version')
- update_wiki_page('Template:NSISReleaseDate', time.strftime('%B %d, %Y'), 'new version')
- update_wiki_page('Template:NSISReleaseID', release_id, 'new version')
-
-def UpdateChangeLog():
- run(
- '%s touch /home/groups/n/ns/nsis/bin/cl.timestamp' % RSH,
- LOG_ALL,
- 'change log start time modification failed'
- )
-
-def ToDo():
- print 'automatic phase done\n'
- print """
- * %s
- * Edit update.php
- * Post news item
- * http://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&action=edit
- * Update Freshmeat
- * Update BetaNews
- """ % (PURGE_URL % 'Download')
-
-def CloseLog():
- log('done')
-
-### ok, let's go!
-
-Confirm()
-StartLog()
-RunTests()
-CreateMenuImage()
-CommitMenuImage()
-TestInstaller()
-Tag()
-Export()
-CreateChangeLog()
-CreateSourceTarball()
-BuildRelease()
-CreateSpecialBuilds()
-UploadFiles()
-release_id = ManualRelease()
-UpdateWiki(release_id)
-UpdateChangeLog()
-ToDo()
-CloseLog()
+"""
+requires Python Image Library - http://www.pythonware.com/products/pil/
+requires grep and diff - http://www.mingw.org/msys.shtml
+requires command line svn - http://subversion.tigris.org/
+
+example release.cfg:
+=========================
+[auth]
+USER=kichik
+WIKI_PASSWORD=xxx
+
+[version]
+VERSION=2.10
+VER_MAJOR=2
+VER_MINOR=1
+VER_REVISION=0
+VER_BUILD=0
+
+[svn]
+SVN="C:\svn-win32\bin\svn.exe"
+SVNROOT=https://nsis.svn.sourceforge.net/svnroot/nsis/NSIS
+
+[compression]
+TAR_BZ2=7zatarbz2.bat %s %s
+ZIP="C:\Program Files\7-zip\7za.exe" a -tzip %s -mx9 -mfb=255 -mpass=4 %s
+
+[rsh]
+RSH="C:\Program Files\PuTTY\plink.exe" -2 -l kichik nsis.sourceforge.net
+
+[wiki]
+UPDATE_URL=http://nsis.sourceforge.net/Special:Simpleupdate?action=raw
+
+[svn2cl]
+SVN2CL_XSL=svl2cl.xsl
+=========================
+
+7zatarbz2.bat:
+=========================
+@echo off
+"C:\Program Files\7-zip\7za.exe" a -ttar %2.tar -r %2
+"C:\Program Files\7-zip\7za.exe" a -tbzip2 %1 -mx9 -mpass=7 %2.tar
+=========================
+
+TODO
+~~~~
+
+ * Create release on SourceForge automatically
+ * Edit update.php
+ * http://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&action=edit
+ * Update Freshmeat
+ * Update BetaNews
+
+"""
+
+import os
+import sys
+import time
+import Image, ImageFont, ImageDraw
+from ConfigParser import ConfigParser
+from ftplib import FTP
+import time
+
+### read config
+
+cfg = ConfigParser()
+cfg.read('release.cfg')
+
+USER = cfg.get('auth', 'USER')
+WIKI_PASSWORD = cfg.get('auth', 'WIKI_PASSWORD')
+
+VERSION = cfg.get('version', 'VERSION')
+VER_MAJOR = cfg.get('version', 'VER_MAJOR')
+VER_MINOR = cfg.get('version', 'VER_MINOR')
+VER_REVISION = cfg.get('version', 'VER_REVISION')
+VER_BUILD = cfg.get('version', 'VER_BUILD')
+
+SVN = cfg.get('svn', 'SVN')
+SVNROOT = cfg.get('svn', 'SVNROOT')
+
+TAR_BZ2 = cfg.get('compression', 'TAR_BZ2')
+ZIP = cfg.get('compression', 'ZIP')
+
+RSH = cfg.get('rsh', 'RSH')
+
+PURGE_URL = cfg.get('wiki', 'PURGE_URL')
+UPDATE_URL = cfg.get('wiki', 'UPDATE_URL')
+
+SVN2CL_XSL = cfg.get('svn2cl', 'SVN2CL_XSL')
+
+### config env
+
+SVN_TAG = 'v' + ''.join(VERSION.split('.'))
+
+newverdir = 'nsis-%s-src' % VERSION
+scons_line = 'scons -C %s VERSION=%s VER_MAJOR=%s VER_MINOR=%s VER_REVISION=%s VER_BUILD=%s ' \
+ % (newverdir, VERSION, VER_MAJOR, VER_MINOR, VER_REVISION, VER_BUILD)
+
+### utility functions
+
+def log(msg, log_dir = '.'):
+ open('%s\\release-%s.log' % (log_dir, VERSION), 'a').write(msg + '\n')
+
+def exit(log_dir = '.'):
+ log('\nerror occurred, exiting', log_dir)
+ sys.exit(3)
+
+LOG_ERRORS = 2
+LOG_ALL = 1
+LOG_NOTHING = 0
+
+def run(command, log_level, err, wanted_ret = 0, log_dir = '.'):
+ log('\nrunning %s\n' % command, log_dir)
+
+ if log_level == LOG_ERRORS:
+ cmd = '%s 2>> %s\\release-%s.log' % (command, log_dir, VERSION)
+ elif log_level == LOG_ALL:
+ cmd = '%s >> %s\\release-%s.log 2>&1' % (command, log_dir, VERSION)
+ elif log_level == LOG_NOTHING:
+ cmd = command
+ else:
+ raise ValueError
+
+ ret = os.system(cmd)
+
+ # sleep because for some weird reason, running cvs.exe hugs
+ # the release log for some time after os.system returns
+ # still needed for svn?
+ import time
+ time.sleep(5)
+
+ if ret != wanted_ret:
+ print '*** ' + err
+ log('*** ' + err, log_dir)
+ exit(log_dir)
+
+def confirm(question):
+ print question
+ if raw_input() != 'y':
+ sys.exit(2)
+
+### process functions
+
+def Confirm():
+ confirm('are you sure you want to release version %s?' % VERSION)
+ confirm('did you update history.but?')
+
+def StartLog():
+ open('release-%s.log' % VERSION, 'w').write('releasing version %s at %s\n\n' % (VERSION, time.ctime()))
+
+def RunTests():
+ print 'running tests...'
+
+ run(
+ 'scons -C .. test',
+ LOG_ALL,
+ 'tests failed - see test.log for details'
+ )
+
+def CreateMenuImage():
+ print 'creating images...'
+
+ ## create new header.gif for menu
+
+ im = Image.new('RGB', (598, 45), '#000000')
+
+ # copy background from header-notext.gif
+
+ bim = Image.open(r'..\Menu\images\header-notext.gif')
+ im.paste(bim)
+
+ # draw new version number
+
+ draw = ImageDraw.Draw(im)
+ font = ImageFont.truetype('trebuc.ttf', 24)
+ text = 'nullsoft scriptable install system %s' % VERSION
+ draw.text((85, 7), text, font = font, fill = 'white')
+
+ # save
+
+ im = im.convert('P', palette = Image.ADAPTIVE)
+ im.save(r'..\Menu\images\header.gif')
+
+def CommitMenuImage():
+ print 'committing header.gif...'
+
+ run(
+ '%s commit -m %s ..\\Menu\\images\\header.gif' % (SVN, VERSION),
+ LOG_ALL,
+ 'failed committing header.gif'
+ )
+
+def TestInstaller():
+ print 'testing installer...'
+
+ os.mkdir('insttestscons')
+
+ run(
+ 'scons -C .. VERSION=test PREFIX=%s\\insttestscons install dist-installer' % os.getcwd(),
+ LOG_ALL,
+ 'installer creation failed'
+ )
+
+ run(
+ '..\\nsis-test-setup.exe /S /D=%s\\insttest' % os.getcwd(),
+ LOG_NOTHING,
+ 'installer failed'
+ )
+
+ run(
+ 'diff -r insttest insttestscons | grep -v uninst-nsis.exe',
+ LOG_ALL,
+ 'scons and installer installations differ',
+ 1
+ )
+
+def Tag():
+ print 'tagging...'
+
+ run(
+ '%s copy %s/trunk %s/tags/%s -m "Tagging for release %s"' % (SVN, SVNROOT, SVNROOT, SVN_TAG, VERSION),
+ LOG_ALL,
+ 'failed creating tag %s' % SVN_TAG
+ )
+
+def Export():
+ print 'exporting a fresh copy...'
+
+ run(
+ '%s export %s/tags/%s %s' % (SVN, SVNROOT, SVN_TAG, newverdir),
+ LOG_ALL,
+ 'export failed'
+ )
+
+def CreateChangeLog():
+ import win32com.client
+ import codecs
+
+ if not os.path.isfile(SVN2CL_XSL):
+
+ import urllib
+
+ print 'downloading svn2cl.xsl stylesheet...'
+
+ SVN2CL_XSL = urllib.urlretrieve('http://svn.collab.net/repos/svn/trunk/contrib/client-side/svn2cl/svn2cl.xsl','svn2cl.xsl')[0]
+
+ print 'generating ChangeLog...'
+
+ changelog = os.path.join(newverdir,'ChangeLog')
+
+ # generate changelog xml
+ run(
+ '%s log --xml --verbose %s > %s' % (SVN, SVNROOT, changelog),
+ LOG_ERRORS,
+ 'changelog failed'
+ )
+
+ # load changelog xml
+ xmlo = win32com.client.Dispatch('Microsoft.XMLDOM')
+ xmlo.loadXML(file(changelog).read())
+ xmlo.preserveWhiteSpace = True
+
+ # load xsl
+ xslo = win32com.client.Dispatch('Microsoft.XMLDOM')
+ xslo.validateOnParse = False
+ xslo.preserveWhiteSpace = True
+ xslo.loadXML(file(SVN2CL_XSL).read())
+
+ # set strip-prefix to ''
+ for a in xslo.selectNodes("/xsl:stylesheet/xsl:param[@name = 'strip-prefix']")[0].attributes:
+ if a.name == 'select':
+ a.value = "''"
+
+ # transform
+ transformed = xmlo.transformNode(xslo)
+ codecs.open(changelog, 'w', 'utf-8').write(transformed)
+
+def CreateSourceTarball():
+ print 'creating source tarball...'
+
+ run(
+ TAR_BZ2 % (newverdir + '.tar.bz2', newverdir),
+ LOG_ALL,
+ 'source tarball creation failed'
+ )
+
+def BuildRelease():
+ print 'creating distribution files...'
+
+ run(
+ scons_line + 'dist',
+ LOG_ALL,
+ 'creation of distribution files failed'
+ )
+
+def CreateSpecialBuilds():
+ def create_special_build(name, option):
+ print 'creating %s special build...' % name
+
+ os.mkdir(name)
+
+ run(
+ scons_line + 'PREFIX=%s\\%s %s install-compiler install-stubs' % (os.getcwd(), name, option),
+ LOG_ALL,
+ 'creation of %s special build failed' % name
+ )
+
+ os.chdir(name)
+ run(
+ ZIP % ('..\\nsis-%s-%s.zip' % (VERSION, name), '*'),
+ LOG_ALL,
+ 'copmression of %s special build failed' % name,
+ log_dir = '..'
+ )
+ os.chdir('..')
+
+ create_special_build('strlen_8192', 'NSIS_MAX_STRLEN=8192')
+ create_special_build('log', 'NSIS_CONFIG_LOG=yes')
+
+def UploadFiles():
+ print 'uploading files to SourceForge...'
+
+ def upload(ftp, file):
+ print ' uploading %s...' % file
+ ftp.storbinary('STOR /incoming/%s' % file.split('\\')[-1], open(file, 'rb'))
+
+ ftp = FTP('upload.sourceforge.net')
+ ftp.login()
+
+ upload(ftp, newverdir + '.tar.bz2')
+ upload(ftp, newverdir + '\\nsis-%s-setup.exe' % VERSION)
+ upload(ftp, newverdir + '\\nsis-%s.zip' % VERSION)
+ upload(ftp, 'nsis-%s-log.zip' % VERSION)
+ upload(ftp, 'nsis-%s-strlen_8192.zip' % VERSION)
+
+ ftp.quit()
+
+def ManualRelease():
+ print 'release url:'
+ print ' http://sourceforge.net/project/admin/qrs.php?package_id=0&group_id=22049'
+ print
+
+ sys.stdout.write('What\'s the SF release id of the new version? ')
+ release_id = raw_input()
+
+ return release_id
+
+def UpdateWiki(release_id):
+ print 'updating wiki...'
+
+ def update_wiki_page(page, data, summary):
+ print ' updating `%s` to `%s`' % (page, data)
+
+ import urllib
+
+ post = 'su_user=' + urllib.quote(USER)
+ post += '&su_password=' + urllib.quote(WIKI_PASSWORD)
+ post += '&su_title=' + urllib.quote(page)
+ post += '&su_data=' + urllib.quote(data)
+ post += '&su_summary=' + urllib.quote(summary)
+
+ if urllib.urlopen(UPDATE_URL, post).read() != 'success':
+ log('*** failed updating `%s` wiki page' % page)
+ print ' *** failed updating `%s` wiki page' % page
+
+ update_wiki_page('Template:NSISVersion', VERSION, 'new version')
+ update_wiki_page('Template:NSISReleaseDate', time.strftime('%B %d, %Y'), 'new version')
+ update_wiki_page('Template:NSISReleaseID', release_id, 'new version')
+
+def UpdateChangeLog():
+ run(
+ '%s touch /home/groups/n/ns/nsis/bin/cl.timestamp' % RSH,
+ LOG_ALL,
+ 'change log start time modification failed'
+ )
+
+def ToDo():
+ print 'automatic phase done\n'
+ print """
+ * %s
+ * Edit update.php
+ * Post news item
+ * http://en.wikipedia.org/w/index.php?title=Nullsoft_Scriptable_Install_System&action=edit
+ * Update Freshmeat
+ * Update BetaNews
+ """ % (PURGE_URL % 'Download')
+
+def CloseLog():
+ log('done')
+
+### ok, let's go!
+
+Confirm()
+StartLog()
+RunTests()
+CreateMenuImage()
+CommitMenuImage()
+TestInstaller()
+Tag()
+Export()
+CreateChangeLog()
+CreateSourceTarball()
+BuildRelease()
+CreateSpecialBuilds()
+UploadFiles()
+release_id = ManualRelease()
+UpdateWiki(release_id)
+UpdateChangeLog()
+ToDo()
+CloseLog()
diff --git a/Source/7zip/7zGuids.cpp b/Source/7zip/7zGuids.cpp
index f076b0f..1ca1ac1 100755
--- a/Source/7zip/7zGuids.cpp
+++ b/Source/7zip/7zGuids.cpp
@@ -1,31 +1,31 @@
-/*
- * 7zGuids.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-// DLLExports.cpp
-
-// #include "StdAfx.h"
-
-#ifdef WIN32
-# include <objbase.h>
-# include <initguid.h>
-#endif
-
-#include "../Platform.h"
-
-#define INITGUID
-#include "7zip/ICoder.h"
-#include "7zip/Compress/LZ/IMatchFinder.h"
+/*
+ * 7zGuids.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+// DLLExports.cpp
+
+// #include "StdAfx.h"
+
+#ifdef WIN32
+# include <objbase.h>
+# include <initguid.h>
+#endif
+
+#include "../Platform.h"
+
+#define INITGUID
+#include "7zip/ICoder.h"
+#include "7zip/Compress/LZ/IMatchFinder.h"
diff --git a/Source/7zip/7zip/Common/InBuffer.cpp b/Source/7zip/7zip/Common/InBuffer.cpp
index 4d99f5c..e0dcb3d 100755
--- a/Source/7zip/7zip/Common/InBuffer.cpp
+++ b/Source/7zip/7zip/Common/InBuffer.cpp
@@ -1,95 +1,95 @@
-/*
- * InBuffer.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "InBuffer.h"
-
-#include "../../Common/Alloc.h"
-
-CInBuffer::CInBuffer():
- _buffer(0),
- _bufferLimit(0),
- _bufferBase(0),
- _stream(0),
- _bufferSize(0)
-{}
-
-bool CInBuffer::Create(UInt32 bufferSize)
-{
- const UInt32 kMinBlockSize = 1;
- if (bufferSize < kMinBlockSize)
- bufferSize = kMinBlockSize;
- if (_bufferBase != 0 && _bufferSize == bufferSize)
- return true;
- Free();
- _bufferSize = bufferSize;
- _bufferBase = (Byte *)::MidAlloc(bufferSize);
- return (_bufferBase != 0);
-}
-
-void CInBuffer::Free()
-{
- ::MidFree(_bufferBase);
- _bufferBase = 0;
-}
-
-void CInBuffer::SetStream(ISequentialInStream *stream)
-{
- _stream = stream;
-}
-
-void CInBuffer::Init()
-{
- _processedSize = 0;
- _buffer = _bufferBase;
- _bufferLimit = _buffer;
- _wasFinished = false;
- #ifdef _NO_EXCEPTIONS
- ErrorCode = S_OK;
- #endif
-}
-
-bool CInBuffer::ReadBlock()
-{
- #ifdef _NO_EXCEPTIONS
- if (ErrorCode != S_OK)
- return false;
- #endif
- if (_wasFinished)
- return false;
- _processedSize += (_buffer - _bufferBase);
- UInt32 numProcessedBytes;
- HRESULT result = _stream->Read(_bufferBase, _bufferSize, &numProcessedBytes);
- #ifdef _NO_EXCEPTIONS
- ErrorCode = result;
- #else
- if (result != S_OK)
- throw CInBufferException(result);
- #endif
- _buffer = _bufferBase;
- _bufferLimit = _buffer + numProcessedBytes;
- _wasFinished = (numProcessedBytes == 0);
- return (!_wasFinished);
-}
-
-Byte CInBuffer::ReadBlock2()
-{
- if(!ReadBlock())
- return 0xFF;
- return *_buffer++;
-}
+/*
+ * InBuffer.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "InBuffer.h"
+
+#include "../../Common/Alloc.h"
+
+CInBuffer::CInBuffer():
+ _buffer(0),
+ _bufferLimit(0),
+ _bufferBase(0),
+ _stream(0),
+ _bufferSize(0)
+{}
+
+bool CInBuffer::Create(UInt32 bufferSize)
+{
+ const UInt32 kMinBlockSize = 1;
+ if (bufferSize < kMinBlockSize)
+ bufferSize = kMinBlockSize;
+ if (_bufferBase != 0 && _bufferSize == bufferSize)
+ return true;
+ Free();
+ _bufferSize = bufferSize;
+ _bufferBase = (Byte *)::MidAlloc(bufferSize);
+ return (_bufferBase != 0);
+}
+
+void CInBuffer::Free()
+{
+ ::MidFree(_bufferBase);
+ _bufferBase = 0;
+}
+
+void CInBuffer::SetStream(ISequentialInStream *stream)
+{
+ _stream = stream;
+}
+
+void CInBuffer::Init()
+{
+ _processedSize = 0;
+ _buffer = _bufferBase;
+ _bufferLimit = _buffer;
+ _wasFinished = false;
+ #ifdef _NO_EXCEPTIONS
+ ErrorCode = S_OK;
+ #endif
+}
+
+bool CInBuffer::ReadBlock()
+{
+ #ifdef _NO_EXCEPTIONS
+ if (ErrorCode != S_OK)
+ return false;
+ #endif
+ if (_wasFinished)
+ return false;
+ _processedSize += (_buffer - _bufferBase);
+ UInt32 numProcessedBytes;
+ HRESULT result = _stream->Read(_bufferBase, _bufferSize, &numProcessedBytes);
+ #ifdef _NO_EXCEPTIONS
+ ErrorCode = result;
+ #else
+ if (result != S_OK)
+ throw CInBufferException(result);
+ #endif
+ _buffer = _bufferBase;
+ _bufferLimit = _buffer + numProcessedBytes;
+ _wasFinished = (numProcessedBytes == 0);
+ return (!_wasFinished);
+}
+
+Byte CInBuffer::ReadBlock2()
+{
+ if(!ReadBlock())
+ return 0xFF;
+ return *_buffer++;
+}
diff --git a/Source/7zip/7zip/Common/InBuffer.h b/Source/7zip/7zip/Common/InBuffer.h
index 797875f..d1a3556 100755
--- a/Source/7zip/7zip/Common/InBuffer.h
+++ b/Source/7zip/7zip/Common/InBuffer.h
@@ -1,91 +1,91 @@
-/*
- * InBuffer.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __INBUFFER_H
-#define __INBUFFER_H
-
-#include "../IStream.h"
-#include "../../Common/MyCom.h"
-
-#ifndef _NO_EXCEPTIONS
-class CInBufferException
-{
-public:
- HRESULT ErrorCode;
- CInBufferException(HRESULT errorCode): ErrorCode(errorCode) {}
-};
-#endif
-
-class CInBuffer
-{
- Byte *_buffer;
- Byte *_bufferLimit;
- Byte *_bufferBase;
- CMyComPtr<ISequentialInStream> _stream;
- UInt64 _processedSize;
- UInt32 _bufferSize;
- bool _wasFinished;
-
- bool ReadBlock();
- Byte ReadBlock2();
-
-public:
- #ifdef _NO_EXCEPTIONS
- HRESULT ErrorCode;
- #endif
-
- CInBuffer();
- ~CInBuffer() { Free(); }
-
- bool Create(UInt32 bufferSize);
- void Free();
-
- void SetStream(ISequentialInStream *stream);
- void Init();
- void ReleaseStream() { _stream.Release(); }
-
- bool ReadByte(Byte &b)
- {
- if(_buffer >= _bufferLimit)
- if(!ReadBlock())
- return false;
- b = *_buffer++;
- return true;
- }
- Byte ReadByte()
- {
- if(_buffer >= _bufferLimit)
- return ReadBlock2();
- return *_buffer++;
- }
- void ReadBytes(void *data, UInt32 size, UInt32 &processedSize)
- {
- for(processedSize = 0; processedSize < size; processedSize++)
- if (!ReadByte(((Byte *)data)[processedSize]))
- return;
- }
- bool ReadBytes(void *data, UInt32 size)
- {
- UInt32 processedSize;
- ReadBytes(data, size, processedSize);
- return (processedSize == size);
- }
- UInt64 GetProcessedSize() const { return _processedSize + (_buffer - _bufferBase); }
- bool WasFinished() const { return _wasFinished; }
-};
-
-#endif
+/*
+ * InBuffer.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __INBUFFER_H
+#define __INBUFFER_H
+
+#include "../IStream.h"
+#include "../../Common/MyCom.h"
+
+#ifndef _NO_EXCEPTIONS
+class CInBufferException
+{
+public:
+ HRESULT ErrorCode;
+ CInBufferException(HRESULT errorCode): ErrorCode(errorCode) {}
+};
+#endif
+
+class CInBuffer
+{
+ Byte *_buffer;
+ Byte *_bufferLimit;
+ Byte *_bufferBase;
+ CMyComPtr<ISequentialInStream> _stream;
+ UInt64 _processedSize;
+ UInt32 _bufferSize;
+ bool _wasFinished;
+
+ bool ReadBlock();
+ Byte ReadBlock2();
+
+public:
+ #ifdef _NO_EXCEPTIONS
+ HRESULT ErrorCode;
+ #endif
+
+ CInBuffer();
+ ~CInBuffer() { Free(); }
+
+ bool Create(UInt32 bufferSize);
+ void Free();
+
+ void SetStream(ISequentialInStream *stream);
+ void Init();
+ void ReleaseStream() { _stream.Release(); }
+
+ bool ReadByte(Byte &b)
+ {
+ if(_buffer >= _bufferLimit)
+ if(!ReadBlock())
+ return false;
+ b = *_buffer++;
+ return true;
+ }
+ Byte ReadByte()
+ {
+ if(_buffer >= _bufferLimit)
+ return ReadBlock2();
+ return *_buffer++;
+ }
+ void ReadBytes(void *data, UInt32 size, UInt32 &processedSize)
+ {
+ for(processedSize = 0; processedSize < size; processedSize++)
+ if (!ReadByte(((Byte *)data)[processedSize]))
+ return;
+ }
+ bool ReadBytes(void *data, UInt32 size)
+ {
+ UInt32 processedSize;
+ ReadBytes(data, size, processedSize);
+ return (processedSize == size);
+ }
+ UInt64 GetProcessedSize() const { return _processedSize + (_buffer - _bufferBase); }
+ bool WasFinished() const { return _wasFinished; }
+};
+
+#endif
diff --git a/Source/7zip/7zip/Common/OutBuffer.cpp b/Source/7zip/7zip/Common/OutBuffer.cpp
index 09bed1b..2803a6a 100755
--- a/Source/7zip/7zip/Common/OutBuffer.cpp
+++ b/Source/7zip/7zip/Common/OutBuffer.cpp
@@ -1,131 +1,131 @@
-/*
- * OutBuffer.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "OutBuffer.h"
-
-#include "../../Common/Alloc.h"
-
-bool COutBuffer::Create(UInt32 bufferSize)
-{
- const UInt32 kMinBlockSize = 1;
- if (bufferSize < kMinBlockSize)
- bufferSize = kMinBlockSize;
- if (_buffer != 0 && _bufferSize == bufferSize)
- return true;
- Free();
- _bufferSize = bufferSize;
- _buffer = (Byte *)::MidAlloc(bufferSize);
- return (_buffer != 0);
-}
-
-void COutBuffer::Free()
-{
- ::MidFree(_buffer);
- _buffer = 0;
-}
-
-void COutBuffer::SetStream(ISequentialOutStream *stream)
-{
- _stream = stream;
-}
-
-void COutBuffer::Init()
-{
- _streamPos = 0;
- _limitPos = _bufferSize;
- _pos = 0;
- _processedSize = 0;
- _overDict = false;
- #ifdef _NO_EXCEPTIONS
- ErrorCode = S_OK;
- #endif
-}
-
-UInt64 COutBuffer::GetProcessedSize() const
-{
- UInt64 res = _processedSize + _pos - _streamPos;
- if (_streamPos > _pos)
- res += _bufferSize;
- return res;
-}
-
-
-HRESULT COutBuffer::FlushPart()
-{
- // _streamPos < _bufferSize
- UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos);
- HRESULT result = S_OK;
- #ifdef _NO_EXCEPTIONS
- result = ErrorCode;
- #endif
- if (_buffer2 != 0)
- {
- memmove(_buffer2, _buffer + _streamPos, size);
- _buffer2 += size;
- }
-
- if (_stream != 0
- #ifdef _NO_EXCEPTIONS
- && (ErrorCode == S_OK)
- #endif
- )
- {
- UInt32 processedSize = 0;
- result = _stream->Write(_buffer + _streamPos, size, &processedSize);
- size = processedSize;
- }
- _streamPos += size;
- if (_streamPos == _bufferSize)
- _streamPos = 0;
- if (_pos == _bufferSize)
- {
- _overDict = true;
- _pos = 0;
- }
- _limitPos = (_streamPos > _pos) ? _streamPos : _bufferSize;
- _processedSize += size;
- return result;
-}
-
-HRESULT COutBuffer::Flush()
-{
- #ifdef _NO_EXCEPTIONS
- if (ErrorCode != S_OK)
- return ErrorCode;
- #endif
-
- while(_streamPos != _pos)
- {
- HRESULT result = FlushPart();
- if (result != S_OK)
- return result;
- }
- return S_OK;
-}
-
-void COutBuffer::FlushWithCheck()
-{
- HRESULT result = FlushPart();
- #ifdef _NO_EXCEPTIONS
- ErrorCode = result;
- #else
- if (result != S_OK)
- throw COutBufferException(result);
- #endif
-}
+/*
+ * OutBuffer.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "OutBuffer.h"
+
+#include "../../Common/Alloc.h"
+
+bool COutBuffer::Create(UInt32 bufferSize)
+{
+ const UInt32 kMinBlockSize = 1;
+ if (bufferSize < kMinBlockSize)
+ bufferSize = kMinBlockSize;
+ if (_buffer != 0 && _bufferSize == bufferSize)
+ return true;
+ Free();
+ _bufferSize = bufferSize;
+ _buffer = (Byte *)::MidAlloc(bufferSize);
+ return (_buffer != 0);
+}
+
+void COutBuffer::Free()
+{
+ ::MidFree(_buffer);
+ _buffer = 0;
+}
+
+void COutBuffer::SetStream(ISequentialOutStream *stream)
+{
+ _stream = stream;
+}
+
+void COutBuffer::Init()
+{
+ _streamPos = 0;
+ _limitPos = _bufferSize;
+ _pos = 0;
+ _processedSize = 0;
+ _overDict = false;
+ #ifdef _NO_EXCEPTIONS
+ ErrorCode = S_OK;
+ #endif
+}
+
+UInt64 COutBuffer::GetProcessedSize() const
+{
+ UInt64 res = _processedSize + _pos - _streamPos;
+ if (_streamPos > _pos)
+ res += _bufferSize;
+ return res;
+}
+
+
+HRESULT COutBuffer::FlushPart()
+{
+ // _streamPos < _bufferSize
+ UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos);
+ HRESULT result = S_OK;
+ #ifdef _NO_EXCEPTIONS
+ result = ErrorCode;
+ #endif
+ if (_buffer2 != 0)
+ {
+ memmove(_buffer2, _buffer + _streamPos, size);
+ _buffer2 += size;
+ }
+
+ if (_stream != 0
+ #ifdef _NO_EXCEPTIONS
+ && (ErrorCode == S_OK)
+ #endif
+ )
+ {
+ UInt32 processedSize = 0;
+ result = _stream->Write(_buffer + _streamPos, size, &processedSize);
+ size = processedSize;
+ }
+ _streamPos += size;
+ if (_streamPos == _bufferSize)
+ _streamPos = 0;
+ if (_pos == _bufferSize)
+ {
+ _overDict = true;
+ _pos = 0;
+ }
+ _limitPos = (_streamPos > _pos) ? _streamPos : _bufferSize;
+ _processedSize += size;
+ return result;
+}
+
+HRESULT COutBuffer::Flush()
+{
+ #ifdef _NO_EXCEPTIONS
+ if (ErrorCode != S_OK)
+ return ErrorCode;
+ #endif
+
+ while(_streamPos != _pos)
+ {
+ HRESULT result = FlushPart();
+ if (result != S_OK)
+ return result;
+ }
+ return S_OK;
+}
+
+void COutBuffer::FlushWithCheck()
+{
+ HRESULT result = FlushPart();
+ #ifdef _NO_EXCEPTIONS
+ ErrorCode = result;
+ #else
+ if (result != S_OK)
+ throw COutBufferException(result);
+ #endif
+}
diff --git a/Source/7zip/7zip/Common/OutBuffer.h b/Source/7zip/7zip/Common/OutBuffer.h
index 34915b7..851ef09 100755
--- a/Source/7zip/7zip/Common/OutBuffer.h
+++ b/Source/7zip/7zip/Common/OutBuffer.h
@@ -1,79 +1,79 @@
-/*
- * OutBuffer.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __OUTBUFFER_H
-#define __OUTBUFFER_H
-
-#include "../IStream.h"
-#include "../../Common/MyCom.h"
-
-#ifndef _NO_EXCEPTIONS
-struct COutBufferException
-{
- HRESULT ErrorCode;
- COutBufferException(HRESULT errorCode): ErrorCode(errorCode) {}
-};
-#endif
-
-class COutBuffer
-{
-protected:
- Byte *_buffer;
- UInt32 _pos;
- UInt32 _limitPos;
- UInt32 _streamPos;
- UInt32 _bufferSize;
- CMyComPtr<ISequentialOutStream> _stream;
- UInt64 _processedSize;
- Byte *_buffer2;
- bool _overDict;
-
- HRESULT FlushPart();
- void FlushWithCheck();
-public:
- #ifdef _NO_EXCEPTIONS
- HRESULT ErrorCode;
- #endif
-
- COutBuffer(): _buffer(0), _pos(0), _stream(0), _buffer2(0) {}
- ~COutBuffer() { Free(); }
-
- bool Create(UInt32 bufferSize);
- void Free();
-
- void SetMemStream(Byte *buffer) { _buffer2 = buffer; }
- void SetStream(ISequentialOutStream *stream);
- void Init();
- HRESULT Flush();
- void ReleaseStream() { _stream.Release(); }
-
- void WriteByte(Byte b)
- {
- _buffer[_pos++] = b;
- if(_pos == _limitPos)
- FlushWithCheck();
- }
- void WriteBytes(const void *data, size_t size)
- {
- for (size_t i = 0; i < size; i++)
- WriteByte(((const Byte *)data)[i]);
- }
-
- UInt64 GetProcessedSize() const;
-};
-
-#endif
+/*
+ * OutBuffer.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __OUTBUFFER_H
+#define __OUTBUFFER_H
+
+#include "../IStream.h"
+#include "../../Common/MyCom.h"
+
+#ifndef _NO_EXCEPTIONS
+struct COutBufferException
+{
+ HRESULT ErrorCode;
+ COutBufferException(HRESULT errorCode): ErrorCode(errorCode) {}
+};
+#endif
+
+class COutBuffer
+{
+protected:
+ Byte *_buffer;
+ UInt32 _pos;
+ UInt32 _limitPos;
+ UInt32 _streamPos;
+ UInt32 _bufferSize;
+ CMyComPtr<ISequentialOutStream> _stream;
+ UInt64 _processedSize;
+ Byte *_buffer2;
+ bool _overDict;
+
+ HRESULT FlushPart();
+ void FlushWithCheck();
+public:
+ #ifdef _NO_EXCEPTIONS
+ HRESULT ErrorCode;
+ #endif
+
+ COutBuffer(): _buffer(0), _pos(0), _stream(0), _buffer2(0) {}
+ ~COutBuffer() { Free(); }
+
+ bool Create(UInt32 bufferSize);
+ void Free();
+
+ void SetMemStream(Byte *buffer) { _buffer2 = buffer; }
+ void SetStream(ISequentialOutStream *stream);
+ void Init();
+ HRESULT Flush();
+ void ReleaseStream() { _stream.Release(); }
+
+ void WriteByte(Byte b)
+ {
+ _buffer[_pos++] = b;
+ if(_pos == _limitPos)
+ FlushWithCheck();
+ }
+ void WriteBytes(const void *data, size_t size)
+ {
+ for (size_t i = 0; i < size; i++)
+ WriteByte(((const Byte *)data)[i]);
+ }
+
+ UInt64 GetProcessedSize() const;
+};
+
+#endif
diff --git a/Source/7zip/7zip/Common/StdAfx.h b/Source/7zip/7zip/Common/StdAfx.h
index 8e1b1ea..2736abc 100755
--- a/Source/7zip/7zip/Common/StdAfx.h
+++ b/Source/7zip/7zip/Common/StdAfx.h
@@ -1,8 +1,8 @@
-// StdAfx.h
-
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#include "../../Common/MyWindows.h"
-
-#endif
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../Common/MyWindows.h"
+
+#endif
diff --git a/Source/7zip/7zip/Common/StreamUtils.cpp b/Source/7zip/7zip/Common/StreamUtils.cpp
index ad77344..e072a67 100755
--- a/Source/7zip/7zip/Common/StreamUtils.cpp
+++ b/Source/7zip/7zip/Common/StreamUtils.cpp
@@ -1,59 +1,59 @@
-/*
- * StreamUtils.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "../../Common/MyCom.h"
-#include "StreamUtils.h"
-
-HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize)
-{
- if (processedSize != 0)
- *processedSize = 0;
- while(size != 0)
- {
- UInt32 processedSizeLoc;
- HRESULT res = stream->Read(data, size, &processedSizeLoc);
- if (processedSize != 0)
- *processedSize += processedSizeLoc;
- data = (Byte *)((Byte *)data + processedSizeLoc);
- size -= processedSizeLoc;
- RINOK(res);
- if (processedSizeLoc == 0)
- return S_OK;
- }
- return S_OK;
-}
-
-HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize)
-{
- if (processedSize != 0)
- *processedSize = 0;
- while(size != 0)
- {
- UInt32 processedSizeLoc;
- HRESULT res = stream->Write(data, size, &processedSizeLoc);
- if (processedSize != 0)
- *processedSize += processedSizeLoc;
- data = (const void *)((const Byte *)data + processedSizeLoc);
- size -= processedSizeLoc;
- RINOK(res);
- if (processedSizeLoc == 0)
- break;
- }
- return S_OK;
-}
+/*
+ * StreamUtils.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "../../Common/MyCom.h"
+#include "StreamUtils.h"
+
+HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize != 0)
+ *processedSize = 0;
+ while(size != 0)
+ {
+ UInt32 processedSizeLoc;
+ HRESULT res = stream->Read(data, size, &processedSizeLoc);
+ if (processedSize != 0)
+ *processedSize += processedSizeLoc;
+ data = (Byte *)((Byte *)data + processedSizeLoc);
+ size -= processedSizeLoc;
+ RINOK(res);
+ if (processedSizeLoc == 0)
+ return S_OK;
+ }
+ return S_OK;
+}
+
+HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize)
+{
+ if (processedSize != 0)
+ *processedSize = 0;
+ while(size != 0)
+ {
+ UInt32 processedSizeLoc;
+ HRESULT res = stream->Write(data, size, &processedSizeLoc);
+ if (processedSize != 0)
+ *processedSize += processedSizeLoc;
+ data = (const void *)((const Byte *)data + processedSizeLoc);
+ size -= processedSizeLoc;
+ RINOK(res);
+ if (processedSizeLoc == 0)
+ break;
+ }
+ return S_OK;
+}
diff --git a/Source/7zip/7zip/Common/StreamUtils.h b/Source/7zip/7zip/Common/StreamUtils.h
index 58b8141..76cc8b2 100755
--- a/Source/7zip/7zip/Common/StreamUtils.h
+++ b/Source/7zip/7zip/Common/StreamUtils.h
@@ -1,26 +1,26 @@
-/*
- * StreamUtils.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __STREAMUTILS_H
-#define __STREAMUTILS_H
-
-#include "../IStream.h"
-
-HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize);
-HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize);
-
-#endif
+/*
+ * StreamUtils.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __STREAMUTILS_H
+#define __STREAMUTILS_H
+
+#include "../IStream.h"
+
+HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize);
+HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize);
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h
index 186adab..c672b6b 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h
@@ -1,69 +1,69 @@
-/*
- * BinTree.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "../LZInWindow.h"
-#include "../IMatchFinder.h"
-
-namespace BT_NAMESPACE {
-
-typedef UInt32 CIndex;
-const UInt32 kMaxValForNormalize = (UInt32(1) << 31) - 1;
-
-class CMatchFinder:
- public IMatchFinder,
- public CLZInWindow,
- public CMyUnknownImp,
- public IMatchFinderSetNumPasses
-{
- UInt32 _cyclicBufferPos;
- UInt32 _cyclicBufferSize; // it must be historySize + 1
- UInt32 _matchMaxLen;
- CIndex *_hash;
- CIndex *_son;
- UInt32 _hashMask;
- UInt32 _cutValue;
- UInt32 _hashSizeSum;
-
- void Normalize();
- void FreeThisClassMemory();
- void FreeMemory();
-
- MY_UNKNOWN_IMP
-
- STDMETHOD(SetStream)(ISequentialInStream *inStream);
- STDMETHOD_(void, ReleaseStream)();
- STDMETHOD(Init)();
- HRESULT MovePos();
- STDMETHOD_(Byte, GetIndexByte)(Int32 index);
- STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
- STDMETHOD_(UInt32, GetNumAvailableBytes)();
- STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
- STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes);
- STDMETHOD_(void, ChangeBufferPos)();
-
- STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
- UInt32 matchMaxLen, UInt32 keepAddBufferAfter);
- STDMETHOD(GetMatches)(UInt32 *distances);
- STDMETHOD(Skip)(UInt32 num);
-
-public:
- CMatchFinder();
- virtual ~CMatchFinder();
- virtual void SetNumPasses(UInt32 numPasses) { _cutValue = numPasses; }
-};
-
-}
+/*
+ * BinTree.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "../LZInWindow.h"
+#include "../IMatchFinder.h"
+
+namespace BT_NAMESPACE {
+
+typedef UInt32 CIndex;
+const UInt32 kMaxValForNormalize = (UInt32(1) << 31) - 1;
+
+class CMatchFinder:
+ public IMatchFinder,
+ public CLZInWindow,
+ public CMyUnknownImp,
+ public IMatchFinderSetNumPasses
+{
+ UInt32 _cyclicBufferPos;
+ UInt32 _cyclicBufferSize; // it must be historySize + 1
+ UInt32 _matchMaxLen;
+ CIndex *_hash;
+ CIndex *_son;
+ UInt32 _hashMask;
+ UInt32 _cutValue;
+ UInt32 _hashSizeSum;
+
+ void Normalize();
+ void FreeThisClassMemory();
+ void FreeMemory();
+
+ MY_UNKNOWN_IMP
+
+ STDMETHOD(SetStream)(ISequentialInStream *inStream);
+ STDMETHOD_(void, ReleaseStream)();
+ STDMETHOD(Init)();
+ HRESULT MovePos();
+ STDMETHOD_(Byte, GetIndexByte)(Int32 index);
+ STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
+ STDMETHOD_(UInt32, GetNumAvailableBytes)();
+ STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
+ STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes);
+ STDMETHOD_(void, ChangeBufferPos)();
+
+ STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
+ UInt32 matchMaxLen, UInt32 keepAddBufferAfter);
+ STDMETHOD(GetMatches)(UInt32 *distances);
+ STDMETHOD(Skip)(UInt32 num);
+
+public:
+ CMatchFinder();
+ virtual ~CMatchFinder();
+ virtual void SetNumPasses(UInt32 numPasses) { _cutValue = numPasses; }
+};
+
+}
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h
index 2e2996a..0a7e559 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h
@@ -1,27 +1,27 @@
-/*
- * BinTree2.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREE2_H
-#define __BINTREE2_H
-
-#define BT_NAMESPACE NBT2
-
-#include "BinTreeMain.h"
-
-#undef BT_NAMESPACE
-
-#endif
+/*
+ * BinTree2.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREE2_H
+#define __BINTREE2_H
+
+#define BT_NAMESPACE NBT2
+
+#include "BinTreeMain.h"
+
+#undef BT_NAMESPACE
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h
index 6b5b116..9515b65 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h
@@ -1,31 +1,31 @@
-/*
- * BinTree3.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREE3_H
-#define __BINTREE3_H
-
-#define BT_NAMESPACE NBT3
-
-#define HASH_ARRAY_2
-
-#include "BinTreeMain.h"
-
-#undef HASH_ARRAY_2
-
-#undef BT_NAMESPACE
-
-#endif
+/*
+ * BinTree3.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREE3_H
+#define __BINTREE3_H
+
+#define BT_NAMESPACE NBT3
+
+#define HASH_ARRAY_2
+
+#include "BinTreeMain.h"
+
+#undef HASH_ARRAY_2
+
+#undef BT_NAMESPACE
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h
index f21cdbd..97d0175 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h
@@ -1,31 +1,31 @@
-/*
- * BinTree3Z.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREE3Z_H
-#define __BINTREE3Z_H
-
-#define BT_NAMESPACE NBT3Z
-
-#define HASH_ZIP
-
-#include "BinTreeMain.h"
-
-#undef HASH_ZIP
-
-#undef BT_NAMESPACE
-
-#endif
+/*
+ * BinTree3Z.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREE3Z_H
+#define __BINTREE3Z_H
+
+#define BT_NAMESPACE NBT3Z
+
+#define HASH_ZIP
+
+#include "BinTreeMain.h"
+
+#undef HASH_ZIP
+
+#undef BT_NAMESPACE
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h
index 15a786c..bb5425b 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h
@@ -1,31 +1,31 @@
-/*
- * BinTree3ZMain.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREE3ZMAIN__H
-#define __BINTREE3ZMAIN__H
-
-#undef BT_NAMESPACE
-#define BT_NAMESPACE NBT3Z
-
-#define HASH_ZIP
-
-#include "BinTreeMain.h"
-
-#undef HASH_ZIP
-
-#endif
-
+/*
+ * BinTree3ZMain.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREE3ZMAIN__H
+#define __BINTREE3ZMAIN__H
+
+#undef BT_NAMESPACE
+#define BT_NAMESPACE NBT3Z
+
+#define HASH_ZIP
+
+#include "BinTreeMain.h"
+
+#undef HASH_ZIP
+
+#endif
+
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h
index 1b215a3..9339f1f 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h
@@ -1,33 +1,33 @@
-/*
- * BinTree4.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREE4_H
-#define __BINTREE4_H
-
-#define BT_NAMESPACE NBT4
-
-#define HASH_ARRAY_2
-#define HASH_ARRAY_3
-
-#include "BinTreeMain.h"
-
-#undef HASH_ARRAY_2
-#undef HASH_ARRAY_3
-
-#undef BT_NAMESPACE
-
-#endif
+/*
+ * BinTree4.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREE4_H
+#define __BINTREE4_H
+
+#define BT_NAMESPACE NBT4
+
+#define HASH_ARRAY_2
+#define HASH_ARRAY_3
+
+#include "BinTreeMain.h"
+
+#undef HASH_ARRAY_2
+#undef HASH_ARRAY_3
+
+#undef BT_NAMESPACE
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h
index e7c23ca..6dea0da 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h
@@ -1,39 +1,39 @@
-/*
- * BinTreeb.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREE4B__H
-#define __BINTREE4B__H
-
-#undef BT_CLSID
-#define BT_CLSID CLSID_CMatchFinderBT4b
-
-#undef BT_NAMESPACE
-#define BT_NAMESPACE NBT4B
-
-#define HASH_ARRAY_2
-#define HASH_ARRAY_3
-#define HASH_BIG
-
-#include "BinTreeMF.h"
-#include "BinTreeMFMain.h"
-
-#undef HASH_ARRAY_2
-#undef HASH_ARRAY_3
-#undef HASH_BIG
-
-#endif
-
+/*
+ * BinTreeb.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREE4B__H
+#define __BINTREE4B__H
+
+#undef BT_CLSID
+#define BT_CLSID CLSID_CMatchFinderBT4b
+
+#undef BT_NAMESPACE
+#define BT_NAMESPACE NBT4B
+
+#define HASH_ARRAY_2
+#define HASH_ARRAY_3
+#define HASH_BIG
+
+#include "BinTreeMF.h"
+#include "BinTreeMFMain.h"
+
+#undef HASH_ARRAY_2
+#undef HASH_ARRAY_3
+#undef HASH_BIG
+
+#endif
+
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h
index 12b70f3..47e6099 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h
@@ -1,119 +1,119 @@
-/*
- * BinTreeMF.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __BINTREEMF_H
-// #define __BINTREEMF_H
-
-#include "../../../ICoder.h"
-#include "BinTree.h"
-
-namespace BT_NAMESPACE {
-
-#undef kIDByte
-#undef kIDString
-
-#ifdef HASH_ARRAY_2
- #ifdef HASH_ARRAY_3
- #ifdef HASH_BIG
- #define kIDByte 0x4
- #define kIDString TEXT("4b")
- #else
- #define kIDByte 0x3
- #define kIDString TEXT("4")
- #endif
- #else
- #define kIDByte 0x2
- #define kIDString TEXT("3")
- #endif
-#else
- #ifdef HASH_ZIP
- #define kIDByte 0x0
- #define kIDString TEXT("3Z")
- #else
- #define kIDByte 0x1
- #define kIDString TEXT("2")
- #endif
-#endif
-
-#undef kIDUse3BytesByte
-#undef kIDUse3BytesString
-
-#define kIDUse3BytesByte 0x00
-#define kIDUse3BytesString TEXT("")
-
-// #undef kIDStringFull
-
-// #define kIDStringFull TEXT("Compress.MatchFinderBT") kIDString kIDUse3BytesString
-
-// {23170F69-40C1-278C-02XX-0000000000}
-DEFINE_GUID(BT_CLSID,
-0x23170F69, 0x40C1, 0x278C, 0x02, kIDByte | kIDUse3BytesByte,
-0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
-
-class CInTree2: public CInTree
-{
- CMyComPtr<IMatchFinderCallback> _callback;
- virtual void BeforeMoveBlock();
- virtual void AfterMoveBlock();
-public:
- void SetCallback(IMatchFinderCallback *callback)
- {
- _callback = callback;
- }
-};
-
-class CMatchFinderBinTree:
- public IMatchFinder,
- public IMatchFinderSetCallback,
- public CMyUnknownImp
-{
- MY_UNKNOWN_IMP1(IMatchFinderSetCallback)
-
- STDMETHOD(Init)(ISequentialInStream *stream);
- STDMETHOD_(void, ReleaseStream)();
- STDMETHOD(MovePos)();
- STDMETHOD_(Byte, GetIndexByte)(Int32 index);
- STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
- STDMETHOD_(UInt32, GetNumAvailableBytes)();
- STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
- STDMETHOD(Create)(UInt32 sizeHistory,
- UInt32 keepAddBufferBefore, UInt32 matchMaxLen,
- UInt32 keepAddBufferAfter);
- STDMETHOD_(UInt32, GetLongestMatch)(UInt32 *distances);
- STDMETHOD_(void, DummyLongestMatch)();
-
- // IMatchFinderSetCallback
- STDMETHOD(SetCallback)(IMatchFinderCallback *callback);
-
-private:
- // UInt32 m_WindowReservSize;
- CInTree2 _matchFinder;
-public:
- // CMatchFinderBinTree(): m_WindowReservSize((1 << 19) + 256) {};
- void SetCutValue(UInt32 cutValue)
- { _matchFinder.SetCutValue(cutValue); }
- /*
- void SetWindowReservSize(UInt32 reservWindowSize)
- { m_WindowReservSize = reservWindowSize; }
- */
- virtual ~CMatchFinderBinTree() {}
-};
-
-}
-
-// #endif
-
+/*
+ * BinTreeMF.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __BINTREEMF_H
+// #define __BINTREEMF_H
+
+#include "../../../ICoder.h"
+#include "BinTree.h"
+
+namespace BT_NAMESPACE {
+
+#undef kIDByte
+#undef kIDString
+
+#ifdef HASH_ARRAY_2
+ #ifdef HASH_ARRAY_3
+ #ifdef HASH_BIG
+ #define kIDByte 0x4
+ #define kIDString TEXT("4b")
+ #else
+ #define kIDByte 0x3
+ #define kIDString TEXT("4")
+ #endif
+ #else
+ #define kIDByte 0x2
+ #define kIDString TEXT("3")
+ #endif
+#else
+ #ifdef HASH_ZIP
+ #define kIDByte 0x0
+ #define kIDString TEXT("3Z")
+ #else
+ #define kIDByte 0x1
+ #define kIDString TEXT("2")
+ #endif
+#endif
+
+#undef kIDUse3BytesByte
+#undef kIDUse3BytesString
+
+#define kIDUse3BytesByte 0x00
+#define kIDUse3BytesString TEXT("")
+
+// #undef kIDStringFull
+
+// #define kIDStringFull TEXT("Compress.MatchFinderBT") kIDString kIDUse3BytesString
+
+// {23170F69-40C1-278C-02XX-0000000000}
+DEFINE_GUID(BT_CLSID,
+0x23170F69, 0x40C1, 0x278C, 0x02, kIDByte | kIDUse3BytesByte,
+0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+
+class CInTree2: public CInTree
+{
+ CMyComPtr<IMatchFinderCallback> _callback;
+ virtual void BeforeMoveBlock();
+ virtual void AfterMoveBlock();
+public:
+ void SetCallback(IMatchFinderCallback *callback)
+ {
+ _callback = callback;
+ }
+};
+
+class CMatchFinderBinTree:
+ public IMatchFinder,
+ public IMatchFinderSetCallback,
+ public CMyUnknownImp
+{
+ MY_UNKNOWN_IMP1(IMatchFinderSetCallback)
+
+ STDMETHOD(Init)(ISequentialInStream *stream);
+ STDMETHOD_(void, ReleaseStream)();
+ STDMETHOD(MovePos)();
+ STDMETHOD_(Byte, GetIndexByte)(Int32 index);
+ STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 back, UInt32 limit);
+ STDMETHOD_(UInt32, GetNumAvailableBytes)();
+ STDMETHOD_(const Byte *, GetPointerToCurrentPos)();
+ STDMETHOD(Create)(UInt32 sizeHistory,
+ UInt32 keepAddBufferBefore, UInt32 matchMaxLen,
+ UInt32 keepAddBufferAfter);
+ STDMETHOD_(UInt32, GetLongestMatch)(UInt32 *distances);
+ STDMETHOD_(void, DummyLongestMatch)();
+
+ // IMatchFinderSetCallback
+ STDMETHOD(SetCallback)(IMatchFinderCallback *callback);
+
+private:
+ // UInt32 m_WindowReservSize;
+ CInTree2 _matchFinder;
+public:
+ // CMatchFinderBinTree(): m_WindowReservSize((1 << 19) + 256) {};
+ void SetCutValue(UInt32 cutValue)
+ { _matchFinder.SetCutValue(cutValue); }
+ /*
+ void SetWindowReservSize(UInt32 reservWindowSize)
+ { m_WindowReservSize = reservWindowSize; }
+ */
+ virtual ~CMatchFinderBinTree() {}
+};
+
+}
+
+// #endif
+
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h
index f72a89e..5b4d979 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMFMain.h
@@ -1,98 +1,98 @@
-/*
- * BinTreeMFMain.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-// #include "StdAfx.h"
-
-// #include "BinTreeMF.h"
-#include "BinTreeMain.h"
-
-namespace BT_NAMESPACE {
-
-void CInTree2::BeforeMoveBlock()
-{
- if (_callback)
- _callback->BeforeChangingBufferPos();
- CInTree::BeforeMoveBlock();
-}
-
-void CInTree2::AfterMoveBlock()
-{
- CInTree::AfterMoveBlock();
- if (_callback)
- _callback->AfterChangingBufferPos();
-}
-
-STDMETHODIMP CMatchFinderBinTree::Init(ISequentialInStream *stream)
- { return _matchFinder.Init(stream); }
-
-STDMETHODIMP_(void) CMatchFinderBinTree::ReleaseStream()
-{
- // _matchFinder.ReleaseStream();
-}
-
-STDMETHODIMP CMatchFinderBinTree::MovePos()
- { return _matchFinder.MovePos(); }
-
-STDMETHODIMP_(Byte) CMatchFinderBinTree::GetIndexByte(Int32 index)
- { return _matchFinder.GetIndexByte(index); }
-
-STDMETHODIMP_(UInt32) CMatchFinderBinTree::GetMatchLen(Int32 index,
- UInt32 back, UInt32 limit)
- { return _matchFinder.GetMatchLen(index, back, limit); }
-
-STDMETHODIMP_(UInt32) CMatchFinderBinTree::GetNumAvailableBytes()
- { return _matchFinder.GetNumAvailableBytes(); }
-
-STDMETHODIMP CMatchFinderBinTree::Create(UInt32 sizeHistory,
- UInt32 keepAddBufferBefore, UInt32 matchMaxLen,
- UInt32 keepAddBufferAfter)
-{
- UInt32 windowReservSize = (sizeHistory + keepAddBufferBefore +
- matchMaxLen + keepAddBufferAfter) / 2 + 256;
- // try
- {
- return _matchFinder.Create(sizeHistory, keepAddBufferBefore,
- matchMaxLen, keepAddBufferAfter, windowReservSize);
- }
- /*
- catch(...)
- {
- return E_OUTOFMEMORY;
- }
- */
-}
-
-STDMETHODIMP_(UInt32) CMatchFinderBinTree::GetLongestMatch(UInt32 *distances)
- { return _matchFinder.GetLongestMatch(distances); }
-
-STDMETHODIMP_(void) CMatchFinderBinTree::DummyLongestMatch()
- { _matchFinder.DummyLongestMatch(); }
-
-STDMETHODIMP_(const Byte *) CMatchFinderBinTree::GetPointerToCurrentPos()
-{
- return _matchFinder.GetPointerToCurrentPos();
-}
-
-// IMatchFinderSetCallback
-STDMETHODIMP CMatchFinderBinTree::SetCallback(IMatchFinderCallback *callback)
-{
- _matchFinder.SetCallback(callback);
- return S_OK;
-}
-
-
-}
+/*
+ * BinTreeMFMain.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+// #include "StdAfx.h"
+
+// #include "BinTreeMF.h"
+#include "BinTreeMain.h"
+
+namespace BT_NAMESPACE {
+
+void CInTree2::BeforeMoveBlock()
+{
+ if (_callback)
+ _callback->BeforeChangingBufferPos();
+ CInTree::BeforeMoveBlock();
+}
+
+void CInTree2::AfterMoveBlock()
+{
+ CInTree::AfterMoveBlock();
+ if (_callback)
+ _callback->AfterChangingBufferPos();
+}
+
+STDMETHODIMP CMatchFinderBinTree::Init(ISequentialInStream *stream)
+ { return _matchFinder.Init(stream); }
+
+STDMETHODIMP_(void) CMatchFinderBinTree::ReleaseStream()
+{
+ // _matchFinder.ReleaseStream();
+}
+
+STDMETHODIMP CMatchFinderBinTree::MovePos()
+ { return _matchFinder.MovePos(); }
+
+STDMETHODIMP_(Byte) CMatchFinderBinTree::GetIndexByte(Int32 index)
+ { return _matchFinder.GetIndexByte(index); }
+
+STDMETHODIMP_(UInt32) CMatchFinderBinTree::GetMatchLen(Int32 index,
+ UInt32 back, UInt32 limit)
+ { return _matchFinder.GetMatchLen(index, back, limit); }
+
+STDMETHODIMP_(UInt32) CMatchFinderBinTree::GetNumAvailableBytes()
+ { return _matchFinder.GetNumAvailableBytes(); }
+
+STDMETHODIMP CMatchFinderBinTree::Create(UInt32 sizeHistory,
+ UInt32 keepAddBufferBefore, UInt32 matchMaxLen,
+ UInt32 keepAddBufferAfter)
+{
+ UInt32 windowReservSize = (sizeHistory + keepAddBufferBefore +
+ matchMaxLen + keepAddBufferAfter) / 2 + 256;
+ // try
+ {
+ return _matchFinder.Create(sizeHistory, keepAddBufferBefore,
+ matchMaxLen, keepAddBufferAfter, windowReservSize);
+ }
+ /*
+ catch(...)
+ {
+ return E_OUTOFMEMORY;
+ }
+ */
+}
+
+STDMETHODIMP_(UInt32) CMatchFinderBinTree::GetLongestMatch(UInt32 *distances)
+ { return _matchFinder.GetLongestMatch(distances); }
+
+STDMETHODIMP_(void) CMatchFinderBinTree::DummyLongestMatch()
+ { _matchFinder.DummyLongestMatch(); }
+
+STDMETHODIMP_(const Byte *) CMatchFinderBinTree::GetPointerToCurrentPos()
+{
+ return _matchFinder.GetPointerToCurrentPos();
+}
+
+// IMatchFinderSetCallback
+STDMETHODIMP CMatchFinderBinTree::SetCallback(IMatchFinderCallback *callback)
+{
+ _matchFinder.SetCallback(callback);
+ return S_OK;
+}
+
+
+}
diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h
index ed161c3..486165c 100755
--- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h
+++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMain.h
@@ -1,546 +1,546 @@
-/*
- * BinTreeMain.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "../../../../Common/Defs.h"
-#include "../../../../Common/CRC.h"
-#include "../../../../Common/Alloc.h"
-
-#include "BinTree.h"
-
-// #include <xmmintrin.h>
-// It's for prefetch
-// But prefetch doesn't give big gain in K8.
-
-namespace BT_NAMESPACE {
-
-#ifdef HASH_ARRAY_2
- static const UInt32 kHash2Size = 1 << 10;
- #define kNumHashDirectBytes 0
- #ifdef HASH_ARRAY_3
- static const UInt32 kNumHashBytes = 4;
- static const UInt32 kHash3Size = 1 << 16;
- #else
- static const UInt32 kNumHashBytes = 3;
- #endif
- static const UInt32 kHashSize = 0;
- static const UInt32 kMinMatchCheck = kNumHashBytes;
- static const UInt32 kStartMaxLen = 1;
-#else
- #ifdef HASH_ZIP
- #define kNumHashDirectBytes 0
- static const UInt32 kNumHashBytes = 3;
- static const UInt32 kHashSize = 1 << 16;
- static const UInt32 kMinMatchCheck = kNumHashBytes;
- static const UInt32 kStartMaxLen = 1;
- #else
- #define kNumHashDirectBytes 2
- static const UInt32 kNumHashBytes = 2;
- static const UInt32 kHashSize = 1 << (8 * kNumHashBytes);
- static const UInt32 kMinMatchCheck = kNumHashBytes + 1;
- static const UInt32 kStartMaxLen = 1;
- #endif
-#endif
-
-#ifdef HASH_ARRAY_2
-#ifdef HASH_ARRAY_3
-static const UInt32 kHash3Offset = kHash2Size;
-#endif
-#endif
-
-static const UInt32 kFixHashSize = 0
- #ifdef HASH_ARRAY_2
- + kHash2Size
- #ifdef HASH_ARRAY_3
- + kHash3Size
- #endif
- #endif
- ;
-
-CMatchFinder::CMatchFinder():
- _hash(0)
-{
-}
-
-void CMatchFinder::FreeThisClassMemory()
-{
- BigFree(_hash);
- _hash = 0;
-}
-
-void CMatchFinder::FreeMemory()
-{
- FreeThisClassMemory();
- CLZInWindow::Free();
-}
-
-CMatchFinder::~CMatchFinder()
-{
- FreeMemory();
-}
-
-STDMETHODIMP CMatchFinder::Create(UInt32 historySize, UInt32 keepAddBufferBefore,
- UInt32 matchMaxLen, UInt32 keepAddBufferAfter)
-{
- if (historySize > kMaxValForNormalize - 256)
- {
- FreeMemory();
- return E_INVALIDARG;
- }
- _cutValue =
- #ifdef _HASH_CHAIN
- 8 + (matchMaxLen >> 2);
- #else
- 16 + (matchMaxLen >> 1);
- #endif
- UInt32 sizeReserv = (historySize + keepAddBufferBefore +
- matchMaxLen + keepAddBufferAfter) / 2 + 256;
- if (CLZInWindow::Create(historySize + keepAddBufferBefore,
- matchMaxLen + keepAddBufferAfter, sizeReserv))
- {
- _matchMaxLen = matchMaxLen;
- UInt32 newCyclicBufferSize = historySize + 1;
- if (_hash != 0 && newCyclicBufferSize == _cyclicBufferSize)
- return S_OK;
- FreeThisClassMemory();
- _cyclicBufferSize = newCyclicBufferSize; // don't change it
-
- UInt32 hs = kHashSize;
-
- #ifdef HASH_ARRAY_2
- hs = historySize - 1;
- hs |= (hs >> 1);
- hs |= (hs >> 2);
- hs |= (hs >> 4);
- hs |= (hs >> 8);
- hs >>= 1;
- hs |= 0xFFFF;
- if (hs > (1 << 24))
- {
- #ifdef HASH_ARRAY_3
- hs >>= 1;
- #else
- hs = (1 << 24) - 1;
- #endif
- }
- _hashMask = hs;
- hs++;
- #endif
- _hashSizeSum = hs + kFixHashSize;
- UInt32 numItems = _hashSizeSum + _cyclicBufferSize
- #ifndef _HASH_CHAIN
- * 2
- #endif
- ;
- size_t sizeInBytes = (size_t)numItems * sizeof(CIndex);
- if (sizeInBytes / sizeof(CIndex) != numItems)
- return E_OUTOFMEMORY;
- _hash = (CIndex *)BigAlloc(sizeInBytes);
- _son = _hash + _hashSizeSum;
- if (_hash != 0)
- return S_OK;
- }
- FreeMemory();
- return E_OUTOFMEMORY;
-}
-
-static const UInt32 kEmptyHashValue = 0;
-
-STDMETHODIMP CMatchFinder::SetStream(ISequentialInStream *stream)
-{
- CLZInWindow::SetStream(stream);
- return S_OK;
-}
-
-STDMETHODIMP CMatchFinder::Init()
-{
- RINOK(CLZInWindow::Init());
- for(UInt32 i = 0; i < _hashSizeSum; i++)
- _hash[i] = kEmptyHashValue;
- _cyclicBufferPos = 0;
- ReduceOffsets(-1);
- return S_OK;
-}
-
-STDMETHODIMP_(void) CMatchFinder::ReleaseStream()
-{
- // ReleaseStream();
-}
-
-#ifdef HASH_ARRAY_2
-#ifdef HASH_ARRAY_3
-
-#define HASH_CALC { \
- UInt32 temp = CCRC::Table[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hash3Value = (temp ^ (UInt32(cur[2]) << 8)) & (kHash3Size - 1); \
- hashValue = (temp ^ (UInt32(cur[2]) << 8) ^ (CCRC::Table[cur[3]] << 5)) & _hashMask; }
-
-#else // no HASH_ARRAY_3
-#define HASH_CALC { \
- UInt32 temp = CCRC::Table[cur[0]] ^ cur[1]; \
- hash2Value = temp & (kHash2Size - 1); \
- hashValue = (temp ^ (UInt32(cur[2]) << 8)) & _hashMask; }
-#endif // HASH_ARRAY_3
-#else // no HASH_ARRAY_2
-#ifdef HASH_ZIP
-inline UInt32 Hash(const Byte *pointer)
-{
- return ((UInt32(pointer[0]) << 8) ^ CCRC::Table[pointer[1]] ^ pointer[2]) & (kHashSize - 1);
-}
-#else // no HASH_ZIP
-inline UInt32 Hash(const Byte *pointer)
-{
- return pointer[0] ^ (UInt32(pointer[1]) << 8);
-}
-#endif // HASH_ZIP
-#endif // HASH_ARRAY_2
-
-STDMETHODIMP CMatchFinder::GetMatches(UInt32 *distances)
-{
- UInt32 lenLimit;
- if (_pos + _matchMaxLen <= _streamPos)
- lenLimit = _matchMaxLen;
- else
- {
- lenLimit = _streamPos - _pos;
- if(lenLimit < kMinMatchCheck)
- {
- distances[0] = 0;
- return MovePos();
- }
- }
-
- int offset = 1;
-
- UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
- const Byte *cur = _buffer + _pos;
-
- UInt32 maxLen = kStartMaxLen; // to avoid items for len < hashSize;
-
- #ifdef HASH_ARRAY_2
- UInt32 hash2Value;
- #ifdef HASH_ARRAY_3
- UInt32 hash3Value;
- #endif
- UInt32 hashValue;
- HASH_CALC;
- #else
- UInt32 hashValue = Hash(cur);
- #endif
-
- UInt32 curMatch = _hash[kFixHashSize + hashValue];
- #ifdef HASH_ARRAY_2
- UInt32 curMatch2 = _hash[hash2Value];
- #ifdef HASH_ARRAY_3
- UInt32 curMatch3 = _hash[kHash3Offset + hash3Value];
- #endif
- _hash[hash2Value] = _pos;
- if(curMatch2 > matchMinPos)
- if (_buffer[curMatch2] == cur[0])
- {
- distances[offset++] = maxLen = 2;
- distances[offset++] = _pos - curMatch2 - 1;
- }
-
- #ifdef HASH_ARRAY_3
- _hash[kHash3Offset + hash3Value] = _pos;
- if(curMatch3 > matchMinPos)
- if (_buffer[curMatch3] == cur[0])
- {
- if (curMatch3 == curMatch2)
- offset -= 2;
- distances[offset++] = maxLen = 3;
- distances[offset++] = _pos - curMatch3 - 1;
- curMatch2 = curMatch3;
- }
- #endif
- if (offset != 1 && curMatch2 == curMatch)
- {
- offset -= 2;
- maxLen = kStartMaxLen;
- }
- #endif
-
- _hash[kFixHashSize + hashValue] = _pos;
-
- CIndex *son = _son;
-
- #ifdef _HASH_CHAIN
- son[_cyclicBufferPos] = curMatch;
- #else
- CIndex *ptr0 = son + (_cyclicBufferPos << 1) + 1;
- CIndex *ptr1 = son + (_cyclicBufferPos << 1);
-
- UInt32 len0, len1;
- len0 = len1 = kNumHashDirectBytes;
- #endif
-
- #if kNumHashDirectBytes != 0
- if(curMatch > matchMinPos)
- {
- if (_buffer[curMatch + kNumHashDirectBytes] != cur[kNumHashDirectBytes])
- {
- distances[offset++] = maxLen = kNumHashDirectBytes;
- distances[offset++] = _pos - curMatch - 1;
- }
- }
- #endif
- UInt32 count = _cutValue;
- while(true)
- {
- if(curMatch <= matchMinPos || count-- == 0)
- {
- #ifndef _HASH_CHAIN
- *ptr0 = *ptr1 = kEmptyHashValue;
- #endif
- break;
- }
- UInt32 delta = _pos - curMatch;
- UInt32 cyclicPos = (delta <= _cyclicBufferPos) ?
- (_cyclicBufferPos - delta):
- (_cyclicBufferPos - delta + _cyclicBufferSize);
- CIndex *pair = son +
- #ifdef _HASH_CHAIN
- cyclicPos;
- #else
- (cyclicPos << 1);
- #endif
-
- // _mm_prefetch((const char *)pair, _MM_HINT_T0);
-
- const Byte *pb = _buffer + curMatch;
- UInt32 len =
- #ifdef _HASH_CHAIN
- kNumHashDirectBytes;
- if (pb[maxLen] == cur[maxLen])
- #else
- MyMin(len0, len1);
- #endif
- if (pb[len] == cur[len])
- {
- while(++len != lenLimit)
- if (pb[len] != cur[len])
- break;
- if (maxLen < len)
- {
- distances[offset++] = maxLen = len;
- distances[offset++] = delta - 1;
- if (len == lenLimit)
- {
- #ifndef _HASH_CHAIN
- *ptr1 = pair[0];
- *ptr0 = pair[1];
- #endif
- break;
- }
- }
- }
- #ifdef _HASH_CHAIN
- curMatch = *pair;
- #else
- if (pb[len] < cur[len])
- {
- *ptr1 = curMatch;
- ptr1 = pair + 1;
- curMatch = *ptr1;
- len1 = len;
- }
- else
- {
- *ptr0 = curMatch;
- ptr0 = pair;
- curMatch = *ptr0;
- len0 = len;
- }
- #endif
- }
- distances[0] = offset - 1;
- if (++_cyclicBufferPos == _cyclicBufferSize)
- _cyclicBufferPos = 0;
- RINOK(CLZInWindow::MovePos());
- if (_pos == kMaxValForNormalize)
- Normalize();
- return S_OK;
-}
-
-STDMETHODIMP CMatchFinder::Skip(UInt32 num)
-{
- do
- {
- #ifdef _HASH_CHAIN
- if (_streamPos - _pos < kNumHashBytes)
- {
- RINOK(MovePos());
- continue;
- }
- #else
- UInt32 lenLimit;
- if (_pos + _matchMaxLen <= _streamPos)
- lenLimit = _matchMaxLen;
- else
- {
- lenLimit = _streamPos - _pos;
- if(lenLimit < kMinMatchCheck)
- {
- RINOK(MovePos());
- continue;
- }
- }
- UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
- #endif
- const Byte *cur = _buffer + _pos;
-
- #ifdef HASH_ARRAY_2
- UInt32 hash2Value;
- #ifdef HASH_ARRAY_3
- UInt32 hash3Value;
- UInt32 hashValue;
- HASH_CALC;
- _hash[kHash3Offset + hash3Value] = _pos;
- #else
- UInt32 hashValue;
- HASH_CALC;
- #endif
- _hash[hash2Value] = _pos;
- #else
- UInt32 hashValue = Hash(cur);
- #endif
-
- UInt32 curMatch = _hash[kFixHashSize + hashValue];
- _hash[kFixHashSize + hashValue] = _pos;
-
- #ifdef _HASH_CHAIN
- _son[_cyclicBufferPos] = curMatch;
- #else
- CIndex *son = _son;
- CIndex *ptr0 = son + (_cyclicBufferPos << 1) + 1;
- CIndex *ptr1 = son + (_cyclicBufferPos << 1);
-
- UInt32 len0, len1;
- len0 = len1 = kNumHashDirectBytes;
- UInt32 count = _cutValue;
- while(true)
- {
- if(curMatch <= matchMinPos || count-- == 0)
- {
- *ptr0 = *ptr1 = kEmptyHashValue;
- break;
- }
-
- UInt32 delta = _pos - curMatch;
- UInt32 cyclicPos = (delta <= _cyclicBufferPos) ?
- (_cyclicBufferPos - delta):
- (_cyclicBufferPos - delta + _cyclicBufferSize);
- CIndex *pair = son + (cyclicPos << 1);
-
- // _mm_prefetch((const char *)pair, _MM_HINT_T0);
-
- const Byte *pb = _buffer + curMatch;
- UInt32 len = MyMin(len0, len1);
-
- if (pb[len] == cur[len])
- {
- while(++len != lenLimit)
- if (pb[len] != cur[len])
- break;
- if (len == lenLimit)
- {
- *ptr1 = pair[0];
- *ptr0 = pair[1];
- break;
- }
- }
- if (pb[len] < cur[len])
- {
- *ptr1 = curMatch;
- ptr1 = pair + 1;
- curMatch = *ptr1;
- len1 = len;
- }
- else
- {
- *ptr0 = curMatch;
- ptr0 = pair;
- curMatch = *ptr0;
- len0 = len;
- }
- }
- #endif
- if (++_cyclicBufferPos == _cyclicBufferSize)
- _cyclicBufferPos = 0;
- RINOK(CLZInWindow::MovePos());
- if (_pos == kMaxValForNormalize)
- Normalize();
- }
- while(--num != 0);
- return S_OK;
-}
-
-void CMatchFinder::Normalize()
-{
- UInt32 subValue = _pos - _cyclicBufferSize;
- CIndex *items = _hash;
- UInt32 numItems = (_hashSizeSum + _cyclicBufferSize
- #ifndef _HASH_CHAIN
- * 2
- #endif
- );
- for (UInt32 i = 0; i < numItems; i++)
- {
- UInt32 value = items[i];
- if (value <= subValue)
- value = kEmptyHashValue;
- else
- value -= subValue;
- items[i] = value;
- }
- ReduceOffsets(subValue);
-}
-
-HRESULT CMatchFinder::MovePos()
-{
- if (++_cyclicBufferPos == _cyclicBufferSize)
- _cyclicBufferPos = 0;
- RINOK(CLZInWindow::MovePos());
- if (_pos == kMaxValForNormalize)
- Normalize();
- return S_OK;
-}
-
-STDMETHODIMP_(Byte) CMatchFinder::GetIndexByte(Int32 index)
- { return CLZInWindow::GetIndexByte(index); }
-
-STDMETHODIMP_(UInt32) CMatchFinder::GetMatchLen(Int32 index,
- UInt32 back, UInt32 limit)
- { return CLZInWindow::GetMatchLen(index, back, limit); }
-
-STDMETHODIMP_(UInt32) CMatchFinder::GetNumAvailableBytes()
- { return CLZInWindow::GetNumAvailableBytes(); }
-
-STDMETHODIMP_(const Byte *) CMatchFinder::GetPointerToCurrentPos()
- { return CLZInWindow::GetPointerToCurrentPos(); }
-
-STDMETHODIMP_(Int32) CMatchFinder::NeedChangeBufferPos(UInt32 numCheckBytes)
- { return CLZInWindow::NeedMove(numCheckBytes) ? 1: 0; }
-
-STDMETHODIMP_(void) CMatchFinder::ChangeBufferPos()
- { CLZInWindow::MoveBlock();}
-
-#undef HASH_CALC
-#undef kNumHashDirectBytes
-
-}
+/*
+ * BinTreeMain.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "../../../../Common/Defs.h"
+#include "../../../../Common/CRC.h"
+#include "../../../../Common/Alloc.h"
+
+#include "BinTree.h"
+
+// #include <xmmintrin.h>
+// It's for prefetch
+// But prefetch doesn't give big gain in K8.
+
+namespace BT_NAMESPACE {
+
+#ifdef HASH_ARRAY_2
+ static const UInt32 kHash2Size = 1 << 10;
+ #define kNumHashDirectBytes 0
+ #ifdef HASH_ARRAY_3
+ static const UInt32 kNumHashBytes = 4;
+ static const UInt32 kHash3Size = 1 << 16;
+ #else
+ static const UInt32 kNumHashBytes = 3;
+ #endif
+ static const UInt32 kHashSize = 0;
+ static const UInt32 kMinMatchCheck = kNumHashBytes;
+ static const UInt32 kStartMaxLen = 1;
+#else
+ #ifdef HASH_ZIP
+ #define kNumHashDirectBytes 0
+ static const UInt32 kNumHashBytes = 3;
+ static const UInt32 kHashSize = 1 << 16;
+ static const UInt32 kMinMatchCheck = kNumHashBytes;
+ static const UInt32 kStartMaxLen = 1;
+ #else
+ #define kNumHashDirectBytes 2
+ static const UInt32 kNumHashBytes = 2;
+ static const UInt32 kHashSize = 1 << (8 * kNumHashBytes);
+ static const UInt32 kMinMatchCheck = kNumHashBytes + 1;
+ static const UInt32 kStartMaxLen = 1;
+ #endif
+#endif
+
+#ifdef HASH_ARRAY_2
+#ifdef HASH_ARRAY_3
+static const UInt32 kHash3Offset = kHash2Size;
+#endif
+#endif
+
+static const UInt32 kFixHashSize = 0
+ #ifdef HASH_ARRAY_2
+ + kHash2Size
+ #ifdef HASH_ARRAY_3
+ + kHash3Size
+ #endif
+ #endif
+ ;
+
+CMatchFinder::CMatchFinder():
+ _hash(0)
+{
+}
+
+void CMatchFinder::FreeThisClassMemory()
+{
+ BigFree(_hash);
+ _hash = 0;
+}
+
+void CMatchFinder::FreeMemory()
+{
+ FreeThisClassMemory();
+ CLZInWindow::Free();
+}
+
+CMatchFinder::~CMatchFinder()
+{
+ FreeMemory();
+}
+
+STDMETHODIMP CMatchFinder::Create(UInt32 historySize, UInt32 keepAddBufferBefore,
+ UInt32 matchMaxLen, UInt32 keepAddBufferAfter)
+{
+ if (historySize > kMaxValForNormalize - 256)
+ {
+ FreeMemory();
+ return E_INVALIDARG;
+ }
+ _cutValue =
+ #ifdef _HASH_CHAIN
+ 8 + (matchMaxLen >> 2);
+ #else
+ 16 + (matchMaxLen >> 1);
+ #endif
+ UInt32 sizeReserv = (historySize + keepAddBufferBefore +
+ matchMaxLen + keepAddBufferAfter) / 2 + 256;
+ if (CLZInWindow::Create(historySize + keepAddBufferBefore,
+ matchMaxLen + keepAddBufferAfter, sizeReserv))
+ {
+ _matchMaxLen = matchMaxLen;
+ UInt32 newCyclicBufferSize = historySize + 1;
+ if (_hash != 0 && newCyclicBufferSize == _cyclicBufferSize)
+ return S_OK;
+ FreeThisClassMemory();
+ _cyclicBufferSize = newCyclicBufferSize; // don't change it
+
+ UInt32 hs = kHashSize;
+
+ #ifdef HASH_ARRAY_2
+ hs = historySize - 1;
+ hs |= (hs >> 1);
+ hs |= (hs >> 2);
+ hs |= (hs >> 4);
+ hs |= (hs >> 8);
+ hs >>= 1;
+ hs |= 0xFFFF;
+ if (hs > (1 << 24))
+ {
+ #ifdef HASH_ARRAY_3
+ hs >>= 1;
+ #else
+ hs = (1 << 24) - 1;
+ #endif
+ }
+ _hashMask = hs;
+ hs++;
+ #endif
+ _hashSizeSum = hs + kFixHashSize;
+ UInt32 numItems = _hashSizeSum + _cyclicBufferSize
+ #ifndef _HASH_CHAIN
+ * 2
+ #endif
+ ;
+ size_t sizeInBytes = (size_t)numItems * sizeof(CIndex);
+ if (sizeInBytes / sizeof(CIndex) != numItems)
+ return E_OUTOFMEMORY;
+ _hash = (CIndex *)BigAlloc(sizeInBytes);
+ _son = _hash + _hashSizeSum;
+ if (_hash != 0)
+ return S_OK;
+ }
+ FreeMemory();
+ return E_OUTOFMEMORY;
+}
+
+static const UInt32 kEmptyHashValue = 0;
+
+STDMETHODIMP CMatchFinder::SetStream(ISequentialInStream *stream)
+{
+ CLZInWindow::SetStream(stream);
+ return S_OK;
+}
+
+STDMETHODIMP CMatchFinder::Init()
+{
+ RINOK(CLZInWindow::Init());
+ for(UInt32 i = 0; i < _hashSizeSum; i++)
+ _hash[i] = kEmptyHashValue;
+ _cyclicBufferPos = 0;
+ ReduceOffsets(-1);
+ return S_OK;
+}
+
+STDMETHODIMP_(void) CMatchFinder::ReleaseStream()
+{
+ // ReleaseStream();
+}
+
+#ifdef HASH_ARRAY_2
+#ifdef HASH_ARRAY_3
+
+#define HASH_CALC { \
+ UInt32 temp = CCRC::Table[cur[0]] ^ cur[1]; \
+ hash2Value = temp & (kHash2Size - 1); \
+ hash3Value = (temp ^ (UInt32(cur[2]) << 8)) & (kHash3Size - 1); \
+ hashValue = (temp ^ (UInt32(cur[2]) << 8) ^ (CCRC::Table[cur[3]] << 5)) & _hashMask; }
+
+#else // no HASH_ARRAY_3
+#define HASH_CALC { \
+ UInt32 temp = CCRC::Table[cur[0]] ^ cur[1]; \
+ hash2Value = temp & (kHash2Size - 1); \
+ hashValue = (temp ^ (UInt32(cur[2]) << 8)) & _hashMask; }
+#endif // HASH_ARRAY_3
+#else // no HASH_ARRAY_2
+#ifdef HASH_ZIP
+inline UInt32 Hash(const Byte *pointer)
+{
+ return ((UInt32(pointer[0]) << 8) ^ CCRC::Table[pointer[1]] ^ pointer[2]) & (kHashSize - 1);
+}
+#else // no HASH_ZIP
+inline UInt32 Hash(const Byte *pointer)
+{
+ return pointer[0] ^ (UInt32(pointer[1]) << 8);
+}
+#endif // HASH_ZIP
+#endif // HASH_ARRAY_2
+
+STDMETHODIMP CMatchFinder::GetMatches(UInt32 *distances)
+{
+ UInt32 lenLimit;
+ if (_pos + _matchMaxLen <= _streamPos)
+ lenLimit = _matchMaxLen;
+ else
+ {
+ lenLimit = _streamPos - _pos;
+ if(lenLimit < kMinMatchCheck)
+ {
+ distances[0] = 0;
+ return MovePos();
+ }
+ }
+
+ int offset = 1;
+
+ UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
+ const Byte *cur = _buffer + _pos;
+
+ UInt32 maxLen = kStartMaxLen; // to avoid items for len < hashSize;
+
+ #ifdef HASH_ARRAY_2
+ UInt32 hash2Value;
+ #ifdef HASH_ARRAY_3
+ UInt32 hash3Value;
+ #endif
+ UInt32 hashValue;
+ HASH_CALC;
+ #else
+ UInt32 hashValue = Hash(cur);
+ #endif
+
+ UInt32 curMatch = _hash[kFixHashSize + hashValue];
+ #ifdef HASH_ARRAY_2
+ UInt32 curMatch2 = _hash[hash2Value];
+ #ifdef HASH_ARRAY_3
+ UInt32 curMatch3 = _hash[kHash3Offset + hash3Value];
+ #endif
+ _hash[hash2Value] = _pos;
+ if(curMatch2 > matchMinPos)
+ if (_buffer[curMatch2] == cur[0])
+ {
+ distances[offset++] = maxLen = 2;
+ distances[offset++] = _pos - curMatch2 - 1;
+ }
+
+ #ifdef HASH_ARRAY_3
+ _hash[kHash3Offset + hash3Value] = _pos;
+ if(curMatch3 > matchMinPos)
+ if (_buffer[curMatch3] == cur[0])
+ {
+ if (curMatch3 == curMatch2)
+ offset -= 2;
+ distances[offset++] = maxLen = 3;
+ distances[offset++] = _pos - curMatch3 - 1;
+ curMatch2 = curMatch3;
+ }
+ #endif
+ if (offset != 1 && curMatch2 == curMatch)
+ {
+ offset -= 2;
+ maxLen = kStartMaxLen;
+ }
+ #endif
+
+ _hash[kFixHashSize + hashValue] = _pos;
+
+ CIndex *son = _son;
+
+ #ifdef _HASH_CHAIN
+ son[_cyclicBufferPos] = curMatch;
+ #else
+ CIndex *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CIndex *ptr1 = son + (_cyclicBufferPos << 1);
+
+ UInt32 len0, len1;
+ len0 = len1 = kNumHashDirectBytes;
+ #endif
+
+ #if kNumHashDirectBytes != 0
+ if(curMatch > matchMinPos)
+ {
+ if (_buffer[curMatch + kNumHashDirectBytes] != cur[kNumHashDirectBytes])
+ {
+ distances[offset++] = maxLen = kNumHashDirectBytes;
+ distances[offset++] = _pos - curMatch - 1;
+ }
+ }
+ #endif
+ UInt32 count = _cutValue;
+ while(true)
+ {
+ if(curMatch <= matchMinPos || count-- == 0)
+ {
+ #ifndef _HASH_CHAIN
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ #endif
+ break;
+ }
+ UInt32 delta = _pos - curMatch;
+ UInt32 cyclicPos = (delta <= _cyclicBufferPos) ?
+ (_cyclicBufferPos - delta):
+ (_cyclicBufferPos - delta + _cyclicBufferSize);
+ CIndex *pair = son +
+ #ifdef _HASH_CHAIN
+ cyclicPos;
+ #else
+ (cyclicPos << 1);
+ #endif
+
+ // _mm_prefetch((const char *)pair, _MM_HINT_T0);
+
+ const Byte *pb = _buffer + curMatch;
+ UInt32 len =
+ #ifdef _HASH_CHAIN
+ kNumHashDirectBytes;
+ if (pb[maxLen] == cur[maxLen])
+ #else
+ MyMin(len0, len1);
+ #endif
+ if (pb[len] == cur[len])
+ {
+ while(++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (maxLen < len)
+ {
+ distances[offset++] = maxLen = len;
+ distances[offset++] = delta - 1;
+ if (len == lenLimit)
+ {
+ #ifndef _HASH_CHAIN
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ #endif
+ break;
+ }
+ }
+ }
+ #ifdef _HASH_CHAIN
+ curMatch = *pair;
+ #else
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ #endif
+ }
+ distances[0] = offset - 1;
+ if (++_cyclicBufferPos == _cyclicBufferSize)
+ _cyclicBufferPos = 0;
+ RINOK(CLZInWindow::MovePos());
+ if (_pos == kMaxValForNormalize)
+ Normalize();
+ return S_OK;
+}
+
+STDMETHODIMP CMatchFinder::Skip(UInt32 num)
+{
+ do
+ {
+ #ifdef _HASH_CHAIN
+ if (_streamPos - _pos < kNumHashBytes)
+ {
+ RINOK(MovePos());
+ continue;
+ }
+ #else
+ UInt32 lenLimit;
+ if (_pos + _matchMaxLen <= _streamPos)
+ lenLimit = _matchMaxLen;
+ else
+ {
+ lenLimit = _streamPos - _pos;
+ if(lenLimit < kMinMatchCheck)
+ {
+ RINOK(MovePos());
+ continue;
+ }
+ }
+ UInt32 matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;
+ #endif
+ const Byte *cur = _buffer + _pos;
+
+ #ifdef HASH_ARRAY_2
+ UInt32 hash2Value;
+ #ifdef HASH_ARRAY_3
+ UInt32 hash3Value;
+ UInt32 hashValue;
+ HASH_CALC;
+ _hash[kHash3Offset + hash3Value] = _pos;
+ #else
+ UInt32 hashValue;
+ HASH_CALC;
+ #endif
+ _hash[hash2Value] = _pos;
+ #else
+ UInt32 hashValue = Hash(cur);
+ #endif
+
+ UInt32 curMatch = _hash[kFixHashSize + hashValue];
+ _hash[kFixHashSize + hashValue] = _pos;
+
+ #ifdef _HASH_CHAIN
+ _son[_cyclicBufferPos] = curMatch;
+ #else
+ CIndex *son = _son;
+ CIndex *ptr0 = son + (_cyclicBufferPos << 1) + 1;
+ CIndex *ptr1 = son + (_cyclicBufferPos << 1);
+
+ UInt32 len0, len1;
+ len0 = len1 = kNumHashDirectBytes;
+ UInt32 count = _cutValue;
+ while(true)
+ {
+ if(curMatch <= matchMinPos || count-- == 0)
+ {
+ *ptr0 = *ptr1 = kEmptyHashValue;
+ break;
+ }
+
+ UInt32 delta = _pos - curMatch;
+ UInt32 cyclicPos = (delta <= _cyclicBufferPos) ?
+ (_cyclicBufferPos - delta):
+ (_cyclicBufferPos - delta + _cyclicBufferSize);
+ CIndex *pair = son + (cyclicPos << 1);
+
+ // _mm_prefetch((const char *)pair, _MM_HINT_T0);
+
+ const Byte *pb = _buffer + curMatch;
+ UInt32 len = MyMin(len0, len1);
+
+ if (pb[len] == cur[len])
+ {
+ while(++len != lenLimit)
+ if (pb[len] != cur[len])
+ break;
+ if (len == lenLimit)
+ {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ break;
+ }
+ }
+ if (pb[len] < cur[len])
+ {
+ *ptr1 = curMatch;
+ ptr1 = pair + 1;
+ curMatch = *ptr1;
+ len1 = len;
+ }
+ else
+ {
+ *ptr0 = curMatch;
+ ptr0 = pair;
+ curMatch = *ptr0;
+ len0 = len;
+ }
+ }
+ #endif
+ if (++_cyclicBufferPos == _cyclicBufferSize)
+ _cyclicBufferPos = 0;
+ RINOK(CLZInWindow::MovePos());
+ if (_pos == kMaxValForNormalize)
+ Normalize();
+ }
+ while(--num != 0);
+ return S_OK;
+}
+
+void CMatchFinder::Normalize()
+{
+ UInt32 subValue = _pos - _cyclicBufferSize;
+ CIndex *items = _hash;
+ UInt32 numItems = (_hashSizeSum + _cyclicBufferSize
+ #ifndef _HASH_CHAIN
+ * 2
+ #endif
+ );
+ for (UInt32 i = 0; i < numItems; i++)
+ {
+ UInt32 value = items[i];
+ if (value <= subValue)
+ value = kEmptyHashValue;
+ else
+ value -= subValue;
+ items[i] = value;
+ }
+ ReduceOffsets(subValue);
+}
+
+HRESULT CMatchFinder::MovePos()
+{
+ if (++_cyclicBufferPos == _cyclicBufferSize)
+ _cyclicBufferPos = 0;
+ RINOK(CLZInWindow::MovePos());
+ if (_pos == kMaxValForNormalize)
+ Normalize();
+ return S_OK;
+}
+
+STDMETHODIMP_(Byte) CMatchFinder::GetIndexByte(Int32 index)
+ { return CLZInWindow::GetIndexByte(index); }
+
+STDMETHODIMP_(UInt32) CMatchFinder::GetMatchLen(Int32 index,
+ UInt32 back, UInt32 limit)
+ { return CLZInWindow::GetMatchLen(index, back, limit); }
+
+STDMETHODIMP_(UInt32) CMatchFinder::GetNumAvailableBytes()
+ { return CLZInWindow::GetNumAvailableBytes(); }
+
+STDMETHODIMP_(const Byte *) CMatchFinder::GetPointerToCurrentPos()
+ { return CLZInWindow::GetPointerToCurrentPos(); }
+
+STDMETHODIMP_(Int32) CMatchFinder::NeedChangeBufferPos(UInt32 numCheckBytes)
+ { return CLZInWindow::NeedMove(numCheckBytes) ? 1: 0; }
+
+STDMETHODIMP_(void) CMatchFinder::ChangeBufferPos()
+ { CLZInWindow::MoveBlock();}
+
+#undef HASH_CALC
+#undef kNumHashDirectBytes
+
+}
diff --git a/Source/7zip/7zip/Compress/LZ/IMatchFinder.h b/Source/7zip/7zip/Compress/LZ/IMatchFinder.h
index 2979eaa..007b1e2 100755
--- a/Source/7zip/7zip/Compress/LZ/IMatchFinder.h
+++ b/Source/7zip/7zip/Compress/LZ/IMatchFinder.h
@@ -1,47 +1,47 @@
-/*
- * IMatchFinder.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __IMATCHFINDER_H
-#define __IMATCHFINDER_H
-
-struct IInWindowStream: public IUnknown
-{
- STDMETHOD(SetStream)(ISequentialInStream *inStream) PURE;
- STDMETHOD_(void, ReleaseStream)() PURE;
- STDMETHOD(Init)() PURE;
- STDMETHOD_(Byte, GetIndexByte)(Int32 index) PURE;
- STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 distance, UInt32 limit) PURE;
- STDMETHOD_(UInt32, GetNumAvailableBytes)() PURE;
- STDMETHOD_(const Byte *, GetPointerToCurrentPos)() PURE;
- STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes) PURE;
- STDMETHOD_(void, ChangeBufferPos)() PURE;
-};
-
-struct IMatchFinder: public IInWindowStream
-{
- STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
- UInt32 matchMaxLen, UInt32 keepAddBufferAfter) PURE;
- STDMETHOD(GetMatches)(UInt32 *distances) PURE;
- STDMETHOD(Skip)(UInt32 num) PURE;
-};
-
-struct IMatchFinderSetNumPasses
-{
- virtual void SetNumPasses(UInt32 numPasses) PURE;
-};
-
-#endif
+/*
+ * IMatchFinder.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __IMATCHFINDER_H
+#define __IMATCHFINDER_H
+
+struct IInWindowStream: public IUnknown
+{
+ STDMETHOD(SetStream)(ISequentialInStream *inStream) PURE;
+ STDMETHOD_(void, ReleaseStream)() PURE;
+ STDMETHOD(Init)() PURE;
+ STDMETHOD_(Byte, GetIndexByte)(Int32 index) PURE;
+ STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 distance, UInt32 limit) PURE;
+ STDMETHOD_(UInt32, GetNumAvailableBytes)() PURE;
+ STDMETHOD_(const Byte *, GetPointerToCurrentPos)() PURE;
+ STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes) PURE;
+ STDMETHOD_(void, ChangeBufferPos)() PURE;
+};
+
+struct IMatchFinder: public IInWindowStream
+{
+ STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore,
+ UInt32 matchMaxLen, UInt32 keepAddBufferAfter) PURE;
+ STDMETHOD(GetMatches)(UInt32 *distances) PURE;
+ STDMETHOD(Skip)(UInt32 num) PURE;
+};
+
+struct IMatchFinderSetNumPasses
+{
+ virtual void SetNumPasses(UInt32 numPasses) PURE;
+};
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp b/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp
index c5e1720..0af3b01 100755
--- a/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp
+++ b/Source/7zip/7zip/Compress/LZ/LZInWindow.cpp
@@ -1,120 +1,120 @@
-/*
- * LZInWindow.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "LZInWindow.h"
-#include "../../../Common/MyCom.h"
-#include "../../../Common/Alloc.h"
-
-void CLZInWindow::Free()
-{
- ::BigFree(_bufferBase);
- _bufferBase = 0;
-}
-
-bool CLZInWindow::Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv)
-{
- _keepSizeBefore = keepSizeBefore;
- _keepSizeAfter = keepSizeAfter;
- UInt32 blockSize = keepSizeBefore + keepSizeAfter + keepSizeReserv;
- if (_bufferBase == 0 || _blockSize != blockSize)
- {
- Free();
- _blockSize = blockSize;
- if (_blockSize != 0)
- _bufferBase = (Byte *)::BigAlloc(_blockSize);
- }
- _pointerToLastSafePosition = _bufferBase + _blockSize - keepSizeAfter;
- if (_blockSize == 0)
- return true;
- return (_bufferBase != 0);
-}
-
-void CLZInWindow::SetStream(ISequentialInStream *stream)
-{
- _stream = stream;
-}
-
-HRESULT CLZInWindow::Init()
-{
- _buffer = _bufferBase;
- _pos = 0;
- _streamPos = 0;
- _streamEndWasReached = false;
- return ReadBlock();
-}
-
-/*
-void CLZInWindow::ReleaseStream()
-{
- _stream.Release();
-}
-*/
-
-///////////////////////////////////////////
-// ReadBlock
-
-// In State:
-// (_buffer + _streamPos) <= (_bufferBase + _blockSize)
-// Out State:
-// _posLimit <= _blockSize - _keepSizeAfter;
-// if(_streamEndWasReached == false):
-// _streamPos >= _pos + _keepSizeAfter
-// _posLimit = _streamPos - _keepSizeAfter;
-// else
-//
-
-HRESULT CLZInWindow::ReadBlock()
-{
- if(_streamEndWasReached)
- return S_OK;
- while(true)
- {
- UInt32 size = (UInt32)(_bufferBase - _buffer) + _blockSize - _streamPos;
- if(size == 0)
- return S_OK;
- UInt32 numReadBytes;
- RINOK(_stream->Read(_buffer + _streamPos, size, &numReadBytes));
- if(numReadBytes == 0)
- {
- _posLimit = _streamPos;
- const Byte *pointerToPostion = _buffer + _posLimit;
- if(pointerToPostion > _pointerToLastSafePosition)
- _posLimit = (UInt32)(_pointerToLastSafePosition - _buffer);
- _streamEndWasReached = true;
- return S_OK;
- }
- _streamPos += numReadBytes;
- if(_streamPos >= _pos + _keepSizeAfter)
- {
- _posLimit = _streamPos - _keepSizeAfter;
- return S_OK;
- }
- }
-}
-
-void CLZInWindow::MoveBlock()
-{
- UInt32 offset = (UInt32)(_buffer - _bufferBase) + _pos - _keepSizeBefore;
- // we need one additional byte, since MovePos moves on 1 byte.
- if (offset > 0)
- offset--;
- UInt32 numBytes = (UInt32)(_buffer - _bufferBase) + _streamPos - offset;
- memmove(_bufferBase, _bufferBase + offset, numBytes);
- _buffer -= offset;
-}
+/*
+ * LZInWindow.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "LZInWindow.h"
+#include "../../../Common/MyCom.h"
+#include "../../../Common/Alloc.h"
+
+void CLZInWindow::Free()
+{
+ ::BigFree(_bufferBase);
+ _bufferBase = 0;
+}
+
+bool CLZInWindow::Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv)
+{
+ _keepSizeBefore = keepSizeBefore;
+ _keepSizeAfter = keepSizeAfter;
+ UInt32 blockSize = keepSizeBefore + keepSizeAfter + keepSizeReserv;
+ if (_bufferBase == 0 || _blockSize != blockSize)
+ {
+ Free();
+ _blockSize = blockSize;
+ if (_blockSize != 0)
+ _bufferBase = (Byte *)::BigAlloc(_blockSize);
+ }
+ _pointerToLastSafePosition = _bufferBase + _blockSize - keepSizeAfter;
+ if (_blockSize == 0)
+ return true;
+ return (_bufferBase != 0);
+}
+
+void CLZInWindow::SetStream(ISequentialInStream *stream)
+{
+ _stream = stream;
+}
+
+HRESULT CLZInWindow::Init()
+{
+ _buffer = _bufferBase;
+ _pos = 0;
+ _streamPos = 0;
+ _streamEndWasReached = false;
+ return ReadBlock();
+}
+
+/*
+void CLZInWindow::ReleaseStream()
+{
+ _stream.Release();
+}
+*/
+
+///////////////////////////////////////////
+// ReadBlock
+
+// In State:
+// (_buffer + _streamPos) <= (_bufferBase + _blockSize)
+// Out State:
+// _posLimit <= _blockSize - _keepSizeAfter;
+// if(_streamEndWasReached == false):
+// _streamPos >= _pos + _keepSizeAfter
+// _posLimit = _streamPos - _keepSizeAfter;
+// else
+//
+
+HRESULT CLZInWindow::ReadBlock()
+{
+ if(_streamEndWasReached)
+ return S_OK;
+ while(true)
+ {
+ UInt32 size = (UInt32)(_bufferBase - _buffer) + _blockSize - _streamPos;
+ if(size == 0)
+ return S_OK;
+ UInt32 numReadBytes;
+ RINOK(_stream->Read(_buffer + _streamPos, size, &numReadBytes));
+ if(numReadBytes == 0)
+ {
+ _posLimit = _streamPos;
+ const Byte *pointerToPostion = _buffer + _posLimit;
+ if(pointerToPostion > _pointerToLastSafePosition)
+ _posLimit = (UInt32)(_pointerToLastSafePosition - _buffer);
+ _streamEndWasReached = true;
+ return S_OK;
+ }
+ _streamPos += numReadBytes;
+ if(_streamPos >= _pos + _keepSizeAfter)
+ {
+ _posLimit = _streamPos - _keepSizeAfter;
+ return S_OK;
+ }
+ }
+}
+
+void CLZInWindow::MoveBlock()
+{
+ UInt32 offset = (UInt32)(_buffer - _bufferBase) + _pos - _keepSizeBefore;
+ // we need one additional byte, since MovePos moves on 1 byte.
+ if (offset > 0)
+ offset--;
+ UInt32 numBytes = (UInt32)(_buffer - _bufferBase) + _streamPos - offset;
+ memmove(_bufferBase, _bufferBase + offset, numBytes);
+ _buffer -= offset;
+}
diff --git a/Source/7zip/7zip/Compress/LZ/LZInWindow.h b/Source/7zip/7zip/Compress/LZ/LZInWindow.h
index 1bafd1a..4d6c5fe 100755
--- a/Source/7zip/7zip/Compress/LZ/LZInWindow.h
+++ b/Source/7zip/7zip/Compress/LZ/LZInWindow.h
@@ -1,102 +1,102 @@
-/*
- * LZInWindow.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __LZ_IN_WINDOW_H
-#define __LZ_IN_WINDOW_H
-
-#include "../../IStream.h"
-
-class CLZInWindow
-{
- Byte *_bufferBase; // pointer to buffer with data
- ISequentialInStream *_stream;
- UInt32 _posLimit; // offset (from _buffer) when new block reading must be done
- bool _streamEndWasReached; // if (true) then _streamPos shows real end of stream
- const Byte *_pointerToLastSafePosition;
-protected:
- Byte *_buffer; // Pointer to virtual Buffer begin
- UInt32 _blockSize; // Size of Allocated memory block
- UInt32 _pos; // offset (from _buffer) of curent byte
- UInt32 _keepSizeBefore; // how many BYTEs must be kept in buffer before _pos
- UInt32 _keepSizeAfter; // how many BYTEs must be kept buffer after _pos
- UInt32 _streamPos; // offset (from _buffer) of first not read byte from Stream
-
- void MoveBlock();
- HRESULT ReadBlock();
- void Free();
-public:
- CLZInWindow(): _bufferBase(0) {}
- virtual ~CLZInWindow() { Free(); }
-
- // keepSizeBefore + keepSizeAfter + keepSizeReserv < 4G)
- bool Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv = (1<<17));
-
- void SetStream(ISequentialInStream *stream);
- HRESULT Init();
- // void ReleaseStream();
-
- Byte *GetBuffer() const { return _buffer; }
-
- const Byte *GetPointerToCurrentPos() const { return _buffer + _pos; }
-
- HRESULT MovePos()
- {
- _pos++;
- if (_pos > _posLimit)
- {
- const Byte *pointerToPostion = _buffer + _pos;
- if(pointerToPostion > _pointerToLastSafePosition)
- MoveBlock();
- return ReadBlock();
- }
- else
- return S_OK;
- }
- Byte GetIndexByte(Int32 index) const { return _buffer[(size_t)_pos + index]; }
-
- // index + limit have not to exceed _keepSizeAfter;
- // -2G <= index < 2G
- UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit) const
- {
- if(_streamEndWasReached)
- if ((_pos + index) + limit > _streamPos)
- limit = _streamPos - (_pos + index);
- distance++;
- const Byte *pby = _buffer + (size_t)_pos + index;
- UInt32 i;
- for(i = 0; i < limit && pby[i] == pby[(size_t)i - distance]; i++);
- return i;
- }
-
- UInt32 GetNumAvailableBytes() const { return _streamPos - _pos; }
-
- void ReduceOffsets(Int32 subValue)
- {
- _buffer += subValue;
- _posLimit -= subValue;
- _pos -= subValue;
- _streamPos -= subValue;
- }
-
- bool NeedMove(UInt32 numCheckBytes)
- {
- UInt32 reserv = _pointerToLastSafePosition - (_buffer + _pos);
- return (reserv <= numCheckBytes);
- }
-};
-
-#endif
+/*
+ * LZInWindow.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __LZ_IN_WINDOW_H
+#define __LZ_IN_WINDOW_H
+
+#include "../../IStream.h"
+
+class CLZInWindow
+{
+ Byte *_bufferBase; // pointer to buffer with data
+ ISequentialInStream *_stream;
+ UInt32 _posLimit; // offset (from _buffer) when new block reading must be done
+ bool _streamEndWasReached; // if (true) then _streamPos shows real end of stream
+ const Byte *_pointerToLastSafePosition;
+protected:
+ Byte *_buffer; // Pointer to virtual Buffer begin
+ UInt32 _blockSize; // Size of Allocated memory block
+ UInt32 _pos; // offset (from _buffer) of curent byte
+ UInt32 _keepSizeBefore; // how many BYTEs must be kept in buffer before _pos
+ UInt32 _keepSizeAfter; // how many BYTEs must be kept buffer after _pos
+ UInt32 _streamPos; // offset (from _buffer) of first not read byte from Stream
+
+ void MoveBlock();
+ HRESULT ReadBlock();
+ void Free();
+public:
+ CLZInWindow(): _bufferBase(0) {}
+ virtual ~CLZInWindow() { Free(); }
+
+ // keepSizeBefore + keepSizeAfter + keepSizeReserv < 4G)
+ bool Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32 keepSizeReserv = (1<<17));
+
+ void SetStream(ISequentialInStream *stream);
+ HRESULT Init();
+ // void ReleaseStream();
+
+ Byte *GetBuffer() const { return _buffer; }
+
+ const Byte *GetPointerToCurrentPos() const { return _buffer + _pos; }
+
+ HRESULT MovePos()
+ {
+ _pos++;
+ if (_pos > _posLimit)
+ {
+ const Byte *pointerToPostion = _buffer + _pos;
+ if(pointerToPostion > _pointerToLastSafePosition)
+ MoveBlock();
+ return ReadBlock();
+ }
+ else
+ return S_OK;
+ }
+ Byte GetIndexByte(Int32 index) const { return _buffer[(size_t)_pos + index]; }
+
+ // index + limit have not to exceed _keepSizeAfter;
+ // -2G <= index < 2G
+ UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit) const
+ {
+ if(_streamEndWasReached)
+ if ((_pos + index) + limit > _streamPos)
+ limit = _streamPos - (_pos + index);
+ distance++;
+ const Byte *pby = _buffer + (size_t)_pos + index;
+ UInt32 i;
+ for(i = 0; i < limit && pby[i] == pby[(size_t)i - distance]; i++);
+ return i;
+ }
+
+ UInt32 GetNumAvailableBytes() const { return _streamPos - _pos; }
+
+ void ReduceOffsets(Int32 subValue)
+ {
+ _buffer += subValue;
+ _posLimit -= subValue;
+ _pos -= subValue;
+ _streamPos -= subValue;
+ }
+
+ bool NeedMove(UInt32 numCheckBytes)
+ {
+ UInt32 reserv = _pointerToLastSafePosition - (_buffer + _pos);
+ return (reserv <= numCheckBytes);
+ }
+};
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp b/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp
index 5370eff..cf05633 100755
--- a/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp
+++ b/Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp
@@ -1,32 +1,32 @@
-/*
- * LZOutWindow.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "../../../Common/Alloc.h"
-#include "LZOutWindow.h"
-
-void CLZOutWindow::Init(bool solid)
-{
- if(!solid)
- COutBuffer::Init();
- #ifdef _NO_EXCEPTIONS
- ErrorCode = S_OK;
- #endif
-}
-
-
+/*
+ * LZOutWindow.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "../../../Common/Alloc.h"
+#include "LZOutWindow.h"
+
+void CLZOutWindow::Init(bool solid)
+{
+ if(!solid)
+ COutBuffer::Init();
+ #ifdef _NO_EXCEPTIONS
+ ErrorCode = S_OK;
+ #endif
+}
+
+
diff --git a/Source/7zip/7zip/Compress/LZ/LZOutWindow.h b/Source/7zip/7zip/Compress/LZ/LZOutWindow.h
index e0ee36e..32648a0 100755
--- a/Source/7zip/7zip/Compress/LZ/LZOutWindow.h
+++ b/Source/7zip/7zip/Compress/LZ/LZOutWindow.h
@@ -1,71 +1,71 @@
-/*
- * LZOutWindow.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __LZ_OUT_WINDOW_H
-#define __LZ_OUT_WINDOW_H
-
-#include "../../IStream.h"
-#include "../../Common/OutBuffer.h"
-
-#ifndef _NO_EXCEPTIONS
-typedef COutBufferException CLZOutWindowException;
-#endif
-
-class CLZOutWindow: public COutBuffer
-{
-public:
- void Init(bool solid = false);
-
- // distance >= 0, len > 0,
- bool CopyBlock(UInt32 distance, UInt32 len)
- {
- UInt32 pos = _pos - distance - 1;
- if (distance >= _pos)
- {
- if (!_overDict || distance >= _bufferSize)
- return false;
- pos += _bufferSize;
- }
- do
- {
- if (pos == _bufferSize)
- pos = 0;
- _buffer[_pos++] = _buffer[pos++];
- if (_pos == _limitPos)
- FlushWithCheck();
- }
- while(--len != 0);
- return true;
- }
-
- void PutByte(Byte b)
- {
- _buffer[_pos++] = b;
- if (_pos == _limitPos)
- FlushWithCheck();
- }
-
- Byte GetByte(UInt32 distance) const
- {
- UInt32 pos = _pos - distance - 1;
- if (pos >= _bufferSize)
- pos += _bufferSize;
- return _buffer[pos];
- }
-};
-
-#endif
+/*
+ * LZOutWindow.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __LZ_OUT_WINDOW_H
+#define __LZ_OUT_WINDOW_H
+
+#include "../../IStream.h"
+#include "../../Common/OutBuffer.h"
+
+#ifndef _NO_EXCEPTIONS
+typedef COutBufferException CLZOutWindowException;
+#endif
+
+class CLZOutWindow: public COutBuffer
+{
+public:
+ void Init(bool solid = false);
+
+ // distance >= 0, len > 0,
+ bool CopyBlock(UInt32 distance, UInt32 len)
+ {
+ UInt32 pos = _pos - distance - 1;
+ if (distance >= _pos)
+ {
+ if (!_overDict || distance >= _bufferSize)
+ return false;
+ pos += _bufferSize;
+ }
+ do
+ {
+ if (pos == _bufferSize)
+ pos = 0;
+ _buffer[_pos++] = _buffer[pos++];
+ if (_pos == _limitPos)
+ FlushWithCheck();
+ }
+ while(--len != 0);
+ return true;
+ }
+
+ void PutByte(Byte b)
+ {
+ _buffer[_pos++] = b;
+ if (_pos == _limitPos)
+ FlushWithCheck();
+ }
+
+ Byte GetByte(UInt32 distance) const
+ {
+ UInt32 pos = _pos - distance - 1;
+ if (pos >= _bufferSize)
+ pos += _bufferSize;
+ return _buffer[pos];
+ }
+};
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZ/StdAfx.h b/Source/7zip/7zip/Compress/LZ/StdAfx.h
index 3de038a..3ff6d8a 100755
--- a/Source/7zip/7zip/Compress/LZ/StdAfx.h
+++ b/Source/7zip/7zip/Compress/LZ/StdAfx.h
@@ -1,6 +1,6 @@
-// StdAfx.h
-
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#endif
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZMA/LZMA.h b/Source/7zip/7zip/Compress/LZMA/LZMA.h
index 13e94e0..dbab974 100755
--- a/Source/7zip/7zip/Compress/LZMA/LZMA.h
+++ b/Source/7zip/7zip/Compress/LZMA/LZMA.h
@@ -1,97 +1,97 @@
-/*
- * LZMA.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __LZMA_H
-#define __LZMA_H
-
-namespace NCompress {
-namespace NLZMA {
-
-const UInt32 kNumRepDistances = 4;
-
-const int kNumStates = 12;
-
-const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
-const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
-const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
-const Byte kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
-
-class CState
-{
-public:
- Byte Index;
- void Init() { Index = 0; }
- void UpdateChar() { Index = kLiteralNextStates[Index]; }
- void UpdateMatch() { Index = kMatchNextStates[Index]; }
- void UpdateRep() { Index = kRepNextStates[Index]; }
- void UpdateShortRep() { Index = kShortRepNextStates[Index]; }
- bool IsCharState() const { return Index < 7; }
-};
-
-const int kNumPosSlotBits = 6;
-const int kDicLogSizeMin = 0;
-const int kDicLogSizeMax = 32;
-const int kDistTableSizeMax = kDicLogSizeMax * 2;
-
-const UInt32 kNumLenToPosStates = 4;
-
-inline UInt32 GetLenToPosState(UInt32 len)
-{
- len -= 2;
- if (len < kNumLenToPosStates)
- return len;
- return kNumLenToPosStates - 1;
-}
-
-namespace NLength {
-
-const int kNumPosStatesBitsMax = 4;
-const UInt32 kNumPosStatesMax = (1 << kNumPosStatesBitsMax);
-
-const int kNumPosStatesBitsEncodingMax = 4;
-const UInt32 kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax);
-
-const int kNumLowBits = 3;
-const int kNumMidBits = 3;
-const int kNumHighBits = 8;
-const UInt32 kNumLowSymbols = 1 << kNumLowBits;
-const UInt32 kNumMidSymbols = 1 << kNumMidBits;
-const UInt32 kNumSymbolsTotal = kNumLowSymbols + kNumMidSymbols + (1 << kNumHighBits);
-
-}
-
-const UInt32 kMatchMinLen = 2;
-const UInt32 kMatchMaxLen = kMatchMinLen + NLength::kNumSymbolsTotal - 1;
-
-const int kNumAlignBits = 4;
-const UInt32 kAlignTableSize = 1 << kNumAlignBits;
-const UInt32 kAlignMask = (kAlignTableSize - 1);
-
-const UInt32 kStartPosModelIndex = 4;
-const UInt32 kEndPosModelIndex = 14;
-const UInt32 kNumPosModels = kEndPosModelIndex - kStartPosModelIndex;
-
-const UInt32 kNumFullDistances = 1 << (kEndPosModelIndex / 2);
-
-const int kNumLitPosStatesBitsEncodingMax = 4;
-const int kNumLitContextBitsMax = 8;
-
-const int kNumMoveBits = 5;
-
-}}
-
-#endif
+/*
+ * LZMA.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __LZMA_H
+#define __LZMA_H
+
+namespace NCompress {
+namespace NLZMA {
+
+const UInt32 kNumRepDistances = 4;
+
+const int kNumStates = 12;
+
+const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5};
+const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10};
+const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11};
+const Byte kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11};
+
+class CState
+{
+public:
+ Byte Index;
+ void Init() { Index = 0; }
+ void UpdateChar() { Index = kLiteralNextStates[Index]; }
+ void UpdateMatch() { Index = kMatchNextStates[Index]; }
+ void UpdateRep() { Index = kRepNextStates[Index]; }
+ void UpdateShortRep() { Index = kShortRepNextStates[Index]; }
+ bool IsCharState() const { return Index < 7; }
+};
+
+const int kNumPosSlotBits = 6;
+const int kDicLogSizeMin = 0;
+const int kDicLogSizeMax = 32;
+const int kDistTableSizeMax = kDicLogSizeMax * 2;
+
+const UInt32 kNumLenToPosStates = 4;
+
+inline UInt32 GetLenToPosState(UInt32 len)
+{
+ len -= 2;
+ if (len < kNumLenToPosStates)
+ return len;
+ return kNumLenToPosStates - 1;
+}
+
+namespace NLength {
+
+const int kNumPosStatesBitsMax = 4;
+const UInt32 kNumPosStatesMax = (1 << kNumPosStatesBitsMax);
+
+const int kNumPosStatesBitsEncodingMax = 4;
+const UInt32 kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax);
+
+const int kNumLowBits = 3;
+const int kNumMidBits = 3;
+const int kNumHighBits = 8;
+const UInt32 kNumLowSymbols = 1 << kNumLowBits;
+const UInt32 kNumMidSymbols = 1 << kNumMidBits;
+const UInt32 kNumSymbolsTotal = kNumLowSymbols + kNumMidSymbols + (1 << kNumHighBits);
+
+}
+
+const UInt32 kMatchMinLen = 2;
+const UInt32 kMatchMaxLen = kMatchMinLen + NLength::kNumSymbolsTotal - 1;
+
+const int kNumAlignBits = 4;
+const UInt32 kAlignTableSize = 1 << kNumAlignBits;
+const UInt32 kAlignMask = (kAlignTableSize - 1);
+
+const UInt32 kStartPosModelIndex = 4;
+const UInt32 kEndPosModelIndex = 14;
+const UInt32 kNumPosModels = kEndPosModelIndex - kStartPosModelIndex;
+
+const UInt32 kNumFullDistances = 1 << (kEndPosModelIndex / 2);
+
+const int kNumLitPosStatesBitsEncodingMax = 4;
+const int kNumLitContextBitsMax = 8;
+
+const int kNumMoveBits = 5;
+
+}}
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp b/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
index 5eae213..171ff7f 100755
--- a/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
+++ b/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
@@ -1,1580 +1,1580 @@
-/*
- * LZMAEncoder.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "../../../Common/Defs.h"
-#include "../../Common/StreamUtils.h"
-
-#include "LZMAEncoder.h"
-
-// for minimal compressing code size define these:
-// #define COMPRESS_MF_BT
-// #define COMPRESS_MF_BT4
-
-#if !defined(COMPRESS_MF_BT) && !defined(COMPRESS_MF_HC)
-#define COMPRESS_MF_BT
-#define COMPRESS_MF_HC
-#endif
-
-#ifdef COMPRESS_MF_BT
-#if !defined(COMPRESS_MF_BT2) && !defined(COMPRESS_MF_BT3) && !defined(COMPRESS_MF_BT4)
-#define COMPRESS_MF_BT2
-#define COMPRESS_MF_BT3
-#define COMPRESS_MF_BT4
-#endif
-#ifdef COMPRESS_MF_BT2
-#include "../LZ/BinTree/BinTree2.h"
-#endif
-#ifdef COMPRESS_MF_BT3
-#include "../LZ/BinTree/BinTree3.h"
-#endif
-#ifdef COMPRESS_MF_BT4
-#include "../LZ/BinTree/BinTree4.h"
-#endif
-#endif
-
-#ifdef COMPRESS_MF_HC
-#include "../LZ/HashChain/HC4.h"
-#endif
-
-#ifdef COMPRESS_MF_MT
-#include "../LZ/MT/MT.h"
-#endif
-
-namespace NCompress {
-namespace NLZMA {
-
-const int kDefaultDictionaryLogSize = 22;
-const UInt32 kNumFastBytesDefault = 0x20;
-
-enum
-{
- kBT2,
- kBT3,
- kBT4,
- kHC4
-};
-
-/*static const wchar_t *kMatchFinderIDs[] =
-{
- L"BT2",
- L"BT3",
- L"BT4",
- L"HC4"
-};*/
-
-Byte g_FastPos[1 << 11];
-
-class CFastPosInit
-{
-public:
- CFastPosInit() { Init(); }
- void Init()
- {
- const Byte kFastSlots = 22;
- int c = 2;
- g_FastPos[0] = 0;
- g_FastPos[1] = 1;
-
- for (Byte slotFast = 2; slotFast < kFastSlots; slotFast++)
- {
- UInt32 k = (1 << ((slotFast >> 1) - 1));
- for (UInt32 j = 0; j < k; j++, c++)
- g_FastPos[c] = slotFast;
- }
- }
-} g_FastPosInit;
-
-
-void CLiteralEncoder2::Encode(NRangeCoder::CEncoder *rangeEncoder, Byte symbol)
-{
- UInt32 context = 1;
- int i = 8;
- do
- {
- i--;
- UInt32 bit = (symbol >> i) & 1;
- _encoders[context].Encode(rangeEncoder, bit);
- context = (context << 1) | bit;
- }
- while(i != 0);
-}
-
-void CLiteralEncoder2::EncodeMatched(NRangeCoder::CEncoder *rangeEncoder,
- Byte matchByte, Byte symbol)
-{
- UInt32 context = 1;
- int i = 8;
- do
- {
- i--;
- UInt32 bit = (symbol >> i) & 1;
- UInt32 matchBit = (matchByte >> i) & 1;
- _encoders[0x100 + (matchBit << 8) + context].Encode(rangeEncoder, bit);
- context = (context << 1) | bit;
- if (matchBit != bit)
- {
- while(i != 0)
- {
- i--;
- UInt32 bit = (symbol >> i) & 1;
- _encoders[context].Encode(rangeEncoder, bit);
- context = (context << 1) | bit;
- }
- break;
- }
- }
- while(i != 0);
-}
-
-UInt32 CLiteralEncoder2::GetPrice(bool matchMode, Byte matchByte, Byte symbol) const
-{
- UInt32 price = 0;
- UInt32 context = 1;
- int i = 8;
- if (matchMode)
- {
- do
- {
- i--;
- UInt32 matchBit = (matchByte >> i) & 1;
- UInt32 bit = (symbol >> i) & 1;
- price += _encoders[0x100 + (matchBit << 8) + context].GetPrice(bit);
- context = (context << 1) | bit;
- if (matchBit != bit)
- break;
- }
- while (i != 0);
- }
- while(i != 0)
- {
- i--;
- UInt32 bit = (symbol >> i) & 1;
- price += _encoders[context].GetPrice(bit);
- context = (context << 1) | bit;
- }
- return price;
-};
-
-
-namespace NLength {
-
-void CEncoder::Init(UInt32 numPosStates)
-{
- _choice.Init();
- _choice2.Init();
- for (UInt32 posState = 0; posState < numPosStates; posState++)
- {
- _lowCoder[posState].Init();
- _midCoder[posState].Init();
- }
- _highCoder.Init();
-}
-
-void CEncoder::Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState)
-{
- if(symbol < kNumLowSymbols)
- {
- _choice.Encode(rangeEncoder, 0);
- _lowCoder[posState].Encode(rangeEncoder, symbol);
- }
- else
- {
- _choice.Encode(rangeEncoder, 1);
- if(symbol < kNumLowSymbols + kNumMidSymbols)
- {
- _choice2.Encode(rangeEncoder, 0);
- _midCoder[posState].Encode(rangeEncoder, symbol - kNumLowSymbols);
- }
- else
- {
- _choice2.Encode(rangeEncoder, 1);
- _highCoder.Encode(rangeEncoder, symbol - kNumLowSymbols - kNumMidSymbols);
- }
- }
-}
-
-void CEncoder::SetPrices(UInt32 posState, UInt32 numSymbols, UInt32 *prices) const
-{
- UInt32 a0 = _choice.GetPrice0();
- UInt32 a1 = _choice.GetPrice1();
- UInt32 b0 = a1 + _choice2.GetPrice0();
- UInt32 b1 = a1 + _choice2.GetPrice1();
- UInt32 i = 0;
- for (i = 0; i < kNumLowSymbols; i++)
- {
- if (i >= numSymbols)
- return;
- prices[i] = a0 + _lowCoder[posState].GetPrice(i);
- }
- for (; i < kNumLowSymbols + kNumMidSymbols; i++)
- {
- if (i >= numSymbols)
- return;
- prices[i] = b0 + _midCoder[posState].GetPrice(i - kNumLowSymbols);
- }
- for (; i < numSymbols; i++)
- prices[i] = b1 + _highCoder.GetPrice(i - kNumLowSymbols - kNumMidSymbols);
-}
-
-}
-CEncoder::CEncoder():
- _numFastBytes(kNumFastBytesDefault),
- _distTableSize(kDefaultDictionaryLogSize * 2),
- _posStateBits(2),
- _posStateMask(4 - 1),
- _numLiteralPosStateBits(0),
- _numLiteralContextBits(3),
- _dictionarySize(1 << kDefaultDictionaryLogSize),
- _dictionarySizePrev(UInt32(-1)),
- _numFastBytesPrev(UInt32(-1)),
- _matchFinderCycles(0),
- _matchFinderIndex(kBT4),
- #ifdef COMPRESS_MF_MT
- _multiThread(false),
- #endif
- _writeEndMark(false),
- setMfPasses(0)
-{
- // _maxMode = false;
- _fastMode = false;
-}
-
-HRESULT CEncoder::Create()
-{
- if (!_rangeEncoder.Create(1 << 20))
- return E_OUTOFMEMORY;
- if (!_matchFinder)
- {
- switch(_matchFinderIndex)
- {
- #ifdef COMPRESS_MF_BT
- #ifdef COMPRESS_MF_BT2
- case kBT2:
- {
- NBT2::CMatchFinder *mfSpec = new NBT2::CMatchFinder;
- setMfPasses = mfSpec;
- _matchFinder = mfSpec;
- break;
- }
- #endif
- #ifdef COMPRESS_MF_BT3
- case kBT3:
- {
- NBT3::CMatchFinder *mfSpec = new NBT3::CMatchFinder;
- setMfPasses = mfSpec;
- _matchFinder = mfSpec;
- break;
- }
- #endif
- #ifdef COMPRESS_MF_BT4
- case kBT4:
- {
- NBT4::CMatchFinder *mfSpec = new NBT4::CMatchFinder;
- setMfPasses = mfSpec;
- _matchFinder = mfSpec;
- break;
- }
- #endif
- #endif
-
- #ifdef COMPRESS_MF_HC
- case kHC4:
- {
- NHC4::CMatchFinder *mfSpec = new NHC4::CMatchFinder;
- setMfPasses = mfSpec;
- _matchFinder = mfSpec;
- break;
- }
- #endif
- }
- if (_matchFinder == 0)
- return E_OUTOFMEMORY;
-
- #ifdef COMPRESS_MF_MT
- if (_multiThread && !(_fastMode && (_matchFinderIndex == kHC4)))
- {
- CMatchFinderMT *mfSpec = new CMatchFinderMT;
- if (mfSpec == 0)
- return E_OUTOFMEMORY;
- CMyComPtr<IMatchFinder> mf = mfSpec;
- RINOK(mfSpec->SetMatchFinder(_matchFinder));
- _matchFinder.Release();
- _matchFinder = mf;
- }
- #endif
- }
-
- if (!_literalEncoder.Create(_numLiteralPosStateBits, _numLiteralContextBits))
- return E_OUTOFMEMORY;
-
- if (_dictionarySize == _dictionarySizePrev && _numFastBytesPrev == _numFastBytes)
- return S_OK;
- RINOK(_matchFinder->Create(_dictionarySize, kNumOpts, _numFastBytes, kMatchMaxLen + 1)); // actually it's + _numFastBytes - _numFastBytes
- if (_matchFinderCycles != 0 && setMfPasses != 0)
- setMfPasses->SetNumPasses(_matchFinderCycles);
- _dictionarySizePrev = _dictionarySize;
- _numFastBytesPrev = _numFastBytes;
- return S_OK;
-}
-
-/*static bool AreStringsEqual(const wchar_t *base, const wchar_t *testString)
-{
- while (true)
- {
- wchar_t c = *testString;
- if (c >= 'a' && c <= 'z')
- c -= 0x20;
- if (*base != c)
- return false;
- if (c == 0)
- return true;
- base++;
- testString++;
- }
-}
-
-static int FindMatchFinder(const wchar_t *s)
-{
- for (int m = 0; m < (int)(sizeof(kMatchFinderIDs) / sizeof(kMatchFinderIDs[0])); m++)
- if (AreStringsEqual(kMatchFinderIDs[m], s))
- return m;
- return -1;
-}*/
-
-STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs,
- const PROPVARIANT *properties, UInt32 numProperties)
-{
- for (UInt32 i = 0; i < numProperties; i++)
- {
- const PROPVARIANT &prop = properties[i];
- switch(propIDs[i])
- {
- case NCoderPropID::kNumFastBytes:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- UInt32 numFastBytes = prop.ulVal;
- if(numFastBytes < 5 || numFastBytes > kMatchMaxLen)
- return E_INVALIDARG;
- _numFastBytes = numFastBytes;
- break;
- }
- case NCoderPropID::kMatchFinderCycles:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- _matchFinderCycles = prop.ulVal;
- break;
- }
- case NCoderPropID::kAlgorithm:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- UInt32 maximize = prop.ulVal;
- _fastMode = (maximize == 0);
- // _maxMode = (maximize >= 2);
- break;
- }
- case NCoderPropID::kMatchFinder:
- {
- return E_NOTIMPL;
- /*if (prop.vt != VT_BSTR)
- return E_INVALIDARG;
- int matchFinderIndexPrev = _matchFinderIndex;
- int m = FindMatchFinder(prop.bstrVal);
- if (m < 0)
- return E_INVALIDARG;
- _matchFinderIndex = m;
- if (_matchFinder && matchFinderIndexPrev != _matchFinderIndex)
- {
- _dictionarySizePrev = (UInt32)-1;
- ReleaseMatchFinder();
- }
- break;*/
- }
- #ifdef COMPRESS_MF_MT
- case NCoderPropID::kMultiThread:
- {
- if (prop.vt != VT_BOOL)
- return E_INVALIDARG;
- bool newMultiThread = (prop.boolVal == VARIANT_TRUE);
- if (newMultiThread != _multiThread)
- {
- _dictionarySizePrev = (UInt32)-1;
- ReleaseMatchFinder();
- _multiThread = newMultiThread;
- }
- break;
- }
- case NCoderPropID::kNumThreads:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- bool newMultiThread = (prop.ulVal > 1);
- if (newMultiThread != _multiThread)
- {
- _dictionarySizePrev = (UInt32)-1;
- ReleaseMatchFinder();
- _multiThread = newMultiThread;
- }
- break;
- }
- #endif
- case NCoderPropID::kDictionarySize:
- {
- const int kDicLogSizeMaxCompress = 30;
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- UInt32 dictionarySize = prop.ulVal;
- if (dictionarySize < UInt32(1 << kDicLogSizeMin) ||
- dictionarySize > UInt32(1 << kDicLogSizeMaxCompress))
- return E_INVALIDARG;
- _dictionarySize = dictionarySize;
- UInt32 dicLogSize;
- for(dicLogSize = 0; dicLogSize < (UInt32)kDicLogSizeMaxCompress; dicLogSize++)
- if (dictionarySize <= (UInt32(1) << dicLogSize))
- break;
- _distTableSize = dicLogSize * 2;
- break;
- }
- case NCoderPropID::kPosStateBits:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- UInt32 value = prop.ulVal;
- if (value > (UInt32)NLength::kNumPosStatesBitsEncodingMax)
- return E_INVALIDARG;
- _posStateBits = value;
- _posStateMask = (1 << _posStateBits) - 1;
- break;
- }
- case NCoderPropID::kLitPosBits:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- UInt32 value = prop.ulVal;
- if (value > (UInt32)kNumLitPosStatesBitsEncodingMax)
- return E_INVALIDARG;
- _numLiteralPosStateBits = value;
- break;
- }
- case NCoderPropID::kLitContextBits:
- {
- if (prop.vt != VT_UI4)
- return E_INVALIDARG;
- UInt32 value = prop.ulVal;
- if (value > (UInt32)kNumLitContextBitsMax)
- return E_INVALIDARG;
- _numLiteralContextBits = value;
- break;
- }
- case NCoderPropID::kEndMarker:
- {
- if (prop.vt != VT_BOOL)
- return E_INVALIDARG;
- SetWriteEndMarkerMode(prop.boolVal == VARIANT_TRUE);
- break;
- }
- default:
- return E_INVALIDARG;
- }
- }
- return S_OK;
-}
-
-STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream)
-{
- const UInt32 kPropSize = 5;
- Byte properties[kPropSize];
- properties[0] = (_posStateBits * 5 + _numLiteralPosStateBits) * 9 + _numLiteralContextBits;
- for (int i = 0; i < 4; i++)
- properties[1 + i] = Byte(_dictionarySize >> (8 * i));
- return WriteStream(outStream, properties, kPropSize, NULL);
-}
-
-STDMETHODIMP CEncoder::SetOutStream(ISequentialOutStream *outStream)
-{
- _rangeEncoder.SetStream(outStream);
- return S_OK;
-}
-
-STDMETHODIMP CEncoder::ReleaseOutStream()
-{
- _rangeEncoder.ReleaseStream();
- return S_OK;
-}
-
-HRESULT CEncoder::Init()
-{
- CBaseState::Init();
-
- // RINOK(_matchFinder->Init(inStream));
- _rangeEncoder.Init();
-
- for(int i = 0; i < kNumStates; i++)
- {
- for (UInt32 j = 0; j <= _posStateMask; j++)
- {
- _isMatch[i][j].Init();
- _isRep0Long[i][j].Init();
- }
- _isRep[i].Init();
- _isRepG0[i].Init();
- _isRepG1[i].Init();
- _isRepG2[i].Init();
- }
-
- _literalEncoder.Init();
-
- {
- for(UInt32 i = 0; i < kNumLenToPosStates; i++)
- _posSlotEncoder[i].Init();
- }
- {
- for(UInt32 i = 0; i < kNumFullDistances - kEndPosModelIndex; i++)
- _posEncoders[i].Init();
- }
-
- _lenEncoder.Init(1 << _posStateBits);
- _repMatchLenEncoder.Init(1 << _posStateBits);
-
- _posAlignEncoder.Init();
-
- _longestMatchWasFound = false;
- _optimumEndIndex = 0;
- _optimumCurrentIndex = 0;
- _additionalOffset = 0;
-
- return S_OK;
-}
-
-HRESULT CEncoder::MovePos(UInt32 num)
-{
- if (num == 0)
- return S_OK;
- _additionalOffset += num;
- return _matchFinder->Skip(num);
-}
-
-UInt32 CEncoder::Backward(UInt32 &backRes, UInt32 cur)
-{
- _optimumEndIndex = cur;
- UInt32 posMem = _optimum[cur].PosPrev;
- UInt32 backMem = _optimum[cur].BackPrev;
- do
- {
- if (_optimum[cur].Prev1IsChar)
- {
- _optimum[posMem].MakeAsChar();
- _optimum[posMem].PosPrev = posMem - 1;
- if (_optimum[cur].Prev2)
- {
- _optimum[posMem - 1].Prev1IsChar = false;
- _optimum[posMem - 1].PosPrev = _optimum[cur].PosPrev2;
- _optimum[posMem - 1].BackPrev = _optimum[cur].BackPrev2;
- }
- }
- UInt32 posPrev = posMem;
- UInt32 backCur = backMem;
-
- backMem = _optimum[posPrev].BackPrev;
- posMem = _optimum[posPrev].PosPrev;
-
- _optimum[posPrev].BackPrev = backCur;
- _optimum[posPrev].PosPrev = cur;
- cur = posPrev;
- }
- while(cur != 0);
- backRes = _optimum[0].BackPrev;
- _optimumCurrentIndex = _optimum[0].PosPrev;
- return _optimumCurrentIndex;
-}
-
-/*
-Out:
- (lenRes == 1) && (backRes == 0xFFFFFFFF) means Literal
-*/
-
-HRESULT CEncoder::GetOptimum(UInt32 position, UInt32 &backRes, UInt32 &lenRes)
-{
- if(_optimumEndIndex != _optimumCurrentIndex)
- {
- const COptimal &optimum = _optimum[_optimumCurrentIndex];
- lenRes = optimum.PosPrev - _optimumCurrentIndex;
- backRes = optimum.BackPrev;
- _optimumCurrentIndex = optimum.PosPrev;
- return S_OK;
- }
- _optimumCurrentIndex = _optimumEndIndex = 0;
-
- UInt32 lenMain, numDistancePairs;
- if (!_longestMatchWasFound)
- {
- RINOK(ReadMatchDistances(lenMain, numDistancePairs));
- }
- else
- {
- lenMain = _longestMatchLength;
- numDistancePairs = _numDistancePairs;
- _longestMatchWasFound = false;
- }
-
- const Byte *data = _matchFinder->GetPointerToCurrentPos() - 1;
- UInt32 numAvailableBytes = _matchFinder->GetNumAvailableBytes() + 1;
- if (numAvailableBytes < 2)
- {
- backRes = (UInt32)(-1);
- lenRes = 1;
- return S_OK;
- }
- if (numAvailableBytes > kMatchMaxLen)
- numAvailableBytes = kMatchMaxLen;
-
- UInt32 reps[kNumRepDistances];
- UInt32 repLens[kNumRepDistances];
- UInt32 repMaxIndex = 0;
- UInt32 i;
- for(i = 0; i < kNumRepDistances; i++)
- {
- reps[i] = _repDistances[i];
- UInt32 backOffset = reps[i] + 1;
- if (data[0] != data[(size_t)0 - backOffset] || data[1] != data[(size_t)1 - backOffset])
- {
- repLens[i] = 0;
- continue;
- }
- UInt32 lenTest;
- for (lenTest = 2; lenTest < numAvailableBytes &&
- data[lenTest] == data[(size_t)lenTest - backOffset]; lenTest++);
- repLens[i] = lenTest;
- if (lenTest > repLens[repMaxIndex])
- repMaxIndex = i;
- }
- if(repLens[repMaxIndex] >= _numFastBytes)
- {
- backRes = repMaxIndex;
- lenRes = repLens[repMaxIndex];
- return MovePos(lenRes - 1);
- }
-
- UInt32 *matchDistances = _matchDistances + 1;
- if(lenMain >= _numFastBytes)
- {
- backRes = matchDistances[numDistancePairs - 1] + kNumRepDistances;
- lenRes = lenMain;
- return MovePos(lenMain - 1);
- }
- Byte currentByte = *data;
- Byte matchByte = data[(size_t)0 - reps[0] - 1];
-
- if(lenMain < 2 && currentByte != matchByte && repLens[repMaxIndex] < 2)
- {
- backRes = (UInt32)-1;
- lenRes = 1;
- return S_OK;
- }
-
- _optimum[0].State = _state;
-
- UInt32 posState = (position & _posStateMask);
-
- _optimum[1].Price = _isMatch[_state.Index][posState].GetPrice0() +
- _literalEncoder.GetSubCoder(position, _previousByte)->GetPrice(!_state.IsCharState(), matchByte, currentByte);
- _optimum[1].MakeAsChar();
-
- UInt32 matchPrice = _isMatch[_state.Index][posState].GetPrice1();
- UInt32 repMatchPrice = matchPrice + _isRep[_state.Index].GetPrice1();
-
- if(matchByte == currentByte)
- {
- UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(_state, posState);
- if(shortRepPrice < _optimum[1].Price)
- {
- _optimum[1].Price = shortRepPrice;
- _optimum[1].MakeAsShortRep();
- }
- }
- UInt32 lenEnd = ((lenMain >= repLens[repMaxIndex]) ? lenMain : repLens[repMaxIndex]);
-
- if(lenEnd < 2)
- {
- backRes = _optimum[1].BackPrev;
- lenRes = 1;
- return S_OK;
- }
-
- _optimum[1].PosPrev = 0;
- for (i = 0; i < kNumRepDistances; i++)
- _optimum[0].Backs[i] = reps[i];
-
- UInt32 len = lenEnd;
- do
- _optimum[len--].Price = kIfinityPrice;
- while (len >= 2);
-
- for(i = 0; i < kNumRepDistances; i++)
- {
- UInt32 repLen = repLens[i];
- if (repLen < 2)
- continue;
- UInt32 price = repMatchPrice + GetPureRepPrice(i, _state, posState);
- do
- {
- UInt32 curAndLenPrice = price + _repMatchLenEncoder.GetPrice(repLen - 2, posState);
- COptimal &optimum = _optimum[repLen];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = 0;
- optimum.BackPrev = i;
- optimum.Prev1IsChar = false;
- }
- }
- while(--repLen >= 2);
- }
-
- UInt32 normalMatchPrice = matchPrice + _isRep[_state.Index].GetPrice0();
-
- len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);
- if (len <= lenMain)
- {
- UInt32 offs = 0;
- while (len > matchDistances[offs])
- offs += 2;
- for(; ; len++)
- {
- UInt32 distance = matchDistances[offs + 1];
- UInt32 curAndLenPrice = normalMatchPrice + GetPosLenPrice(distance, len, posState);
- COptimal &optimum = _optimum[len];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = 0;
- optimum.BackPrev = distance + kNumRepDistances;
- optimum.Prev1IsChar = false;
- }
- if (len == matchDistances[offs])
- {
- offs += 2;
- if (offs == numDistancePairs)
- break;
- }
- }
- }
-
- UInt32 cur = 0;
-
- while(true)
- {
- cur++;
- if(cur == lenEnd)
- {
- lenRes = Backward(backRes, cur);
- return S_OK;
- }
- UInt32 newLen, numDistancePairs;
- RINOK(ReadMatchDistances(newLen, numDistancePairs));
- if(newLen >= _numFastBytes)
- {
- _numDistancePairs = numDistancePairs;
- _longestMatchLength = newLen;
- _longestMatchWasFound = true;
- lenRes = Backward(backRes, cur);
- return S_OK;
- }
- position++;
- COptimal &curOptimum = _optimum[cur];
- UInt32 posPrev = curOptimum.PosPrev;
- CState state;
- if (curOptimum.Prev1IsChar)
- {
- posPrev--;
- if (curOptimum.Prev2)
- {
- state = _optimum[curOptimum.PosPrev2].State;
- if (curOptimum.BackPrev2 < kNumRepDistances)
- state.UpdateRep();
- else
- state.UpdateMatch();
- }
- else
- state = _optimum[posPrev].State;
- state.UpdateChar();
- }
- else
- state = _optimum[posPrev].State;
- if (posPrev == cur - 1)
- {
- if (curOptimum.IsShortRep())
- state.UpdateShortRep();
- else
- state.UpdateChar();
- }
- else
- {
- UInt32 pos;
- if (curOptimum.Prev1IsChar && curOptimum.Prev2)
- {
- posPrev = curOptimum.PosPrev2;
- pos = curOptimum.BackPrev2;
- state.UpdateRep();
- }
- else
- {
- pos = curOptimum.BackPrev;
- if (pos < kNumRepDistances)
- state.UpdateRep();
- else
- state.UpdateMatch();
- }
- const COptimal &prevOptimum = _optimum[posPrev];
- if (pos < kNumRepDistances)
- {
- reps[0] = prevOptimum.Backs[pos];
- UInt32 i;
- for(i = 1; i <= pos; i++)
- reps[i] = prevOptimum.Backs[i - 1];
- for(; i < kNumRepDistances; i++)
- reps[i] = prevOptimum.Backs[i];
- }
- else
- {
- reps[0] = (pos - kNumRepDistances);
- for(UInt32 i = 1; i < kNumRepDistances; i++)
- reps[i] = prevOptimum.Backs[i - 1];
- }
- }
- curOptimum.State = state;
- for(UInt32 i = 0; i < kNumRepDistances; i++)
- curOptimum.Backs[i] = reps[i];
- UInt32 curPrice = curOptimum.Price;
- const Byte *data = _matchFinder->GetPointerToCurrentPos() - 1;
- const Byte currentByte = *data;
- const Byte matchByte = data[(size_t)0 - reps[0] - 1];
-
- UInt32 posState = (position & _posStateMask);
-
- UInt32 curAnd1Price = curPrice +
- _isMatch[state.Index][posState].GetPrice0() +
- _literalEncoder.GetSubCoder(position, data[(size_t)0 - 1])->GetPrice(!state.IsCharState(), matchByte, currentByte);
-
- COptimal &nextOptimum = _optimum[cur + 1];
-
- bool nextIsChar = false;
- if (curAnd1Price < nextOptimum.Price)
- {
- nextOptimum.Price = curAnd1Price;
- nextOptimum.PosPrev = cur;
- nextOptimum.MakeAsChar();
- nextIsChar = true;
- }
-
- UInt32 matchPrice = curPrice + _isMatch[state.Index][posState].GetPrice1();
- UInt32 repMatchPrice = matchPrice + _isRep[state.Index].GetPrice1();
-
- if(matchByte == currentByte &&
- !(nextOptimum.PosPrev < cur && nextOptimum.BackPrev == 0))
- {
- UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(state, posState);
- if(shortRepPrice <= nextOptimum.Price)
- {
- nextOptimum.Price = shortRepPrice;
- nextOptimum.PosPrev = cur;
- nextOptimum.MakeAsShortRep();
- nextIsChar = true;
- }
- }
- /*
- if(newLen == 2 && matchDistances[2] >= kDistLimit2) // test it maybe set 2000 ?
- continue;
- */
-
- UInt32 numAvailableBytesFull = _matchFinder->GetNumAvailableBytes() + 1;
- numAvailableBytesFull = MyMin(kNumOpts - 1 - cur, numAvailableBytesFull);
- UInt32 numAvailableBytes = numAvailableBytesFull;
-
- if (numAvailableBytes < 2)
- continue;
- if (numAvailableBytes > _numFastBytes)
- numAvailableBytes = _numFastBytes;
- if (!nextIsChar && matchByte != currentByte) // speed optimization
- {
- // try Literal + rep0
- UInt32 backOffset = reps[0] + 1;
- UInt32 limit = MyMin(numAvailableBytesFull, _numFastBytes + 1);
- UInt32 temp;
- for (temp = 1; temp < limit &&
- data[temp] == data[(size_t)temp - backOffset]; temp++);
- UInt32 lenTest2 = temp - 1;
- if (lenTest2 >= 2)
- {
- CState state2 = state;
- state2.UpdateChar();
- UInt32 posStateNext = (position + 1) & _posStateMask;
- UInt32 nextRepMatchPrice = curAnd1Price +
- _isMatch[state2.Index][posStateNext].GetPrice1() +
- _isRep[state2.Index].GetPrice1();
- // for (; lenTest2 >= 2; lenTest2--)
- {
- UInt32 offset = cur + 1 + lenTest2;
- while(lenEnd < offset)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(
- 0, lenTest2, state2, posStateNext);
- COptimal &optimum = _optimum[offset];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur + 1;
- optimum.BackPrev = 0;
- optimum.Prev1IsChar = true;
- optimum.Prev2 = false;
- }
- }
- }
- }
-
- UInt32 startLen = 2; // speed optimization
- for(UInt32 repIndex = 0; repIndex < kNumRepDistances; repIndex++)
- {
- // UInt32 repLen = _matchFinder->GetMatchLen(0 - 1, reps[repIndex], newLen); // test it;
- UInt32 backOffset = reps[repIndex] + 1;
- if (data[0] != data[(size_t)0 - backOffset] ||
- data[1] != data[(size_t)1 - backOffset])
- continue;
- UInt32 lenTest;
- for (lenTest = 2; lenTest < numAvailableBytes &&
- data[lenTest] == data[(size_t)lenTest - backOffset]; lenTest++);
- while(lenEnd < cur + lenTest)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 lenTestTemp = lenTest;
- UInt32 price = repMatchPrice + GetPureRepPrice(repIndex, state, posState);
- do
- {
- UInt32 curAndLenPrice = price + _repMatchLenEncoder.GetPrice(lenTest - 2, posState);
- COptimal &optimum = _optimum[cur + lenTest];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur;
- optimum.BackPrev = repIndex;
- optimum.Prev1IsChar = false;
- }
- }
- while(--lenTest >= 2);
- lenTest = lenTestTemp;
-
- if (repIndex == 0)
- startLen = lenTest + 1;
-
- // if (_maxMode)
- {
- UInt32 lenTest2 = lenTest + 1;
- UInt32 limit = MyMin(numAvailableBytesFull, lenTest2 + _numFastBytes);
- for (; lenTest2 < limit &&
- data[lenTest2] == data[(size_t)lenTest2 - backOffset]; lenTest2++);
- lenTest2 -= lenTest + 1;
- if (lenTest2 >= 2)
- {
- CState state2 = state;
- state2.UpdateRep();
- UInt32 posStateNext = (position + lenTest) & _posStateMask;
- UInt32 curAndLenCharPrice =
- price + _repMatchLenEncoder.GetPrice(lenTest - 2, posState) +
- _isMatch[state2.Index][posStateNext].GetPrice0() +
- _literalEncoder.GetSubCoder(position + lenTest, data[(size_t)lenTest - 1])->GetPrice(
- true, data[(size_t)lenTest - backOffset], data[lenTest]);
- state2.UpdateChar();
- posStateNext = (position + lenTest + 1) & _posStateMask;
- UInt32 nextRepMatchPrice = curAndLenCharPrice +
- _isMatch[state2.Index][posStateNext].GetPrice1() +
- _isRep[state2.Index].GetPrice1();
-
- // for(; lenTest2 >= 2; lenTest2--)
- {
- UInt32 offset = cur + lenTest + 1 + lenTest2;
- while(lenEnd < offset)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(
- 0, lenTest2, state2, posStateNext);
- COptimal &optimum = _optimum[offset];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur + lenTest + 1;
- optimum.BackPrev = 0;
- optimum.Prev1IsChar = true;
- optimum.Prev2 = true;
- optimum.PosPrev2 = cur;
- optimum.BackPrev2 = repIndex;
- }
- }
- }
- }
- }
-
- // for(UInt32 lenTest = 2; lenTest <= newLen; lenTest++)
- if (newLen > numAvailableBytes)
- {
- newLen = numAvailableBytes;
- for (numDistancePairs = 0; newLen > matchDistances[numDistancePairs]; numDistancePairs += 2);
- matchDistances[numDistancePairs] = newLen;
- numDistancePairs += 2;
- }
- if (newLen >= startLen)
- {
- UInt32 normalMatchPrice = matchPrice + _isRep[state.Index].GetPrice0();
- while(lenEnd < cur + newLen)
- _optimum[++lenEnd].Price = kIfinityPrice;
-
- UInt32 offs = 0;
- while(startLen > matchDistances[offs])
- offs += 2;
- UInt32 curBack = matchDistances[offs + 1];
- UInt32 posSlot = GetPosSlot2(curBack);
- for(UInt32 lenTest = /*2*/ startLen; ; lenTest++)
- {
- UInt32 curAndLenPrice = normalMatchPrice;
- UInt32 lenToPosState = GetLenToPosState(lenTest);
- if (curBack < kNumFullDistances)
- curAndLenPrice += _distancesPrices[lenToPosState][curBack];
- else
- curAndLenPrice += _posSlotPrices[lenToPosState][posSlot] + _alignPrices[curBack & kAlignMask];
-
- curAndLenPrice += _lenEncoder.GetPrice(lenTest - kMatchMinLen, posState);
-
- COptimal &optimum = _optimum[cur + lenTest];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur;
- optimum.BackPrev = curBack + kNumRepDistances;
- optimum.Prev1IsChar = false;
- }
-
- if (/*_maxMode && */lenTest == matchDistances[offs])
- {
- // Try Match + Literal + Rep0
- UInt32 backOffset = curBack + 1;
- UInt32 lenTest2 = lenTest + 1;
- UInt32 limit = MyMin(numAvailableBytesFull, lenTest2 + _numFastBytes);
- for (; lenTest2 < limit &&
- data[lenTest2] == data[(size_t)lenTest2 - backOffset]; lenTest2++);
- lenTest2 -= lenTest + 1;
- if (lenTest2 >= 2)
- {
- CState state2 = state;
- state2.UpdateMatch();
- UInt32 posStateNext = (position + lenTest) & _posStateMask;
- UInt32 curAndLenCharPrice = curAndLenPrice +
- _isMatch[state2.Index][posStateNext].GetPrice0() +
- _literalEncoder.GetSubCoder(position + lenTest, data[(size_t)lenTest - 1])->GetPrice(
- true, data[(size_t)lenTest - backOffset], data[lenTest]);
- state2.UpdateChar();
- posStateNext = (posStateNext + 1) & _posStateMask;
- UInt32 nextRepMatchPrice = curAndLenCharPrice +
- _isMatch[state2.Index][posStateNext].GetPrice1() +
- _isRep[state2.Index].GetPrice1();
-
- // for(; lenTest2 >= 2; lenTest2--)
- {
- UInt32 offset = cur + lenTest + 1 + lenTest2;
- while(lenEnd < offset)
- _optimum[++lenEnd].Price = kIfinityPrice;
- UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);
- COptimal &optimum = _optimum[offset];
- if (curAndLenPrice < optimum.Price)
- {
- optimum.Price = curAndLenPrice;
- optimum.PosPrev = cur + lenTest + 1;
- optimum.BackPrev = 0;
- optimum.Prev1IsChar = true;
- optimum.Prev2 = true;
- optimum.PosPrev2 = cur;
- optimum.BackPrev2 = curBack + kNumRepDistances;
- }
- }
- }
- offs += 2;
- if (offs == numDistancePairs)
- break;
- curBack = matchDistances[offs + 1];
- if (curBack >= kNumFullDistances)
- posSlot = GetPosSlot2(curBack);
- }
- }
- }
- }
-}
-
-static inline bool ChangePair(UInt32 smallDist, UInt32 bigDist)
-{
- return ((bigDist >> 7) > smallDist);
-}
-
-
-HRESULT CEncoder::ReadMatchDistances(UInt32 &lenRes, UInt32 &numDistancePairs)
-{
- lenRes = 0;
- RINOK(_matchFinder->GetMatches(_matchDistances));
- numDistancePairs = _matchDistances[0];
- if (numDistancePairs > 0)
- {
- lenRes = _matchDistances[1 + numDistancePairs - 2];
- if (lenRes == _numFastBytes)
- lenRes += _matchFinder->GetMatchLen(lenRes - 1, _matchDistances[1 + numDistancePairs - 1],
- kMatchMaxLen - lenRes);
- }
- _additionalOffset++;
- return S_OK;
-}
-
-HRESULT CEncoder::GetOptimumFast(UInt32 position, UInt32 &backRes, UInt32 &lenRes)
-{
- UInt32 lenMain, numDistancePairs;
- if (!_longestMatchWasFound)
- {
- RINOK(ReadMatchDistances(lenMain, numDistancePairs));
- }
- else
- {
- lenMain = _longestMatchLength;
- numDistancePairs = _numDistancePairs;
- _longestMatchWasFound = false;
- }
-
- const Byte *data = _matchFinder->GetPointerToCurrentPos() - 1;
- UInt32 numAvailableBytes = _matchFinder->GetNumAvailableBytes() + 1;
- if (numAvailableBytes > kMatchMaxLen)
- numAvailableBytes = kMatchMaxLen;
- if (numAvailableBytes < 2)
- {
- backRes = (UInt32)(-1);
- lenRes = 1;
- return S_OK;
- }
-
- UInt32 repLens[kNumRepDistances];
- UInt32 repMaxIndex = 0;
-
- for(UInt32 i = 0; i < kNumRepDistances; i++)
- {
- UInt32 backOffset = _repDistances[i] + 1;
- if (data[0] != data[(size_t)0 - backOffset] || data[1] != data[(size_t)1 - backOffset])
- {
- repLens[i] = 0;
- continue;
- }
- UInt32 len;
- for (len = 2; len < numAvailableBytes && data[len] == data[(size_t)len - backOffset]; len++);
- if(len >= _numFastBytes)
- {
- backRes = i;
- lenRes = len;
- return MovePos(lenRes - 1);
- }
- repLens[i] = len;
- if (len > repLens[repMaxIndex])
- repMaxIndex = i;
- }
- UInt32 *matchDistances = _matchDistances + 1;
- if(lenMain >= _numFastBytes)
- {
- backRes = matchDistances[numDistancePairs - 1] + kNumRepDistances;
- lenRes = lenMain;
- return MovePos(lenMain - 1);
- }
-
- UInt32 backMain = 0; // for GCC
- if (lenMain >= 2)
- {
- backMain = matchDistances[numDistancePairs - 1];
- while (numDistancePairs > 2 && lenMain == matchDistances[numDistancePairs - 4] + 1)
- {
- if (!ChangePair(matchDistances[numDistancePairs - 3], backMain))
- break;
- numDistancePairs -= 2;
- lenMain = matchDistances[numDistancePairs - 2];
- backMain = matchDistances[numDistancePairs - 1];
- }
- if (lenMain == 2 && backMain >= 0x80)
- lenMain = 1;
- }
-
- if (repLens[repMaxIndex] >= 2)
- {
- if (repLens[repMaxIndex] + 1 >= lenMain ||
- repLens[repMaxIndex] + 2 >= lenMain && (backMain > (1 << 9)) ||
- repLens[repMaxIndex] + 3 >= lenMain && (backMain > (1 << 15)))
- {
- backRes = repMaxIndex;
- lenRes = repLens[repMaxIndex];
- return MovePos(lenRes - 1);
- }
- }
-
- if (lenMain >= 2 && numAvailableBytes > 2)
- {
- RINOK(ReadMatchDistances(_longestMatchLength, _numDistancePairs));
- if (_longestMatchLength >= 2)
- {
- UInt32 newDistance = matchDistances[_numDistancePairs - 1];
- if (_longestMatchLength >= lenMain && newDistance < backMain ||
- _longestMatchLength == lenMain + 1 && !ChangePair(backMain, newDistance) ||
- _longestMatchLength > lenMain + 1 ||
- _longestMatchLength + 1 >= lenMain && lenMain >= 3 && ChangePair(newDistance, backMain))
- {
- _longestMatchWasFound = true;
- backRes = UInt32(-1);
- lenRes = 1;
- return S_OK;
- }
- }
- data++;
- numAvailableBytes--;
- for(UInt32 i = 0; i < kNumRepDistances; i++)
- {
- UInt32 backOffset = _repDistances[i] + 1;
- if (data[1] != data[(size_t)1 - backOffset] || data[2] != data[(size_t)2 - backOffset])
- {
- repLens[i] = 0;
- continue;
- }
- UInt32 len;
- for (len = 2; len < numAvailableBytes && data[len] == data[(size_t)len - backOffset]; len++);
- if (len + 1 >= lenMain)
- {
- _longestMatchWasFound = true;
- backRes = UInt32(-1);
- lenRes = 1;
- return S_OK;
- }
- }
- backRes = backMain + kNumRepDistances;
- lenRes = lenMain;
- return MovePos(lenMain - 2);
- }
- backRes = UInt32(-1);
- lenRes = 1;
- return S_OK;
-}
-
-HRESULT CEncoder::Flush(UInt32 nowPos)
-{
- ReleaseMFStream();
- WriteEndMarker(nowPos & _posStateMask);
- _rangeEncoder.FlushData();
- return _rangeEncoder.FlushStream();
-}
-
-void CEncoder::WriteEndMarker(UInt32 posState)
-{
- // This function for writing End Mark for stream version of LZMA.
- // In current version this feature is not used.
- if (!_writeEndMark)
- return;
-
- _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 1);
- _isRep[_state.Index].Encode(&_rangeEncoder, 0);
- _state.UpdateMatch();
- UInt32 len = kMatchMinLen; // kMatchMaxLen;
- _lenEncoder.Encode(&_rangeEncoder, len - kMatchMinLen, posState, !_fastMode);
- UInt32 posSlot = (1 << kNumPosSlotBits) - 1;
- UInt32 lenToPosState = GetLenToPosState(len);
- _posSlotEncoder[lenToPosState].Encode(&_rangeEncoder, posSlot);
- UInt32 footerBits = 30;
- UInt32 posReduced = (UInt32(1) << footerBits) - 1;
- _rangeEncoder.EncodeDirectBits(posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
- _posAlignEncoder.ReverseEncode(&_rangeEncoder, posReduced & kAlignMask);
-}
-
-HRESULT CEncoder::CodeReal(ISequentialInStream *inStream,
- ISequentialOutStream *outStream,
- const UInt64 *inSize, const UInt64 *outSize,
- ICompressProgressInfo *progress)
-{
- _needReleaseMFStream = false;
- CCoderReleaser coderReleaser(this);
- RINOK(SetStreams(inStream, outStream, inSize, outSize));
- while(true)
- {
- UInt64 processedInSize;
- UInt64 processedOutSize;
- Int32 finished;
- RINOK(CodeOneBlock(&processedInSize, &processedOutSize, &finished));
- if (finished != 0)
- return S_OK;
- if (progress != 0)
- {
- RINOK(progress->SetRatioInfo(&processedInSize, &processedOutSize));
- }
- }
-}
-
-HRESULT CEncoder::SetStreams(ISequentialInStream *inStream,
- ISequentialOutStream *outStream,
- const UInt64 *inSize, const UInt64 *outSize)
-{
- _inStream = inStream;
- _finished = false;
- RINOK(Create());
- RINOK(SetOutStream(outStream));
- RINOK(Init());
-
- // CCoderReleaser releaser(this);
-
- /*
- if (_matchFinder->GetNumAvailableBytes() == 0)
- return Flush();
- */
-
- if (!_fastMode)
- {
- FillDistancesPrices();
- FillAlignPrices();
- }
-
- _lenEncoder.SetTableSize(_numFastBytes + 1 - kMatchMinLen);
- _lenEncoder.UpdateTables(1 << _posStateBits);
- _repMatchLenEncoder.SetTableSize(_numFastBytes + 1 - kMatchMinLen);
- _repMatchLenEncoder.UpdateTables(1 << _posStateBits);
-
- nowPos64 = 0;
- return S_OK;
-}
-
-HRESULT CEncoder::CodeOneBlock(UInt64 *inSize, UInt64 *outSize, Int32 *finished)
-{
- if (_inStream != 0)
- {
- RINOK(_matchFinder->SetStream(_inStream));
- RINOK(_matchFinder->Init());
- _needReleaseMFStream = true;
- _inStream = 0;
- }
-
-
- *finished = 1;
- if (_finished)
- return S_OK;
- _finished = true;
-
- if (nowPos64 == 0)
- {
- if (_matchFinder->GetNumAvailableBytes() == 0)
- return Flush(UInt32(nowPos64));
- UInt32 len, numDistancePairs;
- RINOK(ReadMatchDistances(len, numDistancePairs));
- UInt32 posState = UInt32(nowPos64) & _posStateMask;
- _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 0);
- _state.UpdateChar();
- Byte curByte = _matchFinder->GetIndexByte(0 - _additionalOffset);
- _literalEncoder.GetSubCoder(UInt32(nowPos64), _previousByte)->Encode(&_rangeEncoder, curByte);
- _previousByte = curByte;
- _additionalOffset--;
- nowPos64++;
- }
-
- UInt32 nowPos32 = (UInt32)nowPos64;
- UInt32 progressPosValuePrev = nowPos32;
-
- if (_matchFinder->GetNumAvailableBytes() == 0)
- return Flush(nowPos32);
-
- while(true)
- {
- #ifdef _NO_EXCEPTIONS
- if (_rangeEncoder.Stream.ErrorCode != S_OK)
- return _rangeEncoder.Stream.ErrorCode;
- #endif
- UInt32 pos, len;
- HRESULT result;
- if (_fastMode)
- result = GetOptimumFast(nowPos32, pos, len);
- else
- result = GetOptimum(nowPos32, pos, len);
- RINOK(result);
-
- UInt32 posState = nowPos32 & _posStateMask;
- if(len == 1 && pos == 0xFFFFFFFF)
- {
- _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 0);
- Byte curByte = _matchFinder->GetIndexByte(0 - _additionalOffset);
- CLiteralEncoder2 *subCoder = _literalEncoder.GetSubCoder(nowPos32, _previousByte);
- if(_state.IsCharState())
- subCoder->Encode(&_rangeEncoder, curByte);
- else
- {
- Byte matchByte = _matchFinder->GetIndexByte(0 - _repDistances[0] - 1 - _additionalOffset);
- subCoder->EncodeMatched(&_rangeEncoder, matchByte, curByte);
- }
- _state.UpdateChar();
- _previousByte = curByte;
- }
- else
- {
- _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 1);
- if(pos < kNumRepDistances)
- {
- _isRep[_state.Index].Encode(&_rangeEncoder, 1);
- if(pos == 0)
- {
- _isRepG0[_state.Index].Encode(&_rangeEncoder, 0);
- _isRep0Long[_state.Index][posState].Encode(&_rangeEncoder, ((len == 1) ? 0 : 1));
- }
- else
- {
- UInt32 distance = _repDistances[pos];
- _isRepG0[_state.Index].Encode(&_rangeEncoder, 1);
- if (pos == 1)
- _isRepG1[_state.Index].Encode(&_rangeEncoder, 0);
- else
- {
- _isRepG1[_state.Index].Encode(&_rangeEncoder, 1);
- _isRepG2[_state.Index].Encode(&_rangeEncoder, pos - 2);
- if (pos == 3)
- _repDistances[3] = _repDistances[2];
- _repDistances[2] = _repDistances[1];
- }
- _repDistances[1] = _repDistances[0];
- _repDistances[0] = distance;
- }
- if (len == 1)
- _state.UpdateShortRep();
- else
- {
- _repMatchLenEncoder.Encode(&_rangeEncoder, len - kMatchMinLen, posState, !_fastMode);
- _state.UpdateRep();
- }
- }
- else
- {
- _isRep[_state.Index].Encode(&_rangeEncoder, 0);
- _state.UpdateMatch();
- _lenEncoder.Encode(&_rangeEncoder, len - kMatchMinLen, posState, !_fastMode);
- pos -= kNumRepDistances;
- UInt32 posSlot = GetPosSlot(pos);
- _posSlotEncoder[GetLenToPosState(len)].Encode(&_rangeEncoder, posSlot);
-
- if (posSlot >= kStartPosModelIndex)
- {
- UInt32 footerBits = ((posSlot >> 1) - 1);
- UInt32 base = ((2 | (posSlot & 1)) << footerBits);
- UInt32 posReduced = pos - base;
-
- if (posSlot < kEndPosModelIndex)
- NRangeCoder::ReverseBitTreeEncode(_posEncoders + base - posSlot - 1,
- &_rangeEncoder, footerBits, posReduced);
- else
- {
- _rangeEncoder.EncodeDirectBits(posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
- _posAlignEncoder.ReverseEncode(&_rangeEncoder, posReduced & kAlignMask);
- _alignPriceCount++;
- }
- }
- _repDistances[3] = _repDistances[2];
- _repDistances[2] = _repDistances[1];
- _repDistances[1] = _repDistances[0];
- _repDistances[0] = pos;
- _matchPriceCount++;
- }
- _previousByte = _matchFinder->GetIndexByte(len - 1 - _additionalOffset);
- }
- _additionalOffset -= len;
- nowPos32 += len;
- if (_additionalOffset == 0)
- {
- if (!_fastMode)
- {
- if (_matchPriceCount >= (1 << 7))
- FillDistancesPrices();
- if (_alignPriceCount >= kAlignTableSize)
- FillAlignPrices();
- }
- if (_matchFinder->GetNumAvailableBytes() == 0)
- return Flush(nowPos32);
- if (nowPos32 - progressPosValuePrev >= (1 << 14))
- {
- nowPos64 += nowPos32 - progressPosValuePrev;
- *inSize = nowPos64;
- *outSize = _rangeEncoder.GetProcessedSize();
- _finished = false;
- *finished = 0;
- return S_OK;
- }
- }
- }
-}
-
-STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream,
- ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
- ICompressProgressInfo *progress)
-{
- #ifndef _NO_EXCEPTIONS
- try
- {
- #endif
- return CodeReal(inStream, outStream, inSize, outSize, progress);
- #ifndef _NO_EXCEPTIONS
- }
- catch(const COutBufferException &e) { return e.ErrorCode; }
- catch(...) { return E_FAIL; }
- #endif
-}
-
-void CEncoder::FillDistancesPrices()
-{
- UInt32 tempPrices[kNumFullDistances];
- for (UInt32 i = kStartPosModelIndex; i < kNumFullDistances; i++)
- {
- UInt32 posSlot = GetPosSlot(i);
- UInt32 footerBits = ((posSlot >> 1) - 1);
- UInt32 base = ((2 | (posSlot & 1)) << footerBits);
- tempPrices[i] = NRangeCoder::ReverseBitTreeGetPrice(_posEncoders +
- base - posSlot - 1, footerBits, i - base);
- }
-
- for (UInt32 lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++)
- {
- UInt32 posSlot;
- NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumPosSlotBits> &encoder = _posSlotEncoder[lenToPosState];
- UInt32 *posSlotPrices = _posSlotPrices[lenToPosState];
- for (posSlot = 0; posSlot < _distTableSize; posSlot++)
- posSlotPrices[posSlot] = encoder.GetPrice(posSlot);
- for (posSlot = kEndPosModelIndex; posSlot < _distTableSize; posSlot++)
- posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << NRangeCoder::kNumBitPriceShiftBits);
-
- UInt32 *distancesPrices = _distancesPrices[lenToPosState];
- UInt32 i;
- for (i = 0; i < kStartPosModelIndex; i++)
- distancesPrices[i] = posSlotPrices[i];
- for (; i < kNumFullDistances; i++)
- distancesPrices[i] = posSlotPrices[GetPosSlot(i)] + tempPrices[i];
- }
- _matchPriceCount = 0;
-}
-
-void CEncoder::FillAlignPrices()
-{
- for (UInt32 i = 0; i < kAlignTableSize; i++)
- _alignPrices[i] = _posAlignEncoder.ReverseGetPrice(i);
- _alignPriceCount = 0;
-}
-
-}}
+/*
+ * LZMAEncoder.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "../../../Common/Defs.h"
+#include "../../Common/StreamUtils.h"
+
+#include "LZMAEncoder.h"
+
+// for minimal compressing code size define these:
+// #define COMPRESS_MF_BT
+// #define COMPRESS_MF_BT4
+
+#if !defined(COMPRESS_MF_BT) && !defined(COMPRESS_MF_HC)
+#define COMPRESS_MF_BT
+#define COMPRESS_MF_HC
+#endif
+
+#ifdef COMPRESS_MF_BT
+#if !defined(COMPRESS_MF_BT2) && !defined(COMPRESS_MF_BT3) && !defined(COMPRESS_MF_BT4)
+#define COMPRESS_MF_BT2
+#define COMPRESS_MF_BT3
+#define COMPRESS_MF_BT4
+#endif
+#ifdef COMPRESS_MF_BT2
+#include "../LZ/BinTree/BinTree2.h"
+#endif
+#ifdef COMPRESS_MF_BT3
+#include "../LZ/BinTree/BinTree3.h"
+#endif
+#ifdef COMPRESS_MF_BT4
+#include "../LZ/BinTree/BinTree4.h"
+#endif
+#endif
+
+#ifdef COMPRESS_MF_HC
+#include "../LZ/HashChain/HC4.h"
+#endif
+
+#ifdef COMPRESS_MF_MT
+#include "../LZ/MT/MT.h"
+#endif
+
+namespace NCompress {
+namespace NLZMA {
+
+const int kDefaultDictionaryLogSize = 22;
+const UInt32 kNumFastBytesDefault = 0x20;
+
+enum
+{
+ kBT2,
+ kBT3,
+ kBT4,
+ kHC4
+};
+
+/*static const wchar_t *kMatchFinderIDs[] =
+{
+ L"BT2",
+ L"BT3",
+ L"BT4",
+ L"HC4"
+};*/
+
+Byte g_FastPos[1 << 11];
+
+class CFastPosInit
+{
+public:
+ CFastPosInit() { Init(); }
+ void Init()
+ {
+ const Byte kFastSlots = 22;
+ int c = 2;
+ g_FastPos[0] = 0;
+ g_FastPos[1] = 1;
+
+ for (Byte slotFast = 2; slotFast < kFastSlots; slotFast++)
+ {
+ UInt32 k = (1 << ((slotFast >> 1) - 1));
+ for (UInt32 j = 0; j < k; j++, c++)
+ g_FastPos[c] = slotFast;
+ }
+ }
+} g_FastPosInit;
+
+
+void CLiteralEncoder2::Encode(NRangeCoder::CEncoder *rangeEncoder, Byte symbol)
+{
+ UInt32 context = 1;
+ int i = 8;
+ do
+ {
+ i--;
+ UInt32 bit = (symbol >> i) & 1;
+ _encoders[context].Encode(rangeEncoder, bit);
+ context = (context << 1) | bit;
+ }
+ while(i != 0);
+}
+
+void CLiteralEncoder2::EncodeMatched(NRangeCoder::CEncoder *rangeEncoder,
+ Byte matchByte, Byte symbol)
+{
+ UInt32 context = 1;
+ int i = 8;
+ do
+ {
+ i--;
+ UInt32 bit = (symbol >> i) & 1;
+ UInt32 matchBit = (matchByte >> i) & 1;
+ _encoders[0x100 + (matchBit << 8) + context].Encode(rangeEncoder, bit);
+ context = (context << 1) | bit;
+ if (matchBit != bit)
+ {
+ while(i != 0)
+ {
+ i--;
+ UInt32 bit = (symbol >> i) & 1;
+ _encoders[context].Encode(rangeEncoder, bit);
+ context = (context << 1) | bit;
+ }
+ break;
+ }
+ }
+ while(i != 0);
+}
+
+UInt32 CLiteralEncoder2::GetPrice(bool matchMode, Byte matchByte, Byte symbol) const
+{
+ UInt32 price = 0;
+ UInt32 context = 1;
+ int i = 8;
+ if (matchMode)
+ {
+ do
+ {
+ i--;
+ UInt32 matchBit = (matchByte >> i) & 1;
+ UInt32 bit = (symbol >> i) & 1;
+ price += _encoders[0x100 + (matchBit << 8) + context].GetPrice(bit);
+ context = (context << 1) | bit;
+ if (matchBit != bit)
+ break;
+ }
+ while (i != 0);
+ }
+ while(i != 0)
+ {
+ i--;
+ UInt32 bit = (symbol >> i) & 1;
+ price += _encoders[context].GetPrice(bit);
+ context = (context << 1) | bit;
+ }
+ return price;
+};
+
+
+namespace NLength {
+
+void CEncoder::Init(UInt32 numPosStates)
+{
+ _choice.Init();
+ _choice2.Init();
+ for (UInt32 posState = 0; posState < numPosStates; posState++)
+ {
+ _lowCoder[posState].Init();
+ _midCoder[posState].Init();
+ }
+ _highCoder.Init();
+}
+
+void CEncoder::Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState)
+{
+ if(symbol < kNumLowSymbols)
+ {
+ _choice.Encode(rangeEncoder, 0);
+ _lowCoder[posState].Encode(rangeEncoder, symbol);
+ }
+ else
+ {
+ _choice.Encode(rangeEncoder, 1);
+ if(symbol < kNumLowSymbols + kNumMidSymbols)
+ {
+ _choice2.Encode(rangeEncoder, 0);
+ _midCoder[posState].Encode(rangeEncoder, symbol - kNumLowSymbols);
+ }
+ else
+ {
+ _choice2.Encode(rangeEncoder, 1);
+ _highCoder.Encode(rangeEncoder, symbol - kNumLowSymbols - kNumMidSymbols);
+ }
+ }
+}
+
+void CEncoder::SetPrices(UInt32 posState, UInt32 numSymbols, UInt32 *prices) const
+{
+ UInt32 a0 = _choice.GetPrice0();
+ UInt32 a1 = _choice.GetPrice1();
+ UInt32 b0 = a1 + _choice2.GetPrice0();
+ UInt32 b1 = a1 + _choice2.GetPrice1();
+ UInt32 i = 0;
+ for (i = 0; i < kNumLowSymbols; i++)
+ {
+ if (i >= numSymbols)
+ return;
+ prices[i] = a0 + _lowCoder[posState].GetPrice(i);
+ }
+ for (; i < kNumLowSymbols + kNumMidSymbols; i++)
+ {
+ if (i >= numSymbols)
+ return;
+ prices[i] = b0 + _midCoder[posState].GetPrice(i - kNumLowSymbols);
+ }
+ for (; i < numSymbols; i++)
+ prices[i] = b1 + _highCoder.GetPrice(i - kNumLowSymbols - kNumMidSymbols);
+}
+
+}
+CEncoder::CEncoder():
+ _numFastBytes(kNumFastBytesDefault),
+ _distTableSize(kDefaultDictionaryLogSize * 2),
+ _posStateBits(2),
+ _posStateMask(4 - 1),
+ _numLiteralPosStateBits(0),
+ _numLiteralContextBits(3),
+ _dictionarySize(1 << kDefaultDictionaryLogSize),
+ _dictionarySizePrev(UInt32(-1)),
+ _numFastBytesPrev(UInt32(-1)),
+ _matchFinderCycles(0),
+ _matchFinderIndex(kBT4),
+ #ifdef COMPRESS_MF_MT
+ _multiThread(false),
+ #endif
+ _writeEndMark(false),
+ setMfPasses(0)
+{
+ // _maxMode = false;
+ _fastMode = false;
+}
+
+HRESULT CEncoder::Create()
+{
+ if (!_rangeEncoder.Create(1 << 20))
+ return E_OUTOFMEMORY;
+ if (!_matchFinder)
+ {
+ switch(_matchFinderIndex)
+ {
+ #ifdef COMPRESS_MF_BT
+ #ifdef COMPRESS_MF_BT2
+ case kBT2:
+ {
+ NBT2::CMatchFinder *mfSpec = new NBT2::CMatchFinder;
+ setMfPasses = mfSpec;
+ _matchFinder = mfSpec;
+ break;
+ }
+ #endif
+ #ifdef COMPRESS_MF_BT3
+ case kBT3:
+ {
+ NBT3::CMatchFinder *mfSpec = new NBT3::CMatchFinder;
+ setMfPasses = mfSpec;
+ _matchFinder = mfSpec;
+ break;
+ }
+ #endif
+ #ifdef COMPRESS_MF_BT4
+ case kBT4:
+ {
+ NBT4::CMatchFinder *mfSpec = new NBT4::CMatchFinder;
+ setMfPasses = mfSpec;
+ _matchFinder = mfSpec;
+ break;
+ }
+ #endif
+ #endif
+
+ #ifdef COMPRESS_MF_HC
+ case kHC4:
+ {
+ NHC4::CMatchFinder *mfSpec = new NHC4::CMatchFinder;
+ setMfPasses = mfSpec;
+ _matchFinder = mfSpec;
+ break;
+ }
+ #endif
+ }
+ if (_matchFinder == 0)
+ return E_OUTOFMEMORY;
+
+ #ifdef COMPRESS_MF_MT
+ if (_multiThread && !(_fastMode && (_matchFinderIndex == kHC4)))
+ {
+ CMatchFinderMT *mfSpec = new CMatchFinderMT;
+ if (mfSpec == 0)
+ return E_OUTOFMEMORY;
+ CMyComPtr<IMatchFinder> mf = mfSpec;
+ RINOK(mfSpec->SetMatchFinder(_matchFinder));
+ _matchFinder.Release();
+ _matchFinder = mf;
+ }
+ #endif
+ }
+
+ if (!_literalEncoder.Create(_numLiteralPosStateBits, _numLiteralContextBits))
+ return E_OUTOFMEMORY;
+
+ if (_dictionarySize == _dictionarySizePrev && _numFastBytesPrev == _numFastBytes)
+ return S_OK;
+ RINOK(_matchFinder->Create(_dictionarySize, kNumOpts, _numFastBytes, kMatchMaxLen + 1)); // actually it's + _numFastBytes - _numFastBytes
+ if (_matchFinderCycles != 0 && setMfPasses != 0)
+ setMfPasses->SetNumPasses(_matchFinderCycles);
+ _dictionarySizePrev = _dictionarySize;
+ _numFastBytesPrev = _numFastBytes;
+ return S_OK;
+}
+
+/*static bool AreStringsEqual(const wchar_t *base, const wchar_t *testString)
+{
+ while (true)
+ {
+ wchar_t c = *testString;
+ if (c >= 'a' && c <= 'z')
+ c -= 0x20;
+ if (*base != c)
+ return false;
+ if (c == 0)
+ return true;
+ base++;
+ testString++;
+ }
+}
+
+static int FindMatchFinder(const wchar_t *s)
+{
+ for (int m = 0; m < (int)(sizeof(kMatchFinderIDs) / sizeof(kMatchFinderIDs[0])); m++)
+ if (AreStringsEqual(kMatchFinderIDs[m], s))
+ return m;
+ return -1;
+}*/
+
+STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs,
+ const PROPVARIANT *properties, UInt32 numProperties)
+{
+ for (UInt32 i = 0; i < numProperties; i++)
+ {
+ const PROPVARIANT &prop = properties[i];
+ switch(propIDs[i])
+ {
+ case NCoderPropID::kNumFastBytes:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 numFastBytes = prop.ulVal;
+ if(numFastBytes < 5 || numFastBytes > kMatchMaxLen)
+ return E_INVALIDARG;
+ _numFastBytes = numFastBytes;
+ break;
+ }
+ case NCoderPropID::kMatchFinderCycles:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ _matchFinderCycles = prop.ulVal;
+ break;
+ }
+ case NCoderPropID::kAlgorithm:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 maximize = prop.ulVal;
+ _fastMode = (maximize == 0);
+ // _maxMode = (maximize >= 2);
+ break;
+ }
+ case NCoderPropID::kMatchFinder:
+ {
+ return E_NOTIMPL;
+ /*if (prop.vt != VT_BSTR)
+ return E_INVALIDARG;
+ int matchFinderIndexPrev = _matchFinderIndex;
+ int m = FindMatchFinder(prop.bstrVal);
+ if (m < 0)
+ return E_INVALIDARG;
+ _matchFinderIndex = m;
+ if (_matchFinder && matchFinderIndexPrev != _matchFinderIndex)
+ {
+ _dictionarySizePrev = (UInt32)-1;
+ ReleaseMatchFinder();
+ }
+ break;*/
+ }
+ #ifdef COMPRESS_MF_MT
+ case NCoderPropID::kMultiThread:
+ {
+ if (prop.vt != VT_BOOL)
+ return E_INVALIDARG;
+ bool newMultiThread = (prop.boolVal == VARIANT_TRUE);
+ if (newMultiThread != _multiThread)
+ {
+ _dictionarySizePrev = (UInt32)-1;
+ ReleaseMatchFinder();
+ _multiThread = newMultiThread;
+ }
+ break;
+ }
+ case NCoderPropID::kNumThreads:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ bool newMultiThread = (prop.ulVal > 1);
+ if (newMultiThread != _multiThread)
+ {
+ _dictionarySizePrev = (UInt32)-1;
+ ReleaseMatchFinder();
+ _multiThread = newMultiThread;
+ }
+ break;
+ }
+ #endif
+ case NCoderPropID::kDictionarySize:
+ {
+ const int kDicLogSizeMaxCompress = 30;
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 dictionarySize = prop.ulVal;
+ if (dictionarySize < UInt32(1 << kDicLogSizeMin) ||
+ dictionarySize > UInt32(1 << kDicLogSizeMaxCompress))
+ return E_INVALIDARG;
+ _dictionarySize = dictionarySize;
+ UInt32 dicLogSize;
+ for(dicLogSize = 0; dicLogSize < (UInt32)kDicLogSizeMaxCompress; dicLogSize++)
+ if (dictionarySize <= (UInt32(1) << dicLogSize))
+ break;
+ _distTableSize = dicLogSize * 2;
+ break;
+ }
+ case NCoderPropID::kPosStateBits:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 value = prop.ulVal;
+ if (value > (UInt32)NLength::kNumPosStatesBitsEncodingMax)
+ return E_INVALIDARG;
+ _posStateBits = value;
+ _posStateMask = (1 << _posStateBits) - 1;
+ break;
+ }
+ case NCoderPropID::kLitPosBits:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 value = prop.ulVal;
+ if (value > (UInt32)kNumLitPosStatesBitsEncodingMax)
+ return E_INVALIDARG;
+ _numLiteralPosStateBits = value;
+ break;
+ }
+ case NCoderPropID::kLitContextBits:
+ {
+ if (prop.vt != VT_UI4)
+ return E_INVALIDARG;
+ UInt32 value = prop.ulVal;
+ if (value > (UInt32)kNumLitContextBitsMax)
+ return E_INVALIDARG;
+ _numLiteralContextBits = value;
+ break;
+ }
+ case NCoderPropID::kEndMarker:
+ {
+ if (prop.vt != VT_BOOL)
+ return E_INVALIDARG;
+ SetWriteEndMarkerMode(prop.boolVal == VARIANT_TRUE);
+ break;
+ }
+ default:
+ return E_INVALIDARG;
+ }
+ }
+ return S_OK;
+}
+
+STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream)
+{
+ const UInt32 kPropSize = 5;
+ Byte properties[kPropSize];
+ properties[0] = (_posStateBits * 5 + _numLiteralPosStateBits) * 9 + _numLiteralContextBits;
+ for (int i = 0; i < 4; i++)
+ properties[1 + i] = Byte(_dictionarySize >> (8 * i));
+ return WriteStream(outStream, properties, kPropSize, NULL);
+}
+
+STDMETHODIMP CEncoder::SetOutStream(ISequentialOutStream *outStream)
+{
+ _rangeEncoder.SetStream(outStream);
+ return S_OK;
+}
+
+STDMETHODIMP CEncoder::ReleaseOutStream()
+{
+ _rangeEncoder.ReleaseStream();
+ return S_OK;
+}
+
+HRESULT CEncoder::Init()
+{
+ CBaseState::Init();
+
+ // RINOK(_matchFinder->Init(inStream));
+ _rangeEncoder.Init();
+
+ for(int i = 0; i < kNumStates; i++)
+ {
+ for (UInt32 j = 0; j <= _posStateMask; j++)
+ {
+ _isMatch[i][j].Init();
+ _isRep0Long[i][j].Init();
+ }
+ _isRep[i].Init();
+ _isRepG0[i].Init();
+ _isRepG1[i].Init();
+ _isRepG2[i].Init();
+ }
+
+ _literalEncoder.Init();
+
+ {
+ for(UInt32 i = 0; i < kNumLenToPosStates; i++)
+ _posSlotEncoder[i].Init();
+ }
+ {
+ for(UInt32 i = 0; i < kNumFullDistances - kEndPosModelIndex; i++)
+ _posEncoders[i].Init();
+ }
+
+ _lenEncoder.Init(1 << _posStateBits);
+ _repMatchLenEncoder.Init(1 << _posStateBits);
+
+ _posAlignEncoder.Init();
+
+ _longestMatchWasFound = false;
+ _optimumEndIndex = 0;
+ _optimumCurrentIndex = 0;
+ _additionalOffset = 0;
+
+ return S_OK;
+}
+
+HRESULT CEncoder::MovePos(UInt32 num)
+{
+ if (num == 0)
+ return S_OK;
+ _additionalOffset += num;
+ return _matchFinder->Skip(num);
+}
+
+UInt32 CEncoder::Backward(UInt32 &backRes, UInt32 cur)
+{
+ _optimumEndIndex = cur;
+ UInt32 posMem = _optimum[cur].PosPrev;
+ UInt32 backMem = _optimum[cur].BackPrev;
+ do
+ {
+ if (_optimum[cur].Prev1IsChar)
+ {
+ _optimum[posMem].MakeAsChar();
+ _optimum[posMem].PosPrev = posMem - 1;
+ if (_optimum[cur].Prev2)
+ {
+ _optimum[posMem - 1].Prev1IsChar = false;
+ _optimum[posMem - 1].PosPrev = _optimum[cur].PosPrev2;
+ _optimum[posMem - 1].BackPrev = _optimum[cur].BackPrev2;
+ }
+ }
+ UInt32 posPrev = posMem;
+ UInt32 backCur = backMem;
+
+ backMem = _optimum[posPrev].BackPrev;
+ posMem = _optimum[posPrev].PosPrev;
+
+ _optimum[posPrev].BackPrev = backCur;
+ _optimum[posPrev].PosPrev = cur;
+ cur = posPrev;
+ }
+ while(cur != 0);
+ backRes = _optimum[0].BackPrev;
+ _optimumCurrentIndex = _optimum[0].PosPrev;
+ return _optimumCurrentIndex;
+}
+
+/*
+Out:
+ (lenRes == 1) && (backRes == 0xFFFFFFFF) means Literal
+*/
+
+HRESULT CEncoder::GetOptimum(UInt32 position, UInt32 &backRes, UInt32 &lenRes)
+{
+ if(_optimumEndIndex != _optimumCurrentIndex)
+ {
+ const COptimal &optimum = _optimum[_optimumCurrentIndex];
+ lenRes = optimum.PosPrev - _optimumCurrentIndex;
+ backRes = optimum.BackPrev;
+ _optimumCurrentIndex = optimum.PosPrev;
+ return S_OK;
+ }
+ _optimumCurrentIndex = _optimumEndIndex = 0;
+
+ UInt32 lenMain, numDistancePairs;
+ if (!_longestMatchWasFound)
+ {
+ RINOK(ReadMatchDistances(lenMain, numDistancePairs));
+ }
+ else
+ {
+ lenMain = _longestMatchLength;
+ numDistancePairs = _numDistancePairs;
+ _longestMatchWasFound = false;
+ }
+
+ const Byte *data = _matchFinder->GetPointerToCurrentPos() - 1;
+ UInt32 numAvailableBytes = _matchFinder->GetNumAvailableBytes() + 1;
+ if (numAvailableBytes < 2)
+ {
+ backRes = (UInt32)(-1);
+ lenRes = 1;
+ return S_OK;
+ }
+ if (numAvailableBytes > kMatchMaxLen)
+ numAvailableBytes = kMatchMaxLen;
+
+ UInt32 reps[kNumRepDistances];
+ UInt32 repLens[kNumRepDistances];
+ UInt32 repMaxIndex = 0;
+ UInt32 i;
+ for(i = 0; i < kNumRepDistances; i++)
+ {
+ reps[i] = _repDistances[i];
+ UInt32 backOffset = reps[i] + 1;
+ if (data[0] != data[(size_t)0 - backOffset] || data[1] != data[(size_t)1 - backOffset])
+ {
+ repLens[i] = 0;
+ continue;
+ }
+ UInt32 lenTest;
+ for (lenTest = 2; lenTest < numAvailableBytes &&
+ data[lenTest] == data[(size_t)lenTest - backOffset]; lenTest++);
+ repLens[i] = lenTest;
+ if (lenTest > repLens[repMaxIndex])
+ repMaxIndex = i;
+ }
+ if(repLens[repMaxIndex] >= _numFastBytes)
+ {
+ backRes = repMaxIndex;
+ lenRes = repLens[repMaxIndex];
+ return MovePos(lenRes - 1);
+ }
+
+ UInt32 *matchDistances = _matchDistances + 1;
+ if(lenMain >= _numFastBytes)
+ {
+ backRes = matchDistances[numDistancePairs - 1] + kNumRepDistances;
+ lenRes = lenMain;
+ return MovePos(lenMain - 1);
+ }
+ Byte currentByte = *data;
+ Byte matchByte = data[(size_t)0 - reps[0] - 1];
+
+ if(lenMain < 2 && currentByte != matchByte && repLens[repMaxIndex] < 2)
+ {
+ backRes = (UInt32)-1;
+ lenRes = 1;
+ return S_OK;
+ }
+
+ _optimum[0].State = _state;
+
+ UInt32 posState = (position & _posStateMask);
+
+ _optimum[1].Price = _isMatch[_state.Index][posState].GetPrice0() +
+ _literalEncoder.GetSubCoder(position, _previousByte)->GetPrice(!_state.IsCharState(), matchByte, currentByte);
+ _optimum[1].MakeAsChar();
+
+ UInt32 matchPrice = _isMatch[_state.Index][posState].GetPrice1();
+ UInt32 repMatchPrice = matchPrice + _isRep[_state.Index].GetPrice1();
+
+ if(matchByte == currentByte)
+ {
+ UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(_state, posState);
+ if(shortRepPrice < _optimum[1].Price)
+ {
+ _optimum[1].Price = shortRepPrice;
+ _optimum[1].MakeAsShortRep();
+ }
+ }
+ UInt32 lenEnd = ((lenMain >= repLens[repMaxIndex]) ? lenMain : repLens[repMaxIndex]);
+
+ if(lenEnd < 2)
+ {
+ backRes = _optimum[1].BackPrev;
+ lenRes = 1;
+ return S_OK;
+ }
+
+ _optimum[1].PosPrev = 0;
+ for (i = 0; i < kNumRepDistances; i++)
+ _optimum[0].Backs[i] = reps[i];
+
+ UInt32 len = lenEnd;
+ do
+ _optimum[len--].Price = kIfinityPrice;
+ while (len >= 2);
+
+ for(i = 0; i < kNumRepDistances; i++)
+ {
+ UInt32 repLen = repLens[i];
+ if (repLen < 2)
+ continue;
+ UInt32 price = repMatchPrice + GetPureRepPrice(i, _state, posState);
+ do
+ {
+ UInt32 curAndLenPrice = price + _repMatchLenEncoder.GetPrice(repLen - 2, posState);
+ COptimal &optimum = _optimum[repLen];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = 0;
+ optimum.BackPrev = i;
+ optimum.Prev1IsChar = false;
+ }
+ }
+ while(--repLen >= 2);
+ }
+
+ UInt32 normalMatchPrice = matchPrice + _isRep[_state.Index].GetPrice0();
+
+ len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);
+ if (len <= lenMain)
+ {
+ UInt32 offs = 0;
+ while (len > matchDistances[offs])
+ offs += 2;
+ for(; ; len++)
+ {
+ UInt32 distance = matchDistances[offs + 1];
+ UInt32 curAndLenPrice = normalMatchPrice + GetPosLenPrice(distance, len, posState);
+ COptimal &optimum = _optimum[len];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = 0;
+ optimum.BackPrev = distance + kNumRepDistances;
+ optimum.Prev1IsChar = false;
+ }
+ if (len == matchDistances[offs])
+ {
+ offs += 2;
+ if (offs == numDistancePairs)
+ break;
+ }
+ }
+ }
+
+ UInt32 cur = 0;
+
+ while(true)
+ {
+ cur++;
+ if(cur == lenEnd)
+ {
+ lenRes = Backward(backRes, cur);
+ return S_OK;
+ }
+ UInt32 newLen, numDistancePairs;
+ RINOK(ReadMatchDistances(newLen, numDistancePairs));
+ if(newLen >= _numFastBytes)
+ {
+ _numDistancePairs = numDistancePairs;
+ _longestMatchLength = newLen;
+ _longestMatchWasFound = true;
+ lenRes = Backward(backRes, cur);
+ return S_OK;
+ }
+ position++;
+ COptimal &curOptimum = _optimum[cur];
+ UInt32 posPrev = curOptimum.PosPrev;
+ CState state;
+ if (curOptimum.Prev1IsChar)
+ {
+ posPrev--;
+ if (curOptimum.Prev2)
+ {
+ state = _optimum[curOptimum.PosPrev2].State;
+ if (curOptimum.BackPrev2 < kNumRepDistances)
+ state.UpdateRep();
+ else
+ state.UpdateMatch();
+ }
+ else
+ state = _optimum[posPrev].State;
+ state.UpdateChar();
+ }
+ else
+ state = _optimum[posPrev].State;
+ if (posPrev == cur - 1)
+ {
+ if (curOptimum.IsShortRep())
+ state.UpdateShortRep();
+ else
+ state.UpdateChar();
+ }
+ else
+ {
+ UInt32 pos;
+ if (curOptimum.Prev1IsChar && curOptimum.Prev2)
+ {
+ posPrev = curOptimum.PosPrev2;
+ pos = curOptimum.BackPrev2;
+ state.UpdateRep();
+ }
+ else
+ {
+ pos = curOptimum.BackPrev;
+ if (pos < kNumRepDistances)
+ state.UpdateRep();
+ else
+ state.UpdateMatch();
+ }
+ const COptimal &prevOptimum = _optimum[posPrev];
+ if (pos < kNumRepDistances)
+ {
+ reps[0] = prevOptimum.Backs[pos];
+ UInt32 i;
+ for(i = 1; i <= pos; i++)
+ reps[i] = prevOptimum.Backs[i - 1];
+ for(; i < kNumRepDistances; i++)
+ reps[i] = prevOptimum.Backs[i];
+ }
+ else
+ {
+ reps[0] = (pos - kNumRepDistances);
+ for(UInt32 i = 1; i < kNumRepDistances; i++)
+ reps[i] = prevOptimum.Backs[i - 1];
+ }
+ }
+ curOptimum.State = state;
+ for(UInt32 i = 0; i < kNumRepDistances; i++)
+ curOptimum.Backs[i] = reps[i];
+ UInt32 curPrice = curOptimum.Price;
+ const Byte *data = _matchFinder->GetPointerToCurrentPos() - 1;
+ const Byte currentByte = *data;
+ const Byte matchByte = data[(size_t)0 - reps[0] - 1];
+
+ UInt32 posState = (position & _posStateMask);
+
+ UInt32 curAnd1Price = curPrice +
+ _isMatch[state.Index][posState].GetPrice0() +
+ _literalEncoder.GetSubCoder(position, data[(size_t)0 - 1])->GetPrice(!state.IsCharState(), matchByte, currentByte);
+
+ COptimal &nextOptimum = _optimum[cur + 1];
+
+ bool nextIsChar = false;
+ if (curAnd1Price < nextOptimum.Price)
+ {
+ nextOptimum.Price = curAnd1Price;
+ nextOptimum.PosPrev = cur;
+ nextOptimum.MakeAsChar();
+ nextIsChar = true;
+ }
+
+ UInt32 matchPrice = curPrice + _isMatch[state.Index][posState].GetPrice1();
+ UInt32 repMatchPrice = matchPrice + _isRep[state.Index].GetPrice1();
+
+ if(matchByte == currentByte &&
+ !(nextOptimum.PosPrev < cur && nextOptimum.BackPrev == 0))
+ {
+ UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(state, posState);
+ if(shortRepPrice <= nextOptimum.Price)
+ {
+ nextOptimum.Price = shortRepPrice;
+ nextOptimum.PosPrev = cur;
+ nextOptimum.MakeAsShortRep();
+ nextIsChar = true;
+ }
+ }
+ /*
+ if(newLen == 2 && matchDistances[2] >= kDistLimit2) // test it maybe set 2000 ?
+ continue;
+ */
+
+ UInt32 numAvailableBytesFull = _matchFinder->GetNumAvailableBytes() + 1;
+ numAvailableBytesFull = MyMin(kNumOpts - 1 - cur, numAvailableBytesFull);
+ UInt32 numAvailableBytes = numAvailableBytesFull;
+
+ if (numAvailableBytes < 2)
+ continue;
+ if (numAvailableBytes > _numFastBytes)
+ numAvailableBytes = _numFastBytes;
+ if (!nextIsChar && matchByte != currentByte) // speed optimization
+ {
+ // try Literal + rep0
+ UInt32 backOffset = reps[0] + 1;
+ UInt32 limit = MyMin(numAvailableBytesFull, _numFastBytes + 1);
+ UInt32 temp;
+ for (temp = 1; temp < limit &&
+ data[temp] == data[(size_t)temp - backOffset]; temp++);
+ UInt32 lenTest2 = temp - 1;
+ if (lenTest2 >= 2)
+ {
+ CState state2 = state;
+ state2.UpdateChar();
+ UInt32 posStateNext = (position + 1) & _posStateMask;
+ UInt32 nextRepMatchPrice = curAnd1Price +
+ _isMatch[state2.Index][posStateNext].GetPrice1() +
+ _isRep[state2.Index].GetPrice1();
+ // for (; lenTest2 >= 2; lenTest2--)
+ {
+ UInt32 offset = cur + 1 + lenTest2;
+ while(lenEnd < offset)
+ _optimum[++lenEnd].Price = kIfinityPrice;
+ UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(
+ 0, lenTest2, state2, posStateNext);
+ COptimal &optimum = _optimum[offset];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = cur + 1;
+ optimum.BackPrev = 0;
+ optimum.Prev1IsChar = true;
+ optimum.Prev2 = false;
+ }
+ }
+ }
+ }
+
+ UInt32 startLen = 2; // speed optimization
+ for(UInt32 repIndex = 0; repIndex < kNumRepDistances; repIndex++)
+ {
+ // UInt32 repLen = _matchFinder->GetMatchLen(0 - 1, reps[repIndex], newLen); // test it;
+ UInt32 backOffset = reps[repIndex] + 1;
+ if (data[0] != data[(size_t)0 - backOffset] ||
+ data[1] != data[(size_t)1 - backOffset])
+ continue;
+ UInt32 lenTest;
+ for (lenTest = 2; lenTest < numAvailableBytes &&
+ data[lenTest] == data[(size_t)lenTest - backOffset]; lenTest++);
+ while(lenEnd < cur + lenTest)
+ _optimum[++lenEnd].Price = kIfinityPrice;
+ UInt32 lenTestTemp = lenTest;
+ UInt32 price = repMatchPrice + GetPureRepPrice(repIndex, state, posState);
+ do
+ {
+ UInt32 curAndLenPrice = price + _repMatchLenEncoder.GetPrice(lenTest - 2, posState);
+ COptimal &optimum = _optimum[cur + lenTest];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = cur;
+ optimum.BackPrev = repIndex;
+ optimum.Prev1IsChar = false;
+ }
+ }
+ while(--lenTest >= 2);
+ lenTest = lenTestTemp;
+
+ if (repIndex == 0)
+ startLen = lenTest + 1;
+
+ // if (_maxMode)
+ {
+ UInt32 lenTest2 = lenTest + 1;
+ UInt32 limit = MyMin(numAvailableBytesFull, lenTest2 + _numFastBytes);
+ for (; lenTest2 < limit &&
+ data[lenTest2] == data[(size_t)lenTest2 - backOffset]; lenTest2++);
+ lenTest2 -= lenTest + 1;
+ if (lenTest2 >= 2)
+ {
+ CState state2 = state;
+ state2.UpdateRep();
+ UInt32 posStateNext = (position + lenTest) & _posStateMask;
+ UInt32 curAndLenCharPrice =
+ price + _repMatchLenEncoder.GetPrice(lenTest - 2, posState) +
+ _isMatch[state2.Index][posStateNext].GetPrice0() +
+ _literalEncoder.GetSubCoder(position + lenTest, data[(size_t)lenTest - 1])->GetPrice(
+ true, data[(size_t)lenTest - backOffset], data[lenTest]);
+ state2.UpdateChar();
+ posStateNext = (position + lenTest + 1) & _posStateMask;
+ UInt32 nextRepMatchPrice = curAndLenCharPrice +
+ _isMatch[state2.Index][posStateNext].GetPrice1() +
+ _isRep[state2.Index].GetPrice1();
+
+ // for(; lenTest2 >= 2; lenTest2--)
+ {
+ UInt32 offset = cur + lenTest + 1 + lenTest2;
+ while(lenEnd < offset)
+ _optimum[++lenEnd].Price = kIfinityPrice;
+ UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(
+ 0, lenTest2, state2, posStateNext);
+ COptimal &optimum = _optimum[offset];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = cur + lenTest + 1;
+ optimum.BackPrev = 0;
+ optimum.Prev1IsChar = true;
+ optimum.Prev2 = true;
+ optimum.PosPrev2 = cur;
+ optimum.BackPrev2 = repIndex;
+ }
+ }
+ }
+ }
+ }
+
+ // for(UInt32 lenTest = 2; lenTest <= newLen; lenTest++)
+ if (newLen > numAvailableBytes)
+ {
+ newLen = numAvailableBytes;
+ for (numDistancePairs = 0; newLen > matchDistances[numDistancePairs]; numDistancePairs += 2);
+ matchDistances[numDistancePairs] = newLen;
+ numDistancePairs += 2;
+ }
+ if (newLen >= startLen)
+ {
+ UInt32 normalMatchPrice = matchPrice + _isRep[state.Index].GetPrice0();
+ while(lenEnd < cur + newLen)
+ _optimum[++lenEnd].Price = kIfinityPrice;
+
+ UInt32 offs = 0;
+ while(startLen > matchDistances[offs])
+ offs += 2;
+ UInt32 curBack = matchDistances[offs + 1];
+ UInt32 posSlot = GetPosSlot2(curBack);
+ for(UInt32 lenTest = /*2*/ startLen; ; lenTest++)
+ {
+ UInt32 curAndLenPrice = normalMatchPrice;
+ UInt32 lenToPosState = GetLenToPosState(lenTest);
+ if (curBack < kNumFullDistances)
+ curAndLenPrice += _distancesPrices[lenToPosState][curBack];
+ else
+ curAndLenPrice += _posSlotPrices[lenToPosState][posSlot] + _alignPrices[curBack & kAlignMask];
+
+ curAndLenPrice += _lenEncoder.GetPrice(lenTest - kMatchMinLen, posState);
+
+ COptimal &optimum = _optimum[cur + lenTest];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = cur;
+ optimum.BackPrev = curBack + kNumRepDistances;
+ optimum.Prev1IsChar = false;
+ }
+
+ if (/*_maxMode && */lenTest == matchDistances[offs])
+ {
+ // Try Match + Literal + Rep0
+ UInt32 backOffset = curBack + 1;
+ UInt32 lenTest2 = lenTest + 1;
+ UInt32 limit = MyMin(numAvailableBytesFull, lenTest2 + _numFastBytes);
+ for (; lenTest2 < limit &&
+ data[lenTest2] == data[(size_t)lenTest2 - backOffset]; lenTest2++);
+ lenTest2 -= lenTest + 1;
+ if (lenTest2 >= 2)
+ {
+ CState state2 = state;
+ state2.UpdateMatch();
+ UInt32 posStateNext = (position + lenTest) & _posStateMask;
+ UInt32 curAndLenCharPrice = curAndLenPrice +
+ _isMatch[state2.Index][posStateNext].GetPrice0() +
+ _literalEncoder.GetSubCoder(position + lenTest, data[(size_t)lenTest - 1])->GetPrice(
+ true, data[(size_t)lenTest - backOffset], data[lenTest]);
+ state2.UpdateChar();
+ posStateNext = (posStateNext + 1) & _posStateMask;
+ UInt32 nextRepMatchPrice = curAndLenCharPrice +
+ _isMatch[state2.Index][posStateNext].GetPrice1() +
+ _isRep[state2.Index].GetPrice1();
+
+ // for(; lenTest2 >= 2; lenTest2--)
+ {
+ UInt32 offset = cur + lenTest + 1 + lenTest2;
+ while(lenEnd < offset)
+ _optimum[++lenEnd].Price = kIfinityPrice;
+ UInt32 curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);
+ COptimal &optimum = _optimum[offset];
+ if (curAndLenPrice < optimum.Price)
+ {
+ optimum.Price = curAndLenPrice;
+ optimum.PosPrev = cur + lenTest + 1;
+ optimum.BackPrev = 0;
+ optimum.Prev1IsChar = true;
+ optimum.Prev2 = true;
+ optimum.PosPrev2 = cur;
+ optimum.BackPrev2 = curBack + kNumRepDistances;
+ }
+ }
+ }
+ offs += 2;
+ if (offs == numDistancePairs)
+ break;
+ curBack = matchDistances[offs + 1];
+ if (curBack >= kNumFullDistances)
+ posSlot = GetPosSlot2(curBack);
+ }
+ }
+ }
+ }
+}
+
+static inline bool ChangePair(UInt32 smallDist, UInt32 bigDist)
+{
+ return ((bigDist >> 7) > smallDist);
+}
+
+
+HRESULT CEncoder::ReadMatchDistances(UInt32 &lenRes, UInt32 &numDistancePairs)
+{
+ lenRes = 0;
+ RINOK(_matchFinder->GetMatches(_matchDistances));
+ numDistancePairs = _matchDistances[0];
+ if (numDistancePairs > 0)
+ {
+ lenRes = _matchDistances[1 + numDistancePairs - 2];
+ if (lenRes == _numFastBytes)
+ lenRes += _matchFinder->GetMatchLen(lenRes - 1, _matchDistances[1 + numDistancePairs - 1],
+ kMatchMaxLen - lenRes);
+ }
+ _additionalOffset++;
+ return S_OK;
+}
+
+HRESULT CEncoder::GetOptimumFast(UInt32 position, UInt32 &backRes, UInt32 &lenRes)
+{
+ UInt32 lenMain, numDistancePairs;
+ if (!_longestMatchWasFound)
+ {
+ RINOK(ReadMatchDistances(lenMain, numDistancePairs));
+ }
+ else
+ {
+ lenMain = _longestMatchLength;
+ numDistancePairs = _numDistancePairs;
+ _longestMatchWasFound = false;
+ }
+
+ const Byte *data = _matchFinder->GetPointerToCurrentPos() - 1;
+ UInt32 numAvailableBytes = _matchFinder->GetNumAvailableBytes() + 1;
+ if (numAvailableBytes > kMatchMaxLen)
+ numAvailableBytes = kMatchMaxLen;
+ if (numAvailableBytes < 2)
+ {
+ backRes = (UInt32)(-1);
+ lenRes = 1;
+ return S_OK;
+ }
+
+ UInt32 repLens[kNumRepDistances];
+ UInt32 repMaxIndex = 0;
+
+ for(UInt32 i = 0; i < kNumRepDistances; i++)
+ {
+ UInt32 backOffset = _repDistances[i] + 1;
+ if (data[0] != data[(size_t)0 - backOffset] || data[1] != data[(size_t)1 - backOffset])
+ {
+ repLens[i] = 0;
+ continue;
+ }
+ UInt32 len;
+ for (len = 2; len < numAvailableBytes && data[len] == data[(size_t)len - backOffset]; len++);
+ if(len >= _numFastBytes)
+ {
+ backRes = i;
+ lenRes = len;
+ return MovePos(lenRes - 1);
+ }
+ repLens[i] = len;
+ if (len > repLens[repMaxIndex])
+ repMaxIndex = i;
+ }
+ UInt32 *matchDistances = _matchDistances + 1;
+ if(lenMain >= _numFastBytes)
+ {
+ backRes = matchDistances[numDistancePairs - 1] + kNumRepDistances;
+ lenRes = lenMain;
+ return MovePos(lenMain - 1);
+ }
+
+ UInt32 backMain = 0; // for GCC
+ if (lenMain >= 2)
+ {
+ backMain = matchDistances[numDistancePairs - 1];
+ while (numDistancePairs > 2 && lenMain == matchDistances[numDistancePairs - 4] + 1)
+ {
+ if (!ChangePair(matchDistances[numDistancePairs - 3], backMain))
+ break;
+ numDistancePairs -= 2;
+ lenMain = matchDistances[numDistancePairs - 2];
+ backMain = matchDistances[numDistancePairs - 1];
+ }
+ if (lenMain == 2 && backMain >= 0x80)
+ lenMain = 1;
+ }
+
+ if (repLens[repMaxIndex] >= 2)
+ {
+ if (repLens[repMaxIndex] + 1 >= lenMain ||
+ repLens[repMaxIndex] + 2 >= lenMain && (backMain > (1 << 9)) ||
+ repLens[repMaxIndex] + 3 >= lenMain && (backMain > (1 << 15)))
+ {
+ backRes = repMaxIndex;
+ lenRes = repLens[repMaxIndex];
+ return MovePos(lenRes - 1);
+ }
+ }
+
+ if (lenMain >= 2 && numAvailableBytes > 2)
+ {
+ RINOK(ReadMatchDistances(_longestMatchLength, _numDistancePairs));
+ if (_longestMatchLength >= 2)
+ {
+ UInt32 newDistance = matchDistances[_numDistancePairs - 1];
+ if (_longestMatchLength >= lenMain && newDistance < backMain ||
+ _longestMatchLength == lenMain + 1 && !ChangePair(backMain, newDistance) ||
+ _longestMatchLength > lenMain + 1 ||
+ _longestMatchLength + 1 >= lenMain && lenMain >= 3 && ChangePair(newDistance, backMain))
+ {
+ _longestMatchWasFound = true;
+ backRes = UInt32(-1);
+ lenRes = 1;
+ return S_OK;
+ }
+ }
+ data++;
+ numAvailableBytes--;
+ for(UInt32 i = 0; i < kNumRepDistances; i++)
+ {
+ UInt32 backOffset = _repDistances[i] + 1;
+ if (data[1] != data[(size_t)1 - backOffset] || data[2] != data[(size_t)2 - backOffset])
+ {
+ repLens[i] = 0;
+ continue;
+ }
+ UInt32 len;
+ for (len = 2; len < numAvailableBytes && data[len] == data[(size_t)len - backOffset]; len++);
+ if (len + 1 >= lenMain)
+ {
+ _longestMatchWasFound = true;
+ backRes = UInt32(-1);
+ lenRes = 1;
+ return S_OK;
+ }
+ }
+ backRes = backMain + kNumRepDistances;
+ lenRes = lenMain;
+ return MovePos(lenMain - 2);
+ }
+ backRes = UInt32(-1);
+ lenRes = 1;
+ return S_OK;
+}
+
+HRESULT CEncoder::Flush(UInt32 nowPos)
+{
+ ReleaseMFStream();
+ WriteEndMarker(nowPos & _posStateMask);
+ _rangeEncoder.FlushData();
+ return _rangeEncoder.FlushStream();
+}
+
+void CEncoder::WriteEndMarker(UInt32 posState)
+{
+ // This function for writing End Mark for stream version of LZMA.
+ // In current version this feature is not used.
+ if (!_writeEndMark)
+ return;
+
+ _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 1);
+ _isRep[_state.Index].Encode(&_rangeEncoder, 0);
+ _state.UpdateMatch();
+ UInt32 len = kMatchMinLen; // kMatchMaxLen;
+ _lenEncoder.Encode(&_rangeEncoder, len - kMatchMinLen, posState, !_fastMode);
+ UInt32 posSlot = (1 << kNumPosSlotBits) - 1;
+ UInt32 lenToPosState = GetLenToPosState(len);
+ _posSlotEncoder[lenToPosState].Encode(&_rangeEncoder, posSlot);
+ UInt32 footerBits = 30;
+ UInt32 posReduced = (UInt32(1) << footerBits) - 1;
+ _rangeEncoder.EncodeDirectBits(posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
+ _posAlignEncoder.ReverseEncode(&_rangeEncoder, posReduced & kAlignMask);
+}
+
+HRESULT CEncoder::CodeReal(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream,
+ const UInt64 *inSize, const UInt64 *outSize,
+ ICompressProgressInfo *progress)
+{
+ _needReleaseMFStream = false;
+ CCoderReleaser coderReleaser(this);
+ RINOK(SetStreams(inStream, outStream, inSize, outSize));
+ while(true)
+ {
+ UInt64 processedInSize;
+ UInt64 processedOutSize;
+ Int32 finished;
+ RINOK(CodeOneBlock(&processedInSize, &processedOutSize, &finished));
+ if (finished != 0)
+ return S_OK;
+ if (progress != 0)
+ {
+ RINOK(progress->SetRatioInfo(&processedInSize, &processedOutSize));
+ }
+ }
+}
+
+HRESULT CEncoder::SetStreams(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream,
+ const UInt64 *inSize, const UInt64 *outSize)
+{
+ _inStream = inStream;
+ _finished = false;
+ RINOK(Create());
+ RINOK(SetOutStream(outStream));
+ RINOK(Init());
+
+ // CCoderReleaser releaser(this);
+
+ /*
+ if (_matchFinder->GetNumAvailableBytes() == 0)
+ return Flush();
+ */
+
+ if (!_fastMode)
+ {
+ FillDistancesPrices();
+ FillAlignPrices();
+ }
+
+ _lenEncoder.SetTableSize(_numFastBytes + 1 - kMatchMinLen);
+ _lenEncoder.UpdateTables(1 << _posStateBits);
+ _repMatchLenEncoder.SetTableSize(_numFastBytes + 1 - kMatchMinLen);
+ _repMatchLenEncoder.UpdateTables(1 << _posStateBits);
+
+ nowPos64 = 0;
+ return S_OK;
+}
+
+HRESULT CEncoder::CodeOneBlock(UInt64 *inSize, UInt64 *outSize, Int32 *finished)
+{
+ if (_inStream != 0)
+ {
+ RINOK(_matchFinder->SetStream(_inStream));
+ RINOK(_matchFinder->Init());
+ _needReleaseMFStream = true;
+ _inStream = 0;
+ }
+
+
+ *finished = 1;
+ if (_finished)
+ return S_OK;
+ _finished = true;
+
+ if (nowPos64 == 0)
+ {
+ if (_matchFinder->GetNumAvailableBytes() == 0)
+ return Flush(UInt32(nowPos64));
+ UInt32 len, numDistancePairs;
+ RINOK(ReadMatchDistances(len, numDistancePairs));
+ UInt32 posState = UInt32(nowPos64) & _posStateMask;
+ _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 0);
+ _state.UpdateChar();
+ Byte curByte = _matchFinder->GetIndexByte(0 - _additionalOffset);
+ _literalEncoder.GetSubCoder(UInt32(nowPos64), _previousByte)->Encode(&_rangeEncoder, curByte);
+ _previousByte = curByte;
+ _additionalOffset--;
+ nowPos64++;
+ }
+
+ UInt32 nowPos32 = (UInt32)nowPos64;
+ UInt32 progressPosValuePrev = nowPos32;
+
+ if (_matchFinder->GetNumAvailableBytes() == 0)
+ return Flush(nowPos32);
+
+ while(true)
+ {
+ #ifdef _NO_EXCEPTIONS
+ if (_rangeEncoder.Stream.ErrorCode != S_OK)
+ return _rangeEncoder.Stream.ErrorCode;
+ #endif
+ UInt32 pos, len;
+ HRESULT result;
+ if (_fastMode)
+ result = GetOptimumFast(nowPos32, pos, len);
+ else
+ result = GetOptimum(nowPos32, pos, len);
+ RINOK(result);
+
+ UInt32 posState = nowPos32 & _posStateMask;
+ if(len == 1 && pos == 0xFFFFFFFF)
+ {
+ _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 0);
+ Byte curByte = _matchFinder->GetIndexByte(0 - _additionalOffset);
+ CLiteralEncoder2 *subCoder = _literalEncoder.GetSubCoder(nowPos32, _previousByte);
+ if(_state.IsCharState())
+ subCoder->Encode(&_rangeEncoder, curByte);
+ else
+ {
+ Byte matchByte = _matchFinder->GetIndexByte(0 - _repDistances[0] - 1 - _additionalOffset);
+ subCoder->EncodeMatched(&_rangeEncoder, matchByte, curByte);
+ }
+ _state.UpdateChar();
+ _previousByte = curByte;
+ }
+ else
+ {
+ _isMatch[_state.Index][posState].Encode(&_rangeEncoder, 1);
+ if(pos < kNumRepDistances)
+ {
+ _isRep[_state.Index].Encode(&_rangeEncoder, 1);
+ if(pos == 0)
+ {
+ _isRepG0[_state.Index].Encode(&_rangeEncoder, 0);
+ _isRep0Long[_state.Index][posState].Encode(&_rangeEncoder, ((len == 1) ? 0 : 1));
+ }
+ else
+ {
+ UInt32 distance = _repDistances[pos];
+ _isRepG0[_state.Index].Encode(&_rangeEncoder, 1);
+ if (pos == 1)
+ _isRepG1[_state.Index].Encode(&_rangeEncoder, 0);
+ else
+ {
+ _isRepG1[_state.Index].Encode(&_rangeEncoder, 1);
+ _isRepG2[_state.Index].Encode(&_rangeEncoder, pos - 2);
+ if (pos == 3)
+ _repDistances[3] = _repDistances[2];
+ _repDistances[2] = _repDistances[1];
+ }
+ _repDistances[1] = _repDistances[0];
+ _repDistances[0] = distance;
+ }
+ if (len == 1)
+ _state.UpdateShortRep();
+ else
+ {
+ _repMatchLenEncoder.Encode(&_rangeEncoder, len - kMatchMinLen, posState, !_fastMode);
+ _state.UpdateRep();
+ }
+ }
+ else
+ {
+ _isRep[_state.Index].Encode(&_rangeEncoder, 0);
+ _state.UpdateMatch();
+ _lenEncoder.Encode(&_rangeEncoder, len - kMatchMinLen, posState, !_fastMode);
+ pos -= kNumRepDistances;
+ UInt32 posSlot = GetPosSlot(pos);
+ _posSlotEncoder[GetLenToPosState(len)].Encode(&_rangeEncoder, posSlot);
+
+ if (posSlot >= kStartPosModelIndex)
+ {
+ UInt32 footerBits = ((posSlot >> 1) - 1);
+ UInt32 base = ((2 | (posSlot & 1)) << footerBits);
+ UInt32 posReduced = pos - base;
+
+ if (posSlot < kEndPosModelIndex)
+ NRangeCoder::ReverseBitTreeEncode(_posEncoders + base - posSlot - 1,
+ &_rangeEncoder, footerBits, posReduced);
+ else
+ {
+ _rangeEncoder.EncodeDirectBits(posReduced >> kNumAlignBits, footerBits - kNumAlignBits);
+ _posAlignEncoder.ReverseEncode(&_rangeEncoder, posReduced & kAlignMask);
+ _alignPriceCount++;
+ }
+ }
+ _repDistances[3] = _repDistances[2];
+ _repDistances[2] = _repDistances[1];
+ _repDistances[1] = _repDistances[0];
+ _repDistances[0] = pos;
+ _matchPriceCount++;
+ }
+ _previousByte = _matchFinder->GetIndexByte(len - 1 - _additionalOffset);
+ }
+ _additionalOffset -= len;
+ nowPos32 += len;
+ if (_additionalOffset == 0)
+ {
+ if (!_fastMode)
+ {
+ if (_matchPriceCount >= (1 << 7))
+ FillDistancesPrices();
+ if (_alignPriceCount >= kAlignTableSize)
+ FillAlignPrices();
+ }
+ if (_matchFinder->GetNumAvailableBytes() == 0)
+ return Flush(nowPos32);
+ if (nowPos32 - progressPosValuePrev >= (1 << 14))
+ {
+ nowPos64 += nowPos32 - progressPosValuePrev;
+ *inSize = nowPos64;
+ *outSize = _rangeEncoder.GetProcessedSize();
+ _finished = false;
+ *finished = 0;
+ return S_OK;
+ }
+ }
+ }
+}
+
+STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
+ ICompressProgressInfo *progress)
+{
+ #ifndef _NO_EXCEPTIONS
+ try
+ {
+ #endif
+ return CodeReal(inStream, outStream, inSize, outSize, progress);
+ #ifndef _NO_EXCEPTIONS
+ }
+ catch(const COutBufferException &e) { return e.ErrorCode; }
+ catch(...) { return E_FAIL; }
+ #endif
+}
+
+void CEncoder::FillDistancesPrices()
+{
+ UInt32 tempPrices[kNumFullDistances];
+ for (UInt32 i = kStartPosModelIndex; i < kNumFullDistances; i++)
+ {
+ UInt32 posSlot = GetPosSlot(i);
+ UInt32 footerBits = ((posSlot >> 1) - 1);
+ UInt32 base = ((2 | (posSlot & 1)) << footerBits);
+ tempPrices[i] = NRangeCoder::ReverseBitTreeGetPrice(_posEncoders +
+ base - posSlot - 1, footerBits, i - base);
+ }
+
+ for (UInt32 lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++)
+ {
+ UInt32 posSlot;
+ NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumPosSlotBits> &encoder = _posSlotEncoder[lenToPosState];
+ UInt32 *posSlotPrices = _posSlotPrices[lenToPosState];
+ for (posSlot = 0; posSlot < _distTableSize; posSlot++)
+ posSlotPrices[posSlot] = encoder.GetPrice(posSlot);
+ for (posSlot = kEndPosModelIndex; posSlot < _distTableSize; posSlot++)
+ posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << NRangeCoder::kNumBitPriceShiftBits);
+
+ UInt32 *distancesPrices = _distancesPrices[lenToPosState];
+ UInt32 i;
+ for (i = 0; i < kStartPosModelIndex; i++)
+ distancesPrices[i] = posSlotPrices[i];
+ for (; i < kNumFullDistances; i++)
+ distancesPrices[i] = posSlotPrices[GetPosSlot(i)] + tempPrices[i];
+ }
+ _matchPriceCount = 0;
+}
+
+void CEncoder::FillAlignPrices()
+{
+ for (UInt32 i = 0; i < kAlignTableSize; i++)
+ _alignPrices[i] = _posAlignEncoder.ReverseGetPrice(i);
+ _alignPriceCount = 0;
+}
+
+}}
diff --git a/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h b/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h
index 5fe8d4c..41c7118 100755
--- a/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h
+++ b/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h
@@ -1,426 +1,426 @@
-/*
- * LZMAEncoder.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __LZMA_ENCODER_H
-#define __LZMA_ENCODER_H
-
-#include "../../../Common/MyCom.h"
-#include "../../../Common/Alloc.h"
-#include "../../ICoder.h"
-#include "../LZ/IMatchFinder.h"
-#include "../RangeCoder/RangeCoderBitTree.h"
-
-#include "LZMA.h"
-
-namespace NCompress {
-namespace NLZMA {
-
-typedef NRangeCoder::CBitEncoder<kNumMoveBits> CMyBitEncoder;
-
-class CBaseState
-{
-protected:
- CState _state;
- Byte _previousByte;
- UInt32 _repDistances[kNumRepDistances];
- void Init()
- {
- _state.Init();
- _previousByte = 0;
- for(UInt32 i = 0 ; i < kNumRepDistances; i++)
- _repDistances[i] = 0;
- }
-};
-
-struct COptimal
-{
- CState State;
-
- bool Prev1IsChar;
- bool Prev2;
-
- UInt32 PosPrev2;
- UInt32 BackPrev2;
-
- UInt32 Price;
- UInt32 PosPrev; // posNext;
- UInt32 BackPrev;
- UInt32 Backs[kNumRepDistances];
- void MakeAsChar() { BackPrev = UInt32(-1); Prev1IsChar = false; }
- void MakeAsShortRep() { BackPrev = 0; ; Prev1IsChar = false; }
- bool IsShortRep() { return (BackPrev == 0); }
-};
-
-
-extern Byte g_FastPos[1 << 11];
-inline UInt32 GetPosSlot(UInt32 pos)
-{
- if (pos < (1 << 11))
- return g_FastPos[pos];
- if (pos < (1 << 21))
- return g_FastPos[pos >> 10] + 20;
- return g_FastPos[pos >> 20] + 40;
-}
-
-inline UInt32 GetPosSlot2(UInt32 pos)
-{
- if (pos < (1 << 17))
- return g_FastPos[pos >> 6] + 12;
- if (pos < (1 << 27))
- return g_FastPos[pos >> 16] + 32;
- return g_FastPos[pos >> 26] + 52;
-}
-
-const UInt32 kIfinityPrice = 0xFFFFFFF;
-
-const UInt32 kNumOpts = 1 << 12;
-
-
-class CLiteralEncoder2
-{
- CMyBitEncoder _encoders[0x300];
-public:
- void Init()
- {
- for (int i = 0; i < 0x300; i++)
- _encoders[i].Init();
- }
- void Encode(NRangeCoder::CEncoder *rangeEncoder, Byte symbol);
- void EncodeMatched(NRangeCoder::CEncoder *rangeEncoder, Byte matchByte, Byte symbol);
- UInt32 GetPrice(bool matchMode, Byte matchByte, Byte symbol) const;
-};
-
-class CLiteralEncoder
-{
- CLiteralEncoder2 *_coders;
- int _numPrevBits;
- int _numPosBits;
- UInt32 _posMask;
-public:
- CLiteralEncoder(): _coders(0) {}
- ~CLiteralEncoder() { Free(); }
- void Free()
- {
- MyFree(_coders);
- _coders = 0;
- }
- bool Create(int numPosBits, int numPrevBits)
- {
- if (_coders == 0 || (numPosBits + numPrevBits) != (_numPrevBits + _numPosBits))
- {
- Free();
- UInt32 numStates = 1 << (numPosBits + numPrevBits);
- _coders = (CLiteralEncoder2 *)MyAlloc(numStates * sizeof(CLiteralEncoder2));
- }
- _numPosBits = numPosBits;
- _posMask = (1 << numPosBits) - 1;
- _numPrevBits = numPrevBits;
- return (_coders != 0);
- }
- void Init()
- {
- UInt32 numStates = 1 << (_numPrevBits + _numPosBits);
- for (UInt32 i = 0; i < numStates; i++)
- _coders[i].Init();
- }
- CLiteralEncoder2 *GetSubCoder(UInt32 pos, Byte prevByte)
- { return &_coders[((pos & _posMask) << _numPrevBits) + (prevByte >> (8 - _numPrevBits))]; }
-};
-
-namespace NLength {
-
-class CEncoder
-{
- CMyBitEncoder _choice;
- CMyBitEncoder _choice2;
- NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumLowBits> _lowCoder[kNumPosStatesEncodingMax];
- NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumMidBits> _midCoder[kNumPosStatesEncodingMax];
- NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumHighBits> _highCoder;
-public:
- void Init(UInt32 numPosStates);
- void Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState);
- void SetPrices(UInt32 posState, UInt32 numSymbols, UInt32 *prices) const;
-};
-
-const UInt32 kNumSpecSymbols = kNumLowSymbols + kNumMidSymbols;
-
-class CPriceTableEncoder: public CEncoder
-{
- UInt32 _prices[kNumPosStatesEncodingMax][kNumSymbolsTotal];
- UInt32 _tableSize;
- UInt32 _counters[kNumPosStatesEncodingMax];
-public:
- void SetTableSize(UInt32 tableSize) { _tableSize = tableSize; }
- UInt32 GetPrice(UInt32 symbol, UInt32 posState) const { return _prices[posState][symbol]; }
- void UpdateTable(UInt32 posState)
- {
- SetPrices(posState, _tableSize, _prices[posState]);
- _counters[posState] = _tableSize;
- }
- void UpdateTables(UInt32 numPosStates)
- {
- for (UInt32 posState = 0; posState < numPosStates; posState++)
- UpdateTable(posState);
- }
- void Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState, bool updatePrice)
- {
- CEncoder::Encode(rangeEncoder, symbol, posState);
- if (updatePrice)
- if (--_counters[posState] == 0)
- UpdateTable(posState);
- }
-};
-
-}
-
-class CEncoder :
- public ICompressCoder,
- public ICompressSetOutStream,
- public ICompressSetCoderProperties,
- public ICompressWriteCoderProperties,
- public CBaseState,
- public CMyUnknownImp
-{
- COptimal _optimum[kNumOpts];
- CMyComPtr<IMatchFinder> _matchFinder; // test it
- NRangeCoder::CEncoder _rangeEncoder;
-
- CMyBitEncoder _isMatch[kNumStates][NLength::kNumPosStatesEncodingMax];
- CMyBitEncoder _isRep[kNumStates];
- CMyBitEncoder _isRepG0[kNumStates];
- CMyBitEncoder _isRepG1[kNumStates];
- CMyBitEncoder _isRepG2[kNumStates];
- CMyBitEncoder _isRep0Long[kNumStates][NLength::kNumPosStatesEncodingMax];
-
- NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumPosSlotBits> _posSlotEncoder[kNumLenToPosStates];
-
- CMyBitEncoder _posEncoders[kNumFullDistances - kEndPosModelIndex];
- NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumAlignBits> _posAlignEncoder;
-
- NLength::CPriceTableEncoder _lenEncoder;
- NLength::CPriceTableEncoder _repMatchLenEncoder;
-
- CLiteralEncoder _literalEncoder;
-
- UInt32 _matchDistances[kMatchMaxLen * 2 + 2 + 1];
-
- bool _fastMode;
- // bool _maxMode;
- UInt32 _numFastBytes;
- UInt32 _longestMatchLength;
- UInt32 _numDistancePairs;
-
- UInt32 _additionalOffset;
-
- UInt32 _optimumEndIndex;
- UInt32 _optimumCurrentIndex;
-
- bool _longestMatchWasFound;
-
- UInt32 _posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
-
- UInt32 _distancesPrices[kNumLenToPosStates][kNumFullDistances];
-
- UInt32 _alignPrices[kAlignTableSize];
- UInt32 _alignPriceCount;
-
- UInt32 _distTableSize;
-
- UInt32 _posStateBits;
- UInt32 _posStateMask;
- UInt32 _numLiteralPosStateBits;
- UInt32 _numLiteralContextBits;
-
- UInt32 _dictionarySize;
-
- UInt32 _dictionarySizePrev;
- UInt32 _numFastBytesPrev;
-
- UInt32 _matchPriceCount;
- UInt64 nowPos64;
- bool _finished;
- ISequentialInStream *_inStream;
-
- UInt32 _matchFinderCycles;
- int _matchFinderIndex;
- #ifdef COMPRESS_MF_MT
- bool _multiThread;
- #endif
-
- bool _writeEndMark;
-
- bool _needReleaseMFStream;
-
- IMatchFinderSetNumPasses *setMfPasses;
-
- void ReleaseMatchFinder()
- {
- setMfPasses = 0;
- _matchFinder.Release();
- }
-
- HRESULT ReadMatchDistances(UInt32 &len, UInt32 &numDistancePairs);
-
- HRESULT MovePos(UInt32 num);
- UInt32 GetRepLen1Price(CState state, UInt32 posState) const
- {
- return _isRepG0[state.Index].GetPrice0() +
- _isRep0Long[state.Index][posState].GetPrice0();
- }
-
- UInt32 GetPureRepPrice(UInt32 repIndex, CState state, UInt32 posState) const
- {
- UInt32 price;
- if(repIndex == 0)
- {
- price = _isRepG0[state.Index].GetPrice0();
- price += _isRep0Long[state.Index][posState].GetPrice1();
- }
- else
- {
- price = _isRepG0[state.Index].GetPrice1();
- if (repIndex == 1)
- price += _isRepG1[state.Index].GetPrice0();
- else
- {
- price += _isRepG1[state.Index].GetPrice1();
- price += _isRepG2[state.Index].GetPrice(repIndex - 2);
- }
- }
- return price;
- }
- UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, CState state, UInt32 posState) const
- {
- return _repMatchLenEncoder.GetPrice(len - kMatchMinLen, posState) +
- GetPureRepPrice(repIndex, state, posState);
- }
- /*
- UInt32 GetPosLen2Price(UInt32 pos, UInt32 posState) const
- {
- if (pos >= kNumFullDistances)
- return kIfinityPrice;
- return _distancesPrices[0][pos] + _lenEncoder.GetPrice(0, posState);
- }
- UInt32 GetPosLen3Price(UInt32 pos, UInt32 len, UInt32 posState) const
- {
- UInt32 price;
- UInt32 lenToPosState = GetLenToPosState(len);
- if (pos < kNumFullDistances)
- price = _distancesPrices[lenToPosState][pos];
- else
- price = _posSlotPrices[lenToPosState][GetPosSlot2(pos)] +
- _alignPrices[pos & kAlignMask];
- return price + _lenEncoder.GetPrice(len - kMatchMinLen, posState);
- }
- */
- UInt32 GetPosLenPrice(UInt32 pos, UInt32 len, UInt32 posState) const
- {
- UInt32 price;
- UInt32 lenToPosState = GetLenToPosState(len);
- if (pos < kNumFullDistances)
- price = _distancesPrices[lenToPosState][pos];
- else
- price = _posSlotPrices[lenToPosState][GetPosSlot2(pos)] +
- _alignPrices[pos & kAlignMask];
- return price + _lenEncoder.GetPrice(len - kMatchMinLen, posState);
- }
-
- UInt32 Backward(UInt32 &backRes, UInt32 cur);
- HRESULT GetOptimum(UInt32 position, UInt32 &backRes, UInt32 &lenRes);
- HRESULT GetOptimumFast(UInt32 position, UInt32 &backRes, UInt32 &lenRes);
-
- void FillDistancesPrices();
- void FillAlignPrices();
-
- void ReleaseMFStream()
- {
- if (_matchFinder && _needReleaseMFStream)
- {
- _matchFinder->ReleaseStream();
- _needReleaseMFStream = false;
- }
- }
-
- void ReleaseStreams()
- {
- ReleaseMFStream();
- ReleaseOutStream();
- }
-
- HRESULT Flush(UInt32 nowPos);
- class CCoderReleaser
- {
- CEncoder *_coder;
- public:
- CCoderReleaser(CEncoder *coder): _coder(coder) {}
- ~CCoderReleaser()
- {
- _coder->ReleaseStreams();
- }
- };
- friend class CCoderReleaser;
-
- void WriteEndMarker(UInt32 posState);
-
-public:
- CEncoder();
- void SetWriteEndMarkerMode(bool writeEndMarker)
- { _writeEndMark= writeEndMarker; }
-
- HRESULT Create();
-
- MY_UNKNOWN_IMP3(
- ICompressSetOutStream,
- ICompressSetCoderProperties,
- ICompressWriteCoderProperties
- )
-
- HRESULT Init();
-
- // ICompressCoder interface
- HRESULT SetStreams(ISequentialInStream *inStream,
- ISequentialOutStream *outStream,
- const UInt64 *inSize, const UInt64 *outSize);
- HRESULT CodeOneBlock(UInt64 *inSize, UInt64 *outSize, Int32 *finished);
-
- HRESULT CodeReal(ISequentialInStream *inStream,
- ISequentialOutStream *outStream,
- const UInt64 *inSize, const UInt64 *outSize,
- ICompressProgressInfo *progress);
-
- // ICompressCoder interface
- STDMETHOD(Code)(ISequentialInStream *inStream,
- ISequentialOutStream *outStream,
- const UInt64 *inSize, const UInt64 *outSize,
- ICompressProgressInfo *progress);
-
- // ICompressSetCoderProperties2
- STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
- const PROPVARIANT *properties, UInt32 numProperties);
-
- // ICompressWriteCoderProperties
- STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream);
-
- STDMETHOD(SetOutStream)(ISequentialOutStream *outStream);
- STDMETHOD(ReleaseOutStream)();
-
- virtual ~CEncoder() {}
-};
-
-}}
-
-#endif
+/*
+ * LZMAEncoder.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __LZMA_ENCODER_H
+#define __LZMA_ENCODER_H
+
+#include "../../../Common/MyCom.h"
+#include "../../../Common/Alloc.h"
+#include "../../ICoder.h"
+#include "../LZ/IMatchFinder.h"
+#include "../RangeCoder/RangeCoderBitTree.h"
+
+#include "LZMA.h"
+
+namespace NCompress {
+namespace NLZMA {
+
+typedef NRangeCoder::CBitEncoder<kNumMoveBits> CMyBitEncoder;
+
+class CBaseState
+{
+protected:
+ CState _state;
+ Byte _previousByte;
+ UInt32 _repDistances[kNumRepDistances];
+ void Init()
+ {
+ _state.Init();
+ _previousByte = 0;
+ for(UInt32 i = 0 ; i < kNumRepDistances; i++)
+ _repDistances[i] = 0;
+ }
+};
+
+struct COptimal
+{
+ CState State;
+
+ bool Prev1IsChar;
+ bool Prev2;
+
+ UInt32 PosPrev2;
+ UInt32 BackPrev2;
+
+ UInt32 Price;
+ UInt32 PosPrev; // posNext;
+ UInt32 BackPrev;
+ UInt32 Backs[kNumRepDistances];
+ void MakeAsChar() { BackPrev = UInt32(-1); Prev1IsChar = false; }
+ void MakeAsShortRep() { BackPrev = 0; ; Prev1IsChar = false; }
+ bool IsShortRep() { return (BackPrev == 0); }
+};
+
+
+extern Byte g_FastPos[1 << 11];
+inline UInt32 GetPosSlot(UInt32 pos)
+{
+ if (pos < (1 << 11))
+ return g_FastPos[pos];
+ if (pos < (1 << 21))
+ return g_FastPos[pos >> 10] + 20;
+ return g_FastPos[pos >> 20] + 40;
+}
+
+inline UInt32 GetPosSlot2(UInt32 pos)
+{
+ if (pos < (1 << 17))
+ return g_FastPos[pos >> 6] + 12;
+ if (pos < (1 << 27))
+ return g_FastPos[pos >> 16] + 32;
+ return g_FastPos[pos >> 26] + 52;
+}
+
+const UInt32 kIfinityPrice = 0xFFFFFFF;
+
+const UInt32 kNumOpts = 1 << 12;
+
+
+class CLiteralEncoder2
+{
+ CMyBitEncoder _encoders[0x300];
+public:
+ void Init()
+ {
+ for (int i = 0; i < 0x300; i++)
+ _encoders[i].Init();
+ }
+ void Encode(NRangeCoder::CEncoder *rangeEncoder, Byte symbol);
+ void EncodeMatched(NRangeCoder::CEncoder *rangeEncoder, Byte matchByte, Byte symbol);
+ UInt32 GetPrice(bool matchMode, Byte matchByte, Byte symbol) const;
+};
+
+class CLiteralEncoder
+{
+ CLiteralEncoder2 *_coders;
+ int _numPrevBits;
+ int _numPosBits;
+ UInt32 _posMask;
+public:
+ CLiteralEncoder(): _coders(0) {}
+ ~CLiteralEncoder() { Free(); }
+ void Free()
+ {
+ MyFree(_coders);
+ _coders = 0;
+ }
+ bool Create(int numPosBits, int numPrevBits)
+ {
+ if (_coders == 0 || (numPosBits + numPrevBits) != (_numPrevBits + _numPosBits))
+ {
+ Free();
+ UInt32 numStates = 1 << (numPosBits + numPrevBits);
+ _coders = (CLiteralEncoder2 *)MyAlloc(numStates * sizeof(CLiteralEncoder2));
+ }
+ _numPosBits = numPosBits;
+ _posMask = (1 << numPosBits) - 1;
+ _numPrevBits = numPrevBits;
+ return (_coders != 0);
+ }
+ void Init()
+ {
+ UInt32 numStates = 1 << (_numPrevBits + _numPosBits);
+ for (UInt32 i = 0; i < numStates; i++)
+ _coders[i].Init();
+ }
+ CLiteralEncoder2 *GetSubCoder(UInt32 pos, Byte prevByte)
+ { return &_coders[((pos & _posMask) << _numPrevBits) + (prevByte >> (8 - _numPrevBits))]; }
+};
+
+namespace NLength {
+
+class CEncoder
+{
+ CMyBitEncoder _choice;
+ CMyBitEncoder _choice2;
+ NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumLowBits> _lowCoder[kNumPosStatesEncodingMax];
+ NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumMidBits> _midCoder[kNumPosStatesEncodingMax];
+ NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumHighBits> _highCoder;
+public:
+ void Init(UInt32 numPosStates);
+ void Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState);
+ void SetPrices(UInt32 posState, UInt32 numSymbols, UInt32 *prices) const;
+};
+
+const UInt32 kNumSpecSymbols = kNumLowSymbols + kNumMidSymbols;
+
+class CPriceTableEncoder: public CEncoder
+{
+ UInt32 _prices[kNumPosStatesEncodingMax][kNumSymbolsTotal];
+ UInt32 _tableSize;
+ UInt32 _counters[kNumPosStatesEncodingMax];
+public:
+ void SetTableSize(UInt32 tableSize) { _tableSize = tableSize; }
+ UInt32 GetPrice(UInt32 symbol, UInt32 posState) const { return _prices[posState][symbol]; }
+ void UpdateTable(UInt32 posState)
+ {
+ SetPrices(posState, _tableSize, _prices[posState]);
+ _counters[posState] = _tableSize;
+ }
+ void UpdateTables(UInt32 numPosStates)
+ {
+ for (UInt32 posState = 0; posState < numPosStates; posState++)
+ UpdateTable(posState);
+ }
+ void Encode(NRangeCoder::CEncoder *rangeEncoder, UInt32 symbol, UInt32 posState, bool updatePrice)
+ {
+ CEncoder::Encode(rangeEncoder, symbol, posState);
+ if (updatePrice)
+ if (--_counters[posState] == 0)
+ UpdateTable(posState);
+ }
+};
+
+}
+
+class CEncoder :
+ public ICompressCoder,
+ public ICompressSetOutStream,
+ public ICompressSetCoderProperties,
+ public ICompressWriteCoderProperties,
+ public CBaseState,
+ public CMyUnknownImp
+{
+ COptimal _optimum[kNumOpts];
+ CMyComPtr<IMatchFinder> _matchFinder; // test it
+ NRangeCoder::CEncoder _rangeEncoder;
+
+ CMyBitEncoder _isMatch[kNumStates][NLength::kNumPosStatesEncodingMax];
+ CMyBitEncoder _isRep[kNumStates];
+ CMyBitEncoder _isRepG0[kNumStates];
+ CMyBitEncoder _isRepG1[kNumStates];
+ CMyBitEncoder _isRepG2[kNumStates];
+ CMyBitEncoder _isRep0Long[kNumStates][NLength::kNumPosStatesEncodingMax];
+
+ NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumPosSlotBits> _posSlotEncoder[kNumLenToPosStates];
+
+ CMyBitEncoder _posEncoders[kNumFullDistances - kEndPosModelIndex];
+ NRangeCoder::CBitTreeEncoder<kNumMoveBits, kNumAlignBits> _posAlignEncoder;
+
+ NLength::CPriceTableEncoder _lenEncoder;
+ NLength::CPriceTableEncoder _repMatchLenEncoder;
+
+ CLiteralEncoder _literalEncoder;
+
+ UInt32 _matchDistances[kMatchMaxLen * 2 + 2 + 1];
+
+ bool _fastMode;
+ // bool _maxMode;
+ UInt32 _numFastBytes;
+ UInt32 _longestMatchLength;
+ UInt32 _numDistancePairs;
+
+ UInt32 _additionalOffset;
+
+ UInt32 _optimumEndIndex;
+ UInt32 _optimumCurrentIndex;
+
+ bool _longestMatchWasFound;
+
+ UInt32 _posSlotPrices[kNumLenToPosStates][kDistTableSizeMax];
+
+ UInt32 _distancesPrices[kNumLenToPosStates][kNumFullDistances];
+
+ UInt32 _alignPrices[kAlignTableSize];
+ UInt32 _alignPriceCount;
+
+ UInt32 _distTableSize;
+
+ UInt32 _posStateBits;
+ UInt32 _posStateMask;
+ UInt32 _numLiteralPosStateBits;
+ UInt32 _numLiteralContextBits;
+
+ UInt32 _dictionarySize;
+
+ UInt32 _dictionarySizePrev;
+ UInt32 _numFastBytesPrev;
+
+ UInt32 _matchPriceCount;
+ UInt64 nowPos64;
+ bool _finished;
+ ISequentialInStream *_inStream;
+
+ UInt32 _matchFinderCycles;
+ int _matchFinderIndex;
+ #ifdef COMPRESS_MF_MT
+ bool _multiThread;
+ #endif
+
+ bool _writeEndMark;
+
+ bool _needReleaseMFStream;
+
+ IMatchFinderSetNumPasses *setMfPasses;
+
+ void ReleaseMatchFinder()
+ {
+ setMfPasses = 0;
+ _matchFinder.Release();
+ }
+
+ HRESULT ReadMatchDistances(UInt32 &len, UInt32 &numDistancePairs);
+
+ HRESULT MovePos(UInt32 num);
+ UInt32 GetRepLen1Price(CState state, UInt32 posState) const
+ {
+ return _isRepG0[state.Index].GetPrice0() +
+ _isRep0Long[state.Index][posState].GetPrice0();
+ }
+
+ UInt32 GetPureRepPrice(UInt32 repIndex, CState state, UInt32 posState) const
+ {
+ UInt32 price;
+ if(repIndex == 0)
+ {
+ price = _isRepG0[state.Index].GetPrice0();
+ price += _isRep0Long[state.Index][posState].GetPrice1();
+ }
+ else
+ {
+ price = _isRepG0[state.Index].GetPrice1();
+ if (repIndex == 1)
+ price += _isRepG1[state.Index].GetPrice0();
+ else
+ {
+ price += _isRepG1[state.Index].GetPrice1();
+ price += _isRepG2[state.Index].GetPrice(repIndex - 2);
+ }
+ }
+ return price;
+ }
+ UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, CState state, UInt32 posState) const
+ {
+ return _repMatchLenEncoder.GetPrice(len - kMatchMinLen, posState) +
+ GetPureRepPrice(repIndex, state, posState);
+ }
+ /*
+ UInt32 GetPosLen2Price(UInt32 pos, UInt32 posState) const
+ {
+ if (pos >= kNumFullDistances)
+ return kIfinityPrice;
+ return _distancesPrices[0][pos] + _lenEncoder.GetPrice(0, posState);
+ }
+ UInt32 GetPosLen3Price(UInt32 pos, UInt32 len, UInt32 posState) const
+ {
+ UInt32 price;
+ UInt32 lenToPosState = GetLenToPosState(len);
+ if (pos < kNumFullDistances)
+ price = _distancesPrices[lenToPosState][pos];
+ else
+ price = _posSlotPrices[lenToPosState][GetPosSlot2(pos)] +
+ _alignPrices[pos & kAlignMask];
+ return price + _lenEncoder.GetPrice(len - kMatchMinLen, posState);
+ }
+ */
+ UInt32 GetPosLenPrice(UInt32 pos, UInt32 len, UInt32 posState) const
+ {
+ UInt32 price;
+ UInt32 lenToPosState = GetLenToPosState(len);
+ if (pos < kNumFullDistances)
+ price = _distancesPrices[lenToPosState][pos];
+ else
+ price = _posSlotPrices[lenToPosState][GetPosSlot2(pos)] +
+ _alignPrices[pos & kAlignMask];
+ return price + _lenEncoder.GetPrice(len - kMatchMinLen, posState);
+ }
+
+ UInt32 Backward(UInt32 &backRes, UInt32 cur);
+ HRESULT GetOptimum(UInt32 position, UInt32 &backRes, UInt32 &lenRes);
+ HRESULT GetOptimumFast(UInt32 position, UInt32 &backRes, UInt32 &lenRes);
+
+ void FillDistancesPrices();
+ void FillAlignPrices();
+
+ void ReleaseMFStream()
+ {
+ if (_matchFinder && _needReleaseMFStream)
+ {
+ _matchFinder->ReleaseStream();
+ _needReleaseMFStream = false;
+ }
+ }
+
+ void ReleaseStreams()
+ {
+ ReleaseMFStream();
+ ReleaseOutStream();
+ }
+
+ HRESULT Flush(UInt32 nowPos);
+ class CCoderReleaser
+ {
+ CEncoder *_coder;
+ public:
+ CCoderReleaser(CEncoder *coder): _coder(coder) {}
+ ~CCoderReleaser()
+ {
+ _coder->ReleaseStreams();
+ }
+ };
+ friend class CCoderReleaser;
+
+ void WriteEndMarker(UInt32 posState);
+
+public:
+ CEncoder();
+ void SetWriteEndMarkerMode(bool writeEndMarker)
+ { _writeEndMark= writeEndMarker; }
+
+ HRESULT Create();
+
+ MY_UNKNOWN_IMP3(
+ ICompressSetOutStream,
+ ICompressSetCoderProperties,
+ ICompressWriteCoderProperties
+ )
+
+ HRESULT Init();
+
+ // ICompressCoder interface
+ HRESULT SetStreams(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream,
+ const UInt64 *inSize, const UInt64 *outSize);
+ HRESULT CodeOneBlock(UInt64 *inSize, UInt64 *outSize, Int32 *finished);
+
+ HRESULT CodeReal(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream,
+ const UInt64 *inSize, const UInt64 *outSize,
+ ICompressProgressInfo *progress);
+
+ // ICompressCoder interface
+ STDMETHOD(Code)(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream,
+ const UInt64 *inSize, const UInt64 *outSize,
+ ICompressProgressInfo *progress);
+
+ // ICompressSetCoderProperties2
+ STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
+ const PROPVARIANT *properties, UInt32 numProperties);
+
+ // ICompressWriteCoderProperties
+ STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream);
+
+ STDMETHOD(SetOutStream)(ISequentialOutStream *outStream);
+ STDMETHOD(ReleaseOutStream)();
+
+ virtual ~CEncoder() {}
+};
+
+}}
+
+#endif
diff --git a/Source/7zip/7zip/Compress/LZMA/StdAfx.h b/Source/7zip/7zip/Compress/LZMA/StdAfx.h
index 83fdd22..e7fb698 100755
--- a/Source/7zip/7zip/Compress/LZMA/StdAfx.h
+++ b/Source/7zip/7zip/Compress/LZMA/StdAfx.h
@@ -1,8 +1,8 @@
-// StdAfx.h
-
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#include "../../../Common/MyWindows.h"
-
-#endif
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#include "../../../Common/MyWindows.h"
+
+#endif
diff --git a/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h b/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h
index cbf5524..2373565 100755
--- a/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h
+++ b/Source/7zip/7zip/Compress/RangeCoder/RangeCoder.h
@@ -1,220 +1,220 @@
-/*
- * RangeCoder.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_H
-#define __COMPRESS_RANGECODER_H
-
-#include "../../Common/InBuffer.h"
-#include "../../Common/OutBuffer.h"
-
-namespace NCompress {
-namespace NRangeCoder {
-
-const int kNumTopBits = 24;
-const UInt32 kTopValue = (1 << kNumTopBits);
-
-class CEncoder
-{
- UInt32 _cacheSize;
- Byte _cache;
-public:
- UInt64 Low;
- UInt32 Range;
- COutBuffer Stream;
- bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
-
- void SetStream(ISequentialOutStream *stream) { Stream.SetStream(stream); }
- void Init()
- {
- Stream.Init();
- Low = 0;
- Range = 0xFFFFFFFF;
- _cacheSize = 1;
- _cache = 0;
- }
-
- void FlushData()
- {
- // Low += 1;
- for(int i = 0; i < 5; i++)
- ShiftLow();
- }
-
- HRESULT FlushStream() { return Stream.Flush(); }
-
- void ReleaseStream() { Stream.ReleaseStream(); }
-
- void Encode(UInt32 start, UInt32 size, UInt32 total)
- {
- Low += start * (Range /= total);
- Range *= size;
- while (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
-
- void ShiftLow()
- {
- if ((UInt32)Low < (UInt32)0xFF000000 || (int)(Low >> 32) != 0)
- {
- Byte temp = _cache;
- do
- {
- Stream.WriteByte((Byte)(temp + (Byte)(Low >> 32)));
- temp = 0xFF;
- }
- while(--_cacheSize != 0);
- _cache = (Byte)((UInt32)Low >> 24);
- }
- _cacheSize++;
- Low = (UInt32)Low << 8;
- }
-
- void EncodeDirectBits(UInt32 value, int numTotalBits)
- {
- for (int i = numTotalBits - 1; i >= 0; i--)
- {
- Range >>= 1;
- if (((value >> i) & 1) == 1)
- Low += Range;
- if (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
- }
-
- void EncodeBit(UInt32 size0, UInt32 numTotalBits, UInt32 symbol)
- {
- UInt32 newBound = (Range >> numTotalBits) * size0;
- if (symbol == 0)
- Range = newBound;
- else
- {
- Low += newBound;
- Range -= newBound;
- }
- while (Range < kTopValue)
- {
- Range <<= 8;
- ShiftLow();
- }
- }
-
- UInt64 GetProcessedSize() { return Stream.GetProcessedSize() + _cacheSize + 4; }
-};
-
-class CDecoder
-{
-public:
- CInBuffer Stream;
- UInt32 Range;
- UInt32 Code;
- bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
-
- void Normalize()
- {
- while (Range < kTopValue)
- {
- Code = (Code << 8) | Stream.ReadByte();
- Range <<= 8;
- }
- }
-
- void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); }
- void Init()
- {
- Stream.Init();
- Code = 0;
- Range = 0xFFFFFFFF;
- for(int i = 0; i < 5; i++)
- Code = (Code << 8) | Stream.ReadByte();
- }
-
- void ReleaseStream() { Stream.ReleaseStream(); }
-
- UInt32 GetThreshold(UInt32 total)
- {
- return (Code) / ( Range /= total);
- }
-
- void Decode(UInt32 start, UInt32 size)
- {
- Code -= start * Range;
- Range *= size;
- Normalize();
- }
-
- UInt32 DecodeDirectBits(int numTotalBits)
- {
- UInt32 range = Range;
- UInt32 code = Code;
- UInt32 result = 0;
- for (int i = numTotalBits; i != 0; i--)
- {
- range >>= 1;
- /*
- result <<= 1;
- if (code >= range)
- {
- code -= range;
- result |= 1;
- }
- */
- UInt32 t = (code - range) >> 31;
- code -= range & (t - 1);
- result = (result << 1) | (1 - t);
-
- if (range < kTopValue)
- {
- code = (code << 8) | Stream.ReadByte();
- range <<= 8;
- }
- }
- Range = range;
- Code = code;
- return result;
- }
-
- UInt32 DecodeBit(UInt32 size0, UInt32 numTotalBits)
- {
- UInt32 newBound = (Range >> numTotalBits) * size0;
- UInt32 symbol;
- if (Code < newBound)
- {
- symbol = 0;
- Range = newBound;
- }
- else
- {
- symbol = 1;
- Code -= newBound;
- Range -= newBound;
- }
- Normalize();
- return symbol;
- }
-
- UInt64 GetProcessedSize() {return Stream.GetProcessedSize(); }
-};
-
-}}
-
-#endif
+/*
+ * RangeCoder.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_H
+#define __COMPRESS_RANGECODER_H
+
+#include "../../Common/InBuffer.h"
+#include "../../Common/OutBuffer.h"
+
+namespace NCompress {
+namespace NRangeCoder {
+
+const int kNumTopBits = 24;
+const UInt32 kTopValue = (1 << kNumTopBits);
+
+class CEncoder
+{
+ UInt32 _cacheSize;
+ Byte _cache;
+public:
+ UInt64 Low;
+ UInt32 Range;
+ COutBuffer Stream;
+ bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
+
+ void SetStream(ISequentialOutStream *stream) { Stream.SetStream(stream); }
+ void Init()
+ {
+ Stream.Init();
+ Low = 0;
+ Range = 0xFFFFFFFF;
+ _cacheSize = 1;
+ _cache = 0;
+ }
+
+ void FlushData()
+ {
+ // Low += 1;
+ for(int i = 0; i < 5; i++)
+ ShiftLow();
+ }
+
+ HRESULT FlushStream() { return Stream.Flush(); }
+
+ void ReleaseStream() { Stream.ReleaseStream(); }
+
+ void Encode(UInt32 start, UInt32 size, UInt32 total)
+ {
+ Low += start * (Range /= total);
+ Range *= size;
+ while (Range < kTopValue)
+ {
+ Range <<= 8;
+ ShiftLow();
+ }
+ }
+
+ void ShiftLow()
+ {
+ if ((UInt32)Low < (UInt32)0xFF000000 || (int)(Low >> 32) != 0)
+ {
+ Byte temp = _cache;
+ do
+ {
+ Stream.WriteByte((Byte)(temp + (Byte)(Low >> 32)));
+ temp = 0xFF;
+ }
+ while(--_cacheSize != 0);
+ _cache = (Byte)((UInt32)Low >> 24);
+ }
+ _cacheSize++;
+ Low = (UInt32)Low << 8;
+ }
+
+ void EncodeDirectBits(UInt32 value, int numTotalBits)
+ {
+ for (int i = numTotalBits - 1; i >= 0; i--)
+ {
+ Range >>= 1;
+ if (((value >> i) & 1) == 1)
+ Low += Range;
+ if (Range < kTopValue)
+ {
+ Range <<= 8;
+ ShiftLow();
+ }
+ }
+ }
+
+ void EncodeBit(UInt32 size0, UInt32 numTotalBits, UInt32 symbol)
+ {
+ UInt32 newBound = (Range >> numTotalBits) * size0;
+ if (symbol == 0)
+ Range = newBound;
+ else
+ {
+ Low += newBound;
+ Range -= newBound;
+ }
+ while (Range < kTopValue)
+ {
+ Range <<= 8;
+ ShiftLow();
+ }
+ }
+
+ UInt64 GetProcessedSize() { return Stream.GetProcessedSize() + _cacheSize + 4; }
+};
+
+class CDecoder
+{
+public:
+ CInBuffer Stream;
+ UInt32 Range;
+ UInt32 Code;
+ bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); }
+
+ void Normalize()
+ {
+ while (Range < kTopValue)
+ {
+ Code = (Code << 8) | Stream.ReadByte();
+ Range <<= 8;
+ }
+ }
+
+ void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); }
+ void Init()
+ {
+ Stream.Init();
+ Code = 0;
+ Range = 0xFFFFFFFF;
+ for(int i = 0; i < 5; i++)
+ Code = (Code << 8) | Stream.ReadByte();
+ }
+
+ void ReleaseStream() { Stream.ReleaseStream(); }
+
+ UInt32 GetThreshold(UInt32 total)
+ {
+ return (Code) / ( Range /= total);
+ }
+
+ void Decode(UInt32 start, UInt32 size)
+ {
+ Code -= start * Range;
+ Range *= size;
+ Normalize();
+ }
+
+ UInt32 DecodeDirectBits(int numTotalBits)
+ {
+ UInt32 range = Range;
+ UInt32 code = Code;
+ UInt32 result = 0;
+ for (int i = numTotalBits; i != 0; i--)
+ {
+ range >>= 1;
+ /*
+ result <<= 1;
+ if (code >= range)
+ {
+ code -= range;
+ result |= 1;
+ }
+ */
+ UInt32 t = (code - range) >> 31;
+ code -= range & (t - 1);
+ result = (result << 1) | (1 - t);
+
+ if (range < kTopValue)
+ {
+ code = (code << 8) | Stream.ReadByte();
+ range <<= 8;
+ }
+ }
+ Range = range;
+ Code = code;
+ return result;
+ }
+
+ UInt32 DecodeBit(UInt32 size0, UInt32 numTotalBits)
+ {
+ UInt32 newBound = (Range >> numTotalBits) * size0;
+ UInt32 symbol;
+ if (Code < newBound)
+ {
+ symbol = 0;
+ Range = newBound;
+ }
+ else
+ {
+ symbol = 1;
+ Code -= newBound;
+ Range -= newBound;
+ }
+ Normalize();
+ return symbol;
+ }
+
+ UInt64 GetProcessedSize() {return Stream.GetProcessedSize(); }
+};
+
+}}
+
+#endif
diff --git a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
index 235797a..dbf0f2f 100755
--- a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
+++ b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
@@ -1,95 +1,95 @@
-/*
- * RangeCoderBit.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "RangeCoderBit.h"
-
-namespace NCompress {
-namespace NRangeCoder {
-
-UInt32 CPriceTables::ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
-static CPriceTables g_PriceTables;
-
-CPriceTables::CPriceTables() { Init(); }
-
-void CPriceTables::Init()
-{
- const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits);
- for(int i = kNumBits - 1; i >= 0; i--)
- {
- UInt32 start = 1 << (kNumBits - i - 1);
- UInt32 end = 1 << (kNumBits - i);
- for (UInt32 j = start; j < end; j++)
- ProbPrices[j] = (i << kNumBitPriceShiftBits) +
- (((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1));
- }
-
- /*
- // simplest: bad solution
- for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
- ProbPrices[i] = kBitPrice;
- */
-
- /*
- const double kDummyMultMid = (1.0 / kBitPrice) / 2;
- const double kDummyMultMid = 0;
- // float solution
- double ln2 = log(double(2));
- double lnAll = log(double(kBitModelTotal >> kNumMoveReducingBits));
- for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
- ProbPrices[i] = UInt32((fabs(lnAll - log(double(i))) / ln2 + kDummyMultMid) * kBitPrice);
- */
-
- /*
- // experimental, slow, solution:
- for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
- {
- const int kCyclesBits = 5;
- const UInt32 kCycles = (1 << kCyclesBits);
-
- UInt32 range = UInt32(-1);
- UInt32 bitCount = 0;
- for (UInt32 j = 0; j < kCycles; j++)
- {
- range >>= (kNumBitModelTotalBits - kNumMoveReducingBits);
- range *= i;
- while(range < (1 << 31))
- {
- range <<= 1;
- bitCount++;
- }
- }
- bitCount <<= kNumBitPriceShiftBits;
- range -= (1 << 31);
- for (int k = kNumBitPriceShiftBits - 1; k >= 0; k--)
- {
- range <<= 1;
- if (range > (1 << 31))
- {
- bitCount += (1 << k);
- range -= (1 << 31);
- }
- }
- ProbPrices[i] = (bitCount
- // + (1 << (kCyclesBits - 1))
- ) >> kCyclesBits;
- }
- */
-}
-
-}}
+/*
+ * RangeCoderBit.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "RangeCoderBit.h"
+
+namespace NCompress {
+namespace NRangeCoder {
+
+UInt32 CPriceTables::ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
+static CPriceTables g_PriceTables;
+
+CPriceTables::CPriceTables() { Init(); }
+
+void CPriceTables::Init()
+{
+ const int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits);
+ for(int i = kNumBits - 1; i >= 0; i--)
+ {
+ UInt32 start = 1 << (kNumBits - i - 1);
+ UInt32 end = 1 << (kNumBits - i);
+ for (UInt32 j = start; j < end; j++)
+ ProbPrices[j] = (i << kNumBitPriceShiftBits) +
+ (((end - j) << kNumBitPriceShiftBits) >> (kNumBits - i - 1));
+ }
+
+ /*
+ // simplest: bad solution
+ for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
+ ProbPrices[i] = kBitPrice;
+ */
+
+ /*
+ const double kDummyMultMid = (1.0 / kBitPrice) / 2;
+ const double kDummyMultMid = 0;
+ // float solution
+ double ln2 = log(double(2));
+ double lnAll = log(double(kBitModelTotal >> kNumMoveReducingBits));
+ for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
+ ProbPrices[i] = UInt32((fabs(lnAll - log(double(i))) / ln2 + kDummyMultMid) * kBitPrice);
+ */
+
+ /*
+ // experimental, slow, solution:
+ for(UInt32 i = 1; i < (kBitModelTotal >> kNumMoveReducingBits) - 1; i++)
+ {
+ const int kCyclesBits = 5;
+ const UInt32 kCycles = (1 << kCyclesBits);
+
+ UInt32 range = UInt32(-1);
+ UInt32 bitCount = 0;
+ for (UInt32 j = 0; j < kCycles; j++)
+ {
+ range >>= (kNumBitModelTotalBits - kNumMoveReducingBits);
+ range *= i;
+ while(range < (1 << 31))
+ {
+ range <<= 1;
+ bitCount++;
+ }
+ }
+ bitCount <<= kNumBitPriceShiftBits;
+ range -= (1 << 31);
+ for (int k = kNumBitPriceShiftBits - 1; k >= 0; k--)
+ {
+ range <<= 1;
+ if (range > (1 << 31))
+ {
+ bitCount += (1 << k);
+ range -= (1 << 31);
+ }
+ }
+ ProbPrices[i] = (bitCount
+ // + (1 << (kCyclesBits - 1))
+ ) >> kCyclesBits;
+ }
+ */
+}
+
+}}
diff --git a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h
index e2e7902..366abbc 100755
--- a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h
+++ b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBit.h
@@ -1,135 +1,135 @@
-/*
- * RangeCoderBit.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_BIT_H
-#define __COMPRESS_RANGECODER_BIT_H
-
-#include "RangeCoder.h"
-
-namespace NCompress {
-namespace NRangeCoder {
-
-const int kNumBitModelTotalBits = 11;
-const UInt32 kBitModelTotal = (1 << kNumBitModelTotalBits);
-
-const int kNumMoveReducingBits = 2;
-
-const int kNumBitPriceShiftBits = 6;
-const UInt32 kBitPrice = 1 << kNumBitPriceShiftBits;
-
-class CPriceTables
-{
-public:
- static UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
- static void Init();
- CPriceTables();
-};
-
-template <int numMoveBits>
-class CBitModel
-{
-public:
- UInt32 Prob;
- void UpdateModel(UInt32 symbol)
- {
- /*
- Prob -= (Prob + ((symbol - 1) & ((1 << numMoveBits) - 1))) >> numMoveBits;
- Prob += (1 - symbol) << (kNumBitModelTotalBits - numMoveBits);
- */
- if (symbol == 0)
- Prob += (kBitModelTotal - Prob) >> numMoveBits;
- else
- Prob -= (Prob) >> numMoveBits;
- }
-public:
- void Init() { Prob = kBitModelTotal / 2; }
-};
-
-template <int numMoveBits>
-class CBitEncoder: public CBitModel<numMoveBits>
-{
-public:
- void Encode(CEncoder *encoder, UInt32 symbol)
- {
- /*
- encoder->EncodeBit(this->Prob, kNumBitModelTotalBits, symbol);
- this->UpdateModel(symbol);
- */
- UInt32 newBound = (encoder->Range >> kNumBitModelTotalBits) * this->Prob;
- if (symbol == 0)
- {
- encoder->Range = newBound;
- this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
- }
- else
- {
- encoder->Low += newBound;
- encoder->Range -= newBound;
- this->Prob -= (this->Prob) >> numMoveBits;
- }
- if (encoder->Range < kTopValue)
- {
- encoder->Range <<= 8;
- encoder->ShiftLow();
- }
- }
- UInt32 GetPrice(UInt32 symbol) const
- {
- return CPriceTables::ProbPrices[
- (((this->Prob - symbol) ^ ((-(int)symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
- }
- UInt32 GetPrice0() const { return CPriceTables::ProbPrices[this->Prob >> kNumMoveReducingBits]; }
- UInt32 GetPrice1() const { return CPriceTables::ProbPrices[(kBitModelTotal - this->Prob) >> kNumMoveReducingBits]; }
-};
-
-
-template <int numMoveBits>
-class CBitDecoder: public CBitModel<numMoveBits>
-{
-public:
- UInt32 Decode(CDecoder *decoder)
- {
- UInt32 newBound = (decoder->Range >> kNumBitModelTotalBits) * this->Prob;
- if (decoder->Code < newBound)
- {
- decoder->Range = newBound;
- this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
- if (decoder->Range < kTopValue)
- {
- decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
- decoder->Range <<= 8;
- }
- return 0;
- }
- else
- {
- decoder->Range -= newBound;
- decoder->Code -= newBound;
- this->Prob -= (this->Prob) >> numMoveBits;
- if (decoder->Range < kTopValue)
- {
- decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
- decoder->Range <<= 8;
- }
- return 1;
- }
- }
-};
-
-}}
-
-#endif
+/*
+ * RangeCoderBit.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_BIT_H
+#define __COMPRESS_RANGECODER_BIT_H
+
+#include "RangeCoder.h"
+
+namespace NCompress {
+namespace NRangeCoder {
+
+const int kNumBitModelTotalBits = 11;
+const UInt32 kBitModelTotal = (1 << kNumBitModelTotalBits);
+
+const int kNumMoveReducingBits = 2;
+
+const int kNumBitPriceShiftBits = 6;
+const UInt32 kBitPrice = 1 << kNumBitPriceShiftBits;
+
+class CPriceTables
+{
+public:
+ static UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits];
+ static void Init();
+ CPriceTables();
+};
+
+template <int numMoveBits>
+class CBitModel
+{
+public:
+ UInt32 Prob;
+ void UpdateModel(UInt32 symbol)
+ {
+ /*
+ Prob -= (Prob + ((symbol - 1) & ((1 << numMoveBits) - 1))) >> numMoveBits;
+ Prob += (1 - symbol) << (kNumBitModelTotalBits - numMoveBits);
+ */
+ if (symbol == 0)
+ Prob += (kBitModelTotal - Prob) >> numMoveBits;
+ else
+ Prob -= (Prob) >> numMoveBits;
+ }
+public:
+ void Init() { Prob = kBitModelTotal / 2; }
+};
+
+template <int numMoveBits>
+class CBitEncoder: public CBitModel<numMoveBits>
+{
+public:
+ void Encode(CEncoder *encoder, UInt32 symbol)
+ {
+ /*
+ encoder->EncodeBit(this->Prob, kNumBitModelTotalBits, symbol);
+ this->UpdateModel(symbol);
+ */
+ UInt32 newBound = (encoder->Range >> kNumBitModelTotalBits) * this->Prob;
+ if (symbol == 0)
+ {
+ encoder->Range = newBound;
+ this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
+ }
+ else
+ {
+ encoder->Low += newBound;
+ encoder->Range -= newBound;
+ this->Prob -= (this->Prob) >> numMoveBits;
+ }
+ if (encoder->Range < kTopValue)
+ {
+ encoder->Range <<= 8;
+ encoder->ShiftLow();
+ }
+ }
+ UInt32 GetPrice(UInt32 symbol) const
+ {
+ return CPriceTables::ProbPrices[
+ (((this->Prob - symbol) ^ ((-(int)symbol))) & (kBitModelTotal - 1)) >> kNumMoveReducingBits];
+ }
+ UInt32 GetPrice0() const { return CPriceTables::ProbPrices[this->Prob >> kNumMoveReducingBits]; }
+ UInt32 GetPrice1() const { return CPriceTables::ProbPrices[(kBitModelTotal - this->Prob) >> kNumMoveReducingBits]; }
+};
+
+
+template <int numMoveBits>
+class CBitDecoder: public CBitModel<numMoveBits>
+{
+public:
+ UInt32 Decode(CDecoder *decoder)
+ {
+ UInt32 newBound = (decoder->Range >> kNumBitModelTotalBits) * this->Prob;
+ if (decoder->Code < newBound)
+ {
+ decoder->Range = newBound;
+ this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits;
+ if (decoder->Range < kTopValue)
+ {
+ decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
+ decoder->Range <<= 8;
+ }
+ return 0;
+ }
+ else
+ {
+ decoder->Range -= newBound;
+ decoder->Code -= newBound;
+ this->Prob -= (this->Prob) >> numMoveBits;
+ if (decoder->Range < kTopValue)
+ {
+ decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte();
+ decoder->Range <<= 8;
+ }
+ return 1;
+ }
+ }
+};
+
+}}
+
+#endif
diff --git a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h
index cd8ae5a..126f6f0 100755
--- a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h
+++ b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderBitTree.h
@@ -1,176 +1,176 @@
-/*
- * RangeCoderBitTree.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_BIT_TREE_H
-#define __COMPRESS_RANGECODER_BIT_TREE_H
-
-#include "RangeCoderBit.h"
-#include "RangeCoderOpt.h"
-
-namespace NCompress {
-namespace NRangeCoder {
-
-template <int numMoveBits, int NumBitLevels>
-class CBitTreeEncoder
-{
- CBitEncoder<numMoveBits> Models[1 << NumBitLevels];
-public:
- void Init()
- {
- for(UInt32 i = 1; i < (1 << NumBitLevels); i++)
- Models[i].Init();
- }
- void Encode(CEncoder *rangeEncoder, UInt32 symbol)
- {
- UInt32 modelIndex = 1;
- for (int bitIndex = NumBitLevels; bitIndex != 0 ;)
- {
- bitIndex--;
- UInt32 bit = (symbol >> bitIndex) & 1;
- Models[modelIndex].Encode(rangeEncoder, bit);
- modelIndex = (modelIndex << 1) | bit;
- }
- };
- void ReverseEncode(CEncoder *rangeEncoder, UInt32 symbol)
- {
- UInt32 modelIndex = 1;
- for (int i = 0; i < NumBitLevels; i++)
- {
- UInt32 bit = symbol & 1;
- Models[modelIndex].Encode(rangeEncoder, bit);
- modelIndex = (modelIndex << 1) | bit;
- symbol >>= 1;
- }
- }
- UInt32 GetPrice(UInt32 symbol) const
- {
- symbol |= (1 << NumBitLevels);
- UInt32 price = 0;
- while (symbol != 1)
- {
- price += Models[symbol >> 1].GetPrice(symbol & 1);
- symbol >>= 1;
- }
- return price;
- }
- UInt32 ReverseGetPrice(UInt32 symbol) const
- {
- UInt32 price = 0;
- UInt32 modelIndex = 1;
- for (int i = NumBitLevels; i != 0; i--)
- {
- UInt32 bit = symbol & 1;
- symbol >>= 1;
- price += Models[modelIndex].GetPrice(bit);
- modelIndex = (modelIndex << 1) | bit;
- }
- return price;
- }
-};
-
-template <int numMoveBits, int NumBitLevels>
-class CBitTreeDecoder
-{
- CBitDecoder<numMoveBits> Models[1 << NumBitLevels];
-public:
- void Init()
- {
- for(UInt32 i = 1; i < (1 << NumBitLevels); i++)
- Models[i].Init();
- }
- UInt32 Decode(CDecoder *rangeDecoder)
- {
- UInt32 modelIndex = 1;
- RC_INIT_VAR
- for(int bitIndex = NumBitLevels; bitIndex != 0; bitIndex--)
- {
- // modelIndex = (modelIndex << 1) + Models[modelIndex].Decode(rangeDecoder);
- RC_GETBIT(numMoveBits, Models[modelIndex].Prob, modelIndex)
- }
- RC_FLUSH_VAR
- return modelIndex - (1 << NumBitLevels);
- };
- UInt32 ReverseDecode(CDecoder *rangeDecoder)
- {
- UInt32 modelIndex = 1;
- UInt32 symbol = 0;
- RC_INIT_VAR
- for(int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
- {
- // UInt32 bit = Models[modelIndex].Decode(rangeDecoder);
- // modelIndex <<= 1;
- // modelIndex += bit;
- // symbol |= (bit << bitIndex);
- RC_GETBIT2(numMoveBits, Models[modelIndex].Prob, modelIndex, ; , symbol |= (1 << bitIndex))
- }
- RC_FLUSH_VAR
- return symbol;
- }
-};
-
-template <int numMoveBits>
-void ReverseBitTreeEncode(CBitEncoder<numMoveBits> *Models,
- CEncoder *rangeEncoder, int NumBitLevels, UInt32 symbol)
-{
- UInt32 modelIndex = 1;
- for (int i = 0; i < NumBitLevels; i++)
- {
- UInt32 bit = symbol & 1;
- Models[modelIndex].Encode(rangeEncoder, bit);
- modelIndex = (modelIndex << 1) | bit;
- symbol >>= 1;
- }
-}
-
-template <int numMoveBits>
-UInt32 ReverseBitTreeGetPrice(CBitEncoder<numMoveBits> *Models,
- UInt32 NumBitLevels, UInt32 symbol)
-{
- UInt32 price = 0;
- UInt32 modelIndex = 1;
- for (int i = NumBitLevels; i != 0; i--)
- {
- UInt32 bit = symbol & 1;
- symbol >>= 1;
- price += Models[modelIndex].GetPrice(bit);
- modelIndex = (modelIndex << 1) | bit;
- }
- return price;
-}
-
-template <int numMoveBits>
-UInt32 ReverseBitTreeDecode(CBitDecoder<numMoveBits> *Models,
- CDecoder *rangeDecoder, int NumBitLevels)
-{
- UInt32 modelIndex = 1;
- UInt32 symbol = 0;
- RC_INIT_VAR
- for(int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
- {
- // UInt32 bit = Models[modelIndex].Decode(rangeDecoder);
- // modelIndex <<= 1;
- // modelIndex += bit;
- // symbol |= (bit << bitIndex);
- RC_GETBIT2(numMoveBits, Models[modelIndex].Prob, modelIndex, ; , symbol |= (1 << bitIndex))
- }
- RC_FLUSH_VAR
- return symbol;
-}
-
-}}
-
-#endif
+/*
+ * RangeCoderBitTree.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_BIT_TREE_H
+#define __COMPRESS_RANGECODER_BIT_TREE_H
+
+#include "RangeCoderBit.h"
+#include "RangeCoderOpt.h"
+
+namespace NCompress {
+namespace NRangeCoder {
+
+template <int numMoveBits, int NumBitLevels>
+class CBitTreeEncoder
+{
+ CBitEncoder<numMoveBits> Models[1 << NumBitLevels];
+public:
+ void Init()
+ {
+ for(UInt32 i = 1; i < (1 << NumBitLevels); i++)
+ Models[i].Init();
+ }
+ void Encode(CEncoder *rangeEncoder, UInt32 symbol)
+ {
+ UInt32 modelIndex = 1;
+ for (int bitIndex = NumBitLevels; bitIndex != 0 ;)
+ {
+ bitIndex--;
+ UInt32 bit = (symbol >> bitIndex) & 1;
+ Models[modelIndex].Encode(rangeEncoder, bit);
+ modelIndex = (modelIndex << 1) | bit;
+ }
+ };
+ void ReverseEncode(CEncoder *rangeEncoder, UInt32 symbol)
+ {
+ UInt32 modelIndex = 1;
+ for (int i = 0; i < NumBitLevels; i++)
+ {
+ UInt32 bit = symbol & 1;
+ Models[modelIndex].Encode(rangeEncoder, bit);
+ modelIndex = (modelIndex << 1) | bit;
+ symbol >>= 1;
+ }
+ }
+ UInt32 GetPrice(UInt32 symbol) const
+ {
+ symbol |= (1 << NumBitLevels);
+ UInt32 price = 0;
+ while (symbol != 1)
+ {
+ price += Models[symbol >> 1].GetPrice(symbol & 1);
+ symbol >>= 1;
+ }
+ return price;
+ }
+ UInt32 ReverseGetPrice(UInt32 symbol) const
+ {
+ UInt32 price = 0;
+ UInt32 modelIndex = 1;
+ for (int i = NumBitLevels; i != 0; i--)
+ {
+ UInt32 bit = symbol & 1;
+ symbol >>= 1;
+ price += Models[modelIndex].GetPrice(bit);
+ modelIndex = (modelIndex << 1) | bit;
+ }
+ return price;
+ }
+};
+
+template <int numMoveBits, int NumBitLevels>
+class CBitTreeDecoder
+{
+ CBitDecoder<numMoveBits> Models[1 << NumBitLevels];
+public:
+ void Init()
+ {
+ for(UInt32 i = 1; i < (1 << NumBitLevels); i++)
+ Models[i].Init();
+ }
+ UInt32 Decode(CDecoder *rangeDecoder)
+ {
+ UInt32 modelIndex = 1;
+ RC_INIT_VAR
+ for(int bitIndex = NumBitLevels; bitIndex != 0; bitIndex--)
+ {
+ // modelIndex = (modelIndex << 1) + Models[modelIndex].Decode(rangeDecoder);
+ RC_GETBIT(numMoveBits, Models[modelIndex].Prob, modelIndex)
+ }
+ RC_FLUSH_VAR
+ return modelIndex - (1 << NumBitLevels);
+ };
+ UInt32 ReverseDecode(CDecoder *rangeDecoder)
+ {
+ UInt32 modelIndex = 1;
+ UInt32 symbol = 0;
+ RC_INIT_VAR
+ for(int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
+ {
+ // UInt32 bit = Models[modelIndex].Decode(rangeDecoder);
+ // modelIndex <<= 1;
+ // modelIndex += bit;
+ // symbol |= (bit << bitIndex);
+ RC_GETBIT2(numMoveBits, Models[modelIndex].Prob, modelIndex, ; , symbol |= (1 << bitIndex))
+ }
+ RC_FLUSH_VAR
+ return symbol;
+ }
+};
+
+template <int numMoveBits>
+void ReverseBitTreeEncode(CBitEncoder<numMoveBits> *Models,
+ CEncoder *rangeEncoder, int NumBitLevels, UInt32 symbol)
+{
+ UInt32 modelIndex = 1;
+ for (int i = 0; i < NumBitLevels; i++)
+ {
+ UInt32 bit = symbol & 1;
+ Models[modelIndex].Encode(rangeEncoder, bit);
+ modelIndex = (modelIndex << 1) | bit;
+ symbol >>= 1;
+ }
+}
+
+template <int numMoveBits>
+UInt32 ReverseBitTreeGetPrice(CBitEncoder<numMoveBits> *Models,
+ UInt32 NumBitLevels, UInt32 symbol)
+{
+ UInt32 price = 0;
+ UInt32 modelIndex = 1;
+ for (int i = NumBitLevels; i != 0; i--)
+ {
+ UInt32 bit = symbol & 1;
+ symbol >>= 1;
+ price += Models[modelIndex].GetPrice(bit);
+ modelIndex = (modelIndex << 1) | bit;
+ }
+ return price;
+}
+
+template <int numMoveBits>
+UInt32 ReverseBitTreeDecode(CBitDecoder<numMoveBits> *Models,
+ CDecoder *rangeDecoder, int NumBitLevels)
+{
+ UInt32 modelIndex = 1;
+ UInt32 symbol = 0;
+ RC_INIT_VAR
+ for(int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)
+ {
+ // UInt32 bit = Models[modelIndex].Decode(rangeDecoder);
+ // modelIndex <<= 1;
+ // modelIndex += bit;
+ // symbol |= (bit << bitIndex);
+ RC_GETBIT2(numMoveBits, Models[modelIndex].Prob, modelIndex, ; , symbol |= (1 << bitIndex))
+ }
+ RC_FLUSH_VAR
+ return symbol;
+}
+
+}}
+
+#endif
diff --git a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h
index 4b59e82..e3ec84c 100755
--- a/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h
+++ b/Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h
@@ -1,46 +1,46 @@
-/*
- * RangeCoderOpt.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_OPT_H
-#define __COMPRESS_RANGECODER_OPT_H
-
-#define RC_INIT_VAR \
- UInt32 range = rangeDecoder->Range; \
- UInt32 code = rangeDecoder->Code;
-
-#define RC_FLUSH_VAR \
- rangeDecoder->Range = range; \
- rangeDecoder->Code = code;
-
-#define RC_NORMALIZE \
- if (range < NCompress::NRangeCoder::kTopValue) \
- { code = (code << 8) | rangeDecoder->Stream.ReadByte(); range <<= 8; }
-
-#define RC_GETBIT2(numMoveBits, prob, mi, A0, A1) \
- { UInt32 bound = (range >> NCompress::NRangeCoder::kNumBitModelTotalBits) * prob; \
- if (code < bound) \
- { A0; range = bound; \
- prob += (NCompress::NRangeCoder::kBitModelTotal - prob) >> numMoveBits; \
- mi <<= 1; } \
- else \
- { A1; range -= bound; code -= bound; prob -= (prob) >> numMoveBits; \
- mi = (mi + mi) + 1; }} \
- RC_NORMALIZE
-
-#define RC_GETBIT(numMoveBits, prob, mi) RC_GETBIT2(numMoveBits, prob, mi, ; , ;)
-
-#endif
+/*
+ * RangeCoderOpt.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMPRESS_RANGECODER_OPT_H
+#define __COMPRESS_RANGECODER_OPT_H
+
+#define RC_INIT_VAR \
+ UInt32 range = rangeDecoder->Range; \
+ UInt32 code = rangeDecoder->Code;
+
+#define RC_FLUSH_VAR \
+ rangeDecoder->Range = range; \
+ rangeDecoder->Code = code;
+
+#define RC_NORMALIZE \
+ if (range < NCompress::NRangeCoder::kTopValue) \
+ { code = (code << 8) | rangeDecoder->Stream.ReadByte(); range <<= 8; }
+
+#define RC_GETBIT2(numMoveBits, prob, mi, A0, A1) \
+ { UInt32 bound = (range >> NCompress::NRangeCoder::kNumBitModelTotalBits) * prob; \
+ if (code < bound) \
+ { A0; range = bound; \
+ prob += (NCompress::NRangeCoder::kBitModelTotal - prob) >> numMoveBits; \
+ mi <<= 1; } \
+ else \
+ { A1; range -= bound; code -= bound; prob -= (prob) >> numMoveBits; \
+ mi = (mi + mi) + 1; }} \
+ RC_NORMALIZE
+
+#define RC_GETBIT(numMoveBits, prob, mi) RC_GETBIT2(numMoveBits, prob, mi, ; , ;)
+
+#endif
diff --git a/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h b/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h
index 21c2fd7..b637fd4 100755
--- a/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h
+++ b/Source/7zip/7zip/Compress/RangeCoder/StdAfx.h
@@ -1,6 +1,6 @@
-// StdAfx.h
-
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#endif
+// StdAfx.h
+
+#ifndef __STDAFX_H
+#define __STDAFX_H
+
+#endif
diff --git a/Source/7zip/7zip/ICoder.h b/Source/7zip/7zip/ICoder.h
index a0e93e4..7e90f2c 100755
--- a/Source/7zip/7zip/ICoder.h
+++ b/Source/7zip/7zip/ICoder.h
@@ -1,178 +1,178 @@
-/*
- * ICoder.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __ICODER_H
-#define __ICODER_H
-
-#include "IStream.h"
-
-// "23170F69-40C1-278A-0000-000400xx0000"
-#define CODER_INTERFACE(i, x) \
-DEFINE_GUID(IID_ ## i, \
-0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, x, 0x00, 0x00); \
-struct i: public IUnknown
-
-CODER_INTERFACE(ICompressProgressInfo, 0x04)
-{
- STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
-};
-
-CODER_INTERFACE(ICompressCoder, 0x05)
-{
- STDMETHOD(Code)(ISequentialInStream *inStream,
- ISequentialOutStream *outStream,
- const UInt64 *inSize,
- const UInt64 *outSize,
- ICompressProgressInfo *progress) PURE;
-};
-
-CODER_INTERFACE(ICompressCoder2, 0x18)
-{
- STDMETHOD(Code)(ISequentialInStream **inStreams,
- const UInt64 **inSizes,
- UInt32 numInStreams,
- ISequentialOutStream **outStreams,
- const UInt64 **outSizes,
- UInt32 numOutStreams,
- ICompressProgressInfo *progress) PURE;
-};
-
-namespace NCoderPropID
-{
- enum EEnum
- {
- kDictionarySize = 0x400,
- kUsedMemorySize,
- kOrder,
- kPosStateBits = 0x440,
- kLitContextBits,
- kLitPosBits,
- kNumFastBytes = 0x450,
- kMatchFinder,
- kMatchFinderCycles,
- kNumPasses = 0x460,
- kAlgorithm = 0x470,
- kMultiThread = 0x480,
- kNumThreads,
- kEndMarker = 0x490
- };
-}
-
-CODER_INTERFACE(ICompressSetCoderProperties, 0x20)
-{
- STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
- const PROPVARIANT *properties, UInt32 numProperties) PURE;
-};
-
-/*
-CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
-{
- STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
-};
-*/
-
-CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22)
-{
- STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
-};
-
-CODER_INTERFACE(ICompressWriteCoderProperties, 0x23)
-{
- STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE;
-};
-
-CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24)
-{
- STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE;
-};
-
-CODER_INTERFACE(ICompressSetCoderMt, 0x25)
-{
- STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE;
-};
-
-CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
-{
- STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
-};
-
-CODER_INTERFACE(ICompressSetInStream, 0x31)
-{
- STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
- STDMETHOD(ReleaseInStream)() PURE;
-};
-
-CODER_INTERFACE(ICompressSetOutStream, 0x32)
-{
- STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
- STDMETHOD(ReleaseOutStream)() PURE;
-};
-
-CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
-{
- STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
-};
-
-CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
-{
- STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
-};
-
-CODER_INTERFACE(ICompressFilter, 0x40)
-{
- STDMETHOD(Init)() PURE;
- STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
- // Filter return outSize (UInt32)
- // if (outSize <= size): Filter have converted outSize bytes
- // if (outSize > size): Filter have not converted anything.
- // and it needs at least outSize bytes to convert one block
- // (it's for crypto block algorithms).
-};
-
-CODER_INTERFACE(ICryptoProperties, 0x80)
-{
- STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
- STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
-};
-
-CODER_INTERFACE(ICryptoSetPassword, 0x90)
-{
- STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE;
-};
-
-CODER_INTERFACE(ICryptoSetCRC, 0xA0)
-{
- STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
-};
-
-//////////////////////
-// It's for DLL file
-namespace NMethodPropID
-{
- enum EEnum
- {
- kID,
- kName,
- kDecoder,
- kEncoder,
- kInStreams,
- kOutStreams,
- kDescription
- };
-}
-
-#endif
+/*
+ * ICoder.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __ICODER_H
+#define __ICODER_H
+
+#include "IStream.h"
+
+// "23170F69-40C1-278A-0000-000400xx0000"
+#define CODER_INTERFACE(i, x) \
+DEFINE_GUID(IID_ ## i, \
+0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x04, 0x00, x, 0x00, 0x00); \
+struct i: public IUnknown
+
+CODER_INTERFACE(ICompressProgressInfo, 0x04)
+{
+ STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE;
+};
+
+CODER_INTERFACE(ICompressCoder, 0x05)
+{
+ STDMETHOD(Code)(ISequentialInStream *inStream,
+ ISequentialOutStream *outStream,
+ const UInt64 *inSize,
+ const UInt64 *outSize,
+ ICompressProgressInfo *progress) PURE;
+};
+
+CODER_INTERFACE(ICompressCoder2, 0x18)
+{
+ STDMETHOD(Code)(ISequentialInStream **inStreams,
+ const UInt64 **inSizes,
+ UInt32 numInStreams,
+ ISequentialOutStream **outStreams,
+ const UInt64 **outSizes,
+ UInt32 numOutStreams,
+ ICompressProgressInfo *progress) PURE;
+};
+
+namespace NCoderPropID
+{
+ enum EEnum
+ {
+ kDictionarySize = 0x400,
+ kUsedMemorySize,
+ kOrder,
+ kPosStateBits = 0x440,
+ kLitContextBits,
+ kLitPosBits,
+ kNumFastBytes = 0x450,
+ kMatchFinder,
+ kMatchFinderCycles,
+ kNumPasses = 0x460,
+ kAlgorithm = 0x470,
+ kMultiThread = 0x480,
+ kNumThreads,
+ kEndMarker = 0x490
+ };
+}
+
+CODER_INTERFACE(ICompressSetCoderProperties, 0x20)
+{
+ STDMETHOD(SetCoderProperties)(const PROPID *propIDs,
+ const PROPVARIANT *properties, UInt32 numProperties) PURE;
+};
+
+/*
+CODER_INTERFACE(ICompressSetCoderProperties, 0x21)
+{
+ STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE;
+};
+*/
+
+CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22)
+{
+ STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE;
+};
+
+CODER_INTERFACE(ICompressWriteCoderProperties, 0x23)
+{
+ STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStreams) PURE;
+};
+
+CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24)
+{
+ STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE;
+};
+
+CODER_INTERFACE(ICompressSetCoderMt, 0x25)
+{
+ STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE;
+};
+
+CODER_INTERFACE(ICompressGetSubStreamSize, 0x30)
+{
+ STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE;
+};
+
+CODER_INTERFACE(ICompressSetInStream, 0x31)
+{
+ STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE;
+ STDMETHOD(ReleaseInStream)() PURE;
+};
+
+CODER_INTERFACE(ICompressSetOutStream, 0x32)
+{
+ STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE;
+ STDMETHOD(ReleaseOutStream)() PURE;
+};
+
+CODER_INTERFACE(ICompressSetInStreamSize, 0x33)
+{
+ STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE;
+};
+
+CODER_INTERFACE(ICompressSetOutStreamSize, 0x34)
+{
+ STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE;
+};
+
+CODER_INTERFACE(ICompressFilter, 0x40)
+{
+ STDMETHOD(Init)() PURE;
+ STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE;
+ // Filter return outSize (UInt32)
+ // if (outSize <= size): Filter have converted outSize bytes
+ // if (outSize > size): Filter have not converted anything.
+ // and it needs at least outSize bytes to convert one block
+ // (it's for crypto block algorithms).
+};
+
+CODER_INTERFACE(ICryptoProperties, 0x80)
+{
+ STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE;
+ STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE;
+};
+
+CODER_INTERFACE(ICryptoSetPassword, 0x90)
+{
+ STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE;
+};
+
+CODER_INTERFACE(ICryptoSetCRC, 0xA0)
+{
+ STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE;
+};
+
+//////////////////////
+// It's for DLL file
+namespace NMethodPropID
+{
+ enum EEnum
+ {
+ kID,
+ kName,
+ kDecoder,
+ kEncoder,
+ kInStreams,
+ kOutStreams,
+ kDescription
+ };
+}
+
+#endif
diff --git a/Source/7zip/7zip/IStream.h b/Source/7zip/7zip/IStream.h
index 62f6060..3c6d56f 100755
--- a/Source/7zip/7zip/IStream.h
+++ b/Source/7zip/7zip/IStream.h
@@ -1,77 +1,77 @@
-/*
- * IStream.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __ISTREAM_H
-#define __ISTREAM_H
-
-#include "../Common/MyUnknown.h"
-#include "../Common/Types.h"
-
-// "23170F69-40C1-278A-0000-000300xx0000"
-
-#define STREAM_INTERFACE_SUB(i, b, x) \
-DEFINE_GUID(IID_ ## i, \
-0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, x, 0x00, 0x00); \
-struct i: public b
-
-#define STREAM_INTERFACE(i, x) STREAM_INTERFACE_SUB(i, IUnknown, x)
-
-STREAM_INTERFACE(ISequentialInStream, 0x01)
-{
- STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) PURE;
- /*
- Out: if size != 0, return_value = S_OK and (*processedSize == 0),
- then there are no more bytes in stream.
- if (size > 0) && there are bytes in stream,
- this function must read at least 1 byte.
- This function is allowed to read less than number of remaining bytes in stream.
- You must call Read function in loop, if you need exact amount of data
- */
-};
-
-STREAM_INTERFACE(ISequentialOutStream, 0x02)
-{
- STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) PURE;
- /*
- if (size > 0) this function must write at least 1 byte.
- This function is allowed to write less than "size".
- You must call Write function in loop, if you need to write exact amount of data
- */
-};
-
-STREAM_INTERFACE_SUB(IInStream, ISequentialInStream, 0x03)
-{
- STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
-};
-
-STREAM_INTERFACE_SUB(IOutStream, ISequentialOutStream, 0x04)
-{
- STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
- STDMETHOD(SetSize)(Int64 newSize) PURE;
-};
-
-STREAM_INTERFACE(IStreamGetSize, 0x06)
-{
- STDMETHOD(GetSize)(UInt64 *size) PURE;
-};
-
-STREAM_INTERFACE(IOutStreamFlush, 0x07)
-{
- STDMETHOD(Flush)() PURE;
-};
-
-#endif
+/*
+ * IStream.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __ISTREAM_H
+#define __ISTREAM_H
+
+#include "../Common/MyUnknown.h"
+#include "../Common/Types.h"
+
+// "23170F69-40C1-278A-0000-000300xx0000"
+
+#define STREAM_INTERFACE_SUB(i, b, x) \
+DEFINE_GUID(IID_ ## i, \
+0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x03, 0x00, x, 0x00, 0x00); \
+struct i: public b
+
+#define STREAM_INTERFACE(i, x) STREAM_INTERFACE_SUB(i, IUnknown, x)
+
+STREAM_INTERFACE(ISequentialInStream, 0x01)
+{
+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) PURE;
+ /*
+ Out: if size != 0, return_value = S_OK and (*processedSize == 0),
+ then there are no more bytes in stream.
+ if (size > 0) && there are bytes in stream,
+ this function must read at least 1 byte.
+ This function is allowed to read less than number of remaining bytes in stream.
+ You must call Read function in loop, if you need exact amount of data
+ */
+};
+
+STREAM_INTERFACE(ISequentialOutStream, 0x02)
+{
+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) PURE;
+ /*
+ if (size > 0) this function must write at least 1 byte.
+ This function is allowed to write less than "size".
+ You must call Write function in loop, if you need to write exact amount of data
+ */
+};
+
+STREAM_INTERFACE_SUB(IInStream, ISequentialInStream, 0x03)
+{
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
+};
+
+STREAM_INTERFACE_SUB(IOutStream, ISequentialOutStream, 0x04)
+{
+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE;
+ STDMETHOD(SetSize)(Int64 newSize) PURE;
+};
+
+STREAM_INTERFACE(IStreamGetSize, 0x06)
+{
+ STDMETHOD(GetSize)(UInt64 *size) PURE;
+};
+
+STREAM_INTERFACE(IOutStreamFlush, 0x07)
+{
+ STDMETHOD(Flush)() PURE;
+};
+
+#endif
diff --git a/Source/7zip/Common/Alloc.cpp b/Source/7zip/Common/Alloc.cpp
index 2898c6d..9ac1946 100755
--- a/Source/7zip/Common/Alloc.cpp
+++ b/Source/7zip/Common/Alloc.cpp
@@ -1,133 +1,133 @@
-/*
- * Alloc.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#ifdef _WIN32
-#include "MyWindows.h"
-#else
-#include <stdlib.h>
-#endif
-
-#include "Alloc.h"
-
-/* #define _SZ_ALLOC_DEBUG */
-/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
-#ifdef _SZ_ALLOC_DEBUG
-#include <stdio.h>
-int g_allocCount = 0;
-int g_allocCountMid = 0;
-int g_allocCountBig = 0;
-#endif
-
-void *MyAlloc(size_t size) throw()
-{
- if (size == 0)
- return 0;
- #ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount++);
- #endif
- return ::malloc(size);
-}
-
-void MyFree(void *address) throw()
-{
- #ifdef _SZ_ALLOC_DEBUG
- if (address != 0)
- fprintf(stderr, "\nFree; count = %10d", --g_allocCount);
- #endif
-
- ::free(address);
-}
-
-#ifdef _WIN32
-
-void *MidAlloc(size_t size) throw()
-{
- if (size == 0)
- return 0;
- #ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
- #endif
- return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
-}
-
-void MidFree(void *address) throw()
-{
- #ifdef _SZ_ALLOC_DEBUG
- if (address != 0)
- fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
- #endif
- if (address == 0)
- return;
- ::VirtualFree(address, 0, MEM_RELEASE);
-}
-
-static SIZE_T g_LargePageSize =
- #ifdef _WIN64
- (1 << 21);
- #else
- (1 << 22);
- #endif
-
-typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
-
-bool SetLargePageSize()
-{
- GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
- ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
- if (largePageMinimum == 0)
- return false;
- SIZE_T size = largePageMinimum();
- if (size == 0 || (size & (size - 1)) != 0)
- return false;
- g_LargePageSize = size;
- return true;
-}
-
-
-void *BigAlloc(size_t size) throw()
-{
- if (size == 0)
- return 0;
- #ifdef _SZ_ALLOC_DEBUG
- fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
- #endif
-
- if (size >= (1 << 18))
- {
- void *res = ::VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
- MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE);
- if (res != 0)
- return res;
- }
- return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
-}
-
-void BigFree(void *address) throw()
-{
- #ifdef _SZ_ALLOC_DEBUG
- if (address != 0)
- fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
- #endif
-
- if (address == 0)
- return;
- ::VirtualFree(address, 0, MEM_RELEASE);
-}
-
-#endif
+/*
+ * Alloc.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#ifdef _WIN32
+#include "MyWindows.h"
+#else
+#include <stdlib.h>
+#endif
+
+#include "Alloc.h"
+
+/* #define _SZ_ALLOC_DEBUG */
+/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
+#ifdef _SZ_ALLOC_DEBUG
+#include <stdio.h>
+int g_allocCount = 0;
+int g_allocCountMid = 0;
+int g_allocCountBig = 0;
+#endif
+
+void *MyAlloc(size_t size) throw()
+{
+ if (size == 0)
+ return 0;
+ #ifdef _SZ_ALLOC_DEBUG
+ fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount++);
+ #endif
+ return ::malloc(size);
+}
+
+void MyFree(void *address) throw()
+{
+ #ifdef _SZ_ALLOC_DEBUG
+ if (address != 0)
+ fprintf(stderr, "\nFree; count = %10d", --g_allocCount);
+ #endif
+
+ ::free(address);
+}
+
+#ifdef _WIN32
+
+void *MidAlloc(size_t size) throw()
+{
+ if (size == 0)
+ return 0;
+ #ifdef _SZ_ALLOC_DEBUG
+ fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
+ #endif
+ return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
+}
+
+void MidFree(void *address) throw()
+{
+ #ifdef _SZ_ALLOC_DEBUG
+ if (address != 0)
+ fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
+ #endif
+ if (address == 0)
+ return;
+ ::VirtualFree(address, 0, MEM_RELEASE);
+}
+
+static SIZE_T g_LargePageSize =
+ #ifdef _WIN64
+ (1 << 21);
+ #else
+ (1 << 22);
+ #endif
+
+typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
+
+bool SetLargePageSize()
+{
+ GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
+ ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
+ if (largePageMinimum == 0)
+ return false;
+ SIZE_T size = largePageMinimum();
+ if (size == 0 || (size & (size - 1)) != 0)
+ return false;
+ g_LargePageSize = size;
+ return true;
+}
+
+
+void *BigAlloc(size_t size) throw()
+{
+ if (size == 0)
+ return 0;
+ #ifdef _SZ_ALLOC_DEBUG
+ fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
+ #endif
+
+ if (size >= (1 << 18))
+ {
+ void *res = ::VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),
+ MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE);
+ if (res != 0)
+ return res;
+ }
+ return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
+}
+
+void BigFree(void *address) throw()
+{
+ #ifdef _SZ_ALLOC_DEBUG
+ if (address != 0)
+ fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
+ #endif
+
+ if (address == 0)
+ return;
+ ::VirtualFree(address, 0, MEM_RELEASE);
+}
+
+#endif
diff --git a/Source/7zip/Common/Alloc.h b/Source/7zip/Common/Alloc.h
index 93705a1..5916ef0 100755
--- a/Source/7zip/Common/Alloc.h
+++ b/Source/7zip/Common/Alloc.h
@@ -1,44 +1,44 @@
-/*
- * Alloc.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMMON_ALLOC_H
-#define __COMMON_ALLOC_H
-
-#include <stddef.h>
-
-void *MyAlloc(size_t size) throw();
-void MyFree(void *address) throw();
-
-#ifdef _WIN32
-
-bool SetLargePageSize();
-
-void *MidAlloc(size_t size) throw();
-void MidFree(void *address) throw();
-void *BigAlloc(size_t size) throw();
-void BigFree(void *address) throw();
-
-#else
-
-#define MidAlloc(size) MyAlloc(size)
-#define MidFree(address) MyFree(address)
-#define BigAlloc(size) MyAlloc(size)
-#define BigFree(address) MyFree(address)
-
-#endif
-
-#endif
+/*
+ * Alloc.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMMON_ALLOC_H
+#define __COMMON_ALLOC_H
+
+#include <stddef.h>
+
+void *MyAlloc(size_t size) throw();
+void MyFree(void *address) throw();
+
+#ifdef _WIN32
+
+bool SetLargePageSize();
+
+void *MidAlloc(size_t size) throw();
+void MidFree(void *address) throw();
+void *BigAlloc(size_t size) throw();
+void BigFree(void *address) throw();
+
+#else
+
+#define MidAlloc(size) MyAlloc(size)
+#define MidFree(address) MyFree(address)
+#define BigAlloc(size) MyAlloc(size)
+#define BigFree(address) MyFree(address)
+
+#endif
+
+#endif
diff --git a/Source/7zip/Common/CRC.cpp b/Source/7zip/Common/CRC.cpp
index 998a579..dad6432 100755
--- a/Source/7zip/Common/CRC.cpp
+++ b/Source/7zip/Common/CRC.cpp
@@ -1,76 +1,76 @@
-/*
- * CRC.cpp
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include "StdAfx.h"
-
-#include "CRC.h"
-
-static const UInt32 kCRCPoly = 0xEDB88320;
-
-UInt32 CCRC::Table[256];
-
-void CCRC::InitTable()
-{
- for (UInt32 i = 0; i < 256; i++)
- {
- UInt32 r = i;
- for (int j = 0; j < 8; j++)
- if (r & 1)
- r = (r >> 1) ^ kCRCPoly;
- else
- r >>= 1;
- CCRC::Table[i] = r;
- }
-}
-
-class CCRCTableInit
-{
-public:
- CCRCTableInit() { CCRC::InitTable(); }
-} g_CRCTableInit;
-
-void CCRC::UpdateByte(Byte b)
-{
- _value = Table[((Byte)(_value)) ^ b] ^ (_value >> 8);
-}
-
-void CCRC::UpdateUInt16(UInt16 v)
-{
- UpdateByte(Byte(v));
- UpdateByte(Byte(v >> 8));
-}
-
-void CCRC::UpdateUInt32(UInt32 v)
-{
- for (int i = 0; i < 4; i++)
- UpdateByte((Byte)(v >> (8 * i)));
-}
-
-void CCRC::UpdateUInt64(UInt64 v)
-{
- for (int i = 0; i < 8; i++)
- UpdateByte((Byte)(v >> (8 * i)));
-}
-
-void CCRC::Update(const void *data, size_t size)
-{
- UInt32 v = _value;
- const Byte *p = (const Byte *)data;
- for (; size > 0 ; size--, p++)
- v = Table[((Byte)(v)) ^ *p] ^ (v >> 8);
- _value = v;
-}
+/*
+ * CRC.cpp
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include "StdAfx.h"
+
+#include "CRC.h"
+
+static const UInt32 kCRCPoly = 0xEDB88320;
+
+UInt32 CCRC::Table[256];
+
+void CCRC::InitTable()
+{
+ for (UInt32 i = 0; i < 256; i++)
+ {
+ UInt32 r = i;
+ for (int j = 0; j < 8; j++)
+ if (r & 1)
+ r = (r >> 1) ^ kCRCPoly;
+ else
+ r >>= 1;
+ CCRC::Table[i] = r;
+ }
+}
+
+class CCRCTableInit
+{
+public:
+ CCRCTableInit() { CCRC::InitTable(); }
+} g_CRCTableInit;
+
+void CCRC::UpdateByte(Byte b)
+{
+ _value = Table[((Byte)(_value)) ^ b] ^ (_value >> 8);
+}
+
+void CCRC::UpdateUInt16(UInt16 v)
+{
+ UpdateByte(Byte(v));
+ UpdateByte(Byte(v >> 8));
+}
+
+void CCRC::UpdateUInt32(UInt32 v)
+{
+ for (int i = 0; i < 4; i++)
+ UpdateByte((Byte)(v >> (8 * i)));
+}
+
+void CCRC::UpdateUInt64(UInt64 v)
+{
+ for (int i = 0; i < 8; i++)
+ UpdateByte((Byte)(v >> (8 * i)));
+}
+
+void CCRC::Update(const void *data, size_t size)
+{
+ UInt32 v = _value;
+ const Byte *p = (const Byte *)data;
+ for (; size > 0 ; size--, p++)
+ v = Table[((Byte)(v)) ^ *p] ^ (v >> 8);
+ _value = v;
+}
diff --git a/Source/7zip/Common/CRC.h b/Source/7zip/Common/CRC.h
index e01c72f..72cb518 100755
--- a/Source/7zip/Common/CRC.h
+++ b/Source/7zip/Common/CRC.h
@@ -1,51 +1,51 @@
-/*
- * CRC.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMMON_CRC_H
-#define __COMMON_CRC_H
-
-#include <stddef.h>
-#include "Types.h"
-
-class CCRC
-{
- UInt32 _value;
-public:
- static UInt32 Table[256];
- static void InitTable();
-
- CCRC(): _value(0xFFFFFFFF){};
- void Init() { _value = 0xFFFFFFFF; }
- void UpdateByte(Byte v);
- void UpdateUInt16(UInt16 v);
- void UpdateUInt32(UInt32 v);
- void UpdateUInt64(UInt64 v);
- void Update(const void *data, size_t size);
- UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; }
- static UInt32 CalculateDigest(const void *data, size_t size)
- {
- CCRC crc;
- crc.Update(data, size);
- return crc.GetDigest();
- }
- static bool VerifyDigest(UInt32 digest, const void *data, size_t size)
- {
- return (CalculateDigest(data, size) == digest);
- }
-};
-
-#endif
+/*
+ * CRC.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMMON_CRC_H
+#define __COMMON_CRC_H
+
+#include <stddef.h>
+#include "Types.h"
+
+class CCRC
+{
+ UInt32 _value;
+public:
+ static UInt32 Table[256];
+ static void InitTable();
+
+ CCRC(): _value(0xFFFFFFFF){};
+ void Init() { _value = 0xFFFFFFFF; }
+ void UpdateByte(Byte v);
+ void UpdateUInt16(UInt16 v);
+ void UpdateUInt32(UInt32 v);
+ void UpdateUInt64(UInt64 v);
+ void Update(const void *data, size_t size);
+ UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; }
+ static UInt32 CalculateDigest(const void *data, size_t size)
+ {
+ CCRC crc;
+ crc.Update(data, size);
+ return crc.GetDigest();
+ }
+ static bool VerifyDigest(UInt32 digest, const void *data, size_t size)
+ {
+ return (CalculateDigest(data, size) == digest);
+ }
+};
+
+#endif
diff --git a/Source/7zip/Common/Defs.h b/Source/7zip/Common/Defs.h
index f1746a8..dd55dbe 100755
--- a/Source/7zip/Common/Defs.h
+++ b/Source/7zip/Common/Defs.h
@@ -1,35 +1,35 @@
-/*
- * Defs.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMMON_DEFS_H
-#define __COMMON_DEFS_H
-
-template <class T> inline T MyMin(T a, T b)
- { return a < b ? a : b; }
-template <class T> inline T MyMax(T a, T b)
- { return a > b ? a : b; }
-
-template <class T> inline int MyCompare(T a, T b)
- { return a < b ? -1 : (a == b ? 0 : 1); }
-
-inline int BoolToInt(bool value)
- { return (value ? 1: 0); }
-
-inline bool IntToBool(int value)
- { return (value != 0); }
-
-#endif
+/*
+ * Defs.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMMON_DEFS_H
+#define __COMMON_DEFS_H
+
+template <class T> inline T MyMin(T a, T b)
+ { return a < b ? a : b; }
+template <class T> inline T MyMax(T a, T b)
+ { return a > b ? a : b; }
+
+template <class T> inline int MyCompare(T a, T b)
+ { return a < b ? -1 : (a == b ? 0 : 1); }
+
+inline int BoolToInt(bool value)
+ { return (value ? 1: 0); }
+
+inline bool IntToBool(int value)
+ { return (value != 0); }
+
+#endif
diff --git a/Source/7zip/Common/MyCom.h b/Source/7zip/Common/MyCom.h
index 119aaff..c5e18df 100755
--- a/Source/7zip/Common/MyCom.h
+++ b/Source/7zip/Common/MyCom.h
@@ -1,218 +1,218 @@
-/*
- * MyCom.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __MYCOM_H
-#define __MYCOM_H
-
-#include "MyWindows.h"
-
-#define RINOK(x) { HRESULT __result_ = (x); if(__result_ != S_OK) return __result_; }
-
-template <class T>
-class CMyComPtr
-{
- T* _p;
-public:
- // typedef T _PtrClass;
- CMyComPtr() { _p = NULL;}
- CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); }
- CMyComPtr(const CMyComPtr<T>& lp)
- {
- if ((_p = lp._p) != NULL)
- _p->AddRef();
- }
- ~CMyComPtr() { if (_p) _p->Release(); }
- void Release() { if (_p) { _p->Release(); _p = NULL; } }
- operator T*() const { return (T*)_p; }
- // T& operator*() const { return *_p; }
- T** operator&() { return &_p; }
- T* operator->() const { return _p; }
- T* operator=(T* p)
- {
- if (p != 0)
- p->AddRef();
- if (_p)
- _p->Release();
- _p = p;
- return p;
- }
- T* operator=(const CMyComPtr<T>& lp) { return (*this = lp._p); }
- bool operator!() const { return (_p == NULL); }
- // bool operator==(T* pT) const { return _p == pT; }
- // Compare two objects for equivalence
- void Attach(T* p2)
- {
- Release();
- _p = p2;
- }
- T* Detach()
- {
- T* pt = _p;
- _p = NULL;
- return pt;
- }
- #ifdef _WIN32
- HRESULT CoCreateInstance(REFCLSID rclsid, REFIID iid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
- {
- return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, (void**)&_p);
- }
- #endif
- /*
- HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
- {
- CLSID clsid;
- HRESULT hr = CLSIDFromProgID(szProgID, &clsid);
- ATLASSERT(_p == NULL);
- if (SUCCEEDED(hr))
- hr = ::CoCreateInstance(clsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&_p);
- return hr;
- }
- */
- template <class Q>
- HRESULT QueryInterface(REFGUID iid, Q** pp) const
- {
- return _p->QueryInterface(iid, (void**)pp);
- }
-};
-
-//////////////////////////////////////////////////////////
-
-class CMyComBSTR
-{
-public:
- BSTR m_str;
- CMyComBSTR() { m_str = NULL; }
- CMyComBSTR(LPCOLESTR pSrc) { m_str = ::SysAllocString(pSrc); }
- // CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); }
- // CMyComBSTR(int nSize, LPCOLESTR sz) { m_str = ::SysAllocStringLen(sz, nSize); }
- CMyComBSTR(const CMyComBSTR& src) { m_str = src.MyCopy(); }
- /*
- CMyComBSTR(REFGUID src)
- {
- LPOLESTR szGuid;
- StringFromCLSID(src, &szGuid);
- m_str = ::SysAllocString(szGuid);
- CoTaskMemFree(szGuid);
- }
- */
- ~CMyComBSTR() { ::SysFreeString(m_str); }
- CMyComBSTR& operator=(const CMyComBSTR& src)
- {
- if (m_str != src.m_str)
- {
- if (m_str)
- ::SysFreeString(m_str);
- m_str = src.MyCopy();
- }
- return *this;
- }
- CMyComBSTR& operator=(LPCOLESTR pSrc)
- {
- ::SysFreeString(m_str);
- m_str = ::SysAllocString(pSrc);
- return *this;
- }
- unsigned int Length() const { return ::SysStringLen(m_str); }
- operator BSTR() const { return m_str; }
- BSTR* operator&() { return &m_str; }
- BSTR MyCopy() const
- {
- int byteLen = ::SysStringByteLen(m_str);
- BSTR res = ::SysAllocStringByteLen(NULL, byteLen);
- memmove(res, m_str, byteLen);
- return res;
- }
- void Attach(BSTR src) { m_str = src; }
- BSTR Detach()
- {
- BSTR s = m_str;
- m_str = NULL;
- return s;
- }
- void Empty()
- {
- ::SysFreeString(m_str);
- m_str = NULL;
- }
- bool operator!() const { return (m_str == NULL); }
-};
-
-
-//////////////////////////////////////////////////////////
-
-class CMyUnknownImp
-{
-public:
- ULONG __m_RefCount;
- CMyUnknownImp(): __m_RefCount(0) {}
-};
-
-#define MY_QUERYINTERFACE_BEGIN STDMETHOD(QueryInterface) \
- (REFGUID iid, void **outObject) {
-
-#define MY_QUERYINTERFACE_ENTRY(i) if (iid == IID_ ## i) \
- { *outObject = (void *)(i *)this; AddRef(); return S_OK; }
-
-#define MY_QUERYINTERFACE_END return E_NOINTERFACE; }
-
-#define MY_ADDREF_RELEASE \
-STDMETHOD_(ULONG, AddRef)() { return ++__m_RefCount; } \
-STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
- return __m_RefCount; delete this; return 0; }
-
-#define MY_UNKNOWN_IMP_SPEC(i) \
- MY_QUERYINTERFACE_BEGIN \
- i \
- MY_QUERYINTERFACE_END \
- MY_ADDREF_RELEASE
-
-
-#define MY_UNKNOWN_IMP STDMETHOD(QueryInterface)(REFGUID, void **) { \
- MY_QUERYINTERFACE_END \
- MY_ADDREF_RELEASE
-
-#define MY_UNKNOWN_IMP1(i) MY_UNKNOWN_IMP_SPEC( \
- MY_QUERYINTERFACE_ENTRY(i) \
- )
-
-#define MY_UNKNOWN_IMP2(i1, i2) MY_UNKNOWN_IMP_SPEC( \
- MY_QUERYINTERFACE_ENTRY(i1) \
- MY_QUERYINTERFACE_ENTRY(i2) \
- )
-
-#define MY_UNKNOWN_IMP3(i1, i2, i3) MY_UNKNOWN_IMP_SPEC( \
- MY_QUERYINTERFACE_ENTRY(i1) \
- MY_QUERYINTERFACE_ENTRY(i2) \
- MY_QUERYINTERFACE_ENTRY(i3) \
- )
-
-#define MY_UNKNOWN_IMP4(i1, i2, i3, i4) MY_UNKNOWN_IMP_SPEC( \
- MY_QUERYINTERFACE_ENTRY(i1) \
- MY_QUERYINTERFACE_ENTRY(i2) \
- MY_QUERYINTERFACE_ENTRY(i3) \
- MY_QUERYINTERFACE_ENTRY(i4) \
- )
-
-#define MY_UNKNOWN_IMP5(i1, i2, i3, i4, i5) MY_UNKNOWN_IMP_SPEC( \
- MY_QUERYINTERFACE_ENTRY(i1) \
- MY_QUERYINTERFACE_ENTRY(i2) \
- MY_QUERYINTERFACE_ENTRY(i3) \
- MY_QUERYINTERFACE_ENTRY(i4) \
- MY_QUERYINTERFACE_ENTRY(i5) \
- )
-
-#endif
+/*
+ * MyCom.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __MYCOM_H
+#define __MYCOM_H
+
+#include "MyWindows.h"
+
+#define RINOK(x) { HRESULT __result_ = (x); if(__result_ != S_OK) return __result_; }
+
+template <class T>
+class CMyComPtr
+{
+ T* _p;
+public:
+ // typedef T _PtrClass;
+ CMyComPtr() { _p = NULL;}
+ CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); }
+ CMyComPtr(const CMyComPtr<T>& lp)
+ {
+ if ((_p = lp._p) != NULL)
+ _p->AddRef();
+ }
+ ~CMyComPtr() { if (_p) _p->Release(); }
+ void Release() { if (_p) { _p->Release(); _p = NULL; } }
+ operator T*() const { return (T*)_p; }
+ // T& operator*() const { return *_p; }
+ T** operator&() { return &_p; }
+ T* operator->() const { return _p; }
+ T* operator=(T* p)
+ {
+ if (p != 0)
+ p->AddRef();
+ if (_p)
+ _p->Release();
+ _p = p;
+ return p;
+ }
+ T* operator=(const CMyComPtr<T>& lp) { return (*this = lp._p); }
+ bool operator!() const { return (_p == NULL); }
+ // bool operator==(T* pT) const { return _p == pT; }
+ // Compare two objects for equivalence
+ void Attach(T* p2)
+ {
+ Release();
+ _p = p2;
+ }
+ T* Detach()
+ {
+ T* pt = _p;
+ _p = NULL;
+ return pt;
+ }
+ #ifdef _WIN32
+ HRESULT CoCreateInstance(REFCLSID rclsid, REFIID iid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
+ {
+ return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, (void**)&_p);
+ }
+ #endif
+ /*
+ HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL)
+ {
+ CLSID clsid;
+ HRESULT hr = CLSIDFromProgID(szProgID, &clsid);
+ ATLASSERT(_p == NULL);
+ if (SUCCEEDED(hr))
+ hr = ::CoCreateInstance(clsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&_p);
+ return hr;
+ }
+ */
+ template <class Q>
+ HRESULT QueryInterface(REFGUID iid, Q** pp) const
+ {
+ return _p->QueryInterface(iid, (void**)pp);
+ }
+};
+
+//////////////////////////////////////////////////////////
+
+class CMyComBSTR
+{
+public:
+ BSTR m_str;
+ CMyComBSTR() { m_str = NULL; }
+ CMyComBSTR(LPCOLESTR pSrc) { m_str = ::SysAllocString(pSrc); }
+ // CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); }
+ // CMyComBSTR(int nSize, LPCOLESTR sz) { m_str = ::SysAllocStringLen(sz, nSize); }
+ CMyComBSTR(const CMyComBSTR& src) { m_str = src.MyCopy(); }
+ /*
+ CMyComBSTR(REFGUID src)
+ {
+ LPOLESTR szGuid;
+ StringFromCLSID(src, &szGuid);
+ m_str = ::SysAllocString(szGuid);
+ CoTaskMemFree(szGuid);
+ }
+ */
+ ~CMyComBSTR() { ::SysFreeString(m_str); }
+ CMyComBSTR& operator=(const CMyComBSTR& src)
+ {
+ if (m_str != src.m_str)
+ {
+ if (m_str)
+ ::SysFreeString(m_str);
+ m_str = src.MyCopy();
+ }
+ return *this;
+ }
+ CMyComBSTR& operator=(LPCOLESTR pSrc)
+ {
+ ::SysFreeString(m_str);
+ m_str = ::SysAllocString(pSrc);
+ return *this;
+ }
+ unsigned int Length() const { return ::SysStringLen(m_str); }
+ operator BSTR() const { return m_str; }
+ BSTR* operator&() { return &m_str; }
+ BSTR MyCopy() const
+ {
+ int byteLen = ::SysStringByteLen(m_str);
+ BSTR res = ::SysAllocStringByteLen(NULL, byteLen);
+ memmove(res, m_str, byteLen);
+ return res;
+ }
+ void Attach(BSTR src) { m_str = src; }
+ BSTR Detach()
+ {
+ BSTR s = m_str;
+ m_str = NULL;
+ return s;
+ }
+ void Empty()
+ {
+ ::SysFreeString(m_str);
+ m_str = NULL;
+ }
+ bool operator!() const { return (m_str == NULL); }
+};
+
+
+//////////////////////////////////////////////////////////
+
+class CMyUnknownImp
+{
+public:
+ ULONG __m_RefCount;
+ CMyUnknownImp(): __m_RefCount(0) {}
+};
+
+#define MY_QUERYINTERFACE_BEGIN STDMETHOD(QueryInterface) \
+ (REFGUID iid, void **outObject) {
+
+#define MY_QUERYINTERFACE_ENTRY(i) if (iid == IID_ ## i) \
+ { *outObject = (void *)(i *)this; AddRef(); return S_OK; }
+
+#define MY_QUERYINTERFACE_END return E_NOINTERFACE; }
+
+#define MY_ADDREF_RELEASE \
+STDMETHOD_(ULONG, AddRef)() { return ++__m_RefCount; } \
+STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \
+ return __m_RefCount; delete this; return 0; }
+
+#define MY_UNKNOWN_IMP_SPEC(i) \
+ MY_QUERYINTERFACE_BEGIN \
+ i \
+ MY_QUERYINTERFACE_END \
+ MY_ADDREF_RELEASE
+
+
+#define MY_UNKNOWN_IMP STDMETHOD(QueryInterface)(REFGUID, void **) { \
+ MY_QUERYINTERFACE_END \
+ MY_ADDREF_RELEASE
+
+#define MY_UNKNOWN_IMP1(i) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY(i) \
+ )
+
+#define MY_UNKNOWN_IMP2(i1, i2) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY(i1) \
+ MY_QUERYINTERFACE_ENTRY(i2) \
+ )
+
+#define MY_UNKNOWN_IMP3(i1, i2, i3) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY(i1) \
+ MY_QUERYINTERFACE_ENTRY(i2) \
+ MY_QUERYINTERFACE_ENTRY(i3) \
+ )
+
+#define MY_UNKNOWN_IMP4(i1, i2, i3, i4) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY(i1) \
+ MY_QUERYINTERFACE_ENTRY(i2) \
+ MY_QUERYINTERFACE_ENTRY(i3) \
+ MY_QUERYINTERFACE_ENTRY(i4) \
+ )
+
+#define MY_UNKNOWN_IMP5(i1, i2, i3, i4, i5) MY_UNKNOWN_IMP_SPEC( \
+ MY_QUERYINTERFACE_ENTRY(i1) \
+ MY_QUERYINTERFACE_ENTRY(i2) \
+ MY_QUERYINTERFACE_ENTRY(i3) \
+ MY_QUERYINTERFACE_ENTRY(i4) \
+ MY_QUERYINTERFACE_ENTRY(i5) \
+ )
+
+#endif
diff --git a/Source/7zip/Common/MyGuidDef.h b/Source/7zip/Common/MyGuidDef.h
index 5e2cf4a..b01a444 100755
--- a/Source/7zip/Common/MyGuidDef.h
+++ b/Source/7zip/Common/MyGuidDef.h
@@ -1,69 +1,69 @@
-/*
- * MyGuidDef.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 GUID_DEFINED
-#define GUID_DEFINED
-
-#include "Types.h"
-
-typedef struct {
- UInt32 Data1;
- UInt16 Data2;
- UInt16 Data3;
- unsigned char Data4[8];
-} GUID;
-
-#ifdef __cplusplus
-#define REFGUID const GUID &
-#else
-#define REFGUID const GUID *
-#endif
-
-#define REFCLSID REFGUID
-#define REFIID REFGUID
-
-#ifdef __cplusplus
-inline bool operator==(REFGUID g1, REFGUID g2)
-{
- for (int i = 0; i < (int)sizeof(g1); i++)
- if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i])
- return false;
- return true;
-}
-inline bool operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); }
-#endif
-
-#ifdef __cplusplus
- #define MY_EXTERN_C extern "C"
-#else
- #define MY_EXTERN_C extern
-#endif
-
-#endif // GUID_DEFINED
-
-
-#ifdef DEFINE_GUID
-#undef DEFINE_GUID
-#endif
-
-#ifdef INITGUID
- #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
-#else
- #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- MY_EXTERN_C const GUID name
-#endif
+/*
+ * MyGuidDef.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 GUID_DEFINED
+#define GUID_DEFINED
+
+#include "Types.h"
+
+typedef struct {
+ UInt32 Data1;
+ UInt16 Data2;
+ UInt16 Data3;
+ unsigned char Data4[8];
+} GUID;
+
+#ifdef __cplusplus
+#define REFGUID const GUID &
+#else
+#define REFGUID const GUID *
+#endif
+
+#define REFCLSID REFGUID
+#define REFIID REFGUID
+
+#ifdef __cplusplus
+inline bool operator==(REFGUID g1, REFGUID g2)
+{
+ for (int i = 0; i < (int)sizeof(g1); i++)
+ if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i])
+ return false;
+ return true;
+}
+inline bool operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); }
+#endif
+
+#ifdef __cplusplus
+ #define MY_EXTERN_C extern "C"
+#else
+ #define MY_EXTERN_C extern
+#endif
+
+#endif // GUID_DEFINED
+
+
+#ifdef DEFINE_GUID
+#undef DEFINE_GUID
+#endif
+
+#ifdef INITGUID
+ #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+ MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
+#else
+ #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
+ MY_EXTERN_C const GUID name
+#endif
diff --git a/Source/7zip/Common/MyUnknown.h b/Source/7zip/Common/MyUnknown.h
index 7508b60..e45adb7 100755
--- a/Source/7zip/Common/MyUnknown.h
+++ b/Source/7zip/Common/MyUnknown.h
@@ -1,39 +1,39 @@
-/*
- * MyUnknown.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __MYUNKNOWN_H
-#define __MYUNKNOWN_H
-
-#ifdef _WIN32
-
-#ifdef _WIN32_WCE
-#if (_WIN32_WCE > 300)
-#include <basetyps.h>
-#else
-#define MIDL_INTERFACE(x) struct
-#endif
-#else
-#include <basetyps.h>
-#endif
-
-#include <unknwn.h>
-
-#else
-#include "MyWindows.h"
-#endif
-
-#endif
+/*
+ * MyUnknown.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __MYUNKNOWN_H
+#define __MYUNKNOWN_H
+
+#ifdef _WIN32
+
+#ifdef _WIN32_WCE
+#if (_WIN32_WCE > 300)
+#include <basetyps.h>
+#else
+#define MIDL_INTERFACE(x) struct
+#endif
+#else
+#include <basetyps.h>
+#endif
+
+#include <unknwn.h>
+
+#else
+#include "MyWindows.h"
+#endif
+
+#endif
diff --git a/Source/7zip/Common/MyWindows.h b/Source/7zip/Common/MyWindows.h
index 02f8710..b3977d2 100755
--- a/Source/7zip/Common/MyWindows.h
+++ b/Source/7zip/Common/MyWindows.h
@@ -1,220 +1,220 @@
-/*
- * MyWindows.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __MYWINDOWS_H
-#define __MYWINDOWS_H
-
-#include "../../Platform.h"
-
-#ifdef _WIN32
-
-#include <windows.h>
-
-/*
-#define CHAR_PATH_SEPARATOR '\\'
-#define WCHAR_PATH_SEPARATOR L'\\'
-#define STRING_PATH_SEPARATOR "\\"
-#define WSTRING_PATH_SEPARATOR L"\\"
-*/
-
-#else
-
-/*
-#define CHAR_PATH_SEPARATOR '/'
-#define WCHAR_PATH_SEPARATOR L'/'
-#define STRING_PATH_SEPARATOR "/"
-#define WSTRING_PATH_SEPARATOR L"/"
-
-#include <stddef.h> // for wchar_t
-#include <string.h>
-*/
-#include "MyGuidDef.h"
-/*
-typedef char CHAR;
-typedef unsigned char UCHAR;
-
-#undef BYTE
-typedef unsigned char BYTE;
-
-typedef short SHORT;
-typedef unsigned short USHORT;
-
-#undef WORD
-typedef unsigned short WORD;
-typedef short VARIANT_BOOL;
-
-typedef int INT;
-typedef Int32 INT32;
-typedef unsigned int UINT;
-typedef UInt32 UINT32;
-typedef INT32 LONG; // LONG, ULONG and DWORD must be 32-bit
-typedef UINT32 ULONG;
-
-#undef DWORD
-typedef UINT32 DWORD;
-
-typedef Int64 LONGLONG;
-typedef UInt64 ULONGLONG;
-
-typedef struct LARGE_INTEGER { LONGLONG QuadPart; }LARGE_INTEGER;
-typedef struct _ULARGE_INTEGER { ULONGLONG QuadPart;} ULARGE_INTEGER;
-
-typedef const CHAR *LPCSTR;
-typedef CHAR TCHAR;
-typedef const TCHAR *LPCTSTR;
-typedef wchar_t WCHAR;
-typedef WCHAR OLECHAR;
-typedef const WCHAR *LPCWSTR;
-typedef OLECHAR *BSTR;
-typedef const OLECHAR *LPCOLESTR;
-typedef OLECHAR *LPOLESTR;
-*/
-typedef struct _FILETIME
-{
- DWORD dwLowDateTime;
- DWORD dwHighDateTime;
-}FILETIME;
-
-#define HRESULT LONG
-#define FAILED(Status) ((HRESULT)(Status)<0)
-typedef ULONG PROPID;
-typedef LONG SCODE;
-
-#define S_OK ((HRESULT)0x00000000L)
-#define S_FALSE ((HRESULT)0x00000001L)
-#define E_NOTIMPL ((HRESULT)0x80004001L)
-#define E_NOINTERFACE ((HRESULT)0x80004002L)
-#define E_ABORT ((HRESULT)0x80004004L)
-#define E_FAIL ((HRESULT)0x80004005L)
-#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L)
-#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
-#define E_INVALIDARG ((HRESULT)0x80070057L)
-
-#ifdef _MSC_VER
-#define STDMETHODCALLTYPE __stdcall
-#else
-#define STDMETHODCALLTYPE
-#endif
-
-#define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f
-#define STDMETHOD(f) STDMETHOD_(HRESULT, f)
-#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
-#define STDMETHODIMP STDMETHODIMP_(HRESULT)
-
-#define PURE = 0
-
-#define MIDL_INTERFACE(x) struct
-
-struct IUnknown
-{
- STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE;
- STDMETHOD_(ULONG, AddRef)() PURE;
- STDMETHOD_(ULONG, Release)() PURE;
-};
-
-typedef IUnknown *LPUNKNOWN;
-
-#define VARIANT_TRUE ((VARIANT_BOOL)-1)
-#define VARIANT_FALSE ((VARIANT_BOOL)0)
-
-enum VARENUM
-{
- VT_EMPTY = 0,
- VT_NULL = 1,
- VT_I2 = 2,
- VT_I4 = 3,
- VT_R4 = 4,
- VT_R8 = 5,
- VT_CY = 6,
- VT_DATE = 7,
- VT_BSTR = 8,
- VT_DISPATCH = 9,
- VT_ERROR = 10,
- VT_BOOL = 11,
- VT_VARIANT = 12,
- VT_UNKNOWN = 13,
- VT_DECIMAL = 14,
- VT_I1 = 16,
- VT_UI1 = 17,
- VT_UI2 = 18,
- VT_UI4 = 19,
- VT_I8 = 20,
- VT_UI8 = 21,
- VT_INT = 22,
- VT_UINT = 23,
- VT_VOID = 24,
- VT_HRESULT = 25,
- VT_FILETIME = 64
-};
-
-typedef unsigned short VARTYPE;
-typedef WORD PROPVAR_PAD1;
-typedef WORD PROPVAR_PAD2;
-typedef WORD PROPVAR_PAD3;
-
-typedef struct tagPROPVARIANT
-{
- VARTYPE vt;
- PROPVAR_PAD1 wReserved1;
- PROPVAR_PAD2 wReserved2;
- PROPVAR_PAD3 wReserved3;
- union
- {
- CHAR cVal;
- UCHAR bVal;
- SHORT iVal;
- USHORT uiVal;
- LONG lVal;
- ULONG ulVal;
- INT intVal;
- UINT uintVal;
- LARGE_INTEGER hVal;
- ULARGE_INTEGER uhVal;
- VARIANT_BOOL boolVal;
- SCODE scode;
- FILETIME filetime;
- BSTR bstrVal;
- };
-} PROPVARIANT;
-
-typedef PROPVARIANT tagVARIANT;
-typedef tagVARIANT VARIANT;
-typedef VARIANT VARIANTARG;
-
-MY_EXTERN_C BSTR SysAllocStringByteLen(LPCSTR psz, UINT len);
-MY_EXTERN_C BSTR SysAllocString(const OLECHAR *sz);
-MY_EXTERN_C void SysFreeString(BSTR bstr);
-MY_EXTERN_C UINT SysStringByteLen(BSTR bstr);
-MY_EXTERN_C UINT SysStringLen(BSTR bstr);
-
-MY_EXTERN_C DWORD GetLastError();
-MY_EXTERN_C HRESULT VariantClear(VARIANTARG *prop);
-MY_EXTERN_C HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src);
-MY_EXTERN_C LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2);
-
-#define CP_ACP 0
-#define CP_OEMCP 1
-
-typedef enum tagSTREAM_SEEK
-{
- STREAM_SEEK_SET = 0,
- STREAM_SEEK_CUR = 1,
- STREAM_SEEK_END = 2
-} STREAM_SEEK;
-
-#endif
-#endif
+/*
+ * MyWindows.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __MYWINDOWS_H
+#define __MYWINDOWS_H
+
+#include "../../Platform.h"
+
+#ifdef _WIN32
+
+#include <windows.h>
+
+/*
+#define CHAR_PATH_SEPARATOR '\\'
+#define WCHAR_PATH_SEPARATOR L'\\'
+#define STRING_PATH_SEPARATOR "\\"
+#define WSTRING_PATH_SEPARATOR L"\\"
+*/
+
+#else
+
+/*
+#define CHAR_PATH_SEPARATOR '/'
+#define WCHAR_PATH_SEPARATOR L'/'
+#define STRING_PATH_SEPARATOR "/"
+#define WSTRING_PATH_SEPARATOR L"/"
+
+#include <stddef.h> // for wchar_t
+#include <string.h>
+*/
+#include "MyGuidDef.h"
+/*
+typedef char CHAR;
+typedef unsigned char UCHAR;
+
+#undef BYTE
+typedef unsigned char BYTE;
+
+typedef short SHORT;
+typedef unsigned short USHORT;
+
+#undef WORD
+typedef unsigned short WORD;
+typedef short VARIANT_BOOL;
+
+typedef int INT;
+typedef Int32 INT32;
+typedef unsigned int UINT;
+typedef UInt32 UINT32;
+typedef INT32 LONG; // LONG, ULONG and DWORD must be 32-bit
+typedef UINT32 ULONG;
+
+#undef DWORD
+typedef UINT32 DWORD;
+
+typedef Int64 LONGLONG;
+typedef UInt64 ULONGLONG;
+
+typedef struct LARGE_INTEGER { LONGLONG QuadPart; }LARGE_INTEGER;
+typedef struct _ULARGE_INTEGER { ULONGLONG QuadPart;} ULARGE_INTEGER;
+
+typedef const CHAR *LPCSTR;
+typedef CHAR TCHAR;
+typedef const TCHAR *LPCTSTR;
+typedef wchar_t WCHAR;
+typedef WCHAR OLECHAR;
+typedef const WCHAR *LPCWSTR;
+typedef OLECHAR *BSTR;
+typedef const OLECHAR *LPCOLESTR;
+typedef OLECHAR *LPOLESTR;
+*/
+typedef struct _FILETIME
+{
+ DWORD dwLowDateTime;
+ DWORD dwHighDateTime;
+}FILETIME;
+
+#define HRESULT LONG
+#define FAILED(Status) ((HRESULT)(Status)<0)
+typedef ULONG PROPID;
+typedef LONG SCODE;
+
+#define S_OK ((HRESULT)0x00000000L)
+#define S_FALSE ((HRESULT)0x00000001L)
+#define E_NOTIMPL ((HRESULT)0x80004001L)
+#define E_NOINTERFACE ((HRESULT)0x80004002L)
+#define E_ABORT ((HRESULT)0x80004004L)
+#define E_FAIL ((HRESULT)0x80004005L)
+#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L)
+#define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
+#define E_INVALIDARG ((HRESULT)0x80070057L)
+
+#ifdef _MSC_VER
+#define STDMETHODCALLTYPE __stdcall
+#else
+#define STDMETHODCALLTYPE
+#endif
+
+#define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f
+#define STDMETHOD(f) STDMETHOD_(HRESULT, f)
+#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
+#define STDMETHODIMP STDMETHODIMP_(HRESULT)
+
+#define PURE = 0
+
+#define MIDL_INTERFACE(x) struct
+
+struct IUnknown
+{
+ STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE;
+ STDMETHOD_(ULONG, AddRef)() PURE;
+ STDMETHOD_(ULONG, Release)() PURE;
+};
+
+typedef IUnknown *LPUNKNOWN;
+
+#define VARIANT_TRUE ((VARIANT_BOOL)-1)
+#define VARIANT_FALSE ((VARIANT_BOOL)0)
+
+enum VARENUM
+{
+ VT_EMPTY = 0,
+ VT_NULL = 1,
+ VT_I2 = 2,
+ VT_I4 = 3,
+ VT_R4 = 4,
+ VT_R8 = 5,
+ VT_CY = 6,
+ VT_DATE = 7,
+ VT_BSTR = 8,
+ VT_DISPATCH = 9,
+ VT_ERROR = 10,
+ VT_BOOL = 11,
+ VT_VARIANT = 12,
+ VT_UNKNOWN = 13,
+ VT_DECIMAL = 14,
+ VT_I1 = 16,
+ VT_UI1 = 17,
+ VT_UI2 = 18,
+ VT_UI4 = 19,
+ VT_I8 = 20,
+ VT_UI8 = 21,
+ VT_INT = 22,
+ VT_UINT = 23,
+ VT_VOID = 24,
+ VT_HRESULT = 25,
+ VT_FILETIME = 64
+};
+
+typedef unsigned short VARTYPE;
+typedef WORD PROPVAR_PAD1;
+typedef WORD PROPVAR_PAD2;
+typedef WORD PROPVAR_PAD3;
+
+typedef struct tagPROPVARIANT
+{
+ VARTYPE vt;
+ PROPVAR_PAD1 wReserved1;
+ PROPVAR_PAD2 wReserved2;
+ PROPVAR_PAD3 wReserved3;
+ union
+ {
+ CHAR cVal;
+ UCHAR bVal;
+ SHORT iVal;
+ USHORT uiVal;
+ LONG lVal;
+ ULONG ulVal;
+ INT intVal;
+ UINT uintVal;
+ LARGE_INTEGER hVal;
+ ULARGE_INTEGER uhVal;
+ VARIANT_BOOL boolVal;
+ SCODE scode;
+ FILETIME filetime;
+ BSTR bstrVal;
+ };
+} PROPVARIANT;
+
+typedef PROPVARIANT tagVARIANT;
+typedef tagVARIANT VARIANT;
+typedef VARIANT VARIANTARG;
+
+MY_EXTERN_C BSTR SysAllocStringByteLen(LPCSTR psz, UINT len);
+MY_EXTERN_C BSTR SysAllocString(const OLECHAR *sz);
+MY_EXTERN_C void SysFreeString(BSTR bstr);
+MY_EXTERN_C UINT SysStringByteLen(BSTR bstr);
+MY_EXTERN_C UINT SysStringLen(BSTR bstr);
+
+MY_EXTERN_C DWORD GetLastError();
+MY_EXTERN_C HRESULT VariantClear(VARIANTARG *prop);
+MY_EXTERN_C HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src);
+MY_EXTERN_C LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2);
+
+#define CP_ACP 0
+#define CP_OEMCP 1
+
+typedef enum tagSTREAM_SEEK
+{
+ STREAM_SEEK_SET = 0,
+ STREAM_SEEK_CUR = 1,
+ STREAM_SEEK_END = 2
+} STREAM_SEEK;
+
+#endif
+#endif
diff --git a/Source/7zip/Common/StdAfx.h b/Source/7zip/Common/StdAfx.h
index af02b27..d83e5c0 100755
--- a/Source/7zip/Common/StdAfx.h
+++ b/Source/7zip/Common/StdAfx.h
@@ -1,23 +1,23 @@
-/*
- * StdAfx.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __STDAFX_H
-#define __STDAFX_H
-
-// #include "MyWindows.h"
-
-#endif
+/*
+ * StdAfx.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __STDAFX_H
+#define __STDAFX_H
+
+// #include "MyWindows.h"
+
+#endif
diff --git a/Source/7zip/Common/Types.h b/Source/7zip/Common/Types.h
index 10791e4..4e28bf4 100755
--- a/Source/7zip/Common/Types.h
+++ b/Source/7zip/Common/Types.h
@@ -1,72 +1,72 @@
-/*
- * Types.h
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __COMMON_TYPES_H
-#define __COMMON_TYPES_H
-
-#ifndef _7ZIP_BYTE_DEFINED
-#define _7ZIP_BYTE_DEFINED
-typedef unsigned char Byte;
-#endif
-
-#ifndef _7ZIP_INT16_DEFINED
-#define _7ZIP_INT16_DEFINED
-typedef short Int16;
-#endif
-
-#ifndef _7ZIP_UINT16_DEFINED
-#define _7ZIP_UINT16_DEFINED
-typedef unsigned short UInt16;
-#endif
-
-#ifndef _7ZIP_INT32_DEFINED
-#define _7ZIP_INT32_DEFINED
-typedef int Int32;
-#endif
-
-#ifndef _7ZIP_UINT32_DEFINED
-#define _7ZIP_UINT32_DEFINED
-typedef unsigned int UInt32;
-#endif
-
-#ifdef _MSC_VER
-
-#ifndef _7ZIP_INT64_DEFINED
-#define _7ZIP_INT64_DEFINED
-typedef __int64 Int64;
-#endif
-
-#ifndef _7ZIP_UINT64_DEFINED
-#define _7ZIP_UINT64_DEFINED
-typedef unsigned __int64 UInt64;
-#endif
-
-#else
-
-#ifndef _7ZIP_INT64_DEFINED
-#define _7ZIP_INT64_DEFINED
-typedef long long int Int64;
-#endif
-
-#ifndef _7ZIP_UINT64_DEFINED
-#define _7ZIP_UINT64_DEFINED
-typedef unsigned long long int UInt64;
-#endif
-
-#endif
-
-#endif
+/*
+ * Types.h
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2006 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __COMMON_TYPES_H
+#define __COMMON_TYPES_H
+
+#ifndef _7ZIP_BYTE_DEFINED
+#define _7ZIP_BYTE_DEFINED
+typedef unsigned char Byte;
+#endif
+
+#ifndef _7ZIP_INT16_DEFINED
+#define _7ZIP_INT16_DEFINED
+typedef short Int16;
+#endif
+
+#ifndef _7ZIP_UINT16_DEFINED
+#define _7ZIP_UINT16_DEFINED
+typedef unsigned short UInt16;
+#endif
+
+#ifndef _7ZIP_INT32_DEFINED
+#define _7ZIP_INT32_DEFINED
+typedef int Int32;
+#endif
+
+#ifndef _7ZIP_UINT32_DEFINED
+#define _7ZIP_UINT32_DEFINED
+typedef unsigned int UInt32;
+#endif
+
+#ifdef _MSC_VER
+
+#ifndef _7ZIP_INT64_DEFINED
+#define _7ZIP_INT64_DEFINED
+typedef __int64 Int64;
+#endif
+
+#ifndef _7ZIP_UINT64_DEFINED
+#define _7ZIP_UINT64_DEFINED
+typedef unsigned __int64 UInt64;
+#endif
+
+#else
+
+#ifndef _7ZIP_INT64_DEFINED
+#define _7ZIP_INT64_DEFINED
+typedef long long int Int64;
+#endif
+
+#ifndef _7ZIP_UINT64_DEFINED
+#define _7ZIP_UINT64_DEFINED
+typedef unsigned long long int UInt64;
+#endif
+
+#endif
+
+#endif
diff --git a/Source/7zip/LZMADecode.c b/Source/7zip/LZMADecode.c
index e16d4c0..8b8fe0a 100755
--- a/Source/7zip/LZMADecode.c
+++ b/Source/7zip/LZMADecode.c
@@ -1,546 +1,546 @@
-/*
- * LZMADecode.c
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2007 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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.
- */
-
-#include <stdlib.h>
-#include "LZMADecode.h"
-
-#define LEAVE { goto saveStateAndReturn; }
-#define NEED_BYTE(c) case c: if (!avail_in) { mode = c; LEAVE; }
-#define NEED_BYTE_ if (!avail_in) LEAVE;
-#define NEXT_BYTE (avail_in--, *next_in++)
-#define NEED_OUT(c) case c: if (!avail_out) { mode = c; LEAVE; }
-#define PUT_BYTE_(b) { *next_out = b; next_out++; avail_out--; }
-#define PUT_BYTE(b) { totalOut++; PUT_BYTE_(b) }
-#define DECODE_BIT(c, x) prob = x; last = c; goto _LZMA_C_RDBD; case c:
-#define DECODE_LEN(c, x) probs = x; last2 = c; goto _LZMA_C_LEND; case c:
-#define DECODE_BIT_TREE(c, x, y) probs = x; numLevels = y; last3 = c; goto _LZMA_C_BTD; case c:
-
-enum {
- /* 0 */ LZMA_C_INIT = 0,
- /* 1 */ LZMA_C_GETDICT,
- /* 2 */ LZMA_C_BLOCK,
- /* 3 */ LZMA_C_RDI, /* RangeDecoderInit */
- /* 4 */ LZMA_C_RDBD, /* RangeDecoderBitDecode */
- /* 5 */ LZMA_C_RDBD_IN, /* RangeDecoderBitDecode */
- /* 6 */ LZMA_C_TYPE,
- /* 7 */ LZMA_C_ISREP,
- /* 8 */ LZMA_C_ISREPG0,
- /* 9 */ LZMA_C_ISREP0LONG,
- /* 10 */ LZMA_C_ISREPG1,
- /* 11 */ LZMA_C_ISREPG2,
- /* 12 */ LZMA_C_NORM,
- /* 13 */ LZMA_C_LITDM1, /* LzmaLiteralDecodeMatch */
- /* 14 */ LZMA_C_LITDM2, /* LzmaLiteralDecodeMatch */
- /* 15 */ LZMA_C_LITD, /* LzmaLiteralDecode */
- /* 16 */ LZMA_C_RDRBTD, /* RangeDecoderReverseBitTreeDecode */
- /* 17 */ LZMA_C_LEND, /* LzmaLenDecode */
- /* 18 */ LZMA_C_LEND1, /* LzmaLenDecode */
- /* 19 */ LZMA_C_LEND2, /* LzmaLenDecode */
- /* 20 */ LZMA_C_LEND_RES, /* LzmaLenDecode */
- /* 21 */ LZMA_C_LEND_C1,
- /* 22 */ LZMA_C_LEND_C2,
- /* 23 */ LZMA_C_BTD, /* RangeDecoderBitTreeDecode */
- /* 24 */ LZMA_C_BTD_LOOP,
- /* 25 */ LZMA_C_BTD_C1,
- /* 26 */ LZMA_C_OUTPUT_1,
- /* 27 */ LZMA_C_OUTPUT_2,
- /* 28 */ LZMA_C_OUTPUT_3
-};
-
-#define kNumTopBits 24
-#define kTopValue ((UInt32)1 << kNumTopBits)
-
-#define kNumBitModelTotalBits 11
-#define kBitModelTotal (1 << kNumBitModelTotalBits)
-#define kNumMoveBits 5
-
-#define RC_NORMALIZE(c) if (range < kTopValue) { NEED_BYTE(c); range <<= 8; code = (code << 8) | NEXT_BYTE; }
-
-#define RC_GET_BIT2(c, prob, mi, A0, A1) { \
- UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
- if (code < bound) \
- { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
- else \
- { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
- RC_NORMALIZE(c) \
-}
-
-#define RC_GET_BIT(c, prob, mi) RC_GET_BIT2(c, prob, mi, ; , ;)
-
-#define kNumPosBitsMax 4
-#define kNumPosStatesMax (1 << kNumPosBitsMax)
-
-#define kLenNumLowBits 3
-#define kLenNumLowSymbols (1 << kLenNumLowBits)
-#define kLenNumMidBits 3
-#define kLenNumMidSymbols (1 << kLenNumMidBits)
-#define kLenNumHighBits 8
-#define kLenNumHighSymbols (1 << kLenNumHighBits)
-
-#define LenChoice 0
-#define LenChoice2 (LenChoice + 1)
-#define LenLow (LenChoice2 + 1)
-#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
-#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
-#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
-
-#define kNumStates 12
-
-#define kStartPosModelIndex 4
-#define kEndPosModelIndex 14
-#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
-
-#define kNumPosSlotBits 6
-#define kNumLenToPosStates 4
-
-#define kNumAlignBits 4
-#define kAlignTableSize (1 << kNumAlignBits)
-
-#define kMatchMinLen 2
-
-#define IsMatch 0
-#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
-#define IsRepG0 (IsRep + kNumStates)
-#define IsRepG1 (IsRepG0 + kNumStates)
-#define IsRepG2 (IsRepG1 + kNumStates)
-#define IsRep0Long (IsRepG2 + kNumStates)
-#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
-#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
-#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
-#define LenCoder (Align + kAlignTableSize)
-#define RepLenCoder (LenCoder + kNumLenProbs)
-#define Literal (RepLenCoder + kNumLenProbs)
-
-#define LZMA_BASE_SIZE 1846
-#define LZMA_LIT_SIZE 768
-
-#if Literal != LZMA_BASE_SIZE
-StopCompilingDueBUG
-#endif
-
-void LZMACALL lzmaInit(lzma_stream *s)
-{
- /* size of lzma_stream minus the size of the two allocated buffer pointers.
- we don't want to lose to pointer or else we won't be able to free them. */
- size_t i = sizeof(lzma_stream) - (sizeof(unsigned char *) * 2);
- while (i--)
- ((Byte *)s)[i] = 0;
-
- s->rep0 = s->rep1 = s->rep2 = s->rep3 = 1;
- s->range = (0xFFFFFFFF);
-}
-
-int LZMACALL lzmaDecode(lzma_stream *s)
-{
- /* restore decoder state */
- lzma_stream _s = *s;
-
-#define mode _s.mode
-#define last _s.last
-#define last2 _s.last2
-#define last3 _s.last3
-
-#define p (*(CProb **) &_s.dynamicData)
-#define dynamicDataSize _s.dynamicDataSize
-
-#define state _s.state
-#define isPreviousMatch _s.isPreviousMatch
-#define previousByte _s.previousByte
-#define rep0 _s.rep0
-#define rep1 _s.rep1
-#define rep2 _s.rep2
-#define rep3 _s.rep3
-#define lc _s.lc
-#define len _s.len
-#define totalOut _s.totalOut
-
-#define dictionary _s.dictionary
-#define dictionarySize _s.dictionarySize
-#define dictionaryPos _s.dictionaryPos
-
-#define posStateMask _s.posStateMask
-#define literalPosMask _s.literalPosMask
-
-#define avail_in _s.avail_in
-#define next_in _s.next_in
-#define avail_out _s.avail_out
-#define next_out _s.next_out
-
-#define range _s.range
-#define code _s.code
-
-#define probs _s.probs
-#define prob _s.prob
-
-#define symbol _s.temp2
-#define bit _s.temp3
-#define matchBit _s.temp1
-#define i _s.temp1
-#define result _s.temp2
-#define numLevels _s.temp3
-#define posSlot _s.temp2
-#define newDictionarySize (*(UInt32*) &_s.temp3)
-
-#define matchByte _s.matchByte
-#define mi _s.mi
-#define posState _s.posState
-
- if (len == -1)
- return LZMA_STREAM_END;
-
- for (;;) switch (mode)
- {
- case LZMA_C_INIT:
- {
- Byte firstByte;
- UInt32 newDynamicDataSize;
- UInt32 numProbs;
- int lp;
- int pb;
-
- NEED_BYTE_;
-
- firstByte = NEXT_BYTE;
-
- if (firstByte > (9*5*5))
- return LZMA_DATA_ERROR;
-
- pb = firstByte / (9*5);
- firstByte %= (9*5);
- lp = firstByte / 9;
- firstByte %= 9;
- lc = firstByte;
-
- posStateMask = (1 << (pb)) - 1;
- literalPosMask = (1 << (lp)) - 1;
-
- numProbs = Literal + (LZMA_LIT_SIZE << (lc + pb));
- newDynamicDataSize = numProbs * sizeof(CProb);
-
- if (newDynamicDataSize != dynamicDataSize)
- {
- if (p)
- lzmafree(p);
- p = lzmaalloc(newDynamicDataSize);
- if (!p)
- return LZMA_NOT_ENOUGH_MEM;
- dynamicDataSize = newDynamicDataSize;
- }
-
- while (numProbs--)
- p[numProbs] = kBitModelTotal >> 1;
-
- for (i = 0, newDictionarySize = 0; i < 4; i++)
- {
- NEED_BYTE(LZMA_C_GETDICT);
- newDictionarySize |= NEXT_BYTE << (i * 8);
- }
-
- if (newDictionarySize != dictionarySize)
- {
- dictionarySize = newDictionarySize;
- if (dictionary)
- lzmafree(dictionary);
- dictionary = lzmaalloc(dictionarySize);
- if (!dictionary)
- return LZMA_NOT_ENOUGH_MEM;
- }
-
- dictionary[dictionarySize - 1] = 0;
-
- i = 5;
- while (i--)
- {
- NEED_BYTE(LZMA_C_RDI);
- code = (code << 8) | NEXT_BYTE;
- }
- }
- case LZMA_C_BLOCK:
- posState = (int)(totalOut & posStateMask);
- DECODE_BIT(LZMA_C_TYPE, p + IsMatch + (state << kNumPosBitsMax) + posState);
- if (bit == 0)
- {
- probs = p + Literal + (LZMA_LIT_SIZE *
- (((totalOut & literalPosMask) << lc) + (previousByte >> (8 - lc))));
-
- if (state < 4) state = 0;
- else if (state < 10) state -= 3;
- else state -= 6;
- if (isPreviousMatch)
- {
- UInt32 pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- matchByte = dictionary[pos];
- {
- symbol = 1;
- do
- {
- matchBit = (matchByte >> 7) & 1;
- matchByte <<= 1;
- {
- prob = probs + ((1 + matchBit) << 8) + symbol;
- RC_GET_BIT2(LZMA_C_LITDM1, prob, symbol, bit = 0, bit = 1)
- }
- if (matchBit != bit)
- {
- while (symbol < 0x100)
- {
- prob = probs + symbol;
- RC_GET_BIT(LZMA_C_LITDM2, prob, symbol)
- }
- break;
- }
- }
- while (symbol < 0x100);
- previousByte = symbol;
- }
- isPreviousMatch = 0;
- }
- else
- {
- symbol = 1;
- do
- {
- prob = probs + symbol;
- RC_GET_BIT(LZMA_C_LITD, prob, symbol)
- }
- while (symbol < 0x100);
- previousByte = symbol;
- }
- NEED_OUT(LZMA_C_OUTPUT_1);
- PUT_BYTE(previousByte);
- dictionary[dictionaryPos] = previousByte;
- dictionaryPos = (dictionaryPos + 1) % dictionarySize;
- }
- /* bit == 1 */
- else
- {
- isPreviousMatch = 1;
- DECODE_BIT(LZMA_C_ISREP, p + IsRep + state);
- if (bit == 1)
- {
- DECODE_BIT(LZMA_C_ISREPG0, p + IsRepG0 + state);
- if (bit == 0)
- {
- DECODE_BIT(LZMA_C_ISREP0LONG, p + IsRep0Long + (state << kNumPosBitsMax) + posState);
- if (bit == 0)
- {
- UInt32 pos;
- if (totalOut == 0)
- return LZMA_DATA_ERROR;
- state = state < 7 ? 9 : 11;
- NEED_OUT(LZMA_C_OUTPUT_2);
- pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- previousByte = dictionary[pos];
- dictionary[dictionaryPos] = previousByte;
- dictionaryPos = (dictionaryPos + 1) % dictionarySize;
- PUT_BYTE(previousByte);
- mode = LZMA_C_BLOCK;
- break;
- }
- }
- else
- {
- UInt32 distance;
- DECODE_BIT(LZMA_C_ISREPG1, p + IsRepG1 + state);
- if (bit == 0)
- {
- distance = rep1;
- }
- else
- {
- DECODE_BIT(LZMA_C_ISREPG2, p + IsRepG2 + state);
- if (bit == 0)
- distance = rep2;
- else
- {
- distance = rep3;
- rep3 = rep2;
- }
- rep2 = rep1;
- }
- rep1 = rep0;
- rep0 = distance;
- }
- DECODE_LEN(LZMA_C_LEND_C1, p + RepLenCoder);
- state = state < 7 ? 8 : 11;
- }
- else
- {
- rep3 = rep2;
- rep2 = rep1;
- rep1 = rep0;
- state = state < 7 ? 7 : 10;
- DECODE_LEN(LZMA_C_LEND_C2, p + LenCoder);
- DECODE_BIT_TREE(
- LZMA_C_BTD_C1,
- p + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits),
- kNumPosSlotBits
- );
- if (posSlot >= kStartPosModelIndex)
- {
- int numDirectBits = ((posSlot >> 1) - 1);
- rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
- if (posSlot < kEndPosModelIndex)
- {
- probs = p + SpecPos + rep0 - posSlot - 1;
- numLevels = numDirectBits;
- }
- else
- {
- int numTotalBits = numDirectBits - kNumAlignBits;
- result = 0;
- for (i = numTotalBits; i > 0; i--)
- {
- /* UInt32 t; */
- range >>= 1;
-
- result <<= 1;
- if (code >= range)
- {
- code -= range;
- result |= 1;
- }
- /*
- t = (code - range) >> 31;
- t &= 1;
- code -= range & (t - 1);
- result = (result + result) | (1 - t);
- */
- RC_NORMALIZE(LZMA_C_NORM)
- }
- rep0 += result << kNumAlignBits;
- probs = p + Align;
- numLevels = kNumAlignBits;
- }
- mi = 1;
- symbol = 0;
- for(i = 0; i < numLevels; i++)
- {
- prob = probs + mi;
- RC_GET_BIT2(LZMA_C_RDRBTD, prob, mi, ; , symbol |= (1 << i));
- }
- rep0 += symbol;
- }
- else
- rep0 = posSlot;
- rep0++;
- }
- if (rep0 == (UInt32)(0))
- {
- len = -1;
- LEAVE;
- }
- if (rep0 > totalOut)
- {
- return LZMA_DATA_ERROR;
- }
- len += kMatchMinLen;
- totalOut += len;
- do
- {
- UInt32 pos;
- NEED_OUT(LZMA_C_OUTPUT_3);
- pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- previousByte = dictionary[pos];
- dictionary[dictionaryPos] = previousByte;
- dictionaryPos = (dictionaryPos + 1) % dictionarySize;
- PUT_BYTE_(previousByte);
- len--;
- }
- while(len > 0);
- }
- mode = LZMA_C_BLOCK;
- break;
- case LZMA_C_RDBD:
- _LZMA_C_RDBD:
- {
- UInt32 bound = (range >> kNumBitModelTotalBits) * *prob;
- if (code < bound)
- {
- range = bound;
- *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
- bit = 0;
- }
- else
- {
- range -= bound;
- code -= bound;
- *prob -= (*prob) >> kNumMoveBits;
- bit = 1;
- }
- RC_NORMALIZE(LZMA_C_RDBD_IN);
- }
- mode = last;
- break;
- case LZMA_C_LEND:
- _LZMA_C_LEND:
- DECODE_BIT(LZMA_C_LEND1, probs + LenChoice);
- if (bit == 0)
- {
- len = 0;
- probs += LenLow + (posState << kLenNumLowBits);
- numLevels = kLenNumLowBits;
- }
- else {
- DECODE_BIT(LZMA_C_LEND2, probs + LenChoice2);
- if (bit == 0)
- {
- len = kLenNumLowSymbols;
- probs += + LenMid + (posState << kLenNumMidBits);
- numLevels = kLenNumMidBits;
- }
- else
- {
- len = kLenNumLowSymbols + kLenNumMidSymbols;
- probs += LenHigh;
- numLevels = kLenNumHighBits;
- }
- }
-
- last3 = LZMA_C_LEND_RES;
- case LZMA_C_BTD:
- _LZMA_C_BTD:
- mi = 1;
- for(i = numLevels; i > 0; i--)
- {
- prob = probs + mi;
- RC_GET_BIT(LZMA_C_BTD_LOOP, prob, mi)
- }
- result = mi - (1 << numLevels);
- mode = last3;
- break;
- case LZMA_C_LEND_RES:
- len += result;
- mode = last2;
- break;
- default:
- return LZMA_DATA_ERROR;
- }
-
-saveStateAndReturn:
-
- /* save decoder state */
- *s = _s;
-
- return LZMA_OK;
-}
+/*
+ * LZMADecode.c
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2007 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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.
+ */
+
+#include <stdlib.h>
+#include "LZMADecode.h"
+
+#define LEAVE { goto saveStateAndReturn; }
+#define NEED_BYTE(c) case c: if (!avail_in) { mode = c; LEAVE; }
+#define NEED_BYTE_ if (!avail_in) LEAVE;
+#define NEXT_BYTE (avail_in--, *next_in++)
+#define NEED_OUT(c) case c: if (!avail_out) { mode = c; LEAVE; }
+#define PUT_BYTE_(b) { *next_out = b; next_out++; avail_out--; }
+#define PUT_BYTE(b) { totalOut++; PUT_BYTE_(b) }
+#define DECODE_BIT(c, x) prob = x; last = c; goto _LZMA_C_RDBD; case c:
+#define DECODE_LEN(c, x) probs = x; last2 = c; goto _LZMA_C_LEND; case c:
+#define DECODE_BIT_TREE(c, x, y) probs = x; numLevels = y; last3 = c; goto _LZMA_C_BTD; case c:
+
+enum {
+ /* 0 */ LZMA_C_INIT = 0,
+ /* 1 */ LZMA_C_GETDICT,
+ /* 2 */ LZMA_C_BLOCK,
+ /* 3 */ LZMA_C_RDI, /* RangeDecoderInit */
+ /* 4 */ LZMA_C_RDBD, /* RangeDecoderBitDecode */
+ /* 5 */ LZMA_C_RDBD_IN, /* RangeDecoderBitDecode */
+ /* 6 */ LZMA_C_TYPE,
+ /* 7 */ LZMA_C_ISREP,
+ /* 8 */ LZMA_C_ISREPG0,
+ /* 9 */ LZMA_C_ISREP0LONG,
+ /* 10 */ LZMA_C_ISREPG1,
+ /* 11 */ LZMA_C_ISREPG2,
+ /* 12 */ LZMA_C_NORM,
+ /* 13 */ LZMA_C_LITDM1, /* LzmaLiteralDecodeMatch */
+ /* 14 */ LZMA_C_LITDM2, /* LzmaLiteralDecodeMatch */
+ /* 15 */ LZMA_C_LITD, /* LzmaLiteralDecode */
+ /* 16 */ LZMA_C_RDRBTD, /* RangeDecoderReverseBitTreeDecode */
+ /* 17 */ LZMA_C_LEND, /* LzmaLenDecode */
+ /* 18 */ LZMA_C_LEND1, /* LzmaLenDecode */
+ /* 19 */ LZMA_C_LEND2, /* LzmaLenDecode */
+ /* 20 */ LZMA_C_LEND_RES, /* LzmaLenDecode */
+ /* 21 */ LZMA_C_LEND_C1,
+ /* 22 */ LZMA_C_LEND_C2,
+ /* 23 */ LZMA_C_BTD, /* RangeDecoderBitTreeDecode */
+ /* 24 */ LZMA_C_BTD_LOOP,
+ /* 25 */ LZMA_C_BTD_C1,
+ /* 26 */ LZMA_C_OUTPUT_1,
+ /* 27 */ LZMA_C_OUTPUT_2,
+ /* 28 */ LZMA_C_OUTPUT_3
+};
+
+#define kNumTopBits 24
+#define kTopValue ((UInt32)1 << kNumTopBits)
+
+#define kNumBitModelTotalBits 11
+#define kBitModelTotal (1 << kNumBitModelTotalBits)
+#define kNumMoveBits 5
+
+#define RC_NORMALIZE(c) if (range < kTopValue) { NEED_BYTE(c); range <<= 8; code = (code << 8) | NEXT_BYTE; }
+
+#define RC_GET_BIT2(c, prob, mi, A0, A1) { \
+ UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
+ if (code < bound) \
+ { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
+ else \
+ { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
+ RC_NORMALIZE(c) \
+}
+
+#define RC_GET_BIT(c, prob, mi) RC_GET_BIT2(c, prob, mi, ; , ;)
+
+#define kNumPosBitsMax 4
+#define kNumPosStatesMax (1 << kNumPosBitsMax)
+
+#define kLenNumLowBits 3
+#define kLenNumLowSymbols (1 << kLenNumLowBits)
+#define kLenNumMidBits 3
+#define kLenNumMidSymbols (1 << kLenNumMidBits)
+#define kLenNumHighBits 8
+#define kLenNumHighSymbols (1 << kLenNumHighBits)
+
+#define LenChoice 0
+#define LenChoice2 (LenChoice + 1)
+#define LenLow (LenChoice2 + 1)
+#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
+#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+
+#define kNumStates 12
+
+#define kStartPosModelIndex 4
+#define kEndPosModelIndex 14
+#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
+
+#define kNumPosSlotBits 6
+#define kNumLenToPosStates 4
+
+#define kNumAlignBits 4
+#define kAlignTableSize (1 << kNumAlignBits)
+
+#define kMatchMinLen 2
+
+#define IsMatch 0
+#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
+#define IsRepG0 (IsRep + kNumStates)
+#define IsRepG1 (IsRepG0 + kNumStates)
+#define IsRepG2 (IsRepG1 + kNumStates)
+#define IsRep0Long (IsRepG2 + kNumStates)
+#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
+#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
+#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
+#define LenCoder (Align + kAlignTableSize)
+#define RepLenCoder (LenCoder + kNumLenProbs)
+#define Literal (RepLenCoder + kNumLenProbs)
+
+#define LZMA_BASE_SIZE 1846
+#define LZMA_LIT_SIZE 768
+
+#if Literal != LZMA_BASE_SIZE
+StopCompilingDueBUG
+#endif
+
+void LZMACALL lzmaInit(lzma_stream *s)
+{
+ /* size of lzma_stream minus the size of the two allocated buffer pointers.
+ we don't want to lose to pointer or else we won't be able to free them. */
+ size_t i = sizeof(lzma_stream) - (sizeof(unsigned char *) * 2);
+ while (i--)
+ ((Byte *)s)[i] = 0;
+
+ s->rep0 = s->rep1 = s->rep2 = s->rep3 = 1;
+ s->range = (0xFFFFFFFF);
+}
+
+int LZMACALL lzmaDecode(lzma_stream *s)
+{
+ /* restore decoder state */
+ lzma_stream _s = *s;
+
+#define mode _s.mode
+#define last _s.last
+#define last2 _s.last2
+#define last3 _s.last3
+
+#define p (*(CProb **) &_s.dynamicData)
+#define dynamicDataSize _s.dynamicDataSize
+
+#define state _s.state
+#define isPreviousMatch _s.isPreviousMatch
+#define previousByte _s.previousByte
+#define rep0 _s.rep0
+#define rep1 _s.rep1
+#define rep2 _s.rep2
+#define rep3 _s.rep3
+#define lc _s.lc
+#define len _s.len
+#define totalOut _s.totalOut
+
+#define dictionary _s.dictionary
+#define dictionarySize _s.dictionarySize
+#define dictionaryPos _s.dictionaryPos
+
+#define posStateMask _s.posStateMask
+#define literalPosMask _s.literalPosMask
+
+#define avail_in _s.avail_in
+#define next_in _s.next_in
+#define avail_out _s.avail_out
+#define next_out _s.next_out
+
+#define range _s.range
+#define code _s.code
+
+#define probs _s.probs
+#define prob _s.prob
+
+#define symbol _s.temp2
+#define bit _s.temp3
+#define matchBit _s.temp1
+#define i _s.temp1
+#define result _s.temp2
+#define numLevels _s.temp3
+#define posSlot _s.temp2
+#define newDictionarySize (*(UInt32*) &_s.temp3)
+
+#define matchByte _s.matchByte
+#define mi _s.mi
+#define posState _s.posState
+
+ if (len == -1)
+ return LZMA_STREAM_END;
+
+ for (;;) switch (mode)
+ {
+ case LZMA_C_INIT:
+ {
+ Byte firstByte;
+ UInt32 newDynamicDataSize;
+ UInt32 numProbs;
+ int lp;
+ int pb;
+
+ NEED_BYTE_;
+
+ firstByte = NEXT_BYTE;
+
+ if (firstByte > (9*5*5))
+ return LZMA_DATA_ERROR;
+
+ pb = firstByte / (9*5);
+ firstByte %= (9*5);
+ lp = firstByte / 9;
+ firstByte %= 9;
+ lc = firstByte;
+
+ posStateMask = (1 << (pb)) - 1;
+ literalPosMask = (1 << (lp)) - 1;
+
+ numProbs = Literal + (LZMA_LIT_SIZE << (lc + pb));
+ newDynamicDataSize = numProbs * sizeof(CProb);
+
+ if (newDynamicDataSize != dynamicDataSize)
+ {
+ if (p)
+ lzmafree(p);
+ p = lzmaalloc(newDynamicDataSize);
+ if (!p)
+ return LZMA_NOT_ENOUGH_MEM;
+ dynamicDataSize = newDynamicDataSize;
+ }
+
+ while (numProbs--)
+ p[numProbs] = kBitModelTotal >> 1;
+
+ for (i = 0, newDictionarySize = 0; i < 4; i++)
+ {
+ NEED_BYTE(LZMA_C_GETDICT);
+ newDictionarySize |= NEXT_BYTE << (i * 8);
+ }
+
+ if (newDictionarySize != dictionarySize)
+ {
+ dictionarySize = newDictionarySize;
+ if (dictionary)
+ lzmafree(dictionary);
+ dictionary = lzmaalloc(dictionarySize);
+ if (!dictionary)
+ return LZMA_NOT_ENOUGH_MEM;
+ }
+
+ dictionary[dictionarySize - 1] = 0;
+
+ i = 5;
+ while (i--)
+ {
+ NEED_BYTE(LZMA_C_RDI);
+ code = (code << 8) | NEXT_BYTE;
+ }
+ }
+ case LZMA_C_BLOCK:
+ posState = (int)(totalOut & posStateMask);
+ DECODE_BIT(LZMA_C_TYPE, p + IsMatch + (state << kNumPosBitsMax) + posState);
+ if (bit == 0)
+ {
+ probs = p + Literal + (LZMA_LIT_SIZE *
+ (((totalOut & literalPosMask) << lc) + (previousByte >> (8 - lc))));
+
+ if (state < 4) state = 0;
+ else if (state < 10) state -= 3;
+ else state -= 6;
+ if (isPreviousMatch)
+ {
+ UInt32 pos = dictionaryPos - rep0;
+ if (pos >= dictionarySize)
+ pos += dictionarySize;
+ matchByte = dictionary[pos];
+ {
+ symbol = 1;
+ do
+ {
+ matchBit = (matchByte >> 7) & 1;
+ matchByte <<= 1;
+ {
+ prob = probs + ((1 + matchBit) << 8) + symbol;
+ RC_GET_BIT2(LZMA_C_LITDM1, prob, symbol, bit = 0, bit = 1)
+ }
+ if (matchBit != bit)
+ {
+ while (symbol < 0x100)
+ {
+ prob = probs + symbol;
+ RC_GET_BIT(LZMA_C_LITDM2, prob, symbol)
+ }
+ break;
+ }
+ }
+ while (symbol < 0x100);
+ previousByte = symbol;
+ }
+ isPreviousMatch = 0;
+ }
+ else
+ {
+ symbol = 1;
+ do
+ {
+ prob = probs + symbol;
+ RC_GET_BIT(LZMA_C_LITD, prob, symbol)
+ }
+ while (symbol < 0x100);
+ previousByte = symbol;
+ }
+ NEED_OUT(LZMA_C_OUTPUT_1);
+ PUT_BYTE(previousByte);
+ dictionary[dictionaryPos] = previousByte;
+ dictionaryPos = (dictionaryPos + 1) % dictionarySize;
+ }
+ /* bit == 1 */
+ else
+ {
+ isPreviousMatch = 1;
+ DECODE_BIT(LZMA_C_ISREP, p + IsRep + state);
+ if (bit == 1)
+ {
+ DECODE_BIT(LZMA_C_ISREPG0, p + IsRepG0 + state);
+ if (bit == 0)
+ {
+ DECODE_BIT(LZMA_C_ISREP0LONG, p + IsRep0Long + (state << kNumPosBitsMax) + posState);
+ if (bit == 0)
+ {
+ UInt32 pos;
+ if (totalOut == 0)
+ return LZMA_DATA_ERROR;
+ state = state < 7 ? 9 : 11;
+ NEED_OUT(LZMA_C_OUTPUT_2);
+ pos = dictionaryPos - rep0;
+ if (pos >= dictionarySize)
+ pos += dictionarySize;
+ previousByte = dictionary[pos];
+ dictionary[dictionaryPos] = previousByte;
+ dictionaryPos = (dictionaryPos + 1) % dictionarySize;
+ PUT_BYTE(previousByte);
+ mode = LZMA_C_BLOCK;
+ break;
+ }
+ }
+ else
+ {
+ UInt32 distance;
+ DECODE_BIT(LZMA_C_ISREPG1, p + IsRepG1 + state);
+ if (bit == 0)
+ {
+ distance = rep1;
+ }
+ else
+ {
+ DECODE_BIT(LZMA_C_ISREPG2, p + IsRepG2 + state);
+ if (bit == 0)
+ distance = rep2;
+ else
+ {
+ distance = rep3;
+ rep3 = rep2;
+ }
+ rep2 = rep1;
+ }
+ rep1 = rep0;
+ rep0 = distance;
+ }
+ DECODE_LEN(LZMA_C_LEND_C1, p + RepLenCoder);
+ state = state < 7 ? 8 : 11;
+ }
+ else
+ {
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ state = state < 7 ? 7 : 10;
+ DECODE_LEN(LZMA_C_LEND_C2, p + LenCoder);
+ DECODE_BIT_TREE(
+ LZMA_C_BTD_C1,
+ p + PosSlot + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits),
+ kNumPosSlotBits
+ );
+ if (posSlot >= kStartPosModelIndex)
+ {
+ int numDirectBits = ((posSlot >> 1) - 1);
+ rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
+ if (posSlot < kEndPosModelIndex)
+ {
+ probs = p + SpecPos + rep0 - posSlot - 1;
+ numLevels = numDirectBits;
+ }
+ else
+ {
+ int numTotalBits = numDirectBits - kNumAlignBits;
+ result = 0;
+ for (i = numTotalBits; i > 0; i--)
+ {
+ /* UInt32 t; */
+ range >>= 1;
+
+ result <<= 1;
+ if (code >= range)
+ {
+ code -= range;
+ result |= 1;
+ }
+ /*
+ t = (code - range) >> 31;
+ t &= 1;
+ code -= range & (t - 1);
+ result = (result + result) | (1 - t);
+ */
+ RC_NORMALIZE(LZMA_C_NORM)
+ }
+ rep0 += result << kNumAlignBits;
+ probs = p + Align;
+ numLevels = kNumAlignBits;
+ }
+ mi = 1;
+ symbol = 0;
+ for(i = 0; i < numLevels; i++)
+ {
+ prob = probs + mi;
+ RC_GET_BIT2(LZMA_C_RDRBTD, prob, mi, ; , symbol |= (1 << i));
+ }
+ rep0 += symbol;
+ }
+ else
+ rep0 = posSlot;
+ rep0++;
+ }
+ if (rep0 == (UInt32)(0))
+ {
+ len = -1;
+ LEAVE;
+ }
+ if (rep0 > totalOut)
+ {
+ return LZMA_DATA_ERROR;
+ }
+ len += kMatchMinLen;
+ totalOut += len;
+ do
+ {
+ UInt32 pos;
+ NEED_OUT(LZMA_C_OUTPUT_3);
+ pos = dictionaryPos - rep0;
+ if (pos >= dictionarySize)
+ pos += dictionarySize;
+ previousByte = dictionary[pos];
+ dictionary[dictionaryPos] = previousByte;
+ dictionaryPos = (dictionaryPos + 1) % dictionarySize;
+ PUT_BYTE_(previousByte);
+ len--;
+ }
+ while(len > 0);
+ }
+ mode = LZMA_C_BLOCK;
+ break;
+ case LZMA_C_RDBD:
+ _LZMA_C_RDBD:
+ {
+ UInt32 bound = (range >> kNumBitModelTotalBits) * *prob;
+ if (code < bound)
+ {
+ range = bound;
+ *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
+ bit = 0;
+ }
+ else
+ {
+ range -= bound;
+ code -= bound;
+ *prob -= (*prob) >> kNumMoveBits;
+ bit = 1;
+ }
+ RC_NORMALIZE(LZMA_C_RDBD_IN);
+ }
+ mode = last;
+ break;
+ case LZMA_C_LEND:
+ _LZMA_C_LEND:
+ DECODE_BIT(LZMA_C_LEND1, probs + LenChoice);
+ if (bit == 0)
+ {
+ len = 0;
+ probs += LenLow + (posState << kLenNumLowBits);
+ numLevels = kLenNumLowBits;
+ }
+ else {
+ DECODE_BIT(LZMA_C_LEND2, probs + LenChoice2);
+ if (bit == 0)
+ {
+ len = kLenNumLowSymbols;
+ probs += + LenMid + (posState << kLenNumMidBits);
+ numLevels = kLenNumMidBits;
+ }
+ else
+ {
+ len = kLenNumLowSymbols + kLenNumMidSymbols;
+ probs += LenHigh;
+ numLevels = kLenNumHighBits;
+ }
+ }
+
+ last3 = LZMA_C_LEND_RES;
+ case LZMA_C_BTD:
+ _LZMA_C_BTD:
+ mi = 1;
+ for(i = numLevels; i > 0; i--)
+ {
+ prob = probs + mi;
+ RC_GET_BIT(LZMA_C_BTD_LOOP, prob, mi)
+ }
+ result = mi - (1 << numLevels);
+ mode = last3;
+ break;
+ case LZMA_C_LEND_RES:
+ len += result;
+ mode = last2;
+ break;
+ default:
+ return LZMA_DATA_ERROR;
+ }
+
+saveStateAndReturn:
+
+ /* save decoder state */
+ *s = _s;
+
+ return LZMA_OK;
+}
diff --git a/Source/7zip/LZMADecode.h b/Source/7zip/LZMADecode.h
index dddf709..fd87af7 100755
--- a/Source/7zip/LZMADecode.h
+++ b/Source/7zip/LZMADecode.h
@@ -1,138 +1,138 @@
-/*
- * LZMADecode.c
- *
- * This file is a part of LZMA compression module for NSIS.
- *
- * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
- * Modifications Copyright (C) 2003-2007 Amir Szekely <kichik@netvision.net.il>
- *
- * Licensed under the Common Public License version 1.0 (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 __LZMADECODE_H
-#define __LZMADECODE_H
-
-/***********************
- * Configuration *
- ***********************/
-
-#include "../Platform.h"
-
-/* #define _LZMA_PROB32 */
-/* It can increase speed on some 32-bit CPUs,
- but memory usage will be doubled in that case */
-
-#ifdef _WIN32
-# define lzmaalloc(bytes) GlobalAlloc(GPTR,bytes)
-# define lzmafree GlobalFree
-#endif
-
-/***********************
- * Configuration End *
- ***********************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef lzmaalloc
-#define lzmaalloc malloc
-#endif
-
-#ifndef lzmafree
-#define lzmafree free
-#endif
-
-#ifndef LZMACALL
-# define LZMACALL
-#endif
-
-#ifndef UInt32
-#ifdef _LZMA_UINT32_IS_ULONG
-#define UInt32 unsigned long
-#else
-#define UInt32 unsigned int
-#endif
-#endif
-
-#ifdef _LZMA_PROB32
-#define CProb UInt32
-#else
-#define CProb unsigned short
-#endif
-
-typedef unsigned char Byte;
-
-#define LZMA_STREAM_END 1
-#define LZMA_OK 0
-#define LZMA_DATA_ERROR -1
-/* we don't really care what the problem is... */
-/* #define LZMA_RESULT_NOT_ENOUGH_MEM -2 */
-#define LZMA_NOT_ENOUGH_MEM -1
-
-typedef struct
-{
- /* mode control */
- int mode;
- int last;
- int last2;
- int last3;
-
- /* properties */
- UInt32 dynamicDataSize;
- UInt32 dictionarySize;
-
- /* io */
- Byte *next_in; /* next input byte */
- UInt32 avail_in; /* number of bytes available at next_in */
-
- Byte *next_out; /* next output byte should be put there */
- UInt32 avail_out; /* remaining free space at next_out */
-
- UInt32 totalOut; /* total output - not always correct when lzmaDecode returns */
-
- /* saved state */
- Byte previousByte;
- Byte matchByte;
- CProb *probs;
- CProb *prob;
- int mi;
- int posState;
- int temp1;
- int temp2;
- int temp3;
- int lc;
- int state;
- int isPreviousMatch;
- int len;
- UInt32 rep0;
- UInt32 rep1;
- UInt32 rep2;
- UInt32 rep3;
- UInt32 posStateMask;
- UInt32 literalPosMask;
- UInt32 dictionaryPos;
-
- /* range coder */
- UInt32 range;
- UInt32 code;
-
- /* allocated buffers */
- Byte *dictionary;
- Byte *dynamicData;
-} lzma_stream;
-
-void LZMACALL lzmaInit(lzma_stream *);
-int LZMACALL lzmaDecode(lzma_stream *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+/*
+ * LZMADecode.c
+ *
+ * This file is a part of LZMA compression module for NSIS.
+ *
+ * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov
+ * Modifications Copyright (C) 2003-2007 Amir Szekely <kichik@netvision.net.il>
+ *
+ * Licensed under the Common Public License version 1.0 (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 __LZMADECODE_H
+#define __LZMADECODE_H
+
+/***********************
+ * Configuration *
+ ***********************/
+
+#include "../Platform.h"
+
+/* #define _LZMA_PROB32 */
+/* It can increase speed on some 32-bit CPUs,
+ but memory usage will be doubled in that case */
+
+#ifdef _WIN32
+# define lzmaalloc(bytes) GlobalAlloc(GPTR,bytes)
+# define lzmafree GlobalFree
+#endif
+
+/***********************
+ * Configuration End *
+ ***********************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef lzmaalloc
+#define lzmaalloc malloc
+#endif
+
+#ifndef lzmafree
+#define lzmafree free
+#endif
+
+#ifndef LZMACALL
+# define LZMACALL
+#endif
+
+#ifndef UInt32
+#ifdef _LZMA_UINT32_IS_ULONG
+#define UInt32 unsigned long
+#else
+#define UInt32 unsigned int
+#endif
+#endif
+
+#ifdef _LZMA_PROB32
+#define CProb UInt32
+#else
+#define CProb unsigned short
+#endif
+
+typedef unsigned char Byte;
+
+#define LZMA_STREAM_END 1
+#define LZMA_OK 0
+#define LZMA_DATA_ERROR -1
+/* we don't really care what the problem is... */
+/* #define LZMA_RESULT_NOT_ENOUGH_MEM -2 */
+#define LZMA_NOT_ENOUGH_MEM -1
+
+typedef struct
+{
+ /* mode control */
+ int mode;
+ int last;
+ int last2;
+ int last3;
+
+ /* properties */
+ UInt32 dynamicDataSize;
+ UInt32 dictionarySize;
+
+ /* io */
+ Byte *next_in; /* next input byte */
+ UInt32 avail_in; /* number of bytes available at next_in */
+
+ Byte *next_out; /* next output byte should be put there */
+ UInt32 avail_out; /* remaining free space at next_out */
+
+ UInt32 totalOut; /* total output - not always correct when lzmaDecode returns */
+
+ /* saved state */
+ Byte previousByte;
+ Byte matchByte;
+ CProb *probs;
+ CProb *prob;
+ int mi;
+ int posState;
+ int temp1;
+ int temp2;
+ int temp3;
+ int lc;
+ int state;
+ int isPreviousMatch;
+ int len;
+ UInt32 rep0;
+ UInt32 rep1;
+ UInt32 rep2;
+ UInt32 rep3;
+ UInt32 posStateMask;
+ UInt32 literalPosMask;
+ UInt32 dictionaryPos;
+
+ /* range coder */
+ UInt32 range;
+ UInt32 code;
+
+ /* allocated buffers */
+ Byte *dictionary;
+ Byte *dynamicData;
+} lzma_stream;
+
+void LZMACALL lzmaInit(lzma_stream *);
+int LZMACALL lzmaDecode(lzma_stream *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Source/7zip/sdk.diff b/Source/7zip/sdk.diff
index 3390ad0..647ed11 100755
--- a/Source/7zip/sdk.diff
+++ b/Source/7zip/sdk.diff
@@ -1,167 +1,167 @@
-Only in 7zip: 7zGuids.cpp
-Only in 7zip-orig/7zip: Archive
-Only in 7zip/7zip: CVS
-Only in 7zip/7zip/Common: CVS
-Only in 7zip-orig/7zip/Common: FileStreams.cpp
-Only in 7zip-orig/7zip/Common: FileStreams.h
-diff -ru 7zip-orig/7zip/Common/StdAfx.h 7zip/7zip/Common/StdAfx.h
---- 7zip-orig/7zip/Common/StdAfx.h Mon Jul 11 15:14:54 2005
-+++ 7zip/7zip/Common/StdAfx.h Mon Oct 16 10:39:10 2006
-@@ -4,6 +4,5 @@
- #define __STDAFX_H
-
- #include "../../Common/MyWindows.h"
--#include "../../Common/NewHandler.h"
-
- #endif
-Only in 7zip-orig/7zip/Compress: Branch
-Only in 7zip/7zip/Compress: CVS
-Only in 7zip/7zip/Compress/LZ/BinTree: BinTree3ZMain.h
-Only in 7zip/7zip/Compress/LZ/BinTree: BinTree4b.h
-Only in 7zip/7zip/Compress/LZ/BinTree: BinTreeMF.h
-Only in 7zip/7zip/Compress/LZ/BinTree: BinTreeMFMain.h
-Only in 7zip/7zip/Compress/LZ/BinTree: CVS
-Only in 7zip/7zip/Compress/LZ: CVS
-Only in 7zip-orig/7zip/Compress/LZ: HashChain
-Only in 7zip/7zip/Compress/LZMA: CVS
-Only in 7zip-orig/7zip/Compress/LZMA: LZMADecoder.cpp
-Only in 7zip-orig/7zip/Compress/LZMA: LZMADecoder.h
-diff -ru 7zip-orig/7zip/Compress/LZMA/LZMAEncoder.cpp 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
---- 7zip-orig/7zip/Compress/LZMA/LZMAEncoder.cpp Sat May 20 08:23:48 2006
-+++ 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp Mon Oct 16 10:26:43 2006
-@@ -55,13 +55,13 @@
- kHC4
- };
-
--static const wchar_t *kMatchFinderIDs[] =
-+/*static const wchar_t *kMatchFinderIDs[] =
- {
- L"BT2",
- L"BT3",
- L"BT4",
- L"HC4"
--};
-+};*/
-
- Byte g_FastPos[1 << 11];
-
-@@ -318,7 +318,7 @@
- return S_OK;
- }
-
--static bool AreStringsEqual(const wchar_t *base, const wchar_t *testString)
-+/*static bool AreStringsEqual(const wchar_t *base, const wchar_t *testString)
- {
- while (true)
- {
-@@ -340,7 +340,7 @@
- if (AreStringsEqual(kMatchFinderIDs[m], s))
- return m;
- return -1;
--}
-+}*/
-
- STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs,
- const PROPVARIANT *properties, UInt32 numProperties)
-@@ -378,7 +378,8 @@
- }
- case NCoderPropID::kMatchFinder:
- {
-- if (prop.vt != VT_BSTR)
-+ return E_NOTIMPL;
-+ /*if (prop.vt != VT_BSTR)
- return E_INVALIDARG;
- int matchFinderIndexPrev = _matchFinderIndex;
- int m = FindMatchFinder(prop.bstrVal);
-@@ -390,7 +391,7 @@
- _dictionarySizePrev = (UInt32)-1;
- ReleaseMatchFinder();
- }
-- break;
-+ break;*/
- }
- #ifdef COMPRESS_MF_MT
- case NCoderPropID::kMultiThread:
-Only in 7zip-orig/7zip/Compress: LZMA_Alone
-Only in 7zip-orig/7zip/Compress: LZMA_C
-Only in 7zip/7zip/Compress/RangeCoder: CVS
-Only in 7zip: CVS
-Only in 7zip/Common: CVS
-Only in 7zip-orig/Common: C_FileIO.cpp
-Only in 7zip-orig/Common: C_FileIO.h
-Only in 7zip-orig/Common: ComTry.h
-Only in 7zip-orig/Common: CommandLineParser.cpp
-Only in 7zip-orig/Common: CommandLineParser.h
-Only in 7zip-orig/Common: MyInitGuid.h
-diff -ru 7zip-orig/Common/MyWindows.h 7zip/Common/MyWindows.h
---- 7zip-orig/Common/MyWindows.h Sun Apr 16 16:53:43 2006
-+++ 7zip/Common/MyWindows.h Mon Oct 16 10:20:04 2006
-@@ -3,17 +3,22 @@
- #ifndef __MYWINDOWS_H
- #define __MYWINDOWS_H
-
-+#include "../../Platform.h"
-+
- #ifdef _WIN32
-
- #include <windows.h>
-
-+/*
- #define CHAR_PATH_SEPARATOR '\\'
- #define WCHAR_PATH_SEPARATOR L'\\'
- #define STRING_PATH_SEPARATOR "\\"
- #define WSTRING_PATH_SEPARATOR L"\\"
-+*/
-
- #else
-
-+/*
- #define CHAR_PATH_SEPARATOR '/'
- #define WCHAR_PATH_SEPARATOR L'/'
- #define STRING_PATH_SEPARATOR "/"
-@@ -21,9 +26,9 @@
-
- #include <stddef.h> // for wchar_t
- #include <string.h>
--
-+*/
- #include "MyGuidDef.h"
--
-+/*
- typedef char CHAR;
- typedef unsigned char UCHAR;
-
-@@ -62,7 +67,7 @@
- typedef OLECHAR *BSTR;
- typedef const OLECHAR *LPCOLESTR;
- typedef OLECHAR *LPOLESTR;
--
-+*/
- typedef struct _FILETIME
- {
- DWORD dwLowDateTime;
-Only in 7zip-orig/Common: NewHandler.cpp
-Only in 7zip-orig/Common: NewHandler.h
-diff -ru 7zip-orig/Common/StdAfx.h 7zip/Common/StdAfx.h
---- 7zip-orig/Common/StdAfx.h Mon Jul 11 15:16:00 2005
-+++ 7zip/Common/StdAfx.h Mon Oct 16 10:39:16 2006
-@@ -4,6 +4,5 @@
- #define __STDAFX_H
-
- // #include "MyWindows.h"
--#include "NewHandler.h"
-
- #endif
-Only in 7zip-orig/Common: String.cpp
-Only in 7zip-orig/Common: String.h
-Only in 7zip-orig/Common: StringConvert.cpp
-Only in 7zip-orig/Common: StringConvert.h
-Only in 7zip-orig/Common: StringToInt.cpp
-Only in 7zip-orig/Common: StringToInt.h
-Only in 7zip-orig/Common: Vector.cpp
-Only in 7zip-orig/Common: Vector.h
-Only in 7zip: LZMADecode.c
-Only in 7zip: LZMADecode.h
-Only in 7zip-orig: Windows
-Only in 7zip: copying.txt
-Only in 7zip: readme.txt
+Only in 7zip: 7zGuids.cpp
+Only in 7zip-orig/7zip: Archive
+Only in 7zip/7zip: CVS
+Only in 7zip/7zip/Common: CVS
+Only in 7zip-orig/7zip/Common: FileStreams.cpp
+Only in 7zip-orig/7zip/Common: FileStreams.h
+diff -ru 7zip-orig/7zip/Common/StdAfx.h 7zip/7zip/Common/StdAfx.h
+--- 7zip-orig/7zip/Common/StdAfx.h Mon Jul 11 15:14:54 2005
++++ 7zip/7zip/Common/StdAfx.h Mon Oct 16 10:39:10 2006
+@@ -4,6 +4,5 @@
+ #define __STDAFX_H
+
+ #include "../../Common/MyWindows.h"
+-#include "../../Common/NewHandler.h"
+
+ #endif
+Only in 7zip-orig/7zip/Compress: Branch
+Only in 7zip/7zip/Compress: CVS
+Only in 7zip/7zip/Compress/LZ/BinTree: BinTree3ZMain.h
+Only in 7zip/7zip/Compress/LZ/BinTree: BinTree4b.h
+Only in 7zip/7zip/Compress/LZ/BinTree: BinTreeMF.h
+Only in 7zip/7zip/Compress/LZ/BinTree: BinTreeMFMain.h
+Only in 7zip/7zip/Compress/LZ/BinTree: CVS
+Only in 7zip/7zip/Compress/LZ: CVS
+Only in 7zip-orig/7zip/Compress/LZ: HashChain
+Only in 7zip/7zip/Compress/LZMA: CVS
+Only in 7zip-orig/7zip/Compress/LZMA: LZMADecoder.cpp
+Only in 7zip-orig/7zip/Compress/LZMA: LZMADecoder.h
+diff -ru 7zip-orig/7zip/Compress/LZMA/LZMAEncoder.cpp 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
+--- 7zip-orig/7zip/Compress/LZMA/LZMAEncoder.cpp Sat May 20 08:23:48 2006
++++ 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp Mon Oct 16 10:26:43 2006
+@@ -55,13 +55,13 @@
+ kHC4
+ };
+
+-static const wchar_t *kMatchFinderIDs[] =
++/*static const wchar_t *kMatchFinderIDs[] =
+ {
+ L"BT2",
+ L"BT3",
+ L"BT4",
+ L"HC4"
+-};
++};*/
+
+ Byte g_FastPos[1 << 11];
+
+@@ -318,7 +318,7 @@
+ return S_OK;
+ }
+
+-static bool AreStringsEqual(const wchar_t *base, const wchar_t *testString)
++/*static bool AreStringsEqual(const wchar_t *base, const wchar_t *testString)
+ {
+ while (true)
+ {
+@@ -340,7 +340,7 @@
+ if (AreStringsEqual(kMatchFinderIDs[m], s))
+ return m;
+ return -1;
+-}
++}*/
+
+ STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs,
+ const PROPVARIANT *properties, UInt32 numProperties)
+@@ -378,7 +378,8 @@
+ }
+ case NCoderPropID::kMatchFinder:
+ {
+- if (prop.vt != VT_BSTR)
++ return E_NOTIMPL;
++ /*if (prop.vt != VT_BSTR)
+ return E_INVALIDARG;
+ int matchFinderIndexPrev = _matchFinderIndex;
+ int m = FindMatchFinder(prop.bstrVal);
+@@ -390,7 +391,7 @@
+ _dictionarySizePrev = (UInt32)-1;
+ ReleaseMatchFinder();
+ }
+- break;
++ break;*/
+ }
+ #ifdef COMPRESS_MF_MT
+ case NCoderPropID::kMultiThread:
+Only in 7zip-orig/7zip/Compress: LZMA_Alone
+Only in 7zip-orig/7zip/Compress: LZMA_C
+Only in 7zip/7zip/Compress/RangeCoder: CVS
+Only in 7zip: CVS
+Only in 7zip/Common: CVS
+Only in 7zip-orig/Common: C_FileIO.cpp
+Only in 7zip-orig/Common: C_FileIO.h
+Only in 7zip-orig/Common: ComTry.h
+Only in 7zip-orig/Common: CommandLineParser.cpp
+Only in 7zip-orig/Common: CommandLineParser.h
+Only in 7zip-orig/Common: MyInitGuid.h
+diff -ru 7zip-orig/Common/MyWindows.h 7zip/Common/MyWindows.h
+--- 7zip-orig/Common/MyWindows.h Sun Apr 16 16:53:43 2006
++++ 7zip/Common/MyWindows.h Mon Oct 16 10:20:04 2006
+@@ -3,17 +3,22 @@
+ #ifndef __MYWINDOWS_H
+ #define __MYWINDOWS_H
+
++#include "../../Platform.h"
++
+ #ifdef _WIN32
+
+ #include <windows.h>
+
++/*
+ #define CHAR_PATH_SEPARATOR '\\'
+ #define WCHAR_PATH_SEPARATOR L'\\'
+ #define STRING_PATH_SEPARATOR "\\"
+ #define WSTRING_PATH_SEPARATOR L"\\"
++*/
+
+ #else
+
++/*
+ #define CHAR_PATH_SEPARATOR '/'
+ #define WCHAR_PATH_SEPARATOR L'/'
+ #define STRING_PATH_SEPARATOR "/"
+@@ -21,9 +26,9 @@
+
+ #include <stddef.h> // for wchar_t
+ #include <string.h>
+-
++*/
+ #include "MyGuidDef.h"
+-
++/*
+ typedef char CHAR;
+ typedef unsigned char UCHAR;
+
+@@ -62,7 +67,7 @@
+ typedef OLECHAR *BSTR;
+ typedef const OLECHAR *LPCOLESTR;
+ typedef OLECHAR *LPOLESTR;
+-
++*/
+ typedef struct _FILETIME
+ {
+ DWORD dwLowDateTime;
+Only in 7zip-orig/Common: NewHandler.cpp
+Only in 7zip-orig/Common: NewHandler.h
+diff -ru 7zip-orig/Common/StdAfx.h 7zip/Common/StdAfx.h
+--- 7zip-orig/Common/StdAfx.h Mon Jul 11 15:16:00 2005
++++ 7zip/Common/StdAfx.h Mon Oct 16 10:39:16 2006
+@@ -4,6 +4,5 @@
+ #define __STDAFX_H
+
+ // #include "MyWindows.h"
+-#include "NewHandler.h"
+
+ #endif
+Only in 7zip-orig/Common: String.cpp
+Only in 7zip-orig/Common: String.h
+Only in 7zip-orig/Common: StringConvert.cpp
+Only in 7zip-orig/Common: StringConvert.h
+Only in 7zip-orig/Common: StringToInt.cpp
+Only in 7zip-orig/Common: StringToInt.h
+Only in 7zip-orig/Common: Vector.cpp
+Only in 7zip-orig/Common: Vector.h
+Only in 7zip: LZMADecode.c
+Only in 7zip: LZMADecode.h
+Only in 7zip-orig: Windows
+Only in 7zip: copying.txt
+Only in 7zip: readme.txt
diff --git a/Source/DialogTemplate.cpp b/Source/DialogTemplate.cpp
index 099bfee..0ece79d 100755
--- a/Source/DialogTemplate.cpp
+++ b/Source/DialogTemplate.cpp
@@ -1,654 +1,654 @@
-/*
- * DialogTemplate.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 2002 Amir Szekely <kichik@netvision.net.il>
- *
- * 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.
- */
-
-#include "DialogTemplate.h"
-#include "winchar.h"
-#include <cassert> // for assert(3)
-#ifndef _WIN32
-# include "util.h" // for Unicode conversion functions
-# include <stdio.h>
-# include <stdlib.h>
-# include <iconv.h>
-# include <errno.h>
-#endif
-
-using namespace std;
-
-//////////////////////////////////////////////////////////////////////
-// Utilities
-//////////////////////////////////////////////////////////////////////
-
-static inline DWORD ConvertEndianness(DWORD d) {
- return FIX_ENDIAN_INT32(d);
-}
-
-static inline WORD ConvertEndianness(WORD w) {
- return FIX_ENDIAN_INT16(w);
-}
-
-static inline short ConvertEndianness(short s) {
- return ConvertEndianness(WORD(s));
-}
-
-#define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn
-
-// Reads a variant length array from seeker into readInto and advances seeker
-void ReadVarLenArr(LPBYTE &seeker, WCHAR* &readInto, unsigned int uCodePage) {
- WORD* arr = (WORD*)seeker;
- switch (ConvertEndianness(arr[0])) {
- case 0x0000:
- readInto = 0;
- seeker += sizeof(WORD);
- break;
- case 0xFFFF:
- readInto = MAKEINTRESOURCEW(ConvertEndianness(arr[1]));
- seeker += 2*sizeof(WORD);
- break;
- default:
- {
- readInto = winchar_strdup((WCHAR *) arr);
- PWCHAR wseeker = PWCHAR(seeker);
- while (*wseeker++);
- seeker = LPBYTE(wseeker);
- }
- break;
- }
-}
-
-// A macro that writes a given string (that can be a number too) into the buffer
-#define WriteStringOrId(x) \
- if (x) \
- if (IS_INTRESOURCE(x)) { \
- *(WORD*)seeker = 0xFFFF; \
- seeker += sizeof(WORD); \
- *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
- seeker += sizeof(WORD); \
- } \
- else { \
- winchar_strcpy((WCHAR *) seeker, x); \
- seeker += winchar_strlen((WCHAR *) seeker) * sizeof(WCHAR) + sizeof(WCHAR); \
- } \
- else \
- seeker += sizeof(WORD);
-
-// A macro that adds the size of x (which can be a string a number, or nothing) to dwSize
-#define AddStringOrIdSize(x) dwSize += x ? (IS_INTRESOURCE(x) ? sizeof(DWORD) : (winchar_strlen(x) + 1) * sizeof(WCHAR)) : sizeof(WORD)
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CDialogTemplate::CDialogTemplate(BYTE* pbData, unsigned int uCodePage) {
- m_uCodePage = uCodePage;
-
- m_dwHelpId = 0;
- m_szClass = 0;
- m_szFont = 0;
- m_sFontSize = 0;
- m_sFontWeight = 0;
- m_bItalic = 0;
- m_bCharset = 0;
- m_szMenu = 0;
- m_szTitle = 0;
-
- WORD wItems = 0;
-
- if (*(DWORD*)pbData == EXTENDED_DIALOG) { // Extended dialog template signature
- m_bExtended = true;
-
- DLGTEMPLATEEX* dTemplateEx = (DLGTEMPLATEEX*)pbData;
-
- m_dwHelpId = ConvertEndianness(dTemplateEx->helpID);
- m_dwStyle = ConvertEndianness(dTemplateEx->style);
- m_dwExtStyle = ConvertEndianness(dTemplateEx->exStyle);
- m_sX = ConvertEndianness(dTemplateEx->x);
- m_sY = ConvertEndianness(dTemplateEx->y);
- m_sWidth = ConvertEndianness(dTemplateEx->cx);
- m_sHeight = ConvertEndianness(dTemplateEx->cy);
-
- wItems = ConvertEndianness(dTemplateEx->cDlgItems);
- }
- else {
- m_bExtended = false;
-
- DLGTEMPLATE* dTemplate = (DLGTEMPLATE*)pbData;
-
- m_dwStyle = ConvertEndianness(dTemplate->style);
- m_dwExtStyle = ConvertEndianness(dTemplate->dwExtendedStyle);
- m_sX = ConvertEndianness(dTemplate->x);
- m_sY = ConvertEndianness(dTemplate->y);
- m_sWidth = ConvertEndianness(dTemplate->cx);
- m_sHeight = ConvertEndianness(dTemplate->cy);
-
- wItems = ConvertEndianness(dTemplate->cdit);
- }
-
- BYTE* seeker = pbData + (m_bExtended ? sizeof(DLGTEMPLATEEX) : sizeof(DLGTEMPLATE));
-
- // Read menu variant length array
- ReadVarLenArr(seeker, m_szMenu, m_uCodePage);
- // Read class variant length array
- ReadVarLenArr(seeker, m_szClass, m_uCodePage);
- // Read title variant length array
- ReadVarLenArr(seeker, m_szTitle, m_uCodePage);
- // Read font size and variant length array (only if style DS_SETFONT is used!)
- if (m_dwStyle & DS_SETFONT) {
- m_sFontSize = ConvertEndianness(*(short*)seeker);
- seeker += sizeof(short);
- if (m_bExtended) {
- m_sFontWeight = ConvertEndianness(*(short*)seeker);
- seeker += sizeof(short);
- m_bItalic = *(BYTE*)seeker;
- seeker += sizeof(BYTE);
- m_bCharset = *(BYTE*)seeker;
- seeker += sizeof(BYTE);
- }
- ReadVarLenArr(seeker, m_szFont, m_uCodePage);
- }
-
- // Read items
- for (int i = 0; i < wItems; i++) {
- // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
- if (DWORD(seeker - pbData) % sizeof(DWORD))
- seeker += sizeof(WORD);
-
- DialogItemTemplate* item = new DialogItemTemplate;
- ZeroMemory(item, sizeof(DialogItemTemplate));
-
- if (m_bExtended) {
- DLGITEMTEMPLATEEX* rawItem = (DLGITEMTEMPLATEEX*)seeker;
-
- item->dwHelpId = ConvertEndianness(rawItem->helpID);
- item->dwStyle = ConvertEndianness(rawItem->style);
- item->dwExtStyle = ConvertEndianness(rawItem->exStyle);
- item->sX = ConvertEndianness(rawItem->x);
- item->sY = ConvertEndianness(rawItem->y);
- item->sWidth = ConvertEndianness(rawItem->cx);
- item->sHeight = ConvertEndianness(rawItem->cy);
- item->wId = ConvertEndianness(rawItem->id);
-
- seeker += sizeof(DLGITEMTEMPLATEEX);
- }
- else {
- DLGITEMTEMPLATE* rawItem = (DLGITEMTEMPLATE*)seeker;
-
- item->dwHelpId = 0;
- item->dwStyle = ConvertEndianness(rawItem->style);
- item->dwExtStyle = ConvertEndianness(rawItem->dwExtendedStyle);
- item->sX = ConvertEndianness(rawItem->x);
- item->sY = ConvertEndianness(rawItem->y);
- item->sWidth = ConvertEndianness(rawItem->cx);
- item->sHeight = ConvertEndianness(rawItem->cy);
- item->wId = ConvertEndianness(rawItem->id);
-
- seeker += sizeof(DLGITEMTEMPLATE);
- }
-
- // Read class variant length array
- ReadVarLenArr(seeker, item->szClass, m_uCodePage);
- // Read title variant length array
- ReadVarLenArr(seeker, item->szTitle, m_uCodePage);
-
- // Read creation data variant length array
- // First read the size of the array (no null termination)
- item->wCreateDataSize = ConvertEndianness(*(WORD*)seeker);
- seeker += sizeof(WORD);
- // Then read the array it self (if size is not 0)
- if (item->wCreateDataSize) {
- item->wCreateDataSize -= sizeof(WORD); // Size includes size field itself...
- item->szCreationData = new char[item->wCreateDataSize];
- CopyMemory(item->szCreationData, seeker, item->wCreateDataSize);
- seeker += item->wCreateDataSize;
- }
-
- // Add the item to the vector
- m_vItems.push_back(item);
- }
-}
-
-CDialogTemplate::~CDialogTemplate() {
- if (m_szMenu && !IS_INTRESOURCE(m_szMenu))
- delete [] m_szMenu;
- if (m_szClass && !IS_INTRESOURCE(m_szClass))
- delete [] m_szClass;
- if (m_szTitle)
- delete [] m_szTitle;
- if (m_szFont)
- delete [] m_szFont;
-
- for (unsigned int i = 0; i < m_vItems.size(); i++) {
- if (m_vItems[i]->szClass && !IS_INTRESOURCE(m_vItems[i]->szClass))
- delete [] m_vItems[i]->szClass;
- if (m_vItems[i]->szTitle && !IS_INTRESOURCE(m_vItems[i]->szTitle))
- delete [] m_vItems[i]->szTitle;
- if (m_vItems[i]->szCreationData)
- delete [] m_vItems[i]->szCreationData;
- }
-}
-
-//////////////////////////////////////////////////////////////////////
-// Methods
-//////////////////////////////////////////////////////////////////////
-
-// Returns the width of the dialog
-short CDialogTemplate::GetWidth() {
- return m_sWidth;
-}
-
-// Returns the height of the dialog
-short CDialogTemplate::GetHeight() {
- return m_sHeight;
-}
-
-// Returns info about the item with the id wId
-DialogItemTemplate* CDialogTemplate::GetItem(WORD wId) {
- for (unsigned int i = 0; i < m_vItems.size(); i++)
- if (m_vItems[i]->wId == wId)
- return m_vItems[i];
- return 0;
-}
-
-// Returns info about the item with the indexed i
-DialogItemTemplate* CDialogTemplate::GetItemByIdx(DWORD i) {
- if (i >= m_vItems.size()) return 0;
- return m_vItems[i];
-}
-
-// Removes an item
-// Returns 1 if removed, 0 otherwise
-int CDialogTemplate::RemoveItem(WORD wId) {
- for (unsigned int i = 0; i < m_vItems.size(); i++) {
- if (m_vItems[i]->wId == wId) {
- m_vItems.erase(m_vItems.begin() + i);
- return 1;
- }
- }
- return 0;
-}
-
-// Sets the font of the dialog
-void CDialogTemplate::SetFont(char* szFaceName, WORD wFontSize) {
- if (strcmp(szFaceName, "MS Shell Dlg")) {
- // not MS Shell Dlg
- m_dwStyle &= ~DS_SHELLFONT;
- }
- else {
- // MS Shell Dlg
- m_dwStyle |= DS_SHELLFONT;
- }
- m_bCharset = DEFAULT_CHARSET;
- m_dwStyle |= DS_SETFONT;
- if (m_szFont) delete [] m_szFont;
- m_szFont = winchar_fromansi(szFaceName, m_uCodePage);
- m_sFontSize = wFontSize;
-}
-
-// Adds an item to the dialog
-void CDialogTemplate::AddItem(DialogItemTemplate item) {
- DialogItemTemplate* newItem = new DialogItemTemplate;
- CopyMemory(newItem, &item, sizeof(DialogItemTemplate));
-
- if (item.szClass && !IS_INTRESOURCE(item.szClass)) {
- newItem->szClass = winchar_strdup(item.szClass);
- }
- if (item.szTitle && !IS_INTRESOURCE(item.szTitle)) {
- newItem->szTitle = winchar_strdup(item.szTitle);
- }
- if (item.wCreateDataSize) {
- newItem->szCreationData = new char[item.wCreateDataSize];
- memcpy(newItem->szCreationData, item.szCreationData, item.wCreateDataSize);
- }
- m_vItems.push_back(newItem);
-}
-
-// Moves all of the items in the dialog by (x,y)
-void CDialogTemplate::MoveAll(short x, short y) {
- for (unsigned int i = 0; i < m_vItems.size(); i++) {
- m_vItems[i]->sX += x;
- m_vItems[i]->sY += y;
- }
-}
-
-// Resizes the dialog by (x,y)
-void CDialogTemplate::Resize(short x, short y) {
- m_sWidth += x;
- m_sHeight += y;
-}
-
-#ifdef _WIN32
-// Creates a dummy dialog that is used for converting units
-HWND CDialogTemplate::CreateDummyDialog() {
- DWORD dwTemp;
- BYTE* pbDlg = Save(dwTemp);
- HWND hDlg = CreateDialogIndirect(GetModuleHandle(0), (DLGTEMPLATE*)pbDlg, 0, 0);
- delete [] pbDlg;
- if (!hDlg)
- throw runtime_error("Can't create dialog from template!");
-
- return hDlg;
-}
-
-// Converts pixels to this dialog's units
-void CDialogTemplate::PixelsToDlgUnits(short& x, short& y) {
- HWND hDlg = CreateDummyDialog();
- RECT r = {0, 0, 10000, 10000};
- MapDialogRect(hDlg, &r);
- DestroyWindow(hDlg);
-
- x = short(float(x) / (float(r.right)/10000));
- y = short(float(y) / (float(r.bottom)/10000));
-}
-
-// Converts pixels to this dialog's units
-void CDialogTemplate::DlgUnitsToPixels(short& x, short& y) {
- HWND hDlg = CreateDummyDialog();
- RECT r = {0, 0, 10000, 10000};
- MapDialogRect(hDlg, &r);
- DestroyWindow(hDlg);
-
- x = short(float(x) * (float(r.right)/10000));
- y = short(float(y) * (float(r.bottom)/10000));
-}
-
-// Returns the size of a string in the dialog (in dialog units)
-SIZE CDialogTemplate::GetStringSize(WORD id, char *str) {
- HWND hDlg = CreateDummyDialog();
-
- LOGFONT f;
- GetObject((HFONT)SendMessage(hDlg, WM_GETFONT, 0, 0), sizeof(LOGFONT), &f);
-
- HDC memDC = CreateCompatibleDC(GetDC(hDlg));
- HFONT font = CreateFontIndirect(&f);
- SelectObject(memDC, font);
-
- SIZE size;
- GetTextExtentPoint32(memDC, str, strlen(str), &size);
-
- DestroyWindow(hDlg);
- DeleteObject(font);
- DeleteDC(memDC);
-
- PixelsToDlgUnits((short&)size.cx, (short&)size.cy);
-
- return size;
-}
-
-// Trims the right margins of a control to fit a given text string size.
-void CDialogTemplate::RTrimToString(WORD id, char *str, int margins) {
- DialogItemTemplate* item = GetItem(id);
- if (!item) return;
-
- SIZE size = GetStringSize(id, str);
-
- size.cx += margins;
- size.cy += 2;
-
- item->sWidth = short(size.cx);
- item->sHeight = short(size.cy);
-}
-
-// Trims the left margins of a control to fit a given text string size.
-void CDialogTemplate::LTrimToString(WORD id, char *str, int margins) {
- DialogItemTemplate* item = GetItem(id);
- if (!item) return;
-
- SIZE size = GetStringSize(id, str);
-
- size.cx += margins;
- size.cy += 2;
-
- item->sX += item->sWidth - short(size.cx);
- item->sWidth = short(size.cx);
- item->sHeight = short(size.cy);
-}
-
-// Trims the left and right margins of a control to fit a given text string size.
-void CDialogTemplate::CTrimToString(WORD id, char *str, int margins) {
- DialogItemTemplate* item = GetItem(id);
- if (!item) return;
-
- SIZE size = GetStringSize(id, str);
-
- size.cx += margins;
- size.cy += 2;
-
- item->sX += item->sWidth/2 - short(size.cx/2);
- item->sWidth = short(size.cx);
- item->sHeight = short(size.cy);
-}
-#endif
-
-// Moves every item right and gives it the WS_EX_RIGHT extended style
-void CDialogTemplate::ConvertToRTL() {
- for (unsigned int i = 0; i < m_vItems.size(); i++) {
- bool addExStyle = false;
- char *szClass;
-
- if (IS_INTRESOURCE(m_vItems[i]->szClass))
- szClass = (char *) m_vItems[i]->szClass;
- else
- szClass = winchar_toansi(m_vItems[i]->szClass);
-
- // Button
- if (long(m_vItems[i]->szClass) == 0x80) {
- m_vItems[i]->dwStyle ^= BS_LEFTTEXT;
- m_vItems[i]->dwStyle ^= BS_RIGHT;
- m_vItems[i]->dwStyle ^= BS_LEFT;
-
- if ((m_vItems[i]->dwStyle & (BS_LEFT|BS_RIGHT)) == (BS_LEFT|BS_RIGHT)) {
- m_vItems[i]->dwStyle ^= BS_LEFT;
- m_vItems[i]->dwStyle ^= BS_RIGHT;
- if (m_vItems[i]->dwStyle & (BS_RADIOBUTTON|BS_CHECKBOX|BS_USERBUTTON)) {
- m_vItems[i]->dwStyle |= BS_RIGHT;
- }
- }
- }
- // Edit
- else if (long(m_vItems[i]->szClass) == 0x81) {
- if ((m_vItems[i]->dwStyle & ES_CENTER) == 0) {
- m_vItems[i]->dwStyle ^= ES_RIGHT;
- }
- }
- // Static
- else if (long(m_vItems[i]->szClass) == 0x82) {
- if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFT || (m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFTNOWORDWRAP)
- {
- m_vItems[i]->dwStyle &= ~SS_TYPEMASK;
- m_vItems[i]->dwStyle |= SS_RIGHT;
- }
- else if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_ICON) {
- m_vItems[i]->dwStyle |= SS_CENTERIMAGE;
- }
- }
- else if (!IS_INTRESOURCE(m_vItems[i]->szClass) && !stricmp(szClass, "RichEdit20A")) {
- if ((m_vItems[i]->dwStyle & ES_CENTER) == 0) {
- m_vItems[i]->dwStyle ^= ES_RIGHT;
- }
- }
- else if (!IS_INTRESOURCE(m_vItems[i]->szClass) && !stricmp(szClass, "SysTreeView32")) {
- m_vItems[i]->dwStyle |= TVS_RTLREADING;
- addExStyle = true;
- }
- else addExStyle = true;
-
- if (addExStyle)
- m_vItems[i]->dwExtStyle |= WS_EX_RIGHT;
-
- m_vItems[i]->dwExtStyle |= WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR;
-
- m_vItems[i]->sX = m_sWidth - m_vItems[i]->sWidth - m_vItems[i]->sX;
-
- if (!IS_INTRESOURCE(m_vItems[i]->szClass))
- delete [] szClass;
- }
- m_dwExtStyle |= WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR;
-}
-
-// Saves the dialog in the form of DLGTEMPLATE[EX]
-BYTE* CDialogTemplate::Save(DWORD& dwSize) {
- // We need the size first to know how much memory to allocate
- dwSize = GetSize();
- BYTE* pbDlg = new BYTE[dwSize];
- ZeroMemory(pbDlg, dwSize);
- BYTE* seeker = pbDlg;
-
- if (m_bExtended) {
- DLGTEMPLATEEX dh = {
- ConvertEndianness(WORD(0x0001)),
- ConvertEndianness(WORD(0xFFFF)),
- ConvertEndianness(m_dwHelpId),
- ConvertEndianness(m_dwExtStyle),
- ConvertEndianness(m_dwStyle),
- ConvertEndianness(WORD(m_vItems.size())),
- ConvertEndianness(m_sX),
- ConvertEndianness(m_sY),
- ConvertEndianness(m_sWidth),
- ConvertEndianness(m_sHeight)
- };
-
- CopyMemory(seeker, &dh, sizeof(DLGTEMPLATEEX));
- seeker += sizeof(DLGTEMPLATEEX);
- }
- else {
- DLGTEMPLATE dh = {
- ConvertEndianness(m_dwStyle),
- ConvertEndianness(m_dwExtStyle),
- ConvertEndianness(WORD(m_vItems.size())),
- ConvertEndianness(m_sX),
- ConvertEndianness(m_sY),
- ConvertEndianness(m_sWidth),
- ConvertEndianness(m_sHeight)
- };
-
- CopyMemory(seeker, &dh, sizeof(DLGTEMPLATE));
- seeker += sizeof(DLGTEMPLATE);
- }
-
- // Write menu variant length array
- WriteStringOrId(m_szMenu);
- // Write class variant length array
- WriteStringOrId(m_szClass);
- // Write title variant length array
- WriteStringOrId(m_szTitle);
-
- // Write font variant length array, size, and extended info (if needed)
- if (m_dwStyle & DS_SETFONT) {
- *(short*)seeker = ConvertEndianness(m_sFontSize);
- seeker += sizeof(short);
- if (m_bExtended) {
- *(short*)seeker = ConvertEndianness(m_sFontWeight);
- seeker += sizeof(short);
- *(BYTE*)seeker = m_bItalic;
- seeker += sizeof(BYTE);
- *(BYTE*)seeker = m_bCharset;
- seeker += sizeof(BYTE);
- }
- WriteStringOrId(m_szFont);
- }
-
- // Write all of the items
- for (unsigned int i = 0; i < m_vItems.size(); i++) {
- // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
- if (DWORD(seeker - pbDlg) % sizeof(DWORD))
- seeker += sizeof(WORD);
-
- if (m_bExtended) {
- DLGITEMTEMPLATEEX dih = {
- ConvertEndianness(m_vItems[i]->dwHelpId),
- ConvertEndianness(m_vItems[i]->dwExtStyle),
- ConvertEndianness(m_vItems[i]->dwStyle),
- ConvertEndianness(m_vItems[i]->sX),
- ConvertEndianness(m_vItems[i]->sY),
- ConvertEndianness(m_vItems[i]->sWidth),
- ConvertEndianness(m_vItems[i]->sHeight),
- ConvertEndianness(m_vItems[i]->wId)
- };
-
- CopyMemory(seeker, &dih, sizeof(DLGITEMTEMPLATEEX));
- seeker += sizeof(DLGITEMTEMPLATEEX);
- }
- else {
- DLGITEMTEMPLATE dih = {
- ConvertEndianness(m_vItems[i]->dwStyle),
- ConvertEndianness(m_vItems[i]->dwExtStyle),
- ConvertEndianness(m_vItems[i]->sX),
- ConvertEndianness(m_vItems[i]->sY),
- ConvertEndianness(m_vItems[i]->sWidth),
- ConvertEndianness(m_vItems[i]->sHeight),
- ConvertEndianness(m_vItems[i]->wId)
- };
-
- CopyMemory(seeker, &dih, sizeof(DLGITEMTEMPLATE));
- seeker += sizeof(DLGITEMTEMPLATE);
- }
-
- // Write class variant length array
- WriteStringOrId(m_vItems[i]->szClass);
- // Write title variant length array
- WriteStringOrId(m_vItems[i]->szTitle);
-
- // Write creation data variant length array
- // First write its size
- WORD wCreateDataSize = m_vItems[i]->wCreateDataSize;
- if (m_vItems[i]->wCreateDataSize) wCreateDataSize += sizeof(WORD);
- *(WORD*)seeker = ConvertEndianness(wCreateDataSize);
- seeker += sizeof(WORD);
- // If size is nonzero write the data too
- if (m_vItems[i]->wCreateDataSize) {
- CopyMemory(seeker, m_vItems[i]->szCreationData, m_vItems[i]->wCreateDataSize);
- seeker += m_vItems[i]->wCreateDataSize;
- }
- }
-
- assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
-
- // DONE!
- return pbDlg;
-}
-
-// Returns the size that the DLGTEMPLATE[EX] will take when saved
-DWORD CDialogTemplate::GetSize() {
- DWORD dwSize = m_bExtended ? sizeof(DLGTEMPLATEEX) : sizeof(DLGTEMPLATE);
-
- // Menu
- AddStringOrIdSize(m_szMenu);
- // Class
- AddStringOrIdSize(m_szClass);
- // Title
- AddStringOrIdSize(m_szTitle);
-
- // Font
- if (m_dwStyle & DS_SETFONT) {
- dwSize += sizeof(WORD) + (m_bExtended ? sizeof(short) + 2*sizeof(BYTE) : 0);
- AddStringOrIdSize(m_szFont);
- }
-
- for (unsigned int i = 0; i < m_vItems.size(); i++) {
- // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
- ALIGN(dwSize, sizeof(DWORD));
-
- dwSize += m_bExtended ? sizeof(DLGITEMTEMPLATEEX) : sizeof(DLGITEMTEMPLATE);
-
- // Class
- AddStringOrIdSize(m_vItems[i]->szClass);
- // Title
- AddStringOrIdSize(m_vItems[i]->szTitle);
-
- dwSize += sizeof(WORD) + m_vItems[i]->wCreateDataSize;
- }
-
- return dwSize;
-}
+/*
+ * DialogTemplate.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 2002 Amir Szekely <kichik@netvision.net.il>
+ *
+ * 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.
+ */
+
+#include "DialogTemplate.h"
+#include "winchar.h"
+#include <cassert> // for assert(3)
+#ifndef _WIN32
+# include "util.h" // for Unicode conversion functions
+# include <stdio.h>
+# include <stdlib.h>
+# include <iconv.h>
+# include <errno.h>
+#endif
+
+using namespace std;
+
+//////////////////////////////////////////////////////////////////////
+// Utilities
+//////////////////////////////////////////////////////////////////////
+
+static inline DWORD ConvertEndianness(DWORD d) {
+ return FIX_ENDIAN_INT32(d);
+}
+
+static inline WORD ConvertEndianness(WORD w) {
+ return FIX_ENDIAN_INT16(w);
+}
+
+static inline short ConvertEndianness(short s) {
+ return ConvertEndianness(WORD(s));
+}
+
+#define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn
+
+// Reads a variant length array from seeker into readInto and advances seeker
+void ReadVarLenArr(LPBYTE &seeker, WCHAR* &readInto, unsigned int uCodePage) {
+ WORD* arr = (WORD*)seeker;
+ switch (ConvertEndianness(arr[0])) {
+ case 0x0000:
+ readInto = 0;
+ seeker += sizeof(WORD);
+ break;
+ case 0xFFFF:
+ readInto = MAKEINTRESOURCEW(ConvertEndianness(arr[1]));
+ seeker += 2*sizeof(WORD);
+ break;
+ default:
+ {
+ readInto = winchar_strdup((WCHAR *) arr);
+ PWCHAR wseeker = PWCHAR(seeker);
+ while (*wseeker++);
+ seeker = LPBYTE(wseeker);
+ }
+ break;
+ }
+}
+
+// A macro that writes a given string (that can be a number too) into the buffer
+#define WriteStringOrId(x) \
+ if (x) \
+ if (IS_INTRESOURCE(x)) { \
+ *(WORD*)seeker = 0xFFFF; \
+ seeker += sizeof(WORD); \
+ *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \
+ seeker += sizeof(WORD); \
+ } \
+ else { \
+ winchar_strcpy((WCHAR *) seeker, x); \
+ seeker += winchar_strlen((WCHAR *) seeker) * sizeof(WCHAR) + sizeof(WCHAR); \
+ } \
+ else \
+ seeker += sizeof(WORD);
+
+// A macro that adds the size of x (which can be a string a number, or nothing) to dwSize
+#define AddStringOrIdSize(x) dwSize += x ? (IS_INTRESOURCE(x) ? sizeof(DWORD) : (winchar_strlen(x) + 1) * sizeof(WCHAR)) : sizeof(WORD)
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CDialogTemplate::CDialogTemplate(BYTE* pbData, unsigned int uCodePage) {
+ m_uCodePage = uCodePage;
+
+ m_dwHelpId = 0;
+ m_szClass = 0;
+ m_szFont = 0;
+ m_sFontSize = 0;
+ m_sFontWeight = 0;
+ m_bItalic = 0;
+ m_bCharset = 0;
+ m_szMenu = 0;
+ m_szTitle = 0;
+
+ WORD wItems = 0;
+
+ if (*(DWORD*)pbData == EXTENDED_DIALOG) { // Extended dialog template signature
+ m_bExtended = true;
+
+ DLGTEMPLATEEX* dTemplateEx = (DLGTEMPLATEEX*)pbData;
+
+ m_dwHelpId = ConvertEndianness(dTemplateEx->helpID);
+ m_dwStyle = ConvertEndianness(dTemplateEx->style);
+ m_dwExtStyle = ConvertEndianness(dTemplateEx->exStyle);
+ m_sX = ConvertEndianness(dTemplateEx->x);
+ m_sY = ConvertEndianness(dTemplateEx->y);
+ m_sWidth = ConvertEndianness(dTemplateEx->cx);
+ m_sHeight = ConvertEndianness(dTemplateEx->cy);
+
+ wItems = ConvertEndianness(dTemplateEx->cDlgItems);
+ }
+ else {
+ m_bExtended = false;
+
+ DLGTEMPLATE* dTemplate = (DLGTEMPLATE*)pbData;
+
+ m_dwStyle = ConvertEndianness(dTemplate->style);
+ m_dwExtStyle = ConvertEndianness(dTemplate->dwExtendedStyle);
+ m_sX = ConvertEndianness(dTemplate->x);
+ m_sY = ConvertEndianness(dTemplate->y);
+ m_sWidth = ConvertEndianness(dTemplate->cx);
+ m_sHeight = ConvertEndianness(dTemplate->cy);
+
+ wItems = ConvertEndianness(dTemplate->cdit);
+ }
+
+ BYTE* seeker = pbData + (m_bExtended ? sizeof(DLGTEMPLATEEX) : sizeof(DLGTEMPLATE));
+
+ // Read menu variant length array
+ ReadVarLenArr(seeker, m_szMenu, m_uCodePage);
+ // Read class variant length array
+ ReadVarLenArr(seeker, m_szClass, m_uCodePage);
+ // Read title variant length array
+ ReadVarLenArr(seeker, m_szTitle, m_uCodePage);
+ // Read font size and variant length array (only if style DS_SETFONT is used!)
+ if (m_dwStyle & DS_SETFONT) {
+ m_sFontSize = ConvertEndianness(*(short*)seeker);
+ seeker += sizeof(short);
+ if (m_bExtended) {
+ m_sFontWeight = ConvertEndianness(*(short*)seeker);
+ seeker += sizeof(short);
+ m_bItalic = *(BYTE*)seeker;
+ seeker += sizeof(BYTE);
+ m_bCharset = *(BYTE*)seeker;
+ seeker += sizeof(BYTE);
+ }
+ ReadVarLenArr(seeker, m_szFont, m_uCodePage);
+ }
+
+ // Read items
+ for (int i = 0; i < wItems; i++) {
+ // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
+ if (DWORD(seeker - pbData) % sizeof(DWORD))
+ seeker += sizeof(WORD);
+
+ DialogItemTemplate* item = new DialogItemTemplate;
+ ZeroMemory(item, sizeof(DialogItemTemplate));
+
+ if (m_bExtended) {
+ DLGITEMTEMPLATEEX* rawItem = (DLGITEMTEMPLATEEX*)seeker;
+
+ item->dwHelpId = ConvertEndianness(rawItem->helpID);
+ item->dwStyle = ConvertEndianness(rawItem->style);
+ item->dwExtStyle = ConvertEndianness(rawItem->exStyle);
+ item->sX = ConvertEndianness(rawItem->x);
+ item->sY = ConvertEndianness(rawItem->y);
+ item->sWidth = ConvertEndianness(rawItem->cx);
+ item->sHeight = ConvertEndianness(rawItem->cy);
+ item->wId = ConvertEndianness(rawItem->id);
+
+ seeker += sizeof(DLGITEMTEMPLATEEX);
+ }
+ else {
+ DLGITEMTEMPLATE* rawItem = (DLGITEMTEMPLATE*)seeker;
+
+ item->dwHelpId = 0;
+ item->dwStyle = ConvertEndianness(rawItem->style);
+ item->dwExtStyle = ConvertEndianness(rawItem->dwExtendedStyle);
+ item->sX = ConvertEndianness(rawItem->x);
+ item->sY = ConvertEndianness(rawItem->y);
+ item->sWidth = ConvertEndianness(rawItem->cx);
+ item->sHeight = ConvertEndianness(rawItem->cy);
+ item->wId = ConvertEndianness(rawItem->id);
+
+ seeker += sizeof(DLGITEMTEMPLATE);
+ }
+
+ // Read class variant length array
+ ReadVarLenArr(seeker, item->szClass, m_uCodePage);
+ // Read title variant length array
+ ReadVarLenArr(seeker, item->szTitle, m_uCodePage);
+
+ // Read creation data variant length array
+ // First read the size of the array (no null termination)
+ item->wCreateDataSize = ConvertEndianness(*(WORD*)seeker);
+ seeker += sizeof(WORD);
+ // Then read the array it self (if size is not 0)
+ if (item->wCreateDataSize) {
+ item->wCreateDataSize -= sizeof(WORD); // Size includes size field itself...
+ item->szCreationData = new char[item->wCreateDataSize];
+ CopyMemory(item->szCreationData, seeker, item->wCreateDataSize);
+ seeker += item->wCreateDataSize;
+ }
+
+ // Add the item to the vector
+ m_vItems.push_back(item);
+ }
+}
+
+CDialogTemplate::~CDialogTemplate() {
+ if (m_szMenu && !IS_INTRESOURCE(m_szMenu))
+ delete [] m_szMenu;
+ if (m_szClass && !IS_INTRESOURCE(m_szClass))
+ delete [] m_szClass;
+ if (m_szTitle)
+ delete [] m_szTitle;
+ if (m_szFont)
+ delete [] m_szFont;
+
+ for (unsigned int i = 0; i < m_vItems.size(); i++) {
+ if (m_vItems[i]->szClass && !IS_INTRESOURCE(m_vItems[i]->szClass))
+ delete [] m_vItems[i]->szClass;
+ if (m_vItems[i]->szTitle && !IS_INTRESOURCE(m_vItems[i]->szTitle))
+ delete [] m_vItems[i]->szTitle;
+ if (m_vItems[i]->szCreationData)
+ delete [] m_vItems[i]->szCreationData;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////
+// Methods
+//////////////////////////////////////////////////////////////////////
+
+// Returns the width of the dialog
+short CDialogTemplate::GetWidth() {
+ return m_sWidth;
+}
+
+// Returns the height of the dialog
+short CDialogTemplate::GetHeight() {
+ return m_sHeight;
+}
+
+// Returns info about the item with the id wId
+DialogItemTemplate* CDialogTemplate::GetItem(WORD wId) {
+ for (unsigned int i = 0; i < m_vItems.size(); i++)
+ if (m_vItems[i]->wId == wId)
+ return m_vItems[i];
+ return 0;
+}
+
+// Returns info about the item with the indexed i
+DialogItemTemplate* CDialogTemplate::GetItemByIdx(DWORD i) {
+ if (i >= m_vItems.size()) return 0;
+ return m_vItems[i];
+}
+
+// Removes an item
+// Returns 1 if removed, 0 otherwise
+int CDialogTemplate::RemoveItem(WORD wId) {
+ for (unsigned int i = 0; i < m_vItems.size(); i++) {
+ if (m_vItems[i]->wId == wId) {
+ m_vItems.erase(m_vItems.begin() + i);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+// Sets the font of the dialog
+void CDialogTemplate::SetFont(char* szFaceName, WORD wFontSize) {
+ if (strcmp(szFaceName, "MS Shell Dlg")) {
+ // not MS Shell Dlg
+ m_dwStyle &= ~DS_SHELLFONT;
+ }
+ else {
+ // MS Shell Dlg
+ m_dwStyle |= DS_SHELLFONT;
+ }
+ m_bCharset = DEFAULT_CHARSET;
+ m_dwStyle |= DS_SETFONT;
+ if (m_szFont) delete [] m_szFont;
+ m_szFont = winchar_fromansi(szFaceName, m_uCodePage);
+ m_sFontSize = wFontSize;
+}
+
+// Adds an item to the dialog
+void CDialogTemplate::AddItem(DialogItemTemplate item) {
+ DialogItemTemplate* newItem = new DialogItemTemplate;
+ CopyMemory(newItem, &item, sizeof(DialogItemTemplate));
+
+ if (item.szClass && !IS_INTRESOURCE(item.szClass)) {
+ newItem->szClass = winchar_strdup(item.szClass);
+ }
+ if (item.szTitle && !IS_INTRESOURCE(item.szTitle)) {
+ newItem->szTitle = winchar_strdup(item.szTitle);
+ }
+ if (item.wCreateDataSize) {
+ newItem->szCreationData = new char[item.wCreateDataSize];
+ memcpy(newItem->szCreationData, item.szCreationData, item.wCreateDataSize);
+ }
+ m_vItems.push_back(newItem);
+}
+
+// Moves all of the items in the dialog by (x,y)
+void CDialogTemplate::MoveAll(short x, short y) {
+ for (unsigned int i = 0; i < m_vItems.size(); i++) {
+ m_vItems[i]->sX += x;
+ m_vItems[i]->sY += y;
+ }
+}
+
+// Resizes the dialog by (x,y)
+void CDialogTemplate::Resize(short x, short y) {
+ m_sWidth += x;
+ m_sHeight += y;
+}
+
+#ifdef _WIN32
+// Creates a dummy dialog that is used for converting units
+HWND CDialogTemplate::CreateDummyDialog() {
+ DWORD dwTemp;
+ BYTE* pbDlg = Save(dwTemp);
+ HWND hDlg = CreateDialogIndirect(GetModuleHandle(0), (DLGTEMPLATE*)pbDlg, 0, 0);
+ delete [] pbDlg;
+ if (!hDlg)
+ throw runtime_error("Can't create dialog from template!");
+
+ return hDlg;
+}
+
+// Converts pixels to this dialog's units
+void CDialogTemplate::PixelsToDlgUnits(short& x, short& y) {
+ HWND hDlg = CreateDummyDialog();
+ RECT r = {0, 0, 10000, 10000};
+ MapDialogRect(hDlg, &r);
+ DestroyWindow(hDlg);
+
+ x = short(float(x) / (float(r.right)/10000));
+ y = short(float(y) / (float(r.bottom)/10000));
+}
+
+// Converts pixels to this dialog's units
+void CDialogTemplate::DlgUnitsToPixels(short& x, short& y) {
+ HWND hDlg = CreateDummyDialog();
+ RECT r = {0, 0, 10000, 10000};
+ MapDialogRect(hDlg, &r);
+ DestroyWindow(hDlg);
+
+ x = short(float(x) * (float(r.right)/10000));
+ y = short(float(y) * (float(r.bottom)/10000));
+}
+
+// Returns the size of a string in the dialog (in dialog units)
+SIZE CDialogTemplate::GetStringSize(WORD id, char *str) {
+ HWND hDlg = CreateDummyDialog();
+
+ LOGFONT f;
+ GetObject((HFONT)SendMessage(hDlg, WM_GETFONT, 0, 0), sizeof(LOGFONT), &f);
+
+ HDC memDC = CreateCompatibleDC(GetDC(hDlg));
+ HFONT font = CreateFontIndirect(&f);
+ SelectObject(memDC, font);
+
+ SIZE size;
+ GetTextExtentPoint32(memDC, str, strlen(str), &size);
+
+ DestroyWindow(hDlg);
+ DeleteObject(font);
+ DeleteDC(memDC);
+
+ PixelsToDlgUnits((short&)size.cx, (short&)size.cy);
+
+ return size;
+}
+
+// Trims the right margins of a control to fit a given text string size.
+void CDialogTemplate::RTrimToString(WORD id, char *str, int margins) {
+ DialogItemTemplate* item = GetItem(id);
+ if (!item) return;
+
+ SIZE size = GetStringSize(id, str);
+
+ size.cx += margins;
+ size.cy += 2;
+
+ item->sWidth = short(size.cx);
+ item->sHeight = short(size.cy);
+}
+
+// Trims the left margins of a control to fit a given text string size.
+void CDialogTemplate::LTrimToString(WORD id, char *str, int margins) {
+ DialogItemTemplate* item = GetItem(id);
+ if (!item) return;
+
+ SIZE size = GetStringSize(id, str);
+
+ size.cx += margins;
+ size.cy += 2;
+
+ item->sX += item->sWidth - short(size.cx);
+ item->sWidth = short(size.cx);
+ item->sHeight = short(size.cy);
+}
+
+// Trims the left and right margins of a control to fit a given text string size.
+void CDialogTemplate::CTrimToString(WORD id, char *str, int margins) {
+ DialogItemTemplate* item = GetItem(id);
+ if (!item) return;
+
+ SIZE size = GetStringSize(id, str);
+
+ size.cx += margins;
+ size.cy += 2;
+
+ item->sX += item->sWidth/2 - short(size.cx/2);
+ item->sWidth = short(size.cx);
+ item->sHeight = short(size.cy);
+}
+#endif
+
+// Moves every item right and gives it the WS_EX_RIGHT extended style
+void CDialogTemplate::ConvertToRTL() {
+ for (unsigned int i = 0; i < m_vItems.size(); i++) {
+ bool addExStyle = false;
+ char *szClass;
+
+ if (IS_INTRESOURCE(m_vItems[i]->szClass))
+ szClass = (char *) m_vItems[i]->szClass;
+ else
+ szClass = winchar_toansi(m_vItems[i]->szClass);
+
+ // Button
+ if (long(m_vItems[i]->szClass) == 0x80) {
+ m_vItems[i]->dwStyle ^= BS_LEFTTEXT;
+ m_vItems[i]->dwStyle ^= BS_RIGHT;
+ m_vItems[i]->dwStyle ^= BS_LEFT;
+
+ if ((m_vItems[i]->dwStyle & (BS_LEFT|BS_RIGHT)) == (BS_LEFT|BS_RIGHT)) {
+ m_vItems[i]->dwStyle ^= BS_LEFT;
+ m_vItems[i]->dwStyle ^= BS_RIGHT;
+ if (m_vItems[i]->dwStyle & (BS_RADIOBUTTON|BS_CHECKBOX|BS_USERBUTTON)) {
+ m_vItems[i]->dwStyle |= BS_RIGHT;
+ }
+ }
+ }
+ // Edit
+ else if (long(m_vItems[i]->szClass) == 0x81) {
+ if ((m_vItems[i]->dwStyle & ES_CENTER) == 0) {
+ m_vItems[i]->dwStyle ^= ES_RIGHT;
+ }
+ }
+ // Static
+ else if (long(m_vItems[i]->szClass) == 0x82) {
+ if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFT || (m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFTNOWORDWRAP)
+ {
+ m_vItems[i]->dwStyle &= ~SS_TYPEMASK;
+ m_vItems[i]->dwStyle |= SS_RIGHT;
+ }
+ else if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_ICON) {
+ m_vItems[i]->dwStyle |= SS_CENTERIMAGE;
+ }
+ }
+ else if (!IS_INTRESOURCE(m_vItems[i]->szClass) && !stricmp(szClass, "RichEdit20A")) {
+ if ((m_vItems[i]->dwStyle & ES_CENTER) == 0) {
+ m_vItems[i]->dwStyle ^= ES_RIGHT;
+ }
+ }
+ else if (!IS_INTRESOURCE(m_vItems[i]->szClass) && !stricmp(szClass, "SysTreeView32")) {
+ m_vItems[i]->dwStyle |= TVS_RTLREADING;
+ addExStyle = true;
+ }
+ else addExStyle = true;
+
+ if (addExStyle)
+ m_vItems[i]->dwExtStyle |= WS_EX_RIGHT;
+
+ m_vItems[i]->dwExtStyle |= WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR;
+
+ m_vItems[i]->sX = m_sWidth - m_vItems[i]->sWidth - m_vItems[i]->sX;
+
+ if (!IS_INTRESOURCE(m_vItems[i]->szClass))
+ delete [] szClass;
+ }
+ m_dwExtStyle |= WS_EX_RIGHT | WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR;
+}
+
+// Saves the dialog in the form of DLGTEMPLATE[EX]
+BYTE* CDialogTemplate::Save(DWORD& dwSize) {
+ // We need the size first to know how much memory to allocate
+ dwSize = GetSize();
+ BYTE* pbDlg = new BYTE[dwSize];
+ ZeroMemory(pbDlg, dwSize);
+ BYTE* seeker = pbDlg;
+
+ if (m_bExtended) {
+ DLGTEMPLATEEX dh = {
+ ConvertEndianness(WORD(0x0001)),
+ ConvertEndianness(WORD(0xFFFF)),
+ ConvertEndianness(m_dwHelpId),
+ ConvertEndianness(m_dwExtStyle),
+ ConvertEndianness(m_dwStyle),
+ ConvertEndianness(WORD(m_vItems.size())),
+ ConvertEndianness(m_sX),
+ ConvertEndianness(m_sY),
+ ConvertEndianness(m_sWidth),
+ ConvertEndianness(m_sHeight)
+ };
+
+ CopyMemory(seeker, &dh, sizeof(DLGTEMPLATEEX));
+ seeker += sizeof(DLGTEMPLATEEX);
+ }
+ else {
+ DLGTEMPLATE dh = {
+ ConvertEndianness(m_dwStyle),
+ ConvertEndianness(m_dwExtStyle),
+ ConvertEndianness(WORD(m_vItems.size())),
+ ConvertEndianness(m_sX),
+ ConvertEndianness(m_sY),
+ ConvertEndianness(m_sWidth),
+ ConvertEndianness(m_sHeight)
+ };
+
+ CopyMemory(seeker, &dh, sizeof(DLGTEMPLATE));
+ seeker += sizeof(DLGTEMPLATE);
+ }
+
+ // Write menu variant length array
+ WriteStringOrId(m_szMenu);
+ // Write class variant length array
+ WriteStringOrId(m_szClass);
+ // Write title variant length array
+ WriteStringOrId(m_szTitle);
+
+ // Write font variant length array, size, and extended info (if needed)
+ if (m_dwStyle & DS_SETFONT) {
+ *(short*)seeker = ConvertEndianness(m_sFontSize);
+ seeker += sizeof(short);
+ if (m_bExtended) {
+ *(short*)seeker = ConvertEndianness(m_sFontWeight);
+ seeker += sizeof(short);
+ *(BYTE*)seeker = m_bItalic;
+ seeker += sizeof(BYTE);
+ *(BYTE*)seeker = m_bCharset;
+ seeker += sizeof(BYTE);
+ }
+ WriteStringOrId(m_szFont);
+ }
+
+ // Write all of the items
+ for (unsigned int i = 0; i < m_vItems.size(); i++) {
+ // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
+ if (DWORD(seeker - pbDlg) % sizeof(DWORD))
+ seeker += sizeof(WORD);
+
+ if (m_bExtended) {
+ DLGITEMTEMPLATEEX dih = {
+ ConvertEndianness(m_vItems[i]->dwHelpId),
+ ConvertEndianness(m_vItems[i]->dwExtStyle),
+ ConvertEndianness(m_vItems[i]->dwStyle),
+ ConvertEndianness(m_vItems[i]->sX),
+ ConvertEndianness(m_vItems[i]->sY),
+ ConvertEndianness(m_vItems[i]->sWidth),
+ ConvertEndianness(m_vItems[i]->sHeight),
+ ConvertEndianness(m_vItems[i]->wId)
+ };
+
+ CopyMemory(seeker, &dih, sizeof(DLGITEMTEMPLATEEX));
+ seeker += sizeof(DLGITEMTEMPLATEEX);
+ }
+ else {
+ DLGITEMTEMPLATE dih = {
+ ConvertEndianness(m_vItems[i]->dwStyle),
+ ConvertEndianness(m_vItems[i]->dwExtStyle),
+ ConvertEndianness(m_vItems[i]->sX),
+ ConvertEndianness(m_vItems[i]->sY),
+ ConvertEndianness(m_vItems[i]->sWidth),
+ ConvertEndianness(m_vItems[i]->sHeight),
+ ConvertEndianness(m_vItems[i]->wId)
+ };
+
+ CopyMemory(seeker, &dih, sizeof(DLGITEMTEMPLATE));
+ seeker += sizeof(DLGITEMTEMPLATE);
+ }
+
+ // Write class variant length array
+ WriteStringOrId(m_vItems[i]->szClass);
+ // Write title variant length array
+ WriteStringOrId(m_vItems[i]->szTitle);
+
+ // Write creation data variant length array
+ // First write its size
+ WORD wCreateDataSize = m_vItems[i]->wCreateDataSize;
+ if (m_vItems[i]->wCreateDataSize) wCreateDataSize += sizeof(WORD);
+ *(WORD*)seeker = ConvertEndianness(wCreateDataSize);
+ seeker += sizeof(WORD);
+ // If size is nonzero write the data too
+ if (m_vItems[i]->wCreateDataSize) {
+ CopyMemory(seeker, m_vItems[i]->szCreationData, m_vItems[i]->wCreateDataSize);
+ seeker += m_vItems[i]->wCreateDataSize;
+ }
+ }
+
+ assert((DWORD) seeker - (DWORD) pbDlg == dwSize);
+
+ // DONE!
+ return pbDlg;
+}
+
+// Returns the size that the DLGTEMPLATE[EX] will take when saved
+DWORD CDialogTemplate::GetSize() {
+ DWORD dwSize = m_bExtended ? sizeof(DLGTEMPLATEEX) : sizeof(DLGTEMPLATE);
+
+ // Menu
+ AddStringOrIdSize(m_szMenu);
+ // Class
+ AddStringOrIdSize(m_szClass);
+ // Title
+ AddStringOrIdSize(m_szTitle);
+
+ // Font
+ if (m_dwStyle & DS_SETFONT) {
+ dwSize += sizeof(WORD) + (m_bExtended ? sizeof(short) + 2*sizeof(BYTE) : 0);
+ AddStringOrIdSize(m_szFont);
+ }
+
+ for (unsigned int i = 0; i < m_vItems.size(); i++) {
+ // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary
+ ALIGN(dwSize, sizeof(DWORD));
+
+ dwSize += m_bExtended ? sizeof(DLGITEMTEMPLATEEX) : sizeof(DLGITEMTEMPLATE);
+
+ // Class
+ AddStringOrIdSize(m_vItems[i]->szClass);
+ // Title
+ AddStringOrIdSize(m_vItems[i]->szTitle);
+
+ dwSize += sizeof(WORD) + m_vItems[i]->wCreateDataSize;
+ }
+
+ return dwSize;
+}
diff --git a/Source/DialogTemplate.h b/Source/DialogTemplate.h
index c6bc58e..918ca23 100755
--- a/Source/DialogTemplate.h
+++ b/Source/DialogTemplate.h
@@ -1,165 +1,165 @@
-/*
- * DialogTemplate.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 2002 Amir Szekely <kichik@netvision.net.il>
- *
- * 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.
- */
-
-#if !defined(AFX_DIALOGTEMPLATE_H__C5A973AF_0F56_4BEC_814A_79318E2EB4AC__INCLUDED_)
-#define AFX_DIALOGTEMPLATE_H__C5A973AF_0F56_4BEC_814A_79318E2EB4AC__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "Platform.h"
-
-#include <vector>
-#include <stdexcept>
-
-#ifndef __BIG_ENDIAN__
-# define EXTENDED_DIALOG ((DWORD) 0xFFFF0001)
-#else
-# define EXTENDED_DIALOG ((DWORD) 0x0100FFFF)
-#endif
-
-struct DialogItemTemplate {
- DWORD dwHelpId; // Extended only
-
- short sX;
- short sY;
- short sWidth;
- short sHeight;
- DWORD dwExtStyle;
- DWORD dwStyle;
- WORD wId;
-
- WCHAR *szClass;
- WCHAR *szTitle;
- char *szCreationData;
-
- WORD wCreateDataSize;
-};
-
-#pragma pack(1)
-
-#ifndef _WIN32
-typedef struct {
- DWORD style;
- DWORD dwExtendedStyle;
- WORD cdit;
- short x;
- short y;
- short cx;
- short cy;
-} DLGTEMPLATE;
-#endif
-
-typedef struct {
- WORD dlgVer;
- WORD signature;
- DWORD helpID;
- DWORD exStyle;
- DWORD style;
- WORD cDlgItems;
- short x;
- short y;
- short cx;
- short cy;
-} DLGTEMPLATEEX;
-
-#ifndef _WIN32
-typedef struct {
- DWORD style;
- DWORD dwExtendedStyle;
- short x;
- short y;
- short cx;
- short cy;
- WORD id;
-} DLGITEMTEMPLATE;
-#endif
-
-typedef struct {
- DWORD helpID;
- DWORD exStyle;
- DWORD style;
- short x;
- short y;
- short cx;
- short cy;
- WORD id;
- WORD _miscrosoft_docs_are_wrong;
-} DLGITEMTEMPLATEEX;
-
-#pragma pack()
-
-class CDialogTemplate {
-public:
- CDialogTemplate(BYTE* pbData, unsigned int uCodePage=CP_ACP);
- virtual ~CDialogTemplate();
-
- short GetWidth();
- short GetHeight();
- DialogItemTemplate* GetItem(WORD wId);
- DialogItemTemplate* GetItemByIdx(DWORD i);
- int RemoveItem(WORD wId);
- void SetFont(char* szFaceName, WORD wFontSize);
- void AddItem(DialogItemTemplate item);
-#ifdef _WIN32
- HWND CreateDummyDialog();
-#endif
- void MoveAll(short x, short y);
- void Resize(short x, short y);
-#ifdef _WIN32
- void PixelsToDlgUnits(short& x, short& y);
- void DlgUnitsToPixels(short& x, short& y);
- SIZE GetStringSize(WORD id, char *str);
- void RTrimToString(WORD id, char *str, int margins);
- void LTrimToString(WORD id, char *str, int margins);
- void CTrimToString(WORD id, char *str, int margins);
-#endif
- void ConvertToRTL();
- BYTE* Save(DWORD& dwSize);
- DWORD GetSize();
-
-private:
- bool m_bExtended;
-
- DWORD m_dwHelpId; // Extended only
-
- short m_sX;
- short m_sY;
- short m_sWidth;
- short m_sHeight;
- DWORD m_dwExtStyle;
- DWORD m_dwStyle;
-
- WCHAR *m_szMenu;
- WCHAR *m_szClass;
- WCHAR *m_szTitle;
-
- // Only if DS_FONT style is set
- short m_sFontSize;
- short m_sFontWeight; // Extended only
- BYTE m_bItalic; // Extended only
- BYTE m_bCharset; // Extended only
- WCHAR *m_szFont;
-
- // For (en/de)coding Unicode
- unsigned int m_uCodePage;
-
- // Items vector
- std::vector<DialogItemTemplate*> m_vItems;
-};
-
-#endif // !defined(AFX_DIALOGTEMPLATE_H__C5A973AF_0F56_4BEC_814A_79318E2EB4AC__INCLUDED_)
+/*
+ * DialogTemplate.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 2002 Amir Szekely <kichik@netvision.net.il>
+ *
+ * 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.
+ */
+
+#if !defined(AFX_DIALOGTEMPLATE_H__C5A973AF_0F56_4BEC_814A_79318E2EB4AC__INCLUDED_)
+#define AFX_DIALOGTEMPLATE_H__C5A973AF_0F56_4BEC_814A_79318E2EB4AC__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "Platform.h"
+
+#include <vector>
+#include <stdexcept>
+
+#ifndef __BIG_ENDIAN__
+# define EXTENDED_DIALOG ((DWORD) 0xFFFF0001)
+#else
+# define EXTENDED_DIALOG ((DWORD) 0x0100FFFF)
+#endif
+
+struct DialogItemTemplate {
+ DWORD dwHelpId; // Extended only
+
+ short sX;
+ short sY;
+ short sWidth;
+ short sHeight;
+ DWORD dwExtStyle;
+ DWORD dwStyle;
+ WORD wId;
+
+ WCHAR *szClass;
+ WCHAR *szTitle;
+ char *szCreationData;
+
+ WORD wCreateDataSize;
+};
+
+#pragma pack(1)
+
+#ifndef _WIN32
+typedef struct {
+ DWORD style;
+ DWORD dwExtendedStyle;
+ WORD cdit;
+ short x;
+ short y;
+ short cx;
+ short cy;
+} DLGTEMPLATE;
+#endif
+
+typedef struct {
+ WORD dlgVer;
+ WORD signature;
+ DWORD helpID;
+ DWORD exStyle;
+ DWORD style;
+ WORD cDlgItems;
+ short x;
+ short y;
+ short cx;
+ short cy;
+} DLGTEMPLATEEX;
+
+#ifndef _WIN32
+typedef struct {
+ DWORD style;
+ DWORD dwExtendedStyle;
+ short x;
+ short y;
+ short cx;
+ short cy;
+ WORD id;
+} DLGITEMTEMPLATE;
+#endif
+
+typedef struct {
+ DWORD helpID;
+ DWORD exStyle;
+ DWORD style;
+ short x;
+ short y;
+ short cx;
+ short cy;
+ WORD id;
+ WORD _miscrosoft_docs_are_wrong;
+} DLGITEMTEMPLATEEX;
+
+#pragma pack()
+
+class CDialogTemplate {
+public:
+ CDialogTemplate(BYTE* pbData, unsigned int uCodePage=CP_ACP);
+ virtual ~CDialogTemplate();
+
+ short GetWidth();
+ short GetHeight();
+ DialogItemTemplate* GetItem(WORD wId);
+ DialogItemTemplate* GetItemByIdx(DWORD i);
+ int RemoveItem(WORD wId);
+ void SetFont(char* szFaceName, WORD wFontSize);
+ void AddItem(DialogItemTemplate item);
+#ifdef _WIN32
+ HWND CreateDummyDialog();
+#endif
+ void MoveAll(short x, short y);
+ void Resize(short x, short y);
+#ifdef _WIN32
+ void PixelsToDlgUnits(short& x, short& y);
+ void DlgUnitsToPixels(short& x, short& y);
+ SIZE GetStringSize(WORD id, char *str);
+ void RTrimToString(WORD id, char *str, int margins);
+ void LTrimToString(WORD id, char *str, int margins);
+ void CTrimToString(WORD id, char *str, int margins);
+#endif
+ void ConvertToRTL();
+ BYTE* Save(DWORD& dwSize);
+ DWORD GetSize();
+
+private:
+ bool m_bExtended;
+
+ DWORD m_dwHelpId; // Extended only
+
+ short m_sX;
+ short m_sY;
+ short m_sWidth;
+ short m_sHeight;
+ DWORD m_dwExtStyle;
+ DWORD m_dwStyle;
+
+ WCHAR *m_szMenu;
+ WCHAR *m_szClass;
+ WCHAR *m_szTitle;
+
+ // Only if DS_FONT style is set
+ short m_sFontSize;
+ short m_sFontWeight; // Extended only
+ BYTE m_bItalic; // Extended only
+ BYTE m_bCharset; // Extended only
+ WCHAR *m_szFont;
+
+ // For (en/de)coding Unicode
+ unsigned int m_uCodePage;
+
+ // Items vector
+ std::vector<DialogItemTemplate*> m_vItems;
+};
+
+#endif // !defined(AFX_DIALOGTEMPLATE_H__C5A973AF_0F56_4BEC_814A_79318E2EB4AC__INCLUDED_)
diff --git a/Source/Platform.h b/Source/Platform.h
index 28d7209..98ef2cf 100755
--- a/Source/Platform.h
+++ b/Source/Platform.h
@@ -1,875 +1,875 @@
-/*
- * Platform.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 ___PLATFORM__H___
-#define ___PLATFORM__H___
-
-// some definitions for non Win32 platforms were taken from MinGW's free Win32 library
-
-// includes
-
-#ifdef _WIN32
-# include <windows.h>
-# include <commctrl.h>
-#else
-# ifndef EXEHEAD
-# include <string.h>
-# include <stdlib.h>
-# endif
-// basic types
-typedef unsigned char BYTE, *PBYTE, *LPBYTE;
-typedef unsigned short WORD, *LPWORD;
-typedef unsigned int DWORD, *LPDWORD;
-typedef short SHORT;
-typedef unsigned short USHORT;
-typedef unsigned int UINT;
-typedef unsigned int UINT32;
-typedef int INT;
-typedef int INT32;
-typedef long LONG;
-typedef unsigned long ULONG;
-typedef long long INT64, LARGE_INTEGER;
-typedef unsigned long long UINT64, ULARGE_INTEGER;
-typedef int BOOL, *LPBOOL;
-typedef short VARIANT_BOOL;
-typedef void VOID;
-typedef void *LPVOID;
-typedef char CHAR, *PCHAR, *LPCH, *PCH, *NPSTR, *LPSTR, *PSTR;
-typedef unsigned char UCHAR;
-typedef const char *LPCCH, *PCSTR, *LPCSTR;
-typedef unsigned short WCHAR, OLECHAR, *PWCHAR, *LPWCH, *PWCH, *NWPSTR, *LPWSTR, *PWSTR, *BSTR;
-typedef const unsigned short *LPCWCH, *PCWCH, *LPCWSTR, *PCWSTR, *LPCOLESTR;
-typedef unsigned int UINT_PTR;
-// basic stuff
-typedef void * HANDLE;
-typedef HANDLE HWND;
-typedef unsigned long HKEY;
-// some gdi
-typedef unsigned long COLORREF;
-typedef unsigned long HBRUSH;
-// bool
-# define FALSE 0
-# define TRUE 1
-// more
-typedef WORD LANGID;
-// ULONGLONG
-#ifdef __GNUC__
-#define _HAVE_INT64
-#define _INTEGRAL_MAX_BITS 64
-#undef __int64
-#define __int64 long long
-#elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
-#define _HAVE_INT64
-#endif /* __GNUC__/__WATCOMC */
-#if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
-typedef __int64 LONGLONG;
-typedef unsigned __int64 DWORDLONG;
-#else
-typedef double LONGLONG,DWORDLONG;
-#endif
-typedef LONGLONG *PLONGLONG;
-typedef DWORDLONG *PDWORDLONG;
-typedef DWORDLONG ULONGLONG,*PULONGLONG;
-#endif
-
-#ifndef __BIG_ENDIAN__
-# define FIX_ENDIAN_INT32_INPLACE(x) ((void)(x))
-# define FIX_ENDIAN_INT32(x) (x)
-# define FIX_ENDIAN_INT16_INPLACE(x) ((void)(x))
-# define FIX_ENDIAN_INT16(x) (x)
-#else
-# define FIX_ENDIAN_INT32_INPLACE(x) ((x) = SWAP_ENDIAN_INT32(x))
-# define FIX_ENDIAN_INT32(x) SWAP_ENDIAN_INT32(x)
-# define FIX_ENDIAN_INT16_INPLACE(x) ((x) = SWAP_ENDIAN_INT16(x))
-# define FIX_ENDIAN_INT16(x) SWAP_ENDIAN_INT16(x)
-#endif
-#define SWAP_ENDIAN_INT32(x) ( \
- (((x)&0xFF000000) >> 24) | \
- (((x)&0x00FF0000) >> 8) | \
- (((x)&0x0000FF00) << 8) | \
- (((x)&0x000000FF) << 24) )
-#define SWAP_ENDIAN_INT16(x) ( \
- (((x)&0xFF00) >> 8) | \
- (((x)&0x00FF) << 8) )
-
-// script path separator
-
-# define PATH_SEPARATOR_STR "\\"
-# define PATH_SEPARATOR_C '\\'
-
-// system specific characters
-
-#ifdef _WIN32
-# define PLATFORM_PATH_SEPARATOR_STR "\\"
-# define PLATFORM_PATH_SEPARATOR_C '\\'
-# define OPT_STR "/"
-# define OPT_C '/'
-# define IS_OPT(a) (a[0]==OPT_C||a[0]=='-')
-#else
-# define PLATFORM_PATH_SEPARATOR_STR "/"
-# define PLATFORM_PATH_SEPARATOR_C '/'
-# define OPT_STR "-"
-# define OPT_C '-'
-# define IS_OPT(a) (a[0]==OPT_C)
-#endif
-
-// attributes
-
-#ifdef _MSC_VER
-# define FORCE_INLINE __forceinline
-#else
-# ifdef __GNUC__
-# if __GNUC__ < 3
-# define FORCE_INLINE inline
-# else
-# define FORCE_INLINE inline __attribute__ ((always_inline))
-# endif
-# else
-# define FORCE_INLINE inline
-# endif
-#endif
-
-// Added by Dave Laundon 19th August 2002
-// For all internal functions, use of stdcall calling convention moves the
-// responsibility for tidying the stack to callee from caller, reducing the code
-// involved considerably. Gives an instant saving of 0.5K.
-// NB - the zlib and bzip2 portions have been given the same treatment, but with
-// project compiler-options settings and/or project-wide defines.
-// NB - safer for NSIS's routines to be defined explicitly to avoid problems
-// calling DLL functions.
-#if defined(_WIN32) && ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
-# define NSISCALL __stdcall // Ordinary functions
-# define NSISCALLV __cdecl // Variable-argument-list functions
-#else
-# if defined(__GNUC__) && defined(__i386__)
-# define NSISCALL __attribute__((__stdcall__)) // Ordinary functions
-# define NSISCALLV __attribute__((__cdecl__)) // Variable-argument-list functions
-# else
-# define NSISCALL
-# define NSISCALLV
-# endif
-#endif
-
-#if defined(__GNUC__)
-#define UNUSED __attribute__((unused))
-#else
-#define UNUSED
-#endif
-
-// macros
-
-#ifndef _WIN32
-# ifndef FIELD_OFFSET
-# define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
-# endif
-# ifndef MAKEINTRESOURCEA
-# define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
-# endif
-# ifndef MAKEINTRESOURCEW
-# define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
-# endif
-# ifndef MAKEINTRESOURCE
-# define MAKEINTRESOURCE MAKEINTRESOURCEA
-# endif
-# ifndef IMAGE_FIRST_SECTION
-# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
- FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
- FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
-# endif
-# ifndef RGB
-# define RGB(r,g,b) ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
-# endif
-# ifndef MAKELONG
-# define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
-# endif
-#endif
-#ifndef IS_INTRESOURCE
-# define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0)
-#endif
-
-// functions
-
-#ifndef _WIN32
-# define stricmp strcasecmp
-# define strcmpi strcasecmp
-# define strnicmp strncasecmp
-# define CopyMemory memcpy
-# define ZeroMemory(x, y) memset(x, 0, y)
-#endif
-
-// defines
-
-#ifndef FOF_NOERRORUI
-# define FOF_NOERRORUI 0x0400
-#endif
-
-#ifndef ULONG_PTR
-# define ULONG_PTR DWORD
-#endif
-
-#ifndef IDC_HAND
-# define IDC_HAND MAKEINTRESOURCE(32649)
-#endif
-
-#ifndef BIF_NEWDIALOGSTYLE
-# define BIF_NEWDIALOGSTYLE 0x0040
-#endif
-
-#ifndef TVITEM
-# define TVITEM TV_ITEM
-#endif
-
-#ifndef TVM_SETITEMHEIGHT
-# define TVM_SETITEMHEIGHT (TV_FIRST + 27)
-#endif
-
-#ifndef TVM_GETITEMHEIGHT
-# define TVM_GETITEMHEIGHT (TV_FIRST + 28)
-#endif
-
-#ifndef LVS_EX_LABELTIP
-# define LVS_EX_LABELTIP 0x00004000
-#endif
-
-#ifndef EXEHEAD
-# ifndef SF_TEXT
-# define SF_TEXT 1
-# endif
-# ifndef SF_RTF
-# define SF_RTF 2
-# endif
-#endif
-
-#ifdef __GNUC__
-# undef INVALID_FILE_ATTRIBUTES
-#endif
-#ifndef INVALID_FILE_ATTRIBUTES
-# define INVALID_FILE_ATTRIBUTES ((unsigned long) -1)
-#endif
-
-// shell folders
-
-#ifdef _WIN32
-# include <shlobj.h>
-#endif
-
-#ifndef CSIDL_FLAG_CREATE
-# define CSIDL_FLAG_CREATE 0x8000
-#endif
-
-#ifndef CSIDL_PROGRAMS
-# define CSIDL_PROGRAMS 0x2
-#endif
-#ifndef CSIDL_COMMON_PROGRAMS
-# define CSIDL_COMMON_PROGRAMS 0x17
-#endif
-#ifndef CSIDL_PRINTERS
-# define CSIDL_PRINTERS 0x4
-#endif
-#ifndef CSIDL_PERSONAL
-# define CSIDL_PERSONAL 0x5
-#endif
-#ifndef CSIDL_COMMON_DOCUMENTS
-# define CSIDL_COMMON_DOCUMENTS 0x2E
-#endif
-#ifndef CSIDL_FAVORITES
-# define CSIDL_FAVORITES 0x6
-#endif
-#ifndef CSIDL_COMMON_FAVORITES
-# define CSIDL_COMMON_FAVORITES 0x1F
-#endif
-#ifndef CSIDL_STARTUP
-# define CSIDL_STARTUP 0x7
-#endif
-#ifndef CSIDL_COMMON_STARTUP
-# define CSIDL_COMMON_STARTUP 0x18
-#endif
-#ifndef CSIDL_RECENT
-# define CSIDL_RECENT 0x8
-#endif
-#ifndef CSIDL_SENDTO
-# define CSIDL_SENDTO 0x9
-#endif
-#ifndef CSIDL_STARTMENU
-# define CSIDL_STARTMENU 0xB
-#endif
-#ifndef CSIDL_COMMON_STARTMENU
-# define CSIDL_COMMON_STARTMENU 0x16
-#endif
-#ifndef CSIDL_DESKTOPDIRECTORY
-# define CSIDL_DESKTOPDIRECTORY 0x10
-#endif
-#ifndef CSIDL_COMMON_DESKTOPDIRECTORY
-# define CSIDL_COMMON_DESKTOPDIRECTORY 0x19
-#endif
-#ifndef CSIDL_NETHOOD
-# define CSIDL_NETHOOD 0x13
-#endif
-#ifndef CSIDL_FONTS
-# define CSIDL_FONTS 0x14
-#endif
-#ifndef CSIDL_TEMPLATES
-# define CSIDL_TEMPLATES 0x15
-#endif
-#ifndef CSIDL_COMMON_TEMPLATES
-# define CSIDL_COMMON_TEMPLATES 0x2D
-#endif
-#ifndef CSIDL_APPDATA
-# define CSIDL_APPDATA 0x1A
-#endif
-#ifndef CSIDL_COMMON_APPDATA
-# define CSIDL_COMMON_APPDATA 0x23
-#endif
-#ifndef CSIDL_LOCAL_APPDATA
-# define CSIDL_LOCAL_APPDATA 0x1C
-#endif
-#ifndef CSIDL_PRINTHOOD
-# define CSIDL_PRINTHOOD 0x1B
-#endif
-#ifndef CSIDL_ALTSTARTUP
-# define CSIDL_ALTSTARTUP 0x1D
-#endif
-#ifndef CSIDL_COMMON_ALTSTARTUP
-# define CSIDL_COMMON_ALTSTARTUP 0x1E
-#endif
-#ifndef CSIDL_INTERNET_CACHE
-# define CSIDL_INTERNET_CACHE 0x20
-#endif
-#ifndef CSIDL_COOKIES
-# define CSIDL_COOKIES 0x21
-#endif
-#ifndef CSIDL_HISTORY
-# define CSIDL_HISTORY 0x22
-#endif
-#ifndef CSIDL_WINDOWS
-# define CSIDL_WINDOWS 0x24
-#endif
-#ifndef CSIDL_SYSTEM
-# define CSIDL_SYSTEM 0x25
-#endif
-#ifndef CSIDL_PROGRAM_FILES
-# define CSIDL_PROGRAM_FILES 0x26
-#endif
-#ifndef CSIDL_PROGRAM_FILES_COMMON
-# define CSIDL_PROGRAM_FILES_COMMON 0x2B
-#endif
-#ifndef CSIDL_MYPICTURES
-# define CSIDL_MYPICTURES 0x27
-#endif
-#ifndef CSIDL_COMMON_PICTURES
-# define CSIDL_COMMON_PICTURES 0x36
-#endif
-#ifndef CSIDL_PROFILE
-# define CSIDL_PROFILE 0x28
-#endif
-#ifndef CSIDL_ADMINTOOLS
-# define CSIDL_ADMINTOOLS 0x30
-#endif
-#ifndef CSIDL_COMMON_ADMINTOOLS
-# define CSIDL_COMMON_ADMINTOOLS 0x2F
-#endif
-#ifndef CSIDL_MYMUSIC
-# define CSIDL_MYMUSIC 0xD
-#endif
-#ifndef CSIDL_COMMON_MUSIC
-# define CSIDL_COMMON_MUSIC 0x35
-#endif
-#ifndef CSIDL_MYVIDEO
-# define CSIDL_MYVIDEO 0xE
-#endif
-#ifndef CSIDL_COMMON_VIDEO
-# define CSIDL_COMMON_VIDEO 0x37
-#endif
-#ifndef CSIDL_RESOURCES
-# define CSIDL_RESOURCES 0x38
-#endif
-#ifndef CSIDL_RESOURCES_LOCALIZED
-# define CSIDL_RESOURCES_LOCALIZED 0x39
-#endif
-#ifndef CSIDL_CDBURN_AREA
-# define CSIDL_CDBURN_AREA 0x3B
-#endif
-
-// other shell stuff
-
-#ifndef SHACF_FILESYSTEM
-# define SHACF_FILESYSTEM 1
-#endif
-
-// other stuff
-
-#ifndef CP_ACP
-# define CP_ACP 0
-#endif
-
-#ifndef COLOR_BTNFACE
-# define COLOR_BTNFACE 15
-#endif
-#ifndef COLOR_WINDOW
-# define COLOR_WINDOW 5
-#endif
-
-// resources
-
-#ifndef RT_BITMAP
-# define RT_BITMAP MAKEINTRESOURCE(2)
-#endif
-#ifndef RT_ICON
-# define RT_ICON MAKEINTRESOURCE(3)
-#endif
-#ifndef RT_DIALOG
-# define RT_DIALOG MAKEINTRESOURCE(5)
-#endif
-#ifndef RT_GROUP_ICON
-# define RT_GROUP_ICON MAKEINTRESOURCE(14)
-#endif
-#ifndef RT_VERSION
-# define RT_VERSION MAKEINTRESOURCE(16)
-#endif
-
-// version
-
-#ifndef VS_FILE_INFO
-# define VS_FILE_INFO RT_VERSION
-#endif
-#ifndef VS_VERSION_INFO
-# define VS_VERSION_INFO 1
-#endif
-#ifndef VS_FFI_SIGNATURE
-# define VS_FFI_SIGNATURE 0xFEEF04BD
-#endif
-
-// message box
-
-#ifndef MB_OK
-# define MB_OK 0
-# define MB_OKCANCEL 1
-# define MB_ABORTRETRYIGNORE 2
-# define MB_YESNOCANCEL 3
-# define MB_YESNO 4
-# define MB_RETRYCANCEL 5
-# define MB_DEFBUTTON1 0
-# define MB_DEFBUTTON2 256
-# define MB_DEFBUTTON3 512
-# define MB_DEFBUTTON4 768
-# define MB_ICONSTOP 16
-# define MB_ICONQUESTION 32
-# define MB_ICONEXCLAMATION 48
-# define MB_ICONINFORMATION 64
-# define MB_USERICON 128
-# define MB_SETFOREGROUND 0x10000
-# define MB_TOPMOST 0x40000
-# define MB_RIGHT 0x80000
-# define MB_RTLREADING 0x100000
-#endif
-
-#ifndef IDOK
-# define IDOK 1
-# define IDCANCEL 2
-# define IDABORT 3
-# define IDRETRY 4
-# define IDIGNORE 5
-# define IDYES 6
-# define IDNO 7
-#endif
-
-// window styles
-
-#ifndef _WIN32
-# define WS_CHILD 0x40000000
-# define WS_VISIBLE 0x10000000
-
-# define BS_CHECKBOX 2
-# define BS_LEFT 256
-# define BS_LEFTTEXT 32
-# define BS_RADIOBUTTON 4
-# define BS_RIGHT 512
-# define BS_USERBUTTON 8
-
-# define ES_LEFT 0
-# define ES_CENTER 1
-# define ES_RIGHT 2
-
-# define SS_BITMAP 14
-# define SS_CENTER 1
-# define SS_CENTERIMAGE 512
-# define SS_ICON 3
-# define SS_LEFT 0
-# define SS_LEFTNOWORDWRAP 0xc
-# define SS_RIGHT 2
-# define SS_RIGHTJUST 0x400
-# define SS_USERITEM 10
-# define SS_TYPEMASK 0x0000001FL
-
-# define DS_FIXEDSYS 8
-# define DS_SETFONT 64
-
-# define WS_EX_RIGHT 0x1000
-# define WS_EX_RIGHTSCROLLBAR 0
-# define WS_EX_RTLREADING 0x2000
-# define WS_EX_LEFTSCROLLBAR 0x4000
-
-# define TVS_RTLREADING 64
-
-# define PBS_SMOOTH 1
-#endif
-
-#ifndef DS_SHELLFONT
-# define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
-#endif
-
-// brush styles
-
-#ifndef BS_SOLID
-# define BS_SOLID 0
-#endif
-#ifndef BS_NULL
-# define BS_NULL 1
-#endif
-
-// reg
-#ifndef HKEY_CLASSES_ROOT
-# define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
-# define HKEY_CURRENT_USER ((HKEY)0x80000001)
-# define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
-# define HKEY_USERS ((HKEY)0x80000003)
-# define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
-# define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
-# define HKEY_DYN_DATA ((HKEY)0x80000006)
-#endif
-
-#ifndef KEY_WOW64_64KEY
-# define KEY_WOW64_64KEY 0x100
-#endif
-
-// show modes
-
-#ifndef SW_SHOWNORMAL
-# define SW_HIDE 0
-# define SW_SHOWNORMAL 1
-# define SW_SHOWMINIMIZED 2
-# define SW_SHOWMAXIMIZED 3
-# define SW_SHOWNOACTIVATE 4
-# define SW_SHOWMINNOACTIVE 7
-# define SW_SHOWNA 8
-#endif
-
-// hotkeys
-
-#ifndef HOTKEYF_SHIFT
-# define HOTKEYF_SHIFT 1
-# define HOTKEYF_CONTROL 2
-# define HOTKEYF_ALT 4
-# define HOTKEYF_EXT 8
-#endif
-
-// vk
-#ifndef VK_F1
-# define VK_F1 0x70
-#endif
-
-// gdi
-
-#ifndef OPAQUE
-# define OPAQUE 2
-#endif
-#ifndef TRANSPARENT
-# define TRANSPARENT 1
-#endif
-#ifndef LF_FACESIZE
-# define LF_FACESIZE 32
-#endif
-#ifndef FW_NORMAL
-# define FW_NORMAL 400
-#endif
-#ifndef FW_BOLD
-# define FW_BOLD 700
-#endif
-#ifndef DEFAULT_CHARSET
-# define DEFAULT_CHARSET 1
-#endif
-#ifndef OUT_DEFAULT_PRECIS
-# define OUT_DEFAULT_PRECIS 0
-#endif
-#ifndef CLIP_DEFAULT_PRECIS
-# define CLIP_DEFAULT_PRECIS 0
-#endif
-#ifndef DEFAULT_QUALITY
-# define DEFAULT_QUALITY 0
-#endif
-#ifndef DEFAULT_PITCH
-# define DEFAULT_PITCH 0
-#endif
-
-// file ops
-
-#ifndef FOF_SILENT
-# define FOF_SILENT 4
-# define FOF_NOCONFIRMATION 16
-# define FOF_FILESONLY 128
-# define FOF_SIMPLEPROGRESS 256
-# define FOF_NOCONFIRMMKDIR 512
-#endif
-
-// file attribs
-
-#ifndef FILE_ATTRIBUTE_READONLY
-# define FILE_ATTRIBUTE_READONLY 0x00000001
-# define FILE_ATTRIBUTE_HIDDEN 0x00000002
-# define FILE_ATTRIBUTE_SYSTEM 0x00000004
-# define FILE_ATTRIBUTE_ARCHIVE 0x00000020
-# define FILE_ATTRIBUTE_NORMAL 0x00000080
-# define FILE_ATTRIBUTE_TEMPORARY 0x00000100
-# define FILE_ATTRIBUTE_OFFLINE 0x00001000
-#endif
-
-// registry
-
-#ifndef REG_SZ
-# define REG_SZ 1
-# define REG_EXPAND_SZ 2
-# define REG_BINARY 3
-# define REG_DWORD 4
-#endif
-
-// fopen
-#ifndef GENERIC_READ
-# define GENERIC_READ 0x80000000
-# define GENERIC_WRITE 0x40000000
-#endif
-
-#ifndef CREATE_NEW
-# define CREATE_NEW 1
-# define CREATE_ALWAYS 2
-# define OPEN_EXISTING 3
-# define OPEN_ALWAYS 4
-#endif
-
-// fseek
-
-#ifndef FILE_BEGIN
-# define FILE_BEGIN 0
-# define FILE_CURRENT 1
-# define FILE_END 2
-#endif
-
-// PE
-
-#ifndef _WIN32
-# define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
-# ifndef __BIG_ENDIAN__
-# define IMAGE_DOS_SIGNATURE 0x5A4D
-# define IMAGE_NT_SIGNATURE 0x00004550
-# else
-# define IMAGE_DOS_SIGNATURE 0x4D5A
-# define IMAGE_NT_SIGNATURE 0x50450000
-# endif
-# define IMAGE_FILE_DLL 8192
-# define IMAGE_DIRECTORY_ENTRY_EXPORT 0
-# define IMAGE_SIZEOF_SHORT_NAME 8
-#endif
-
-// structures
-
-#ifndef _WIN32
-typedef struct _LOGFONT {
- LONG lfHeight;
- LONG lfWidth;
- LONG lfEscapement;
- LONG lfOrientation;
- LONG lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
- CHAR lfFaceName[LF_FACESIZE];
-} LOGFONT;
-# pragma pack(2)
-typedef struct _IMAGE_DOS_HEADER {
- WORD e_magic;
- WORD e_cblp;
- WORD e_cp;
- WORD e_crlc;
- WORD e_cparhdr;
- WORD e_minalloc;
- WORD e_maxalloc;
- WORD e_ss;
- WORD e_sp;
- WORD e_csum;
- WORD e_ip;
- WORD e_cs;
- WORD e_lfarlc;
- WORD e_ovno;
- WORD e_res[4];
- WORD e_oemid;
- WORD e_oeminfo;
- WORD e_res2[10];
- LONG e_lfanew;
-} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
-# pragma pack()
-# pragma pack(4)
-typedef struct _IMAGE_FILE_HEADER {
- WORD Machine;
- WORD NumberOfSections;
- DWORD TimeDateStamp;
- DWORD PointerToSymbolTable;
- DWORD NumberOfSymbols;
- WORD SizeOfOptionalHeader;
- WORD Characteristics;
-} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
-typedef struct _IMAGE_DATA_DIRECTORY {
- DWORD VirtualAddress;
- DWORD Size;
-} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
-typedef struct _IMAGE_OPTIONAL_HEADER {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- DWORD BaseOfData;
- DWORD ImageBase;
- DWORD SectionAlignment;
- DWORD FileAlignment;
- WORD MajorOperatingSystemVersion;
- WORD MinorOperatingSystemVersion;
- WORD MajorImageVersion;
- WORD MinorImageVersion;
- WORD MajorSubsystemVersion;
- WORD MinorSubsystemVersion;
- DWORD Reserved1;
- DWORD SizeOfImage;
- DWORD SizeOfHeaders;
- DWORD CheckSum;
- WORD Subsystem;
- WORD DllCharacteristics;
- DWORD SizeOfStackReserve;
- DWORD SizeOfStackCommit;
- DWORD SizeOfHeapReserve;
- DWORD SizeOfHeapCommit;
- DWORD LoaderFlags;
- DWORD NumberOfRvaAndSizes;
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-} IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32;
-typedef struct _IMAGE_OPTIONAL_HEADER64 {
- WORD Magic;
- BYTE MajorLinkerVersion;
- BYTE MinorLinkerVersion;
- DWORD SizeOfCode;
- DWORD SizeOfInitializedData;
- DWORD SizeOfUninitializedData;
- DWORD AddressOfEntryPoint;
- DWORD BaseOfCode;
- ULONGLONG ImageBase;
- DWORD SectionAlignment;
- DWORD FileAlignment;
- WORD MajorOperatingSystemVersion;
- WORD MinorOperatingSystemVersion;
- WORD MajorImageVersion;
- WORD MinorImageVersion;
- WORD MajorSubsystemVersion;
- WORD MinorSubsystemVersion;
- DWORD Win32VersionValue;
- DWORD SizeOfImage;
- DWORD SizeOfHeaders;
- DWORD CheckSum;
- WORD Subsystem;
- WORD DllCharacteristics;
- ULONGLONG SizeOfStackReserve;
- ULONGLONG SizeOfStackCommit;
- ULONGLONG SizeOfHeapReserve;
- ULONGLONG SizeOfHeapCommit;
- DWORD LoaderFlags;
- DWORD NumberOfRvaAndSizes;
- IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
-} IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64;
-#ifdef _WIN64
-typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
-typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
-#else
-typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER;
-typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER;
-#endif
-#ifndef __BIG_ENDIAN__
-# define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
-# define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
-#else
-# define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x0b01
-# define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x0b02
-#endif
-typedef struct _IMAGE_NT_HEADERS {
- DWORD Signature;
- IMAGE_FILE_HEADER FileHeader;
- IMAGE_OPTIONAL_HEADER OptionalHeader;
-} IMAGE_NT_HEADERS,*PIMAGE_NT_HEADERS;
-typedef struct _IMAGE_SECTION_HEADER {
- BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
- union {
- DWORD PhysicalAddress;
- DWORD VirtualSize;
- } Misc;
- DWORD VirtualAddress;
- DWORD SizeOfRawData;
- DWORD PointerToRawData;
- DWORD PointerToRelocations;
- DWORD PointerToLinenumbers;
- WORD NumberOfRelocations;
- WORD NumberOfLinenumbers;
- DWORD Characteristics;
-} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
-typedef struct _IMAGE_EXPORT_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- DWORD Name;
- DWORD Base;
- DWORD NumberOfFunctions;
- DWORD NumberOfNames;
- DWORD AddressOfFunctions;
- DWORD AddressOfNames;
- DWORD AddressOfNameOrdinals;
-} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
-typedef struct tagVS_FIXEDFILEINFO {
- DWORD dwSignature;
- DWORD dwStrucVersion;
- DWORD dwFileVersionMS;
- DWORD dwFileVersionLS;
- DWORD dwProductVersionMS;
- DWORD dwProductVersionLS;
- DWORD dwFileFlagsMask;
- DWORD dwFileFlags;
- DWORD dwFileOS;
- DWORD dwFileType;
- DWORD dwFileSubtype;
- DWORD dwFileDateMS;
- DWORD dwFileDateLS;
-} VS_FIXEDFILEINFO;
-# pragma pack()
-#endif
-
-#ifndef SHGFP_TYPE_CURRENT
- #define SHGFP_TYPE_CURRENT 0
-#endif
-
-#endif
+/*
+ * Platform.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 ___PLATFORM__H___
+#define ___PLATFORM__H___
+
+// some definitions for non Win32 platforms were taken from MinGW's free Win32 library
+
+// includes
+
+#ifdef _WIN32
+# include <windows.h>
+# include <commctrl.h>
+#else
+# ifndef EXEHEAD
+# include <string.h>
+# include <stdlib.h>
+# endif
+// basic types
+typedef unsigned char BYTE, *PBYTE, *LPBYTE;
+typedef unsigned short WORD, *LPWORD;
+typedef unsigned int DWORD, *LPDWORD;
+typedef short SHORT;
+typedef unsigned short USHORT;
+typedef unsigned int UINT;
+typedef unsigned int UINT32;
+typedef int INT;
+typedef int INT32;
+typedef long LONG;
+typedef unsigned long ULONG;
+typedef long long INT64, LARGE_INTEGER;
+typedef unsigned long long UINT64, ULARGE_INTEGER;
+typedef int BOOL, *LPBOOL;
+typedef short VARIANT_BOOL;
+typedef void VOID;
+typedef void *LPVOID;
+typedef char CHAR, *PCHAR, *LPCH, *PCH, *NPSTR, *LPSTR, *PSTR;
+typedef unsigned char UCHAR;
+typedef const char *LPCCH, *PCSTR, *LPCSTR;
+typedef unsigned short WCHAR, OLECHAR, *PWCHAR, *LPWCH, *PWCH, *NWPSTR, *LPWSTR, *PWSTR, *BSTR;
+typedef const unsigned short *LPCWCH, *PCWCH, *LPCWSTR, *PCWSTR, *LPCOLESTR;
+typedef unsigned int UINT_PTR;
+// basic stuff
+typedef void * HANDLE;
+typedef HANDLE HWND;
+typedef unsigned long HKEY;
+// some gdi
+typedef unsigned long COLORREF;
+typedef unsigned long HBRUSH;
+// bool
+# define FALSE 0
+# define TRUE 1
+// more
+typedef WORD LANGID;
+// ULONGLONG
+#ifdef __GNUC__
+#define _HAVE_INT64
+#define _INTEGRAL_MAX_BITS 64
+#undef __int64
+#define __int64 long long
+#elif defined(__WATCOMC__) && (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
+#define _HAVE_INT64
+#endif /* __GNUC__/__WATCOMC */
+#if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
+typedef __int64 LONGLONG;
+typedef unsigned __int64 DWORDLONG;
+#else
+typedef double LONGLONG,DWORDLONG;
+#endif
+typedef LONGLONG *PLONGLONG;
+typedef DWORDLONG *PDWORDLONG;
+typedef DWORDLONG ULONGLONG,*PULONGLONG;
+#endif
+
+#ifndef __BIG_ENDIAN__
+# define FIX_ENDIAN_INT32_INPLACE(x) ((void)(x))
+# define FIX_ENDIAN_INT32(x) (x)
+# define FIX_ENDIAN_INT16_INPLACE(x) ((void)(x))
+# define FIX_ENDIAN_INT16(x) (x)
+#else
+# define FIX_ENDIAN_INT32_INPLACE(x) ((x) = SWAP_ENDIAN_INT32(x))
+# define FIX_ENDIAN_INT32(x) SWAP_ENDIAN_INT32(x)
+# define FIX_ENDIAN_INT16_INPLACE(x) ((x) = SWAP_ENDIAN_INT16(x))
+# define FIX_ENDIAN_INT16(x) SWAP_ENDIAN_INT16(x)
+#endif
+#define SWAP_ENDIAN_INT32(x) ( \
+ (((x)&0xFF000000) >> 24) | \
+ (((x)&0x00FF0000) >> 8) | \
+ (((x)&0x0000FF00) << 8) | \
+ (((x)&0x000000FF) << 24) )
+#define SWAP_ENDIAN_INT16(x) ( \
+ (((x)&0xFF00) >> 8) | \
+ (((x)&0x00FF) << 8) )
+
+// script path separator
+
+# define PATH_SEPARATOR_STR "\\"
+# define PATH_SEPARATOR_C '\\'
+
+// system specific characters
+
+#ifdef _WIN32
+# define PLATFORM_PATH_SEPARATOR_STR "\\"
+# define PLATFORM_PATH_SEPARATOR_C '\\'
+# define OPT_STR "/"
+# define OPT_C '/'
+# define IS_OPT(a) (a[0]==OPT_C||a[0]=='-')
+#else
+# define PLATFORM_PATH_SEPARATOR_STR "/"
+# define PLATFORM_PATH_SEPARATOR_C '/'
+# define OPT_STR "-"
+# define OPT_C '-'
+# define IS_OPT(a) (a[0]==OPT_C)
+#endif
+
+// attributes
+
+#ifdef _MSC_VER
+# define FORCE_INLINE __forceinline
+#else
+# ifdef __GNUC__
+# if __GNUC__ < 3
+# define FORCE_INLINE inline
+# else
+# define FORCE_INLINE inline __attribute__ ((always_inline))
+# endif
+# else
+# define FORCE_INLINE inline
+# endif
+#endif
+
+// Added by Dave Laundon 19th August 2002
+// For all internal functions, use of stdcall calling convention moves the
+// responsibility for tidying the stack to callee from caller, reducing the code
+// involved considerably. Gives an instant saving of 0.5K.
+// NB - the zlib and bzip2 portions have been given the same treatment, but with
+// project compiler-options settings and/or project-wide defines.
+// NB - safer for NSIS's routines to be defined explicitly to avoid problems
+// calling DLL functions.
+#if defined(_WIN32) && ((_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED))
+# define NSISCALL __stdcall // Ordinary functions
+# define NSISCALLV __cdecl // Variable-argument-list functions
+#else
+# if defined(__GNUC__) && defined(__i386__)
+# define NSISCALL __attribute__((__stdcall__)) // Ordinary functions
+# define NSISCALLV __attribute__((__cdecl__)) // Variable-argument-list functions
+# else
+# define NSISCALL
+# define NSISCALLV
+# endif
+#endif
+
+#if defined(__GNUC__)
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+
+// macros
+
+#ifndef _WIN32
+# ifndef FIELD_OFFSET
+# define FIELD_OFFSET(t,f) ((LONG)&(((t*)0)->f))
+# endif
+# ifndef MAKEINTRESOURCEA
+# define MAKEINTRESOURCEA(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
+# endif
+# ifndef MAKEINTRESOURCEW
+# define MAKEINTRESOURCEW(i) ((LPWSTR)((ULONG_PTR)((WORD)(i))))
+# endif
+# ifndef MAKEINTRESOURCE
+# define MAKEINTRESOURCE MAKEINTRESOURCEA
+# endif
+# ifndef IMAGE_FIRST_SECTION
+# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \
+ FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \
+ FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) )
+# endif
+# ifndef RGB
+# define RGB(r,g,b) ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
+# endif
+# ifndef MAKELONG
+# define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
+# endif
+#endif
+#ifndef IS_INTRESOURCE
+# define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0)
+#endif
+
+// functions
+
+#ifndef _WIN32
+# define stricmp strcasecmp
+# define strcmpi strcasecmp
+# define strnicmp strncasecmp
+# define CopyMemory memcpy
+# define ZeroMemory(x, y) memset(x, 0, y)
+#endif
+
+// defines
+
+#ifndef FOF_NOERRORUI
+# define FOF_NOERRORUI 0x0400
+#endif
+
+#ifndef ULONG_PTR
+# define ULONG_PTR DWORD
+#endif
+
+#ifndef IDC_HAND
+# define IDC_HAND MAKEINTRESOURCE(32649)
+#endif
+
+#ifndef BIF_NEWDIALOGSTYLE
+# define BIF_NEWDIALOGSTYLE 0x0040
+#endif
+
+#ifndef TVITEM
+# define TVITEM TV_ITEM
+#endif
+
+#ifndef TVM_SETITEMHEIGHT
+# define TVM_SETITEMHEIGHT (TV_FIRST + 27)
+#endif
+
+#ifndef TVM_GETITEMHEIGHT
+# define TVM_GETITEMHEIGHT (TV_FIRST + 28)
+#endif
+
+#ifndef LVS_EX_LABELTIP
+# define LVS_EX_LABELTIP 0x00004000
+#endif
+
+#ifndef EXEHEAD
+# ifndef SF_TEXT
+# define SF_TEXT 1
+# endif
+# ifndef SF_RTF
+# define SF_RTF 2
+# endif
+#endif
+
+#ifdef __GNUC__
+# undef INVALID_FILE_ATTRIBUTES
+#endif
+#ifndef INVALID_FILE_ATTRIBUTES
+# define INVALID_FILE_ATTRIBUTES ((unsigned long) -1)
+#endif
+
+// shell folders
+
+#ifdef _WIN32
+# include <shlobj.h>
+#endif
+
+#ifndef CSIDL_FLAG_CREATE
+# define CSIDL_FLAG_CREATE 0x8000
+#endif
+
+#ifndef CSIDL_PROGRAMS
+# define CSIDL_PROGRAMS 0x2
+#endif
+#ifndef CSIDL_COMMON_PROGRAMS
+# define CSIDL_COMMON_PROGRAMS 0x17
+#endif
+#ifndef CSIDL_PRINTERS
+# define CSIDL_PRINTERS 0x4
+#endif
+#ifndef CSIDL_PERSONAL
+# define CSIDL_PERSONAL 0x5
+#endif
+#ifndef CSIDL_COMMON_DOCUMENTS
+# define CSIDL_COMMON_DOCUMENTS 0x2E
+#endif
+#ifndef CSIDL_FAVORITES
+# define CSIDL_FAVORITES 0x6
+#endif
+#ifndef CSIDL_COMMON_FAVORITES
+# define CSIDL_COMMON_FAVORITES 0x1F
+#endif
+#ifndef CSIDL_STARTUP
+# define CSIDL_STARTUP 0x7
+#endif
+#ifndef CSIDL_COMMON_STARTUP
+# define CSIDL_COMMON_STARTUP 0x18
+#endif
+#ifndef CSIDL_RECENT
+# define CSIDL_RECENT 0x8
+#endif
+#ifndef CSIDL_SENDTO
+# define CSIDL_SENDTO 0x9
+#endif
+#ifndef CSIDL_STARTMENU
+# define CSIDL_STARTMENU 0xB
+#endif
+#ifndef CSIDL_COMMON_STARTMENU
+# define CSIDL_COMMON_STARTMENU 0x16
+#endif
+#ifndef CSIDL_DESKTOPDIRECTORY
+# define CSIDL_DESKTOPDIRECTORY 0x10
+#endif
+#ifndef CSIDL_COMMON_DESKTOPDIRECTORY
+# define CSIDL_COMMON_DESKTOPDIRECTORY 0x19
+#endif
+#ifndef CSIDL_NETHOOD
+# define CSIDL_NETHOOD 0x13
+#endif
+#ifndef CSIDL_FONTS
+# define CSIDL_FONTS 0x14
+#endif
+#ifndef CSIDL_TEMPLATES
+# define CSIDL_TEMPLATES 0x15
+#endif
+#ifndef CSIDL_COMMON_TEMPLATES
+# define CSIDL_COMMON_TEMPLATES 0x2D
+#endif
+#ifndef CSIDL_APPDATA
+# define CSIDL_APPDATA 0x1A
+#endif
+#ifndef CSIDL_COMMON_APPDATA
+# define CSIDL_COMMON_APPDATA 0x23
+#endif
+#ifndef CSIDL_LOCAL_APPDATA
+# define CSIDL_LOCAL_APPDATA 0x1C
+#endif
+#ifndef CSIDL_PRINTHOOD
+# define CSIDL_PRINTHOOD 0x1B
+#endif
+#ifndef CSIDL_ALTSTARTUP
+# define CSIDL_ALTSTARTUP 0x1D
+#endif
+#ifndef CSIDL_COMMON_ALTSTARTUP
+# define CSIDL_COMMON_ALTSTARTUP 0x1E
+#endif
+#ifndef CSIDL_INTERNET_CACHE
+# define CSIDL_INTERNET_CACHE 0x20
+#endif
+#ifndef CSIDL_COOKIES
+# define CSIDL_COOKIES 0x21
+#endif
+#ifndef CSIDL_HISTORY
+# define CSIDL_HISTORY 0x22
+#endif
+#ifndef CSIDL_WINDOWS
+# define CSIDL_WINDOWS 0x24
+#endif
+#ifndef CSIDL_SYSTEM
+# define CSIDL_SYSTEM 0x25
+#endif
+#ifndef CSIDL_PROGRAM_FILES
+# define CSIDL_PROGRAM_FILES 0x26
+#endif
+#ifndef CSIDL_PROGRAM_FILES_COMMON
+# define CSIDL_PROGRAM_FILES_COMMON 0x2B
+#endif
+#ifndef CSIDL_MYPICTURES
+# define CSIDL_MYPICTURES 0x27
+#endif
+#ifndef CSIDL_COMMON_PICTURES
+# define CSIDL_COMMON_PICTURES 0x36
+#endif
+#ifndef CSIDL_PROFILE
+# define CSIDL_PROFILE 0x28
+#endif
+#ifndef CSIDL_ADMINTOOLS
+# define CSIDL_ADMINTOOLS 0x30
+#endif
+#ifndef CSIDL_COMMON_ADMINTOOLS
+# define CSIDL_COMMON_ADMINTOOLS 0x2F
+#endif
+#ifndef CSIDL_MYMUSIC
+# define CSIDL_MYMUSIC 0xD
+#endif
+#ifndef CSIDL_COMMON_MUSIC
+# define CSIDL_COMMON_MUSIC 0x35
+#endif
+#ifndef CSIDL_MYVIDEO
+# define CSIDL_MYVIDEO 0xE
+#endif
+#ifndef CSIDL_COMMON_VIDEO
+# define CSIDL_COMMON_VIDEO 0x37
+#endif
+#ifndef CSIDL_RESOURCES
+# define CSIDL_RESOURCES 0x38
+#endif
+#ifndef CSIDL_RESOURCES_LOCALIZED
+# define CSIDL_RESOURCES_LOCALIZED 0x39
+#endif
+#ifndef CSIDL_CDBURN_AREA
+# define CSIDL_CDBURN_AREA 0x3B
+#endif
+
+// other shell stuff
+
+#ifndef SHACF_FILESYSTEM
+# define SHACF_FILESYSTEM 1
+#endif
+
+// other stuff
+
+#ifndef CP_ACP
+# define CP_ACP 0
+#endif
+
+#ifndef COLOR_BTNFACE
+# define COLOR_BTNFACE 15
+#endif
+#ifndef COLOR_WINDOW
+# define COLOR_WINDOW 5
+#endif
+
+// resources
+
+#ifndef RT_BITMAP
+# define RT_BITMAP MAKEINTRESOURCE(2)
+#endif
+#ifndef RT_ICON
+# define RT_ICON MAKEINTRESOURCE(3)
+#endif
+#ifndef RT_DIALOG
+# define RT_DIALOG MAKEINTRESOURCE(5)
+#endif
+#ifndef RT_GROUP_ICON
+# define RT_GROUP_ICON MAKEINTRESOURCE(14)
+#endif
+#ifndef RT_VERSION
+# define RT_VERSION MAKEINTRESOURCE(16)
+#endif
+
+// version
+
+#ifndef VS_FILE_INFO
+# define VS_FILE_INFO RT_VERSION
+#endif
+#ifndef VS_VERSION_INFO
+# define VS_VERSION_INFO 1
+#endif
+#ifndef VS_FFI_SIGNATURE
+# define VS_FFI_SIGNATURE 0xFEEF04BD
+#endif
+
+// message box
+
+#ifndef MB_OK
+# define MB_OK 0
+# define MB_OKCANCEL 1
+# define MB_ABORTRETRYIGNORE 2
+# define MB_YESNOCANCEL 3
+# define MB_YESNO 4
+# define MB_RETRYCANCEL 5
+# define MB_DEFBUTTON1 0
+# define MB_DEFBUTTON2 256
+# define MB_DEFBUTTON3 512
+# define MB_DEFBUTTON4 768
+# define MB_ICONSTOP 16
+# define MB_ICONQUESTION 32
+# define MB_ICONEXCLAMATION 48
+# define MB_ICONINFORMATION 64
+# define MB_USERICON 128
+# define MB_SETFOREGROUND 0x10000
+# define MB_TOPMOST 0x40000
+# define MB_RIGHT 0x80000
+# define MB_RTLREADING 0x100000
+#endif
+
+#ifndef IDOK
+# define IDOK 1
+# define IDCANCEL 2
+# define IDABORT 3
+# define IDRETRY 4
+# define IDIGNORE 5
+# define IDYES 6
+# define IDNO 7
+#endif
+
+// window styles
+
+#ifndef _WIN32
+# define WS_CHILD 0x40000000
+# define WS_VISIBLE 0x10000000
+
+# define BS_CHECKBOX 2
+# define BS_LEFT 256
+# define BS_LEFTTEXT 32
+# define BS_RADIOBUTTON 4
+# define BS_RIGHT 512
+# define BS_USERBUTTON 8
+
+# define ES_LEFT 0
+# define ES_CENTER 1
+# define ES_RIGHT 2
+
+# define SS_BITMAP 14
+# define SS_CENTER 1
+# define SS_CENTERIMAGE 512
+# define SS_ICON 3
+# define SS_LEFT 0
+# define SS_LEFTNOWORDWRAP 0xc
+# define SS_RIGHT 2
+# define SS_RIGHTJUST 0x400
+# define SS_USERITEM 10
+# define SS_TYPEMASK 0x0000001FL
+
+# define DS_FIXEDSYS 8
+# define DS_SETFONT 64
+
+# define WS_EX_RIGHT 0x1000
+# define WS_EX_RIGHTSCROLLBAR 0
+# define WS_EX_RTLREADING 0x2000
+# define WS_EX_LEFTSCROLLBAR 0x4000
+
+# define TVS_RTLREADING 64
+
+# define PBS_SMOOTH 1
+#endif
+
+#ifndef DS_SHELLFONT
+# define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
+#endif
+
+// brush styles
+
+#ifndef BS_SOLID
+# define BS_SOLID 0
+#endif
+#ifndef BS_NULL
+# define BS_NULL 1
+#endif
+
+// reg
+#ifndef HKEY_CLASSES_ROOT
+# define HKEY_CLASSES_ROOT ((HKEY)0x80000000)
+# define HKEY_CURRENT_USER ((HKEY)0x80000001)
+# define HKEY_LOCAL_MACHINE ((HKEY)0x80000002)
+# define HKEY_USERS ((HKEY)0x80000003)
+# define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
+# define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
+# define HKEY_DYN_DATA ((HKEY)0x80000006)
+#endif
+
+#ifndef KEY_WOW64_64KEY
+# define KEY_WOW64_64KEY 0x100
+#endif
+
+// show modes
+
+#ifndef SW_SHOWNORMAL
+# define SW_HIDE 0
+# define SW_SHOWNORMAL 1
+# define SW_SHOWMINIMIZED 2
+# define SW_SHOWMAXIMIZED 3
+# define SW_SHOWNOACTIVATE 4
+# define SW_SHOWMINNOACTIVE 7
+# define SW_SHOWNA 8
+#endif
+
+// hotkeys
+
+#ifndef HOTKEYF_SHIFT
+# define HOTKEYF_SHIFT 1
+# define HOTKEYF_CONTROL 2
+# define HOTKEYF_ALT 4
+# define HOTKEYF_EXT 8
+#endif
+
+// vk
+#ifndef VK_F1
+# define VK_F1 0x70
+#endif
+
+// gdi
+
+#ifndef OPAQUE
+# define OPAQUE 2
+#endif
+#ifndef TRANSPARENT
+# define TRANSPARENT 1
+#endif
+#ifndef LF_FACESIZE
+# define LF_FACESIZE 32
+#endif
+#ifndef FW_NORMAL
+# define FW_NORMAL 400
+#endif
+#ifndef FW_BOLD
+# define FW_BOLD 700
+#endif
+#ifndef DEFAULT_CHARSET
+# define DEFAULT_CHARSET 1
+#endif
+#ifndef OUT_DEFAULT_PRECIS
+# define OUT_DEFAULT_PRECIS 0
+#endif
+#ifndef CLIP_DEFAULT_PRECIS
+# define CLIP_DEFAULT_PRECIS 0
+#endif
+#ifndef DEFAULT_QUALITY
+# define DEFAULT_QUALITY 0
+#endif
+#ifndef DEFAULT_PITCH
+# define DEFAULT_PITCH 0
+#endif
+
+// file ops
+
+#ifndef FOF_SILENT
+# define FOF_SILENT 4
+# define FOF_NOCONFIRMATION 16
+# define FOF_FILESONLY 128
+# define FOF_SIMPLEPROGRESS 256
+# define FOF_NOCONFIRMMKDIR 512
+#endif
+
+// file attribs
+
+#ifndef FILE_ATTRIBUTE_READONLY
+# define FILE_ATTRIBUTE_READONLY 0x00000001
+# define FILE_ATTRIBUTE_HIDDEN 0x00000002
+# define FILE_ATTRIBUTE_SYSTEM 0x00000004
+# define FILE_ATTRIBUTE_ARCHIVE 0x00000020
+# define FILE_ATTRIBUTE_NORMAL 0x00000080
+# define FILE_ATTRIBUTE_TEMPORARY 0x00000100
+# define FILE_ATTRIBUTE_OFFLINE 0x00001000
+#endif
+
+// registry
+
+#ifndef REG_SZ
+# define REG_SZ 1
+# define REG_EXPAND_SZ 2
+# define REG_BINARY 3
+# define REG_DWORD 4
+#endif
+
+// fopen
+#ifndef GENERIC_READ
+# define GENERIC_READ 0x80000000
+# define GENERIC_WRITE 0x40000000
+#endif
+
+#ifndef CREATE_NEW
+# define CREATE_NEW 1
+# define CREATE_ALWAYS 2
+# define OPEN_EXISTING 3
+# define OPEN_ALWAYS 4
+#endif
+
+// fseek
+
+#ifndef FILE_BEGIN
+# define FILE_BEGIN 0
+# define FILE_CURRENT 1
+# define FILE_END 2
+#endif
+
+// PE
+
+#ifndef _WIN32
+# define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
+# ifndef __BIG_ENDIAN__
+# define IMAGE_DOS_SIGNATURE 0x5A4D
+# define IMAGE_NT_SIGNATURE 0x00004550
+# else
+# define IMAGE_DOS_SIGNATURE 0x4D5A
+# define IMAGE_NT_SIGNATURE 0x50450000
+# endif
+# define IMAGE_FILE_DLL 8192
+# define IMAGE_DIRECTORY_ENTRY_EXPORT 0
+# define IMAGE_SIZEOF_SHORT_NAME 8
+#endif
+
+// structures
+
+#ifndef _WIN32
+typedef struct _LOGFONT {
+ LONG lfHeight;
+ LONG lfWidth;
+ LONG lfEscapement;
+ LONG lfOrientation;
+ LONG lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ CHAR lfFaceName[LF_FACESIZE];
+} LOGFONT;
+# pragma pack(2)
+typedef struct _IMAGE_DOS_HEADER {
+ WORD e_magic;
+ WORD e_cblp;
+ WORD e_cp;
+ WORD e_crlc;
+ WORD e_cparhdr;
+ WORD e_minalloc;
+ WORD e_maxalloc;
+ WORD e_ss;
+ WORD e_sp;
+ WORD e_csum;
+ WORD e_ip;
+ WORD e_cs;
+ WORD e_lfarlc;
+ WORD e_ovno;
+ WORD e_res[4];
+ WORD e_oemid;
+ WORD e_oeminfo;
+ WORD e_res2[10];
+ LONG e_lfanew;
+} IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER;
+# pragma pack()
+# pragma pack(4)
+typedef struct _IMAGE_FILE_HEADER {
+ WORD Machine;
+ WORD NumberOfSections;
+ DWORD TimeDateStamp;
+ DWORD PointerToSymbolTable;
+ DWORD NumberOfSymbols;
+ WORD SizeOfOptionalHeader;
+ WORD Characteristics;
+} IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
+typedef struct _IMAGE_DATA_DIRECTORY {
+ DWORD VirtualAddress;
+ DWORD Size;
+} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY;
+typedef struct _IMAGE_OPTIONAL_HEADER {
+ WORD Magic;
+ BYTE MajorLinkerVersion;
+ BYTE MinorLinkerVersion;
+ DWORD SizeOfCode;
+ DWORD SizeOfInitializedData;
+ DWORD SizeOfUninitializedData;
+ DWORD AddressOfEntryPoint;
+ DWORD BaseOfCode;
+ DWORD BaseOfData;
+ DWORD ImageBase;
+ DWORD SectionAlignment;
+ DWORD FileAlignment;
+ WORD MajorOperatingSystemVersion;
+ WORD MinorOperatingSystemVersion;
+ WORD MajorImageVersion;
+ WORD MinorImageVersion;
+ WORD MajorSubsystemVersion;
+ WORD MinorSubsystemVersion;
+ DWORD Reserved1;
+ DWORD SizeOfImage;
+ DWORD SizeOfHeaders;
+ DWORD CheckSum;
+ WORD Subsystem;
+ WORD DllCharacteristics;
+ DWORD SizeOfStackReserve;
+ DWORD SizeOfStackCommit;
+ DWORD SizeOfHeapReserve;
+ DWORD SizeOfHeapCommit;
+ DWORD LoaderFlags;
+ DWORD NumberOfRvaAndSizes;
+ IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+} IMAGE_OPTIONAL_HEADER32,*PIMAGE_OPTIONAL_HEADER32;
+typedef struct _IMAGE_OPTIONAL_HEADER64 {
+ WORD Magic;
+ BYTE MajorLinkerVersion;
+ BYTE MinorLinkerVersion;
+ DWORD SizeOfCode;
+ DWORD SizeOfInitializedData;
+ DWORD SizeOfUninitializedData;
+ DWORD AddressOfEntryPoint;
+ DWORD BaseOfCode;
+ ULONGLONG ImageBase;
+ DWORD SectionAlignment;
+ DWORD FileAlignment;
+ WORD MajorOperatingSystemVersion;
+ WORD MinorOperatingSystemVersion;
+ WORD MajorImageVersion;
+ WORD MinorImageVersion;
+ WORD MajorSubsystemVersion;
+ WORD MinorSubsystemVersion;
+ DWORD Win32VersionValue;
+ DWORD SizeOfImage;
+ DWORD SizeOfHeaders;
+ DWORD CheckSum;
+ WORD Subsystem;
+ WORD DllCharacteristics;
+ ULONGLONG SizeOfStackReserve;
+ ULONGLONG SizeOfStackCommit;
+ ULONGLONG SizeOfHeapReserve;
+ ULONGLONG SizeOfHeapCommit;
+ DWORD LoaderFlags;
+ DWORD NumberOfRvaAndSizes;
+ IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
+} IMAGE_OPTIONAL_HEADER64,*PIMAGE_OPTIONAL_HEADER64;
+#ifdef _WIN64
+typedef IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER;
+typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;
+#else
+typedef IMAGE_OPTIONAL_HEADER32 IMAGE_OPTIONAL_HEADER;
+typedef PIMAGE_OPTIONAL_HEADER32 PIMAGE_OPTIONAL_HEADER;
+#endif
+#ifndef __BIG_ENDIAN__
+# define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
+# define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
+#else
+# define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x0b01
+# define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x0b02
+#endif
+typedef struct _IMAGE_NT_HEADERS {
+ DWORD Signature;
+ IMAGE_FILE_HEADER FileHeader;
+ IMAGE_OPTIONAL_HEADER OptionalHeader;
+} IMAGE_NT_HEADERS,*PIMAGE_NT_HEADERS;
+typedef struct _IMAGE_SECTION_HEADER {
+ BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
+ union {
+ DWORD PhysicalAddress;
+ DWORD VirtualSize;
+ } Misc;
+ DWORD VirtualAddress;
+ DWORD SizeOfRawData;
+ DWORD PointerToRawData;
+ DWORD PointerToRelocations;
+ DWORD PointerToLinenumbers;
+ WORD NumberOfRelocations;
+ WORD NumberOfLinenumbers;
+ DWORD Characteristics;
+} IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER;
+typedef struct _IMAGE_EXPORT_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ DWORD Name;
+ DWORD Base;
+ DWORD NumberOfFunctions;
+ DWORD NumberOfNames;
+ DWORD AddressOfFunctions;
+ DWORD AddressOfNames;
+ DWORD AddressOfNameOrdinals;
+} IMAGE_EXPORT_DIRECTORY,*PIMAGE_EXPORT_DIRECTORY;
+typedef struct tagVS_FIXEDFILEINFO {
+ DWORD dwSignature;
+ DWORD dwStrucVersion;
+ DWORD dwFileVersionMS;
+ DWORD dwFileVersionLS;
+ DWORD dwProductVersionMS;
+ DWORD dwProductVersionLS;
+ DWORD dwFileFlagsMask;
+ DWORD dwFileFlags;
+ DWORD dwFileOS;
+ DWORD dwFileType;
+ DWORD dwFileSubtype;
+ DWORD dwFileDateMS;
+ DWORD dwFileDateLS;
+} VS_FIXEDFILEINFO;
+# pragma pack()
+#endif
+
+#ifndef SHGFP_TYPE_CURRENT
+ #define SHGFP_TYPE_CURRENT 0
+#endif
+
+#endif
diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp
index 9e4d5c5..9c2999e 100755
--- a/Source/Plugins.cpp
+++ b/Source/Plugins.cpp
@@ -1,207 +1,207 @@
-/*
- * Plugins.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "exehead/config.h"
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
-
-#include <map>
-#include <string>
-#include <fstream>
-
-#include "Plugins.h"
-#include "Platform.h"
-#include "util.h"
-#include "ResourceEditor.h"
-
-#include "dirreader.h"
-
-#ifdef _WIN32
-# include <WinNT.h>
-#else
-# include <sys/stat.h>
-#endif
-
-#include "boost/scoped_ptr.hpp"
-
-using namespace std;
-
-extern FILE *g_output;
-
-void Plugins::FindCommands(const string &path, bool displayInfo)
-{
- boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
- dr->read(path);
-
- for (dir_reader::iterator files_itr = dr->files().begin();
- files_itr != dr->files().end();
- files_itr++)
- {
- if (!dir_reader::matches(*files_itr, "*.dll"))
- continue;
-
- const string plugin = path + PLATFORM_PATH_SEPARATOR_C + *files_itr;
- GetExports(plugin, displayInfo);
- }
-}
-
-struct NSISException : public std::runtime_error
-{
- NSISException(const string& msg) : std::runtime_error(msg) {}
-};
-
-namespace {
-size_t file_size(ifstream& file) {
- const ifstream::pos_type pos = file.tellg();
-
- file.seekg(0, ios::end);
-
- ifstream::pos_type result = file.tellg();
- assert(result >= (ifstream::pos_type)0);
-
- file.seekg(pos);
-
- return (size_t)result;
-}
-
-vector<unsigned char> read_file(const string& filename) {
- ifstream file(filename.c_str(), ios::binary);
-
- if (!file) {
- throw NSISException("Can't open file '" + filename + "'");
- }
-
- // get the file size
- size_t filesize = file_size(file);
-
- vector<unsigned char> result;
- result.resize(filesize);
-
- file.read(reinterpret_cast<char*>(&result[0]), filesize);
-
- if (size_t(file.tellg()) != filesize) { // ifstream::eof doesn't return true here
- throw NSISException("Couldn't read entire file '" + filename + "'");
- }
-
- return result;
-}
-}
-
-void Plugins::GetExports(const string &pathToDll, bool displayInfo)
-{
- vector<unsigned char> dlldata;
- PIMAGE_NT_HEADERS NTHeaders;
- try {
- dlldata = read_file(pathToDll);
- NTHeaders = CResourceEditor::GetNTHeaders(&dlldata[0]);
- } catch (std::runtime_error&) {
- return;
- }
-
- const string dllName = remove_file_extension(get_file_name(pathToDll));
-
- FIX_ENDIAN_INT16_INPLACE(NTHeaders->FileHeader.Characteristics);
- if (NTHeaders->FileHeader.Characteristics & IMAGE_FILE_DLL)
- {
- FIX_ENDIAN_INT32_INPLACE(NTHeaders->OptionalHeader.NumberOfRvaAndSizes);
- if (NTHeaders->OptionalHeader.NumberOfRvaAndSizes <= IMAGE_DIRECTORY_ENTRY_EXPORT) return;
-
- DWORD ExportDirVA = NTHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
- DWORD ExportDirSize = NTHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size;
- PIMAGE_SECTION_HEADER sections = IMAGE_FIRST_SECTION(NTHeaders);
-
- FIX_ENDIAN_INT32_INPLACE(ExportDirVA);
- FIX_ENDIAN_INT32_INPLACE(ExportDirSize);
-
- WORD num_sections = FIX_ENDIAN_INT16(NTHeaders->FileHeader.NumberOfSections);
-
- for (DWORD i = 0; i < num_sections; i++)
- {
- DWORD va = FIX_ENDIAN_INT32(sections[i].VirtualAddress);
- if (va <= ExportDirVA
- && va + FIX_ENDIAN_INT32(sections[i].Misc.VirtualSize) >= ExportDirVA + ExportDirSize)
- {
- DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);
- PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);
- DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);
- unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);
- for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
- {
- const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
- const string signature = dllName + "::" + name;
- const string lcsig = lowercase(signature);
- m_command_to_path[lcsig] = pathToDll;
- m_command_lowercase_to_command[lcsig] = signature;
- if (displayInfo)
- fprintf(g_output, " - %s\n", signature.c_str());
- }
- break;
- }
- }
- }
-}
-
-bool Plugins::IsPluginCommand(const string& token) const {
- return m_command_to_path.find(lowercase(token)) != m_command_to_path.end();
-}
-
-namespace {
-template <class Key, class Value>
-Value get_value(const map<Key, Value>& the_map,
- const Key& key)
-{
- assert(the_map.find(key) != the_map.end());
- return the_map.find(key)->second;
-}
-
-template <class Key, class Value>
-Value get_value(const map<Key, Value>& the_map,
- const Key& key,
- const Value& defaultValue)
-{
- if (the_map.find(key) == the_map.end())
- return defaultValue;
- return the_map.find(key)->second;
-}
-}
-
-string Plugins::NormalizedCommand(const string& command) const {
- return get_value(m_command_lowercase_to_command, lowercase(command));
-}
-
-int Plugins::GetPluginHandle(bool uninst, const string& command) const {
- if (uninst) {
- return get_value(m_command_to_uninstall_data_handle, command, -1);
- }
- else {
- return get_value(m_command_to_data_handle, command, -1);
- }
-}
-
-string Plugins::GetPluginPath(const string& command) const {
- return get_value(m_command_to_path, lowercase(command));
-}
-
-void Plugins::SetDllDataHandle(bool uninst, const string& command, int dataHandle)
-{
- if (uninst) {
- m_command_to_uninstall_data_handle[command] = dataHandle;
- }
- else {
- m_command_to_data_handle[command] = dataHandle;
- }
-}
-
-#endif
+/*
+ * Plugins.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "exehead/config.h"
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+
+#include <map>
+#include <string>
+#include <fstream>
+
+#include "Plugins.h"
+#include "Platform.h"
+#include "util.h"
+#include "ResourceEditor.h"
+
+#include "dirreader.h"
+
+#ifdef _WIN32
+# include <WinNT.h>
+#else
+# include <sys/stat.h>
+#endif
+
+#include "boost/scoped_ptr.hpp"
+
+using namespace std;
+
+extern FILE *g_output;
+
+void Plugins::FindCommands(const string &path, bool displayInfo)
+{
+ boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
+ dr->read(path);
+
+ for (dir_reader::iterator files_itr = dr->files().begin();
+ files_itr != dr->files().end();
+ files_itr++)
+ {
+ if (!dir_reader::matches(*files_itr, "*.dll"))
+ continue;
+
+ const string plugin = path + PLATFORM_PATH_SEPARATOR_C + *files_itr;
+ GetExports(plugin, displayInfo);
+ }
+}
+
+struct NSISException : public std::runtime_error
+{
+ NSISException(const string& msg) : std::runtime_error(msg) {}
+};
+
+namespace {
+size_t file_size(ifstream& file) {
+ const ifstream::pos_type pos = file.tellg();
+
+ file.seekg(0, ios::end);
+
+ ifstream::pos_type result = file.tellg();
+ assert(result >= (ifstream::pos_type)0);
+
+ file.seekg(pos);
+
+ return (size_t)result;
+}
+
+vector<unsigned char> read_file(const string& filename) {
+ ifstream file(filename.c_str(), ios::binary);
+
+ if (!file) {
+ throw NSISException("Can't open file '" + filename + "'");
+ }
+
+ // get the file size
+ size_t filesize = file_size(file);
+
+ vector<unsigned char> result;
+ result.resize(filesize);
+
+ file.read(reinterpret_cast<char*>(&result[0]), filesize);
+
+ if (size_t(file.tellg()) != filesize) { // ifstream::eof doesn't return true here
+ throw NSISException("Couldn't read entire file '" + filename + "'");
+ }
+
+ return result;
+}
+}
+
+void Plugins::GetExports(const string &pathToDll, bool displayInfo)
+{
+ vector<unsigned char> dlldata;
+ PIMAGE_NT_HEADERS NTHeaders;
+ try {
+ dlldata = read_file(pathToDll);
+ NTHeaders = CResourceEditor::GetNTHeaders(&dlldata[0]);
+ } catch (std::runtime_error&) {
+ return;
+ }
+
+ const string dllName = remove_file_extension(get_file_name(pathToDll));
+
+ FIX_ENDIAN_INT16_INPLACE(NTHeaders->FileHeader.Characteristics);
+ if (NTHeaders->FileHeader.Characteristics & IMAGE_FILE_DLL)
+ {
+ FIX_ENDIAN_INT32_INPLACE(NTHeaders->OptionalHeader.NumberOfRvaAndSizes);
+ if (NTHeaders->OptionalHeader.NumberOfRvaAndSizes <= IMAGE_DIRECTORY_ENTRY_EXPORT) return;
+
+ DWORD ExportDirVA = NTHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress;
+ DWORD ExportDirSize = NTHeaders->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].Size;
+ PIMAGE_SECTION_HEADER sections = IMAGE_FIRST_SECTION(NTHeaders);
+
+ FIX_ENDIAN_INT32_INPLACE(ExportDirVA);
+ FIX_ENDIAN_INT32_INPLACE(ExportDirSize);
+
+ WORD num_sections = FIX_ENDIAN_INT16(NTHeaders->FileHeader.NumberOfSections);
+
+ for (DWORD i = 0; i < num_sections; i++)
+ {
+ DWORD va = FIX_ENDIAN_INT32(sections[i].VirtualAddress);
+ if (va <= ExportDirVA
+ && va + FIX_ENDIAN_INT32(sections[i].Misc.VirtualSize) >= ExportDirVA + ExportDirSize)
+ {
+ DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData);
+ PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va);
+ DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames);
+ unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA);
+ for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++)
+ {
+ const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA);
+ const string signature = dllName + "::" + name;
+ const string lcsig = lowercase(signature);
+ m_command_to_path[lcsig] = pathToDll;
+ m_command_lowercase_to_command[lcsig] = signature;
+ if (displayInfo)
+ fprintf(g_output, " - %s\n", signature.c_str());
+ }
+ break;
+ }
+ }
+ }
+}
+
+bool Plugins::IsPluginCommand(const string& token) const {
+ return m_command_to_path.find(lowercase(token)) != m_command_to_path.end();
+}
+
+namespace {
+template <class Key, class Value>
+Value get_value(const map<Key, Value>& the_map,
+ const Key& key)
+{
+ assert(the_map.find(key) != the_map.end());
+ return the_map.find(key)->second;
+}
+
+template <class Key, class Value>
+Value get_value(const map<Key, Value>& the_map,
+ const Key& key,
+ const Value& defaultValue)
+{
+ if (the_map.find(key) == the_map.end())
+ return defaultValue;
+ return the_map.find(key)->second;
+}
+}
+
+string Plugins::NormalizedCommand(const string& command) const {
+ return get_value(m_command_lowercase_to_command, lowercase(command));
+}
+
+int Plugins::GetPluginHandle(bool uninst, const string& command) const {
+ if (uninst) {
+ return get_value(m_command_to_uninstall_data_handle, command, -1);
+ }
+ else {
+ return get_value(m_command_to_data_handle, command, -1);
+ }
+}
+
+string Plugins::GetPluginPath(const string& command) const {
+ return get_value(m_command_to_path, lowercase(command));
+}
+
+void Plugins::SetDllDataHandle(bool uninst, const string& command, int dataHandle)
+{
+ if (uninst) {
+ m_command_to_uninstall_data_handle[command] = dataHandle;
+ }
+ else {
+ m_command_to_data_handle[command] = dataHandle;
+ }
+}
+
+#endif
diff --git a/Source/Plugins.h b/Source/Plugins.h
index 932cf1d..ec9e809 100755
--- a/Source/Plugins.h
+++ b/Source/Plugins.h
@@ -1,43 +1,43 @@
-/*
- * Plugins.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __X18_PLUGINS_H
-#define __X18_PLUGINS_H
-
-#include <map>
-#include <string>
-
-class Plugins
-{
- public:
- void FindCommands(const std::string& path, bool displayInfo);
- bool IsPluginCommand(const std::string& command) const;
- std::string NormalizedCommand(const std::string& command) const;
- int GetPluginHandle(bool uninst, const std::string& command) const;
- std::string GetPluginPath(const std::string& command) const;
- void SetDllDataHandle(bool uninst, const std::string& command, int dataHandle);
-
- private: // methods
- void GetExports(const std::string &pathToDll, bool displayInfo);
-
- private: // data members
- std::map<std::string, std::string> m_command_lowercase_to_command;
- std::map<std::string, std::string> m_command_to_path;
- std::map<std::string, int> m_command_to_data_handle;
- std::map<std::string, int> m_command_to_uninstall_data_handle;
-};
-
-#endif
+/*
+ * Plugins.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __X18_PLUGINS_H
+#define __X18_PLUGINS_H
+
+#include <map>
+#include <string>
+
+class Plugins
+{
+ public:
+ void FindCommands(const std::string& path, bool displayInfo);
+ bool IsPluginCommand(const std::string& command) const;
+ std::string NormalizedCommand(const std::string& command) const;
+ int GetPluginHandle(bool uninst, const std::string& command) const;
+ std::string GetPluginPath(const std::string& command) const;
+ void SetDllDataHandle(bool uninst, const std::string& command, int dataHandle);
+
+ private: // methods
+ void GetExports(const std::string &pathToDll, bool displayInfo);
+
+ private: // data members
+ std::map<std::string, std::string> m_command_lowercase_to_command;
+ std::map<std::string, std::string> m_command_to_path;
+ std::map<std::string, int> m_command_to_data_handle;
+ std::map<std::string, int> m_command_to_uninstall_data_handle;
+};
+
+#endif
diff --git a/Source/ResourceEditor.cpp b/Source/ResourceEditor.cpp
index 0c42202..13e286f 100755
--- a/Source/ResourceEditor.cpp
+++ b/Source/ResourceEditor.cpp
@@ -1,1019 +1,1073 @@
-/*
- * ResourceEditor.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 2002-2007 Amir Szekely <kichik@users.sourceforge.net>
- *
- * 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.
- */
-
-#include "ResourceEditor.h"
-#include "util.h"
-#include "winchar.h"
-#include <queue>
-using namespace std;
-
-//////////////////////////////////////////////////////////////////////
-// Utilities
-//////////////////////////////////////////////////////////////////////
-
-#define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn
-#define RALIGN(dwToAlign, dwAlignOn) ((dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn)
-
-#ifndef _WIN32
-static inline ULONG ConvertEndianness(ULONG u) {
- return FIX_ENDIAN_INT32(u);
-}
-#endif
-
-static inline DWORD ConvertEndianness(DWORD d) {
- return FIX_ENDIAN_INT32(d);
-}
-
-static inline LONG ConvertEndianness(LONG l) {
- return FIX_ENDIAN_INT32(l);
-}
-
-static inline WORD ConvertEndianness(WORD w) {
- return FIX_ENDIAN_INT16(w);
-}
-
-PIMAGE_NT_HEADERS CResourceEditor::GetNTHeaders(BYTE* pbPE) {
- // Get dos header
- PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER) pbPE;
- if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE)
- throw runtime_error("PE file contains invalid DOS header");
-
- // Get NT headers
- PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(pbPE + ConvertEndianness(dosHeader->e_lfanew));
- if (ntHeaders->Signature != IMAGE_NT_SIGNATURE)
- throw runtime_error("PE file missing NT signature");
-
- // Make sure this is a supported PE format
- if (ntHeaders->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC &&
- ntHeaders->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR64_MAGIC)
- throw runtime_error("Unsupported PE format");
-
- return ntHeaders;
-}
-
-PRESOURCE_DIRECTORY CResourceEditor::GetResourceDirectory(
- BYTE* pbPE,
- DWORD dwSize,
- PIMAGE_NT_HEADERS ntHeaders,
- DWORD *pdwResSecVA /*=NULL*/,
- DWORD *pdwSectionIndex /*=NULL*/
-) {
- PIMAGE_DATA_DIRECTORY dataDirectory = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory);
- DWORD dwNumberOfRvaAndSizes = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, NumberOfRvaAndSizes);
-
- if (ConvertEndianness(dwNumberOfRvaAndSizes) <= IMAGE_DIRECTORY_ENTRY_RESOURCE)
- throw runtime_error("No resource section found");
- // Get resource section virtual address
- DWORD dwResSecVA = ConvertEndianness(dataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress);
- // Pointer to the sections headers array
- PIMAGE_SECTION_HEADER sectionHeadersArray = IMAGE_FIRST_SECTION(ntHeaders);
-
- DWORD dwSectionIndex = (DWORD) -1;
-
- // Find resource section index in the array
- for (int i = 0; i < ConvertEndianness(ntHeaders->FileHeader.NumberOfSections); i++) {
- if (dwResSecVA == ConvertEndianness(sectionHeadersArray[i].VirtualAddress)) {
- // Remember resource section index
- dwSectionIndex = i;
- // Check for invalid resource section pointer
- if (!sectionHeadersArray[i].PointerToRawData)
- throw runtime_error("Invalid resource section pointer");
-
- break;
- }
-
- // Invalid section pointer (goes beyond the PE image)
- if (ConvertEndianness(sectionHeadersArray[i].PointerToRawData) > dwSize)
- throw runtime_error("Invalid section pointer");
- }
-
- // No resource section...
- if (dwSectionIndex == (DWORD) -1)
- throw runtime_error("PE file doesn't contain any resource section");
-
- // Return extra parameters
- if (pdwSectionIndex)
- *pdwSectionIndex = dwSectionIndex;
- if (pdwResSecVA)
- *pdwResSecVA = dwResSecVA;
-
- // Pointer to section data, the first resource directory
- DWORD dwResSecPtr = ConvertEndianness(sectionHeadersArray[dwSectionIndex].PointerToRawData);
- return PRESOURCE_DIRECTORY(pbPE + dwResSecPtr);
-}
-
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-// CResourceEditor
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CResourceEditor::CResourceEditor(BYTE* pbPE, int iSize) {
- // Copy the data pointer
- m_pbPE = pbPE;
- m_iSize = iSize;
-
- // Get NT headers
- m_ntHeaders = GetNTHeaders(m_pbPE);
-
- // No check sum support yet...
- DWORD* pdwCheckSum = GetMemberFromOptionalHeader(m_ntHeaders->OptionalHeader, CheckSum);
- if (*pdwCheckSum)
- {
- // clear checksum (should be [re]calculated after all changes done)
- pdwCheckSum = 0;
- //throw runtime_error("CResourceEditor doesn't yet support check sum");
- }
-
- // Get resource section virtual address, resource section index and pointer to resource directory
- PRESOURCE_DIRECTORY rdRoot = GetResourceDirectory(m_pbPE, iSize, m_ntHeaders, &m_dwResourceSectionVA, &m_dwResourceSectionIndex);
-
- // Scan the resource directory
- m_cResDir = ScanDirectory(rdRoot, rdRoot);
-}
-
-CResourceEditor::~CResourceEditor() {
- if (m_cResDir) {
- m_cResDir->Destroy();
- delete m_cResDir;
- }
-}
-
-//////////////////////////////////////////////////////////////////////
-// Methods
-//////////////////////////////////////////////////////////////////////
-
-// Adds/Replaces/Removes a resource.
-// If lpData is 0 UpdateResource removes the resource.
-bool CResourceEditor::UpdateResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- CResourceDirectory* nameDir = 0;
- CResourceDirectory* langDir = 0;
- CResourceDataEntry* data = 0;
- IMAGE_RESOURCE_DIRECTORY rd = {0, /*time(0),*/};
- int iTypeIdx = -1, iNameIdx = -1, iLangIdx = -1;
-
- iTypeIdx = m_cResDir->Find(szType);
- if (iTypeIdx > -1) {
- nameDir = m_cResDir->GetEntry(iTypeIdx)->GetSubDirectory();
- iNameIdx = nameDir->Find(szName);
- if (iNameIdx > -1) {
- langDir = nameDir->GetEntry(iNameIdx)->GetSubDirectory();
- iLangIdx = langDir->Find(wLanguage);
- if (iLangIdx > -1) {
- data = langDir->GetEntry(iLangIdx)->GetDataEntry();
- }
- }
- }
-
- if (lpData) {
- // Replace/Add the resource
- if (data) {
- data->SetData(lpData, dwSize);
- return true;
- }
-
- if (!nameDir) {
- // Type doesn't yet exist
- nameDir = new CResourceDirectory(&rd);
- m_cResDir->AddEntry(new CResourceDirectoryEntry(szType, nameDir));
- }
- if (!langDir) {
- // Name doesn't yet exist
- langDir = new CResourceDirectory(&rd);
- nameDir->AddEntry(new CResourceDirectoryEntry(szName, langDir));
- }
- if (!data) {
- // Language doesn't yet exist, hence data nither
- data = new CResourceDataEntry(lpData, dwSize);
- langDir->AddEntry(new CResourceDirectoryEntry(MAKEINTRESOURCEW(wLanguage), data));
- }
- }
- else if (data) {
- // Delete the resource
- delete data;
- langDir->RemoveEntry(iLangIdx);
- // Delete directories holding the resource if empty
- if (!langDir->CountEntries()) {
- delete langDir;
- nameDir->RemoveEntry(iNameIdx);
- if (!nameDir->CountEntries()) {
- delete nameDir;
- m_cResDir->RemoveEntry(iTypeIdx);
- }
- }
- }
- else return false;
- return true;
-}
-
-static WCHAR* ResStringToUnicode(const char *szString) {
- if (IS_INTRESOURCE(szString))
- return MAKEINTRESOURCEW((ULONG_PTR)szString);
- else
- return winchar_fromansi(szString);
-}
-
-static void FreeUnicodeResString(WCHAR* szwString) {
- if (!IS_INTRESOURCE(szwString))
- delete [] szwString;
-}
-
-bool CResourceEditor::UpdateResourceW(WORD szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- return UpdateResourceW(MAKEINTRESOURCEW(szType), szName, wLanguage, lpData, dwSize);
-}
-
-bool CResourceEditor::UpdateResourceW(WCHAR* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- return UpdateResourceW(szType, MAKEINTRESOURCEW(szName), wLanguage, lpData, dwSize);
-}
-
-bool CResourceEditor::UpdateResourceA(char* szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- WCHAR* szwType = ResStringToUnicode(szType);
- WCHAR* szwName = ResStringToUnicode(szName);
-
- bool result = UpdateResourceW(szwType, szwName, wLanguage, lpData, dwSize);
-
- FreeUnicodeResString(szwType);
- FreeUnicodeResString(szwName);
-
- return result;
-}
-
-bool CResourceEditor::UpdateResourceA(WORD szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- return UpdateResourceA(MAKEINTRESOURCE(szType), szName, wLanguage, lpData, dwSize);
-}
-
-bool CResourceEditor::UpdateResourceA(char* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- return UpdateResourceA(szType, MAKEINTRESOURCE(szName), wLanguage, lpData, dwSize);
-}
-
-bool CResourceEditor::UpdateResource(WORD szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
- return UpdateResourceW(MAKEINTRESOURCEW(szType), MAKEINTRESOURCEW(szName), wLanguage, lpData, dwSize);
-}
-
-// Returns a copy of the requested resource
-// Returns 0 if the requested resource can't be found
-BYTE* CResourceEditor::GetResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage) {
- CResourceDirectory* nameDir = 0;
- CResourceDirectory* langDir = 0;
- CResourceDataEntry* data = 0;
-
- int i = m_cResDir->Find(szType);
- if (i > -1) {
- nameDir = m_cResDir->GetEntry(i)->GetSubDirectory();
- i = nameDir->Find(szName);
- if (i > -1) {
- langDir = nameDir->GetEntry(i)->GetSubDirectory();
- i = 0;
- if (wLanguage)
- i = langDir->Find(wLanguage);
- if (i > -1) {
- data = langDir->GetEntry(i)->GetDataEntry();
- }
- }
- }
-
- if (data) {
- BYTE* toReturn = new BYTE[data->GetSize()];
- CopyMemory(toReturn, data->GetData(), data->GetSize());
- return toReturn;
- }
- else
- return NULL;
-}
-
-BYTE* CResourceEditor::GetResourceA(char* szType, char* szName, LANGID wLanguage) {
- WCHAR* szwType = ResStringToUnicode(szType);
- WCHAR* szwName = ResStringToUnicode(szName);
-
- BYTE* result = GetResourceW(szwType, szwName, wLanguage);
-
- FreeUnicodeResString(szwType);
- FreeUnicodeResString(szwName);
-
- return result;
-}
-
-// Returns the size of the requested resource
-// Returns -1 if the requested resource can't be found
-int CResourceEditor::GetResourceSizeW(WCHAR* szType, WCHAR* szName, LANGID wLanguage) {
- CResourceDirectory* nameDir = 0;
- CResourceDirectory* langDir = 0;
- CResourceDataEntry* data = 0;
-
- int i = m_cResDir->Find(szType);
- if (i > -1) {
- nameDir = m_cResDir->GetEntry(i)->GetSubDirectory();
- i = nameDir->Find(szName);
- if (i > -1) {
- langDir = nameDir->GetEntry(i)->GetSubDirectory();
- i = 0;
- if (wLanguage)
- i = langDir->Find(wLanguage);
- if (i > -1) {
- data = langDir->GetEntry(i)->GetDataEntry();
- }
- }
- }
-
- if (data)
- return (int) data->GetSize();
- else
- return -1;
-}
-
-int CResourceEditor::GetResourceSizeA(char* szType, char* szName, LANGID wLanguage) {
- WCHAR* szwType = ResStringToUnicode(szType);
- WCHAR* szwName = ResStringToUnicode(szName);
-
- int result = GetResourceSizeW(szwType, szwName, wLanguage);
-
- FreeUnicodeResString(szwType);
- FreeUnicodeResString(szwName);
-
- return result;
-}
-
-void CResourceEditor::FreeResource(BYTE* pbResource)
-{
- if (pbResource)
- delete [] pbResource;
-}
-
-// Saves the edited PE into a buffer and returns it.
-DWORD CResourceEditor::Save(BYTE* pbBuf, DWORD &dwSize) {
- unsigned int i;
- DWORD dwReqSize;
-
- DWORD dwFileAlign = ConvertEndianness(m_ntHeaders->OptionalHeader.FileAlignment);
- DWORD dwSecAlign = ConvertEndianness(m_ntHeaders->OptionalHeader.SectionAlignment);
-
- DWORD dwRsrcSize = m_cResDir->GetSize(); // Size of new resource section
- DWORD dwRsrcSizeAligned = RALIGN(dwRsrcSize, dwFileAlign); // Align it to FileAlignment
-
- // Calculate the total new PE size
- DWORD dwOldRsrcSize = ConvertEndianness(IMAGE_FIRST_SECTION(m_ntHeaders)[m_dwResourceSectionIndex].SizeOfRawData);
- dwReqSize = m_iSize - dwOldRsrcSize + dwRsrcSizeAligned;
-
- if (!pbBuf || dwSize < dwReqSize)
- return dwReqSize;
-
- // Use buffer
- BYTE* pbNewPE = pbBuf;
- dwSize = dwReqSize;
- // Fill buffer with zeros
- ZeroMemory(pbNewPE, dwSize);
-
- BYTE* seeker = pbNewPE;
- BYTE* oldSeeker = m_pbPE;
-
- PIMAGE_SECTION_HEADER old_sectionHeadersArray = IMAGE_FIRST_SECTION(m_ntHeaders);
-
- DWORD dwHeaderSize = ConvertEndianness(old_sectionHeadersArray[m_dwResourceSectionIndex].PointerToRawData);
- WORD wNumberOfSections = ConvertEndianness(m_ntHeaders->FileHeader.NumberOfSections);
-
- // Copy everything until the resource section (including headers and everything that might come after them)
- // We don't use SizeOfHeaders because sometimes (using VC6) it can extend beyond the first section
- // or (Borland) there could be some more information between the headers and the first section.
- CopyMemory(seeker, oldSeeker, dwHeaderSize);
-
- // Skip the headers and whatever comes after them
- seeker += dwHeaderSize;
- oldSeeker += dwHeaderSize;
-
- // Get new nt headers pointer
- PIMAGE_NT_HEADERS ntHeaders = GetNTHeaders(pbNewPE);
- // Get a pointer to the new section headers
- PIMAGE_SECTION_HEADER sectionHeadersArray = IMAGE_FIRST_SECTION(ntHeaders);
-
- // Skip the resource section in the old PE seeker.
- oldSeeker += dwOldRsrcSize;
-
- // Save the old virtual size of the resource section
- DWORD dwNewVirtualSize = RALIGN(dwRsrcSize, dwSecAlign);
- DWORD dwOldVirtualSize = ConvertEndianness(sectionHeadersArray[m_dwResourceSectionIndex].Misc.VirtualSize);
- ALIGN(dwOldVirtualSize, dwSecAlign);
- DWORD dwVAAdjustment = dwNewVirtualSize - dwOldVirtualSize;
-
- // Set the new size of the resource section (size aligned to FileAlignment)
- sectionHeadersArray[m_dwResourceSectionIndex].SizeOfRawData = ConvertEndianness(dwRsrcSizeAligned);
- // Set the virtual size as well (in memory)
- sectionHeadersArray[m_dwResourceSectionIndex].Misc.VirtualSize = ConvertEndianness(dwRsrcSize);
- (*GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory))[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = ConvertEndianness(dwRsrcSize);
-
- // Set the new virtual size of the image
- DWORD* pdwSizeOfImage = GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, SizeOfImage);
- *pdwSizeOfImage = AlignVA(*GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, SizeOfHeaders));
- for (i = 0; i < wNumberOfSections; i++) {
- DWORD dwSecSize = ConvertEndianness(sectionHeadersArray[i].Misc.VirtualSize);
- *pdwSizeOfImage = AlignVA(AdjustVA(*pdwSizeOfImage, dwSecSize));
- }
-
- // Set the new AddressOfEntryPoint if needed
- DWORD* pdwAddressOfEntryPoint = GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, AddressOfEntryPoint);
- if (ConvertEndianness(*pdwAddressOfEntryPoint) > m_dwResourceSectionVA)
- *pdwAddressOfEntryPoint = AdjustVA(*pdwAddressOfEntryPoint, dwVAAdjustment);
-
- // Set the new BaseOfCode if needed
- DWORD* pdwBaseOfCode = GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, BaseOfCode);
- if (ConvertEndianness(*pdwBaseOfCode) > m_dwResourceSectionVA)
- *pdwBaseOfCode = AdjustVA(*pdwBaseOfCode, dwVAAdjustment);
-
- // Set the new BaseOfData if needed
- if (ntHeaders->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
- DWORD* pdwBaseOfData = &((PIMAGE_OPTIONAL_HEADER32)&ntHeaders->OptionalHeader)->BaseOfData;
- if (*pdwBaseOfData > m_dwResourceSectionVA)
- *pdwBaseOfData = AdjustVA(*pdwBaseOfData, dwVAAdjustment);
- }
-
- // Refresh the headers of the sections that come after the resource section, and the data directory
- DWORD dwNumberOfRvaAndSizes = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, NumberOfRvaAndSizes);
- PIMAGE_DATA_DIRECTORY pDataDirectory = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory);
- for (i = m_dwResourceSectionIndex + 1; i < wNumberOfSections; i++) {
- if (sectionHeadersArray[i].PointerToRawData) {
- AdjustVA(sectionHeadersArray[i].PointerToRawData, dwRsrcSizeAligned - dwOldRsrcSize);
- }
-
- // We must find the right data directory entry before we change the virtual address
- unsigned int uDataDirIdx = 0;
- for (unsigned int j = 0; j < ConvertEndianness(dwNumberOfRvaAndSizes); j++)
- if (pDataDirectory[j].VirtualAddress == sectionHeadersArray[i].VirtualAddress)
- uDataDirIdx = j;
-
- sectionHeadersArray[i].VirtualAddress = AdjustVA(sectionHeadersArray[i].VirtualAddress, dwVAAdjustment);
-
- // Change the virtual address in the data directory too
- if (uDataDirIdx)
- pDataDirectory[uDataDirIdx].VirtualAddress = sectionHeadersArray[i].VirtualAddress;
- }
-
- // Write the resource section
- WriteRsrcSec(seeker);
- // Advance the pointer
- seeker += dwRsrcSizeAligned;
-
- // Copy everything that comes after the resource section (other sections and tacked data)
- DWORD dwLeft = m_iSize - (oldSeeker - m_pbPE);
- if (dwLeft)
- CopyMemory(seeker, oldSeeker, dwLeft);
-
- seeker += dwLeft;
- oldSeeker += dwLeft;
-
- /**********************************************************
- * To add checksum to the header use MapFileAndCheckSum
- **********************************************************/
-
- // From now on, we are working on the new PE
- // Freeing the old PE memory is up to the user
- m_pbPE = pbNewPE;
- m_iSize = dwSize;
- m_ntHeaders = ntHeaders;
- // We just wrote the resource section according to m_cResDir, so we don't need to rescan
- // m_dwResourceSectionIndex and m_dwResourceSectionVA have also been left unchanged as
- // we didn't move the resources section
-
- return 0;
-}
-
-// This function scans exe sections and after find a match with given name
-// increments it's virtual size (auto fixes image size based on section alignment, etc)
-bool CResourceEditor::AddExtraVirtualSize2PESection(const char* pszSectionName, int addsize)
-{
- PIMAGE_SECTION_HEADER sectionHeadersArray = IMAGE_FIRST_SECTION(m_ntHeaders);
-
- // Refresh the headers of the sections that come after the resource section, and the data directory
- for (int i = 0; i < ConvertEndianness(m_ntHeaders->FileHeader.NumberOfSections); i++) {
- if (!strcmp((LPCSTR)sectionHeadersArray[i].Name, pszSectionName)) {
- sectionHeadersArray[i].Misc.VirtualSize = AlignVA(AdjustVA(sectionHeadersArray[i].Misc.VirtualSize, addsize));
-
- sectionHeadersArray[i].Characteristics &= ConvertEndianness((DWORD) ~IMAGE_SCN_MEM_DISCARDABLE);
-
- // now fix any section after
- for (int k = i + 1; k < ConvertEndianness(m_ntHeaders->FileHeader.NumberOfSections); k++, i++) {
- DWORD dwLastSecVA = ConvertEndianness(sectionHeadersArray[i].VirtualAddress);
- DWORD dwLastSecSize = ConvertEndianness(sectionHeadersArray[i].Misc.VirtualSize);
- DWORD dwSecVA = AlignVA(ConvertEndianness(dwLastSecVA + dwLastSecSize));
-
- sectionHeadersArray[k].VirtualAddress = dwSecVA;
-
- if (m_dwResourceSectionIndex == (DWORD) k)
- {
- // fix the resources virtual address if it changed
- PIMAGE_DATA_DIRECTORY pDataDirectory = *GetMemberFromOptionalHeader(m_ntHeaders->OptionalHeader, DataDirectory);
- pDataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = dwSecVA;
- m_dwResourceSectionVA = ConvertEndianness(dwSecVA);
- }
- }
-
- return true;
- }
- }
-
- return false;
-}
-
-//////////////////////////////////////////////////////////////////////
-// Private Methods
-//////////////////////////////////////////////////////////////////////
-
-// This function scans a give resource directory and return a CResourceDirectory object
-// rdRoot must point to the root directory of the resource section
-CResourceDirectory* CResourceEditor::ScanDirectory(PRESOURCE_DIRECTORY rdRoot, PRESOURCE_DIRECTORY rdToScan) {
- // Create CResourceDirectory from rdToScan
- CResourceDirectory* rdc = new CResourceDirectory(PIMAGE_RESOURCE_DIRECTORY(rdToScan));
- WCHAR* szName;
- PIMAGE_RESOURCE_DATA_ENTRY rde = NULL;
-
- // Go through all entries of this resource directory
- int entries = ConvertEndianness(rdToScan->Header.NumberOfNamedEntries);
- entries += ConvertEndianness(rdToScan->Header.NumberOfIdEntries);
-
- for (int i = 0; i < entries; i++) {
- MY_IMAGE_RESOURCE_DIRECTORY_ENTRY rd = rdToScan->Entries[i];
- rd.UOffset.OffsetToData = ConvertEndianness(rd.UOffset.OffsetToData);
- rd.UName.Name = ConvertEndianness(rd.UName.Name);
-
- // If this entry points to data entry get a pointer to it
- if (!rd.UOffset.DirectoryOffset.DataIsDirectory)
- rde = PIMAGE_RESOURCE_DATA_ENTRY(rd.UOffset.OffsetToData + (BYTE*)rdRoot);
-
- // If this entry has a name, translate it from Unicode
- if (rd.UName.NameString.NameIsString) {
- PIMAGE_RESOURCE_DIR_STRING_U rds = PIMAGE_RESOURCE_DIR_STRING_U(rd.UName.NameString.NameOffset + (char*)rdRoot);
-
- size_t nameSize = ConvertEndianness(rds->Length);
- szName = new WCHAR[nameSize+1];
- winchar_strncpy(szName, rds->NameString, nameSize);
- szName[nameSize] = 0;
- }
- // Else, set the name to this entry's id
- else
- szName = MAKEINTRESOURCEW(ConvertEndianness(rdToScan->Entries[i].UName.Id));
-
- if (rd.UOffset.DirectoryOffset.DataIsDirectory)
- rdc->AddEntry(
- new CResourceDirectoryEntry(
- szName,
- ScanDirectory(
- rdRoot,
- PRESOURCE_DIRECTORY(rd.UOffset.DirectoryOffset.OffsetToDirectory + (BYTE*)rdRoot)
- )
- )
- );
- else
- rdc->AddEntry(
- new CResourceDirectoryEntry(
- szName,
- new CResourceDataEntry(
- (BYTE*)rdRoot + ConvertEndianness(rde->OffsetToData) - m_dwResourceSectionVA,
- ConvertEndianness(rde->Size),
- ConvertEndianness(rde->CodePage)
- )
- )
- );
-
- // Delete the dynamicly allocated name if it is a name and not an id
- if (!IS_INTRESOURCE(szName))
- delete [] szName;
- }
-
- return rdc;
-}
-
-// This function writes into a given place in memory (pbRsrcSec) the edited resource section
-void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
- BYTE* seeker = pbRsrcSec;
-
- queue<CResourceDirectory*> qDirs; // Used to scan the tree by level
- queue<CResourceDataEntry*> qDataEntries; // Used for writing the data entries
- queue<CResourceDataEntry*> qDataEntries2; // Used for writing raw resources data
- queue<CResourceDirectoryEntry*> qStrings; // Used for writing resources' names
-
- qDirs.push(m_cResDir);
-
- while (!qDirs.empty()) {
- CResourceDirectory* crd = qDirs.front();
-
- IMAGE_RESOURCE_DIRECTORY rdDir = crd->GetInfo();
-
- rdDir.NumberOfNamedEntries = ConvertEndianness(rdDir.NumberOfNamedEntries);
- rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
-
- CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));
- crd->m_dwWrittenAt = DWORD(seeker);
- seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);
-
- for (int i = 0; i < crd->CountEntries(); i++) {
- if (crd->GetEntry(i)->HasName())
- qStrings.push(crd->GetEntry(i));
- if (crd->GetEntry(i)->IsDataDirectory())
- qDirs.push(crd->GetEntry(i)->GetSubDirectory());
- else {
- qDataEntries.push(crd->GetEntry(i)->GetDataEntry());
- qDataEntries2.push(crd->GetEntry(i)->GetDataEntry());
- }
-
- MY_IMAGE_RESOURCE_DIRECTORY_ENTRY rDirE;
- ZeroMemory(&rDirE, sizeof(rDirE));
- rDirE.UOffset.DirectoryOffset.DataIsDirectory = crd->GetEntry(i)->IsDataDirectory();
- rDirE.UName.Id = crd->GetEntry(i)->HasName() ? 0 : crd->GetEntry(i)->GetId();
- rDirE.UName.Id = ConvertEndianness(rDirE.UName.Id);
- rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;
-
- CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));
- crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker);
- seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
- }
- qDirs.pop();
- }
-
- /*
- * Write IMAGE_RESOURCE_DATA_ENTRYs.
- */
- while (!qDataEntries.empty()) {
- CResourceDataEntry* cRDataE = qDataEntries.front();
- IMAGE_RESOURCE_DATA_ENTRY rDataE = {0,};
- rDataE.CodePage = ConvertEndianness(cRDataE->GetCodePage());
- rDataE.Size = ConvertEndianness(cRDataE->GetSize());
-
- CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));
- cRDataE->m_dwWrittenAt = DWORD(seeker);
- seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);
-
- qDataEntries.pop();
- }
-
- /*
- * Write strings
- */
- while (!qStrings.empty()) {
- CResourceDirectoryEntry* cRDirE = qStrings.front();
-
- PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec));
-
- WCHAR* szName = cRDirE->GetName();
- WORD iLen = winchar_strlen(szName) + 1;
-
- *(WORD*)seeker = ConvertEndianness(iLen);
- CopyMemory(seeker + sizeof(WORD), szName, iLen*sizeof(WCHAR));
-
- seeker += RALIGN(iLen * sizeof(WCHAR) + sizeof(WORD), 4);
-
- delete [] szName;
-
- qStrings.pop();
- }
-
- /*
- * Write raw resource data and set offsets in IMAGE_RESOURCE_DATA_ENTRYs.
- */
- while (!qDataEntries2.empty()) {
- CResourceDataEntry* cRDataE = qDataEntries2.front();
- CopyMemory(seeker, cRDataE->GetData(), cRDataE->GetSize());
- PIMAGE_RESOURCE_DATA_ENTRY(cRDataE->m_dwWrittenAt)->OffsetToData = ConvertEndianness(seeker - pbRsrcSec + m_dwResourceSectionVA);
-
- seeker += RALIGN(cRDataE->GetSize(), 8);
-
- qDataEntries2.pop();
- }
-
- /*
- * Set all of the directory entries offsets.
- */
- SetOffsets(m_cResDir, DWORD(pbRsrcSec));
-}
-
-// Sets the offsets in directory entries
-void CResourceEditor::SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt) {
- for (int i = 0; i < resDir->CountEntries(); i++) {
- PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY rde = PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(resDir->GetEntry(i)->m_dwWrittenAt);
- if (resDir->GetEntry(i)->IsDataDirectory()) {
- rde->UOffset.DirectoryOffset.DataIsDirectory = 1;
- rde->UOffset.DirectoryOffset.OffsetToDirectory = resDir->GetEntry(i)->GetSubDirectory()->m_dwWrittenAt - newResDirAt;
- rde->UOffset.OffsetToData = ConvertEndianness(rde->UOffset.OffsetToData);
- SetOffsets(resDir->GetEntry(i)->GetSubDirectory(), newResDirAt);
- }
- else {
- rde->UOffset.OffsetToData = ConvertEndianness(resDir->GetEntry(i)->GetDataEntry()->m_dwWrittenAt - newResDirAt);
- }
- }
-}
-
-// Adjusts a virtual address by a specific amount
-DWORD CResourceEditor::AdjustVA(DWORD dwVirtualAddress, DWORD dwAdjustment) {
- dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
- dwVirtualAddress += dwAdjustment;
- dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
-
- return dwVirtualAddress;
-}
-
-// Aligns a virtual address to the section alignment
-DWORD CResourceEditor::AlignVA(DWORD dwVirtualAddress) {
- DWORD dwSectionAlignment = *GetMemberFromOptionalHeader(m_ntHeaders->OptionalHeader, SectionAlignment);
- DWORD dwAlignment = ConvertEndianness(dwSectionAlignment);
-
- dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
- dwVirtualAddress = RALIGN(dwVirtualAddress, dwAlignment);
- dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
-
- return dwVirtualAddress;
-}
-
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-// CResourceDirectory
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CResourceDirectory::CResourceDirectory(PIMAGE_RESOURCE_DIRECTORY prd) {
- m_rdDir = *prd;
- m_rdDir.NumberOfIdEntries = 0;
- m_rdDir.NumberOfNamedEntries = 0;
-}
-
-CResourceDirectory::~CResourceDirectory() {
-}
-
-//////////////////////////////////////////////////////////////////////
-// Methods
-//////////////////////////////////////////////////////////////////////
-
-IMAGE_RESOURCE_DIRECTORY CResourceDirectory::GetInfo() {
- return m_rdDir;
-}
-
-CResourceDirectoryEntry* CResourceDirectory::GetEntry(unsigned int i) {
- if (m_vEntries.size() < i)
- return 0;
- return m_vEntries[i];
-}
-
-// This function inserts a new directory entry
-// It also keeps the directory entries sorted
-void CResourceDirectory::AddEntry(CResourceDirectoryEntry* entry) {
- int i = 0;
- if (entry->HasName()) {
- WCHAR* szEntName = entry->GetName();
- for (i = 0; i < m_rdDir.NumberOfNamedEntries; i++) {
- WCHAR* szName = m_vEntries[i]->GetName();
- int cmp = winchar_strcmp(szName, szEntName);
- delete [] szName;
- if (cmp == 0) {
- delete [] szEntName;
- return;
- }
- if (cmp > 0)
- break;
- }
- delete [] szEntName;
- m_rdDir.NumberOfNamedEntries++;
- }
- else {
- for (i = m_rdDir.NumberOfNamedEntries; i < m_rdDir.NumberOfNamedEntries+m_rdDir.NumberOfIdEntries; i++) {
- if (m_vEntries[i]->GetId() == entry->GetId())
- return;
- if (m_vEntries[i]->GetId() > entry->GetId())
- break;
- }
- m_rdDir.NumberOfIdEntries++;
- }
- m_vEntries.insert(m_vEntries.begin() + i, entry);
-}
-
-void CResourceDirectory::RemoveEntry(int i) {
- if (m_vEntries[i]->HasName())
- m_rdDir.NumberOfNamedEntries--;
- else
- m_rdDir.NumberOfIdEntries--;
- delete m_vEntries[i];
- m_vEntries.erase(m_vEntries.begin() + i);
-}
-
-int CResourceDirectory::CountEntries() {
- return m_vEntries.size();
-}
-
-// Returns the index of a directory entry with the specified name
-// Name can be a string or an id
-// Returns -1 if can not be found
-int CResourceDirectory::Find(WCHAR* szName) {
- if (IS_INTRESOURCE(szName))
- return Find((WORD) (DWORD) szName);
- else
- if (szName[0] == '#')
- return Find(WORD(winchar_stoi(szName + 1)));
-
- for (unsigned int i = 0; i < m_vEntries.size(); i++) {
- if (!m_vEntries[i]->HasName())
- continue;
-
- WCHAR* szEntName = m_vEntries[i]->GetName();
- int cmp = winchar_strcmp(szName, szEntName);
- delete [] szEntName;
-
- if (!cmp)
- return i;
- }
-
- return -1;
-}
-
-// Returns the index of a directory entry with the specified id
-// Returns -1 if can not be found
-int CResourceDirectory::Find(WORD wId) {
- for (unsigned int i = 0; i < m_vEntries.size(); i++) {
- if (m_vEntries[i]->HasName())
- continue;
-
- if (wId == m_vEntries[i]->GetId())
- return i;
- }
-
- return -1;
-}
-
-// Get the size of this resource directory (including all of its children)
-DWORD CResourceDirectory::GetSize() {
- DWORD dwSize = sizeof(IMAGE_RESOURCE_DIRECTORY);
- for (unsigned int i = 0; i < m_vEntries.size(); i++) {
- dwSize += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
- if (m_vEntries[i]->HasName())
- dwSize += sizeof(IMAGE_RESOURCE_DIR_STRING_U) + (m_vEntries[i]->GetNameLength()+1)*sizeof(WCHAR);
- if (m_vEntries[i]->IsDataDirectory())
- dwSize += m_vEntries[i]->GetSubDirectory()->GetSize();
- else {
- DWORD dwAligned = m_vEntries[i]->GetDataEntry()->GetSize();
- ALIGN(dwAligned, 8);
- dwSize += sizeof(IMAGE_RESOURCE_DATA_ENTRY) + dwAligned;
- }
- }
- return dwSize;
-}
-
-// Destroys this directory and all of its children
-void CResourceDirectory::Destroy() {
- for (unsigned int i = 0; i < m_vEntries.size(); i++) {
- if (m_vEntries[i]->IsDataDirectory()) {
- m_vEntries[i]->GetSubDirectory()->Destroy();
- delete m_vEntries[i]->GetSubDirectory();
- }
- else
- delete m_vEntries[i]->GetDataEntry();
- }
-}
-
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-// CResourceDirectoryEntry
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDirectory* rdSubDir) {
- if (IS_INTRESOURCE(szName)) {
- m_bHasName = false;
- m_szName = 0;
- m_wId = (WORD) (DWORD) szName;
- }
- else {
- m_bHasName = true;
- m_szName = winchar_strdup(szName);
- }
- m_bIsDataDirectory = true;
- m_rdSubDir = rdSubDir;
-}
-
-CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDataEntry* rdeData) {
- if (IS_INTRESOURCE(szName)) {
- m_bHasName = false;
- m_szName = 0;
- m_wId = (WORD) (DWORD) szName;
- }
- else {
- m_bHasName = true;
- m_szName = winchar_strdup(szName);
- }
- m_bIsDataDirectory = false;
- m_rdeData = rdeData;
-}
-
-CResourceDirectoryEntry::~CResourceDirectoryEntry() {
- if (m_szName && m_bHasName)
- delete [] m_szName;
-}
-
-//////////////////////////////////////////////////////////////////////
-// Methods
-//////////////////////////////////////////////////////////////////////
-
-bool CResourceDirectoryEntry::HasName() {
- return m_bHasName;
-}
-
-// Don't forget to free the memory used by the string after usage!
-WCHAR* CResourceDirectoryEntry::GetName() {
- if (!m_bHasName)
- return 0;
- return winchar_strdup(m_szName);
-}
-
-int CResourceDirectoryEntry::GetNameLength() {
- return winchar_strlen(m_szName);
-}
-
-WORD CResourceDirectoryEntry::GetId() {
- if (m_bHasName)
- return 0;
- return m_wId;
-}
-
-bool CResourceDirectoryEntry::IsDataDirectory() {
- return m_bIsDataDirectory;
-}
-
-CResourceDirectory* CResourceDirectoryEntry::GetSubDirectory() {
- if (!m_bIsDataDirectory)
- return NULL;
- return m_rdSubDir;
-}
-
-CResourceDataEntry* CResourceDirectoryEntry::GetDataEntry() {
- if (m_bIsDataDirectory)
- return NULL;
- return m_rdeData;
-}
-
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-// CResourceDataEntry
-//////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-
-CResourceDataEntry::CResourceDataEntry(BYTE* pbData, DWORD dwSize, DWORD dwCodePage) {
- m_pbData = 0;
- SetData(pbData, dwSize, dwCodePage);
-}
-
-CResourceDataEntry::~CResourceDataEntry() {
- if (m_pbData)
- delete [] m_pbData;
-}
-
-//////////////////////////////////////////////////////////////////////
-// Methods
-//////////////////////////////////////////////////////////////////////
-
-// To save memory this function doesn't give you a copy of the data
-// Don't mess with the data returned from this function!
-BYTE* CResourceDataEntry::GetData() {
- return m_pbData;
-}
-
-void CResourceDataEntry::SetData(BYTE* pbData, DWORD dwSize) {
- SetData(pbData, dwSize, m_dwCodePage);
-}
-
-void CResourceDataEntry::SetData(BYTE* pbData, DWORD dwSize, DWORD dwCodePage) {
- if (m_pbData) delete [] m_pbData;
- m_pbData = new BYTE[dwSize];
- CopyMemory(m_pbData, pbData, dwSize);
- m_dwSize = dwSize;
- m_dwCodePage = dwCodePage;
-}
-
-DWORD CResourceDataEntry::GetSize() {
- return m_dwSize;
-}
-
-DWORD CResourceDataEntry::GetCodePage() {
- return m_dwCodePage;
-}
+/*
+ * ResourceEditor.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 2002-2007 Amir Szekely <kichik@users.sourceforge.net>
+ *
+ * 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.
+ */
+
+#include "ResourceEditor.h"
+#include "util.h"
+#include "winchar.h"
+#include <queue>
+using namespace std;
+
+//////////////////////////////////////////////////////////////////////
+// Utilities
+//////////////////////////////////////////////////////////////////////
+
+#define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn
+#define RALIGN(dwToAlign, dwAlignOn) ((dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn)
+
+#ifndef _WIN32
+static inline ULONG ConvertEndianness(ULONG u) {
+ return FIX_ENDIAN_INT32(u);
+}
+#endif
+
+static inline DWORD ConvertEndianness(DWORD d) {
+ return FIX_ENDIAN_INT32(d);
+}
+
+static inline LONG ConvertEndianness(LONG l) {
+ return FIX_ENDIAN_INT32(l);
+}
+
+static inline WORD ConvertEndianness(WORD w) {
+ return FIX_ENDIAN_INT16(w);
+}
+
+PIMAGE_NT_HEADERS CResourceEditor::GetNTHeaders(BYTE* pbPE) {
+ // Get dos header
+ PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER) pbPE;
+ if (dosHeader->e_magic != IMAGE_DOS_SIGNATURE)
+ throw runtime_error("PE file contains invalid DOS header");
+
+ // Get NT headers
+ PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(pbPE + ConvertEndianness(dosHeader->e_lfanew));
+ if (ntHeaders->Signature != IMAGE_NT_SIGNATURE)
+ throw runtime_error("PE file missing NT signature");
+
+ // Make sure this is a supported PE format
+ if (ntHeaders->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR32_MAGIC &&
+ ntHeaders->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR64_MAGIC)
+ throw runtime_error("Unsupported PE format");
+
+ return ntHeaders;
+}
+
+PRESOURCE_DIRECTORY CResourceEditor::GetResourceDirectory(
+ BYTE* pbPE,
+ DWORD dwSize,
+ PIMAGE_NT_HEADERS ntHeaders,
+ DWORD *pdwResSecVA /*=NULL*/,
+ DWORD *pdwSectionIndex /*=NULL*/
+) {
+ PIMAGE_DATA_DIRECTORY dataDirectory = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory);
+ DWORD dwNumberOfRvaAndSizes = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, NumberOfRvaAndSizes);
+
+ if (ConvertEndianness(dwNumberOfRvaAndSizes) <= IMAGE_DIRECTORY_ENTRY_RESOURCE)
+ throw runtime_error("No resource section found");
+ // Get resource section virtual address
+ DWORD dwResSecVA = ConvertEndianness(dataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress);
+ // Pointer to the sections headers array
+ PIMAGE_SECTION_HEADER sectionHeadersArray = IMAGE_FIRST_SECTION(ntHeaders);
+
+ DWORD dwSectionIndex = (DWORD) -1;
+
+ // Find resource section index in the array
+ for (int i = 0; i < ConvertEndianness(ntHeaders->FileHeader.NumberOfSections); i++) {
+ if (dwResSecVA == ConvertEndianness(sectionHeadersArray[i].VirtualAddress)) {
+ // Remember resource section index
+ dwSectionIndex = i;
+ // Check for invalid resource section pointer
+ if (!sectionHeadersArray[i].PointerToRawData)
+ throw runtime_error("Invalid resource section pointer");
+
+ break;
+ }
+
+ // Invalid section pointer (goes beyond the PE image)
+ if (ConvertEndianness(sectionHeadersArray[i].PointerToRawData) > dwSize)
+ throw runtime_error("Invalid section pointer");
+ }
+
+ // No resource section...
+ if (dwSectionIndex == (DWORD) -1)
+ throw runtime_error("PE file doesn't contain any resource section");
+
+ // Return extra parameters
+ if (pdwSectionIndex)
+ *pdwSectionIndex = dwSectionIndex;
+ if (pdwResSecVA)
+ *pdwResSecVA = dwResSecVA;
+
+ // Pointer to section data, the first resource directory
+ DWORD dwResSecPtr = ConvertEndianness(sectionHeadersArray[dwSectionIndex].PointerToRawData);
+ return PRESOURCE_DIRECTORY(pbPE + dwResSecPtr);
+}
+
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+// CResourceEditor
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CResourceEditor::CResourceEditor(BYTE* pbPE, int iSize) {
+ // Copy the data pointer
+ m_pbPE = pbPE;
+ m_iSize = iSize;
+
+ // Get NT headers
+ m_ntHeaders = GetNTHeaders(m_pbPE);
+
+ // No check sum support yet...
+ DWORD* pdwCheckSum = GetMemberFromOptionalHeader(m_ntHeaders->OptionalHeader, CheckSum);
+ if (*pdwCheckSum)
+ {
+ // clear checksum (should be [re]calculated after all changes done)
+ pdwCheckSum = 0;
+ //throw runtime_error("CResourceEditor doesn't yet support check sum");
+ }
+
+ // Get resource section virtual address, resource section index and pointer to resource directory
+ PRESOURCE_DIRECTORY rdRoot = GetResourceDirectory(m_pbPE, iSize, m_ntHeaders, &m_dwResourceSectionVA, &m_dwResourceSectionIndex);
+
+ // Scan the resource directory
+ m_cResDir = ScanDirectory(rdRoot, rdRoot);
+}
+
+CResourceEditor::~CResourceEditor() {
+ if (m_cResDir) {
+ m_cResDir->Destroy();
+ delete m_cResDir;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////
+// Methods
+//////////////////////////////////////////////////////////////////////
+
+// Adds/Replaces/Removes a resource.
+// If lpData is 0 UpdateResource removes the resource.
+bool CResourceEditor::UpdateResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ CResourceDirectory* nameDir = 0;
+ CResourceDirectory* langDir = 0;
+ CResourceDataEntry* data = 0;
+ IMAGE_RESOURCE_DIRECTORY rd = {0, /*time(0),*/};
+ int iTypeIdx = -1, iNameIdx = -1, iLangIdx = -1;
+
+ iTypeIdx = m_cResDir->Find(szType);
+ if (iTypeIdx > -1) {
+ nameDir = m_cResDir->GetEntry(iTypeIdx)->GetSubDirectory();
+ iNameIdx = nameDir->Find(szName);
+ if (iNameIdx > -1) {
+ langDir = nameDir->GetEntry(iNameIdx)->GetSubDirectory();
+ iLangIdx = langDir->Find(wLanguage);
+ if (iLangIdx > -1) {
+ data = langDir->GetEntry(iLangIdx)->GetDataEntry();
+ }
+ }
+ }
+
+ if (lpData) {
+ // Replace/Add the resource
+ if (data) {
+ data->SetData(lpData, dwSize);
+ return true;
+ }
+
+ if (!nameDir) {
+ // Type doesn't yet exist
+ nameDir = new CResourceDirectory(&rd);
+ m_cResDir->AddEntry(new CResourceDirectoryEntry(szType, nameDir));
+ }
+ if (!langDir) {
+ // Name doesn't yet exist
+ langDir = new CResourceDirectory(&rd);
+ nameDir->AddEntry(new CResourceDirectoryEntry(szName, langDir));
+ }
+ if (!data) {
+ // Language doesn't yet exist, hence data nither
+ data = new CResourceDataEntry(lpData, dwSize);
+ langDir->AddEntry(new CResourceDirectoryEntry(MAKEINTRESOURCEW(wLanguage), data));
+ }
+ }
+ else if (data) {
+ // Delete the resource
+ delete data;
+ langDir->RemoveEntry(iLangIdx);
+ // Delete directories holding the resource if empty
+ if (!langDir->CountEntries()) {
+ delete langDir;
+ nameDir->RemoveEntry(iNameIdx);
+ if (!nameDir->CountEntries()) {
+ delete nameDir;
+ m_cResDir->RemoveEntry(iTypeIdx);
+ }
+ }
+ }
+ else return false;
+ return true;
+}
+
+static WCHAR* ResStringToUnicode(const char *szString) {
+ if (IS_INTRESOURCE(szString))
+ return MAKEINTRESOURCEW((ULONG_PTR)szString);
+ else
+ return winchar_fromansi(szString);
+}
+
+static void FreeUnicodeResString(WCHAR* szwString) {
+ if (!IS_INTRESOURCE(szwString))
+ delete [] szwString;
+}
+
+bool CResourceEditor::UpdateResourceW(WORD szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ return UpdateResourceW(MAKEINTRESOURCEW(szType), szName, wLanguage, lpData, dwSize);
+}
+
+bool CResourceEditor::UpdateResourceW(WCHAR* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ return UpdateResourceW(szType, MAKEINTRESOURCEW(szName), wLanguage, lpData, dwSize);
+}
+
+bool CResourceEditor::UpdateResourceA(char* szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ WCHAR* szwType = ResStringToUnicode(szType);
+ WCHAR* szwName = ResStringToUnicode(szName);
+
+ bool result = UpdateResourceW(szwType, szwName, wLanguage, lpData, dwSize);
+
+ FreeUnicodeResString(szwType);
+ FreeUnicodeResString(szwName);
+
+ return result;
+}
+
+bool CResourceEditor::UpdateResourceA(WORD szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ return UpdateResourceA(MAKEINTRESOURCE(szType), szName, wLanguage, lpData, dwSize);
+}
+
+bool CResourceEditor::UpdateResourceA(char* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ return UpdateResourceA(szType, MAKEINTRESOURCE(szName), wLanguage, lpData, dwSize);
+}
+
+bool CResourceEditor::UpdateResource(WORD szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize) {
+ return UpdateResourceW(MAKEINTRESOURCEW(szType), MAKEINTRESOURCEW(szName), wLanguage, lpData, dwSize);
+}
+
+// Returns a copy of the requested resource
+// Returns 0 if the requested resource can't be found
+BYTE* CResourceEditor::GetResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage) {
+ CResourceDirectory* nameDir = 0;
+ CResourceDirectory* langDir = 0;
+ CResourceDataEntry* data = 0;
+
+ int i = m_cResDir->Find(szType);
+ if (i > -1) {
+ nameDir = m_cResDir->GetEntry(i)->GetSubDirectory();
+ i = nameDir->Find(szName);
+ if (i > -1) {
+ langDir = nameDir->GetEntry(i)->GetSubDirectory();
+ i = 0;
+ if (wLanguage)
+ i = langDir->Find(wLanguage);
+ if (i > -1) {
+ data = langDir->GetEntry(i)->GetDataEntry();
+ }
+ }
+ }
+
+ if (data) {
+ BYTE* toReturn = new BYTE[data->GetSize()];
+ CopyMemory(toReturn, data->GetData(), data->GetSize());
+ return toReturn;
+ }
+ else
+ return NULL;
+}
+
+BYTE* CResourceEditor::GetResourceA(char* szType, char* szName, LANGID wLanguage) {
+ WCHAR* szwType = ResStringToUnicode(szType);
+ WCHAR* szwName = ResStringToUnicode(szName);
+
+ BYTE* result = GetResourceW(szwType, szwName, wLanguage);
+
+ FreeUnicodeResString(szwType);
+ FreeUnicodeResString(szwName);
+
+ return result;
+}
+
+// Returns the size of the requested resource
+// Returns -1 if the requested resource can't be found
+int CResourceEditor::GetResourceSizeW(WCHAR* szType, WCHAR* szName, LANGID wLanguage) {
+ CResourceDirectory* nameDir = 0;
+ CResourceDirectory* langDir = 0;
+ CResourceDataEntry* data = 0;
+
+ int i = m_cResDir->Find(szType);
+ if (i > -1) {
+ nameDir = m_cResDir->GetEntry(i)->GetSubDirectory();
+ i = nameDir->Find(szName);
+ if (i > -1) {
+ langDir = nameDir->GetEntry(i)->GetSubDirectory();
+ i = 0;
+ if (wLanguage)
+ i = langDir->Find(wLanguage);
+ if (i > -1) {
+ data = langDir->GetEntry(i)->GetDataEntry();
+ }
+ }
+ }
+
+ if (data)
+ return (int) data->GetSize();
+ else
+ return -1;
+}
+
+int CResourceEditor::GetResourceSizeA(char* szType, char* szName, LANGID wLanguage) {
+ WCHAR* szwType = ResStringToUnicode(szType);
+ WCHAR* szwName = ResStringToUnicode(szName);
+
+ int result = GetResourceSizeW(szwType, szwName, wLanguage);
+
+ FreeUnicodeResString(szwType);
+ FreeUnicodeResString(szwName);
+
+ return result;
+}
+
+// Returns the offset of the requested resource in the original PE
+// Returns -1 if the requested resource can't be found
+DWORD CResourceEditor::GetResourceOffsetW(WCHAR* szType, WCHAR* szName, LANGID wLanguage) {
+ CResourceDirectory* nameDir = 0;
+ CResourceDirectory* langDir = 0;
+ CResourceDataEntry* data = 0;
+
+ int i = m_cResDir->Find(szType);
+ if (i > -1) {
+ nameDir = m_cResDir->GetEntry(i)->GetSubDirectory();
+ i = nameDir->Find(szName);
+ if (i > -1) {
+ langDir = nameDir->GetEntry(i)->GetSubDirectory();
+ i = 0;
+ if (wLanguage)
+ i = langDir->Find(wLanguage);
+ if (i > -1) {
+ data = langDir->GetEntry(i)->GetDataEntry();
+ }
+ }
+ }
+
+ if (data)
+ return data->GetOffset();
+ else
+ return DWORD(-1);
+}
+
+DWORD CResourceEditor::GetResourceOffsetA(char* szType, char* szName, LANGID wLanguage) {
+ WCHAR* szwType = ResStringToUnicode(szType);
+ WCHAR* szwName = ResStringToUnicode(szName);
+
+ DWORD result = GetResourceOffsetW(szwType, szwName, wLanguage);
+
+ FreeUnicodeResString(szwType);
+ FreeUnicodeResString(szwName);
+
+ return result;
+}
+
+void CResourceEditor::FreeResource(BYTE* pbResource)
+{
+ if (pbResource)
+ delete [] pbResource;
+}
+
+// Saves the edited PE into a buffer and returns it.
+DWORD CResourceEditor::Save(BYTE* pbBuf, DWORD &dwSize) {
+ unsigned int i;
+ DWORD dwReqSize;
+
+ DWORD dwFileAlign = ConvertEndianness(m_ntHeaders->OptionalHeader.FileAlignment);
+ DWORD dwSecAlign = ConvertEndianness(m_ntHeaders->OptionalHeader.SectionAlignment);
+
+ DWORD dwRsrcSize = m_cResDir->GetSize(); // Size of new resource section
+ DWORD dwRsrcSizeAligned = RALIGN(dwRsrcSize, dwFileAlign); // Align it to FileAlignment
+
+ // Calculate the total new PE size
+ DWORD dwOldRsrcSize = ConvertEndianness(IMAGE_FIRST_SECTION(m_ntHeaders)[m_dwResourceSectionIndex].SizeOfRawData);
+ dwReqSize = m_iSize - dwOldRsrcSize + dwRsrcSizeAligned;
+
+ if (!pbBuf || dwSize < dwReqSize)
+ return dwReqSize;
+
+ // Use buffer
+ BYTE* pbNewPE = pbBuf;
+ dwSize = dwReqSize;
+ // Fill buffer with zeros
+ ZeroMemory(pbNewPE, dwSize);
+
+ BYTE* seeker = pbNewPE;
+ BYTE* oldSeeker = m_pbPE;
+
+ PIMAGE_SECTION_HEADER old_sectionHeadersArray = IMAGE_FIRST_SECTION(m_ntHeaders);
+
+ DWORD dwHeaderSize = ConvertEndianness(old_sectionHeadersArray[m_dwResourceSectionIndex].PointerToRawData);
+ WORD wNumberOfSections = ConvertEndianness(m_ntHeaders->FileHeader.NumberOfSections);
+
+ // Copy everything until the resource section (including headers and everything that might come after them)
+ // We don't use SizeOfHeaders because sometimes (using VC6) it can extend beyond the first section
+ // or (Borland) there could be some more information between the headers and the first section.
+ CopyMemory(seeker, oldSeeker, dwHeaderSize);
+
+ // Skip the headers and whatever comes after them
+ seeker += dwHeaderSize;
+ oldSeeker += dwHeaderSize;
+
+ // Get new nt headers pointer
+ PIMAGE_NT_HEADERS ntHeaders = GetNTHeaders(pbNewPE);
+ // Get a pointer to the new section headers
+ PIMAGE_SECTION_HEADER sectionHeadersArray = IMAGE_FIRST_SECTION(ntHeaders);
+
+ // Skip the resource section in the old PE seeker.
+ oldSeeker += dwOldRsrcSize;
+
+ // Save the old virtual size of the resource section
+ DWORD dwNewVirtualSize = RALIGN(dwRsrcSize, dwSecAlign);
+ DWORD dwOldVirtualSize = ConvertEndianness(sectionHeadersArray[m_dwResourceSectionIndex].Misc.VirtualSize);
+ ALIGN(dwOldVirtualSize, dwSecAlign);
+ DWORD dwVAAdjustment = dwNewVirtualSize - dwOldVirtualSize;
+
+ // Set the new size of the resource section (size aligned to FileAlignment)
+ sectionHeadersArray[m_dwResourceSectionIndex].SizeOfRawData = ConvertEndianness(dwRsrcSizeAligned);
+ // Set the virtual size as well (in memory)
+ sectionHeadersArray[m_dwResourceSectionIndex].Misc.VirtualSize = ConvertEndianness(dwRsrcSize);
+ (*GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory))[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = ConvertEndianness(dwRsrcSize);
+
+ // Set the new virtual size of the image
+ DWORD* pdwSizeOfImage = GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, SizeOfImage);
+ *pdwSizeOfImage = AlignVA(*GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, SizeOfHeaders));
+ for (i = 0; i < wNumberOfSections; i++) {
+ DWORD dwSecSize = ConvertEndianness(sectionHeadersArray[i].Misc.VirtualSize);
+ *pdwSizeOfImage = AlignVA(AdjustVA(*pdwSizeOfImage, dwSecSize));
+ }
+
+ // Set the new AddressOfEntryPoint if needed
+ DWORD* pdwAddressOfEntryPoint = GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, AddressOfEntryPoint);
+ if (ConvertEndianness(*pdwAddressOfEntryPoint) > m_dwResourceSectionVA)
+ *pdwAddressOfEntryPoint = AdjustVA(*pdwAddressOfEntryPoint, dwVAAdjustment);
+
+ // Set the new BaseOfCode if needed
+ DWORD* pdwBaseOfCode = GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, BaseOfCode);
+ if (ConvertEndianness(*pdwBaseOfCode) > m_dwResourceSectionVA)
+ *pdwBaseOfCode = AdjustVA(*pdwBaseOfCode, dwVAAdjustment);
+
+ // Set the new BaseOfData if needed
+ if (ntHeaders->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
+ DWORD* pdwBaseOfData = &((PIMAGE_OPTIONAL_HEADER32)&ntHeaders->OptionalHeader)->BaseOfData;
+ if (*pdwBaseOfData > m_dwResourceSectionVA)
+ *pdwBaseOfData = AdjustVA(*pdwBaseOfData, dwVAAdjustment);
+ }
+
+ // Refresh the headers of the sections that come after the resource section, and the data directory
+ DWORD dwNumberOfRvaAndSizes = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, NumberOfRvaAndSizes);
+ PIMAGE_DATA_DIRECTORY pDataDirectory = *GetMemberFromOptionalHeader(ntHeaders->OptionalHeader, DataDirectory);
+ for (i = m_dwResourceSectionIndex + 1; i < wNumberOfSections; i++) {
+ if (sectionHeadersArray[i].PointerToRawData) {
+ AdjustVA(sectionHeadersArray[i].PointerToRawData, dwRsrcSizeAligned - dwOldRsrcSize);
+ }
+
+ // We must find the right data directory entry before we change the virtual address
+ unsigned int uDataDirIdx = 0;
+ for (unsigned int j = 0; j < ConvertEndianness(dwNumberOfRvaAndSizes); j++)
+ if (pDataDirectory[j].VirtualAddress == sectionHeadersArray[i].VirtualAddress)
+ uDataDirIdx = j;
+
+ sectionHeadersArray[i].VirtualAddress = AdjustVA(sectionHeadersArray[i].VirtualAddress, dwVAAdjustment);
+
+ // Change the virtual address in the data directory too
+ if (uDataDirIdx)
+ pDataDirectory[uDataDirIdx].VirtualAddress = sectionHeadersArray[i].VirtualAddress;
+ }
+
+ // Write the resource section
+ WriteRsrcSec(seeker);
+ // Advance the pointer
+ seeker += dwRsrcSizeAligned;
+
+ // Copy everything that comes after the resource section (other sections and tacked data)
+ DWORD dwLeft = m_iSize - (oldSeeker - m_pbPE);
+ if (dwLeft)
+ CopyMemory(seeker, oldSeeker, dwLeft);
+
+ seeker += dwLeft;
+ oldSeeker += dwLeft;
+
+ /**********************************************************
+ * To add checksum to the header use MapFileAndCheckSum
+ **********************************************************/
+
+ // From now on, we are working on the new PE
+ // Freeing the old PE memory is up to the user
+ m_pbPE = pbNewPE;
+ m_iSize = dwSize;
+ m_ntHeaders = ntHeaders;
+ // We just wrote the resource section according to m_cResDir, so we don't need to rescan
+ // m_dwResourceSectionIndex and m_dwResourceSectionVA have also been left unchanged as
+ // we didn't move the resources section
+
+ return 0;
+}
+
+// This function scans exe sections and after find a match with given name
+// increments it's virtual size (auto fixes image size based on section alignment, etc)
+bool CResourceEditor::AddExtraVirtualSize2PESection(const char* pszSectionName, int addsize)
+{
+ PIMAGE_SECTION_HEADER sectionHeadersArray = IMAGE_FIRST_SECTION(m_ntHeaders);
+
+ // Refresh the headers of the sections that come after the resource section, and the data directory
+ for (int i = 0; i < ConvertEndianness(m_ntHeaders->FileHeader.NumberOfSections); i++) {
+ if (!strcmp((LPCSTR)sectionHeadersArray[i].Name, pszSectionName)) {
+ sectionHeadersArray[i].Misc.VirtualSize = AlignVA(AdjustVA(sectionHeadersArray[i].Misc.VirtualSize, addsize));
+
+ sectionHeadersArray[i].Characteristics &= ConvertEndianness((DWORD) ~IMAGE_SCN_MEM_DISCARDABLE);
+
+ // now fix any section after
+ for (int k = i + 1; k < ConvertEndianness(m_ntHeaders->FileHeader.NumberOfSections); k++, i++) {
+ DWORD dwLastSecVA = ConvertEndianness(sectionHeadersArray[i].VirtualAddress);
+ DWORD dwLastSecSize = ConvertEndianness(sectionHeadersArray[i].Misc.VirtualSize);
+ DWORD dwSecVA = AlignVA(ConvertEndianness(dwLastSecVA + dwLastSecSize));
+
+ sectionHeadersArray[k].VirtualAddress = dwSecVA;
+
+ if (m_dwResourceSectionIndex == (DWORD) k)
+ {
+ // fix the resources virtual address if it changed
+ PIMAGE_DATA_DIRECTORY pDataDirectory = *GetMemberFromOptionalHeader(m_ntHeaders->OptionalHeader, DataDirectory);
+ pDataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress = dwSecVA;
+ m_dwResourceSectionVA = ConvertEndianness(dwSecVA);
+ }
+ }
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Private Methods
+//////////////////////////////////////////////////////////////////////
+
+// This function scans a give resource directory and return a CResourceDirectory object
+// rdRoot must point to the root directory of the resource section
+CResourceDirectory* CResourceEditor::ScanDirectory(PRESOURCE_DIRECTORY rdRoot, PRESOURCE_DIRECTORY rdToScan) {
+ // Create CResourceDirectory from rdToScan
+ CResourceDirectory* rdc = new CResourceDirectory(PIMAGE_RESOURCE_DIRECTORY(rdToScan));
+ WCHAR* szName;
+ PIMAGE_RESOURCE_DATA_ENTRY rde = NULL;
+
+ // Go through all entries of this resource directory
+ int entries = ConvertEndianness(rdToScan->Header.NumberOfNamedEntries);
+ entries += ConvertEndianness(rdToScan->Header.NumberOfIdEntries);
+
+ for (int i = 0; i < entries; i++) {
+ MY_IMAGE_RESOURCE_DIRECTORY_ENTRY rd = rdToScan->Entries[i];
+ rd.UOffset.OffsetToData = ConvertEndianness(rd.UOffset.OffsetToData);
+ rd.UName.Name = ConvertEndianness(rd.UName.Name);
+
+ // If this entry points to data entry get a pointer to it
+ if (!rd.UOffset.DirectoryOffset.DataIsDirectory)
+ rde = PIMAGE_RESOURCE_DATA_ENTRY(rd.UOffset.OffsetToData + (BYTE*)rdRoot);
+
+ // If this entry has a name, translate it from Unicode
+ if (rd.UName.NameString.NameIsString) {
+ PIMAGE_RESOURCE_DIR_STRING_U rds = PIMAGE_RESOURCE_DIR_STRING_U(rd.UName.NameString.NameOffset + (char*)rdRoot);
+
+ size_t nameSize = ConvertEndianness(rds->Length);
+ szName = new WCHAR[nameSize+1];
+ winchar_strncpy(szName, rds->NameString, nameSize);
+ szName[nameSize] = 0;
+ }
+ // Else, set the name to this entry's id
+ else
+ szName = MAKEINTRESOURCEW(ConvertEndianness(rdToScan->Entries[i].UName.Id));
+
+ if (rd.UOffset.DirectoryOffset.DataIsDirectory)
+ {
+ rdc->AddEntry(
+ new CResourceDirectoryEntry(
+ szName,
+ ScanDirectory(
+ rdRoot,
+ PRESOURCE_DIRECTORY(rd.UOffset.DirectoryOffset.OffsetToDirectory + (LPBYTE)rdRoot)
+ )
+ )
+ );
+ }
+ else
+ {
+ LPBYTE pbData = (LPBYTE)rdRoot + ConvertEndianness(rde->OffsetToData) - m_dwResourceSectionVA;
+ DWORD dwOffset = DWORD(pbData - m_pbPE);
+
+ rdc->AddEntry(
+ new CResourceDirectoryEntry(
+ szName,
+ new CResourceDataEntry(
+ pbData,
+ ConvertEndianness(rde->Size),
+ ConvertEndianness(rde->CodePage),
+ dwOffset
+ )
+ )
+ );
+ }
+
+ // Delete the dynamicly allocated name if it is a name and not an id
+ if (!IS_INTRESOURCE(szName))
+ delete [] szName;
+ }
+
+ return rdc;
+}
+
+// This function writes into a given place in memory (pbRsrcSec) the edited resource section
+void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) {
+ BYTE* seeker = pbRsrcSec;
+
+ queue<CResourceDirectory*> qDirs; // Used to scan the tree by level
+ queue<CResourceDataEntry*> qDataEntries; // Used for writing the data entries
+ queue<CResourceDataEntry*> qDataEntries2; // Used for writing raw resources data
+ queue<CResourceDirectoryEntry*> qStrings; // Used for writing resources' names
+
+ qDirs.push(m_cResDir);
+
+ while (!qDirs.empty()) {
+ CResourceDirectory* crd = qDirs.front();
+
+ IMAGE_RESOURCE_DIRECTORY rdDir = crd->GetInfo();
+
+ rdDir.NumberOfNamedEntries = ConvertEndianness(rdDir.NumberOfNamedEntries);
+ rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries);
+
+ CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY));
+ crd->m_dwWrittenAt = DWORD(seeker);
+ seeker += sizeof(IMAGE_RESOURCE_DIRECTORY);
+
+ for (int i = 0; i < crd->CountEntries(); i++) {
+ if (crd->GetEntry(i)->HasName())
+ qStrings.push(crd->GetEntry(i));
+ if (crd->GetEntry(i)->IsDataDirectory())
+ qDirs.push(crd->GetEntry(i)->GetSubDirectory());
+ else {
+ qDataEntries.push(crd->GetEntry(i)->GetDataEntry());
+ qDataEntries2.push(crd->GetEntry(i)->GetDataEntry());
+ }
+
+ MY_IMAGE_RESOURCE_DIRECTORY_ENTRY rDirE;
+ ZeroMemory(&rDirE, sizeof(rDirE));
+ rDirE.UOffset.DirectoryOffset.DataIsDirectory = crd->GetEntry(i)->IsDataDirectory();
+ rDirE.UName.Id = crd->GetEntry(i)->HasName() ? 0 : crd->GetEntry(i)->GetId();
+ rDirE.UName.Id = ConvertEndianness(rDirE.UName.Id);
+ rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0;
+
+ CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY));
+ crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker);
+ seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
+ }
+ qDirs.pop();
+ }
+
+ /*
+ * Write IMAGE_RESOURCE_DATA_ENTRYs.
+ */
+ while (!qDataEntries.empty()) {
+ CResourceDataEntry* cRDataE = qDataEntries.front();
+ IMAGE_RESOURCE_DATA_ENTRY rDataE = {0,};
+ rDataE.CodePage = ConvertEndianness(cRDataE->GetCodePage());
+ rDataE.Size = ConvertEndianness(cRDataE->GetSize());
+
+ CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY));
+ cRDataE->m_dwWrittenAt = DWORD(seeker);
+ seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY);
+
+ qDataEntries.pop();
+ }
+
+ /*
+ * Write strings
+ */
+ while (!qStrings.empty()) {
+ CResourceDirectoryEntry* cRDirE = qStrings.front();
+
+ PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec));
+
+ WCHAR* szName = cRDirE->GetName();
+ WORD iLen = winchar_strlen(szName) + 1;
+
+ *(WORD*)seeker = ConvertEndianness(iLen);
+ CopyMemory(seeker + sizeof(WORD), szName, iLen*sizeof(WCHAR));
+
+ seeker += RALIGN(iLen * sizeof(WCHAR) + sizeof(WORD), 4);
+
+ delete [] szName;
+
+ qStrings.pop();
+ }
+
+ /*
+ * Write raw resource data and set offsets in IMAGE_RESOURCE_DATA_ENTRYs.
+ */
+ while (!qDataEntries2.empty()) {
+ CResourceDataEntry* cRDataE = qDataEntries2.front();
+ CopyMemory(seeker, cRDataE->GetData(), cRDataE->GetSize());
+ PIMAGE_RESOURCE_DATA_ENTRY(cRDataE->m_dwWrittenAt)->OffsetToData = ConvertEndianness(seeker - pbRsrcSec + m_dwResourceSectionVA);
+
+ seeker += RALIGN(cRDataE->GetSize(), 8);
+
+ qDataEntries2.pop();
+ }
+
+ /*
+ * Set all of the directory entries offsets.
+ */
+ SetOffsets(m_cResDir, DWORD(pbRsrcSec));
+}
+
+// Sets the offsets in directory entries
+void CResourceEditor::SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt) {
+ for (int i = 0; i < resDir->CountEntries(); i++) {
+ PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY rde = PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(resDir->GetEntry(i)->m_dwWrittenAt);
+ if (resDir->GetEntry(i)->IsDataDirectory()) {
+ rde->UOffset.DirectoryOffset.DataIsDirectory = 1;
+ rde->UOffset.DirectoryOffset.OffsetToDirectory = resDir->GetEntry(i)->GetSubDirectory()->m_dwWrittenAt - newResDirAt;
+ rde->UOffset.OffsetToData = ConvertEndianness(rde->UOffset.OffsetToData);
+ SetOffsets(resDir->GetEntry(i)->GetSubDirectory(), newResDirAt);
+ }
+ else {
+ rde->UOffset.OffsetToData = ConvertEndianness(resDir->GetEntry(i)->GetDataEntry()->m_dwWrittenAt - newResDirAt);
+ }
+ }
+}
+
+// Adjusts a virtual address by a specific amount
+DWORD CResourceEditor::AdjustVA(DWORD dwVirtualAddress, DWORD dwAdjustment) {
+ dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
+ dwVirtualAddress += dwAdjustment;
+ dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
+
+ return dwVirtualAddress;
+}
+
+// Aligns a virtual address to the section alignment
+DWORD CResourceEditor::AlignVA(DWORD dwVirtualAddress) {
+ DWORD dwSectionAlignment = *GetMemberFromOptionalHeader(m_ntHeaders->OptionalHeader, SectionAlignment);
+ DWORD dwAlignment = ConvertEndianness(dwSectionAlignment);
+
+ dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
+ dwVirtualAddress = RALIGN(dwVirtualAddress, dwAlignment);
+ dwVirtualAddress = ConvertEndianness(dwVirtualAddress);
+
+ return dwVirtualAddress;
+}
+
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+// CResourceDirectory
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CResourceDirectory::CResourceDirectory(PIMAGE_RESOURCE_DIRECTORY prd) {
+ m_rdDir = *prd;
+ m_rdDir.NumberOfIdEntries = 0;
+ m_rdDir.NumberOfNamedEntries = 0;
+}
+
+CResourceDirectory::~CResourceDirectory() {
+}
+
+//////////////////////////////////////////////////////////////////////
+// Methods
+//////////////////////////////////////////////////////////////////////
+
+IMAGE_RESOURCE_DIRECTORY CResourceDirectory::GetInfo() {
+ return m_rdDir;
+}
+
+CResourceDirectoryEntry* CResourceDirectory::GetEntry(unsigned int i) {
+ if (m_vEntries.size() < i)
+ return 0;
+ return m_vEntries[i];
+}
+
+// This function inserts a new directory entry
+// It also keeps the directory entries sorted
+void CResourceDirectory::AddEntry(CResourceDirectoryEntry* entry) {
+ int i = 0;
+ if (entry->HasName()) {
+ WCHAR* szEntName = entry->GetName();
+ for (i = 0; i < m_rdDir.NumberOfNamedEntries; i++) {
+ WCHAR* szName = m_vEntries[i]->GetName();
+ int cmp = winchar_strcmp(szName, szEntName);
+ delete [] szName;
+ if (cmp == 0) {
+ delete [] szEntName;
+ return;
+ }
+ if (cmp > 0)
+ break;
+ }
+ delete [] szEntName;
+ m_rdDir.NumberOfNamedEntries++;
+ }
+ else {
+ for (i = m_rdDir.NumberOfNamedEntries; i < m_rdDir.NumberOfNamedEntries+m_rdDir.NumberOfIdEntries; i++) {
+ if (m_vEntries[i]->GetId() == entry->GetId())
+ return;
+ if (m_vEntries[i]->GetId() > entry->GetId())
+ break;
+ }
+ m_rdDir.NumberOfIdEntries++;
+ }
+ m_vEntries.insert(m_vEntries.begin() + i, entry);
+}
+
+void CResourceDirectory::RemoveEntry(int i) {
+ if (m_vEntries[i]->HasName())
+ m_rdDir.NumberOfNamedEntries--;
+ else
+ m_rdDir.NumberOfIdEntries--;
+ delete m_vEntries[i];
+ m_vEntries.erase(m_vEntries.begin() + i);
+}
+
+int CResourceDirectory::CountEntries() {
+ return m_vEntries.size();
+}
+
+// Returns the index of a directory entry with the specified name
+// Name can be a string or an id
+// Returns -1 if can not be found
+int CResourceDirectory::Find(WCHAR* szName) {
+ if (IS_INTRESOURCE(szName))
+ return Find((WORD) (DWORD) szName);
+ else
+ if (szName[0] == '#')
+ return Find(WORD(winchar_stoi(szName + 1)));
+
+ for (unsigned int i = 0; i < m_vEntries.size(); i++) {
+ if (!m_vEntries[i]->HasName())
+ continue;
+
+ WCHAR* szEntName = m_vEntries[i]->GetName();
+ int cmp = winchar_strcmp(szName, szEntName);
+ delete [] szEntName;
+
+ if (!cmp)
+ return i;
+ }
+
+ return -1;
+}
+
+// Returns the index of a directory entry with the specified id
+// Returns -1 if can not be found
+int CResourceDirectory::Find(WORD wId) {
+ for (unsigned int i = 0; i < m_vEntries.size(); i++) {
+ if (m_vEntries[i]->HasName())
+ continue;
+
+ if (wId == m_vEntries[i]->GetId())
+ return i;
+ }
+
+ return -1;
+}
+
+// Get the size of this resource directory (including all of its children)
+DWORD CResourceDirectory::GetSize() {
+ DWORD dwSize = sizeof(IMAGE_RESOURCE_DIRECTORY);
+ for (unsigned int i = 0; i < m_vEntries.size(); i++) {
+ dwSize += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY);
+ if (m_vEntries[i]->HasName())
+ dwSize += sizeof(IMAGE_RESOURCE_DIR_STRING_U) + (m_vEntries[i]->GetNameLength()+1)*sizeof(WCHAR);
+ if (m_vEntries[i]->IsDataDirectory())
+ dwSize += m_vEntries[i]->GetSubDirectory()->GetSize();
+ else {
+ DWORD dwAligned = m_vEntries[i]->GetDataEntry()->GetSize();
+ ALIGN(dwAligned, 8);
+ dwSize += sizeof(IMAGE_RESOURCE_DATA_ENTRY) + dwAligned;
+ }
+ }
+ return dwSize;
+}
+
+// Destroys this directory and all of its children
+void CResourceDirectory::Destroy() {
+ for (unsigned int i = 0; i < m_vEntries.size(); i++) {
+ if (m_vEntries[i]->IsDataDirectory()) {
+ m_vEntries[i]->GetSubDirectory()->Destroy();
+ delete m_vEntries[i]->GetSubDirectory();
+ }
+ else
+ delete m_vEntries[i]->GetDataEntry();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+// CResourceDirectoryEntry
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDirectory* rdSubDir) {
+ if (IS_INTRESOURCE(szName)) {
+ m_bHasName = false;
+ m_szName = 0;
+ m_wId = (WORD) (DWORD) szName;
+ }
+ else {
+ m_bHasName = true;
+ m_szName = winchar_strdup(szName);
+ }
+ m_bIsDataDirectory = true;
+ m_rdSubDir = rdSubDir;
+}
+
+CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDataEntry* rdeData) {
+ if (IS_INTRESOURCE(szName)) {
+ m_bHasName = false;
+ m_szName = 0;
+ m_wId = (WORD) (DWORD) szName;
+ }
+ else {
+ m_bHasName = true;
+ m_szName = winchar_strdup(szName);
+ }
+ m_bIsDataDirectory = false;
+ m_rdeData = rdeData;
+}
+
+CResourceDirectoryEntry::~CResourceDirectoryEntry() {
+ if (m_szName && m_bHasName)
+ delete [] m_szName;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Methods
+//////////////////////////////////////////////////////////////////////
+
+bool CResourceDirectoryEntry::HasName() {
+ return m_bHasName;
+}
+
+// Don't forget to free the memory used by the string after usage!
+WCHAR* CResourceDirectoryEntry::GetName() {
+ if (!m_bHasName)
+ return 0;
+ return winchar_strdup(m_szName);
+}
+
+int CResourceDirectoryEntry::GetNameLength() {
+ return winchar_strlen(m_szName);
+}
+
+WORD CResourceDirectoryEntry::GetId() {
+ if (m_bHasName)
+ return 0;
+ return m_wId;
+}
+
+bool CResourceDirectoryEntry::IsDataDirectory() {
+ return m_bIsDataDirectory;
+}
+
+CResourceDirectory* CResourceDirectoryEntry::GetSubDirectory() {
+ if (!m_bIsDataDirectory)
+ return NULL;
+ return m_rdSubDir;
+}
+
+CResourceDataEntry* CResourceDirectoryEntry::GetDataEntry() {
+ if (m_bIsDataDirectory)
+ return NULL;
+ return m_rdeData;
+}
+
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+// CResourceDataEntry
+//////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CResourceDataEntry::CResourceDataEntry(BYTE* pbData, DWORD dwSize, DWORD dwCodePage, DWORD dwOffset) {
+ m_pbData = 0;
+ SetData(pbData, dwSize, dwCodePage);
+ m_dwOffset = dwOffset;
+}
+
+CResourceDataEntry::~CResourceDataEntry() {
+ if (m_pbData)
+ delete [] m_pbData;
+}
+
+//////////////////////////////////////////////////////////////////////
+// Methods
+//////////////////////////////////////////////////////////////////////
+
+// To save memory this function doesn't give you a copy of the data
+// Don't mess with the data returned from this function!
+BYTE* CResourceDataEntry::GetData() {
+ return m_pbData;
+}
+
+void CResourceDataEntry::SetData(BYTE* pbData, DWORD dwSize) {
+ SetData(pbData, dwSize, m_dwCodePage);
+}
+
+void CResourceDataEntry::SetData(BYTE* pbData, DWORD dwSize, DWORD dwCodePage) {
+ if (m_pbData) delete [] m_pbData;
+ m_pbData = new BYTE[dwSize];
+ CopyMemory(m_pbData, pbData, dwSize);
+ m_dwSize = dwSize;
+ m_dwCodePage = dwCodePage;
+ m_dwOffset = DWORD(-1); // unset
+}
+
+DWORD CResourceDataEntry::GetSize() {
+ return m_dwSize;
+}
+
+DWORD CResourceDataEntry::GetCodePage() {
+ return m_dwCodePage;
+}
+
+DWORD CResourceDataEntry::GetOffset() {
+ return m_dwOffset;
+}
diff --git a/Source/ResourceEditor.h b/Source/ResourceEditor.h
index eb542c8..d821fe2 100755
--- a/Source/ResourceEditor.h
+++ b/Source/ResourceEditor.h
@@ -1,239 +1,243 @@
-/*
- * ResourceEditor.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 2002-2007 Amir Szekely <kichik@users.sourceforge.net>
- *
- * 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.
- */
-
-#if !defined(AFX_RESOURCEEDITOR_H__683BF710_E805_4093_975B_D5729186A89A__INCLUDED_)
-#define AFX_RESOURCEEDITOR_H__683BF710_E805_4093_975B_D5729186A89A__INCLUDED_
-
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-
-#include <vector>
-
-#include "Platform.h"
-#ifdef _WIN32
-# include <WinNT.h>
-#else
-// all definitions for non Win32 platforms were taken from MinGW's free Win32 library
-# define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
-# define IMAGE_SCN_MEM_DISCARDABLE 0x2000000
-# pragma pack(4)
-typedef struct _IMAGE_RESOURCE_DIRECTORY {
- DWORD Characteristics;
- DWORD TimeDateStamp;
- WORD MajorVersion;
- WORD MinorVersion;
- WORD NumberOfNamedEntries;
- WORD NumberOfIdEntries;
-} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
-typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
- DWORD OffsetToData;
- DWORD Size;
- DWORD CodePage;
- DWORD Reserved;
-} IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
-typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
- WORD Length;
- CHAR NameString[1];
-} IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
-typedef struct _IMAGE_RESOURCE_DIR_STRING_U {
- WORD Length;
- WCHAR NameString[1];
-} IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U;
-# pragma pack()
-#endif
-
-#pragma pack(4)
-typedef struct _MY_IMAGE_RESOURCE_DIRECTORY_ENTRY {
- union {
- struct {
-#ifndef __BIG_ENDIAN__
- DWORD NameOffset:31;
- DWORD NameIsString:1;
-#else
- DWORD NameIsString:1;
- DWORD NameOffset:31;
-#endif
- } NameString;
- DWORD Name;
- WORD Id;
- } UName;
- union {
- DWORD OffsetToData;
- struct {
-#ifndef __BIG_ENDIAN__
- DWORD OffsetToDirectory:31;
- DWORD DataIsDirectory:1;
-#else
- DWORD DataIsDirectory:1;
- DWORD OffsetToDirectory:31;
-#endif
- } DirectoryOffset;
- } UOffset;
-} MY_IMAGE_RESOURCE_DIRECTORY_ENTRY,*PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY;
-
-#pragma pack()
-
-#include <stdexcept>
-
-// classes
-class CResourceDirectory;
-class CResourceDirectoryEntry;
-class CResourceDataEntry;
-
-// Resource directory with entries
-typedef struct RESOURCE_DIRECTORY {
- IMAGE_RESOURCE_DIRECTORY Header;
- MY_IMAGE_RESOURCE_DIRECTORY_ENTRY Entries[1];
-} *PRESOURCE_DIRECTORY;
-
-#define GetMemberFromOptionalHeader(optionalHeader, member) \
- ( (optionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) ? \
- &((PIMAGE_OPTIONAL_HEADER32)&optionalHeader)->member : \
- &((PIMAGE_OPTIONAL_HEADER64)&optionalHeader)->member \
- )
-class CResourceEditor {
-public:
- CResourceEditor(BYTE* pbPE, int iSize);
- virtual ~CResourceEditor();
-
- bool UpdateResource(WORD szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- bool UpdateResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- bool UpdateResourceW(WORD szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- bool UpdateResourceW(WCHAR* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- bool UpdateResourceA(char* szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- bool UpdateResourceA(WORD szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- bool UpdateResourceA(char* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
- BYTE* GetResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage);
- BYTE* GetResourceA(char* szType, char* szName, LANGID wLanguage);
- int GetResourceSizeW(WCHAR* szType, WCHAR* szName, LANGID wLanguage);
- int GetResourceSizeA(char* szType, char* szName, LANGID wLanguage);
- void FreeResource(BYTE* pbResource);
-
- bool AddExtraVirtualSize2PESection(const char* pszSectionName, int addsize);
- DWORD Save(BYTE* pbBuf, DWORD &dwSize);
-
- // utitlity functions
- static PIMAGE_NT_HEADERS GetNTHeaders(BYTE* pbPE);
-
- static PRESOURCE_DIRECTORY GetResourceDirectory(
- BYTE* pbPE,
- DWORD dwSize,
- PIMAGE_NT_HEADERS ntHeaders,
- DWORD *pdwResSecVA = NULL,
- DWORD *pdwSectionIndex = NULL
- );
-
-private:
- BYTE* m_pbPE;
- int m_iSize;
-
- PIMAGE_NT_HEADERS m_ntHeaders;
-
- DWORD m_dwResourceSectionIndex;
- DWORD m_dwResourceSectionVA;
-
- CResourceDirectory* m_cResDir;
-
- CResourceDirectory* ScanDirectory(PRESOURCE_DIRECTORY rdRoot, PRESOURCE_DIRECTORY rdToScan);
-
- void WriteRsrcSec(BYTE* pbRsrcSec);
- void SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt);
-
- DWORD AdjustVA(DWORD dwVirtualAddress, DWORD dwAdjustment);
- DWORD AlignVA(DWORD dwVirtualAddress);
-};
-
-class CResourceDirectory {
-public:
- CResourceDirectory(PIMAGE_RESOURCE_DIRECTORY prd);
- virtual ~CResourceDirectory();
-
- IMAGE_RESOURCE_DIRECTORY GetInfo();
-
- CResourceDirectoryEntry* GetEntry(unsigned int i);
- void AddEntry(CResourceDirectoryEntry* entry);
- void RemoveEntry(int i);
- int CountEntries();
- int Find(WCHAR* szName);
- int Find(WORD wId);
-
- DWORD GetSize();
-
- void Destroy();
-
- DWORD m_dwWrittenAt;
-
-private:
- IMAGE_RESOURCE_DIRECTORY m_rdDir;
- std::vector<CResourceDirectoryEntry*> m_vEntries;
-};
-
-class CResourceDirectoryEntry {
-public:
- CResourceDirectoryEntry(WCHAR* szName, CResourceDirectory* rdSubDir);
- CResourceDirectoryEntry(WCHAR* szName, CResourceDataEntry* rdeData);
- virtual ~CResourceDirectoryEntry();
-
- bool HasName();
- WCHAR* GetName();
- int GetNameLength();
-
- WORD GetId();
-
- bool IsDataDirectory();
- CResourceDirectory* GetSubDirectory();
-
- CResourceDataEntry* GetDataEntry();
-
- DWORD m_dwWrittenAt;
-
-private:
- bool m_bHasName;
- WCHAR* m_szName;
- WORD m_wId;
-
- bool m_bIsDataDirectory;
- union {
- CResourceDirectory* m_rdSubDir;
- CResourceDataEntry* m_rdeData;
- };
-};
-
-class CResourceDataEntry {
-public:
- CResourceDataEntry(BYTE* pbData, DWORD dwSize, DWORD dwCodePage = 0);
- ~CResourceDataEntry();
-
- BYTE* GetData();
-
- void SetData(BYTE* pbData, DWORD dwSize);
- void SetData(BYTE* pbData, DWORD dwSize, DWORD dwCodePage);
-
- DWORD GetSize();
- DWORD GetCodePage();
-
- DWORD m_dwWrittenAt;
-
-private:
- BYTE* m_pbData;
- DWORD m_dwSize;
- DWORD m_dwCodePage;
-};
-
-#endif // !defined(AFX_RESOURCEEDITOR_H__683BF710_E805_4093_975B_D5729186A89A__INCLUDED_)
+/*
+ * ResourceEditor.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 2002-2007 Amir Szekely <kichik@users.sourceforge.net>
+ *
+ * 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.
+ */
+
+#if !defined(AFX_RESOURCEEDITOR_H__683BF710_E805_4093_975B_D5729186A89A__INCLUDED_)
+#define AFX_RESOURCEEDITOR_H__683BF710_E805_4093_975B_D5729186A89A__INCLUDED_
+
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+#include <vector>
+
+#include "Platform.h"
+#ifdef _WIN32
+# include <WinNT.h>
+#else
+// all definitions for non Win32 platforms were taken from MinGW's free Win32 library
+# define IMAGE_DIRECTORY_ENTRY_RESOURCE 2
+# define IMAGE_SCN_MEM_DISCARDABLE 0x2000000
+# pragma pack(4)
+typedef struct _IMAGE_RESOURCE_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ WORD NumberOfNamedEntries;
+ WORD NumberOfIdEntries;
+} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
+typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
+ DWORD OffsetToData;
+ DWORD Size;
+ DWORD CodePage;
+ DWORD Reserved;
+} IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
+typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING {
+ WORD Length;
+ CHAR NameString[1];
+} IMAGE_RESOURCE_DIRECTORY_STRING,*PIMAGE_RESOURCE_DIRECTORY_STRING;
+typedef struct _IMAGE_RESOURCE_DIR_STRING_U {
+ WORD Length;
+ WCHAR NameString[1];
+} IMAGE_RESOURCE_DIR_STRING_U,*PIMAGE_RESOURCE_DIR_STRING_U;
+# pragma pack()
+#endif
+
+#pragma pack(4)
+typedef struct _MY_IMAGE_RESOURCE_DIRECTORY_ENTRY {
+ union {
+ struct {
+#ifndef __BIG_ENDIAN__
+ DWORD NameOffset:31;
+ DWORD NameIsString:1;
+#else
+ DWORD NameIsString:1;
+ DWORD NameOffset:31;
+#endif
+ } NameString;
+ DWORD Name;
+ WORD Id;
+ } UName;
+ union {
+ DWORD OffsetToData;
+ struct {
+#ifndef __BIG_ENDIAN__
+ DWORD OffsetToDirectory:31;
+ DWORD DataIsDirectory:1;
+#else
+ DWORD DataIsDirectory:1;
+ DWORD OffsetToDirectory:31;
+#endif
+ } DirectoryOffset;
+ } UOffset;
+} MY_IMAGE_RESOURCE_DIRECTORY_ENTRY,*PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY;
+
+#pragma pack()
+
+#include <stdexcept>
+
+// classes
+class CResourceDirectory;
+class CResourceDirectoryEntry;
+class CResourceDataEntry;
+
+// Resource directory with entries
+typedef struct RESOURCE_DIRECTORY {
+ IMAGE_RESOURCE_DIRECTORY Header;
+ MY_IMAGE_RESOURCE_DIRECTORY_ENTRY Entries[1];
+} *PRESOURCE_DIRECTORY;
+
+#define GetMemberFromOptionalHeader(optionalHeader, member) \
+ ( (optionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) ? \
+ &((PIMAGE_OPTIONAL_HEADER32)&optionalHeader)->member : \
+ &((PIMAGE_OPTIONAL_HEADER64)&optionalHeader)->member \
+ )
+class CResourceEditor {
+public:
+ CResourceEditor(BYTE* pbPE, int iSize);
+ virtual ~CResourceEditor();
+
+ bool UpdateResource(WORD szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ bool UpdateResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ bool UpdateResourceW(WORD szType, WCHAR* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ bool UpdateResourceW(WCHAR* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ bool UpdateResourceA(char* szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ bool UpdateResourceA(WORD szType, char* szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ bool UpdateResourceA(char* szType, WORD szName, LANGID wLanguage, BYTE* lpData, DWORD dwSize);
+ BYTE* GetResourceW(WCHAR* szType, WCHAR* szName, LANGID wLanguage);
+ BYTE* GetResourceA(char* szType, char* szName, LANGID wLanguage);
+ int GetResourceSizeW(WCHAR* szType, WCHAR* szName, LANGID wLanguage);
+ int GetResourceSizeA(char* szType, char* szName, LANGID wLanguage);
+ DWORD GetResourceOffsetW(WCHAR* szType, WCHAR* szName, LANGID wLanguage);
+ DWORD GetResourceOffsetA(char* szType, char* szName, LANGID wLanguage);
+ void FreeResource(BYTE* pbResource);
+
+ bool AddExtraVirtualSize2PESection(const char* pszSectionName, int addsize);
+ DWORD Save(BYTE* pbBuf, DWORD &dwSize);
+
+ // utitlity functions
+ static PIMAGE_NT_HEADERS GetNTHeaders(BYTE* pbPE);
+
+ static PRESOURCE_DIRECTORY GetResourceDirectory(
+ BYTE* pbPE,
+ DWORD dwSize,
+ PIMAGE_NT_HEADERS ntHeaders,
+ DWORD *pdwResSecVA = NULL,
+ DWORD *pdwSectionIndex = NULL
+ );
+
+private:
+ BYTE* m_pbPE;
+ int m_iSize;
+
+ PIMAGE_NT_HEADERS m_ntHeaders;
+
+ DWORD m_dwResourceSectionIndex;
+ DWORD m_dwResourceSectionVA;
+
+ CResourceDirectory* m_cResDir;
+
+ CResourceDirectory* ScanDirectory(PRESOURCE_DIRECTORY rdRoot, PRESOURCE_DIRECTORY rdToScan);
+
+ void WriteRsrcSec(BYTE* pbRsrcSec);
+ void SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt);
+
+ DWORD AdjustVA(DWORD dwVirtualAddress, DWORD dwAdjustment);
+ DWORD AlignVA(DWORD dwVirtualAddress);
+};
+
+class CResourceDirectory {
+public:
+ CResourceDirectory(PIMAGE_RESOURCE_DIRECTORY prd);
+ virtual ~CResourceDirectory();
+
+ IMAGE_RESOURCE_DIRECTORY GetInfo();
+
+ CResourceDirectoryEntry* GetEntry(unsigned int i);
+ void AddEntry(CResourceDirectoryEntry* entry);
+ void RemoveEntry(int i);
+ int CountEntries();
+ int Find(WCHAR* szName);
+ int Find(WORD wId);
+
+ DWORD GetSize();
+
+ void Destroy();
+
+ DWORD m_dwWrittenAt;
+
+private:
+ IMAGE_RESOURCE_DIRECTORY m_rdDir;
+ std::vector<CResourceDirectoryEntry*> m_vEntries;
+};
+
+class CResourceDirectoryEntry {
+public:
+ CResourceDirectoryEntry(WCHAR* szName, CResourceDirectory* rdSubDir);
+ CResourceDirectoryEntry(WCHAR* szName, CResourceDataEntry* rdeData);
+ virtual ~CResourceDirectoryEntry();
+
+ bool HasName();
+ WCHAR* GetName();
+ int GetNameLength();
+
+ WORD GetId();
+
+ bool IsDataDirectory();
+ CResourceDirectory* GetSubDirectory();
+
+ CResourceDataEntry* GetDataEntry();
+
+ DWORD m_dwWrittenAt;
+
+private:
+ bool m_bHasName;
+ WCHAR* m_szName;
+ WORD m_wId;
+
+ bool m_bIsDataDirectory;
+ union {
+ CResourceDirectory* m_rdSubDir;
+ CResourceDataEntry* m_rdeData;
+ };
+};
+
+class CResourceDataEntry {
+public:
+ CResourceDataEntry(BYTE* pbData, DWORD dwSize, DWORD dwCodePage = 0, DWORD dwOffset = DWORD(-1));
+ ~CResourceDataEntry();
+
+ BYTE* GetData();
+
+ void SetData(BYTE* pbData, DWORD dwSize);
+ void SetData(BYTE* pbData, DWORD dwSize, DWORD dwCodePage);
+
+ DWORD GetSize();
+ DWORD GetCodePage();
+ DWORD GetOffset();
+
+ DWORD m_dwWrittenAt;
+
+private:
+ BYTE* m_pbData;
+ DWORD m_dwSize;
+ DWORD m_dwCodePage;
+ DWORD m_dwOffset;
+};
+
+#endif // !defined(AFX_RESOURCEEDITOR_H__683BF710_E805_4093_975B_D5729186A89A__INCLUDED_)
diff --git a/Source/ResourceVersionInfo.cpp b/Source/ResourceVersionInfo.cpp
index b292459..5fac171 100755
--- a/Source/ResourceVersionInfo.cpp
+++ b/Source/ResourceVersionInfo.cpp
@@ -1,318 +1,318 @@
-/*
- * ResourceVersionInfo.cpp: implementation of the CResourceVersionInfo class.
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "ResourceVersionInfo.h"
-
-#include "Platform.h"
-#include "util.h"
-#include "winchar.h"
-
-#ifdef NSIS_SUPPORT_VERSION_INFO
-
-#ifndef VOS__WINDOWS32
-# define VOS__WINDOWS32 4
-#endif
-#ifndef VFT_APP
-# define VFT_APP 1
-#endif
-
-#ifndef _WIN32
-# include <iconv.h>
-#endif
-
-struct version_string_list
-{
- int codepage;
- LANGID lang_id;
- int name;
- DefineList *pChildStrings;
-};
-
-CVersionStrigList::~CVersionStrigList()
-{
- struct version_string_list *itr = (struct version_string_list *) gr.get();
- int i = gr.getlen() / sizeof(struct version_string_list);
-
- while (i--)
- {
- delete itr[i].pChildStrings;
- }
-}
-
-int CVersionStrigList::add(LANGID langid, int codepage)
-{
- char Buff[10];
- sprintf(Buff, "%04x", langid);
- int pos = SortedStringListND<struct version_string_list>::add(Buff);
- if (pos == -1) return false;
- ((struct version_string_list*)gr.get())[pos].pChildStrings = new DefineList;
- ((struct version_string_list*)gr.get())[pos].codepage = codepage;
- ((struct version_string_list*)gr.get())[pos].lang_id = langid;
- return pos;
-}
-
-LANGID CVersionStrigList::get_lang(int idx)
-{
- version_string_list *data=(version_string_list *)gr.get();
- return data[idx].lang_id;
-}
-
-int CVersionStrigList::get_codepage(int idx)
-{
- version_string_list *data=(version_string_list *)gr.get();
- return data[idx].codepage;
-}
-
-DefineList* CVersionStrigList::get_strings(int idx)
-{
- version_string_list *data=(version_string_list *)gr.get();
- return data[idx].pChildStrings;
-}
-
-int CVersionStrigList::find(LANGID lang_id, int codepage)
-{
- char Buff[10];
- sprintf(Buff, "%04x", lang_id);
- return SortedStringListND<struct version_string_list>::find(Buff);
-}
-
-int CVersionStrigList::getlen()
-{
- return strings.getlen();
-}
-
-int CVersionStrigList::getnum()
-{
- return gr.getlen()/sizeof(struct version_string_list);
-}
-
-//////////////////////////////////////////////////////////////////////
-// Construction/Destruction
-//////////////////////////////////////////////////////////////////////
-CResourceVersionInfo::CResourceVersionInfo()
-{
- memset(&m_FixedInfo, 0, sizeof(VS_FIXEDFILEINFO));
- m_FixedInfo.dwSignature = 0xFEEF04BD;
- m_FixedInfo.dwFileOS = VOS__WINDOWS32;
- m_FixedInfo.dwFileType = VFT_APP;
-}
-
-CResourceVersionInfo::~CResourceVersionInfo()
-{
-
-}
-
-void CResourceVersionInfo::SetFileFlags(int Value)
-{
- m_FixedInfo.dwFileFlags = (m_FixedInfo.dwFileFlags & ~(m_FixedInfo.dwFileFlagsMask)) || Value;
-}
-
-void CResourceVersionInfo::SetFileVersion(int HighPart, int LowPart)
-{
- m_FixedInfo.dwFileVersionLS = LowPart;
- m_FixedInfo.dwFileVersionMS = HighPart;
-}
-
-void CResourceVersionInfo::SetProductVersion(int HighPart, int LowPart)
-{
- m_FixedInfo.dwProductVersionLS = LowPart;
- m_FixedInfo.dwProductVersionMS = HighPart;
-}
-
-int GetVersionHeader (LPSTR &p, WORD &wLength, WORD &wValueLength, WORD &wType)
-{
- WCHAR *szKey;
- char * baseP;
-
- baseP = p;
- wLength = *(WORD*)p;
- p += sizeof(WORD);
- wValueLength = *(WORD*)p;
- p += sizeof(WORD);
- wType = *(WORD*)p;
- p += sizeof(WORD);
- szKey = (WCHAR*)p;
- p += (winchar_strlen(szKey) + 1) * sizeof (WCHAR);
- while ( ((long)p % 4) != 0 )
- p++;
- return p - baseP;
-}
-
-DWORD ZEROS = 0;
-
-void PadStream (GrowBuf &strm)
-{
- if ( (strm.getlen() % 4) != 0 )
- strm.add (&ZEROS, 4 - (strm.getlen() % 4));
-}
-
-void SaveVersionHeader (GrowBuf &strm, WORD wLength, WORD wValueLength, WORD wType, const WCHAR *key, void *value)
-{
- WORD valueLen;
- WORD keyLen;
-
- strm.add (&wLength, sizeof (wLength));
-
- strm.add (&wValueLength, sizeof (wValueLength));
- strm.add (&wType, sizeof (wType));
- keyLen = WORD((winchar_strlen(key) + 1) * sizeof (WCHAR));
- strm.add ((void*)key, keyLen);
-
- PadStream(strm);
-
- if ( wValueLength > 0 )
- {
- valueLen = wValueLength;
- if ( wType == 1 )
- valueLen = valueLen * WORD(sizeof (WCHAR));
- strm.add (value, valueLen);
- }
-}
-
-void CResourceVersionInfo::ExportToStream(GrowBuf &strm, int Index)
-{
- DWORD v;
- WORD wSize;
- int p, p1;
- WCHAR *KeyName, *KeyValue;
-
- strm.resize(0);
- KeyName = winchar_fromansi("VS_VERSION_INFO");
- SaveVersionHeader (strm, 0, sizeof (VS_FIXEDFILEINFO), 0, KeyName, &m_FixedInfo);
- delete [] KeyName;
-
- DefineList *pChildStrings = m_ChildStringLists.get_strings(Index);
- if ( pChildStrings->getnum() > 0 )
- {
- GrowBuf stringInfoStream;
- int codepage = m_ChildStringLists.get_codepage(Index);
- LANGID langid = m_ChildStringLists.get_lang(Index);
- char Buff[16];
- sprintf(Buff, "%04x%04x", langid, codepage);
- KeyName = winchar_fromansi(Buff, CP_ACP);
- SaveVersionHeader (stringInfoStream, 0, 0, 0, KeyName, &ZEROS);
- delete [] KeyName;
-
- for ( int i = 0; i < pChildStrings->getnum(); i++ )
- {
- PadStream (stringInfoStream);
-
- p = stringInfoStream.getlen();
- KeyName = winchar_fromansi(pChildStrings->getname(i), codepage);
- KeyValue = winchar_fromansi(pChildStrings->getvalue(i), codepage);
- SaveVersionHeader (stringInfoStream, 0, WORD(winchar_strlen(KeyValue) + 1), 1, KeyName, (void*)KeyValue);
- delete [] KeyName;
- delete [] KeyValue;
- wSize = WORD(stringInfoStream.getlen() - p);
-
- *(WORD*)((PBYTE)stringInfoStream.get()+p)=wSize;
- }
-
- wSize = WORD(stringInfoStream.getlen());
- *(WORD*)((PBYTE)stringInfoStream.get())=wSize;
-
- PadStream (strm);
- p = strm.getlen();
- KeyName = winchar_fromansi("StringFileInfo", CP_ACP);
- SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS);
- delete [] KeyName;
- strm.add (stringInfoStream.get(), stringInfoStream.getlen());
- wSize = WORD(strm.getlen() - p);
-
- *(WORD*)((PBYTE)strm.get()+p)=wSize;
- }
-
- // Show all languages avaiable using Var-Translations
- if ( m_ChildStringLists.getnum() > 0 )
- {
- PadStream (strm);
- p = strm.getlen();
- KeyName = winchar_fromansi("VarFileInfo", CP_ACP);
- SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS);
- delete [] KeyName;
- PadStream (strm);
-
- p1 = strm.getlen();
- KeyName = winchar_fromansi("Translation", CP_ACP);
- SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS);
- delete [] KeyName;
-
- // First add selected code language translation
- v = MAKELONG(m_ChildStringLists.get_lang(Index), m_ChildStringLists.get_codepage(Index));
- strm.add (&v, sizeof (v));
-
- for ( int k =0; k < m_ChildStringLists.getnum(); k++ )
- {
- if ( k != Index )
- {
- v = MAKELONG(m_ChildStringLists.get_lang(k), m_ChildStringLists.get_codepage(k));
- strm.add (&v, sizeof (v));
- }
- }
-
- wSize = WORD(strm.getlen() - p1);
- *(WORD*)((PBYTE)strm.get()+p1)=wSize;
- wSize = WORD(sizeof (int) * m_ChildStringLists.getnum());
- p1+=sizeof(WORD);
- *(WORD*)((PBYTE)strm.get()+p1)=wSize;
-
- wSize = WORD(strm.getlen() - p);
- *(WORD*)((PBYTE)strm.get()+p)=wSize;
- }
-
- wSize = WORD(strm.getlen());
- *(WORD*)((PBYTE)strm.get())=wSize;
-}
-
-// Returns 0 if success, 1 if already defined
-int CResourceVersionInfo::SetKeyValue(LANGID lang_id, int codepage, char* AKeyName, char* AValue)
-{
- int pos = m_ChildStringLists.find(lang_id, codepage);
- if ( pos == -1 )
- {
- pos = m_ChildStringLists.add(lang_id, codepage);
- }
- DefineList *pStrings = m_ChildStringLists.get_strings(pos);
- return pStrings->add(AKeyName, AValue);
-}
-
-int CResourceVersionInfo::GetStringTablesCount()
-{
- return m_ChildStringLists.getnum();
-}
-
-LANGID CResourceVersionInfo::GetLangID(int Index)
-{
- return m_ChildStringLists.get_lang(Index);
-}
-
-int CResourceVersionInfo::GetCodePage(int Index)
-{
- return m_ChildStringLists.get_codepage(Index);
-}
-
-char *CResourceVersionInfo::FindKey(LANGID LangID, int codepage, char *pKeyName)
-{
- int pos = m_ChildStringLists.find(LangID, codepage);
- if ( pos == -1 )
- {
- return NULL;
- }
- DefineList *pStrings = m_ChildStringLists.get_strings(pos);
- return pStrings->find(pKeyName);
-}
-
-#endif
+/*
+ * ResourceVersionInfo.cpp: implementation of the CResourceVersionInfo class.
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "ResourceVersionInfo.h"
+
+#include "Platform.h"
+#include "util.h"
+#include "winchar.h"
+
+#ifdef NSIS_SUPPORT_VERSION_INFO
+
+#ifndef VOS__WINDOWS32
+# define VOS__WINDOWS32 4
+#endif
+#ifndef VFT_APP
+# define VFT_APP 1
+#endif
+
+#ifndef _WIN32
+# include <iconv.h>
+#endif
+
+struct version_string_list
+{
+ int codepage;
+ LANGID lang_id;
+ int name;
+ DefineList *pChildStrings;
+};
+
+CVersionStrigList::~CVersionStrigList()
+{
+ struct version_string_list *itr = (struct version_string_list *) gr.get();
+ int i = gr.getlen() / sizeof(struct version_string_list);
+
+ while (i--)
+ {
+ delete itr[i].pChildStrings;
+ }
+}
+
+int CVersionStrigList::add(LANGID langid, int codepage)
+{
+ char Buff[10];
+ sprintf(Buff, "%04x", langid);
+ int pos = SortedStringListND<struct version_string_list>::add(Buff);
+ if (pos == -1) return false;
+ ((struct version_string_list*)gr.get())[pos].pChildStrings = new DefineList;
+ ((struct version_string_list*)gr.get())[pos].codepage = codepage;
+ ((struct version_string_list*)gr.get())[pos].lang_id = langid;
+ return pos;
+}
+
+LANGID CVersionStrigList::get_lang(int idx)
+{
+ version_string_list *data=(version_string_list *)gr.get();
+ return data[idx].lang_id;
+}
+
+int CVersionStrigList::get_codepage(int idx)
+{
+ version_string_list *data=(version_string_list *)gr.get();
+ return data[idx].codepage;
+}
+
+DefineList* CVersionStrigList::get_strings(int idx)
+{
+ version_string_list *data=(version_string_list *)gr.get();
+ return data[idx].pChildStrings;
+}
+
+int CVersionStrigList::find(LANGID lang_id, int codepage)
+{
+ char Buff[10];
+ sprintf(Buff, "%04x", lang_id);
+ return SortedStringListND<struct version_string_list>::find(Buff);
+}
+
+int CVersionStrigList::getlen()
+{
+ return strings.getlen();
+}
+
+int CVersionStrigList::getnum()
+{
+ return gr.getlen()/sizeof(struct version_string_list);
+}
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+CResourceVersionInfo::CResourceVersionInfo()
+{
+ memset(&m_FixedInfo, 0, sizeof(VS_FIXEDFILEINFO));
+ m_FixedInfo.dwSignature = 0xFEEF04BD;
+ m_FixedInfo.dwFileOS = VOS__WINDOWS32;
+ m_FixedInfo.dwFileType = VFT_APP;
+}
+
+CResourceVersionInfo::~CResourceVersionInfo()
+{
+
+}
+
+void CResourceVersionInfo::SetFileFlags(int Value)
+{
+ m_FixedInfo.dwFileFlags = (m_FixedInfo.dwFileFlags & ~(m_FixedInfo.dwFileFlagsMask)) || Value;
+}
+
+void CResourceVersionInfo::SetFileVersion(int HighPart, int LowPart)
+{
+ m_FixedInfo.dwFileVersionLS = LowPart;
+ m_FixedInfo.dwFileVersionMS = HighPart;
+}
+
+void CResourceVersionInfo::SetProductVersion(int HighPart, int LowPart)
+{
+ m_FixedInfo.dwProductVersionLS = LowPart;
+ m_FixedInfo.dwProductVersionMS = HighPart;
+}
+
+int GetVersionHeader (LPSTR &p, WORD &wLength, WORD &wValueLength, WORD &wType)
+{
+ WCHAR *szKey;
+ char * baseP;
+
+ baseP = p;
+ wLength = *(WORD*)p;
+ p += sizeof(WORD);
+ wValueLength = *(WORD*)p;
+ p += sizeof(WORD);
+ wType = *(WORD*)p;
+ p += sizeof(WORD);
+ szKey = (WCHAR*)p;
+ p += (winchar_strlen(szKey) + 1) * sizeof (WCHAR);
+ while ( ((long)p % 4) != 0 )
+ p++;
+ return p - baseP;
+}
+
+DWORD ZEROS = 0;
+
+void PadStream (GrowBuf &strm)
+{
+ if ( (strm.getlen() % 4) != 0 )
+ strm.add (&ZEROS, 4 - (strm.getlen() % 4));
+}
+
+void SaveVersionHeader (GrowBuf &strm, WORD wLength, WORD wValueLength, WORD wType, const WCHAR *key, void *value)
+{
+ WORD valueLen;
+ WORD keyLen;
+
+ strm.add (&wLength, sizeof (wLength));
+
+ strm.add (&wValueLength, sizeof (wValueLength));
+ strm.add (&wType, sizeof (wType));
+ keyLen = WORD((winchar_strlen(key) + 1) * sizeof (WCHAR));
+ strm.add ((void*)key, keyLen);
+
+ PadStream(strm);
+
+ if ( wValueLength > 0 )
+ {
+ valueLen = wValueLength;
+ if ( wType == 1 )
+ valueLen = valueLen * WORD(sizeof (WCHAR));
+ strm.add (value, valueLen);
+ }
+}
+
+void CResourceVersionInfo::ExportToStream(GrowBuf &strm, int Index)
+{
+ DWORD v;
+ WORD wSize;
+ int p, p1;
+ WCHAR *KeyName, *KeyValue;
+
+ strm.resize(0);
+ KeyName = winchar_fromansi("VS_VERSION_INFO");
+ SaveVersionHeader (strm, 0, sizeof (VS_FIXEDFILEINFO), 0, KeyName, &m_FixedInfo);
+ delete [] KeyName;
+
+ DefineList *pChildStrings = m_ChildStringLists.get_strings(Index);
+ if ( pChildStrings->getnum() > 0 )
+ {
+ GrowBuf stringInfoStream;
+ int codepage = m_ChildStringLists.get_codepage(Index);
+ LANGID langid = m_ChildStringLists.get_lang(Index);
+ char Buff[16];
+ sprintf(Buff, "%04x%04x", langid, codepage);
+ KeyName = winchar_fromansi(Buff, CP_ACP);
+ SaveVersionHeader (stringInfoStream, 0, 0, 0, KeyName, &ZEROS);
+ delete [] KeyName;
+
+ for ( int i = 0; i < pChildStrings->getnum(); i++ )
+ {
+ PadStream (stringInfoStream);
+
+ p = stringInfoStream.getlen();
+ KeyName = winchar_fromansi(pChildStrings->getname(i), codepage);
+ KeyValue = winchar_fromansi(pChildStrings->getvalue(i), codepage);
+ SaveVersionHeader (stringInfoStream, 0, WORD(winchar_strlen(KeyValue) + 1), 1, KeyName, (void*)KeyValue);
+ delete [] KeyName;
+ delete [] KeyValue;
+ wSize = WORD(stringInfoStream.getlen() - p);
+
+ *(WORD*)((PBYTE)stringInfoStream.get()+p)=wSize;
+ }
+
+ wSize = WORD(stringInfoStream.getlen());
+ *(WORD*)((PBYTE)stringInfoStream.get())=wSize;
+
+ PadStream (strm);
+ p = strm.getlen();
+ KeyName = winchar_fromansi("StringFileInfo", CP_ACP);
+ SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS);
+ delete [] KeyName;
+ strm.add (stringInfoStream.get(), stringInfoStream.getlen());
+ wSize = WORD(strm.getlen() - p);
+
+ *(WORD*)((PBYTE)strm.get()+p)=wSize;
+ }
+
+ // Show all languages avaiable using Var-Translations
+ if ( m_ChildStringLists.getnum() > 0 )
+ {
+ PadStream (strm);
+ p = strm.getlen();
+ KeyName = winchar_fromansi("VarFileInfo", CP_ACP);
+ SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS);
+ delete [] KeyName;
+ PadStream (strm);
+
+ p1 = strm.getlen();
+ KeyName = winchar_fromansi("Translation", CP_ACP);
+ SaveVersionHeader (strm, 0, 0, 0, KeyName, &ZEROS);
+ delete [] KeyName;
+
+ // First add selected code language translation
+ v = MAKELONG(m_ChildStringLists.get_lang(Index), m_ChildStringLists.get_codepage(Index));
+ strm.add (&v, sizeof (v));
+
+ for ( int k =0; k < m_ChildStringLists.getnum(); k++ )
+ {
+ if ( k != Index )
+ {
+ v = MAKELONG(m_ChildStringLists.get_lang(k), m_ChildStringLists.get_codepage(k));
+ strm.add (&v, sizeof (v));
+ }
+ }
+
+ wSize = WORD(strm.getlen() - p1);
+ *(WORD*)((PBYTE)strm.get()+p1)=wSize;
+ wSize = WORD(sizeof (int) * m_ChildStringLists.getnum());
+ p1+=sizeof(WORD);
+ *(WORD*)((PBYTE)strm.get()+p1)=wSize;
+
+ wSize = WORD(strm.getlen() - p);
+ *(WORD*)((PBYTE)strm.get()+p)=wSize;
+ }
+
+ wSize = WORD(strm.getlen());
+ *(WORD*)((PBYTE)strm.get())=wSize;
+}
+
+// Returns 0 if success, 1 if already defined
+int CResourceVersionInfo::SetKeyValue(LANGID lang_id, int codepage, char* AKeyName, char* AValue)
+{
+ int pos = m_ChildStringLists.find(lang_id, codepage);
+ if ( pos == -1 )
+ {
+ pos = m_ChildStringLists.add(lang_id, codepage);
+ }
+ DefineList *pStrings = m_ChildStringLists.get_strings(pos);
+ return pStrings->add(AKeyName, AValue);
+}
+
+int CResourceVersionInfo::GetStringTablesCount()
+{
+ return m_ChildStringLists.getnum();
+}
+
+LANGID CResourceVersionInfo::GetLangID(int Index)
+{
+ return m_ChildStringLists.get_lang(Index);
+}
+
+int CResourceVersionInfo::GetCodePage(int Index)
+{
+ return m_ChildStringLists.get_codepage(Index);
+}
+
+char *CResourceVersionInfo::FindKey(LANGID LangID, int codepage, char *pKeyName)
+{
+ int pos = m_ChildStringLists.find(LangID, codepage);
+ if ( pos == -1 )
+ {
+ return NULL;
+ }
+ DefineList *pStrings = m_ChildStringLists.get_strings(pos);
+ return pStrings->find(pKeyName);
+}
+
+#endif
diff --git a/Source/ResourceVersionInfo.h b/Source/ResourceVersionInfo.h
index 264ee3f..1f1c5ec 100755
--- a/Source/ResourceVersionInfo.h
+++ b/Source/ResourceVersionInfo.h
@@ -1,67 +1,67 @@
-/*
- * ResourceVersionInfo.h: interface for the CResourceVersionInfo class.
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#if !defined(AFX_RESOURCEVERSIONINFO_H__80439ADA_49DA_4623_8DA9_1663FF356E76__INCLUDED_)
-#define AFX_RESOURCEVERSIONINFO_H__80439ADA_49DA_4623_8DA9_1663FF356E76__INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
-
-#include "exehead/config.h"
-#ifdef NSIS_SUPPORT_VERSION_INFO
-
-#include "Platform.h"
-#include "strlist.h"
-
-struct version_string_list;
-
-class CVersionStrigList : public SortedStringListND<struct version_string_list>
-{
-public:
- ~CVersionStrigList();
- int add(LANGID langid, int codepage);
- LANGID get_lang(int idx);
- int get_codepage(int idx);
- DefineList* get_strings(int idx);
- int find(LANGID lang_id, int codepage);
- int getlen();
- int getnum();
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////////
-class CResourceVersionInfo
-{
- VS_FIXEDFILEINFO m_FixedInfo;
- CVersionStrigList m_ChildStringLists;
-
-public:
- CResourceVersionInfo();
- virtual ~CResourceVersionInfo();
- int SetKeyValue(LANGID lang_id, int codepage, char* AKeyName, char* AValue);
- void SetFileFlags(int Value);
- void SetFileVersion(int HighPart, int LowPart);
- void SetProductVersion(int HighPart, int LowPart);
- void ExportToStream(GrowBuf &strm, int Index);
- int GetStringTablesCount();
- LANGID GetLangID(int Index);
- int GetCodePage(int Index);
- char *FindKey(LANGID LangID, int codepage, char *pKeyName);
-};
-
-#endif
-
-#endif // !defined(AFX_RESOURCEVERSIONINFO_H__80439ADA_49DA_4623_8DA9_1663FF356E76__INCLUDED_)
+/*
+ * ResourceVersionInfo.h: interface for the CResourceVersionInfo class.
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#if !defined(AFX_RESOURCEVERSIONINFO_H__80439ADA_49DA_4623_8DA9_1663FF356E76__INCLUDED_)
+#define AFX_RESOURCEVERSIONINFO_H__80439ADA_49DA_4623_8DA9_1663FF356E76__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "exehead/config.h"
+#ifdef NSIS_SUPPORT_VERSION_INFO
+
+#include "Platform.h"
+#include "strlist.h"
+
+struct version_string_list;
+
+class CVersionStrigList : public SortedStringListND<struct version_string_list>
+{
+public:
+ ~CVersionStrigList();
+ int add(LANGID langid, int codepage);
+ LANGID get_lang(int idx);
+ int get_codepage(int idx);
+ DefineList* get_strings(int idx);
+ int find(LANGID lang_id, int codepage);
+ int getlen();
+ int getnum();
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////////
+class CResourceVersionInfo
+{
+ VS_FIXEDFILEINFO m_FixedInfo;
+ CVersionStrigList m_ChildStringLists;
+
+public:
+ CResourceVersionInfo();
+ virtual ~CResourceVersionInfo();
+ int SetKeyValue(LANGID lang_id, int codepage, char* AKeyName, char* AValue);
+ void SetFileFlags(int Value);
+ void SetFileVersion(int HighPart, int LowPart);
+ void SetProductVersion(int HighPart, int LowPart);
+ void ExportToStream(GrowBuf &strm, int Index);
+ int GetStringTablesCount();
+ LANGID GetLangID(int Index);
+ int GetCodePage(int Index);
+ char *FindKey(LANGID LangID, int codepage, char *pKeyName);
+};
+
+#endif
+
+#endif // !defined(AFX_RESOURCEVERSIONINFO_H__80439ADA_49DA_4623_8DA9_1663FF356E76__INCLUDED_)
diff --git a/Source/SConscript b/Source/SConscript
index 5215c89..505e438 100755
--- a/Source/SConscript
+++ b/Source/SConscript
@@ -1,93 +1,94 @@
-target = 'makensis'
-
-pch = 'Platform.h'
-
-makensis_files = Split("""
- build.cpp
- clzma.cpp
- crc32.c
- DialogTemplate.cpp
- dirreader.cpp
- fileform.cpp
- growbuf.cpp
- lang.cpp
- lineparse.cpp
- makenssi.cpp
- manifest.cpp
- mmap.cpp
- Plugins.cpp
- ResourceEditor.cpp
- ResourceVersionInfo.cpp
- script.cpp
- ShConstants.cpp
- strlist.cpp
- tokens.cpp
- util.cpp
- winchar.cpp
- writer.cpp
-""")
-
-bzip2_files = Split("""
- bzip2/blocksort.c
- bzip2/bzlib.c
- bzip2/compress.c
- bzip2/huffman.c
-""")
-
-lzma_files = Split("""
- 7zip/7zGuids.cpp
- 7zip/7zip/Common/OutBuffer.cpp
- 7zip/7zip/Common/StreamUtils.cpp
- 7zip/7zip/Compress/LZ/LZInWindow.cpp
- 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
- 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
- 7zip/Common/Alloc.cpp
- 7zip/Common/CRC.cpp
-""")
-
-zlib_files = Split("""
- zlib/deflate.c
- zlib/trees.c
-""")
-
-libs = Split("""
- gdi32
- user32
- pthread
- iconv
-""")
-
-Import('env AddAvailableLibs')
-
-##### Use available libraries
-
-if env['PLATFORM'] == 'win32':
- # XXX will cause problems if makensis is cross compiled
- # on freebsd, libversion.a exists and gives trouble if linked
- libs += ['version']
-
-AddAvailableLibs(env, libs)
-
-##### Defines
-
-env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
-
-##### Set PCH
-
-# XXX doesn't work
-#env['PCH'] = env.PCH(pch)[0]
-#env['PCHSTOP'] = pch
-
-##### LZMA specific defines
-
-lzma_env = env.Clone()
-lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
-lzma_files = lzma_env.Object(lzma_files)
-
-##### Compile makensis
-
-files = makensis_files + bzip2_files + lzma_files + zlib_files
-
-makensis = env.Program(target, files)
-
-Return('makensis')
+target = 'makensis'
+
+pch = 'Platform.h'
+
+makensis_files = Split("""
+ build.cpp
+ clzma.cpp
+ crc32.c
+ DialogTemplate.cpp
+ dirreader.cpp
+ fileform.cpp
+ growbuf.cpp
+ icon.cpp
+ lang.cpp
+ lineparse.cpp
+ makenssi.cpp
+ manifest.cpp
+ mmap.cpp
+ Plugins.cpp
+ ResourceEditor.cpp
+ ResourceVersionInfo.cpp
+ script.cpp
+ ShConstants.cpp
+ strlist.cpp
+ tokens.cpp
+ util.cpp
+ winchar.cpp
+ writer.cpp
+""")
+
+bzip2_files = Split("""
+ bzip2/blocksort.c
+ bzip2/bzlib.c
+ bzip2/compress.c
+ bzip2/huffman.c
+""")
+
+lzma_files = Split("""
+ 7zip/7zGuids.cpp
+ 7zip/7zip/Common/OutBuffer.cpp
+ 7zip/7zip/Common/StreamUtils.cpp
+ 7zip/7zip/Compress/LZ/LZInWindow.cpp
+ 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
+ 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
+ 7zip/Common/Alloc.cpp
+ 7zip/Common/CRC.cpp
+""")
+
+zlib_files = Split("""
+ zlib/deflate.c
+ zlib/trees.c
+""")
+
+libs = Split("""
+ gdi32
+ user32
+ pthread
+ iconv
+""")
+
+Import('env AddAvailableLibs')
+
+##### Use available libraries
+
+if env['PLATFORM'] == 'win32':
+ # XXX will cause problems if makensis is cross compiled
+ # on freebsd, libversion.a exists and gives trouble if linked
+ libs += ['version']
+
+AddAvailableLibs(env, libs)
+
+##### Defines
+
+env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
+
+##### Set PCH
+
+# XXX doesn't work
+#env['PCH'] = env.PCH(pch)[0]
+#env['PCHSTOP'] = pch
+
+##### LZMA specific defines
+
+lzma_env = env.Clone()
+lzma_env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
+lzma_files = lzma_env.Object(lzma_files)
+
+##### Compile makensis
+
+files = makensis_files + bzip2_files + lzma_files + zlib_files
+
+makensis = env.Program(target, files)
+
+Return('makensis')
diff --git a/Source/ShConstants.cpp b/Source/ShConstants.cpp
index 66f2a27..b3aa0fd 100755
--- a/Source/ShConstants.cpp
+++ b/Source/ShConstants.cpp
@@ -1,85 +1,85 @@
-/*
- * ShConstants.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "ShConstants.h"
-
-ConstantsStringList::ConstantsStringList()
-{
- index = 0;
-}
-
-int ConstantsStringList::add(const char *name, int value1, int value2)
-{
- int pos=SortedStringListND<struct constantstring>::add(name);
- if (pos == -1) return -1;
-
- ((struct constantstring*)gr.get())[pos].index = index;
- ((struct constantstring*)gr.get())[pos].pos = pos;
- ((struct constantstring*)gr.get())[pos].value1 = value1;
- ((struct constantstring*)gr.get())[pos].value2 = value2;
-
- int temp = index;
- index++;
-
- return temp;
-}
-
-int ConstantsStringList::get(char *name, int n_chars /*= -1*/)
-{
- int v=SortedStringListND<struct constantstring>::find(name, n_chars);
- if (v==-1) return -1;
- return (((struct constantstring*)gr.get())[v].index);
-}
-
-int ConstantsStringList::getnum()
-{
- return index;
-}
-
-int ConstantsStringList::get_value1(int idx)
-{
- int pos=get_internal_idx(idx);
- if (pos==-1) return -1;
- return (((struct constantstring*)gr.get())[pos].value1);
-}
-
-int ConstantsStringList::get_value2(int idx)
-{
- int pos=get_internal_idx(idx);
- if (pos==-1) return -1;
- return (((struct constantstring*)gr.get())[pos].value2);
-}
-
-char* ConstantsStringList::idx2name(int idx)
-{
- int pos=get_internal_idx(idx);
- if (pos==-1) return NULL;
- struct constantstring *data=(struct constantstring *)gr.get();
- return ((char*)strings.get() + data[pos].name);
-}
-
-int ConstantsStringList::get_internal_idx(int idx)
-{
- struct constantstring *data=(struct constantstring *)gr.get();
- for (int i = 0; i < index; i++)
- {
- if (data[i].index == idx)
- {
- return i;
- }
- }
- return -1;
-}
+/*
+ * ShConstants.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "ShConstants.h"
+
+ConstantsStringList::ConstantsStringList()
+{
+ index = 0;
+}
+
+int ConstantsStringList::add(const char *name, int value1, int value2)
+{
+ int pos=SortedStringListND<struct constantstring>::add(name);
+ if (pos == -1) return -1;
+
+ ((struct constantstring*)gr.get())[pos].index = index;
+ ((struct constantstring*)gr.get())[pos].pos = pos;
+ ((struct constantstring*)gr.get())[pos].value1 = value1;
+ ((struct constantstring*)gr.get())[pos].value2 = value2;
+
+ int temp = index;
+ index++;
+
+ return temp;
+}
+
+int ConstantsStringList::get(char *name, int n_chars /*= -1*/)
+{
+ int v=SortedStringListND<struct constantstring>::find(name, n_chars);
+ if (v==-1) return -1;
+ return (((struct constantstring*)gr.get())[v].index);
+}
+
+int ConstantsStringList::getnum()
+{
+ return index;
+}
+
+int ConstantsStringList::get_value1(int idx)
+{
+ int pos=get_internal_idx(idx);
+ if (pos==-1) return -1;
+ return (((struct constantstring*)gr.get())[pos].value1);
+}
+
+int ConstantsStringList::get_value2(int idx)
+{
+ int pos=get_internal_idx(idx);
+ if (pos==-1) return -1;
+ return (((struct constantstring*)gr.get())[pos].value2);
+}
+
+char* ConstantsStringList::idx2name(int idx)
+{
+ int pos=get_internal_idx(idx);
+ if (pos==-1) return NULL;
+ struct constantstring *data=(struct constantstring *)gr.get();
+ return ((char*)strings.get() + data[pos].name);
+}
+
+int ConstantsStringList::get_internal_idx(int idx)
+{
+ struct constantstring *data=(struct constantstring *)gr.get();
+ for (int i = 0; i < index; i++)
+ {
+ if (data[i].index == idx)
+ {
+ return i;
+ }
+ }
+ return -1;
+}
diff --git a/Source/ShConstants.h b/Source/ShConstants.h
index 9875b51..2b2f2f3 100755
--- a/Source/ShConstants.h
+++ b/Source/ShConstants.h
@@ -1,47 +1,47 @@
-/*
- * ShConstants.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 2003 Ramon
- *
- * 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 ___CONSTANTS___H_____
-#define ___CONSTANTS___H_____
-
-#include "strlist.h"
-
-struct constantstring {
- int name;
- int index;
- int pos;
- int value1;
- int value2;
-};
-
-class ConstantsStringList : public SortedStringListND<struct constantstring>
-{
- public:
- ConstantsStringList();
-
- int add(const char *name, int value1, int value2);
- int get(char *name, int n_chars = -1);
- int getnum();
- int get_value1(int idx);
- int get_value2(int idx);
- char *idx2name(int idx);
-
- private:
- int index;
- int get_internal_idx(int idx);
-};
-
-#endif
+/*
+ * ShConstants.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 2003 Ramon
+ *
+ * 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 ___CONSTANTS___H_____
+#define ___CONSTANTS___H_____
+
+#include "strlist.h"
+
+struct constantstring {
+ int name;
+ int index;
+ int pos;
+ int value1;
+ int value2;
+};
+
+class ConstantsStringList : public SortedStringListND<struct constantstring>
+{
+ public:
+ ConstantsStringList();
+
+ int add(const char *name, int value1, int value2);
+ int get(char *name, int n_chars = -1);
+ int getnum();
+ int get_value1(int idx);
+ int get_value2(int idx);
+ char *idx2name(int idx);
+
+ private:
+ int index;
+ int get_internal_idx(int idx);
+};
+
+#endif
diff --git a/Source/Tests/DialogTemplate.cpp b/Source/Tests/DialogTemplate.cpp
index 5719943..6a0c1b3 100755
--- a/Source/Tests/DialogTemplate.cpp
+++ b/Source/Tests/DialogTemplate.cpp
@@ -1,47 +1,47 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../DialogTemplate.h"
-
-#include <stdlib.h>
-
-class CDialogTemplateTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( CDialogTemplateTest );
- CPPUNIT_TEST( testCorrectness );
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void testCorrectness() {
- unsigned char original_dialog[184] = {
- 1, 0, 255, 255, 0, 0, 0, 0, 0, 0,
- 0, 0, 72, 4, 0, 64, 3, 0, 0, 0, 0,
- 0, 10, 1, 130, 0, 0, 0, 0, 0, 0, 0,
- 8, 0, 0, 0, 0, 1, 77, 0, 83, 0, 32,
- 0, 83, 0, 104, 0, 101, 0, 108, 0, 108, 0,
- 32, 0, 68, 0, 108, 0, 103, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 80,
- 0, 0, 0, 0, 22, 0, 20, 0, 7, 4, 0,
- 0, 255, 255, 130, 0, 255, 255, 103, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2, 80, 25, 0, 0, 0, 241, 0, 23, 0,
- 238, 3, 0, 0, 255, 255, 130, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8,
- 161, 80, 0, 0, 24, 0, 10, 1, 105, 0, 232,
- 3, 0, 0, 82, 0, 105, 0, 99, 0, 104, 0,
- 69, 0, 100, 0, 105, 0, 116, 0, 50, 0, 48,
- 0, 65, 0, 0, 0, 0, 0, 0, 0
- };
-
- CDialogTemplate dt(original_dialog, 1252);
-
- DWORD dwSize;
- unsigned char *saved_dialog = dt.Save(dwSize);
-
- CPPUNIT_ASSERT_EQUAL( (DWORD) sizeof(original_dialog), dwSize );
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(saved_dialog, original_dialog, dwSize) );
-
- delete [] saved_dialog;
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( CDialogTemplateTest );
+#include <cppunit/extensions/HelperMacros.h>
+#include "../DialogTemplate.h"
+
+#include <stdlib.h>
+
+class CDialogTemplateTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( CDialogTemplateTest );
+ CPPUNIT_TEST( testCorrectness );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void testCorrectness() {
+ unsigned char original_dialog[184] = {
+ 1, 0, 255, 255, 0, 0, 0, 0, 0, 0,
+ 0, 0, 72, 4, 0, 64, 3, 0, 0, 0, 0,
+ 0, 10, 1, 130, 0, 0, 0, 0, 0, 0, 0,
+ 8, 0, 0, 0, 0, 1, 77, 0, 83, 0, 32,
+ 0, 83, 0, 104, 0, 101, 0, 108, 0, 108, 0,
+ 32, 0, 68, 0, 108, 0, 103, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 80,
+ 0, 0, 0, 0, 22, 0, 20, 0, 7, 4, 0,
+ 0, 255, 255, 130, 0, 255, 255, 103, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2, 80, 25, 0, 0, 0, 241, 0, 23, 0,
+ 238, 3, 0, 0, 255, 255, 130, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8,
+ 161, 80, 0, 0, 24, 0, 10, 1, 105, 0, 232,
+ 3, 0, 0, 82, 0, 105, 0, 99, 0, 104, 0,
+ 69, 0, 100, 0, 105, 0, 116, 0, 50, 0, 48,
+ 0, 65, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ CDialogTemplate dt(original_dialog, 1252);
+
+ DWORD dwSize;
+ unsigned char *saved_dialog = dt.Save(dwSize);
+
+ CPPUNIT_ASSERT_EQUAL( (DWORD) sizeof(original_dialog), dwSize );
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(saved_dialog, original_dialog, dwSize) );
+
+ delete [] saved_dialog;
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( CDialogTemplateTest );
diff --git a/Source/Tests/ResourceEditor.cpp b/Source/Tests/ResourceEditor.cpp
index 179f8b9..8bf5739 100755
--- a/Source/Tests/ResourceEditor.cpp
+++ b/Source/Tests/ResourceEditor.cpp
@@ -1,832 +1,832 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../ResourceEditor.h"
-
-#include <stdlib.h>
-
-class CResourceEditorTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( CResourceEditorTest );
- CPPUNIT_TEST( testCorrectness );
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void testCorrectness() {
- extern unsigned char original_pe[8704];
-
- CResourceEditor re(original_pe, sizeof(original_pe));
-
- DWORD size;
-
- // get size
- size = re.Save(NULL, size);
- unsigned char *saved_pe = new unsigned char[size];
-
- // save
- int rc = re.Save(saved_pe, size);
- CPPUNIT_ASSERT_EQUAL( rc, 0 );
-
- // compare
- CPPUNIT_ASSERT_EQUAL( (DWORD) sizeof(original_pe), size );
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(saved_pe, original_pe, size) );
-
- delete [] saved_pe;
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( CResourceEditorTest );
-
-unsigned char original_pe[8704] = {
- 77, 90, 144, 0, 3, 0, 0, 0, 4, 0,
- 0, 0, 255, 255, 0, 0, 184, 0, 0, 0, 0,
- 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 14,
- 31, 186, 14, 0, 180, 9, 205, 33, 184, 1, 76,
- 205, 33, 84, 104, 105, 115, 32, 112, 114, 111, 103,
- 114, 97, 109, 32, 99, 97, 110, 110, 111, 116, 32,
- 98, 101, 32, 114, 117, 110, 32, 105, 110, 32, 68,
- 79, 83, 32, 109, 111, 100, 101, 46, 13, 13, 10,
- 36, 0, 0, 0, 0, 0, 0, 0, 252, 249, 48,
- 199, 184, 152, 94, 148, 184, 152, 94, 148, 184, 152,
- 94, 148, 184, 152, 95, 148, 168, 152, 94, 148, 59,
- 144, 3, 148, 189, 152, 94, 148, 236, 187, 111, 148,
- 185, 152, 94, 148, 127, 158, 88, 148, 185, 152, 94,
- 148, 82, 105, 99, 104, 184, 152, 94, 148, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 80, 69, 0, 0, 76, 1, 4, 0,
- 86, 34, 23, 68, 0, 0, 0, 0, 0, 0, 0,
- 0, 224, 0, 15, 1, 11, 1, 6, 0, 0, 4,
- 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 126,
- 18, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0,
- 0, 0, 64, 0, 0, 16, 0, 0, 0, 2, 0,
- 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0,
- 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0,
- 4, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
- 0, 0, 16, 0, 0, 16, 0, 0, 0, 0, 16,
- 0, 0, 16, 0, 0, 0, 0, 0, 0, 16, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
- 32, 0, 0, 60, 0, 0, 0, 0, 80, 0, 0,
- 168, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 32, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 116,
- 101, 120, 116, 0, 0, 0, 160, 2, 0, 0, 0,
- 16, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 32, 0, 0, 96, 46, 114, 100, 97, 116, 97,
- 0, 0, 240, 1, 0, 0, 0, 32, 0, 0, 0,
- 2, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0,
- 64, 46, 100, 97, 116, 97, 0, 0, 0, 100, 18,
- 0, 0, 0, 48, 0, 0, 0, 20, 0, 0, 0,
- 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 64, 0, 0, 192, 46, 114, 115,
- 114, 99, 0, 0, 0, 168, 3, 0, 0, 0, 80,
- 0, 0, 0, 4, 0, 0, 0, 30, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 139, 68, 36, 8, 129, 236, 12, 2, 0,
- 0, 45, 16, 1, 0, 0, 83, 85, 86, 87, 15,
- 132, 234, 1, 0, 0, 72, 15, 133, 79, 2, 0,
- 0, 139, 132, 36, 40, 2, 0, 0, 102, 61, 2,
- 0, 117, 28, 51, 219, 83, 255, 180, 36, 36, 2,
- 0, 0, 255, 21, 60, 32, 64, 0, 83, 255, 21,
- 56, 32, 64, 0, 233, 38, 2, 0, 0, 139, 200,
- 193, 233, 16, 102, 131, 249, 1, 15, 133, 178, 0,
- 0, 0, 51, 219, 190, 71, 1, 0, 0, 83, 83,
- 189, 234, 3, 0, 0, 86, 85, 255, 180, 36, 48,
- 2, 0, 0, 255, 21, 52, 32, 64, 0, 131, 248,
- 255, 15, 132, 241, 1, 0, 0, 83, 83, 191, 233,
- 3, 0, 0, 86, 87, 255, 180, 36, 48, 2, 0,
- 0, 255, 21, 52, 32, 64, 0, 131, 248, 255, 15,
- 132, 210, 1, 0, 0, 83, 83, 86, 87, 255, 180,
- 36, 48, 2, 0, 0, 139, 61, 52, 32, 64, 0,
- 255, 215, 15, 183, 4, 197, 104, 50, 64, 0, 83,
- 83, 86, 85, 255, 180, 36, 48, 2, 0, 0, 193,
- 224, 10, 137, 68, 36, 36, 255, 215, 15, 183, 4,
- 197, 0, 48, 64, 0, 139, 76, 36, 16, 11, 200,
- 141, 68, 36, 28, 81, 104, 84, 66, 64, 0, 80,
- 255, 21, 48, 32, 64, 0, 131, 196, 12, 141, 68,
- 36, 28, 80, 104, 235, 3, 0, 0, 255, 180, 36,
- 40, 2, 0, 0, 255, 21, 44, 32, 64, 0, 233,
- 101, 1, 0, 0, 102, 61, 1, 0, 15, 133, 91,
- 1, 0, 0, 51, 219, 190, 71, 1, 0, 0, 83,
- 83, 189, 234, 3, 0, 0, 86, 85, 255, 180, 36,
- 48, 2, 0, 0, 255, 21, 52, 32, 64, 0, 131,
- 248, 255, 15, 132, 53, 1, 0, 0, 83, 83, 191,
- 233, 3, 0, 0, 86, 87, 255, 180, 36, 48, 2,
- 0, 0, 255, 21, 52, 32, 64, 0, 131, 248, 255,
- 15, 132, 22, 1, 0, 0, 106, 16, 106, 2, 255,
- 21, 4, 32, 64, 0, 59, 195, 137, 68, 36, 16,
- 15, 132, 0, 1, 0, 0, 80, 255, 21, 0, 32,
- 64, 0, 83, 83, 86, 87, 255, 180, 36, 48, 2,
- 0, 0, 139, 61, 52, 32, 64, 0, 137, 68, 36,
- 44, 255, 215, 15, 183, 4, 197, 104, 50, 64, 0,
- 83, 83, 86, 85, 255, 180, 36, 48, 2, 0, 0,
- 193, 224, 10, 137, 68, 36, 40, 255, 215, 15, 183,
- 4, 197, 0, 48, 64, 0, 139, 76, 36, 20, 11,
- 200, 81, 104, 80, 66, 64, 0, 255, 116, 36, 32,
- 255, 21, 48, 32, 64, 0, 131, 196, 12, 255, 116,
- 36, 16, 255, 21, 16, 32, 64, 0, 255, 180, 36,
- 32, 2, 0, 0, 255, 21, 40, 32, 64, 0, 133,
- 192, 15, 132, 134, 0, 0, 0, 255, 21, 36, 32,
- 64, 0, 255, 116, 36, 16, 106, 1, 255, 21, 32,
- 32, 64, 0, 255, 21, 28, 32, 64, 0, 235, 108,
- 51, 219, 83, 83, 104, 128, 0, 0, 0, 255, 180,
- 36, 44, 2, 0, 0, 255, 21, 24, 32, 64, 0,
- 139, 53, 52, 32, 64, 0, 51, 255, 189, 234, 3,
- 0, 0, 255, 183, 4, 48, 64, 0, 83, 104, 67,
- 1, 0, 0, 85, 255, 180, 36, 48, 2, 0, 0,
- 255, 214, 131, 199, 8, 129, 255, 104, 2, 0, 0,
- 114, 223, 51, 237, 191, 233, 3, 0, 0, 255, 181,
- 108, 50, 64, 0, 83, 104, 67, 1, 0, 0, 87,
- 255, 180, 36, 48, 2, 0, 0, 255, 214, 131, 197,
- 8, 129, 253, 224, 2, 0, 0, 114, 223, 95, 94,
- 93, 51, 192, 91, 129, 196, 12, 2, 0, 0, 194,
- 16, 0, 106, 0, 104, 0, 16, 64, 0, 106, 0,
- 106, 101, 106, 0, 255, 21, 12, 32, 64, 0, 80,
- 255, 21, 64, 32, 64, 0, 106, 0, 255, 21, 8,
- 32, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 220, 32, 0, 0, 234, 32, 0, 0,
- 248, 32, 0, 0, 6, 33, 0, 0, 204, 32, 0,
- 0, 0, 0, 0, 0, 40, 33, 0, 0, 56, 33,
- 0, 0, 74, 33, 0, 0, 94, 33, 0, 0, 112,
- 33, 0, 0, 128, 33, 0, 0, 146, 33, 0, 0,
- 158, 33, 0, 0, 180, 33, 0, 0, 198, 33, 0,
- 0, 210, 33, 0, 0, 0, 0, 0, 0, 132, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
- 33, 0, 0, 0, 32, 0, 0, 156, 32, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 228, 33, 0,
- 0, 24, 32, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 220, 32, 0, 0, 234, 32, 0, 0,
- 248, 32, 0, 0, 6, 33, 0, 0, 204, 32, 0,
- 0, 0, 0, 0, 0, 40, 33, 0, 0, 56, 33,
- 0, 0, 74, 33, 0, 0, 94, 33, 0, 0, 112,
- 33, 0, 0, 128, 33, 0, 0, 146, 33, 0, 0,
- 158, 33, 0, 0, 180, 33, 0, 0, 198, 33, 0,
- 0, 210, 33, 0, 0, 0, 0, 0, 0, 0, 2,
- 71, 108, 111, 98, 97, 108, 85, 110, 108, 111, 99,
- 107, 0, 0, 249, 1, 71, 108, 111, 98, 97, 108,
- 76, 111, 99, 107, 0, 0, 238, 1, 71, 108, 111,
- 98, 97, 108, 65, 108, 108, 111, 99, 0, 175, 0,
- 69, 120, 105, 116, 80, 114, 111, 99, 101, 115, 115,
- 0, 119, 1, 71, 101, 116, 77, 111, 100, 117, 108,
- 101, 72, 97, 110, 100, 108, 101, 65, 0, 0, 75,
- 69, 82, 78, 69, 76, 51, 50, 46, 100, 108, 108,
- 0, 0, 58, 2, 83, 101, 110, 100, 77, 101, 115,
- 115, 97, 103, 101, 65, 0, 0, 66, 0, 67, 108,
- 111, 115, 101, 67, 108, 105, 112, 98, 111, 97, 114,
- 100, 0, 0, 73, 2, 83, 101, 116, 67, 108, 105,
- 112, 98, 111, 97, 114, 100, 68, 97, 116, 97, 0,
- 0, 193, 0, 69, 109, 112, 116, 121, 67, 108, 105,
- 112, 98, 111, 97, 114, 100, 0, 0, 245, 1, 79,
- 112, 101, 110, 67, 108, 105, 112, 98, 111, 97, 114,
- 100, 0, 82, 2, 83, 101, 116, 68, 108, 103, 73,
- 116, 101, 109, 84, 101, 120, 116, 65, 0, 213, 2,
- 119, 115, 112, 114, 105, 110, 116, 102, 65, 0, 53,
- 2, 83, 101, 110, 100, 68, 108, 103, 73, 116, 101,
- 109, 77, 101, 115, 115, 97, 103, 101, 65, 0, 3,
- 2, 80, 111, 115, 116, 81, 117, 105, 116, 77, 101,
- 115, 115, 97, 103, 101, 0, 198, 0, 69, 110, 100,
- 68, 105, 97, 108, 111, 103, 0, 158, 0, 68, 105,
- 97, 108, 111, 103, 66, 111, 120, 80, 97, 114, 97,
- 109, 65, 0, 85, 83, 69, 82, 51, 50, 46, 100,
- 108, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 64, 66, 64, 0, 127, 0, 0, 0, 48,
- 66, 64, 0, 54, 0, 0, 0, 32, 66, 64, 0,
- 28, 0, 0, 0, 16, 66, 64, 0, 1, 0, 0,
- 0, 4, 66, 64, 0, 43, 0, 0, 0, 244, 65,
- 64, 0, 77, 0, 0, 0, 228, 65, 64, 0, 44,
- 0, 0, 0, 216, 65, 64, 0, 45, 0, 0, 0,
- 204, 65, 64, 0, 35, 0, 0, 0, 188, 65, 64,
- 0, 69, 0, 0, 0, 172, 65, 64, 0, 2, 0,
- 0, 0, 156, 65, 64, 0, 3, 0, 0, 0, 140,
- 65, 64, 0, 4, 0, 0, 0, 124, 65, 64, 0,
- 26, 0, 0, 0, 108, 65, 64, 0, 5, 0, 0,
- 0, 96, 65, 64, 0, 6, 0, 0, 0, 84, 65,
- 64, 0, 101, 0, 0, 0, 72, 65, 64, 0, 19,
- 0, 0, 0, 60, 65, 64, 0, 9, 0, 0, 0,
- 44, 65, 64, 0, 37, 0, 0, 0, 28, 65, 64,
- 0, 56, 0, 0, 0, 12, 65, 64, 0, 41, 0,
- 0, 0, 0, 65, 64, 0, 11, 0, 0, 0, 240,
- 64, 64, 0, 12, 0, 0, 0, 228, 64, 64, 0,
- 86, 0, 0, 0, 212, 64, 64, 0, 55, 0, 0,
- 0, 196, 64, 64, 0, 7, 0, 0, 0, 184, 64,
- 64, 0, 8, 0, 0, 0, 172, 64, 64, 0, 71,
- 0, 0, 0, 156, 64, 64, 0, 13, 0, 0, 0,
- 144, 64, 64, 0, 57, 0, 0, 0, 132, 64, 64,
- 0, 14, 0, 0, 0, 116, 64, 64, 0, 15, 0,
- 0, 0, 100, 64, 64, 0, 33, 0, 0, 0, 84,
- 64, 64, 0, 16, 0, 0, 0, 68, 64, 64, 0,
- 17, 0, 0, 0, 52, 64, 64, 0, 75, 0, 0,
- 0, 36, 64, 64, 0, 96, 0, 0, 0, 20, 64,
- 64, 0, 63, 0, 0, 0, 8, 64, 64, 0, 87,
- 0, 0, 0, 248, 63, 64, 0, 18, 0, 0, 0,
- 236, 63, 64, 0, 64, 0, 0, 0, 224, 63, 64,
- 0, 38, 0, 0, 0, 208, 63, 64, 0, 39, 0,
- 0, 0, 192, 63, 64, 0, 47, 0, 0, 0, 176,
- 63, 64, 0, 62, 0, 0, 0, 164, 63, 64, 0,
- 76, 0, 0, 0, 148, 63, 64, 0, 88, 0, 0,
- 0, 132, 63, 64, 0, 78, 0, 0, 0, 116, 63,
- 64, 0, 80, 0, 0, 0, 100, 63, 64, 0, 97,
- 0, 0, 0, 88, 63, 64, 0, 20, 0, 0, 0,
- 72, 63, 64, 0, 72, 0, 0, 0, 60, 63, 64,
- 0, 21, 0, 0, 0, 48, 63, 64, 0, 22, 0,
- 0, 0, 32, 63, 64, 0, 70, 0, 0, 0, 16,
- 63, 64, 0, 24, 0, 0, 0, 0, 63, 64, 0,
- 25, 0, 0, 0, 240, 62, 64, 0, 79, 0, 0,
- 0, 224, 62, 64, 0, 26, 0, 0, 0, 208, 62,
- 64, 0, 89, 0, 0, 0, 196, 62, 64, 0, 27,
- 0, 0, 0, 184, 62, 64, 0, 36, 0, 0, 0,
- 168, 62, 64, 0, 10, 0, 0, 0, 152, 62, 64,
- 0, 65, 0, 0, 0, 136, 62, 64, 0, 29, 0,
- 0, 0, 120, 62, 64, 0, 90, 0, 0, 0, 108,
- 62, 64, 0, 73, 0, 0, 0, 96, 62, 64, 0,
- 68, 0, 0, 0, 84, 62, 64, 0, 74, 0, 0,
- 0, 72, 62, 64, 0, 30, 0, 0, 0, 60, 62,
- 64, 0, 31, 0, 0, 0, 44, 62, 64, 0, 34,
- 0, 0, 0, 28, 62, 64, 0, 32, 0, 0, 0,
- 16, 62, 64, 0, 67, 0, 0, 0, 4, 62, 64,
- 0, 42, 0, 0, 0, 244, 61, 64, 0, 0, 0,
- 0, 0, 228, 61, 64, 0, 1, 0, 0, 0, 212,
- 61, 64, 0, 2, 0, 0, 0, 192, 61, 64, 0,
- 1, 0, 0, 0, 164, 61, 64, 0, 2, 0, 0,
- 0, 144, 61, 64, 0, 3, 0, 0, 0, 120, 61,
- 64, 0, 4, 0, 0, 0, 96, 61, 64, 0, 5,
- 0, 0, 0, 72, 61, 64, 0, 6, 0, 0, 0,
- 48, 61, 64, 0, 7, 0, 0, 0, 24, 61, 64,
- 0, 8, 0, 0, 0, 4, 61, 64, 0, 9, 0,
- 0, 0, 236, 60, 64, 0, 10, 0, 0, 0, 212,
- 60, 64, 0, 11, 0, 0, 0, 188, 60, 64, 0,
- 12, 0, 0, 0, 164, 60, 64, 0, 13, 0, 0,
- 0, 140, 60, 64, 0, 14, 0, 0, 0, 120, 60,
- 64, 0, 15, 0, 0, 0, 96, 60, 64, 0, 16,
- 0, 0, 0, 72, 60, 64, 0, 1, 0, 0, 0,
- 52, 60, 64, 0, 2, 0, 0, 0, 28, 60, 64,
- 0, 1, 0, 0, 0, 0, 60, 64, 0, 2, 0,
- 0, 0, 228, 59, 64, 0, 3, 0, 0, 0, 200,
- 59, 64, 0, 4, 0, 0, 0, 172, 59, 64, 0,
- 5, 0, 0, 0, 148, 59, 64, 0, 1, 0, 0,
- 0, 132, 59, 64, 0, 2, 0, 0, 0, 108, 59,
- 64, 0, 1, 0, 0, 0, 88, 59, 64, 0, 2,
- 0, 0, 0, 68, 59, 64, 0, 3, 0, 0, 0,
- 48, 59, 64, 0, 4, 0, 0, 0, 28, 59, 64,
- 0, 5, 0, 0, 0, 8, 59, 64, 0, 6, 0,
- 0, 0, 240, 58, 64, 0, 7, 0, 0, 0, 208,
- 58, 64, 0, 8, 0, 0, 0, 184, 58, 64, 0,
- 9, 0, 0, 0, 156, 58, 64, 0, 10, 0, 0,
- 0, 132, 58, 64, 0, 11, 0, 0, 0, 104, 58,
- 64, 0, 12, 0, 0, 0, 76, 58, 64, 0, 13,
- 0, 0, 0, 48, 58, 64, 0, 1, 0, 0, 0,
- 32, 58, 64, 0, 2, 0, 0, 0, 8, 58, 64,
- 0, 3, 0, 0, 0, 240, 57, 64, 0, 4, 0,
- 0, 0, 216, 57, 64, 0, 5, 0, 0, 0, 188,
- 57, 64, 0, 6, 0, 0, 0, 164, 57, 64, 0,
- 1, 0, 0, 0, 148, 57, 64, 0, 2, 0, 0,
- 0, 124, 57, 64, 0, 3, 0, 0, 0, 100, 57,
- 64, 0, 4, 0, 0, 0, 72, 57, 64, 0, 5,
- 0, 0, 0, 40, 57, 64, 0, 1, 0, 0, 0,
- 24, 57, 64, 0, 2, 0, 0, 0, 0, 57, 64,
- 0, 2, 0, 0, 0, 232, 56, 64, 0, 1, 0,
- 0, 0, 216, 56, 64, 0, 1, 0, 0, 0, 196,
- 56, 64, 0, 1, 0, 0, 0, 172, 56, 64, 0,
- 2, 0, 0, 0, 140, 56, 64, 0, 2, 0, 0,
- 0, 116, 56, 64, 0, 1, 0, 0, 0, 88, 56,
- 64, 0, 2, 0, 0, 0, 60, 56, 64, 0, 2,
- 0, 0, 0, 40, 56, 64, 0, 1, 0, 0, 0,
- 8, 56, 64, 0, 2, 0, 0, 0, 240, 55, 64,
- 0, 3, 0, 0, 0, 212, 55, 64, 0, 1, 0,
- 0, 0, 196, 55, 64, 0, 2, 0, 0, 0, 172,
- 55, 64, 0, 3, 0, 0, 0, 148, 55, 64, 0,
- 4, 0, 0, 0, 120, 55, 64, 0, 5, 0, 0,
- 0, 92, 55, 64, 0, 6, 0, 0, 0, 68, 55,
- 64, 0, 7, 0, 0, 0, 32, 55, 64, 0, 8,
- 0, 0, 0, 4, 55, 64, 0, 9, 0, 0, 0,
- 232, 54, 64, 0, 10, 0, 0, 0, 208, 54, 64,
- 0, 11, 0, 0, 0, 180, 54, 64, 0, 12, 0,
- 0, 0, 156, 54, 64, 0, 13, 0, 0, 0, 132,
- 54, 64, 0, 14, 0, 0, 0, 108, 54, 64, 0,
- 15, 0, 0, 0, 80, 54, 64, 0, 16, 0, 0,
- 0, 56, 54, 64, 0, 17, 0, 0, 0, 28, 54,
- 64, 0, 18, 0, 0, 0, 0, 54, 64, 0, 19,
- 0, 0, 0, 228, 53, 64, 0, 20, 0, 0, 0,
- 200, 53, 64, 0, 1, 0, 0, 0, 184, 53, 64,
- 0, 2, 0, 0, 0, 160, 53, 64, 0, 1, 0,
- 0, 0, 136, 53, 64, 0, 2, 0, 0, 0, 116,
- 53, 64, 0, 1, 0, 0, 0, 96, 53, 64, 0,
- 2, 0, 0, 0, 72, 53, 64, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 85, 90, 66, 69, 75, 95,
- 67, 89, 82, 73, 76, 76, 73, 67, 0, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 85, 90, 66, 69,
- 75, 95, 76, 65, 84, 73, 78, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 85, 82, 68, 85, 95, 73,
- 78, 68, 73, 65, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 85, 82, 68, 85, 95, 80, 65, 75,
- 73, 83, 84, 65, 78, 0, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 83, 87, 69, 68, 73, 83,
- 72, 95, 70, 73, 78, 76, 65, 78, 68, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 83, 87, 69, 68,
- 73, 83, 72, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 83, 80, 65, 78, 73, 83, 72, 95, 80, 85,
- 69, 82, 84, 79, 95, 82, 73, 67, 79, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 83, 80, 65, 78,
- 73, 83, 72, 95, 78, 73, 67, 65, 82, 65, 71,
- 85, 65, 0, 0, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 83, 80, 65, 78, 73, 83, 72, 95, 72,
- 79, 78, 68, 85, 82, 65, 83, 0, 0, 0, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 83, 80, 65,
- 78, 73, 83, 72, 95, 69, 76, 95, 83, 65, 76,
- 86, 65, 68, 79, 82, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 83, 80, 65, 78, 73, 83, 72, 95,
- 66, 79, 76, 73, 86, 73, 65, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 83, 80, 65, 78, 73, 83,
- 72, 95, 80, 65, 82, 65, 71, 85, 65, 89, 0,
- 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 83, 80, 65, 78, 73, 83, 72, 95, 85, 82, 85,
- 71, 85, 65, 89, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 83, 80, 65, 78, 73, 83, 72, 95, 67,
- 72, 73, 76, 69, 0, 0, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 83, 80, 65, 78, 73, 83, 72,
- 95, 69, 67, 85, 65, 68, 79, 82, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 83, 80, 65, 78, 73,
- 83, 72, 95, 65, 82, 71, 69, 78, 84, 73, 78,
- 65, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 83, 80, 65, 78, 73, 83, 72, 95, 80, 69,
- 82, 85, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 83, 80, 65, 78, 73, 83, 72, 95,
- 67, 79, 76, 79, 77, 66, 73, 65, 0, 0, 0,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 83, 80,
- 65, 78, 73, 83, 72, 95, 86, 69, 78, 69, 90,
- 85, 69, 76, 65, 0, 0, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 83, 80, 65, 78, 73, 83, 72,
- 95, 68, 79, 77, 73, 78, 73, 67, 65, 78, 95,
- 82, 69, 80, 85, 66, 76, 73, 67, 0, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 83, 80, 65, 78,
- 73, 83, 72, 95, 80, 65, 78, 65, 77, 65, 0,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 83, 80,
- 65, 78, 73, 83, 72, 95, 67, 79, 83, 84, 65,
- 95, 82, 73, 67, 65, 0, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 83, 80, 65, 78, 73, 83, 72,
- 95, 71, 85, 65, 84, 69, 77, 65, 76, 65, 0,
- 0, 0, 83, 85, 66, 76, 65, 78, 71, 95, 83,
- 80, 65, 78, 73, 83, 72, 95, 77, 79, 68, 69,
- 82, 78, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 83, 80, 65, 78, 73, 83, 72, 95, 77, 69,
- 88, 73, 67, 65, 78, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 83, 80, 65, 78, 73, 83, 72, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 83, 69, 82,
- 66, 73, 65, 78, 95, 67, 89, 82, 73, 76, 76,
- 73, 67, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 83, 69, 82, 66, 73, 65, 78, 95,
- 76, 65, 84, 73, 78, 0, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 80, 79, 82, 84, 85, 71,
- 85, 69, 83, 69, 95, 66, 82, 65, 90, 73, 76,
- 73, 65, 78, 0, 0, 0, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 80, 79, 82, 84, 85, 71, 85,
- 69, 83, 69, 0, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 78, 79, 82, 87, 69, 71, 73, 65, 78,
- 95, 78, 89, 78, 79, 82, 83, 75, 0, 0, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 78, 79, 82,
- 87, 69, 71, 73, 65, 78, 95, 66, 79, 75, 77,
- 65, 76, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 78, 69, 80, 65, 76, 73, 95, 73,
- 78, 68, 73, 65, 0, 0, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 77, 65, 76, 65, 89, 95,
- 66, 82, 85, 78, 69, 73, 95, 68, 65, 82, 85,
- 83, 83, 65, 76, 65, 77, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 77, 65, 76, 65, 89, 95, 77,
- 65, 76, 65, 89, 83, 73, 65, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 76, 73, 84, 72, 85,
- 65, 78, 73, 65, 78, 0, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 75, 79, 82, 69, 65, 78, 0,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 75, 65,
- 83, 72, 77, 73, 82, 73, 95, 73, 78, 68, 73,
- 65, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 73, 84, 65, 76, 73, 65, 78, 95, 83, 87, 73,
- 83, 83, 0, 0, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 73, 84, 65, 76, 73, 65, 78, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 71, 69, 82, 77,
- 65, 78, 95, 76, 73, 69, 67, 72, 84, 69, 78,
- 83, 84, 69, 73, 78, 0, 0, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 71, 69, 82, 77, 65,
- 78, 95, 76, 85, 88, 69, 77, 66, 79, 85, 82,
- 71, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 71, 69, 82, 77, 65, 78, 95, 65, 85, 83,
- 84, 82, 73, 65, 78, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 71, 69, 82, 77, 65, 78, 95, 83,
- 87, 73, 83, 83, 0, 0, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 71, 69, 82, 77, 65, 78,
- 0, 0, 83, 85, 66, 76, 65, 78, 71, 95, 70,
- 82, 69, 78, 67, 72, 95, 77, 79, 78, 65, 67,
- 79, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 70, 82, 69, 78, 67, 72, 95, 76, 85, 88,
- 69, 77, 66, 79, 85, 82, 71, 0, 0, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 70, 82, 69, 78,
- 67, 72, 95, 83, 87, 73, 83, 83, 0, 0, 0,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 70, 82,
- 69, 78, 67, 72, 95, 67, 65, 78, 65, 68, 73,
- 65, 78, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 70, 82, 69, 78, 67, 72, 95, 66, 69, 76, 71,
- 73, 65, 78, 0, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 70, 82, 69, 78, 67, 72, 0, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 69, 78, 71, 76,
- 73, 83, 72, 95, 80, 72, 73, 76, 73, 80, 80,
- 73, 78, 69, 83, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 69, 78, 71, 76, 73, 83, 72, 95, 90,
- 73, 77, 66, 65, 66, 87, 69, 0, 0, 0, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 69, 78, 71,
- 76, 73, 83, 72, 95, 84, 82, 73, 78, 73, 68,
- 65, 68, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 69, 78, 71, 76, 73, 83, 72, 95,
- 66, 69, 76, 73, 90, 69, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 69, 78, 71, 76, 73, 83,
- 72, 95, 67, 65, 82, 73, 66, 66, 69, 65, 78,
- 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 69, 78, 71, 76, 73, 83, 72, 95, 74, 65, 77,
- 65, 73, 67, 65, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 69, 78, 71, 76, 73, 83, 72, 95, 83,
- 79, 85, 84, 72, 95, 65, 70, 82, 73, 67, 65,
- 0, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 69, 78, 71, 76, 73, 83, 72, 95, 69, 73,
- 82, 69, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 69, 78, 71, 76, 73, 83, 72, 95,
- 78, 90, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 69, 78, 71, 76, 73, 83, 72, 95, 67, 65,
- 78, 0, 83, 85, 66, 76, 65, 78, 71, 95, 69,
- 78, 71, 76, 73, 83, 72, 95, 65, 85, 83, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 69, 78, 71,
- 76, 73, 83, 72, 95, 85, 75, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 69, 78, 71, 76, 73,
- 83, 72, 95, 85, 83, 0, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 68, 85, 84, 67, 72, 95, 66,
- 69, 76, 71, 73, 65, 78, 0, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 68, 85, 84, 67, 72,
- 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 67, 72, 73, 78, 69, 83, 69, 95, 77, 65, 67,
- 65, 85, 0, 0, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 67, 72, 73, 78, 69, 83, 69, 95, 83,
- 73, 78, 71, 65, 80, 79, 82, 69, 0, 0, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 67, 72, 73,
- 78, 69, 83, 69, 95, 72, 79, 78, 71, 75, 79,
- 78, 71, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 67, 72, 73, 78, 69, 83, 69, 95,
- 83, 73, 77, 80, 76, 73, 70, 73, 69, 68, 0,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 67, 72,
- 73, 78, 69, 83, 69, 95, 84, 82, 65, 68, 73,
- 84, 73, 79, 78, 65, 76, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 65, 90, 69, 82, 73, 95, 67,
- 89, 82, 73, 76, 76, 73, 67, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 65, 90, 69, 82, 73,
- 95, 76, 65, 84, 73, 78, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 65, 82, 65, 66, 73, 67, 95,
- 81, 65, 84, 65, 82, 0, 0, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 65, 82, 65, 66, 73,
- 67, 95, 66, 65, 72, 82, 65, 73, 78, 0, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 65, 82, 65,
- 66, 73, 67, 95, 85, 65, 69, 0, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 65, 82, 65, 66, 73,
- 67, 95, 75, 85, 87, 65, 73, 84, 0, 0, 0,
- 83, 85, 66, 76, 65, 78, 71, 95, 65, 82, 65,
- 66, 73, 67, 95, 76, 69, 66, 65, 78, 79, 78,
- 0, 0, 83, 85, 66, 76, 65, 78, 71, 95, 65,
- 82, 65, 66, 73, 67, 95, 74, 79, 82, 68, 65,
- 78, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
- 95, 65, 82, 65, 66, 73, 67, 95, 83, 89, 82,
- 73, 65, 0, 0, 0, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 65, 82, 65, 66, 73, 67, 95, 89,
- 69, 77, 69, 78, 0, 0, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 65, 82, 65, 66, 73, 67,
- 95, 79, 77, 65, 78, 0, 83, 85, 66, 76, 65,
- 78, 71, 95, 65, 82, 65, 66, 73, 67, 95, 84,
- 85, 78, 73, 83, 73, 65, 0, 0, 83, 85, 66,
- 76, 65, 78, 71, 95, 65, 82, 65, 66, 73, 67,
- 95, 77, 79, 82, 79, 67, 67, 79, 0, 0, 83,
- 85, 66, 76, 65, 78, 71, 95, 65, 82, 65, 66,
- 73, 67, 95, 65, 76, 71, 69, 82, 73, 65, 0,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 65, 82,
- 65, 66, 73, 67, 95, 76, 73, 66, 89, 65, 0,
- 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 65, 82, 65, 66, 73, 67, 95, 69, 71, 89, 80,
- 84, 0, 0, 0, 0, 83, 85, 66, 76, 65, 78,
- 71, 95, 65, 82, 65, 66, 73, 67, 95, 73, 82,
- 65, 81, 0, 83, 85, 66, 76, 65, 78, 71, 95,
- 65, 82, 65, 66, 73, 67, 95, 83, 65, 85, 68,
- 73, 95, 65, 82, 65, 66, 73, 65, 0, 83, 85,
- 66, 76, 65, 78, 71, 95, 83, 89, 83, 95, 68,
- 69, 70, 65, 85, 76, 84, 0, 83, 85, 66, 76,
- 65, 78, 71, 95, 68, 69, 70, 65, 85, 76, 84,
- 0, 83, 85, 66, 76, 65, 78, 71, 95, 78, 69,
- 85, 84, 82, 65, 76, 0, 76, 65, 78, 71, 95,
- 86, 73, 69, 84, 78, 65, 77, 69, 83, 69, 0,
- 76, 65, 78, 71, 95, 85, 90, 66, 69, 75, 0,
- 0, 76, 65, 78, 71, 95, 85, 82, 68, 85, 0,
- 0, 0, 76, 65, 78, 71, 95, 85, 75, 82, 65,
- 73, 78, 73, 65, 78, 0, 0, 76, 65, 78, 71,
- 95, 84, 85, 82, 75, 73, 83, 72, 0, 0, 0,
- 0, 76, 65, 78, 71, 95, 84, 72, 65, 73, 0,
- 0, 0, 76, 65, 78, 71, 95, 84, 69, 76, 85,
- 71, 85, 0, 76, 65, 78, 71, 95, 84, 65, 84,
- 65, 82, 0, 0, 76, 65, 78, 71, 95, 84, 65,
- 77, 73, 76, 0, 0, 76, 65, 78, 71, 95, 83,
- 89, 82, 73, 65, 67, 0, 76, 65, 78, 71, 95,
- 83, 87, 69, 68, 73, 83, 72, 0, 0, 0, 0,
- 76, 65, 78, 71, 95, 83, 87, 65, 72, 73, 76,
- 73, 0, 0, 0, 0, 76, 65, 78, 71, 95, 83,
- 80, 65, 78, 73, 83, 72, 0, 0, 0, 0, 76,
- 65, 78, 71, 95, 83, 76, 79, 86, 69, 78, 73,
- 65, 78, 0, 0, 76, 65, 78, 71, 95, 83, 76,
- 79, 86, 65, 75, 0, 76, 65, 78, 71, 95, 83,
- 73, 78, 68, 72, 73, 0, 76, 65, 78, 71, 95,
- 83, 69, 82, 66, 73, 65, 78, 0, 0, 0, 0,
- 76, 65, 78, 71, 95, 83, 65, 78, 83, 75, 82,
- 73, 84, 0, 0, 0, 76, 65, 78, 71, 95, 82,
- 85, 83, 83, 73, 65, 78, 0, 0, 0, 0, 76,
- 65, 78, 71, 95, 82, 79, 77, 65, 78, 73, 65,
- 78, 0, 0, 0, 76, 65, 78, 71, 95, 80, 85,
- 78, 74, 65, 66, 73, 0, 0, 0, 0, 76, 65,
- 78, 71, 95, 80, 79, 82, 84, 85, 71, 85, 69,
- 83, 69, 0, 76, 65, 78, 71, 95, 80, 79, 76,
- 73, 83, 72, 0, 76, 65, 78, 71, 95, 79, 82,
- 73, 89, 65, 0, 0, 76, 65, 78, 71, 95, 78,
- 79, 82, 87, 69, 71, 73, 65, 78, 0, 0, 76,
- 65, 78, 71, 95, 78, 69, 80, 65, 76, 73, 0,
- 76, 65, 78, 71, 95, 77, 79, 78, 71, 79, 76,
- 73, 65, 78, 0, 0, 76, 65, 78, 71, 95, 77,
- 65, 82, 65, 84, 72, 73, 0, 0, 0, 0, 76,
- 65, 78, 71, 95, 77, 65, 78, 73, 80, 85, 82,
- 73, 0, 0, 0, 76, 65, 78, 71, 95, 77, 65,
- 76, 65, 89, 65, 76, 65, 77, 0, 0, 76, 65,
- 78, 71, 95, 77, 65, 76, 65, 89, 0, 0, 76,
- 65, 78, 71, 95, 77, 65, 67, 69, 68, 79, 78,
- 73, 65, 78, 0, 76, 65, 78, 71, 95, 76, 73,
- 84, 72, 85, 65, 78, 73, 65, 78, 0, 76, 65,
- 78, 71, 95, 76, 65, 84, 86, 73, 65, 78, 0,
- 0, 0, 0, 76, 65, 78, 71, 95, 75, 89, 82,
- 71, 89, 90, 0, 76, 65, 78, 71, 95, 75, 79,
- 82, 69, 65, 78, 0, 76, 65, 78, 71, 95, 75,
- 79, 78, 75, 65, 78, 73, 0, 0, 0, 0, 76,
- 65, 78, 71, 95, 75, 65, 90, 65, 75, 0, 0,
- 76, 65, 78, 71, 95, 75, 65, 83, 72, 77, 73,
- 82, 73, 0, 0, 0, 76, 65, 78, 71, 95, 75,
- 65, 78, 78, 65, 68, 65, 0, 0, 0, 0, 76,
- 65, 78, 71, 95, 74, 65, 80, 65, 78, 69, 83,
- 69, 0, 0, 0, 76, 65, 78, 71, 95, 73, 84,
- 65, 76, 73, 65, 78, 0, 0, 0, 0, 76, 65,
- 78, 71, 95, 73, 78, 68, 79, 78, 69, 83, 73,
- 65, 78, 0, 76, 65, 78, 71, 95, 73, 67, 69,
- 76, 65, 78, 68, 73, 67, 0, 0, 76, 65, 78,
- 71, 95, 72, 85, 78, 71, 65, 82, 73, 65, 78,
- 0, 0, 76, 65, 78, 71, 95, 72, 73, 78, 68,
- 73, 0, 0, 76, 65, 78, 71, 95, 72, 69, 66,
- 82, 69, 87, 0, 76, 65, 78, 71, 95, 71, 85,
- 74, 65, 82, 65, 84, 73, 0, 0, 0, 76, 65,
- 78, 71, 95, 71, 82, 69, 69, 75, 0, 0, 76,
- 65, 78, 71, 95, 71, 69, 82, 77, 65, 78, 0,
- 76, 65, 78, 71, 95, 71, 69, 79, 82, 71, 73,
- 65, 78, 0, 0, 0, 76, 65, 78, 71, 95, 71,
- 65, 76, 73, 67, 73, 65, 78, 0, 0, 0, 76,
- 65, 78, 71, 95, 70, 82, 69, 78, 67, 72, 0,
- 76, 65, 78, 71, 95, 70, 73, 78, 78, 73, 83,
- 72, 0, 0, 0, 0, 76, 65, 78, 71, 95, 70,
- 65, 82, 83, 73, 0, 0, 76, 65, 78, 71, 95,
- 70, 65, 69, 82, 79, 69, 83, 69, 0, 0, 0,
- 76, 65, 78, 71, 95, 69, 83, 84, 79, 78, 73,
- 65, 78, 0, 0, 0, 76, 65, 78, 71, 95, 69,
- 78, 71, 76, 73, 83, 72, 0, 0, 0, 0, 76,
- 65, 78, 71, 95, 68, 85, 84, 67, 72, 0, 0,
- 76, 65, 78, 71, 95, 68, 73, 86, 69, 72, 73,
- 0, 76, 65, 78, 71, 95, 68, 65, 78, 73, 83,
- 72, 0, 76, 65, 78, 71, 95, 67, 90, 69, 67,
- 72, 0, 0, 76, 65, 78, 71, 95, 67, 82, 79,
- 65, 84, 73, 65, 78, 0, 0, 0, 76, 65, 78,
- 71, 95, 67, 72, 73, 78, 69, 83, 69, 0, 0,
- 0, 0, 76, 65, 78, 71, 95, 67, 65, 84, 65,
- 76, 65, 78, 0, 0, 0, 0, 76, 65, 78, 71,
- 95, 66, 85, 76, 71, 65, 82, 73, 65, 78, 0,
- 0, 76, 65, 78, 71, 95, 66, 69, 78, 71, 65,
- 76, 73, 0, 0, 0, 0, 76, 65, 78, 71, 95,
- 66, 69, 76, 65, 82, 85, 83, 73, 65, 78, 0,
- 76, 65, 78, 71, 95, 66, 65, 83, 81, 85, 69,
- 0, 76, 65, 78, 71, 95, 65, 90, 69, 82, 73,
- 0, 0, 76, 65, 78, 71, 95, 65, 83, 83, 65,
- 77, 69, 83, 69, 0, 0, 0, 76, 65, 78, 71,
- 95, 65, 82, 77, 69, 78, 73, 65, 78, 0, 0,
- 0, 76, 65, 78, 71, 95, 65, 82, 65, 66, 73,
- 67, 0, 76, 65, 78, 71, 95, 65, 76, 66, 65,
- 78, 73, 65, 78, 0, 0, 0, 76, 65, 78, 71,
- 95, 65, 70, 82, 73, 75, 65, 65, 78, 83, 0,
- 0, 76, 65, 78, 71, 95, 73, 78, 86, 65, 82,
- 73, 65, 78, 84, 0, 0, 76, 65, 78, 71, 95,
- 78, 69, 85, 84, 82, 65, 76, 0, 0, 0, 0,
- 37, 117, 0, 0, 76, 97, 110, 103, 117, 97, 103,
- 101, 32, 73, 68, 58, 32, 37, 100, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 0, 5, 0, 0,
- 0, 32, 0, 0, 128, 24, 0, 0, 0, 56, 0,
- 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 101, 0, 0, 0,
- 80, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
- 0, 0, 104, 0, 0, 128, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- 9, 4, 0, 0, 128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 0, 9, 4, 0, 0, 144, 0, 0, 0, 160,
- 80, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 136, 81, 0, 0, 25, 2, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 8,
- 200, 128, 0, 0, 0, 0, 5, 0, 0, 0, 0,
- 0, 135, 0, 75, 0, 0, 0, 0, 0, 77, 0,
- 97, 0, 107, 0, 101, 0, 76, 0, 97, 0, 110,
- 0, 103, 0, 73, 0, 68, 0, 0, 0, 8, 0,
- 77, 0, 83, 0, 32, 0, 83, 0, 97, 0, 110,
- 0, 115, 0, 32, 0, 83, 0, 101, 0, 114, 0,
- 105, 0, 102, 0, 0, 0, 0, 0, 3, 0, 33,
- 80, 0, 0, 0, 0, 7, 0, 7, 0, 121, 0,
- 100, 0, 234, 3, 255, 255, 133, 0, 0, 0, 0,
- 0, 0, 0, 3, 0, 33, 80, 0, 0, 0, 0,
- 7, 0, 24, 0, 121, 0, 100, 0, 233, 3, 255,
- 255, 133, 0, 0, 0, 0, 0, 0, 0, 1, 0,
- 1, 80, 0, 0, 0, 0, 78, 0, 54, 0, 50,
- 0, 14, 0, 1, 0, 255, 255, 128, 0, 67, 0,
- 111, 0, 112, 0, 121, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 80, 0, 0, 0, 0, 7, 0,
- 54, 0, 50, 0, 14, 0, 2, 0, 255, 255, 128,
- 0, 69, 0, 120, 0, 105, 0, 116, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 2, 80, 0, 0, 0,
- 0, 7, 0, 41, 0, 121, 0, 8, 0, 235, 3,
- 255, 255, 130, 0, 0, 0, 0, 0, 0, 0, 60,
- 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111,
- 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99,
- 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45,
- 56, 34, 32, 115, 116, 97, 110, 100, 97, 108, 111,
- 110, 101, 61, 34, 121, 101, 115, 34, 63, 62, 13,
- 10, 60, 97, 115, 115, 101, 109, 98, 108, 121, 32,
- 120, 109, 108, 110, 115, 61, 34, 117, 114, 110, 58,
- 115, 99, 104, 101, 109, 97, 115, 45, 109, 105, 99,
- 114, 111, 115, 111, 102, 116, 45, 99, 111, 109, 58,
- 97, 115, 109, 46, 118, 49, 34, 32, 109, 97, 110,
- 105, 102, 101, 115, 116, 86, 101, 114, 115, 105, 111,
- 110, 61, 34, 49, 46, 48, 34, 62, 13, 10, 60,
- 97, 115, 115, 101, 109, 98, 108, 121, 73, 100, 101,
- 110, 116, 105, 116, 121, 32, 118, 101, 114, 115, 105,
- 111, 110, 61, 34, 49, 46, 48, 46, 48, 46, 48,
- 34, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114,
- 65, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114,
- 101, 61, 34, 88, 56, 54, 34, 32, 110, 97, 109,
- 101, 61, 34, 78, 117, 108, 108, 115, 111, 102, 116,
- 46, 78, 83, 73, 83, 46, 77, 97, 107, 101, 76,
- 97, 110, 103, 73, 100, 34, 32, 116, 121, 112, 101,
- 61, 34, 119, 105, 110, 51, 50, 34, 47, 62, 13,
- 10, 60, 100, 101, 115, 99, 114, 105, 112, 116, 105,
- 111, 110, 62, 77, 97, 107, 101, 76, 97, 110, 103,
- 73, 100, 60, 47, 100, 101, 115, 99, 114, 105, 112,
- 116, 105, 111, 110, 62, 13, 10, 60, 100, 101, 112,
- 101, 110, 100, 101, 110, 99, 121, 62, 13, 10, 60,
- 100, 101, 112, 101, 110, 100, 101, 110, 116, 65, 115,
- 115, 101, 109, 98, 108, 121, 62, 13, 10, 60, 97,
- 115, 115, 101, 109, 98, 108, 121, 73, 100, 101, 110,
- 116, 105, 116, 121, 32, 116, 121, 112, 101, 61, 34,
- 119, 105, 110, 51, 50, 34, 32, 110, 97, 109, 101,
- 61, 34, 77, 105, 99, 114, 111, 115, 111, 102, 116,
- 46, 87, 105, 110, 100, 111, 119, 115, 46, 67, 111,
- 109, 109, 111, 110, 45, 67, 111, 110, 116, 114, 111,
- 108, 115, 34, 32, 118, 101, 114, 115, 105, 111, 110,
- 61, 34, 54, 46, 48, 46, 48, 46, 48, 34, 32,
- 112, 114, 111, 99, 101, 115, 115, 111, 114, 65, 114,
- 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 61,
- 34, 88, 56, 54, 34, 32, 112, 117, 98, 108, 105,
- 99, 75, 101, 121, 84, 111, 107, 101, 110, 61, 34,
- 54, 53, 57, 53, 98, 54, 52, 49, 52, 52, 99,
- 99, 102, 49, 100, 102, 34, 32, 108, 97, 110, 103,
- 117, 97, 103, 101, 61, 34, 42, 34, 32, 47, 62,
- 13, 10, 60, 47, 100, 101, 112, 101, 110, 100, 101,
- 110, 116, 65, 115, 115, 101, 109, 98, 108, 121, 62,
- 13, 10, 60, 47, 100, 101, 112, 101, 110, 100, 101,
- 110, 99, 121, 62, 13, 10, 60, 47, 97, 115, 115,
- 101, 109, 98, 108, 121, 62, 13, 10, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0
-};
+#include <cppunit/extensions/HelperMacros.h>
+#include "../ResourceEditor.h"
+
+#include <stdlib.h>
+
+class CResourceEditorTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( CResourceEditorTest );
+ CPPUNIT_TEST( testCorrectness );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void testCorrectness() {
+ extern unsigned char original_pe[8704];
+
+ CResourceEditor re(original_pe, sizeof(original_pe));
+
+ DWORD size;
+
+ // get size
+ size = re.Save(NULL, size);
+ unsigned char *saved_pe = new unsigned char[size];
+
+ // save
+ int rc = re.Save(saved_pe, size);
+ CPPUNIT_ASSERT_EQUAL( rc, 0 );
+
+ // compare
+ CPPUNIT_ASSERT_EQUAL( (DWORD) sizeof(original_pe), size );
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(saved_pe, original_pe, size) );
+
+ delete [] saved_pe;
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( CResourceEditorTest );
+
+unsigned char original_pe[8704] = {
+ 77, 90, 144, 0, 3, 0, 0, 0, 4, 0,
+ 0, 0, 255, 255, 0, 0, 184, 0, 0, 0, 0,
+ 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 14,
+ 31, 186, 14, 0, 180, 9, 205, 33, 184, 1, 76,
+ 205, 33, 84, 104, 105, 115, 32, 112, 114, 111, 103,
+ 114, 97, 109, 32, 99, 97, 110, 110, 111, 116, 32,
+ 98, 101, 32, 114, 117, 110, 32, 105, 110, 32, 68,
+ 79, 83, 32, 109, 111, 100, 101, 46, 13, 13, 10,
+ 36, 0, 0, 0, 0, 0, 0, 0, 252, 249, 48,
+ 199, 184, 152, 94, 148, 184, 152, 94, 148, 184, 152,
+ 94, 148, 184, 152, 95, 148, 168, 152, 94, 148, 59,
+ 144, 3, 148, 189, 152, 94, 148, 236, 187, 111, 148,
+ 185, 152, 94, 148, 127, 158, 88, 148, 185, 152, 94,
+ 148, 82, 105, 99, 104, 184, 152, 94, 148, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 80, 69, 0, 0, 76, 1, 4, 0,
+ 86, 34, 23, 68, 0, 0, 0, 0, 0, 0, 0,
+ 0, 224, 0, 15, 1, 11, 1, 6, 0, 0, 4,
+ 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 126,
+ 18, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0,
+ 0, 0, 64, 0, 0, 16, 0, 0, 0, 2, 0,
+ 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0,
+ 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0,
+ 4, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
+ 0, 0, 16, 0, 0, 16, 0, 0, 0, 0, 16,
+ 0, 0, 16, 0, 0, 0, 0, 0, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,
+ 32, 0, 0, 60, 0, 0, 0, 0, 80, 0, 0,
+ 168, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 32, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 116,
+ 101, 120, 116, 0, 0, 0, 160, 2, 0, 0, 0,
+ 16, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 32, 0, 0, 96, 46, 114, 100, 97, 116, 97,
+ 0, 0, 240, 1, 0, 0, 0, 32, 0, 0, 0,
+ 2, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0,
+ 64, 46, 100, 97, 116, 97, 0, 0, 0, 100, 18,
+ 0, 0, 0, 48, 0, 0, 0, 20, 0, 0, 0,
+ 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 64, 0, 0, 192, 46, 114, 115,
+ 114, 99, 0, 0, 0, 168, 3, 0, 0, 0, 80,
+ 0, 0, 0, 4, 0, 0, 0, 30, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 64, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 139, 68, 36, 8, 129, 236, 12, 2, 0,
+ 0, 45, 16, 1, 0, 0, 83, 85, 86, 87, 15,
+ 132, 234, 1, 0, 0, 72, 15, 133, 79, 2, 0,
+ 0, 139, 132, 36, 40, 2, 0, 0, 102, 61, 2,
+ 0, 117, 28, 51, 219, 83, 255, 180, 36, 36, 2,
+ 0, 0, 255, 21, 60, 32, 64, 0, 83, 255, 21,
+ 56, 32, 64, 0, 233, 38, 2, 0, 0, 139, 200,
+ 193, 233, 16, 102, 131, 249, 1, 15, 133, 178, 0,
+ 0, 0, 51, 219, 190, 71, 1, 0, 0, 83, 83,
+ 189, 234, 3, 0, 0, 86, 85, 255, 180, 36, 48,
+ 2, 0, 0, 255, 21, 52, 32, 64, 0, 131, 248,
+ 255, 15, 132, 241, 1, 0, 0, 83, 83, 191, 233,
+ 3, 0, 0, 86, 87, 255, 180, 36, 48, 2, 0,
+ 0, 255, 21, 52, 32, 64, 0, 131, 248, 255, 15,
+ 132, 210, 1, 0, 0, 83, 83, 86, 87, 255, 180,
+ 36, 48, 2, 0, 0, 139, 61, 52, 32, 64, 0,
+ 255, 215, 15, 183, 4, 197, 104, 50, 64, 0, 83,
+ 83, 86, 85, 255, 180, 36, 48, 2, 0, 0, 193,
+ 224, 10, 137, 68, 36, 36, 255, 215, 15, 183, 4,
+ 197, 0, 48, 64, 0, 139, 76, 36, 16, 11, 200,
+ 141, 68, 36, 28, 81, 104, 84, 66, 64, 0, 80,
+ 255, 21, 48, 32, 64, 0, 131, 196, 12, 141, 68,
+ 36, 28, 80, 104, 235, 3, 0, 0, 255, 180, 36,
+ 40, 2, 0, 0, 255, 21, 44, 32, 64, 0, 233,
+ 101, 1, 0, 0, 102, 61, 1, 0, 15, 133, 91,
+ 1, 0, 0, 51, 219, 190, 71, 1, 0, 0, 83,
+ 83, 189, 234, 3, 0, 0, 86, 85, 255, 180, 36,
+ 48, 2, 0, 0, 255, 21, 52, 32, 64, 0, 131,
+ 248, 255, 15, 132, 53, 1, 0, 0, 83, 83, 191,
+ 233, 3, 0, 0, 86, 87, 255, 180, 36, 48, 2,
+ 0, 0, 255, 21, 52, 32, 64, 0, 131, 248, 255,
+ 15, 132, 22, 1, 0, 0, 106, 16, 106, 2, 255,
+ 21, 4, 32, 64, 0, 59, 195, 137, 68, 36, 16,
+ 15, 132, 0, 1, 0, 0, 80, 255, 21, 0, 32,
+ 64, 0, 83, 83, 86, 87, 255, 180, 36, 48, 2,
+ 0, 0, 139, 61, 52, 32, 64, 0, 137, 68, 36,
+ 44, 255, 215, 15, 183, 4, 197, 104, 50, 64, 0,
+ 83, 83, 86, 85, 255, 180, 36, 48, 2, 0, 0,
+ 193, 224, 10, 137, 68, 36, 40, 255, 215, 15, 183,
+ 4, 197, 0, 48, 64, 0, 139, 76, 36, 20, 11,
+ 200, 81, 104, 80, 66, 64, 0, 255, 116, 36, 32,
+ 255, 21, 48, 32, 64, 0, 131, 196, 12, 255, 116,
+ 36, 16, 255, 21, 16, 32, 64, 0, 255, 180, 36,
+ 32, 2, 0, 0, 255, 21, 40, 32, 64, 0, 133,
+ 192, 15, 132, 134, 0, 0, 0, 255, 21, 36, 32,
+ 64, 0, 255, 116, 36, 16, 106, 1, 255, 21, 32,
+ 32, 64, 0, 255, 21, 28, 32, 64, 0, 235, 108,
+ 51, 219, 83, 83, 104, 128, 0, 0, 0, 255, 180,
+ 36, 44, 2, 0, 0, 255, 21, 24, 32, 64, 0,
+ 139, 53, 52, 32, 64, 0, 51, 255, 189, 234, 3,
+ 0, 0, 255, 183, 4, 48, 64, 0, 83, 104, 67,
+ 1, 0, 0, 85, 255, 180, 36, 48, 2, 0, 0,
+ 255, 214, 131, 199, 8, 129, 255, 104, 2, 0, 0,
+ 114, 223, 51, 237, 191, 233, 3, 0, 0, 255, 181,
+ 108, 50, 64, 0, 83, 104, 67, 1, 0, 0, 87,
+ 255, 180, 36, 48, 2, 0, 0, 255, 214, 131, 197,
+ 8, 129, 253, 224, 2, 0, 0, 114, 223, 95, 94,
+ 93, 51, 192, 91, 129, 196, 12, 2, 0, 0, 194,
+ 16, 0, 106, 0, 104, 0, 16, 64, 0, 106, 0,
+ 106, 101, 106, 0, 255, 21, 12, 32, 64, 0, 80,
+ 255, 21, 64, 32, 64, 0, 106, 0, 255, 21, 8,
+ 32, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 220, 32, 0, 0, 234, 32, 0, 0,
+ 248, 32, 0, 0, 6, 33, 0, 0, 204, 32, 0,
+ 0, 0, 0, 0, 0, 40, 33, 0, 0, 56, 33,
+ 0, 0, 74, 33, 0, 0, 94, 33, 0, 0, 112,
+ 33, 0, 0, 128, 33, 0, 0, 146, 33, 0, 0,
+ 158, 33, 0, 0, 180, 33, 0, 0, 198, 33, 0,
+ 0, 210, 33, 0, 0, 0, 0, 0, 0, 132, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
+ 33, 0, 0, 0, 32, 0, 0, 156, 32, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 228, 33, 0,
+ 0, 24, 32, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 220, 32, 0, 0, 234, 32, 0, 0,
+ 248, 32, 0, 0, 6, 33, 0, 0, 204, 32, 0,
+ 0, 0, 0, 0, 0, 40, 33, 0, 0, 56, 33,
+ 0, 0, 74, 33, 0, 0, 94, 33, 0, 0, 112,
+ 33, 0, 0, 128, 33, 0, 0, 146, 33, 0, 0,
+ 158, 33, 0, 0, 180, 33, 0, 0, 198, 33, 0,
+ 0, 210, 33, 0, 0, 0, 0, 0, 0, 0, 2,
+ 71, 108, 111, 98, 97, 108, 85, 110, 108, 111, 99,
+ 107, 0, 0, 249, 1, 71, 108, 111, 98, 97, 108,
+ 76, 111, 99, 107, 0, 0, 238, 1, 71, 108, 111,
+ 98, 97, 108, 65, 108, 108, 111, 99, 0, 175, 0,
+ 69, 120, 105, 116, 80, 114, 111, 99, 101, 115, 115,
+ 0, 119, 1, 71, 101, 116, 77, 111, 100, 117, 108,
+ 101, 72, 97, 110, 100, 108, 101, 65, 0, 0, 75,
+ 69, 82, 78, 69, 76, 51, 50, 46, 100, 108, 108,
+ 0, 0, 58, 2, 83, 101, 110, 100, 77, 101, 115,
+ 115, 97, 103, 101, 65, 0, 0, 66, 0, 67, 108,
+ 111, 115, 101, 67, 108, 105, 112, 98, 111, 97, 114,
+ 100, 0, 0, 73, 2, 83, 101, 116, 67, 108, 105,
+ 112, 98, 111, 97, 114, 100, 68, 97, 116, 97, 0,
+ 0, 193, 0, 69, 109, 112, 116, 121, 67, 108, 105,
+ 112, 98, 111, 97, 114, 100, 0, 0, 245, 1, 79,
+ 112, 101, 110, 67, 108, 105, 112, 98, 111, 97, 114,
+ 100, 0, 82, 2, 83, 101, 116, 68, 108, 103, 73,
+ 116, 101, 109, 84, 101, 120, 116, 65, 0, 213, 2,
+ 119, 115, 112, 114, 105, 110, 116, 102, 65, 0, 53,
+ 2, 83, 101, 110, 100, 68, 108, 103, 73, 116, 101,
+ 109, 77, 101, 115, 115, 97, 103, 101, 65, 0, 3,
+ 2, 80, 111, 115, 116, 81, 117, 105, 116, 77, 101,
+ 115, 115, 97, 103, 101, 0, 198, 0, 69, 110, 100,
+ 68, 105, 97, 108, 111, 103, 0, 158, 0, 68, 105,
+ 97, 108, 111, 103, 66, 111, 120, 80, 97, 114, 97,
+ 109, 65, 0, 85, 83, 69, 82, 51, 50, 46, 100,
+ 108, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 64, 66, 64, 0, 127, 0, 0, 0, 48,
+ 66, 64, 0, 54, 0, 0, 0, 32, 66, 64, 0,
+ 28, 0, 0, 0, 16, 66, 64, 0, 1, 0, 0,
+ 0, 4, 66, 64, 0, 43, 0, 0, 0, 244, 65,
+ 64, 0, 77, 0, 0, 0, 228, 65, 64, 0, 44,
+ 0, 0, 0, 216, 65, 64, 0, 45, 0, 0, 0,
+ 204, 65, 64, 0, 35, 0, 0, 0, 188, 65, 64,
+ 0, 69, 0, 0, 0, 172, 65, 64, 0, 2, 0,
+ 0, 0, 156, 65, 64, 0, 3, 0, 0, 0, 140,
+ 65, 64, 0, 4, 0, 0, 0, 124, 65, 64, 0,
+ 26, 0, 0, 0, 108, 65, 64, 0, 5, 0, 0,
+ 0, 96, 65, 64, 0, 6, 0, 0, 0, 84, 65,
+ 64, 0, 101, 0, 0, 0, 72, 65, 64, 0, 19,
+ 0, 0, 0, 60, 65, 64, 0, 9, 0, 0, 0,
+ 44, 65, 64, 0, 37, 0, 0, 0, 28, 65, 64,
+ 0, 56, 0, 0, 0, 12, 65, 64, 0, 41, 0,
+ 0, 0, 0, 65, 64, 0, 11, 0, 0, 0, 240,
+ 64, 64, 0, 12, 0, 0, 0, 228, 64, 64, 0,
+ 86, 0, 0, 0, 212, 64, 64, 0, 55, 0, 0,
+ 0, 196, 64, 64, 0, 7, 0, 0, 0, 184, 64,
+ 64, 0, 8, 0, 0, 0, 172, 64, 64, 0, 71,
+ 0, 0, 0, 156, 64, 64, 0, 13, 0, 0, 0,
+ 144, 64, 64, 0, 57, 0, 0, 0, 132, 64, 64,
+ 0, 14, 0, 0, 0, 116, 64, 64, 0, 15, 0,
+ 0, 0, 100, 64, 64, 0, 33, 0, 0, 0, 84,
+ 64, 64, 0, 16, 0, 0, 0, 68, 64, 64, 0,
+ 17, 0, 0, 0, 52, 64, 64, 0, 75, 0, 0,
+ 0, 36, 64, 64, 0, 96, 0, 0, 0, 20, 64,
+ 64, 0, 63, 0, 0, 0, 8, 64, 64, 0, 87,
+ 0, 0, 0, 248, 63, 64, 0, 18, 0, 0, 0,
+ 236, 63, 64, 0, 64, 0, 0, 0, 224, 63, 64,
+ 0, 38, 0, 0, 0, 208, 63, 64, 0, 39, 0,
+ 0, 0, 192, 63, 64, 0, 47, 0, 0, 0, 176,
+ 63, 64, 0, 62, 0, 0, 0, 164, 63, 64, 0,
+ 76, 0, 0, 0, 148, 63, 64, 0, 88, 0, 0,
+ 0, 132, 63, 64, 0, 78, 0, 0, 0, 116, 63,
+ 64, 0, 80, 0, 0, 0, 100, 63, 64, 0, 97,
+ 0, 0, 0, 88, 63, 64, 0, 20, 0, 0, 0,
+ 72, 63, 64, 0, 72, 0, 0, 0, 60, 63, 64,
+ 0, 21, 0, 0, 0, 48, 63, 64, 0, 22, 0,
+ 0, 0, 32, 63, 64, 0, 70, 0, 0, 0, 16,
+ 63, 64, 0, 24, 0, 0, 0, 0, 63, 64, 0,
+ 25, 0, 0, 0, 240, 62, 64, 0, 79, 0, 0,
+ 0, 224, 62, 64, 0, 26, 0, 0, 0, 208, 62,
+ 64, 0, 89, 0, 0, 0, 196, 62, 64, 0, 27,
+ 0, 0, 0, 184, 62, 64, 0, 36, 0, 0, 0,
+ 168, 62, 64, 0, 10, 0, 0, 0, 152, 62, 64,
+ 0, 65, 0, 0, 0, 136, 62, 64, 0, 29, 0,
+ 0, 0, 120, 62, 64, 0, 90, 0, 0, 0, 108,
+ 62, 64, 0, 73, 0, 0, 0, 96, 62, 64, 0,
+ 68, 0, 0, 0, 84, 62, 64, 0, 74, 0, 0,
+ 0, 72, 62, 64, 0, 30, 0, 0, 0, 60, 62,
+ 64, 0, 31, 0, 0, 0, 44, 62, 64, 0, 34,
+ 0, 0, 0, 28, 62, 64, 0, 32, 0, 0, 0,
+ 16, 62, 64, 0, 67, 0, 0, 0, 4, 62, 64,
+ 0, 42, 0, 0, 0, 244, 61, 64, 0, 0, 0,
+ 0, 0, 228, 61, 64, 0, 1, 0, 0, 0, 212,
+ 61, 64, 0, 2, 0, 0, 0, 192, 61, 64, 0,
+ 1, 0, 0, 0, 164, 61, 64, 0, 2, 0, 0,
+ 0, 144, 61, 64, 0, 3, 0, 0, 0, 120, 61,
+ 64, 0, 4, 0, 0, 0, 96, 61, 64, 0, 5,
+ 0, 0, 0, 72, 61, 64, 0, 6, 0, 0, 0,
+ 48, 61, 64, 0, 7, 0, 0, 0, 24, 61, 64,
+ 0, 8, 0, 0, 0, 4, 61, 64, 0, 9, 0,
+ 0, 0, 236, 60, 64, 0, 10, 0, 0, 0, 212,
+ 60, 64, 0, 11, 0, 0, 0, 188, 60, 64, 0,
+ 12, 0, 0, 0, 164, 60, 64, 0, 13, 0, 0,
+ 0, 140, 60, 64, 0, 14, 0, 0, 0, 120, 60,
+ 64, 0, 15, 0, 0, 0, 96, 60, 64, 0, 16,
+ 0, 0, 0, 72, 60, 64, 0, 1, 0, 0, 0,
+ 52, 60, 64, 0, 2, 0, 0, 0, 28, 60, 64,
+ 0, 1, 0, 0, 0, 0, 60, 64, 0, 2, 0,
+ 0, 0, 228, 59, 64, 0, 3, 0, 0, 0, 200,
+ 59, 64, 0, 4, 0, 0, 0, 172, 59, 64, 0,
+ 5, 0, 0, 0, 148, 59, 64, 0, 1, 0, 0,
+ 0, 132, 59, 64, 0, 2, 0, 0, 0, 108, 59,
+ 64, 0, 1, 0, 0, 0, 88, 59, 64, 0, 2,
+ 0, 0, 0, 68, 59, 64, 0, 3, 0, 0, 0,
+ 48, 59, 64, 0, 4, 0, 0, 0, 28, 59, 64,
+ 0, 5, 0, 0, 0, 8, 59, 64, 0, 6, 0,
+ 0, 0, 240, 58, 64, 0, 7, 0, 0, 0, 208,
+ 58, 64, 0, 8, 0, 0, 0, 184, 58, 64, 0,
+ 9, 0, 0, 0, 156, 58, 64, 0, 10, 0, 0,
+ 0, 132, 58, 64, 0, 11, 0, 0, 0, 104, 58,
+ 64, 0, 12, 0, 0, 0, 76, 58, 64, 0, 13,
+ 0, 0, 0, 48, 58, 64, 0, 1, 0, 0, 0,
+ 32, 58, 64, 0, 2, 0, 0, 0, 8, 58, 64,
+ 0, 3, 0, 0, 0, 240, 57, 64, 0, 4, 0,
+ 0, 0, 216, 57, 64, 0, 5, 0, 0, 0, 188,
+ 57, 64, 0, 6, 0, 0, 0, 164, 57, 64, 0,
+ 1, 0, 0, 0, 148, 57, 64, 0, 2, 0, 0,
+ 0, 124, 57, 64, 0, 3, 0, 0, 0, 100, 57,
+ 64, 0, 4, 0, 0, 0, 72, 57, 64, 0, 5,
+ 0, 0, 0, 40, 57, 64, 0, 1, 0, 0, 0,
+ 24, 57, 64, 0, 2, 0, 0, 0, 0, 57, 64,
+ 0, 2, 0, 0, 0, 232, 56, 64, 0, 1, 0,
+ 0, 0, 216, 56, 64, 0, 1, 0, 0, 0, 196,
+ 56, 64, 0, 1, 0, 0, 0, 172, 56, 64, 0,
+ 2, 0, 0, 0, 140, 56, 64, 0, 2, 0, 0,
+ 0, 116, 56, 64, 0, 1, 0, 0, 0, 88, 56,
+ 64, 0, 2, 0, 0, 0, 60, 56, 64, 0, 2,
+ 0, 0, 0, 40, 56, 64, 0, 1, 0, 0, 0,
+ 8, 56, 64, 0, 2, 0, 0, 0, 240, 55, 64,
+ 0, 3, 0, 0, 0, 212, 55, 64, 0, 1, 0,
+ 0, 0, 196, 55, 64, 0, 2, 0, 0, 0, 172,
+ 55, 64, 0, 3, 0, 0, 0, 148, 55, 64, 0,
+ 4, 0, 0, 0, 120, 55, 64, 0, 5, 0, 0,
+ 0, 92, 55, 64, 0, 6, 0, 0, 0, 68, 55,
+ 64, 0, 7, 0, 0, 0, 32, 55, 64, 0, 8,
+ 0, 0, 0, 4, 55, 64, 0, 9, 0, 0, 0,
+ 232, 54, 64, 0, 10, 0, 0, 0, 208, 54, 64,
+ 0, 11, 0, 0, 0, 180, 54, 64, 0, 12, 0,
+ 0, 0, 156, 54, 64, 0, 13, 0, 0, 0, 132,
+ 54, 64, 0, 14, 0, 0, 0, 108, 54, 64, 0,
+ 15, 0, 0, 0, 80, 54, 64, 0, 16, 0, 0,
+ 0, 56, 54, 64, 0, 17, 0, 0, 0, 28, 54,
+ 64, 0, 18, 0, 0, 0, 0, 54, 64, 0, 19,
+ 0, 0, 0, 228, 53, 64, 0, 20, 0, 0, 0,
+ 200, 53, 64, 0, 1, 0, 0, 0, 184, 53, 64,
+ 0, 2, 0, 0, 0, 160, 53, 64, 0, 1, 0,
+ 0, 0, 136, 53, 64, 0, 2, 0, 0, 0, 116,
+ 53, 64, 0, 1, 0, 0, 0, 96, 53, 64, 0,
+ 2, 0, 0, 0, 72, 53, 64, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 85, 90, 66, 69, 75, 95,
+ 67, 89, 82, 73, 76, 76, 73, 67, 0, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 85, 90, 66, 69,
+ 75, 95, 76, 65, 84, 73, 78, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 85, 82, 68, 85, 95, 73,
+ 78, 68, 73, 65, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 85, 82, 68, 85, 95, 80, 65, 75,
+ 73, 83, 84, 65, 78, 0, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 83, 87, 69, 68, 73, 83,
+ 72, 95, 70, 73, 78, 76, 65, 78, 68, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 83, 87, 69, 68,
+ 73, 83, 72, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 83, 80, 65, 78, 73, 83, 72, 95, 80, 85,
+ 69, 82, 84, 79, 95, 82, 73, 67, 79, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 83, 80, 65, 78,
+ 73, 83, 72, 95, 78, 73, 67, 65, 82, 65, 71,
+ 85, 65, 0, 0, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 83, 80, 65, 78, 73, 83, 72, 95, 72,
+ 79, 78, 68, 85, 82, 65, 83, 0, 0, 0, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 83, 80, 65,
+ 78, 73, 83, 72, 95, 69, 76, 95, 83, 65, 76,
+ 86, 65, 68, 79, 82, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 83, 80, 65, 78, 73, 83, 72, 95,
+ 66, 79, 76, 73, 86, 73, 65, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 83, 80, 65, 78, 73, 83,
+ 72, 95, 80, 65, 82, 65, 71, 85, 65, 89, 0,
+ 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 83, 80, 65, 78, 73, 83, 72, 95, 85, 82, 85,
+ 71, 85, 65, 89, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 83, 80, 65, 78, 73, 83, 72, 95, 67,
+ 72, 73, 76, 69, 0, 0, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 83, 80, 65, 78, 73, 83, 72,
+ 95, 69, 67, 85, 65, 68, 79, 82, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 83, 80, 65, 78, 73,
+ 83, 72, 95, 65, 82, 71, 69, 78, 84, 73, 78,
+ 65, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 83, 80, 65, 78, 73, 83, 72, 95, 80, 69,
+ 82, 85, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 83, 80, 65, 78, 73, 83, 72, 95,
+ 67, 79, 76, 79, 77, 66, 73, 65, 0, 0, 0,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 83, 80,
+ 65, 78, 73, 83, 72, 95, 86, 69, 78, 69, 90,
+ 85, 69, 76, 65, 0, 0, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 83, 80, 65, 78, 73, 83, 72,
+ 95, 68, 79, 77, 73, 78, 73, 67, 65, 78, 95,
+ 82, 69, 80, 85, 66, 76, 73, 67, 0, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 83, 80, 65, 78,
+ 73, 83, 72, 95, 80, 65, 78, 65, 77, 65, 0,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 83, 80,
+ 65, 78, 73, 83, 72, 95, 67, 79, 83, 84, 65,
+ 95, 82, 73, 67, 65, 0, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 83, 80, 65, 78, 73, 83, 72,
+ 95, 71, 85, 65, 84, 69, 77, 65, 76, 65, 0,
+ 0, 0, 83, 85, 66, 76, 65, 78, 71, 95, 83,
+ 80, 65, 78, 73, 83, 72, 95, 77, 79, 68, 69,
+ 82, 78, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 83, 80, 65, 78, 73, 83, 72, 95, 77, 69,
+ 88, 73, 67, 65, 78, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 83, 80, 65, 78, 73, 83, 72, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 83, 69, 82,
+ 66, 73, 65, 78, 95, 67, 89, 82, 73, 76, 76,
+ 73, 67, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 83, 69, 82, 66, 73, 65, 78, 95,
+ 76, 65, 84, 73, 78, 0, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 80, 79, 82, 84, 85, 71,
+ 85, 69, 83, 69, 95, 66, 82, 65, 90, 73, 76,
+ 73, 65, 78, 0, 0, 0, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 80, 79, 82, 84, 85, 71, 85,
+ 69, 83, 69, 0, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 78, 79, 82, 87, 69, 71, 73, 65, 78,
+ 95, 78, 89, 78, 79, 82, 83, 75, 0, 0, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 78, 79, 82,
+ 87, 69, 71, 73, 65, 78, 95, 66, 79, 75, 77,
+ 65, 76, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 78, 69, 80, 65, 76, 73, 95, 73,
+ 78, 68, 73, 65, 0, 0, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 77, 65, 76, 65, 89, 95,
+ 66, 82, 85, 78, 69, 73, 95, 68, 65, 82, 85,
+ 83, 83, 65, 76, 65, 77, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 77, 65, 76, 65, 89, 95, 77,
+ 65, 76, 65, 89, 83, 73, 65, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 76, 73, 84, 72, 85,
+ 65, 78, 73, 65, 78, 0, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 75, 79, 82, 69, 65, 78, 0,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 75, 65,
+ 83, 72, 77, 73, 82, 73, 95, 73, 78, 68, 73,
+ 65, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 73, 84, 65, 76, 73, 65, 78, 95, 83, 87, 73,
+ 83, 83, 0, 0, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 73, 84, 65, 76, 73, 65, 78, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 71, 69, 82, 77,
+ 65, 78, 95, 76, 73, 69, 67, 72, 84, 69, 78,
+ 83, 84, 69, 73, 78, 0, 0, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 71, 69, 82, 77, 65,
+ 78, 95, 76, 85, 88, 69, 77, 66, 79, 85, 82,
+ 71, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 71, 69, 82, 77, 65, 78, 95, 65, 85, 83,
+ 84, 82, 73, 65, 78, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 71, 69, 82, 77, 65, 78, 95, 83,
+ 87, 73, 83, 83, 0, 0, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 71, 69, 82, 77, 65, 78,
+ 0, 0, 83, 85, 66, 76, 65, 78, 71, 95, 70,
+ 82, 69, 78, 67, 72, 95, 77, 79, 78, 65, 67,
+ 79, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 70, 82, 69, 78, 67, 72, 95, 76, 85, 88,
+ 69, 77, 66, 79, 85, 82, 71, 0, 0, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 70, 82, 69, 78,
+ 67, 72, 95, 83, 87, 73, 83, 83, 0, 0, 0,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 70, 82,
+ 69, 78, 67, 72, 95, 67, 65, 78, 65, 68, 73,
+ 65, 78, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 70, 82, 69, 78, 67, 72, 95, 66, 69, 76, 71,
+ 73, 65, 78, 0, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 70, 82, 69, 78, 67, 72, 0, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 69, 78, 71, 76,
+ 73, 83, 72, 95, 80, 72, 73, 76, 73, 80, 80,
+ 73, 78, 69, 83, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 69, 78, 71, 76, 73, 83, 72, 95, 90,
+ 73, 77, 66, 65, 66, 87, 69, 0, 0, 0, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 69, 78, 71,
+ 76, 73, 83, 72, 95, 84, 82, 73, 78, 73, 68,
+ 65, 68, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 69, 78, 71, 76, 73, 83, 72, 95,
+ 66, 69, 76, 73, 90, 69, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 69, 78, 71, 76, 73, 83,
+ 72, 95, 67, 65, 82, 73, 66, 66, 69, 65, 78,
+ 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 69, 78, 71, 76, 73, 83, 72, 95, 74, 65, 77,
+ 65, 73, 67, 65, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 69, 78, 71, 76, 73, 83, 72, 95, 83,
+ 79, 85, 84, 72, 95, 65, 70, 82, 73, 67, 65,
+ 0, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 69, 78, 71, 76, 73, 83, 72, 95, 69, 73,
+ 82, 69, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 69, 78, 71, 76, 73, 83, 72, 95,
+ 78, 90, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 69, 78, 71, 76, 73, 83, 72, 95, 67, 65,
+ 78, 0, 83, 85, 66, 76, 65, 78, 71, 95, 69,
+ 78, 71, 76, 73, 83, 72, 95, 65, 85, 83, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 69, 78, 71,
+ 76, 73, 83, 72, 95, 85, 75, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 69, 78, 71, 76, 73,
+ 83, 72, 95, 85, 83, 0, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 68, 85, 84, 67, 72, 95, 66,
+ 69, 76, 71, 73, 65, 78, 0, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 68, 85, 84, 67, 72,
+ 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 67, 72, 73, 78, 69, 83, 69, 95, 77, 65, 67,
+ 65, 85, 0, 0, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 67, 72, 73, 78, 69, 83, 69, 95, 83,
+ 73, 78, 71, 65, 80, 79, 82, 69, 0, 0, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 67, 72, 73,
+ 78, 69, 83, 69, 95, 72, 79, 78, 71, 75, 79,
+ 78, 71, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 67, 72, 73, 78, 69, 83, 69, 95,
+ 83, 73, 77, 80, 76, 73, 70, 73, 69, 68, 0,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 67, 72,
+ 73, 78, 69, 83, 69, 95, 84, 82, 65, 68, 73,
+ 84, 73, 79, 78, 65, 76, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 65, 90, 69, 82, 73, 95, 67,
+ 89, 82, 73, 76, 76, 73, 67, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 65, 90, 69, 82, 73,
+ 95, 76, 65, 84, 73, 78, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 65, 82, 65, 66, 73, 67, 95,
+ 81, 65, 84, 65, 82, 0, 0, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 65, 82, 65, 66, 73,
+ 67, 95, 66, 65, 72, 82, 65, 73, 78, 0, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 65, 82, 65,
+ 66, 73, 67, 95, 85, 65, 69, 0, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 65, 82, 65, 66, 73,
+ 67, 95, 75, 85, 87, 65, 73, 84, 0, 0, 0,
+ 83, 85, 66, 76, 65, 78, 71, 95, 65, 82, 65,
+ 66, 73, 67, 95, 76, 69, 66, 65, 78, 79, 78,
+ 0, 0, 83, 85, 66, 76, 65, 78, 71, 95, 65,
+ 82, 65, 66, 73, 67, 95, 74, 79, 82, 68, 65,
+ 78, 0, 0, 0, 83, 85, 66, 76, 65, 78, 71,
+ 95, 65, 82, 65, 66, 73, 67, 95, 83, 89, 82,
+ 73, 65, 0, 0, 0, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 65, 82, 65, 66, 73, 67, 95, 89,
+ 69, 77, 69, 78, 0, 0, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 65, 82, 65, 66, 73, 67,
+ 95, 79, 77, 65, 78, 0, 83, 85, 66, 76, 65,
+ 78, 71, 95, 65, 82, 65, 66, 73, 67, 95, 84,
+ 85, 78, 73, 83, 73, 65, 0, 0, 83, 85, 66,
+ 76, 65, 78, 71, 95, 65, 82, 65, 66, 73, 67,
+ 95, 77, 79, 82, 79, 67, 67, 79, 0, 0, 83,
+ 85, 66, 76, 65, 78, 71, 95, 65, 82, 65, 66,
+ 73, 67, 95, 65, 76, 71, 69, 82, 73, 65, 0,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 65, 82,
+ 65, 66, 73, 67, 95, 76, 73, 66, 89, 65, 0,
+ 0, 0, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 65, 82, 65, 66, 73, 67, 95, 69, 71, 89, 80,
+ 84, 0, 0, 0, 0, 83, 85, 66, 76, 65, 78,
+ 71, 95, 65, 82, 65, 66, 73, 67, 95, 73, 82,
+ 65, 81, 0, 83, 85, 66, 76, 65, 78, 71, 95,
+ 65, 82, 65, 66, 73, 67, 95, 83, 65, 85, 68,
+ 73, 95, 65, 82, 65, 66, 73, 65, 0, 83, 85,
+ 66, 76, 65, 78, 71, 95, 83, 89, 83, 95, 68,
+ 69, 70, 65, 85, 76, 84, 0, 83, 85, 66, 76,
+ 65, 78, 71, 95, 68, 69, 70, 65, 85, 76, 84,
+ 0, 83, 85, 66, 76, 65, 78, 71, 95, 78, 69,
+ 85, 84, 82, 65, 76, 0, 76, 65, 78, 71, 95,
+ 86, 73, 69, 84, 78, 65, 77, 69, 83, 69, 0,
+ 76, 65, 78, 71, 95, 85, 90, 66, 69, 75, 0,
+ 0, 76, 65, 78, 71, 95, 85, 82, 68, 85, 0,
+ 0, 0, 76, 65, 78, 71, 95, 85, 75, 82, 65,
+ 73, 78, 73, 65, 78, 0, 0, 76, 65, 78, 71,
+ 95, 84, 85, 82, 75, 73, 83, 72, 0, 0, 0,
+ 0, 76, 65, 78, 71, 95, 84, 72, 65, 73, 0,
+ 0, 0, 76, 65, 78, 71, 95, 84, 69, 76, 85,
+ 71, 85, 0, 76, 65, 78, 71, 95, 84, 65, 84,
+ 65, 82, 0, 0, 76, 65, 78, 71, 95, 84, 65,
+ 77, 73, 76, 0, 0, 76, 65, 78, 71, 95, 83,
+ 89, 82, 73, 65, 67, 0, 76, 65, 78, 71, 95,
+ 83, 87, 69, 68, 73, 83, 72, 0, 0, 0, 0,
+ 76, 65, 78, 71, 95, 83, 87, 65, 72, 73, 76,
+ 73, 0, 0, 0, 0, 76, 65, 78, 71, 95, 83,
+ 80, 65, 78, 73, 83, 72, 0, 0, 0, 0, 76,
+ 65, 78, 71, 95, 83, 76, 79, 86, 69, 78, 73,
+ 65, 78, 0, 0, 76, 65, 78, 71, 95, 83, 76,
+ 79, 86, 65, 75, 0, 76, 65, 78, 71, 95, 83,
+ 73, 78, 68, 72, 73, 0, 76, 65, 78, 71, 95,
+ 83, 69, 82, 66, 73, 65, 78, 0, 0, 0, 0,
+ 76, 65, 78, 71, 95, 83, 65, 78, 83, 75, 82,
+ 73, 84, 0, 0, 0, 76, 65, 78, 71, 95, 82,
+ 85, 83, 83, 73, 65, 78, 0, 0, 0, 0, 76,
+ 65, 78, 71, 95, 82, 79, 77, 65, 78, 73, 65,
+ 78, 0, 0, 0, 76, 65, 78, 71, 95, 80, 85,
+ 78, 74, 65, 66, 73, 0, 0, 0, 0, 76, 65,
+ 78, 71, 95, 80, 79, 82, 84, 85, 71, 85, 69,
+ 83, 69, 0, 76, 65, 78, 71, 95, 80, 79, 76,
+ 73, 83, 72, 0, 76, 65, 78, 71, 95, 79, 82,
+ 73, 89, 65, 0, 0, 76, 65, 78, 71, 95, 78,
+ 79, 82, 87, 69, 71, 73, 65, 78, 0, 0, 76,
+ 65, 78, 71, 95, 78, 69, 80, 65, 76, 73, 0,
+ 76, 65, 78, 71, 95, 77, 79, 78, 71, 79, 76,
+ 73, 65, 78, 0, 0, 76, 65, 78, 71, 95, 77,
+ 65, 82, 65, 84, 72, 73, 0, 0, 0, 0, 76,
+ 65, 78, 71, 95, 77, 65, 78, 73, 80, 85, 82,
+ 73, 0, 0, 0, 76, 65, 78, 71, 95, 77, 65,
+ 76, 65, 89, 65, 76, 65, 77, 0, 0, 76, 65,
+ 78, 71, 95, 77, 65, 76, 65, 89, 0, 0, 76,
+ 65, 78, 71, 95, 77, 65, 67, 69, 68, 79, 78,
+ 73, 65, 78, 0, 76, 65, 78, 71, 95, 76, 73,
+ 84, 72, 85, 65, 78, 73, 65, 78, 0, 76, 65,
+ 78, 71, 95, 76, 65, 84, 86, 73, 65, 78, 0,
+ 0, 0, 0, 76, 65, 78, 71, 95, 75, 89, 82,
+ 71, 89, 90, 0, 76, 65, 78, 71, 95, 75, 79,
+ 82, 69, 65, 78, 0, 76, 65, 78, 71, 95, 75,
+ 79, 78, 75, 65, 78, 73, 0, 0, 0, 0, 76,
+ 65, 78, 71, 95, 75, 65, 90, 65, 75, 0, 0,
+ 76, 65, 78, 71, 95, 75, 65, 83, 72, 77, 73,
+ 82, 73, 0, 0, 0, 76, 65, 78, 71, 95, 75,
+ 65, 78, 78, 65, 68, 65, 0, 0, 0, 0, 76,
+ 65, 78, 71, 95, 74, 65, 80, 65, 78, 69, 83,
+ 69, 0, 0, 0, 76, 65, 78, 71, 95, 73, 84,
+ 65, 76, 73, 65, 78, 0, 0, 0, 0, 76, 65,
+ 78, 71, 95, 73, 78, 68, 79, 78, 69, 83, 73,
+ 65, 78, 0, 76, 65, 78, 71, 95, 73, 67, 69,
+ 76, 65, 78, 68, 73, 67, 0, 0, 76, 65, 78,
+ 71, 95, 72, 85, 78, 71, 65, 82, 73, 65, 78,
+ 0, 0, 76, 65, 78, 71, 95, 72, 73, 78, 68,
+ 73, 0, 0, 76, 65, 78, 71, 95, 72, 69, 66,
+ 82, 69, 87, 0, 76, 65, 78, 71, 95, 71, 85,
+ 74, 65, 82, 65, 84, 73, 0, 0, 0, 76, 65,
+ 78, 71, 95, 71, 82, 69, 69, 75, 0, 0, 76,
+ 65, 78, 71, 95, 71, 69, 82, 77, 65, 78, 0,
+ 76, 65, 78, 71, 95, 71, 69, 79, 82, 71, 73,
+ 65, 78, 0, 0, 0, 76, 65, 78, 71, 95, 71,
+ 65, 76, 73, 67, 73, 65, 78, 0, 0, 0, 76,
+ 65, 78, 71, 95, 70, 82, 69, 78, 67, 72, 0,
+ 76, 65, 78, 71, 95, 70, 73, 78, 78, 73, 83,
+ 72, 0, 0, 0, 0, 76, 65, 78, 71, 95, 70,
+ 65, 82, 83, 73, 0, 0, 76, 65, 78, 71, 95,
+ 70, 65, 69, 82, 79, 69, 83, 69, 0, 0, 0,
+ 76, 65, 78, 71, 95, 69, 83, 84, 79, 78, 73,
+ 65, 78, 0, 0, 0, 76, 65, 78, 71, 95, 69,
+ 78, 71, 76, 73, 83, 72, 0, 0, 0, 0, 76,
+ 65, 78, 71, 95, 68, 85, 84, 67, 72, 0, 0,
+ 76, 65, 78, 71, 95, 68, 73, 86, 69, 72, 73,
+ 0, 76, 65, 78, 71, 95, 68, 65, 78, 73, 83,
+ 72, 0, 76, 65, 78, 71, 95, 67, 90, 69, 67,
+ 72, 0, 0, 76, 65, 78, 71, 95, 67, 82, 79,
+ 65, 84, 73, 65, 78, 0, 0, 0, 76, 65, 78,
+ 71, 95, 67, 72, 73, 78, 69, 83, 69, 0, 0,
+ 0, 0, 76, 65, 78, 71, 95, 67, 65, 84, 65,
+ 76, 65, 78, 0, 0, 0, 0, 76, 65, 78, 71,
+ 95, 66, 85, 76, 71, 65, 82, 73, 65, 78, 0,
+ 0, 76, 65, 78, 71, 95, 66, 69, 78, 71, 65,
+ 76, 73, 0, 0, 0, 0, 76, 65, 78, 71, 95,
+ 66, 69, 76, 65, 82, 85, 83, 73, 65, 78, 0,
+ 76, 65, 78, 71, 95, 66, 65, 83, 81, 85, 69,
+ 0, 76, 65, 78, 71, 95, 65, 90, 69, 82, 73,
+ 0, 0, 76, 65, 78, 71, 95, 65, 83, 83, 65,
+ 77, 69, 83, 69, 0, 0, 0, 76, 65, 78, 71,
+ 95, 65, 82, 77, 69, 78, 73, 65, 78, 0, 0,
+ 0, 76, 65, 78, 71, 95, 65, 82, 65, 66, 73,
+ 67, 0, 76, 65, 78, 71, 95, 65, 76, 66, 65,
+ 78, 73, 65, 78, 0, 0, 0, 76, 65, 78, 71,
+ 95, 65, 70, 82, 73, 75, 65, 65, 78, 83, 0,
+ 0, 76, 65, 78, 71, 95, 73, 78, 86, 65, 82,
+ 73, 65, 78, 84, 0, 0, 76, 65, 78, 71, 95,
+ 78, 69, 85, 84, 82, 65, 76, 0, 0, 0, 0,
+ 37, 117, 0, 0, 76, 97, 110, 103, 117, 97, 103,
+ 101, 32, 73, 68, 58, 32, 37, 100, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 0, 5, 0, 0,
+ 0, 32, 0, 0, 128, 24, 0, 0, 0, 56, 0,
+ 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 0, 101, 0, 0, 0,
+ 80, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,
+ 0, 0, 104, 0, 0, 128, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 9, 4, 0, 0, 128, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 0, 9, 4, 0, 0, 144, 0, 0, 0, 160,
+ 80, 0, 0, 230, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 136, 81, 0, 0, 25, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 8,
+ 200, 128, 0, 0, 0, 0, 5, 0, 0, 0, 0,
+ 0, 135, 0, 75, 0, 0, 0, 0, 0, 77, 0,
+ 97, 0, 107, 0, 101, 0, 76, 0, 97, 0, 110,
+ 0, 103, 0, 73, 0, 68, 0, 0, 0, 8, 0,
+ 77, 0, 83, 0, 32, 0, 83, 0, 97, 0, 110,
+ 0, 115, 0, 32, 0, 83, 0, 101, 0, 114, 0,
+ 105, 0, 102, 0, 0, 0, 0, 0, 3, 0, 33,
+ 80, 0, 0, 0, 0, 7, 0, 7, 0, 121, 0,
+ 100, 0, 234, 3, 255, 255, 133, 0, 0, 0, 0,
+ 0, 0, 0, 3, 0, 33, 80, 0, 0, 0, 0,
+ 7, 0, 24, 0, 121, 0, 100, 0, 233, 3, 255,
+ 255, 133, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ 1, 80, 0, 0, 0, 0, 78, 0, 54, 0, 50,
+ 0, 14, 0, 1, 0, 255, 255, 128, 0, 67, 0,
+ 111, 0, 112, 0, 121, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 80, 0, 0, 0, 0, 7, 0,
+ 54, 0, 50, 0, 14, 0, 2, 0, 255, 255, 128,
+ 0, 69, 0, 120, 0, 105, 0, 116, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 80, 0, 0, 0,
+ 0, 7, 0, 41, 0, 121, 0, 8, 0, 235, 3,
+ 255, 255, 130, 0, 0, 0, 0, 0, 0, 0, 60,
+ 63, 120, 109, 108, 32, 118, 101, 114, 115, 105, 111,
+ 110, 61, 34, 49, 46, 48, 34, 32, 101, 110, 99,
+ 111, 100, 105, 110, 103, 61, 34, 85, 84, 70, 45,
+ 56, 34, 32, 115, 116, 97, 110, 100, 97, 108, 111,
+ 110, 101, 61, 34, 121, 101, 115, 34, 63, 62, 13,
+ 10, 60, 97, 115, 115, 101, 109, 98, 108, 121, 32,
+ 120, 109, 108, 110, 115, 61, 34, 117, 114, 110, 58,
+ 115, 99, 104, 101, 109, 97, 115, 45, 109, 105, 99,
+ 114, 111, 115, 111, 102, 116, 45, 99, 111, 109, 58,
+ 97, 115, 109, 46, 118, 49, 34, 32, 109, 97, 110,
+ 105, 102, 101, 115, 116, 86, 101, 114, 115, 105, 111,
+ 110, 61, 34, 49, 46, 48, 34, 62, 13, 10, 60,
+ 97, 115, 115, 101, 109, 98, 108, 121, 73, 100, 101,
+ 110, 116, 105, 116, 121, 32, 118, 101, 114, 115, 105,
+ 111, 110, 61, 34, 49, 46, 48, 46, 48, 46, 48,
+ 34, 32, 112, 114, 111, 99, 101, 115, 115, 111, 114,
+ 65, 114, 99, 104, 105, 116, 101, 99, 116, 117, 114,
+ 101, 61, 34, 88, 56, 54, 34, 32, 110, 97, 109,
+ 101, 61, 34, 78, 117, 108, 108, 115, 111, 102, 116,
+ 46, 78, 83, 73, 83, 46, 77, 97, 107, 101, 76,
+ 97, 110, 103, 73, 100, 34, 32, 116, 121, 112, 101,
+ 61, 34, 119, 105, 110, 51, 50, 34, 47, 62, 13,
+ 10, 60, 100, 101, 115, 99, 114, 105, 112, 116, 105,
+ 111, 110, 62, 77, 97, 107, 101, 76, 97, 110, 103,
+ 73, 100, 60, 47, 100, 101, 115, 99, 114, 105, 112,
+ 116, 105, 111, 110, 62, 13, 10, 60, 100, 101, 112,
+ 101, 110, 100, 101, 110, 99, 121, 62, 13, 10, 60,
+ 100, 101, 112, 101, 110, 100, 101, 110, 116, 65, 115,
+ 115, 101, 109, 98, 108, 121, 62, 13, 10, 60, 97,
+ 115, 115, 101, 109, 98, 108, 121, 73, 100, 101, 110,
+ 116, 105, 116, 121, 32, 116, 121, 112, 101, 61, 34,
+ 119, 105, 110, 51, 50, 34, 32, 110, 97, 109, 101,
+ 61, 34, 77, 105, 99, 114, 111, 115, 111, 102, 116,
+ 46, 87, 105, 110, 100, 111, 119, 115, 46, 67, 111,
+ 109, 109, 111, 110, 45, 67, 111, 110, 116, 114, 111,
+ 108, 115, 34, 32, 118, 101, 114, 115, 105, 111, 110,
+ 61, 34, 54, 46, 48, 46, 48, 46, 48, 34, 32,
+ 112, 114, 111, 99, 101, 115, 115, 111, 114, 65, 114,
+ 99, 104, 105, 116, 101, 99, 116, 117, 114, 101, 61,
+ 34, 88, 56, 54, 34, 32, 112, 117, 98, 108, 105,
+ 99, 75, 101, 121, 84, 111, 107, 101, 110, 61, 34,
+ 54, 53, 57, 53, 98, 54, 52, 49, 52, 52, 99,
+ 99, 102, 49, 100, 102, 34, 32, 108, 97, 110, 103,
+ 117, 97, 103, 101, 61, 34, 42, 34, 32, 47, 62,
+ 13, 10, 60, 47, 100, 101, 112, 101, 110, 100, 101,
+ 110, 116, 65, 115, 115, 101, 109, 98, 108, 121, 62,
+ 13, 10, 60, 47, 100, 101, 112, 101, 110, 100, 101,
+ 110, 99, 121, 62, 13, 10, 60, 47, 97, 115, 115,
+ 101, 109, 98, 108, 121, 62, 13, 10, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
diff --git a/Source/Tests/SConscript b/Source/Tests/SConscript
index 49cdc41..b6c510b 100755
--- a/Source/Tests/SConscript
+++ b/Source/Tests/SConscript
@@ -1,161 +1,161 @@
-target = 'test'
-
-tests = Split("""
- compression.cpp
- decompress.cpp
- DialogTemplate.cpp
- endian.cpp
- mmap.cpp
- ResourceEditor.cpp
- specmatch.cpp
- textrunner.cpp
- winchar.cpp
-""")
-
-required = Split("""
- DialogTemplate.cpp
- dirreader.cpp
- growbuf.cpp
- mmap.cpp
- ResourceEditor.cpp
- util.cpp
- winchar.cpp
-""")
-
-required_exehead = Split("""
- Tests/memcpy.c
-""")
-
-lzma_files = Split("""
- clzma.cpp
- 7zip/7zGuids.cpp
- 7zip/7zip/Common/OutBuffer.cpp
- 7zip/7zip/Common/StreamUtils.cpp
- 7zip/7zip/Compress/LZ/LZInWindow.cpp
- 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
- 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
- 7zip/Common/Alloc.cpp
- 7zip/Common/CRC.cpp
- 7zip/LZMADecode.c
-""")
-
-required += lzma_files
-
-bzip2_files = Split("""
- bzip2/blocksort.c
- bzip2/bzlib.c
- bzip2/compress.c
- bzip2/huffman.c
-""")
-
-bzip2_exehead_files = Split("""
- bzip2/bzlib.c
- bzip2/decompress.c
-""")
-
-required += bzip2_files
-required_exehead += bzip2_exehead_files
-
-zlib_files = Split("""
- zlib/deflate.c
- zlib/trees.c
-""")
-
-zlib_exehead_files = Split("""
- zlib/INFBLOCK.C
-""")
-
-required += zlib_files
-required_exehead += zlib_exehead_files
-
-cppunitlibs = Split("""
- cppunit
-""")
-
-extralibs = Split("""
- dl
- gdi32
- iconv
- pthread
- user32
-""")
-
-scripts = Split("""
- preprocessor.nsi
-""")
-
-Import('env AddAvailableLibs')
-
-# Test scripts
-env.TestScript(scripts)
-
-# Use available libraries
-if env['PLATFORM'] == 'win32':
- # XXX will cause problems if tests are cross compiled
- # on freebsd, libversion.a exists and gives trouble if linked
- extralibs += ['version']
-
-AddAvailableLibs(env, extralibs)
-
-# compile using msvcrt (that's how cppunit.lib is built)
-if 'msvc' in env['TOOLS'] or 'mstoolkit' in env['TOOLS']:
- env.Append(CCFLAGS = ['/MD'])
-
-# uses exceptions
-env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
-
-# for lzma
-env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
-
-# test for CppUnit
-conf = env.Configure()
-cppunit = conf.CheckLibWithHeader(cppunitlibs, 'cppunit/extensions/HelperMacros.h', 'C++')
-conf.Finish()
-
-if cppunit:
-
- # compile files from parent directory
- required_obj = []
-
- for i in required:
- b = 'required/%s' % i.split('.')[0]
- s = '#Source/%s' % i
- o = env.Object(b, s)
-
- required_obj.append(o)
-
- # exehead files special treatment
- exehead_env = env.Clone()
- exehead_env.Append(CCFLAGS = ['$C_FLAG'])
- exehead_env.Append(
- CPPDEFINES = [
- 'EXEHEAD',
- 'NSIS_COMPRESS_USE_ZLIB' # just so config.h won't complain
- ]
- )
-
- for i in required_exehead:
- b = 'required/exehead/%s' % i.split('.')[0]
- s = '#Source/%s' % i
- o = exehead_env.Object(b, s)
-
- required_obj.append(o)
-
- # build test program
- tests = env.Program(target, tests + required_obj)
-
- # alias running the test to 'test'
- test = env.Alias('test-code', [tests], tests[0].abspath)
-
- # always test when asked to
- AlwaysBuild(test)
-
-else:
-
- # no CppUnit
- def err(target, source, env):
- print '*** error: CppUnit must be installed for testing!'
- return 1
-
- cmd = env.Command(target, [tests], Action(err, ''))
- env.Alias('test-code', cmd)
+target = 'test'
+
+tests = Split("""
+ compression.cpp
+ decompress.cpp
+ DialogTemplate.cpp
+ endian.cpp
+ mmap.cpp
+ ResourceEditor.cpp
+ specmatch.cpp
+ textrunner.cpp
+ winchar.cpp
+""")
+
+required = Split("""
+ DialogTemplate.cpp
+ dirreader.cpp
+ growbuf.cpp
+ mmap.cpp
+ ResourceEditor.cpp
+ util.cpp
+ winchar.cpp
+""")
+
+required_exehead = Split("""
+ Tests/memcpy.c
+""")
+
+lzma_files = Split("""
+ clzma.cpp
+ 7zip/7zGuids.cpp
+ 7zip/7zip/Common/OutBuffer.cpp
+ 7zip/7zip/Common/StreamUtils.cpp
+ 7zip/7zip/Compress/LZ/LZInWindow.cpp
+ 7zip/7zip/Compress/LZMA/LZMAEncoder.cpp
+ 7zip/7zip/Compress/RangeCoder/RangeCoderBit.cpp
+ 7zip/Common/Alloc.cpp
+ 7zip/Common/CRC.cpp
+ 7zip/LZMADecode.c
+""")
+
+required += lzma_files
+
+bzip2_files = Split("""
+ bzip2/blocksort.c
+ bzip2/bzlib.c
+ bzip2/compress.c
+ bzip2/huffman.c
+""")
+
+bzip2_exehead_files = Split("""
+ bzip2/bzlib.c
+ bzip2/decompress.c
+""")
+
+required += bzip2_files
+required_exehead += bzip2_exehead_files
+
+zlib_files = Split("""
+ zlib/deflate.c
+ zlib/trees.c
+""")
+
+zlib_exehead_files = Split("""
+ zlib/INFBLOCK.C
+""")
+
+required += zlib_files
+required_exehead += zlib_exehead_files
+
+cppunitlibs = Split("""
+ cppunit
+""")
+
+extralibs = Split("""
+ dl
+ gdi32
+ iconv
+ pthread
+ user32
+""")
+
+scripts = Split("""
+ preprocessor.nsi
+""")
+
+Import('env AddAvailableLibs')
+
+# Test scripts
+env.TestScript(scripts)
+
+# Use available libraries
+if env['PLATFORM'] == 'win32':
+ # XXX will cause problems if tests are cross compiled
+ # on freebsd, libversion.a exists and gives trouble if linked
+ extralibs += ['version']
+
+AddAvailableLibs(env, extralibs)
+
+# compile using msvcrt (that's how cppunit.lib is built)
+if 'msvc' in env['TOOLS'] or 'mstoolkit' in env['TOOLS']:
+ env.Append(CCFLAGS = ['/MD'])
+
+# uses exceptions
+env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
+
+# for lzma
+env.Append(CPPDEFINES = ['COMPRESS_MF_BT'])
+
+# test for CppUnit
+conf = env.Configure()
+cppunit = conf.CheckLibWithHeader(cppunitlibs, 'cppunit/extensions/HelperMacros.h', 'C++')
+conf.Finish()
+
+if cppunit:
+
+ # compile files from parent directory
+ required_obj = []
+
+ for i in required:
+ b = 'required/%s' % i.split('.')[0]
+ s = '#Source/%s' % i
+ o = env.Object(b, s)
+
+ required_obj.append(o)
+
+ # exehead files special treatment
+ exehead_env = env.Clone()
+ exehead_env.Append(CCFLAGS = ['$C_FLAG'])
+ exehead_env.Append(
+ CPPDEFINES = [
+ 'EXEHEAD',
+ 'NSIS_COMPRESS_USE_ZLIB' # just so config.h won't complain
+ ]
+ )
+
+ for i in required_exehead:
+ b = 'required/exehead/%s' % i.split('.')[0]
+ s = '#Source/%s' % i
+ o = exehead_env.Object(b, s)
+
+ required_obj.append(o)
+
+ # build test program
+ tests = env.Program(target, tests + required_obj)
+
+ # alias running the test to 'test'
+ test = env.Alias('test-code', [tests], tests[0].abspath)
+
+ # always test when asked to
+ AlwaysBuild(test)
+
+else:
+
+ # no CppUnit
+ def err(target, source, env):
+ print '*** error: CppUnit must be installed for testing!'
+ return 1
+
+ cmd = env.Command(target, [tests], Action(err, ''))
+ env.Alias('test-code', cmd)
diff --git a/Source/Tests/compression.cpp b/Source/Tests/compression.cpp
index 09f7987..746a7d9 100755
--- a/Source/Tests/compression.cpp
+++ b/Source/Tests/compression.cpp
@@ -1,154 +1,154 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../Platform.h"
-#include "../growbuf.h"
-
-#include <stdlib.h>
-#include <time.h>
-
-#include "decompress.h"
-
-#include "../cbzip2.h"
-#include "../clzma.h"
-#include "../czlib.h"
-
-class CompressionTest : public CppUnit::TestFixture {
-
-public:
- void randData(IGrowBuf &buf, int kb) {
- srand(time(0));
-
- for (int i = 0; i < kb; i++) {
- int r = rand();
- for (size_t j = 0; j < 1024/sizeof(int); j++) {
- buf.add(&r, sizeof(int));
- }
- }
- }
-
- // compressor must be initialized!
- void compress(ICompressor &compressor, IGrowBuf& in, IGrowBuf& out) {
- compressor.SetNextIn((char *) in.get(), in.getlen());
-
- int ret;
-
- do {
- char outbuf[1024];
- compressor.SetNextOut(outbuf, sizeof(outbuf));
-
- ret = compressor.Compress(C_FINISH);
-
- CPPUNIT_ASSERT_MESSAGE( compressor.GetErrStr(ret) , ret >= 0 );
-
- out.add(outbuf, sizeof(outbuf) - compressor.GetAvailOut());
- } while (ret == 0);
- }
-
- typedef void (*decompressInitPtr)(void *);
- typedef int (*decompressWorkPtr)(void *);
-
- void decompress(IDecompressor& decompressor, IGrowBuf& in, IGrowBuf& out) {
- decompressor.init();
- decompressor.setNextIn(in.get(), in.getlen());
-
- int ret;
-
- do {
- char outbuf[1024];
- decompressor.setNextOut(outbuf, sizeof(outbuf));
-
- ret = decompressor.decompress();
-
- CPPUNIT_ASSERT( ret >= 0 );
-
- out.add(outbuf, sizeof(outbuf) - decompressor.getAvailOut());
-
- } while (ret == 0);
-
- }
-
- // compressor must be initialized!
- void testCompressDecompress(int size_kb, ICompressor &compressor, IDecompressor& decompressor) {
- GrowBuf data;
- GrowBuf compressed;
- GrowBuf decompressed;
-
- randData(data, size_kb);
-
- compress(compressor, data, compressed);
- decompress(decompressor, compressed, decompressed);
-
- CPPUNIT_ASSERT_MESSAGE( "decompressed data is smaller", data.getlen() <= decompressed.getlen() );
- CPPUNIT_ASSERT_MESSAGE( "decompressed data is larger", data.getlen() >= decompressed.getlen() );
- CPPUNIT_ASSERT_MESSAGE( "decompressed data is different", !memcmp(data.get(), decompressed.get(), data.getlen()) );
- }
-
- void testCompressDecompress(ICompressor &compressor, IDecompressor& decompressor) {
- CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
- testCompressDecompress(1, compressor, decompressor);
-
- CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
- testCompressDecompress(1024, compressor, decompressor);
-
- CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
- testCompressDecompress(8*1024, compressor, decompressor);
-
- CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
- testCompressDecompress(32*1024, compressor, decompressor);
- }
-
-};
-
-class bzip2CompressionTest : public CompressionTest {
-
- CPPUNIT_TEST_SUITE( bzip2CompressionTest );
- CPPUNIT_TEST( test );
- CPPUNIT_TEST_SUITE_END();
-
-public:
-
- void test() {
- CBzip2 compressor;
- bzip2Decompressor decompressor;
-
- testCompressDecompress(compressor, decompressor);
- }
-
-};
-
-class lzmaCompressionTest : public CompressionTest {
-
- CPPUNIT_TEST_SUITE( lzmaCompressionTest );
- CPPUNIT_TEST( test );
- CPPUNIT_TEST_SUITE_END();
-
-public:
-
- void test() {
- CLZMA compressor;
- lzmaDecompressor decompressor;
-
- testCompressDecompress(compressor, decompressor);
- }
-
-};
-
-class zlibCompressionTest : public CompressionTest {
-
- CPPUNIT_TEST_SUITE( zlibCompressionTest );
- CPPUNIT_TEST( test );
- CPPUNIT_TEST_SUITE_END();
-
-public:
-
- void test() {
- CZlib compressor;
- zlibDecompressor decompressor;
-
- testCompressDecompress(compressor, decompressor);
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( bzip2CompressionTest );
-CPPUNIT_TEST_SUITE_REGISTRATION( lzmaCompressionTest );
-CPPUNIT_TEST_SUITE_REGISTRATION( zlibCompressionTest );
+#include <cppunit/extensions/HelperMacros.h>
+#include "../Platform.h"
+#include "../growbuf.h"
+
+#include <stdlib.h>
+#include <time.h>
+
+#include "decompress.h"
+
+#include "../cbzip2.h"
+#include "../clzma.h"
+#include "../czlib.h"
+
+class CompressionTest : public CppUnit::TestFixture {
+
+public:
+ void randData(IGrowBuf &buf, int kb) {
+ srand(time(0));
+
+ for (int i = 0; i < kb; i++) {
+ int r = rand();
+ for (size_t j = 0; j < 1024/sizeof(int); j++) {
+ buf.add(&r, sizeof(int));
+ }
+ }
+ }
+
+ // compressor must be initialized!
+ void compress(ICompressor &compressor, IGrowBuf& in, IGrowBuf& out) {
+ compressor.SetNextIn((char *) in.get(), in.getlen());
+
+ int ret;
+
+ do {
+ char outbuf[1024];
+ compressor.SetNextOut(outbuf, sizeof(outbuf));
+
+ ret = compressor.Compress(C_FINISH);
+
+ CPPUNIT_ASSERT_MESSAGE( compressor.GetErrStr(ret) , ret >= 0 );
+
+ out.add(outbuf, sizeof(outbuf) - compressor.GetAvailOut());
+ } while (ret == 0);
+ }
+
+ typedef void (*decompressInitPtr)(void *);
+ typedef int (*decompressWorkPtr)(void *);
+
+ void decompress(IDecompressor& decompressor, IGrowBuf& in, IGrowBuf& out) {
+ decompressor.init();
+ decompressor.setNextIn(in.get(), in.getlen());
+
+ int ret;
+
+ do {
+ char outbuf[1024];
+ decompressor.setNextOut(outbuf, sizeof(outbuf));
+
+ ret = decompressor.decompress();
+
+ CPPUNIT_ASSERT( ret >= 0 );
+
+ out.add(outbuf, sizeof(outbuf) - decompressor.getAvailOut());
+
+ } while (ret == 0);
+
+ }
+
+ // compressor must be initialized!
+ void testCompressDecompress(int size_kb, ICompressor &compressor, IDecompressor& decompressor) {
+ GrowBuf data;
+ GrowBuf compressed;
+ GrowBuf decompressed;
+
+ randData(data, size_kb);
+
+ compress(compressor, data, compressed);
+ decompress(decompressor, compressed, decompressed);
+
+ CPPUNIT_ASSERT_MESSAGE( "decompressed data is smaller", data.getlen() <= decompressed.getlen() );
+ CPPUNIT_ASSERT_MESSAGE( "decompressed data is larger", data.getlen() >= decompressed.getlen() );
+ CPPUNIT_ASSERT_MESSAGE( "decompressed data is different", !memcmp(data.get(), decompressed.get(), data.getlen()) );
+ }
+
+ void testCompressDecompress(ICompressor &compressor, IDecompressor& decompressor) {
+ CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
+ testCompressDecompress(1, compressor, decompressor);
+
+ CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
+ testCompressDecompress(1024, compressor, decompressor);
+
+ CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
+ testCompressDecompress(8*1024, compressor, decompressor);
+
+ CPPUNIT_ASSERT( compressor.Init(9, 1 << 23) == C_OK );
+ testCompressDecompress(32*1024, compressor, decompressor);
+ }
+
+};
+
+class bzip2CompressionTest : public CompressionTest {
+
+ CPPUNIT_TEST_SUITE( bzip2CompressionTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+
+ void test() {
+ CBzip2 compressor;
+ bzip2Decompressor decompressor;
+
+ testCompressDecompress(compressor, decompressor);
+ }
+
+};
+
+class lzmaCompressionTest : public CompressionTest {
+
+ CPPUNIT_TEST_SUITE( lzmaCompressionTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+
+ void test() {
+ CLZMA compressor;
+ lzmaDecompressor decompressor;
+
+ testCompressDecompress(compressor, decompressor);
+ }
+
+};
+
+class zlibCompressionTest : public CompressionTest {
+
+ CPPUNIT_TEST_SUITE( zlibCompressionTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+
+ void test() {
+ CZlib compressor;
+ zlibDecompressor decompressor;
+
+ testCompressDecompress(compressor, decompressor);
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( bzip2CompressionTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( lzmaCompressionTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( zlibCompressionTest );
diff --git a/Source/Tests/decompress.cpp b/Source/Tests/decompress.cpp
index 8f27f7b..45c570b 100755
--- a/Source/Tests/decompress.cpp
+++ b/Source/Tests/decompress.cpp
@@ -1,62 +1,62 @@
-#include "decompress.h"
-
-#include <string.h> // for memset
-
-#define EXEHEAD
-#define NSIS_CONFIG_COMPRESSION_SUPPORT
-
-extern "C" {
-#define NSIS_COMPRESS_USE_BZIP2
-#include "../bzip2/bzlib.h"
-#undef NSIS_COMPRESS_USE_BZIP2
-
-#define NSIS_COMPRESS_USE_LZMA
-#include "../7zip/LZMADecode.h"
-#undef NSIS_COMPRESS_USE_LZMA
-
-#define NSIS_COMPRESS_USE_ZLIB
-#include "../zlib/ZLIB.H"
-#undef NSIS_COMPRESS_USE_ZLIB
-}
-
-#define DECOMPRESSOR(name, type, initf, dec, u) \
- name::name() { \
- vs = new type; \
- memset(vs, 0, sizeof(type)); \
- } \
- \
- name::~name() { \
- delete (type *) vs; \
- vs = 0; \
- } \
- \
- void name::setNextIn(void *buffer, int size) { \
- type *s = (type *) vs; \
- s->next_in = (u *) buffer; \
- s->avail_in = size; \
- } \
- \
- void name::setNextOut(void *buffer, int size) { \
- type *s = (type *) vs; \
- s->next_out = (u *) buffer; \
- s->avail_out = size; \
- } \
- \
- int name::getAvailOut() { \
- type *s = (type *) vs; \
- return s->avail_out; \
- } \
- \
- void name::init() { \
- type *s = (type *) vs; \
- initf(s); \
- } \
- \
- int name::decompress() { \
- type *s = (type *) vs; \
- return dec(s); \
- }
-
-DECOMPRESSOR(lzmaDecompressor, lzma_stream, lzmaInit, lzmaDecode, unsigned char);
-DECOMPRESSOR(bzip2Decompressor, DState, BZ2_bzDecompressInit, BZ2_bzDecompress, char);
-DECOMPRESSOR(zlibDecompressor, z_stream, inflateReset, inflate, unsigned char);
+#include "decompress.h"
+
+#include <string.h> // for memset
+
+#define EXEHEAD
+#define NSIS_CONFIG_COMPRESSION_SUPPORT
+
+extern "C" {
+#define NSIS_COMPRESS_USE_BZIP2
+#include "../bzip2/bzlib.h"
+#undef NSIS_COMPRESS_USE_BZIP2
+
+#define NSIS_COMPRESS_USE_LZMA
+#include "../7zip/LZMADecode.h"
+#undef NSIS_COMPRESS_USE_LZMA
+
+#define NSIS_COMPRESS_USE_ZLIB
+#include "../zlib/ZLIB.H"
+#undef NSIS_COMPRESS_USE_ZLIB
+}
+
+#define DECOMPRESSOR(name, type, initf, dec, u) \
+ name::name() { \
+ vs = new type; \
+ memset(vs, 0, sizeof(type)); \
+ } \
+ \
+ name::~name() { \
+ delete (type *) vs; \
+ vs = 0; \
+ } \
+ \
+ void name::setNextIn(void *buffer, int size) { \
+ type *s = (type *) vs; \
+ s->next_in = (u *) buffer; \
+ s->avail_in = size; \
+ } \
+ \
+ void name::setNextOut(void *buffer, int size) { \
+ type *s = (type *) vs; \
+ s->next_out = (u *) buffer; \
+ s->avail_out = size; \
+ } \
+ \
+ int name::getAvailOut() { \
+ type *s = (type *) vs; \
+ return s->avail_out; \
+ } \
+ \
+ void name::init() { \
+ type *s = (type *) vs; \
+ initf(s); \
+ } \
+ \
+ int name::decompress() { \
+ type *s = (type *) vs; \
+ return dec(s); \
+ }
+
+DECOMPRESSOR(lzmaDecompressor, lzma_stream, lzmaInit, lzmaDecode, unsigned char);
+DECOMPRESSOR(bzip2Decompressor, DState, BZ2_bzDecompressInit, BZ2_bzDecompress, char);
+DECOMPRESSOR(zlibDecompressor, z_stream, inflateReset, inflate, unsigned char);
diff --git a/Source/Tests/decompress.h b/Source/Tests/decompress.h
index 4f0e492..6fb2a76 100755
--- a/Source/Tests/decompress.h
+++ b/Source/Tests/decompress.h
@@ -1,66 +1,66 @@
-class IDecompressor {
-public:
-
- virtual ~IDecompressor() {};
-
- virtual void init() = 0;
- virtual void setNextIn(void *buffer, int size) = 0;
- virtual void setNextOut(void *buffer, int size) = 0;
- virtual int getAvailOut() = 0;
- virtual int decompress() = 0;
-
-};
-
-class lzmaDecompressor : public IDecompressor {
-public:
-
- lzmaDecompressor();
- virtual ~lzmaDecompressor();
-
- virtual void init();
- virtual void setNextIn(void *buffer, int size);
- virtual void setNextOut(void *buffer, int size);
- virtual int getAvailOut();
- virtual int decompress();
-
-private:
-
- void *vs;
-
-};
-
-class bzip2Decompressor : public IDecompressor {
-public:
-
- bzip2Decompressor();
- virtual ~bzip2Decompressor();
-
- virtual void init();
- virtual void setNextIn(void *buffer, int size);
- virtual void setNextOut(void *buffer, int size);
- virtual int getAvailOut();
- virtual int decompress();
-
-private:
-
- void *vs;
-
-};
-
-class zlibDecompressor : public IDecompressor {
-public:
-
- zlibDecompressor();
- virtual ~zlibDecompressor();
-
- virtual void init();
- virtual void setNextIn(void *buffer, int size);
- virtual void setNextOut(void *buffer, int size);
- virtual int getAvailOut();
- virtual int decompress();
-
-private:
-
- void *vs;
-
-};
+class IDecompressor {
+public:
+
+ virtual ~IDecompressor() {};
+
+ virtual void init() = 0;
+ virtual void setNextIn(void *buffer, int size) = 0;
+ virtual void setNextOut(void *buffer, int size) = 0;
+ virtual int getAvailOut() = 0;
+ virtual int decompress() = 0;
+
+};
+
+class lzmaDecompressor : public IDecompressor {
+public:
+
+ lzmaDecompressor();
+ virtual ~lzmaDecompressor();
+
+ virtual void init();
+ virtual void setNextIn(void *buffer, int size);
+ virtual void setNextOut(void *buffer, int size);
+ virtual int getAvailOut();
+ virtual int decompress();
+
+private:
+
+ void *vs;
+
+};
+
+class bzip2Decompressor : public IDecompressor {
+public:
+
+ bzip2Decompressor();
+ virtual ~bzip2Decompressor();
+
+ virtual void init();
+ virtual void setNextIn(void *buffer, int size);
+ virtual void setNextOut(void *buffer, int size);
+ virtual int getAvailOut();
+ virtual int decompress();
+
+private:
+
+ void *vs;
+
+};
+
+class zlibDecompressor : public IDecompressor {
+public:
+
+ zlibDecompressor();
+ virtual ~zlibDecompressor();
+
+ virtual void init();
+ virtual void setNextIn(void *buffer, int size);
+ virtual void setNextOut(void *buffer, int size);
+ virtual int getAvailOut();
+ virtual int decompress();
+
+private:
+
+ void *vs;
+
+};
diff --git a/Source/Tests/endian.cpp b/Source/Tests/endian.cpp
index ed9b2e2..c1912d5 100755
--- a/Source/Tests/endian.cpp
+++ b/Source/Tests/endian.cpp
@@ -1,56 +1,56 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../Platform.h"
-
-class EndianTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( EndianTest );
- CPPUNIT_TEST( testSwapEndian );
- CPPUNIT_TEST( testFixEndian16 );
- CPPUNIT_TEST( testFixEndian32 );
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void testSwapEndian() {
- CPPUNIT_ASSERT_EQUAL( (int)0x78563412, (int)SWAP_ENDIAN_INT32(0x12345678) );
- CPPUNIT_ASSERT_EQUAL( (int)0xFFFFFFFF, (int)SWAP_ENDIAN_INT32(0xFFFFFFFF) );
- CPPUNIT_ASSERT_EQUAL( (int)0, (int)SWAP_ENDIAN_INT32(0) );
- CPPUNIT_ASSERT_EQUAL( (int)0x3412, (int)SWAP_ENDIAN_INT16(0x1234) );
- CPPUNIT_ASSERT_EQUAL( (int)0xFFFF, (int)SWAP_ENDIAN_INT16(0xFFFF) );
- CPPUNIT_ASSERT_EQUAL( (int)0, (int)SWAP_ENDIAN_INT16(0) );
- }
-
- void testFixEndian32() {
- int i=1;
- int actual = 0x12345678;
- FIX_ENDIAN_INT32_INPLACE(actual);
- int expected;
- if (((char*)&i)[0] == 1) {
- // little endian
- expected = 0x12345678;
- }
- else {
- // big endian
- expected = 0x78563412;
- }
- CPPUNIT_ASSERT_EQUAL(expected, actual);
- }
-
- void testFixEndian16() {
- int i=1;
- int actual = 0x1234;
- FIX_ENDIAN_INT16_INPLACE(actual);
- int expected;
- if (((char*)&i)[0] == 1) {
- // little endian
- expected = 0x1234;
- }
- else {
- // big endian
- expected = 0x3412;
- }
- CPPUNIT_ASSERT_EQUAL(expected, actual);
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( EndianTest );
+#include <cppunit/extensions/HelperMacros.h>
+#include "../Platform.h"
+
+class EndianTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( EndianTest );
+ CPPUNIT_TEST( testSwapEndian );
+ CPPUNIT_TEST( testFixEndian16 );
+ CPPUNIT_TEST( testFixEndian32 );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void testSwapEndian() {
+ CPPUNIT_ASSERT_EQUAL( (int)0x78563412, (int)SWAP_ENDIAN_INT32(0x12345678) );
+ CPPUNIT_ASSERT_EQUAL( (int)0xFFFFFFFF, (int)SWAP_ENDIAN_INT32(0xFFFFFFFF) );
+ CPPUNIT_ASSERT_EQUAL( (int)0, (int)SWAP_ENDIAN_INT32(0) );
+ CPPUNIT_ASSERT_EQUAL( (int)0x3412, (int)SWAP_ENDIAN_INT16(0x1234) );
+ CPPUNIT_ASSERT_EQUAL( (int)0xFFFF, (int)SWAP_ENDIAN_INT16(0xFFFF) );
+ CPPUNIT_ASSERT_EQUAL( (int)0, (int)SWAP_ENDIAN_INT16(0) );
+ }
+
+ void testFixEndian32() {
+ int i=1;
+ int actual = 0x12345678;
+ FIX_ENDIAN_INT32_INPLACE(actual);
+ int expected;
+ if (((char*)&i)[0] == 1) {
+ // little endian
+ expected = 0x12345678;
+ }
+ else {
+ // big endian
+ expected = 0x78563412;
+ }
+ CPPUNIT_ASSERT_EQUAL(expected, actual);
+ }
+
+ void testFixEndian16() {
+ int i=1;
+ int actual = 0x1234;
+ FIX_ENDIAN_INT16_INPLACE(actual);
+ int expected;
+ if (((char*)&i)[0] == 1) {
+ // little endian
+ expected = 0x1234;
+ }
+ else {
+ // big endian
+ expected = 0x3412;
+ }
+ CPPUNIT_ASSERT_EQUAL(expected, actual);
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( EndianTest );
diff --git a/Source/Tests/memcpy.c b/Source/Tests/memcpy.c
index f2828e8..0c590e8 100755
--- a/Source/Tests/memcpy.c
+++ b/Source/Tests/memcpy.c
@@ -1,11 +1,11 @@
-#include "../Platform.h"
-
-void NSISCALL mini_memcpy(void *out, const void *in, int len)
-{
- char *c_out=(char*)out;
- char *c_in=(char *)in;
- while (len-- > 0)
- {
- *c_out++=*c_in++;
- }
-}
+#include "../Platform.h"
+
+void NSISCALL mini_memcpy(void *out, const void *in, int len)
+{
+ char *c_out=(char*)out;
+ char *c_in=(char *)in;
+ while (len-- > 0)
+ {
+ *c_out++=*c_in++;
+ }
+}
diff --git a/Source/Tests/mmap.cpp b/Source/Tests/mmap.cpp
index b1088f4..c2d267b 100755
--- a/Source/Tests/mmap.cpp
+++ b/Source/Tests/mmap.cpp
@@ -1,74 +1,74 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../mmap.h"
-
-#include <time.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-using namespace std; // for std::min
-
-int g_display_errors = 1;
-FILE *g_output = stderr;
-
-void quit() {
- fprintf(g_output, "MMap quit\n");
-}
-
-class MMapTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( MMapTest );
- CPPUNIT_TEST( testMMapFile );
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void testMMapFile() {
- size_t i;
- const int BUF_SIZE = 50000; // 50MB
-
- // resize
-
- MMapFile mmap;
- mmap.resize(BUF_SIZE);
- CPPUNIT_ASSERT_EQUAL( BUF_SIZE, mmap.getsize() );
-
- // set content
-
- char *buf = (char *) mmap.get(0, BUF_SIZE);
-
- for (i = 0; i < BUF_SIZE; i++) {
- buf[i] = i % 256;
- }
-
- mmap.release();
-
- // test content and get(), getmore()
-
- srand(time(NULL));
-
- for (i = 0; i < 100; i++) {
- int offset1 = rand() % BUF_SIZE;
- int size1 = rand() % (BUF_SIZE - offset1);
- char *p1 = (char *) mmap.get(offset1, size1);
-
- int offset2 = rand() % BUF_SIZE;
- int size2 = rand() % (BUF_SIZE - offset2);
- char *p2 = (char *) mmap.getmore(offset2, size2);
-
- int j;
-
- for (j = 0; j < size1; j++) {
- CPPUNIT_ASSERT_EQUAL( p1[j], char((offset1 + j) % 256) );
- }
-
- for (j = 0; j < size2; j++) {
- CPPUNIT_ASSERT_EQUAL( p2[j], char((offset2 + j) % 256) );
- }
-
- mmap.release();
- mmap.release(p2, size2);
- }
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( MMapTest );
+#include <cppunit/extensions/HelperMacros.h>
+#include "../mmap.h"
+
+#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+using namespace std; // for std::min
+
+int g_display_errors = 1;
+FILE *g_output = stderr;
+
+void quit() {
+ fprintf(g_output, "MMap quit\n");
+}
+
+class MMapTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( MMapTest );
+ CPPUNIT_TEST( testMMapFile );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void testMMapFile() {
+ size_t i;
+ const int BUF_SIZE = 50000; // 50MB
+
+ // resize
+
+ MMapFile mmap;
+ mmap.resize(BUF_SIZE);
+ CPPUNIT_ASSERT_EQUAL( BUF_SIZE, mmap.getsize() );
+
+ // set content
+
+ char *buf = (char *) mmap.get(0, BUF_SIZE);
+
+ for (i = 0; i < BUF_SIZE; i++) {
+ buf[i] = i % 256;
+ }
+
+ mmap.release();
+
+ // test content and get(), getmore()
+
+ srand(time(NULL));
+
+ for (i = 0; i < 100; i++) {
+ int offset1 = rand() % BUF_SIZE;
+ int size1 = rand() % (BUF_SIZE - offset1);
+ char *p1 = (char *) mmap.get(offset1, size1);
+
+ int offset2 = rand() % BUF_SIZE;
+ int size2 = rand() % (BUF_SIZE - offset2);
+ char *p2 = (char *) mmap.getmore(offset2, size2);
+
+ int j;
+
+ for (j = 0; j < size1; j++) {
+ CPPUNIT_ASSERT_EQUAL( p1[j], char((offset1 + j) % 256) );
+ }
+
+ for (j = 0; j < size2; j++) {
+ CPPUNIT_ASSERT_EQUAL( p2[j], char((offset2 + j) % 256) );
+ }
+
+ mmap.release();
+ mmap.release(p2, size2);
+ }
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( MMapTest );
diff --git a/Source/Tests/preprocessor.nsi b/Source/Tests/preprocessor.nsi
index 751fdce..9f25c9b 100755
--- a/Source/Tests/preprocessor.nsi
+++ b/Source/Tests/preprocessor.nsi
@@ -1,224 +1,224 @@
-!ifndef file_is_included
-!define file_is_included
-
-Name preprocessor
-OutFile preprocessor.exe
-
-!ifdef some_define_that_doesnt_exist
-this should not be executed, so no error should be raised
-/*
-code inside comments should not be executed
-!ifdef
-*/
-# invalid preprocessor should be ignored
-!hello
-!endif
-
-!ifdef d1
-!error "d1 is not defined!"
-!else ifdef d2
-!error "d2 is not defined!"
-!else
-# this should be compiled
-!endif
-
-!define d1
-
-!ifdef d1
-# this should be compiled
-!else ifdef d2
-!error "d2 is not defined!"
-!else
-!error "d1 is defined!"
-!endif
-
-!undef d1
-!define d2
-
-!ifdef d1
-!error "d1 is not defined!"
-!else ifdef d2
-# this should be compiled
-!else
-!error "d2 is defined!"
-!endif
-
-!ifdef some_define_that_doesnt_exist
-the next !endif should be part of this line\
-!endif
-!\
-e\
-n\
-d\
-i\
-f
-
-!if 0
-/*
-this shouldn't be compiled
-!endif
-*/
-!endif
-
-# tests for !if statement
-!if 'test' == 'test'
- !if 1 <= 2
- !if ! 100 < 99.99
- !if 2.2 > 1.12
- !if ! 23 >= 37
- !if 1 && 1
- !if ! 0 || 0
-
- # this should be compiled
-
- !else
- !error "!if ! 0 || 0 is true!"
- !endif
- !else
- !error "!if 1 && 1 is true!"
- !endif
- !else
- !error "!if ! 23 >= 37 is true!"
- !endif
- !else
- !error "!if 2.2 > 1.12 is true!"
- !endif
- !else
- !error "!if ! 100 < 99.99 is true!"
- !endif
- !else
- !error "!if 1 <= 2 is true!"
- !endif
-!else
- !error "!if 'test' == 'test' is true!"
-!endif
-
-; testing of two math functions and a macro hack :)
-!define increase "!insertmacro increase"
-!macro increase DEFINE
- !define /math ${DEFINE}_MACROTEMP ${${DEFINE}} + 1
- !undef ${DEFINE}
- !define ${DEFINE} ${${DEFINE}_MACROTEMP}
- !undef ${DEFINE}_MACROTEMP
-!macroend
-
-!define number1 1 # 1
-!define /math number2 2 + 3
-!define /math number3 ${number2} - ${number1}
-${increase} number3
-!define /math number4 2 * ${number3}
-!define /math number5 ${number4} % 3
-
-!if ${number1} != 1
- !error "number1 != 1"
-!endif
-
-!if ${number2} != 5
- !error "number2 != 5"
-!endif
-
-!if ${number3} != 5
- !error "number3 != 5"
-!endif
-
-!if ${number4} != 10
- !error "number4 != 10"
-!endif
-
-!if ${number5} != 1
- !error "number5 != 1"
-!endif
-
-; end math functions
-
-# this should just give a warning, not an error
-!include /NONFATAL file_that_doesnt_exist.nsh
-
-# this should include this file just one time.
-!include preprocessor.nsi
-
-Section
-Return
-WriteUninstaller uninst.exe # avoid warning
-SectionEnd
-
-# test scopes
-
-!macro TEST_SCOPE scope def should_exist
-
- !if ${should_exist} == y
- !ifndef ${def}
- !error "${def} not defined in ${scope} scope"
- !endif
- !else
- !ifdef ${def}
- !error "${def} defined in ${scope} scope"
- !endif
- !endif
-
-!macroend
-
-!macro TEST_SCOPES scope global section function pageex uninstall
-
- !insertmacro TEST_SCOPE "${scope}" __GLOBAL__ ${global}
- !insertmacro TEST_SCOPE "${scope}" __SECTION__ ${section}
- !insertmacro TEST_SCOPE "${scope}" __FUNCTION__ ${function}
- !insertmacro TEST_SCOPE "${scope}" __PAGEEX__ ${pageex}
- !insertmacro TEST_SCOPE "${scope}" __UNINSTALL__ ${uninstall}
-
-!macroend
-
-!insertmacro TEST_SCOPES "global" y n n n n
-
-Section test
-!insertmacro TEST_SCOPES "section" n y n n n
-!if ${__SECTION__} != test
- !error "invalid __SECTION__ value"
-!endif
-SectionEnd
-
-Section un.test
-!insertmacro TEST_SCOPES "uninstall section" n y n n y
-!if ${__SECTION__} != test
- !error "invalid __SECTION__ value"
-!endif
-SectionEnd
-
-Function test
-Call test # avoid warning
-!insertmacro TEST_SCOPES "function" n n y n n
-!if ${__FUNCTION__} != test
- !error "invalid __FUNCTION__ value"
-!endif
-FunctionEnd
-
-Function un.test
-Call un.test # avoid warning
-!insertmacro TEST_SCOPES "uninstall function" n n y n y
-!if ${__FUNCTION__} != test
- !error "invalid __FUNCTION__ value"
-!endif
-FunctionEnd
-
-PageEx instfiles
-!insertmacro TEST_SCOPES "pageex" n n n y n
-!if ${__PAGEEX__} != instfiles
- !error "invalid __PAGEEX__ value"
-!endif
-PageExEnd
-
-PageEx un.instfiles
-!insertmacro TEST_SCOPES "uninstall pageex" n n n y y
-!if ${__PAGEEX__} != instfiles
- !error "invalid __PAGEEX__ value"
-!endif
-PageExEnd
-
-!insertmacro TEST_SCOPES "global" y n n n n
-
-!else
-
-# this should just give a warning, not an error
-!include /NONFATAL another_file_that_doesnt_exist.nsh
-
-!endif
+!ifndef file_is_included
+!define file_is_included
+
+Name preprocessor
+OutFile preprocessor.exe
+
+!ifdef some_define_that_doesnt_exist
+this should not be executed, so no error should be raised
+/*
+code inside comments should not be executed
+!ifdef
+*/
+# invalid preprocessor should be ignored
+!hello
+!endif
+
+!ifdef d1
+!error "d1 is not defined!"
+!else ifdef d2
+!error "d2 is not defined!"
+!else
+# this should be compiled
+!endif
+
+!define d1
+
+!ifdef d1
+# this should be compiled
+!else ifdef d2
+!error "d2 is not defined!"
+!else
+!error "d1 is defined!"
+!endif
+
+!undef d1
+!define d2
+
+!ifdef d1
+!error "d1 is not defined!"
+!else ifdef d2
+# this should be compiled
+!else
+!error "d2 is defined!"
+!endif
+
+!ifdef some_define_that_doesnt_exist
+the next !endif should be part of this line\
+!endif
+!\
+e\
+n\
+d\
+i\
+f
+
+!if 0
+/*
+this shouldn't be compiled
+!endif
+*/
+!endif
+
+# tests for !if statement
+!if 'test' == 'test'
+ !if 1 <= 2
+ !if ! 100 < 99.99
+ !if 2.2 > 1.12
+ !if ! 23 >= 37
+ !if 1 && 1
+ !if ! 0 || 0
+
+ # this should be compiled
+
+ !else
+ !error "!if ! 0 || 0 is true!"
+ !endif
+ !else
+ !error "!if 1 && 1 is true!"
+ !endif
+ !else
+ !error "!if ! 23 >= 37 is true!"
+ !endif
+ !else
+ !error "!if 2.2 > 1.12 is true!"
+ !endif
+ !else
+ !error "!if ! 100 < 99.99 is true!"
+ !endif
+ !else
+ !error "!if 1 <= 2 is true!"
+ !endif
+!else
+ !error "!if 'test' == 'test' is true!"
+!endif
+
+; testing of two math functions and a macro hack :)
+!define increase "!insertmacro increase"
+!macro increase DEFINE
+ !define /math ${DEFINE}_MACROTEMP ${${DEFINE}} + 1
+ !undef ${DEFINE}
+ !define ${DEFINE} ${${DEFINE}_MACROTEMP}
+ !undef ${DEFINE}_MACROTEMP
+!macroend
+
+!define number1 1 # 1
+!define /math number2 2 + 3
+!define /math number3 ${number2} - ${number1}
+${increase} number3
+!define /math number4 2 * ${number3}
+!define /math number5 ${number4} % 3
+
+!if ${number1} != 1
+ !error "number1 != 1"
+!endif
+
+!if ${number2} != 5
+ !error "number2 != 5"
+!endif
+
+!if ${number3} != 5
+ !error "number3 != 5"
+!endif
+
+!if ${number4} != 10
+ !error "number4 != 10"
+!endif
+
+!if ${number5} != 1
+ !error "number5 != 1"
+!endif
+
+; end math functions
+
+# this should just give a warning, not an error
+!include /NONFATAL file_that_doesnt_exist.nsh
+
+# this should include this file just one time.
+!include preprocessor.nsi
+
+Section
+Return
+WriteUninstaller uninst.exe # avoid warning
+SectionEnd
+
+# test scopes
+
+!macro TEST_SCOPE scope def should_exist
+
+ !if ${should_exist} == y
+ !ifndef ${def}
+ !error "${def} not defined in ${scope} scope"
+ !endif
+ !else
+ !ifdef ${def}
+ !error "${def} defined in ${scope} scope"
+ !endif
+ !endif
+
+!macroend
+
+!macro TEST_SCOPES scope global section function pageex uninstall
+
+ !insertmacro TEST_SCOPE "${scope}" __GLOBAL__ ${global}
+ !insertmacro TEST_SCOPE "${scope}" __SECTION__ ${section}
+ !insertmacro TEST_SCOPE "${scope}" __FUNCTION__ ${function}
+ !insertmacro TEST_SCOPE "${scope}" __PAGEEX__ ${pageex}
+ !insertmacro TEST_SCOPE "${scope}" __UNINSTALL__ ${uninstall}
+
+!macroend
+
+!insertmacro TEST_SCOPES "global" y n n n n
+
+Section test
+!insertmacro TEST_SCOPES "section" n y n n n
+!if ${__SECTION__} != test
+ !error "invalid __SECTION__ value"
+!endif
+SectionEnd
+
+Section un.test
+!insertmacro TEST_SCOPES "uninstall section" n y n n y
+!if ${__SECTION__} != test
+ !error "invalid __SECTION__ value"
+!endif
+SectionEnd
+
+Function test
+Call test # avoid warning
+!insertmacro TEST_SCOPES "function" n n y n n
+!if ${__FUNCTION__} != test
+ !error "invalid __FUNCTION__ value"
+!endif
+FunctionEnd
+
+Function un.test
+Call un.test # avoid warning
+!insertmacro TEST_SCOPES "uninstall function" n n y n y
+!if ${__FUNCTION__} != test
+ !error "invalid __FUNCTION__ value"
+!endif
+FunctionEnd
+
+PageEx instfiles
+!insertmacro TEST_SCOPES "pageex" n n n y n
+!if ${__PAGEEX__} != instfiles
+ !error "invalid __PAGEEX__ value"
+!endif
+PageExEnd
+
+PageEx un.instfiles
+!insertmacro TEST_SCOPES "uninstall pageex" n n n y y
+!if ${__PAGEEX__} != instfiles
+ !error "invalid __PAGEEX__ value"
+!endif
+PageExEnd
+
+!insertmacro TEST_SCOPES "global" y n n n n
+
+!else
+
+# this should just give a warning, not an error
+!include /NONFATAL another_file_that_doesnt_exist.nsh
+
+!endif
diff --git a/Source/Tests/root.txt b/Source/Tests/root.txt
index e3629ef..3e09f16 100755
--- a/Source/Tests/root.txt
+++ b/Source/Tests/root.txt
@@ -1,6 +1,6 @@
-this is a list of bugs related to root directories, which can not yet be tested automatically
-
-* bug #1331292 - browsing for root network directory disables next button
-
-* root with space after it, without AllowRootDirInstall
- http://forums.winamp.com/showthread.php?threadid=222727
+this is a list of bugs related to root directories, which can not yet be tested automatically
+
+* bug #1331292 - browsing for root network directory disables next button
+
+* root with space after it, without AllowRootDirInstall
+ http://forums.winamp.com/showthread.php?threadid=222727
diff --git a/Source/Tests/specmatch.cpp b/Source/Tests/specmatch.cpp
index a68555c..56a79c7 100755
--- a/Source/Tests/specmatch.cpp
+++ b/Source/Tests/specmatch.cpp
@@ -1,45 +1,45 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../dirreader.h"
-
-#include <string>
-
-using namespace std;
-
-class SpecTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( SpecTest );
- CPPUNIT_TEST( testMatches );
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void testMatches() {
- testMatch("test.exe", "test.exe", true);
- testMatch("test", "test", true);
- testMatch("test.exe", "test.*", true);
- testMatch("test", "test.*", true);
- testMatch("test", "????", true);
- testMatch("test", "???", false);
- testMatch("test", "*.exe", false);
- testMatch("test.exe.bat", "*.exe", false);
- testMatch("test.exe.bat", "*.bat", true);
- testMatch("test.exe.bat", "*t", true);
- testMatch("test.exe.bat", "*", true);
- testMatch("test.exe.bat", "*x*", true);
- testMatch("test.exe.exe", "*.*", true);
- testMatch("test.exe.bat", "*.b*", true);
- testMatch("test.exe.bat", "tes?.*.bat", true);
- testMatch("test.exe.bat", "tes?.*bat", true);
- testMatch("test.exe.bat", "tes?.*bat***.", true);
- testMatch("test.exe", "????.*", true);
- testMatch("testing.exe", "????.*", false);
- }
-
-private:
-
- void testMatch(string name, string spec, bool result) {
- CPPUNIT_ASSERT_EQUAL( dir_reader::matches(name, spec), result );
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( SpecTest );
+#include <cppunit/extensions/HelperMacros.h>
+#include "../dirreader.h"
+
+#include <string>
+
+using namespace std;
+
+class SpecTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( SpecTest );
+ CPPUNIT_TEST( testMatches );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void testMatches() {
+ testMatch("test.exe", "test.exe", true);
+ testMatch("test", "test", true);
+ testMatch("test.exe", "test.*", true);
+ testMatch("test", "test.*", true);
+ testMatch("test", "????", true);
+ testMatch("test", "???", false);
+ testMatch("test", "*.exe", false);
+ testMatch("test.exe.bat", "*.exe", false);
+ testMatch("test.exe.bat", "*.bat", true);
+ testMatch("test.exe.bat", "*t", true);
+ testMatch("test.exe.bat", "*", true);
+ testMatch("test.exe.bat", "*x*", true);
+ testMatch("test.exe.exe", "*.*", true);
+ testMatch("test.exe.bat", "*.b*", true);
+ testMatch("test.exe.bat", "tes?.*.bat", true);
+ testMatch("test.exe.bat", "tes?.*bat", true);
+ testMatch("test.exe.bat", "tes?.*bat***.", true);
+ testMatch("test.exe", "????.*", true);
+ testMatch("testing.exe", "????.*", false);
+ }
+
+private:
+
+ void testMatch(string name, string spec, bool result) {
+ CPPUNIT_ASSERT_EQUAL( dir_reader::matches(name, spec), result );
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( SpecTest );
diff --git a/Source/Tests/textrunner.cpp b/Source/Tests/textrunner.cpp
index 4c5179f..171a578 100755
--- a/Source/Tests/textrunner.cpp
+++ b/Source/Tests/textrunner.cpp
@@ -1,22 +1,22 @@
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-int main(int argc, char* argv[])
-{
- // Get the top level suite from the registry
- CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
-
- // Adds the test to the list of test to run
- CppUnit::TextUi::TestRunner runner;
- runner.addTest( suite );
-
- // Change the default outputter to a compiler error format outputter
- runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
- std::cerr ) );
- // Run the tests.
- bool wasSucessful = runner.run();
-
- // Return error code 1 if the one of test failed.
- return wasSucessful ? 0 : 1;
-}
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+int main(int argc, char* argv[])
+{
+ // Get the top level suite from the registry
+ CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
+
+ // Adds the test to the list of test to run
+ CppUnit::TextUi::TestRunner runner;
+ runner.addTest( suite );
+
+ // Change the default outputter to a compiler error format outputter
+ runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
+ std::cerr ) );
+ // Run the tests.
+ bool wasSucessful = runner.run();
+
+ // Return error code 1 if the one of test failed.
+ return wasSucessful ? 0 : 1;
+}
diff --git a/Source/Tests/winchar.cpp b/Source/Tests/winchar.cpp
index 99934a9..a7df1e4 100755
--- a/Source/Tests/winchar.cpp
+++ b/Source/Tests/winchar.cpp
@@ -1,129 +1,129 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include "../winchar.h"
-
-#include <time.h>
-#include <stdlib.h>
-
-// macro for fixing endianity
-#define _x(x) FIX_ENDIAN_INT16(WCHAR(x))
-
-class WinCharTest : public CppUnit::TestFixture {
-
- CPPUNIT_TEST_SUITE( WinCharTest );
- CPPUNIT_TEST( testFromAnsi );
- CPPUNIT_TEST( testToAnsi );
- CPPUNIT_TEST( testStrCpy );
- CPPUNIT_TEST( testStrNCpy );
- CPPUNIT_TEST( testStrLen );
- CPPUNIT_TEST( testStrCmp );
- CPPUNIT_TEST( testStrDup );
- CPPUNIT_TEST( testStoi );
- CPPUNIT_TEST_SUITE_END();
-
-public:
- void testFromAnsi() {
- WCHAR test[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
- WCHAR *dyn = winchar_fromansi("test");
-
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(test, dyn, 5) );
-
- delete [] dyn;
- }
-
- void testToAnsi() {
- WCHAR test[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
- char *dyn = winchar_toansi(test);
-
- CPPUNIT_ASSERT_EQUAL( 0, strcmp("test", dyn) );
-
- delete [] dyn;
- }
-
- void testStrCpy() {
- WCHAR a[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
- WCHAR b[5];
-
- CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strcpy(b, a) );
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(a, b, 5) );
- }
-
- void testStrNCpy() {
- WCHAR a1[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
- WCHAR b[5];
-
- CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strncpy(b, a1, 5) );
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(a1, b, 5 * sizeof(WCHAR)) );
-
- WCHAR a2[] = { _x('t'), _x('e'), 0, 0, 0 };
-
- CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strncpy(b, a2, 5) );
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(a2, b, 5 * sizeof(WCHAR)) );
-
- CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strncpy(b, a1, 2) );
- CPPUNIT_ASSERT_EQUAL( 0, memcmp(a2, b, 5 * sizeof(WCHAR)) );
- }
-
- void testStrLen() {
- WCHAR test[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
-
- CPPUNIT_ASSERT_EQUAL( (size_t) 4, winchar_strlen(test) );
- }
-
- static int simplifyNumber(int n) {
- if (n < 0)
- return -1;
- if (n > 0)
- return 1;
- return 0;
- }
-
- void testStrCmp() {
- char a[] = "a";
- WCHAR wa[] = { _x('a'), 0 };
- char b[] = "b";
- WCHAR wb[] = { _x('b'), 0 };
- char empty[] = "";
- WCHAR wempty[] = { 0 };
-
- #define TEST_STR_CMP(x, y) \
- CPPUNIT_ASSERT_EQUAL(\
- simplifyNumber(strcmp(x, y)), \
- simplifyNumber(winchar_strcmp(w##x, w##y)) \
- )
-
- TEST_STR_CMP(a, b);
- TEST_STR_CMP(b, a);
- TEST_STR_CMP(a, a);
- TEST_STR_CMP(b, b);
- TEST_STR_CMP(a, empty);
- TEST_STR_CMP(empty, b);
- TEST_STR_CMP(empty, empty);
- }
-
- void testStrDup() {
- WCHAR a[] = { _x('a'), _x('b'), _x('c'), 0 };
-
- WCHAR *b = winchar_strdup(a);
-
- CPPUNIT_ASSERT_EQUAL( 0, winchar_strcmp(a, b) );
-
- delete [] b;
- }
-
- void testStoi() {
- srand(time(0));
-
- for (int i = 0; i < 1000; i++)
- {
- int r = rand();
- char s[128];
- sprintf(s, "%d", r);
- WCHAR *ws = winchar_fromansi(s);
- CPPUNIT_ASSERT_EQUAL( r, winchar_stoi(ws) );
- delete [] ws;
- }
- }
-
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION( WinCharTest );
+#include <cppunit/extensions/HelperMacros.h>
+#include "../winchar.h"
+
+#include <time.h>
+#include <stdlib.h>
+
+// macro for fixing endianity
+#define _x(x) FIX_ENDIAN_INT16(WCHAR(x))
+
+class WinCharTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( WinCharTest );
+ CPPUNIT_TEST( testFromAnsi );
+ CPPUNIT_TEST( testToAnsi );
+ CPPUNIT_TEST( testStrCpy );
+ CPPUNIT_TEST( testStrNCpy );
+ CPPUNIT_TEST( testStrLen );
+ CPPUNIT_TEST( testStrCmp );
+ CPPUNIT_TEST( testStrDup );
+ CPPUNIT_TEST( testStoi );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ void testFromAnsi() {
+ WCHAR test[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
+ WCHAR *dyn = winchar_fromansi("test");
+
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(test, dyn, 5) );
+
+ delete [] dyn;
+ }
+
+ void testToAnsi() {
+ WCHAR test[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
+ char *dyn = winchar_toansi(test);
+
+ CPPUNIT_ASSERT_EQUAL( 0, strcmp("test", dyn) );
+
+ delete [] dyn;
+ }
+
+ void testStrCpy() {
+ WCHAR a[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
+ WCHAR b[5];
+
+ CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strcpy(b, a) );
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(a, b, 5) );
+ }
+
+ void testStrNCpy() {
+ WCHAR a1[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
+ WCHAR b[5];
+
+ CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strncpy(b, a1, 5) );
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(a1, b, 5 * sizeof(WCHAR)) );
+
+ WCHAR a2[] = { _x('t'), _x('e'), 0, 0, 0 };
+
+ CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strncpy(b, a2, 5) );
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(a2, b, 5 * sizeof(WCHAR)) );
+
+ CPPUNIT_ASSERT_EQUAL( (WCHAR*) b, (WCHAR*) winchar_strncpy(b, a1, 2) );
+ CPPUNIT_ASSERT_EQUAL( 0, memcmp(a2, b, 5 * sizeof(WCHAR)) );
+ }
+
+ void testStrLen() {
+ WCHAR test[] = { _x('t'), _x('e'), _x('s'), _x('t'), 0 };
+
+ CPPUNIT_ASSERT_EQUAL( (size_t) 4, winchar_strlen(test) );
+ }
+
+ static int simplifyNumber(int n) {
+ if (n < 0)
+ return -1;
+ if (n > 0)
+ return 1;
+ return 0;
+ }
+
+ void testStrCmp() {
+ char a[] = "a";
+ WCHAR wa[] = { _x('a'), 0 };
+ char b[] = "b";
+ WCHAR wb[] = { _x('b'), 0 };
+ char empty[] = "";
+ WCHAR wempty[] = { 0 };
+
+ #define TEST_STR_CMP(x, y) \
+ CPPUNIT_ASSERT_EQUAL(\
+ simplifyNumber(strcmp(x, y)), \
+ simplifyNumber(winchar_strcmp(w##x, w##y)) \
+ )
+
+ TEST_STR_CMP(a, b);
+ TEST_STR_CMP(b, a);
+ TEST_STR_CMP(a, a);
+ TEST_STR_CMP(b, b);
+ TEST_STR_CMP(a, empty);
+ TEST_STR_CMP(empty, b);
+ TEST_STR_CMP(empty, empty);
+ }
+
+ void testStrDup() {
+ WCHAR a[] = { _x('a'), _x('b'), _x('c'), 0 };
+
+ WCHAR *b = winchar_strdup(a);
+
+ CPPUNIT_ASSERT_EQUAL( 0, winchar_strcmp(a, b) );
+
+ delete [] b;
+ }
+
+ void testStoi() {
+ srand(time(0));
+
+ for (int i = 0; i < 1000; i++)
+ {
+ int r = rand();
+ char s[128];
+ sprintf(s, "%d", r);
+ WCHAR *ws = winchar_fromansi(s);
+ CPPUNIT_ASSERT_EQUAL( r, winchar_stoi(ws) );
+ delete [] ws;
+ }
+ }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( WinCharTest );
diff --git a/Source/afxres.h b/Source/afxres.h
index b9e682f..bf6fa63 100755
--- a/Source/afxres.h
+++ b/Source/afxres.h
@@ -1,21 +1,21 @@
-/*
- * afxres.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-
-#ifndef IDC_STATIC
-#define IDC_STATIC -1
-#endif
+/*
+ * afxres.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+
+#ifndef IDC_STATIC
+#define IDC_STATIC -1
+#endif
diff --git a/Source/boost/checked_delete.hpp b/Source/boost/checked_delete.hpp
index adf3991..d7f5212 100755
--- a/Source/boost/checked_delete.hpp
+++ b/Source/boost/checked_delete.hpp
@@ -1,71 +1,71 @@
-#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
-#define BOOST_CHECKED_DELETE_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/checked_delete.hpp
-//
-// Copyright (c) 1999, 2000, 2001, 2002 boost.org
-// Copyright (c) 2002, 2003 Peter Dimov
-// Copyright (c) 2003 Daniel Frey
-// Copyright (c) 2003 Howard Hinnant
-//
-// Permission to copy, use, modify, sell and distribute this software
-// is granted provided this copyright notice appears in all copies.
-// This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-//
-// See http://www.boost.org/libs/utility/checked_delete.html for documentation.
-//
-
-namespace boost
-{
-
-// verify that types are complete for increased safety
-
-template<class T> inline void checked_delete(T * x)
-{
- // intentionally complex - simplification causes regressions
- typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
- (void) sizeof(type_must_be_complete);
- delete x;
-}
-
-template<class T> inline void checked_array_delete(T * x)
-{
- typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
- (void) sizeof(type_must_be_complete);
- delete [] x;
-}
-
-template<class T> struct checked_deleter
-{
- typedef void result_type;
- typedef T * argument_type;
-
- void operator()(T * x) const
- {
- // boost:: disables ADL
- boost::checked_delete(x);
- }
-};
-
-template<class T> struct checked_array_deleter
-{
- typedef void result_type;
- typedef T * argument_type;
-
- void operator()(T * x) const
- {
- boost::checked_array_delete(x);
- }
-};
-
-} // namespace boost
-
-#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
+#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
+#define BOOST_CHECKED_DELETE_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// boost/checked_delete.hpp
+//
+// Copyright (c) 1999, 2000, 2001, 2002 boost.org
+// Copyright (c) 2002, 2003 Peter Dimov
+// Copyright (c) 2003 Daniel Frey
+// Copyright (c) 2003 Howard Hinnant
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// See http://www.boost.org/libs/utility/checked_delete.html for documentation.
+//
+
+namespace boost
+{
+
+// verify that types are complete for increased safety
+
+template<class T> inline void checked_delete(T * x)
+{
+ // intentionally complex - simplification causes regressions
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ (void) sizeof(type_must_be_complete);
+ delete x;
+}
+
+template<class T> inline void checked_array_delete(T * x)
+{
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
+ (void) sizeof(type_must_be_complete);
+ delete [] x;
+}
+
+template<class T> struct checked_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+
+ void operator()(T * x) const
+ {
+ // boost:: disables ADL
+ boost::checked_delete(x);
+ }
+};
+
+template<class T> struct checked_array_deleter
+{
+ typedef void result_type;
+ typedef T * argument_type;
+
+ void operator()(T * x) const
+ {
+ boost::checked_array_delete(x);
+ }
+};
+
+} // namespace boost
+
+#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED
diff --git a/Source/boost/detail/workaround.hpp b/Source/boost/detail/workaround.hpp
index 3121928..0d5a2b2 100755
--- a/Source/boost/detail/workaround.hpp
+++ b/Source/boost/detail/workaround.hpp
@@ -1,74 +1,74 @@
-// Copyright David Abrahams 2002. Permission to copy, use,
-// modify, sell and distribute this software is granted provided this
-// copyright notice appears in all copies. This software is provided
-// "as is" without express or implied warranty, and with no claim as
-// to its suitability for any purpose.
-#ifndef WORKAROUND_DWA2002126_HPP
-# define WORKAROUND_DWA2002126_HPP
-
-// Compiler/library version workaround macro
-//
-// Usage:
-//
-// #if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
-// ... // workaround code here
-// #endif
-//
-// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
-// first argument must be undefined or expand to a numeric
-// value. The above expands to:
-//
-// (BOOST_MSVC) != 0 && (BOOST_MSVC) <= 1200
-//
-// When used for workarounds that apply to the latest known version
-// and all earlier versions of a compiler, the following convention
-// should be observed:
-//
-// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
-//
-// The version number in this case corresponds to the last version in
-// which the workaround was known to have been required. When
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
-// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
-// the workaround for any version of the compiler. When
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
-// error will be issued if the compiler version exceeds the argument
-// to BOOST_TESTED_AT(). This can be used to locate workarounds which
-// may be obsoleted by newer versions.
-
-# ifndef BOOST_STRICT_CONFIG
-
-# define BOOST_WORKAROUND(symbol, test) \
- ((symbol != 0) && (1 % (( (symbol test) ) + 1)))
-// ^ ^ ^ ^
-// The extra level of parenthesis nesting above, along with the
-// BOOST_OPEN_PAREN indirection below, is required to satisfy the
-// broken preprocessor in MWCW 8.3 and earlier.
-//
-// The basic mechanism works as follows:
-// (symbol test) + 1 => if (symbol test) then 2 else 1
-// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
-//
-// The complication with % is for cooperation with BOOST_TESTED_AT().
-// When "test" is BOOST_TESTED_AT(x) and
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
-//
-// symbol test => if (symbol <= x) then 1 else -1
-// (symbol test) + 1 => if (symbol <= x) then 2 else 0
-// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
-//
-
-# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
-# define BOOST_OPEN_PAREN (
-# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
-# else
-# define BOOST_TESTED_AT(value) != ((value)-(value))
-# endif
-
-# else
-
-# define BOOST_WORKAROUND(symbol, test) 0
-
-# endif
-
-#endif // WORKAROUND_DWA2002126_HPP
+// Copyright David Abrahams 2002. Permission to copy, use,
+// modify, sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+#ifndef WORKAROUND_DWA2002126_HPP
+# define WORKAROUND_DWA2002126_HPP
+
+// Compiler/library version workaround macro
+//
+// Usage:
+//
+// #if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
+// ... // workaround code here
+// #endif
+//
+// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
+// first argument must be undefined or expand to a numeric
+// value. The above expands to:
+//
+// (BOOST_MSVC) != 0 && (BOOST_MSVC) <= 1200
+//
+// When used for workarounds that apply to the latest known version
+// and all earlier versions of a compiler, the following convention
+// should be observed:
+//
+// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
+//
+// The version number in this case corresponds to the last version in
+// which the workaround was known to have been required. When
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
+// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
+// the workaround for any version of the compiler. When
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
+// error will be issued if the compiler version exceeds the argument
+// to BOOST_TESTED_AT(). This can be used to locate workarounds which
+// may be obsoleted by newer versions.
+
+# ifndef BOOST_STRICT_CONFIG
+
+# define BOOST_WORKAROUND(symbol, test) \
+ ((symbol != 0) && (1 % (( (symbol test) ) + 1)))
+// ^ ^ ^ ^
+// The extra level of parenthesis nesting above, along with the
+// BOOST_OPEN_PAREN indirection below, is required to satisfy the
+// broken preprocessor in MWCW 8.3 and earlier.
+//
+// The basic mechanism works as follows:
+// (symbol test) + 1 => if (symbol test) then 2 else 1
+// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
+//
+// The complication with % is for cooperation with BOOST_TESTED_AT().
+// When "test" is BOOST_TESTED_AT(x) and
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
+//
+// symbol test => if (symbol <= x) then 1 else -1
+// (symbol test) + 1 => if (symbol <= x) then 2 else 0
+// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
+//
+
+# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
+# define BOOST_OPEN_PAREN (
+# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
+# else
+# define BOOST_TESTED_AT(value) != ((value)-(value))
+# endif
+
+# else
+
+# define BOOST_WORKAROUND(symbol, test) 0
+
+# endif
+
+#endif // WORKAROUND_DWA2002126_HPP
diff --git a/Source/boost/scoped_array.hpp b/Source/boost/scoped_array.hpp
index eb61ad7..e217bae 100755
--- a/Source/boost/scoped_array.hpp
+++ b/Source/boost/scoped_array.hpp
@@ -1,122 +1,122 @@
-#ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
-#define BOOST_SCOPED_ARRAY_HPP_INCLUDED
-
-// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001, 2002 Peter Dimov
-//
-// Permission to copy, use, modify, sell and distribute this software
-// is granted provided this copyright notice appears in all copies.
-// This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-//
-// http://www.boost.org/libs/smart_ptr/scoped_array.htm
-//
-
-
-// From Boost 1.31.0, http://www.boost.org
-// Modified by Ori Peleg for use in NSIS, to reduce the required Boost includes
-
-#include "checked_delete.hpp"
-#include "detail/workaround.hpp"
-
-#include <cstddef> // for std::ptrdiff_t
-
-namespace boost
-{
-
-// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to
-// is guaranteed, either on destruction of the scoped_array or via an explicit
-// reset(). Use shared_array or std::vector if your needs are more complex.
-
-template<class T> class scoped_array // noncopyable
-{
-private:
-
- T * ptr;
-
- scoped_array(scoped_array const &);
- scoped_array & operator=(scoped_array const &);
-
- typedef scoped_array<T> this_type;
-
-public:
-
- typedef T element_type;
-
- explicit scoped_array(T * p = 0) : ptr(p) // never throws
- {
- }
-
- ~scoped_array() // never throws
- {
- boost::checked_array_delete(ptr);
- }
-
- void reset(T * p = 0) // never throws
- {
- assert(p == 0 || p != ptr); // catch self-reset errors
- this_type(p).swap(*this);
- }
-
- T & operator[](std::ptrdiff_t i) const // never throws
- {
- assert(ptr != 0);
- assert(i >= 0);
- return ptr[i];
- }
-
- T * get() const // never throws
- {
- return ptr;
- }
-
- // implicit conversion to "bool"
-
-#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
-
- operator bool () const
- {
- return ptr != 0;
- }
-
-#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
- typedef T * (this_type::*unspecified_bool_type)() const;
-
- operator unspecified_bool_type() const // never throws
- {
- return ptr == 0? 0: &this_type::get;
- }
-
-#else
-
- typedef T * this_type::*unspecified_bool_type;
-
- operator unspecified_bool_type() const // never throws
- {
- return ptr == 0? 0: &this_type::ptr;
- }
-
-#endif
-
- bool operator! () const // never throws
- {
- return ptr == 0;
- }
-
- void swap(scoped_array & b) // never throws
- {
- T * tmp = b.ptr;
- b.ptr = ptr;
- ptr = tmp;
- }
-
-};
-
-template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) // never throws
-{
- a.swap(b);
-}
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
+#ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
+#define BOOST_SCOPED_ARRAY_HPP_INCLUDED
+
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+// Copyright (c) 2001, 2002 Peter Dimov
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// http://www.boost.org/libs/smart_ptr/scoped_array.htm
+//
+
+
+// From Boost 1.31.0, http://www.boost.org
+// Modified by Ori Peleg for use in NSIS, to reduce the required Boost includes
+
+#include "checked_delete.hpp"
+#include "detail/workaround.hpp"
+
+#include <cstddef> // for std::ptrdiff_t
+
+namespace boost
+{
+
+// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to
+// is guaranteed, either on destruction of the scoped_array or via an explicit
+// reset(). Use shared_array or std::vector if your needs are more complex.
+
+template<class T> class scoped_array // noncopyable
+{
+private:
+
+ T * ptr;
+
+ scoped_array(scoped_array const &);
+ scoped_array & operator=(scoped_array const &);
+
+ typedef scoped_array<T> this_type;
+
+public:
+
+ typedef T element_type;
+
+ explicit scoped_array(T * p = 0) : ptr(p) // never throws
+ {
+ }
+
+ ~scoped_array() // never throws
+ {
+ boost::checked_array_delete(ptr);
+ }
+
+ void reset(T * p = 0) // never throws
+ {
+ assert(p == 0 || p != ptr); // catch self-reset errors
+ this_type(p).swap(*this);
+ }
+
+ T & operator[](std::ptrdiff_t i) const // never throws
+ {
+ assert(ptr != 0);
+ assert(i >= 0);
+ return ptr[i];
+ }
+
+ T * get() const // never throws
+ {
+ return ptr;
+ }
+
+ // implicit conversion to "bool"
+
+#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
+
+ operator bool () const
+ {
+ return ptr != 0;
+ }
+
+#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+ typedef T * (this_type::*unspecified_bool_type)() const;
+
+ operator unspecified_bool_type() const // never throws
+ {
+ return ptr == 0? 0: &this_type::get;
+ }
+
+#else
+
+ typedef T * this_type::*unspecified_bool_type;
+
+ operator unspecified_bool_type() const // never throws
+ {
+ return ptr == 0? 0: &this_type::ptr;
+ }
+
+#endif
+
+ bool operator! () const // never throws
+ {
+ return ptr == 0;
+ }
+
+ void swap(scoped_array & b) // never throws
+ {
+ T * tmp = b.ptr;
+ b.ptr = ptr;
+ ptr = tmp;
+ }
+
+};
+
+template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) // never throws
+{
+ a.swap(b);
+}
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED
diff --git a/Source/boost/scoped_ptr.hpp b/Source/boost/scoped_ptr.hpp
index eb00c6b..836c197 100755
--- a/Source/boost/scoped_ptr.hpp
+++ b/Source/boost/scoped_ptr.hpp
@@ -1,137 +1,137 @@
-#ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
-#define BOOST_SCOPED_PTR_HPP_INCLUDED
-
-// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001, 2002 Peter Dimov
-//
-// Permission to copy, use, modify, sell and distribute this software
-// is granted provided this copyright notice appears in all copies.
-// This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-//
-// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
-//
-
-// From Boost 1.31.0, http://www.boost.org
-// Modified by Ori Peleg for use in NSIS, to reduce the required Boost includes
-
-#include <cassert>
-#include "checked_delete.hpp"
-#include "detail/workaround.hpp"
-
-#include <memory> // for std::auto_ptr
-
-namespace boost
-{
-
-// scoped_ptr mimics a built-in pointer except that it guarantees deletion
-// of the object pointed to, either on destruction of the scoped_ptr or via
-// an explicit reset(). scoped_ptr is a simple solution for simple needs;
-// use shared_ptr or std::auto_ptr if your needs are more complex.
-
-template<class T> class scoped_ptr // noncopyable
-{
-private:
-
- T * ptr;
-
- scoped_ptr(scoped_ptr const &);
- scoped_ptr & operator=(scoped_ptr const &);
-
- typedef scoped_ptr<T> this_type;
-
-public:
-
- typedef T element_type;
-
- explicit scoped_ptr(T * p = 0): ptr(p) // never throws
- {
- }
-
- explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws
- {
- }
-
- ~scoped_ptr() // never throws
- {
- boost::checked_delete(ptr);
- }
-
- void reset(T * p = 0) // never throws
- {
- assert(p == 0 || p != ptr); // catch self-reset errors
- this_type(p).swap(*this);
- }
-
- T & operator*() const // never throws
- {
- assert(ptr != 0);
- return *ptr;
- }
-
- T * operator->() const // never throws
- {
- assert(ptr != 0);
- return ptr;
- }
-
- T * get() const // never throws
- {
- return ptr;
- }
-
- // implicit conversion to "bool"
-
-#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
-
- operator bool () const
- {
- return ptr != 0;
- }
-
-#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
- typedef T * (this_type::*unspecified_bool_type)() const;
-
- operator unspecified_bool_type() const // never throws
- {
- return ptr == 0? 0: &this_type::get;
- }
-
-#else
- typedef T * this_type::*unspecified_bool_type;
-
- operator unspecified_bool_type() const // never throws
- {
- return ptr == 0? 0: &this_type::ptr;
- }
-
-#endif
-
- bool operator! () const // never throws
- {
- return ptr == 0;
- }
-
- void swap(scoped_ptr & b) // never throws
- {
- T * tmp = b.ptr;
- b.ptr = ptr;
- ptr = tmp;
- }
-};
-
-template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) // never throws
-{
- a.swap(b);
-}
-
-// get_pointer(p) is a generic way to say p.get()
-
-template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
-{
- return p.get();
-}
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
+#ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
+#define BOOST_SCOPED_PTR_HPP_INCLUDED
+
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+// Copyright (c) 2001, 2002 Peter Dimov
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
+//
+
+// From Boost 1.31.0, http://www.boost.org
+// Modified by Ori Peleg for use in NSIS, to reduce the required Boost includes
+
+#include <cassert>
+#include "checked_delete.hpp"
+#include "detail/workaround.hpp"
+
+#include <memory> // for std::auto_ptr
+
+namespace boost
+{
+
+// scoped_ptr mimics a built-in pointer except that it guarantees deletion
+// of the object pointed to, either on destruction of the scoped_ptr or via
+// an explicit reset(). scoped_ptr is a simple solution for simple needs;
+// use shared_ptr or std::auto_ptr if your needs are more complex.
+
+template<class T> class scoped_ptr // noncopyable
+{
+private:
+
+ T * ptr;
+
+ scoped_ptr(scoped_ptr const &);
+ scoped_ptr & operator=(scoped_ptr const &);
+
+ typedef scoped_ptr<T> this_type;
+
+public:
+
+ typedef T element_type;
+
+ explicit scoped_ptr(T * p = 0): ptr(p) // never throws
+ {
+ }
+
+ explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws
+ {
+ }
+
+ ~scoped_ptr() // never throws
+ {
+ boost::checked_delete(ptr);
+ }
+
+ void reset(T * p = 0) // never throws
+ {
+ assert(p == 0 || p != ptr); // catch self-reset errors
+ this_type(p).swap(*this);
+ }
+
+ T & operator*() const // never throws
+ {
+ assert(ptr != 0);
+ return *ptr;
+ }
+
+ T * operator->() const // never throws
+ {
+ assert(ptr != 0);
+ return ptr;
+ }
+
+ T * get() const // never throws
+ {
+ return ptr;
+ }
+
+ // implicit conversion to "bool"
+
+#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
+
+ operator bool () const
+ {
+ return ptr != 0;
+ }
+
+#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+ typedef T * (this_type::*unspecified_bool_type)() const;
+
+ operator unspecified_bool_type() const // never throws
+ {
+ return ptr == 0? 0: &this_type::get;
+ }
+
+#else
+ typedef T * this_type::*unspecified_bool_type;
+
+ operator unspecified_bool_type() const // never throws
+ {
+ return ptr == 0? 0: &this_type::ptr;
+ }
+
+#endif
+
+ bool operator! () const // never throws
+ {
+ return ptr == 0;
+ }
+
+ void swap(scoped_ptr & b) // never throws
+ {
+ T * tmp = b.ptr;
+ b.ptr = ptr;
+ ptr = tmp;
+ }
+};
+
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) // never throws
+{
+ a.swap(b);
+}
+
+// get_pointer(p) is a generic way to say p.get()
+
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
+{
+ return p.get();
+}
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED
diff --git a/Source/build.cpp b/Source/build.cpp
index b9caba1..f512f65 100755
--- a/Source/build.cpp
+++ b/Source/build.cpp
@@ -1,3471 +1,3491 @@
-/*
- * build.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <stdio.h>
-#include "exehead/config.h"
-
-#include "version.h"
-
-#include "build.h"
-#include "util.h"
-#include "fileform.h"
-#include "writer.h"
-#include "crc32.h"
-#include "manifest.h"
-
-#include <stdexcept>
-
-#include "exehead/resource.h"
-#include "ResourceEditor.h"
-#include "DialogTemplate.h"
-#include "ResourceVersionInfo.h"
-
-#ifndef _WIN32
-# include <locale.h>
-# include <unistd.h>
-# include <limits.h>
-# include <stdlib.h>
-# include <stdarg.h>
-#endif
-
-#include <cassert> // for assert
-
-#define RET_UNLESS_OK( function_rc ) do { \
- int rc = (function_rc); \
- if ( rc != PS_OK) \
- return rc; \
-} while (false)
-
-using namespace std;
-
-namespace { // begin anonymous namespace
-
-bool isSimpleChar(char ch)
-{
- return (ch == '.' ) || (ch == '_' ) || (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
-}
-
-} // end of anonymous namespace
-
-void CEXEBuild::define(const char *p, const char *v)
-{
- definedlist.add(p,v);
-}
-
-CEXEBuild::~CEXEBuild()
-{
- free(m_unicon_data);
-
- delete [] m_exehead;
-
- int nlt = lang_tables.getlen() / sizeof(LanguageTable);
- LanguageTable *nla = (LanguageTable*)lang_tables.get();
-
- for (int i = 0; i < nlt; i++) {
- DeleteLangTable(nla+i);
- }
-}
-
-CEXEBuild::CEXEBuild() :
- m_exehead(0),
- m_exehead_size(0)
-{
- linecnt = 0;
- fp = 0;
- curfilename = 0;
-
- display_info=1;
- display_script=1;
- display_errors=1;
- display_warnings=1;
-
- cur_ifblock=NULL;
- last_line_had_slash=0;
- inside_comment=false;
- multiple_entries_instruction=0;
-
- build_include_depth=0;
-
- has_called_write_output=false;
-
- ns_func.add("",0); // make sure offset 0 is special on these (i.e. never used by a label)
- ns_label.add("",0);
-
- definedlist.add("NSIS_VERSION", NSIS_VERSION);
-
- // automatically generated header file containing all defines
-#include "defines.h"
-
- // no longer optional
- definedlist.add("NSIS_SUPPORT_STANDARD_PREDEFINES");
- definedlist.add("NSIS_SUPPORT_NAMED_USERVARS");
- definedlist.add("NSIS_SUPPORT_LANG_IN_STRINGS");
-
-#ifdef _WIN32
- definedlist.add("NSIS_WIN32_MAKENSIS");
-#endif
-
- db_opt_save=db_comp_save=db_full_size=db_opt_save_u=db_comp_save_u=db_full_size_u=0;
-
- // Added by Amir Szekely 31st July 2002
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- compressor = &zlib_compressor;
-#endif
- build_compressor_set = false;
- build_compressor_final = false;
-#ifdef NSIS_ZLIB_COMPRESS_WHOLE
- build_compress_whole = true;
-#else
- build_compress_whole = false;
-#endif
- build_compress=1;
- build_compress_level=9;
- build_compress_dict_size=1<<23;
-
- cur_entries=&build_entries;
- cur_instruction_entry_map=&build_instruction_entry_map;
- cur_datablock=&build_datablock;
- cur_datablock_cache=&build_datablock_cache;
- cur_functions=&build_functions;
- cur_labels=&build_labels;
- cur_sections=&build_sections;
- cur_header=&build_header;
- cur_strlist=&build_strlist;
- cur_langtables=&build_langtables;
- cur_ctlcolors=&build_ctlcolors;
- cur_pages=&build_pages;
- cur_page=0;
- cur_page_type=-1;
-
- build_filebuflen=32<<20; // 32mb
-
- sectiongroup_open_cnt=0;
- build_cursection_isfunc=0;
- build_cursection=NULL;
- // init public data.
- build_packname[0]=build_packcmd[0]=build_output_filename[0]=0;
-
- // Added by ramon 23 May 2003
- build_allowskipfiles=1;
-
- // Added by ramon 6 jun 2003
-#ifdef NSIS_SUPPORT_VERSION_INFO
- version_product_v[0]=0;
-#endif
-
- build_overwrite=build_last_overwrite=0;
- build_crcchk=1;
- build_datesave=1;
- build_optimize_datablock=1;
-
- memset(&build_header,-1,sizeof(build_header));
-
- build_header.install_reg_rootkey=0;
- build_header.flags=CH_FLAGS_NO_ROOT_DIR;
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- build_header.lb_bg=RGB(0,0,0);
- build_header.lb_fg=RGB(0,255,0);
-#endif
-#ifdef NSIS_CONFIG_LICENSEPAGE
- build_header.license_bg=-COLOR_BTNFACE;
-#endif
- build_header.install_directory_ptr=0;
- build_header.install_directory_auto_append=0;
- build_header.install_reg_key_ptr=0;
- build_header.install_reg_value_ptr=0;
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- memset(build_header.install_types,0,sizeof(build_header.install_types));
-#endif
- memset(&build_header.blocks,0,sizeof(build_header.blocks));
-
- uninstall_mode=0;
- uninstall_size_full=0;
- uninstall_size=-1;
-
- memset(&build_uninst,-1,sizeof(build_uninst));
-
- build_header.install_reg_rootkey=0;
- build_uninst.flags=0;
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- build_uninst.lb_bg=RGB(0,0,0);
- build_uninst.lb_fg=RGB(0,255,0);
-#endif
-#ifdef NSIS_CONFIG_LICENSEPAGE
- build_uninst.license_bg=-COLOR_BTNFACE;
-#endif
- build_uninst.install_directory_ptr=0;
- build_uninst.install_directory_auto_append=0;
- build_uninst.install_reg_key_ptr=0;
- build_uninst.install_reg_value_ptr=0;
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- memset(build_uninst.install_types,0,sizeof(build_uninst.install_types));
-#endif
- memset(&build_uninst.blocks,0,sizeof(build_uninst.blocks));
-
- uninstaller_writes_used=0;
-
- build_strlist.add("",0);
- ubuild_strlist.add("",0);
-
- build_langstring_num=0;
- ubuild_langstring_num=0;
-
- build_font[0]=0;
- build_font_size=0;
-
- m_unicon_data=NULL;
- m_unicon_size=0;
-
- branding_image_found=false;
-
- no_space_texts=false;
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- build_plugin_unload=0;
- plugins_processed=0;
-#endif
-
- last_used_lang=NSIS_DEFAULT_LANG;
-
- res_editor=0;
-
- manifest_comctl = manifest::comctl_old;
- manifest_exec_level = manifest::exec_level_none;
-
- enable_last_page_cancel=0;
- uenable_last_page_cancel=0;
-
- license_res_id=IDD_LICENSE;
-
- disable_window_icon=0;
-
- notify_hwnd=0;
-
-#ifdef NSIS_SUPPORT_BGBG
- bg_default_font.lfHeight=40;
- bg_default_font.lfWidth=0;
- bg_default_font.lfEscapement=0;
- bg_default_font.lfOrientation=0;
- bg_default_font.lfWeight=FW_BOLD;
- bg_default_font.lfItalic=TRUE;
- bg_default_font.lfUnderline=FALSE;
- bg_default_font.lfStrikeOut=FALSE;
- bg_default_font.lfCharSet=DEFAULT_CHARSET;
- bg_default_font.lfOutPrecision=OUT_DEFAULT_PRECIS;
- bg_default_font.lfClipPrecision=CLIP_DEFAULT_PRECIS;
- bg_default_font.lfQuality=DEFAULT_QUALITY;
- bg_default_font.lfPitchAndFamily=DEFAULT_PITCH;
- strncpy(bg_default_font.lfFaceName,"Times New Roman",LF_FACESIZE);
- memcpy(&bg_font,&bg_default_font,sizeof(LOGFONT));
-#endif
-
- defcodepage_set=false;
- uDefCodePage=CP_ACP;
-
- InitLangTables();
-
- // Register static user variables $0, $1 and so on
- // with ONE of reference count, to avoid warning on this vars
- char Aux[3];
- int i;
- for (i = 0; i < 10; i++) // 0 - 9
- {
- sprintf(Aux, "%d", i);
- m_UserVarNames.add(Aux,1);
- }
- for (i = 0; i < 10; i++) // 10 - 19
- {
- sprintf(Aux, "R%d", i);
- m_UserVarNames.add(Aux,1);
- }
- m_UserVarNames.add("CMDLINE",1); // 20 everything before here doesn't have trailing slash removal
- m_UserVarNames.add("INSTDIR",1); // 21
- m_UserVarNames.add("OUTDIR",1); // 22
- m_UserVarNames.add("EXEDIR",1); // 23
- m_UserVarNames.add("LANGUAGE",1); // 24
- m_UserVarNames.add("TEMP",-1); // 25
- m_UserVarNames.add("PLUGINSDIR",-1); // 26
- m_UserVarNames.add("EXEPATH",-1); // 27
- m_UserVarNames.add("EXEFILE",-1); // 28
- m_UserVarNames.add("HWNDPARENT",-1); // 29
- m_UserVarNames.add("_CLICK",-1); // 30
- m_UserVarNames.add("_OUTDIR",1); // 31
-
- m_iBaseVarsNum = m_UserVarNames.getnum();
-
- m_ShellConstants.add("WINDIR",CSIDL_WINDOWS,CSIDL_WINDOWS);
- m_ShellConstants.add("SYSDIR",CSIDL_SYSTEM,CSIDL_SYSTEM);
- m_ShellConstants.add("SMPROGRAMS",CSIDL_PROGRAMS, CSIDL_COMMON_PROGRAMS);
- m_ShellConstants.add("SMSTARTUP",CSIDL_STARTUP, CSIDL_COMMON_STARTUP);
- m_ShellConstants.add("DESKTOP",CSIDL_DESKTOPDIRECTORY, CSIDL_COMMON_DESKTOPDIRECTORY);
- m_ShellConstants.add("STARTMENU",CSIDL_STARTMENU, CSIDL_COMMON_STARTMENU);
- m_ShellConstants.add("QUICKLAUNCH", CSIDL_APPDATA, CSIDL_APPDATA);
- m_ShellConstants.add("DOCUMENTS",CSIDL_PERSONAL, CSIDL_COMMON_DOCUMENTS);
- m_ShellConstants.add("SENDTO",CSIDL_SENDTO, CSIDL_SENDTO);
- m_ShellConstants.add("RECENT",CSIDL_RECENT, CSIDL_RECENT);
- m_ShellConstants.add("FAVORITES",CSIDL_FAVORITES, CSIDL_COMMON_FAVORITES);
- m_ShellConstants.add("MUSIC",CSIDL_MYMUSIC, CSIDL_COMMON_MUSIC);
- m_ShellConstants.add("PICTURES",CSIDL_MYPICTURES, CSIDL_COMMON_PICTURES);
- m_ShellConstants.add("VIDEOS",CSIDL_MYVIDEO, CSIDL_COMMON_VIDEO);
- m_ShellConstants.add("NETHOOD", CSIDL_NETHOOD, CSIDL_NETHOOD);
- m_ShellConstants.add("FONTS", CSIDL_FONTS, CSIDL_FONTS);
- m_ShellConstants.add("TEMPLATES", CSIDL_TEMPLATES, CSIDL_COMMON_TEMPLATES);
- m_ShellConstants.add("APPDATA", CSIDL_APPDATA, CSIDL_COMMON_APPDATA);
- m_ShellConstants.add("LOCALAPPDATA", CSIDL_LOCAL_APPDATA, CSIDL_LOCAL_APPDATA);
- m_ShellConstants.add("PRINTHOOD", CSIDL_PRINTHOOD, CSIDL_PRINTHOOD);
- //m_ShellConstants.add("ALTSTARTUP", CSIDL_ALTSTARTUP, CSIDL_COMMON_ALTSTARTUP);
- m_ShellConstants.add("INTERNET_CACHE", CSIDL_INTERNET_CACHE, CSIDL_INTERNET_CACHE);
- m_ShellConstants.add("COOKIES", CSIDL_COOKIES, CSIDL_COOKIES);
- m_ShellConstants.add("HISTORY", CSIDL_HISTORY, CSIDL_HISTORY);
- m_ShellConstants.add("PROFILE", CSIDL_PROFILE, CSIDL_PROFILE);
- m_ShellConstants.add("ADMINTOOLS", CSIDL_ADMINTOOLS, CSIDL_COMMON_ADMINTOOLS);
- m_ShellConstants.add("RESOURCES", CSIDL_RESOURCES, CSIDL_RESOURCES);
- m_ShellConstants.add("RESOURCES_LOCALIZED", CSIDL_RESOURCES_LOCALIZED, CSIDL_RESOURCES_LOCALIZED);
- m_ShellConstants.add("CDBURN_AREA", CSIDL_CDBURN_AREA, CSIDL_CDBURN_AREA);
-
- unsigned int program_files = add_string("ProgramFilesDir", 0);
- unsigned int program_files_def = add_string("C:\\Program Files");
-
- if ((program_files >= 0x40) || (program_files_def >= 0xFF))
- {
- // see Source\exehead\util.c for implementation details
- // basically, it knows it needs to get folders from the registry when the 0x80 is on
- ERROR_MSG("Internal compiler error: too many strings added to strings block before adding shell constants!\n");
- throw out_of_range("Internal compiler error: too many strings added to strings block before adding shell constants!");
- }
-
- m_ShellConstants.add("PROGRAMFILES", 0x80 | program_files, program_files_def);
- m_ShellConstants.add("PROGRAMFILES32", 0x80 | program_files, program_files_def);
- m_ShellConstants.add("PROGRAMFILES64", 0xC0 | program_files, program_files_def);
-
- unsigned int common_files = add_string("CommonFilesDir", 0);
- unsigned int common_files_def = add_string("$PROGRAMFILES\\Common Files");
-
- if ((common_files > 0x40) || (common_files_def > 0xFF))
- {
- ERROR_MSG("Internal compiler error: too many strings added to strings block before adding shell constants!\n");
- throw out_of_range("Internal compiler error: too many strings added to strings block before adding shell constants!");
- }
-
- m_ShellConstants.add("COMMONFILES", 0x80 | common_files, common_files_def);
- m_ShellConstants.add("COMMONFILES32", 0x80 | common_files, common_files_def);
- m_ShellConstants.add("COMMONFILES64", 0xC0 | common_files, common_files_def);
-
- set_uninstall_mode(1);
-
- unsigned int uprogram_files = add_string("ProgramFilesDir", 0);
- unsigned int uprogram_files_def = add_string("C:\\Program Files");
- unsigned int ucommon_files = add_string("CommonFilesDir", 0);
- unsigned int ucommon_files_def = add_string("$PROGRAMFILES\\Common Files");
-
- if (uprogram_files != program_files
- || uprogram_files_def != program_files_def
- || ucommon_files != common_files
- || ucommon_files_def != common_files_def)
- {
- ERROR_MSG("Internal compiler error: installer's shell constants are different than uninstallers!\n");
- throw out_of_range("Internal compiler error: installer's shell constants are different than uninstallers!");
- }
-
- set_uninstall_mode(0);
-
- set_code_type_predefines();
-}
-
-void CEXEBuild::initialize(const char *makensis_path)
-{
- string nsis_dir;
- const char *dir = getenv("NSISDIR");
- if (dir) nsis_dir = dir;
- else {
-#ifndef NSIS_CONFIG_CONST_DATA_PATH
- nsis_dir = get_executable_dir(makensis_path);
-#else
- nsis_dir = PREFIX_DATA;
-#endif
- }
- definedlist.add("NSISDIR", nsis_dir.c_str());
-
- string includes_dir = nsis_dir;
- includes_dir += PLATFORM_PATH_SEPARATOR_STR"Include";
- include_dirs.add(includes_dir.c_str(),0);
-
- stubs_dir = nsis_dir;
- stubs_dir += PLATFORM_PATH_SEPARATOR_STR"Stubs";
-
- if (set_compressor("zlib", false) != PS_OK)
- {
- throw runtime_error("error setting default stub");
- }
-
- string uninst = stubs_dir + PLATFORM_PATH_SEPARATOR_STR + "uninst";
- m_unicon_data = generate_uninstall_icon_data(uninst.c_str(), m_unicon_size);
- if (!m_unicon_data)
- {
- throw runtime_error("invalid default uninstall icon");
- }
-}
-
-
-int CEXEBuild::getcurdbsize() { return cur_datablock->getlen(); }
-
-// returns offset in stringblock
-int CEXEBuild::add_string(const char *string, int process/*=1*/, WORD codepage/*=CP_ACP*/)
-{
- if (!string || !*string) return 0;
-
- if (*string == '$' && *(string+1) == '(') {
- int idx = 0;
- char *cp = strdup(string+2);
- char *p = strchr(cp, ')');
- if (p && p[1] == '\0' ) { // if string is only a language str identifier
- *p = 0;
- idx = DefineLangString(cp, process);
- }
- free(cp);
- if (idx < 0) return idx;
- }
-
- if (!process) return cur_strlist->add(string,2);
-
- char buf[NSIS_MAX_STRLEN*4];
- preprocess_string(buf,string,codepage);
- return cur_strlist->add(buf,2);
-}
-
-int CEXEBuild::add_intstring(const int i) // returns offset in stringblock
-{
- char i_str[1024];
- wsprintf(i_str, "%d", i);
- return add_string(i_str);
-}
-
-// based on Dave Laundon's code
-int CEXEBuild::preprocess_string(char *out, const char *in, WORD codepage/*=CP_ACP*/)
-{
- const char *p=in;
- while (*p)
- {
- const char *np = CharNextExA(codepage, p, 0);
- if (np - p > 1) // multibyte char
- {
- int l = np - p;
- while (l--)
- {
- unsigned char i = (unsigned char)*p++;
- if (i >= NS_CODES_START) {
- *out++ = (char)NS_SKIP_CODE;
- }
- *out++=(char)i;
- }
- continue;
- }
-
- unsigned char i = (unsigned char)*p;
-
- p=np;
-
- // Test for characters extending into the variable codes
- if (i >= NS_CODES_START) {
- *out++ = (char)NS_SKIP_CODE;
- }
- else if (i == '$')
- {
- if (*p == '$')
- p++; // Can simply convert $$ to $ now
- else
- {
- {
- bool bProceced=false;
- if ( *p )
- {
- const char *pUserVarName = p;
- while (isSimpleChar(*pUserVarName))
- pUserVarName++;
-
- while (pUserVarName > p)
- {
- if (m_ShellConstants.get((char*)p, pUserVarName-p) >= 0)
- break; // Upps it's a shell constant
-
- int idxUserVar = m_UserVarNames.get((char*)p, pUserVarName-p);
- if (idxUserVar >= 0)
- {
- // Well, using variables inside string formating doens't mean
- // using the variable, beacuse it will be always an empty string
- // which is also memory wasting
- // So the line below must be commented !??
- //m_UserVarNames.inc_reference(idxUserVar);
- *out++ = (char) NS_VAR_CODE; // Named user variable;
- WORD w = FIX_ENDIAN_INT16(CODE_SHORT(idxUserVar));
- memcpy(out, &w, sizeof(WORD));
- out += sizeof(WORD);
- p += pUserVarName-p;
- bProceced = true;
- break;
- }
- pUserVarName--;
- }
- }
- if (!bProceced && *p)
- {
- const char *pShellConstName = p;
- while (isSimpleChar(*pShellConstName))
- pShellConstName++;
-
- while (pShellConstName > p)
- {
- int idxConst = m_ShellConstants.get((char*)p, pShellConstName - p);
- if (idxConst >= 0)
- {
- int CSIDL_Value_current = m_ShellConstants.get_value1(idxConst);
- int CSIDL_Value_all = m_ShellConstants.get_value2(idxConst);
- *out++=(char)NS_SHELL_CODE; // Constant code identifier
- *out++=(char)CSIDL_Value_current;
- *out++=(char)CSIDL_Value_all;
- p = pShellConstName;
- bProceced = true;
- break;
- }
- pShellConstName--;
- }
- }
- if ( !bProceced && *p == '(' )
- {
- int idx = -1;
- char *cp = strdup(p+1);
- char *pos = strchr(cp, ')');
- if (pos)
- {
- *pos = 0;
- idx = DefineLangString(cp);
- if (idx < 0)
- {
- *out++ = (char)NS_LANG_CODE; // Next word is lang-string Identifier
- WORD w = FIX_ENDIAN_INT16(CODE_SHORT(-idx-1));
- memcpy(out, &w, sizeof(WORD));
- out += sizeof(WORD);
- p += strlen(cp) + 2;
- bProceced = true;
- }
- }
- free(cp);
- }
- if ( bProceced )
- continue;
- else
- {
- char tbuf[64];
- char cBracket = '\0';
- bool bDoWarning = true;
-
- if ( *p == '[' )
- cBracket = ']';
- else if ( *p == '(' )
- cBracket = ')';
- else if ( *p == '{' )
- cBracket = '}';
-
- strncpy(tbuf,p,63);
- tbuf[63]=0;
-
- if ( cBracket != 0 )
- {
- if (strchr(tbuf,cBracket)) (strchr(tbuf,cBracket)+1)[0]=0;
- if ( tbuf[0] == '{' && tbuf[strlen(tbuf)-1] == '}' )
- {
- char *tstIfDefine = strdup(tbuf+1);
- tstIfDefine[strlen(tstIfDefine)-1] = '\0';
- bDoWarning = definedlist.find(tstIfDefine) == NULL;
- }
- }
- else
- {
- if (strstr(tbuf," ")) strstr(tbuf," ")[0]=0;
- }
- if ( bDoWarning )
- warning_fl("unknown variable/constant \"%s\" detected, ignoring",tbuf);
- i = '$';
- }
- }
- }
- }
- *out++=(char)i;
- }
- *out=0;
- return 0;
-}
-
-// what it does is, when you pass it the offset of the last item added, it will determine if
-// that data is already present in the datablock, and if so, reference it instead (and shorten
-// the datablock as necessary). Reduces overhead if you want to add files to a couple places.
-// Woo, an optimizing installer generator, now we're styling.
-
-int CEXEBuild::datablock_optimize(int start_offset, int first_int)
-{
- int this_len = cur_datablock->getlen() - start_offset;
-
- cached_db_size this_size = {first_int, start_offset};
- cur_datablock_cache->add(&this_size, sizeof(cached_db_size));
-
- if (!build_optimize_datablock || this_len < (int) sizeof(int))
- return start_offset;
-
- MMapBuf *db = (MMapBuf *) cur_datablock;
- db->setro(TRUE);
-
- cached_db_size *db_sizes = (cached_db_size *) cur_datablock_cache->get();
- int db_sizes_num = cur_datablock_cache->getlen() / sizeof(cached_db_size);
- db_sizes_num--; // don't compare with the one we just added
-
- for (int i = 0; i < db_sizes_num; i++)
- {
- if (db_sizes[i].first_int == first_int)
- {
- int pos = db_sizes[i].start_offset;
- int left = this_len;
- while (left > 0)
- {
- int l = min(left, build_filebuflen);
- void *newstuff = db->get(start_offset + this_len - left, l);
- void *oldstuff = db->getmore(pos + this_len - left, l);
-
- int res = memcmp(newstuff, oldstuff, l);
-
- db->release(oldstuff, l);
- db->release();
-
- if (res)
- {
- break;
- }
-
- left -= l;
- }
-
- if (!left)
- {
- db_opt_save += this_len;
- db->resize(max(start_offset, pos + this_len));
- db->setro(FALSE);
- cur_datablock_cache->resize(cur_datablock_cache->getlen() - sizeof(cached_db_size));
- return pos;
- }
- }
- }
-
- db->setro(FALSE);
-
- return start_offset;
-}
-
-int CEXEBuild::add_db_data(IMMap *mmap) // returns offset
-{
- build_compressor_set = true;
-
- int done = 0;
-
- if (!mmap)
- {
- ERROR_MSG("Error: add_db_data() called with invalid mapped file\n");
- return -1;
- }
-
- int length = mmap->getsize();
-
- if (length < 0)
- {
- ERROR_MSG("Error: add_db_data() called with length=%d\n", length);
- return -1;
- }
-
- MMapBuf *db = (MMapBuf *) cur_datablock;
-
- int st = db->getlen();
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (length && !build_compress_whole && build_compress)
- {
- // grow datablock so that there is room to compress into
- int bufferlen = length + 1024 + length / 4; // give a nice 25% extra space
- db->resize(st + bufferlen + sizeof(int));
-
- int n = compressor->Init(build_compress_level, build_compress_dict_size);
- if (n != C_OK)
- {
- ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
- extern void quit(); quit();
- }
-
- int avail_in = length;
- int avail_out = bufferlen;
- int ret;
- while (avail_in > 0)
- {
- int in_len = min(build_filebuflen, avail_in);
- int out_len = min(build_filebuflen, avail_out);
-
- compressor->SetNextIn((char *) mmap->get(length - avail_in, in_len), in_len);
- compressor->SetNextOut((char *) db->get(st + sizeof(int) + bufferlen - avail_out, out_len), out_len);
- if ((ret = compressor->Compress(0)) < 0)
- {
- ERROR_MSG("Error: add_db_data() - compress() failed(%s [%d])\n", compressor->GetErrStr(ret), ret);
- return -1;
- }
- mmap->release();
- db->flush(out_len);
- db->release();
- avail_in -= in_len - compressor->GetAvailIn();
- avail_out -= out_len - compressor->GetAvailOut();
-
- if (!avail_out)
- // not enough space in the output buffer - no compression is better
- break;
- }
-
- // if not enough space in the output buffer - no compression is better
- if (avail_out)
- {
- char *out;
-
- char a;
- compressor->SetNextIn(&a,0);
-
- do
- {
- int out_len = min(build_filebuflen, avail_out);
-
- out = (char *) db->get(st + sizeof(int) + bufferlen - avail_out, out_len);
-
- compressor->SetNextOut(out, out_len);
- if ((ret = compressor->Compress(C_FINISH)) < 0)
- {
- ERROR_MSG("Error: add_db_data() - compress() failed(%s [%d])\n", compressor->GetErrStr(ret), ret);
- return -1;
- }
-
- db->flush(out_len);
- db->release();
-
- avail_out -= out_len - compressor->GetAvailOut();
- }
- while (compressor->GetNextOut() - out > 0 && avail_out > 0);
-
- compressor->End();
-
- int used = bufferlen - avail_out;
-
- // never store compressed if output buffer is full (compression increased the size...)
- if (avail_out && (build_compress == 2 || used < length))
- {
- done=1;
- db->resize(st + used + sizeof(int));
-
- *(int*)db->get(st, sizeof(int)) = FIX_ENDIAN_INT32(used | 0x80000000);
- db->release();
-
- int nst = datablock_optimize(st, used | 0x80000000);
- if (nst == st) db_comp_save += length - used;
- else st = nst;
- }
- }
- else
- compressor->End();
- }
-#endif // NSIS_CONFIG_COMPRESSION_SUPPORT
-
- if (!done)
- {
- db->resize(st + length + sizeof(int));
- int *plen = (int *) db->get(st, sizeof(int));
- *plen = FIX_ENDIAN_INT32(length);
- db->release();
-
- int left = length;
- while (left > 0)
- {
- int l = min(build_filebuflen, left);
- int *p = (int *) db->get(st + sizeof(int) + length - left, l);
- memcpy(p, mmap->get(length - left, l), l);
- db->flush(l);
- db->release();
- mmap->release();
- left -= l;
- }
-
- st = datablock_optimize(st, length);
- }
-
- db_full_size += length + sizeof(int);
-
- return st;
-}
-
-int CEXEBuild::add_db_data(const char *data, int length) // returns offset
-{
- MMapFake fakemap;
- fakemap.set(data, length);
- return add_db_data(&fakemap);
-}
-
-int CEXEBuild::add_data(const char *data, int length, IGrowBuf *dblock) // returns offset
-{
- build_compressor_set=true;
-
- int done=0;
-
- if (length < 0)
- {
- ERROR_MSG("Error: add_data() called with length=%d\n",length);
- return -1;
- }
-
- int st=dblock->getlen();
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (!build_compress_whole && build_compress)
- {
- // grow datablock so that there is room to compress into
- int bufferlen=length+1024+length/4; // give a nice 25% extra space
- dblock->resize(st+bufferlen+sizeof(int));
-
- int n = compressor->Init(build_compress_level, build_compress_dict_size);
- if (n != C_OK)
- {
- ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
- extern void quit(); quit();
- }
-
- compressor->SetNextIn((char*)data, length);
- compressor->SetNextOut((char*)dblock->get() + st + sizeof(int), bufferlen);
-
- compressor->Compress(C_FINISH);
-
- int used=bufferlen-compressor->GetAvailOut();
-
- // never store compressed if output buffer is full
- if (compressor->GetAvailOut() && (build_compress == 2 || used < length))
- {
- done=1;
- dblock->resize(st+used+sizeof(int));
-
- *((int*)((char *)dblock->get()+st)) = FIX_ENDIAN_INT32(used|0x80000000);
- }
- compressor->End();
- }
-#endif // NSIS_CONFIG_COMPRESSION_SUPPORT
-
- if (!done)
- {
- dblock->resize(st);
- int rl = FIX_ENDIAN_INT32(length);
- dblock->add(&rl,sizeof(int));
- dblock->add(data,length);
- }
-
- return st;
-}
-
-int CEXEBuild::add_label(const char *name)
-{
- if (!build_cursection)
- {
- ERROR_MSG("Error: Label declaration not valid outside of function/section\n");
- return PS_ERROR;
- }
- if ((name[0] >= '0' && name[0] <= '9') || name[0] == '-' || name[0] == ' ' || name[0] == ':')
- {
- ERROR_MSG("Error: labels must not begin with 0-9, -, :, or a space.\n");
- return PS_ERROR;
- }
-
- int cs=build_cursection->code;
- int ce=cs+build_cursection->code_size;
-
- char *p=strdup(name);
- if (p[strlen(p)-1] == ':') p[strlen(p)-1]=0;
- int offs=ns_label.add(p,0);
- free(p);
-
- int n=cur_labels->getlen()/sizeof(section);
- if (n)
- {
- section *t=(section*)cur_labels->get();
- while (n--)
- {
- if ((*name == '.' || (t->code >= cs && t->code <= ce)) &&
- t->name_ptr==offs)
- {
- if (*name == '.') ERROR_MSG("Error: global label \"%s\" already declared\n",name);
- else
- {
- char *t = "section";
- if (build_cursection_isfunc)
- t = "function";
- ERROR_MSG("Error: label \"%s\" already declared in %s\n",name,t);
- }
- return PS_ERROR;
- }
- t++;
- }
- }
-
- section s={0};
- s.name_ptr = offs;
- s.code = ce;
- cur_labels->add(&s,sizeof(s));
-
- return PS_OK;
-}
-
-int CEXEBuild::add_function(const char *funname)
-{
- if (build_cursection_isfunc)
- {
- ERROR_MSG("Error: Function open when creating function (use FunctionEnd first)\n");
- return PS_ERROR;
- }
- if (build_cursection)
- {
- ERROR_MSG("Error: Section open when creating function (use SectionEnd first)\n");
- return PS_ERROR;
- }
- if (cur_page)
- {
- ERROR_MSG("Error: PageEx open when creating function (use PageExEnd first)\n");
- return PS_ERROR;
- }
- if (!funname[0])
- {
- ERROR_MSG("Error: Function must have a name\n");
- return PS_ERROR;
- }
-
- set_uninstall_mode(!strnicmp(funname,"un.",3));
-
- int addr=ns_func.add(funname,0);
- int x;
- int n=cur_functions->getlen()/sizeof(section);
- section *tmp=(section*)cur_functions->get();
- for (x = 0; x < n; x ++)
- {
- if (tmp[x].name_ptr == addr)
- {
- ERROR_MSG("Error: Function named \"%s\" already exists.\n",funname);
- return PS_ERROR;
- }
- }
-
- cur_functions->resize((n+1)*sizeof(section));
- build_cursection=((section*)cur_functions->get())+n;
- build_cursection_isfunc=1;
- build_cursection->name_ptr=addr;
- build_cursection->code=cur_entries->getlen()/sizeof(entry);
- build_cursection->code_size=0;
- build_cursection->install_types=0;
- build_cursection->flags=0;
- build_cursection->size_kb=0;
- memset(build_cursection->name,0,sizeof(build_cursection->name));
-
- if (uninstall_mode)
- set_code_type_predefines(funname+3);
- else
- set_code_type_predefines(funname);
-
- return PS_OK;
-}
-
-int CEXEBuild::function_end()
-{
- if (!build_cursection_isfunc)
- {
- ERROR_MSG("Error: No function open, FunctionEnd called\n");
- return PS_ERROR;
- }
- // add ret.
- add_entry_direct(EW_RET);
-
- build_cursection_isfunc=0;
- build_cursection=NULL;
-
- set_uninstall_mode(0);
-
- set_code_type_predefines();
- return PS_OK;
-}
-
-
-int CEXEBuild::section_add_flags(int flags)
-{
- if (!build_cursection || build_cursection_isfunc)
- {
- ERROR_MSG("Error: can't modify flags when no section is open\n");
- return PS_ERROR;
- }
- build_cursection->flags |= flags;
- return PS_OK;
-}
-
-int CEXEBuild::section_add_install_type(int inst_type)
-{
- if (!build_cursection || build_cursection_isfunc)
- {
- ERROR_MSG("Error: can't modify flags when no section is open\n");
- return PS_ERROR;
- }
- if (build_cursection->install_types == ~0)
- build_cursection->install_types = 0;
- build_cursection->install_types |= inst_type;
- return PS_OK;
-}
-
-void CEXEBuild::section_add_size_kb(int kb)
-{
- if (build_cursection)
- {
- build_cursection->size_kb+=kb;
- }
-}
-
-int CEXEBuild::section_end()
-{
- if (build_cursection_isfunc)
- {
- ERROR_MSG("Error: SectionEnd specified in function (not section)\n");
- return PS_ERROR;
- }
- if (!build_cursection)
- {
- ERROR_MSG("Error: SectionEnd specified and no sections open\n");
- return PS_ERROR;
- }
- add_entry_direct(EW_RET);
- build_cursection->code_size--;
- build_cursection=NULL;
- if (!sectiongroup_open_cnt)
- set_uninstall_mode(0);
-
- set_code_type_predefines();
- return PS_OK;
-}
-
-int CEXEBuild::add_section(const char *secname, const char *defname, int expand/*=0*/)
-{
- if (build_cursection_isfunc)
- {
- ERROR_MSG("Error: Section can't create section (already in function, use FunctionEnd first)\n");
- return PS_ERROR;
- }
- if (cur_page) {
- ERROR_MSG("Error: PageEx already open, call PageExEnd first\n");
- return PS_ERROR;
- }
- if (build_cursection)
- {
- ERROR_MSG("Error: Section already open, call SectionEnd first\n");
- return PS_ERROR;
- }
-
- section new_section;
- new_section.flags = SF_SELECTED;
- new_section.flags |= expand ? SF_EXPAND : 0;
- new_section.code_size = 0;
- new_section.size_kb = 0;
-
- char *name = (char*)secname;
-
- if (secname[0] == '-')
- {
- if (secname[1])
- {
- new_section.flags |= SF_SECGRP;
- name++;
- }
- else
- new_section.flags |= SF_SECGRPEND;
- }
-
- if (name[0] == '!')
- {
- name++;
- new_section.flags |= SF_BOLD;
- }
-
- int old_uninstall_mode = uninstall_mode;
-
- set_uninstall_mode(0);
-
- if (!strnicmp(name, "un.", 3))
- {
- set_uninstall_mode(1);
- name += 3;
- }
-
- if (!stricmp(name, "uninstall"))
- {
- set_uninstall_mode(1);
- }
-
- if ((new_section.flags & SF_SECGRPEND) && sectiongroup_open_cnt && old_uninstall_mode)
- {
- set_uninstall_mode(1);
- }
-
- if (sectiongroup_open_cnt)
- {
- if (uninstall_mode != old_uninstall_mode)
- {
- ERROR_MSG("Error: Can't create %s section in %s section group (use SectionGroupEnd first)\n", uninstall_mode ? "uninstaller" : "installer", old_uninstall_mode ? "uninstaller" : "installer");
- return PS_ERROR;
- }
- }
-
- new_section.code = cur_entries->getlen() / sizeof(entry);
-
- new_section.install_types = *name ? 0 : ~0;
- new_section.name_ptr = add_string(name);
- memset(&new_section.name,0,sizeof(new_section.name));
-
- cur_sections->add(&new_section, sizeof(section));
- build_cursection = (section *) cur_sections->get() + cur_header->blocks[NB_SECTIONS].num;
-
- if (defname[0])
- {
- char buf[1024];
- wsprintf(buf, "%d", cur_header->blocks[NB_SECTIONS].num);
- if (definedlist.add(defname, buf))
- {
- ERROR_MSG("Error: \"%s\" already defined, can't assign section index!\n", defname);
- return PS_ERROR;
- }
- }
-
- cur_header->blocks[NB_SECTIONS].num++;
-
- if (new_section.flags & (SF_SECGRP | SF_SECGRPEND))
- {
- add_entry_direct(EW_RET);
- build_cursection->code_size = 0;
-
- build_cursection = 0;
-
- if (new_section.flags & SF_SECGRPEND)
- {
- sectiongroup_open_cnt--;
- if (sectiongroup_open_cnt < 0)
- {
- ERROR_MSG("SectionGroupEnd: no SectionGroups are open\n");
- return PS_ERROR;
- }
- if (!sectiongroup_open_cnt)
- {
- set_uninstall_mode(0);
- }
- }
- else
- sectiongroup_open_cnt++;
- }
-
- set_code_type_predefines(name);
-
- return PS_OK;
-}
-
-int CEXEBuild::add_entry(const entry *ent)
-{
- if (!build_cursection && !uninstall_mode)
- {
- ERROR_MSG("Error: Can't add entry, no section or function is open!\n");
- return PS_ERROR;
- }
-
- cur_entries->add(ent,sizeof(entry));
- cur_instruction_entry_map->add(&multiple_entries_instruction,sizeof(int));
- build_cursection->code_size++;
- cur_header->blocks[NB_ENTRIES].num++;
-
- multiple_entries_instruction=1;
-
- return PS_OK;
-}
-
-int CEXEBuild::add_entry_direct(int which, int o0, int o1, int o2, int o3, int o4, int o5 /*o#=0*/)
-{
- entry ent;
- ent.which = which;
- ent.offsets[0] = o0;
- ent.offsets[1] = o1;
- ent.offsets[2] = o2;
- ent.offsets[3] = o3;
- ent.offsets[4] = o4;
- ent.offsets[5] = o5;
- return add_entry(&ent);
-}
-
-int CEXEBuild::resolve_jump_int(const char *fn, int *a, int offs, int start, int end)
-{
- if (*a > 0)
- {
- char *lname=(char*)ns_label.get()+*a;
- if (lname[0] == '-' || lname[0]=='+')
- {
- int jump = atoi(lname);
- int *skip_map = (int *) cur_instruction_entry_map->get();
- int maxoffs = cur_instruction_entry_map->getlen() / (int) sizeof(int);
-
- int direction = 1;
- if (jump < 0)
- direction = -1;
-
- for (; jump != 0; jump -= direction)
- {
- offs += direction;
- if (offs >= 0 && offs < maxoffs)
- {
- while (skip_map[offs])
- {
- offs += direction;
- }
- }
- }
-
- *a = offs + 1;
- }
- else
- {
- section *s = (section*)cur_labels->get();
- int n=cur_labels->getlen()/sizeof(section);
- while (n-->0)
- {
- if ((*lname == '.' || (s->code >= start && s->code <= end)) && s->name_ptr == *a)
- {
- *a = s->code+1; // jumps are to the absolute position, +1 (to differentiate between no jump, and jumping to offset 0)
- s->flags++;
- return 0;
- }
- s++;
- }
-
- ERROR_MSG("Error: could not resolve label \"%s\" in %s\n",lname,fn);
- return 1;
- }
- }
- else if (*a < 0) // to jump to a user variable target, -variable_index-1 is already stored.
- {
- }
- // otherwise, *a is 0, which means no jump and we also leave it intact
- return 0;
-}
-
-int CEXEBuild::resolve_call_int(const char *fn, const char *str, int fptr, int *ofs)
-{
- if (fptr < 0) return 0;
- int nf=cur_functions->getlen()/sizeof(section);
- section *sec=(section *)cur_functions->get();
- while (nf-- > 0)
- {
- if (sec->name_ptr>0 && sec->name_ptr == fptr)
- {
- ofs[0]=sec->code;
- sec->flags++;
- return 0;
- }
- sec++;
- }
- ERROR_MSG("Error: resolving %s function \"%s\" in %s\n",str,(char*)ns_func.get()+fptr,fn);
- ERROR_MSG("Note: uninstall functions must begin with \"un.\", and install functions must not\n");
- return 1;
-}
-
-int CEXEBuild::resolve_instruction(const char *fn, const char *str, entry *w, int offs, int start, int end)
-{
- if (w->which == EW_NOP)
- {
- if (resolve_jump_int(fn,&w->offsets[0],offs,start,end)) return 1;
- }
-#ifdef NSIS_SUPPORT_MESSAGEBOX
- else if (w->which == EW_MESSAGEBOX)
- {
- if (resolve_jump_int(fn,&w->offsets[3],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[5],offs,start,end)) return 1;
- }
-#endif
- else if (w->which == EW_IFFILEEXISTS)
- {
- if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
- }
- else if (w->which == EW_IFFLAG)
- {
- if (resolve_jump_int(fn,&w->offsets[0],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
- }
-#ifdef NSIS_SUPPORT_STROPTS
- else if (w->which == EW_STRCMP)
- {
- if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[3],offs,start,end)) return 1;
- }
-#endif
-#ifdef NSIS_SUPPORT_INTOPTS
- else if (w->which == EW_INTCMP)
- {
- if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[3],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[4],offs,start,end)) return 1;
- }
-#endif
-#ifdef NSIS_SUPPORT_HWNDS
- else if (w->which == EW_ISWINDOW)
- {
- if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
- if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
- }
-#endif
- else if (w->which == EW_CALL)
- {
- if (w->offsets[0] >= 0 && w->offsets[1]) // get as jump
- {
- if (resolve_jump_int(fn,&w->offsets[0],offs,start,end)) return 1;
- }
- else
- {
- if (w->offsets[0] >= 0 && resolve_call_int(fn,str,w->offsets[0],w->offsets)) return 1;
- // if w->offsets[0] >= 0, EW_CALL requires that it 1-based.
- // otherwise, if < 0, it needs an increment anyway (since it
- // was encoded with a -2 base, to prevent it looking like an
- // empty string "")
- w->offsets[0]++;
- }
- }
-#ifdef NSIS_SUPPORT_STROPTS
- else if (w->which == EW_GETFUNCTIONADDR)
- {
- if (w->offsets[1] < 0)
- {
- ERROR_MSG("Error: GetFunctionAddress requires a real function to get address of.\n");
- return 1;
- }
-
- if (resolve_call_int(fn,str,w->offsets[1],&w->offsets[1])) return 1;
-
- w->which=EW_ASSIGNVAR;
- w->offsets[1]=add_intstring(w->offsets[1]+1); // +1 here to make 1-based.
- }
- else if (w->which == EW_GETLABELADDR)
- {
- if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
- w->which=EW_ASSIGNVAR;
- w->offsets[1]=add_intstring(w->offsets[1]);
- }
-#endif
- return 0;
-}
-
-int CEXEBuild::resolve_coderefs(const char *str)
-{
- // resolve jumps&calls
- {
- section *sec=(section *)cur_functions->get();
- int l=cur_functions->getlen()/sizeof(section);
- entry *w=(entry *)cur_entries->get();
- while (l-- > 0)
- {
- int x;
- for (x = sec->code; x < sec->code+sec->code_size; x ++)
- {
- char fname[1024];
- wsprintf(fname,"function \"%s\"",ns_func.get()+sec->name_ptr);
- if (resolve_instruction(fname,str,w+x,x,sec->code,sec->code+sec->code_size)) return 1;
- }
- sec++;
- }
-
- int cnt=0;
- sec=(section *)cur_sections->get();
- l=cur_sections->getlen()/sizeof(section);
- while (l-- > 0)
- {
- int x=sec->name_ptr;
- char fname[1024];
- const char *section_name;
- if (x < 0)
- {
- // lang string
- section_name = "$(lang string)";
- }
- else
- {
- // normal string
- section_name = cur_strlist->get() + x;
- }
- if (x) wsprintf(fname,"%s section \"%s\" (%d)",str,section_name,cnt);
- else wsprintf(fname,"unnamed %s section (%d)",str,cnt);
- for (x = sec->code; x < sec->code+sec->code_size; x ++)
- {
- if (resolve_instruction(fname,str,w+x,x,sec->code,sec->code+sec->code_size))
- return 1;
- }
- sec++;
- cnt++;
- }
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (cur_pages->getlen()) {
- page *p=(page *)cur_pages->get();
- int i = 0;
- while (i < cur_header->blocks[NB_PAGES].num) {
- char pagestr[1024];
- wsprintf(pagestr, "%s pages", str);
- if (resolve_call_int(pagestr,p->dlg_id?"pre-page":"create-page",p->prefunc,&p->prefunc)) return 1;
- if (resolve_call_int(pagestr,"show-page",p->showfunc,&p->showfunc)) return 1;
- if (resolve_call_int(pagestr,"leave-page",p->leavefunc,&p->leavefunc)) return 1;
- p++;
- i++;
- }
- }
-#endif
-#endif
- }
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- // resolve callbacks
- {
- struct {
- char *name;
- int *p;
- } callbacks[] = {
- {"%s.onInit", &cur_header->code_onInit},
- {"%s.on%sInstSuccess", &cur_header->code_onInstSuccess},
- {"%s.on%sInstFailed", &cur_header->code_onInstFailed},
- {"%s.onUserAbort", &cur_header->code_onUserAbort},
- {"%s.onVerifyInstDir", &cur_header->code_onVerifyInstDir},
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- {"%s.onGUIInit", &cur_header->code_onGUIInit},
- {"%s.onGUIEnd", &cur_header->code_onGUIEnd},
- {"%s.onMouseOverSection", &cur_header->code_onMouseOverSection},
-#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- {"%s.onSelChange", &cur_header->code_onSelChange},
-#endif//NSIS_CONFIG_COMPONENTPAGE
-#ifdef NSIS_SUPPORT_REBOOT
- {"%s.onRebootFailed", &cur_header->code_onRebootFailed},
-#endif//NSIS_SUPPORT_REBOOT
- {0, 0}
- };
-
- for (int i = 0; callbacks[i].name; i++) {
- const char *un = uninstall_mode ? "un" : "";
- char fname[1024];
- wsprintf(fname, callbacks[i].name, un, un);
- char cbstr[1024];
- wsprintf(cbstr, "%s callback", str);
- char cbstr2[1024];
- wsprintf(cbstr2, "%s.callbacks", un);
-
- if (resolve_call_int(cbstr,cbstr2,ns_func.find(fname,0),callbacks[i].p))
- return PS_ERROR;
- }
- }
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
- // optimize unused functions
- {
- section *sec=(section *)cur_functions->get();
- int l=cur_functions->getlen()/sizeof(section);
- entry *w=(entry*)cur_entries->get();
- while (l-- > 0)
- {
- if (sec->name_ptr)
- {
- if (!sec->flags)
- {
- if (sec->code_size>0)
- {
- warning("%s function \"%s\" not referenced - zeroing code (%d-%d) out\n",str,
- ns_func.get()+sec->name_ptr,
- sec->code,sec->code+sec->code_size);
- memset(w+sec->code,0,sec->code_size*sizeof(entry));
- }
- }
- }
- sec++;
- }
- }
-
- // give warnings on unused labels
- {
- section *t=(section*)cur_labels->get();
- int n=cur_labels->getlen()/sizeof(section);
- while (n-->0)
- {
- if (!t->flags)
- {
- char *n=(char*)ns_label.get()+t->name_ptr;
- if (*n == '.') warning("global label \"%s\" not used",n);
- else warning("label \"%s\" not used",n);
- }
- t++;
- }
- }
-
- return 0;
-}
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-int CEXEBuild::add_page(int type)
-{
- page pg = {
- 0,
- 0,
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- -1,
- -1,
- -1,
-#endif
- 0,
- };
-
-#ifndef NSIS_CONFIG_LICENSEPAGE
- if (type == PAGE_LICENSE)
- {
- ERROR_MSG("Error: can't add license page, NSIS_CONFIG_LICENSEPAGE not defined.\n");
- return PS_ERROR;
- }
-#endif
-#ifndef NSIS_CONFIG_COMPONENTPAGE
- if (type == PAGE_COMPONENTS)
- {
- ERROR_MSG("Error: can't add components page, NSIS_CONFIG_COMPONENTPAGE not defined.\n");
- return PS_ERROR;
- }
-#endif
-#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (type == PAGE_COMPONENTS)
- {
- ERROR_MSG("Error: can't add uninstConfirm page, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n");
- return PS_ERROR;
- }
-#endif
-
- struct {
- int wndproc_id;
- int dlg_id;
- char *name;
- } ids[] = {
- {PWP_CUSTOM, 0, "custom"}, // custom
-#ifdef NSIS_CONFIG_LICENSEPAGE
- {PWP_LICENSE, IDD_LICENSE, "license"}, // license
-#else
- {0, IDD_LICENSE, "license"}, // license
-#endif
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- {PWP_SELCOM, IDD_SELCOM, "components"}, // components
-#else
- {0, IDD_SELCOM, "components"}, // components
-#endif
- {PWP_DIR, IDD_DIR, "directory"}, // directory
- {PWP_INSTFILES, IDD_INSTFILES, "instfiles"}, // instfiles
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- {PWP_UNINST, IDD_UNINST, "uninstConfirm"}, // uninstConfirm
-#else
- {0, IDD_UNINST, "uninstConfirm"}, // uninstConfirm
-#endif
- {PWP_COMPLETED, -1, NULL} // completed
- };
-
- pg.wndproc_id = ids[type].wndproc_id;
- pg.dlg_id = ids[type].dlg_id;
-
- cur_pages->add(&pg,sizeof(page));
-
- cur_page = (page *)cur_pages->get() + cur_header->blocks[NB_PAGES].num++;
-
- cur_page_type = type;
-
- set_code_type_predefines(ids[type].name);
- return PS_OK;
-}
-
-int CEXEBuild::page_end()
-{
- cur_page = 0;
-
- set_code_type_predefines();
- return PS_OK;
-}
-#endif
-
-#ifdef NSIS_SUPPORT_VERSION_INFO
-int CEXEBuild::AddVersionInfo()
-{
- GrowBuf VerInfoStream;
-
- if ( rVersionInfo.GetStringTablesCount() > 0 )
- {
- if ( !version_product_v[0] )
- {
- ERROR_MSG("Error: VIProductVersion is required when other version information functions are used.\n");
- return PS_ERROR;
- }
- else
- {
- int imm, iml, ilm, ill;
- if ( sscanf(version_product_v, "%d.%d.%d.%d", &imm, &iml, &ilm, &ill) != 4 )
- {
- ERROR_MSG("Error: invalid VIProductVersion format, should be X.X.X.X\n");
- return PS_ERROR;
- }
- rVersionInfo.SetFileVersion(MAKELONG(iml, imm),MAKELONG(ill, ilm));
- rVersionInfo.SetProductVersion(MAKELONG(iml, imm),MAKELONG(ill, ilm));
-
- try
- {
- init_res_editor();
- for ( int i = 0; i < rVersionInfo.GetStringTablesCount(); i++ )
- {
- LANGID lang_id = rVersionInfo.GetLangID(i);
- int code_page = rVersionInfo.GetCodePage(i);
-
- char *lang_name = GetLangNameAndCP(lang_id);
-
- if ( !rVersionInfo.FindKey(lang_id, code_page, "FileVersion") )
- warning("Generating version information for language \"%04d-%s\" without standard key \"FileVersion\"", lang_id, lang_name);
- if ( !rVersionInfo.FindKey(lang_id, code_page, "FileDescription") )
- warning("Generating version information for language \"%04d-%s\" without standard key \"FileDescription\"", lang_id, lang_name);
- if ( !rVersionInfo.FindKey(lang_id, code_page, "LegalCopyright") )
- warning("Generating version information for language \"%04d-%s\" without standard key \"LegalCopyright\"", lang_id, lang_name);
-
- rVersionInfo.ExportToStream(VerInfoStream, i);
- res_editor->UpdateResourceA(RT_VERSION, 1, lang_id, (BYTE*)VerInfoStream.get(), VerInfoStream.getlen());
- }
- }
- catch (exception& err) {
- ERROR_MSG("Error adding version information: %s\n", err.what());
- return PS_ERROR;
- }
- }
- }
-
- return PS_OK;
-}
-#endif // NSIS_SUPPORT_VERSION_INFO
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-int CEXEBuild::ProcessPages()
-{
- SCRIPT_MSG("Processing pages... ");
-
- int license_normal=0;
- int license_fsrb=0;
- int license_fscb=0;
- int selcom=0;
- int dir=0, dir_used;
- int uninstconfirm=0;
- int instlog=0, instlog_used;
- int main=0;
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
-again:
-#endif
-
- dir_used = 0;
- instlog_used = 0;
-
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- if ((cur_header->flags & (CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) == 0)
-#endif
- {
- main++;
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
-#define LS(inst, uninst) (uninstall_mode ? uninst : inst)
-#else
-#define LS(inst, uninst) inst
-#endif
-
- DefineInnerLangString(NLF_BRANDING);
-
- if (!cur_pages->getlen()) {
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (uninstall_mode) {
- if (HasUserDefined(NLF_UNINST_TEXT)) {
- add_page(PAGE_UNINSTCONFIRM);
- page_end();
- }
- add_page(PAGE_INSTFILES);
- page_end();
- add_page(PAGE_COMPLETED);
- page_end();
- }
- else
-#endif
- {
-#ifdef NSIS_CONFIG_LICENSEPAGE
- if (HasUserDefined(NLF_LICENSE_TEXT) && HasUserDefined(NLF_LICENSE_DATA)) {
- add_page(PAGE_LICENSE);
- page_end();
- }
-#endif
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- if (HasUserDefined(NLF_COMP_TEXT)) {
- add_page(PAGE_COMPONENTS);
- page_end();
- }
-#endif
- if (HasUserDefined(NLF_DIR_TEXT)) {
- add_page(PAGE_DIRECTORY);
- page_end();
- }
- add_page(PAGE_INSTFILES);
- page_end();
- add_page(PAGE_COMPLETED);
- page_end();
- }
- }
- // start processing the pages
- {
- int i = 0;
- page *p = (page *) cur_pages->get();
-
- for (i = 0; i < cur_header->blocks[NB_PAGES].num; i++, p++) {
- page *pp = 0;
-
- if (i) {
- pp = p - 1;
-
- // set back button
- p->flags |= PF_BACK_SHOW;
- if (pp->wndproc_id != PWP_COMPLETED && p->wndproc_id != PWP_COMPLETED && p->wndproc_id != PWP_INSTFILES)
- p->flags |= PF_BACK_ENABLE;
- if (!p->back)
- p->back = DefineInnerLangString(NLF_BTN_BACK);
-
- // set previous page's next button
- if (!pp->next) {
- int str = 0;
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
- if (pp->wndproc_id == PWP_LICENSE && (!(pp->flags & PF_LICENSE_FORCE_SELECTION) || HasUserDefined(NLF_BTN_LICENSE)))
- str = NLF_BTN_LICENSE;
- else
-#endif
- if (p->wndproc_id == PWP_INSTFILES)
- str = LS(NLF_BTN_INSTALL, NLF_BTN_UNINSTALL);
- else
- str = NLF_BTN_NEXT;
-
- pp->next = DefineInnerLangString(str);
- }
-
- // set previous page's click next text
- if (!pp->clicknext) {
- int str = 0;
-
- if (p->wndproc_id == PWP_INSTFILES)
- str = LS(NLF_CLICK_INSTALL, NLF_CLICK_UNINSTALL);
- else
- str = NLF_CLICK_NEXT;
-
- pp->clicknext = DefineInnerLangString(str);
- }
- }
-
- // enable next button
- if (p->wndproc_id != PWP_INSTFILES)
- p->flags |= PF_NEXT_ENABLE;
-
- // set cancel button
- if (!p->cancel)
- p->cancel = DefineInnerLangString(NLF_BTN_CANCEL);
- if (p->wndproc_id != PWP_INSTFILES && p->wndproc_id != PWP_COMPLETED)
- p->flags |= PF_CANCEL_ENABLE;
-
- // set caption
- struct {
- int caption;
- int ucaption;
- } captions[] = {
-#ifdef NSIS_CONFIG_LICENSEPAGE
- {NLF_SUBCAPTION_LICENSE, NLF_SUBCAPTION_LICENSE},
-#endif
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- {NLF_SUBCAPTION_OPTIONS, NLF_SUBCAPTION_OPTIONS},
-#endif
- {NLF_SUBCAPTION_DIR, NLF_SUBCAPTION_DIR},
- {NLF_SUBCAPTION_INSTFILES, NLF_USUBCAPTION_INSTFILES},
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- {NLF_USUBCAPTION_CONFIRM, NLF_USUBCAPTION_CONFIRM},
-#endif
- {NLF_SUBCAPTION_COMPLETED, NLF_USUBCAPTION_COMPLETED}
- };
-
- if (!p->caption && p->wndproc_id != PWP_CUSTOM) {
- p->caption = DefineInnerLangString(LS(captions[p->wndproc_id].caption, captions[p->wndproc_id].ucaption));
- }
-
- // set texts
- switch (p->dlg_id) {
-#ifdef NSIS_CONFIG_LICENSEPAGE
- case IDD_LICENSE:
- case IDD_LICENSE_FSRB:
- case IDD_LICENSE_FSCB:
- {
- if (!(p->flags & PF_PAGE_EX))
- p->dlg_id = license_res_id;
- if (!(p->flags & (PF_LICENSE_FORCE_SELECTION | PF_LICENSE_NO_FORCE_SELECTION)))
- p->dlg_id = license_res_id;
-
- p->flags |= PF_NO_NEXT_FOCUS;
-
- if (!p->parms[1])
- p->parms[1] = DefineInnerLangString(NLF_LICENSE_DATA, 0);
-
- if (p->dlg_id == IDD_LICENSE) {
- if (!p->parms[0])
- p->parms[0] = DefineInnerLangString(LS(NLF_LICENSE_TEXT, NLF_ULICENSE_TEXT));
-
- license_normal++;
- }
- else if (p->dlg_id == IDD_LICENSE_FSCB) {
- p->flags |= PF_LICENSE_FORCE_SELECTION;
-
- if (!p->parms[0])
- p->parms[0] = DefineInnerLangString(LS(NLF_LICENSE_TEXT_FSCB, NLF_ULICENSE_TEXT_FSCB));
- if (!p->parms[2])
- p->parms[2] = DefineInnerLangString(NLF_BTN_LICENSE_AGREE);
-
- license_fscb++;
- }
- else if (p->dlg_id == IDD_LICENSE_FSRB) {
- p->flags |= PF_LICENSE_FORCE_SELECTION;
-
- if (!p->parms[0])
- p->parms[0] = DefineInnerLangString(LS(NLF_LICENSE_TEXT_FSRB, NLF_ULICENSE_TEXT_FSRB));
- if (!p->parms[2])
- p->parms[2] = DefineInnerLangString(NLF_BTN_LICENSE_AGREE);
- if (!p->parms[3])
- p->parms[3] = DefineInnerLangString(NLF_BTN_LICENSE_DISAGREE);
-
- license_fsrb++;
- }
- break;
- }
-#endif
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- case IDD_SELCOM:
- {
- if (!p->parms[0])
- p->parms[0] = DefineInnerLangString(LS(NLF_COMP_TEXT, NLF_UCOMP_TEXT));
- if (!p->parms[1])
- p->parms[1] = DefineInnerLangString(LS(NLF_COMP_SUBTEXT1, NLF_UCOMP_SUBTEXT1));
- if (!p->parms[2])
- p->parms[2] = DefineInnerLangString(LS(NLF_COMP_SUBTEXT2, NLF_UCOMP_SUBTEXT2));
- if (!p->parms[3] && !uninstall_mode && HasUserDefined(NLF_COMP_SUBTEXT1))
- p->parms[3] = p->parms[1];
- if (!p->parms[4] && !uninstall_mode && HasUserDefined(NLF_COMP_SUBTEXT2))
- p->parms[4] = p->parms[2];
- else if (!p->parms[4])
- p->parms[4] = DefineInnerLangString(LS(NLF_COMP_SUBTEXT1_NO_INST_TYPES, NLF_UCOMP_SUBTEXT1_NO_INST_TYPES));
-
- DefineInnerLangString(NLF_SPACE_REQ);
- DefineInnerLangString(NLF_BYTE);
- DefineInnerLangString(NLF_KILO);
- DefineInnerLangString(NLF_MEGA);
- DefineInnerLangString(NLF_GIGA);
-
- selcom++;
- break;
- }
-#endif
- case IDD_DIR:
- {
- if (!p->parms[0])
- p->parms[0] = DefineInnerLangString(LS(NLF_DIR_TEXT, NLF_UDIR_TEXT));
- if (!p->parms[1])
- p->parms[1] = DefineInnerLangString(LS(NLF_DIR_SUBTEXT, NLF_UDIR_SUBTEXT));
- if (!p->parms[2])
- p->parms[2] = DefineInnerLangString(NLF_BTN_BROWSE);
- if (!p->parms[3])
- p->parms[3] = DefineInnerLangString(LS(NLF_DIR_BROWSETEXT, NLF_UDIR_BROWSETEXT));
- if (!p->parms[4])
- p->parms[4] = m_UserVarNames.get("INSTDIR");
- else
- p->parms[4]--;
-
- DefineInnerLangString(NLF_SPACE_AVAIL);
- DefineInnerLangString(NLF_SPACE_REQ);
- DefineInnerLangString(NLF_BYTE);
- DefineInnerLangString(NLF_KILO);
- DefineInnerLangString(NLF_MEGA);
- DefineInnerLangString(NLF_GIGA);
-#ifdef NSIS_CONFIG_LOG
- DefineInnerLangString(NLF_LOG_INSTALL_PROCESS);
-#endif
-
- dir++;
- break;
- }
- case IDD_INSTFILES:
- {
- if (!p->parms[1])
- p->parms[1] = DefineInnerLangString(NLF_BTN_DETAILS);
- if (!p->parms[2])
- p->parms[2] = DefineInnerLangString(NLF_COMPLETED);
-
- DefineInnerLangString(NLF_COPY_DETAILS);
-
- instlog++;
- instlog_used++;
- break;
- }
- case IDD_UNINST:
- {
- if (!p->parms[0])
- p->parms[0] = DefineInnerLangString(NLF_UNINST_TEXT);
- if (!p->parms[1])
- p->parms[1] = DefineInnerLangString(NLF_UNINST_SUBTEXT);
- if (!p->parms[4])
- p->parms[4] = m_UserVarNames.get("INSTDIR");
- else
- p->parms[4]--;
-
- uninstconfirm++;
- break;
- }
- }
-
- p->flags &= ~PF_PAGE_EX;
- }
-
- p--;
-
- if (!p->next)
- p->next = DefineInnerLangString(NLF_BTN_CLOSE);
- if (p->wndproc_id == PWP_COMPLETED)
- (p-1)->next = DefineInnerLangString(NLF_BTN_CLOSE);
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (uninstall_mode) {
- if (!uenable_last_page_cancel && instlog_used)
- p->flags &= ~PF_CANCEL_ENABLE;
- }
- else
-#endif
- {
- if (!enable_last_page_cancel && instlog_used)
- p->flags &= ~PF_CANCEL_ENABLE;
- }
-
- if (!instlog_used) {
- warning("%sage instfiles not used, no sections will be executed!", uninstall_mode ? "Uninstall p" : "P");
- }
- }
- }
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!uninstall_mode) {
- set_uninstall_mode(1);
- goto again;
- }
- else
- set_uninstall_mode(0);
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-
-
- SCRIPT_MSG("Done!\n");
-
-#define REMOVE_ICON(id) if (disable_window_icon) { \
- BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG); \
- if (dlg) { \
- CDialogTemplate dt(dlg,uDefCodePage); \
- res_editor->FreeResource(dlg); \
- if (dt.RemoveItem(IDC_ULICON)) { \
- DialogItemTemplate* text = dt.GetItem(IDC_INTROTEXT); \
- DialogItemTemplate* prog = dt.GetItem(IDC_PROGRESS); \
- if (text) { \
- text->sWidth += text->sX; \
- text->sX = 0; \
- } \
- if (prog) { \
- prog->sWidth += prog->sX; \
- prog->sX = 0; \
- } \
- \
- DWORD dwSize; \
- dlg = dt.Save(dwSize); \
- res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG, dlg, dwSize); \
- delete [] dlg; \
- } \
- } \
- }
-
- try {
- SCRIPT_MSG("Removing unused resources... ");
- init_res_editor();
-#ifdef NSIS_CONFIG_LICENSEPAGE
- if (!license_normal) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_LICENSE, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_LICENSE);
- if (!license_fsrb) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_LICENSE_FSRB, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_LICENSE_FSRB);
- if (!license_fscb) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_LICENSE_FSCB, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_LICENSE_FSCB);
-#endif // NSIS_CONFIG_LICENSEPAGE
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- if (!selcom) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_SELCOM, NSIS_DEFAULT_LANG, 0, 0);
- res_editor->UpdateResourceA(RT_BITMAP, IDB_BITMAP1, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_SELCOM);
-#endif // NSIS_CONFIG_COMPONENTPAGE
- if (!dir) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_DIR, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_DIR);
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!uninstconfirm) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_UNINST, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_UNINST);
-#endif // NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!instlog) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_INSTFILES, NSIS_DEFAULT_LANG, 0, 0);
- }
- else REMOVE_ICON(IDD_INSTFILES);
- if (!main) {
- res_editor->UpdateResourceA(RT_DIALOG, IDD_INST, NSIS_DEFAULT_LANG, 0, 0);
- if (!build_compress_whole && !build_crcchk)
- res_editor->UpdateResourceA(RT_DIALOG, IDD_VERIFY, NSIS_DEFAULT_LANG, 0, 0);
- }
-
- SCRIPT_MSG("Done!\n");
- }
- catch (exception& err) {
- ERROR_MSG("\nError: %s\n", err.what());
- return PS_ERROR;
- }
-
- return PS_OK;
-}
-#endif // NSIS_CONFIG_VISIBLE_SUPPORT
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
-void CEXEBuild::PrepareInstTypes()
-{
- if (!(cur_header->flags & CH_FLAGS_NO_CUSTOM))
- cur_header->install_types[NSIS_MAX_INST_TYPES] = DefineInnerLangString(NLF_COMP_CUSTOM);
-
- // set insttype list for RO sections that didn't use SectionIn
- int i = cur_header->blocks[NB_SECTIONS].num;
- section *sections = (section *) cur_sections->get();
-
- while (i--)
- {
- if (sections[i].flags & SF_RO && !sections[i].install_types)
- sections[i].install_types = ~0;
- }
-
- // set selection to first insttype
- if (cur_header->install_types[0])
- {
- int i = cur_header->blocks[NB_SECTIONS].num;
- section *sections = (section *) cur_sections->get();
-
- // if /o was used abort since the user did his manual choice
- while (i--)
- if ((sections[i].flags & SF_SELECTED) == 0)
- return;
-
- i = cur_header->blocks[NB_SECTIONS].num;
-
- while (i--)
- if ((sections[i].install_types & 1) == 0)
- sections[i].flags &= ~SF_SELECTED;
- }
-}
-#endif
-
-void CEXEBuild::AddStandardStrings()
-{
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (uninstall_mode)
- {
- cur_header->str_uninstchild = add_string("$TEMP\\$1u_.exe");
- cur_header->str_uninstcmd = add_string("\"$TEMP\\$1u_.exe\" $0 _?=$INSTDIR\\");
- }
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- cur_header->str_wininit = add_string("$WINDIR\\wininit.ini");
-#endif//NSIS_SUPPORT_MOVEONREBOOT
-}
-
-void CEXEBuild::PrepareHeaders(IGrowBuf *hdrbuf)
-{
- GrowBuf blocks_buf;
- growbuf_writer_sink sink(&blocks_buf);
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- cur_header->blocks[NB_PAGES].offset = sizeof(header) + blocks_buf.getlen();
- page_writer::write_block(cur_pages, &sink);
-#endif
-
- cur_header->blocks[NB_SECTIONS].offset = sizeof(header) + blocks_buf.getlen();
- section_writer::write_block(cur_sections, &sink);
-
- cur_header->blocks[NB_ENTRIES].offset = sizeof(header) + blocks_buf.getlen();
- entry_writer::write_block(cur_entries, &sink);
-
- cur_header->blocks[NB_STRINGS].offset = sizeof(header) + blocks_buf.getlen();
- blocks_buf.add(cur_strlist->get(), cur_strlist->getlen());
-
- cur_header->blocks[NB_LANGTABLES].offset = sizeof(header) + blocks_buf.getlen();
- lang_table_writer::write_block(cur_langtables, &sink, cur_header->langtable_size);
-
- cur_header->blocks[NB_CTLCOLORS].offset = sizeof(header) + blocks_buf.getlen();
- ctlcolors_writer::write_block(cur_ctlcolors, &sink);
-
-#ifdef NSIS_SUPPORT_BGBG
- if (cur_header->bg_color1 != -1)
- {
- bg_font.lfFaceName[LF_FACESIZE-1] = 0;
-
- cur_header->blocks[NB_BGFONT].offset = sizeof(header) + blocks_buf.getlen();
-
- LOGFONT_writer w(&sink);
- w.write(&bg_font);
- }
-#endif
-
- growbuf_writer_sink sink2(hdrbuf);
- header_writer header(&sink2);
- header.write(cur_header);
-
- sink2.write_growbuf(&blocks_buf);
-}
-
-int CEXEBuild::SetVarsSection()
-{
- try {
- init_res_editor();
-
- VerifyDeclaredUserVarRefs(&m_UserVarNames);
- int MaxUserVars = m_UserVarNames.getnum();
- // -1 because the default size is 1
- if (!res_editor->AddExtraVirtualSize2PESection(NSIS_VARS_SECTION, (MaxUserVars - 1) * sizeof(NSIS_STRING)))
- {
- ERROR_MSG("Internal compiler error #12346: invalid exehead cannot find section \"%s\"!\n", NSIS_VARS_SECTION);
- return PS_ERROR;
- }
- }
- catch (exception& err) {
- ERROR_MSG("\nError: %s\n", err.what());
- return PS_ERROR;
- }
-
- return PS_OK;
-}
-
-int CEXEBuild::SetManifest()
-{
- try {
- init_res_editor();
-
- string manifest = manifest::generate(manifest_comctl, manifest_exec_level);
-
- if (manifest == "")
- return PS_OK;
-
- res_editor->UpdateResourceA(MAKEINTRESOURCE(24), MAKEINTRESOURCE(1), NSIS_DEFAULT_LANG, (LPBYTE) manifest.c_str(), manifest.length());
- }
- catch (exception& err) {
- ERROR_MSG("Error while setting manifest: %s\n", err.what());
- return PS_ERROR;
- }
-
- return PS_OK;
-}
-
-int CEXEBuild::check_write_output_errors() const
-{
- if (has_called_write_output)
- {
- ERROR_MSG("Error (write_output): write_output already called, can't continue\n");
- return PS_ERROR;
- }
-
- if (!build_output_filename[0])
- {
- ERROR_MSG("Error: invalid script: never had OutFile command\n");
- return PS_ERROR;
- }
-
- if (!build_sections.getlen())
- {
- ERROR_MSG("Error: invalid script: no sections specified\n");
- return PS_ERROR;
- }
-
- if (!build_entries.getlen())
- {
- ERROR_MSG("Error: invalid script: no entries specified\n");
- return PS_ERROR;
- }
-
- if (build_cursection)
- {
- ERROR_MSG("Error: Section left open at EOF\n");
- return PS_ERROR;
- }
-
- if (sectiongroup_open_cnt)
- {
- ERROR_MSG("Error: SectionGroup left open at EOF\n");
- return PS_ERROR;
- }
-
- if (cur_page)
- {
- ERROR_MSG("Error: PageEx left open at EOF\n");
- return PS_ERROR;
- }
-
- // deal with functions, for both install and uninstall modes.
- if (build_cursection_isfunc)
- {
- ERROR_MSG("Error: Function left open at EOF\n");
- return PS_ERROR;
- }
-
- return PS_OK;
-}
-
-int CEXEBuild::prepare_uninstaller() {
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (ubuild_entries.getlen())
- {
- if (!uninstaller_writes_used)
- {
- warning("Uninstaller script code found but WriteUninstaller never used - no uninstaller will be created.");
- return PS_OK;
- }
-
- build_uninst.flags|=build_header.flags&(CH_FLAGS_PROGRESS_COLORED|CH_FLAGS_NO_ROOT_DIR);
-
- set_uninstall_mode(1);
-
- DefineInnerLangString(NLF_UCAPTION);
-
- if (resolve_coderefs("uninstall"))
- return PS_ERROR;
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- // set sections to the first insttype
- PrepareInstTypes();
-#endif
-
- // Add standard strings to string table
- AddStandardStrings();
-
- set_uninstall_mode(0);
- }
- else if (uninstaller_writes_used)
- {
- ERROR_MSG("Error: no Uninstall section specified, but WriteUninstaller used %d time(s)\n",uninstaller_writes_used);
- return PS_ERROR;
- }
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
- return PS_OK;
-}
-
-int CEXEBuild::pack_exe_header()
-{
- if (!(build_packname[0] && build_packcmd[0])) {
- // header not asked to be packed
- return PS_OK;
- }
-
- // write out exe header, pack, read back in, and
- // update the header info
- FILE *tmpfile=FOPEN(build_packname,"wb");
- if (!tmpfile)
- {
- ERROR_MSG("Error: writing temporary file \"%s\" for pack\n",build_packname);
- return PS_ERROR;
- }
- fwrite(m_exehead,1,m_exehead_size,tmpfile);
- fclose(tmpfile);
- if (sane_system(build_packcmd) == -1)
- {
- remove(build_packname);
- ERROR_MSG("Error: calling packer on \"%s\"\n",build_packname);
- return PS_ERROR;
- }
-
- int result = update_exehead(build_packname);
- remove(build_packname);
-
- if (result != PS_OK)
- {
- ERROR_MSG("Error: reading temporary file \"%s\" after pack\n",build_packname);
- return result;
- }
-
- return PS_OK;
-}
-
-int CEXEBuild::write_output(void)
-{
-#ifndef NSIS_CONFIG_CRC_SUPPORT
- build_crcchk=0;
-#endif
-
- RET_UNLESS_OK( check_write_output_errors() );
-
- has_called_write_output=true;
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- RET_UNLESS_OK( add_plugins_dir_initializer() );
-#endif //NSIS_CONFIG_PLUGIN_SUPPORT
-
-#ifdef NSIS_SUPPORT_VERSION_INFO
- RET_UNLESS_OK( AddVersionInfo() );
-#endif //NSIS_SUPPORT_VERSION_INFO
-
- RET_UNLESS_OK( prepare_uninstaller() );
-
- DefineInnerLangString(NLF_CAPTION);
- if (resolve_coderefs("install"))
- return PS_ERROR;
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- // set sections to the first insttype
- PrepareInstTypes();
-#endif
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- RET_UNLESS_OK( ProcessPages() );
-#endif //NSIS_CONFIG_VISIBLE_SUPPORT
-
- // Generate language tables
- RET_UNLESS_OK( GenerateLangTables() );
-
- // Setup user variables PE section
- RET_UNLESS_OK( SetVarsSection() );
-
- // Set XML manifest
- RET_UNLESS_OK( SetManifest() );
-
- // Add standard strings to string table
- AddStandardStrings();
-
- try {
- // Save all changes to the exe header
- close_res_editor();
- }
- catch (exception& err) {
- ERROR_MSG("\nError: %s\n", err.what());
- return PS_ERROR;
- }
-
- RET_UNLESS_OK( pack_exe_header() );
-
-
- build_optimize_datablock=0;
-
- int data_block_size_before_uninst = build_datablock.getlen();
-
- RET_UNLESS_OK( uninstall_generate() );
-
- crc32_t crc=0;
-
- {
- string full_path = get_full_path(build_output_filename);
- notify(MAKENSIS_NOTIFY_OUTPUT, full_path.c_str());
- INFO_MSG("\nOutput: \"%s\"\n", full_path.c_str());
- }
-
- FILE *fp = FOPEN(build_output_filename,"w+b");
- if (!fp)
- {
- ERROR_MSG("Can't open output file\n");
- return PS_ERROR;
- }
-
- if (fwrite(m_exehead,1,m_exehead_size,fp) != m_exehead_size)
- {
- ERROR_MSG("Error: can't write %d bytes to output\n",m_exehead_size);
- fclose(fp);
- return PS_ERROR;
- }
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- #ifdef NSIS_CONFIG_CRC_ANAL
- crc=CRC32(crc,m_exehead,m_exehead_size);
- #else
- crc=CRC32(crc,m_exehead+512,m_exehead_size-512);
- #endif
-#endif
-
- firstheader fh={0,};
- fh.nsinst[0]=FH_INT1;
- fh.nsinst[1]=FH_INT2;
- fh.nsinst[2]=FH_INT3;
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- fh.flags=(build_crcchk?(build_crcchk==2?FH_FLAGS_FORCE_CRC:0):FH_FLAGS_NO_CRC);
-#else
- fh.flags=0;
-#endif
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) fh.flags |= FH_FLAGS_SILENT;
-#endif
- fh.siginfo=FH_SIG;
-
- int installinfo_compressed;
- int fd_start = 0;
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (build_compress_whole)
- {
- int n = compressor->Init(build_compress_level, build_compress_dict_size);
- if (n != C_OK)
- {
- ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
- return PS_ERROR;
- }
- }
-#endif
-
- {
- GrowBuf ihd;
- {
- GrowBuf hdrcomp;
-
- PrepareHeaders(&hdrcomp);
-
- if (add_data((char*)hdrcomp.get(),hdrcomp.getlen(),&ihd) < 0)
- return PS_ERROR;
-
- fh.length_of_header=hdrcomp.getlen();
- installinfo_compressed=ihd.getlen();
- }
-
- if (!build_compress_whole)
- fh.length_of_all_following_data=ihd.getlen()+build_datablock.getlen()+(int)sizeof(firstheader)+(build_crcchk?sizeof(crc32_t):0);
- else
- fd_start=ftell(fp);
-
- try
- {
- file_writer_sink sink(fp);
- firstheader_writer w(&sink);
- w.write(&fh);
- }
- catch (...)
- {
- ERROR_MSG("Error: can't write %d bytes to output\n",sizeof(fh));
- fclose(fp);
- return PS_ERROR;
- }
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (build_compress_whole) {
- if (deflateToFile(fp,(char*)ihd.get(),ihd.getlen()))
- {
- fclose(fp);
- return PS_ERROR;
- }
- }
- else
-#endif
- {
- if (fwrite(ihd.get(),1,ihd.getlen(),fp) != (unsigned int)ihd.getlen())
- {
- ERROR_MSG("Error: can't write %d bytes to output\n",ihd.getlen());
- fclose(fp);
- return PS_ERROR;
- }
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- crc_writer_sink crc_sink((crc32_t *) &crc);
- firstheader_writer w(&crc_sink);
- w.write(&fh);
-
- crc=CRC32(crc,(unsigned char*)ihd.get(),ihd.getlen());
-#endif
- }
- }
-
- INFO_MSG("Install: ");
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- int np=build_header.blocks[NB_PAGES].num;
- INFO_MSG("%d page%s (%d bytes), ",np,np==1?"":"s",np*sizeof(page));
-#endif
- {
- int ns=build_sections.getlen()/sizeof(section);
- section *s=(section*)build_sections.get();
- int x;
- int req=0;
- for (x = 1; x < ns; x ++)
- {
- if (!s[x].name_ptr || s[x].flags & SF_RO) req++;
- }
- INFO_MSG("%d section%s",ns,ns==1?"":"s");
- if (req)
- {
- INFO_MSG(" (%d required)",req);
- }
- INFO_MSG(" (%d bytes), ", build_sections.getlen());
- }
- int ne=build_header.blocks[NB_ENTRIES].num;
- INFO_MSG("%d instruction%s (%d bytes), ",ne,ne==1?"":"s",ne*sizeof(entry));
- int ns=build_strlist.getnum();
- INFO_MSG("%d string%s (%d bytes), ",ns,ns==1?"":"s",build_strlist.getlen());
- int nlt=build_header.blocks[NB_LANGTABLES].num;
- INFO_MSG("%d language table%s (%d bytes).\n",nlt,nlt==1?"":"s",build_langtables.getlen());
- if (ubuild_entries.getlen())
- {
- INFO_MSG("Uninstall: ");
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- np=build_uninst.blocks[NB_PAGES].num;
- INFO_MSG("%d page%s (%d bytes), \n",np,np==1?"":"s",ubuild_pages.getlen());
-#endif
- {
- int ns=ubuild_sections.getlen()/sizeof(section);
- section *s=(section*)ubuild_sections.get();
- int x;
- int req=0;
- for (x = 1; x < ns; x ++)
- {
- if (!s[x].name_ptr || s[x].flags & SF_RO) req++;
- }
- INFO_MSG("%d section%s",ns,ns==1?"":"s");
- if (req)
- {
- INFO_MSG(" (%d required)",req);
- }
- INFO_MSG(" (%d bytes), ", ubuild_sections.getlen());
- }
- ne=build_uninst.blocks[NB_ENTRIES].num;
- INFO_MSG("%d instruction%s (%d bytes), ",ne,ne==1?"":"s",ubuild_entries.getlen());
- ns=ubuild_strlist.getnum();
- INFO_MSG("%d string%s (%d bytes), ",ns,ns==1?"":"s",ubuild_strlist.getlen());
- nlt=build_uninst.blocks[NB_LANGTABLES].num;
- INFO_MSG("%d language table%s (%d bytes).\n",nlt,nlt==1?"":"s",ubuild_langtables.getlen());
- }
-
-
- if (db_opt_save)
- {
- int total_out_size_estimate=
- m_exehead_size+sizeof(fh)+build_datablock.getlen()+(build_crcchk?sizeof(crc32_t):0);
- int pc=(int)(((INT64)db_opt_save*1000)/(db_opt_save+total_out_size_estimate));
- INFO_MSG("Datablock optimizer saved %d bytes (~%d.%d%%).\n",db_opt_save,
- pc/10,pc%10);
- }
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- INFO_MSG("\nUsing %s%s compression.\n\n", compressor->GetName(), build_compress_whole?" (compress whole)":"");
-#endif
-
- unsigned int total_usize=m_exehead_original_size;
-
- INFO_MSG("EXE header size: %10d / %d bytes\n",m_exehead_size,m_exehead_original_size);
-
- if (build_compress_whole) {
- INFO_MSG("Install code: (%d bytes)\n",
- sizeof(fh)+fh.length_of_header);
- }
- else {
- INFO_MSG("Install code: %10d / %d bytes\n",
- sizeof(fh)+installinfo_compressed,
- sizeof(fh)+fh.length_of_header);
- }
-
- total_usize+=sizeof(fh)+fh.length_of_header;
-
- {
- int dbsize, dbsizeu;
- dbsize = build_datablock.getlen();
- if (uninstall_size>0) dbsize-=uninstall_size;
-
- if (build_compress_whole) {
- dbsizeu=dbsize;
- INFO_MSG("Install data: (%d bytes)\n",dbsizeu);
- }
- else {
- dbsizeu = db_full_size - uninstall_size_full;
- INFO_MSG("Install data: %10d / %d bytes\n",dbsize,dbsizeu);
- }
- total_usize+=dbsizeu;
- }
-
- if (uninstall_size>=0)
- {
- if (build_compress_whole)
- INFO_MSG("Uninstall code+data: (%d bytes)\n",uninstall_size_full);
- else
- INFO_MSG("Uninstall code+data: %6d / %d bytes\n",uninstall_size,uninstall_size_full);
- total_usize+=uninstall_size_full;
- }
-
- if (build_compress_whole) {
- INFO_MSG("Compressed data: ");
- }
-
- if (build_datablock.getlen())
- {
- build_datablock.setro(TRUE);
- int dbl = build_datablock.getlen();
- int left = dbl;
- while (left > 0)
- {
- int l = min(build_filebuflen, left);
- char *dbptr = (char *) build_datablock.get(dbl - left, l);
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (build_compress_whole)
- {
- if (deflateToFile(fp,dbptr,l))
- {
- fclose(fp);
- return PS_ERROR;
- }
- }
- else
-#endif
- {
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- crc=CRC32(crc,(unsigned char *)dbptr,l);
-#endif
- if ((int)fwrite(dbptr,1,l,fp) != l)
- {
- ERROR_MSG("Error: can't write %d bytes to output\n",l);
- fclose(fp);
- return PS_ERROR;
- }
- fflush(fp);
- }
- build_datablock.release();
- left -= l;
- }
- build_datablock.setro(FALSE);
- build_datablock.clear();
- }
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (build_compress_whole)
- {
- if (deflateToFile(fp,NULL,0))
- {
- fclose(fp);
- return PS_ERROR;
- }
- compressor->End();
-
- unsigned fend = ftell(fp);
-
- fh.length_of_all_following_data=ftell(fp)-fd_start+(build_crcchk?sizeof(crc32_t):0);
- INFO_MSG(
- "%10d / %d bytes\n",
- ftell(fp) - fd_start,
- data_block_size_before_uninst + fh.length_of_header + sizeof(firstheader) + uninstall_size_full
- );
-
- fseek(fp,fd_start,SEEK_SET);
-
- try
- {
- file_writer_sink sink(fp);
- firstheader_writer w(&sink);
- w.write(&fh);
- }
- catch (...)
- {
- ERROR_MSG("Error: can't write %d bytes to output\n",sizeof(fh));
- fclose(fp);
- return PS_ERROR;
- }
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- if (build_crcchk)
- {
- // check rest of CRC
- fseek(fp,fd_start,SEEK_SET);
- for (;;)
- {
- char buf[32768];
- int l=fread(buf,1,sizeof(buf),fp);
- if (!l) break;
- crc=CRC32(crc,(unsigned char *)buf,l);
- }
- }
-#endif
- fseek(fp,fend,SEEK_SET); // reset eof flag
- }
-#endif
-
- if (build_crcchk)
- {
- total_usize+=sizeof(int);
- int rcrc = FIX_ENDIAN_INT32(crc);
- if (fwrite(&rcrc,1,sizeof(crc32_t),fp) != sizeof(crc32_t))
- {
- ERROR_MSG("Error: can't write %d bytes to output\n",sizeof(crc32_t));
- fclose(fp);
- return PS_ERROR;
- }
- INFO_MSG("CRC (0x%08X): 4 / 4 bytes\n",crc);
- }
- INFO_MSG("\n");
- {
- UINT pc=(UINT)(((UINT64)ftell(fp)*1000)/(total_usize));
- INFO_MSG("Total size: %10u / %u bytes (%u.%u%%)\n",
- ftell(fp),total_usize,pc/10,pc%10);
- }
- fclose(fp);
- print_warnings();
- return PS_OK;
-}
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
-int CEXEBuild::deflateToFile(FILE *fp, char *buf, int len) // len==0 to flush
-{
- build_compressor_set=true;
-
- char obuf[65536];
- bool flush=false;
- compressor->SetNextIn(buf,len);
- if (!buf||!len)
- {
- char a;
- compressor->SetNextIn(&a,0);
- flush=C_FINISH;
- }
- for (;;)
- {
- compressor->SetNextOut(obuf,sizeof(obuf));
- int ret=compressor->Compress(flush);
- if (ret<0 && (ret!=-1 || !flush))
- {
- ERROR_MSG("Error: deflateToFile: deflate() failed(%s [%d])\n", compressor->GetErrStr(ret), ret);
- return 1;
- }
- int l=compressor->GetNextOut()-obuf;
- if (l)
- {
- if (fwrite(obuf,1,l,fp) != (unsigned)l)
- {
- ERROR_MSG("Error: deflateToFile fwrite(%d) failed\n",l);
- return 1;
- }
- fflush(fp);
- }
- if (!compressor->GetAvailIn() && (!flush || !l)) break;
- }
- return 0;
-}
-#endif
-
-int CEXEBuild::uninstall_generate()
-{
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (ubuild_entries.getlen() && uninstaller_writes_used)
- {
- SCRIPT_MSG("Generating uninstaller... ");
-
- firstheader fh={0,};
-
- GrowBuf uhd;
- {
- GrowBuf udata;
-
- set_uninstall_mode(1);
-
- PrepareHeaders(&udata);
-
- fh.length_of_header=udata.getlen();
- int err=add_data((char*)udata.get(),udata.getlen(),&uhd);
- set_uninstall_mode(0);
- if (err < 0) return PS_ERROR;
- }
-
- crc32_t crc=0;
-
- // Get offsets of icons to replace for uninstall
- // Also makes sure that the icons are there and in the right size.
- if (generate_unicons_offsets(m_exehead, m_exehead_size, m_unicon_data) == 0)
- return PS_ERROR;
-
- entry *ent = (entry *) build_entries.get();
- if (!ent)
- return PS_ERROR;
- int ents = build_header.blocks[NB_ENTRIES].num;
- int uns = uninstaller_writes_used;
- int uninstdata_offset = build_datablock.getlen();
- while (ents--)
- {
- if (ent->which == EW_WRITEUNINSTALLER)
- {
- ent->offsets[1] = uninstdata_offset;
- ent->offsets[2] = m_unicon_size;
- uns--;
- if (!uns)
- break;
- }
- ent++;
- }
-
- if (add_db_data((char *)m_unicon_data,m_unicon_size) < 0)
- return PS_ERROR;
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- {
- // "create" the uninstaller
- LPBYTE uninst_header = (LPBYTE) malloc(m_exehead_size);
- if (!uninst_header)
- return PS_ERROR;
-
- memcpy(uninst_header, m_exehead, m_exehead_size);
-
- // patch the icons
- LPBYTE seeker = m_unicon_data;
- while (*seeker) {
- DWORD dwSize = FIX_ENDIAN_INT32(*(LPDWORD) seeker);
- seeker += sizeof(DWORD);
- DWORD dwOffset = FIX_ENDIAN_INT32(*(LPDWORD) seeker);
- seeker += sizeof(DWORD);
- memcpy(uninst_header + dwOffset, seeker, dwSize);
- seeker += dwSize;
- }
-
-#ifdef NSIS_CONFIG_CRC_ANAL
- crc=CRC32(crc, uninst_header, m_exehead_size);
-#else
- crc=CRC32(crc, uninst_header + 512, m_exehead_size - 512);
-#endif
-
- free(uninst_header);
- }
-#endif
- fh.nsinst[0]=FH_INT1;
- fh.nsinst[1]=FH_INT2;
- fh.nsinst[2]=FH_INT3;
- fh.flags=FH_FLAGS_UNINSTALL;
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- fh.flags|=(build_crcchk?(build_crcchk==2?FH_FLAGS_FORCE_CRC:0):FH_FLAGS_NO_CRC);
-#endif
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- if (build_uninst.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) fh.flags |= FH_FLAGS_SILENT;
-#endif
- fh.siginfo=FH_SIG;
- fh.length_of_all_following_data=
- uhd.getlen()+ubuild_datablock.getlen()+(int)sizeof(firstheader)+(build_crcchk?sizeof(crc32_t):0);
-
- MMapBuf udata;
-
- {
- growbuf_writer_sink sink(&udata);
- firstheader_writer w(&sink);
- w.write(&fh);
- }
-
- ubuild_datablock.setro(TRUE);
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (build_compress_whole) {
- // compress uninstaller too
- {
- char obuf[65536];
- int n = compressor->Init(build_compress_level, build_compress_dict_size);
- if (n != C_OK)
- {
- ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
- extern void quit(); quit();
- }
-
- compressor->SetNextIn((char*)uhd.get(), uhd.getlen());
- while (compressor->GetAvailIn())
- {
- compressor->SetNextOut(obuf, sizeof(obuf));
- compressor->Compress(0);
- if (compressor->GetNextOut() - obuf > 0)
- {
- udata.add(obuf, compressor->GetNextOut() - obuf);
- }
- }
-
- int avail_in = ubuild_datablock.getlen();
- int in_pos = 0;
- while (avail_in > 0) {
- int l = min(avail_in, build_filebuflen);
-
- char *p = (char*)ubuild_datablock.get(in_pos, l);
- compressor->SetNextIn(p, l);
-
- while (compressor->GetAvailIn())
- {
- compressor->SetNextOut(obuf, sizeof(obuf));
- compressor->Compress(0);
- if (compressor->GetNextOut() - obuf > 0)
- udata.add(obuf, compressor->GetNextOut() - obuf);
- }
-
- ubuild_datablock.release();
-
- avail_in -= l;
- in_pos += l;
- }
-
- for (;;)
- {
- compressor->SetNextOut(obuf, sizeof(obuf));
- compressor->Compress(C_FINISH);
- if (compressor->GetNextOut() - obuf > 0)
- udata.add(obuf, compressor->GetNextOut() - obuf);
- else break;
- }
- compressor->End();
- }
-
- firstheader *_fh=(firstheader *)udata.get(0, sizeof(firstheader));
- _fh->length_of_all_following_data=FIX_ENDIAN_INT32(udata.getlen()+(build_crcchk?sizeof(crc32_t):0));
- udata.release();
- }
- else
-#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
- {
- udata.add(uhd.get(), uhd.getlen());
-
- int st = udata.getlen();
- int length = ubuild_datablock.getlen();
- int left = length;
- udata.resize(st + left);
- while (left > 0)
- {
- int l = min(build_filebuflen, left);
- void *p = ubuild_datablock.get(length - left, l);
- memcpy(udata.get(st + length - left, l), p, l);
- udata.flush(l);
- udata.release();
- ubuild_datablock.release();
- left -= l;
- }
- }
-
- ubuild_datablock.clear();
-
- udata.setro(TRUE);
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- if (build_crcchk)
- {
- int pos = 0;
- int left = udata.getlen();
- while (left > 0)
- {
- int l = min(build_filebuflen, left);
- crc = CRC32(crc, (unsigned char *) udata.get(pos, l), l);
- udata.release();
- pos += l;
- left -= l;
- }
- udata.setro(FALSE);
- FIX_ENDIAN_INT32_INPLACE(crc);
- udata.add(&crc, sizeof(crc));
- udata.setro(TRUE);
- }
-#endif
-
- if (add_db_data(&udata) < 0)
- return PS_ERROR;
-
- udata.clear();
-
- //uninstall_size_full=fh.length_of_all_following_data + sizeof(int) + unicondata_size - 32 + sizeof(int);
- uninstall_size_full=fh.length_of_all_following_data+m_unicon_size;
-
- // compressed size
- uninstall_size=build_datablock.getlen()-uninstdata_offset;
-
- SCRIPT_MSG("Done!\n");
- }
-#endif
- return PS_OK;
-}
-
-#define SWAP(x,y,i) { i _ii; _ii=x; x=y; y=_ii; }
-
-void CEXEBuild::set_uninstall_mode(int un)
-{
- if (un != uninstall_mode)
- {
- uninstall_mode=un;
- if (un)
- {
- cur_datablock=&ubuild_datablock;
- cur_datablock_cache=&ubuild_datablock_cache;
- cur_entries=&ubuild_entries;
- cur_instruction_entry_map=&ubuild_instruction_entry_map;
- cur_functions=&ubuild_functions;
- cur_labels=&ubuild_labels;
- cur_pages=&ubuild_pages;
- cur_sections=&ubuild_sections;
- cur_header=&build_uninst;
- cur_strlist=&ubuild_strlist;
- cur_langtables=&ubuild_langtables;
- cur_ctlcolors=&ubuild_ctlcolors;
-
- definedlist.add("__UNINSTALL__");
- }
- else
- {
- cur_datablock=&build_datablock;
- cur_datablock_cache=&build_datablock_cache;
- cur_entries=&build_entries;
- cur_instruction_entry_map=&build_instruction_entry_map;
- cur_functions=&build_functions;
- cur_labels=&build_labels;
- cur_pages=&build_pages;
- cur_sections=&build_sections;
- cur_header=&build_header;
- cur_strlist=&build_strlist;
- cur_langtables=&build_langtables;
- cur_ctlcolors=&build_ctlcolors;
-
- definedlist.del("__UNINSTALL__");
- }
-
- SWAP(db_opt_save_u,db_opt_save,int);
- SWAP(db_comp_save_u,db_comp_save,int);
- SWAP(db_full_size_u,db_full_size,int);
- }
-}
-
-extern FILE *g_output;
-
-void CEXEBuild::warning(const char *s, ...)
-{
- char buf[NSIS_MAX_STRLEN*10];
- va_list val;
- va_start(val,s);
-#ifdef _WIN32
- vsprintf(buf,s,val);
-#else
- vsnprintf(buf,NSIS_MAX_STRLEN*10,s,val);
-#endif
- va_end(val);
- m_warnings.add(buf,0);
- notify(MAKENSIS_NOTIFY_WARNING,buf);
- if (display_warnings)
- {
- fprintf(g_output,"warning: %s\n",buf);
- fflush(g_output);
- }
-}
-
-void CEXEBuild::warning_fl(const char *s, ...)
-{
- char buf[NSIS_MAX_STRLEN*10];
- va_list val;
- va_start(val,s);
-#ifdef _WIN32
- vsprintf(buf,s,val);
-#else
- vsnprintf(buf,NSIS_MAX_STRLEN*10,s,val);
-#endif
- va_end(val);
- sprintf(buf+strlen(buf)," (%s:%d)",curfilename,linecnt);
- m_warnings.add(buf,0);
- notify(MAKENSIS_NOTIFY_WARNING,buf);
- if (display_warnings)
- {
- fprintf(g_output,"warning: %s\n",buf);
- fflush(g_output);
- }
-}
-
-void CEXEBuild::ERROR_MSG(const char *s, ...) const
-{
- if (display_errors || notify_hwnd)
- {
- char buf[NSIS_MAX_STRLEN*10];
- va_list val;
- va_start(val,s);
-#ifdef _WIN32
- vsprintf(buf,s,val);
-#else
- vsnprintf(buf,NSIS_MAX_STRLEN*10,s,val);
-#endif
- va_end(val);
- notify(MAKENSIS_NOTIFY_ERROR,buf);
- if (display_errors)
- {
- fprintf(g_output,"%s",buf);
- fflush(g_output);
- }
- }
-}
-
-void CEXEBuild::SCRIPT_MSG(const char *s, ...) const
-{
- if (display_script)
- {
- va_list val;
- va_start(val,s);
- vfprintf(g_output,s,val);
- va_end(val);
- fflush(g_output);
- }
-}
-
-void CEXEBuild::INFO_MSG(const char *s, ...) const
-{
- if (display_info)
- {
- va_list val;
- va_start(val,s);
- vfprintf(g_output,s,val);
- va_end(val);
- fflush(g_output);
- }
-}
-
-void CEXEBuild::print_warnings()
-{
- int nw=0,x=m_warnings.getlen();
- if (!x || !display_warnings) return;
- char *p=m_warnings.get();
- while (x>0) if (!p[--x]) nw++;
- fprintf(g_output,"\n%d warning%s:\n",nw,nw==1?"":"s");
- for (x = 0; x < nw; x ++)
- {
- fprintf(g_output," %s\n",p);
- p+=strlen(p)+1;
- }
- fflush(g_output);
-}
-
-void CEXEBuild::notify(notify_e code, const char *data) const
-{
-#ifdef _WIN32
- if (notify_hwnd)
- {
- COPYDATASTRUCT cds = {(DWORD)code, strlen(data)+1, (void *) data};
- SendMessage(notify_hwnd, WM_COPYDATA, 0, (LPARAM)&cds);
- }
-#endif
-}
-
-// Added by Ximon Eighteen 5th August 2002
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
-void CEXEBuild::build_plugin_table(void)
-{
- if (plugins_processed)
- return;
- plugins_processed=1;
-
- plugin_used = false;
- uninst_plugin_used = false;
- string searchPath = definedlist.find("NSISDIR");
- searchPath += PLATFORM_PATH_SEPARATOR_STR"Plugins";
- INFO_MSG("Processing plugin dlls: \"%s" PLATFORM_PATH_SEPARATOR_STR "*.dll\"\n",searchPath.c_str());
- m_plugins.FindCommands(searchPath, display_info?true:false);
- INFO_MSG("\n");
-}
-
-#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags, flag)/sizeof(int))
-
-int CEXEBuild::add_plugins_dir_initializer(void)
-{
- if (!plugin_used && !uninst_plugin_used) return PS_OK;
-
- SCRIPT_MSG("Adding plug-ins initializing function... ");
-
- bool uninstall = !plugin_used;
-
- int ret;
- int zero_offset;
-
- int var_zero;
- var_zero=m_UserVarNames.get("0");
-
-again:
- // Function [un.]Initialize_____Plugins
- ret=add_function(uninstall?"un.Initialize_____Plugins":"Initialize_____Plugins");
- if (ret != PS_OK) return ret;
-
- // don't move this, depends on [un.]
- zero_offset=add_string("$0");
-
- // SetDetailsPrint none
- ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), add_intstring(6));
- if (ret != PS_OK) return ret;
-
- // StrCmp $PLUGINSDIR ""
- ret=add_entry_direct(EW_STRCMP, add_string("$PLUGINSDIR"), 0, 0, ns_label.add("Initialize_____Plugins_done",0));
- if (ret != PS_OK) return ret;
- // Push $0
- ret=add_entry_direct(EW_PUSHPOP, zero_offset);
- if (ret != PS_OK) return ret;
- // ClearErrors
- ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(exec_error));
- if (ret != PS_OK) return ret;
- // GetTempFileName $0
- ret=add_entry_direct(EW_GETTEMPFILENAME, var_zero, add_string("$TEMP"));
- if (ret != PS_OK) return ret;
- // Delete $0 [simple, nothing that could clash with special temp permissions]
- ret=add_entry_direct(EW_DELETEFILE, zero_offset, DEL_SIMPLE);
- if (ret != PS_OK) return ret;
- // CraeteDirectory $0 - a dir instead of that temp file
- ret=add_entry_direct(EW_CREATEDIR, zero_offset);
- if (ret != PS_OK) return ret;
- // IfErrors Initialize_____Plugins_error - detect errors
- ret=add_entry_direct(EW_IFFLAG, ns_label.add("Initialize_____Plugins_error",0), 0, FLAG_OFFSET(exec_error));
- if (ret != PS_OK) return ret;
- // Copy $0 to $PLUGINSDIR
- ret=add_entry_direct(EW_ASSIGNVAR, m_UserVarNames.get("PLUGINSDIR"), zero_offset);
- if (ret != PS_OK) return ret;
- // Pop $0
- ret=add_entry_direct(EW_PUSHPOP, var_zero, 1);
- if (ret != PS_OK) return ret;
-
- // done
- if (add_label("Initialize_____Plugins_done")) return PS_ERROR;
- // Return
- ret=add_entry_direct(EW_RET);
- if (ret != PS_OK) return ret;
-
- // error
- if (add_label("Initialize_____Plugins_error")) return PS_ERROR;
- // error message box
- ret=add_entry_direct(EW_MESSAGEBOX, MB_OK|MB_ICONSTOP|(IDOK<<21), add_string("Error! Can't initialize plug-ins directory. Please try again later."));
- if (ret != PS_OK) return ret;
- // Quit
- ret=add_entry_direct(EW_QUIT);
- if (ret != PS_OK) return ret;
-
- // FunctionEnd
- ret=function_end();
- if (ret != PS_OK) return ret;
-
- if (uninst_plugin_used && !uninstall) {
- uninstall = true;
- goto again;
- }
-
- SCRIPT_MSG("Done!\n");
-
- return PS_OK;
-}
-#endif // NSIS_CONFIG_PLUGIN_SUPPORT
-
-void CEXEBuild::init_res_editor()
-{
- build_compressor_set = true;
- if (!res_editor)
- res_editor = new CResourceEditor(m_exehead, m_exehead_size);
-}
-
-void CEXEBuild::close_res_editor()
-{
- if (!res_editor) return;
- DWORD newsize;
-
- // get size
- newsize = res_editor->Save(NULL, newsize);
- unsigned char *new_header = new unsigned char[newsize];
-
- // save
- int rc = res_editor->Save(new_header, newsize);
- assert(rc == 0);
-
- update_exehead(new_header, newsize);
-
- // TODO: resource-controlling class
- delete [] new_header;
-
- delete res_editor;
- res_editor=0;
-}
-
-int CEXEBuild::DeclaredUserVar(const char *szVarName)
-{
- if (m_ShellConstants.get((char*)szVarName) >= 0)
- {
- ERROR_MSG("Error: name \"%s\" in use by constant\n", szVarName);
- return PS_ERROR;
- }
-
- int idxUserVar = m_UserVarNames.get((char*)szVarName);
- if (idxUserVar >= 0)
- {
- ERROR_MSG("Error: variable \"%s\" already declared\n", szVarName);
- return PS_ERROR;
- }
- const char *pVarName = szVarName;
- int iVarLen = strlen(szVarName);
-
- if (iVarLen > 60)
- {
- ERROR_MSG("Error: variable name too long!\n");
- return PS_ERROR;
- }
- else if (!iVarLen)
- {
- ERROR_MSG("Error: variable with empty name!\n");
- return PS_ERROR;
- }
- else
- {
- while (*pVarName)
- {
- if (!isSimpleChar(*pVarName))
- {
- ERROR_MSG("Error: invalid characters in variable name \"%s\", use only characters [a-z][A-Z][0-9] and '_'\n", szVarName);
- return PS_ERROR;
- }
- pVarName++;
- }
- }
-
- m_UserVarNames.add(szVarName);
- if (m_UserVarNames.getnum() > MAX_CODED)
- {
- ERROR_MSG("Error: too many user variables declared. Maximum allowed is %u.\n", MAX_CODED - m_iBaseVarsNum);
- return PS_ERROR;
- }
- return PS_OK;
-}
-
-
-int CEXEBuild::GetUserVarIndex(LineParser &line, int token)
-{
- char *p = line.gettoken_str(token);
- if ( *p == '$' && *(p+1) )
- {
- int idxUserVar = m_UserVarNames.get((char *)p+1);
- if (idxUserVar >= 0 && m_UserVarNames.get_reference(idxUserVar) >= 0)
- {
- m_UserVarNames.inc_reference(idxUserVar);
- return idxUserVar;
- }
- else
- {
- int idxConst = m_ShellConstants.get((char *)p+1);
- if (idxConst >= 0)
- {
- ERROR_MSG("Error: cannot change constants : %s\n", p);
- }
- }
- }
- return -1;
-}
-
-void CEXEBuild::VerifyDeclaredUserVarRefs(UserVarsStringList *pVarsStringList)
-{
- for (int i = m_iBaseVarsNum; i < pVarsStringList->getnum(); i++)
- {
- if (!pVarsStringList->get_reference(i))
- {
- warning("Variable \"%s\" not referenced or never set, wasting memory!", pVarsStringList->idx2name(i));
- }
- }
-}
-
-int CEXEBuild::set_compressor(const string& compressor, const bool solid) {
- string stub = stubs_dir + PLATFORM_PATH_SEPARATOR_STR + compressor;
- if (solid)
- stub += "_solid";
-
- return update_exehead(stub, &m_exehead_original_size);
-}
-
-int CEXEBuild::update_exehead(const string& file, size_t *size/*=NULL*/) {
- FILE *tmpfile = fopen(file.c_str(), "rb");
- if (!tmpfile)
- {
- ERROR_MSG("Error: opening stub \"%s\"\n", file.c_str());
- return PS_ERROR;
- }
-
- fseek(tmpfile, 0, SEEK_END);
- size_t exehead_size = ftell(tmpfile);
-
- unsigned char *exehead = new unsigned char[exehead_size];
- fseek(tmpfile, 0, SEEK_SET);
- if (fread(exehead, 1, exehead_size, tmpfile) != exehead_size)
- {
- ERROR_MSG("Error: reading stub \"%s\"\n", file.c_str());
- fclose(tmpfile);
- delete [] exehead;
- return PS_ERROR;
- }
- fclose(tmpfile);
-
- update_exehead(exehead, exehead_size);
-
- if (size)
- *size = exehead_size;
-
- delete [] exehead;
-
- return PS_OK;
-}
-
-void CEXEBuild::update_exehead(const unsigned char *new_exehead, size_t new_size) {
- assert(m_exehead != new_exehead);
-
- // align exehead to 512
- m_exehead_size = align_to_512(new_size);
-
- delete [] m_exehead;
- m_exehead = new unsigned char[m_exehead_size];
-
- // copy exehead
- memcpy(m_exehead, new_exehead, new_size);
-
- // zero rest of exehead
- memset(m_exehead + new_size, 0, m_exehead_size - new_size);
-}
-
-void CEXEBuild::set_code_type_predefines(const char *value)
-{
- definedlist.del("__SECTION__");
- definedlist.del("__FUNCTION__");
- definedlist.del("__PAGEEX__");
- definedlist.del("__GLOBAL__");
-
- switch (GetCurrentTokenPlace())
- {
- case TP_SEC:
- definedlist.add("__SECTION__", value==NULL?"":value);
- break;
- case TP_FUNC:
- definedlist.add("__FUNCTION__", value==NULL?"":value);
- break;
- case TP_PAGEEX:
- definedlist.add("__PAGEEX__", value==NULL?"":value);
- break;
- default:
- definedlist.add("__GLOBAL__");
- }
-}
-
+/*
+ * build.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <stdio.h>
+#include "exehead/config.h"
+
+#include "version.h"
+
+#include "build.h"
+#include "util.h"
+#include "fileform.h"
+#include "writer.h"
+#include "crc32.h"
+#include "manifest.h"
+#include "icon.h"
+
+#include <stdexcept>
+
+#include "exehead/resource.h"
+#include "ResourceEditor.h"
+#include "DialogTemplate.h"
+#include "ResourceVersionInfo.h"
+
+#ifndef _WIN32
+# include <locale.h>
+# include <unistd.h>
+# include <limits.h>
+# include <stdlib.h>
+# include <stdarg.h>
+#endif
+
+#include <cassert> // for assert
+
+#define RET_UNLESS_OK( function_rc ) do { \
+ int rc = (function_rc); \
+ if ( rc != PS_OK) \
+ return rc; \
+} while (false)
+
+using namespace std;
+
+namespace { // begin anonymous namespace
+
+bool isSimpleChar(char ch)
+{
+ return (ch == '.' ) || (ch == '_' ) || (ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
+}
+
+} // end of anonymous namespace
+
+void CEXEBuild::define(const char *p, const char *v)
+{
+ definedlist.add(p,v);
+}
+
+CEXEBuild::~CEXEBuild()
+{
+ free_loaded_icon(installer_icon);
+ free_loaded_icon(uninstaller_icon);
+
+ delete [] m_exehead;
+
+ int nlt = lang_tables.getlen() / sizeof(LanguageTable);
+ LanguageTable *nla = (LanguageTable*)lang_tables.get();
+
+ for (int i = 0; i < nlt; i++) {
+ DeleteLangTable(nla+i);
+ }
+}
+
+CEXEBuild::CEXEBuild() :
+ m_exehead(0),
+ m_exehead_size(0)
+{
+ linecnt = 0;
+ fp = 0;
+ curfilename = 0;
+
+ display_info=1;
+ display_script=1;
+ display_errors=1;
+ display_warnings=1;
+
+ cur_ifblock=NULL;
+ last_line_had_slash=0;
+ inside_comment=false;
+ multiple_entries_instruction=0;
+
+ build_include_depth=0;
+
+ has_called_write_output=false;
+
+ ns_func.add("",0); // make sure offset 0 is special on these (i.e. never used by a label)
+ ns_label.add("",0);
+
+ definedlist.add("NSIS_VERSION", NSIS_VERSION);
+
+ // automatically generated header file containing all defines
+#include "defines.h"
+
+ // no longer optional
+ definedlist.add("NSIS_SUPPORT_STANDARD_PREDEFINES");
+ definedlist.add("NSIS_SUPPORT_NAMED_USERVARS");
+ definedlist.add("NSIS_SUPPORT_LANG_IN_STRINGS");
+
+#ifdef _WIN32
+ definedlist.add("NSIS_WIN32_MAKENSIS");
+#endif
+
+ db_opt_save=db_comp_save=db_full_size=db_opt_save_u=db_comp_save_u=db_full_size_u=0;
+
+ // Added by Amir Szekely 31st July 2002
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ compressor = &zlib_compressor;
+#endif
+ build_compressor_set = false;
+ build_compressor_final = false;
+#ifdef NSIS_ZLIB_COMPRESS_WHOLE
+ build_compress_whole = true;
+#else
+ build_compress_whole = false;
+#endif
+ build_compress=1;
+ build_compress_level=9;
+ build_compress_dict_size=1<<23;
+
+ cur_entries=&build_entries;
+ cur_instruction_entry_map=&build_instruction_entry_map;
+ cur_datablock=&build_datablock;
+ cur_datablock_cache=&build_datablock_cache;
+ cur_functions=&build_functions;
+ cur_labels=&build_labels;
+ cur_sections=&build_sections;
+ cur_header=&build_header;
+ cur_strlist=&build_strlist;
+ cur_langtables=&build_langtables;
+ cur_ctlcolors=&build_ctlcolors;
+ cur_pages=&build_pages;
+ cur_page=0;
+ cur_page_type=-1;
+
+ build_filebuflen=32<<20; // 32mb
+
+ sectiongroup_open_cnt=0;
+ build_cursection_isfunc=0;
+ build_cursection=NULL;
+ // init public data.
+ build_packname[0]=build_packcmd[0]=build_output_filename[0]=0;
+
+ // Added by ramon 23 May 2003
+ build_allowskipfiles=1;
+
+ // Added by ramon 6 jun 2003
+#ifdef NSIS_SUPPORT_VERSION_INFO
+ version_product_v[0]=0;
+#endif
+
+ build_overwrite=build_last_overwrite=0;
+ build_crcchk=1;
+ build_datesave=1;
+ build_optimize_datablock=1;
+
+ memset(&build_header,-1,sizeof(build_header));
+
+ build_header.install_reg_rootkey=0;
+ build_header.flags=CH_FLAGS_NO_ROOT_DIR;
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ build_header.lb_bg=RGB(0,0,0);
+ build_header.lb_fg=RGB(0,255,0);
+#endif
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ build_header.license_bg=-COLOR_BTNFACE;
+#endif
+ build_header.install_directory_ptr=0;
+ build_header.install_directory_auto_append=0;
+ build_header.install_reg_key_ptr=0;
+ build_header.install_reg_value_ptr=0;
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ memset(build_header.install_types,0,sizeof(build_header.install_types));
+#endif
+ memset(&build_header.blocks,0,sizeof(build_header.blocks));
+
+ uninstall_mode=0;
+ uninstall_size_full=0;
+ uninstall_size=-1;
+
+ memset(&build_uninst,-1,sizeof(build_uninst));
+
+ build_header.install_reg_rootkey=0;
+ build_uninst.flags=0;
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ build_uninst.lb_bg=RGB(0,0,0);
+ build_uninst.lb_fg=RGB(0,255,0);
+#endif
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ build_uninst.license_bg=-COLOR_BTNFACE;
+#endif
+ build_uninst.install_directory_ptr=0;
+ build_uninst.install_directory_auto_append=0;
+ build_uninst.install_reg_key_ptr=0;
+ build_uninst.install_reg_value_ptr=0;
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ memset(build_uninst.install_types,0,sizeof(build_uninst.install_types));
+#endif
+ memset(&build_uninst.blocks,0,sizeof(build_uninst.blocks));
+
+ uninstaller_writes_used=0;
+
+ build_strlist.add("",0);
+ ubuild_strlist.add("",0);
+
+ build_langstring_num=0;
+ ubuild_langstring_num=0;
+
+ build_font[0]=0;
+ build_font_size=0;
+
+ m_unicon_size=0;
+
+ branding_image_found=false;
+
+ no_space_texts=false;
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ build_plugin_unload=0;
+ plugins_processed=0;
+#endif
+
+ last_used_lang=NSIS_DEFAULT_LANG;
+
+ res_editor=0;
+
+ manifest_comctl = manifest::comctl_old;
+ manifest_exec_level = manifest::exec_level_none;
+
+ enable_last_page_cancel=0;
+ uenable_last_page_cancel=0;
+
+ license_res_id=IDD_LICENSE;
+
+ disable_window_icon=0;
+
+ notify_hwnd=0;
+
+#ifdef NSIS_SUPPORT_BGBG
+ bg_default_font.lfHeight=40;
+ bg_default_font.lfWidth=0;
+ bg_default_font.lfEscapement=0;
+ bg_default_font.lfOrientation=0;
+ bg_default_font.lfWeight=FW_BOLD;
+ bg_default_font.lfItalic=TRUE;
+ bg_default_font.lfUnderline=FALSE;
+ bg_default_font.lfStrikeOut=FALSE;
+ bg_default_font.lfCharSet=DEFAULT_CHARSET;
+ bg_default_font.lfOutPrecision=OUT_DEFAULT_PRECIS;
+ bg_default_font.lfClipPrecision=CLIP_DEFAULT_PRECIS;
+ bg_default_font.lfQuality=DEFAULT_QUALITY;
+ bg_default_font.lfPitchAndFamily=DEFAULT_PITCH;
+ strncpy(bg_default_font.lfFaceName,"Times New Roman",LF_FACESIZE);
+ memcpy(&bg_font,&bg_default_font,sizeof(LOGFONT));
+#endif
+
+ defcodepage_set=false;
+ uDefCodePage=CP_ACP;
+
+ InitLangTables();
+
+ // Register static user variables $0, $1 and so on
+ // with ONE of reference count, to avoid warning on this vars
+ char Aux[3];
+ int i;
+ for (i = 0; i < 10; i++) // 0 - 9
+ {
+ sprintf(Aux, "%d", i);
+ m_UserVarNames.add(Aux,1);
+ }
+ for (i = 0; i < 10; i++) // 10 - 19
+ {
+ sprintf(Aux, "R%d", i);
+ m_UserVarNames.add(Aux,1);
+ }
+ m_UserVarNames.add("CMDLINE",1); // 20 everything before here doesn't have trailing slash removal
+ m_UserVarNames.add("INSTDIR",1); // 21
+ m_UserVarNames.add("OUTDIR",1); // 22
+ m_UserVarNames.add("EXEDIR",1); // 23
+ m_UserVarNames.add("LANGUAGE",1); // 24
+ m_UserVarNames.add("TEMP",-1); // 25
+ m_UserVarNames.add("PLUGINSDIR",-1); // 26
+ m_UserVarNames.add("EXEPATH",-1); // 27
+ m_UserVarNames.add("EXEFILE",-1); // 28
+ m_UserVarNames.add("HWNDPARENT",-1); // 29
+ m_UserVarNames.add("_CLICK",-1); // 30
+ m_UserVarNames.add("_OUTDIR",1); // 31
+
+ m_iBaseVarsNum = m_UserVarNames.getnum();
+
+ m_ShellConstants.add("WINDIR",CSIDL_WINDOWS,CSIDL_WINDOWS);
+ m_ShellConstants.add("SYSDIR",CSIDL_SYSTEM,CSIDL_SYSTEM);
+ m_ShellConstants.add("SMPROGRAMS",CSIDL_PROGRAMS, CSIDL_COMMON_PROGRAMS);
+ m_ShellConstants.add("SMSTARTUP",CSIDL_STARTUP, CSIDL_COMMON_STARTUP);
+ m_ShellConstants.add("DESKTOP",CSIDL_DESKTOPDIRECTORY, CSIDL_COMMON_DESKTOPDIRECTORY);
+ m_ShellConstants.add("STARTMENU",CSIDL_STARTMENU, CSIDL_COMMON_STARTMENU);
+ m_ShellConstants.add("QUICKLAUNCH", CSIDL_APPDATA, CSIDL_APPDATA);
+ m_ShellConstants.add("DOCUMENTS",CSIDL_PERSONAL, CSIDL_COMMON_DOCUMENTS);
+ m_ShellConstants.add("SENDTO",CSIDL_SENDTO, CSIDL_SENDTO);
+ m_ShellConstants.add("RECENT",CSIDL_RECENT, CSIDL_RECENT);
+ m_ShellConstants.add("FAVORITES",CSIDL_FAVORITES, CSIDL_COMMON_FAVORITES);
+ m_ShellConstants.add("MUSIC",CSIDL_MYMUSIC, CSIDL_COMMON_MUSIC);
+ m_ShellConstants.add("PICTURES",CSIDL_MYPICTURES, CSIDL_COMMON_PICTURES);
+ m_ShellConstants.add("VIDEOS",CSIDL_MYVIDEO, CSIDL_COMMON_VIDEO);
+ m_ShellConstants.add("NETHOOD", CSIDL_NETHOOD, CSIDL_NETHOOD);
+ m_ShellConstants.add("FONTS", CSIDL_FONTS, CSIDL_FONTS);
+ m_ShellConstants.add("TEMPLATES", CSIDL_TEMPLATES, CSIDL_COMMON_TEMPLATES);
+ m_ShellConstants.add("APPDATA", CSIDL_APPDATA, CSIDL_COMMON_APPDATA);
+ m_ShellConstants.add("LOCALAPPDATA", CSIDL_LOCAL_APPDATA, CSIDL_LOCAL_APPDATA);
+ m_ShellConstants.add("PRINTHOOD", CSIDL_PRINTHOOD, CSIDL_PRINTHOOD);
+ //m_ShellConstants.add("ALTSTARTUP", CSIDL_ALTSTARTUP, CSIDL_COMMON_ALTSTARTUP);
+ m_ShellConstants.add("INTERNET_CACHE", CSIDL_INTERNET_CACHE, CSIDL_INTERNET_CACHE);
+ m_ShellConstants.add("COOKIES", CSIDL_COOKIES, CSIDL_COOKIES);
+ m_ShellConstants.add("HISTORY", CSIDL_HISTORY, CSIDL_HISTORY);
+ m_ShellConstants.add("PROFILE", CSIDL_PROFILE, CSIDL_PROFILE);
+ m_ShellConstants.add("ADMINTOOLS", CSIDL_ADMINTOOLS, CSIDL_COMMON_ADMINTOOLS);
+ m_ShellConstants.add("RESOURCES", CSIDL_RESOURCES, CSIDL_RESOURCES);
+ m_ShellConstants.add("RESOURCES_LOCALIZED", CSIDL_RESOURCES_LOCALIZED, CSIDL_RESOURCES_LOCALIZED);
+ m_ShellConstants.add("CDBURN_AREA", CSIDL_CDBURN_AREA, CSIDL_CDBURN_AREA);
+
+ unsigned int program_files = add_string("ProgramFilesDir", 0);
+ unsigned int program_files_def = add_string("C:\\Program Files");
+
+ if ((program_files >= 0x40) || (program_files_def >= 0xFF))
+ {
+ // see Source\exehead\util.c for implementation details
+ // basically, it knows it needs to get folders from the registry when the 0x80 is on
+ ERROR_MSG("Internal compiler error: too many strings added to strings block before adding shell constants!\n");
+ throw out_of_range("Internal compiler error: too many strings added to strings block before adding shell constants!");
+ }
+
+ m_ShellConstants.add("PROGRAMFILES", 0x80 | program_files, program_files_def);
+ m_ShellConstants.add("PROGRAMFILES32", 0x80 | program_files, program_files_def);
+ m_ShellConstants.add("PROGRAMFILES64", 0xC0 | program_files, program_files_def);
+
+ unsigned int common_files = add_string("CommonFilesDir", 0);
+ unsigned int common_files_def = add_string("$PROGRAMFILES\\Common Files");
+
+ if ((common_files > 0x40) || (common_files_def > 0xFF))
+ {
+ ERROR_MSG("Internal compiler error: too many strings added to strings block before adding shell constants!\n");
+ throw out_of_range("Internal compiler error: too many strings added to strings block before adding shell constants!");
+ }
+
+ m_ShellConstants.add("COMMONFILES", 0x80 | common_files, common_files_def);
+ m_ShellConstants.add("COMMONFILES32", 0x80 | common_files, common_files_def);
+ m_ShellConstants.add("COMMONFILES64", 0xC0 | common_files, common_files_def);
+
+ set_uninstall_mode(1);
+
+ unsigned int uprogram_files = add_string("ProgramFilesDir", 0);
+ unsigned int uprogram_files_def = add_string("C:\\Program Files");
+ unsigned int ucommon_files = add_string("CommonFilesDir", 0);
+ unsigned int ucommon_files_def = add_string("$PROGRAMFILES\\Common Files");
+
+ if (uprogram_files != program_files
+ || uprogram_files_def != program_files_def
+ || ucommon_files != common_files
+ || ucommon_files_def != common_files_def)
+ {
+ ERROR_MSG("Internal compiler error: installer's shell constants are different than uninstallers!\n");
+ throw out_of_range("Internal compiler error: installer's shell constants are different than uninstallers!");
+ }
+
+ set_uninstall_mode(0);
+
+ set_code_type_predefines();
+}
+
+void CEXEBuild::initialize(const char *makensis_path)
+{
+ string nsis_dir;
+ const char *dir = getenv("NSISDIR");
+ if (dir) nsis_dir = dir;
+ else {
+#ifndef NSIS_CONFIG_CONST_DATA_PATH
+ nsis_dir = get_executable_dir(makensis_path);
+#else
+ nsis_dir = PREFIX_DATA;
+#endif
+ }
+ definedlist.add("NSISDIR", nsis_dir.c_str());
+
+ string includes_dir = nsis_dir;
+ includes_dir += PLATFORM_PATH_SEPARATOR_STR"Include";
+ include_dirs.add(includes_dir.c_str(),0);
+
+ stubs_dir = nsis_dir;
+ stubs_dir += PLATFORM_PATH_SEPARATOR_STR"Stubs";
+
+ if (set_compressor("zlib", false) != PS_OK)
+ {
+ throw runtime_error("error setting default stub");
+ }
+
+ string uninst = stubs_dir + PLATFORM_PATH_SEPARATOR_STR + "uninst";
+ uninstaller_icon = load_icon_file(uninst.c_str());
+}
+
+
+int CEXEBuild::getcurdbsize() { return cur_datablock->getlen(); }
+
+// returns offset in stringblock
+int CEXEBuild::add_string(const char *string, int process/*=1*/, WORD codepage/*=CP_ACP*/)
+{
+ if (!string || !*string) return 0;
+
+ if (*string == '$' && *(string+1) == '(') {
+ int idx = 0;
+ char *cp = strdup(string+2);
+ char *p = strchr(cp, ')');
+ if (p && p[1] == '\0' ) { // if string is only a language str identifier
+ *p = 0;
+ idx = DefineLangString(cp, process);
+ }
+ free(cp);
+ if (idx < 0) return idx;
+ }
+
+ if (!process) return cur_strlist->add(string,2);
+
+ char buf[NSIS_MAX_STRLEN*4];
+ preprocess_string(buf,string,codepage);
+ return cur_strlist->add(buf,2);
+}
+
+int CEXEBuild::add_intstring(const int i) // returns offset in stringblock
+{
+ char i_str[1024];
+ wsprintf(i_str, "%d", i);
+ return add_string(i_str);
+}
+
+// based on Dave Laundon's code
+int CEXEBuild::preprocess_string(char *out, const char *in, WORD codepage/*=CP_ACP*/)
+{
+ const char *p=in;
+ while (*p)
+ {
+ const char *np = CharNextExA(codepage, p, 0);
+ if (np - p > 1) // multibyte char
+ {
+ int l = np - p;
+ while (l--)
+ {
+ unsigned char i = (unsigned char)*p++;
+ if (i >= NS_CODES_START) {
+ *out++ = (char)NS_SKIP_CODE;
+ }
+ *out++=(char)i;
+ }
+ continue;
+ }
+
+ unsigned char i = (unsigned char)*p;
+
+ p=np;
+
+ // Test for characters extending into the variable codes
+ if (i >= NS_CODES_START) {
+ *out++ = (char)NS_SKIP_CODE;
+ }
+ else if (i == '$')
+ {
+ if (*p == '$')
+ p++; // Can simply convert $$ to $ now
+ else
+ {
+ {
+ bool bProceced=false;
+ if ( *p )
+ {
+ const char *pUserVarName = p;
+ while (isSimpleChar(*pUserVarName))
+ pUserVarName++;
+
+ while (pUserVarName > p)
+ {
+ if (m_ShellConstants.get((char*)p, pUserVarName-p) >= 0)
+ break; // Upps it's a shell constant
+
+ int idxUserVar = m_UserVarNames.get((char*)p, pUserVarName-p);
+ if (idxUserVar >= 0)
+ {
+ // Well, using variables inside string formating doens't mean
+ // using the variable, beacuse it will be always an empty string
+ // which is also memory wasting
+ // So the line below must be commented !??
+ //m_UserVarNames.inc_reference(idxUserVar);
+ *out++ = (char) NS_VAR_CODE; // Named user variable;
+ WORD w = FIX_ENDIAN_INT16(CODE_SHORT(idxUserVar));
+ memcpy(out, &w, sizeof(WORD));
+ out += sizeof(WORD);
+ p += pUserVarName-p;
+ bProceced = true;
+ break;
+ }
+ pUserVarName--;
+ }
+ }
+ if (!bProceced && *p)
+ {
+ const char *pShellConstName = p;
+ while (isSimpleChar(*pShellConstName))
+ pShellConstName++;
+
+ while (pShellConstName > p)
+ {
+ int idxConst = m_ShellConstants.get((char*)p, pShellConstName - p);
+ if (idxConst >= 0)
+ {
+ int CSIDL_Value_current = m_ShellConstants.get_value1(idxConst);
+ int CSIDL_Value_all = m_ShellConstants.get_value2(idxConst);
+ *out++=(char)NS_SHELL_CODE; // Constant code identifier
+ *out++=(char)CSIDL_Value_current;
+ *out++=(char)CSIDL_Value_all;
+ p = pShellConstName;
+ bProceced = true;
+ break;
+ }
+ pShellConstName--;
+ }
+ }
+ if ( !bProceced && *p == '(' )
+ {
+ int idx = -1;
+ char *cp = strdup(p+1);
+ char *pos = strchr(cp, ')');
+ if (pos)
+ {
+ *pos = 0;
+ idx = DefineLangString(cp);
+ if (idx < 0)
+ {
+ *out++ = (char)NS_LANG_CODE; // Next word is lang-string Identifier
+ WORD w = FIX_ENDIAN_INT16(CODE_SHORT(-idx-1));
+ memcpy(out, &w, sizeof(WORD));
+ out += sizeof(WORD);
+ p += strlen(cp) + 2;
+ bProceced = true;
+ }
+ }
+ free(cp);
+ }
+ if ( bProceced )
+ continue;
+ else
+ {
+ char tbuf[64];
+ char cBracket = '\0';
+ bool bDoWarning = true;
+
+ if ( *p == '[' )
+ cBracket = ']';
+ else if ( *p == '(' )
+ cBracket = ')';
+ else if ( *p == '{' )
+ cBracket = '}';
+
+ strncpy(tbuf,p,63);
+ tbuf[63]=0;
+
+ if ( cBracket != 0 )
+ {
+ if (strchr(tbuf,cBracket)) (strchr(tbuf,cBracket)+1)[0]=0;
+ if ( tbuf[0] == '{' && tbuf[strlen(tbuf)-1] == '}' )
+ {
+ char *tstIfDefine = strdup(tbuf+1);
+ tstIfDefine[strlen(tstIfDefine)-1] = '\0';
+ bDoWarning = definedlist.find(tstIfDefine) == NULL;
+ }
+ }
+ else
+ {
+ if (strstr(tbuf," ")) strstr(tbuf," ")[0]=0;
+ }
+ if ( bDoWarning )
+ warning_fl("unknown variable/constant \"%s\" detected, ignoring",tbuf);
+ i = '$';
+ }
+ }
+ }
+ }
+ *out++=(char)i;
+ }
+ *out=0;
+ return 0;
+}
+
+// what it does is, when you pass it the offset of the last item added, it will determine if
+// that data is already present in the datablock, and if so, reference it instead (and shorten
+// the datablock as necessary). Reduces overhead if you want to add files to a couple places.
+// Woo, an optimizing installer generator, now we're styling.
+
+int CEXEBuild::datablock_optimize(int start_offset, int first_int)
+{
+ int this_len = cur_datablock->getlen() - start_offset;
+
+ cached_db_size this_size = {first_int, start_offset};
+ cur_datablock_cache->add(&this_size, sizeof(cached_db_size));
+
+ if (!build_optimize_datablock || this_len < (int) sizeof(int))
+ return start_offset;
+
+ MMapBuf *db = (MMapBuf *) cur_datablock;
+ db->setro(TRUE);
+
+ cached_db_size *db_sizes = (cached_db_size *) cur_datablock_cache->get();
+ int db_sizes_num = cur_datablock_cache->getlen() / sizeof(cached_db_size);
+ db_sizes_num--; // don't compare with the one we just added
+
+ for (int i = 0; i < db_sizes_num; i++)
+ {
+ if (db_sizes[i].first_int == first_int)
+ {
+ int pos = db_sizes[i].start_offset;
+ int left = this_len;
+ while (left > 0)
+ {
+ int l = min(left, build_filebuflen);
+ void *newstuff = db->get(start_offset + this_len - left, l);
+ void *oldstuff = db->getmore(pos + this_len - left, l);
+
+ int res = memcmp(newstuff, oldstuff, l);
+
+ db->release(oldstuff, l);
+ db->release();
+
+ if (res)
+ {
+ break;
+ }
+
+ left -= l;
+ }
+
+ if (!left)
+ {
+ db_opt_save += this_len;
+ db->resize(max(start_offset, pos + this_len));
+ db->setro(FALSE);
+ cur_datablock_cache->resize(cur_datablock_cache->getlen() - sizeof(cached_db_size));
+ return pos;
+ }
+ }
+ }
+
+ db->setro(FALSE);
+
+ return start_offset;
+}
+
+int CEXEBuild::add_db_data(IMMap *mmap) // returns offset
+{
+ build_compressor_set = true;
+
+ int done = 0;
+
+ if (!mmap)
+ {
+ ERROR_MSG("Error: add_db_data() called with invalid mapped file\n");
+ return -1;
+ }
+
+ int length = mmap->getsize();
+
+ if (length < 0)
+ {
+ ERROR_MSG("Error: add_db_data() called with length=%d\n", length);
+ return -1;
+ }
+
+ MMapBuf *db = (MMapBuf *) cur_datablock;
+
+ int st = db->getlen();
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (length && !build_compress_whole && build_compress)
+ {
+ // grow datablock so that there is room to compress into
+ int bufferlen = length + 1024 + length / 4; // give a nice 25% extra space
+ db->resize(st + bufferlen + sizeof(int));
+
+ int n = compressor->Init(build_compress_level, build_compress_dict_size);
+ if (n != C_OK)
+ {
+ ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
+ extern void quit(); quit();
+ }
+
+ int avail_in = length;
+ int avail_out = bufferlen;
+ int ret;
+ while (avail_in > 0)
+ {
+ int in_len = min(build_filebuflen, avail_in);
+ int out_len = min(build_filebuflen, avail_out);
+
+ compressor->SetNextIn((char *) mmap->get(length - avail_in, in_len), in_len);
+ compressor->SetNextOut((char *) db->get(st + sizeof(int) + bufferlen - avail_out, out_len), out_len);
+ if ((ret = compressor->Compress(0)) < 0)
+ {
+ ERROR_MSG("Error: add_db_data() - compress() failed(%s [%d])\n", compressor->GetErrStr(ret), ret);
+ return -1;
+ }
+ mmap->release();
+ db->flush(out_len);
+ db->release();
+ avail_in -= in_len - compressor->GetAvailIn();
+ avail_out -= out_len - compressor->GetAvailOut();
+
+ if (!avail_out)
+ // not enough space in the output buffer - no compression is better
+ break;
+ }
+
+ // if not enough space in the output buffer - no compression is better
+ if (avail_out)
+ {
+ char *out;
+
+ char a;
+ compressor->SetNextIn(&a,0);
+
+ do
+ {
+ int out_len = min(build_filebuflen, avail_out);
+
+ out = (char *) db->get(st + sizeof(int) + bufferlen - avail_out, out_len);
+
+ compressor->SetNextOut(out, out_len);
+ if ((ret = compressor->Compress(C_FINISH)) < 0)
+ {
+ ERROR_MSG("Error: add_db_data() - compress() failed(%s [%d])\n", compressor->GetErrStr(ret), ret);
+ return -1;
+ }
+
+ db->flush(out_len);
+ db->release();
+
+ avail_out -= out_len - compressor->GetAvailOut();
+ }
+ while (compressor->GetNextOut() - out > 0 && avail_out > 0);
+
+ compressor->End();
+
+ int used = bufferlen - avail_out;
+
+ // never store compressed if output buffer is full (compression increased the size...)
+ if (avail_out && (build_compress == 2 || used < length))
+ {
+ done=1;
+ db->resize(st + used + sizeof(int));
+
+ *(int*)db->get(st, sizeof(int)) = FIX_ENDIAN_INT32(used | 0x80000000);
+ db->release();
+
+ int nst = datablock_optimize(st, used | 0x80000000);
+ if (nst == st) db_comp_save += length - used;
+ else st = nst;
+ }
+ }
+ else
+ compressor->End();
+ }
+#endif // NSIS_CONFIG_COMPRESSION_SUPPORT
+
+ if (!done)
+ {
+ db->resize(st + length + sizeof(int));
+ int *plen = (int *) db->get(st, sizeof(int));
+ *plen = FIX_ENDIAN_INT32(length);
+ db->release();
+
+ int left = length;
+ while (left > 0)
+ {
+ int l = min(build_filebuflen, left);
+ int *p = (int *) db->get(st + sizeof(int) + length - left, l);
+ memcpy(p, mmap->get(length - left, l), l);
+ db->flush(l);
+ db->release();
+ mmap->release();
+ left -= l;
+ }
+
+ st = datablock_optimize(st, length);
+ }
+
+ db_full_size += length + sizeof(int);
+
+ return st;
+}
+
+int CEXEBuild::add_db_data(const char *data, int length) // returns offset
+{
+ MMapFake fakemap;
+ fakemap.set(data, length);
+ return add_db_data(&fakemap);
+}
+
+int CEXEBuild::add_data(const char *data, int length, IGrowBuf *dblock) // returns offset
+{
+ build_compressor_set=true;
+
+ int done=0;
+
+ if (length < 0)
+ {
+ ERROR_MSG("Error: add_data() called with length=%d\n",length);
+ return -1;
+ }
+
+ int st=dblock->getlen();
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (!build_compress_whole && build_compress)
+ {
+ // grow datablock so that there is room to compress into
+ int bufferlen=length+1024+length/4; // give a nice 25% extra space
+ dblock->resize(st+bufferlen+sizeof(int));
+
+ int n = compressor->Init(build_compress_level, build_compress_dict_size);
+ if (n != C_OK)
+ {
+ ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
+ extern void quit(); quit();
+ }
+
+ compressor->SetNextIn((char*)data, length);
+ compressor->SetNextOut((char*)dblock->get() + st + sizeof(int), bufferlen);
+
+ compressor->Compress(C_FINISH);
+
+ int used=bufferlen-compressor->GetAvailOut();
+
+ // never store compressed if output buffer is full
+ if (compressor->GetAvailOut() && (build_compress == 2 || used < length))
+ {
+ done=1;
+ dblock->resize(st+used+sizeof(int));
+
+ *((int*)((char *)dblock->get()+st)) = FIX_ENDIAN_INT32(used|0x80000000);
+ }
+ compressor->End();
+ }
+#endif // NSIS_CONFIG_COMPRESSION_SUPPORT
+
+ if (!done)
+ {
+ dblock->resize(st);
+ int rl = FIX_ENDIAN_INT32(length);
+ dblock->add(&rl,sizeof(int));
+ dblock->add(data,length);
+ }
+
+ return st;
+}
+
+int CEXEBuild::add_label(const char *name)
+{
+ if (!build_cursection)
+ {
+ ERROR_MSG("Error: Label declaration not valid outside of function/section\n");
+ return PS_ERROR;
+ }
+ if ((name[0] >= '0' && name[0] <= '9') || name[0] == '-' || name[0] == ' ' || name[0] == ':')
+ {
+ ERROR_MSG("Error: labels must not begin with 0-9, -, :, or a space.\n");
+ return PS_ERROR;
+ }
+
+ int cs=build_cursection->code;
+ int ce=cs+build_cursection->code_size;
+
+ char *p=strdup(name);
+ if (p[strlen(p)-1] == ':') p[strlen(p)-1]=0;
+ int offs=ns_label.add(p,0);
+ free(p);
+
+ int n=cur_labels->getlen()/sizeof(section);
+ if (n)
+ {
+ section *t=(section*)cur_labels->get();
+ while (n--)
+ {
+ if ((*name == '.' || (t->code >= cs && t->code <= ce)) &&
+ t->name_ptr==offs)
+ {
+ if (*name == '.') ERROR_MSG("Error: global label \"%s\" already declared\n",name);
+ else
+ {
+ char *t = "section";
+ if (build_cursection_isfunc)
+ t = "function";
+ ERROR_MSG("Error: label \"%s\" already declared in %s\n",name,t);
+ }
+ return PS_ERROR;
+ }
+ t++;
+ }
+ }
+
+ section s={0};
+ s.name_ptr = offs;
+ s.code = ce;
+ cur_labels->add(&s,sizeof(s));
+
+ return PS_OK;
+}
+
+int CEXEBuild::add_function(const char *funname)
+{
+ if (build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: Function open when creating function (use FunctionEnd first)\n");
+ return PS_ERROR;
+ }
+ if (build_cursection)
+ {
+ ERROR_MSG("Error: Section open when creating function (use SectionEnd first)\n");
+ return PS_ERROR;
+ }
+ if (cur_page)
+ {
+ ERROR_MSG("Error: PageEx open when creating function (use PageExEnd first)\n");
+ return PS_ERROR;
+ }
+ if (!funname[0])
+ {
+ ERROR_MSG("Error: Function must have a name\n");
+ return PS_ERROR;
+ }
+
+ set_uninstall_mode(!strnicmp(funname,"un.",3));
+
+ int addr=ns_func.add(funname,0);
+ int x;
+ int n=cur_functions->getlen()/sizeof(section);
+ section *tmp=(section*)cur_functions->get();
+ for (x = 0; x < n; x ++)
+ {
+ if (tmp[x].name_ptr == addr)
+ {
+ ERROR_MSG("Error: Function named \"%s\" already exists.\n",funname);
+ return PS_ERROR;
+ }
+ }
+
+ cur_functions->resize((n+1)*sizeof(section));
+ build_cursection=((section*)cur_functions->get())+n;
+ build_cursection_isfunc=1;
+ build_cursection->name_ptr=addr;
+ build_cursection->code=cur_entries->getlen()/sizeof(entry);
+ build_cursection->code_size=0;
+ build_cursection->install_types=0;
+ build_cursection->flags=0;
+ build_cursection->size_kb=0;
+ memset(build_cursection->name,0,sizeof(build_cursection->name));
+
+ if (uninstall_mode)
+ set_code_type_predefines(funname+3);
+ else
+ set_code_type_predefines(funname);
+
+ return PS_OK;
+}
+
+int CEXEBuild::function_end()
+{
+ if (!build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: No function open, FunctionEnd called\n");
+ return PS_ERROR;
+ }
+ // add ret.
+ add_entry_direct(EW_RET);
+
+ build_cursection_isfunc=0;
+ build_cursection=NULL;
+
+ set_uninstall_mode(0);
+
+ set_code_type_predefines();
+ return PS_OK;
+}
+
+
+int CEXEBuild::section_add_flags(int flags)
+{
+ if (!build_cursection || build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: can't modify flags when no section is open\n");
+ return PS_ERROR;
+ }
+ build_cursection->flags |= flags;
+ return PS_OK;
+}
+
+int CEXEBuild::section_add_install_type(int inst_type)
+{
+ if (!build_cursection || build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: can't modify flags when no section is open\n");
+ return PS_ERROR;
+ }
+ if (build_cursection->install_types == ~0)
+ build_cursection->install_types = 0;
+ build_cursection->install_types |= inst_type;
+ return PS_OK;
+}
+
+void CEXEBuild::section_add_size_kb(int kb)
+{
+ if (build_cursection)
+ {
+ build_cursection->size_kb+=kb;
+ }
+}
+
+int CEXEBuild::section_end()
+{
+ if (build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: SectionEnd specified in function (not section)\n");
+ return PS_ERROR;
+ }
+ if (!build_cursection)
+ {
+ ERROR_MSG("Error: SectionEnd specified and no sections open\n");
+ return PS_ERROR;
+ }
+ add_entry_direct(EW_RET);
+ build_cursection->code_size--;
+ build_cursection=NULL;
+ if (!sectiongroup_open_cnt)
+ set_uninstall_mode(0);
+
+ set_code_type_predefines();
+ return PS_OK;
+}
+
+int CEXEBuild::add_section(const char *secname, const char *defname, int expand/*=0*/)
+{
+ if (build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: Section can't create section (already in function, use FunctionEnd first)\n");
+ return PS_ERROR;
+ }
+ if (cur_page) {
+ ERROR_MSG("Error: PageEx already open, call PageExEnd first\n");
+ return PS_ERROR;
+ }
+ if (build_cursection)
+ {
+ ERROR_MSG("Error: Section already open, call SectionEnd first\n");
+ return PS_ERROR;
+ }
+
+ section new_section;
+ new_section.flags = SF_SELECTED;
+ new_section.flags |= expand ? SF_EXPAND : 0;
+ new_section.code_size = 0;
+ new_section.size_kb = 0;
+
+ char *name = (char*)secname;
+
+ if (secname[0] == '-')
+ {
+ if (secname[1])
+ {
+ new_section.flags |= SF_SECGRP;
+ name++;
+ }
+ else
+ new_section.flags |= SF_SECGRPEND;
+ }
+
+ if (name[0] == '!')
+ {
+ name++;
+ new_section.flags |= SF_BOLD;
+ }
+
+ int old_uninstall_mode = uninstall_mode;
+
+ set_uninstall_mode(0);
+
+ if (!strnicmp(name, "un.", 3))
+ {
+ set_uninstall_mode(1);
+ name += 3;
+ }
+
+ if (!stricmp(name, "uninstall"))
+ {
+ set_uninstall_mode(1);
+ }
+
+ if ((new_section.flags & SF_SECGRPEND) && sectiongroup_open_cnt && old_uninstall_mode)
+ {
+ set_uninstall_mode(1);
+ }
+
+ if (sectiongroup_open_cnt)
+ {
+ if (uninstall_mode != old_uninstall_mode)
+ {
+ ERROR_MSG("Error: Can't create %s section in %s section group (use SectionGroupEnd first)\n", uninstall_mode ? "uninstaller" : "installer", old_uninstall_mode ? "uninstaller" : "installer");
+ return PS_ERROR;
+ }
+ }
+
+ new_section.code = cur_entries->getlen() / sizeof(entry);
+
+ new_section.install_types = *name ? 0 : ~0;
+ new_section.name_ptr = add_string(name);
+ memset(&new_section.name,0,sizeof(new_section.name));
+
+ cur_sections->add(&new_section, sizeof(section));
+ build_cursection = (section *) cur_sections->get() + cur_header->blocks[NB_SECTIONS].num;
+
+ if (defname[0])
+ {
+ char buf[1024];
+ wsprintf(buf, "%d", cur_header->blocks[NB_SECTIONS].num);
+ if (definedlist.add(defname, buf))
+ {
+ ERROR_MSG("Error: \"%s\" already defined, can't assign section index!\n", defname);
+ return PS_ERROR;
+ }
+ }
+
+ cur_header->blocks[NB_SECTIONS].num++;
+
+ if (new_section.flags & (SF_SECGRP | SF_SECGRPEND))
+ {
+ add_entry_direct(EW_RET);
+ build_cursection->code_size = 0;
+
+ build_cursection = 0;
+
+ if (new_section.flags & SF_SECGRPEND)
+ {
+ sectiongroup_open_cnt--;
+ if (sectiongroup_open_cnt < 0)
+ {
+ ERROR_MSG("SectionGroupEnd: no SectionGroups are open\n");
+ return PS_ERROR;
+ }
+ if (!sectiongroup_open_cnt)
+ {
+ set_uninstall_mode(0);
+ }
+ }
+ else
+ sectiongroup_open_cnt++;
+ }
+
+ set_code_type_predefines(name);
+
+ return PS_OK;
+}
+
+int CEXEBuild::add_entry(const entry *ent)
+{
+ if (!build_cursection && !uninstall_mode)
+ {
+ ERROR_MSG("Error: Can't add entry, no section or function is open!\n");
+ return PS_ERROR;
+ }
+
+ cur_entries->add(ent,sizeof(entry));
+ cur_instruction_entry_map->add(&multiple_entries_instruction,sizeof(int));
+ build_cursection->code_size++;
+ cur_header->blocks[NB_ENTRIES].num++;
+
+ multiple_entries_instruction=1;
+
+ return PS_OK;
+}
+
+int CEXEBuild::add_entry_direct(int which, int o0, int o1, int o2, int o3, int o4, int o5 /*o#=0*/)
+{
+ entry ent;
+ ent.which = which;
+ ent.offsets[0] = o0;
+ ent.offsets[1] = o1;
+ ent.offsets[2] = o2;
+ ent.offsets[3] = o3;
+ ent.offsets[4] = o4;
+ ent.offsets[5] = o5;
+ return add_entry(&ent);
+}
+
+int CEXEBuild::resolve_jump_int(const char *fn, int *a, int offs, int start, int end)
+{
+ if (*a > 0)
+ {
+ char *lname=(char*)ns_label.get()+*a;
+ if (lname[0] == '-' || lname[0]=='+')
+ {
+ int jump = atoi(lname);
+ int *skip_map = (int *) cur_instruction_entry_map->get();
+ int maxoffs = cur_instruction_entry_map->getlen() / (int) sizeof(int);
+
+ int direction = 1;
+ if (jump < 0)
+ direction = -1;
+
+ for (; jump != 0; jump -= direction)
+ {
+ offs += direction;
+ if (offs >= 0 && offs < maxoffs)
+ {
+ while (skip_map[offs])
+ {
+ offs += direction;
+ }
+ }
+ }
+
+ *a = offs + 1;
+ }
+ else
+ {
+ section *s = (section*)cur_labels->get();
+ int n=cur_labels->getlen()/sizeof(section);
+ while (n-->0)
+ {
+ if ((*lname == '.' || (s->code >= start && s->code <= end)) && s->name_ptr == *a)
+ {
+ *a = s->code+1; // jumps are to the absolute position, +1 (to differentiate between no jump, and jumping to offset 0)
+ s->flags++;
+ return 0;
+ }
+ s++;
+ }
+
+ ERROR_MSG("Error: could not resolve label \"%s\" in %s\n",lname,fn);
+ return 1;
+ }
+ }
+ else if (*a < 0) // to jump to a user variable target, -variable_index-1 is already stored.
+ {
+ }
+ // otherwise, *a is 0, which means no jump and we also leave it intact
+ return 0;
+}
+
+int CEXEBuild::resolve_call_int(const char *fn, const char *str, int fptr, int *ofs)
+{
+ if (fptr < 0) return 0;
+ int nf=cur_functions->getlen()/sizeof(section);
+ section *sec=(section *)cur_functions->get();
+ while (nf-- > 0)
+ {
+ if (sec->name_ptr>0 && sec->name_ptr == fptr)
+ {
+ ofs[0]=sec->code;
+ sec->flags++;
+ return 0;
+ }
+ sec++;
+ }
+ ERROR_MSG("Error: resolving %s function \"%s\" in %s\n",str,(char*)ns_func.get()+fptr,fn);
+ ERROR_MSG("Note: uninstall functions must begin with \"un.\", and install functions must not\n");
+ return 1;
+}
+
+int CEXEBuild::resolve_instruction(const char *fn, const char *str, entry *w, int offs, int start, int end)
+{
+ if (w->which == EW_NOP)
+ {
+ if (resolve_jump_int(fn,&w->offsets[0],offs,start,end)) return 1;
+ }
+#ifdef NSIS_SUPPORT_MESSAGEBOX
+ else if (w->which == EW_MESSAGEBOX)
+ {
+ if (resolve_jump_int(fn,&w->offsets[3],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[5],offs,start,end)) return 1;
+ }
+#endif
+ else if (w->which == EW_IFFILEEXISTS)
+ {
+ if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
+ }
+ else if (w->which == EW_IFFLAG)
+ {
+ if (resolve_jump_int(fn,&w->offsets[0],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
+ }
+#ifdef NSIS_SUPPORT_STROPTS
+ else if (w->which == EW_STRCMP)
+ {
+ if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[3],offs,start,end)) return 1;
+ }
+#endif
+#ifdef NSIS_SUPPORT_INTOPTS
+ else if (w->which == EW_INTCMP)
+ {
+ if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[3],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[4],offs,start,end)) return 1;
+ }
+#endif
+#ifdef NSIS_SUPPORT_HWNDS
+ else if (w->which == EW_ISWINDOW)
+ {
+ if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
+ if (resolve_jump_int(fn,&w->offsets[2],offs,start,end)) return 1;
+ }
+#endif
+ else if (w->which == EW_CALL)
+ {
+ if (w->offsets[0] >= 0 && w->offsets[1]) // get as jump
+ {
+ if (resolve_jump_int(fn,&w->offsets[0],offs,start,end)) return 1;
+ }
+ else
+ {
+ if (w->offsets[0] >= 0 && resolve_call_int(fn,str,w->offsets[0],w->offsets)) return 1;
+ // if w->offsets[0] >= 0, EW_CALL requires that it 1-based.
+ // otherwise, if < 0, it needs an increment anyway (since it
+ // was encoded with a -2 base, to prevent it looking like an
+ // empty string "")
+ w->offsets[0]++;
+ }
+ }
+#ifdef NSIS_SUPPORT_STROPTS
+ else if (w->which == EW_GETFUNCTIONADDR)
+ {
+ if (w->offsets[1] < 0)
+ {
+ ERROR_MSG("Error: GetFunctionAddress requires a real function to get address of.\n");
+ return 1;
+ }
+
+ if (resolve_call_int(fn,str,w->offsets[1],&w->offsets[1])) return 1;
+
+ w->which=EW_ASSIGNVAR;
+ w->offsets[1]=add_intstring(w->offsets[1]+1); // +1 here to make 1-based.
+ }
+ else if (w->which == EW_GETLABELADDR)
+ {
+ if (resolve_jump_int(fn,&w->offsets[1],offs,start,end)) return 1;
+ w->which=EW_ASSIGNVAR;
+ w->offsets[1]=add_intstring(w->offsets[1]);
+ }
+#endif
+ return 0;
+}
+
+int CEXEBuild::resolve_coderefs(const char *str)
+{
+ // resolve jumps&calls
+ {
+ section *sec=(section *)cur_functions->get();
+ int l=cur_functions->getlen()/sizeof(section);
+ entry *w=(entry *)cur_entries->get();
+ while (l-- > 0)
+ {
+ int x;
+ for (x = sec->code; x < sec->code+sec->code_size; x ++)
+ {
+ char fname[1024];
+ wsprintf(fname,"function \"%s\"",ns_func.get()+sec->name_ptr);
+ if (resolve_instruction(fname,str,w+x,x,sec->code,sec->code+sec->code_size)) return 1;
+ }
+ sec++;
+ }
+
+ int cnt=0;
+ sec=(section *)cur_sections->get();
+ l=cur_sections->getlen()/sizeof(section);
+ while (l-- > 0)
+ {
+ int x=sec->name_ptr;
+ char fname[1024];
+ const char *section_name;
+ if (x < 0)
+ {
+ // lang string
+ section_name = "$(lang string)";
+ }
+ else
+ {
+ // normal string
+ section_name = cur_strlist->get() + x;
+ }
+ if (x) wsprintf(fname,"%s section \"%s\" (%d)",str,section_name,cnt);
+ else wsprintf(fname,"unnamed %s section (%d)",str,cnt);
+ for (x = sec->code; x < sec->code+sec->code_size; x ++)
+ {
+ if (resolve_instruction(fname,str,w+x,x,sec->code,sec->code+sec->code_size))
+ return 1;
+ }
+ sec++;
+ cnt++;
+ }
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (cur_pages->getlen()) {
+ page *p=(page *)cur_pages->get();
+ int i = 0;
+ while (i < cur_header->blocks[NB_PAGES].num) {
+ char pagestr[1024];
+ wsprintf(pagestr, "%s pages", str);
+ if (resolve_call_int(pagestr,p->dlg_id?"pre-page":"create-page",p->prefunc,&p->prefunc)) return 1;
+ if (resolve_call_int(pagestr,"show-page",p->showfunc,&p->showfunc)) return 1;
+ if (resolve_call_int(pagestr,"leave-page",p->leavefunc,&p->leavefunc)) return 1;
+ p++;
+ i++;
+ }
+ }
+#endif
+#endif
+ }
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ // resolve callbacks
+ {
+ struct {
+ char *name;
+ int *p;
+ } callbacks[] = {
+ {"%s.onInit", &cur_header->code_onInit},
+ {"%s.on%sInstSuccess", &cur_header->code_onInstSuccess},
+ {"%s.on%sInstFailed", &cur_header->code_onInstFailed},
+ {"%s.onUserAbort", &cur_header->code_onUserAbort},
+ {"%s.onVerifyInstDir", &cur_header->code_onVerifyInstDir},
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ {"%s.onGUIInit", &cur_header->code_onGUIInit},
+ {"%s.onGUIEnd", &cur_header->code_onGUIEnd},
+ {"%s.onMouseOverSection", &cur_header->code_onMouseOverSection},
+#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ {"%s.onSelChange", &cur_header->code_onSelChange},
+#endif//NSIS_CONFIG_COMPONENTPAGE
+#ifdef NSIS_SUPPORT_REBOOT
+ {"%s.onRebootFailed", &cur_header->code_onRebootFailed},
+#endif//NSIS_SUPPORT_REBOOT
+ {0, 0}
+ };
+
+ for (int i = 0; callbacks[i].name; i++) {
+ const char *un = uninstall_mode ? "un" : "";
+ char fname[1024];
+ wsprintf(fname, callbacks[i].name, un, un);
+ char cbstr[1024];
+ wsprintf(cbstr, "%s callback", str);
+ char cbstr2[1024];
+ wsprintf(cbstr2, "%s.callbacks", un);
+
+ if (resolve_call_int(cbstr,cbstr2,ns_func.find(fname,0),callbacks[i].p))
+ return PS_ERROR;
+ }
+ }
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+ // optimize unused functions
+ {
+ section *sec=(section *)cur_functions->get();
+ int l=cur_functions->getlen()/sizeof(section);
+ entry *w=(entry*)cur_entries->get();
+ while (l-- > 0)
+ {
+ if (sec->name_ptr)
+ {
+ if (!sec->flags)
+ {
+ if (sec->code_size>0)
+ {
+ warning("%s function \"%s\" not referenced - zeroing code (%d-%d) out\n",str,
+ ns_func.get()+sec->name_ptr,
+ sec->code,sec->code+sec->code_size);
+ memset(w+sec->code,0,sec->code_size*sizeof(entry));
+ }
+ }
+ }
+ sec++;
+ }
+ }
+
+ // give warnings on unused labels
+ {
+ section *t=(section*)cur_labels->get();
+ int n=cur_labels->getlen()/sizeof(section);
+ while (n-->0)
+ {
+ if (!t->flags)
+ {
+ char *n=(char*)ns_label.get()+t->name_ptr;
+ if (*n == '.') warning("global label \"%s\" not used",n);
+ else warning("label \"%s\" not used",n);
+ }
+ t++;
+ }
+ }
+
+ return 0;
+}
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+int CEXEBuild::add_page(int type)
+{
+ page pg = {
+ 0,
+ 0,
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ -1,
+ -1,
+ -1,
+#endif
+ 0,
+ };
+
+#ifndef NSIS_CONFIG_LICENSEPAGE
+ if (type == PAGE_LICENSE)
+ {
+ ERROR_MSG("Error: can't add license page, NSIS_CONFIG_LICENSEPAGE not defined.\n");
+ return PS_ERROR;
+ }
+#endif
+#ifndef NSIS_CONFIG_COMPONENTPAGE
+ if (type == PAGE_COMPONENTS)
+ {
+ ERROR_MSG("Error: can't add components page, NSIS_CONFIG_COMPONENTPAGE not defined.\n");
+ return PS_ERROR;
+ }
+#endif
+#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (type == PAGE_COMPONENTS)
+ {
+ ERROR_MSG("Error: can't add uninstConfirm page, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n");
+ return PS_ERROR;
+ }
+#endif
+
+ struct {
+ int wndproc_id;
+ int dlg_id;
+ char *name;
+ } ids[] = {
+ {PWP_CUSTOM, 0, "custom"}, // custom
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ {PWP_LICENSE, IDD_LICENSE, "license"}, // license
+#else
+ {0, IDD_LICENSE, "license"}, // license
+#endif
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ {PWP_SELCOM, IDD_SELCOM, "components"}, // components
+#else
+ {0, IDD_SELCOM, "components"}, // components
+#endif
+ {PWP_DIR, IDD_DIR, "directory"}, // directory
+ {PWP_INSTFILES, IDD_INSTFILES, "instfiles"}, // instfiles
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ {PWP_UNINST, IDD_UNINST, "uninstConfirm"}, // uninstConfirm
+#else
+ {0, IDD_UNINST, "uninstConfirm"}, // uninstConfirm
+#endif
+ {PWP_COMPLETED, -1, NULL} // completed
+ };
+
+ pg.wndproc_id = ids[type].wndproc_id;
+ pg.dlg_id = ids[type].dlg_id;
+
+ cur_pages->add(&pg,sizeof(page));
+
+ cur_page = (page *)cur_pages->get() + cur_header->blocks[NB_PAGES].num++;
+
+ cur_page_type = type;
+
+ set_code_type_predefines(ids[type].name);
+ return PS_OK;
+}
+
+int CEXEBuild::page_end()
+{
+ cur_page = 0;
+
+ set_code_type_predefines();
+ return PS_OK;
+}
+#endif
+
+#ifdef NSIS_SUPPORT_VERSION_INFO
+int CEXEBuild::AddVersionInfo()
+{
+ GrowBuf VerInfoStream;
+
+ if ( rVersionInfo.GetStringTablesCount() > 0 )
+ {
+ if ( !version_product_v[0] )
+ {
+ ERROR_MSG("Error: VIProductVersion is required when other version information functions are used.\n");
+ return PS_ERROR;
+ }
+ else
+ {
+ int imm, iml, ilm, ill;
+ if ( sscanf(version_product_v, "%d.%d.%d.%d", &imm, &iml, &ilm, &ill) != 4 )
+ {
+ ERROR_MSG("Error: invalid VIProductVersion format, should be X.X.X.X\n");
+ return PS_ERROR;
+ }
+ rVersionInfo.SetFileVersion(MAKELONG(iml, imm),MAKELONG(ill, ilm));
+ rVersionInfo.SetProductVersion(MAKELONG(iml, imm),MAKELONG(ill, ilm));
+
+ try
+ {
+ init_res_editor();
+ for ( int i = 0; i < rVersionInfo.GetStringTablesCount(); i++ )
+ {
+ LANGID lang_id = rVersionInfo.GetLangID(i);
+ int code_page = rVersionInfo.GetCodePage(i);
+
+ char *lang_name = GetLangNameAndCP(lang_id);
+
+ if ( !rVersionInfo.FindKey(lang_id, code_page, "FileVersion") )
+ warning("Generating version information for language \"%04d-%s\" without standard key \"FileVersion\"", lang_id, lang_name);
+ if ( !rVersionInfo.FindKey(lang_id, code_page, "FileDescription") )
+ warning("Generating version information for language \"%04d-%s\" without standard key \"FileDescription\"", lang_id, lang_name);
+ if ( !rVersionInfo.FindKey(lang_id, code_page, "LegalCopyright") )
+ warning("Generating version information for language \"%04d-%s\" without standard key \"LegalCopyright\"", lang_id, lang_name);
+
+ rVersionInfo.ExportToStream(VerInfoStream, i);
+ res_editor->UpdateResourceA(RT_VERSION, 1, lang_id, (BYTE*)VerInfoStream.get(), VerInfoStream.getlen());
+ }
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error adding version information: %s\n", err.what());
+ return PS_ERROR;
+ }
+ }
+ }
+
+ return PS_OK;
+}
+#endif // NSIS_SUPPORT_VERSION_INFO
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+int CEXEBuild::ProcessPages()
+{
+ SCRIPT_MSG("Processing pages... ");
+
+ int license_normal=0;
+ int license_fsrb=0;
+ int license_fscb=0;
+ int selcom=0;
+ int dir=0, dir_used;
+ int uninstconfirm=0;
+ int instlog=0, instlog_used;
+ int main=0;
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+again:
+#endif
+
+ dir_used = 0;
+ instlog_used = 0;
+
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ if ((cur_header->flags & (CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) == 0)
+#endif
+ {
+ main++;
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+#define LS(inst, uninst) (uninstall_mode ? uninst : inst)
+#else
+#define LS(inst, uninst) inst
+#endif
+
+ DefineInnerLangString(NLF_BRANDING);
+
+ if (!cur_pages->getlen()) {
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (uninstall_mode) {
+ if (HasUserDefined(NLF_UNINST_TEXT)) {
+ add_page(PAGE_UNINSTCONFIRM);
+ page_end();
+ }
+ add_page(PAGE_INSTFILES);
+ page_end();
+ add_page(PAGE_COMPLETED);
+ page_end();
+ }
+ else
+#endif
+ {
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ if (HasUserDefined(NLF_LICENSE_TEXT) && HasUserDefined(NLF_LICENSE_DATA)) {
+ add_page(PAGE_LICENSE);
+ page_end();
+ }
+#endif
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ if (HasUserDefined(NLF_COMP_TEXT)) {
+ add_page(PAGE_COMPONENTS);
+ page_end();
+ }
+#endif
+ if (HasUserDefined(NLF_DIR_TEXT)) {
+ add_page(PAGE_DIRECTORY);
+ page_end();
+ }
+ add_page(PAGE_INSTFILES);
+ page_end();
+ add_page(PAGE_COMPLETED);
+ page_end();
+ }
+ }
+ // start processing the pages
+ {
+ int i = 0;
+ page *p = (page *) cur_pages->get();
+
+ for (i = 0; i < cur_header->blocks[NB_PAGES].num; i++, p++) {
+ page *pp = 0;
+
+ if (i) {
+ pp = p - 1;
+
+ // set back button
+ p->flags |= PF_BACK_SHOW;
+ if (pp->wndproc_id != PWP_COMPLETED && p->wndproc_id != PWP_COMPLETED && p->wndproc_id != PWP_INSTFILES)
+ p->flags |= PF_BACK_ENABLE;
+ if (!p->back)
+ p->back = DefineInnerLangString(NLF_BTN_BACK);
+
+ // set previous page's next button
+ if (!pp->next) {
+ int str = 0;
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ if (pp->wndproc_id == PWP_LICENSE && (!(pp->flags & PF_LICENSE_FORCE_SELECTION) || HasUserDefined(NLF_BTN_LICENSE)))
+ str = NLF_BTN_LICENSE;
+ else
+#endif
+ if (p->wndproc_id == PWP_INSTFILES)
+ str = LS(NLF_BTN_INSTALL, NLF_BTN_UNINSTALL);
+ else
+ str = NLF_BTN_NEXT;
+
+ pp->next = DefineInnerLangString(str);
+ }
+
+ // set previous page's click next text
+ if (!pp->clicknext) {
+ int str = 0;
+
+ if (p->wndproc_id == PWP_INSTFILES)
+ str = LS(NLF_CLICK_INSTALL, NLF_CLICK_UNINSTALL);
+ else
+ str = NLF_CLICK_NEXT;
+
+ pp->clicknext = DefineInnerLangString(str);
+ }
+ }
+
+ // enable next button
+ if (p->wndproc_id != PWP_INSTFILES)
+ p->flags |= PF_NEXT_ENABLE;
+
+ // set cancel button
+ if (!p->cancel)
+ p->cancel = DefineInnerLangString(NLF_BTN_CANCEL);
+ if (p->wndproc_id != PWP_INSTFILES && p->wndproc_id != PWP_COMPLETED)
+ p->flags |= PF_CANCEL_ENABLE;
+
+ // set caption
+ struct {
+ int caption;
+ int ucaption;
+ } captions[] = {
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ {NLF_SUBCAPTION_LICENSE, NLF_SUBCAPTION_LICENSE},
+#endif
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ {NLF_SUBCAPTION_OPTIONS, NLF_SUBCAPTION_OPTIONS},
+#endif
+ {NLF_SUBCAPTION_DIR, NLF_SUBCAPTION_DIR},
+ {NLF_SUBCAPTION_INSTFILES, NLF_USUBCAPTION_INSTFILES},
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ {NLF_USUBCAPTION_CONFIRM, NLF_USUBCAPTION_CONFIRM},
+#endif
+ {NLF_SUBCAPTION_COMPLETED, NLF_USUBCAPTION_COMPLETED}
+ };
+
+ if (!p->caption && p->wndproc_id != PWP_CUSTOM) {
+ p->caption = DefineInnerLangString(LS(captions[p->wndproc_id].caption, captions[p->wndproc_id].ucaption));
+ }
+
+ // set texts
+ switch (p->dlg_id) {
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ case IDD_LICENSE:
+ case IDD_LICENSE_FSRB:
+ case IDD_LICENSE_FSCB:
+ {
+ if (!(p->flags & PF_PAGE_EX))
+ p->dlg_id = license_res_id;
+ if (!(p->flags & (PF_LICENSE_FORCE_SELECTION | PF_LICENSE_NO_FORCE_SELECTION)))
+ p->dlg_id = license_res_id;
+
+ p->flags |= PF_NO_NEXT_FOCUS;
+
+ if (!p->parms[1])
+ p->parms[1] = DefineInnerLangString(NLF_LICENSE_DATA, 0);
+
+ if (p->dlg_id == IDD_LICENSE) {
+ if (!p->parms[0])
+ p->parms[0] = DefineInnerLangString(LS(NLF_LICENSE_TEXT, NLF_ULICENSE_TEXT));
+
+ license_normal++;
+ }
+ else if (p->dlg_id == IDD_LICENSE_FSCB) {
+ p->flags |= PF_LICENSE_FORCE_SELECTION;
+
+ if (!p->parms[0])
+ p->parms[0] = DefineInnerLangString(LS(NLF_LICENSE_TEXT_FSCB, NLF_ULICENSE_TEXT_FSCB));
+ if (!p->parms[2])
+ p->parms[2] = DefineInnerLangString(NLF_BTN_LICENSE_AGREE);
+
+ license_fscb++;
+ }
+ else if (p->dlg_id == IDD_LICENSE_FSRB) {
+ p->flags |= PF_LICENSE_FORCE_SELECTION;
+
+ if (!p->parms[0])
+ p->parms[0] = DefineInnerLangString(LS(NLF_LICENSE_TEXT_FSRB, NLF_ULICENSE_TEXT_FSRB));
+ if (!p->parms[2])
+ p->parms[2] = DefineInnerLangString(NLF_BTN_LICENSE_AGREE);
+ if (!p->parms[3])
+ p->parms[3] = DefineInnerLangString(NLF_BTN_LICENSE_DISAGREE);
+
+ license_fsrb++;
+ }
+ break;
+ }
+#endif
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ case IDD_SELCOM:
+ {
+ if (!p->parms[0])
+ p->parms[0] = DefineInnerLangString(LS(NLF_COMP_TEXT, NLF_UCOMP_TEXT));
+ if (!p->parms[1])
+ p->parms[1] = DefineInnerLangString(LS(NLF_COMP_SUBTEXT1, NLF_UCOMP_SUBTEXT1));
+ if (!p->parms[2])
+ p->parms[2] = DefineInnerLangString(LS(NLF_COMP_SUBTEXT2, NLF_UCOMP_SUBTEXT2));
+ if (!p->parms[3] && !uninstall_mode && HasUserDefined(NLF_COMP_SUBTEXT1))
+ p->parms[3] = p->parms[1];
+ if (!p->parms[4] && !uninstall_mode && HasUserDefined(NLF_COMP_SUBTEXT2))
+ p->parms[4] = p->parms[2];
+ else if (!p->parms[4])
+ p->parms[4] = DefineInnerLangString(LS(NLF_COMP_SUBTEXT1_NO_INST_TYPES, NLF_UCOMP_SUBTEXT1_NO_INST_TYPES));
+
+ DefineInnerLangString(NLF_SPACE_REQ);
+ DefineInnerLangString(NLF_BYTE);
+ DefineInnerLangString(NLF_KILO);
+ DefineInnerLangString(NLF_MEGA);
+ DefineInnerLangString(NLF_GIGA);
+
+ selcom++;
+ break;
+ }
+#endif
+ case IDD_DIR:
+ {
+ if (!p->parms[0])
+ p->parms[0] = DefineInnerLangString(LS(NLF_DIR_TEXT, NLF_UDIR_TEXT));
+ if (!p->parms[1])
+ p->parms[1] = DefineInnerLangString(LS(NLF_DIR_SUBTEXT, NLF_UDIR_SUBTEXT));
+ if (!p->parms[2])
+ p->parms[2] = DefineInnerLangString(NLF_BTN_BROWSE);
+ if (!p->parms[3])
+ p->parms[3] = DefineInnerLangString(LS(NLF_DIR_BROWSETEXT, NLF_UDIR_BROWSETEXT));
+ if (!p->parms[4])
+ p->parms[4] = m_UserVarNames.get("INSTDIR");
+ else
+ p->parms[4]--;
+
+ DefineInnerLangString(NLF_SPACE_AVAIL);
+ DefineInnerLangString(NLF_SPACE_REQ);
+ DefineInnerLangString(NLF_BYTE);
+ DefineInnerLangString(NLF_KILO);
+ DefineInnerLangString(NLF_MEGA);
+ DefineInnerLangString(NLF_GIGA);
+#ifdef NSIS_CONFIG_LOG
+ DefineInnerLangString(NLF_LOG_INSTALL_PROCESS);
+#endif
+
+ dir++;
+ break;
+ }
+ case IDD_INSTFILES:
+ {
+ if (!p->parms[1])
+ p->parms[1] = DefineInnerLangString(NLF_BTN_DETAILS);
+ if (!p->parms[2])
+ p->parms[2] = DefineInnerLangString(NLF_COMPLETED);
+
+ DefineInnerLangString(NLF_COPY_DETAILS);
+
+ instlog++;
+ instlog_used++;
+ break;
+ }
+ case IDD_UNINST:
+ {
+ if (!p->parms[0])
+ p->parms[0] = DefineInnerLangString(NLF_UNINST_TEXT);
+ if (!p->parms[1])
+ p->parms[1] = DefineInnerLangString(NLF_UNINST_SUBTEXT);
+ if (!p->parms[4])
+ p->parms[4] = m_UserVarNames.get("INSTDIR");
+ else
+ p->parms[4]--;
+
+ uninstconfirm++;
+ break;
+ }
+ }
+
+ p->flags &= ~PF_PAGE_EX;
+ }
+
+ p--;
+
+ if (!p->next)
+ p->next = DefineInnerLangString(NLF_BTN_CLOSE);
+ if (p->wndproc_id == PWP_COMPLETED)
+ (p-1)->next = DefineInnerLangString(NLF_BTN_CLOSE);
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (uninstall_mode) {
+ if (!uenable_last_page_cancel && instlog_used)
+ p->flags &= ~PF_CANCEL_ENABLE;
+ }
+ else
+#endif
+ {
+ if (!enable_last_page_cancel && instlog_used)
+ p->flags &= ~PF_CANCEL_ENABLE;
+ }
+
+ if (!instlog_used) {
+ warning("%sage instfiles not used, no sections will be executed!", uninstall_mode ? "Uninstall p" : "P");
+ }
+ }
+ }
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!uninstall_mode) {
+ set_uninstall_mode(1);
+ goto again;
+ }
+ else
+ set_uninstall_mode(0);
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+
+
+ SCRIPT_MSG("Done!\n");
+
+#define REMOVE_ICON(id) if (disable_window_icon) { \
+ BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG); \
+ if (dlg) { \
+ CDialogTemplate dt(dlg,uDefCodePage); \
+ res_editor->FreeResource(dlg); \
+ if (dt.RemoveItem(IDC_ULICON)) { \
+ DialogItemTemplate* text = dt.GetItem(IDC_INTROTEXT); \
+ DialogItemTemplate* prog = dt.GetItem(IDC_PROGRESS); \
+ if (text) { \
+ text->sWidth += text->sX; \
+ text->sX = 0; \
+ } \
+ if (prog) { \
+ prog->sWidth += prog->sX; \
+ prog->sX = 0; \
+ } \
+ \
+ DWORD dwSize; \
+ dlg = dt.Save(dwSize); \
+ res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG, dlg, dwSize); \
+ delete [] dlg; \
+ } \
+ } \
+ }
+
+ try {
+ SCRIPT_MSG("Removing unused resources... ");
+ init_res_editor();
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ if (!license_normal) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_LICENSE, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_LICENSE);
+ if (!license_fsrb) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_LICENSE_FSRB, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_LICENSE_FSRB);
+ if (!license_fscb) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_LICENSE_FSCB, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_LICENSE_FSCB);
+#endif // NSIS_CONFIG_LICENSEPAGE
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ if (!selcom) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_SELCOM, NSIS_DEFAULT_LANG, 0, 0);
+ res_editor->UpdateResourceA(RT_BITMAP, IDB_BITMAP1, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_SELCOM);
+#endif // NSIS_CONFIG_COMPONENTPAGE
+ if (!dir) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_DIR, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_DIR);
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!uninstconfirm) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_UNINST, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_UNINST);
+#endif // NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!instlog) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_INSTFILES, NSIS_DEFAULT_LANG, 0, 0);
+ }
+ else REMOVE_ICON(IDD_INSTFILES);
+ if (!main) {
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_INST, NSIS_DEFAULT_LANG, 0, 0);
+ if (!build_compress_whole && !build_crcchk)
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_VERIFY, NSIS_DEFAULT_LANG, 0, 0);
+ }
+
+ SCRIPT_MSG("Done!\n");
+ }
+ catch (exception& err) {
+ ERROR_MSG("\nError: %s\n", err.what());
+ return PS_ERROR;
+ }
+
+ return PS_OK;
+}
+#endif // NSIS_CONFIG_VISIBLE_SUPPORT
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+void CEXEBuild::PrepareInstTypes()
+{
+ if (!(cur_header->flags & CH_FLAGS_NO_CUSTOM))
+ cur_header->install_types[NSIS_MAX_INST_TYPES] = DefineInnerLangString(NLF_COMP_CUSTOM);
+
+ // set insttype list for RO sections that didn't use SectionIn
+ int i = cur_header->blocks[NB_SECTIONS].num;
+ section *sections = (section *) cur_sections->get();
+
+ while (i--)
+ {
+ if (sections[i].flags & SF_RO && !sections[i].install_types)
+ sections[i].install_types = ~0;
+ }
+
+ // set selection to first insttype
+ if (cur_header->install_types[0])
+ {
+ int i = cur_header->blocks[NB_SECTIONS].num;
+ section *sections = (section *) cur_sections->get();
+
+ // if /o was used abort since the user did his manual choice
+ while (i--)
+ if ((sections[i].flags & SF_SELECTED) == 0)
+ return;
+
+ i = cur_header->blocks[NB_SECTIONS].num;
+
+ while (i--)
+ if ((sections[i].install_types & 1) == 0)
+ sections[i].flags &= ~SF_SELECTED;
+ }
+}
+#endif
+
+void CEXEBuild::AddStandardStrings()
+{
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (uninstall_mode)
+ {
+ cur_header->str_uninstchild = add_string("$TEMP\\$1u_.exe");
+ cur_header->str_uninstcmd = add_string("\"$TEMP\\$1u_.exe\" $0 _?=$INSTDIR\\");
+ }
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ cur_header->str_wininit = add_string("$WINDIR\\wininit.ini");
+#endif//NSIS_SUPPORT_MOVEONREBOOT
+}
+
+void CEXEBuild::PrepareHeaders(IGrowBuf *hdrbuf)
+{
+ GrowBuf blocks_buf;
+ growbuf_writer_sink sink(&blocks_buf);
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ cur_header->blocks[NB_PAGES].offset = sizeof(header) + blocks_buf.getlen();
+ page_writer::write_block(cur_pages, &sink);
+#endif
+
+ cur_header->blocks[NB_SECTIONS].offset = sizeof(header) + blocks_buf.getlen();
+ section_writer::write_block(cur_sections, &sink);
+
+ cur_header->blocks[NB_ENTRIES].offset = sizeof(header) + blocks_buf.getlen();
+ entry_writer::write_block(cur_entries, &sink);
+
+ cur_header->blocks[NB_STRINGS].offset = sizeof(header) + blocks_buf.getlen();
+ blocks_buf.add(cur_strlist->get(), cur_strlist->getlen());
+
+ cur_header->blocks[NB_LANGTABLES].offset = sizeof(header) + blocks_buf.getlen();
+ lang_table_writer::write_block(cur_langtables, &sink, cur_header->langtable_size);
+
+ cur_header->blocks[NB_CTLCOLORS].offset = sizeof(header) + blocks_buf.getlen();
+ ctlcolors_writer::write_block(cur_ctlcolors, &sink);
+
+#ifdef NSIS_SUPPORT_BGBG
+ if (cur_header->bg_color1 != -1)
+ {
+ bg_font.lfFaceName[LF_FACESIZE-1] = 0;
+
+ cur_header->blocks[NB_BGFONT].offset = sizeof(header) + blocks_buf.getlen();
+
+ LOGFONT_writer w(&sink);
+ w.write(&bg_font);
+ }
+#endif
+
+ growbuf_writer_sink sink2(hdrbuf);
+ header_writer header(&sink2);
+ header.write(cur_header);
+
+ sink2.write_growbuf(&blocks_buf);
+}
+
+int CEXEBuild::SetVarsSection()
+{
+ try {
+ init_res_editor();
+
+ VerifyDeclaredUserVarRefs(&m_UserVarNames);
+ int MaxUserVars = m_UserVarNames.getnum();
+ // -1 because the default size is 1
+ if (!res_editor->AddExtraVirtualSize2PESection(NSIS_VARS_SECTION, (MaxUserVars - 1) * sizeof(NSIS_STRING)))
+ {
+ ERROR_MSG("Internal compiler error #12346: invalid exehead cannot find section \"%s\"!\n", NSIS_VARS_SECTION);
+ return PS_ERROR;
+ }
+ }
+ catch (exception& err) {
+ ERROR_MSG("\nError: %s\n", err.what());
+ return PS_ERROR;
+ }
+
+ return PS_OK;
+}
+
+int CEXEBuild::SetManifest()
+{
+ try {
+ init_res_editor();
+
+ string manifest = manifest::generate(manifest_comctl, manifest_exec_level);
+
+ if (manifest == "")
+ return PS_OK;
+
+ res_editor->UpdateResourceA(MAKEINTRESOURCE(24), MAKEINTRESOURCE(1), NSIS_DEFAULT_LANG, (LPBYTE) manifest.c_str(), manifest.length());
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while setting manifest: %s\n", err.what());
+ return PS_ERROR;
+ }
+
+ return PS_OK;
+}
+
+int CEXEBuild::check_write_output_errors() const
+{
+ if (has_called_write_output)
+ {
+ ERROR_MSG("Error (write_output): write_output already called, can't continue\n");
+ return PS_ERROR;
+ }
+
+ if (!build_output_filename[0])
+ {
+ ERROR_MSG("Error: invalid script: never had OutFile command\n");
+ return PS_ERROR;
+ }
+
+ if (!build_sections.getlen())
+ {
+ ERROR_MSG("Error: invalid script: no sections specified\n");
+ return PS_ERROR;
+ }
+
+ if (!build_entries.getlen())
+ {
+ ERROR_MSG("Error: invalid script: no entries specified\n");
+ return PS_ERROR;
+ }
+
+ if (build_cursection)
+ {
+ ERROR_MSG("Error: Section left open at EOF\n");
+ return PS_ERROR;
+ }
+
+ if (sectiongroup_open_cnt)
+ {
+ ERROR_MSG("Error: SectionGroup left open at EOF\n");
+ return PS_ERROR;
+ }
+
+ if (cur_page)
+ {
+ ERROR_MSG("Error: PageEx left open at EOF\n");
+ return PS_ERROR;
+ }
+
+ // deal with functions, for both install and uninstall modes.
+ if (build_cursection_isfunc)
+ {
+ ERROR_MSG("Error: Function left open at EOF\n");
+ return PS_ERROR;
+ }
+
+ return PS_OK;
+}
+
+int CEXEBuild::prepare_uninstaller() {
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (ubuild_entries.getlen())
+ {
+ if (!uninstaller_writes_used)
+ {
+ warning("Uninstaller script code found but WriteUninstaller never used - no uninstaller will be created.");
+ return PS_OK;
+ }
+
+ build_uninst.flags|=build_header.flags&(CH_FLAGS_PROGRESS_COLORED|CH_FLAGS_NO_ROOT_DIR);
+
+ set_uninstall_mode(1);
+
+ DefineInnerLangString(NLF_UCAPTION);
+
+ if (resolve_coderefs("uninstall"))
+ return PS_ERROR;
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ // set sections to the first insttype
+ PrepareInstTypes();
+#endif
+
+ // Add standard strings to string table
+ AddStandardStrings();
+
+ set_uninstall_mode(0);
+ }
+ else if (uninstaller_writes_used)
+ {
+ ERROR_MSG("Error: no Uninstall section specified, but WriteUninstaller used %d time(s)\n",uninstaller_writes_used);
+ return PS_ERROR;
+ }
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+ return PS_OK;
+}
+
+int CEXEBuild::pack_exe_header()
+{
+ if (!(build_packname[0] && build_packcmd[0])) {
+ // header not asked to be packed
+ return PS_OK;
+ }
+
+ // write out exe header, pack, read back in, and
+ // update the header info
+ FILE *tmpfile=FOPEN(build_packname,"wb");
+ if (!tmpfile)
+ {
+ ERROR_MSG("Error: writing temporary file \"%s\" for pack\n",build_packname);
+ return PS_ERROR;
+ }
+ fwrite(m_exehead,1,m_exehead_size,tmpfile);
+ fclose(tmpfile);
+ if (sane_system(build_packcmd) == -1)
+ {
+ remove(build_packname);
+ ERROR_MSG("Error: calling packer on \"%s\"\n",build_packname);
+ return PS_ERROR;
+ }
+
+ int result = update_exehead(build_packname);
+ remove(build_packname);
+
+ if (result != PS_OK)
+ {
+ ERROR_MSG("Error: reading temporary file \"%s\" after pack\n",build_packname);
+ return result;
+ }
+
+ return PS_OK;
+}
+
+int CEXEBuild::write_output(void)
+{
+#ifndef NSIS_CONFIG_CRC_SUPPORT
+ build_crcchk=0;
+#endif
+
+ RET_UNLESS_OK( check_write_output_errors() );
+
+ has_called_write_output=true;
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ RET_UNLESS_OK( add_plugins_dir_initializer() );
+#endif //NSIS_CONFIG_PLUGIN_SUPPORT
+
+#ifdef NSIS_SUPPORT_VERSION_INFO
+ RET_UNLESS_OK( AddVersionInfo() );
+#endif //NSIS_SUPPORT_VERSION_INFO
+
+ RET_UNLESS_OK( prepare_uninstaller() );
+
+ DefineInnerLangString(NLF_CAPTION);
+ if (resolve_coderefs("install"))
+ return PS_ERROR;
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ // set sections to the first insttype
+ PrepareInstTypes();
+#endif
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ RET_UNLESS_OK( ProcessPages() );
+#endif //NSIS_CONFIG_VISIBLE_SUPPORT
+
+ // Generate language tables
+ RET_UNLESS_OK( GenerateLangTables() );
+
+ // Setup user variables PE section
+ RET_UNLESS_OK( SetVarsSection() );
+
+ // Set XML manifest
+ RET_UNLESS_OK( SetManifest() );
+
+ // Add standard strings to string table
+ AddStandardStrings();
+
+ try {
+ // Load icon from exe, if needed
+ if (installer_icon.empty())
+ {
+ init_res_editor();
+ installer_icon = load_icon_res(res_editor, IDI_ICON2);
+ }
+
+ // Set icon
+ set_icon(res_editor, IDI_ICON2, installer_icon, uninstaller_icon);
+
+ // Save all changes to the exe header
+ close_res_editor();
+ }
+ catch (exception& err) {
+ ERROR_MSG("\nError: %s\n", err.what());
+ return PS_ERROR;
+ }
+
+ RET_UNLESS_OK( pack_exe_header() );
+
+
+ build_optimize_datablock=0;
+
+ int data_block_size_before_uninst = build_datablock.getlen();
+
+ RET_UNLESS_OK( uninstall_generate() );
+
+ crc32_t crc=0;
+
+ {
+ string full_path = get_full_path(build_output_filename);
+ notify(MAKENSIS_NOTIFY_OUTPUT, full_path.c_str());
+ INFO_MSG("\nOutput: \"%s\"\n", full_path.c_str());
+ }
+
+ FILE *fp = FOPEN(build_output_filename,"w+b");
+ if (!fp)
+ {
+ ERROR_MSG("Can't open output file\n");
+ return PS_ERROR;
+ }
+
+ if (fwrite(m_exehead,1,m_exehead_size,fp) != m_exehead_size)
+ {
+ ERROR_MSG("Error: can't write %d bytes to output\n",m_exehead_size);
+ fclose(fp);
+ return PS_ERROR;
+ }
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ #ifdef NSIS_CONFIG_CRC_ANAL
+ crc=CRC32(crc,m_exehead,m_exehead_size);
+ #else
+ crc=CRC32(crc,m_exehead+512,m_exehead_size-512);
+ #endif
+#endif
+
+ firstheader fh={0,};
+ fh.nsinst[0]=FH_INT1;
+ fh.nsinst[1]=FH_INT2;
+ fh.nsinst[2]=FH_INT3;
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ fh.flags=(build_crcchk?(build_crcchk==2?FH_FLAGS_FORCE_CRC:0):FH_FLAGS_NO_CRC);
+#else
+ fh.flags=0;
+#endif
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) fh.flags |= FH_FLAGS_SILENT;
+#endif
+ fh.siginfo=FH_SIG;
+
+ int installinfo_compressed;
+ int fd_start = 0;
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (build_compress_whole)
+ {
+ int n = compressor->Init(build_compress_level, build_compress_dict_size);
+ if (n != C_OK)
+ {
+ ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
+ return PS_ERROR;
+ }
+ }
+#endif
+
+ {
+ GrowBuf ihd;
+ {
+ GrowBuf hdrcomp;
+
+ PrepareHeaders(&hdrcomp);
+
+ if (add_data((char*)hdrcomp.get(),hdrcomp.getlen(),&ihd) < 0)
+ return PS_ERROR;
+
+ fh.length_of_header=hdrcomp.getlen();
+ installinfo_compressed=ihd.getlen();
+ }
+
+ if (!build_compress_whole)
+ fh.length_of_all_following_data=ihd.getlen()+build_datablock.getlen()+(int)sizeof(firstheader)+(build_crcchk?sizeof(crc32_t):0);
+ else
+ fd_start=ftell(fp);
+
+ try
+ {
+ file_writer_sink sink(fp);
+ firstheader_writer w(&sink);
+ w.write(&fh);
+ }
+ catch (...)
+ {
+ ERROR_MSG("Error: can't write %d bytes to output\n",sizeof(fh));
+ fclose(fp);
+ return PS_ERROR;
+ }
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (build_compress_whole) {
+ if (deflateToFile(fp,(char*)ihd.get(),ihd.getlen()))
+ {
+ fclose(fp);
+ return PS_ERROR;
+ }
+ }
+ else
+#endif
+ {
+ if (fwrite(ihd.get(),1,ihd.getlen(),fp) != (unsigned int)ihd.getlen())
+ {
+ ERROR_MSG("Error: can't write %d bytes to output\n",ihd.getlen());
+ fclose(fp);
+ return PS_ERROR;
+ }
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ crc_writer_sink crc_sink((crc32_t *) &crc);
+ firstheader_writer w(&crc_sink);
+ w.write(&fh);
+
+ crc=CRC32(crc,(unsigned char*)ihd.get(),ihd.getlen());
+#endif
+ }
+ }
+
+ INFO_MSG("Install: ");
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ int np=build_header.blocks[NB_PAGES].num;
+ INFO_MSG("%d page%s (%d bytes), ",np,np==1?"":"s",np*sizeof(page));
+#endif
+ {
+ int ns=build_sections.getlen()/sizeof(section);
+ section *s=(section*)build_sections.get();
+ int x;
+ int req=0;
+ for (x = 1; x < ns; x ++)
+ {
+ if (!s[x].name_ptr || s[x].flags & SF_RO) req++;
+ }
+ INFO_MSG("%d section%s",ns,ns==1?"":"s");
+ if (req)
+ {
+ INFO_MSG(" (%d required)",req);
+ }
+ INFO_MSG(" (%d bytes), ", build_sections.getlen());
+ }
+ int ne=build_header.blocks[NB_ENTRIES].num;
+ INFO_MSG("%d instruction%s (%d bytes), ",ne,ne==1?"":"s",ne*sizeof(entry));
+ int ns=build_strlist.getnum();
+ INFO_MSG("%d string%s (%d bytes), ",ns,ns==1?"":"s",build_strlist.getlen());
+ int nlt=build_header.blocks[NB_LANGTABLES].num;
+ INFO_MSG("%d language table%s (%d bytes).\n",nlt,nlt==1?"":"s",build_langtables.getlen());
+ if (ubuild_entries.getlen())
+ {
+ INFO_MSG("Uninstall: ");
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ np=build_uninst.blocks[NB_PAGES].num;
+ INFO_MSG("%d page%s (%d bytes), \n",np,np==1?"":"s",ubuild_pages.getlen());
+#endif
+ {
+ int ns=ubuild_sections.getlen()/sizeof(section);
+ section *s=(section*)ubuild_sections.get();
+ int x;
+ int req=0;
+ for (x = 1; x < ns; x ++)
+ {
+ if (!s[x].name_ptr || s[x].flags & SF_RO) req++;
+ }
+ INFO_MSG("%d section%s",ns,ns==1?"":"s");
+ if (req)
+ {
+ INFO_MSG(" (%d required)",req);
+ }
+ INFO_MSG(" (%d bytes), ", ubuild_sections.getlen());
+ }
+ ne=build_uninst.blocks[NB_ENTRIES].num;
+ INFO_MSG("%d instruction%s (%d bytes), ",ne,ne==1?"":"s",ubuild_entries.getlen());
+ ns=ubuild_strlist.getnum();
+ INFO_MSG("%d string%s (%d bytes), ",ns,ns==1?"":"s",ubuild_strlist.getlen());
+ nlt=build_uninst.blocks[NB_LANGTABLES].num;
+ INFO_MSG("%d language table%s (%d bytes).\n",nlt,nlt==1?"":"s",ubuild_langtables.getlen());
+ }
+
+
+ if (db_opt_save)
+ {
+ int total_out_size_estimate=
+ m_exehead_size+sizeof(fh)+build_datablock.getlen()+(build_crcchk?sizeof(crc32_t):0);
+ int pc=(int)(((INT64)db_opt_save*1000)/(db_opt_save+total_out_size_estimate));
+ INFO_MSG("Datablock optimizer saved %d bytes (~%d.%d%%).\n",db_opt_save,
+ pc/10,pc%10);
+ }
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ INFO_MSG("\nUsing %s%s compression.\n\n", compressor->GetName(), build_compress_whole?" (compress whole)":"");
+#endif
+
+ unsigned int total_usize=m_exehead_original_size;
+
+ INFO_MSG("EXE header size: %10d / %d bytes\n",m_exehead_size,m_exehead_original_size);
+
+ if (build_compress_whole) {
+ INFO_MSG("Install code: (%d bytes)\n",
+ sizeof(fh)+fh.length_of_header);
+ }
+ else {
+ INFO_MSG("Install code: %10d / %d bytes\n",
+ sizeof(fh)+installinfo_compressed,
+ sizeof(fh)+fh.length_of_header);
+ }
+
+ total_usize+=sizeof(fh)+fh.length_of_header;
+
+ {
+ int dbsize, dbsizeu;
+ dbsize = build_datablock.getlen();
+ if (uninstall_size>0) dbsize-=uninstall_size;
+
+ if (build_compress_whole) {
+ dbsizeu=dbsize;
+ INFO_MSG("Install data: (%d bytes)\n",dbsizeu);
+ }
+ else {
+ dbsizeu = db_full_size - uninstall_size_full;
+ INFO_MSG("Install data: %10d / %d bytes\n",dbsize,dbsizeu);
+ }
+ total_usize+=dbsizeu;
+ }
+
+ if (uninstall_size>=0)
+ {
+ if (build_compress_whole)
+ INFO_MSG("Uninstall code+data: (%d bytes)\n",uninstall_size_full);
+ else
+ INFO_MSG("Uninstall code+data: %6d / %d bytes\n",uninstall_size,uninstall_size_full);
+ total_usize+=uninstall_size_full;
+ }
+
+ if (build_compress_whole) {
+ INFO_MSG("Compressed data: ");
+ }
+
+ if (build_datablock.getlen())
+ {
+ build_datablock.setro(TRUE);
+ int dbl = build_datablock.getlen();
+ int left = dbl;
+ while (left > 0)
+ {
+ int l = min(build_filebuflen, left);
+ char *dbptr = (char *) build_datablock.get(dbl - left, l);
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (build_compress_whole)
+ {
+ if (deflateToFile(fp,dbptr,l))
+ {
+ fclose(fp);
+ return PS_ERROR;
+ }
+ }
+ else
+#endif
+ {
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ crc=CRC32(crc,(unsigned char *)dbptr,l);
+#endif
+ if ((int)fwrite(dbptr,1,l,fp) != l)
+ {
+ ERROR_MSG("Error: can't write %d bytes to output\n",l);
+ fclose(fp);
+ return PS_ERROR;
+ }
+ fflush(fp);
+ }
+ build_datablock.release();
+ left -= l;
+ }
+ build_datablock.setro(FALSE);
+ build_datablock.clear();
+ }
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (build_compress_whole)
+ {
+ if (deflateToFile(fp,NULL,0))
+ {
+ fclose(fp);
+ return PS_ERROR;
+ }
+ compressor->End();
+
+ unsigned fend = ftell(fp);
+
+ fh.length_of_all_following_data=ftell(fp)-fd_start+(build_crcchk?sizeof(crc32_t):0);
+ INFO_MSG(
+ "%10d / %d bytes\n",
+ ftell(fp) - fd_start,
+ data_block_size_before_uninst + fh.length_of_header + sizeof(firstheader) + uninstall_size_full
+ );
+
+ fseek(fp,fd_start,SEEK_SET);
+
+ try
+ {
+ file_writer_sink sink(fp);
+ firstheader_writer w(&sink);
+ w.write(&fh);
+ }
+ catch (...)
+ {
+ ERROR_MSG("Error: can't write %d bytes to output\n",sizeof(fh));
+ fclose(fp);
+ return PS_ERROR;
+ }
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ if (build_crcchk)
+ {
+ // check rest of CRC
+ fseek(fp,fd_start,SEEK_SET);
+ for (;;)
+ {
+ char buf[32768];
+ int l=fread(buf,1,sizeof(buf),fp);
+ if (!l) break;
+ crc=CRC32(crc,(unsigned char *)buf,l);
+ }
+ }
+#endif
+ fseek(fp,fend,SEEK_SET); // reset eof flag
+ }
+#endif
+
+ if (build_crcchk)
+ {
+ total_usize+=sizeof(int);
+ int rcrc = FIX_ENDIAN_INT32(crc);
+ if (fwrite(&rcrc,1,sizeof(crc32_t),fp) != sizeof(crc32_t))
+ {
+ ERROR_MSG("Error: can't write %d bytes to output\n",sizeof(crc32_t));
+ fclose(fp);
+ return PS_ERROR;
+ }
+ INFO_MSG("CRC (0x%08X): 4 / 4 bytes\n",crc);
+ }
+ INFO_MSG("\n");
+ {
+ UINT pc=(UINT)(((UINT64)ftell(fp)*1000)/(total_usize));
+ INFO_MSG("Total size: %10u / %u bytes (%u.%u%%)\n",
+ ftell(fp),total_usize,pc/10,pc%10);
+ }
+ fclose(fp);
+ print_warnings();
+ return PS_OK;
+}
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+int CEXEBuild::deflateToFile(FILE *fp, char *buf, int len) // len==0 to flush
+{
+ build_compressor_set=true;
+
+ char obuf[65536];
+ bool flush=false;
+ compressor->SetNextIn(buf,len);
+ if (!buf||!len)
+ {
+ char a;
+ compressor->SetNextIn(&a,0);
+ flush=C_FINISH;
+ }
+ for (;;)
+ {
+ compressor->SetNextOut(obuf,sizeof(obuf));
+ int ret=compressor->Compress(flush);
+ if (ret<0 && (ret!=-1 || !flush))
+ {
+ ERROR_MSG("Error: deflateToFile: deflate() failed(%s [%d])\n", compressor->GetErrStr(ret), ret);
+ return 1;
+ }
+ int l=compressor->GetNextOut()-obuf;
+ if (l)
+ {
+ if (fwrite(obuf,1,l,fp) != (unsigned)l)
+ {
+ ERROR_MSG("Error: deflateToFile fwrite(%d) failed\n",l);
+ return 1;
+ }
+ fflush(fp);
+ }
+ if (!compressor->GetAvailIn() && (!flush || !l)) break;
+ }
+ return 0;
+}
+#endif
+
+int CEXEBuild::uninstall_generate()
+{
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (ubuild_entries.getlen() && uninstaller_writes_used)
+ {
+ SCRIPT_MSG("Generating uninstaller... ");
+
+ firstheader fh={0,};
+
+ GrowBuf uhd;
+ {
+ GrowBuf udata;
+
+ set_uninstall_mode(1);
+
+ PrepareHeaders(&udata);
+
+ fh.length_of_header=udata.getlen();
+ int err=add_data((char*)udata.get(),udata.getlen(),&uhd);
+ set_uninstall_mode(0);
+ if (err < 0) return PS_ERROR;
+ }
+
+ crc32_t crc=0;
+
+ // Get offsets of icons to replace for uninstall
+ // Also makes sure that the icons are there and in the right size.
+ LPBYTE unicon_data = generate_uninstall_icon_data(installer_icon, uninstaller_icon, m_unicon_size);
+ if (generate_unicons_offsets(m_exehead, m_exehead_size, unicon_data, IDI_ICON2) == 0)
+ {
+ delete [] unicon_data;
+ return PS_ERROR;
+ }
+
+ entry *ent = (entry *) build_entries.get();
+ if (!ent)
+ {
+ delete [] unicon_data;
+ return PS_ERROR;
+ }
+
+ int ents = build_header.blocks[NB_ENTRIES].num;
+ int uns = uninstaller_writes_used;
+ int uninstdata_offset = build_datablock.getlen();
+ while (ents--)
+ {
+ if (ent->which == EW_WRITEUNINSTALLER)
+ {
+ ent->offsets[1] = uninstdata_offset;
+ ent->offsets[2] = m_unicon_size;
+ uns--;
+ if (!uns)
+ break;
+ }
+ ent++;
+ }
+
+ if (add_db_data((char *)unicon_data,m_unicon_size) < 0)
+ {
+ delete [] unicon_data;
+ return PS_ERROR;
+ }
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ {
+ // "create" the uninstaller
+ LPBYTE uninst_header = (LPBYTE) malloc(m_exehead_size);
+ if (!uninst_header)
+ return PS_ERROR;
+
+ memcpy(uninst_header, m_exehead, m_exehead_size);
+
+ // patch the icons
+ LPBYTE seeker = unicon_data;
+ while (*seeker) {
+ DWORD dwSize = FIX_ENDIAN_INT32(*(LPDWORD) seeker);
+ seeker += sizeof(DWORD);
+ DWORD dwOffset = FIX_ENDIAN_INT32(*(LPDWORD) seeker);
+ seeker += sizeof(DWORD);
+ memcpy(uninst_header + dwOffset, seeker, dwSize);
+ seeker += dwSize;
+ }
+
+ delete [] unicon_data;
+
+#ifdef NSIS_CONFIG_CRC_ANAL
+ crc=CRC32(crc, uninst_header, m_exehead_size);
+#else
+ crc=CRC32(crc, uninst_header + 512, m_exehead_size - 512);
+#endif
+
+ free(uninst_header);
+ }
+#endif
+ fh.nsinst[0]=FH_INT1;
+ fh.nsinst[1]=FH_INT2;
+ fh.nsinst[2]=FH_INT3;
+ fh.flags=FH_FLAGS_UNINSTALL;
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ fh.flags|=(build_crcchk?(build_crcchk==2?FH_FLAGS_FORCE_CRC:0):FH_FLAGS_NO_CRC);
+#endif
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ if (build_uninst.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)) fh.flags |= FH_FLAGS_SILENT;
+#endif
+ fh.siginfo=FH_SIG;
+ fh.length_of_all_following_data=
+ uhd.getlen()+ubuild_datablock.getlen()+(int)sizeof(firstheader)+(build_crcchk?sizeof(crc32_t):0);
+
+ MMapBuf udata;
+
+ {
+ growbuf_writer_sink sink(&udata);
+ firstheader_writer w(&sink);
+ w.write(&fh);
+ }
+
+ ubuild_datablock.setro(TRUE);
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (build_compress_whole) {
+ // compress uninstaller too
+ {
+ char obuf[65536];
+ int n = compressor->Init(build_compress_level, build_compress_dict_size);
+ if (n != C_OK)
+ {
+ ERROR_MSG("Internal compiler error #12345: deflateInit() failed(%s [%d]).\n", compressor->GetErrStr(n), n);
+ extern void quit(); quit();
+ }
+
+ compressor->SetNextIn((char*)uhd.get(), uhd.getlen());
+ while (compressor->GetAvailIn())
+ {
+ compressor->SetNextOut(obuf, sizeof(obuf));
+ compressor->Compress(0);
+ if (compressor->GetNextOut() - obuf > 0)
+ {
+ udata.add(obuf, compressor->GetNextOut() - obuf);
+ }
+ }
+
+ int avail_in = ubuild_datablock.getlen();
+ int in_pos = 0;
+ while (avail_in > 0) {
+ int l = min(avail_in, build_filebuflen);
+
+ char *p = (char*)ubuild_datablock.get(in_pos, l);
+ compressor->SetNextIn(p, l);
+
+ while (compressor->GetAvailIn())
+ {
+ compressor->SetNextOut(obuf, sizeof(obuf));
+ compressor->Compress(0);
+ if (compressor->GetNextOut() - obuf > 0)
+ udata.add(obuf, compressor->GetNextOut() - obuf);
+ }
+
+ ubuild_datablock.release();
+
+ avail_in -= l;
+ in_pos += l;
+ }
+
+ for (;;)
+ {
+ compressor->SetNextOut(obuf, sizeof(obuf));
+ compressor->Compress(C_FINISH);
+ if (compressor->GetNextOut() - obuf > 0)
+ udata.add(obuf, compressor->GetNextOut() - obuf);
+ else break;
+ }
+ compressor->End();
+ }
+
+ firstheader *_fh=(firstheader *)udata.get(0, sizeof(firstheader));
+ _fh->length_of_all_following_data=FIX_ENDIAN_INT32(udata.getlen()+(build_crcchk?sizeof(crc32_t):0));
+ udata.release();
+ }
+ else
+#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
+ {
+ udata.add(uhd.get(), uhd.getlen());
+
+ int st = udata.getlen();
+ int length = ubuild_datablock.getlen();
+ int left = length;
+ udata.resize(st + left);
+ while (left > 0)
+ {
+ int l = min(build_filebuflen, left);
+ void *p = ubuild_datablock.get(length - left, l);
+ memcpy(udata.get(st + length - left, l), p, l);
+ udata.flush(l);
+ udata.release();
+ ubuild_datablock.release();
+ left -= l;
+ }
+ }
+
+ ubuild_datablock.clear();
+
+ udata.setro(TRUE);
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ if (build_crcchk)
+ {
+ int pos = 0;
+ int left = udata.getlen();
+ while (left > 0)
+ {
+ int l = min(build_filebuflen, left);
+ crc = CRC32(crc, (unsigned char *) udata.get(pos, l), l);
+ udata.release();
+ pos += l;
+ left -= l;
+ }
+ udata.setro(FALSE);
+ FIX_ENDIAN_INT32_INPLACE(crc);
+ udata.add(&crc, sizeof(crc));
+ udata.setro(TRUE);
+ }
+#endif
+
+ if (add_db_data(&udata) < 0)
+ return PS_ERROR;
+
+ udata.clear();
+
+ //uninstall_size_full=fh.length_of_all_following_data + sizeof(int) + unicondata_size - 32 + sizeof(int);
+ uninstall_size_full=fh.length_of_all_following_data+m_unicon_size;
+
+ // compressed size
+ uninstall_size=build_datablock.getlen()-uninstdata_offset;
+
+ SCRIPT_MSG("Done!\n");
+ }
+#endif
+ return PS_OK;
+}
+
+#define SWAP(x,y,i) { i _ii; _ii=x; x=y; y=_ii; }
+
+void CEXEBuild::set_uninstall_mode(int un)
+{
+ if (un != uninstall_mode)
+ {
+ uninstall_mode=un;
+ if (un)
+ {
+ cur_datablock=&ubuild_datablock;
+ cur_datablock_cache=&ubuild_datablock_cache;
+ cur_entries=&ubuild_entries;
+ cur_instruction_entry_map=&ubuild_instruction_entry_map;
+ cur_functions=&ubuild_functions;
+ cur_labels=&ubuild_labels;
+ cur_pages=&ubuild_pages;
+ cur_sections=&ubuild_sections;
+ cur_header=&build_uninst;
+ cur_strlist=&ubuild_strlist;
+ cur_langtables=&ubuild_langtables;
+ cur_ctlcolors=&ubuild_ctlcolors;
+
+ definedlist.add("__UNINSTALL__");
+ }
+ else
+ {
+ cur_datablock=&build_datablock;
+ cur_datablock_cache=&build_datablock_cache;
+ cur_entries=&build_entries;
+ cur_instruction_entry_map=&build_instruction_entry_map;
+ cur_functions=&build_functions;
+ cur_labels=&build_labels;
+ cur_pages=&build_pages;
+ cur_sections=&build_sections;
+ cur_header=&build_header;
+ cur_strlist=&build_strlist;
+ cur_langtables=&build_langtables;
+ cur_ctlcolors=&build_ctlcolors;
+
+ definedlist.del("__UNINSTALL__");
+ }
+
+ SWAP(db_opt_save_u,db_opt_save,int);
+ SWAP(db_comp_save_u,db_comp_save,int);
+ SWAP(db_full_size_u,db_full_size,int);
+ }
+}
+
+extern FILE *g_output;
+
+void CEXEBuild::warning(const char *s, ...)
+{
+ char buf[NSIS_MAX_STRLEN*10];
+ va_list val;
+ va_start(val,s);
+#ifdef _WIN32
+ vsprintf(buf,s,val);
+#else
+ vsnprintf(buf,NSIS_MAX_STRLEN*10,s,val);
+#endif
+ va_end(val);
+ m_warnings.add(buf,0);
+ notify(MAKENSIS_NOTIFY_WARNING,buf);
+ if (display_warnings)
+ {
+ fprintf(g_output,"warning: %s\n",buf);
+ fflush(g_output);
+ }
+}
+
+void CEXEBuild::warning_fl(const char *s, ...)
+{
+ char buf[NSIS_MAX_STRLEN*10];
+ va_list val;
+ va_start(val,s);
+#ifdef _WIN32
+ vsprintf(buf,s,val);
+#else
+ vsnprintf(buf,NSIS_MAX_STRLEN*10,s,val);
+#endif
+ va_end(val);
+ sprintf(buf+strlen(buf)," (%s:%d)",curfilename,linecnt);
+ m_warnings.add(buf,0);
+ notify(MAKENSIS_NOTIFY_WARNING,buf);
+ if (display_warnings)
+ {
+ fprintf(g_output,"warning: %s\n",buf);
+ fflush(g_output);
+ }
+}
+
+void CEXEBuild::ERROR_MSG(const char *s, ...) const
+{
+ if (display_errors || notify_hwnd)
+ {
+ char buf[NSIS_MAX_STRLEN*10];
+ va_list val;
+ va_start(val,s);
+#ifdef _WIN32
+ vsprintf(buf,s,val);
+#else
+ vsnprintf(buf,NSIS_MAX_STRLEN*10,s,val);
+#endif
+ va_end(val);
+ notify(MAKENSIS_NOTIFY_ERROR,buf);
+ if (display_errors)
+ {
+ fprintf(g_output,"%s",buf);
+ fflush(g_output);
+ }
+ }
+}
+
+void CEXEBuild::SCRIPT_MSG(const char *s, ...) const
+{
+ if (display_script)
+ {
+ va_list val;
+ va_start(val,s);
+ vfprintf(g_output,s,val);
+ va_end(val);
+ fflush(g_output);
+ }
+}
+
+void CEXEBuild::INFO_MSG(const char *s, ...) const
+{
+ if (display_info)
+ {
+ va_list val;
+ va_start(val,s);
+ vfprintf(g_output,s,val);
+ va_end(val);
+ fflush(g_output);
+ }
+}
+
+void CEXEBuild::print_warnings()
+{
+ int nw=0,x=m_warnings.getlen();
+ if (!x || !display_warnings) return;
+ char *p=m_warnings.get();
+ while (x>0) if (!p[--x]) nw++;
+ fprintf(g_output,"\n%d warning%s:\n",nw,nw==1?"":"s");
+ for (x = 0; x < nw; x ++)
+ {
+ fprintf(g_output," %s\n",p);
+ p+=strlen(p)+1;
+ }
+ fflush(g_output);
+}
+
+void CEXEBuild::notify(notify_e code, const char *data) const
+{
+#ifdef _WIN32
+ if (notify_hwnd)
+ {
+ COPYDATASTRUCT cds = {(DWORD)code, strlen(data)+1, (void *) data};
+ SendMessage(notify_hwnd, WM_COPYDATA, 0, (LPARAM)&cds);
+ }
+#endif
+}
+
+// Added by Ximon Eighteen 5th August 2002
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+void CEXEBuild::build_plugin_table(void)
+{
+ if (plugins_processed)
+ return;
+ plugins_processed=1;
+
+ plugin_used = false;
+ uninst_plugin_used = false;
+ string searchPath = definedlist.find("NSISDIR");
+ searchPath += PLATFORM_PATH_SEPARATOR_STR"Plugins";
+ INFO_MSG("Processing plugin dlls: \"%s" PLATFORM_PATH_SEPARATOR_STR "*.dll\"\n",searchPath.c_str());
+ m_plugins.FindCommands(searchPath, display_info?true:false);
+ INFO_MSG("\n");
+}
+
+#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags, flag)/sizeof(int))
+
+int CEXEBuild::add_plugins_dir_initializer(void)
+{
+ if (!plugin_used && !uninst_plugin_used) return PS_OK;
+
+ SCRIPT_MSG("Adding plug-ins initializing function... ");
+
+ bool uninstall = !plugin_used;
+
+ int ret;
+ int zero_offset;
+
+ int var_zero;
+ var_zero=m_UserVarNames.get("0");
+
+again:
+ // Function [un.]Initialize_____Plugins
+ ret=add_function(uninstall?"un.Initialize_____Plugins":"Initialize_____Plugins");
+ if (ret != PS_OK) return ret;
+
+ // don't move this, depends on [un.]
+ zero_offset=add_string("$0");
+
+ // SetDetailsPrint none
+ ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), add_intstring(6));
+ if (ret != PS_OK) return ret;
+
+ // StrCmp $PLUGINSDIR ""
+ ret=add_entry_direct(EW_STRCMP, add_string("$PLUGINSDIR"), 0, 0, ns_label.add("Initialize_____Plugins_done",0));
+ if (ret != PS_OK) return ret;
+ // Push $0
+ ret=add_entry_direct(EW_PUSHPOP, zero_offset);
+ if (ret != PS_OK) return ret;
+ // ClearErrors
+ ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(exec_error));
+ if (ret != PS_OK) return ret;
+ // GetTempFileName $0
+ ret=add_entry_direct(EW_GETTEMPFILENAME, var_zero, add_string("$TEMP"));
+ if (ret != PS_OK) return ret;
+ // Delete $0 [simple, nothing that could clash with special temp permissions]
+ ret=add_entry_direct(EW_DELETEFILE, zero_offset, DEL_SIMPLE);
+ if (ret != PS_OK) return ret;
+ // CraeteDirectory $0 - a dir instead of that temp file
+ ret=add_entry_direct(EW_CREATEDIR, zero_offset);
+ if (ret != PS_OK) return ret;
+ // IfErrors Initialize_____Plugins_error - detect errors
+ ret=add_entry_direct(EW_IFFLAG, ns_label.add("Initialize_____Plugins_error",0), 0, FLAG_OFFSET(exec_error));
+ if (ret != PS_OK) return ret;
+ // Copy $0 to $PLUGINSDIR
+ ret=add_entry_direct(EW_ASSIGNVAR, m_UserVarNames.get("PLUGINSDIR"), zero_offset);
+ if (ret != PS_OK) return ret;
+ // Pop $0
+ ret=add_entry_direct(EW_PUSHPOP, var_zero, 1);
+ if (ret != PS_OK) return ret;
+
+ // done
+ if (add_label("Initialize_____Plugins_done")) return PS_ERROR;
+ // Return
+ ret=add_entry_direct(EW_RET);
+ if (ret != PS_OK) return ret;
+
+ // error
+ if (add_label("Initialize_____Plugins_error")) return PS_ERROR;
+ // error message box
+ ret=add_entry_direct(EW_MESSAGEBOX, MB_OK|MB_ICONSTOP|(IDOK<<21), add_string("Error! Can't initialize plug-ins directory. Please try again later."));
+ if (ret != PS_OK) return ret;
+ // Quit
+ ret=add_entry_direct(EW_QUIT);
+ if (ret != PS_OK) return ret;
+
+ // FunctionEnd
+ ret=function_end();
+ if (ret != PS_OK) return ret;
+
+ if (uninst_plugin_used && !uninstall) {
+ uninstall = true;
+ goto again;
+ }
+
+ SCRIPT_MSG("Done!\n");
+
+ return PS_OK;
+}
+#endif // NSIS_CONFIG_PLUGIN_SUPPORT
+
+void CEXEBuild::init_res_editor()
+{
+ build_compressor_set = true;
+ if (!res_editor)
+ res_editor = new CResourceEditor(m_exehead, m_exehead_size);
+}
+
+void CEXEBuild::close_res_editor()
+{
+ if (!res_editor) return;
+ DWORD newsize;
+
+ // get size
+ newsize = res_editor->Save(NULL, newsize);
+ unsigned char *new_header = new unsigned char[newsize];
+
+ // save
+ int rc = res_editor->Save(new_header, newsize);
+ assert(rc == 0);
+
+ update_exehead(new_header, newsize);
+
+ // TODO: resource-controlling class
+ delete [] new_header;
+
+ delete res_editor;
+ res_editor=0;
+}
+
+int CEXEBuild::DeclaredUserVar(const char *szVarName)
+{
+ if (m_ShellConstants.get((char*)szVarName) >= 0)
+ {
+ ERROR_MSG("Error: name \"%s\" in use by constant\n", szVarName);
+ return PS_ERROR;
+ }
+
+ int idxUserVar = m_UserVarNames.get((char*)szVarName);
+ if (idxUserVar >= 0)
+ {
+ ERROR_MSG("Error: variable \"%s\" already declared\n", szVarName);
+ return PS_ERROR;
+ }
+ const char *pVarName = szVarName;
+ int iVarLen = strlen(szVarName);
+
+ if (iVarLen > 60)
+ {
+ ERROR_MSG("Error: variable name too long!\n");
+ return PS_ERROR;
+ }
+ else if (!iVarLen)
+ {
+ ERROR_MSG("Error: variable with empty name!\n");
+ return PS_ERROR;
+ }
+ else
+ {
+ while (*pVarName)
+ {
+ if (!isSimpleChar(*pVarName))
+ {
+ ERROR_MSG("Error: invalid characters in variable name \"%s\", use only characters [a-z][A-Z][0-9] and '_'\n", szVarName);
+ return PS_ERROR;
+ }
+ pVarName++;
+ }
+ }
+
+ m_UserVarNames.add(szVarName);
+ if (m_UserVarNames.getnum() > MAX_CODED)
+ {
+ ERROR_MSG("Error: too many user variables declared. Maximum allowed is %u.\n", MAX_CODED - m_iBaseVarsNum);
+ return PS_ERROR;
+ }
+ return PS_OK;
+}
+
+
+int CEXEBuild::GetUserVarIndex(LineParser &line, int token)
+{
+ char *p = line.gettoken_str(token);
+ if ( *p == '$' && *(p+1) )
+ {
+ int idxUserVar = m_UserVarNames.get((char *)p+1);
+ if (idxUserVar >= 0 && m_UserVarNames.get_reference(idxUserVar) >= 0)
+ {
+ m_UserVarNames.inc_reference(idxUserVar);
+ return idxUserVar;
+ }
+ else
+ {
+ int idxConst = m_ShellConstants.get((char *)p+1);
+ if (idxConst >= 0)
+ {
+ ERROR_MSG("Error: cannot change constants : %s\n", p);
+ }
+ }
+ }
+ return -1;
+}
+
+void CEXEBuild::VerifyDeclaredUserVarRefs(UserVarsStringList *pVarsStringList)
+{
+ for (int i = m_iBaseVarsNum; i < pVarsStringList->getnum(); i++)
+ {
+ if (!pVarsStringList->get_reference(i))
+ {
+ warning("Variable \"%s\" not referenced or never set, wasting memory!", pVarsStringList->idx2name(i));
+ }
+ }
+}
+
+int CEXEBuild::set_compressor(const string& compressor, const bool solid) {
+ string stub = stubs_dir + PLATFORM_PATH_SEPARATOR_STR + compressor;
+ if (solid)
+ stub += "_solid";
+
+ return update_exehead(stub, &m_exehead_original_size);
+}
+
+int CEXEBuild::update_exehead(const string& file, size_t *size/*=NULL*/) {
+ FILE *tmpfile = fopen(file.c_str(), "rb");
+ if (!tmpfile)
+ {
+ ERROR_MSG("Error: opening stub \"%s\"\n", file.c_str());
+ return PS_ERROR;
+ }
+
+ fseek(tmpfile, 0, SEEK_END);
+ size_t exehead_size = ftell(tmpfile);
+
+ unsigned char *exehead = new unsigned char[exehead_size];
+ fseek(tmpfile, 0, SEEK_SET);
+ if (fread(exehead, 1, exehead_size, tmpfile) != exehead_size)
+ {
+ ERROR_MSG("Error: reading stub \"%s\"\n", file.c_str());
+ fclose(tmpfile);
+ delete [] exehead;
+ return PS_ERROR;
+ }
+ fclose(tmpfile);
+
+ update_exehead(exehead, exehead_size);
+
+ if (size)
+ *size = exehead_size;
+
+ delete [] exehead;
+
+ return PS_OK;
+}
+
+void CEXEBuild::update_exehead(const unsigned char *new_exehead, size_t new_size) {
+ assert(m_exehead != new_exehead);
+
+ // align exehead to 512
+ m_exehead_size = align_to_512(new_size);
+
+ delete [] m_exehead;
+ m_exehead = new unsigned char[m_exehead_size];
+
+ // copy exehead
+ memcpy(m_exehead, new_exehead, new_size);
+
+ // zero rest of exehead
+ memset(m_exehead + new_size, 0, m_exehead_size - new_size);
+}
+
+void CEXEBuild::set_code_type_predefines(const char *value)
+{
+ definedlist.del("__SECTION__");
+ definedlist.del("__FUNCTION__");
+ definedlist.del("__PAGEEX__");
+ definedlist.del("__GLOBAL__");
+
+ switch (GetCurrentTokenPlace())
+ {
+ case TP_SEC:
+ definedlist.add("__SECTION__", value==NULL?"":value);
+ break;
+ case TP_FUNC:
+ definedlist.add("__FUNCTION__", value==NULL?"":value);
+ break;
+ case TP_PAGEEX:
+ definedlist.add("__PAGEEX__", value==NULL?"":value);
+ break;
+ default:
+ definedlist.add("__GLOBAL__");
+ }
+}
+
diff --git a/Source/build.h b/Source/build.h
index 6c41a45..1defd58 100755
--- a/Source/build.h
+++ b/Source/build.h
@@ -1,415 +1,418 @@
-/*
- * build.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _BUILD_H_
-#define _BUILD_H_
-
-#include "strlist.h"
-#include "lineparse.h"
-#include "lang.h"
-#include "ResourceEditor.h"
-#include "ResourceVersionInfo.h"
-#include "uservars.h"
-#include "ShConstants.h"
-#include "mmap.h"
-#include "manifest.h"
-
-#include "exehead/fileform.h"
-#include "exehead/config.h"
-
-#include <string>
-#include <set>
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
-// Added by Sunil Kamath 11 June 2003
-# include <time.h>
-# include <sys/stat.h>
-#endif
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
-// Changed by Amir Szekely 31st July 2002
-#include "compressor.h"
-#include "czlib.h"
-#include "cbzip2.h"
-#include "clzma.h"
-
-#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
-# include "Plugins.h"
-#endif //NSIS_CONFIG_PLUGIN_SUPPORT
-
-#define PS_OK 0
-#define PS_EOF 1
-#define PS_ERROR 50
-#define PS_WARNING 100
-
-// token placement
-#define TP_SEC 1
-#define TP_FUNC 2
-#define TP_CODE (TP_SEC | TP_FUNC)
-#define TP_GLOBAL 4
-#define TP_PAGEEX 8
-#define TP_PG (TP_GLOBAL | TP_PAGEEX)
-#define TP_ALL (TP_CODE | TP_PG)
-
-enum notify_e {
- MAKENSIS_NOTIFY_SCRIPT,
- MAKENSIS_NOTIFY_WARNING,
- MAKENSIS_NOTIFY_ERROR,
- MAKENSIS_NOTIFY_OUTPUT
-};
-
-#define PAGE_CUSTOM 0
-#define PAGE_LICENSE 1
-#define PAGE_COMPONENTS 2
-#define PAGE_DIRECTORY 3
-#define PAGE_INSTFILES 4
-#define PAGE_UNINSTCONFIRM 5
-#define PAGE_COMPLETED 6
-
-class CEXEBuild {
- public:
- CEXEBuild();
- void initialize(const char *makensis_path);
- ~CEXEBuild();
-
- // to add a warning to the compiler's warning list.
- void warning(const char *s, ...);
- // warning with file name and line count
- void warning_fl(const char *s, ...);
-
- // to add a defined thing.
- void define(const char *p, const char *v="");
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- // Added by Ximon Eighteen 5th August 2002
- void build_plugin_table(void);
- int plugins_processed;
-#endif //NSIS_CONFIG_PLUGIN_SUPPORT
-
-
- // process a script (you can process as many scripts as you want,
- // it is as if they are concatenated)
- int process_script(FILE *fp, char *curfilename);
- int process_oneline(char *line, char *curfilename, int lineptr);
-
- // you only get to call write_output once, so use it wisely.
- int write_output(void);
-
- void print_help(char *commandname=NULL);
-
- DefineList definedlist;
-
- int display_errors;
- int display_script;
- int display_warnings;
- int display_info;
-
- int linecnt;
- char *curfilename;
- FILE *fp;
-
- HWND notify_hwnd;
- void notify(notify_e code, const char *data) const;
-
- private:
- int check_write_output_errors() const;
- int prepare_uninstaller();
- int pack_exe_header();
-
- int set_compressor(const std::string& compressor, const bool solid);
- int update_exehead(const std::string& file, size_t *size=NULL);
- void update_exehead(const unsigned char *new_exehead, size_t new_size);
-
- // tokens.cpp
- bool is_valid_token(char *s);
- int get_commandtoken(char *s, int *np, int *op, int *pos);
- int GetCurrentTokenPlace();
- int IsTokenPlacedRight(int pos, char *tok);
-
- // script.cpp
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- char* set_file_predefine(char *);
- void restore_file_predefine(char *);
- char* set_timestamp_predefine(char *);
- void restore_timestamp_predefine(char *);
- char* set_line_predefine(int, BOOL);
- void restore_line_predefine(char *);
- void set_date_time_predefines();
- void del_date_time_predefines();
-#endif
- int parseScript();
- int includeScript(char *f);
- int MacroExists(const char *macroname);
-#ifdef NSIS_FIX_DEFINES_IN_STRINGS
- void ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist, bool bIgnoreDefines = false);
-#else
- void ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist);
-#endif
- int doParse(const char *str);
- int doCommand(int which_token, LineParser &line);
-
- int do_add_file(const char *lgss, int attrib, int recurse, int *total_files, const char
- *name_override=0, int generatecode=1, int *data_handle=0,
- const std::set<std::string>& excluded=std::set<std::string>(),
- const std::string& basedir=std::string(""), bool dir_created=false);
- int add_file(const std::string& dir, const std::string& file, int attrib, const char
- *name_override, int generatecode, int *data_handle);
- int do_add_file_create_dir(const std::string& local_dir, const std::string& dir, int attrib=0);
-
- GrowBuf m_linebuild; // used for concatenating lines
-
- // used by doParse to do preprocessing
- struct ifblock
- {
- int hasexeced;
- int elseused;
- int ignore;
- int inherited_ignore;
- } *cur_ifblock;
-
- TinyGrowBuf build_preprocessor_data;
-
- void start_ifblock();
- void end_ifblock();
- int num_ifblock();
-
- int last_line_had_slash;
- bool inside_comment;
- int multiple_entries_instruction;
-
- void ERROR_MSG(const char *s, ...) const;
- void SCRIPT_MSG(const char *s, ...) const;
- void INFO_MSG(const char *s, ...) const;
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- int add_plugins_dir_initializer(void);
-#endif //NSIS_CONFIG_PLUGIN_SUPPORT
-
- // build.cpp functions used mostly by script.cpp
- void set_code_type_predefines(const char *value = NULL);
- int getcurdbsize();
- int add_section(const char *secname, const char *defname, int expand=0);
- int section_end();
- int add_function(const char *funname);
- int function_end();
- void section_add_size_kb(int kb);
- int section_add_flags(int flags);
- int section_add_install_type(int inst_type);
- int add_page(int type);
- int page_end();
- int add_label(const char *name);
- int add_entry(const entry *ent);
- int add_entry_direct(int which, int o0=0, int o1=0, int o2=0, int o3=0, int o4=0, int o5=0);
- int add_db_data(IMMap *map); // returns offset
- int add_db_data(const char *data, int length); // returns offset
- int add_data(const char *data, int length, IGrowBuf *dblock); // returns offset
- int add_string(const char *string, int process=1, WORD codepage=CP_ACP); // returns offset (in string table)
- int add_intstring(const int i); // returns offset in stringblock
-
- int preprocess_string(char *out, const char *in, WORD codepage=CP_ACP);
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- // Added by Ximon Eighteen 5th August 2002
- Plugins m_plugins;
- bool plugin_used;
- bool uninst_plugin_used;
- int build_plugin_unload;
-#endif //NSIS_CONFIG_PLUGIN_SUPPORT
-
- // build.cpp functions used mostly within build.cpp
- int datablock_optimize(int start_offset, int first_int);
- void printline(int l);
- int process_jump(LineParser &line, int wt, int *offs);
-
- int AddVersionInfo();
- int ProcessPages();
- void PrepareInstTypes();
- void AddStandardStrings();
- void PrepareHeaders(IGrowBuf *hdrbuf);
- int SetVarsSection();
- int SetManifest();
-
- int resolve_jump_int(const char *fn, int *a, int offs, int start, int end);
- int resolve_call_int(const char *fn, const char *str, int fptr, int *ofs);
- int resolve_instruction(const char *fn, const char *str, entry *w, int offs, int start, int end);
-
- int resolve_coderefs(const char *str);
- void print_warnings();
- int uninstall_generate();
- void set_uninstall_mode(int un);
-
- // lang.cpp functions and variables
- void InitLangTables();
- LanguageTable *GetLangTable(LANGID &lang, bool create = true);
- char *GetLangNameAndCP(LANGID lang, unsigned int *codepage = NULL);
- int DefineLangString(char *name, int process=-1);
- int DefineInnerLangString(int id, int process=-1);
- int SetLangString(char *name, LANGID lang, char *string);
- int SetInnerString(int id, char *string);
- int GenerateLangTable(LanguageTable *lt, int num_lang_tables);
- int GenerateLangTables();
- void FillLanguageTable(LanguageTable *table);
- int HasUserDefined(int id) {
- const char *us = UserInnerStrings.get(id);
- return us && *us;
- };
-
- LanguageTable *LoadLangFile(char *filename);
- void DeleteLangTable(LanguageTable *table);
-
- NLFRef NLFRefs[NLF_STRINGS];
- bool keep_ref;
- StringsArray UserInnerStrings;
- bool defcodepage_set;
- GrowBuf lang_tables;
- LANGID last_used_lang;
- LangStringList build_langstrings;
- int build_langstring_num, ubuild_langstring_num;
- char build_font[1024];
- int build_font_size;
-
- unsigned int uDefCodePage;
-
- // pages stuff
- int license_res_id;
- page *cur_page;
- int cur_page_type;
- int enable_last_page_cancel, uenable_last_page_cancel;
-
- int disable_window_icon;
-
- // User variables stuff
- int GetUserVarIndex(LineParser &line, int token);
- // Added by ramon 3 jun 2003
- UserVarsStringList m_UserVarNames;
- int m_iBaseVarsNum;
- int DeclaredUserVar(const char *VarName);
- void VerifyDeclaredUserVarRefs(UserVarsStringList *pVarsStringList);
-
- ConstantsStringList m_ShellConstants;
-
- // a whole bunch O data.
-
- std::string stubs_dir;
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- ICompressor *compressor;
- CZlib zlib_compressor;
- CBzip2 bzip2_compressor;
- CLZMA lzma_compressor;
-#endif
- bool build_compressor_set;
- bool build_compressor_final;
- bool build_compress_whole;
- int build_compress;
- int build_compress_level;
- int build_compress_dict_size;
-
- bool no_space_texts;
-
- bool has_called_write_output;
-
- char build_packname[1024], build_packcmd[1024];
- int build_overwrite, build_last_overwrite, build_crcchk,
- build_datesave, build_optimize_datablock,
- build_allowskipfiles; // Added by ramon 23 May 2003
-
- header build_header, build_uninst, *cur_header;
- int uninstall_mode;
- int uninstall_size,uninstall_size_full;
- int uninstaller_writes_used;
-
- char build_output_filename[1024];
-
- int build_include_depth;
-
- // Added by ramon 6 jun 2003
-#ifdef NSIS_SUPPORT_VERSION_INFO
- CResourceVersionInfo rVersionInfo;
- char version_product_v[1024];
-#endif
-
- int sectiongroup_open_cnt;
- FastStringList m_warnings;
- GrowBuf m_macros;
-
- StringList m_macro_entry;
-
- int db_opt_save, db_comp_save, db_full_size, db_opt_save_u,
- db_comp_save_u, db_full_size_u;
-
- FastStringList include_dirs;
-
- StringList ns_func; // function namespace
- StringList ns_label; // label namespace
-
- int build_cursection_isfunc;
- section *build_cursection;
- TinyGrowBuf build_sections, ubuild_sections, *cur_sections;
- GrowBuf build_entries,ubuild_entries, *cur_entries;
- GrowBuf build_instruction_entry_map,ubuild_instruction_entry_map, *cur_instruction_entry_map;
- TinyGrowBuf build_functions, ubuild_functions, *cur_functions;
- TinyGrowBuf build_labels, ubuild_labels, *cur_labels;
- StringList build_strlist, ubuild_strlist, *cur_strlist;
- GrowBuf build_langtables, ubuild_langtables, *cur_langtables;
- TinyGrowBuf build_pages, ubuild_pages, *cur_pages;
- TinyGrowBuf build_ctlcolors, ubuild_ctlcolors, *cur_ctlcolors;
-
- // don't forget to update the cache after updating the datablock
- // see datablock_optimize for an example
- MMapBuf build_datablock, ubuild_datablock;
- TinyGrowBuf build_datablock_cache, ubuild_datablock_cache;
- IGrowBuf *cur_datablock, *cur_datablock_cache;
- struct cached_db_size
- {
- int first_int; // size | (compressed ? 0x80000000 : 0)
- int start_offset;
- };
-
- int build_filebuflen;
-
- TinyGrowBuf verbose_stack;
-
- unsigned char *m_exehead;
- size_t m_exehead_size;
- size_t m_exehead_original_size;
-
- bool branding_image_found;
- WORD branding_image_id;
- unsigned char *m_unicon_data;
- size_t m_unicon_size;
-
-#ifdef NSIS_SUPPORT_BGBG
- LOGFONT bg_font;
- LOGFONT bg_default_font;
-#endif
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- int deflateToFile(FILE *fp, char *buf, int len); // len==0 to flush
-#endif
-
- manifest::comctl manifest_comctl;
- manifest::exec_level manifest_exec_level;
-
- CResourceEditor *res_editor;
- void init_res_editor();
- void close_res_editor();
-};
-
-#endif //_BUILD_H_
+/*
+ * build.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _BUILD_H_
+#define _BUILD_H_
+
+#include "strlist.h"
+#include "lineparse.h"
+#include "lang.h"
+#include "ResourceEditor.h"
+#include "ResourceVersionInfo.h"
+#include "uservars.h"
+#include "ShConstants.h"
+#include "mmap.h"
+#include "manifest.h"
+#include "icon.h"
+
+#include "exehead/fileform.h"
+#include "exehead/config.h"
+
+#include <string>
+#include <set>
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+// Added by Sunil Kamath 11 June 2003
+# include <time.h>
+# include <sys/stat.h>
+#endif
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+// Changed by Amir Szekely 31st July 2002
+#include "compressor.h"
+#include "czlib.h"
+#include "cbzip2.h"
+#include "clzma.h"
+
+#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+# include "Plugins.h"
+#endif //NSIS_CONFIG_PLUGIN_SUPPORT
+
+#define PS_OK 0
+#define PS_EOF 1
+#define PS_ERROR 50
+#define PS_WARNING 100
+
+// token placement
+#define TP_SEC 1
+#define TP_FUNC 2
+#define TP_CODE (TP_SEC | TP_FUNC)
+#define TP_GLOBAL 4
+#define TP_PAGEEX 8
+#define TP_PG (TP_GLOBAL | TP_PAGEEX)
+#define TP_ALL (TP_CODE | TP_PG)
+
+enum notify_e {
+ MAKENSIS_NOTIFY_SCRIPT,
+ MAKENSIS_NOTIFY_WARNING,
+ MAKENSIS_NOTIFY_ERROR,
+ MAKENSIS_NOTIFY_OUTPUT
+};
+
+#define PAGE_CUSTOM 0
+#define PAGE_LICENSE 1
+#define PAGE_COMPONENTS 2
+#define PAGE_DIRECTORY 3
+#define PAGE_INSTFILES 4
+#define PAGE_UNINSTCONFIRM 5
+#define PAGE_COMPLETED 6
+
+class CEXEBuild {
+ public:
+ CEXEBuild();
+ void initialize(const char *makensis_path);
+ ~CEXEBuild();
+
+ // to add a warning to the compiler's warning list.
+ void warning(const char *s, ...);
+ // warning with file name and line count
+ void warning_fl(const char *s, ...);
+
+ // to add a defined thing.
+ void define(const char *p, const char *v="");
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ // Added by Ximon Eighteen 5th August 2002
+ void build_plugin_table(void);
+ int plugins_processed;
+#endif //NSIS_CONFIG_PLUGIN_SUPPORT
+
+
+ // process a script (you can process as many scripts as you want,
+ // it is as if they are concatenated)
+ int process_script(FILE *fp, char *curfilename);
+ int process_oneline(char *line, char *curfilename, int lineptr);
+
+ // you only get to call write_output once, so use it wisely.
+ int write_output(void);
+
+ void print_help(char *commandname=NULL);
+
+ DefineList definedlist;
+
+ int display_errors;
+ int display_script;
+ int display_warnings;
+ int display_info;
+
+ int linecnt;
+ char *curfilename;
+ FILE *fp;
+
+ HWND notify_hwnd;
+ void notify(notify_e code, const char *data) const;
+
+ private:
+ int check_write_output_errors() const;
+ int prepare_uninstaller();
+ int pack_exe_header();
+
+ int set_compressor(const std::string& compressor, const bool solid);
+ int update_exehead(const std::string& file, size_t *size=NULL);
+ void update_exehead(const unsigned char *new_exehead, size_t new_size);
+
+ // tokens.cpp
+ bool is_valid_token(char *s);
+ int get_commandtoken(char *s, int *np, int *op, int *pos);
+ int GetCurrentTokenPlace();
+ int IsTokenPlacedRight(int pos, char *tok);
+
+ // script.cpp
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ char* set_file_predefine(char *);
+ void restore_file_predefine(char *);
+ char* set_timestamp_predefine(char *);
+ void restore_timestamp_predefine(char *);
+ char* set_line_predefine(int, BOOL);
+ void restore_line_predefine(char *);
+ void set_date_time_predefines();
+ void del_date_time_predefines();
+#endif
+ int parseScript();
+ int includeScript(char *f);
+ int MacroExists(const char *macroname);
+#ifdef NSIS_FIX_DEFINES_IN_STRINGS
+ void ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist, bool bIgnoreDefines = false);
+#else
+ void ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist);
+#endif
+ int doParse(const char *str);
+ int doCommand(int which_token, LineParser &line);
+
+ int do_add_file(const char *lgss, int attrib, int recurse, int *total_files, const char
+ *name_override=0, int generatecode=1, int *data_handle=0,
+ const std::set<std::string>& excluded=std::set<std::string>(),
+ const std::string& basedir=std::string(""), bool dir_created=false);
+ int add_file(const std::string& dir, const std::string& file, int attrib, const char
+ *name_override, int generatecode, int *data_handle);
+ int do_add_file_create_dir(const std::string& local_dir, const std::string& dir, int attrib=0);
+
+ GrowBuf m_linebuild; // used for concatenating lines
+
+ // used by doParse to do preprocessing
+ struct ifblock
+ {
+ int hasexeced;
+ int elseused;
+ int ignore;
+ int inherited_ignore;
+ } *cur_ifblock;
+
+ TinyGrowBuf build_preprocessor_data;
+
+ void start_ifblock();
+ void end_ifblock();
+ int num_ifblock();
+
+ int last_line_had_slash;
+ bool inside_comment;
+ int multiple_entries_instruction;
+
+ void ERROR_MSG(const char *s, ...) const;
+ void SCRIPT_MSG(const char *s, ...) const;
+ void INFO_MSG(const char *s, ...) const;
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ int add_plugins_dir_initializer(void);
+#endif //NSIS_CONFIG_PLUGIN_SUPPORT
+
+ // build.cpp functions used mostly by script.cpp
+ void set_code_type_predefines(const char *value = NULL);
+ int getcurdbsize();
+ int add_section(const char *secname, const char *defname, int expand=0);
+ int section_end();
+ int add_function(const char *funname);
+ int function_end();
+ void section_add_size_kb(int kb);
+ int section_add_flags(int flags);
+ int section_add_install_type(int inst_type);
+ int add_page(int type);
+ int page_end();
+ int add_label(const char *name);
+ int add_entry(const entry *ent);
+ int add_entry_direct(int which, int o0=0, int o1=0, int o2=0, int o3=0, int o4=0, int o5=0);
+ int add_db_data(IMMap *map); // returns offset
+ int add_db_data(const char *data, int length); // returns offset
+ int add_data(const char *data, int length, IGrowBuf *dblock); // returns offset
+ int add_string(const char *string, int process=1, WORD codepage=CP_ACP); // returns offset (in string table)
+ int add_intstring(const int i); // returns offset in stringblock
+
+ int preprocess_string(char *out, const char *in, WORD codepage=CP_ACP);
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ // Added by Ximon Eighteen 5th August 2002
+ Plugins m_plugins;
+ bool plugin_used;
+ bool uninst_plugin_used;
+ int build_plugin_unload;
+#endif //NSIS_CONFIG_PLUGIN_SUPPORT
+
+ // build.cpp functions used mostly within build.cpp
+ int datablock_optimize(int start_offset, int first_int);
+ void printline(int l);
+ int process_jump(LineParser &line, int wt, int *offs);
+
+ int AddVersionInfo();
+ int ProcessPages();
+ void PrepareInstTypes();
+ void AddStandardStrings();
+ void PrepareHeaders(IGrowBuf *hdrbuf);
+ int SetVarsSection();
+ int SetManifest();
+
+ int resolve_jump_int(const char *fn, int *a, int offs, int start, int end);
+ int resolve_call_int(const char *fn, const char *str, int fptr, int *ofs);
+ int resolve_instruction(const char *fn, const char *str, entry *w, int offs, int start, int end);
+
+ int resolve_coderefs(const char *str);
+ void print_warnings();
+ int uninstall_generate();
+ void set_uninstall_mode(int un);
+
+ // lang.cpp functions and variables
+ void InitLangTables();
+ LanguageTable *GetLangTable(LANGID &lang, bool create = true);
+ char *GetLangNameAndCP(LANGID lang, unsigned int *codepage = NULL);
+ int DefineLangString(char *name, int process=-1);
+ int DefineInnerLangString(int id, int process=-1);
+ int SetLangString(char *name, LANGID lang, char *string);
+ int SetInnerString(int id, char *string);
+ int GenerateLangTable(LanguageTable *lt, int num_lang_tables);
+ int GenerateLangTables();
+ void FillLanguageTable(LanguageTable *table);
+ int HasUserDefined(int id) {
+ const char *us = UserInnerStrings.get(id);
+ return us && *us;
+ };
+
+ LanguageTable *LoadLangFile(char *filename);
+ void DeleteLangTable(LanguageTable *table);
+
+ NLFRef NLFRefs[NLF_STRINGS];
+ bool keep_ref;
+ StringsArray UserInnerStrings;
+ bool defcodepage_set;
+ GrowBuf lang_tables;
+ LANGID last_used_lang;
+ LangStringList build_langstrings;
+ int build_langstring_num, ubuild_langstring_num;
+ char build_font[1024];
+ int build_font_size;
+
+ unsigned int uDefCodePage;
+
+ // pages stuff
+ int license_res_id;
+ page *cur_page;
+ int cur_page_type;
+ int enable_last_page_cancel, uenable_last_page_cancel;
+
+ int disable_window_icon;
+
+ // User variables stuff
+ int GetUserVarIndex(LineParser &line, int token);
+ // Added by ramon 3 jun 2003
+ UserVarsStringList m_UserVarNames;
+ int m_iBaseVarsNum;
+ int DeclaredUserVar(const char *VarName);
+ void VerifyDeclaredUserVarRefs(UserVarsStringList *pVarsStringList);
+
+ ConstantsStringList m_ShellConstants;
+
+ // a whole bunch O data.
+
+ std::string stubs_dir;
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ ICompressor *compressor;
+ CZlib zlib_compressor;
+ CBzip2 bzip2_compressor;
+ CLZMA lzma_compressor;
+#endif
+ bool build_compressor_set;
+ bool build_compressor_final;
+ bool build_compress_whole;
+ int build_compress;
+ int build_compress_level;
+ int build_compress_dict_size;
+
+ bool no_space_texts;
+
+ bool has_called_write_output;
+
+ char build_packname[1024], build_packcmd[1024];
+ int build_overwrite, build_last_overwrite, build_crcchk,
+ build_datesave, build_optimize_datablock,
+ build_allowskipfiles; // Added by ramon 23 May 2003
+
+ header build_header, build_uninst, *cur_header;
+ int uninstall_mode;
+ int uninstall_size,uninstall_size_full;
+ int uninstaller_writes_used;
+
+ char build_output_filename[1024];
+
+ int build_include_depth;
+
+ // Added by ramon 6 jun 2003
+#ifdef NSIS_SUPPORT_VERSION_INFO
+ CResourceVersionInfo rVersionInfo;
+ char version_product_v[1024];
+#endif
+
+ int sectiongroup_open_cnt;
+ FastStringList m_warnings;
+ GrowBuf m_macros;
+
+ StringList m_macro_entry;
+
+ int db_opt_save, db_comp_save, db_full_size, db_opt_save_u,
+ db_comp_save_u, db_full_size_u;
+
+ FastStringList include_dirs;
+
+ StringList ns_func; // function namespace
+ StringList ns_label; // label namespace
+
+ int build_cursection_isfunc;
+ section *build_cursection;
+ TinyGrowBuf build_sections, ubuild_sections, *cur_sections;
+ GrowBuf build_entries,ubuild_entries, *cur_entries;
+ GrowBuf build_instruction_entry_map,ubuild_instruction_entry_map, *cur_instruction_entry_map;
+ TinyGrowBuf build_functions, ubuild_functions, *cur_functions;
+ TinyGrowBuf build_labels, ubuild_labels, *cur_labels;
+ StringList build_strlist, ubuild_strlist, *cur_strlist;
+ GrowBuf build_langtables, ubuild_langtables, *cur_langtables;
+ TinyGrowBuf build_pages, ubuild_pages, *cur_pages;
+ TinyGrowBuf build_ctlcolors, ubuild_ctlcolors, *cur_ctlcolors;
+
+ // don't forget to update the cache after updating the datablock
+ // see datablock_optimize for an example
+ MMapBuf build_datablock, ubuild_datablock;
+ TinyGrowBuf build_datablock_cache, ubuild_datablock_cache;
+ IGrowBuf *cur_datablock, *cur_datablock_cache;
+ struct cached_db_size
+ {
+ int first_int; // size | (compressed ? 0x80000000 : 0)
+ int start_offset;
+ };
+
+ int build_filebuflen;
+
+ TinyGrowBuf verbose_stack;
+
+ unsigned char *m_exehead;
+ size_t m_exehead_size;
+ size_t m_exehead_original_size;
+
+ bool branding_image_found;
+ WORD branding_image_id;
+
+ IconGroup installer_icon;
+ IconGroup uninstaller_icon;
+ size_t m_unicon_size;
+
+#ifdef NSIS_SUPPORT_BGBG
+ LOGFONT bg_font;
+ LOGFONT bg_default_font;
+#endif
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ int deflateToFile(FILE *fp, char *buf, int len); // len==0 to flush
+#endif
+
+ manifest::comctl manifest_comctl;
+ manifest::exec_level manifest_exec_level;
+
+ CResourceEditor *res_editor;
+ void init_res_editor();
+ void close_res_editor();
+};
+
+#endif //_BUILD_H_
diff --git a/Source/bzip2/blocksort.c b/Source/bzip2/blocksort.c
index 6c2fa34..d752a1a 100755
--- a/Source/bzip2/blocksort.c
+++ b/Source/bzip2/blocksort.c
@@ -1,1109 +1,1109 @@
-/*
- * This file is a part of the bzip2 compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.bzip.org/
- *
- * This modification is not compatible with the original bzip2.
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-#include "bzlib.h"
-
-/*-------------------------------------------------------------*/
-/*--- Block sorting machinery ---*/
-/*--- blocksort.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- jseward@acm.org
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
-
- To get some idea how the block sorting algorithms in this file
- work, read my paper
- On the Performance of BWT Sorting Algorithms
- in Proceedings of the IEEE Data Compression Conference 2000,
- Snowbird, Utah, USA, 27-30 March 2000. The main sort in this
- file implements the algorithm called cache in the paper.
---*/
-
-/*---------------------------------------------*/
-/*--- Fallback O(N log(N)^2) sorting ---*/
-/*--- algorithm, for repetitive blocks ---*/
-/*---------------------------------------------*/
-
-/*---------------------------------------------*/
-static void fallbackSimpleSort ( UInt32* fmap,
- UInt32* eclass,
- Int32 lo,
- Int32 hi )
-{
- Int32 i, j, tmp;
- UInt32 ec_tmp;
-
- if (lo == hi) return;
-
- if (hi - lo > 3) {
- for ( i = hi-4; i >= lo; i-- ) {
- tmp = fmap[i];
- ec_tmp = eclass[tmp];
- for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
- fmap[j-4] = fmap[j];
- fmap[j-4] = tmp;
- }
- }
-
- for ( i = hi-1; i >= lo; i-- ) {
- tmp = fmap[i];
- ec_tmp = eclass[tmp];
- for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
- fmap[j-1] = fmap[j];
- fmap[j-1] = tmp;
- }
-}
-
-
-/*---------------------------------------------*/
-#define fswap(zz1, zz2) \
- { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
-
-#define fvswap(zzp1, zzp2, zzn) \
-{ \
- Int32 yyp1 = (zzp1); \
- Int32 yyp2 = (zzp2); \
- Int32 yyn = (zzn); \
- while (yyn > 0) { \
- fswap(fmap[yyp1], fmap[yyp2]); \
- yyp1++; yyp2++; yyn--; \
- } \
-}
-
-
-#define fmin(a,b) ((a) < (b)) ? (a) : (b)
-
-#define fpush(lz,hz) { stackLo[sp] = lz; \
- stackHi[sp] = hz; \
- sp++; }
-
-#define fpop(lz,hz) { sp--; \
- lz = stackLo[sp]; \
- hz = stackHi[sp]; }
-
-#define FALLBACK_QSORT_SMALL_THRESH 10
-#define FALLBACK_QSORT_STACK_SIZE 100
-
-
-static
-void fallbackQSort3 ( UInt32* fmap,
- UInt32* eclass,
- Int32 loSt,
- Int32 hiSt )
-{
- Int32 unLo, unHi, ltLo, gtHi, n, m;
- Int32 sp, lo, hi;
- UInt32 med, r, r3;
- Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
- Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
-
- r = 0;
-
- sp = 0;
- fpush ( loSt, hiSt );
-
- while (sp > 0) {
-
- AssertH ( sp < FALLBACK_QSORT_STACK_SIZE, 1004 );
-
- fpop ( lo, hi );
- if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
- fallbackSimpleSort ( fmap, eclass, lo, hi );
- continue;
- }
-
- /* Random partitioning. Median of 3 sometimes fails to
- avoid bad cases. Median of 9 seems to help but
- looks rather expensive. This too seems to work but
- is cheaper. Guidance for the magic constants
- 7621 and 32768 is taken from Sedgewick's algorithms
- book, chapter 35.
- */
- r = ((r * 7621) + 1) % 32768;
- r3 = r % 3;
- if (r3 == 0) med = eclass[fmap[lo]]; else
- if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
- med = eclass[fmap[hi]];
-
- unLo = ltLo = lo;
- unHi = gtHi = hi;
-
- while (1) {
- while (1) {
- if (unLo > unHi) break;
- n = (Int32)eclass[fmap[unLo]] - (Int32)med;
- if (n == 0) {
- fswap(fmap[unLo], fmap[ltLo]);
- ltLo++; unLo++;
- continue;
- };
- if (n > 0) break;
- unLo++;
- }
- while (1) {
- if (unLo > unHi) break;
- n = (Int32)eclass[fmap[unHi]] - (Int32)med;
- if (n == 0) {
- fswap(fmap[unHi], fmap[gtHi]);
- gtHi--; unHi--;
- continue;
- };
- if (n < 0) break;
- unHi--;
- }
- if (unLo > unHi) break;
- fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
- }
-
- AssertD ( unHi == unLo-1, "fallbackQSort3(2)" );
-
- if (gtHi < ltLo) continue;
-
- n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
- m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
-
- n = lo + unLo - ltLo - 1;
- m = hi - (gtHi - unHi) + 1;
-
- if (n - lo > hi - m) {
- fpush ( lo, n );
- fpush ( m, hi );
- } else {
- fpush ( m, hi );
- fpush ( lo, n );
- }
- }
-}
-
-#undef fmin
-#undef fpush
-#undef fpop
-#undef fswap
-#undef fvswap
-#undef FALLBACK_QSORT_SMALL_THRESH
-#undef FALLBACK_QSORT_STACK_SIZE
-
-
-/*---------------------------------------------*/
-/* Pre:
- nblock > 0
- eclass exists for [0 .. nblock-1]
- ((UChar*)eclass) [0 .. nblock-1] holds block
- ptr exists for [0 .. nblock-1]
-
- Post:
- ((UChar*)eclass) [0 .. nblock-1] holds block
- All other areas of eclass destroyed
- fmap [0 .. nblock-1] holds sorted order
- bhtab [ 0 .. 2+(nblock/32) ] destroyed
-*/
-
-#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
-#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
-#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
-#define WORD_BH(zz) bhtab[(zz) >> 5]
-#define UNALIGNED_BH(zz) ((zz) & 0x01f)
-
-static
-void fallbackSort ( UInt32* fmap,
- UInt32* eclass,
- UInt32* bhtab,
- Int32 nblock)
-{
- Int32 ftab[257];
- Int32 ftabCopy[256];
- Int32 H, i, j, k, l, r, cc, cc1;
- Int32 nNotDone;
- Int32 nBhtab;
- UChar* eclass8 = (UChar*)eclass;
-
- /*--
- Initial 1-char radix sort to generate
- initial fmap and initial BH bits.
- --*/
- for (i = 0; i < 257; i++) ftab[i] = 0;
- for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
- for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
- for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
-
- for (i = 0; i < nblock; i++) {
- j = eclass8[i];
- k = ftab[j] - 1;
- ftab[j] = k;
- fmap[k] = i;
- }
-
- nBhtab = 2 + (nblock / 32);
- for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
- for (i = 0; i < 256; i++) SET_BH(ftab[i]);
-
- /*--
- Inductively refine the buckets. Kind-of an
- "exponential radix sort" (!), inspired by the
- Manber-Myers suffix array construction algorithm.
- --*/
-
- /*-- set sentinel bits for block-end detection --*/
- for (i = 0; i < 32; i++) {
- SET_BH(nblock + 2*i);
- CLEAR_BH(nblock + 2*i + 1);
- }
-
- /*-- the log(N) loop --*/
- H = 1;
- while (1) {
-
- j = 0;
- for (i = 0; i < nblock; i++) {
- if (ISSET_BH(i)) j = i;
- k = fmap[i] - H; if (k < 0) k += nblock;
- eclass[k] = j;
- }
-
- nNotDone = 0;
- r = -1;
- while (1) {
-
- /*-- find the next non-singleton bucket --*/
- k = r + 1;
- while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
- if (ISSET_BH(k)) {
- while (WORD_BH(k) == 0xffffffff) k += 32;
- while (ISSET_BH(k)) k++;
- }
- l = k - 1;
- if (l >= nblock) break;
- while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
- if (!ISSET_BH(k)) {
- while (WORD_BH(k) == 0x00000000) k += 32;
- while (!ISSET_BH(k)) k++;
- }
- r = k - 1;
- if (r >= nblock) break;
-
- /*-- now [l, r] bracket current bucket --*/
- if (r > l) {
- nNotDone += (r - l + 1);
- fallbackQSort3 ( fmap, eclass, l, r );
-
- /*-- scan bucket and generate header bits-- */
- cc = -1;
- for (i = l; i <= r; i++) {
- cc1 = eclass[fmap[i]];
- if (cc != cc1) { SET_BH(i); cc = cc1; };
- }
- }
- }
-
- H *= 2;
- if (H > nblock || nNotDone == 0) break;
- }
-
- /*--
- Reconstruct the original block in
- eclass8 [0 .. nblock-1], since the
- previous phase destroyed it.
- --*/
- j = 0;
- for (i = 0; i < nblock; i++) {
- while (ftabCopy[j] == 0) j++;
- ftabCopy[j]--;
- eclass8[fmap[i]] = (UChar)j;
- }
- AssertH ( j < 256, 1005 );
-}
-
-#undef SET_BH
-#undef CLEAR_BH
-#undef ISSET_BH
-#undef WORD_BH
-#undef UNALIGNED_BH
-
-
-/*---------------------------------------------*/
-/*--- The main, O(N^2 log(N)) sorting ---*/
-/*--- algorithm. Faster for "normal" ---*/
-/*--- non-repetitive blocks. ---*/
-/*---------------------------------------------*/
-
-/*---------------------------------------------*/
-static Bool mainGtU ( UInt32 i1,
- UInt32 i2,
- UChar* block,
- UInt16* quadrant,
- UInt32 nblock,
- Int32* budget )
-{
- Int32 k;
- UChar c1, c2;
- UInt16 s1, s2;
-
- AssertD ( i1 != i2, "mainGtU" );
- /* 1 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 2 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 3 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 4 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 5 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 6 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 7 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 8 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 9 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 10 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 11 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
- /* 12 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- i1++; i2++;
-
- k = nblock + 8;
-
- do {
- /* 1 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 2 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 3 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 4 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 5 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 6 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 7 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
- /* 8 */
- c1 = block[i1]; c2 = block[i2];
- if (c1 != c2) return (c1 > c2);
- s1 = quadrant[i1]; s2 = quadrant[i2];
- if (s1 != s2) return (s1 > s2);
- i1++; i2++;
-
- if (i1 >= nblock) i1 -= nblock;
- if (i2 >= nblock) i2 -= nblock;
-
- k -= 8;
- (*budget)--;
- }
- while (k >= 0);
-
- return False;
-}
-
-
-/*---------------------------------------------*/
-/*--
- Knuth's increments seem to work better
- than Incerpi-Sedgewick here. Possibly
- because the number of elems to sort is
- usually small, typically <= 20.
---*/
-static
-Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
- 9841, 29524, 88573, 265720,
- 797161, 2391484 };
-
-static
-void mainSimpleSort ( UInt32* ptr,
- UChar* block,
- UInt16* quadrant,
- Int32 nblock,
- Int32 lo,
- Int32 hi,
- Int32 d,
- Int32* budget )
-{
- Int32 i, j, h, bigN, hp;
- UInt32 v;
-
- bigN = hi - lo + 1;
- if (bigN < 2) return;
-
- hp = 0;
- while (incs[hp] < bigN) hp++;
- hp--;
-
- for (; hp >= 0; hp--) {
- h = incs[hp];
-
- i = lo + h;
- while (True) {
-
- /*-- copy 1 --*/
- if (i > hi) break;
- v = ptr[i];
- j = i;
- while ( mainGtU (
- ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
- ptr[j] = ptr[j-h];
- j = j - h;
- if (j <= (lo + h - 1)) break;
- }
- ptr[j] = v;
- i++;
-
- /*-- copy 2 --*/
- if (i > hi) break;
- v = ptr[i];
- j = i;
- while ( mainGtU (
- ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
- ptr[j] = ptr[j-h];
- j = j - h;
- if (j <= (lo + h - 1)) break;
- }
- ptr[j] = v;
- i++;
-
- /*-- copy 3 --*/
- if (i > hi) break;
- v = ptr[i];
- j = i;
- while ( mainGtU (
- ptr[j-h]+d, v+d, block, quadrant, nblock, budget
- ) ) {
- ptr[j] = ptr[j-h];
- j = j - h;
- if (j <= (lo + h - 1)) break;
- }
- ptr[j] = v;
- i++;
-
- if (*budget < 0) return;
- }
- }
-}
-
-
-/*---------------------------------------------*/
-/*--
- The following is an implementation of
- an elegant 3-way quicksort for strings,
- described in a paper "Fast Algorithms for
- Sorting and Searching Strings", by Robert
- Sedgewick and Jon L. Bentley.
---*/
-
-#define mswap(zz1, zz2) \
- { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
-
-#define mvswap(zzp1, zzp2, zzn) \
-{ \
- Int32 yyp1 = (zzp1); \
- Int32 yyp2 = (zzp2); \
- Int32 yyn = (zzn); \
- while (yyn > 0) { \
- mswap(ptr[yyp1], ptr[yyp2]); \
- yyp1++; yyp2++; yyn--; \
- } \
-}
-
-static
-UChar mmed3 ( UChar a, UChar b, UChar c )
-{
- UChar t;
- if (a > b) { t = a; a = b; b = t; };
- if (b > c) {
- b = c;
- if (a > b) b = a;
- }
- return b;
-}
-
-#define mmin(a,b) ((a) < (b)) ? (a) : (b)
-
-#define mpush(lz,hz,dz) { stackLo[sp] = lz; \
- stackHi[sp] = hz; \
- stackD [sp] = dz; \
- sp++; }
-
-#define mpop(lz,hz,dz) { sp--; \
- lz = stackLo[sp]; \
- hz = stackHi[sp]; \
- dz = stackD [sp]; }
-
-
-#define mnextsize(az) (nextHi[az]-nextLo[az])
-
-#define mnextswap(az,bz) \
- { Int32 tz; \
- tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
- tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
- tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
-
-
-#define MAIN_QSORT_SMALL_THRESH 20
-#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
-#define MAIN_QSORT_STACK_SIZE 100
-
-static
-void mainQSort3 ( UInt32* ptr,
- UChar* block,
- UInt16* quadrant,
- Int32 nblock,
- Int32 loSt,
- Int32 hiSt,
- Int32 dSt,
- Int32* budget )
-{
- Int32 unLo, unHi, ltLo, gtHi, n, m, med;
- Int32 sp, lo, hi, d;
-
- Int32 stackLo[MAIN_QSORT_STACK_SIZE];
- Int32 stackHi[MAIN_QSORT_STACK_SIZE];
- Int32 stackD [MAIN_QSORT_STACK_SIZE];
-
- Int32 nextLo[3];
- Int32 nextHi[3];
- Int32 nextD [3];
-
- sp = 0;
- mpush ( loSt, hiSt, dSt );
-
- while (sp > 0) {
-
- AssertH ( sp < MAIN_QSORT_STACK_SIZE, 1001 );
-
- mpop ( lo, hi, d );
- if (hi - lo < MAIN_QSORT_SMALL_THRESH ||
- d > MAIN_QSORT_DEPTH_THRESH) {
- mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
- if (*budget < 0) return;
- continue;
- }
-
- med = (Int32)
- mmed3 ( block[ptr[ lo ]+d],
- block[ptr[ hi ]+d],
- block[ptr[ (lo+hi)>>1 ]+d] );
-
- unLo = ltLo = lo;
- unHi = gtHi = hi;
-
- while (True) {
- while (True) {
- if (unLo > unHi) break;
- n = ((Int32)block[ptr[unLo]+d]) - med;
- if (n == 0) {
- mswap(ptr[unLo], ptr[ltLo]);
- ltLo++; unLo++; continue;
- };
- if (n > 0) break;
- unLo++;
- }
- while (True) {
- if (unLo > unHi) break;
- n = ((Int32)block[ptr[unHi]+d]) - med;
- if (n == 0) {
- mswap(ptr[unHi], ptr[gtHi]);
- gtHi--; unHi--; continue;
- };
- if (n < 0) break;
- unHi--;
- }
- if (unLo > unHi) break;
- mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
- }
-
- AssertD ( unHi == unLo-1, "mainQSort3(2)" );
-
- if (gtHi < ltLo) {
- mpush(lo, hi, d+1 );
- continue;
- }
-
- n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
- m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
-
- n = lo + unLo - ltLo - 1;
- m = hi - (gtHi - unHi) + 1;
-
- nextLo[0] = lo; nextHi[0] = n; nextD[0] = d;
- nextLo[1] = m; nextHi[1] = hi; nextD[1] = d;
- nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
-
- if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
- if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
- if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
-
- AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" );
- AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" );
-
- mpush (nextLo[0], nextHi[0], nextD[0]);
- mpush (nextLo[1], nextHi[1], nextD[1]);
- mpush (nextLo[2], nextHi[2], nextD[2]);
- }
-}
-
-#undef mswap
-#undef mvswap
-#undef mpush
-#undef mpop
-#undef mmin
-#undef mnextsize
-#undef mnextswap
-#undef MAIN_QSORT_SMALL_THRESH
-#undef MAIN_QSORT_DEPTH_THRESH
-#undef MAIN_QSORT_STACK_SIZE
-
-
-/*---------------------------------------------*/
-/* Pre:
- nblock > N_OVERSHOOT
- block32 exists for [0 .. nblock-1 +N_OVERSHOOT]
- ((UChar*)block32) [0 .. nblock-1] holds block
- ptr exists for [0 .. nblock-1]
-
- Post:
- ((UChar*)block32) [0 .. nblock-1] holds block
- All other areas of block32 destroyed
- ftab [0 .. 65536 ] destroyed
- ptr [0 .. nblock-1] holds sorted order
- if (*budget < 0), sorting was abandoned
-*/
-
-#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8])
-#define SETMASK (1 << 21)
-#define CLEARMASK (~(SETMASK))
-
-static
-void mainSort ( UInt32* ptr,
- UChar* block,
- UInt16* quadrant,
- UInt32* ftab,
- Int32 nblock,
- Int32* budget )
-{
- Int32 i, j, k, ss, sb;
- Int32 runningOrder[256];
- Bool bigDone[256];
- Int32 copyStart[256];
- Int32 copyEnd [256];
- UChar c1;
- Int32 numQSorted;
- UInt16 s;
-
- /*-- set up the 2-byte frequency table --*/
- for (i = 65536; i >= 0; i--) ftab[i] = 0;
-
- j = block[0] << 8;
- i = nblock-1;
- for (; i >= 3; i -= 4) {
- quadrant[i] = 0;
- j = (j >> 8) | ( ((UInt16)block[i]) << 8);
- ftab[j]++;
- quadrant[i-1] = 0;
- j = (j >> 8) | ( ((UInt16)block[i-1]) << 8);
- ftab[j]++;
- quadrant[i-2] = 0;
- j = (j >> 8) | ( ((UInt16)block[i-2]) << 8);
- ftab[j]++;
- quadrant[i-3] = 0;
- j = (j >> 8) | ( ((UInt16)block[i-3]) << 8);
- ftab[j]++;
- }
- for (; i >= 0; i--) {
- quadrant[i] = 0;
- j = (j >> 8) | ( ((UInt16)block[i]) << 8);
- ftab[j]++;
- }
-
- /*-- (emphasises close relationship of block & quadrant) --*/
- for (i = 0; i < BZ_N_OVERSHOOT; i++) {
- block [nblock+i] = block[i];
- quadrant[nblock+i] = 0;
- }
-
- /*-- Complete the initial radix sort --*/
- for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1];
-
- s = block[0] << 8;
- i = nblock-1;
- for (; i >= 3; i -= 4) {
- s = (s >> 8) | (block[i] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i;
- s = (s >> 8) | (block[i-1] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i-1;
- s = (s >> 8) | (block[i-2] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i-2;
- s = (s >> 8) | (block[i-3] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i-3;
- }
- for (; i >= 0; i--) {
- s = (s >> 8) | (block[i] << 8);
- j = ftab[s] -1;
- ftab[s] = j;
- ptr[j] = i;
- }
-
- /*--
- Now ftab contains the first loc of every small bucket.
- Calculate the running order, from smallest to largest
- big bucket.
- --*/
- for (i = 0; i <= 255; i++) {
- bigDone [i] = False;
- runningOrder[i] = i;
- }
-
- {
- Int32 vv;
- Int32 h = 1;
- do h = 3 * h + 1; while (h <= 256);
- do {
- h = h / 3;
- for (i = h; i <= 255; i++) {
- vv = runningOrder[i];
- j = i;
- while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) {
- runningOrder[j] = runningOrder[j-h];
- j = j - h;
- if (j <= (h - 1)) goto zero;
- }
- zero:
- runningOrder[j] = vv;
- }
- } while (h != 1);
- }
-
- /*--
- The main sorting loop.
- --*/
-
- numQSorted = 0;
-
- for (i = 0; i <= 255; i++) {
-
- /*--
- Process big buckets, starting with the least full.
- Basically this is a 3-step process in which we call
- mainQSort3 to sort the small buckets [ss, j], but
- also make a big effort to avoid the calls if we can.
- --*/
- ss = runningOrder[i];
-
- /*--
- Step 1:
- Complete the big bucket [ss] by quicksorting
- any unsorted small buckets [ss, j], for j != ss.
- Hopefully previous pointer-scanning phases have already
- completed many of the small buckets [ss, j], so
- we don't have to sort them at all.
- --*/
- for (j = 0; j <= 255; j++) {
- if (j != ss) {
- sb = (ss << 8) + j;
- if ( ! (ftab[sb] & SETMASK) ) {
- Int32 lo = ftab[sb] & CLEARMASK;
- Int32 hi = (ftab[sb+1] & CLEARMASK) - 1;
- if (hi > lo) {
- mainQSort3 (
- ptr, block, quadrant, nblock,
- lo, hi, BZ_N_RADIX, budget
- );
- numQSorted += (hi - lo + 1);
- if (*budget < 0) return;
- }
- }
- ftab[sb] |= SETMASK;
- }
- }
-
- AssertH ( !bigDone[ss], 1006 );
-
- /*--
- Step 2:
- Now scan this big bucket [ss] so as to synthesise the
- sorted order for small buckets [t, ss] for all t,
- including, magically, the bucket [ss,ss] too.
- This will avoid doing Real Work in subsequent Step 1's.
- --*/
- {
- for (j = 0; j <= 255; j++) {
- copyStart[j] = ftab[(j << 8) + ss] & CLEARMASK;
- copyEnd [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1;
- }
- for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) {
- k = ptr[j]-1; if (k < 0) k += nblock;
- c1 = block[k];
- if (!bigDone[c1])
- ptr[ copyStart[c1]++ ] = k;
- }
- for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) {
- k = ptr[j]-1; if (k < 0) k += nblock;
- c1 = block[k];
- if (!bigDone[c1])
- ptr[ copyEnd[c1]-- ] = k;
- }
- }
-
- AssertH ( copyStart[ss]-1 == copyEnd[ss], 1007 );
-
- for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK;
-
- /*--
- Step 3:
- The [ss] big bucket is now done. Record this fact,
- and update the quadrant descriptors. Remember to
- update quadrants in the overshoot area too, if
- necessary. The "if (i < 255)" test merely skips
- this updating for the last bucket processed, since
- updating for the last bucket is pointless.
-
- The quadrant array provides a way to incrementally
- cache sort orderings, as they appear, so as to
- make subsequent comparisons in fullGtU() complete
- faster. For repetitive blocks this makes a big
- difference (but not big enough to be able to avoid
- the fallback sorting mechanism, exponential radix sort).
-
- The precise meaning is: at all times:
-
- for 0 <= i < nblock and 0 <= j <= nblock
-
- if block[i] != block[j],
-
- then the relative values of quadrant[i] and
- quadrant[j] are meaningless.
-
- else {
- if quadrant[i] < quadrant[j]
- then the string starting at i lexicographically
- precedes the string starting at j
-
- else if quadrant[i] > quadrant[j]
- then the string starting at j lexicographically
- precedes the string starting at i
-
- else
- the relative ordering of the strings starting
- at i and j has not yet been determined.
- }
- --*/
- bigDone[ss] = True;
-
- if (i < 255) {
- Int32 bbStart = ftab[ss << 8] & CLEARMASK;
- Int32 bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
- Int32 shifts = 0;
-
- while ((bbSize >> shifts) > 65534) shifts++;
-
- for (j = bbSize-1; j >= 0; j--) {
- Int32 a2update = ptr[bbStart + j];
- UInt16 qVal = (UInt16)(j >> shifts);
- quadrant[a2update] = qVal;
- if (a2update < BZ_N_OVERSHOOT)
- quadrant[a2update + nblock] = qVal;
- }
- AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 );
- }
-
- }
-}
-
-#undef BIGFREQ
-#undef SETMASK
-#undef CLEARMASK
-
-
-/*---------------------------------------------*/
-/* Pre:
- nblock > 0
- arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]
- ((UChar*)arr2) [0 .. nblock-1] holds block
- arr1 exists for [0 .. nblock-1]
-
- Post:
- ((UChar*)arr2) [0 .. nblock-1] holds block
- All other areas of block destroyed
- ftab [ 0 .. 65536 ] destroyed
- arr1 [0 .. nblock-1] holds sorted order
-*/
-void BZ2_blockSort ( EState* s )
-{
- UInt32* ptr = s->ptr;
- UChar* block = s->block;
- UInt32* ftab = s->ftab;
- Int32 nblock = s->nblock;
- Int32 wfact = s->workFactor;
- UInt16* quadrant;
- Int32 budget;
- Int32 budgetInit;
- Int32 i;
-
- if (nblock < 10000) {
- fallbackSort ( s->arr1, s->arr2, ftab, nblock );
- } else {
- /* Calculate the location for quadrant, remembering to get
- the alignment right. Assumes that &(block[0]) is at least
- 2-byte aligned -- this should be ok since block is really
- the first section of arr2.
- */
- i = nblock+BZ_N_OVERSHOOT;
- if (i & 1) i++;
- quadrant = (UInt16*)(&(block[i]));
-
- /* (wfact-1) / 3 puts the default-factor-30
- transition point at very roughly the same place as
- with v0.1 and v0.9.0.
- Not that it particularly matters any more, since the
- resulting compressed stream is now the same regardless
- of whether or not we use the main sort or fallback sort.
- */
- if (wfact < 1 ) wfact = 1;
- if (wfact > 100) wfact = 100;
- budgetInit = nblock * ((wfact-1) / 3);
- budget = budgetInit;
-
- mainSort ( ptr, block, quadrant, ftab, nblock, &budget );
- if (budget < 0) {
- fallbackSort ( s->arr1, s->arr2, ftab, nblock );
- }
- }
-
- s->origPtr = -1;
- for (i = 0; i < s->nblock; i++)
- if (ptr[i] == 0)
- { s->origPtr = i; break; };
-
- AssertH( s->origPtr != -1, 1003 );
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end blocksort.c ---*/
-/*-------------------------------------------------------------*/
+/*
+ * This file is a part of the bzip2 compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.bzip.org/
+ *
+ * This modification is not compatible with the original bzip2.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+#include "bzlib.h"
+
+/*-------------------------------------------------------------*/
+/*--- Block sorting machinery ---*/
+/*--- blocksort.c ---*/
+/*-------------------------------------------------------------*/
+
+/*--
+ This file is a part of bzip2 and/or libbzip2, a program and
+ library for lossless, block-sorting data compression.
+
+ Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Julian Seward, Cambridge, UK.
+ jseward@acm.org
+ bzip2/libbzip2 version 1.0 of 21 March 2000
+
+ This program is based on (at least) the work of:
+ Mike Burrows
+ David Wheeler
+ Peter Fenwick
+ Alistair Moffat
+ Radford Neal
+ Ian H. Witten
+ Robert Sedgewick
+ Jon L. Bentley
+
+ For more information on these sources, see the manual.
+
+ To get some idea how the block sorting algorithms in this file
+ work, read my paper
+ On the Performance of BWT Sorting Algorithms
+ in Proceedings of the IEEE Data Compression Conference 2000,
+ Snowbird, Utah, USA, 27-30 March 2000. The main sort in this
+ file implements the algorithm called cache in the paper.
+--*/
+
+/*---------------------------------------------*/
+/*--- Fallback O(N log(N)^2) sorting ---*/
+/*--- algorithm, for repetitive blocks ---*/
+/*---------------------------------------------*/
+
+/*---------------------------------------------*/
+static void fallbackSimpleSort ( UInt32* fmap,
+ UInt32* eclass,
+ Int32 lo,
+ Int32 hi )
+{
+ Int32 i, j, tmp;
+ UInt32 ec_tmp;
+
+ if (lo == hi) return;
+
+ if (hi - lo > 3) {
+ for ( i = hi-4; i >= lo; i-- ) {
+ tmp = fmap[i];
+ ec_tmp = eclass[tmp];
+ for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
+ fmap[j-4] = fmap[j];
+ fmap[j-4] = tmp;
+ }
+ }
+
+ for ( i = hi-1; i >= lo; i-- ) {
+ tmp = fmap[i];
+ ec_tmp = eclass[tmp];
+ for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
+ fmap[j-1] = fmap[j];
+ fmap[j-1] = tmp;
+ }
+}
+
+
+/*---------------------------------------------*/
+#define fswap(zz1, zz2) \
+ { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
+
+#define fvswap(zzp1, zzp2, zzn) \
+{ \
+ Int32 yyp1 = (zzp1); \
+ Int32 yyp2 = (zzp2); \
+ Int32 yyn = (zzn); \
+ while (yyn > 0) { \
+ fswap(fmap[yyp1], fmap[yyp2]); \
+ yyp1++; yyp2++; yyn--; \
+ } \
+}
+
+
+#define fmin(a,b) ((a) < (b)) ? (a) : (b)
+
+#define fpush(lz,hz) { stackLo[sp] = lz; \
+ stackHi[sp] = hz; \
+ sp++; }
+
+#define fpop(lz,hz) { sp--; \
+ lz = stackLo[sp]; \
+ hz = stackHi[sp]; }
+
+#define FALLBACK_QSORT_SMALL_THRESH 10
+#define FALLBACK_QSORT_STACK_SIZE 100
+
+
+static
+void fallbackQSort3 ( UInt32* fmap,
+ UInt32* eclass,
+ Int32 loSt,
+ Int32 hiSt )
+{
+ Int32 unLo, unHi, ltLo, gtHi, n, m;
+ Int32 sp, lo, hi;
+ UInt32 med, r, r3;
+ Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
+ Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
+
+ r = 0;
+
+ sp = 0;
+ fpush ( loSt, hiSt );
+
+ while (sp > 0) {
+
+ AssertH ( sp < FALLBACK_QSORT_STACK_SIZE, 1004 );
+
+ fpop ( lo, hi );
+ if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
+ fallbackSimpleSort ( fmap, eclass, lo, hi );
+ continue;
+ }
+
+ /* Random partitioning. Median of 3 sometimes fails to
+ avoid bad cases. Median of 9 seems to help but
+ looks rather expensive. This too seems to work but
+ is cheaper. Guidance for the magic constants
+ 7621 and 32768 is taken from Sedgewick's algorithms
+ book, chapter 35.
+ */
+ r = ((r * 7621) + 1) % 32768;
+ r3 = r % 3;
+ if (r3 == 0) med = eclass[fmap[lo]]; else
+ if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
+ med = eclass[fmap[hi]];
+
+ unLo = ltLo = lo;
+ unHi = gtHi = hi;
+
+ while (1) {
+ while (1) {
+ if (unLo > unHi) break;
+ n = (Int32)eclass[fmap[unLo]] - (Int32)med;
+ if (n == 0) {
+ fswap(fmap[unLo], fmap[ltLo]);
+ ltLo++; unLo++;
+ continue;
+ };
+ if (n > 0) break;
+ unLo++;
+ }
+ while (1) {
+ if (unLo > unHi) break;
+ n = (Int32)eclass[fmap[unHi]] - (Int32)med;
+ if (n == 0) {
+ fswap(fmap[unHi], fmap[gtHi]);
+ gtHi--; unHi--;
+ continue;
+ };
+ if (n < 0) break;
+ unHi--;
+ }
+ if (unLo > unHi) break;
+ fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
+ }
+
+ AssertD ( unHi == unLo-1, "fallbackQSort3(2)" );
+
+ if (gtHi < ltLo) continue;
+
+ n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
+ m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
+
+ n = lo + unLo - ltLo - 1;
+ m = hi - (gtHi - unHi) + 1;
+
+ if (n - lo > hi - m) {
+ fpush ( lo, n );
+ fpush ( m, hi );
+ } else {
+ fpush ( m, hi );
+ fpush ( lo, n );
+ }
+ }
+}
+
+#undef fmin
+#undef fpush
+#undef fpop
+#undef fswap
+#undef fvswap
+#undef FALLBACK_QSORT_SMALL_THRESH
+#undef FALLBACK_QSORT_STACK_SIZE
+
+
+/*---------------------------------------------*/
+/* Pre:
+ nblock > 0
+ eclass exists for [0 .. nblock-1]
+ ((UChar*)eclass) [0 .. nblock-1] holds block
+ ptr exists for [0 .. nblock-1]
+
+ Post:
+ ((UChar*)eclass) [0 .. nblock-1] holds block
+ All other areas of eclass destroyed
+ fmap [0 .. nblock-1] holds sorted order
+ bhtab [ 0 .. 2+(nblock/32) ] destroyed
+*/
+
+#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
+#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
+#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (1 << ((zz) & 31)))
+#define WORD_BH(zz) bhtab[(zz) >> 5]
+#define UNALIGNED_BH(zz) ((zz) & 0x01f)
+
+static
+void fallbackSort ( UInt32* fmap,
+ UInt32* eclass,
+ UInt32* bhtab,
+ Int32 nblock)
+{
+ Int32 ftab[257];
+ Int32 ftabCopy[256];
+ Int32 H, i, j, k, l, r, cc, cc1;
+ Int32 nNotDone;
+ Int32 nBhtab;
+ UChar* eclass8 = (UChar*)eclass;
+
+ /*--
+ Initial 1-char radix sort to generate
+ initial fmap and initial BH bits.
+ --*/
+ for (i = 0; i < 257; i++) ftab[i] = 0;
+ for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
+ for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
+ for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
+
+ for (i = 0; i < nblock; i++) {
+ j = eclass8[i];
+ k = ftab[j] - 1;
+ ftab[j] = k;
+ fmap[k] = i;
+ }
+
+ nBhtab = 2 + (nblock / 32);
+ for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
+ for (i = 0; i < 256; i++) SET_BH(ftab[i]);
+
+ /*--
+ Inductively refine the buckets. Kind-of an
+ "exponential radix sort" (!), inspired by the
+ Manber-Myers suffix array construction algorithm.
+ --*/
+
+ /*-- set sentinel bits for block-end detection --*/
+ for (i = 0; i < 32; i++) {
+ SET_BH(nblock + 2*i);
+ CLEAR_BH(nblock + 2*i + 1);
+ }
+
+ /*-- the log(N) loop --*/
+ H = 1;
+ while (1) {
+
+ j = 0;
+ for (i = 0; i < nblock; i++) {
+ if (ISSET_BH(i)) j = i;
+ k = fmap[i] - H; if (k < 0) k += nblock;
+ eclass[k] = j;
+ }
+
+ nNotDone = 0;
+ r = -1;
+ while (1) {
+
+ /*-- find the next non-singleton bucket --*/
+ k = r + 1;
+ while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
+ if (ISSET_BH(k)) {
+ while (WORD_BH(k) == 0xffffffff) k += 32;
+ while (ISSET_BH(k)) k++;
+ }
+ l = k - 1;
+ if (l >= nblock) break;
+ while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
+ if (!ISSET_BH(k)) {
+ while (WORD_BH(k) == 0x00000000) k += 32;
+ while (!ISSET_BH(k)) k++;
+ }
+ r = k - 1;
+ if (r >= nblock) break;
+
+ /*-- now [l, r] bracket current bucket --*/
+ if (r > l) {
+ nNotDone += (r - l + 1);
+ fallbackQSort3 ( fmap, eclass, l, r );
+
+ /*-- scan bucket and generate header bits-- */
+ cc = -1;
+ for (i = l; i <= r; i++) {
+ cc1 = eclass[fmap[i]];
+ if (cc != cc1) { SET_BH(i); cc = cc1; };
+ }
+ }
+ }
+
+ H *= 2;
+ if (H > nblock || nNotDone == 0) break;
+ }
+
+ /*--
+ Reconstruct the original block in
+ eclass8 [0 .. nblock-1], since the
+ previous phase destroyed it.
+ --*/
+ j = 0;
+ for (i = 0; i < nblock; i++) {
+ while (ftabCopy[j] == 0) j++;
+ ftabCopy[j]--;
+ eclass8[fmap[i]] = (UChar)j;
+ }
+ AssertH ( j < 256, 1005 );
+}
+
+#undef SET_BH
+#undef CLEAR_BH
+#undef ISSET_BH
+#undef WORD_BH
+#undef UNALIGNED_BH
+
+
+/*---------------------------------------------*/
+/*--- The main, O(N^2 log(N)) sorting ---*/
+/*--- algorithm. Faster for "normal" ---*/
+/*--- non-repetitive blocks. ---*/
+/*---------------------------------------------*/
+
+/*---------------------------------------------*/
+static Bool mainGtU ( UInt32 i1,
+ UInt32 i2,
+ UChar* block,
+ UInt16* quadrant,
+ UInt32 nblock,
+ Int32* budget )
+{
+ Int32 k;
+ UChar c1, c2;
+ UInt16 s1, s2;
+
+ AssertD ( i1 != i2, "mainGtU" );
+ /* 1 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 2 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 3 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 4 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 5 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 6 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 7 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 8 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 9 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 10 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 11 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+ /* 12 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ i1++; i2++;
+
+ k = nblock + 8;
+
+ do {
+ /* 1 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 2 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 3 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 4 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 5 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 6 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 7 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+ /* 8 */
+ c1 = block[i1]; c2 = block[i2];
+ if (c1 != c2) return (c1 > c2);
+ s1 = quadrant[i1]; s2 = quadrant[i2];
+ if (s1 != s2) return (s1 > s2);
+ i1++; i2++;
+
+ if (i1 >= nblock) i1 -= nblock;
+ if (i2 >= nblock) i2 -= nblock;
+
+ k -= 8;
+ (*budget)--;
+ }
+ while (k >= 0);
+
+ return False;
+}
+
+
+/*---------------------------------------------*/
+/*--
+ Knuth's increments seem to work better
+ than Incerpi-Sedgewick here. Possibly
+ because the number of elems to sort is
+ usually small, typically <= 20.
+--*/
+static
+Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
+ 9841, 29524, 88573, 265720,
+ 797161, 2391484 };
+
+static
+void mainSimpleSort ( UInt32* ptr,
+ UChar* block,
+ UInt16* quadrant,
+ Int32 nblock,
+ Int32 lo,
+ Int32 hi,
+ Int32 d,
+ Int32* budget )
+{
+ Int32 i, j, h, bigN, hp;
+ UInt32 v;
+
+ bigN = hi - lo + 1;
+ if (bigN < 2) return;
+
+ hp = 0;
+ while (incs[hp] < bigN) hp++;
+ hp--;
+
+ for (; hp >= 0; hp--) {
+ h = incs[hp];
+
+ i = lo + h;
+ while (True) {
+
+ /*-- copy 1 --*/
+ if (i > hi) break;
+ v = ptr[i];
+ j = i;
+ while ( mainGtU (
+ ptr[j-h]+d, v+d, block, quadrant, nblock, budget
+ ) ) {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ if (j <= (lo + h - 1)) break;
+ }
+ ptr[j] = v;
+ i++;
+
+ /*-- copy 2 --*/
+ if (i > hi) break;
+ v = ptr[i];
+ j = i;
+ while ( mainGtU (
+ ptr[j-h]+d, v+d, block, quadrant, nblock, budget
+ ) ) {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ if (j <= (lo + h - 1)) break;
+ }
+ ptr[j] = v;
+ i++;
+
+ /*-- copy 3 --*/
+ if (i > hi) break;
+ v = ptr[i];
+ j = i;
+ while ( mainGtU (
+ ptr[j-h]+d, v+d, block, quadrant, nblock, budget
+ ) ) {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ if (j <= (lo + h - 1)) break;
+ }
+ ptr[j] = v;
+ i++;
+
+ if (*budget < 0) return;
+ }
+ }
+}
+
+
+/*---------------------------------------------*/
+/*--
+ The following is an implementation of
+ an elegant 3-way quicksort for strings,
+ described in a paper "Fast Algorithms for
+ Sorting and Searching Strings", by Robert
+ Sedgewick and Jon L. Bentley.
+--*/
+
+#define mswap(zz1, zz2) \
+ { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
+
+#define mvswap(zzp1, zzp2, zzn) \
+{ \
+ Int32 yyp1 = (zzp1); \
+ Int32 yyp2 = (zzp2); \
+ Int32 yyn = (zzn); \
+ while (yyn > 0) { \
+ mswap(ptr[yyp1], ptr[yyp2]); \
+ yyp1++; yyp2++; yyn--; \
+ } \
+}
+
+static
+UChar mmed3 ( UChar a, UChar b, UChar c )
+{
+ UChar t;
+ if (a > b) { t = a; a = b; b = t; };
+ if (b > c) {
+ b = c;
+ if (a > b) b = a;
+ }
+ return b;
+}
+
+#define mmin(a,b) ((a) < (b)) ? (a) : (b)
+
+#define mpush(lz,hz,dz) { stackLo[sp] = lz; \
+ stackHi[sp] = hz; \
+ stackD [sp] = dz; \
+ sp++; }
+
+#define mpop(lz,hz,dz) { sp--; \
+ lz = stackLo[sp]; \
+ hz = stackHi[sp]; \
+ dz = stackD [sp]; }
+
+
+#define mnextsize(az) (nextHi[az]-nextLo[az])
+
+#define mnextswap(az,bz) \
+ { Int32 tz; \
+ tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
+ tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
+ tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
+
+
+#define MAIN_QSORT_SMALL_THRESH 20
+#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
+#define MAIN_QSORT_STACK_SIZE 100
+
+static
+void mainQSort3 ( UInt32* ptr,
+ UChar* block,
+ UInt16* quadrant,
+ Int32 nblock,
+ Int32 loSt,
+ Int32 hiSt,
+ Int32 dSt,
+ Int32* budget )
+{
+ Int32 unLo, unHi, ltLo, gtHi, n, m, med;
+ Int32 sp, lo, hi, d;
+
+ Int32 stackLo[MAIN_QSORT_STACK_SIZE];
+ Int32 stackHi[MAIN_QSORT_STACK_SIZE];
+ Int32 stackD [MAIN_QSORT_STACK_SIZE];
+
+ Int32 nextLo[3];
+ Int32 nextHi[3];
+ Int32 nextD [3];
+
+ sp = 0;
+ mpush ( loSt, hiSt, dSt );
+
+ while (sp > 0) {
+
+ AssertH ( sp < MAIN_QSORT_STACK_SIZE, 1001 );
+
+ mpop ( lo, hi, d );
+ if (hi - lo < MAIN_QSORT_SMALL_THRESH ||
+ d > MAIN_QSORT_DEPTH_THRESH) {
+ mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
+ if (*budget < 0) return;
+ continue;
+ }
+
+ med = (Int32)
+ mmed3 ( block[ptr[ lo ]+d],
+ block[ptr[ hi ]+d],
+ block[ptr[ (lo+hi)>>1 ]+d] );
+
+ unLo = ltLo = lo;
+ unHi = gtHi = hi;
+
+ while (True) {
+ while (True) {
+ if (unLo > unHi) break;
+ n = ((Int32)block[ptr[unLo]+d]) - med;
+ if (n == 0) {
+ mswap(ptr[unLo], ptr[ltLo]);
+ ltLo++; unLo++; continue;
+ };
+ if (n > 0) break;
+ unLo++;
+ }
+ while (True) {
+ if (unLo > unHi) break;
+ n = ((Int32)block[ptr[unHi]+d]) - med;
+ if (n == 0) {
+ mswap(ptr[unHi], ptr[gtHi]);
+ gtHi--; unHi--; continue;
+ };
+ if (n < 0) break;
+ unHi--;
+ }
+ if (unLo > unHi) break;
+ mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
+ }
+
+ AssertD ( unHi == unLo-1, "mainQSort3(2)" );
+
+ if (gtHi < ltLo) {
+ mpush(lo, hi, d+1 );
+ continue;
+ }
+
+ n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
+ m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
+
+ n = lo + unLo - ltLo - 1;
+ m = hi - (gtHi - unHi) + 1;
+
+ nextLo[0] = lo; nextHi[0] = n; nextD[0] = d;
+ nextLo[1] = m; nextHi[1] = hi; nextD[1] = d;
+ nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
+
+ if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
+ if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
+ if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
+
+ AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" );
+ AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" );
+
+ mpush (nextLo[0], nextHi[0], nextD[0]);
+ mpush (nextLo[1], nextHi[1], nextD[1]);
+ mpush (nextLo[2], nextHi[2], nextD[2]);
+ }
+}
+
+#undef mswap
+#undef mvswap
+#undef mpush
+#undef mpop
+#undef mmin
+#undef mnextsize
+#undef mnextswap
+#undef MAIN_QSORT_SMALL_THRESH
+#undef MAIN_QSORT_DEPTH_THRESH
+#undef MAIN_QSORT_STACK_SIZE
+
+
+/*---------------------------------------------*/
+/* Pre:
+ nblock > N_OVERSHOOT
+ block32 exists for [0 .. nblock-1 +N_OVERSHOOT]
+ ((UChar*)block32) [0 .. nblock-1] holds block
+ ptr exists for [0 .. nblock-1]
+
+ Post:
+ ((UChar*)block32) [0 .. nblock-1] holds block
+ All other areas of block32 destroyed
+ ftab [0 .. 65536 ] destroyed
+ ptr [0 .. nblock-1] holds sorted order
+ if (*budget < 0), sorting was abandoned
+*/
+
+#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8])
+#define SETMASK (1 << 21)
+#define CLEARMASK (~(SETMASK))
+
+static
+void mainSort ( UInt32* ptr,
+ UChar* block,
+ UInt16* quadrant,
+ UInt32* ftab,
+ Int32 nblock,
+ Int32* budget )
+{
+ Int32 i, j, k, ss, sb;
+ Int32 runningOrder[256];
+ Bool bigDone[256];
+ Int32 copyStart[256];
+ Int32 copyEnd [256];
+ UChar c1;
+ Int32 numQSorted;
+ UInt16 s;
+
+ /*-- set up the 2-byte frequency table --*/
+ for (i = 65536; i >= 0; i--) ftab[i] = 0;
+
+ j = block[0] << 8;
+ i = nblock-1;
+ for (; i >= 3; i -= 4) {
+ quadrant[i] = 0;
+ j = (j >> 8) | ( ((UInt16)block[i]) << 8);
+ ftab[j]++;
+ quadrant[i-1] = 0;
+ j = (j >> 8) | ( ((UInt16)block[i-1]) << 8);
+ ftab[j]++;
+ quadrant[i-2] = 0;
+ j = (j >> 8) | ( ((UInt16)block[i-2]) << 8);
+ ftab[j]++;
+ quadrant[i-3] = 0;
+ j = (j >> 8) | ( ((UInt16)block[i-3]) << 8);
+ ftab[j]++;
+ }
+ for (; i >= 0; i--) {
+ quadrant[i] = 0;
+ j = (j >> 8) | ( ((UInt16)block[i]) << 8);
+ ftab[j]++;
+ }
+
+ /*-- (emphasises close relationship of block & quadrant) --*/
+ for (i = 0; i < BZ_N_OVERSHOOT; i++) {
+ block [nblock+i] = block[i];
+ quadrant[nblock+i] = 0;
+ }
+
+ /*-- Complete the initial radix sort --*/
+ for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1];
+
+ s = block[0] << 8;
+ i = nblock-1;
+ for (; i >= 3; i -= 4) {
+ s = (s >> 8) | (block[i] << 8);
+ j = ftab[s] -1;
+ ftab[s] = j;
+ ptr[j] = i;
+ s = (s >> 8) | (block[i-1] << 8);
+ j = ftab[s] -1;
+ ftab[s] = j;
+ ptr[j] = i-1;
+ s = (s >> 8) | (block[i-2] << 8);
+ j = ftab[s] -1;
+ ftab[s] = j;
+ ptr[j] = i-2;
+ s = (s >> 8) | (block[i-3] << 8);
+ j = ftab[s] -1;
+ ftab[s] = j;
+ ptr[j] = i-3;
+ }
+ for (; i >= 0; i--) {
+ s = (s >> 8) | (block[i] << 8);
+ j = ftab[s] -1;
+ ftab[s] = j;
+ ptr[j] = i;
+ }
+
+ /*--
+ Now ftab contains the first loc of every small bucket.
+ Calculate the running order, from smallest to largest
+ big bucket.
+ --*/
+ for (i = 0; i <= 255; i++) {
+ bigDone [i] = False;
+ runningOrder[i] = i;
+ }
+
+ {
+ Int32 vv;
+ Int32 h = 1;
+ do h = 3 * h + 1; while (h <= 256);
+ do {
+ h = h / 3;
+ for (i = h; i <= 255; i++) {
+ vv = runningOrder[i];
+ j = i;
+ while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) {
+ runningOrder[j] = runningOrder[j-h];
+ j = j - h;
+ if (j <= (h - 1)) goto zero;
+ }
+ zero:
+ runningOrder[j] = vv;
+ }
+ } while (h != 1);
+ }
+
+ /*--
+ The main sorting loop.
+ --*/
+
+ numQSorted = 0;
+
+ for (i = 0; i <= 255; i++) {
+
+ /*--
+ Process big buckets, starting with the least full.
+ Basically this is a 3-step process in which we call
+ mainQSort3 to sort the small buckets [ss, j], but
+ also make a big effort to avoid the calls if we can.
+ --*/
+ ss = runningOrder[i];
+
+ /*--
+ Step 1:
+ Complete the big bucket [ss] by quicksorting
+ any unsorted small buckets [ss, j], for j != ss.
+ Hopefully previous pointer-scanning phases have already
+ completed many of the small buckets [ss, j], so
+ we don't have to sort them at all.
+ --*/
+ for (j = 0; j <= 255; j++) {
+ if (j != ss) {
+ sb = (ss << 8) + j;
+ if ( ! (ftab[sb] & SETMASK) ) {
+ Int32 lo = ftab[sb] & CLEARMASK;
+ Int32 hi = (ftab[sb+1] & CLEARMASK) - 1;
+ if (hi > lo) {
+ mainQSort3 (
+ ptr, block, quadrant, nblock,
+ lo, hi, BZ_N_RADIX, budget
+ );
+ numQSorted += (hi - lo + 1);
+ if (*budget < 0) return;
+ }
+ }
+ ftab[sb] |= SETMASK;
+ }
+ }
+
+ AssertH ( !bigDone[ss], 1006 );
+
+ /*--
+ Step 2:
+ Now scan this big bucket [ss] so as to synthesise the
+ sorted order for small buckets [t, ss] for all t,
+ including, magically, the bucket [ss,ss] too.
+ This will avoid doing Real Work in subsequent Step 1's.
+ --*/
+ {
+ for (j = 0; j <= 255; j++) {
+ copyStart[j] = ftab[(j << 8) + ss] & CLEARMASK;
+ copyEnd [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1;
+ }
+ for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) {
+ k = ptr[j]-1; if (k < 0) k += nblock;
+ c1 = block[k];
+ if (!bigDone[c1])
+ ptr[ copyStart[c1]++ ] = k;
+ }
+ for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) {
+ k = ptr[j]-1; if (k < 0) k += nblock;
+ c1 = block[k];
+ if (!bigDone[c1])
+ ptr[ copyEnd[c1]-- ] = k;
+ }
+ }
+
+ AssertH ( copyStart[ss]-1 == copyEnd[ss], 1007 );
+
+ for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK;
+
+ /*--
+ Step 3:
+ The [ss] big bucket is now done. Record this fact,
+ and update the quadrant descriptors. Remember to
+ update quadrants in the overshoot area too, if
+ necessary. The "if (i < 255)" test merely skips
+ this updating for the last bucket processed, since
+ updating for the last bucket is pointless.
+
+ The quadrant array provides a way to incrementally
+ cache sort orderings, as they appear, so as to
+ make subsequent comparisons in fullGtU() complete
+ faster. For repetitive blocks this makes a big
+ difference (but not big enough to be able to avoid
+ the fallback sorting mechanism, exponential radix sort).
+
+ The precise meaning is: at all times:
+
+ for 0 <= i < nblock and 0 <= j <= nblock
+
+ if block[i] != block[j],
+
+ then the relative values of quadrant[i] and
+ quadrant[j] are meaningless.
+
+ else {
+ if quadrant[i] < quadrant[j]
+ then the string starting at i lexicographically
+ precedes the string starting at j
+
+ else if quadrant[i] > quadrant[j]
+ then the string starting at j lexicographically
+ precedes the string starting at i
+
+ else
+ the relative ordering of the strings starting
+ at i and j has not yet been determined.
+ }
+ --*/
+ bigDone[ss] = True;
+
+ if (i < 255) {
+ Int32 bbStart = ftab[ss << 8] & CLEARMASK;
+ Int32 bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
+ Int32 shifts = 0;
+
+ while ((bbSize >> shifts) > 65534) shifts++;
+
+ for (j = bbSize-1; j >= 0; j--) {
+ Int32 a2update = ptr[bbStart + j];
+ UInt16 qVal = (UInt16)(j >> shifts);
+ quadrant[a2update] = qVal;
+ if (a2update < BZ_N_OVERSHOOT)
+ quadrant[a2update + nblock] = qVal;
+ }
+ AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 );
+ }
+
+ }
+}
+
+#undef BIGFREQ
+#undef SETMASK
+#undef CLEARMASK
+
+
+/*---------------------------------------------*/
+/* Pre:
+ nblock > 0
+ arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]
+ ((UChar*)arr2) [0 .. nblock-1] holds block
+ arr1 exists for [0 .. nblock-1]
+
+ Post:
+ ((UChar*)arr2) [0 .. nblock-1] holds block
+ All other areas of block destroyed
+ ftab [ 0 .. 65536 ] destroyed
+ arr1 [0 .. nblock-1] holds sorted order
+*/
+void BZ2_blockSort ( EState* s )
+{
+ UInt32* ptr = s->ptr;
+ UChar* block = s->block;
+ UInt32* ftab = s->ftab;
+ Int32 nblock = s->nblock;
+ Int32 wfact = s->workFactor;
+ UInt16* quadrant;
+ Int32 budget;
+ Int32 budgetInit;
+ Int32 i;
+
+ if (nblock < 10000) {
+ fallbackSort ( s->arr1, s->arr2, ftab, nblock );
+ } else {
+ /* Calculate the location for quadrant, remembering to get
+ the alignment right. Assumes that &(block[0]) is at least
+ 2-byte aligned -- this should be ok since block is really
+ the first section of arr2.
+ */
+ i = nblock+BZ_N_OVERSHOOT;
+ if (i & 1) i++;
+ quadrant = (UInt16*)(&(block[i]));
+
+ /* (wfact-1) / 3 puts the default-factor-30
+ transition point at very roughly the same place as
+ with v0.1 and v0.9.0.
+ Not that it particularly matters any more, since the
+ resulting compressed stream is now the same regardless
+ of whether or not we use the main sort or fallback sort.
+ */
+ if (wfact < 1 ) wfact = 1;
+ if (wfact > 100) wfact = 100;
+ budgetInit = nblock * ((wfact-1) / 3);
+ budget = budgetInit;
+
+ mainSort ( ptr, block, quadrant, ftab, nblock, &budget );
+ if (budget < 0) {
+ fallbackSort ( s->arr1, s->arr2, ftab, nblock );
+ }
+ }
+
+ s->origPtr = -1;
+ for (i = 0; i < s->nblock; i++)
+ if (ptr[i] == 0)
+ { s->origPtr = i; break; };
+
+ AssertH( s->origPtr != -1, 1003 );
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end blocksort.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/Source/bzip2/bzlib.c b/Source/bzip2/bzlib.c
index 4aec93a..8fba030 100755
--- a/Source/bzip2/bzlib.c
+++ b/Source/bzip2/bzlib.c
@@ -1,621 +1,621 @@
-/*
- * This file is a part of the bzip2 compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.bzip.org/
- *
- * This modification is not compatible with the original bzip2.
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-#include "bzlib.h"
-
-/*-------------------------------------------------------------*/
-/*--- Library top-level functions. ---*/
-/*--- bzlib.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- jseward@acm.org
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-/*--
- CHANGES
- ~~~~~~~
- 0.9.0 -- original version.
-
- 0.9.0a/b -- no changes in this file.
-
- 0.9.0c
- * made zero-length BZ_FLUSH work correctly in bzCompress().
- * fixed bzWrite/bzRead to ignore zero-length requests.
- * fixed bzread to correctly handle read requests after EOF.
- * wrong parameter order in call to bzDecompressInit in
- bzBuffToBuffDecompress. Fixed.
---*/
-#include "bzlib.h"
-
-
-/*---------------------------------------------------*/
-/*--- Compression stuff ---*/
-/*---------------------------------------------------*/
-
-
-#ifndef EXEHEAD
-
-/*---------------------------------------------------*/
-static
-void prepare_new_block ( EState* s )
-{
- Int32 i;
- s->nblock = 0;
- s->numZ = 0;
- s->state_out_pos = 0;
- for (i = 0; i < 256; i++) s->inUse[i] = False;
- s->blockNo++;
-}
-
-
-/*---------------------------------------------------*/
-static
-void init_RL ( EState* s )
-{
- s->state_in_ch = 256;
- s->state_in_len = 0;
-}
-
-
-static
-Bool isempty_RL ( EState* s )
-{
- if (s->state_in_ch < 256 && s->state_in_len > 0)
- return False; else
- return True;
-}
-
-/*---------------------------------------------------*/
-int BZ2_bzCompressInit( bz_stream* strm,
- int blockSize100k,
- int verbosity,
- int workFactor )
-{
- Int32 n;
- EState* s;
-
- if (strm == NULL ||
- workFactor < 0 || workFactor > 250)
- return BZ_PARAM_ERROR;
-
- if (workFactor == 0) workFactor = 30;
-
- s = BZALLOC( sizeof(EState) );
- if (s == NULL) return BZ_MEM_ERROR;
- s->strm = strm;
-
- s->arr1 = NULL;
- s->arr2 = NULL;
- s->ftab = NULL;
-
- n = NSIS_COMPRESS_BZIP2_LEVEL*100000;
- s->arr1 = BZALLOC( n * sizeof(UInt32) );
- s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
- s->ftab = BZALLOC( 65537 * sizeof(UInt32) );
-
- if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
- BZFREE(s->arr1);
- BZFREE(s->arr2);
- BZFREE(s->ftab);
- BZFREE(s);
- return BZ_MEM_ERROR;
- }
-
- s->blockNo = 0;
- s->state = BZ_S_INPUT;
- s->mode = BZ_M_RUNNING;
- s->nblockMAX = 100000 * NSIS_COMPRESS_BZIP2_LEVEL - 19;
- s->workFactor = workFactor;
-
- s->block = (UChar*)s->arr2;
- s->mtfv = (UInt16*)s->arr1;
- s->zbits = NULL;
- s->ptr = (UInt32*)s->arr1;
-
- strm->state = s;
- init_RL ( s );
- prepare_new_block ( s );
- return BZ_OK;
-}
-
-
-/*---------------------------------------------------*/
-static
-void add_pair_to_block ( EState* s )
-{
- UChar ch = (UChar)(s->state_in_ch);
- s->inUse[s->state_in_ch] = True;
- switch (s->state_in_len) {
- case 1:
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- break;
- case 2:
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- break;
- case 3:
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- break;
- default:
- s->inUse[s->state_in_len-4] = True;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = (UChar)ch; s->nblock++;
- s->block[s->nblock] = ((UChar)(s->state_in_len-4));
- s->nblock++;
- break;
- }
-}
-
-
-/*---------------------------------------------------*/
-static
-void flush_RL ( EState* s )
-{
- if (s->state_in_ch < 256) add_pair_to_block ( s );
- init_RL ( s );
-}
-
-
-/*---------------------------------------------------*/
-#define ADD_CHAR_TO_BLOCK(zs,zchh0) \
-{ \
- UInt32 zchh = (UInt32)(zchh0); \
- /*-- fast track the common case --*/ \
- if (zchh != zs->state_in_ch && \
- zs->state_in_len == 1) { \
- UChar ch = (UChar)(zs->state_in_ch); \
- zs->inUse[zs->state_in_ch] = True; \
- zs->block[zs->nblock] = (UChar)ch; \
- zs->nblock++; \
- zs->state_in_ch = zchh; \
- } \
- else \
- /*-- general, uncommon cases --*/ \
- if (zchh != zs->state_in_ch || \
- zs->state_in_len == 255) { \
- if (zs->state_in_ch < 256) \
- add_pair_to_block ( zs ); \
- zs->state_in_ch = zchh; \
- zs->state_in_len = 1; \
- } else { \
- zs->state_in_len++; \
- } \
-}
-
-
-/*---------------------------------------------------*/
-static
-Bool copy_input_until_stop ( EState* s )
-{
- Bool progress_in = False;
-
- if (s->mode == BZ_M_RUNNING) {
-
- /*-- fast track the common case --*/
- while (True) {
- /*-- block full? --*/
- if (s->nblock >= s->nblockMAX) break;
- /*-- no input? --*/
- if (s->strm->avail_in == 0) break;
- progress_in = True;
- ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
- s->strm->next_in++;
- s->strm->avail_in--;
- // s->strm->total_in_lo32++;
-// if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
- }
-
- } else {
-
- /*-- general, uncommon case --*/
- while (True) {
- /*-- block full? --*/
- if (s->nblock >= s->nblockMAX) break;
- /*-- no input? --*/
- if (s->strm->avail_in == 0) break;
- /*-- flush/finish end? --*/
- if (s->avail_in_expect == 0) break;
- progress_in = True;
- ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
- s->strm->next_in++;
- s->strm->avail_in--;
- // s->strm->total_in_lo32++;
-// if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
- s->avail_in_expect--;
- }
- }
- return progress_in;
-}
-
-
-/*---------------------------------------------------*/
-static
-Bool copy_output_until_stop ( EState* s )
-{
- Bool progress_out = False;
-
- while (True) {
-
- /*-- no output space? --*/
- if (s->strm->avail_out == 0) break;
-
- /*-- block done? --*/
- if (s->state_out_pos >= s->numZ) break;
-
- progress_out = True;
- *(s->strm->next_out) = s->zbits[s->state_out_pos];
- s->state_out_pos++;
- s->strm->avail_out--;
- s->strm->next_out++;
-// s->strm->total_out_lo32++;
- // if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
- }
-
- return progress_out;
-}
-
-
-/*---------------------------------------------------*/
-static
-Bool handle_compress ( bz_stream* strm )
-{
- Bool progress_in = False;
- Bool progress_out = False;
- EState* s = strm->state;
-
- while (True) {
-
- if (s->state == BZ_S_OUTPUT) {
- progress_out |= copy_output_until_stop ( s );
- if (s->state_out_pos < s->numZ) break;
- if (s->mode == BZ_M_FINISHING &&
- s->avail_in_expect == 0 &&
- isempty_RL(s)) break;
- prepare_new_block ( s );
- s->state = BZ_S_INPUT;
- if (s->mode == BZ_M_FLUSHING &&
- s->avail_in_expect == 0 &&
- isempty_RL(s)) break;
- }
-
- if (s->state == BZ_S_INPUT) {
- progress_in |= copy_input_until_stop ( s );
- if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) {
- flush_RL ( s );
- BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) );
- s->state = BZ_S_OUTPUT;
- }
- else
- if (s->nblock >= s->nblockMAX) {
- BZ2_compressBlock ( s, False );
- s->state = BZ_S_OUTPUT;
- }
- else
- if (s->strm->avail_in == 0) {
- break;
- }
- }
-
- }
-
- return progress_in || progress_out;
-}
-
-
-/*---------------------------------------------------*/
-int BZ2_bzCompress( bz_stream *strm, int action )
-{
- Bool progress;
- EState* s;
- if (strm == NULL) return BZ_PARAM_ERROR;
- s = strm->state;
- if (s == NULL) return BZ_PARAM_ERROR;
- if (s->strm != strm) return BZ_PARAM_ERROR;
-
- preswitch:
- switch (s->mode) {
-
- case BZ_M_IDLE:
- return BZ_SEQUENCE_ERROR;
-
- case BZ_M_RUNNING:
- if (action == BZ_RUN) {
- progress = handle_compress ( strm );
- return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;
- }
- else
- if (action == BZ_FLUSH) {
- s->avail_in_expect = strm->avail_in;
- s->mode = BZ_M_FLUSHING;
- goto preswitch;
- }
- else
- if (action == BZ_FINISH) {
- s->avail_in_expect = strm->avail_in;
- s->mode = BZ_M_FINISHING;
- goto preswitch;
- }
- else
- return BZ_PARAM_ERROR;
-
- case BZ_M_FLUSHING:
- if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR;
- if (s->avail_in_expect != s->strm->avail_in)
- return BZ_SEQUENCE_ERROR;
- progress = handle_compress ( strm );
- if (s->avail_in_expect > 0 || !isempty_RL(s) ||
- s->state_out_pos < s->numZ) return BZ_FLUSH_OK;
- s->mode = BZ_M_RUNNING;
- return BZ_RUN_OK;
-
- case BZ_M_FINISHING:
- if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR;
- if (s->avail_in_expect != s->strm->avail_in)
- return BZ_SEQUENCE_ERROR;
- progress = handle_compress ( strm );
- if (!progress) return BZ_SEQUENCE_ERROR;
- if (s->avail_in_expect > 0 || !isempty_RL(s) ||
- s->state_out_pos < s->numZ) return BZ_FINISH_OK;
- s->mode = BZ_M_IDLE;
- return BZ_STREAM_END;
- }
- return BZ_OK; /*--not reached--*/
-}
-
-
-/*---------------------------------------------------*/
-int BZ2_bzCompressEnd( bz_stream *strm )
-{
- EState* s;
- if (strm == NULL) return BZ_PARAM_ERROR;
- s = strm->state;
- if (s == NULL) return BZ_PARAM_ERROR;
- if (s->strm != strm) return BZ_PARAM_ERROR;
-
- BZFREE(s->arr1);
- BZFREE(s->arr2);
- BZFREE(s->ftab);
- BZFREE(strm->state);
-
- strm->state = NULL;
-
- return BZ_OK;
-}
-#else // EXEHEAD
-
-#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
-/*---------------------------------------------------*/
-
-Int32 NSISCALL BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
-{
- Int32 nb, na, mid;
- nb = 0;
- na = 256;
- do {
- mid = (nb + na) >> 1;
- if (indx >= cftab[mid]) nb = mid;
- else na = mid;
- } while (na - nb != 1);
- return nb;
-}
-
-
-static
-void NSISCALL unRLE_obuf_to_output_SMALL ( DState* s )
-{
- UChar k1;
- while (True) {
- /* try to finish existing run */
- while (True) {
- if (s->avail_out == 0) return;
- if (s->state_out_len == 0) break;
- *( (UChar*)(s->next_out) ) = s->state_out_ch;
- s->state_out_len--;
- s->next_out++;
- s->avail_out--;
- }
-
- /* can a new run be started? */
- if (s->nblock_used == s->save.nblock+1) return;
-
- s->state_out_len = 1;
- s->state_out_ch = s->k0;
- BZ_GET_SMALL(k1); s->nblock_used++;
- if (s->nblock_used == s->save.nblock+1) continue;
- if (k1 != s->k0) { s->k0 = k1; continue; };
-
- s->state_out_len = 2;
- BZ_GET_SMALL(k1); s->nblock_used++;
- if (s->nblock_used == s->save.nblock+1) continue;
- if (k1 != s->k0) { s->k0 = k1; continue; };
-
- s->state_out_len = 3;
- BZ_GET_SMALL(k1); s->nblock_used++;
- if (s->nblock_used == s->save.nblock+1) continue;
- if (k1 != s->k0) { s->k0 = k1; continue; };
-
- BZ_GET_SMALL(k1); s->nblock_used++;
- s->state_out_len = ((Int32)k1) + 4;
- BZ_GET_SMALL(s->k0); s->nblock_used++;
- }
-}
-#else//!small, fast
-static void NSISCALL unRLE_obuf_to_output_FAST ( DState* s )
-{
- UChar k1;
-
- /* restore */
- UChar c_state_out_ch = s->state_out_ch;
- Int32 c_state_out_len = s->state_out_len;
- Int32 c_nblock_used = s->nblock_used;
- Int32 c_k0 = s->k0;
- UInt32 c_tPos = s->tPos;
-
- char* cs_next_out = s->next_out;
- unsigned int cs_avail_out = s->avail_out;
- /* end restore */
-
- UInt32* c_tt = s->tt;
- Int32 s_save_nblockPP = s->save.nblock+1;
-// unsigned int total_out_lo32_old;
-
- while (True) {
-
- /* try to finish existing run */
- if (c_state_out_len > 0) {
- while (True) {
- if (cs_avail_out == 0) goto return_notr;
- if (c_state_out_len == 1) break;
- *( (UChar*)(cs_next_out) ) = c_state_out_ch;
- c_state_out_len--;
- cs_next_out++;
- cs_avail_out--;
- }
- s_state_out_len_eq_one:
- {
- if (cs_avail_out == 0) {
- c_state_out_len = 1; goto return_notr;
- };
- *( (UChar*)(cs_next_out) ) = c_state_out_ch;
- cs_next_out++;
- cs_avail_out--;
- }
- }
- /* can a new run be started? */
- if (c_nblock_used == s_save_nblockPP) {
- c_state_out_len = 0; goto return_notr;
- };
- c_state_out_ch = c_k0;
- BZ_GET_FAST_C(k1); c_nblock_used++;
- if (k1 != c_k0) {
- c_k0 = k1; goto s_state_out_len_eq_one;
- };
- if (c_nblock_used == s_save_nblockPP)
- goto s_state_out_len_eq_one;
-
- c_state_out_len = 2;
- BZ_GET_FAST_C(k1); c_nblock_used++;
- if (c_nblock_used == s_save_nblockPP) continue;
- if (k1 != c_k0) { c_k0 = k1; continue; };
-
- c_state_out_len = 3;
- BZ_GET_FAST_C(k1); c_nblock_used++;
- if (c_nblock_used == s_save_nblockPP) continue;
- if (k1 != c_k0) { c_k0 = k1; continue; };
-
- BZ_GET_FAST_C(k1); c_nblock_used++;
- c_state_out_len = ((Int32)k1) + 4;
- BZ_GET_FAST_C(c_k0); c_nblock_used++;
- }
-
- return_notr:
- s->state_out_ch = c_state_out_ch;
- s->state_out_len = c_state_out_len;
- s->nblock_used = c_nblock_used;
- s->k0 = c_k0;
- s->tPos = c_tPos;
- s->next_out = cs_next_out;
- s->avail_out = cs_avail_out;
- /* end save */
-}
-
-#endif
-
-
-/*---------------------------------------------------*/
-int NSISCALL BZ2_bzDecompress( DState *s )
-{
- while (True) {
- if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;
- if (s->state == BZ_X_OUTPUT) {
-#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
- unRLE_obuf_to_output_SMALL ( s );
-#else
- unRLE_obuf_to_output_FAST ( s );
-#endif
- if (s->nblock_used == s->save.nblock+1 && s->state_out_len == 0) {
- s->state = BZ_X_BLKHDR_1;
- } else {
- return BZ_OK;
- }
- }
- if (s->state >= BZ_X_BLKHDR_1) {
- Int32 r = BZ2_decompress ( s );
- if (r == BZ_STREAM_END) {
- return r;
- }
- if (s->state != BZ_X_OUTPUT) return r;
- }
- }
-}
-
-
-
-#endif
+/*
+ * This file is a part of the bzip2 compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.bzip.org/
+ *
+ * This modification is not compatible with the original bzip2.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+#include "bzlib.h"
+
+/*-------------------------------------------------------------*/
+/*--- Library top-level functions. ---*/
+/*--- bzlib.c ---*/
+/*-------------------------------------------------------------*/
+
+/*--
+ This file is a part of bzip2 and/or libbzip2, a program and
+ library for lossless, block-sorting data compression.
+
+ Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Julian Seward, Cambridge, UK.
+ jseward@acm.org
+ bzip2/libbzip2 version 1.0 of 21 March 2000
+
+ This program is based on (at least) the work of:
+ Mike Burrows
+ David Wheeler
+ Peter Fenwick
+ Alistair Moffat
+ Radford Neal
+ Ian H. Witten
+ Robert Sedgewick
+ Jon L. Bentley
+
+ For more information on these sources, see the manual.
+--*/
+
+/*--
+ CHANGES
+ ~~~~~~~
+ 0.9.0 -- original version.
+
+ 0.9.0a/b -- no changes in this file.
+
+ 0.9.0c
+ * made zero-length BZ_FLUSH work correctly in bzCompress().
+ * fixed bzWrite/bzRead to ignore zero-length requests.
+ * fixed bzread to correctly handle read requests after EOF.
+ * wrong parameter order in call to bzDecompressInit in
+ bzBuffToBuffDecompress. Fixed.
+--*/
+#include "bzlib.h"
+
+
+/*---------------------------------------------------*/
+/*--- Compression stuff ---*/
+/*---------------------------------------------------*/
+
+
+#ifndef EXEHEAD
+
+/*---------------------------------------------------*/
+static
+void prepare_new_block ( EState* s )
+{
+ Int32 i;
+ s->nblock = 0;
+ s->numZ = 0;
+ s->state_out_pos = 0;
+ for (i = 0; i < 256; i++) s->inUse[i] = False;
+ s->blockNo++;
+}
+
+
+/*---------------------------------------------------*/
+static
+void init_RL ( EState* s )
+{
+ s->state_in_ch = 256;
+ s->state_in_len = 0;
+}
+
+
+static
+Bool isempty_RL ( EState* s )
+{
+ if (s->state_in_ch < 256 && s->state_in_len > 0)
+ return False; else
+ return True;
+}
+
+/*---------------------------------------------------*/
+int BZ2_bzCompressInit( bz_stream* strm,
+ int blockSize100k,
+ int verbosity,
+ int workFactor )
+{
+ Int32 n;
+ EState* s;
+
+ if (strm == NULL ||
+ workFactor < 0 || workFactor > 250)
+ return BZ_PARAM_ERROR;
+
+ if (workFactor == 0) workFactor = 30;
+
+ s = BZALLOC( sizeof(EState) );
+ if (s == NULL) return BZ_MEM_ERROR;
+ s->strm = strm;
+
+ s->arr1 = NULL;
+ s->arr2 = NULL;
+ s->ftab = NULL;
+
+ n = NSIS_COMPRESS_BZIP2_LEVEL*100000;
+ s->arr1 = BZALLOC( n * sizeof(UInt32) );
+ s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
+ s->ftab = BZALLOC( 65537 * sizeof(UInt32) );
+
+ if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
+ BZFREE(s->arr1);
+ BZFREE(s->arr2);
+ BZFREE(s->ftab);
+ BZFREE(s);
+ return BZ_MEM_ERROR;
+ }
+
+ s->blockNo = 0;
+ s->state = BZ_S_INPUT;
+ s->mode = BZ_M_RUNNING;
+ s->nblockMAX = 100000 * NSIS_COMPRESS_BZIP2_LEVEL - 19;
+ s->workFactor = workFactor;
+
+ s->block = (UChar*)s->arr2;
+ s->mtfv = (UInt16*)s->arr1;
+ s->zbits = NULL;
+ s->ptr = (UInt32*)s->arr1;
+
+ strm->state = s;
+ init_RL ( s );
+ prepare_new_block ( s );
+ return BZ_OK;
+}
+
+
+/*---------------------------------------------------*/
+static
+void add_pair_to_block ( EState* s )
+{
+ UChar ch = (UChar)(s->state_in_ch);
+ s->inUse[s->state_in_ch] = True;
+ switch (s->state_in_len) {
+ case 1:
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ break;
+ case 2:
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ break;
+ case 3:
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ break;
+ default:
+ s->inUse[s->state_in_len-4] = True;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = (UChar)ch; s->nblock++;
+ s->block[s->nblock] = ((UChar)(s->state_in_len-4));
+ s->nblock++;
+ break;
+ }
+}
+
+
+/*---------------------------------------------------*/
+static
+void flush_RL ( EState* s )
+{
+ if (s->state_in_ch < 256) add_pair_to_block ( s );
+ init_RL ( s );
+}
+
+
+/*---------------------------------------------------*/
+#define ADD_CHAR_TO_BLOCK(zs,zchh0) \
+{ \
+ UInt32 zchh = (UInt32)(zchh0); \
+ /*-- fast track the common case --*/ \
+ if (zchh != zs->state_in_ch && \
+ zs->state_in_len == 1) { \
+ UChar ch = (UChar)(zs->state_in_ch); \
+ zs->inUse[zs->state_in_ch] = True; \
+ zs->block[zs->nblock] = (UChar)ch; \
+ zs->nblock++; \
+ zs->state_in_ch = zchh; \
+ } \
+ else \
+ /*-- general, uncommon cases --*/ \
+ if (zchh != zs->state_in_ch || \
+ zs->state_in_len == 255) { \
+ if (zs->state_in_ch < 256) \
+ add_pair_to_block ( zs ); \
+ zs->state_in_ch = zchh; \
+ zs->state_in_len = 1; \
+ } else { \
+ zs->state_in_len++; \
+ } \
+}
+
+
+/*---------------------------------------------------*/
+static
+Bool copy_input_until_stop ( EState* s )
+{
+ Bool progress_in = False;
+
+ if (s->mode == BZ_M_RUNNING) {
+
+ /*-- fast track the common case --*/
+ while (True) {
+ /*-- block full? --*/
+ if (s->nblock >= s->nblockMAX) break;
+ /*-- no input? --*/
+ if (s->strm->avail_in == 0) break;
+ progress_in = True;
+ ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
+ s->strm->next_in++;
+ s->strm->avail_in--;
+ // s->strm->total_in_lo32++;
+// if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
+ }
+
+ } else {
+
+ /*-- general, uncommon case --*/
+ while (True) {
+ /*-- block full? --*/
+ if (s->nblock >= s->nblockMAX) break;
+ /*-- no input? --*/
+ if (s->strm->avail_in == 0) break;
+ /*-- flush/finish end? --*/
+ if (s->avail_in_expect == 0) break;
+ progress_in = True;
+ ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) );
+ s->strm->next_in++;
+ s->strm->avail_in--;
+ // s->strm->total_in_lo32++;
+// if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
+ s->avail_in_expect--;
+ }
+ }
+ return progress_in;
+}
+
+
+/*---------------------------------------------------*/
+static
+Bool copy_output_until_stop ( EState* s )
+{
+ Bool progress_out = False;
+
+ while (True) {
+
+ /*-- no output space? --*/
+ if (s->strm->avail_out == 0) break;
+
+ /*-- block done? --*/
+ if (s->state_out_pos >= s->numZ) break;
+
+ progress_out = True;
+ *(s->strm->next_out) = s->zbits[s->state_out_pos];
+ s->state_out_pos++;
+ s->strm->avail_out--;
+ s->strm->next_out++;
+// s->strm->total_out_lo32++;
+ // if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
+ }
+
+ return progress_out;
+}
+
+
+/*---------------------------------------------------*/
+static
+Bool handle_compress ( bz_stream* strm )
+{
+ Bool progress_in = False;
+ Bool progress_out = False;
+ EState* s = strm->state;
+
+ while (True) {
+
+ if (s->state == BZ_S_OUTPUT) {
+ progress_out |= copy_output_until_stop ( s );
+ if (s->state_out_pos < s->numZ) break;
+ if (s->mode == BZ_M_FINISHING &&
+ s->avail_in_expect == 0 &&
+ isempty_RL(s)) break;
+ prepare_new_block ( s );
+ s->state = BZ_S_INPUT;
+ if (s->mode == BZ_M_FLUSHING &&
+ s->avail_in_expect == 0 &&
+ isempty_RL(s)) break;
+ }
+
+ if (s->state == BZ_S_INPUT) {
+ progress_in |= copy_input_until_stop ( s );
+ if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) {
+ flush_RL ( s );
+ BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) );
+ s->state = BZ_S_OUTPUT;
+ }
+ else
+ if (s->nblock >= s->nblockMAX) {
+ BZ2_compressBlock ( s, False );
+ s->state = BZ_S_OUTPUT;
+ }
+ else
+ if (s->strm->avail_in == 0) {
+ break;
+ }
+ }
+
+ }
+
+ return progress_in || progress_out;
+}
+
+
+/*---------------------------------------------------*/
+int BZ2_bzCompress( bz_stream *strm, int action )
+{
+ Bool progress;
+ EState* s;
+ if (strm == NULL) return BZ_PARAM_ERROR;
+ s = strm->state;
+ if (s == NULL) return BZ_PARAM_ERROR;
+ if (s->strm != strm) return BZ_PARAM_ERROR;
+
+ preswitch:
+ switch (s->mode) {
+
+ case BZ_M_IDLE:
+ return BZ_SEQUENCE_ERROR;
+
+ case BZ_M_RUNNING:
+ if (action == BZ_RUN) {
+ progress = handle_compress ( strm );
+ return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;
+ }
+ else
+ if (action == BZ_FLUSH) {
+ s->avail_in_expect = strm->avail_in;
+ s->mode = BZ_M_FLUSHING;
+ goto preswitch;
+ }
+ else
+ if (action == BZ_FINISH) {
+ s->avail_in_expect = strm->avail_in;
+ s->mode = BZ_M_FINISHING;
+ goto preswitch;
+ }
+ else
+ return BZ_PARAM_ERROR;
+
+ case BZ_M_FLUSHING:
+ if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR;
+ if (s->avail_in_expect != s->strm->avail_in)
+ return BZ_SEQUENCE_ERROR;
+ progress = handle_compress ( strm );
+ if (s->avail_in_expect > 0 || !isempty_RL(s) ||
+ s->state_out_pos < s->numZ) return BZ_FLUSH_OK;
+ s->mode = BZ_M_RUNNING;
+ return BZ_RUN_OK;
+
+ case BZ_M_FINISHING:
+ if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR;
+ if (s->avail_in_expect != s->strm->avail_in)
+ return BZ_SEQUENCE_ERROR;
+ progress = handle_compress ( strm );
+ if (!progress) return BZ_SEQUENCE_ERROR;
+ if (s->avail_in_expect > 0 || !isempty_RL(s) ||
+ s->state_out_pos < s->numZ) return BZ_FINISH_OK;
+ s->mode = BZ_M_IDLE;
+ return BZ_STREAM_END;
+ }
+ return BZ_OK; /*--not reached--*/
+}
+
+
+/*---------------------------------------------------*/
+int BZ2_bzCompressEnd( bz_stream *strm )
+{
+ EState* s;
+ if (strm == NULL) return BZ_PARAM_ERROR;
+ s = strm->state;
+ if (s == NULL) return BZ_PARAM_ERROR;
+ if (s->strm != strm) return BZ_PARAM_ERROR;
+
+ BZFREE(s->arr1);
+ BZFREE(s->arr2);
+ BZFREE(s->ftab);
+ BZFREE(strm->state);
+
+ strm->state = NULL;
+
+ return BZ_OK;
+}
+#else // EXEHEAD
+
+#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
+/*---------------------------------------------------*/
+
+Int32 NSISCALL BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
+{
+ Int32 nb, na, mid;
+ nb = 0;
+ na = 256;
+ do {
+ mid = (nb + na) >> 1;
+ if (indx >= cftab[mid]) nb = mid;
+ else na = mid;
+ } while (na - nb != 1);
+ return nb;
+}
+
+
+static
+void NSISCALL unRLE_obuf_to_output_SMALL ( DState* s )
+{
+ UChar k1;
+ while (True) {
+ /* try to finish existing run */
+ while (True) {
+ if (s->avail_out == 0) return;
+ if (s->state_out_len == 0) break;
+ *( (UChar*)(s->next_out) ) = s->state_out_ch;
+ s->state_out_len--;
+ s->next_out++;
+ s->avail_out--;
+ }
+
+ /* can a new run be started? */
+ if (s->nblock_used == s->save.nblock+1) return;
+
+ s->state_out_len = 1;
+ s->state_out_ch = s->k0;
+ BZ_GET_SMALL(k1); s->nblock_used++;
+ if (s->nblock_used == s->save.nblock+1) continue;
+ if (k1 != s->k0) { s->k0 = k1; continue; };
+
+ s->state_out_len = 2;
+ BZ_GET_SMALL(k1); s->nblock_used++;
+ if (s->nblock_used == s->save.nblock+1) continue;
+ if (k1 != s->k0) { s->k0 = k1; continue; };
+
+ s->state_out_len = 3;
+ BZ_GET_SMALL(k1); s->nblock_used++;
+ if (s->nblock_used == s->save.nblock+1) continue;
+ if (k1 != s->k0) { s->k0 = k1; continue; };
+
+ BZ_GET_SMALL(k1); s->nblock_used++;
+ s->state_out_len = ((Int32)k1) + 4;
+ BZ_GET_SMALL(s->k0); s->nblock_used++;
+ }
+}
+#else//!small, fast
+static void NSISCALL unRLE_obuf_to_output_FAST ( DState* s )
+{
+ UChar k1;
+
+ /* restore */
+ UChar c_state_out_ch = s->state_out_ch;
+ Int32 c_state_out_len = s->state_out_len;
+ Int32 c_nblock_used = s->nblock_used;
+ Int32 c_k0 = s->k0;
+ UInt32 c_tPos = s->tPos;
+
+ char* cs_next_out = s->next_out;
+ unsigned int cs_avail_out = s->avail_out;
+ /* end restore */
+
+ UInt32* c_tt = s->tt;
+ Int32 s_save_nblockPP = s->save.nblock+1;
+// unsigned int total_out_lo32_old;
+
+ while (True) {
+
+ /* try to finish existing run */
+ if (c_state_out_len > 0) {
+ while (True) {
+ if (cs_avail_out == 0) goto return_notr;
+ if (c_state_out_len == 1) break;
+ *( (UChar*)(cs_next_out) ) = c_state_out_ch;
+ c_state_out_len--;
+ cs_next_out++;
+ cs_avail_out--;
+ }
+ s_state_out_len_eq_one:
+ {
+ if (cs_avail_out == 0) {
+ c_state_out_len = 1; goto return_notr;
+ };
+ *( (UChar*)(cs_next_out) ) = c_state_out_ch;
+ cs_next_out++;
+ cs_avail_out--;
+ }
+ }
+ /* can a new run be started? */
+ if (c_nblock_used == s_save_nblockPP) {
+ c_state_out_len = 0; goto return_notr;
+ };
+ c_state_out_ch = c_k0;
+ BZ_GET_FAST_C(k1); c_nblock_used++;
+ if (k1 != c_k0) {
+ c_k0 = k1; goto s_state_out_len_eq_one;
+ };
+ if (c_nblock_used == s_save_nblockPP)
+ goto s_state_out_len_eq_one;
+
+ c_state_out_len = 2;
+ BZ_GET_FAST_C(k1); c_nblock_used++;
+ if (c_nblock_used == s_save_nblockPP) continue;
+ if (k1 != c_k0) { c_k0 = k1; continue; };
+
+ c_state_out_len = 3;
+ BZ_GET_FAST_C(k1); c_nblock_used++;
+ if (c_nblock_used == s_save_nblockPP) continue;
+ if (k1 != c_k0) { c_k0 = k1; continue; };
+
+ BZ_GET_FAST_C(k1); c_nblock_used++;
+ c_state_out_len = ((Int32)k1) + 4;
+ BZ_GET_FAST_C(c_k0); c_nblock_used++;
+ }
+
+ return_notr:
+ s->state_out_ch = c_state_out_ch;
+ s->state_out_len = c_state_out_len;
+ s->nblock_used = c_nblock_used;
+ s->k0 = c_k0;
+ s->tPos = c_tPos;
+ s->next_out = cs_next_out;
+ s->avail_out = cs_avail_out;
+ /* end save */
+}
+
+#endif
+
+
+/*---------------------------------------------------*/
+int NSISCALL BZ2_bzDecompress( DState *s )
+{
+ while (True) {
+ if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;
+ if (s->state == BZ_X_OUTPUT) {
+#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
+ unRLE_obuf_to_output_SMALL ( s );
+#else
+ unRLE_obuf_to_output_FAST ( s );
+#endif
+ if (s->nblock_used == s->save.nblock+1 && s->state_out_len == 0) {
+ s->state = BZ_X_BLKHDR_1;
+ } else {
+ return BZ_OK;
+ }
+ }
+ if (s->state >= BZ_X_BLKHDR_1) {
+ Int32 r = BZ2_decompress ( s );
+ if (r == BZ_STREAM_END) {
+ return r;
+ }
+ if (s->state != BZ_X_OUTPUT) return r;
+ }
+ }
+}
+
+
+
+#endif
diff --git a/Source/bzip2/bzlib.h b/Source/bzip2/bzlib.h
index 2554364..c5a5c37 100755
--- a/Source/bzip2/bzlib.h
+++ b/Source/bzip2/bzlib.h
@@ -1,444 +1,444 @@
-/*
- * This file is a part of the bzip2 compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.bzip.org/
- *
- * This modification is not compatible with the original bzip2.
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/*-------------------------------------------------------------*/
-/*--- Public header file for the library. ---*/
-/*--- bzlib.h ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- jseward@acm.org
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-
-#ifndef _BZLIB_H
-#define _BZLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../exehead/config.h"
-#include "../Platform.h"
-
-#define BZ_RUN 0
-#define BZ_FLUSH 1
-#define BZ_FINISH 2
-
-#define BZ_OK 0
-#define BZ_RUN_OK 1
-#define BZ_FLUSH_OK 2
-#define BZ_FINISH_OK 3
-#define BZ_STREAM_END 4
-#define BZ_SEQUENCE_ERROR (-1)
-#define BZ_PARAM_ERROR (-2)
-#define BZ_MEM_ERROR (-3)
-#define BZ_DATA_ERROR (-4)
-#define BZ_DATA_ERROR_MAGIC (-5)
-#define BZ_IO_ERROR (-6)
-#define BZ_UNEXPECTED_EOF (-7)
-#define BZ_OUTBUFF_FULL (-8)
-#define BZ_CONFIG_ERROR (-9)
-
-/*-- Constants for the back end. --*/
-
-#define BZ_MAX_ALPHA_SIZE 258
-#define BZ_MAX_CODE_LEN 23
-
-#define BZ_RUNA 0
-#define BZ_RUNB 1
-
-#define BZ_N_GROUPS 6
-#define BZ_G_SIZE 50
-#define BZ_N_ITERS 4
-
-#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))
-
-typedef char Char;
-typedef unsigned char Bool;
-typedef unsigned char UChar;
-typedef int Int32;
-typedef unsigned int UInt32;
-typedef short Int16;
-typedef unsigned short UInt16;
-
-#define True ((Bool)1)
-#define False ((Bool)0)
-
-#define AssertD(cond,msg) /* */
-#define AssertH(cond,errcode) /* */
-#define AssertD(cond,msg) /* */
-#define VPrintf0(zf) /* */
-#define VPrintf1(zf,za1) /* */
-#define VPrintf2(zf,za1,za2) /* */
-#define VPrintf3(zf,za1,za2,za3) /* */
-#define VPrintf4(zf,za1,za2,za3,za4) /* */
-#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */
-
-#ifndef EXEHEAD
-
-#define BZALLOC(items) malloc(items)
-#define BZFREE(addr) { if (addr) free(addr); }
-#define mini_memcpy memcpy
-
-typedef struct {
- char *next_in;
- unsigned int avail_in;
-
- char *next_out;
- unsigned int avail_out;
-
- void *state;
-} bz_stream;
-
-/*-- Core (low-level) library functions --*/
-
-extern int BZ2_bzCompressInit(
- bz_stream* strm,
- int blockSize100k,
- int verbosity,
- int workFactor
- );
-
-extern int BZ2_bzCompress( bz_stream* strm, int action );
-extern int BZ2_bzCompressEnd(bz_stream* strm );
-
-/*-- States and modes for compression. --*/
-
-#define BZ_M_IDLE 1
-#define BZ_M_RUNNING 2
-#define BZ_M_FLUSHING 3
-#define BZ_M_FINISHING 4
-
-#define BZ_S_OUTPUT 1
-#define BZ_S_INPUT 2
-
-#define BZ_N_RADIX 2
-#define BZ_N_QSORT 12
-#define BZ_N_SHELL 18
-#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
-
-/*-- Structure holding all the compression-side stuff. --*/
-
-typedef struct {
- /* pointer back to the struct bz_stream */
- bz_stream *strm;
-
- /* mode this stream is in, and whether inputting */
- /* or outputting data */
- Int32 mode;
- Int32 state;
-
- /* remembers avail_in when flush/finish requested */
- UInt32 avail_in_expect;
-
- /* for doing the block sorting */
- UInt32* arr1;
- UInt32* arr2;
- UInt32* ftab;
- Int32 origPtr;
-
- /* aliases for arr1 and arr2 */
- UInt32* ptr;
- UChar* block;
- UInt16* mtfv;
- UChar* zbits;
-
- /* for deciding when to use the fallback sorting algorithm */
- Int32 workFactor;
-
- /* run-length-encoding of the input */
- UInt32 state_in_ch;
- Int32 state_in_len;
-
- /* input and output limits and current posns */
- Int32 nblock;
- Int32 nblockMAX;
- Int32 numZ;
- Int32 state_out_pos;
-
- /* map of bytes used in block */
- Int32 nInUse;
- Bool inUse[256];
- UChar unseqToSeq[256];
-
- /* the buffer for bit stream creation */
- UInt32 bsBuff;
- Int32 bsLive;
-
- /* misc administratium */
- Int32 blockNo;
-
- /* stuff for coding the MTF values */
- Int32 nMTF;
- Int32 mtfFreq [BZ_MAX_ALPHA_SIZE];
- UChar selector [BZ_MAX_SELECTORS];
- UChar selectorMtf[BZ_MAX_SELECTORS];
-
- UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 rfreq [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- /* second dimension: only 3 needed; 4 makes index calculations faster */
- UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4];
-
-} EState;
-
-
-
-/*-- externs for compression. --*/
-
-extern void BZ2_blockSort ( EState* );
-extern void BZ2_compressBlock ( EState*, Bool );
-extern void BZ2_bsInitWrite ( EState* );
-extern void BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 );
-extern void BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
-
-#else//EXEHEAD
-
-/*-- states for decompression. --*/
-
-#define BZ_X_IDLE 1
-#define BZ_X_OUTPUT 2
-
-#define BZ_X_BLKHDR_1 11
-#define BZ_X_RANDBIT 12
-#define BZ_X_ORIGPTR_1 13
-#define BZ_X_ORIGPTR_2 14
-#define BZ_X_ORIGPTR_3 15
-#define BZ_X_MAPPING_1 16
-#define BZ_X_MAPPING_2 17
-#define BZ_X_SELECTOR_1 18
-#define BZ_X_SELECTOR_2 19
-#define BZ_X_SELECTOR_3 20
-#define BZ_X_CODING_1 21
-#define BZ_X_CODING_2 22
-#define BZ_X_CODING_3 23
-#define BZ_X_MTF_1 24
-#define BZ_X_MTF_2 25
-#define BZ_X_MTF_3 26
-#define BZ_X_MTF_4 27
-#define BZ_X_MTF_5 28
-#define BZ_X_MTF_6 29
-
-
-
-/*-- Constants for the fast MTF decoder. --*/
-
-#define MTFA_SIZE 4096
-#define MTFL_SIZE 16
-
-
-
-/* save area for scalars in the main decompress code */
-typedef struct {
- Int32 i;
- Int32 j;
- Int32 t;
- Int32 alphaSize;
- Int32 nGroups;
- Int32 nSelectors;
- Int32 EOB;
- Int32 groupNo;
- Int32 groupPos;
- Int32 nextSym;
- Int32 nblockMAX;
- Int32 nblock;
- Int32 es;
- Int32 N;
- Int32 curr;
- Int32 zt;
- Int32 zn;
- Int32 zvec;
- Int32 zj;
- Int32 gSel;
- Int32 gMinlen;
- Int32* gLimit;
- Int32* gBase;
- Int32* gPerm;
-} DState_save;
-
-/*-- Structure holding all the decompression-side stuff. --*/
-
-typedef struct {
- /* pointer back to the struct bz_stream */
- char *next_in;
- unsigned int avail_in;
-
- char *next_out;
- unsigned int avail_out;
-
- /* state indicator for this stream */
- char state;
-
- UChar state_out_ch;
- Int32 state_out_len;
- Int32 nblock_used;
- Int32 k0;
- UInt32 tPos;
-
- /* the buffer for bit stream reading */
- UInt32 bsBuff;
- Int32 bsLive;
-
- /* for undoing the Burrows-Wheeler transform */
- Int32 origPtr;
- Int32 unzftab[256];
- Int32 cftab[257];
- Int32 cftabCopy[257];
-
-#ifndef NSIS_COMPRESS_BZIP2_SMALLMODE
- /* for undoing the Burrows-Wheeler transform (FAST) */
- UInt32 tt[ NSIS_COMPRESS_BZIP2_LEVEL * 100000 ];
-#else
- /* for undoing the Burrows-Wheeler transform (SMALL) */
- UInt16 ll16 [ NSIS_COMPRESS_BZIP2_LEVEL*100000 ];
- UChar ll4 [((1 + NSIS_COMPRESS_BZIP2_LEVEL*100000) >> 1) ];
-#endif
-
- /* map of bytes used in block */
- Int32 nInUse;
- Bool inUse[256];
- Bool inUse16[16];
- UChar seqToUnseq[256];
-
- /* for decoding the MTF values */
- UChar mtfa [MTFA_SIZE];
- Int32 mtfbase[256 / MTFL_SIZE];
- UChar selector [BZ_MAX_SELECTORS];
- UChar selectorMtf[BZ_MAX_SELECTORS];
- UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-
- Int32 limit [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 minLens[BZ_N_GROUPS];
-
- /* save area for scalars in the main decompress code */
- DState_save save;
-} DState;
-
-
-#ifndef NSIS_COMPRESS_BZIP2_SMALLMODE
-/*-- Macros for decompression. --*/
-
-#define BZ_GET_FAST(cccc) \
- s->tPos = s->tt[s->tPos]; \
- cccc = (UChar)(s->tPos & 0xff); \
- s->tPos >>= 8;
-
-#define BZ_GET_FAST_C(cccc) \
- c_tPos = c_tt[c_tPos]; \
- cccc = (UChar)(c_tPos & 0xff); \
- c_tPos >>= 8;
-
-
-#else//NSIS_COMPRESS_BZIP2_SMALLMODE
-
-#define SET_LL4(i,n) \
- { if (((i) & 0x1) == 0) \
- s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \
- s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \
- }
-
-#define GET_LL4(i) \
- ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)
-
-#define SET_LL(i,n) \
- { s->ll16[i] = (UInt16)(n & 0x0000ffff); \
- SET_LL4(i, n >> 16); \
- }
-
-#define GET_LL(i) \
- (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
-
-#define BZ_GET_SMALL(cccc) \
- cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \
- s->tPos = GET_LL(s->tPos);
-
-extern Int32 BZ2_indexIntoF( Int32, Int32* );
-
-#endif//smallmode
-
-/*-- externs for decompression. --*/
-extern Int32 NSISCALL BZ2_decompress ( DState* );
-
-extern void NSISCALL BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
- Int32, Int32, Int32 );
-
-
-#define BZ2_bzDecompressInit(s) { (s)->state = BZ_X_BLKHDR_1; (s)->bsLive = 0; }
-int NSISCALL BZ2_bzDecompress(DState *s);
-
-#endif//EXEHEAD
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/*-------------------------------------------------------------*/
-/*--- end bzlib.h ---*/
-/*-------------------------------------------------------------*/
+/*
+ * This file is a part of the bzip2 compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.bzip.org/
+ *
+ * This modification is not compatible with the original bzip2.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/*-------------------------------------------------------------*/
+/*--- Public header file for the library. ---*/
+/*--- bzlib.h ---*/
+/*-------------------------------------------------------------*/
+
+/*--
+ This file is a part of bzip2 and/or libbzip2, a program and
+ library for lossless, block-sorting data compression.
+
+ Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Julian Seward, Cambridge, UK.
+ jseward@acm.org
+ bzip2/libbzip2 version 1.0 of 21 March 2000
+
+ This program is based on (at least) the work of:
+ Mike Burrows
+ David Wheeler
+ Peter Fenwick
+ Alistair Moffat
+ Radford Neal
+ Ian H. Witten
+ Robert Sedgewick
+ Jon L. Bentley
+
+ For more information on these sources, see the manual.
+--*/
+
+
+#ifndef _BZLIB_H
+#define _BZLIB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "../exehead/config.h"
+#include "../Platform.h"
+
+#define BZ_RUN 0
+#define BZ_FLUSH 1
+#define BZ_FINISH 2
+
+#define BZ_OK 0
+#define BZ_RUN_OK 1
+#define BZ_FLUSH_OK 2
+#define BZ_FINISH_OK 3
+#define BZ_STREAM_END 4
+#define BZ_SEQUENCE_ERROR (-1)
+#define BZ_PARAM_ERROR (-2)
+#define BZ_MEM_ERROR (-3)
+#define BZ_DATA_ERROR (-4)
+#define BZ_DATA_ERROR_MAGIC (-5)
+#define BZ_IO_ERROR (-6)
+#define BZ_UNEXPECTED_EOF (-7)
+#define BZ_OUTBUFF_FULL (-8)
+#define BZ_CONFIG_ERROR (-9)
+
+/*-- Constants for the back end. --*/
+
+#define BZ_MAX_ALPHA_SIZE 258
+#define BZ_MAX_CODE_LEN 23
+
+#define BZ_RUNA 0
+#define BZ_RUNB 1
+
+#define BZ_N_GROUPS 6
+#define BZ_G_SIZE 50
+#define BZ_N_ITERS 4
+
+#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))
+
+typedef char Char;
+typedef unsigned char Bool;
+typedef unsigned char UChar;
+typedef int Int32;
+typedef unsigned int UInt32;
+typedef short Int16;
+typedef unsigned short UInt16;
+
+#define True ((Bool)1)
+#define False ((Bool)0)
+
+#define AssertD(cond,msg) /* */
+#define AssertH(cond,errcode) /* */
+#define AssertD(cond,msg) /* */
+#define VPrintf0(zf) /* */
+#define VPrintf1(zf,za1) /* */
+#define VPrintf2(zf,za1,za2) /* */
+#define VPrintf3(zf,za1,za2,za3) /* */
+#define VPrintf4(zf,za1,za2,za3,za4) /* */
+#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */
+
+#ifndef EXEHEAD
+
+#define BZALLOC(items) malloc(items)
+#define BZFREE(addr) { if (addr) free(addr); }
+#define mini_memcpy memcpy
+
+typedef struct {
+ char *next_in;
+ unsigned int avail_in;
+
+ char *next_out;
+ unsigned int avail_out;
+
+ void *state;
+} bz_stream;
+
+/*-- Core (low-level) library functions --*/
+
+extern int BZ2_bzCompressInit(
+ bz_stream* strm,
+ int blockSize100k,
+ int verbosity,
+ int workFactor
+ );
+
+extern int BZ2_bzCompress( bz_stream* strm, int action );
+extern int BZ2_bzCompressEnd(bz_stream* strm );
+
+/*-- States and modes for compression. --*/
+
+#define BZ_M_IDLE 1
+#define BZ_M_RUNNING 2
+#define BZ_M_FLUSHING 3
+#define BZ_M_FINISHING 4
+
+#define BZ_S_OUTPUT 1
+#define BZ_S_INPUT 2
+
+#define BZ_N_RADIX 2
+#define BZ_N_QSORT 12
+#define BZ_N_SHELL 18
+#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
+
+/*-- Structure holding all the compression-side stuff. --*/
+
+typedef struct {
+ /* pointer back to the struct bz_stream */
+ bz_stream *strm;
+
+ /* mode this stream is in, and whether inputting */
+ /* or outputting data */
+ Int32 mode;
+ Int32 state;
+
+ /* remembers avail_in when flush/finish requested */
+ UInt32 avail_in_expect;
+
+ /* for doing the block sorting */
+ UInt32* arr1;
+ UInt32* arr2;
+ UInt32* ftab;
+ Int32 origPtr;
+
+ /* aliases for arr1 and arr2 */
+ UInt32* ptr;
+ UChar* block;
+ UInt16* mtfv;
+ UChar* zbits;
+
+ /* for deciding when to use the fallback sorting algorithm */
+ Int32 workFactor;
+
+ /* run-length-encoding of the input */
+ UInt32 state_in_ch;
+ Int32 state_in_len;
+
+ /* input and output limits and current posns */
+ Int32 nblock;
+ Int32 nblockMAX;
+ Int32 numZ;
+ Int32 state_out_pos;
+
+ /* map of bytes used in block */
+ Int32 nInUse;
+ Bool inUse[256];
+ UChar unseqToSeq[256];
+
+ /* the buffer for bit stream creation */
+ UInt32 bsBuff;
+ Int32 bsLive;
+
+ /* misc administratium */
+ Int32 blockNo;
+
+ /* stuff for coding the MTF values */
+ Int32 nMTF;
+ Int32 mtfFreq [BZ_MAX_ALPHA_SIZE];
+ UChar selector [BZ_MAX_SELECTORS];
+ UChar selectorMtf[BZ_MAX_SELECTORS];
+
+ UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ Int32 code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ Int32 rfreq [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ /* second dimension: only 3 needed; 4 makes index calculations faster */
+ UInt32 len_pack[BZ_MAX_ALPHA_SIZE][4];
+
+} EState;
+
+
+
+/*-- externs for compression. --*/
+
+extern void BZ2_blockSort ( EState* );
+extern void BZ2_compressBlock ( EState*, Bool );
+extern void BZ2_bsInitWrite ( EState* );
+extern void BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 );
+extern void BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
+
+#else//EXEHEAD
+
+/*-- states for decompression. --*/
+
+#define BZ_X_IDLE 1
+#define BZ_X_OUTPUT 2
+
+#define BZ_X_BLKHDR_1 11
+#define BZ_X_RANDBIT 12
+#define BZ_X_ORIGPTR_1 13
+#define BZ_X_ORIGPTR_2 14
+#define BZ_X_ORIGPTR_3 15
+#define BZ_X_MAPPING_1 16
+#define BZ_X_MAPPING_2 17
+#define BZ_X_SELECTOR_1 18
+#define BZ_X_SELECTOR_2 19
+#define BZ_X_SELECTOR_3 20
+#define BZ_X_CODING_1 21
+#define BZ_X_CODING_2 22
+#define BZ_X_CODING_3 23
+#define BZ_X_MTF_1 24
+#define BZ_X_MTF_2 25
+#define BZ_X_MTF_3 26
+#define BZ_X_MTF_4 27
+#define BZ_X_MTF_5 28
+#define BZ_X_MTF_6 29
+
+
+
+/*-- Constants for the fast MTF decoder. --*/
+
+#define MTFA_SIZE 4096
+#define MTFL_SIZE 16
+
+
+
+/* save area for scalars in the main decompress code */
+typedef struct {
+ Int32 i;
+ Int32 j;
+ Int32 t;
+ Int32 alphaSize;
+ Int32 nGroups;
+ Int32 nSelectors;
+ Int32 EOB;
+ Int32 groupNo;
+ Int32 groupPos;
+ Int32 nextSym;
+ Int32 nblockMAX;
+ Int32 nblock;
+ Int32 es;
+ Int32 N;
+ Int32 curr;
+ Int32 zt;
+ Int32 zn;
+ Int32 zvec;
+ Int32 zj;
+ Int32 gSel;
+ Int32 gMinlen;
+ Int32* gLimit;
+ Int32* gBase;
+ Int32* gPerm;
+} DState_save;
+
+/*-- Structure holding all the decompression-side stuff. --*/
+
+typedef struct {
+ /* pointer back to the struct bz_stream */
+ char *next_in;
+ unsigned int avail_in;
+
+ char *next_out;
+ unsigned int avail_out;
+
+ /* state indicator for this stream */
+ char state;
+
+ UChar state_out_ch;
+ Int32 state_out_len;
+ Int32 nblock_used;
+ Int32 k0;
+ UInt32 tPos;
+
+ /* the buffer for bit stream reading */
+ UInt32 bsBuff;
+ Int32 bsLive;
+
+ /* for undoing the Burrows-Wheeler transform */
+ Int32 origPtr;
+ Int32 unzftab[256];
+ Int32 cftab[257];
+ Int32 cftabCopy[257];
+
+#ifndef NSIS_COMPRESS_BZIP2_SMALLMODE
+ /* for undoing the Burrows-Wheeler transform (FAST) */
+ UInt32 tt[ NSIS_COMPRESS_BZIP2_LEVEL * 100000 ];
+#else
+ /* for undoing the Burrows-Wheeler transform (SMALL) */
+ UInt16 ll16 [ NSIS_COMPRESS_BZIP2_LEVEL*100000 ];
+ UChar ll4 [((1 + NSIS_COMPRESS_BZIP2_LEVEL*100000) >> 1) ];
+#endif
+
+ /* map of bytes used in block */
+ Int32 nInUse;
+ Bool inUse[256];
+ Bool inUse16[16];
+ UChar seqToUnseq[256];
+
+ /* for decoding the MTF values */
+ UChar mtfa [MTFA_SIZE];
+ Int32 mtfbase[256 / MTFL_SIZE];
+ UChar selector [BZ_MAX_SELECTORS];
+ UChar selectorMtf[BZ_MAX_SELECTORS];
+ UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+
+ Int32 limit [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ Int32 minLens[BZ_N_GROUPS];
+
+ /* save area for scalars in the main decompress code */
+ DState_save save;
+} DState;
+
+
+#ifndef NSIS_COMPRESS_BZIP2_SMALLMODE
+/*-- Macros for decompression. --*/
+
+#define BZ_GET_FAST(cccc) \
+ s->tPos = s->tt[s->tPos]; \
+ cccc = (UChar)(s->tPos & 0xff); \
+ s->tPos >>= 8;
+
+#define BZ_GET_FAST_C(cccc) \
+ c_tPos = c_tt[c_tPos]; \
+ cccc = (UChar)(c_tPos & 0xff); \
+ c_tPos >>= 8;
+
+
+#else//NSIS_COMPRESS_BZIP2_SMALLMODE
+
+#define SET_LL4(i,n) \
+ { if (((i) & 0x1) == 0) \
+ s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else \
+ s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4); \
+ }
+
+#define GET_LL4(i) \
+ ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)
+
+#define SET_LL(i,n) \
+ { s->ll16[i] = (UInt16)(n & 0x0000ffff); \
+ SET_LL4(i, n >> 16); \
+ }
+
+#define GET_LL(i) \
+ (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
+
+#define BZ_GET_SMALL(cccc) \
+ cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \
+ s->tPos = GET_LL(s->tPos);
+
+extern Int32 BZ2_indexIntoF( Int32, Int32* );
+
+#endif//smallmode
+
+/*-- externs for decompression. --*/
+extern Int32 NSISCALL BZ2_decompress ( DState* );
+
+extern void NSISCALL BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
+ Int32, Int32, Int32 );
+
+
+#define BZ2_bzDecompressInit(s) { (s)->state = BZ_X_BLKHDR_1; (s)->bsLive = 0; }
+int NSISCALL BZ2_bzDecompress(DState *s);
+
+#endif//EXEHEAD
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/*-------------------------------------------------------------*/
+/*--- end bzlib.h ---*/
+/*-------------------------------------------------------------*/
diff --git a/Source/bzip2/compress.c b/Source/bzip2/compress.c
index 67485f4..6263c5f 100755
--- a/Source/bzip2/compress.c
+++ b/Source/bzip2/compress.c
@@ -1,669 +1,669 @@
-/*
- * This file is a part of the bzip2 compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.bzip.org/
- *
- * This modification is not compatible with the original bzip2.
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/*-------------------------------------------------------------*/
-/*--- Compression machinery (not incl block sorting) ---*/
-/*--- compress.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- jseward@acm.org
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-/*--
- CHANGES
- ~~~~~~~
- 0.9.0 -- original version.
-
- 0.9.0a/b -- no changes in this file.
-
- 0.9.0c
- * changed setting of nGroups in sendMTFValues() so as to
- do a bit better on small files
---*/
-
-#include "bzlib.h"
-
-
-/*---------------------------------------------------*/
-/*--- Bit stream I/O ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-void BZ2_bsInitWrite ( EState* s )
-{
- s->bsLive = 0;
- s->bsBuff = 0;
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsFinishWrite ( EState* s )
-{
- while (s->bsLive > 0) {
- s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24);
- s->numZ++;
- s->bsBuff <<= 8;
- s->bsLive -= 8;
- }
-}
-
-
-/*---------------------------------------------------*/
-#define bsNEEDW(nz) \
-{ \
- while (s->bsLive >= 8) { \
- s->zbits[s->numZ] \
- = (UChar)(s->bsBuff >> 24); \
- s->numZ++; \
- s->bsBuff <<= 8; \
- s->bsLive -= 8; \
- } \
-}
-
-
-/*---------------------------------------------------*/
-static void bsW ( EState* s, Int32 n, UInt32 v )
-{
- bsNEEDW ( n );
- s->bsBuff |= (v << (32 - s->bsLive - n));
- s->bsLive += n;
-}
-
-
-/*---------------------------------------------------*/
-/*static
-void bsPutUInt32 ( EState* s, UInt32 u )
-{
- bsW ( s, 8, (u >> 24) & 0xffL );
- bsW ( s, 8, (u >> 16) & 0xffL );
- bsW ( s, 8, (u >> 8) & 0xffL );
- bsW ( s, 8, u & 0xffL );
-}*/
-
-
-/*---------------------------------------------------*/
-static
-void bsPutUChar ( EState* s, UChar c )
-{
- bsW( s, 8, (UInt32)c );
-}
-
-
-/*---------------------------------------------------*/
-/*--- The back end proper ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-static
-void makeMaps_e ( EState* s )
-{
- Int32 i;
- s->nInUse = 0;
- for (i = 0; i < 256; i++)
- if (s->inUse[i]) {
- s->unseqToSeq[i] = s->nInUse;
- s->nInUse++;
- }
-}
-
-
-/*---------------------------------------------------*/
-static
-void generateMTFValues ( EState* s )
-{
- UChar yy[256];
- Int32 i, j;
- Int32 zPend;
- Int32 wr;
- Int32 EOB;
-
- /*
- After sorting (eg, here),
- s->arr1 [ 0 .. s->nblock-1 ] holds sorted order,
- and
- ((UChar*)s->arr2) [ 0 .. s->nblock-1 ]
- holds the original block data.
-
- The first thing to do is generate the MTF values,
- and put them in
- ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ].
- Because there are strictly fewer or equal MTF values
- than block values, ptr values in this area are overwritten
- with MTF values only when they are no longer needed.
-
- The final compressed bitstream is generated into the
- area starting at
- (UChar*) (&((UChar*)s->arr2)[s->nblock])
-
- These storage aliases are set up in bzCompressInit(),
- except for the last one, which is arranged in
- compressBlock().
- */
- UInt32* ptr = s->ptr;
- UChar* block = s->block;
- UInt16* mtfv = s->mtfv;
-
- makeMaps_e ( s );
- EOB = s->nInUse+1;
-
- for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0;
-
- wr = 0;
- zPend = 0;
- for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
-
- for (i = 0; i < s->nblock; i++) {
- UChar ll_i;
- AssertD ( wr <= i, "generateMTFValues(1)" );
- j = ptr[i]-1; if (j < 0) j += s->nblock;
- ll_i = s->unseqToSeq[block[j]];
- AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" );
-
- if (yy[0] == ll_i) {
- zPend++;
- } else {
-
- if (zPend > 0) {
- zPend--;
- while (True) {
- if (zPend & 1) {
- mtfv[wr] = BZ_RUNB; wr++;
- s->mtfFreq[BZ_RUNB]++;
- } else {
- mtfv[wr] = BZ_RUNA; wr++;
- s->mtfFreq[BZ_RUNA]++;
- }
- if (zPend < 2) break;
- zPend = (zPend - 2) / 2;
- };
- zPend = 0;
- }
- {
- register UChar rtmp;
- register UChar* ryy_j;
- register UChar rll_i;
- rtmp = yy[1];
- yy[1] = yy[0];
- ryy_j = &(yy[1]);
- rll_i = ll_i;
- while ( rll_i != rtmp ) {
- register UChar rtmp2;
- ryy_j++;
- rtmp2 = rtmp;
- rtmp = *ryy_j;
- *ryy_j = rtmp2;
- };
- yy[0] = rtmp;
- j = ryy_j - &(yy[0]);
- mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++;
- }
-
- }
- }
-
- if (zPend > 0) {
- zPend--;
- while (True) {
- if (zPend & 1) {
- mtfv[wr] = BZ_RUNB; wr++;
- s->mtfFreq[BZ_RUNB]++;
- } else {
- mtfv[wr] = BZ_RUNA; wr++;
- s->mtfFreq[BZ_RUNA]++;
- }
- if (zPend < 2) break;
- zPend = (zPend - 2) / 2;
- };
- zPend = 0;
- }
-
- mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
-
- s->nMTF = wr;
-}
-
-
-/*---------------------------------------------------*/
-#define BZ_LESSER_ICOST 0
-#define BZ_GREATER_ICOST 15
-
-static
-void sendMTFValues ( EState* s )
-{
- Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;
- Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;
- Int32 nGroups, nBytes;
-
- /*--
- UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- is a global since the decoder also needs it.
-
- Int32 code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- Int32 rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
- are also globals only used in this proc.
- Made global to keep stack frame size small.
- --*/
-
-
- UInt16 cost[BZ_N_GROUPS];
- Int32 fave[BZ_N_GROUPS];
-
- UInt16* mtfv = s->mtfv;
-
-
- alphaSize = s->nInUse+2;
- for (t = 0; t < BZ_N_GROUPS; t++)
- for (v = 0; v < alphaSize; v++)
- s->len[t][v] = BZ_GREATER_ICOST;
-
- /*--- Decide how many coding tables to use ---*/
- AssertH ( s->nMTF > 0, 3001 );
- if (s->nMTF < 200) nGroups = 2; else
- if (s->nMTF < 600) nGroups = 3; else
- if (s->nMTF < 1200) nGroups = 4; else
- if (s->nMTF < 2400) nGroups = 5; else
- nGroups = 6;
-
- /*--- Generate an initial set of coding tables ---*/
- {
- Int32 nPart, remF, tFreq, aFreq;
-
- nPart = nGroups;
- remF = s->nMTF;
- gs = 0;
- while (nPart > 0) {
- tFreq = remF / nPart;
- ge = gs-1;
- aFreq = 0;
- while (aFreq < tFreq && ge < alphaSize-1) {
- ge++;
- aFreq += s->mtfFreq[ge];
- }
-
- if (ge > gs
- && nPart != nGroups && nPart != 1
- && ((nGroups-nPart) % 2 == 1)) {
- aFreq -= s->mtfFreq[ge];
- ge--;
- }
-
- for (v = 0; v < alphaSize; v++)
- if (v >= gs && v <= ge)
- s->len[nPart-1][v] = BZ_LESSER_ICOST; else
- s->len[nPart-1][v] = BZ_GREATER_ICOST;
-
- nPart--;
- gs = ge+1;
- remF -= aFreq;
- }
- }
-
- /*---
- Iterate up to BZ_N_ITERS times to improve the tables.
- ---*/
- for (iter = 0; iter < BZ_N_ITERS; iter++) {
-
- for (t = 0; t < nGroups; t++) fave[t] = 0;
-
- for (t = 0; t < nGroups; t++)
- for (v = 0; v < alphaSize; v++)
- s->rfreq[t][v] = 0;
-
- /*---
- Set up an auxiliary length table which is used to fast-track
- the common case (nGroups == 6).
- ---*/
- if (nGroups == 6) {
- for (v = 0; v < alphaSize; v++) {
- s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
- s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
- s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
- }
- }
-
- nSelectors = 0;
- totc = 0;
- gs = 0;
- while (True) {
-
- /*--- Set group start & end marks. --*/
- if (gs >= s->nMTF) break;
- ge = gs + BZ_G_SIZE - 1;
- if (ge >= s->nMTF) ge = s->nMTF-1;
-
- /*--
- Calculate the cost of this group as coded
- by each of the coding tables.
- --*/
- for (t = 0; t < nGroups; t++) cost[t] = 0;
-
- if (nGroups == 6 && 50 == ge-gs+1) {
- /*--- fast track the common case ---*/
- register UInt32 cost01, cost23, cost45;
- register UInt16 icv;
- cost01 = cost23 = cost45 = 0;
-
-# define BZ_ITER(nn) \
- icv = mtfv[gs+(nn)]; \
- cost01 += s->len_pack[icv][0]; \
- cost23 += s->len_pack[icv][1]; \
- cost45 += s->len_pack[icv][2]; \
-
- BZ_ITER(0); BZ_ITER(1); BZ_ITER(2); BZ_ITER(3); BZ_ITER(4);
- BZ_ITER(5); BZ_ITER(6); BZ_ITER(7); BZ_ITER(8); BZ_ITER(9);
- BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14);
- BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19);
- BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24);
- BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29);
- BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34);
- BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39);
- BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44);
- BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49);
-
-# undef BZ_ITER
-
- cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16;
- cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16;
- cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
-
- } else {
- /*--- slow version which correctly handles all situations ---*/
- for (i = gs; i <= ge; i++) {
- UInt16 icv = mtfv[i];
- for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
- }
- }
-
- /*--
- Find the coding table which is best for this group,
- and record its identity in the selector table.
- --*/
- bc = 999999999; bt = -1;
- for (t = 0; t < nGroups; t++)
- if (cost[t] < bc) { bc = cost[t]; bt = t; };
- totc += bc;
- fave[bt]++;
- s->selector[nSelectors] = bt;
- nSelectors++;
-
- /*--
- Increment the symbol frequencies for the selected table.
- --*/
- if (nGroups == 6 && 50 == ge-gs+1) {
- /*--- fast track the common case ---*/
-
-# define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++
-
- BZ_ITUR(0); BZ_ITUR(1); BZ_ITUR(2); BZ_ITUR(3); BZ_ITUR(4);
- BZ_ITUR(5); BZ_ITUR(6); BZ_ITUR(7); BZ_ITUR(8); BZ_ITUR(9);
- BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14);
- BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19);
- BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24);
- BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29);
- BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34);
- BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39);
- BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44);
- BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49);
-
-# undef BZ_ITUR
-
- } else {
- /*--- slow version which correctly handles all situations ---*/
- for (i = gs; i <= ge; i++)
- s->rfreq[bt][ mtfv[i] ]++;
- }
-
- gs = ge+1;
- }
-
- /*--
- Recompute the tables based on the accumulated frequencies.
- --*/
- for (t = 0; t < nGroups; t++)
- BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]),
- alphaSize, 20 );
- }
-
-
- AssertH( nGroups < 8, 3002 );
- AssertH( nSelectors < 32768 &&
- nSelectors <= (2 + (NSIS_COMPRESS_BZIP2_LEVEL * 100000 / BZ_G_SIZE)),
- 3003 );
-
-
- /*--- Compute MTF values for the selectors. ---*/
- {
- UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;
- for (i = 0; i < nGroups; i++) pos[i] = i;
- for (i = 0; i < nSelectors; i++) {
- ll_i = s->selector[i];
- j = 0;
- tmp = pos[j];
- while ( ll_i != tmp ) {
- j++;
- tmp2 = tmp;
- tmp = pos[j];
- pos[j] = tmp2;
- };
- pos[0] = tmp;
- s->selectorMtf[i] = j;
- }
- };
-
- /*--- Assign actual codes for the tables. --*/
- for (t = 0; t < nGroups; t++) {
- minLen = 32;
- maxLen = 0;
- for (i = 0; i < alphaSize; i++) {
- if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
- if (s->len[t][i] < minLen) minLen = s->len[t][i];
- }
- AssertH ( !(maxLen > 20), 3004 );
- AssertH ( !(minLen < 1), 3005 );
- BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]),
- minLen, maxLen, alphaSize );
- }
-
- /*--- Transmit the mapping table. ---*/
- {
- Bool inUse16[16];
- for (i = 0; i < 16; i++) {
- inUse16[i] = False;
- for (j = 0; j < 16; j++)
- if (s->inUse[i * 16 + j]) inUse16[i] = True;
- }
-
- nBytes = s->numZ;
- for (i = 0; i < 16; i++)
- if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);
-
- for (i = 0; i < 16; i++)
- if (inUse16[i])
- for (j = 0; j < 16; j++) {
- if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);
- }
-
- }
-
- /*--- Now the selectors. ---*/
- nBytes = s->numZ;
- bsW ( s, 3, nGroups );
- bsW ( s, 15, nSelectors );
- for (i = 0; i < nSelectors; i++) {
- for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1);
- bsW(s,1,0);
- }
-
- /*--- Now the coding tables. ---*/
- nBytes = s->numZ;
-
- for (t = 0; t < nGroups; t++) {
- Int32 curr = s->len[t][0];
- bsW ( s, 5, curr );
- for (i = 0; i < alphaSize; i++) {
- while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };
- while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };
- bsW ( s, 1, 0 );
- }
- }
-
-
- /*--- And finally, the block data proper ---*/
- nBytes = s->numZ;
- selCtr = 0;
- gs = 0;
- while (True) {
- if (gs >= s->nMTF) break;
- ge = gs + BZ_G_SIZE - 1;
- if (ge >= s->nMTF) ge = s->nMTF-1;
- AssertH ( s->selector[selCtr] < nGroups, 3006 );
-
- if (nGroups == 6 && 50 == ge-gs+1) {
- /*--- fast track the common case ---*/
- UInt16 mtfv_i;
- UChar* s_len_sel_selCtr
- = &(s->len[s->selector[selCtr]][0]);
- Int32* s_code_sel_selCtr
- = &(s->code[s->selector[selCtr]][0]);
-
-# define BZ_ITAH(nn) \
- mtfv_i = mtfv[gs+(nn)]; \
- bsW ( s, \
- s_len_sel_selCtr[mtfv_i], \
- s_code_sel_selCtr[mtfv_i] )
-
- BZ_ITAH(0); BZ_ITAH(1); BZ_ITAH(2); BZ_ITAH(3); BZ_ITAH(4);
- BZ_ITAH(5); BZ_ITAH(6); BZ_ITAH(7); BZ_ITAH(8); BZ_ITAH(9);
- BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14);
- BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19);
- BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24);
- BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29);
- BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34);
- BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39);
- BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44);
- BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49);
-
-# undef BZ_ITAH
-
- } else {
- /*--- slow version which correctly handles all situations ---*/
- for (i = gs; i <= ge; i++) {
- bsW ( s,
- s->len [s->selector[selCtr]] [mtfv[i]],
- s->code [s->selector[selCtr]] [mtfv[i]] );
- }
- }
-
-
- gs = ge+1;
- selCtr++;
- }
- AssertH( selCtr == nSelectors, 3007 );
-
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_compressBlock ( EState* s, Bool is_last_block )
-{
- if (s->nblock > 0) {
-
- if (s->blockNo > 1) s->numZ = 0;
-
-
- BZ2_blockSort ( s );
- }
-
- s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
-
- /*-- If this is the first block, create the stream header. --*/
- if (s->blockNo == 1) {
- BZ2_bsInitWrite ( s );
- }
-
- if (s->nblock > 0) {
-
- bsPutUChar ( s, 0x31 );
-
- bsW ( s, 24, s->origPtr );
- generateMTFValues ( s );
- sendMTFValues ( s );
- }
-
-
- /*-- If this is the last block, add the stream trailer. --*/
- if (is_last_block) {
-
- bsPutUChar ( s, 0x17 );
- bsFinishWrite ( s );
- }
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end compress.c ---*/
-/*-------------------------------------------------------------*/
+/*
+ * This file is a part of the bzip2 compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.bzip.org/
+ *
+ * This modification is not compatible with the original bzip2.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/*-------------------------------------------------------------*/
+/*--- Compression machinery (not incl block sorting) ---*/
+/*--- compress.c ---*/
+/*-------------------------------------------------------------*/
+
+/*--
+ This file is a part of bzip2 and/or libbzip2, a program and
+ library for lossless, block-sorting data compression.
+
+ Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Julian Seward, Cambridge, UK.
+ jseward@acm.org
+ bzip2/libbzip2 version 1.0 of 21 March 2000
+
+ This program is based on (at least) the work of:
+ Mike Burrows
+ David Wheeler
+ Peter Fenwick
+ Alistair Moffat
+ Radford Neal
+ Ian H. Witten
+ Robert Sedgewick
+ Jon L. Bentley
+
+ For more information on these sources, see the manual.
+--*/
+
+/*--
+ CHANGES
+ ~~~~~~~
+ 0.9.0 -- original version.
+
+ 0.9.0a/b -- no changes in this file.
+
+ 0.9.0c
+ * changed setting of nGroups in sendMTFValues() so as to
+ do a bit better on small files
+--*/
+
+#include "bzlib.h"
+
+
+/*---------------------------------------------------*/
+/*--- Bit stream I/O ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+void BZ2_bsInitWrite ( EState* s )
+{
+ s->bsLive = 0;
+ s->bsBuff = 0;
+}
+
+
+/*---------------------------------------------------*/
+static
+void bsFinishWrite ( EState* s )
+{
+ while (s->bsLive > 0) {
+ s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24);
+ s->numZ++;
+ s->bsBuff <<= 8;
+ s->bsLive -= 8;
+ }
+}
+
+
+/*---------------------------------------------------*/
+#define bsNEEDW(nz) \
+{ \
+ while (s->bsLive >= 8) { \
+ s->zbits[s->numZ] \
+ = (UChar)(s->bsBuff >> 24); \
+ s->numZ++; \
+ s->bsBuff <<= 8; \
+ s->bsLive -= 8; \
+ } \
+}
+
+
+/*---------------------------------------------------*/
+static void bsW ( EState* s, Int32 n, UInt32 v )
+{
+ bsNEEDW ( n );
+ s->bsBuff |= (v << (32 - s->bsLive - n));
+ s->bsLive += n;
+}
+
+
+/*---------------------------------------------------*/
+/*static
+void bsPutUInt32 ( EState* s, UInt32 u )
+{
+ bsW ( s, 8, (u >> 24) & 0xffL );
+ bsW ( s, 8, (u >> 16) & 0xffL );
+ bsW ( s, 8, (u >> 8) & 0xffL );
+ bsW ( s, 8, u & 0xffL );
+}*/
+
+
+/*---------------------------------------------------*/
+static
+void bsPutUChar ( EState* s, UChar c )
+{
+ bsW( s, 8, (UInt32)c );
+}
+
+
+/*---------------------------------------------------*/
+/*--- The back end proper ---*/
+/*---------------------------------------------------*/
+
+/*---------------------------------------------------*/
+static
+void makeMaps_e ( EState* s )
+{
+ Int32 i;
+ s->nInUse = 0;
+ for (i = 0; i < 256; i++)
+ if (s->inUse[i]) {
+ s->unseqToSeq[i] = s->nInUse;
+ s->nInUse++;
+ }
+}
+
+
+/*---------------------------------------------------*/
+static
+void generateMTFValues ( EState* s )
+{
+ UChar yy[256];
+ Int32 i, j;
+ Int32 zPend;
+ Int32 wr;
+ Int32 EOB;
+
+ /*
+ After sorting (eg, here),
+ s->arr1 [ 0 .. s->nblock-1 ] holds sorted order,
+ and
+ ((UChar*)s->arr2) [ 0 .. s->nblock-1 ]
+ holds the original block data.
+
+ The first thing to do is generate the MTF values,
+ and put them in
+ ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ].
+ Because there are strictly fewer or equal MTF values
+ than block values, ptr values in this area are overwritten
+ with MTF values only when they are no longer needed.
+
+ The final compressed bitstream is generated into the
+ area starting at
+ (UChar*) (&((UChar*)s->arr2)[s->nblock])
+
+ These storage aliases are set up in bzCompressInit(),
+ except for the last one, which is arranged in
+ compressBlock().
+ */
+ UInt32* ptr = s->ptr;
+ UChar* block = s->block;
+ UInt16* mtfv = s->mtfv;
+
+ makeMaps_e ( s );
+ EOB = s->nInUse+1;
+
+ for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0;
+
+ wr = 0;
+ zPend = 0;
+ for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
+
+ for (i = 0; i < s->nblock; i++) {
+ UChar ll_i;
+ AssertD ( wr <= i, "generateMTFValues(1)" );
+ j = ptr[i]-1; if (j < 0) j += s->nblock;
+ ll_i = s->unseqToSeq[block[j]];
+ AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" );
+
+ if (yy[0] == ll_i) {
+ zPend++;
+ } else {
+
+ if (zPend > 0) {
+ zPend--;
+ while (True) {
+ if (zPend & 1) {
+ mtfv[wr] = BZ_RUNB; wr++;
+ s->mtfFreq[BZ_RUNB]++;
+ } else {
+ mtfv[wr] = BZ_RUNA; wr++;
+ s->mtfFreq[BZ_RUNA]++;
+ }
+ if (zPend < 2) break;
+ zPend = (zPend - 2) / 2;
+ };
+ zPend = 0;
+ }
+ {
+ register UChar rtmp;
+ register UChar* ryy_j;
+ register UChar rll_i;
+ rtmp = yy[1];
+ yy[1] = yy[0];
+ ryy_j = &(yy[1]);
+ rll_i = ll_i;
+ while ( rll_i != rtmp ) {
+ register UChar rtmp2;
+ ryy_j++;
+ rtmp2 = rtmp;
+ rtmp = *ryy_j;
+ *ryy_j = rtmp2;
+ };
+ yy[0] = rtmp;
+ j = ryy_j - &(yy[0]);
+ mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++;
+ }
+
+ }
+ }
+
+ if (zPend > 0) {
+ zPend--;
+ while (True) {
+ if (zPend & 1) {
+ mtfv[wr] = BZ_RUNB; wr++;
+ s->mtfFreq[BZ_RUNB]++;
+ } else {
+ mtfv[wr] = BZ_RUNA; wr++;
+ s->mtfFreq[BZ_RUNA]++;
+ }
+ if (zPend < 2) break;
+ zPend = (zPend - 2) / 2;
+ };
+ zPend = 0;
+ }
+
+ mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
+
+ s->nMTF = wr;
+}
+
+
+/*---------------------------------------------------*/
+#define BZ_LESSER_ICOST 0
+#define BZ_GREATER_ICOST 15
+
+static
+void sendMTFValues ( EState* s )
+{
+ Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;
+ Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;
+ Int32 nGroups, nBytes;
+
+ /*--
+ UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ is a global since the decoder also needs it.
+
+ Int32 code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ Int32 rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ are also globals only used in this proc.
+ Made global to keep stack frame size small.
+ --*/
+
+
+ UInt16 cost[BZ_N_GROUPS];
+ Int32 fave[BZ_N_GROUPS];
+
+ UInt16* mtfv = s->mtfv;
+
+
+ alphaSize = s->nInUse+2;
+ for (t = 0; t < BZ_N_GROUPS; t++)
+ for (v = 0; v < alphaSize; v++)
+ s->len[t][v] = BZ_GREATER_ICOST;
+
+ /*--- Decide how many coding tables to use ---*/
+ AssertH ( s->nMTF > 0, 3001 );
+ if (s->nMTF < 200) nGroups = 2; else
+ if (s->nMTF < 600) nGroups = 3; else
+ if (s->nMTF < 1200) nGroups = 4; else
+ if (s->nMTF < 2400) nGroups = 5; else
+ nGroups = 6;
+
+ /*--- Generate an initial set of coding tables ---*/
+ {
+ Int32 nPart, remF, tFreq, aFreq;
+
+ nPart = nGroups;
+ remF = s->nMTF;
+ gs = 0;
+ while (nPart > 0) {
+ tFreq = remF / nPart;
+ ge = gs-1;
+ aFreq = 0;
+ while (aFreq < tFreq && ge < alphaSize-1) {
+ ge++;
+ aFreq += s->mtfFreq[ge];
+ }
+
+ if (ge > gs
+ && nPart != nGroups && nPart != 1
+ && ((nGroups-nPart) % 2 == 1)) {
+ aFreq -= s->mtfFreq[ge];
+ ge--;
+ }
+
+ for (v = 0; v < alphaSize; v++)
+ if (v >= gs && v <= ge)
+ s->len[nPart-1][v] = BZ_LESSER_ICOST; else
+ s->len[nPart-1][v] = BZ_GREATER_ICOST;
+
+ nPart--;
+ gs = ge+1;
+ remF -= aFreq;
+ }
+ }
+
+ /*---
+ Iterate up to BZ_N_ITERS times to improve the tables.
+ ---*/
+ for (iter = 0; iter < BZ_N_ITERS; iter++) {
+
+ for (t = 0; t < nGroups; t++) fave[t] = 0;
+
+ for (t = 0; t < nGroups; t++)
+ for (v = 0; v < alphaSize; v++)
+ s->rfreq[t][v] = 0;
+
+ /*---
+ Set up an auxiliary length table which is used to fast-track
+ the common case (nGroups == 6).
+ ---*/
+ if (nGroups == 6) {
+ for (v = 0; v < alphaSize; v++) {
+ s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
+ s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
+ s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
+ }
+ }
+
+ nSelectors = 0;
+ totc = 0;
+ gs = 0;
+ while (True) {
+
+ /*--- Set group start & end marks. --*/
+ if (gs >= s->nMTF) break;
+ ge = gs + BZ_G_SIZE - 1;
+ if (ge >= s->nMTF) ge = s->nMTF-1;
+
+ /*--
+ Calculate the cost of this group as coded
+ by each of the coding tables.
+ --*/
+ for (t = 0; t < nGroups; t++) cost[t] = 0;
+
+ if (nGroups == 6 && 50 == ge-gs+1) {
+ /*--- fast track the common case ---*/
+ register UInt32 cost01, cost23, cost45;
+ register UInt16 icv;
+ cost01 = cost23 = cost45 = 0;
+
+# define BZ_ITER(nn) \
+ icv = mtfv[gs+(nn)]; \
+ cost01 += s->len_pack[icv][0]; \
+ cost23 += s->len_pack[icv][1]; \
+ cost45 += s->len_pack[icv][2]; \
+
+ BZ_ITER(0); BZ_ITER(1); BZ_ITER(2); BZ_ITER(3); BZ_ITER(4);
+ BZ_ITER(5); BZ_ITER(6); BZ_ITER(7); BZ_ITER(8); BZ_ITER(9);
+ BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14);
+ BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19);
+ BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24);
+ BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29);
+ BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34);
+ BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39);
+ BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44);
+ BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49);
+
+# undef BZ_ITER
+
+ cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16;
+ cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16;
+ cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
+
+ } else {
+ /*--- slow version which correctly handles all situations ---*/
+ for (i = gs; i <= ge; i++) {
+ UInt16 icv = mtfv[i];
+ for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
+ }
+ }
+
+ /*--
+ Find the coding table which is best for this group,
+ and record its identity in the selector table.
+ --*/
+ bc = 999999999; bt = -1;
+ for (t = 0; t < nGroups; t++)
+ if (cost[t] < bc) { bc = cost[t]; bt = t; };
+ totc += bc;
+ fave[bt]++;
+ s->selector[nSelectors] = bt;
+ nSelectors++;
+
+ /*--
+ Increment the symbol frequencies for the selected table.
+ --*/
+ if (nGroups == 6 && 50 == ge-gs+1) {
+ /*--- fast track the common case ---*/
+
+# define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++
+
+ BZ_ITUR(0); BZ_ITUR(1); BZ_ITUR(2); BZ_ITUR(3); BZ_ITUR(4);
+ BZ_ITUR(5); BZ_ITUR(6); BZ_ITUR(7); BZ_ITUR(8); BZ_ITUR(9);
+ BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14);
+ BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19);
+ BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24);
+ BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29);
+ BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34);
+ BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39);
+ BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44);
+ BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49);
+
+# undef BZ_ITUR
+
+ } else {
+ /*--- slow version which correctly handles all situations ---*/
+ for (i = gs; i <= ge; i++)
+ s->rfreq[bt][ mtfv[i] ]++;
+ }
+
+ gs = ge+1;
+ }
+
+ /*--
+ Recompute the tables based on the accumulated frequencies.
+ --*/
+ for (t = 0; t < nGroups; t++)
+ BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]),
+ alphaSize, 20 );
+ }
+
+
+ AssertH( nGroups < 8, 3002 );
+ AssertH( nSelectors < 32768 &&
+ nSelectors <= (2 + (NSIS_COMPRESS_BZIP2_LEVEL * 100000 / BZ_G_SIZE)),
+ 3003 );
+
+
+ /*--- Compute MTF values for the selectors. ---*/
+ {
+ UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;
+ for (i = 0; i < nGroups; i++) pos[i] = i;
+ for (i = 0; i < nSelectors; i++) {
+ ll_i = s->selector[i];
+ j = 0;
+ tmp = pos[j];
+ while ( ll_i != tmp ) {
+ j++;
+ tmp2 = tmp;
+ tmp = pos[j];
+ pos[j] = tmp2;
+ };
+ pos[0] = tmp;
+ s->selectorMtf[i] = j;
+ }
+ };
+
+ /*--- Assign actual codes for the tables. --*/
+ for (t = 0; t < nGroups; t++) {
+ minLen = 32;
+ maxLen = 0;
+ for (i = 0; i < alphaSize; i++) {
+ if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
+ if (s->len[t][i] < minLen) minLen = s->len[t][i];
+ }
+ AssertH ( !(maxLen > 20), 3004 );
+ AssertH ( !(minLen < 1), 3005 );
+ BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]),
+ minLen, maxLen, alphaSize );
+ }
+
+ /*--- Transmit the mapping table. ---*/
+ {
+ Bool inUse16[16];
+ for (i = 0; i < 16; i++) {
+ inUse16[i] = False;
+ for (j = 0; j < 16; j++)
+ if (s->inUse[i * 16 + j]) inUse16[i] = True;
+ }
+
+ nBytes = s->numZ;
+ for (i = 0; i < 16; i++)
+ if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);
+
+ for (i = 0; i < 16; i++)
+ if (inUse16[i])
+ for (j = 0; j < 16; j++) {
+ if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);
+ }
+
+ }
+
+ /*--- Now the selectors. ---*/
+ nBytes = s->numZ;
+ bsW ( s, 3, nGroups );
+ bsW ( s, 15, nSelectors );
+ for (i = 0; i < nSelectors; i++) {
+ for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1);
+ bsW(s,1,0);
+ }
+
+ /*--- Now the coding tables. ---*/
+ nBytes = s->numZ;
+
+ for (t = 0; t < nGroups; t++) {
+ Int32 curr = s->len[t][0];
+ bsW ( s, 5, curr );
+ for (i = 0; i < alphaSize; i++) {
+ while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };
+ while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };
+ bsW ( s, 1, 0 );
+ }
+ }
+
+
+ /*--- And finally, the block data proper ---*/
+ nBytes = s->numZ;
+ selCtr = 0;
+ gs = 0;
+ while (True) {
+ if (gs >= s->nMTF) break;
+ ge = gs + BZ_G_SIZE - 1;
+ if (ge >= s->nMTF) ge = s->nMTF-1;
+ AssertH ( s->selector[selCtr] < nGroups, 3006 );
+
+ if (nGroups == 6 && 50 == ge-gs+1) {
+ /*--- fast track the common case ---*/
+ UInt16 mtfv_i;
+ UChar* s_len_sel_selCtr
+ = &(s->len[s->selector[selCtr]][0]);
+ Int32* s_code_sel_selCtr
+ = &(s->code[s->selector[selCtr]][0]);
+
+# define BZ_ITAH(nn) \
+ mtfv_i = mtfv[gs+(nn)]; \
+ bsW ( s, \
+ s_len_sel_selCtr[mtfv_i], \
+ s_code_sel_selCtr[mtfv_i] )
+
+ BZ_ITAH(0); BZ_ITAH(1); BZ_ITAH(2); BZ_ITAH(3); BZ_ITAH(4);
+ BZ_ITAH(5); BZ_ITAH(6); BZ_ITAH(7); BZ_ITAH(8); BZ_ITAH(9);
+ BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14);
+ BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19);
+ BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24);
+ BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29);
+ BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34);
+ BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39);
+ BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44);
+ BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49);
+
+# undef BZ_ITAH
+
+ } else {
+ /*--- slow version which correctly handles all situations ---*/
+ for (i = gs; i <= ge; i++) {
+ bsW ( s,
+ s->len [s->selector[selCtr]] [mtfv[i]],
+ s->code [s->selector[selCtr]] [mtfv[i]] );
+ }
+ }
+
+
+ gs = ge+1;
+ selCtr++;
+ }
+ AssertH( selCtr == nSelectors, 3007 );
+
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_compressBlock ( EState* s, Bool is_last_block )
+{
+ if (s->nblock > 0) {
+
+ if (s->blockNo > 1) s->numZ = 0;
+
+
+ BZ2_blockSort ( s );
+ }
+
+ s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
+
+ /*-- If this is the first block, create the stream header. --*/
+ if (s->blockNo == 1) {
+ BZ2_bsInitWrite ( s );
+ }
+
+ if (s->nblock > 0) {
+
+ bsPutUChar ( s, 0x31 );
+
+ bsW ( s, 24, s->origPtr );
+ generateMTFValues ( s );
+ sendMTFValues ( s );
+ }
+
+
+ /*-- If this is the last block, add the stream trailer. --*/
+ if (is_last_block) {
+
+ bsPutUChar ( s, 0x17 );
+ bsFinishWrite ( s );
+ }
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end compress.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/Source/bzip2/decompress.c b/Source/bzip2/decompress.c
index 675c186..bf00a67 100755
--- a/Source/bzip2/decompress.c
+++ b/Source/bzip2/decompress.c
@@ -1,534 +1,534 @@
-/*
- * This file is a part of the bzip2 compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.bzip.org/
- *
- * This modification is not compatible with the original bzip2.
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-#include "bzlib.h"
-
-/*-------------------------------------------------------------*/
-/*--- Decompression machinery ---*/
-/*--- decompress.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- jseward@acm.org
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-
-/*---------------------------------------------------*/
-#define RETURN(rrr) \
- { retVal = rrr; goto save_state_and_return; };
-
-
-static int NSISCALL __mygetbits(int *vtmp, int nnn, DState* s)
-{
- for (;;) {
- if (s->bsLive >= nnn) {
- UInt32 v;
- v = (s->bsBuff >>
- (s->bsLive-nnn)) & ((1 << nnn)-1);
- s->bsLive -= nnn;
- *vtmp = v;
- return 0;
- }
- if (s->avail_in == 0) return 1;
- s->bsBuff = (s->bsBuff << 8) | ((UInt32) (*((UChar*)(s->next_in))));
- s->bsLive += 8;
- s->next_in++;
- s->avail_in--;
- }
-}
-
-#define GET_BITS(lll,vvv,nnn) \
- case lll: s->state = lll; \
- if (__mygetbits(&vvv,nnn,s)) RETURN(BZ_OK)
-
-#define GET_UCHAR(lll,uuu) \
- GET_BITS(lll,uuu,8)
-
-#define GET_BIT(lll,uuu) \
- GET_BITS(lll,uuu,1)
-
-static int NSISCALL getmtf1(DState_save *sv,DState* s)
-{
- if (sv->groupPos == 0) {
- sv->groupNo++;
- if (sv->groupNo >= sv->nSelectors) return 1;
- sv->groupPos = BZ_G_SIZE;
- sv->gSel = s->selector[sv->groupNo];
- sv->gMinlen = s->minLens[sv->gSel];
- sv->gLimit = &(s->limit[sv->gSel][0]);
- sv->gPerm = &(s->perm[sv->gSel][0]);
- sv->gBase = &(s->base[sv->gSel][0]);
- }
- sv->groupPos--;
- sv->zn = sv->gMinlen;
- return 0;
-}
-
-/*---------------------------------------------------*/
-#define GET_MTF_VAL(label1,label2,lval) \
-{ \
- if (getmtf1(&sv,s)) RETURN(BZ_DATA_ERROR); \
- GET_BITS(label1, zvec, zn); \
- for (;;) { \
- if (zn > 20 /* the longest code */) RETURN(BZ_DATA_ERROR); \
- if (zvec <= gLimit[zn]) break; \
- zn++; \
- GET_BIT(label2, zj); \
- zvec = (zvec << 1) | zj; \
- }; \
- if (zvec - gBase[zn] < 0 \
- || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \
- RETURN(BZ_DATA_ERROR); \
- lval = gPerm[zvec - gBase[zn]]; \
-}
-
-
-/*---------------------------------------------------*/
-Int32 NSISCALL BZ2_decompress ( DState* s )
-{
- Int32 uc;
- Int32 retVal;
- Int32 minLen, maxLen;
-
- /* stuff that needs to be saved/restored */
- DState_save sv;
-
- /*restore from the save area*/
- sv=s->save;//mini_memcpy(&sv, &(s->save), sizeof(sv));
-
- #define i (sv.i)
- #define j (sv.j)
- #define t (sv.t)
- #define alphaSize (sv.alphaSize)
- #define nGroups (sv.nGroups)
- #define nSelectors (sv.nSelectors)
- #define EOB (sv.EOB)
- #define groupNo (sv.groupNo)
- #define groupPos (sv.groupPos)
- #define nextSym (sv.nextSym)
- #define nblockMAX (sv.nblockMAX)
- #define nblock (sv.nblock)
- #define es (sv.es)
- #define N (sv.N)
- #define curr (sv.curr)
- #define zt (sv.zt)
- #define zn (sv.zn)
- #define zvec (sv.zvec)
- #define zj (sv.zj)
- #define gSel (sv.gSel)
- #define gMinlen (sv.gMinlen)
- #define gLimit (sv.gLimit)
- #define gBase (sv.gBase)
- #define gPerm (sv.gPerm)
-
- retVal = BZ_OK;
-
- switch (s->state) {
-
-
- GET_UCHAR(BZ_X_BLKHDR_1, uc);
-
- if (uc == 0x17)
- {
- s->state = BZ_X_IDLE;
- RETURN(BZ_STREAM_END);
- }
- if (uc != 0x31) RETURN(BZ_DATA_ERROR);
-
- s->origPtr = 0;
- GET_UCHAR(BZ_X_ORIGPTR_1, uc);
- s->origPtr = (s->origPtr << 8) | ((Int32)uc);
- GET_UCHAR(BZ_X_ORIGPTR_2, uc);
- s->origPtr = (s->origPtr << 8) | ((Int32)uc);
- GET_UCHAR(BZ_X_ORIGPTR_3, uc);
- s->origPtr = (s->origPtr << 8) | ((Int32)uc);
-
- if (s->origPtr < 0)
- RETURN(BZ_DATA_ERROR);
- if (s->origPtr > 10 + NSIS_COMPRESS_BZIP2_LEVEL*100000)
- RETURN(BZ_DATA_ERROR);
-
- /*--- Receive the mapping table ---*/
- for (i = 0; i < 16; i++) {
- GET_BIT(BZ_X_MAPPING_1, uc);
- if (uc == 1)
- s->inUse16[i] = True; else
- s->inUse16[i] = False;
- }
-
- for (i = 0; i < 256; i++) s->inUse[i] = False;
-
- for (i = 0; i < 16; i++)
- if (s->inUse16[i])
- for (j = 0; j < 16; j++) {
- GET_BIT(BZ_X_MAPPING_2, uc);
- if (uc == 1) s->inUse[i * 16 + j] = True;
- }
- {
- Int32 qi;
- s->nInUse = 0;
- for (qi = 0; qi < 256; qi++)
- if (s->inUse[qi])
- s->seqToUnseq[s->nInUse++] = qi;
- }
-
- if (s->nInUse == 0) RETURN(BZ_DATA_ERROR);
- alphaSize = s->nInUse+2;
-
- /*--- Now the selectors ---*/
- GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
- if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
- GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
- if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
- for (i = 0; i < nSelectors; i++) {
- j = 0;
- while (True) {
- GET_BIT(BZ_X_SELECTOR_3, uc);
- if (uc == 0) break;
- j++;
- if (j >= nGroups) RETURN(BZ_DATA_ERROR);
- }
- s->selectorMtf[i] = j;
- }
-
- /*--- Undo the MTF values for the selectors. ---*/
- {
- UChar pos[BZ_N_GROUPS], tmp, v;
- for (v = 0; v < nGroups; v++) pos[v] = v;
-
- for (i = 0; i < nSelectors; i++) {
- v = s->selectorMtf[i];
- tmp = pos[v];
- while (v > 0) { pos[v] = pos[v-1]; v--; }
- pos[0] = tmp;
- s->selector[i] = tmp;
- }
- }
-
- /*--- Now the coding tables ---*/
- for (t = 0; t < nGroups; t++) {
- GET_BITS(BZ_X_CODING_1, curr, 5);
- for (i = 0; i < alphaSize; i++) {
- while (True) {
- if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR);
- GET_BIT(BZ_X_CODING_2, uc);
- if (uc == 0) break;
- GET_BIT(BZ_X_CODING_3, uc);
- if (uc == 0) curr++; else curr--;
- }
- s->len[t][i] = curr;
- }
- }
-
- /*--- Create the Huffman decoding tables ---*/
- for (t = 0; t < nGroups; t++) {
- minLen = 32;
- maxLen = 0;
- for (i = 0; i < alphaSize; i++) {
- if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
- if (s->len[t][i] < minLen) minLen = s->len[t][i];
- }
- BZ2_hbCreateDecodeTables (
- &(s->limit[t][0]),
- &(s->base[t][0]),
- &(s->perm[t][0]),
- &(s->len[t][0]),
- minLen, maxLen, alphaSize
- );
- s->minLens[t] = minLen;
- }
-
- /*--- Now the MTF values ---*/
-
- EOB = s->nInUse+1;
- nblockMAX = NSIS_COMPRESS_BZIP2_LEVEL*100000;
- groupNo = -1;
- groupPos = 0;
-
- for (i = 0; i <= 255; i++) s->unzftab[i] = 0;
-
- /*-- MTF init --*/
- {
- Int32 ii, jj, kk = MTFA_SIZE-1;
- for (ii = 256 / MTFL_SIZE - 1; ii >= 0; ii--) {
- for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
- s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj);
- kk--;
- }
- s->mtfbase[ii] = kk + 1;
- }
- }
- /*-- end MTF init --*/
-
- nblock = 0;
- GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym);
-
- while (True) {
-
- if (nextSym == EOB) break;
-
- if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) {
-
- es = -1;
- N = 1;
- while (nextSym == BZ_RUNA || nextSym == BZ_RUNB)
- {
- if (nextSym == BZ_RUNA) es += N;
- N = N << 1;
- if (nextSym == BZ_RUNB) es += N;
- GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym);
- }
-
- es++;
- uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ];
- s->unzftab[uc] += es;
-
-#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
- while (es > 0) {
- if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
- s->ll16[nblock] = (UInt16)uc;
- nblock++;
- es--;
- }
-#else
- while (es > 0) {
- if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
- s->tt[nblock] = (UInt32)uc;
- nblock++;
- es--;
- }
-#endif
- continue;
-
- } else {
-
- if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
-
- /*-- uc = MTF ( nextSym-1 ) --*/
- {
- Int32 ii, jj, kk, pp, lno, off;
- UInt32 nn;
- nn = (UInt32)(nextSym - 1);
-
- if (nn < MTFL_SIZE) {
- /* avoid general-case expense */
- pp = s->mtfbase[0];
- uc = s->mtfa[pp+nn];
- /*while (nn > 3) {
- Int32 z = pp+nn;
- s->mtfa[(z) ] = s->mtfa[(z)-1];
- s->mtfa[(z)-1] = s->mtfa[(z)-2];
- s->mtfa[(z)-2] = s->mtfa[(z)-3];
- s->mtfa[(z)-3] = s->mtfa[(z)-4];
- nn -= 4;
- }
- */
- while (nn > 0) {
- s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--;
- };
- s->mtfa[pp] = uc;
- } else {
- /* general case */
- lno = nn / MTFL_SIZE;
- off = nn % MTFL_SIZE;
- pp = s->mtfbase[lno] + off;
- uc = s->mtfa[pp];
- while (pp > s->mtfbase[lno]) {
- s->mtfa[pp] = s->mtfa[pp-1]; pp--;
- };
- s->mtfbase[lno]++;
- while (lno > 0) {
- s->mtfbase[lno]--;
- s->mtfa[s->mtfbase[lno]]
- = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1];
- lno--;
- }
- s->mtfbase[0]--;
- s->mtfa[s->mtfbase[0]] = uc;
- if (s->mtfbase[0] == 0) {
- kk = MTFA_SIZE-1;
- for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) {
- for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
- s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj];
- kk--;
- }
- s->mtfbase[ii] = kk + 1;
- }
- }
- }
- }
- /*-- end uc = MTF ( nextSym-1 ) --*/
-
- s->unzftab[s->seqToUnseq[uc]]++;
-#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
- s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]);
-#else
- s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]);
-#endif
- nblock++;
-
- GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);
- continue;
- }
- }
-
- /* Now we know what nblock is, we can do a better sanity
- check on s->origPtr.
- */
- if (s->origPtr < 0 || s->origPtr >= nblock)
- RETURN(BZ_DATA_ERROR);
-
- s->state_out_len = 0;
- s->state_out_ch = 0;
- s->state = BZ_X_OUTPUT;
-
- /*-- Set up cftab to facilitate generation of T^(-1) --*/
- s->cftab[0] = 0;
- for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]+s->cftab[i-1];
-// for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
-
-#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
- {
- /*-- Make a copy of cftab, used in generation of T --*/
- for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i];
-
- /*-- compute the T vector --*/
- for (i = 0; i < nblock; i++) {
- uc = (UChar)(s->ll16[i]);
- SET_LL(i, s->cftabCopy[uc]);
- s->cftabCopy[uc]++;
- }
-
- /*-- Compute T^(-1) by pointer reversal on T --*/
- i = s->origPtr;
- j = GET_LL(i);
- do {
- Int32 tmp = GET_LL(j);
- SET_LL(j, i);
- i = j;
- j = tmp;
- }
- while (i != s->origPtr);
-
- s->tPos = s->origPtr;
- s->nblock_used = 0;
- BZ_GET_SMALL(s->k0); s->nblock_used++;
- }
-#else//!small
-
- /*-- compute the T^(-1) vector --*/
- for (i = 0; i < nblock; i++) {
- uc = (UChar)(s->tt[i] & 0xff);
- s->tt[s->cftab[uc]] |= (i << 8);
- s->cftab[uc]++;
- }
-
- s->tPos = s->tt[s->origPtr] >> 8;
- s->nblock_used = 0;
- BZ_GET_FAST(s->k0); s->nblock_used++;
-#endif
- RETURN(BZ_OK);
-
- default: AssertH ( False, 4001 );
- }
-
- AssertH ( False, 4002 );
-
- save_state_and_return:
-
- s->save=sv; //mini_memcpy(&(s->save), &sv, sizeof(sv));
-
- #undef i
- #undef j
- #undef t
- #undef alphaSize
- #undef nGroups
- #undef nSelectors
- #undef EOB
- #undef groupNo
- #undef groupPos
- #undef nextSym
- #undef nblockMAX
- #undef nblock
- #undef es
- #undef N
- #undef curr
- #undef zt
- #undef zn
- #undef zvec
- #undef zj
- #undef gSel
- #undef gMinlen
- #undef gLimit
- #undef gBase
- #undef gPerm
-
- return retVal;
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end decompress.c ---*/
-/*-------------------------------------------------------------*/
+/*
+ * This file is a part of the bzip2 compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.bzip.org/
+ *
+ * This modification is not compatible with the original bzip2.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+#include "bzlib.h"
+
+/*-------------------------------------------------------------*/
+/*--- Decompression machinery ---*/
+/*--- decompress.c ---*/
+/*-------------------------------------------------------------*/
+
+/*--
+ This file is a part of bzip2 and/or libbzip2, a program and
+ library for lossless, block-sorting data compression.
+
+ Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Julian Seward, Cambridge, UK.
+ jseward@acm.org
+ bzip2/libbzip2 version 1.0 of 21 March 2000
+
+ This program is based on (at least) the work of:
+ Mike Burrows
+ David Wheeler
+ Peter Fenwick
+ Alistair Moffat
+ Radford Neal
+ Ian H. Witten
+ Robert Sedgewick
+ Jon L. Bentley
+
+ For more information on these sources, see the manual.
+--*/
+
+
+/*---------------------------------------------------*/
+#define RETURN(rrr) \
+ { retVal = rrr; goto save_state_and_return; };
+
+
+static int NSISCALL __mygetbits(int *vtmp, int nnn, DState* s)
+{
+ for (;;) {
+ if (s->bsLive >= nnn) {
+ UInt32 v;
+ v = (s->bsBuff >>
+ (s->bsLive-nnn)) & ((1 << nnn)-1);
+ s->bsLive -= nnn;
+ *vtmp = v;
+ return 0;
+ }
+ if (s->avail_in == 0) return 1;
+ s->bsBuff = (s->bsBuff << 8) | ((UInt32) (*((UChar*)(s->next_in))));
+ s->bsLive += 8;
+ s->next_in++;
+ s->avail_in--;
+ }
+}
+
+#define GET_BITS(lll,vvv,nnn) \
+ case lll: s->state = lll; \
+ if (__mygetbits(&vvv,nnn,s)) RETURN(BZ_OK)
+
+#define GET_UCHAR(lll,uuu) \
+ GET_BITS(lll,uuu,8)
+
+#define GET_BIT(lll,uuu) \
+ GET_BITS(lll,uuu,1)
+
+static int NSISCALL getmtf1(DState_save *sv,DState* s)
+{
+ if (sv->groupPos == 0) {
+ sv->groupNo++;
+ if (sv->groupNo >= sv->nSelectors) return 1;
+ sv->groupPos = BZ_G_SIZE;
+ sv->gSel = s->selector[sv->groupNo];
+ sv->gMinlen = s->minLens[sv->gSel];
+ sv->gLimit = &(s->limit[sv->gSel][0]);
+ sv->gPerm = &(s->perm[sv->gSel][0]);
+ sv->gBase = &(s->base[sv->gSel][0]);
+ }
+ sv->groupPos--;
+ sv->zn = sv->gMinlen;
+ return 0;
+}
+
+/*---------------------------------------------------*/
+#define GET_MTF_VAL(label1,label2,lval) \
+{ \
+ if (getmtf1(&sv,s)) RETURN(BZ_DATA_ERROR); \
+ GET_BITS(label1, zvec, zn); \
+ for (;;) { \
+ if (zn > 20 /* the longest code */) RETURN(BZ_DATA_ERROR); \
+ if (zvec <= gLimit[zn]) break; \
+ zn++; \
+ GET_BIT(label2, zj); \
+ zvec = (zvec << 1) | zj; \
+ }; \
+ if (zvec - gBase[zn] < 0 \
+ || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \
+ RETURN(BZ_DATA_ERROR); \
+ lval = gPerm[zvec - gBase[zn]]; \
+}
+
+
+/*---------------------------------------------------*/
+Int32 NSISCALL BZ2_decompress ( DState* s )
+{
+ Int32 uc;
+ Int32 retVal;
+ Int32 minLen, maxLen;
+
+ /* stuff that needs to be saved/restored */
+ DState_save sv;
+
+ /*restore from the save area*/
+ sv=s->save;//mini_memcpy(&sv, &(s->save), sizeof(sv));
+
+ #define i (sv.i)
+ #define j (sv.j)
+ #define t (sv.t)
+ #define alphaSize (sv.alphaSize)
+ #define nGroups (sv.nGroups)
+ #define nSelectors (sv.nSelectors)
+ #define EOB (sv.EOB)
+ #define groupNo (sv.groupNo)
+ #define groupPos (sv.groupPos)
+ #define nextSym (sv.nextSym)
+ #define nblockMAX (sv.nblockMAX)
+ #define nblock (sv.nblock)
+ #define es (sv.es)
+ #define N (sv.N)
+ #define curr (sv.curr)
+ #define zt (sv.zt)
+ #define zn (sv.zn)
+ #define zvec (sv.zvec)
+ #define zj (sv.zj)
+ #define gSel (sv.gSel)
+ #define gMinlen (sv.gMinlen)
+ #define gLimit (sv.gLimit)
+ #define gBase (sv.gBase)
+ #define gPerm (sv.gPerm)
+
+ retVal = BZ_OK;
+
+ switch (s->state) {
+
+
+ GET_UCHAR(BZ_X_BLKHDR_1, uc);
+
+ if (uc == 0x17)
+ {
+ s->state = BZ_X_IDLE;
+ RETURN(BZ_STREAM_END);
+ }
+ if (uc != 0x31) RETURN(BZ_DATA_ERROR);
+
+ s->origPtr = 0;
+ GET_UCHAR(BZ_X_ORIGPTR_1, uc);
+ s->origPtr = (s->origPtr << 8) | ((Int32)uc);
+ GET_UCHAR(BZ_X_ORIGPTR_2, uc);
+ s->origPtr = (s->origPtr << 8) | ((Int32)uc);
+ GET_UCHAR(BZ_X_ORIGPTR_3, uc);
+ s->origPtr = (s->origPtr << 8) | ((Int32)uc);
+
+ if (s->origPtr < 0)
+ RETURN(BZ_DATA_ERROR);
+ if (s->origPtr > 10 + NSIS_COMPRESS_BZIP2_LEVEL*100000)
+ RETURN(BZ_DATA_ERROR);
+
+ /*--- Receive the mapping table ---*/
+ for (i = 0; i < 16; i++) {
+ GET_BIT(BZ_X_MAPPING_1, uc);
+ if (uc == 1)
+ s->inUse16[i] = True; else
+ s->inUse16[i] = False;
+ }
+
+ for (i = 0; i < 256; i++) s->inUse[i] = False;
+
+ for (i = 0; i < 16; i++)
+ if (s->inUse16[i])
+ for (j = 0; j < 16; j++) {
+ GET_BIT(BZ_X_MAPPING_2, uc);
+ if (uc == 1) s->inUse[i * 16 + j] = True;
+ }
+ {
+ Int32 qi;
+ s->nInUse = 0;
+ for (qi = 0; qi < 256; qi++)
+ if (s->inUse[qi])
+ s->seqToUnseq[s->nInUse++] = qi;
+ }
+
+ if (s->nInUse == 0) RETURN(BZ_DATA_ERROR);
+ alphaSize = s->nInUse+2;
+
+ /*--- Now the selectors ---*/
+ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
+ if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
+ GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
+ if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
+ for (i = 0; i < nSelectors; i++) {
+ j = 0;
+ while (True) {
+ GET_BIT(BZ_X_SELECTOR_3, uc);
+ if (uc == 0) break;
+ j++;
+ if (j >= nGroups) RETURN(BZ_DATA_ERROR);
+ }
+ s->selectorMtf[i] = j;
+ }
+
+ /*--- Undo the MTF values for the selectors. ---*/
+ {
+ UChar pos[BZ_N_GROUPS], tmp, v;
+ for (v = 0; v < nGroups; v++) pos[v] = v;
+
+ for (i = 0; i < nSelectors; i++) {
+ v = s->selectorMtf[i];
+ tmp = pos[v];
+ while (v > 0) { pos[v] = pos[v-1]; v--; }
+ pos[0] = tmp;
+ s->selector[i] = tmp;
+ }
+ }
+
+ /*--- Now the coding tables ---*/
+ for (t = 0; t < nGroups; t++) {
+ GET_BITS(BZ_X_CODING_1, curr, 5);
+ for (i = 0; i < alphaSize; i++) {
+ while (True) {
+ if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR);
+ GET_BIT(BZ_X_CODING_2, uc);
+ if (uc == 0) break;
+ GET_BIT(BZ_X_CODING_3, uc);
+ if (uc == 0) curr++; else curr--;
+ }
+ s->len[t][i] = curr;
+ }
+ }
+
+ /*--- Create the Huffman decoding tables ---*/
+ for (t = 0; t < nGroups; t++) {
+ minLen = 32;
+ maxLen = 0;
+ for (i = 0; i < alphaSize; i++) {
+ if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
+ if (s->len[t][i] < minLen) minLen = s->len[t][i];
+ }
+ BZ2_hbCreateDecodeTables (
+ &(s->limit[t][0]),
+ &(s->base[t][0]),
+ &(s->perm[t][0]),
+ &(s->len[t][0]),
+ minLen, maxLen, alphaSize
+ );
+ s->minLens[t] = minLen;
+ }
+
+ /*--- Now the MTF values ---*/
+
+ EOB = s->nInUse+1;
+ nblockMAX = NSIS_COMPRESS_BZIP2_LEVEL*100000;
+ groupNo = -1;
+ groupPos = 0;
+
+ for (i = 0; i <= 255; i++) s->unzftab[i] = 0;
+
+ /*-- MTF init --*/
+ {
+ Int32 ii, jj, kk = MTFA_SIZE-1;
+ for (ii = 256 / MTFL_SIZE - 1; ii >= 0; ii--) {
+ for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
+ s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj);
+ kk--;
+ }
+ s->mtfbase[ii] = kk + 1;
+ }
+ }
+ /*-- end MTF init --*/
+
+ nblock = 0;
+ GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym);
+
+ while (True) {
+
+ if (nextSym == EOB) break;
+
+ if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) {
+
+ es = -1;
+ N = 1;
+ while (nextSym == BZ_RUNA || nextSym == BZ_RUNB)
+ {
+ if (nextSym == BZ_RUNA) es += N;
+ N = N << 1;
+ if (nextSym == BZ_RUNB) es += N;
+ GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym);
+ }
+
+ es++;
+ uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ];
+ s->unzftab[uc] += es;
+
+#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
+ while (es > 0) {
+ if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+ s->ll16[nblock] = (UInt16)uc;
+ nblock++;
+ es--;
+ }
+#else
+ while (es > 0) {
+ if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+ s->tt[nblock] = (UInt32)uc;
+ nblock++;
+ es--;
+ }
+#endif
+ continue;
+
+ } else {
+
+ if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
+
+ /*-- uc = MTF ( nextSym-1 ) --*/
+ {
+ Int32 ii, jj, kk, pp, lno, off;
+ UInt32 nn;
+ nn = (UInt32)(nextSym - 1);
+
+ if (nn < MTFL_SIZE) {
+ /* avoid general-case expense */
+ pp = s->mtfbase[0];
+ uc = s->mtfa[pp+nn];
+ /*while (nn > 3) {
+ Int32 z = pp+nn;
+ s->mtfa[(z) ] = s->mtfa[(z)-1];
+ s->mtfa[(z)-1] = s->mtfa[(z)-2];
+ s->mtfa[(z)-2] = s->mtfa[(z)-3];
+ s->mtfa[(z)-3] = s->mtfa[(z)-4];
+ nn -= 4;
+ }
+ */
+ while (nn > 0) {
+ s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--;
+ };
+ s->mtfa[pp] = uc;
+ } else {
+ /* general case */
+ lno = nn / MTFL_SIZE;
+ off = nn % MTFL_SIZE;
+ pp = s->mtfbase[lno] + off;
+ uc = s->mtfa[pp];
+ while (pp > s->mtfbase[lno]) {
+ s->mtfa[pp] = s->mtfa[pp-1]; pp--;
+ };
+ s->mtfbase[lno]++;
+ while (lno > 0) {
+ s->mtfbase[lno]--;
+ s->mtfa[s->mtfbase[lno]]
+ = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1];
+ lno--;
+ }
+ s->mtfbase[0]--;
+ s->mtfa[s->mtfbase[0]] = uc;
+ if (s->mtfbase[0] == 0) {
+ kk = MTFA_SIZE-1;
+ for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) {
+ for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
+ s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj];
+ kk--;
+ }
+ s->mtfbase[ii] = kk + 1;
+ }
+ }
+ }
+ }
+ /*-- end uc = MTF ( nextSym-1 ) --*/
+
+ s->unzftab[s->seqToUnseq[uc]]++;
+#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
+ s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]);
+#else
+ s->tt[nblock] = (UInt32)(s->seqToUnseq[uc]);
+#endif
+ nblock++;
+
+ GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);
+ continue;
+ }
+ }
+
+ /* Now we know what nblock is, we can do a better sanity
+ check on s->origPtr.
+ */
+ if (s->origPtr < 0 || s->origPtr >= nblock)
+ RETURN(BZ_DATA_ERROR);
+
+ s->state_out_len = 0;
+ s->state_out_ch = 0;
+ s->state = BZ_X_OUTPUT;
+
+ /*-- Set up cftab to facilitate generation of T^(-1) --*/
+ s->cftab[0] = 0;
+ for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1]+s->cftab[i-1];
+// for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
+
+#ifdef NSIS_COMPRESS_BZIP2_SMALLMODE
+ {
+ /*-- Make a copy of cftab, used in generation of T --*/
+ for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i];
+
+ /*-- compute the T vector --*/
+ for (i = 0; i < nblock; i++) {
+ uc = (UChar)(s->ll16[i]);
+ SET_LL(i, s->cftabCopy[uc]);
+ s->cftabCopy[uc]++;
+ }
+
+ /*-- Compute T^(-1) by pointer reversal on T --*/
+ i = s->origPtr;
+ j = GET_LL(i);
+ do {
+ Int32 tmp = GET_LL(j);
+ SET_LL(j, i);
+ i = j;
+ j = tmp;
+ }
+ while (i != s->origPtr);
+
+ s->tPos = s->origPtr;
+ s->nblock_used = 0;
+ BZ_GET_SMALL(s->k0); s->nblock_used++;
+ }
+#else//!small
+
+ /*-- compute the T^(-1) vector --*/
+ for (i = 0; i < nblock; i++) {
+ uc = (UChar)(s->tt[i] & 0xff);
+ s->tt[s->cftab[uc]] |= (i << 8);
+ s->cftab[uc]++;
+ }
+
+ s->tPos = s->tt[s->origPtr] >> 8;
+ s->nblock_used = 0;
+ BZ_GET_FAST(s->k0); s->nblock_used++;
+#endif
+ RETURN(BZ_OK);
+
+ default: AssertH ( False, 4001 );
+ }
+
+ AssertH ( False, 4002 );
+
+ save_state_and_return:
+
+ s->save=sv; //mini_memcpy(&(s->save), &sv, sizeof(sv));
+
+ #undef i
+ #undef j
+ #undef t
+ #undef alphaSize
+ #undef nGroups
+ #undef nSelectors
+ #undef EOB
+ #undef groupNo
+ #undef groupPos
+ #undef nextSym
+ #undef nblockMAX
+ #undef nblock
+ #undef es
+ #undef N
+ #undef curr
+ #undef zt
+ #undef zn
+ #undef zvec
+ #undef zj
+ #undef gSel
+ #undef gMinlen
+ #undef gLimit
+ #undef gBase
+ #undef gPerm
+
+ return retVal;
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end decompress.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/Source/bzip2/huffman.c b/Source/bzip2/huffman.c
index d36ccb0..1273e60 100755
--- a/Source/bzip2/huffman.c
+++ b/Source/bzip2/huffman.c
@@ -1,244 +1,244 @@
-/*
- * This file is a part of the bzip2 compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.bzip.org/
- *
- * This modification is not compatible with the original bzip2.
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-#include "bzlib.h"
-
-/*-------------------------------------------------------------*/
-/*--- Huffman coding low-level stuff ---*/
-/*--- huffman.c ---*/
-/*-------------------------------------------------------------*/
-
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
-
- Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. 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.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- jseward@acm.org
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-#ifndef EXEHEAD
-/*---------------------------------------------------*/
-#define WEIGHTOF(zz0) ((zz0) & 0xffffff00)
-#define DEPTHOF(zz1) ((zz1) & 0x000000ff)
-#define MYMAX(zz2,zz3) ((zz2) > (zz3) ? (zz2) : (zz3))
-
-#define ADDWEIGHTS(zw1,zw2) \
- (WEIGHTOF(zw1)+WEIGHTOF(zw2)) | \
- (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2)))
-
-#define UPHEAP(z) \
-{ \
- Int32 zz, tmp; \
- zz = z; tmp = heap[zz]; \
- while (weight[tmp] < weight[heap[zz >> 1]]) { \
- heap[zz] = heap[zz >> 1]; \
- zz >>= 1; \
- } \
- heap[zz] = tmp; \
-}
-
-#define DOWNHEAP(z) \
-{ \
- Int32 zz, yy, tmp; \
- zz = z; tmp = heap[zz]; \
- while (True) { \
- yy = zz << 1; \
- if (yy > nHeap) break; \
- if (yy < nHeap && \
- weight[heap[yy+1]] < weight[heap[yy]]) \
- yy++; \
- if (weight[tmp] < weight[heap[yy]]) break; \
- heap[zz] = heap[yy]; \
- zz = yy; \
- } \
- heap[zz] = tmp; \
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_hbMakeCodeLengths ( UChar *len,
- Int32 *freq,
- Int32 alphaSize,
- Int32 maxLen )
-{
- /*--
- Nodes and heap entries run from 1. Entry 0
- for both the heap and nodes is a sentinel.
- --*/
- Int32 nNodes, nHeap, n1, n2, i, j, k;
- Bool tooLong;
-
- static Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ];
- static Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];
- static Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ];
-
- for (i = 0; i < alphaSize; i++)
- weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
-
- while (True) {
-
- nNodes = alphaSize;
- nHeap = 0;
-
- heap[0] = 0;
- weight[0] = 0;
- parent[0] = -2;
-
- for (i = 1; i <= alphaSize; i++) {
- parent[i] = -1;
- nHeap++;
- heap[nHeap] = i;
- UPHEAP(nHeap);
- }
-
- AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 );
-
- while (nHeap > 1) {
- n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
- n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
- nNodes++;
- parent[n1] = parent[n2] = nNodes;
- weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]);
- parent[nNodes] = -1;
- nHeap++;
- heap[nHeap] = nNodes;
- UPHEAP(nHeap);
- }
-
- AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 );
-
- tooLong = False;
- for (i = 1; i <= alphaSize; i++) {
- j = 0;
- k = i;
- while (parent[k] >= 0) { k = parent[k]; j++; }
- len[i-1] = j;
- if (j > maxLen) tooLong = True;
- }
-
- if (! tooLong) break;
-
- for (i = 1; i < alphaSize; i++) {
- j = weight[i] >> 8;
- j = 1 + (j / 2);
- weight[i] = j << 8;
- }
- }
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_hbAssignCodes ( Int32 *code,
- UChar *length,
- Int32 minLen,
- Int32 maxLen,
- Int32 alphaSize )
-{
- Int32 n, vec, i;
-
- vec = 0;
- for (n = minLen; n <= maxLen; n++) {
- for (i = 0; i < alphaSize; i++)
- if (length[i] == n) { code[i] = vec; vec++; };
- vec <<= 1;
- }
-}
-#endif
-
-
-/*---------------------------------------------------*/
-void NSISCALL
-BZ2_hbCreateDecodeTables ( Int32 *limit,
- Int32 *base,
- Int32 *perm,
- UChar *length,
- Int32 minLen,
- Int32 maxLen,
- Int32 alphaSize )
-{
- Int32 pp, i, j, vec;
-
- pp = 0;
- for (i = minLen; i <= maxLen; i++)
- for (j = 0; j < alphaSize; j++)
- if (length[j] == i) { perm[pp] = j; pp++; };
-
- for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0;
- for (i = 0; i < alphaSize; i++) base[length[i]+1]++;
-
- for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];
-
- for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0;
- vec = 0;
-
- for (i = minLen; i <= maxLen; i++) {
- vec += (base[i+1] - base[i]);
- limit[i] = vec-1;
- vec <<= 1;
- }
- for (i = minLen + 1; i <= maxLen; i++)
- base[i] = ((limit[i-1] + 1) << 1) - base[i];
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end huffman.c ---*/
-/*-------------------------------------------------------------*/
+/*
+ * This file is a part of the bzip2 compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.bzip.org/
+ *
+ * This modification is not compatible with the original bzip2.
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+#include "bzlib.h"
+
+/*-------------------------------------------------------------*/
+/*--- Huffman coding low-level stuff ---*/
+/*--- huffman.c ---*/
+/*-------------------------------------------------------------*/
+
+/*--
+ This file is a part of bzip2 and/or libbzip2, a program and
+ library for lossless, block-sorting data compression.
+
+ Copyright (C) 1996-2000 Julian R Seward. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 4. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ Julian Seward, Cambridge, UK.
+ jseward@acm.org
+ bzip2/libbzip2 version 1.0 of 21 March 2000
+
+ This program is based on (at least) the work of:
+ Mike Burrows
+ David Wheeler
+ Peter Fenwick
+ Alistair Moffat
+ Radford Neal
+ Ian H. Witten
+ Robert Sedgewick
+ Jon L. Bentley
+
+ For more information on these sources, see the manual.
+--*/
+
+#ifndef EXEHEAD
+/*---------------------------------------------------*/
+#define WEIGHTOF(zz0) ((zz0) & 0xffffff00)
+#define DEPTHOF(zz1) ((zz1) & 0x000000ff)
+#define MYMAX(zz2,zz3) ((zz2) > (zz3) ? (zz2) : (zz3))
+
+#define ADDWEIGHTS(zw1,zw2) \
+ (WEIGHTOF(zw1)+WEIGHTOF(zw2)) | \
+ (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2)))
+
+#define UPHEAP(z) \
+{ \
+ Int32 zz, tmp; \
+ zz = z; tmp = heap[zz]; \
+ while (weight[tmp] < weight[heap[zz >> 1]]) { \
+ heap[zz] = heap[zz >> 1]; \
+ zz >>= 1; \
+ } \
+ heap[zz] = tmp; \
+}
+
+#define DOWNHEAP(z) \
+{ \
+ Int32 zz, yy, tmp; \
+ zz = z; tmp = heap[zz]; \
+ while (True) { \
+ yy = zz << 1; \
+ if (yy > nHeap) break; \
+ if (yy < nHeap && \
+ weight[heap[yy+1]] < weight[heap[yy]]) \
+ yy++; \
+ if (weight[tmp] < weight[heap[yy]]) break; \
+ heap[zz] = heap[yy]; \
+ zz = yy; \
+ } \
+ heap[zz] = tmp; \
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_hbMakeCodeLengths ( UChar *len,
+ Int32 *freq,
+ Int32 alphaSize,
+ Int32 maxLen )
+{
+ /*--
+ Nodes and heap entries run from 1. Entry 0
+ for both the heap and nodes is a sentinel.
+ --*/
+ Int32 nNodes, nHeap, n1, n2, i, j, k;
+ Bool tooLong;
+
+ static Int32 heap [ BZ_MAX_ALPHA_SIZE + 2 ];
+ static Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];
+ static Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ];
+
+ for (i = 0; i < alphaSize; i++)
+ weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
+
+ while (True) {
+
+ nNodes = alphaSize;
+ nHeap = 0;
+
+ heap[0] = 0;
+ weight[0] = 0;
+ parent[0] = -2;
+
+ for (i = 1; i <= alphaSize; i++) {
+ parent[i] = -1;
+ nHeap++;
+ heap[nHeap] = i;
+ UPHEAP(nHeap);
+ }
+
+ AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 );
+
+ while (nHeap > 1) {
+ n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
+ n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
+ nNodes++;
+ parent[n1] = parent[n2] = nNodes;
+ weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]);
+ parent[nNodes] = -1;
+ nHeap++;
+ heap[nHeap] = nNodes;
+ UPHEAP(nHeap);
+ }
+
+ AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 );
+
+ tooLong = False;
+ for (i = 1; i <= alphaSize; i++) {
+ j = 0;
+ k = i;
+ while (parent[k] >= 0) { k = parent[k]; j++; }
+ len[i-1] = j;
+ if (j > maxLen) tooLong = True;
+ }
+
+ if (! tooLong) break;
+
+ for (i = 1; i < alphaSize; i++) {
+ j = weight[i] >> 8;
+ j = 1 + (j / 2);
+ weight[i] = j << 8;
+ }
+ }
+}
+
+
+/*---------------------------------------------------*/
+void BZ2_hbAssignCodes ( Int32 *code,
+ UChar *length,
+ Int32 minLen,
+ Int32 maxLen,
+ Int32 alphaSize )
+{
+ Int32 n, vec, i;
+
+ vec = 0;
+ for (n = minLen; n <= maxLen; n++) {
+ for (i = 0; i < alphaSize; i++)
+ if (length[i] == n) { code[i] = vec; vec++; };
+ vec <<= 1;
+ }
+}
+#endif
+
+
+/*---------------------------------------------------*/
+void NSISCALL
+BZ2_hbCreateDecodeTables ( Int32 *limit,
+ Int32 *base,
+ Int32 *perm,
+ UChar *length,
+ Int32 minLen,
+ Int32 maxLen,
+ Int32 alphaSize )
+{
+ Int32 pp, i, j, vec;
+
+ pp = 0;
+ for (i = minLen; i <= maxLen; i++)
+ for (j = 0; j < alphaSize; j++)
+ if (length[j] == i) { perm[pp] = j; pp++; };
+
+ for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0;
+ for (i = 0; i < alphaSize; i++) base[length[i]+1]++;
+
+ for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];
+
+ for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0;
+ vec = 0;
+
+ for (i = minLen; i <= maxLen; i++) {
+ vec += (base[i+1] - base[i]);
+ limit[i] = vec-1;
+ vec <<= 1;
+ }
+ for (i = minLen + 1; i <= maxLen; i++)
+ base[i] = ((limit[i-1] + 1) << 1) - base[i];
+}
+
+
+/*-------------------------------------------------------------*/
+/*--- end huffman.c ---*/
+/*-------------------------------------------------------------*/
diff --git a/Source/cbzip2.h b/Source/cbzip2.h
index 840af93..638b16c 100755
--- a/Source/cbzip2.h
+++ b/Source/cbzip2.h
@@ -1,99 +1,99 @@
-/*
- * cbzip2.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __CBZIP2_H__
-#define __CBZIP2_H__
-
-#include "compressor.h"
-#include "bzip2/bzlib.h"
-
-class CBzip2 : public ICompressor {
- public:
- virtual ~CBzip2() {}
-
- int Init(int level, unsigned int dict_size) {
- last_ret = !BZ_STREAM_END;
- stream = new bz_stream;
- if (!stream) return BZ_MEM_ERROR;
- return BZ2_bzCompressInit(stream, level, 0, 30);
- }
-
- int End() {
- int ret = BZ2_bzCompressEnd(stream);
- delete stream;
- return ret;
- }
-
- int Compress(bool finish) {
- // act like zlib when it comes to stream ending
- if (last_ret == BZ_STREAM_END && finish)
- return C_FINISHED;
- last_ret = BZ2_bzCompress(stream, finish?BZ_FINISH:0);
-
- if (last_ret < 0)
- return last_ret;
-
- return C_OK;
- }
-
- void SetNextIn(char *in, unsigned int size) {
- stream->next_in = in;
- stream->avail_in = size;
- }
-
- void SetNextOut(char *out, unsigned int size) {
- stream->next_out = out;
- stream->avail_out = size;
- }
-
- virtual char* GetNextOut() {
- return stream->next_out;
- }
-
- virtual unsigned int GetAvailIn() {
- return stream->avail_in;
- }
-
- virtual unsigned int GetAvailOut() {
- return stream->avail_out;
- }
-
- const char* GetName() {
- return "bzip2";
- }
-
- const char* GetErrStr(int err) {
- switch (err)
- {
- case BZ_SEQUENCE_ERROR:
- return "sequence error - bad call";
- case BZ_PARAM_ERROR:
- return "parameter error - bad call";
- case BZ_MEM_ERROR:
- return "not enough memory";
- case BZ_CONFIG_ERROR:
- return "config error";
- default:
- return "unknown error";
- }
- }
-
- private:
- bz_stream *stream;
- int last_ret;
-};
-
-#endif
+/*
+ * cbzip2.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __CBZIP2_H__
+#define __CBZIP2_H__
+
+#include "compressor.h"
+#include "bzip2/bzlib.h"
+
+class CBzip2 : public ICompressor {
+ public:
+ virtual ~CBzip2() {}
+
+ int Init(int level, unsigned int dict_size) {
+ last_ret = !BZ_STREAM_END;
+ stream = new bz_stream;
+ if (!stream) return BZ_MEM_ERROR;
+ return BZ2_bzCompressInit(stream, level, 0, 30);
+ }
+
+ int End() {
+ int ret = BZ2_bzCompressEnd(stream);
+ delete stream;
+ return ret;
+ }
+
+ int Compress(bool finish) {
+ // act like zlib when it comes to stream ending
+ if (last_ret == BZ_STREAM_END && finish)
+ return C_FINISHED;
+ last_ret = BZ2_bzCompress(stream, finish?BZ_FINISH:0);
+
+ if (last_ret < 0)
+ return last_ret;
+
+ return C_OK;
+ }
+
+ void SetNextIn(char *in, unsigned int size) {
+ stream->next_in = in;
+ stream->avail_in = size;
+ }
+
+ void SetNextOut(char *out, unsigned int size) {
+ stream->next_out = out;
+ stream->avail_out = size;
+ }
+
+ virtual char* GetNextOut() {
+ return stream->next_out;
+ }
+
+ virtual unsigned int GetAvailIn() {
+ return stream->avail_in;
+ }
+
+ virtual unsigned int GetAvailOut() {
+ return stream->avail_out;
+ }
+
+ const char* GetName() {
+ return "bzip2";
+ }
+
+ const char* GetErrStr(int err) {
+ switch (err)
+ {
+ case BZ_SEQUENCE_ERROR:
+ return "sequence error - bad call";
+ case BZ_PARAM_ERROR:
+ return "parameter error - bad call";
+ case BZ_MEM_ERROR:
+ return "not enough memory";
+ case BZ_CONFIG_ERROR:
+ return "config error";
+ default:
+ return "unknown error";
+ }
+ }
+
+ private:
+ bz_stream *stream;
+ int last_ret;
+};
+
+#endif
diff --git a/Source/clzma.cpp b/Source/clzma.cpp
index 366b179..2714055 100755
--- a/Source/clzma.cpp
+++ b/Source/clzma.cpp
@@ -1,464 +1,464 @@
-/*
- * clzma.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include <algorithm> // for std::min
-#include "clzma.h"
-
-using namespace std;
-
-#ifndef _WIN32
-struct evnet_t
-{
- pthread_cond_t cond;
- pthread_mutex_t mutex;
- bool signaled;
-};
-
-HANDLE CreateEvent(void *, BOOL, BOOL, char *)
-{
- evnet_t *event = (evnet_t *) malloc(sizeof(evnet_t));
- if (!event)
- return 0;
- if (pthread_cond_init(&event->cond, NULL))
- {
- free(event);
- return 0;
- }
- if (pthread_mutex_init(&event->mutex, NULL))
- {
- pthread_cond_destroy(&event->cond);
- free(event);
- return 0;
- }
- event->signaled = false;
- return (HANDLE) event;
-}
-
-BOOL SetEvent(HANDLE _event)
-{
- evnet_t *event = (evnet_t *) _event;
- if (pthread_mutex_lock(&event->mutex))
- return FALSE;
- event->signaled = true;
- pthread_cond_signal(&event->cond);
- if (pthread_mutex_unlock(&event->mutex))
- return FALSE;
- return TRUE;
-}
-
-BOOL ResetEvent(HANDLE _event)
-{
- evnet_t *event = (evnet_t *) _event;
- if (pthread_mutex_lock(&event->mutex))
- return FALSE;
- event->signaled = false;
- if (pthread_mutex_unlock(&event->mutex))
- return FALSE;
- return TRUE;
-}
-
-BOOL CloseHandle(HANDLE _event)
-{
- BOOL ret = TRUE;
- evnet_t *event = (evnet_t *) _event;
- if (!event)
- return FALSE;
- if (pthread_cond_destroy(&event->cond))
- ret = FALSE;
- if (pthread_mutex_destroy(&event->mutex))
- ret = FALSE;
- free(event);
- return ret;
-}
-
-#define WAIT_OBJECT_0 0
-#define INFINITE 0
-DWORD WaitForSingleObject(HANDLE _event, DWORD) {
- DWORD ret = WAIT_OBJECT_0;
- evnet_t *event = (evnet_t *) _event;
- if (pthread_mutex_lock(&event->mutex))
- return !WAIT_OBJECT_0;
- if (!event->signaled)
- {
- if (pthread_cond_wait(&event->cond, &event->mutex))
- {
- ret = !WAIT_OBJECT_0;
- }
- }
- event->signaled = false;
- pthread_mutex_unlock(&event->mutex);
- return ret;
-}
-
-#define WaitForMultipleObjects(x, list, y, t) WaitForSingleObject(list[0], t)
-
-#endif
-
-#ifdef _WIN32
-DWORD CLZMA::lzmaCompressThread(LPVOID lpParameter)
-#else
-void* CLZMA::lzmaCompressThread(void *lpParameter)
-#endif
-{
- CLZMA *Compressor = (CLZMA *) lpParameter;
- if (!Compressor)
- return 0;
-
- Compressor->CompressReal();
- return 0;
-}
-
-int CLZMA::ConvertError(HRESULT result)
-{
- if (result != S_OK)
- {
- if (result == E_OUTOFMEMORY)
- return LZMA_MEM_ERROR;
- else
- return LZMA_IO_ERROR;
- }
- return C_OK;
-}
-
-CLZMA::CLZMA(): _encoder(NULL)
-{
- _encoder = new NCompress::NLZMA::CEncoder();
- _encoder->SetWriteEndMarkerMode(true);
-#ifdef _WIN32
- hCompressionThread = NULL;
-#else
- hCompressionThread = 0;
-#endif
- hNeedIOEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- hIOReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- finish = FALSE;
- compressor_finished = TRUE;
- hCompressionThread = 0;
- SetNextOut(NULL, 0);
- SetNextIn(NULL, 0);
-
- AddRef(); // will be manually deleted, not released
-}
-
-CLZMA::~CLZMA()
-{
- End();
- if (hNeedIOEvent)
- {
- CloseHandle(hNeedIOEvent);
- hNeedIOEvent = NULL;
- }
- if (hIOReadyEvent)
- {
- CloseHandle(hIOReadyEvent);
- hIOReadyEvent = NULL;
- }
- if (_encoder)
- {
- delete _encoder;
- _encoder = NULL;
- }
-}
-
-int CLZMA::Init(int level, unsigned int dicSize)
-{
- End();
-
- compressor_finished = FALSE;
- finish = FALSE;
- res = C_OK;
-
- if (!hNeedIOEvent || !hIOReadyEvent)
- {
- return LZMA_INIT_ERROR;
- }
-
- ResetEvent(hNeedIOEvent);
- ResetEvent(hIOReadyEvent);
-
- res = C_OK;
-
- PROPID propdIDs [] =
- {
- NCoderPropID::kAlgorithm,
- NCoderPropID::kDictionarySize,
- NCoderPropID::kNumFastBytes
- };
- const int kNumProps = sizeof(propdIDs) / sizeof(propdIDs[0]);
- PROPVARIANT props[kNumProps];
- // NCoderPropID::kAlgorithm
- props[0].vt = VT_UI4;
- props[0].ulVal = 2;
- // NCoderPropID::kDictionarySize
- props[1].vt = VT_UI4;
- props[1].ulVal = dicSize;
- // NCoderPropID::kNumFastBytes
- props[2].vt = VT_UI4;
- props[2].ulVal = 64;
- if (_encoder->SetCoderProperties(propdIDs, props, kNumProps) != 0)
- return LZMA_INIT_ERROR;
- return _encoder->SetStreams(this, this, 0, 0) == S_OK ? C_OK : LZMA_INIT_ERROR;
-}
-
-int CLZMA::End()
-{
- // has compressor not finished?
- if (hCompressionThread && !compressor_finished)
- {
- // kill compression thread
- avail_in = 0;
- avail_out = 0;
- compressor_finished = TRUE;
-
- SetEvent(hIOReadyEvent);
-#ifdef _WIN32
- WaitForSingleObject(hCompressionThread, INFINITE);
-#else
- pthread_join(hCompressionThread, NULL);
-#endif
- }
- if (hCompressionThread)
- {
-#ifdef _WIN32
- CloseHandle(hCompressionThread);
- hCompressionThread = NULL;
-#else
- pthread_detach(hCompressionThread);
- hCompressionThread = 0;
-#endif
- }
- SetNextOut(NULL, 0);
- SetNextIn(NULL, 0);
- return C_OK;
-}
-
-int CLZMA::CompressReal()
-{
- try
- {
- HRESULT hResult = _encoder->WriteCoderProperties(this);
- if (hResult == S_OK)
- {
- while (true)
- {
- UINT64 inSize, outSize;
- INT32 finished;
- hResult = _encoder->CodeOneBlock(&inSize, &outSize, &finished);
- if (hResult != S_OK && res == C_OK)
- res = ConvertError(hResult);
- if (res != C_OK)
- break;
- if (finished)
- {
- res = C_FINISHED;
- break;
- }
- }
- }
- else
- {
- if (res == C_OK)
- res = ConvertError(hResult);
- }
- }
- catch (...)
- {
- if (res == C_OK)
- res = LZMA_IO_ERROR;
- }
-
- compressor_finished = TRUE;
- SetEvent(hNeedIOEvent);
- return C_OK;
-}
-
-int CLZMA::Compress(bool flush)
-{
- if (compressor_finished)
- {
- // act like zlib when it comes to stream ending
- if (flush)
- return C_OK;
- else
- return LZMA_BAD_CALL;
- }
-
- finish = flush;
-
- if (!hCompressionThread)
- {
-#ifdef _WIN32
- DWORD dwThreadId;
-
- hCompressionThread = CreateThread(0, 0, lzmaCompressThread, (LPVOID) this, 0, &dwThreadId);
- if (!hCompressionThread)
-#else
- if (pthread_create(&hCompressionThread, NULL, lzmaCompressThread, (LPVOID) this))
-#endif
- return LZMA_INIT_ERROR;
- }
- else
- {
- SetEvent(hIOReadyEvent);
- }
-
- HANDLE waitList[2] = {hNeedIOEvent, (HANDLE) hCompressionThread};
- if (WaitForMultipleObjects(2, waitList, FALSE, INFINITE) != WAIT_OBJECT_0)
- {
- // thread ended or WaitForMultipleObjects failed
- compressor_finished = TRUE;
- SetEvent(hIOReadyEvent);
- return LZMA_THREAD_ERROR;
- }
-
- if (compressor_finished)
- {
- return res;
- }
-
- return C_OK;
-}
-
-void CLZMA::GetMoreIO()
-{
- SetEvent(hNeedIOEvent);
- if (WaitForSingleObject(hIOReadyEvent, INFINITE) != WAIT_OBJECT_0)
- {
- compressor_finished = TRUE;
- res = LZMA_THREAD_ERROR;
- }
-}
-
-HRESULT CLZMA::Read(void *data, UINT32 size, UINT32 *processedSize)
-{
- return ReadPart(data, size, processedSize);
-}
-
-HRESULT CLZMA::ReadPart(void *data, UINT32 size, UINT32 *processedSize)
-{
- if (processedSize)
- *processedSize = 0;
- while (size)
- {
- if (!avail_in)
- {
- if (finish)
- {
- return S_OK;
- }
- GetMoreIO();
- if (!avail_in)
- {
- if (finish)
- {
- return S_OK;
- }
- return E_ABORT;
- }
- if (compressor_finished)
- return E_ABORT;
- }
- UINT32 l = min(size, avail_in);
- memcpy(data, next_in, l);
- avail_in -= l;
- size -= l;
- next_in += l;
- data = LPBYTE(data) + l;
- if (processedSize)
- *processedSize += l;
- }
- return S_OK;
-}
-
-HRESULT CLZMA::Write(const void *data, UINT32 size, UINT32 *processedSize)
-{
- return WritePart(data, size, processedSize);
-}
-
-HRESULT CLZMA::WritePart(const void *data, UINT32 size, UINT32 *processedSize)
-{
- if (processedSize)
- *processedSize = 0;
- while (size)
- {
- if (!avail_out)
- {
- GetMoreIO();
- if (!avail_out)
- return E_ABORT;
- }
- UINT32 l = min(size, avail_out);
- memcpy(next_out, data, l);
- avail_out -= l;
- size -= l;
- next_out += l;
- data = LPBYTE(data) + l;
- if (processedSize)
- *processedSize += l;
- }
- return S_OK;
-}
-
-void CLZMA::SetNextIn(char *in, unsigned int size)
-{
- next_in = (LPBYTE) in;
- avail_in = size;
-}
-
-void CLZMA::SetNextOut(char *out, unsigned int size)
-{
- next_out = (LPBYTE) out;
- avail_out = size;
-}
-
-char* CLZMA::GetNextOut()
-{
- return (char *) next_out;
-}
-
-unsigned int CLZMA::GetAvailIn()
-{
- return avail_in;
-}
-
-unsigned int CLZMA::GetAvailOut()
-{
- return avail_out;
-}
-
-const char* CLZMA::GetName()
-{
- return "lzma";
-}
-
-const char* CLZMA::GetErrStr(int err)
-{
- switch (err)
- {
- case LZMA_BAD_CALL:
- return "bad call";
- case LZMA_INIT_ERROR:
- return "initialization failed";
- case LZMA_THREAD_ERROR:
- return "thread synchronization error";
- case LZMA_IO_ERROR:
- return "input/output error";
- case LZMA_MEM_ERROR:
- return "not enough memory";
- default:
- return "unknown error";
- }
-}
+/*
+ * clzma.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include <algorithm> // for std::min
+#include "clzma.h"
+
+using namespace std;
+
+#ifndef _WIN32
+struct evnet_t
+{
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ bool signaled;
+};
+
+HANDLE CreateEvent(void *, BOOL, BOOL, char *)
+{
+ evnet_t *event = (evnet_t *) malloc(sizeof(evnet_t));
+ if (!event)
+ return 0;
+ if (pthread_cond_init(&event->cond, NULL))
+ {
+ free(event);
+ return 0;
+ }
+ if (pthread_mutex_init(&event->mutex, NULL))
+ {
+ pthread_cond_destroy(&event->cond);
+ free(event);
+ return 0;
+ }
+ event->signaled = false;
+ return (HANDLE) event;
+}
+
+BOOL SetEvent(HANDLE _event)
+{
+ evnet_t *event = (evnet_t *) _event;
+ if (pthread_mutex_lock(&event->mutex))
+ return FALSE;
+ event->signaled = true;
+ pthread_cond_signal(&event->cond);
+ if (pthread_mutex_unlock(&event->mutex))
+ return FALSE;
+ return TRUE;
+}
+
+BOOL ResetEvent(HANDLE _event)
+{
+ evnet_t *event = (evnet_t *) _event;
+ if (pthread_mutex_lock(&event->mutex))
+ return FALSE;
+ event->signaled = false;
+ if (pthread_mutex_unlock(&event->mutex))
+ return FALSE;
+ return TRUE;
+}
+
+BOOL CloseHandle(HANDLE _event)
+{
+ BOOL ret = TRUE;
+ evnet_t *event = (evnet_t *) _event;
+ if (!event)
+ return FALSE;
+ if (pthread_cond_destroy(&event->cond))
+ ret = FALSE;
+ if (pthread_mutex_destroy(&event->mutex))
+ ret = FALSE;
+ free(event);
+ return ret;
+}
+
+#define WAIT_OBJECT_0 0
+#define INFINITE 0
+DWORD WaitForSingleObject(HANDLE _event, DWORD) {
+ DWORD ret = WAIT_OBJECT_0;
+ evnet_t *event = (evnet_t *) _event;
+ if (pthread_mutex_lock(&event->mutex))
+ return !WAIT_OBJECT_0;
+ if (!event->signaled)
+ {
+ if (pthread_cond_wait(&event->cond, &event->mutex))
+ {
+ ret = !WAIT_OBJECT_0;
+ }
+ }
+ event->signaled = false;
+ pthread_mutex_unlock(&event->mutex);
+ return ret;
+}
+
+#define WaitForMultipleObjects(x, list, y, t) WaitForSingleObject(list[0], t)
+
+#endif
+
+#ifdef _WIN32
+DWORD CLZMA::lzmaCompressThread(LPVOID lpParameter)
+#else
+void* CLZMA::lzmaCompressThread(void *lpParameter)
+#endif
+{
+ CLZMA *Compressor = (CLZMA *) lpParameter;
+ if (!Compressor)
+ return 0;
+
+ Compressor->CompressReal();
+ return 0;
+}
+
+int CLZMA::ConvertError(HRESULT result)
+{
+ if (result != S_OK)
+ {
+ if (result == E_OUTOFMEMORY)
+ return LZMA_MEM_ERROR;
+ else
+ return LZMA_IO_ERROR;
+ }
+ return C_OK;
+}
+
+CLZMA::CLZMA(): _encoder(NULL)
+{
+ _encoder = new NCompress::NLZMA::CEncoder();
+ _encoder->SetWriteEndMarkerMode(true);
+#ifdef _WIN32
+ hCompressionThread = NULL;
+#else
+ hCompressionThread = 0;
+#endif
+ hNeedIOEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ hIOReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ finish = FALSE;
+ compressor_finished = TRUE;
+ hCompressionThread = 0;
+ SetNextOut(NULL, 0);
+ SetNextIn(NULL, 0);
+
+ AddRef(); // will be manually deleted, not released
+}
+
+CLZMA::~CLZMA()
+{
+ End();
+ if (hNeedIOEvent)
+ {
+ CloseHandle(hNeedIOEvent);
+ hNeedIOEvent = NULL;
+ }
+ if (hIOReadyEvent)
+ {
+ CloseHandle(hIOReadyEvent);
+ hIOReadyEvent = NULL;
+ }
+ if (_encoder)
+ {
+ delete _encoder;
+ _encoder = NULL;
+ }
+}
+
+int CLZMA::Init(int level, unsigned int dicSize)
+{
+ End();
+
+ compressor_finished = FALSE;
+ finish = FALSE;
+ res = C_OK;
+
+ if (!hNeedIOEvent || !hIOReadyEvent)
+ {
+ return LZMA_INIT_ERROR;
+ }
+
+ ResetEvent(hNeedIOEvent);
+ ResetEvent(hIOReadyEvent);
+
+ res = C_OK;
+
+ PROPID propdIDs [] =
+ {
+ NCoderPropID::kAlgorithm,
+ NCoderPropID::kDictionarySize,
+ NCoderPropID::kNumFastBytes
+ };
+ const int kNumProps = sizeof(propdIDs) / sizeof(propdIDs[0]);
+ PROPVARIANT props[kNumProps];
+ // NCoderPropID::kAlgorithm
+ props[0].vt = VT_UI4;
+ props[0].ulVal = 2;
+ // NCoderPropID::kDictionarySize
+ props[1].vt = VT_UI4;
+ props[1].ulVal = dicSize;
+ // NCoderPropID::kNumFastBytes
+ props[2].vt = VT_UI4;
+ props[2].ulVal = 64;
+ if (_encoder->SetCoderProperties(propdIDs, props, kNumProps) != 0)
+ return LZMA_INIT_ERROR;
+ return _encoder->SetStreams(this, this, 0, 0) == S_OK ? C_OK : LZMA_INIT_ERROR;
+}
+
+int CLZMA::End()
+{
+ // has compressor not finished?
+ if (hCompressionThread && !compressor_finished)
+ {
+ // kill compression thread
+ avail_in = 0;
+ avail_out = 0;
+ compressor_finished = TRUE;
+
+ SetEvent(hIOReadyEvent);
+#ifdef _WIN32
+ WaitForSingleObject(hCompressionThread, INFINITE);
+#else
+ pthread_join(hCompressionThread, NULL);
+#endif
+ }
+ if (hCompressionThread)
+ {
+#ifdef _WIN32
+ CloseHandle(hCompressionThread);
+ hCompressionThread = NULL;
+#else
+ pthread_detach(hCompressionThread);
+ hCompressionThread = 0;
+#endif
+ }
+ SetNextOut(NULL, 0);
+ SetNextIn(NULL, 0);
+ return C_OK;
+}
+
+int CLZMA::CompressReal()
+{
+ try
+ {
+ HRESULT hResult = _encoder->WriteCoderProperties(this);
+ if (hResult == S_OK)
+ {
+ while (true)
+ {
+ UINT64 inSize, outSize;
+ INT32 finished;
+ hResult = _encoder->CodeOneBlock(&inSize, &outSize, &finished);
+ if (hResult != S_OK && res == C_OK)
+ res = ConvertError(hResult);
+ if (res != C_OK)
+ break;
+ if (finished)
+ {
+ res = C_FINISHED;
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (res == C_OK)
+ res = ConvertError(hResult);
+ }
+ }
+ catch (...)
+ {
+ if (res == C_OK)
+ res = LZMA_IO_ERROR;
+ }
+
+ compressor_finished = TRUE;
+ SetEvent(hNeedIOEvent);
+ return C_OK;
+}
+
+int CLZMA::Compress(bool flush)
+{
+ if (compressor_finished)
+ {
+ // act like zlib when it comes to stream ending
+ if (flush)
+ return C_OK;
+ else
+ return LZMA_BAD_CALL;
+ }
+
+ finish = flush;
+
+ if (!hCompressionThread)
+ {
+#ifdef _WIN32
+ DWORD dwThreadId;
+
+ hCompressionThread = CreateThread(0, 0, lzmaCompressThread, (LPVOID) this, 0, &dwThreadId);
+ if (!hCompressionThread)
+#else
+ if (pthread_create(&hCompressionThread, NULL, lzmaCompressThread, (LPVOID) this))
+#endif
+ return LZMA_INIT_ERROR;
+ }
+ else
+ {
+ SetEvent(hIOReadyEvent);
+ }
+
+ HANDLE waitList[2] = {hNeedIOEvent, (HANDLE) hCompressionThread};
+ if (WaitForMultipleObjects(2, waitList, FALSE, INFINITE) != WAIT_OBJECT_0)
+ {
+ // thread ended or WaitForMultipleObjects failed
+ compressor_finished = TRUE;
+ SetEvent(hIOReadyEvent);
+ return LZMA_THREAD_ERROR;
+ }
+
+ if (compressor_finished)
+ {
+ return res;
+ }
+
+ return C_OK;
+}
+
+void CLZMA::GetMoreIO()
+{
+ SetEvent(hNeedIOEvent);
+ if (WaitForSingleObject(hIOReadyEvent, INFINITE) != WAIT_OBJECT_0)
+ {
+ compressor_finished = TRUE;
+ res = LZMA_THREAD_ERROR;
+ }
+}
+
+HRESULT CLZMA::Read(void *data, UINT32 size, UINT32 *processedSize)
+{
+ return ReadPart(data, size, processedSize);
+}
+
+HRESULT CLZMA::ReadPart(void *data, UINT32 size, UINT32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+ while (size)
+ {
+ if (!avail_in)
+ {
+ if (finish)
+ {
+ return S_OK;
+ }
+ GetMoreIO();
+ if (!avail_in)
+ {
+ if (finish)
+ {
+ return S_OK;
+ }
+ return E_ABORT;
+ }
+ if (compressor_finished)
+ return E_ABORT;
+ }
+ UINT32 l = min(size, avail_in);
+ memcpy(data, next_in, l);
+ avail_in -= l;
+ size -= l;
+ next_in += l;
+ data = LPBYTE(data) + l;
+ if (processedSize)
+ *processedSize += l;
+ }
+ return S_OK;
+}
+
+HRESULT CLZMA::Write(const void *data, UINT32 size, UINT32 *processedSize)
+{
+ return WritePart(data, size, processedSize);
+}
+
+HRESULT CLZMA::WritePart(const void *data, UINT32 size, UINT32 *processedSize)
+{
+ if (processedSize)
+ *processedSize = 0;
+ while (size)
+ {
+ if (!avail_out)
+ {
+ GetMoreIO();
+ if (!avail_out)
+ return E_ABORT;
+ }
+ UINT32 l = min(size, avail_out);
+ memcpy(next_out, data, l);
+ avail_out -= l;
+ size -= l;
+ next_out += l;
+ data = LPBYTE(data) + l;
+ if (processedSize)
+ *processedSize += l;
+ }
+ return S_OK;
+}
+
+void CLZMA::SetNextIn(char *in, unsigned int size)
+{
+ next_in = (LPBYTE) in;
+ avail_in = size;
+}
+
+void CLZMA::SetNextOut(char *out, unsigned int size)
+{
+ next_out = (LPBYTE) out;
+ avail_out = size;
+}
+
+char* CLZMA::GetNextOut()
+{
+ return (char *) next_out;
+}
+
+unsigned int CLZMA::GetAvailIn()
+{
+ return avail_in;
+}
+
+unsigned int CLZMA::GetAvailOut()
+{
+ return avail_out;
+}
+
+const char* CLZMA::GetName()
+{
+ return "lzma";
+}
+
+const char* CLZMA::GetErrStr(int err)
+{
+ switch (err)
+ {
+ case LZMA_BAD_CALL:
+ return "bad call";
+ case LZMA_INIT_ERROR:
+ return "initialization failed";
+ case LZMA_THREAD_ERROR:
+ return "thread synchronization error";
+ case LZMA_IO_ERROR:
+ return "input/output error";
+ case LZMA_MEM_ERROR:
+ return "not enough memory";
+ default:
+ return "unknown error";
+ }
+}
diff --git a/Source/clzma.h b/Source/clzma.h
index 677cf78..ac90339 100755
--- a/Source/clzma.h
+++ b/Source/clzma.h
@@ -1,103 +1,103 @@
-/*
- * clzma.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __CLZMA_H__
-#define __CLZMA_H__
-
-#include "Platform.h"
-
-#ifndef _WIN32
-# include <pthread.h>
-#endif
-
-#include "compressor.h"
-#include "7zip/7zip/IStream.h"
-#include "7zip/7zip/Compress/LZMA/LZMAEncoder.h"
-#include "7zip/Common/MyCom.h"
-#include "7zip/Common/Defs.h"
-
-#define LZMA_BAD_CALL -1
-#define LZMA_INIT_ERROR -2
-#define LZMA_THREAD_ERROR -3
-#define LZMA_IO_ERROR -4
-#define LZMA_MEM_ERROR -5
-
-class CLZMA:
- public ICompressor,
- public ISequentialInStream,
- public ISequentialOutStream,
- public CMyUnknownImp
-{
-private:
- NCompress::NLZMA::CEncoder *_encoder;
-
-#ifdef _WIN32
- HANDLE hCompressionThread;
-#else
- pthread_t hCompressionThread;
-#endif
- HANDLE hNeedIOEvent;
- HANDLE hIOReadyEvent;
-
- BYTE *next_in; /* next input byte */
- UINT avail_in; /* number of bytes available at next_in */
-
- BYTE *next_out; /* next output byte should be put there */
- UINT avail_out; /* remaining free space at next_out */
-
- int res;
-
- BOOL finish;
- BOOL compressor_finished;
-
- int ConvertError(HRESULT result);
-
- void GetMoreIO();
- int CompressReal();
-
-#ifdef _WIN32
- static DWORD WINAPI lzmaCompressThread(LPVOID lpParameter);
-#else
- static void* lzmaCompressThread(void *lpParameter);
-#endif
-
-public:
- MY_UNKNOWN_IMP
-
- CLZMA();
- virtual ~CLZMA();
-
- virtual int Init(int level, unsigned int dicSize);
- virtual int End();
- virtual int Compress(bool flush);
-
- STDMETHOD(Read)(void *data, UINT32 size, UINT32 *processedSize);
- STDMETHOD(ReadPart)(void *data, UINT32 size, UINT32 *processedSize);
- STDMETHOD(Write)(const void *data, UINT32 size, UINT32 *processedSize);
- STDMETHOD(WritePart)(const void *data, UINT32 size, UINT32 *processedSize);
-
- virtual void SetNextIn(char *in, unsigned int size);
- virtual void SetNextOut(char *out, unsigned int size);
-
- virtual char *GetNextOut();
- virtual unsigned int GetAvailIn();
- virtual unsigned int GetAvailOut();
- virtual const char *GetName();
-
- virtual const char* GetErrStr(int err);
-};
-
-#endif
+/*
+ * clzma.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __CLZMA_H__
+#define __CLZMA_H__
+
+#include "Platform.h"
+
+#ifndef _WIN32
+# include <pthread.h>
+#endif
+
+#include "compressor.h"
+#include "7zip/7zip/IStream.h"
+#include "7zip/7zip/Compress/LZMA/LZMAEncoder.h"
+#include "7zip/Common/MyCom.h"
+#include "7zip/Common/Defs.h"
+
+#define LZMA_BAD_CALL -1
+#define LZMA_INIT_ERROR -2
+#define LZMA_THREAD_ERROR -3
+#define LZMA_IO_ERROR -4
+#define LZMA_MEM_ERROR -5
+
+class CLZMA:
+ public ICompressor,
+ public ISequentialInStream,
+ public ISequentialOutStream,
+ public CMyUnknownImp
+{
+private:
+ NCompress::NLZMA::CEncoder *_encoder;
+
+#ifdef _WIN32
+ HANDLE hCompressionThread;
+#else
+ pthread_t hCompressionThread;
+#endif
+ HANDLE hNeedIOEvent;
+ HANDLE hIOReadyEvent;
+
+ BYTE *next_in; /* next input byte */
+ UINT avail_in; /* number of bytes available at next_in */
+
+ BYTE *next_out; /* next output byte should be put there */
+ UINT avail_out; /* remaining free space at next_out */
+
+ int res;
+
+ BOOL finish;
+ BOOL compressor_finished;
+
+ int ConvertError(HRESULT result);
+
+ void GetMoreIO();
+ int CompressReal();
+
+#ifdef _WIN32
+ static DWORD WINAPI lzmaCompressThread(LPVOID lpParameter);
+#else
+ static void* lzmaCompressThread(void *lpParameter);
+#endif
+
+public:
+ MY_UNKNOWN_IMP
+
+ CLZMA();
+ virtual ~CLZMA();
+
+ virtual int Init(int level, unsigned int dicSize);
+ virtual int End();
+ virtual int Compress(bool flush);
+
+ STDMETHOD(Read)(void *data, UINT32 size, UINT32 *processedSize);
+ STDMETHOD(ReadPart)(void *data, UINT32 size, UINT32 *processedSize);
+ STDMETHOD(Write)(const void *data, UINT32 size, UINT32 *processedSize);
+ STDMETHOD(WritePart)(const void *data, UINT32 size, UINT32 *processedSize);
+
+ virtual void SetNextIn(char *in, unsigned int size);
+ virtual void SetNextOut(char *out, unsigned int size);
+
+ virtual char *GetNextOut();
+ virtual unsigned int GetAvailIn();
+ virtual unsigned int GetAvailOut();
+ virtual const char *GetName();
+
+ virtual const char* GetErrStr(int err);
+};
+
+#endif
diff --git a/Source/compressor.h b/Source/compressor.h
index aae7569..49524a0 100755
--- a/Source/compressor.h
+++ b/Source/compressor.h
@@ -1,46 +1,46 @@
-/*
- * compressor.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __COMPRESSOR_H__
-#define __COMPRESSOR_H__
-
-#define C_OK 0
-#define C_FINISHED 1
-
-#define C_FINISH true
-
-class ICompressor {
- public:
- virtual ~ICompressor() {}
-
- virtual int Init(int level, unsigned int dict_size) = 0;
- virtual int End() = 0;
- virtual int Compress(bool finish) = 0;
-
- virtual void SetNextIn(char *in, unsigned int size) = 0;
- virtual void SetNextOut(char *out, unsigned int size) = 0;
-
- virtual char* GetNextOut() = 0;
-
- virtual unsigned int GetAvailIn() = 0;
- virtual unsigned int GetAvailOut() = 0;
-
- virtual const char* GetName() = 0;
-
- virtual const char* GetErrStr(int err) = 0;
-};
-
-#endif
+/*
+ * compressor.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __COMPRESSOR_H__
+#define __COMPRESSOR_H__
+
+#define C_OK 0
+#define C_FINISHED 1
+
+#define C_FINISH true
+
+class ICompressor {
+ public:
+ virtual ~ICompressor() {}
+
+ virtual int Init(int level, unsigned int dict_size) = 0;
+ virtual int End() = 0;
+ virtual int Compress(bool finish) = 0;
+
+ virtual void SetNextIn(char *in, unsigned int size) = 0;
+ virtual void SetNextOut(char *out, unsigned int size) = 0;
+
+ virtual char* GetNextOut() = 0;
+
+ virtual unsigned int GetAvailIn() = 0;
+ virtual unsigned int GetAvailOut() = 0;
+
+ virtual const char* GetName() = 0;
+
+ virtual const char* GetErrStr(int err) = 0;
+};
+
+#endif
diff --git a/Source/crc32.c b/Source/crc32.c
index eb3a988..e8fabf9 100755
--- a/Source/crc32.c
+++ b/Source/crc32.c
@@ -1,47 +1,47 @@
-/*
- * crc32.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include "crc32.h"
-#include "exehead/config.h"
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-
-// this is based on the (slow,small) CRC32 implementation from zlib.
-crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len)
-{
- static crc32_t crc_table[256];
-
- if (!crc_table[1])
- {
- crc32_t c;
- int n, k;
-
- for (n = 0; n < 256; n++)
- {
- c = (crc32_t)n;
- for (k = 0; k < 8; k++) c = (c >> 1) ^ (c & 1 ? 0xedb88320L : 0);
- crc_table[n] = c;
- }
- }
-
- crc = crc ^ 0xffffffffL;
- while (len-- > 0) {
- crc = crc_table[(crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
- }
- return crc ^ 0xffffffffL;
-}
-
-#endif
+/*
+ * crc32.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include "crc32.h"
+#include "exehead/config.h"
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+
+// this is based on the (slow,small) CRC32 implementation from zlib.
+crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len)
+{
+ static crc32_t crc_table[256];
+
+ if (!crc_table[1])
+ {
+ crc32_t c;
+ int n, k;
+
+ for (n = 0; n < 256; n++)
+ {
+ c = (crc32_t)n;
+ for (k = 0; k < 8; k++) c = (c >> 1) ^ (c & 1 ? 0xedb88320L : 0);
+ crc_table[n] = c;
+ }
+ }
+
+ crc = crc ^ 0xffffffffL;
+ while (len-- > 0) {
+ crc = crc_table[(crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
+ }
+ return crc ^ 0xffffffffL;
+}
+
+#endif
diff --git a/Source/crc32.h b/Source/crc32.h
index 8245b6f..92fb7c9 100755
--- a/Source/crc32.h
+++ b/Source/crc32.h
@@ -1,29 +1,29 @@
-/*
- * crc32.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-
-#ifndef ___CRC32__H___
-#define ___CRC32__H___
-
-typedef UINT32 crc32_t;
-
-#ifdef __cplusplus
-extern "C"
-#endif
-crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len);
-
-#endif//!___CRC32__H___
+/*
+ * crc32.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+
+#ifndef ___CRC32__H___
+#define ___CRC32__H___
+
+typedef UINT32 crc32_t;
+
+#ifdef __cplusplus
+extern "C"
+#endif
+crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, unsigned int len);
+
+#endif//!___CRC32__H___
diff --git a/Source/czlib.h b/Source/czlib.h
index 7d1b3e9..c929dea 100755
--- a/Source/czlib.h
+++ b/Source/czlib.h
@@ -1,91 +1,91 @@
-/*
- * czlib.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __CZLIB_H__
-#define __CZLIB_H__
-
-#include "compressor.h"
-#include "zlib/ZLIB.H"
-
-class CZlib : public ICompressor {
- public:
- virtual ~CZlib() {}
-
- int Init(int level, unsigned int dict_size) {
- stream = new z_stream;
- if (!stream) return Z_MEM_ERROR;
- return deflateInit(stream, level);
- }
-
- int End() {
- int ret = deflateEnd(stream);
- delete stream;
- return ret;
- }
-
- int Compress(bool finish) {
- return deflate(stream, finish?Z_FINISH:0);
- }
-
- void SetNextIn(char *in, unsigned int size) {
- stream->next_in = (unsigned char*)in;
- stream->avail_in = size;
- }
-
- void SetNextOut(char *out, unsigned int size) {
- stream->next_out = (unsigned char*)out;
- stream->avail_out = size;
- }
-
- virtual char* GetNextOut() {
- return (char*)stream->next_out;
- }
-
- virtual unsigned int GetAvailIn() {
- return stream->avail_in;
- }
-
- virtual unsigned int GetAvailOut() {
- return stream->avail_out;
- }
-
- const char* GetName() {
- return "zlib";
- }
-
- const char* GetErrStr(int err) {
- switch (err)
- {
- case Z_STREAM_ERROR:
- return "invalid stream - bad call";
- case Z_DATA_ERROR:
- return "data error";
- case Z_MEM_ERROR:
- return "not enough memory";
- case Z_BUF_ERROR:
- return "buffer error - bad call";
- case Z_VERSION_ERROR:
- return "version error";
- default:
- return "unknown error";
- }
- }
-
- private:
- z_stream *stream;
-};
-
-#endif
+/*
+ * czlib.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __CZLIB_H__
+#define __CZLIB_H__
+
+#include "compressor.h"
+#include "zlib/ZLIB.H"
+
+class CZlib : public ICompressor {
+ public:
+ virtual ~CZlib() {}
+
+ int Init(int level, unsigned int dict_size) {
+ stream = new z_stream;
+ if (!stream) return Z_MEM_ERROR;
+ return deflateInit(stream, level);
+ }
+
+ int End() {
+ int ret = deflateEnd(stream);
+ delete stream;
+ return ret;
+ }
+
+ int Compress(bool finish) {
+ return deflate(stream, finish?Z_FINISH:0);
+ }
+
+ void SetNextIn(char *in, unsigned int size) {
+ stream->next_in = (unsigned char*)in;
+ stream->avail_in = size;
+ }
+
+ void SetNextOut(char *out, unsigned int size) {
+ stream->next_out = (unsigned char*)out;
+ stream->avail_out = size;
+ }
+
+ virtual char* GetNextOut() {
+ return (char*)stream->next_out;
+ }
+
+ virtual unsigned int GetAvailIn() {
+ return stream->avail_in;
+ }
+
+ virtual unsigned int GetAvailOut() {
+ return stream->avail_out;
+ }
+
+ const char* GetName() {
+ return "zlib";
+ }
+
+ const char* GetErrStr(int err) {
+ switch (err)
+ {
+ case Z_STREAM_ERROR:
+ return "invalid stream - bad call";
+ case Z_DATA_ERROR:
+ return "data error";
+ case Z_MEM_ERROR:
+ return "not enough memory";
+ case Z_BUF_ERROR:
+ return "buffer error - bad call";
+ case Z_VERSION_ERROR:
+ return "version error";
+ default:
+ return "unknown error";
+ }
+ }
+
+ private:
+ z_stream *stream;
+};
+
+#endif
diff --git a/Source/dirreader.cpp b/Source/dirreader.cpp
index f6b9052..5dd0616 100755
--- a/Source/dirreader.cpp
+++ b/Source/dirreader.cpp
@@ -1,244 +1,244 @@
-/*
- * dirreader.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include "dirreader.h"
-#include <string>
-#include <set>
-
-#include <string.h> // for stricmp()
-#include <ctype.h> // for tolower()
-
-using namespace std;
-
-dir_reader::dir_reader() {
- exclude(".");
- exclude("..");
-}
-
-const set<string>& dir_reader::files() {
- return m_files;
-}
-
-const set<string>& dir_reader::dirs() {
- return m_dirs;
-}
-
-void dir_reader::exclude(const string& spec) {
- if (spec.find_first_of("?*") != string::npos) {
- m_wildcard_excluded.insert(spec);
- } else {
- m_excluded.insert(spec);
- }
-}
-
-void dir_reader::exclude(const set<string>& specs) {
- iterator i = specs.begin();
- iterator e = specs.end();
-
- for (; i != e; i++) {
- exclude(*i);
- }
-}
-
-bool dir_reader::matches(const string& name, const string& spec) {
- string::const_iterator name_itr = name.begin();
- string::const_iterator name_end = name.end();
-
- string::const_iterator spec_itr = spec.begin();
- string::const_iterator spec_end = spec.end();
-
- string::const_iterator last_good_spec = spec_end;
- string::const_iterator last_good_name = name_end;
-
- while (name_itr != name_end && spec_itr != spec_end) {
- switch (*spec_itr) {
- case '?':
- // question mark mathes one char
- name_itr++;
- spec_itr++;
- break;
-
- case '*':
- // double asterisk is the same as a single asterisk
- while (*spec_itr == '*') {
- spec_itr++;
- // asterisk at the end of the spec matches the end of the name
- if (spec_itr == spec_end)
- return true;
- }
-
- // remember last good name and spec for prematurely stopped asterisk
- last_good_spec = spec_itr;
- last_good_name = name_itr;
-
- break;
-
- default:
- if (::tolower(*name_itr) != ::tolower(*spec_itr)) {
- if (last_good_spec != spec_end) {
- // matched wrong part of the name, try again
- spec_itr = last_good_spec;
- name_itr = ++last_good_name;
- } else {
- // no match and no asterisk to use
- return false;
- }
- } else {
- // remember last good name for prematurely stopped asterisk
- last_good_name = name_itr;
-
- spec_itr++;
- name_itr++;
-
- if (spec_itr == spec_end && name_itr != name_end && last_good_spec != spec_end) {
- // asterisk hasn't matched enough, keep matching
- spec_itr = last_good_spec;
- }
- }
- break;
- }
- }
-
- // skip any redundant asterisks and periods at the end of the name
- while (spec_itr != spec_end) {
- if (*spec_itr != '.' && *spec_itr != '*') {
- break;
- }
- spec_itr++;
- }
-
- // return true only if managed to match everything
- return name_itr == name_end && spec_itr == spec_end;
-}
-
-void dir_reader::add_file(const string& file) {
- if (!is_excluded(file)) {
- m_files.insert(file);
- }
-}
-
-void dir_reader::add_dir(const string& dir) {
- if (!is_excluded(dir)) {
- m_dirs.insert(dir);
- }
-}
-
-bool dir_reader::is_excluded(const string& name) const {
- iterator i = m_excluded.begin();
- iterator e = m_excluded.end();
-
- for (; i != e; i++) {
- if (!::stricmp(name.c_str(), i->c_str())) {
- return true;
- }
- }
-
- i = m_wildcard_excluded.begin();
- e = m_wildcard_excluded.end();
-
- for (; i != e; i++) {
- if (matches(name, *i)) {
- return true;
- }
- }
-
- return false;
-}
-
-#ifdef _WIN32
-
-class win32_dir_reader : public dir_reader {
-public:
-
- virtual void read(const string& dir) {
- WIN32_FIND_DATA fd;
-
- string spec = dir + PLATFORM_PATH_SEPARATOR_STR + "*.*";
-
- HANDLE h = ::FindFirstFile(spec.c_str(), &fd);
- if (h != INVALID_HANDLE_VALUE) {
- do {
- if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
- dir_reader::add_dir(fd.cFileName);
- } else {
- dir_reader::add_file(fd.cFileName);
- }
- } while (::FindNextFile(h, &fd));
- ::FindClose(h);
- }
- }
-
-};
-
-#else
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <dirent.h>
-
-class posix_dir_reader : public dir_reader {
-public:
-
- virtual void read(const string& dir) {
- //convert(dir);
-
- DIR *dip = ::opendir(dir.c_str());
- if (dip) {
- dirent *dit;
- while ((dit = ::readdir(dip))) {
- struct stat st;
- string file = dir + PLATFORM_PATH_SEPARATOR_STR + dit->d_name;
-
- if (!stat(file.c_str(), &st)) {
- if (S_ISDIR(st.st_mode)) {
- dir_reader::add_dir(dit->d_name);
- } else {
- dir_reader::add_file(dit->d_name);
- }
- }
- }
- ::closedir(dip);
- }
- }
-
-private:
-
- void convert(string& path) {
- string::size_type pos = path.find('\\');
- while (pos != string::npos) {
- path[pos] = '/';
- pos = path.find('\\');
- }
-
- /* Replace drive letter X: by /x */
- if (path[1] == ':') {
- path[1] = ::tolower(path[0]);
- path[0] = '/';
- }
- }
-
-};
-
-#endif
-
-dir_reader* new_dir_reader() {
-#ifdef _WIN32
- return new win32_dir_reader();
-#else
- return new posix_dir_reader();
-#endif
-}
+/*
+ * dirreader.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include "dirreader.h"
+#include <string>
+#include <set>
+
+#include <string.h> // for stricmp()
+#include <ctype.h> // for tolower()
+
+using namespace std;
+
+dir_reader::dir_reader() {
+ exclude(".");
+ exclude("..");
+}
+
+const set<string>& dir_reader::files() {
+ return m_files;
+}
+
+const set<string>& dir_reader::dirs() {
+ return m_dirs;
+}
+
+void dir_reader::exclude(const string& spec) {
+ if (spec.find_first_of("?*") != string::npos) {
+ m_wildcard_excluded.insert(spec);
+ } else {
+ m_excluded.insert(spec);
+ }
+}
+
+void dir_reader::exclude(const set<string>& specs) {
+ iterator i = specs.begin();
+ iterator e = specs.end();
+
+ for (; i != e; i++) {
+ exclude(*i);
+ }
+}
+
+bool dir_reader::matches(const string& name, const string& spec) {
+ string::const_iterator name_itr = name.begin();
+ string::const_iterator name_end = name.end();
+
+ string::const_iterator spec_itr = spec.begin();
+ string::const_iterator spec_end = spec.end();
+
+ string::const_iterator last_good_spec = spec_end;
+ string::const_iterator last_good_name = name_end;
+
+ while (name_itr != name_end && spec_itr != spec_end) {
+ switch (*spec_itr) {
+ case '?':
+ // question mark mathes one char
+ name_itr++;
+ spec_itr++;
+ break;
+
+ case '*':
+ // double asterisk is the same as a single asterisk
+ while (*spec_itr == '*') {
+ spec_itr++;
+ // asterisk at the end of the spec matches the end of the name
+ if (spec_itr == spec_end)
+ return true;
+ }
+
+ // remember last good name and spec for prematurely stopped asterisk
+ last_good_spec = spec_itr;
+ last_good_name = name_itr;
+
+ break;
+
+ default:
+ if (::tolower(*name_itr) != ::tolower(*spec_itr)) {
+ if (last_good_spec != spec_end) {
+ // matched wrong part of the name, try again
+ spec_itr = last_good_spec;
+ name_itr = ++last_good_name;
+ } else {
+ // no match and no asterisk to use
+ return false;
+ }
+ } else {
+ // remember last good name for prematurely stopped asterisk
+ last_good_name = name_itr;
+
+ spec_itr++;
+ name_itr++;
+
+ if (spec_itr == spec_end && name_itr != name_end && last_good_spec != spec_end) {
+ // asterisk hasn't matched enough, keep matching
+ spec_itr = last_good_spec;
+ }
+ }
+ break;
+ }
+ }
+
+ // skip any redundant asterisks and periods at the end of the name
+ while (spec_itr != spec_end) {
+ if (*spec_itr != '.' && *spec_itr != '*') {
+ break;
+ }
+ spec_itr++;
+ }
+
+ // return true only if managed to match everything
+ return name_itr == name_end && spec_itr == spec_end;
+}
+
+void dir_reader::add_file(const string& file) {
+ if (!is_excluded(file)) {
+ m_files.insert(file);
+ }
+}
+
+void dir_reader::add_dir(const string& dir) {
+ if (!is_excluded(dir)) {
+ m_dirs.insert(dir);
+ }
+}
+
+bool dir_reader::is_excluded(const string& name) const {
+ iterator i = m_excluded.begin();
+ iterator e = m_excluded.end();
+
+ for (; i != e; i++) {
+ if (!::stricmp(name.c_str(), i->c_str())) {
+ return true;
+ }
+ }
+
+ i = m_wildcard_excluded.begin();
+ e = m_wildcard_excluded.end();
+
+ for (; i != e; i++) {
+ if (matches(name, *i)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+#ifdef _WIN32
+
+class win32_dir_reader : public dir_reader {
+public:
+
+ virtual void read(const string& dir) {
+ WIN32_FIND_DATA fd;
+
+ string spec = dir + PLATFORM_PATH_SEPARATOR_STR + "*.*";
+
+ HANDLE h = ::FindFirstFile(spec.c_str(), &fd);
+ if (h != INVALID_HANDLE_VALUE) {
+ do {
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ dir_reader::add_dir(fd.cFileName);
+ } else {
+ dir_reader::add_file(fd.cFileName);
+ }
+ } while (::FindNextFile(h, &fd));
+ ::FindClose(h);
+ }
+ }
+
+};
+
+#else
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+class posix_dir_reader : public dir_reader {
+public:
+
+ virtual void read(const string& dir) {
+ //convert(dir);
+
+ DIR *dip = ::opendir(dir.c_str());
+ if (dip) {
+ dirent *dit;
+ while ((dit = ::readdir(dip))) {
+ struct stat st;
+ string file = dir + PLATFORM_PATH_SEPARATOR_STR + dit->d_name;
+
+ if (!stat(file.c_str(), &st)) {
+ if (S_ISDIR(st.st_mode)) {
+ dir_reader::add_dir(dit->d_name);
+ } else {
+ dir_reader::add_file(dit->d_name);
+ }
+ }
+ }
+ ::closedir(dip);
+ }
+ }
+
+private:
+
+ void convert(string& path) {
+ string::size_type pos = path.find('\\');
+ while (pos != string::npos) {
+ path[pos] = '/';
+ pos = path.find('\\');
+ }
+
+ /* Replace drive letter X: by /x */
+ if (path[1] == ':') {
+ path[1] = ::tolower(path[0]);
+ path[0] = '/';
+ }
+ }
+
+};
+
+#endif
+
+dir_reader* new_dir_reader() {
+#ifdef _WIN32
+ return new win32_dir_reader();
+#else
+ return new posix_dir_reader();
+#endif
+}
diff --git a/Source/dirreader.h b/Source/dirreader.h
index c0bcbb4..d7426a8 100755
--- a/Source/dirreader.h
+++ b/Source/dirreader.h
@@ -1,56 +1,56 @@
-/*
- * dirreader.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <string>
-#include <set>
-
-class dir_reader {
-public:
-
- typedef std::set<std::string>::const_iterator iterator;
-
- dir_reader();
- virtual ~dir_reader() {}
-
- virtual void read(const std::string& dir) = 0;
-
- virtual const std::set<std::string>& files();
- virtual const std::set<std::string>& dirs();
-
- virtual void exclude(const std::string& spec);
- virtual void exclude(const std::set<std::string>& specs);
-
- static bool matches(const std::string& name, const std::string& spec);
-
-protected:
-
- virtual void add_file(const std::string& file);
- virtual void add_dir(const std::string& dir);
-
- virtual bool is_excluded(const std::string& name) const;
-
-private:
-
- std::set<std::string> m_excluded;
- std::set<std::string> m_wildcard_excluded;
-
- std::set<std::string> m_files;
- std::set<std::string> m_dirs;
-
-};
-
-dir_reader* new_dir_reader();
+/*
+ * dirreader.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <string>
+#include <set>
+
+class dir_reader {
+public:
+
+ typedef std::set<std::string>::const_iterator iterator;
+
+ dir_reader();
+ virtual ~dir_reader() {}
+
+ virtual void read(const std::string& dir) = 0;
+
+ virtual const std::set<std::string>& files();
+ virtual const std::set<std::string>& dirs();
+
+ virtual void exclude(const std::string& spec);
+ virtual void exclude(const std::set<std::string>& specs);
+
+ static bool matches(const std::string& name, const std::string& spec);
+
+protected:
+
+ virtual void add_file(const std::string& file);
+ virtual void add_dir(const std::string& dir);
+
+ virtual bool is_excluded(const std::string& name) const;
+
+private:
+
+ std::set<std::string> m_excluded;
+ std::set<std::string> m_wildcard_excluded;
+
+ std::set<std::string> m_files;
+ std::set<std::string> m_dirs;
+
+};
+
+dir_reader* new_dir_reader();
diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c
index 26cdd4f..5c91796 100755
--- a/Source/exehead/Main.c
+++ b/Source/exehead/Main.c
@@ -1,348 +1,348 @@
-/*
- * main.c: executable header main code
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-#include <shlobj.h>
-#include <shellapi.h>
-#include "resource.h"
-#include "util.h"
-#include "fileform.h"
-#include "state.h"
-#include "ui.h"
-#include "lang.h"
-#include "state.h"
-#include "exec.h"
-
-#if !defined(NSIS_CONFIG_VISIBLE_SUPPORT) && !defined(NSIS_CONFIG_SILENT_SUPPORT)
-#error One of NSIS_CONFIG_SILENT_SUPPORT or NSIS_CONFIG_VISIBLE_SUPPORT must be defined.
-#endif
-#ifdef NSIS_COMPRESS_WHOLE
-extern HANDLE dbd_hFile;
-#endif
-
-char g_caption[NSIS_MAX_STRLEN*2];
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-HWND g_hwnd;
-HANDLE g_hInstance;
-#endif
-
-void NSISCALL CleanUp();
-
-char *ValidateTempDir()
-{
- validate_filename(state_temp_dir);
- if (!validpathspec(state_temp_dir))
- return NULL;
- addtrailingslash(state_temp_dir);
- CreateDirectory(state_temp_dir, NULL);
- // state_language is used as a temp var here
- return my_GetTempFileName(state_language, state_temp_dir);
-}
-
-void *g_SHGetFolderPath;
-
-int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow)
-{
- int ret = 0;
- const char *m_Err = _LANG_ERRORWRITINGTEMP;
-
- int cl_flags = 0;
-
- char *realcmds;
- char seekchar=' ';
- char *cmdline;
-
- InitCommonControls();
-
- SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
-
-#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
- {
- extern HRESULT g_hres;
- g_hres=OleInitialize(NULL);
- }
-#endif
-
- // load shfolder.dll before any script code is executed to avoid
- // weird situations where SetOutPath or even the extraction of
- // shfolder.dll will cause unexpected behavior.
- //
- // this also prevents the following:
- //
- // SetOutPath "C:\Program Files\NSIS" # maybe read from reg
- // File shfolder.dll
- // Delete $PROGRAMFILES\shfolder.dll # can't be deleted, as the
- // # new shfolder.dll is used
- // # to find its own path.
- g_SHGetFolderPath = myGetProcAddress(MGA_SHGetFolderPathA);
-
- {
- // workaround for bug #1008632
- // http://sourceforge.net/tracker/index.php?func=detail&aid=1008632&group_id=22049&atid=373085
- //
- // without this, SHGetSpecialFolderLocation doesn't always recognize
- // some special folders, like the desktop folder for all users, on
- // Windows 9x. unlike SHGetSpecialFolderPath, which is not available
- // on all versions of Windows, SHGetSpecialFolderLocation doesn't try
- // too hard to make sure the caller gets what he asked for. so we give
- // it a little push in the right direction by doing part of the work
- // for it.
- //
- // part of what SHGetFileInfo does, is to convert a path into an idl.
- // to do this conversion, it first needs to initialize the list of
- // special idls, which are exactly the idls we use to get the paths
- // of special folders (CSIDL_*).
-
- SHFILEINFO shfi;
- SHGetFileInfo("", 0, &shfi, sizeof(SHFILEINFO), 0);
- }
-
- mystrcpy(g_caption,_LANG_GENERIC_ERROR);
-
- mystrcpy(state_command_line, GetCommandLine());
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- g_hInstance = GetModuleHandle(NULL);
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-
- cmdline = state_command_line;
- if (*cmdline == '\"') seekchar = *cmdline++;
-
- cmdline=findchar(cmdline, seekchar);
- cmdline=CharNext(cmdline);
- realcmds=cmdline;
-
- while (*cmdline)
- {
- // skip over any spaces
- while (*cmdline == ' ') cmdline++;
-
- // get char we should look for to get the next parm
- seekchar = ' ';
- if (cmdline[0] == '\"')
- {
- cmdline++;
- seekchar = '\"';
- }
-
- // is it a switch?
- if (cmdline[0] == '/')
- {
- cmdline++;
-
-// this only works with spaces because they have just one bit on
-#define END_OF_ARG(c) (((c)|' ')==' ')
-
-#if defined(NSIS_CONFIG_VISIBLE_SUPPORT) && defined(NSIS_CONFIG_SILENT_SUPPORT)
- if (cmdline[0] == 'S' && END_OF_ARG(cmdline[1]))
- cl_flags |= FH_FLAGS_SILENT;
-#endif//NSIS_CONFIG_SILENT_SUPPORT && NSIS_CONFIG_VISIBLE_SUPPORT
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- if (*(LPDWORD)cmdline == CHAR4_TO_DWORD('N','C','R','C') && END_OF_ARG(cmdline[4]))
- cl_flags |= FH_FLAGS_NO_CRC;
-#endif//NSIS_CONFIG_CRC_SUPPORT
-
- if (*(LPDWORD)(cmdline-2) == CHAR4_TO_DWORD(' ', '/', 'D','='))
- {
- *(LPDWORD)(cmdline-2)=0; // keep this from being passed to uninstaller if necessary
- mystrcpy(state_install_directory,cmdline+2);
- break; // /D= must always be last
- }
- }
-
- // skip over our parm
- cmdline = findchar(cmdline, seekchar);
- // skip the quote
- if (*cmdline == '\"')
- cmdline++;
- }
-
- GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
- if (!ValidateTempDir())
- {
- GetWindowsDirectory(state_temp_dir, NSIS_MAX_STRLEN - 5); // leave space for \Temp
- mystrcat(state_temp_dir, "\\Temp");
- if (!ValidateTempDir())
- {
- goto end;
- }
- }
- DeleteFile(state_language);
-
- m_Err = loadHeaders(cl_flags);
- if (m_Err) goto end;
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (g_is_uninstaller)
- {
- char *p = findchar(state_command_line, 0);
-
- // state_command_line has state_install_directory right after it in memory, so reading
- // a bit over state_command_line won't do any harm
- while (p >= state_command_line && *(LPDWORD)p != CHAR4_TO_DWORD(' ', '_', '?', '=')) p--;
-
- m_Err = _LANG_UNINSTINITERROR;
-
- if (p >= state_command_line)
- {
- *p=0; // terminate before "_?="
- p+=4; // skip over " _?="
- if (is_valid_instpath(p))
- {
- mystrcpy(state_install_directory, p);
- mystrcpy(state_output_directory, p);
- m_Err = 0;
- }
- else
- {
- goto end;
- }
- }
- else
- {
- int x;
-
- mystrcat(state_temp_dir,"~nsu.tmp");
-
- // check if already running from uninstaller temp dir
- // this prevents recursive uninstaller calls
- if (!lstrcmpi(state_temp_dir,state_exe_directory))
- goto end;
-
- CreateDirectory(state_temp_dir,NULL);
- SetCurrentDirectory(state_temp_dir);
-
- if (!state_install_directory[0])
- mystrcpy(state_install_directory,state_exe_directory);
-
- mystrcpy(g_usrvars[0], realcmds);
- *(LPWORD)g_usrvars[1] = CHAR2_TO_WORD('A',0);
-
- for (x = 0; x < 26; x ++)
- {
- static char buf2[NSIS_MAX_STRLEN];
-
- GetNSISString(buf2,g_header->str_uninstchild); // $TEMP\$1u_.exe
-
- DeleteFile(buf2); // clean up after all the other ones if they are there
-
- if (m_Err) // not done yet
- {
- // copy file
- if (CopyFile(state_exe_path,buf2,TRUE))
- {
- HANDLE hProc;
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- MoveFileOnReboot(buf2,NULL);
-#endif
- GetNSISString(buf2,g_header->str_uninstcmd); // '"$TEMP\$1u_.exe" $0 _?=$INSTDIR\'
- hProc=myCreateProcess(buf2);
- if (hProc)
- {
- CloseHandle(hProc);
- // success
- m_Err = 0;
- }
- }
- }
- g_usrvars[1][0]++;
- }
-
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- MoveFileOnReboot(state_temp_dir,NULL);
-#endif
-
- goto end;
- }
- }
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-
- g_exec_flags.errlvl = -1;
- ret = ui_doinstall();
-
-#ifdef NSIS_CONFIG_LOG
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
- log_write(1);
-#endif//!NSIS_CONFIG_LOG_ODS && !NSIS_CONFIG_LOG_STDOUT
-#endif//NSIS_CONFIG_LOG
-end:
-
- CleanUp();
-
-#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
- OleUninitialize();
-#endif
-
- if (m_Err)
- {
- my_MessageBox(m_Err, MB_OK | MB_ICONSTOP | (IDOK << 21));
- ExitProcess(2);
- return 0;
- }
-
-#ifdef NSIS_SUPPORT_REBOOT
- if (g_exec_flags.reboot_called)
- {
- BOOL (WINAPI *OPT)(HANDLE, DWORD,PHANDLE);
- BOOL (WINAPI *LPV)(LPCTSTR,LPCTSTR,PLUID);
- BOOL (WINAPI *ATP)(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
- OPT=myGetProcAddress(MGA_OpenProcessToken);
- LPV=myGetProcAddress(MGA_LookupPrivilegeValueA);
- ATP=myGetProcAddress(MGA_AdjustTokenPrivileges);
- if (OPT && LPV && ATP)
- {
- HANDLE hToken;
- TOKEN_PRIVILEGES tkp;
- if (OPT(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
- {
- LPV(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);
- tkp.PrivilegeCount = 1;
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- ATP(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
- }
- }
-
- if (!ExitWindowsEx(EWX_REBOOT,0))
- ExecuteCallbackFunction(CB_ONREBOOTFAILED);
- }
-#endif//NSIS_SUPPORT_REBOOT
-
- if (g_exec_flags.errlvl != -1)
- ret = g_exec_flags.errlvl;
-
- ExitProcess(ret);
- return 0;
-}
-
-void NSISCALL CleanUp()
-{
- if (g_db_hFile != INVALID_HANDLE_VALUE)
- {
- CloseHandle(g_db_hFile);
- g_db_hFile = INVALID_HANDLE_VALUE;
- }
-#ifdef NSIS_COMPRESS_WHOLE
- if (dbd_hFile != INVALID_HANDLE_VALUE)
- {
- CloseHandle(dbd_hFile);
- dbd_hFile = INVALID_HANDLE_VALUE;
- }
-#endif
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- // Clean up after plug-ins
- myDelete(state_plugins_dir, DEL_DIR | DEL_RECURSE | DEL_REBOOT);
-#endif // NSIS_CONFIG_PLUGIN_SUPPORT
-}
+/*
+ * main.c: executable header main code
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+#include <shlobj.h>
+#include <shellapi.h>
+#include "resource.h"
+#include "util.h"
+#include "fileform.h"
+#include "state.h"
+#include "ui.h"
+#include "lang.h"
+#include "state.h"
+#include "exec.h"
+
+#if !defined(NSIS_CONFIG_VISIBLE_SUPPORT) && !defined(NSIS_CONFIG_SILENT_SUPPORT)
+#error One of NSIS_CONFIG_SILENT_SUPPORT or NSIS_CONFIG_VISIBLE_SUPPORT must be defined.
+#endif
+#ifdef NSIS_COMPRESS_WHOLE
+extern HANDLE dbd_hFile;
+#endif
+
+char g_caption[NSIS_MAX_STRLEN*2];
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+HWND g_hwnd;
+HANDLE g_hInstance;
+#endif
+
+void NSISCALL CleanUp();
+
+char *ValidateTempDir()
+{
+ validate_filename(state_temp_dir);
+ if (!validpathspec(state_temp_dir))
+ return NULL;
+ addtrailingslash(state_temp_dir);
+ CreateDirectory(state_temp_dir, NULL);
+ // state_language is used as a temp var here
+ return my_GetTempFileName(state_language, state_temp_dir);
+}
+
+void *g_SHGetFolderPath;
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, int nCmdShow)
+{
+ int ret = 0;
+ const char *m_Err = _LANG_ERRORWRITINGTEMP;
+
+ int cl_flags = 0;
+
+ char *realcmds;
+ char seekchar=' ';
+ char *cmdline;
+
+ InitCommonControls();
+
+ SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
+
+#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
+ {
+ extern HRESULT g_hres;
+ g_hres=OleInitialize(NULL);
+ }
+#endif
+
+ // load shfolder.dll before any script code is executed to avoid
+ // weird situations where SetOutPath or even the extraction of
+ // shfolder.dll will cause unexpected behavior.
+ //
+ // this also prevents the following:
+ //
+ // SetOutPath "C:\Program Files\NSIS" # maybe read from reg
+ // File shfolder.dll
+ // Delete $PROGRAMFILES\shfolder.dll # can't be deleted, as the
+ // # new shfolder.dll is used
+ // # to find its own path.
+ g_SHGetFolderPath = myGetProcAddress(MGA_SHGetFolderPathA);
+
+ {
+ // workaround for bug #1008632
+ // http://sourceforge.net/tracker/index.php?func=detail&aid=1008632&group_id=22049&atid=373085
+ //
+ // without this, SHGetSpecialFolderLocation doesn't always recognize
+ // some special folders, like the desktop folder for all users, on
+ // Windows 9x. unlike SHGetSpecialFolderPath, which is not available
+ // on all versions of Windows, SHGetSpecialFolderLocation doesn't try
+ // too hard to make sure the caller gets what he asked for. so we give
+ // it a little push in the right direction by doing part of the work
+ // for it.
+ //
+ // part of what SHGetFileInfo does, is to convert a path into an idl.
+ // to do this conversion, it first needs to initialize the list of
+ // special idls, which are exactly the idls we use to get the paths
+ // of special folders (CSIDL_*).
+
+ SHFILEINFO shfi;
+ SHGetFileInfo("", 0, &shfi, sizeof(SHFILEINFO), 0);
+ }
+
+ mystrcpy(g_caption,_LANG_GENERIC_ERROR);
+
+ mystrcpy(state_command_line, GetCommandLine());
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ g_hInstance = GetModuleHandle(NULL);
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+
+ cmdline = state_command_line;
+ if (*cmdline == '\"') seekchar = *cmdline++;
+
+ cmdline=findchar(cmdline, seekchar);
+ cmdline=CharNext(cmdline);
+ realcmds=cmdline;
+
+ while (*cmdline)
+ {
+ // skip over any spaces
+ while (*cmdline == ' ') cmdline++;
+
+ // get char we should look for to get the next parm
+ seekchar = ' ';
+ if (cmdline[0] == '\"')
+ {
+ cmdline++;
+ seekchar = '\"';
+ }
+
+ // is it a switch?
+ if (cmdline[0] == '/')
+ {
+ cmdline++;
+
+// this only works with spaces because they have just one bit on
+#define END_OF_ARG(c) (((c)|' ')==' ')
+
+#if defined(NSIS_CONFIG_VISIBLE_SUPPORT) && defined(NSIS_CONFIG_SILENT_SUPPORT)
+ if (cmdline[0] == 'S' && END_OF_ARG(cmdline[1]))
+ cl_flags |= FH_FLAGS_SILENT;
+#endif//NSIS_CONFIG_SILENT_SUPPORT && NSIS_CONFIG_VISIBLE_SUPPORT
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ if (*(LPDWORD)cmdline == CHAR4_TO_DWORD('N','C','R','C') && END_OF_ARG(cmdline[4]))
+ cl_flags |= FH_FLAGS_NO_CRC;
+#endif//NSIS_CONFIG_CRC_SUPPORT
+
+ if (*(LPDWORD)(cmdline-2) == CHAR4_TO_DWORD(' ', '/', 'D','='))
+ {
+ *(LPDWORD)(cmdline-2)=0; // keep this from being passed to uninstaller if necessary
+ mystrcpy(state_install_directory,cmdline+2);
+ break; // /D= must always be last
+ }
+ }
+
+ // skip over our parm
+ cmdline = findchar(cmdline, seekchar);
+ // skip the quote
+ if (*cmdline == '\"')
+ cmdline++;
+ }
+
+ GetTempPath(NSIS_MAX_STRLEN, state_temp_dir);
+ if (!ValidateTempDir())
+ {
+ GetWindowsDirectory(state_temp_dir, NSIS_MAX_STRLEN - 5); // leave space for \Temp
+ mystrcat(state_temp_dir, "\\Temp");
+ if (!ValidateTempDir())
+ {
+ goto end;
+ }
+ }
+ DeleteFile(state_language);
+
+ m_Err = loadHeaders(cl_flags);
+ if (m_Err) goto end;
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (g_is_uninstaller)
+ {
+ char *p = findchar(state_command_line, 0);
+
+ // state_command_line has state_install_directory right after it in memory, so reading
+ // a bit over state_command_line won't do any harm
+ while (p >= state_command_line && *(LPDWORD)p != CHAR4_TO_DWORD(' ', '_', '?', '=')) p--;
+
+ m_Err = _LANG_UNINSTINITERROR;
+
+ if (p >= state_command_line)
+ {
+ *p=0; // terminate before "_?="
+ p+=4; // skip over " _?="
+ if (is_valid_instpath(p))
+ {
+ mystrcpy(state_install_directory, p);
+ mystrcpy(state_output_directory, p);
+ m_Err = 0;
+ }
+ else
+ {
+ goto end;
+ }
+ }
+ else
+ {
+ int x;
+
+ mystrcat(state_temp_dir,"~nsu.tmp");
+
+ // check if already running from uninstaller temp dir
+ // this prevents recursive uninstaller calls
+ if (!lstrcmpi(state_temp_dir,state_exe_directory))
+ goto end;
+
+ CreateDirectory(state_temp_dir,NULL);
+ SetCurrentDirectory(state_temp_dir);
+
+ if (!state_install_directory[0])
+ mystrcpy(state_install_directory,state_exe_directory);
+
+ mystrcpy(g_usrvars[0], realcmds);
+ *(LPWORD)g_usrvars[1] = CHAR2_TO_WORD('A',0);
+
+ for (x = 0; x < 26; x ++)
+ {
+ static char buf2[NSIS_MAX_STRLEN];
+
+ GetNSISString(buf2,g_header->str_uninstchild); // $TEMP\$1u_.exe
+
+ DeleteFile(buf2); // clean up after all the other ones if they are there
+
+ if (m_Err) // not done yet
+ {
+ // copy file
+ if (CopyFile(state_exe_path,buf2,TRUE))
+ {
+ HANDLE hProc;
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ MoveFileOnReboot(buf2,NULL);
+#endif
+ GetNSISString(buf2,g_header->str_uninstcmd); // '"$TEMP\$1u_.exe" $0 _?=$INSTDIR\'
+ hProc=myCreateProcess(buf2);
+ if (hProc)
+ {
+ CloseHandle(hProc);
+ // success
+ m_Err = 0;
+ }
+ }
+ }
+ g_usrvars[1][0]++;
+ }
+
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ MoveFileOnReboot(state_temp_dir,NULL);
+#endif
+
+ goto end;
+ }
+ }
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+
+ g_exec_flags.errlvl = -1;
+ ret = ui_doinstall();
+
+#ifdef NSIS_CONFIG_LOG
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+ log_write(1);
+#endif//!NSIS_CONFIG_LOG_ODS && !NSIS_CONFIG_LOG_STDOUT
+#endif//NSIS_CONFIG_LOG
+end:
+
+ CleanUp();
+
+#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
+ OleUninitialize();
+#endif
+
+ if (m_Err)
+ {
+ my_MessageBox(m_Err, MB_OK | MB_ICONSTOP | (IDOK << 21));
+ ExitProcess(2);
+ return 0;
+ }
+
+#ifdef NSIS_SUPPORT_REBOOT
+ if (g_exec_flags.reboot_called)
+ {
+ BOOL (WINAPI *OPT)(HANDLE, DWORD,PHANDLE);
+ BOOL (WINAPI *LPV)(LPCTSTR,LPCTSTR,PLUID);
+ BOOL (WINAPI *ATP)(HANDLE,BOOL,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD);
+ OPT=myGetProcAddress(MGA_OpenProcessToken);
+ LPV=myGetProcAddress(MGA_LookupPrivilegeValueA);
+ ATP=myGetProcAddress(MGA_AdjustTokenPrivileges);
+ if (OPT && LPV && ATP)
+ {
+ HANDLE hToken;
+ TOKEN_PRIVILEGES tkp;
+ if (OPT(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
+ {
+ LPV(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);
+ tkp.PrivilegeCount = 1;
+ tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ ATP(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
+ }
+ }
+
+ if (!ExitWindowsEx(EWX_REBOOT,0))
+ ExecuteCallbackFunction(CB_ONREBOOTFAILED);
+ }
+#endif//NSIS_SUPPORT_REBOOT
+
+ if (g_exec_flags.errlvl != -1)
+ ret = g_exec_flags.errlvl;
+
+ ExitProcess(ret);
+ return 0;
+}
+
+void NSISCALL CleanUp()
+{
+ if (g_db_hFile != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(g_db_hFile);
+ g_db_hFile = INVALID_HANDLE_VALUE;
+ }
+#ifdef NSIS_COMPRESS_WHOLE
+ if (dbd_hFile != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(dbd_hFile);
+ dbd_hFile = INVALID_HANDLE_VALUE;
+ }
+#endif
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ // Clean up after plug-ins
+ myDelete(state_plugins_dir, DEL_DIR | DEL_RECURSE | DEL_REBOOT);
+#endif // NSIS_CONFIG_PLUGIN_SUPPORT
+}
diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript
index 9baa3bb..b004c79 100755
--- a/Source/exehead/SConscript
+++ b/Source/exehead/SConscript
@@ -1,101 +1,101 @@
-files = Split("""
- bgbg.c
- components.c
- exec.c
- fileform.c
- Main.c
- Ui.c
- util.c
- #Source/crc32.c
-""")
-
-resources = Split("""
- resource.rc
-""")
-
-resource_files = Split("""
- nsis.ico
- uninst.ico
- bitmap1.bmp
-""")
-
-bzip2_files = Split("""
- #Source/bzip2/bzlib.c
- #Source/bzip2/decompress.c
- #Source/bzip2/huffman.c
-""")
-
-lzma_files = Split("""
- #Source/7zip/LZMADecode.c
-""")
-
-zlib_files = Split("""
- #Source/zlib/INFBLOCK.C
-""")
-
-libs = Split("""
- kernel32
- user32
- gdi32
- shell32
- advapi32
- comdlg32
- comctl32
- ole32
- version
- uuid
-""")
-
-Import('env compression solid_compression')
-
-### Defines
-
-env.Append(CPPDEFINES = ['EXEHEAD'])
-env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
-env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
-
-### Some other settings
-
-if 'NSIS_CONFIG_LOG_STDOUT' in env['NSIS_CPPDEFINES']:
- env.Append(LINKFLAGS = env['SUBSYS_CON'])
-
-### Compression specific configuration
-
-if compression == 'bzip2':
- env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_BZIP2'])
- files += bzip2_files
-elif compression == 'lzma':
- env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_LZMA'])
- env.Append(CPPDEFINES = ['LZMACALL=__fastcall'])
- files += lzma_files
-elif compression == 'zlib':
- env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_ZLIB'])
- env.Append(CPPDEFINES = ['ZEXPORT=__stdcall'])
- files += zlib_files
-
-if solid_compression:
- env.Append(CPPDEFINES = ['NSIS_COMPRESS_WHOLE'])
-
-### Build with no sub-build-directories
-
-objs = []
-
-def basename(file):
- return file.split('/')[-1].split('.')[0]
-
-for file in files:
- objs.append(env.Object(target = basename(file), source = file))
-
-### Resources
-
-res = env.RES(resources)
-env.Depends(res, resource_files)
-objs = objs + res
-
-### Build stub
-
-stub = env.Program(target = 'stub_' + compression, source = objs, LIBS = libs)
-
-### Return stub
-
-Return('stub')
+files = Split("""
+ bgbg.c
+ components.c
+ exec.c
+ fileform.c
+ Main.c
+ Ui.c
+ util.c
+ #Source/crc32.c
+""")
+
+resources = Split("""
+ resource.rc
+""")
+
+resource_files = Split("""
+ nsis.ico
+ uninst.ico
+ bitmap1.bmp
+""")
+
+bzip2_files = Split("""
+ #Source/bzip2/bzlib.c
+ #Source/bzip2/decompress.c
+ #Source/bzip2/huffman.c
+""")
+
+lzma_files = Split("""
+ #Source/7zip/LZMADecode.c
+""")
+
+zlib_files = Split("""
+ #Source/zlib/INFBLOCK.C
+""")
+
+libs = Split("""
+ kernel32
+ user32
+ gdi32
+ shell32
+ advapi32
+ comdlg32
+ comctl32
+ ole32
+ version
+ uuid
+""")
+
+Import('env compression solid_compression')
+
+### Defines
+
+env.Append(CPPDEFINES = ['EXEHEAD'])
+env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN'])
+env.Append(CPPDEFINES = ['_WIN32_IE=0x0500'])
+
+### Some other settings
+
+if 'NSIS_CONFIG_LOG_STDOUT' in env['NSIS_CPPDEFINES']:
+ env.Append(LINKFLAGS = env['SUBSYS_CON'])
+
+### Compression specific configuration
+
+if compression == 'bzip2':
+ env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_BZIP2'])
+ files += bzip2_files
+elif compression == 'lzma':
+ env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_LZMA'])
+ env.Append(CPPDEFINES = ['LZMACALL=__fastcall'])
+ files += lzma_files
+elif compression == 'zlib':
+ env.Append(CPPDEFINES = ['NSIS_COMPRESS_USE_ZLIB'])
+ env.Append(CPPDEFINES = ['ZEXPORT=__stdcall'])
+ files += zlib_files
+
+if solid_compression:
+ env.Append(CPPDEFINES = ['NSIS_COMPRESS_WHOLE'])
+
+### Build with no sub-build-directories
+
+objs = []
+
+def basename(file):
+ return file.split('/')[-1].split('.')[0]
+
+for file in files:
+ objs.append(env.Object(target = basename(file), source = file))
+
+### Resources
+
+res = env.RES(resources)
+env.Depends(res, resource_files)
+objs = objs + res
+
+### Build stub
+
+stub = env.Program(target = 'stub_' + compression, source = objs, LIBS = libs)
+
+### Return stub
+
+Return('stub')
diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c
index 65f5f5f..7f9ce03 100755
--- a/Source/exehead/Ui.c
+++ b/Source/exehead/Ui.c
@@ -1,1692 +1,1692 @@
-/*
- * Ui.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 Nullsoft, Jeff Doozan 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.
- */
-
-#include <windowsx.h>
-#include <shlobj.h>
-#include <shellapi.h>
-#include <shlwapi.h>
-
-#include "../Platform.h"
-
-#include "resource.h"
-
-#include "fileform.h"
-#include "state.h"
-#include "util.h"
-#include "ui.h"
-#include "exec.h"
-#include "lang.h"
-#include "components.h"
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-HICON g_hIcon;
-#endif
-
-int dlg_offset;
-int ui_dlg_visible=0; // At start main window is not visible
-int g_quit_flag; // set when Quit has been called (meaning bail out ASAP)
-
-#if NSIS_MAX_INST_TYPES > 32 || NSIS_MAX_INST_TYPES < 1
-#error invalid value for NSIS_MAX_INST_TYPES
-#endif
-
-int progress_bar_pos, progress_bar_len;
-
-#if NSIS_MAX_STRLEN < 1024
-static char g_tmp[4096];
-#else
-static char g_tmp[NSIS_MAX_STRLEN * 4];
-#endif
-
-static int m_page=-1,m_retcode,m_delta;
-static page *g_this_page;
-
-#define NOTIFY_BYE_BYE 'x'
-
-static void NSISCALL outernotify(int delta) {
- if (delta==NOTIFY_BYE_BYE)
- g_quit_flag++;
- SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,(WPARAM)delta,0);
-}
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
-#ifdef NSIS_CONFIG_LICENSEPAGE
-static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-#endif
-static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-
-static DWORD WINAPI install_thread(LPVOID p);
-
-void NSISCALL CleanUp();
-
-HWND insthwnd, insthwnd2, insthwndbutton;
-
-HWND m_curwnd;
-static HWND m_bgwnd, m_hwndOK, m_hwndCancel;
-
-static BOOL NSISCALL SetDlgItemTextFromLang_(HWND dlg, int id, int lid) {
- return my_SetDialogItemText(dlg,id+1000,GetNSISStringTT(lid));
-}
-
-static void NSISCALL SetNextDef()
-{
- SendMessage(g_exec_flags.abort ? m_hwndCancel : m_hwndOK, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE);
-}
-
-static void NSISCALL EnableNext(BOOL e)
-{
- EnableWindow(m_hwndOK, e);
-}
-
-static void NSISCALL SetActiveCtl(HWND hCtl)
-{
- SendMessage(g_hwnd, WM_NEXTDLGCTL, (WPARAM) hCtl, TRUE);
-}
-
-static void NSISCALL NotifyCurWnd(UINT uNotifyCode)
-{
- if (m_curwnd)
- SendMessage(m_curwnd, uNotifyCode, 0, 0);
-}
-
-#define SetDlgItemTextFromLang(dlg,id,lid) SetDlgItemTextFromLang_(dlg,(id)-1000,lid)
-
-#define SetUITextFromLang(it,la) SetDlgItemTextFromLang_(hwndDlg,(it)-1000,la)
-#define SetUITextNT(it,text) my_SetDialogItemText(hwndDlg,it,text)
-#define GetUIText(it,s) my_GetDialogItemText(it,s)
-#define GetUIItem(it) GetDlgItem(hwndDlg,it)
-
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
-#define HandleStaticBkColor() _HandleStaticBkColor(uMsg, wParam, lParam)
-static BOOL NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if ((uMsg - WM_CTLCOLOREDIT) <= (WM_CTLCOLORSTATIC - WM_CTLCOLOREDIT))
- {
- ctlcolors *c = (ctlcolors *)GetWindowLong((HWND)lParam, GWL_USERDATA);
-
- if (c) {
- COLORREF text;
- LOGBRUSH lh;
-
- text = c->text;
- if (c->flags & CC_TEXT_SYS)
- text = GetSysColor(text);
- if (c->flags & CC_TEXT)
- SetTextColor((HDC)wParam, text);
-
- SetBkMode((HDC)wParam, c->bkmode);
-
- lh.lbColor = c->bkc;
- if (c->flags & CC_BK_SYS)
- lh.lbColor = GetSysColor(lh.lbColor);
- if (c->flags & CC_BK)
- SetBkColor((HDC)wParam, lh.lbColor);
-
- if (c->flags & CC_BKB)
- {
- lh.lbStyle = c->lbStyle;
- if (c->bkb)
- DeleteObject(c->bkb);
- c->bkb = CreateBrushIndirect(&lh);
- }
-
- return (BOOL)c->bkb;
- }
- }
- return 0;
-}
-#else
-#define HandleStaticBkColor() 0
-#endif//!NSIS_CONFIG_ENHANCEDUI_SUPPORT
-
-#ifdef NSIS_CONFIG_LOG
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
-void NSISCALL build_g_logfile()
-{
- mystrcat(addtrailingslash(mystrcpy(g_log_file,state_install_directory)),"install.log");
-}
-#endif
-#endif
-
-int *cur_langtable;
-
-static void NSISCALL set_language()
-{
- LANGID lang_mask=(LANGID)~0;
- LANGID lang=myatoi(state_language);
- char *language_table=0;
- int lang_num;
- int *selected_langtable=0;
-
-lang_again:
- lang_num=g_blocks[NB_LANGTABLES].num;
- while (lang_num--) {
- language_table=((char*)g_blocks[NB_LANGTABLES].offset)+lang_num*g_header->langtable_size;
- if (!((lang ^ *(LANGID*)language_table) & lang_mask)) {
- dlg_offset=*(int*)(language_table+sizeof(LANGID));
- g_exec_flags.rtl=*(int*)(language_table+sizeof(LANGID)+sizeof(int));
- selected_langtable=(int*)(language_table+sizeof(LANGID)+2*sizeof(int));
- break;
- }
- }
- if (!selected_langtable) {
- if (lang_mask == (LANGID)~0)
- lang_mask=0x3ff; // primary lang
- else // we already tried once and we still don't have a language table
- lang_mask=0; // first lang
- goto lang_again;
- }
-
- cur_langtable = selected_langtable;
-
- myitoa(state_language, *(LANGID*)language_table);
- {
- char *caption = GetNSISString(g_caption,LANG_CAPTION);
-#ifdef NSIS_SUPPORT_BGBG
- my_SetWindowText(m_bgwnd, caption);
-#endif
- }
-
- // reload section names
- {
- section *sec = g_sections;
- int x = num_sections;
-
- while (x--)
- {
- if (sec->name_ptr)
- {
- GetNSISString(sec->name, sec->name_ptr);
- }
- sec++;
- }
- }
-}
-
-FORCE_INLINE int NSISCALL ui_doinstall(void)
-{
- header *header = g_header;
- static WNDCLASS wc; // richedit subclassing and bgbg creation
-
- // detect default language
- // more information at:
- // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_0xrn.asp
-
- LANGID (WINAPI *GUDUIL)();
-
- GUDUIL = myGetProcAddress(MGA_GetUserDefaultUILanguage);
- if (GUDUIL)
- {
- // Windows ME/2000+
- myitoa(state_language, GUDUIL());
- }
- else
- {
- static const char reg_9x_locale[] = "Control Panel\\Desktop\\ResourceLocale";
- static const char reg_nt_locale_key[] = ".DEFAULT\\Control Panel\\International";
- const char *reg_nt_locale_val = &reg_9x_locale[30]; // = "Locale" with opt
-
- *(DWORD*)state_language = CHAR4_TO_DWORD('0', 'x', 0, 0);
-
- {
- // Windows 9x
- myRegGetStr(HKEY_CURRENT_USER, reg_9x_locale, NULL, g_tmp, 0);
- }
-
- if (!g_tmp[0])
- {
- // Windows NT
- // This key exists on 9x as well, so it's only read if ResourceLocale wasn't found
- myRegGetStr(HKEY_USERS, reg_nt_locale_key, reg_nt_locale_val, g_tmp, 0);
- }
-
- mystrcat(state_language, g_tmp);
- }
-
- // set default language
- set_language();
-
- // initialize auto close flag
- g_exec_flags.autoclose=g_flags&CH_FLAGS_AUTO_CLOSE;
-
- // read install directory from registry
- if (!is_valid_instpath(state_install_directory))
- {
- if (header->install_reg_key_ptr)
- {
- myRegGetStr(
- (HKEY)header->install_reg_rootkey,
- GetNSISStringNP(header->install_reg_key_ptr),
- GetNSISStringNP(header->install_reg_value_ptr),
- ps_tmpbuf,
- 0
- );
- if (ps_tmpbuf[0])
- {
- char *p=ps_tmpbuf;
- char *e;
- if (p[0]=='\"')
- {
- char *p2;
- p++;
- p2 = findchar(p, '"');
- *p2 = 0;
- }
- // p is the path now, check for .exe extension
-
- e=p+mystrlen(p)-4;
- if (e > p)
- {
- // if filename ends in .exe, and is not a directory, remove the filename
- if (!lstrcmpi(e, ".exe")) // check extension
- {
- DWORD d;
- d=GetFileAttributes(p);
- if (d == INVALID_FILE_ATTRIBUTES || !(d&FILE_ATTRIBUTE_DIRECTORY))
- {
- // if there is no back-slash, the string will become empty, but that's ok because
- // it would make an invalid instdir anyway
- trimslashtoend(p);
- }
- }
- }
-
- mystrcpy(state_install_directory,addtrailingslash(p));
- }
- }
- }
- if (!is_valid_instpath(state_install_directory))
- {
- GetNSISString(state_install_directory,header->install_directory_ptr);
- }
-
-#ifdef NSIS_CONFIG_LOG
- if (g_flags & CH_FLAGS_SILENT_LOG && !g_is_uninstaller)
- {
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
- build_g_logfile();
-#endif
- log_dolog=1;
- }
-#endif
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- g_hIcon=LoadImage(g_hInstance,MAKEINTRESOURCE(IDI_ICON2),IMAGE_ICON,0,0,LR_DEFAULTSIZE|LR_SHARED);
-#ifdef NSIS_SUPPORT_BGBG
- if (header->bg_color1 != -1)
- {
- DWORD cn = CHAR4_TO_DWORD('_', 'N', 'b', 0);
- RECT vp;
- extern LRESULT CALLBACK BG_WndProc(HWND, UINT, WPARAM, LPARAM);
- wc.lpfnWndProc = BG_WndProc;
- wc.hInstance = g_hInstance;
- wc.hIcon = g_hIcon;
- //wc.hCursor = LoadCursor(NULL,IDC_ARROW);
- wc.lpszClassName = (LPCSTR)&cn;
-
- if (!RegisterClass(&wc)) return 0;
-
- SystemParametersInfo(SPI_GETWORKAREA, 0, &vp, 0);
-
- m_bgwnd = CreateWindowEx(WS_EX_TOOLWINDOW,(LPCSTR)&cn,0,WS_POPUP,
- vp.left,vp.top,vp.right-vp.left,vp.bottom-vp.top,0,NULL,g_hInstance,NULL);
- }
-
-#endif//NSIS_SUPPORT_BGBG
-
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- // Select language
- if (ExecuteCallbackFunction(CB_ONINIT)) return 2;
- set_language();
-#endif
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- if (!g_exec_flags.silent)
-#endif//NSIS_CONFIG_SILENT_SUPPORT
- {
-#ifdef NSIS_SUPPORT_BGBG
- ShowWindow(m_bgwnd, SW_SHOW);
-#endif//NSIS_SUPPORT_BGBG
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
- { // load richedit DLL
- static const char riched20[]="RichEd20";
- static const char riched32[]="RichEd32";
- static const char richedit20a[]="RichEdit20A";
- static const char richedit[]="RichEdit";
- if (!LoadLibrary(riched20))
- {
- LoadLibrary(riched32);
- }
-
- // make richedit20a point to RICHEDIT
- if (!GetClassInfo(NULL,richedit20a,&wc))
- {
- GetClassInfo(NULL,richedit,&wc);
- wc.lpszClassName = richedit20a;
- RegisterClass(&wc);
- }
- }
-#endif
-
- {
- int ret=DialogBox(g_hInstance,MAKEINTRESOURCE(IDD_INST+dlg_offset),0,DialogProc);
-#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
- ExecuteCallbackFunction(CB_ONGUIEND);
-#endif
- return ret;
- }
- }
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- else
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- {
- if (install_thread(NULL))
- {
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (!g_quit_flag) ExecuteCallbackFunction(CB_ONINSTFAILED);
-#endif//NSIS_SUPPORT_CODECALLBACKS
- return 2;
- }
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- ExecuteCallbackFunction(CB_ONINSTSUCCESS);
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
- return 0;
- }
-#endif//NSIS_CONFIG_SILENT_SUPPORT
-}
-
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
-{
- if (uMsg==BFFM_INITIALIZED)
- {
- my_GetDialogItemText(IDC_DIR,(char*)lpData);
- SendMessage(hwnd,BFFM_SETSELECTION,(WPARAM)1,lpData);
- }
- if (uMsg==BFFM_SELCHANGED)
- {
- SendMessage(
- hwnd,
- BFFM_ENABLEOK,
- 0,
- SHGetPathFromIDList((LPITEMIDLIST)lParam,(char*)lpData)
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- && !ExecuteCallbackFunction(CB_ONVERIFYINSTDIR)
-#endif
- );
- }
- return 0;
-}
-
-BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
- {
- page *this_page;
- static DLGPROC winprocs[]=
- {
-#ifdef NSIS_CONFIG_LICENSEPAGE
- LicenseProc,
-#endif
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- SelProc,
-#endif
- DirProc,
- InstProc,
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- UninstProc
-#endif
- };
-
- m_delta = wParam;
-
- if (uMsg == WM_INITDIALOG)
- {
- g_hwnd=hwndDlg;
- m_hwndOK=GetDlgItem(hwndDlg,IDOK);
- m_hwndCancel=GetDlgItem(hwndDlg,IDCANCEL);
- SetDlgItemTextFromLang(hwndDlg,IDC_VERSTR,LANG_BRANDING);
- SetClassLong(hwndDlg,GCL_HICON,(long)g_hIcon);
- // use the following line instead of the above, if .rdata needs shirking
- //SendMessage(hwndDlg,WM_SETICON,ICON_BIG,(LPARAM)g_hIcon);
-#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
- g_quit_flag = ExecuteCallbackFunction(CB_ONGUIINIT);
-#endif
- //ShowWindow(hwndDlg, SW_SHOW);
- m_delta = 1;
- }
-
- this_page=g_pages+m_page;
-
- if (m_page>=0) {
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- // Call leave function. If Abort used don't move to the next page.
- // But if quit called we must exit now
- if (m_delta==1) if (ExecuteCodeSegment(this_page->leavefunc,NULL)) {
- SendMessage(m_curwnd, WM_IN_UPDATEMSG, 0, 1);
- return !g_quit_flag;
- }
-#endif
-
- // if the last page was a custom page, wait for it to finish by itself.
- // if it doesn't, it's a BAD plugin.
- // plugins should react to WM_NOTIFY_OUTER_NEXT.
- if (!this_page->dlg_id) return 0;
- }
-
- NotifyCurWnd(WM_NOTIFY_INIGO_MONTOYA);
-
-nextPage:
- m_page+=m_delta;
- this_page+=m_delta;
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (m_page==g_blocks[NB_PAGES].num) ExecuteCallbackFunction(CB_ONINSTSUCCESS);
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
- if (g_quit_flag || (unsigned int)m_page >= (unsigned int)g_blocks[NB_PAGES].num)
- {
- DestroyWindow(m_curwnd);
- g_hwnd = 0;
- EndDialog(hwndDlg,m_retcode);
- }
- else
- {
- HWND hwndtmp;
-
- int pflags = this_page->flags;
-
- GetNSISString(state_click_next, this_page->clicknext);
- SetDlgItemTextFromLang(hwndDlg, IDOK, this_page->next);
- SetDlgItemTextFromLang(hwndDlg, IDC_BACK, this_page->back);
- SetDlgItemTextFromLang(hwndDlg, IDCANCEL, this_page->cancel);
-
- hwndtmp = GetDlgItem(hwndDlg, IDC_BACK);
-
- if (g_exec_flags.abort)
- {
- pflags &= ~(PF_BACK_ENABLE | PF_NEXT_ENABLE);
- pflags |= PF_CANCEL_ENABLE;
- }
-
- ShowWindow(hwndtmp, pflags & PF_BACK_SHOW);// SW_HIDE = 0, PF_BACK_SHOW = SW_SHOWNA = 8
- EnableWindow(hwndtmp, pflags & PF_BACK_ENABLE);
- EnableNext(pflags & PF_NEXT_ENABLE);
- EnableWindow(m_hwndCancel, pflags & PF_CANCEL_ENABLE);
-
- if (pflags & PF_CANCEL_ENABLE)
- EnableMenuItem(GetSystemMenu(hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
- else
- EnableMenuItem(GetSystemMenu(hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
-
- SendMessage(hwndtmp, BM_SETSTYLE, BS_PUSHBUTTON, TRUE);
-
- if (g_exec_flags.abort)
- {
- SendMessage(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
- SetActiveCtl(m_hwndCancel);
- }
- else
- {
- SetActiveCtl(m_hwndOK);
- }
-
- mystrcpy(g_tmp,g_caption);
- GetNSISString(g_tmp+mystrlen(g_tmp),this_page->caption);
- my_SetWindowText(hwndDlg,g_tmp);
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- // custom page or user used abort in prefunc
- if (ExecuteCodeSegment(this_page->prefunc, NULL) || !this_page->dlg_id) {
- goto nextPage;
- }
-#endif //NSIS_SUPPORT_CODECALLBACKS
-
- if (this_page->wndproc_id != PWP_COMPLETED)
- {
- DestroyWindow(m_curwnd);
- }
- else {
- if (!g_exec_flags.abort && g_exec_flags.autoclose)
- goto nextPage;
- // no need to go to skipPage because PWP_COMPLETED always follows PWP_INSTFILES
- return FALSE;
- }
-
- // update g_this_page for the dialog proc
- g_this_page=this_page;
-
- if (this_page->dlg_id > 0) // NSIS page
- {
- m_curwnd=CreateDialogParam(
- g_hInstance,
- MAKEINTRESOURCE(this_page->dlg_id+dlg_offset),
- hwndDlg,winprocs[this_page->wndproc_id],(LPARAM)this_page
- );
- if (m_curwnd)
- {
- RECT r;
-
- SetDlgItemTextFromLang(m_curwnd,IDC_INTROTEXT,this_page->parms[0]);
-
- GetWindowRect(GetDlgItem(hwndDlg,IDC_CHILDRECT),&r);
- ScreenToClient(hwndDlg,(LPPOINT)&r);
- SetWindowPos(m_curwnd,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- ExecuteCodeSegment(this_page->showfunc,NULL);
- if (g_quit_flag)
- return FALSE;
-#endif //NSIS_SUPPORT_CODECALLBACKS
- ShowWindow(m_curwnd,SW_SHOWNA);
- NotifyCurWnd(WM_NOTIFY_START);
- }
- }
- }
-
-skipPage:
-
- if (!ui_dlg_visible && m_curwnd)
- {
- ShowWindow(hwndDlg, SW_SHOWDEFAULT);
- ui_dlg_visible = 1;
- }
-
- return FALSE;
- }
-
-#ifdef NSIS_SUPPORT_BGBG
- if (uMsg == WM_WINDOWPOSCHANGED)
- {
- SetWindowPos(m_bgwnd, hwndDlg, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
- }
- if (uMsg == WM_SIZE) {
- ShowWindow(m_bgwnd, wParam == SIZE_MINIMIZED ? SW_HIDE : SW_SHOW);
- }
-#endif //NSIS_SUPPORT_BGBG
-
- if (uMsg == WM_NOTIFY_CUSTOM_READY) {
- DestroyWindow(m_curwnd);
- m_curwnd = (HWND)wParam;
- goto skipPage;
- }
- if (uMsg == WM_QUERYENDSESSION)
- {
- SetWindowLong(hwndDlg, DWL_MSGRESULT, FALSE);
- return TRUE;
- }
- if (uMsg == WM_COMMAND)
- {
- int id = LOWORD(wParam);
- HWND hCtl = GetDlgItem(hwndDlg, id); // lParam might be NULL
- if (hCtl)
- {
- SendMessage(hCtl, BM_SETSTATE, FALSE, 0);
- if (!IsWindowEnabled(hCtl))
- return 0;
- }
-
- if (id == IDOK)
- {
- outernotify(1);
- }
- else if (id == IDC_BACK && m_page>0)
- {
- outernotify(-1);
- }
- else if (id == IDCANCEL)
- {
- if (g_exec_flags.abort)
- {
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- ExecuteCallbackFunction(CB_ONINSTFAILED);
-#endif//NSIS_SUPPORT_CODECALLBACKS
- m_retcode=2;
- outernotify(NOTIFY_BYE_BYE);
- }
- else
- {
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (!ExecuteCallbackFunction(CB_ONUSERABORT))
-#endif//NSIS_SUPPORT_CODECALLBACKS
- {
- m_retcode=1;
- outernotify(NOTIFY_BYE_BYE);
- }
- }
- }
- else
- {
- // Forward WM_COMMANDs to inner dialogs, can be custom ones.
- // Without this, enter on buttons in inner dialogs won't work.
- SendMessage(m_curwnd, WM_COMMAND, wParam, lParam);
- }
- }
- return HandleStaticBkColor();
-}
-
-#define this_page ((page*)lParam)
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
-
-#define _RICHEDIT_VER 0x0200
-#include <richedit.h>
-#undef _RICHEDIT_VER
-static DWORD dwRead;
-DWORD CALLBACK StreamLicense(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
-{
- lstrcpyn(pbBuff,(char*)dwCookie+dwRead,cb);
- *pcb=mystrlen(pbBuff);
- dwRead+=*pcb;
- return 0;
-}
-
-static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- page *m_this_page=g_this_page;
- HWND hwLicense;
- static int ignoreWMCommand;
-
- if (uMsg == WM_INITDIALOG)
- {
- char *l = (char *)GetNSISStringNP(GetNSISTab(this_page->parms[1]));
- int lt = *l;
- EDITSTREAM es = {
- (DWORD)(++l),
- 0,
- StreamLicense
- };
-
- int selected = (this_page->flags & PF_LICENSE_SELECTED) | !(this_page->flags & PF_LICENSE_FORCE_SELECTION);
-
- SetUITextFromLang(IDC_LICENSEAGREE,this_page->parms[2]);
- SetUITextFromLang(IDC_LICENSEDISAGREE,this_page->parms[3]);
- CheckDlgButton(hwndDlg,IDC_LICENSEAGREE+!selected,BST_CHECKED);
- EnableNext(selected);
-
- hwLicense=GetUIItem(IDC_EDIT1);
- SetActiveCtl(hwLicense);
- SendMessage(hwLicense,EM_AUTOURLDETECT,TRUE,0);
-#define lbg g_header->license_bg
- SendMessage(hwLicense,EM_SETBKGNDCOLOR,0,lbg>=0?lbg:GetSysColor(-lbg));
-#undef lbg
- SendMessage(hwLicense,EM_SETEVENTMASK,0,ENM_LINK|ENM_KEYEVENTS); //XGE 8th September 2002 Or'd in ENM_KEYEVENTS
- dwRead=0;
- SendMessage(hwLicense,EM_EXLIMITTEXT,0,mystrlen(l));
- SendMessage(hwLicense,EM_STREAMIN,lt,(LPARAM)&es);
- ignoreWMCommand = 0;
- return FALSE;
- }
- if (uMsg == WM_COMMAND && HIWORD(wParam) == BN_CLICKED && !ignoreWMCommand) {
- if (m_this_page->flags & PF_LICENSE_FORCE_SELECTION) {
- int is = SendMessage(GetUIItem(IDC_LICENSEAGREE), BM_GETCHECK, 0, 0) & BST_CHECKED;
- m_this_page->flags &= ~PF_LICENSE_SELECTED;
- m_this_page->flags |= is;
- EnableNext(is);
- SetNextDef();
- }
- }
- if (uMsg == WM_NOTIFY) {
- hwLicense=GetUIItem(IDC_EDIT1);
- #define nmhdr ((NMHDR *)lParam)
- #define enlink ((ENLINK *)lParam)
- #define msgfilter ((MSGFILTER *)lParam)
- if (nmhdr->code==EN_LINK) {
- if (enlink->msg==WM_LBUTTONDOWN) {
- TEXTRANGE tr = {
- {
- enlink->chrg.cpMin,
- enlink->chrg.cpMax,
- },
- ps_tmpbuf
- };
- if (tr.chrg.cpMax-tr.chrg.cpMin < sizeof(ps_tmpbuf)) {
- SendMessage(hwLicense,EM_GETTEXTRANGE,0,(LPARAM)&tr);
- SetCursor(LoadCursor(0, IDC_WAIT));
- ShellExecute(hwndDlg,"open",tr.lpstrText,NULL,NULL,SW_SHOWNORMAL);
- SetCursor(LoadCursor(0, IDC_ARROW));
- }
- }
- }
- //Ximon Eighteen 8th September 2002 Capture return key presses in the rich
- //edit control now that the control gets the focus rather than the default
- //push button. When the user presses return ask the outer dialog to move
- //the installer onto the next page. MSDN docs say return non-zero if the
- //rich edit control should NOT process this message, hence the return 1.
- //
- //This is required because the RichEdit control is eating all the key hits.
- //It does try to release some and convert VK_ESCAPE to WM_CLOSE, VK_ENTER
- //to a push on the default button and VM_TAB to WM_NEXTDLGCTL. But sadly it
- //it sends all of these messages to its parent instead of just letting the
- //dialog manager handle them. Instead of properly handling WM_GETDLGCODE,
- //it mimics the dialog manager.
- if (nmhdr->code==EN_MSGFILTER)
- {
- if (msgfilter->msg==WM_KEYDOWN)
- {
- if (msgfilter->wParam==VK_RETURN) {
- SendMessage(g_hwnd, WM_COMMAND, IDOK, 0);
- }
- if (msgfilter->wParam==VK_ESCAPE) {
- SendMessage(g_hwnd, WM_CLOSE, 0, 0);
- }
- return 1;
- }
- }
- #undef nmhdr
- #undef enlink
- #undef msgfilter
- }
- if (uMsg == WM_NOTIFY_INIGO_MONTOYA)
- {
- ignoreWMCommand++;
- }
- return HandleStaticBkColor();
-}
-#endif
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
-static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if (uMsg == WM_INITDIALOG)
- {
- SetUITextFromLang(IDC_UNINSTFROM,this_page->parms[1]);
- SetUITextNT(IDC_EDIT1,g_usrvars[this_page->parms[4]]);
- }
- return HandleStaticBkColor();
-}
-#endif
-
-
-static void NSISCALL SetSizeText(int dlgItem, int prefix, unsigned kb)
-{
- char scalestr[32], byte[32];
- unsigned sh = 20;
- int scale = LANG_GIGA;
-
- if (kb < 1024 * 1024) { sh = 10; scale = LANG_MEGA; }
- if (kb < 1024) { sh = 0; scale = LANG_KILO; }
-
- if (kb < (0xFFFFFFFF - ((1 << 20) / 20))) // check for overflow
- kb += (1 << sh) / 20; // round numbers for better display (e.g. 1.59 => 1.6)
-
- wsprintf(
- GetNSISString(g_tmp, prefix) + mystrlen(g_tmp),
- "%u.%u%s%s",
- kb >> sh,
- (((kb & 0x00FFFFFF) * 10) >> sh) % 10, // 0x00FFFFFF mask is used to
- // prevent overflow that causes
- // bad results
- GetNSISString(scalestr, scale),
- GetNSISString(byte, LANG_BYTE)
- );
-
- my_SetDialogItemText(m_curwnd,dlgItem,g_tmp);
-}
-
-static int NSISCALL _sumsecsfield(int idx)
-{
- int total = 0;
- int x = num_sections;
- section *s = g_sections;
- while (x--)
- {
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- if (s->flags & SF_SELECTED)
-#endif
- total += ((int *)s)[idx];
- s++;
- }
- return total;
-}
-
-#define sumsecsfield(x) _sumsecsfield(SECTION_OFFSET(x))
-
-static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- static int dontsetdefstyle;
- page *thispage = g_this_page;
- char *dir = g_usrvars[thispage->parms[4]];
- int browse_text = thispage->parms[3];
- if (uMsg == WM_NOTIFY_INIGO_MONTOYA)
- {
- GetUIText(IDC_DIR,dir);
- validate_filename(dir);
-#ifdef NSIS_CONFIG_LOG
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
- build_g_logfile();
-#endif
- if (GetUIItem(IDC_CHECK1) != NULL)
- log_dolog = IsDlgButtonChecked(hwndDlg,IDC_CHECK1);
-#endif
- }
- if (uMsg == WM_INITDIALOG)
- {
- HWND hDir = GetUIItem(IDC_DIR);
-
-#ifdef NSIS_CONFIG_LOG
- if (GetAsyncKeyState(VK_SHIFT)&0x8000)
- {
- HWND h=GetUIItem(IDC_CHECK1);
- SetUITextFromLang(IDC_CHECK1,LANG_LOG_INSTALL_PROCESS);
- ShowWindow(h,SW_SHOWNA);
- }
-#endif
- if (validpathspec(dir) && !skip_root(dir))
- addtrailingslash(dir);
-
- // workaround for bug #1209843
- //
- // m_curwnd is only updated once WM_INITDIALOG returns.
- // my_SetWindowText triggers an EN_CHANGE message that
- // triggers a WM_IN_UPDATEMSG message that uses m_curwnd
- // to get the selected directory (GetUIText).
- // because m_curwnd is still outdated, dir varialble is
- // filled with an empty string. by default, dir points
- // to $INSTDIR.
- //
- // to solve this, m_curwnd is manually set to the correct
- // window handle.
-
- m_curwnd=hwndDlg;
-
- my_SetWindowText(hDir,dir);
- SetUITextFromLang(IDC_BROWSE,this_page->parms[2]);
- SetUITextFromLang(IDC_SELDIRTEXT,this_page->parms[1]);
- SetActiveCtl(hDir);
-
- {
- typedef HRESULT (WINAPI *SHAutoCompletePtr)(HWND, DWORD);
- SHAutoCompletePtr fSHAutoComplete;
- fSHAutoComplete = (SHAutoCompletePtr) myGetProcAddress(MGA_SHAutoComplete);
- if (fSHAutoComplete)
- {
- fSHAutoComplete(hDir, SHACF_FILESYSTEM);
- }
- }
- }
- if (uMsg == WM_COMMAND)
- {
- int id=LOWORD(wParam);
- if (id == IDC_DIR && HIWORD(wParam) == EN_CHANGE)
- {
- uMsg = WM_IN_UPDATEMSG;
- }
- if (id == IDC_BROWSE)
- {
- static char bt[NSIS_MAX_STRLEN];
- BROWSEINFO bi = {0,};
- ITEMIDLIST *idlist;
- bi.hwndOwner = hwndDlg;
- bi.pszDisplayName = g_tmp;
- bi.lpfn = BrowseCallbackProc;
- bi.lParam = (LPARAM)dir;
- bi.lpszTitle = GetNSISString(bt, browse_text);
- bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
- idlist = SHBrowseForFolder(&bi);
- if (idlist)
- {
- // free idlist
- CoTaskMemFree(idlist);
-
- addtrailingslash(dir);
-
- if (g_header->install_directory_auto_append &&
- dir == state_install_directory) // only append to $INSTDIR (bug #1174184)
- {
- const char *post_str = ps_tmpbuf;
- GetNSISStringTT(g_header->install_directory_auto_append);
- // display name gives just the folder name
- if (lstrcmpi(post_str, g_tmp))
- {
- mystrcat(dir, post_str);
- }
- }
-
- dontsetdefstyle++;
- SetUITextNT(IDC_DIR,dir);
- }
- else
- {
- uMsg = WM_IN_UPDATEMSG;
- }
- }
- }
- if (uMsg == WM_IN_UPDATEMSG || uMsg == WM_NOTIFY_START)
- {
- static char s[NSIS_MAX_STRLEN];
- char *p;
- int error = 0;
- int available_set = 0;
- unsigned total, available = 0xFFFFFFFF;
-
- GetUIText(IDC_DIR,dir);
- if (!is_valid_instpath(dir))
- error = NSIS_INSTDIR_INVALID;
-
- mystrcpy(s,dir);
- p=skip_root(s);
- if (p)
- *p=0;
-
- // Test for and use the GetDiskFreeSpaceEx API
- {
- BOOL (WINAPI *GDFSE)(LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) =
- myGetProcAddress(MGA_GetDiskFreeSpaceExA);
- if (GDFSE)
- {
- ULARGE_INTEGER available64;
- ULARGE_INTEGER a, b;
- if (GDFSE(s, &available64, &a, &b))
- {
-#ifndef _NSIS_NO_INT64_SHR
- available = (int)(available64.QuadPart >> 10);
-#else
- available = (int)(Int64ShrlMod32(available64.QuadPart, 10));
-#endif
- available_set++;
- }
- }
- }
-
- if (!available_set)
- {
- // GetDiskFreeSpaceEx is not available
- DWORD spc, bps, fc, tc;
- if (GetDiskFreeSpace(s, &spc, &bps, &fc, &tc))
- {
- available = (int)MulDiv(bps * spc, fc, 1 << 10);
- available_set++;
- }
- }
-
- total = (unsigned) sumsecsfield(size_kb);
-
- if (available < total)
- error = NSIS_INSTDIR_NOT_ENOUGH_SPACE;
-
- if (LANG_STR_TAB(LANG_SPACE_REQ)) {
- SetSizeText(IDC_SPACEREQUIRED,LANG_SPACE_REQ,total);
- if (available_set)
- SetSizeText(IDC_SPACEAVAILABLE,LANG_SPACE_AVAIL,available);
- else
- SetUITextNT(IDC_SPACEAVAILABLE,"");
- }
-
- g_exec_flags.instdir_error = error;
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (!error)
- error = ExecuteCallbackFunction(CB_ONVERIFYINSTDIR);
-#endif
-
- if (thispage->flags & PF_DIR_NO_BTN_DISABLE)
- error = 0;
-
- EnableNext(!error);
- if (!error && !dontsetdefstyle)
- SetNextDef();
- dontsetdefstyle = 0;
- }
- return HandleStaticBkColor();
-}
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
-
-static void FORCE_INLINE NSISCALL RefreshComponents(HWND hwTree, HTREEITEM *items)
-{
- TVITEM item;
- int i, flags, state;
- section *sec;
-
- item.stateMask = TVIS_STATEIMAGEMASK | TVIS_EXPANDED | TVIS_BOLD;
-
- for (i = 0, sec = g_sections; i < num_sections; i++, sec++)
- {
- if (!items[i])
- {
- continue;
- }
-
- flags = sec->flags;
-
- item.hItem = items[i];
-
- item.mask = TVIF_STATE;
-
- if (flags & SF_NAMECHG)
- {
- item.mask |= TVIF_TEXT;
- item.pszText = sec->name;
- sec->flags &= ~SF_NAMECHG;
- }
-
- if (flags & SF_PSELECTED)
- {
- state = 3;
- }
- else
- {
- state = 1 + (flags & SF_SELECTED); // SF_SELECTED == 1
- if (flags & SF_RO) state += 3;
- }
-
- item.state = (flags & SF_BOLD) << 1; // (SF_BOLD << 1) == 16 == TVIS_BOLD
- item.state |= flags & SF_EXPAND; // TVIS_EXPANDED == SF_EXPAND
- item.state |= INDEXTOSTATEIMAGEMASK(state);
-
- // TVE_COLLAPSE = 1, TVE_EXPAND = 2
- TreeView_Expand(hwTree, item.hItem, TVE_COLLAPSE + ((flags & SF_EXPAND) / SF_EXPAND));
-
- TreeView_SetItem(hwTree, &item);
- }
-
- // workaround for bug #1397031
- //
- // windows 95 doesn't erase the background of the state image
- // before it draws a new one. because of this parts of the old
- // state image will show where the new state image is masked.
- //
- // to solve this, the following line forces the background to
- // be erased. sadly, this redraws the entire control. it might
- // be a good idea to figure out where the state images are and
- // redraw only those.
-
- InvalidateRect(hwTree, NULL, TRUE);
-}
-
-int NSISCALL TreeGetSelectedSection(HWND tree, BOOL mouse)
-{
- HTREEITEM hItem = TreeView_GetSelection(tree);
- TVITEM item;
-
- if (mouse)
- {
- TVHITTESTINFO ht;
- DWORD dwpos = GetMessagePos();
-
- ht.pt.x = GET_X_LPARAM(dwpos);
- ht.pt.y = GET_Y_LPARAM(dwpos);
- ScreenToClient(tree, &ht.pt);
-
- TreeView_HitTest(tree, &ht);
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- if (!(ht.flags & TVHT_ONITEMSTATEICON))
-#else
- if (!(ht.flags & (TVHT_ONITEMSTATEICON|TVHT_ONITEMLABEL|TVHT_ONITEMRIGHT|TVHT_ONITEM)))
-#endif
- return -1;
-
- hItem = ht.hItem;
- }
-
- item.mask = TVIF_PARAM;
- item.hItem = hItem;
- TreeView_GetItem(tree, &item);
-
- return (int) item.lParam;
-}
-
-static LONG oldTreeWndProc;
-static LPARAM last_selected_tree_item;
-static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- if (uMsg == WM_CHAR && wParam == VK_SPACE) {
- NotifyCurWnd(WM_TREEVIEW_KEYHACK);
- return 0;
- }
-#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
-#ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
- if (uMsg == WM_MOUSEMOVE) {
- if (IsWindowVisible(hwnd)) {
- lParam = TreeGetSelectedSection(hwnd, TRUE);
- uMsg = WM_NOTIFY_SELCHANGE;
- }
- }
-#endif
- if (uMsg == WM_NOTIFY_SELCHANGE) {
- if (last_selected_tree_item != lParam)
- {
- last_selected_tree_item = lParam;
-
- mystrcpy(g_tmp, g_usrvars[0]);
-
- myitoa(g_usrvars[0], lParam);
-
- ExecuteCallbackFunction(CB_ONMOUSEOVERSECTION);
-
- mystrcpy(g_usrvars[0], g_tmp);
- }
- }
-#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_ENHANCEDUI_SUPPORT
- return CallWindowProc((WNDPROC)oldTreeWndProc,hwnd,uMsg,wParam,lParam);
-}
-
-static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- static HTREEITEM *hTreeItems;
- static HIMAGELIST hImageList;
- HWND hwndCombo1 = GetUIItem(IDC_COMBO1);
- HWND hwndTree1 = GetUIItem(IDC_TREE1);
- extern HWND g_SectionHack;
- section *sections=g_sections;
- int *install_types=g_header->install_types;
- if (uMsg == WM_INITDIALOG)
- {
- int doLines=0;
- HTREEITEM Par;
- HBITMAP hBMcheck1;
- int x, lastGoodX, i, noCombo=2;
-
- g_SectionHack=hwndDlg;
-
- hTreeItems=(HTREEITEM*)GlobalAlloc(GPTR,sizeof(HTREEITEM)*num_sections);
-
- hBMcheck1=LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
-
- last_selected_tree_item=-1;
- oldTreeWndProc=SetWindowLong(hwndTree1,GWL_WNDPROC,(long)newTreeWndProc);
-
- hImageList = ImageList_Create(16,16, ILC_COLOR32|ILC_MASK, 6, 0);
- ImageList_AddMasked(hImageList,hBMcheck1,RGB(255,0,255));
-
- TreeView_SetImageList(hwndTree1, hImageList, TVSIL_STATE);
-
- if (TreeView_GetItemHeight(hwndTree1) < 16)
- TreeView_SetItemHeight(hwndTree1, 16);
-
- DeleteObject(hBMcheck1);
-
- for (i = 0; i < NSIS_MAX_INST_TYPES+1; i++)
- {
- if (install_types[i])
- {
- int j;
- if (i != NSIS_MAX_INST_TYPES) noCombo = 0;
- j=SendMessage(hwndCombo1,CB_ADDSTRING,0,(LPARAM)GetNSISStringTT(install_types[i]));
- SendMessage(hwndCombo1,CB_SETITEMDATA,j,i);
- }
- }
-
- SetUITextFromLang(IDC_TEXT1,this_page->parms[1+noCombo]);
- SetUITextFromLang(IDC_TEXT2,this_page->parms[2+noCombo]);
-
- Par=NULL;
-
- for (lastGoodX = x = 0; x < num_sections; x ++)
- {
- section *sec=sections+x;
-
- if (sec->name[0])
- {
- TVINSERTSTRUCT tv;
-
- tv.hParent = Par;
- tv.hInsertAfter = TVI_LAST;
- tv.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
- tv.item.stateMask = TVIS_EXPANDED;
- tv.item.lParam = x;
- tv.item.pszText = sec->name;
-
- tv.item.state = sec->flags & SF_EXPAND; // TVIS_EXPANDED == SF_EXPAND
-
- if (sec->flags & SF_SECGRP)
- {
- tv.item.mask |= TVIF_CHILDREN;
- tv.item.cChildren = 1;
- Par = hTreeItems[x] = TreeView_InsertItem(hwndTree1, &tv);
- doLines = 1;
- }
- else if (sec->flags & SF_SECGRPEND)
- {
- Par = TreeView_GetParent(hwndTree1, Par);
- }
- else
- {
- lastGoodX = x;
- hTreeItems[x] = TreeView_InsertItem(hwndTree1, &tv);
- }
- }
- }
-
- if (!doLines)
- {
- SetWindowLong(hwndTree1,GWL_STYLE,GetWindowLong(hwndTree1,GWL_STYLE)&~(TVS_LINESATROOT));
- }
-
- if (!noCombo)
- {
- ShowWindow(hwndCombo1, SW_SHOW);
- SetActiveCtl(hwndCombo1);
- }
- else
- SetActiveCtl(hwndTree1);
- }
-
- if (uMsg == WM_NOTIFY_START)
- {
- wParam = 0;
- lParam = 1;
- uMsg = WM_IN_UPDATEMSG;
- }
-
- if (uMsg == WM_NOTIFY || uMsg == WM_TREEVIEW_KEYHACK)
- {
- LPNMHDR lpnmh = (LPNMHDR) lParam;
- if (uMsg == WM_TREEVIEW_KEYHACK || lpnmh->idFrom == IDC_TREE1)
- {
- if (!(g_flags&CH_FLAGS_NO_CUSTOM) && (uMsg == WM_TREEVIEW_KEYHACK || lpnmh->code == NM_CLICK))
- {
- int secid = TreeGetSelectedSection(hwndTree1, uMsg != WM_TREEVIEW_KEYHACK);
-
- if (secid >= 0)
- {
- int flags = sections[secid].flags;
-
- if ((flags & SF_RO) == 0)
- {
- if ((flags & SF_PSELECTED))
- {
- flags ^= SF_TOGGLED;
-
- if (flags & SF_TOGGLED)
- {
- flags |= SF_SELECTED;
- }
- else
- {
- flags &= ~SF_SELECTED;
- }
- }
- else
- {
- flags ^= SF_SELECTED;
- }
-
- sections[secid].flags = flags;
-
- SectionFlagsChanged(secid);
-
- wParam = 1;
- lParam = !(g_flags & CH_FLAGS_COMP_ONLY_ON_CUSTOM);
- uMsg = WM_IN_UPDATEMSG;
- }
- } // was valid click
- } // was click or hack
-#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
- if (lpnmh)
- {
- if (lpnmh->code == TVN_SELCHANGED)
- {
- SendMessage(hwndTree1, WM_NOTIFY_SELCHANGE, 0, ((LPNMTREEVIEW)lpnmh)->itemNew.lParam);
- }
- if (lpnmh->code == TVN_ITEMEXPANDED)
- {
- LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lpnmh;
- if (pnmtv->action == TVE_EXPAND)
- sections[pnmtv->itemNew.lParam].flags |= SF_EXPAND;
- else
- sections[pnmtv->itemNew.lParam].flags &= ~SF_EXPAND;
- }
- }
-#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_ENHANCEDUI_SUPPORT
- }
- }
-
- if (uMsg == WM_COMMAND && LOWORD(wParam) == IDC_COMBO1 && HIWORD(wParam) == CBN_SELCHANGE)
- {
- int t = SendMessage(hwndCombo1,CB_GETCURSEL,0,0);
- if (t != CB_ERR)
- {
- int whichcfg = SendMessage(hwndCombo1, CB_GETITEMDATA, t, 0);
-
- if (whichcfg == CB_ERR || !install_types[whichcfg])
- whichcfg = NSIS_MAX_INST_TYPES;
-
- SetInstType(whichcfg);
-
- SendMessage(hwndDlg, WM_NOTIFY_INSTTYPE_CHANGED, 0, whichcfg);
-
- wParam = 1;
- lParam = 0;
- uMsg = WM_IN_UPDATEMSG;
- }
- }
-
- if (uMsg == WM_MOUSEMOVE)
- {
- SendMessage(hwndTree1, WM_MOUSEMOVE, 0, 0);
- }
-
- if (uMsg == WM_NOTIFY_INIGO_MONTOYA)
- {
- if (hImageList) ImageList_Destroy(hImageList);
- if (hTreeItems) GlobalFree(hTreeItems);
- hImageList = NULL;
- hTreeItems = NULL;
- g_SectionHack = NULL;
- }
-
- if (uMsg == WM_IN_UPDATEMSG)
- {
- RefreshSectionGroups();
-
-#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)
- if (wParam)
- {
- ExecuteCallbackFunction(CB_ONSELCHANGE);
- }
-#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE
-
- if (lParam)
- {
- int i, cbi;
- int inst_type = GetInstType(hTreeItems);
- SetInstType(inst_type);
-
- for (i = 0, cbi = 0; i < inst_type; i++)
- {
- if (install_types[i])
- {
- cbi++;
- }
- }
-
- SendMessage(hwndCombo1, CB_SETCURSEL, cbi, 0);
-
- lParam = inst_type;
- uMsg = WM_NOTIFY_INSTTYPE_CHANGED;
- }
-
- RefreshSectionGroups();
- RefreshComponents(hwndTree1, hTreeItems);
-
- if (LANG_STR_TAB(LANG_SPACE_REQ)) {
- SetSizeText(IDC_SPACEREQUIRED,LANG_SPACE_REQ,sumsecsfield(size_kb));
- }
- }
-
- if (uMsg == WM_NOTIFY_INSTTYPE_CHANGED)
- {
- if (g_flags & CH_FLAGS_COMP_ONLY_ON_CUSTOM)
- {
- int c = (lParam == NSIS_MAX_INST_TYPES ? 1 : 0) << 3;// SW_SHOWNA=8, SW_HIDE=0
- ShowWindow(hwndTree1, c);
- ShowWindow(GetUIItem(IDC_TEXT2), c);
- }
- }
-
- return HandleStaticBkColor();
-}
-#endif//NSIS_CONFIG_COMPONENTPAGE
-
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-
-void NSISCALL update_status_text(int strtab, const char *text) {
- static char tmp[NSIS_MAX_STRLEN*2];
- LVITEM new_item;
- HWND linsthwnd = insthwnd;
- if (linsthwnd)
- {
- int updateflag = g_exec_flags.status_update;
- int tmplen;
-
- if (!(updateflag & 1))
- GetNSISString(tmp, strtab);
-
- tmplen = mystrlen(tmp);
-
- if (text)
- {
- if (tmplen + mystrlen(text) >= sizeof(tmp)) return;
- mystrcat(tmp, text);
- }
-
- if ((updateflag & 4) == 0) my_SetWindowText(insthwnd2, tmp);
- if ((updateflag & 2) == 0)
- {
- new_item.mask = LVIF_TEXT;
- new_item.pszText = tmp;
- new_item.iItem = ListView_GetItemCount(linsthwnd) - (updateflag & 1);
- new_item.iSubItem = 0;
- // LVM_INSERTITEM - LVM_SETITEM = 1
- SendMessage(linsthwnd, LVM_INSERTITEM - (updateflag & 1), 0, (LPARAM) &new_item);
- ListView_EnsureVisible(linsthwnd, new_item.iItem, 0);
- }
-
- if (updateflag & 1)
- tmp[tmplen] = 0;
- }
-}
-
-static DWORD WINAPI install_thread(LPVOID p)
-{
- int m_inst_sec=num_sections;
- HWND progresswnd = (HWND)p;
- section *s = g_sections;
-
-#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
- {
- extern HRESULT g_hres;
- g_hres|=OleInitialize(NULL);
- }
-#endif
-
- // workaround for bug #1400995
- //
- // for an unexplained reason, MessageBox with MB_TOPMOST
- // will fail, if no other messages were sent from this
- // thread to the GUI thread before it.
- //
- // the source of the problem couldn't be found, so a
- // WM_NULL is sent to work around it.
-
- NotifyCurWnd(WM_NULL);
-
- while (m_inst_sec--)
- {
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- if (s->flags&SF_SELECTED)
-#endif
- {
- log_printf2("Section: \"%s\"",s->name);
- if (ExecuteCodeSegment(s->code,progresswnd))
- {
- g_exec_flags.abort++;
- break;
- }
- }
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- else
- {
- log_printf2("Skipping section: \"%s\"",s->name);
- }
-#endif
- s++;
- }
- NotifyCurWnd(WM_NOTIFY_INSTPROC_DONE);
-
-#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
- OleUninitialize();
-#endif
-
- return g_exec_flags.abort;
-}
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-
-static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- HWND linsthwnd=insthwnd;
- if (uMsg == WM_INITDIALOG)
- {
- RECT r;
- LVCOLUMN lvc = {LVCF_WIDTH, 0, -1, 0, 0, -1};
- int lb_bg=g_header->lb_bg,lb_fg=g_header->lb_fg;
-
- insthwndbutton=GetUIItem(IDC_SHOWDETAILS);
- insthwnd2=GetUIItem(IDC_INTROTEXT);
- linsthwnd=insthwnd=GetUIItem(IDC_LIST1);
-
- SetActiveCtl(insthwndbutton);
-
- progress_bar_len=sumsecsfield(code_size);
- progress_bar_pos=0;
-
- log_printf3("New install of \"%s\" to \"%s\"",GetNSISStringTT(LANG_NAME),state_install_directory);
-
- GetClientRect(linsthwnd, &r);
- lvc.cx = r.right - GetSystemMetrics(SM_CXHSCROLL);
- ListView_InsertColumn(linsthwnd, 0, &lvc);
-
- ListView_SetExtendedListViewStyleEx(linsthwnd, LVS_EX_LABELTIP, LVS_EX_LABELTIP);
- if (lb_bg >= 0) {
- ListView_SetBkColor(linsthwnd, lb_bg);
- ListView_SetTextBkColor(linsthwnd, lb_bg);
- }
- if (lb_fg >= 0) {
- ListView_SetTextColor(linsthwnd, lb_fg);
- }
- SetUITextFromLang(IDC_SHOWDETAILS,this_page->parms[1]);
- if (g_flags&(CH_FLAGS_DETAILS_SHOWDETAILS|CH_FLAGS_DETAILS_NEVERSHOW))
- {
- ShowWindow(insthwndbutton,SW_HIDE);
- if (!(g_flags&CH_FLAGS_DETAILS_NEVERSHOW)) ShowWindow(linsthwnd,SW_SHOWNA);
- else insthwndbutton=NULL;
- SetActiveCtl(insthwnd2);
- }
-
- {
- HWND progresswnd=GetUIItem(IDC_PROGRESS);
- SendMessage(progresswnd,PBM_SETRANGE,0,MAKELPARAM(0,30000));
- if (g_flags&CH_FLAGS_PROGRESS_COLORED)
- {
- SendMessage(progresswnd,PBM_SETBARCOLOR,0,lb_fg);
- SendMessage(progresswnd,PBM_SETBKCOLOR,0,lb_bg);
- }
- }
-
- return FALSE;
- }
- if (uMsg == WM_NOTIFY_START) {
- DWORD id;
- CloseHandle(CreateThread(NULL,0,install_thread,GetUIItem(IDC_PROGRESS),0,&id));
- }
- if (uMsg == WM_COMMAND && LOWORD(wParam) == IDC_SHOWDETAILS)
- {
- ShowWindow(insthwndbutton,SW_HIDE);
- ShowWindow(linsthwnd,SW_SHOWNA);
- SetActiveCtl(linsthwnd);
- }
- if (uMsg == WM_NOTIFY_INSTPROC_DONE)
- {
- if (g_quit_flag)
- {
- m_retcode=2;
- outernotify(NOTIFY_BYE_BYE);
- }
- else
- {
- ShowWindow(g_hwnd,SW_SHOWNA);
- if (!g_exec_flags.abort)
- update_status_text(g_this_page->parms[2],0);
- outernotify(1);
- }
- }
- //>>>Ximon Eighteen aka Sunjammer 30th August 2002
- //+++Popup "Copy Details To Clipboard" menu when RMB clicked in DetailView
- if (uMsg == WM_CONTEXTMENU && wParam == (WPARAM) linsthwnd)
- {
- int count = ListView_GetItemCount(linsthwnd);
- if (count > 0)
- {
- HMENU menu = CreatePopupMenu();
- POINT pt;
- AppendMenu(menu,MF_STRING,1,GetNSISStringTT(LANG_COPYDETAILS));
- if (lParam == ((UINT)-1))
- {
- RECT r;
- GetWindowRect(linsthwnd, &r);
- pt.x = r.left;
- pt.y = r.top;
- }
- else
- {
- pt.x = GET_X_LPARAM(lParam);
- pt.y = GET_Y_LPARAM(lParam);
- }
- if (1==TrackPopupMenu(
- menu,
- TPM_NONOTIFY|TPM_RETURNCMD,
- pt.x,
- pt.y,
- 0,hwndDlg,0))
- {
- int i,total = 1; // 1 for the null char
- LVITEM item;
- HGLOBAL memory;
- LPTSTR ptr;//,endPtr;
-
- // 1st pass - determine clipboard memory required.
- item.iSubItem = 0;
- item.pszText = g_tmp;
- item.cchTextMax = sizeof(g_tmp) - 1;
- i = count;
- while (i--)
- // Add 2 for the CR/LF combination that must follow every line.
- total += 2+SendMessage(linsthwnd,LVM_GETITEMTEXT,i,(LPARAM)&item);
-
- // 2nd pass - store detail view strings on the clipboard
- // Clipboard MSDN docs say mem must be GMEM_MOVEABLE
- OpenClipboard(0);
- EmptyClipboard();
- memory = GlobalAlloc(GHND,total);
- ptr = GlobalLock(memory);
- //endPtr = ptr+total-2; // -2 to allow for CR/LF
- i = 0;
- do {
- item.pszText = ptr;
- ptr += SendMessage(linsthwnd,LVM_GETITEMTEXT,i,(LPARAM)&item);
- *(WORD*)ptr = CHAR2_TO_WORD('\r','\n');
- ptr+=2;
- } while (++i < count);
- // memory is auto zeroed when allocated with GHND - *ptr = 0;
- GlobalUnlock(memory);
- SetClipboardData(CF_TEXT,memory);
- CloseClipboard();
- }
- }
- return FALSE;
- }
- //<<<
- return HandleStaticBkColor();
-}
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+/*
+ * Ui.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 Nullsoft, Jeff Doozan 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.
+ */
+
+#include <windowsx.h>
+#include <shlobj.h>
+#include <shellapi.h>
+#include <shlwapi.h>
+
+#include "../Platform.h"
+
+#include "resource.h"
+
+#include "fileform.h"
+#include "state.h"
+#include "util.h"
+#include "ui.h"
+#include "exec.h"
+#include "lang.h"
+#include "components.h"
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+HICON g_hIcon;
+#endif
+
+int dlg_offset;
+int ui_dlg_visible=0; // At start main window is not visible
+int g_quit_flag; // set when Quit has been called (meaning bail out ASAP)
+
+#if NSIS_MAX_INST_TYPES > 32 || NSIS_MAX_INST_TYPES < 1
+#error invalid value for NSIS_MAX_INST_TYPES
+#endif
+
+int progress_bar_pos, progress_bar_len;
+
+#if NSIS_MAX_STRLEN < 1024
+static char g_tmp[4096];
+#else
+static char g_tmp[NSIS_MAX_STRLEN * 4];
+#endif
+
+static int m_page=-1,m_retcode,m_delta;
+static page *g_this_page;
+
+#define NOTIFY_BYE_BYE 'x'
+
+static void NSISCALL outernotify(int delta) {
+ if (delta==NOTIFY_BYE_BYE)
+ g_quit_flag++;
+ SendMessage(g_hwnd,WM_NOTIFY_OUTER_NEXT,(WPARAM)delta,0);
+}
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
+#ifdef NSIS_CONFIG_LICENSEPAGE
+static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+#endif
+static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+
+static DWORD WINAPI install_thread(LPVOID p);
+
+void NSISCALL CleanUp();
+
+HWND insthwnd, insthwnd2, insthwndbutton;
+
+HWND m_curwnd;
+static HWND m_bgwnd, m_hwndOK, m_hwndCancel;
+
+static BOOL NSISCALL SetDlgItemTextFromLang_(HWND dlg, int id, int lid) {
+ return my_SetDialogItemText(dlg,id+1000,GetNSISStringTT(lid));
+}
+
+static void NSISCALL SetNextDef()
+{
+ SendMessage(g_exec_flags.abort ? m_hwndCancel : m_hwndOK, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE);
+}
+
+static void NSISCALL EnableNext(BOOL e)
+{
+ EnableWindow(m_hwndOK, e);
+}
+
+static void NSISCALL SetActiveCtl(HWND hCtl)
+{
+ SendMessage(g_hwnd, WM_NEXTDLGCTL, (WPARAM) hCtl, TRUE);
+}
+
+static void NSISCALL NotifyCurWnd(UINT uNotifyCode)
+{
+ if (m_curwnd)
+ SendMessage(m_curwnd, uNotifyCode, 0, 0);
+}
+
+#define SetDlgItemTextFromLang(dlg,id,lid) SetDlgItemTextFromLang_(dlg,(id)-1000,lid)
+
+#define SetUITextFromLang(it,la) SetDlgItemTextFromLang_(hwndDlg,(it)-1000,la)
+#define SetUITextNT(it,text) my_SetDialogItemText(hwndDlg,it,text)
+#define GetUIText(it,s) my_GetDialogItemText(it,s)
+#define GetUIItem(it) GetDlgItem(hwndDlg,it)
+
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+#define HandleStaticBkColor() _HandleStaticBkColor(uMsg, wParam, lParam)
+static BOOL NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if ((uMsg - WM_CTLCOLOREDIT) <= (WM_CTLCOLORSTATIC - WM_CTLCOLOREDIT))
+ {
+ ctlcolors *c = (ctlcolors *)GetWindowLong((HWND)lParam, GWL_USERDATA);
+
+ if (c) {
+ COLORREF text;
+ LOGBRUSH lh;
+
+ text = c->text;
+ if (c->flags & CC_TEXT_SYS)
+ text = GetSysColor(text);
+ if (c->flags & CC_TEXT)
+ SetTextColor((HDC)wParam, text);
+
+ SetBkMode((HDC)wParam, c->bkmode);
+
+ lh.lbColor = c->bkc;
+ if (c->flags & CC_BK_SYS)
+ lh.lbColor = GetSysColor(lh.lbColor);
+ if (c->flags & CC_BK)
+ SetBkColor((HDC)wParam, lh.lbColor);
+
+ if (c->flags & CC_BKB)
+ {
+ lh.lbStyle = c->lbStyle;
+ if (c->bkb)
+ DeleteObject(c->bkb);
+ c->bkb = CreateBrushIndirect(&lh);
+ }
+
+ return (BOOL)c->bkb;
+ }
+ }
+ return 0;
+}
+#else
+#define HandleStaticBkColor() 0
+#endif//!NSIS_CONFIG_ENHANCEDUI_SUPPORT
+
+#ifdef NSIS_CONFIG_LOG
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+void NSISCALL build_g_logfile()
+{
+ mystrcat(addtrailingslash(mystrcpy(g_log_file,state_install_directory)),"install.log");
+}
+#endif
+#endif
+
+int *cur_langtable;
+
+static void NSISCALL set_language()
+{
+ LANGID lang_mask=(LANGID)~0;
+ LANGID lang=myatoi(state_language);
+ char *language_table=0;
+ int lang_num;
+ int *selected_langtable=0;
+
+lang_again:
+ lang_num=g_blocks[NB_LANGTABLES].num;
+ while (lang_num--) {
+ language_table=((char*)g_blocks[NB_LANGTABLES].offset)+lang_num*g_header->langtable_size;
+ if (!((lang ^ *(LANGID*)language_table) & lang_mask)) {
+ dlg_offset=*(int*)(language_table+sizeof(LANGID));
+ g_exec_flags.rtl=*(int*)(language_table+sizeof(LANGID)+sizeof(int));
+ selected_langtable=(int*)(language_table+sizeof(LANGID)+2*sizeof(int));
+ break;
+ }
+ }
+ if (!selected_langtable) {
+ if (lang_mask == (LANGID)~0)
+ lang_mask=0x3ff; // primary lang
+ else // we already tried once and we still don't have a language table
+ lang_mask=0; // first lang
+ goto lang_again;
+ }
+
+ cur_langtable = selected_langtable;
+
+ myitoa(state_language, *(LANGID*)language_table);
+ {
+ char *caption = GetNSISString(g_caption,LANG_CAPTION);
+#ifdef NSIS_SUPPORT_BGBG
+ my_SetWindowText(m_bgwnd, caption);
+#endif
+ }
+
+ // reload section names
+ {
+ section *sec = g_sections;
+ int x = num_sections;
+
+ while (x--)
+ {
+ if (sec->name_ptr)
+ {
+ GetNSISString(sec->name, sec->name_ptr);
+ }
+ sec++;
+ }
+ }
+}
+
+FORCE_INLINE int NSISCALL ui_doinstall(void)
+{
+ header *header = g_header;
+ static WNDCLASS wc; // richedit subclassing and bgbg creation
+
+ // detect default language
+ // more information at:
+ // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_0xrn.asp
+
+ LANGID (WINAPI *GUDUIL)();
+
+ GUDUIL = myGetProcAddress(MGA_GetUserDefaultUILanguage);
+ if (GUDUIL)
+ {
+ // Windows ME/2000+
+ myitoa(state_language, GUDUIL());
+ }
+ else
+ {
+ static const char reg_9x_locale[] = "Control Panel\\Desktop\\ResourceLocale";
+ static const char reg_nt_locale_key[] = ".DEFAULT\\Control Panel\\International";
+ const char *reg_nt_locale_val = &reg_9x_locale[30]; // = "Locale" with opt
+
+ *(DWORD*)state_language = CHAR4_TO_DWORD('0', 'x', 0, 0);
+
+ {
+ // Windows 9x
+ myRegGetStr(HKEY_CURRENT_USER, reg_9x_locale, NULL, g_tmp, 0);
+ }
+
+ if (!g_tmp[0])
+ {
+ // Windows NT
+ // This key exists on 9x as well, so it's only read if ResourceLocale wasn't found
+ myRegGetStr(HKEY_USERS, reg_nt_locale_key, reg_nt_locale_val, g_tmp, 0);
+ }
+
+ mystrcat(state_language, g_tmp);
+ }
+
+ // set default language
+ set_language();
+
+ // initialize auto close flag
+ g_exec_flags.autoclose=g_flags&CH_FLAGS_AUTO_CLOSE;
+
+ // read install directory from registry
+ if (!is_valid_instpath(state_install_directory))
+ {
+ if (header->install_reg_key_ptr)
+ {
+ myRegGetStr(
+ (HKEY)header->install_reg_rootkey,
+ GetNSISStringNP(header->install_reg_key_ptr),
+ GetNSISStringNP(header->install_reg_value_ptr),
+ ps_tmpbuf,
+ 0
+ );
+ if (ps_tmpbuf[0])
+ {
+ char *p=ps_tmpbuf;
+ char *e;
+ if (p[0]=='\"')
+ {
+ char *p2;
+ p++;
+ p2 = findchar(p, '"');
+ *p2 = 0;
+ }
+ // p is the path now, check for .exe extension
+
+ e=p+mystrlen(p)-4;
+ if (e > p)
+ {
+ // if filename ends in .exe, and is not a directory, remove the filename
+ if (!lstrcmpi(e, ".exe")) // check extension
+ {
+ DWORD d;
+ d=GetFileAttributes(p);
+ if (d == INVALID_FILE_ATTRIBUTES || !(d&FILE_ATTRIBUTE_DIRECTORY))
+ {
+ // if there is no back-slash, the string will become empty, but that's ok because
+ // it would make an invalid instdir anyway
+ trimslashtoend(p);
+ }
+ }
+ }
+
+ mystrcpy(state_install_directory,addtrailingslash(p));
+ }
+ }
+ }
+ if (!is_valid_instpath(state_install_directory))
+ {
+ GetNSISString(state_install_directory,header->install_directory_ptr);
+ }
+
+#ifdef NSIS_CONFIG_LOG
+ if (g_flags & CH_FLAGS_SILENT_LOG && !g_is_uninstaller)
+ {
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+ build_g_logfile();
+#endif
+ log_dolog=1;
+ }
+#endif
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ g_hIcon=LoadImage(g_hInstance,MAKEINTRESOURCE(IDI_ICON2),IMAGE_ICON,0,0,LR_DEFAULTSIZE|LR_SHARED);
+#ifdef NSIS_SUPPORT_BGBG
+ if (header->bg_color1 != -1)
+ {
+ DWORD cn = CHAR4_TO_DWORD('_', 'N', 'b', 0);
+ RECT vp;
+ extern LRESULT CALLBACK BG_WndProc(HWND, UINT, WPARAM, LPARAM);
+ wc.lpfnWndProc = BG_WndProc;
+ wc.hInstance = g_hInstance;
+ wc.hIcon = g_hIcon;
+ //wc.hCursor = LoadCursor(NULL,IDC_ARROW);
+ wc.lpszClassName = (LPCSTR)&cn;
+
+ if (!RegisterClass(&wc)) return 0;
+
+ SystemParametersInfo(SPI_GETWORKAREA, 0, &vp, 0);
+
+ m_bgwnd = CreateWindowEx(WS_EX_TOOLWINDOW,(LPCSTR)&cn,0,WS_POPUP,
+ vp.left,vp.top,vp.right-vp.left,vp.bottom-vp.top,0,NULL,g_hInstance,NULL);
+ }
+
+#endif//NSIS_SUPPORT_BGBG
+
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ // Select language
+ if (ExecuteCallbackFunction(CB_ONINIT)) return 2;
+ set_language();
+#endif
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ if (!g_exec_flags.silent)
+#endif//NSIS_CONFIG_SILENT_SUPPORT
+ {
+#ifdef NSIS_SUPPORT_BGBG
+ ShowWindow(m_bgwnd, SW_SHOW);
+#endif//NSIS_SUPPORT_BGBG
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ { // load richedit DLL
+ static const char riched20[]="RichEd20";
+ static const char riched32[]="RichEd32";
+ static const char richedit20a[]="RichEdit20A";
+ static const char richedit[]="RichEdit";
+ if (!LoadLibrary(riched20))
+ {
+ LoadLibrary(riched32);
+ }
+
+ // make richedit20a point to RICHEDIT
+ if (!GetClassInfo(NULL,richedit20a,&wc))
+ {
+ GetClassInfo(NULL,richedit,&wc);
+ wc.lpszClassName = richedit20a;
+ RegisterClass(&wc);
+ }
+ }
+#endif
+
+ {
+ int ret=DialogBox(g_hInstance,MAKEINTRESOURCE(IDD_INST+dlg_offset),0,DialogProc);
+#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
+ ExecuteCallbackFunction(CB_ONGUIEND);
+#endif
+ return ret;
+ }
+ }
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ else
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ {
+ if (install_thread(NULL))
+ {
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (!g_quit_flag) ExecuteCallbackFunction(CB_ONINSTFAILED);
+#endif//NSIS_SUPPORT_CODECALLBACKS
+ return 2;
+ }
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ ExecuteCallbackFunction(CB_ONINSTSUCCESS);
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+ return 0;
+ }
+#endif//NSIS_CONFIG_SILENT_SUPPORT
+}
+
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
+{
+ if (uMsg==BFFM_INITIALIZED)
+ {
+ my_GetDialogItemText(IDC_DIR,(char*)lpData);
+ SendMessage(hwnd,BFFM_SETSELECTION,(WPARAM)1,lpData);
+ }
+ if (uMsg==BFFM_SELCHANGED)
+ {
+ SendMessage(
+ hwnd,
+ BFFM_ENABLEOK,
+ 0,
+ SHGetPathFromIDList((LPITEMIDLIST)lParam,(char*)lpData)
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ && !ExecuteCallbackFunction(CB_ONVERIFYINSTDIR)
+#endif
+ );
+ }
+ return 0;
+}
+
+BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
+ {
+ page *this_page;
+ static DLGPROC winprocs[]=
+ {
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ LicenseProc,
+#endif
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ SelProc,
+#endif
+ DirProc,
+ InstProc,
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ UninstProc
+#endif
+ };
+
+ m_delta = wParam;
+
+ if (uMsg == WM_INITDIALOG)
+ {
+ g_hwnd=hwndDlg;
+ m_hwndOK=GetDlgItem(hwndDlg,IDOK);
+ m_hwndCancel=GetDlgItem(hwndDlg,IDCANCEL);
+ SetDlgItemTextFromLang(hwndDlg,IDC_VERSTR,LANG_BRANDING);
+ SetClassLong(hwndDlg,GCL_HICON,(long)g_hIcon);
+ // use the following line instead of the above, if .rdata needs shirking
+ //SendMessage(hwndDlg,WM_SETICON,ICON_BIG,(LPARAM)g_hIcon);
+#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
+ g_quit_flag = ExecuteCallbackFunction(CB_ONGUIINIT);
+#endif
+ //ShowWindow(hwndDlg, SW_SHOW);
+ m_delta = 1;
+ }
+
+ this_page=g_pages+m_page;
+
+ if (m_page>=0) {
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ // Call leave function. If Abort used don't move to the next page.
+ // But if quit called we must exit now
+ if (m_delta==1) if (ExecuteCodeSegment(this_page->leavefunc,NULL)) {
+ SendMessage(m_curwnd, WM_IN_UPDATEMSG, 0, 1);
+ return !g_quit_flag;
+ }
+#endif
+
+ // if the last page was a custom page, wait for it to finish by itself.
+ // if it doesn't, it's a BAD plugin.
+ // plugins should react to WM_NOTIFY_OUTER_NEXT.
+ if (!this_page->dlg_id) return 0;
+ }
+
+ NotifyCurWnd(WM_NOTIFY_INIGO_MONTOYA);
+
+nextPage:
+ m_page+=m_delta;
+ this_page+=m_delta;
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (m_page==g_blocks[NB_PAGES].num) ExecuteCallbackFunction(CB_ONINSTSUCCESS);
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+ if (g_quit_flag || (unsigned int)m_page >= (unsigned int)g_blocks[NB_PAGES].num)
+ {
+ DestroyWindow(m_curwnd);
+ g_hwnd = 0;
+ EndDialog(hwndDlg,m_retcode);
+ }
+ else
+ {
+ HWND hwndtmp;
+
+ int pflags = this_page->flags;
+
+ GetNSISString(state_click_next, this_page->clicknext);
+ SetDlgItemTextFromLang(hwndDlg, IDOK, this_page->next);
+ SetDlgItemTextFromLang(hwndDlg, IDC_BACK, this_page->back);
+ SetDlgItemTextFromLang(hwndDlg, IDCANCEL, this_page->cancel);
+
+ hwndtmp = GetDlgItem(hwndDlg, IDC_BACK);
+
+ if (g_exec_flags.abort)
+ {
+ pflags &= ~(PF_BACK_ENABLE | PF_NEXT_ENABLE);
+ pflags |= PF_CANCEL_ENABLE;
+ }
+
+ ShowWindow(hwndtmp, pflags & PF_BACK_SHOW);// SW_HIDE = 0, PF_BACK_SHOW = SW_SHOWNA = 8
+ EnableWindow(hwndtmp, pflags & PF_BACK_ENABLE);
+ EnableNext(pflags & PF_NEXT_ENABLE);
+ EnableWindow(m_hwndCancel, pflags & PF_CANCEL_ENABLE);
+
+ if (pflags & PF_CANCEL_ENABLE)
+ EnableMenuItem(GetSystemMenu(hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_ENABLED);
+ else
+ EnableMenuItem(GetSystemMenu(hwndDlg, FALSE), SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
+
+ SendMessage(hwndtmp, BM_SETSTYLE, BS_PUSHBUTTON, TRUE);
+
+ if (g_exec_flags.abort)
+ {
+ SendMessage(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
+ SetActiveCtl(m_hwndCancel);
+ }
+ else
+ {
+ SetActiveCtl(m_hwndOK);
+ }
+
+ mystrcpy(g_tmp,g_caption);
+ GetNSISString(g_tmp+mystrlen(g_tmp),this_page->caption);
+ my_SetWindowText(hwndDlg,g_tmp);
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ // custom page or user used abort in prefunc
+ if (ExecuteCodeSegment(this_page->prefunc, NULL) || !this_page->dlg_id) {
+ goto nextPage;
+ }
+#endif //NSIS_SUPPORT_CODECALLBACKS
+
+ if (this_page->wndproc_id != PWP_COMPLETED)
+ {
+ DestroyWindow(m_curwnd);
+ }
+ else {
+ if (!g_exec_flags.abort && g_exec_flags.autoclose)
+ goto nextPage;
+ // no need to go to skipPage because PWP_COMPLETED always follows PWP_INSTFILES
+ return FALSE;
+ }
+
+ // update g_this_page for the dialog proc
+ g_this_page=this_page;
+
+ if (this_page->dlg_id > 0) // NSIS page
+ {
+ m_curwnd=CreateDialogParam(
+ g_hInstance,
+ MAKEINTRESOURCE(this_page->dlg_id+dlg_offset),
+ hwndDlg,winprocs[this_page->wndproc_id],(LPARAM)this_page
+ );
+ if (m_curwnd)
+ {
+ RECT r;
+
+ SetDlgItemTextFromLang(m_curwnd,IDC_INTROTEXT,this_page->parms[0]);
+
+ GetWindowRect(GetDlgItem(hwndDlg,IDC_CHILDRECT),&r);
+ ScreenToClient(hwndDlg,(LPPOINT)&r);
+ SetWindowPos(m_curwnd,0,r.left,r.top,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ ExecuteCodeSegment(this_page->showfunc,NULL);
+ if (g_quit_flag)
+ return FALSE;
+#endif //NSIS_SUPPORT_CODECALLBACKS
+ ShowWindow(m_curwnd,SW_SHOWNA);
+ NotifyCurWnd(WM_NOTIFY_START);
+ }
+ }
+ }
+
+skipPage:
+
+ if (!ui_dlg_visible && m_curwnd)
+ {
+ ShowWindow(hwndDlg, SW_SHOWDEFAULT);
+ ui_dlg_visible = 1;
+ }
+
+ return FALSE;
+ }
+
+#ifdef NSIS_SUPPORT_BGBG
+ if (uMsg == WM_WINDOWPOSCHANGED)
+ {
+ SetWindowPos(m_bgwnd, hwndDlg, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
+ }
+ if (uMsg == WM_SIZE) {
+ ShowWindow(m_bgwnd, wParam == SIZE_MINIMIZED ? SW_HIDE : SW_SHOW);
+ }
+#endif //NSIS_SUPPORT_BGBG
+
+ if (uMsg == WM_NOTIFY_CUSTOM_READY) {
+ DestroyWindow(m_curwnd);
+ m_curwnd = (HWND)wParam;
+ goto skipPage;
+ }
+ if (uMsg == WM_QUERYENDSESSION)
+ {
+ SetWindowLong(hwndDlg, DWL_MSGRESULT, FALSE);
+ return TRUE;
+ }
+ if (uMsg == WM_COMMAND)
+ {
+ int id = LOWORD(wParam);
+ HWND hCtl = GetDlgItem(hwndDlg, id); // lParam might be NULL
+ if (hCtl)
+ {
+ SendMessage(hCtl, BM_SETSTATE, FALSE, 0);
+ if (!IsWindowEnabled(hCtl))
+ return 0;
+ }
+
+ if (id == IDOK)
+ {
+ outernotify(1);
+ }
+ else if (id == IDC_BACK && m_page>0)
+ {
+ outernotify(-1);
+ }
+ else if (id == IDCANCEL)
+ {
+ if (g_exec_flags.abort)
+ {
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ ExecuteCallbackFunction(CB_ONINSTFAILED);
+#endif//NSIS_SUPPORT_CODECALLBACKS
+ m_retcode=2;
+ outernotify(NOTIFY_BYE_BYE);
+ }
+ else
+ {
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (!ExecuteCallbackFunction(CB_ONUSERABORT))
+#endif//NSIS_SUPPORT_CODECALLBACKS
+ {
+ m_retcode=1;
+ outernotify(NOTIFY_BYE_BYE);
+ }
+ }
+ }
+ else
+ {
+ // Forward WM_COMMANDs to inner dialogs, can be custom ones.
+ // Without this, enter on buttons in inner dialogs won't work.
+ SendMessage(m_curwnd, WM_COMMAND, wParam, lParam);
+ }
+ }
+ return HandleStaticBkColor();
+}
+
+#define this_page ((page*)lParam)
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+
+#define _RICHEDIT_VER 0x0200
+#include <richedit.h>
+#undef _RICHEDIT_VER
+static DWORD dwRead;
+DWORD CALLBACK StreamLicense(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
+{
+ lstrcpyn(pbBuff,(char*)dwCookie+dwRead,cb);
+ *pcb=mystrlen(pbBuff);
+ dwRead+=*pcb;
+ return 0;
+}
+
+static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ page *m_this_page=g_this_page;
+ HWND hwLicense;
+ static int ignoreWMCommand;
+
+ if (uMsg == WM_INITDIALOG)
+ {
+ char *l = (char *)GetNSISStringNP(GetNSISTab(this_page->parms[1]));
+ int lt = *l;
+ EDITSTREAM es = {
+ (DWORD)(++l),
+ 0,
+ StreamLicense
+ };
+
+ int selected = (this_page->flags & PF_LICENSE_SELECTED) | !(this_page->flags & PF_LICENSE_FORCE_SELECTION);
+
+ SetUITextFromLang(IDC_LICENSEAGREE,this_page->parms[2]);
+ SetUITextFromLang(IDC_LICENSEDISAGREE,this_page->parms[3]);
+ CheckDlgButton(hwndDlg,IDC_LICENSEAGREE+!selected,BST_CHECKED);
+ EnableNext(selected);
+
+ hwLicense=GetUIItem(IDC_EDIT1);
+ SetActiveCtl(hwLicense);
+ SendMessage(hwLicense,EM_AUTOURLDETECT,TRUE,0);
+#define lbg g_header->license_bg
+ SendMessage(hwLicense,EM_SETBKGNDCOLOR,0,lbg>=0?lbg:GetSysColor(-lbg));
+#undef lbg
+ SendMessage(hwLicense,EM_SETEVENTMASK,0,ENM_LINK|ENM_KEYEVENTS); //XGE 8th September 2002 Or'd in ENM_KEYEVENTS
+ dwRead=0;
+ SendMessage(hwLicense,EM_EXLIMITTEXT,0,mystrlen(l));
+ SendMessage(hwLicense,EM_STREAMIN,lt,(LPARAM)&es);
+ ignoreWMCommand = 0;
+ return FALSE;
+ }
+ if (uMsg == WM_COMMAND && HIWORD(wParam) == BN_CLICKED && !ignoreWMCommand) {
+ if (m_this_page->flags & PF_LICENSE_FORCE_SELECTION) {
+ int is = SendMessage(GetUIItem(IDC_LICENSEAGREE), BM_GETCHECK, 0, 0) & BST_CHECKED;
+ m_this_page->flags &= ~PF_LICENSE_SELECTED;
+ m_this_page->flags |= is;
+ EnableNext(is);
+ SetNextDef();
+ }
+ }
+ if (uMsg == WM_NOTIFY) {
+ hwLicense=GetUIItem(IDC_EDIT1);
+ #define nmhdr ((NMHDR *)lParam)
+ #define enlink ((ENLINK *)lParam)
+ #define msgfilter ((MSGFILTER *)lParam)
+ if (nmhdr->code==EN_LINK) {
+ if (enlink->msg==WM_LBUTTONDOWN) {
+ TEXTRANGE tr = {
+ {
+ enlink->chrg.cpMin,
+ enlink->chrg.cpMax,
+ },
+ ps_tmpbuf
+ };
+ if (tr.chrg.cpMax-tr.chrg.cpMin < sizeof(ps_tmpbuf)) {
+ SendMessage(hwLicense,EM_GETTEXTRANGE,0,(LPARAM)&tr);
+ SetCursor(LoadCursor(0, IDC_WAIT));
+ ShellExecute(hwndDlg,"open",tr.lpstrText,NULL,NULL,SW_SHOWNORMAL);
+ SetCursor(LoadCursor(0, IDC_ARROW));
+ }
+ }
+ }
+ //Ximon Eighteen 8th September 2002 Capture return key presses in the rich
+ //edit control now that the control gets the focus rather than the default
+ //push button. When the user presses return ask the outer dialog to move
+ //the installer onto the next page. MSDN docs say return non-zero if the
+ //rich edit control should NOT process this message, hence the return 1.
+ //
+ //This is required because the RichEdit control is eating all the key hits.
+ //It does try to release some and convert VK_ESCAPE to WM_CLOSE, VK_ENTER
+ //to a push on the default button and VM_TAB to WM_NEXTDLGCTL. But sadly it
+ //it sends all of these messages to its parent instead of just letting the
+ //dialog manager handle them. Instead of properly handling WM_GETDLGCODE,
+ //it mimics the dialog manager.
+ if (nmhdr->code==EN_MSGFILTER)
+ {
+ if (msgfilter->msg==WM_KEYDOWN)
+ {
+ if (msgfilter->wParam==VK_RETURN) {
+ SendMessage(g_hwnd, WM_COMMAND, IDOK, 0);
+ }
+ if (msgfilter->wParam==VK_ESCAPE) {
+ SendMessage(g_hwnd, WM_CLOSE, 0, 0);
+ }
+ return 1;
+ }
+ }
+ #undef nmhdr
+ #undef enlink
+ #undef msgfilter
+ }
+ if (uMsg == WM_NOTIFY_INIGO_MONTOYA)
+ {
+ ignoreWMCommand++;
+ }
+ return HandleStaticBkColor();
+}
+#endif
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+static BOOL CALLBACK UninstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_INITDIALOG)
+ {
+ SetUITextFromLang(IDC_UNINSTFROM,this_page->parms[1]);
+ SetUITextNT(IDC_EDIT1,g_usrvars[this_page->parms[4]]);
+ }
+ return HandleStaticBkColor();
+}
+#endif
+
+
+static void NSISCALL SetSizeText(int dlgItem, int prefix, unsigned kb)
+{
+ char scalestr[32], byte[32];
+ unsigned sh = 20;
+ int scale = LANG_GIGA;
+
+ if (kb < 1024 * 1024) { sh = 10; scale = LANG_MEGA; }
+ if (kb < 1024) { sh = 0; scale = LANG_KILO; }
+
+ if (kb < (0xFFFFFFFF - ((1 << 20) / 20))) // check for overflow
+ kb += (1 << sh) / 20; // round numbers for better display (e.g. 1.59 => 1.6)
+
+ wsprintf(
+ GetNSISString(g_tmp, prefix) + mystrlen(g_tmp),
+ "%u.%u%s%s",
+ kb >> sh,
+ (((kb & 0x00FFFFFF) * 10) >> sh) % 10, // 0x00FFFFFF mask is used to
+ // prevent overflow that causes
+ // bad results
+ GetNSISString(scalestr, scale),
+ GetNSISString(byte, LANG_BYTE)
+ );
+
+ my_SetDialogItemText(m_curwnd,dlgItem,g_tmp);
+}
+
+static int NSISCALL _sumsecsfield(int idx)
+{
+ int total = 0;
+ int x = num_sections;
+ section *s = g_sections;
+ while (x--)
+ {
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ if (s->flags & SF_SELECTED)
+#endif
+ total += ((int *)s)[idx];
+ s++;
+ }
+ return total;
+}
+
+#define sumsecsfield(x) _sumsecsfield(SECTION_OFFSET(x))
+
+static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ static int dontsetdefstyle;
+ page *thispage = g_this_page;
+ char *dir = g_usrvars[thispage->parms[4]];
+ int browse_text = thispage->parms[3];
+ if (uMsg == WM_NOTIFY_INIGO_MONTOYA)
+ {
+ GetUIText(IDC_DIR,dir);
+ validate_filename(dir);
+#ifdef NSIS_CONFIG_LOG
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+ build_g_logfile();
+#endif
+ if (GetUIItem(IDC_CHECK1) != NULL)
+ log_dolog = IsDlgButtonChecked(hwndDlg,IDC_CHECK1);
+#endif
+ }
+ if (uMsg == WM_INITDIALOG)
+ {
+ HWND hDir = GetUIItem(IDC_DIR);
+
+#ifdef NSIS_CONFIG_LOG
+ if (GetAsyncKeyState(VK_SHIFT)&0x8000)
+ {
+ HWND h=GetUIItem(IDC_CHECK1);
+ SetUITextFromLang(IDC_CHECK1,LANG_LOG_INSTALL_PROCESS);
+ ShowWindow(h,SW_SHOWNA);
+ }
+#endif
+ if (validpathspec(dir) && !skip_root(dir))
+ addtrailingslash(dir);
+
+ // workaround for bug #1209843
+ //
+ // m_curwnd is only updated once WM_INITDIALOG returns.
+ // my_SetWindowText triggers an EN_CHANGE message that
+ // triggers a WM_IN_UPDATEMSG message that uses m_curwnd
+ // to get the selected directory (GetUIText).
+ // because m_curwnd is still outdated, dir varialble is
+ // filled with an empty string. by default, dir points
+ // to $INSTDIR.
+ //
+ // to solve this, m_curwnd is manually set to the correct
+ // window handle.
+
+ m_curwnd=hwndDlg;
+
+ my_SetWindowText(hDir,dir);
+ SetUITextFromLang(IDC_BROWSE,this_page->parms[2]);
+ SetUITextFromLang(IDC_SELDIRTEXT,this_page->parms[1]);
+ SetActiveCtl(hDir);
+
+ {
+ typedef HRESULT (WINAPI *SHAutoCompletePtr)(HWND, DWORD);
+ SHAutoCompletePtr fSHAutoComplete;
+ fSHAutoComplete = (SHAutoCompletePtr) myGetProcAddress(MGA_SHAutoComplete);
+ if (fSHAutoComplete)
+ {
+ fSHAutoComplete(hDir, SHACF_FILESYSTEM);
+ }
+ }
+ }
+ if (uMsg == WM_COMMAND)
+ {
+ int id=LOWORD(wParam);
+ if (id == IDC_DIR && HIWORD(wParam) == EN_CHANGE)
+ {
+ uMsg = WM_IN_UPDATEMSG;
+ }
+ if (id == IDC_BROWSE)
+ {
+ static char bt[NSIS_MAX_STRLEN];
+ BROWSEINFO bi = {0,};
+ ITEMIDLIST *idlist;
+ bi.hwndOwner = hwndDlg;
+ bi.pszDisplayName = g_tmp;
+ bi.lpfn = BrowseCallbackProc;
+ bi.lParam = (LPARAM)dir;
+ bi.lpszTitle = GetNSISString(bt, browse_text);
+ bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_NEWDIALOGSTYLE;
+ idlist = SHBrowseForFolder(&bi);
+ if (idlist)
+ {
+ // free idlist
+ CoTaskMemFree(idlist);
+
+ addtrailingslash(dir);
+
+ if (g_header->install_directory_auto_append &&
+ dir == state_install_directory) // only append to $INSTDIR (bug #1174184)
+ {
+ const char *post_str = ps_tmpbuf;
+ GetNSISStringTT(g_header->install_directory_auto_append);
+ // display name gives just the folder name
+ if (lstrcmpi(post_str, g_tmp))
+ {
+ mystrcat(dir, post_str);
+ }
+ }
+
+ dontsetdefstyle++;
+ SetUITextNT(IDC_DIR,dir);
+ }
+ else
+ {
+ uMsg = WM_IN_UPDATEMSG;
+ }
+ }
+ }
+ if (uMsg == WM_IN_UPDATEMSG || uMsg == WM_NOTIFY_START)
+ {
+ static char s[NSIS_MAX_STRLEN];
+ char *p;
+ int error = 0;
+ int available_set = 0;
+ unsigned total, available = 0xFFFFFFFF;
+
+ GetUIText(IDC_DIR,dir);
+ if (!is_valid_instpath(dir))
+ error = NSIS_INSTDIR_INVALID;
+
+ mystrcpy(s,dir);
+ p=skip_root(s);
+ if (p)
+ *p=0;
+
+ // Test for and use the GetDiskFreeSpaceEx API
+ {
+ BOOL (WINAPI *GDFSE)(LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER) =
+ myGetProcAddress(MGA_GetDiskFreeSpaceExA);
+ if (GDFSE)
+ {
+ ULARGE_INTEGER available64;
+ ULARGE_INTEGER a, b;
+ if (GDFSE(s, &available64, &a, &b))
+ {
+#ifndef _NSIS_NO_INT64_SHR
+ available = (int)(available64.QuadPart >> 10);
+#else
+ available = (int)(Int64ShrlMod32(available64.QuadPart, 10));
+#endif
+ available_set++;
+ }
+ }
+ }
+
+ if (!available_set)
+ {
+ // GetDiskFreeSpaceEx is not available
+ DWORD spc, bps, fc, tc;
+ if (GetDiskFreeSpace(s, &spc, &bps, &fc, &tc))
+ {
+ available = (int)MulDiv(bps * spc, fc, 1 << 10);
+ available_set++;
+ }
+ }
+
+ total = (unsigned) sumsecsfield(size_kb);
+
+ if (available < total)
+ error = NSIS_INSTDIR_NOT_ENOUGH_SPACE;
+
+ if (LANG_STR_TAB(LANG_SPACE_REQ)) {
+ SetSizeText(IDC_SPACEREQUIRED,LANG_SPACE_REQ,total);
+ if (available_set)
+ SetSizeText(IDC_SPACEAVAILABLE,LANG_SPACE_AVAIL,available);
+ else
+ SetUITextNT(IDC_SPACEAVAILABLE,"");
+ }
+
+ g_exec_flags.instdir_error = error;
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (!error)
+ error = ExecuteCallbackFunction(CB_ONVERIFYINSTDIR);
+#endif
+
+ if (thispage->flags & PF_DIR_NO_BTN_DISABLE)
+ error = 0;
+
+ EnableNext(!error);
+ if (!error && !dontsetdefstyle)
+ SetNextDef();
+ dontsetdefstyle = 0;
+ }
+ return HandleStaticBkColor();
+}
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+
+static void FORCE_INLINE NSISCALL RefreshComponents(HWND hwTree, HTREEITEM *items)
+{
+ TVITEM item;
+ int i, flags, state;
+ section *sec;
+
+ item.stateMask = TVIS_STATEIMAGEMASK | TVIS_EXPANDED | TVIS_BOLD;
+
+ for (i = 0, sec = g_sections; i < num_sections; i++, sec++)
+ {
+ if (!items[i])
+ {
+ continue;
+ }
+
+ flags = sec->flags;
+
+ item.hItem = items[i];
+
+ item.mask = TVIF_STATE;
+
+ if (flags & SF_NAMECHG)
+ {
+ item.mask |= TVIF_TEXT;
+ item.pszText = sec->name;
+ sec->flags &= ~SF_NAMECHG;
+ }
+
+ if (flags & SF_PSELECTED)
+ {
+ state = 3;
+ }
+ else
+ {
+ state = 1 + (flags & SF_SELECTED); // SF_SELECTED == 1
+ if (flags & SF_RO) state += 3;
+ }
+
+ item.state = (flags & SF_BOLD) << 1; // (SF_BOLD << 1) == 16 == TVIS_BOLD
+ item.state |= flags & SF_EXPAND; // TVIS_EXPANDED == SF_EXPAND
+ item.state |= INDEXTOSTATEIMAGEMASK(state);
+
+ // TVE_COLLAPSE = 1, TVE_EXPAND = 2
+ TreeView_Expand(hwTree, item.hItem, TVE_COLLAPSE + ((flags & SF_EXPAND) / SF_EXPAND));
+
+ TreeView_SetItem(hwTree, &item);
+ }
+
+ // workaround for bug #1397031
+ //
+ // windows 95 doesn't erase the background of the state image
+ // before it draws a new one. because of this parts of the old
+ // state image will show where the new state image is masked.
+ //
+ // to solve this, the following line forces the background to
+ // be erased. sadly, this redraws the entire control. it might
+ // be a good idea to figure out where the state images are and
+ // redraw only those.
+
+ InvalidateRect(hwTree, NULL, TRUE);
+}
+
+int NSISCALL TreeGetSelectedSection(HWND tree, BOOL mouse)
+{
+ HTREEITEM hItem = TreeView_GetSelection(tree);
+ TVITEM item;
+
+ if (mouse)
+ {
+ TVHITTESTINFO ht;
+ DWORD dwpos = GetMessagePos();
+
+ ht.pt.x = GET_X_LPARAM(dwpos);
+ ht.pt.y = GET_Y_LPARAM(dwpos);
+ ScreenToClient(tree, &ht.pt);
+
+ TreeView_HitTest(tree, &ht);
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ if (!(ht.flags & TVHT_ONITEMSTATEICON))
+#else
+ if (!(ht.flags & (TVHT_ONITEMSTATEICON|TVHT_ONITEMLABEL|TVHT_ONITEMRIGHT|TVHT_ONITEM)))
+#endif
+ return -1;
+
+ hItem = ht.hItem;
+ }
+
+ item.mask = TVIF_PARAM;
+ item.hItem = hItem;
+ TreeView_GetItem(tree, &item);
+
+ return (int) item.lParam;
+}
+
+static LONG oldTreeWndProc;
+static LPARAM last_selected_tree_item;
+static DWORD WINAPI newTreeWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_CHAR && wParam == VK_SPACE) {
+ NotifyCurWnd(WM_TREEVIEW_KEYHACK);
+ return 0;
+ }
+#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
+#ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ if (uMsg == WM_MOUSEMOVE) {
+ if (IsWindowVisible(hwnd)) {
+ lParam = TreeGetSelectedSection(hwnd, TRUE);
+ uMsg = WM_NOTIFY_SELCHANGE;
+ }
+ }
+#endif
+ if (uMsg == WM_NOTIFY_SELCHANGE) {
+ if (last_selected_tree_item != lParam)
+ {
+ last_selected_tree_item = lParam;
+
+ mystrcpy(g_tmp, g_usrvars[0]);
+
+ myitoa(g_usrvars[0], lParam);
+
+ ExecuteCallbackFunction(CB_ONMOUSEOVERSECTION);
+
+ mystrcpy(g_usrvars[0], g_tmp);
+ }
+ }
+#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ return CallWindowProc((WNDPROC)oldTreeWndProc,hwnd,uMsg,wParam,lParam);
+}
+
+static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ static HTREEITEM *hTreeItems;
+ static HIMAGELIST hImageList;
+ HWND hwndCombo1 = GetUIItem(IDC_COMBO1);
+ HWND hwndTree1 = GetUIItem(IDC_TREE1);
+ extern HWND g_SectionHack;
+ section *sections=g_sections;
+ int *install_types=g_header->install_types;
+ if (uMsg == WM_INITDIALOG)
+ {
+ int doLines=0;
+ HTREEITEM Par;
+ HBITMAP hBMcheck1;
+ int x, lastGoodX, i, noCombo=2;
+
+ g_SectionHack=hwndDlg;
+
+ hTreeItems=(HTREEITEM*)GlobalAlloc(GPTR,sizeof(HTREEITEM)*num_sections);
+
+ hBMcheck1=LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
+
+ last_selected_tree_item=-1;
+ oldTreeWndProc=SetWindowLong(hwndTree1,GWL_WNDPROC,(long)newTreeWndProc);
+
+ hImageList = ImageList_Create(16,16, ILC_COLOR32|ILC_MASK, 6, 0);
+ ImageList_AddMasked(hImageList,hBMcheck1,RGB(255,0,255));
+
+ TreeView_SetImageList(hwndTree1, hImageList, TVSIL_STATE);
+
+ if (TreeView_GetItemHeight(hwndTree1) < 16)
+ TreeView_SetItemHeight(hwndTree1, 16);
+
+ DeleteObject(hBMcheck1);
+
+ for (i = 0; i < NSIS_MAX_INST_TYPES+1; i++)
+ {
+ if (install_types[i])
+ {
+ int j;
+ if (i != NSIS_MAX_INST_TYPES) noCombo = 0;
+ j=SendMessage(hwndCombo1,CB_ADDSTRING,0,(LPARAM)GetNSISStringTT(install_types[i]));
+ SendMessage(hwndCombo1,CB_SETITEMDATA,j,i);
+ }
+ }
+
+ SetUITextFromLang(IDC_TEXT1,this_page->parms[1+noCombo]);
+ SetUITextFromLang(IDC_TEXT2,this_page->parms[2+noCombo]);
+
+ Par=NULL;
+
+ for (lastGoodX = x = 0; x < num_sections; x ++)
+ {
+ section *sec=sections+x;
+
+ if (sec->name[0])
+ {
+ TVINSERTSTRUCT tv;
+
+ tv.hParent = Par;
+ tv.hInsertAfter = TVI_LAST;
+ tv.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_STATE;
+ tv.item.stateMask = TVIS_EXPANDED;
+ tv.item.lParam = x;
+ tv.item.pszText = sec->name;
+
+ tv.item.state = sec->flags & SF_EXPAND; // TVIS_EXPANDED == SF_EXPAND
+
+ if (sec->flags & SF_SECGRP)
+ {
+ tv.item.mask |= TVIF_CHILDREN;
+ tv.item.cChildren = 1;
+ Par = hTreeItems[x] = TreeView_InsertItem(hwndTree1, &tv);
+ doLines = 1;
+ }
+ else if (sec->flags & SF_SECGRPEND)
+ {
+ Par = TreeView_GetParent(hwndTree1, Par);
+ }
+ else
+ {
+ lastGoodX = x;
+ hTreeItems[x] = TreeView_InsertItem(hwndTree1, &tv);
+ }
+ }
+ }
+
+ if (!doLines)
+ {
+ SetWindowLong(hwndTree1,GWL_STYLE,GetWindowLong(hwndTree1,GWL_STYLE)&~(TVS_LINESATROOT));
+ }
+
+ if (!noCombo)
+ {
+ ShowWindow(hwndCombo1, SW_SHOW);
+ SetActiveCtl(hwndCombo1);
+ }
+ else
+ SetActiveCtl(hwndTree1);
+ }
+
+ if (uMsg == WM_NOTIFY_START)
+ {
+ wParam = 0;
+ lParam = 1;
+ uMsg = WM_IN_UPDATEMSG;
+ }
+
+ if (uMsg == WM_NOTIFY || uMsg == WM_TREEVIEW_KEYHACK)
+ {
+ LPNMHDR lpnmh = (LPNMHDR) lParam;
+ if (uMsg == WM_TREEVIEW_KEYHACK || lpnmh->idFrom == IDC_TREE1)
+ {
+ if (!(g_flags&CH_FLAGS_NO_CUSTOM) && (uMsg == WM_TREEVIEW_KEYHACK || lpnmh->code == NM_CLICK))
+ {
+ int secid = TreeGetSelectedSection(hwndTree1, uMsg != WM_TREEVIEW_KEYHACK);
+
+ if (secid >= 0)
+ {
+ int flags = sections[secid].flags;
+
+ if ((flags & SF_RO) == 0)
+ {
+ if ((flags & SF_PSELECTED))
+ {
+ flags ^= SF_TOGGLED;
+
+ if (flags & SF_TOGGLED)
+ {
+ flags |= SF_SELECTED;
+ }
+ else
+ {
+ flags &= ~SF_SELECTED;
+ }
+ }
+ else
+ {
+ flags ^= SF_SELECTED;
+ }
+
+ sections[secid].flags = flags;
+
+ SectionFlagsChanged(secid);
+
+ wParam = 1;
+ lParam = !(g_flags & CH_FLAGS_COMP_ONLY_ON_CUSTOM);
+ uMsg = WM_IN_UPDATEMSG;
+ }
+ } // was valid click
+ } // was click or hack
+#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
+ if (lpnmh)
+ {
+ if (lpnmh->code == TVN_SELCHANGED)
+ {
+ SendMessage(hwndTree1, WM_NOTIFY_SELCHANGE, 0, ((LPNMTREEVIEW)lpnmh)->itemNew.lParam);
+ }
+ if (lpnmh->code == TVN_ITEMEXPANDED)
+ {
+ LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lpnmh;
+ if (pnmtv->action == TVE_EXPAND)
+ sections[pnmtv->itemNew.lParam].flags |= SF_EXPAND;
+ else
+ sections[pnmtv->itemNew.lParam].flags &= ~SF_EXPAND;
+ }
+ }
+#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ }
+ }
+
+ if (uMsg == WM_COMMAND && LOWORD(wParam) == IDC_COMBO1 && HIWORD(wParam) == CBN_SELCHANGE)
+ {
+ int t = SendMessage(hwndCombo1,CB_GETCURSEL,0,0);
+ if (t != CB_ERR)
+ {
+ int whichcfg = SendMessage(hwndCombo1, CB_GETITEMDATA, t, 0);
+
+ if (whichcfg == CB_ERR || !install_types[whichcfg])
+ whichcfg = NSIS_MAX_INST_TYPES;
+
+ SetInstType(whichcfg);
+
+ SendMessage(hwndDlg, WM_NOTIFY_INSTTYPE_CHANGED, 0, whichcfg);
+
+ wParam = 1;
+ lParam = 0;
+ uMsg = WM_IN_UPDATEMSG;
+ }
+ }
+
+ if (uMsg == WM_MOUSEMOVE)
+ {
+ SendMessage(hwndTree1, WM_MOUSEMOVE, 0, 0);
+ }
+
+ if (uMsg == WM_NOTIFY_INIGO_MONTOYA)
+ {
+ if (hImageList) ImageList_Destroy(hImageList);
+ if (hTreeItems) GlobalFree(hTreeItems);
+ hImageList = NULL;
+ hTreeItems = NULL;
+ g_SectionHack = NULL;
+ }
+
+ if (uMsg == WM_IN_UPDATEMSG)
+ {
+ RefreshSectionGroups();
+
+#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_COMPONENTPAGE)
+ if (wParam)
+ {
+ ExecuteCallbackFunction(CB_ONSELCHANGE);
+ }
+#endif//NSIS_SUPPORT_CODECALLBACKS && NSIS_CONFIG_COMPONENTPAGE
+
+ if (lParam)
+ {
+ int i, cbi;
+ int inst_type = GetInstType(hTreeItems);
+ SetInstType(inst_type);
+
+ for (i = 0, cbi = 0; i < inst_type; i++)
+ {
+ if (install_types[i])
+ {
+ cbi++;
+ }
+ }
+
+ SendMessage(hwndCombo1, CB_SETCURSEL, cbi, 0);
+
+ lParam = inst_type;
+ uMsg = WM_NOTIFY_INSTTYPE_CHANGED;
+ }
+
+ RefreshSectionGroups();
+ RefreshComponents(hwndTree1, hTreeItems);
+
+ if (LANG_STR_TAB(LANG_SPACE_REQ)) {
+ SetSizeText(IDC_SPACEREQUIRED,LANG_SPACE_REQ,sumsecsfield(size_kb));
+ }
+ }
+
+ if (uMsg == WM_NOTIFY_INSTTYPE_CHANGED)
+ {
+ if (g_flags & CH_FLAGS_COMP_ONLY_ON_CUSTOM)
+ {
+ int c = (lParam == NSIS_MAX_INST_TYPES ? 1 : 0) << 3;// SW_SHOWNA=8, SW_HIDE=0
+ ShowWindow(hwndTree1, c);
+ ShowWindow(GetUIItem(IDC_TEXT2), c);
+ }
+ }
+
+ return HandleStaticBkColor();
+}
+#endif//NSIS_CONFIG_COMPONENTPAGE
+
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+
+void NSISCALL update_status_text(int strtab, const char *text) {
+ static char tmp[NSIS_MAX_STRLEN*2];
+ LVITEM new_item;
+ HWND linsthwnd = insthwnd;
+ if (linsthwnd)
+ {
+ int updateflag = g_exec_flags.status_update;
+ int tmplen;
+
+ if (!(updateflag & 1))
+ GetNSISString(tmp, strtab);
+
+ tmplen = mystrlen(tmp);
+
+ if (text)
+ {
+ if (tmplen + mystrlen(text) >= sizeof(tmp)) return;
+ mystrcat(tmp, text);
+ }
+
+ if ((updateflag & 4) == 0) my_SetWindowText(insthwnd2, tmp);
+ if ((updateflag & 2) == 0)
+ {
+ new_item.mask = LVIF_TEXT;
+ new_item.pszText = tmp;
+ new_item.iItem = ListView_GetItemCount(linsthwnd) - (updateflag & 1);
+ new_item.iSubItem = 0;
+ // LVM_INSERTITEM - LVM_SETITEM = 1
+ SendMessage(linsthwnd, LVM_INSERTITEM - (updateflag & 1), 0, (LPARAM) &new_item);
+ ListView_EnsureVisible(linsthwnd, new_item.iItem, 0);
+ }
+
+ if (updateflag & 1)
+ tmp[tmplen] = 0;
+ }
+}
+
+static DWORD WINAPI install_thread(LPVOID p)
+{
+ int m_inst_sec=num_sections;
+ HWND progresswnd = (HWND)p;
+ section *s = g_sections;
+
+#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
+ {
+ extern HRESULT g_hres;
+ g_hres|=OleInitialize(NULL);
+ }
+#endif
+
+ // workaround for bug #1400995
+ //
+ // for an unexplained reason, MessageBox with MB_TOPMOST
+ // will fail, if no other messages were sent from this
+ // thread to the GUI thread before it.
+ //
+ // the source of the problem couldn't be found, so a
+ // WM_NULL is sent to work around it.
+
+ NotifyCurWnd(WM_NULL);
+
+ while (m_inst_sec--)
+ {
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ if (s->flags&SF_SELECTED)
+#endif
+ {
+ log_printf2("Section: \"%s\"",s->name);
+ if (ExecuteCodeSegment(s->code,progresswnd))
+ {
+ g_exec_flags.abort++;
+ break;
+ }
+ }
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ else
+ {
+ log_printf2("Skipping section: \"%s\"",s->name);
+ }
+#endif
+ s++;
+ }
+ NotifyCurWnd(WM_NOTIFY_INSTPROC_DONE);
+
+#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
+ OleUninitialize();
+#endif
+
+ return g_exec_flags.abort;
+}
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+
+static BOOL CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ HWND linsthwnd=insthwnd;
+ if (uMsg == WM_INITDIALOG)
+ {
+ RECT r;
+ LVCOLUMN lvc = {LVCF_WIDTH, 0, -1, 0, 0, -1};
+ int lb_bg=g_header->lb_bg,lb_fg=g_header->lb_fg;
+
+ insthwndbutton=GetUIItem(IDC_SHOWDETAILS);
+ insthwnd2=GetUIItem(IDC_INTROTEXT);
+ linsthwnd=insthwnd=GetUIItem(IDC_LIST1);
+
+ SetActiveCtl(insthwndbutton);
+
+ progress_bar_len=sumsecsfield(code_size);
+ progress_bar_pos=0;
+
+ log_printf3("New install of \"%s\" to \"%s\"",GetNSISStringTT(LANG_NAME),state_install_directory);
+
+ GetClientRect(linsthwnd, &r);
+ lvc.cx = r.right - GetSystemMetrics(SM_CXHSCROLL);
+ ListView_InsertColumn(linsthwnd, 0, &lvc);
+
+ ListView_SetExtendedListViewStyleEx(linsthwnd, LVS_EX_LABELTIP, LVS_EX_LABELTIP);
+ if (lb_bg >= 0) {
+ ListView_SetBkColor(linsthwnd, lb_bg);
+ ListView_SetTextBkColor(linsthwnd, lb_bg);
+ }
+ if (lb_fg >= 0) {
+ ListView_SetTextColor(linsthwnd, lb_fg);
+ }
+ SetUITextFromLang(IDC_SHOWDETAILS,this_page->parms[1]);
+ if (g_flags&(CH_FLAGS_DETAILS_SHOWDETAILS|CH_FLAGS_DETAILS_NEVERSHOW))
+ {
+ ShowWindow(insthwndbutton,SW_HIDE);
+ if (!(g_flags&CH_FLAGS_DETAILS_NEVERSHOW)) ShowWindow(linsthwnd,SW_SHOWNA);
+ else insthwndbutton=NULL;
+ SetActiveCtl(insthwnd2);
+ }
+
+ {
+ HWND progresswnd=GetUIItem(IDC_PROGRESS);
+ SendMessage(progresswnd,PBM_SETRANGE,0,MAKELPARAM(0,30000));
+ if (g_flags&CH_FLAGS_PROGRESS_COLORED)
+ {
+ SendMessage(progresswnd,PBM_SETBARCOLOR,0,lb_fg);
+ SendMessage(progresswnd,PBM_SETBKCOLOR,0,lb_bg);
+ }
+ }
+
+ return FALSE;
+ }
+ if (uMsg == WM_NOTIFY_START) {
+ DWORD id;
+ CloseHandle(CreateThread(NULL,0,install_thread,GetUIItem(IDC_PROGRESS),0,&id));
+ }
+ if (uMsg == WM_COMMAND && LOWORD(wParam) == IDC_SHOWDETAILS)
+ {
+ ShowWindow(insthwndbutton,SW_HIDE);
+ ShowWindow(linsthwnd,SW_SHOWNA);
+ SetActiveCtl(linsthwnd);
+ }
+ if (uMsg == WM_NOTIFY_INSTPROC_DONE)
+ {
+ if (g_quit_flag)
+ {
+ m_retcode=2;
+ outernotify(NOTIFY_BYE_BYE);
+ }
+ else
+ {
+ ShowWindow(g_hwnd,SW_SHOWNA);
+ if (!g_exec_flags.abort)
+ update_status_text(g_this_page->parms[2],0);
+ outernotify(1);
+ }
+ }
+ //>>>Ximon Eighteen aka Sunjammer 30th August 2002
+ //+++Popup "Copy Details To Clipboard" menu when RMB clicked in DetailView
+ if (uMsg == WM_CONTEXTMENU && wParam == (WPARAM) linsthwnd)
+ {
+ int count = ListView_GetItemCount(linsthwnd);
+ if (count > 0)
+ {
+ HMENU menu = CreatePopupMenu();
+ POINT pt;
+ AppendMenu(menu,MF_STRING,1,GetNSISStringTT(LANG_COPYDETAILS));
+ if (lParam == ((UINT)-1))
+ {
+ RECT r;
+ GetWindowRect(linsthwnd, &r);
+ pt.x = r.left;
+ pt.y = r.top;
+ }
+ else
+ {
+ pt.x = GET_X_LPARAM(lParam);
+ pt.y = GET_Y_LPARAM(lParam);
+ }
+ if (1==TrackPopupMenu(
+ menu,
+ TPM_NONOTIFY|TPM_RETURNCMD,
+ pt.x,
+ pt.y,
+ 0,hwndDlg,0))
+ {
+ int i,total = 1; // 1 for the null char
+ LVITEM item;
+ HGLOBAL memory;
+ LPTSTR ptr;//,endPtr;
+
+ // 1st pass - determine clipboard memory required.
+ item.iSubItem = 0;
+ item.pszText = g_tmp;
+ item.cchTextMax = sizeof(g_tmp) - 1;
+ i = count;
+ while (i--)
+ // Add 2 for the CR/LF combination that must follow every line.
+ total += 2+SendMessage(linsthwnd,LVM_GETITEMTEXT,i,(LPARAM)&item);
+
+ // 2nd pass - store detail view strings on the clipboard
+ // Clipboard MSDN docs say mem must be GMEM_MOVEABLE
+ OpenClipboard(0);
+ EmptyClipboard();
+ memory = GlobalAlloc(GHND,total);
+ ptr = GlobalLock(memory);
+ //endPtr = ptr+total-2; // -2 to allow for CR/LF
+ i = 0;
+ do {
+ item.pszText = ptr;
+ ptr += SendMessage(linsthwnd,LVM_GETITEMTEXT,i,(LPARAM)&item);
+ *(WORD*)ptr = CHAR2_TO_WORD('\r','\n');
+ ptr+=2;
+ } while (++i < count);
+ // memory is auto zeroed when allocated with GHND - *ptr = 0;
+ GlobalUnlock(memory);
+ SetClipboardData(CF_TEXT,memory);
+ CloseClipboard();
+ }
+ }
+ return FALSE;
+ }
+ //<<<
+ return HandleStaticBkColor();
+}
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
diff --git a/Source/exehead/afxres.h b/Source/exehead/afxres.h
index 7a74b25..70bd1e4 100755
--- a/Source/exehead/afxres.h
+++ b/Source/exehead/afxres.h
@@ -1,21 +1,21 @@
-/*
- * afxres.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-
-#ifndef IDC_STATIC
-#define IDC_STATIC -1
-#endif
+/*
+ * afxres.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+
+#ifndef IDC_STATIC
+#define IDC_STATIC -1
+#endif
diff --git a/Source/exehead/bgbg.c b/Source/exehead/bgbg.c
index 9851f2b..42da5e1 100755
--- a/Source/exehead/bgbg.c
+++ b/Source/exehead/bgbg.c
@@ -1,99 +1,99 @@
-/*
- * bgbg.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-#include "resource.h"
-#include "config.h"
-#include "fileform.h"
-#include "state.h"
-#include "ui.h"
-#include "util.h"
-
-#ifdef NSIS_SUPPORT_BGBG
-
-#define c1 header->bg_color1
-#define c2 header->bg_color2
-
-LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch (uMsg)
- {
- case WM_WINDOWPOSCHANGING:
- {
- LPWINDOWPOS wp = (LPWINDOWPOS) lParam;
- wp->flags |= SWP_NOACTIVATE;
- wp->hwndInsertAfter = g_hwnd;
- break;
- }
- case WM_PAINT:
- {
- header *header = g_header;
-
- PAINTSTRUCT ps;
- HDC hdc=BeginPaint(hwnd,&ps);
- RECT r;
- LOGBRUSH lh;
- int ry;
-
- lh.lbStyle = BS_SOLID;
-
- GetClientRect(hwnd,&r);
- // this portion by Drew Davidson, drewdavidson@mindspring.com
- ry=r.bottom;
- r.bottom=0;
-
- // JF: made slower, reduced to 4 pixels high, because I like how it looks better/
- while (r.top < ry)
- {
- int rv,gv,bv;
- HBRUSH brush;
- rv = (GetRValue(c2) * r.top + GetRValue(c1) * (ry-r.top)) / ry;
- gv = (GetGValue(c2) * r.top + GetGValue(c1) * (ry-r.top)) / ry;
- bv = (GetBValue(c2) * r.top + GetBValue(c1) * (ry-r.top)) / ry;
- lh.lbColor = RGB(rv,gv,bv);
- brush = CreateBrushIndirect(&lh);
- // note that we don't need to do "SelectObject(hdc, brush)"
- // because FillRect lets us specify the brush as a parameter.
- r.bottom+=4;
- FillRect(hdc, &r, brush);
- DeleteObject(brush);
- r.top+=4;
- }
-
- if (header->bg_textcolor != -1)
- {
- HFONT newFont = CreateFontIndirect((LOGFONT *) header->blocks[NB_BGFONT].offset);
- if (newFont)
- {
- HFONT oldFont;
- r.left=16;
- r.top=8;
- SetBkMode(hdc,TRANSPARENT);
- SetTextColor(hdc,header->bg_textcolor);
- oldFont = SelectObject(hdc,newFont);
- DrawText(hdc,g_caption,-1,&r,DT_TOP|DT_LEFT|DT_SINGLELINE|DT_NOPREFIX);
- SelectObject(hdc,oldFont);
- DeleteObject(newFont);
- }
- }
- EndPaint(hwnd,&ps);
- }
- return 0;
- }
- return DefWindowProc(hwnd,uMsg,wParam,lParam);
-}
-
-#endif //NSIS_SUPPORT_BGBG
+/*
+ * bgbg.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+#include "resource.h"
+#include "config.h"
+#include "fileform.h"
+#include "state.h"
+#include "ui.h"
+#include "util.h"
+
+#ifdef NSIS_SUPPORT_BGBG
+
+#define c1 header->bg_color1
+#define c2 header->bg_color2
+
+LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch (uMsg)
+ {
+ case WM_WINDOWPOSCHANGING:
+ {
+ LPWINDOWPOS wp = (LPWINDOWPOS) lParam;
+ wp->flags |= SWP_NOACTIVATE;
+ wp->hwndInsertAfter = g_hwnd;
+ break;
+ }
+ case WM_PAINT:
+ {
+ header *header = g_header;
+
+ PAINTSTRUCT ps;
+ HDC hdc=BeginPaint(hwnd,&ps);
+ RECT r;
+ LOGBRUSH lh;
+ int ry;
+
+ lh.lbStyle = BS_SOLID;
+
+ GetClientRect(hwnd,&r);
+ // this portion by Drew Davidson, drewdavidson@mindspring.com
+ ry=r.bottom;
+ r.bottom=0;
+
+ // JF: made slower, reduced to 4 pixels high, because I like how it looks better/
+ while (r.top < ry)
+ {
+ int rv,gv,bv;
+ HBRUSH brush;
+ rv = (GetRValue(c2) * r.top + GetRValue(c1) * (ry-r.top)) / ry;
+ gv = (GetGValue(c2) * r.top + GetGValue(c1) * (ry-r.top)) / ry;
+ bv = (GetBValue(c2) * r.top + GetBValue(c1) * (ry-r.top)) / ry;
+ lh.lbColor = RGB(rv,gv,bv);
+ brush = CreateBrushIndirect(&lh);
+ // note that we don't need to do "SelectObject(hdc, brush)"
+ // because FillRect lets us specify the brush as a parameter.
+ r.bottom+=4;
+ FillRect(hdc, &r, brush);
+ DeleteObject(brush);
+ r.top+=4;
+ }
+
+ if (header->bg_textcolor != -1)
+ {
+ HFONT newFont = CreateFontIndirect((LOGFONT *) header->blocks[NB_BGFONT].offset);
+ if (newFont)
+ {
+ HFONT oldFont;
+ r.left=16;
+ r.top=8;
+ SetBkMode(hdc,TRANSPARENT);
+ SetTextColor(hdc,header->bg_textcolor);
+ oldFont = SelectObject(hdc,newFont);
+ DrawText(hdc,g_caption,-1,&r,DT_TOP|DT_LEFT|DT_SINGLELINE|DT_NOPREFIX);
+ SelectObject(hdc,oldFont);
+ DeleteObject(newFont);
+ }
+ }
+ EndPaint(hwnd,&ps);
+ }
+ return 0;
+ }
+ return DefWindowProc(hwnd,uMsg,wParam,lParam);
+}
+
+#endif //NSIS_SUPPORT_BGBG
diff --git a/Source/exehead/components.c b/Source/exehead/components.c
index 8b494c4..f7643e4 100755
--- a/Source/exehead/components.c
+++ b/Source/exehead/components.c
@@ -1,164 +1,164 @@
-/*
- * components.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-#include "config.h"
-#include "ui.h"
-#include "fileform.h"
-
-void NSISCALL SectionFlagsChanged(unsigned int index) {
- section *sections = g_sections;
-
- int flags = sections[index].flags;
-
- if (flags & SF_SECGRP) {
- unsigned int i = index + 1;
- unsigned int level = 0;
-
- for (; i < (unsigned int) num_sections; i++) {
- if (sections[i].flags & SF_SECGRP) {
- level++;
- continue;
- }
-
- if (sections[i].flags & SF_SECGRPEND) {
- if (level-- == 0) {
- break;
- }
-
- continue;
- }
-
- if ((sections[i].flags & SF_RO) == 0) {
- sections[i].flags &= ~SF_SELECTED;
- sections[i].flags |= (flags & SF_SELECTED);
- }
- }
- }
-}
-
-unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call) {
- unsigned int selected = 0;
- unsigned int not_selected = 0;
-
- section *sections = g_sections;
-
- section *sec = &sections[i];
-
- if (sec->flags & SF_SECGRP) {
- if (not_first_call) {
- sec->flags &= ~(SF_SELECTED | SF_PSELECTED);
- i++;
- }
- }
-
- while (i < (unsigned int) num_sections) {
- int flags = sections[i].flags;
- int ni = i + 1;
-
- if (flags & SF_SECGRP) {
- ni = _RefreshSectionGroups(i, 1);
- flags = sections[i].flags;
- }
-
- if (flags & SF_SECGRPEND) {
- if (selected) {
- if (not_selected) {
- sec->flags |= SF_PSELECTED;
- } else {
- sec->flags |= SF_SELECTED;
- sec->flags &= ~SF_TOGGLED;
- }
- }
-
- return ni;
- }
-
- if (flags & SF_PSELECTED) {
- selected++;
- }
-
- if (flags & SF_SELECTED) {
- selected++;
- } else {
- not_selected++;
- }
-
- i = ni;
- }
-
- return 0;
-}
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
-
-void NSISCALL SetInstType(int inst_type) {
- unsigned int i = 0;
-
- section *sections = g_sections;
-
- if ((unsigned int) inst_type >= NSIS_MAX_INST_TYPES) {
- return;
- }
-
- for (; i < (unsigned int) num_sections; i++) {
- if (sections[i].flags & (SF_SECGRP | SF_SECGRPEND)) {
- continue;
- }
-
- if (sections[i].install_types & (1 << inst_type)) {
- sections[i].flags |= SF_SELECTED;
- } else {
- sections[i].flags &= ~SF_SELECTED;
- }
- }
-}
-
-unsigned int NSISCALL GetInstType(HTREEITEM *items) {
- unsigned int i, j;
-
- section *sections = g_sections;
-
- for (i = 0; i < NSIS_MAX_INST_TYPES; i++) {
- if (!g_header->install_types[i]) {
- continue;
- }
-
- for (j = 0; j < (unsigned int) num_sections; j++) {
- if (sections[j].flags & (SF_SECGRP | SF_SECGRPEND)) {
- continue;
- }
-
- if (items && !items[j]) {
- continue;
- }
-
- if ((sections[j].install_types & (1 << i)) == ((sections[j].flags & SF_SELECTED) << i)) {
- continue;
- } else {
- break;
- }
- }
-
- if (j == (unsigned int) num_sections) {
- break;
- }
- }
-
- return i;
-}
-
-#endif//NSIS_CONFIG_COMPONENTPAGE
+/*
+ * components.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+#include "config.h"
+#include "ui.h"
+#include "fileform.h"
+
+void NSISCALL SectionFlagsChanged(unsigned int index) {
+ section *sections = g_sections;
+
+ int flags = sections[index].flags;
+
+ if (flags & SF_SECGRP) {
+ unsigned int i = index + 1;
+ unsigned int level = 0;
+
+ for (; i < (unsigned int) num_sections; i++) {
+ if (sections[i].flags & SF_SECGRP) {
+ level++;
+ continue;
+ }
+
+ if (sections[i].flags & SF_SECGRPEND) {
+ if (level-- == 0) {
+ break;
+ }
+
+ continue;
+ }
+
+ if ((sections[i].flags & SF_RO) == 0) {
+ sections[i].flags &= ~SF_SELECTED;
+ sections[i].flags |= (flags & SF_SELECTED);
+ }
+ }
+ }
+}
+
+unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call) {
+ unsigned int selected = 0;
+ unsigned int not_selected = 0;
+
+ section *sections = g_sections;
+
+ section *sec = &sections[i];
+
+ if (sec->flags & SF_SECGRP) {
+ if (not_first_call) {
+ sec->flags &= ~(SF_SELECTED | SF_PSELECTED);
+ i++;
+ }
+ }
+
+ while (i < (unsigned int) num_sections) {
+ int flags = sections[i].flags;
+ int ni = i + 1;
+
+ if (flags & SF_SECGRP) {
+ ni = _RefreshSectionGroups(i, 1);
+ flags = sections[i].flags;
+ }
+
+ if (flags & SF_SECGRPEND) {
+ if (selected) {
+ if (not_selected) {
+ sec->flags |= SF_PSELECTED;
+ } else {
+ sec->flags |= SF_SELECTED;
+ sec->flags &= ~SF_TOGGLED;
+ }
+ }
+
+ return ni;
+ }
+
+ if (flags & SF_PSELECTED) {
+ selected++;
+ }
+
+ if (flags & SF_SELECTED) {
+ selected++;
+ } else {
+ not_selected++;
+ }
+
+ i = ni;
+ }
+
+ return 0;
+}
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+
+void NSISCALL SetInstType(int inst_type) {
+ unsigned int i = 0;
+
+ section *sections = g_sections;
+
+ if ((unsigned int) inst_type >= NSIS_MAX_INST_TYPES) {
+ return;
+ }
+
+ for (; i < (unsigned int) num_sections; i++) {
+ if (sections[i].flags & (SF_SECGRP | SF_SECGRPEND)) {
+ continue;
+ }
+
+ if (sections[i].install_types & (1 << inst_type)) {
+ sections[i].flags |= SF_SELECTED;
+ } else {
+ sections[i].flags &= ~SF_SELECTED;
+ }
+ }
+}
+
+unsigned int NSISCALL GetInstType(HTREEITEM *items) {
+ unsigned int i, j;
+
+ section *sections = g_sections;
+
+ for (i = 0; i < NSIS_MAX_INST_TYPES; i++) {
+ if (!g_header->install_types[i]) {
+ continue;
+ }
+
+ for (j = 0; j < (unsigned int) num_sections; j++) {
+ if (sections[j].flags & (SF_SECGRP | SF_SECGRPEND)) {
+ continue;
+ }
+
+ if (items && !items[j]) {
+ continue;
+ }
+
+ if ((sections[j].install_types & (1 << i)) == ((sections[j].flags & SF_SELECTED) << i)) {
+ continue;
+ } else {
+ break;
+ }
+ }
+
+ if (j == (unsigned int) num_sections) {
+ break;
+ }
+ }
+
+ return i;
+}
+
+#endif//NSIS_CONFIG_COMPONENTPAGE
diff --git a/Source/exehead/components.h b/Source/exehead/components.h
index 35b78c6..6d77bea 100755
--- a/Source/exehead/components.h
+++ b/Source/exehead/components.h
@@ -1,28 +1,28 @@
-/*
- * components.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 ___COMPONENTS_H___
-#define ___COMPONENTS_H___
-
-void NSISCALL SectionFlagsChanged(unsigned int index);
-#define RefreshSectionGroups() _RefreshSectionGroups(0, 0)
-unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call);
-#ifdef NSIS_CONFIG_COMPONENTPAGE
-void NSISCALL SetInstType(int inst_type);
-unsigned int NSISCALL GetInstType(HTREEITEM *items);
-#endif//NSIS_CONFIG_COMPONENTPAGE
-
-#endif//!___COMPONENTS_H___
+/*
+ * components.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 ___COMPONENTS_H___
+#define ___COMPONENTS_H___
+
+void NSISCALL SectionFlagsChanged(unsigned int index);
+#define RefreshSectionGroups() _RefreshSectionGroups(0, 0)
+unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call);
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+void NSISCALL SetInstType(int inst_type);
+unsigned int NSISCALL GetInstType(HTREEITEM *items);
+#endif//NSIS_CONFIG_COMPONENTPAGE
+
+#endif//!___COMPONENTS_H___
diff --git a/Source/exehead/config.h b/Source/exehead/config.h
index 03a2afd..4f50e79 100755
--- a/Source/exehead/config.h
+++ b/Source/exehead/config.h
@@ -1,161 +1,161 @@
-/*
- * config.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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_CONFIG_H
-#define NSIS_CONFIG_H
-
-#ifndef APSTUDIO_INVOKED // keep msdev's resource editor from mangling the .rc file
-
-#include "sconf.h"
-
-#ifndef NSIS_CONFIG_VISIBLE_SUPPORT
- #ifdef NSIS_CONFIG_LICENSEPAGE
- #undef NSIS_CONFIG_LICENSEPAGE
- #endif
- #ifdef NSIS_CONFIG_COMPONENTPAGE
- #undef NSIS_CONFIG_COMPONENTPAGE
- #endif
- #ifdef NSIS_SUPPORT_BGBG
- #undef NSIS_SUPPORT_BGBG
- #endif
- #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- #undef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- #endif
-#endif
-
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- #ifndef NSIS_SUPPORT_HWNDS
- #define NSIS_SUPPORT_HWNDS
- #endif
-#endif
-
-#ifdef NSIS_CONFIG_LOG_ODS
- #ifndef NSIS_CONFIG_LOG
- #error NSIS_CONFIG_LOG_ODS relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
- #endif
-#endif
-
-#ifdef NSIS_CONFIG_LOG_STDOUT
- #ifndef NSIS_CONFIG_LOG
- #error NSIS_CONFIG_LOG_STDOUT relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
- #endif
-#endif
-
-#ifdef NSIS_CONFIG_LOG_TIMESTAMP
- #ifndef NSIS_CONFIG_LOG
- #error NSIS_CONFIG_LOG_TIMESTAMP relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
- #endif
-#endif
-
-#if defined(NSIS_CONFIG_CRC_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
- #define _NSIS_CONFIG_VERIFYDIALOG
-#endif
-
-#if defined(NSIS_CONFIG_UNINSTALL_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
- #define _NSIS_CONFIG_UNINSTDLG
-#endif
-
-#if defined(NSIS_CONFIG_UNINSTALL_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
- #define _NSIS_CONFIG_UNINSTDLG
-#endif
-
-#ifdef EXEHEAD
- #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- #ifndef NSIS_COMPRESS_USE_ZLIB
- #ifndef NSIS_COMPRESS_USE_BZIP2
- #ifndef NSIS_COMPRESS_USE_LZMA
- #error compression is enabled but zlib, bzip2 and lzma are disabled.
- #endif
- #endif
- #endif
- #endif
-
- #ifdef NSIS_COMPRESS_USE_ZLIB
- #ifdef NSIS_COMPRESS_USE_BZIP2
- #error both zlib and bzip2 are enabled.
- #endif
- #ifdef NSIS_COMPRESS_USE_LZMA
- #error both zlib and lzma are enabled.
- #endif
- #endif
- #ifdef NSIS_COMPRESS_USE_BZIP2
- #ifdef NSIS_COMPRESS_USE_LZMA
- #error both bzip2 and lzma are enabled.
- #endif
- #endif
-
- #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- #ifdef NSIS_COMPRESS_WHOLE
- #ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- #ifndef _NSIS_CONFIG_VERIFYDIALOG
- #define _NSIS_CONFIG_VERIFYDIALOG
- #endif
- #endif
- #endif
- #endif
-#endif // EXEHEAD
-
-#ifdef NSIS_COMPRESS_WHOLE
- #ifndef NSIS_CONFIG_COMPRESSION_SUPPORT
- #error NSIS_COMPRESS_WHOLE defined, NSIS_CONFIG_COMPRESSION_SUPPORT not
- #endif
-#endif
-
-#ifdef NSIS_CONFIG_CRC_ANAL
- #ifndef NSIS_CONFIG_CRC_SUPPORT
- #error NSIS_CONFIG_CRC_ANAL defined but NSIS_CONFIG_CRC_SUPPORT not
- #endif
-#endif
-
-#ifndef NSIS_COMPRESS_BZIP2_LEVEL
- #define NSIS_COMPRESS_BZIP2_LEVEL 9
-#endif
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- #ifndef NSIS_SUPPORT_RMDIR
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_RMDIR, but NSIS_SUPPORT_RMDIR is not defined
- #endif
- #ifndef NSIS_SUPPORT_FILE
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_FILE, but NSIS_SUPPORT_FILE is not defined
- #endif
- #ifndef NSIS_SUPPORT_ACTIVEXREG
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_ACTIVEXREG, but NSIS_SUPPORT_ACTIVEXREG is not defined
- #endif
- #ifndef NSIS_SUPPORT_STACK
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_STACK, but NSIS_SUPPORT_STACK is not defined
- #endif
- #ifndef NSIS_SUPPORT_FNUTIL
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_FNUTIL, but NSIS_SUPPORT_FNUTIL is not defined
- #endif
- #ifndef NSIS_SUPPORT_DELETE
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_DELETE, but NSIS_SUPPORT_DELETE is not defined
- #endif
- #ifndef NSIS_SUPPORT_MESSAGEBOX
- #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_MESSAGEBOX, but NSIS_SUPPORT_MESSAGEBOX is not defined
- #endif
-#endif
-
-#if NSIS_MAX_INST_TYPES > 32
- #error NSIS_MAX_INST_TYPES > 32
-#endif
-
-#ifndef NSIS_DEFAULT_LANG
- #define NSIS_DEFAULT_LANG 1033
-#endif
-
-#endif//!APSTUDIO_INVOKED
-
-#endif // NSIS_CONFIG_H
+/*
+ * config.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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_CONFIG_H
+#define NSIS_CONFIG_H
+
+#ifndef APSTUDIO_INVOKED // keep msdev's resource editor from mangling the .rc file
+
+#include "sconf.h"
+
+#ifndef NSIS_CONFIG_VISIBLE_SUPPORT
+ #ifdef NSIS_CONFIG_LICENSEPAGE
+ #undef NSIS_CONFIG_LICENSEPAGE
+ #endif
+ #ifdef NSIS_CONFIG_COMPONENTPAGE
+ #undef NSIS_CONFIG_COMPONENTPAGE
+ #endif
+ #ifdef NSIS_SUPPORT_BGBG
+ #undef NSIS_SUPPORT_BGBG
+ #endif
+ #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ #undef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ #endif
+#endif
+
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ #ifndef NSIS_SUPPORT_HWNDS
+ #define NSIS_SUPPORT_HWNDS
+ #endif
+#endif
+
+#ifdef NSIS_CONFIG_LOG_ODS
+ #ifndef NSIS_CONFIG_LOG
+ #error NSIS_CONFIG_LOG_ODS relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
+ #endif
+#endif
+
+#ifdef NSIS_CONFIG_LOG_STDOUT
+ #ifndef NSIS_CONFIG_LOG
+ #error NSIS_CONFIG_LOG_STDOUT relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
+ #endif
+#endif
+
+#ifdef NSIS_CONFIG_LOG_TIMESTAMP
+ #ifndef NSIS_CONFIG_LOG
+ #error NSIS_CONFIG_LOG_TIMESTAMP relies on NSIS_CONFIG_LOG, but NSIS_CONFIG_LOG is not defined
+ #endif
+#endif
+
+#if defined(NSIS_CONFIG_CRC_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+ #define _NSIS_CONFIG_VERIFYDIALOG
+#endif
+
+#if defined(NSIS_CONFIG_UNINSTALL_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+ #define _NSIS_CONFIG_UNINSTDLG
+#endif
+
+#if defined(NSIS_CONFIG_UNINSTALL_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+ #define _NSIS_CONFIG_UNINSTDLG
+#endif
+
+#ifdef EXEHEAD
+ #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ #ifndef NSIS_COMPRESS_USE_ZLIB
+ #ifndef NSIS_COMPRESS_USE_BZIP2
+ #ifndef NSIS_COMPRESS_USE_LZMA
+ #error compression is enabled but zlib, bzip2 and lzma are disabled.
+ #endif
+ #endif
+ #endif
+ #endif
+
+ #ifdef NSIS_COMPRESS_USE_ZLIB
+ #ifdef NSIS_COMPRESS_USE_BZIP2
+ #error both zlib and bzip2 are enabled.
+ #endif
+ #ifdef NSIS_COMPRESS_USE_LZMA
+ #error both zlib and lzma are enabled.
+ #endif
+ #endif
+ #ifdef NSIS_COMPRESS_USE_BZIP2
+ #ifdef NSIS_COMPRESS_USE_LZMA
+ #error both bzip2 and lzma are enabled.
+ #endif
+ #endif
+
+ #ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ #ifdef NSIS_COMPRESS_WHOLE
+ #ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ #ifndef _NSIS_CONFIG_VERIFYDIALOG
+ #define _NSIS_CONFIG_VERIFYDIALOG
+ #endif
+ #endif
+ #endif
+ #endif
+#endif // EXEHEAD
+
+#ifdef NSIS_COMPRESS_WHOLE
+ #ifndef NSIS_CONFIG_COMPRESSION_SUPPORT
+ #error NSIS_COMPRESS_WHOLE defined, NSIS_CONFIG_COMPRESSION_SUPPORT not
+ #endif
+#endif
+
+#ifdef NSIS_CONFIG_CRC_ANAL
+ #ifndef NSIS_CONFIG_CRC_SUPPORT
+ #error NSIS_CONFIG_CRC_ANAL defined but NSIS_CONFIG_CRC_SUPPORT not
+ #endif
+#endif
+
+#ifndef NSIS_COMPRESS_BZIP2_LEVEL
+ #define NSIS_COMPRESS_BZIP2_LEVEL 9
+#endif
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ #ifndef NSIS_SUPPORT_RMDIR
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_RMDIR, but NSIS_SUPPORT_RMDIR is not defined
+ #endif
+ #ifndef NSIS_SUPPORT_FILE
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_FILE, but NSIS_SUPPORT_FILE is not defined
+ #endif
+ #ifndef NSIS_SUPPORT_ACTIVEXREG
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_ACTIVEXREG, but NSIS_SUPPORT_ACTIVEXREG is not defined
+ #endif
+ #ifndef NSIS_SUPPORT_STACK
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_STACK, but NSIS_SUPPORT_STACK is not defined
+ #endif
+ #ifndef NSIS_SUPPORT_FNUTIL
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_FNUTIL, but NSIS_SUPPORT_FNUTIL is not defined
+ #endif
+ #ifndef NSIS_SUPPORT_DELETE
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_DELETE, but NSIS_SUPPORT_DELETE is not defined
+ #endif
+ #ifndef NSIS_SUPPORT_MESSAGEBOX
+ #error NSIS_CONFIG_PLUGIN_SUPPORT relies on NSIS_SUPPORT_MESSAGEBOX, but NSIS_SUPPORT_MESSAGEBOX is not defined
+ #endif
+#endif
+
+#if NSIS_MAX_INST_TYPES > 32
+ #error NSIS_MAX_INST_TYPES > 32
+#endif
+
+#ifndef NSIS_DEFAULT_LANG
+ #define NSIS_DEFAULT_LANG 1033
+#endif
+
+#endif//!APSTUDIO_INVOKED
+
+#endif // NSIS_CONFIG_H
diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c
index 3b22e29..1566ffc 100755
--- a/Source/exehead/exec.c
+++ b/Source/exehead/exec.c
@@ -1,1626 +1,1626 @@
-/*
- * exec.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-#include <shlobj.h>
-#include <shellapi.h>
-#include "fileform.h"
-#include "util.h"
-#include "state.h"
-#include "ui.h"
-#include "components.h"
-#include "exec.h"
-#include "lang.h"
-#include "resource.h"
-
-#define EXEC_ERROR 0x7FFFFFFF
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
-HWND g_SectionHack;
-#endif
-
-#ifdef NSIS_SUPPORT_STACK
-typedef struct _stack_t {
- struct _stack_t *next;
- char text[NSIS_MAX_STRLEN];
-} stack_t;
-
-static stack_t *g_st;
-#endif
-
-exec_flags g_exec_flags;
-exec_flags g_exec_flags_last_used;
-
-struct {
- exec_flags *flags;
- void *ExecuteCodeSegment;
- void *validate_filename;
-} plugin_extra_parameters = {
- &g_exec_flags,
- &ExecuteCodeSegment,
- &validate_filename
-};
-
-#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
-HRESULT g_hres;
-#endif
-
-static int NSISCALL ExecuteEntry(entry *entry_);
-
-int NSISCALL resolveaddr(int v)
-{
- if (v < 0)
- {
- return myatoi(g_usrvars[-(v+1)]);
- }
- return v;
-}
-
-int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress)
-{
- while (pos >= 0)
- {
- int rv;
- if (g_entries[pos].which == EW_RET) return 0;
- rv=ExecuteEntry(g_entries + pos);
- if (rv == EXEC_ERROR) return EXEC_ERROR;
-
- rv=resolveaddr(rv);
-
- if (!rv) { rv++; pos++; }
- else
- {
- int t=pos;
- rv--; // rv is decremented here by 1, since it was +1 on the other end.
- pos=rv; // set new position
- rv-=t; // set rv to delta for progress adjustment
- }
-
- if (hwndProgress)
- {
- extern int progress_bar_pos, progress_bar_len;
- progress_bar_pos+=rv;
- SendMessage(hwndProgress,PBM_SETPOS,MulDiv(progress_bar_pos,30000,progress_bar_len),0);
- }
- }
- return 0;
-}
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
-
-int NSISCALL ExecuteCallbackFunction(int num)
-{
- return ExecuteCodeSegment(*(&g_header->code_onInit + num), NULL);
-}
-
-#endif
-
-static char bufs[5][NSIS_MAX_STRLEN];
-static int *parms;
-
-void NSISCALL update_status_text_buf1(int strtab)
-{
- update_status_text(strtab, bufs[1]);
-}
-
-static int NSISCALL GetIntFromParm(int id_)
-{
- return myatoi(GetNSISStringTT(parms[id_]));
-}
-
-// NB - USE CAUTION when rearranging code to make use of the new return value of
-// this function - be sure the parm being accessed is not modified before the call.
-// Use a negative number to get the string validated as a file name
-static char * NSISCALL GetStringFromParm(int id_)
-{
- int id = id_ < 0 ? -id_ : id_;
- char *result = GetNSISString(bufs[id >> 4], parms[id & 0xF]);
- if (id_ < 0) validate_filename(result);
- return result;
-}
-
-#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
-
-#define AlterRegistrySAM(sam) (sam | g_exec_flags.alter_reg_view)
-
-// based loosely on code from Tim Kosse
-// in win9x this isn't necessary (RegDeleteKey() can delete a tree of keys),
-// but in win2k you need to do this manually.
-static LONG NSISCALL myRegDeleteKeyEx(HKEY thiskey, LPCTSTR lpSubKey, int onlyifempty)
-{
- HKEY key;
- int retval=RegOpenKeyEx(thiskey,lpSubKey,0,AlterRegistrySAM(KEY_ENUMERATE_SUB_KEYS),&key);
- if (retval==ERROR_SUCCESS)
- {
- // NB - don't change this to static (recursive function)
- char buffer[MAX_PATH+1];
- while (RegEnumKey(key,0,buffer,MAX_PATH+1)==ERROR_SUCCESS)
- {
- if (onlyifempty)
- {
- RegCloseKey(key);
- return !ERROR_SUCCESS;
- }
- if ((retval=myRegDeleteKeyEx(key,buffer,0)) != ERROR_SUCCESS) break;
- }
- RegCloseKey(key);
- {
- typedef LONG (WINAPI * RegDeleteKeyExAPtr)(HKEY, LPCTSTR, REGSAM, DWORD);
- RegDeleteKeyExAPtr RDKE = (RegDeleteKeyExAPtr)
- myGetProcAddress(MGA_RegDeleteKeyExA);
-
- if (RDKE)
- retval=RDKE(thiskey,lpSubKey,AlterRegistrySAM(0),0);
- else
- retval=g_exec_flags.alter_reg_view||RegDeleteKey(thiskey,lpSubKey);
- }
- }
- return retval;
-}
-
-static HKEY NSISCALL GetRegRootKey(int hRootKey)
-{
- if (hRootKey)
- return (HKEY) hRootKey;
-
- // HKEY_LOCAL_MACHINE - HKEY_CURRENT_USER == 1
- return (HKEY) ((int) HKEY_CURRENT_USER + g_exec_flags.all_user_var);
-}
-
-static HKEY NSISCALL myRegOpenKey(REGSAM samDesired)
-{
- HKEY hKey;
- if (RegOpenKeyEx(GetRegRootKey(parms[1]), GetStringFromParm(0x22), 0, AlterRegistrySAM(samDesired), &hKey) == ERROR_SUCCESS)
- {
- return hKey;
- }
- return NULL;
-}
-#endif//NSIS_SUPPORT_REGISTRYFUNCTIONS
-
-// returns EXEC_ERROR on error
-// returns 0, advance position by 1
-// otherwise, returns new_position+1
-static int NSISCALL ExecuteEntry(entry *entry_)
-{
- char *buf0 = bufs[0];
- char *buf1 = bufs[1];
- char *buf2 = bufs[2];
- char *buf3 = bufs[3];
- //char *buf4 = bufs[4];
-
- char *var0;
- char *var1;
- //char *var2;
- //char *var3;
- //char *var4;
- //char *var5;
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- // Saves 8 bytes
- HWND mainHwnd = g_hwnd;
-#define g_hwnd mainHwnd
-#endif
-
- int exec_error = 0;
-
- entry lent = *entry_;
-
-#define which (lent.which)
-#define parm0 (lent.offsets[0])
-#define parm1 (lent.offsets[1])
-#define parm2 (lent.offsets[2])
-#define parm3 (lent.offsets[3])
-#define parm4 (lent.offsets[4])
-#define parm5 (lent.offsets[5])
-
- var0 = g_usrvars[parm0];
- var1 = g_usrvars[parm1];
- // not used yet
- //var2 = g_usrvars[parm2];
- //var3 = g_usrvars[parm3];
- //var4 = g_usrvars[parm4];
- //var5 = g_usrvars[parm5];
-
- parms = lent.offsets;
-
- switch (which)
- {
- case EW_NOP:
- log_printf2("Jump: %d",parm0);
- return parm0;
- case EW_ABORT:
- {
- log_printf2("Aborting: \"%s\"",GetStringFromParm(0x00));
- update_status_text(parm0,0);
- }
- return EXEC_ERROR;
- case EW_QUIT:
- g_quit_flag++;
- if (g_hwnd) PostQuitMessage(0); // make sure we bail out fast.
- return EXEC_ERROR;
- case EW_CALL:
- {
- int v=resolveaddr(parm0)-1; // address is -1, since we encode it as +1
- log_printf2("Call: %d",v);
- return ExecuteCodeSegment(v,NULL);
- }
- case EW_UPDATETEXT:
- log_printf2("detailprint: %s",GetStringFromParm(0x00));
- update_status_text(parm0,0);
- break;
- case EW_SLEEP:
- {
- int x=GetIntFromParm(0);
- log_printf2("Sleep(%d)",x);
- Sleep(max(x,1));
- }
- break;
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- case EW_BRINGTOFRONT:
- log_printf("BringToFront");
- SetForegroundWindow(g_hwnd);
- break;
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- case EW_SETFLAG:
- if (!parm2)
- {
- FIELDN(g_exec_flags_last_used,parm0)=FIELDN(g_exec_flags,parm0);
- FIELDN(g_exec_flags,parm0)=GetIntFromParm(1);
- }
- else
- {
- FIELDN(g_exec_flags,parm0)=FIELDN(g_exec_flags_last_used,parm0);
- }
- break;
- case EW_IFFLAG:
- {
- int f=lent.offsets[!FIELDN(g_exec_flags,parm2)];
- FIELDN(g_exec_flags,parm2)&=parm3;
- return f;
- }
- case EW_GETFLAG:
- myitoa(var0,FIELDN(g_exec_flags,parm1));
- break;
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- case EW_CHDETAILSVIEW:
- if (insthwndbutton) ShowWindow(insthwndbutton,parm1);
- if (insthwnd) ShowWindow(insthwnd,parm0);
- break;
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- case EW_SETFILEATTRIBUTES:
- {
- char *buf1=GetStringFromParm(-0x10);
- log_printf3("SetFileAttributes: \"%s\":%08X",buf1,parm1);
- if (!SetFileAttributes(buf1,parm1))
- {
- exec_error++;
- log_printf("SetFileAttributes failed.");
- }
- }
- break;
- case EW_CREATEDIR: {
- char *buf1=GetStringFromParm(-0x10);
- log_printf3("CreateDirectory: \"%s\" (%d)",buf1,parm1);
- {
- char *p = skip_root(buf1);
- char c = 'c';
- if (p)
- {
- while (c)
- {
- p = findchar(p, '\\');
- c = *p;
- *p = 0;
- if (!CreateDirectory(buf1, NULL))
- {
- if (GetLastError() != ERROR_ALREADY_EXISTS)
- {
- log_printf3("CreateDirectory: can't create \"%s\" (err=%d)",buf1,GetLastError());
- exec_error++;
- }
- else if ((GetFileAttributes(buf1) & FILE_ATTRIBUTE_DIRECTORY) == 0)
- {
- log_printf2("CreateDirectory: can't create \"%s\" - a file already exists",buf1);
- exec_error++;
- }
- }
- *p++ = c;
- }
- }
- }
- if (parm1)
- {
- update_status_text_buf1(LANG_OUTPUTDIR);
- mystrcpy(state_output_directory,buf1);
- SetCurrentDirectory(buf1);
- }
- else update_status_text_buf1(LANG_CREATEDIR);
- }
- break;
- case EW_IFFILEEXISTS:
- {
- char *buf0=GetStringFromParm(0x00);
- if (file_exists(buf0))
- {
- log_printf3("IfFileExists: file \"%s\" exists, jumping %d",buf0,parm1);
- return parm1;
- }
- log_printf3("IfFileExists: file \"%s\" does not exist, jumping %d",buf0,parm2);
- }
- return parm2;
-#ifdef NSIS_SUPPORT_RENAME
- case EW_RENAME:
- {
- char *buf3=GetStringFromParm(-0x30);
- char *buf2=GetStringFromParm(-0x21);
- char *buf1=GetStringFromParm(0x13);
- log_printf2("Rename: %s",buf1);
- if (MoveFile(buf3,buf2))
- {
- update_status_text_buf1(LANG_RENAME);
- }
- else
- {
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- if (parm2 && file_exists(buf3))
- {
- MoveFileOnReboot(buf3,buf2);
- update_status_text_buf1(LANG_RENAMEONREBOOT);
- log_printf2("Rename on reboot: %s",buf1);
- }
- else
-#endif
- {
- exec_error++;
- log_printf2("Rename failed: %s",buf1);
- }
- }
- }
- break;
-#endif//NSIS_SUPPORT_RENAME
-#ifdef NSIS_SUPPORT_FNUTIL
- case EW_GETFULLPATHNAME:
- {
- char *fp;
- char *p=var1;
- char *buf0=GetStringFromParm(0x00);
- if (!GetFullPathName(buf0,NSIS_MAX_STRLEN,p,&fp))
- {
- exec_error++;
- *p=0;
- }
- else if (fp>buf0 && *fp)
- {
- WIN32_FIND_DATA *fd=file_exists(buf0);
- if (fd)
- {
- mystrcpy(fp,fd->cFileName);
- }
- else
- {
- exec_error++;
- *p=0;
- }
- }
- if (!parm2) GetShortPathName(p,p,NSIS_MAX_STRLEN);
- }
- break;
- case EW_SEARCHPATH:
- {
- char *fp;
- char *p=var0;
- char *buf0=GetStringFromParm(-0x01);
- if (!SearchPath(NULL,buf0,NULL,NSIS_MAX_STRLEN,p,&fp))
- {
- exec_error++;
- p[0]=0;
- }
- }
- break;
- case EW_GETTEMPFILENAME:
- {
- char *textout=var0;
- if (!my_GetTempFileName(textout, GetStringFromParm(-0x11)))
- exec_error++;
- }
- break;
-#endif
-#ifdef NSIS_SUPPORT_FILE
- case EW_EXTRACTFILE:
- {
- HANDLE hOut;
- int ret;
- char *buf3 = GetStringFromParm(0x31);
- int overwriteflag = parm0 & 7;
-
- log_printf4("File: overwriteflag=%d, allowskipfilesflag=%d, name=\"%s\"",overwriteflag,(parm0>>3)&MB_ABORTRETRYIGNORE,buf3);
- if (validpathspec(buf3))
- {
- mystrcpy(buf0,buf3);
- }
- else mystrcat(addtrailingslash(mystrcpy(buf0,state_output_directory)),buf3);
- validate_filename(buf0);
- _tryagain:
- if (overwriteflag >= 3) // check date and time
- {
- WIN32_FIND_DATA *ffd=file_exists(buf0);
- // if it doesn't exist, overwrite flag will be off (though it doesn't really matter)
- int cmp=0;
- if (ffd)
- {
- cmp=CompareFileTime(&ffd->ftLastWriteTime, (FILETIME*)(lent.offsets + 3));
- }
- overwriteflag=!(cmp & (0x80000000 | (overwriteflag - 3)));
- }
- // remove read only flag if overwrite mode is on
- if (!overwriteflag)
- {
- remove_ro_attr(buf0);
- }
- hOut=myOpenFile(buf0,GENERIC_WRITE,(overwriteflag==1)?CREATE_NEW:CREATE_ALWAYS);
- if (hOut == INVALID_HANDLE_VALUE)
- {
- if (overwriteflag)
- {
- update_status_text(LANG_SKIPPED,buf3);
- if (overwriteflag==2) exec_error++;
- log_printf3("File: skipped: \"%s\" (overwriteflag=%d)",buf0,overwriteflag);
- break;
- }
- log_printf2("File: error creating \"%s\"",buf0);
-
- mystrcpy(buf2,g_usrvars[0]); // save $0
- mystrcpy(g_usrvars[0],buf0); // copy file name to $0
- GetNSISString(buf1,parm5); // use $0
- mystrcpy(g_usrvars[0],buf2); // restore $0
-
- // Modified by ramon 23 May 2003
- switch (my_MessageBox(buf1, parm0>>3))
- {
- case IDRETRY:
- log_printf("File: error, user retry");
- goto _tryagain;
- case IDIGNORE:
- log_printf("File: error, user cancel");
- g_exec_flags.exec_error++;
- return 0;
- default:
- log_printf("File: error, user abort");
- update_status_text(LANG_CANTWRITE,buf0);
- return EXEC_ERROR;
- }
- }
-
- update_status_text(LANG_EXTRACT,buf3);
- {
- g_exec_flags.status_update++;
- ret=GetCompressedDataFromDataBlock(parm2,hOut);
- g_exec_flags.status_update--;
- }
-
- log_printf3("File: wrote %d to \"%s\"",ret,buf0);
-
- if (parm3 != 0xffffffff || parm4 != 0xffffffff)
- SetFileTime(hOut,(FILETIME*)(lent.offsets+3),NULL,(FILETIME*)(lent.offsets+3));
-
- CloseHandle(hOut);
-
- if (ret < 0)
- {
- if (ret == -2)
- {
- GetNSISString(buf0,LANG_ERRORWRITING);
- mystrcat(buf0,buf3);
- }
- else
- {
- GetNSISString(buf0,LANG_ERRORDECOMPRESSING);
- }
- log_printf2("%s",buf0);
- my_MessageBox(buf0,MB_OK|MB_ICONSTOP|(IDOK<<21));
- return EXEC_ERROR;
- }
- }
- break;
-#endif//NSIS_SUPPORT_FILE
-#ifdef NSIS_SUPPORT_DELETE
- case EW_DELETEFILE:
- {
- char *buf0=GetStringFromParm(0x00);
- log_printf2("Delete: \"%s\"",buf0);
- myDelete(buf0,parm1);
- }
- break;
-#endif//NSIS_SUPPORT_DELETE
-#ifdef NSIS_SUPPORT_MESSAGEBOX
- case EW_MESSAGEBOX: // MessageBox
- {
- int v;
- char *buf3=GetStringFromParm(0x31);
- log_printf3("MessageBox: %d,\"%s\"",parm0,buf3);
- v=my_MessageBox(buf3,parm0);
- if (v)
- {
- if (v==parm2)
- {
- return parm3;
- }
- if (v==parm4)
- {
- return parm5;
- }
- }
- else exec_error++;
- }
- break;
-#endif//NSIS_SUPPORT_MESSAGEBOX
-#ifdef NSIS_SUPPORT_RMDIR
- case EW_RMDIR:
- {
- char *buf1=GetStringFromParm(-0x10);
- log_printf2("RMDir: \"%s\"",buf1);
-
- myDelete(buf1,parm1);
- }
- break;
-#endif//NSIS_SUPPORT_RMDIR
-#ifdef NSIS_SUPPORT_STROPTS
- case EW_STRLEN:
- {
- char *buf0=GetStringFromParm(0x01);
- myitoa(var0,mystrlen(buf0));
- }
- break;
- case EW_ASSIGNVAR:
- {
- int newlen=GetIntFromParm(2);
- int start=GetIntFromParm(3);
- int l;
- char *p=var0;
- char *buf0=GetStringFromParm(0x01);
- *p=0;
- if (!parm2 || newlen)
- {
- l=mystrlen(buf0);
-
- if (start<0) start=l+start;
- if (start>=0)
- {
- if (start>l) start=l;
- mystrcpy(p,buf0+start);
- if (newlen)
- {
- if (newlen<0) newlen=mystrlen(p)+newlen;
- if (newlen<0) newlen=0;
- if (newlen < NSIS_MAX_STRLEN) p[newlen]=0;
- }
- }
- }
- }
- break;
- case EW_STRCMP:
- {
- char *buf2=GetStringFromParm(0x20);
- char *buf3=GetStringFromParm(0x31);
- if (!parm4) {
- // case insensitive
- if (!lstrcmpi(buf2,buf3)) return parm2;
- }
- else {
- // case sensitive
- if (!lstrcmp(buf2,buf3)) return parm2;
- }
- }
- return parm3;
-#endif//NSIS_SUPPORT_STROPTS
-#ifdef NSIS_SUPPORT_ENVIRONMENT
- case EW_READENVSTR:
- {
- char *p=var0;
- char *buf0=GetStringFromParm(0x01);
- if (!ExpandEnvironmentStrings(buf0,p,NSIS_MAX_STRLEN)
- || (parm2 && !lstrcmp(buf0, p)))
- {
- exec_error++;
- *p=0;
- }
- p[NSIS_MAX_STRLEN-1]=0;
- }
- break;
-#endif//NSIS_SUPPORT_ENVIRONMENT
-#ifdef NSIS_SUPPORT_INTOPTS
- case EW_INTCMP:
- {
- int v,v2;
- v=GetIntFromParm(0);
- v2=GetIntFromParm(1);
- if (!parm5) {
- // signed
- if (v<v2) return parm3;
- if (v>v2) return parm4;
- }
- else {
- // unsigned
- if ((unsigned int)v<(unsigned int)v2) return parm3;
- if ((unsigned int)v>(unsigned int)v2) return parm4;
- }
- }
- return parm2;
- case EW_INTOP:
- {
- int v,v2;
- char *p=var0;
- v=GetIntFromParm(1);
- v2=GetIntFromParm(2);
- switch (parm3)
- {
- case 0: v+=v2; break;
- case 1: v-=v2; break;
- case 2: v*=v2; break;
- case 3: if (v2) v/=v2; else { v=0; exec_error++; } break;
- case 4: v|=v2; break;
- case 5: v&=v2; break;
- case 6: v^=v2; break;
- case 7: v=!v; break;
- case 8: v=v||v2; break;
- case 9: v=v&&v2; break;
- case 10: if (v2) v%=v2; else { v=0; exec_error++; } break;
- case 11: v=v<<v2; break;
- case 12: v=v>>v2; break;
- }
- myitoa(p,v);
- }
- break;
- case EW_INTFMT: {
- char *buf0=GetStringFromParm(0x01);
- wsprintf(var0,
- buf0,
- GetIntFromParm(2));
- }
- break;
-#endif//NSIS_SUPPORT_INTOPTS
-#ifdef NSIS_SUPPORT_STACK
- case EW_PUSHPOP:
- {
- stack_t *s=g_st;
- int cnt=parm2;
- if (cnt) //Exch contributed by Fritz Elfert
- {
- while (cnt--&&s) s=s->next;
- if (!s)
- {
- log_printf2("Exch: stack < %d elements",parm2);
- my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<21));
- return EXEC_ERROR;
- }
- mystrcpy(buf0,s->text);
- mystrcpy(s->text,g_st->text);
- mystrcpy(g_st->text,buf0);
- }
- else if (parm1)
- {
- if (!s)
- {
- log_printf("Pop: stack empty");
- exec_error++;
- break;
- }
- mystrcpy(var0,s->text);
- g_st=s->next;
- GlobalFree((HGLOBAL)s);
- }
- else
- {
- s=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t));
- GetNSISString(s->text,parm0);
- s->next=g_st;
- g_st=s;
- }
- }
- break;
-#endif//NSIS_SUPPORT_STACK
-#ifdef NSIS_SUPPORT_HWNDS
- case EW_FINDWINDOW:
- case EW_SENDMESSAGE:
- {
- int v;
- int b3=GetIntFromParm(3);
- int b4=GetIntFromParm(4);
- if (parm5&1) b3=(int)GetStringFromParm(0x33);
- if (parm5&2) b4=(int)GetStringFromParm(0x44);
-
- if (which == EW_SENDMESSAGE)
- {
- HWND hwnd=(HWND)GetIntFromParm(1);
- int msg=GetIntFromParm(2);
-
- if (parm5>>2) exec_error += !SendMessageTimeout(hwnd,msg,b3,b4,SMTO_NORMAL,parm5>>2,(LPDWORD)&v);
- else v=SendMessage(hwnd,msg,b3,b4);
- }
- else
- {
- char *buf0=GetStringFromParm(0x01);
- char *buf1=GetStringFromParm(0x12);
- v=(int)FindWindowEx((HWND)b3,(HWND)b4,buf0[0]?buf0:NULL,buf1[0]?buf1:NULL);
- }
-
- if (parm0>=0)
- myitoa(var0,v);
- }
- break;
- case EW_ISWINDOW:
- if (IsWindow((HWND)GetIntFromParm(0))) return parm1;
- return parm2;
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- case EW_GETDLGITEM:
- myitoa(
- var0,
- (int)GetDlgItem(
- (HWND)GetIntFromParm(1),
- GetIntFromParm(2)
- )
- );
- break;
- case EW_SETCTLCOLORS:
- {
- ctlcolors *c = (ctlcolors *)(g_blocks[NB_CTLCOLORS].offset + parm1);
- SetWindowLong((HWND) GetIntFromParm(0), GWL_USERDATA, (long) c);
- }
- break;
- case EW_SETBRANDINGIMAGE:
- {
- RECT r;
- HANDLE hImage;
- HWND hwImage=GetDlgItem(g_hwnd, parm1);
- GetClientRect(hwImage, &r);
- hImage=LoadImage(
- 0,
- GetStringFromParm(0x00),
- IMAGE_BITMAP,
- parm2*r.right,
- parm2*r.bottom,
- LR_LOADFROMFILE
- );
- hImage = (HANDLE)SendMessage(
- hwImage,
- STM_SETIMAGE,
- IMAGE_BITMAP,
- (LPARAM)hImage
- );
- // delete old image
- if (hImage) DeleteObject(hImage);
- }
- break;
- case EW_CREATEFONT:
- {
- static LOGFONT f;
- f.lfHeight=-MulDiv(GetIntFromParm(2),GetDeviceCaps(GetDC(g_hwnd),LOGPIXELSY),72);
- f.lfWeight=GetIntFromParm(3);
- f.lfItalic=parm4&1;
- f.lfUnderline=parm4&2;
- f.lfStrikeOut=parm4&4;
- f.lfCharSet=DEFAULT_CHARSET;
- GetNSISString(f.lfFaceName,parm1);
- myitoa(var0,(int)CreateFontIndirect(&f));
- }
- break;
- case EW_SHOWWINDOW:
- {
- HWND hw=(HWND)GetIntFromParm(0);
- int a=GetIntFromParm(1);
- if (parm2) log_printf("HideWindow");
- if (!parm3)
- ShowWindow(hw,a);
- else
- EnableWindow(hw,a);
- }
- break;
-#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
-#endif//NSIS_SUPPORT_HWNDS
-#ifdef NSIS_SUPPORT_SHELLEXECUTE
- case EW_SHELLEXEC: // this uses improvements of Andras Varga
- {
- int x;
- char *buf0=GetStringFromParm(0x00);
- char *buf3=GetStringFromParm(0x31);
- char *buf2=GetStringFromParm(0x22);
- char *buf1=GetStringFromParm(0x15);
- update_status_text_buf1(LANG_EXECSHELL);
- x=(int)ShellExecute(g_hwnd,buf0[0]?buf0:NULL,buf3,buf2[0]?buf2:NULL,state_output_directory,parm3);
- if (x < 33)
- {
- log_printf5("ExecShell: warning: error (\"%s\": file:\"%s\" params:\"%s\")=%d",buf0,buf3,buf2,x);
- exec_error++;
- }
- else
- {
- log_printf4("ExecShell: success (\"%s\": file:\"%s\" params:\"%s\")",buf0,buf3,buf2);
- }
- }
- break;
-#endif//NSIS_SUPPORT_SHELLEXECUTE
-#ifdef NSIS_SUPPORT_EXECUTE
- case EW_EXECUTE:
- {
- HANDLE hProc;
- char *buf0=GetStringFromParm(0x00);
- log_printf2("Exec: command=\"%s\"",buf0);
- update_status_text(LANG_EXECUTE,buf0);
-
- hProc=myCreateProcess(buf0);
-
- if (hProc)
- {
- log_printf2("Exec: success (\"%s\")",buf0);
- if (parm2)
- {
- DWORD lExitCode;
- while (WaitForSingleObject(hProc,100) == WAIT_TIMEOUT)
- {
- MessageLoop(WM_PAINT);
- }
- GetExitCodeProcess(hProc, &lExitCode);
-
- if (parm1>=0) myitoa(var1,lExitCode);
- else if (lExitCode) exec_error++;
- }
- CloseHandle( hProc );
- }
- else
- {
- exec_error++;
- log_printf2("Exec: failed createprocess (\"%s\")",buf0);
- }
- }
- break;
-#endif//NSIS_SUPPORT_EXECUTE
-#ifdef NSIS_SUPPORT_GETFILETIME
- case EW_GETFILETIME:
- // this new implementation based on one by Dave Bau
- // used FindFirstFile instead of GetFileTime to better handle files that are locked.
- // also allows GetFileTime to be passed a wildcard.
- {
- WIN32_FIND_DATA *ffd;
- char *highout=var0;
- char *lowout=var1;
- char *buf0=GetStringFromParm(0x02);
-
- ffd=file_exists(buf0);
- if (ffd)
- {
- myitoa(lowout,ffd->ftLastWriteTime.dwLowDateTime);
- myitoa(highout,ffd->ftLastWriteTime.dwHighDateTime);
- }
- else
- {
- *lowout=*highout=0;
- exec_error++;
- }
- }
- break;
-#endif//NSIS_SUPPORT_GETFILETIME
-#ifdef NSIS_SUPPORT_GETDLLVERSION
- case EW_GETDLLVERSION:
- {
- char *highout=var0;
- char *lowout=var1;
- DWORD s1;
- VS_FIXEDFILEINFO *pvsf1;
- DWORD d;
- char *buf1=GetStringFromParm(-0x12);
- s1=GetFileVersionInfoSize(buf1,&d);
- *lowout=*highout=0;
- exec_error++;
- if (s1)
- {
- void *b1;
- b1=GlobalAlloc(GPTR,s1);
- if (b1)
- {
- UINT uLen;
- if (GetFileVersionInfo(buf1,0,s1,b1) && VerQueryValue(b1,"\\",(void*)&pvsf1,&uLen))
- {
- myitoa(highout,pvsf1->dwFileVersionMS);
- myitoa(lowout,pvsf1->dwFileVersionLS);
-
- exec_error--;
- }
- GlobalFree(b1);
- }
- }
- }
- break;
-#endif//NSIS_SUPPORT_GETDLLVERSION
-#ifdef NSIS_SUPPORT_ACTIVEXREG
- case EW_REGISTERDLL:
- {
- exec_error++;
- if (SUCCEEDED(g_hres))
- {
- HANDLE h=NULL;
- char *buf1=GetStringFromParm(-0x10);
- char *buf0=GetStringFromParm(0x01);
-
- if (parm4)
- h=GetModuleHandle(buf1);
- if (!h)
- h=LoadLibraryEx(buf1, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
- if (h)
- {
- FARPROC funke = GetProcAddress(h,buf0);
- if (funke)
- {
- exec_error--;
- if (parm2)
- {
- update_status_text_buf1(parm2);
- if (funke()) exec_error++;
- }
- else
- {
- void (*func)(HWND,int,char*,void*,void*);
- func=(void*)funke;
- func(
- g_hwnd,
- NSIS_MAX_STRLEN,
- (char*)g_usrvars,
-#ifdef NSIS_SUPPORT_STACK
- (void*)&g_st,
-#else
- NULL,
-#endif//NSIS_SUPPORT_STACK
- &plugin_extra_parameters
- );
- }
- }
- else
- {
- update_status_text(LANG_CANNOTFINDSYMBOL,buf0);
- log_printf3("Error registering DLL: %s not found in %s",buf0,buf1);
- }
- if (!parm3) FreeLibrary(h);
- }
- else
- {
- update_status_text_buf1(LANG_COULDNOTLOAD);
- log_printf2("Error registering DLL: Could not load %s",buf1);
- }
- }
- else
- {
- update_status_text_buf1(LANG_NOOLE);
- log_printf("Error registering DLL: Could not initialize OLE");
- }
- }
- break;
-#endif
-#ifdef NSIS_SUPPORT_CREATESHORTCUT
- case EW_CREATESHORTCUT:
- {
- char *buf1=GetStringFromParm(-0x10);
- char *buf2=GetStringFromParm(-0x21);
- char *buf0=GetStringFromParm(0x02);
- char *buf3=GetStringFromParm(-0x33);
- char *buf4=GetStringFromParm(0x45);
-
- HRESULT hres;
- IShellLink* psl;
-
- if (!validpathspec(buf2))
- GetStringFromParm(0x21);
-
- log_printf8("CreateShortCut: out: \"%s\", in: \"%s %s\", icon: %s,%d, sw=%d, hk=%d",
- buf1,buf2,buf0,buf3,parm4&0xff,(parm4&0xff00)>>8,parm4>>16);
-
- hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
- &IID_IShellLink, (void **) &psl);
- if (SUCCEEDED(hres))
- {
- IPersistFile* ppf;
-
- hres = psl->lpVtbl->QueryInterface(psl,&IID_IPersistFile, (void **) &ppf);
- if (SUCCEEDED(hres))
- {
- hres = psl->lpVtbl->SetPath(psl,buf2);
- psl->lpVtbl->SetWorkingDirectory(psl,state_output_directory);
- if ((parm4&0xff00)>>8) psl->lpVtbl->SetShowCmd(psl,(parm4&0xff00)>>8);
- psl->lpVtbl->SetHotkey(psl,(unsigned short)(parm4>>16));
- if (buf3[0]) psl->lpVtbl->SetIconLocation(psl,buf3,parm4&0xff);
- psl->lpVtbl->SetArguments(psl,buf0);
- psl->lpVtbl->SetDescription(psl,buf4);
-
- if (SUCCEEDED(hres))
- {
- static WCHAR wsz[1024];
- hres=E_FAIL;
- if (MultiByteToWideChar(CP_ACP, 0, buf1, -1, wsz, 1024))
- hres=ppf->lpVtbl->Save(ppf,(const WCHAR*)wsz,TRUE);
- }
- ppf->lpVtbl->Release(ppf);
- }
- psl->lpVtbl->Release(psl);
- }
-
- if (FAILED(hres))
- {
- exec_error++;
- update_status_text_buf1(LANG_ERRORCREATINGSHORTCUT);
- }
- else
- {
- update_status_text_buf1(LANG_CREATESHORTCUT);
- }
- }
- break;
-#endif//NSIS_SUPPORT_CREATESHORTCUT
-#ifdef NSIS_SUPPORT_COPYFILES
- case EW_COPYFILES: // CopyFile (added by NOP)
- {
- int res;
- SHFILEOPSTRUCT op;
- char *buf0=GetStringFromParm(0x00);
- char *buf1=GetStringFromParm(0x11);
- char *buf2=GetStringFromParm(0x23); // LANG_COPYTO + buf1
- log_printf3("CopyFiles \"%s\"->\"%s\"",buf0,buf1);
-
- if (!file_exists(buf0))
- {
- // workaround for bug #774966
- //
- // on nt4, SHFileOperation silently fails if the source
- // file doesn't exist. do a manual check instead.
-
- update_status_text(LANG_COPYFAILED,0);
- exec_error++;
- break;
- }
-
- op.hwnd=g_hwnd;
- op.wFunc=FO_COPY;
- buf0[mystrlen(buf0)+1]=0;
- buf1[mystrlen(buf1)+1]=0;
-
- op.pFrom=buf0;
- op.pTo=buf1;
- op.lpszProgressTitle=buf2;
- op.fFlags=parm2;
- update_status_text(0,buf2);
- res=SHFileOperation(&op);
- if (res)
- { // some of these changes were from Edgewise (wiked_edge@yahoo.com)
- update_status_text(LANG_COPYFAILED,0);
- exec_error++;
- }
- }
- break;
-#endif//NSIS_SUPPORT_COPYFILES
-#ifdef NSIS_SUPPORT_REBOOT
- case EW_REBOOT:
- if (parm0!=0xbadf00d)
- {
- my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<21));
- return EXEC_ERROR;
- }
-
- g_exec_flags.reboot_called++;
- // a following EW_QUIT will make sure the installer quits right away
-
- break;
-#endif//NSIS_SUPPORT_REBOOT
-#ifdef NSIS_SUPPORT_INIFILES
- case EW_WRITEINI:
- {
- char *sec=0, *key=0, *str=0;
-#ifdef NSIS_CONFIG_LOG
- mystrcpy(buf1,"<RM>");
- mystrcpy(buf2,buf1);
-#endif
- if (parm0)
- {
- sec=GetStringFromParm(0x00);
- }
- if (parm1)
- {
- key=GetStringFromParm(0x11);
- }
- if (parm4)
- {
- str=GetStringFromParm(0x22);
- }
- buf3=GetStringFromParm(-0x33);
- log_printf5("WriteINIStr: wrote [%s] %s=%s in %s",buf0,buf1,buf2,buf3);
- if (!WritePrivateProfileString(sec,key,str,buf3)) exec_error++;
- }
- break;
- case EW_READINISTR:
- {
- DWORD errstr = CHAR4_TO_DWORD('!', 'N', '~', 0);
- char *p=var0;
- char *buf0=GetStringFromParm(0x01);
- char *buf1=GetStringFromParm(0x12);
- char *buf2=GetStringFromParm(-0x23);
- GetPrivateProfileString(buf0,buf1,(LPCSTR)&errstr,p,NSIS_MAX_STRLEN-1,buf2);
- if (*(DWORD*)p == errstr)
- {
- exec_error++;
- p[0]=0;
- }
- }
- break;
-#endif//NSIS_SUPPORT_INIFILES
-#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
- case EW_DELREG:
- {
- long res=!ERROR_SUCCESS;
- const char *rkn UNUSED=RegKeyHandleToName((HKEY)parm1);
- if (!parm4)
- {
- HKEY hKey=myRegOpenKey(KEY_SET_VALUE);
- if (hKey)
- {
- char *buf3=GetStringFromParm(0x33);
- res = RegDeleteValue(hKey,buf3);
- log_printf4("DeleteRegValue: \"%s\\%s\" \"%s\"",rkn,buf2,buf3);
- RegCloseKey(hKey);
- }
- }
- else
- {
- char *buf2=GetStringFromParm(0x22);
- log_printf3("DeleteRegKey: \"%s\\%s\"",rkn,buf2);
- res = myRegDeleteKeyEx(GetRegRootKey(parm1),buf2,parm4&2);
- }
- if (res != ERROR_SUCCESS)
- exec_error++;
- }
- break;
- case EW_WRITEREG: // write registry value
- {
- HKEY hKey;
- HKEY rootkey=GetRegRootKey(parm0);
- int type=parm4;
- int rtype=parm5;
- char *buf0=GetStringFromParm(0x02);
- char *buf1=GetStringFromParm(0x11);
- const char *rkn UNUSED=RegKeyHandleToName(rootkey);
-
- exec_error++;
- if (RegCreateKeyEx(rootkey,buf1,0,0,0,AlterRegistrySAM(KEY_SET_VALUE),0,&hKey,0) == ERROR_SUCCESS)
- {
- LPBYTE data = (LPBYTE) buf2;
- DWORD size = 0;
- if (type == REG_SZ)
- {
- GetStringFromParm(0x23);
- size = mystrlen((char *) data) + 1;
- if (rtype == REG_SZ)
- {
- log_printf5("WriteRegStr: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,data);
- }
- else
- {
- log_printf5("WriteRegExpandStr: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,data);
- }
- }
- if (type == REG_DWORD)
- {
- *(LPDWORD) data = GetIntFromParm(3);
- size = sizeof(DWORD);
- log_printf5("WriteRegDWORD: \"%s\\%s\" \"%s\"=\"0x%08x\"",rkn,buf1,buf0,*(LPDWORD) data);
- }
- if (type == REG_BINARY)
- {
-#ifdef NSIS_CONFIG_LOG
- char binbuf[128];
-#endif
- // use buf2, buf3 and buf4
- size = GetCompressedDataFromDataBlockToMemory(parm3, data, 3 * NSIS_MAX_STRLEN);
- LogData2Hex(binbuf, sizeof(binbuf), data, size);
- log_printf5("WriteRegBin: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,binbuf);
- }
-
- if (size >= 0 && RegSetValueEx(hKey,buf0,0,rtype,data,size) == ERROR_SUCCESS)
- {
- exec_error--;
- }
- else
- {
- log_printf4("WriteReg: error writing into \"%s\\%s\" \"%s\"",rkn,buf1,buf0);
- }
-
- RegCloseKey(hKey);
- }
- else { log_printf3("WriteReg: error creating key \"%s\\%s\"",rkn,buf1); }
- }
- break;
- case EW_READREGSTR: // read registry string
- {
- HKEY hKey=myRegOpenKey(KEY_READ);
- char *p=var0;
- char *buf3=GetStringFromParm(0x33); // buf3 == key name
- p[0]=0;
- if (hKey)
- {
- DWORD l = NSIS_MAX_STRLEN - 1;
- DWORD t;
-
- if (RegQueryValueEx(hKey,buf3,NULL,&t,p,&l) != ERROR_SUCCESS ||
- (t != REG_DWORD && t != REG_SZ && t != REG_EXPAND_SZ))
- {
- p[0]=0;
- exec_error++;
- }
- else
- {
- if (t==REG_DWORD)
- {
- exec_error += !parm4;
- myitoa(p,*((DWORD*)p));
- }
- else
- {
- exec_error += parm4;
- p[l]=0;
- }
- }
- RegCloseKey(hKey);
- }
- else exec_error++;
- }
- break;
- case EW_REGENUM:
- {
- HKEY key=myRegOpenKey(KEY_READ);
- char *p=var0;
- int b=GetIntFromParm(3);
- p[0]=0;
- if (key)
- {
- DWORD d=NSIS_MAX_STRLEN-1;
- if (parm4) RegEnumKey(key,b,p,d);
- else if (RegEnumValue(key,b,p,&d,NULL,NULL,NULL,NULL)!=ERROR_SUCCESS)
- {
- exec_error++;
- break;
- }
- p[NSIS_MAX_STRLEN-1]=0;
- RegCloseKey(key);
- }
- else exec_error++;
- }
-
- break;
-#endif//NSIS_SUPPORT_REGISTRYFUNCTIONS
-#ifdef NSIS_SUPPORT_FILEFUNCTIONS
- case EW_FCLOSE:
- {
- char *t=var0;
- if (*t) CloseHandle((HANDLE)myatoi(t));
- }
- break;
- case EW_FOPEN:
- {
- HANDLE h;
- char *handleout=var0;
- char *buf1=GetStringFromParm(-0x13);
- h=myOpenFile(buf1,parm1,parm2);
- if (h == INVALID_HANDLE_VALUE)
- {
- *handleout=0;
- exec_error++;
- }
- else
- {
- myitoa(handleout,(int)h);
- }
- }
- break;
- case EW_FPUTS:
- {
- DWORD dw;
- int l;
- char *t=var0;
- if (parm2)
- {
- ((unsigned char *)buf1)[0]=GetIntFromParm(1)&0xff;
- l=1;
- }
- else
- {
- l=mystrlen(GetStringFromParm(0x11));
- }
- if (!*t || !WriteFile((HANDLE)myatoi(t),buf1,l,&dw,NULL))
- {
- exec_error++;
- }
- }
- break;
- case EW_FGETS:
- {
- char *textout=var1;
- DWORD dw;
- int rpos=0;
- char *hptr=var0;
- int maxlen=GetIntFromParm(2);
- if (maxlen<1) break;
- if (maxlen > NSIS_MAX_STRLEN-1) maxlen=NSIS_MAX_STRLEN-1;
- if (*hptr)
- {
- char lc=0;
- HANDLE h=(HANDLE)myatoi(hptr);
- while (rpos<maxlen)
- {
- char c;
- if (!ReadFile(h,&c,1,&dw,NULL) || dw != 1) break;
- if (parm3)
- {
- myitoa(textout,(unsigned int)(unsigned char)c);
- return 0;
- }
- if (lc == '\r' || lc == '\n')
- {
- if (lc == c || (c != '\r' && c != '\n')) SetFilePointer(h,-1,NULL,FILE_CURRENT);
- else textout[rpos++]=c;
- break;
- }
- textout[rpos++]=c;
- lc=c;
- if (!c) break;
- }
- }
- textout[rpos]=0;
- if (!rpos) exec_error++;
- }
- break;
- case EW_FSEEK:
- {
- char *t=var0;
- if (*t)
- {
- DWORD v=SetFilePointer((HANDLE)myatoi(t),GetIntFromParm(2),NULL,parm3);
-
- if (parm1>=0)
- {
- myitoa(var1,v);
- }
- }
- }
- break;
-#endif//NSIS_SUPPORT_FILEFUNCTIONS
-#ifdef NSIS_SUPPORT_FINDFIRST
- case EW_FINDCLOSE:
- {
- char *t=var0;
- if (*t) FindClose((HANDLE)myatoi(t));
- }
- break;
- case EW_FINDNEXT:
- {
- char *textout=var0;
- char *t=var1;
- WIN32_FIND_DATA fd;
- if (*t && FindNextFile((HANDLE)myatoi(t),&fd))
- {
- mystrcpy(textout,fd.cFileName);
- }
- else
- {
- exec_error++;
- *textout=0;
- }
-
- }
- break;
- case EW_FINDFIRST:
- {
- char *textout=var0;
- char *handleout=var1;
- HANDLE h;
- WIN32_FIND_DATA fd;
- char *buf0=GetStringFromParm(0x02);
- h=FindFirstFile(buf0,&fd);
- if (h == INVALID_HANDLE_VALUE)
- {
- *handleout=0;
- *textout=0;
- exec_error++;
- }
- else
- {
- myitoa(handleout,(int)h);
- mystrcpy(textout,fd.cFileName);
- }
- }
- break;
-#endif//NSIS_SUPPORT_FINDFIRST
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- case EW_WRITEUNINSTALLER:
- {
- int ret=-666;
- HANDLE hFile;
- char *buf1=GetStringFromParm(-0x10);
-
- if (!validpathspec(buf1))
- GetStringFromParm(-0x13);
-
- remove_ro_attr(buf1);
- hFile=myOpenFile(buf1,GENERIC_WRITE,CREATE_ALWAYS);
- if (hFile != INVALID_HANDLE_VALUE)
- {
- unsigned char *filebuf;
- int filehdrsize = g_filehdrsize;
- filebuf=(unsigned char *)GlobalAlloc(GPTR,filehdrsize);
- if (filebuf)
- {
- DWORD lout;
- SetSelfFilePointer(0);
- ReadSelfFile((char*)filebuf,filehdrsize);
- {
- unsigned char* seeker;
- unsigned char* unicon_data = seeker = (unsigned char*)GlobalAlloc(GPTR,parm2);
- if (unicon_data) {
- GetCompressedDataFromDataBlockToMemory(parm1,unicon_data,parm2);
- while (*seeker) {
- struct icondata {
- DWORD dwSize;
- DWORD dwOffset;
- } id = *(struct icondata *) seeker;
- seeker += sizeof(struct icondata);
- mini_memcpy(filebuf+id.dwOffset, seeker, id.dwSize);
- seeker += id.dwSize;
- }
- GlobalFree(unicon_data);
- }
- }
- WriteFile(hFile,(char*)filebuf,filehdrsize,&lout,NULL);
- GlobalFree(filebuf);
- ret=GetCompressedDataFromDataBlock(-1,hFile);
- }
- CloseHandle(hFile);
- }
- log_printf3("created uninstaller: %d, \"%s\"",ret,buf1);
- {
- int str = LANG_CREATEDUNINST;
- if (ret < 0)
- {
- str = LANG_ERRORCREATING;
- DeleteFile(buf1);
- exec_error++;
- }
- update_status_text_buf1(str);
- }
- }
- break;
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-#ifdef NSIS_CONFIG_LOG
- case EW_LOG:
- if (parm0)
- {
- log_printf2("settings logging to %d",parm1);
- log_dolog=parm1;
- log_printf2("logging set to %d",parm1);
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
- if (parm1) build_g_logfile();
-#endif
- }
- else
- {
- char *buf0=GetStringFromParm(0x01);
- log_printf2("%s",buf0);
- }
- break;
-#endif//NSIS_CONFIG_LOG
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- case EW_SECTIONSET:
- {
- int x=GetIntFromParm(0);
- if ((unsigned int)x < (unsigned int)num_sections)
- {
- section *sec=g_sections+x;
- if (parm2>=0) // get something
- {
- int res=((int*)sec)[parm2];
- if (!parm2)
- {
- // getting text
- mystrcpy(var1,sec->name);
- }
- else
- {
- // getting number
- myitoa(var1,res);
- }
- }
- else // set something
- {
- parm2=-parm2-1;
- if (parm2)
- {
- // not setting text, get int
- parm1=GetIntFromParm(1);
- }
- else
- {
- // setting text
- GetNSISString(sec->name,parm4);
- sec->flags|=SF_NAMECHG;
- // parm1 is zero so name_ptr will be set to zero
- // if name_ptr is zero, it won't be used after .onInit
- }
-
- ((int*)sec)[parm2]=parm1;
-
- if (parm3) // update flags
- {
- SectionFlagsChanged(x);
- }
- }
- }
- else exec_error++;
- }
- break;
- case EW_INSTTYPESET:
- {
- int x = GetIntFromParm(0);
-
- if ((unsigned int)x < (unsigned int)NSIS_MAX_INST_TYPES)
- {
- if (parm3) // current install type
- {
- if (parm2) // set install type
- {
- SetInstType(x);
- RefreshSectionGroups();
- }
- else // get install type
- {
- myitoa(var1, GetInstType(0));
- }
- }
- else // install type text
- {
- if (parm2) // set text
- {
- g_header->install_types[x] = parm1;
- }
- else // get text
- {
- GetNSISString(var1,g_header->install_types[x]);
- }
- }
- }
- else exec_error++;
- }
- break;
-#endif//NSIS_CONFIG_COMPONENTPAGE
-
-#ifdef NSIS_LOCKWINDOW_SUPPORT
- case EW_LOCKWINDOW:
- {
- // ui_dlg_visible is 1 or 0, so is parm0
- SendMessage(g_hwnd, WM_SETREDRAW, parm0 & ui_dlg_visible, 0);
- if ( parm0 )
- InvalidateRect(g_hwnd, NULL, FALSE);
- break;
- }
-#endif //NSIS_LOCKWINDOW_SUPPORT
- }
-
- g_exec_flags.exec_error += exec_error;
-
- return 0;
-}
+/*
+ * exec.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+#include <shlobj.h>
+#include <shellapi.h>
+#include "fileform.h"
+#include "util.h"
+#include "state.h"
+#include "ui.h"
+#include "components.h"
+#include "exec.h"
+#include "lang.h"
+#include "resource.h"
+
+#define EXEC_ERROR 0x7FFFFFFF
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+HWND g_SectionHack;
+#endif
+
+#ifdef NSIS_SUPPORT_STACK
+typedef struct _stack_t {
+ struct _stack_t *next;
+ char text[NSIS_MAX_STRLEN];
+} stack_t;
+
+static stack_t *g_st;
+#endif
+
+exec_flags g_exec_flags;
+exec_flags g_exec_flags_last_used;
+
+struct {
+ exec_flags *flags;
+ void *ExecuteCodeSegment;
+ void *validate_filename;
+} plugin_extra_parameters = {
+ &g_exec_flags,
+ &ExecuteCodeSegment,
+ &validate_filename
+};
+
+#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
+HRESULT g_hres;
+#endif
+
+static int NSISCALL ExecuteEntry(entry *entry_);
+
+int NSISCALL resolveaddr(int v)
+{
+ if (v < 0)
+ {
+ return myatoi(g_usrvars[-(v+1)]);
+ }
+ return v;
+}
+
+int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress)
+{
+ while (pos >= 0)
+ {
+ int rv;
+ if (g_entries[pos].which == EW_RET) return 0;
+ rv=ExecuteEntry(g_entries + pos);
+ if (rv == EXEC_ERROR) return EXEC_ERROR;
+
+ rv=resolveaddr(rv);
+
+ if (!rv) { rv++; pos++; }
+ else
+ {
+ int t=pos;
+ rv--; // rv is decremented here by 1, since it was +1 on the other end.
+ pos=rv; // set new position
+ rv-=t; // set rv to delta for progress adjustment
+ }
+
+ if (hwndProgress)
+ {
+ extern int progress_bar_pos, progress_bar_len;
+ progress_bar_pos+=rv;
+ SendMessage(hwndProgress,PBM_SETPOS,MulDiv(progress_bar_pos,30000,progress_bar_len),0);
+ }
+ }
+ return 0;
+}
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+
+int NSISCALL ExecuteCallbackFunction(int num)
+{
+ return ExecuteCodeSegment(*(&g_header->code_onInit + num), NULL);
+}
+
+#endif
+
+static char bufs[5][NSIS_MAX_STRLEN];
+static int *parms;
+
+void NSISCALL update_status_text_buf1(int strtab)
+{
+ update_status_text(strtab, bufs[1]);
+}
+
+static int NSISCALL GetIntFromParm(int id_)
+{
+ return myatoi(GetNSISStringTT(parms[id_]));
+}
+
+// NB - USE CAUTION when rearranging code to make use of the new return value of
+// this function - be sure the parm being accessed is not modified before the call.
+// Use a negative number to get the string validated as a file name
+static char * NSISCALL GetStringFromParm(int id_)
+{
+ int id = id_ < 0 ? -id_ : id_;
+ char *result = GetNSISString(bufs[id >> 4], parms[id & 0xF]);
+ if (id_ < 0) validate_filename(result);
+ return result;
+}
+
+#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
+
+#define AlterRegistrySAM(sam) (sam | g_exec_flags.alter_reg_view)
+
+// based loosely on code from Tim Kosse
+// in win9x this isn't necessary (RegDeleteKey() can delete a tree of keys),
+// but in win2k you need to do this manually.
+static LONG NSISCALL myRegDeleteKeyEx(HKEY thiskey, LPCTSTR lpSubKey, int onlyifempty)
+{
+ HKEY key;
+ int retval=RegOpenKeyEx(thiskey,lpSubKey,0,AlterRegistrySAM(KEY_ENUMERATE_SUB_KEYS),&key);
+ if (retval==ERROR_SUCCESS)
+ {
+ // NB - don't change this to static (recursive function)
+ char buffer[MAX_PATH+1];
+ while (RegEnumKey(key,0,buffer,MAX_PATH+1)==ERROR_SUCCESS)
+ {
+ if (onlyifempty)
+ {
+ RegCloseKey(key);
+ return !ERROR_SUCCESS;
+ }
+ if ((retval=myRegDeleteKeyEx(key,buffer,0)) != ERROR_SUCCESS) break;
+ }
+ RegCloseKey(key);
+ {
+ typedef LONG (WINAPI * RegDeleteKeyExAPtr)(HKEY, LPCTSTR, REGSAM, DWORD);
+ RegDeleteKeyExAPtr RDKE = (RegDeleteKeyExAPtr)
+ myGetProcAddress(MGA_RegDeleteKeyExA);
+
+ if (RDKE)
+ retval=RDKE(thiskey,lpSubKey,AlterRegistrySAM(0),0);
+ else
+ retval=g_exec_flags.alter_reg_view||RegDeleteKey(thiskey,lpSubKey);
+ }
+ }
+ return retval;
+}
+
+static HKEY NSISCALL GetRegRootKey(int hRootKey)
+{
+ if (hRootKey)
+ return (HKEY) hRootKey;
+
+ // HKEY_LOCAL_MACHINE - HKEY_CURRENT_USER == 1
+ return (HKEY) ((int) HKEY_CURRENT_USER + g_exec_flags.all_user_var);
+}
+
+static HKEY NSISCALL myRegOpenKey(REGSAM samDesired)
+{
+ HKEY hKey;
+ if (RegOpenKeyEx(GetRegRootKey(parms[1]), GetStringFromParm(0x22), 0, AlterRegistrySAM(samDesired), &hKey) == ERROR_SUCCESS)
+ {
+ return hKey;
+ }
+ return NULL;
+}
+#endif//NSIS_SUPPORT_REGISTRYFUNCTIONS
+
+// returns EXEC_ERROR on error
+// returns 0, advance position by 1
+// otherwise, returns new_position+1
+static int NSISCALL ExecuteEntry(entry *entry_)
+{
+ char *buf0 = bufs[0];
+ char *buf1 = bufs[1];
+ char *buf2 = bufs[2];
+ char *buf3 = bufs[3];
+ //char *buf4 = bufs[4];
+
+ char *var0;
+ char *var1;
+ //char *var2;
+ //char *var3;
+ //char *var4;
+ //char *var5;
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ // Saves 8 bytes
+ HWND mainHwnd = g_hwnd;
+#define g_hwnd mainHwnd
+#endif
+
+ int exec_error = 0;
+
+ entry lent = *entry_;
+
+#define which (lent.which)
+#define parm0 (lent.offsets[0])
+#define parm1 (lent.offsets[1])
+#define parm2 (lent.offsets[2])
+#define parm3 (lent.offsets[3])
+#define parm4 (lent.offsets[4])
+#define parm5 (lent.offsets[5])
+
+ var0 = g_usrvars[parm0];
+ var1 = g_usrvars[parm1];
+ // not used yet
+ //var2 = g_usrvars[parm2];
+ //var3 = g_usrvars[parm3];
+ //var4 = g_usrvars[parm4];
+ //var5 = g_usrvars[parm5];
+
+ parms = lent.offsets;
+
+ switch (which)
+ {
+ case EW_NOP:
+ log_printf2("Jump: %d",parm0);
+ return parm0;
+ case EW_ABORT:
+ {
+ log_printf2("Aborting: \"%s\"",GetStringFromParm(0x00));
+ update_status_text(parm0,0);
+ }
+ return EXEC_ERROR;
+ case EW_QUIT:
+ g_quit_flag++;
+ if (g_hwnd) PostQuitMessage(0); // make sure we bail out fast.
+ return EXEC_ERROR;
+ case EW_CALL:
+ {
+ int v=resolveaddr(parm0)-1; // address is -1, since we encode it as +1
+ log_printf2("Call: %d",v);
+ return ExecuteCodeSegment(v,NULL);
+ }
+ case EW_UPDATETEXT:
+ log_printf2("detailprint: %s",GetStringFromParm(0x00));
+ update_status_text(parm0,0);
+ break;
+ case EW_SLEEP:
+ {
+ int x=GetIntFromParm(0);
+ log_printf2("Sleep(%d)",x);
+ Sleep(max(x,1));
+ }
+ break;
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ case EW_BRINGTOFRONT:
+ log_printf("BringToFront");
+ SetForegroundWindow(g_hwnd);
+ break;
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ case EW_SETFLAG:
+ if (!parm2)
+ {
+ FIELDN(g_exec_flags_last_used,parm0)=FIELDN(g_exec_flags,parm0);
+ FIELDN(g_exec_flags,parm0)=GetIntFromParm(1);
+ }
+ else
+ {
+ FIELDN(g_exec_flags,parm0)=FIELDN(g_exec_flags_last_used,parm0);
+ }
+ break;
+ case EW_IFFLAG:
+ {
+ int f=lent.offsets[!FIELDN(g_exec_flags,parm2)];
+ FIELDN(g_exec_flags,parm2)&=parm3;
+ return f;
+ }
+ case EW_GETFLAG:
+ myitoa(var0,FIELDN(g_exec_flags,parm1));
+ break;
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ case EW_CHDETAILSVIEW:
+ if (insthwndbutton) ShowWindow(insthwndbutton,parm1);
+ if (insthwnd) ShowWindow(insthwnd,parm0);
+ break;
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ case EW_SETFILEATTRIBUTES:
+ {
+ char *buf1=GetStringFromParm(-0x10);
+ log_printf3("SetFileAttributes: \"%s\":%08X",buf1,parm1);
+ if (!SetFileAttributes(buf1,parm1))
+ {
+ exec_error++;
+ log_printf("SetFileAttributes failed.");
+ }
+ }
+ break;
+ case EW_CREATEDIR: {
+ char *buf1=GetStringFromParm(-0x10);
+ log_printf3("CreateDirectory: \"%s\" (%d)",buf1,parm1);
+ {
+ char *p = skip_root(buf1);
+ char c = 'c';
+ if (p)
+ {
+ while (c)
+ {
+ p = findchar(p, '\\');
+ c = *p;
+ *p = 0;
+ if (!CreateDirectory(buf1, NULL))
+ {
+ if (GetLastError() != ERROR_ALREADY_EXISTS)
+ {
+ log_printf3("CreateDirectory: can't create \"%s\" (err=%d)",buf1,GetLastError());
+ exec_error++;
+ }
+ else if ((GetFileAttributes(buf1) & FILE_ATTRIBUTE_DIRECTORY) == 0)
+ {
+ log_printf2("CreateDirectory: can't create \"%s\" - a file already exists",buf1);
+ exec_error++;
+ }
+ }
+ *p++ = c;
+ }
+ }
+ }
+ if (parm1)
+ {
+ update_status_text_buf1(LANG_OUTPUTDIR);
+ mystrcpy(state_output_directory,buf1);
+ SetCurrentDirectory(buf1);
+ }
+ else update_status_text_buf1(LANG_CREATEDIR);
+ }
+ break;
+ case EW_IFFILEEXISTS:
+ {
+ char *buf0=GetStringFromParm(0x00);
+ if (file_exists(buf0))
+ {
+ log_printf3("IfFileExists: file \"%s\" exists, jumping %d",buf0,parm1);
+ return parm1;
+ }
+ log_printf3("IfFileExists: file \"%s\" does not exist, jumping %d",buf0,parm2);
+ }
+ return parm2;
+#ifdef NSIS_SUPPORT_RENAME
+ case EW_RENAME:
+ {
+ char *buf3=GetStringFromParm(-0x30);
+ char *buf2=GetStringFromParm(-0x21);
+ char *buf1=GetStringFromParm(0x13);
+ log_printf2("Rename: %s",buf1);
+ if (MoveFile(buf3,buf2))
+ {
+ update_status_text_buf1(LANG_RENAME);
+ }
+ else
+ {
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ if (parm2 && file_exists(buf3))
+ {
+ MoveFileOnReboot(buf3,buf2);
+ update_status_text_buf1(LANG_RENAMEONREBOOT);
+ log_printf2("Rename on reboot: %s",buf1);
+ }
+ else
+#endif
+ {
+ exec_error++;
+ log_printf2("Rename failed: %s",buf1);
+ }
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_RENAME
+#ifdef NSIS_SUPPORT_FNUTIL
+ case EW_GETFULLPATHNAME:
+ {
+ char *fp;
+ char *p=var1;
+ char *buf0=GetStringFromParm(0x00);
+ if (!GetFullPathName(buf0,NSIS_MAX_STRLEN,p,&fp))
+ {
+ exec_error++;
+ *p=0;
+ }
+ else if (fp>buf0 && *fp)
+ {
+ WIN32_FIND_DATA *fd=file_exists(buf0);
+ if (fd)
+ {
+ mystrcpy(fp,fd->cFileName);
+ }
+ else
+ {
+ exec_error++;
+ *p=0;
+ }
+ }
+ if (!parm2) GetShortPathName(p,p,NSIS_MAX_STRLEN);
+ }
+ break;
+ case EW_SEARCHPATH:
+ {
+ char *fp;
+ char *p=var0;
+ char *buf0=GetStringFromParm(-0x01);
+ if (!SearchPath(NULL,buf0,NULL,NSIS_MAX_STRLEN,p,&fp))
+ {
+ exec_error++;
+ p[0]=0;
+ }
+ }
+ break;
+ case EW_GETTEMPFILENAME:
+ {
+ char *textout=var0;
+ if (!my_GetTempFileName(textout, GetStringFromParm(-0x11)))
+ exec_error++;
+ }
+ break;
+#endif
+#ifdef NSIS_SUPPORT_FILE
+ case EW_EXTRACTFILE:
+ {
+ HANDLE hOut;
+ int ret;
+ char *buf3 = GetStringFromParm(0x31);
+ int overwriteflag = parm0 & 7;
+
+ log_printf4("File: overwriteflag=%d, allowskipfilesflag=%d, name=\"%s\"",overwriteflag,(parm0>>3)&MB_ABORTRETRYIGNORE,buf3);
+ if (validpathspec(buf3))
+ {
+ mystrcpy(buf0,buf3);
+ }
+ else mystrcat(addtrailingslash(mystrcpy(buf0,state_output_directory)),buf3);
+ validate_filename(buf0);
+ _tryagain:
+ if (overwriteflag >= 3) // check date and time
+ {
+ WIN32_FIND_DATA *ffd=file_exists(buf0);
+ // if it doesn't exist, overwrite flag will be off (though it doesn't really matter)
+ int cmp=0;
+ if (ffd)
+ {
+ cmp=CompareFileTime(&ffd->ftLastWriteTime, (FILETIME*)(lent.offsets + 3));
+ }
+ overwriteflag=!(cmp & (0x80000000 | (overwriteflag - 3)));
+ }
+ // remove read only flag if overwrite mode is on
+ if (!overwriteflag)
+ {
+ remove_ro_attr(buf0);
+ }
+ hOut=myOpenFile(buf0,GENERIC_WRITE,(overwriteflag==1)?CREATE_NEW:CREATE_ALWAYS);
+ if (hOut == INVALID_HANDLE_VALUE)
+ {
+ if (overwriteflag)
+ {
+ update_status_text(LANG_SKIPPED,buf3);
+ if (overwriteflag==2) exec_error++;
+ log_printf3("File: skipped: \"%s\" (overwriteflag=%d)",buf0,overwriteflag);
+ break;
+ }
+ log_printf2("File: error creating \"%s\"",buf0);
+
+ mystrcpy(buf2,g_usrvars[0]); // save $0
+ mystrcpy(g_usrvars[0],buf0); // copy file name to $0
+ GetNSISString(buf1,parm5); // use $0
+ mystrcpy(g_usrvars[0],buf2); // restore $0
+
+ // Modified by ramon 23 May 2003
+ switch (my_MessageBox(buf1, parm0>>3))
+ {
+ case IDRETRY:
+ log_printf("File: error, user retry");
+ goto _tryagain;
+ case IDIGNORE:
+ log_printf("File: error, user cancel");
+ g_exec_flags.exec_error++;
+ return 0;
+ default:
+ log_printf("File: error, user abort");
+ update_status_text(LANG_CANTWRITE,buf0);
+ return EXEC_ERROR;
+ }
+ }
+
+ update_status_text(LANG_EXTRACT,buf3);
+ {
+ g_exec_flags.status_update++;
+ ret=GetCompressedDataFromDataBlock(parm2,hOut);
+ g_exec_flags.status_update--;
+ }
+
+ log_printf3("File: wrote %d to \"%s\"",ret,buf0);
+
+ if (parm3 != 0xffffffff || parm4 != 0xffffffff)
+ SetFileTime(hOut,(FILETIME*)(lent.offsets+3),NULL,(FILETIME*)(lent.offsets+3));
+
+ CloseHandle(hOut);
+
+ if (ret < 0)
+ {
+ if (ret == -2)
+ {
+ GetNSISString(buf0,LANG_ERRORWRITING);
+ mystrcat(buf0,buf3);
+ }
+ else
+ {
+ GetNSISString(buf0,LANG_ERRORDECOMPRESSING);
+ }
+ log_printf2("%s",buf0);
+ my_MessageBox(buf0,MB_OK|MB_ICONSTOP|(IDOK<<21));
+ return EXEC_ERROR;
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_FILE
+#ifdef NSIS_SUPPORT_DELETE
+ case EW_DELETEFILE:
+ {
+ char *buf0=GetStringFromParm(0x00);
+ log_printf2("Delete: \"%s\"",buf0);
+ myDelete(buf0,parm1);
+ }
+ break;
+#endif//NSIS_SUPPORT_DELETE
+#ifdef NSIS_SUPPORT_MESSAGEBOX
+ case EW_MESSAGEBOX: // MessageBox
+ {
+ int v;
+ char *buf3=GetStringFromParm(0x31);
+ log_printf3("MessageBox: %d,\"%s\"",parm0,buf3);
+ v=my_MessageBox(buf3,parm0);
+ if (v)
+ {
+ if (v==parm2)
+ {
+ return parm3;
+ }
+ if (v==parm4)
+ {
+ return parm5;
+ }
+ }
+ else exec_error++;
+ }
+ break;
+#endif//NSIS_SUPPORT_MESSAGEBOX
+#ifdef NSIS_SUPPORT_RMDIR
+ case EW_RMDIR:
+ {
+ char *buf1=GetStringFromParm(-0x10);
+ log_printf2("RMDir: \"%s\"",buf1);
+
+ myDelete(buf1,parm1);
+ }
+ break;
+#endif//NSIS_SUPPORT_RMDIR
+#ifdef NSIS_SUPPORT_STROPTS
+ case EW_STRLEN:
+ {
+ char *buf0=GetStringFromParm(0x01);
+ myitoa(var0,mystrlen(buf0));
+ }
+ break;
+ case EW_ASSIGNVAR:
+ {
+ int newlen=GetIntFromParm(2);
+ int start=GetIntFromParm(3);
+ int l;
+ char *p=var0;
+ char *buf0=GetStringFromParm(0x01);
+ *p=0;
+ if (!parm2 || newlen)
+ {
+ l=mystrlen(buf0);
+
+ if (start<0) start=l+start;
+ if (start>=0)
+ {
+ if (start>l) start=l;
+ mystrcpy(p,buf0+start);
+ if (newlen)
+ {
+ if (newlen<0) newlen=mystrlen(p)+newlen;
+ if (newlen<0) newlen=0;
+ if (newlen < NSIS_MAX_STRLEN) p[newlen]=0;
+ }
+ }
+ }
+ }
+ break;
+ case EW_STRCMP:
+ {
+ char *buf2=GetStringFromParm(0x20);
+ char *buf3=GetStringFromParm(0x31);
+ if (!parm4) {
+ // case insensitive
+ if (!lstrcmpi(buf2,buf3)) return parm2;
+ }
+ else {
+ // case sensitive
+ if (!lstrcmp(buf2,buf3)) return parm2;
+ }
+ }
+ return parm3;
+#endif//NSIS_SUPPORT_STROPTS
+#ifdef NSIS_SUPPORT_ENVIRONMENT
+ case EW_READENVSTR:
+ {
+ char *p=var0;
+ char *buf0=GetStringFromParm(0x01);
+ if (!ExpandEnvironmentStrings(buf0,p,NSIS_MAX_STRLEN)
+ || (parm2 && !lstrcmp(buf0, p)))
+ {
+ exec_error++;
+ *p=0;
+ }
+ p[NSIS_MAX_STRLEN-1]=0;
+ }
+ break;
+#endif//NSIS_SUPPORT_ENVIRONMENT
+#ifdef NSIS_SUPPORT_INTOPTS
+ case EW_INTCMP:
+ {
+ int v,v2;
+ v=GetIntFromParm(0);
+ v2=GetIntFromParm(1);
+ if (!parm5) {
+ // signed
+ if (v<v2) return parm3;
+ if (v>v2) return parm4;
+ }
+ else {
+ // unsigned
+ if ((unsigned int)v<(unsigned int)v2) return parm3;
+ if ((unsigned int)v>(unsigned int)v2) return parm4;
+ }
+ }
+ return parm2;
+ case EW_INTOP:
+ {
+ int v,v2;
+ char *p=var0;
+ v=GetIntFromParm(1);
+ v2=GetIntFromParm(2);
+ switch (parm3)
+ {
+ case 0: v+=v2; break;
+ case 1: v-=v2; break;
+ case 2: v*=v2; break;
+ case 3: if (v2) v/=v2; else { v=0; exec_error++; } break;
+ case 4: v|=v2; break;
+ case 5: v&=v2; break;
+ case 6: v^=v2; break;
+ case 7: v=!v; break;
+ case 8: v=v||v2; break;
+ case 9: v=v&&v2; break;
+ case 10: if (v2) v%=v2; else { v=0; exec_error++; } break;
+ case 11: v=v<<v2; break;
+ case 12: v=v>>v2; break;
+ }
+ myitoa(p,v);
+ }
+ break;
+ case EW_INTFMT: {
+ char *buf0=GetStringFromParm(0x01);
+ wsprintf(var0,
+ buf0,
+ GetIntFromParm(2));
+ }
+ break;
+#endif//NSIS_SUPPORT_INTOPTS
+#ifdef NSIS_SUPPORT_STACK
+ case EW_PUSHPOP:
+ {
+ stack_t *s=g_st;
+ int cnt=parm2;
+ if (cnt) //Exch contributed by Fritz Elfert
+ {
+ while (cnt--&&s) s=s->next;
+ if (!s)
+ {
+ log_printf2("Exch: stack < %d elements",parm2);
+ my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<21));
+ return EXEC_ERROR;
+ }
+ mystrcpy(buf0,s->text);
+ mystrcpy(s->text,g_st->text);
+ mystrcpy(g_st->text,buf0);
+ }
+ else if (parm1)
+ {
+ if (!s)
+ {
+ log_printf("Pop: stack empty");
+ exec_error++;
+ break;
+ }
+ mystrcpy(var0,s->text);
+ g_st=s->next;
+ GlobalFree((HGLOBAL)s);
+ }
+ else
+ {
+ s=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t));
+ GetNSISString(s->text,parm0);
+ s->next=g_st;
+ g_st=s;
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_STACK
+#ifdef NSIS_SUPPORT_HWNDS
+ case EW_FINDWINDOW:
+ case EW_SENDMESSAGE:
+ {
+ int v;
+ int b3=GetIntFromParm(3);
+ int b4=GetIntFromParm(4);
+ if (parm5&1) b3=(int)GetStringFromParm(0x33);
+ if (parm5&2) b4=(int)GetStringFromParm(0x44);
+
+ if (which == EW_SENDMESSAGE)
+ {
+ HWND hwnd=(HWND)GetIntFromParm(1);
+ int msg=GetIntFromParm(2);
+
+ if (parm5>>2) exec_error += !SendMessageTimeout(hwnd,msg,b3,b4,SMTO_NORMAL,parm5>>2,(LPDWORD)&v);
+ else v=SendMessage(hwnd,msg,b3,b4);
+ }
+ else
+ {
+ char *buf0=GetStringFromParm(0x01);
+ char *buf1=GetStringFromParm(0x12);
+ v=(int)FindWindowEx((HWND)b3,(HWND)b4,buf0[0]?buf0:NULL,buf1[0]?buf1:NULL);
+ }
+
+ if (parm0>=0)
+ myitoa(var0,v);
+ }
+ break;
+ case EW_ISWINDOW:
+ if (IsWindow((HWND)GetIntFromParm(0))) return parm1;
+ return parm2;
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ case EW_GETDLGITEM:
+ myitoa(
+ var0,
+ (int)GetDlgItem(
+ (HWND)GetIntFromParm(1),
+ GetIntFromParm(2)
+ )
+ );
+ break;
+ case EW_SETCTLCOLORS:
+ {
+ ctlcolors *c = (ctlcolors *)(g_blocks[NB_CTLCOLORS].offset + parm1);
+ SetWindowLong((HWND) GetIntFromParm(0), GWL_USERDATA, (long) c);
+ }
+ break;
+ case EW_SETBRANDINGIMAGE:
+ {
+ RECT r;
+ HANDLE hImage;
+ HWND hwImage=GetDlgItem(g_hwnd, parm1);
+ GetClientRect(hwImage, &r);
+ hImage=LoadImage(
+ 0,
+ GetStringFromParm(0x00),
+ IMAGE_BITMAP,
+ parm2*r.right,
+ parm2*r.bottom,
+ LR_LOADFROMFILE
+ );
+ hImage = (HANDLE)SendMessage(
+ hwImage,
+ STM_SETIMAGE,
+ IMAGE_BITMAP,
+ (LPARAM)hImage
+ );
+ // delete old image
+ if (hImage) DeleteObject(hImage);
+ }
+ break;
+ case EW_CREATEFONT:
+ {
+ static LOGFONT f;
+ f.lfHeight=-MulDiv(GetIntFromParm(2),GetDeviceCaps(GetDC(g_hwnd),LOGPIXELSY),72);
+ f.lfWeight=GetIntFromParm(3);
+ f.lfItalic=parm4&1;
+ f.lfUnderline=parm4&2;
+ f.lfStrikeOut=parm4&4;
+ f.lfCharSet=DEFAULT_CHARSET;
+ GetNSISString(f.lfFaceName,parm1);
+ myitoa(var0,(int)CreateFontIndirect(&f));
+ }
+ break;
+ case EW_SHOWWINDOW:
+ {
+ HWND hw=(HWND)GetIntFromParm(0);
+ int a=GetIntFromParm(1);
+ if (parm2) log_printf("HideWindow");
+ if (!parm3)
+ ShowWindow(hw,a);
+ else
+ EnableWindow(hw,a);
+ }
+ break;
+#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+#endif//NSIS_SUPPORT_HWNDS
+#ifdef NSIS_SUPPORT_SHELLEXECUTE
+ case EW_SHELLEXEC: // this uses improvements of Andras Varga
+ {
+ int x;
+ char *buf0=GetStringFromParm(0x00);
+ char *buf3=GetStringFromParm(0x31);
+ char *buf2=GetStringFromParm(0x22);
+ char *buf1=GetStringFromParm(0x15);
+ update_status_text_buf1(LANG_EXECSHELL);
+ x=(int)ShellExecute(g_hwnd,buf0[0]?buf0:NULL,buf3,buf2[0]?buf2:NULL,state_output_directory,parm3);
+ if (x < 33)
+ {
+ log_printf5("ExecShell: warning: error (\"%s\": file:\"%s\" params:\"%s\")=%d",buf0,buf3,buf2,x);
+ exec_error++;
+ }
+ else
+ {
+ log_printf4("ExecShell: success (\"%s\": file:\"%s\" params:\"%s\")",buf0,buf3,buf2);
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_SHELLEXECUTE
+#ifdef NSIS_SUPPORT_EXECUTE
+ case EW_EXECUTE:
+ {
+ HANDLE hProc;
+ char *buf0=GetStringFromParm(0x00);
+ log_printf2("Exec: command=\"%s\"",buf0);
+ update_status_text(LANG_EXECUTE,buf0);
+
+ hProc=myCreateProcess(buf0);
+
+ if (hProc)
+ {
+ log_printf2("Exec: success (\"%s\")",buf0);
+ if (parm2)
+ {
+ DWORD lExitCode;
+ while (WaitForSingleObject(hProc,100) == WAIT_TIMEOUT)
+ {
+ MessageLoop(WM_PAINT);
+ }
+ GetExitCodeProcess(hProc, &lExitCode);
+
+ if (parm1>=0) myitoa(var1,lExitCode);
+ else if (lExitCode) exec_error++;
+ }
+ CloseHandle( hProc );
+ }
+ else
+ {
+ exec_error++;
+ log_printf2("Exec: failed createprocess (\"%s\")",buf0);
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_EXECUTE
+#ifdef NSIS_SUPPORT_GETFILETIME
+ case EW_GETFILETIME:
+ // this new implementation based on one by Dave Bau
+ // used FindFirstFile instead of GetFileTime to better handle files that are locked.
+ // also allows GetFileTime to be passed a wildcard.
+ {
+ WIN32_FIND_DATA *ffd;
+ char *highout=var0;
+ char *lowout=var1;
+ char *buf0=GetStringFromParm(0x02);
+
+ ffd=file_exists(buf0);
+ if (ffd)
+ {
+ myitoa(lowout,ffd->ftLastWriteTime.dwLowDateTime);
+ myitoa(highout,ffd->ftLastWriteTime.dwHighDateTime);
+ }
+ else
+ {
+ *lowout=*highout=0;
+ exec_error++;
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_GETFILETIME
+#ifdef NSIS_SUPPORT_GETDLLVERSION
+ case EW_GETDLLVERSION:
+ {
+ char *highout=var0;
+ char *lowout=var1;
+ DWORD s1;
+ VS_FIXEDFILEINFO *pvsf1;
+ DWORD d;
+ char *buf1=GetStringFromParm(-0x12);
+ s1=GetFileVersionInfoSize(buf1,&d);
+ *lowout=*highout=0;
+ exec_error++;
+ if (s1)
+ {
+ void *b1;
+ b1=GlobalAlloc(GPTR,s1);
+ if (b1)
+ {
+ UINT uLen;
+ if (GetFileVersionInfo(buf1,0,s1,b1) && VerQueryValue(b1,"\\",(void*)&pvsf1,&uLen))
+ {
+ myitoa(highout,pvsf1->dwFileVersionMS);
+ myitoa(lowout,pvsf1->dwFileVersionLS);
+
+ exec_error--;
+ }
+ GlobalFree(b1);
+ }
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_GETDLLVERSION
+#ifdef NSIS_SUPPORT_ACTIVEXREG
+ case EW_REGISTERDLL:
+ {
+ exec_error++;
+ if (SUCCEEDED(g_hres))
+ {
+ HANDLE h=NULL;
+ char *buf1=GetStringFromParm(-0x10);
+ char *buf0=GetStringFromParm(0x01);
+
+ if (parm4)
+ h=GetModuleHandle(buf1);
+ if (!h)
+ h=LoadLibraryEx(buf1, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
+ if (h)
+ {
+ FARPROC funke = GetProcAddress(h,buf0);
+ if (funke)
+ {
+ exec_error--;
+ if (parm2)
+ {
+ update_status_text_buf1(parm2);
+ if (funke()) exec_error++;
+ }
+ else
+ {
+ void (*func)(HWND,int,char*,void*,void*);
+ func=(void*)funke;
+ func(
+ g_hwnd,
+ NSIS_MAX_STRLEN,
+ (char*)g_usrvars,
+#ifdef NSIS_SUPPORT_STACK
+ (void*)&g_st,
+#else
+ NULL,
+#endif//NSIS_SUPPORT_STACK
+ &plugin_extra_parameters
+ );
+ }
+ }
+ else
+ {
+ update_status_text(LANG_CANNOTFINDSYMBOL,buf0);
+ log_printf3("Error registering DLL: %s not found in %s",buf0,buf1);
+ }
+ if (!parm3) FreeLibrary(h);
+ }
+ else
+ {
+ update_status_text_buf1(LANG_COULDNOTLOAD);
+ log_printf2("Error registering DLL: Could not load %s",buf1);
+ }
+ }
+ else
+ {
+ update_status_text_buf1(LANG_NOOLE);
+ log_printf("Error registering DLL: Could not initialize OLE");
+ }
+ }
+ break;
+#endif
+#ifdef NSIS_SUPPORT_CREATESHORTCUT
+ case EW_CREATESHORTCUT:
+ {
+ char *buf1=GetStringFromParm(-0x10);
+ char *buf2=GetStringFromParm(-0x21);
+ char *buf0=GetStringFromParm(0x02);
+ char *buf3=GetStringFromParm(-0x33);
+ char *buf4=GetStringFromParm(0x45);
+
+ HRESULT hres;
+ IShellLink* psl;
+
+ if (!validpathspec(buf2))
+ GetStringFromParm(0x21);
+
+ log_printf8("CreateShortCut: out: \"%s\", in: \"%s %s\", icon: %s,%d, sw=%d, hk=%d",
+ buf1,buf2,buf0,buf3,parm4&0xff,(parm4&0xff00)>>8,parm4>>16);
+
+ hres = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IShellLink, (void **) &psl);
+ if (SUCCEEDED(hres))
+ {
+ IPersistFile* ppf;
+
+ hres = psl->lpVtbl->QueryInterface(psl,&IID_IPersistFile, (void **) &ppf);
+ if (SUCCEEDED(hres))
+ {
+ hres = psl->lpVtbl->SetPath(psl,buf2);
+ psl->lpVtbl->SetWorkingDirectory(psl,state_output_directory);
+ if ((parm4&0xff00)>>8) psl->lpVtbl->SetShowCmd(psl,(parm4&0xff00)>>8);
+ psl->lpVtbl->SetHotkey(psl,(unsigned short)(parm4>>16));
+ if (buf3[0]) psl->lpVtbl->SetIconLocation(psl,buf3,parm4&0xff);
+ psl->lpVtbl->SetArguments(psl,buf0);
+ psl->lpVtbl->SetDescription(psl,buf4);
+
+ if (SUCCEEDED(hres))
+ {
+ static WCHAR wsz[1024];
+ hres=E_FAIL;
+ if (MultiByteToWideChar(CP_ACP, 0, buf1, -1, wsz, 1024))
+ hres=ppf->lpVtbl->Save(ppf,(const WCHAR*)wsz,TRUE);
+ }
+ ppf->lpVtbl->Release(ppf);
+ }
+ psl->lpVtbl->Release(psl);
+ }
+
+ if (FAILED(hres))
+ {
+ exec_error++;
+ update_status_text_buf1(LANG_ERRORCREATINGSHORTCUT);
+ }
+ else
+ {
+ update_status_text_buf1(LANG_CREATESHORTCUT);
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_CREATESHORTCUT
+#ifdef NSIS_SUPPORT_COPYFILES
+ case EW_COPYFILES: // CopyFile (added by NOP)
+ {
+ int res;
+ SHFILEOPSTRUCT op;
+ char *buf0=GetStringFromParm(0x00);
+ char *buf1=GetStringFromParm(0x11);
+ char *buf2=GetStringFromParm(0x23); // LANG_COPYTO + buf1
+ log_printf3("CopyFiles \"%s\"->\"%s\"",buf0,buf1);
+
+ if (!file_exists(buf0))
+ {
+ // workaround for bug #774966
+ //
+ // on nt4, SHFileOperation silently fails if the source
+ // file doesn't exist. do a manual check instead.
+
+ update_status_text(LANG_COPYFAILED,0);
+ exec_error++;
+ break;
+ }
+
+ op.hwnd=g_hwnd;
+ op.wFunc=FO_COPY;
+ buf0[mystrlen(buf0)+1]=0;
+ buf1[mystrlen(buf1)+1]=0;
+
+ op.pFrom=buf0;
+ op.pTo=buf1;
+ op.lpszProgressTitle=buf2;
+ op.fFlags=parm2;
+ update_status_text(0,buf2);
+ res=SHFileOperation(&op);
+ if (res)
+ { // some of these changes were from Edgewise (wiked_edge@yahoo.com)
+ update_status_text(LANG_COPYFAILED,0);
+ exec_error++;
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_COPYFILES
+#ifdef NSIS_SUPPORT_REBOOT
+ case EW_REBOOT:
+ if (parm0!=0xbadf00d)
+ {
+ my_MessageBox(GetNSISStringTT(LANG_INSTCORRUPTED),MB_OK|MB_ICONSTOP|(IDOK<<21));
+ return EXEC_ERROR;
+ }
+
+ g_exec_flags.reboot_called++;
+ // a following EW_QUIT will make sure the installer quits right away
+
+ break;
+#endif//NSIS_SUPPORT_REBOOT
+#ifdef NSIS_SUPPORT_INIFILES
+ case EW_WRITEINI:
+ {
+ char *sec=0, *key=0, *str=0;
+#ifdef NSIS_CONFIG_LOG
+ mystrcpy(buf1,"<RM>");
+ mystrcpy(buf2,buf1);
+#endif
+ if (parm0)
+ {
+ sec=GetStringFromParm(0x00);
+ }
+ if (parm1)
+ {
+ key=GetStringFromParm(0x11);
+ }
+ if (parm4)
+ {
+ str=GetStringFromParm(0x22);
+ }
+ buf3=GetStringFromParm(-0x33);
+ log_printf5("WriteINIStr: wrote [%s] %s=%s in %s",buf0,buf1,buf2,buf3);
+ if (!WritePrivateProfileString(sec,key,str,buf3)) exec_error++;
+ }
+ break;
+ case EW_READINISTR:
+ {
+ DWORD errstr = CHAR4_TO_DWORD('!', 'N', '~', 0);
+ char *p=var0;
+ char *buf0=GetStringFromParm(0x01);
+ char *buf1=GetStringFromParm(0x12);
+ char *buf2=GetStringFromParm(-0x23);
+ GetPrivateProfileString(buf0,buf1,(LPCSTR)&errstr,p,NSIS_MAX_STRLEN-1,buf2);
+ if (*(DWORD*)p == errstr)
+ {
+ exec_error++;
+ p[0]=0;
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_INIFILES
+#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
+ case EW_DELREG:
+ {
+ long res=!ERROR_SUCCESS;
+ const char *rkn UNUSED=RegKeyHandleToName((HKEY)parm1);
+ if (!parm4)
+ {
+ HKEY hKey=myRegOpenKey(KEY_SET_VALUE);
+ if (hKey)
+ {
+ char *buf3=GetStringFromParm(0x33);
+ res = RegDeleteValue(hKey,buf3);
+ log_printf4("DeleteRegValue: \"%s\\%s\" \"%s\"",rkn,buf2,buf3);
+ RegCloseKey(hKey);
+ }
+ }
+ else
+ {
+ char *buf2=GetStringFromParm(0x22);
+ log_printf3("DeleteRegKey: \"%s\\%s\"",rkn,buf2);
+ res = myRegDeleteKeyEx(GetRegRootKey(parm1),buf2,parm4&2);
+ }
+ if (res != ERROR_SUCCESS)
+ exec_error++;
+ }
+ break;
+ case EW_WRITEREG: // write registry value
+ {
+ HKEY hKey;
+ HKEY rootkey=GetRegRootKey(parm0);
+ int type=parm4;
+ int rtype=parm5;
+ char *buf0=GetStringFromParm(0x02);
+ char *buf1=GetStringFromParm(0x11);
+ const char *rkn UNUSED=RegKeyHandleToName(rootkey);
+
+ exec_error++;
+ if (RegCreateKeyEx(rootkey,buf1,0,0,0,AlterRegistrySAM(KEY_SET_VALUE),0,&hKey,0) == ERROR_SUCCESS)
+ {
+ LPBYTE data = (LPBYTE) buf2;
+ DWORD size = 0;
+ if (type == REG_SZ)
+ {
+ GetStringFromParm(0x23);
+ size = mystrlen((char *) data) + 1;
+ if (rtype == REG_SZ)
+ {
+ log_printf5("WriteRegStr: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,data);
+ }
+ else
+ {
+ log_printf5("WriteRegExpandStr: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,data);
+ }
+ }
+ if (type == REG_DWORD)
+ {
+ *(LPDWORD) data = GetIntFromParm(3);
+ size = sizeof(DWORD);
+ log_printf5("WriteRegDWORD: \"%s\\%s\" \"%s\"=\"0x%08x\"",rkn,buf1,buf0,*(LPDWORD) data);
+ }
+ if (type == REG_BINARY)
+ {
+#ifdef NSIS_CONFIG_LOG
+ char binbuf[128];
+#endif
+ // use buf2, buf3 and buf4
+ size = GetCompressedDataFromDataBlockToMemory(parm3, data, 3 * NSIS_MAX_STRLEN);
+ LogData2Hex(binbuf, sizeof(binbuf), data, size);
+ log_printf5("WriteRegBin: \"%s\\%s\" \"%s\"=\"%s\"",rkn,buf1,buf0,binbuf);
+ }
+
+ if (size >= 0 && RegSetValueEx(hKey,buf0,0,rtype,data,size) == ERROR_SUCCESS)
+ {
+ exec_error--;
+ }
+ else
+ {
+ log_printf4("WriteReg: error writing into \"%s\\%s\" \"%s\"",rkn,buf1,buf0);
+ }
+
+ RegCloseKey(hKey);
+ }
+ else { log_printf3("WriteReg: error creating key \"%s\\%s\"",rkn,buf1); }
+ }
+ break;
+ case EW_READREGSTR: // read registry string
+ {
+ HKEY hKey=myRegOpenKey(KEY_READ);
+ char *p=var0;
+ char *buf3=GetStringFromParm(0x33); // buf3 == key name
+ p[0]=0;
+ if (hKey)
+ {
+ DWORD l = NSIS_MAX_STRLEN - 1;
+ DWORD t;
+
+ if (RegQueryValueEx(hKey,buf3,NULL,&t,p,&l) != ERROR_SUCCESS ||
+ (t != REG_DWORD && t != REG_SZ && t != REG_EXPAND_SZ))
+ {
+ p[0]=0;
+ exec_error++;
+ }
+ else
+ {
+ if (t==REG_DWORD)
+ {
+ exec_error += !parm4;
+ myitoa(p,*((DWORD*)p));
+ }
+ else
+ {
+ exec_error += parm4;
+ p[l]=0;
+ }
+ }
+ RegCloseKey(hKey);
+ }
+ else exec_error++;
+ }
+ break;
+ case EW_REGENUM:
+ {
+ HKEY key=myRegOpenKey(KEY_READ);
+ char *p=var0;
+ int b=GetIntFromParm(3);
+ p[0]=0;
+ if (key)
+ {
+ DWORD d=NSIS_MAX_STRLEN-1;
+ if (parm4) RegEnumKey(key,b,p,d);
+ else if (RegEnumValue(key,b,p,&d,NULL,NULL,NULL,NULL)!=ERROR_SUCCESS)
+ {
+ exec_error++;
+ break;
+ }
+ p[NSIS_MAX_STRLEN-1]=0;
+ RegCloseKey(key);
+ }
+ else exec_error++;
+ }
+
+ break;
+#endif//NSIS_SUPPORT_REGISTRYFUNCTIONS
+#ifdef NSIS_SUPPORT_FILEFUNCTIONS
+ case EW_FCLOSE:
+ {
+ char *t=var0;
+ if (*t) CloseHandle((HANDLE)myatoi(t));
+ }
+ break;
+ case EW_FOPEN:
+ {
+ HANDLE h;
+ char *handleout=var0;
+ char *buf1=GetStringFromParm(-0x13);
+ h=myOpenFile(buf1,parm1,parm2);
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ *handleout=0;
+ exec_error++;
+ }
+ else
+ {
+ myitoa(handleout,(int)h);
+ }
+ }
+ break;
+ case EW_FPUTS:
+ {
+ DWORD dw;
+ int l;
+ char *t=var0;
+ if (parm2)
+ {
+ ((unsigned char *)buf1)[0]=GetIntFromParm(1)&0xff;
+ l=1;
+ }
+ else
+ {
+ l=mystrlen(GetStringFromParm(0x11));
+ }
+ if (!*t || !WriteFile((HANDLE)myatoi(t),buf1,l,&dw,NULL))
+ {
+ exec_error++;
+ }
+ }
+ break;
+ case EW_FGETS:
+ {
+ char *textout=var1;
+ DWORD dw;
+ int rpos=0;
+ char *hptr=var0;
+ int maxlen=GetIntFromParm(2);
+ if (maxlen<1) break;
+ if (maxlen > NSIS_MAX_STRLEN-1) maxlen=NSIS_MAX_STRLEN-1;
+ if (*hptr)
+ {
+ char lc=0;
+ HANDLE h=(HANDLE)myatoi(hptr);
+ while (rpos<maxlen)
+ {
+ char c;
+ if (!ReadFile(h,&c,1,&dw,NULL) || dw != 1) break;
+ if (parm3)
+ {
+ myitoa(textout,(unsigned int)(unsigned char)c);
+ return 0;
+ }
+ if (lc == '\r' || lc == '\n')
+ {
+ if (lc == c || (c != '\r' && c != '\n')) SetFilePointer(h,-1,NULL,FILE_CURRENT);
+ else textout[rpos++]=c;
+ break;
+ }
+ textout[rpos++]=c;
+ lc=c;
+ if (!c) break;
+ }
+ }
+ textout[rpos]=0;
+ if (!rpos) exec_error++;
+ }
+ break;
+ case EW_FSEEK:
+ {
+ char *t=var0;
+ if (*t)
+ {
+ DWORD v=SetFilePointer((HANDLE)myatoi(t),GetIntFromParm(2),NULL,parm3);
+
+ if (parm1>=0)
+ {
+ myitoa(var1,v);
+ }
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_FILEFUNCTIONS
+#ifdef NSIS_SUPPORT_FINDFIRST
+ case EW_FINDCLOSE:
+ {
+ char *t=var0;
+ if (*t) FindClose((HANDLE)myatoi(t));
+ }
+ break;
+ case EW_FINDNEXT:
+ {
+ char *textout=var0;
+ char *t=var1;
+ WIN32_FIND_DATA fd;
+ if (*t && FindNextFile((HANDLE)myatoi(t),&fd))
+ {
+ mystrcpy(textout,fd.cFileName);
+ }
+ else
+ {
+ exec_error++;
+ *textout=0;
+ }
+
+ }
+ break;
+ case EW_FINDFIRST:
+ {
+ char *textout=var0;
+ char *handleout=var1;
+ HANDLE h;
+ WIN32_FIND_DATA fd;
+ char *buf0=GetStringFromParm(0x02);
+ h=FindFirstFile(buf0,&fd);
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ *handleout=0;
+ *textout=0;
+ exec_error++;
+ }
+ else
+ {
+ myitoa(handleout,(int)h);
+ mystrcpy(textout,fd.cFileName);
+ }
+ }
+ break;
+#endif//NSIS_SUPPORT_FINDFIRST
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ case EW_WRITEUNINSTALLER:
+ {
+ int ret=-666;
+ HANDLE hFile;
+ char *buf1=GetStringFromParm(-0x10);
+
+ if (!validpathspec(buf1))
+ GetStringFromParm(-0x13);
+
+ remove_ro_attr(buf1);
+ hFile=myOpenFile(buf1,GENERIC_WRITE,CREATE_ALWAYS);
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ unsigned char *filebuf;
+ int filehdrsize = g_filehdrsize;
+ filebuf=(unsigned char *)GlobalAlloc(GPTR,filehdrsize);
+ if (filebuf)
+ {
+ DWORD lout;
+ SetSelfFilePointer(0);
+ ReadSelfFile((char*)filebuf,filehdrsize);
+ {
+ unsigned char* seeker;
+ unsigned char* unicon_data = seeker = (unsigned char*)GlobalAlloc(GPTR,parm2);
+ if (unicon_data) {
+ GetCompressedDataFromDataBlockToMemory(parm1,unicon_data,parm2);
+ while (*seeker) {
+ struct icondata {
+ DWORD dwSize;
+ DWORD dwOffset;
+ } id = *(struct icondata *) seeker;
+ seeker += sizeof(struct icondata);
+ mini_memcpy(filebuf+id.dwOffset, seeker, id.dwSize);
+ seeker += id.dwSize;
+ }
+ GlobalFree(unicon_data);
+ }
+ }
+ WriteFile(hFile,(char*)filebuf,filehdrsize,&lout,NULL);
+ GlobalFree(filebuf);
+ ret=GetCompressedDataFromDataBlock(-1,hFile);
+ }
+ CloseHandle(hFile);
+ }
+ log_printf3("created uninstaller: %d, \"%s\"",ret,buf1);
+ {
+ int str = LANG_CREATEDUNINST;
+ if (ret < 0)
+ {
+ str = LANG_ERRORCREATING;
+ DeleteFile(buf1);
+ exec_error++;
+ }
+ update_status_text_buf1(str);
+ }
+ }
+ break;
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+#ifdef NSIS_CONFIG_LOG
+ case EW_LOG:
+ if (parm0)
+ {
+ log_printf2("settings logging to %d",parm1);
+ log_dolog=parm1;
+ log_printf2("logging set to %d",parm1);
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+ if (parm1) build_g_logfile();
+#endif
+ }
+ else
+ {
+ char *buf0=GetStringFromParm(0x01);
+ log_printf2("%s",buf0);
+ }
+ break;
+#endif//NSIS_CONFIG_LOG
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ case EW_SECTIONSET:
+ {
+ int x=GetIntFromParm(0);
+ if ((unsigned int)x < (unsigned int)num_sections)
+ {
+ section *sec=g_sections+x;
+ if (parm2>=0) // get something
+ {
+ int res=((int*)sec)[parm2];
+ if (!parm2)
+ {
+ // getting text
+ mystrcpy(var1,sec->name);
+ }
+ else
+ {
+ // getting number
+ myitoa(var1,res);
+ }
+ }
+ else // set something
+ {
+ parm2=-parm2-1;
+ if (parm2)
+ {
+ // not setting text, get int
+ parm1=GetIntFromParm(1);
+ }
+ else
+ {
+ // setting text
+ GetNSISString(sec->name,parm4);
+ sec->flags|=SF_NAMECHG;
+ // parm1 is zero so name_ptr will be set to zero
+ // if name_ptr is zero, it won't be used after .onInit
+ }
+
+ ((int*)sec)[parm2]=parm1;
+
+ if (parm3) // update flags
+ {
+ SectionFlagsChanged(x);
+ }
+ }
+ }
+ else exec_error++;
+ }
+ break;
+ case EW_INSTTYPESET:
+ {
+ int x = GetIntFromParm(0);
+
+ if ((unsigned int)x < (unsigned int)NSIS_MAX_INST_TYPES)
+ {
+ if (parm3) // current install type
+ {
+ if (parm2) // set install type
+ {
+ SetInstType(x);
+ RefreshSectionGroups();
+ }
+ else // get install type
+ {
+ myitoa(var1, GetInstType(0));
+ }
+ }
+ else // install type text
+ {
+ if (parm2) // set text
+ {
+ g_header->install_types[x] = parm1;
+ }
+ else // get text
+ {
+ GetNSISString(var1,g_header->install_types[x]);
+ }
+ }
+ }
+ else exec_error++;
+ }
+ break;
+#endif//NSIS_CONFIG_COMPONENTPAGE
+
+#ifdef NSIS_LOCKWINDOW_SUPPORT
+ case EW_LOCKWINDOW:
+ {
+ // ui_dlg_visible is 1 or 0, so is parm0
+ SendMessage(g_hwnd, WM_SETREDRAW, parm0 & ui_dlg_visible, 0);
+ if ( parm0 )
+ InvalidateRect(g_hwnd, NULL, FALSE);
+ break;
+ }
+#endif //NSIS_LOCKWINDOW_SUPPORT
+ }
+
+ g_exec_flags.exec_error += exec_error;
+
+ return 0;
+}
diff --git a/Source/exehead/exec.h b/Source/exehead/exec.h
index b49b91d..6af6603 100755
--- a/Source/exehead/exec.h
+++ b/Source/exehead/exec.h
@@ -1,26 +1,26 @@
-/*
- * exec.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _EXEC_H_
-#define _EXEC_H_
-
-extern exec_flags g_exec_flags;
-extern exec_flags g_exec_flags_last_used;
-
-int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress); // returns 0 on success
-int NSISCALL ExecuteCallbackFunction(int num); // returns 0 on success
-
-#endif//_EXEC_H_
+/*
+ * exec.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _EXEC_H_
+#define _EXEC_H_
+
+extern exec_flags g_exec_flags;
+extern exec_flags g_exec_flags_last_used;
+
+int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress); // returns 0 on success
+int NSISCALL ExecuteCallbackFunction(int num); // returns 0 on success
+
+#endif//_EXEC_H_
diff --git a/Source/exehead/fileform.c b/Source/exehead/fileform.c
index 43f7706..cb2618f 100755
--- a/Source/exehead/fileform.c
+++ b/Source/exehead/fileform.c
@@ -1,564 +1,576 @@
-/*
- * fileform.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-#include "fileform.h"
-#include "util.h"
-#include "state.h"
-#include "resource.h"
-#include "lang.h"
-#include "ui.h"
-#include "exec.h"
-#include "../crc32.h"
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
-#ifdef NSIS_COMPRESS_USE_ZLIB
-#include "../zlib/ZLIB.H"
-#endif
-
-#ifdef NSIS_COMPRESS_USE_LZMA
-#include "../7zip/LZMADecode.h"
-#define z_stream lzma_stream
-#define inflateInit(x) lzmaInit(x)
-#define inflateReset(x) lzmaInit(x)
-#define inflate(x) lzmaDecode(x)
-#define Z_OK LZMA_OK
-#define Z_STREAM_END LZMA_STREAM_END
-#endif
-
-#ifdef NSIS_COMPRESS_USE_BZIP2
-#include "../bzip2/bzlib.h"
-
-#define z_stream DState
-#define inflateInit(x) BZ2_bzDecompressInit(x)
-#define inflateReset(x) BZ2_bzDecompressInit(x)
-
-#define inflate(x) BZ2_bzDecompress(x)
-#define Z_OK BZ_OK
-#define Z_STREAM_END BZ_STREAM_END
-#endif//NSIS_COMPRESS_USE_BZIP2
-#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
-
-struct block_header g_blocks[BLOCKS_NUM];
-header *g_header;
-int g_flags;
-int g_filehdrsize;
-int g_is_uninstaller;
-
-HANDLE g_db_hFile=INVALID_HANDLE_VALUE;
-
-#if defined(NSIS_CONFIG_COMPRESSION_SUPPORT) && defined(NSIS_COMPRESS_WHOLE)
-HANDLE dbd_hFile=INVALID_HANDLE_VALUE;
-static int dbd_size, dbd_pos, dbd_srcpos, dbd_fulllen;
-#endif//NSIS_COMPRESS_WHOLE
-
-static int m_length;
-static int m_pos;
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_COMPRESS_WHOLE)
-BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- static char *msg;
- if (uMsg == WM_INITDIALOG)
- {
- SetTimer(hwndDlg,1,250,NULL);
- msg = (char *) lParam;
- uMsg = WM_TIMER;
- }
- if (uMsg == WM_TIMER)
- {
- static char bt[64];
- int percent=MulDiv(min(m_pos,m_length),100,m_length);
-#ifdef NSIS_COMPRESS_WHOLE
- if (msg)
-#endif
- {
- wsprintf(bt,msg,percent);
-
- my_SetWindowText(hwndDlg,bt);
- my_SetDialogItemText(hwndDlg,IDC_STR,bt);
-
- ShowWindow(hwndDlg, SW_SHOW);
- }
-
-#ifdef NSIS_COMPRESS_WHOLE
- if (g_exec_flags.status_update & 1)
- {
- wsprintf(bt, "... %d%%", percent);
- update_status_text(0, bt);
- }
-#endif
- }
- return 0;
-}
-#endif//NSIS_CONFIG_CRC_SUPPORT || NSIS_COMPRESS_WHOLE
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
-static z_stream g_inflate_stream;
-#endif
-
-const char * NSISCALL loadHeaders(int cl_flags)
-{
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- HWND hwnd = 0;
- unsigned int verify_time = GetTickCount() + 1000;
-#endif
- crc32_t crc = 0;
- int do_crc = 0;
-#endif//NSIS_CONFIG_CRC_SUPPORT
- int left;
-
- void *data;
- firstheader h;
- header *header;
-
- HANDLE db_hFile;
-
- GetModuleFileName(NULL, state_exe_path, NSIS_MAX_STRLEN);
-
- g_db_hFile = db_hFile = myOpenFile(state_exe_path, GENERIC_READ, OPEN_EXISTING);
- if (db_hFile == INVALID_HANDLE_VALUE)
- {
- return _LANG_CANTOPENSELF;
- }
-
- mystrcpy(state_exe_directory, state_exe_path);
- mystrcpy(state_exe_file, trimslashtoend(state_exe_directory));
-
- left = m_length = GetFileSize(db_hFile,NULL);
- while (left > 0)
- {
- static char temp[32768];
- DWORD l = min(left, (g_filehdrsize ? 32768 : 512));
- if (!ReadSelfFile(temp, l))
- {
-#if defined(NSIS_CONFIG_CRC_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
- if (hwnd) DestroyWindow(hwnd);
-#endif//NSIS_CONFIG_CRC_SUPPORT
- return _LANG_INVALIDCRC;
- }
-
- if (!g_filehdrsize)
- {
- mini_memcpy(&h, temp, sizeof(firstheader));
- if (
- (h.flags & (~FH_FLAGS_MASK)) == 0 &&
- h.siginfo == FH_SIG &&
- h.nsinst[2] == FH_INT3 &&
- h.nsinst[1] == FH_INT2 &&
- h.nsinst[0] == FH_INT1
- )
- {
- g_filehdrsize = m_pos;
-
-#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_CONFIG_SILENT_SUPPORT)
- cl_flags |= h.flags;
-#endif
-
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- g_exec_flags.silent |= cl_flags & FH_FLAGS_SILENT;
-#endif
-
- if (h.length_of_all_following_data > left)
- return _LANG_INVALIDCRC;
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- if ((cl_flags & FH_FLAGS_FORCE_CRC) == 0)
- {
- if (cl_flags & FH_FLAGS_NO_CRC)
- break;
- }
-
- do_crc++;
-
-#ifndef NSIS_CONFIG_CRC_ANAL
- left = h.length_of_all_following_data - 4;
- // end crc checking at crc :) this means you can tack shit on the end and it'll still work.
-#else //!NSIS_CONFIG_CRC_ANAL
- left -= 4;
-#endif//NSIS_CONFIG_CRC_ANAL
- // this is in case the end part is < 512 bytes.
- if (l > (DWORD)left) l=(DWORD)left;
-
-#else//!NSIS_CONFIG_CRC_SUPPORT
- // no crc support, no need to keep on reading
- break;
-#endif//!NSIS_CONFIG_CRC_SUPPORT
- }
- }
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- else if ((cl_flags & FH_FLAGS_SILENT) == 0)
-#endif//NSIS_CONFIG_SILENT_SUPPORT
- {
- if (hwnd)
- {
- MessageLoop(0);
- }
- else if (GetTickCount() > verify_time)
- hwnd = CreateDialogParam(
- g_hInstance,
- MAKEINTRESOURCE(IDD_VERIFY),
- 0,
- verProc,
- (LPARAM)_LANG_VERIFYINGINST
- );
- }
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
-
-#ifndef NSIS_CONFIG_CRC_ANAL
- if (left < m_length)
-#endif//NSIS_CONFIG_CRC_ANAL
- crc = CRC32(crc, temp, l);
-
-#endif//NSIS_CONFIG_CRC_SUPPORT
- m_pos += l;
- left -= l;
- }
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- if (hwnd)
- {
- DestroyWindow(hwnd);
- }
-#endif//NSIS_CONFIG_CRC_SUPPORT
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- if (!g_filehdrsize)
- return _LANG_INVALIDCRC;
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- if (do_crc)
- {
- crc32_t fcrc;
- SetSelfFilePointer(m_pos);
- if (!ReadSelfFile(&fcrc, sizeof(crc32_t)) || crc != fcrc)
- return _LANG_INVALIDCRC;
- }
-#endif//NSIS_CONFIG_CRC_SUPPORT
-
- data = (void *)GlobalAlloc(GPTR,h.length_of_header);
-
-#ifdef NSIS_COMPRESS_WHOLE
- inflateReset(&g_inflate_stream);
-
- {
- char fno[MAX_PATH];
- my_GetTempFileName(fno, state_temp_dir);
- dbd_hFile=CreateFile(fno,GENERIC_WRITE|GENERIC_READ,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE,NULL);
- if (dbd_hFile == INVALID_HANDLE_VALUE)
- return _LANG_ERRORWRITINGTEMP;
- }
- dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((h.flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(crc32_t));
-#else
- dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data;
-#endif//NSIS_CONFIG_CRC_SUPPORT
-#else
- SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
-#endif//NSIS_COMPRESS_WHOLE
-
- if (GetCompressedDataFromDataBlockToMemory(-1, data, h.length_of_header) != h.length_of_header)
- {
- return _LANG_INVALIDCRC;
- }
-
- header = g_header = data;
-
- g_flags = header->flags;
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (h.flags & FH_FLAGS_UNINSTALL)
- g_is_uninstaller++;
-#endif
-
- // set offsets to real memory offsets rather than installer's header offset
- left = BLOCKS_NUM;
- while (left--)
- header->blocks[left].offset += (int)data;
-
-#ifdef NSIS_COMPRESS_WHOLE
- header->blocks[NB_DATA].offset = dbd_pos;
-#else
- header->blocks[NB_DATA].offset = SetFilePointer(db_hFile,0,NULL,FILE_CURRENT);
-#endif
-
- mini_memcpy(&g_blocks, &header->blocks, sizeof(g_blocks));
-
- return 0;
-}
-
-#define IBUFSIZE 16384
-#define OBUFSIZE 32768
-
-// returns -3 if compression error/eof/etc
-
-#if !defined(NSIS_COMPRESS_WHOLE) || !defined(NSIS_CONFIG_COMPRESSION_SUPPORT)
-
-int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
-{
- static char inbuffer[IBUFSIZE+OBUFSIZE];
- char *outbuffer;
- int outbuffer_len=outbuf?outbuflen:OBUFSIZE;
- int retval=0;
- int input_len;
-
- outbuffer = outbuf?outbuf:(inbuffer+IBUFSIZE);
-
- if (offset>=0)
- {
- SetSelfFilePointer(g_blocks[NB_DATA].offset+offset);
- }
-
- if (!ReadSelfFile((LPVOID)&input_len,sizeof(int))) return -3;
-
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- if (input_len & 0x80000000) // compressed
- {
- char progress[64];
- int input_len_total;
- DWORD ltc = GetTickCount(), tc;
-
- inflateReset(&g_inflate_stream);
- input_len_total = input_len &= 0x7fffffff; // take off top bit.
-
- while (input_len > 0)
- {
- int l=min(input_len,IBUFSIZE);
- int err;
-
- if (!ReadSelfFile((LPVOID)inbuffer,l))
- return -3;
-
- g_inflate_stream.next_in = inbuffer;
- g_inflate_stream.avail_in = l;
- input_len-=l;
-
- for (;;)
- {
- int u;
-
- g_inflate_stream.next_out = outbuffer;
- g_inflate_stream.avail_out = (unsigned int)outbuffer_len;
-
- err=inflate(&g_inflate_stream);
-
- if (err<0) return -4;
-
- u=(char*)g_inflate_stream.next_out - outbuffer;
-
- tc = GetTickCount();
- if (g_exec_flags.status_update & 1 && (tc - ltc > 200 || !input_len))
- {
- wsprintf(progress, "... %d%%", MulDiv(input_len_total - input_len, 100, input_len_total));
- update_status_text(0, progress);
- ltc = tc;
- }
-
- // if there's no output, more input is needed
- if (!u)
- break;
-
- if (!outbuf)
- {
- DWORD r;
- if (!WriteFile(hFileOut,outbuffer,u,&r,NULL) || (int)r != u) return -2;
- retval+=u;
- }
- else
- {
- retval+=u;
- outbuffer_len-=u;
- outbuffer=g_inflate_stream.next_out;
- if (outbuffer_len < 1) return retval;
- }
- if (err==Z_STREAM_END) return retval;
- }
- }
- }
- else
-#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
- {
- if (!outbuf)
- {
- while (input_len > 0)
- {
- DWORD l=min(input_len,outbuffer_len);
- DWORD t;
- if (!ReadSelfFile((LPVOID)inbuffer,l)) return -3;
- if (!WriteFile(hFileOut,inbuffer,l,&t,NULL) || l!=t) return -2;
- retval+=l;
- input_len-=l;
- }
- }
- else
- {
- int l=min(input_len,outbuflen);
- if (!ReadSelfFile((LPVOID)outbuf,l)) return -3;
- retval=l;
- }
- }
- return retval;
-}
-#else//NSIS_COMPRESS_WHOLE
-
-static char _inbuffer[IBUFSIZE];
-static char _outbuffer[OBUFSIZE];
-extern int m_length;
-extern int m_pos;
-extern BOOL CALLBACK verProc(HWND, UINT, WPARAM, LPARAM);
-extern BOOL CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
-static int NSISCALL __ensuredata(int amount)
-{
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- HWND hwnd=NULL;
- unsigned int verify_time=GetTickCount()+500;
-#endif
- int needed=amount-(dbd_size-dbd_pos);
- if (needed>0)
- {
- SetSelfFilePointer(dbd_srcpos);
- SetFilePointer(dbd_hFile,dbd_size,NULL,FILE_BEGIN);
- m_length=needed;
- m_pos=0;
- for (;;)
- {
- int err;
- int l=min(IBUFSIZE,dbd_fulllen-dbd_srcpos);
- if (!ReadSelfFile((LPVOID)_inbuffer,l)) return -1;
- dbd_srcpos+=l;
- g_inflate_stream.next_in=_inbuffer;
- g_inflate_stream.avail_in=l;
- do
- {
- DWORD r,t;
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- if (g_header)
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- if (!g_exec_flags.silent)
-#endif
- {
- if (hwnd)
- {
- m_pos=m_length-(amount-(dbd_size-dbd_pos));
- MessageLoop(0);
- }
- else if (GetTickCount() > verify_time)
- {
- hwnd = CreateDialogParam(
- g_hInstance,
- MAKEINTRESOURCE(IDD_VERIFY),
- 0,
- verProc,
- g_hwnd ? 0 : (LPARAM)_LANG_UNPACKING
- );
- }
- }
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- g_inflate_stream.next_out=_outbuffer;
- g_inflate_stream.avail_out=OBUFSIZE;
- err=inflate(&g_inflate_stream);
- if (err<0)
- {
- return -3;
- }
- r=(DWORD)g_inflate_stream.next_out-(DWORD)_outbuffer;
- if (r)
- {
- if (!WriteFile(dbd_hFile,_outbuffer,r,&t,NULL) || r != t)
- {
- return -2;
- }
- dbd_size+=r;
- }
- else if (g_inflate_stream.avail_in || !l) return -3;
- else break;
- }
- while (g_inflate_stream.avail_in);
- if (amount-(dbd_size-dbd_pos) <= 0) break;
- }
- SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
- }
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- if (hwnd)
- {
- m_pos=m_length;
- SendMessage(hwnd,WM_TIMER,0,0);
- DestroyWindow(hwnd);
- }
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- return 0;
-}
-
-
-int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
-{
- DWORD r;
- int input_len;
- int retval;
- if (offset>=0)
- {
- dbd_pos=g_blocks[NB_DATA].offset+offset;
- SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
- }
- retval=__ensuredata(sizeof(int));
- if (retval<0) return retval;
-
- if (!ReadFile(dbd_hFile,(LPVOID)&input_len,sizeof(int),&r,NULL) || r!=sizeof(int)) return -3;
- dbd_pos+=sizeof(int);
-
- retval=__ensuredata(input_len);
- if (retval < 0) return retval;
-
- if (!outbuf)
- {
- while (input_len > 0)
- {
- DWORD t;
- DWORD l=min(input_len,IBUFSIZE);
- if (!ReadFile(dbd_hFile,(LPVOID)_inbuffer,l,&r,NULL) || l != r) return -3;
- if (!WriteFile(hFileOut,_inbuffer,r,&t,NULL) || t != l) return -2;
- retval+=r;
- input_len-=r;
- dbd_pos+=r;
- }
- }
- else
- {
- if (!ReadFile(dbd_hFile,(LPVOID)outbuf,min(input_len,outbuflen),&r,NULL)) return -3;
- retval=r;
- dbd_pos+=r;
- }
- return retval;
-}
-#endif//NSIS_COMPRESS_WHOLE
-
-BOOL NSISCALL ReadSelfFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead)
-{
- DWORD rd;
- return ReadFile(g_db_hFile,lpBuffer,nNumberOfBytesToRead,&rd,NULL) && (rd == nNumberOfBytesToRead);
-}
-
-DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove)
-{
- return SetFilePointer(g_db_hFile,lDistanceToMove,NULL,FILE_BEGIN);
-}
+/*
+ * fileform.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+#include "fileform.h"
+#include "util.h"
+#include "state.h"
+#include "resource.h"
+#include "lang.h"
+#include "ui.h"
+#include "exec.h"
+#include "../crc32.h"
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+#ifdef NSIS_COMPRESS_USE_ZLIB
+#include "../zlib/ZLIB.H"
+#endif
+
+#ifdef NSIS_COMPRESS_USE_LZMA
+#include "../7zip/LZMADecode.h"
+#define z_stream lzma_stream
+#define inflateInit(x) lzmaInit(x)
+#define inflateReset(x) lzmaInit(x)
+#define inflate(x) lzmaDecode(x)
+#define Z_OK LZMA_OK
+#define Z_STREAM_END LZMA_STREAM_END
+#endif
+
+#ifdef NSIS_COMPRESS_USE_BZIP2
+#include "../bzip2/bzlib.h"
+
+#define z_stream DState
+#define inflateInit(x) BZ2_bzDecompressInit(x)
+#define inflateReset(x) BZ2_bzDecompressInit(x)
+
+#define inflate(x) BZ2_bzDecompress(x)
+#define Z_OK BZ_OK
+#define Z_STREAM_END BZ_STREAM_END
+#endif//NSIS_COMPRESS_USE_BZIP2
+#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
+
+struct block_header g_blocks[BLOCKS_NUM];
+header *g_header;
+int g_flags;
+int g_filehdrsize;
+int g_is_uninstaller;
+
+HANDLE g_db_hFile=INVALID_HANDLE_VALUE;
+
+#if defined(NSIS_CONFIG_COMPRESSION_SUPPORT) && defined(NSIS_COMPRESS_WHOLE)
+HANDLE dbd_hFile=INVALID_HANDLE_VALUE;
+static int dbd_size, dbd_pos, dbd_srcpos, dbd_fulllen;
+#endif//NSIS_COMPRESS_WHOLE
+
+static int m_length;
+static int m_pos;
+
+#define _calc_percent() (MulDiv(min(m_pos,m_length),100,m_length))
+#ifdef NSIS_COMPRESS_WHOLE
+static int NSISCALL calc_percent()
+{
+ return _calc_percent();
+}
+#else
+#define calc_percent() _calc_percent()
+#endif
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_COMPRESS_WHOLE)
+BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ if (uMsg == WM_INITDIALOG)
+ {
+ SetTimer(hwndDlg,1,250,NULL);
+ uMsg = WM_TIMER;
+ }
+ if (uMsg == WM_TIMER)
+ {
+ char bt[64];
+ int percent=calc_percent();
+#ifdef NSIS_COMPRESS_WHOLE
+ char *msg=g_header?_LANG_UNPACKING:_LANG_VERIFYINGINST;
+#else
+ char *msg=_LANG_VERIFYINGINST;
+#endif
+
+ wsprintf(bt,msg,percent);
+
+ my_SetWindowText(hwndDlg,bt);
+ my_SetDialogItemText(hwndDlg,IDC_STR,bt);
+ }
+ return 0;
+}
+
+DWORD verify_time;
+
+void handle_ver_dlg(BOOL kill)
+{
+ static HWND hwnd;
+
+ if (kill)
+ {
+ if (hwnd) DestroyWindow(hwnd);
+ hwnd = NULL;
+
+ return;
+ }
+
+ if (hwnd)
+ {
+ MessageLoop(0);
+ }
+ else if (GetTickCount() > verify_time)
+ {
+#ifdef NSIS_COMPRESS_WHOLE
+ if (g_hwnd)
+ {
+ if (g_exec_flags.status_update & 1)
+ {
+ char bt[64];
+ wsprintf(bt, "... %d%%", calc_percent());
+ update_status_text(0, bt);
+ }
+ }
+ else
+#endif
+ {
+ hwnd = CreateDialog(
+ g_hInstance,
+ MAKEINTRESOURCE(IDD_VERIFY),
+ 0,
+ verProc
+ );
+ }
+ }
+}
+#endif//NSIS_CONFIG_CRC_SUPPORT || NSIS_COMPRESS_WHOLE
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+static z_stream g_inflate_stream;
+#endif
+
+const char * NSISCALL loadHeaders(int cl_flags)
+{
+ int left;
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ crc32_t crc = 0;
+ int do_crc = 0;
+#endif//NSIS_CONFIG_CRC_SUPPORT
+
+ void *data;
+ firstheader h;
+ header *header;
+
+ HANDLE db_hFile;
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ verify_time = GetTickCount() + 1000;
+#endif
+#endif//NSIS_CONFIG_CRC_SUPPORT
+
+ GetModuleFileName(NULL, state_exe_path, NSIS_MAX_STRLEN);
+
+ g_db_hFile = db_hFile = myOpenFile(state_exe_path, GENERIC_READ, OPEN_EXISTING);
+ if (db_hFile == INVALID_HANDLE_VALUE)
+ {
+ return _LANG_CANTOPENSELF;
+ }
+
+ mystrcpy(state_exe_directory, state_exe_path);
+ mystrcpy(state_exe_file, trimslashtoend(state_exe_directory));
+
+ left = m_length = GetFileSize(db_hFile,NULL);
+ while (left > 0)
+ {
+ static char temp[32768];
+ DWORD l = min(left, (g_filehdrsize ? 32768 : 512));
+ if (!ReadSelfFile(temp, l))
+ {
+#if defined(NSIS_CONFIG_CRC_SUPPORT) && defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+ handle_ver_dlg(TRUE);
+#endif//NSIS_CONFIG_CRC_SUPPORT
+ return _LANG_INVALIDCRC;
+ }
+
+ if (!g_filehdrsize)
+ {
+ mini_memcpy(&h, temp, sizeof(firstheader));
+ if (
+ (h.flags & (~FH_FLAGS_MASK)) == 0 &&
+ h.siginfo == FH_SIG &&
+ h.nsinst[2] == FH_INT3 &&
+ h.nsinst[1] == FH_INT2 &&
+ h.nsinst[0] == FH_INT1
+ )
+ {
+ g_filehdrsize = m_pos;
+
+#if defined(NSIS_CONFIG_CRC_SUPPORT) || defined(NSIS_CONFIG_SILENT_SUPPORT)
+ cl_flags |= h.flags;
+#endif
+
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ g_exec_flags.silent |= cl_flags & FH_FLAGS_SILENT;
+#endif
+
+ if (h.length_of_all_following_data > left)
+ return _LANG_INVALIDCRC;
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ if ((cl_flags & FH_FLAGS_FORCE_CRC) == 0)
+ {
+ if (cl_flags & FH_FLAGS_NO_CRC)
+ break;
+ }
+
+ do_crc++;
+
+#ifndef NSIS_CONFIG_CRC_ANAL
+ left = h.length_of_all_following_data - 4;
+ // end crc checking at crc :) this means you can tack shit on the end and it'll still work.
+#else //!NSIS_CONFIG_CRC_ANAL
+ left -= 4;
+#endif//NSIS_CONFIG_CRC_ANAL
+ // this is in case the end part is < 512 bytes.
+ if (l > (DWORD)left) l=(DWORD)left;
+
+#else//!NSIS_CONFIG_CRC_SUPPORT
+ // no crc support, no need to keep on reading
+ break;
+#endif//!NSIS_CONFIG_CRC_SUPPORT
+ }
+ }
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ else if ((cl_flags & FH_FLAGS_SILENT) == 0)
+#endif//NSIS_CONFIG_SILENT_SUPPORT
+ {
+ handle_ver_dlg(FALSE);
+ }
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+
+#ifndef NSIS_CONFIG_CRC_ANAL
+ if (left < m_length)
+#endif//NSIS_CONFIG_CRC_ANAL
+ crc = CRC32(crc, temp, l);
+
+#endif//NSIS_CONFIG_CRC_SUPPORT
+ m_pos += l;
+ left -= l;
+ }
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ handle_ver_dlg(TRUE);
+#endif//NSIS_CONFIG_CRC_SUPPORT
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ if (!g_filehdrsize)
+ return _LANG_INVALIDCRC;
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ if (do_crc)
+ {
+ crc32_t fcrc;
+ SetSelfFilePointer(m_pos);
+ if (!ReadSelfFile(&fcrc, sizeof(crc32_t)) || crc != fcrc)
+ return _LANG_INVALIDCRC;
+ }
+#endif//NSIS_CONFIG_CRC_SUPPORT
+
+ data = (void *)GlobalAlloc(GPTR,h.length_of_header);
+
+#ifdef NSIS_COMPRESS_WHOLE
+ inflateReset(&g_inflate_stream);
+
+ {
+ char fno[MAX_PATH];
+ my_GetTempFileName(fno, state_temp_dir);
+ dbd_hFile=CreateFile(fno,GENERIC_WRITE|GENERIC_READ,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE,NULL);
+ if (dbd_hFile == INVALID_HANDLE_VALUE)
+ return _LANG_ERRORWRITINGTEMP;
+ }
+ dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((h.flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(crc32_t));
+#else
+ dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data;
+#endif//NSIS_CONFIG_CRC_SUPPORT
+#else
+ SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
+#endif//NSIS_COMPRESS_WHOLE
+
+ if (GetCompressedDataFromDataBlockToMemory(-1, data, h.length_of_header) != h.length_of_header)
+ {
+ return _LANG_INVALIDCRC;
+ }
+
+ header = g_header = data;
+
+ g_flags = header->flags;
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (h.flags & FH_FLAGS_UNINSTALL)
+ g_is_uninstaller++;
+#endif
+
+ // set offsets to real memory offsets rather than installer's header offset
+ left = BLOCKS_NUM;
+ while (left--)
+ header->blocks[left].offset += (int)data;
+
+#ifdef NSIS_COMPRESS_WHOLE
+ header->blocks[NB_DATA].offset = dbd_pos;
+#else
+ header->blocks[NB_DATA].offset = SetFilePointer(db_hFile,0,NULL,FILE_CURRENT);
+#endif
+
+ mini_memcpy(&g_blocks, &header->blocks, sizeof(g_blocks));
+
+ return 0;
+}
+
+#define IBUFSIZE 16384
+#define OBUFSIZE 32768
+
+// returns -3 if compression error/eof/etc
+
+#if !defined(NSIS_COMPRESS_WHOLE) || !defined(NSIS_CONFIG_COMPRESSION_SUPPORT)
+
+int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
+{
+ static char inbuffer[IBUFSIZE+OBUFSIZE];
+ char *outbuffer;
+ int outbuffer_len=outbuf?outbuflen:OBUFSIZE;
+ int retval=0;
+ int input_len;
+
+ outbuffer = outbuf?outbuf:(inbuffer+IBUFSIZE);
+
+ if (offset>=0)
+ {
+ SetSelfFilePointer(g_blocks[NB_DATA].offset+offset);
+ }
+
+ if (!ReadSelfFile((LPVOID)&input_len,sizeof(int))) return -3;
+
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ if (input_len & 0x80000000) // compressed
+ {
+ char progress[64];
+ int input_len_total;
+ DWORD ltc = GetTickCount(), tc;
+
+ inflateReset(&g_inflate_stream);
+ input_len_total = input_len &= 0x7fffffff; // take off top bit.
+
+ while (input_len > 0)
+ {
+ int l=min(input_len,IBUFSIZE);
+ int err;
+
+ if (!ReadSelfFile((LPVOID)inbuffer,l))
+ return -3;
+
+ g_inflate_stream.next_in = inbuffer;
+ g_inflate_stream.avail_in = l;
+ input_len-=l;
+
+ for (;;)
+ {
+ int u;
+
+ g_inflate_stream.next_out = outbuffer;
+ g_inflate_stream.avail_out = (unsigned int)outbuffer_len;
+
+ err=inflate(&g_inflate_stream);
+
+ if (err<0) return -4;
+
+ u=(char*)g_inflate_stream.next_out - outbuffer;
+
+ tc = GetTickCount();
+ if (g_exec_flags.status_update & 1 && (tc - ltc > 200 || !input_len))
+ {
+ wsprintf(progress, "... %d%%", MulDiv(input_len_total - input_len, 100, input_len_total));
+ update_status_text(0, progress);
+ ltc = tc;
+ }
+
+ // if there's no output, more input is needed
+ if (!u)
+ break;
+
+ if (!outbuf)
+ {
+ DWORD r;
+ if (!WriteFile(hFileOut,outbuffer,u,&r,NULL) || (int)r != u) return -2;
+ retval+=u;
+ }
+ else
+ {
+ retval+=u;
+ outbuffer_len-=u;
+ outbuffer=g_inflate_stream.next_out;
+ if (outbuffer_len < 1) return retval;
+ }
+ if (err==Z_STREAM_END) return retval;
+ }
+ }
+ }
+ else
+#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
+ {
+ if (!outbuf)
+ {
+ while (input_len > 0)
+ {
+ DWORD l=min(input_len,outbuffer_len);
+ DWORD t;
+ if (!ReadSelfFile((LPVOID)inbuffer,l)) return -3;
+ if (!WriteFile(hFileOut,inbuffer,l,&t,NULL) || l!=t) return -2;
+ retval+=l;
+ input_len-=l;
+ }
+ }
+ else
+ {
+ int l=min(input_len,outbuflen);
+ if (!ReadSelfFile((LPVOID)outbuf,l)) return -3;
+ retval=l;
+ }
+ }
+ return retval;
+}
+#else//NSIS_COMPRESS_WHOLE
+
+static char _inbuffer[IBUFSIZE];
+static char _outbuffer[OBUFSIZE];
+extern int m_length;
+extern int m_pos;
+extern BOOL CALLBACK verProc(HWND, UINT, WPARAM, LPARAM);
+extern BOOL CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM);
+static int NSISCALL __ensuredata(int amount)
+{
+ int needed=amount-(dbd_size-dbd_pos);
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ verify_time=GetTickCount()+500;
+#endif
+ if (needed>0)
+ {
+ SetSelfFilePointer(dbd_srcpos);
+ SetFilePointer(dbd_hFile,dbd_size,NULL,FILE_BEGIN);
+ m_length=needed;
+ m_pos=0;
+ for (;;)
+ {
+ int err;
+ int l=min(IBUFSIZE,dbd_fulllen-dbd_srcpos);
+ if (!ReadSelfFile((LPVOID)_inbuffer,l)) return -1;
+ dbd_srcpos+=l;
+ g_inflate_stream.next_in=_inbuffer;
+ g_inflate_stream.avail_in=l;
+ do
+ {
+ DWORD r,t;
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ if (g_header)
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ if (!g_exec_flags.silent)
+#endif
+ {
+ m_pos=m_length-(amount-(dbd_size-dbd_pos));
+
+ handle_ver_dlg(FALSE);
+ }
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ g_inflate_stream.next_out=_outbuffer;
+ g_inflate_stream.avail_out=OBUFSIZE;
+ err=inflate(&g_inflate_stream);
+ if (err<0)
+ {
+ return -3;
+ }
+ r=(DWORD)g_inflate_stream.next_out-(DWORD)_outbuffer;
+ if (r)
+ {
+ if (!WriteFile(dbd_hFile,_outbuffer,r,&t,NULL) || r != t)
+ {
+ return -2;
+ }
+ dbd_size+=r;
+ }
+ else if (g_inflate_stream.avail_in || !l) return -3;
+ else break;
+ }
+ while (g_inflate_stream.avail_in);
+ if (amount-(dbd_size-dbd_pos) <= 0) break;
+ }
+ SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
+ }
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ handle_ver_dlg(TRUE);
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ return 0;
+}
+
+
+int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
+{
+ DWORD r;
+ int input_len;
+ int retval;
+ if (offset>=0)
+ {
+ dbd_pos=g_blocks[NB_DATA].offset+offset;
+ SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
+ }
+ retval=__ensuredata(sizeof(int));
+ if (retval<0) return retval;
+
+ if (!ReadFile(dbd_hFile,(LPVOID)&input_len,sizeof(int),&r,NULL) || r!=sizeof(int)) return -3;
+ dbd_pos+=sizeof(int);
+
+ retval=__ensuredata(input_len);
+ if (retval < 0) return retval;
+
+ if (!outbuf)
+ {
+ while (input_len > 0)
+ {
+ DWORD t;
+ DWORD l=min(input_len,IBUFSIZE);
+ if (!ReadFile(dbd_hFile,(LPVOID)_inbuffer,l,&r,NULL) || l != r) return -3;
+ if (!WriteFile(hFileOut,_inbuffer,r,&t,NULL) || t != l) return -2;
+ retval+=r;
+ input_len-=r;
+ dbd_pos+=r;
+ }
+ }
+ else
+ {
+ if (!ReadFile(dbd_hFile,(LPVOID)outbuf,min(input_len,outbuflen),&r,NULL)) return -3;
+ retval=r;
+ dbd_pos+=r;
+ }
+ return retval;
+}
+#endif//NSIS_COMPRESS_WHOLE
+
+BOOL NSISCALL ReadSelfFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead)
+{
+ DWORD rd;
+ return ReadFile(g_db_hFile,lpBuffer,nNumberOfBytesToRead,&rd,NULL) && (rd == nNumberOfBytesToRead);
+}
+
+DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove)
+{
+ return SetFilePointer(g_db_hFile,lDistanceToMove,NULL,FILE_BEGIN);
+}
diff --git a/Source/exehead/fileform.h b/Source/exehead/fileform.h
index 982be84..66391f9 100755
--- a/Source/exehead/fileform.h
+++ b/Source/exehead/fileform.h
@@ -1,553 +1,553 @@
-/*
- * fileform.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "config.h"
-#include "../Platform.h"
-
-#ifndef _FILEFORM_H_
-#define _FILEFORM_H_
-
-
-// * the installer is compsed of the following parts:
-// exehead (~34kb)
-// firstheader (struct firstheader)
-// * headers (compressed together):
-// header (struct header)
-// * nsis blocks (described in header->blocks)
-// pages (struct page)
-// section headers (struct section)
-// entries/instructions (struct entry)
-// strings (null seperated)
-// language tables (language id, dialog offset, language strings)
-// colors (struct color)
-// data block (files and uninstaller data)
-// * not compressed
-// CRC (optional - 4 bytes)
-//
-// headers + datablock is at least 512 bytes if CRC enabled
-
-
-#define MAX_ENTRY_OFFSETS 6
-
-
-// if you want people to not be able to decompile your installers as easily,
-// reorder the lines following EW_INVALID_OPCODE randomly.
-
-enum
-{
- EW_INVALID_OPCODE, // zero is invalid. useful for catching errors. (otherwise an all zeroes instruction
- // does nothing, which is easily ignored but means something is wrong.
- EW_RET, // return from function call
- EW_NOP, // Nop/Jump, do nothing: 1, [?new address+1:advance one]
- EW_ABORT, // Abort: 1 [status]
- EW_QUIT, // Quit: 0
- EW_CALL, // Call: 1 [new address+1]
- EW_UPDATETEXT, // Update status text: 2 [update str, ui_st_updateflag=?ui_st_updateflag:this]
- EW_SLEEP, // Sleep: 1 [sleep time in milliseconds]
- EW_BRINGTOFRONT, // BringToFront: 0
- EW_CHDETAILSVIEW, // SetDetailsView: 2 [listaction,buttonaction]
- EW_SETFILEATTRIBUTES, // SetFileAttributes: 2 [filename, attributes]
- EW_CREATEDIR, // Create directory: 2, [path, ?update$INSTDIR]
- EW_IFFILEEXISTS, // IfFileExists: 3, [file name, jump amount if exists, jump amount if not exists]
- EW_SETFLAG, // Sets a flag: 2 [id, data]
- EW_IFFLAG, // If a flag: 4 [on, off, id, new value mask]
- EW_GETFLAG, // Gets a flag: 2 [output, id]
-#ifdef NSIS_SUPPORT_RENAME
- EW_RENAME, // Rename: 3 [old, new, rebootok]
-#endif
-#ifdef NSIS_SUPPORT_FNUTIL
- EW_GETFULLPATHNAME, // GetFullPathName: 2 [output, input, ?lfn:sfn]
- EW_SEARCHPATH, // SearchPath: 2 [output, filename]
- EW_GETTEMPFILENAME, // GetTempFileName: 2 [output, base_dir]
-#endif
-#ifdef NSIS_SUPPORT_FILE
- EW_EXTRACTFILE, // File to extract: 6 [overwriteflag, output filename, compressed filedata, filedatetimelow, filedatetimehigh, allow ignore]
- // overwriteflag: 0x1 = no. 0x0=force, 0x2=try, 0x3=if date is newer
-#endif
-#ifdef NSIS_SUPPORT_DELETE
- EW_DELETEFILE, // Delete File: 2, [filename, rebootok]
-#endif
-#ifdef NSIS_SUPPORT_MESSAGEBOX
- EW_MESSAGEBOX, // MessageBox: 5,[MB_flags,text,retv1:retv2,moveonretv1:moveonretv2]
-#endif
-#ifdef NSIS_SUPPORT_RMDIR
- EW_RMDIR, // RMDir: 2 [path, recursiveflag]
-#endif
-#ifdef NSIS_SUPPORT_STROPTS
- EW_STRLEN, // StrLen: 2 [output, input]
- EW_ASSIGNVAR, // Assign: 4 [variable (0-9) to assign, string to assign, maxlen, startpos]
- EW_STRCMP, // StrCmp: 5 [str1, str2, jump_if_equal, jump_if_not_equal, case-sensitive?]
-#endif
-#ifdef NSIS_SUPPORT_ENVIRONMENT
- EW_READENVSTR, // ReadEnvStr/ExpandEnvStrings: 3 [output, string_with_env_variables, IsRead]
-#endif
-#ifdef NSIS_SUPPORT_INTOPTS
- EW_INTCMP, // IntCmp: 6 [val1, val2, equal, val1<val2, val1>val2, unsigned?]
- EW_INTOP, // IntOp: 4 [output, input1, input2, op] where op: 0=add, 1=sub, 2=mul, 3=div, 4=bor, 5=band, 6=bxor, 7=bnot input1, 8=lnot input1, 9=lor, 10=land], 11=1%2
- EW_INTFMT, // IntFmt: [output, format, input]
-#endif
-#ifdef NSIS_SUPPORT_STACK
- EW_PUSHPOP, // Push/Pop/Exchange: 3 [variable/string, ?pop:push, ?exch]
-#endif
-#ifdef NSIS_SUPPORT_HWNDS
- EW_FINDWINDOW, // FindWindow: 5, [outputvar, window class,window name, window_parent, window_after]
- EW_SENDMESSAGE, // SendMessage: 6 [output, hwnd, msg, wparam, lparam, [wparamstring?1:0 | lparamstring?2:0 | timeout<<2]
- EW_ISWINDOW, // IsWindow: 3 [hwnd, jump_if_window, jump_if_notwindow]
-#endif
-
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- EW_GETDLGITEM, // GetDlgItem: 3: [outputvar, dialog, item_id]
- EW_SETCTLCOLORS, // SerCtlColors: 3: [hwnd, pointer to struct colors]
- EW_SETBRANDINGIMAGE, // SetBrandingImage: 1: [Bitmap file]
- EW_CREATEFONT, // CreateFont: 5: [handle output, face name, height, weight, flags]
- EW_SHOWWINDOW, // ShowWindow: 2: [hwnd, show state]
-#endif
-
-#ifdef NSIS_SUPPORT_SHELLEXECUTE
- EW_SHELLEXEC, // ShellExecute program: 4, [shell action, complete commandline, parameters, showwindow]
-#endif
-
-#ifdef NSIS_SUPPORT_EXECUTE
- EW_EXECUTE, // Execute program: 3,[complete command line,waitflag,>=0?output errorcode]
-#endif
-
-#ifdef NSIS_SUPPORT_GETFILETIME
- EW_GETFILETIME, // GetFileTime; 3 [file highout lowout]
-#endif
-
-#ifdef NSIS_SUPPORT_GETDLLVERSION
- EW_GETDLLVERSION, // GetDLLVersion: 3 [file highout lowout]
-#endif
-
-#ifdef NSIS_SUPPORT_ACTIVEXREG
- EW_REGISTERDLL, // Register DLL: 3,[DLL file name, string ptr of function to call, text to put in display (<0 if none/pass parms), 1 - no unload, 0 - unload]
-#endif
-
-#ifdef NSIS_SUPPORT_CREATESHORTCUT
- EW_CREATESHORTCUT, // Make Shortcut: 5, [link file, target file, parameters, icon file, iconindex|show mode<<8|hotkey<<16]
-#endif
-
-#ifdef NSIS_SUPPORT_COPYFILES
- EW_COPYFILES, // CopyFiles: 3 [source mask, destination location, flags]
-#endif
-
-#ifdef NSIS_SUPPORT_REBOOT
- EW_REBOOT, // Reboot: 0
-#endif
-
-#ifdef NSIS_SUPPORT_INIFILES
- EW_WRITEINI, // Write INI String: 4, [Section, Name, Value, INI File]
- EW_READINISTR, // ReadINIStr: 4 [output, section, name, ini_file]
-#endif
-
-#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
- EW_DELREG, // DeleteRegValue/DeleteRegKey: 4, [root key(int), KeyName, ValueName, delkeyonlyifempty]. ValueName is -1 if delete key
- EW_WRITEREG, // Write Registry value: 5, [RootKey(int),KeyName,ItemName,ItemData,typelen]
- // typelen=1 for str, 2 for dword, 3 for binary, 0 for expanded str
- EW_READREGSTR, // ReadRegStr: 5 [output, rootkey(int), keyname, itemname, ==1?int::str]
- EW_REGENUM, // RegEnum: 5 [output, rootkey, keyname, index, ?key:value]
-#endif
-
-#ifdef NSIS_SUPPORT_FILEFUNCTIONS
- EW_FCLOSE, // FileClose: 1 [handle]
- EW_FOPEN, // FileOpen: 4 [name, openmode, createmode, outputhandle]
- EW_FPUTS, // FileWrite: 3 [handle, string, ?int:string]
- EW_FGETS, // FileRead: 4 [handle, output, maxlen, ?getchar:gets]
- EW_FSEEK, // FileSeek: 4 [handle, offset, mode, >=0?positionoutput]
-#endif//NSIS_SUPPORT_FILEFUNCTIONS
-
-#ifdef NSIS_SUPPORT_FINDFIRST
- EW_FINDCLOSE, // FindClose: 1 [handle]
- EW_FINDNEXT, // FindNext: 2 [output, handle]
- EW_FINDFIRST, // FindFirst: 2 [filespec, output, handleoutput]
-#endif
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- EW_WRITEUNINSTALLER, // WriteUninstaller: 3 [name, offset, icon_size]
-#endif
-
-#ifdef NSIS_CONFIG_LOG
- EW_LOG, // LogText: 2 [0, text] / LogSet: [1, logstate]
-#endif
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- EW_SECTIONSET, // SectionSetText: 3: [idx, 0, text]
- // SectionGetText: 3: [idx, 1, output]
- // SectionSetFlags: 3: [idx, 2, flags]
- // SectionGetFlags: 3: [idx, 3, output]
- EW_INSTTYPESET, // InstTypeSetFlags: 3: [idx, 0, flags]
- // InstTypeGetFlags: 3: [idx, 1, output]
-#endif
-
- // instructions not actually implemented in exehead, but used in compiler.
- EW_GETLABELADDR, // both of these get converted to EW_ASSIGNVAR
- EW_GETFUNCTIONADDR,
-
-#ifdef NSIS_LOCKWINDOW_SUPPORT
- EW_LOCKWINDOW,
-#endif
-};
-
-#define FH_FLAGS_MASK 15
-#define FH_FLAGS_UNINSTALL 1
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
-# define FH_FLAGS_SILENT 2
-#endif
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-# define FH_FLAGS_NO_CRC 4
-# define FH_FLAGS_FORCE_CRC 8
-#endif
-
-#define FH_SIG 0xDEADBEEF
-
-// neato surprise signature that goes in firstheader. :)
-#define FH_INT1 0x6C6C754E
-#define FH_INT2 0x74666F73
-#define FH_INT3 0x74736E49
-
-typedef struct
-{
- int flags; // FH_FLAGS_*
- int siginfo; // FH_SIG
-
- int nsinst[3]; // FH_INT1,FH_INT2,FH_INT3
-
- // these point to the header+sections+entries+stringtable in the datablock
- int length_of_header;
-
- // this specifies the length of all the data (including the firstheader and CRC)
- int length_of_all_following_data;
-} firstheader;
-
-// Flags for common_header.flags
-#define CH_FLAGS_DETAILS_SHOWDETAILS 1
-#define CH_FLAGS_DETAILS_NEVERSHOW 2
-#define CH_FLAGS_PROGRESS_COLORED 4
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- #define CH_FLAGS_SILENT 8
- #define CH_FLAGS_SILENT_LOG 16
-#endif
-#define CH_FLAGS_AUTO_CLOSE 32
-#define CH_FLAGS_DIR_NO_SHOW 64
-#define CH_FLAGS_NO_ROOT_DIR 128
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- #define CH_FLAGS_COMP_ONLY_ON_CUSTOM 256
- #define CH_FLAGS_NO_CUSTOM 512
-#endif
-
-// nsis blocks
-struct block_header {
- int offset;
- int num;
-};
-
-enum {
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- NB_PAGES,
-#endif
- NB_SECTIONS,
- NB_ENTRIES,
- NB_STRINGS,
- NB_LANGTABLES,
- NB_CTLCOLORS,
-#ifdef NSIS_SUPPORT_BGBG
- NB_BGFONT,
-#endif
- NB_DATA,
-
- BLOCKS_NUM
-};
-
-// nsis strings
-
-typedef char NSIS_STRING[NSIS_MAX_STRLEN];
-
-// Settings common to both installers and uninstallers
-typedef struct
-{
- int flags; // CH_FLAGS_*
- struct block_header blocks[BLOCKS_NUM];
-
- // InstallDirRegKey stuff
- int install_reg_rootkey;
- // these two are not processed!
- int install_reg_key_ptr, install_reg_value_ptr;
-
-#ifdef NSIS_SUPPORT_BGBG
- int bg_color1, bg_color2, bg_textcolor;
-#endif
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- // installation log window colors
- int lb_bg, lb_fg;
-#endif
-
- // langtable size
- int langtable_size;
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
- // license background color
- int license_bg;
-#endif//NSIS_CONFIG_LICENSEPAGE
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- // .on* calls
- int code_onInit;
- int code_onInstSuccess;
- int code_onInstFailed;
- int code_onUserAbort;
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- int code_onGUIInit;
- int code_onGUIEnd;
- int code_onMouseOverSection;
-#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
- int code_onVerifyInstDir;
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- int code_onSelChange;
-#endif//NSIS_CONFIG_COMPONENTPAGE
-#ifdef NSIS_SUPPORT_REBOOT
- int code_onRebootFailed;
-#endif//NSIS_SUPPORT_REBOOT
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- int install_types[NSIS_MAX_INST_TYPES+1];
-#endif
-
- int install_directory_ptr; // default install dir.
- int install_directory_auto_append; // auto append part
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- int str_uninstchild;
- int str_uninstcmd;
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- int str_wininit;
-#endif//NSIS_SUPPORT_MOVEONREBOOT
-} header;
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
-// callback indices
-enum
-{
- CB_ONINIT,
- CB_ONINSTSUCCESS,
- CB_ONINSTFAILED,
- CB_ONUSERABORT,
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- CB_ONGUIINIT,
- CB_ONGUIEND,
- CB_ONMOUSEOVERSECTION,
-#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
- CB_ONVERIFYINSTDIR,
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- CB_ONSELCHANGE,
-#endif//NSIS_CONFIG_COMPONENTPAGE
-#ifdef NSIS_SUPPORT_REBOOT
- CB_ONREBOOTFAILED
-#endif//NSIS_SUPPORT_REBOOT
-};
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
-// used for section->flags
-#define SF_SELECTED 1
-#define SF_SECGRP 2
-#define SF_SECGRPEND 4
-#define SF_BOLD 8
-#define SF_RO 16
-#define SF_EXPAND 32
-#define SF_PSELECTED 64
-#define SF_TOGGLED 128
-#define SF_NAMECHG 256
-
-typedef struct
-{
- int name_ptr; // initial name pointer
- int install_types; // bits set for each of the different install_types, if any.
- int flags; // SF_* - defined above
- int code;
- int code_size;
- int size_kb;
- char name[NSIS_MAX_STRLEN]; // '' for invisible sections
-} section;
-
-#define SECTION_OFFSET(field) (FIELD_OFFSET(section, field)/sizeof(int))
-
-typedef struct
-{
- int which;
- int offsets[MAX_ENTRY_OFFSETS]; // count and meaning of offsets depend on 'which'
-} entry;
-
-// page window proc
-enum
-{
-#ifdef NSIS_CONFIG_LICENSEPAGE
- PWP_LICENSE,
-#endif
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- PWP_SELCOM,
-#endif
- PWP_DIR,
- PWP_INSTFILES,
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- PWP_UNINST,
-#endif
- PWP_COMPLETED,
- PWP_CUSTOM
-};
-
-// page flags
-#define PF_BACK_ENABLE 256
-#define PF_NEXT_ENABLE 2
-#define PF_CANCEL_ENABLE 4
-#define PF_BACK_SHOW 8 // must be SW_SHOWNA, don't change
-#define PF_LICENSE_STREAM 16
-#define PF_LICENSE_FORCE_SELECTION 32
-#define PF_LICENSE_NO_FORCE_SELECTION 64
-#define PF_LICENSE_SELECTED 1 // must be 1
-#define PF_NO_NEXT_FOCUS 128
-#define PF_PAGE_EX 512
-#define PF_DIR_NO_BTN_DISABLE 1024
-
-typedef struct
-{
- int dlg_id; // dialog resource id
- int wndproc_id;
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- // called before the page is created, or if custom to show the page
- // use Abort to skip the page
- int prefunc;
- // called right before page is shown
- int showfunc;
- // called when the user leaves to the next page
- // use Abort to force the user to stay on this page
- int leavefunc;
-#endif //NSIS_SUPPORT_CODECALLBACKS
-
- int flags;
-
- int caption;
- int back;
- int next;
- int clicknext;
- int cancel;
-
- int parms[5];
-} page;
-
-// text/bg color
-#define CC_TEXT 1
-#define CC_TEXT_SYS 2
-#define CC_BK 4
-#define CC_BK_SYS 8
-#define CC_BKB 16
-
-typedef struct {
- COLORREF text;
- COLORREF bkc;
- UINT lbStyle;
- HBRUSH bkb;
- int bkmode;
- int flags;
-} ctlcolors;
-
-// constants for myDelete (util.c)
-#define DEL_DIR 1
-#define DEL_RECURSE 2
-#define DEL_REBOOT 4
-#define DEL_SIMPLE 8
-
-// $0..$9, $INSTDIR, etc are encoded as ASCII bytes starting from this value.
-// Added by ramon 3 jun 2003
-#define NS_SKIP_CODE 252
-#define NS_VAR_CODE 253
-#define NS_SHELL_CODE 254
-#define NS_LANG_CODE 255
-#define NS_CODES_START NS_SKIP_CODE
-
-#define CODE_SHORT(x) (WORD)((((WORD)x & 0x7F) | (((WORD)x & 0x3F80) << 1) | 0x8080))
-#define MAX_CODED 16383
-
-#define NSIS_INSTDIR_INVALID 1
-#define NSIS_INSTDIR_NOT_ENOUGH_SPACE 2
-
-typedef struct
-{
- int autoclose;
- int all_user_var;
- int exec_error;
- int abort;
-#ifdef NSIS_SUPPORT_REBOOT
- int exec_reboot;
- int reboot_called;
-#else
- int _;
- int __;
-#endif
- int XXX_cur_insttype; // depreacted
- int XXX_insttype_changed; // deprecated
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- int silent;
-#else
- int ___;
-#endif
- int instdir_error;
- int rtl;
- int errlvl;
- int alter_reg_view;
- int status_update;
-} exec_flags;
-
-#define FIELDN(x, y) (((int *)&x)[y])
-
-#ifdef EXEHEAD
-
-// the following are only used/implemented in exehead, not makensis.
-
-int NSISCALL isheader(firstheader *h); // returns 0 on not header, length_of_datablock on success
-
-// returns nonzero on error
-// returns 0 on success
-// on success, m_header will be set to a pointer that should eventually be GlobalFree()'d.
-// (or m_uninstheader)
-const char * NSISCALL loadHeaders(int cl_flags);
-
-int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen);
-
-#define GetCompressedDataFromDataBlock(offset, hFileOut) _dodecomp(offset,hFileOut,NULL,0)
-#define GetCompressedDataFromDataBlockToMemory(offset, out, out_len) _dodecomp(offset,NULL,out,out_len)
-
-extern HANDLE g_db_hFile;
-extern int g_quit_flag;
-
-BOOL NSISCALL ReadSelfFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead);
-DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove);
-
-extern struct block_header g_blocks[BLOCKS_NUM];
-extern header *g_header;
-extern int g_flags;
-extern int g_filehdrsize;
-extern int g_is_uninstaller;
-
-#define g_pages ((page*)g_blocks[NB_PAGES].offset)
-#define g_sections ((section*)g_blocks[NB_SECTIONS].offset)
-#define num_sections (g_blocks[NB_SECTIONS].num)
-#define g_entries ((entry*)g_blocks[NB_ENTRIES].offset)
-#endif
-
-#endif //_FILEFORM_H_
+/*
+ * fileform.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "config.h"
+#include "../Platform.h"
+
+#ifndef _FILEFORM_H_
+#define _FILEFORM_H_
+
+
+// * the installer is compsed of the following parts:
+// exehead (~34kb)
+// firstheader (struct firstheader)
+// * headers (compressed together):
+// header (struct header)
+// * nsis blocks (described in header->blocks)
+// pages (struct page)
+// section headers (struct section)
+// entries/instructions (struct entry)
+// strings (null seperated)
+// language tables (language id, dialog offset, language strings)
+// colors (struct color)
+// data block (files and uninstaller data)
+// * not compressed
+// CRC (optional - 4 bytes)
+//
+// headers + datablock is at least 512 bytes if CRC enabled
+
+
+#define MAX_ENTRY_OFFSETS 6
+
+
+// if you want people to not be able to decompile your installers as easily,
+// reorder the lines following EW_INVALID_OPCODE randomly.
+
+enum
+{
+ EW_INVALID_OPCODE, // zero is invalid. useful for catching errors. (otherwise an all zeroes instruction
+ // does nothing, which is easily ignored but means something is wrong.
+ EW_RET, // return from function call
+ EW_NOP, // Nop/Jump, do nothing: 1, [?new address+1:advance one]
+ EW_ABORT, // Abort: 1 [status]
+ EW_QUIT, // Quit: 0
+ EW_CALL, // Call: 1 [new address+1]
+ EW_UPDATETEXT, // Update status text: 2 [update str, ui_st_updateflag=?ui_st_updateflag:this]
+ EW_SLEEP, // Sleep: 1 [sleep time in milliseconds]
+ EW_BRINGTOFRONT, // BringToFront: 0
+ EW_CHDETAILSVIEW, // SetDetailsView: 2 [listaction,buttonaction]
+ EW_SETFILEATTRIBUTES, // SetFileAttributes: 2 [filename, attributes]
+ EW_CREATEDIR, // Create directory: 2, [path, ?update$INSTDIR]
+ EW_IFFILEEXISTS, // IfFileExists: 3, [file name, jump amount if exists, jump amount if not exists]
+ EW_SETFLAG, // Sets a flag: 2 [id, data]
+ EW_IFFLAG, // If a flag: 4 [on, off, id, new value mask]
+ EW_GETFLAG, // Gets a flag: 2 [output, id]
+#ifdef NSIS_SUPPORT_RENAME
+ EW_RENAME, // Rename: 3 [old, new, rebootok]
+#endif
+#ifdef NSIS_SUPPORT_FNUTIL
+ EW_GETFULLPATHNAME, // GetFullPathName: 2 [output, input, ?lfn:sfn]
+ EW_SEARCHPATH, // SearchPath: 2 [output, filename]
+ EW_GETTEMPFILENAME, // GetTempFileName: 2 [output, base_dir]
+#endif
+#ifdef NSIS_SUPPORT_FILE
+ EW_EXTRACTFILE, // File to extract: 6 [overwriteflag, output filename, compressed filedata, filedatetimelow, filedatetimehigh, allow ignore]
+ // overwriteflag: 0x1 = no. 0x0=force, 0x2=try, 0x3=if date is newer
+#endif
+#ifdef NSIS_SUPPORT_DELETE
+ EW_DELETEFILE, // Delete File: 2, [filename, rebootok]
+#endif
+#ifdef NSIS_SUPPORT_MESSAGEBOX
+ EW_MESSAGEBOX, // MessageBox: 5,[MB_flags,text,retv1:retv2,moveonretv1:moveonretv2]
+#endif
+#ifdef NSIS_SUPPORT_RMDIR
+ EW_RMDIR, // RMDir: 2 [path, recursiveflag]
+#endif
+#ifdef NSIS_SUPPORT_STROPTS
+ EW_STRLEN, // StrLen: 2 [output, input]
+ EW_ASSIGNVAR, // Assign: 4 [variable (0-9) to assign, string to assign, maxlen, startpos]
+ EW_STRCMP, // StrCmp: 5 [str1, str2, jump_if_equal, jump_if_not_equal, case-sensitive?]
+#endif
+#ifdef NSIS_SUPPORT_ENVIRONMENT
+ EW_READENVSTR, // ReadEnvStr/ExpandEnvStrings: 3 [output, string_with_env_variables, IsRead]
+#endif
+#ifdef NSIS_SUPPORT_INTOPTS
+ EW_INTCMP, // IntCmp: 6 [val1, val2, equal, val1<val2, val1>val2, unsigned?]
+ EW_INTOP, // IntOp: 4 [output, input1, input2, op] where op: 0=add, 1=sub, 2=mul, 3=div, 4=bor, 5=band, 6=bxor, 7=bnot input1, 8=lnot input1, 9=lor, 10=land], 11=1%2
+ EW_INTFMT, // IntFmt: [output, format, input]
+#endif
+#ifdef NSIS_SUPPORT_STACK
+ EW_PUSHPOP, // Push/Pop/Exchange: 3 [variable/string, ?pop:push, ?exch]
+#endif
+#ifdef NSIS_SUPPORT_HWNDS
+ EW_FINDWINDOW, // FindWindow: 5, [outputvar, window class,window name, window_parent, window_after]
+ EW_SENDMESSAGE, // SendMessage: 6 [output, hwnd, msg, wparam, lparam, [wparamstring?1:0 | lparamstring?2:0 | timeout<<2]
+ EW_ISWINDOW, // IsWindow: 3 [hwnd, jump_if_window, jump_if_notwindow]
+#endif
+
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ EW_GETDLGITEM, // GetDlgItem: 3: [outputvar, dialog, item_id]
+ EW_SETCTLCOLORS, // SerCtlColors: 3: [hwnd, pointer to struct colors]
+ EW_SETBRANDINGIMAGE, // SetBrandingImage: 1: [Bitmap file]
+ EW_CREATEFONT, // CreateFont: 5: [handle output, face name, height, weight, flags]
+ EW_SHOWWINDOW, // ShowWindow: 2: [hwnd, show state]
+#endif
+
+#ifdef NSIS_SUPPORT_SHELLEXECUTE
+ EW_SHELLEXEC, // ShellExecute program: 4, [shell action, complete commandline, parameters, showwindow]
+#endif
+
+#ifdef NSIS_SUPPORT_EXECUTE
+ EW_EXECUTE, // Execute program: 3,[complete command line,waitflag,>=0?output errorcode]
+#endif
+
+#ifdef NSIS_SUPPORT_GETFILETIME
+ EW_GETFILETIME, // GetFileTime; 3 [file highout lowout]
+#endif
+
+#ifdef NSIS_SUPPORT_GETDLLVERSION
+ EW_GETDLLVERSION, // GetDLLVersion: 3 [file highout lowout]
+#endif
+
+#ifdef NSIS_SUPPORT_ACTIVEXREG
+ EW_REGISTERDLL, // Register DLL: 3,[DLL file name, string ptr of function to call, text to put in display (<0 if none/pass parms), 1 - no unload, 0 - unload]
+#endif
+
+#ifdef NSIS_SUPPORT_CREATESHORTCUT
+ EW_CREATESHORTCUT, // Make Shortcut: 5, [link file, target file, parameters, icon file, iconindex|show mode<<8|hotkey<<16]
+#endif
+
+#ifdef NSIS_SUPPORT_COPYFILES
+ EW_COPYFILES, // CopyFiles: 3 [source mask, destination location, flags]
+#endif
+
+#ifdef NSIS_SUPPORT_REBOOT
+ EW_REBOOT, // Reboot: 0
+#endif
+
+#ifdef NSIS_SUPPORT_INIFILES
+ EW_WRITEINI, // Write INI String: 4, [Section, Name, Value, INI File]
+ EW_READINISTR, // ReadINIStr: 4 [output, section, name, ini_file]
+#endif
+
+#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
+ EW_DELREG, // DeleteRegValue/DeleteRegKey: 4, [root key(int), KeyName, ValueName, delkeyonlyifempty]. ValueName is -1 if delete key
+ EW_WRITEREG, // Write Registry value: 5, [RootKey(int),KeyName,ItemName,ItemData,typelen]
+ // typelen=1 for str, 2 for dword, 3 for binary, 0 for expanded str
+ EW_READREGSTR, // ReadRegStr: 5 [output, rootkey(int), keyname, itemname, ==1?int::str]
+ EW_REGENUM, // RegEnum: 5 [output, rootkey, keyname, index, ?key:value]
+#endif
+
+#ifdef NSIS_SUPPORT_FILEFUNCTIONS
+ EW_FCLOSE, // FileClose: 1 [handle]
+ EW_FOPEN, // FileOpen: 4 [name, openmode, createmode, outputhandle]
+ EW_FPUTS, // FileWrite: 3 [handle, string, ?int:string]
+ EW_FGETS, // FileRead: 4 [handle, output, maxlen, ?getchar:gets]
+ EW_FSEEK, // FileSeek: 4 [handle, offset, mode, >=0?positionoutput]
+#endif//NSIS_SUPPORT_FILEFUNCTIONS
+
+#ifdef NSIS_SUPPORT_FINDFIRST
+ EW_FINDCLOSE, // FindClose: 1 [handle]
+ EW_FINDNEXT, // FindNext: 2 [output, handle]
+ EW_FINDFIRST, // FindFirst: 2 [filespec, output, handleoutput]
+#endif
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ EW_WRITEUNINSTALLER, // WriteUninstaller: 3 [name, offset, icon_size]
+#endif
+
+#ifdef NSIS_CONFIG_LOG
+ EW_LOG, // LogText: 2 [0, text] / LogSet: [1, logstate]
+#endif
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ EW_SECTIONSET, // SectionSetText: 3: [idx, 0, text]
+ // SectionGetText: 3: [idx, 1, output]
+ // SectionSetFlags: 3: [idx, 2, flags]
+ // SectionGetFlags: 3: [idx, 3, output]
+ EW_INSTTYPESET, // InstTypeSetFlags: 3: [idx, 0, flags]
+ // InstTypeGetFlags: 3: [idx, 1, output]
+#endif
+
+ // instructions not actually implemented in exehead, but used in compiler.
+ EW_GETLABELADDR, // both of these get converted to EW_ASSIGNVAR
+ EW_GETFUNCTIONADDR,
+
+#ifdef NSIS_LOCKWINDOW_SUPPORT
+ EW_LOCKWINDOW,
+#endif
+};
+
+#define FH_FLAGS_MASK 15
+#define FH_FLAGS_UNINSTALL 1
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+# define FH_FLAGS_SILENT 2
+#endif
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+# define FH_FLAGS_NO_CRC 4
+# define FH_FLAGS_FORCE_CRC 8
+#endif
+
+#define FH_SIG 0xDEADBEEF
+
+// neato surprise signature that goes in firstheader. :)
+#define FH_INT1 0x6C6C754E
+#define FH_INT2 0x74666F73
+#define FH_INT3 0x74736E49
+
+typedef struct
+{
+ int flags; // FH_FLAGS_*
+ int siginfo; // FH_SIG
+
+ int nsinst[3]; // FH_INT1,FH_INT2,FH_INT3
+
+ // these point to the header+sections+entries+stringtable in the datablock
+ int length_of_header;
+
+ // this specifies the length of all the data (including the firstheader and CRC)
+ int length_of_all_following_data;
+} firstheader;
+
+// Flags for common_header.flags
+#define CH_FLAGS_DETAILS_SHOWDETAILS 1
+#define CH_FLAGS_DETAILS_NEVERSHOW 2
+#define CH_FLAGS_PROGRESS_COLORED 4
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ #define CH_FLAGS_SILENT 8
+ #define CH_FLAGS_SILENT_LOG 16
+#endif
+#define CH_FLAGS_AUTO_CLOSE 32
+#define CH_FLAGS_DIR_NO_SHOW 64
+#define CH_FLAGS_NO_ROOT_DIR 128
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ #define CH_FLAGS_COMP_ONLY_ON_CUSTOM 256
+ #define CH_FLAGS_NO_CUSTOM 512
+#endif
+
+// nsis blocks
+struct block_header {
+ int offset;
+ int num;
+};
+
+enum {
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ NB_PAGES,
+#endif
+ NB_SECTIONS,
+ NB_ENTRIES,
+ NB_STRINGS,
+ NB_LANGTABLES,
+ NB_CTLCOLORS,
+#ifdef NSIS_SUPPORT_BGBG
+ NB_BGFONT,
+#endif
+ NB_DATA,
+
+ BLOCKS_NUM
+};
+
+// nsis strings
+
+typedef char NSIS_STRING[NSIS_MAX_STRLEN];
+
+// Settings common to both installers and uninstallers
+typedef struct
+{
+ int flags; // CH_FLAGS_*
+ struct block_header blocks[BLOCKS_NUM];
+
+ // InstallDirRegKey stuff
+ int install_reg_rootkey;
+ // these two are not processed!
+ int install_reg_key_ptr, install_reg_value_ptr;
+
+#ifdef NSIS_SUPPORT_BGBG
+ int bg_color1, bg_color2, bg_textcolor;
+#endif
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ // installation log window colors
+ int lb_bg, lb_fg;
+#endif
+
+ // langtable size
+ int langtable_size;
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ // license background color
+ int license_bg;
+#endif//NSIS_CONFIG_LICENSEPAGE
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ // .on* calls
+ int code_onInit;
+ int code_onInstSuccess;
+ int code_onInstFailed;
+ int code_onUserAbort;
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ int code_onGUIInit;
+ int code_onGUIEnd;
+ int code_onMouseOverSection;
+#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ int code_onVerifyInstDir;
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ int code_onSelChange;
+#endif//NSIS_CONFIG_COMPONENTPAGE
+#ifdef NSIS_SUPPORT_REBOOT
+ int code_onRebootFailed;
+#endif//NSIS_SUPPORT_REBOOT
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ int install_types[NSIS_MAX_INST_TYPES+1];
+#endif
+
+ int install_directory_ptr; // default install dir.
+ int install_directory_auto_append; // auto append part
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ int str_uninstchild;
+ int str_uninstcmd;
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ int str_wininit;
+#endif//NSIS_SUPPORT_MOVEONREBOOT
+} header;
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+// callback indices
+enum
+{
+ CB_ONINIT,
+ CB_ONINSTSUCCESS,
+ CB_ONINSTFAILED,
+ CB_ONUSERABORT,
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ CB_ONGUIINIT,
+ CB_ONGUIEND,
+ CB_ONMOUSEOVERSECTION,
+#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ CB_ONVERIFYINSTDIR,
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ CB_ONSELCHANGE,
+#endif//NSIS_CONFIG_COMPONENTPAGE
+#ifdef NSIS_SUPPORT_REBOOT
+ CB_ONREBOOTFAILED
+#endif//NSIS_SUPPORT_REBOOT
+};
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+// used for section->flags
+#define SF_SELECTED 1
+#define SF_SECGRP 2
+#define SF_SECGRPEND 4
+#define SF_BOLD 8
+#define SF_RO 16
+#define SF_EXPAND 32
+#define SF_PSELECTED 64
+#define SF_TOGGLED 128
+#define SF_NAMECHG 256
+
+typedef struct
+{
+ int name_ptr; // initial name pointer
+ int install_types; // bits set for each of the different install_types, if any.
+ int flags; // SF_* - defined above
+ int code;
+ int code_size;
+ int size_kb;
+ char name[NSIS_MAX_STRLEN]; // '' for invisible sections
+} section;
+
+#define SECTION_OFFSET(field) (FIELD_OFFSET(section, field)/sizeof(int))
+
+typedef struct
+{
+ int which;
+ int offsets[MAX_ENTRY_OFFSETS]; // count and meaning of offsets depend on 'which'
+} entry;
+
+// page window proc
+enum
+{
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ PWP_LICENSE,
+#endif
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ PWP_SELCOM,
+#endif
+ PWP_DIR,
+ PWP_INSTFILES,
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ PWP_UNINST,
+#endif
+ PWP_COMPLETED,
+ PWP_CUSTOM
+};
+
+// page flags
+#define PF_BACK_ENABLE 256
+#define PF_NEXT_ENABLE 2
+#define PF_CANCEL_ENABLE 4
+#define PF_BACK_SHOW 8 // must be SW_SHOWNA, don't change
+#define PF_LICENSE_STREAM 16
+#define PF_LICENSE_FORCE_SELECTION 32
+#define PF_LICENSE_NO_FORCE_SELECTION 64
+#define PF_LICENSE_SELECTED 1 // must be 1
+#define PF_NO_NEXT_FOCUS 128
+#define PF_PAGE_EX 512
+#define PF_DIR_NO_BTN_DISABLE 1024
+
+typedef struct
+{
+ int dlg_id; // dialog resource id
+ int wndproc_id;
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ // called before the page is created, or if custom to show the page
+ // use Abort to skip the page
+ int prefunc;
+ // called right before page is shown
+ int showfunc;
+ // called when the user leaves to the next page
+ // use Abort to force the user to stay on this page
+ int leavefunc;
+#endif //NSIS_SUPPORT_CODECALLBACKS
+
+ int flags;
+
+ int caption;
+ int back;
+ int next;
+ int clicknext;
+ int cancel;
+
+ int parms[5];
+} page;
+
+// text/bg color
+#define CC_TEXT 1
+#define CC_TEXT_SYS 2
+#define CC_BK 4
+#define CC_BK_SYS 8
+#define CC_BKB 16
+
+typedef struct {
+ COLORREF text;
+ COLORREF bkc;
+ UINT lbStyle;
+ HBRUSH bkb;
+ int bkmode;
+ int flags;
+} ctlcolors;
+
+// constants for myDelete (util.c)
+#define DEL_DIR 1
+#define DEL_RECURSE 2
+#define DEL_REBOOT 4
+#define DEL_SIMPLE 8
+
+// $0..$9, $INSTDIR, etc are encoded as ASCII bytes starting from this value.
+// Added by ramon 3 jun 2003
+#define NS_SKIP_CODE 252
+#define NS_VAR_CODE 253
+#define NS_SHELL_CODE 254
+#define NS_LANG_CODE 255
+#define NS_CODES_START NS_SKIP_CODE
+
+#define CODE_SHORT(x) (WORD)((((WORD)x & 0x7F) | (((WORD)x & 0x3F80) << 1) | 0x8080))
+#define MAX_CODED 16383
+
+#define NSIS_INSTDIR_INVALID 1
+#define NSIS_INSTDIR_NOT_ENOUGH_SPACE 2
+
+typedef struct
+{
+ int autoclose;
+ int all_user_var;
+ int exec_error;
+ int abort;
+#ifdef NSIS_SUPPORT_REBOOT
+ int exec_reboot;
+ int reboot_called;
+#else
+ int _;
+ int __;
+#endif
+ int XXX_cur_insttype; // depreacted
+ int XXX_insttype_changed; // deprecated
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ int silent;
+#else
+ int ___;
+#endif
+ int instdir_error;
+ int rtl;
+ int errlvl;
+ int alter_reg_view;
+ int status_update;
+} exec_flags;
+
+#define FIELDN(x, y) (((int *)&x)[y])
+
+#ifdef EXEHEAD
+
+// the following are only used/implemented in exehead, not makensis.
+
+int NSISCALL isheader(firstheader *h); // returns 0 on not header, length_of_datablock on success
+
+// returns nonzero on error
+// returns 0 on success
+// on success, m_header will be set to a pointer that should eventually be GlobalFree()'d.
+// (or m_uninstheader)
+const char * NSISCALL loadHeaders(int cl_flags);
+
+int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen);
+
+#define GetCompressedDataFromDataBlock(offset, hFileOut) _dodecomp(offset,hFileOut,NULL,0)
+#define GetCompressedDataFromDataBlockToMemory(offset, out, out_len) _dodecomp(offset,NULL,out,out_len)
+
+extern HANDLE g_db_hFile;
+extern int g_quit_flag;
+
+BOOL NSISCALL ReadSelfFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead);
+DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove);
+
+extern struct block_header g_blocks[BLOCKS_NUM];
+extern header *g_header;
+extern int g_flags;
+extern int g_filehdrsize;
+extern int g_is_uninstaller;
+
+#define g_pages ((page*)g_blocks[NB_PAGES].offset)
+#define g_sections ((section*)g_blocks[NB_SECTIONS].offset)
+#define num_sections (g_blocks[NB_SECTIONS].num)
+#define g_entries ((entry*)g_blocks[NB_ENTRIES].offset)
+#endif
+
+#endif //_FILEFORM_H_
diff --git a/Source/exehead/lang.h b/Source/exehead/lang.h
index db5b26b..4c6d425 100755
--- a/Source/exehead/lang.h
+++ b/Source/exehead/lang.h
@@ -1,85 +1,85 @@
-/*
- * lang.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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_LANG_H_
-#define _NSIS_LANG_H_
-
-
-// generic startup strings (these will never be overridable)
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-#define _LANG_INVALIDCRC "The installer you are trying to use is corrupted or incomplete.\n" \
- "This could be the result of a damaged disk, a failed download or a virus.\n\n" \
- "You may want to contact the author of this installer to obtain a new copy.\n\n" \
- "It may be possible to skip this check using the /NCRC command line switch\n" \
- "(NOT RECOMMENDED)."
-#else
-#define _LANG_INVALIDCRC "The installer you are trying to use is corrupted or incomplete.\n" \
- "This could be the result of a damaged disk, a failed download or a virus.\n\n" \
- "You may want to contact the author of this installer to obtain a new copy."
-#endif
-
-#define _LANG_ERRORWRITINGTEMP "Error writing temporary file. Make sure your temp folder is valid."
-
-#define _LANG_UNINSTINITERROR "Error launching installer"
-
-#define _LANG_VERIFYINGINST "verifying installer: %d%%"
-
-#define _LANG_UNPACKING "unpacking data: %d%%"
-
-#define _LANG_CANTOPENSELF "Error launching installer" // same as uninstiniterror for size
-
-#define _LANG_GENERIC_ERROR "NSIS Error"
-
-#define LANG_STR_TAB(x) cur_langtable[-((int)x+1)]
-
-#define LANG_BRANDING -1
-#define LANG_CAPTION -2
-#define LANG_NAME -3
-#define LANG_SPACE_AVAIL -4
-#define LANG_SPACE_REQ -5
-#define LANG_CANTWRITE -6
-#define LANG_COPYFAILED -7
-#define LANG_COPYTO -8
-#define LANG_CANNOTFINDSYMBOL -9
-#define LANG_COULDNOTLOAD -10
-#define LANG_CREATEDIR -11
-#define LANG_CREATESHORTCUT -12
-#define LANG_CREATEDUNINST -13
-#define LANG_DELETEFILE -14
-#define LANG_DELETEONREBOOT -15
-#define LANG_ERRORCREATINGSHORTCUT -16
-#define LANG_ERRORCREATING -17
-#define LANG_ERRORDECOMPRESSING -18
-#define LANG_DLLREGERROR -19
-#define LANG_EXECSHELL -20
-#define LANG_EXECUTE -21
-#define LANG_EXTRACT -22
-#define LANG_ERRORWRITING -23
-#define LANG_INSTCORRUPTED -24
-#define LANG_NOOLE -25
-#define LANG_OUTPUTDIR -26
-#define LANG_REMOVEDIR -27
-#define LANG_RENAMEONREBOOT -28
-#define LANG_RENAME -29
-#define LANG_SKIPPED -30
-#define LANG_COPYDETAILS -31
-#define LANG_LOG_INSTALL_PROCESS -32
-#define LANG_BYTE -33
-#define LANG_KILO -34
-#define LANG_MEGA -35
-#define LANG_GIGA -36
-
-#endif//_NSIS_LANG_H_
+/*
+ * lang.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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_LANG_H_
+#define _NSIS_LANG_H_
+
+
+// generic startup strings (these will never be overridable)
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+#define _LANG_INVALIDCRC "The installer you are trying to use is corrupted or incomplete.\n" \
+ "This could be the result of a damaged disk, a failed download or a virus.\n\n" \
+ "You may want to contact the author of this installer to obtain a new copy.\n\n" \
+ "It may be possible to skip this check using the /NCRC command line switch\n" \
+ "(NOT RECOMMENDED)."
+#else
+#define _LANG_INVALIDCRC "The installer you are trying to use is corrupted or incomplete.\n" \
+ "This could be the result of a damaged disk, a failed download or a virus.\n\n" \
+ "You may want to contact the author of this installer to obtain a new copy."
+#endif
+
+#define _LANG_ERRORWRITINGTEMP "Error writing temporary file. Make sure your temp folder is valid."
+
+#define _LANG_UNINSTINITERROR "Error launching installer"
+
+#define _LANG_VERIFYINGINST "verifying installer: %d%%"
+
+#define _LANG_UNPACKING "unpacking data: %d%%"
+
+#define _LANG_CANTOPENSELF "Error launching installer" // same as uninstiniterror for size
+
+#define _LANG_GENERIC_ERROR "NSIS Error"
+
+#define LANG_STR_TAB(x) cur_langtable[-((int)x+1)]
+
+#define LANG_BRANDING -1
+#define LANG_CAPTION -2
+#define LANG_NAME -3
+#define LANG_SPACE_AVAIL -4
+#define LANG_SPACE_REQ -5
+#define LANG_CANTWRITE -6
+#define LANG_COPYFAILED -7
+#define LANG_COPYTO -8
+#define LANG_CANNOTFINDSYMBOL -9
+#define LANG_COULDNOTLOAD -10
+#define LANG_CREATEDIR -11
+#define LANG_CREATESHORTCUT -12
+#define LANG_CREATEDUNINST -13
+#define LANG_DELETEFILE -14
+#define LANG_DELETEONREBOOT -15
+#define LANG_ERRORCREATINGSHORTCUT -16
+#define LANG_ERRORCREATING -17
+#define LANG_ERRORDECOMPRESSING -18
+#define LANG_DLLREGERROR -19
+#define LANG_EXECSHELL -20
+#define LANG_EXECUTE -21
+#define LANG_EXTRACT -22
+#define LANG_ERRORWRITING -23
+#define LANG_INSTCORRUPTED -24
+#define LANG_NOOLE -25
+#define LANG_OUTPUTDIR -26
+#define LANG_REMOVEDIR -27
+#define LANG_RENAMEONREBOOT -28
+#define LANG_RENAME -29
+#define LANG_SKIPPED -30
+#define LANG_COPYDETAILS -31
+#define LANG_LOG_INSTALL_PROCESS -32
+#define LANG_BYTE -33
+#define LANG_KILO -34
+#define LANG_MEGA -35
+#define LANG_GIGA -36
+
+#endif//_NSIS_LANG_H_
diff --git a/Source/exehead/resource.h b/Source/exehead/resource.h
index 53b2fb5..df080c8 100755
--- a/Source/exehead/resource.h
+++ b/Source/exehead/resource.h
@@ -1,56 +1,56 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by resource.rc
-//
-#ifndef DS_SHELLFONT
-#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
-#endif
-
-#define IDC_BACK 3
-#define IDD_LICENSE 102
-#define IDD_LICENSE_FSRB 108
-#define IDD_LICENSE_FSCB 109
-#define IDI_ICON2 103
-#define IDD_DIR 103
-#define IDD_SELCOM 104
-#define IDD_INST 105
-#define IDD_INSTFILES 106
-#define IDD_UNINST 107
-#define IDD_VERIFY 111
-#define IDB_BITMAP1 110
-#define IDC_EDIT1 1000
-#define IDC_BROWSE 1001
-#define IDC_PROGRESS 1004
-#define IDC_INTROTEXT 1006
-#define IDC_CHECK1 1008
-#define IDC_LIST1 1016
-#define IDC_COMBO1 1017
-#define IDC_CHILDRECT 1018
-#define IDC_DIR 1019
-#define IDC_SELDIRTEXT 1020
-#define IDC_TEXT1 1021
-#define IDC_TEXT2 1022
-#define IDC_SPACEREQUIRED 1023
-#define IDC_SPACEAVAILABLE 1024
-#define IDC_SHOWDETAILS 1027
-#define IDC_VERSTR 1028
-#define IDC_UNINSTFROM 1029
-#define IDC_STR 1030
-#define IDC_ULICON 1031
-#define IDC_TREE1 1032
-#define IDC_BRANDIMAGE 1033
-#define IDC_LICENSEAGREE 1034
-#define IDC_LICENSEDISAGREE 1035
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 112
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1036
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
-
-
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+#ifndef DS_SHELLFONT
+#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
+#endif
+
+#define IDC_BACK 3
+#define IDD_LICENSE 102
+#define IDD_LICENSE_FSRB 108
+#define IDD_LICENSE_FSCB 109
+#define IDI_ICON2 103
+#define IDD_DIR 103
+#define IDD_SELCOM 104
+#define IDD_INST 105
+#define IDD_INSTFILES 106
+#define IDD_UNINST 107
+#define IDD_VERIFY 111
+#define IDB_BITMAP1 110
+#define IDC_EDIT1 1000
+#define IDC_BROWSE 1001
+#define IDC_PROGRESS 1004
+#define IDC_INTROTEXT 1006
+#define IDC_CHECK1 1008
+#define IDC_LIST1 1016
+#define IDC_COMBO1 1017
+#define IDC_CHILDRECT 1018
+#define IDC_DIR 1019
+#define IDC_SELDIRTEXT 1020
+#define IDC_TEXT1 1021
+#define IDC_TEXT2 1022
+#define IDC_SPACEREQUIRED 1023
+#define IDC_SPACEAVAILABLE 1024
+#define IDC_SHOWDETAILS 1027
+#define IDC_VERSTR 1028
+#define IDC_UNINSTFROM 1029
+#define IDC_STR 1030
+#define IDC_ULICON 1031
+#define IDC_TREE1 1032
+#define IDC_BRANDIMAGE 1033
+#define IDC_LICENSEAGREE 1034
+#define IDC_LICENSEDISAGREE 1035
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 112
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1036
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
+
+
diff --git a/Source/exehead/resource.rc b/Source/exehead/resource.rc
index e3b83e1..245927e 100755
--- a/Source/exehead/resource.rc
+++ b/Source/exehead/resource.rc
@@ -1,282 +1,282 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-#include "config.h"
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
-#if defined(APSTUDIO_INVOKED)
-IDD_LICENSE$(NSIS_CONFIG_LICENSEPAGE) DIALOGEX 0, 0, 266, 130
-#else
-IDD_LICENSE DIALOGEX 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,105
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
-#if defined(APSTUDIO_INVOKED)
-IDD_LICENSE_FSRB$(NSIS_CONFIG_LICENSEPAGE) DIALOG DISCARDABLE 0, 0, 266, 130
-#else
-IDD_LICENSE_FSRB DIALOG DISCARDABLE 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg"
-BEGIN
- ICON IDI_ICON2,1031,0,0,22,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,85
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,110,266,9
- CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
- WS_TABSTOP,0,120,266,9
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
-#if defined(APSTUDIO_INVOKED)
-IDD_LICENSE_FSCB$(NSIS_CONFIG_LICENSEPAGE) DIALOG DISCARDABLE 0, 0, 266, 130
-#else
-IDD_LICENSE_FSCB DIALOG DISCARDABLE 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg"
-BEGIN
- ICON IDI_ICON2,1031,0,0,22,20
- LTEXT "",IDC_INTROTEXT,25,0,241,23
- CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
- WS_TABSTOP | 0x804,0,24,266,95
- CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,0,120,266,9
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
-#if defined(APSTUDIO_INVOKED)
-IDD_DIR$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 266, 130
-#else
-IDD_DIR DIALOGEX 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- EDITTEXT IDC_DIR,8,49,187,12,ES_AUTOHSCROLL
- PUSHBUTTON "",IDC_BROWSE,202,48,55,14
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,122,
- 265,8
- CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
- WS_TABSTOP,8,71,118,10
- CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,111,
- 265,8
- LTEXT "",IDC_INTROTEXT,25,0,241,34
- GROUPBOX "",IDC_SELDIRTEXT,1,38,264,30
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_COMPONENTPAGE)
-#if defined(APSTUDIO_INVOKED)
-IDD_SELCOM$(NSIS_CONFIG_COMPONENTPAGE) DIALOGEX 0, 0, 266, 130
-#else
-IDD_SELCOM DIALOGEX 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_COMBO1,114,25,152,102,CBS_DROPDOWNLIST | NOT
- WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- LTEXT "",IDC_TEXT2,0,40,108,65
- CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,108,8
- LTEXT "",IDC_SPACEREQUIRED,0,111,111,18,NOT WS_GROUP
- LTEXT "",IDC_INTROTEXT,25,0,241,25
- CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
- WS_BORDER | WS_TABSTOP,114,39,151,90
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
-#if defined(APSTUDIO_INVOKED)
-IDD_INST$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 280, 162
-#else
-IDD_INST DIALOGEX 0, 0, 280, 162
-#endif
-STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "",IDC_BACK,171,142,50,14,NOT WS_VISIBLE | WS_GROUP
- PUSHBUTTON "",IDOK,223,142,50,14
- PUSHBUTTON "",IDCANCEL,7,142,50,14
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | WS_GROUP,7,138,
- 267,1
- CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
- WS_GROUP,7,6,266,130
- CTEXT "",IDC_VERSTR,59,145,108,8,WS_DISABLED
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
-#if defined(APSTUDIO_INVOKED)
-IDD_INSTFILES$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 266, 130
-#else
-IDD_INSTFILES DIALOGEX 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
- 11
- CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP |
- SS_NOPREFIX,24,0,241,8
- CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
- LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
- WS_TABSTOP,0,25,265,104
- ICON IDI_ICON2,IDC_ULICON,0,0,22,20
- PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(_NSIS_CONFIG_UNINSTDLG)
-#if defined(APSTUDIO_INVOKED)
-IDD_UNINST$(_NSIS_CONFIG_UNINSTDLG) DIALOGEX 0, 0, 266, 130
-#else
-IDD_UNINST DIALOGEX 0, 0, 266, 130
-#endif
-STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- ICON IDI_ICON2,IDC_ULICON,0,1,22,20
- LTEXT "",IDC_UNINSTFROM,0,45,55,8
- EDITTEXT IDC_EDIT1,56,43,209,12,ES_AUTOHSCROLL | ES_READONLY
- LTEXT "",IDC_INTROTEXT,25,0,241,34
-END
-#endif
-
-#if defined(APSTUDIO_INVOKED) || defined(_NSIS_CONFIG_VERIFYDIALOG)
-#if defined(APSTUDIO_INVOKED)
-IDD_VERIFY$(_NSIS_CONFIG_VERIFYDIALOG) DIALOGEX 0, 0, 162, 22
-#else
-IDD_VERIFY DIALOGEX 0, 0, 162, 22
-#endif
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CTEXT "",IDC_STR,7,7,148,8
-END
-#endif
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- "IDD_INST$(NSIS_CONFIG_VISIBLE_SUPPORT)", DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 273
- TOPMARGIN, 6
- BOTTOMMARGIN, 156
- END
-
- "IDD_INSTFILES$(NSIS_CONFIG_VISIBLE_SUPPORT)", DIALOG
- BEGIN
- RIGHTMARGIN, 246
- BOTTOMMARGIN, 125
- END
-
- "IDD_VERIFY$(_NSIS_CONFIG_VERIFYDIALOG)", DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 155
- TOPMARGIN, 7
- BOTTOMMARGIN, 15
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "#include ""config.h""\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON2 ICON DISCARDABLE "nsis.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_COMPONENTPAGE)
-#if defined(APSTUDIO_INVOKED)
-IDB_BITMAP1$(NSIS_CONFIG_COMPONENTPAGE) BITMAP DISCARDABLE "bitmap1.bmp"
-#else
-IDB_BITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
-#endif
-#endif
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+#include "config.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
+#if defined(APSTUDIO_INVOKED)
+IDD_LICENSE$(NSIS_CONFIG_LICENSEPAGE) DIALOGEX 0, 0, 266, 130
+#else
+IDD_LICENSE DIALOGEX 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,105
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
+#if defined(APSTUDIO_INVOKED)
+IDD_LICENSE_FSRB$(NSIS_CONFIG_LICENSEPAGE) DIALOG DISCARDABLE 0, 0, 266, 130
+#else
+IDD_LICENSE_FSRB DIALOG DISCARDABLE 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ ICON IDI_ICON2,1031,0,0,22,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,85
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,110,266,9
+ CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
+ WS_TABSTOP,0,120,266,9
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
+#if defined(APSTUDIO_INVOKED)
+IDD_LICENSE_FSCB$(NSIS_CONFIG_LICENSEPAGE) DIALOG DISCARDABLE 0, 0, 266, 130
+#else
+IDD_LICENSE_FSCB DIALOG DISCARDABLE 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg"
+BEGIN
+ ICON IDI_ICON2,1031,0,0,22,20
+ LTEXT "",IDC_INTROTEXT,25,0,241,23
+ CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
+ WS_TABSTOP | 0x804,0,24,266,95
+ CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,0,120,266,9
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+#if defined(APSTUDIO_INVOKED)
+IDD_DIR$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 266, 130
+#else
+IDD_DIR DIALOGEX 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ EDITTEXT IDC_DIR,8,49,187,12,ES_AUTOHSCROLL
+ PUSHBUTTON "",IDC_BROWSE,202,48,55,14
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,122,
+ 265,8
+ CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
+ WS_TABSTOP,8,71,118,10
+ CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,111,
+ 265,8
+ LTEXT "",IDC_INTROTEXT,25,0,241,34
+ GROUPBOX "",IDC_SELDIRTEXT,1,38,264,30
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_COMPONENTPAGE)
+#if defined(APSTUDIO_INVOKED)
+IDD_SELCOM$(NSIS_CONFIG_COMPONENTPAGE) DIALOGEX 0, 0, 266, 130
+#else
+IDD_SELCOM DIALOGEX 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ COMBOBOX IDC_COMBO1,114,25,152,102,CBS_DROPDOWNLIST | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ LTEXT "",IDC_TEXT2,0,40,108,65
+ CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,108,8
+ LTEXT "",IDC_SPACEREQUIRED,0,111,111,18,NOT WS_GROUP
+ LTEXT "",IDC_INTROTEXT,25,0,241,25
+ CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
+ TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
+ WS_BORDER | WS_TABSTOP,114,39,151,90
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+#if defined(APSTUDIO_INVOKED)
+IDD_INST$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 280, 162
+#else
+IDD_INST DIALOGEX 0, 0, 280, 162
+#endif
+STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "",IDC_BACK,171,142,50,14,NOT WS_VISIBLE | WS_GROUP
+ PUSHBUTTON "",IDOK,223,142,50,14
+ PUSHBUTTON "",IDCANCEL,7,142,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | WS_GROUP,7,138,
+ 267,1
+ CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
+ WS_GROUP,7,6,266,130
+ CTEXT "",IDC_VERSTR,59,145,108,8,WS_DISABLED
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
+#if defined(APSTUDIO_INVOKED)
+IDD_INSTFILES$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 266, 130
+#else
+IDD_INSTFILES DIALOGEX 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
+ 11
+ CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP |
+ SS_NOPREFIX,24,0,241,8
+ CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
+ LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
+ WS_TABSTOP,0,25,265,104
+ ICON IDI_ICON2,IDC_ULICON,0,0,22,20
+ PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(_NSIS_CONFIG_UNINSTDLG)
+#if defined(APSTUDIO_INVOKED)
+IDD_UNINST$(_NSIS_CONFIG_UNINSTDLG) DIALOGEX 0, 0, 266, 130
+#else
+IDD_UNINST DIALOGEX 0, 0, 266, 130
+#endif
+STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON IDI_ICON2,IDC_ULICON,0,1,22,20
+ LTEXT "",IDC_UNINSTFROM,0,45,55,8
+ EDITTEXT IDC_EDIT1,56,43,209,12,ES_AUTOHSCROLL | ES_READONLY
+ LTEXT "",IDC_INTROTEXT,25,0,241,34
+END
+#endif
+
+#if defined(APSTUDIO_INVOKED) || defined(_NSIS_CONFIG_VERIFYDIALOG)
+#if defined(APSTUDIO_INVOKED)
+IDD_VERIFY$(_NSIS_CONFIG_VERIFYDIALOG) DIALOGEX 0, 0, 162, 22
+#else
+IDD_VERIFY DIALOGEX 0, 0, 162, 22
+#endif
+STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CTEXT "",IDC_STR,7,7,148,8
+END
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ "IDD_INST$(NSIS_CONFIG_VISIBLE_SUPPORT)", DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 273
+ TOPMARGIN, 6
+ BOTTOMMARGIN, 156
+ END
+
+ "IDD_INSTFILES$(NSIS_CONFIG_VISIBLE_SUPPORT)", DIALOG
+ BEGIN
+ RIGHTMARGIN, 246
+ BOTTOMMARGIN, 125
+ END
+
+ "IDD_VERIFY$(_NSIS_CONFIG_VERIFYDIALOG)", DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 155
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 15
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "#include ""config.h""\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON2 ICON DISCARDABLE "nsis.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_COMPONENTPAGE)
+#if defined(APSTUDIO_INVOKED)
+IDB_BITMAP1$(NSIS_CONFIG_COMPONENTPAGE) BITMAP DISCARDABLE "bitmap1.bmp"
+#else
+IDB_BITMAP1 BITMAP DISCARDABLE "bitmap1.bmp"
+#endif
+#endif
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
diff --git a/Source/exehead/state.h b/Source/exehead/state.h
index 27730e4..8aa5020 100755
--- a/Source/exehead/state.h
+++ b/Source/exehead/state.h
@@ -1,42 +1,42 @@
-/*
- * fileform.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "fileform.h"
-
-extern NSIS_STRING g_usrvars[1];
-
-#define state_command_line g_usrvars[20]
-#define state_install_directory g_usrvars[21]
-#define state_output_directory g_usrvars[22]
-#define state_exe_directory g_usrvars[23]
-#define state_language g_usrvars[24]
-#define state_temp_dir g_usrvars[25]
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
-# define state_plugins_dir g_usrvars[26]
-#endif
-#define state_exe_path g_usrvars[27]
-#define state_exe_file g_usrvars[28]
-#define state_click_next g_usrvars[30]
-
-extern char g_caption[NSIS_MAX_STRLEN*2];
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
-extern HWND g_hwnd;
-extern HANDLE g_hInstance;
-extern HWND insthwnd,insthwndbutton;
-#else
-#define g_hwnd 0
-#define g_hInstance 0
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+/*
+ * fileform.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "fileform.h"
+
+extern NSIS_STRING g_usrvars[1];
+
+#define state_command_line g_usrvars[20]
+#define state_install_directory g_usrvars[21]
+#define state_output_directory g_usrvars[22]
+#define state_exe_directory g_usrvars[23]
+#define state_language g_usrvars[24]
+#define state_temp_dir g_usrvars[25]
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+# define state_plugins_dir g_usrvars[26]
+#endif
+#define state_exe_path g_usrvars[27]
+#define state_exe_file g_usrvars[28]
+#define state_click_next g_usrvars[30]
+
+extern char g_caption[NSIS_MAX_STRLEN*2];
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+extern HWND g_hwnd;
+extern HANDLE g_hInstance;
+extern HWND insthwnd,insthwndbutton;
+#else
+#define g_hwnd 0
+#define g_hInstance 0
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
diff --git a/Source/exehead/ui.h b/Source/exehead/ui.h
index 9160e3d..ae85609 100755
--- a/Source/exehead/ui.h
+++ b/Source/exehead/ui.h
@@ -1,60 +1,60 @@
-/*
- * ui.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _UI_H_
-#define _UI_H_
-
-extern int *cur_langtable;
-
-extern int NSISCALL ui_doinstall(void);
-void NSISCALL update_status_text(int strtab, const char *text2);
-
-extern int ui_dlg_visible;
-extern HWND m_curwnd;
-
-#ifdef NSIS_CONFIG_LOG
-void NSISCALL build_g_logfile(void);
-#endif
-
-// sent to the last child window to tell it that the install thread is done
-#define WM_NOTIFY_INSTPROC_DONE (WM_USER+0x4)
-
-// sent to every child window to tell it it can start executing NSIS code
-#define WM_NOTIFY_START (WM_USER+0x5)
-
-// sent to the outer window to tell it to go to the next inner window
-#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
-
-// sent to every child window to tell it it is closing soon
-#define WM_NOTIFY_INIGO_MONTOYA (WM_USER+0xb)
-
-// update message used by DirProc and SelProc for space display
-#define WM_IN_UPDATEMSG (WM_USER+0xf)
-
-// custom pages should send this message to let NSIS know they're ready
-#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
-
-// simulates clicking on the tree
-#define WM_TREEVIEW_KEYHACK (WM_USER+0x13)
-
-// notifies a component selection change (.onMouseOverSection)
-#define WM_NOTIFY_SELCHANGE (WM_USER+0x19)
-
-// Notifies the installation type has changed by the user
-#define WM_NOTIFY_INSTTYPE_CHANGED (WM_USER+0x20)
-
-#endif//_UI_H_
+/*
+ * ui.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _UI_H_
+#define _UI_H_
+
+extern int *cur_langtable;
+
+extern int NSISCALL ui_doinstall(void);
+void NSISCALL update_status_text(int strtab, const char *text2);
+
+extern int ui_dlg_visible;
+extern HWND m_curwnd;
+
+#ifdef NSIS_CONFIG_LOG
+void NSISCALL build_g_logfile(void);
+#endif
+
+// sent to the last child window to tell it that the install thread is done
+#define WM_NOTIFY_INSTPROC_DONE (WM_USER+0x4)
+
+// sent to every child window to tell it it can start executing NSIS code
+#define WM_NOTIFY_START (WM_USER+0x5)
+
+// sent to the outer window to tell it to go to the next inner window
+#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
+
+// sent to every child window to tell it it is closing soon
+#define WM_NOTIFY_INIGO_MONTOYA (WM_USER+0xb)
+
+// update message used by DirProc and SelProc for space display
+#define WM_IN_UPDATEMSG (WM_USER+0xf)
+
+// custom pages should send this message to let NSIS know they're ready
+#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
+
+// simulates clicking on the tree
+#define WM_TREEVIEW_KEYHACK (WM_USER+0x13)
+
+// notifies a component selection change (.onMouseOverSection)
+#define WM_NOTIFY_SELCHANGE (WM_USER+0x19)
+
+// Notifies the installation type has changed by the user
+#define WM_NOTIFY_INSTTYPE_CHANGED (WM_USER+0x20)
+
+#endif//_UI_H_
diff --git a/Source/exehead/util.c b/Source/exehead/util.c
index fe1481f..afaacc7 100755
--- a/Source/exehead/util.c
+++ b/Source/exehead/util.c
@@ -1,960 +1,960 @@
-/*
- * util.c
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "../Platform.h"
-#include <shellapi.h>
-#include "util.h"
-#include "state.h"
-#include "config.h"
-#include "lang.h"
-#include "fileform.h"
-#include "exec.h"
-#include "ui.h"
-#include "resource.h"
-
-#ifdef NSIS_CONFIG_LOG
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
-char g_log_file[1024];
-#endif
-#endif
-
-// *** DO NOT DECLARE MORE VARIABLES INSIDE THIS PRAGMAS ***
-// This will produce a special section called ".ndata" (stands for nsis data)
-// this way makensis during build time, can search for this section by name
-// and change the virtual size of this section
-// which result in extra memory for extra variables without code to do allocation :)
-// nsis then removes the "DISCARDABLE" style from section (for safe)
-#ifdef _MSC_VER
-# pragma bss_seg(NSIS_VARS_SECTION)
-NSIS_STRING g_usrvars[1];
-# pragma bss_seg()
-# pragma comment(linker, "/section:" NSIS_VARS_SECTION ",rwd")
-#else
-# ifdef __GNUC__
-NSIS_STRING g_usrvars[1] __attribute__((section (NSIS_VARS_SECTION)));
-# else
-# error Unknown compiler. You must implement the seperate PE section yourself.
-# endif
-#endif
-
-HANDLE NSISCALL myCreateProcess(char *cmd)
-{
- PROCESS_INFORMATION ProcInfo;
- static STARTUPINFO StartUp;
- StartUp.cb=sizeof(StartUp);
- if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &StartUp, &ProcInfo))
- return NULL;
- CloseHandle(ProcInfo.hThread);
- return ProcInfo.hProcess;
-}
-
-/*BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val)
-{
- return SendMessage(hWnd,WM_SETTEXT,0,(LPARAM)val);
-}*/
-
-BOOL NSISCALL my_SetDialogItemText(HWND dlg, UINT idx, const char *val)
-{
- return SetDlgItemText(dlg,idx,val);
-// return my_SetWindowText(GetDlgItem(dlg, idx), val);
-}
-
-int NSISCALL my_GetDialogItemText(UINT idx, char *val)
-{
- extern HWND m_curwnd;
- return GetDlgItemText(m_curwnd, idx, val, NSIS_MAX_STRLEN);
-// return my_GetWindowText(GetDlgItem(m_curwnd, idx), val, NSIS_MAX_STRLEN);
-}
-
-int NSISCALL my_MessageBox(const char *text, UINT type) {
- int _type = type & 0x001FFFFF;
- static MSGBOXPARAMS mbp = {
- sizeof(MSGBOXPARAMS),
- 0,
- 0,
- 0,
- 0,
- 0,
- MAKEINTRESOURCE(IDI_ICON2),
- 0,
- 0,
- 0
- };
-
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- // default for silent installers
- if (g_exec_flags.silent && type >> 21)
- return type >> 21;
-#endif
- // no silent or no default, just show
- if (g_exec_flags.rtl)
- _type ^= MB_RIGHT | MB_RTLREADING;
-
- mbp.hwndOwner = g_hwnd;
- mbp.hInstance = g_hInstance;
- mbp.lpszText = text;
- mbp.lpszCaption = g_caption;
- mbp.dwStyle = _type;
-
- return MessageBoxIndirect(&mbp);
-}
-
-void NSISCALL myDelete(char *buf, int flags)
-{
- static char lbuf[NSIS_MAX_STRLEN];
-
- HANDLE h;
- WIN32_FIND_DATA fd;
- char *fn;
- int valid_dir=is_valid_instpath(buf);
-
- if ((flags & DEL_SIMPLE))
- {
- g_exec_flags.exec_error += !DeleteFile(buf);
- return;
- }
-
-#ifdef NSIS_SUPPORT_RMDIR
- if (!(flags & DEL_DIR) || (valid_dir && (flags & DEL_RECURSE)))
-#endif//NSIS_SUPPORT_RMDIR
- {
- mystrcpy(lbuf,buf);
-#ifdef NSIS_SUPPORT_RMDIR
- if (flags & DEL_DIR)
- mystrcat(lbuf,"\\*.*");
- else
-#endif//NSIS_SUPPORT_RMDIR
- trimslashtoend(buf);
-
- mystrcat(buf,"\\");
-
- fn=buf+mystrlen(buf);
-
- h = FindFirstFile(lbuf,&fd);
- if (h != INVALID_HANDLE_VALUE)
- {
- do
- {
- char *fdfn = fd.cFileName;
- if (*findchar(fdfn, '?') && *fd.cAlternateFileName)
- // name contains unicode, use short name
- fdfn = fd.cAlternateFileName;
-
-#ifdef NSIS_SUPPORT_RMDIR
- if (fdfn[0] == '.' && !fdfn[1]) continue;
- if (fdfn[0] == '.' && fdfn[1] == '.' && !fdfn[2]) continue;
-#endif//NSIS_SUPPORT_RMDIR
- {
- mystrcpy(fn,fdfn);
- if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
-#ifdef NSIS_SUPPORT_RMDIR
- if ((flags & (DEL_DIR | DEL_RECURSE)) == (DEL_DIR | DEL_RECURSE))
- {
- myDelete(buf,flags);
- }
-#endif//NSIS_SUPPORT_RMDIR
- }
- else
- {
- log_printf2("Delete: DeleteFile(\"%s\")",buf);
- remove_ro_attr(buf);
- if (!DeleteFile(buf))
- {
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- if (flags & DEL_REBOOT)
- {
- log_printf2("Delete: DeleteFile on Reboot(\"%s\")",buf);
- update_status_text(LANG_DELETEONREBOOT,buf);
- MoveFileOnReboot(buf,NULL);
- }
- else
-#endif//NSIS_SUPPORT_MOVEONREBOOT
- {
- log_printf2("Delete: DeleteFile failed(\"%s\")",buf);
- g_exec_flags.exec_error++;
- }
- }
- else
- update_status_text(LANG_DELETEFILE,buf);
- }
- }
- } while (FindNextFile(h,&fd));
- FindClose(h);
- }
-
-#ifdef NSIS_SUPPORT_RMDIR
- if (flags & DEL_DIR)
- fn[-1]=0;
-#endif//NSIS_SUPPORT_RMDIR
- }
-
-#ifdef NSIS_SUPPORT_RMDIR
- if ((flags & DEL_DIR))
- {
- if (!valid_dir)
- {
- log_printf2("RMDir: RemoveDirectory invalid input(\"%s\")",buf);
- g_exec_flags.exec_error++;
- }
- else if (file_exists(buf))
- {
- addtrailingslash(buf);
- log_printf2("RMDir: RemoveDirectory(\"%s\")",buf);
- remove_ro_attr(buf);
- if (!RemoveDirectory(buf))
- {
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- if (flags & DEL_REBOOT)
- {
- log_printf2("RMDir: RemoveDirectory on Reboot(\"%s\")",buf);
- update_status_text(LANG_DELETEONREBOOT,buf);
- MoveFileOnReboot(buf,NULL);
- }
- else
-#endif//NSIS_SUPPORT_MOVEONREBOOT
- {
- log_printf2("RMDir: RemoveDirectory failed(\"%s\")",buf);
- g_exec_flags.exec_error++;
- }
- }
- else
- {
- update_status_text(LANG_REMOVEDIR,buf);
- }
- }
- }
-#endif//NSIS_SUPPORT_RMDIR
-}
-
-char *NSISCALL addtrailingslash(char *str)
-{
- if (lastchar(str)!='\\') mystrcat(str,"\\");
- return str;
-}
-
-/*char NSISCALL lastchar(const char *str)
-{
- return *CharPrev(str,str+mystrlen(str));
-}*/
-
-char * NSISCALL findchar(char *str, char c)
-{
- while (*str && *str != c)
- {
- str = CharNext(str);
- }
- return str;
-}
-
-char * NSISCALL trimslashtoend(char *buf)
-{
- char *p = buf + mystrlen(buf);
- do
- {
- if (*p == '\\')
- break;
- p = CharPrev(buf, p);
- } while (p > buf);
-
- *p = 0;
-
- return p + 1;
-}
-
-int NSISCALL validpathspec(char *ubuf)
-{
- char dl = ubuf[0] | 0x20; // convert alleged drive letter to lower case
- return ((*(WORD*)ubuf==CHAR2_TO_WORD('\\','\\')) || (dl >= 'a' && dl <= 'z' && ubuf[1]==':'));
-}
-
-char * NSISCALL skip_root(char *path)
-{
- char *p = CharNext(path);
- char *p2 = CharNext(p);
-
- if (*path && *(WORD*)p == CHAR2_TO_WORD(':', '\\'))
- {
- return CharNext(p2);
- }
- else if (*(WORD*)path == CHAR2_TO_WORD('\\','\\'))
- {
- // skip host and share name
- int x = 2;
- while (x--)
- {
- p2 = findchar(p2, '\\');
- if (!*p2)
- return NULL;
- p2++; // skip backslash
- }
-
- return p2;
- }
- else
- return NULL;
-}
-
-int NSISCALL is_valid_instpath(char *s)
-{
- static char tmp[NSIS_MAX_STRLEN];
- char *root;
-
- mystrcpy(tmp, s);
-
- root = skip_root(tmp);
-
- if (!root)
- return 0;
-
- // must be called after skip_root or AllowRootDirInstall won't work.
- // validate_filename removes trailing blackslashes and so converts
- // "C:\" to "C:" which is not a valid directory. skip_root returns
- // NULL for "C:" so the above test returns 0.
- // validate_filename is called so directories such as "C:\ " will
- // not pass as a valid non-root directory.
- validate_filename(root);
-
- if ((g_flags & CH_FLAGS_NO_ROOT_DIR) && (!*root || *root == '\\'))
- return 0;
-
- while (mystrlen(tmp) > root - tmp)
- {
- WIN32_FIND_DATA *fd = file_exists(tmp);
- // if the directory bit not set then it's a file, which is not a valid inst dir...
- // GetFileAttributes is not used because it doesn't work with certain files (error 32)
- // as for concerns of the user using * or ?, that's invalid anyway...
- if (fd && !(fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
- return 0;
- trimslashtoend(tmp);
- }
-
- // if the root drive exists
- addtrailingslash(tmp); // don't check the current directory, check the root directory
- if (GetFileAttributes(tmp) == INVALID_FILE_ATTRIBUTES)
- return 0;
-
- return 1;
-}
-
-char * NSISCALL mystrstri(char *a, const char *b)
-{
- int l = mystrlen(b);
- while (mystrlen(a) >= l)
- {
- char c = a[l];
- a[l] = 0;
- if (!lstrcmpi(a, b))
- {
- a[l] = c;
- return a;
- }
- a[l] = c;
- a = CharNext(a);
- }
- return NULL;
-}
-
-void NSISCALL mini_memcpy(void *out, const void *in, int len)
-{
- char *c_out=(char*)out;
- char *c_in=(char *)in;
- while (len-- > 0)
- {
- *c_out++=*c_in++;
- }
-}
-
-void NSISCALL remove_ro_attr(char *file)
-{
- int attr = GetFileAttributes(file);
- if (attr != INVALID_FILE_ATTRIBUTES)
- SetFileAttributes(file,attr&(~FILE_ATTRIBUTE_READONLY));
-}
-
-HANDLE NSISCALL myOpenFile(const char *fn, DWORD da, DWORD cd)
-{
- int attr = GetFileAttributes(fn);
- return CreateFile(
- fn,
- da,
- FILE_SHARE_READ,
- NULL,
- cd,
- attr == INVALID_FILE_ATTRIBUTES ? 0 : attr,
- NULL
- );
-}
-
-char * NSISCALL my_GetTempFileName(char *buf, const char *dir)
-{
- int n = 100;
- while (n--)
- {
- char prefix[4];
- *(LPDWORD)prefix = CHAR4_TO_DWORD('n', 's', 'a', 0);
- prefix[2] += (char)(GetTickCount() % 26);
- if (GetTempFileName(dir, prefix, 0, buf))
- return buf;
- }
- *buf = 0;
- return 0;
-}
-
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
-void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
-{
- BOOL fOk = 0;
- typedef BOOL (WINAPI *mfea_t)(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
- mfea_t mfea;
- mfea=(mfea_t) myGetProcAddress(MGA_MoveFileExA);
- if (mfea)
- {
- fOk=mfea(pszExisting, pszNew, MOVEFILE_DELAY_UNTIL_REBOOT|MOVEFILE_REPLACE_EXISTING);
- }
-
- if (!fOk)
- {
- static char szRenameLine[1024];
- static char wininit[1024];
- static char tmpbuf[1024];
- int cchRenameLine;
- static const char szRenameSec[] = "[Rename]\r\n";
- HANDLE hfile;
- DWORD dwFileSize;
- DWORD dwBytes;
- DWORD dwRenameLinePos;
- char *pszWinInit;
-
- int spn;
-
- *(DWORD*)tmpbuf = CHAR4_TO_DWORD('N', 'U', 'L', 0);
-
- if (pszNew) {
- // create the file if it's not already there to prevent GetShortPathName from failing
- CloseHandle(myOpenFile(pszNew,0,CREATE_NEW));
- spn = GetShortPathName(pszNew,tmpbuf,1024);
- if (!spn || spn > 1024)
- return;
- }
- // wininit is used as a temporary here
- spn = GetShortPathName(pszExisting,wininit,1024);
- if (!spn || spn > 1024)
- return;
- cchRenameLine = wsprintf(szRenameLine,"%s=%s\r\n",tmpbuf,wininit);
-
- GetNSISString(wininit, g_header->str_wininit);
- hfile = myOpenFile(wininit, GENERIC_READ | GENERIC_WRITE, OPEN_ALWAYS);
-
- if (hfile != INVALID_HANDLE_VALUE)
- {
- dwFileSize = GetFileSize(hfile, NULL);
- pszWinInit = GlobalAlloc(GPTR, dwFileSize + cchRenameLine + 10);
-
- if (pszWinInit != NULL)
- {
- if (ReadFile(hfile, pszWinInit, dwFileSize, &dwBytes, NULL) && dwFileSize == dwBytes)
- {
- LPSTR pszRenameSecInFile = mystrstri(pszWinInit, szRenameSec);
- if (pszRenameSecInFile == NULL)
- {
- mystrcpy(pszWinInit+dwFileSize, szRenameSec);
- dwFileSize += 10;
- dwRenameLinePos = dwFileSize;
- }
- else
- {
- char *pszFirstRenameLine = pszRenameSecInFile+10;
- char *pszNextSec = mystrstri(pszFirstRenameLine,"\n[");
- if (pszNextSec)
- {
- char *p = ++pszNextSec;
- while (p < pszWinInit + dwFileSize) {
- p[cchRenameLine] = *p;
- p++;
- }
-
- dwRenameLinePos = pszNextSec - pszWinInit;
- }
- // rename section is last, stick item at end of file
- else dwRenameLinePos = dwFileSize;
- }
-
- mini_memcpy(&pszWinInit[dwRenameLinePos], szRenameLine, cchRenameLine);
- dwFileSize += cchRenameLine;
-
- SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
- WriteFile(hfile, pszWinInit, dwFileSize, &dwBytes, NULL);
-
- GlobalFree(pszWinInit);
- }
- }
-
- CloseHandle(hfile);
- }
- }
-
-#ifdef NSIS_SUPPORT_REBOOT
- g_exec_flags.exec_reboot++;
-#endif
-}
-#endif
-
-void NSISCALL myRegGetStr(HKEY root, const char *sub, const char *name, char *out, int x64)
-{
- HKEY hKey;
- *out=0;
- if (RegOpenKeyEx(root,sub,0,KEY_READ|(x64?KEY_WOW64_64KEY:0),&hKey) == ERROR_SUCCESS)
- {
- DWORD l = NSIS_MAX_STRLEN;
- DWORD t;
- if (RegQueryValueEx(hKey,name,NULL,&t,out,&l ) != ERROR_SUCCESS || (t != REG_SZ && t != REG_EXPAND_SZ)) *out=0;
- out[NSIS_MAX_STRLEN-1]=0;
- RegCloseKey(hKey);
- }
-}
-
-void NSISCALL myitoa(char *s, int d)
-{
- static const char c[] = "%d";
- wsprintf(s,c,d);
-}
-
-int NSISCALL myatoi(char *s)
-{
- unsigned int v=0;
- int sign=1; // sign of positive
- char m=10; // base of 10
- char t='9'; // cap top of numbers at 9
-
- if (*s == '-')
- {
- s++; //skip over -
- sign=-1; // sign flip
- }
-
- if (*s == '0')
- {
- s++; // skip over 0
- if (s[0] >= '0' && s[0] <= '7')
- {
- m=8; // base of 8
- t='7'; // cap top at 7
- }
- if ((s[0] & ~0x20) == 'X')
- {
- m=16; // base of 16
- s++; // advance over 'x'
- }
- }
-
- for (;;)
- {
- int c=*s++;
- if (c >= '0' && c <= t) c-='0';
- else if (m==16 && (c & ~0x20) >= 'A' && (c & ~0x20) <= 'F') c = (c & 7) + 9;
- else break;
- v*=m;
- v+=c;
- }
- return ((int)v)*sign;
-}
-
-// Straight copies of selected shell functions. Calling local functions
-// requires less code than DLL functions. For the savings to outweigh the cost
-// of a new function there should be about a couple of dozen or so calls.
-char * NSISCALL mystrcpy(char *out, const char *in)
-{
- return lstrcpyn(out, in, NSIS_MAX_STRLEN);
-}
-
-int NSISCALL mystrlen(const char *in)
-{
- return lstrlen(in);
-}
-
-char * NSISCALL mystrcat(char *out, const char *concat)
-{
- return lstrcat(out, concat);
-}
-
-char ps_tmpbuf[NSIS_MAX_STRLEN*2];
-
-const char SYSREGKEY[] = "Software\\Microsoft\\Windows\\CurrentVersion";
-const char QUICKLAUNCH[] = "\\Microsoft\\Internet Explorer\\Quick Launch";
-
-typedef HRESULT (__stdcall * PFNSHGETFOLDERPATHA)(HWND, int, HANDLE, DWORD, LPSTR);
-extern void *g_SHGetFolderPath;
-
-// Based on Dave Laundon's simplified process_string
-char * NSISCALL GetNSISString(char *outbuf, int strtab)
-{
- char *in = (char*)GetNSISStringNP(GetNSISTab(strtab));
- char *out = ps_tmpbuf;
- if ((unsigned int) (outbuf - ps_tmpbuf) < sizeof(ps_tmpbuf))
- {
- out = outbuf;
- outbuf = 0;
- }
- while (*in && out - ps_tmpbuf < NSIS_MAX_STRLEN)
- {
- unsigned char nVarIdx = (unsigned char)*in++;
- int nData;
- int fldrs[4];
- if (nVarIdx > NS_CODES_START)
- {
- nData = ((in[1] & 0x7F) << 7) | (in[0] & 0x7F);
- fldrs[0] = in[0]; // current user
- fldrs[1] = in[0] | CSIDL_FLAG_CREATE;
- fldrs[2] = in[1]; // all users
- fldrs[3] = in[1] | CSIDL_FLAG_CREATE;
- in += 2;
-
- if (nVarIdx == NS_SHELL_CODE)
- {
- LPITEMIDLIST idl;
-
- int x = 2;
- DWORD ver = GetVersion();
-
- /*
-
- SHGetFolderPath as provided by shfolder.dll is used to get special folders
- unless the installer is running on Windows 95/98. For 95/98 shfolder.dll is
- only used for the Application Data and Documents folder (if the DLL exists).
- Oherwise, the old SHGetSpecialFolderLocation API is called.
-
- There reason for not using shfolder.dll for all folders on 95/98 is that
- some unsupported folders (such as the Start Menu folder for all users) are
- simulated instead of returning an error so whe can fall back on the folder
- for the current user.
-
- SHGetFolderPath in shell32.dll could be called directly for Windows versions
- later than 95/98 but there is no need to do so, because shfolder.dll is still
- provided and calls shell32.dll.
-
- */
-
- BOOL use_shfolder =
- // Use shfolder if not on 95/98
- !((ver & 0x80000000) && (LOWORD(ver) != 0x5A04)) ||
-
- // Unless the Application Data or Documents folder is requested
- (
- (fldrs[2] == CSIDL_COMMON_APPDATA) ||
- (fldrs[2] == CSIDL_COMMON_DOCUMENTS)
- );
-
- /* Carry on... shfolder stuff is over. */
-
- if (g_exec_flags.all_user_var)
- {
- x = 4;
- }
-
- if (fldrs[0] & 0x80)
- {
- myRegGetStr(HKEY_LOCAL_MACHINE, SYSREGKEY, GetNSISStringNP(fldrs[0] & 0x3F), out, fldrs[0] & 0x40);
- if (!*out)
- GetNSISString(out, fldrs[2]);
- x = 0;
- }
- else if (fldrs[0] == CSIDL_SYSTEM)
- {
- GetSystemDirectory(out, NSIS_MAX_STRLEN);
- x = 0;
- }
- else if (fldrs[0] == CSIDL_WINDOWS)
- {
- GetWindowsDirectory(out, NSIS_MAX_STRLEN);
- x = 0;
- }
-
- while (x--)
- {
- if (g_SHGetFolderPath && use_shfolder)
- {
- PFNSHGETFOLDERPATHA SHGetFolderPathFunc = (PFNSHGETFOLDERPATHA) g_SHGetFolderPath;
- if (!SHGetFolderPathFunc(g_hwnd, fldrs[x], NULL, SHGFP_TYPE_CURRENT, out))
- {
- break;
- }
- }
-
- if (!SHGetSpecialFolderLocation(g_hwnd, fldrs[x], &idl))
- {
- BOOL res = SHGetPathFromIDList(idl, out);
- CoTaskMemFree(idl);
- if (res) break;
- }
-
- *out=0;
- }
-
- if (*out)
- {
- // all users' version is CSIDL_APPDATA only for $QUICKLAUNCH
- // for normal $APPDATA, it'd be CSIDL_APPDATA_COMMON
- if (fldrs[2] == CSIDL_APPDATA)
- {
- mystrcat(out, QUICKLAUNCH);
- }
- }
- validate_filename(out);
- }
- else if (nVarIdx == NS_VAR_CODE)
- {
- if (nData == 29) // $HWNDPARENT
- myitoa(out, (unsigned int) g_hwnd);
- else
- mystrcpy(out, g_usrvars[nData]);
- // validate the directory name
- if ((unsigned int)(nData - 21) < 7) {
- // validate paths for $INSTDIR, $OUTDIR, $EXEDIR, $LANGUAGE, $TEMP, $PLUGINSDIR and $EXEPATH
- // $LANGUAGE is just a number anyway...
- validate_filename(out);
- }
- } // == VAR_CODES_START
- else if (nVarIdx == NS_LANG_CODE)
- {
- GetNSISString(out, -nData-1);
- }
- out += mystrlen(out);
- }
- else if (nVarIdx == NS_SKIP_CODE)
- {
- *out++ = *in++;
- }
- else // Normal char
- {
- *out++ = nVarIdx;
- }
- } // while
- *out = 0;
- if (outbuf)
- return mystrcpy(outbuf, ps_tmpbuf);
- return ps_tmpbuf;
-}
-
-void NSISCALL validate_filename(char *in) {
- char *nono = "*?|<>/\":";
- char *out;
- char *out_save;
-
- // ignoring spaces is wrong, " C:\blah" is invalid
- //while (*in == ' ') in = CharNext(in);
-
- if (in[0] == '\\' && in[1] == '\\' && in[2] == '?' && in[3] == '\\')
- {
- // at least four bytes
- in += 4;
- }
- if (*in)
- {
- // at least two bytes
- if (validpathspec(in)) in += 2;
- }
- out = out_save = in;
- while (*in)
- {
- if ((unsigned char)*in > 31 && !*findchar(nono, *in))
- {
- mini_memcpy(out, in, CharNext(in) - in);
- out = CharNext(out);
- }
- in = CharNext(in);
- }
- *out = 0;
- do
- {
- out = CharPrev(out_save, out);
- if (*out == ' ' || *out == '\\')
- *out = 0;
- else
- break;
- } while (out_save < out);
-}
-
-#ifdef NSIS_CONFIG_LOG
-int log_dolog;
-char log_text[2048]; // 1024 for each wsprintf
-
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
-void NSISCALL log_write(int close)
-{
- static HANDLE fp=INVALID_HANDLE_VALUE;
- if (close)
- {
- if (fp!=INVALID_HANDLE_VALUE)
- {
- CloseHandle(fp);
- }
- fp=INVALID_HANDLE_VALUE;
- return;
- }
- if (log_dolog)
- {
- if (g_log_file[0] && fp==INVALID_HANDLE_VALUE)
- {
- fp = myOpenFile(g_log_file,GENERIC_WRITE,OPEN_ALWAYS);
- if (fp!=INVALID_HANDLE_VALUE)
- SetFilePointer(fp,0,NULL,FILE_END);
- }
- if (fp!=INVALID_HANDLE_VALUE)
- {
- DWORD d;
- mystrcat(log_text,"\r\n");
- WriteFile(fp,log_text,mystrlen(log_text),&d,NULL);
- }
- }
-}
-#endif//!NSIS_CONFIG_LOG_ODS && !NSIS_CONFIG_LOG_STDOUT
-
-const char * _RegKeyHandleToName(HKEY hKey)
-{
- if (hKey == HKEY_CLASSES_ROOT)
- return "HKEY_CLASSES_ROOT";
- else if (hKey == HKEY_CURRENT_USER)
- return "HKEY_CURRENT_USER";
- else if (hKey == HKEY_LOCAL_MACHINE)
- return "HKEY_LOCAL_MACHINE";
- else if (hKey == HKEY_USERS)
- return "HKEY_USERS";
- else if (hKey == HKEY_PERFORMANCE_DATA)
- return "HKEY_PERFORMANCE_DATA";
- else if (hKey == HKEY_CURRENT_CONFIG)
- return "HKEY_CURRENT_CONFIG";
- else if (hKey == HKEY_DYN_DATA)
- return "HKEY_DYN_DATA";
- else
- return "invalid registry key";
-}
-
-void _LogData2Hex(char *buf, size_t buflen, unsigned char *data, size_t datalen)
-{
- char *p = buf;
-
- size_t i;
-
- int dots = 0;
- size_t bufbytes = buflen / 3; // 2 hex digits, one space/null
-
- if (datalen > bufbytes)
- {
- bufbytes--;
- dots = 1;
- }
- else
- bufbytes = datalen;
-
- for (i = 0; i < bufbytes; i++)
- {
- wsprintf(p, "%02x%c", data[i], (i == bufbytes - 1) ? '\0' : ' ');
- p += 3;
- }
-
- if (dots)
- mystrcat(buf, "...");
-}
-
-#ifdef NSIS_CONFIG_LOG_TIMESTAMP
-void log_timestamp(char *buf)
-{
- SYSTEMTIME st;
- GetLocalTime(&st);
- wsprintf(buf,"[%04hu/%02hu/%02hu %02hu:%02hu:%02hu] ", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
-}
-#else
-# define log_timestamp(x)
-#endif//NSIS_CONFIG_LOG_TIMESTAMP
-
-void log_printf(char *format, ...)
-{
- va_list val;
- va_start(val,format);
-
- log_text[0] = '\0';
- log_timestamp(log_text);
- wvsprintf(log_text+mystrlen(log_text),format,val);
-
- va_end(val);
-#ifdef NSIS_CONFIG_LOG_ODS
- if (log_dolog)
- OutputDebugString(log_text);
-#endif
-#ifdef NSIS_CONFIG_LOG_STDOUT
- if (log_dolog && GetStdHandle(STD_OUTPUT_HANDLE) != INVALID_HANDLE_VALUE)
- {
- DWORD dwBytes;
- WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), log_text, lstrlen(log_text), &dwBytes, NULL);
- WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), "\n", 1, &dwBytes, NULL);
- }
-#endif
-#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
- log_write(0);
-#endif
-}
-#endif//NSIS_CONFIG_LOG
-
-WIN32_FIND_DATA * NSISCALL file_exists(char *buf)
-{
- HANDLE h;
- static WIN32_FIND_DATA fd;
- h = FindFirstFile(buf,&fd);
- if (h != INVALID_HANDLE_VALUE)
- {
- FindClose(h);
- return &fd;
- }
- return NULL;
-}
-
-struct MGA_FUNC
-{
- const char *dll;
- const char *func;
-};
-
-struct MGA_FUNC MGA_FUNCS[] = {
- {"KERNEL32", "GetDiskFreeSpaceExA"},
- {"KERNEL32", "MoveFileExA"},
- {"ADVAPI32", "RegDeleteKeyExA"},
- {"ADVAPI32", "OpenProcessToken"},
- {"ADVAPI32", "LookupPrivilegeValueA"},
- {"ADVAPI32", "AdjustTokenPrivileges"},
- {"KERNEL32", "GetUserDefaultUILanguage"},
- {"SHLWAPI", "SHAutoComplete"},
- {"SHFOLDER", "SHGetFolderPathA"}
-};
-
-void * NSISCALL myGetProcAddress(const enum myGetProcAddressFunctions func)
-{
- const char *dll = MGA_FUNCS[func].dll;
- HMODULE hModule = GetModuleHandle(dll);
- if (!hModule)
- hModule = LoadLibrary(dll);
- if (!hModule)
- return NULL;
-
- return GetProcAddress(hModule, MGA_FUNCS[func].func);
-}
-
-void NSISCALL MessageLoop(UINT uCheckedMsg)
-{
- MSG msg;
- while (PeekMessage(&msg, NULL, uCheckedMsg, uCheckedMsg, PM_REMOVE))
- DispatchMessage(&msg);
-}
+/*
+ * util.c
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "../Platform.h"
+#include <shellapi.h>
+#include "util.h"
+#include "state.h"
+#include "config.h"
+#include "lang.h"
+#include "fileform.h"
+#include "exec.h"
+#include "ui.h"
+#include "resource.h"
+
+#ifdef NSIS_CONFIG_LOG
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+char g_log_file[1024];
+#endif
+#endif
+
+// *** DO NOT DECLARE MORE VARIABLES INSIDE THIS PRAGMAS ***
+// This will produce a special section called ".ndata" (stands for nsis data)
+// this way makensis during build time, can search for this section by name
+// and change the virtual size of this section
+// which result in extra memory for extra variables without code to do allocation :)
+// nsis then removes the "DISCARDABLE" style from section (for safe)
+#ifdef _MSC_VER
+# pragma bss_seg(NSIS_VARS_SECTION)
+NSIS_STRING g_usrvars[1];
+# pragma bss_seg()
+# pragma comment(linker, "/section:" NSIS_VARS_SECTION ",rwd")
+#else
+# ifdef __GNUC__
+NSIS_STRING g_usrvars[1] __attribute__((section (NSIS_VARS_SECTION)));
+# else
+# error Unknown compiler. You must implement the seperate PE section yourself.
+# endif
+#endif
+
+HANDLE NSISCALL myCreateProcess(char *cmd)
+{
+ PROCESS_INFORMATION ProcInfo;
+ static STARTUPINFO StartUp;
+ StartUp.cb=sizeof(StartUp);
+ if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &StartUp, &ProcInfo))
+ return NULL;
+ CloseHandle(ProcInfo.hThread);
+ return ProcInfo.hProcess;
+}
+
+/*BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val)
+{
+ return SendMessage(hWnd,WM_SETTEXT,0,(LPARAM)val);
+}*/
+
+BOOL NSISCALL my_SetDialogItemText(HWND dlg, UINT idx, const char *val)
+{
+ return SetDlgItemText(dlg,idx,val);
+// return my_SetWindowText(GetDlgItem(dlg, idx), val);
+}
+
+int NSISCALL my_GetDialogItemText(UINT idx, char *val)
+{
+ extern HWND m_curwnd;
+ return GetDlgItemText(m_curwnd, idx, val, NSIS_MAX_STRLEN);
+// return my_GetWindowText(GetDlgItem(m_curwnd, idx), val, NSIS_MAX_STRLEN);
+}
+
+int NSISCALL my_MessageBox(const char *text, UINT type) {
+ int _type = type & 0x001FFFFF;
+ static MSGBOXPARAMS mbp = {
+ sizeof(MSGBOXPARAMS),
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ MAKEINTRESOURCE(IDI_ICON2),
+ 0,
+ 0,
+ 0
+ };
+
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ // default for silent installers
+ if (g_exec_flags.silent && type >> 21)
+ return type >> 21;
+#endif
+ // no silent or no default, just show
+ if (g_exec_flags.rtl)
+ _type ^= MB_RIGHT | MB_RTLREADING;
+
+ mbp.hwndOwner = g_hwnd;
+ mbp.hInstance = g_hInstance;
+ mbp.lpszText = text;
+ mbp.lpszCaption = g_caption;
+ mbp.dwStyle = _type;
+
+ return MessageBoxIndirect(&mbp);
+}
+
+void NSISCALL myDelete(char *buf, int flags)
+{
+ static char lbuf[NSIS_MAX_STRLEN];
+
+ HANDLE h;
+ WIN32_FIND_DATA fd;
+ char *fn;
+ int valid_dir=is_valid_instpath(buf);
+
+ if ((flags & DEL_SIMPLE))
+ {
+ g_exec_flags.exec_error += !DeleteFile(buf);
+ return;
+ }
+
+#ifdef NSIS_SUPPORT_RMDIR
+ if (!(flags & DEL_DIR) || (valid_dir && (flags & DEL_RECURSE)))
+#endif//NSIS_SUPPORT_RMDIR
+ {
+ mystrcpy(lbuf,buf);
+#ifdef NSIS_SUPPORT_RMDIR
+ if (flags & DEL_DIR)
+ mystrcat(lbuf,"\\*.*");
+ else
+#endif//NSIS_SUPPORT_RMDIR
+ trimslashtoend(buf);
+
+ mystrcat(buf,"\\");
+
+ fn=buf+mystrlen(buf);
+
+ h = FindFirstFile(lbuf,&fd);
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ char *fdfn = fd.cFileName;
+ if (*findchar(fdfn, '?') && *fd.cAlternateFileName)
+ // name contains unicode, use short name
+ fdfn = fd.cAlternateFileName;
+
+#ifdef NSIS_SUPPORT_RMDIR
+ if (fdfn[0] == '.' && !fdfn[1]) continue;
+ if (fdfn[0] == '.' && fdfn[1] == '.' && !fdfn[2]) continue;
+#endif//NSIS_SUPPORT_RMDIR
+ {
+ mystrcpy(fn,fdfn);
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+#ifdef NSIS_SUPPORT_RMDIR
+ if ((flags & (DEL_DIR | DEL_RECURSE)) == (DEL_DIR | DEL_RECURSE))
+ {
+ myDelete(buf,flags);
+ }
+#endif//NSIS_SUPPORT_RMDIR
+ }
+ else
+ {
+ log_printf2("Delete: DeleteFile(\"%s\")",buf);
+ remove_ro_attr(buf);
+ if (!DeleteFile(buf))
+ {
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ if (flags & DEL_REBOOT)
+ {
+ log_printf2("Delete: DeleteFile on Reboot(\"%s\")",buf);
+ update_status_text(LANG_DELETEONREBOOT,buf);
+ MoveFileOnReboot(buf,NULL);
+ }
+ else
+#endif//NSIS_SUPPORT_MOVEONREBOOT
+ {
+ log_printf2("Delete: DeleteFile failed(\"%s\")",buf);
+ g_exec_flags.exec_error++;
+ }
+ }
+ else
+ update_status_text(LANG_DELETEFILE,buf);
+ }
+ }
+ } while (FindNextFile(h,&fd));
+ FindClose(h);
+ }
+
+#ifdef NSIS_SUPPORT_RMDIR
+ if (flags & DEL_DIR)
+ fn[-1]=0;
+#endif//NSIS_SUPPORT_RMDIR
+ }
+
+#ifdef NSIS_SUPPORT_RMDIR
+ if ((flags & DEL_DIR))
+ {
+ if (!valid_dir)
+ {
+ log_printf2("RMDir: RemoveDirectory invalid input(\"%s\")",buf);
+ g_exec_flags.exec_error++;
+ }
+ else if (file_exists(buf))
+ {
+ addtrailingslash(buf);
+ log_printf2("RMDir: RemoveDirectory(\"%s\")",buf);
+ remove_ro_attr(buf);
+ if (!RemoveDirectory(buf))
+ {
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ if (flags & DEL_REBOOT)
+ {
+ log_printf2("RMDir: RemoveDirectory on Reboot(\"%s\")",buf);
+ update_status_text(LANG_DELETEONREBOOT,buf);
+ MoveFileOnReboot(buf,NULL);
+ }
+ else
+#endif//NSIS_SUPPORT_MOVEONREBOOT
+ {
+ log_printf2("RMDir: RemoveDirectory failed(\"%s\")",buf);
+ g_exec_flags.exec_error++;
+ }
+ }
+ else
+ {
+ update_status_text(LANG_REMOVEDIR,buf);
+ }
+ }
+ }
+#endif//NSIS_SUPPORT_RMDIR
+}
+
+char *NSISCALL addtrailingslash(char *str)
+{
+ if (lastchar(str)!='\\') mystrcat(str,"\\");
+ return str;
+}
+
+/*char NSISCALL lastchar(const char *str)
+{
+ return *CharPrev(str,str+mystrlen(str));
+}*/
+
+char * NSISCALL findchar(char *str, char c)
+{
+ while (*str && *str != c)
+ {
+ str = CharNext(str);
+ }
+ return str;
+}
+
+char * NSISCALL trimslashtoend(char *buf)
+{
+ char *p = buf + mystrlen(buf);
+ do
+ {
+ if (*p == '\\')
+ break;
+ p = CharPrev(buf, p);
+ } while (p > buf);
+
+ *p = 0;
+
+ return p + 1;
+}
+
+int NSISCALL validpathspec(char *ubuf)
+{
+ char dl = ubuf[0] | 0x20; // convert alleged drive letter to lower case
+ return ((*(WORD*)ubuf==CHAR2_TO_WORD('\\','\\')) || (dl >= 'a' && dl <= 'z' && ubuf[1]==':'));
+}
+
+char * NSISCALL skip_root(char *path)
+{
+ char *p = CharNext(path);
+ char *p2 = CharNext(p);
+
+ if (*path && *(WORD*)p == CHAR2_TO_WORD(':', '\\'))
+ {
+ return CharNext(p2);
+ }
+ else if (*(WORD*)path == CHAR2_TO_WORD('\\','\\'))
+ {
+ // skip host and share name
+ int x = 2;
+ while (x--)
+ {
+ p2 = findchar(p2, '\\');
+ if (!*p2)
+ return NULL;
+ p2++; // skip backslash
+ }
+
+ return p2;
+ }
+ else
+ return NULL;
+}
+
+int NSISCALL is_valid_instpath(char *s)
+{
+ static char tmp[NSIS_MAX_STRLEN];
+ char *root;
+
+ mystrcpy(tmp, s);
+
+ root = skip_root(tmp);
+
+ if (!root)
+ return 0;
+
+ // must be called after skip_root or AllowRootDirInstall won't work.
+ // validate_filename removes trailing blackslashes and so converts
+ // "C:\" to "C:" which is not a valid directory. skip_root returns
+ // NULL for "C:" so the above test returns 0.
+ // validate_filename is called so directories such as "C:\ " will
+ // not pass as a valid non-root directory.
+ validate_filename(root);
+
+ if ((g_flags & CH_FLAGS_NO_ROOT_DIR) && (!*root || *root == '\\'))
+ return 0;
+
+ while (mystrlen(tmp) > root - tmp)
+ {
+ WIN32_FIND_DATA *fd = file_exists(tmp);
+ // if the directory bit not set then it's a file, which is not a valid inst dir...
+ // GetFileAttributes is not used because it doesn't work with certain files (error 32)
+ // as for concerns of the user using * or ?, that's invalid anyway...
+ if (fd && !(fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
+ return 0;
+ trimslashtoend(tmp);
+ }
+
+ // if the root drive exists
+ addtrailingslash(tmp); // don't check the current directory, check the root directory
+ if (GetFileAttributes(tmp) == INVALID_FILE_ATTRIBUTES)
+ return 0;
+
+ return 1;
+}
+
+char * NSISCALL mystrstri(char *a, const char *b)
+{
+ int l = mystrlen(b);
+ while (mystrlen(a) >= l)
+ {
+ char c = a[l];
+ a[l] = 0;
+ if (!lstrcmpi(a, b))
+ {
+ a[l] = c;
+ return a;
+ }
+ a[l] = c;
+ a = CharNext(a);
+ }
+ return NULL;
+}
+
+void NSISCALL mini_memcpy(void *out, const void *in, int len)
+{
+ char *c_out=(char*)out;
+ char *c_in=(char *)in;
+ while (len-- > 0)
+ {
+ *c_out++=*c_in++;
+ }
+}
+
+void NSISCALL remove_ro_attr(char *file)
+{
+ int attr = GetFileAttributes(file);
+ if (attr != INVALID_FILE_ATTRIBUTES)
+ SetFileAttributes(file,attr&(~FILE_ATTRIBUTE_READONLY));
+}
+
+HANDLE NSISCALL myOpenFile(const char *fn, DWORD da, DWORD cd)
+{
+ int attr = GetFileAttributes(fn);
+ return CreateFile(
+ fn,
+ da,
+ FILE_SHARE_READ,
+ NULL,
+ cd,
+ attr == INVALID_FILE_ATTRIBUTES ? 0 : attr,
+ NULL
+ );
+}
+
+char * NSISCALL my_GetTempFileName(char *buf, const char *dir)
+{
+ int n = 100;
+ while (n--)
+ {
+ char prefix[4];
+ *(LPDWORD)prefix = CHAR4_TO_DWORD('n', 's', 'a', 0);
+ prefix[2] += (char)(GetTickCount() % 26);
+ if (GetTempFileName(dir, prefix, 0, buf))
+ return buf;
+ }
+ *buf = 0;
+ return 0;
+}
+
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
+{
+ BOOL fOk = 0;
+ typedef BOOL (WINAPI *mfea_t)(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
+ mfea_t mfea;
+ mfea=(mfea_t) myGetProcAddress(MGA_MoveFileExA);
+ if (mfea)
+ {
+ fOk=mfea(pszExisting, pszNew, MOVEFILE_DELAY_UNTIL_REBOOT|MOVEFILE_REPLACE_EXISTING);
+ }
+
+ if (!fOk)
+ {
+ static char szRenameLine[1024];
+ static char wininit[1024];
+ static char tmpbuf[1024];
+ int cchRenameLine;
+ static const char szRenameSec[] = "[Rename]\r\n";
+ HANDLE hfile;
+ DWORD dwFileSize;
+ DWORD dwBytes;
+ DWORD dwRenameLinePos;
+ char *pszWinInit;
+
+ int spn;
+
+ *(DWORD*)tmpbuf = CHAR4_TO_DWORD('N', 'U', 'L', 0);
+
+ if (pszNew) {
+ // create the file if it's not already there to prevent GetShortPathName from failing
+ CloseHandle(myOpenFile(pszNew,0,CREATE_NEW));
+ spn = GetShortPathName(pszNew,tmpbuf,1024);
+ if (!spn || spn > 1024)
+ return;
+ }
+ // wininit is used as a temporary here
+ spn = GetShortPathName(pszExisting,wininit,1024);
+ if (!spn || spn > 1024)
+ return;
+ cchRenameLine = wsprintf(szRenameLine,"%s=%s\r\n",tmpbuf,wininit);
+
+ GetNSISString(wininit, g_header->str_wininit);
+ hfile = myOpenFile(wininit, GENERIC_READ | GENERIC_WRITE, OPEN_ALWAYS);
+
+ if (hfile != INVALID_HANDLE_VALUE)
+ {
+ dwFileSize = GetFileSize(hfile, NULL);
+ pszWinInit = GlobalAlloc(GPTR, dwFileSize + cchRenameLine + 10);
+
+ if (pszWinInit != NULL)
+ {
+ if (ReadFile(hfile, pszWinInit, dwFileSize, &dwBytes, NULL) && dwFileSize == dwBytes)
+ {
+ LPSTR pszRenameSecInFile = mystrstri(pszWinInit, szRenameSec);
+ if (pszRenameSecInFile == NULL)
+ {
+ mystrcpy(pszWinInit+dwFileSize, szRenameSec);
+ dwFileSize += 10;
+ dwRenameLinePos = dwFileSize;
+ }
+ else
+ {
+ char *pszFirstRenameLine = pszRenameSecInFile+10;
+ char *pszNextSec = mystrstri(pszFirstRenameLine,"\n[");
+ if (pszNextSec)
+ {
+ char *p = ++pszNextSec;
+ while (p < pszWinInit + dwFileSize) {
+ p[cchRenameLine] = *p;
+ p++;
+ }
+
+ dwRenameLinePos = pszNextSec - pszWinInit;
+ }
+ // rename section is last, stick item at end of file
+ else dwRenameLinePos = dwFileSize;
+ }
+
+ mini_memcpy(&pszWinInit[dwRenameLinePos], szRenameLine, cchRenameLine);
+ dwFileSize += cchRenameLine;
+
+ SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
+ WriteFile(hfile, pszWinInit, dwFileSize, &dwBytes, NULL);
+
+ GlobalFree(pszWinInit);
+ }
+ }
+
+ CloseHandle(hfile);
+ }
+ }
+
+#ifdef NSIS_SUPPORT_REBOOT
+ g_exec_flags.exec_reboot++;
+#endif
+}
+#endif
+
+void NSISCALL myRegGetStr(HKEY root, const char *sub, const char *name, char *out, int x64)
+{
+ HKEY hKey;
+ *out=0;
+ if (RegOpenKeyEx(root,sub,0,KEY_READ|(x64?KEY_WOW64_64KEY:0),&hKey) == ERROR_SUCCESS)
+ {
+ DWORD l = NSIS_MAX_STRLEN;
+ DWORD t;
+ if (RegQueryValueEx(hKey,name,NULL,&t,out,&l ) != ERROR_SUCCESS || (t != REG_SZ && t != REG_EXPAND_SZ)) *out=0;
+ out[NSIS_MAX_STRLEN-1]=0;
+ RegCloseKey(hKey);
+ }
+}
+
+void NSISCALL myitoa(char *s, int d)
+{
+ static const char c[] = "%d";
+ wsprintf(s,c,d);
+}
+
+int NSISCALL myatoi(char *s)
+{
+ unsigned int v=0;
+ int sign=1; // sign of positive
+ char m=10; // base of 10
+ char t='9'; // cap top of numbers at 9
+
+ if (*s == '-')
+ {
+ s++; //skip over -
+ sign=-1; // sign flip
+ }
+
+ if (*s == '0')
+ {
+ s++; // skip over 0
+ if (s[0] >= '0' && s[0] <= '7')
+ {
+ m=8; // base of 8
+ t='7'; // cap top at 7
+ }
+ if ((s[0] & ~0x20) == 'X')
+ {
+ m=16; // base of 16
+ s++; // advance over 'x'
+ }
+ }
+
+ for (;;)
+ {
+ int c=*s++;
+ if (c >= '0' && c <= t) c-='0';
+ else if (m==16 && (c & ~0x20) >= 'A' && (c & ~0x20) <= 'F') c = (c & 7) + 9;
+ else break;
+ v*=m;
+ v+=c;
+ }
+ return ((int)v)*sign;
+}
+
+// Straight copies of selected shell functions. Calling local functions
+// requires less code than DLL functions. For the savings to outweigh the cost
+// of a new function there should be about a couple of dozen or so calls.
+char * NSISCALL mystrcpy(char *out, const char *in)
+{
+ return lstrcpyn(out, in, NSIS_MAX_STRLEN);
+}
+
+int NSISCALL mystrlen(const char *in)
+{
+ return lstrlen(in);
+}
+
+char * NSISCALL mystrcat(char *out, const char *concat)
+{
+ return lstrcat(out, concat);
+}
+
+char ps_tmpbuf[NSIS_MAX_STRLEN*2];
+
+const char SYSREGKEY[] = "Software\\Microsoft\\Windows\\CurrentVersion";
+const char QUICKLAUNCH[] = "\\Microsoft\\Internet Explorer\\Quick Launch";
+
+typedef HRESULT (__stdcall * PFNSHGETFOLDERPATHA)(HWND, int, HANDLE, DWORD, LPSTR);
+extern void *g_SHGetFolderPath;
+
+// Based on Dave Laundon's simplified process_string
+char * NSISCALL GetNSISString(char *outbuf, int strtab)
+{
+ char *in = (char*)GetNSISStringNP(GetNSISTab(strtab));
+ char *out = ps_tmpbuf;
+ if ((unsigned int) (outbuf - ps_tmpbuf) < sizeof(ps_tmpbuf))
+ {
+ out = outbuf;
+ outbuf = 0;
+ }
+ while (*in && out - ps_tmpbuf < NSIS_MAX_STRLEN)
+ {
+ unsigned char nVarIdx = (unsigned char)*in++;
+ int nData;
+ int fldrs[4];
+ if (nVarIdx > NS_CODES_START)
+ {
+ nData = ((in[1] & 0x7F) << 7) | (in[0] & 0x7F);
+ fldrs[0] = in[0]; // current user
+ fldrs[1] = in[0] | CSIDL_FLAG_CREATE;
+ fldrs[2] = in[1]; // all users
+ fldrs[3] = in[1] | CSIDL_FLAG_CREATE;
+ in += 2;
+
+ if (nVarIdx == NS_SHELL_CODE)
+ {
+ LPITEMIDLIST idl;
+
+ int x = 2;
+ DWORD ver = GetVersion();
+
+ /*
+
+ SHGetFolderPath as provided by shfolder.dll is used to get special folders
+ unless the installer is running on Windows 95/98. For 95/98 shfolder.dll is
+ only used for the Application Data and Documents folder (if the DLL exists).
+ Oherwise, the old SHGetSpecialFolderLocation API is called.
+
+ There reason for not using shfolder.dll for all folders on 95/98 is that
+ some unsupported folders (such as the Start Menu folder for all users) are
+ simulated instead of returning an error so whe can fall back on the folder
+ for the current user.
+
+ SHGetFolderPath in shell32.dll could be called directly for Windows versions
+ later than 95/98 but there is no need to do so, because shfolder.dll is still
+ provided and calls shell32.dll.
+
+ */
+
+ BOOL use_shfolder =
+ // Use shfolder if not on 95/98
+ !((ver & 0x80000000) && (LOWORD(ver) != 0x5A04)) ||
+
+ // Unless the Application Data or Documents folder is requested
+ (
+ (fldrs[2] == CSIDL_COMMON_APPDATA) ||
+ (fldrs[2] == CSIDL_COMMON_DOCUMENTS)
+ );
+
+ /* Carry on... shfolder stuff is over. */
+
+ if (g_exec_flags.all_user_var)
+ {
+ x = 4;
+ }
+
+ if (fldrs[0] & 0x80)
+ {
+ myRegGetStr(HKEY_LOCAL_MACHINE, SYSREGKEY, GetNSISStringNP(fldrs[0] & 0x3F), out, fldrs[0] & 0x40);
+ if (!*out)
+ GetNSISString(out, fldrs[2]);
+ x = 0;
+ }
+ else if (fldrs[0] == CSIDL_SYSTEM)
+ {
+ GetSystemDirectory(out, NSIS_MAX_STRLEN);
+ x = 0;
+ }
+ else if (fldrs[0] == CSIDL_WINDOWS)
+ {
+ GetWindowsDirectory(out, NSIS_MAX_STRLEN);
+ x = 0;
+ }
+
+ while (x--)
+ {
+ if (g_SHGetFolderPath && use_shfolder)
+ {
+ PFNSHGETFOLDERPATHA SHGetFolderPathFunc = (PFNSHGETFOLDERPATHA) g_SHGetFolderPath;
+ if (!SHGetFolderPathFunc(g_hwnd, fldrs[x], NULL, SHGFP_TYPE_CURRENT, out))
+ {
+ break;
+ }
+ }
+
+ if (!SHGetSpecialFolderLocation(g_hwnd, fldrs[x], &idl))
+ {
+ BOOL res = SHGetPathFromIDList(idl, out);
+ CoTaskMemFree(idl);
+ if (res) break;
+ }
+
+ *out=0;
+ }
+
+ if (*out)
+ {
+ // all users' version is CSIDL_APPDATA only for $QUICKLAUNCH
+ // for normal $APPDATA, it'd be CSIDL_APPDATA_COMMON
+ if (fldrs[2] == CSIDL_APPDATA)
+ {
+ mystrcat(out, QUICKLAUNCH);
+ }
+ }
+ validate_filename(out);
+ }
+ else if (nVarIdx == NS_VAR_CODE)
+ {
+ if (nData == 29) // $HWNDPARENT
+ myitoa(out, (unsigned int) g_hwnd);
+ else
+ mystrcpy(out, g_usrvars[nData]);
+ // validate the directory name
+ if ((unsigned int)(nData - 21) < 7) {
+ // validate paths for $INSTDIR, $OUTDIR, $EXEDIR, $LANGUAGE, $TEMP, $PLUGINSDIR and $EXEPATH
+ // $LANGUAGE is just a number anyway...
+ validate_filename(out);
+ }
+ } // == VAR_CODES_START
+ else if (nVarIdx == NS_LANG_CODE)
+ {
+ GetNSISString(out, -nData-1);
+ }
+ out += mystrlen(out);
+ }
+ else if (nVarIdx == NS_SKIP_CODE)
+ {
+ *out++ = *in++;
+ }
+ else // Normal char
+ {
+ *out++ = nVarIdx;
+ }
+ } // while
+ *out = 0;
+ if (outbuf)
+ return mystrcpy(outbuf, ps_tmpbuf);
+ return ps_tmpbuf;
+}
+
+void NSISCALL validate_filename(char *in) {
+ char *nono = "*?|<>/\":";
+ char *out;
+ char *out_save;
+
+ // ignoring spaces is wrong, " C:\blah" is invalid
+ //while (*in == ' ') in = CharNext(in);
+
+ if (in[0] == '\\' && in[1] == '\\' && in[2] == '?' && in[3] == '\\')
+ {
+ // at least four bytes
+ in += 4;
+ }
+ if (*in)
+ {
+ // at least two bytes
+ if (validpathspec(in)) in += 2;
+ }
+ out = out_save = in;
+ while (*in)
+ {
+ if ((unsigned char)*in > 31 && !*findchar(nono, *in))
+ {
+ mini_memcpy(out, in, CharNext(in) - in);
+ out = CharNext(out);
+ }
+ in = CharNext(in);
+ }
+ *out = 0;
+ do
+ {
+ out = CharPrev(out_save, out);
+ if (*out == ' ' || *out == '\\')
+ *out = 0;
+ else
+ break;
+ } while (out_save < out);
+}
+
+#ifdef NSIS_CONFIG_LOG
+int log_dolog;
+char log_text[2048]; // 1024 for each wsprintf
+
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+void NSISCALL log_write(int close)
+{
+ static HANDLE fp=INVALID_HANDLE_VALUE;
+ if (close)
+ {
+ if (fp!=INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(fp);
+ }
+ fp=INVALID_HANDLE_VALUE;
+ return;
+ }
+ if (log_dolog)
+ {
+ if (g_log_file[0] && fp==INVALID_HANDLE_VALUE)
+ {
+ fp = myOpenFile(g_log_file,GENERIC_WRITE,OPEN_ALWAYS);
+ if (fp!=INVALID_HANDLE_VALUE)
+ SetFilePointer(fp,0,NULL,FILE_END);
+ }
+ if (fp!=INVALID_HANDLE_VALUE)
+ {
+ DWORD d;
+ mystrcat(log_text,"\r\n");
+ WriteFile(fp,log_text,mystrlen(log_text),&d,NULL);
+ }
+ }
+}
+#endif//!NSIS_CONFIG_LOG_ODS && !NSIS_CONFIG_LOG_STDOUT
+
+const char * _RegKeyHandleToName(HKEY hKey)
+{
+ if (hKey == HKEY_CLASSES_ROOT)
+ return "HKEY_CLASSES_ROOT";
+ else if (hKey == HKEY_CURRENT_USER)
+ return "HKEY_CURRENT_USER";
+ else if (hKey == HKEY_LOCAL_MACHINE)
+ return "HKEY_LOCAL_MACHINE";
+ else if (hKey == HKEY_USERS)
+ return "HKEY_USERS";
+ else if (hKey == HKEY_PERFORMANCE_DATA)
+ return "HKEY_PERFORMANCE_DATA";
+ else if (hKey == HKEY_CURRENT_CONFIG)
+ return "HKEY_CURRENT_CONFIG";
+ else if (hKey == HKEY_DYN_DATA)
+ return "HKEY_DYN_DATA";
+ else
+ return "invalid registry key";
+}
+
+void _LogData2Hex(char *buf, size_t buflen, unsigned char *data, size_t datalen)
+{
+ char *p = buf;
+
+ size_t i;
+
+ int dots = 0;
+ size_t bufbytes = buflen / 3; // 2 hex digits, one space/null
+
+ if (datalen > bufbytes)
+ {
+ bufbytes--;
+ dots = 1;
+ }
+ else
+ bufbytes = datalen;
+
+ for (i = 0; i < bufbytes; i++)
+ {
+ wsprintf(p, "%02x%c", data[i], (i == bufbytes - 1) ? '\0' : ' ');
+ p += 3;
+ }
+
+ if (dots)
+ mystrcat(buf, "...");
+}
+
+#ifdef NSIS_CONFIG_LOG_TIMESTAMP
+void log_timestamp(char *buf)
+{
+ SYSTEMTIME st;
+ GetLocalTime(&st);
+ wsprintf(buf,"[%04hu/%02hu/%02hu %02hu:%02hu:%02hu] ", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond);
+}
+#else
+# define log_timestamp(x)
+#endif//NSIS_CONFIG_LOG_TIMESTAMP
+
+void log_printf(char *format, ...)
+{
+ va_list val;
+ va_start(val,format);
+
+ log_text[0] = '\0';
+ log_timestamp(log_text);
+ wvsprintf(log_text+mystrlen(log_text),format,val);
+
+ va_end(val);
+#ifdef NSIS_CONFIG_LOG_ODS
+ if (log_dolog)
+ OutputDebugString(log_text);
+#endif
+#ifdef NSIS_CONFIG_LOG_STDOUT
+ if (log_dolog && GetStdHandle(STD_OUTPUT_HANDLE) != INVALID_HANDLE_VALUE)
+ {
+ DWORD dwBytes;
+ WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), log_text, lstrlen(log_text), &dwBytes, NULL);
+ WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), "\n", 1, &dwBytes, NULL);
+ }
+#endif
+#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
+ log_write(0);
+#endif
+}
+#endif//NSIS_CONFIG_LOG
+
+WIN32_FIND_DATA * NSISCALL file_exists(char *buf)
+{
+ HANDLE h;
+ static WIN32_FIND_DATA fd;
+ h = FindFirstFile(buf,&fd);
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ FindClose(h);
+ return &fd;
+ }
+ return NULL;
+}
+
+struct MGA_FUNC
+{
+ const char *dll;
+ const char *func;
+};
+
+struct MGA_FUNC MGA_FUNCS[] = {
+ {"KERNEL32", "GetDiskFreeSpaceExA"},
+ {"KERNEL32", "MoveFileExA"},
+ {"ADVAPI32", "RegDeleteKeyExA"},
+ {"ADVAPI32", "OpenProcessToken"},
+ {"ADVAPI32", "LookupPrivilegeValueA"},
+ {"ADVAPI32", "AdjustTokenPrivileges"},
+ {"KERNEL32", "GetUserDefaultUILanguage"},
+ {"SHLWAPI", "SHAutoComplete"},
+ {"SHFOLDER", "SHGetFolderPathA"}
+};
+
+void * NSISCALL myGetProcAddress(const enum myGetProcAddressFunctions func)
+{
+ const char *dll = MGA_FUNCS[func].dll;
+ HMODULE hModule = GetModuleHandle(dll);
+ if (!hModule)
+ hModule = LoadLibrary(dll);
+ if (!hModule)
+ return NULL;
+
+ return GetProcAddress(hModule, MGA_FUNCS[func].func);
+}
+
+void NSISCALL MessageLoop(UINT uCheckedMsg)
+{
+ MSG msg;
+ while (PeekMessage(&msg, NULL, uCheckedMsg, uCheckedMsg, PM_REMOVE))
+ DispatchMessage(&msg);
+}
diff --git a/Source/exehead/util.h b/Source/exehead/util.h
index 2667431..35a1846 100755
--- a/Source/exehead/util.h
+++ b/Source/exehead/util.h
@@ -1,122 +1,122 @@
-/*
- * util.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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_UTIL_H___
-#define ___NSIS_UTIL_H___
-
-#include "../Platform.h"
-#include "config.h"
-#include <shlobj.h>
-
-extern char ps_tmpbuf[NSIS_MAX_STRLEN*2];
-char * NSISCALL GetNSISString(char *outbuf, int strtab);
-#define GetNSISStringTT(strtab) GetNSISString(0, (strtab))
-#define GetNSISStringNP(strtab) ((const char *)g_blocks[NB_STRINGS].offset+(strtab))
-#define GetNSISTab(strtab) (strtab < 0 ? LANG_STR_TAB(strtab) : strtab)
-void NSISCALL myRegGetStr(HKEY root, const char *sub, const char *name, char *out, int x64);
-int NSISCALL myatoi(char *s);
-void NSISCALL myitoa(char *s, int d);
-char * NSISCALL mystrcpy(char *out, const char *in);
-int NSISCALL mystrlen(const char *in);
-char * NSISCALL mystrcat(char *out, const char *concat);
-char * NSISCALL mystrstr(char *a, char *b);
-WIN32_FIND_DATA * NSISCALL file_exists(char *buf);
-char * NSISCALL my_GetTempFileName(char *buf, const char *dir);
-
-//BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val);
-#define my_SetWindowText SetWindowText
-BOOL NSISCALL my_SetDialogItemText(HWND dlg, UINT idx, const char *val);
-//#define my_SetDialogItemText SetDlgItemText
-//int NSISCALL my_GetWindowText(HWND hWnd, char *val, int size);
-#define my_GetWindowText GetWindowText
-int NSISCALL my_GetDialogItemText(UINT idx, char *val);
-//#define my_GetDialogItemText GetDlgItemText
-
-#ifdef NSIS_CONFIG_LOG
-extern char log_text[2048];
-void NSISCALL log_write(int close);
-const char * _RegKeyHandleToName(HKEY hKey);
-void _LogData2Hex(char *buf, size_t buflen, unsigned char *data, size_t datalen);
-void log_printf(char *format, ...);
-#define log_printf2(x1,x2) log_printf(x1,x2);
-#define log_printf3(x1,x2,x3) log_printf(x1,x2,x3);
-#define log_printf4(x1,x2,x3,x4) log_printf(x1,x2,x3,x4);
-#define log_printf5(x1,x2,x3,x4,x5) log_printf(x1,x2,x3,x4,x5);
-#define log_printf6(x1,x2,x3,x4,x5,x6) log_printf(x1,x2,x3,x4,x5,x6);
-#define log_printf7(x1,x2,x3,x4,x5,x6,x7) log_printf(x1,x2,x3,x4,x5,x6,x7);
-#define log_printf8(x1,x2,x3,x4,x5,x6,x7,x8) log_printf(x1,x2,x3,x4,x5,x6,x7,x8);
-#define RegKeyHandleToName(x1) _RegKeyHandleToName(x1);
-#define LogData2Hex(x1,x2,x3,x4) _LogData2Hex(x1,x2,x3,x4);
-extern int log_dolog;
-extern char g_log_file[1024];
-#else
-#define log_printf(x1)
-#define log_printf2(x1,x2)
-#define log_printf3(x1,x2,x3)
-#define log_printf4(x1,x2,x3,x4)
-#define log_printf5(x1,x2,x3,x4,x5)
-#define log_printf6(x1,x2,x3,x4,x5,x6)
-#define log_printf7(x1,x2,x3,x4,x5,x6,x7)
-#define log_printf8(x1,x2,x3,x4,x5,x6,x7,x8)
-#define RegKeyHandleToName(x1) NULL
-#define LogData2Hex(x1,x2,x3,x4)
-#endif
-
-HANDLE NSISCALL myCreateProcess(char *cmd);
-int NSISCALL my_MessageBox(const char *text, UINT type);
-
-void NSISCALL myDelete(char *buf, int flags);
-
-HANDLE NSISCALL myOpenFile(const char *fn, DWORD da, DWORD cd);
-int NSISCALL validpathspec(char *ubuf);
-char * NSISCALL addtrailingslash(char *str);
-//char NSISCALL lastchar(const char *str);
-#define lastchar(str) *CharPrev(str,str+mystrlen(str))
-char * NSISCALL findchar(char *str, char c);
-char * NSISCALL trimslashtoend(char *buf);
-char * NSISCALL skip_root(char *path);
-int NSISCALL is_valid_instpath(char *s);
-void NSISCALL validate_filename(char *fn);
-void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew);
-void NSISCALL mini_memcpy(void *out, const void *in, int len);
-void NSISCALL remove_ro_attr(char *file);
-
-enum myGetProcAddressFunctions {
- MGA_GetDiskFreeSpaceExA,
- MGA_MoveFileExA,
- MGA_RegDeleteKeyExA,
- MGA_OpenProcessToken,
- MGA_LookupPrivilegeValueA,
- MGA_AdjustTokenPrivileges,
- MGA_GetUserDefaultUILanguage,
- MGA_SHAutoComplete,
- MGA_SHGetFolderPathA
-};
-
-void * NSISCALL myGetProcAddress(const enum myGetProcAddressFunctions func);
-void NSISCALL MessageLoop(UINT uCheckedMsg);
-
-// Turn a pair of chars into a word
-// Turn four chars into a dword
-#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
-#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
-#else
-#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
-#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
-#endif
-
-#endif//!___NSIS_UTIL_H___
+/*
+ * util.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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_UTIL_H___
+#define ___NSIS_UTIL_H___
+
+#include "../Platform.h"
+#include "config.h"
+#include <shlobj.h>
+
+extern char ps_tmpbuf[NSIS_MAX_STRLEN*2];
+char * NSISCALL GetNSISString(char *outbuf, int strtab);
+#define GetNSISStringTT(strtab) GetNSISString(0, (strtab))
+#define GetNSISStringNP(strtab) ((const char *)g_blocks[NB_STRINGS].offset+(strtab))
+#define GetNSISTab(strtab) (strtab < 0 ? LANG_STR_TAB(strtab) : strtab)
+void NSISCALL myRegGetStr(HKEY root, const char *sub, const char *name, char *out, int x64);
+int NSISCALL myatoi(char *s);
+void NSISCALL myitoa(char *s, int d);
+char * NSISCALL mystrcpy(char *out, const char *in);
+int NSISCALL mystrlen(const char *in);
+char * NSISCALL mystrcat(char *out, const char *concat);
+char * NSISCALL mystrstr(char *a, char *b);
+WIN32_FIND_DATA * NSISCALL file_exists(char *buf);
+char * NSISCALL my_GetTempFileName(char *buf, const char *dir);
+
+//BOOL NSISCALL my_SetWindowText(HWND hWnd, const char *val);
+#define my_SetWindowText SetWindowText
+BOOL NSISCALL my_SetDialogItemText(HWND dlg, UINT idx, const char *val);
+//#define my_SetDialogItemText SetDlgItemText
+//int NSISCALL my_GetWindowText(HWND hWnd, char *val, int size);
+#define my_GetWindowText GetWindowText
+int NSISCALL my_GetDialogItemText(UINT idx, char *val);
+//#define my_GetDialogItemText GetDlgItemText
+
+#ifdef NSIS_CONFIG_LOG
+extern char log_text[2048];
+void NSISCALL log_write(int close);
+const char * _RegKeyHandleToName(HKEY hKey);
+void _LogData2Hex(char *buf, size_t buflen, unsigned char *data, size_t datalen);
+void log_printf(char *format, ...);
+#define log_printf2(x1,x2) log_printf(x1,x2);
+#define log_printf3(x1,x2,x3) log_printf(x1,x2,x3);
+#define log_printf4(x1,x2,x3,x4) log_printf(x1,x2,x3,x4);
+#define log_printf5(x1,x2,x3,x4,x5) log_printf(x1,x2,x3,x4,x5);
+#define log_printf6(x1,x2,x3,x4,x5,x6) log_printf(x1,x2,x3,x4,x5,x6);
+#define log_printf7(x1,x2,x3,x4,x5,x6,x7) log_printf(x1,x2,x3,x4,x5,x6,x7);
+#define log_printf8(x1,x2,x3,x4,x5,x6,x7,x8) log_printf(x1,x2,x3,x4,x5,x6,x7,x8);
+#define RegKeyHandleToName(x1) _RegKeyHandleToName(x1);
+#define LogData2Hex(x1,x2,x3,x4) _LogData2Hex(x1,x2,x3,x4);
+extern int log_dolog;
+extern char g_log_file[1024];
+#else
+#define log_printf(x1)
+#define log_printf2(x1,x2)
+#define log_printf3(x1,x2,x3)
+#define log_printf4(x1,x2,x3,x4)
+#define log_printf5(x1,x2,x3,x4,x5)
+#define log_printf6(x1,x2,x3,x4,x5,x6)
+#define log_printf7(x1,x2,x3,x4,x5,x6,x7)
+#define log_printf8(x1,x2,x3,x4,x5,x6,x7,x8)
+#define RegKeyHandleToName(x1) NULL
+#define LogData2Hex(x1,x2,x3,x4)
+#endif
+
+HANDLE NSISCALL myCreateProcess(char *cmd);
+int NSISCALL my_MessageBox(const char *text, UINT type);
+
+void NSISCALL myDelete(char *buf, int flags);
+
+HANDLE NSISCALL myOpenFile(const char *fn, DWORD da, DWORD cd);
+int NSISCALL validpathspec(char *ubuf);
+char * NSISCALL addtrailingslash(char *str);
+//char NSISCALL lastchar(const char *str);
+#define lastchar(str) *CharPrev(str,str+mystrlen(str))
+char * NSISCALL findchar(char *str, char c);
+char * NSISCALL trimslashtoend(char *buf);
+char * NSISCALL skip_root(char *path);
+int NSISCALL is_valid_instpath(char *s);
+void NSISCALL validate_filename(char *fn);
+void NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew);
+void NSISCALL mini_memcpy(void *out, const void *in, int len);
+void NSISCALL remove_ro_attr(char *file);
+
+enum myGetProcAddressFunctions {
+ MGA_GetDiskFreeSpaceExA,
+ MGA_MoveFileExA,
+ MGA_RegDeleteKeyExA,
+ MGA_OpenProcessToken,
+ MGA_LookupPrivilegeValueA,
+ MGA_AdjustTokenPrivileges,
+ MGA_GetUserDefaultUILanguage,
+ MGA_SHAutoComplete,
+ MGA_SHGetFolderPathA
+};
+
+void * NSISCALL myGetProcAddress(const enum myGetProcAddressFunctions func);
+void NSISCALL MessageLoop(UINT uCheckedMsg);
+
+// Turn a pair of chars into a word
+// Turn four chars into a dword
+#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
+#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
+#else
+#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
+#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
+#endif
+
+#endif//!___NSIS_UTIL_H___
diff --git a/Source/fileform.cpp b/Source/fileform.cpp
index c2bdb67..fddf866 100755
--- a/Source/fileform.cpp
+++ b/Source/fileform.cpp
@@ -1,194 +1,194 @@
-/*
- * fileform.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "fileform.h"
-#include "exehead/config.h"
-#include "Platform.h"
-
-#include <cassert>
-
-// these functions MUST be synchronized with the structures in Source/exehead/fileform.h !
-// data must be written in the same order it's defined in Source/exehead/fileform.h
-// in the future, i hope to get one of the two automtaically generated from the other
-
-void firstheader_writer::write(const firstheader *data)
-{
- m_sink->write_int(data->flags);
- m_sink->write_int(data->siginfo);
- m_sink->write_int_array(data->nsinst, 3);
- m_sink->write_int(data->length_of_header);
- m_sink->write_int(data->length_of_all_following_data);
-}
-
-void block_header_writer::write(const block_header *data)
-{
- m_sink->write_int(data->offset);
- m_sink->write_int(data->num);
-}
-
-void header_writer::write(const header *data)
-{
- m_sink->write_int(data->flags);
-
- block_header_writer bw(writer::m_sink);
- for (int i = 0; i < BLOCKS_NUM; i++)
- {
- bw.write(&data->blocks[i]);
- }
-
- m_sink->write_int(data->install_reg_rootkey);
- m_sink->write_int(data->install_reg_key_ptr);
- m_sink->write_int(data->install_reg_value_ptr);
-
-#ifdef NSIS_SUPPORT_BGBG
- m_sink->write_int(data->bg_color1);
- m_sink->write_int(data->bg_color2);
- m_sink->write_int(data->bg_textcolor);
-#endif
-
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- m_sink->write_int(data->lb_bg);
- m_sink->write_int(data->lb_fg);
-#endif
-
- m_sink->write_int(data->langtable_size);
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
- m_sink->write_int(data->license_bg);
-#endif//NSIS_CONFIG_LICENSEPAGE
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- m_sink->write_int(data->code_onInit);
- m_sink->write_int(data->code_onInstSuccess);
- m_sink->write_int(data->code_onInstFailed);
- m_sink->write_int(data->code_onUserAbort);
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- m_sink->write_int(data->code_onGUIInit);
- m_sink->write_int(data->code_onGUIEnd);
- m_sink->write_int(data->code_onMouseOverSection);
-#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
- m_sink->write_int(data->code_onVerifyInstDir);
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- m_sink->write_int(data->code_onSelChange);
-#endif//NSIS_CONFIG_COMPONENTPAGE
-#ifdef NSIS_SUPPORT_REBOOT
- m_sink->write_int(data->code_onRebootFailed);
-#endif//NSIS_SUPPORT_REBOOT
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- m_sink->write_int_array(data->install_types, NSIS_MAX_INST_TYPES + 1);
-#endif
-
- m_sink->write_int(data->install_directory_ptr);
- m_sink->write_int(data->install_directory_auto_append);
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- m_sink->write_int(data->str_uninstchild);
- m_sink->write_int(data->str_uninstcmd);
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- m_sink->write_int(data->str_wininit);
-#endif//NSIS_SUPPORT_MOVEONREBOOT
-}
-
-void section_writer::write(const section *data)
-{
- m_sink->write_int(data->name_ptr);
- m_sink->write_int(data->install_types);
- m_sink->write_int(data->flags);
- m_sink->write_int(data->code);
- m_sink->write_int(data->code_size);
- m_sink->write_int(data->size_kb);
- m_sink->write_string(data->name, NSIS_MAX_STRLEN);
-}
-
-void entry_writer::write(const entry *data)
-{
- m_sink->write_int(data->which);
- m_sink->write_int_array(data->offsets, MAX_ENTRY_OFFSETS);
-}
-
-void page_writer::write(const page *data)
-{
- m_sink->write_int(data->dlg_id);
- m_sink->write_int(data->wndproc_id);
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- m_sink->write_int(data->prefunc);
- m_sink->write_int(data->showfunc);
- m_sink->write_int(data->leavefunc);
-#endif //NSIS_SUPPORT_CODECALLBACKS
-
- m_sink->write_int(data->flags);
-
- m_sink->write_int(data->caption);
- m_sink->write_int(data->back);
- m_sink->write_int(data->next);
- m_sink->write_int(data->clicknext);
- m_sink->write_int(data->cancel);
-
- m_sink->write_int_array(data->parms, 5);
-}
-
-void ctlcolors_writer::write(const ctlcolors *data)
-{
- m_sink->write_int(data->text);
- m_sink->write_int(data->bkc);
- m_sink->write_int(data->lbStyle);
- m_sink->write_int((int) data->bkb);
- m_sink->write_int(data->bkmode);
- m_sink->write_int(data->flags);
-}
-
-void LOGFONT_writer::write(const LOGFONT *data)
-{
- m_sink->write_int(data->lfHeight);
- m_sink->write_int(data->lfWidth);
- m_sink->write_int(data->lfEscapement);
- m_sink->write_int(data->lfOrientation);
- m_sink->write_int(data->lfWeight);
- m_sink->write_byte(data->lfItalic);
- m_sink->write_byte(data->lfUnderline);
- m_sink->write_byte(data->lfStrikeOut);
- m_sink->write_byte(data->lfCharSet);
- m_sink->write_byte(data->lfOutPrecision);
- m_sink->write_byte(data->lfClipPrecision);
- m_sink->write_byte(data->lfQuality);
- m_sink->write_byte(data->lfPitchAndFamily);
- m_sink->write_string(data->lfFaceName, LF_FACESIZE);
-}
-
-void lang_table_writer::write(const unsigned char *data)
-{
- assert(sizeof(LANGID) == sizeof(short));
-
- m_sink->write_short(* (short *) data);
- data += sizeof(short);
- m_sink->write_int_array((int *) data, m_lang_strings + 2);
-}
-
-void lang_table_writer::write_block(IGrowBuf *buf, writer_sink *sink, const size_t table_size)
-{
- unsigned char *tables = (unsigned char *) buf->get();
- size_t lang_strings = ( table_size - 2 * sizeof(int) - sizeof(LANGID) ) / sizeof(int);
- size_t l = buf->getlen() / table_size;
- lang_table_writer writer(sink, lang_strings);
- for (size_t i = 0; i < l; i++)
- {
- writer.write(tables + i * table_size);
- }
-}
+/*
+ * fileform.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "fileform.h"
+#include "exehead/config.h"
+#include "Platform.h"
+
+#include <cassert>
+
+// these functions MUST be synchronized with the structures in Source/exehead/fileform.h !
+// data must be written in the same order it's defined in Source/exehead/fileform.h
+// in the future, i hope to get one of the two automtaically generated from the other
+
+void firstheader_writer::write(const firstheader *data)
+{
+ m_sink->write_int(data->flags);
+ m_sink->write_int(data->siginfo);
+ m_sink->write_int_array(data->nsinst, 3);
+ m_sink->write_int(data->length_of_header);
+ m_sink->write_int(data->length_of_all_following_data);
+}
+
+void block_header_writer::write(const block_header *data)
+{
+ m_sink->write_int(data->offset);
+ m_sink->write_int(data->num);
+}
+
+void header_writer::write(const header *data)
+{
+ m_sink->write_int(data->flags);
+
+ block_header_writer bw(writer::m_sink);
+ for (int i = 0; i < BLOCKS_NUM; i++)
+ {
+ bw.write(&data->blocks[i]);
+ }
+
+ m_sink->write_int(data->install_reg_rootkey);
+ m_sink->write_int(data->install_reg_key_ptr);
+ m_sink->write_int(data->install_reg_value_ptr);
+
+#ifdef NSIS_SUPPORT_BGBG
+ m_sink->write_int(data->bg_color1);
+ m_sink->write_int(data->bg_color2);
+ m_sink->write_int(data->bg_textcolor);
+#endif
+
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ m_sink->write_int(data->lb_bg);
+ m_sink->write_int(data->lb_fg);
+#endif
+
+ m_sink->write_int(data->langtable_size);
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ m_sink->write_int(data->license_bg);
+#endif//NSIS_CONFIG_LICENSEPAGE
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ m_sink->write_int(data->code_onInit);
+ m_sink->write_int(data->code_onInstSuccess);
+ m_sink->write_int(data->code_onInstFailed);
+ m_sink->write_int(data->code_onUserAbort);
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ m_sink->write_int(data->code_onGUIInit);
+ m_sink->write_int(data->code_onGUIEnd);
+ m_sink->write_int(data->code_onMouseOverSection);
+#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ m_sink->write_int(data->code_onVerifyInstDir);
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ m_sink->write_int(data->code_onSelChange);
+#endif//NSIS_CONFIG_COMPONENTPAGE
+#ifdef NSIS_SUPPORT_REBOOT
+ m_sink->write_int(data->code_onRebootFailed);
+#endif//NSIS_SUPPORT_REBOOT
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ m_sink->write_int_array(data->install_types, NSIS_MAX_INST_TYPES + 1);
+#endif
+
+ m_sink->write_int(data->install_directory_ptr);
+ m_sink->write_int(data->install_directory_auto_append);
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ m_sink->write_int(data->str_uninstchild);
+ m_sink->write_int(data->str_uninstcmd);
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ m_sink->write_int(data->str_wininit);
+#endif//NSIS_SUPPORT_MOVEONREBOOT
+}
+
+void section_writer::write(const section *data)
+{
+ m_sink->write_int(data->name_ptr);
+ m_sink->write_int(data->install_types);
+ m_sink->write_int(data->flags);
+ m_sink->write_int(data->code);
+ m_sink->write_int(data->code_size);
+ m_sink->write_int(data->size_kb);
+ m_sink->write_string(data->name, NSIS_MAX_STRLEN);
+}
+
+void entry_writer::write(const entry *data)
+{
+ m_sink->write_int(data->which);
+ m_sink->write_int_array(data->offsets, MAX_ENTRY_OFFSETS);
+}
+
+void page_writer::write(const page *data)
+{
+ m_sink->write_int(data->dlg_id);
+ m_sink->write_int(data->wndproc_id);
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ m_sink->write_int(data->prefunc);
+ m_sink->write_int(data->showfunc);
+ m_sink->write_int(data->leavefunc);
+#endif //NSIS_SUPPORT_CODECALLBACKS
+
+ m_sink->write_int(data->flags);
+
+ m_sink->write_int(data->caption);
+ m_sink->write_int(data->back);
+ m_sink->write_int(data->next);
+ m_sink->write_int(data->clicknext);
+ m_sink->write_int(data->cancel);
+
+ m_sink->write_int_array(data->parms, 5);
+}
+
+void ctlcolors_writer::write(const ctlcolors *data)
+{
+ m_sink->write_int(data->text);
+ m_sink->write_int(data->bkc);
+ m_sink->write_int(data->lbStyle);
+ m_sink->write_int((int) data->bkb);
+ m_sink->write_int(data->bkmode);
+ m_sink->write_int(data->flags);
+}
+
+void LOGFONT_writer::write(const LOGFONT *data)
+{
+ m_sink->write_int(data->lfHeight);
+ m_sink->write_int(data->lfWidth);
+ m_sink->write_int(data->lfEscapement);
+ m_sink->write_int(data->lfOrientation);
+ m_sink->write_int(data->lfWeight);
+ m_sink->write_byte(data->lfItalic);
+ m_sink->write_byte(data->lfUnderline);
+ m_sink->write_byte(data->lfStrikeOut);
+ m_sink->write_byte(data->lfCharSet);
+ m_sink->write_byte(data->lfOutPrecision);
+ m_sink->write_byte(data->lfClipPrecision);
+ m_sink->write_byte(data->lfQuality);
+ m_sink->write_byte(data->lfPitchAndFamily);
+ m_sink->write_string(data->lfFaceName, LF_FACESIZE);
+}
+
+void lang_table_writer::write(const unsigned char *data)
+{
+ assert(sizeof(LANGID) == sizeof(short));
+
+ m_sink->write_short(* (short *) data);
+ data += sizeof(short);
+ m_sink->write_int_array((int *) data, m_lang_strings + 2);
+}
+
+void lang_table_writer::write_block(IGrowBuf *buf, writer_sink *sink, const size_t table_size)
+{
+ unsigned char *tables = (unsigned char *) buf->get();
+ size_t lang_strings = ( table_size - 2 * sizeof(int) - sizeof(LANGID) ) / sizeof(int);
+ size_t l = buf->getlen() / table_size;
+ lang_table_writer writer(sink, lang_strings);
+ for (size_t i = 0; i < l; i++)
+ {
+ writer.write(tables + i * table_size);
+ }
+}
diff --git a/Source/fileform.h b/Source/fileform.h
index 1244d18..71afdaf 100755
--- a/Source/fileform.h
+++ b/Source/fileform.h
@@ -1,63 +1,63 @@
-/*
- * fileform.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 ___MAKENSIS_FILEFORM_H___
-#define ___MAKENSIS_FILEFORM_H___
-
-#include "exehead/fileform.h"
-#include "writer.h"
-
-#define DECLARE_WRITER(x) \
- class x##_writer : public writer \
- { \
- public: \
- x##_writer(writer_sink *sink) : writer(sink) {} \
- void write(const x *data); \
- static void write_block(IGrowBuf *buf, writer_sink *sink) \
- { \
- x *arr = (x *) buf->get(); \
- size_t l = buf->getlen() / sizeof(x); \
- x##_writer writer(sink); \
- for (size_t i = 0; i < l; i++) \
- { \
- writer.write(&arr[i]); \
- } \
- } \
- }
-
-DECLARE_WRITER(firstheader);
-DECLARE_WRITER(block_header);
-DECLARE_WRITER(header);
-DECLARE_WRITER(section);
-DECLARE_WRITER(entry);
-DECLARE_WRITER(page);
-DECLARE_WRITER(ctlcolors);
-DECLARE_WRITER(LOGFONT);
-
-class lang_table_writer : public writer
-{
-public:
- lang_table_writer(writer_sink *sink, const size_t lang_strings) :
- writer(sink), m_lang_strings(lang_strings) {}
- void write(const unsigned char *data);
- static void write_block(IGrowBuf *buf, writer_sink *sink, const size_t table_size);
-
-private:
- size_t m_lang_strings;
-
-};
-
-#endif//!___MAKENSIS_FILEFORM_H___
+/*
+ * fileform.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 ___MAKENSIS_FILEFORM_H___
+#define ___MAKENSIS_FILEFORM_H___
+
+#include "exehead/fileform.h"
+#include "writer.h"
+
+#define DECLARE_WRITER(x) \
+ class x##_writer : public writer \
+ { \
+ public: \
+ x##_writer(writer_sink *sink) : writer(sink) {} \
+ void write(const x *data); \
+ static void write_block(IGrowBuf *buf, writer_sink *sink) \
+ { \
+ x *arr = (x *) buf->get(); \
+ size_t l = buf->getlen() / sizeof(x); \
+ x##_writer writer(sink); \
+ for (size_t i = 0; i < l; i++) \
+ { \
+ writer.write(&arr[i]); \
+ } \
+ } \
+ }
+
+DECLARE_WRITER(firstheader);
+DECLARE_WRITER(block_header);
+DECLARE_WRITER(header);
+DECLARE_WRITER(section);
+DECLARE_WRITER(entry);
+DECLARE_WRITER(page);
+DECLARE_WRITER(ctlcolors);
+DECLARE_WRITER(LOGFONT);
+
+class lang_table_writer : public writer
+{
+public:
+ lang_table_writer(writer_sink *sink, const size_t lang_strings) :
+ writer(sink), m_lang_strings(lang_strings) {}
+ void write(const unsigned char *data);
+ static void write_block(IGrowBuf *buf, writer_sink *sink, const size_t table_size);
+
+private:
+ size_t m_lang_strings;
+
+};
+
+#endif//!___MAKENSIS_FILEFORM_H___
diff --git a/Source/growbuf.cpp b/Source/growbuf.cpp
index 8a13b63..28d8842 100755
--- a/Source/growbuf.cpp
+++ b/Source/growbuf.cpp
@@ -1,88 +1,88 @@
-/*
- * growbuf.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "growbuf.h"
-
-#include <cstdlib> // for malloc/free
-#include <cstring> // for memcpy
-#include <cstdio> // for f*
-#include <algorithm> // for std::min
-
-#include "Platform.h"
-
-using namespace std;
-
-GrowBuf::GrowBuf() { m_alloc=m_used=m_zero=0; m_s=NULL; m_bs=32768; }
-GrowBuf::~GrowBuf() { free(m_s); }
-
-void GrowBuf::set_zeroing(int zero) { m_zero=zero; }
-
-int GrowBuf::add(const void *data, int len)
-{
- if (len<=0) return 0;
- resize(m_used+len);
- memcpy((char*)m_s+m_used-len,data,len);
- return m_used-len;
-}
-
-void GrowBuf::resize(int newlen)
-{
- int os=m_alloc;
- int ou=m_used;
- m_used=newlen;
- if (newlen > m_alloc)
- {
- void *n;
- m_alloc = newlen*2 + m_bs;
- n = realloc(m_s, m_alloc);
- if (!n)
- {
- extern FILE *g_output;
- extern int g_display_errors;
- if (g_display_errors)
- {
- fprintf(g_output,"\nack! realloc(%d) failed, trying malloc(%d)!\n",m_alloc,newlen);
- fflush(g_output);
- }
- m_alloc=newlen; // try to malloc the minimum needed
- n=malloc(m_alloc);
- if (!n)
- {
- extern void quit();
- if (g_display_errors)
- {
- fprintf(g_output,"\nInternal compiler error #12345: GrowBuf realloc/malloc(%d) failed.\n",m_alloc);
- fflush(g_output);
- }
- quit();
- }
- memcpy(n,m_s,min(newlen,os));
- free(m_s);
- }
- m_s=n;
- }
- if (m_zero && m_used > ou)
- memset((char*)m_s + ou, 0, m_used - ou);
- if (!m_used && m_alloc > 2*m_bs) // only free if you resize to 0 and we're > 64k
- {
- m_alloc=0;
- free(m_s);
- m_s=NULL;
- }
-}
-
-int GrowBuf::getlen() const { return m_used; }
-void *GrowBuf::get() const { return m_s; }
+/*
+ * growbuf.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "growbuf.h"
+
+#include <cstdlib> // for malloc/free
+#include <cstring> // for memcpy
+#include <cstdio> // for f*
+#include <algorithm> // for std::min
+
+#include "Platform.h"
+
+using namespace std;
+
+GrowBuf::GrowBuf() { m_alloc=m_used=m_zero=0; m_s=NULL; m_bs=32768; }
+GrowBuf::~GrowBuf() { free(m_s); }
+
+void GrowBuf::set_zeroing(int zero) { m_zero=zero; }
+
+int GrowBuf::add(const void *data, int len)
+{
+ if (len<=0) return 0;
+ resize(m_used+len);
+ memcpy((char*)m_s+m_used-len,data,len);
+ return m_used-len;
+}
+
+void GrowBuf::resize(int newlen)
+{
+ int os=m_alloc;
+ int ou=m_used;
+ m_used=newlen;
+ if (newlen > m_alloc)
+ {
+ void *n;
+ m_alloc = newlen*2 + m_bs;
+ n = realloc(m_s, m_alloc);
+ if (!n)
+ {
+ extern FILE *g_output;
+ extern int g_display_errors;
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nack! realloc(%d) failed, trying malloc(%d)!\n",m_alloc,newlen);
+ fflush(g_output);
+ }
+ m_alloc=newlen; // try to malloc the minimum needed
+ n=malloc(m_alloc);
+ if (!n)
+ {
+ extern void quit();
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nInternal compiler error #12345: GrowBuf realloc/malloc(%d) failed.\n",m_alloc);
+ fflush(g_output);
+ }
+ quit();
+ }
+ memcpy(n,m_s,min(newlen,os));
+ free(m_s);
+ }
+ m_s=n;
+ }
+ if (m_zero && m_used > ou)
+ memset((char*)m_s + ou, 0, m_used - ou);
+ if (!m_used && m_alloc > 2*m_bs) // only free if you resize to 0 and we're > 64k
+ {
+ m_alloc=0;
+ free(m_s);
+ m_s=NULL;
+ }
+}
+
+int GrowBuf::getlen() const { return m_used; }
+void *GrowBuf::get() const { return m_s; }
diff --git a/Source/growbuf.h b/Source/growbuf.h
index 42edef1..b3c3fb1 100755
--- a/Source/growbuf.h
+++ b/Source/growbuf.h
@@ -1,62 +1,62 @@
-/*
- * growbuf.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __GROWBUF_H_
-#define __GROWBUF_H_
-
-class IGrowBuf
-{
- public:
- virtual ~IGrowBuf() {}
- virtual int add(const void *data, int len)=0;
- virtual void resize(int newlen)=0;
- virtual int getlen() const=0;
- virtual void *get() const=0;
-};
-
-class GrowBuf : public IGrowBuf
-{
- private: // don't copy instances
- GrowBuf(const GrowBuf&);
- void operator=(const GrowBuf&);
-
- public:
- GrowBuf();
- virtual ~GrowBuf();
-
- void set_zeroing(int zero);
- int add(const void *data, int len);
- void resize(int newlen);
- int getlen() const;
- void *get() const;
-
- private:
- void *m_s;
- int m_alloc;
- int m_used;
- int m_zero;
-
- protected:
- int m_bs;
-};
-
-class TinyGrowBuf : public GrowBuf {
- public:
- TinyGrowBuf() : GrowBuf() { m_bs=1024; }
-};
-
-#endif
-
+/*
+ * growbuf.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __GROWBUF_H_
+#define __GROWBUF_H_
+
+class IGrowBuf
+{
+ public:
+ virtual ~IGrowBuf() {}
+ virtual int add(const void *data, int len)=0;
+ virtual void resize(int newlen)=0;
+ virtual int getlen() const=0;
+ virtual void *get() const=0;
+};
+
+class GrowBuf : public IGrowBuf
+{
+ private: // don't copy instances
+ GrowBuf(const GrowBuf&);
+ void operator=(const GrowBuf&);
+
+ public:
+ GrowBuf();
+ virtual ~GrowBuf();
+
+ void set_zeroing(int zero);
+ int add(const void *data, int len);
+ void resize(int newlen);
+ int getlen() const;
+ void *get() const;
+
+ private:
+ void *m_s;
+ int m_alloc;
+ int m_used;
+ int m_zero;
+
+ protected:
+ int m_bs;
+};
+
+class TinyGrowBuf : public GrowBuf {
+ public:
+ TinyGrowBuf() : GrowBuf() { m_bs=1024; }
+};
+
+#endif
+
diff --git a/Source/icon.cpp b/Source/icon.cpp
new file mode 100755
index 0000000..e169fcd
--- /dev/null
+++ b/Source/icon.cpp
@@ -0,0 +1,379 @@
+#include "Platform.h"
+#include "icon.h"
+#include "util.h"
+#include "lang.h"
+
+#include <stdio.h>
+#include <stdexcept>
+#include <vector>
+#include <algorithm>
+
+using namespace std;
+
+extern int g_display_errors;
+extern FILE *g_output;
+
+#define SIZEOF_RSRC_ICON_GROUP_ENTRY 14
+
+static FILE * open_icon(const char* filename, IconGroupHeader& igh)
+{
+ FILE* f = FOPEN(filename, "rb");
+ if (!f)
+ throw runtime_error("can't open file");
+
+ if (!fread(&igh, sizeof(IconGroupHeader), 1, f))
+ throw runtime_error("unable to read header from file");
+
+ FIX_ENDIAN_INT16_INPLACE(igh.wIsIcon);
+ FIX_ENDIAN_INT16_INPLACE(igh.wReserved);
+ FIX_ENDIAN_INT16_INPLACE(igh.wCount);
+
+ if (igh.wIsIcon != 1 || igh.wReserved != 0)
+ throw runtime_error("invalid icon file");
+
+ return f;
+}
+
+void free_loaded_icon(IconGroup icon)
+{
+ for (IconGroup::size_type i = 0; i < icon.size(); i++)
+ {
+ delete [] icon[i].data;
+ }
+}
+
+IconGroup load_icon_res(CResourceEditor* re, WORD id)
+{
+ IconGroupHeader* header;
+ IconGroup result;
+
+ LPBYTE group = re->GetResourceA(
+ RT_GROUP_ICON, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG);
+
+ if (!group)
+ throw runtime_error("can't find icon group");
+
+ header = (IconGroupHeader*) group;
+
+ for (WORD i = 0; i < FIX_ENDIAN_INT16(header->wCount); i++)
+ {
+ Icon icon;
+ icon.index = i;
+
+ RsrcIconGroupEntry* entry = (RsrcIconGroupEntry*) (group
+ + sizeof(IconGroupHeader) + SIZEOF_RSRC_ICON_GROUP_ENTRY * i);
+
+ memcpy(&icon.meta, &entry->header, sizeof(IconGroupEntry));
+
+ WORD rsrc_id = FIX_ENDIAN_INT16(entry->wRsrcId);
+
+ icon.data = re->GetResourceA(RT_ICON, MAKEINTRESOURCE(rsrc_id), NSIS_DEFAULT_LANG);
+
+ if (!icon.data)
+ {
+ free_loaded_icon(result);
+ throw runtime_error("can't find icon");
+ }
+
+ result.push_back(icon);
+ }
+
+ return result;
+}
+
+IconGroup load_icon_file(const char* filename)
+{
+ IconGroupHeader iconHeader;
+ IconGroup result;
+
+ FILE *file = open_icon(filename, iconHeader);
+
+ for (WORD i = 0; i < iconHeader.wCount; i++)
+ {
+ Icon icon;
+ icon.index = i;
+ icon.data = NULL;
+
+ if (!fread(&icon.meta, sizeof(IconGroupEntry), 1, file))
+ {
+ free_loaded_icon(result);
+ throw runtime_error("unable to read entry from file");
+ }
+
+ DWORD size = FIX_ENDIAN_INT32(icon.meta.dwRawSize);
+ if (size > 1048576) // magic numbers are great
+ {
+ free_loaded_icon(result);
+ throw runtime_error("invalid icon file size");
+ }
+
+ DWORD iconOffset;
+
+ if (!fread(&iconOffset, sizeof(DWORD), 1, file))
+ {
+ free_loaded_icon(result);
+ throw runtime_error("unable to read offset from file");
+ }
+
+ fpos_t pos;
+ fgetpos(file, &pos);
+
+ if (fseek(file, iconOffset, SEEK_SET))
+ {
+ free_loaded_icon(result);
+ throw runtime_error("corrupted icon file, too small");
+ }
+
+ icon.data = new BYTE[size];
+
+ if (!fread(icon.data, size, 1, file))
+ {
+ free_loaded_icon(result);
+ throw runtime_error("unable to read icon from file");
+ }
+
+ fsetpos(file, &pos);
+
+ result.push_back(icon);
+ }
+
+ return result;
+}
+
+typedef struct
+{
+ unsigned index1;
+ unsigned index2;
+ DWORD size;
+} IconPair;
+
+bool compare_icon(Icon a, Icon b)
+{
+ return FIX_ENDIAN_INT32(a.meta.dwRawSize) > FIX_ENDIAN_INT32(b.meta.dwRawSize);
+}
+
+static IconGroup sort_icon(IconGroup icon)
+{
+ IconGroup sorted = icon;
+ sort(sorted.begin(), sorted.end(), compare_icon);
+ return sorted;
+}
+
+static vector<IconPair> get_icon_order(IconGroup icon1, IconGroup icon2)
+{
+ IconGroup sorted_icons1 = sort_icon(icon1);
+ IconGroup sorted_icons2 = sort_icon(icon2);
+
+ IconGroup::size_type shared_count = min(sorted_icons1.size(), sorted_icons2.size());
+ IconGroup::size_type total_count = max(sorted_icons1.size(), sorted_icons2.size());
+
+ vector<IconPair> result;
+ IconGroup::size_type i;
+
+ for (i = 0; i < shared_count; i++)
+ {
+ IconPair pair;
+
+ pair.index1 = sorted_icons1[i].index;
+ pair.index2 = sorted_icons2[i].index;
+ pair.size = max(
+ FIX_ENDIAN_INT32(sorted_icons1[i].meta.dwRawSize),
+ FIX_ENDIAN_INT32(sorted_icons2[i].meta.dwRawSize)
+ );
+
+ result.push_back(pair);
+ }
+
+ for (; i < total_count; i++)
+ {
+ IconPair pair;
+
+ if (i < sorted_icons1.size())
+ {
+ pair.index1 = sorted_icons1[i].index;
+ pair.index2 = 0xffff;
+ pair.size = FIX_ENDIAN_INT32(sorted_icons1[i].meta.dwRawSize);
+ }
+
+ if (i < sorted_icons2.size())
+ {
+ pair.index2 = sorted_icons2[i].index;
+ pair.index1 = 0xffff;
+ pair.size = FIX_ENDIAN_INT32(sorted_icons2[i].meta.dwRawSize);
+ }
+
+ result.push_back(pair);
+ }
+
+ return result;
+}
+
+static LPBYTE generate_icon_group(IconGroup icon, vector<IconPair> order, bool first)
+{
+ LPBYTE group = new BYTE[
+ sizeof(IconGroupHeader) // header
+ + order.size() * SIZEOF_RSRC_ICON_GROUP_ENTRY // entries
+ ];
+
+ IconGroupHeader* header = (IconGroupHeader*) group;
+
+ header->wReserved = 0;
+ header->wIsIcon = FIX_ENDIAN_INT16(1);
+ header->wCount = FIX_ENDIAN_INT16(icon.size());
+
+ for (IconGroup::size_type i = 0; i < icon.size(); i++)
+ {
+ RsrcIconGroupEntry* entry = (RsrcIconGroupEntry*)
+ &group[sizeof(IconGroupHeader) + SIZEOF_RSRC_ICON_GROUP_ENTRY * i];
+ unsigned index = first ? order[i].index1 : order[i].index2;
+
+ memcpy(&entry->header, &icon[index].meta, sizeof(IconGroupEntry));
+ entry->wRsrcId = FIX_ENDIAN_INT16(i + 1);
+ }
+
+ return group;
+}
+
+// set_icon, must get an initialized resource editor
+void set_icon(CResourceEditor* re, WORD wIconId, IconGroup icon1, IconGroup icon2)
+{
+ vector<IconPair> order = get_icon_order(icon1, icon2);
+
+ // genreate group
+ LPBYTE group1 = generate_icon_group(icon1, order, true);
+
+ // set group
+ size_t group_size = sizeof(IconGroupHeader) // header
+ + order.size() * SIZEOF_RSRC_ICON_GROUP_ENTRY; // entries
+
+ re->UpdateResourceA(RT_GROUP_ICON, MAKEINTRESOURCE(wIconId), NSIS_DEFAULT_LANG, group1, group_size);
+
+ // delete old icons
+ unsigned i = 1;
+ while (re->UpdateResourceA(RT_ICON, MAKEINTRESOURCE(i++), NSIS_DEFAULT_LANG, 0, 0));
+
+ // set new icons
+ IconGroup::size_type order_index;
+ for (order_index = 0; order_index < order.size(); order_index++)
+ {
+ LPBYTE data = new BYTE[order[order_index].size];
+
+ if (order_index < icon1.size())
+ {
+ Icon* icon = &icon1[order[order_index].index1];
+ memcpy(data, icon->data, FIX_ENDIAN_INT32(icon->meta.dwRawSize));
+ }
+
+ re->UpdateResourceA(RT_ICON, MAKEINTRESOURCE(order_index + 1), NSIS_DEFAULT_LANG, data, order[order_index].size);
+
+ delete [] data;
+ }
+}
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+// returns the data of the uninstaller icon that should replace the installer icon data
+unsigned char* generate_uninstall_icon_data(IconGroup icon1, IconGroup icon2, size_t &data_size)
+{
+ IconGroup::size_type i;
+ vector<IconPair> order = get_icon_order(icon1, icon2);
+
+ // genreate group
+ LPBYTE group = generate_icon_group(icon2, order, false);
+
+ // calculate size
+ size_t group_size = sizeof(IconGroupHeader) // header
+ + order.size() * SIZEOF_RSRC_ICON_GROUP_ENTRY; // entries
+
+ data_size = group_size // group header
+ + sizeof(DWORD) * 2 // offset and size of group header
+ + (sizeof(DWORD) * 2) * icon2.size() // offset and size per entry
+ + sizeof(DWORD); // terminator
+
+ for (i = 0; i < icon2.size(); i++)
+ {
+ // add icon sizes
+ data_size += FIX_ENDIAN_INT32(icon2[i].meta.dwRawSize);
+ }
+
+ // allocate memory
+ LPBYTE uninst_data = new BYTE[data_size];
+ LPBYTE seeker = uninst_data;
+
+ // fill group header
+ *(LPDWORD) seeker = FIX_ENDIAN_INT32(group_size);
+ seeker += sizeof(DWORD);
+ *(LPDWORD) seeker = 0;
+ seeker += sizeof(DWORD);
+
+ memcpy(seeker, group, group_size);
+ seeker += group_size;
+
+ // fill entries
+ for (i = 0; i < icon2.size(); i++)
+ {
+ Icon* icon = &icon2[order[i].index2];
+ DWORD size = FIX_ENDIAN_INT32(icon->meta.dwRawSize);
+
+ *(LPDWORD) seeker = FIX_ENDIAN_INT32(size);
+ seeker += sizeof(DWORD);
+ *(LPDWORD) seeker = 0;
+ seeker += sizeof(DWORD);
+
+ memcpy(seeker, icon->data, size);
+ seeker += size;
+ }
+
+ // add terminator
+ *(LPDWORD) seeker = 0;
+
+ // done
+ return uninst_data;
+}
+
+// Fill the array of icons for uninstall with their offsets
+// Returns zero on failure
+int generate_unicons_offsets(LPBYTE exeHeader, size_t exeHeaderSize, LPBYTE uninstIconData, WORD wIconId) {
+ try
+ {
+ DWORD offset;
+ DWORD size;
+
+ CResourceEditor re(exeHeader, exeHeaderSize);
+
+ LPBYTE seeker = uninstIconData;
+
+ offset = re.GetResourceOffsetA(RT_GROUP_ICON, MAKEINTRESOURCE(wIconId), NSIS_DEFAULT_LANG);
+
+ size = *(LPDWORD)seeker;
+ seeker += sizeof(DWORD);
+ *(LPDWORD) seeker = FIX_ENDIAN_INT32(offset);
+ seeker += sizeof(DWORD);
+
+ seeker += FIX_ENDIAN_INT32(size);
+
+ WORD icon_index = 1;
+
+ while (*(LPDWORD)seeker)
+ {
+ offset = re.GetResourceOffsetA(RT_ICON, MAKEINTRESOURCE(icon_index), NSIS_DEFAULT_LANG);
+
+ size = *(LPDWORD)seeker;
+ seeker += sizeof(DWORD);
+ *(LPDWORD) seeker = FIX_ENDIAN_INT32(offset);
+ seeker += sizeof(DWORD);
+
+ seeker += FIX_ENDIAN_INT32(size);
+
+ icon_index++;
+ }
+ }
+ catch (const exception& e)
+ {
+ if (g_display_errors)
+ fprintf(g_output, "\nError generating uninstaller icon: %s -- failing!\n", e.what());
+ return 0;
+ }
+
+ return 1;
+}
+#endif // NSIS_CONFIG_UNINSTALL_SUPPORT
diff --git a/Source/icon.h b/Source/icon.h
new file mode 100755
index 0000000..e71f28b
--- /dev/null
+++ b/Source/icon.h
@@ -0,0 +1,76 @@
+/*
+ * icon.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _ICON_H_
+#define _ICON_H_
+
+#include "ResourceEditor.h"
+
+#include <vector>
+
+typedef struct
+{
+ WORD wReserved;
+ WORD wIsIcon;
+ WORD wCount;
+} IconGroupHeader;
+
+typedef struct
+{
+ BYTE bWidth;
+ BYTE bHeight;
+ BYTE bPaletteEntries;
+ BYTE bReserved;
+ WORD wPlanes;
+ WORD wBitsPerPixel;
+ DWORD dwRawSize;
+} IconGroupEntry;
+
+typedef struct
+{
+ IconGroupEntry header;
+ DWORD dwImageOffset;
+} FileIconGroupEntry;
+
+typedef struct
+{
+ IconGroupEntry header;
+ WORD wRsrcId;
+} RsrcIconGroupEntry;
+
+typedef struct
+{
+ unsigned index;
+ IconGroupEntry meta;
+ LPBYTE data;
+} Icon;
+
+typedef std::vector<Icon> IconGroup;
+
+IconGroup load_icon_file(const char* filename);
+IconGroup load_icon_res(CResourceEditor* re, WORD id);
+void free_loaded_icon(IconGroup icon);
+
+void set_icon(CResourceEditor* re, WORD wIconId, IconGroup icon1, IconGroup icon2);
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+// returns the data of the uninstaller icon (inside filename) that should replace the installer icon data
+LPBYTE generate_uninstall_icon_data(IconGroup icon1, IconGroup icon2, size_t &size);
+// Fill the array of icons for uninstall with their offsets
+int generate_unicons_offsets(LPBYTE exeHeader, size_t exeHeaderSize, LPBYTE uninstIconData, WORD wIconId);
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+
+#endif//_ICON_H_
diff --git a/Source/lang.cpp b/Source/lang.cpp
index 586c81a..1bf316f 100755
--- a/Source/lang.cpp
+++ b/Source/lang.cpp
@@ -1,1108 +1,1108 @@
-/*
- * lang.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include "build.h"
-#include "util.h"
-#include "DialogTemplate.h"
-#include "exehead/resource.h"
-#include "version.h"
-
-using namespace std;
-
-// Default English strings. Should match NSIS_DEFAULT_LANG
-// Do not change the first string in every item, it's the LangString
-// name for usage in scripts.
-
-typedef enum {
- NONE_STATIC = 0,
- INSTALL_STATIC = 1,
- UNINSTALL_STATIC = 2,
- BOTH_STATIC = 3
-} STATICID;
-
-struct NLFString {
- char *szLangStringName;
- char *szDefault;
- STATICID eStaticID;
-};
-
-NLFString NLFStrings[NLF_STRINGS] = {
- {"^Branding", "Nullsoft Install System %s", BOTH_STATIC},
- {"^SetupCaption", "$(^Name) Setup", INSTALL_STATIC},
- {"^UninstallCaption", "$(^Name) Uninstall", UNINSTALL_STATIC},
- {"^LicenseSubCaption", ": License Agreement", NONE_STATIC},
- {"^ComponentsSubCaption", ": Installation Options", NONE_STATIC},
- {"^DirSubCaption", ": Installation Folder", NONE_STATIC},
- {"^InstallingSubCaption", ": Installing", NONE_STATIC},
- {"^CompletedSubCaption", ": Completed", NONE_STATIC},
- {"^UnComponentsSubCaption", ": Uninstallation Options", NONE_STATIC},
- {"^UnDirSubCaption", ": Uninstallation Folder", NONE_STATIC},
- {"^ConfirmSubCaption", ": Confirmation", NONE_STATIC},
- {"^UninstallingSubCaption", ": Uninstalling", NONE_STATIC},
- {"^UnCompletedSubCaption", ": Completed", NONE_STATIC},
- {"^BackBtn", "< &Back", NONE_STATIC},
- {"^NextBtn", "&Next >", NONE_STATIC},
- {"^AgreeBtn", "I &Agree", NONE_STATIC},
- {"^AcceptBtn", "I &accept the terms in the License Agreement", NONE_STATIC},
- {"^DontAcceptBtn", "I &do not accept the terms in the License Agreement", NONE_STATIC},
- {"^InstallBtn", "&Install", NONE_STATIC},
- {"^UninstallBtn", "&Uninstall", NONE_STATIC},
- {"^CancelBtn", "Cancel", NONE_STATIC},
- {"^CloseBtn", "&Close", NONE_STATIC},
- {"^BrowseBtn", "B&rowse...", NONE_STATIC},
- {"^ShowDetailsBtn", "Show &details", NONE_STATIC},
- {"^ClickNext", "Click Next to continue.", NONE_STATIC},
- {"^ClickInstall", "Click Install to start the installation.", NONE_STATIC},
- {"^ClickUninstall", "Click Uninstall to start the uninstallation.", NONE_STATIC},
- {"^Name", "Name", BOTH_STATIC},
- {"^NameDA", 0, NONE_STATIC}, // virtual
- {"^Completed", "Completed", NONE_STATIC},
- {"^LicenseText", "Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.", NONE_STATIC},
- {"^LicenseTextCB", "Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK", NONE_STATIC},
- {"^LicenseTextRB", "Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK", NONE_STATIC},
- {"^UnLicenseText", "Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.", NONE_STATIC},
- {"^UnLicenseTextCB", "Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK", NONE_STATIC},
- {"^UnLicenseTextRB", "Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK", NONE_STATIC},
- {"^LicenseData", 0, NONE_STATIC}, // virtual - not processed
- {"^Custom", "Custom", NONE_STATIC},
- {"^ComponentsText", "Check the components you want to install and uncheck the components you don't want to install. $_CLICK", NONE_STATIC},
- {"^ComponentsSubText1", "Select the type of install:", NONE_STATIC},
- {"^ComponentsSubText2_NoInstTypes", "Select components to install:", NONE_STATIC},
- {"^ComponentsSubText2", "Or, select the optional components you wish to install:", NONE_STATIC},
- {"^UnComponentsText", "Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK", NONE_STATIC},
- {"^UnComponentsSubText1", "Select the type of uninstall:", NONE_STATIC},
- {"^UnComponentsSubText2_NoInstTypes", "Select components to uninstall:", NONE_STATIC},
- {"^UnComponentsSubText2", "Or, select the optional components you wish to uninstall:", NONE_STATIC},
- {"^DirText", "Setup will install $(^NameDA) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK", NONE_STATIC},
- {"^DirSubText", "Destination Folder", NONE_STATIC},
- {"^DirBrowseText", "Select the folder to install $(^NameDA) in:", NONE_STATIC},
- {"^UnDirText", "Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK", NONE_STATIC},
- {"^UnDirSubText", "", NONE_STATIC},
- {"^UnDirBrowseText", "Select the folder to uninstall $(^NameDA) from:", NONE_STATIC},
- {"^SpaceAvailable", "Space available: ", BOTH_STATIC},
- {"^SpaceRequired", "Space required: ", BOTH_STATIC},
- {"^UninstallingText", "This wizard will uninstall $(^NameDA) from your computer. $_CLICK", NONE_STATIC},
- {"^UninstallingSubText", "Uninstalling from:", NONE_STATIC},
- {"^FileError", "Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.", NONE_STATIC},
- {"^FileError_NoIgnore", "Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.", NONE_STATIC},
- {"^CantWrite", "Can't write: ", BOTH_STATIC},
- {"^CopyFailed", "Copy failed", BOTH_STATIC},
- {"^CopyTo", "Copy to ", BOTH_STATIC},
- {"^Registering", "Registering: ", NONE_STATIC},
- {"^Unregistering", "Unregistering: ", NONE_STATIC},
- {"^SymbolNotFound", "Could not find symbol: ", BOTH_STATIC},
- {"^CouldNotLoad", "Could not load: ", BOTH_STATIC},
- {"^CreateFolder", "Create folder: ", BOTH_STATIC},
- {"^CreateShortcut", "Create shortcut: ", BOTH_STATIC},
- {"^CreatedUninstaller", "Created uninstaller: ", BOTH_STATIC},
- {"^Delete", "Delete file: ", BOTH_STATIC},
- {"^DeleteOnReboot", "Delete on reboot: ", BOTH_STATIC},
- {"^ErrorCreatingShortcut", "Error creating shortcut: ", BOTH_STATIC},
- {"^ErrorCreating", "Error creating: ", BOTH_STATIC},
- {"^ErrorDecompressing", "Error decompressing data! Corrupted installer?", BOTH_STATIC},
- {"^ErrorRegistering", "Error registering DLL", BOTH_STATIC},
- {"^ExecShell", "ExecShell: ", BOTH_STATIC},
- {"^Exec", "Execute: ", BOTH_STATIC},
- {"^Extract", "Extract: ", BOTH_STATIC},
- {"^ErrorWriting", "Extract: error writing to file ", BOTH_STATIC},
- {"^InvalidOpcode", "Installer corrupted: invalid opcode", BOTH_STATIC},
- {"^NoOLE", "No OLE for: ", BOTH_STATIC},
- {"^OutputFolder", "Output folder: ", BOTH_STATIC},
- {"^RemoveFolder", "Remove folder: ", BOTH_STATIC},
- {"^RenameOnReboot", "Rename on reboot: ", BOTH_STATIC},
- {"^Rename", "Rename: ", BOTH_STATIC},
- {"^Skipped", "Skipped: ", BOTH_STATIC},
- {"^CopyDetails", "Copy Details To Clipboard", BOTH_STATIC},
- {"^LogInstall", "Log install process", BOTH_STATIC},
- {"^Byte", "B", BOTH_STATIC},
- {"^Kilo", "K", BOTH_STATIC},
- {"^Mega", "M", BOTH_STATIC},
- {"^Giga", "G", BOTH_STATIC},
- {"^Font", "MS Shell Dlg", NONE_STATIC},
- {"^FontSize", "8", NONE_STATIC},
- {"^RTL", "0", NONE_STATIC},
- {"^Language", "English", NONE_STATIC}
-};
-
-// ==============
-// LangStringList
-// ==============
-
-LangStringList::LangStringList() {
- count = 0;
-}
-
-int LangStringList::add(const char *name, int *sn/*=0*/)
-{
- int pos = SortedStringListND<struct langstring>::add(name);
- if (pos == -1) return -1;
-
- ((struct langstring*)gr.get())[pos].sn = count;
- if (sn) *sn = count;
- count++;
- ((struct langstring*)gr.get())[pos].index = -1;
- ((struct langstring*)gr.get())[pos].uindex = -1;
- ((struct langstring*)gr.get())[pos].process = 1;
-
- return pos;
-}
-
-int LangStringList::get(char *name, int *sn/*=0*/, int *index/*=0*/, int *uindex/*=0*/, int *process/*=0*/)
-{
- if (index) *index = -1;
- if (uindex) *uindex = -1;
- if (sn) *sn = -1;
- int v=find(name);
- if (v==-1) return -1;
- if (index) *index = ((struct langstring*)gr.get())[v].index;
- if (uindex) *uindex = ((struct langstring*)gr.get())[v].uindex;
- if (sn) *sn = ((struct langstring*)gr.get())[v].sn;
- if (process) *process = ((struct langstring*)gr.get())[v].process;
- return v;
-}
-
-void LangStringList::set(int pos, int index/*=-1*/, int uindex/*=-1*/, int process/*=-1*/)
-{
- if ((unsigned int)pos > (gr.getlen() / sizeof(struct langstring)))
- return;
-
- struct langstring *data=(struct langstring *)gr.get();
-
- if (index >= 0)
- data[pos].index = index;
- if (uindex >= 0)
- data[pos].uindex = uindex;
- if (process >= 0)
- data[pos].process = process;
-}
-
-void LangStringList::set(char *name, int index, int uindex/*=-1*/, int process/*=-1*/)
-{
- set(get(name), index, uindex, process);
-}
-
-const char* LangStringList::pos2name(int pos)
-{
- struct langstring *data=(struct langstring *)gr.get();
-
- if ((unsigned int)pos > (gr.getlen() / sizeof(struct langstring)))
- return 0;
-
- return ((const char*)strings.get() + data[pos].name);
-}
-
-const char* LangStringList::offset2name(int name)
-{
- if ((unsigned int)name > (unsigned int)strings.getlen())
- return 0;
-
- return (const char*)strings.get() + name;
-}
-
-int LangStringList::getnum()
-{
- return gr.getlen() / sizeof(struct langstring);
-}
-
-int LangStringList::compare_index(const void *item1, const void *item2)
-{
- struct langstring *ls1 = (struct langstring *)item1;
- struct langstring *ls2 = (struct langstring *)item2;
-
- return ls1->index - ls2->index;
-}
-
-langstring* LangStringList::sort_index(int *num)
-{
- if (!num) return 0;
- sortbuf.resize(0);
- sortbuf.add(gr.get(), gr.getlen());
- *num = sortbuf.getlen() / sizeof(struct langstring);
- qsort(sortbuf.get(), *num, sizeof(struct langstring), compare_index);
- return (struct langstring*) sortbuf.get();
-}
-
-int LangStringList::compare_uindex(const void *item1, const void *item2)
-{
- struct langstring *ls1 = (struct langstring *)item1;
- struct langstring *ls2 = (struct langstring *)item2;
-
- return ls1->uindex - ls2->uindex;
-}
-
-langstring* LangStringList::sort_uindex(int *num)
-{
- if (!num) return 0;
- sortbuf.resize(0);
- sortbuf.add(gr.get(), gr.getlen());
- *num = sortbuf.getlen() / sizeof(struct langstring);
- qsort(sortbuf.get(), *num, sizeof(struct langstring), compare_uindex);
- return (struct langstring*) sortbuf.get();
-}
-
-// ============
-// StringsArray
-// ============
-
-StringsArray::StringsArray()
-{
- offsets.set_zeroing(1);
-
- strings.add("", sizeof(""));
-}
-
-void StringsArray::resize(int num)
-{
- offsets.resize(num * sizeof(int));
-}
-
-int StringsArray::set(int idx, char *str)
-{
- if (idx < 0)
- return 0;
-
- if (idx >= (int)(offsets.getlen() / sizeof(int)))
- resize(idx+1);
-
- int old = ((int*)offsets.get())[idx];
-
- ((int*)offsets.get())[idx] = strings.add(str, strlen(str) + 1);
-
- return old;
-}
-
-const char* StringsArray::get(int idx)
-{
- if ((unsigned int)idx >= (offsets.getlen() / sizeof(int)))
- return 0;
-
- return (const char *)strings.get() + ((int*)offsets.get())[idx];
-}
-
-// =========
-// CEXEBuild
-// =========
-
-void CEXEBuild::InitLangTables() {
- keep_ref = false;
-
- for (int i = 0; i < NLF_STRINGS; i++) {
- NLFRefs[i].iRef = 0;
- NLFRefs[i].iUnRef = 0;
-
-#ifdef NSIS_CONFIG_LOG
- if (i == NLF_NAME) {
- NLFRefs[i].iRef++;
- NLFRefs[i].iUnRef++;
- }
-#endif
-
- if (NLFStrings[i].eStaticID & INSTALL_STATIC) {
- set_uninstall_mode(0);
- DefineLangString(NLFStrings[i].szLangStringName);
- }
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (NLFStrings[i].eStaticID & UNINSTALL_STATIC) {
- set_uninstall_mode(1);
- DefineLangString(NLFStrings[i].szLangStringName);
- }
-#endif
- }
-
- set_uninstall_mode(0);
-
- keep_ref = true;
-}
-
-LanguageTable* CEXEBuild::GetLangTable(LANGID &lang, bool create/*=true*/) {
- int nlt = lang_tables.getlen() / sizeof(LanguageTable);
- LanguageTable *nla = (LanguageTable*)lang_tables.get();
-
- lang = lang ? lang : last_used_lang;
- LanguageTable *table = NULL;
-
- for (int i = 0; i < nlt; i++) {
- if (lang == nla[i].lang_id) {
- table = &nla[i];
- break;
- }
- }
- if (!table && create) {
- LanguageTable newtable;
-
- newtable.lang_id = lang;
- newtable.dlg_offset = 0;
- memset(&newtable.nlf, 0, sizeof(NLF));
-
- newtable.lang_strings = new StringsArray;
-
- lang_tables.add(&newtable, sizeof(LanguageTable));
- table = (LanguageTable*)lang_tables.get() + nlt;
- }
-
- if (table) // update last used language if a table was loaded
- last_used_lang = lang;
-
- return table;
-}
-
-char *CEXEBuild::GetLangNameAndCP(LANGID lang, unsigned int *codepage/*=NULL*/) {
- LanguageTable *table = GetLangTable(lang, false);
-
- if (table && table->nlf.m_bLoaded) {
- if (codepage)
- *codepage = table->nlf.m_uCodePage;
-
- return table->nlf.m_szName;
- }
- else {
- if (codepage)
- *codepage = 1252; // English US
-
- if (lang == 1033)
- return "English";
- else
- return "???";
- }
-}
-
-int CEXEBuild::DefineLangString(char *name, int process/*=-1*/) {
- int index, uindex, pos, ret, sn;
- pos = build_langstrings.get(name, &sn, &index, &uindex);
- if (pos < 0) {
- pos = build_langstrings.add(name);
- }
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!uninstall_mode) {
-#endif
- if (index < 0) {
- index = build_langstring_num++;
- }
- ret = -index - 1;
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- }
- else {
- if (uindex < 0) {
- uindex = ubuild_langstring_num++;
- }
- ret = -uindex - 1;
- }
-#endif
-
- build_langstrings.set(pos, index, uindex, process);
-
- // set reference count for NLF strings
- if (keep_ref && name[0] == '^') {
- for (int i = 0; i < NLF_STRINGS; i++) {
- if (!strcmp(name, NLFStrings[i].szLangStringName)) {
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (uninstall_mode)
- NLFRefs[i].iUnRef++;
- else
-#endif
- NLFRefs[i].iRef++;
-
- break;
- }
- }
- }
-
- return ret;
-}
-
-int CEXEBuild::DefineInnerLangString(int id, int process/*=-1*/) {
- bool old_keep_ref = keep_ref;
-
- // set reference count for NLF strings
- if (keep_ref) {
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (uninstall_mode)
- NLFRefs[id].iUnRef++;
- else
-#endif
- NLFRefs[id].iRef++;
-
- keep_ref = false;
- }
-
- int ret = DefineLangString(NLFStrings[id].szLangStringName, process);
-
- keep_ref = old_keep_ref;
-
- return ret;
-}
-
-int CEXEBuild::SetLangString(char *name, LANGID lang, char *string) {
- if (!string || !name) return PS_ERROR;
-
- LanguageTable *table = GetLangTable(lang);
- if (!table) return PS_ERROR;
-
- int sn;
-
- int pos = build_langstrings.get(name, &sn);
- if (pos < 0)
- pos = build_langstrings.add(name, &sn);
-
- if (table->lang_strings->set(sn, string))
- return PS_WARNING;
-
- return PS_OK;
-}
-
-int CEXEBuild::SetInnerString(int id, char *string) {
- if ((unsigned int)id >= NLF_STRINGS || !string) return PS_ERROR;
-
- int ret = PS_OK;
-
- const char *ps = UserInnerStrings.get(id);
- if (ps && *ps)
- ret = PS_WARNING;
-
- UserInnerStrings.set(id, string);
-
- return ret;
-}
-
-int CEXEBuild::GenerateLangTable(LanguageTable *lt, int num_lang_tables) {
- // Add all installer language strings
- int i, j, l, tabsset;
- struct langstring* lang_strings = NULL;
- TinyGrowBuf *string_ptrs = new TinyGrowBuf[num_lang_tables];
-
- tabsset = 1;
- while (tabsset)
- {
- tabsset = 0;
- for (i = num_lang_tables; i--; )
- {
- // Fill in default values for all used language strings that we can
- FillLanguageTable(&lt[i]);
- // Make sure the string lists are large enough
- string_ptrs[i].set_zeroing(1);
- if (!uninstall_mode)
- string_ptrs[i].resize(build_langstring_num * sizeof(int));
- else
- string_ptrs[i].resize(ubuild_langstring_num * sizeof(int));
- }
-
- // For all current language strings
- if (!uninstall_mode)
- lang_strings = build_langstrings.sort_index(&l);
- else
- lang_strings = build_langstrings.sort_uindex(&l);
-
- for (j = 0; j < l; j++)
- {
- int lang_string_index;
-
- if (!uninstall_mode)
- lang_string_index = lang_strings[j].index;
- else
- lang_string_index = lang_strings[j].uindex;
-
- // Is this language string used (in the installer)?
- if (lang_string_index >= 0)
- {
- // For each language
- for (i = num_lang_tables; i--; )
- {
- // Get the current string pointer
- int *ptr = (int *)string_ptrs[i].get() + lang_string_index;
- // Not already set?
- if (!*ptr)
- {
- // Get the language string and its name
- const char *str = lt[i].lang_strings->get(lang_strings[j].sn);
- const char *lsn = build_langstrings.offset2name(lang_strings[j].name);
- if (!str || !*str)
- {
- // No string is defined; give a warning (for user strings only)
- if (lsn[0] != '^')
- {
- if (lt[i].nlf.m_bLoaded)
- warning("LangString \"%s\" is not set in language table of language %s", lsn, lt[i].nlf.m_szName);
- else
- warning("LangString \"%s\" is not set in language table of language %d", lsn, lt[i].lang_id);
- }
- }
- else
- {
- // Add the language string to the string data block
- char fn[1024];
- sprintf(fn, "LangString %s", lsn);
- curfilename = fn;
- linecnt = lt[i].lang_id;
- *ptr = add_string(str, lang_strings[j].process, (WORD) lt[i].nlf.m_uCodePage);
- curfilename = 0;
- // Indicate that we should check again for any newly referenced language strings
- tabsset++;
- }
- }
- }
- }
- }
- }
-
- // Optimize langstrings and check for recursion
- for (i = num_lang_tables; i--; )
- {
- TinyGrowBuf rec;
- int *lst = (int *)string_ptrs[i].get();
-
- int langstring_num;
-
- if (!uninstall_mode)
- langstring_num = build_langstring_num;
- else
- langstring_num = ubuild_langstring_num;
-
- for (j = 0; j < langstring_num; j++)
- {
- // Does this string reference another language string directly?
- while (lst[j] < 0)
- {
- // Search through list of language string references
- for (l = 0; (unsigned int)l < rec.getlen() / sizeof(int); l++)
- {
- if (((int*)rec.get())[l] == lst[j])
- {
- // We have the index of a recursive language string; now find the name
- const char *name = "(unnamed)";
- for (l = 0; l < langstring_num; l++)
- {
- int index;
-
- if (!uninstall_mode)
- index = lang_strings[l].index;
- else
- index = lang_strings[l].uindex;
-
- if (lang_strings[l].index == j)
- {
- name = build_langstrings.offset2name(lang_strings[l].name);
- }
- }
- ERROR_MSG("Error: LangString %s is recursive!\n", name);
- delete [] string_ptrs;
- return PS_ERROR;
- }
- }
- // Add this reference to the list
- rec.add(&lst[j], sizeof(int));
- // and dereference it
- lst[j] = lst[-lst[j] - 1];
- }
- rec.resize(0);
- }
- }
-
- // Add language tables into their datablock
- for (i = num_lang_tables; i--; )
- {
- cur_langtables->add(&lt[i].lang_id, sizeof(LANGID));
- cur_langtables->add(&lt[i].dlg_offset, sizeof(int));
- int rtl = lt[i].nlf.m_bRTL ? 1 : 0;
- cur_langtables->add(&rtl, sizeof(int));
- cur_langtables->add(string_ptrs[i].get(), string_ptrs[i].getlen());
- string_ptrs[i].resize(0);
- }
-
- cur_header->blocks[NB_LANGTABLES].num = num_lang_tables;
- cur_header->langtable_size = cur_langtables->getlen() / num_lang_tables;
-
- delete [] string_ptrs;
-
- return PS_OK;
-}
-
-int CEXEBuild::GenerateLangTables() {
- int i;
- LanguageTable *lt = (LanguageTable*)lang_tables.get();
-
- SCRIPT_MSG("Generating language tables... ");
-
- if (
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- ubuild_langstring_num > MAX_CODED ||
-#endif
- build_langstring_num > MAX_CODED
- )
- {
- ERROR_MSG("\nError: too many LangStrings. Maximum allowed is %u.\n", MAX_CODED);
- return PS_ERROR;
- }
-
- // If we have no tables (user didn't set any string and didn't load any NLF) create the default one
- if (!lang_tables.getlen()) {
- LANGID lang = NSIS_DEFAULT_LANG;
- LanguageTable *table = GetLangTable(lang);
- if (!table) return PS_ERROR;
-
- lt = (LanguageTable*)lang_tables.get();
- }
-
- // Apply default font
- if (*build_font)
- {
- try {
- init_res_editor();
-
-#define ADD_FONT(id) { \
- BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG); \
- if (dlg) { \
- CDialogTemplate td(dlg); \
- res_editor->FreeResource(dlg); \
- td.SetFont(build_font, (WORD) build_font_size); \
- DWORD dwSize; \
- dlg = td.Save(dwSize); \
- res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG, dlg, dwSize); \
- delete [] dlg; \
- } \
- }
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
- ADD_FONT(IDD_LICENSE);
- ADD_FONT(IDD_LICENSE_FSRB);
- ADD_FONT(IDD_LICENSE_FSCB);
-#endif
- ADD_FONT(IDD_DIR);
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- ADD_FONT(IDD_SELCOM);
-#endif
- ADD_FONT(IDD_INST);
- ADD_FONT(IDD_INSTFILES);
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- ADD_FONT(IDD_UNINST);
-#endif
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- ADD_FONT(IDD_VERIFY);
-#endif
-#undef ADD_FONT
- }
- catch (exception& err) {
- ERROR_MSG("\nError while applying font: %s\n", err.what());
- return PS_ERROR;
- }
- }
-
- // Fill tables with defaults (if needed) and with instruction strings
- // Create language specific resources (currently only dialogs with different fonts)
- int num_lang_tables = lang_tables.getlen() / sizeof(LanguageTable);
- // if there is one string table then there is no need for two sets of dialogs
- int cur_offset = num_lang_tables == 1 ? 0 : 100;
- for (i = 0; i < num_lang_tables; i++)
- {
- if ((lt[i].nlf.m_szFont && !*build_font) || lt[i].nlf.m_bRTL)
- {
- lt[i].dlg_offset = cur_offset;
-
- char *font = lt[i].nlf.m_szFont;
- if (*build_font) font = 0;
-
- try {
- init_res_editor();
-
-#define ADD_FONT(id) { \
- BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG); \
- if (dlg) { \
- CDialogTemplate td(dlg,lt[i].nlf.m_uCodePage); \
- res_editor->FreeResource(dlg); \
- if (font) td.SetFont(font, (WORD) lt[i].nlf.m_iFontSize); \
- if (lt[i].nlf.m_bRTL) { \
- td.ConvertToRTL(); \
- DialogItemTemplate* dir = td.GetItem(IDC_DIR); \
- if (id == IDD_DIR && dir) { \
- if ((dir->dwStyle & ES_CENTER) == 0) dir->dwStyle ^= ES_RIGHT; \
- dir->dwExtStyle &= ~(WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR); \
- } \
- } \
- DWORD dwSize; \
- dlg = td.Save(dwSize); \
- res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(id+cur_offset), NSIS_DEFAULT_LANG, dlg, dwSize); \
- delete [] dlg; \
- } \
- }
-
-#ifdef NSIS_CONFIG_LICENSEPAGE
- ADD_FONT(IDD_LICENSE);
- ADD_FONT(IDD_LICENSE_FSRB);
- ADD_FONT(IDD_LICENSE_FSCB);
-#endif
- ADD_FONT(IDD_DIR);
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- ADD_FONT(IDD_SELCOM);
-#endif
- ADD_FONT(IDD_INST);
- ADD_FONT(IDD_INSTFILES);
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- ADD_FONT(IDD_UNINST);
-#endif
-#ifdef NSIS_CONFIG_CRC_SUPPORT
- ADD_FONT(IDD_VERIFY);
-#endif
-#undef ADD_FONT
- }
- catch (exception& err) {
- ERROR_MSG("\nError while applying NLF font/RTL: %s\n", err.what());
- return PS_ERROR;
- }
-
- cur_offset += 100;
- }
- }
-
- int orig_uninstall_mode = uninstall_mode;
-
- set_uninstall_mode(0);
- if (GenerateLangTable(lt, num_lang_tables) != PS_OK)
- return PS_ERROR;
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- set_uninstall_mode(1);
- if (GenerateLangTable(lt, num_lang_tables) != PS_OK)
- return PS_ERROR;
-#endif
-
- set_uninstall_mode(orig_uninstall_mode);
-
- SCRIPT_MSG("Done!\n");
-
- return PS_OK;
-}
-
-void CEXEBuild::FillLanguageTable(LanguageTable *table) {
- for (int i = 0; i < NLF_STRINGS; i++) {
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!NLFRefs[i].iUnRef && !NLFRefs[i].iRef)
- continue;
-#else
- if (!NLFRefs[i].iRef)
- continue;
-#endif
-
- else if (i == NLF_SPACE_REQ || i == NLF_SPACE_AVAIL)
- {
- if (no_space_texts)
- {
- continue;
- }
- }
-
- int sn, index;
- int pos = build_langstrings.get(NLFStrings[i].szLangStringName, &sn, &index);
- if (pos >= 0) {
- const char *str = table->lang_strings->get(sn);
- if (!str || !*str) {
- const char *us = UserInnerStrings.get(i);
- if (i == NLF_NAME_DA && (!us || !*us))
- {
- // if the user didn't set NLF_NAME_DA we set it to $(^Name)
- table->lang_strings->set(sn, "$(^Name)");
- }
- if (us && *us) {
- table->lang_strings->set(sn, (char *) us);
- }
- else {
- char *dstr = table->nlf.m_szStrings[i] ? table->nlf.m_szStrings[i] : NLFStrings[i].szDefault;
- if (!dstr)
- continue;
- if (i == NLF_BRANDING) {
- char temp[NSIS_MAX_STRLEN + sizeof(NSIS_VERSION)];
- sprintf(temp, dstr, NSIS_VERSION);
- table->lang_strings->set(sn, temp);
- continue;
- }
- else if (i == NLF_FONT)
- {
- char *font = *build_font ? build_font : table->nlf.m_szFont;
- if (font)
- table->lang_strings->set(sn, font);
- else
- table->lang_strings->set(sn, dstr);
- continue;
- }
- else if (i == NLF_FONTSIZE)
- {
- WORD font_size = *build_font ? (WORD) build_font_size : (WORD) table->nlf.m_iFontSize;
- if (font_size)
- {
- char temp[64];
- sprintf(temp, "%d", font_size);
- table->lang_strings->set(sn, temp);
- }
- else
- table->lang_strings->set(sn, dstr);
- continue;
- }
- table->lang_strings->set(sn, dstr);
- }
- }
- }
- }
-}
-
-char SkipComments(FILE *f) {
- int c;
- while ((c = fgetc(f))) {
- while (c == '\n' || c == '\r') {
- c = fgetc(f); // Skip empty lines
- }
- if (c == '#' || c == ';') {
- while ((c = fgetc(f))) {
- if (c == '\n') break;
- }
- }
- else break;
- }
- return (char) c;
-}
-
-// NSIS Language File parser
-LanguageTable * CEXEBuild::LoadLangFile(char *filename) {
- FILE *f = FOPEN(filename, "r");
- if (!f) {
- ERROR_MSG("Error: Can't open language file - \"%s\"!\n",filename);
- return 0;
- }
-
- // Check header
- char buf[NSIS_MAX_STRLEN];
- buf[0] = SkipComments(f);
- fgets(buf+1, NSIS_MAX_STRLEN, f);
-
- if (strncmp(buf, "NLF v", 5)) {
- ERROR_MSG("Error: Invalid language file.\n");
- return 0;
- }
- int nlf_version = atoi(buf+5);
- if (nlf_version != NLF_VERSION) {
- if (nlf_version != 2 && nlf_version != 3 && nlf_version != 4 && nlf_version != 5) {
- ERROR_MSG("Error: Language file version doesn't match NSIS version.\n");
- return 0;
- }
- }
-
- // Get language ID
- buf[0] = SkipComments(f);
- fgets(buf+1, NSIS_MAX_STRLEN, f);
- LANGID lang_id = atoi(buf);
-
- // Get appropriate table
- LanguageTable *table = GetLangTable(lang_id);
- if (!table)
- return 0;
-
- NLF *nlf = &table->nlf;
-
- if (nlf->m_bLoaded) {
- ERROR_MSG("Error: can't load same language file twice.\n");
- return 0;
- }
-
- // Generate language name
- char *p, *p2, t = 0;
-
- p = strrchr(filename, '.');
- if (p) {
- t = *p;
- *p = 0;
- }
- p2 = strrchr(filename, '\\');
- if (p2) {
- p2++;
- nlf->m_szName = (char*)malloc(strlen(p2)+1);
- strcpy(nlf->m_szName, p2);
- }
- else {
- nlf->m_szName = (char*)malloc(strlen(filename)+1);
- strcpy(nlf->m_szName, filename);
- }
- if (p) *p = t;
-
- if (nlf_version != NLF_VERSION) {
- warning_fl("%s language file version doesn't match. Using default English texts for missing strings.", nlf->m_szName);
- }
-
- // set ^Language
- nlf->m_szStrings[NLF_LANGUAGE] = strdup(nlf->m_szName);
-
- int temp;
-
- // Get font
- buf[0] = SkipComments(f);
- fgets(buf+1, NSIS_MAX_STRLEN, f);
- if (!nlf->m_szFont) {
- temp=strlen(buf);
- while (buf[temp-1] == '\n' || buf[temp-1] == '\r') {
- buf[temp-1] = 0;
- temp--;
- }
- if (buf[0] != '-' || buf[1] != 0) {
- nlf->m_szFont = (char*)malloc(strlen(buf)+1);
- strcpy(nlf->m_szFont, buf);
- }
- }
-
- buf[0] = SkipComments(f);
- fgets(buf+1, NSIS_MAX_STRLEN, f);
- if (!nlf->m_iFontSize) {
- if (buf[0] != '-' || buf[1] != 0) {
- nlf->m_iFontSize = atoi(buf);
- }
- }
-
- // Get code page
- nlf->m_uCodePage = CP_ACP;
- buf[0] = SkipComments(f);
- fgets(buf+1, NSIS_MAX_STRLEN, f);
- if (buf[0] != '-' || buf[1] != 0) {
- nlf->m_uCodePage = atoi(buf);
- if (!IsValidCodePage(nlf->m_uCodePage))
- nlf->m_uCodePage = CP_ACP;
- }
-
- // Get RTL setting
- nlf->m_szStrings[NLF_RTL] = (char *)malloc(2);
- nlf->m_bRTL = false;
- buf[0] = SkipComments(f);
- fgets(buf+1, NSIS_MAX_STRLEN, f);
- if (buf[0] == 'R' && buf[1] == 'T' && buf[2] == 'L' && (!buf[3] || buf[3] == '\r' || buf[3] == '\n')) {
- nlf->m_bRTL = true;
- strcpy(nlf->m_szStrings[NLF_RTL], "1");
- }
- else {
- strcpy(nlf->m_szStrings[NLF_RTL], "0");
- }
-
- // Read strings
- for (int i = 0; i < NLF_STRINGS_NO_SPECIAL; i++) {
-
- // skip virtual strings
- if (!NLFStrings[i].szDefault)
- continue;
-
- // Fill in for missing strings
- // 0 will mean default will be used from NLFStrings
- switch (i) {
- case NLF_BTN_LICENSE_AGREE:
- case NLF_BTN_LICENSE_DISAGREE:
- if (nlf_version >= 3) break;
- case NLF_LOG_INSTALL_PROCESS:
- case NLF_BYTE:
- case NLF_KILO:
- case NLF_MEGA:
- case NLF_GIGA:
- case NLF_REGISTERING:
- case NLF_UNREGISTERING:
- if (nlf_version >= 4) break;
- case NLF_FILE_ERROR_NOIGNORE:
- if (nlf_version >= 5) break;
- case NLF_USUBCAPTION_OPTIONS:
- case NLF_USUBCAPTION_DIR:
- case NLF_CLICK_NEXT:
- case NLF_CLICK_INSTALL:
- case NLF_CLICK_UNINSTALL:
- case NLF_LICENSE_TEXT:
- case NLF_LICENSE_TEXT_FSCB:
- case NLF_LICENSE_TEXT_FSRB:
- case NLF_ULICENSE_TEXT:
- case NLF_ULICENSE_TEXT_FSCB:
- case NLF_ULICENSE_TEXT_FSRB:
- case NLF_COMP_TEXT:
- case NLF_UCOMP_TEXT:
- case NLF_UCOMP_SUBTEXT1:
- case NLF_UCOMP_SUBTEXT1_NO_INST_TYPES:
- case NLF_UCOMP_SUBTEXT2:
- case NLF_DIR_TEXT:
- case NLF_DIR_BROWSETEXT:
- case NLF_UDIR_TEXT:
- case NLF_UDIR_SUBTEXT:
- case NLF_UDIR_BROWSETEXT:
- case NLF_UNINST_TEXT:
- if (nlf_version >= 6) break;
- nlf->m_szStrings[i] = 0;
- continue;
- }
-
- buf[0] = SkipComments(f);
-
- fgets(buf+1, NSIS_MAX_STRLEN, f);
- if (strlen(buf) == NSIS_MAX_STRLEN-1) {
- ERROR_MSG("Error: String too long (string #%d - \"%s\")", i, NLFStrings[i].szLangStringName);
- return 0;
- }
- temp=strlen(buf);
-
- while (buf[temp-1] == '\n' || buf[temp-1] == '\r') {
- buf[--temp] = 0;
- }
-
- char *in = buf;
-
- // trim quotes
- if (buf[0] == '"' && buf[temp-1] == '"') {
- in++;
- buf[--temp] = 0;
- }
-
- nlf->m_szStrings[i] = (char*)malloc(temp+1);
- char *out;
- for (out = nlf->m_szStrings[i]; *in; in++, out++) {
- if (*in == '\\') {
- in++;
- switch (*in) {
- case 'n':
- *out = '\n';
- break;
- case 'r':
- *out = '\r';
- break;
- case 't':
- *out = '\t';
- break;
- default:
- *out++ = '\\';
- *out = *in;
- }
- }
- else *out = *in;
- }
- *out = 0;
- }
- fclose(f);
-
- nlf->m_bLoaded = true;
-
- return table;
-}
-
-void CEXEBuild::DeleteLangTable(LanguageTable *table) {
- if (table->nlf.m_szName)
- free(table->nlf.m_szName);
- if (table->nlf.m_szFont)
- free(table->nlf.m_szFont);
- delete table->lang_strings;
- for (int i = 0; i < NLF_STRINGS; i++) {
- if (table->nlf.m_szStrings[i])
- free(table->nlf.m_szStrings[i]);
- }
-}
+/*
+ * lang.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "build.h"
+#include "util.h"
+#include "DialogTemplate.h"
+#include "exehead/resource.h"
+#include "version.h"
+
+using namespace std;
+
+// Default English strings. Should match NSIS_DEFAULT_LANG
+// Do not change the first string in every item, it's the LangString
+// name for usage in scripts.
+
+typedef enum {
+ NONE_STATIC = 0,
+ INSTALL_STATIC = 1,
+ UNINSTALL_STATIC = 2,
+ BOTH_STATIC = 3
+} STATICID;
+
+struct NLFString {
+ char *szLangStringName;
+ char *szDefault;
+ STATICID eStaticID;
+};
+
+NLFString NLFStrings[NLF_STRINGS] = {
+ {"^Branding", "Nullsoft Install System %s", BOTH_STATIC},
+ {"^SetupCaption", "$(^Name) Setup", INSTALL_STATIC},
+ {"^UninstallCaption", "$(^Name) Uninstall", UNINSTALL_STATIC},
+ {"^LicenseSubCaption", ": License Agreement", NONE_STATIC},
+ {"^ComponentsSubCaption", ": Installation Options", NONE_STATIC},
+ {"^DirSubCaption", ": Installation Folder", NONE_STATIC},
+ {"^InstallingSubCaption", ": Installing", NONE_STATIC},
+ {"^CompletedSubCaption", ": Completed", NONE_STATIC},
+ {"^UnComponentsSubCaption", ": Uninstallation Options", NONE_STATIC},
+ {"^UnDirSubCaption", ": Uninstallation Folder", NONE_STATIC},
+ {"^ConfirmSubCaption", ": Confirmation", NONE_STATIC},
+ {"^UninstallingSubCaption", ": Uninstalling", NONE_STATIC},
+ {"^UnCompletedSubCaption", ": Completed", NONE_STATIC},
+ {"^BackBtn", "< &Back", NONE_STATIC},
+ {"^NextBtn", "&Next >", NONE_STATIC},
+ {"^AgreeBtn", "I &Agree", NONE_STATIC},
+ {"^AcceptBtn", "I &accept the terms in the License Agreement", NONE_STATIC},
+ {"^DontAcceptBtn", "I &do not accept the terms in the License Agreement", NONE_STATIC},
+ {"^InstallBtn", "&Install", NONE_STATIC},
+ {"^UninstallBtn", "&Uninstall", NONE_STATIC},
+ {"^CancelBtn", "Cancel", NONE_STATIC},
+ {"^CloseBtn", "&Close", NONE_STATIC},
+ {"^BrowseBtn", "B&rowse...", NONE_STATIC},
+ {"^ShowDetailsBtn", "Show &details", NONE_STATIC},
+ {"^ClickNext", "Click Next to continue.", NONE_STATIC},
+ {"^ClickInstall", "Click Install to start the installation.", NONE_STATIC},
+ {"^ClickUninstall", "Click Uninstall to start the uninstallation.", NONE_STATIC},
+ {"^Name", "Name", BOTH_STATIC},
+ {"^NameDA", 0, NONE_STATIC}, // virtual
+ {"^Completed", "Completed", NONE_STATIC},
+ {"^LicenseText", "Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click I Agree.", NONE_STATIC},
+ {"^LicenseTextCB", "Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK", NONE_STATIC},
+ {"^LicenseTextRB", "Please review the license agreement before installing $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK", NONE_STATIC},
+ {"^UnLicenseText", "Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click I Agree.", NONE_STATIC},
+ {"^UnLicenseTextCB", "Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, click the check box below. $_CLICK", NONE_STATIC},
+ {"^UnLicenseTextRB", "Please review the license agreement before uninstalling $(^NameDA). If you accept all terms of the agreement, select the first option below. $_CLICK", NONE_STATIC},
+ {"^LicenseData", 0, NONE_STATIC}, // virtual - not processed
+ {"^Custom", "Custom", NONE_STATIC},
+ {"^ComponentsText", "Check the components you want to install and uncheck the components you don't want to install. $_CLICK", NONE_STATIC},
+ {"^ComponentsSubText1", "Select the type of install:", NONE_STATIC},
+ {"^ComponentsSubText2_NoInstTypes", "Select components to install:", NONE_STATIC},
+ {"^ComponentsSubText2", "Or, select the optional components you wish to install:", NONE_STATIC},
+ {"^UnComponentsText", "Check the components you want to uninstall and uncheck the components you don't want to uninstall. $_CLICK", NONE_STATIC},
+ {"^UnComponentsSubText1", "Select the type of uninstall:", NONE_STATIC},
+ {"^UnComponentsSubText2_NoInstTypes", "Select components to uninstall:", NONE_STATIC},
+ {"^UnComponentsSubText2", "Or, select the optional components you wish to uninstall:", NONE_STATIC},
+ {"^DirText", "Setup will install $(^NameDA) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK", NONE_STATIC},
+ {"^DirSubText", "Destination Folder", NONE_STATIC},
+ {"^DirBrowseText", "Select the folder to install $(^NameDA) in:", NONE_STATIC},
+ {"^UnDirText", "Setup will uninstall $(^NameDA) from the following folder. To uninstall from a different folder, click Browse and select another folder. $_CLICK", NONE_STATIC},
+ {"^UnDirSubText", "", NONE_STATIC},
+ {"^UnDirBrowseText", "Select the folder to uninstall $(^NameDA) from:", NONE_STATIC},
+ {"^SpaceAvailable", "Space available: ", BOTH_STATIC},
+ {"^SpaceRequired", "Space required: ", BOTH_STATIC},
+ {"^UninstallingText", "This wizard will uninstall $(^NameDA) from your computer. $_CLICK", NONE_STATIC},
+ {"^UninstallingSubText", "Uninstalling from:", NONE_STATIC},
+ {"^FileError", "Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Abort to stop the installation,\r\nRetry to try again, or\r\nIgnore to skip this file.", NONE_STATIC},
+ {"^FileError_NoIgnore", "Error opening file for writing: \r\n\r\n$0\r\n\r\nClick Retry to try again, or\r\nCancel to stop the installation.", NONE_STATIC},
+ {"^CantWrite", "Can't write: ", BOTH_STATIC},
+ {"^CopyFailed", "Copy failed", BOTH_STATIC},
+ {"^CopyTo", "Copy to ", BOTH_STATIC},
+ {"^Registering", "Registering: ", NONE_STATIC},
+ {"^Unregistering", "Unregistering: ", NONE_STATIC},
+ {"^SymbolNotFound", "Could not find symbol: ", BOTH_STATIC},
+ {"^CouldNotLoad", "Could not load: ", BOTH_STATIC},
+ {"^CreateFolder", "Create folder: ", BOTH_STATIC},
+ {"^CreateShortcut", "Create shortcut: ", BOTH_STATIC},
+ {"^CreatedUninstaller", "Created uninstaller: ", BOTH_STATIC},
+ {"^Delete", "Delete file: ", BOTH_STATIC},
+ {"^DeleteOnReboot", "Delete on reboot: ", BOTH_STATIC},
+ {"^ErrorCreatingShortcut", "Error creating shortcut: ", BOTH_STATIC},
+ {"^ErrorCreating", "Error creating: ", BOTH_STATIC},
+ {"^ErrorDecompressing", "Error decompressing data! Corrupted installer?", BOTH_STATIC},
+ {"^ErrorRegistering", "Error registering DLL", BOTH_STATIC},
+ {"^ExecShell", "ExecShell: ", BOTH_STATIC},
+ {"^Exec", "Execute: ", BOTH_STATIC},
+ {"^Extract", "Extract: ", BOTH_STATIC},
+ {"^ErrorWriting", "Extract: error writing to file ", BOTH_STATIC},
+ {"^InvalidOpcode", "Installer corrupted: invalid opcode", BOTH_STATIC},
+ {"^NoOLE", "No OLE for: ", BOTH_STATIC},
+ {"^OutputFolder", "Output folder: ", BOTH_STATIC},
+ {"^RemoveFolder", "Remove folder: ", BOTH_STATIC},
+ {"^RenameOnReboot", "Rename on reboot: ", BOTH_STATIC},
+ {"^Rename", "Rename: ", BOTH_STATIC},
+ {"^Skipped", "Skipped: ", BOTH_STATIC},
+ {"^CopyDetails", "Copy Details To Clipboard", BOTH_STATIC},
+ {"^LogInstall", "Log install process", BOTH_STATIC},
+ {"^Byte", "B", BOTH_STATIC},
+ {"^Kilo", "K", BOTH_STATIC},
+ {"^Mega", "M", BOTH_STATIC},
+ {"^Giga", "G", BOTH_STATIC},
+ {"^Font", "MS Shell Dlg", NONE_STATIC},
+ {"^FontSize", "8", NONE_STATIC},
+ {"^RTL", "0", NONE_STATIC},
+ {"^Language", "English", NONE_STATIC}
+};
+
+// ==============
+// LangStringList
+// ==============
+
+LangStringList::LangStringList() {
+ count = 0;
+}
+
+int LangStringList::add(const char *name, int *sn/*=0*/)
+{
+ int pos = SortedStringListND<struct langstring>::add(name);
+ if (pos == -1) return -1;
+
+ ((struct langstring*)gr.get())[pos].sn = count;
+ if (sn) *sn = count;
+ count++;
+ ((struct langstring*)gr.get())[pos].index = -1;
+ ((struct langstring*)gr.get())[pos].uindex = -1;
+ ((struct langstring*)gr.get())[pos].process = 1;
+
+ return pos;
+}
+
+int LangStringList::get(char *name, int *sn/*=0*/, int *index/*=0*/, int *uindex/*=0*/, int *process/*=0*/)
+{
+ if (index) *index = -1;
+ if (uindex) *uindex = -1;
+ if (sn) *sn = -1;
+ int v=find(name);
+ if (v==-1) return -1;
+ if (index) *index = ((struct langstring*)gr.get())[v].index;
+ if (uindex) *uindex = ((struct langstring*)gr.get())[v].uindex;
+ if (sn) *sn = ((struct langstring*)gr.get())[v].sn;
+ if (process) *process = ((struct langstring*)gr.get())[v].process;
+ return v;
+}
+
+void LangStringList::set(int pos, int index/*=-1*/, int uindex/*=-1*/, int process/*=-1*/)
+{
+ if ((unsigned int)pos > (gr.getlen() / sizeof(struct langstring)))
+ return;
+
+ struct langstring *data=(struct langstring *)gr.get();
+
+ if (index >= 0)
+ data[pos].index = index;
+ if (uindex >= 0)
+ data[pos].uindex = uindex;
+ if (process >= 0)
+ data[pos].process = process;
+}
+
+void LangStringList::set(char *name, int index, int uindex/*=-1*/, int process/*=-1*/)
+{
+ set(get(name), index, uindex, process);
+}
+
+const char* LangStringList::pos2name(int pos)
+{
+ struct langstring *data=(struct langstring *)gr.get();
+
+ if ((unsigned int)pos > (gr.getlen() / sizeof(struct langstring)))
+ return 0;
+
+ return ((const char*)strings.get() + data[pos].name);
+}
+
+const char* LangStringList::offset2name(int name)
+{
+ if ((unsigned int)name > (unsigned int)strings.getlen())
+ return 0;
+
+ return (const char*)strings.get() + name;
+}
+
+int LangStringList::getnum()
+{
+ return gr.getlen() / sizeof(struct langstring);
+}
+
+int LangStringList::compare_index(const void *item1, const void *item2)
+{
+ struct langstring *ls1 = (struct langstring *)item1;
+ struct langstring *ls2 = (struct langstring *)item2;
+
+ return ls1->index - ls2->index;
+}
+
+langstring* LangStringList::sort_index(int *num)
+{
+ if (!num) return 0;
+ sortbuf.resize(0);
+ sortbuf.add(gr.get(), gr.getlen());
+ *num = sortbuf.getlen() / sizeof(struct langstring);
+ qsort(sortbuf.get(), *num, sizeof(struct langstring), compare_index);
+ return (struct langstring*) sortbuf.get();
+}
+
+int LangStringList::compare_uindex(const void *item1, const void *item2)
+{
+ struct langstring *ls1 = (struct langstring *)item1;
+ struct langstring *ls2 = (struct langstring *)item2;
+
+ return ls1->uindex - ls2->uindex;
+}
+
+langstring* LangStringList::sort_uindex(int *num)
+{
+ if (!num) return 0;
+ sortbuf.resize(0);
+ sortbuf.add(gr.get(), gr.getlen());
+ *num = sortbuf.getlen() / sizeof(struct langstring);
+ qsort(sortbuf.get(), *num, sizeof(struct langstring), compare_uindex);
+ return (struct langstring*) sortbuf.get();
+}
+
+// ============
+// StringsArray
+// ============
+
+StringsArray::StringsArray()
+{
+ offsets.set_zeroing(1);
+
+ strings.add("", sizeof(""));
+}
+
+void StringsArray::resize(int num)
+{
+ offsets.resize(num * sizeof(int));
+}
+
+int StringsArray::set(int idx, char *str)
+{
+ if (idx < 0)
+ return 0;
+
+ if (idx >= (int)(offsets.getlen() / sizeof(int)))
+ resize(idx+1);
+
+ int old = ((int*)offsets.get())[idx];
+
+ ((int*)offsets.get())[idx] = strings.add(str, strlen(str) + 1);
+
+ return old;
+}
+
+const char* StringsArray::get(int idx)
+{
+ if ((unsigned int)idx >= (offsets.getlen() / sizeof(int)))
+ return 0;
+
+ return (const char *)strings.get() + ((int*)offsets.get())[idx];
+}
+
+// =========
+// CEXEBuild
+// =========
+
+void CEXEBuild::InitLangTables() {
+ keep_ref = false;
+
+ for (int i = 0; i < NLF_STRINGS; i++) {
+ NLFRefs[i].iRef = 0;
+ NLFRefs[i].iUnRef = 0;
+
+#ifdef NSIS_CONFIG_LOG
+ if (i == NLF_NAME) {
+ NLFRefs[i].iRef++;
+ NLFRefs[i].iUnRef++;
+ }
+#endif
+
+ if (NLFStrings[i].eStaticID & INSTALL_STATIC) {
+ set_uninstall_mode(0);
+ DefineLangString(NLFStrings[i].szLangStringName);
+ }
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (NLFStrings[i].eStaticID & UNINSTALL_STATIC) {
+ set_uninstall_mode(1);
+ DefineLangString(NLFStrings[i].szLangStringName);
+ }
+#endif
+ }
+
+ set_uninstall_mode(0);
+
+ keep_ref = true;
+}
+
+LanguageTable* CEXEBuild::GetLangTable(LANGID &lang, bool create/*=true*/) {
+ int nlt = lang_tables.getlen() / sizeof(LanguageTable);
+ LanguageTable *nla = (LanguageTable*)lang_tables.get();
+
+ lang = lang ? lang : last_used_lang;
+ LanguageTable *table = NULL;
+
+ for (int i = 0; i < nlt; i++) {
+ if (lang == nla[i].lang_id) {
+ table = &nla[i];
+ break;
+ }
+ }
+ if (!table && create) {
+ LanguageTable newtable;
+
+ newtable.lang_id = lang;
+ newtable.dlg_offset = 0;
+ memset(&newtable.nlf, 0, sizeof(NLF));
+
+ newtable.lang_strings = new StringsArray;
+
+ lang_tables.add(&newtable, sizeof(LanguageTable));
+ table = (LanguageTable*)lang_tables.get() + nlt;
+ }
+
+ if (table) // update last used language if a table was loaded
+ last_used_lang = lang;
+
+ return table;
+}
+
+char *CEXEBuild::GetLangNameAndCP(LANGID lang, unsigned int *codepage/*=NULL*/) {
+ LanguageTable *table = GetLangTable(lang, false);
+
+ if (table && table->nlf.m_bLoaded) {
+ if (codepage)
+ *codepage = table->nlf.m_uCodePage;
+
+ return table->nlf.m_szName;
+ }
+ else {
+ if (codepage)
+ *codepage = 1252; // English US
+
+ if (lang == 1033)
+ return "English";
+ else
+ return "???";
+ }
+}
+
+int CEXEBuild::DefineLangString(char *name, int process/*=-1*/) {
+ int index, uindex, pos, ret, sn;
+ pos = build_langstrings.get(name, &sn, &index, &uindex);
+ if (pos < 0) {
+ pos = build_langstrings.add(name);
+ }
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!uninstall_mode) {
+#endif
+ if (index < 0) {
+ index = build_langstring_num++;
+ }
+ ret = -index - 1;
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ }
+ else {
+ if (uindex < 0) {
+ uindex = ubuild_langstring_num++;
+ }
+ ret = -uindex - 1;
+ }
+#endif
+
+ build_langstrings.set(pos, index, uindex, process);
+
+ // set reference count for NLF strings
+ if (keep_ref && name[0] == '^') {
+ for (int i = 0; i < NLF_STRINGS; i++) {
+ if (!strcmp(name, NLFStrings[i].szLangStringName)) {
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (uninstall_mode)
+ NLFRefs[i].iUnRef++;
+ else
+#endif
+ NLFRefs[i].iRef++;
+
+ break;
+ }
+ }
+ }
+
+ return ret;
+}
+
+int CEXEBuild::DefineInnerLangString(int id, int process/*=-1*/) {
+ bool old_keep_ref = keep_ref;
+
+ // set reference count for NLF strings
+ if (keep_ref) {
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (uninstall_mode)
+ NLFRefs[id].iUnRef++;
+ else
+#endif
+ NLFRefs[id].iRef++;
+
+ keep_ref = false;
+ }
+
+ int ret = DefineLangString(NLFStrings[id].szLangStringName, process);
+
+ keep_ref = old_keep_ref;
+
+ return ret;
+}
+
+int CEXEBuild::SetLangString(char *name, LANGID lang, char *string) {
+ if (!string || !name) return PS_ERROR;
+
+ LanguageTable *table = GetLangTable(lang);
+ if (!table) return PS_ERROR;
+
+ int sn;
+
+ int pos = build_langstrings.get(name, &sn);
+ if (pos < 0)
+ pos = build_langstrings.add(name, &sn);
+
+ if (table->lang_strings->set(sn, string))
+ return PS_WARNING;
+
+ return PS_OK;
+}
+
+int CEXEBuild::SetInnerString(int id, char *string) {
+ if ((unsigned int)id >= NLF_STRINGS || !string) return PS_ERROR;
+
+ int ret = PS_OK;
+
+ const char *ps = UserInnerStrings.get(id);
+ if (ps && *ps)
+ ret = PS_WARNING;
+
+ UserInnerStrings.set(id, string);
+
+ return ret;
+}
+
+int CEXEBuild::GenerateLangTable(LanguageTable *lt, int num_lang_tables) {
+ // Add all installer language strings
+ int i, j, l, tabsset;
+ struct langstring* lang_strings = NULL;
+ TinyGrowBuf *string_ptrs = new TinyGrowBuf[num_lang_tables];
+
+ tabsset = 1;
+ while (tabsset)
+ {
+ tabsset = 0;
+ for (i = num_lang_tables; i--; )
+ {
+ // Fill in default values for all used language strings that we can
+ FillLanguageTable(&lt[i]);
+ // Make sure the string lists are large enough
+ string_ptrs[i].set_zeroing(1);
+ if (!uninstall_mode)
+ string_ptrs[i].resize(build_langstring_num * sizeof(int));
+ else
+ string_ptrs[i].resize(ubuild_langstring_num * sizeof(int));
+ }
+
+ // For all current language strings
+ if (!uninstall_mode)
+ lang_strings = build_langstrings.sort_index(&l);
+ else
+ lang_strings = build_langstrings.sort_uindex(&l);
+
+ for (j = 0; j < l; j++)
+ {
+ int lang_string_index;
+
+ if (!uninstall_mode)
+ lang_string_index = lang_strings[j].index;
+ else
+ lang_string_index = lang_strings[j].uindex;
+
+ // Is this language string used (in the installer)?
+ if (lang_string_index >= 0)
+ {
+ // For each language
+ for (i = num_lang_tables; i--; )
+ {
+ // Get the current string pointer
+ int *ptr = (int *)string_ptrs[i].get() + lang_string_index;
+ // Not already set?
+ if (!*ptr)
+ {
+ // Get the language string and its name
+ const char *str = lt[i].lang_strings->get(lang_strings[j].sn);
+ const char *lsn = build_langstrings.offset2name(lang_strings[j].name);
+ if (!str || !*str)
+ {
+ // No string is defined; give a warning (for user strings only)
+ if (lsn[0] != '^')
+ {
+ if (lt[i].nlf.m_bLoaded)
+ warning("LangString \"%s\" is not set in language table of language %s", lsn, lt[i].nlf.m_szName);
+ else
+ warning("LangString \"%s\" is not set in language table of language %d", lsn, lt[i].lang_id);
+ }
+ }
+ else
+ {
+ // Add the language string to the string data block
+ char fn[1024];
+ sprintf(fn, "LangString %s", lsn);
+ curfilename = fn;
+ linecnt = lt[i].lang_id;
+ *ptr = add_string(str, lang_strings[j].process, (WORD) lt[i].nlf.m_uCodePage);
+ curfilename = 0;
+ // Indicate that we should check again for any newly referenced language strings
+ tabsset++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Optimize langstrings and check for recursion
+ for (i = num_lang_tables; i--; )
+ {
+ TinyGrowBuf rec;
+ int *lst = (int *)string_ptrs[i].get();
+
+ int langstring_num;
+
+ if (!uninstall_mode)
+ langstring_num = build_langstring_num;
+ else
+ langstring_num = ubuild_langstring_num;
+
+ for (j = 0; j < langstring_num; j++)
+ {
+ // Does this string reference another language string directly?
+ while (lst[j] < 0)
+ {
+ // Search through list of language string references
+ for (l = 0; (unsigned int)l < rec.getlen() / sizeof(int); l++)
+ {
+ if (((int*)rec.get())[l] == lst[j])
+ {
+ // We have the index of a recursive language string; now find the name
+ const char *name = "(unnamed)";
+ for (l = 0; l < langstring_num; l++)
+ {
+ int index;
+
+ if (!uninstall_mode)
+ index = lang_strings[l].index;
+ else
+ index = lang_strings[l].uindex;
+
+ if (lang_strings[l].index == j)
+ {
+ name = build_langstrings.offset2name(lang_strings[l].name);
+ }
+ }
+ ERROR_MSG("Error: LangString %s is recursive!\n", name);
+ delete [] string_ptrs;
+ return PS_ERROR;
+ }
+ }
+ // Add this reference to the list
+ rec.add(&lst[j], sizeof(int));
+ // and dereference it
+ lst[j] = lst[-lst[j] - 1];
+ }
+ rec.resize(0);
+ }
+ }
+
+ // Add language tables into their datablock
+ for (i = num_lang_tables; i--; )
+ {
+ cur_langtables->add(&lt[i].lang_id, sizeof(LANGID));
+ cur_langtables->add(&lt[i].dlg_offset, sizeof(int));
+ int rtl = lt[i].nlf.m_bRTL ? 1 : 0;
+ cur_langtables->add(&rtl, sizeof(int));
+ cur_langtables->add(string_ptrs[i].get(), string_ptrs[i].getlen());
+ string_ptrs[i].resize(0);
+ }
+
+ cur_header->blocks[NB_LANGTABLES].num = num_lang_tables;
+ cur_header->langtable_size = cur_langtables->getlen() / num_lang_tables;
+
+ delete [] string_ptrs;
+
+ return PS_OK;
+}
+
+int CEXEBuild::GenerateLangTables() {
+ int i;
+ LanguageTable *lt = (LanguageTable*)lang_tables.get();
+
+ SCRIPT_MSG("Generating language tables... ");
+
+ if (
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ ubuild_langstring_num > MAX_CODED ||
+#endif
+ build_langstring_num > MAX_CODED
+ )
+ {
+ ERROR_MSG("\nError: too many LangStrings. Maximum allowed is %u.\n", MAX_CODED);
+ return PS_ERROR;
+ }
+
+ // If we have no tables (user didn't set any string and didn't load any NLF) create the default one
+ if (!lang_tables.getlen()) {
+ LANGID lang = NSIS_DEFAULT_LANG;
+ LanguageTable *table = GetLangTable(lang);
+ if (!table) return PS_ERROR;
+
+ lt = (LanguageTable*)lang_tables.get();
+ }
+
+ // Apply default font
+ if (*build_font)
+ {
+ try {
+ init_res_editor();
+
+#define ADD_FONT(id) { \
+ BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG); \
+ if (dlg) { \
+ CDialogTemplate td(dlg); \
+ res_editor->FreeResource(dlg); \
+ td.SetFont(build_font, (WORD) build_font_size); \
+ DWORD dwSize; \
+ dlg = td.Save(dwSize); \
+ res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG, dlg, dwSize); \
+ delete [] dlg; \
+ } \
+ }
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ ADD_FONT(IDD_LICENSE);
+ ADD_FONT(IDD_LICENSE_FSRB);
+ ADD_FONT(IDD_LICENSE_FSCB);
+#endif
+ ADD_FONT(IDD_DIR);
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ ADD_FONT(IDD_SELCOM);
+#endif
+ ADD_FONT(IDD_INST);
+ ADD_FONT(IDD_INSTFILES);
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ ADD_FONT(IDD_UNINST);
+#endif
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ ADD_FONT(IDD_VERIFY);
+#endif
+#undef ADD_FONT
+ }
+ catch (exception& err) {
+ ERROR_MSG("\nError while applying font: %s\n", err.what());
+ return PS_ERROR;
+ }
+ }
+
+ // Fill tables with defaults (if needed) and with instruction strings
+ // Create language specific resources (currently only dialogs with different fonts)
+ int num_lang_tables = lang_tables.getlen() / sizeof(LanguageTable);
+ // if there is one string table then there is no need for two sets of dialogs
+ int cur_offset = num_lang_tables == 1 ? 0 : 100;
+ for (i = 0; i < num_lang_tables; i++)
+ {
+ if ((lt[i].nlf.m_szFont && !*build_font) || lt[i].nlf.m_bRTL)
+ {
+ lt[i].dlg_offset = cur_offset;
+
+ char *font = lt[i].nlf.m_szFont;
+ if (*build_font) font = 0;
+
+ try {
+ init_res_editor();
+
+#define ADD_FONT(id) { \
+ BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG); \
+ if (dlg) { \
+ CDialogTemplate td(dlg,lt[i].nlf.m_uCodePage); \
+ res_editor->FreeResource(dlg); \
+ if (font) td.SetFont(font, (WORD) lt[i].nlf.m_iFontSize); \
+ if (lt[i].nlf.m_bRTL) { \
+ td.ConvertToRTL(); \
+ DialogItemTemplate* dir = td.GetItem(IDC_DIR); \
+ if (id == IDD_DIR && dir) { \
+ if ((dir->dwStyle & ES_CENTER) == 0) dir->dwStyle ^= ES_RIGHT; \
+ dir->dwExtStyle &= ~(WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR); \
+ } \
+ } \
+ DWORD dwSize; \
+ dlg = td.Save(dwSize); \
+ res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(id+cur_offset), NSIS_DEFAULT_LANG, dlg, dwSize); \
+ delete [] dlg; \
+ } \
+ }
+
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ ADD_FONT(IDD_LICENSE);
+ ADD_FONT(IDD_LICENSE_FSRB);
+ ADD_FONT(IDD_LICENSE_FSCB);
+#endif
+ ADD_FONT(IDD_DIR);
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ ADD_FONT(IDD_SELCOM);
+#endif
+ ADD_FONT(IDD_INST);
+ ADD_FONT(IDD_INSTFILES);
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ ADD_FONT(IDD_UNINST);
+#endif
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+ ADD_FONT(IDD_VERIFY);
+#endif
+#undef ADD_FONT
+ }
+ catch (exception& err) {
+ ERROR_MSG("\nError while applying NLF font/RTL: %s\n", err.what());
+ return PS_ERROR;
+ }
+
+ cur_offset += 100;
+ }
+ }
+
+ int orig_uninstall_mode = uninstall_mode;
+
+ set_uninstall_mode(0);
+ if (GenerateLangTable(lt, num_lang_tables) != PS_OK)
+ return PS_ERROR;
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ set_uninstall_mode(1);
+ if (GenerateLangTable(lt, num_lang_tables) != PS_OK)
+ return PS_ERROR;
+#endif
+
+ set_uninstall_mode(orig_uninstall_mode);
+
+ SCRIPT_MSG("Done!\n");
+
+ return PS_OK;
+}
+
+void CEXEBuild::FillLanguageTable(LanguageTable *table) {
+ for (int i = 0; i < NLF_STRINGS; i++) {
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!NLFRefs[i].iUnRef && !NLFRefs[i].iRef)
+ continue;
+#else
+ if (!NLFRefs[i].iRef)
+ continue;
+#endif
+
+ else if (i == NLF_SPACE_REQ || i == NLF_SPACE_AVAIL)
+ {
+ if (no_space_texts)
+ {
+ continue;
+ }
+ }
+
+ int sn, index;
+ int pos = build_langstrings.get(NLFStrings[i].szLangStringName, &sn, &index);
+ if (pos >= 0) {
+ const char *str = table->lang_strings->get(sn);
+ if (!str || !*str) {
+ const char *us = UserInnerStrings.get(i);
+ if (i == NLF_NAME_DA && (!us || !*us))
+ {
+ // if the user didn't set NLF_NAME_DA we set it to $(^Name)
+ table->lang_strings->set(sn, "$(^Name)");
+ }
+ if (us && *us) {
+ table->lang_strings->set(sn, (char *) us);
+ }
+ else {
+ char *dstr = table->nlf.m_szStrings[i] ? table->nlf.m_szStrings[i] : NLFStrings[i].szDefault;
+ if (!dstr)
+ continue;
+ if (i == NLF_BRANDING) {
+ char temp[NSIS_MAX_STRLEN + sizeof(NSIS_VERSION)];
+ sprintf(temp, dstr, NSIS_VERSION);
+ table->lang_strings->set(sn, temp);
+ continue;
+ }
+ else if (i == NLF_FONT)
+ {
+ char *font = *build_font ? build_font : table->nlf.m_szFont;
+ if (font)
+ table->lang_strings->set(sn, font);
+ else
+ table->lang_strings->set(sn, dstr);
+ continue;
+ }
+ else if (i == NLF_FONTSIZE)
+ {
+ WORD font_size = *build_font ? (WORD) build_font_size : (WORD) table->nlf.m_iFontSize;
+ if (font_size)
+ {
+ char temp[64];
+ sprintf(temp, "%d", font_size);
+ table->lang_strings->set(sn, temp);
+ }
+ else
+ table->lang_strings->set(sn, dstr);
+ continue;
+ }
+ table->lang_strings->set(sn, dstr);
+ }
+ }
+ }
+ }
+}
+
+char SkipComments(FILE *f) {
+ int c;
+ while ((c = fgetc(f))) {
+ while (c == '\n' || c == '\r') {
+ c = fgetc(f); // Skip empty lines
+ }
+ if (c == '#' || c == ';') {
+ while ((c = fgetc(f))) {
+ if (c == '\n') break;
+ }
+ }
+ else break;
+ }
+ return (char) c;
+}
+
+// NSIS Language File parser
+LanguageTable * CEXEBuild::LoadLangFile(char *filename) {
+ FILE *f = FOPEN(filename, "r");
+ if (!f) {
+ ERROR_MSG("Error: Can't open language file - \"%s\"!\n",filename);
+ return 0;
+ }
+
+ // Check header
+ char buf[NSIS_MAX_STRLEN];
+ buf[0] = SkipComments(f);
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+
+ if (strncmp(buf, "NLF v", 5)) {
+ ERROR_MSG("Error: Invalid language file.\n");
+ return 0;
+ }
+ int nlf_version = atoi(buf+5);
+ if (nlf_version != NLF_VERSION) {
+ if (nlf_version != 2 && nlf_version != 3 && nlf_version != 4 && nlf_version != 5) {
+ ERROR_MSG("Error: Language file version doesn't match NSIS version.\n");
+ return 0;
+ }
+ }
+
+ // Get language ID
+ buf[0] = SkipComments(f);
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+ LANGID lang_id = atoi(buf);
+
+ // Get appropriate table
+ LanguageTable *table = GetLangTable(lang_id);
+ if (!table)
+ return 0;
+
+ NLF *nlf = &table->nlf;
+
+ if (nlf->m_bLoaded) {
+ ERROR_MSG("Error: can't load same language file twice.\n");
+ return 0;
+ }
+
+ // Generate language name
+ char *p, *p2, t = 0;
+
+ p = strrchr(filename, '.');
+ if (p) {
+ t = *p;
+ *p = 0;
+ }
+ p2 = strrchr(filename, '\\');
+ if (p2) {
+ p2++;
+ nlf->m_szName = (char*)malloc(strlen(p2)+1);
+ strcpy(nlf->m_szName, p2);
+ }
+ else {
+ nlf->m_szName = (char*)malloc(strlen(filename)+1);
+ strcpy(nlf->m_szName, filename);
+ }
+ if (p) *p = t;
+
+ if (nlf_version != NLF_VERSION) {
+ warning_fl("%s language file version doesn't match. Using default English texts for missing strings.", nlf->m_szName);
+ }
+
+ // set ^Language
+ nlf->m_szStrings[NLF_LANGUAGE] = strdup(nlf->m_szName);
+
+ int temp;
+
+ // Get font
+ buf[0] = SkipComments(f);
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+ if (!nlf->m_szFont) {
+ temp=strlen(buf);
+ while (buf[temp-1] == '\n' || buf[temp-1] == '\r') {
+ buf[temp-1] = 0;
+ temp--;
+ }
+ if (buf[0] != '-' || buf[1] != 0) {
+ nlf->m_szFont = (char*)malloc(strlen(buf)+1);
+ strcpy(nlf->m_szFont, buf);
+ }
+ }
+
+ buf[0] = SkipComments(f);
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+ if (!nlf->m_iFontSize) {
+ if (buf[0] != '-' || buf[1] != 0) {
+ nlf->m_iFontSize = atoi(buf);
+ }
+ }
+
+ // Get code page
+ nlf->m_uCodePage = CP_ACP;
+ buf[0] = SkipComments(f);
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+ if (buf[0] != '-' || buf[1] != 0) {
+ nlf->m_uCodePage = atoi(buf);
+ if (!IsValidCodePage(nlf->m_uCodePage))
+ nlf->m_uCodePage = CP_ACP;
+ }
+
+ // Get RTL setting
+ nlf->m_szStrings[NLF_RTL] = (char *)malloc(2);
+ nlf->m_bRTL = false;
+ buf[0] = SkipComments(f);
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+ if (buf[0] == 'R' && buf[1] == 'T' && buf[2] == 'L' && (!buf[3] || buf[3] == '\r' || buf[3] == '\n')) {
+ nlf->m_bRTL = true;
+ strcpy(nlf->m_szStrings[NLF_RTL], "1");
+ }
+ else {
+ strcpy(nlf->m_szStrings[NLF_RTL], "0");
+ }
+
+ // Read strings
+ for (int i = 0; i < NLF_STRINGS_NO_SPECIAL; i++) {
+
+ // skip virtual strings
+ if (!NLFStrings[i].szDefault)
+ continue;
+
+ // Fill in for missing strings
+ // 0 will mean default will be used from NLFStrings
+ switch (i) {
+ case NLF_BTN_LICENSE_AGREE:
+ case NLF_BTN_LICENSE_DISAGREE:
+ if (nlf_version >= 3) break;
+ case NLF_LOG_INSTALL_PROCESS:
+ case NLF_BYTE:
+ case NLF_KILO:
+ case NLF_MEGA:
+ case NLF_GIGA:
+ case NLF_REGISTERING:
+ case NLF_UNREGISTERING:
+ if (nlf_version >= 4) break;
+ case NLF_FILE_ERROR_NOIGNORE:
+ if (nlf_version >= 5) break;
+ case NLF_USUBCAPTION_OPTIONS:
+ case NLF_USUBCAPTION_DIR:
+ case NLF_CLICK_NEXT:
+ case NLF_CLICK_INSTALL:
+ case NLF_CLICK_UNINSTALL:
+ case NLF_LICENSE_TEXT:
+ case NLF_LICENSE_TEXT_FSCB:
+ case NLF_LICENSE_TEXT_FSRB:
+ case NLF_ULICENSE_TEXT:
+ case NLF_ULICENSE_TEXT_FSCB:
+ case NLF_ULICENSE_TEXT_FSRB:
+ case NLF_COMP_TEXT:
+ case NLF_UCOMP_TEXT:
+ case NLF_UCOMP_SUBTEXT1:
+ case NLF_UCOMP_SUBTEXT1_NO_INST_TYPES:
+ case NLF_UCOMP_SUBTEXT2:
+ case NLF_DIR_TEXT:
+ case NLF_DIR_BROWSETEXT:
+ case NLF_UDIR_TEXT:
+ case NLF_UDIR_SUBTEXT:
+ case NLF_UDIR_BROWSETEXT:
+ case NLF_UNINST_TEXT:
+ if (nlf_version >= 6) break;
+ nlf->m_szStrings[i] = 0;
+ continue;
+ }
+
+ buf[0] = SkipComments(f);
+
+ fgets(buf+1, NSIS_MAX_STRLEN, f);
+ if (strlen(buf) == NSIS_MAX_STRLEN-1) {
+ ERROR_MSG("Error: String too long (string #%d - \"%s\")", i, NLFStrings[i].szLangStringName);
+ return 0;
+ }
+ temp=strlen(buf);
+
+ while (buf[temp-1] == '\n' || buf[temp-1] == '\r') {
+ buf[--temp] = 0;
+ }
+
+ char *in = buf;
+
+ // trim quotes
+ if (buf[0] == '"' && buf[temp-1] == '"') {
+ in++;
+ buf[--temp] = 0;
+ }
+
+ nlf->m_szStrings[i] = (char*)malloc(temp+1);
+ char *out;
+ for (out = nlf->m_szStrings[i]; *in; in++, out++) {
+ if (*in == '\\') {
+ in++;
+ switch (*in) {
+ case 'n':
+ *out = '\n';
+ break;
+ case 'r':
+ *out = '\r';
+ break;
+ case 't':
+ *out = '\t';
+ break;
+ default:
+ *out++ = '\\';
+ *out = *in;
+ }
+ }
+ else *out = *in;
+ }
+ *out = 0;
+ }
+ fclose(f);
+
+ nlf->m_bLoaded = true;
+
+ return table;
+}
+
+void CEXEBuild::DeleteLangTable(LanguageTable *table) {
+ if (table->nlf.m_szName)
+ free(table->nlf.m_szName);
+ if (table->nlf.m_szFont)
+ free(table->nlf.m_szFont);
+ delete table->lang_strings;
+ for (int i = 0; i < NLF_STRINGS; i++) {
+ if (table->nlf.m_szStrings[i])
+ free(table->nlf.m_szStrings[i]);
+ }
+}
diff --git a/Source/lang.h b/Source/lang.h
index 18dc243..6bf2a41 100755
--- a/Source/lang.h
+++ b/Source/lang.h
@@ -1,199 +1,199 @@
-/*
- * lang.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 ___NLF___H_____
-#define ___NLF___H_____
-
-#include "strlist.h"
-#include "growbuf.h"
-#include "exehead/fileform.h"
-
-struct NLFRef {
- int iRef;
- int iUnRef;
-};
-
-struct langstring {
- int name;
- int sn;
- int index;
- int uindex;
- int process;
-};
-
-class LangStringList : public SortedStringListND<struct langstring>
-{
- public:
- LangStringList();
-
- int add(const char *name, int *sn=0);
- int get(char *name, int *sn=0, int *index=0, int *uindex=0, int *process=0);
- void set(int pos, int index=-1, int uindex=-1, int process=-1);
- void set(char *name, int index, int uindex=-1, int process=-1);
- const char *pos2name(int pos);
- const char *offset2name(int name);
- int getnum();
- static int compare_index(const void *item1, const void *item2);
- langstring *sort_index(int *num);
- static int compare_uindex(const void *item1, const void *item2);
- langstring *sort_uindex(int *num);
-
- private:
- int count;
- TinyGrowBuf sortbuf;
-};
-
-class StringsArray
-{
- public:
- StringsArray();
-
- void resize(int num);
- int set(int idx, char *str);
- const char *get(int idx);
-
- private:
- TinyGrowBuf offsets;
- GrowBuf strings;
-};
-
-#define NLF_VERSION 6
-
-enum {
- NLF_BRANDING,
- NLF_CAPTION,
- NLF_UCAPTION,
- NLF_SUBCAPTION_LICENSE,
- NLF_SUBCAPTION_OPTIONS,
- NLF_SUBCAPTION_DIR,
- NLF_SUBCAPTION_INSTFILES,
- NLF_SUBCAPTION_COMPLETED,
- NLF_USUBCAPTION_OPTIONS,
- NLF_USUBCAPTION_DIR,
- NLF_USUBCAPTION_CONFIRM,
- NLF_USUBCAPTION_INSTFILES,
- NLF_USUBCAPTION_COMPLETED,
- NLF_BTN_BACK,
- NLF_BTN_NEXT,
- NLF_BTN_LICENSE,
- NLF_BTN_LICENSE_AGREE,
- NLF_BTN_LICENSE_DISAGREE,
- NLF_BTN_INSTALL,
- NLF_BTN_UNINSTALL,
- NLF_BTN_CANCEL,
- NLF_BTN_CLOSE,
- NLF_BTN_BROWSE,
- NLF_BTN_DETAILS,
- NLF_CLICK_NEXT,
- NLF_CLICK_INSTALL,
- NLF_CLICK_UNINSTALL,
- NLF_NAME,
- NLF_NAME_DA, // name with doubled ampersands - virtual
- NLF_COMPLETED,
- NLF_LICENSE_TEXT,
- NLF_LICENSE_TEXT_FSCB,
- NLF_LICENSE_TEXT_FSRB,
- NLF_ULICENSE_TEXT,
- NLF_ULICENSE_TEXT_FSCB,
- NLF_ULICENSE_TEXT_FSRB,
- NLF_LICENSE_DATA, // virtual
- NLF_COMP_CUSTOM,
- NLF_COMP_TEXT,
- NLF_COMP_SUBTEXT1,
- NLF_COMP_SUBTEXT1_NO_INST_TYPES,
- NLF_COMP_SUBTEXT2,
- NLF_UCOMP_TEXT,
- NLF_UCOMP_SUBTEXT1,
- NLF_UCOMP_SUBTEXT1_NO_INST_TYPES,
- NLF_UCOMP_SUBTEXT2,
- NLF_DIR_TEXT,
- NLF_DIR_SUBTEXT,
- NLF_DIR_BROWSETEXT,
- NLF_UDIR_TEXT,
- NLF_UDIR_SUBTEXT,
- NLF_UDIR_BROWSETEXT,
- NLF_SPACE_AVAIL,
- NLF_SPACE_REQ,
- NLF_UNINST_TEXT,
- NLF_UNINST_SUBTEXT,
- NLF_FILE_ERROR,
- NLF_FILE_ERROR_NOIGNORE,
- NLF_CANT_WRITE,
- NLF_COPY_FAILED,
- NLF_COPY_TO,
- NLF_REGISTERING,
- NLF_UNREGISTERING,
- NLF_SYMBOL_NOT_FOUND,
- NLF_COULD_NOT_LOAD,
- NLF_CREATE_DIR,
- NLF_CREATE_SHORTCUT,
- NLF_CREATED_UNINST,
- NLF_DEL_FILE,
- NLF_DEL_ON_REBOOT,
- NLF_ERR_CREATING_SHORTCUT,
- NLF_ERR_CREATING,
- NLF_ERR_DECOMPRESSING,
- NLF_ERR_REG_DLL,
- NLF_EXEC_SHELL,
- NLF_EXEC,
- NLF_EXTRACT,
- NLF_ERR_WRITING,
- NLF_INST_CORRUPTED,
- NLF_NO_OLE,
- NLF_OUTPUT_DIR,
- NLF_REMOVE_DIR,
- NLF_RENAME_ON_REBOOT,
- NLF_RENAME,
- NLF_SKIPPED,
- NLF_COPY_DETAILS,
- NLF_LOG_INSTALL_PROCESS,
- NLF_BYTE,
- NLF_KILO,
- NLF_MEGA,
- NLF_GIGA,
-
- NLF_STRINGS_NO_SPECIAL,
-
- NLF_FONT = NLF_STRINGS_NO_SPECIAL,
- NLF_FONTSIZE,
- NLF_RTL,
- NLF_LANGUAGE,
-
- NLF_STRINGS
-};
-
-struct NLF {
- bool m_bLoaded;
- char *m_szName;
- char *m_szFont;
- int m_iFontSize;
- unsigned int m_uCodePage;
- bool m_bRTL;
-
- char *m_szStrings[NLF_STRINGS];
-};
-
-struct LanguageTable {
- LANGID lang_id;
-
- int dlg_offset;
-
- StringsArray *lang_strings;
-
- NLF nlf;
-};
-
-#endif
+/*
+ * lang.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 ___NLF___H_____
+#define ___NLF___H_____
+
+#include "strlist.h"
+#include "growbuf.h"
+#include "exehead/fileform.h"
+
+struct NLFRef {
+ int iRef;
+ int iUnRef;
+};
+
+struct langstring {
+ int name;
+ int sn;
+ int index;
+ int uindex;
+ int process;
+};
+
+class LangStringList : public SortedStringListND<struct langstring>
+{
+ public:
+ LangStringList();
+
+ int add(const char *name, int *sn=0);
+ int get(char *name, int *sn=0, int *index=0, int *uindex=0, int *process=0);
+ void set(int pos, int index=-1, int uindex=-1, int process=-1);
+ void set(char *name, int index, int uindex=-1, int process=-1);
+ const char *pos2name(int pos);
+ const char *offset2name(int name);
+ int getnum();
+ static int compare_index(const void *item1, const void *item2);
+ langstring *sort_index(int *num);
+ static int compare_uindex(const void *item1, const void *item2);
+ langstring *sort_uindex(int *num);
+
+ private:
+ int count;
+ TinyGrowBuf sortbuf;
+};
+
+class StringsArray
+{
+ public:
+ StringsArray();
+
+ void resize(int num);
+ int set(int idx, char *str);
+ const char *get(int idx);
+
+ private:
+ TinyGrowBuf offsets;
+ GrowBuf strings;
+};
+
+#define NLF_VERSION 6
+
+enum {
+ NLF_BRANDING,
+ NLF_CAPTION,
+ NLF_UCAPTION,
+ NLF_SUBCAPTION_LICENSE,
+ NLF_SUBCAPTION_OPTIONS,
+ NLF_SUBCAPTION_DIR,
+ NLF_SUBCAPTION_INSTFILES,
+ NLF_SUBCAPTION_COMPLETED,
+ NLF_USUBCAPTION_OPTIONS,
+ NLF_USUBCAPTION_DIR,
+ NLF_USUBCAPTION_CONFIRM,
+ NLF_USUBCAPTION_INSTFILES,
+ NLF_USUBCAPTION_COMPLETED,
+ NLF_BTN_BACK,
+ NLF_BTN_NEXT,
+ NLF_BTN_LICENSE,
+ NLF_BTN_LICENSE_AGREE,
+ NLF_BTN_LICENSE_DISAGREE,
+ NLF_BTN_INSTALL,
+ NLF_BTN_UNINSTALL,
+ NLF_BTN_CANCEL,
+ NLF_BTN_CLOSE,
+ NLF_BTN_BROWSE,
+ NLF_BTN_DETAILS,
+ NLF_CLICK_NEXT,
+ NLF_CLICK_INSTALL,
+ NLF_CLICK_UNINSTALL,
+ NLF_NAME,
+ NLF_NAME_DA, // name with doubled ampersands - virtual
+ NLF_COMPLETED,
+ NLF_LICENSE_TEXT,
+ NLF_LICENSE_TEXT_FSCB,
+ NLF_LICENSE_TEXT_FSRB,
+ NLF_ULICENSE_TEXT,
+ NLF_ULICENSE_TEXT_FSCB,
+ NLF_ULICENSE_TEXT_FSRB,
+ NLF_LICENSE_DATA, // virtual
+ NLF_COMP_CUSTOM,
+ NLF_COMP_TEXT,
+ NLF_COMP_SUBTEXT1,
+ NLF_COMP_SUBTEXT1_NO_INST_TYPES,
+ NLF_COMP_SUBTEXT2,
+ NLF_UCOMP_TEXT,
+ NLF_UCOMP_SUBTEXT1,
+ NLF_UCOMP_SUBTEXT1_NO_INST_TYPES,
+ NLF_UCOMP_SUBTEXT2,
+ NLF_DIR_TEXT,
+ NLF_DIR_SUBTEXT,
+ NLF_DIR_BROWSETEXT,
+ NLF_UDIR_TEXT,
+ NLF_UDIR_SUBTEXT,
+ NLF_UDIR_BROWSETEXT,
+ NLF_SPACE_AVAIL,
+ NLF_SPACE_REQ,
+ NLF_UNINST_TEXT,
+ NLF_UNINST_SUBTEXT,
+ NLF_FILE_ERROR,
+ NLF_FILE_ERROR_NOIGNORE,
+ NLF_CANT_WRITE,
+ NLF_COPY_FAILED,
+ NLF_COPY_TO,
+ NLF_REGISTERING,
+ NLF_UNREGISTERING,
+ NLF_SYMBOL_NOT_FOUND,
+ NLF_COULD_NOT_LOAD,
+ NLF_CREATE_DIR,
+ NLF_CREATE_SHORTCUT,
+ NLF_CREATED_UNINST,
+ NLF_DEL_FILE,
+ NLF_DEL_ON_REBOOT,
+ NLF_ERR_CREATING_SHORTCUT,
+ NLF_ERR_CREATING,
+ NLF_ERR_DECOMPRESSING,
+ NLF_ERR_REG_DLL,
+ NLF_EXEC_SHELL,
+ NLF_EXEC,
+ NLF_EXTRACT,
+ NLF_ERR_WRITING,
+ NLF_INST_CORRUPTED,
+ NLF_NO_OLE,
+ NLF_OUTPUT_DIR,
+ NLF_REMOVE_DIR,
+ NLF_RENAME_ON_REBOOT,
+ NLF_RENAME,
+ NLF_SKIPPED,
+ NLF_COPY_DETAILS,
+ NLF_LOG_INSTALL_PROCESS,
+ NLF_BYTE,
+ NLF_KILO,
+ NLF_MEGA,
+ NLF_GIGA,
+
+ NLF_STRINGS_NO_SPECIAL,
+
+ NLF_FONT = NLF_STRINGS_NO_SPECIAL,
+ NLF_FONTSIZE,
+ NLF_RTL,
+ NLF_LANGUAGE,
+
+ NLF_STRINGS
+};
+
+struct NLF {
+ bool m_bLoaded;
+ char *m_szName;
+ char *m_szFont;
+ int m_iFontSize;
+ unsigned int m_uCodePage;
+ bool m_bRTL;
+
+ char *m_szStrings[NLF_STRINGS];
+};
+
+struct LanguageTable {
+ LANGID lang_id;
+
+ int dlg_offset;
+
+ StringsArray *lang_strings;
+
+ NLF nlf;
+};
+
+#endif
diff --git a/Source/lineparse.cpp b/Source/lineparse.cpp
index 2d42ae6..d933aa1 100755
--- a/Source/lineparse.cpp
+++ b/Source/lineparse.cpp
@@ -1,236 +1,236 @@
-/*
- * lineparse.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "lineparse.h"
-#include "Platform.h"
-
-#include <cstdlib>
-#include <cstring>
-
-LineParser::LineParser(bool bCommentBlock)
-{
- m_incommentblock=bCommentBlock;
- m_incomment=false;
- m_nt=m_eat=0;
- m_tokens=0;
-}
-
-LineParser::~LineParser()
-{
- freetokens();
-}
-
-bool LineParser::inComment()
-{
- return m_incomment;
-}
-
-bool LineParser::inCommentBlock()
-{
- return m_incommentblock;
-}
-
-int LineParser::parse(char *line, int ignore_escaping/*=0*/) // returns -1 on error
-{
- freetokens();
- bool bPrevCB=m_incommentblock;
- int n=doline(line, ignore_escaping);
- if (n) return n;
- if (m_nt)
- {
- m_incommentblock=bPrevCB;
- m_tokens=(char**)malloc(sizeof(char*)*m_nt);
- n=doline(line, ignore_escaping);
- if (n)
- {
- freetokens();
- return -1;
- }
- }
- return 0;
-}
-
-int LineParser::getnumtokens()
-{
- return m_nt-m_eat;
-}
-
-void LineParser::eattoken()
-{
- m_eat++;
-}
-
-double LineParser::gettoken_float(int token, int *success/*=0*/)
-{
- token+=m_eat;
- if (token < 0 || token >= m_nt)
- {
- if (success) *success=0;
- return 0.0;
- }
- if (success)
- {
- char *t=m_tokens[token];
- *success=*t?1:0;
- while (*t)
- {
- if ((*t < '0' || *t > '9')&&*t != '.') *success=0;
- t++;
- }
- }
- return atof(m_tokens[token]);
-}
-
-int LineParser::gettoken_int(int token, int *success/*=0*/)
-{
- token+=m_eat;
- if (token < 0 || token >= m_nt || !m_tokens[token][0])
- {
- if (success) *success=0;
- return 0;
- }
- char *tmp;
- int l;
- if (m_tokens[token][0] == '-') l=strtol(m_tokens[token],&tmp,0);
- else l=(int)strtoul(m_tokens[token],&tmp,0);
- if (success) *success=! (int)(*tmp);
- return l;
-}
-
-char* LineParser::gettoken_str(int token)
-{
- token+=m_eat;
- if (token < 0 || token >= m_nt) return "";
- return m_tokens[token];
-}
-
-int LineParser::gettoken_enum(int token, const char *strlist) // null seperated list
-{
- int x=0;
- char *tt=gettoken_str(token);
- if (tt && *tt) while (*strlist)
- {
- if (!stricmp(tt,strlist)) return x;
- strlist+=strlen(strlist)+1;
- x++;
- }
- return -1;
-}
-
-void LineParser::freetokens()
-{
- if (m_tokens)
- {
- int x;
- for (x = 0; x < m_nt; x ++)
- free(m_tokens[x]);
- free(m_tokens);
- }
- m_tokens=0;
- m_nt=0;
-}
-
-int LineParser::doline(char *line, int ignore_escaping/*=0*/)
-{
- m_nt=0;
- m_incomment = false;
- while (*line == ' ' || *line == '\t') line++;
- while (*line)
- {
- if ( m_incommentblock )
- {
- while ( *line )
- {
- if ( *line == '*' && *(line+1) == '/' )
- {
- m_incommentblock=false; // Found end of comment block
- line+=2;
- while (*line == ' ' || *line == '\t') line++;
- break;
- }
- else line++;
- }
- }
- else {
- int lstate=0; // 1=", 2=`, 4='
- if (*line == ';' || *line == '#')
- {
- m_incomment = true;
- break;
- }
- if (*line == '/' && *(line+1) == '*')
- {
- m_incommentblock = true;
- line+=2;
- }
- else {
- if (*line == '\"') lstate=1;
- else if (*line == '\'') lstate=2;
- else if (*line == '`') lstate=4;
- if (lstate) line++;
- int nc=0;
- char *p = line;
- while (*line)
- {
- if (line[0] == '$' && line[1] == '\\') {
- switch (line[2]) {
- case '"':
- case '\'':
- case '`':
- nc += ignore_escaping ? 3 : 1;
- line += 3;
- continue;
- }
- }
- if (lstate==1 && *line =='\"') break;
- if (lstate==2 && *line =='\'') break;
- if (lstate==4 && *line =='`') break;
- if (!lstate && (*line == ' ' || *line == '\t')) break;
-#ifdef NSIS_FIX_COMMENT_HANDLING
- if (!lstate && (*line == ';' || *line == '#' || (*line == '/' && *(line+1) == '*'))) break;
-#endif
- line++;
- nc++;
- }
- if (m_tokens)
- {
- int i;
- m_tokens[m_nt]=(char*)malloc(nc+1);
- for (i = 0; p < line; i++, p++) {
- if (!ignore_escaping && p[0] == '$' && p[1] == '\\') {
- switch (p[2]) {
- case '"':
- case '\'':
- case '`':
- p += 2;
- }
- }
- m_tokens[m_nt][i] = *p;
- }
- m_tokens[m_nt][nc]=0;
- }
- m_nt++;
- if (lstate)
- {
- if (*line) line++;
- else return -2;
- }
- while (*line == ' ' || *line == '\t') line++;
- }
- }
- }
- return 0;
-}
+/*
+ * lineparse.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "lineparse.h"
+#include "Platform.h"
+
+#include <cstdlib>
+#include <cstring>
+
+LineParser::LineParser(bool bCommentBlock)
+{
+ m_incommentblock=bCommentBlock;
+ m_incomment=false;
+ m_nt=m_eat=0;
+ m_tokens=0;
+}
+
+LineParser::~LineParser()
+{
+ freetokens();
+}
+
+bool LineParser::inComment()
+{
+ return m_incomment;
+}
+
+bool LineParser::inCommentBlock()
+{
+ return m_incommentblock;
+}
+
+int LineParser::parse(char *line, int ignore_escaping/*=0*/) // returns -1 on error
+{
+ freetokens();
+ bool bPrevCB=m_incommentblock;
+ int n=doline(line, ignore_escaping);
+ if (n) return n;
+ if (m_nt)
+ {
+ m_incommentblock=bPrevCB;
+ m_tokens=(char**)malloc(sizeof(char*)*m_nt);
+ n=doline(line, ignore_escaping);
+ if (n)
+ {
+ freetokens();
+ return -1;
+ }
+ }
+ return 0;
+}
+
+int LineParser::getnumtokens()
+{
+ return m_nt-m_eat;
+}
+
+void LineParser::eattoken()
+{
+ m_eat++;
+}
+
+double LineParser::gettoken_float(int token, int *success/*=0*/)
+{
+ token+=m_eat;
+ if (token < 0 || token >= m_nt)
+ {
+ if (success) *success=0;
+ return 0.0;
+ }
+ if (success)
+ {
+ char *t=m_tokens[token];
+ *success=*t?1:0;
+ while (*t)
+ {
+ if ((*t < '0' || *t > '9')&&*t != '.') *success=0;
+ t++;
+ }
+ }
+ return atof(m_tokens[token]);
+}
+
+int LineParser::gettoken_int(int token, int *success/*=0*/)
+{
+ token+=m_eat;
+ if (token < 0 || token >= m_nt || !m_tokens[token][0])
+ {
+ if (success) *success=0;
+ return 0;
+ }
+ char *tmp;
+ int l;
+ if (m_tokens[token][0] == '-') l=strtol(m_tokens[token],&tmp,0);
+ else l=(int)strtoul(m_tokens[token],&tmp,0);
+ if (success) *success=! (int)(*tmp);
+ return l;
+}
+
+char* LineParser::gettoken_str(int token)
+{
+ token+=m_eat;
+ if (token < 0 || token >= m_nt) return "";
+ return m_tokens[token];
+}
+
+int LineParser::gettoken_enum(int token, const char *strlist) // null seperated list
+{
+ int x=0;
+ char *tt=gettoken_str(token);
+ if (tt && *tt) while (*strlist)
+ {
+ if (!stricmp(tt,strlist)) return x;
+ strlist+=strlen(strlist)+1;
+ x++;
+ }
+ return -1;
+}
+
+void LineParser::freetokens()
+{
+ if (m_tokens)
+ {
+ int x;
+ for (x = 0; x < m_nt; x ++)
+ free(m_tokens[x]);
+ free(m_tokens);
+ }
+ m_tokens=0;
+ m_nt=0;
+}
+
+int LineParser::doline(char *line, int ignore_escaping/*=0*/)
+{
+ m_nt=0;
+ m_incomment = false;
+ while (*line == ' ' || *line == '\t') line++;
+ while (*line)
+ {
+ if ( m_incommentblock )
+ {
+ while ( *line )
+ {
+ if ( *line == '*' && *(line+1) == '/' )
+ {
+ m_incommentblock=false; // Found end of comment block
+ line+=2;
+ while (*line == ' ' || *line == '\t') line++;
+ break;
+ }
+ else line++;
+ }
+ }
+ else {
+ int lstate=0; // 1=", 2=`, 4='
+ if (*line == ';' || *line == '#')
+ {
+ m_incomment = true;
+ break;
+ }
+ if (*line == '/' && *(line+1) == '*')
+ {
+ m_incommentblock = true;
+ line+=2;
+ }
+ else {
+ if (*line == '\"') lstate=1;
+ else if (*line == '\'') lstate=2;
+ else if (*line == '`') lstate=4;
+ if (lstate) line++;
+ int nc=0;
+ char *p = line;
+ while (*line)
+ {
+ if (line[0] == '$' && line[1] == '\\') {
+ switch (line[2]) {
+ case '"':
+ case '\'':
+ case '`':
+ nc += ignore_escaping ? 3 : 1;
+ line += 3;
+ continue;
+ }
+ }
+ if (lstate==1 && *line =='\"') break;
+ if (lstate==2 && *line =='\'') break;
+ if (lstate==4 && *line =='`') break;
+ if (!lstate && (*line == ' ' || *line == '\t')) break;
+#ifdef NSIS_FIX_COMMENT_HANDLING
+ if (!lstate && (*line == ';' || *line == '#' || (*line == '/' && *(line+1) == '*'))) break;
+#endif
+ line++;
+ nc++;
+ }
+ if (m_tokens)
+ {
+ int i;
+ m_tokens[m_nt]=(char*)malloc(nc+1);
+ for (i = 0; p < line; i++, p++) {
+ if (!ignore_escaping && p[0] == '$' && p[1] == '\\') {
+ switch (p[2]) {
+ case '"':
+ case '\'':
+ case '`':
+ p += 2;
+ }
+ }
+ m_tokens[m_nt][i] = *p;
+ }
+ m_tokens[m_nt][nc]=0;
+ }
+ m_nt++;
+ if (lstate)
+ {
+ if (*line) line++;
+ else return -2;
+ }
+ while (*line == ' ' || *line == '\t') line++;
+ }
+ }
+ }
+ return 0;
+}
diff --git a/Source/lineparse.h b/Source/lineparse.h
index 2ab67f1..326fbdb 100755
--- a/Source/lineparse.h
+++ b/Source/lineparse.h
@@ -1,47 +1,47 @@
-/*
- * lineparse.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _LINEPARSE_H_
-#define _LINEPARSE_H_
-
-class LineParser {
- public:
-
- LineParser(bool bCommentBlock);
- virtual ~LineParser();
-
- bool inComment();
- bool inCommentBlock();
- int parse(char *line, int ignore_escaping=0); // returns -1 on error
- int getnumtokens();
- void eattoken();
- double gettoken_float(int token, int *success=0);
- int gettoken_int(int token, int *success=0);
- char *gettoken_str(int token);
- int gettoken_enum(int token, const char *strlist); // null seperated list
-
- private:
-
- void freetokens();
- int doline(char *line, int ignore_escaping=0);
-
- int m_eat;
- int m_nt;
- bool m_incommentblock;
- bool m_incomment;
- char **m_tokens;
-};
-#endif//_LINEPARSE_H_
+/*
+ * lineparse.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _LINEPARSE_H_
+#define _LINEPARSE_H_
+
+class LineParser {
+ public:
+
+ LineParser(bool bCommentBlock);
+ virtual ~LineParser();
+
+ bool inComment();
+ bool inCommentBlock();
+ int parse(char *line, int ignore_escaping=0); // returns -1 on error
+ int getnumtokens();
+ void eattoken();
+ double gettoken_float(int token, int *success=0);
+ int gettoken_int(int token, int *success=0);
+ char *gettoken_str(int token);
+ int gettoken_enum(int token, const char *strlist); // null seperated list
+
+ private:
+
+ void freetokens();
+ int doline(char *line, int ignore_escaping=0);
+
+ int m_eat;
+ int m_nt;
+ bool m_incommentblock;
+ bool m_incomment;
+ char **m_tokens;
+};
+#endif//_LINEPARSE_H_
diff --git a/Source/makenssi.cpp b/Source/makenssi.cpp
index 46551d5..ef58fba 100755
--- a/Source/makenssi.cpp
+++ b/Source/makenssi.cpp
@@ -1,554 +1,554 @@
-/*
- * makenssi.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <stdio.h>
-#include <signal.h>
-#ifdef _WIN32
-# include <direct.h>
-#else
-# include <unistd.h>
-#endif
-#include <string>
-
-#include "build.h"
-#include "util.h"
-
-#include "version.h"
-
-using namespace std;
-
-int g_noconfig=0;
-int g_display_errors=1;
-FILE *g_output=stdout;
-
-void quit()
-{
- if (g_display_errors)
- {
- fprintf(g_output,"\nNote: you may have one or two (large) stale temporary file(s)\n"
- "left in your temporary directory (Generally this only happens on Windows 9x).\n");
- fflush(g_output);
- }
- exit(1);
-}
-
-static void myatexit()
-{
- dopause();
- if (g_output != stdout && g_output) fclose(g_output);
-}
-
-static void sigint(int sig)
-{
- if (g_display_errors)
- {
- fprintf(g_output,"\n\nAborting on Ctrl+C...\n");
- fflush(g_output);
- }
- quit();
-}
-
-#ifdef _WIN32
-static DWORD WINAPI sigint_event_msg_handler(LPVOID)
-{
- HANDLE hEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, "makensis win32 signint event");
-
- if (hEvent)
- {
- if (WaitForSingleObject(hEvent, INFINITE) == WAIT_OBJECT_0)
- raise(SIGINT);
- CloseHandle(hEvent);
- }
-
- return 0;
-}
-#endif
-
-static void init_signals()
-{
- atexit(myatexit);
- signal(SIGINT,sigint);
-
-#ifdef _WIN32
- DWORD id;
- HANDLE hThread = CreateThread(NULL, 0, sigint_event_msg_handler, NULL, 0, &id);
- if (hThread) CloseHandle(hThread);
-#endif
-}
-
-static void print_logo()
-{
- fprintf(g_output,"MakeNSIS %s - Copyright 1995-2007 Contributors\n"
- "See the file COPYING for license details.\n"
- "Credits can be found in the Users Manual.\n\n", NSIS_VERSION);
- fflush(g_output);
-}
-
-static void print_license()
-{
- fprintf(g_output,"Copyright (C) 1999-2007 Nullsoft and Contributors\n\n"
- "This license applies to everything in the NSIS package, except where otherwise\n"
- "noted.\n\n"
- "This software is provided 'as-is', without any express or implied warranty.\n"
- "In no event will the authors be held liable for any damages arising from the\n"
- "use of this software.\n\n"
- "Permission is granted to anyone to use this software for any purpose, including\n"
- "commercial applications, and to alter it and redistribute it freely, subject to\n"
- "the following restrictions:\n"
- " 1. The origin of this software must not be misrepresented; you must not claim\n"
- " that you wrote the original software. If you use this software in a\n"
- " product, an acknowledgment in the product documentation would be\n"
- " appreciated but is not required.\n"
- " 2. Altered source versions must be plainly marked as such, and must not be\n"
- " misrepresented as being the original software.\n"
- " 3. This notice may not be removed or altered from any source distribution.\n\n"
- "In addition to this license, different licenses apply to the included\n"
- "compression modules. See the file COPYING for details.\n");
- fflush(g_output);
-}
-
-static void print_usage()
-{
- fprintf(g_output,"Usage:\n"
- " makensis [option | script.nsi | - [...]]\n"
- " options are:\n"
- " " OPT_STR "CMDHELP item prints out help for 'item', or lists all commands\n"
- " " OPT_STR "HDRINFO prints information about what options makensis was compiled with\n"
- " " OPT_STR "LICENSE prints the makensis software license\n"
- " " OPT_STR "VERSION prints the makensis version and exits\n"
- " " OPT_STR "Px sets the compiler process priority, where x is 5=realtime,4=high,\n"
- " " " 3=above normal,2=normal,1=below normal,0=idle\n"
- " " OPT_STR "Vx verbosity where x is 4=all,3=no script,2=no info,1=no warnings,0=none\n"
- " " OPT_STR "Ofile specifies a text file to log compiler output (default is stdout)\n"
- " " OPT_STR "PAUSE pauses after execution\n"
- " " OPT_STR "NOCONFIG disables inclusion of <path to makensis.exe>" PLATFORM_PATH_SEPARATOR_STR "nsisconf.nsh\n"
- " " OPT_STR "NOCD disabled the current directory change to that of the .nsi file\n"
- " " OPT_STR "Ddefine[=value] defines the symbol \"define\" for the script [to value]\n"
- " " OPT_STR "Xscriptcmd executes scriptcmd in script (i.e. \"" OPT_STR "XOutFile poop.exe\")\n"
- " parameters are processed by order (" OPT_STR "Ddef ins.nsi != ins.nsi " OPT_STR "Ddef)\n"
- " for script file name, you can use - to read from the standard input\n"
-#ifdef _WIN32
- " you can also use - as an option character: -PAUSE as well as /PAUSE\n"
-#endif
- " you can use a double-dash to end options processing: makensis -- -ins.nsi\n");
- fflush(g_output);
-}
-
-static void print_stub_info(CEXEBuild& build)
-{
- if (build.display_info)
- {
- fprintf(g_output,"Size of first header is %lu bytes.\n",(unsigned long)sizeof(firstheader));
- fprintf(g_output,"Size of main header is %lu bytes.\n",(unsigned long)sizeof(header));
- fprintf(g_output,"Size of each section is %lu bytes.\n",(unsigned long)sizeof(section));
- fprintf(g_output,"Size of each page is %lu bytes.\n",(unsigned long)sizeof(page));
- fprintf(g_output,"Size of each instruction is %lu bytes.\n",(unsigned long)sizeof(entry));
- int x=build.definedlist.getnum();
- fprintf(g_output,"\nDefined symbols: ");
- for (int i=0; i<x; i++)
- {
- fprintf(g_output,"%s",build.definedlist.getname(i));
- char *p=build.definedlist.getvalue(i);
- if (*p) fprintf(g_output,"=%s",p);
- if (i<x-1) fprintf(g_output,",");
- }
- if (!x) fprintf(g_output,"none");
- fprintf(g_output,"\n");
- fflush(g_output);
- }
-}
-
-static string get_home()
-{
- char *home = getenv(
-#ifdef _WIN32
- "APPDATA"
-#else
- "HOME"
-#endif
- );
-
- return home ? home : "";
-}
-
-static int process_config(CEXEBuild& build, string& conf)
-{
- FILE *cfg=fopen(conf.c_str(),"rt");
- if (cfg)
- {
- if (build.display_script)
- {
- fprintf(g_output,"Processing config: \n");
- fflush(g_output);
- }
- int ret=build.process_script(cfg,(char*)conf.c_str());
- fclose(cfg);
- if (ret != PS_OK && ret != PS_EOF)
- {
- if (build.display_errors)
- {
- fprintf(g_output,"Error in config on line %d -- aborting creation process\n",build.linecnt);
- fflush(g_output);
- }
- return 1;
- }
- if (build.display_script)
- {
- fprintf(g_output,"\n");
- fflush(g_output);
- }
- }
- return 0;
-}
-
-static int change_to_script_dir(CEXEBuild& build, string& script)
-{
- string dir = get_dir_name(get_full_path(script));
- if (!dir.empty())
- {
- if (build.display_script)
- {
- fprintf(g_output,"Changing directory to: \"%s\"\n",dir.c_str());
- fflush(g_output);
- }
- if (chdir(dir.c_str()))
- {
- if (build.display_errors)
- {
- fprintf(g_output,"Error changing directory to \"%s\"\n",dir.c_str());
- fflush(g_output);
- }
- return 1;
- }
- if (build.display_script)
- {
- fprintf(g_output,"\n");
- fflush(g_output);
- }
- }
- return 0;
-}
-
-#ifdef NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS
-extern "C" void allow_unaligned_data_access();
-#endif
-
-int main(int argc, char **argv)
-{
-#ifdef NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS
- allow_unaligned_data_access();
-#endif
-
- CEXEBuild build;
- int do_cd=1;
- int outputtried=0;
- int argpos=1;
- int nousage=0;
- int files_processed=0;
- int cmds_processed=0;
- FILE *fp;
- int tmpargpos=1;
- int no_logo=0;
- int in_files=0;
-
- try
- {
- build.initialize(argv[0]);
- }
- catch (exception& err)
- {
- fprintf(g_output, "Error initalizing CEXEBuild: %s\n", err.what());
- fflush(g_output);
- return 1;
- }
-
- if (argc > 1 && IS_OPT(argv[1]) && !stricmp(&argv[1][1],"VERSION"))
- {
- fprintf(g_output,NSIS_VERSION);
- fflush(g_output);
- return 0;
- }
- if (argc > 1 && IS_OPT(argv[1]) && (argv[1][1]=='v' || argv[1][1]=='V'))
- {
- tmpargpos++;
- if (argv[1][2] <= '2' && argv[1][2] >= '0')
- {
- no_logo=1;
- }
- }
-
- if (!no_logo)
- {
- if (argc > tmpargpos && IS_OPT(argv[tmpargpos]) && (argv[tmpargpos][1]=='o' || argv[tmpargpos][1]=='O') && argv[tmpargpos][2])
- {
- g_output=fopen(argv[tmpargpos]+2,"w");
- if (!g_output)
- {
- printf("Error opening output log for writing. Using stdout.\n");
- g_output=stdout;
- }
- outputtried=1;
- }
- print_logo();
- }
-
- init_signals();
-
- if (!g_output) g_output=stdout;
- while (argpos < argc)
- {
- if (!strcmp(argv[argpos], "--"))
- in_files=1;
- else if (IS_OPT(argv[argpos]) && strcmp(argv[argpos], "-") && !in_files)
- {
- if ((argv[argpos][1]=='D' || argv[argpos][1]=='d') && argv[argpos][2])
- {
- char *p=argv[argpos]+2;
- char *s=strdup(p),*v;
- if (build.display_script)
- {
- fprintf(g_output,"Command line defined: \"%s\"\n",p);
- fflush(g_output);
- }
- v=strstr(s,"=");
- if (v) *v++=0;
- build.define(s,v?v:"");
- free(s);
- }
- else if ((argv[argpos][1]=='X' || argv[argpos][1]=='x') && argv[argpos][2])
- {
- if (build.process_oneline(argv[argpos]+2,"command line",argpos+1) != PS_OK)
- {
- return 1;
- }
- cmds_processed++;
- }
- else if ((argv[argpos][1]=='O' || argv[argpos][1]=='o') && argv[argpos][2])
- {
- if (!outputtried)
- {
- g_output=fopen(argv[argpos]+2,"w");
- if (!g_output)
- {
- if (build.display_errors) printf("Error opening output log for writing. Using stdout.\n");
- g_output=stdout;
- }
- outputtried=1;
- }
- }
- else if (!stricmp(&argv[argpos][1],"NOCD")) do_cd=0;
- else if ((argv[argpos][1] == 'V' || argv[argpos][1] == 'v') &&
- argv[argpos][2] >= '0' && argv[argpos][2] <= '4' && !argv[argpos][3])
- {
- int v=argv[argpos][2]-'0';
- build.display_script=v>3;
- build.display_info=v>2;
- build.display_warnings=v>1;
- build.display_errors=v>0;
- g_display_errors=build.display_errors;
- }
- else if (!stricmp(&argv[argpos][1],"NOCONFIG")) g_noconfig=1;
- else if (!stricmp(&argv[argpos][1],"PAUSE")) g_dopause=1;
- else if (!stricmp(&argv[argpos][1],"LICENSE"))
- {
- if (build.display_info)
- {
- print_license();
- }
- nousage++;
- }
- else if (!stricmp(&argv[argpos][1],"CMDHELP"))
- {
- if (argpos < argc-1)
- build.print_help(argv[++argpos]);
- else
- build.print_help(NULL);
- nousage++;
- }
- else if (!stricmp(&argv[argpos][1],"NOTIFYHWND"))
- {
-#ifdef _WIN32
- build.notify_hwnd=(HWND)atol(argv[++argpos]);
- if (!IsWindow(build.notify_hwnd))
- build.notify_hwnd=0;
-#else
- argpos++;
- build.warning(OPT_STR "NOTIFYHWND is disabled for non Win32 platforms.");
-#endif
- }
- else if (!stricmp(&argv[argpos][1],"HDRINFO"))
- {
- print_stub_info(build);
- nousage++;
- }
- else if ((argv[argpos][1]=='P' || argv[argpos][1]=='p') &&
- argv[argpos][2] >= '0' && argv[argpos][2] <= '5' && !argv[argpos][3])
- {
-#ifdef _WIN32
- // priority setting added 01-2007 by Comm@nder21
- int p=argv[argpos][2]-'0';
- HANDLE hProc = GetCurrentProcess();
-
- struct
- {
- DWORD priority;
- DWORD fallback;
- } classes[] = {
- {IDLE_PRIORITY_CLASS, IDLE_PRIORITY_CLASS},
- {BELOW_NORMAL_PRIORITY_CLASS, IDLE_PRIORITY_CLASS},
- {NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS},
- {ABOVE_NORMAL_PRIORITY_CLASS, HIGH_PRIORITY_CLASS},
- {HIGH_PRIORITY_CLASS, HIGH_PRIORITY_CLASS},
- {REALTIME_PRIORITY_CLASS, REALTIME_PRIORITY_CLASS}
- };
-
- if (SetPriorityClass(hProc, classes[p].priority) == FALSE)
- {
- SetPriorityClass(hProc, classes[p].fallback);
- }
-
- if (p == 5)
- build.warning("makensis is running in REALTIME priority mode!");
-
-#else
- build.warning(OPT_STR "Px is disabled for non Win32 platforms.");
-#endif
- }
- else break;
- }
- else
- {
- files_processed++;
- if (!strcmp(argv[argpos],"-") && !in_files)
- g_dopause=0;
- if (!g_noconfig)
- {
- g_noconfig=1;
- string main_conf;
- char* env_var = getenv("NSISCONFDIR");
- if(env_var == NULL)
-#ifndef NSIS_CONFIG_CONST_DATA_PATH
- main_conf = get_executable_dir(argv[0]);
-#else
- main_conf = PREFIX_CONF;
-#endif
- else main_conf = env_var;
- main_conf += PLATFORM_PATH_SEPARATOR_STR;
- main_conf += "nsisconf.nsh";
- if (process_config(build, main_conf))
- return 1;
-
- string home_conf = get_home();
- if (home_conf != "")
- {
- home_conf += PLATFORM_PATH_SEPARATOR_STR;
-#ifdef _WIN32
- home_conf += "nsisconf.nsh";
-#else
- home_conf += ".nsisconf.nsh";
-#endif
- if (process_config(build, home_conf))
- return 1;
- }
- }
-
- {
- char sfile[1024];
- if (!strcmp(argv[argpos],"-") && !in_files)
- {
- fp=stdin;
- strcpy(sfile,"stdin");
- }
- else
- {
- strcpy(sfile,argv[argpos]);
- fp=fopen(sfile,"rt");
- if (!fp)
- {
- sprintf(sfile,"%s.nsi",argv[argpos]);
- fp=fopen(sfile,"rt");
- if (!fp)
- {
- if (build.display_errors)
- {
- sfile[strlen(sfile)-4]=0;
- fprintf(g_output,"Can't open script \"%s\"\n",sfile);
- fflush(g_output);
- }
- return 1;
- }
- }
- if (do_cd)
- {
- string script_file = string(sfile);
- if (change_to_script_dir(build, script_file))
- return 1;
- }
- }
-
- if (build.display_script)
- {
- build.notify(MAKENSIS_NOTIFY_SCRIPT,sfile);
- fprintf(g_output,"Processing script file: \"%s\"\n",sfile);
- fflush(g_output);
- }
- int ret=build.process_script(fp,sfile);
- if (fp != stdin) fclose(fp);
-
- if (ret != PS_EOF && ret != PS_OK)
- {
- if (build.display_errors)
- {
- fprintf(g_output,"Error in script \"%s\" on line %d -- aborting creation process\n",sfile,build.linecnt);
- fflush(g_output);
- }
- return 1;
- }
- }
- }
- argpos++;
- }
-
- if (argpos<argc || (!files_processed && !cmds_processed))
- {
- if (build.display_errors && !nousage)
- {
- print_usage();
- }
- return 1;
- }
-
- if (build.display_info)
- {
- fprintf(g_output,"\nProcessed ");
- if (files_processed) fprintf(g_output,"%d file%s, ",files_processed,files_processed==1?"":"s");
- if (cmds_processed) fprintf(g_output,"%d command line command%s, ",cmds_processed,cmds_processed==1?"":"s");
- fprintf(g_output,"writing output:\n");
- fflush(g_output);
- }
-
- if (build.write_output())
- {
- if (build.display_errors)
- {
- fprintf(g_output,"Error - aborting creation process\n");
- fflush(g_output);
- }
- return 1;
- }
- return 0;
-}
+/*
+ * makenssi.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <stdio.h>
+#include <signal.h>
+#ifdef _WIN32
+# include <direct.h>
+#else
+# include <unistd.h>
+#endif
+#include <string>
+
+#include "build.h"
+#include "util.h"
+
+#include "version.h"
+
+using namespace std;
+
+int g_noconfig=0;
+int g_display_errors=1;
+FILE *g_output=stdout;
+
+void quit()
+{
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nNote: you may have one or two (large) stale temporary file(s)\n"
+ "left in your temporary directory (Generally this only happens on Windows 9x).\n");
+ fflush(g_output);
+ }
+ exit(1);
+}
+
+static void myatexit()
+{
+ dopause();
+ if (g_output != stdout && g_output) fclose(g_output);
+}
+
+static void sigint(int sig)
+{
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\n\nAborting on Ctrl+C...\n");
+ fflush(g_output);
+ }
+ quit();
+}
+
+#ifdef _WIN32
+static DWORD WINAPI sigint_event_msg_handler(LPVOID)
+{
+ HANDLE hEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, "makensis win32 signint event");
+
+ if (hEvent)
+ {
+ if (WaitForSingleObject(hEvent, INFINITE) == WAIT_OBJECT_0)
+ raise(SIGINT);
+ CloseHandle(hEvent);
+ }
+
+ return 0;
+}
+#endif
+
+static void init_signals()
+{
+ atexit(myatexit);
+ signal(SIGINT,sigint);
+
+#ifdef _WIN32
+ DWORD id;
+ HANDLE hThread = CreateThread(NULL, 0, sigint_event_msg_handler, NULL, 0, &id);
+ if (hThread) CloseHandle(hThread);
+#endif
+}
+
+static void print_logo()
+{
+ fprintf(g_output,"MakeNSIS %s - Copyright 1995-2007 Contributors\n"
+ "See the file COPYING for license details.\n"
+ "Credits can be found in the Users Manual.\n\n", NSIS_VERSION);
+ fflush(g_output);
+}
+
+static void print_license()
+{
+ fprintf(g_output,"Copyright (C) 1999-2007 Nullsoft and Contributors\n\n"
+ "This license applies to everything in the NSIS package, except where otherwise\n"
+ "noted.\n\n"
+ "This software is provided 'as-is', without any express or implied warranty.\n"
+ "In no event will the authors be held liable for any damages arising from the\n"
+ "use of this software.\n\n"
+ "Permission is granted to anyone to use this software for any purpose, including\n"
+ "commercial applications, and to alter it and redistribute it freely, subject to\n"
+ "the following restrictions:\n"
+ " 1. The origin of this software must not be misrepresented; you must not claim\n"
+ " that you wrote the original software. If you use this software in a\n"
+ " product, an acknowledgment in the product documentation would be\n"
+ " appreciated but is not required.\n"
+ " 2. Altered source versions must be plainly marked as such, and must not be\n"
+ " misrepresented as being the original software.\n"
+ " 3. This notice may not be removed or altered from any source distribution.\n\n"
+ "In addition to this license, different licenses apply to the included\n"
+ "compression modules. See the file COPYING for details.\n");
+ fflush(g_output);
+}
+
+static void print_usage()
+{
+ fprintf(g_output,"Usage:\n"
+ " makensis [option | script.nsi | - [...]]\n"
+ " options are:\n"
+ " " OPT_STR "CMDHELP item prints out help for 'item', or lists all commands\n"
+ " " OPT_STR "HDRINFO prints information about what options makensis was compiled with\n"
+ " " OPT_STR "LICENSE prints the makensis software license\n"
+ " " OPT_STR "VERSION prints the makensis version and exits\n"
+ " " OPT_STR "Px sets the compiler process priority, where x is 5=realtime,4=high,\n"
+ " " " 3=above normal,2=normal,1=below normal,0=idle\n"
+ " " OPT_STR "Vx verbosity where x is 4=all,3=no script,2=no info,1=no warnings,0=none\n"
+ " " OPT_STR "Ofile specifies a text file to log compiler output (default is stdout)\n"
+ " " OPT_STR "PAUSE pauses after execution\n"
+ " " OPT_STR "NOCONFIG disables inclusion of <path to makensis.exe>" PLATFORM_PATH_SEPARATOR_STR "nsisconf.nsh\n"
+ " " OPT_STR "NOCD disabled the current directory change to that of the .nsi file\n"
+ " " OPT_STR "Ddefine[=value] defines the symbol \"define\" for the script [to value]\n"
+ " " OPT_STR "Xscriptcmd executes scriptcmd in script (i.e. \"" OPT_STR "XOutFile poop.exe\")\n"
+ " parameters are processed by order (" OPT_STR "Ddef ins.nsi != ins.nsi " OPT_STR "Ddef)\n"
+ " for script file name, you can use - to read from the standard input\n"
+#ifdef _WIN32
+ " you can also use - as an option character: -PAUSE as well as /PAUSE\n"
+#endif
+ " you can use a double-dash to end options processing: makensis -- -ins.nsi\n");
+ fflush(g_output);
+}
+
+static void print_stub_info(CEXEBuild& build)
+{
+ if (build.display_info)
+ {
+ fprintf(g_output,"Size of first header is %lu bytes.\n",(unsigned long)sizeof(firstheader));
+ fprintf(g_output,"Size of main header is %lu bytes.\n",(unsigned long)sizeof(header));
+ fprintf(g_output,"Size of each section is %lu bytes.\n",(unsigned long)sizeof(section));
+ fprintf(g_output,"Size of each page is %lu bytes.\n",(unsigned long)sizeof(page));
+ fprintf(g_output,"Size of each instruction is %lu bytes.\n",(unsigned long)sizeof(entry));
+ int x=build.definedlist.getnum();
+ fprintf(g_output,"\nDefined symbols: ");
+ for (int i=0; i<x; i++)
+ {
+ fprintf(g_output,"%s",build.definedlist.getname(i));
+ char *p=build.definedlist.getvalue(i);
+ if (*p) fprintf(g_output,"=%s",p);
+ if (i<x-1) fprintf(g_output,",");
+ }
+ if (!x) fprintf(g_output,"none");
+ fprintf(g_output,"\n");
+ fflush(g_output);
+ }
+}
+
+static string get_home()
+{
+ char *home = getenv(
+#ifdef _WIN32
+ "APPDATA"
+#else
+ "HOME"
+#endif
+ );
+
+ return home ? home : "";
+}
+
+static int process_config(CEXEBuild& build, string& conf)
+{
+ FILE *cfg=fopen(conf.c_str(),"rt");
+ if (cfg)
+ {
+ if (build.display_script)
+ {
+ fprintf(g_output,"Processing config: \n");
+ fflush(g_output);
+ }
+ int ret=build.process_script(cfg,(char*)conf.c_str());
+ fclose(cfg);
+ if (ret != PS_OK && ret != PS_EOF)
+ {
+ if (build.display_errors)
+ {
+ fprintf(g_output,"Error in config on line %d -- aborting creation process\n",build.linecnt);
+ fflush(g_output);
+ }
+ return 1;
+ }
+ if (build.display_script)
+ {
+ fprintf(g_output,"\n");
+ fflush(g_output);
+ }
+ }
+ return 0;
+}
+
+static int change_to_script_dir(CEXEBuild& build, string& script)
+{
+ string dir = get_dir_name(get_full_path(script));
+ if (!dir.empty())
+ {
+ if (build.display_script)
+ {
+ fprintf(g_output,"Changing directory to: \"%s\"\n",dir.c_str());
+ fflush(g_output);
+ }
+ if (chdir(dir.c_str()))
+ {
+ if (build.display_errors)
+ {
+ fprintf(g_output,"Error changing directory to \"%s\"\n",dir.c_str());
+ fflush(g_output);
+ }
+ return 1;
+ }
+ if (build.display_script)
+ {
+ fprintf(g_output,"\n");
+ fflush(g_output);
+ }
+ }
+ return 0;
+}
+
+#ifdef NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS
+extern "C" void allow_unaligned_data_access();
+#endif
+
+int main(int argc, char **argv)
+{
+#ifdef NSIS_HPUX_ALLOW_UNALIGNED_DATA_ACCESS
+ allow_unaligned_data_access();
+#endif
+
+ CEXEBuild build;
+ int do_cd=1;
+ int outputtried=0;
+ int argpos=1;
+ int nousage=0;
+ int files_processed=0;
+ int cmds_processed=0;
+ FILE *fp;
+ int tmpargpos=1;
+ int no_logo=0;
+ int in_files=0;
+
+ try
+ {
+ build.initialize(argv[0]);
+ }
+ catch (exception& err)
+ {
+ fprintf(g_output, "Error initalizing CEXEBuild: %s\n", err.what());
+ fflush(g_output);
+ return 1;
+ }
+
+ if (argc > 1 && IS_OPT(argv[1]) && !stricmp(&argv[1][1],"VERSION"))
+ {
+ fprintf(g_output,NSIS_VERSION);
+ fflush(g_output);
+ return 0;
+ }
+ if (argc > 1 && IS_OPT(argv[1]) && (argv[1][1]=='v' || argv[1][1]=='V'))
+ {
+ tmpargpos++;
+ if (argv[1][2] <= '2' && argv[1][2] >= '0')
+ {
+ no_logo=1;
+ }
+ }
+
+ if (!no_logo)
+ {
+ if (argc > tmpargpos && IS_OPT(argv[tmpargpos]) && (argv[tmpargpos][1]=='o' || argv[tmpargpos][1]=='O') && argv[tmpargpos][2])
+ {
+ g_output=fopen(argv[tmpargpos]+2,"w");
+ if (!g_output)
+ {
+ printf("Error opening output log for writing. Using stdout.\n");
+ g_output=stdout;
+ }
+ outputtried=1;
+ }
+ print_logo();
+ }
+
+ init_signals();
+
+ if (!g_output) g_output=stdout;
+ while (argpos < argc)
+ {
+ if (!strcmp(argv[argpos], "--"))
+ in_files=1;
+ else if (IS_OPT(argv[argpos]) && strcmp(argv[argpos], "-") && !in_files)
+ {
+ if ((argv[argpos][1]=='D' || argv[argpos][1]=='d') && argv[argpos][2])
+ {
+ char *p=argv[argpos]+2;
+ char *s=strdup(p),*v;
+ if (build.display_script)
+ {
+ fprintf(g_output,"Command line defined: \"%s\"\n",p);
+ fflush(g_output);
+ }
+ v=strstr(s,"=");
+ if (v) *v++=0;
+ build.define(s,v?v:"");
+ free(s);
+ }
+ else if ((argv[argpos][1]=='X' || argv[argpos][1]=='x') && argv[argpos][2])
+ {
+ if (build.process_oneline(argv[argpos]+2,"command line",argpos+1) != PS_OK)
+ {
+ return 1;
+ }
+ cmds_processed++;
+ }
+ else if ((argv[argpos][1]=='O' || argv[argpos][1]=='o') && argv[argpos][2])
+ {
+ if (!outputtried)
+ {
+ g_output=fopen(argv[argpos]+2,"w");
+ if (!g_output)
+ {
+ if (build.display_errors) printf("Error opening output log for writing. Using stdout.\n");
+ g_output=stdout;
+ }
+ outputtried=1;
+ }
+ }
+ else if (!stricmp(&argv[argpos][1],"NOCD")) do_cd=0;
+ else if ((argv[argpos][1] == 'V' || argv[argpos][1] == 'v') &&
+ argv[argpos][2] >= '0' && argv[argpos][2] <= '4' && !argv[argpos][3])
+ {
+ int v=argv[argpos][2]-'0';
+ build.display_script=v>3;
+ build.display_info=v>2;
+ build.display_warnings=v>1;
+ build.display_errors=v>0;
+ g_display_errors=build.display_errors;
+ }
+ else if (!stricmp(&argv[argpos][1],"NOCONFIG")) g_noconfig=1;
+ else if (!stricmp(&argv[argpos][1],"PAUSE")) g_dopause=1;
+ else if (!stricmp(&argv[argpos][1],"LICENSE"))
+ {
+ if (build.display_info)
+ {
+ print_license();
+ }
+ nousage++;
+ }
+ else if (!stricmp(&argv[argpos][1],"CMDHELP"))
+ {
+ if (argpos < argc-1)
+ build.print_help(argv[++argpos]);
+ else
+ build.print_help(NULL);
+ nousage++;
+ }
+ else if (!stricmp(&argv[argpos][1],"NOTIFYHWND"))
+ {
+#ifdef _WIN32
+ build.notify_hwnd=(HWND)atol(argv[++argpos]);
+ if (!IsWindow(build.notify_hwnd))
+ build.notify_hwnd=0;
+#else
+ argpos++;
+ build.warning(OPT_STR "NOTIFYHWND is disabled for non Win32 platforms.");
+#endif
+ }
+ else if (!stricmp(&argv[argpos][1],"HDRINFO"))
+ {
+ print_stub_info(build);
+ nousage++;
+ }
+ else if ((argv[argpos][1]=='P' || argv[argpos][1]=='p') &&
+ argv[argpos][2] >= '0' && argv[argpos][2] <= '5' && !argv[argpos][3])
+ {
+#ifdef _WIN32
+ // priority setting added 01-2007 by Comm@nder21
+ int p=argv[argpos][2]-'0';
+ HANDLE hProc = GetCurrentProcess();
+
+ struct
+ {
+ DWORD priority;
+ DWORD fallback;
+ } classes[] = {
+ {IDLE_PRIORITY_CLASS, IDLE_PRIORITY_CLASS},
+ {BELOW_NORMAL_PRIORITY_CLASS, IDLE_PRIORITY_CLASS},
+ {NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS},
+ {ABOVE_NORMAL_PRIORITY_CLASS, HIGH_PRIORITY_CLASS},
+ {HIGH_PRIORITY_CLASS, HIGH_PRIORITY_CLASS},
+ {REALTIME_PRIORITY_CLASS, REALTIME_PRIORITY_CLASS}
+ };
+
+ if (SetPriorityClass(hProc, classes[p].priority) == FALSE)
+ {
+ SetPriorityClass(hProc, classes[p].fallback);
+ }
+
+ if (p == 5)
+ build.warning("makensis is running in REALTIME priority mode!");
+
+#else
+ build.warning(OPT_STR "Px is disabled for non Win32 platforms.");
+#endif
+ }
+ else break;
+ }
+ else
+ {
+ files_processed++;
+ if (!strcmp(argv[argpos],"-") && !in_files)
+ g_dopause=0;
+ if (!g_noconfig)
+ {
+ g_noconfig=1;
+ string main_conf;
+ char* env_var = getenv("NSISCONFDIR");
+ if(env_var == NULL)
+#ifndef NSIS_CONFIG_CONST_DATA_PATH
+ main_conf = get_executable_dir(argv[0]);
+#else
+ main_conf = PREFIX_CONF;
+#endif
+ else main_conf = env_var;
+ main_conf += PLATFORM_PATH_SEPARATOR_STR;
+ main_conf += "nsisconf.nsh";
+ if (process_config(build, main_conf))
+ return 1;
+
+ string home_conf = get_home();
+ if (home_conf != "")
+ {
+ home_conf += PLATFORM_PATH_SEPARATOR_STR;
+#ifdef _WIN32
+ home_conf += "nsisconf.nsh";
+#else
+ home_conf += ".nsisconf.nsh";
+#endif
+ if (process_config(build, home_conf))
+ return 1;
+ }
+ }
+
+ {
+ char sfile[1024];
+ if (!strcmp(argv[argpos],"-") && !in_files)
+ {
+ fp=stdin;
+ strcpy(sfile,"stdin");
+ }
+ else
+ {
+ strcpy(sfile,argv[argpos]);
+ fp=fopen(sfile,"rt");
+ if (!fp)
+ {
+ sprintf(sfile,"%s.nsi",argv[argpos]);
+ fp=fopen(sfile,"rt");
+ if (!fp)
+ {
+ if (build.display_errors)
+ {
+ sfile[strlen(sfile)-4]=0;
+ fprintf(g_output,"Can't open script \"%s\"\n",sfile);
+ fflush(g_output);
+ }
+ return 1;
+ }
+ }
+ if (do_cd)
+ {
+ string script_file = string(sfile);
+ if (change_to_script_dir(build, script_file))
+ return 1;
+ }
+ }
+
+ if (build.display_script)
+ {
+ build.notify(MAKENSIS_NOTIFY_SCRIPT,sfile);
+ fprintf(g_output,"Processing script file: \"%s\"\n",sfile);
+ fflush(g_output);
+ }
+ int ret=build.process_script(fp,sfile);
+ if (fp != stdin) fclose(fp);
+
+ if (ret != PS_EOF && ret != PS_OK)
+ {
+ if (build.display_errors)
+ {
+ fprintf(g_output,"Error in script \"%s\" on line %d -- aborting creation process\n",sfile,build.linecnt);
+ fflush(g_output);
+ }
+ return 1;
+ }
+ }
+ }
+ argpos++;
+ }
+
+ if (argpos<argc || (!files_processed && !cmds_processed))
+ {
+ if (build.display_errors && !nousage)
+ {
+ print_usage();
+ }
+ return 1;
+ }
+
+ if (build.display_info)
+ {
+ fprintf(g_output,"\nProcessed ");
+ if (files_processed) fprintf(g_output,"%d file%s, ",files_processed,files_processed==1?"":"s");
+ if (cmds_processed) fprintf(g_output,"%d command line command%s, ",cmds_processed,cmds_processed==1?"":"s");
+ fprintf(g_output,"writing output:\n");
+ fflush(g_output);
+ }
+
+ if (build.write_output())
+ {
+ if (build.display_errors)
+ {
+ fprintf(g_output,"Error - aborting creation process\n");
+ fflush(g_output);
+ }
+ return 1;
+ }
+ return 0;
+}
diff --git a/Source/manifest.cpp b/Source/manifest.cpp
index 3d6d005..abd55a6 100755
--- a/Source/manifest.cpp
+++ b/Source/manifest.cpp
@@ -1,67 +1,67 @@
-/*
- * manifest.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include "manifest.h"
-#include "version.h"
-
-namespace manifest
-{
-
-using namespace std;
-
-string generate(comctl comctl_selection, exec_level exec_level_selection)
-{
- if (comctl_selection == comctl_old && exec_level_selection == exec_level_none)
- return "";
-
- string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System " NSIS_VERSION "</description>";
-
- if (comctl_selection == comctl_xp)
- {
- xml += "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency>";
- }
-
- if (exec_level_selection != exec_level_none)
- {
- string level = "";
-
- switch (exec_level_selection)
- {
- case exec_level_none:
- break;
- case exec_level_user:
- level = "asInvoker";
- break;
- case exec_level_highest:
- level = "highestAvailable";
- break;
- case exec_level_admin:
- level = "requireAdministrator";
- break;
- }
-
- xml += "<trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v3\"><security><requestedPrivileges><requestedExecutionLevel level=\"";
- xml += level;
- xml += "\" uiAccess=\"false\"/></requestedPrivileges></security></trustInfo>";
- }
-
- xml += "</assembly>";
-
- return xml;
-}
-
-};
+/*
+ * manifest.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include "manifest.h"
+#include "version.h"
+
+namespace manifest
+{
+
+using namespace std;
+
+string generate(comctl comctl_selection, exec_level exec_level_selection)
+{
+ if (comctl_selection == comctl_old && exec_level_selection == exec_level_none)
+ return "";
+
+ string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\"><assemblyIdentity version=\"1.0.0.0\" processorArchitecture=\"X86\" name=\"Nullsoft.NSIS.exehead\" type=\"win32\"/><description>Nullsoft Install System " NSIS_VERSION "</description>";
+
+ if (comctl_selection == comctl_xp)
+ {
+ xml += "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"X86\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" /></dependentAssembly></dependency>";
+ }
+
+ if (exec_level_selection != exec_level_none)
+ {
+ string level = "";
+
+ switch (exec_level_selection)
+ {
+ case exec_level_none:
+ break;
+ case exec_level_user:
+ level = "asInvoker";
+ break;
+ case exec_level_highest:
+ level = "highestAvailable";
+ break;
+ case exec_level_admin:
+ level = "requireAdministrator";
+ break;
+ }
+
+ xml += "<trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v3\"><security><requestedPrivileges><requestedExecutionLevel level=\"";
+ xml += level;
+ xml += "\" uiAccess=\"false\"/></requestedPrivileges></security></trustInfo>";
+ }
+
+ xml += "</assembly>";
+
+ return xml;
+}
+
+};
diff --git a/Source/manifest.h b/Source/manifest.h
index 7533ee8..c336af6 100755
--- a/Source/manifest.h
+++ b/Source/manifest.h
@@ -1,41 +1,41 @@
-/*
- * manifest.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 ___MANIFEST_H___
-#define ___MANIFEST_H___
-
-#include <string>
-
-namespace manifest
-{
- enum comctl
- {
- comctl_old,
- comctl_xp
- };
-
- enum exec_level
- {
- exec_level_none,
- exec_level_user,
- exec_level_highest,
- exec_level_admin
- };
-
- std::string generate(comctl, exec_level);
-};
-
-#endif//!___MANIFEST_H___
+/*
+ * manifest.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 ___MANIFEST_H___
+#define ___MANIFEST_H___
+
+#include <string>
+
+namespace manifest
+{
+ enum comctl
+ {
+ comctl_old,
+ comctl_xp
+ };
+
+ enum exec_level
+ {
+ exec_level_none,
+ exec_level_user,
+ exec_level_highest,
+ exec_level_admin
+ };
+
+ std::string generate(comctl, exec_level);
+};
+
+#endif//!___MANIFEST_H___
diff --git a/Source/mmap.cpp b/Source/mmap.cpp
index aecdba2..25668c9 100755
--- a/Source/mmap.cpp
+++ b/Source/mmap.cpp
@@ -1,512 +1,512 @@
-/*
- * mmap.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "mmap.h"
-
-#include <cstdio> // for f*
-#include <cassert> // for assert
-#ifndef _WIN32
-# include <sys/types.h> // for freebsd
-# include <sys/mman.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-# include <unistd.h>
-#endif
-
-// ========
-// MMapFile
-// ========
-
-int MMapFile::m_iAllocationGranularity = 0;
-
-MMapFile::MMapFile()
-{
-#ifdef _WIN32
- m_hFile = INVALID_HANDLE_VALUE;
- m_hFileMap = NULL;
-#else
- m_hFile = NULL;
- m_hFileDesc = -1;
-#endif
-
- m_pView = NULL;
- m_iSize = 0;
- m_bReadOnly = FALSE;
- m_bTempHandle = FALSE;
-
- if (!m_iAllocationGranularity)
- {
-#ifdef _WIN32
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- m_iAllocationGranularity = (int) si.dwAllocationGranularity;
-#else
- m_iAllocationGranularity = getpagesize();
-#endif
- }
-}
-
-MMapFile::~MMapFile()
-{
- clear();
-}
-
-void MMapFile::clear()
-{
- release();
-
-#ifdef _WIN32
- if (m_hFileMap)
- CloseHandle(m_hFileMap);
- if (m_bTempHandle && m_hFile != INVALID_HANDLE_VALUE)
- CloseHandle(m_hFile);
-
- m_hFile = INVALID_HANDLE_VALUE;
- m_hFileMap = 0;
-#else
- if (m_bTempHandle && m_hFile)
- fclose(m_hFile);
-
- m_hFile = NULL;
-#endif
-}
-
-void MMapFile::setro(BOOL bRO)
-{
- m_bReadOnly = bRO;
-}
-
-#ifdef _WIN32
-int MMapFile::setfile(HANDLE hFile, DWORD dwSize)
-#else
-int MMapFile::setfile(int hFile, DWORD dwSize)
-#endif
-{
- clear();
-
-#ifdef _WIN32
- m_hFile = hFile;
-#else
- m_hFileDesc = hFile;
-#endif
- m_bTempHandle = FALSE;
-
-#ifdef _WIN32
- if (m_hFile == INVALID_HANDLE_VALUE)
-#else
- if (m_hFileDesc == -1)
-#endif
- return 0;
-
- m_iSize = (int) dwSize;
-
- if (m_iSize <= 0)
- return 0;
-
-#ifdef _WIN32
- m_hFileMap = CreateFileMapping(m_hFile, NULL, PAGE_READONLY, 0, m_iSize, NULL);
-
- if (!m_hFileMap)
- return 0;
-#endif
-
- m_bReadOnly = TRUE;
-
- return 1;
-}
-
-void MMapFile::resize(int newsize)
-{
- release();
-
- if (newsize > m_iSize)
- {
-#ifdef _WIN32
- if (m_hFileMap)
- CloseHandle(m_hFileMap);
-
- m_hFileMap = 0;
-#endif
-
- m_iSize = newsize;
-
-#ifdef _WIN32
- if (m_hFile == INVALID_HANDLE_VALUE)
- {
- char buf[MAX_PATH], buf2[MAX_PATH];
-
- GetTempPath(MAX_PATH, buf);
- GetTempFileName(buf, "nsd", 0, buf2);
-
- m_hFile = CreateFile(
- buf2,
- GENERIC_READ | GENERIC_WRITE,
- 0,
- NULL,
- CREATE_ALWAYS,
- FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE | FILE_FLAG_SEQUENTIAL_SCAN,
- NULL
- );
-
- m_bTempHandle = TRUE;
- }
-
- if (m_hFile != INVALID_HANDLE_VALUE)
- {
- m_hFileMap = CreateFileMapping(
- m_hFile,
- NULL,
- m_bReadOnly ? PAGE_READONLY : PAGE_READWRITE,
- 0,
- m_iSize,
- NULL
- );
- }
-#else
- if (m_hFile == NULL)
- {
- m_hFile = tmpfile();
- if (m_hFile != NULL)
- {
- m_hFileDesc = fileno(m_hFile);
- m_bTempHandle = TRUE;
- }
- }
-
- // resize
- if (m_hFileDesc != -1)
- {
- unsigned char c = 0;
-
- if (lseek(m_hFileDesc, m_iSize, SEEK_SET) != (off_t)-1)
- {
- if (read(m_hFileDesc, &c, 1) != -1)
- {
- if (lseek(m_hFileDesc, m_iSize, SEEK_SET) != (off_t)-1)
- {
- if (write(m_hFileDesc, &c, 1) != -1)
- {
- return; // no errors
- }
- }
- }
- }
- }
-
- m_hFileDesc = -1; // some error occurred, bail
-#endif
-
-#ifdef _WIN32
- if (!m_hFileMap)
-#else
- if (m_hFileDesc == -1)
-#endif
- {
- extern FILE *g_output;
- extern void quit(); extern int g_display_errors;
- if (g_display_errors)
- {
- fprintf(g_output,"\nInternal compiler error #12345: error creating mmap the size of %d.\n", m_iSize);
- fflush(g_output);
- }
- quit();
- }
- }
-}
-
-int MMapFile::getsize() const
-{
- return m_iSize;
-}
-
-void *MMapFile::get(int offset, int size) const
-{
- return get(offset, &size);
-}
-
-void *MMapFile::get(int offset, int *sizep) const
-{
- if (!sizep)
- return NULL;
-
- assert(!m_pView);
-
- int size = *sizep;
-
- if (!m_iSize || offset + size > m_iSize)
- {
- extern FILE *g_output;
- extern void quit(); extern int g_display_errors;
- if (g_display_errors)
- {
- fprintf(g_output,"\nInternal compiler error #12345: error mmapping file (%d, %d) is out of range.\n", offset, size);
- fflush(g_output);
- }
- quit();
- }
-
- // fix offset
- int alignedoffset = offset - (offset % m_iAllocationGranularity);
- size += offset - alignedoffset;
-
-#ifdef _WIN32
- const_cast<MMapFile*>(this)->m_pView =
- MapViewOfFile(m_hFileMap, m_bReadOnly ? FILE_MAP_READ : FILE_MAP_WRITE, 0, alignedoffset, size);
-#else
- const_cast<MMapFile*>(this)->m_pView =
- mmap(0, size, m_bReadOnly ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED, m_hFileDesc, alignedoffset);
- const_cast<MMapFile*>(this)->m_iMappedSize = *sizep = size;
-#endif
-
-#ifdef _WIN32
- if (!m_pView)
-#else
- if (m_pView == MAP_FAILED)
-#endif
- {
- extern FILE *g_output;
- extern void quit(); extern int g_display_errors;
- if (g_display_errors)
- {
- fprintf(g_output,"\nInternal compiler error #12345: error mmapping datablock to %d.\n", size);
- fflush(g_output);
- }
- quit();
- }
-
- return (void *)((char *)m_pView + offset - alignedoffset);
-}
-
-void *MMapFile::getmore(int offset, int size) const
-{
- void *pView;
- void *pViewBackup = m_pView;
-#ifndef _WIN32
- int iMappedSizeBackup = m_iMappedSize;
-#endif
- const_cast<MMapFile*>(this)->m_pView = 0;
- pView = get(offset, size);
- const_cast<MMapFile*>(this)->m_pView = pViewBackup;
-#ifndef _WIN32
- const_cast<MMapFile*>(this)->m_iMappedSize = iMappedSizeBackup;
-#endif
- return pView;
-}
-
-void MMapFile::release()
-{
- if (!m_pView)
- return;
-
-#ifdef _WIN32
- UnmapViewOfFile(m_pView);
-#else
- munmap(m_pView, m_iMappedSize);
-#endif
- m_pView = NULL;
-}
-
-void MMapFile::release(void *pView, int size)
-{
- if (!pView)
- return;
-
- unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
- pView = (char *)pView - alignment;
- size += alignment;
-#ifdef _WIN32
- UnmapViewOfFile(pView);
-#else
- munmap(pView, size);
-#endif
-}
-
-void MMapFile::flush(int num)
-{
- if (m_pView)
-#ifdef _WIN32
- FlushViewOfFile(m_pView, num);
-#else
- msync(m_pView, num, MS_SYNC);
-#endif
-}
-
-// ========
-// MMapFake
-// ========
-
-MMapFake::MMapFake()
-{
- m_pMem = NULL;
- m_iSize = 0;
-}
-
-void MMapFake::set(const char *pMem, int iSize)
-{
- m_pMem = pMem;
- m_iSize = iSize;
-}
-
-int MMapFake::getsize() const
-{
- return m_iSize;
-}
-
-void *MMapFake::get(int offset, int size) const
-{
- return get(offset, &size);
-}
-
-void *MMapFake::get(int offset, int *size) const
-{
- if (!size || (offset + *size > m_iSize))
- return NULL;
- return (void *)(m_pMem + offset);
-}
-
-void *MMapFake::getmore(int offset, int size) const
-{
- return get(offset, size);
-}
-
-void MMapFake::resize(int n) {}
-void MMapFake::release() {}
-void MMapFake::release(void *p, int size) {}
-void MMapFake::clear() {}
-void MMapFake::setro(BOOL b) {}
-void MMapFake::flush(BOOL b) {}
-
-// =======
-// MMapBuf
-// =======
-
-MMapBuf::MMapBuf()
-{
- m_gb_u=0;
- m_alloc=m_used=0;
-}
-
-MMapBuf::~MMapBuf()
-{
- m_fm.release();
-}
-
-int MMapBuf::add(const void *data, int len)
-{
- if (len <= 0) return 0;
- resize(getlen() + len);
- memcpy((char*)get(getlen() - len, len), data, len);
- release();
- return getlen() - len;
-}
-
-void MMapBuf::setro(BOOL bRO)
-{
- m_fm.setro(bRO);
-}
-
-void MMapBuf::resize(int newlen)
-{
- if (!m_gb_u && newlen < (16 << 20)) // still in db mode
- {
- m_gb.resize(newlen);
- return;
- }
-
- // not in db mode
- m_gb_u = 1;
- m_used = newlen;
-
- if (newlen > m_alloc)
- {
- m_alloc = newlen + (16 << 20); // add 16mb to top of mapping
-
- m_fm.resize(m_alloc);
-
- if (m_gb.getlen())
- {
- memcpy(m_fm.get(0, m_gb.getlen()), m_gb.get(), m_gb.getlen());
- m_fm.flush(m_gb.getlen());
- m_fm.release();
- m_gb.resize(0);
- }
- }
-}
-
-int MMapBuf::getsize() const
-{
- if (m_gb_u)
- return m_fm.getsize();
- return m_gb.getlen();
-}
-
-int MMapBuf::getlen() const
-{
- if (m_gb_u)
- return m_used;
- return m_gb.getlen();
-}
-
-void *MMapBuf::get() const
-{
- return get(0, m_alloc);
-}
-
-void *MMapBuf::get(int offset, int *sizep) const
-{
- if (!sizep)
- return NULL;
- int size = *sizep;
- return get(offset, size);
-}
-
-void *MMapBuf::get(int offset, int size) const
-{
- if (m_gb_u)
- return m_fm.get(offset, size);
- return (void *) ((char *) m_gb.get() + offset);
-}
-
-void *MMapBuf::getmore(int offset, int size) const
-{
- if (m_gb_u)
- return m_fm.getmore(offset, size);
- return (void *) ((char *) m_gb.get() + offset);
-}
-
-void MMapBuf::release()
-{
- if (m_gb_u)
- m_fm.release();
-}
-
-void MMapBuf::release(void *pView, int size)
-{
- if (m_gb_u)
- m_fm.release(pView, size);
-}
-
-void MMapBuf::clear()
-{
- if (m_gb_u)
- m_fm.clear();
-}
-
-void MMapBuf::flush(int num)
-{
- if (m_gb_u)
- m_fm.flush(num);
-}
+/*
+ * mmap.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "mmap.h"
+
+#include <cstdio> // for f*
+#include <cassert> // for assert
+#ifndef _WIN32
+# include <sys/types.h> // for freebsd
+# include <sys/mman.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+# include <unistd.h>
+#endif
+
+// ========
+// MMapFile
+// ========
+
+int MMapFile::m_iAllocationGranularity = 0;
+
+MMapFile::MMapFile()
+{
+#ifdef _WIN32
+ m_hFile = INVALID_HANDLE_VALUE;
+ m_hFileMap = NULL;
+#else
+ m_hFile = NULL;
+ m_hFileDesc = -1;
+#endif
+
+ m_pView = NULL;
+ m_iSize = 0;
+ m_bReadOnly = FALSE;
+ m_bTempHandle = FALSE;
+
+ if (!m_iAllocationGranularity)
+ {
+#ifdef _WIN32
+ SYSTEM_INFO si;
+ GetSystemInfo(&si);
+ m_iAllocationGranularity = (int) si.dwAllocationGranularity;
+#else
+ m_iAllocationGranularity = getpagesize();
+#endif
+ }
+}
+
+MMapFile::~MMapFile()
+{
+ clear();
+}
+
+void MMapFile::clear()
+{
+ release();
+
+#ifdef _WIN32
+ if (m_hFileMap)
+ CloseHandle(m_hFileMap);
+ if (m_bTempHandle && m_hFile != INVALID_HANDLE_VALUE)
+ CloseHandle(m_hFile);
+
+ m_hFile = INVALID_HANDLE_VALUE;
+ m_hFileMap = 0;
+#else
+ if (m_bTempHandle && m_hFile)
+ fclose(m_hFile);
+
+ m_hFile = NULL;
+#endif
+}
+
+void MMapFile::setro(BOOL bRO)
+{
+ m_bReadOnly = bRO;
+}
+
+#ifdef _WIN32
+int MMapFile::setfile(HANDLE hFile, DWORD dwSize)
+#else
+int MMapFile::setfile(int hFile, DWORD dwSize)
+#endif
+{
+ clear();
+
+#ifdef _WIN32
+ m_hFile = hFile;
+#else
+ m_hFileDesc = hFile;
+#endif
+ m_bTempHandle = FALSE;
+
+#ifdef _WIN32
+ if (m_hFile == INVALID_HANDLE_VALUE)
+#else
+ if (m_hFileDesc == -1)
+#endif
+ return 0;
+
+ m_iSize = (int) dwSize;
+
+ if (m_iSize <= 0)
+ return 0;
+
+#ifdef _WIN32
+ m_hFileMap = CreateFileMapping(m_hFile, NULL, PAGE_READONLY, 0, m_iSize, NULL);
+
+ if (!m_hFileMap)
+ return 0;
+#endif
+
+ m_bReadOnly = TRUE;
+
+ return 1;
+}
+
+void MMapFile::resize(int newsize)
+{
+ release();
+
+ if (newsize > m_iSize)
+ {
+#ifdef _WIN32
+ if (m_hFileMap)
+ CloseHandle(m_hFileMap);
+
+ m_hFileMap = 0;
+#endif
+
+ m_iSize = newsize;
+
+#ifdef _WIN32
+ if (m_hFile == INVALID_HANDLE_VALUE)
+ {
+ char buf[MAX_PATH], buf2[MAX_PATH];
+
+ GetTempPath(MAX_PATH, buf);
+ GetTempFileName(buf, "nsd", 0, buf2);
+
+ m_hFile = CreateFile(
+ buf2,
+ GENERIC_READ | GENERIC_WRITE,
+ 0,
+ NULL,
+ CREATE_ALWAYS,
+ FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE | FILE_FLAG_SEQUENTIAL_SCAN,
+ NULL
+ );
+
+ m_bTempHandle = TRUE;
+ }
+
+ if (m_hFile != INVALID_HANDLE_VALUE)
+ {
+ m_hFileMap = CreateFileMapping(
+ m_hFile,
+ NULL,
+ m_bReadOnly ? PAGE_READONLY : PAGE_READWRITE,
+ 0,
+ m_iSize,
+ NULL
+ );
+ }
+#else
+ if (m_hFile == NULL)
+ {
+ m_hFile = tmpfile();
+ if (m_hFile != NULL)
+ {
+ m_hFileDesc = fileno(m_hFile);
+ m_bTempHandle = TRUE;
+ }
+ }
+
+ // resize
+ if (m_hFileDesc != -1)
+ {
+ unsigned char c = 0;
+
+ if (lseek(m_hFileDesc, m_iSize, SEEK_SET) != (off_t)-1)
+ {
+ if (read(m_hFileDesc, &c, 1) != -1)
+ {
+ if (lseek(m_hFileDesc, m_iSize, SEEK_SET) != (off_t)-1)
+ {
+ if (write(m_hFileDesc, &c, 1) != -1)
+ {
+ return; // no errors
+ }
+ }
+ }
+ }
+ }
+
+ m_hFileDesc = -1; // some error occurred, bail
+#endif
+
+#ifdef _WIN32
+ if (!m_hFileMap)
+#else
+ if (m_hFileDesc == -1)
+#endif
+ {
+ extern FILE *g_output;
+ extern void quit(); extern int g_display_errors;
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nInternal compiler error #12345: error creating mmap the size of %d.\n", m_iSize);
+ fflush(g_output);
+ }
+ quit();
+ }
+ }
+}
+
+int MMapFile::getsize() const
+{
+ return m_iSize;
+}
+
+void *MMapFile::get(int offset, int size) const
+{
+ return get(offset, &size);
+}
+
+void *MMapFile::get(int offset, int *sizep) const
+{
+ if (!sizep)
+ return NULL;
+
+ assert(!m_pView);
+
+ int size = *sizep;
+
+ if (!m_iSize || offset + size > m_iSize)
+ {
+ extern FILE *g_output;
+ extern void quit(); extern int g_display_errors;
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nInternal compiler error #12345: error mmapping file (%d, %d) is out of range.\n", offset, size);
+ fflush(g_output);
+ }
+ quit();
+ }
+
+ // fix offset
+ int alignedoffset = offset - (offset % m_iAllocationGranularity);
+ size += offset - alignedoffset;
+
+#ifdef _WIN32
+ const_cast<MMapFile*>(this)->m_pView =
+ MapViewOfFile(m_hFileMap, m_bReadOnly ? FILE_MAP_READ : FILE_MAP_WRITE, 0, alignedoffset, size);
+#else
+ const_cast<MMapFile*>(this)->m_pView =
+ mmap(0, size, m_bReadOnly ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED, m_hFileDesc, alignedoffset);
+ const_cast<MMapFile*>(this)->m_iMappedSize = *sizep = size;
+#endif
+
+#ifdef _WIN32
+ if (!m_pView)
+#else
+ if (m_pView == MAP_FAILED)
+#endif
+ {
+ extern FILE *g_output;
+ extern void quit(); extern int g_display_errors;
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nInternal compiler error #12345: error mmapping datablock to %d.\n", size);
+ fflush(g_output);
+ }
+ quit();
+ }
+
+ return (void *)((char *)m_pView + offset - alignedoffset);
+}
+
+void *MMapFile::getmore(int offset, int size) const
+{
+ void *pView;
+ void *pViewBackup = m_pView;
+#ifndef _WIN32
+ int iMappedSizeBackup = m_iMappedSize;
+#endif
+ const_cast<MMapFile*>(this)->m_pView = 0;
+ pView = get(offset, size);
+ const_cast<MMapFile*>(this)->m_pView = pViewBackup;
+#ifndef _WIN32
+ const_cast<MMapFile*>(this)->m_iMappedSize = iMappedSizeBackup;
+#endif
+ return pView;
+}
+
+void MMapFile::release()
+{
+ if (!m_pView)
+ return;
+
+#ifdef _WIN32
+ UnmapViewOfFile(m_pView);
+#else
+ munmap(m_pView, m_iMappedSize);
+#endif
+ m_pView = NULL;
+}
+
+void MMapFile::release(void *pView, int size)
+{
+ if (!pView)
+ return;
+
+ unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity;
+ pView = (char *)pView - alignment;
+ size += alignment;
+#ifdef _WIN32
+ UnmapViewOfFile(pView);
+#else
+ munmap(pView, size);
+#endif
+}
+
+void MMapFile::flush(int num)
+{
+ if (m_pView)
+#ifdef _WIN32
+ FlushViewOfFile(m_pView, num);
+#else
+ msync(m_pView, num, MS_SYNC);
+#endif
+}
+
+// ========
+// MMapFake
+// ========
+
+MMapFake::MMapFake()
+{
+ m_pMem = NULL;
+ m_iSize = 0;
+}
+
+void MMapFake::set(const char *pMem, int iSize)
+{
+ m_pMem = pMem;
+ m_iSize = iSize;
+}
+
+int MMapFake::getsize() const
+{
+ return m_iSize;
+}
+
+void *MMapFake::get(int offset, int size) const
+{
+ return get(offset, &size);
+}
+
+void *MMapFake::get(int offset, int *size) const
+{
+ if (!size || (offset + *size > m_iSize))
+ return NULL;
+ return (void *)(m_pMem + offset);
+}
+
+void *MMapFake::getmore(int offset, int size) const
+{
+ return get(offset, size);
+}
+
+void MMapFake::resize(int n) {}
+void MMapFake::release() {}
+void MMapFake::release(void *p, int size) {}
+void MMapFake::clear() {}
+void MMapFake::setro(BOOL b) {}
+void MMapFake::flush(BOOL b) {}
+
+// =======
+// MMapBuf
+// =======
+
+MMapBuf::MMapBuf()
+{
+ m_gb_u=0;
+ m_alloc=m_used=0;
+}
+
+MMapBuf::~MMapBuf()
+{
+ m_fm.release();
+}
+
+int MMapBuf::add(const void *data, int len)
+{
+ if (len <= 0) return 0;
+ resize(getlen() + len);
+ memcpy((char*)get(getlen() - len, len), data, len);
+ release();
+ return getlen() - len;
+}
+
+void MMapBuf::setro(BOOL bRO)
+{
+ m_fm.setro(bRO);
+}
+
+void MMapBuf::resize(int newlen)
+{
+ if (!m_gb_u && newlen < (16 << 20)) // still in db mode
+ {
+ m_gb.resize(newlen);
+ return;
+ }
+
+ // not in db mode
+ m_gb_u = 1;
+ m_used = newlen;
+
+ if (newlen > m_alloc)
+ {
+ m_alloc = newlen + (16 << 20); // add 16mb to top of mapping
+
+ m_fm.resize(m_alloc);
+
+ if (m_gb.getlen())
+ {
+ memcpy(m_fm.get(0, m_gb.getlen()), m_gb.get(), m_gb.getlen());
+ m_fm.flush(m_gb.getlen());
+ m_fm.release();
+ m_gb.resize(0);
+ }
+ }
+}
+
+int MMapBuf::getsize() const
+{
+ if (m_gb_u)
+ return m_fm.getsize();
+ return m_gb.getlen();
+}
+
+int MMapBuf::getlen() const
+{
+ if (m_gb_u)
+ return m_used;
+ return m_gb.getlen();
+}
+
+void *MMapBuf::get() const
+{
+ return get(0, m_alloc);
+}
+
+void *MMapBuf::get(int offset, int *sizep) const
+{
+ if (!sizep)
+ return NULL;
+ int size = *sizep;
+ return get(offset, size);
+}
+
+void *MMapBuf::get(int offset, int size) const
+{
+ if (m_gb_u)
+ return m_fm.get(offset, size);
+ return (void *) ((char *) m_gb.get() + offset);
+}
+
+void *MMapBuf::getmore(int offset, int size) const
+{
+ if (m_gb_u)
+ return m_fm.getmore(offset, size);
+ return (void *) ((char *) m_gb.get() + offset);
+}
+
+void MMapBuf::release()
+{
+ if (m_gb_u)
+ m_fm.release();
+}
+
+void MMapBuf::release(void *pView, int size)
+{
+ if (m_gb_u)
+ m_fm.release(pView, size);
+}
+
+void MMapBuf::clear()
+{
+ if (m_gb_u)
+ m_fm.clear();
+}
+
+void MMapBuf::flush(int num)
+{
+ if (m_gb_u)
+ m_fm.flush(num);
+}
diff --git a/Source/mmap.h b/Source/mmap.h
index 80e6124..77d810b 100755
--- a/Source/mmap.h
+++ b/Source/mmap.h
@@ -1,144 +1,144 @@
-/*
- * mmap.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 __MMAP_H_
-#define __MMAP_H_
-
-#include "Platform.h"
-#include "growbuf.h"
-
-#ifndef _WIN32
-#include <cstdio> // for FILE*
-#endif
-
-class IMMap
-{
- public:
- virtual void resize(int newlen)=0;
- virtual int getsize() const=0;
- virtual void *get(int offset, int size) const=0;
- virtual void *get(int offset, int *size) const=0;
- virtual void *getmore(int offset, int size) const=0;
- virtual void release()=0;
- virtual void release(void *view, int size)=0;
- virtual void clear()=0;
- virtual void setro(BOOL bRO)=0;
- virtual void flush(int num)=0;
- virtual ~IMMap() {}
-};
-
-class MMapFile : public IMMap
-{
- private: // don't copy instances
- MMapFile(const MMapFile&);
- void operator=(const MMapFile&);
-
- public:
- MMapFile();
- virtual ~MMapFile();
-
- void clear();
- void setro(BOOL bRO);
-#ifdef _WIN32
- int setfile(HANDLE hFile, DWORD dwSize);
-#else
- int setfile(int hFile, DWORD dwSize);
-#endif
- void resize(int newsize);
- int getsize() const;
- void *get(int offset, int size) const;
- void *get(int offset, int *sizep) const;
- void *getmore(int offset, int size) const;
- void release();
- void release(void *pView, int size);
- void flush(int num);
-
- private:
-#ifdef _WIN32
- HANDLE m_hFile, m_hFileMap;
-#else
- FILE *m_hFile;
- int m_hFileDesc;
- int m_iMappedSize;
-#endif
- void *m_pView;
- int m_iSize;
- BOOL m_bReadOnly;
- BOOL m_bTempHandle;
-
- static int m_iAllocationGranularity;
-};
-
-class MMapFake : public IMMap
-{
- private: // don't copy instances
- MMapFake(const MMapFake&);
- void operator=(const MMapFake&);
- public:
- MMapFake();
-
- void set(const char *pMem, int iSize);
- int getsize() const;
- void *get(int offset, int size) const;
- void *get(int offset, int *size) const;
- void *getmore(int offset, int size) const;
-
- void resize(int n);
- void release();
- void release(void *p, int size);
- void clear();
- void setro(BOOL b);
- void flush(BOOL b);
-
- private:
- const char *m_pMem;
- int m_iSize;
-};
-
-class MMapBuf : public IGrowBuf, public IMMap
-{
- private: // don't copy instances
- MMapBuf(const MMapBuf&);
- void operator=(const MMapBuf&);
-
- public:
- MMapBuf();
- virtual ~MMapBuf();
-
- int add(const void *data, int len);
- void setro(BOOL bRO);
- void resize(int newlen);
- int getsize() const;
- int getlen() const;
- void *get() const;
- void *get(int offset, int *sizep) const;
- void *get(int offset, int size) const;
- void *getmore(int offset, int size) const;
- void release();
- void release(void *pView, int size);
- void clear();
- void flush(int num);
-
- private:
- GrowBuf m_gb;
- MMapFile m_fm;
-
- int m_gb_u;
- int m_alloc, m_used;
-};
-
-#endif//__MMAP_H_
-
+/*
+ * mmap.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 __MMAP_H_
+#define __MMAP_H_
+
+#include "Platform.h"
+#include "growbuf.h"
+
+#ifndef _WIN32
+#include <cstdio> // for FILE*
+#endif
+
+class IMMap
+{
+ public:
+ virtual void resize(int newlen)=0;
+ virtual int getsize() const=0;
+ virtual void *get(int offset, int size) const=0;
+ virtual void *get(int offset, int *size) const=0;
+ virtual void *getmore(int offset, int size) const=0;
+ virtual void release()=0;
+ virtual void release(void *view, int size)=0;
+ virtual void clear()=0;
+ virtual void setro(BOOL bRO)=0;
+ virtual void flush(int num)=0;
+ virtual ~IMMap() {}
+};
+
+class MMapFile : public IMMap
+{
+ private: // don't copy instances
+ MMapFile(const MMapFile&);
+ void operator=(const MMapFile&);
+
+ public:
+ MMapFile();
+ virtual ~MMapFile();
+
+ void clear();
+ void setro(BOOL bRO);
+#ifdef _WIN32
+ int setfile(HANDLE hFile, DWORD dwSize);
+#else
+ int setfile(int hFile, DWORD dwSize);
+#endif
+ void resize(int newsize);
+ int getsize() const;
+ void *get(int offset, int size) const;
+ void *get(int offset, int *sizep) const;
+ void *getmore(int offset, int size) const;
+ void release();
+ void release(void *pView, int size);
+ void flush(int num);
+
+ private:
+#ifdef _WIN32
+ HANDLE m_hFile, m_hFileMap;
+#else
+ FILE *m_hFile;
+ int m_hFileDesc;
+ int m_iMappedSize;
+#endif
+ void *m_pView;
+ int m_iSize;
+ BOOL m_bReadOnly;
+ BOOL m_bTempHandle;
+
+ static int m_iAllocationGranularity;
+};
+
+class MMapFake : public IMMap
+{
+ private: // don't copy instances
+ MMapFake(const MMapFake&);
+ void operator=(const MMapFake&);
+ public:
+ MMapFake();
+
+ void set(const char *pMem, int iSize);
+ int getsize() const;
+ void *get(int offset, int size) const;
+ void *get(int offset, int *size) const;
+ void *getmore(int offset, int size) const;
+
+ void resize(int n);
+ void release();
+ void release(void *p, int size);
+ void clear();
+ void setro(BOOL b);
+ void flush(BOOL b);
+
+ private:
+ const char *m_pMem;
+ int m_iSize;
+};
+
+class MMapBuf : public IGrowBuf, public IMMap
+{
+ private: // don't copy instances
+ MMapBuf(const MMapBuf&);
+ void operator=(const MMapBuf&);
+
+ public:
+ MMapBuf();
+ virtual ~MMapBuf();
+
+ int add(const void *data, int len);
+ void setro(BOOL bRO);
+ void resize(int newlen);
+ int getsize() const;
+ int getlen() const;
+ void *get() const;
+ void *get(int offset, int *sizep) const;
+ void *get(int offset, int size) const;
+ void *getmore(int offset, int size) const;
+ void release();
+ void release(void *pView, int size);
+ void clear();
+ void flush(int num);
+
+ private:
+ GrowBuf m_gb;
+ MMapFile m_fm;
+
+ int m_gb_u;
+ int m_alloc, m_used;
+};
+
+#endif//__MMAP_H_
+
diff --git a/Source/script.cpp b/Source/script.cpp
index 69144c3..e291e1f 100755
--- a/Source/script.cpp
+++ b/Source/script.cpp
@@ -1,6171 +1,6176 @@
-/*
- * script.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <stdio.h>
-#include <ctype.h>
-#include "tokens.h"
-#include "build.h"
-#include "util.h"
-#include "winchar.h"
-#include "ResourceEditor.h"
-#include "DialogTemplate.h"
-#include "lang.h"
-#include "dirreader.h"
-#include "version.h"
-#include "exehead/resource.h"
-#include <cassert> // for assert(3)
-#include <time.h>
-#include <string>
-#include <algorithm>
-#include "boost/scoped_ptr.hpp"
-
-using namespace std;
-
-#ifdef _WIN32
-# include <direct.h> // for chdir
-#else
-# include <sys/stat.h> // for stat and umask
-# include <sys/types.h> // for mode_t
-# include <fcntl.h> // for O_RDONLY
-# include <unistd.h>
-# include <stdlib.h> // for mkstemp
-#endif
-
-#define MAX_INCLUDEDEPTH 10
-#define MAX_LINELENGTH 16384
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
-// Added by Sunil Kamath 11 June 2003
-char *CEXEBuild::set_file_predefine(char *filename)
-{
- char *oldfilename = definedlist.find("__FILE__");
- if(oldfilename)
- {
- oldfilename = strdup(oldfilename);
- definedlist.del("__FILE__");
- }
- char *p = strrchr(filename,'\\');
- if(p) {
- p++;
- }
- else {
- p = curfilename;
- }
- definedlist.add("__FILE__",p);
-
- return oldfilename;
-}
-
-void CEXEBuild::restore_file_predefine(char *oldfilename)
-{
- definedlist.del("__FILE__");
- if(oldfilename) {
- definedlist.add("__FILE__",oldfilename);
- free(oldfilename);
- }
-}
-
-char *CEXEBuild::set_timestamp_predefine(char *filename)
-{
- char *oldtimestamp = definedlist.find("__TIMESTAMP__");
- if(oldtimestamp) {
- oldtimestamp = strdup(oldtimestamp);
- definedlist.del("__TIMESTAMP__");
- }
-
-#ifdef _WIN32
- char timestampbuf[256] = "";
- char datebuf[128] = "";
- char timebuf[128] = "";
- WIN32_FIND_DATA fd;
- FILETIME floctime;
- SYSTEMTIME stime;
-
- HANDLE hSearch = FindFirstFile(filename, &fd);
- if (hSearch != INVALID_HANDLE_VALUE)
- {
- FindClose(hSearch);
-
- FileTimeToLocalFileTime(&fd.ftLastWriteTime, &floctime);
- FileTimeToSystemTime(&floctime, &stime);
-
- GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &stime, NULL, datebuf, sizeof(datebuf));
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf));
- wsprintf(timestampbuf,"%s %s",datebuf,timebuf);
-
- definedlist.add("__TIMESTAMP__",timestampbuf);
- }
-#else
- struct stat st;
- if (!stat(filename, &st))
- definedlist.add("__TIMESTAMP__",ctime(&st.st_mtime));
-#endif
-
- return oldtimestamp;
-}
-
-void CEXEBuild::restore_timestamp_predefine(char *oldtimestamp)
-{
- definedlist.del("__TIMESTAMP__");
- if(oldtimestamp) {
- definedlist.add("__TIMESTAMP__",oldtimestamp);
- free(oldtimestamp);
- }
-}
-
-char *CEXEBuild::set_line_predefine(int linecnt, BOOL is_macro)
-{
- char* linebuf = NULL;
- MANAGE_WITH(linebuf, free);
-
- char temp[128] = "";
- sprintf(temp,"%d",linecnt);
-
- char *oldline = definedlist.find("__LINE__");
- if(oldline) {
- oldline = strdup(oldline);
- definedlist.del("__LINE__");
- }
- if(is_macro && oldline) {
- linebuf = (char *)malloc(strlen(oldline)+strlen(temp)+2);
- sprintf(linebuf,"%s.%s",oldline,temp);
- }
- else {
- linebuf = strdup(temp);
- }
- definedlist.add("__LINE__",linebuf);
-
- return oldline;
-}
-
-void CEXEBuild::restore_line_predefine(char *oldline)
-{
- definedlist.del("__LINE__");
- if(oldline) {
- definedlist.add("__LINE__",oldline);
- free(oldline);
- }
-}
-
-void CEXEBuild::set_date_time_predefines()
-{
- time_t etime;
- struct tm * ltime;
- char datebuf[128];
- char timebuf[128];
-
- time(&etime);
- ltime = localtime(&etime);
-#ifdef _WIN32
- SYSTEMTIME stime;
- stime.wYear = ltime->tm_year+1900;
- stime.wMonth = ltime->tm_mon + 1;
- stime.wDay = ltime->tm_mday;
- stime.wHour= ltime->tm_hour;
- stime.wMinute= ltime->tm_min;
- stime.wSecond= ltime->tm_sec;
- stime.wMilliseconds= 0;
- GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &stime, NULL, datebuf, sizeof(datebuf));
- definedlist.add("__DATE__",(char *)datebuf);
- GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf));
- definedlist.add("__TIME__",(char *)timebuf);
-#else
- my_strftime(datebuf, sizeof(datebuf), "%x", ltime);
- definedlist.add("__DATE__",(char *)datebuf);
- my_strftime(timebuf, sizeof(timebuf), "%X", ltime);
- definedlist.add("__TIME__",(char *)timebuf);
-#endif
-}
-
-void CEXEBuild::del_date_time_predefines()
-{
- definedlist.del("__DATE__");
- definedlist.del("__TIME__");
-}
-#endif
-
-int CEXEBuild::process_script(FILE *filepointer, char *filename)
-{
- linecnt = 0;
- fp = filepointer;
- curfilename = filename;
-
- if (has_called_write_output)
- {
- ERROR_MSG("Error (process_script): write_output already called, can't continue\n");
- return PS_ERROR;
- }
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- set_date_time_predefines();
- char *oldfilename = set_file_predefine(curfilename);
- char *oldtimestamp = set_timestamp_predefine(curfilename);
-#endif
-
- int ret=parseScript();
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- restore_file_predefine(oldfilename);
- restore_timestamp_predefine(oldtimestamp);
- del_date_time_predefines();
-#endif
-
- fp = 0;
- curfilename = 0;
-
- if (m_linebuild.getlen())
- {
- ERROR_MSG("Error: invalid script: last line ended with \\\n");
- return PS_ERROR;
- }
-
- if (ret == PS_EOF && num_ifblock())
- {
- ERROR_MSG("!if[macro][n]def: open at EOF - need !endif\n");
- return PS_ERROR;
- }
-
- return ret;
-}
-
-#define PRINTHELP() { print_help(line.gettoken_str(0)); return PS_ERROR; }
-
-void CEXEBuild::start_ifblock()
-{
- ifblock ib = {0, };
- if (cur_ifblock)
- ib.inherited_ignore = cur_ifblock->ignore || cur_ifblock->inherited_ignore;
- int num = build_preprocessor_data.getlen() / sizeof(ifblock);
- build_preprocessor_data.add(&ib, sizeof(ifblock));
- cur_ifblock = (ifblock *) build_preprocessor_data.get() + num;
-}
-
-void CEXEBuild::end_ifblock()
-{
- if (build_preprocessor_data.getlen())
- {
- cur_ifblock--;
- build_preprocessor_data.resize(build_preprocessor_data.getlen() - sizeof(ifblock));
- if (!build_preprocessor_data.getlen())
- cur_ifblock = 0;
- }
-}
-
-int CEXEBuild::num_ifblock()
-{
- return build_preprocessor_data.getlen() / sizeof(ifblock);
-}
-
-// Func size: just under 200 lines (orip)
-int CEXEBuild::doParse(const char *str)
-{
- LineParser line(inside_comment);
- int res;
-
- while (*str == ' ' || *str == '\t') str++;
-
- // remove trailing slash and null, if there's a previous line
- if (m_linebuild.getlen()>1)
- m_linebuild.resize(m_linebuild.getlen()-2);
-
- m_linebuild.add(str,strlen(str)+1);
-
- // keep waiting for more lines, if this line ends with a backslash
- if (str[0] && CharPrev(str,str+strlen(str))[0] == '\\')
- {
- line.parse((char*)m_linebuild.get());
- if (line.inComment())
- {
- warning_fl("comment contains line-continuation character, following line will be ignored");
- }
- return PS_OK;
- }
-
- // parse before checking if the line should be ignored, so block comments won't be missed
-
- // escaped quotes should be ignored for compile time commands that set defines
- // because defines can be inserted in commands at a later stage
- bool ignore_escaping = (!strnicmp((char*)m_linebuild.get(),"!define",7) || !strnicmp((char*)m_linebuild.get(),"!insertmacro",12));
- res=line.parse((char*)m_linebuild.get(), ignore_escaping);
-
- inside_comment = line.inCommentBlock();
-
- // if ignoring, ignore all lines that don't begin with an exclamation mark
- {
- bool ignore_line = cur_ifblock && (cur_ifblock->ignore || cur_ifblock->inherited_ignore);
- char first_char = *(char *) m_linebuild.get();
- if (ignore_line && (first_char!='!' || !is_valid_token(line.gettoken_str(0))))
- {
- m_linebuild.resize(0);
- return PS_OK;
- }
- }
-
- m_linebuild.resize(0);
-
- if (res)
- {
- if (res==-2) ERROR_MSG("Error: unterminated string parsing line at %s:%d\n",curfilename,linecnt);
- else ERROR_MSG("Error: error parsing line (%s:%d)\n",curfilename,linecnt);
- return PS_ERROR;
- }
-
-parse_again:
- if (line.getnumtokens() < 1) return PS_OK;
-
- int np,op,pos;
- int tkid=get_commandtoken(line.gettoken_str(0),&np,&op,&pos);
- if (tkid == -1)
- {
- char *p=line.gettoken_str(0);
- if (p[0] && p[strlen(p)-1]==':')
- {
- if (p[0] == '!' || (p[0] >= '0' && p[0] <= '9') || p[0] == '$' || p[0] == '-' || p[0] == '+')
- {
- ERROR_MSG("Invalid label: %s (labels cannot begin with !, $, -, +, or 0-9)\n",line.gettoken_str(0));
- return PS_ERROR;
- }
- if (add_label(line.gettoken_str(0))) return PS_ERROR;
- line.eattoken();
- goto parse_again;
- }
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- // Added by Ximon Eighteen 5th August 2002
- // We didn't recognise this command, could it be the name of a
- // function exported from a dll?
- if (m_plugins.IsPluginCommand(line.gettoken_str(0)))
- {
- np = 0; // parameters are optional
- op = -1; // unlimited number of optional parameters
- pos = -1; // placement will tested later
- tkid = TOK__PLUGINCOMMAND;
- }
- else
-#endif
- {
- ERROR_MSG("Invalid command: %s\n",line.gettoken_str(0));
- return PS_ERROR;
- }
- }
-
- if (IsTokenPlacedRight(pos, line.gettoken_str(0)) != PS_OK)
- return PS_ERROR;
-
- int v=line.getnumtokens()-(np+1);
- if (v < 0 || (op >= 0 && v > op)) // opt_parms is -1 for unlimited
- {
- ERROR_MSG("%s expects %d",line.gettoken_str(0),np);
- if (op < 0) ERROR_MSG("+");
- if (op > 0) ERROR_MSG("-%d",op+np);
- ERROR_MSG(" parameters, got %d.\n",line.getnumtokens()-1);
- PRINTHELP()
- }
-
- int if_from_else = 0;
-
- if (tkid == TOK_P_ELSE)
- {
- if (cur_ifblock && cur_ifblock->inherited_ignore)
- return PS_OK;
-
- if (!num_ifblock())
- {
- ERROR_MSG("!else: no if block open (!if[macro][n][def])\n");
- return PS_ERROR;
- }
-
- if (cur_ifblock->elseused)
- {
- ERROR_MSG("!else: else already used in current if block\n");
- return PS_ERROR;
- }
-
- if (cur_ifblock->hasexeced)
- {
- cur_ifblock->ignore++;
- return PS_OK;
- }
-
- if (line.getnumtokens() == 1)
- {
- cur_ifblock->ignore = !cur_ifblock->ignore;
- // if not executed up until now, it will now
- cur_ifblock->hasexeced++;
- cur_ifblock->elseused++;
- return PS_OK;
- }
-
- line.eattoken();
-
- int v=line.gettoken_enum(0,"if\0ifdef\0ifndef\0ifmacrodef\0ifmacrondef\0");
- if (v < 0) PRINTHELP()
- if (line.getnumtokens() == 1) PRINTHELP()
- int cmds[] = {TOK_P_IF, TOK_P_IFDEF, TOK_P_IFNDEF, TOK_P_IFMACRODEF, TOK_P_IFMACRONDEF};
- tkid = cmds[v];
- if_from_else++;
- }
-
- if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFDEF ||
- tkid == TOK_P_IFMACRODEF || tkid == TOK_P_IFMACRONDEF ||
- tkid == TOK_P_IF)
- {
- if (!if_from_else)
- start_ifblock();
-
- if (cur_ifblock && cur_ifblock->inherited_ignore)
- {
- return PS_OK;
- }
-
- int istrue=0;
-
- int mod=0;
-
- int p=0;
-
- if (tkid == TOK_P_IF) {
- if(!strcmp(line.gettoken_str(1),"!")) {
- p = 1;
- line.eattoken();
- }
-
- if(line.getnumtokens() == 2)
- istrue = line.gettoken_int(1);
-
- else if (line.getnumtokens() == 4) {
- mod = line.gettoken_enum(2,"=\0==\0!=\0<=\0<\0>\0>=\0&\0&&\0|\0||\0");
-
- switch(mod) {
- case 0:
- case 1:
- istrue = stricmp(line.gettoken_str(1),line.gettoken_str(3)) == 0; break;
- case 2:
- istrue = stricmp(line.gettoken_str(1),line.gettoken_str(3)) != 0; break;
- case 3:
- istrue = line.gettoken_float(1) <= line.gettoken_float(3); break;
- case 4:
- istrue = line.gettoken_float(1) < line.gettoken_float(3); break;
- case 5:
- istrue = line.gettoken_float(1) > line.gettoken_float(3); break;
- case 6:
- istrue = line.gettoken_float(1) >= line.gettoken_float(3); break;
- case 7:
- case 8:
- istrue = line.gettoken_int(1) && line.gettoken_int(3); break;
- case 9:
- case 10:
- istrue = line.gettoken_int(1) || line.gettoken_int(3); break;
- default:
- PRINTHELP()
- }
- }
- else PRINTHELP()
-
- if(p) istrue = !istrue;
- }
-
- else {
-
- // pure left to right precedence. Not too powerful, but useful.
- for (p = 1; p < line.getnumtokens(); p ++)
- {
- if (p & 1)
- {
- int new_s;
- if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFDEF)
- new_s=!!definedlist.find(line.gettoken_str(p));
- else
- new_s=MacroExists(line.gettoken_str(p));
- if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFMACRONDEF)
- new_s=!new_s;
-
- if (mod == 0) istrue = istrue || new_s;
- else istrue = istrue && new_s;
- }
- else
- {
- mod=line.gettoken_enum(p,"|\0&\0||\0&&\0");
- if (mod == -1) PRINTHELP()
- mod &= 1;
- }
- }
- }
-
- if (istrue)
- {
- cur_ifblock->hasexeced++;
- cur_ifblock->ignore = 0;
- }
- else
- cur_ifblock->ignore++;
-
- return PS_OK;
- }
- if (tkid == TOK_P_ENDIF) {
- if (!num_ifblock())
- {
- ERROR_MSG("!endif: no if block open (!if[macro][n][def])\n");
- return PS_ERROR;
- }
- end_ifblock();
- return PS_OK;
- }
- if (!cur_ifblock || (!cur_ifblock->ignore && !cur_ifblock->inherited_ignore))
- {
- return doCommand(tkid,line);
- }
-
- return PS_OK;
-}
-
-// Func size: about 140 lines (orip)
-#ifdef NSIS_FIX_DEFINES_IN_STRINGS
-void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist, bool bIgnoreDefines /*= false*/)
-#else
-void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist)
-#endif
-{
- // convert $\r, $\n to their literals
- // preprocessor replace ${VAR} and $%VAR% with whatever value
- // note that if VAR does not exist, ${VAR} or $%VAR% will go through unmodified
- const char *in=str;
- while (*in)
- {
- int add=1;
- char *t;
- char c=*in;
- t=CharNext(in);
-
- if (t-in > 1) // handle multibyte chars (no escape)
- {
- linedata.add((void*)in,t-in);
- in=t;
- continue;
- }
- in=t;
-
- if (c == '$')
- {
- if (in[0] == '\\')
- {
- if (in[1] == 'r')
- {
- in+=2;
- c='\r';
- }
- else if (in[1] == 'n')
- {
- in+=2;
- c='\n';
- }
- else if (in[1] == 't')
- {
- in+=2;
- c='\t';
- }
- }
- else if (in[0] == '{')
- {
- char *s=strdup(in+1);
- MANAGE_WITH(s, free);
- char *t=s;
- unsigned int bn = 0;
- while (*t)
- {
- if (*t == '{') bn++;
- if (*t == '}' && bn-- == 0) break;
- t=CharNext(t);
- }
- if (*t && t!=s
-#ifdef NSIS_FIX_DEFINES_IN_STRINGS
- && !bIgnoreDefines
-#endif
- )
- {
- *t=0;
- // check for defines inside the define name - ${bla${blo}}
- GrowBuf defname;
- ps_addtoline(s,defname,hist);
- defname.add("",1);
- t=definedlist.find((char*)defname.get());
- if (t && hist.find((char*)defname.get(),0)<0)
- {
- in+=strlen(s)+2;
- add=0;
- hist.add((char*)defname.get(),0);
-#ifdef NSIS_FIX_DEFINES_IN_STRINGS
- ps_addtoline(t,linedata,hist,true);
-#else
- ps_addtoline(t,linedata,hist);
-#endif
- hist.delbypos(hist.find((char*)defname.get(),0));
- }
- }
- }
- else if (in[0] == '%')
- {
- char *s=strdup(in+1);
- MANAGE_WITH(s, free);
- char *t=s;
- while (*t)
- {
- if (*t == '%') break;
- t=CharNext(t);
- }
- if (*t && t!=s)
- {
- *t=0;
- // check for defines inside the define name - ${bla${blo}}
- GrowBuf defname;
- ps_addtoline(s,defname,hist);
- defname.add("",1);
- t=getenv((char*)defname.get());
- if (t && hist.find((char*)defname.get(),0)<0)
- {
- in+=strlen(s)+2;
- add=0;
- hist.add((char*)defname.get(),0);
-#ifdef NSIS_FIX_DEFINES_IN_STRINGS
- ps_addtoline(t,linedata,hist,true);
-#else
- ps_addtoline(t,linedata,hist);
-#endif
- hist.delbypos(hist.find((char*)defname.get(),0));
- }
- }
- }
-#ifdef NSIS_FIX_DEFINES_IN_STRINGS
- else if (in[0] == '$')
- {
- if (in[1] == '{') // Found $$ before - Don't replace this define
- {
- char *s=strdup(in+2);
- MANAGE_WITH(s, free);
- char *t=s;
- unsigned int bn = 0;
- while (*t)
- {
- if (*t == '{') bn++;
- if (*t == '}' && bn-- == 0) break;
- t=CharNext(t);
- }
- if (*t && t!=s)
- {
- *t=0;
- // add text unchanged
- GrowBuf defname;
- ps_addtoline(s,defname,hist);
- in++;
- }
- }
- else
- {
- linedata.add((void*)&c,1);
- in++;
- }
- }
-#endif
- }
- if (add) linedata.add((void*)&c,1);
- }
-}
-
-int CEXEBuild::parseScript()
-{
- char str[MAX_LINELENGTH];
-
- for (;;)
- {
- char *p=str;
- *p=0;
- fgets(str,MAX_LINELENGTH,fp);
- linecnt++;
- if (feof(fp)&&!str[0]) break;
-
- // remove trailing whitespace
- while (*p) p++;
- if (p > str) p--;
- while (p >= str && (*p == '\r' || *p == '\n' || *p == ' ' || *p == '\t')) p--;
- *++p=0;
-
- StringList hist;
- GrowBuf linedata;
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- char *oldline = set_line_predefine(linecnt, FALSE);
-#endif
-
- ps_addtoline(str,linedata,hist);
- linedata.add((void*)"",1);
- int ret=doParse((char*)linedata.get());
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- restore_line_predefine(oldline);
-#endif
-
- if (ret != PS_OK) return ret;
- }
-
- return PS_EOF;
-}
-
-int CEXEBuild::includeScript(char *f)
-{
- SCRIPT_MSG("!include: \"%s\"\n",f);
- FILE *incfp=FOPEN(f,"rt");
- if (!incfp)
- {
- ERROR_MSG("!include: could not open file: \"%s\"\n",f);
- return PS_ERROR;
- }
-
- // auto-fclose(3) incfp
- MANAGE_WITH(incfp, fclose);
-
- if (build_include_depth >= MAX_INCLUDEDEPTH)
- {
- ERROR_MSG("parseScript: too many levels of includes (%d max).\n",MAX_INCLUDEDEPTH);
- return PS_ERROR;
- }
- build_include_depth++;
-
- int last_linecnt=linecnt;
- linecnt=0;
- char *last_filename=curfilename;
- curfilename=f;
- FILE *last_fp=fp;
- fp=incfp;
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- char *oldfilename = set_file_predefine(curfilename);
- char *oldtimestamp = set_timestamp_predefine(curfilename);
-#endif
-
- int r=parseScript();
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- restore_file_predefine(oldfilename);
- restore_timestamp_predefine(oldtimestamp);
-#endif
-
- int errlinecnt=linecnt;
-
- linecnt=last_linecnt;
- curfilename=last_filename;
- fp=last_fp;
-
- build_include_depth--;
- if (r != PS_EOF && r != PS_OK)
- {
- ERROR_MSG("!include: error in script: \"%s\" on line %d\n",f,errlinecnt);
- return PS_ERROR;
- }
- SCRIPT_MSG("!include: closed: \"%s\"\n",f);
- return PS_OK;
-}
-
-// !ifmacro[n]def based on Anders Kjersem's code
-int CEXEBuild::MacroExists(const char *macroname)
-{
- char *m = (char *) m_macros.get();
-
- while (m && *m)
- {
- // check if macroname matches
- if (!stricmp(m, macroname))
- return 1;
-
- // skip macro name
- m += strlen(m) + 1;
-
- // skip params
- while (*m) m += strlen(m) + 1;
- m++;
-
- // skip data
- while (*m) m += strlen(m) + 1;
- if (m - (char *) m_macros.get() >= m_macros.getlen() - 1) break;
- m++;
- }
- return 0;
-}
-
-int CEXEBuild::process_oneline(char *line, char *filename, int linenum)
-{
- char *last_filename=curfilename;
- curfilename=filename;
- int last_linecnt=linecnt;
- linecnt=linenum;
-
- StringList hist;
- GrowBuf linedata;
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- char *oldfilename = NULL;
- char *oldtimestamp = NULL;
- char *oldline = NULL;
- BOOL is_commandline = !strcmp(filename,"command line");
- BOOL is_macro = !strncmp(filename,"macro:",strlen("macro:"));
-
- if(!is_commandline) { // Don't set the predefines for command line /X option
- if(!is_macro) {
- oldfilename = set_file_predefine(curfilename);
- oldtimestamp = set_timestamp_predefine(curfilename);
- }
- oldline = set_line_predefine(linecnt, is_macro);
- }
-#endif
-
- ps_addtoline(line,linedata,hist);
- linedata.add((void*)"",1);
- int ret=doParse((char*)linedata.get());
-
-#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
- // Added by Sunil Kamath 11 June 2003
- if(!is_commandline) { // Don't set the predefines for command line /X option
- if(!is_macro) {
- restore_file_predefine(oldfilename);
- restore_timestamp_predefine(oldtimestamp);
- }
- restore_line_predefine(oldline);
- }
-#endif
-
- linecnt=last_linecnt;
- curfilename=last_filename;
-
- return ret;
-}
-
-int CEXEBuild::process_jump(LineParser &line, int wt, int *offs)
-{
- const char *s=line.gettoken_str(wt);
- int v;
-
- if (!stricmp(s,"0") || !stricmp(s,"")) *offs=0;
- else if ((v=GetUserVarIndex(line, wt))>=0)
- {
- *offs=-v-1; // to jump to a user variable target, -variable_index-1 is stored.
- }
- else
- {
- if ((s[0] == '-' || s[0] == '+') && !atoi(s+1))
- {
- ERROR_MSG("Error: Goto targets beginning with '+' or '-' must be followed by nonzero integer (relative jump)\n");
- return 1;
- }
- if ((s[0] >= '0' && s[0] <= '9') || s[0] == '$' || s[0] == '!')
- {
- ERROR_MSG("Error: Goto targets cannot begin with 0-9, $, !\n");
- return 1;
- }
- *offs=ns_label.add(s,0);
- }
- return 0;
-}
-
-#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags, flag)/sizeof(int))
-#define SECTION_FIELD_GET(field) (FIELD_OFFSET(section, field)/sizeof(int))
-#define SECTION_FIELD_SET(field) (-1 - (int)(FIELD_OFFSET(section, field)/sizeof(int)))
-
-// Func size: about 5000 lines (orip)
-int CEXEBuild::doCommand(int which_token, LineParser &line)
-{
- static const char *rootkeys[2] = {
- "HKCR\0HKLM\0HKCU\0HKU\0HKCC\0HKDD\0HKPD\0SHCTX\0",
- "HKEY_CLASSES_ROOT\0HKEY_LOCAL_MACHINE\0HKEY_CURRENT_USER\0HKEY_USERS\0HKEY_CURRENT_CONFIG\0HKEY_DYN_DATA\0HKEY_PERFORMANCE_DATA\0SHELL_CONTEXT\0"
- };
- static HKEY rootkey_tab[] = {
- HKEY_CLASSES_ROOT,HKEY_LOCAL_MACHINE,HKEY_CURRENT_USER,HKEY_USERS,HKEY_CURRENT_CONFIG,HKEY_DYN_DATA,HKEY_PERFORMANCE_DATA,0
- };
-
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- build_plugin_table();
-#endif
-
- multiple_entries_instruction=0;
-
- entry ent={0,};
- switch (which_token)
- {
- // macro shit
- ///////////////////////////////////////////////////////////////////////////////
- case TOK_P_MACRO:
- {
- if (!line.gettoken_str(1)[0]) PRINTHELP()
- char *t=(char *)m_macros.get();
- while (t && *t)
- {
- if (!stricmp(t,line.gettoken_str(1))) break;
- t+=strlen(t)+1;
-
- // advance over parameters
- while (*t) t+=strlen(t)+1;
- t++;
-
- // advance over data
- while (*t) t+=strlen(t)+1;
- if (t-(char *)m_macros.get() >= m_macros.getlen()-1)
- break;
- t++;
- }
- if (t && *t)
- {
- ERROR_MSG("!macro: macro named \"%s\" already found!\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- m_macros.add(line.gettoken_str(1),strlen(line.gettoken_str(1))+1);
-
- int pc;
- for (pc=2; pc < line.getnumtokens(); pc ++)
- {
- if (!line.gettoken_str(pc)[0])
- {
- ERROR_MSG("!macro: macro parameter %d is empty, not valid!\n",pc-1);
- return PS_ERROR;
- }
- int a;
- for (a=2; a < pc; a ++)
- {
- if (!stricmp(line.gettoken_str(pc),line.gettoken_str(a)))
- {
- ERROR_MSG("!macro: macro parameter named %s is used multiple times!\n",
- line.gettoken_str(pc));
- return PS_ERROR;
- }
- }
- m_macros.add(line.gettoken_str(pc),strlen(line.gettoken_str(pc))+1);
- }
- m_macros.add("",1);
-
- for (;;)
- {
- char str[MAX_LINELENGTH];
- char *p=str;
- str[0]=0;
- fgets(str,MAX_LINELENGTH,fp);
- //SCRIPT_MSG("%s%s", str, str[strlen(str)-1]=='\n'?"":"\n");
- if (feof(fp) && !str[0])
- {
- ERROR_MSG("!macro \"%s\": unterminated (no !macroend found in file)!\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- // remove trailing whitespace
- while (*p) p++;
- if (p > str) p--;
- while (p >= str && (*p == '\r' || *p == '\n' || *p == ' ' || *p == '\t')) p--;
- *++p=0;
- LineParser l2(false);
- if (!l2.parse(str))
- {
- if (!stricmp(l2.gettoken_str(0),"!macroend"))
- {
- linecnt++;
- break;
- }
- if (!stricmp(l2.gettoken_str(0),"!macro"))
- {
- ERROR_MSG("Error: can't define a macro inside a macro!\n");
- return PS_ERROR;
- }
- }
- if (str[0]) m_macros.add(str,strlen(str)+1);
- else m_macros.add(" ",2);
- linecnt++;
- }
- m_macros.add("",1);
- }
- return PS_OK;
- case TOK_P_MACROEND:
- ERROR_MSG("!macroend: no macro currently open.\n");
- return PS_ERROR;
- case TOK_P_INSERTMACRO:
- {
- if (!line.gettoken_str(1)[0]) PRINTHELP()
- char *t=(char *)m_macros.get();
- char *m=t;
- while (t && *t)
- {
- if (!stricmp(t,line.gettoken_str(1))) break;
- t+=strlen(t)+1;
-
- // advance over parms
- while (*t) t+=strlen(t)+1;
- t++;
-
- // advance over data
- while (*t) t+=strlen(t)+1;
- if (t-(char *)m_macros.get() >= m_macros.getlen()-1)
- break;
- t++;
- }
- SCRIPT_MSG("!insertmacro: %s\n",line.gettoken_str(1));
- if (!t || !*t)
- {
- ERROR_MSG("!insertmacro: macro named \"%s\" not found!\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- t+=strlen(t)+1;
-
-
- GrowBuf l_define_names;
- DefineList l_define_saves;
- int npr=0;
- // advance over parms
- while (*t)
- {
- char *v=definedlist.find(t);
- if (v)
- {
- l_define_saves.add(t,v);
- definedlist.del(t);
- }
- l_define_names.add(t,strlen(t)+1);
- definedlist.add(t,line.gettoken_str(npr+2));
-
- npr++;
- t+=strlen(t)+1;
- }
- l_define_names.add("",1);
- t++;
- if (npr != line.getnumtokens()-2)
- {
- ERROR_MSG("!insertmacro: macro \"%s\" requires %d parameter(s), passed %d!\n",
- line.gettoken_str(1),npr,line.getnumtokens()-2);
- return PS_ERROR;
- }
-
- int lp=0;
- char str[1024];
- if (m_macro_entry.find(line.gettoken_str(1),0)>=0)
- {
- ERROR_MSG("!insertmacro: macro \"%s\" already being inserted!\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- int npos=m_macro_entry.add(line.gettoken_str(1),0);
-
- wsprintf(str,"macro:%s",line.gettoken_str(1));
- while (*t)
- {
- lp++;
- if (strcmp(t," "))
- {
- int ret=process_oneline(t,str,lp);
- if (ret != PS_OK)
- {
- ERROR_MSG("Error in macro %s on macroline %d\n",line.gettoken_str(1),lp);
- return ret;
- }
- }
- {
- // fix t if process_oneline changed m_macros
- char *nm=(char *)m_macros.get();
- if (nm != m)
- {
- t += nm - m;
- m = nm;
- }
- }
- t+=strlen(t)+1;
- }
- m_macro_entry.delbypos(npos);
- {
- char *p=(char*)l_define_names.get();
- while (*p)
- {
- definedlist.del(p);
- char *v;
- if ((v=l_define_saves.find(p))) definedlist.add(p,v);
- p+=strlen(p)+1;
- }
- }
- SCRIPT_MSG("!insertmacro: end of %s\n",line.gettoken_str(1));
- }
- return PS_OK;
-
- // preprocessor files fun
- ///////////////////////////////////////////////////////////////////////////////
-
- case TOK_P_TEMPFILE:
- {
- char *symbol = line.gettoken_str(1);
- char *fpath;
-
-#ifdef _WIN32
- char buf[MAX_PATH], buf2[MAX_PATH];
-
- GetTempPath(MAX_PATH, buf);
- if (!GetTempFileName(buf, "nst", 0, buf2))
- {
- ERROR_MSG("!tempfile: unable to create temporary file.\n");
- return PS_ERROR;
- }
-
- fpath = buf2;
-#else
- char t[] = "/tmp/makensisXXXXXX";
-
- mode_t old_umask = umask(0077);
-
- int fd = mkstemp(t);
- if (fd == -1) {
- ERROR_MSG("!tempfile: unable to create temporary file.\n");
- return PS_ERROR;
- }
- close(fd);
-
- umask(old_umask);
-
- fpath = t;
-#endif
-
- if (definedlist.add(symbol, fpath))
- {
- ERROR_MSG("!tempfile: \"%s\" already defined!\n", symbol);
- return PS_ERROR;
- }
-
- SCRIPT_MSG("!tempfile: \"%s\"=\"%s\"\n", symbol, fpath);
- }
- return PS_OK;
-
- case TOK_P_DELFILE:
- {
- char *file = line.gettoken_str(1);
-#ifndef _WIN32
- file = my_convert(file);
-#endif
- int result = unlink(file);
-#ifndef _WIN32
- my_convert_free(file);
-#endif
- if (result == -1) {
- ERROR_MSG("!delfile: \"%s\" couldn't be deleted.\n", line.gettoken_str(1));
- return PS_ERROR;
- }
-
- SCRIPT_MSG("!delfile: \"%s\"\n", line.gettoken_str(1));
- }
- return PS_OK;
-
- case TOK_P_APPENDFILE:
- {
- char *file = line.gettoken_str(1);
- char *text = line.gettoken_str(2);
-
- FILE *fp = FOPEN(file, "a");
- if (!fp)
- {
- ERROR_MSG("!appendfile: \"%s\" couldn't be opened.\n", file);
- return PS_ERROR;
- }
-
- if (fputs(text, fp) < 0)
- {
- ERROR_MSG("!appendfile: error writing to \"%s\".\n", file);
- return PS_ERROR;
- }
-
- fclose(fp);
-
- SCRIPT_MSG("!appendfile: \"%s\" \"%s\"\n", file, text);
- }
- return PS_OK;
-
- // page ordering shit
- ///////////////////////////////////////////////////////////////////////////////
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- case TOK_UNINSTPAGE:
- set_uninstall_mode(1);
- case TOK_PAGE:
- {
- if (!uninstall_mode) {
- enable_last_page_cancel = 0;
- if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL"))
- enable_last_page_cancel = 1;
- }
- else {
- uenable_last_page_cancel = 0;
- if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL"))
- uenable_last_page_cancel = 1;
- }
-
- int k = line.gettoken_enum(1,"custom\0license\0components\0directory\0instfiles\0uninstConfirm\0");
-
- if (k < 0) PRINTHELP();
-
- if (add_page(k) != PS_OK)
- return PS_ERROR;
-
-#ifndef NSIS_SUPPORT_CODECALLBACKS
- if (!k) {
- ERROR_MSG("Error: custom page specified, NSIS_SUPPORT_CODECALLBACKS not defined.\n");
- return PS_ERROR;
- }
-#endif//!NSIS_SUPPORT_CODECALLBACKS
-
- if (k) {
- // not custom
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- switch (line.getnumtokens() - enable_last_page_cancel) {
- case 6:
- PRINTHELP();
- case 5:
- if (*line.gettoken_str(4))
- cur_page->leavefunc = ns_func.add(line.gettoken_str(4),0);
- case 4:
- if (*line.gettoken_str(3))
- cur_page->showfunc = ns_func.add(line.gettoken_str(3),0);
- case 3:
- if (*line.gettoken_str(2))
- cur_page->prefunc = ns_func.add(line.gettoken_str(2),0);
- }
-#endif//NSIS_SUPPORT_CODECALLBACKS
- }
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- else {
- // a custom page
- switch (line.getnumtokens() - enable_last_page_cancel) {
- case 6:
- PRINTHELP();
- case 5:
- cur_page->caption = add_string(line.gettoken_str(4));
- case 4:
- if (*line.gettoken_str(3))
- cur_page->leavefunc = ns_func.add(line.gettoken_str(3),0);
- case 3:
- if (*line.gettoken_str(2))
- cur_page->prefunc = ns_func.add(line.gettoken_str(2),0);
- break;
- case 2:
- ERROR_MSG("Error: custom page must have a creator function!\n");
- PRINTHELP();
- }
- }
-#endif//NSIS_SUPPORT_CODECALLBACKS
-
- SCRIPT_MSG("%sPage: %s", uninstall_mode?"Uninst":"", line.gettoken_str(1));
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (cur_page->prefunc>=0)
- SCRIPT_MSG(" (%s:%s)", k?"pre":"creator", line.gettoken_str(2));
- if (cur_page->showfunc>=0 && k)
- SCRIPT_MSG(" (show:%s)", line.gettoken_str(3));
- if (cur_page->leavefunc>=0)
- SCRIPT_MSG(" (leave:%s)", line.gettoken_str(4-!k));
- else if (cur_page->caption && !k)
- SCRIPT_MSG(" (caption:%s)", line.gettoken_str(3));
-#endif
- SCRIPT_MSG("\n");
-
- page_end();
-
- if (k == PAGE_INSTFILES) {
- add_page(PAGE_COMPLETED);
- page_end();
- }
-
- set_uninstall_mode(0);
- }
- return PS_OK;
-
- // extended page setting
- case TOK_PAGEEX:
- {
- int k = line.gettoken_enum(1,"custom\0license\0components\0directory\0instfiles\0uninstConfirm\0");
- if (k < 0) {
- k = line.gettoken_enum(1,"un.custom\0un.license\0un.components\0un.directory\0un.instfiles\0un.uninstConfirm\0");
- if (k < 0) PRINTHELP();
- set_uninstall_mode(1);
- }
-
- SCRIPT_MSG("PageEx: %s\n", line.gettoken_str(1));
-
- if (add_page(k) != PS_OK)
- return PS_ERROR;
-
- cur_page->flags |= PF_PAGE_EX;
- }
- return PS_OK;
-
- case TOK_PAGEEXEND:
- {
- SCRIPT_MSG("PageExEnd\n");
-
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- if (cur_page_type == PAGE_CUSTOM && !cur_page->prefunc) {
- ERROR_MSG("Error: custom pages must have a creator function.\n");
- return PS_ERROR;
- }
-#endif
-
- page_end();
-
- if (cur_page_type == PAGE_INSTFILES) {
- add_page(PAGE_COMPLETED);
- page_end();
- }
-
- set_uninstall_mode(0);
- }
- return PS_OK;
- case TOK_PAGECALLBACKS:
-#ifdef NSIS_SUPPORT_CODECALLBACKS
- {
- SCRIPT_MSG("PageCallbacks:");
-
- if (cur_page_type == PAGE_CUSTOM)
- {
- switch (line.getnumtokens())
- {
- case 4:
- {
- PRINTHELP();
- }
- case 3:
- {
- if (*line.gettoken_str(2))
- {
- if (strnicmp(line.gettoken_str(2), "un.", 3))
- {
- if (uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- else
- {
- if (!uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- cur_page->leavefunc = ns_func.add(line.gettoken_str(2),0);
- }
- }
- case 2:
- {
- if (*line.gettoken_str(1))
- {
- if (strnicmp(line.gettoken_str(1), "un.", 3))
- {
- if (uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- else
- {
- if (!uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- cur_page->prefunc = ns_func.add(line.gettoken_str(1),0);
- }
- }
- }
- }
- else
- {
- switch (line.getnumtokens())
- {
- case 4:
- {
- if (*line.gettoken_str(3))
- {
- if (strnicmp(line.gettoken_str(3), "un.", 3))
- {
- if (uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- else
- {
- if (!uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- cur_page->leavefunc = ns_func.add(line.gettoken_str(3),0);
- }
- }
- case 3:
- {
- if (*line.gettoken_str(2))
- {
- if (strnicmp(line.gettoken_str(2), "un.", 3))
- {
- if (uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- else
- {
- if (!uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- cur_page->showfunc = ns_func.add(line.gettoken_str(2),0);
- }
- }
- case 2:
- {
- if (*line.gettoken_str(1))
- {
- if (strnicmp(line.gettoken_str(1), "un.", 3))
- {
- if (uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- else
- {
- if (!uninstall_mode)
- {
- ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
- return PS_ERROR;
- }
- }
- cur_page->prefunc = ns_func.add(line.gettoken_str(1),0);
- }
- }
- }
- }
-
- int custom = cur_page_type == PAGE_CUSTOM ? 1 : 0;
-
- if (cur_page->prefunc>=0)
- SCRIPT_MSG(" %s:%s", !custom?"pre":"creator", line.gettoken_str(1));
- if (cur_page->showfunc>=0 && !custom)
- SCRIPT_MSG(" show:%s", line.gettoken_str(2));
- if (cur_page->leavefunc>=0)
- SCRIPT_MSG(" leave:%s", line.gettoken_str(3-custom));
-
- SCRIPT_MSG("\n");
- }
- return PS_OK;
-#else
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_CODECALLBACKS not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_SUPPORT_CODECALLBACKS
-#else
- case TOK_PAGE:
- case TOK_UNINSTPAGE:
- case TOK_PAGEEX:
- case TOK_PAGEEXEND:
- case TOK_PAGECALLBACKS:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_CONFIG_VISIBLE_SUPPORT
- // header flags
- ///////////////////////////////////////////////////////////////////////////////
- case TOK_LANGSTRING:
- {
- char *name = line.gettoken_str(1);
- LANGID lang = line.gettoken_int(2);
- char *str = line.gettoken_str(3);
- int ret = SetLangString(name, lang, str);
- if (ret == PS_WARNING)
- warning_fl("LangString \"%s\" set multiple times for %d, wasting space", name, lang);
- else if (ret == PS_ERROR) {
- ERROR_MSG("Error: can't set LangString \"%s\"!\n", name);
- return PS_ERROR;
- }
- SCRIPT_MSG("LangString: \"%s\" %d \"%s\"\n", name, lang, str);
- }
- return PS_OK;
- case TOK_LANGSTRINGUP:
- SCRIPT_MSG("Error: LangStringUP is obsolete, there are no more unprocessed strings. Use LangString.\n");
- return PS_ERROR;
- case TOK_LICENSELANGSTRING:
- {
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG))
- {
- warning_fl("LicenseLangString: SilentInstall enabled, wasting space");
- }
-#endif
- char *name = line.gettoken_str(1);
- LANGID lang = line.gettoken_int(2);
- char *file = line.gettoken_str(3);
-
- FILE *fp;
- unsigned int datalen;
- fp=FOPEN(file,"rb");
- if (!fp)
- {
- ERROR_MSG("LicenseLangString: open failed \"%s\"\n",file);
- PRINTHELP()
- }
- MANAGE_WITH(fp, fclose);
- fseek(fp,0,SEEK_END);
- datalen=ftell(fp);
- if (!datalen)
- {
- ERROR_MSG("LicenseLangString: empty license file \"%s\"\n",file);
- return PS_ERROR;
- }
- rewind(fp);
- char *data=(char*)malloc(datalen+2);
- if (!data)
- {
- ERROR_MSG("Internal compiler error #12345: LicenseData malloc(%d) failed.\n", datalen+2);
- return PS_ERROR;
- }
- MANAGE_WITH(data, free);
- char *ldata=data+1;
- if (fread(ldata,1,datalen,fp) != datalen)
- {
- ERROR_MSG("LicenseLangString: can't read file.\n");
- return PS_ERROR;
- }
- ldata[datalen]=0;
- if (!strncmp(ldata,"{\\rtf",sizeof("{\\rtf")-1))
- *data = SF_RTF;
- else
- *data = SF_TEXT;
-
- int ret = SetLangString(name, lang, data);
- if (ret == PS_WARNING)
- warning_fl("LicenseLangString \"%s\" set multiple times for %d, wasting space", name, lang);
- else if (ret == PS_ERROR)
- {
- ERROR_MSG("Error: can't set LicenseLangString \"%s\"!\n", name);
- return PS_ERROR;
- }
-
- SCRIPT_MSG("LicenseLangString: \"%s\" %d \"%s\"\n", name, lang, file);
- }
- return PS_OK;
- case TOK_NAME:
- {
- if (SetInnerString(NLF_NAME,line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- SetInnerString(NLF_NAME_DA,line.gettoken_str(2));
- SCRIPT_MSG("Name: \"%s\"",line.gettoken_str(1));
- if (*line.gettoken_str(2))
- SCRIPT_MSG(" \"%s\"",line.gettoken_str(2));
- SCRIPT_MSG("\n");
- }
- return PS_OK;
- case TOK_CAPTION:
- {
- if (!cur_page)
- {
- if (SetInnerString(NLF_CAPTION,line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- }
- else
- {
- cur_page->caption = add_string(line.gettoken_str(1));
- }
- SCRIPT_MSG("Caption: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_ICON:
- SCRIPT_MSG("Icon: \"%s\"\n",line.gettoken_str(1));
- try {
- init_res_editor();
- replace_icon(res_editor, IDI_ICON2, line.gettoken_str(1));
- }
- catch (exception& err) {
- ERROR_MSG("Error while setting icon to \"%s\": %s\n", line.gettoken_str(1), err.what());
- return PS_ERROR;
- }
- return PS_OK;
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- case TOK_CHECKBITMAP:
- SCRIPT_MSG("CheckBitmap: \"%s\"\n",line.gettoken_str(1));
- try {
- init_res_editor();
- int err = update_bitmap(res_editor, IDB_BITMAP1, line.gettoken_str(1), 96, 16, 8);
- if (err) {
- switch (err) {
- case -1:
- ERROR_MSG("Error: can't find bitmap\n");
- break;
- case -2:
- ERROR_MSG("Error: invalid bitmap file - corrupted or not a bitmap\n");
- break;
- case -3:
- ERROR_MSG("Error: bitmap isn't 96x16 in size\n");
- break;
- case -4:
- ERROR_MSG("Error: bitmap has more than 8bpp\n");
- break;
- }
- return PS_ERROR;
- }
- }
- catch (exception& err) {
- ERROR_MSG("Error while replacing bitmap: %s\n", err.what());
- return PS_ERROR;
- }
- return PS_OK;
-#else//NSIS_CONFIG_COMPONENTPAGE
- case TOK_CHECKBITMAP:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPONENTPAGE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_CONFIG_COMPONENTPAGE
- case TOK_DIRTEXT:
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- {
- if (!cur_page) {
- if (SetInnerString(NLF_DIR_TEXT, line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- if (line.getnumtokens() > 2)
- SetInnerString(NLF_DIR_SUBTEXT, line.gettoken_str(2));
- if (line.getnumtokens() > 3)
- SetInnerString(NLF_BTN_BROWSE, line.gettoken_str(3));
- if (line.getnumtokens() > 4)
- SetInnerString(NLF_DIR_BROWSETEXT, line.gettoken_str(4));
- }
- else {
- if (cur_page_type != PAGE_DIRECTORY) {
- ERROR_MSG("Error: DirText can only be used inside PageEx directory.\n");
- return PS_ERROR;
- }
- cur_page->parms[0] = add_string(line.gettoken_str(1));
- if (line.getnumtokens() > 2)
- cur_page->parms[1] = add_string(line.gettoken_str(2));
- if (line.getnumtokens() > 3)
- cur_page->parms[2] = add_string(line.gettoken_str(3));
- if (line.getnumtokens() > 4)
- cur_page->parms[3] = add_string(line.gettoken_str(4));
- }
- SCRIPT_MSG("DirText: \"%s\" \"%s\" \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- }
- return PS_OK;
-#else//NSIS_CONFIG_VISIBLE_SUPPORT
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_CONFIG_VISIBLE_SUPPORT
- case TOK_DIRVAR:
- {
- if (cur_page_type != PAGE_DIRECTORY && cur_page_type != PAGE_UNINSTCONFIRM) {
- ERROR_MSG("Error: can't use DirVar outside of PageEx directory|uninstConfirm.\n");
- return PS_ERROR;
- }
- cur_page->parms[4] = GetUserVarIndex(line, 1) + 1;
- if (cur_page->parms[4] <= 0) PRINTHELP();
- SCRIPT_MSG("DirVar: %s\n", line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_DIRVERIFY:
- {
- if (cur_page_type != PAGE_DIRECTORY) {
- ERROR_MSG("Error: can't use DirVerify outside of PageEx directory.\n");
- return PS_ERROR;
- }
- cur_page->flags &= ~PF_DIR_NO_BTN_DISABLE;
- int k = line.gettoken_enum(1,"auto\0leave\0");
- if (k == -1)
- PRINTHELP();
- if (k)
- cur_page->flags |= PF_DIR_NO_BTN_DISABLE;
- SCRIPT_MSG("DirVerify: %s\n", line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_GETINSTDIRERROR:
- ent.which = EW_GETFLAG;
- ent.offsets[0] = GetUserVarIndex(line, 1);
- ent.offsets[1] = FLAG_OFFSET(instdir_error);
- return add_entry(&ent);
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- case TOK_COMPTEXT:
- {
- if (!cur_page) {
- if (SetInnerString(NLF_COMP_TEXT, line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- if (line.getnumtokens() > 2)
- SetInnerString(NLF_COMP_SUBTEXT1, line.gettoken_str(2));
- if (line.getnumtokens() > 3)
- SetInnerString(NLF_COMP_SUBTEXT2, line.gettoken_str(3));
- }
- else {
- if (cur_page_type != PAGE_COMPONENTS) {
- ERROR_MSG("Error: ComponentText can only be used inside PageEx components.\n");
- return PS_ERROR;
- }
- cur_page->parms[0] = add_string(line.gettoken_str(1));
- cur_page->parms[1] = add_string(line.gettoken_str(2));
- cur_page->parms[2] = add_string(line.gettoken_str(3));
- cur_page->parms[3] = cur_page->parms[1];
- cur_page->parms[4] = cur_page->parms[2];
- }
- SCRIPT_MSG("ComponentText: \"%s\" \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- }
- return PS_OK;
- case TOK_INSTTYPE:
- {
- int x;
-
- if (!stricmp(line.gettoken_str(1),"/NOCUSTOM"))
- {
- build_header.flags|=CH_FLAGS_NO_CUSTOM;
- SCRIPT_MSG("InstType: disabling custom install type\n");
- }
- else if (!stricmp(line.gettoken_str(1),"/COMPONENTSONLYONCUSTOM"))
- {
- build_header.flags|=CH_FLAGS_COMP_ONLY_ON_CUSTOM;
- SCRIPT_MSG("InstType: making components viewable only on custom install type\n");
- }
- else if (!strnicmp(line.gettoken_str(1),"/CUSTOMSTRING=",14))
- {
- SCRIPT_MSG("InstType: setting custom text to: \"%s\"\n",line.gettoken_str(1)+14);
- if (SetInnerString(NLF_COMP_CUSTOM,line.gettoken_str(1)+14) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space","InstType /CUSTOMSTRING");
- }
- else if (line.gettoken_str(1)[0]=='/')
- {
- PRINTHELP()
- }
- else
- {
- char *itname = line.gettoken_str(1);
-
- if (!strnicmp(itname, "un.", 3)) {
- set_uninstall_mode(1);
- itname += 3;
- }
-
- for (x = 0; x < NSIS_MAX_INST_TYPES && cur_header->install_types[x]; x ++);
- if (x == NSIS_MAX_INST_TYPES)
- {
- ERROR_MSG("InstType: no more than %d install types allowed. %d specified\n", NSIS_MAX_INST_TYPES, NSIS_MAX_INST_TYPES + 1);
- return PS_ERROR;
- }
- else
- {
- cur_header->install_types[x] = add_string(itname);
- SCRIPT_MSG("InstType: %s%d=\"%s\"\n", uninstall_mode ? "(uninstall) " : "", x+1, itname);
- }
-
- set_uninstall_mode(0);
- }
- }
- return PS_OK;
-#else//NSIS_CONFIG_COMPONENTPAGE
- case TOK_COMPTEXT:
- case TOK_INSTTYPE:
- ERROR_MSG("Error: %s specified but NSIS_CONFIG_COMPONENTPAGE not defined\n",line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_CONFIG_COMPONENTPAGE
-#ifdef NSIS_CONFIG_LICENSEPAGE
- case TOK_LICENSETEXT:
- {
- if (!cur_page) {
- if (SetInnerString(NLF_LICENSE_TEXT, line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- SetInnerString(NLF_LICENSE_TEXT_FSRB, line.gettoken_str(1));
- SetInnerString(NLF_LICENSE_TEXT_FSCB, line.gettoken_str(1));
- if (line.getnumtokens() > 2)
- SetInnerString(NLF_BTN_LICENSE, line.gettoken_str(2));
- }
- else {
- if (cur_page_type != PAGE_LICENSE) {
- ERROR_MSG("Error: LicenseText can only be used inside PageEx license.\n");
- return PS_ERROR;
- }
- cur_page->parms[0] = add_string(line.gettoken_str(1));
- cur_page->next = add_string(line.gettoken_str(2));
- }
- SCRIPT_MSG("LicenseText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
- }
- return PS_OK;
- case TOK_LICENSEDATA:
- {
- int idx = 0;
- char *file = line.gettoken_str(1);
- char *data = NULL;
-
- if (file[0] == '$' && file[1] == '(')
- {
- char *cp = strdup(file+2);
- MANAGE_WITH(cp, free);
- char *p = strchr(cp, ')');
- if (p && p[1] == 0) { // if string is only a language str identifier
- *p = 0;
- idx = DefineLangString(cp, 0);
- }
- data = file;
- }
-
- if (!idx)
- {
- unsigned int datalen;
- FILE *fp=FOPEN(file,"rb");
- if (!fp)
- {
- ERROR_MSG("LicenseData: open failed \"%s\"\n",file);
- PRINTHELP()
- }
- MANAGE_WITH(fp, fclose);
- fseek(fp,0,SEEK_END);
- datalen=ftell(fp);
- if (!datalen)
- {
- ERROR_MSG("LicenseData: empty license file \"%s\"\n",file);
- return PS_ERROR;
- }
- rewind(fp);
- data=(char*)malloc(datalen+2);
- if (!data)
- {
- ERROR_MSG("Internal compiler error #12345: LicenseData malloc(%d) failed.\n", datalen+2);
- return PS_ERROR;
- }
- //MANAGE_WITH(data, free);
- char *ldata=data+1;
- if (fread(ldata,1,datalen,fp) != datalen) {
- ERROR_MSG("LicenseData: can't read file.\n");
- free(data); // TODO: fix later (orip)
- return PS_ERROR;
- }
- ldata[datalen]=0;
- if (!strncmp(ldata,"{\\rtf",sizeof("{\\rtf")-1))
- *data = SF_RTF;
- else
- *data = SF_TEXT;
- }
-
- if (!cur_page) {
- if (SetInnerString(NLF_LICENSE_DATA,data) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- }
- else {
- if (cur_page_type != PAGE_LICENSE) {
- ERROR_MSG("Error: LicenseData can only be used inside PageEx license.\n");
- return PS_ERROR;
- }
-
- cur_page->parms[1] = add_string(data, 0);
- }
-
- if (!idx) free(data); // TODO: fix later (orip)
-
- SCRIPT_MSG("LicenseData: \"%s\"\n",file);
- }
- return PS_OK;
- case TOK_LICENSEFORCESELECTION:
- {
- int k=line.gettoken_enum(1,"off\0checkbox\0radiobuttons\0");
- if (k == -1) PRINTHELP()
- if (k < line.getnumtokens() - 2) PRINTHELP()
-
- if (!cur_page) {
- switch (line.getnumtokens()) {
- case 4:
- SetInnerString(NLF_BTN_LICENSE_DISAGREE, line.gettoken_str(3));
- case 3:
- SetInnerString(NLF_BTN_LICENSE_AGREE, line.gettoken_str(2));
- break;
- }
-
- switch (k) {
- case 0:
- license_res_id = IDD_LICENSE;
- break;
- case 1:
- license_res_id = IDD_LICENSE_FSCB;
- break;
- case 2:
- license_res_id = IDD_LICENSE_FSRB;
- break;
- }
- }
- else {
- if (cur_page_type != PAGE_LICENSE) {
- ERROR_MSG("Error: LicenseForceSelection can only be used inside PageEx license.\n");
- return PS_ERROR;
- }
- switch (line.getnumtokens()) {
- case 4:
- cur_page->parms[3] = add_string(line.gettoken_str(3));
- case 3:
- cur_page->parms[2] = add_string(line.gettoken_str(2));
- break;
- }
-
- cur_page->flags &= ~(PF_LICENSE_FORCE_SELECTION | PF_LICENSE_NO_FORCE_SELECTION);
-
- switch (k) {
- case 0:
- cur_page->dlg_id = IDD_LICENSE;
- cur_page->flags |= PF_LICENSE_NO_FORCE_SELECTION;
- break;
- case 1:
- cur_page->dlg_id = IDD_LICENSE_FSCB;
- cur_page->flags |= PF_LICENSE_FORCE_SELECTION;
- break;
- case 2:
- cur_page->dlg_id = IDD_LICENSE_FSRB;
- cur_page->flags |= PF_LICENSE_FORCE_SELECTION;
- break;
- }
- }
-
- SCRIPT_MSG("LicenseForceSelection: %s \"%s\" \"%s\"\n", line.gettoken_str(1), line.gettoken_str(2), line.gettoken_str(3));
- }
- return PS_OK;
- case TOK_LICENSEBKCOLOR:
- {
- char *p = line.gettoken_str(1);
- if (!strcmpi(p,"/windows"))
- {
- build_header.license_bg=-COLOR_WINDOW;
- SCRIPT_MSG("LicenseBkColor: /windows\n");
- }
- else if (!strcmpi(p,"/grey") || !strcmpi(p,"/gray"))
- {
- build_header.license_bg=-COLOR_BTNFACE;
- SCRIPT_MSG("LicenseBkColor: /grey\n");
- }
- else
- {
- int v=strtoul(p,&p,16);
- build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
- build_uninst.license_bg=build_header.license_bg;
- SCRIPT_MSG("LicenseBkColor: %06X\n",v);
- }
- }
- return PS_OK;
-#else//!NSIS_CONFIG_LICENSEPAGE
- case TOK_LICENSETEXT:
- case TOK_LICENSEDATA:
- case TOK_LICENSEBKCOLOR:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_LICENSEPAGE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_CONFIG_LICENSEPAGE
-#ifdef NSIS_CONFIG_SILENT_SUPPORT
- case TOK_SILENTINST:
- {
- int k=line.gettoken_enum(1,"normal\0silent\0silentlog\0");
- if (k<0) PRINTHELP()
-#ifndef NSIS_CONFIG_LOG
- if (k == 2)
- {
- ERROR_MSG("SilentInstall: silentlog specified, no log support compiled in (use NSIS_CONFIG_LOG)\n");
- return PS_ERROR;
- }
-#endif//NSIS_CONFIG_LOG
- SCRIPT_MSG("SilentInstall: %s\n",line.gettoken_str(1));
-#ifdef NSIS_CONFIG_LICENSEPAGE
- if (k && HasUserDefined(NLF_LICENSE_DATA))
- {
- warning_fl("SilentInstall: LicenseData already specified. wasting space");
- }
- if (k) {
- build_header.flags|=CH_FLAGS_SILENT;
- if (k == 2)
- build_header.flags|=CH_FLAGS_SILENT_LOG;
- }
- else {
- build_header.flags&=~CH_FLAGS_SILENT;
- build_header.flags&=~CH_FLAGS_SILENT_LOG;
- }
-#endif//NSIS_CONFIG_LICENSEPAGE
- }
- return PS_OK;
- case TOK_SILENTUNINST:
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- {
- int k=line.gettoken_enum(1,"normal\0silent\0");
- if (k<0) PRINTHELP()
- if (k)
- build_uninst.flags|=CH_FLAGS_SILENT;
- else
- build_uninst.flags&=~CH_FLAGS_SILENT;
- SCRIPT_MSG("SilentUnInstall: %s\n",line.gettoken_str(1));
- }
- return PS_OK;
-#else
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif
- case TOK_IFSILENT:
- ent.which=EW_IFFLAG;
- if (process_jump(line,1,&ent.offsets[0]) ||
- process_jump(line,2,&ent.offsets[1])) PRINTHELP()
- ent.offsets[2]=FLAG_OFFSET(silent);
- ent.offsets[3]=~0;//new value mask - keep flag
- SCRIPT_MSG("IfSilent ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SETSILENT:
- {
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(silent);
- int k=line.gettoken_enum(1,"normal\0silent\0");
- if (k<0) PRINTHELP()
- ent.offsets[1]=add_intstring(k);
- SCRIPT_MSG("SetSilent: %s\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
-#else//!NSIS_CONFIG_SILENT_SUPPORT
- case TOK_SILENTINST:
- case TOK_SILENTUNINST:
- case TOK_IFSILENT:
- case TOK_SETSILENT:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_SILENT_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_CONFIG_SILENT_SUPPORT
- case TOK_OUTFILE:
- strncpy(build_output_filename,line.gettoken_str(1),1024-1);
- SCRIPT_MSG("OutFile: \"%s\"\n",build_output_filename);
- return PS_OK;
- case TOK_INSTDIR:
- {
- char *p = line.gettoken_str(1);
- if (build_header.install_directory_ptr)
- {
- warning_fl("%s: specified multiple times. wasting space",line.gettoken_str(0));
- }
- build_header.install_directory_ptr = add_string(p);
- build_header.install_directory_auto_append = 0;
- char *p2 = p + strlen(p);
- if (*p && *CharPrev(p, p2) != '\\')
- {
- // we risk hitting $\r or something like $(bla\ad) or ${bla\ad} here, but it's better
- // than hitting backslashes in processed strings
- while (p2 > p && *p2 != '\\')
- p2 = CharPrev(p, p2);
- if (*p2 == '\\')
- {
- build_header.install_directory_auto_append = add_string(p2 + 1);
- }
- }
- SCRIPT_MSG("InstallDir: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_INSTALLDIRREGKEY: // InstallDirRegKey
- {
- if (build_header.install_reg_key_ptr)
- {
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- }
- int k=line.gettoken_enum(1,rootkeys[0]);
- if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
- if (k == -1) PRINTHELP()
- build_header.install_reg_rootkey=(int)rootkey_tab[k];
- if (!build_header.install_reg_rootkey) PRINTHELP() // SHCTX is invalid here
- build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0);
- if (line.gettoken_str(2)[0] == '\\')
- warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
- build_header.install_reg_value_ptr = add_string(line.gettoken_str(3),0);
- SCRIPT_MSG("InstallRegKey: \"%s\\%s\\%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- }
- return PS_OK;
- case TOK_CRCCHECK:
- build_crcchk=line.gettoken_enum(1,"off\0on\0force\0");
- if (build_crcchk==-1) PRINTHELP()
- SCRIPT_MSG("CRCCheck: %s\n",line.gettoken_str(1));
- return PS_OK;
- case TOK_INSTPROGRESSFLAGS:
- {
- int x;
- int smooth=0;
- build_header.flags&=~CH_FLAGS_PROGRESS_COLORED;
- for (x = 1; x < line.getnumtokens(); x ++)
- {
- if (!stricmp(line.gettoken_str(x),"smooth")) smooth=1;
- else if (!stricmp(line.gettoken_str(x),"colored")) build_header.flags|=CH_FLAGS_PROGRESS_COLORED;
- else PRINTHELP()
- }
- try {
- init_res_editor();
-
- BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INSTFILES), NSIS_DEFAULT_LANG);
- if (!dlg) throw runtime_error("IDD_INSTFILES doesn't exist!");
- CDialogTemplate dt(dlg,uDefCodePage);
- free(dlg);
- DialogItemTemplate* progress = dt.GetItem(IDC_PROGRESS);
- if (!progress) {
- throw runtime_error("IDC_PROGRESS doesn't exist!");
- }
-
- if (smooth)
- progress->dwStyle |= PBS_SMOOTH;
- else
- progress->dwStyle &= ~PBS_SMOOTH;
-
- DWORD dwSize;
- dlg = dt.Save(dwSize);
- res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INSTFILES), NSIS_DEFAULT_LANG, dlg, dwSize);
- delete [] dlg;
- }
- catch (exception& err) {
- ERROR_MSG("Error setting smooth progress bar: %s\n", err.what());
- return PS_ERROR;
- }
- SCRIPT_MSG("InstProgressFlags: smooth=%d, colored=%d\n",smooth,
- !!(build_header.flags&CH_FLAGS_PROGRESS_COLORED));
- }
- return PS_OK;
- case TOK_AUTOCLOSE:
- {
- int k=line.gettoken_enum(1,"false\0true\0");
- if (k == -1) PRINTHELP();
- if (k)
- build_header.flags|=CH_FLAGS_AUTO_CLOSE;
- else
- build_header.flags&=~CH_FLAGS_AUTO_CLOSE;
- SCRIPT_MSG("AutoCloseWindow: %s\n",k?"true":"false");
- }
- return PS_OK;
- case TOK_WINDOWICON:
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- disable_window_icon=line.gettoken_enum(1,"on\0off\0");
- if (disable_window_icon == -1) PRINTHELP();
- SCRIPT_MSG("WindowIcon: %s\n",line.gettoken_str(1));
- return PS_OK;
-#else
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n",line.gettoken_str(0));
- return PS_ERROR;
-#endif // NSIS_CONFIG_VISIBLE_SUPPORT
- case TOK_SHOWDETAILSUNINST:
-#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
- ERROR_MSG("Error: ShowUninstDetails specified but NSIS_CONFIG_UNINSTALL_SUPPORT not defined\n");
- return PS_ERROR;
-#endif
- case TOK_SHOWDETAILS:
- {
- int k=line.gettoken_enum(1,"hide\0show\0nevershow\0");
- if (k == -1) PRINTHELP()
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (which_token == TOK_SHOWDETAILSUNINST)
- {
- build_uninst.flags&=~(CH_FLAGS_DETAILS_NEVERSHOW|CH_FLAGS_DETAILS_SHOWDETAILS);
- if (k==1)
- build_uninst.flags|=CH_FLAGS_DETAILS_SHOWDETAILS;
- else if (k==2)
- build_uninst.flags|=CH_FLAGS_DETAILS_NEVERSHOW;
- }
- else
-#endif
- {
- build_header.flags&=~(CH_FLAGS_DETAILS_NEVERSHOW|CH_FLAGS_DETAILS_SHOWDETAILS);
- if (k==1)
- build_header.flags|=CH_FLAGS_DETAILS_SHOWDETAILS;
- else if (k==2)
- build_header.flags|=CH_FLAGS_DETAILS_NEVERSHOW;
- }
- SCRIPT_MSG("%s: %s\n",line.gettoken_str(0),line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_DIRSHOW:
- /*{
- int k=line.gettoken_enum(1,"show\0hide\0");
- if (k == -1) PRINTHELP();
- if (k)
- build_header.flags|=CH_FLAGS_DIR_NO_SHOW;
- else
- build_header.flags&=~CH_FLAGS_DIR_NO_SHOW;
- SCRIPT_MSG("DirShow: %s\n",k?"hide":"show");
- }*/
- ERROR_MSG("Error: DirShow doesn't currently work\n");
- return PS_ERROR;
- case TOK_ROOTDIRINST:
- {
- int k=line.gettoken_enum(1,"true\0false\0");
- if (k == -1) PRINTHELP();
- if (k)
- build_header.flags|=CH_FLAGS_NO_ROOT_DIR;
- else
- build_header.flags&=~CH_FLAGS_NO_ROOT_DIR;
- SCRIPT_MSG("AllowRootDirInstall: %s\n",k?"false":"true");
- }
- return PS_OK;
- case TOK_BGFONT:
-#ifndef NSIS_SUPPORT_BGBG
- ERROR_MSG("Error: BGFont specified but NSIS_SUPPORT_BGBG not defined\n");
- return PS_ERROR;
-#else//NSIS_SUPPORT_BGBG
- if (line.getnumtokens()==1)
- {
- memcpy(&bg_font,&bg_default_font,sizeof(LOGFONT));
- SCRIPT_MSG("BGFont: default font\n");
- return PS_OK;
- }
-
- LOGFONT newfont;
- newfont.lfHeight=40;
- newfont.lfWidth=0;
- newfont.lfEscapement=0;
- newfont.lfOrientation=0;
- newfont.lfWeight=FW_NORMAL;
- newfont.lfItalic=FALSE;
- newfont.lfUnderline=FALSE;
- newfont.lfStrikeOut=FALSE;
- newfont.lfCharSet=DEFAULT_CHARSET;
- newfont.lfOutPrecision=OUT_DEFAULT_PRECIS;
- newfont.lfClipPrecision=CLIP_DEFAULT_PRECIS;
- newfont.lfQuality=DEFAULT_QUALITY;
- newfont.lfPitchAndFamily=DEFAULT_PITCH;
-
- strncpy(newfont.lfFaceName,line.gettoken_str(1),LF_FACESIZE);
-
- SCRIPT_MSG("BGFont: \"%s\"",line.gettoken_str(1));
- {
- bool height=false;
- bool weight=false;
- for (int i = 2; i < line.getnumtokens(); i++) {
- char *tok=line.gettoken_str(i);
- if (tok[0]=='/') {
- if (!strcmpi(tok,"/ITALIC")) {
- SCRIPT_MSG(" /ITALIC");
- newfont.lfItalic=TRUE;
- }
- else if (!strcmpi(tok,"/UNDERLINE")) {
- SCRIPT_MSG(" /UNDERLINE");
- newfont.lfUnderline=TRUE;
- }
- else if (!strcmpi(tok,"/STRIKE")) {
- SCRIPT_MSG(" /STRIKE");
- newfont.lfStrikeOut=TRUE;
- }
- else {
- SCRIPT_MSG("\n");
- PRINTHELP();
- }
- }
- else {
- if (!height) {
- SCRIPT_MSG(" height=%s",tok);
- newfont.lfHeight=line.gettoken_int(i);
- height=true;
- }
- else if (!weight) {
- SCRIPT_MSG(" weight=%s",tok);
- newfont.lfWeight=line.gettoken_int(i);
- weight=true;
- }
- else {
- SCRIPT_MSG("\n");
- PRINTHELP();
- }
- }
- }
- }
- SCRIPT_MSG("\n");
- memcpy(&bg_font, &newfont, sizeof(LOGFONT));
- return PS_OK;
-#endif//NSIS_SUPPORT_BGBG
- case TOK_BGGRADIENT:
-#ifndef NSIS_SUPPORT_BGBG
- ERROR_MSG("Error: BGGradient specified but NSIS_SUPPORT_BGBG not defined\n");
- return PS_ERROR;
-#else//NSIS_SUPPORT_BGBG
- if (line.getnumtokens()==1)
- {
- SCRIPT_MSG("BGGradient: default colors\n");
- build_header.bg_color1=0;
- build_header.bg_color2=RGB(0,0,255);
- }
- else if (!stricmp(line.gettoken_str(1),"off"))
- {
- build_header.bg_color1=build_header.bg_color2=build_header.bg_textcolor=-1;
- SCRIPT_MSG("BGGradient: off\n");
- if (line.getnumtokens()>2) PRINTHELP()
- }
- else
- {
- char *p = line.gettoken_str(1);
- int v1,v2,v3=-1;
- v1=strtoul(p,&p,16);
- build_header.bg_color1=((v1&0xff)<<16)|(v1&0xff00)|((v1&0xff0000)>>16);
- p=line.gettoken_str(2);
- v2=strtoul(p,&p,16);
- build_header.bg_color2=((v2&0xff)<<16)|(v2&0xff00)|((v2&0xff0000)>>16);
-
- p=line.gettoken_str(3);
- if (*p)
- {
- if (!stricmp(p,"notext")) build_header.bg_textcolor=-1;
- else
- {
- v3=strtoul(p,&p,16);
- build_header.bg_textcolor=((v3&0xff)<<16)|(v3&0xff00)|((v3&0xff0000)>>16);
- }
- }
-
- SCRIPT_MSG("BGGradient: 0x%06X->0x%06X (text=0x%06X)\n",v1,v2,v3);
- }
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- build_uninst.bg_color1=build_header.bg_color1;
- build_uninst.bg_color2=build_header.bg_color2;
- build_uninst.bg_textcolor=build_header.bg_textcolor;
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-#endif//NSIS_SUPPORT_BGBG
- return PS_OK;
-#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
- case TOK_INSTCOLORS:
- {
- char *p = line.gettoken_str(1);
- if (p[0]=='/')
- {
- if (stricmp(p,"/windows") || line.getnumtokens()!=2) PRINTHELP()
- build_header.lb_fg=build_header.lb_bg=-1;
- SCRIPT_MSG("InstallColors: windows default colors\n");
- }
- else
- {
- int v1,v2;
- if (line.getnumtokens()!=3) PRINTHELP()
- v1=strtoul(p,&p,16);
- build_header.lb_fg=((v1&0xff)<<16)|(v1&0xff00)|((v1&0xff0000)>>16);
- p=line.gettoken_str(2);
- v2=strtoul(p,&p,16);
- build_header.lb_bg=((v2&0xff)<<16)|(v2&0xff00)|((v2&0xff0000)>>16);
- SCRIPT_MSG("InstallColors: fg=%06X bg=%06X\n",v1,v2);
- }
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- build_uninst.lb_fg=build_header.lb_fg;
- build_uninst.lb_bg=build_header.lb_bg;
-#endif
- }
- return PS_OK;
- case TOK_XPSTYLE:
- {
- int k=line.gettoken_enum(1,"on\0off\0");
- if (k == -1) PRINTHELP()
- SCRIPT_MSG("XPStyle: %s\n", line.gettoken_str(1));
- if (!k)
- manifest_comctl = manifest::comctl_xp;
- else
- manifest_comctl = manifest::comctl_old;
- }
- return PS_OK;
- case TOK_CHANGEUI:
- try {
- DWORD dwSize;
- int k=line.gettoken_enum(1, "all\0IDD_LICENSE\0IDD_DIR\0IDD_SELCOM\0IDD_INST\0IDD_INSTFILES\0IDD_UNINST\0IDD_VERIFY\0IDD_LICENSE_FSRB\0IDD_LICENSE_FSCB\0");
- if (k<0) PRINTHELP();
-
- FILE *fui = FOPEN(line.gettoken_str(2), "rb");
- if (!fui) {
- ERROR_MSG("Error: Can't open \"%s\"!\n", line.gettoken_str(2));
- return PS_ERROR;
- }
- MANAGE_WITH(fui, fclose);
-
- fseek(fui, 0, SEEK_END);
- unsigned int len = ftell(fui);
- fseek(fui, 0, SEEK_SET);
- LPBYTE ui = (LPBYTE) malloc(len);
- if (!ui) {
- ERROR_MSG("Internal compiler error #12345: malloc(%d) failed\n", len);
- extern void quit(); quit();
- }
- MANAGE_WITH(ui, free);
- if (fread(ui, 1, len, fui) != len) {
- ERROR_MSG("Error: Can't read \"%s\"!\n", line.gettoken_str(2));
- return PS_ERROR;
- }
-
- CResourceEditor *uire = new CResourceEditor(ui, len);
-
- init_res_editor();
-
- // Search for required items
- #define GET(x) dlg = uire->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(x), 0); if (!dlg) return PS_ERROR; CDialogTemplate UIDlg(dlg, uDefCodePage);
- #define SEARCH(x) if (!UIDlg.GetItem(x)) {ERROR_MSG("Error: Can't find %s (%u) in the custom UI!\n", #x, x);delete [] dlg;delete uire;return PS_ERROR;}
- #define SAVE(x) dwSize = UIDlg.GetSize(); res_editor->UpdateResourceA(RT_DIALOG, x, NSIS_DEFAULT_LANG, dlg, dwSize); delete [] dlg;
-
- LPBYTE dlg = NULL;
-
- if (k == 0 || k == 1) {
- GET(IDD_LICENSE);
- SEARCH(IDC_EDIT1);
- SAVE(IDD_LICENSE);
- }
-
- if (k == 0 || k == 2) {
- GET(IDD_DIR);
- SEARCH(IDC_DIR);
- SEARCH(IDC_BROWSE);
-#ifdef NSIS_CONFIG_LOG
- SEARCH(IDC_CHECK1);
-#endif
- SAVE(IDD_DIR);
- }
-
- if (k == 0 || k == 3) {
- GET(IDD_SELCOM);
- SEARCH(IDC_TREE1);
- SEARCH(IDC_COMBO1);
- SAVE(IDD_SELCOM);
- }
-
- if (k == 0 || k == 4) {
- GET(IDD_INST);
- SEARCH(IDC_BACK);
- SEARCH(IDC_CHILDRECT);
- SEARCH(IDC_VERSTR);
- SEARCH(IDOK);
- SEARCH(IDCANCEL);
-
- // Search for bitmap holder (default for SetBrandingImage)
- branding_image_found = false;
- DialogItemTemplate* dlgItem = 0;
- for (int i = 0; (dlgItem = UIDlg.GetItemByIdx(i)); i++) {
- bool check = false;
-
- if (IS_INTRESOURCE(dlgItem->szClass)) {
- if (dlgItem->szClass == MAKEINTRESOURCEW(0x0082)) {
- check = true;
- }
- } else {
- char *szClass = winchar_toansi(dlgItem->szClass);
- check = strcmp(szClass, "Static") == 0;
- delete [] szClass;
- }
-
- if (check) {
- if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
- branding_image_found = true;
- branding_image_id = dlgItem->wId;
- break;
- }
- }
- }
-
- SAVE(IDD_INST);
- }
-
- if (k == 0 || k == 5) {
- GET(IDD_INSTFILES);
- SEARCH(IDC_LIST1);
- SEARCH(IDC_PROGRESS);
- SEARCH(IDC_SHOWDETAILS);
- SAVE(IDD_INSTFILES);
- }
-
- if (k == 0 || k == 6) {
- GET(IDD_UNINST);
- SEARCH(IDC_EDIT1);
- SAVE(IDD_UNINST);
- }
-
- if (k == 0 || k == 7) {
- GET(IDD_VERIFY);
- SEARCH(IDC_STR);
- SAVE(IDD_VERIFY);
- }
-
- if (k == 0 || k == 8) {
- GET(IDD_LICENSE_FSRB);
- SEARCH(IDC_EDIT1);
- SEARCH(IDC_LICENSEAGREE);
- SEARCH(IDC_LICENSEDISAGREE);
- SAVE(IDD_LICENSE_FSRB);
- }
-
- if (k == 0 || k == 9) {
- GET(IDD_LICENSE_FSCB);
- SEARCH(IDC_EDIT1);
- SEARCH(IDC_LICENSEAGREE);
- SAVE(IDD_LICENSE_FSCB);
- }
-
- delete uire;
-
- SCRIPT_MSG("ChangeUI: %s %s%s\n", line.gettoken_str(1), line.gettoken_str(2), branding_image_found?" (branding image holder found)":"");
- }
- catch (exception& err) {
- ERROR_MSG("Error while changing UI: %s\n", err.what());
- return PS_ERROR;
- }
- return PS_OK;
- case TOK_ADDBRANDINGIMAGE:
-#ifdef _WIN32
- try {
- int k=line.gettoken_enum(1,"top\0left\0bottom\0right\0");
- int wh=line.gettoken_int(2);
- if (k == -1) PRINTHELP();
- int padding = 2;
- if (line.getnumtokens() == 4)
- padding = line.gettoken_int(3);
-
- init_res_editor();
- BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG);
-
- CDialogTemplate dt(dlg, uDefCodePage);
-
- res_editor->FreeResource(dlg);
-
- DialogItemTemplate brandingCtl = {0,};
-
- brandingCtl.dwStyle = SS_BITMAP | WS_CHILD | WS_VISIBLE;
- brandingCtl.sX = padding;
- brandingCtl.sY = padding;
- brandingCtl.szClass = MAKEINTRESOURCEW(0x0082);
- brandingCtl.szTitle = NULL;
- brandingCtl.wId = IDC_BRANDIMAGE;
-
- brandingCtl.sHeight = wh;
- brandingCtl.sWidth = wh;
- dt.PixelsToDlgUnits(brandingCtl.sWidth, brandingCtl.sHeight);
- if (k%2) {
- // left (1) / right (3)
-
- if (k & 2) // right
- brandingCtl.sX += dt.GetWidth();
- else // left
- dt.MoveAll(brandingCtl.sWidth + (padding * 2), 0);
-
- dt.Resize(brandingCtl.sWidth + (padding * 2), 0);
-
- brandingCtl.sHeight = dt.GetHeight() - (padding * 2);
- }
- else {
- // top (0) / bottom (2)
-
- if (k & 2) // bottom
- brandingCtl.sY += dt.GetHeight();
- else // top
- dt.MoveAll(0, brandingCtl.sHeight + (padding * 2));
-
- dt.Resize(0, brandingCtl.sHeight + (padding * 2));
-
- brandingCtl.sWidth = dt.GetWidth() - (padding * 2);
- }
-
- dt.AddItem(brandingCtl);
-
- DWORD dwDlgSize;
- dlg = dt.Save(dwDlgSize);
-
- res_editor->UpdateResourceA(RT_DIALOG, IDD_INST, NSIS_DEFAULT_LANG, dlg, dwDlgSize);
-
- delete [] dlg;
-
- dt.DlgUnitsToPixels(brandingCtl.sWidth, brandingCtl.sHeight);
- SCRIPT_MSG("AddBrandingImage: %s %ux%u\n", line.gettoken_str(1), brandingCtl.sWidth, brandingCtl.sHeight);
-
- branding_image_found = true;
- branding_image_id = IDC_BRANDIMAGE;
- }
- catch (exception& err) {
- ERROR_MSG("Error while adding image branding support: %s\n", err.what());
- return PS_ERROR;
- }
- return PS_OK;
-#else
- ERROR_MSG("Error: AddBrandingImage is disabled for non Win32 platforms.\n");
- return PS_ERROR;
-#endif
- case TOK_SETFONT:
- {
- if (!strnicmp(line.gettoken_str(1), "/LANG=", 6))
- {
- LANGID lang_id = atoi(line.gettoken_str(1) + 6);
- LanguageTable *table = GetLangTable(lang_id);
- table->nlf.m_szFont = (char*)malloc(strlen(line.gettoken_str(2))+1);
- strcpy(table->nlf.m_szFont, line.gettoken_str(2));
- table->nlf.m_iFontSize = line.gettoken_int(3);
-
- SCRIPT_MSG("SetFont: lang=%d \"%s\" %s\n", lang_id, line.gettoken_str(2), line.gettoken_str(3));
- }
- else
- {
- strncpy(build_font, line.gettoken_str(1), sizeof(build_font));
- build_font_size = line.gettoken_int(2);
-
- SCRIPT_MSG("SetFont: \"%s\" %s\n", line.gettoken_str(1), line.gettoken_str(2));
- }
- }
- return PS_OK;
-#else
- case TOK_INSTCOLORS:
- case TOK_XPSTYLE:
- case TOK_CHANGEUI:
- case TOK_ADDBRANDINGIMAGE:
- case TOK_SETFONT:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n",line.gettoken_str(0));
- return PS_ERROR;
-#endif// NSIS_CONFIG_VISIBLE_SUPPORT
-
- case TOK_REQEXECLEVEL:
- {
- int k=line.gettoken_enum(1,"none\0user\0highest\0admin\0");
- switch (k)
- {
- case 0:
- manifest_exec_level = manifest::exec_level_none;
- break;
- case 1:
- manifest_exec_level = manifest::exec_level_user;
- break;
- case 2:
- manifest_exec_level = manifest::exec_level_highest;
- break;
- case 3:
- manifest_exec_level = manifest::exec_level_admin;
- break;
- default:
- PRINTHELP();
- }
- }
- return PS_OK;
-
- // Ability to change compression methods from within the script
- case TOK_SETCOMPRESSOR:
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- {
- if (build_compressor_set) {
- ERROR_MSG("Error: can't change compressor after data already got compressed or header already changed!\n");
- return PS_ERROR;
- }
-
- if (build_compressor_final)
- {
- warning_fl("SetCompressor ignored due to previous call with the /FINAL switch");
- return PS_OK;
- }
-
- int a = 1;
-
- build_compress_whole = false;
-
- while (line.gettoken_str(a)[0] == '/')
- {
- if (!strcmpi(line.gettoken_str(a),"/FINAL"))
- {
- build_compressor_final = true;
- a++;
- }
- else if (!strcmpi(line.gettoken_str(a),"/SOLID"))
- {
- build_compress_whole = true;
- a++;
- }
- else PRINTHELP();
- }
-
- if (a != line.getnumtokens() - 1)
- {
- ERROR_MSG("%s expects %d parameters, got %d.\n", line.gettoken_str(0), a + 1, line.getnumtokens());
- PRINTHELP();
- }
-
- int k=line.gettoken_enum(a, "zlib\0bzip2\0lzma\0");
- switch (k) {
- case 0:
- compressor = &zlib_compressor;
- break;
-
- case 1:
- compressor = &bzip2_compressor;
- break;
-
- case 2:
- compressor = &lzma_compressor;
- break;
-
- default:
- PRINTHELP();
- }
-
- string compressor_name = line.gettoken_str(a);
- compressor_name = lowercase(compressor_name);
-
- if (set_compressor(compressor_name, build_compress_whole) != PS_OK)
- {
- SCRIPT_MSG("SetCompressor: error loading stub for \"%s\" compressor.\n", compressor_name.c_str());
- return PS_ERROR;
- }
-
- SCRIPT_MSG("SetCompressor: %s%s%s\n", build_compressor_final ? "/FINAL " : "", build_compress_whole ? "/SOLID " : "", line.gettoken_str(a));
- }
- return PS_OK;
-#else//NSIS_CONFIG_COMPRESSION_SUPPORT
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
- case TOK_LOADNLF:
- {
- SCRIPT_MSG("LoadLanguageFile: %s\n", line.gettoken_str(1));
-
- LanguageTable *table = LoadLangFile(line.gettoken_str(1));
-
- if (!table)
- return PS_ERROR;
-
- if (!defcodepage_set)
- {
- uDefCodePage = table->nlf.m_uCodePage;
- defcodepage_set = true;
- }
-
- last_used_lang = table->lang_id;
- // define LANG_LangName as "####" (lang id)
- // for example ${LANG_ENGLISH} = 1033
- char lang_id[16];
- char lang_cp[16];
- char lang_name[1024];
- wsprintf(lang_name, "LANG_%s", table->nlf.m_szName);
- wsprintf(lang_id, "%u", table->lang_id);
- wsprintf(lang_cp, "%u", table->nlf.m_uCodePage);
- definedlist.add(lang_name, lang_id);
- wsprintf(lang_name, "LANG_%s_CP", table->nlf.m_szName);
- definedlist.add(lang_name, lang_cp);
- }
- return PS_OK;
-
- // preprocessor-ish (ifdef/ifndef/else/endif are handled one step out from here)
- ///////////////////////////////////////////////////////////////////////////////
- case TOK_P_DEFINE:
- {
- char *define=line.gettoken_str(1);
- char *value;
- char datebuf[256];
- char mathbuf[256];
-
- if (!stricmp(define,"/date") || !stricmp(define,"/utcdate")) {
- if (line.getnumtokens()!=4) PRINTHELP()
-
- char *date_type = define;
-
- define=line.gettoken_str(2);
- value=line.gettoken_str(3);
-
- time_t rawtime;
- time(&rawtime);
-
- if (!stricmp(date_type,"/utcdate"))
- rawtime = mktime(gmtime(&rawtime));
-
- datebuf[0]=0;
- size_t s=strftime(datebuf,sizeof(datebuf),value,localtime(&rawtime));
-
- if (s == 0)
- datebuf[0]=0;
- else
- datebuf[max(s,sizeof(datebuf)-1)]=0;
-
- value=datebuf;
-
- } else if (!stricmp(define,"/math")) {
-
- int value1;
- int value2;
- char *mathop;
-
- if (line.getnumtokens()!=6) PRINTHELP()
-
- define = line.gettoken_str(2);
- value1 = line.gettoken_int(3);
- mathop = line.gettoken_str(4);
- value2 = line.gettoken_int(5);
- value = mathbuf;
-
- if (!strcmp(mathop,"+")) {
- sprintf(value,"%d",value1+value2);
- } else if (!strcmp(mathop,"-")) {
- sprintf(value,"%d",value1-value2);
- } else if (!strcmp(mathop,"*")) {
- sprintf(value,"%d",value1*value2);
- } else if (!strcmp(mathop,"&")) {
- sprintf(value,"%d",value1&value2);
- } else if (!strcmp(mathop,"|")) {
- sprintf(value,"%d",value1|value2);
- } else if (!strcmp(mathop,"^")) {
- sprintf(value,"%d",value1^value2);
- } else if (!strcmp(mathop,"/")) {
- if (value2==0) {
- ERROR_MSG("!define /math: division by zero! (\"%i / %i\")\n",value1,value2);
- return PS_ERROR;
- }
- sprintf(value,"%d",value1/value2);
- } else if (!strcmp(mathop,"%")) {
- if (value2==0) {
- ERROR_MSG("!define /math: division by zero! (\"%i %% %i\")\n",value1,value2);
- return PS_ERROR;
- }
- sprintf(value,"%d",value1%value2);
- } else PRINTHELP()
-
- } else {
- if (line.getnumtokens()==4) PRINTHELP()
-
- value=line.gettoken_str(2);
- }
-
- if (definedlist.add(define,value))
- {
- ERROR_MSG("!define: \"%s\" already defined!\n",define);
- return PS_ERROR;
- }
- SCRIPT_MSG("!define: \"%s\"=\"%s\"\n",define,value);
- }
- return PS_OK;
- case TOK_P_UNDEF:
- if (definedlist.del(line.gettoken_str(1)))
- {
- ERROR_MSG("!undef: \"%s\" not defined!\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- SCRIPT_MSG("!undef: \"%s\"\n",line.gettoken_str(1));
- return PS_OK;
- case TOK_P_PACKEXEHEADER:
- strncpy(build_packname,line.gettoken_str(1),sizeof(build_packname)-1);
- strncpy(build_packcmd,line.gettoken_str(2),sizeof(build_packcmd)-1);
- SCRIPT_MSG("!packhdr: filename=\"%s\", command=\"%s\"\n",
- build_packname, build_packcmd);
- return PS_OK;
- case TOK_P_SYSTEMEXEC:
- {
- char *exec=line.gettoken_str(1);
- int comp=line.gettoken_enum(2,"<\0>\0<>\0=\0ignore\0");
- if (line.getnumtokens() == 2) comp = 4;
- if (comp == -1 && line.getnumtokens() == 3) comp=4;
- if (comp == -1) PRINTHELP()
- int success=0;
- int cmpv=line.gettoken_int(3,&success);
- if (!success && comp != 4) PRINTHELP()
- SCRIPT_MSG("!system: \"%s\"\n",exec);
-#ifdef _WIN32
- int ret=sane_system(exec);
-#else
- char *execfixed = my_convert(exec);
- int ret=system(execfixed);
- my_convert_free(execfixed);
-#endif
- if (comp == 0 && ret < cmpv);
- else if (comp == 1 && ret > cmpv);
- else if (comp == 2 && ret != cmpv);
- else if (comp == 3 && ret == cmpv);
- else if (comp == 4);
- else
- {
- ERROR_MSG("!system: returned %d, aborting\n",ret);
- return PS_ERROR;
- }
- SCRIPT_MSG("!system: returned %d\n",ret);
- }
- return PS_OK;
- case TOK_P_EXECUTE:
- {
- char *exec=line.gettoken_str(1);
-#ifdef _WIN32
- PROCESS_INFORMATION pi;
- STARTUPINFO si={sizeof(STARTUPINFO),};
- if (CreateProcess(NULL,exec,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
- {
- WaitForSingleObject(pi.hProcess,INFINITE);
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
- }
-#else
- char *execfixed = my_convert(exec);
- system(execfixed);
- my_convert_free(execfixed);
-#endif
- SCRIPT_MSG("!execute: \"%s\"\n",exec);
- }
- case TOK_P_ADDINCLUDEDIR:
-#ifdef _WIN32
- include_dirs.add(line.gettoken_str(1),0);
-#else
- {
- char *f = line.gettoken_str(1);
- char *fc = my_convert(f);
- include_dirs.add(fc,0);
- my_convert_free(fc);
- }
-#endif
- return PS_OK;
- case TOK_P_INCLUDE:
- {
- bool required = true;
-
- char *f = line.gettoken_str(1);
-
- if(!stricmp(f,"/nonfatal")) {
- if (line.getnumtokens()!=3)
- PRINTHELP();
-
- f = line.gettoken_str(2);
- required = false;
- } else if (line.getnumtokens()!=2) {
- PRINTHELP();
- }
-
-#ifdef _WIN32
- char *fc = f;
-#else
- char *fc = my_convert(f);
-#endif
- int included = 0;
-
- string dir = get_dir_name(fc);
- string spec = get_file_name(fc);
- string basedir = dir + PLATFORM_PATH_SEPARATOR_STR;
- if (dir == spec) {
- // no path, just file name
- dir = ".";
- basedir = "";
- }
-
-#ifndef _WIN32
- my_convert_free(fc);
-#endif
-
- // search working directory
- boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
- dr->read(dir);
-
- for (dir_reader::iterator files_itr = dr->files().begin();
- files_itr != dr->files().end();
- files_itr++)
- {
- if (!dir_reader::matches(*files_itr, spec))
- continue;
-
- string incfile = basedir + *files_itr;
-
- if (includeScript((char *) incfile.c_str()) != PS_OK) {
- return PS_ERROR;
- }
-
- included++;
- }
-
- if (included)
- return PS_OK;
-
- // search include dirs
- char *incdir = include_dirs.get();
- int incdirs = include_dirs.getnum();
-
- for (int i = 0; i < incdirs; i++, incdir += strlen(incdir) + 1) {
- string curincdir = string(incdir) + PLATFORM_PATH_SEPARATOR_STR + dir;
-
- boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
- dr->read(curincdir);
-
- for (dir_reader::iterator incdir_itr = dr->files().begin();
- incdir_itr != dr->files().end();
- incdir_itr++)
- {
- if (!dir_reader::matches(*incdir_itr, spec))
- continue;
-
- string incfile = string(incdir) + PLATFORM_PATH_SEPARATOR_STR + basedir + *incdir_itr;
-
- if (includeScript((char *) incfile.c_str()) != PS_OK) {
- return PS_ERROR;
- }
-
- included++;
- }
-
- if (included)
- return PS_OK;
-
- }
-
- // nothing found
- if (!included)
- {
- if(required) {
- ERROR_MSG("!include: could not find: \"%s\"\n",f);
- return PS_ERROR;
- } else {
- warning_fl("!include: could not find: \"%s\"",f);
- }
- }
- }
- return PS_OK;
- case TOK_P_CD:
- if (!line.gettoken_str(1)[0] || chdir(line.gettoken_str(1)))
- {
- ERROR_MSG("!cd: error changing to: \"%s\"\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- return PS_OK;
- case TOK_P_ERROR:
- ERROR_MSG("!error: %s\n",line.gettoken_str(1));
- return PS_ERROR;
- case TOK_P_WARNING:
- warning_fl("!warning: %s",line.gettoken_str(1));
- return PS_OK;
- case TOK_P_ECHO:
- SCRIPT_MSG("%s (%s:%d)\n", line.gettoken_str(1),curfilename,linecnt);
- return PS_OK;
-
- case TOK_P_VERBOSE:
- {
- extern int g_display_errors;
- int k=line.gettoken_enum(1,"push\0pop\0");
- int v;
- if (k < 0)
- // just set
- v=line.gettoken_int(1);
- else
- {
- if (k)
- {
- // pop
- int l=verbose_stack.getlen();
- if (l)
- {
- v=((int*)verbose_stack.get())[(l/sizeof(int))-1];
- verbose_stack.resize(l-sizeof(int));
- }
- else
- return PS_OK;
- }
- else
- {
- // push
- v=0;
- if (display_errors)
- {
- v++;
- if (display_warnings)
- {
- v++;
- if (display_info)
- {
- v++;
- if (display_script)
- {
- v++;
- }
- }
- }
- }
- verbose_stack.add(&v,sizeof(int));
- return PS_OK;
- }
- }
- display_script=v>3;
- display_info=v>2;
- display_warnings=v>1;
- display_errors=v>0;
- g_display_errors=display_errors;
- }
- return PS_OK;
-
- case TOK_UNINSTALLEXENAME: PRINTHELP()
-
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- case TOK_UNINSTCAPTION:
- {
- if (SetInnerString(NLF_UCAPTION,line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- SCRIPT_MSG("UninstCaption: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_UNINSTICON:
- SCRIPT_MSG("UninstallIcon: \"%s\"\n",line.gettoken_str(1));
- try {
- free(m_unicon_data);
- m_unicon_data = generate_uninstall_icon_data(line.gettoken_str(1), m_unicon_size);
- }
- catch (exception& err) {
- ERROR_MSG("Error while setting icon to \"%s\": %s\n", line.gettoken_str(1), err.what());
- return PS_ERROR;
- }
- return PS_OK;
- case TOK_UNINSTTEXT:
- {
- if (!cur_page) {
- if (SetInnerString(NLF_UNINST_TEXT, line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- SetInnerString(NLF_UNINST_SUBTEXT, line.gettoken_str(2));
- }
- else {
- if (cur_page_type != PAGE_UNINSTCONFIRM) {
- ERROR_MSG("Error: UninstallText can only be used inside PageEx uninstConfirm.\n");
- return PS_ERROR;
- }
- cur_page->parms[0] = add_string(line.gettoken_str(1));
- cur_page->parms[1] = add_string(line.gettoken_str(2));
- }
- SCRIPT_MSG("UninstallText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
- }
- return PS_OK;
- case TOK_UNINSTSUBCAPTION:
- {
- int s;
- int w=line.gettoken_int(1,&s);
- if (!s || w < 0 || w > 2) PRINTHELP()
- SetInnerString(NLF_USUBCAPTION_CONFIRM+w,line.gettoken_str(2));
- SCRIPT_MSG("UninstSubCaption: page:%d, text=%s\n",w,line.gettoken_str(2));
- }
- return PS_OK;
- case TOK_WRITEUNINSTALLER:
- {
- if (uninstall_mode)
- {
- ERROR_MSG("WriteUninstaller only valid from install, not from uninstall.\n");
- PRINTHELP()
- }
- uninstaller_writes_used++;
- ent.which=EW_WRITEUNINSTALLER;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- string full = string("$INSTDIR\\") + string(line.gettoken_str(1));
- ent.offsets[3]=add_string(full.c_str());
- // ent.offsets[1] and ent.offsets[2] are set in CEXEBuild::uninstall_generate()
- if (!ent.offsets[0]) PRINTHELP()
- SCRIPT_MSG("WriteUninstaller: \"%s\"\n",line.gettoken_str(1));
-
- DefineInnerLangString(NLF_ERR_CREATING);
- DefineInnerLangString(NLF_CREATED_UNINST);
- }
- return add_entry(&ent);
-#else//!NSIS_CONFIG_UNINSTALL_SUPPORT
- case TOK_WRITEUNINSTALLER:
- case TOK_UNINSTCAPTION:
- case TOK_UNINSTICON:
- case TOK_UNINSTTEXT:
- case TOK_UNINSTSUBCAPTION:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif
-
-
-
- // section/function shit
- ///////////////////////////////////////////////////////////////////////////////
-
- case TOK_SECTION:
- {
- int a=1,unselected = 0;
- if (!strcmpi(line.gettoken_str(1),"/o"))
- {
- unselected = 1;
- a++;
- }
- else if (line.getnumtokens() > 3)
- PRINTHELP();
- SCRIPT_MSG("Section: \"%s\"",line.gettoken_str(a));
- if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1));
- SCRIPT_MSG("\n");
-#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!stricmp(line.gettoken_str(a),"uninstall"))
- {
- ERROR_MSG("Error: Uninstall section declared, no NSIS_CONFIG_UNINSTALL_SUPPORT\n");
- return PS_ERROR;
- }
-#endif
-
- int ret;
-
- if (line.gettoken_str(a)[0]=='-')
- {
- if (!strnicmp(line.gettoken_str(a)+1,"un.",3))
- ret=add_section("un.",line.gettoken_str(a+1));
- else
- ret=add_section("",line.gettoken_str(a+1));
- }
- else ret=add_section(line.gettoken_str(a),line.gettoken_str(a+1));
- if (ret != PS_OK) return ret;
-
- if (unselected)
- build_cursection->flags &= ~SF_SELECTED;
-
- return PS_OK;
- }
- case TOK_SECTIONEND:
- SCRIPT_MSG("SectionEnd\n");
- return section_end();
- case TOK_SECTIONIN:
- {
- SCRIPT_MSG("SectionIn: ");
- int wt;
- for (wt = 1; wt < line.getnumtokens(); wt ++)
- {
- char *p=line.gettoken_str(wt);
- if (!stricmp(p, "RO"))
- {
- if (section_add_flags(SF_RO) != PS_OK) return PS_ERROR;
- SCRIPT_MSG("[RO] ");
- }
- else
- {
- int x=atoi(p)-1;
- if (x >= 0 && x < NSIS_MAX_INST_TYPES)
- {
- if (section_add_install_type(1<<x) != PS_OK) return PS_ERROR;
- SCRIPT_MSG("[%d] ",x);
- }
- else if (x < 0)
- {
- PRINTHELP()
- }
- else
- {
- ERROR_MSG("Error: SectionIn section %d out of range 1-%d\n",x+1,NSIS_MAX_INST_TYPES);
- return PS_ERROR;
- }
- p++;
- }
- }
- SCRIPT_MSG("\n");
- }
- return PS_OK;
- case TOK_SECTIONGROUPEND:
- case TOK_SUBSECTIONEND:
- case TOK_SECTIONGROUP:
- case TOK_SUBSECTION:
- {
- char buf[1024];
- int a=1,ex = 0;
- if (!strcmpi(line.gettoken_str(1),"/e"))
- {
- ex = 1;
- a++;
- }
- wsprintf(buf,"-%s",line.gettoken_str(a));
- if (which_token == TOK_SECTIONGROUP || which_token == TOK_SUBSECTION)
- {
- char *s = line.gettoken_str(a);
- if (!s[0] || (!strcmpi(s, "un.") && !s[3]))
- PRINTHELP();
- }
-
- SCRIPT_MSG("%s %s",line.gettoken_str(0),line.gettoken_str(a));
- if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1));
- SCRIPT_MSG("\n");
- return add_section(buf,line.gettoken_str(a+1),ex);
- }
- case TOK_FUNCTION:
- if (!line.gettoken_str(1)[0]) PRINTHELP()
- if (line.gettoken_str(1)[0]==':' || line.gettoken_str(1)[0]=='/')
- {
- ERROR_MSG("Function: function name cannot begin with : or /.\n");
- PRINTHELP()
- }
- SCRIPT_MSG("Function: \"%s\"\n",line.gettoken_str(1));
-#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (!strnicmp(line.gettoken_str(1),"un.",3))
- {
- ERROR_MSG("Error: Uninstall function declared, no NSIS_CONFIG_UNINSTALL_SUPPORT\n");
- return PS_ERROR;
- }
-#endif
- return add_function(line.gettoken_str(1));
- case TOK_FUNCTIONEND:
- SCRIPT_MSG("FunctionEnd\n");
- return function_end();
-
- // flag setters
- ///////////////////////////////////////////////////////////////////////////////
-
- // BEGIN - Added by ramon 23 May 2003
- case TOK_ALLOWSKIPFILES:
- build_allowskipfiles=line.gettoken_enum(1,"off\0on\0");
- if (build_allowskipfiles==-1) PRINTHELP()
- SCRIPT_MSG("AllowSkipFiles: %s\n",line.gettoken_str(1));
- return PS_OK;
- // END - Added by ramon 23 May 2003
- case TOK_SETDATESAVE:
- build_datesave=line.gettoken_enum(1,"off\0on\0");
- if (build_datesave==-1) PRINTHELP()
- SCRIPT_MSG("SetDateSave: %s\n",line.gettoken_str(1));
- return PS_OK;
- case TOK_SETOVERWRITE:
- {
- int k=line.gettoken_enum(1,"on\0off\0try\0ifnewer\0ifdiff\0lastused\0");
- if (k==-1) PRINTHELP()
- if (k==5)
- {
- k=build_overwrite;
- build_overwrite=build_last_overwrite;
- build_last_overwrite=k;
- }
- else
- {
- build_last_overwrite=build_overwrite;
- build_overwrite=k;
- }
- SCRIPT_MSG("SetOverwrite: %s\n",line.gettoken_str(1));
- }
- return PS_OK;
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- case TOK_SETPLUGINUNLOAD:
- build_plugin_unload=line.gettoken_enum(1,"manual\0alwaysoff\0");
- if (build_plugin_unload==-1) PRINTHELP()
- SCRIPT_MSG("SetPluginUnload: %s\n",line.gettoken_str(1));
- return PS_OK;
-#endif //NSIS_CONFIG_PLUGIN_SUPPORT
- case TOK_SETCOMPRESS:
- build_compress=line.gettoken_enum(1,"off\0auto\0force\0");
- if (build_compress==-1) PRINTHELP()
- if (build_compress==0 && build_compress_whole)
- {
- warning_fl("'SetCompress off' encountered, and in whole compression mode. Effectively ignored.");
- }
- SCRIPT_MSG("SetCompress: %s\n",line.gettoken_str(1));
- return PS_OK;
- case TOK_DBOPTIMIZE:
- build_optimize_datablock=line.gettoken_enum(1,"off\0on\0");
- if (build_optimize_datablock==-1) PRINTHELP()
- SCRIPT_MSG("SetDatablockOptimize: %s\n",line.gettoken_str(1));
- return PS_OK;
- case TOK_FILEBUFSIZE:
- build_filebuflen=line.gettoken_int(1);
- build_filebuflen<<=20;
- if (build_filebuflen<=0)
- {
- ERROR_MSG("Error: FileBufSize: invalid buffer size -- %d\n",build_filebuflen);
- return PS_ERROR;
- }
- SCRIPT_MSG("FileBufSize: %smb (%d bytes)\n",line.gettoken_str(1),build_filebuflen);
- return PS_OK;
-#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
- case TOK_SETCOMPRESSIONLEVEL:
- {
- if (compressor == &lzma_compressor)
- warning_fl("SetCompressionLevel: compressor is set to LZMA. Effectively ignored.");
- if (build_compressor_set && build_compress_whole)
- warning_fl("SetCompressionLevel: data already compressed in compress whole mode. Effectively ignored.");
-
- int s;
- build_compress_level=line.gettoken_int(1,&s);
- if (!s || build_compress_level < 0 || build_compress_level > 9) PRINTHELP();
- SCRIPT_MSG("SetCompressionLevel: %u\n", build_compress_level);
- }
- return PS_OK;
- case TOK_SETCOMPRESSORDICTSIZE:
- {
- if (compressor != &lzma_compressor)
- warning_fl("SetCompressorDictSize: compressor is not set to LZMA. Effectively ignored.");
- if (build_compressor_set && build_compress_whole)
- warning_fl("SetCompressorDictSize: data already compressed in compress whole mode. Effectively ignored.");
-
- int s;
- build_compress_dict_size=line.gettoken_int(1,&s);
- if (!s) PRINTHELP();
- SCRIPT_MSG("SetCompressorDictSize: %u mb\n", build_compress_dict_size);
- build_compress_dict_size <<= 20;
- }
- return PS_OK;
-#else
- case TOK_SETCOMPRESSIONLEVEL:
- case TOK_SETCOMPRESSORDICTSIZE:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
- case TOK_ADDSIZE:
- {
- int s;
- int size_kb=line.gettoken_int(1,&s);
- if (!s) PRINTHELP()
- SCRIPT_MSG("AddSize: %d kb\n",size_kb);
- section_add_size_kb(size_kb);
- }
- return PS_OK;
- case TOK_SUBCAPTION:
- {
- int s;
- int w=line.gettoken_int(1,&s);
- if (!s || w < 0 || w > 4) PRINTHELP()
- SetInnerString(NLF_SUBCAPTION_LICENSE+w,line.gettoken_str(2));
- SCRIPT_MSG("SubCaption: page:%d, text=%s\n",w,line.gettoken_str(2));
- }
- return PS_OK;
- case TOK_FILEERRORTEXT:
-#ifdef NSIS_SUPPORT_FILE
- {
- SetInnerString(NLF_FILE_ERROR,line.gettoken_str(1));
- SetInnerString(NLF_FILE_ERROR_NOIGNORE,line.gettoken_str(2));
- SCRIPT_MSG("FileErrorText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
- }
- return PS_OK;
-#else
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif
- case TOK_BRANDINGTEXT:
- {
- int a = 1;
- int trim = 0;
- while (line.gettoken_str(a)[0] == '/') {
- if (!strnicmp(line.gettoken_str(a),"/TRIM",5)) {
- if (!stricmp(line.gettoken_str(a)+5,"LEFT")) trim = 1;
- else if (!stricmp(line.gettoken_str(a)+5,"RIGHT")) trim = 2;
- else if (!stricmp(line.gettoken_str(a)+5,"CENTER")) trim = 3;
- else PRINTHELP();
- a++;
- }
- else break;
- }
- if (line.getnumtokens()!=a+1 && !trim) PRINTHELP();
- if (line.getnumtokens()==a+1)
- SetInnerString(NLF_BRANDING,line.gettoken_str(a));
-#ifdef _WIN32
- if (trim) try {
- init_res_editor();
-
- BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG);
- CDialogTemplate td(dlg,uDefCodePage);
- free(dlg);
-
- if (trim) {
- char str[512];
- if (line.getnumtokens()==a+1 && line.gettoken_str(a)[0])
- strcpy(str, line.gettoken_str(a));
- else
- wsprintf(str, "Nullsoft Install System %s", NSIS_VERSION);
-
- short old_width = td.GetItem(IDC_VERSTR)->sWidth;
-
- switch (trim) {
- case 1: td.LTrimToString(IDC_VERSTR, str, 4); break;
- case 2: td.RTrimToString(IDC_VERSTR, str, 4); break;
- case 3: td.CTrimToString(IDC_VERSTR, str, 4); break;
- }
-
- if (td.GetItem(IDC_VERSTR)->sWidth > old_width)
- {
- warning_fl("BrandingText: \"%s\" is too long, trimming has expanded the label", str);
- }
- }
-
- DWORD dwSize;
- dlg = td.Save(dwSize);
- res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG, dlg, dwSize);
- res_editor->FreeResource(dlg);
- }
- catch (exception& err) {
- ERROR_MSG("Error while triming branding text control: %s\n", err.what());
- return PS_ERROR;
- }
-#else
- if (trim)
- {
- ERROR_MSG("Error: BrandingText /TRIM* is disabled for non Win32 platforms.\n");
- return PS_ERROR;
- }
-#endif
- SCRIPT_MSG("BrandingText: \"%s\"\n",line.gettoken_str(a));
- }
- return PS_OK;
- case TOK_MISCBUTTONTEXT:
- {
- SetInnerString(NLF_BTN_BACK,line.gettoken_str(1));
- SetInnerString(NLF_BTN_NEXT,line.gettoken_str(2));
- SetInnerString(NLF_BTN_CANCEL,line.gettoken_str(3));
- SetInnerString(NLF_BTN_CLOSE,line.gettoken_str(4));
- SCRIPT_MSG("MiscButtonText: back=\"%s\" next=\"%s\" cancel=\"%s\" close=\"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- }
- return PS_OK;
- case TOK_SPACETEXTS:
- {
- if (!strcmpi(line.gettoken_str(1), "none")) {
- no_space_texts=true;
- SCRIPT_MSG("SpaceTexts: none\n");
- }
- else {
- no_space_texts=false;
- SetInnerString(NLF_SPACE_REQ,line.gettoken_str(1));
- SetInnerString(NLF_SPACE_AVAIL,line.gettoken_str(2));
- SCRIPT_MSG("SpaceTexts: required=\"%s\" available=\"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
- }
- }
- return PS_OK;
- case TOK_INSTBUTTONTEXT:
- {
- SetInnerString(NLF_BTN_INSTALL,line.gettoken_str(1));
- SCRIPT_MSG("InstallButtonText: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_DETAILSBUTTONTEXT:
- {
- if (!cur_page) {
- if (SetInnerString(NLF_BTN_DETAILS,line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- }
- else {
- if (cur_page_type != PAGE_INSTFILES) {
- ERROR_MSG("Error: DetailsButtonText can only be used inside PageEx instfiles.\n");
- return PS_ERROR;
- }
- cur_page->parms[1] = add_string(line.gettoken_str(1));
- }
- SCRIPT_MSG("DetailsButtonText: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_COMPLETEDTEXT:
- {
- if (!cur_page) {
- if (SetInnerString(NLF_COMPLETED,line.gettoken_str(1)) == PS_WARNING)
- warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
- }
- else {
- if (cur_page_type != PAGE_INSTFILES) {
- ERROR_MSG("Error: CompletedText can only be used inside PageEx instfiles.\n");
- return PS_ERROR;
- }
- cur_page->parms[2] = add_string(line.gettoken_str(1));
- }
- SCRIPT_MSG("CompletedText: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
- case TOK_UNINSTBUTTONTEXT:
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- {
- SetInnerString(NLF_BTN_UNINSTALL,line.gettoken_str(1));
- SCRIPT_MSG("UninstButtonText: \"%s\"\n",line.gettoken_str(1));
- }
- return PS_OK;
-#else
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif
-
- // instructions
- ///////////////////////////////////////////////////////////////////////////////
- case TOK_NOP:
- SCRIPT_MSG("Nop\n");
- ent.which=EW_NOP;
- return add_entry(&ent);
- case TOK_GOTO:
- ent.which=EW_NOP;
- if (process_jump(line,1,&ent.offsets[0])) PRINTHELP()
- SCRIPT_MSG("Goto: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_SETREGVIEW:
- {
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(alter_reg_view);
- // "64" results in setting the flag to 1 which alters the view
- int k=line.gettoken_enum(1,"32\0" "64\0lastused\0");
- if (k<0) PRINTHELP()
- if (k == 0) // 32
- ent.offsets[1]=add_intstring(0);
- else if (k == 1) // 64
- ent.offsets[1]=add_intstring(KEY_WOW64_64KEY);
- else if (k == 2) // last used
- ent.offsets[2]=1;
- SCRIPT_MSG("SetRegView: %s\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_SETSHELLVARCONTEXT:
- {
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(all_user_var);
- int k=line.gettoken_enum(1,"current\0all\0");
- if (k<0) PRINTHELP()
- ent.offsets[1]=add_intstring(k);
- SCRIPT_MSG("SetShellVarContext: %s\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_RET:
- SCRIPT_MSG("Return\n");
- ent.which=EW_RET;
- return add_entry(&ent);
- case TOK_CALL:
- if (!line.gettoken_str(1)[0] || (line.gettoken_str(1)[0]==':' && !line.gettoken_str(1)[1] )) PRINTHELP()
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
- if (uninstall_mode && strnicmp(line.gettoken_str(1),"un.",3)
- && (GetUserVarIndex(line,1) < 0) && line.gettoken_str(1)[0]!=':')
- {
- ERROR_MSG("Call must be used with function names starting with \"un.\" in the uninstall section.\n");
- PRINTHELP()
- }
- if (!uninstall_mode && !strnicmp(line.gettoken_str(1),"un.",3))
- {
- ERROR_MSG("Call must not be used with functions starting with \"un.\" in the non-uninstall sections.\n");
- PRINTHELP()
- }
-#endif
- ent.which=EW_CALL;
- ent.offsets[1]=0;
- {
- int v;
- if ((v=GetUserVarIndex(line, 1))>=0)
- {
- ent.offsets[0]=-v-2;
- }
- else
- {
- if (line.gettoken_str(1)[0] == ':')
- {
- ent.offsets[1]=1;
- ent.offsets[0]=ns_label.add(line.gettoken_str(1)+1,0);
- }
- else ent.offsets[0]=ns_func.add(line.gettoken_str(1),0);
- }
- }
- SCRIPT_MSG("Call \"%s\"\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_SETOUTPATH:
- {
- char *op=line.gettoken_str(1);
- if (!strcmp(op,"-"))
- {
- op="$INSTDIR";
- }
- SCRIPT_MSG("SetOutPath: \"%s\"\n",op);
- ent.which=EW_CREATEDIR;
- ent.offsets[0]=add_string(op);
- ent.offsets[1]=1;
-
- DefineInnerLangString(NLF_OUTPUT_DIR);
- }
- return add_entry(&ent);
- case TOK_CREATEDIR:
- {
- char out_path[1024];
- char *p=line.gettoken_str(1);
- if (*p == '-') out_path[0]=0;
- else
- {
- if (p[0] == '\\' && p[1] != '\\') p++;
- strncpy(out_path,p,1024-1);
- if (*CharPrev(out_path,out_path+strlen(out_path))=='\\')
- *CharPrev(out_path,out_path+strlen(out_path))=0; // remove trailing slash
- }
- if (!*out_path) PRINTHELP()
- SCRIPT_MSG("CreateDirectory: \"%s\"\n",out_path);
- ent.which=EW_CREATEDIR;
- ent.offsets[0]=add_string(out_path);
-
- DefineInnerLangString(NLF_CREATE_DIR);
- }
- return add_entry(&ent);
- case TOK_EXEC:
- case TOK_EXECWAIT:
-#ifdef NSIS_SUPPORT_EXECUTE
- ent.which=EW_EXECUTE;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[2]=0;
- if (which_token == TOK_EXECWAIT)
- {
- ent.offsets[2]=1;
- ent.offsets[1]=GetUserVarIndex(line, 2);
- if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
- }
- SCRIPT_MSG("%s: \"%s\" (->%s)\n",ent.offsets[2]?"ExecWait":"Exec",line.gettoken_str(1),line.gettoken_str(2));
-
- DefineInnerLangString(NLF_EXEC);
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_EXECUTE
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_EXECUTE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_EXECUTE
- case TOK_EXECSHELL: // this uses improvements of Andras Varga
-#ifdef NSIS_SUPPORT_SHELLEXECUTE
- {
- ent.which=EW_SHELLEXEC;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- ent.offsets[3]=SW_SHOWNORMAL;
- if (line.getnumtokens() > 4)
- {
- int tab[4]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINIMIZED,SW_HIDE};
- int a=line.gettoken_enum(4,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0SW_HIDE\0");
- if (a < 0) PRINTHELP()
- ent.offsets[3]=tab[a];
- }
- string detail=string(line.gettoken_str(1))+" "+string(line.gettoken_str(2));
- ent.offsets[5]=add_string(detail.c_str());
- SCRIPT_MSG("ExecShell: %s: \"%s\" \"%s\" %s\n",line.gettoken_str(1),line.gettoken_str(2),
- line.gettoken_str(3),line.gettoken_str(4));
-
- DefineInnerLangString(NLF_EXEC_SHELL);
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_SHELLEXECUTE
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_SHELLEXECUTE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_SHELLEXECUTE
- case TOK_CALLINSTDLL:
- case TOK_REGDLL:
- case TOK_UNREGDLL:
-#ifndef NSIS_SUPPORT_ACTIVEXREG
- ERROR_MSG("%s: support not compiled in (NSIS_SUPPORT_ACTIVEXREG)\n",line.gettoken_str(0));
- return PS_ERROR;
-#else//NSIS_SUPPORT_ACTIVEXREG
- ent.which=EW_REGISTERDLL;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- if (which_token == TOK_UNREGDLL)
- {
- ent.offsets[1]=add_string("DllUnregisterServer");
- ent.offsets[2]=DefineInnerLangString(NLF_UNREGISTERING);
- }
- else if (which_token == TOK_CALLINSTDLL)
- {
- int a = 2;
- if (!stricmp(line.gettoken_str(a), "/NOUNLOAD")) {
- ent.offsets[3]=1;
- a++;
- }
- if (a+1 != line.getnumtokens()) PRINTHELP();
- ent.offsets[1]=add_string(line.gettoken_str(a));
- if (!ent.offsets[1]) PRINTHELP()
- ent.offsets[2]=0;
- }
- else // register
- {
- ent.offsets[1] = add_string(line.gettoken_str(2));
- if (!ent.offsets[1]) ent.offsets[1]=add_string("DllRegisterServer");
- ent.offsets[2]=DefineInnerLangString(NLF_REGISTERING);
- }
-
- SCRIPT_MSG("%s: \"%s\" %s\n",line.gettoken_str(0),line.gettoken_str(1), line.gettoken_str(ent.offsets[3]?3:2));
-
- DefineInnerLangString(NLF_SYMBOL_NOT_FOUND);
- DefineInnerLangString(NLF_COULD_NOT_LOAD);
- DefineInnerLangString(NLF_NO_OLE);
- // not used anywhere - DefineInnerLangString(NLF_ERR_REG_DLL);
- return add_entry(&ent);
-#endif//NSIS_SUPPORT_ACTIVEXREG
- case TOK_RENAME:
-#ifdef NSIS_SUPPORT_RENAME
- {
- int a=1;
- ent.which=EW_RENAME;
- if (!stricmp(line.gettoken_str(1),"/REBOOTOK"))
- {
- ent.offsets[2]=1;
- a++;
-#ifndef NSIS_SUPPORT_MOVEONREBOOT
- ERROR_MSG("Error: /REBOOTOK specified, NSIS_SUPPORT_MOVEONREBOOT not defined\n");
- PRINTHELP()
-#endif
- }
- else if (line.gettoken_str(1)[0]=='/')
- {
- a=line.getnumtokens(); // cause usage to go here:
- }
- if (line.getnumtokens()!=a+2) PRINTHELP()
- ent.offsets[0]=add_string(line.gettoken_str(a));
- ent.offsets[1]=add_string(line.gettoken_str(a+1));
- string print = string(line.gettoken_str(a)) + "->" + string(line.gettoken_str(a+1));
- ent.offsets[3]=add_string(print.c_str());
- SCRIPT_MSG("Rename: %s%s->%s\n",ent.offsets[2]?"/REBOOTOK ":"",line.gettoken_str(a),line.gettoken_str(a+1));
-
- DefineInnerLangString(NLF_RENAME);
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- DefineInnerLangString(NLF_RENAME_ON_REBOOT);
-#endif
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_RENAME
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_RENAME not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_RENAME
- case TOK_MESSAGEBOX:
-#ifdef NSIS_SUPPORT_MESSAGEBOX
- {
- #define MBD(x) {x,#x},
- struct
- {
- int id;
- char *str;
- } list[]=
- {
- MBD(MB_ABORTRETRYIGNORE)
- MBD(MB_OK)
- MBD(MB_OKCANCEL)
- MBD(MB_RETRYCANCEL)
- MBD(MB_YESNO)
- MBD(MB_YESNOCANCEL)
- MBD(MB_ICONEXCLAMATION)
- MBD(MB_ICONINFORMATION)
- MBD(MB_ICONQUESTION)
- MBD(MB_ICONSTOP)
- MBD(MB_USERICON)
- MBD(MB_TOPMOST)
- MBD(MB_SETFOREGROUND)
- MBD(MB_RIGHT)
- MBD(MB_RTLREADING)
- MBD(MB_DEFBUTTON1)
- MBD(MB_DEFBUTTON2)
- MBD(MB_DEFBUTTON3)
- MBD(MB_DEFBUTTON4)
- };
- #undef MBD
- int r=0;
- int x;
- char *p=line.gettoken_str(1);
-
- while (*p)
- {
- char *np=p;
- while (*np && *np != '|') np++;
- if (*np) *np++=0;
- for (x = 0 ; (unsigned) x < sizeof(list) / sizeof(list[0]) && strcmpi(list[x].str, p); x++);
- if ((unsigned) x < sizeof(list) / sizeof(list[0]))
- {
- r|=list[x].id;
- }
- else PRINTHELP()
- p=np;
- }
- ent.which=EW_MESSAGEBOX;
- ent.offsets[0]=r;
- ent.offsets[1]=add_string(line.gettoken_str(2));
- int rettab[] =
- {
- 0,IDABORT,IDCANCEL,IDIGNORE,IDNO,IDOK,IDRETRY,IDYES
- };
- const char *retstr="0\0IDABORT\0IDCANCEL\0IDIGNORE\0IDNO\0IDOK\0IDRETRY\0IDYES\0";
- int a=3;
- if (line.getnumtokens() > 3)
- {
- if (!strcmpi(line.gettoken_str(3),"/SD"))
- {
- int k=line.gettoken_enum(4,retstr);
- if (k <= 0) PRINTHELP();
- ent.offsets[0]|=rettab[k]<<21;
- a=5;
- }
- else if (line.getnumtokens() > 7)
- PRINTHELP();
-
- if (line.getnumtokens() > a)
- {
- ent.offsets[2]=line.gettoken_enum(a,retstr);
- if (ent.offsets[2] < 0)
- PRINTHELP();
- ent.offsets[2] = rettab[ent.offsets[2]];
- if (process_jump(line,a+1,&ent.offsets[3]))
- PRINTHELP();
- if (line.getnumtokens() > a+2)
- {
- int v=line.gettoken_enum(a+2,retstr);
- if (v < 0)
- PRINTHELP();
- ent.offsets[4] = rettab[v];
- if (process_jump(line,a+3,&ent.offsets[5]))
- PRINTHELP();
- }
- }
- }
- SCRIPT_MSG("MessageBox: %d: \"%s\"",r,line.gettoken_str(2));
- if (line.getnumtokens()>a+1) SCRIPT_MSG(" (on %s goto %s)",line.gettoken_str(a),line.gettoken_str(a+1));
- SCRIPT_MSG("\n");
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_MESSAGEBOX
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_MESSAGEBOX not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_MESSAGEBOX
- case TOK_CREATESHORTCUT:
-#ifdef NSIS_SUPPORT_CREATESHORTCUT
- ent.which=EW_CREATESHORTCUT;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- ent.offsets[3]=add_string(line.gettoken_str(4));
- ent.offsets[5]=add_string(line.gettoken_str(8));
- int s;
- ent.offsets[4]=line.gettoken_int(5,&s)&0xff;
- if (!s)
- {
- if (line.getnumtokens() > 5 && *line.gettoken_str(5))
- {
- ERROR_MSG("CreateShortCut: cannot interpret icon index\n");
- PRINTHELP()
- }
- ent.offsets[4]=0;
- }
- if (line.getnumtokens() > 6 && *line.gettoken_str(6))
- {
- int tab[3]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINNOACTIVE/*SW_SHOWMINIMIZED doesn't work*/};
- int a=line.gettoken_enum(6,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0");
- if (a < 0)
- {
- ERROR_MSG("CreateShortCut: unknown show mode \"%s\"\n",line.gettoken_str(6));
- PRINTHELP()
- }
- ent.offsets[4]|=tab[a]<<8;
- }
- if (line.getnumtokens() > 7)
- {
- char *s=(line.gettoken_str(7));
-
- char b[255];
- for (unsigned int spos=0; (spos <= strlen(s)) && (spos <= 255); spos++)
- b[spos]=toupper(*(s+spos));
- strcpy(s,b);
-
- if (*s)
- {
- int c=0;
- if (strstr(s,"ALT|")) ent.offsets[4]|=HOTKEYF_ALT << 24;
- if (strstr(s,"CONTROL|")) ent.offsets[4]|=HOTKEYF_CONTROL << 24;
- if (strstr(s,"EXT|")) ent.offsets[4]|=HOTKEYF_EXT << 24;
- if (strstr(s,"SHIFT|")) ent.offsets[4]|=HOTKEYF_SHIFT << 24;
- while (strstr(s,"|"))
- {
- s=strstr(s,"|")+1;
- }
- if ((s[0] == 'F') && (s[1] >= '1' && s[1] <= '9'))
- {
- c=VK_F1-1+atoi(s+1);
- if (atoi(s+1) < 1 || atoi(s+1) > 24)
- {
- warning_fl("CreateShortCut: F-key \"%s\" out of range",s);
- }
- }
- else if (((s[0] >= 'A' && s[0] <= 'Z') || (s[0] >= '0' && s[0] <= '9')) && !s[1])
- c=s[0];
- else
- {
- c=s[0];
- warning_fl("CreateShortCut: unrecognized hotkey \"%s\"",s);
- }
- ent.offsets[4] |= (c) << 16;
- }
- }
- SCRIPT_MSG("CreateShortCut: \"%s\"->\"%s\" %s icon:%s,%d, showmode=0x%X, hotkey=0x%X, comment=%s\n",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),
- line.gettoken_str(4),ent.offsets[4]&0xff,(ent.offsets[4]>>8)&0xff,ent.offsets[4]>>16,line.gettoken_str(8));
-
- DefineInnerLangString(NLF_CREATE_SHORTCUT);
- DefineInnerLangString(NLF_ERR_CREATING_SHORTCUT);
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_CREATESHORTCUT
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_CREATESHORTCUT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_SUPPORT_CREATESHORTCUT
-#ifdef NSIS_SUPPORT_HWNDS
- case TOK_FINDWINDOW:
- ent.which=EW_FINDWINDOW;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0] < 0) PRINTHELP()
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- ent.offsets[3]=add_string(line.gettoken_str(4));
- ent.offsets[4]=add_string(line.gettoken_str(5));
- SCRIPT_MSG("FindWindow: output=%s, class=\"%s\", text=\"%s\" hwndparent=\"%s\" hwndafter=\"%s\"\n",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(5));
- return add_entry(&ent);
- case TOK_SENDMESSAGE:
- ent.which=EW_SENDMESSAGE;
-
- if (line.gettoken_str(1)[0] == '/' || line.gettoken_str(2)[0] == '/' ||
- line.gettoken_str(3)[0] == '/' || line.gettoken_str(4)[0] == '/')
- {
- PRINTHELP()
- }
-
- SCRIPT_MSG("SendMessage:");
- {
- int a=5;
- ent.offsets[0]=GetUserVarIndex(line, 5);
- if (ent.offsets[0]>=0)
- {
- SCRIPT_MSG("(->%s)",line.gettoken_str(5));
- a++;
- }
-
- if (!strncmp(line.gettoken_str(a),"/TIMEOUT=",9))
- {
- ent.offsets[5]|=atoi(line.gettoken_str(a)+9)<<2;
- SCRIPT_MSG(" (timeout=%d)",ent.offsets[5]>>2);
- a++;
- }
-
- if (line.getnumtokens()>a)
- {
- PRINTHELP()
- }
- }
-
- if (!strncmp(line.gettoken_str(3),"STR:",4))
- {
- ent.offsets[5]|=1;
- ent.offsets[3]=add_string(line.gettoken_str(3)+4);
- }
- else ent.offsets[3]=add_string(line.gettoken_str(3));
- if (!strncmp(line.gettoken_str(4),"STR:",4))
- {
- ent.offsets[5]|=2;
- ent.offsets[4]=add_string(line.gettoken_str(4)+4);
- }
- else ent.offsets[4]=add_string(line.gettoken_str(4));
-
- ent.offsets[1]=add_string(line.gettoken_str(1));
- ent.offsets[2]=add_string(line.gettoken_str(2));
-
- SCRIPT_MSG("(%s,%s,%s,%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- return add_entry(&ent);
- case TOK_ISWINDOW:
- ent.which=EW_ISWINDOW;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- if (process_jump(line,2,&ent.offsets[1])||
- process_jump(line,3,&ent.offsets[2])) PRINTHELP()
- SCRIPT_MSG("IsWindow(%s): %s:%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- return add_entry(&ent);
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- case TOK_GETDLGITEM:
- ent.which=EW_GETDLGITEM;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0]<0) PRINTHELP();
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- SCRIPT_MSG("GetDlgItem: output=%s dialog=%s item=%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- return add_entry(&ent);
- case TOK_SETCTLCOLORS:
- {
- ctlcolors c={0, };
-
- ent.which=EW_SETCTLCOLORS;
- ent.offsets[0]=add_string(line.gettoken_str(1));
-
- int a = 2;
-
- if (!strcmpi(line.gettoken_str(2),"/BRANDING"))
- a++;
-
- {
- char *p;
-
- if (a == 2 && line.getnumtokens() == 5) {
- ERROR_MSG("Error: SetCtlColors expected 3 parameters, got 4\n");
- return PS_ERROR;
- }
-
- if (!strcmpi(line.gettoken_str(a+1),"transparent")) {
- c.flags|=CC_BKB;
- c.lbStyle=BS_NULL;
- c.bkmode=TRANSPARENT;
- }
- else {
- p=line.gettoken_str(a+1);
- if (*p) {
- int v=strtoul(p,&p,16);
- c.bkc=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
- c.flags|=CC_BK|CC_BKB;
- }
-
- c.lbStyle=BS_SOLID;
- c.bkmode=OPAQUE;
- }
-
- p=line.gettoken_str(a);
- if (*p) {
- int v=strtoul(p,&p,16);
- c.text=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
- c.flags|=CC_TEXT;
- }
- }
-
- if (a == 3)
- {
- c.flags|=CC_BK|CC_BKB;
- c.lbStyle=BS_NULL;
- if (!*line.gettoken_str(a+1))
- {
- c.bkc=COLOR_BTNFACE;
- c.flags|=CC_BK_SYS;
- }
- c.flags|=CC_TEXT;
- if (!*line.gettoken_str(a))
- {
- c.text=COLOR_BTNFACE;
- c.flags|=CC_TEXT_SYS;
- }
- c.bkmode=OPAQUE;
- }
-
- int i;
- int l=cur_ctlcolors->getlen()/sizeof(ctlcolors);
- for (i=0; i<l; i++) {
- if (!memcmp((ctlcolors*)cur_ctlcolors->get()+i,&c,sizeof(ctlcolors))) {
- ent.offsets[1]=i*sizeof(ctlcolors);
- break;
- }
- }
- if (i>=l) {
- ent.offsets[1]=cur_ctlcolors->add(&c,sizeof(ctlcolors));
- }
-
- SCRIPT_MSG("SetCtlColors: hwnd=%s %stext=%s background=%s\n",line.gettoken_str(1),a==2?"":"/BRANDING ",line.gettoken_str(a),line.gettoken_str(a+1));
- }
- return add_entry(&ent);
- case TOK_CREATEFONT:
- ent.which=EW_CREATEFONT;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=add_string(line.gettoken_str(2));
- SCRIPT_MSG("CreateFont: output=%s \"%s\"",line.gettoken_str(1),line.gettoken_str(2));
- {
- int height=0;
- int weight=0;
- int flags=0;
- for (int i = 3; i < line.getnumtokens(); i++) {
- char *tok=line.gettoken_str(i);
- if (tok[0]=='/') {
- if (!strcmpi(tok,"/ITALIC")) {
- SCRIPT_MSG(" /ITALIC");
- flags|=1;
- }
- else if (!strcmpi(tok,"/UNDERLINE")) {
- SCRIPT_MSG(" /UNDERLINE");
- flags|=2;
- }
- else if (!strcmpi(tok,"/STRIKE")) {
- SCRIPT_MSG(" /STRIKE");
- flags|=4;
- }
- else {
- SCRIPT_MSG("\n");
- PRINTHELP();
- }
- }
- else {
- if (!height) {
- SCRIPT_MSG(" height=%s",tok);
- height=add_string(tok);
- }
- else if (!weight) {
- SCRIPT_MSG(" weight=%s",tok);
- weight=add_string(tok);
- }
- else {
- SCRIPT_MSG("\n");
- PRINTHELP();
- }
- }
- }
- ent.offsets[2]=height;
- ent.offsets[3]=weight;
- ent.offsets[4]=flags;
- }
- SCRIPT_MSG("\n");
- return add_entry(&ent);
- case TOK_ENABLEWINDOW:
- ent.which=EW_SHOWWINDOW;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[3]=1;
- SCRIPT_MSG("EnableWindow: handle=%s enable=%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SHOWWINDOW:
- ent.which=EW_SHOWWINDOW;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- SCRIPT_MSG("ShowWindow: handle=%s show state=%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_HIDEWINDOW:
- ent.which=EW_SHOWWINDOW;
- ent.offsets[0]=add_string("$HWNDPARENT");
- ent.offsets[1]=add_string("0"/*SW_HIDE*/);
- ent.offsets[2]=1;
- SCRIPT_MSG("HideWindow\n");
- return add_entry(&ent);
- case TOK_BRINGTOFRONT:
- {
- int ret;
- ent.which=EW_SHOWWINDOW;
- ent.offsets[0]=add_string("$HWNDPARENT");
- ent.offsets[1]=add_string("5"/*SW_SHOW*/);
- ret = add_entry(&ent);
- if (ret != PS_OK) return ret;
- ent.which=EW_BRINGTOFRONT;
- ent.offsets[0]=0;
- ent.offsets[1]=0;
- SCRIPT_MSG("BringToFront\n");
- }
- return add_entry(&ent);
-#else//NSIS_CONFIG_ENHANCEDUI_SUPPORT
- case TOK_GETDLGITEM:
- case TOK_SETCTLCOLORS:
- case TOK_SHOWWINDOW:
- case TOK_BRINGTOFRONT:
- case TOK_CREATEFONT:
- case TOK_HIDEWINDOW:
- case TOK_ENABLEWINDOW:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
-#else//!NSIS_SUPPORT_HWNDS
- case TOK_ISWINDOW:
- case TOK_SENDMESSAGE:
- case TOK_FINDWINDOW:
- case TOK_GETDLGITEM:
- case TOK_SETCTLCOLORS:
- case TOK_SHOWWINDOW:
- case TOK_ENABLEWINDOW:
- case TOK_CREATEFONT:
- case TOK_HIDEWINDOW:
- case TOK_BRINGTOFRONT:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_HWNDS not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_HWNDS
- case TOK_DELETE:
-#ifdef NSIS_SUPPORT_DELETE
- {
- int a=1;
- ent.which=EW_DELETEFILE;
- if (!stricmp(line.gettoken_str(a),"/REBOOTOK"))
- {
- a++;
- ent.offsets[1]=DEL_REBOOT;
-#ifndef NSIS_SUPPORT_MOVEONREBOOT
- ERROR_MSG("Error: /REBOOTOK specified, NSIS_SUPPORT_MOVEONREBOOT not defined\n");
- PRINTHELP()
-#endif
- }
- else if (line.gettoken_str(1)[0]=='/')
- {
- a=line.getnumtokens();
- }
- if (line.getnumtokens() != a+1) PRINTHELP()
- ent.offsets[0]=add_string(line.gettoken_str(a));
- SCRIPT_MSG("Delete: %s\"%s\"\n",ent.offsets[1]?"/REBOOTOK ":"",line.gettoken_str(a));
-
- DefineInnerLangString(NLF_DEL_FILE);
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- DefineInnerLangString(NLF_DEL_ON_REBOOT);
-#endif
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_DELETE
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_DELETE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_DELETE
- case TOK_RMDIR:
-#ifdef NSIS_SUPPORT_RMDIR
- {
- int a=1;
- ent.which=EW_RMDIR;
- ent.offsets[1]=DEL_DIR;
- while (line.gettoken_str(a)[0]=='/')
- {
- if (!stricmp(line.gettoken_str(a),"/r"))
- {
- if (a == 3) PRINTHELP();
- a++;
- ent.offsets[1]|=DEL_RECURSE;
- }
- else if (!stricmp(line.gettoken_str(a),"/REBOOTOK"))
- {
- if (a == 3) PRINTHELP();
- a++;
- ent.offsets[1]|=DEL_REBOOT;
- }
- else PRINTHELP();
- }
- if (a < line.getnumtokens() - 1) PRINTHELP();
- ent.offsets[0]=add_string(line.gettoken_str(a));
- SCRIPT_MSG("RMDir: ");
- if (a>1)
- SCRIPT_MSG("%s ",line.gettoken_str(1));
- if (a>2)
- SCRIPT_MSG("%s ",line.gettoken_str(2));
- SCRIPT_MSG("\"%s\"\n",line.gettoken_str(a));
-
- DefineInnerLangString(NLF_REMOVE_DIR);
- DefineInnerLangString(NLF_DEL_FILE);
-#ifdef NSIS_SUPPORT_MOVEONREBOOT
- DefineInnerLangString(NLF_DEL_ON_REBOOT);
-#endif
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_RMDIR
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_RMDIR not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_RMDIR
- case TOK_RESERVEFILE:
- case TOK_FILE:
-#ifdef NSIS_SUPPORT_FILE
- {
- set<string> excluded;
- int a=1,attrib=0,rec=0,fatal=1;
- if (!stricmp(line.gettoken_str(a),"/nonfatal")) {
- fatal=0;
- a++;
- }
- if (which_token == TOK_FILE && !stricmp(line.gettoken_str(a),"/a"))
- {
-#ifdef _WIN32
- attrib=1;
-#else
- warning_fl("%sFile /a is disabled for non Win32 platforms.",(which_token == TOK_FILE)?"":"Reserve");
-#endif
- a++;
- }
- if (!stricmp(line.gettoken_str(a),"/r"))
- {
- rec=1;
- a++;
- }
- else if (which_token == TOK_FILE && !strnicmp(line.gettoken_str(a),"/oname=",7))
- {
- char *on=line.gettoken_str(a)+7;
- a++;
- if (!*on||line.getnumtokens()!=a+1||strstr(on,"*") || strstr(on,"?")) PRINTHELP()
-
- if (on[0]=='"')
- {
- ERROR_MSG("%sFile: output name must not begin with a quote, use \"/oname=name with spaces\".\n",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a));
- PRINTHELP();
- }
-
- int tf=0;
-#ifdef _WIN32
- int v=do_add_file(line.gettoken_str(a), attrib, 0, &tf, on);
-#else
- char *fn = my_convert(line.gettoken_str(a));
- int v=do_add_file(fn, attrib, 0, &tf, on);
- my_convert_free(fn);
-#endif
- if (v != PS_OK) return v;
- if (tf > 1) PRINTHELP()
- if (!tf)
- {
- if (fatal)
- {
- ERROR_MSG("%sFile: \"%s\" -> no files found.\n",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a));
- PRINTHELP()
- }
- else
- {
- warning_fl("%sFile: \"%s\" -> no files found",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a));
-
- // workaround for bug #1299100
- // add a nop opcode so relative jumps will work as expected
- add_entry_direct(EW_NOP);
- }
- }
-
- return PS_OK;
- }
- if (!strnicmp(line.gettoken_str(a),"/x",2))
- {
- while (!strnicmp(line.gettoken_str(a),"/x",2))
- {
- a++;
-
- if (line.getnumtokens() < a+1) PRINTHELP()
-
- excluded.insert(line.gettoken_str(a));
- a++;
- }
- }
-#ifdef _WIN32
- if (line.gettoken_str(a)[0] == '/') PRINTHELP()
-#endif
- if (line.getnumtokens()<a+1) PRINTHELP()
- while (a < line.getnumtokens())
- {
-#ifdef _WIN32
- if (line.gettoken_str(a)[0]=='/') PRINTHELP()
-#endif
- char buf[32];
- char *t=line.gettoken_str(a++);
- if (t[0] && CharNext(t)[0] == ':' && CharNext(t)[1] == '\\' && !CharNext(t)[2])
- {
- strcpy(buf,"X:\\*.*");
- buf[0]=t[0];
- t=buf;
- }
- int tf=0;
-#ifdef _WIN32
- int v=do_add_file(t, attrib, rec, &tf, NULL, which_token == TOK_FILE, NULL, excluded);
-#else
- char *fn = my_convert(t);
- int v=do_add_file(fn, attrib, rec, &tf, NULL, which_token == TOK_FILE, NULL, excluded);
- my_convert_free(fn);
-#endif
- if (v != PS_OK) return v;
- if (!tf)
- {
- if (fatal)
- {
- ERROR_MSG("%sFile: \"%s\" -> no files found.\n",(which_token == TOK_FILE)?"":"Reserve",t);
- PRINTHELP();
- }
- else
- {
- warning_fl("%sFile: \"%s\" -> no files found.",(which_token == TOK_FILE)?"":"Reserve",t);
- }
- }
- }
- }
- return PS_OK;
-#else//!NSIS_SUPPORT_FILE
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_FILE
-#ifdef NSIS_SUPPORT_COPYFILES
- case TOK_COPYFILES:
- {
- ent.which=EW_COPYFILES;
- ent.offsets[2]=FOF_NOCONFIRMATION|FOF_NOCONFIRMMKDIR|FOF_NOERRORUI|FOF_SIMPLEPROGRESS;
-
- int a=1;
- int x;
- for (x = 0; x < 2; x ++)
- {
- if (!stricmp(line.gettoken_str(a),"/SILENT"))
- {
- a++;
- ent.offsets[2]&=~FOF_SIMPLEPROGRESS;
- ent.offsets[2]|=FOF_SILENT;
- }
- else if (!stricmp(line.gettoken_str(a),"/FILESONLY"))
- {
- a++;
- ent.offsets[2]|=FOF_FILESONLY;
- }
- else if (line.gettoken_str(a)[0]=='/') PRINTHELP()
- else break;
- }
- if (line.getnumtokens() < a+2) PRINTHELP()
- ent.offsets[0]=add_string(line.gettoken_str(a));
- ent.offsets[1]=add_string(line.gettoken_str(a+1));
- string copy_to = string("$(^CopyTo)") + line.gettoken_str(a+1);
- ent.offsets[3]=add_string(copy_to.c_str());
- int s;
- int size_kb=line.gettoken_int(a+2,&s);
- if (!s && line.gettoken_str(a+2)[0]) PRINTHELP()
- section_add_size_kb(size_kb);
- SCRIPT_MSG("CopyFiles: %s\"%s\" -> \"%s\", size=%iKB\n",ent.offsets[2]&FOF_SILENT?"(silent) ":"", line.gettoken_str(a),line.gettoken_str(a+1),size_kb);
-
- DefineInnerLangString(NLF_COPY_FAILED);
- DefineInnerLangString(NLF_COPY_TO);
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_COPYFILES
- case TOK_COPYFILES:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_COPYFILES not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_COPYFILES
-
- case TOK_SETFILEATTRIBUTES:
- {
- #define MBD(x) {x,#x},
- struct
- {
- int id;
- char *str;
- } list[]=
- {
- MBD(FILE_ATTRIBUTE_NORMAL)
- MBD(FILE_ATTRIBUTE_ARCHIVE)
- MBD(FILE_ATTRIBUTE_HIDDEN)
- MBD(FILE_ATTRIBUTE_OFFLINE)
- MBD(FILE_ATTRIBUTE_READONLY)
- MBD(FILE_ATTRIBUTE_SYSTEM)
- MBD(FILE_ATTRIBUTE_TEMPORARY)
- {FILE_ATTRIBUTE_NORMAL,"NORMAL"},
- {FILE_ATTRIBUTE_ARCHIVE,"ARCHIVE"},
- {FILE_ATTRIBUTE_HIDDEN,"HIDDEN"},
- {FILE_ATTRIBUTE_OFFLINE,"OFFLINE"},
- {FILE_ATTRIBUTE_READONLY,"READONLY"},
- {FILE_ATTRIBUTE_SYSTEM,"SYSTEM"},
- {FILE_ATTRIBUTE_TEMPORARY,"TEMPORARY"},
- {FILE_ATTRIBUTE_NORMAL,"0"},
- };
- #undef MBD
- int r=0;
- int x;
- char *p=line.gettoken_str(2);
-
- while (*p)
- {
- char *np=p;
- while (*np && *np != '|') np++;
- if (*np) *np++=0;
- for (x = 0 ; (unsigned) x < sizeof(list)/sizeof(list[0]) && stricmp(list[x].str,p); x ++);
-
- if ((unsigned) x < sizeof(list)/sizeof(list[0]))
- {
- r|=list[x].id;
- }
- else PRINTHELP()
- p=np;
- }
- ent.which=EW_SETFILEATTRIBUTES;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=r;
- }
- return add_entry(&ent);
- case TOK_SLEEP:
- {
- ent.which=EW_SLEEP;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- SCRIPT_MSG("Sleep: %s ms\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_IFFILEEXISTS:
- ent.which=EW_IFFILEEXISTS;
- ent.offsets[0] = add_string(line.gettoken_str(1));
- if (process_jump(line,2,&ent.offsets[1]) ||
- process_jump(line,3,&ent.offsets[2])) PRINTHELP()
- SCRIPT_MSG("IfFileExists: \"%s\" ? %s : %s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- return add_entry(&ent);
- case TOK_QUIT:
- ent.which=EW_QUIT;
- SCRIPT_MSG("Quit\n");
- return add_entry(&ent);
- case TOK_ABORT:
- ent.which=EW_ABORT;
- ent.offsets[0] = add_string(line.gettoken_str(1));
- SCRIPT_MSG("Abort: \"%s\"\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_SETDETAILSVIEW:
- {
- int v=line.gettoken_enum(1,"hide\0show\0");
- ent.which=EW_CHDETAILSVIEW;
- if (v < 0) PRINTHELP()
- ent.offsets[0] = v?SW_SHOWNA:SW_HIDE;
- ent.offsets[1] = v?SW_HIDE:SW_SHOWNA;
- SCRIPT_MSG("SetDetailsView: %s\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_SETDETAILSPRINT:
- {
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(status_update);
- int k=line.gettoken_enum(1,"both\0textonly\0listonly\0none\0lastused\0");
- if (k<0) PRINTHELP()
- if (k == 4)
- {
- ent.offsets[2]=1;
- }
- else
- {
- // both 0
- // textonly 2
- // listonly 4
- // none 6
- ent.offsets[1]=add_intstring(k*2);
- }
- SCRIPT_MSG("SetDetailsPrint: %s\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_SETAUTOCLOSE:
- {
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(autoclose);
- int k=line.gettoken_enum(1,"false\0true\0");
- if (k < 0) PRINTHELP()
- ent.offsets[1]=add_intstring(k);
- SCRIPT_MSG("SetAutoClose: %s\n",line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_IFERRORS:
- ent.which=EW_IFFLAG;
- if (process_jump(line,1,&ent.offsets[0]) ||
- process_jump(line,2,&ent.offsets[1])) PRINTHELP()
- ent.offsets[2]=FLAG_OFFSET(exec_error);
- ent.offsets[3]=0;//new value mask - clean error
- SCRIPT_MSG("IfErrors ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_IFABORT:
- ent.which=EW_IFFLAG;
- if (process_jump(line,1,&ent.offsets[0]) ||
- process_jump(line,2,&ent.offsets[1])) PRINTHELP()
- ent.offsets[2]=FLAG_OFFSET(abort);
- ent.offsets[3]=~0;//new value mask - keep flag
- SCRIPT_MSG("IfAbort ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_CLEARERRORS:
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(exec_error);
- ent.offsets[1]=add_intstring(0);
- SCRIPT_MSG("ClearErrors\n");
- return add_entry(&ent);
- case TOK_SETERRORS:
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(exec_error);
- ent.offsets[1]=add_intstring(1);
- SCRIPT_MSG("SetErrors\n");
- return add_entry(&ent);
- case TOK_SETERRORLEVEL:
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(errlvl);
- ent.offsets[1]=add_string(line.gettoken_str(1));
- SCRIPT_MSG("SetErrorLevel: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_GETERRORLEVEL:
- ent.which=EW_GETFLAG;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=FLAG_OFFSET(errlvl);
- if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("GetErrorLevel: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
-#ifdef NSIS_SUPPORT_STROPTS
- case TOK_STRLEN:
- ent.which=EW_STRLEN;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=add_string(line.gettoken_str(2));
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("StrLen %s \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_STRCPY:
- ent.which=EW_ASSIGNVAR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- ent.offsets[3]=add_string(line.gettoken_str(4));
-
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("StrCpy %s \"%s\" (%s) (%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- return add_entry(&ent);
- case TOK_GETFUNCTIONADDR:
- ent.which=EW_GETFUNCTIONADDR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=ns_func.add(line.gettoken_str(2),0);
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("GetFunctionAddress: %s %s",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_GETLABELADDR:
- ent.which=EW_GETLABELADDR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0] < 0 || process_jump(line,2,&ent.offsets[1])) PRINTHELP()
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- SCRIPT_MSG("GetLabelAddress: %s %s",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_GETCURRENTADDR:
- ent.which=EW_ASSIGNVAR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- {
- char buf[32];
- wsprintf(buf,"%d",1+(cur_header->blocks[NB_ENTRIES].num));
- ent.offsets[1]=add_string(buf);
- }
- if (ent.offsets[0] < 0) PRINTHELP()
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- SCRIPT_MSG("GetCurrentAddress: %s",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_STRCMP:
- case TOK_STRCMPS:
- ent.which=EW_STRCMP;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[4]=which_token == TOK_STRCMPS;
- if (process_jump(line,3,&ent.offsets[2]) ||
- process_jump(line,4,&ent.offsets[3])) PRINTHELP()
- SCRIPT_MSG("%s \"%s\" \"%s\" equal=%s, nonequal=%s\n",line.gettoken_str(0),line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4));
- return add_entry(&ent);
- case TOK_GETDLLVERSIONLOCAL:
- {
- DWORD low, high;
- if (!GetDLLVersion(line.gettoken_str(1),high,low))
- {
- ERROR_MSG("GetDLLVersionLocal: error reading version info from \"%s\"\n",line.gettoken_str(1));
- return PS_ERROR;
- }
- ent.which=EW_ASSIGNVAR;
- ent.offsets[0]=GetUserVarIndex(line, 2);
- ent.offsets[1]=add_intstring(high);
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- if (ent.offsets[0]<0) PRINTHELP()
- add_entry(&ent);
-
- ent.offsets[0]=GetUserVarIndex(line, 3);
- ent.offsets[1]=add_intstring(low);
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- if (ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("GetDLLVersionLocal: %s (%u,%u)->(%s,%s)\n",
- line.gettoken_str(1),high,low,line.gettoken_str(2),line.gettoken_str(3));
- }
- return add_entry(&ent);
- case TOK_GETFILETIMELOCAL:
- {
- char buf[129];
- DWORD high=0,low=0;
-#ifdef _WIN32
- int flag=0;
- HANDLE hFile=CreateFile(line.gettoken_str(1),0,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
- if (hFile != INVALID_HANDLE_VALUE)
- {
- FILETIME ft;
- if (GetFileTime(hFile,NULL,NULL,&ft))
- {
- high=ft.dwHighDateTime;
- low=ft.dwLowDateTime;
- flag=1;
- }
- CloseHandle(hFile);
- }
- if (!flag)
- {
- ERROR_MSG("GetFileTimeLocal: error reading date from \"%s\"\n",line.gettoken_str(1));
- return PS_ERROR;
- }
-#else
- struct stat st;
- if (!stat(line.gettoken_str(1), &st))
- {
- unsigned long long ll = (st.st_mtime * 10000000LL) + 116444736000000000LL;
- high = (DWORD) (ll >> 32);
- low = (DWORD) ll;
- }
- else
- {
- ERROR_MSG("GetFileTimeLocal: error reading date from \"%s\"\n",line.gettoken_str(1));
- return PS_ERROR;
- }
-#endif
-
- ent.which=EW_ASSIGNVAR;
- ent.offsets[0]=GetUserVarIndex(line, 2);
- wsprintf(buf,"%u",high);
- ent.offsets[1]=add_string(buf);
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- if (ent.offsets[0]<0) PRINTHELP()
- add_entry(&ent);
-
- ent.offsets[0]=GetUserVarIndex(line, 3);
- wsprintf(buf,"%u",low);
- ent.offsets[1]=add_string(buf);
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- if (ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("GetFileTimeLocal: %s (%u,%u)->(%s,%s)\n",
- line.gettoken_str(1),high,low,line.gettoken_str(2),line.gettoken_str(3));
- }
- return add_entry(&ent);
-
-#else//!NSIS_SUPPORT_STROPTS
- case TOK_GETDLLVERSIONLOCAL:
- case TOK_GETFILETIMELOCAL:
- case TOK_GETFUNCTIONADDR:
- case TOK_GETLABELADDR:
- case TOK_GETCURRENTADDR:
- case TOK_STRLEN:
- case TOK_STRCPY:
- case TOK_STRCMP:
- case TOK_STRCMPS:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_STROPTS not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_STROPTS
-#ifdef NSIS_SUPPORT_INIFILES
- case TOK_DELETEINISEC:
- case TOK_DELETEINISTR:
- {
- char *vname="";
- char *space="";
- ent.which=EW_WRITEINI;
- ent.offsets[0]=add_string(line.gettoken_str(2)); // section name
- if (line.getnumtokens() > 3)
- {
- vname=line.gettoken_str(3);
- ent.offsets[1]=add_string(vname); // value name
- space=" ";
- }
- else ent.offsets[1]=0;
- ent.offsets[2]=0;
- ent.offsets[3]=add_string(line.gettoken_str(1));
- SCRIPT_MSG("DeleteINI%s: [%s] %s%sin %s\n",*vname?"Str":"Sec",
- line.gettoken_str(2),vname,space,line.gettoken_str(1));
- }
- return add_entry(&ent);
- case TOK_FLUSHINI:
- ent.which=EW_WRITEINI;
- ent.offsets[3]=add_string(line.gettoken_str(1));
- SCRIPT_MSG("FlushINI: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_WRITEINISTR:
- ent.which=EW_WRITEINI;
- ent.offsets[0]=add_string(line.gettoken_str(2));
- ent.offsets[1]=add_string(line.gettoken_str(3));
- ent.offsets[2]=add_string(line.gettoken_str(4));
- ent.offsets[3]=add_string(line.gettoken_str(1));
- ent.offsets[4]=1; // write
- SCRIPT_MSG("WriteINIStr: [%s] %s=%s in %s\n",
- line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_READINISTR:
- ent.which=EW_READINISTR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0] < 0) PRINTHELP()
- ent.offsets[1]=add_string(line.gettoken_str(3));
- ent.offsets[2]=add_string(line.gettoken_str(4));
- ent.offsets[3]=add_string(line.gettoken_str(2));
- SCRIPT_MSG("ReadINIStr %s [%s]:%s from %s\n",line.gettoken_str(1),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(2));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_INIFILES
- case TOK_DELETEINISEC:
- case TOK_DELETEINISTR:
- case TOK_FLUSHINI:
- case TOK_WRITEINISTR:
- case TOK_READINISTR:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_INIFILES not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_INIFILES
- case TOK_DETAILPRINT:
- ent.which=EW_UPDATETEXT;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=0;
- SCRIPT_MSG("DetailPrint: \"%s\"\n",line.gettoken_str(1));
- return add_entry(&ent);
-#ifdef NSIS_SUPPORT_FNUTIL
- case TOK_GETTEMPFILENAME:
- ent.which=EW_GETTEMPFILENAME;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (line.getnumtokens() == 3)
- ent.offsets[1]=add_string(line.gettoken_str(2));
- else
- ent.offsets[1]=add_string("$TEMP");
- if (ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("GetTempFileName -> %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_GETFULLPATHNAME:
- {
- int a=0;
- ent.which=EW_GETFULLPATHNAME;
- if (line.getnumtokens()==4 && !stricmp(line.gettoken_str(1),"/SHORT")) a++;
- else if (line.getnumtokens()==4 || *line.gettoken_str(1)=='/') PRINTHELP()
- ent.offsets[0]=add_string(line.gettoken_str(2+a));
- ent.offsets[1]=GetUserVarIndex(line, 1+a);
- ent.offsets[2]=!a;
- if (ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("GetFullPathName: %s->%s (%d)\n",
- line.gettoken_str(2+a),line.gettoken_str(1+a),a?"sfn":"lfn");
- }
- return add_entry(&ent);
- case TOK_SEARCHPATH:
- ent.which=EW_SEARCHPATH;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0] < 0) PRINTHELP()
- ent.offsets[1]=add_string(line.gettoken_str(2));
- SCRIPT_MSG("SearchPath %s %s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
-#else
- case TOK_SEARCHPATH:
- case TOK_GETTEMPFILENAME:
- case TOK_GETFULLPATHNAME:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FNUTIL not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif
- case TOK_GETDLLVERSION:
-#ifdef NSIS_SUPPORT_GETDLLVERSION
- ent.which=EW_GETDLLVERSION;
- ent.offsets[0]=GetUserVarIndex(line, 2);
- ent.offsets[1]=GetUserVarIndex(line, 3);
- ent.offsets[2]=add_string(line.gettoken_str(1));
- if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("GetDLLVersion: %s->%s,%s\n",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_GETDLLVERSION
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_GETDLLVERSION not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_GETDLLVERSION
- case TOK_GETFILETIME:
-#ifdef NSIS_SUPPORT_GETFILETIME
- ent.which=EW_GETFILETIME;
- ent.offsets[0]=GetUserVarIndex(line, 2);
- ent.offsets[1]=GetUserVarIndex(line, 3);
- ent.offsets[2]=add_string(line.gettoken_str(1));
- if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("GetFileTime: %s->%s,%s\n",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_GETFILETIME
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_GETFILETIME not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_GETFILETIME
-#ifdef NSIS_SUPPORT_INTOPTS
- case TOK_INTOP:
- ent.which=EW_INTOP;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[3]=line.gettoken_enum(3,"+\0-\0*\0/\0|\0&\0^\0!\0||\0&&\0%\0<<\0>>\0~\0");
- if (ent.offsets[0] < 0 || ent.offsets[3] < 0 ||
- ((ent.offsets[3] == 7 || ent.offsets[3] == 13) && line.getnumtokens() > 4))
- PRINTHELP()
- ent.offsets[1]=add_string(line.gettoken_str(2));
- if (ent.offsets[3] != 7 && ent.offsets[3] != 13) ent.offsets[2]=add_string(line.gettoken_str(4));
- if (ent.offsets[3] == 13) {
- ent.offsets[3]=6;
- ent.offsets[2]=add_string("0xFFFFFFFF");
- }
- SCRIPT_MSG("IntOp: %s=%s%s%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- return add_entry(&ent);
- case TOK_INTFMT:
- ent.which=EW_INTFMT;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0]<0) PRINTHELP()
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- SCRIPT_MSG("IntFmt: %s->%s (fmt:%s)\n",line.gettoken_str(3),line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_INTCMP:
- case TOK_INTCMPU:
- ent.which=EW_INTCMP;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[5]=which_token == TOK_INTCMPU;
- if (process_jump(line,3,&ent.offsets[2]) ||
- process_jump(line,4,&ent.offsets[3]) ||
- process_jump(line,5,&ent.offsets[4])) PRINTHELP()
- SCRIPT_MSG("%s %s:%s equal=%s, < %s, > %s\n",line.gettoken_str(0),
- line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(5));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_INTOPTS
- case TOK_INTOP:
- case TOK_INTCMP:
- case TOK_INTFMT:
- case TOK_INTCMPU:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_INTOPTS not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_INTOPTS
-#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
- case TOK_READREGSTR:
- case TOK_READREGDWORD:
- {
- ent.which=EW_READREGSTR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- int k=line.gettoken_enum(2,rootkeys[0]);
- if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
- if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
- ent.offsets[1]=(int)rootkey_tab[k];
- ent.offsets[2]=add_string(line.gettoken_str(3));
- ent.offsets[3]=add_string(line.gettoken_str(4));
- if (which_token == TOK_READREGDWORD) ent.offsets[4]=1;
- else ent.offsets[4]=0;
- if (line.gettoken_str(3)[0] == '\\')
- warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
-
- SCRIPT_MSG("%s %s %s\\%s\\%s\n",line.gettoken_str(0),
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- }
- return add_entry(&ent);
- case TOK_DELETEREGVALUE:
- case TOK_DELETEREGKEY:
- {
- int a=1;
- if (which_token==TOK_DELETEREGKEY)
- {
- ent.offsets[4]=1;
- char *s=line.gettoken_str(a);
- if (s[0] == '/')
- {
- if (stricmp(s,"/ifempty")) PRINTHELP()
- a++;
- ent.offsets[4]=3;
- }
- if (line.gettoken_str(a+2)[0]) PRINTHELP()
- }
- int k=line.gettoken_enum(a,rootkeys[0]);
- if (k == -1) k=line.gettoken_enum(a,rootkeys[1]);
- if (k == -1) PRINTHELP()
- ent.which=EW_DELREG;
- ent.offsets[1]=(int)rootkey_tab[k];
- ent.offsets[2]=add_string(line.gettoken_str(a+1));
- ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2));
- if (line.gettoken_str(a+1)[0] == '\\')
- warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
- if (which_token==TOK_DELETEREGKEY)
- SCRIPT_MSG("DeleteRegKey: %s\\%s\n",line.gettoken_str(a),line.gettoken_str(a+1));
- else
- SCRIPT_MSG("DeleteRegValue: %s\\%s\\%s\n",line.gettoken_str(a),line.gettoken_str(a+1),line.gettoken_str(a+2));
- }
- return add_entry(&ent);
- case TOK_WRITEREGSTR:
- case TOK_WRITEREGEXPANDSTR:
- case TOK_WRITEREGBIN:
- case TOK_WRITEREGDWORD:
- {
- int k=line.gettoken_enum(1,rootkeys[0]);
- if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
- if (k == -1) PRINTHELP()
- ent.which=EW_WRITEREG;
- ent.offsets[0]=(int)rootkey_tab[k];
- ent.offsets[1]=add_string(line.gettoken_str(2));
- if (line.gettoken_str(2)[0] == '\\')
- warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
- ent.offsets[2]=add_string(line.gettoken_str(3));
- if (which_token == TOK_WRITEREGSTR || which_token == TOK_WRITEREGEXPANDSTR)
- {
- SCRIPT_MSG("%s: %s\\%s\\%s=%s\n",
- line.gettoken_str(0),line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- ent.offsets[3]=add_string(line.gettoken_str(4));
- ent.offsets[4]=ent.offsets[5]=REG_SZ;
- if (which_token == TOK_WRITEREGEXPANDSTR)
- {
- ent.offsets[5]=REG_EXPAND_SZ;
- }
- }
- if (which_token == TOK_WRITEREGBIN)
- {
- char data[3*NSIS_MAX_STRLEN];
- char *p=line.gettoken_str(4);
- int data_len=0;
- while (*p)
- {
- int c;
- int a,b;
- a=*p;
- if (a >= '0' && a <= '9') a-='0';
- else if (a >= 'a' && a <= 'f') a-='a'-10;
- else if (a >= 'A' && a <= 'F') a-='A'-10;
- else break;
- b=*++p;
- if (b >= '0' && b <= '9') b-='0';
- else if (b >= 'a' && b <= 'f') b-='a'-10;
- else if (b >= 'A' && b <= 'F') b-='A'-10;
- else break;
- p++;
- c=(a<<4)|b;
- if (data_len >= 3*NSIS_MAX_STRLEN)
- {
- ERROR_MSG("WriteRegBin: %d bytes of data exceeded\n",3*NSIS_MAX_STRLEN);
- return PS_ERROR;
- }
- data[data_len++]=c;
- }
- if (*p) PRINTHELP()
- SCRIPT_MSG("WriteRegBin: %s\\%s\\%s=%s\n",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- ent.offsets[3]=add_db_data(data,data_len);
- if (ent.offsets[3] < 0) return PS_ERROR;
- ent.offsets[4]=ent.offsets[5]=REG_BINARY;
- }
- if (which_token == TOK_WRITEREGDWORD)
- {
- ent.offsets[3]=add_string(line.gettoken_str(4));
- ent.offsets[4]=ent.offsets[5]=REG_DWORD;
-
- SCRIPT_MSG("WriteRegDWORD: %s\\%s\\%s=%s\n",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- }
- }
- return add_entry(&ent);
- case TOK_ENUMREGKEY:
- case TOK_ENUMREGVAL:
- {
- ent.which=EW_REGENUM;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- int k=line.gettoken_enum(2,rootkeys[0]);
- if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
- if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
- ent.offsets[1]=(int)rootkey_tab[k];
- ent.offsets[2]=add_string(line.gettoken_str(3));
- ent.offsets[3]=add_string(line.gettoken_str(4));
- ent.offsets[4]=which_token == TOK_ENUMREGKEY;
- if (line.gettoken_str(3)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
- SCRIPT_MSG("%s %s %s\\%s\\%s\n",which_token == TOK_ENUMREGKEY ? "EnumRegKey" : "EnumRegValue",
- line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_REGISTRYFUNCTIONS
- case TOK_READREGSTR:
- case TOK_READREGDWORD:
- case TOK_DELETEREGVALUE:
- case TOK_DELETEREGKEY:
- case TOK_WRITEREGSTR:
- case TOK_WRITEREGEXPANDSTR:
- case TOK_WRITEREGBIN:
- case TOK_WRITEREGDWORD:
- case TOK_ENUMREGKEY:
- case TOK_ENUMREGVAL:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_REGISTRYFUNCTIONS not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_REGISTRYFUNCTIONS
-#ifdef NSIS_SUPPORT_STACK
- case TOK_EXCH:
- {
- int swapitem=1;
- int save=GetUserVarIndex(line, 1);
- ent.which=EW_PUSHPOP;
- if (line.gettoken_str(1)[0] && save<0)
- {
- int s=0;
- swapitem=line.gettoken_int(1,&s);
- if (!s || swapitem <= 0) PRINTHELP()
- }
- if (save>=0)
- {
- SCRIPT_MSG("Exch(%s,0)\n",line.gettoken_str(1));
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=0;
- ent.offsets[2]=0;
- add_entry(&ent);
- }
- else SCRIPT_MSG("Exch(st(%d),0)\n",swapitem);
-
- ent.offsets[0]=0;
- ent.offsets[1]=0;
- ent.offsets[2]=swapitem;
-
- if (save>=0)
- {
- add_entry(&ent);
- ent.offsets[0]=save;
- ent.offsets[1]=1;
- ent.offsets[2]=0;
- }
-
- DefineInnerLangString(NLF_INST_CORRUPTED);
- }
- return add_entry(&ent);
- case TOK_PUSH:
- ent.which=EW_PUSHPOP;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=0;
- SCRIPT_MSG("Push: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_POP:
- ent.which=EW_PUSHPOP;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=1;
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("Pop: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_STACK
- case TOK_POP:
- case TOK_PUSH:
- case TOK_EXCH:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_STACK not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_STACK
-#ifdef NSIS_SUPPORT_ENVIRONMENT
- case TOK_READENVSTR:
- ent.which=EW_READENVSTR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- {
- char str[NSIS_MAX_STRLEN];
- strcpy(str, "%");
- strcat(str, line.gettoken_str(2));
- strcat(str, "%");
- ent.offsets[1]=add_string(str);
- if (ent.offsets[0] < 0 || strlen(line.gettoken_str(2))<1) PRINTHELP()
- }
- ent.offsets[2]=1;
- SCRIPT_MSG("ReadEnvStr: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_EXPANDENVSTRS:
- ent.which=EW_READENVSTR;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=0;
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("ExpandEnvStrings: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_ENVIRONMENT
- case TOK_EXPANDENVSTRS:
- case TOK_READENVSTR:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_ENVIRONMENT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_ENVIRONMENT
-#ifdef NSIS_SUPPORT_FINDFIRST
- case TOK_FINDFIRST:
- ent.which=EW_FINDFIRST;
- ent.offsets[0]=GetUserVarIndex(line, 2); // out
- ent.offsets[1]=GetUserVarIndex(line, 1); // handleout
- ent.offsets[2]=add_string(line.gettoken_str(3)); // filespec
- if (ent.offsets[0] < 0 || ent.offsets[1] < 0) PRINTHELP()
- SCRIPT_MSG("FindFirst: spec=\"%s\" handle=%s output=%s\n",line.gettoken_str(3),line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_FINDNEXT:
- ent.which=EW_FINDNEXT;
- ent.offsets[0]=GetUserVarIndex(line, 2);
- ent.offsets[1]=GetUserVarIndex(line, 1);
- if (ent.offsets[0] < 0 || ent.offsets[1] < 0) PRINTHELP()
- SCRIPT_MSG("FindNext: handle=%s output=%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_FINDCLOSE:
- ent.which=EW_FINDCLOSE;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("FindClose: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_FINDFIRST
- case TOK_FINDCLOSE:
- case TOK_FINDNEXT:
- case TOK_FINDFIRST:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FINDFIRST not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-
-#endif//!NSIS_SUPPORT_FINDFIRST
-
-
-#ifdef NSIS_SUPPORT_FILEFUNCTIONS
- case TOK_FILEOPEN:
- {
- ent.which=EW_FOPEN;
- ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
- ent.offsets[3]=add_string(line.gettoken_str(2));
- ent.offsets[1]=0; //openmode
- if (!stricmp(line.gettoken_str(3),"r"))
- {
- ent.offsets[1]=GENERIC_READ;
- ent.offsets[2]=OPEN_EXISTING;
- }
- else if (!stricmp(line.gettoken_str(3),"w"))
- {
- ent.offsets[1]=GENERIC_WRITE;
- ent.offsets[2]=CREATE_ALWAYS;
- }
- else if (!stricmp(line.gettoken_str(3),"a"))
- {
- ent.offsets[1]=GENERIC_WRITE|GENERIC_READ;
- ent.offsets[2]=OPEN_ALWAYS;
- }
-
- if (ent.offsets[0] < 0 || !ent.offsets[1]) PRINTHELP()
- }
- SCRIPT_MSG("FileOpen: %s as %s -> %s\n",line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_FILECLOSE:
- ent.which=EW_FCLOSE;
- ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
- if (ent.offsets[0] < 0) PRINTHELP()
- SCRIPT_MSG("FileClose: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_FILEREAD:
- ent.which=EW_FGETS;
- ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
- ent.offsets[1]=GetUserVarIndex(line, 2); // output string
- if (line.gettoken_str(3)[0])
- ent.offsets[2]=add_string(line.gettoken_str(3));
- else
- ent.offsets[2]=add_intstring(NSIS_MAX_STRLEN-1);
- if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("FileRead: %s->%s (max:%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
- return add_entry(&ent);
- case TOK_FILEWRITE:
- ent.which=EW_FPUTS;
- ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
- ent.offsets[1]=add_string(line.gettoken_str(2));
- if (ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("FileWrite: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_FILEREADBYTE:
- ent.which=EW_FGETS;
- ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
- ent.offsets[1]=GetUserVarIndex(line, 2); // output string
- ent.offsets[2]=add_string("1");
- ent.offsets[3]=1;
- if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("FileReadByte: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_FILEWRITEBYTE:
- ent.which=EW_FPUTS;
- ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=1;
- if (ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("FileWriteByte: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_FILESEEK:
- {
- char *modestr;
- int tab[3]={FILE_BEGIN,FILE_CURRENT,FILE_END};
- int mode=line.gettoken_enum(3,"SET\0CUR\0END\0");
- ent.which=EW_FSEEK;
- ent.offsets[0]=GetUserVarIndex(line, 1);
- ent.offsets[1]=GetUserVarIndex(line, 4);
- ent.offsets[2]=add_string(line.gettoken_str(2));
-
- if (mode<0 && !line.gettoken_str(3)[0])
- {
- mode=0;
- modestr="SET";
- }
- else modestr=line.gettoken_str(3);
-
- if (mode<0 || ent.offsets[0] < 0 || (ent.offsets[1]<0 && line.gettoken_str(4)[0])) PRINTHELP()
- ent.offsets[3]=tab[mode];
- SCRIPT_MSG("FileSeek: fp=%s, ofs=%s, mode=%s, output=%s\n",
- line.gettoken_str(1),
- line.gettoken_str(2),
- modestr,
- line.gettoken_str(4));
- }
-
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_FILEFUNCTIONS
- case TOK_FILEOPEN:
- case TOK_FILECLOSE:
- case TOK_FILESEEK:
- case TOK_FILEREAD:
- case TOK_FILEWRITE:
- case TOK_FILEREADBYTE:
- case TOK_FILEWRITEBYTE:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILEFUNCTIONS not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-
-#endif//!NSIS_SUPPORT_FILEFUNCTIONS
-#ifdef NSIS_SUPPORT_REBOOT
- case TOK_REBOOT:
- {
- int ret = add_entry_direct(EW_REBOOT, 0xbadf00d);
- if (ret != PS_OK) return ret;
-
- ret = add_entry_direct(EW_QUIT);
- if (ret != PS_OK) return ret;
-
- SCRIPT_MSG("Reboot! (WOW)\n");
-
- DefineInnerLangString(NLF_INST_CORRUPTED);
- }
- return PS_OK;
- case TOK_IFREBOOTFLAG:
- ent.which=EW_IFFLAG;
- if (process_jump(line,1,&ent.offsets[0]) ||
- process_jump(line,2,&ent.offsets[1])) PRINTHELP()
- ent.offsets[2]=FLAG_OFFSET(exec_reboot);
- ent.offsets[3]=~0;//new value mask - keep flag
- SCRIPT_MSG("IfRebootFlag ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SETREBOOTFLAG:
- {
- ent.which=EW_SETFLAG;
- ent.offsets[0]=FLAG_OFFSET(exec_reboot);
- int k=line.gettoken_enum(1,"false\0true\0");
- if (k < 0) PRINTHELP()
- ent.offsets[1]=add_intstring(k);
- }
- return add_entry(&ent);
-#else//!NSIS_SUPPORT_REBOOT
- case TOK_REBOOT:
- case TOK_IFREBOOTFLAG:
- case TOK_SETREBOOTFLAG:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_REBOOT not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_REBOOT
-#ifdef NSIS_CONFIG_LOG
- case TOK_LOGSET:
- ent.which=EW_LOG;
- ent.offsets[0]=1;
- ent.offsets[1]=line.gettoken_enum(1,"off\0on\0");
- if (ent.offsets[1]<0) PRINTHELP()
-
- SCRIPT_MSG("LogSet: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_LOGTEXT:
- ent.which=EW_LOG;
- ent.offsets[0]=0;
- ent.offsets[1]=add_string(line.gettoken_str(1));
- SCRIPT_MSG("LogText \"%s\"\n",line.gettoken_str(1));
- return add_entry(&ent);
-#else//!NSIS_CONFIG_LOG
-
- case TOK_LOGSET:
- case TOK_LOGTEXT:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_LOG not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_CONFIG_LOG
-#ifdef NSIS_CONFIG_COMPONENTPAGE
- case TOK_SECTIONSETTEXT:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[2]=SECTION_FIELD_SET(name_ptr);
- ent.offsets[4]=add_string(line.gettoken_str(2));
- SCRIPT_MSG("SectionSetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONGETTEXT:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=GetUserVarIndex(line, 2);
- ent.offsets[2]=SECTION_FIELD_GET(name_ptr);
- if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("SectionGetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONSETFLAGS:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=SECTION_FIELD_SET(flags);
- ent.offsets[3]=1;
- SCRIPT_MSG("SectionSetFlags: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONGETFLAGS:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=GetUserVarIndex(line, 2);
- ent.offsets[2]=SECTION_FIELD_GET(flags);
- if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("SectionGetFlags: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_INSTTYPESETTEXT:
- ent.which=EW_INSTTYPESET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=1;
- SCRIPT_MSG("InstTypeSetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_INSTTYPEGETTEXT:
- ent.which=EW_INSTTYPESET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=GetUserVarIndex(line, 2);
- ent.offsets[2]=0;
- if (line.gettoken_str(1)[0] && ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("InstTypeGetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONSETINSTTYPES:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=SECTION_FIELD_SET(install_types);
- SCRIPT_MSG("SectionSetInstTypes: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONGETINSTTYPES:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=GetUserVarIndex(line, 2);
- ent.offsets[2]=SECTION_FIELD_GET(install_types);
- if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("SectionGetInstTypes: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONSETSIZE:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=add_string(line.gettoken_str(2));
- ent.offsets[2]=SECTION_FIELD_SET(size_kb);
- SCRIPT_MSG("SectionSetSize: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SECTIONGETSIZE:
- ent.which=EW_SECTIONSET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=GetUserVarIndex(line, 2);
- ent.offsets[2]=SECTION_FIELD_GET(size_kb);
- if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
- SCRIPT_MSG("SectionGetSize: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
- return add_entry(&ent);
- case TOK_SETCURINSTTYPE:
- ent.which=EW_INSTTYPESET;
- ent.offsets[0]=add_string(line.gettoken_str(1));
- ent.offsets[1]=0;
- ent.offsets[2]=1;
- ent.offsets[3]=1;
- SCRIPT_MSG("SetCurInstType: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
- case TOK_GETCURINSTTYPE:
- ent.which=EW_INSTTYPESET;
- ent.offsets[0]=0;
- ent.offsets[1]=GetUserVarIndex(line,1);
- ent.offsets[2]=0;
- ent.offsets[3]=1;
- if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP()
- SCRIPT_MSG("GetCurInstType: %s\n",line.gettoken_str(1));
- return add_entry(&ent);
-#else//!NSIS_CONFIG_COMPONENTPAGE
- case TOK_SECTIONSETTEXT:
- case TOK_SECTIONGETTEXT:
- case TOK_SECTIONSETFLAGS:
- case TOK_SECTIONGETFLAGS:
- case TOK_SECTIONSETSIZE:
- case TOK_SECTIONGETSIZE:
- case TOK_SECTIONSETINSTTYPES:
- case TOK_SECTIONGETINSTTYPES:
- case TOK_SETCURINSTTYPE:
- case TOK_GETCURINSTTYPE:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPONENTPAGE not defined.\n", line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_CONFIG_COMPONENTPAGE
-#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
- case TOK_SETBRANDINGIMAGE:
- {
- SCRIPT_MSG("SetBrandingImage: ");
- if (!branding_image_found) {
- ERROR_MSG("\nError: no branding image found in chosen UI!\n");
- return PS_ERROR;
- }
- ent.which=EW_SETBRANDINGIMAGE;
- for (int i = 1; i < line.getnumtokens(); i++)
- if (!strnicmp(line.gettoken_str(i),"/IMGID=",7)) {
- ent.offsets[1]=atoi(line.gettoken_str(i)+7);
- SCRIPT_MSG("/IMGID=%d ",ent.offsets[1]);
- }
- else if (!stricmp(line.gettoken_str(i),"/RESIZETOFIT")) {
- ent.offsets[2]=1; // must be 1 or 0
- SCRIPT_MSG("/RESIZETOFIT ");
- }
- else if (!ent.offsets[0]) {
- ent.offsets[0]=add_string(line.gettoken_str(i));
- SCRIPT_MSG("\"%s\" ", line.gettoken_str(i));
- }
- else {
- SCRIPT_MSG("\n");
- PRINTHELP();
- }
-
- if (!ent.offsets[1])
- ent.offsets[1]=branding_image_id;
- SCRIPT_MSG("\n");
- }
- return add_entry(&ent);
-#else//NSIS_CONFIG_ENHANCEDUI_SUPPORT
- case TOK_SETBRANDINGIMAGE:
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n",line.gettoken_str(0));
- return PS_ERROR;
-#endif//!NSIS_SUPPORT_CREATEFONT
-
- // Added by ramon 3 jun 2003
- case TOK_DEFVAR:
- {
- int a=1;
-
- if (!strcmpi(line.gettoken_str(1),"/GLOBAL"))
- {
- a++;
- }
-
- if (build_cursection)
- {
- if (a==1)
- {
- ERROR_MSG("Var: currently, only global variables can be defined.\n");
- PRINTHELP();
- }
- }
-
- SCRIPT_MSG("Var: \"%s\"\n",line.gettoken_str(a));
-
- int res = DeclaredUserVar(line.gettoken_str(a));
- if (res != PS_OK)
- return res;
-
- }
- return PS_OK;
-
- // Added by ramon 6 jun 2003
-#ifdef NSIS_SUPPORT_VERSION_INFO
- case TOK_VI_ADDKEY:
- {
- LANGID LangID=0;
- int a = 1;
- if (!strnicmp(line.gettoken_str(a),"/LANG=",6))
- LangID=atoi(line.gettoken_str(a++)+6);
- if (line.getnumtokens()!=a+2) PRINTHELP();
- char *pKey = line.gettoken_str(a);
- char *pValue = line.gettoken_str(a+1);
- if ( !(*pKey) )
- {
- ERROR_MSG("Error: empty name for version info key!\n");
- return PS_ERROR;
- }
- else
- {
- SCRIPT_MSG("%s: \"%s\" \"%s\"\n", line.gettoken_str(0), line.gettoken_str(a), line.gettoken_str(a+1));
- LANGID lReaded = LangID;
- if ( a > 1 && lReaded == 0 )
- warning_fl("%s: %s language not loaded, using default \"1033-English\"", line.gettoken_str(0), line.gettoken_str(1));
-
- unsigned int codepage;
- char *lang_name = GetLangNameAndCP(LangID, &codepage);
-
- if ( rVersionInfo.SetKeyValue(LangID, codepage, pKey, pValue) )
- {
- ERROR_MSG("%s: \"%s\" \"%04d-%s\" already defined!\n",line.gettoken_str(0), line.gettoken_str(2), LangID, lang_name);
- return PS_ERROR;
- }
-
- return PS_OK;
- }
- }
- case TOK_VI_SETPRODUCTVERSION:
- if ( version_product_v[0] )
- {
- ERROR_MSG("Error: %s already defined!\n", line.gettoken_str(0));
- return PS_ERROR;
- }
- strcpy(version_product_v, line.gettoken_str(1));
- return PS_OK;
-
-#else
- case TOK_VI_ADDKEY:
- case TOK_VI_SETPRODUCTVERSION:
- ERROR_MSG("Error: %s specified, NSIS_SUPPORT_VERSION_INFO not defined.\n",line.gettoken_str(0));
- return PS_ERROR;
-#endif
-
- // end of instructions
- ///////////////////////////////////////////////////////////////////////////////
-
- // Added by Ximon Eighteen 5th August 2002
-#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
- case TOK_PLUGINDIR:
- {
- if (line.getnumtokens() == 2)
- {
- SCRIPT_MSG("PluginDir: \"%s\"\n",line.gettoken_str(1));
-#ifdef _WIN32
- m_plugins.FindCommands(line.gettoken_str(1), display_info?true:false);
-#else
- char *converted_path = my_convert(line.gettoken_str(1));
- m_plugins.FindCommands(converted_path, display_info?true:false);
- my_convert_free(converted_path);
-#endif
- return PS_OK;
- }
- }
- return PS_ERROR;
- case TOK__PLUGINCOMMAND:
- {
- int ret;
-
- const string command = m_plugins.NormalizedCommand(line.gettoken_str(0));
- const string dllPath = m_plugins.GetPluginPath(command);
- int data_handle = m_plugins.GetPluginHandle(uninstall_mode?true:false, command);
-
- if (uninstall_mode) uninst_plugin_used = true;
- else plugin_used = true;
-
- // Initialize $PLUGINSDIR
- ent.which=EW_CALL;
- ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0);
- ret=add_entry(&ent);
- if (ret != PS_OK) {
- return ret;
- }
-
- // DLL name on the user machine
- char tempDLL[NSIS_MAX_STRLEN];
- string dllName = get_file_name(dllPath);
- wsprintf(tempDLL, "$PLUGINSDIR\\%s", dllName.c_str());
-
- // Add the DLL to the installer
- if (data_handle == -1)
- {
- int files_added;
- int old_build_allowskipfiles=build_allowskipfiles;
- build_allowskipfiles=1; // on
- int old_build_overwrite=build_overwrite;
- build_overwrite=1; // off
- int old_build_datesave=build_datesave;
- build_datesave=0; // off
- ret=do_add_file(dllPath.c_str(),0,0,&files_added,tempDLL,2,&data_handle); // 2 means no size add
- if (ret != PS_OK) {
- return ret;
- }
- m_plugins.SetDllDataHandle(uninstall_mode?true:false, line.gettoken_str(0), data_handle);
- build_overwrite=old_build_overwrite;
- build_datesave=old_build_datesave;
- // Added by ramon 23 May 2003
- build_allowskipfiles=old_build_allowskipfiles;
- }
- else
- {
- ent.which=EW_EXTRACTFILE;
-
- DefineInnerLangString(NLF_SKIPPED);
- DefineInnerLangString(NLF_ERR_DECOMPRESSING);
- DefineInnerLangString(NLF_ERR_WRITING);
- DefineInnerLangString(NLF_EXTRACT);
- DefineInnerLangString(NLF_CANT_WRITE);
-
- ent.offsets[0]=1; // overwrite off
- ent.offsets[0]|=(MB_RETRYCANCEL|MB_ICONSTOP|(IDCANCEL<<21))<<3;
- ent.offsets[1]=add_string(tempDLL);
- ent.offsets[2]=data_handle;
- ent.offsets[3]=0xffffffff;
- ent.offsets[4]=0xffffffff;
- ent.offsets[5]=DefineInnerLangString(NLF_FILE_ERROR);
- ret=add_entry(&ent);
- if (ret != PS_OK) {
- return ret;
- }
- }
-
- // SetDetailsPrint lastused
- ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), 0, 1);
- if (ret != PS_OK) {
- return ret;
- }
-
- // Call the DLL
- string funcname = get_string_suffix(command, "::");
- SCRIPT_MSG("Plugin Command: %s",funcname.c_str());
-
- int i = 1;
- int nounload = 0;
- if (!strcmpi(line.gettoken_str(i), "/NOUNLOAD")) {
- i++;
- nounload++;
- }
-
- // First push dll args
-
- int parmst=i; // we push em in reverse order
- int nounloadmisused=0;
- for (; i < line.getnumtokens(); i++) {
- int w=parmst + (line.getnumtokens()-i - 1);
- ent.which=EW_PUSHPOP;
- ent.offsets[0]=add_string(line.gettoken_str(w));
- if (!strcmpi(line.gettoken_str(w), "/NOUNLOAD")) nounloadmisused=1;
- ent.offsets[1]=0;
- ent.offsets[2]=0;
- ret=add_entry(&ent);
- if (ret != PS_OK) {
- return ret;
- }
- SCRIPT_MSG(" %s",line.gettoken_str(i));
- }
- SCRIPT_MSG("\n");
- if (nounloadmisused)
- warning_fl("/NOUNLOAD must come first before any plugin parameter. Unless the plugin you are trying to use has a parameter /NOUNLOAD, you are doing something wrong");
-
- // next, call it
- ent.which=EW_REGISTERDLL;
- ent.offsets[0]=add_string(tempDLL);;
- ent.offsets[1]=add_string(funcname.c_str());
- ent.offsets[2]=0;
- ent.offsets[3]=nounload|build_plugin_unload;
- ent.offsets[4]=1;
- ret=add_entry(&ent);
- if (ret != PS_OK) {
- return ret;
- }
-
- DefineInnerLangString(NLF_SYMBOL_NOT_FOUND);
- DefineInnerLangString(NLF_COULD_NOT_LOAD);
- DefineInnerLangString(NLF_NO_OLE);
- // not used anywhere - DefineInnerLangString(NLF_ERR_REG_DLL);
-
- return PS_OK;
- }
- case TOK_INITPLUGINSDIR:
- {
- int ret;
- SCRIPT_MSG("%s\n",line.gettoken_str(0));
- if (uninstall_mode) uninst_plugin_used = true;
- else plugin_used = true;
- // Call [un.]Initialize_____Plugins
- ent.which=EW_CALL;
- ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0);
- ret=add_entry(&ent);
- if (ret != PS_OK) return ret;
- // SetDetailsPrint lastused
- ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), 0, 1);
- if (ret != PS_OK) return ret;
- }
- return PS_OK;
-#else
- case TOK_PLUGINDIR:
- case TOK__PLUGINCOMMAND:
- case TOK_INITPLUGINSDIR:
- {
- ERROR_MSG("Error: %s specified, NSIS_CONFIG_PLUGIN_SUPPORT not defined.\n",line.gettoken_str(0));
- }
- return PS_ERROR;
-#endif// NSIS_CONFIG_PLUGIN_SUPPORT
-
-#ifdef NSIS_LOCKWINDOW_SUPPORT
- case TOK_LOCKWINDOW:
- SCRIPT_MSG("LockWindow: lock state=%d\n",line.gettoken_str(1));
- ent.which=EW_LOCKWINDOW;
- ent.offsets[0]=line.gettoken_enum(1,"on\0off\0");
- if (ent.offsets[0] == -1)
- PRINTHELP();
- return add_entry(&ent);
-#else
- case TOK_LOCKWINDOW:
- {
- ERROR_MSG("Error: %s specified, NSIS_LOCKWINDOW_SUPPORT not defined.\n",line.gettoken_str(0));
- }
- return PS_ERROR;
-#endif // NSIS_LOCKWINDOW_SUPPORT
-
- default: break;
-
- }
- ERROR_MSG("Error: doCommand: Invalid token \"%s\".\n",line.gettoken_str(0));
- return PS_ERROR;
-}
-
-#ifdef NSIS_SUPPORT_FILE
-int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int *total_files, const char *name_override, int generatecode, int *data_handle, const set<string>& excluded, const string& basedir, bool dir_created)
-{
- assert(!name_override || !recurse);
-
- string dir = get_dir_name(lgss);
- string spec;
-
- if (dir == lgss) {
- dir = ".";
- spec = lgss;
- } else {
- spec = string(lgss).substr(dir.length() + 1, string::npos);
- }
-
- if (spec == "") {
- spec = "*";
- }
-
- if (basedir == "") {
- dir_created = true;
-
- if (recurse) {
- // save $OUTDIR into $_OUTDIR [StrCpy $_OUTDIR $OUTDIR]
- if (add_entry_direct(EW_ASSIGNVAR, m_UserVarNames.get("_OUTDIR"), add_string("$OUTDIR")) != PS_OK) {
- return PS_ERROR;
- }
- }
- }
-
- boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
- dr->exclude(excluded);
- dr->read(dir);
-
- // add files in the current directory
- for (dir_reader::iterator files_itr = dr->files().begin();
- files_itr != dr->files().end();
- files_itr++)
- {
- if (!dir_reader::matches(*files_itr, spec))
- continue;
-
- if (!dir_created && generatecode) {
- SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode ? "" : "Reserve", dir.c_str());
-
- if (do_add_file_create_dir(dir, basedir, attrib) != PS_OK) {
- return PS_ERROR;
- }
-
- dir_created = true;
- }
-
- if (add_file(dir, *files_itr, attrib, name_override, generatecode, data_handle) != PS_OK) {
- return PS_ERROR;
- }
-
- (*total_files)++;
- }
-
- if (!recurse) {
- return PS_OK;
- }
-
- // recurse into directories
- for (dir_reader::iterator dirs_itr = dr->dirs().begin();
- dirs_itr != dr->dirs().end();
- dirs_itr++)
- {
- string new_dir;
- bool created = false;
-
- if (basedir == "") {
- new_dir = *dirs_itr;
- } else {
- new_dir = basedir + '\\' + *dirs_itr;
- }
-
- string new_spec = dir + PLATFORM_PATH_SEPARATOR_STR + *dirs_itr + PLATFORM_PATH_SEPARATOR_STR;
-
- if (!dir_reader::matches(*dirs_itr, spec)) {
- new_spec += spec;
- } else if (generatecode) {
- // always create directories that match
-
- SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode ? "" : "Reserve", new_spec.c_str());
-
- if (do_add_file_create_dir(dir + '\\' + *dirs_itr, new_dir, attrib) != PS_OK) {
- return PS_ERROR;
- }
-
- created = true;
- }
-
- const char *new_spec_c = new_spec.c_str();
-
- int res = do_add_file(new_spec_c, attrib, 1, total_files, NULL, generatecode, NULL, excluded, new_dir, created);
- if (res != PS_OK) {
- return PS_ERROR;
- }
- }
-
- if (basedir == "") {
- SCRIPT_MSG("%sFile: Returning to: \"%s\"\n", generatecode ? "" : "Reserve", dir.c_str());
-
- // restore $OUTDIR from $_OUTDIR [SetOutPath $_OUTDIR]
- if (add_entry_direct(EW_CREATEDIR, add_string("$_OUTDIR"), 1) != PS_OK) {
- return PS_ERROR;
- }
- }
-
- return PS_OK;
-}
-
-int CEXEBuild::add_file(const string& dir, const string& file, int attrib, const char *name_override, int generatecode, int *data_handle) {
- string newfn_s = dir + PLATFORM_PATH_SEPARATOR_C + file;
- const char *newfn = newfn_s.c_str();
- const char *filename = file.c_str();
-
- MMapFile mmap;
- DWORD len;
-
-#ifdef _WIN32
- HANDLE hFile = CreateFile(
- newfn,
- GENERIC_READ,
- FILE_SHARE_READ,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
- NULL
- );
- if (hFile == INVALID_HANDLE_VALUE)
- {
- ERROR_MSG("%sFile: failed opening file \"%s\"\n",generatecode?"":"Reserve",newfn);
- return PS_ERROR;
- }
-
- // Will auto-CloseHandle hFile
- MANAGE_WITH(hFile, CloseHandle);
-
- len = GetFileSize(hFile, NULL);
- if (len && !mmap.setfile(hFile, len))
- {
- ERROR_MSG("%sFile: failed creating mmap of \"%s\"\n",generatecode?"":"Reserve",newfn);
- return PS_ERROR;
- }
-#else
- struct stat s;
- if (stat(newfn, &s)) {
- ERROR_MSG("%sFile: failed stating file \"%s\"\n",generatecode?"":"Reserve",newfn);
- return PS_ERROR;
- }
-
- len = (DWORD) s.st_size;
-
- int fd = OPEN(newfn, O_RDONLY);
- if (fd == -1)
- {
- ERROR_MSG("%sFile: failed opening file \"%s\"\n",generatecode?"":"Reserve",newfn);
- return PS_ERROR;
- }
-
- // Will auto-close(2) fd
- MANAGE_WITH(fd, close);
-
- if (len && !mmap.setfile(fd, len))
- {
- ERROR_MSG("%sFile: failed creating mmap of \"%s\"\n",generatecode?"":"Reserve",newfn);
- return PS_ERROR;
- }
-#endif
-
- if (generatecode&1)
- section_add_size_kb((len+1023)/1024);
- if (name_override) SCRIPT_MSG("%sFile: \"%s\"->\"%s\"",generatecode?"":"Reserve",filename,name_override);
- else SCRIPT_MSG("%sFile: \"%s\"",generatecode?"":"Reserve",filename);
- if (!build_compress_whole)
- if (build_compress) SCRIPT_MSG(" [compress]");
- fflush(stdout);
- char buf[1024];
- int last_build_datablock_used=getcurdbsize();
- entry ent={0,};
- if (generatecode)
- {
- ent.which=EW_EXTRACTFILE;
-
- DefineInnerLangString(NLF_SKIPPED);
- DefineInnerLangString(NLF_ERR_DECOMPRESSING);
- DefineInnerLangString(NLF_ERR_WRITING);
- DefineInnerLangString(NLF_EXTRACT);
- DefineInnerLangString(NLF_CANT_WRITE);
-
- ent.offsets[0]=build_overwrite;
- if (name_override)
- {
- ent.offsets[1]=add_string(name_override);
- }
- else
- {
- const char *i=filename;
- char *o=buf;
- while (*i)
- {
- const char c=*i++;
- *o++=c;
- if (c == '$') *o++='$';
- }
- *o=0;
- ent.offsets[1]=add_string(buf);
- }
- }
- ent.offsets[2]=add_db_data(&mmap);
-
- mmap.clear();
-
- if (ent.offsets[2] < 0)
- {
- return PS_ERROR;
- }
-
- if (data_handle)
- {
- *data_handle=ent.offsets[2];
- }
-
- {
- DWORD s=getcurdbsize()-last_build_datablock_used;
- if (s) s-=4;
- if (s != len) SCRIPT_MSG(" %d/%d bytes\n",s,len);
- else SCRIPT_MSG(" %d bytes\n",len);
- }
-
- if (generatecode)
- {
- if (build_datesave || build_overwrite>=0x3 /*ifnewer or ifdiff*/)
- {
-#ifdef _WIN32
- FILETIME ft;
- if (GetFileTime(hFile,NULL,NULL,&ft))
- {
- // FAT write time has a resolution of 2 seconds
- PULONGLONG fti = (PULONGLONG) &ft;
- *fti -= *fti % 20000000;
-
- ent.offsets[3]=ft.dwLowDateTime;
- ent.offsets[4]=ft.dwHighDateTime;
- }
-#else
- struct stat st;
- if (!fstat(fd, &st))
- {
- unsigned long long ll = (st.st_mtime * 10000000LL) + 116444736000000000LL;
-
- // FAT write time has a resolution of 2 seconds
- ll -= ll % 20000000;
-
- ent.offsets[3] = (int) ll;
- ent.offsets[4] = (int) (ll >> 32);
- }
-#endif
- else
- {
- ERROR_MSG("%sFile: failed getting file date from \"%s\"\n",generatecode?"":"Reserve",newfn);
- return PS_ERROR;
- }
- }
- else
- {
- ent.offsets[3]=0xffffffff;
- ent.offsets[4]=0xffffffff;
- }
-
- // overwrite flag can be 0, 1, 2 or 3. in all cases, 2 bits
- int mb = 0;
- if (build_allowskipfiles)
- {
- mb = MB_ABORTRETRYIGNORE | MB_ICONSTOP;
- // default for silent installers
- mb |= IDIGNORE << 21;
- }
- else
- {
- mb = MB_RETRYCANCEL | MB_ICONSTOP;
- // default for silent installers
- mb |= IDCANCEL << 21;
- }
- ent.offsets[0] |= mb << 3;
-
- ent.offsets[5] = DefineInnerLangString(build_allowskipfiles ? NLF_FILE_ERROR : NLF_FILE_ERROR_NOIGNORE);
- }
-
- if (generatecode)
- {
- int a=add_entry(&ent);
- if (a != PS_OK)
- {
- return a;
- }
- if (attrib)
- {
-#ifdef _WIN32
- ent.which=EW_SETFILEATTRIBUTES;
- // $OUTDIR is the working directory
- ent.offsets[0]=add_string(name_override?name_override:buf);
- ent.offsets[1]=GetFileAttributes(newfn);
- ent.offsets[2]=0;
- ent.offsets[3]=0;
- ent.offsets[4]=0;
- ent.offsets[5]=0;
-
- if (ent.offsets[1] != INVALID_FILE_ATTRIBUTES)
- {
- a=add_entry(&ent);
- if (a != PS_OK)
- {
- return a;
- }
- }
-#endif
- }
- }
-
- return PS_OK;
-}
-
-int CEXEBuild::do_add_file_create_dir(const string& local_dir, const string& dir, int attrib) {
- string outdir_s = "$_OUTDIR\\" + dir;
-
- string::size_type pos = 1;
- pos = outdir_s.find('$', pos);
- while (pos != string::npos) {
- outdir_s = outdir_s.insert(pos, "$");
- pos = outdir_s.find('$', pos + 2);
- }
-
- int outdir = add_string(outdir_s.c_str());
-
- if (add_entry_direct(EW_CREATEDIR, outdir, 1) != PS_OK) {
- return PS_ERROR;
- }
-
-#ifdef _WIN32
- if (attrib) {
- int ndc = add_string(".");
-
- DWORD attr = GetFileAttributes(local_dir.c_str());
-
- if (attr != INVALID_FILE_ATTRIBUTES)
- {
- if (add_entry_direct(EW_SETFILEATTRIBUTES, ndc, attr) != PS_OK)
- {
- return PS_ERROR;
- }
- }
- }
-#endif
-
- return PS_OK;
-}
-#endif
+/*
+ * script.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <stdio.h>
+#include <ctype.h>
+#include "tokens.h"
+#include "build.h"
+#include "util.h"
+#include "winchar.h"
+#include "ResourceEditor.h"
+#include "DialogTemplate.h"
+#include "lang.h"
+#include "dirreader.h"
+#include "version.h"
+#include "icon.h"
+#include "exehead/resource.h"
+#include <cassert> // for assert(3)
+#include <time.h>
+#include <string>
+#include <algorithm>
+#include "boost/scoped_ptr.hpp"
+
+using namespace std;
+
+#ifdef _WIN32
+# include <direct.h> // for chdir
+#else
+# include <sys/stat.h> // for stat and umask
+# include <sys/types.h> // for mode_t
+# include <fcntl.h> // for O_RDONLY
+# include <unistd.h>
+# include <stdlib.h> // for mkstemp
+#endif
+
+#define MAX_INCLUDEDEPTH 10
+#define MAX_LINELENGTH 16384
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+// Added by Sunil Kamath 11 June 2003
+char *CEXEBuild::set_file_predefine(char *filename)
+{
+ char *oldfilename = definedlist.find("__FILE__");
+ if(oldfilename)
+ {
+ oldfilename = strdup(oldfilename);
+ definedlist.del("__FILE__");
+ }
+ char *p = strrchr(filename,'\\');
+ if(p) {
+ p++;
+ }
+ else {
+ p = curfilename;
+ }
+ definedlist.add("__FILE__",p);
+
+ return oldfilename;
+}
+
+void CEXEBuild::restore_file_predefine(char *oldfilename)
+{
+ definedlist.del("__FILE__");
+ if(oldfilename) {
+ definedlist.add("__FILE__",oldfilename);
+ free(oldfilename);
+ }
+}
+
+char *CEXEBuild::set_timestamp_predefine(char *filename)
+{
+ char *oldtimestamp = definedlist.find("__TIMESTAMP__");
+ if(oldtimestamp) {
+ oldtimestamp = strdup(oldtimestamp);
+ definedlist.del("__TIMESTAMP__");
+ }
+
+#ifdef _WIN32
+ char timestampbuf[256] = "";
+ char datebuf[128] = "";
+ char timebuf[128] = "";
+ WIN32_FIND_DATA fd;
+ FILETIME floctime;
+ SYSTEMTIME stime;
+
+ HANDLE hSearch = FindFirstFile(filename, &fd);
+ if (hSearch != INVALID_HANDLE_VALUE)
+ {
+ FindClose(hSearch);
+
+ FileTimeToLocalFileTime(&fd.ftLastWriteTime, &floctime);
+ FileTimeToSystemTime(&floctime, &stime);
+
+ GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &stime, NULL, datebuf, sizeof(datebuf));
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf));
+ wsprintf(timestampbuf,"%s %s",datebuf,timebuf);
+
+ definedlist.add("__TIMESTAMP__",timestampbuf);
+ }
+#else
+ struct stat st;
+ if (!stat(filename, &st))
+ definedlist.add("__TIMESTAMP__",ctime(&st.st_mtime));
+#endif
+
+ return oldtimestamp;
+}
+
+void CEXEBuild::restore_timestamp_predefine(char *oldtimestamp)
+{
+ definedlist.del("__TIMESTAMP__");
+ if(oldtimestamp) {
+ definedlist.add("__TIMESTAMP__",oldtimestamp);
+ free(oldtimestamp);
+ }
+}
+
+char *CEXEBuild::set_line_predefine(int linecnt, BOOL is_macro)
+{
+ char* linebuf = NULL;
+ MANAGE_WITH(linebuf, free);
+
+ char temp[128] = "";
+ sprintf(temp,"%d",linecnt);
+
+ char *oldline = definedlist.find("__LINE__");
+ if(oldline) {
+ oldline = strdup(oldline);
+ definedlist.del("__LINE__");
+ }
+ if(is_macro && oldline) {
+ linebuf = (char *)malloc(strlen(oldline)+strlen(temp)+2);
+ sprintf(linebuf,"%s.%s",oldline,temp);
+ }
+ else {
+ linebuf = strdup(temp);
+ }
+ definedlist.add("__LINE__",linebuf);
+
+ return oldline;
+}
+
+void CEXEBuild::restore_line_predefine(char *oldline)
+{
+ definedlist.del("__LINE__");
+ if(oldline) {
+ definedlist.add("__LINE__",oldline);
+ free(oldline);
+ }
+}
+
+void CEXEBuild::set_date_time_predefines()
+{
+ time_t etime;
+ struct tm * ltime;
+ char datebuf[128];
+ char timebuf[128];
+
+ time(&etime);
+ ltime = localtime(&etime);
+#ifdef _WIN32
+ SYSTEMTIME stime;
+ stime.wYear = ltime->tm_year+1900;
+ stime.wMonth = ltime->tm_mon + 1;
+ stime.wDay = ltime->tm_mday;
+ stime.wHour= ltime->tm_hour;
+ stime.wMinute= ltime->tm_min;
+ stime.wSecond= ltime->tm_sec;
+ stime.wMilliseconds= 0;
+ GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &stime, NULL, datebuf, sizeof(datebuf));
+ definedlist.add("__DATE__",(char *)datebuf);
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf));
+ definedlist.add("__TIME__",(char *)timebuf);
+#else
+ my_strftime(datebuf, sizeof(datebuf), "%x", ltime);
+ definedlist.add("__DATE__",(char *)datebuf);
+ my_strftime(timebuf, sizeof(timebuf), "%X", ltime);
+ definedlist.add("__TIME__",(char *)timebuf);
+#endif
+}
+
+void CEXEBuild::del_date_time_predefines()
+{
+ definedlist.del("__DATE__");
+ definedlist.del("__TIME__");
+}
+#endif
+
+int CEXEBuild::process_script(FILE *filepointer, char *filename)
+{
+ linecnt = 0;
+ fp = filepointer;
+ curfilename = filename;
+
+ if (has_called_write_output)
+ {
+ ERROR_MSG("Error (process_script): write_output already called, can't continue\n");
+ return PS_ERROR;
+ }
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ set_date_time_predefines();
+ char *oldfilename = set_file_predefine(curfilename);
+ char *oldtimestamp = set_timestamp_predefine(curfilename);
+#endif
+
+ int ret=parseScript();
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ restore_file_predefine(oldfilename);
+ restore_timestamp_predefine(oldtimestamp);
+ del_date_time_predefines();
+#endif
+
+ fp = 0;
+ curfilename = 0;
+
+ if (m_linebuild.getlen())
+ {
+ ERROR_MSG("Error: invalid script: last line ended with \\\n");
+ return PS_ERROR;
+ }
+
+ if (ret == PS_EOF && num_ifblock())
+ {
+ ERROR_MSG("!if[macro][n]def: open at EOF - need !endif\n");
+ return PS_ERROR;
+ }
+
+ return ret;
+}
+
+#define PRINTHELP() { print_help(line.gettoken_str(0)); return PS_ERROR; }
+
+void CEXEBuild::start_ifblock()
+{
+ ifblock ib = {0, };
+ if (cur_ifblock)
+ ib.inherited_ignore = cur_ifblock->ignore || cur_ifblock->inherited_ignore;
+ int num = build_preprocessor_data.getlen() / sizeof(ifblock);
+ build_preprocessor_data.add(&ib, sizeof(ifblock));
+ cur_ifblock = (ifblock *) build_preprocessor_data.get() + num;
+}
+
+void CEXEBuild::end_ifblock()
+{
+ if (build_preprocessor_data.getlen())
+ {
+ cur_ifblock--;
+ build_preprocessor_data.resize(build_preprocessor_data.getlen() - sizeof(ifblock));
+ if (!build_preprocessor_data.getlen())
+ cur_ifblock = 0;
+ }
+}
+
+int CEXEBuild::num_ifblock()
+{
+ return build_preprocessor_data.getlen() / sizeof(ifblock);
+}
+
+// Func size: just under 200 lines (orip)
+int CEXEBuild::doParse(const char *str)
+{
+ LineParser line(inside_comment);
+ int res;
+
+ while (*str == ' ' || *str == '\t') str++;
+
+ // remove trailing slash and null, if there's a previous line
+ if (m_linebuild.getlen()>1)
+ m_linebuild.resize(m_linebuild.getlen()-2);
+
+ m_linebuild.add(str,strlen(str)+1);
+
+ // keep waiting for more lines, if this line ends with a backslash
+ if (str[0] && CharPrev(str,str+strlen(str))[0] == '\\')
+ {
+ line.parse((char*)m_linebuild.get());
+ if (line.inComment())
+ {
+ warning_fl("comment contains line-continuation character, following line will be ignored");
+ }
+ return PS_OK;
+ }
+
+ // parse before checking if the line should be ignored, so block comments won't be missed
+
+ // escaped quotes should be ignored for compile time commands that set defines
+ // because defines can be inserted in commands at a later stage
+ bool ignore_escaping = (!strnicmp((char*)m_linebuild.get(),"!define",7) || !strnicmp((char*)m_linebuild.get(),"!insertmacro",12));
+ res=line.parse((char*)m_linebuild.get(), ignore_escaping);
+
+ inside_comment = line.inCommentBlock();
+
+ // if ignoring, ignore all lines that don't begin with an exclamation mark
+ {
+ bool ignore_line = cur_ifblock && (cur_ifblock->ignore || cur_ifblock->inherited_ignore);
+ char first_char = *(char *) m_linebuild.get();
+ if (ignore_line && (first_char!='!' || !is_valid_token(line.gettoken_str(0))))
+ {
+ m_linebuild.resize(0);
+ return PS_OK;
+ }
+ }
+
+ m_linebuild.resize(0);
+
+ if (res)
+ {
+ if (res==-2) ERROR_MSG("Error: unterminated string parsing line at %s:%d\n",curfilename,linecnt);
+ else ERROR_MSG("Error: error parsing line (%s:%d)\n",curfilename,linecnt);
+ return PS_ERROR;
+ }
+
+parse_again:
+ if (line.getnumtokens() < 1) return PS_OK;
+
+ int np,op,pos;
+ int tkid=get_commandtoken(line.gettoken_str(0),&np,&op,&pos);
+ if (tkid == -1)
+ {
+ char *p=line.gettoken_str(0);
+ if (p[0] && p[strlen(p)-1]==':')
+ {
+ if (p[0] == '!' || (p[0] >= '0' && p[0] <= '9') || p[0] == '$' || p[0] == '-' || p[0] == '+')
+ {
+ ERROR_MSG("Invalid label: %s (labels cannot begin with !, $, -, +, or 0-9)\n",line.gettoken_str(0));
+ return PS_ERROR;
+ }
+ if (add_label(line.gettoken_str(0))) return PS_ERROR;
+ line.eattoken();
+ goto parse_again;
+ }
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ // Added by Ximon Eighteen 5th August 2002
+ // We didn't recognise this command, could it be the name of a
+ // function exported from a dll?
+ if (m_plugins.IsPluginCommand(line.gettoken_str(0)))
+ {
+ np = 0; // parameters are optional
+ op = -1; // unlimited number of optional parameters
+ pos = -1; // placement will tested later
+ tkid = TOK__PLUGINCOMMAND;
+ }
+ else
+#endif
+ {
+ ERROR_MSG("Invalid command: %s\n",line.gettoken_str(0));
+ return PS_ERROR;
+ }
+ }
+
+ if (IsTokenPlacedRight(pos, line.gettoken_str(0)) != PS_OK)
+ return PS_ERROR;
+
+ int v=line.getnumtokens()-(np+1);
+ if (v < 0 || (op >= 0 && v > op)) // opt_parms is -1 for unlimited
+ {
+ ERROR_MSG("%s expects %d",line.gettoken_str(0),np);
+ if (op < 0) ERROR_MSG("+");
+ if (op > 0) ERROR_MSG("-%d",op+np);
+ ERROR_MSG(" parameters, got %d.\n",line.getnumtokens()-1);
+ PRINTHELP()
+ }
+
+ int if_from_else = 0;
+
+ if (tkid == TOK_P_ELSE)
+ {
+ if (cur_ifblock && cur_ifblock->inherited_ignore)
+ return PS_OK;
+
+ if (!num_ifblock())
+ {
+ ERROR_MSG("!else: no if block open (!if[macro][n][def])\n");
+ return PS_ERROR;
+ }
+
+ if (cur_ifblock->elseused)
+ {
+ ERROR_MSG("!else: else already used in current if block\n");
+ return PS_ERROR;
+ }
+
+ if (cur_ifblock->hasexeced)
+ {
+ cur_ifblock->ignore++;
+ return PS_OK;
+ }
+
+ if (line.getnumtokens() == 1)
+ {
+ cur_ifblock->ignore = !cur_ifblock->ignore;
+ // if not executed up until now, it will now
+ cur_ifblock->hasexeced++;
+ cur_ifblock->elseused++;
+ return PS_OK;
+ }
+
+ line.eattoken();
+
+ int v=line.gettoken_enum(0,"if\0ifdef\0ifndef\0ifmacrodef\0ifmacrondef\0");
+ if (v < 0) PRINTHELP()
+ if (line.getnumtokens() == 1) PRINTHELP()
+ int cmds[] = {TOK_P_IF, TOK_P_IFDEF, TOK_P_IFNDEF, TOK_P_IFMACRODEF, TOK_P_IFMACRONDEF};
+ tkid = cmds[v];
+ if_from_else++;
+ }
+
+ if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFDEF ||
+ tkid == TOK_P_IFMACRODEF || tkid == TOK_P_IFMACRONDEF ||
+ tkid == TOK_P_IF)
+ {
+ if (!if_from_else)
+ start_ifblock();
+
+ if (cur_ifblock && cur_ifblock->inherited_ignore)
+ {
+ return PS_OK;
+ }
+
+ int istrue=0;
+
+ int mod=0;
+
+ int p=0;
+
+ if (tkid == TOK_P_IF) {
+ if(!strcmp(line.gettoken_str(1),"!")) {
+ p = 1;
+ line.eattoken();
+ }
+
+ if(line.getnumtokens() == 2)
+ istrue = line.gettoken_int(1);
+
+ else if (line.getnumtokens() == 4) {
+ mod = line.gettoken_enum(2,"=\0==\0!=\0<=\0<\0>\0>=\0&\0&&\0|\0||\0");
+
+ switch(mod) {
+ case 0:
+ case 1:
+ istrue = stricmp(line.gettoken_str(1),line.gettoken_str(3)) == 0; break;
+ case 2:
+ istrue = stricmp(line.gettoken_str(1),line.gettoken_str(3)) != 0; break;
+ case 3:
+ istrue = line.gettoken_float(1) <= line.gettoken_float(3); break;
+ case 4:
+ istrue = line.gettoken_float(1) < line.gettoken_float(3); break;
+ case 5:
+ istrue = line.gettoken_float(1) > line.gettoken_float(3); break;
+ case 6:
+ istrue = line.gettoken_float(1) >= line.gettoken_float(3); break;
+ case 7:
+ case 8:
+ istrue = line.gettoken_int(1) && line.gettoken_int(3); break;
+ case 9:
+ case 10:
+ istrue = line.gettoken_int(1) || line.gettoken_int(3); break;
+ default:
+ PRINTHELP()
+ }
+ }
+ else PRINTHELP()
+
+ if(p) istrue = !istrue;
+ }
+
+ else {
+
+ // pure left to right precedence. Not too powerful, but useful.
+ for (p = 1; p < line.getnumtokens(); p ++)
+ {
+ if (p & 1)
+ {
+ int new_s;
+ if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFDEF)
+ new_s=!!definedlist.find(line.gettoken_str(p));
+ else
+ new_s=MacroExists(line.gettoken_str(p));
+ if (tkid == TOK_P_IFNDEF || tkid == TOK_P_IFMACRONDEF)
+ new_s=!new_s;
+
+ if (mod == 0) istrue = istrue || new_s;
+ else istrue = istrue && new_s;
+ }
+ else
+ {
+ mod=line.gettoken_enum(p,"|\0&\0||\0&&\0");
+ if (mod == -1) PRINTHELP()
+ mod &= 1;
+ }
+ }
+ }
+
+ if (istrue)
+ {
+ cur_ifblock->hasexeced++;
+ cur_ifblock->ignore = 0;
+ }
+ else
+ cur_ifblock->ignore++;
+
+ return PS_OK;
+ }
+ if (tkid == TOK_P_ENDIF) {
+ if (!num_ifblock())
+ {
+ ERROR_MSG("!endif: no if block open (!if[macro][n][def])\n");
+ return PS_ERROR;
+ }
+ end_ifblock();
+ return PS_OK;
+ }
+ if (!cur_ifblock || (!cur_ifblock->ignore && !cur_ifblock->inherited_ignore))
+ {
+ return doCommand(tkid,line);
+ }
+
+ return PS_OK;
+}
+
+// Func size: about 140 lines (orip)
+#ifdef NSIS_FIX_DEFINES_IN_STRINGS
+void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist, bool bIgnoreDefines /*= false*/)
+#else
+void CEXEBuild::ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist)
+#endif
+{
+ // convert $\r, $\n to their literals
+ // preprocessor replace ${VAR} and $%VAR% with whatever value
+ // note that if VAR does not exist, ${VAR} or $%VAR% will go through unmodified
+ const char *in=str;
+ while (*in)
+ {
+ int add=1;
+ char *t;
+ char c=*in;
+ t=CharNext(in);
+
+ if (t-in > 1) // handle multibyte chars (no escape)
+ {
+ linedata.add((void*)in,t-in);
+ in=t;
+ continue;
+ }
+ in=t;
+
+ if (c == '$')
+ {
+ if (in[0] == '\\')
+ {
+ if (in[1] == 'r')
+ {
+ in+=2;
+ c='\r';
+ }
+ else if (in[1] == 'n')
+ {
+ in+=2;
+ c='\n';
+ }
+ else if (in[1] == 't')
+ {
+ in+=2;
+ c='\t';
+ }
+ }
+ else if (in[0] == '{')
+ {
+ char *s=strdup(in+1);
+ MANAGE_WITH(s, free);
+ char *t=s;
+ unsigned int bn = 0;
+ while (*t)
+ {
+ if (*t == '{') bn++;
+ if (*t == '}' && bn-- == 0) break;
+ t=CharNext(t);
+ }
+ if (*t && t!=s
+#ifdef NSIS_FIX_DEFINES_IN_STRINGS
+ && !bIgnoreDefines
+#endif
+ )
+ {
+ *t=0;
+ // check for defines inside the define name - ${bla${blo}}
+ GrowBuf defname;
+ ps_addtoline(s,defname,hist);
+ defname.add("",1);
+ t=definedlist.find((char*)defname.get());
+ if (t && hist.find((char*)defname.get(),0)<0)
+ {
+ in+=strlen(s)+2;
+ add=0;
+ hist.add((char*)defname.get(),0);
+#ifdef NSIS_FIX_DEFINES_IN_STRINGS
+ ps_addtoline(t,linedata,hist,true);
+#else
+ ps_addtoline(t,linedata,hist);
+#endif
+ hist.delbypos(hist.find((char*)defname.get(),0));
+ }
+ }
+ }
+ else if (in[0] == '%')
+ {
+ char *s=strdup(in+1);
+ MANAGE_WITH(s, free);
+ char *t=s;
+ while (*t)
+ {
+ if (*t == '%') break;
+ t=CharNext(t);
+ }
+ if (*t && t!=s)
+ {
+ *t=0;
+ // check for defines inside the define name - ${bla${blo}}
+ GrowBuf defname;
+ ps_addtoline(s,defname,hist);
+ defname.add("",1);
+ t=getenv((char*)defname.get());
+ if (t && hist.find((char*)defname.get(),0)<0)
+ {
+ in+=strlen(s)+2;
+ add=0;
+ hist.add((char*)defname.get(),0);
+#ifdef NSIS_FIX_DEFINES_IN_STRINGS
+ ps_addtoline(t,linedata,hist,true);
+#else
+ ps_addtoline(t,linedata,hist);
+#endif
+ hist.delbypos(hist.find((char*)defname.get(),0));
+ }
+ }
+ }
+#ifdef NSIS_FIX_DEFINES_IN_STRINGS
+ else if (in[0] == '$')
+ {
+ if (in[1] == '{') // Found $$ before - Don't replace this define
+ {
+ char *s=strdup(in+2);
+ MANAGE_WITH(s, free);
+ char *t=s;
+ unsigned int bn = 0;
+ while (*t)
+ {
+ if (*t == '{') bn++;
+ if (*t == '}' && bn-- == 0) break;
+ t=CharNext(t);
+ }
+ if (*t && t!=s)
+ {
+ *t=0;
+ // add text unchanged
+ GrowBuf defname;
+ ps_addtoline(s,defname,hist);
+ in++;
+ }
+ }
+ else
+ {
+ linedata.add((void*)&c,1);
+ in++;
+ }
+ }
+#endif
+ }
+ if (add) linedata.add((void*)&c,1);
+ }
+}
+
+int CEXEBuild::parseScript()
+{
+ char str[MAX_LINELENGTH];
+
+ for (;;)
+ {
+ char *p=str;
+ *p=0;
+ fgets(str,MAX_LINELENGTH,fp);
+ linecnt++;
+ if (feof(fp)&&!str[0]) break;
+
+ // remove trailing whitespace
+ while (*p) p++;
+ if (p > str) p--;
+ while (p >= str && (*p == '\r' || *p == '\n' || *p == ' ' || *p == '\t')) p--;
+ *++p=0;
+
+ StringList hist;
+ GrowBuf linedata;
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ char *oldline = set_line_predefine(linecnt, FALSE);
+#endif
+
+ ps_addtoline(str,linedata,hist);
+ linedata.add((void*)"",1);
+ int ret=doParse((char*)linedata.get());
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ restore_line_predefine(oldline);
+#endif
+
+ if (ret != PS_OK) return ret;
+ }
+
+ return PS_EOF;
+}
+
+int CEXEBuild::includeScript(char *f)
+{
+ SCRIPT_MSG("!include: \"%s\"\n",f);
+ FILE *incfp=FOPEN(f,"rt");
+ if (!incfp)
+ {
+ ERROR_MSG("!include: could not open file: \"%s\"\n",f);
+ return PS_ERROR;
+ }
+
+ // auto-fclose(3) incfp
+ MANAGE_WITH(incfp, fclose);
+
+ if (build_include_depth >= MAX_INCLUDEDEPTH)
+ {
+ ERROR_MSG("parseScript: too many levels of includes (%d max).\n",MAX_INCLUDEDEPTH);
+ return PS_ERROR;
+ }
+ build_include_depth++;
+
+ int last_linecnt=linecnt;
+ linecnt=0;
+ char *last_filename=curfilename;
+ curfilename=f;
+ FILE *last_fp=fp;
+ fp=incfp;
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ char *oldfilename = set_file_predefine(curfilename);
+ char *oldtimestamp = set_timestamp_predefine(curfilename);
+#endif
+
+ int r=parseScript();
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ restore_file_predefine(oldfilename);
+ restore_timestamp_predefine(oldtimestamp);
+#endif
+
+ int errlinecnt=linecnt;
+
+ linecnt=last_linecnt;
+ curfilename=last_filename;
+ fp=last_fp;
+
+ build_include_depth--;
+ if (r != PS_EOF && r != PS_OK)
+ {
+ ERROR_MSG("!include: error in script: \"%s\" on line %d\n",f,errlinecnt);
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("!include: closed: \"%s\"\n",f);
+ return PS_OK;
+}
+
+// !ifmacro[n]def based on Anders Kjersem's code
+int CEXEBuild::MacroExists(const char *macroname)
+{
+ char *m = (char *) m_macros.get();
+
+ while (m && *m)
+ {
+ // check if macroname matches
+ if (!stricmp(m, macroname))
+ return 1;
+
+ // skip macro name
+ m += strlen(m) + 1;
+
+ // skip params
+ while (*m) m += strlen(m) + 1;
+ m++;
+
+ // skip data
+ while (*m) m += strlen(m) + 1;
+ if (m - (char *) m_macros.get() >= m_macros.getlen() - 1) break;
+ m++;
+ }
+ return 0;
+}
+
+int CEXEBuild::process_oneline(char *line, char *filename, int linenum)
+{
+ char *last_filename=curfilename;
+ curfilename=filename;
+ int last_linecnt=linecnt;
+ linecnt=linenum;
+
+ StringList hist;
+ GrowBuf linedata;
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ char *oldfilename = NULL;
+ char *oldtimestamp = NULL;
+ char *oldline = NULL;
+ BOOL is_commandline = !strcmp(filename,"command line");
+ BOOL is_macro = !strncmp(filename,"macro:",strlen("macro:"));
+
+ if(!is_commandline) { // Don't set the predefines for command line /X option
+ if(!is_macro) {
+ oldfilename = set_file_predefine(curfilename);
+ oldtimestamp = set_timestamp_predefine(curfilename);
+ }
+ oldline = set_line_predefine(linecnt, is_macro);
+ }
+#endif
+
+ ps_addtoline(line,linedata,hist);
+ linedata.add((void*)"",1);
+ int ret=doParse((char*)linedata.get());
+
+#ifdef NSIS_SUPPORT_STANDARD_PREDEFINES
+ // Added by Sunil Kamath 11 June 2003
+ if(!is_commandline) { // Don't set the predefines for command line /X option
+ if(!is_macro) {
+ restore_file_predefine(oldfilename);
+ restore_timestamp_predefine(oldtimestamp);
+ }
+ restore_line_predefine(oldline);
+ }
+#endif
+
+ linecnt=last_linecnt;
+ curfilename=last_filename;
+
+ return ret;
+}
+
+int CEXEBuild::process_jump(LineParser &line, int wt, int *offs)
+{
+ const char *s=line.gettoken_str(wt);
+ int v;
+
+ if (!stricmp(s,"0") || !stricmp(s,"")) *offs=0;
+ else if ((v=GetUserVarIndex(line, wt))>=0)
+ {
+ *offs=-v-1; // to jump to a user variable target, -variable_index-1 is stored.
+ }
+ else
+ {
+ if ((s[0] == '-' || s[0] == '+') && !atoi(s+1))
+ {
+ ERROR_MSG("Error: Goto targets beginning with '+' or '-' must be followed by nonzero integer (relative jump)\n");
+ return 1;
+ }
+ if ((s[0] >= '0' && s[0] <= '9') || s[0] == '$' || s[0] == '!')
+ {
+ ERROR_MSG("Error: Goto targets cannot begin with 0-9, $, !\n");
+ return 1;
+ }
+ *offs=ns_label.add(s,0);
+ }
+ return 0;
+}
+
+#define FLAG_OFFSET(flag) (FIELD_OFFSET(exec_flags, flag)/sizeof(int))
+#define SECTION_FIELD_GET(field) (FIELD_OFFSET(section, field)/sizeof(int))
+#define SECTION_FIELD_SET(field) (-1 - (int)(FIELD_OFFSET(section, field)/sizeof(int)))
+
+// Func size: about 5000 lines (orip)
+int CEXEBuild::doCommand(int which_token, LineParser &line)
+{
+ static const char *rootkeys[2] = {
+ "HKCR\0HKLM\0HKCU\0HKU\0HKCC\0HKDD\0HKPD\0SHCTX\0",
+ "HKEY_CLASSES_ROOT\0HKEY_LOCAL_MACHINE\0HKEY_CURRENT_USER\0HKEY_USERS\0HKEY_CURRENT_CONFIG\0HKEY_DYN_DATA\0HKEY_PERFORMANCE_DATA\0SHELL_CONTEXT\0"
+ };
+ static HKEY rootkey_tab[] = {
+ HKEY_CLASSES_ROOT,HKEY_LOCAL_MACHINE,HKEY_CURRENT_USER,HKEY_USERS,HKEY_CURRENT_CONFIG,HKEY_DYN_DATA,HKEY_PERFORMANCE_DATA,0
+ };
+
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ build_plugin_table();
+#endif
+
+ multiple_entries_instruction=0;
+
+ entry ent={0,};
+ switch (which_token)
+ {
+ // macro shit
+ ///////////////////////////////////////////////////////////////////////////////
+ case TOK_P_MACRO:
+ {
+ if (!line.gettoken_str(1)[0]) PRINTHELP()
+ char *t=(char *)m_macros.get();
+ while (t && *t)
+ {
+ if (!stricmp(t,line.gettoken_str(1))) break;
+ t+=strlen(t)+1;
+
+ // advance over parameters
+ while (*t) t+=strlen(t)+1;
+ t++;
+
+ // advance over data
+ while (*t) t+=strlen(t)+1;
+ if (t-(char *)m_macros.get() >= m_macros.getlen()-1)
+ break;
+ t++;
+ }
+ if (t && *t)
+ {
+ ERROR_MSG("!macro: macro named \"%s\" already found!\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ m_macros.add(line.gettoken_str(1),strlen(line.gettoken_str(1))+1);
+
+ int pc;
+ for (pc=2; pc < line.getnumtokens(); pc ++)
+ {
+ if (!line.gettoken_str(pc)[0])
+ {
+ ERROR_MSG("!macro: macro parameter %d is empty, not valid!\n",pc-1);
+ return PS_ERROR;
+ }
+ int a;
+ for (a=2; a < pc; a ++)
+ {
+ if (!stricmp(line.gettoken_str(pc),line.gettoken_str(a)))
+ {
+ ERROR_MSG("!macro: macro parameter named %s is used multiple times!\n",
+ line.gettoken_str(pc));
+ return PS_ERROR;
+ }
+ }
+ m_macros.add(line.gettoken_str(pc),strlen(line.gettoken_str(pc))+1);
+ }
+ m_macros.add("",1);
+
+ for (;;)
+ {
+ char str[MAX_LINELENGTH];
+ char *p=str;
+ str[0]=0;
+ fgets(str,MAX_LINELENGTH,fp);
+ //SCRIPT_MSG("%s%s", str, str[strlen(str)-1]=='\n'?"":"\n");
+ if (feof(fp) && !str[0])
+ {
+ ERROR_MSG("!macro \"%s\": unterminated (no !macroend found in file)!\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ // remove trailing whitespace
+ while (*p) p++;
+ if (p > str) p--;
+ while (p >= str && (*p == '\r' || *p == '\n' || *p == ' ' || *p == '\t')) p--;
+ *++p=0;
+ LineParser l2(false);
+ if (!l2.parse(str))
+ {
+ if (!stricmp(l2.gettoken_str(0),"!macroend"))
+ {
+ linecnt++;
+ break;
+ }
+ if (!stricmp(l2.gettoken_str(0),"!macro"))
+ {
+ ERROR_MSG("Error: can't define a macro inside a macro!\n");
+ return PS_ERROR;
+ }
+ }
+ if (str[0]) m_macros.add(str,strlen(str)+1);
+ else m_macros.add(" ",2);
+ linecnt++;
+ }
+ m_macros.add("",1);
+ }
+ return PS_OK;
+ case TOK_P_MACROEND:
+ ERROR_MSG("!macroend: no macro currently open.\n");
+ return PS_ERROR;
+ case TOK_P_INSERTMACRO:
+ {
+ if (!line.gettoken_str(1)[0]) PRINTHELP()
+ char *t=(char *)m_macros.get();
+ char *m=t;
+ while (t && *t)
+ {
+ if (!stricmp(t,line.gettoken_str(1))) break;
+ t+=strlen(t)+1;
+
+ // advance over parms
+ while (*t) t+=strlen(t)+1;
+ t++;
+
+ // advance over data
+ while (*t) t+=strlen(t)+1;
+ if (t-(char *)m_macros.get() >= m_macros.getlen()-1)
+ break;
+ t++;
+ }
+ SCRIPT_MSG("!insertmacro: %s\n",line.gettoken_str(1));
+ if (!t || !*t)
+ {
+ ERROR_MSG("!insertmacro: macro named \"%s\" not found!\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ t+=strlen(t)+1;
+
+
+ GrowBuf l_define_names;
+ DefineList l_define_saves;
+ int npr=0;
+ // advance over parms
+ while (*t)
+ {
+ char *v=definedlist.find(t);
+ if (v)
+ {
+ l_define_saves.add(t,v);
+ definedlist.del(t);
+ }
+ l_define_names.add(t,strlen(t)+1);
+ definedlist.add(t,line.gettoken_str(npr+2));
+
+ npr++;
+ t+=strlen(t)+1;
+ }
+ l_define_names.add("",1);
+ t++;
+ if (npr != line.getnumtokens()-2)
+ {
+ ERROR_MSG("!insertmacro: macro \"%s\" requires %d parameter(s), passed %d!\n",
+ line.gettoken_str(1),npr,line.getnumtokens()-2);
+ return PS_ERROR;
+ }
+
+ int lp=0;
+ char str[1024];
+ if (m_macro_entry.find(line.gettoken_str(1),0)>=0)
+ {
+ ERROR_MSG("!insertmacro: macro \"%s\" already being inserted!\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ int npos=m_macro_entry.add(line.gettoken_str(1),0);
+
+ wsprintf(str,"macro:%s",line.gettoken_str(1));
+ while (*t)
+ {
+ lp++;
+ if (strcmp(t," "))
+ {
+ int ret=process_oneline(t,str,lp);
+ if (ret != PS_OK)
+ {
+ ERROR_MSG("Error in macro %s on macroline %d\n",line.gettoken_str(1),lp);
+ return ret;
+ }
+ }
+ {
+ // fix t if process_oneline changed m_macros
+ char *nm=(char *)m_macros.get();
+ if (nm != m)
+ {
+ t += nm - m;
+ m = nm;
+ }
+ }
+ t+=strlen(t)+1;
+ }
+ m_macro_entry.delbypos(npos);
+ {
+ char *p=(char*)l_define_names.get();
+ while (*p)
+ {
+ definedlist.del(p);
+ char *v;
+ if ((v=l_define_saves.find(p))) definedlist.add(p,v);
+ p+=strlen(p)+1;
+ }
+ }
+ SCRIPT_MSG("!insertmacro: end of %s\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+
+ // preprocessor files fun
+ ///////////////////////////////////////////////////////////////////////////////
+
+ case TOK_P_TEMPFILE:
+ {
+ char *symbol = line.gettoken_str(1);
+ char *fpath;
+
+#ifdef _WIN32
+ char buf[MAX_PATH], buf2[MAX_PATH];
+
+ GetTempPath(MAX_PATH, buf);
+ if (!GetTempFileName(buf, "nst", 0, buf2))
+ {
+ ERROR_MSG("!tempfile: unable to create temporary file.\n");
+ return PS_ERROR;
+ }
+
+ fpath = buf2;
+#else
+ char t[] = "/tmp/makensisXXXXXX";
+
+ mode_t old_umask = umask(0077);
+
+ int fd = mkstemp(t);
+ if (fd == -1) {
+ ERROR_MSG("!tempfile: unable to create temporary file.\n");
+ return PS_ERROR;
+ }
+ close(fd);
+
+ umask(old_umask);
+
+ fpath = t;
+#endif
+
+ if (definedlist.add(symbol, fpath))
+ {
+ ERROR_MSG("!tempfile: \"%s\" already defined!\n", symbol);
+ return PS_ERROR;
+ }
+
+ SCRIPT_MSG("!tempfile: \"%s\"=\"%s\"\n", symbol, fpath);
+ }
+ return PS_OK;
+
+ case TOK_P_DELFILE:
+ {
+ char *file = line.gettoken_str(1);
+#ifndef _WIN32
+ file = my_convert(file);
+#endif
+ int result = unlink(file);
+#ifndef _WIN32
+ my_convert_free(file);
+#endif
+ if (result == -1) {
+ ERROR_MSG("!delfile: \"%s\" couldn't be deleted.\n", line.gettoken_str(1));
+ return PS_ERROR;
+ }
+
+ SCRIPT_MSG("!delfile: \"%s\"\n", line.gettoken_str(1));
+ }
+ return PS_OK;
+
+ case TOK_P_APPENDFILE:
+ {
+ char *file = line.gettoken_str(1);
+ char *text = line.gettoken_str(2);
+
+ FILE *fp = FOPEN(file, "a");
+ if (!fp)
+ {
+ ERROR_MSG("!appendfile: \"%s\" couldn't be opened.\n", file);
+ return PS_ERROR;
+ }
+
+ if (fputs(text, fp) < 0)
+ {
+ ERROR_MSG("!appendfile: error writing to \"%s\".\n", file);
+ return PS_ERROR;
+ }
+
+ fclose(fp);
+
+ SCRIPT_MSG("!appendfile: \"%s\" \"%s\"\n", file, text);
+ }
+ return PS_OK;
+
+ // page ordering shit
+ ///////////////////////////////////////////////////////////////////////////////
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ case TOK_UNINSTPAGE:
+ set_uninstall_mode(1);
+ case TOK_PAGE:
+ {
+ if (!uninstall_mode) {
+ enable_last_page_cancel = 0;
+ if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL"))
+ enable_last_page_cancel = 1;
+ }
+ else {
+ uenable_last_page_cancel = 0;
+ if (!stricmp(line.gettoken_str(line.getnumtokens()-1),"/ENABLECANCEL"))
+ uenable_last_page_cancel = 1;
+ }
+
+ int k = line.gettoken_enum(1,"custom\0license\0components\0directory\0instfiles\0uninstConfirm\0");
+
+ if (k < 0) PRINTHELP();
+
+ if (add_page(k) != PS_OK)
+ return PS_ERROR;
+
+#ifndef NSIS_SUPPORT_CODECALLBACKS
+ if (!k) {
+ ERROR_MSG("Error: custom page specified, NSIS_SUPPORT_CODECALLBACKS not defined.\n");
+ return PS_ERROR;
+ }
+#endif//!NSIS_SUPPORT_CODECALLBACKS
+
+ if (k) {
+ // not custom
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ switch (line.getnumtokens() - enable_last_page_cancel) {
+ case 6:
+ PRINTHELP();
+ case 5:
+ if (*line.gettoken_str(4))
+ cur_page->leavefunc = ns_func.add(line.gettoken_str(4),0);
+ case 4:
+ if (*line.gettoken_str(3))
+ cur_page->showfunc = ns_func.add(line.gettoken_str(3),0);
+ case 3:
+ if (*line.gettoken_str(2))
+ cur_page->prefunc = ns_func.add(line.gettoken_str(2),0);
+ }
+#endif//NSIS_SUPPORT_CODECALLBACKS
+ }
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ else {
+ // a custom page
+ switch (line.getnumtokens() - enable_last_page_cancel) {
+ case 6:
+ PRINTHELP();
+ case 5:
+ cur_page->caption = add_string(line.gettoken_str(4));
+ case 4:
+ if (*line.gettoken_str(3))
+ cur_page->leavefunc = ns_func.add(line.gettoken_str(3),0);
+ case 3:
+ if (*line.gettoken_str(2))
+ cur_page->prefunc = ns_func.add(line.gettoken_str(2),0);
+ break;
+ case 2:
+ ERROR_MSG("Error: custom page must have a creator function!\n");
+ PRINTHELP();
+ }
+ }
+#endif//NSIS_SUPPORT_CODECALLBACKS
+
+ SCRIPT_MSG("%sPage: %s", uninstall_mode?"Uninst":"", line.gettoken_str(1));
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (cur_page->prefunc>=0)
+ SCRIPT_MSG(" (%s:%s)", k?"pre":"creator", line.gettoken_str(2));
+ if (cur_page->showfunc>=0 && k)
+ SCRIPT_MSG(" (show:%s)", line.gettoken_str(3));
+ if (cur_page->leavefunc>=0)
+ SCRIPT_MSG(" (leave:%s)", line.gettoken_str(4-!k));
+ else if (cur_page->caption && !k)
+ SCRIPT_MSG(" (caption:%s)", line.gettoken_str(3));
+#endif
+ SCRIPT_MSG("\n");
+
+ page_end();
+
+ if (k == PAGE_INSTFILES) {
+ add_page(PAGE_COMPLETED);
+ page_end();
+ }
+
+ set_uninstall_mode(0);
+ }
+ return PS_OK;
+
+ // extended page setting
+ case TOK_PAGEEX:
+ {
+ int k = line.gettoken_enum(1,"custom\0license\0components\0directory\0instfiles\0uninstConfirm\0");
+ if (k < 0) {
+ k = line.gettoken_enum(1,"un.custom\0un.license\0un.components\0un.directory\0un.instfiles\0un.uninstConfirm\0");
+ if (k < 0) PRINTHELP();
+ set_uninstall_mode(1);
+ }
+
+ SCRIPT_MSG("PageEx: %s\n", line.gettoken_str(1));
+
+ if (add_page(k) != PS_OK)
+ return PS_ERROR;
+
+ cur_page->flags |= PF_PAGE_EX;
+ }
+ return PS_OK;
+
+ case TOK_PAGEEXEND:
+ {
+ SCRIPT_MSG("PageExEnd\n");
+
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ if (cur_page_type == PAGE_CUSTOM && !cur_page->prefunc) {
+ ERROR_MSG("Error: custom pages must have a creator function.\n");
+ return PS_ERROR;
+ }
+#endif
+
+ page_end();
+
+ if (cur_page_type == PAGE_INSTFILES) {
+ add_page(PAGE_COMPLETED);
+ page_end();
+ }
+
+ set_uninstall_mode(0);
+ }
+ return PS_OK;
+ case TOK_PAGECALLBACKS:
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+ {
+ SCRIPT_MSG("PageCallbacks:");
+
+ if (cur_page_type == PAGE_CUSTOM)
+ {
+ switch (line.getnumtokens())
+ {
+ case 4:
+ {
+ PRINTHELP();
+ }
+ case 3:
+ {
+ if (*line.gettoken_str(2))
+ {
+ if (strnicmp(line.gettoken_str(2), "un.", 3))
+ {
+ if (uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ else
+ {
+ if (!uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ cur_page->leavefunc = ns_func.add(line.gettoken_str(2),0);
+ }
+ }
+ case 2:
+ {
+ if (*line.gettoken_str(1))
+ {
+ if (strnicmp(line.gettoken_str(1), "un.", 3))
+ {
+ if (uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ else
+ {
+ if (!uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ cur_page->prefunc = ns_func.add(line.gettoken_str(1),0);
+ }
+ }
+ }
+ }
+ else
+ {
+ switch (line.getnumtokens())
+ {
+ case 4:
+ {
+ if (*line.gettoken_str(3))
+ {
+ if (strnicmp(line.gettoken_str(3), "un.", 3))
+ {
+ if (uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ else
+ {
+ if (!uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ cur_page->leavefunc = ns_func.add(line.gettoken_str(3),0);
+ }
+ }
+ case 3:
+ {
+ if (*line.gettoken_str(2))
+ {
+ if (strnicmp(line.gettoken_str(2), "un.", 3))
+ {
+ if (uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ else
+ {
+ if (!uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ cur_page->showfunc = ns_func.add(line.gettoken_str(2),0);
+ }
+ }
+ case 2:
+ {
+ if (*line.gettoken_str(1))
+ {
+ if (strnicmp(line.gettoken_str(1), "un.", 3))
+ {
+ if (uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ else
+ {
+ if (!uninstall_mode)
+ {
+ ERROR_MSG("\nError: function names must start with \"un.\" in an uninstall page.\n");
+ return PS_ERROR;
+ }
+ }
+ cur_page->prefunc = ns_func.add(line.gettoken_str(1),0);
+ }
+ }
+ }
+ }
+
+ int custom = cur_page_type == PAGE_CUSTOM ? 1 : 0;
+
+ if (cur_page->prefunc>=0)
+ SCRIPT_MSG(" %s:%s", !custom?"pre":"creator", line.gettoken_str(1));
+ if (cur_page->showfunc>=0 && !custom)
+ SCRIPT_MSG(" show:%s", line.gettoken_str(2));
+ if (cur_page->leavefunc>=0)
+ SCRIPT_MSG(" leave:%s", line.gettoken_str(3-custom));
+
+ SCRIPT_MSG("\n");
+ }
+ return PS_OK;
+#else
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_CODECALLBACKS not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_SUPPORT_CODECALLBACKS
+#else
+ case TOK_PAGE:
+ case TOK_UNINSTPAGE:
+ case TOK_PAGEEX:
+ case TOK_PAGEEXEND:
+ case TOK_PAGECALLBACKS:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_CONFIG_VISIBLE_SUPPORT
+ // header flags
+ ///////////////////////////////////////////////////////////////////////////////
+ case TOK_LANGSTRING:
+ {
+ char *name = line.gettoken_str(1);
+ LANGID lang = line.gettoken_int(2);
+ char *str = line.gettoken_str(3);
+ int ret = SetLangString(name, lang, str);
+ if (ret == PS_WARNING)
+ warning_fl("LangString \"%s\" set multiple times for %d, wasting space", name, lang);
+ else if (ret == PS_ERROR) {
+ ERROR_MSG("Error: can't set LangString \"%s\"!\n", name);
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("LangString: \"%s\" %d \"%s\"\n", name, lang, str);
+ }
+ return PS_OK;
+ case TOK_LANGSTRINGUP:
+ SCRIPT_MSG("Error: LangStringUP is obsolete, there are no more unprocessed strings. Use LangString.\n");
+ return PS_ERROR;
+ case TOK_LICENSELANGSTRING:
+ {
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ if (build_header.flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG))
+ {
+ warning_fl("LicenseLangString: SilentInstall enabled, wasting space");
+ }
+#endif
+ char *name = line.gettoken_str(1);
+ LANGID lang = line.gettoken_int(2);
+ char *file = line.gettoken_str(3);
+
+ FILE *fp;
+ unsigned int datalen;
+ fp=FOPEN(file,"rb");
+ if (!fp)
+ {
+ ERROR_MSG("LicenseLangString: open failed \"%s\"\n",file);
+ PRINTHELP()
+ }
+ MANAGE_WITH(fp, fclose);
+ fseek(fp,0,SEEK_END);
+ datalen=ftell(fp);
+ if (!datalen)
+ {
+ ERROR_MSG("LicenseLangString: empty license file \"%s\"\n",file);
+ return PS_ERROR;
+ }
+ rewind(fp);
+ char *data=(char*)malloc(datalen+2);
+ if (!data)
+ {
+ ERROR_MSG("Internal compiler error #12345: LicenseData malloc(%d) failed.\n", datalen+2);
+ return PS_ERROR;
+ }
+ MANAGE_WITH(data, free);
+ char *ldata=data+1;
+ if (fread(ldata,1,datalen,fp) != datalen)
+ {
+ ERROR_MSG("LicenseLangString: can't read file.\n");
+ return PS_ERROR;
+ }
+ ldata[datalen]=0;
+ if (!strncmp(ldata,"{\\rtf",sizeof("{\\rtf")-1))
+ *data = SF_RTF;
+ else
+ *data = SF_TEXT;
+
+ int ret = SetLangString(name, lang, data);
+ if (ret == PS_WARNING)
+ warning_fl("LicenseLangString \"%s\" set multiple times for %d, wasting space", name, lang);
+ else if (ret == PS_ERROR)
+ {
+ ERROR_MSG("Error: can't set LicenseLangString \"%s\"!\n", name);
+ return PS_ERROR;
+ }
+
+ SCRIPT_MSG("LicenseLangString: \"%s\" %d \"%s\"\n", name, lang, file);
+ }
+ return PS_OK;
+ case TOK_NAME:
+ {
+ if (SetInnerString(NLF_NAME,line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ SetInnerString(NLF_NAME_DA,line.gettoken_str(2));
+ SCRIPT_MSG("Name: \"%s\"",line.gettoken_str(1));
+ if (*line.gettoken_str(2))
+ SCRIPT_MSG(" \"%s\"",line.gettoken_str(2));
+ SCRIPT_MSG("\n");
+ }
+ return PS_OK;
+ case TOK_CAPTION:
+ {
+ if (!cur_page)
+ {
+ if (SetInnerString(NLF_CAPTION,line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ }
+ else
+ {
+ cur_page->caption = add_string(line.gettoken_str(1));
+ }
+ SCRIPT_MSG("Caption: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_ICON:
+ SCRIPT_MSG("Icon: \"%s\"\n",line.gettoken_str(1));
+ try {
+ free_loaded_icon(installer_icon);
+ installer_icon = load_icon_file(line.gettoken_str(1));
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while loading icon from \"%s\": %s\n", line.gettoken_str(1), err.what());
+ return PS_ERROR;
+ }
+ return PS_OK;
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ case TOK_CHECKBITMAP:
+ SCRIPT_MSG("CheckBitmap: \"%s\"\n",line.gettoken_str(1));
+ try {
+ init_res_editor();
+ int err = update_bitmap(res_editor, IDB_BITMAP1, line.gettoken_str(1), 96, 16, 8);
+ if (err) {
+ switch (err) {
+ case -1:
+ ERROR_MSG("Error: can't find bitmap\n");
+ break;
+ case -2:
+ ERROR_MSG("Error: invalid bitmap file - corrupted or not a bitmap\n");
+ break;
+ case -3:
+ ERROR_MSG("Error: bitmap isn't 96x16 in size\n");
+ break;
+ case -4:
+ ERROR_MSG("Error: bitmap has more than 8bpp\n");
+ break;
+ }
+ return PS_ERROR;
+ }
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while replacing bitmap: %s\n", err.what());
+ return PS_ERROR;
+ }
+ return PS_OK;
+#else//NSIS_CONFIG_COMPONENTPAGE
+ case TOK_CHECKBITMAP:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPONENTPAGE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_CONFIG_COMPONENTPAGE
+ case TOK_DIRTEXT:
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ {
+ if (!cur_page) {
+ if (SetInnerString(NLF_DIR_TEXT, line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ if (line.getnumtokens() > 2)
+ SetInnerString(NLF_DIR_SUBTEXT, line.gettoken_str(2));
+ if (line.getnumtokens() > 3)
+ SetInnerString(NLF_BTN_BROWSE, line.gettoken_str(3));
+ if (line.getnumtokens() > 4)
+ SetInnerString(NLF_DIR_BROWSETEXT, line.gettoken_str(4));
+ }
+ else {
+ if (cur_page_type != PAGE_DIRECTORY) {
+ ERROR_MSG("Error: DirText can only be used inside PageEx directory.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[0] = add_string(line.gettoken_str(1));
+ if (line.getnumtokens() > 2)
+ cur_page->parms[1] = add_string(line.gettoken_str(2));
+ if (line.getnumtokens() > 3)
+ cur_page->parms[2] = add_string(line.gettoken_str(3));
+ if (line.getnumtokens() > 4)
+ cur_page->parms[3] = add_string(line.gettoken_str(4));
+ }
+ SCRIPT_MSG("DirText: \"%s\" \"%s\" \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ }
+ return PS_OK;
+#else//NSIS_CONFIG_VISIBLE_SUPPORT
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_CONFIG_VISIBLE_SUPPORT
+ case TOK_DIRVAR:
+ {
+ if (cur_page_type != PAGE_DIRECTORY && cur_page_type != PAGE_UNINSTCONFIRM) {
+ ERROR_MSG("Error: can't use DirVar outside of PageEx directory|uninstConfirm.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[4] = GetUserVarIndex(line, 1) + 1;
+ if (cur_page->parms[4] <= 0) PRINTHELP();
+ SCRIPT_MSG("DirVar: %s\n", line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_DIRVERIFY:
+ {
+ if (cur_page_type != PAGE_DIRECTORY) {
+ ERROR_MSG("Error: can't use DirVerify outside of PageEx directory.\n");
+ return PS_ERROR;
+ }
+ cur_page->flags &= ~PF_DIR_NO_BTN_DISABLE;
+ int k = line.gettoken_enum(1,"auto\0leave\0");
+ if (k == -1)
+ PRINTHELP();
+ if (k)
+ cur_page->flags |= PF_DIR_NO_BTN_DISABLE;
+ SCRIPT_MSG("DirVerify: %s\n", line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_GETINSTDIRERROR:
+ ent.which = EW_GETFLAG;
+ ent.offsets[0] = GetUserVarIndex(line, 1);
+ ent.offsets[1] = FLAG_OFFSET(instdir_error);
+ return add_entry(&ent);
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ case TOK_COMPTEXT:
+ {
+ if (!cur_page) {
+ if (SetInnerString(NLF_COMP_TEXT, line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ if (line.getnumtokens() > 2)
+ SetInnerString(NLF_COMP_SUBTEXT1, line.gettoken_str(2));
+ if (line.getnumtokens() > 3)
+ SetInnerString(NLF_COMP_SUBTEXT2, line.gettoken_str(3));
+ }
+ else {
+ if (cur_page_type != PAGE_COMPONENTS) {
+ ERROR_MSG("Error: ComponentText can only be used inside PageEx components.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[0] = add_string(line.gettoken_str(1));
+ cur_page->parms[1] = add_string(line.gettoken_str(2));
+ cur_page->parms[2] = add_string(line.gettoken_str(3));
+ cur_page->parms[3] = cur_page->parms[1];
+ cur_page->parms[4] = cur_page->parms[2];
+ }
+ SCRIPT_MSG("ComponentText: \"%s\" \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ }
+ return PS_OK;
+ case TOK_INSTTYPE:
+ {
+ int x;
+
+ if (!stricmp(line.gettoken_str(1),"/NOCUSTOM"))
+ {
+ build_header.flags|=CH_FLAGS_NO_CUSTOM;
+ SCRIPT_MSG("InstType: disabling custom install type\n");
+ }
+ else if (!stricmp(line.gettoken_str(1),"/COMPONENTSONLYONCUSTOM"))
+ {
+ build_header.flags|=CH_FLAGS_COMP_ONLY_ON_CUSTOM;
+ SCRIPT_MSG("InstType: making components viewable only on custom install type\n");
+ }
+ else if (!strnicmp(line.gettoken_str(1),"/CUSTOMSTRING=",14))
+ {
+ SCRIPT_MSG("InstType: setting custom text to: \"%s\"\n",line.gettoken_str(1)+14);
+ if (SetInnerString(NLF_COMP_CUSTOM,line.gettoken_str(1)+14) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space","InstType /CUSTOMSTRING");
+ }
+ else if (line.gettoken_str(1)[0]=='/')
+ {
+ PRINTHELP()
+ }
+ else
+ {
+ char *itname = line.gettoken_str(1);
+
+ if (!strnicmp(itname, "un.", 3)) {
+ set_uninstall_mode(1);
+ itname += 3;
+ }
+
+ for (x = 0; x < NSIS_MAX_INST_TYPES && cur_header->install_types[x]; x ++);
+ if (x == NSIS_MAX_INST_TYPES)
+ {
+ ERROR_MSG("InstType: no more than %d install types allowed. %d specified\n", NSIS_MAX_INST_TYPES, NSIS_MAX_INST_TYPES + 1);
+ return PS_ERROR;
+ }
+ else
+ {
+ cur_header->install_types[x] = add_string(itname);
+ SCRIPT_MSG("InstType: %s%d=\"%s\"\n", uninstall_mode ? "(uninstall) " : "", x+1, itname);
+ }
+
+ set_uninstall_mode(0);
+ }
+ }
+ return PS_OK;
+#else//NSIS_CONFIG_COMPONENTPAGE
+ case TOK_COMPTEXT:
+ case TOK_INSTTYPE:
+ ERROR_MSG("Error: %s specified but NSIS_CONFIG_COMPONENTPAGE not defined\n",line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_CONFIG_COMPONENTPAGE
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ case TOK_LICENSETEXT:
+ {
+ if (!cur_page) {
+ if (SetInnerString(NLF_LICENSE_TEXT, line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ SetInnerString(NLF_LICENSE_TEXT_FSRB, line.gettoken_str(1));
+ SetInnerString(NLF_LICENSE_TEXT_FSCB, line.gettoken_str(1));
+ if (line.getnumtokens() > 2)
+ SetInnerString(NLF_BTN_LICENSE, line.gettoken_str(2));
+ }
+ else {
+ if (cur_page_type != PAGE_LICENSE) {
+ ERROR_MSG("Error: LicenseText can only be used inside PageEx license.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[0] = add_string(line.gettoken_str(1));
+ cur_page->next = add_string(line.gettoken_str(2));
+ }
+ SCRIPT_MSG("LicenseText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
+ }
+ return PS_OK;
+ case TOK_LICENSEDATA:
+ {
+ int idx = 0;
+ char *file = line.gettoken_str(1);
+ char *data = NULL;
+
+ if (file[0] == '$' && file[1] == '(')
+ {
+ char *cp = strdup(file+2);
+ MANAGE_WITH(cp, free);
+ char *p = strchr(cp, ')');
+ if (p && p[1] == 0) { // if string is only a language str identifier
+ *p = 0;
+ idx = DefineLangString(cp, 0);
+ }
+ data = file;
+ }
+
+ if (!idx)
+ {
+ unsigned int datalen;
+ FILE *fp=FOPEN(file,"rb");
+ if (!fp)
+ {
+ ERROR_MSG("LicenseData: open failed \"%s\"\n",file);
+ PRINTHELP()
+ }
+ MANAGE_WITH(fp, fclose);
+ fseek(fp,0,SEEK_END);
+ datalen=ftell(fp);
+ if (!datalen)
+ {
+ ERROR_MSG("LicenseData: empty license file \"%s\"\n",file);
+ return PS_ERROR;
+ }
+ rewind(fp);
+ data=(char*)malloc(datalen+2);
+ if (!data)
+ {
+ ERROR_MSG("Internal compiler error #12345: LicenseData malloc(%d) failed.\n", datalen+2);
+ return PS_ERROR;
+ }
+ //MANAGE_WITH(data, free);
+ char *ldata=data+1;
+ if (fread(ldata,1,datalen,fp) != datalen) {
+ ERROR_MSG("LicenseData: can't read file.\n");
+ free(data); // TODO: fix later (orip)
+ return PS_ERROR;
+ }
+ ldata[datalen]=0;
+ if (!strncmp(ldata,"{\\rtf",sizeof("{\\rtf")-1))
+ *data = SF_RTF;
+ else
+ *data = SF_TEXT;
+ }
+
+ if (!cur_page) {
+ if (SetInnerString(NLF_LICENSE_DATA,data) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ }
+ else {
+ if (cur_page_type != PAGE_LICENSE) {
+ ERROR_MSG("Error: LicenseData can only be used inside PageEx license.\n");
+ return PS_ERROR;
+ }
+
+ cur_page->parms[1] = add_string(data, 0);
+ }
+
+ if (!idx) free(data); // TODO: fix later (orip)
+
+ SCRIPT_MSG("LicenseData: \"%s\"\n",file);
+ }
+ return PS_OK;
+ case TOK_LICENSEFORCESELECTION:
+ {
+ int k=line.gettoken_enum(1,"off\0checkbox\0radiobuttons\0");
+ if (k == -1) PRINTHELP()
+ if (k < line.getnumtokens() - 2) PRINTHELP()
+
+ if (!cur_page) {
+ switch (line.getnumtokens()) {
+ case 4:
+ SetInnerString(NLF_BTN_LICENSE_DISAGREE, line.gettoken_str(3));
+ case 3:
+ SetInnerString(NLF_BTN_LICENSE_AGREE, line.gettoken_str(2));
+ break;
+ }
+
+ switch (k) {
+ case 0:
+ license_res_id = IDD_LICENSE;
+ break;
+ case 1:
+ license_res_id = IDD_LICENSE_FSCB;
+ break;
+ case 2:
+ license_res_id = IDD_LICENSE_FSRB;
+ break;
+ }
+ }
+ else {
+ if (cur_page_type != PAGE_LICENSE) {
+ ERROR_MSG("Error: LicenseForceSelection can only be used inside PageEx license.\n");
+ return PS_ERROR;
+ }
+ switch (line.getnumtokens()) {
+ case 4:
+ cur_page->parms[3] = add_string(line.gettoken_str(3));
+ case 3:
+ cur_page->parms[2] = add_string(line.gettoken_str(2));
+ break;
+ }
+
+ cur_page->flags &= ~(PF_LICENSE_FORCE_SELECTION | PF_LICENSE_NO_FORCE_SELECTION);
+
+ switch (k) {
+ case 0:
+ cur_page->dlg_id = IDD_LICENSE;
+ cur_page->flags |= PF_LICENSE_NO_FORCE_SELECTION;
+ break;
+ case 1:
+ cur_page->dlg_id = IDD_LICENSE_FSCB;
+ cur_page->flags |= PF_LICENSE_FORCE_SELECTION;
+ break;
+ case 2:
+ cur_page->dlg_id = IDD_LICENSE_FSRB;
+ cur_page->flags |= PF_LICENSE_FORCE_SELECTION;
+ break;
+ }
+ }
+
+ SCRIPT_MSG("LicenseForceSelection: %s \"%s\" \"%s\"\n", line.gettoken_str(1), line.gettoken_str(2), line.gettoken_str(3));
+ }
+ return PS_OK;
+ case TOK_LICENSEBKCOLOR:
+ {
+ char *p = line.gettoken_str(1);
+ if (!strcmpi(p,"/windows"))
+ {
+ build_header.license_bg=-COLOR_WINDOW;
+ SCRIPT_MSG("LicenseBkColor: /windows\n");
+ }
+ else if (!strcmpi(p,"/grey") || !strcmpi(p,"/gray"))
+ {
+ build_header.license_bg=-COLOR_BTNFACE;
+ SCRIPT_MSG("LicenseBkColor: /grey\n");
+ }
+ else
+ {
+ int v=strtoul(p,&p,16);
+ build_header.license_bg=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
+ build_uninst.license_bg=build_header.license_bg;
+ SCRIPT_MSG("LicenseBkColor: %06X\n",v);
+ }
+ }
+ return PS_OK;
+#else//!NSIS_CONFIG_LICENSEPAGE
+ case TOK_LICENSETEXT:
+ case TOK_LICENSEDATA:
+ case TOK_LICENSEBKCOLOR:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_LICENSEPAGE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_CONFIG_LICENSEPAGE
+#ifdef NSIS_CONFIG_SILENT_SUPPORT
+ case TOK_SILENTINST:
+ {
+ int k=line.gettoken_enum(1,"normal\0silent\0silentlog\0");
+ if (k<0) PRINTHELP()
+#ifndef NSIS_CONFIG_LOG
+ if (k == 2)
+ {
+ ERROR_MSG("SilentInstall: silentlog specified, no log support compiled in (use NSIS_CONFIG_LOG)\n");
+ return PS_ERROR;
+ }
+#endif//NSIS_CONFIG_LOG
+ SCRIPT_MSG("SilentInstall: %s\n",line.gettoken_str(1));
+#ifdef NSIS_CONFIG_LICENSEPAGE
+ if (k && HasUserDefined(NLF_LICENSE_DATA))
+ {
+ warning_fl("SilentInstall: LicenseData already specified. wasting space");
+ }
+ if (k) {
+ build_header.flags|=CH_FLAGS_SILENT;
+ if (k == 2)
+ build_header.flags|=CH_FLAGS_SILENT_LOG;
+ }
+ else {
+ build_header.flags&=~CH_FLAGS_SILENT;
+ build_header.flags&=~CH_FLAGS_SILENT_LOG;
+ }
+#endif//NSIS_CONFIG_LICENSEPAGE
+ }
+ return PS_OK;
+ case TOK_SILENTUNINST:
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ {
+ int k=line.gettoken_enum(1,"normal\0silent\0");
+ if (k<0) PRINTHELP()
+ if (k)
+ build_uninst.flags|=CH_FLAGS_SILENT;
+ else
+ build_uninst.flags&=~CH_FLAGS_SILENT;
+ SCRIPT_MSG("SilentUnInstall: %s\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+#else
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif
+ case TOK_IFSILENT:
+ ent.which=EW_IFFLAG;
+ if (process_jump(line,1,&ent.offsets[0]) ||
+ process_jump(line,2,&ent.offsets[1])) PRINTHELP()
+ ent.offsets[2]=FLAG_OFFSET(silent);
+ ent.offsets[3]=~0;//new value mask - keep flag
+ SCRIPT_MSG("IfSilent ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SETSILENT:
+ {
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(silent);
+ int k=line.gettoken_enum(1,"normal\0silent\0");
+ if (k<0) PRINTHELP()
+ ent.offsets[1]=add_intstring(k);
+ SCRIPT_MSG("SetSilent: %s\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+#else//!NSIS_CONFIG_SILENT_SUPPORT
+ case TOK_SILENTINST:
+ case TOK_SILENTUNINST:
+ case TOK_IFSILENT:
+ case TOK_SETSILENT:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_SILENT_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_CONFIG_SILENT_SUPPORT
+ case TOK_OUTFILE:
+ strncpy(build_output_filename,line.gettoken_str(1),1024-1);
+ SCRIPT_MSG("OutFile: \"%s\"\n",build_output_filename);
+ return PS_OK;
+ case TOK_INSTDIR:
+ {
+ char *p = line.gettoken_str(1);
+ if (build_header.install_directory_ptr)
+ {
+ warning_fl("%s: specified multiple times. wasting space",line.gettoken_str(0));
+ }
+ build_header.install_directory_ptr = add_string(p);
+ build_header.install_directory_auto_append = 0;
+ char *p2 = p + strlen(p);
+ if (*p && *CharPrev(p, p2) != '\\')
+ {
+ // we risk hitting $\r or something like $(bla\ad) or ${bla\ad} here, but it's better
+ // than hitting backslashes in processed strings
+ while (p2 > p && *p2 != '\\')
+ p2 = CharPrev(p, p2);
+ if (*p2 == '\\')
+ {
+ build_header.install_directory_auto_append = add_string(p2 + 1);
+ }
+ }
+ SCRIPT_MSG("InstallDir: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_INSTALLDIRREGKEY: // InstallDirRegKey
+ {
+ if (build_header.install_reg_key_ptr)
+ {
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ }
+ int k=line.gettoken_enum(1,rootkeys[0]);
+ if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
+ if (k == -1) PRINTHELP()
+ build_header.install_reg_rootkey=(int)rootkey_tab[k];
+ if (!build_header.install_reg_rootkey) PRINTHELP() // SHCTX is invalid here
+ build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0);
+ if (line.gettoken_str(2)[0] == '\\')
+ warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
+ build_header.install_reg_value_ptr = add_string(line.gettoken_str(3),0);
+ SCRIPT_MSG("InstallRegKey: \"%s\\%s\\%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ }
+ return PS_OK;
+ case TOK_CRCCHECK:
+ build_crcchk=line.gettoken_enum(1,"off\0on\0force\0");
+ if (build_crcchk==-1) PRINTHELP()
+ SCRIPT_MSG("CRCCheck: %s\n",line.gettoken_str(1));
+ return PS_OK;
+ case TOK_INSTPROGRESSFLAGS:
+ {
+ int x;
+ int smooth=0;
+ build_header.flags&=~CH_FLAGS_PROGRESS_COLORED;
+ for (x = 1; x < line.getnumtokens(); x ++)
+ {
+ if (!stricmp(line.gettoken_str(x),"smooth")) smooth=1;
+ else if (!stricmp(line.gettoken_str(x),"colored")) build_header.flags|=CH_FLAGS_PROGRESS_COLORED;
+ else PRINTHELP()
+ }
+ try {
+ init_res_editor();
+
+ BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INSTFILES), NSIS_DEFAULT_LANG);
+ if (!dlg) throw runtime_error("IDD_INSTFILES doesn't exist!");
+ CDialogTemplate dt(dlg,uDefCodePage);
+ free(dlg);
+ DialogItemTemplate* progress = dt.GetItem(IDC_PROGRESS);
+ if (!progress) {
+ throw runtime_error("IDC_PROGRESS doesn't exist!");
+ }
+
+ if (smooth)
+ progress->dwStyle |= PBS_SMOOTH;
+ else
+ progress->dwStyle &= ~PBS_SMOOTH;
+
+ DWORD dwSize;
+ dlg = dt.Save(dwSize);
+ res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INSTFILES), NSIS_DEFAULT_LANG, dlg, dwSize);
+ delete [] dlg;
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error setting smooth progress bar: %s\n", err.what());
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("InstProgressFlags: smooth=%d, colored=%d\n",smooth,
+ !!(build_header.flags&CH_FLAGS_PROGRESS_COLORED));
+ }
+ return PS_OK;
+ case TOK_AUTOCLOSE:
+ {
+ int k=line.gettoken_enum(1,"false\0true\0");
+ if (k == -1) PRINTHELP();
+ if (k)
+ build_header.flags|=CH_FLAGS_AUTO_CLOSE;
+ else
+ build_header.flags&=~CH_FLAGS_AUTO_CLOSE;
+ SCRIPT_MSG("AutoCloseWindow: %s\n",k?"true":"false");
+ }
+ return PS_OK;
+ case TOK_WINDOWICON:
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ disable_window_icon=line.gettoken_enum(1,"on\0off\0");
+ if (disable_window_icon == -1) PRINTHELP();
+ SCRIPT_MSG("WindowIcon: %s\n",line.gettoken_str(1));
+ return PS_OK;
+#else
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n",line.gettoken_str(0));
+ return PS_ERROR;
+#endif // NSIS_CONFIG_VISIBLE_SUPPORT
+ case TOK_SHOWDETAILSUNINST:
+#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
+ ERROR_MSG("Error: ShowUninstDetails specified but NSIS_CONFIG_UNINSTALL_SUPPORT not defined\n");
+ return PS_ERROR;
+#endif
+ case TOK_SHOWDETAILS:
+ {
+ int k=line.gettoken_enum(1,"hide\0show\0nevershow\0");
+ if (k == -1) PRINTHELP()
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (which_token == TOK_SHOWDETAILSUNINST)
+ {
+ build_uninst.flags&=~(CH_FLAGS_DETAILS_NEVERSHOW|CH_FLAGS_DETAILS_SHOWDETAILS);
+ if (k==1)
+ build_uninst.flags|=CH_FLAGS_DETAILS_SHOWDETAILS;
+ else if (k==2)
+ build_uninst.flags|=CH_FLAGS_DETAILS_NEVERSHOW;
+ }
+ else
+#endif
+ {
+ build_header.flags&=~(CH_FLAGS_DETAILS_NEVERSHOW|CH_FLAGS_DETAILS_SHOWDETAILS);
+ if (k==1)
+ build_header.flags|=CH_FLAGS_DETAILS_SHOWDETAILS;
+ else if (k==2)
+ build_header.flags|=CH_FLAGS_DETAILS_NEVERSHOW;
+ }
+ SCRIPT_MSG("%s: %s\n",line.gettoken_str(0),line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_DIRSHOW:
+ /*{
+ int k=line.gettoken_enum(1,"show\0hide\0");
+ if (k == -1) PRINTHELP();
+ if (k)
+ build_header.flags|=CH_FLAGS_DIR_NO_SHOW;
+ else
+ build_header.flags&=~CH_FLAGS_DIR_NO_SHOW;
+ SCRIPT_MSG("DirShow: %s\n",k?"hide":"show");
+ }*/
+ ERROR_MSG("Error: DirShow doesn't currently work\n");
+ return PS_ERROR;
+ case TOK_ROOTDIRINST:
+ {
+ int k=line.gettoken_enum(1,"true\0false\0");
+ if (k == -1) PRINTHELP();
+ if (k)
+ build_header.flags|=CH_FLAGS_NO_ROOT_DIR;
+ else
+ build_header.flags&=~CH_FLAGS_NO_ROOT_DIR;
+ SCRIPT_MSG("AllowRootDirInstall: %s\n",k?"false":"true");
+ }
+ return PS_OK;
+ case TOK_BGFONT:
+#ifndef NSIS_SUPPORT_BGBG
+ ERROR_MSG("Error: BGFont specified but NSIS_SUPPORT_BGBG not defined\n");
+ return PS_ERROR;
+#else//NSIS_SUPPORT_BGBG
+ if (line.getnumtokens()==1)
+ {
+ memcpy(&bg_font,&bg_default_font,sizeof(LOGFONT));
+ SCRIPT_MSG("BGFont: default font\n");
+ return PS_OK;
+ }
+
+ LOGFONT newfont;
+ newfont.lfHeight=40;
+ newfont.lfWidth=0;
+ newfont.lfEscapement=0;
+ newfont.lfOrientation=0;
+ newfont.lfWeight=FW_NORMAL;
+ newfont.lfItalic=FALSE;
+ newfont.lfUnderline=FALSE;
+ newfont.lfStrikeOut=FALSE;
+ newfont.lfCharSet=DEFAULT_CHARSET;
+ newfont.lfOutPrecision=OUT_DEFAULT_PRECIS;
+ newfont.lfClipPrecision=CLIP_DEFAULT_PRECIS;
+ newfont.lfQuality=DEFAULT_QUALITY;
+ newfont.lfPitchAndFamily=DEFAULT_PITCH;
+
+ strncpy(newfont.lfFaceName,line.gettoken_str(1),LF_FACESIZE);
+
+ SCRIPT_MSG("BGFont: \"%s\"",line.gettoken_str(1));
+ {
+ bool height=false;
+ bool weight=false;
+ for (int i = 2; i < line.getnumtokens(); i++) {
+ char *tok=line.gettoken_str(i);
+ if (tok[0]=='/') {
+ if (!strcmpi(tok,"/ITALIC")) {
+ SCRIPT_MSG(" /ITALIC");
+ newfont.lfItalic=TRUE;
+ }
+ else if (!strcmpi(tok,"/UNDERLINE")) {
+ SCRIPT_MSG(" /UNDERLINE");
+ newfont.lfUnderline=TRUE;
+ }
+ else if (!strcmpi(tok,"/STRIKE")) {
+ SCRIPT_MSG(" /STRIKE");
+ newfont.lfStrikeOut=TRUE;
+ }
+ else {
+ SCRIPT_MSG("\n");
+ PRINTHELP();
+ }
+ }
+ else {
+ if (!height) {
+ SCRIPT_MSG(" height=%s",tok);
+ newfont.lfHeight=line.gettoken_int(i);
+ height=true;
+ }
+ else if (!weight) {
+ SCRIPT_MSG(" weight=%s",tok);
+ newfont.lfWeight=line.gettoken_int(i);
+ weight=true;
+ }
+ else {
+ SCRIPT_MSG("\n");
+ PRINTHELP();
+ }
+ }
+ }
+ }
+ SCRIPT_MSG("\n");
+ memcpy(&bg_font, &newfont, sizeof(LOGFONT));
+ return PS_OK;
+#endif//NSIS_SUPPORT_BGBG
+ case TOK_BGGRADIENT:
+#ifndef NSIS_SUPPORT_BGBG
+ ERROR_MSG("Error: BGGradient specified but NSIS_SUPPORT_BGBG not defined\n");
+ return PS_ERROR;
+#else//NSIS_SUPPORT_BGBG
+ if (line.getnumtokens()==1)
+ {
+ SCRIPT_MSG("BGGradient: default colors\n");
+ build_header.bg_color1=0;
+ build_header.bg_color2=RGB(0,0,255);
+ }
+ else if (!stricmp(line.gettoken_str(1),"off"))
+ {
+ build_header.bg_color1=build_header.bg_color2=build_header.bg_textcolor=-1;
+ SCRIPT_MSG("BGGradient: off\n");
+ if (line.getnumtokens()>2) PRINTHELP()
+ }
+ else
+ {
+ char *p = line.gettoken_str(1);
+ int v1,v2,v3=-1;
+ v1=strtoul(p,&p,16);
+ build_header.bg_color1=((v1&0xff)<<16)|(v1&0xff00)|((v1&0xff0000)>>16);
+ p=line.gettoken_str(2);
+ v2=strtoul(p,&p,16);
+ build_header.bg_color2=((v2&0xff)<<16)|(v2&0xff00)|((v2&0xff0000)>>16);
+
+ p=line.gettoken_str(3);
+ if (*p)
+ {
+ if (!stricmp(p,"notext")) build_header.bg_textcolor=-1;
+ else
+ {
+ v3=strtoul(p,&p,16);
+ build_header.bg_textcolor=((v3&0xff)<<16)|(v3&0xff00)|((v3&0xff0000)>>16);
+ }
+ }
+
+ SCRIPT_MSG("BGGradient: 0x%06X->0x%06X (text=0x%06X)\n",v1,v2,v3);
+ }
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ build_uninst.bg_color1=build_header.bg_color1;
+ build_uninst.bg_color2=build_header.bg_color2;
+ build_uninst.bg_textcolor=build_header.bg_textcolor;
+#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
+#endif//NSIS_SUPPORT_BGBG
+ return PS_OK;
+#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
+ case TOK_INSTCOLORS:
+ {
+ char *p = line.gettoken_str(1);
+ if (p[0]=='/')
+ {
+ if (stricmp(p,"/windows") || line.getnumtokens()!=2) PRINTHELP()
+ build_header.lb_fg=build_header.lb_bg=-1;
+ SCRIPT_MSG("InstallColors: windows default colors\n");
+ }
+ else
+ {
+ int v1,v2;
+ if (line.getnumtokens()!=3) PRINTHELP()
+ v1=strtoul(p,&p,16);
+ build_header.lb_fg=((v1&0xff)<<16)|(v1&0xff00)|((v1&0xff0000)>>16);
+ p=line.gettoken_str(2);
+ v2=strtoul(p,&p,16);
+ build_header.lb_bg=((v2&0xff)<<16)|(v2&0xff00)|((v2&0xff0000)>>16);
+ SCRIPT_MSG("InstallColors: fg=%06X bg=%06X\n",v1,v2);
+ }
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ build_uninst.lb_fg=build_header.lb_fg;
+ build_uninst.lb_bg=build_header.lb_bg;
+#endif
+ }
+ return PS_OK;
+ case TOK_XPSTYLE:
+ {
+ int k=line.gettoken_enum(1,"on\0off\0");
+ if (k == -1) PRINTHELP()
+ SCRIPT_MSG("XPStyle: %s\n", line.gettoken_str(1));
+ if (!k)
+ manifest_comctl = manifest::comctl_xp;
+ else
+ manifest_comctl = manifest::comctl_old;
+ }
+ return PS_OK;
+ case TOK_CHANGEUI:
+ try {
+ DWORD dwSize;
+ int k=line.gettoken_enum(1, "all\0IDD_LICENSE\0IDD_DIR\0IDD_SELCOM\0IDD_INST\0IDD_INSTFILES\0IDD_UNINST\0IDD_VERIFY\0IDD_LICENSE_FSRB\0IDD_LICENSE_FSCB\0");
+ if (k<0) PRINTHELP();
+
+ FILE *fui = FOPEN(line.gettoken_str(2), "rb");
+ if (!fui) {
+ ERROR_MSG("Error: Can't open \"%s\"!\n", line.gettoken_str(2));
+ return PS_ERROR;
+ }
+ MANAGE_WITH(fui, fclose);
+
+ fseek(fui, 0, SEEK_END);
+ unsigned int len = ftell(fui);
+ fseek(fui, 0, SEEK_SET);
+ LPBYTE ui = (LPBYTE) malloc(len);
+ if (!ui) {
+ ERROR_MSG("Internal compiler error #12345: malloc(%d) failed\n", len);
+ extern void quit(); quit();
+ }
+ MANAGE_WITH(ui, free);
+ if (fread(ui, 1, len, fui) != len) {
+ ERROR_MSG("Error: Can't read \"%s\"!\n", line.gettoken_str(2));
+ return PS_ERROR;
+ }
+
+ CResourceEditor *uire = new CResourceEditor(ui, len);
+
+ init_res_editor();
+
+ // Search for required items
+ #define GET(x) dlg = uire->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(x), 0); if (!dlg) return PS_ERROR; CDialogTemplate UIDlg(dlg, uDefCodePage);
+ #define SEARCH(x) if (!UIDlg.GetItem(x)) {ERROR_MSG("Error: Can't find %s (%u) in the custom UI!\n", #x, x);delete [] dlg;delete uire;return PS_ERROR;}
+ #define SAVE(x) dwSize = UIDlg.GetSize(); res_editor->UpdateResourceA(RT_DIALOG, x, NSIS_DEFAULT_LANG, dlg, dwSize); delete [] dlg;
+
+ LPBYTE dlg = NULL;
+
+ if (k == 0 || k == 1) {
+ GET(IDD_LICENSE);
+ SEARCH(IDC_EDIT1);
+ SAVE(IDD_LICENSE);
+ }
+
+ if (k == 0 || k == 2) {
+ GET(IDD_DIR);
+ SEARCH(IDC_DIR);
+ SEARCH(IDC_BROWSE);
+#ifdef NSIS_CONFIG_LOG
+ SEARCH(IDC_CHECK1);
+#endif
+ SAVE(IDD_DIR);
+ }
+
+ if (k == 0 || k == 3) {
+ GET(IDD_SELCOM);
+ SEARCH(IDC_TREE1);
+ SEARCH(IDC_COMBO1);
+ SAVE(IDD_SELCOM);
+ }
+
+ if (k == 0 || k == 4) {
+ GET(IDD_INST);
+ SEARCH(IDC_BACK);
+ SEARCH(IDC_CHILDRECT);
+ SEARCH(IDC_VERSTR);
+ SEARCH(IDOK);
+ SEARCH(IDCANCEL);
+
+ // Search for bitmap holder (default for SetBrandingImage)
+ branding_image_found = false;
+ DialogItemTemplate* dlgItem = 0;
+ for (int i = 0; (dlgItem = UIDlg.GetItemByIdx(i)); i++) {
+ bool check = false;
+
+ if (IS_INTRESOURCE(dlgItem->szClass)) {
+ if (dlgItem->szClass == MAKEINTRESOURCEW(0x0082)) {
+ check = true;
+ }
+ } else {
+ char *szClass = winchar_toansi(dlgItem->szClass);
+ check = strcmp(szClass, "Static") == 0;
+ delete [] szClass;
+ }
+
+ if (check) {
+ if ((dlgItem->dwStyle & SS_BITMAP) == SS_BITMAP) {
+ branding_image_found = true;
+ branding_image_id = dlgItem->wId;
+ break;
+ }
+ }
+ }
+
+ SAVE(IDD_INST);
+ }
+
+ if (k == 0 || k == 5) {
+ GET(IDD_INSTFILES);
+ SEARCH(IDC_LIST1);
+ SEARCH(IDC_PROGRESS);
+ SEARCH(IDC_SHOWDETAILS);
+ SAVE(IDD_INSTFILES);
+ }
+
+ if (k == 0 || k == 6) {
+ GET(IDD_UNINST);
+ SEARCH(IDC_EDIT1);
+ SAVE(IDD_UNINST);
+ }
+
+ if (k == 0 || k == 7) {
+ GET(IDD_VERIFY);
+ SEARCH(IDC_STR);
+ SAVE(IDD_VERIFY);
+ }
+
+ if (k == 0 || k == 8) {
+ GET(IDD_LICENSE_FSRB);
+ SEARCH(IDC_EDIT1);
+ SEARCH(IDC_LICENSEAGREE);
+ SEARCH(IDC_LICENSEDISAGREE);
+ SAVE(IDD_LICENSE_FSRB);
+ }
+
+ if (k == 0 || k == 9) {
+ GET(IDD_LICENSE_FSCB);
+ SEARCH(IDC_EDIT1);
+ SEARCH(IDC_LICENSEAGREE);
+ SAVE(IDD_LICENSE_FSCB);
+ }
+
+ delete uire;
+
+ SCRIPT_MSG("ChangeUI: %s %s%s\n", line.gettoken_str(1), line.gettoken_str(2), branding_image_found?" (branding image holder found)":"");
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while changing UI: %s\n", err.what());
+ return PS_ERROR;
+ }
+ return PS_OK;
+ case TOK_ADDBRANDINGIMAGE:
+#ifdef _WIN32
+ try {
+ int k=line.gettoken_enum(1,"top\0left\0bottom\0right\0");
+ int wh=line.gettoken_int(2);
+ if (k == -1) PRINTHELP();
+ int padding = 2;
+ if (line.getnumtokens() == 4)
+ padding = line.gettoken_int(3);
+
+ init_res_editor();
+ BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG);
+
+ CDialogTemplate dt(dlg, uDefCodePage);
+
+ res_editor->FreeResource(dlg);
+
+ DialogItemTemplate brandingCtl = {0,};
+
+ brandingCtl.dwStyle = SS_BITMAP | WS_CHILD | WS_VISIBLE;
+ brandingCtl.sX = padding;
+ brandingCtl.sY = padding;
+ brandingCtl.szClass = MAKEINTRESOURCEW(0x0082);
+ brandingCtl.szTitle = NULL;
+ brandingCtl.wId = IDC_BRANDIMAGE;
+
+ brandingCtl.sHeight = wh;
+ brandingCtl.sWidth = wh;
+ dt.PixelsToDlgUnits(brandingCtl.sWidth, brandingCtl.sHeight);
+ if (k%2) {
+ // left (1) / right (3)
+
+ if (k & 2) // right
+ brandingCtl.sX += dt.GetWidth();
+ else // left
+ dt.MoveAll(brandingCtl.sWidth + (padding * 2), 0);
+
+ dt.Resize(brandingCtl.sWidth + (padding * 2), 0);
+
+ brandingCtl.sHeight = dt.GetHeight() - (padding * 2);
+ }
+ else {
+ // top (0) / bottom (2)
+
+ if (k & 2) // bottom
+ brandingCtl.sY += dt.GetHeight();
+ else // top
+ dt.MoveAll(0, brandingCtl.sHeight + (padding * 2));
+
+ dt.Resize(0, brandingCtl.sHeight + (padding * 2));
+
+ brandingCtl.sWidth = dt.GetWidth() - (padding * 2);
+ }
+
+ dt.AddItem(brandingCtl);
+
+ DWORD dwDlgSize;
+ dlg = dt.Save(dwDlgSize);
+
+ res_editor->UpdateResourceA(RT_DIALOG, IDD_INST, NSIS_DEFAULT_LANG, dlg, dwDlgSize);
+
+ delete [] dlg;
+
+ dt.DlgUnitsToPixels(brandingCtl.sWidth, brandingCtl.sHeight);
+ SCRIPT_MSG("AddBrandingImage: %s %ux%u\n", line.gettoken_str(1), brandingCtl.sWidth, brandingCtl.sHeight);
+
+ branding_image_found = true;
+ branding_image_id = IDC_BRANDIMAGE;
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while adding image branding support: %s\n", err.what());
+ return PS_ERROR;
+ }
+ return PS_OK;
+#else
+ ERROR_MSG("Error: AddBrandingImage is disabled for non Win32 platforms.\n");
+ return PS_ERROR;
+#endif
+ case TOK_SETFONT:
+ {
+ if (!strnicmp(line.gettoken_str(1), "/LANG=", 6))
+ {
+ LANGID lang_id = atoi(line.gettoken_str(1) + 6);
+ LanguageTable *table = GetLangTable(lang_id);
+ table->nlf.m_szFont = (char*)malloc(strlen(line.gettoken_str(2))+1);
+ strcpy(table->nlf.m_szFont, line.gettoken_str(2));
+ table->nlf.m_iFontSize = line.gettoken_int(3);
+
+ SCRIPT_MSG("SetFont: lang=%d \"%s\" %s\n", lang_id, line.gettoken_str(2), line.gettoken_str(3));
+ }
+ else
+ {
+ strncpy(build_font, line.gettoken_str(1), sizeof(build_font));
+ build_font_size = line.gettoken_int(2);
+
+ SCRIPT_MSG("SetFont: \"%s\" %s\n", line.gettoken_str(1), line.gettoken_str(2));
+ }
+ }
+ return PS_OK;
+#else
+ case TOK_INSTCOLORS:
+ case TOK_XPSTYLE:
+ case TOK_CHANGEUI:
+ case TOK_ADDBRANDINGIMAGE:
+ case TOK_SETFONT:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_VISIBLE_SUPPORT not defined.\n",line.gettoken_str(0));
+ return PS_ERROR;
+#endif// NSIS_CONFIG_VISIBLE_SUPPORT
+
+ case TOK_REQEXECLEVEL:
+ {
+ int k=line.gettoken_enum(1,"none\0user\0highest\0admin\0");
+ switch (k)
+ {
+ case 0:
+ manifest_exec_level = manifest::exec_level_none;
+ break;
+ case 1:
+ manifest_exec_level = manifest::exec_level_user;
+ break;
+ case 2:
+ manifest_exec_level = manifest::exec_level_highest;
+ break;
+ case 3:
+ manifest_exec_level = manifest::exec_level_admin;
+ break;
+ default:
+ PRINTHELP();
+ }
+ }
+ return PS_OK;
+
+ // Ability to change compression methods from within the script
+ case TOK_SETCOMPRESSOR:
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ {
+ if (build_compressor_set) {
+ ERROR_MSG("Error: can't change compressor after data already got compressed or header already changed!\n");
+ return PS_ERROR;
+ }
+
+ if (build_compressor_final)
+ {
+ warning_fl("SetCompressor ignored due to previous call with the /FINAL switch");
+ return PS_OK;
+ }
+
+ int a = 1;
+
+ build_compress_whole = false;
+
+ while (line.gettoken_str(a)[0] == '/')
+ {
+ if (!strcmpi(line.gettoken_str(a),"/FINAL"))
+ {
+ build_compressor_final = true;
+ a++;
+ }
+ else if (!strcmpi(line.gettoken_str(a),"/SOLID"))
+ {
+ build_compress_whole = true;
+ a++;
+ }
+ else PRINTHELP();
+ }
+
+ if (a != line.getnumtokens() - 1)
+ {
+ ERROR_MSG("%s expects %d parameters, got %d.\n", line.gettoken_str(0), a + 1, line.getnumtokens());
+ PRINTHELP();
+ }
+
+ int k=line.gettoken_enum(a, "zlib\0bzip2\0lzma\0");
+ switch (k) {
+ case 0:
+ compressor = &zlib_compressor;
+ break;
+
+ case 1:
+ compressor = &bzip2_compressor;
+ break;
+
+ case 2:
+ compressor = &lzma_compressor;
+ break;
+
+ default:
+ PRINTHELP();
+ }
+
+ string compressor_name = line.gettoken_str(a);
+ compressor_name = lowercase(compressor_name);
+
+ if (set_compressor(compressor_name, build_compress_whole) != PS_OK)
+ {
+ SCRIPT_MSG("SetCompressor: error loading stub for \"%s\" compressor.\n", compressor_name.c_str());
+ return PS_ERROR;
+ }
+
+ SCRIPT_MSG("SetCompressor: %s%s%s\n", build_compressor_final ? "/FINAL " : "", build_compress_whole ? "/SOLID " : "", line.gettoken_str(a));
+ }
+ return PS_OK;
+#else//NSIS_CONFIG_COMPRESSION_SUPPORT
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
+ case TOK_LOADNLF:
+ {
+ SCRIPT_MSG("LoadLanguageFile: %s\n", line.gettoken_str(1));
+
+ LanguageTable *table = LoadLangFile(line.gettoken_str(1));
+
+ if (!table)
+ return PS_ERROR;
+
+ if (!defcodepage_set)
+ {
+ uDefCodePage = table->nlf.m_uCodePage;
+ defcodepage_set = true;
+ }
+
+ last_used_lang = table->lang_id;
+ // define LANG_LangName as "####" (lang id)
+ // for example ${LANG_ENGLISH} = 1033
+ char lang_id[16];
+ char lang_cp[16];
+ char lang_name[1024];
+ wsprintf(lang_name, "LANG_%s", table->nlf.m_szName);
+ wsprintf(lang_id, "%u", table->lang_id);
+ wsprintf(lang_cp, "%u", table->nlf.m_uCodePage);
+ definedlist.add(lang_name, lang_id);
+ wsprintf(lang_name, "LANG_%s_CP", table->nlf.m_szName);
+ definedlist.add(lang_name, lang_cp);
+ }
+ return PS_OK;
+
+ // preprocessor-ish (ifdef/ifndef/else/endif are handled one step out from here)
+ ///////////////////////////////////////////////////////////////////////////////
+ case TOK_P_DEFINE:
+ {
+ char *define=line.gettoken_str(1);
+ char *value;
+ char datebuf[256];
+ char mathbuf[256];
+
+ if (!stricmp(define,"/date") || !stricmp(define,"/utcdate")) {
+ if (line.getnumtokens()!=4) PRINTHELP()
+
+ char *date_type = define;
+
+ define=line.gettoken_str(2);
+ value=line.gettoken_str(3);
+
+ time_t rawtime;
+ time(&rawtime);
+
+ if (!stricmp(date_type,"/utcdate"))
+ rawtime = mktime(gmtime(&rawtime));
+
+ datebuf[0]=0;
+ size_t s=strftime(datebuf,sizeof(datebuf),value,localtime(&rawtime));
+
+ if (s == 0)
+ datebuf[0]=0;
+ else
+ datebuf[max(s,sizeof(datebuf)-1)]=0;
+
+ value=datebuf;
+
+ } else if (!stricmp(define,"/math")) {
+
+ int value1;
+ int value2;
+ char *mathop;
+
+ if (line.getnumtokens()!=6) PRINTHELP()
+
+ define = line.gettoken_str(2);
+ value1 = line.gettoken_int(3);
+ mathop = line.gettoken_str(4);
+ value2 = line.gettoken_int(5);
+ value = mathbuf;
+
+ if (!strcmp(mathop,"+")) {
+ sprintf(value,"%d",value1+value2);
+ } else if (!strcmp(mathop,"-")) {
+ sprintf(value,"%d",value1-value2);
+ } else if (!strcmp(mathop,"*")) {
+ sprintf(value,"%d",value1*value2);
+ } else if (!strcmp(mathop,"&")) {
+ sprintf(value,"%d",value1&value2);
+ } else if (!strcmp(mathop,"|")) {
+ sprintf(value,"%d",value1|value2);
+ } else if (!strcmp(mathop,"^")) {
+ sprintf(value,"%d",value1^value2);
+ } else if (!strcmp(mathop,"/")) {
+ if (value2==0) {
+ ERROR_MSG("!define /math: division by zero! (\"%i / %i\")\n",value1,value2);
+ return PS_ERROR;
+ }
+ sprintf(value,"%d",value1/value2);
+ } else if (!strcmp(mathop,"%")) {
+ if (value2==0) {
+ ERROR_MSG("!define /math: division by zero! (\"%i %% %i\")\n",value1,value2);
+ return PS_ERROR;
+ }
+ sprintf(value,"%d",value1%value2);
+ } else PRINTHELP()
+
+ } else {
+ if (line.getnumtokens()==4) PRINTHELP()
+
+ value=line.gettoken_str(2);
+ }
+
+ if (definedlist.add(define,value))
+ {
+ ERROR_MSG("!define: \"%s\" already defined!\n",define);
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("!define: \"%s\"=\"%s\"\n",define,value);
+ }
+ return PS_OK;
+ case TOK_P_UNDEF:
+ if (definedlist.del(line.gettoken_str(1)))
+ {
+ ERROR_MSG("!undef: \"%s\" not defined!\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("!undef: \"%s\"\n",line.gettoken_str(1));
+ return PS_OK;
+ case TOK_P_PACKEXEHEADER:
+ strncpy(build_packname,line.gettoken_str(1),sizeof(build_packname)-1);
+ strncpy(build_packcmd,line.gettoken_str(2),sizeof(build_packcmd)-1);
+ SCRIPT_MSG("!packhdr: filename=\"%s\", command=\"%s\"\n",
+ build_packname, build_packcmd);
+ return PS_OK;
+ case TOK_P_SYSTEMEXEC:
+ {
+ char *exec=line.gettoken_str(1);
+ int comp=line.gettoken_enum(2,"<\0>\0<>\0=\0ignore\0");
+ if (line.getnumtokens() == 2) comp = 4;
+ if (comp == -1 && line.getnumtokens() == 3) comp=4;
+ if (comp == -1) PRINTHELP()
+ int success=0;
+ int cmpv=line.gettoken_int(3,&success);
+ if (!success && comp != 4) PRINTHELP()
+ SCRIPT_MSG("!system: \"%s\"\n",exec);
+#ifdef _WIN32
+ int ret=sane_system(exec);
+#else
+ char *execfixed = my_convert(exec);
+ int ret=system(execfixed);
+ my_convert_free(execfixed);
+#endif
+ if (comp == 0 && ret < cmpv);
+ else if (comp == 1 && ret > cmpv);
+ else if (comp == 2 && ret != cmpv);
+ else if (comp == 3 && ret == cmpv);
+ else if (comp == 4);
+ else
+ {
+ ERROR_MSG("!system: returned %d, aborting\n",ret);
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("!system: returned %d\n",ret);
+ }
+ return PS_OK;
+ case TOK_P_EXECUTE:
+ {
+ char *exec=line.gettoken_str(1);
+#ifdef _WIN32
+ PROCESS_INFORMATION pi;
+ STARTUPINFO si={sizeof(STARTUPINFO),};
+ if (CreateProcess(NULL,exec,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
+ {
+ WaitForSingleObject(pi.hProcess,INFINITE);
+ CloseHandle(pi.hThread);
+ CloseHandle(pi.hProcess);
+ }
+#else
+ char *execfixed = my_convert(exec);
+ system(execfixed);
+ my_convert_free(execfixed);
+#endif
+ SCRIPT_MSG("!execute: \"%s\"\n",exec);
+ }
+ case TOK_P_ADDINCLUDEDIR:
+#ifdef _WIN32
+ include_dirs.add(line.gettoken_str(1),0);
+#else
+ {
+ char *f = line.gettoken_str(1);
+ char *fc = my_convert(f);
+ include_dirs.add(fc,0);
+ my_convert_free(fc);
+ }
+#endif
+ return PS_OK;
+ case TOK_P_INCLUDE:
+ {
+ bool required = true;
+
+ char *f = line.gettoken_str(1);
+
+ if(!stricmp(f,"/nonfatal")) {
+ if (line.getnumtokens()!=3)
+ PRINTHELP();
+
+ f = line.gettoken_str(2);
+ required = false;
+ } else if (line.getnumtokens()!=2) {
+ PRINTHELP();
+ }
+
+#ifdef _WIN32
+ char *fc = f;
+#else
+ char *fc = my_convert(f);
+#endif
+ int included = 0;
+
+ string dir = get_dir_name(fc);
+ string spec = get_file_name(fc);
+ string basedir = dir + PLATFORM_PATH_SEPARATOR_STR;
+ if (dir == spec) {
+ // no path, just file name
+ dir = ".";
+ basedir = "";
+ }
+
+#ifndef _WIN32
+ my_convert_free(fc);
+#endif
+
+ // search working directory
+ boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
+ dr->read(dir);
+
+ for (dir_reader::iterator files_itr = dr->files().begin();
+ files_itr != dr->files().end();
+ files_itr++)
+ {
+ if (!dir_reader::matches(*files_itr, spec))
+ continue;
+
+ string incfile = basedir + *files_itr;
+
+ if (includeScript((char *) incfile.c_str()) != PS_OK) {
+ return PS_ERROR;
+ }
+
+ included++;
+ }
+
+ if (included)
+ return PS_OK;
+
+ // search include dirs
+ char *incdir = include_dirs.get();
+ int incdirs = include_dirs.getnum();
+
+ for (int i = 0; i < incdirs; i++, incdir += strlen(incdir) + 1) {
+ string curincdir = string(incdir) + PLATFORM_PATH_SEPARATOR_STR + dir;
+
+ boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
+ dr->read(curincdir);
+
+ for (dir_reader::iterator incdir_itr = dr->files().begin();
+ incdir_itr != dr->files().end();
+ incdir_itr++)
+ {
+ if (!dir_reader::matches(*incdir_itr, spec))
+ continue;
+
+ string incfile = string(incdir) + PLATFORM_PATH_SEPARATOR_STR + basedir + *incdir_itr;
+
+ if (includeScript((char *) incfile.c_str()) != PS_OK) {
+ return PS_ERROR;
+ }
+
+ included++;
+ }
+
+ if (included)
+ return PS_OK;
+
+ }
+
+ // nothing found
+ if (!included)
+ {
+ if(required) {
+ ERROR_MSG("!include: could not find: \"%s\"\n",f);
+ return PS_ERROR;
+ } else {
+ warning_fl("!include: could not find: \"%s\"",f);
+ }
+ }
+ }
+ return PS_OK;
+ case TOK_P_CD:
+ if (!line.gettoken_str(1)[0] || chdir(line.gettoken_str(1)))
+ {
+ ERROR_MSG("!cd: error changing to: \"%s\"\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ return PS_OK;
+ case TOK_P_ERROR:
+ ERROR_MSG("!error: %s\n",line.gettoken_str(1));
+ return PS_ERROR;
+ case TOK_P_WARNING:
+ warning_fl("!warning: %s",line.gettoken_str(1));
+ return PS_OK;
+ case TOK_P_ECHO:
+ SCRIPT_MSG("%s (%s:%d)\n", line.gettoken_str(1),curfilename,linecnt);
+ return PS_OK;
+
+ case TOK_P_VERBOSE:
+ {
+ extern int g_display_errors;
+ int k=line.gettoken_enum(1,"push\0pop\0");
+ int v;
+ if (k < 0)
+ // just set
+ v=line.gettoken_int(1);
+ else
+ {
+ if (k)
+ {
+ // pop
+ int l=verbose_stack.getlen();
+ if (l)
+ {
+ v=((int*)verbose_stack.get())[(l/sizeof(int))-1];
+ verbose_stack.resize(l-sizeof(int));
+ }
+ else
+ return PS_OK;
+ }
+ else
+ {
+ // push
+ v=0;
+ if (display_errors)
+ {
+ v++;
+ if (display_warnings)
+ {
+ v++;
+ if (display_info)
+ {
+ v++;
+ if (display_script)
+ {
+ v++;
+ }
+ }
+ }
+ }
+ verbose_stack.add(&v,sizeof(int));
+ return PS_OK;
+ }
+ }
+ display_script=v>3;
+ display_info=v>2;
+ display_warnings=v>1;
+ display_errors=v>0;
+ g_display_errors=display_errors;
+ }
+ return PS_OK;
+
+ case TOK_UNINSTALLEXENAME: PRINTHELP()
+
+
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ case TOK_UNINSTCAPTION:
+ {
+ if (SetInnerString(NLF_UCAPTION,line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ SCRIPT_MSG("UninstCaption: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_UNINSTICON:
+ SCRIPT_MSG("UninstallIcon: \"%s\"\n",line.gettoken_str(1));
+ try {
+ free_loaded_icon(uninstaller_icon);
+ uninstaller_icon = load_icon_file(line.gettoken_str(1));
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while loading icon from \"%s\": %s\n", line.gettoken_str(1), err.what());
+ return PS_ERROR;
+ }
+ return PS_OK;
+ case TOK_UNINSTTEXT:
+ {
+ if (!cur_page) {
+ if (SetInnerString(NLF_UNINST_TEXT, line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ SetInnerString(NLF_UNINST_SUBTEXT, line.gettoken_str(2));
+ }
+ else {
+ if (cur_page_type != PAGE_UNINSTCONFIRM) {
+ ERROR_MSG("Error: UninstallText can only be used inside PageEx uninstConfirm.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[0] = add_string(line.gettoken_str(1));
+ cur_page->parms[1] = add_string(line.gettoken_str(2));
+ }
+ SCRIPT_MSG("UninstallText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
+ }
+ return PS_OK;
+ case TOK_UNINSTSUBCAPTION:
+ {
+ int s;
+ int w=line.gettoken_int(1,&s);
+ if (!s || w < 0 || w > 2) PRINTHELP()
+ SetInnerString(NLF_USUBCAPTION_CONFIRM+w,line.gettoken_str(2));
+ SCRIPT_MSG("UninstSubCaption: page:%d, text=%s\n",w,line.gettoken_str(2));
+ }
+ return PS_OK;
+ case TOK_WRITEUNINSTALLER:
+ {
+ if (uninstall_mode)
+ {
+ ERROR_MSG("WriteUninstaller only valid from install, not from uninstall.\n");
+ PRINTHELP()
+ }
+ uninstaller_writes_used++;
+ ent.which=EW_WRITEUNINSTALLER;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ string full = string("$INSTDIR\\") + string(line.gettoken_str(1));
+ ent.offsets[3]=add_string(full.c_str());
+ // ent.offsets[1] and ent.offsets[2] are set in CEXEBuild::uninstall_generate()
+ if (!ent.offsets[0]) PRINTHELP()
+ SCRIPT_MSG("WriteUninstaller: \"%s\"\n",line.gettoken_str(1));
+
+ DefineInnerLangString(NLF_ERR_CREATING);
+ DefineInnerLangString(NLF_CREATED_UNINST);
+ }
+ return add_entry(&ent);
+#else//!NSIS_CONFIG_UNINSTALL_SUPPORT
+ case TOK_WRITEUNINSTALLER:
+ case TOK_UNINSTCAPTION:
+ case TOK_UNINSTICON:
+ case TOK_UNINSTTEXT:
+ case TOK_UNINSTSUBCAPTION:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif
+
+
+
+ // section/function shit
+ ///////////////////////////////////////////////////////////////////////////////
+
+ case TOK_SECTION:
+ {
+ int a=1,unselected = 0;
+ if (!strcmpi(line.gettoken_str(1),"/o"))
+ {
+ unselected = 1;
+ a++;
+ }
+ else if (line.getnumtokens() > 3)
+ PRINTHELP();
+ SCRIPT_MSG("Section: \"%s\"",line.gettoken_str(a));
+ if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1));
+ SCRIPT_MSG("\n");
+#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!stricmp(line.gettoken_str(a),"uninstall"))
+ {
+ ERROR_MSG("Error: Uninstall section declared, no NSIS_CONFIG_UNINSTALL_SUPPORT\n");
+ return PS_ERROR;
+ }
+#endif
+
+ int ret;
+
+ if (line.gettoken_str(a)[0]=='-')
+ {
+ if (!strnicmp(line.gettoken_str(a)+1,"un.",3))
+ ret=add_section("un.",line.gettoken_str(a+1));
+ else
+ ret=add_section("",line.gettoken_str(a+1));
+ }
+ else ret=add_section(line.gettoken_str(a),line.gettoken_str(a+1));
+ if (ret != PS_OK) return ret;
+
+ if (unselected)
+ build_cursection->flags &= ~SF_SELECTED;
+
+ return PS_OK;
+ }
+ case TOK_SECTIONEND:
+ SCRIPT_MSG("SectionEnd\n");
+ return section_end();
+ case TOK_SECTIONIN:
+ {
+ SCRIPT_MSG("SectionIn: ");
+ int wt;
+ for (wt = 1; wt < line.getnumtokens(); wt ++)
+ {
+ char *p=line.gettoken_str(wt);
+ if (!stricmp(p, "RO"))
+ {
+ if (section_add_flags(SF_RO) != PS_OK) return PS_ERROR;
+ SCRIPT_MSG("[RO] ");
+ }
+ else
+ {
+ int x=atoi(p)-1;
+ if (x >= 0 && x < NSIS_MAX_INST_TYPES)
+ {
+ if (section_add_install_type(1<<x) != PS_OK) return PS_ERROR;
+ SCRIPT_MSG("[%d] ",x);
+ }
+ else if (x < 0)
+ {
+ PRINTHELP()
+ }
+ else
+ {
+ ERROR_MSG("Error: SectionIn section %d out of range 1-%d\n",x+1,NSIS_MAX_INST_TYPES);
+ return PS_ERROR;
+ }
+ p++;
+ }
+ }
+ SCRIPT_MSG("\n");
+ }
+ return PS_OK;
+ case TOK_SECTIONGROUPEND:
+ case TOK_SUBSECTIONEND:
+ case TOK_SECTIONGROUP:
+ case TOK_SUBSECTION:
+ {
+ char buf[1024];
+ int a=1,ex = 0;
+ if (!strcmpi(line.gettoken_str(1),"/e"))
+ {
+ ex = 1;
+ a++;
+ }
+ wsprintf(buf,"-%s",line.gettoken_str(a));
+ if (which_token == TOK_SECTIONGROUP || which_token == TOK_SUBSECTION)
+ {
+ char *s = line.gettoken_str(a);
+ if (!s[0] || (!strcmpi(s, "un.") && !s[3]))
+ PRINTHELP();
+ }
+
+ SCRIPT_MSG("%s %s",line.gettoken_str(0),line.gettoken_str(a));
+ if (line.gettoken_str(a+1)[0]) SCRIPT_MSG(" ->(%s)",line.gettoken_str(a+1));
+ SCRIPT_MSG("\n");
+ return add_section(buf,line.gettoken_str(a+1),ex);
+ }
+ case TOK_FUNCTION:
+ if (!line.gettoken_str(1)[0]) PRINTHELP()
+ if (line.gettoken_str(1)[0]==':' || line.gettoken_str(1)[0]=='/')
+ {
+ ERROR_MSG("Function: function name cannot begin with : or /.\n");
+ PRINTHELP()
+ }
+ SCRIPT_MSG("Function: \"%s\"\n",line.gettoken_str(1));
+#ifndef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (!strnicmp(line.gettoken_str(1),"un.",3))
+ {
+ ERROR_MSG("Error: Uninstall function declared, no NSIS_CONFIG_UNINSTALL_SUPPORT\n");
+ return PS_ERROR;
+ }
+#endif
+ return add_function(line.gettoken_str(1));
+ case TOK_FUNCTIONEND:
+ SCRIPT_MSG("FunctionEnd\n");
+ return function_end();
+
+ // flag setters
+ ///////////////////////////////////////////////////////////////////////////////
+
+ // BEGIN - Added by ramon 23 May 2003
+ case TOK_ALLOWSKIPFILES:
+ build_allowskipfiles=line.gettoken_enum(1,"off\0on\0");
+ if (build_allowskipfiles==-1) PRINTHELP()
+ SCRIPT_MSG("AllowSkipFiles: %s\n",line.gettoken_str(1));
+ return PS_OK;
+ // END - Added by ramon 23 May 2003
+ case TOK_SETDATESAVE:
+ build_datesave=line.gettoken_enum(1,"off\0on\0");
+ if (build_datesave==-1) PRINTHELP()
+ SCRIPT_MSG("SetDateSave: %s\n",line.gettoken_str(1));
+ return PS_OK;
+ case TOK_SETOVERWRITE:
+ {
+ int k=line.gettoken_enum(1,"on\0off\0try\0ifnewer\0ifdiff\0lastused\0");
+ if (k==-1) PRINTHELP()
+ if (k==5)
+ {
+ k=build_overwrite;
+ build_overwrite=build_last_overwrite;
+ build_last_overwrite=k;
+ }
+ else
+ {
+ build_last_overwrite=build_overwrite;
+ build_overwrite=k;
+ }
+ SCRIPT_MSG("SetOverwrite: %s\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ case TOK_SETPLUGINUNLOAD:
+ build_plugin_unload=line.gettoken_enum(1,"manual\0alwaysoff\0");
+ if (build_plugin_unload==-1) PRINTHELP()
+ SCRIPT_MSG("SetPluginUnload: %s\n",line.gettoken_str(1));
+ return PS_OK;
+#endif //NSIS_CONFIG_PLUGIN_SUPPORT
+ case TOK_SETCOMPRESS:
+ build_compress=line.gettoken_enum(1,"off\0auto\0force\0");
+ if (build_compress==-1) PRINTHELP()
+ if (build_compress==0 && build_compress_whole)
+ {
+ warning_fl("'SetCompress off' encountered, and in whole compression mode. Effectively ignored.");
+ }
+ SCRIPT_MSG("SetCompress: %s\n",line.gettoken_str(1));
+ return PS_OK;
+ case TOK_DBOPTIMIZE:
+ build_optimize_datablock=line.gettoken_enum(1,"off\0on\0");
+ if (build_optimize_datablock==-1) PRINTHELP()
+ SCRIPT_MSG("SetDatablockOptimize: %s\n",line.gettoken_str(1));
+ return PS_OK;
+ case TOK_FILEBUFSIZE:
+ build_filebuflen=line.gettoken_int(1);
+ build_filebuflen<<=20;
+ if (build_filebuflen<=0)
+ {
+ ERROR_MSG("Error: FileBufSize: invalid buffer size -- %d\n",build_filebuflen);
+ return PS_ERROR;
+ }
+ SCRIPT_MSG("FileBufSize: %smb (%d bytes)\n",line.gettoken_str(1),build_filebuflen);
+ return PS_OK;
+#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
+ case TOK_SETCOMPRESSIONLEVEL:
+ {
+ if (compressor == &lzma_compressor)
+ warning_fl("SetCompressionLevel: compressor is set to LZMA. Effectively ignored.");
+ if (build_compressor_set && build_compress_whole)
+ warning_fl("SetCompressionLevel: data already compressed in compress whole mode. Effectively ignored.");
+
+ int s;
+ build_compress_level=line.gettoken_int(1,&s);
+ if (!s || build_compress_level < 0 || build_compress_level > 9) PRINTHELP();
+ SCRIPT_MSG("SetCompressionLevel: %u\n", build_compress_level);
+ }
+ return PS_OK;
+ case TOK_SETCOMPRESSORDICTSIZE:
+ {
+ if (compressor != &lzma_compressor)
+ warning_fl("SetCompressorDictSize: compressor is not set to LZMA. Effectively ignored.");
+ if (build_compressor_set && build_compress_whole)
+ warning_fl("SetCompressorDictSize: data already compressed in compress whole mode. Effectively ignored.");
+
+ int s;
+ build_compress_dict_size=line.gettoken_int(1,&s);
+ if (!s) PRINTHELP();
+ SCRIPT_MSG("SetCompressorDictSize: %u mb\n", build_compress_dict_size);
+ build_compress_dict_size <<= 20;
+ }
+ return PS_OK;
+#else
+ case TOK_SETCOMPRESSIONLEVEL:
+ case TOK_SETCOMPRESSORDICTSIZE:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPRESSION_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
+ case TOK_ADDSIZE:
+ {
+ int s;
+ int size_kb=line.gettoken_int(1,&s);
+ if (!s) PRINTHELP()
+ SCRIPT_MSG("AddSize: %d kb\n",size_kb);
+ section_add_size_kb(size_kb);
+ }
+ return PS_OK;
+ case TOK_SUBCAPTION:
+ {
+ int s;
+ int w=line.gettoken_int(1,&s);
+ if (!s || w < 0 || w > 4) PRINTHELP()
+ SetInnerString(NLF_SUBCAPTION_LICENSE+w,line.gettoken_str(2));
+ SCRIPT_MSG("SubCaption: page:%d, text=%s\n",w,line.gettoken_str(2));
+ }
+ return PS_OK;
+ case TOK_FILEERRORTEXT:
+#ifdef NSIS_SUPPORT_FILE
+ {
+ SetInnerString(NLF_FILE_ERROR,line.gettoken_str(1));
+ SetInnerString(NLF_FILE_ERROR_NOIGNORE,line.gettoken_str(2));
+ SCRIPT_MSG("FileErrorText: \"%s\" \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
+ }
+ return PS_OK;
+#else
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif
+ case TOK_BRANDINGTEXT:
+ {
+ int a = 1;
+ int trim = 0;
+ while (line.gettoken_str(a)[0] == '/') {
+ if (!strnicmp(line.gettoken_str(a),"/TRIM",5)) {
+ if (!stricmp(line.gettoken_str(a)+5,"LEFT")) trim = 1;
+ else if (!stricmp(line.gettoken_str(a)+5,"RIGHT")) trim = 2;
+ else if (!stricmp(line.gettoken_str(a)+5,"CENTER")) trim = 3;
+ else PRINTHELP();
+ a++;
+ }
+ else break;
+ }
+ if (line.getnumtokens()!=a+1 && !trim) PRINTHELP();
+ if (line.getnumtokens()==a+1)
+ SetInnerString(NLF_BRANDING,line.gettoken_str(a));
+#ifdef _WIN32
+ if (trim) try {
+ init_res_editor();
+
+ BYTE* dlg = res_editor->GetResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG);
+ CDialogTemplate td(dlg,uDefCodePage);
+ free(dlg);
+
+ if (trim) {
+ char str[512];
+ if (line.getnumtokens()==a+1 && line.gettoken_str(a)[0])
+ strcpy(str, line.gettoken_str(a));
+ else
+ wsprintf(str, "Nullsoft Install System %s", NSIS_VERSION);
+
+ short old_width = td.GetItem(IDC_VERSTR)->sWidth;
+
+ switch (trim) {
+ case 1: td.LTrimToString(IDC_VERSTR, str, 4); break;
+ case 2: td.RTrimToString(IDC_VERSTR, str, 4); break;
+ case 3: td.CTrimToString(IDC_VERSTR, str, 4); break;
+ }
+
+ if (td.GetItem(IDC_VERSTR)->sWidth > old_width)
+ {
+ warning_fl("BrandingText: \"%s\" is too long, trimming has expanded the label", str);
+ }
+ }
+
+ DWORD dwSize;
+ dlg = td.Save(dwSize);
+ res_editor->UpdateResourceA(RT_DIALOG, MAKEINTRESOURCE(IDD_INST), NSIS_DEFAULT_LANG, dlg, dwSize);
+ res_editor->FreeResource(dlg);
+ }
+ catch (exception& err) {
+ ERROR_MSG("Error while triming branding text control: %s\n", err.what());
+ return PS_ERROR;
+ }
+#else
+ if (trim)
+ {
+ ERROR_MSG("Error: BrandingText /TRIM* is disabled for non Win32 platforms.\n");
+ return PS_ERROR;
+ }
+#endif
+ SCRIPT_MSG("BrandingText: \"%s\"\n",line.gettoken_str(a));
+ }
+ return PS_OK;
+ case TOK_MISCBUTTONTEXT:
+ {
+ SetInnerString(NLF_BTN_BACK,line.gettoken_str(1));
+ SetInnerString(NLF_BTN_NEXT,line.gettoken_str(2));
+ SetInnerString(NLF_BTN_CANCEL,line.gettoken_str(3));
+ SetInnerString(NLF_BTN_CLOSE,line.gettoken_str(4));
+ SCRIPT_MSG("MiscButtonText: back=\"%s\" next=\"%s\" cancel=\"%s\" close=\"%s\"\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ }
+ return PS_OK;
+ case TOK_SPACETEXTS:
+ {
+ if (!strcmpi(line.gettoken_str(1), "none")) {
+ no_space_texts=true;
+ SCRIPT_MSG("SpaceTexts: none\n");
+ }
+ else {
+ no_space_texts=false;
+ SetInnerString(NLF_SPACE_REQ,line.gettoken_str(1));
+ SetInnerString(NLF_SPACE_AVAIL,line.gettoken_str(2));
+ SCRIPT_MSG("SpaceTexts: required=\"%s\" available=\"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
+ }
+ }
+ return PS_OK;
+ case TOK_INSTBUTTONTEXT:
+ {
+ SetInnerString(NLF_BTN_INSTALL,line.gettoken_str(1));
+ SCRIPT_MSG("InstallButtonText: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_DETAILSBUTTONTEXT:
+ {
+ if (!cur_page) {
+ if (SetInnerString(NLF_BTN_DETAILS,line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ }
+ else {
+ if (cur_page_type != PAGE_INSTFILES) {
+ ERROR_MSG("Error: DetailsButtonText can only be used inside PageEx instfiles.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[1] = add_string(line.gettoken_str(1));
+ }
+ SCRIPT_MSG("DetailsButtonText: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_COMPLETEDTEXT:
+ {
+ if (!cur_page) {
+ if (SetInnerString(NLF_COMPLETED,line.gettoken_str(1)) == PS_WARNING)
+ warning_fl("%s: specified multiple times, wasting space",line.gettoken_str(0));
+ }
+ else {
+ if (cur_page_type != PAGE_INSTFILES) {
+ ERROR_MSG("Error: CompletedText can only be used inside PageEx instfiles.\n");
+ return PS_ERROR;
+ }
+ cur_page->parms[2] = add_string(line.gettoken_str(1));
+ }
+ SCRIPT_MSG("CompletedText: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+ case TOK_UNINSTBUTTONTEXT:
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ {
+ SetInnerString(NLF_BTN_UNINSTALL,line.gettoken_str(1));
+ SCRIPT_MSG("UninstButtonText: \"%s\"\n",line.gettoken_str(1));
+ }
+ return PS_OK;
+#else
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_UNINSTALL_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif
+
+ // instructions
+ ///////////////////////////////////////////////////////////////////////////////
+ case TOK_NOP:
+ SCRIPT_MSG("Nop\n");
+ ent.which=EW_NOP;
+ return add_entry(&ent);
+ case TOK_GOTO:
+ ent.which=EW_NOP;
+ if (process_jump(line,1,&ent.offsets[0])) PRINTHELP()
+ SCRIPT_MSG("Goto: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_SETREGVIEW:
+ {
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(alter_reg_view);
+ // "64" results in setting the flag to 1 which alters the view
+ int k=line.gettoken_enum(1,"32\0" "64\0lastused\0");
+ if (k<0) PRINTHELP()
+ if (k == 0) // 32
+ ent.offsets[1]=add_intstring(0);
+ else if (k == 1) // 64
+ ent.offsets[1]=add_intstring(KEY_WOW64_64KEY);
+ else if (k == 2) // last used
+ ent.offsets[2]=1;
+ SCRIPT_MSG("SetRegView: %s\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_SETSHELLVARCONTEXT:
+ {
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(all_user_var);
+ int k=line.gettoken_enum(1,"current\0all\0");
+ if (k<0) PRINTHELP()
+ ent.offsets[1]=add_intstring(k);
+ SCRIPT_MSG("SetShellVarContext: %s\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_RET:
+ SCRIPT_MSG("Return\n");
+ ent.which=EW_RET;
+ return add_entry(&ent);
+ case TOK_CALL:
+ if (!line.gettoken_str(1)[0] || (line.gettoken_str(1)[0]==':' && !line.gettoken_str(1)[1] )) PRINTHELP()
+#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
+ if (uninstall_mode && strnicmp(line.gettoken_str(1),"un.",3)
+ && (GetUserVarIndex(line,1) < 0) && line.gettoken_str(1)[0]!=':')
+ {
+ ERROR_MSG("Call must be used with function names starting with \"un.\" in the uninstall section.\n");
+ PRINTHELP()
+ }
+ if (!uninstall_mode && !strnicmp(line.gettoken_str(1),"un.",3))
+ {
+ ERROR_MSG("Call must not be used with functions starting with \"un.\" in the non-uninstall sections.\n");
+ PRINTHELP()
+ }
+#endif
+ ent.which=EW_CALL;
+ ent.offsets[1]=0;
+ {
+ int v;
+ if ((v=GetUserVarIndex(line, 1))>=0)
+ {
+ ent.offsets[0]=-v-2;
+ }
+ else
+ {
+ if (line.gettoken_str(1)[0] == ':')
+ {
+ ent.offsets[1]=1;
+ ent.offsets[0]=ns_label.add(line.gettoken_str(1)+1,0);
+ }
+ else ent.offsets[0]=ns_func.add(line.gettoken_str(1),0);
+ }
+ }
+ SCRIPT_MSG("Call \"%s\"\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_SETOUTPATH:
+ {
+ char *op=line.gettoken_str(1);
+ if (!strcmp(op,"-"))
+ {
+ op="$INSTDIR";
+ }
+ SCRIPT_MSG("SetOutPath: \"%s\"\n",op);
+ ent.which=EW_CREATEDIR;
+ ent.offsets[0]=add_string(op);
+ ent.offsets[1]=1;
+
+ DefineInnerLangString(NLF_OUTPUT_DIR);
+ }
+ return add_entry(&ent);
+ case TOK_CREATEDIR:
+ {
+ char out_path[1024];
+ char *p=line.gettoken_str(1);
+ if (*p == '-') out_path[0]=0;
+ else
+ {
+ if (p[0] == '\\' && p[1] != '\\') p++;
+ strncpy(out_path,p,1024-1);
+ if (*CharPrev(out_path,out_path+strlen(out_path))=='\\')
+ *CharPrev(out_path,out_path+strlen(out_path))=0; // remove trailing slash
+ }
+ if (!*out_path) PRINTHELP()
+ SCRIPT_MSG("CreateDirectory: \"%s\"\n",out_path);
+ ent.which=EW_CREATEDIR;
+ ent.offsets[0]=add_string(out_path);
+
+ DefineInnerLangString(NLF_CREATE_DIR);
+ }
+ return add_entry(&ent);
+ case TOK_EXEC:
+ case TOK_EXECWAIT:
+#ifdef NSIS_SUPPORT_EXECUTE
+ ent.which=EW_EXECUTE;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[2]=0;
+ if (which_token == TOK_EXECWAIT)
+ {
+ ent.offsets[2]=1;
+ ent.offsets[1]=GetUserVarIndex(line, 2);
+ if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
+ }
+ SCRIPT_MSG("%s: \"%s\" (->%s)\n",ent.offsets[2]?"ExecWait":"Exec",line.gettoken_str(1),line.gettoken_str(2));
+
+ DefineInnerLangString(NLF_EXEC);
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_EXECUTE
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_EXECUTE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_EXECUTE
+ case TOK_EXECSHELL: // this uses improvements of Andras Varga
+#ifdef NSIS_SUPPORT_SHELLEXECUTE
+ {
+ ent.which=EW_SHELLEXEC;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ ent.offsets[3]=SW_SHOWNORMAL;
+ if (line.getnumtokens() > 4)
+ {
+ int tab[4]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINIMIZED,SW_HIDE};
+ int a=line.gettoken_enum(4,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0SW_HIDE\0");
+ if (a < 0) PRINTHELP()
+ ent.offsets[3]=tab[a];
+ }
+ string detail=string(line.gettoken_str(1))+" "+string(line.gettoken_str(2));
+ ent.offsets[5]=add_string(detail.c_str());
+ SCRIPT_MSG("ExecShell: %s: \"%s\" \"%s\" %s\n",line.gettoken_str(1),line.gettoken_str(2),
+ line.gettoken_str(3),line.gettoken_str(4));
+
+ DefineInnerLangString(NLF_EXEC_SHELL);
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_SHELLEXECUTE
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_SHELLEXECUTE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_SHELLEXECUTE
+ case TOK_CALLINSTDLL:
+ case TOK_REGDLL:
+ case TOK_UNREGDLL:
+#ifndef NSIS_SUPPORT_ACTIVEXREG
+ ERROR_MSG("%s: support not compiled in (NSIS_SUPPORT_ACTIVEXREG)\n",line.gettoken_str(0));
+ return PS_ERROR;
+#else//NSIS_SUPPORT_ACTIVEXREG
+ ent.which=EW_REGISTERDLL;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ if (which_token == TOK_UNREGDLL)
+ {
+ ent.offsets[1]=add_string("DllUnregisterServer");
+ ent.offsets[2]=DefineInnerLangString(NLF_UNREGISTERING);
+ }
+ else if (which_token == TOK_CALLINSTDLL)
+ {
+ int a = 2;
+ if (!stricmp(line.gettoken_str(a), "/NOUNLOAD")) {
+ ent.offsets[3]=1;
+ a++;
+ }
+ if (a+1 != line.getnumtokens()) PRINTHELP();
+ ent.offsets[1]=add_string(line.gettoken_str(a));
+ if (!ent.offsets[1]) PRINTHELP()
+ ent.offsets[2]=0;
+ }
+ else // register
+ {
+ ent.offsets[1] = add_string(line.gettoken_str(2));
+ if (!ent.offsets[1]) ent.offsets[1]=add_string("DllRegisterServer");
+ ent.offsets[2]=DefineInnerLangString(NLF_REGISTERING);
+ }
+
+ SCRIPT_MSG("%s: \"%s\" %s\n",line.gettoken_str(0),line.gettoken_str(1), line.gettoken_str(ent.offsets[3]?3:2));
+
+ DefineInnerLangString(NLF_SYMBOL_NOT_FOUND);
+ DefineInnerLangString(NLF_COULD_NOT_LOAD);
+ DefineInnerLangString(NLF_NO_OLE);
+ // not used anywhere - DefineInnerLangString(NLF_ERR_REG_DLL);
+ return add_entry(&ent);
+#endif//NSIS_SUPPORT_ACTIVEXREG
+ case TOK_RENAME:
+#ifdef NSIS_SUPPORT_RENAME
+ {
+ int a=1;
+ ent.which=EW_RENAME;
+ if (!stricmp(line.gettoken_str(1),"/REBOOTOK"))
+ {
+ ent.offsets[2]=1;
+ a++;
+#ifndef NSIS_SUPPORT_MOVEONREBOOT
+ ERROR_MSG("Error: /REBOOTOK specified, NSIS_SUPPORT_MOVEONREBOOT not defined\n");
+ PRINTHELP()
+#endif
+ }
+ else if (line.gettoken_str(1)[0]=='/')
+ {
+ a=line.getnumtokens(); // cause usage to go here:
+ }
+ if (line.getnumtokens()!=a+2) PRINTHELP()
+ ent.offsets[0]=add_string(line.gettoken_str(a));
+ ent.offsets[1]=add_string(line.gettoken_str(a+1));
+ string print = string(line.gettoken_str(a)) + "->" + string(line.gettoken_str(a+1));
+ ent.offsets[3]=add_string(print.c_str());
+ SCRIPT_MSG("Rename: %s%s->%s\n",ent.offsets[2]?"/REBOOTOK ":"",line.gettoken_str(a),line.gettoken_str(a+1));
+
+ DefineInnerLangString(NLF_RENAME);
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ DefineInnerLangString(NLF_RENAME_ON_REBOOT);
+#endif
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_RENAME
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_RENAME not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_RENAME
+ case TOK_MESSAGEBOX:
+#ifdef NSIS_SUPPORT_MESSAGEBOX
+ {
+ #define MBD(x) {x,#x},
+ struct
+ {
+ int id;
+ char *str;
+ } list[]=
+ {
+ MBD(MB_ABORTRETRYIGNORE)
+ MBD(MB_OK)
+ MBD(MB_OKCANCEL)
+ MBD(MB_RETRYCANCEL)
+ MBD(MB_YESNO)
+ MBD(MB_YESNOCANCEL)
+ MBD(MB_ICONEXCLAMATION)
+ MBD(MB_ICONINFORMATION)
+ MBD(MB_ICONQUESTION)
+ MBD(MB_ICONSTOP)
+ MBD(MB_USERICON)
+ MBD(MB_TOPMOST)
+ MBD(MB_SETFOREGROUND)
+ MBD(MB_RIGHT)
+ MBD(MB_RTLREADING)
+ MBD(MB_DEFBUTTON1)
+ MBD(MB_DEFBUTTON2)
+ MBD(MB_DEFBUTTON3)
+ MBD(MB_DEFBUTTON4)
+ };
+ #undef MBD
+ int r=0;
+ int x;
+ char *p=line.gettoken_str(1);
+
+ while (*p)
+ {
+ char *np=p;
+ while (*np && *np != '|') np++;
+ if (*np) *np++=0;
+ for (x = 0 ; (unsigned) x < sizeof(list) / sizeof(list[0]) && strcmpi(list[x].str, p); x++);
+ if ((unsigned) x < sizeof(list) / sizeof(list[0]))
+ {
+ r|=list[x].id;
+ }
+ else PRINTHELP()
+ p=np;
+ }
+ ent.which=EW_MESSAGEBOX;
+ ent.offsets[0]=r;
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ int rettab[] =
+ {
+ 0,IDABORT,IDCANCEL,IDIGNORE,IDNO,IDOK,IDRETRY,IDYES
+ };
+ const char *retstr="0\0IDABORT\0IDCANCEL\0IDIGNORE\0IDNO\0IDOK\0IDRETRY\0IDYES\0";
+ int a=3;
+ if (line.getnumtokens() > 3)
+ {
+ if (!strcmpi(line.gettoken_str(3),"/SD"))
+ {
+ int k=line.gettoken_enum(4,retstr);
+ if (k <= 0) PRINTHELP();
+ ent.offsets[0]|=rettab[k]<<21;
+ a=5;
+ }
+ else if (line.getnumtokens() > 7)
+ PRINTHELP();
+
+ if (line.getnumtokens() > a)
+ {
+ ent.offsets[2]=line.gettoken_enum(a,retstr);
+ if (ent.offsets[2] < 0)
+ PRINTHELP();
+ ent.offsets[2] = rettab[ent.offsets[2]];
+ if (process_jump(line,a+1,&ent.offsets[3]))
+ PRINTHELP();
+ if (line.getnumtokens() > a+2)
+ {
+ int v=line.gettoken_enum(a+2,retstr);
+ if (v < 0)
+ PRINTHELP();
+ ent.offsets[4] = rettab[v];
+ if (process_jump(line,a+3,&ent.offsets[5]))
+ PRINTHELP();
+ }
+ }
+ }
+ SCRIPT_MSG("MessageBox: %d: \"%s\"",r,line.gettoken_str(2));
+ if (line.getnumtokens()>a+1) SCRIPT_MSG(" (on %s goto %s)",line.gettoken_str(a),line.gettoken_str(a+1));
+ SCRIPT_MSG("\n");
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_MESSAGEBOX
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_MESSAGEBOX not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_MESSAGEBOX
+ case TOK_CREATESHORTCUT:
+#ifdef NSIS_SUPPORT_CREATESHORTCUT
+ ent.which=EW_CREATESHORTCUT;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+ ent.offsets[5]=add_string(line.gettoken_str(8));
+ int s;
+ ent.offsets[4]=line.gettoken_int(5,&s)&0xff;
+ if (!s)
+ {
+ if (line.getnumtokens() > 5 && *line.gettoken_str(5))
+ {
+ ERROR_MSG("CreateShortCut: cannot interpret icon index\n");
+ PRINTHELP()
+ }
+ ent.offsets[4]=0;
+ }
+ if (line.getnumtokens() > 6 && *line.gettoken_str(6))
+ {
+ int tab[3]={SW_SHOWNORMAL,SW_SHOWMAXIMIZED,SW_SHOWMINNOACTIVE/*SW_SHOWMINIMIZED doesn't work*/};
+ int a=line.gettoken_enum(6,"SW_SHOWNORMAL\0SW_SHOWMAXIMIZED\0SW_SHOWMINIMIZED\0");
+ if (a < 0)
+ {
+ ERROR_MSG("CreateShortCut: unknown show mode \"%s\"\n",line.gettoken_str(6));
+ PRINTHELP()
+ }
+ ent.offsets[4]|=tab[a]<<8;
+ }
+ if (line.getnumtokens() > 7)
+ {
+ char *s=(line.gettoken_str(7));
+
+ char b[255];
+ for (unsigned int spos=0; (spos <= strlen(s)) && (spos <= 255); spos++)
+ b[spos]=toupper(*(s+spos));
+ strcpy(s,b);
+
+ if (*s)
+ {
+ int c=0;
+ if (strstr(s,"ALT|")) ent.offsets[4]|=HOTKEYF_ALT << 24;
+ if (strstr(s,"CONTROL|")) ent.offsets[4]|=HOTKEYF_CONTROL << 24;
+ if (strstr(s,"EXT|")) ent.offsets[4]|=HOTKEYF_EXT << 24;
+ if (strstr(s,"SHIFT|")) ent.offsets[4]|=HOTKEYF_SHIFT << 24;
+ while (strstr(s,"|"))
+ {
+ s=strstr(s,"|")+1;
+ }
+ if ((s[0] == 'F') && (s[1] >= '1' && s[1] <= '9'))
+ {
+ c=VK_F1-1+atoi(s+1);
+ if (atoi(s+1) < 1 || atoi(s+1) > 24)
+ {
+ warning_fl("CreateShortCut: F-key \"%s\" out of range",s);
+ }
+ }
+ else if (((s[0] >= 'A' && s[0] <= 'Z') || (s[0] >= '0' && s[0] <= '9')) && !s[1])
+ c=s[0];
+ else
+ {
+ c=s[0];
+ warning_fl("CreateShortCut: unrecognized hotkey \"%s\"",s);
+ }
+ ent.offsets[4] |= (c) << 16;
+ }
+ }
+ SCRIPT_MSG("CreateShortCut: \"%s\"->\"%s\" %s icon:%s,%d, showmode=0x%X, hotkey=0x%X, comment=%s\n",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),
+ line.gettoken_str(4),ent.offsets[4]&0xff,(ent.offsets[4]>>8)&0xff,ent.offsets[4]>>16,line.gettoken_str(8));
+
+ DefineInnerLangString(NLF_CREATE_SHORTCUT);
+ DefineInnerLangString(NLF_ERR_CREATING_SHORTCUT);
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_CREATESHORTCUT
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_CREATESHORTCUT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_SUPPORT_CREATESHORTCUT
+#ifdef NSIS_SUPPORT_HWNDS
+ case TOK_FINDWINDOW:
+ ent.which=EW_FINDWINDOW;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0] < 0) PRINTHELP()
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+ ent.offsets[4]=add_string(line.gettoken_str(5));
+ SCRIPT_MSG("FindWindow: output=%s, class=\"%s\", text=\"%s\" hwndparent=\"%s\" hwndafter=\"%s\"\n",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(5));
+ return add_entry(&ent);
+ case TOK_SENDMESSAGE:
+ ent.which=EW_SENDMESSAGE;
+
+ if (line.gettoken_str(1)[0] == '/' || line.gettoken_str(2)[0] == '/' ||
+ line.gettoken_str(3)[0] == '/' || line.gettoken_str(4)[0] == '/')
+ {
+ PRINTHELP()
+ }
+
+ SCRIPT_MSG("SendMessage:");
+ {
+ int a=5;
+ ent.offsets[0]=GetUserVarIndex(line, 5);
+ if (ent.offsets[0]>=0)
+ {
+ SCRIPT_MSG("(->%s)",line.gettoken_str(5));
+ a++;
+ }
+
+ if (!strncmp(line.gettoken_str(a),"/TIMEOUT=",9))
+ {
+ ent.offsets[5]|=atoi(line.gettoken_str(a)+9)<<2;
+ SCRIPT_MSG(" (timeout=%d)",ent.offsets[5]>>2);
+ a++;
+ }
+
+ if (line.getnumtokens()>a)
+ {
+ PRINTHELP()
+ }
+ }
+
+ if (!strncmp(line.gettoken_str(3),"STR:",4))
+ {
+ ent.offsets[5]|=1;
+ ent.offsets[3]=add_string(line.gettoken_str(3)+4);
+ }
+ else ent.offsets[3]=add_string(line.gettoken_str(3));
+ if (!strncmp(line.gettoken_str(4),"STR:",4))
+ {
+ ent.offsets[5]|=2;
+ ent.offsets[4]=add_string(line.gettoken_str(4)+4);
+ }
+ else ent.offsets[4]=add_string(line.gettoken_str(4));
+
+ ent.offsets[1]=add_string(line.gettoken_str(1));
+ ent.offsets[2]=add_string(line.gettoken_str(2));
+
+ SCRIPT_MSG("(%s,%s,%s,%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ return add_entry(&ent);
+ case TOK_ISWINDOW:
+ ent.which=EW_ISWINDOW;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ if (process_jump(line,2,&ent.offsets[1])||
+ process_jump(line,3,&ent.offsets[2])) PRINTHELP()
+ SCRIPT_MSG("IsWindow(%s): %s:%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ return add_entry(&ent);
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ case TOK_GETDLGITEM:
+ ent.which=EW_GETDLGITEM;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0]<0) PRINTHELP();
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ SCRIPT_MSG("GetDlgItem: output=%s dialog=%s item=%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ return add_entry(&ent);
+ case TOK_SETCTLCOLORS:
+ {
+ ctlcolors c={0, };
+
+ ent.which=EW_SETCTLCOLORS;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+
+ int a = 2;
+
+ if (!strcmpi(line.gettoken_str(2),"/BRANDING"))
+ a++;
+
+ {
+ char *p;
+
+ if (a == 2 && line.getnumtokens() == 5) {
+ ERROR_MSG("Error: SetCtlColors expected 3 parameters, got 4\n");
+ return PS_ERROR;
+ }
+
+ if (!strcmpi(line.gettoken_str(a+1),"transparent")) {
+ c.flags|=CC_BKB;
+ c.lbStyle=BS_NULL;
+ c.bkmode=TRANSPARENT;
+ }
+ else {
+ p=line.gettoken_str(a+1);
+ if (*p) {
+ int v=strtoul(p,&p,16);
+ c.bkc=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
+ c.flags|=CC_BK|CC_BKB;
+ }
+
+ c.lbStyle=BS_SOLID;
+ c.bkmode=OPAQUE;
+ }
+
+ p=line.gettoken_str(a);
+ if (*p) {
+ int v=strtoul(p,&p,16);
+ c.text=((v&0xff)<<16)|(v&0xff00)|((v&0xff0000)>>16);
+ c.flags|=CC_TEXT;
+ }
+ }
+
+ if (a == 3)
+ {
+ c.flags|=CC_BK|CC_BKB;
+ c.lbStyle=BS_NULL;
+ if (!*line.gettoken_str(a+1))
+ {
+ c.bkc=COLOR_BTNFACE;
+ c.flags|=CC_BK_SYS;
+ }
+ c.flags|=CC_TEXT;
+ if (!*line.gettoken_str(a))
+ {
+ c.text=COLOR_BTNFACE;
+ c.flags|=CC_TEXT_SYS;
+ }
+ c.bkmode=OPAQUE;
+ }
+
+ int i;
+ int l=cur_ctlcolors->getlen()/sizeof(ctlcolors);
+ for (i=0; i<l; i++) {
+ if (!memcmp((ctlcolors*)cur_ctlcolors->get()+i,&c,sizeof(ctlcolors))) {
+ ent.offsets[1]=i*sizeof(ctlcolors);
+ break;
+ }
+ }
+ if (i>=l) {
+ ent.offsets[1]=cur_ctlcolors->add(&c,sizeof(ctlcolors));
+ }
+
+ SCRIPT_MSG("SetCtlColors: hwnd=%s %stext=%s background=%s\n",line.gettoken_str(1),a==2?"":"/BRANDING ",line.gettoken_str(a),line.gettoken_str(a+1));
+ }
+ return add_entry(&ent);
+ case TOK_CREATEFONT:
+ ent.which=EW_CREATEFONT;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ SCRIPT_MSG("CreateFont: output=%s \"%s\"",line.gettoken_str(1),line.gettoken_str(2));
+ {
+ int height=0;
+ int weight=0;
+ int flags=0;
+ for (int i = 3; i < line.getnumtokens(); i++) {
+ char *tok=line.gettoken_str(i);
+ if (tok[0]=='/') {
+ if (!strcmpi(tok,"/ITALIC")) {
+ SCRIPT_MSG(" /ITALIC");
+ flags|=1;
+ }
+ else if (!strcmpi(tok,"/UNDERLINE")) {
+ SCRIPT_MSG(" /UNDERLINE");
+ flags|=2;
+ }
+ else if (!strcmpi(tok,"/STRIKE")) {
+ SCRIPT_MSG(" /STRIKE");
+ flags|=4;
+ }
+ else {
+ SCRIPT_MSG("\n");
+ PRINTHELP();
+ }
+ }
+ else {
+ if (!height) {
+ SCRIPT_MSG(" height=%s",tok);
+ height=add_string(tok);
+ }
+ else if (!weight) {
+ SCRIPT_MSG(" weight=%s",tok);
+ weight=add_string(tok);
+ }
+ else {
+ SCRIPT_MSG("\n");
+ PRINTHELP();
+ }
+ }
+ }
+ ent.offsets[2]=height;
+ ent.offsets[3]=weight;
+ ent.offsets[4]=flags;
+ }
+ SCRIPT_MSG("\n");
+ return add_entry(&ent);
+ case TOK_ENABLEWINDOW:
+ ent.which=EW_SHOWWINDOW;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[3]=1;
+ SCRIPT_MSG("EnableWindow: handle=%s enable=%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SHOWWINDOW:
+ ent.which=EW_SHOWWINDOW;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ SCRIPT_MSG("ShowWindow: handle=%s show state=%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_HIDEWINDOW:
+ ent.which=EW_SHOWWINDOW;
+ ent.offsets[0]=add_string("$HWNDPARENT");
+ ent.offsets[1]=add_string("0"/*SW_HIDE*/);
+ ent.offsets[2]=1;
+ SCRIPT_MSG("HideWindow\n");
+ return add_entry(&ent);
+ case TOK_BRINGTOFRONT:
+ {
+ int ret;
+ ent.which=EW_SHOWWINDOW;
+ ent.offsets[0]=add_string("$HWNDPARENT");
+ ent.offsets[1]=add_string("5"/*SW_SHOW*/);
+ ret = add_entry(&ent);
+ if (ret != PS_OK) return ret;
+ ent.which=EW_BRINGTOFRONT;
+ ent.offsets[0]=0;
+ ent.offsets[1]=0;
+ SCRIPT_MSG("BringToFront\n");
+ }
+ return add_entry(&ent);
+#else//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ case TOK_GETDLGITEM:
+ case TOK_SETCTLCOLORS:
+ case TOK_SHOWWINDOW:
+ case TOK_BRINGTOFRONT:
+ case TOK_CREATEFONT:
+ case TOK_HIDEWINDOW:
+ case TOK_ENABLEWINDOW:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+#else//!NSIS_SUPPORT_HWNDS
+ case TOK_ISWINDOW:
+ case TOK_SENDMESSAGE:
+ case TOK_FINDWINDOW:
+ case TOK_GETDLGITEM:
+ case TOK_SETCTLCOLORS:
+ case TOK_SHOWWINDOW:
+ case TOK_ENABLEWINDOW:
+ case TOK_CREATEFONT:
+ case TOK_HIDEWINDOW:
+ case TOK_BRINGTOFRONT:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_HWNDS not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_HWNDS
+ case TOK_DELETE:
+#ifdef NSIS_SUPPORT_DELETE
+ {
+ int a=1;
+ ent.which=EW_DELETEFILE;
+ if (!stricmp(line.gettoken_str(a),"/REBOOTOK"))
+ {
+ a++;
+ ent.offsets[1]=DEL_REBOOT;
+#ifndef NSIS_SUPPORT_MOVEONREBOOT
+ ERROR_MSG("Error: /REBOOTOK specified, NSIS_SUPPORT_MOVEONREBOOT not defined\n");
+ PRINTHELP()
+#endif
+ }
+ else if (line.gettoken_str(1)[0]=='/')
+ {
+ a=line.getnumtokens();
+ }
+ if (line.getnumtokens() != a+1) PRINTHELP()
+ ent.offsets[0]=add_string(line.gettoken_str(a));
+ SCRIPT_MSG("Delete: %s\"%s\"\n",ent.offsets[1]?"/REBOOTOK ":"",line.gettoken_str(a));
+
+ DefineInnerLangString(NLF_DEL_FILE);
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ DefineInnerLangString(NLF_DEL_ON_REBOOT);
+#endif
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_DELETE
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_DELETE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_DELETE
+ case TOK_RMDIR:
+#ifdef NSIS_SUPPORT_RMDIR
+ {
+ int a=1;
+ ent.which=EW_RMDIR;
+ ent.offsets[1]=DEL_DIR;
+ while (line.gettoken_str(a)[0]=='/')
+ {
+ if (!stricmp(line.gettoken_str(a),"/r"))
+ {
+ if (a == 3) PRINTHELP();
+ a++;
+ ent.offsets[1]|=DEL_RECURSE;
+ }
+ else if (!stricmp(line.gettoken_str(a),"/REBOOTOK"))
+ {
+ if (a == 3) PRINTHELP();
+ a++;
+ ent.offsets[1]|=DEL_REBOOT;
+ }
+ else PRINTHELP();
+ }
+ if (a < line.getnumtokens() - 1) PRINTHELP();
+ ent.offsets[0]=add_string(line.gettoken_str(a));
+ SCRIPT_MSG("RMDir: ");
+ if (a>1)
+ SCRIPT_MSG("%s ",line.gettoken_str(1));
+ if (a>2)
+ SCRIPT_MSG("%s ",line.gettoken_str(2));
+ SCRIPT_MSG("\"%s\"\n",line.gettoken_str(a));
+
+ DefineInnerLangString(NLF_REMOVE_DIR);
+ DefineInnerLangString(NLF_DEL_FILE);
+#ifdef NSIS_SUPPORT_MOVEONREBOOT
+ DefineInnerLangString(NLF_DEL_ON_REBOOT);
+#endif
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_RMDIR
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_RMDIR not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_RMDIR
+ case TOK_RESERVEFILE:
+ case TOK_FILE:
+#ifdef NSIS_SUPPORT_FILE
+ {
+ set<string> excluded;
+ int a=1,attrib=0,rec=0,fatal=1;
+ if (!stricmp(line.gettoken_str(a),"/nonfatal")) {
+ fatal=0;
+ a++;
+ }
+ if (which_token == TOK_FILE && !stricmp(line.gettoken_str(a),"/a"))
+ {
+#ifdef _WIN32
+ attrib=1;
+#else
+ warning_fl("%sFile /a is disabled for non Win32 platforms.",(which_token == TOK_FILE)?"":"Reserve");
+#endif
+ a++;
+ }
+ if (!stricmp(line.gettoken_str(a),"/r"))
+ {
+ rec=1;
+ a++;
+ }
+ else if (which_token == TOK_FILE && !strnicmp(line.gettoken_str(a),"/oname=",7))
+ {
+ char *on=line.gettoken_str(a)+7;
+ a++;
+ if (!*on||line.getnumtokens()!=a+1||strstr(on,"*") || strstr(on,"?")) PRINTHELP()
+
+ if (on[0]=='"')
+ {
+ ERROR_MSG("%sFile: output name must not begin with a quote, use \"/oname=name with spaces\".\n",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a));
+ PRINTHELP();
+ }
+
+ int tf=0;
+#ifdef _WIN32
+ int v=do_add_file(line.gettoken_str(a), attrib, 0, &tf, on);
+#else
+ char *fn = my_convert(line.gettoken_str(a));
+ int v=do_add_file(fn, attrib, 0, &tf, on);
+ my_convert_free(fn);
+#endif
+ if (v != PS_OK) return v;
+ if (tf > 1) PRINTHELP()
+ if (!tf)
+ {
+ if (fatal)
+ {
+ ERROR_MSG("%sFile: \"%s\" -> no files found.\n",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a));
+ PRINTHELP()
+ }
+ else
+ {
+ warning_fl("%sFile: \"%s\" -> no files found",(which_token == TOK_FILE)?"":"Reserve",line.gettoken_str(a));
+
+ // workaround for bug #1299100
+ // add a nop opcode so relative jumps will work as expected
+ add_entry_direct(EW_NOP);
+ }
+ }
+
+ return PS_OK;
+ }
+ if (!strnicmp(line.gettoken_str(a),"/x",2))
+ {
+ while (!strnicmp(line.gettoken_str(a),"/x",2))
+ {
+ a++;
+
+ if (line.getnumtokens() < a+1) PRINTHELP()
+
+ excluded.insert(line.gettoken_str(a));
+ a++;
+ }
+ }
+#ifdef _WIN32
+ if (line.gettoken_str(a)[0] == '/') PRINTHELP()
+#endif
+ if (line.getnumtokens()<a+1) PRINTHELP()
+ while (a < line.getnumtokens())
+ {
+#ifdef _WIN32
+ if (line.gettoken_str(a)[0]=='/') PRINTHELP()
+#endif
+ char buf[32];
+ char *t=line.gettoken_str(a++);
+ if (t[0] && CharNext(t)[0] == ':' && CharNext(t)[1] == '\\' && !CharNext(t)[2])
+ {
+ strcpy(buf,"X:\\*.*");
+ buf[0]=t[0];
+ t=buf;
+ }
+ int tf=0;
+#ifdef _WIN32
+ int v=do_add_file(t, attrib, rec, &tf, NULL, which_token == TOK_FILE, NULL, excluded);
+#else
+ char *fn = my_convert(t);
+ int v=do_add_file(fn, attrib, rec, &tf, NULL, which_token == TOK_FILE, NULL, excluded);
+ my_convert_free(fn);
+#endif
+ if (v != PS_OK) return v;
+ if (!tf)
+ {
+ if (fatal)
+ {
+ ERROR_MSG("%sFile: \"%s\" -> no files found.\n",(which_token == TOK_FILE)?"":"Reserve",t);
+ PRINTHELP();
+ }
+ else
+ {
+ warning_fl("%sFile: \"%s\" -> no files found.",(which_token == TOK_FILE)?"":"Reserve",t);
+ }
+ }
+ }
+ }
+ return PS_OK;
+#else//!NSIS_SUPPORT_FILE
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_FILE
+#ifdef NSIS_SUPPORT_COPYFILES
+ case TOK_COPYFILES:
+ {
+ ent.which=EW_COPYFILES;
+ ent.offsets[2]=FOF_NOCONFIRMATION|FOF_NOCONFIRMMKDIR|FOF_NOERRORUI|FOF_SIMPLEPROGRESS;
+
+ int a=1;
+ int x;
+ for (x = 0; x < 2; x ++)
+ {
+ if (!stricmp(line.gettoken_str(a),"/SILENT"))
+ {
+ a++;
+ ent.offsets[2]&=~FOF_SIMPLEPROGRESS;
+ ent.offsets[2]|=FOF_SILENT;
+ }
+ else if (!stricmp(line.gettoken_str(a),"/FILESONLY"))
+ {
+ a++;
+ ent.offsets[2]|=FOF_FILESONLY;
+ }
+ else if (line.gettoken_str(a)[0]=='/') PRINTHELP()
+ else break;
+ }
+ if (line.getnumtokens() < a+2) PRINTHELP()
+ ent.offsets[0]=add_string(line.gettoken_str(a));
+ ent.offsets[1]=add_string(line.gettoken_str(a+1));
+ string copy_to = string("$(^CopyTo)") + line.gettoken_str(a+1);
+ ent.offsets[3]=add_string(copy_to.c_str());
+ int s;
+ int size_kb=line.gettoken_int(a+2,&s);
+ if (!s && line.gettoken_str(a+2)[0]) PRINTHELP()
+ section_add_size_kb(size_kb);
+ SCRIPT_MSG("CopyFiles: %s\"%s\" -> \"%s\", size=%iKB\n",ent.offsets[2]&FOF_SILENT?"(silent) ":"", line.gettoken_str(a),line.gettoken_str(a+1),size_kb);
+
+ DefineInnerLangString(NLF_COPY_FAILED);
+ DefineInnerLangString(NLF_COPY_TO);
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_COPYFILES
+ case TOK_COPYFILES:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_COPYFILES not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_COPYFILES
+
+ case TOK_SETFILEATTRIBUTES:
+ {
+ #define MBD(x) {x,#x},
+ struct
+ {
+ int id;
+ char *str;
+ } list[]=
+ {
+ MBD(FILE_ATTRIBUTE_NORMAL)
+ MBD(FILE_ATTRIBUTE_ARCHIVE)
+ MBD(FILE_ATTRIBUTE_HIDDEN)
+ MBD(FILE_ATTRIBUTE_OFFLINE)
+ MBD(FILE_ATTRIBUTE_READONLY)
+ MBD(FILE_ATTRIBUTE_SYSTEM)
+ MBD(FILE_ATTRIBUTE_TEMPORARY)
+ {FILE_ATTRIBUTE_NORMAL,"NORMAL"},
+ {FILE_ATTRIBUTE_ARCHIVE,"ARCHIVE"},
+ {FILE_ATTRIBUTE_HIDDEN,"HIDDEN"},
+ {FILE_ATTRIBUTE_OFFLINE,"OFFLINE"},
+ {FILE_ATTRIBUTE_READONLY,"READONLY"},
+ {FILE_ATTRIBUTE_SYSTEM,"SYSTEM"},
+ {FILE_ATTRIBUTE_TEMPORARY,"TEMPORARY"},
+ {FILE_ATTRIBUTE_NORMAL,"0"},
+ };
+ #undef MBD
+ int r=0;
+ int x;
+ char *p=line.gettoken_str(2);
+
+ while (*p)
+ {
+ char *np=p;
+ while (*np && *np != '|') np++;
+ if (*np) *np++=0;
+ for (x = 0 ; (unsigned) x < sizeof(list)/sizeof(list[0]) && stricmp(list[x].str,p); x ++);
+
+ if ((unsigned) x < sizeof(list)/sizeof(list[0]))
+ {
+ r|=list[x].id;
+ }
+ else PRINTHELP()
+ p=np;
+ }
+ ent.which=EW_SETFILEATTRIBUTES;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=r;
+ }
+ return add_entry(&ent);
+ case TOK_SLEEP:
+ {
+ ent.which=EW_SLEEP;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ SCRIPT_MSG("Sleep: %s ms\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_IFFILEEXISTS:
+ ent.which=EW_IFFILEEXISTS;
+ ent.offsets[0] = add_string(line.gettoken_str(1));
+ if (process_jump(line,2,&ent.offsets[1]) ||
+ process_jump(line,3,&ent.offsets[2])) PRINTHELP()
+ SCRIPT_MSG("IfFileExists: \"%s\" ? %s : %s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ return add_entry(&ent);
+ case TOK_QUIT:
+ ent.which=EW_QUIT;
+ SCRIPT_MSG("Quit\n");
+ return add_entry(&ent);
+ case TOK_ABORT:
+ ent.which=EW_ABORT;
+ ent.offsets[0] = add_string(line.gettoken_str(1));
+ SCRIPT_MSG("Abort: \"%s\"\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_SETDETAILSVIEW:
+ {
+ int v=line.gettoken_enum(1,"hide\0show\0");
+ ent.which=EW_CHDETAILSVIEW;
+ if (v < 0) PRINTHELP()
+ ent.offsets[0] = v?SW_SHOWNA:SW_HIDE;
+ ent.offsets[1] = v?SW_HIDE:SW_SHOWNA;
+ SCRIPT_MSG("SetDetailsView: %s\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_SETDETAILSPRINT:
+ {
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(status_update);
+ int k=line.gettoken_enum(1,"both\0textonly\0listonly\0none\0lastused\0");
+ if (k<0) PRINTHELP()
+ if (k == 4)
+ {
+ ent.offsets[2]=1;
+ }
+ else
+ {
+ // both 0
+ // textonly 2
+ // listonly 4
+ // none 6
+ ent.offsets[1]=add_intstring(k*2);
+ }
+ SCRIPT_MSG("SetDetailsPrint: %s\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_SETAUTOCLOSE:
+ {
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(autoclose);
+ int k=line.gettoken_enum(1,"false\0true\0");
+ if (k < 0) PRINTHELP()
+ ent.offsets[1]=add_intstring(k);
+ SCRIPT_MSG("SetAutoClose: %s\n",line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_IFERRORS:
+ ent.which=EW_IFFLAG;
+ if (process_jump(line,1,&ent.offsets[0]) ||
+ process_jump(line,2,&ent.offsets[1])) PRINTHELP()
+ ent.offsets[2]=FLAG_OFFSET(exec_error);
+ ent.offsets[3]=0;//new value mask - clean error
+ SCRIPT_MSG("IfErrors ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_IFABORT:
+ ent.which=EW_IFFLAG;
+ if (process_jump(line,1,&ent.offsets[0]) ||
+ process_jump(line,2,&ent.offsets[1])) PRINTHELP()
+ ent.offsets[2]=FLAG_OFFSET(abort);
+ ent.offsets[3]=~0;//new value mask - keep flag
+ SCRIPT_MSG("IfAbort ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_CLEARERRORS:
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(exec_error);
+ ent.offsets[1]=add_intstring(0);
+ SCRIPT_MSG("ClearErrors\n");
+ return add_entry(&ent);
+ case TOK_SETERRORS:
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(exec_error);
+ ent.offsets[1]=add_intstring(1);
+ SCRIPT_MSG("SetErrors\n");
+ return add_entry(&ent);
+ case TOK_SETERRORLEVEL:
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(errlvl);
+ ent.offsets[1]=add_string(line.gettoken_str(1));
+ SCRIPT_MSG("SetErrorLevel: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_GETERRORLEVEL:
+ ent.which=EW_GETFLAG;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=FLAG_OFFSET(errlvl);
+ if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("GetErrorLevel: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+#ifdef NSIS_SUPPORT_STROPTS
+ case TOK_STRLEN:
+ ent.which=EW_STRLEN;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("StrLen %s \"%s\"\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_STRCPY:
+ ent.which=EW_ASSIGNVAR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("StrCpy %s \"%s\" (%s) (%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ return add_entry(&ent);
+ case TOK_GETFUNCTIONADDR:
+ ent.which=EW_GETFUNCTIONADDR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=ns_func.add(line.gettoken_str(2),0);
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("GetFunctionAddress: %s %s",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_GETLABELADDR:
+ ent.which=EW_GETLABELADDR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0] < 0 || process_jump(line,2,&ent.offsets[1])) PRINTHELP()
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ SCRIPT_MSG("GetLabelAddress: %s %s",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_GETCURRENTADDR:
+ ent.which=EW_ASSIGNVAR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ {
+ char buf[32];
+ wsprintf(buf,"%d",1+(cur_header->blocks[NB_ENTRIES].num));
+ ent.offsets[1]=add_string(buf);
+ }
+ if (ent.offsets[0] < 0) PRINTHELP()
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ SCRIPT_MSG("GetCurrentAddress: %s",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_STRCMP:
+ case TOK_STRCMPS:
+ ent.which=EW_STRCMP;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[4]=which_token == TOK_STRCMPS;
+ if (process_jump(line,3,&ent.offsets[2]) ||
+ process_jump(line,4,&ent.offsets[3])) PRINTHELP()
+ SCRIPT_MSG("%s \"%s\" \"%s\" equal=%s, nonequal=%s\n",line.gettoken_str(0),line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4));
+ return add_entry(&ent);
+ case TOK_GETDLLVERSIONLOCAL:
+ {
+ DWORD low, high;
+ if (!GetDLLVersion(line.gettoken_str(1),high,low))
+ {
+ ERROR_MSG("GetDLLVersionLocal: error reading version info from \"%s\"\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+ ent.which=EW_ASSIGNVAR;
+ ent.offsets[0]=GetUserVarIndex(line, 2);
+ ent.offsets[1]=add_intstring(high);
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ if (ent.offsets[0]<0) PRINTHELP()
+ add_entry(&ent);
+
+ ent.offsets[0]=GetUserVarIndex(line, 3);
+ ent.offsets[1]=add_intstring(low);
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ if (ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("GetDLLVersionLocal: %s (%u,%u)->(%s,%s)\n",
+ line.gettoken_str(1),high,low,line.gettoken_str(2),line.gettoken_str(3));
+ }
+ return add_entry(&ent);
+ case TOK_GETFILETIMELOCAL:
+ {
+ char buf[129];
+ DWORD high=0,low=0;
+#ifdef _WIN32
+ int flag=0;
+ HANDLE hFile=CreateFile(line.gettoken_str(1),0,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ FILETIME ft;
+ if (GetFileTime(hFile,NULL,NULL,&ft))
+ {
+ high=ft.dwHighDateTime;
+ low=ft.dwLowDateTime;
+ flag=1;
+ }
+ CloseHandle(hFile);
+ }
+ if (!flag)
+ {
+ ERROR_MSG("GetFileTimeLocal: error reading date from \"%s\"\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+#else
+ struct stat st;
+ if (!stat(line.gettoken_str(1), &st))
+ {
+ unsigned long long ll = (st.st_mtime * 10000000LL) + 116444736000000000LL;
+ high = (DWORD) (ll >> 32);
+ low = (DWORD) ll;
+ }
+ else
+ {
+ ERROR_MSG("GetFileTimeLocal: error reading date from \"%s\"\n",line.gettoken_str(1));
+ return PS_ERROR;
+ }
+#endif
+
+ ent.which=EW_ASSIGNVAR;
+ ent.offsets[0]=GetUserVarIndex(line, 2);
+ wsprintf(buf,"%u",high);
+ ent.offsets[1]=add_string(buf);
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ if (ent.offsets[0]<0) PRINTHELP()
+ add_entry(&ent);
+
+ ent.offsets[0]=GetUserVarIndex(line, 3);
+ wsprintf(buf,"%u",low);
+ ent.offsets[1]=add_string(buf);
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ if (ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("GetFileTimeLocal: %s (%u,%u)->(%s,%s)\n",
+ line.gettoken_str(1),high,low,line.gettoken_str(2),line.gettoken_str(3));
+ }
+ return add_entry(&ent);
+
+#else//!NSIS_SUPPORT_STROPTS
+ case TOK_GETDLLVERSIONLOCAL:
+ case TOK_GETFILETIMELOCAL:
+ case TOK_GETFUNCTIONADDR:
+ case TOK_GETLABELADDR:
+ case TOK_GETCURRENTADDR:
+ case TOK_STRLEN:
+ case TOK_STRCPY:
+ case TOK_STRCMP:
+ case TOK_STRCMPS:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_STROPTS not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_STROPTS
+#ifdef NSIS_SUPPORT_INIFILES
+ case TOK_DELETEINISEC:
+ case TOK_DELETEINISTR:
+ {
+ char *vname="";
+ char *space="";
+ ent.which=EW_WRITEINI;
+ ent.offsets[0]=add_string(line.gettoken_str(2)); // section name
+ if (line.getnumtokens() > 3)
+ {
+ vname=line.gettoken_str(3);
+ ent.offsets[1]=add_string(vname); // value name
+ space=" ";
+ }
+ else ent.offsets[1]=0;
+ ent.offsets[2]=0;
+ ent.offsets[3]=add_string(line.gettoken_str(1));
+ SCRIPT_MSG("DeleteINI%s: [%s] %s%sin %s\n",*vname?"Str":"Sec",
+ line.gettoken_str(2),vname,space,line.gettoken_str(1));
+ }
+ return add_entry(&ent);
+ case TOK_FLUSHINI:
+ ent.which=EW_WRITEINI;
+ ent.offsets[3]=add_string(line.gettoken_str(1));
+ SCRIPT_MSG("FlushINI: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_WRITEINISTR:
+ ent.which=EW_WRITEINI;
+ ent.offsets[0]=add_string(line.gettoken_str(2));
+ ent.offsets[1]=add_string(line.gettoken_str(3));
+ ent.offsets[2]=add_string(line.gettoken_str(4));
+ ent.offsets[3]=add_string(line.gettoken_str(1));
+ ent.offsets[4]=1; // write
+ SCRIPT_MSG("WriteINIStr: [%s] %s=%s in %s\n",
+ line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_READINISTR:
+ ent.which=EW_READINISTR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0] < 0) PRINTHELP()
+ ent.offsets[1]=add_string(line.gettoken_str(3));
+ ent.offsets[2]=add_string(line.gettoken_str(4));
+ ent.offsets[3]=add_string(line.gettoken_str(2));
+ SCRIPT_MSG("ReadINIStr %s [%s]:%s from %s\n",line.gettoken_str(1),line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(2));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_INIFILES
+ case TOK_DELETEINISEC:
+ case TOK_DELETEINISTR:
+ case TOK_FLUSHINI:
+ case TOK_WRITEINISTR:
+ case TOK_READINISTR:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_INIFILES not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_INIFILES
+ case TOK_DETAILPRINT:
+ ent.which=EW_UPDATETEXT;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=0;
+ SCRIPT_MSG("DetailPrint: \"%s\"\n",line.gettoken_str(1));
+ return add_entry(&ent);
+#ifdef NSIS_SUPPORT_FNUTIL
+ case TOK_GETTEMPFILENAME:
+ ent.which=EW_GETTEMPFILENAME;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (line.getnumtokens() == 3)
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ else
+ ent.offsets[1]=add_string("$TEMP");
+ if (ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("GetTempFileName -> %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_GETFULLPATHNAME:
+ {
+ int a=0;
+ ent.which=EW_GETFULLPATHNAME;
+ if (line.getnumtokens()==4 && !stricmp(line.gettoken_str(1),"/SHORT")) a++;
+ else if (line.getnumtokens()==4 || *line.gettoken_str(1)=='/') PRINTHELP()
+ ent.offsets[0]=add_string(line.gettoken_str(2+a));
+ ent.offsets[1]=GetUserVarIndex(line, 1+a);
+ ent.offsets[2]=!a;
+ if (ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("GetFullPathName: %s->%s (%d)\n",
+ line.gettoken_str(2+a),line.gettoken_str(1+a),a?"sfn":"lfn");
+ }
+ return add_entry(&ent);
+ case TOK_SEARCHPATH:
+ ent.which=EW_SEARCHPATH;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0] < 0) PRINTHELP()
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ SCRIPT_MSG("SearchPath %s %s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+#else
+ case TOK_SEARCHPATH:
+ case TOK_GETTEMPFILENAME:
+ case TOK_GETFULLPATHNAME:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FNUTIL not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif
+ case TOK_GETDLLVERSION:
+#ifdef NSIS_SUPPORT_GETDLLVERSION
+ ent.which=EW_GETDLLVERSION;
+ ent.offsets[0]=GetUserVarIndex(line, 2);
+ ent.offsets[1]=GetUserVarIndex(line, 3);
+ ent.offsets[2]=add_string(line.gettoken_str(1));
+ if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("GetDLLVersion: %s->%s,%s\n",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_GETDLLVERSION
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_GETDLLVERSION not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_GETDLLVERSION
+ case TOK_GETFILETIME:
+#ifdef NSIS_SUPPORT_GETFILETIME
+ ent.which=EW_GETFILETIME;
+ ent.offsets[0]=GetUserVarIndex(line, 2);
+ ent.offsets[1]=GetUserVarIndex(line, 3);
+ ent.offsets[2]=add_string(line.gettoken_str(1));
+ if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("GetFileTime: %s->%s,%s\n",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_GETFILETIME
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_GETFILETIME not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_GETFILETIME
+#ifdef NSIS_SUPPORT_INTOPTS
+ case TOK_INTOP:
+ ent.which=EW_INTOP;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[3]=line.gettoken_enum(3,"+\0-\0*\0/\0|\0&\0^\0!\0||\0&&\0%\0<<\0>>\0~\0");
+ if (ent.offsets[0] < 0 || ent.offsets[3] < 0 ||
+ ((ent.offsets[3] == 7 || ent.offsets[3] == 13) && line.getnumtokens() > 4))
+ PRINTHELP()
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ if (ent.offsets[3] != 7 && ent.offsets[3] != 13) ent.offsets[2]=add_string(line.gettoken_str(4));
+ if (ent.offsets[3] == 13) {
+ ent.offsets[3]=6;
+ ent.offsets[2]=add_string("0xFFFFFFFF");
+ }
+ SCRIPT_MSG("IntOp: %s=%s%s%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ return add_entry(&ent);
+ case TOK_INTFMT:
+ ent.which=EW_INTFMT;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0]<0) PRINTHELP()
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ SCRIPT_MSG("IntFmt: %s->%s (fmt:%s)\n",line.gettoken_str(3),line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_INTCMP:
+ case TOK_INTCMPU:
+ ent.which=EW_INTCMP;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[5]=which_token == TOK_INTCMPU;
+ if (process_jump(line,3,&ent.offsets[2]) ||
+ process_jump(line,4,&ent.offsets[3]) ||
+ process_jump(line,5,&ent.offsets[4])) PRINTHELP()
+ SCRIPT_MSG("%s %s:%s equal=%s, < %s, > %s\n",line.gettoken_str(0),
+ line.gettoken_str(1),line.gettoken_str(2), line.gettoken_str(3),line.gettoken_str(4),line.gettoken_str(5));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_INTOPTS
+ case TOK_INTOP:
+ case TOK_INTCMP:
+ case TOK_INTFMT:
+ case TOK_INTCMPU:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_INTOPTS not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_INTOPTS
+#ifdef NSIS_SUPPORT_REGISTRYFUNCTIONS
+ case TOK_READREGSTR:
+ case TOK_READREGDWORD:
+ {
+ ent.which=EW_READREGSTR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ int k=line.gettoken_enum(2,rootkeys[0]);
+ if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
+ if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
+ ent.offsets[1]=(int)rootkey_tab[k];
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+ if (which_token == TOK_READREGDWORD) ent.offsets[4]=1;
+ else ent.offsets[4]=0;
+ if (line.gettoken_str(3)[0] == '\\')
+ warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
+
+ SCRIPT_MSG("%s %s %s\\%s\\%s\n",line.gettoken_str(0),
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ }
+ return add_entry(&ent);
+ case TOK_DELETEREGVALUE:
+ case TOK_DELETEREGKEY:
+ {
+ int a=1;
+ if (which_token==TOK_DELETEREGKEY)
+ {
+ ent.offsets[4]=1;
+ char *s=line.gettoken_str(a);
+ if (s[0] == '/')
+ {
+ if (stricmp(s,"/ifempty")) PRINTHELP()
+ a++;
+ ent.offsets[4]=3;
+ }
+ if (line.gettoken_str(a+2)[0]) PRINTHELP()
+ }
+ int k=line.gettoken_enum(a,rootkeys[0]);
+ if (k == -1) k=line.gettoken_enum(a,rootkeys[1]);
+ if (k == -1) PRINTHELP()
+ ent.which=EW_DELREG;
+ ent.offsets[1]=(int)rootkey_tab[k];
+ ent.offsets[2]=add_string(line.gettoken_str(a+1));
+ ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2));
+ if (line.gettoken_str(a+1)[0] == '\\')
+ warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
+ if (which_token==TOK_DELETEREGKEY)
+ SCRIPT_MSG("DeleteRegKey: %s\\%s\n",line.gettoken_str(a),line.gettoken_str(a+1));
+ else
+ SCRIPT_MSG("DeleteRegValue: %s\\%s\\%s\n",line.gettoken_str(a),line.gettoken_str(a+1),line.gettoken_str(a+2));
+ }
+ return add_entry(&ent);
+ case TOK_WRITEREGSTR:
+ case TOK_WRITEREGEXPANDSTR:
+ case TOK_WRITEREGBIN:
+ case TOK_WRITEREGDWORD:
+ {
+ int k=line.gettoken_enum(1,rootkeys[0]);
+ if (k == -1) k=line.gettoken_enum(1,rootkeys[1]);
+ if (k == -1) PRINTHELP()
+ ent.which=EW_WRITEREG;
+ ent.offsets[0]=(int)rootkey_tab[k];
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ if (line.gettoken_str(2)[0] == '\\')
+ warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ if (which_token == TOK_WRITEREGSTR || which_token == TOK_WRITEREGEXPANDSTR)
+ {
+ SCRIPT_MSG("%s: %s\\%s\\%s=%s\n",
+ line.gettoken_str(0),line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+ ent.offsets[4]=ent.offsets[5]=REG_SZ;
+ if (which_token == TOK_WRITEREGEXPANDSTR)
+ {
+ ent.offsets[5]=REG_EXPAND_SZ;
+ }
+ }
+ if (which_token == TOK_WRITEREGBIN)
+ {
+ char data[3*NSIS_MAX_STRLEN];
+ char *p=line.gettoken_str(4);
+ int data_len=0;
+ while (*p)
+ {
+ int c;
+ int a,b;
+ a=*p;
+ if (a >= '0' && a <= '9') a-='0';
+ else if (a >= 'a' && a <= 'f') a-='a'-10;
+ else if (a >= 'A' && a <= 'F') a-='A'-10;
+ else break;
+ b=*++p;
+ if (b >= '0' && b <= '9') b-='0';
+ else if (b >= 'a' && b <= 'f') b-='a'-10;
+ else if (b >= 'A' && b <= 'F') b-='A'-10;
+ else break;
+ p++;
+ c=(a<<4)|b;
+ if (data_len >= 3*NSIS_MAX_STRLEN)
+ {
+ ERROR_MSG("WriteRegBin: %d bytes of data exceeded\n",3*NSIS_MAX_STRLEN);
+ return PS_ERROR;
+ }
+ data[data_len++]=c;
+ }
+ if (*p) PRINTHELP()
+ SCRIPT_MSG("WriteRegBin: %s\\%s\\%s=%s\n",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ ent.offsets[3]=add_db_data(data,data_len);
+ if (ent.offsets[3] < 0) return PS_ERROR;
+ ent.offsets[4]=ent.offsets[5]=REG_BINARY;
+ }
+ if (which_token == TOK_WRITEREGDWORD)
+ {
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+ ent.offsets[4]=ent.offsets[5]=REG_DWORD;
+
+ SCRIPT_MSG("WriteRegDWORD: %s\\%s\\%s=%s\n",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ }
+ }
+ return add_entry(&ent);
+ case TOK_ENUMREGKEY:
+ case TOK_ENUMREGVAL:
+ {
+ ent.which=EW_REGENUM;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ int k=line.gettoken_enum(2,rootkeys[0]);
+ if (k == -1) k=line.gettoken_enum(2,rootkeys[1]);
+ if (ent.offsets[0] == -1 || k == -1) PRINTHELP()
+ ent.offsets[1]=(int)rootkey_tab[k];
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ ent.offsets[3]=add_string(line.gettoken_str(4));
+ ent.offsets[4]=which_token == TOK_ENUMREGKEY;
+ if (line.gettoken_str(3)[0] == '\\') warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0));
+ SCRIPT_MSG("%s %s %s\\%s\\%s\n",which_token == TOK_ENUMREGKEY ? "EnumRegKey" : "EnumRegValue",
+ line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(4));
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_REGISTRYFUNCTIONS
+ case TOK_READREGSTR:
+ case TOK_READREGDWORD:
+ case TOK_DELETEREGVALUE:
+ case TOK_DELETEREGKEY:
+ case TOK_WRITEREGSTR:
+ case TOK_WRITEREGEXPANDSTR:
+ case TOK_WRITEREGBIN:
+ case TOK_WRITEREGDWORD:
+ case TOK_ENUMREGKEY:
+ case TOK_ENUMREGVAL:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_REGISTRYFUNCTIONS not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_REGISTRYFUNCTIONS
+#ifdef NSIS_SUPPORT_STACK
+ case TOK_EXCH:
+ {
+ int swapitem=1;
+ int save=GetUserVarIndex(line, 1);
+ ent.which=EW_PUSHPOP;
+ if (line.gettoken_str(1)[0] && save<0)
+ {
+ int s=0;
+ swapitem=line.gettoken_int(1,&s);
+ if (!s || swapitem <= 0) PRINTHELP()
+ }
+ if (save>=0)
+ {
+ SCRIPT_MSG("Exch(%s,0)\n",line.gettoken_str(1));
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=0;
+ ent.offsets[2]=0;
+ add_entry(&ent);
+ }
+ else SCRIPT_MSG("Exch(st(%d),0)\n",swapitem);
+
+ ent.offsets[0]=0;
+ ent.offsets[1]=0;
+ ent.offsets[2]=swapitem;
+
+ if (save>=0)
+ {
+ add_entry(&ent);
+ ent.offsets[0]=save;
+ ent.offsets[1]=1;
+ ent.offsets[2]=0;
+ }
+
+ DefineInnerLangString(NLF_INST_CORRUPTED);
+ }
+ return add_entry(&ent);
+ case TOK_PUSH:
+ ent.which=EW_PUSHPOP;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=0;
+ SCRIPT_MSG("Push: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_POP:
+ ent.which=EW_PUSHPOP;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=1;
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("Pop: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_STACK
+ case TOK_POP:
+ case TOK_PUSH:
+ case TOK_EXCH:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_STACK not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_STACK
+#ifdef NSIS_SUPPORT_ENVIRONMENT
+ case TOK_READENVSTR:
+ ent.which=EW_READENVSTR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ {
+ char str[NSIS_MAX_STRLEN];
+ strcpy(str, "%");
+ strcat(str, line.gettoken_str(2));
+ strcat(str, "%");
+ ent.offsets[1]=add_string(str);
+ if (ent.offsets[0] < 0 || strlen(line.gettoken_str(2))<1) PRINTHELP()
+ }
+ ent.offsets[2]=1;
+ SCRIPT_MSG("ReadEnvStr: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_EXPANDENVSTRS:
+ ent.which=EW_READENVSTR;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=0;
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("ExpandEnvStrings: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_ENVIRONMENT
+ case TOK_EXPANDENVSTRS:
+ case TOK_READENVSTR:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_ENVIRONMENT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_ENVIRONMENT
+#ifdef NSIS_SUPPORT_FINDFIRST
+ case TOK_FINDFIRST:
+ ent.which=EW_FINDFIRST;
+ ent.offsets[0]=GetUserVarIndex(line, 2); // out
+ ent.offsets[1]=GetUserVarIndex(line, 1); // handleout
+ ent.offsets[2]=add_string(line.gettoken_str(3)); // filespec
+ if (ent.offsets[0] < 0 || ent.offsets[1] < 0) PRINTHELP()
+ SCRIPT_MSG("FindFirst: spec=\"%s\" handle=%s output=%s\n",line.gettoken_str(3),line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_FINDNEXT:
+ ent.which=EW_FINDNEXT;
+ ent.offsets[0]=GetUserVarIndex(line, 2);
+ ent.offsets[1]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0] < 0 || ent.offsets[1] < 0) PRINTHELP()
+ SCRIPT_MSG("FindNext: handle=%s output=%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_FINDCLOSE:
+ ent.which=EW_FINDCLOSE;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("FindClose: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_FINDFIRST
+ case TOK_FINDCLOSE:
+ case TOK_FINDNEXT:
+ case TOK_FINDFIRST:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FINDFIRST not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+
+#endif//!NSIS_SUPPORT_FINDFIRST
+
+
+#ifdef NSIS_SUPPORT_FILEFUNCTIONS
+ case TOK_FILEOPEN:
+ {
+ ent.which=EW_FOPEN;
+ ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
+ ent.offsets[3]=add_string(line.gettoken_str(2));
+ ent.offsets[1]=0; //openmode
+ if (!stricmp(line.gettoken_str(3),"r"))
+ {
+ ent.offsets[1]=GENERIC_READ;
+ ent.offsets[2]=OPEN_EXISTING;
+ }
+ else if (!stricmp(line.gettoken_str(3),"w"))
+ {
+ ent.offsets[1]=GENERIC_WRITE;
+ ent.offsets[2]=CREATE_ALWAYS;
+ }
+ else if (!stricmp(line.gettoken_str(3),"a"))
+ {
+ ent.offsets[1]=GENERIC_WRITE|GENERIC_READ;
+ ent.offsets[2]=OPEN_ALWAYS;
+ }
+
+ if (ent.offsets[0] < 0 || !ent.offsets[1]) PRINTHELP()
+ }
+ SCRIPT_MSG("FileOpen: %s as %s -> %s\n",line.gettoken_str(2),line.gettoken_str(3),line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_FILECLOSE:
+ ent.which=EW_FCLOSE;
+ ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
+ if (ent.offsets[0] < 0) PRINTHELP()
+ SCRIPT_MSG("FileClose: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_FILEREAD:
+ ent.which=EW_FGETS;
+ ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
+ ent.offsets[1]=GetUserVarIndex(line, 2); // output string
+ if (line.gettoken_str(3)[0])
+ ent.offsets[2]=add_string(line.gettoken_str(3));
+ else
+ ent.offsets[2]=add_intstring(NSIS_MAX_STRLEN-1);
+ if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("FileRead: %s->%s (max:%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
+ return add_entry(&ent);
+ case TOK_FILEWRITE:
+ ent.which=EW_FPUTS;
+ ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ if (ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("FileWrite: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_FILEREADBYTE:
+ ent.which=EW_FGETS;
+ ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
+ ent.offsets[1]=GetUserVarIndex(line, 2); // output string
+ ent.offsets[2]=add_string("1");
+ ent.offsets[3]=1;
+ if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("FileReadByte: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_FILEWRITEBYTE:
+ ent.which=EW_FPUTS;
+ ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=1;
+ if (ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("FileWriteByte: %s->%s\n",line.gettoken_str(2),line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_FILESEEK:
+ {
+ char *modestr;
+ int tab[3]={FILE_BEGIN,FILE_CURRENT,FILE_END};
+ int mode=line.gettoken_enum(3,"SET\0CUR\0END\0");
+ ent.which=EW_FSEEK;
+ ent.offsets[0]=GetUserVarIndex(line, 1);
+ ent.offsets[1]=GetUserVarIndex(line, 4);
+ ent.offsets[2]=add_string(line.gettoken_str(2));
+
+ if (mode<0 && !line.gettoken_str(3)[0])
+ {
+ mode=0;
+ modestr="SET";
+ }
+ else modestr=line.gettoken_str(3);
+
+ if (mode<0 || ent.offsets[0] < 0 || (ent.offsets[1]<0 && line.gettoken_str(4)[0])) PRINTHELP()
+ ent.offsets[3]=tab[mode];
+ SCRIPT_MSG("FileSeek: fp=%s, ofs=%s, mode=%s, output=%s\n",
+ line.gettoken_str(1),
+ line.gettoken_str(2),
+ modestr,
+ line.gettoken_str(4));
+ }
+
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_FILEFUNCTIONS
+ case TOK_FILEOPEN:
+ case TOK_FILECLOSE:
+ case TOK_FILESEEK:
+ case TOK_FILEREAD:
+ case TOK_FILEWRITE:
+ case TOK_FILEREADBYTE:
+ case TOK_FILEWRITEBYTE:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_FILEFUNCTIONS not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+
+#endif//!NSIS_SUPPORT_FILEFUNCTIONS
+#ifdef NSIS_SUPPORT_REBOOT
+ case TOK_REBOOT:
+ {
+ int ret = add_entry_direct(EW_REBOOT, 0xbadf00d);
+ if (ret != PS_OK) return ret;
+
+ ret = add_entry_direct(EW_QUIT);
+ if (ret != PS_OK) return ret;
+
+ SCRIPT_MSG("Reboot! (WOW)\n");
+
+ DefineInnerLangString(NLF_INST_CORRUPTED);
+ }
+ return PS_OK;
+ case TOK_IFREBOOTFLAG:
+ ent.which=EW_IFFLAG;
+ if (process_jump(line,1,&ent.offsets[0]) ||
+ process_jump(line,2,&ent.offsets[1])) PRINTHELP()
+ ent.offsets[2]=FLAG_OFFSET(exec_reboot);
+ ent.offsets[3]=~0;//new value mask - keep flag
+ SCRIPT_MSG("IfRebootFlag ?%s:%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SETREBOOTFLAG:
+ {
+ ent.which=EW_SETFLAG;
+ ent.offsets[0]=FLAG_OFFSET(exec_reboot);
+ int k=line.gettoken_enum(1,"false\0true\0");
+ if (k < 0) PRINTHELP()
+ ent.offsets[1]=add_intstring(k);
+ }
+ return add_entry(&ent);
+#else//!NSIS_SUPPORT_REBOOT
+ case TOK_REBOOT:
+ case TOK_IFREBOOTFLAG:
+ case TOK_SETREBOOTFLAG:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_REBOOT not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_REBOOT
+#ifdef NSIS_CONFIG_LOG
+ case TOK_LOGSET:
+ ent.which=EW_LOG;
+ ent.offsets[0]=1;
+ ent.offsets[1]=line.gettoken_enum(1,"off\0on\0");
+ if (ent.offsets[1]<0) PRINTHELP()
+
+ SCRIPT_MSG("LogSet: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_LOGTEXT:
+ ent.which=EW_LOG;
+ ent.offsets[0]=0;
+ ent.offsets[1]=add_string(line.gettoken_str(1));
+ SCRIPT_MSG("LogText \"%s\"\n",line.gettoken_str(1));
+ return add_entry(&ent);
+#else//!NSIS_CONFIG_LOG
+
+ case TOK_LOGSET:
+ case TOK_LOGTEXT:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_LOG not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_CONFIG_LOG
+#ifdef NSIS_CONFIG_COMPONENTPAGE
+ case TOK_SECTIONSETTEXT:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[2]=SECTION_FIELD_SET(name_ptr);
+ ent.offsets[4]=add_string(line.gettoken_str(2));
+ SCRIPT_MSG("SectionSetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONGETTEXT:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=GetUserVarIndex(line, 2);
+ ent.offsets[2]=SECTION_FIELD_GET(name_ptr);
+ if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("SectionGetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONSETFLAGS:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=SECTION_FIELD_SET(flags);
+ ent.offsets[3]=1;
+ SCRIPT_MSG("SectionSetFlags: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONGETFLAGS:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=GetUserVarIndex(line, 2);
+ ent.offsets[2]=SECTION_FIELD_GET(flags);
+ if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("SectionGetFlags: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_INSTTYPESETTEXT:
+ ent.which=EW_INSTTYPESET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=1;
+ SCRIPT_MSG("InstTypeSetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_INSTTYPEGETTEXT:
+ ent.which=EW_INSTTYPESET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=GetUserVarIndex(line, 2);
+ ent.offsets[2]=0;
+ if (line.gettoken_str(1)[0] && ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("InstTypeGetText: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONSETINSTTYPES:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=SECTION_FIELD_SET(install_types);
+ SCRIPT_MSG("SectionSetInstTypes: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONGETINSTTYPES:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=GetUserVarIndex(line, 2);
+ ent.offsets[2]=SECTION_FIELD_GET(install_types);
+ if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("SectionGetInstTypes: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONSETSIZE:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=add_string(line.gettoken_str(2));
+ ent.offsets[2]=SECTION_FIELD_SET(size_kb);
+ SCRIPT_MSG("SectionSetSize: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SECTIONGETSIZE:
+ ent.which=EW_SECTIONSET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=GetUserVarIndex(line, 2);
+ ent.offsets[2]=SECTION_FIELD_GET(size_kb);
+ if (line.gettoken_str(2)[0] && ent.offsets[1]<0) PRINTHELP()
+ SCRIPT_MSG("SectionGetSize: %s->%s\n",line.gettoken_str(1),line.gettoken_str(2));
+ return add_entry(&ent);
+ case TOK_SETCURINSTTYPE:
+ ent.which=EW_INSTTYPESET;
+ ent.offsets[0]=add_string(line.gettoken_str(1));
+ ent.offsets[1]=0;
+ ent.offsets[2]=1;
+ ent.offsets[3]=1;
+ SCRIPT_MSG("SetCurInstType: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+ case TOK_GETCURINSTTYPE:
+ ent.which=EW_INSTTYPESET;
+ ent.offsets[0]=0;
+ ent.offsets[1]=GetUserVarIndex(line,1);
+ ent.offsets[2]=0;
+ ent.offsets[3]=1;
+ if (line.gettoken_str(1)[0] && ent.offsets[0]<0) PRINTHELP()
+ SCRIPT_MSG("GetCurInstType: %s\n",line.gettoken_str(1));
+ return add_entry(&ent);
+#else//!NSIS_CONFIG_COMPONENTPAGE
+ case TOK_SECTIONSETTEXT:
+ case TOK_SECTIONGETTEXT:
+ case TOK_SECTIONSETFLAGS:
+ case TOK_SECTIONGETFLAGS:
+ case TOK_SECTIONSETSIZE:
+ case TOK_SECTIONGETSIZE:
+ case TOK_SECTIONSETINSTTYPES:
+ case TOK_SECTIONGETINSTTYPES:
+ case TOK_SETCURINSTTYPE:
+ case TOK_GETCURINSTTYPE:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_COMPONENTPAGE not defined.\n", line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_CONFIG_COMPONENTPAGE
+#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ case TOK_SETBRANDINGIMAGE:
+ {
+ SCRIPT_MSG("SetBrandingImage: ");
+ if (!branding_image_found) {
+ ERROR_MSG("\nError: no branding image found in chosen UI!\n");
+ return PS_ERROR;
+ }
+ ent.which=EW_SETBRANDINGIMAGE;
+ for (int i = 1; i < line.getnumtokens(); i++)
+ if (!strnicmp(line.gettoken_str(i),"/IMGID=",7)) {
+ ent.offsets[1]=atoi(line.gettoken_str(i)+7);
+ SCRIPT_MSG("/IMGID=%d ",ent.offsets[1]);
+ }
+ else if (!stricmp(line.gettoken_str(i),"/RESIZETOFIT")) {
+ ent.offsets[2]=1; // must be 1 or 0
+ SCRIPT_MSG("/RESIZETOFIT ");
+ }
+ else if (!ent.offsets[0]) {
+ ent.offsets[0]=add_string(line.gettoken_str(i));
+ SCRIPT_MSG("\"%s\" ", line.gettoken_str(i));
+ }
+ else {
+ SCRIPT_MSG("\n");
+ PRINTHELP();
+ }
+
+ if (!ent.offsets[1])
+ ent.offsets[1]=branding_image_id;
+ SCRIPT_MSG("\n");
+ }
+ return add_entry(&ent);
+#else//NSIS_CONFIG_ENHANCEDUI_SUPPORT
+ case TOK_SETBRANDINGIMAGE:
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n",line.gettoken_str(0));
+ return PS_ERROR;
+#endif//!NSIS_SUPPORT_CREATEFONT
+
+ // Added by ramon 3 jun 2003
+ case TOK_DEFVAR:
+ {
+ int a=1;
+
+ if (!strcmpi(line.gettoken_str(1),"/GLOBAL"))
+ {
+ a++;
+ }
+ else if (line.getnumtokens() == 3)
+ {
+ PRINTHELP();
+ }
+
+ if (build_cursection)
+ {
+ if (a==1)
+ {
+ ERROR_MSG("Var: currently, only global variables can be defined.\n");
+ PRINTHELP();
+ }
+ }
+
+ SCRIPT_MSG("Var: \"%s\"\n",line.gettoken_str(a));
+
+ int res = DeclaredUserVar(line.gettoken_str(a));
+ if (res != PS_OK)
+ return res;
+
+ }
+ return PS_OK;
+
+ // Added by ramon 6 jun 2003
+#ifdef NSIS_SUPPORT_VERSION_INFO
+ case TOK_VI_ADDKEY:
+ {
+ LANGID LangID=0;
+ int a = 1;
+ if (!strnicmp(line.gettoken_str(a),"/LANG=",6))
+ LangID=atoi(line.gettoken_str(a++)+6);
+ if (line.getnumtokens()!=a+2) PRINTHELP();
+ char *pKey = line.gettoken_str(a);
+ char *pValue = line.gettoken_str(a+1);
+ if ( !(*pKey) )
+ {
+ ERROR_MSG("Error: empty name for version info key!\n");
+ return PS_ERROR;
+ }
+ else
+ {
+ SCRIPT_MSG("%s: \"%s\" \"%s\"\n", line.gettoken_str(0), line.gettoken_str(a), line.gettoken_str(a+1));
+ LANGID lReaded = LangID;
+ if ( a > 1 && lReaded == 0 )
+ warning_fl("%s: %s language not loaded, using default \"1033-English\"", line.gettoken_str(0), line.gettoken_str(1));
+
+ unsigned int codepage;
+ char *lang_name = GetLangNameAndCP(LangID, &codepage);
+
+ if ( rVersionInfo.SetKeyValue(LangID, codepage, pKey, pValue) )
+ {
+ ERROR_MSG("%s: \"%s\" \"%04d-%s\" already defined!\n",line.gettoken_str(0), line.gettoken_str(2), LangID, lang_name);
+ return PS_ERROR;
+ }
+
+ return PS_OK;
+ }
+ }
+ case TOK_VI_SETPRODUCTVERSION:
+ if ( version_product_v[0] )
+ {
+ ERROR_MSG("Error: %s already defined!\n", line.gettoken_str(0));
+ return PS_ERROR;
+ }
+ strcpy(version_product_v, line.gettoken_str(1));
+ return PS_OK;
+
+#else
+ case TOK_VI_ADDKEY:
+ case TOK_VI_SETPRODUCTVERSION:
+ ERROR_MSG("Error: %s specified, NSIS_SUPPORT_VERSION_INFO not defined.\n",line.gettoken_str(0));
+ return PS_ERROR;
+#endif
+
+ // end of instructions
+ ///////////////////////////////////////////////////////////////////////////////
+
+ // Added by Ximon Eighteen 5th August 2002
+#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
+ case TOK_PLUGINDIR:
+ {
+ if (line.getnumtokens() == 2)
+ {
+ SCRIPT_MSG("PluginDir: \"%s\"\n",line.gettoken_str(1));
+#ifdef _WIN32
+ m_plugins.FindCommands(line.gettoken_str(1), display_info?true:false);
+#else
+ char *converted_path = my_convert(line.gettoken_str(1));
+ m_plugins.FindCommands(converted_path, display_info?true:false);
+ my_convert_free(converted_path);
+#endif
+ return PS_OK;
+ }
+ }
+ return PS_ERROR;
+ case TOK__PLUGINCOMMAND:
+ {
+ int ret;
+
+ const string command = m_plugins.NormalizedCommand(line.gettoken_str(0));
+ const string dllPath = m_plugins.GetPluginPath(command);
+ int data_handle = m_plugins.GetPluginHandle(uninstall_mode?true:false, command);
+
+ if (uninstall_mode) uninst_plugin_used = true;
+ else plugin_used = true;
+
+ // Initialize $PLUGINSDIR
+ ent.which=EW_CALL;
+ ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0);
+ ret=add_entry(&ent);
+ if (ret != PS_OK) {
+ return ret;
+ }
+
+ // DLL name on the user machine
+ char tempDLL[NSIS_MAX_STRLEN];
+ string dllName = get_file_name(dllPath);
+ wsprintf(tempDLL, "$PLUGINSDIR\\%s", dllName.c_str());
+
+ // Add the DLL to the installer
+ if (data_handle == -1)
+ {
+ int files_added;
+ int old_build_allowskipfiles=build_allowskipfiles;
+ build_allowskipfiles=1; // on
+ int old_build_overwrite=build_overwrite;
+ build_overwrite=1; // off
+ int old_build_datesave=build_datesave;
+ build_datesave=0; // off
+ ret=do_add_file(dllPath.c_str(),0,0,&files_added,tempDLL,2,&data_handle); // 2 means no size add
+ if (ret != PS_OK) {
+ return ret;
+ }
+ m_plugins.SetDllDataHandle(uninstall_mode?true:false, line.gettoken_str(0), data_handle);
+ build_overwrite=old_build_overwrite;
+ build_datesave=old_build_datesave;
+ // Added by ramon 23 May 2003
+ build_allowskipfiles=old_build_allowskipfiles;
+ }
+ else
+ {
+ ent.which=EW_EXTRACTFILE;
+
+ DefineInnerLangString(NLF_SKIPPED);
+ DefineInnerLangString(NLF_ERR_DECOMPRESSING);
+ DefineInnerLangString(NLF_ERR_WRITING);
+ DefineInnerLangString(NLF_EXTRACT);
+ DefineInnerLangString(NLF_CANT_WRITE);
+
+ ent.offsets[0]=1; // overwrite off
+ ent.offsets[0]|=(MB_RETRYCANCEL|MB_ICONSTOP|(IDCANCEL<<21))<<3;
+ ent.offsets[1]=add_string(tempDLL);
+ ent.offsets[2]=data_handle;
+ ent.offsets[3]=0xffffffff;
+ ent.offsets[4]=0xffffffff;
+ ent.offsets[5]=DefineInnerLangString(NLF_FILE_ERROR);
+ ret=add_entry(&ent);
+ if (ret != PS_OK) {
+ return ret;
+ }
+ }
+
+ // SetDetailsPrint lastused
+ ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), 0, 1);
+ if (ret != PS_OK) {
+ return ret;
+ }
+
+ // Call the DLL
+ string funcname = get_string_suffix(command, "::");
+ SCRIPT_MSG("Plugin Command: %s",funcname.c_str());
+
+ int i = 1;
+ int nounload = 0;
+ if (!strcmpi(line.gettoken_str(i), "/NOUNLOAD")) {
+ i++;
+ nounload++;
+ }
+
+ // First push dll args
+
+ int parmst=i; // we push em in reverse order
+ int nounloadmisused=0;
+ for (; i < line.getnumtokens(); i++) {
+ int w=parmst + (line.getnumtokens()-i - 1);
+ ent.which=EW_PUSHPOP;
+ ent.offsets[0]=add_string(line.gettoken_str(w));
+ if (!strcmpi(line.gettoken_str(w), "/NOUNLOAD")) nounloadmisused=1;
+ ent.offsets[1]=0;
+ ent.offsets[2]=0;
+ ret=add_entry(&ent);
+ if (ret != PS_OK) {
+ return ret;
+ }
+ SCRIPT_MSG(" %s",line.gettoken_str(i));
+ }
+ SCRIPT_MSG("\n");
+ if (nounloadmisused)
+ warning_fl("/NOUNLOAD must come first before any plugin parameter. Unless the plugin you are trying to use has a parameter /NOUNLOAD, you are doing something wrong");
+
+ // next, call it
+ ent.which=EW_REGISTERDLL;
+ ent.offsets[0]=add_string(tempDLL);;
+ ent.offsets[1]=add_string(funcname.c_str());
+ ent.offsets[2]=0;
+ ent.offsets[3]=nounload|build_plugin_unload;
+ ent.offsets[4]=1;
+ ret=add_entry(&ent);
+ if (ret != PS_OK) {
+ return ret;
+ }
+
+ DefineInnerLangString(NLF_SYMBOL_NOT_FOUND);
+ DefineInnerLangString(NLF_COULD_NOT_LOAD);
+ DefineInnerLangString(NLF_NO_OLE);
+ // not used anywhere - DefineInnerLangString(NLF_ERR_REG_DLL);
+
+ return PS_OK;
+ }
+ case TOK_INITPLUGINSDIR:
+ {
+ int ret;
+ SCRIPT_MSG("%s\n",line.gettoken_str(0));
+ if (uninstall_mode) uninst_plugin_used = true;
+ else plugin_used = true;
+ // Call [un.]Initialize_____Plugins
+ ent.which=EW_CALL;
+ ent.offsets[0]=ns_func.add(uninstall_mode?"un.Initialize_____Plugins":"Initialize_____Plugins",0);
+ ret=add_entry(&ent);
+ if (ret != PS_OK) return ret;
+ // SetDetailsPrint lastused
+ ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), 0, 1);
+ if (ret != PS_OK) return ret;
+ }
+ return PS_OK;
+#else
+ case TOK_PLUGINDIR:
+ case TOK__PLUGINCOMMAND:
+ case TOK_INITPLUGINSDIR:
+ {
+ ERROR_MSG("Error: %s specified, NSIS_CONFIG_PLUGIN_SUPPORT not defined.\n",line.gettoken_str(0));
+ }
+ return PS_ERROR;
+#endif// NSIS_CONFIG_PLUGIN_SUPPORT
+
+#ifdef NSIS_LOCKWINDOW_SUPPORT
+ case TOK_LOCKWINDOW:
+ SCRIPT_MSG("LockWindow: lock state=%d\n",line.gettoken_str(1));
+ ent.which=EW_LOCKWINDOW;
+ ent.offsets[0]=line.gettoken_enum(1,"on\0off\0");
+ if (ent.offsets[0] == -1)
+ PRINTHELP();
+ return add_entry(&ent);
+#else
+ case TOK_LOCKWINDOW:
+ {
+ ERROR_MSG("Error: %s specified, NSIS_LOCKWINDOW_SUPPORT not defined.\n",line.gettoken_str(0));
+ }
+ return PS_ERROR;
+#endif // NSIS_LOCKWINDOW_SUPPORT
+
+ default: break;
+
+ }
+ ERROR_MSG("Error: doCommand: Invalid token \"%s\".\n",line.gettoken_str(0));
+ return PS_ERROR;
+}
+
+#ifdef NSIS_SUPPORT_FILE
+int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int *total_files, const char *name_override, int generatecode, int *data_handle, const set<string>& excluded, const string& basedir, bool dir_created)
+{
+ assert(!name_override || !recurse);
+
+ string dir = get_dir_name(lgss);
+ string spec;
+
+ if (dir == lgss) {
+ dir = ".";
+ spec = lgss;
+ } else {
+ spec = string(lgss).substr(dir.length() + 1, string::npos);
+ }
+
+ if (spec == "") {
+ spec = "*";
+ }
+
+ if (basedir == "") {
+ dir_created = true;
+
+ if (recurse) {
+ // save $OUTDIR into $_OUTDIR [StrCpy $_OUTDIR $OUTDIR]
+ if (add_entry_direct(EW_ASSIGNVAR, m_UserVarNames.get("_OUTDIR"), add_string("$OUTDIR")) != PS_OK) {
+ return PS_ERROR;
+ }
+ }
+ }
+
+ boost::scoped_ptr<dir_reader> dr( new_dir_reader() );
+ dr->exclude(excluded);
+ dr->read(dir);
+
+ // add files in the current directory
+ for (dir_reader::iterator files_itr = dr->files().begin();
+ files_itr != dr->files().end();
+ files_itr++)
+ {
+ if (!dir_reader::matches(*files_itr, spec))
+ continue;
+
+ if (!dir_created && generatecode) {
+ SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode ? "" : "Reserve", dir.c_str());
+
+ if (do_add_file_create_dir(dir, basedir, attrib) != PS_OK) {
+ return PS_ERROR;
+ }
+
+ dir_created = true;
+ }
+
+ if (add_file(dir, *files_itr, attrib, name_override, generatecode, data_handle) != PS_OK) {
+ return PS_ERROR;
+ }
+
+ (*total_files)++;
+ }
+
+ if (!recurse) {
+ return PS_OK;
+ }
+
+ // recurse into directories
+ for (dir_reader::iterator dirs_itr = dr->dirs().begin();
+ dirs_itr != dr->dirs().end();
+ dirs_itr++)
+ {
+ string new_dir;
+ bool created = false;
+
+ if (basedir == "") {
+ new_dir = *dirs_itr;
+ } else {
+ new_dir = basedir + '\\' + *dirs_itr;
+ }
+
+ string new_spec = dir + PLATFORM_PATH_SEPARATOR_STR + *dirs_itr + PLATFORM_PATH_SEPARATOR_STR;
+
+ if (!dir_reader::matches(*dirs_itr, spec)) {
+ new_spec += spec;
+ } else if (generatecode) {
+ // always create directories that match
+
+ SCRIPT_MSG("%sFile: Descending to: \"%s\"\n", generatecode ? "" : "Reserve", new_spec.c_str());
+
+ if (do_add_file_create_dir(dir + '\\' + *dirs_itr, new_dir, attrib) != PS_OK) {
+ return PS_ERROR;
+ }
+
+ created = true;
+ }
+
+ const char *new_spec_c = new_spec.c_str();
+
+ int res = do_add_file(new_spec_c, attrib, 1, total_files, NULL, generatecode, NULL, excluded, new_dir, created);
+ if (res != PS_OK) {
+ return PS_ERROR;
+ }
+ }
+
+ if (basedir == "") {
+ SCRIPT_MSG("%sFile: Returning to: \"%s\"\n", generatecode ? "" : "Reserve", dir.c_str());
+
+ // restore $OUTDIR from $_OUTDIR [SetOutPath $_OUTDIR]
+ if (add_entry_direct(EW_CREATEDIR, add_string("$_OUTDIR"), 1) != PS_OK) {
+ return PS_ERROR;
+ }
+ }
+
+ return PS_OK;
+}
+
+int CEXEBuild::add_file(const string& dir, const string& file, int attrib, const char *name_override, int generatecode, int *data_handle) {
+ string newfn_s = dir + PLATFORM_PATH_SEPARATOR_C + file;
+ const char *newfn = newfn_s.c_str();
+ const char *filename = file.c_str();
+
+ MMapFile mmap;
+ DWORD len;
+
+#ifdef _WIN32
+ HANDLE hFile = CreateFile(
+ newfn,
+ GENERIC_READ,
+ FILE_SHARE_READ,
+ NULL,
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
+ NULL
+ );
+ if (hFile == INVALID_HANDLE_VALUE)
+ {
+ ERROR_MSG("%sFile: failed opening file \"%s\"\n",generatecode?"":"Reserve",newfn);
+ return PS_ERROR;
+ }
+
+ // Will auto-CloseHandle hFile
+ MANAGE_WITH(hFile, CloseHandle);
+
+ len = GetFileSize(hFile, NULL);
+ if (len && !mmap.setfile(hFile, len))
+ {
+ ERROR_MSG("%sFile: failed creating mmap of \"%s\"\n",generatecode?"":"Reserve",newfn);
+ return PS_ERROR;
+ }
+#else
+ struct stat s;
+ if (stat(newfn, &s)) {
+ ERROR_MSG("%sFile: failed stating file \"%s\"\n",generatecode?"":"Reserve",newfn);
+ return PS_ERROR;
+ }
+
+ len = (DWORD) s.st_size;
+
+ int fd = OPEN(newfn, O_RDONLY);
+ if (fd == -1)
+ {
+ ERROR_MSG("%sFile: failed opening file \"%s\"\n",generatecode?"":"Reserve",newfn);
+ return PS_ERROR;
+ }
+
+ // Will auto-close(2) fd
+ MANAGE_WITH(fd, close);
+
+ if (len && !mmap.setfile(fd, len))
+ {
+ ERROR_MSG("%sFile: failed creating mmap of \"%s\"\n",generatecode?"":"Reserve",newfn);
+ return PS_ERROR;
+ }
+#endif
+
+ if (generatecode&1)
+ section_add_size_kb((len+1023)/1024);
+ if (name_override) SCRIPT_MSG("%sFile: \"%s\"->\"%s\"",generatecode?"":"Reserve",filename,name_override);
+ else SCRIPT_MSG("%sFile: \"%s\"",generatecode?"":"Reserve",filename);
+ if (!build_compress_whole)
+ if (build_compress) SCRIPT_MSG(" [compress]");
+ fflush(stdout);
+ char buf[1024];
+ int last_build_datablock_used=getcurdbsize();
+ entry ent={0,};
+ if (generatecode)
+ {
+ ent.which=EW_EXTRACTFILE;
+
+ DefineInnerLangString(NLF_SKIPPED);
+ DefineInnerLangString(NLF_ERR_DECOMPRESSING);
+ DefineInnerLangString(NLF_ERR_WRITING);
+ DefineInnerLangString(NLF_EXTRACT);
+ DefineInnerLangString(NLF_CANT_WRITE);
+
+ ent.offsets[0]=build_overwrite;
+ if (name_override)
+ {
+ ent.offsets[1]=add_string(name_override);
+ }
+ else
+ {
+ const char *i=filename;
+ char *o=buf;
+ while (*i)
+ {
+ const char c=*i++;
+ *o++=c;
+ if (c == '$') *o++='$';
+ }
+ *o=0;
+ ent.offsets[1]=add_string(buf);
+ }
+ }
+ ent.offsets[2]=add_db_data(&mmap);
+
+ mmap.clear();
+
+ if (ent.offsets[2] < 0)
+ {
+ return PS_ERROR;
+ }
+
+ if (data_handle)
+ {
+ *data_handle=ent.offsets[2];
+ }
+
+ {
+ DWORD s=getcurdbsize()-last_build_datablock_used;
+ if (s) s-=4;
+ if (s != len) SCRIPT_MSG(" %d/%d bytes\n",s,len);
+ else SCRIPT_MSG(" %d bytes\n",len);
+ }
+
+ if (generatecode)
+ {
+ if (build_datesave || build_overwrite>=0x3 /*ifnewer or ifdiff*/)
+ {
+#ifdef _WIN32
+ FILETIME ft;
+ if (GetFileTime(hFile,NULL,NULL,&ft))
+ {
+ // FAT write time has a resolution of 2 seconds
+ PULONGLONG fti = (PULONGLONG) &ft;
+ *fti -= *fti % 20000000;
+
+ ent.offsets[3]=ft.dwLowDateTime;
+ ent.offsets[4]=ft.dwHighDateTime;
+ }
+#else
+ struct stat st;
+ if (!fstat(fd, &st))
+ {
+ unsigned long long ll = (st.st_mtime * 10000000LL) + 116444736000000000LL;
+
+ // FAT write time has a resolution of 2 seconds
+ ll -= ll % 20000000;
+
+ ent.offsets[3] = (int) ll;
+ ent.offsets[4] = (int) (ll >> 32);
+ }
+#endif
+ else
+ {
+ ERROR_MSG("%sFile: failed getting file date from \"%s\"\n",generatecode?"":"Reserve",newfn);
+ return PS_ERROR;
+ }
+ }
+ else
+ {
+ ent.offsets[3]=0xffffffff;
+ ent.offsets[4]=0xffffffff;
+ }
+
+ // overwrite flag can be 0, 1, 2 or 3. in all cases, 2 bits
+ int mb = 0;
+ if (build_allowskipfiles)
+ {
+ mb = MB_ABORTRETRYIGNORE | MB_ICONSTOP;
+ // default for silent installers
+ mb |= IDIGNORE << 21;
+ }
+ else
+ {
+ mb = MB_RETRYCANCEL | MB_ICONSTOP;
+ // default for silent installers
+ mb |= IDCANCEL << 21;
+ }
+ ent.offsets[0] |= mb << 3;
+
+ ent.offsets[5] = DefineInnerLangString(build_allowskipfiles ? NLF_FILE_ERROR : NLF_FILE_ERROR_NOIGNORE);
+ }
+
+ if (generatecode)
+ {
+ int a=add_entry(&ent);
+ if (a != PS_OK)
+ {
+ return a;
+ }
+ if (attrib)
+ {
+#ifdef _WIN32
+ ent.which=EW_SETFILEATTRIBUTES;
+ // $OUTDIR is the working directory
+ ent.offsets[0]=add_string(name_override?name_override:buf);
+ ent.offsets[1]=GetFileAttributes(newfn);
+ ent.offsets[2]=0;
+ ent.offsets[3]=0;
+ ent.offsets[4]=0;
+ ent.offsets[5]=0;
+
+ if (ent.offsets[1] != INVALID_FILE_ATTRIBUTES)
+ {
+ a=add_entry(&ent);
+ if (a != PS_OK)
+ {
+ return a;
+ }
+ }
+#endif
+ }
+ }
+
+ return PS_OK;
+}
+
+int CEXEBuild::do_add_file_create_dir(const string& local_dir, const string& dir, int attrib) {
+ string outdir_s = "$_OUTDIR\\" + dir;
+
+ string::size_type pos = 1;
+ pos = outdir_s.find('$', pos);
+ while (pos != string::npos) {
+ outdir_s = outdir_s.insert(pos, "$");
+ pos = outdir_s.find('$', pos + 2);
+ }
+
+ int outdir = add_string(outdir_s.c_str());
+
+ if (add_entry_direct(EW_CREATEDIR, outdir, 1) != PS_OK) {
+ return PS_ERROR;
+ }
+
+#ifdef _WIN32
+ if (attrib) {
+ int ndc = add_string(".");
+
+ DWORD attr = GetFileAttributes(local_dir.c_str());
+
+ if (attr != INVALID_FILE_ATTRIBUTES)
+ {
+ if (add_entry_direct(EW_SETFILEATTRIBUTES, ndc, attr) != PS_OK)
+ {
+ return PS_ERROR;
+ }
+ }
+ }
+#endif
+
+ return PS_OK;
+}
+#endif
diff --git a/Source/strlist.cpp b/Source/strlist.cpp
index f61fa0b..4af6959 100755
--- a/Source/strlist.cpp
+++ b/Source/strlist.cpp
@@ -1,204 +1,204 @@
-/*
- * strlist.cpp: Implementation of the StringList class.
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "strlist.h"
-
-int StringList::add(const char *str, int case_sensitive)
-{
- int a=find(str,case_sensitive);
- if (a >= 0 && case_sensitive!=-1) return a;
- return gr.add(str,strlen(str)+1);
-}
-
-// use 2 for case sensitive end-of-string matches too
-int StringList::find(const char *str, int case_sensitive, int *idx/*=NULL*/) const // returns -1 if not found
-{
- const char *s=get();
- int ml=getlen();
- int offs=0;
- if (idx) *idx=0;
- while (offs < ml)
- {
- if ((case_sensitive && !strcmp(s+offs,str)) ||
- (!case_sensitive && !stricmp(s+offs,str)))
- {
- return offs;
- }
- if (case_sensitive==2 &&
- strlen(str) < strlen(s+offs) && // check for end of string
- !strcmp(s+offs+strlen(s+offs)-strlen(str),str))
- {
- return offs+strlen(s+offs)-strlen(str);
- }
- offs+=strlen(s+offs)+1;
- if (idx) (*idx)++;
- }
- return -1;
-}
-
-void StringList::delbypos(int pos)
-{
- char *s=(char*)gr.get();
- int len=strlen(s+pos)+1;
- if (pos+len < gr.getlen()) memcpy(s+pos,s+pos+len,gr.getlen()-(pos+len));
- gr.resize(gr.getlen()-len);
-}
-
-int StringList::idx2pos(int idx) const
-{
- char *s=(char*)gr.get();
- int offs=0;
- int cnt=0;
- if (idx>=0) while (offs < gr.getlen())
- {
- if (cnt++ == idx) return offs;
- offs+=strlen(s+offs)+1;
- }
- return -1;
-}
-
-int StringList::getnum() const
-{
- char *s=(char*)gr.get();
- int ml=gr.getlen();
- int offs=0;
- int idx=0;
- while (offs < ml)
- {
- offs+=strlen(s+offs)+1;
- idx++;
- }
- return idx;
-}
-
-const char *StringList::get() const
-{
- return (const char*)gr.get();
-}
-
-int StringList::getlen() const
-{
- return gr.getlen();
-}
-
-// ==========
-// DefineList
-// ==========
-
-DefineList::~DefineList()
-{
- struct define *s=(struct define*)gr.get();
- int num=gr.getlen()/sizeof(struct define);
-
- for (int i=0; i<num; i++) {
- free(s[i].value);
- }
-}
-
-int DefineList::add(const char *name, const char *value/*=""*/)
-{
- int pos=SortedStringList<struct define>::add(name);
- if (pos == -1)
- {
- return 1;
- }
-
- char **newvalue=&(((struct define*)gr.get())[pos].value);
- *newvalue=(char*)malloc(strlen(value)+1);
- if (!(*newvalue))
- {
- extern FILE *g_output;
- extern int g_display_errors;
- extern void quit();
- if (g_display_errors)
- {
- fprintf(g_output,"\nInternal compiler error #12345: GrowBuf realloc/malloc(%lu) failed.\n",(unsigned long)strlen(value)+1);
- fflush(g_output);
- }
- quit();
- }
- strcpy(*newvalue,value);
- return 0;
-}
-
-char *DefineList::find(const char *name)
-{
- int v=SortedStringList<struct define>::find(name);
- if (v==-1)
- {
- return NULL;
- }
- return ((struct define*)gr.get())[v].value;
-}
-
-// returns 0 on success, 1 otherwise
-int DefineList::del(const char *str)
-{
- int pos=SortedStringList<struct define>::find(str);
- if (pos==-1) return 1;
-
- struct define *db=(struct define *)gr.get();
- free(db[pos].value);
- delbypos(pos);
-
- return 0;
-}
-
-int DefineList::getnum()
-{
- return gr.getlen()/sizeof(define);
-}
-
-char *DefineList::getname(int num)
-{
- if ((unsigned int)getnum() <= (unsigned int)num)
- return 0;
- return ((struct define*)gr.get())[num].name;
-}
-
-char *DefineList::getvalue(int num)
-{
- if ((unsigned int)getnum() <= (unsigned int)num)
- return 0;
- return ((struct define*)gr.get())[num].value;
-}
-
-// ==============
-// FastStringList
-// ==============
-
-int FastStringList::add(const char *name, int case_sensitive/*=0*/)
-{
- int pos = SortedStringListND<struct string_t>::add(name, case_sensitive);
- if (pos == -1) return -1;
- return ((struct string_t*)gr.get())[pos].name;
-}
-
-char *FastStringList::get() const
-{
- return (char*)strings.get();
-}
-
-int FastStringList::getlen() const
-{
- return strings.getlen();
-}
-
-int FastStringList::getnum() const
-{
- return gr.getlen()/sizeof(struct string_t);
-}
-
+/*
+ * strlist.cpp: Implementation of the StringList class.
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "strlist.h"
+
+int StringList::add(const char *str, int case_sensitive)
+{
+ int a=find(str,case_sensitive);
+ if (a >= 0 && case_sensitive!=-1) return a;
+ return gr.add(str,strlen(str)+1);
+}
+
+// use 2 for case sensitive end-of-string matches too
+int StringList::find(const char *str, int case_sensitive, int *idx/*=NULL*/) const // returns -1 if not found
+{
+ const char *s=get();
+ int ml=getlen();
+ int offs=0;
+ if (idx) *idx=0;
+ while (offs < ml)
+ {
+ if ((case_sensitive && !strcmp(s+offs,str)) ||
+ (!case_sensitive && !stricmp(s+offs,str)))
+ {
+ return offs;
+ }
+ if (case_sensitive==2 &&
+ strlen(str) < strlen(s+offs) && // check for end of string
+ !strcmp(s+offs+strlen(s+offs)-strlen(str),str))
+ {
+ return offs+strlen(s+offs)-strlen(str);
+ }
+ offs+=strlen(s+offs)+1;
+ if (idx) (*idx)++;
+ }
+ return -1;
+}
+
+void StringList::delbypos(int pos)
+{
+ char *s=(char*)gr.get();
+ int len=strlen(s+pos)+1;
+ if (pos+len < gr.getlen()) memcpy(s+pos,s+pos+len,gr.getlen()-(pos+len));
+ gr.resize(gr.getlen()-len);
+}
+
+int StringList::idx2pos(int idx) const
+{
+ char *s=(char*)gr.get();
+ int offs=0;
+ int cnt=0;
+ if (idx>=0) while (offs < gr.getlen())
+ {
+ if (cnt++ == idx) return offs;
+ offs+=strlen(s+offs)+1;
+ }
+ return -1;
+}
+
+int StringList::getnum() const
+{
+ char *s=(char*)gr.get();
+ int ml=gr.getlen();
+ int offs=0;
+ int idx=0;
+ while (offs < ml)
+ {
+ offs+=strlen(s+offs)+1;
+ idx++;
+ }
+ return idx;
+}
+
+const char *StringList::get() const
+{
+ return (const char*)gr.get();
+}
+
+int StringList::getlen() const
+{
+ return gr.getlen();
+}
+
+// ==========
+// DefineList
+// ==========
+
+DefineList::~DefineList()
+{
+ struct define *s=(struct define*)gr.get();
+ int num=gr.getlen()/sizeof(struct define);
+
+ for (int i=0; i<num; i++) {
+ free(s[i].value);
+ }
+}
+
+int DefineList::add(const char *name, const char *value/*=""*/)
+{
+ int pos=SortedStringList<struct define>::add(name);
+ if (pos == -1)
+ {
+ return 1;
+ }
+
+ char **newvalue=&(((struct define*)gr.get())[pos].value);
+ *newvalue=(char*)malloc(strlen(value)+1);
+ if (!(*newvalue))
+ {
+ extern FILE *g_output;
+ extern int g_display_errors;
+ extern void quit();
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nInternal compiler error #12345: GrowBuf realloc/malloc(%lu) failed.\n",(unsigned long)strlen(value)+1);
+ fflush(g_output);
+ }
+ quit();
+ }
+ strcpy(*newvalue,value);
+ return 0;
+}
+
+char *DefineList::find(const char *name)
+{
+ int v=SortedStringList<struct define>::find(name);
+ if (v==-1)
+ {
+ return NULL;
+ }
+ return ((struct define*)gr.get())[v].value;
+}
+
+// returns 0 on success, 1 otherwise
+int DefineList::del(const char *str)
+{
+ int pos=SortedStringList<struct define>::find(str);
+ if (pos==-1) return 1;
+
+ struct define *db=(struct define *)gr.get();
+ free(db[pos].value);
+ delbypos(pos);
+
+ return 0;
+}
+
+int DefineList::getnum()
+{
+ return gr.getlen()/sizeof(define);
+}
+
+char *DefineList::getname(int num)
+{
+ if ((unsigned int)getnum() <= (unsigned int)num)
+ return 0;
+ return ((struct define*)gr.get())[num].name;
+}
+
+char *DefineList::getvalue(int num)
+{
+ if ((unsigned int)getnum() <= (unsigned int)num)
+ return 0;
+ return ((struct define*)gr.get())[num].value;
+}
+
+// ==============
+// FastStringList
+// ==============
+
+int FastStringList::add(const char *name, int case_sensitive/*=0*/)
+{
+ int pos = SortedStringListND<struct string_t>::add(name, case_sensitive);
+ if (pos == -1) return -1;
+ return ((struct string_t*)gr.get())[pos].name;
+}
+
+char *FastStringList::get() const
+{
+ return (char*)strings.get();
+}
+
+int FastStringList::getlen() const
+{
+ return strings.getlen();
+}
+
+int FastStringList::getnum() const
+{
+ return gr.getlen()/sizeof(struct string_t);
+}
+
diff --git a/Source/strlist.h b/Source/strlist.h
index 0c2a633..dd08855 100755
--- a/Source/strlist.h
+++ b/Source/strlist.h
@@ -1,258 +1,258 @@
-/*
- * strlist.h: Implementation of the StringList class.
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _STRLIST_H_
-#define _STRLIST_H_
-
-#include "Platform.h"
-#include <cstdio>
-#include "growbuf.h"
-
-class StringList
-{
-private: // don't copy instances
- StringList(const StringList&);
- void operator=(const StringList&);
-
-public:
- StringList() {}
- ~StringList() {}
-
- int add(const char *str, int case_sensitive);
- // use 2 for case sensitive end-of-string matches too
- int find(const char *str, int case_sensitive, int *idx=NULL) const; // returns -1 if not found
- void delbypos(int pos);
- int idx2pos(int idx) const;
- int getnum() const;
- const char *get() const;
- int getlen() const;
-
-private:
- GrowBuf gr;
-};
-
-template <class T>
-class SortedStringList
-{
- public:
- virtual ~SortedStringList()
- {
- T *s=(T*)gr.get();
- size_t num=gr.getlen()/sizeof(T);
-
- for (size_t i=0; i<num; i++) {
- free(s[i].name);
- }
- }
-
- // returns -1 when name already exists and pos if added
- int add(const char *name, int case_sensitive=0)
- {
- T newstruct={0,};
- int pos=find(name,case_sensitive,1);
- if (pos==-1) return -1;
- newstruct.name=(char*)malloc(strlen(name)+1);
- if (!newstruct.name)
- {
- extern FILE *g_output;
- extern int g_display_errors;
- extern void quit();
- if (g_display_errors)
- {
- fprintf(g_output,"\nInternal compiler error #12345: GrowBuf realloc/malloc(%lu) failed.\n",(unsigned long)strlen(name)+1);
- fflush(g_output);
- }
- quit();
- }
- strcpy(newstruct.name,name);
- gr.add(&newstruct,sizeof(T));
-
- T *s=(T*)gr.get();
- memmove(s+pos+1,s+pos,gr.getlen()-((pos+1)*sizeof(T)));
- memcpy(s+pos,&newstruct,sizeof(T));
-
- return pos;
- }
-
- // returns -1 if not found, position if found
- // if returnbestpos=1 returns -1 if found, best pos to insert if not found
- int find(const char *str, int case_sensitive=0, int returnbestpos=0)
- {
- T *data=(T *)gr.get();
- int ul=gr.getlen()/sizeof(T);
- int ll=0;
- int nextpos=(ul+ll)/2;
-
- while (ul > ll)
- {
- int res;
- if (case_sensitive)
- res=strcmp(str, data[nextpos].name);
- else
- res=stricmp(str, data[nextpos].name);
- if (res==0) return returnbestpos ? -1 : nextpos;
- if (res<0) ul=nextpos;
- else ll=nextpos+1;
- nextpos=(ul+ll)/2;
- }
-
- return returnbestpos ? nextpos : -1;
- }
-
- // returns 0 on success, 1 otherwise
- int del(const char *str, int case_sensitive=0)
- {
- int pos=find(str, case_sensitive);
- if (pos==-1) return 1;
-
- delbypos(pos);
-
- return 0;
- }
-
- void delbypos(int pos)
- {
- T *db=(T *)gr.get();
- free(db[pos].name);
- memmove(db+pos,db+pos+1,gr.getlen()-(pos*sizeof(T))-sizeof(T));
- gr.resize(gr.getlen()-sizeof(T));
- }
-
- protected:
- TinyGrowBuf gr;
-};
-
-#define mymin(x, y) ((x < y) ? x : y)
-
-template <class T>
-class SortedStringListND // no delete - can be placed in GrowBuf
-{
- public:
- SortedStringListND() { }
- virtual ~SortedStringListND() { }
-
- // returns -1 when name already exists and pos if added
- int add(const char *name, int case_sensitive=0, int alwaysreturnpos=0)
- {
- int where=0;
- T newstruct={0,};
- int pos=find(name,-1,case_sensitive,1,&where);
- if (pos==-1) return alwaysreturnpos ? where : -1;
- newstruct.name=strings.add(name,strlen(name)+1);
-
- gr.add(&newstruct,sizeof(T));
- T *s=(T*)gr.get();
- memmove(s+pos+1,s+pos,gr.getlen()-((pos+1)*sizeof(T)));
- memcpy(s+pos,&newstruct,sizeof(T));
-
- return pos;
- }
-
- // returns -1 if not found, position if found
- // if returnbestpos=1 returns -1 if found, best pos to insert if not found
- // if n_chars equal to -1 all string is tested
- int find(const char *str, int n_chars=-1, int case_sensitive=0, int returnbestpos=0, int *where=0)
- {
- T *data=(T *)gr.get();
- int ul=gr.getlen()/sizeof(T);
- int ll=0;
- int nextpos=(ul+ll)/2;
-
- while (ul > ll)
- {
- int res;
- const char *pCurr = (char*)strings.get() + data[nextpos].name;
- if (n_chars < 0)
- {
- if (case_sensitive)
- res = strcmp(str, pCurr);
- else
- res = stricmp(str, pCurr);
- }
- else
- {
- if (case_sensitive)
- res=strncmp(str, pCurr, mymin((unsigned int) n_chars, strlen(pCurr)));
- else
- res=strnicmp(str, pCurr, mymin((unsigned int) n_chars, strlen(pCurr)));
- if (res == 0 && n_chars != -1 && (unsigned int) n_chars != strlen(pCurr))
- res = n_chars - strlen(pCurr);
- }
-
- if (res==0)
- {
- if (where) *where = nextpos;
- return returnbestpos ? (case_sensitive!=-1 ? -1 : nextpos) : nextpos;
- }
- if (res<0) ul=nextpos;
- else ll=nextpos+1;
- nextpos=(ul+ll)/2;
- }
-
- return returnbestpos ? nextpos : -1;
- }
-
- protected:
- TinyGrowBuf gr;
- GrowBuf strings;
-};
-
-struct define {
- char *name;
- char *value;
-};
-
-class DefineList : public SortedStringList<struct define>
-{
- private: // don't copy instances
- DefineList(const DefineList&);
- void operator=(const DefineList&);
-
- public:
- DefineList() {} // VC6 complains otherwise
- virtual ~DefineList();
-
- int add(const char *name, const char *value="");
- char *find(const char *name);
-
- // returns 0 on success, 1 otherwise
- int del(const char *str);
- int getnum();
- char *getname(int num);
- char *getvalue(int num);
-};
-
-struct string_t {
- int name;
-};
-
-class FastStringList : public SortedStringListND<struct string_t>
-{
- private: // don't copy instances
- FastStringList(const FastStringList&);
- void operator=(const FastStringList&);
-
- public:
- FastStringList() {} // VC6 complains otherwise
- virtual ~FastStringList() {}
-
- int add(const char *name, int case_sensitive=0);
- char *get() const;
- int getlen() const;
- int getnum() const;
-};
-
-#endif//_STRLIST_H_
+/*
+ * strlist.h: Implementation of the StringList class.
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _STRLIST_H_
+#define _STRLIST_H_
+
+#include "Platform.h"
+#include <cstdio>
+#include "growbuf.h"
+
+class StringList
+{
+private: // don't copy instances
+ StringList(const StringList&);
+ void operator=(const StringList&);
+
+public:
+ StringList() {}
+ ~StringList() {}
+
+ int add(const char *str, int case_sensitive);
+ // use 2 for case sensitive end-of-string matches too
+ int find(const char *str, int case_sensitive, int *idx=NULL) const; // returns -1 if not found
+ void delbypos(int pos);
+ int idx2pos(int idx) const;
+ int getnum() const;
+ const char *get() const;
+ int getlen() const;
+
+private:
+ GrowBuf gr;
+};
+
+template <class T>
+class SortedStringList
+{
+ public:
+ virtual ~SortedStringList()
+ {
+ T *s=(T*)gr.get();
+ size_t num=gr.getlen()/sizeof(T);
+
+ for (size_t i=0; i<num; i++) {
+ free(s[i].name);
+ }
+ }
+
+ // returns -1 when name already exists and pos if added
+ int add(const char *name, int case_sensitive=0)
+ {
+ T newstruct={0,};
+ int pos=find(name,case_sensitive,1);
+ if (pos==-1) return -1;
+ newstruct.name=(char*)malloc(strlen(name)+1);
+ if (!newstruct.name)
+ {
+ extern FILE *g_output;
+ extern int g_display_errors;
+ extern void quit();
+ if (g_display_errors)
+ {
+ fprintf(g_output,"\nInternal compiler error #12345: GrowBuf realloc/malloc(%lu) failed.\n",(unsigned long)strlen(name)+1);
+ fflush(g_output);
+ }
+ quit();
+ }
+ strcpy(newstruct.name,name);
+ gr.add(&newstruct,sizeof(T));
+
+ T *s=(T*)gr.get();
+ memmove(s+pos+1,s+pos,gr.getlen()-((pos+1)*sizeof(T)));
+ memcpy(s+pos,&newstruct,sizeof(T));
+
+ return pos;
+ }
+
+ // returns -1 if not found, position if found
+ // if returnbestpos=1 returns -1 if found, best pos to insert if not found
+ int find(const char *str, int case_sensitive=0, int returnbestpos=0)
+ {
+ T *data=(T *)gr.get();
+ int ul=gr.getlen()/sizeof(T);
+ int ll=0;
+ int nextpos=(ul+ll)/2;
+
+ while (ul > ll)
+ {
+ int res;
+ if (case_sensitive)
+ res=strcmp(str, data[nextpos].name);
+ else
+ res=stricmp(str, data[nextpos].name);
+ if (res==0) return returnbestpos ? -1 : nextpos;
+ if (res<0) ul=nextpos;
+ else ll=nextpos+1;
+ nextpos=(ul+ll)/2;
+ }
+
+ return returnbestpos ? nextpos : -1;
+ }
+
+ // returns 0 on success, 1 otherwise
+ int del(const char *str, int case_sensitive=0)
+ {
+ int pos=find(str, case_sensitive);
+ if (pos==-1) return 1;
+
+ delbypos(pos);
+
+ return 0;
+ }
+
+ void delbypos(int pos)
+ {
+ T *db=(T *)gr.get();
+ free(db[pos].name);
+ memmove(db+pos,db+pos+1,gr.getlen()-(pos*sizeof(T))-sizeof(T));
+ gr.resize(gr.getlen()-sizeof(T));
+ }
+
+ protected:
+ TinyGrowBuf gr;
+};
+
+#define mymin(x, y) ((x < y) ? x : y)
+
+template <class T>
+class SortedStringListND // no delete - can be placed in GrowBuf
+{
+ public:
+ SortedStringListND() { }
+ virtual ~SortedStringListND() { }
+
+ // returns -1 when name already exists and pos if added
+ int add(const char *name, int case_sensitive=0, int alwaysreturnpos=0)
+ {
+ int where=0;
+ T newstruct={0,};
+ int pos=find(name,-1,case_sensitive,1,&where);
+ if (pos==-1) return alwaysreturnpos ? where : -1;
+ newstruct.name=strings.add(name,strlen(name)+1);
+
+ gr.add(&newstruct,sizeof(T));
+ T *s=(T*)gr.get();
+ memmove(s+pos+1,s+pos,gr.getlen()-((pos+1)*sizeof(T)));
+ memcpy(s+pos,&newstruct,sizeof(T));
+
+ return pos;
+ }
+
+ // returns -1 if not found, position if found
+ // if returnbestpos=1 returns -1 if found, best pos to insert if not found
+ // if n_chars equal to -1 all string is tested
+ int find(const char *str, int n_chars=-1, int case_sensitive=0, int returnbestpos=0, int *where=0)
+ {
+ T *data=(T *)gr.get();
+ int ul=gr.getlen()/sizeof(T);
+ int ll=0;
+ int nextpos=(ul+ll)/2;
+
+ while (ul > ll)
+ {
+ int res;
+ const char *pCurr = (char*)strings.get() + data[nextpos].name;
+ if (n_chars < 0)
+ {
+ if (case_sensitive)
+ res = strcmp(str, pCurr);
+ else
+ res = stricmp(str, pCurr);
+ }
+ else
+ {
+ if (case_sensitive)
+ res=strncmp(str, pCurr, mymin((unsigned int) n_chars, strlen(pCurr)));
+ else
+ res=strnicmp(str, pCurr, mymin((unsigned int) n_chars, strlen(pCurr)));
+ if (res == 0 && n_chars != -1 && (unsigned int) n_chars != strlen(pCurr))
+ res = n_chars - strlen(pCurr);
+ }
+
+ if (res==0)
+ {
+ if (where) *where = nextpos;
+ return returnbestpos ? (case_sensitive!=-1 ? -1 : nextpos) : nextpos;
+ }
+ if (res<0) ul=nextpos;
+ else ll=nextpos+1;
+ nextpos=(ul+ll)/2;
+ }
+
+ return returnbestpos ? nextpos : -1;
+ }
+
+ protected:
+ TinyGrowBuf gr;
+ GrowBuf strings;
+};
+
+struct define {
+ char *name;
+ char *value;
+};
+
+class DefineList : public SortedStringList<struct define>
+{
+ private: // don't copy instances
+ DefineList(const DefineList&);
+ void operator=(const DefineList&);
+
+ public:
+ DefineList() {} // VC6 complains otherwise
+ virtual ~DefineList();
+
+ int add(const char *name, const char *value="");
+ char *find(const char *name);
+
+ // returns 0 on success, 1 otherwise
+ int del(const char *str);
+ int getnum();
+ char *getname(int num);
+ char *getvalue(int num);
+};
+
+struct string_t {
+ int name;
+};
+
+class FastStringList : public SortedStringListND<struct string_t>
+{
+ private: // don't copy instances
+ FastStringList(const FastStringList&);
+ void operator=(const FastStringList&);
+
+ public:
+ FastStringList() {} // VC6 complains otherwise
+ virtual ~FastStringList() {}
+
+ int add(const char *name, int case_sensitive=0);
+ char *get() const;
+ int getlen() const;
+ int getnum() const;
+};
+
+#endif//_STRLIST_H_
diff --git a/Source/tokens.cpp b/Source/tokens.cpp
index 2f38aa7..7d9ee4b 100755
--- a/Source/tokens.cpp
+++ b/Source/tokens.cpp
@@ -1,397 +1,397 @@
-/*
- * tokens.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "build.h"
-#include "tokens.h"
-
-typedef struct
-{
- int id;
- char *name;
- int num_parms; // minimum number of parameters
- int opt_parms; // optional parmaters, usually 0, can be -1 for unlimited.
- char *usage_str;
- int placement; // where the token can be placed
-} tokenType;
-
-
-static tokenType tokenlist[TOK__LAST] =
-{
-{TOK_ABORT,"Abort",0,1,"[message]",TP_CODE},
-{TOK_ADDBRANDINGIMAGE,"AddBrandingImage",2,1,"(top|left|bottom|right) (height|width) [padding]",TP_GLOBAL},
-{TOK_ADDSIZE,"AddSize",1,0,"size_to_add_to_section_in_kb",TP_SEC},
-{TOK_AUTOCLOSE,"AutoCloseWindow",1,0,"(false|true)",TP_GLOBAL},
-{TOK_BGFONT,"BGFont",0,6,"[font_face [height [wieght] [/ITALIC] [/UNDERLINE] [/STRIKE]]]",TP_GLOBAL},
-{TOK_BGGRADIENT,"BGGradient",0,3,"(off | [top_color [bottom_color [text_color]]])",TP_GLOBAL},
-{TOK_BRANDINGTEXT,"BrandingText",1,1,"[/TRIM(LEFT|RIGHT|CENTER)] installer_text",TP_GLOBAL},
-{TOK_BRINGTOFRONT,"BringToFront",0,0,"",TP_CODE},
-{TOK_CALL,"Call",1,0,"function_name | [:label_name]",TP_CODE},
-{TOK_CALLINSTDLL,"CallInstDLL",2,1,"dll_path_on_target.dll [/NOUNLOAD] function",TP_CODE},
-{TOK_CAPTION,"Caption",1,0,"installer_caption",TP_GLOBAL|TP_PAGEEX},
-{TOK_CHANGEUI,"ChangeUI",2,0,"(all|dlg_id) ui_file.exe",TP_GLOBAL},
-{TOK_CLEARERRORS,"ClearErrors",0,0,"",TP_CODE},
-{TOK_COMPTEXT,"ComponentText",0,3,"[component_page_description] [component_subtext1] [component_subtext2]",TP_PG},
-{TOK_GETDLLVERSION,"GetDLLVersion",3,0,"filename $(user_var: high output) $(user_var: low output)",TP_CODE},
-{TOK_GETDLLVERSIONLOCAL,"GetDLLVersionLocal",3,0,"localfilename $(user_var: high output) $(user_var: low output)",TP_CODE},
-{TOK_GETFILETIME,"GetFileTime",3,0,"file $(user_var: high output) $(user_var: low output)",TP_CODE},
-{TOK_GETFILETIMELOCAL,"GetFileTimeLocal",3,0,"localfile $(user_var: high output) $(user_var: low output)",TP_CODE},
-{TOK_COPYFILES,"CopyFiles",2,3,"[/SILENT] [/FILESONLY] source_path destination_path [total_size_in_kb]",TP_CODE},
-{TOK_CRCCHECK,"CRCCheck",1,0,"(on|force|off)",TP_GLOBAL},
-{TOK_CREATEDIR,"CreateDirectory",1,0,"directory_name",TP_CODE},
-{TOK_CREATEFONT,"CreateFont",2,5,"$(user_var: handle output) face_name [height wieght /ITALIC /UNDERLINE /STRIKE]",TP_CODE},
-{TOK_CREATESHORTCUT,"CreateShortCut",2,6,"shortcut_name.lnk shortcut_target [parameters [icon_file [icon index [showmode [hotkey [comment]]]]]]\n showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED)\n hotkey=(ALT|CONTROL|EXT|SHIFT)|(F1-F24|A-Z)",TP_CODE},
-{TOK_DBOPTIMIZE,"SetDatablockOptimize",1,0,"(off|on)",TP_ALL},
-{TOK_DELETEINISEC,"DeleteINISec",2,0,"ini_file section_name",TP_CODE},
-{TOK_DELETEINISTR,"DeleteINIStr",3,0,"ini_file section_name entry_name",TP_CODE},
-{TOK_DELETEREGKEY,"DeleteRegKey",2,1,"[/ifempty] root_key subkey\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_DELETEREGVALUE,"DeleteRegValue",3,0,"root_key subkey entry_name\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_DELETE,"Delete",1,1,"[/REBOOTOK] filespec",TP_CODE},
-{TOK_DETAILPRINT,"DetailPrint",1,0,"message",TP_CODE},
-{TOK_DIRTEXT,"DirText",0,4,"[directory_page_description] [directory_page_subtext] [browse_button_text] [browse_dlg_text]",TP_PG},
-//{TOK_DIRSHOW,"DirShow",1,0,"(show|hide)",TP_PG},
-{TOK_DIRSHOW,"DirShow",0,0,"doesn't currently work",TP_ALL},
-{TOK_DIRVAR,"DirVar",1,0,"$(user_var: dir in/out))",TP_PAGEEX},
-{TOK_DIRVERIFY,"DirVerify",1,0,"auto|leave",TP_PAGEEX},
-{TOK_GETINSTDIRERROR,"GetInstDirError",1,0,"$(user_var: error output)",TP_CODE},
-{TOK_ROOTDIRINST,"AllowRootDirInstall",1,0,"(true|false)",TP_GLOBAL},
-{TOK_CHECKBITMAP,"CheckBitmap",1,0,"local_bitmap.bmp",TP_GLOBAL},
-{TOK_ENABLEWINDOW,"EnableWindow",2,0,"hwnd (1|0)",TP_CODE},
-{TOK_ENUMREGKEY,"EnumRegKey",4,0,"$(user_var: output) rootkey subkey index\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_ENUMREGVAL,"EnumRegValue",4,0,"$(user_var: output) rootkey subkey index\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_EXCH,"Exch",0,1,"[$(user_var)] | [stack_item_index]",TP_CODE},
-{TOK_EXEC,"Exec",1,0,"command_line",TP_CODE},
-{TOK_EXECWAIT,"ExecWait",1,1,"command_line [$(user_var: return value)]",TP_CODE},
-{TOK_EXECSHELL,"ExecShell",2,2,"(open|print|etc) command_line [parameters [showmode]]\n showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_HIDE)",TP_CODE},
-{TOK_EXPANDENVSTRS,"ExpandEnvStrings",2,0,"$(user_var: output) string",TP_CODE},
-{TOK_FINDWINDOW,"FindWindow",2,3,"$(user_var: handle output) WindowClass [WindowTitle] [Window_Parent] [Child_After]",TP_CODE},
-{TOK_FINDCLOSE,"FindClose",1,0,"$(user_var: handle input)",TP_CODE},
-{TOK_FINDFIRST,"FindFirst",3,0,"$(user_var: handle output) $(user_var: filename output) filespec",TP_CODE},
-{TOK_FINDNEXT,"FindNext",2,0,"$(user_var: handle input) $(user_var: filename output)",TP_CODE},
-{TOK_FILE,"File",1,-1,"[/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |\n /oname=outfile one_file_only)",TP_CODE},
-{TOK_FILEBUFSIZE,"FileBufSize",1,0,"buf_size_mb",TP_ALL},
-{TOK_FLUSHINI,"FlushINI",1,0,"ini_file",TP_CODE},
-{TOK_RESERVEFILE,"ReserveFile",1,-1,"[/nonfatal] [/r] [/x filespec [...]] file [file...]",TP_ALL},
-{TOK_FILECLOSE,"FileClose",1,0,"$(user_var: handle input)",TP_CODE},
-{TOK_FILEERRORTEXT,"FileErrorText",0,2,"[text (can contain $0)] [text without ignore (can contain $0)]",TP_GLOBAL},
-{TOK_FILEOPEN,"FileOpen",3,0,"$(user_var: handle output) filename openmode\n openmode=r|w|a",TP_CODE},
-{TOK_FILEREAD,"FileRead",2,1,"$(user_var: handle input) $(user_var: text output) [maxlen]",TP_CODE},
-{TOK_FILEWRITE,"FileWrite",2,0,"$(user_var: handle input) text",TP_CODE},
-{TOK_FILEREADBYTE,"FileReadByte",2,0,"$(user_var: handle input) $(user_var: bytevalue output)",TP_CODE},
-{TOK_FILEWRITEBYTE,"FileWriteByte",2,0,"$(user_var: handle input) bytevalue",TP_CODE},
-{TOK_FILESEEK,"FileSeek",2,2,"$(user_var: handle input) offset [mode] [$(user_var: new position output)]\n mode=SET|CUR|END",TP_CODE},
-{TOK_FUNCTION,"Function",1,0,"function_name",TP_GLOBAL},
-{TOK_FUNCTIONEND,"FunctionEnd",0,0,"",TP_FUNC},
-{TOK_GETDLGITEM,"GetDlgItem",3,0,"$(user_var: handle output) dialog item_id",TP_CODE},
-{TOK_GETFULLPATHNAME,"GetFullPathName",2,1,"[/SHORT] $(user_var: result) path_or_file",TP_CODE},
-{TOK_GETTEMPFILENAME,"GetTempFileName",1,1,"$(user_var: name output) [base_dir]",TP_CODE},
-{TOK_HIDEWINDOW,"HideWindow",0,0,"",TP_CODE},
-{TOK_ICON,"Icon",1,0,"local_icon.ico",TP_GLOBAL},
-{TOK_IFABORT,"IfAbort",1,1,"label_to_goto_if_abort [label_to_goto_if_no_abort]",TP_CODE},
-{TOK_IFERRORS,"IfErrors",1,1,"label_to_goto_if_errors [label_to_goto_if_no_errors]",TP_CODE},
-{TOK_IFFILEEXISTS,"IfFileExists",2,1,"filename label_to_goto_if_file_exists [label_to_goto_otherwise]",TP_CODE},
-{TOK_IFREBOOTFLAG,"IfRebootFlag",1,1,"jump_if_set [jump_if_not_set]",TP_CODE},
-{TOK_IFSILENT,"IfSilent",1,1,"jump_if_silent [jump_if_not_silent]",TP_CODE},
-{TOK_INSTALLDIRREGKEY,"InstallDirRegKey",3,0,"root_key subkey entry_name\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)",TP_GLOBAL},
-{TOK_INSTCOLORS,"InstallColors",1,1,"(/windows | (foreground_color background_color))",TP_GLOBAL},
-{TOK_INSTDIR,"InstallDir",1,0,"default_install_directory",TP_GLOBAL},
-{TOK_INSTPROGRESSFLAGS,"InstProgressFlags",0,-1,"[flag [...]]\n flag={smooth|colored}",TP_GLOBAL},
-{TOK_INSTTYPE,"InstType",1,0,"[un.]install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM",TP_GLOBAL},
-{TOK_INTOP,"IntOp",3,1,"$(user_var: result) val1 OP [val2]\n OP=(+ - * / % | & ^ ~ ! || && << >>)",TP_CODE},
-{TOK_INTCMP,"IntCmp",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]",TP_CODE},
-{TOK_INTCMPU,"IntCmpU",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]",TP_CODE},
-{TOK_INTFMT,"IntFmt",3,0,"$(user_var: output) format_string input",TP_CODE},
-{TOK_ISWINDOW,"IsWindow",2,1,"hwnd jump_if_window [jump_if_not_window]",TP_CODE},
-{TOK_GOTO,"Goto",1,0,"label",TP_CODE},
-{TOK_LANGSTRING,"LangString",3,0,"[un.]name lang_id string",TP_GLOBAL},
-{TOK_LANGSTRINGUP,"LangStringUP",0,0,"obsolete, use LangString.",TP_ALL},
-{TOK_LICENSEDATA,"LicenseData",1,0,"local_file_that_has_license_text | license_lang_string",TP_PG},
-{TOK_LICENSEFORCESELECTION,"LicenseForceSelection",1,2,"(checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | off)",TP_PG},
-{TOK_LICENSELANGSTRING,"LicenseLangString",3,0,"name lang_id license_path",TP_GLOBAL},
-{TOK_LICENSETEXT,"LicenseText",1,1,"license_page_description [license_button_text]",TP_PG},
-{TOK_LICENSEBKCOLOR,"LicenseBkColor",1,0,"background_color",TP_GLOBAL},
-{TOK_LOADNLF,"LoadLanguageFile",1,0,"language.nlf",TP_GLOBAL},
-{TOK_LOGSET,"LogSet",1,0,"on|off",TP_CODE},
-{TOK_LOGTEXT,"LogText",1,0,"text",TP_CODE},
-{TOK_MESSAGEBOX,"MessageBox",2,6,"mode messagebox_text [/SD return] [return_check label_to_goto_if_equal [return_check2 label2]]\n mode=modeflag[|modeflag[|modeflag[...]]]\n "
- "modeflag=(MB_ABORTRETRYIGNORE|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_YESNO|MB_YESNOCANCEL|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_USERICON|MB_TOPMOST|MB_SETFOREGROUND|MB_RIGHT",TP_CODE},
-{TOK_NOP,"Nop",0,0,"",TP_CODE},
-{TOK_NAME,"Name",1,1,"installer_name installer_name_doubled_ampersands",TP_GLOBAL},
-{TOK_OUTFILE,"OutFile",1,0,"install_output.exe",TP_GLOBAL},
-#ifdef NSIS_SUPPORT_CODECALLBACKS
-{TOK_PAGE,"Page",1,4,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles|uninstConfirm) [pre_function] [show_function] [leave_function])) [/ENABLECANCEL]",TP_GLOBAL},
-#else
-{TOK_PAGE,"Page",1,1,"license|components|directory|instfiles|uninstConfirm [/ENABLECANCEL]",TP_GLOBAL},
-#endif
-{TOK_PAGECALLBACKS,"PageCallbacks",0,3,"([creator_function] [leave_function]) | ([pre_function] [show_function] [leave_function])",TP_PAGEEX},
-{TOK_PAGEEX,"PageEx",1,0,"[un.](custom|uninstConfirm|license|components|directory|instfiles)",TP_GLOBAL},
-{TOK_PAGEEXEND,"PageExEnd",0,0,"",TP_PAGEEX},
-{TOK_POP,"Pop",1,0,"$(user_var: output)",TP_CODE},
-{TOK_PUSH,"Push",1,0,"string",TP_CODE},
-{TOK_QUIT,"Quit",0,0,"",TP_CODE},
-{TOK_READINISTR,"ReadINIStr",4,0,"$(user_var: output) ini_file section entry_name",TP_CODE},
-{TOK_READREGDWORD,"ReadRegDWORD",4,0,"$(user_var: output) rootkey subkey entry\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_READREGSTR,"ReadRegStr",4,0,"$(user_var: output) rootkey subkey entry\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_READENVSTR,"ReadEnvStr",2,0,"$(user_var: output) name",TP_CODE},
-{TOK_REBOOT,"Reboot",0,0,"",TP_CODE},
-{TOK_REGDLL,"RegDLL",1,1,"dll_path_on_target.dll [entrypoint_symbol]",TP_CODE},
-{TOK_RENAME,"Rename",2,1,"[/REBOOTOK] source_file destination_file",TP_CODE},
-{TOK_RET,"Return",0,0,"",TP_CODE},
-{TOK_RMDIR,"RMDir",1,2,"[/r] [/REBOOTOK] directory_name",TP_CODE},
-{TOK_SECTION,"Section",0,3,"[/o] [-][un.][section_name] [section index output]",TP_GLOBAL},
-{TOK_SECTIONEND,"SectionEnd",0,0,"",TP_SEC},
-{TOK_SECTIONIN,"SectionIn",1,-1,"InstTypeIdx [InstTypeIdx [...]]",TP_SEC},
-{TOK_SUBSECTION,"SubSection",1,2,"deprecated - use SectionGroup",TP_GLOBAL},
-{TOK_SECTIONGROUP,"SectionGroup",1,2,"[/e] [un.]section_group_name [section index output]",TP_GLOBAL},
-{TOK_SUBSECTIONEND,"SubSectionEnd",0,0,"deprecated - use SectionGroupEnd",TP_GLOBAL},
-{TOK_SECTIONGROUPEND,"SectionGroupEnd",0,0,"",TP_GLOBAL},
-{TOK_SEARCHPATH,"SearchPath",2,0,"$(user_var: result) filename",TP_CODE},
-{TOK_SECTIONSETFLAGS,"SectionSetFlags",2,0,"section_index flags",TP_CODE},
-{TOK_SECTIONGETFLAGS,"SectionGetFlags",2,0,"section_index $(user_var: output flags)",TP_CODE},
-{TOK_SECTIONSETINSTTYPES,"SectionSetInstTypes",2,0,"section_index inst_types",TP_CODE},
-{TOK_SECTIONGETINSTTYPES,"SectionGetInstTypes",2,0,"section_index $(user_var: output inst_types)",TP_CODE},
-{TOK_SECTIONGETTEXT,"SectionGetText",2,0,"section_index $(user_var: output text)",TP_CODE},
-{TOK_SECTIONSETTEXT,"SectionSetText",2,0,"section_index text_string",TP_CODE},
-{TOK_SECTIONGETSIZE,"SectionGetSize",2,0,"section_index $(user_var: output size)",TP_CODE},
-{TOK_SECTIONSETSIZE,"SectionSetSize",2,0,"section_index new_size",TP_CODE},
-{TOK_GETCURINSTTYPE,"GetCurInstType",1,0,"$(user_var: output inst_type_idx)",TP_CODE},
-{TOK_SETCURINSTTYPE,"SetCurInstType",1,0,"inst_type_idx",TP_CODE},
-{TOK_INSTTYPESETTEXT,"InstTypeSetText",2,0,"insttype_index flags",TP_CODE},
-{TOK_INSTTYPEGETTEXT,"InstTypeGetText",2,0,"insttype_index $(user_var: output flags)",TP_CODE},
-{TOK_SENDMESSAGE,"SendMessage",4,2,"hwnd message [wparam|STR:wParam] [lparam|STR:lParam] [$(user_var: return value)] [/TIMEOUT=X]",TP_CODE},
-{TOK_SETAUTOCLOSE,"SetAutoClose",1,0,"(false|true)",TP_CODE},
-{TOK_SETCTLCOLORS,"SetCtlColors",2,2,"hwnd [/BRANDING] [text_color] [transparent|bg_color]",TP_CODE},
-{TOK_SETBRANDINGIMAGE,"SetBrandingImage",1,2,"[/IMGID=image_item_id_in_dialog] [/RESIZETOFIT] bitmap.bmp",TP_CODE},
-{TOK_SETCOMPRESS,"SetCompress",1,0,"(off|auto|force)",TP_ALL},
-{TOK_SETCOMPRESSOR,"SetCompressor",1,2,"[/FINAL] [/SOLID] (zlib|bzip2|lzma)",TP_GLOBAL},
-{TOK_SETCOMPRESSORDICTSIZE,"SetCompressorDictSize",1,0,"dict_size_mb",TP_ALL},
-{TOK_SETCOMPRESSIONLEVEL,"SetCompressionLevel",1,0,"level_0-9",TP_ALL},
-{TOK_SETDATESAVE,"SetDateSave",1,0,"(off|on)",TP_ALL},
-{TOK_SETDETAILSVIEW,"SetDetailsView",1,0,"(hide|show)",TP_CODE},
-{TOK_SETDETAILSPRINT,"SetDetailsPrint",1,0,"(none|listonly|textonly|both)",TP_CODE},
-{TOK_SETERRORS,"SetErrors",0,0,"",TP_CODE},
-{TOK_SETERRORLEVEL,"SetErrorLevel",1,0,"error_level",TP_CODE},
-{TOK_GETERRORLEVEL,"GetErrorLevel",1,0,"$(user_var: output)",TP_CODE},
-{TOK_SETFILEATTRIBUTES,"SetFileAttributes",2,0,"file attribute[|attribute[...]]\n attribute=(NORMAL|ARCHIVE|HIDDEN|OFFLINE|READONLY|SYSTEM|TEMPORARY|0)",TP_CODE},
-{TOK_SETFONT,"SetFont",2,1,"[/LANG=lang_id] font_face_name font_size",TP_GLOBAL},
-{TOK_SETOUTPATH,"SetOutPath",1,0,"output_path",TP_CODE},
-{TOK_SETOVERWRITE,"SetOverwrite",1,0,"on|off|try|ifnewer|ifdiff",TP_ALL},
-{TOK_SETPLUGINUNLOAD,"SetPluginUnload",1,0,"(manual|alwaysoff)",TP_ALL},
-{TOK_SETREBOOTFLAG,"SetRebootFlag",1,0,"true|false",TP_CODE},
-{TOK_SETREGVIEW,"SetRegView",1,0,"32|64|lastused",TP_CODE},
-{TOK_SETSHELLVARCONTEXT,"SetShellVarContext",1,0,"all|current",TP_CODE},
-{TOK_SETSILENT,"SetSilent",1,0,"silent|normal",TP_CODE},
-{TOK_SHOWDETAILS,"ShowInstDetails",1,0,"(hide|show|nevershow)",TP_GLOBAL},
-{TOK_SHOWDETAILSUNINST,"ShowUninstDetails",1,0,"(hide|show|nevershow)",TP_GLOBAL},
-{TOK_SHOWWINDOW,"ShowWindow",2,0,"hwnd show_state",TP_CODE},
-{TOK_SILENTINST,"SilentInstall",1,0,"(normal|silent|silentlog)",TP_GLOBAL},
-{TOK_SILENTUNINST,"SilentUnInstall",1,0,"(normal|silent)",TP_GLOBAL},
-{TOK_SLEEP,"Sleep",1,0,"sleep_time_in_ms",TP_CODE},
-{TOK_STRCMP,"StrCmp",3,1,"str1 str2 label_to_goto_if_equal [label_to_goto_if_not]",TP_CODE},
-{TOK_STRCMPS,"StrCmpS",3,1,"str1 str2 label_to_goto_if_equal [label_to_goto_if_not]",TP_CODE},
-{TOK_STRCPY,"StrCpy",2,2,"$(user_var: output) str [maxlen] [startoffset]",TP_CODE},
-{TOK_STRLEN,"StrLen",2,0,"$(user_var: length output) str",TP_CODE},
-{TOK_SUBCAPTION,"SubCaption",2,0,"page_number(0-4) new_subcaption",TP_GLOBAL},
-{TOK_UNINSTALLEXENAME,"UninstallExeName",0,0,"no longer supported, use WriteUninstaller from section.",TP_ALL},
-{TOK_UNINSTCAPTION,"UninstallCaption",1,0,"uninstaller_caption",TP_GLOBAL},
-{TOK_UNINSTICON,"UninstallIcon",1,0,"icon_on_local_system.ico",TP_GLOBAL},
-#ifdef NSIS_SUPPORT_CODECALLBACKS
-{TOK_UNINSTPAGE,"UninstPage",1,4,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles|uninstConfirm) [pre_function] [show_function] [leave_function])) [/ENABLECANCEL]",TP_GLOBAL},
-#else
-{TOK_UNINSTPAGE,"UninstPage",1,1,"license|components|directory|instfiles|uninstConfirm [/ENABLECANCEL]",TP_GLOBAL},
-#endif
-{TOK_UNINSTTEXT,"UninstallText",1,1,"Text_to_go_on_uninstall_page [subtext]",TP_PG},
-{TOK_UNINSTSUBCAPTION,"UninstallSubCaption",2,0,"page_number(0-2) new_subcaption",TP_GLOBAL},
-{TOK_UNREGDLL,"UnRegDLL",1,0,"dll_path_on_target.dll",TP_CODE},
-{TOK_WINDOWICON,"WindowIcon",1,0,"on|off",TP_GLOBAL},
-{TOK_WRITEINISTR,"WriteINIStr",4,0,"ini_file section_name entry_name new_value",TP_CODE},
-{TOK_WRITEREGBIN,"WriteRegBin",4,0,"rootkey subkey entry_name hex_string_like_12848412AB\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_WRITEREGDWORD,"WriteRegDWORD",4,0,"rootkey subkey entry_name new_value_dword\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_WRITEREGSTR,"WriteRegStr",4,0,"rootkey subkey entry_name new_value_string\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_WRITEREGEXPANDSTR,"WriteRegExpandStr",4,0,"rootkey subkey entry_name new_value_string\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
-{TOK_WRITEUNINSTALLER,"WriteUninstaller",1,0,"uninstall_exe_name",TP_CODE},
-{TOK_XPSTYLE, "XPStyle",1,0,"(on|off)",TP_GLOBAL},
-{TOK_REQEXECLEVEL, "RequestExecutionLevel",1,0,"none|user|highest|admin",TP_GLOBAL},
-{TOK_P_PACKEXEHEADER,"!packhdr",2,0,"temp_file_name command_line_to_compress_that_temp_file",TP_ALL},
-{TOK_P_SYSTEMEXEC,"!system",1,2,"command [<|>|<>|=) retval]",TP_ALL},
-{TOK_P_EXECUTE,"!execute",1,0,"command",TP_ALL},
-{TOK_P_ADDINCLUDEDIR,"!AddIncludeDir",1,0,"dir",TP_ALL},
-{TOK_P_INCLUDE,"!include",1,1,"[/NONFATAL] filename.nsh",TP_ALL},
-{TOK_P_CD,"!cd",1,0,"absolute_or_relative_new_directory",TP_ALL},
-{TOK_P_IF,"!if",1,3,"[!] value [(==,!=,<=,<,>,>=,&&,||) value2] [...]",TP_ALL},
-{TOK_P_IFDEF,"!ifdef",1,-1,"symbol [| symbol2 [& symbol3 [...]]]",TP_ALL},
-{TOK_P_IFNDEF,"!ifndef",1,-1,"symbol [| symbol2 [& symbol3 [...]]]",TP_ALL},
-{TOK_P_ENDIF,"!endif",0,0,"",TP_ALL},
-{TOK_P_DEFINE,"!define",1,4,"([/date|/utcdate] symbol [value]) | (/math symbol val1 OP val2)\n OP=(+ - * / % & | ^)",TP_ALL},
-{TOK_P_UNDEF,"!undef",1,1,"symbol [value]",TP_ALL},
-{TOK_P_ELSE,"!else",0,-1,"[if[macro][n][def] ...]",TP_ALL},
-{TOK_P_ECHO,"!echo",1,0,"message",TP_ALL},
-{TOK_P_WARNING,"!warning",0,1,"[warning_message]",TP_ALL},
-{TOK_P_ERROR,"!error",0,1,"[error_message]",TP_ALL},
-
-{TOK_P_VERBOSE,"!verbose",1,0,"verbose_level | push | pop",TP_ALL},
-
-{TOK_P_MACRO,"!macro",1,-1,"macroname [parms ...]",TP_ALL},
-{TOK_P_MACROEND,"!macroend",0,0,"",TP_ALL},
-{TOK_P_INSERTMACRO,"!insertmacro",1,-1,"macroname [parms ...]",TP_ALL},
-{TOK_P_IFMACRODEF,"!ifmacrodef",1,-1,"macro [| macro2 [& macro3 [...]]]",TP_ALL},
-{TOK_P_IFMACRONDEF,"!ifmacrondef",1,-1,"macro [| macro2 [& macro3 [...]]]",TP_ALL},
-
-{TOK_P_TEMPFILE,"!tempfile",1,0,"symbol",TP_ALL},
-{TOK_P_DELFILE,"!delfile",1,0,"file",TP_ALL},
-{TOK_P_APPENDFILE,"!appendfile",2,0,"file appended_line",TP_ALL},
-
-{TOK_MISCBUTTONTEXT,"MiscButtonText",0,4,"[back button text] [next button text] [cancel button text] [close button text]",TP_GLOBAL},
-{TOK_DETAILSBUTTONTEXT,"DetailsButtonText",0,1,"[details button text]",TP_PG},
-{TOK_UNINSTBUTTONTEXT,"UninstallButtonText",0,1,"[uninstall button text]",TP_GLOBAL},
-{TOK_INSTBUTTONTEXT,"InstallButtonText",0,1,"[install button text]",TP_GLOBAL},
-{TOK_SPACETEXTS,"SpaceTexts",0,2,"none | ([space required text] [space available text])",TP_GLOBAL},
-{TOK_COMPLETEDTEXT,"CompletedText",0,1,"[completed text]",TP_PG},
-
-{TOK_GETFUNCTIONADDR,"GetFunctionAddress",2,0,"output function",TP_CODE},
-{TOK_GETLABELADDR,"GetLabelAddress",2,0,"output label",TP_CODE},
-{TOK_GETCURRENTADDR,"GetCurrentAddress",1,0,"output",TP_CODE},
-
-{TOK_PLUGINDIR,"!AddPluginDir",1,0,"new_plugin_directory",TP_ALL},
-{TOK_INITPLUGINSDIR,"InitPluginsDir",0,0,"",TP_CODE},
-// Added by ramon 23 May 2003
-{TOK_ALLOWSKIPFILES,"AllowSkipFiles",1,0,"(off|on)",TP_ALL},
-// Added by ramon 3 jun 2003
-{TOK_DEFVAR,"Var",1,1,"[/GLOBAL] var_name",TP_ALL},
-// Added by ramon 6 jun 2003
-{TOK_VI_ADDKEY,"VIAddVersionKey",2,1,"/LANG=lang_id keyname value",TP_GLOBAL},
-{TOK_VI_SETPRODUCTVERSION,"VIProductVersion",1,0,"[version_string_X.X.X.X]",TP_GLOBAL},
-{TOK_LOCKWINDOW,"LockWindow",1,0,"(on|off)",TP_CODE},
-};
-
-void CEXEBuild::print_help(char *commandname)
-{
- int x;
- for (x = 0; x < TOK__LAST; x ++)
- {
- if (!commandname || !stricmp(tokenlist[x].name,commandname))
- {
- ERROR_MSG("%s%s %s\n",commandname?"Usage: ":"",tokenlist[x].name,tokenlist[x].usage_str);
- if (commandname) break;
- }
- }
- if (x == TOK__LAST && commandname)
- {
- ERROR_MSG("Invalid command \"%s\"\n",commandname);
- }
-
-}
-
-bool CEXEBuild::is_valid_token(char *s)
-{
- for (int x = 0; x < TOK__LAST; x ++)
- if (!stricmp(tokenlist[x].name,s))
- return true;
- return false;
-}
-
-int CEXEBuild::get_commandtoken(char *s, int *np, int *op, int *pos)
-{
- int x;
- for (x = 0; x < TOK__LAST; x ++)
- if (!stricmp(tokenlist[x].name,s))
- {
- *np=tokenlist[x].num_parms;
- *op=tokenlist[x].opt_parms;
- *pos=x;
- return tokenlist[x].id;
- }
- return -1;
-}
-
-int CEXEBuild::GetCurrentTokenPlace()
-{
- if (build_cursection)
- {
- if (build_cursection_isfunc)
- {
- return TP_FUNC;
- }
- else
- {
- return TP_SEC;
- }
- }
-
- if (cur_page)
- return TP_PAGEEX;
-
- return TP_GLOBAL;
-}
-
-int CEXEBuild::IsTokenPlacedRight(int pos, char *tok)
-{
- if ((unsigned int) pos > (sizeof(tokenlist) / sizeof(tokenType)))
- return PS_OK;
-
- int tp = tokenlist[pos].placement;
- int cp = GetCurrentTokenPlace();
- if (tp & cp) {
- return PS_OK;
- }
- else {
- char err[1024];
- if (cp == TP_SEC) {
- strcpy(err, "Error: command %s not valid in Section\n");
- }
- else if (cp == TP_FUNC) {
- strcpy(err, "Error: command %s not valid in Function\n");
- }
- else if (cp == TP_PAGEEX) {
- strcpy(err, "Error: command %s not valid in PageEx\n");
- }
- else
- {
- strcpy(err, "Error: command %s not valid outside ");
- if (tp & TP_SEC)
- strcat(err, "Section");
- if (tp & TP_FUNC)
- {
- if (tp & TP_SEC)
- {
- if (tp & TP_PAGEEX)
- {
- strcat(err, ", ");
- }
- else
- {
- strcat(err, " or ");
- }
- }
- strcat(err, "Function");
- }
- if (tp & TP_PAGEEX)
- {
- if (tp & TP_CODE)
- {
- strcat(err, " or ");
- }
- strcat(err, "PageEx");
- }
- strcat(err, "\n");
- }
- ERROR_MSG(err, tok);
- return PS_ERROR;
- }
-}
+/*
+ * tokens.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "build.h"
+#include "tokens.h"
+
+typedef struct
+{
+ int id;
+ char *name;
+ int num_parms; // minimum number of parameters
+ int opt_parms; // optional parmaters, usually 0, can be -1 for unlimited.
+ char *usage_str;
+ int placement; // where the token can be placed
+} tokenType;
+
+
+static tokenType tokenlist[TOK__LAST] =
+{
+{TOK_ABORT,"Abort",0,1,"[message]",TP_CODE},
+{TOK_ADDBRANDINGIMAGE,"AddBrandingImage",2,1,"(top|left|bottom|right) (height|width) [padding]",TP_GLOBAL},
+{TOK_ADDSIZE,"AddSize",1,0,"size_to_add_to_section_in_kb",TP_SEC},
+{TOK_AUTOCLOSE,"AutoCloseWindow",1,0,"(false|true)",TP_GLOBAL},
+{TOK_BGFONT,"BGFont",0,6,"[font_face [height [wieght] [/ITALIC] [/UNDERLINE] [/STRIKE]]]",TP_GLOBAL},
+{TOK_BGGRADIENT,"BGGradient",0,3,"(off | [top_color [bottom_color [text_color]]])",TP_GLOBAL},
+{TOK_BRANDINGTEXT,"BrandingText",1,1,"[/TRIM(LEFT|RIGHT|CENTER)] installer_text",TP_GLOBAL},
+{TOK_BRINGTOFRONT,"BringToFront",0,0,"",TP_CODE},
+{TOK_CALL,"Call",1,0,"function_name | [:label_name]",TP_CODE},
+{TOK_CALLINSTDLL,"CallInstDLL",2,1,"dll_path_on_target.dll [/NOUNLOAD] function",TP_CODE},
+{TOK_CAPTION,"Caption",1,0,"installer_caption",TP_GLOBAL|TP_PAGEEX},
+{TOK_CHANGEUI,"ChangeUI",2,0,"(all|dlg_id) ui_file.exe",TP_GLOBAL},
+{TOK_CLEARERRORS,"ClearErrors",0,0,"",TP_CODE},
+{TOK_COMPTEXT,"ComponentText",0,3,"[component_page_description] [component_subtext1] [component_subtext2]",TP_PG},
+{TOK_GETDLLVERSION,"GetDLLVersion",3,0,"filename $(user_var: high output) $(user_var: low output)",TP_CODE},
+{TOK_GETDLLVERSIONLOCAL,"GetDLLVersionLocal",3,0,"localfilename $(user_var: high output) $(user_var: low output)",TP_CODE},
+{TOK_GETFILETIME,"GetFileTime",3,0,"file $(user_var: high output) $(user_var: low output)",TP_CODE},
+{TOK_GETFILETIMELOCAL,"GetFileTimeLocal",3,0,"localfile $(user_var: high output) $(user_var: low output)",TP_CODE},
+{TOK_COPYFILES,"CopyFiles",2,3,"[/SILENT] [/FILESONLY] source_path destination_path [total_size_in_kb]",TP_CODE},
+{TOK_CRCCHECK,"CRCCheck",1,0,"(on|force|off)",TP_GLOBAL},
+{TOK_CREATEDIR,"CreateDirectory",1,0,"directory_name",TP_CODE},
+{TOK_CREATEFONT,"CreateFont",2,5,"$(user_var: handle output) face_name [height wieght /ITALIC /UNDERLINE /STRIKE]",TP_CODE},
+{TOK_CREATESHORTCUT,"CreateShortCut",2,6,"shortcut_name.lnk shortcut_target [parameters [icon_file [icon index [showmode [hotkey [comment]]]]]]\n showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED)\n hotkey=(ALT|CONTROL|EXT|SHIFT)|(F1-F24|A-Z)",TP_CODE},
+{TOK_DBOPTIMIZE,"SetDatablockOptimize",1,0,"(off|on)",TP_ALL},
+{TOK_DELETEINISEC,"DeleteINISec",2,0,"ini_file section_name",TP_CODE},
+{TOK_DELETEINISTR,"DeleteINIStr",3,0,"ini_file section_name entry_name",TP_CODE},
+{TOK_DELETEREGKEY,"DeleteRegKey",2,1,"[/ifempty] root_key subkey\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_DELETEREGVALUE,"DeleteRegValue",3,0,"root_key subkey entry_name\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_DELETE,"Delete",1,1,"[/REBOOTOK] filespec",TP_CODE},
+{TOK_DETAILPRINT,"DetailPrint",1,0,"message",TP_CODE},
+{TOK_DIRTEXT,"DirText",0,4,"[directory_page_description] [directory_page_subtext] [browse_button_text] [browse_dlg_text]",TP_PG},
+//{TOK_DIRSHOW,"DirShow",1,0,"(show|hide)",TP_PG},
+{TOK_DIRSHOW,"DirShow",0,0,"doesn't currently work",TP_ALL},
+{TOK_DIRVAR,"DirVar",1,0,"$(user_var: dir in/out))",TP_PAGEEX},
+{TOK_DIRVERIFY,"DirVerify",1,0,"auto|leave",TP_PAGEEX},
+{TOK_GETINSTDIRERROR,"GetInstDirError",1,0,"$(user_var: error output)",TP_CODE},
+{TOK_ROOTDIRINST,"AllowRootDirInstall",1,0,"(true|false)",TP_GLOBAL},
+{TOK_CHECKBITMAP,"CheckBitmap",1,0,"local_bitmap.bmp",TP_GLOBAL},
+{TOK_ENABLEWINDOW,"EnableWindow",2,0,"hwnd (1|0)",TP_CODE},
+{TOK_ENUMREGKEY,"EnumRegKey",4,0,"$(user_var: output) rootkey subkey index\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_ENUMREGVAL,"EnumRegValue",4,0,"$(user_var: output) rootkey subkey index\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_EXCH,"Exch",0,1,"[$(user_var)] | [stack_item_index]",TP_CODE},
+{TOK_EXEC,"Exec",1,0,"command_line",TP_CODE},
+{TOK_EXECWAIT,"ExecWait",1,1,"command_line [$(user_var: return value)]",TP_CODE},
+{TOK_EXECSHELL,"ExecShell",2,2,"(open|print|etc) command_line [parameters [showmode]]\n showmode=(SW_SHOWNORMAL|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_HIDE)",TP_CODE},
+{TOK_EXPANDENVSTRS,"ExpandEnvStrings",2,0,"$(user_var: output) string",TP_CODE},
+{TOK_FINDWINDOW,"FindWindow",2,3,"$(user_var: handle output) WindowClass [WindowTitle] [Window_Parent] [Child_After]",TP_CODE},
+{TOK_FINDCLOSE,"FindClose",1,0,"$(user_var: handle input)",TP_CODE},
+{TOK_FINDFIRST,"FindFirst",3,0,"$(user_var: handle output) $(user_var: filename output) filespec",TP_CODE},
+{TOK_FINDNEXT,"FindNext",2,0,"$(user_var: handle input) $(user_var: filename output)",TP_CODE},
+{TOK_FILE,"File",1,-1,"[/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |\n /oname=outfile one_file_only)",TP_CODE},
+{TOK_FILEBUFSIZE,"FileBufSize",1,0,"buf_size_mb",TP_ALL},
+{TOK_FLUSHINI,"FlushINI",1,0,"ini_file",TP_CODE},
+{TOK_RESERVEFILE,"ReserveFile",1,-1,"[/nonfatal] [/r] [/x filespec [...]] file [file...]",TP_ALL},
+{TOK_FILECLOSE,"FileClose",1,0,"$(user_var: handle input)",TP_CODE},
+{TOK_FILEERRORTEXT,"FileErrorText",0,2,"[text (can contain $0)] [text without ignore (can contain $0)]",TP_GLOBAL},
+{TOK_FILEOPEN,"FileOpen",3,0,"$(user_var: handle output) filename openmode\n openmode=r|w|a",TP_CODE},
+{TOK_FILEREAD,"FileRead",2,1,"$(user_var: handle input) $(user_var: text output) [maxlen]",TP_CODE},
+{TOK_FILEWRITE,"FileWrite",2,0,"$(user_var: handle input) text",TP_CODE},
+{TOK_FILEREADBYTE,"FileReadByte",2,0,"$(user_var: handle input) $(user_var: bytevalue output)",TP_CODE},
+{TOK_FILEWRITEBYTE,"FileWriteByte",2,0,"$(user_var: handle input) bytevalue",TP_CODE},
+{TOK_FILESEEK,"FileSeek",2,2,"$(user_var: handle input) offset [mode] [$(user_var: new position output)]\n mode=SET|CUR|END",TP_CODE},
+{TOK_FUNCTION,"Function",1,0,"function_name",TP_GLOBAL},
+{TOK_FUNCTIONEND,"FunctionEnd",0,0,"",TP_FUNC},
+{TOK_GETDLGITEM,"GetDlgItem",3,0,"$(user_var: handle output) dialog item_id",TP_CODE},
+{TOK_GETFULLPATHNAME,"GetFullPathName",2,1,"[/SHORT] $(user_var: result) path_or_file",TP_CODE},
+{TOK_GETTEMPFILENAME,"GetTempFileName",1,1,"$(user_var: name output) [base_dir]",TP_CODE},
+{TOK_HIDEWINDOW,"HideWindow",0,0,"",TP_CODE},
+{TOK_ICON,"Icon",1,0,"local_icon.ico",TP_GLOBAL},
+{TOK_IFABORT,"IfAbort",1,1,"label_to_goto_if_abort [label_to_goto_if_no_abort]",TP_CODE},
+{TOK_IFERRORS,"IfErrors",1,1,"label_to_goto_if_errors [label_to_goto_if_no_errors]",TP_CODE},
+{TOK_IFFILEEXISTS,"IfFileExists",2,1,"filename label_to_goto_if_file_exists [label_to_goto_otherwise]",TP_CODE},
+{TOK_IFREBOOTFLAG,"IfRebootFlag",1,1,"jump_if_set [jump_if_not_set]",TP_CODE},
+{TOK_IFSILENT,"IfSilent",1,1,"jump_if_silent [jump_if_not_silent]",TP_CODE},
+{TOK_INSTALLDIRREGKEY,"InstallDirRegKey",3,0,"root_key subkey entry_name\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)",TP_GLOBAL},
+{TOK_INSTCOLORS,"InstallColors",1,1,"(/windows | (foreground_color background_color))",TP_GLOBAL},
+{TOK_INSTDIR,"InstallDir",1,0,"default_install_directory",TP_GLOBAL},
+{TOK_INSTPROGRESSFLAGS,"InstProgressFlags",0,-1,"[flag [...]]\n flag={smooth|colored}",TP_GLOBAL},
+{TOK_INSTTYPE,"InstType",1,0,"[un.]install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM",TP_GLOBAL},
+{TOK_INTOP,"IntOp",3,1,"$(user_var: result) val1 OP [val2]\n OP=(+ - * / % | & ^ ~ ! || && << >>)",TP_CODE},
+{TOK_INTCMP,"IntCmp",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]",TP_CODE},
+{TOK_INTCMPU,"IntCmpU",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]",TP_CODE},
+{TOK_INTFMT,"IntFmt",3,0,"$(user_var: output) format_string input",TP_CODE},
+{TOK_ISWINDOW,"IsWindow",2,1,"hwnd jump_if_window [jump_if_not_window]",TP_CODE},
+{TOK_GOTO,"Goto",1,0,"label",TP_CODE},
+{TOK_LANGSTRING,"LangString",3,0,"[un.]name lang_id string",TP_GLOBAL},
+{TOK_LANGSTRINGUP,"LangStringUP",0,0,"obsolete, use LangString.",TP_ALL},
+{TOK_LICENSEDATA,"LicenseData",1,0,"local_file_that_has_license_text | license_lang_string",TP_PG},
+{TOK_LICENSEFORCESELECTION,"LicenseForceSelection",1,2,"(checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | off)",TP_PG},
+{TOK_LICENSELANGSTRING,"LicenseLangString",3,0,"name lang_id license_path",TP_GLOBAL},
+{TOK_LICENSETEXT,"LicenseText",1,1,"license_page_description [license_button_text]",TP_PG},
+{TOK_LICENSEBKCOLOR,"LicenseBkColor",1,0,"background_color",TP_GLOBAL},
+{TOK_LOADNLF,"LoadLanguageFile",1,0,"language.nlf",TP_GLOBAL},
+{TOK_LOGSET,"LogSet",1,0,"on|off",TP_CODE},
+{TOK_LOGTEXT,"LogText",1,0,"text",TP_CODE},
+{TOK_MESSAGEBOX,"MessageBox",2,6,"mode messagebox_text [/SD return] [return_check label_to_goto_if_equal [return_check2 label2]]\n mode=modeflag[|modeflag[|modeflag[...]]]\n "
+ "modeflag=(MB_ABORTRETRYIGNORE|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_YESNO|MB_YESNOCANCEL|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_USERICON|MB_TOPMOST|MB_SETFOREGROUND|MB_RIGHT",TP_CODE},
+{TOK_NOP,"Nop",0,0,"",TP_CODE},
+{TOK_NAME,"Name",1,1,"installer_name installer_name_doubled_ampersands",TP_GLOBAL},
+{TOK_OUTFILE,"OutFile",1,0,"install_output.exe",TP_GLOBAL},
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+{TOK_PAGE,"Page",1,4,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles|uninstConfirm) [pre_function] [show_function] [leave_function])) [/ENABLECANCEL]",TP_GLOBAL},
+#else
+{TOK_PAGE,"Page",1,1,"license|components|directory|instfiles|uninstConfirm [/ENABLECANCEL]",TP_GLOBAL},
+#endif
+{TOK_PAGECALLBACKS,"PageCallbacks",0,3,"([creator_function] [leave_function]) | ([pre_function] [show_function] [leave_function])",TP_PAGEEX},
+{TOK_PAGEEX,"PageEx",1,0,"[un.](custom|uninstConfirm|license|components|directory|instfiles)",TP_GLOBAL},
+{TOK_PAGEEXEND,"PageExEnd",0,0,"",TP_PAGEEX},
+{TOK_POP,"Pop",1,0,"$(user_var: output)",TP_CODE},
+{TOK_PUSH,"Push",1,0,"string",TP_CODE},
+{TOK_QUIT,"Quit",0,0,"",TP_CODE},
+{TOK_READINISTR,"ReadINIStr",4,0,"$(user_var: output) ini_file section entry_name",TP_CODE},
+{TOK_READREGDWORD,"ReadRegDWORD",4,0,"$(user_var: output) rootkey subkey entry\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_READREGSTR,"ReadRegStr",4,0,"$(user_var: output) rootkey subkey entry\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_READENVSTR,"ReadEnvStr",2,0,"$(user_var: output) name",TP_CODE},
+{TOK_REBOOT,"Reboot",0,0,"",TP_CODE},
+{TOK_REGDLL,"RegDLL",1,1,"dll_path_on_target.dll [entrypoint_symbol]",TP_CODE},
+{TOK_RENAME,"Rename",2,1,"[/REBOOTOK] source_file destination_file",TP_CODE},
+{TOK_RET,"Return",0,0,"",TP_CODE},
+{TOK_RMDIR,"RMDir",1,2,"[/r] [/REBOOTOK] directory_name",TP_CODE},
+{TOK_SECTION,"Section",0,3,"[/o] [-][un.][section_name] [section index output]",TP_GLOBAL},
+{TOK_SECTIONEND,"SectionEnd",0,0,"",TP_SEC},
+{TOK_SECTIONIN,"SectionIn",1,-1,"InstTypeIdx [InstTypeIdx [...]]",TP_SEC},
+{TOK_SUBSECTION,"SubSection",1,2,"deprecated - use SectionGroup",TP_GLOBAL},
+{TOK_SECTIONGROUP,"SectionGroup",1,2,"[/e] [un.]section_group_name [section index output]",TP_GLOBAL},
+{TOK_SUBSECTIONEND,"SubSectionEnd",0,0,"deprecated - use SectionGroupEnd",TP_GLOBAL},
+{TOK_SECTIONGROUPEND,"SectionGroupEnd",0,0,"",TP_GLOBAL},
+{TOK_SEARCHPATH,"SearchPath",2,0,"$(user_var: result) filename",TP_CODE},
+{TOK_SECTIONSETFLAGS,"SectionSetFlags",2,0,"section_index flags",TP_CODE},
+{TOK_SECTIONGETFLAGS,"SectionGetFlags",2,0,"section_index $(user_var: output flags)",TP_CODE},
+{TOK_SECTIONSETINSTTYPES,"SectionSetInstTypes",2,0,"section_index inst_types",TP_CODE},
+{TOK_SECTIONGETINSTTYPES,"SectionGetInstTypes",2,0,"section_index $(user_var: output inst_types)",TP_CODE},
+{TOK_SECTIONGETTEXT,"SectionGetText",2,0,"section_index $(user_var: output text)",TP_CODE},
+{TOK_SECTIONSETTEXT,"SectionSetText",2,0,"section_index text_string",TP_CODE},
+{TOK_SECTIONGETSIZE,"SectionGetSize",2,0,"section_index $(user_var: output size)",TP_CODE},
+{TOK_SECTIONSETSIZE,"SectionSetSize",2,0,"section_index new_size",TP_CODE},
+{TOK_GETCURINSTTYPE,"GetCurInstType",1,0,"$(user_var: output inst_type_idx)",TP_CODE},
+{TOK_SETCURINSTTYPE,"SetCurInstType",1,0,"inst_type_idx",TP_CODE},
+{TOK_INSTTYPESETTEXT,"InstTypeSetText",2,0,"insttype_index flags",TP_CODE},
+{TOK_INSTTYPEGETTEXT,"InstTypeGetText",2,0,"insttype_index $(user_var: output flags)",TP_CODE},
+{TOK_SENDMESSAGE,"SendMessage",4,2,"hwnd message [wparam|STR:wParam] [lparam|STR:lParam] [$(user_var: return value)] [/TIMEOUT=X]",TP_CODE},
+{TOK_SETAUTOCLOSE,"SetAutoClose",1,0,"(false|true)",TP_CODE},
+{TOK_SETCTLCOLORS,"SetCtlColors",2,2,"hwnd [/BRANDING] [text_color] [transparent|bg_color]",TP_CODE},
+{TOK_SETBRANDINGIMAGE,"SetBrandingImage",1,2,"[/IMGID=image_item_id_in_dialog] [/RESIZETOFIT] bitmap.bmp",TP_CODE},
+{TOK_SETCOMPRESS,"SetCompress",1,0,"(off|auto|force)",TP_ALL},
+{TOK_SETCOMPRESSOR,"SetCompressor",1,2,"[/FINAL] [/SOLID] (zlib|bzip2|lzma)",TP_GLOBAL},
+{TOK_SETCOMPRESSORDICTSIZE,"SetCompressorDictSize",1,0,"dict_size_mb",TP_ALL},
+{TOK_SETCOMPRESSIONLEVEL,"SetCompressionLevel",1,0,"level_0-9",TP_ALL},
+{TOK_SETDATESAVE,"SetDateSave",1,0,"(off|on)",TP_ALL},
+{TOK_SETDETAILSVIEW,"SetDetailsView",1,0,"(hide|show)",TP_CODE},
+{TOK_SETDETAILSPRINT,"SetDetailsPrint",1,0,"(none|listonly|textonly|both)",TP_CODE},
+{TOK_SETERRORS,"SetErrors",0,0,"",TP_CODE},
+{TOK_SETERRORLEVEL,"SetErrorLevel",1,0,"error_level",TP_CODE},
+{TOK_GETERRORLEVEL,"GetErrorLevel",1,0,"$(user_var: output)",TP_CODE},
+{TOK_SETFILEATTRIBUTES,"SetFileAttributes",2,0,"file attribute[|attribute[...]]\n attribute=(NORMAL|ARCHIVE|HIDDEN|OFFLINE|READONLY|SYSTEM|TEMPORARY|0)",TP_CODE},
+{TOK_SETFONT,"SetFont",2,1,"[/LANG=lang_id] font_face_name font_size",TP_GLOBAL},
+{TOK_SETOUTPATH,"SetOutPath",1,0,"output_path",TP_CODE},
+{TOK_SETOVERWRITE,"SetOverwrite",1,0,"on|off|try|ifnewer|ifdiff",TP_ALL},
+{TOK_SETPLUGINUNLOAD,"SetPluginUnload",1,0,"(manual|alwaysoff)",TP_ALL},
+{TOK_SETREBOOTFLAG,"SetRebootFlag",1,0,"true|false",TP_CODE},
+{TOK_SETREGVIEW,"SetRegView",1,0,"32|64|lastused",TP_CODE},
+{TOK_SETSHELLVARCONTEXT,"SetShellVarContext",1,0,"all|current",TP_CODE},
+{TOK_SETSILENT,"SetSilent",1,0,"silent|normal",TP_CODE},
+{TOK_SHOWDETAILS,"ShowInstDetails",1,0,"(hide|show|nevershow)",TP_GLOBAL},
+{TOK_SHOWDETAILSUNINST,"ShowUninstDetails",1,0,"(hide|show|nevershow)",TP_GLOBAL},
+{TOK_SHOWWINDOW,"ShowWindow",2,0,"hwnd show_state",TP_CODE},
+{TOK_SILENTINST,"SilentInstall",1,0,"(normal|silent|silentlog)",TP_GLOBAL},
+{TOK_SILENTUNINST,"SilentUnInstall",1,0,"(normal|silent)",TP_GLOBAL},
+{TOK_SLEEP,"Sleep",1,0,"sleep_time_in_ms",TP_CODE},
+{TOK_STRCMP,"StrCmp",3,1,"str1 str2 label_to_goto_if_equal [label_to_goto_if_not]",TP_CODE},
+{TOK_STRCMPS,"StrCmpS",3,1,"str1 str2 label_to_goto_if_equal [label_to_goto_if_not]",TP_CODE},
+{TOK_STRCPY,"StrCpy",2,2,"$(user_var: output) str [maxlen] [startoffset]",TP_CODE},
+{TOK_STRLEN,"StrLen",2,0,"$(user_var: length output) str",TP_CODE},
+{TOK_SUBCAPTION,"SubCaption",2,0,"page_number(0-4) new_subcaption",TP_GLOBAL},
+{TOK_UNINSTALLEXENAME,"UninstallExeName",0,0,"no longer supported, use WriteUninstaller from section.",TP_ALL},
+{TOK_UNINSTCAPTION,"UninstallCaption",1,0,"uninstaller_caption",TP_GLOBAL},
+{TOK_UNINSTICON,"UninstallIcon",1,0,"icon_on_local_system.ico",TP_GLOBAL},
+#ifdef NSIS_SUPPORT_CODECALLBACKS
+{TOK_UNINSTPAGE,"UninstPage",1,4,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles|uninstConfirm) [pre_function] [show_function] [leave_function])) [/ENABLECANCEL]",TP_GLOBAL},
+#else
+{TOK_UNINSTPAGE,"UninstPage",1,1,"license|components|directory|instfiles|uninstConfirm [/ENABLECANCEL]",TP_GLOBAL},
+#endif
+{TOK_UNINSTTEXT,"UninstallText",1,1,"Text_to_go_on_uninstall_page [subtext]",TP_PG},
+{TOK_UNINSTSUBCAPTION,"UninstallSubCaption",2,0,"page_number(0-2) new_subcaption",TP_GLOBAL},
+{TOK_UNREGDLL,"UnRegDLL",1,0,"dll_path_on_target.dll",TP_CODE},
+{TOK_WINDOWICON,"WindowIcon",1,0,"on|off",TP_GLOBAL},
+{TOK_WRITEINISTR,"WriteINIStr",4,0,"ini_file section_name entry_name new_value",TP_CODE},
+{TOK_WRITEREGBIN,"WriteRegBin",4,0,"rootkey subkey entry_name hex_string_like_12848412AB\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_WRITEREGDWORD,"WriteRegDWORD",4,0,"rootkey subkey entry_name new_value_dword\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_WRITEREGSTR,"WriteRegStr",4,0,"rootkey subkey entry_name new_value_string\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_WRITEREGEXPANDSTR,"WriteRegExpandStr",4,0,"rootkey subkey entry_name new_value_string\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD|SHCTX)",TP_CODE},
+{TOK_WRITEUNINSTALLER,"WriteUninstaller",1,0,"uninstall_exe_name",TP_CODE},
+{TOK_XPSTYLE, "XPStyle",1,0,"(on|off)",TP_GLOBAL},
+{TOK_REQEXECLEVEL, "RequestExecutionLevel",1,0,"none|user|highest|admin",TP_GLOBAL},
+{TOK_P_PACKEXEHEADER,"!packhdr",2,0,"temp_file_name command_line_to_compress_that_temp_file",TP_ALL},
+{TOK_P_SYSTEMEXEC,"!system",1,2,"command [<|>|<>|=) retval]",TP_ALL},
+{TOK_P_EXECUTE,"!execute",1,0,"command",TP_ALL},
+{TOK_P_ADDINCLUDEDIR,"!AddIncludeDir",1,0,"dir",TP_ALL},
+{TOK_P_INCLUDE,"!include",1,1,"[/NONFATAL] filename.nsh",TP_ALL},
+{TOK_P_CD,"!cd",1,0,"absolute_or_relative_new_directory",TP_ALL},
+{TOK_P_IF,"!if",1,3,"[!] value [(==,!=,<=,<,>,>=,&&,||) value2] [...]",TP_ALL},
+{TOK_P_IFDEF,"!ifdef",1,-1,"symbol [| symbol2 [& symbol3 [...]]]",TP_ALL},
+{TOK_P_IFNDEF,"!ifndef",1,-1,"symbol [| symbol2 [& symbol3 [...]]]",TP_ALL},
+{TOK_P_ENDIF,"!endif",0,0,"",TP_ALL},
+{TOK_P_DEFINE,"!define",1,4,"([/date|/utcdate] symbol [value]) | (/math symbol val1 OP val2)\n OP=(+ - * / % & | ^)",TP_ALL},
+{TOK_P_UNDEF,"!undef",1,1,"symbol [value]",TP_ALL},
+{TOK_P_ELSE,"!else",0,-1,"[if[macro][n][def] ...]",TP_ALL},
+{TOK_P_ECHO,"!echo",1,0,"message",TP_ALL},
+{TOK_P_WARNING,"!warning",0,1,"[warning_message]",TP_ALL},
+{TOK_P_ERROR,"!error",0,1,"[error_message]",TP_ALL},
+
+{TOK_P_VERBOSE,"!verbose",1,0,"verbose_level | push | pop",TP_ALL},
+
+{TOK_P_MACRO,"!macro",1,-1,"macroname [parms ...]",TP_ALL},
+{TOK_P_MACROEND,"!macroend",0,0,"",TP_ALL},
+{TOK_P_INSERTMACRO,"!insertmacro",1,-1,"macroname [parms ...]",TP_ALL},
+{TOK_P_IFMACRODEF,"!ifmacrodef",1,-1,"macro [| macro2 [& macro3 [...]]]",TP_ALL},
+{TOK_P_IFMACRONDEF,"!ifmacrondef",1,-1,"macro [| macro2 [& macro3 [...]]]",TP_ALL},
+
+{TOK_P_TEMPFILE,"!tempfile",1,0,"symbol",TP_ALL},
+{TOK_P_DELFILE,"!delfile",1,0,"file",TP_ALL},
+{TOK_P_APPENDFILE,"!appendfile",2,0,"file appended_line",TP_ALL},
+
+{TOK_MISCBUTTONTEXT,"MiscButtonText",0,4,"[back button text] [next button text] [cancel button text] [close button text]",TP_GLOBAL},
+{TOK_DETAILSBUTTONTEXT,"DetailsButtonText",0,1,"[details button text]",TP_PG},
+{TOK_UNINSTBUTTONTEXT,"UninstallButtonText",0,1,"[uninstall button text]",TP_GLOBAL},
+{TOK_INSTBUTTONTEXT,"InstallButtonText",0,1,"[install button text]",TP_GLOBAL},
+{TOK_SPACETEXTS,"SpaceTexts",0,2,"none | ([space required text] [space available text])",TP_GLOBAL},
+{TOK_COMPLETEDTEXT,"CompletedText",0,1,"[completed text]",TP_PG},
+
+{TOK_GETFUNCTIONADDR,"GetFunctionAddress",2,0,"output function",TP_CODE},
+{TOK_GETLABELADDR,"GetLabelAddress",2,0,"output label",TP_CODE},
+{TOK_GETCURRENTADDR,"GetCurrentAddress",1,0,"output",TP_CODE},
+
+{TOK_PLUGINDIR,"!AddPluginDir",1,0,"new_plugin_directory",TP_ALL},
+{TOK_INITPLUGINSDIR,"InitPluginsDir",0,0,"",TP_CODE},
+// Added by ramon 23 May 2003
+{TOK_ALLOWSKIPFILES,"AllowSkipFiles",1,0,"(off|on)",TP_ALL},
+// Added by ramon 3 jun 2003
+{TOK_DEFVAR,"Var",1,1,"[/GLOBAL] var_name",TP_ALL},
+// Added by ramon 6 jun 2003
+{TOK_VI_ADDKEY,"VIAddVersionKey",2,1,"/LANG=lang_id keyname value",TP_GLOBAL},
+{TOK_VI_SETPRODUCTVERSION,"VIProductVersion",1,0,"[version_string_X.X.X.X]",TP_GLOBAL},
+{TOK_LOCKWINDOW,"LockWindow",1,0,"(on|off)",TP_CODE},
+};
+
+void CEXEBuild::print_help(char *commandname)
+{
+ int x;
+ for (x = 0; x < TOK__LAST; x ++)
+ {
+ if (!commandname || !stricmp(tokenlist[x].name,commandname))
+ {
+ ERROR_MSG("%s%s %s\n",commandname?"Usage: ":"",tokenlist[x].name,tokenlist[x].usage_str);
+ if (commandname) break;
+ }
+ }
+ if (x == TOK__LAST && commandname)
+ {
+ ERROR_MSG("Invalid command \"%s\"\n",commandname);
+ }
+
+}
+
+bool CEXEBuild::is_valid_token(char *s)
+{
+ for (int x = 0; x < TOK__LAST; x ++)
+ if (!stricmp(tokenlist[x].name,s))
+ return true;
+ return false;
+}
+
+int CEXEBuild::get_commandtoken(char *s, int *np, int *op, int *pos)
+{
+ int x;
+ for (x = 0; x < TOK__LAST; x ++)
+ if (!stricmp(tokenlist[x].name,s))
+ {
+ *np=tokenlist[x].num_parms;
+ *op=tokenlist[x].opt_parms;
+ *pos=x;
+ return tokenlist[x].id;
+ }
+ return -1;
+}
+
+int CEXEBuild::GetCurrentTokenPlace()
+{
+ if (build_cursection)
+ {
+ if (build_cursection_isfunc)
+ {
+ return TP_FUNC;
+ }
+ else
+ {
+ return TP_SEC;
+ }
+ }
+
+ if (cur_page)
+ return TP_PAGEEX;
+
+ return TP_GLOBAL;
+}
+
+int CEXEBuild::IsTokenPlacedRight(int pos, char *tok)
+{
+ if ((unsigned int) pos > (sizeof(tokenlist) / sizeof(tokenType)))
+ return PS_OK;
+
+ int tp = tokenlist[pos].placement;
+ int cp = GetCurrentTokenPlace();
+ if (tp & cp) {
+ return PS_OK;
+ }
+ else {
+ char err[1024];
+ if (cp == TP_SEC) {
+ strcpy(err, "Error: command %s not valid in Section\n");
+ }
+ else if (cp == TP_FUNC) {
+ strcpy(err, "Error: command %s not valid in Function\n");
+ }
+ else if (cp == TP_PAGEEX) {
+ strcpy(err, "Error: command %s not valid in PageEx\n");
+ }
+ else
+ {
+ strcpy(err, "Error: command %s not valid outside ");
+ if (tp & TP_SEC)
+ strcat(err, "Section");
+ if (tp & TP_FUNC)
+ {
+ if (tp & TP_SEC)
+ {
+ if (tp & TP_PAGEEX)
+ {
+ strcat(err, ", ");
+ }
+ else
+ {
+ strcat(err, " or ");
+ }
+ }
+ strcat(err, "Function");
+ }
+ if (tp & TP_PAGEEX)
+ {
+ if (tp & TP_CODE)
+ {
+ strcat(err, " or ");
+ }
+ strcat(err, "PageEx");
+ }
+ strcat(err, "\n");
+ }
+ ERROR_MSG(err, tok);
+ return PS_ERROR;
+ }
+}
diff --git a/Source/tokens.h b/Source/tokens.h
index 0f78add..65c415a 100755
--- a/Source/tokens.h
+++ b/Source/tokens.h
@@ -1,274 +1,274 @@
-/*
- * tokens.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _TOKENS_H_
-#define _TOKENS_H_
-
-// the order of these two lists no longer needs to match. -J
-enum
-{
- // header setting tokens
- TOK_NAME,
- TOK_CAPTION,
- TOK_UNINSTCAPTION,
- TOK_ICON,
- TOK_UNINSTICON,
- TOK_CHECKBITMAP,
- TOK_WINDOWICON,
- TOK_DIRTEXT,
- TOK_COMPTEXT,
- TOK_LICENSEBKCOLOR,
- TOK_LICENSEDATA,
- TOK_LICENSEFORCESELECTION,
- TOK_LICENSELANGSTRING,
- TOK_LICENSETEXT,
- TOK_UNINSTTEXT,
- TOK_SILENTINST,
- TOK_SILENTUNINST,
- TOK_INSTTYPE,
- TOK_OUTFILE,
- TOK_INSTDIR,
- TOK_INSTALLDIRREGKEY,
- TOK_UNINSTALLEXENAME,
- TOK_CRCCHECK,
- TOK_AUTOCLOSE,
- TOK_SHOWDETAILS,
- TOK_SHOWDETAILSUNINST,
- TOK_DIRSHOW,
- TOK_ROOTDIRINST,
- TOK_BGFONT,
- TOK_BGGRADIENT,
- TOK_INSTCOLORS,
- TOK_SUBCAPTION,
- TOK_UNINSTSUBCAPTION,
- TOK_BRANDINGTEXT,
- TOK_FILEERRORTEXT,
- TOK_INSTPROGRESSFLAGS,
- TOK_XPSTYLE,
- TOK_REQEXECLEVEL,
- TOK_CHANGEUI,
- TOK_ADDBRANDINGIMAGE,
- TOK_SETFONT,
- TOK_LOADNLF,
- TOK_RESERVEFILE,
- TOK_ALLOWSKIPFILES,
- TOK_DEFVAR,
- TOK_VI_ADDKEY,
- TOK_VI_SETPRODUCTVERSION,
-
- TOK_MISCBUTTONTEXT,
- TOK_DETAILSBUTTONTEXT,
- TOK_UNINSTBUTTONTEXT,
- TOK_INSTBUTTONTEXT,
- TOK_SPACETEXTS,
- TOK_COMPLETEDTEXT,
-
- TOK_LANGSTRING,
- TOK_LANGSTRINGUP,
-
- // comrpession stuff
- TOK_SETCOMPRESS,
- TOK_DBOPTIMIZE,
- TOK_SETCOMPRESSOR,
- TOK_SETCOMPRESSORDICTSIZE,
- TOK_SETCOMPRESSIONLEVEL,
- TOK_FILEBUFSIZE,
-
- // system "preprocessor"ish tokens
- TOK_P_IF,
- TOK_P_IFDEF,
- TOK_P_IFNDEF,
- TOK_P_ELSE,
- TOK_P_ENDIF,
- TOK_P_DEFINE,
- TOK_P_UNDEF,
- TOK_P_PACKEXEHEADER,
- TOK_P_SYSTEMEXEC,
- TOK_P_EXECUTE,
- TOK_P_ADDINCLUDEDIR,
- TOK_P_INCLUDE,
- TOK_P_CD,
- TOK_P_ECHO,
- TOK_P_WARNING,
- TOK_P_ERROR,
-
- TOK_P_VERBOSE,
-
- TOK_P_MACRO,
- TOK_P_MACROEND,
- TOK_P_INSERTMACRO,
- TOK_P_IFMACRODEF,
- TOK_P_IFMACRONDEF,
-
- TOK_P_TEMPFILE,
- TOK_P_DELFILE,
- TOK_P_APPENDFILE,
-
- // section/function shit
- TOK_SECTION,
- TOK_SECTIONEND,
- TOK_SECTIONIN,
- TOK_SECTIONGROUP,
- TOK_SECTIONGROUPEND,
- TOK_SUBSECTION,
- TOK_SUBSECTIONEND,
- TOK_FUNCTION,
- TOK_FUNCTIONEND,
- TOK_ADDSIZE,
-
- // page oredering shit
- TOK_PAGE,
- TOK_UNINSTPAGE,
-
- // PageEx stuff
- TOK_PAGEEX,
- TOK_PAGEEXEND,
- TOK_DIRVAR,
- TOK_DIRVERIFY,
- TOK_PAGECALLBACKS,
-
- TOK_GETINSTDIRERROR,
-
- // flag setters
- TOK_SETDATESAVE,
- TOK_SETOVERWRITE,
- TOK_SETPLUGINUNLOAD,
-
- // instructions
- TOK_NOP,
- TOK_GOTO,
- TOK_RET,
- TOK_CALL,
- TOK_SETOUTPATH,
- TOK_CREATEDIR,
- TOK_EXEC,
- TOK_EXECWAIT,
- TOK_EXECSHELL,
- TOK_CALLINSTDLL,
- TOK_REGDLL,
- TOK_UNREGDLL,
- TOK_RENAME,
- TOK_MESSAGEBOX,
- TOK_DELETEREGVALUE,
- TOK_DELETEREGKEY,
- TOK_WRITEREGSTR,
- TOK_WRITEREGEXPANDSTR,
- TOK_WRITEREGBIN,
- TOK_WRITEREGDWORD,
- TOK_DELETEINISEC,
- TOK_DELETEINISTR,
- TOK_FLUSHINI,
- TOK_WRITEINISTR,
- TOK_CREATESHORTCUT,
- TOK_FINDWINDOW,
- TOK_DELETE,
- TOK_RMDIR,
- TOK_FILE,
- TOK_COPYFILES,
- TOK_SETFILEATTRIBUTES,
- TOK_SLEEP,
- TOK_BRINGTOFRONT,
- TOK_HIDEWINDOW,
- TOK_IFFILEEXISTS,
- TOK_ABORT,
- TOK_QUIT,
- TOK_SETDETAILSVIEW,
- TOK_SETDETAILSPRINT,
- TOK_SETAUTOCLOSE,
- TOK_IFERRORS,
- TOK_CLEARERRORS,
- TOK_SETERRORS,
- TOK_IFABORT,
- TOK_STRCPY,
- TOK_STRCMP,
- TOK_STRCMPS,
- TOK_GETTEMPFILENAME,
- TOK_GETFUNCTIONADDR,
- TOK_GETLABELADDR,
- TOK_GETCURRENTADDR,
- TOK_READINISTR,
- TOK_READREGSTR,
- TOK_READREGDWORD,
- TOK_READENVSTR,
- TOK_EXPANDENVSTRS,
- TOK_DETAILPRINT,
- TOK_SEARCHPATH,
- TOK_GETDLLVERSION,
- TOK_GETDLLVERSIONLOCAL,
- TOK_GETFILETIME,
- TOK_GETFILETIMELOCAL,
- TOK_STRLEN,
- TOK_INTOP,
- TOK_INTCMP,
- TOK_INTCMPU,
- TOK_INTFMT,
- TOK_ENUMREGKEY,
- TOK_ENUMREGVAL,
- TOK_PUSH,
- TOK_POP,
- TOK_EXCH,
- TOK_SENDMESSAGE,
- TOK_ISWINDOW,
- TOK_GETDLGITEM,
- TOK_SETCTLCOLORS,
- TOK_FINDFIRST,
- TOK_FINDNEXT,
- TOK_FINDCLOSE,
- TOK_FILEOPEN,
- TOK_FILECLOSE,
- TOK_FILEREAD,
- TOK_FILEWRITE,
- TOK_FILEREADBYTE,
- TOK_FILEWRITEBYTE,
- TOK_FILESEEK,
- TOK_GETFULLPATHNAME,
- TOK_REBOOT,
- TOK_IFREBOOTFLAG,
- TOK_SETREBOOTFLAG,
- TOK_WRITEUNINSTALLER,
- TOK_LOGSET,
- TOK_LOGTEXT,
- TOK_SETBRANDINGIMAGE,
- TOK_SECTIONSETTEXT,
- TOK_SECTIONGETTEXT,
- TOK_SECTIONSETFLAGS,
- TOK_SECTIONGETFLAGS,
- TOK_SECTIONSETINSTTYPES,
- TOK_SECTIONGETINSTTYPES,
- TOK_SECTIONSETSIZE,
- TOK_SECTIONGETSIZE,
- TOK_INSTTYPESETTEXT,
- TOK_INSTTYPEGETTEXT,
- TOK_GETCURINSTTYPE,
- TOK_SETCURINSTTYPE,
- TOK_SETREGVIEW,
- TOK_SETSHELLVARCONTEXT,
- TOK_PLUGINDIR,
- TOK_INITPLUGINSDIR,
- TOK_CREATEFONT,
- TOK_SHOWWINDOW,
- TOK_ENABLEWINDOW,
- TOK_SETSILENT,
- TOK_IFSILENT,
- TOK_SETERRORLEVEL,
- TOK_GETERRORLEVEL,
- TOK_LOCKWINDOW,
-
- TOK__LAST,
- TOK__PLUGINCOMMAND
-};
-
-#endif//_TOKENS_H_
+/*
+ * tokens.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _TOKENS_H_
+#define _TOKENS_H_
+
+// the order of these two lists no longer needs to match. -J
+enum
+{
+ // header setting tokens
+ TOK_NAME,
+ TOK_CAPTION,
+ TOK_UNINSTCAPTION,
+ TOK_ICON,
+ TOK_UNINSTICON,
+ TOK_CHECKBITMAP,
+ TOK_WINDOWICON,
+ TOK_DIRTEXT,
+ TOK_COMPTEXT,
+ TOK_LICENSEBKCOLOR,
+ TOK_LICENSEDATA,
+ TOK_LICENSEFORCESELECTION,
+ TOK_LICENSELANGSTRING,
+ TOK_LICENSETEXT,
+ TOK_UNINSTTEXT,
+ TOK_SILENTINST,
+ TOK_SILENTUNINST,
+ TOK_INSTTYPE,
+ TOK_OUTFILE,
+ TOK_INSTDIR,
+ TOK_INSTALLDIRREGKEY,
+ TOK_UNINSTALLEXENAME,
+ TOK_CRCCHECK,
+ TOK_AUTOCLOSE,
+ TOK_SHOWDETAILS,
+ TOK_SHOWDETAILSUNINST,
+ TOK_DIRSHOW,
+ TOK_ROOTDIRINST,
+ TOK_BGFONT,
+ TOK_BGGRADIENT,
+ TOK_INSTCOLORS,
+ TOK_SUBCAPTION,
+ TOK_UNINSTSUBCAPTION,
+ TOK_BRANDINGTEXT,
+ TOK_FILEERRORTEXT,
+ TOK_INSTPROGRESSFLAGS,
+ TOK_XPSTYLE,
+ TOK_REQEXECLEVEL,
+ TOK_CHANGEUI,
+ TOK_ADDBRANDINGIMAGE,
+ TOK_SETFONT,
+ TOK_LOADNLF,
+ TOK_RESERVEFILE,
+ TOK_ALLOWSKIPFILES,
+ TOK_DEFVAR,
+ TOK_VI_ADDKEY,
+ TOK_VI_SETPRODUCTVERSION,
+
+ TOK_MISCBUTTONTEXT,
+ TOK_DETAILSBUTTONTEXT,
+ TOK_UNINSTBUTTONTEXT,
+ TOK_INSTBUTTONTEXT,
+ TOK_SPACETEXTS,
+ TOK_COMPLETEDTEXT,
+
+ TOK_LANGSTRING,
+ TOK_LANGSTRINGUP,
+
+ // comrpession stuff
+ TOK_SETCOMPRESS,
+ TOK_DBOPTIMIZE,
+ TOK_SETCOMPRESSOR,
+ TOK_SETCOMPRESSORDICTSIZE,
+ TOK_SETCOMPRESSIONLEVEL,
+ TOK_FILEBUFSIZE,
+
+ // system "preprocessor"ish tokens
+ TOK_P_IF,
+ TOK_P_IFDEF,
+ TOK_P_IFNDEF,
+ TOK_P_ELSE,
+ TOK_P_ENDIF,
+ TOK_P_DEFINE,
+ TOK_P_UNDEF,
+ TOK_P_PACKEXEHEADER,
+ TOK_P_SYSTEMEXEC,
+ TOK_P_EXECUTE,
+ TOK_P_ADDINCLUDEDIR,
+ TOK_P_INCLUDE,
+ TOK_P_CD,
+ TOK_P_ECHO,
+ TOK_P_WARNING,
+ TOK_P_ERROR,
+
+ TOK_P_VERBOSE,
+
+ TOK_P_MACRO,
+ TOK_P_MACROEND,
+ TOK_P_INSERTMACRO,
+ TOK_P_IFMACRODEF,
+ TOK_P_IFMACRONDEF,
+
+ TOK_P_TEMPFILE,
+ TOK_P_DELFILE,
+ TOK_P_APPENDFILE,
+
+ // section/function shit
+ TOK_SECTION,
+ TOK_SECTIONEND,
+ TOK_SECTIONIN,
+ TOK_SECTIONGROUP,
+ TOK_SECTIONGROUPEND,
+ TOK_SUBSECTION,
+ TOK_SUBSECTIONEND,
+ TOK_FUNCTION,
+ TOK_FUNCTIONEND,
+ TOK_ADDSIZE,
+
+ // page oredering shit
+ TOK_PAGE,
+ TOK_UNINSTPAGE,
+
+ // PageEx stuff
+ TOK_PAGEEX,
+ TOK_PAGEEXEND,
+ TOK_DIRVAR,
+ TOK_DIRVERIFY,
+ TOK_PAGECALLBACKS,
+
+ TOK_GETINSTDIRERROR,
+
+ // flag setters
+ TOK_SETDATESAVE,
+ TOK_SETOVERWRITE,
+ TOK_SETPLUGINUNLOAD,
+
+ // instructions
+ TOK_NOP,
+ TOK_GOTO,
+ TOK_RET,
+ TOK_CALL,
+ TOK_SETOUTPATH,
+ TOK_CREATEDIR,
+ TOK_EXEC,
+ TOK_EXECWAIT,
+ TOK_EXECSHELL,
+ TOK_CALLINSTDLL,
+ TOK_REGDLL,
+ TOK_UNREGDLL,
+ TOK_RENAME,
+ TOK_MESSAGEBOX,
+ TOK_DELETEREGVALUE,
+ TOK_DELETEREGKEY,
+ TOK_WRITEREGSTR,
+ TOK_WRITEREGEXPANDSTR,
+ TOK_WRITEREGBIN,
+ TOK_WRITEREGDWORD,
+ TOK_DELETEINISEC,
+ TOK_DELETEINISTR,
+ TOK_FLUSHINI,
+ TOK_WRITEINISTR,
+ TOK_CREATESHORTCUT,
+ TOK_FINDWINDOW,
+ TOK_DELETE,
+ TOK_RMDIR,
+ TOK_FILE,
+ TOK_COPYFILES,
+ TOK_SETFILEATTRIBUTES,
+ TOK_SLEEP,
+ TOK_BRINGTOFRONT,
+ TOK_HIDEWINDOW,
+ TOK_IFFILEEXISTS,
+ TOK_ABORT,
+ TOK_QUIT,
+ TOK_SETDETAILSVIEW,
+ TOK_SETDETAILSPRINT,
+ TOK_SETAUTOCLOSE,
+ TOK_IFERRORS,
+ TOK_CLEARERRORS,
+ TOK_SETERRORS,
+ TOK_IFABORT,
+ TOK_STRCPY,
+ TOK_STRCMP,
+ TOK_STRCMPS,
+ TOK_GETTEMPFILENAME,
+ TOK_GETFUNCTIONADDR,
+ TOK_GETLABELADDR,
+ TOK_GETCURRENTADDR,
+ TOK_READINISTR,
+ TOK_READREGSTR,
+ TOK_READREGDWORD,
+ TOK_READENVSTR,
+ TOK_EXPANDENVSTRS,
+ TOK_DETAILPRINT,
+ TOK_SEARCHPATH,
+ TOK_GETDLLVERSION,
+ TOK_GETDLLVERSIONLOCAL,
+ TOK_GETFILETIME,
+ TOK_GETFILETIMELOCAL,
+ TOK_STRLEN,
+ TOK_INTOP,
+ TOK_INTCMP,
+ TOK_INTCMPU,
+ TOK_INTFMT,
+ TOK_ENUMREGKEY,
+ TOK_ENUMREGVAL,
+ TOK_PUSH,
+ TOK_POP,
+ TOK_EXCH,
+ TOK_SENDMESSAGE,
+ TOK_ISWINDOW,
+ TOK_GETDLGITEM,
+ TOK_SETCTLCOLORS,
+ TOK_FINDFIRST,
+ TOK_FINDNEXT,
+ TOK_FINDCLOSE,
+ TOK_FILEOPEN,
+ TOK_FILECLOSE,
+ TOK_FILEREAD,
+ TOK_FILEWRITE,
+ TOK_FILEREADBYTE,
+ TOK_FILEWRITEBYTE,
+ TOK_FILESEEK,
+ TOK_GETFULLPATHNAME,
+ TOK_REBOOT,
+ TOK_IFREBOOTFLAG,
+ TOK_SETREBOOTFLAG,
+ TOK_WRITEUNINSTALLER,
+ TOK_LOGSET,
+ TOK_LOGTEXT,
+ TOK_SETBRANDINGIMAGE,
+ TOK_SECTIONSETTEXT,
+ TOK_SECTIONGETTEXT,
+ TOK_SECTIONSETFLAGS,
+ TOK_SECTIONGETFLAGS,
+ TOK_SECTIONSETINSTTYPES,
+ TOK_SECTIONGETINSTTYPES,
+ TOK_SECTIONSETSIZE,
+ TOK_SECTIONGETSIZE,
+ TOK_INSTTYPESETTEXT,
+ TOK_INSTTYPEGETTEXT,
+ TOK_GETCURINSTTYPE,
+ TOK_SETCURINSTTYPE,
+ TOK_SETREGVIEW,
+ TOK_SETSHELLVARCONTEXT,
+ TOK_PLUGINDIR,
+ TOK_INITPLUGINSDIR,
+ TOK_CREATEFONT,
+ TOK_SHOWWINDOW,
+ TOK_ENABLEWINDOW,
+ TOK_SETSILENT,
+ TOK_IFSILENT,
+ TOK_SETERRORLEVEL,
+ TOK_GETERRORLEVEL,
+ TOK_LOCKWINDOW,
+
+ TOK__LAST,
+ TOK__PLUGINCOMMAND
+};
+
+#endif//_TOKENS_H_
diff --git a/Source/uservars.h b/Source/uservars.h
index d559a4c..2a5c21e 100755
--- a/Source/uservars.h
+++ b/Source/uservars.h
@@ -1,103 +1,103 @@
-/*
- * uservars.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 2003 Ramon
- *
- * 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 ___USERVARS___H_____
-#define ___USERVARS___H_____
-
-#include "lang.h"
-
-struct uservarstring {
- int name;
- int index;
- int pos;
- int reference;
-};
-
-class UserVarsStringList : public SortedStringListND<struct uservarstring>
-{
- public:
- UserVarsStringList()
- {
- index = 0;
- }
- ~UserVarsStringList() { }
-
- int add(const char *name, int ref_count = 0 )
- {
- int pos=SortedStringListND<struct uservarstring>::add(name);
- if (pos == -1) return -1;
-
- ((struct uservarstring*)gr.get())[pos].index = index;
- ((struct uservarstring*)gr.get())[pos].pos = pos;
- ((struct uservarstring*)gr.get())[pos].reference = ref_count;
-
- int temp = index;
- index++;
-
- return temp;
- }
-
- int get(char *name, int n_chars = -1)
- {
- int v=SortedStringListND<struct uservarstring>::find(name, n_chars);
- if (v==-1) return -1;
- return (((struct uservarstring*)gr.get())[v].index);
- }
-
- int getnum()
- {
- return index;
- }
-
- int get_reference(int idx)
- {
- int pos=get_internal_idx(idx);
- if (pos==-1) return -1;
- return (((struct uservarstring*)gr.get())[pos].reference);
- }
-
- int inc_reference(int idx)
- {
- int pos=get_internal_idx(idx);
- ((struct uservarstring*)gr.get())[pos].reference++;
- return (((struct uservarstring*)gr.get())[pos].reference)-1;
- }
-
- char *idx2name(int idx)
- {
- int pos=get_internal_idx(idx);
- if (pos==-1) return NULL;
- struct uservarstring *data=(struct uservarstring *)gr.get();
- return ((char*)strings.get() + data[pos].name);
- }
-
- private:
- int index;
- int get_internal_idx(int idx)
- {
- struct uservarstring *data=(struct uservarstring *)gr.get();
- for (int i = 0; i < index; i++)
- {
- if (data[i].index == idx)
- {
- return i;
- }
- }
- return -1;
- }
-};
-
-#endif
+/*
+ * uservars.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 2003 Ramon
+ *
+ * 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 ___USERVARS___H_____
+#define ___USERVARS___H_____
+
+#include "lang.h"
+
+struct uservarstring {
+ int name;
+ int index;
+ int pos;
+ int reference;
+};
+
+class UserVarsStringList : public SortedStringListND<struct uservarstring>
+{
+ public:
+ UserVarsStringList()
+ {
+ index = 0;
+ }
+ ~UserVarsStringList() { }
+
+ int add(const char *name, int ref_count = 0 )
+ {
+ int pos=SortedStringListND<struct uservarstring>::add(name);
+ if (pos == -1) return -1;
+
+ ((struct uservarstring*)gr.get())[pos].index = index;
+ ((struct uservarstring*)gr.get())[pos].pos = pos;
+ ((struct uservarstring*)gr.get())[pos].reference = ref_count;
+
+ int temp = index;
+ index++;
+
+ return temp;
+ }
+
+ int get(char *name, int n_chars = -1)
+ {
+ int v=SortedStringListND<struct uservarstring>::find(name, n_chars);
+ if (v==-1) return -1;
+ return (((struct uservarstring*)gr.get())[v].index);
+ }
+
+ int getnum()
+ {
+ return index;
+ }
+
+ int get_reference(int idx)
+ {
+ int pos=get_internal_idx(idx);
+ if (pos==-1) return -1;
+ return (((struct uservarstring*)gr.get())[pos].reference);
+ }
+
+ int inc_reference(int idx)
+ {
+ int pos=get_internal_idx(idx);
+ ((struct uservarstring*)gr.get())[pos].reference++;
+ return (((struct uservarstring*)gr.get())[pos].reference)-1;
+ }
+
+ char *idx2name(int idx)
+ {
+ int pos=get_internal_idx(idx);
+ if (pos==-1) return NULL;
+ struct uservarstring *data=(struct uservarstring *)gr.get();
+ return ((char*)strings.get() + data[pos].name);
+ }
+
+ private:
+ int index;
+ int get_internal_idx(int idx)
+ {
+ struct uservarstring *data=(struct uservarstring *)gr.get();
+ for (int i = 0; i < index; i++)
+ {
+ if (data[i].index == idx)
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+};
+
+#endif
diff --git a/Source/util.cpp b/Source/util.cpp
index cd0b757..25e515e 100755
--- a/Source/util.cpp
+++ b/Source/util.cpp
@@ -1,1095 +1,832 @@
-/*
- * util.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <time.h>
-#include <string.h>
-#include "exehead/fileform.h"
-#include "util.h"
-#include "strlist.h"
-#include "winchar.h"
-
-#ifndef _WIN32
-# include <ctype.h>
-# include <unistd.h> // for close(2)
-# include <fcntl.h> // for open(2)
-# include <iconv.h>
-#endif
-
-#ifdef __APPLE__
-namespace Apple { // defines struct section
-# include <mach-o/dyld.h> // for _NSGetExecutablePath
-};
-# include <sys/param.h> // for MAXPATHLEN
-#endif
-
-#include <cassert> // for assert
-#include <algorithm>
-#include <stdexcept>
-
-using namespace std;
-
-int g_dopause=0;
-extern int g_display_errors;
-extern FILE *g_output;
-
-void dopause(void)
-{
- if (g_dopause)
- {
- if (g_display_errors) fprintf(g_output,"MakeNSIS done - hit enter to close...");
- fflush(stdout);
- int a;
- while ((a=getchar()) != '\r' && a != '\n' && a != 27/*esc*/);
- }
-}
-
-// Returns 0 if everything is OK
-// Returns -1 if can't find the file
-// Returns -2 if the file is an invalid bitmap
-// Returns -3 if the size doesn't match
-// Returns -4 if the bpp doesn't match
-int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width/*=0*/, int height/*=0*/, int maxbpp/*=0*/) {
- FILE *f = FOPEN(filename, "rb");
- if (!f) return -1;
-
- if (fgetc(f) != 'B' || fgetc(f) != 'M') {
- fclose(f);
- return -2;
- }
-
- if (width != 0) {
- LONG biWidth;
- fseek(f, 18, SEEK_SET); // Seek to the width member of the header
- fread(&biWidth, sizeof(LONG), 1, f);
- FIX_ENDIAN_INT32_INPLACE(biWidth);
- if (width != biWidth) {
- fclose(f);
- return -3;
- }
- }
-
- if (height != 0) {
- LONG biHeight;
- fseek(f, 22, SEEK_SET); // Seek to the height member of the header
- fread(&biHeight, sizeof(LONG), 1, f);
- FIX_ENDIAN_INT32_INPLACE(biHeight);
- // Bitmap height can be negative too...
- if (height != abs(biHeight)) {
- fclose(f);
- return -3;
- }
- }
-
- if (maxbpp != 0) {
- WORD biBitCount;
- fseek(f, 28, SEEK_SET); // Seek to the height member of the header
- fread(&biBitCount, sizeof(WORD), 1, f);
- FIX_ENDIAN_INT16_INPLACE(biBitCount);
- if (biBitCount > maxbpp) {
- fclose(f);
- return -4;
- }
- }
-
- DWORD dwSize;
- fseek(f, 2, SEEK_SET);
- fread(&dwSize, sizeof(DWORD), 1, f);
- FIX_ENDIAN_INT32_INPLACE(dwSize);
- dwSize -= 14;
-
- unsigned char* bitmap = (unsigned char*)malloc(dwSize);
- if (!bitmap) throw bad_alloc();
-
- fseek(f, 14, SEEK_SET);
- if (fread(bitmap, 1, dwSize, f) != dwSize) {
- fclose(f);
- return -2;
- }
- fclose(f);
-
- re->UpdateResourceA(RT_BITMAP, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG, bitmap, dwSize);
-
- free(bitmap);
-
- return 0;
-}
-
-// Added by Amir Szekely 8th July 2002
-// Icon editing structures
-typedef struct {
- WORD wReserved;
- WORD wIsIcon;
- WORD wCount;
-} IconGroupHeader;
-
-typedef struct {
- BYTE bWidth;
- BYTE bHeight;
- BYTE bPaletteEntries;
- BYTE bReserved;
- WORD wPlanes;
- WORD wBitsPerPixel;
- DWORD dwRawSize;
- DWORD dwImageOffset;
-} FileIconGroupEntry;
-
-typedef struct {
- BYTE bWidth;
- BYTE bHeight;
- BYTE bPaletteEntries;
- BYTE bReserved;
- WORD wPlanes;
- WORD wBitsPerPixel;
- DWORD dwRawSize;
- WORD wRsrcId;
-} RsrcIconGroupEntry;
-
-#define SIZEOF_RSRC_ICON_GROUP_ENTRY 14
-
-static FILE * open_icon(const char* filename, IconGroupHeader *igh)
-{
- FILE* f = FOPEN(filename, "rb");
- if (!f)
- throw runtime_error("can't open file");
-
- if (!fread(igh, sizeof(IconGroupHeader), 1, f))
- throw runtime_error("unable to read file");
-
- FIX_ENDIAN_INT16_INPLACE(igh->wIsIcon);
- FIX_ENDIAN_INT16_INPLACE(igh->wReserved);
- FIX_ENDIAN_INT16_INPLACE(igh->wCount);
-
- if (igh->wIsIcon != 1 || igh->wReserved != 0)
- throw runtime_error("invalid icon file");
-
- return f;
-}
-
-// replace_icon, must get an initialized resource editor
-void replace_icon(CResourceEditor* re, WORD wIconId, const char* filename)
-{
- IconGroupHeader igh, *new_igh;
- FILE *f = open_icon(filename, &igh);
-
- BYTE* rsrcIconGroup = (BYTE*)malloc(sizeof(IconGroupHeader) + igh.wCount*SIZEOF_RSRC_ICON_GROUP_ENTRY);
- if (!rsrcIconGroup) throw bad_alloc();
-
- CopyMemory(rsrcIconGroup, &igh, sizeof(IconGroupHeader));
-
- new_igh = (IconGroupHeader *) rsrcIconGroup;
- FIX_ENDIAN_INT16_INPLACE(new_igh->wIsIcon);
- FIX_ENDIAN_INT16_INPLACE(new_igh->wReserved);
- FIX_ENDIAN_INT16_INPLACE(new_igh->wCount);
-
- RsrcIconGroupEntry* ige = (RsrcIconGroupEntry*)(rsrcIconGroup + sizeof(IconGroupHeader));
-
- int i = 1;
-
- // Delete old icons
- while (re->UpdateResourceA(RT_ICON, MAKEINTRESOURCE(i++), NSIS_DEFAULT_LANG, 0, 0));
-
- for (i = 0; i < igh.wCount; i++) {
- fread(ige, sizeof(FileIconGroupEntry)-sizeof(DWORD), 1, f);
-
- DWORD dwRawSize = FIX_ENDIAN_INT32(ige->dwRawSize);
-
- ige->wRsrcId = FIX_ENDIAN_INT16(i + 1);
-
- DWORD dwOffset;
- fread(&dwOffset, sizeof(DWORD), 1, f);
-
- FIX_ENDIAN_INT32_INPLACE(dwOffset);
-
- fpos_t pos;
- fgetpos(f, &pos);
-
- if (fseek(f, dwOffset, SEEK_SET)) {
- free(rsrcIconGroup);
- throw runtime_error("corrupted icon file, too small");
- }
- BYTE* iconData = (BYTE*)malloc(dwRawSize);
- if (!iconData) {
- free(rsrcIconGroup);
- throw bad_alloc();
- }
- fread(iconData, sizeof(BYTE), dwRawSize, f);
- re->UpdateResourceA(RT_ICON, MAKEINTRESOURCE(i+1), NSIS_DEFAULT_LANG, iconData, dwRawSize);
- free(iconData);
-
- fsetpos(f, &pos);
-
- // Seems like the compiler refuses to increase the pointer by just 14.
- // If you'll replace this line by ige++ you will get unwanted results.
- ige = (RsrcIconGroupEntry*)((BYTE*)ige + SIZEOF_RSRC_ICON_GROUP_ENTRY);
- }
-
- fclose(f);
-
- re->UpdateResourceA(RT_GROUP_ICON, MAKEINTRESOURCE(wIconId), NSIS_DEFAULT_LANG, rsrcIconGroup, sizeof(IconGroupHeader) + igh.wCount*SIZEOF_RSRC_ICON_GROUP_ENTRY);
-
- free(rsrcIconGroup);
-}
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
-// returns the data of the uninstaller icon that should replace the installer icon data
-unsigned char* generate_uninstall_icon_data(const char* filename, size_t &size)
-{
- int i;
-
- IconGroupHeader igh;
- FILE *f = open_icon(filename, &igh);
-
- int iNewIconSize = 0;
- FileIconGroupEntry ige;
-
- DWORD* offsets = (DWORD*)malloc(sizeof(DWORD)*igh.wCount);
- DWORD* rawSizes = (DWORD*)malloc(sizeof(DWORD)*igh.wCount);
- if (!offsets || !rawSizes) throw bad_alloc();
-
- for (i = 0; i < igh.wCount; i++) {
- if (!fread(&ige, sizeof(FileIconGroupEntry), 1, f)) throw runtime_error("unable to read file");
- offsets[i] = ige.dwImageOffset;
- rawSizes[i] = ige.dwRawSize;
- iNewIconSize += FIX_ENDIAN_INT32(ige.dwRawSize);
- }
-
- // Before each icon come two DWORDs, one for size and the other for offset (set later)
- // The last size is 0, no offset
- iNewIconSize += sizeof(DWORD)*(1 + igh.wCount*2);
-
- BYTE* pbUninstIcon = (BYTE*)malloc(iNewIconSize);
- if (!pbUninstIcon) throw bad_alloc();
-
- BYTE* seeker = pbUninstIcon;
-
- for (i = 0; i < igh.wCount; i++) {
- *(DWORD*)seeker = rawSizes[i];
- seeker += sizeof(DWORD);
- *(DWORD*)seeker = 0;
- seeker += sizeof(DWORD);
- fseek(f, FIX_ENDIAN_INT32(offsets[i]), SEEK_SET);
- fread(seeker, 1, FIX_ENDIAN_INT32(rawSizes[i]), f);
- seeker += FIX_ENDIAN_INT32(rawSizes[i]);
- }
-
- // This is how we know there are no more icons (size = 0)
- *(DWORD*)seeker = 0;
-
- free(offsets);
- free(rawSizes);
-
- size = iNewIconSize;
-
- return pbUninstIcon;
-}
-
-// Added by Amir Szekely 11th July 2002
-#define MY_ASSERT(x, y) if (x) {if (g_display_errors) fprintf(g_output,"\nError finding icon resources: %s -- failing!\n", y);return 0;}
-
-int find_in_dir(PRESOURCE_DIRECTORY rd, WORD id) {
- WORD i = FIX_ENDIAN_INT16(rd->Header.NumberOfNamedEntries);
- WORD l = i + FIX_ENDIAN_INT16(rd->Header.NumberOfIdEntries);
-
- for (; i < l; i++) {
- if (FIX_ENDIAN_INT16(rd->Entries[i].UName.Id) == id) {
- return i;
- }
- }
-
- return -1;
-}
-
-// Fill the array of icons for uninstall with their offsets
-// Returns zero on failure
-int generate_unicons_offsets(unsigned char* exeHeader, size_t exeHeaderSize, unsigned char* uninstIconData) {
- DWORD dwResourceSectionVA;
-
- PIMAGE_NT_HEADERS ntHeaders = CResourceEditor::GetNTHeaders(exeHeader);
- PRESOURCE_DIRECTORY rdRoot = CResourceEditor::GetResourceDirectory(exeHeader, exeHeaderSize, ntHeaders, &dwResourceSectionVA);
-
- int idx = find_in_dir(rdRoot, (WORD) (long) RT_ICON);
- MY_ASSERT(idx < 0, "no icons found");
- MY_IMAGE_RESOURCE_DIRECTORY_ENTRY rdEntry = rdRoot->Entries[idx];
- FIX_ENDIAN_INT32_INPLACE(rdEntry.UOffset.OffsetToData);
- MY_ASSERT(!rdEntry.UOffset.DirectoryOffset.DataIsDirectory, "bad resource directory");
-
- PRESOURCE_DIRECTORY rdIcons = PRESOURCE_DIRECTORY(rdEntry.UOffset.DirectoryOffset.OffsetToDirectory + DWORD(rdRoot));
-
- MY_ASSERT((size_t)rdIcons - (size_t)exeHeader > exeHeaderSize, "corrupted EXE - invalid pointer");
-
- WORD wNumberOfEntries = FIX_ENDIAN_INT16(rdIcons->Header.NumberOfIdEntries);
-
- MY_ASSERT(wNumberOfEntries == 0, "no icons found");
-
- for (WORD i = 0; i < wNumberOfEntries; i++) { // Icons dir can't have named entries
- MY_IMAGE_RESOURCE_DIRECTORY_ENTRY icoEntry = rdIcons->Entries[i];
- FIX_ENDIAN_INT32_INPLACE(icoEntry.UOffset.OffsetToData);
-
- MY_ASSERT(!icoEntry.UOffset.DirectoryOffset.DataIsDirectory, "bad resource directory");
- PRESOURCE_DIRECTORY rd = PRESOURCE_DIRECTORY(icoEntry.UOffset.DirectoryOffset.OffsetToDirectory + DWORD(rdRoot));
-
- MY_ASSERT((size_t)rd - (size_t)exeHeader > exeHeaderSize, "corrupted EXE - invalid pointer");
-
- MY_IMAGE_RESOURCE_DIRECTORY_ENTRY datEntry = rd->Entries[0];
- FIX_ENDIAN_INT32_INPLACE(datEntry.UOffset.OffsetToData);
-
- MY_ASSERT(datEntry.UOffset.DirectoryOffset.DataIsDirectory, "bad resource directory");
-
- PIMAGE_RESOURCE_DATA_ENTRY rde = PIMAGE_RESOURCE_DATA_ENTRY(datEntry.UOffset.OffsetToData + DWORD(rdRoot));
-
- MY_ASSERT((size_t)rde - (size_t)exeHeader > exeHeaderSize, "corrupted EXE - invalid pointer");
-
- // find icon to replace
- LPBYTE seeker = uninstIconData;
- while (*seeker) {
- DWORD dwSize = *(DWORD*)seeker;
- seeker += sizeof(DWORD);
- DWORD dwOffset = *(DWORD*)seeker;
- // if we haven't set the offset yet and the size is the same, it's a match
- if (!dwOffset && dwSize == rde->Size)
- break;
-
- seeker += FIX_ENDIAN_INT32(dwSize) + sizeof(DWORD);
-
- // reached the end of the list and no match
- MY_ASSERT(!*seeker, "installer, uninstaller icon size mismatch - see the Icon instruction's documentation for more information");
- }
-
- // Set offset
- DWORD dwOffset = FIX_ENDIAN_INT32(rde->OffsetToData) + DWORD(rdRoot) - dwResourceSectionVA - DWORD(exeHeader);
- *(LPDWORD) seeker = FIX_ENDIAN_INT32(dwOffset);
-
- MY_ASSERT(dwOffset > exeHeaderSize || dwOffset < (DWORD)rdRoot - (DWORD)exeHeader, "invalid data offset - icon resource probably compressed");
- }
-
- LPBYTE seeker = uninstIconData;
- while (*seeker) {
- DWORD dwSize = *(DWORD*)seeker;
- seeker += sizeof(DWORD);
- DWORD dwOffset = *(DWORD*)seeker;
- seeker += sizeof(DWORD);
- // offset isn't set which means we found no match for this one
- MY_ASSERT(!dwOffset, "installer, uninstaller number of icons doesn't match - see the Icon instruction's documentation for more information");
- seeker += FIX_ENDIAN_INT32(dwSize);
- }
-
- return 1;
-}
-#endif // NSIS_CONFIG_UNINSTALL_SUPPORT
-
-#ifndef _WIN32
-char *CharPrev(const char *s, const char *p) {
- if (!s || !p || p < s)
- return NULL;
- while (*s) {
- char *n = CharNext(s);
- if (n >= p)
- break;
- s = n;
- }
- return (char *) s;
-}
-
-char *CharNext(const char *s) {
- int l = 0;
- if (s && *s)
- l = max(1, mblen(s, MB_CUR_MAX));
- return (char *) s + l;
-}
-
-char *CharNextExA(WORD codepage, const char *s, int flags) {
- char buf[1024];
- snprintf(buf, 1024, "CP%d", codepage);
- setlocale(LC_CTYPE, buf);
-
- const char* np;
- int len = mblen(s, strlen(s));
- if (len > 0)
- np = s + len;
- else
- np = s + 1;
-
- setlocale(LC_CTYPE, "");
-
- return (char *) np;
-}
-
-int wsprintf(char *s, const char *format, ...) {
- va_list val;
- va_start(val, format);
- int res = vsnprintf(s, 1024, format, val);
- va_end(val);
- return res;
-}
-
-// iconv const inconsistency workaround by Alexandre Oliva
-template <typename T>
-inline size_t __iconv_adaptor
- (size_t (*iconv_func)(iconv_t, T, size_t *, char**,size_t*),
- iconv_t cd, char **inbuf, size_t *inbytesleft,
- char **outbuf, size_t *outbytesleft)
-{
- return iconv_func (cd, (T)inbuf, inbytesleft, outbuf, outbytesleft);
-}
-
-void static create_code_page_string(char *buf, size_t len, UINT code_page) {
- if (code_page == CP_ACP)
- code_page = 1252;
-
- snprintf(buf, len, "CP%d", code_page);
-}
-
-int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
- int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar,
- LPBOOL lpUsedDefaultChar) {
- static char buffer[4096];
-
- char cp[128];
- create_code_page_string(cp, sizeof(cp), CodePage);
-
- iconv_t cd = iconv_open(cp, "UCS-2LE");
- if (cd == (iconv_t) -1) {
- return 0;
- }
-
- if (cchWideChar < 0) {
- cchWideChar = (int) winchar_strlen(lpWideCharStr) + 1;
- }
-
- if (cbMultiByte == 0) {
- cbMultiByte = sizeof(buffer);
- lpMultiByteStr = buffer;
- }
-
- char *in = (char *) lpWideCharStr;
- char *out = lpMultiByteStr;
- size_t inbytes = cchWideChar * sizeof(WCHAR);
- size_t outbytes = cbMultiByte;
-
- if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
- iconv_close(cd);
- return 0;
- }
-
- iconv_close(cd);
-
- return cbMultiByte - outbytes;
-}
-
-int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
- int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar) {
- static WCHAR buffer[4096];
-
- char cp[128];
- create_code_page_string(cp, sizeof(cp), CodePage);
-
- iconv_t cd = iconv_open("UCS-2LE", cp);
- if (cd == (iconv_t) -1) {
- return 0;
- }
-
- if (cbMultiByte < 0) {
- cbMultiByte = strlen(lpMultiByteStr) + 1;
- }
-
- if (cchWideChar == 0) {
- cchWideChar = sizeof(buffer);
- lpWideCharStr = buffer;
- }
-
- char *in = (char *) lpMultiByteStr;
- char *out = (char *) lpWideCharStr;
- size_t inbytes = cbMultiByte;
- size_t outbytes = cchWideChar * sizeof(WCHAR);
-
- if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
- iconv_close(cd);
- return 0;
- }
-
- iconv_close(cd);
-
- return cchWideChar - (outbytes / sizeof (WCHAR));
-}
-
-BOOL IsValidCodePage(UINT CodePage)
-{
- char cp[128];
- create_code_page_string(cp, sizeof(cp), CodePage);
-
- iconv_t cd = iconv_open("UCS-2LE", cp);
- if (cd == (iconv_t) -1)
- return FALSE;
-
- iconv_close(cd);
-
- return TRUE;
-}
-
-#define MY_ERROR_MSG(x) {if (g_display_errors) {fprintf(g_output,"%s", x);}}
-
-char *my_convert(const char *path)
-{
- // TODO: (orip) ref. this func. to use std::string?
- char *converted_path = strdup(path);
- size_t len = strlen(path);
-
- if(!converted_path)
- {
- MY_ERROR_MSG("Error: could not allocate memory in my_convert()\n");
- return (char*) path; /* dirty */
- }
-
- /* Replace drive letter X: by /X */
- if(len >= 2)
- {
- if (path[1] == ':')
- {
- converted_path[0] = '/';
- converted_path[1] = (char) tolower((int) path[0]);
- }
- }
-
- char *p = converted_path;
-
- do
- {
- if (*p == '\\')
- {
- *p = '/';
- }
- p = CharNext(p);
- }
- while (*p);
-
- return converted_path;
-}
-
-void my_convert_free(char *converted_path)
-{
- free(converted_path);
-}
-
-int my_open(const char *pathname, int flags)
-{
- char *converted_pathname = my_convert(pathname);
-
- int result = open(converted_pathname, flags);
- my_convert_free(converted_pathname);
- return result;
-}
-
-FILE *my_fopen(const char *path, const char *mode)
-{
- char *converted_path = my_convert(path);
-
- FILE *result = fopen(converted_path, mode);
- my_convert_free(converted_path);
- return result;
-}
-#endif//!_WIN32
-
-void *operator new(size_t size) throw(bad_alloc) {
- void *p = malloc(size);
- if (!p)
- throw bad_alloc();
- return p;
-}
-
-void operator delete(void *p) throw() {
- if (p) free(p);
-}
-
-void operator delete [](void *p) throw() {
- if (p) free(p);
-}
-
-size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) {
- return strftime(s, max, fmt, tm);
-}
-
-string get_full_path(const string &path) {
-#ifdef _WIN32
- char *throwaway;
- char real_path[1024];
- int rc = GetFullPathName(path.c_str(),1024,real_path,&throwaway);
- assert(rc <= 1024); // path size is limited by MAX_PATH (260)
- assert(rc != 0); // rc==0 in case of error
- return string(real_path);
-#else//_WIN32
-#ifdef PATH_MAX
- static char buffer[PATH_MAX];
-#else//PATH_MAX
- int path_max = pathconf(path, _PC_PATH_MAX);
- if (path_max <= 0)
- path_max = 4096;
- char *buffer = (char *) malloc(path_max);
- if (!buffer)
- return string(path);
-#endif//PATH_MAX
- if (!realpath(path.c_str(), buffer))
- strcpy(buffer, path.c_str());
- string result(buffer);
-#ifndef PATH_MAX
- free(buffer);
-#endif//!PATH_MAX
- return result;
-#endif//_WIN32
-}
-
-string get_string_prefix(const string& str, const string& separator) {
- const string::size_type last_separator_pos = str.rfind(separator);
- if (last_separator_pos == string::npos)
- return str;
- return str.substr(0, last_separator_pos);
-}
-
-string get_string_suffix(const string& str, const string& separator) {
- const string::size_type last_separator_pos = str.rfind(separator);
- if (last_separator_pos == string::npos)
- return str;
- return str.substr(last_separator_pos + separator.size(), string::npos);
-}
-
-string get_dir_name(const string& path) {
- return get_string_prefix(path, PLATFORM_PATH_SEPARATOR_STR);
-}
-
-string get_file_name(const string& path) {
- return get_string_suffix(path, PLATFORM_PATH_SEPARATOR_STR);
-}
-
-string get_executable_path(const char* argv0) {
-#ifdef _WIN32
- char temp_buf[MAX_PATH+1];
- temp_buf[0] = '\0';
- int rc = GetModuleFileName(NULL,temp_buf,MAX_PATH);
- assert(rc != 0);
- return string(temp_buf);
-#elif __APPLE__
- char temp_buf[MAXPATHLEN+1];
- unsigned int buf_len = MAXPATHLEN;
- int rc = Apple::_NSGetExecutablePath(temp_buf, &buf_len);
- assert(rc == 0);
- return string(temp_buf);
-#else /* Linux/BSD/POSIX/etc */
- const char *envpath = getenv("_");
- if( envpath != NULL ) return get_full_path( envpath );
- else {
- char* pathtmp;
- char* path = NULL;
- size_t len = 100;
- int nchars;
- while(1){
- pathtmp = (char*)realloc(path,len+1);
- if( pathtmp == NULL ){
- free(path);
- return get_full_path(argv0);
- }
- path = pathtmp;
- nchars = readlink("/proc/self/exe", path, len);
- if( nchars == -1 ){
- free(path);
- return get_full_path(argv0);
- }
- if( nchars < (int) len ){
- path[nchars] = '\0';
- string result(path);
- free(path);
- return result;
- }
- len *= 2;
- }
- }
-#endif
-}
-
-string get_executable_dir(const char *argv0) {
- return get_dir_name(get_executable_path(argv0));
-}
-
-string remove_file_extension(const string& path) {
- return get_string_prefix(path, ".");
-}
-
-string lowercase(const string &str) {
- string result = str;
- transform(str.begin(), str.end(), result.begin(), tolower);
- return result;
-}
-
-int sane_system(const char *command) {
-#ifdef _WIN32
-
- // workaround for bug #1509909
- // http://sf.net/tracker/?func=detail&atid=373085&aid=1509909&group_id=22049
- //
- // cmd.exe /C has some weird handling for quotes. it strips
- // the surrounding quotes, if they exist. if there are quotes
- // around the program path and its arguments, it will strip
- // the outer quotes. this may result in something like:
- // `program files\nsis\makensis.exe" "args`
- // which obviously fails...
- //
- // to avoid the stripping, a harmless string is prefixed
- // to the command line.
-
- string command_s = "IF 1==1 ";
- command_s += command;
- return system(command_s.c_str());
-
-#else
-
- return system(command);
-
-#endif
-}
-
-static bool GetDLLVersionUsingRE(const string& filepath, DWORD& high, DWORD & low)
-{
- bool found = false;
-
- FILE *fdll = FOPEN(filepath.c_str(), "rb");
- if (!fdll)
- return 0;
-
- fseek(fdll, 0, SEEK_END);
- unsigned int len = ftell(fdll);
- fseek(fdll, 0, SEEK_SET);
-
- LPBYTE dll = (LPBYTE) malloc(len);
-
- if (!dll)
- {
- fclose(fdll);
- return 0;
- }
-
- if (fread(dll, 1, len, fdll) != len)
- {
- fclose(fdll);
- free(dll);
- return 0;
- }
-
- try
- {
- CResourceEditor *dllre = new CResourceEditor(dll, len);
- LPBYTE ver = dllre->GetResourceA(VS_FILE_INFO, MAKEINTRESOURCE(VS_VERSION_INFO), 0);
- int versize = dllre->GetResourceSizeA(VS_FILE_INFO, MAKEINTRESOURCE(VS_VERSION_INFO), 0);
-
- if (ver)
- {
- if ((size_t) versize > sizeof(WORD) * 3)
- {
- // get VS_FIXEDFILEINFO from VS_VERSIONINFO
- WCHAR *szKey = (WCHAR *)(ver + sizeof(WORD) * 3);
- int len = (winchar_strlen(szKey) + 1) * sizeof(WCHAR) + sizeof(WORD) * 3;
- len = (len + 3) & ~3; // align on DWORD boundry
- VS_FIXEDFILEINFO *verinfo = (VS_FIXEDFILEINFO *)(ver + len);
- if (versize > len && verinfo->dwSignature == VS_FFI_SIGNATURE)
- {
- low = verinfo->dwFileVersionLS;
- high = verinfo->dwFileVersionMS;
- found = true;
- }
- }
- dllre->FreeResource(ver);
- }
-
- delete dllre;
- }
- catch (exception&)
- {
- }
-
- return found;
-}
-
-static bool GetDLLVersionUsingAPI(const string& filepath, DWORD& high, DWORD& low)
-{
- bool found = false;
-
-#ifdef _WIN32
- char path[1024];
- char *name;
- path[0] = 0;
-
- GetFullPathName(filepath.c_str(), 1024, path, &name);
-
- DWORD d;
- DWORD verSize = GetFileVersionInfoSize(path, &d);
- if (verSize)
- {
- void *buf = (void *) GlobalAlloc(GPTR, verSize);
- if (buf)
- {
- UINT uLen;
- VS_FIXEDFILEINFO *pvsf;
- if (GetFileVersionInfo(path, 0, verSize, buf) && VerQueryValue(buf, "\\", (void**) &pvsf, &uLen))
- {
- low = pvsf->dwFileVersionLS;
- high = pvsf->dwFileVersionMS;
- found = true;
- }
- GlobalFree(buf);
- }
- }
-#endif
-
- return found;
-}
-
-#ifdef _WIN32
-
-// the following structure must be byte-aligned.
-#pragma pack( push, pre_vxd_ver, 1 )
-typedef struct _VXD_VERSION_RESOURCE {
- char cType;
- WORD wID;
- char cName;
- WORD wOrdinal;
- WORD wFlags;
- DWORD dwResSize;
- BYTE bVerData;
-} VXD_VERSION_RESOURCE, *PVXD_VERSION_RESOURCE;
-#pragma pack( pop, pre_vxd_ver )
-
-static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
-{
-
- HANDLE hFile = NULL;
- HANDLE hFileMapping = NULL;
- void * pView = NULL;
- DWORD dwSize = 0;
- DWORD dwError = 0;
-
- PIMAGE_DOS_HEADER pDosExeHdr = NULL;
- PIMAGE_NT_HEADERS pNtExeHdr = NULL;
- PIMAGE_VXD_HEADER pLEHdr = NULL;
- PVXD_VERSION_RESOURCE pVerRes = NULL;
- LPVOID pRawRes = NULL;
-
- // Open the file for shared read access.
- hFile = CreateFile( szFile, GENERIC_READ, FILE_SHARE_READ,
- NULL, OPEN_EXISTING, 0, NULL );
- if ( hFile == INVALID_HANDLE_VALUE )
- {
- return FALSE;
- }
-
- // Create a read-only file mapping object for the file.
- hFileMapping = CreateFileMapping( hFile, NULL,
- PAGE_READONLY, 0, 0, NULL);
- if ( !hFileMapping )
- {
- dwError = GetLastError();
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError( dwError );
- return FALSE;
- }
-
- // Map a view of the the file.
- pView = MapViewOfFile( hFileMapping, FILE_MAP_READ, 0, 0, 0 );
- if ( !pView )
- {
- dwError = GetLastError();
-
- if ( hFileMapping )
- CloseHandle( hFileMapping );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError( dwError );
- return FALSE;
- }
-
- // The DOS header begins at byte 0.
- pDosExeHdr = (PIMAGE_DOS_HEADER) pView;
-
- // Check to make sure the file has a DOS EXE header.
- if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE )
- {
- if ( pView )
- UnmapViewOfFile( pView );
-
- if ( hFileMapping )
- CloseHandle( hFileMapping );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError( ERROR_BAD_FORMAT );
- return FALSE;
- }
-
- // Find the beginning of the NT header at offset e_lfanew.
- pNtExeHdr = (PIMAGE_NT_HEADERS) ( (DWORD) pView
- + (DWORD) pDosExeHdr->e_lfanew );
-
- // Check to make sure the file is a VxD.
- if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE )
- {
- if ( pView )
- UnmapViewOfFile( pView );
-
- if ( hFileMapping )
- CloseHandle( hFileMapping );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError( ERROR_BAD_FORMAT );
- return FALSE;
- }
-
- // The LE header begins at the same place as the NT header.
- pLEHdr = (PIMAGE_VXD_HEADER) pNtExeHdr;
-
- // e32_winreslen contains the size of the VxD's version resource.
- if ( pLEHdr->e32_winreslen == 0 ) {
- *lpdwLen = 0;
- if ( pView )
- UnmapViewOfFile( pView );
-
- if ( hFileMapping )
- CloseHandle( hFileMapping );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError( ERROR_RESOURCE_DATA_NOT_FOUND );
- return FALSE;
- }
-
- // e32_winresoff contains the offset of the resource in the VxD.
- pVerRes = (VXD_VERSION_RESOURCE *) ( (DWORD) pView
- + (DWORD) pLEHdr->e32_winresoff );
- dwSize = pVerRes->dwResSize;
- pRawRes = &(pVerRes->bVerData);
-
- // Make sure the supplied buffer is large enough for the resource.
- if ( ( lpData == NULL ) || ( *lpdwLen < dwSize ) ) {
- *lpdwLen = dwSize;
-
- if ( pView )
- UnmapViewOfFile( pView );
-
- if ( hFileMapping )
- CloseHandle( hFileMapping );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError( ERROR_INSUFFICIENT_BUFFER );
- return FALSE;
- }
-
- // Zero the passed buffer and copy the resource into it.
- ZeroMemory( lpData, *lpdwLen );
- CopyMemory( lpData, pRawRes, dwSize );
- *lpdwLen = dwSize;
-
- // Clean up resources.
- if ( pView )
- UnmapViewOfFile( pView );
-
- if ( hFileMapping )
- CloseHandle( hFileMapping );
-
- if ( hFile != INVALID_HANDLE_VALUE )
- CloseHandle( hFile );
-
- SetLastError(0);
- return TRUE;
-}
-
-static DWORD GetVxdVersionInfoSize( LPCSTR szFile )
-{
- DWORD dwResult = 0;
-
- // Call GetVxdVersion() with NULL for the pointer to the buffer.
- if ( !GetVxdVersion( szFile, &dwResult, NULL ) )
- {
- DWORD dwError = GetLastError();
-
- // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and
- // the required buffer size will be returned in dwResult.
- if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER )
- {
- SetLastError( 0 );
- return dwResult;
- }
- }
-
- // The following line is never executed.
- return 0;
-}
-
-static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData )
-{
- return GetVxdVersion( szFile, &dwLen, lpData );
-}
-
-#endif //_WIN32
-
-static bool GetDLLVersionFromVXD(const string& filepath, DWORD& high, DWORD& low)
-{
- bool found = false;
-
-#ifdef _WIN32
- DWORD verSize = GetVxdVersionInfoSize(filepath.c_str());
- if (verSize)
- {
- void *buf = (void *) GlobalAlloc(GPTR, verSize);
- if (buf)
- {
- UINT uLen;
- VS_FIXEDFILEINFO *pvsf;
- if (GetVxdVersionInfo(filepath.c_str(), verSize, buf) && VerQueryValue(buf, "\\", (void**) &pvsf, &uLen))
- {
- low = pvsf->dwFileVersionLS;
- high = pvsf->dwFileVersionMS;
- found = true;
- }
- GlobalFree(buf);
- }
- }
-#endif
-
- return found;
-}
-
-bool GetDLLVersion(const string& filepath, DWORD& high, DWORD& low)
-{
- if (GetDLLVersionUsingAPI(filepath, high, low))
- return true;
-
- if (GetDLLVersionUsingRE(filepath, high, low))
- return true;
-
- if (GetDLLVersionFromVXD(filepath, high, low))
- return true;
-
- return false;
-}
+/*
+ * util.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include <time.h>
+#include <string.h>
+#include "exehead/fileform.h"
+#include "util.h"
+#include "strlist.h"
+#include "winchar.h"
+
+#ifndef _WIN32
+# include <ctype.h>
+# include <unistd.h> // for close(2)
+# include <fcntl.h> // for open(2)
+# include <iconv.h>
+#endif
+
+#ifdef __APPLE__
+namespace Apple { // defines struct section
+# include <mach-o/dyld.h> // for _NSGetExecutablePath
+};
+# include <sys/param.h> // for MAXPATHLEN
+#endif
+
+#include <cassert> // for assert
+#include <algorithm>
+#include <stdexcept>
+
+using namespace std;
+
+int g_dopause=0;
+extern int g_display_errors;
+extern FILE *g_output;
+
+void dopause(void)
+{
+ if (g_dopause)
+ {
+ if (g_display_errors) fprintf(g_output,"MakeNSIS done - hit enter to close...");
+ fflush(stdout);
+ int a;
+ while ((a=getchar()) != '\r' && a != '\n' && a != 27/*esc*/);
+ }
+}
+
+// Returns 0 if everything is OK
+// Returns -1 if can't find the file
+// Returns -2 if the file is an invalid bitmap
+// Returns -3 if the size doesn't match
+// Returns -4 if the bpp doesn't match
+int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width/*=0*/, int height/*=0*/, int maxbpp/*=0*/) {
+ FILE *f = FOPEN(filename, "rb");
+ if (!f) return -1;
+
+ if (fgetc(f) != 'B' || fgetc(f) != 'M') {
+ fclose(f);
+ return -2;
+ }
+
+ if (width != 0) {
+ LONG biWidth;
+ fseek(f, 18, SEEK_SET); // Seek to the width member of the header
+ fread(&biWidth, sizeof(LONG), 1, f);
+ FIX_ENDIAN_INT32_INPLACE(biWidth);
+ if (width != biWidth) {
+ fclose(f);
+ return -3;
+ }
+ }
+
+ if (height != 0) {
+ LONG biHeight;
+ fseek(f, 22, SEEK_SET); // Seek to the height member of the header
+ fread(&biHeight, sizeof(LONG), 1, f);
+ FIX_ENDIAN_INT32_INPLACE(biHeight);
+ // Bitmap height can be negative too...
+ if (height != abs(biHeight)) {
+ fclose(f);
+ return -3;
+ }
+ }
+
+ if (maxbpp != 0) {
+ WORD biBitCount;
+ fseek(f, 28, SEEK_SET); // Seek to the height member of the header
+ fread(&biBitCount, sizeof(WORD), 1, f);
+ FIX_ENDIAN_INT16_INPLACE(biBitCount);
+ if (biBitCount > maxbpp) {
+ fclose(f);
+ return -4;
+ }
+ }
+
+ DWORD dwSize;
+ fseek(f, 2, SEEK_SET);
+ fread(&dwSize, sizeof(DWORD), 1, f);
+ FIX_ENDIAN_INT32_INPLACE(dwSize);
+ dwSize -= 14;
+
+ unsigned char* bitmap = (unsigned char*)malloc(dwSize);
+ if (!bitmap) throw bad_alloc();
+
+ fseek(f, 14, SEEK_SET);
+ if (fread(bitmap, 1, dwSize, f) != dwSize) {
+ fclose(f);
+ return -2;
+ }
+ fclose(f);
+
+ re->UpdateResourceA(RT_BITMAP, MAKEINTRESOURCE(id), NSIS_DEFAULT_LANG, bitmap, dwSize);
+
+ free(bitmap);
+
+ return 0;
+}
+
+#ifndef _WIN32
+char *CharPrev(const char *s, const char *p) {
+ if (!s || !p || p < s)
+ return NULL;
+ while (*s) {
+ char *n = CharNext(s);
+ if (n >= p)
+ break;
+ s = n;
+ }
+ return (char *) s;
+}
+
+char *CharNext(const char *s) {
+ int l = 0;
+ if (s && *s)
+ l = max(1, mblen(s, MB_CUR_MAX));
+ return (char *) s + l;
+}
+
+char *CharNextExA(WORD codepage, const char *s, int flags) {
+ char buf[1024];
+ snprintf(buf, 1024, "CP%d", codepage);
+ setlocale(LC_CTYPE, buf);
+
+ const char* np;
+ int len = mblen(s, strlen(s));
+ if (len > 0)
+ np = s + len;
+ else
+ np = s + 1;
+
+ setlocale(LC_CTYPE, "");
+
+ return (char *) np;
+}
+
+int wsprintf(char *s, const char *format, ...) {
+ va_list val;
+ va_start(val, format);
+ int res = vsnprintf(s, 1024, format, val);
+ va_end(val);
+ return res;
+}
+
+// iconv const inconsistency workaround by Alexandre Oliva
+template <typename T>
+inline size_t __iconv_adaptor
+ (size_t (*iconv_func)(iconv_t, T, size_t *, char**,size_t*),
+ iconv_t cd, char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft)
+{
+ return iconv_func (cd, (T)inbuf, inbytesleft, outbuf, outbytesleft);
+}
+
+void static create_code_page_string(char *buf, size_t len, UINT code_page) {
+ if (code_page == CP_ACP)
+ code_page = 1252;
+
+ snprintf(buf, len, "CP%d", code_page);
+}
+
+int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
+ int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar,
+ LPBOOL lpUsedDefaultChar) {
+ static char buffer[4096];
+
+ char cp[128];
+ create_code_page_string(cp, sizeof(cp), CodePage);
+
+ iconv_t cd = iconv_open(cp, "UCS-2LE");
+ if (cd == (iconv_t) -1) {
+ return 0;
+ }
+
+ if (cchWideChar < 0) {
+ cchWideChar = (int) winchar_strlen(lpWideCharStr) + 1;
+ }
+
+ if (cbMultiByte == 0) {
+ cbMultiByte = sizeof(buffer);
+ lpMultiByteStr = buffer;
+ }
+
+ char *in = (char *) lpWideCharStr;
+ char *out = lpMultiByteStr;
+ size_t inbytes = cchWideChar * sizeof(WCHAR);
+ size_t outbytes = cbMultiByte;
+
+ if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
+ iconv_close(cd);
+ return 0;
+ }
+
+ iconv_close(cd);
+
+ return cbMultiByte - outbytes;
+}
+
+int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
+ int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar) {
+ static WCHAR buffer[4096];
+
+ char cp[128];
+ create_code_page_string(cp, sizeof(cp), CodePage);
+
+ iconv_t cd = iconv_open("UCS-2LE", cp);
+ if (cd == (iconv_t) -1) {
+ return 0;
+ }
+
+ if (cbMultiByte < 0) {
+ cbMultiByte = strlen(lpMultiByteStr) + 1;
+ }
+
+ if (cchWideChar == 0) {
+ cchWideChar = sizeof(buffer);
+ lpWideCharStr = buffer;
+ }
+
+ char *in = (char *) lpMultiByteStr;
+ char *out = (char *) lpWideCharStr;
+ size_t inbytes = cbMultiByte;
+ size_t outbytes = cchWideChar * sizeof(WCHAR);
+
+ if (__iconv_adaptor(iconv, cd, &in, &inbytes, &out, &outbytes) == (size_t) -1) {
+ iconv_close(cd);
+ return 0;
+ }
+
+ iconv_close(cd);
+
+ return cchWideChar - (outbytes / sizeof (WCHAR));
+}
+
+BOOL IsValidCodePage(UINT CodePage)
+{
+ char cp[128];
+ create_code_page_string(cp, sizeof(cp), CodePage);
+
+ iconv_t cd = iconv_open("UCS-2LE", cp);
+ if (cd == (iconv_t) -1)
+ return FALSE;
+
+ iconv_close(cd);
+
+ return TRUE;
+}
+
+#define MY_ERROR_MSG(x) {if (g_display_errors) {fprintf(g_output,"%s", x);}}
+
+char *my_convert(const char *path)
+{
+ // TODO: (orip) ref. this func. to use std::string?
+ char *converted_path = strdup(path);
+ size_t len = strlen(path);
+
+ if(!converted_path)
+ {
+ MY_ERROR_MSG("Error: could not allocate memory in my_convert()\n");
+ return (char*) path; /* dirty */
+ }
+
+ /* Replace drive letter X: by /X */
+ if(len >= 2)
+ {
+ if (path[1] == ':')
+ {
+ converted_path[0] = '/';
+ converted_path[1] = (char) tolower((int) path[0]);
+ }
+ }
+
+ char *p = converted_path;
+
+ do
+ {
+ if (*p == '\\')
+ {
+ *p = '/';
+ }
+ p = CharNext(p);
+ }
+ while (*p);
+
+ return converted_path;
+}
+
+void my_convert_free(char *converted_path)
+{
+ free(converted_path);
+}
+
+int my_open(const char *pathname, int flags)
+{
+ char *converted_pathname = my_convert(pathname);
+
+ int result = open(converted_pathname, flags);
+ my_convert_free(converted_pathname);
+ return result;
+}
+
+FILE *my_fopen(const char *path, const char *mode)
+{
+ char *converted_path = my_convert(path);
+
+ FILE *result = fopen(converted_path, mode);
+ my_convert_free(converted_path);
+ return result;
+}
+#endif//!_WIN32
+
+void *operator new(size_t size) throw(bad_alloc) {
+ void *p = malloc(size);
+ if (!p)
+ throw bad_alloc();
+ return p;
+}
+
+void operator delete(void *p) throw() {
+ if (p) free(p);
+}
+
+void operator delete [](void *p) throw() {
+ if (p) free(p);
+}
+
+size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) {
+ return strftime(s, max, fmt, tm);
+}
+
+string get_full_path(const string &path) {
+#ifdef _WIN32
+ char *throwaway;
+ char real_path[1024];
+ int rc = GetFullPathName(path.c_str(),1024,real_path,&throwaway);
+ assert(rc <= 1024); // path size is limited by MAX_PATH (260)
+ assert(rc != 0); // rc==0 in case of error
+ return string(real_path);
+#else//_WIN32
+#ifdef PATH_MAX
+ static char buffer[PATH_MAX];
+#else//PATH_MAX
+ int path_max = pathconf(path, _PC_PATH_MAX);
+ if (path_max <= 0)
+ path_max = 4096;
+ char *buffer = (char *) malloc(path_max);
+ if (!buffer)
+ return string(path);
+#endif//PATH_MAX
+ if (!realpath(path.c_str(), buffer))
+ strcpy(buffer, path.c_str());
+ string result(buffer);
+#ifndef PATH_MAX
+ free(buffer);
+#endif//!PATH_MAX
+ return result;
+#endif//_WIN32
+}
+
+string get_string_prefix(const string& str, const string& separator) {
+ const string::size_type last_separator_pos = str.rfind(separator);
+ if (last_separator_pos == string::npos)
+ return str;
+ return str.substr(0, last_separator_pos);
+}
+
+string get_string_suffix(const string& str, const string& separator) {
+ const string::size_type last_separator_pos = str.rfind(separator);
+ if (last_separator_pos == string::npos)
+ return str;
+ return str.substr(last_separator_pos + separator.size(), string::npos);
+}
+
+string get_dir_name(const string& path) {
+ return get_string_prefix(path, PLATFORM_PATH_SEPARATOR_STR);
+}
+
+string get_file_name(const string& path) {
+ return get_string_suffix(path, PLATFORM_PATH_SEPARATOR_STR);
+}
+
+string get_executable_path(const char* argv0) {
+#ifdef _WIN32
+ char temp_buf[MAX_PATH+1];
+ temp_buf[0] = '\0';
+ int rc = GetModuleFileName(NULL,temp_buf,MAX_PATH);
+ assert(rc != 0);
+ return string(temp_buf);
+#elif __APPLE__
+ char temp_buf[MAXPATHLEN+1];
+ unsigned int buf_len = MAXPATHLEN;
+ int rc = Apple::_NSGetExecutablePath(temp_buf, &buf_len);
+ assert(rc == 0);
+ return string(temp_buf);
+#else /* Linux/BSD/POSIX/etc */
+ const char *envpath = getenv("_");
+ if( envpath != NULL ) return get_full_path( envpath );
+ else {
+ char* pathtmp;
+ char* path = NULL;
+ size_t len = 100;
+ int nchars;
+ while(1){
+ pathtmp = (char*)realloc(path,len+1);
+ if( pathtmp == NULL ){
+ free(path);
+ return get_full_path(argv0);
+ }
+ path = pathtmp;
+ nchars = readlink("/proc/self/exe", path, len);
+ if( nchars == -1 ){
+ free(path);
+ return get_full_path(argv0);
+ }
+ if( nchars < (int) len ){
+ path[nchars] = '\0';
+ string result(path);
+ free(path);
+ return result;
+ }
+ len *= 2;
+ }
+ }
+#endif
+}
+
+string get_executable_dir(const char *argv0) {
+ return get_dir_name(get_executable_path(argv0));
+}
+
+string remove_file_extension(const string& path) {
+ return get_string_prefix(path, ".");
+}
+
+string lowercase(const string &str) {
+ string result = str;
+ transform(str.begin(), str.end(), result.begin(), tolower);
+ return result;
+}
+
+int sane_system(const char *command) {
+#ifdef _WIN32
+
+ // workaround for bug #1509909
+ // http://sf.net/tracker/?func=detail&atid=373085&aid=1509909&group_id=22049
+ //
+ // cmd.exe /C has some weird handling for quotes. it strips
+ // the surrounding quotes, if they exist. if there are quotes
+ // around the program path and its arguments, it will strip
+ // the outer quotes. this may result in something like:
+ // `program files\nsis\makensis.exe" "args`
+ // which obviously fails...
+ //
+ // to avoid the stripping, a harmless string is prefixed
+ // to the command line.
+
+ string command_s = "IF 1==1 ";
+ command_s += command;
+ return system(command_s.c_str());
+
+#else
+
+ return system(command);
+
+#endif
+}
+
+static bool GetDLLVersionUsingRE(const string& filepath, DWORD& high, DWORD & low)
+{
+ bool found = false;
+
+ FILE *fdll = FOPEN(filepath.c_str(), "rb");
+ if (!fdll)
+ return 0;
+
+ fseek(fdll, 0, SEEK_END);
+ unsigned int len = ftell(fdll);
+ fseek(fdll, 0, SEEK_SET);
+
+ LPBYTE dll = (LPBYTE) malloc(len);
+
+ if (!dll)
+ {
+ fclose(fdll);
+ return 0;
+ }
+
+ if (fread(dll, 1, len, fdll) != len)
+ {
+ fclose(fdll);
+ free(dll);
+ return 0;
+ }
+
+ try
+ {
+ CResourceEditor *dllre = new CResourceEditor(dll, len);
+ LPBYTE ver = dllre->GetResourceA(VS_FILE_INFO, MAKEINTRESOURCE(VS_VERSION_INFO), 0);
+ int versize = dllre->GetResourceSizeA(VS_FILE_INFO, MAKEINTRESOURCE(VS_VERSION_INFO), 0);
+
+ if (ver)
+ {
+ if ((size_t) versize > sizeof(WORD) * 3)
+ {
+ // get VS_FIXEDFILEINFO from VS_VERSIONINFO
+ WCHAR *szKey = (WCHAR *)(ver + sizeof(WORD) * 3);
+ int len = (winchar_strlen(szKey) + 1) * sizeof(WCHAR) + sizeof(WORD) * 3;
+ len = (len + 3) & ~3; // align on DWORD boundry
+ VS_FIXEDFILEINFO *verinfo = (VS_FIXEDFILEINFO *)(ver + len);
+ if (versize > len && verinfo->dwSignature == VS_FFI_SIGNATURE)
+ {
+ low = verinfo->dwFileVersionLS;
+ high = verinfo->dwFileVersionMS;
+ found = true;
+ }
+ }
+ dllre->FreeResource(ver);
+ }
+
+ delete dllre;
+ }
+ catch (exception&)
+ {
+ }
+
+ return found;
+}
+
+static bool GetDLLVersionUsingAPI(const string& filepath, DWORD& high, DWORD& low)
+{
+ bool found = false;
+
+#ifdef _WIN32
+ char path[1024];
+ char *name;
+ path[0] = 0;
+
+ GetFullPathName(filepath.c_str(), 1024, path, &name);
+
+ DWORD d;
+ DWORD verSize = GetFileVersionInfoSize(path, &d);
+ if (verSize)
+ {
+ void *buf = (void *) GlobalAlloc(GPTR, verSize);
+ if (buf)
+ {
+ UINT uLen;
+ VS_FIXEDFILEINFO *pvsf;
+ if (GetFileVersionInfo(path, 0, verSize, buf) && VerQueryValue(buf, "\\", (void**) &pvsf, &uLen))
+ {
+ low = pvsf->dwFileVersionLS;
+ high = pvsf->dwFileVersionMS;
+ found = true;
+ }
+ GlobalFree(buf);
+ }
+ }
+#endif
+
+ return found;
+}
+
+#ifdef _WIN32
+
+// the following structure must be byte-aligned.
+#pragma pack( push, pre_vxd_ver, 1 )
+typedef struct _VXD_VERSION_RESOURCE {
+ char cType;
+ WORD wID;
+ char cName;
+ WORD wOrdinal;
+ WORD wFlags;
+ DWORD dwResSize;
+ BYTE bVerData;
+} VXD_VERSION_RESOURCE, *PVXD_VERSION_RESOURCE;
+#pragma pack( pop, pre_vxd_ver )
+
+static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData )
+{
+
+ HANDLE hFile = NULL;
+ HANDLE hFileMapping = NULL;
+ void * pView = NULL;
+ DWORD dwSize = 0;
+ DWORD dwError = 0;
+
+ PIMAGE_DOS_HEADER pDosExeHdr = NULL;
+ PIMAGE_NT_HEADERS pNtExeHdr = NULL;
+ PIMAGE_VXD_HEADER pLEHdr = NULL;
+ PVXD_VERSION_RESOURCE pVerRes = NULL;
+ LPVOID pRawRes = NULL;
+
+ // Open the file for shared read access.
+ hFile = CreateFile( szFile, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, 0, NULL );
+ if ( hFile == INVALID_HANDLE_VALUE )
+ {
+ return FALSE;
+ }
+
+ // Create a read-only file mapping object for the file.
+ hFileMapping = CreateFileMapping( hFile, NULL,
+ PAGE_READONLY, 0, 0, NULL);
+ if ( !hFileMapping )
+ {
+ dwError = GetLastError();
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError( dwError );
+ return FALSE;
+ }
+
+ // Map a view of the the file.
+ pView = MapViewOfFile( hFileMapping, FILE_MAP_READ, 0, 0, 0 );
+ if ( !pView )
+ {
+ dwError = GetLastError();
+
+ if ( hFileMapping )
+ CloseHandle( hFileMapping );
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError( dwError );
+ return FALSE;
+ }
+
+ // The DOS header begins at byte 0.
+ pDosExeHdr = (PIMAGE_DOS_HEADER) pView;
+
+ // Check to make sure the file has a DOS EXE header.
+ if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE )
+ {
+ if ( pView )
+ UnmapViewOfFile( pView );
+
+ if ( hFileMapping )
+ CloseHandle( hFileMapping );
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError( ERROR_BAD_FORMAT );
+ return FALSE;
+ }
+
+ // Find the beginning of the NT header at offset e_lfanew.
+ pNtExeHdr = (PIMAGE_NT_HEADERS) ( (DWORD) pView
+ + (DWORD) pDosExeHdr->e_lfanew );
+
+ // Check to make sure the file is a VxD.
+ if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE )
+ {
+ if ( pView )
+ UnmapViewOfFile( pView );
+
+ if ( hFileMapping )
+ CloseHandle( hFileMapping );
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError( ERROR_BAD_FORMAT );
+ return FALSE;
+ }
+
+ // The LE header begins at the same place as the NT header.
+ pLEHdr = (PIMAGE_VXD_HEADER) pNtExeHdr;
+
+ // e32_winreslen contains the size of the VxD's version resource.
+ if ( pLEHdr->e32_winreslen == 0 ) {
+ *lpdwLen = 0;
+ if ( pView )
+ UnmapViewOfFile( pView );
+
+ if ( hFileMapping )
+ CloseHandle( hFileMapping );
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError( ERROR_RESOURCE_DATA_NOT_FOUND );
+ return FALSE;
+ }
+
+ // e32_winresoff contains the offset of the resource in the VxD.
+ pVerRes = (VXD_VERSION_RESOURCE *) ( (DWORD) pView
+ + (DWORD) pLEHdr->e32_winresoff );
+ dwSize = pVerRes->dwResSize;
+ pRawRes = &(pVerRes->bVerData);
+
+ // Make sure the supplied buffer is large enough for the resource.
+ if ( ( lpData == NULL ) || ( *lpdwLen < dwSize ) ) {
+ *lpdwLen = dwSize;
+
+ if ( pView )
+ UnmapViewOfFile( pView );
+
+ if ( hFileMapping )
+ CloseHandle( hFileMapping );
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError( ERROR_INSUFFICIENT_BUFFER );
+ return FALSE;
+ }
+
+ // Zero the passed buffer and copy the resource into it.
+ ZeroMemory( lpData, *lpdwLen );
+ CopyMemory( lpData, pRawRes, dwSize );
+ *lpdwLen = dwSize;
+
+ // Clean up resources.
+ if ( pView )
+ UnmapViewOfFile( pView );
+
+ if ( hFileMapping )
+ CloseHandle( hFileMapping );
+
+ if ( hFile != INVALID_HANDLE_VALUE )
+ CloseHandle( hFile );
+
+ SetLastError(0);
+ return TRUE;
+}
+
+static DWORD GetVxdVersionInfoSize( LPCSTR szFile )
+{
+ DWORD dwResult = 0;
+
+ // Call GetVxdVersion() with NULL for the pointer to the buffer.
+ if ( !GetVxdVersion( szFile, &dwResult, NULL ) )
+ {
+ DWORD dwError = GetLastError();
+
+ // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and
+ // the required buffer size will be returned in dwResult.
+ if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER )
+ {
+ SetLastError( 0 );
+ return dwResult;
+ }
+ }
+
+ // The following line is never executed.
+ return 0;
+}
+
+static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData )
+{
+ return GetVxdVersion( szFile, &dwLen, lpData );
+}
+
+#endif //_WIN32
+
+static bool GetDLLVersionFromVXD(const string& filepath, DWORD& high, DWORD& low)
+{
+ bool found = false;
+
+#ifdef _WIN32
+ DWORD verSize = GetVxdVersionInfoSize(filepath.c_str());
+ if (verSize)
+ {
+ void *buf = (void *) GlobalAlloc(GPTR, verSize);
+ if (buf)
+ {
+ UINT uLen;
+ VS_FIXEDFILEINFO *pvsf;
+ if (GetVxdVersionInfo(filepath.c_str(), verSize, buf) && VerQueryValue(buf, "\\", (void**) &pvsf, &uLen))
+ {
+ low = pvsf->dwFileVersionLS;
+ high = pvsf->dwFileVersionMS;
+ found = true;
+ }
+ GlobalFree(buf);
+ }
+ }
+#endif
+
+ return found;
+}
+
+bool GetDLLVersion(const string& filepath, DWORD& high, DWORD& low)
+{
+ if (GetDLLVersionUsingAPI(filepath, high, low))
+ return true;
+
+ if (GetDLLVersionUsingRE(filepath, high, low))
+ return true;
+
+ if (GetDLLVersionFromVXD(filepath, high, low))
+ return true;
+
+ return false;
+}
diff --git a/Source/util.h b/Source/util.h
index b29c4a8..9f1a480 100755
--- a/Source/util.h
+++ b/Source/util.h
@@ -1,156 +1,146 @@
-/*
- * util.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 _UTIL_H_
-#define _UTIL_H_
-
-#include <string> // for std::string
-
-#include "boost/scoped_ptr.hpp" // for boost::scoped_ptr
-#include "ResourceEditor.h"
-
-#ifndef _WIN32
-# include <iconv.h>
-# include <stdio.h>
-#endif
-
-
-// these are the standard pause-before-quit shit.
-extern int g_dopause;
-extern void dopause(void);
-
-// Adds the bitmap in filename using resource editor re as id id.
-// If width or height are specified it will also make sure the bitmap is in that size
-int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width=0, int height=0, int maxbpp=0);
-
-// reads icon file filename and places its icons in the resource wIconId using resource editor re
-void replace_icon(CResourceEditor* re, WORD wIconId, const char* filename);
-
-#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
-// returns the data of the uninstaller icon (inside filename) that should replace the installer icon data
-unsigned char* generate_uninstall_icon_data(const char* filename, size_t &size);
-// Fill the array of icons for uninstall with their offsets
-int generate_unicons_offsets(unsigned char* exeHeader, size_t exeHeaderSize, unsigned char* uninstIconData);
-#endif//NSIS_CONFIG_UNINSTALL_SUPPORT
-
-size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm);
-
-bool GetDLLVersion(const std::string& filepath, DWORD& high, DWORD& low);
-
-std::string get_full_path(const std::string& path);
-std::string get_dir_name(const std::string& path);
-std::string get_file_name(const std::string& path);
-std::string get_executable_dir(const char *argv0);
-std::string remove_file_extension(const std::string& path);
-std::string lowercase(const std::string&);
-
-std::string get_string_prefix(const std::string& str, const std::string& separator);
-std::string get_string_suffix(const std::string& str, const std::string& separator);
-
-int sane_system(const char *command);
-
-#ifndef _WIN32
-char *CharPrev(const char *s, const char *p);
-char *CharNext(const char *s);
-char *CharNextExA(WORD codepage, const char *s, int flags);
-int wsprintf(char *s, const char *format, ...);
-int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
- int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar,
- LPBOOL lpUsedDefaultChar);
-int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
- int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
-BOOL IsValidCodePage(UINT CodePage);
-
-char *my_convert(const char *path);
-void my_convert_free(char *converted_path);
-int my_open(const char *pathname, int flags);
-FILE *my_fopen(const char *path, const char *mode);
-
-#define FOPEN(a, b) my_fopen(a, b)
-#define OPEN(a, b) my_open(a, b)
-
-#else
-
-#define FOPEN(a, b) fopen(a, b)
-#define OPEN(a, b) open(a, b)
-#endif
-
-// round a value up to be a multiple of 512
-// assumption: T is an int type
-template <class T>
-inline T align_to_512(const T x) {
- return (x+511) & ~511;
-}
-
-// ================
-// ResourceManagers
-// ================
-
-// When a ResourceManager instance goes out of scope, it will run
-// _FREE_RESOURCE on the resource.
-// Example use:
-// int fd = open(..);
-// assert(fd != -1);
-// MANAGE_WITH(fd, close);
-
-class BaseResourceManager {
-protected:
- BaseResourceManager() {}
-public:
- virtual ~BaseResourceManager() {}
-};
-
-template <typename _RESOURCE, typename _FREE_RESOURCE>
-class ResourceManager : public BaseResourceManager {
-public:
- ResourceManager(_RESOURCE& resource) : m_resource(resource) {}
- virtual ~ResourceManager() { m_free_resource(m_resource); };
-private: // members
- _RESOURCE& m_resource;
- _FREE_RESOURCE m_free_resource;
-private: // don't copy instances
- ResourceManager(const ResourceManager&);
- void operator=(const ResourceManager&);
-};
-
-#define RM_MANGLE_FREEFUNC(freefunc) \
- __free_with_##freefunc
-
-#define RM_DEFINE_FREEFUNC(freefunc) \
-struct RM_MANGLE_FREEFUNC(freefunc) { \
- template <typename T> void operator()(T& x) { freefunc(x); } \
-}
-
-typedef boost::scoped_ptr<BaseResourceManager> ResourceManagerPtr;
-
-template<typename _FREE_RESOURCE, typename _RESOURCE>
-void createResourceManager(_RESOURCE& resource, ResourceManagerPtr& ptr) {
- ptr.reset(new ResourceManager<_RESOURCE, _FREE_RESOURCE>(resource));
-}
-
-#define RM_MANGLE_RESOURCE(resource) resource##_autoManager
-#define MANAGE_WITH(resource, freefunc) \
- ResourceManagerPtr RM_MANGLE_RESOURCE(resource); \
- createResourceManager<RM_MANGLE_FREEFUNC(freefunc)>( \
- resource, RM_MANGLE_RESOURCE(resource))
-
-// Add more resource-freeing functions here when you need them
-RM_DEFINE_FREEFUNC(close);
-RM_DEFINE_FREEFUNC(CloseHandle);
-RM_DEFINE_FREEFUNC(fclose);
-RM_DEFINE_FREEFUNC(free);
-
-#endif //_UTIL_H_
+/*
+ * util.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 _UTIL_H_
+#define _UTIL_H_
+
+#include <string> // for std::string
+
+#include "boost/scoped_ptr.hpp" // for boost::scoped_ptr
+#include "ResourceEditor.h"
+
+#ifndef _WIN32
+# include <iconv.h>
+# include <stdio.h>
+#endif
+
+
+// these are the standard pause-before-quit shit.
+extern int g_dopause;
+extern void dopause(void);
+
+// Adds the bitmap in filename using resource editor re as id id.
+// If width or height are specified it will also make sure the bitmap is in that size
+int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width=0, int height=0, int maxbpp=0);
+
+size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm);
+
+bool GetDLLVersion(const std::string& filepath, DWORD& high, DWORD& low);
+
+std::string get_full_path(const std::string& path);
+std::string get_dir_name(const std::string& path);
+std::string get_file_name(const std::string& path);
+std::string get_executable_dir(const char *argv0);
+std::string remove_file_extension(const std::string& path);
+std::string lowercase(const std::string&);
+
+std::string get_string_prefix(const std::string& str, const std::string& separator);
+std::string get_string_suffix(const std::string& str, const std::string& separator);
+
+int sane_system(const char *command);
+
+#ifndef _WIN32
+char *CharPrev(const char *s, const char *p);
+char *CharNext(const char *s);
+char *CharNextExA(WORD codepage, const char *s, int flags);
+int wsprintf(char *s, const char *format, ...);
+int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr,
+ int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar,
+ LPBOOL lpUsedDefaultChar);
+int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr,
+ int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
+BOOL IsValidCodePage(UINT CodePage);
+
+char *my_convert(const char *path);
+void my_convert_free(char *converted_path);
+int my_open(const char *pathname, int flags);
+FILE *my_fopen(const char *path, const char *mode);
+
+#define FOPEN(a, b) my_fopen(a, b)
+#define OPEN(a, b) my_open(a, b)
+
+#else
+
+#define FOPEN(a, b) fopen(a, b)
+#define OPEN(a, b) open(a, b)
+#endif
+
+// round a value up to be a multiple of 512
+// assumption: T is an int type
+template <class T>
+inline T align_to_512(const T x) {
+ return (x+511) & ~511;
+}
+
+// ================
+// ResourceManagers
+// ================
+
+// When a ResourceManager instance goes out of scope, it will run
+// _FREE_RESOURCE on the resource.
+// Example use:
+// int fd = open(..);
+// assert(fd != -1);
+// MANAGE_WITH(fd, close);
+
+class BaseResourceManager {
+protected:
+ BaseResourceManager() {}
+public:
+ virtual ~BaseResourceManager() {}
+};
+
+template <typename _RESOURCE, typename _FREE_RESOURCE>
+class ResourceManager : public BaseResourceManager {
+public:
+ ResourceManager(_RESOURCE& resource) : m_resource(resource) {}
+ virtual ~ResourceManager() { m_free_resource(m_resource); };
+private: // members
+ _RESOURCE& m_resource;
+ _FREE_RESOURCE m_free_resource;
+private: // don't copy instances
+ ResourceManager(const ResourceManager&);
+ void operator=(const ResourceManager&);
+};
+
+#define RM_MANGLE_FREEFUNC(freefunc) \
+ __free_with_##freefunc
+
+#define RM_DEFINE_FREEFUNC(freefunc) \
+struct RM_MANGLE_FREEFUNC(freefunc) { \
+ template <typename T> void operator()(T& x) { freefunc(x); } \
+}
+
+typedef boost::scoped_ptr<BaseResourceManager> ResourceManagerPtr;
+
+template<typename _FREE_RESOURCE, typename _RESOURCE>
+void createResourceManager(_RESOURCE& resource, ResourceManagerPtr& ptr) {
+ ptr.reset(new ResourceManager<_RESOURCE, _FREE_RESOURCE>(resource));
+}
+
+#define RM_MANGLE_RESOURCE(resource) resource##_autoManager
+#define MANAGE_WITH(resource, freefunc) \
+ ResourceManagerPtr RM_MANGLE_RESOURCE(resource); \
+ createResourceManager<RM_MANGLE_FREEFUNC(freefunc)>( \
+ resource, RM_MANGLE_RESOURCE(resource))
+
+// Add more resource-freeing functions here when you need them
+RM_DEFINE_FREEFUNC(close);
+RM_DEFINE_FREEFUNC(CloseHandle);
+RM_DEFINE_FREEFUNC(fclose);
+RM_DEFINE_FREEFUNC(free);
+
+#endif //_UTIL_H_
diff --git a/Source/winchar.cpp b/Source/winchar.cpp
index 8657867..87d446b 100755
--- a/Source/winchar.cpp
+++ b/Source/winchar.cpp
@@ -1,126 +1,126 @@
-/*
- * winchar.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-#include "winchar.h"
-#include "util.h"
-
-#include <stdexcept>
-
-using std::runtime_error;
-
-WCHAR *winchar_fromansi(const char* s, unsigned int codepage/*=CP_ACP*/)
-{
- int l = MultiByteToWideChar(codepage, 0, s, -1, 0, 0);
- if (l == 0)
- throw runtime_error("Unicode conversion failed");
-
- WCHAR *ws = new WCHAR[l + 1];
-
- if (MultiByteToWideChar(codepage, 0, s, -1, ws, l + 1) == 0)
- throw runtime_error("Unicode conversion failed");
-
- return ws;
-}
-
-char *winchar_toansi(const WCHAR* ws, unsigned int codepage/*=CP_ACP*/)
-{
- int l = WideCharToMultiByte(codepage, 0, ws, -1, 0, 0, 0, 0);
- if (l == 0)
- throw runtime_error("Unicode conversion failed");
-
- char *s = new char[l + 1];
-
- if (WideCharToMultiByte(codepage, 0, ws, -1, s, l + 1, 0, 0) == 0)
- throw runtime_error("Unicode conversion failed");
-
- return s;
-}
-
-WCHAR *winchar_strcpy(WCHAR *ws1, const WCHAR *ws2)
-{
- WCHAR *ret = ws1;
-
- while (*ws2)
- {
- *ws1++ = *ws2++;
- }
-
- *ws1 = 0;
-
- return ret;
-}
-
-WCHAR *winchar_strncpy(WCHAR *ws1, const WCHAR *ws2, size_t n)
-{
- WCHAR *ret = ws1;
-
- while (n && *ws2)
- {
- *ws1++ = *ws2++;
- n--;
- }
-
- while (n--)
- {
- *ws1++ = 0;
- }
-
- return ret;
-}
-
-size_t winchar_strlen(const WCHAR *ws)
-{
- size_t len = 0;
-
- while (*ws++)
- {
- len++;
- }
-
- return len;
-}
-
-WCHAR *winchar_strdup(const WCHAR *ws)
-{
- WCHAR *dup = new WCHAR[winchar_strlen(ws) + 1];
- winchar_strcpy(dup, ws);
- return dup;
-}
-
-int winchar_strcmp(const WCHAR *ws1, const WCHAR *ws2)
-{
- int diff = 0;
-
- do
- {
- diff = static_cast<int>(*ws1) - static_cast<int>(*ws2);
- }
- while (*ws1++ && *ws2++ && !diff);
-
- return diff;
-}
-
-int winchar_stoi(const WCHAR *ws)
-{
- char *s = winchar_toansi(ws);
-
- int ret = atoi(s);
-
- delete [] s;
-
- return ret;
-}
+/*
+ * winchar.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+#include "winchar.h"
+#include "util.h"
+
+#include <stdexcept>
+
+using std::runtime_error;
+
+WCHAR *winchar_fromansi(const char* s, unsigned int codepage/*=CP_ACP*/)
+{
+ int l = MultiByteToWideChar(codepage, 0, s, -1, 0, 0);
+ if (l == 0)
+ throw runtime_error("Unicode conversion failed");
+
+ WCHAR *ws = new WCHAR[l + 1];
+
+ if (MultiByteToWideChar(codepage, 0, s, -1, ws, l + 1) == 0)
+ throw runtime_error("Unicode conversion failed");
+
+ return ws;
+}
+
+char *winchar_toansi(const WCHAR* ws, unsigned int codepage/*=CP_ACP*/)
+{
+ int l = WideCharToMultiByte(codepage, 0, ws, -1, 0, 0, 0, 0);
+ if (l == 0)
+ throw runtime_error("Unicode conversion failed");
+
+ char *s = new char[l + 1];
+
+ if (WideCharToMultiByte(codepage, 0, ws, -1, s, l + 1, 0, 0) == 0)
+ throw runtime_error("Unicode conversion failed");
+
+ return s;
+}
+
+WCHAR *winchar_strcpy(WCHAR *ws1, const WCHAR *ws2)
+{
+ WCHAR *ret = ws1;
+
+ while (*ws2)
+ {
+ *ws1++ = *ws2++;
+ }
+
+ *ws1 = 0;
+
+ return ret;
+}
+
+WCHAR *winchar_strncpy(WCHAR *ws1, const WCHAR *ws2, size_t n)
+{
+ WCHAR *ret = ws1;
+
+ while (n && *ws2)
+ {
+ *ws1++ = *ws2++;
+ n--;
+ }
+
+ while (n--)
+ {
+ *ws1++ = 0;
+ }
+
+ return ret;
+}
+
+size_t winchar_strlen(const WCHAR *ws)
+{
+ size_t len = 0;
+
+ while (*ws++)
+ {
+ len++;
+ }
+
+ return len;
+}
+
+WCHAR *winchar_strdup(const WCHAR *ws)
+{
+ WCHAR *dup = new WCHAR[winchar_strlen(ws) + 1];
+ winchar_strcpy(dup, ws);
+ return dup;
+}
+
+int winchar_strcmp(const WCHAR *ws1, const WCHAR *ws2)
+{
+ int diff = 0;
+
+ do
+ {
+ diff = static_cast<int>(*ws1) - static_cast<int>(*ws2);
+ }
+ while (*ws1++ && *ws2++ && !diff);
+
+ return diff;
+}
+
+int winchar_stoi(const WCHAR *ws)
+{
+ char *s = winchar_toansi(ws);
+
+ int ret = atoi(s);
+
+ delete [] s;
+
+ return ret;
+}
diff --git a/Source/winchar.h b/Source/winchar.h
index b0be250..07ac7e7 100755
--- a/Source/winchar.h
+++ b/Source/winchar.h
@@ -1,26 +1,26 @@
-/*
- * winchar.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "Platform.h"
-
-WCHAR *winchar_fromansi(const char* s, unsigned int codepage = CP_ACP);
-char *winchar_toansi(const WCHAR* ws, unsigned int codepage = CP_ACP);
-WCHAR *winchar_strcpy(WCHAR *ws1, const WCHAR *ws2);
-WCHAR *winchar_strncpy(WCHAR *ws1, const WCHAR *ws2, size_t n);
-size_t winchar_strlen(const WCHAR *ws);
-WCHAR *winchar_strdup(const WCHAR *ws);
-int winchar_strcmp(const WCHAR *ws1, const WCHAR *ws2);
-int winchar_stoi(const WCHAR *ws);
+/*
+ * winchar.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "Platform.h"
+
+WCHAR *winchar_fromansi(const char* s, unsigned int codepage = CP_ACP);
+char *winchar_toansi(const WCHAR* ws, unsigned int codepage = CP_ACP);
+WCHAR *winchar_strcpy(WCHAR *ws1, const WCHAR *ws2);
+WCHAR *winchar_strncpy(WCHAR *ws1, const WCHAR *ws2, size_t n);
+size_t winchar_strlen(const WCHAR *ws);
+WCHAR *winchar_strdup(const WCHAR *ws);
+int winchar_strcmp(const WCHAR *ws1, const WCHAR *ws2);
+int winchar_stoi(const WCHAR *ws);
diff --git a/Source/writer.cpp b/Source/writer.cpp
index 20207fd..f41975f 100755
--- a/Source/writer.cpp
+++ b/Source/writer.cpp
@@ -1,89 +1,89 @@
-/*
- * writer.cpp
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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.
- */
-
-#include "exehead/config.h"
-#include "writer.h"
-#include "growbuf.h"
-#include "util.h"
-#include <string.h>
-#include <stdlib.h>
-#include <stdexcept>
-
-void writer_sink::write_byte(const unsigned char b)
-{
- write_data(&b, 1);
-}
-
-void writer_sink::write_short(const short s)
-{
- short fs = FIX_ENDIAN_INT16(s);
- write_data(&fs, sizeof(short));
-}
-
-void writer_sink::write_int(const int i)
-{
- int fi = FIX_ENDIAN_INT32(i);
- write_data(&fi, sizeof(int));
-}
-
-void writer_sink::write_int_array(const int i[], const size_t len)
-{
- for (size_t l = 0; l < len; l++)
- {
- write_int(i[l]);
- }
-}
-
-void writer_sink::write_string(const char *s)
-{
- write_data(s, strlen(s) + 1);
-}
-
-void writer_sink::write_string(const char *s, const size_t size)
-{
- char *wb = new char[size];
- memset(wb, 0, size);
- strncpy(wb, s, size);
- write_data(wb, size);
- delete [] wb;
-}
-
-void writer_sink::write_growbuf(const IGrowBuf *b)
-{
- write_data(b->get(), b->getlen());
-}
-
-void growbuf_writer_sink::write_data(const void *data, const size_t size)
-{
- m_buf->add(data, size);
-}
-
-void file_writer_sink::write_data(const void *data, const size_t size)
-{
- if (fwrite(data, 1, size, m_fp) != size)
- {
- throw std::runtime_error("error writing");
- }
-}
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-#include "crc32.h"
-
-void crc_writer_sink::write_data(const void *data, const size_t size)
-{
- *m_crc = CRC32(*m_crc, (const unsigned char *) data, size);
-}
-#endif
+/*
+ * writer.cpp
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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.
+ */
+
+#include "exehead/config.h"
+#include "writer.h"
+#include "growbuf.h"
+#include "util.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdexcept>
+
+void writer_sink::write_byte(const unsigned char b)
+{
+ write_data(&b, 1);
+}
+
+void writer_sink::write_short(const short s)
+{
+ short fs = FIX_ENDIAN_INT16(s);
+ write_data(&fs, sizeof(short));
+}
+
+void writer_sink::write_int(const int i)
+{
+ int fi = FIX_ENDIAN_INT32(i);
+ write_data(&fi, sizeof(int));
+}
+
+void writer_sink::write_int_array(const int i[], const size_t len)
+{
+ for (size_t l = 0; l < len; l++)
+ {
+ write_int(i[l]);
+ }
+}
+
+void writer_sink::write_string(const char *s)
+{
+ write_data(s, strlen(s) + 1);
+}
+
+void writer_sink::write_string(const char *s, const size_t size)
+{
+ char *wb = new char[size];
+ memset(wb, 0, size);
+ strncpy(wb, s, size);
+ write_data(wb, size);
+ delete [] wb;
+}
+
+void writer_sink::write_growbuf(const IGrowBuf *b)
+{
+ write_data(b->get(), b->getlen());
+}
+
+void growbuf_writer_sink::write_data(const void *data, const size_t size)
+{
+ m_buf->add(data, size);
+}
+
+void file_writer_sink::write_data(const void *data, const size_t size)
+{
+ if (fwrite(data, 1, size, m_fp) != size)
+ {
+ throw std::runtime_error("error writing");
+ }
+}
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+#include "crc32.h"
+
+void crc_writer_sink::write_data(const void *data, const size_t size)
+{
+ *m_crc = CRC32(*m_crc, (const unsigned char *) data, size);
+}
+#endif
diff --git a/Source/writer.h b/Source/writer.h
index 7f672bb..1a26581 100755
--- a/Source/writer.h
+++ b/Source/writer.h
@@ -1,87 +1,87 @@
-/*
- * writer.h
- *
- * This file is a part of NSIS.
- *
- * Copyright (C) 1999-2007 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 ___WRITER__H___
-#define ___WRITER__H___
-
-#include "exehead/config.h"
-#include "growbuf.h"
-#include "crc32.h"
-#include <stdio.h>
-
-class writer_sink {
-public:
- writer_sink() {}
- virtual ~writer_sink() {}
-
- virtual void write_byte(const unsigned char b);
- virtual void write_short(const short s);
- virtual void write_int(const int i);
- virtual void write_int_array(const int i[], const size_t len);
- virtual void write_string(const char *s);
- virtual void write_string(const char *s, const size_t size);
- virtual void write_growbuf(const IGrowBuf *b);
-
- virtual void write_data(const void *data, const size_t size) = 0;
-
-};
-
-class writer {
-public:
- writer(writer_sink *sink) : m_sink(sink) {}
- virtual ~writer() {}
-
-protected:
- writer_sink *m_sink;
-
-};
-
-class growbuf_writer_sink : public writer_sink {
-public:
- growbuf_writer_sink(IGrowBuf *buf) : m_buf(buf) {}
-
- virtual void write_data(const void *data, const size_t size);
-
-private:
- IGrowBuf *m_buf;
-
-};
-
-class file_writer_sink : public writer_sink {
-public:
- file_writer_sink(FILE *fp) : m_fp(fp) {}
-
- virtual void write_data(const void *data, const size_t size);
-
-private:
- FILE *m_fp;
-
-};
-
-#ifdef NSIS_CONFIG_CRC_SUPPORT
-class crc_writer_sink : public writer_sink {
-public:
- crc_writer_sink(crc32_t *crc) : m_crc(crc) {}
-
- virtual void write_data(const void *data, const size_t size);
-
-private:
- crc32_t *m_crc;
-
-};
-#endif
-
-#endif//!___WRITER__H___
+/*
+ * writer.h
+ *
+ * This file is a part of NSIS.
+ *
+ * Copyright (C) 1999-2007 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 ___WRITER__H___
+#define ___WRITER__H___
+
+#include "exehead/config.h"
+#include "growbuf.h"
+#include "crc32.h"
+#include <stdio.h>
+
+class writer_sink {
+public:
+ writer_sink() {}
+ virtual ~writer_sink() {}
+
+ virtual void write_byte(const unsigned char b);
+ virtual void write_short(const short s);
+ virtual void write_int(const int i);
+ virtual void write_int_array(const int i[], const size_t len);
+ virtual void write_string(const char *s);
+ virtual void write_string(const char *s, const size_t size);
+ virtual void write_growbuf(const IGrowBuf *b);
+
+ virtual void write_data(const void *data, const size_t size) = 0;
+
+};
+
+class writer {
+public:
+ writer(writer_sink *sink) : m_sink(sink) {}
+ virtual ~writer() {}
+
+protected:
+ writer_sink *m_sink;
+
+};
+
+class growbuf_writer_sink : public writer_sink {
+public:
+ growbuf_writer_sink(IGrowBuf *buf) : m_buf(buf) {}
+
+ virtual void write_data(const void *data, const size_t size);
+
+private:
+ IGrowBuf *m_buf;
+
+};
+
+class file_writer_sink : public writer_sink {
+public:
+ file_writer_sink(FILE *fp) : m_fp(fp) {}
+
+ virtual void write_data(const void *data, const size_t size);
+
+private:
+ FILE *m_fp;
+
+};
+
+#ifdef NSIS_CONFIG_CRC_SUPPORT
+class crc_writer_sink : public writer_sink {
+public:
+ crc_writer_sink(crc32_t *crc) : m_crc(crc) {}
+
+ virtual void write_data(const void *data, const size_t size);
+
+private:
+ crc32_t *m_crc;
+
+};
+#endif
+
+#endif//!___WRITER__H___
diff --git a/Source/zlib/DEFLATE.H b/Source/zlib/DEFLATE.H
index 0af4034..7dc521b 100755
--- a/Source/zlib/DEFLATE.H
+++ b/Source/zlib/DEFLATE.H
@@ -1,251 +1,251 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-1998 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-
-#ifndef _DEFLATE_H
-#define _DEFLATE_H
-
-#include "ZUTIL.H"
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS 256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES 30
-/* number of distance codes */
-
-#define BL_CODES 19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE 42
-#define BUSY_STATE 113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
- union {
- ush freq; /* frequency count */
- ush code; /* bit string */
- } fc;
- union {
- ush dad; /* father node in Huffman tree */
- ush len; /* length of bit string */
- } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad dl.dad
-#define Len dl.len
-
-typedef struct static_tree_desc_s static_tree_desc;
-
-typedef struct tree_desc_s {
- ct_data *dyn_tree; /* the dynamic tree */
- int max_code; /* largest code with non zero frequency */
- static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
- z_streamp strm; /* pointer back to this zlib stream */
- int status; /* as the name implies */
- Bytef *pending_buf; /* output still pending */
- ulg pending_buf_size; /* size of pending_buf */
- Bytef *pending_out; /* next pending byte to output to the stream */
- int pending; /* nb of bytes in the pending buffer */
- int noheader; /* suppress zlib header and adler32 */
- Byte method; /* STORED (for zip only) or DEFLATED */
- int last_flush; /* value of flush param for previous deflate call */
-
- /* used by deflate.c: */
-
- uInt w_size; /* LZ77 window size (32K by default) */
- uInt w_bits; /* log2(w_size) (8..16) */
- uInt w_mask; /* w_size - 1 */
-
- Bytef *window;
-
- ulg window_size;
-
- Posf *prev;
-
- Posf *head; /* Heads of the hash chains or NIL. */
-
- uInt ins_h; /* hash index of string to be inserted */
- uInt hash_size; /* number of elements in hash table */
- uInt hash_bits; /* log2(hash_size) */
- uInt hash_mask; /* hash_size-1 */
-
- uInt hash_shift;
- long block_start;
-
- uInt match_length; /* length of best match */
- IPos prev_match; /* previous match */
- int match_available; /* set if previous match exists */
- uInt strstart; /* start of string to insert */
- uInt match_start; /* start of matching string */
- uInt lookahead; /* number of valid bytes ahead in window */
-
- uInt prev_length;
-
- uInt max_chain_length;
-
- uInt max_lazy_match;
-# define max_insert_length max_lazy_match
-
- int level; /* compression level (1..9) */
- int strategy; /* favor or force Huffman coding*/
-
- uInt good_match;
-
- int nice_match; /* Stop searching when current match exceeds this */
-
- struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
- struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
- struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
-
- struct tree_desc_s l_desc; /* desc. for literal tree */
- struct tree_desc_s d_desc; /* desc. for distance tree */
- struct tree_desc_s bl_desc; /* desc. for bit length tree */
-
- ush bl_count[MAX_BITS+1];
- /* number of codes at each bit length for an optimal tree */
-
- int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
- int heap_len; /* number of elements in the heap */
- int heap_max; /* element of largest frequency */
-
- uch depth[2*L_CODES+1];
- /* Depth of each subtree used as tie breaker for trees of equal frequency
- */
-
- uchf *l_buf; /* buffer for literals or lengths */
-
- uInt lit_bufsize;
-
- uInt last_lit; /* running index in l_buf */
-
- ushf *d_buf;
-
- ulg opt_len; /* bit length of current block with optimal trees */
- ulg static_len; /* bit length of current block with static trees */
- uInt matches; /* number of string matches in current block */
- int last_eob_len; /* bit length of EOB code for last block */
-
-#ifdef DEBUG
- ulg compressed_len; /* total bit length of compressed file mod 2^32 */
- ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
-#endif
-
- ush bi_buf;
- int bi_valid;
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
- /* in trees.c */
-void _tr_init OF((deflate_state *s));
-int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-void _tr_align OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-
-#define d_code(dist) \
- ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
- extern uch _length_code[];
- extern uch _dist_code[];
-#else
- extern const uch _length_code[];
- extern const uch _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
- { uch cc = (c); \
- s->d_buf[s->last_lit] = 0; \
- s->l_buf[s->last_lit++] = cc; \
- s->dyn_ltree[cc].Freq++; \
- flush = (s->last_lit == s->lit_bufsize-1); \
- }
-# define _tr_tally_dist(s, distance, length, flush) \
- { uch len = (length); \
- ush dist = (distance); \
- s->d_buf[s->last_lit] = dist; \
- s->l_buf[s->last_lit++] = len; \
- dist--; \
- s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
- s->dyn_dtree[d_code(dist)].Freq++; \
- flush = (s->last_lit == s->lit_bufsize-1); \
- }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
- flush = _tr_tally(s, distance, length)
-#endif
-
-#endif
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/* deflate.h -- internal compression state
+ * Copyright (C) 1995-1998 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+
+#ifndef _DEFLATE_H
+#define _DEFLATE_H
+
+#include "ZUTIL.H"
+
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+#define LENGTH_CODES 29
+/* number of length codes, not counting the special END_BLOCK code */
+
+#define LITERALS 256
+/* number of literal bytes 0..255 */
+
+#define L_CODES (LITERALS+1+LENGTH_CODES)
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+#define D_CODES 30
+/* number of distance codes */
+
+#define BL_CODES 19
+/* number of codes used to transfer the bit lengths */
+
+#define HEAP_SIZE (2*L_CODES+1)
+/* maximum heap size */
+
+#define MAX_BITS 15
+/* All codes must not exceed MAX_BITS bits */
+
+#define INIT_STATE 42
+#define BUSY_STATE 113
+#define FINISH_STATE 666
+/* Stream status */
+
+
+/* Data structure describing a single value and its code string. */
+typedef struct ct_data_s {
+ union {
+ ush freq; /* frequency count */
+ ush code; /* bit string */
+ } fc;
+ union {
+ ush dad; /* father node in Huffman tree */
+ ush len; /* length of bit string */
+ } dl;
+} FAR ct_data;
+
+#define Freq fc.freq
+#define Code fc.code
+#define Dad dl.dad
+#define Len dl.len
+
+typedef struct static_tree_desc_s static_tree_desc;
+
+typedef struct tree_desc_s {
+ ct_data *dyn_tree; /* the dynamic tree */
+ int max_code; /* largest code with non zero frequency */
+ static_tree_desc *stat_desc; /* the corresponding static tree */
+} FAR tree_desc;
+
+typedef ush Pos;
+typedef Pos FAR Posf;
+typedef unsigned IPos;
+
+/* A Pos is an index in the character window. We use short instead of int to
+ * save space in the various tables. IPos is used only for parameter passing.
+ */
+
+typedef struct internal_state {
+ z_streamp strm; /* pointer back to this zlib stream */
+ int status; /* as the name implies */
+ Bytef *pending_buf; /* output still pending */
+ ulg pending_buf_size; /* size of pending_buf */
+ Bytef *pending_out; /* next pending byte to output to the stream */
+ int pending; /* nb of bytes in the pending buffer */
+ int noheader; /* suppress zlib header and adler32 */
+ Byte method; /* STORED (for zip only) or DEFLATED */
+ int last_flush; /* value of flush param for previous deflate call */
+
+ /* used by deflate.c: */
+
+ uInt w_size; /* LZ77 window size (32K by default) */
+ uInt w_bits; /* log2(w_size) (8..16) */
+ uInt w_mask; /* w_size - 1 */
+
+ Bytef *window;
+
+ ulg window_size;
+
+ Posf *prev;
+
+ Posf *head; /* Heads of the hash chains or NIL. */
+
+ uInt ins_h; /* hash index of string to be inserted */
+ uInt hash_size; /* number of elements in hash table */
+ uInt hash_bits; /* log2(hash_size) */
+ uInt hash_mask; /* hash_size-1 */
+
+ uInt hash_shift;
+ long block_start;
+
+ uInt match_length; /* length of best match */
+ IPos prev_match; /* previous match */
+ int match_available; /* set if previous match exists */
+ uInt strstart; /* start of string to insert */
+ uInt match_start; /* start of matching string */
+ uInt lookahead; /* number of valid bytes ahead in window */
+
+ uInt prev_length;
+
+ uInt max_chain_length;
+
+ uInt max_lazy_match;
+# define max_insert_length max_lazy_match
+
+ int level; /* compression level (1..9) */
+ int strategy; /* favor or force Huffman coding*/
+
+ uInt good_match;
+
+ int nice_match; /* Stop searching when current match exceeds this */
+
+ struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
+ struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+ struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
+
+ struct tree_desc_s l_desc; /* desc. for literal tree */
+ struct tree_desc_s d_desc; /* desc. for distance tree */
+ struct tree_desc_s bl_desc; /* desc. for bit length tree */
+
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
+ int heap_len; /* number of elements in the heap */
+ int heap_max; /* element of largest frequency */
+
+ uch depth[2*L_CODES+1];
+ /* Depth of each subtree used as tie breaker for trees of equal frequency
+ */
+
+ uchf *l_buf; /* buffer for literals or lengths */
+
+ uInt lit_bufsize;
+
+ uInt last_lit; /* running index in l_buf */
+
+ ushf *d_buf;
+
+ ulg opt_len; /* bit length of current block with optimal trees */
+ ulg static_len; /* bit length of current block with static trees */
+ uInt matches; /* number of string matches in current block */
+ int last_eob_len; /* bit length of EOB code for last block */
+
+#ifdef DEBUG
+ ulg compressed_len; /* total bit length of compressed file mod 2^32 */
+ ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
+#endif
+
+ ush bi_buf;
+ int bi_valid;
+
+} FAR deflate_state;
+
+/* Output a byte on the stream.
+ * IN assertion: there is enough room in pending_buf.
+ */
+#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
+
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+/* Minimum amount of lookahead, except at the end of the input file.
+ * See deflate.c for comments about the MIN_MATCH+1.
+ */
+
+#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
+/* In order to simplify the code, particularly on 16 bit machines, match
+ * distances are limited to MAX_DIST instead of WSIZE.
+ */
+
+ /* in trees.c */
+void _tr_init OF((deflate_state *s));
+int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+void _tr_align OF((deflate_state *s));
+void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
+ int eof));
+
+#define d_code(dist) \
+ ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
+/* Mapping from a distance to a distance code. dist is the distance - 1 and
+ * must not have side effects. _dist_code[256] and _dist_code[257] are never
+ * used.
+ */
+
+#ifndef DEBUG
+/* Inline versions of _tr_tally for speed: */
+
+#if defined(GEN_TREES_H) || !defined(STDC)
+ extern uch _length_code[];
+ extern uch _dist_code[];
+#else
+ extern const uch _length_code[];
+ extern const uch _dist_code[];
+#endif
+
+# define _tr_tally_lit(s, c, flush) \
+ { uch cc = (c); \
+ s->d_buf[s->last_lit] = 0; \
+ s->l_buf[s->last_lit++] = cc; \
+ s->dyn_ltree[cc].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+# define _tr_tally_dist(s, distance, length, flush) \
+ { uch len = (length); \
+ ush dist = (distance); \
+ s->d_buf[s->last_lit] = dist; \
+ s->l_buf[s->last_lit++] = len; \
+ dist--; \
+ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+ s->dyn_dtree[d_code(dist)].Freq++; \
+ flush = (s->last_lit == s->lit_bufsize-1); \
+ }
+#else
+# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
+# define _tr_tally_dist(s, distance, length, flush) \
+ flush = _tr_tally(s, distance, length)
+#endif
+
+#endif
diff --git a/Source/zlib/INFBLOCK.C b/Source/zlib/INFBLOCK.C
index 8e937fb..73aef2d 100755
--- a/Source/zlib/INFBLOCK.C
+++ b/Source/zlib/INFBLOCK.C
@@ -1,710 +1,710 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-#include "../Platform.h"
-#include "../exehead/config.h"
-
-#include "ZUTIL.H"
-
-#ifndef min
-# define min(x,y) ((x<y)?x:y)
-#endif
-
-/* defines for inflate input/output */
-/* update pointers and return */
-#define UPDBITS {s->bitb=b;s->bitk=k;}
-#define UPDIN {z->avail_in=n;z->next_in=p;}
-#define UPDOUT {s->write=q;}
-#define UPDATE {UPDBITS UPDIN UPDOUT}
-#define LEAVE(r) {UPDATE inflate_flush(z); return r;}
-
-/* get bytes and bits */
-#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
-
-
-#define NEEDBYTE {if(!n)LEAVE(Z_OK)}
-#define NEXTBYTE (n--,*p++)
-#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-
-#define DUMPBITS(j) {b>>=(j);k-=(j);}
-/* output bytes */
-#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)
-#define LOADOUT {q=s->write;m=(uInt)WAVAIL;}
-#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
-#define FLUSH {UPDOUT inflate_flush(z); LOADOUT}
-#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE(Z_OK)}}}
-#define OUTBYTE(a) {*q++=(Byte)(a);m--;}
-/* load local pointers */
-#define LOAD {LOADIN LOADOUT}
-
-#define LAST (s->last == DRY)
-
-#define FIXEDH 544 /* number of hufts used by fixed tables */
-
-
-
-typedef struct inflate_blocks_state FAR inflate_blocks_statef;
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* And'ing with mask[n] masks the lower n bits */
-local unsigned short inflate_mask[17] = {
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
-}; // use to reduce .data #define INFLATE_MASK(x, n) (x & (~((unsigned short) 0xFFFF << n)))
-local const char border[] = { /* Order of the bit length code lengths */
- 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-/* Tables for deflate from PKZIP's appnote.txt. */
-local const unsigned short cplens[31] = { /* Copy lengths for literal codes 257..285 */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
- /* see note #13 above about 258 */
-local const unsigned short cplext[31] = { /* Extra bits for literal codes 257..285 */
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
- 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */
-local const unsigned short cpdist[30] = { /* Copy offsets for distance codes 0..29 */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577};
-local const unsigned short cpdext[30] = { /* Extra bits for distance codes */
- 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
- 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
- 12, 12, 13, 13};
-
-/* build fixed tables only once--keep them here */
-local char fixed_built = 0;
-local inflate_huft fixed_mem[FIXEDH];
-local uInt fixed_bl=9;
-local uInt fixed_bd=5;
-local inflate_huft *fixed_tl;
-local inflate_huft *fixed_td;
-
-/* copy as much as possible from the sliding window to the output area */
-local void ZEXPORT inflate_flush(z)
-z_streamp z;
-{
- inflate_blocks_statef *s = &z->blocks;
- uInt n;
- Bytef *q;
-
- /* local copies of source and destination pointers */
- q = s->read;
-
-again:
- /* compute number of bytes to copy as far as end of window */
- n = (uInt)((q <= s->write ? s->write : s->end) - q);
- n = min(n, z->avail_out);
-
- /* update counters */
- z->avail_out -= n;
- //z->total_out += n;
-
- /* copy as far as end of window */
- zmemcpy(z->next_out, q, n);
- z->next_out += n;
- q += n;
-
- /* see if more to copy at beginning of window */
- if (q == s->end)
- {
- /* wrap pointers */
- q = s->window;
- if (s->write == s->end)
- s->write = s->window;
-
- /* do the same for the beginning of the window */
- goto again;
- }
-
- /* update pointers */
- s->read = q;
-}
-
-#define BMAX 15 /* maximum bit length of any code */
-
-local int ZEXPORT huft_build(
-uIntf *b, /* code lengths in bits (all assumed <= BMAX) */
-uInt n, /* number of codes (assumed <= 288) */
-uInt s, /* number of simple-valued codes (0..s-1) */
-const unsigned short *d, /* list of base values for non-simple codes */
-const unsigned short *e, /* list of extra bits for non-simple codes */
-inflate_huft * FAR *t, /* result: starting table */
-uIntf *m, /* maximum lookup bits, returns actual */
-inflate_huft *hp, /* space for trees */
-uInt *hn) /* working area: values in order of bit length */
-{
- static uIntf v[288]; /* work area for huft_build */
- uInt a; /* counter for codes of length k */
- uInt c[BMAX+1]; /* bit length count table */
- uInt f; /* i repeats in table every f entries */
- int g; /* maximum code length */
- int h; /* table level */
- uInt i; /* counter, current code */
- uInt j; /* counter */
- int k; /* number of bits in current code */
- int l; /* bits per table (returned in m) */
- uIntf *p; /* pointer into c[], b[], or v[] */
- inflate_huft *q; /* points to current table */
- struct inflate_huft_s r; /* table entry for structure assignment */
- inflate_huft *u[BMAX]; /* table stack */
- int w; /* bits before this table == (l * h) */
- uInt x[BMAX+1]; /* bit offsets, then code stack */
- uIntf *xp; /* pointer into x */
- int y; /* number of dummy codes added */
- uInt z; /* number of entries in current table */
-
-
- /* Generate counts for each bit length */
- p=c;
- y=16; while (y--) *p++ = 0;
- p = b;
- i = n;
- do {
- c[*p++]++; /* assume all entries <= BMAX */
- } while (--i);
- if (c[0] == n) /* null input--all zero length codes */
- {
- *t = (inflate_huft *)Z_NULL;
- *m = 0;
- return Z_OK;
- }
-
-
- /* Find minimum and maximum length, bound *m by those */
- l = *m;
- for (j = 1; j <= BMAX; j++)
- if (c[j])
- break;
- k = j; /* minimum code length */
- if ((uInt)l < j)
- l = j;
- for (i = BMAX; i; i--)
- if (c[i])
- break;
- g = i; /* maximum code length */
- if ((uInt)l > i)
- l = i;
- *m = l;
-
-
- /* Adjust last length count to fill out codes, if needed */
- for (y = 1 << j; j < i; j++, y <<= 1)
- if ((y -= c[j]) < 0)
- return Z_DATA_ERROR;
- if ((y -= c[i]) < 0)
- return Z_DATA_ERROR;
- c[i] += y;
-
-
- /* Generate starting offsets into the value table for each length */
- x[1] = j = 0;
- p = c + 1; xp = x + 2;
- while (--i) { /* note that i == g from above */
- *xp++ = (j += *p++);
- }
-
-
- /* Make a table of values in order of bit lengths */
- p = b; i = 0;
- do {
- if ((j = *p++) != 0)
- v[x[j]++] = i;
- } while (++i < n);
- n = x[g]; /* set n to length of v */
-
-
- /* Generate the Huffman codes and for each, make the table entries */
- x[0] = i = 0; /* first Huffman code is zero */
- p = v; /* grab values in bit order */
- h = -1; /* no tables yet--level -1 */
- w = -l; /* bits decoded == (l * h) */
- u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */
- q = (inflate_huft *)Z_NULL; /* ditto */
- z = 0; /* ditto */
-
- /* go through the bit lengths (k already is bits in shortest code) */
- for (; k <= g; k++)
- {
- a = c[k];
- while (a--)
- {
- int nextw=w;
- /* here i is the Huffman code of length k bits for value *p */
- /* make tables up to required level */
- while (k > (nextw=w + l))
- {
- h++;
-
- /* compute minimum size table less than or equal to l bits */
- z = g - nextw;
- z = z > (uInt)l ? l : z; /* table size upper limit */
- if ((f = 1 << (j = k - nextw)) > a + 1) /* try a k-w bit table */
- { /* too few codes for k-w bit table */
- f -= a + 1; /* deduct codes from patterns left */
- xp = c + k;
- if (j < z)
- while (++j < z && (f <<= 1) > *++xp) /* try smaller tables up to z bits */
- {
- f -= *xp; /* else deduct codes from patterns */
- }
- }
- z = 1 << j; /* table entries for j-bit table */
-
- /* allocate new table */
- if (*hn + z > MANY) /* (note: doesn't matter for fixed) */
- return Z_MEM_ERROR; /* not enough memory */
- u[h] = q = hp + *hn;
- *hn += z;
-
- /* connect to last table, if there is one */
- if (h)
- {
- x[h] = i; /* save pattern for backing up */
- r.bits = (Byte)l; /* bits to dump before this table */
- r.exop = (Byte)j; /* bits in this table */
- j = i >> w;
- r.base = (uInt)(q - u[h-1] - j); /* offset to this table */
- u[h-1][j] = r; /* connect to last table */
- }
- else
- *t = q; /* first table is returned result */
- w=nextw; /* previous table always l bits */
- }
-
- /* set up table entry in r */
- r.bits = (Byte)(k - w);
- if (p >= v + n)
- r.exop = 128 + 64; /* out of values--invalid code */
- else if (*p < s)
- {
- r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */
- r.base = *p++; /* simple code is just the value */
- }
- else
- {
- r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */
- r.base = d[*p++ - s];
- }
-
- /* fill code-like entries with r */
- f = 1 << (k - w);
- for (j = i >> w; j < z; j += f)
- q[j] = r;
-
- /* backwards increment the k-bit code i */
- for (j = 1 << (k - 1); i & j; j >>= 1)
- i ^= j;
- i ^= j;
-
- /* backup over finished tables */
- while ((i & ((1 << w) - 1)) != x[h])
- {
- h--; /* don't need to update q */
- w -= l;
- }
- }
- }
-
-
- /* Return Z_BUF_ERROR if we were given an incomplete table */
- return (y != 0 && g != 1) ? Z_BUF_ERROR : Z_OK;
-}
-
-int ZEXPORT inflate(z_streamp z)
-{
- inflate_blocks_statef *s = &z->blocks;
- inflate_codes_statef *c = &s->sub.decode.t_codes; /* codes state */
-
- // lousy two bytes saved by doing this
- struct
- {
- uInt t; /* temporary storage */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
-
- /* CODES variables */
-
- inflate_huft *j; /* temporary pointer */
- uInt e; /* extra bits or operation */
- Bytef *f; /* pointer to copy strings from */
- } _state;
-
-#define t _state.t
-#define b _state.b
-#define k _state.k
-#define p _state.p
-#define n _state.n
-#define q _state.q
-#define m _state.m
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input based on current state */
- for (;;) switch (s->mode)
- {
- case TYPE:
- NEEDBITS(3)
- t = (uInt)b & 7;
- DUMPBITS(3)
- s->last = (t & 1) ? DRY : TYPE;
- switch (t >> 1)
- {
- case 0: /* stored */
- Tracev((stderr, "inflate: stored block%s\n",
- LAST ? " (last)" : ""));
- DUMPBITS(k&7)
- s->mode = LENS; /* get length of stored block */
- break;
- case 1: /* fixed */
- Tracev((stderr, "inflate: fixed codes block%s\n",
- LAST ? " (last)" : ""));
- {
- if (!fixed_built)
- {
- int _k; /* temporary variable */
- uInt f = 0; /* number of hufts used in fixed_mem */
- static uIntf c[288]; /* length list for huft_build */
-
- /* literal table */
- for (_k = 0; _k < 288; _k++)
- {
- char v=8;
- if (_k > 143)
- {
- if (_k < 256) v++;
- else if (_k < 280) v--;
- }
- c[_k] = v;
- }
-
- huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, fixed_mem, &f);
-
- /* distance table */
- for (_k = 0; _k < 30; _k++) c[_k] = 5;
-
- huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, fixed_mem, &f);
-
- /* done */
- fixed_built++;
- }
-
- //s->sub.decode.t_codes.mode = CODES_START;
- s->sub.decode.t_codes.lbits = (Byte)fixed_bl;
- s->sub.decode.t_codes.dbits = (Byte)fixed_bd;
- s->sub.decode.t_codes.ltree = fixed_tl;
- s->sub.decode.t_codes.dtree = fixed_td;
- }
- s->mode = CODES_START;
- break;
- case 2: /* dynamic */
- Tracev((stderr, "inflate: dynamic codes block%s\n",
- LAST ? " (last)" : ""));
- s->mode = TABLE;
- break;
- case 3: /* illegal */
- /* the only illegal value possible is 3 because we check only 2 bits */
- goto bad;
- }
- break;
- case LENS:
- NEEDBITS(16)
- s->sub.left = (uInt)b & 0xffff;
- b = k = 0; /* dump bits */
- Tracev((stderr, "inflate: stored length %u\n", s->sub.left));
- s->mode = s->sub.left ? STORED : s->last;
- break;
- case STORED:
- {
- uInt mn;
-
- if (n == 0)
- LEAVE(Z_OK)
- NEEDOUT
- mn = min(m, n);
- t = min(s->sub.left, mn);
- zmemcpy(q, p, t);
- p += t; n -= t;
- q += t; m -= t;
- if (!(s->sub.left -= t))
- s->mode = s->last;
- break;
- }
- case TABLE:
- NEEDBITS(14)
- s->sub.trees.table = t = (uInt)b & 0x3fff;
- if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
- {
- s->mode = BAD;
- LEAVE(Z_DATA_ERROR);
- }
- //t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
- DUMPBITS(14)
- s->sub.trees.index = 0;
- Tracev((stderr, "inflate: table sizes ok\n"));
- s->mode = BTREE;
- case BTREE:
- while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
- {
- NEEDBITS(3)
- s->sub.trees.t_blens[(int)border[s->sub.trees.index++]] = (uInt)b & 7;
- DUMPBITS(3)
- }
- while (s->sub.trees.index < 19)
- s->sub.trees.t_blens[(int)border[s->sub.trees.index++]] = 0;
- s->sub.trees.bb = 7;
-
- {
- uInt hn = 0; /* hufts used in space */
-
- t = huft_build(s->sub.trees.t_blens, 19, 19, (short *)Z_NULL, (short*)Z_NULL,
- &s->sub.trees.tb, &s->sub.trees.bb, s->hufts, &hn);
- if (t != Z_OK || !s->sub.trees.bb)
- {
- s->mode = BAD;
- break;
- }
- }
-
- s->sub.trees.index = 0;
- Tracev((stderr, "inflate: bits tree ok\n"));
- s->mode = DTREE;
- case DTREE:
- while (t = s->sub.trees.table,
- s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
- {
- inflate_huft *h;
- uInt i, j, c;
-
- t = s->sub.trees.bb;
- NEEDBITS(t)
- h = s->sub.trees.tb + ((uInt)b & (uInt)inflate_mask[t]);
- t = h->bits;
- c = h->base;
- if (c < 16)
- {
- DUMPBITS(t)
- s->sub.trees.t_blens[s->sub.trees.index++] = c;
- }
- else /* c == 16..18 */
- {
- if (c == 18)
- {
- i=7;
- j=11;
- }
- else
- {
- i=c-14;
- j=3;
- }
- NEEDBITS(t+i)
- DUMPBITS(t)
- j += (uInt)b & (uInt)inflate_mask[i];
- DUMPBITS(i)
- i = s->sub.trees.index;
- t = s->sub.trees.table;
- if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
- (c == 16 && i < 1))
- {
- s->mode = BAD;
- LEAVE(Z_DATA_ERROR);
- }
- c = c == 16 ? s->sub.trees.t_blens[i - 1] : 0;
- do {
- s->sub.trees.t_blens[i++] = c;
- } while (--j);
- s->sub.trees.index = i;
- }
- }
- s->sub.trees.tb = Z_NULL;
- {
- uInt hn = 0; /* hufts used in space */
- uInt bl, bd;
- inflate_huft *tl, *td;
- int nl,nd;
- t = s->sub.trees.table;
-
- nl = 257 + (t & 0x1f);
- nd = 1 + ((t >> 5) & 0x1f);
- bl = 9; /* must be <= 9 for lookahead assumptions */
- bd = 6; /* must be <= 9 for lookahead assumptions */
-
- t = huft_build(s->sub.trees.t_blens, nl, 257, cplens, cplext, &tl, &bl, s->hufts, &hn);
- if (bl == 0) t = Z_DATA_ERROR;
- if (t == Z_OK)
- {
- /* build distance tree */
- t = huft_build(s->sub.trees.t_blens + nl, nd, 0, cpdist, cpdext, &td, &bd, s->hufts, &hn);
- }
- if (t != Z_OK || (bd == 0 && nl > 257))
- {
- s->mode = BAD;
- LEAVE(Z_DATA_ERROR);
- }
- Tracev((stderr, "inflate: trees ok\n"));
-
- //s->sub.decode.t_codes.mode = CODES_START;
- s->sub.decode.t_codes.lbits = (Byte)bl;
- s->sub.decode.t_codes.dbits = (Byte)bd;
- s->sub.decode.t_codes.ltree = tl;
- s->sub.decode.t_codes.dtree = td;
- }
- s->mode = CODES_START;
-
-#define j (_state.j)
-#define e (_state.e)
-#define f (_state.f)
-
- /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
-
- case CODES_START: /* x: set up for LEN */
- c->sub.code.need = c->lbits;
- c->sub.code.tree = c->ltree;
- s->mode = CODES_LEN;
- case CODES_LEN: /* i: get length/literal/eob next */
- t = c->sub.code.need;
- NEEDBITS(t)
- j = c->sub.code.tree + ((uInt)b & (uInt)inflate_mask[t]);
- DUMPBITS(j->bits)
- e = (uInt)(j->exop);
- if (e == 0) /* literal */
- {
- c->sub.lit = j->base;
- s->mode = CODES_LIT;
- break;
- }
- if (e & 16) /* length */
- {
- c->sub.copy.get = e & 15;
- c->len = j->base;
- s->mode = CODES_LENEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = j + j->base;
- break;
- }
- if (e & 32) /* end of block */
- {
- s->mode = CODES_WASH;
- break;
- }
- goto bad;
- case CODES_LENEXT: /* i: getting length extra (have base) */
- t = c->sub.copy.get;
- NEEDBITS(t)
- c->len += (uInt)b & (uInt)inflate_mask[t];
- DUMPBITS(t)
- c->sub.code.need = c->dbits;
- c->sub.code.tree = c->dtree;
- s->mode = CODES_DIST;
- case CODES_DIST: /* i: get distance next */
- t = c->sub.code.need;
- NEEDBITS(t)
- j = c->sub.code.tree + ((uInt)b & (uInt)inflate_mask[t]);
- DUMPBITS(j->bits)
- e = (uInt)(j->exop);
- if (e & 16) /* distance */
- {
- c->sub.copy.get = e & 15;
- c->sub.copy.dist = j->base;
- s->mode = CODES_DISTEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = j + j->base;
- break;
- }
- goto bad; /* invalid code */
- case CODES_DISTEXT: /* i: getting distance extra */
- t = c->sub.copy.get;
- NEEDBITS(t)
- c->sub.copy.dist += (uInt)b & (uInt)inflate_mask[t];
- DUMPBITS(t)
- s->mode = CODES_COPY;
- case CODES_COPY: /* o: copying bytes in window, waiting for space */
- f = (uInt)(q - s->window) < c->sub.copy.dist ?
- s->end - (c->sub.copy.dist - (q - s->window)) :
- q - c->sub.copy.dist;
-
- while (c->len)
- {
- NEEDOUT
- OUTBYTE(*f++)
- if (f == s->end)
- f = s->window;
- c->len--;
- }
- s->mode = CODES_START;
- break;
- case CODES_LIT: /* o: got literal, waiting for output space */
- NEEDOUT
- OUTBYTE(c->sub.lit)
- s->mode = CODES_START;
- break;
- case CODES_WASH: /* o: got eob, possibly more output */
- if (k > 7) /* return unused byte, if any */
- {
- k -= 8;
- n++;
- p--; /* can always return one */
- }
- /* flushing will be done in DRY */
-
-#undef j
-#undef e
-#undef f
-
- case DRY:
- FLUSH
- if (s->write != s->read)
- LEAVE(Z_OK)
- if (s->mode == CODES_WASH)
- {
- Tracev((stderr, "inflate: codes end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- }
- /* DRY if last, TYPE if not */
- s->mode = s->last;
- if (s->mode == TYPE)
- break;
- LEAVE(Z_STREAM_END)
- //case BAD:
- //r = Z_DATA_ERROR;
- //LEAVE
- default: // we'll call Z_STREAM_ERROR if BAD anyway
- bad:
- s->mode = BAD;
- LEAVE(Z_STREAM_ERROR)
- }
-}
-
-#undef t
-#undef b
-#undef k
-#undef p
-#undef n
-#undef q
-#undef m
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+#include "../Platform.h"
+#include "../exehead/config.h"
+
+#include "ZUTIL.H"
+
+#ifndef min
+# define min(x,y) ((x<y)?x:y)
+#endif
+
+/* defines for inflate input/output */
+/* update pointers and return */
+#define UPDBITS {s->bitb=b;s->bitk=k;}
+#define UPDIN {z->avail_in=n;z->next_in=p;}
+#define UPDOUT {s->write=q;}
+#define UPDATE {UPDBITS UPDIN UPDOUT}
+#define LEAVE(r) {UPDATE inflate_flush(z); return r;}
+
+/* get bytes and bits */
+#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
+
+
+#define NEEDBYTE {if(!n)LEAVE(Z_OK)}
+#define NEXTBYTE (n--,*p++)
+#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
+
+#define DUMPBITS(j) {b>>=(j);k-=(j);}
+/* output bytes */
+#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)
+#define LOADOUT {q=s->write;m=(uInt)WAVAIL;}
+#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
+#define FLUSH {UPDOUT inflate_flush(z); LOADOUT}
+#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE(Z_OK)}}}
+#define OUTBYTE(a) {*q++=(Byte)(a);m--;}
+/* load local pointers */
+#define LOAD {LOADIN LOADOUT}
+
+#define LAST (s->last == DRY)
+
+#define FIXEDH 544 /* number of hufts used by fixed tables */
+
+
+
+typedef struct inflate_blocks_state FAR inflate_blocks_statef;
+#define exop word.what.Exop
+#define bits word.what.Bits
+
+/* And'ing with mask[n] masks the lower n bits */
+local unsigned short inflate_mask[17] = {
+ 0x0000,
+ 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
+ 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
+}; // use to reduce .data #define INFLATE_MASK(x, n) (x & (~((unsigned short) 0xFFFF << n)))
+local const char border[] = { /* Order of the bit length code lengths */
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
+
+/* Tables for deflate from PKZIP's appnote.txt. */
+local const unsigned short cplens[31] = { /* Copy lengths for literal codes 257..285 */
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
+ /* see note #13 above about 258 */
+local const unsigned short cplext[31] = { /* Extra bits for literal codes 257..285 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
+ 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */
+local const unsigned short cpdist[30] = { /* Copy offsets for distance codes 0..29 */
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577};
+local const unsigned short cpdext[30] = { /* Extra bits for distance codes */
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
+ 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
+ 12, 12, 13, 13};
+
+/* build fixed tables only once--keep them here */
+local char fixed_built = 0;
+local inflate_huft fixed_mem[FIXEDH];
+local uInt fixed_bl=9;
+local uInt fixed_bd=5;
+local inflate_huft *fixed_tl;
+local inflate_huft *fixed_td;
+
+/* copy as much as possible from the sliding window to the output area */
+local void ZEXPORT inflate_flush(z)
+z_streamp z;
+{
+ inflate_blocks_statef *s = &z->blocks;
+ uInt n;
+ Bytef *q;
+
+ /* local copies of source and destination pointers */
+ q = s->read;
+
+again:
+ /* compute number of bytes to copy as far as end of window */
+ n = (uInt)((q <= s->write ? s->write : s->end) - q);
+ n = min(n, z->avail_out);
+
+ /* update counters */
+ z->avail_out -= n;
+ //z->total_out += n;
+
+ /* copy as far as end of window */
+ zmemcpy(z->next_out, q, n);
+ z->next_out += n;
+ q += n;
+
+ /* see if more to copy at beginning of window */
+ if (q == s->end)
+ {
+ /* wrap pointers */
+ q = s->window;
+ if (s->write == s->end)
+ s->write = s->window;
+
+ /* do the same for the beginning of the window */
+ goto again;
+ }
+
+ /* update pointers */
+ s->read = q;
+}
+
+#define BMAX 15 /* maximum bit length of any code */
+
+local int ZEXPORT huft_build(
+uIntf *b, /* code lengths in bits (all assumed <= BMAX) */
+uInt n, /* number of codes (assumed <= 288) */
+uInt s, /* number of simple-valued codes (0..s-1) */
+const unsigned short *d, /* list of base values for non-simple codes */
+const unsigned short *e, /* list of extra bits for non-simple codes */
+inflate_huft * FAR *t, /* result: starting table */
+uIntf *m, /* maximum lookup bits, returns actual */
+inflate_huft *hp, /* space for trees */
+uInt *hn) /* working area: values in order of bit length */
+{
+ static uIntf v[288]; /* work area for huft_build */
+ uInt a; /* counter for codes of length k */
+ uInt c[BMAX+1]; /* bit length count table */
+ uInt f; /* i repeats in table every f entries */
+ int g; /* maximum code length */
+ int h; /* table level */
+ uInt i; /* counter, current code */
+ uInt j; /* counter */
+ int k; /* number of bits in current code */
+ int l; /* bits per table (returned in m) */
+ uIntf *p; /* pointer into c[], b[], or v[] */
+ inflate_huft *q; /* points to current table */
+ struct inflate_huft_s r; /* table entry for structure assignment */
+ inflate_huft *u[BMAX]; /* table stack */
+ int w; /* bits before this table == (l * h) */
+ uInt x[BMAX+1]; /* bit offsets, then code stack */
+ uIntf *xp; /* pointer into x */
+ int y; /* number of dummy codes added */
+ uInt z; /* number of entries in current table */
+
+
+ /* Generate counts for each bit length */
+ p=c;
+ y=16; while (y--) *p++ = 0;
+ p = b;
+ i = n;
+ do {
+ c[*p++]++; /* assume all entries <= BMAX */
+ } while (--i);
+ if (c[0] == n) /* null input--all zero length codes */
+ {
+ *t = (inflate_huft *)Z_NULL;
+ *m = 0;
+ return Z_OK;
+ }
+
+
+ /* Find minimum and maximum length, bound *m by those */
+ l = *m;
+ for (j = 1; j <= BMAX; j++)
+ if (c[j])
+ break;
+ k = j; /* minimum code length */
+ if ((uInt)l < j)
+ l = j;
+ for (i = BMAX; i; i--)
+ if (c[i])
+ break;
+ g = i; /* maximum code length */
+ if ((uInt)l > i)
+ l = i;
+ *m = l;
+
+
+ /* Adjust last length count to fill out codes, if needed */
+ for (y = 1 << j; j < i; j++, y <<= 1)
+ if ((y -= c[j]) < 0)
+ return Z_DATA_ERROR;
+ if ((y -= c[i]) < 0)
+ return Z_DATA_ERROR;
+ c[i] += y;
+
+
+ /* Generate starting offsets into the value table for each length */
+ x[1] = j = 0;
+ p = c + 1; xp = x + 2;
+ while (--i) { /* note that i == g from above */
+ *xp++ = (j += *p++);
+ }
+
+
+ /* Make a table of values in order of bit lengths */
+ p = b; i = 0;
+ do {
+ if ((j = *p++) != 0)
+ v[x[j]++] = i;
+ } while (++i < n);
+ n = x[g]; /* set n to length of v */
+
+
+ /* Generate the Huffman codes and for each, make the table entries */
+ x[0] = i = 0; /* first Huffman code is zero */
+ p = v; /* grab values in bit order */
+ h = -1; /* no tables yet--level -1 */
+ w = -l; /* bits decoded == (l * h) */
+ u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */
+ q = (inflate_huft *)Z_NULL; /* ditto */
+ z = 0; /* ditto */
+
+ /* go through the bit lengths (k already is bits in shortest code) */
+ for (; k <= g; k++)
+ {
+ a = c[k];
+ while (a--)
+ {
+ int nextw=w;
+ /* here i is the Huffman code of length k bits for value *p */
+ /* make tables up to required level */
+ while (k > (nextw=w + l))
+ {
+ h++;
+
+ /* compute minimum size table less than or equal to l bits */
+ z = g - nextw;
+ z = z > (uInt)l ? l : z; /* table size upper limit */
+ if ((f = 1 << (j = k - nextw)) > a + 1) /* try a k-w bit table */
+ { /* too few codes for k-w bit table */
+ f -= a + 1; /* deduct codes from patterns left */
+ xp = c + k;
+ if (j < z)
+ while (++j < z && (f <<= 1) > *++xp) /* try smaller tables up to z bits */
+ {
+ f -= *xp; /* else deduct codes from patterns */
+ }
+ }
+ z = 1 << j; /* table entries for j-bit table */
+
+ /* allocate new table */
+ if (*hn + z > MANY) /* (note: doesn't matter for fixed) */
+ return Z_MEM_ERROR; /* not enough memory */
+ u[h] = q = hp + *hn;
+ *hn += z;
+
+ /* connect to last table, if there is one */
+ if (h)
+ {
+ x[h] = i; /* save pattern for backing up */
+ r.bits = (Byte)l; /* bits to dump before this table */
+ r.exop = (Byte)j; /* bits in this table */
+ j = i >> w;
+ r.base = (uInt)(q - u[h-1] - j); /* offset to this table */
+ u[h-1][j] = r; /* connect to last table */
+ }
+ else
+ *t = q; /* first table is returned result */
+ w=nextw; /* previous table always l bits */
+ }
+
+ /* set up table entry in r */
+ r.bits = (Byte)(k - w);
+ if (p >= v + n)
+ r.exop = 128 + 64; /* out of values--invalid code */
+ else if (*p < s)
+ {
+ r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */
+ r.base = *p++; /* simple code is just the value */
+ }
+ else
+ {
+ r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */
+ r.base = d[*p++ - s];
+ }
+
+ /* fill code-like entries with r */
+ f = 1 << (k - w);
+ for (j = i >> w; j < z; j += f)
+ q[j] = r;
+
+ /* backwards increment the k-bit code i */
+ for (j = 1 << (k - 1); i & j; j >>= 1)
+ i ^= j;
+ i ^= j;
+
+ /* backup over finished tables */
+ while ((i & ((1 << w) - 1)) != x[h])
+ {
+ h--; /* don't need to update q */
+ w -= l;
+ }
+ }
+ }
+
+
+ /* Return Z_BUF_ERROR if we were given an incomplete table */
+ return (y != 0 && g != 1) ? Z_BUF_ERROR : Z_OK;
+}
+
+int ZEXPORT inflate(z_streamp z)
+{
+ inflate_blocks_statef *s = &z->blocks;
+ inflate_codes_statef *c = &s->sub.decode.t_codes; /* codes state */
+
+ // lousy two bytes saved by doing this
+ struct
+ {
+ uInt t; /* temporary storage */
+ uLong b; /* bit buffer */
+ uInt k; /* bits in bit buffer */
+ Bytef *p; /* input data pointer */
+ uInt n; /* bytes available there */
+ Bytef *q; /* output window write pointer */
+ uInt m; /* bytes to end of window or read pointer */
+
+ /* CODES variables */
+
+ inflate_huft *j; /* temporary pointer */
+ uInt e; /* extra bits or operation */
+ Bytef *f; /* pointer to copy strings from */
+ } _state;
+
+#define t _state.t
+#define b _state.b
+#define k _state.k
+#define p _state.p
+#define n _state.n
+#define q _state.q
+#define m _state.m
+
+ /* copy input/output information to locals (UPDATE macro restores) */
+ LOAD
+
+ /* process input based on current state */
+ for (;;) switch (s->mode)
+ {
+ case TYPE:
+ NEEDBITS(3)
+ t = (uInt)b & 7;
+ DUMPBITS(3)
+ s->last = (t & 1) ? DRY : TYPE;
+ switch (t >> 1)
+ {
+ case 0: /* stored */
+ Tracev((stderr, "inflate: stored block%s\n",
+ LAST ? " (last)" : ""));
+ DUMPBITS(k&7)
+ s->mode = LENS; /* get length of stored block */
+ break;
+ case 1: /* fixed */
+ Tracev((stderr, "inflate: fixed codes block%s\n",
+ LAST ? " (last)" : ""));
+ {
+ if (!fixed_built)
+ {
+ int _k; /* temporary variable */
+ uInt f = 0; /* number of hufts used in fixed_mem */
+ static uIntf c[288]; /* length list for huft_build */
+
+ /* literal table */
+ for (_k = 0; _k < 288; _k++)
+ {
+ char v=8;
+ if (_k > 143)
+ {
+ if (_k < 256) v++;
+ else if (_k < 280) v--;
+ }
+ c[_k] = v;
+ }
+
+ huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, fixed_mem, &f);
+
+ /* distance table */
+ for (_k = 0; _k < 30; _k++) c[_k] = 5;
+
+ huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, fixed_mem, &f);
+
+ /* done */
+ fixed_built++;
+ }
+
+ //s->sub.decode.t_codes.mode = CODES_START;
+ s->sub.decode.t_codes.lbits = (Byte)fixed_bl;
+ s->sub.decode.t_codes.dbits = (Byte)fixed_bd;
+ s->sub.decode.t_codes.ltree = fixed_tl;
+ s->sub.decode.t_codes.dtree = fixed_td;
+ }
+ s->mode = CODES_START;
+ break;
+ case 2: /* dynamic */
+ Tracev((stderr, "inflate: dynamic codes block%s\n",
+ LAST ? " (last)" : ""));
+ s->mode = TABLE;
+ break;
+ case 3: /* illegal */
+ /* the only illegal value possible is 3 because we check only 2 bits */
+ goto bad;
+ }
+ break;
+ case LENS:
+ NEEDBITS(16)
+ s->sub.left = (uInt)b & 0xffff;
+ b = k = 0; /* dump bits */
+ Tracev((stderr, "inflate: stored length %u\n", s->sub.left));
+ s->mode = s->sub.left ? STORED : s->last;
+ break;
+ case STORED:
+ {
+ uInt mn;
+
+ if (n == 0)
+ LEAVE(Z_OK)
+ NEEDOUT
+ mn = min(m, n);
+ t = min(s->sub.left, mn);
+ zmemcpy(q, p, t);
+ p += t; n -= t;
+ q += t; m -= t;
+ if (!(s->sub.left -= t))
+ s->mode = s->last;
+ break;
+ }
+ case TABLE:
+ NEEDBITS(14)
+ s->sub.trees.table = t = (uInt)b & 0x3fff;
+ if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
+ {
+ s->mode = BAD;
+ LEAVE(Z_DATA_ERROR);
+ }
+ //t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
+ DUMPBITS(14)
+ s->sub.trees.index = 0;
+ Tracev((stderr, "inflate: table sizes ok\n"));
+ s->mode = BTREE;
+ case BTREE:
+ while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
+ {
+ NEEDBITS(3)
+ s->sub.trees.t_blens[(int)border[s->sub.trees.index++]] = (uInt)b & 7;
+ DUMPBITS(3)
+ }
+ while (s->sub.trees.index < 19)
+ s->sub.trees.t_blens[(int)border[s->sub.trees.index++]] = 0;
+ s->sub.trees.bb = 7;
+
+ {
+ uInt hn = 0; /* hufts used in space */
+
+ t = huft_build(s->sub.trees.t_blens, 19, 19, (short *)Z_NULL, (short*)Z_NULL,
+ &s->sub.trees.tb, &s->sub.trees.bb, s->hufts, &hn);
+ if (t != Z_OK || !s->sub.trees.bb)
+ {
+ s->mode = BAD;
+ break;
+ }
+ }
+
+ s->sub.trees.index = 0;
+ Tracev((stderr, "inflate: bits tree ok\n"));
+ s->mode = DTREE;
+ case DTREE:
+ while (t = s->sub.trees.table,
+ s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
+ {
+ inflate_huft *h;
+ uInt i, j, c;
+
+ t = s->sub.trees.bb;
+ NEEDBITS(t)
+ h = s->sub.trees.tb + ((uInt)b & (uInt)inflate_mask[t]);
+ t = h->bits;
+ c = h->base;
+ if (c < 16)
+ {
+ DUMPBITS(t)
+ s->sub.trees.t_blens[s->sub.trees.index++] = c;
+ }
+ else /* c == 16..18 */
+ {
+ if (c == 18)
+ {
+ i=7;
+ j=11;
+ }
+ else
+ {
+ i=c-14;
+ j=3;
+ }
+ NEEDBITS(t+i)
+ DUMPBITS(t)
+ j += (uInt)b & (uInt)inflate_mask[i];
+ DUMPBITS(i)
+ i = s->sub.trees.index;
+ t = s->sub.trees.table;
+ if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
+ (c == 16 && i < 1))
+ {
+ s->mode = BAD;
+ LEAVE(Z_DATA_ERROR);
+ }
+ c = c == 16 ? s->sub.trees.t_blens[i - 1] : 0;
+ do {
+ s->sub.trees.t_blens[i++] = c;
+ } while (--j);
+ s->sub.trees.index = i;
+ }
+ }
+ s->sub.trees.tb = Z_NULL;
+ {
+ uInt hn = 0; /* hufts used in space */
+ uInt bl, bd;
+ inflate_huft *tl, *td;
+ int nl,nd;
+ t = s->sub.trees.table;
+
+ nl = 257 + (t & 0x1f);
+ nd = 1 + ((t >> 5) & 0x1f);
+ bl = 9; /* must be <= 9 for lookahead assumptions */
+ bd = 6; /* must be <= 9 for lookahead assumptions */
+
+ t = huft_build(s->sub.trees.t_blens, nl, 257, cplens, cplext, &tl, &bl, s->hufts, &hn);
+ if (bl == 0) t = Z_DATA_ERROR;
+ if (t == Z_OK)
+ {
+ /* build distance tree */
+ t = huft_build(s->sub.trees.t_blens + nl, nd, 0, cpdist, cpdext, &td, &bd, s->hufts, &hn);
+ }
+ if (t != Z_OK || (bd == 0 && nl > 257))
+ {
+ s->mode = BAD;
+ LEAVE(Z_DATA_ERROR);
+ }
+ Tracev((stderr, "inflate: trees ok\n"));
+
+ //s->sub.decode.t_codes.mode = CODES_START;
+ s->sub.decode.t_codes.lbits = (Byte)bl;
+ s->sub.decode.t_codes.dbits = (Byte)bd;
+ s->sub.decode.t_codes.ltree = tl;
+ s->sub.decode.t_codes.dtree = td;
+ }
+ s->mode = CODES_START;
+
+#define j (_state.j)
+#define e (_state.e)
+#define f (_state.f)
+
+ /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
+
+ case CODES_START: /* x: set up for LEN */
+ c->sub.code.need = c->lbits;
+ c->sub.code.tree = c->ltree;
+ s->mode = CODES_LEN;
+ case CODES_LEN: /* i: get length/literal/eob next */
+ t = c->sub.code.need;
+ NEEDBITS(t)
+ j = c->sub.code.tree + ((uInt)b & (uInt)inflate_mask[t]);
+ DUMPBITS(j->bits)
+ e = (uInt)(j->exop);
+ if (e == 0) /* literal */
+ {
+ c->sub.lit = j->base;
+ s->mode = CODES_LIT;
+ break;
+ }
+ if (e & 16) /* length */
+ {
+ c->sub.copy.get = e & 15;
+ c->len = j->base;
+ s->mode = CODES_LENEXT;
+ break;
+ }
+ if ((e & 64) == 0) /* next table */
+ {
+ c->sub.code.need = e;
+ c->sub.code.tree = j + j->base;
+ break;
+ }
+ if (e & 32) /* end of block */
+ {
+ s->mode = CODES_WASH;
+ break;
+ }
+ goto bad;
+ case CODES_LENEXT: /* i: getting length extra (have base) */
+ t = c->sub.copy.get;
+ NEEDBITS(t)
+ c->len += (uInt)b & (uInt)inflate_mask[t];
+ DUMPBITS(t)
+ c->sub.code.need = c->dbits;
+ c->sub.code.tree = c->dtree;
+ s->mode = CODES_DIST;
+ case CODES_DIST: /* i: get distance next */
+ t = c->sub.code.need;
+ NEEDBITS(t)
+ j = c->sub.code.tree + ((uInt)b & (uInt)inflate_mask[t]);
+ DUMPBITS(j->bits)
+ e = (uInt)(j->exop);
+ if (e & 16) /* distance */
+ {
+ c->sub.copy.get = e & 15;
+ c->sub.copy.dist = j->base;
+ s->mode = CODES_DISTEXT;
+ break;
+ }
+ if ((e & 64) == 0) /* next table */
+ {
+ c->sub.code.need = e;
+ c->sub.code.tree = j + j->base;
+ break;
+ }
+ goto bad; /* invalid code */
+ case CODES_DISTEXT: /* i: getting distance extra */
+ t = c->sub.copy.get;
+ NEEDBITS(t)
+ c->sub.copy.dist += (uInt)b & (uInt)inflate_mask[t];
+ DUMPBITS(t)
+ s->mode = CODES_COPY;
+ case CODES_COPY: /* o: copying bytes in window, waiting for space */
+ f = (uInt)(q - s->window) < c->sub.copy.dist ?
+ s->end - (c->sub.copy.dist - (q - s->window)) :
+ q - c->sub.copy.dist;
+
+ while (c->len)
+ {
+ NEEDOUT
+ OUTBYTE(*f++)
+ if (f == s->end)
+ f = s->window;
+ c->len--;
+ }
+ s->mode = CODES_START;
+ break;
+ case CODES_LIT: /* o: got literal, waiting for output space */
+ NEEDOUT
+ OUTBYTE(c->sub.lit)
+ s->mode = CODES_START;
+ break;
+ case CODES_WASH: /* o: got eob, possibly more output */
+ if (k > 7) /* return unused byte, if any */
+ {
+ k -= 8;
+ n++;
+ p--; /* can always return one */
+ }
+ /* flushing will be done in DRY */
+
+#undef j
+#undef e
+#undef f
+
+ case DRY:
+ FLUSH
+ if (s->write != s->read)
+ LEAVE(Z_OK)
+ if (s->mode == CODES_WASH)
+ {
+ Tracev((stderr, "inflate: codes end, %lu total out\n",
+ z->total_out + (q >= s->read ? q - s->read :
+ (s->end - s->read) + (q - s->window))));
+ }
+ /* DRY if last, TYPE if not */
+ s->mode = s->last;
+ if (s->mode == TYPE)
+ break;
+ LEAVE(Z_STREAM_END)
+ //case BAD:
+ //r = Z_DATA_ERROR;
+ //LEAVE
+ default: // we'll call Z_STREAM_ERROR if BAD anyway
+ bad:
+ s->mode = BAD;
+ LEAVE(Z_STREAM_ERROR)
+ }
+}
+
+#undef t
+#undef b
+#undef k
+#undef p
+#undef n
+#undef q
+#undef m
diff --git a/Source/zlib/ZCONF.H b/Source/zlib/ZCONF.H
index 6ca8fb5..d465607 100755
--- a/Source/zlib/ZCONF.H
+++ b/Source/zlib/ZCONF.H
@@ -1,71 +1,71 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id: ZCONF.H,v 1.3 2007/01/13 17:28:23 kichik Exp $ */
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-
-#define MAX_MEM_LEVEL 9
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-#define OF(args) args
-
-
-#ifndef ZEXPORT
-# define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-# define ZEXPORTVA
-#endif
-#ifndef ZEXTERN
-# define ZEXTERN extern
-#endif
-
-#ifndef FAR
-# define FAR
-#endif
-
-typedef unsigned char Byte; /* 8 bits */
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-typedef Byte FAR Bytef;
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-typedef void FAR *voidpf;
-typedef void *voidp;
-
-#ifndef z_off_t
-# define z_off_t long
-#endif
-
-
-#endif /* _ZCONF_H */
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-1998 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id: ZCONF.H,v 1.2 2006/10/28 19:45:02 joostverburg Exp $ */
+
+#ifndef _ZCONF_H
+#define _ZCONF_H
+
+
+#define MAX_MEM_LEVEL 9
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+#define OF(args) args
+
+
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+typedef unsigned char Byte; /* 8 bits */
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+typedef Byte FAR Bytef;
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+typedef void FAR *voidpf;
+typedef void *voidp;
+
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+
+#endif /* _ZCONF_H */
diff --git a/Source/zlib/ZLIB.H b/Source/zlib/ZLIB.H
index e1ee3a4..1c983d8 100755
--- a/Source/zlib/ZLIB.H
+++ b/Source/zlib/ZLIB.H
@@ -1,297 +1,297 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.1.3, July 9th, 1998
-
- Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
-
- 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.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
-
-*/
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-#include "ZCONF.H"
-#include "ZUTIL.H"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef EXEHEAD
-
-typedef struct inflate_huft_s FAR inflate_huft;
-
-
-
-typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
- CODES_START, /* x: set up for LEN */
- CODES_LEN, /* i: get length/literal/eob next */
- CODES_LENEXT, /* i: getting length extra (have base) */
- CODES_DIST, /* i: get distance next */
- CODES_DISTEXT, /* i: getting distance extra */
- CODES_COPY, /* o: copying bytes in window, waiting for space */
- CODES_LIT, /* o: got literal, waiting for output space */
- CODES_WASH, /* o: got eob, possibly still output waiting */
- //CODES_END, /* x: got eob and all data flushed */
- //CODES_BADCODE, /* x: got error */
-
- TYPE, /* get type bits (3, including end bit) */
- LENS, /* get lengths for stored */
- STORED, /* processing stored block */
- TABLE, /* get table lengths */
- BTREE, /* get bit lengths tree for a dynamic block */
- DTREE, /* get length, distance trees for a dynamic block */
- CODES, /* processing fixed or dynamic block */
- DRY, /* output remaining window bytes */
- DONE, /* finished last block, done */
- BAD /* got a data error--stuck here */
-} inflate_mode;
-
-/* inflate codes private state */
-struct inflate_codes_state {
-
- /* mode */
- //inflate_mode mode; /* current inflate_codes mode */
-
- /* mode dependent information */
- uInt len;
- union {
- struct {
- inflate_huft *tree; /* pointer into tree */
- uInt need; /* bits needed */
- } code; /* if LEN or DIST, where in tree */
- uInt lit; /* if LIT, literal */
- struct {
- uInt get; /* bits to get for extra */
- uInt dist; /* distance back to copy from */
- } copy; /* if EXT or COPY, where and how much */
- } sub; /* submode */
-
- /* mode independent information */
- Byte lbits; /* ltree bits decoded per branch */
- Byte dbits; /* dtree bits decoder per branch */
- inflate_huft *ltree; /* literal/length/eob tree */
- inflate_huft *dtree; /* distance tree */
-
-};
-
-struct inflate_huft_s {
- union {
- struct {
- Byte Exop; /* number of extra bits or operation */
- Byte Bits; /* number of bits in this code or subcode */
- } what;
- } word;
- unsigned short base; /* literal, length base, distance base,
- or table offset */
-};
-
-#define MANY 1440
-
-typedef struct inflate_codes_state inflate_codes_statef;
-
-struct inflate_blocks_state {
-
- /* mode */
- inflate_mode mode; /* current inflate_block mode */
-
- /* mode dependent information */
- union {
- uInt left; /* if STORED, bytes left to copy */
- struct {
- uInt table; /* table lengths (14 bits) */
- uInt index; /* index into blens (or border) */
- uIntf t_blens[258+31+31]; /* bit lengths of codes */
- uInt bb; /* bit length tree depth */
- inflate_huft *tb; /* bit length decoding tree */
- } trees; /* if DTREE, decoding info for trees */
- struct {
- inflate_codes_statef t_codes;
- } decode; /* if CODES, current state */
- } sub; /* submode */
-
- uInt last; /* DRY if this block is the last block, TYPE otherwise */
-
- /* mode independent information */
- uInt bitk; /* bits in bit buffer */
- uLong bitb; /* bit buffer */
- inflate_huft hufts[MANY]; /* single malloc for tree space */
- Bytef window[1 << MAX_WBITS]; /* sliding window */
- Bytef *end; /* one byte after sliding window */
- Bytef *read; /* window read pointer */
- Bytef *write; /* window write pointer */
- uLong check; /* check on output */
-
-};
-
-
-
-#else
-struct internal_state;
-#endif
-
-typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
- uInt avail_in; /* number of bytes available at next_in */
-#ifndef EXEHEAD
- uLong total_in; /* total nb of input bytes read so far */
-#endif
-
- Bytef *next_out; /* next output byte should be put there */
- uInt avail_out; /* remaining free space at next_out */
-#ifndef EXEHEAD
- uLong total_out; /* total nb of bytes output so far */
-#endif
-
-// char *msg; /* last error message, NULL if no error */
- //struct internal_state FAR *state; /* not visible by applications */
-#ifdef EXEHEAD
- struct inflate_blocks_state blocks; /* current inflate_blocks state */
-#else
- struct internal_state *state;
-#endif
-
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH 2
-#define Z_FULL_FLUSH 3
-#define Z_FINISH 4
-/* Allowed flush values; see deflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-
-#ifndef EXEHEAD
-
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-
-#else
-// EXEHEAD doesn't need a specific return code, just < 0
-
-#define Z_STREAM_ERROR Z_ERRNO
-#define Z_DATA_ERROR Z_ERRNO
-#define Z_MEM_ERROR Z_ERRNO
-#define Z_BUF_ERROR Z_ERRNO
-#define Z_VERSION_ERROR Z_ERRNO
-
-#endif
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_ASCII 1
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-
-
-#define inflateInit(x) inflateReset(x)
-int ZEXPORT inflate(z_streamp z);
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy));
-
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-
-//void ZEXPORT inflateReset OF((
- // z_streamp));
-#define inflateReset(z) \
-{ \
- (z)->blocks.mode = TYPE; \
- (z)->blocks.bitk = (z)->blocks.bitb = 0; \
- (z)->blocks.read = (z)->blocks.write = (z)->blocks.window; \
- (z)->blocks.end = (z)->blocks.window + (1 << DEF_WBITS); \
-}
-
- /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-//ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
- // const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel,
- int strategy, const char *version,
- int stream_size));
-
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), "", sizeof(z_stream))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ZLIB_H */
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.1.3, July 9th, 1998
+
+ Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
+
+ 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.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+*/
+
+#ifndef _ZLIB_H
+#define _ZLIB_H
+
+#include "ZCONF.H"
+#include "ZUTIL.H"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef EXEHEAD
+
+typedef struct inflate_huft_s FAR inflate_huft;
+
+
+
+typedef enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
+ CODES_START, /* x: set up for LEN */
+ CODES_LEN, /* i: get length/literal/eob next */
+ CODES_LENEXT, /* i: getting length extra (have base) */
+ CODES_DIST, /* i: get distance next */
+ CODES_DISTEXT, /* i: getting distance extra */
+ CODES_COPY, /* o: copying bytes in window, waiting for space */
+ CODES_LIT, /* o: got literal, waiting for output space */
+ CODES_WASH, /* o: got eob, possibly still output waiting */
+ //CODES_END, /* x: got eob and all data flushed */
+ //CODES_BADCODE, /* x: got error */
+
+ TYPE, /* get type bits (3, including end bit) */
+ LENS, /* get lengths for stored */
+ STORED, /* processing stored block */
+ TABLE, /* get table lengths */
+ BTREE, /* get bit lengths tree for a dynamic block */
+ DTREE, /* get length, distance trees for a dynamic block */
+ CODES, /* processing fixed or dynamic block */
+ DRY, /* output remaining window bytes */
+ DONE, /* finished last block, done */
+ BAD /* got a data error--stuck here */
+} inflate_mode;
+
+/* inflate codes private state */
+struct inflate_codes_state {
+
+ /* mode */
+ //inflate_mode mode; /* current inflate_codes mode */
+
+ /* mode dependent information */
+ uInt len;
+ union {
+ struct {
+ inflate_huft *tree; /* pointer into tree */
+ uInt need; /* bits needed */
+ } code; /* if LEN or DIST, where in tree */
+ uInt lit; /* if LIT, literal */
+ struct {
+ uInt get; /* bits to get for extra */
+ uInt dist; /* distance back to copy from */
+ } copy; /* if EXT or COPY, where and how much */
+ } sub; /* submode */
+
+ /* mode independent information */
+ Byte lbits; /* ltree bits decoded per branch */
+ Byte dbits; /* dtree bits decoder per branch */
+ inflate_huft *ltree; /* literal/length/eob tree */
+ inflate_huft *dtree; /* distance tree */
+
+};
+
+struct inflate_huft_s {
+ union {
+ struct {
+ Byte Exop; /* number of extra bits or operation */
+ Byte Bits; /* number of bits in this code or subcode */
+ } what;
+ } word;
+ unsigned short base; /* literal, length base, distance base,
+ or table offset */
+};
+
+#define MANY 1440
+
+typedef struct inflate_codes_state inflate_codes_statef;
+
+struct inflate_blocks_state {
+
+ /* mode */
+ inflate_mode mode; /* current inflate_block mode */
+
+ /* mode dependent information */
+ union {
+ uInt left; /* if STORED, bytes left to copy */
+ struct {
+ uInt table; /* table lengths (14 bits) */
+ uInt index; /* index into blens (or border) */
+ uIntf t_blens[258+31+31]; /* bit lengths of codes */
+ uInt bb; /* bit length tree depth */
+ inflate_huft *tb; /* bit length decoding tree */
+ } trees; /* if DTREE, decoding info for trees */
+ struct {
+ inflate_codes_statef t_codes;
+ } decode; /* if CODES, current state */
+ } sub; /* submode */
+
+ uInt last; /* DRY if this block is the last block, TYPE otherwise */
+
+ /* mode independent information */
+ uInt bitk; /* bits in bit buffer */
+ uLong bitb; /* bit buffer */
+ inflate_huft hufts[MANY]; /* single malloc for tree space */
+ Bytef window[1 << MAX_WBITS]; /* sliding window */
+ Bytef *end; /* one byte after sliding window */
+ Bytef *read; /* window read pointer */
+ Bytef *write; /* window write pointer */
+ uLong check; /* check on output */
+
+};
+
+
+
+#else
+struct internal_state;
+#endif
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+#ifndef EXEHEAD
+ uLong total_in; /* total nb of input bytes read so far */
+#endif
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+#ifndef EXEHEAD
+ uLong total_out; /* total nb of bytes output so far */
+#endif
+
+// char *msg; /* last error message, NULL if no error */
+ //struct internal_state FAR *state; /* not visible by applications */
+#ifdef EXEHEAD
+ struct inflate_blocks_state blocks; /* current inflate_blocks state */
+#else
+ struct internal_state *state;
+#endif
+
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+/* Allowed flush values; see deflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+
+#ifndef EXEHEAD
+
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+
+#else
+// EXEHEAD doesn't need a specific return code, just < 0
+
+#define Z_STREAM_ERROR Z_ERRNO
+#define Z_DATA_ERROR Z_ERRNO
+#define Z_MEM_ERROR Z_ERRNO
+#define Z_BUF_ERROR Z_ERRNO
+#define Z_VERSION_ERROR Z_ERRNO
+
+#endif
+/* Return codes for the compression/decompression functions. Negative
+ * values are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_ASCII 1
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+
+
+#define inflateInit(x) inflateReset(x)
+int ZEXPORT inflate(z_streamp z);
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+
+//void ZEXPORT inflateReset OF((
+ // z_streamp));
+#define inflateReset(z) \
+{ \
+ (z)->blocks.mode = TYPE; \
+ (z)->blocks.bitk = (z)->blocks.bitb = 0; \
+ (z)->blocks.read = (z)->blocks.write = (z)->blocks.window; \
+ (z)->blocks.end = (z)->blocks.window + (1 << DEF_WBITS); \
+}
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+//ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ // const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), "", sizeof(z_stream))
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ZLIB_H */
diff --git a/Source/zlib/ZUTIL.H b/Source/zlib/ZUTIL.H
index 67defc5..cf27a2c 100755
--- a/Source/zlib/ZUTIL.H
+++ b/Source/zlib/ZUTIL.H
@@ -1,85 +1,85 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id: ZUTIL.H,v 1.6 2007/01/25 18:07:40 kichik Exp $ */
-
-#ifndef _Z_UTIL_H
-#define _Z_UTIL_H
-
-#include "../Platform.h"
-#include "ZLIB.H"
-
-#ifndef local
-# define local static
-#endif
-
-typedef unsigned char uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long ulg;
-
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#define DEF_MEM_LEVEL MAX_MEM_LEVEL
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES 2
-/* The three kinds of block type */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-
-#ifdef EXEHEAD
-# ifdef _WIN32
-# include "../exehead/util.h"
-# define zmemcpy mini_memcpy
-# else
-# define zmemcpy memcpy
-# endif
-#else
-# define zmemcpy memcpy
-# define zmemzero(a,b) memset(a,0,b)
-#endif
-
-#define Assert(cond,msg)
-#define Trace(x)
-#define Tracev(x)
-#define Tracevv(x)
-#define Tracec(c,x)
-#define Tracecv(c,x)
-
-#define ZALLOC(strm, items, size) malloc((items)*(size))
-#define ZFREE(strm, addr) { if (addr) free(addr); }
-#define TRY_FREE(s, p) { ZFREE(s, p); }
-#define ERR_RETURN(strm,err) return (err)
-
-#endif /* _Z_UTIL_H */
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/* zutil.h -- internal interface and configuration of the compression library
+ * Copyright (C) 1995-1998 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* WARNING: this file should *not* be used by applications. It is
+ part of the implementation of the compression library and is
+ subject to change. Applications should only use zlib.h.
+ */
+
+/* @(#) $Id: ZUTIL.H,v 1.5 2007/01/13 17:28:23 kichik Exp $ */
+
+#ifndef _Z_UTIL_H
+#define _Z_UTIL_H
+
+#include "../Platform.h"
+#include "ZLIB.H"
+
+#ifndef local
+# define local static
+#endif
+
+typedef unsigned char uch;
+typedef uch FAR uchf;
+typedef unsigned short ush;
+typedef ush FAR ushf;
+typedef unsigned long ulg;
+
+#ifndef DEF_WBITS
+# define DEF_WBITS MAX_WBITS
+#endif
+/* default windowBits for decompression. MAX_WBITS is for compression only */
+
+#define DEF_MEM_LEVEL MAX_MEM_LEVEL
+
+#define STORED_BLOCK 0
+#define STATIC_TREES 1
+#define DYN_TREES 2
+/* The three kinds of block type */
+
+#define MIN_MATCH 3
+#define MAX_MATCH 258
+/* The minimum and maximum match lengths */
+
+#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
+
+
+#ifdef EXEHEAD
+# ifdef _WIN32
+# include "../exehead/util.h"
+# define zmemcpy mini_memcpy
+# else
+# define zmemcpy memcpy
+# endif
+#else
+# define zmemcpy memcpy
+# define zmemzero(a,b) memset(a,0,b)
+#endif
+
+#define Assert(cond,msg)
+#define Trace(x)
+#define Tracev(x)
+#define Tracevv(x)
+#define Tracec(c,x)
+#define Tracecv(c,x)
+
+#define ZALLOC(strm, items, size) malloc((items)*(size))
+#define ZFREE(strm, addr) { if (addr) free(addr); }
+#define TRY_FREE(s, p) { ZFREE(s, p); }
+#define ERR_RETURN(strm,err) return (err)
+
+#endif /* _Z_UTIL_H */
diff --git a/Source/zlib/deflate.c b/Source/zlib/deflate.c
index 1b74143..6cd5bc2 100755
--- a/Source/zlib/deflate.c
+++ b/Source/zlib/deflate.c
@@ -1,857 +1,857 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-
-#include "DEFLATE.H"
-
-const char deflate_copyright[] =
- " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- * Function prototypes.
- */
-typedef enum {
- need_more, /* block not completed, need more input or more output */
- block_done, /* block flush performed */
- finish_started, /* finish started, need only more output at next deflate */
- finish_done /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window OF((deflate_state *s));
-local block_state deflate_slow OF((deflate_state *s, int flush));
-local void lm_init OF((deflate_state *s));
-local void putShortMSB OF((deflate_state *s, uInt b));
-local void flush_pending OF((z_streamp strm));
-local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifdef ASMV
- void match_init OF((void)); /* asm code initialization */
- uInt longest_match OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match OF((deflate_state *s, IPos cur_match));
-#endif
-
-#ifdef DEBUG
-local void check_match OF((deflate_state *s, IPos start, IPos match,
- int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-# define TOO_FAR 32767 //stock is 4096, but 32767 enables slightly better compression
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-
-typedef struct config_s {
- ush good_length; /* reduce lazy search above this match length */
- ush max_lazy; /* do not perform lazy search above this match length */
- ush nice_length; /* quit search above this match length */
- ush max_chain;
- compress_func func;
-} config;
-
-local const config configuration_table =
-/* 9 */ {32, 258, 258, 16384, deflate_slow}; /* maximum compression */
-
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
- (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
- match_head = s->head[s->ins_h], \
- s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
- (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
- s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
- s->head[s->ins_h] = (Pos)(str))
-#endif
-
-#define CLEAR_HASH(s) \
- s->head[s->hash_size-1] = NIL; \
- zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
- z_streamp strm;
- int level;
- const char *version;
- int stream_size;
-{
- return deflateInit2_(strm, level, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL,
- Z_DEFAULT_STRATEGY, version, stream_size);
- /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
- version, stream_size)
- z_streamp strm;
- int level;
- int method;
- int windowBits;
- int memLevel;
- int strategy;
- const char *version;
- int stream_size;
-{
- deflate_state *s;
- int noheader = 0;
-
- ushf *overlay;
- /* We overlay pending_buf and d_buf+l_buf. This works since the average
- * output size for (length,distance) codes is <= 24 bits.
- */
-
- if (stream_size != sizeof(z_stream)) {
- return Z_VERSION_ERROR;
- }
- if (strm == Z_NULL) return Z_STREAM_ERROR;
-
-
- if (windowBits < 0) { /* undocumented feature: suppress zlib header */
- noheader = 1;
- windowBits = -windowBits;
- }
- if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
- windowBits < 8 || windowBits > MAX_WBITS || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
-
- return Z_STREAM_ERROR;
- }
-
- s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
- if (s == Z_NULL) return Z_MEM_ERROR;
- strm->state = (struct internal_state FAR *)s;
- s->strm = strm;
-
- s->noheader = noheader;
- s->w_bits = windowBits;
- s->w_size = 1 << s->w_bits;
- s->w_mask = s->w_size - 1;
-
- s->hash_bits = memLevel + 7;
- s->hash_size = 1 << s->hash_bits;
- s->hash_mask = s->hash_size - 1;
- s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
- s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
- s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
- s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
-
- s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
- overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
- s->pending_buf = (uchf *) overlay;
- s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
- if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
- s->pending_buf == Z_NULL) {
-// strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
- deflateEnd (strm);
- return Z_MEM_ERROR;
- }
- s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
- s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
- s->level = level;
- s->strategy = strategy;
- s->method = (Byte)method;
-
- return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
- z_streamp strm;
- const Bytef *dictionary;
- uInt dictLength;
-{
- deflate_state *s;
- uInt length = dictLength;
- uInt n;
- IPos hash_head = 0;
-
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
- strm->state->status != INIT_STATE) return Z_STREAM_ERROR;
-
- s = strm->state;
-
- if (length < MIN_MATCH) return Z_OK;
- if (length > MAX_DIST(s)) {
- length = MAX_DIST(s);
-#ifndef USE_DICT_HEAD
- dictionary += dictLength - length; /* use the tail of the dictionary */
-#endif
- }
- zmemcpy(s->window, dictionary, length);
- s->strstart = length;
- s->block_start = (long)length;
-
- s->ins_h = s->window[0];
- UPDATE_HASH(s, s->ins_h, s->window[1]);
- for (n = 0; n <= length - MIN_MATCH; n++) {
- INSERT_STRING(s, n, hash_head);
- }
- if (hash_head) hash_head = 0; /* to make compiler happy */
- return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
- z_streamp strm;
-{
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
- strm->total_in = strm->total_out = 0;
-// strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
-
- s = (deflate_state *)strm->state;
- s->pending = 0;
- s->pending_out = s->pending_buf;
-
- if (s->noheader < 0) {
- s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */
- }
- s->status = s->noheader ? BUSY_STATE : INIT_STATE;
- s->last_flush = Z_NO_FLUSH;
-
- _tr_init(s);
- lm_init(s);
-
- return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
- z_streamp strm;
- int level;
- int strategy;
-{
- deflate_state *s;
- compress_func func;
- int err = Z_OK;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- s = strm->state;
-
- if (level == Z_DEFAULT_COMPRESSION) {
- level = 6;
- }
- if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
- return Z_STREAM_ERROR;
- }
- func = configuration_table.func;
-
- s->level = level;
- s->max_lazy_match = configuration_table.max_lazy;
- s->good_match = configuration_table.good_length;
- s->nice_match = configuration_table.nice_length;
- s->max_chain_length = configuration_table.max_chain;
- s->strategy = strategy;
- return err;
-}
-
-local void putShortMSB (s, b)
- deflate_state *s;
- uInt b;
-{
- put_byte(s, (Byte)(b >> 8));
- put_byte(s, (Byte)(b & 0xff));
-}
-
-local void flush_pending(strm)
- z_streamp strm;
-{
- unsigned len = strm->state->pending;
-
- if (len > strm->avail_out) len = strm->avail_out;
- if (len == 0) return;
-
- zmemcpy(strm->next_out, strm->state->pending_out, len);
- strm->next_out += len;
- strm->state->pending_out += len;
- strm->total_out += len;
- strm->avail_out -= len;
- strm->state->pending -= len;
- if (strm->state->pending == 0) {
- strm->state->pending_out = strm->state->pending_buf;
- }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
- z_streamp strm;
- int flush;
-{
- int old_flush; /* value of flush param for previous deflate call */
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL ||
- flush > Z_FINISH || flush < 0) {
- return Z_STREAM_ERROR;
- }
- s = strm->state;
-
- if (strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0) ||
- (s->status == FINISH_STATE && flush != Z_FINISH)) {
- ERR_RETURN(strm, Z_STREAM_ERROR);
- }
- if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
- s->strm = strm; /* just in case */
- old_flush = s->last_flush;
- s->last_flush = flush;
-
- /* Write the zlib header */
- if (s->status == INIT_STATE) {
-
- uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
- uInt level_flags = (s->level-1) >> 1;
-
- if (level_flags > 3) level_flags = 3;
- header |= (level_flags << 6);
- if (s->strstart != 0) header |= PRESET_DICT;
- header += 31 - (header % 31);
-
- s->status = BUSY_STATE;
- putShortMSB(s, header);
-
- /* Save the adler32 of the preset dictionary: */
- if (s->strstart != 0) {
- //putShortMSB(s, (uInt)(strm->adler >> 16));
- //putShortMSB(s, (uInt)(strm->adler & 0xffff));
- }
- //strm->adler = 1L;
- }
-
- /* Flush as much pending output as possible */
- if (s->pending != 0) {
- flush_pending(strm);
- if (strm->avail_out == 0) {
- s->last_flush = -1;
- return Z_OK;
- }
-
- } else if (strm->avail_in == 0 && flush <= old_flush &&
- flush != Z_FINISH) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* User must not provide more input after the first FINISH: */
- if (s->status == FINISH_STATE && strm->avail_in != 0) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* Start a new block or continue the current one.
- */
- if (strm->avail_in != 0 || s->lookahead != 0 ||
- (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
- block_state bstate;
-
- bstate = (*(configuration_table.func))(s, flush);
-
- if (bstate == finish_started || bstate == finish_done) {
- s->status = FINISH_STATE;
- }
- if (bstate == need_more || bstate == finish_started) {
- if (strm->avail_out == 0) {
- s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
- }
- return Z_OK;
- }
- if (bstate == block_done) {
- if (flush == Z_PARTIAL_FLUSH) {
- _tr_align(s);
- } else { /* FULL_FLUSH or SYNC_FLUSH */
- _tr_stored_block(s, (char*)0, 0L, 0);
- /* For a full flush, this empty block will be recognized
- * as a special marker by inflate_sync().
- */
- if (flush == Z_FULL_FLUSH) {
- CLEAR_HASH(s); /* forget history */
- }
- }
- flush_pending(strm);
- if (strm->avail_out == 0) {
- s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
- return Z_OK;
- }
- }
- }
- Assert(strm->avail_out > 0, "bug2");
-
- if (flush != Z_FINISH) return Z_OK;
- if (s->noheader) return Z_STREAM_END;
-
- flush_pending(strm);
- s->noheader = -1; /* write the trailer only once! */
- return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
- z_streamp strm;
-{
- int status;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
- status = strm->state->status;
- if (status != INIT_STATE && status != BUSY_STATE &&
- status != FINISH_STATE) {
- return Z_STREAM_ERROR;
- }
-
- /* Deallocate in reverse order of allocations: */
- TRY_FREE(strm, strm->state->pending_buf);
- TRY_FREE(strm, strm->state->head);
- TRY_FREE(strm, strm->state->prev);
- TRY_FREE(strm, strm->state->window);
-
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
-
- return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-
-local int read_buf(strm, buf, size)
- z_streamp strm;
- Bytef *buf;
- unsigned size;
-{
- unsigned len = strm->avail_in;
-
- if (len > size) len = size;
- if (len == 0) return 0;
-
- strm->avail_in -= len;
-
- //if (!strm->state->noheader) {
-// strm->adler = adler32(strm->adler, strm->next_in, len);
- // }
- zmemcpy(buf, strm->next_in, len);
- strm->next_in += len;
- strm->total_in += len;
-
- return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
- deflate_state *s;
-{
- s->window_size = (ulg)2L*s->w_size;
-
- CLEAR_HASH(s);
-
- /* Set the default configuration parameters:
- */
- s->max_lazy_match = configuration_table.max_lazy;
- s->good_match = configuration_table.good_length;
- s->nice_match = configuration_table.nice_length;
- s->max_chain_length = configuration_table.max_chain;
-
- s->strstart = 0;
- s->block_start = 0L;
- s->lookahead = 0;
- s->match_length = s->prev_length = MIN_MATCH-1;
- s->match_available = 0;
- s->ins_h = 0;
-#ifdef ASMV
- match_init(); /* initialize the asm code */
-#endif
-}
-
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-#ifndef FASTEST
-local uInt longest_match(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
-{
- unsigned chain_length = s->max_chain_length;/* max hash chain length */
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
- int best_len = s->prev_length; /* best match length so far */
- int nice_match = s->nice_match; /* stop if match long enough */
- IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
- s->strstart - (IPos)MAX_DIST(s) : NIL;
- /* Stop when cur_match becomes <= limit. To simplify the code,
- * we prevent matches with the string of window index 0.
- */
- Posf *prev = s->prev;
- uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
- /* Compare two bytes at a time. Note: this is not always beneficial.
- * Try with and without -DUNALIGNED_OK to check.
- */
- register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
- register ush scan_start = *(ushf*)scan;
- register ush scan_end = *(ushf*)(scan+best_len-1);
-#else
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
- register Byte scan_end1 = scan[best_len-1];
- register Byte scan_end = scan[best_len];
-#endif
-
- /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
- * It is easy to get rid of this optimization if necessary.
- */
- Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
- /* Do not waste too much time if we already have a good match: */
- if (s->prev_length >= s->good_match) {
- chain_length >>= 2;
- }
- /* Do not look for matches beyond the end of the input. This is necessary
- * to make deflate deterministic.
- */
- if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
- Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
- do {
- Assert(cur_match < s->strstart, "no future");
- match = s->window + cur_match;
-
- /* Skip to next match if the match length cannot increase
- * or if the match length is less than 2:
- */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
- /* This code assumes sizeof(unsigned short) == 2. Do not use
- * UNALIGNED_OK if your compiler uses a different size.
- */
- if (*(ushf*)(match+best_len-1) != scan_end ||
- *(ushf*)match != scan_start) continue;
-
- Assert(scan[2] == match[2], "scan[2]?");
- scan++, match++;
- do {
- } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- scan < strend);
- /* The funny "do {}" generates better code on most compilers */
-
- /* Here, scan <= window+strstart+257 */
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
- if (*scan == *match) scan++;
-
- len = (MAX_MATCH - 1) - (int)(strend-scan);
- scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
- if (match[best_len] != scan_end ||
- match[best_len-1] != scan_end1 ||
- *match != *scan ||
- *++match != scan[1]) continue;
-
- scan += 2, match++;
- Assert(*scan == *match, "match[2]?");
- do {
- } while (*++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- scan < strend);
-
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
- len = MAX_MATCH - (int)(strend - scan);
- scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
- if (len > best_len) {
- s->match_start = cur_match;
- best_len = len;
- if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
- scan_end = *(ushf*)(scan+best_len-1);
-#else
- scan_end1 = scan[best_len-1];
- scan_end = scan[best_len];
-#endif
- }
- } while ((cur_match = prev[cur_match & wmask]) > limit
- && --chain_length != 0);
-
- if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
- return s->lookahead;
-}
-
-#else /* FASTEST */
-/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 only
- */
-local uInt longest_match(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
-{
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
- Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
- Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
- Assert(cur_match < s->strstart, "no future");
-
- match = s->window + cur_match;
-
- /* Return failure if the match length is less than 2:
- */
- if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
- scan += 2, match += 2;
- Assert(*scan == *match, "match[2]?");
-
- do {
- } while (*++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- scan < strend);
-
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
- len = MAX_MATCH - (int)(strend - scan);
-
- if (len < MIN_MATCH) return MIN_MATCH - 1;
-
- s->match_start = cur_match;
- return len <= s->lookahead ? len : s->lookahead;
-}
-#endif /* FASTEST */
-#endif /* ASMV */
-
-# define check_match(s, start, match, length)
-
-local void fill_window(s)
- deflate_state *s;
-{
- register unsigned n, m;
- register Posf *p;
- unsigned more; /* Amount of free space at the end of the window. */
- uInt wsize = s->w_size;
-
- do {
- more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
- /* Deal with !@#$% 64K limit: */
- if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
- more = wsize;
-
- } else if (more == (unsigned)(-1)) {
- /* Very unlikely, but possible on 16 bit machine if strstart == 0
- * and lookahead == 1 (input done one byte at time)
- */
- more--;
-
- /* If the window is almost full and there is insufficient lookahead,
- * move the upper half to the lower one to make room in the upper half.
- */
- } else if (s->strstart >= wsize+MAX_DIST(s)) {
-
- zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
- s->match_start -= wsize;
- s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
- s->block_start -= (long) wsize;
-
- n = s->hash_size;
- p = &s->head[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- } while (--n);
-
- n = wsize;
-#ifndef FASTEST
- p = &s->prev[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- /* If n is not on any hash chain, prev[n] is garbage but
- * its value will never be used.
- */
- } while (--n);
-#endif
- more += wsize;
- }
- if (s->strm->avail_in == 0) return;
- Assert(more >= 2, "more < 2");
-
- n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
- s->lookahead += n;
-
- /* Initialize the hash value now that we have some input: */
- if (s->lookahead >= MIN_MATCH) {
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-# error Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
- }
-
- } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-#define FLUSH_BLOCK_ONLY(s, eof) { \
- _tr_flush_block(s, (s->block_start >= 0L ? \
- (charf *)&s->window[(unsigned)s->block_start] : \
- (charf *)Z_NULL), \
- (ulg)((long)s->strstart - s->block_start), \
- (eof)); \
- s->block_start = s->strstart; \
- flush_pending(s->strm); \
- Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
- FLUSH_BLOCK_ONLY(s, eof); \
- if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-
-
-local block_state deflate_slow(s, flush)
- deflate_state *s;
- int flush;
-{
- IPos hash_head = NIL; /* head of hash chain */
- int bflush; /* set if current block must be flushed */
-
- /* Process the input block. */
- for (;;) {
- if (s->lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
- return need_more;
- }
- if (s->lookahead == 0) break; /* flush the current block */
- }
- if (s->lookahead >= MIN_MATCH) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
-
- /* Find the longest match, discarding those <= prev_length.
- */
- s->prev_length = s->match_length, s->prev_match = s->match_start;
- s->match_length = MIN_MATCH-1;
-
- if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
- s->strstart - hash_head <= MAX_DIST(s)) {
- if (s->strategy != Z_HUFFMAN_ONLY) {
- s->match_length = longest_match (s, hash_head);
- }
- /* longest_match() sets match_start */
-
- if (s->match_length <= 5 && (s->strategy == Z_FILTERED ||
- (s->match_length == MIN_MATCH &&
- s->strstart - s->match_start > TOO_FAR))) {
-
- s->match_length = MIN_MATCH-1;
- }
- }
- if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
- uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
- /* Do not insert strings in hash table beyond this. */
-
- check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
- _tr_tally_dist(s, s->strstart -1 - s->prev_match,
- s->prev_length - MIN_MATCH, bflush);
-
- s->lookahead -= s->prev_length-1;
- s->prev_length -= 2;
- do {
- if (++s->strstart <= max_insert) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
- } while (--s->prev_length != 0);
- s->match_available = 0;
- s->match_length = MIN_MATCH-1;
- s->strstart++;
-
- if (bflush) FLUSH_BLOCK(s, 0);
-
- } else if (s->match_available) {
- Tracevv((stderr,"%c", s->window[s->strstart-1]));
- _tr_tally_lit(s, s->window[s->strstart-1], bflush);
- if (bflush) {
- FLUSH_BLOCK_ONLY(s, 0);
- }
- s->strstart++;
- s->lookahead--;
- if (s->strm->avail_out == 0) return need_more;
- } else {
- /* There is no previous match to compare with, wait for
- * the next step to decide.
- */
- s->match_available = 1;
- s->strstart++;
- s->lookahead--;
- }
- }
- Assert (flush != Z_NO_FLUSH, "no flush?");
- if (s->match_available) {
- Tracevv((stderr,"%c", s->window[s->strstart-1]));
- _tr_tally_lit(s, s->window[s->strstart-1], bflush);
- s->match_available = 0;
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/* deflate.c -- compress data using the deflation algorithm
+ * Copyright (C) 1995-1998 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+
+#include "DEFLATE.H"
+
+const char deflate_copyright[] =
+ " deflate 1.1.3 Copyright 1995-1998 Jean-loup Gailly ";
+/*
+ If you use the zlib library in a product, an acknowledgment is welcome
+ in the documentation of your product. If for some reason you cannot
+ include such an acknowledgment, I would appreciate that you keep this
+ copyright string in the executable of your product.
+ */
+
+/* ===========================================================================
+ * Function prototypes.
+ */
+typedef enum {
+ need_more, /* block not completed, need more input or more output */
+ block_done, /* block flush performed */
+ finish_started, /* finish started, need only more output at next deflate */
+ finish_done /* finish done, accept no more input or output */
+} block_state;
+
+typedef block_state (*compress_func) OF((deflate_state *s, int flush));
+/* Compression function. Returns the block state after the call. */
+
+local void fill_window OF((deflate_state *s));
+local block_state deflate_slow OF((deflate_state *s, int flush));
+local void lm_init OF((deflate_state *s));
+local void putShortMSB OF((deflate_state *s, uInt b));
+local void flush_pending OF((z_streamp strm));
+local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
+#ifdef ASMV
+ void match_init OF((void)); /* asm code initialization */
+ uInt longest_match OF((deflate_state *s, IPos cur_match));
+#else
+local uInt longest_match OF((deflate_state *s, IPos cur_match));
+#endif
+
+#ifdef DEBUG
+local void check_match OF((deflate_state *s, IPos start, IPos match,
+ int length));
+#endif
+
+/* ===========================================================================
+ * Local data
+ */
+
+#define NIL 0
+/* Tail of hash chains */
+
+#ifndef TOO_FAR
+# define TOO_FAR 32767 //stock is 4096, but 32767 enables slightly better compression
+#endif
+/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
+
+#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
+
+typedef struct config_s {
+ ush good_length; /* reduce lazy search above this match length */
+ ush max_lazy; /* do not perform lazy search above this match length */
+ ush nice_length; /* quit search above this match length */
+ ush max_chain;
+ compress_func func;
+} config;
+
+local const config configuration_table =
+/* 9 */ {32, 258, 258, 16384, deflate_slow}; /* maximum compression */
+
+
+#define EQUAL 0
+/* result of memcmp for equal strings */
+
+struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
+
+#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
+
+
+#ifdef FASTEST
+#define INSERT_STRING(s, str, match_head) \
+ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
+ match_head = s->head[s->ins_h], \
+ s->head[s->ins_h] = (Pos)(str))
+#else
+#define INSERT_STRING(s, str, match_head) \
+ (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
+ s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
+ s->head[s->ins_h] = (Pos)(str))
+#endif
+
+#define CLEAR_HASH(s) \
+ s->head[s->hash_size-1] = NIL; \
+ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
+
+/* ========================================================================= */
+int ZEXPORT deflateInit_(strm, level, version, stream_size)
+ z_streamp strm;
+ int level;
+ const char *version;
+ int stream_size;
+{
+ return deflateInit2_(strm, level, Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL,
+ Z_DEFAULT_STRATEGY, version, stream_size);
+ /* To do: ignore strm->next_in if we use it as window */
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
+ version, stream_size)
+ z_streamp strm;
+ int level;
+ int method;
+ int windowBits;
+ int memLevel;
+ int strategy;
+ const char *version;
+ int stream_size;
+{
+ deflate_state *s;
+ int noheader = 0;
+
+ ushf *overlay;
+ /* We overlay pending_buf and d_buf+l_buf. This works since the average
+ * output size for (length,distance) codes is <= 24 bits.
+ */
+
+ if (stream_size != sizeof(z_stream)) {
+ return Z_VERSION_ERROR;
+ }
+ if (strm == Z_NULL) return Z_STREAM_ERROR;
+
+
+ if (windowBits < 0) { /* undocumented feature: suppress zlib header */
+ noheader = 1;
+ windowBits = -windowBits;
+ }
+ if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
+ windowBits < 8 || windowBits > MAX_WBITS || level < 0 || level > 9 ||
+ strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
+
+ return Z_STREAM_ERROR;
+ }
+
+ s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
+ if (s == Z_NULL) return Z_MEM_ERROR;
+ strm->state = (struct internal_state FAR *)s;
+ s->strm = strm;
+
+ s->noheader = noheader;
+ s->w_bits = windowBits;
+ s->w_size = 1 << s->w_bits;
+ s->w_mask = s->w_size - 1;
+
+ s->hash_bits = memLevel + 7;
+ s->hash_size = 1 << s->hash_bits;
+ s->hash_mask = s->hash_size - 1;
+ s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
+
+ s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
+ s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
+ s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
+
+ s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+ overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
+ s->pending_buf = (uchf *) overlay;
+ s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
+
+ if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
+ s->pending_buf == Z_NULL) {
+// strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ deflateEnd (strm);
+ return Z_MEM_ERROR;
+ }
+ s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
+ s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
+
+ s->level = level;
+ s->strategy = strategy;
+ s->method = (Byte)method;
+
+ return deflateReset(strm);
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
+ z_streamp strm;
+ const Bytef *dictionary;
+ uInt dictLength;
+{
+ deflate_state *s;
+ uInt length = dictLength;
+ uInt n;
+ IPos hash_head = 0;
+
+ if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
+ strm->state->status != INIT_STATE) return Z_STREAM_ERROR;
+
+ s = strm->state;
+
+ if (length < MIN_MATCH) return Z_OK;
+ if (length > MAX_DIST(s)) {
+ length = MAX_DIST(s);
+#ifndef USE_DICT_HEAD
+ dictionary += dictLength - length; /* use the tail of the dictionary */
+#endif
+ }
+ zmemcpy(s->window, dictionary, length);
+ s->strstart = length;
+ s->block_start = (long)length;
+
+ s->ins_h = s->window[0];
+ UPDATE_HASH(s, s->ins_h, s->window[1]);
+ for (n = 0; n <= length - MIN_MATCH; n++) {
+ INSERT_STRING(s, n, hash_head);
+ }
+ if (hash_head) hash_head = 0; /* to make compiler happy */
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateReset (strm)
+ z_streamp strm;
+{
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+
+ strm->total_in = strm->total_out = 0;
+// strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
+
+ s = (deflate_state *)strm->state;
+ s->pending = 0;
+ s->pending_out = s->pending_buf;
+
+ if (s->noheader < 0) {
+ s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */
+ }
+ s->status = s->noheader ? BUSY_STATE : INIT_STATE;
+ s->last_flush = Z_NO_FLUSH;
+
+ _tr_init(s);
+ lm_init(s);
+
+ return Z_OK;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateParams(strm, level, strategy)
+ z_streamp strm;
+ int level;
+ int strategy;
+{
+ deflate_state *s;
+ compress_func func;
+ int err = Z_OK;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ s = strm->state;
+
+ if (level == Z_DEFAULT_COMPRESSION) {
+ level = 6;
+ }
+ if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
+ return Z_STREAM_ERROR;
+ }
+ func = configuration_table.func;
+
+ s->level = level;
+ s->max_lazy_match = configuration_table.max_lazy;
+ s->good_match = configuration_table.good_length;
+ s->nice_match = configuration_table.nice_length;
+ s->max_chain_length = configuration_table.max_chain;
+ s->strategy = strategy;
+ return err;
+}
+
+local void putShortMSB (s, b)
+ deflate_state *s;
+ uInt b;
+{
+ put_byte(s, (Byte)(b >> 8));
+ put_byte(s, (Byte)(b & 0xff));
+}
+
+local void flush_pending(strm)
+ z_streamp strm;
+{
+ unsigned len = strm->state->pending;
+
+ if (len > strm->avail_out) len = strm->avail_out;
+ if (len == 0) return;
+
+ zmemcpy(strm->next_out, strm->state->pending_out, len);
+ strm->next_out += len;
+ strm->state->pending_out += len;
+ strm->total_out += len;
+ strm->avail_out -= len;
+ strm->state->pending -= len;
+ if (strm->state->pending == 0) {
+ strm->state->pending_out = strm->state->pending_buf;
+ }
+}
+
+/* ========================================================================= */
+int ZEXPORT deflate (strm, flush)
+ z_streamp strm;
+ int flush;
+{
+ int old_flush; /* value of flush param for previous deflate call */
+ deflate_state *s;
+
+ if (strm == Z_NULL || strm->state == Z_NULL ||
+ flush > Z_FINISH || flush < 0) {
+ return Z_STREAM_ERROR;
+ }
+ s = strm->state;
+
+ if (strm->next_out == Z_NULL ||
+ (strm->next_in == Z_NULL && strm->avail_in != 0) ||
+ (s->status == FINISH_STATE && flush != Z_FINISH)) {
+ ERR_RETURN(strm, Z_STREAM_ERROR);
+ }
+ if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
+
+ s->strm = strm; /* just in case */
+ old_flush = s->last_flush;
+ s->last_flush = flush;
+
+ /* Write the zlib header */
+ if (s->status == INIT_STATE) {
+
+ uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
+ uInt level_flags = (s->level-1) >> 1;
+
+ if (level_flags > 3) level_flags = 3;
+ header |= (level_flags << 6);
+ if (s->strstart != 0) header |= PRESET_DICT;
+ header += 31 - (header % 31);
+
+ s->status = BUSY_STATE;
+ putShortMSB(s, header);
+
+ /* Save the adler32 of the preset dictionary: */
+ if (s->strstart != 0) {
+ //putShortMSB(s, (uInt)(strm->adler >> 16));
+ //putShortMSB(s, (uInt)(strm->adler & 0xffff));
+ }
+ //strm->adler = 1L;
+ }
+
+ /* Flush as much pending output as possible */
+ if (s->pending != 0) {
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ s->last_flush = -1;
+ return Z_OK;
+ }
+
+ } else if (strm->avail_in == 0 && flush <= old_flush &&
+ flush != Z_FINISH) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* User must not provide more input after the first FINISH: */
+ if (s->status == FINISH_STATE && strm->avail_in != 0) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
+
+ /* Start a new block or continue the current one.
+ */
+ if (strm->avail_in != 0 || s->lookahead != 0 ||
+ (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
+ block_state bstate;
+
+ bstate = (*(configuration_table.func))(s, flush);
+
+ if (bstate == finish_started || bstate == finish_done) {
+ s->status = FINISH_STATE;
+ }
+ if (bstate == need_more || bstate == finish_started) {
+ if (strm->avail_out == 0) {
+ s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
+ }
+ return Z_OK;
+ }
+ if (bstate == block_done) {
+ if (flush == Z_PARTIAL_FLUSH) {
+ _tr_align(s);
+ } else { /* FULL_FLUSH or SYNC_FLUSH */
+ _tr_stored_block(s, (char*)0, 0L, 0);
+ /* For a full flush, this empty block will be recognized
+ * as a special marker by inflate_sync().
+ */
+ if (flush == Z_FULL_FLUSH) {
+ CLEAR_HASH(s); /* forget history */
+ }
+ }
+ flush_pending(strm);
+ if (strm->avail_out == 0) {
+ s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+ return Z_OK;
+ }
+ }
+ }
+ Assert(strm->avail_out > 0, "bug2");
+
+ if (flush != Z_FINISH) return Z_OK;
+ if (s->noheader) return Z_STREAM_END;
+
+ flush_pending(strm);
+ s->noheader = -1; /* write the trailer only once! */
+ return s->pending != 0 ? Z_OK : Z_STREAM_END;
+}
+
+/* ========================================================================= */
+int ZEXPORT deflateEnd (strm)
+ z_streamp strm;
+{
+ int status;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+
+ status = strm->state->status;
+ if (status != INIT_STATE && status != BUSY_STATE &&
+ status != FINISH_STATE) {
+ return Z_STREAM_ERROR;
+ }
+
+ /* Deallocate in reverse order of allocations: */
+ TRY_FREE(strm, strm->state->pending_buf);
+ TRY_FREE(strm, strm->state->head);
+ TRY_FREE(strm, strm->state->prev);
+ TRY_FREE(strm, strm->state->window);
+
+ ZFREE(strm, strm->state);
+ strm->state = Z_NULL;
+
+ return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
+}
+
+
+local int read_buf(strm, buf, size)
+ z_streamp strm;
+ Bytef *buf;
+ unsigned size;
+{
+ unsigned len = strm->avail_in;
+
+ if (len > size) len = size;
+ if (len == 0) return 0;
+
+ strm->avail_in -= len;
+
+ //if (!strm->state->noheader) {
+// strm->adler = adler32(strm->adler, strm->next_in, len);
+ // }
+ zmemcpy(buf, strm->next_in, len);
+ strm->next_in += len;
+ strm->total_in += len;
+
+ return (int)len;
+}
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+local void lm_init (s)
+ deflate_state *s;
+{
+ s->window_size = (ulg)2L*s->w_size;
+
+ CLEAR_HASH(s);
+
+ /* Set the default configuration parameters:
+ */
+ s->max_lazy_match = configuration_table.max_lazy;
+ s->good_match = configuration_table.good_length;
+ s->nice_match = configuration_table.nice_length;
+ s->max_chain_length = configuration_table.max_chain;
+
+ s->strstart = 0;
+ s->block_start = 0L;
+ s->lookahead = 0;
+ s->match_length = s->prev_length = MIN_MATCH-1;
+ s->match_available = 0;
+ s->ins_h = 0;
+#ifdef ASMV
+ match_init(); /* initialize the asm code */
+#endif
+}
+
+#ifndef ASMV
+/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
+ * match.S. The code will be functionally equivalent.
+ */
+#ifndef FASTEST
+local uInt longest_match(s, cur_match)
+ deflate_state *s;
+ IPos cur_match; /* current match */
+{
+ unsigned chain_length = s->max_chain_length;/* max hash chain length */
+ register Bytef *scan = s->window + s->strstart; /* current string */
+ register Bytef *match; /* matched string */
+ register int len; /* length of current match */
+ int best_len = s->prev_length; /* best match length so far */
+ int nice_match = s->nice_match; /* stop if match long enough */
+ IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
+ s->strstart - (IPos)MAX_DIST(s) : NIL;
+ /* Stop when cur_match becomes <= limit. To simplify the code,
+ * we prevent matches with the string of window index 0.
+ */
+ Posf *prev = s->prev;
+ uInt wmask = s->w_mask;
+
+#ifdef UNALIGNED_OK
+ /* Compare two bytes at a time. Note: this is not always beneficial.
+ * Try with and without -DUNALIGNED_OK to check.
+ */
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
+ register ush scan_start = *(ushf*)scan;
+ register ush scan_end = *(ushf*)(scan+best_len-1);
+#else
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+ register Byte scan_end1 = scan[best_len-1];
+ register Byte scan_end = scan[best_len];
+#endif
+
+ /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+ * It is easy to get rid of this optimization if necessary.
+ */
+ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ /* Do not waste too much time if we already have a good match: */
+ if (s->prev_length >= s->good_match) {
+ chain_length >>= 2;
+ }
+ /* Do not look for matches beyond the end of the input. This is necessary
+ * to make deflate deterministic.
+ */
+ if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
+
+ Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ do {
+ Assert(cur_match < s->strstart, "no future");
+ match = s->window + cur_match;
+
+ /* Skip to next match if the match length cannot increase
+ * or if the match length is less than 2:
+ */
+#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
+ /* This code assumes sizeof(unsigned short) == 2. Do not use
+ * UNALIGNED_OK if your compiler uses a different size.
+ */
+ if (*(ushf*)(match+best_len-1) != scan_end ||
+ *(ushf*)match != scan_start) continue;
+
+ Assert(scan[2] == match[2], "scan[2]?");
+ scan++, match++;
+ do {
+ } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
+ scan < strend);
+ /* The funny "do {}" generates better code on most compilers */
+
+ /* Here, scan <= window+strstart+257 */
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+ if (*scan == *match) scan++;
+
+ len = (MAX_MATCH - 1) - (int)(strend-scan);
+ scan = strend - (MAX_MATCH-1);
+
+#else /* UNALIGNED_OK */
+
+ if (match[best_len] != scan_end ||
+ match[best_len-1] != scan_end1 ||
+ *match != *scan ||
+ *++match != scan[1]) continue;
+
+ scan += 2, match++;
+ Assert(*scan == *match, "match[2]?");
+ do {
+ } while (*++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ scan < strend);
+
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (int)(strend - scan);
+ scan = strend - MAX_MATCH;
+
+#endif /* UNALIGNED_OK */
+
+ if (len > best_len) {
+ s->match_start = cur_match;
+ best_len = len;
+ if (len >= nice_match) break;
+#ifdef UNALIGNED_OK
+ scan_end = *(ushf*)(scan+best_len-1);
+#else
+ scan_end1 = scan[best_len-1];
+ scan_end = scan[best_len];
+#endif
+ }
+ } while ((cur_match = prev[cur_match & wmask]) > limit
+ && --chain_length != 0);
+
+ if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
+ return s->lookahead;
+}
+
+#else /* FASTEST */
+/* ---------------------------------------------------------------------------
+ * Optimized version for level == 1 only
+ */
+local uInt longest_match(s, cur_match)
+ deflate_state *s;
+ IPos cur_match; /* current match */
+{
+ register Bytef *scan = s->window + s->strstart; /* current string */
+ register Bytef *match; /* matched string */
+ register int len; /* length of current match */
+ register Bytef *strend = s->window + s->strstart + MAX_MATCH;
+
+ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+ Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+ Assert(cur_match < s->strstart, "no future");
+
+ match = s->window + cur_match;
+
+ /* Return failure if the match length is less than 2:
+ */
+ if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
+ scan += 2, match += 2;
+ Assert(*scan == *match, "match[2]?");
+
+ do {
+ } while (*++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ *++scan == *++match && *++scan == *++match &&
+ scan < strend);
+
+ Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+ len = MAX_MATCH - (int)(strend - scan);
+
+ if (len < MIN_MATCH) return MIN_MATCH - 1;
+
+ s->match_start = cur_match;
+ return len <= s->lookahead ? len : s->lookahead;
+}
+#endif /* FASTEST */
+#endif /* ASMV */
+
+# define check_match(s, start, match, length)
+
+local void fill_window(s)
+ deflate_state *s;
+{
+ register unsigned n, m;
+ register Posf *p;
+ unsigned more; /* Amount of free space at the end of the window. */
+ uInt wsize = s->w_size;
+
+ do {
+ more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
+
+ /* Deal with !@#$% 64K limit: */
+ if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+ more = wsize;
+
+ } else if (more == (unsigned)(-1)) {
+ /* Very unlikely, but possible on 16 bit machine if strstart == 0
+ * and lookahead == 1 (input done one byte at time)
+ */
+ more--;
+
+ /* If the window is almost full and there is insufficient lookahead,
+ * move the upper half to the lower one to make room in the upper half.
+ */
+ } else if (s->strstart >= wsize+MAX_DIST(s)) {
+
+ zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
+ s->match_start -= wsize;
+ s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
+ s->block_start -= (long) wsize;
+
+ n = s->hash_size;
+ p = &s->head[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ } while (--n);
+
+ n = wsize;
+#ifndef FASTEST
+ p = &s->prev[n];
+ do {
+ m = *--p;
+ *p = (Pos)(m >= wsize ? m-wsize : NIL);
+ /* If n is not on any hash chain, prev[n] is garbage but
+ * its value will never be used.
+ */
+ } while (--n);
+#endif
+ more += wsize;
+ }
+ if (s->strm->avail_in == 0) return;
+ Assert(more >= 2, "more < 2");
+
+ n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
+ s->lookahead += n;
+
+ /* Initialize the hash value now that we have some input: */
+ if (s->lookahead >= MIN_MATCH) {
+ s->ins_h = s->window[s->strstart];
+ UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
+#if MIN_MATCH != 3
+# error Call UPDATE_HASH() MIN_MATCH-3 more times
+#endif
+ }
+
+ } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
+}
+
+#define FLUSH_BLOCK_ONLY(s, eof) { \
+ _tr_flush_block(s, (s->block_start >= 0L ? \
+ (charf *)&s->window[(unsigned)s->block_start] : \
+ (charf *)Z_NULL), \
+ (ulg)((long)s->strstart - s->block_start), \
+ (eof)); \
+ s->block_start = s->strstart; \
+ flush_pending(s->strm); \
+ Tracev((stderr,"[FLUSH]")); \
+}
+
+/* Same but force premature exit if necessary. */
+#define FLUSH_BLOCK(s, eof) { \
+ FLUSH_BLOCK_ONLY(s, eof); \
+ if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
+}
+
+
+
+local block_state deflate_slow(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ IPos hash_head = NIL; /* head of hash chain */
+ int bflush; /* set if current block must be flushed */
+
+ /* Process the input block. */
+ for (;;) {
+ if (s->lookahead < MIN_LOOKAHEAD) {
+ fill_window(s);
+ if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
+ return need_more;
+ }
+ if (s->lookahead == 0) break; /* flush the current block */
+ }
+ if (s->lookahead >= MIN_MATCH) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+
+ /* Find the longest match, discarding those <= prev_length.
+ */
+ s->prev_length = s->match_length, s->prev_match = s->match_start;
+ s->match_length = MIN_MATCH-1;
+
+ if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
+ s->strstart - hash_head <= MAX_DIST(s)) {
+ if (s->strategy != Z_HUFFMAN_ONLY) {
+ s->match_length = longest_match (s, hash_head);
+ }
+ /* longest_match() sets match_start */
+
+ if (s->match_length <= 5 && (s->strategy == Z_FILTERED ||
+ (s->match_length == MIN_MATCH &&
+ s->strstart - s->match_start > TOO_FAR))) {
+
+ s->match_length = MIN_MATCH-1;
+ }
+ }
+ if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
+ uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
+ /* Do not insert strings in hash table beyond this. */
+
+ check_match(s, s->strstart-1, s->prev_match, s->prev_length);
+
+ _tr_tally_dist(s, s->strstart -1 - s->prev_match,
+ s->prev_length - MIN_MATCH, bflush);
+
+ s->lookahead -= s->prev_length-1;
+ s->prev_length -= 2;
+ do {
+ if (++s->strstart <= max_insert) {
+ INSERT_STRING(s, s->strstart, hash_head);
+ }
+ } while (--s->prev_length != 0);
+ s->match_available = 0;
+ s->match_length = MIN_MATCH-1;
+ s->strstart++;
+
+ if (bflush) FLUSH_BLOCK(s, 0);
+
+ } else if (s->match_available) {
+ Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ _tr_tally_lit(s, s->window[s->strstart-1], bflush);
+ if (bflush) {
+ FLUSH_BLOCK_ONLY(s, 0);
+ }
+ s->strstart++;
+ s->lookahead--;
+ if (s->strm->avail_out == 0) return need_more;
+ } else {
+ /* There is no previous match to compare with, wait for
+ * the next step to decide.
+ */
+ s->match_available = 1;
+ s->strstart++;
+ s->lookahead--;
+ }
+ }
+ Assert (flush != Z_NO_FLUSH, "no flush?");
+ if (s->match_available) {
+ Tracevv((stderr,"%c", s->window[s->strstart-1]));
+ _tr_tally_lit(s, s->window[s->strstart-1], bflush);
+ s->match_available = 0;
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
diff --git a/Source/zlib/trees.c b/Source/zlib/trees.c
index eb1a5af..43377e5 100755
--- a/Source/zlib/trees.c
+++ b/Source/zlib/trees.c
@@ -1,894 +1,894 @@
-/*
- * This file is a part of the zlib compression module for NSIS.
- *
- * Copyright and license information can be found below.
- * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
- *
- * The original zlib source code is available at
- * http://www.zlib.net/
- *
- * This software is provided 'as-is', without any express or implied
- * warranty.
- */
-
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-1998 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-
-#include "DEFLATE.H"
-
-#ifdef DEBUG
-# include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6 16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10 17
-/* repeat a zero length 3-10 times (3 bits of repeat count) */
-
-#define REPZ_11_138 18
-/* repeat a zero length 11-138 times (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
- = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
- = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
- = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
- = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-
-#define DIST_CODE_LEN 512 /* see definition of array dist_code below */
-
-local ct_data static_ltree[L_CODES+2];
-
-local ct_data static_dtree[D_CODES];
-
-uch _dist_code[DIST_CODE_LEN];
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-struct static_tree_desc_s {
- const ct_data *static_tree; /* static tree or NULL */
- const intf *extra_bits; /* extra bits for each code or NULL */
- int extra_base; /* base index for extra_bits */
- int elems; /* max number of elements in the tree */
- int max_length; /* max bit length for the codes */
-};
-
-local static_tree_desc static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc static_d_desc =
-{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
-
-local static_tree_desc static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block OF((deflate_state *s));
-local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
-local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree OF((deflate_state *s, tree_desc *desc));
-local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
-local int build_bl_tree OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
- int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
- ct_data *dtree));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup OF((deflate_state *s));
-local void bi_flush OF((deflate_state *s));
-local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
- int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
- /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-# define send_code(s, c, tree) \
- { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
- send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
- put_byte(s, (uch)((w) & 0xff)); \
- put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
- deflate_state *s;
- int value; /* value to send */
- int length; /* number of bits */
-{
- Tracevv((stderr," l %2d v %4x ", length, value));
- Assert(length > 0 && length <= 15, "invalid length");
- s->bits_sent += (ulg)length;
-
- if (s->bi_valid > (int)Buf_size - length) {
- s->bi_buf |= (value << s->bi_valid);
- put_short(s, s->bi_buf);
- s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
- s->bi_valid += length - Buf_size;
- } else {
- s->bi_buf |= value << s->bi_valid;
- s->bi_valid += length;
- }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
- if (s->bi_valid > (int)Buf_size - len) {\
- int val = value;\
- s->bi_buf |= (val << s->bi_valid);\
- put_short(s, s->bi_buf);\
- s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
- s->bi_valid += len - Buf_size;\
- } else {\
- s->bi_buf |= (value) << s->bi_valid;\
- s->bi_valid += len;\
- }\
-}
-#endif /* DEBUG */
-
-
-#define MAX(a,b) (a >= b ? a : b)
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
- static int static_init_done = 0;
- int n; /* iterates over tree elements */
- int bits; /* bit counter */
- int length; /* length value */
- int code; /* code value */
- int dist; /* distance index */
- ush bl_count[MAX_BITS+1];
- /* number of codes at each bit length for an optimal tree */
-
- if (static_init_done) return;
-
- /* For some embedded targets, global variables are not initialized: */
- static_l_desc.static_tree = static_ltree;
- static_l_desc.extra_bits = extra_lbits;
- static_d_desc.static_tree = static_dtree;
- static_d_desc.extra_bits = extra_dbits;
- static_bl_desc.extra_bits = extra_blbits;
-
- /* Initialize the mapping length (0..255) -> length code (0..28) */
- length = 0;
- for (code = 0; code < LENGTH_CODES-1; code++) {
- base_length[code] = length;
- for (n = 0; n < (1<<extra_lbits[code]); n++) {
- _length_code[length++] = (uch)code;
- }
- }
- Assert (length == 256, "tr_static_init: length != 256");
- _length_code[length-1] = (uch)code;
-
- /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
- dist = 0;
- for (code = 0 ; code < 16; code++) {
- base_dist[code] = dist;
- for (n = 0; n < (1<<extra_dbits[code]); n++) {
- _dist_code[dist++] = (uch)code;
- }
- }
- Assert (dist == 256, "tr_static_init: dist != 256");
- dist >>= 7; /* from now on, all distances are divided by 128 */
- for ( ; code < D_CODES; code++) {
- base_dist[code] = dist << 7;
- for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
- _dist_code[256 + dist++] = (uch)code;
- }
- }
- Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
- /* Construct the codes of the static literal tree */
- for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
- n = 0;
- while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
- while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
- while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
- while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
- gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
- /* The static distance tree is trivial: */
- for (n = 0; n < D_CODES; n++) {
- static_dtree[n].Len = 5;
- static_dtree[n].Code = bi_reverse((unsigned)n, 5);
- }
- static_init_done = 1;
-
-}
-
-
-void _tr_init(s)
- deflate_state *s;
-{
- tr_static_init();
-
- s->l_desc.dyn_tree = s->dyn_ltree;
- s->l_desc.stat_desc = &static_l_desc;
-
- s->d_desc.dyn_tree = s->dyn_dtree;
- s->d_desc.stat_desc = &static_d_desc;
-
- s->bl_desc.dyn_tree = s->bl_tree;
- s->bl_desc.stat_desc = &static_bl_desc;
-
- s->bi_buf = 0;
- s->bi_valid = 0;
- s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
- s->compressed_len = 0L;
- s->bits_sent = 0L;
-#endif
-
- /* Initialize the first block of the first file: */
- init_block(s);
-}
-
-local void init_block(s)
- deflate_state *s;
-{
- int n; /* iterates over tree elements */
-
- /* Initialize the trees. */
- for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
- for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
- for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
- s->dyn_ltree[END_BLOCK].Freq = 1;
- s->opt_len = s->static_len = 0L;
- s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-#define pqremove(s, tree, top) \
-{\
- top = s->heap[SMALLEST]; \
- s->heap[SMALLEST] = s->heap[s->heap_len--]; \
- pqdownheap(s, tree, SMALLEST); \
-}
-#define smaller(tree, n, m, depth) \
- (tree[n].Freq < tree[m].Freq || \
- (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-local void pqdownheap(s, tree, k)
- deflate_state *s;
- ct_data *tree; /* the tree to restore */
- int k; /* node to move down */
-{
- int v = s->heap[k];
- int j = k << 1; /* left son of k */
- while (j <= s->heap_len) {
- /* Set j to the smallest of the two sons: */
- if (j < s->heap_len &&
- smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
- j++;
- }
- /* Exit if v is smaller than both sons */
- if (smaller(tree, v, s->heap[j], s->depth)) break;
-
- /* Exchange v with the smallest son */
- s->heap[k] = s->heap[j]; k = j;
-
- /* And continue down the tree, setting j to the left son of k */
- j <<= 1;
- }
- s->heap[k] = v;
-}
-
-local void gen_bitlen(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
-{
- ct_data *tree = desc->dyn_tree;
- int max_code = desc->max_code;
- const ct_data *stree = desc->stat_desc->static_tree;
- const intf *extra = desc->stat_desc->extra_bits;
- int base = desc->stat_desc->extra_base;
- int max_length = desc->stat_desc->max_length;
- int h; /* heap index */
- int n, m; /* iterate over the tree elements */
- int bits; /* bit length */
- int xbits; /* extra bits */
- ush f; /* frequency */
- int overflow = 0; /* number of elements with bit length too large */
-
- for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
- tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
- for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
- n = s->heap[h];
- bits = tree[tree[n].Dad].Len + 1;
- if (bits > max_length) bits = max_length, overflow++;
- tree[n].Len = (ush)bits;
- /* We overwrite tree[n].Dad which is no longer needed */
-
- if (n > max_code) continue; /* not a leaf node */
-
- s->bl_count[bits]++;
- xbits = 0;
- if (n >= base) xbits = extra[n-base];
- f = tree[n].Freq;
- s->opt_len += (ulg)f * (bits + xbits);
- if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
- }
- if (overflow == 0) return;
-
- Trace((stderr,"\nbit length overflow\n"));
- do {
- bits = max_length-1;
- while (s->bl_count[bits] == 0) bits--;
- s->bl_count[bits]--; /* move one leaf down the tree */
- s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
- s->bl_count[max_length]--;
- overflow -= 2;
- } while (overflow > 0);
-
- for (bits = max_length; bits != 0; bits--) {
- n = s->bl_count[bits];
- while (n != 0) {
- m = s->heap[--h];
- if (m > max_code) continue;
- if (tree[m].Len != (unsigned) bits) {
- Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
- s->opt_len += ((long)bits - (long)tree[m].Len)
- *(long)tree[m].Freq;
- tree[m].Len = (ush)bits;
- }
- n--;
- }
- }
-}
-
-local void gen_codes (tree, max_code, bl_count)
- ct_data *tree; /* the tree to decorate */
- int max_code; /* largest code with non zero frequency */
- ushf *bl_count; /* number of codes at each bit length */
-{
- ush next_code[MAX_BITS+1]; /* next code value for each bit length */
- ush code = 0; /* running code value */
- int bits; /* bit index */
- int n; /* code index */
-
- for (bits = 1; bits <= MAX_BITS; bits++) {
- next_code[bits] = code = (code + bl_count[bits-1]) << 1;
- }
- Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
- "inconsistent bit counts");
- Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
- for (n = 0; n <= max_code; n++) {
- int len = tree[n].Len;
- if (len == 0) continue;
- /* Now reverse the bits */
- tree[n].Code = bi_reverse(next_code[len]++, len);
-
- Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
- n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
- }
-}
-
-local void build_tree(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
-{
- ct_data *tree = desc->dyn_tree;
- const ct_data *stree = desc->stat_desc->static_tree;
- int elems = desc->stat_desc->elems;
- int n, m; /* iterate over heap elements */
- int max_code = -1; /* largest code with non zero frequency */
- int node; /* new node being created */
-
- s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
- for (n = 0; n < elems; n++) {
- if (tree[n].Freq != 0) {
- s->heap[++(s->heap_len)] = max_code = n;
- s->depth[n] = 0;
- } else {
- tree[n].Len = 0;
- }
- }
- while (s->heap_len < 2) {
- node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
- tree[node].Freq = 1;
- s->depth[node] = 0;
- s->opt_len--; if (stree) s->static_len -= stree[node].Len;
- /* node is 0 or 1 so it does not have extra bits */
- }
- desc->max_code = max_code;
-
- for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
- node = elems; /* next internal node of the tree */
- do {
- pqremove(s, tree, n); /* n = node of least frequency */
- m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
- s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
- s->heap[--(s->heap_max)] = m;
-
- /* Create a new node father of n and m */
- tree[node].Freq = tree[n].Freq + tree[m].Freq;
- s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1);
- tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
- if (tree == s->bl_tree) {
- fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
- node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
- }
-#endif
- /* and insert the new node in the heap */
- s->heap[SMALLEST] = node++;
- pqdownheap(s, tree, SMALLEST);
-
- } while (s->heap_len >= 2);
-
- s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
- gen_bitlen(s, (tree_desc *)desc);
-
- /* The field len is now set, we can generate the bit codes */
- gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-local void scan_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
-{
- int n; /* iterates over all tree elements */
- int prevlen = -1; /* last emitted length */
- int curlen; /* length of current code */
- int nextlen = tree[0].Len; /* length of next code */
- int count = 0; /* repeat count of the current code */
- int max_count = 7; /* max repeat count */
- int min_count = 4; /* min repeat count */
-
- if (nextlen == 0) max_count = 138, min_count = 3;
- tree[max_code+1].Len = (ush)0xffff; /* guard */
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen; nextlen = tree[n+1].Len;
- if (++count < max_count && curlen == nextlen) {
- continue;
- } else if (count < min_count) {
- s->bl_tree[curlen].Freq += count;
- } else if (curlen != 0) {
- if (curlen != prevlen) s->bl_tree[curlen].Freq++;
- s->bl_tree[REP_3_6].Freq++;
- } else if (count <= 10) {
- s->bl_tree[REPZ_3_10].Freq++;
- } else {
- s->bl_tree[REPZ_11_138].Freq++;
- }
- count = 0; prevlen = curlen;
- if (nextlen == 0) {
- max_count = 138, min_count = 3;
- } else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
- } else {
- max_count = 7, min_count = 4;
- }
- }
-}
-
-local void send_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
-{
- int n; /* iterates over all tree elements */
- int prevlen = -1; /* last emitted length */
- int curlen; /* length of current code */
- int nextlen = tree[0].Len; /* length of next code */
- int count = 0; /* repeat count of the current code */
- int max_count = 7; /* max repeat count */
- int min_count = 4; /* min repeat count */
-
- /* tree[max_code+1].Len = -1; */ /* guard already set */
- if (nextlen == 0) max_count = 138, min_count = 3;
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen; nextlen = tree[n+1].Len;
- if (++count < max_count && curlen == nextlen) {
- continue;
- } else if (count < min_count) {
- do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
- } else if (curlen != 0) {
- if (curlen != prevlen) {
- send_code(s, curlen, s->bl_tree); count--;
- }
- Assert(count >= 3 && count <= 6, " 3_6?");
- send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
- } else if (count <= 10) {
- send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
- } else {
- send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
- }
- count = 0; prevlen = curlen;
- if (nextlen == 0) {
- max_count = 138, min_count = 3;
- } else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
- } else {
- max_count = 7, min_count = 4;
- }
- }
-}
-
-local int build_bl_tree(s)
- deflate_state *s;
-{
- int max_blindex; /* index of last bit length code of non zero freq */
-
- /* Determine the bit length frequencies for literal and distance trees */
- scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
- scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
- /* Build the bit length tree: */
- build_tree(s, (tree_desc *)(&(s->bl_desc)));
- for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
- if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
- }
- /* Update opt_len to include the bit length tree and counts */
- s->opt_len += 3*(max_blindex+1) + 5+5+4;
- Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
- s->opt_len, s->static_len));
-
- return max_blindex;
-}
-
-local void send_all_trees(s, lcodes, dcodes, blcodes)
- deflate_state *s;
- int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
- int rank; /* index in bl_order */
-
- Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
- Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
- "too many codes");
- Tracev((stderr, "\nbl counts: "));
- send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
- send_bits(s, dcodes-1, 5);
- send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */
- for (rank = 0; rank < blcodes; rank++) {
- Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
- send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
- }
- Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
- send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
- Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
- send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
- Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-void _tr_stored_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
-{
- send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
-#ifdef DEBUG
- s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
- s->compressed_len += (stored_len + 4) << 3;
-#endif
- copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-void _tr_align(s)
- deflate_state *s;
-{
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
- bi_flush(s);
- if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
- s->compressed_len += 10L;
-#endif
- bi_flush(s);
- }
- s->last_eob_len = 7;
-}
-
-void _tr_flush_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block, or NULL if too old */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
-{
- ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
- int max_blindex = 0; /* index of last bit length code of non zero freq */
-
- /* Build the Huffman trees unless a stored block is forced */
- if (s->level > 0) {
-
- /* Construct the literal and distance trees */
- build_tree(s, (tree_desc *)(&(s->l_desc)));
- Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
- s->static_len));
-
- build_tree(s, (tree_desc *)(&(s->d_desc)));
- Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
- s->static_len));
- max_blindex = build_bl_tree(s);
-
- /* Determine the best encoding. Compute first the block length in bytes*/
- opt_lenb = (s->opt_len+3+7)>>3;
- static_lenb = (s->static_len+3+7)>>3;
-
- Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
- opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
- s->last_lit));
-
- if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
- } else {
- Assert(buf != (char*)0, "lost buf");
- opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
- }
-
-#ifdef FORCE_STORED
- if (buf != (char*)0) { /* force stored block */
-#else
- if (stored_len+4 <= opt_lenb && buf != (char*)0) {
- /* 4: two words for the lengths */
-#endif
- _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
- } else if (static_lenb >= 0) { /* force static trees */
-#else
- } else if (static_lenb == opt_lenb) {
-#endif
- send_bits(s, (STATIC_TREES<<1)+eof, 3);
- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
- s->compressed_len += 3 + s->static_len;
-#endif
- } else {
- send_bits(s, (DYN_TREES<<1)+eof, 3);
- send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
- max_blindex+1);
- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
- s->compressed_len += 3 + s->opt_len;
-#endif
- }
- Assert (s->compressed_len == s->bits_sent, "bad compressed size");
-
- init_block(s);
-
- if (eof) {
- bi_windup(s);
-#ifdef DEBUG
- s->compressed_len += 7; /* align on byte boundary */
-#endif
- }
- Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
- s->compressed_len-7*eof));
-}
-
-int _tr_tally (s, dist, lc)
- deflate_state *s;
- unsigned dist; /* distance of matched string */
- unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
- s->d_buf[s->last_lit] = (ush)dist;
- s->l_buf[s->last_lit++] = (uch)lc;
- if (dist == 0) {
- /* lc is the unmatched char */
- s->dyn_ltree[lc].Freq++;
- } else {
- s->matches++;
- /* Here, lc is the match length - MIN_MATCH */
- dist--; /* dist = match distance - 1 */
- Assert((ush)dist < (ush)MAX_DIST(s) &&
- (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
- (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
-
- s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
- s->dyn_dtree[d_code(dist)].Freq++;
- }
-
-#ifdef TRUNCATE_BLOCK
- /* Try to guess if it is profitable to stop the current block here */
- if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
- /* Compute an upper bound for the compressed length */
- ulg out_length = (ulg)s->last_lit*8L;
- ulg in_length = (ulg)((long)s->strstart - s->block_start);
- int dcode;
- for (dcode = 0; dcode < D_CODES; dcode++) {
- out_length += (ulg)s->dyn_dtree[dcode].Freq *
- (5L+extra_dbits[dcode]);
- }
- out_length >>= 3;
- Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
- s->last_lit, in_length, out_length,
- 100L - out_length*100L/in_length));
- if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
- }
-#endif
- return (s->last_lit == s->lit_bufsize-1);
-}
-
-local void compress_block(s, ltree, dtree)
- deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
-{
- unsigned dist; /* distance of matched string */
- int lc; /* match length or unmatched char (if dist == 0) */
- unsigned lx = 0; /* running index in l_buf */
- unsigned code; /* the code to send */
- int extra; /* number of extra bits to send */
-
- if (s->last_lit != 0) do {
- dist = s->d_buf[lx];
- lc = s->l_buf[lx++];
- if (dist == 0) {
- send_code(s, lc, ltree); /* send a literal byte */
- Tracecv(isgraph(lc), (stderr," '%c' ", lc));
- } else {
- /* Here, lc is the match length - MIN_MATCH */
- code = _length_code[lc];
- send_code(s, code+LITERALS+1, ltree); /* send the length code */
- extra = extra_lbits[code];
- if (extra != 0) {
- lc -= base_length[code];
- send_bits(s, lc, extra); /* send the extra length bits */
- }
- dist--; /* dist is now the match distance - 1 */
- code = d_code(dist);
- Assert (code < D_CODES, "bad d_code");
-
- send_code(s, code, dtree); /* send the distance code */
- extra = extra_dbits[code];
- if (extra != 0) {
- dist -= base_dist[code];
- send_bits(s, dist, extra); /* send the extra distance bits */
- }
- } /* literal or match pair ? */
-
- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
- Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
-
- } while (lx < s->last_lit);
-
- send_code(s, END_BLOCK, ltree);
- s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-local unsigned bi_reverse(code, len)
- unsigned code; /* the value to invert */
- int len; /* its bit length */
-{
- register unsigned res = 0;
- do {
- res |= code & 1;
- code >>= 1, res <<= 1;
- } while (--len > 0);
- return res >> 1;
-}
-
-local void bi_flush(s)
- deflate_state *s;
-{
- if (s->bi_valid == 16) {
- put_short(s, s->bi_buf);
- s->bi_buf = 0;
- s->bi_valid = 0;
- } else if (s->bi_valid >= 8) {
- put_byte(s, (Byte)s->bi_buf);
- s->bi_buf >>= 8;
- s->bi_valid -= 8;
- }
-}
-
-local void bi_windup(s)
- deflate_state *s;
-{
- if (s->bi_valid > 8) {
- put_short(s, s->bi_buf);
- } else if (s->bi_valid > 0) {
- put_byte(s, (Byte)s->bi_buf);
- }
- s->bi_buf = 0;
- s->bi_valid = 0;
-#ifdef DEBUG
- s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-local void copy_block(s, buf, len, header)
- deflate_state *s;
- charf *buf; /* the input data */
- unsigned len; /* its length */
- int header; /* true if block header must be written */
-{
- bi_windup(s); /* align on byte boundary */
- s->last_eob_len = 8; /* enough lookahead for inflate */
-
- if (header) {
- put_short(s, (ush)len);
-#ifdef DEBUG
- s->bits_sent += 2*16;
-#endif
- }
-#ifdef DEBUG
- s->bits_sent += (ulg)len<<3;
-#endif
- while (len--) {
- put_byte(s, *buf++);
- }
-}
+/*
+ * This file is a part of the zlib compression module for NSIS.
+ *
+ * Copyright and license information can be found below.
+ * Modifications Copyright (C) 1999-2007 Nullsoft and Contributors
+ *
+ * The original zlib source code is available at
+ * http://www.zlib.net/
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty.
+ */
+
+/* trees.c -- output deflated data using Huffman coding
+ * Copyright (C) 1995-1998 Jean-loup Gailly
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+
+#include "DEFLATE.H"
+
+#ifdef DEBUG
+# include <ctype.h>
+#endif
+
+/* ===========================================================================
+ * Constants
+ */
+
+#define MAX_BL_BITS 7
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+#define END_BLOCK 256
+/* end of block literal code */
+
+#define REP_3_6 16
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+#define REPZ_3_10 17
+/* repeat a zero length 3-10 times (3 bits of repeat count) */
+
+#define REPZ_11_138 18
+/* repeat a zero length 11-138 times (7 bits of repeat count) */
+
+local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
+ = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
+
+local const int extra_dbits[D_CODES] /* extra bits for each distance code */
+ = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
+
+local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
+ = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
+
+local const uch bl_order[BL_CODES]
+ = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+#define Buf_size (8 * 2*sizeof(char))
+
+#define DIST_CODE_LEN 512 /* see definition of array dist_code below */
+
+local ct_data static_ltree[L_CODES+2];
+
+local ct_data static_dtree[D_CODES];
+
+uch _dist_code[DIST_CODE_LEN];
+
+uch _length_code[MAX_MATCH-MIN_MATCH+1];
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+local int base_length[LENGTH_CODES];
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+local int base_dist[D_CODES];
+/* First normalized distance for each code (0 = distance of 1) */
+
+struct static_tree_desc_s {
+ const ct_data *static_tree; /* static tree or NULL */
+ const intf *extra_bits; /* extra bits for each code or NULL */
+ int extra_base; /* base index for extra_bits */
+ int elems; /* max number of elements in the tree */
+ int max_length; /* max bit length for the codes */
+};
+
+local static_tree_desc static_l_desc =
+{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
+
+local static_tree_desc static_d_desc =
+{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
+
+local static_tree_desc static_bl_desc =
+{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
+
+/* ===========================================================================
+ * Local (static) routines in this file.
+ */
+
+local void tr_static_init OF((void));
+local void init_block OF((deflate_state *s));
+local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
+local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
+local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
+local void build_tree OF((deflate_state *s, tree_desc *desc));
+local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
+local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
+local int build_bl_tree OF((deflate_state *s));
+local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
+ int blcodes));
+local void compress_block OF((deflate_state *s, ct_data *ltree,
+ ct_data *dtree));
+local unsigned bi_reverse OF((unsigned value, int length));
+local void bi_windup OF((deflate_state *s));
+local void bi_flush OF((deflate_state *s));
+local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
+ int header));
+
+#ifdef GEN_TREES_H
+local void gen_trees_header OF((void));
+#endif
+
+#ifndef DEBUG
+# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
+ /* Send a code of the given tree. c and tree must not have side effects */
+
+#else /* DEBUG */
+# define send_code(s, c, tree) \
+ { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
+ send_bits(s, tree[c].Code, tree[c].Len); }
+#endif
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+#define put_short(s, w) { \
+ put_byte(s, (uch)((w) & 0xff)); \
+ put_byte(s, (uch)((ush)(w) >> 8)); \
+}
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+#ifdef DEBUG
+local void send_bits OF((deflate_state *s, int value, int length));
+
+local void send_bits(s, value, length)
+ deflate_state *s;
+ int value; /* value to send */
+ int length; /* number of bits */
+{
+ Tracevv((stderr," l %2d v %4x ", length, value));
+ Assert(length > 0 && length <= 15, "invalid length");
+ s->bits_sent += (ulg)length;
+
+ if (s->bi_valid > (int)Buf_size - length) {
+ s->bi_buf |= (value << s->bi_valid);
+ put_short(s, s->bi_buf);
+ s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
+ s->bi_valid += length - Buf_size;
+ } else {
+ s->bi_buf |= value << s->bi_valid;
+ s->bi_valid += length;
+ }
+}
+#else /* !DEBUG */
+
+#define send_bits(s, value, length) \
+{ int len = length;\
+ if (s->bi_valid > (int)Buf_size - len) {\
+ int val = value;\
+ s->bi_buf |= (val << s->bi_valid);\
+ put_short(s, s->bi_buf);\
+ s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
+ s->bi_valid += len - Buf_size;\
+ } else {\
+ s->bi_buf |= (value) << s->bi_valid;\
+ s->bi_valid += len;\
+ }\
+}
+#endif /* DEBUG */
+
+
+#define MAX(a,b) (a >= b ? a : b)
+/* the arguments must not have side effects */
+
+/* ===========================================================================
+ * Initialize the various 'constant' tables.
+ */
+local void tr_static_init()
+{
+ static int static_init_done = 0;
+ int n; /* iterates over tree elements */
+ int bits; /* bit counter */
+ int length; /* length value */
+ int code; /* code value */
+ int dist; /* distance index */
+ ush bl_count[MAX_BITS+1];
+ /* number of codes at each bit length for an optimal tree */
+
+ if (static_init_done) return;
+
+ /* For some embedded targets, global variables are not initialized: */
+ static_l_desc.static_tree = static_ltree;
+ static_l_desc.extra_bits = extra_lbits;
+ static_d_desc.static_tree = static_dtree;
+ static_d_desc.extra_bits = extra_dbits;
+ static_bl_desc.extra_bits = extra_blbits;
+
+ /* Initialize the mapping length (0..255) -> length code (0..28) */
+ length = 0;
+ for (code = 0; code < LENGTH_CODES-1; code++) {
+ base_length[code] = length;
+ for (n = 0; n < (1<<extra_lbits[code]); n++) {
+ _length_code[length++] = (uch)code;
+ }
+ }
+ Assert (length == 256, "tr_static_init: length != 256");
+ _length_code[length-1] = (uch)code;
+
+ /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+ dist = 0;
+ for (code = 0 ; code < 16; code++) {
+ base_dist[code] = dist;
+ for (n = 0; n < (1<<extra_dbits[code]); n++) {
+ _dist_code[dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: dist != 256");
+ dist >>= 7; /* from now on, all distances are divided by 128 */
+ for ( ; code < D_CODES; code++) {
+ base_dist[code] = dist << 7;
+ for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
+ _dist_code[256 + dist++] = (uch)code;
+ }
+ }
+ Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+ /* Construct the codes of the static literal tree */
+ for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
+ n = 0;
+ while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
+ while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
+ while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
+ while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
+ gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
+
+ /* The static distance tree is trivial: */
+ for (n = 0; n < D_CODES; n++) {
+ static_dtree[n].Len = 5;
+ static_dtree[n].Code = bi_reverse((unsigned)n, 5);
+ }
+ static_init_done = 1;
+
+}
+
+
+void _tr_init(s)
+ deflate_state *s;
+{
+ tr_static_init();
+
+ s->l_desc.dyn_tree = s->dyn_ltree;
+ s->l_desc.stat_desc = &static_l_desc;
+
+ s->d_desc.dyn_tree = s->dyn_dtree;
+ s->d_desc.stat_desc = &static_d_desc;
+
+ s->bl_desc.dyn_tree = s->bl_tree;
+ s->bl_desc.stat_desc = &static_bl_desc;
+
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+ s->last_eob_len = 8; /* enough lookahead for inflate */
+#ifdef DEBUG
+ s->compressed_len = 0L;
+ s->bits_sent = 0L;
+#endif
+
+ /* Initialize the first block of the first file: */
+ init_block(s);
+}
+
+local void init_block(s)
+ deflate_state *s;
+{
+ int n; /* iterates over tree elements */
+
+ /* Initialize the trees. */
+ for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
+ for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
+ for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
+
+ s->dyn_ltree[END_BLOCK].Freq = 1;
+ s->opt_len = s->static_len = 0L;
+ s->last_lit = s->matches = 0;
+}
+
+#define SMALLEST 1
+#define pqremove(s, tree, top) \
+{\
+ top = s->heap[SMALLEST]; \
+ s->heap[SMALLEST] = s->heap[s->heap_len--]; \
+ pqdownheap(s, tree, SMALLEST); \
+}
+#define smaller(tree, n, m, depth) \
+ (tree[n].Freq < tree[m].Freq || \
+ (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
+
+local void pqdownheap(s, tree, k)
+ deflate_state *s;
+ ct_data *tree; /* the tree to restore */
+ int k; /* node to move down */
+{
+ int v = s->heap[k];
+ int j = k << 1; /* left son of k */
+ while (j <= s->heap_len) {
+ /* Set j to the smallest of the two sons: */
+ if (j < s->heap_len &&
+ smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
+ j++;
+ }
+ /* Exit if v is smaller than both sons */
+ if (smaller(tree, v, s->heap[j], s->depth)) break;
+
+ /* Exchange v with the smallest son */
+ s->heap[k] = s->heap[j]; k = j;
+
+ /* And continue down the tree, setting j to the left son of k */
+ j <<= 1;
+ }
+ s->heap[k] = v;
+}
+
+local void gen_bitlen(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->dyn_tree;
+ int max_code = desc->max_code;
+ const ct_data *stree = desc->stat_desc->static_tree;
+ const intf *extra = desc->stat_desc->extra_bits;
+ int base = desc->stat_desc->extra_base;
+ int max_length = desc->stat_desc->max_length;
+ int h; /* heap index */
+ int n, m; /* iterate over the tree elements */
+ int bits; /* bit length */
+ int xbits; /* extra bits */
+ ush f; /* frequency */
+ int overflow = 0; /* number of elements with bit length too large */
+
+ for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
+
+ tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
+
+ for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
+ n = s->heap[h];
+ bits = tree[tree[n].Dad].Len + 1;
+ if (bits > max_length) bits = max_length, overflow++;
+ tree[n].Len = (ush)bits;
+ /* We overwrite tree[n].Dad which is no longer needed */
+
+ if (n > max_code) continue; /* not a leaf node */
+
+ s->bl_count[bits]++;
+ xbits = 0;
+ if (n >= base) xbits = extra[n-base];
+ f = tree[n].Freq;
+ s->opt_len += (ulg)f * (bits + xbits);
+ if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
+ }
+ if (overflow == 0) return;
+
+ Trace((stderr,"\nbit length overflow\n"));
+ do {
+ bits = max_length-1;
+ while (s->bl_count[bits] == 0) bits--;
+ s->bl_count[bits]--; /* move one leaf down the tree */
+ s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
+ s->bl_count[max_length]--;
+ overflow -= 2;
+ } while (overflow > 0);
+
+ for (bits = max_length; bits != 0; bits--) {
+ n = s->bl_count[bits];
+ while (n != 0) {
+ m = s->heap[--h];
+ if (m > max_code) continue;
+ if (tree[m].Len != (unsigned) bits) {
+ Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+ s->opt_len += ((long)bits - (long)tree[m].Len)
+ *(long)tree[m].Freq;
+ tree[m].Len = (ush)bits;
+ }
+ n--;
+ }
+ }
+}
+
+local void gen_codes (tree, max_code, bl_count)
+ ct_data *tree; /* the tree to decorate */
+ int max_code; /* largest code with non zero frequency */
+ ushf *bl_count; /* number of codes at each bit length */
+{
+ ush next_code[MAX_BITS+1]; /* next code value for each bit length */
+ ush code = 0; /* running code value */
+ int bits; /* bit index */
+ int n; /* code index */
+
+ for (bits = 1; bits <= MAX_BITS; bits++) {
+ next_code[bits] = code = (code + bl_count[bits-1]) << 1;
+ }
+ Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+ "inconsistent bit counts");
+ Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+ for (n = 0; n <= max_code; n++) {
+ int len = tree[n].Len;
+ if (len == 0) continue;
+ /* Now reverse the bits */
+ tree[n].Code = bi_reverse(next_code[len]++, len);
+
+ Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+ n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+ }
+}
+
+local void build_tree(s, desc)
+ deflate_state *s;
+ tree_desc *desc; /* the tree descriptor */
+{
+ ct_data *tree = desc->dyn_tree;
+ const ct_data *stree = desc->stat_desc->static_tree;
+ int elems = desc->stat_desc->elems;
+ int n, m; /* iterate over heap elements */
+ int max_code = -1; /* largest code with non zero frequency */
+ int node; /* new node being created */
+
+ s->heap_len = 0, s->heap_max = HEAP_SIZE;
+
+ for (n = 0; n < elems; n++) {
+ if (tree[n].Freq != 0) {
+ s->heap[++(s->heap_len)] = max_code = n;
+ s->depth[n] = 0;
+ } else {
+ tree[n].Len = 0;
+ }
+ }
+ while (s->heap_len < 2) {
+ node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
+ tree[node].Freq = 1;
+ s->depth[node] = 0;
+ s->opt_len--; if (stree) s->static_len -= stree[node].Len;
+ /* node is 0 or 1 so it does not have extra bits */
+ }
+ desc->max_code = max_code;
+
+ for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
+
+ node = elems; /* next internal node of the tree */
+ do {
+ pqremove(s, tree, n); /* n = node of least frequency */
+ m = s->heap[SMALLEST]; /* m = node of next least frequency */
+
+ s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
+ s->heap[--(s->heap_max)] = m;
+
+ /* Create a new node father of n and m */
+ tree[node].Freq = tree[n].Freq + tree[m].Freq;
+ s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1);
+ tree[n].Dad = tree[m].Dad = (ush)node;
+#ifdef DUMP_BL_TREE
+ if (tree == s->bl_tree) {
+ fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
+ node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
+ }
+#endif
+ /* and insert the new node in the heap */
+ s->heap[SMALLEST] = node++;
+ pqdownheap(s, tree, SMALLEST);
+
+ } while (s->heap_len >= 2);
+
+ s->heap[--(s->heap_max)] = s->heap[SMALLEST];
+
+ gen_bitlen(s, (tree_desc *)desc);
+
+ /* The field len is now set, we can generate the bit codes */
+ gen_codes ((ct_data *)tree, max_code, s->bl_count);
+}
+
+local void scan_tree (s, tree, max_code)
+ deflate_state *s;
+ ct_data *tree; /* the tree to be scanned */
+ int max_code; /* and its largest code of non zero frequency */
+{
+ int n; /* iterates over all tree elements */
+ int prevlen = -1; /* last emitted length */
+ int curlen; /* length of current code */
+ int nextlen = tree[0].Len; /* length of next code */
+ int count = 0; /* repeat count of the current code */
+ int max_count = 7; /* max repeat count */
+ int min_count = 4; /* min repeat count */
+
+ if (nextlen == 0) max_count = 138, min_count = 3;
+ tree[max_code+1].Len = (ush)0xffff; /* guard */
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen; nextlen = tree[n+1].Len;
+ if (++count < max_count && curlen == nextlen) {
+ continue;
+ } else if (count < min_count) {
+ s->bl_tree[curlen].Freq += count;
+ } else if (curlen != 0) {
+ if (curlen != prevlen) s->bl_tree[curlen].Freq++;
+ s->bl_tree[REP_3_6].Freq++;
+ } else if (count <= 10) {
+ s->bl_tree[REPZ_3_10].Freq++;
+ } else {
+ s->bl_tree[REPZ_11_138].Freq++;
+ }
+ count = 0; prevlen = curlen;
+ if (nextlen == 0) {
+ max_count = 138, min_count = 3;
+ } else if (curlen == nextlen) {
+ max_count = 6, min_count = 3;
+ } else {
+ max_count = 7, min_count = 4;
+ }
+ }
+}
+
+local void send_tree (s, tree, max_code)
+ deflate_state *s;
+ ct_data *tree; /* the tree to be scanned */
+ int max_code; /* and its largest code of non zero frequency */
+{
+ int n; /* iterates over all tree elements */
+ int prevlen = -1; /* last emitted length */
+ int curlen; /* length of current code */
+ int nextlen = tree[0].Len; /* length of next code */
+ int count = 0; /* repeat count of the current code */
+ int max_count = 7; /* max repeat count */
+ int min_count = 4; /* min repeat count */
+
+ /* tree[max_code+1].Len = -1; */ /* guard already set */
+ if (nextlen == 0) max_count = 138, min_count = 3;
+
+ for (n = 0; n <= max_code; n++) {
+ curlen = nextlen; nextlen = tree[n+1].Len;
+ if (++count < max_count && curlen == nextlen) {
+ continue;
+ } else if (count < min_count) {
+ do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
+
+ } else if (curlen != 0) {
+ if (curlen != prevlen) {
+ send_code(s, curlen, s->bl_tree); count--;
+ }
+ Assert(count >= 3 && count <= 6, " 3_6?");
+ send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
+
+ } else if (count <= 10) {
+ send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
+
+ } else {
+ send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
+ }
+ count = 0; prevlen = curlen;
+ if (nextlen == 0) {
+ max_count = 138, min_count = 3;
+ } else if (curlen == nextlen) {
+ max_count = 6, min_count = 3;
+ } else {
+ max_count = 7, min_count = 4;
+ }
+ }
+}
+
+local int build_bl_tree(s)
+ deflate_state *s;
+{
+ int max_blindex; /* index of last bit length code of non zero freq */
+
+ /* Determine the bit length frequencies for literal and distance trees */
+ scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
+ scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
+
+ /* Build the bit length tree: */
+ build_tree(s, (tree_desc *)(&(s->bl_desc)));
+ for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
+ if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
+ }
+ /* Update opt_len to include the bit length tree and counts */
+ s->opt_len += 3*(max_blindex+1) + 5+5+4;
+ Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+ s->opt_len, s->static_len));
+
+ return max_blindex;
+}
+
+local void send_all_trees(s, lcodes, dcodes, blcodes)
+ deflate_state *s;
+ int lcodes, dcodes, blcodes; /* number of codes for each tree */
+{
+ int rank; /* index in bl_order */
+
+ Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+ Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+ "too many codes");
+ Tracev((stderr, "\nbl counts: "));
+ send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
+ send_bits(s, dcodes-1, 5);
+ send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */
+ for (rank = 0; rank < blcodes; rank++) {
+ Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+ send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
+ }
+ Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+ send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
+ Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+ send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
+ Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+}
+
+void _tr_stored_block(s, buf, stored_len, eof)
+ deflate_state *s;
+ charf *buf; /* input block */
+ ulg stored_len; /* length of input block */
+ int eof; /* true if this is the last block for a file */
+{
+ send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
+#ifdef DEBUG
+ s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
+ s->compressed_len += (stored_len + 4) << 3;
+#endif
+ copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
+}
+
+void _tr_align(s)
+ deflate_state *s;
+{
+ send_bits(s, STATIC_TREES<<1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+#ifdef DEBUG
+ s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
+#endif
+ bi_flush(s);
+ if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
+ send_bits(s, STATIC_TREES<<1, 3);
+ send_code(s, END_BLOCK, static_ltree);
+#ifdef DEBUG
+ s->compressed_len += 10L;
+#endif
+ bi_flush(s);
+ }
+ s->last_eob_len = 7;
+}
+
+void _tr_flush_block(s, buf, stored_len, eof)
+ deflate_state *s;
+ charf *buf; /* input block, or NULL if too old */
+ ulg stored_len; /* length of input block */
+ int eof; /* true if this is the last block for a file */
+{
+ ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
+ int max_blindex = 0; /* index of last bit length code of non zero freq */
+
+ /* Build the Huffman trees unless a stored block is forced */
+ if (s->level > 0) {
+
+ /* Construct the literal and distance trees */
+ build_tree(s, (tree_desc *)(&(s->l_desc)));
+ Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+ s->static_len));
+
+ build_tree(s, (tree_desc *)(&(s->d_desc)));
+ Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+ s->static_len));
+ max_blindex = build_bl_tree(s);
+
+ /* Determine the best encoding. Compute first the block length in bytes*/
+ opt_lenb = (s->opt_len+3+7)>>3;
+ static_lenb = (s->static_len+3+7)>>3;
+
+ Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+ opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+ s->last_lit));
+
+ if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
+
+ } else {
+ Assert(buf != (char*)0, "lost buf");
+ opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+ }
+
+#ifdef FORCE_STORED
+ if (buf != (char*)0) { /* force stored block */
+#else
+ if (stored_len+4 <= opt_lenb && buf != (char*)0) {
+ /* 4: two words for the lengths */
+#endif
+ _tr_stored_block(s, buf, stored_len, eof);
+
+#ifdef FORCE_STATIC
+ } else if (static_lenb >= 0) { /* force static trees */
+#else
+ } else if (static_lenb == opt_lenb) {
+#endif
+ send_bits(s, (STATIC_TREES<<1)+eof, 3);
+ compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
+#ifdef DEBUG
+ s->compressed_len += 3 + s->static_len;
+#endif
+ } else {
+ send_bits(s, (DYN_TREES<<1)+eof, 3);
+ send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
+ max_blindex+1);
+ compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
+#ifdef DEBUG
+ s->compressed_len += 3 + s->opt_len;
+#endif
+ }
+ Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+
+ init_block(s);
+
+ if (eof) {
+ bi_windup(s);
+#ifdef DEBUG
+ s->compressed_len += 7; /* align on byte boundary */
+#endif
+ }
+ Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+ s->compressed_len-7*eof));
+}
+
+int _tr_tally (s, dist, lc)
+ deflate_state *s;
+ unsigned dist; /* distance of matched string */
+ unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
+{
+ s->d_buf[s->last_lit] = (ush)dist;
+ s->l_buf[s->last_lit++] = (uch)lc;
+ if (dist == 0) {
+ /* lc is the unmatched char */
+ s->dyn_ltree[lc].Freq++;
+ } else {
+ s->matches++;
+ /* Here, lc is the match length - MIN_MATCH */
+ dist--; /* dist = match distance - 1 */
+ Assert((ush)dist < (ush)MAX_DIST(s) &&
+ (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+ (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
+
+ s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
+ s->dyn_dtree[d_code(dist)].Freq++;
+ }
+
+#ifdef TRUNCATE_BLOCK
+ /* Try to guess if it is profitable to stop the current block here */
+ if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
+ /* Compute an upper bound for the compressed length */
+ ulg out_length = (ulg)s->last_lit*8L;
+ ulg in_length = (ulg)((long)s->strstart - s->block_start);
+ int dcode;
+ for (dcode = 0; dcode < D_CODES; dcode++) {
+ out_length += (ulg)s->dyn_dtree[dcode].Freq *
+ (5L+extra_dbits[dcode]);
+ }
+ out_length >>= 3;
+ Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+ s->last_lit, in_length, out_length,
+ 100L - out_length*100L/in_length));
+ if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
+ }
+#endif
+ return (s->last_lit == s->lit_bufsize-1);
+}
+
+local void compress_block(s, ltree, dtree)
+ deflate_state *s;
+ ct_data *ltree; /* literal tree */
+ ct_data *dtree; /* distance tree */
+{
+ unsigned dist; /* distance of matched string */
+ int lc; /* match length or unmatched char (if dist == 0) */
+ unsigned lx = 0; /* running index in l_buf */
+ unsigned code; /* the code to send */
+ int extra; /* number of extra bits to send */
+
+ if (s->last_lit != 0) do {
+ dist = s->d_buf[lx];
+ lc = s->l_buf[lx++];
+ if (dist == 0) {
+ send_code(s, lc, ltree); /* send a literal byte */
+ Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+ } else {
+ /* Here, lc is the match length - MIN_MATCH */
+ code = _length_code[lc];
+ send_code(s, code+LITERALS+1, ltree); /* send the length code */
+ extra = extra_lbits[code];
+ if (extra != 0) {
+ lc -= base_length[code];
+ send_bits(s, lc, extra); /* send the extra length bits */
+ }
+ dist--; /* dist is now the match distance - 1 */
+ code = d_code(dist);
+ Assert (code < D_CODES, "bad d_code");
+
+ send_code(s, code, dtree); /* send the distance code */
+ extra = extra_dbits[code];
+ if (extra != 0) {
+ dist -= base_dist[code];
+ send_bits(s, dist, extra); /* send the extra distance bits */
+ }
+ } /* literal or match pair ? */
+
+ /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+ Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
+
+ } while (lx < s->last_lit);
+
+ send_code(s, END_BLOCK, ltree);
+ s->last_eob_len = ltree[END_BLOCK].Len;
+}
+
+local unsigned bi_reverse(code, len)
+ unsigned code; /* the value to invert */
+ int len; /* its bit length */
+{
+ register unsigned res = 0;
+ do {
+ res |= code & 1;
+ code >>= 1, res <<= 1;
+ } while (--len > 0);
+ return res >> 1;
+}
+
+local void bi_flush(s)
+ deflate_state *s;
+{
+ if (s->bi_valid == 16) {
+ put_short(s, s->bi_buf);
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+ } else if (s->bi_valid >= 8) {
+ put_byte(s, (Byte)s->bi_buf);
+ s->bi_buf >>= 8;
+ s->bi_valid -= 8;
+ }
+}
+
+local void bi_windup(s)
+ deflate_state *s;
+{
+ if (s->bi_valid > 8) {
+ put_short(s, s->bi_buf);
+ } else if (s->bi_valid > 0) {
+ put_byte(s, (Byte)s->bi_buf);
+ }
+ s->bi_buf = 0;
+ s->bi_valid = 0;
+#ifdef DEBUG
+ s->bits_sent = (s->bits_sent+7) & ~7;
+#endif
+}
+
+local void copy_block(s, buf, len, header)
+ deflate_state *s;
+ charf *buf; /* the input data */
+ unsigned len; /* its length */
+ int header; /* true if block header must be written */
+{
+ bi_windup(s); /* align on byte boundary */
+ s->last_eob_len = 8; /* enough lookahead for inflate */
+
+ if (header) {
+ put_short(s, (ush)len);
+#ifdef DEBUG
+ s->bits_sent += 2*16;
+#endif
+ }
+#ifdef DEBUG
+ s->bits_sent += (ulg)len<<3;
+#endif
+ while (len--) {
+ put_byte(s, *buf++);
+ }
+}
diff --git a/TODO.txt b/TODO.txt
index 26cff14..c12605c 100755
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,21 +1,21 @@
-TODO
-----
-
-NSIS
-
-* Compiler plug-ins
-
-* Empty subsections should not show
-
-* Option to cancel the installation process
-
-EXAMPLES
-
-* Write an advanced paging example showing multiple components page with multiple
- instfiles pages
-
-PLUG-INS
-
-* InstallOptions - custom class names so you can include whatever control you want
-
+TODO
+----
+
+NSIS
+
+* Compiler plug-ins
+
+* Empty subsections should not show
+
+* Option to cancel the installation process
+
+EXAMPLES
+
+* Write an advanced paging example showing multiple components page with multiple
+ instfiles pages
+
+PLUG-INS
+
+* InstallOptions - custom class names so you can include whatever control you want
+
* nsExec - live outputs \ No newline at end of file
diff --git a/nsisconf.nsh b/nsisconf.nsh
index 67c68f5..48a4915 100755
--- a/nsisconf.nsh
+++ b/nsisconf.nsh
@@ -1,62 +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
-
+;------------------------
+;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